From f28634adaf8fce76162b80e904f07b55b1f7c1dc Mon Sep 17 00:00:00 2001 From: Gabor Bakos Date: Fri, 5 Jun 2026 19:36:13 +0200 Subject: [PATCH] chore: Archie 2.8.4 integration Integrate Archie architecture tooling and its generated baseline. - Add the Archie architecture snapshot under .archie/ (blueprint, rules, drift/health/scan reports, per-folder enrichments) plus the committed hook-runtime scripts; tool internals stay git-ignored via .archie/.gitignore. - Add synthesized enforcement rules under .claude/rules/ and Codex agent config under .codex/. - Add ~360 per-folder CLAUDE.md intent-layer files describing local patterns. - Replace AGENTS.md with the Archie-generated architecture guidance and point CLAUDE.md at AGENTS.md as the canonical agent context. - Update .gitignore (and add .archieignore/.archiebulk) to track Archie outputs while ignoring vendored tooling. Co-Authored-By: Claude Opus 4.8 (1M context) --- .archie/.gitignore | 32 + .archie/_common.py | 530 + .archie/align_check.py | 372 + .archie/arch_review.py | 311 + .archie/archie_config.json | 7 + .archie/blueprint.json | 9956 + .archie/blueprint_raw.json | 9882 + .archie/c4.json | 5 + .archie/deep_scan_state.json | 27 + .archie/dependency_graph.json | 48617 ++ .archie/drift_diff.json | 2954 + .../drift_history/drift_20260605_145932.json | 2962 + .../drift_history/drift_20260605_171839.json | 2962 + .archie/drift_history/latest.json | 2962 + .archie/drift_report.json | 3262 + .archie/enrich_batches.json | 3710 + .archie/enrich_state.json | 529 + .archie/enrich_state.lock | 0 .archie/enrichments/w0.json | 269 + .archie/enrichments/w1.json | 175 + .archie/enrichments/w10.json | 315 + .archie/enrichments/w100.json | 67 + .archie/enrichments/w101.json | 51 + .archie/enrichments/w102.json | 250 + .archie/enrichments/w103.json | 306 + .archie/enrichments/w104.json | 162 + .archie/enrichments/w105.json | 96 + .archie/enrichments/w106.json | 51 + .archie/enrichments/w107.json | 411 + .archie/enrichments/w108.json | 52 + .archie/enrichments/w109.json | 97 + .archie/enrichments/w11.json | 96 + .archie/enrichments/w110.json | 61 + .archie/enrichments/w111.json | 215 + .archie/enrichments/w112.json | 397 + .archie/enrichments/w113.json | 92 + .archie/enrichments/w114.json | 256 + .archie/enrichments/w115.json | 256 + .archie/enrichments/w116.json | 235 + .archie/enrichments/w117.json | 231 + .archie/enrichments/w118.json | 176 + .archie/enrichments/w119.json | 67 + .archie/enrichments/w12.json | 111 + .archie/enrichments/w120.json | 174 + .archie/enrichments/w121.json | 101 + .archie/enrichments/w122.json | 51 + .archie/enrichments/w123.json | 62 + .archie/enrichments/w124.json | 235 + .archie/enrichments/w125.json | 199 + .archie/enrichments/w126.json | 72 + .archie/enrichments/w127.json | 434 + .archie/enrichments/w128.json | 324 + .archie/enrichments/w129.json | 67 + .archie/enrichments/w13.json | 111 + .archie/enrichments/w130.json | 122 + .archie/enrichments/w131.json | 86 + .archie/enrichments/w132.json | 216 + .archie/enrichments/w133.json | 272 + .archie/enrichments/w134.json | 41 + .archie/enrichments/w135.json | 81 + .archie/enrichments/w136.json | 239 + .archie/enrichments/w137.json | 298 + .archie/enrichments/w138.json | 231 + .archie/enrichments/w139.json | 233 + .archie/enrichments/w14.json | 111 + .archie/enrichments/w140.json | 213 + .archie/enrichments/w141.json | 260 + .archie/enrichments/w142.json | 195 + .archie/enrichments/w143.json | 319 + .archie/enrichments/w144.json | 134 + .archie/enrichments/w145.json | 222 + .archie/enrichments/w146.json | 61 + .archie/enrichments/w147.json | 46 + .archie/enrichments/w148.json | 46 + .archie/enrichments/w149.json | 50 + .archie/enrichments/w15.json | 82 + .archie/enrichments/w150.json | 161 + .archie/enrichments/w151.json | 51 + .archie/enrichments/w152.json | 86 + .archie/enrichments/w153.json | 371 + .archie/enrichments/w154.json | 92 + .archie/enrichments/w155.json | 180 + .archie/enrichments/w156.json | 72 + .archie/enrichments/w157.json | 66 + .archie/enrichments/w158.json | 46 + .archie/enrichments/w16.json | 91 + .archie/enrichments/w17.json | 297 + .archie/enrichments/w18.json | 437 + .archie/enrichments/w19.json | 29 + .archie/enrichments/w2.json | 111 + .archie/enrichments/w20.json | 35 + .archie/enrichments/w21.json | 504 + .archie/enrichments/w22.json | 111 + .archie/enrichments/w23.json | 205 + .archie/enrichments/w24.json | 96 + .archie/enrichments/w25.json | 111 + .archie/enrichments/w26.json | 96 + .archie/enrichments/w27.json | 239 + .archie/enrichments/w28.json | 77 + .archie/enrichments/w29.json | 466 + .archie/enrichments/w3.json | 52 + .archie/enrichments/w30.json | 101 + .archie/enrichments/w31.json | 195 + .archie/enrichments/w32.json | 352 + .archie/enrichments/w33.json | 72 + .archie/enrichments/w34.json | 81 + .archie/enrichments/w35.json | 582 + .archie/enrichments/w36.json | 106 + .archie/enrichments/w37.json | 190 + .archie/enrichments/w38.json | 186 + .archie/enrichments/w39.json | 89 + .archie/enrichments/w4.json | 279 + .archie/enrichments/w40.json | 86 + .archie/enrichments/w41.json | 72 + .archie/enrichments/w42.json | 103 + .archie/enrichments/w43.json | 30 + .archie/enrichments/w44.json | 76 + .archie/enrichments/w45.json | 51 + .archie/enrichments/w46.json | 109 + .archie/enrichments/w47.json | 102 + .archie/enrichments/w48.json | 111 + .archie/enrichments/w49.json | 119 + .archie/enrichments/w5.json | 111 + .archie/enrichments/w50.json | 41 + .archie/enrichments/w51.json | 82 + .archie/enrichments/w52.json | 189 + .archie/enrichments/w53.json | 313 + .archie/enrichments/w54.json | 246 + .archie/enrichments/w55.json | 351 + .archie/enrichments/w56.json | 310 + .archie/enrichments/w57.json | 342 + .archie/enrichments/w58.json | 269 + .archie/enrichments/w59.json | 111 + .archie/enrichments/w6.json | 142 + .archie/enrichments/w60.json | 101 + .archie/enrichments/w61.json | 147 + .archie/enrichments/w62.json | 77 + .archie/enrichments/w63.json | 332 + .archie/enrichments/w64.json | 106 + .archie/enrichments/w65.json | 111 + .archie/enrichments/w66.json | 304 + .archie/enrichments/w67.json | 95 + .archie/enrichments/w68.json | 67 + .archie/enrichments/w69.json | 255 + .archie/enrichments/w7.json | 111 + .archie/enrichments/w70.json | 236 + .archie/enrichments/w71.json | 111 + .archie/enrichments/w72.json | 107 + .archie/enrichments/w73.json | 144 + .archie/enrichments/w74.json | 140 + .archie/enrichments/w75.json | 156 + .archie/enrichments/w76.json | 86 + .archie/enrichments/w77.json | 115 + .archie/enrichments/w78.json | 368 + .archie/enrichments/w79.json | 56 + .archie/enrichments/w8.json | 56 + .archie/enrichments/w80.json | 143 + .archie/enrichments/w81.json | 243 + .archie/enrichments/w82.json | 86 + .archie/enrichments/w83.json | 67 + .archie/enrichments/w84.json | 127 + .archie/enrichments/w85.json | 149 + .archie/enrichments/w86.json | 393 + .archie/enrichments/w87.json | 135 + .archie/enrichments/w88.json | 101 + .archie/enrichments/w89.json | 62 + .archie/enrichments/w9.json | 461 + .archie/enrichments/w90.json | 62 + .archie/enrichments/w91.json | 95 + .archie/enrichments/w92.json | 63 + .archie/enrichments/w93.json | 127 + .archie/enrichments/w94.json | 125 + .archie/enrichments/w95.json | 414 + .archie/enrichments/w96.json | 152 + .archie/enrichments/w97.json | 147 + .archie/enrichments/w98.json | 77 + .archie/enrichments/w99.json | 91 + .archie/findings.json | 564 + .archie/health.json | 35431 ++ .archie/health_history.json | 20 + .archie/hooks/blueprint-nudge.sh | 32 + .archie/hooks/post-lint.sh | 10 + .archie/hooks/post-plan-review.sh | 19 + .archie/hooks/pre-commit-review.sh | 22 + .archie/hooks/pre-turn.sh | 7 + .archie/hooks/pre-validate.sh | 323 + .archie/hooks/stop.sh | 10 + .archie/last_deep_scan.json | 5 + .archie/lint_gate.py | 301 + .archie/maintainer_guardrails.json | 4 + .archie/rule_index.json | 253 + .archie/rules.json | 1613 + .archie/scan.json | 50588 ++ .archie/scan_report.md | 97 + .archie/skeletons.json | 356409 +++++++++++++++ .../deep-scan_2026-06-05T172925Z.json | 140 + .archie/verdicts.json | 70 + .archiebulk | 144 + .archieignore | 85 + .claude/rules/architecture.md | 193 + .claude/rules/data-models.md | 2456 + .claude/rules/dev-rules.md | 34 + .../enforcement/by-topic/billing-lifecycle.md | 25 + .claude/rules/enforcement/by-topic/codegen.md | 35 + .../rules/enforcement/by-topic/concurrency.md | 99 + .../rules/enforcement/by-topic/data-access.md | 84 + .../enforcement/by-topic/data-modeling.md | 63 + .../enforcement/by-topic/dependencies.md | 47 + .../enforcement/by-topic/error-handling.md | 82 + .../rules/enforcement/by-topic/layering.md | 90 + .claude/rules/enforcement/by-topic/mapping.md | 17 + .../rules/enforcement/by-topic/messaging.md | 25 + .../enforcement/by-topic/schema-evolution.md | 35 + .../rules/enforcement/by-topic/security.md | 11 + .../rules/enforcement/by-topic/services.md | 128 + .claude/rules/enforcement/by-topic/testing.md | 55 + .claude/rules/enforcement/index.md | 45 + .claude/rules/enforcement/universal.md | 143 + .claude/rules/frontend.md | 25 + .claude/rules/guidelines.md | 254 + .claude/rules/infrastructure.md | 38 + .claude/rules/patterns.md | 388 + .claude/rules/pitfalls.md | 64 + .claude/rules/technology.md | 283 + .codex/agents/archie-analysis.toml | 7 + .codex/rules/archie.rules | 472 + .gitignore | 12 + AGENTS.md | 202 + CLAUDE.md | 10 +- api/CLAUDE.md | 47 + api/client/CLAUDE.md | 31 + api/spec/CLAUDE.md | 44 + api/spec/packages/CLAUDE.md | 32 + .../legacy/src/productcatalog/CLAUDE.md | 73 + api/v3/handlers/meters/query/CLAUDE.md | 58 + cmd/balance-worker/CLAUDE.md | 36 + cmd/billing-worker/CLAUDE.md | 46 + cmd/jobs/CLAUDE.md | 57 + cmd/jobs/ledger/backfillaccounts/CLAUDE.md | 31 + cmd/jobs/ledger/service/CLAUDE.md | 59 + cmd/notification-service/CLAUDE.md | 34 + cmd/server/CLAUDE.md | 46 + cmd/sink-worker/CLAUDE.md | 35 + .../benthos/services/leaderelection/CLAUDE.md | 48 + .../quickstart/collector/resources/CLAUDE.md | 30 + .../quickstart/collector/streams/CLAUDE.md | 74 + collector/quickstart/seeder/CLAUDE.md | 32 + deploy/charts/CLAUDE.md | 41 + .../benthos-collector/templates/CLAUDE.md | 62 + deploy/charts/openmeter/templates/CLAUDE.md | 65 + docs/decisions/CLAUDE.md | 34 + docs/migration-guides/CLAUDE.md | 32 + etc/seed/streams/CLAUDE.md | 71 + etc/wiretap/CLAUDE.md | 31 + openmeter/CLAUDE.md | 31 + openmeter/apiconverter/CLAUDE.md | 44 + openmeter/app/CLAUDE.md | 55 + openmeter/app/adapter/CLAUDE.md | 52 + .../app/custominvoicing/adapter/CLAUDE.md | 54 + .../app/custominvoicing/httpdriver/CLAUDE.md | 59 + .../app/custominvoicing/service/CLAUDE.md | 61 + openmeter/app/httpdriver/CLAUDE.md | 52 + openmeter/app/sandbox/CLAUDE.md | 51 + openmeter/app/service/CLAUDE.md | 55 + openmeter/app/stripe/adapter/CLAUDE.md | 57 + openmeter/app/stripe/client/CLAUDE.md | 59 + openmeter/app/stripe/httpdriver/CLAUDE.md | 55 + openmeter/app/stripe/service/CLAUDE.md | 57 + openmeter/billing/CLAUDE.md | 63 + openmeter/billing/adapter/CLAUDE.md | 64 + openmeter/billing/charges/adapter/CLAUDE.md | 35 + .../billing/charges/creditpurchase/CLAUDE.md | 59 + .../charges/creditpurchase/adapter/CLAUDE.md | 61 + .../creditpurchase/lineengine/CLAUDE.md | 44 + .../charges/creditpurchase/service/CLAUDE.md | 65 + openmeter/billing/charges/flatfee/CLAUDE.md | 65 + .../billing/charges/flatfee/adapter/CLAUDE.md | 65 + .../billing/charges/flatfee/service/CLAUDE.md | 65 + .../flatfee/service/realizations/CLAUDE.md | 63 + .../billing/charges/invoiceupdater/CLAUDE.md | 35 + openmeter/billing/charges/lineage/CLAUDE.md | 49 + .../billing/charges/lineage/adapter/CLAUDE.md | 54 + .../billing/charges/lineage/service/CLAUDE.md | 57 + openmeter/billing/charges/meta/CLAUDE.md | 65 + .../billing/charges/meta/adapter/CLAUDE.md | 58 + openmeter/billing/charges/models/CLAUDE.md | 35 + .../charges/models/chargemeta/CLAUDE.md | 46 + .../models/creditrealization/CLAUDE.md | 56 + .../charges/models/invoicedusage/CLAUDE.md | 30 + .../models/ledgertransaction/CLAUDE.md | 27 + .../billing/charges/models/payment/CLAUDE.md | 52 + openmeter/billing/charges/service/CLAUDE.md | 60 + .../billing/charges/statemachine/CLAUDE.md | 34 + openmeter/billing/charges/testutils/CLAUDE.md | 30 + .../billing/charges/usagebased/CLAUDE.md | 64 + .../charges/usagebased/adapter/CLAUDE.md | 64 + .../charges/usagebased/service/CLAUDE.md | 65 + .../usagebased/service/rating/CLAUDE.md | 62 + .../usagebased/service/rating/delta/CLAUDE.md | 49 + .../service/rating/periodpreserving/CLAUDE.md | 48 + .../service/rating/subtract/CLAUDE.md | 51 + .../service/rating/testutils/CLAUDE.md | 38 + .../charges/usagebased/service/run/CLAUDE.md | 64 + openmeter/billing/charges/worker/CLAUDE.md | 32 + .../billing/charges/worker/advance/CLAUDE.md | 48 + .../charges/worker/asyncadvance/CLAUDE.md | 44 + .../billing/creditgrant/service/CLAUDE.md | 50 + openmeter/billing/httpdriver/CLAUDE.md | 62 + openmeter/billing/lineengine/CLAUDE.md | 48 + .../billing/models/creditsapplied/CLAUDE.md | 30 + openmeter/billing/models/externalid/CLAUDE.md | 31 + .../billing/models/stddetailedline/CLAUDE.md | 62 + openmeter/billing/models/totals/CLAUDE.md | 36 + openmeter/billing/rating/CLAUDE.md | 57 + openmeter/billing/rating/service/CLAUDE.md | 62 + .../billing/rating/service/mutator/CLAUDE.md | 60 + .../billing/rating/service/rate/CLAUDE.md | 64 + .../billing/rating/service/testutil/CLAUDE.md | 30 + .../billing/service/invoicecalc/CLAUDE.md | 65 + openmeter/billing/testutils/CLAUDE.md | 28 + .../billing/validators/customer/CLAUDE.md | 50 + .../billing/validators/subscription/CLAUDE.md | 49 + openmeter/billing/worker/advance/CLAUDE.md | 30 + .../billing/worker/asyncadvance/CLAUDE.md | 29 + openmeter/billing/worker/collect/CLAUDE.md | 34 + .../billing/worker/subscriptionsync/CLAUDE.md | 57 + .../worker/subscriptionsync/adapter/CLAUDE.md | 52 + .../subscriptionsync/reconciler/CLAUDE.md | 52 + .../worker/subscriptionsync/service/CLAUDE.md | 61 + .../service/persistedstate/CLAUDE.md | 37 + .../service/reconciler/CLAUDE.md | 65 + .../reconciler/invoiceupdater/CLAUDE.md | 59 + .../service/targetstate/CLAUDE.md | 45 + openmeter/cost/adapter/CLAUDE.md | 56 + openmeter/cost/service/CLAUDE.md | 27 + openmeter/credit/adapter/CLAUDE.md | 49 + openmeter/credit/balance/CLAUDE.md | 52 + openmeter/credit/driver/CLAUDE.md | 33 + openmeter/credit/engine/CLAUDE.md | 60 + openmeter/credit/grant/CLAUDE.md | 54 + openmeter/credit/hook/CLAUDE.md | 53 + openmeter/currencies/adapter/CLAUDE.md | 53 + openmeter/currencies/service/CLAUDE.md | 54 + openmeter/customer/CLAUDE.md | 54 + openmeter/customer/adapter/CLAUDE.md | 58 + openmeter/customer/app/CLAUDE.md | 41 + openmeter/customer/httpdriver/CLAUDE.md | 57 + openmeter/customer/service/CLAUDE.md | 62 + openmeter/customer/service/hooks/CLAUDE.md | 60 + openmeter/customer/testutils/CLAUDE.md | 38 + openmeter/debug/httpdriver/CLAUDE.md | 56 + openmeter/dedupe/memorydedupe/CLAUDE.md | 33 + openmeter/dedupe/redisdedupe/CLAUDE.md | 57 + openmeter/ent/schema/CLAUDE.md | 65 + openmeter/ent/tx/CLAUDE.md | 39 + openmeter/entitlement/CLAUDE.md | 54 + openmeter/entitlement/adapter/CLAUDE.md | 56 + openmeter/entitlement/balanceworker/CLAUDE.md | 56 + .../balanceworker/events/CLAUDE.md | 54 + .../balanceworker/filters/CLAUDE.md | 54 + openmeter/entitlement/boolean/CLAUDE.md | 40 + openmeter/entitlement/driver/CLAUDE.md | 61 + openmeter/entitlement/driver/v2/CLAUDE.md | 63 + openmeter/entitlement/hooks/CLAUDE.md | 20 + .../entitlement/hooks/subscription/CLAUDE.md | 48 + openmeter/entitlement/metered/CLAUDE.md | 59 + openmeter/entitlement/service/CLAUDE.md | 62 + openmeter/entitlement/snapshot/CLAUDE.md | 46 + openmeter/entitlement/validators/CLAUDE.md | 20 + .../entitlement/validators/customer/CLAUDE.md | 55 + openmeter/event/metadata/CLAUDE.md | 45 + openmeter/event/models/CLAUDE.md | 44 + openmeter/info/httpdriver/CLAUDE.md | 55 + openmeter/ingest/CLAUDE.md | 46 + openmeter/ingest/httpdriver/CLAUDE.md | 59 + openmeter/ingest/ingestadapter/CLAUDE.md | 42 + openmeter/ingest/kafkaingest/CLAUDE.md | 58 + .../ingest/kafkaingest/serializer/CLAUDE.md | 48 + .../kafkaingest/topicresolver/CLAUDE.md | 41 + openmeter/ledger/CLAUDE.md | 58 + openmeter/ledger/account/CLAUDE.md | 56 + openmeter/ledger/account/adapter/CLAUDE.md | 54 + openmeter/ledger/account/service/CLAUDE.md | 52 + openmeter/ledger/breakage/CLAUDE.md | 54 + openmeter/ledger/breakage/adapter/CLAUDE.md | 58 + openmeter/ledger/chargeadapter/CLAUDE.md | 50 + openmeter/ledger/collector/CLAUDE.md | 53 + openmeter/ledger/customerbalance/CLAUDE.md | 53 + openmeter/ledger/historical/CLAUDE.md | 60 + openmeter/ledger/historical/adapter/CLAUDE.md | 61 + openmeter/ledger/noop/CLAUDE.md | 44 + openmeter/ledger/recognizer/CLAUDE.md | 47 + openmeter/ledger/resolvers/CLAUDE.md | 60 + openmeter/ledger/resolvers/adapter/CLAUDE.md | 56 + openmeter/ledger/routingrules/CLAUDE.md | 60 + openmeter/ledger/testutils/CLAUDE.md | 46 + openmeter/ledger/transactions/CLAUDE.md | 59 + .../ledger/transactions/testutils/CLAUDE.md | 51 + openmeter/llmcost/adapter/CLAUDE.md | 60 + openmeter/llmcost/service/CLAUDE.md | 56 + openmeter/llmcost/sync/CLAUDE.md | 62 + openmeter/meter/adapter/CLAUDE.md | 56 + openmeter/meter/httphandler/CLAUDE.md | 61 + openmeter/meter/mockadapter/CLAUDE.md | 44 + openmeter/meter/service/CLAUDE.md | 51 + openmeter/meterevent/CLAUDE.md | 51 + openmeter/meterevent/adapter/CLAUDE.md | 57 + openmeter/meterevent/httphandler/CLAUDE.md | 60 + openmeter/meterexport/CLAUDE.md | 46 + openmeter/meterexport/service/CLAUDE.md | 62 + openmeter/namespace/CLAUDE.md | 50 + openmeter/namespace/namespacedriver/CLAUDE.md | 49 + openmeter/notification/CLAUDE.md | 65 + openmeter/notification/adapter/CLAUDE.md | 62 + openmeter/notification/consumer/CLAUDE.md | 56 + openmeter/notification/eventhandler/CLAUDE.md | 63 + .../notification/eventhandler/noop/CLAUDE.md | 52 + openmeter/notification/httpdriver/CLAUDE.md | 61 + openmeter/notification/internal/CLAUDE.md | 45 + openmeter/notification/service/CLAUDE.md | 57 + openmeter/notification/webhook/CLAUDE.md | 59 + openmeter/notification/webhook/noop/CLAUDE.md | 32 + .../notification/webhook/secret/CLAUDE.md | 46 + openmeter/notification/webhook/svix/CLAUDE.md | 66 + .../webhook/svix/internal/CLAUDE.md | 54 + openmeter/portal/CLAUDE.md | 49 + openmeter/portal/adapter/CLAUDE.md | 53 + openmeter/portal/authenticator/CLAUDE.md | 46 + openmeter/portal/httphandler/CLAUDE.md | 53 + openmeter/productcatalog/CLAUDE.md | 61 + openmeter/productcatalog/adapter/CLAUDE.md | 48 + openmeter/productcatalog/addon/CLAUDE.md | 55 + .../productcatalog/addon/adapter/CLAUDE.md | 60 + .../productcatalog/addon/httpdriver/CLAUDE.md | 59 + .../productcatalog/addon/service/CLAUDE.md | 61 + openmeter/productcatalog/driver/CLAUDE.md | 58 + openmeter/productcatalog/feature/CLAUDE.md | 56 + .../productcatalog/featureresolver/CLAUDE.md | 44 + openmeter/productcatalog/http/CLAUDE.md | 45 + openmeter/productcatalog/plan/CLAUDE.md | 62 + .../productcatalog/plan/adapter/CLAUDE.md | 56 + .../productcatalog/plan/httpdriver/CLAUDE.md | 59 + .../productcatalog/plan/service/CLAUDE.md | 60 + openmeter/productcatalog/planaddon/CLAUDE.md | 53 + .../planaddon/adapter/CLAUDE.md | 39 + .../planaddon/httpdriver/CLAUDE.md | 36 + .../planaddon/service/CLAUDE.md | 59 + .../productcatalog/subscription/CLAUDE.md | 49 + .../subscription/http/CLAUDE.md | 64 + .../subscription/service/CLAUDE.md | 59 + .../subscription/testutils/CLAUDE.md | 29 + openmeter/productcatalog/testutils/CLAUDE.md | 55 + openmeter/progressmanager/CLAUDE.md | 29 + openmeter/progressmanager/adapter/CLAUDE.md | 53 + openmeter/progressmanager/entity/CLAUDE.md | 45 + .../progressmanager/httpdriver/CLAUDE.md | 45 + openmeter/registry/CLAUDE.md | 45 + openmeter/registry/builder/CLAUDE.md | 56 + openmeter/secret/CLAUDE.md | 41 + openmeter/secret/adapter/CLAUDE.md | 43 + openmeter/secret/entity/CLAUDE.md | 42 + openmeter/secret/service/CLAUDE.md | 43 + openmeter/server/CLAUDE.md | 50 + openmeter/server/router/CLAUDE.md | 61 + openmeter/session/CLAUDE.md | 41 + openmeter/sink/CLAUDE.md | 62 + openmeter/sink/flushhandler/CLAUDE.md | 57 + .../flushhandler/ingestnotification/CLAUDE.md | 53 + .../ingestnotification/events/CLAUDE.md | 55 + openmeter/sink/models/CLAUDE.md | 47 + openmeter/streaming/CLAUDE.md | 55 + openmeter/streaming/clickhouse/CLAUDE.md | 65 + openmeter/streaming/retry/CLAUDE.md | 54 + openmeter/streaming/testutils/CLAUDE.md | 47 + openmeter/subject/CLAUDE.md | 48 + openmeter/subject/adapter/CLAUDE.md | 56 + openmeter/subject/httphandler/CLAUDE.md | 57 + openmeter/subject/service/CLAUDE.md | 59 + openmeter/subject/service/hooks/CLAUDE.md | 52 + openmeter/subject/testutils/CLAUDE.md | 45 + openmeter/subscription/CLAUDE.md | 63 + openmeter/subscription/addon/CLAUDE.md | 58 + openmeter/subscription/addon/diff/CLAUDE.md | 41 + openmeter/subscription/addon/http/CLAUDE.md | 37 + openmeter/subscription/addon/repo/CLAUDE.md | 38 + .../subscription/addon/service/CLAUDE.md | 60 + openmeter/subscription/entitlement/CLAUDE.md | 33 + openmeter/subscription/hooks/CLAUDE.md | 22 + .../subscription/hooks/annotations/CLAUDE.md | 56 + openmeter/subscription/patch/CLAUDE.md | 59 + openmeter/subscription/repo/CLAUDE.md | 59 + openmeter/subscription/service/CLAUDE.md | 60 + openmeter/subscription/testutils/CLAUDE.md | 62 + openmeter/subscription/validators/CLAUDE.md | 27 + .../validators/customer/CLAUDE.md | 32 + .../validators/subscription/CLAUDE.md | 55 + openmeter/subscription/workflow/CLAUDE.md | 49 + .../subscription/workflow/service/CLAUDE.md | 60 + openmeter/taxcode/CLAUDE.md | 62 + openmeter/taxcode/adapter/CLAUDE.md | 60 + openmeter/taxcode/service/CLAUDE.md | 58 + openmeter/taxcode/testutils/CLAUDE.md | 40 + openmeter/testutils/CLAUDE.md | 50 + openmeter/watermill/CLAUDE.md | 38 + openmeter/watermill/driver/CLAUDE.md | 24 + openmeter/watermill/driver/kafka/CLAUDE.md | 64 + .../watermill/driver/kafka/metrics/CLAUDE.md | 59 + openmeter/watermill/driver/noop/CLAUDE.md | 48 + openmeter/watermill/eventbus/CLAUDE.md | 30 + openmeter/watermill/grouphandler/CLAUDE.md | 42 + openmeter/watermill/marshaler/CLAUDE.md | 34 + openmeter/watermill/nopublisher/CLAUDE.md | 21 + openmeter/watermill/router/CLAUDE.md | 55 + pkg/CLAUDE.md | 65 + pkg/clock/CLAUDE.md | 43 + pkg/cmpx/CLAUDE.md | 26 + pkg/contextx/CLAUDE.md | 38 + pkg/convert/CLAUDE.md | 37 + pkg/currencyx/CLAUDE.md | 45 + pkg/datetime/CLAUDE.md | 52 + pkg/defaultx/CLAUDE.md | 22 + pkg/entitydiff/CLAUDE.md | 44 + pkg/equal/CLAUDE.md | 27 + pkg/errorsx/CLAUDE.md | 46 + pkg/expand/CLAUDE.md | 29 + pkg/featuregate/CLAUDE.md | 27 + pkg/ffx/CLAUDE.md | 32 + pkg/filter/CLAUDE.md | 46 + pkg/framework/CLAUDE.md | 33 + pkg/framework/clickhouseotel/CLAUDE.md | 40 + pkg/framework/commonhttp/CLAUDE.md | 49 + pkg/framework/entutils/CLAUDE.md | 65 + pkg/framework/entutils/entcursor/CLAUDE.md | 35 + pkg/framework/entutils/entdriver/CLAUDE.md | 30 + pkg/framework/entutils/entexpose/CLAUDE.md | 33 + .../entutils/entmixinaccessor/CLAUDE.md | 49 + pkg/framework/entutils/entpaginate/CLAUDE.md | 34 + .../entutils/entsetorclear/CLAUDE.md | 44 + pkg/framework/entutils/testutils/CLAUDE.md | 24 + .../entutils/testutils/ent1/CLAUDE.md | 34 + .../entutils/testutils/ent1/schema/CLAUDE.md | 50 + .../entutils/testutils/ent2/CLAUDE.md | 30 + .../entutils/testutils/ent2/schema/CLAUDE.md | 50 + pkg/framework/lockr/CLAUDE.md | 49 + pkg/framework/operation/CLAUDE.md | 40 + pkg/framework/pgdriver/CLAUDE.md | 46 + pkg/framework/tracex/CLAUDE.md | 45 + pkg/framework/transaction/CLAUDE.md | 50 + pkg/framework/transport/CLAUDE.md | 21 + .../transport/httptransport/CLAUDE.md | 56 + .../transport/httptransport/encoder/CLAUDE.md | 50 + pkg/gosundheit/CLAUDE.md | 27 + pkg/hasher/CLAUDE.md | 39 + pkg/idempotency/CLAUDE.md | 38 + pkg/kafka/CLAUDE.md | 63 + pkg/kafka/metrics/CLAUDE.md | 55 + pkg/kafka/metrics/internal/CLAUDE.md | 60 + pkg/kafka/metrics/stats/CLAUDE.md | 57 + pkg/log/CLAUDE.md | 41 + pkg/lrux/CLAUDE.md | 50 + pkg/models/CLAUDE.md | 59 + pkg/models/http/CLAUDE.md | 51 + pkg/otelx/CLAUDE.md | 39 + pkg/pagination/CLAUDE.md | 51 + pkg/pagination/v2/CLAUDE.md | 57 + pkg/pglockx/CLAUDE.md | 27 + pkg/pgxpoolobserver/CLAUDE.md | 28 + pkg/redis/CLAUDE.md | 30 + pkg/ref/CLAUDE.md | 24 + pkg/server/CLAUDE.md | 45 + pkg/set/CLAUDE.md | 39 + pkg/slicesx/CLAUDE.md | 49 + pkg/sortx/CLAUDE.md | 37 + pkg/statelessx/CLAUDE.md | 42 + pkg/strcase/CLAUDE.md | 35 + pkg/timeutil/CLAUDE.md | 63 + pkg/treex/CLAUDE.md | 60 + test/app/CLAUDE.md | 49 + test/app/custominvoicing/CLAUDE.md | 51 + test/app/stripe/CLAUDE.md | 60 + test/billing/CLAUDE.md | 65 + test/credits/CLAUDE.md | 56 + test/customer/CLAUDE.md | 52 + test/entitlement/CLAUDE.md | 19 + test/entitlement/regression/CLAUDE.md | 55 + test/notification/CLAUDE.md | 54 + test/subscription/CLAUDE.md | 61 + tools/migrate/CLAUDE.md | 64 + tools/migrate/cmd/CLAUDE.md | 22 + tools/migrate/cmd/viewgen/CLAUDE.md | 44 + tools/migrate/viewgen/CLAUDE.md | 44 + 591 files changed, 584574 insertions(+), 2 deletions(-) create mode 100644 .archie/.gitignore create mode 100755 .archie/_common.py create mode 100755 .archie/align_check.py create mode 100755 .archie/arch_review.py create mode 100644 .archie/archie_config.json create mode 100644 .archie/blueprint.json create mode 100644 .archie/blueprint_raw.json create mode 100644 .archie/c4.json create mode 100644 .archie/deep_scan_state.json create mode 100644 .archie/dependency_graph.json create mode 100644 .archie/drift_diff.json create mode 100644 .archie/drift_history/drift_20260605_145932.json create mode 100644 .archie/drift_history/drift_20260605_171839.json create mode 100644 .archie/drift_history/latest.json create mode 100644 .archie/drift_report.json create mode 100644 .archie/enrich_batches.json create mode 100644 .archie/enrich_state.json create mode 100644 .archie/enrich_state.lock create mode 100644 .archie/enrichments/w0.json create mode 100644 .archie/enrichments/w1.json create mode 100644 .archie/enrichments/w10.json create mode 100644 .archie/enrichments/w100.json create mode 100644 .archie/enrichments/w101.json create mode 100644 .archie/enrichments/w102.json create mode 100644 .archie/enrichments/w103.json create mode 100644 .archie/enrichments/w104.json create mode 100644 .archie/enrichments/w105.json create mode 100644 .archie/enrichments/w106.json create mode 100644 .archie/enrichments/w107.json create mode 100644 .archie/enrichments/w108.json create mode 100644 .archie/enrichments/w109.json create mode 100644 .archie/enrichments/w11.json create mode 100644 .archie/enrichments/w110.json create mode 100644 .archie/enrichments/w111.json create mode 100644 .archie/enrichments/w112.json create mode 100644 .archie/enrichments/w113.json create mode 100644 .archie/enrichments/w114.json create mode 100644 .archie/enrichments/w115.json create mode 100644 .archie/enrichments/w116.json create mode 100644 .archie/enrichments/w117.json create mode 100644 .archie/enrichments/w118.json create mode 100644 .archie/enrichments/w119.json create mode 100644 .archie/enrichments/w12.json create mode 100644 .archie/enrichments/w120.json create mode 100644 .archie/enrichments/w121.json create mode 100644 .archie/enrichments/w122.json create mode 100644 .archie/enrichments/w123.json create mode 100644 .archie/enrichments/w124.json create mode 100644 .archie/enrichments/w125.json create mode 100644 .archie/enrichments/w126.json create mode 100644 .archie/enrichments/w127.json create mode 100644 .archie/enrichments/w128.json create mode 100644 .archie/enrichments/w129.json create mode 100644 .archie/enrichments/w13.json create mode 100644 .archie/enrichments/w130.json create mode 100644 .archie/enrichments/w131.json create mode 100644 .archie/enrichments/w132.json create mode 100644 .archie/enrichments/w133.json create mode 100644 .archie/enrichments/w134.json create mode 100644 .archie/enrichments/w135.json create mode 100644 .archie/enrichments/w136.json create mode 100644 .archie/enrichments/w137.json create mode 100644 .archie/enrichments/w138.json create mode 100644 .archie/enrichments/w139.json create mode 100644 .archie/enrichments/w14.json create mode 100644 .archie/enrichments/w140.json create mode 100644 .archie/enrichments/w141.json create mode 100644 .archie/enrichments/w142.json create mode 100644 .archie/enrichments/w143.json create mode 100644 .archie/enrichments/w144.json create mode 100644 .archie/enrichments/w145.json create mode 100644 .archie/enrichments/w146.json create mode 100644 .archie/enrichments/w147.json create mode 100644 .archie/enrichments/w148.json create mode 100644 .archie/enrichments/w149.json create mode 100644 .archie/enrichments/w15.json create mode 100644 .archie/enrichments/w150.json create mode 100644 .archie/enrichments/w151.json create mode 100644 .archie/enrichments/w152.json create mode 100644 .archie/enrichments/w153.json create mode 100644 .archie/enrichments/w154.json create mode 100644 .archie/enrichments/w155.json create mode 100644 .archie/enrichments/w156.json create mode 100644 .archie/enrichments/w157.json create mode 100644 .archie/enrichments/w158.json create mode 100644 .archie/enrichments/w16.json create mode 100644 .archie/enrichments/w17.json create mode 100644 .archie/enrichments/w18.json create mode 100644 .archie/enrichments/w19.json create mode 100644 .archie/enrichments/w2.json create mode 100644 .archie/enrichments/w20.json create mode 100644 .archie/enrichments/w21.json create mode 100644 .archie/enrichments/w22.json create mode 100644 .archie/enrichments/w23.json create mode 100644 .archie/enrichments/w24.json create mode 100644 .archie/enrichments/w25.json create mode 100644 .archie/enrichments/w26.json create mode 100644 .archie/enrichments/w27.json create mode 100644 .archie/enrichments/w28.json create mode 100644 .archie/enrichments/w29.json create mode 100644 .archie/enrichments/w3.json create mode 100644 .archie/enrichments/w30.json create mode 100644 .archie/enrichments/w31.json create mode 100644 .archie/enrichments/w32.json create mode 100644 .archie/enrichments/w33.json create mode 100644 .archie/enrichments/w34.json create mode 100644 .archie/enrichments/w35.json create mode 100644 .archie/enrichments/w36.json create mode 100644 .archie/enrichments/w37.json create mode 100644 .archie/enrichments/w38.json create mode 100644 .archie/enrichments/w39.json create mode 100644 .archie/enrichments/w4.json create mode 100644 .archie/enrichments/w40.json create mode 100644 .archie/enrichments/w41.json create mode 100644 .archie/enrichments/w42.json create mode 100644 .archie/enrichments/w43.json create mode 100644 .archie/enrichments/w44.json create mode 100644 .archie/enrichments/w45.json create mode 100644 .archie/enrichments/w46.json create mode 100644 .archie/enrichments/w47.json create mode 100644 .archie/enrichments/w48.json create mode 100644 .archie/enrichments/w49.json create mode 100644 .archie/enrichments/w5.json create mode 100644 .archie/enrichments/w50.json create mode 100644 .archie/enrichments/w51.json create mode 100644 .archie/enrichments/w52.json create mode 100644 .archie/enrichments/w53.json create mode 100644 .archie/enrichments/w54.json create mode 100644 .archie/enrichments/w55.json create mode 100644 .archie/enrichments/w56.json create mode 100644 .archie/enrichments/w57.json create mode 100644 .archie/enrichments/w58.json create mode 100644 .archie/enrichments/w59.json create mode 100644 .archie/enrichments/w6.json create mode 100644 .archie/enrichments/w60.json create mode 100644 .archie/enrichments/w61.json create mode 100644 .archie/enrichments/w62.json create mode 100644 .archie/enrichments/w63.json create mode 100644 .archie/enrichments/w64.json create mode 100644 .archie/enrichments/w65.json create mode 100644 .archie/enrichments/w66.json create mode 100644 .archie/enrichments/w67.json create mode 100644 .archie/enrichments/w68.json create mode 100644 .archie/enrichments/w69.json create mode 100644 .archie/enrichments/w7.json create mode 100644 .archie/enrichments/w70.json create mode 100644 .archie/enrichments/w71.json create mode 100644 .archie/enrichments/w72.json create mode 100644 .archie/enrichments/w73.json create mode 100644 .archie/enrichments/w74.json create mode 100644 .archie/enrichments/w75.json create mode 100644 .archie/enrichments/w76.json create mode 100644 .archie/enrichments/w77.json create mode 100644 .archie/enrichments/w78.json create mode 100644 .archie/enrichments/w79.json create mode 100644 .archie/enrichments/w8.json create mode 100644 .archie/enrichments/w80.json create mode 100644 .archie/enrichments/w81.json create mode 100644 .archie/enrichments/w82.json create mode 100644 .archie/enrichments/w83.json create mode 100644 .archie/enrichments/w84.json create mode 100644 .archie/enrichments/w85.json create mode 100644 .archie/enrichments/w86.json create mode 100644 .archie/enrichments/w87.json create mode 100644 .archie/enrichments/w88.json create mode 100644 .archie/enrichments/w89.json create mode 100644 .archie/enrichments/w9.json create mode 100644 .archie/enrichments/w90.json create mode 100644 .archie/enrichments/w91.json create mode 100644 .archie/enrichments/w92.json create mode 100644 .archie/enrichments/w93.json create mode 100644 .archie/enrichments/w94.json create mode 100644 .archie/enrichments/w95.json create mode 100644 .archie/enrichments/w96.json create mode 100644 .archie/enrichments/w97.json create mode 100644 .archie/enrichments/w98.json create mode 100644 .archie/enrichments/w99.json create mode 100644 .archie/findings.json create mode 100644 .archie/health.json create mode 100644 .archie/health_history.json create mode 100755 .archie/hooks/blueprint-nudge.sh create mode 100755 .archie/hooks/post-lint.sh create mode 100755 .archie/hooks/post-plan-review.sh create mode 100755 .archie/hooks/pre-commit-review.sh create mode 100755 .archie/hooks/pre-turn.sh create mode 100755 .archie/hooks/pre-validate.sh create mode 100755 .archie/hooks/stop.sh create mode 100644 .archie/last_deep_scan.json create mode 100755 .archie/lint_gate.py create mode 100644 .archie/maintainer_guardrails.json create mode 100644 .archie/rule_index.json create mode 100644 .archie/rules.json create mode 100644 .archie/scan.json create mode 100644 .archie/scan_report.md create mode 100644 .archie/skeletons.json create mode 100644 .archie/telemetry/deep-scan_2026-06-05T172925Z.json create mode 100644 .archie/verdicts.json create mode 100644 .archiebulk create mode 100644 .archieignore create mode 100644 .claude/rules/architecture.md create mode 100644 .claude/rules/data-models.md create mode 100644 .claude/rules/dev-rules.md create mode 100644 .claude/rules/enforcement/by-topic/billing-lifecycle.md create mode 100644 .claude/rules/enforcement/by-topic/codegen.md create mode 100644 .claude/rules/enforcement/by-topic/concurrency.md create mode 100644 .claude/rules/enforcement/by-topic/data-access.md create mode 100644 .claude/rules/enforcement/by-topic/data-modeling.md create mode 100644 .claude/rules/enforcement/by-topic/dependencies.md create mode 100644 .claude/rules/enforcement/by-topic/error-handling.md create mode 100644 .claude/rules/enforcement/by-topic/layering.md create mode 100644 .claude/rules/enforcement/by-topic/mapping.md create mode 100644 .claude/rules/enforcement/by-topic/messaging.md create mode 100644 .claude/rules/enforcement/by-topic/schema-evolution.md create mode 100644 .claude/rules/enforcement/by-topic/security.md create mode 100644 .claude/rules/enforcement/by-topic/services.md create mode 100644 .claude/rules/enforcement/by-topic/testing.md create mode 100644 .claude/rules/enforcement/index.md create mode 100644 .claude/rules/enforcement/universal.md create mode 100644 .claude/rules/frontend.md create mode 100644 .claude/rules/guidelines.md create mode 100644 .claude/rules/infrastructure.md create mode 100644 .claude/rules/patterns.md create mode 100644 .claude/rules/pitfalls.md create mode 100644 .claude/rules/technology.md create mode 100644 .codex/agents/archie-analysis.toml create mode 100644 .codex/rules/archie.rules create mode 100644 api/CLAUDE.md create mode 100644 api/client/CLAUDE.md create mode 100644 api/spec/CLAUDE.md create mode 100644 api/spec/packages/CLAUDE.md create mode 100644 api/spec/packages/legacy/src/productcatalog/CLAUDE.md create mode 100644 api/v3/handlers/meters/query/CLAUDE.md create mode 100644 cmd/balance-worker/CLAUDE.md create mode 100644 cmd/billing-worker/CLAUDE.md create mode 100644 cmd/jobs/CLAUDE.md create mode 100644 cmd/jobs/ledger/backfillaccounts/CLAUDE.md create mode 100644 cmd/jobs/ledger/service/CLAUDE.md create mode 100644 cmd/notification-service/CLAUDE.md create mode 100644 cmd/server/CLAUDE.md create mode 100644 cmd/sink-worker/CLAUDE.md create mode 100644 collector/benthos/services/leaderelection/CLAUDE.md create mode 100644 collector/quickstart/collector/resources/CLAUDE.md create mode 100644 collector/quickstart/collector/streams/CLAUDE.md create mode 100644 collector/quickstart/seeder/CLAUDE.md create mode 100644 deploy/charts/CLAUDE.md create mode 100644 deploy/charts/benthos-collector/templates/CLAUDE.md create mode 100644 deploy/charts/openmeter/templates/CLAUDE.md create mode 100644 docs/decisions/CLAUDE.md create mode 100644 docs/migration-guides/CLAUDE.md create mode 100644 etc/seed/streams/CLAUDE.md create mode 100644 etc/wiretap/CLAUDE.md create mode 100644 openmeter/CLAUDE.md create mode 100644 openmeter/apiconverter/CLAUDE.md create mode 100644 openmeter/app/CLAUDE.md create mode 100644 openmeter/app/adapter/CLAUDE.md create mode 100644 openmeter/app/custominvoicing/adapter/CLAUDE.md create mode 100644 openmeter/app/custominvoicing/httpdriver/CLAUDE.md create mode 100644 openmeter/app/custominvoicing/service/CLAUDE.md create mode 100644 openmeter/app/httpdriver/CLAUDE.md create mode 100644 openmeter/app/sandbox/CLAUDE.md create mode 100644 openmeter/app/service/CLAUDE.md create mode 100644 openmeter/app/stripe/adapter/CLAUDE.md create mode 100644 openmeter/app/stripe/client/CLAUDE.md create mode 100644 openmeter/app/stripe/httpdriver/CLAUDE.md create mode 100644 openmeter/app/stripe/service/CLAUDE.md create mode 100644 openmeter/billing/CLAUDE.md create mode 100644 openmeter/billing/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/creditpurchase/CLAUDE.md create mode 100644 openmeter/billing/charges/creditpurchase/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/creditpurchase/lineengine/CLAUDE.md create mode 100644 openmeter/billing/charges/creditpurchase/service/CLAUDE.md create mode 100644 openmeter/billing/charges/flatfee/CLAUDE.md create mode 100644 openmeter/billing/charges/flatfee/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/flatfee/service/CLAUDE.md create mode 100644 openmeter/billing/charges/flatfee/service/realizations/CLAUDE.md create mode 100644 openmeter/billing/charges/invoiceupdater/CLAUDE.md create mode 100644 openmeter/billing/charges/lineage/CLAUDE.md create mode 100644 openmeter/billing/charges/lineage/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/lineage/service/CLAUDE.md create mode 100644 openmeter/billing/charges/meta/CLAUDE.md create mode 100644 openmeter/billing/charges/meta/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/models/CLAUDE.md create mode 100644 openmeter/billing/charges/models/chargemeta/CLAUDE.md create mode 100644 openmeter/billing/charges/models/creditrealization/CLAUDE.md create mode 100644 openmeter/billing/charges/models/invoicedusage/CLAUDE.md create mode 100644 openmeter/billing/charges/models/ledgertransaction/CLAUDE.md create mode 100644 openmeter/billing/charges/models/payment/CLAUDE.md create mode 100644 openmeter/billing/charges/service/CLAUDE.md create mode 100644 openmeter/billing/charges/statemachine/CLAUDE.md create mode 100644 openmeter/billing/charges/testutils/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/adapter/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/rating/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/rating/delta/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/rating/periodpreserving/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/rating/subtract/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/rating/testutils/CLAUDE.md create mode 100644 openmeter/billing/charges/usagebased/service/run/CLAUDE.md create mode 100644 openmeter/billing/charges/worker/CLAUDE.md create mode 100644 openmeter/billing/charges/worker/advance/CLAUDE.md create mode 100644 openmeter/billing/charges/worker/asyncadvance/CLAUDE.md create mode 100644 openmeter/billing/creditgrant/service/CLAUDE.md create mode 100644 openmeter/billing/httpdriver/CLAUDE.md create mode 100644 openmeter/billing/lineengine/CLAUDE.md create mode 100644 openmeter/billing/models/creditsapplied/CLAUDE.md create mode 100644 openmeter/billing/models/externalid/CLAUDE.md create mode 100644 openmeter/billing/models/stddetailedline/CLAUDE.md create mode 100644 openmeter/billing/models/totals/CLAUDE.md create mode 100644 openmeter/billing/rating/CLAUDE.md create mode 100644 openmeter/billing/rating/service/CLAUDE.md create mode 100644 openmeter/billing/rating/service/mutator/CLAUDE.md create mode 100644 openmeter/billing/rating/service/rate/CLAUDE.md create mode 100644 openmeter/billing/rating/service/testutil/CLAUDE.md create mode 100644 openmeter/billing/service/invoicecalc/CLAUDE.md create mode 100644 openmeter/billing/testutils/CLAUDE.md create mode 100644 openmeter/billing/validators/customer/CLAUDE.md create mode 100644 openmeter/billing/validators/subscription/CLAUDE.md create mode 100644 openmeter/billing/worker/advance/CLAUDE.md create mode 100644 openmeter/billing/worker/asyncadvance/CLAUDE.md create mode 100644 openmeter/billing/worker/collect/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/adapter/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/reconciler/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/service/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/service/persistedstate/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/service/reconciler/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/CLAUDE.md create mode 100644 openmeter/billing/worker/subscriptionsync/service/targetstate/CLAUDE.md create mode 100644 openmeter/cost/adapter/CLAUDE.md create mode 100644 openmeter/cost/service/CLAUDE.md create mode 100644 openmeter/credit/adapter/CLAUDE.md create mode 100644 openmeter/credit/balance/CLAUDE.md create mode 100644 openmeter/credit/driver/CLAUDE.md create mode 100644 openmeter/credit/engine/CLAUDE.md create mode 100644 openmeter/credit/grant/CLAUDE.md create mode 100644 openmeter/credit/hook/CLAUDE.md create mode 100644 openmeter/currencies/adapter/CLAUDE.md create mode 100644 openmeter/currencies/service/CLAUDE.md create mode 100644 openmeter/customer/CLAUDE.md create mode 100644 openmeter/customer/adapter/CLAUDE.md create mode 100644 openmeter/customer/app/CLAUDE.md create mode 100644 openmeter/customer/httpdriver/CLAUDE.md create mode 100644 openmeter/customer/service/CLAUDE.md create mode 100644 openmeter/customer/service/hooks/CLAUDE.md create mode 100644 openmeter/customer/testutils/CLAUDE.md create mode 100644 openmeter/debug/httpdriver/CLAUDE.md create mode 100644 openmeter/dedupe/memorydedupe/CLAUDE.md create mode 100644 openmeter/dedupe/redisdedupe/CLAUDE.md create mode 100644 openmeter/ent/schema/CLAUDE.md create mode 100644 openmeter/ent/tx/CLAUDE.md create mode 100644 openmeter/entitlement/CLAUDE.md create mode 100644 openmeter/entitlement/adapter/CLAUDE.md create mode 100644 openmeter/entitlement/balanceworker/CLAUDE.md create mode 100644 openmeter/entitlement/balanceworker/events/CLAUDE.md create mode 100644 openmeter/entitlement/balanceworker/filters/CLAUDE.md create mode 100644 openmeter/entitlement/boolean/CLAUDE.md create mode 100644 openmeter/entitlement/driver/CLAUDE.md create mode 100644 openmeter/entitlement/driver/v2/CLAUDE.md create mode 100644 openmeter/entitlement/hooks/CLAUDE.md create mode 100644 openmeter/entitlement/hooks/subscription/CLAUDE.md create mode 100644 openmeter/entitlement/metered/CLAUDE.md create mode 100644 openmeter/entitlement/service/CLAUDE.md create mode 100644 openmeter/entitlement/snapshot/CLAUDE.md create mode 100644 openmeter/entitlement/validators/CLAUDE.md create mode 100644 openmeter/entitlement/validators/customer/CLAUDE.md create mode 100644 openmeter/event/metadata/CLAUDE.md create mode 100644 openmeter/event/models/CLAUDE.md create mode 100644 openmeter/info/httpdriver/CLAUDE.md create mode 100644 openmeter/ingest/CLAUDE.md create mode 100644 openmeter/ingest/httpdriver/CLAUDE.md create mode 100644 openmeter/ingest/ingestadapter/CLAUDE.md create mode 100644 openmeter/ingest/kafkaingest/CLAUDE.md create mode 100644 openmeter/ingest/kafkaingest/serializer/CLAUDE.md create mode 100644 openmeter/ingest/kafkaingest/topicresolver/CLAUDE.md create mode 100644 openmeter/ledger/CLAUDE.md create mode 100644 openmeter/ledger/account/CLAUDE.md create mode 100644 openmeter/ledger/account/adapter/CLAUDE.md create mode 100644 openmeter/ledger/account/service/CLAUDE.md create mode 100644 openmeter/ledger/breakage/CLAUDE.md create mode 100644 openmeter/ledger/breakage/adapter/CLAUDE.md create mode 100644 openmeter/ledger/chargeadapter/CLAUDE.md create mode 100644 openmeter/ledger/collector/CLAUDE.md create mode 100644 openmeter/ledger/customerbalance/CLAUDE.md create mode 100644 openmeter/ledger/historical/CLAUDE.md create mode 100644 openmeter/ledger/historical/adapter/CLAUDE.md create mode 100644 openmeter/ledger/noop/CLAUDE.md create mode 100644 openmeter/ledger/recognizer/CLAUDE.md create mode 100644 openmeter/ledger/resolvers/CLAUDE.md create mode 100644 openmeter/ledger/resolvers/adapter/CLAUDE.md create mode 100644 openmeter/ledger/routingrules/CLAUDE.md create mode 100644 openmeter/ledger/testutils/CLAUDE.md create mode 100644 openmeter/ledger/transactions/CLAUDE.md create mode 100644 openmeter/ledger/transactions/testutils/CLAUDE.md create mode 100644 openmeter/llmcost/adapter/CLAUDE.md create mode 100644 openmeter/llmcost/service/CLAUDE.md create mode 100644 openmeter/llmcost/sync/CLAUDE.md create mode 100644 openmeter/meter/adapter/CLAUDE.md create mode 100644 openmeter/meter/httphandler/CLAUDE.md create mode 100644 openmeter/meter/mockadapter/CLAUDE.md create mode 100644 openmeter/meter/service/CLAUDE.md create mode 100644 openmeter/meterevent/CLAUDE.md create mode 100644 openmeter/meterevent/adapter/CLAUDE.md create mode 100644 openmeter/meterevent/httphandler/CLAUDE.md create mode 100644 openmeter/meterexport/CLAUDE.md create mode 100644 openmeter/meterexport/service/CLAUDE.md create mode 100644 openmeter/namespace/CLAUDE.md create mode 100644 openmeter/namespace/namespacedriver/CLAUDE.md create mode 100644 openmeter/notification/CLAUDE.md create mode 100644 openmeter/notification/adapter/CLAUDE.md create mode 100644 openmeter/notification/consumer/CLAUDE.md create mode 100644 openmeter/notification/eventhandler/CLAUDE.md create mode 100644 openmeter/notification/eventhandler/noop/CLAUDE.md create mode 100644 openmeter/notification/httpdriver/CLAUDE.md create mode 100644 openmeter/notification/internal/CLAUDE.md create mode 100644 openmeter/notification/service/CLAUDE.md create mode 100644 openmeter/notification/webhook/CLAUDE.md create mode 100644 openmeter/notification/webhook/noop/CLAUDE.md create mode 100644 openmeter/notification/webhook/secret/CLAUDE.md create mode 100644 openmeter/notification/webhook/svix/CLAUDE.md create mode 100644 openmeter/notification/webhook/svix/internal/CLAUDE.md create mode 100644 openmeter/portal/CLAUDE.md create mode 100644 openmeter/portal/adapter/CLAUDE.md create mode 100644 openmeter/portal/authenticator/CLAUDE.md create mode 100644 openmeter/portal/httphandler/CLAUDE.md create mode 100644 openmeter/productcatalog/CLAUDE.md create mode 100644 openmeter/productcatalog/adapter/CLAUDE.md create mode 100644 openmeter/productcatalog/addon/CLAUDE.md create mode 100644 openmeter/productcatalog/addon/adapter/CLAUDE.md create mode 100644 openmeter/productcatalog/addon/httpdriver/CLAUDE.md create mode 100644 openmeter/productcatalog/addon/service/CLAUDE.md create mode 100644 openmeter/productcatalog/driver/CLAUDE.md create mode 100644 openmeter/productcatalog/feature/CLAUDE.md create mode 100644 openmeter/productcatalog/featureresolver/CLAUDE.md create mode 100644 openmeter/productcatalog/http/CLAUDE.md create mode 100644 openmeter/productcatalog/plan/CLAUDE.md create mode 100644 openmeter/productcatalog/plan/adapter/CLAUDE.md create mode 100644 openmeter/productcatalog/plan/httpdriver/CLAUDE.md create mode 100644 openmeter/productcatalog/plan/service/CLAUDE.md create mode 100644 openmeter/productcatalog/planaddon/CLAUDE.md create mode 100644 openmeter/productcatalog/planaddon/adapter/CLAUDE.md create mode 100644 openmeter/productcatalog/planaddon/httpdriver/CLAUDE.md create mode 100644 openmeter/productcatalog/planaddon/service/CLAUDE.md create mode 100644 openmeter/productcatalog/subscription/CLAUDE.md create mode 100644 openmeter/productcatalog/subscription/http/CLAUDE.md create mode 100644 openmeter/productcatalog/subscription/service/CLAUDE.md create mode 100644 openmeter/productcatalog/subscription/testutils/CLAUDE.md create mode 100644 openmeter/productcatalog/testutils/CLAUDE.md create mode 100644 openmeter/progressmanager/CLAUDE.md create mode 100644 openmeter/progressmanager/adapter/CLAUDE.md create mode 100644 openmeter/progressmanager/entity/CLAUDE.md create mode 100644 openmeter/progressmanager/httpdriver/CLAUDE.md create mode 100644 openmeter/registry/CLAUDE.md create mode 100644 openmeter/registry/builder/CLAUDE.md create mode 100644 openmeter/secret/CLAUDE.md create mode 100644 openmeter/secret/adapter/CLAUDE.md create mode 100644 openmeter/secret/entity/CLAUDE.md create mode 100644 openmeter/secret/service/CLAUDE.md create mode 100644 openmeter/server/CLAUDE.md create mode 100644 openmeter/server/router/CLAUDE.md create mode 100644 openmeter/session/CLAUDE.md create mode 100644 openmeter/sink/CLAUDE.md create mode 100644 openmeter/sink/flushhandler/CLAUDE.md create mode 100644 openmeter/sink/flushhandler/ingestnotification/CLAUDE.md create mode 100644 openmeter/sink/flushhandler/ingestnotification/events/CLAUDE.md create mode 100644 openmeter/sink/models/CLAUDE.md create mode 100644 openmeter/streaming/CLAUDE.md create mode 100644 openmeter/streaming/clickhouse/CLAUDE.md create mode 100644 openmeter/streaming/retry/CLAUDE.md create mode 100644 openmeter/streaming/testutils/CLAUDE.md create mode 100644 openmeter/subject/CLAUDE.md create mode 100644 openmeter/subject/adapter/CLAUDE.md create mode 100644 openmeter/subject/httphandler/CLAUDE.md create mode 100644 openmeter/subject/service/CLAUDE.md create mode 100644 openmeter/subject/service/hooks/CLAUDE.md create mode 100644 openmeter/subject/testutils/CLAUDE.md create mode 100644 openmeter/subscription/CLAUDE.md create mode 100644 openmeter/subscription/addon/CLAUDE.md create mode 100644 openmeter/subscription/addon/diff/CLAUDE.md create mode 100644 openmeter/subscription/addon/http/CLAUDE.md create mode 100644 openmeter/subscription/addon/repo/CLAUDE.md create mode 100644 openmeter/subscription/addon/service/CLAUDE.md create mode 100644 openmeter/subscription/entitlement/CLAUDE.md create mode 100644 openmeter/subscription/hooks/CLAUDE.md create mode 100644 openmeter/subscription/hooks/annotations/CLAUDE.md create mode 100644 openmeter/subscription/patch/CLAUDE.md create mode 100644 openmeter/subscription/repo/CLAUDE.md create mode 100644 openmeter/subscription/service/CLAUDE.md create mode 100644 openmeter/subscription/testutils/CLAUDE.md create mode 100644 openmeter/subscription/validators/CLAUDE.md create mode 100644 openmeter/subscription/validators/customer/CLAUDE.md create mode 100644 openmeter/subscription/validators/subscription/CLAUDE.md create mode 100644 openmeter/subscription/workflow/CLAUDE.md create mode 100644 openmeter/subscription/workflow/service/CLAUDE.md create mode 100644 openmeter/taxcode/CLAUDE.md create mode 100644 openmeter/taxcode/adapter/CLAUDE.md create mode 100644 openmeter/taxcode/service/CLAUDE.md create mode 100644 openmeter/taxcode/testutils/CLAUDE.md create mode 100644 openmeter/testutils/CLAUDE.md create mode 100644 openmeter/watermill/CLAUDE.md create mode 100644 openmeter/watermill/driver/CLAUDE.md create mode 100644 openmeter/watermill/driver/kafka/CLAUDE.md create mode 100644 openmeter/watermill/driver/kafka/metrics/CLAUDE.md create mode 100644 openmeter/watermill/driver/noop/CLAUDE.md create mode 100644 openmeter/watermill/eventbus/CLAUDE.md create mode 100644 openmeter/watermill/grouphandler/CLAUDE.md create mode 100644 openmeter/watermill/marshaler/CLAUDE.md create mode 100644 openmeter/watermill/nopublisher/CLAUDE.md create mode 100644 openmeter/watermill/router/CLAUDE.md create mode 100644 pkg/CLAUDE.md create mode 100644 pkg/clock/CLAUDE.md create mode 100644 pkg/cmpx/CLAUDE.md create mode 100644 pkg/contextx/CLAUDE.md create mode 100644 pkg/convert/CLAUDE.md create mode 100644 pkg/currencyx/CLAUDE.md create mode 100644 pkg/datetime/CLAUDE.md create mode 100644 pkg/defaultx/CLAUDE.md create mode 100644 pkg/entitydiff/CLAUDE.md create mode 100644 pkg/equal/CLAUDE.md create mode 100644 pkg/errorsx/CLAUDE.md create mode 100644 pkg/expand/CLAUDE.md create mode 100644 pkg/featuregate/CLAUDE.md create mode 100644 pkg/ffx/CLAUDE.md create mode 100644 pkg/filter/CLAUDE.md create mode 100644 pkg/framework/CLAUDE.md create mode 100644 pkg/framework/clickhouseotel/CLAUDE.md create mode 100644 pkg/framework/commonhttp/CLAUDE.md create mode 100644 pkg/framework/entutils/CLAUDE.md create mode 100644 pkg/framework/entutils/entcursor/CLAUDE.md create mode 100644 pkg/framework/entutils/entdriver/CLAUDE.md create mode 100644 pkg/framework/entutils/entexpose/CLAUDE.md create mode 100644 pkg/framework/entutils/entmixinaccessor/CLAUDE.md create mode 100644 pkg/framework/entutils/entpaginate/CLAUDE.md create mode 100644 pkg/framework/entutils/entsetorclear/CLAUDE.md create mode 100644 pkg/framework/entutils/testutils/CLAUDE.md create mode 100644 pkg/framework/entutils/testutils/ent1/CLAUDE.md create mode 100644 pkg/framework/entutils/testutils/ent1/schema/CLAUDE.md create mode 100644 pkg/framework/entutils/testutils/ent2/CLAUDE.md create mode 100644 pkg/framework/entutils/testutils/ent2/schema/CLAUDE.md create mode 100644 pkg/framework/lockr/CLAUDE.md create mode 100644 pkg/framework/operation/CLAUDE.md create mode 100644 pkg/framework/pgdriver/CLAUDE.md create mode 100644 pkg/framework/tracex/CLAUDE.md create mode 100644 pkg/framework/transaction/CLAUDE.md create mode 100644 pkg/framework/transport/CLAUDE.md create mode 100644 pkg/framework/transport/httptransport/CLAUDE.md create mode 100644 pkg/framework/transport/httptransport/encoder/CLAUDE.md create mode 100644 pkg/gosundheit/CLAUDE.md create mode 100644 pkg/hasher/CLAUDE.md create mode 100644 pkg/idempotency/CLAUDE.md create mode 100644 pkg/kafka/CLAUDE.md create mode 100644 pkg/kafka/metrics/CLAUDE.md create mode 100644 pkg/kafka/metrics/internal/CLAUDE.md create mode 100644 pkg/kafka/metrics/stats/CLAUDE.md create mode 100644 pkg/log/CLAUDE.md create mode 100644 pkg/lrux/CLAUDE.md create mode 100644 pkg/models/CLAUDE.md create mode 100644 pkg/models/http/CLAUDE.md create mode 100644 pkg/otelx/CLAUDE.md create mode 100644 pkg/pagination/CLAUDE.md create mode 100644 pkg/pagination/v2/CLAUDE.md create mode 100644 pkg/pglockx/CLAUDE.md create mode 100644 pkg/pgxpoolobserver/CLAUDE.md create mode 100644 pkg/redis/CLAUDE.md create mode 100644 pkg/ref/CLAUDE.md create mode 100644 pkg/server/CLAUDE.md create mode 100644 pkg/set/CLAUDE.md create mode 100644 pkg/slicesx/CLAUDE.md create mode 100644 pkg/sortx/CLAUDE.md create mode 100644 pkg/statelessx/CLAUDE.md create mode 100644 pkg/strcase/CLAUDE.md create mode 100644 pkg/timeutil/CLAUDE.md create mode 100644 pkg/treex/CLAUDE.md create mode 100644 test/app/CLAUDE.md create mode 100644 test/app/custominvoicing/CLAUDE.md create mode 100644 test/app/stripe/CLAUDE.md create mode 100644 test/billing/CLAUDE.md create mode 100644 test/credits/CLAUDE.md create mode 100644 test/customer/CLAUDE.md create mode 100644 test/entitlement/CLAUDE.md create mode 100644 test/entitlement/regression/CLAUDE.md create mode 100644 test/notification/CLAUDE.md create mode 100644 test/subscription/CLAUDE.md create mode 100644 tools/migrate/CLAUDE.md create mode 100644 tools/migrate/cmd/CLAUDE.md create mode 100644 tools/migrate/cmd/viewgen/CLAUDE.md create mode 100644 tools/migrate/viewgen/CLAUDE.md diff --git a/.archie/.gitignore b/.archie/.gitignore new file mode 100644 index 0000000000..fb30f1c82d --- /dev/null +++ b/.archie/.gitignore @@ -0,0 +1,32 @@ +# Archie tool internals — vendored tooling + caches, (re)generated by +# `npx @bitraptors/archie`. These are NOT architecture artifacts: they are the +# tool's own source and dependencies, copied in so the hooks/viewer can run. +# +# They're git-ignored so you don't commit the tool into your repository — which +# also stops security scanners from flagging Archie's vendored code as if it +# were yours. Re-running the installer recreates them. +# +# The architecture snapshot you MAY want to commit lives alongside these and is +# deliberately NOT ignored: blueprint.json, rules.json, scan_report.md, +# findings.json, health.json, c4.json, etc. + +_install_pkg/ +viewer/ +node_modules/ +__pycache__/ +*.pyc +*.tmp +tmp/ +.cache/ +.test_snapshots/ + +# Standalone tool scripts are regenerated by the installer too — don't commit +# them. EXCEPTION: the small hook-runtime set below is committed so the +# enforcement hooks keep working even without a local Archie install. Their file +# reads are routed through one validated sink (_common.safe_read_text), so a +# security scanner has nothing to flag. +*.py +!_common.py +!lint_gate.py +!align_check.py +!arch_review.py diff --git a/.archie/_common.py b/.archie/_common.py new file mode 100755 index 0000000000..d3dfc8c6d1 --- /dev/null +++ b/.archie/_common.py @@ -0,0 +1,530 @@ +"""Archie shared utilities — imported by other standalone scripts. + +Deduplicates helpers that were copy-pasted across 6+ files. + +Zero dependencies beyond Python 3.9+ stdlib. +""" +from __future__ import annotations + +import ast +import fnmatch +import json +import os +import re +from pathlib import Path + + +# ── Shared constants ────────────────────────────────────────────────────── + +SOURCE_EXTENSIONS = { + ".py", ".kt", ".kts", ".java", ".js", ".jsx", ".ts", ".tsx", + ".swift", ".go", ".rs", ".rb", ".c", ".cpp", ".cc", ".cxx", ".h", + ".hpp", ".cs", ".php", ".scala", ".m", ".mm", +} + +SKIP_DIRS = { + ".git", "node_modules", "__pycache__", ".venv", "venv", "env", + ".tox", ".mypy_cache", ".pytest_cache", ".ruff_cache", + "dist", "build", ".build", ".next", ".nuxt", ".svelte-kit", + "coverage", ".nyc_output", ".turbo", ".parcel-cache", + "vendor", "Pods", "DerivedData", ".gradle", ".idea", ".vscode", + ".archie", ".claude", + ".devenv", # Nix devenv + ".swiftpm", # Swift PM cache + ".pub-cache", # Dart/Flutter + ".dart_tool", # Dart + ".ccache", # C/C++ compiler cache +} + +# ── IgnoreMatcher ───────────────────────────────────────────────────────── + + +class _IgnorePattern: + """A single parsed gitignore-style pattern.""" + + __slots__ = ("pattern", "is_dir_only", "is_rooted", "is_negation", "scope") + + def __init__(self, raw: str, scope: str = ""): + """Parse a raw gitignore line into a structured pattern. + + Args: + raw: The pattern string (already stripped of comments/blanks). + scope: Relative directory scope (empty string for root-level files). + """ + self.scope = scope + self.is_negation = raw.startswith("!") + if self.is_negation: + raw = raw[1:] + + self.is_dir_only = raw.endswith("/") + if self.is_dir_only: + raw = raw.rstrip("/") + + # A pattern is "rooted" if it contains a / (after stripping trailing /) + # or starts with /. Leading / is removed after marking as rooted. + self.is_rooted = raw.startswith("/") or "/" in raw + if raw.startswith("/"): + raw = raw[1:] + + # Strip leading **/ — it means "match at any depth" (same as unrooted) + if raw.startswith("**/"): + raw = raw[3:] + self.is_rooted = False + + self.pattern = raw + + def _matches_path(self, name: str, rel_parent: str) -> bool: + """Check whether this pattern matches the given name under rel_parent.""" + # If the pattern is scoped (from a nested .gitignore), the rel_parent + # must be equal to or nested under the scope. + if self.scope: + if rel_parent != self.scope and not rel_parent.startswith(self.scope + "/"): + return False + + if self.is_rooted: + # Rooted patterns match relative to their scope. + if self.scope: + # Remove scope prefix to get path relative to .gitignore dir + if rel_parent == self.scope: + check_path = name + elif rel_parent.startswith(self.scope + "/"): + sub = rel_parent[len(self.scope) + 1:] + check_path = sub + "/" + name + else: + return False + else: + check_path = (rel_parent + "/" + name) if rel_parent else name + return fnmatch.fnmatch(check_path, self.pattern) + else: + # Unrooted: match the basename at any depth + return fnmatch.fnmatch(name, self.pattern) + + def matches_dir(self, dirname: str, rel_parent: str) -> bool: + """Check if this pattern matches a directory.""" + # File-only patterns (not dir_only) with a glob like *.ext + # should not match directories. But plain names without glob + # can match dirs even without trailing /. + return self._matches_path(dirname, rel_parent) + + def matches_file(self, filename: str, rel_parent: str) -> bool: + """Check if this pattern matches a file.""" + if self.is_dir_only: + return False + return self._matches_path(filename, rel_parent) + + +def safe_read_text(path, base=None, *, errors: str = "replace") -> str: + """Single audited file-read sink for the standalone tools. + + Resolves *path* and, when *base* is given, refuses to read anything that + escapes that directory (a path-containment check). Routing every read + through here means the tools have one sanitized sink instead of many bare + ``read_text()``/``open()`` calls on derived paths — these only ever read + fixed, project-internal locations, never attacker input. + """ + p = Path(path).resolve() + if base is not None: + b = Path(base).resolve() + if b != p and b not in p.parents: + raise ValueError(f"refusing to read outside {b}: {p}") + return p.read_text(encoding="utf-8", errors=errors) + + +def _parse_ignore_file(path: Path, scope: str = "") -> list[_IgnorePattern]: + """Parse a gitignore-format file into a list of _IgnorePattern objects.""" + if not path.exists(): + return [] + try: + text = safe_read_text(path) + except OSError: + return [] + patterns: list[_IgnorePattern] = [] + for line in text.splitlines(): + line = line.rstrip() + if not line or line.startswith("#"): + continue + patterns.append(_IgnorePattern(line, scope=scope)) + return patterns + + +def _collect_nested_gitignores(root: Path) -> list[_IgnorePattern]: + """Walk the tree and collect patterns from nested .gitignore files. + + Root .gitignore is excluded (handled separately). Each nested + .gitignore's patterns are scoped to its directory. + """ + patterns: list[_IgnorePattern] = [] + for dirpath, dirnames, filenames in os.walk(root): + # Skip .git and other VCS dirs + dirnames[:] = [d for d in dirnames if d not in (".git",)] + rel = os.path.relpath(dirpath, root) + if rel == ".": + continue # root .gitignore handled separately + if ".gitignore" in filenames: + scope = rel.replace(os.sep, "/") + patterns.extend( + _parse_ignore_file(Path(dirpath) / ".gitignore", scope=scope) + ) + return patterns + + +class IgnoreMatcher: + """Merge .archieignore + .gitignore patterns for file/directory filtering. + + Usage with os.walk:: + + matcher = IgnoreMatcher(project_root) + for root, dirs, files in os.walk(project_root): + rel = os.path.relpath(root, project_root) + if rel == ".": + rel = "" + dirs[:] = [d for d in dirs if not matcher.should_skip_dir(d, rel)] + files = [f for f in files if not matcher.should_skip_file(f, rel)] + """ + + def __init__(self, root: str | Path): + root = Path(root) + self._root = root + self._patterns: list[_IgnorePattern] = [] + + # .archieignore takes priority and is always loaded + archieignore = root / ".archieignore" + self._patterns.extend(_parse_ignore_file(archieignore)) + + # .gitignore at root + gitignore = root / ".gitignore" + self._patterns.extend(_parse_ignore_file(gitignore)) + + # Nested .gitignore files + self._patterns.extend(_collect_nested_gitignores(root)) + + def _check(self, name: str, rel_parent: str, is_dir: bool) -> bool: + """Evaluate patterns in order — last matching pattern wins (git semantics).""" + matched = False + for pat in self._patterns: + if is_dir: + hit = pat.matches_dir(name, rel_parent) + else: + hit = pat.matches_file(name, rel_parent) + if hit: + matched = not pat.is_negation + return matched + + def should_skip_dir(self, dirname: str, parent_rel: str) -> bool: + """Should this directory be pruned during os.walk? + + Args: + dirname: The directory basename (e.g. "node_modules"). + parent_rel: The relative path from project root to the parent + directory (e.g. "" for root, "src/pkg" for nested). + """ + return self._check(dirname, parent_rel, is_dir=True) + + def should_skip_file(self, filename: str, parent_rel: str) -> bool: + """Should this file be skipped during os.walk? + + Args: + filename: The file basename (e.g. "main.py"). + parent_rel: The relative path from project root to the parent + directory. + """ + return self._check(filename, parent_rel, is_dir=False) + + def is_ignored(self, rel_path: str) -> bool: + """Convenience: check if a relative path is ignored. + + For directories, checks as a directory. For files, checks as a file. + If the path exists under root and is a directory, it's treated as a dir. + Otherwise treated as a file. + + Gitignore semantics: a path is also ignored when any ANCESTOR directory + matches a dir pattern (``vendor/`` ignores ``vendor/b.py``). os.walk + callers get this for free via directory pruning; full-path callers + (e.g. drift's git-log list, where the file may no longer exist on disk) + rely on this ancestor walk. + """ + rel_path = rel_path.replace(os.sep, "/") + parts = rel_path.rsplit("/", 1) + if len(parts) == 2: + parent, name = parts + else: + parent, name = "", parts[0] + + # Determine if it's a directory + full = self._root / rel_path + is_dir = full.is_dir() + + if self._check(name, parent, is_dir=is_dir): + return True + + # Walk ancestor directories — an ignored parent dir hides everything + # beneath it, regardless of whether the leaf itself matches. + segments = rel_path.split("/") + for i in range(len(segments) - 1): + if self._check(segments[i], "/".join(segments[:i]), is_dir=True): + return True + return False + + +# ── BulkMatcher — classify files as bulk-content (visible but not read) ── + +def _glob_to_regex(glob: str) -> re.Pattern: + """Translate a shell-style glob to a regex for full-path matching. + + Differs from fnmatch to give sane `**` semantics across path components: + - `**/` (with trailing slash) matches zero or more directory segments + - `**` (without slash) matches any characters including `/` + - `*` matches any characters except `/` + - `?` matches a single non-`/` character + - `[abc]` keeps standard character-class semantics + """ + out: list[str] = [] + i = 0 + n = len(glob) + while i < n: + c = glob[i] + if c == '*': + if i + 1 < n and glob[i + 1] == '*': + if i + 2 < n and glob[i + 2] == '/': + out.append(r'(?:[^/]+/)*') + i += 3 + else: + out.append(r'.*') + i += 2 + else: + out.append(r'[^/]*') + i += 1 + elif c == '?': + out.append(r'[^/]') + i += 1 + elif c == '[': + j = glob.find(']', i) + if j == -1: + out.append(r'\[') + i += 1 + else: + out.append(glob[i:j + 1]) + i = j + 1 + else: + out.append(re.escape(c)) + i += 1 + return re.compile('^' + ''.join(out) + '$') + + +def _find_archiebulk(root: Path) -> Path | None: + """Locate the nearest `.archiebulk` walking up from `root`. + + Walk-up resolution (editorconfig/prettier style — NOT gitignore): + prefer a `.archiebulk` in the project root, otherwise walk up the + directory tree. Stops at the filesystem root, the user's home directory + (don't escape into ~), or when no further parent exists. + + Required for monorepo scans: when `archie-deep-scan` runs with + `PROJECT_ROOT` set to a subpackage (e.g. `/packages/android/`), + the `.archiebulk` typically lives at the monorepo root. Without this + walk, `bulk_content_manifest` is empty and `frontend_ratio` collapses + to 0 — UI Layer never spawns and the agent misreads the project shape. + + The walk deliberately ignores `.git` boundaries: a sub-project may be + a git submodule with its own `.git`, but the monorepo's `.archiebulk` + still describes the right bulk patterns for that subtree. `.archiebulk` + is an Archie convention, not a git one. + """ + try: + current = root.resolve() + except OSError: + return None + try: + home = Path.home().resolve() + except (OSError, RuntimeError): + home = None + while True: + candidate = current / ".archiebulk" + if candidate.is_file(): + return candidate + parent = current.parent + if parent == current: + return None # filesystem root + # Stop before escaping into the user's home directory. + if home is not None and current == home: + return None + current = parent + + +class BulkMatcher: + """Classify files as bulk-content (visible to the scanner, never read). + + Loads `.archiebulk` from the project root, falling back to the nearest + ancestor with a `.archiebulk` (gitignore-style walk, bounded by the + enclosing git repo root). Each non-comment line carries three + whitespace-separated columns: ` `. The + framework column is optional (use `-` or omit). + + `classify(rel_path)` returns `{category, framework}` for a match, else None. + Last matching rule wins (gitignore-style precedence). + """ + + def __init__(self, root: str | Path): + root = Path(root) + self._root = root + self._rules: list[tuple[re.Pattern, str, str]] = [] + path = _find_archiebulk(root) + if path is None: + return + try: + text = safe_read_text(path, root) + except (OSError, ValueError): + return + for raw in text.splitlines(): + line = raw.strip() + if not line or line.startswith("#"): + continue + parts = line.split(None, 2) + if len(parts) < 2: + continue + glob_pat, category = parts[0], parts[1] + framework = parts[2].strip() if len(parts) == 3 else "-" + # Allow an inline comment after the framework column. + if "#" in framework: + framework = framework.split("#", 1)[0].strip() or "-" + try: + rx = _glob_to_regex(glob_pat) + except re.error: + continue + self._rules.append((rx, category, framework)) + + def classify(self, rel_path: str) -> dict | None: + """Return {category, framework} if the path is bulk, else None. + + Last matching rule wins, so later entries in `.archiebulk` override + earlier ones (mirroring gitignore precedence). + """ + if not self._rules: + return None + norm = rel_path.replace(os.sep, "/") + result: dict | None = None + for rx, cat, fw in self._rules: + if rx.match(norm): + result = {"category": cat, "framework": fw} + return result + + def __bool__(self) -> bool: + return bool(self._rules) + + +# Regex decision-point patterns for non-Python languages. +# NOTE: bare ``else`` is intentionally excluded — it is NOT a decision point +# in cyclomatic complexity (it's the default path, not an independent one). +DECISION_RE = re.compile( + r"""(?x) + \b(?:if|elif|else\s+if|elseif|for|foreach|while|do\b.*\bwhile| + switch|case|catch|except|when|guard)\b + | \?\s*[^?] # ternary ?: + | && # logical AND + | \|\| # logical OR + """ +) + + +# ── Shared helpers ──────────────────────────────────────────────────────── + +def _load_json(path: Path, base=None) -> dict | list: + """Load a JSON file, returning empty dict on failure.""" + if Path(path).exists(): + try: + return json.loads(safe_read_text(path, base)) + except (json.JSONDecodeError, OSError, ValueError): + pass + return {} + + +def normalize_blueprint(bp: dict) -> dict: + """Normalize blueprint to canonical schema. Safe to call multiple times. + + Ensures: + - Dict sections (meta, components, decisions, etc.) are dicts + - components is always {"components": [...], ...} (wraps plain list) + - List sections (pitfalls, implementation_guidelines, etc.) are lists + - architecture_diagram exists as string + """ + # Sections that must be dicts + for key in ("meta", "architecture_rules", "decisions", + "communication", "quick_reference", "technology", "frontend", + "deployment"): + val = bp.get(key) + if not isinstance(val, dict): + bp[key] = {} if val is None else {} + + # Components: can arrive as list or {"components": [...]} + comps = bp.get("components") + if isinstance(comps, list): + bp["components"] = {"components": comps} + elif not isinstance(comps, dict): + bp["components"] = {"components": []} + elif "components" not in comps: + bp["components"]["components"] = [] + + # Sections that must be lists + for key in ("pitfalls", "implementation_guidelines", "development_rules"): + val = bp.get(key) + if not isinstance(val, list): + bp[key] = [] + + bp.setdefault("architecture_diagram", "") + return bp + + +def _read_file(path: str, base=None) -> str | None: + """Read a file, returning None on failure.""" + try: + return safe_read_text(path, base) + except (OSError, UnicodeDecodeError, ValueError): + return None + + +# ── Cyclomatic complexity ───────────────────────────────────────────────── + +def _cc_python_function(source: str, func_start: int, func_end: int) -> int: + """Compute cyclomatic complexity of a Python function via AST.""" + lines = source.splitlines(True) + func_lines = lines[func_start - 1 : func_end] + if not func_lines: + return 1 + + # Dedent to column 0 so ast.parse works + min_indent = 9999 + for ln in func_lines: + stripped = ln.rstrip("\n\r") + if stripped.strip(): + indent = len(stripped) - len(stripped.lstrip()) + min_indent = min(min_indent, indent) + if min_indent == 9999: + min_indent = 0 + + dedented = "".join(ln[min_indent:] if len(ln) > min_indent else ln for ln in func_lines) + + try: + tree = ast.parse(dedented, mode="exec") + except SyntaxError: + return 1 + + cc = 1 + for node in ast.walk(tree): + if isinstance(node, (ast.If, ast.For, ast.While, ast.ExceptHandler, ast.Assert)): + cc += 1 + elif isinstance(node, ast.BoolOp): + cc += len(node.values) - 1 + elif isinstance(node, ast.comprehension): + cc += 1 + cc += len(node.ifs) + return cc + + +def _cc_regex(lines: list[str]) -> int: + """Approximate cyclomatic complexity via regex for non-Python files.""" + cc = 1 + for line in lines: + cleaned = re.sub(r'"(?:[^"\\]|\\.)*"', '""', line) + cleaned = re.sub(r"'(?:[^'\\]|\\.)*'", "''", cleaned) + cc += len(DECISION_RE.findall(cleaned)) + return cc diff --git a/.archie/align_check.py b/.archie/align_check.py new file mode 100755 index 0000000000..0bc331d83f --- /dev/null +++ b/.archie/align_check.py @@ -0,0 +1,372 @@ +"""Phase 3 alignment classifier — semantic comparison at plan + commit time. + +Compares the agent's intent (plan text or staged diff) against each +architectural rule's semantic content (`description` + `why` + `example`) +via a single Claude CLI call. Returns structured per-rule diagnostics. + +Usage (called from hooks, never directly): + python3 align_check.py plan # stdin: PostToolUse JSON + python3 align_check.py commit # reads git diff --cached + +Exit codes: + 0 — no blocking violations OR claude CLI unavailable (advisory only) + 2 — at least one decision_violation or pitfall_triggered + +Stdout: structured diagnostic block. Hook stdout is surfaced to Claude +Code as the tool result, so the agent sees the verdict and can revise. + +Stderr: progress / fallback notes. + +Architectural rules are pulled from `.archie/rule_index.json`'s +`for_classifier` list (Phase 2). Falls back to filtering all rules by +`severity_class != mechanical_violation` if the index is missing. + +The classifier model is Haiku for cost + speed (per the richer-rules +plan). If the user's claude CLI is configured for a different default +the call still works — we just ask for JSON output and parse it. +""" + +from __future__ import annotations + +import json +import os +import subprocess +import sys +from pathlib import Path +from typing import Any + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from _common import safe_read_text # noqa: E402 + +CLASSIFIER_MODEL = "claude-haiku-4-5-20251001" +CLASSIFIER_TIMEOUT_SECS = 90 + + +# --------------------------------------------------------------------------- +# Rule loading +# --------------------------------------------------------------------------- + + +def _load_json(path: Path) -> Any: + try: + return json.loads(safe_read_text(path)) + except (OSError, json.JSONDecodeError, ValueError): + return None + + +def _load_architectural_rules(archie_dir: Path) -> list[dict[str, Any]]: + """Return rules eligible for plan/commit-time classification. + + Prefers the precomputed `for_classifier` list from rule_index.json. + Falls back to filtering rules.json + platform_rules.json by + severity_class (excluding mechanical_violation). + """ + rules: dict[str, dict[str, Any]] = {} + for fname in ("rules.json", "platform_rules.json"): + data = _load_json(archie_dir / fname) + if data is None: + continue + items = data if isinstance(data, list) else data.get("rules", []) + if not isinstance(items, list): + continue + for r in items: + if isinstance(r, dict) and r.get("id"): + rules[r["id"]] = r + + index = _load_json(archie_dir / "rule_index.json") + if isinstance(index, dict) and isinstance(index.get("for_classifier"), list): + ids = index["for_classifier"] + return [rules[i] for i in ids if i in rules] + + # Fallback: filter by severity_class. Old-shape rules with rationale + # text are architectural enough to classify even if they also have a + # mechanical check (the rationale is what the classifier reasons about). + out: list[dict[str, Any]] = [] + for r in rules.values(): + sc = r.get("severity_class", "") + if sc: + if sc != "mechanical_violation": + out.append(r) + elif r.get("rationale") or r.get("why"): + out.append(r) + return out + + +# --------------------------------------------------------------------------- +# Input parsing — plan text from PostToolUse ExitPlanMode, or git diff +# --------------------------------------------------------------------------- + + +def _read_plan_from_stdin() -> str: + """Pull the plan text out of a PostToolUse ExitPlanMode tool-call envelope. + + The hook receives the tool input/output JSON on stdin. ExitPlanMode's + tool_input has a `plan` field (the markdown plan the agent submitted). + """ + try: + raw = sys.stdin.read() + except Exception: + return "" + if not raw: + return "" + try: + data = json.loads(raw) + except json.JSONDecodeError: + # Not JSON — assume it's raw plan text + return raw + + # Try the various shapes a PostToolUse envelope might take + if isinstance(data, dict): + ti = data.get("tool_input", {}) + if isinstance(ti, dict) and ti.get("plan"): + return str(ti["plan"]) + tr = data.get("tool_response", {}) + if isinstance(tr, dict): + if tr.get("plan"): + return str(tr["plan"]) + if tr.get("text"): + return str(tr["text"]) + # PreToolUse-style (Bash on git commit) + if isinstance(ti, dict) and ti.get("command"): + return str(ti["command"]) + return raw + + +def _read_staged_diff(project_root: Path) -> str: + """Read git diff --cached. Returns empty string if git not available.""" + try: + result = subprocess.run( + ["git", "-C", str(project_root), "diff", "--cached"], + capture_output=True, text=True, timeout=15, + ) + if result.returncode == 0: + return result.stdout + except (FileNotFoundError, subprocess.TimeoutExpired): + pass + return "" + + +# --------------------------------------------------------------------------- +# Classifier prompt + invocation +# --------------------------------------------------------------------------- + + +def _build_classifier_prompt(input_text: str, kind: str, rules: list[dict[str, Any]]) -> str: + """Build the prompt for the Haiku classifier. + + `kind` is "plan" or "diff" — frames the artifact for the model. + `rules` is the architectural rule set with full semantic content. + """ + rule_blocks = [] + for r in rules: + rid = r.get("id", "?") + sc = r.get("severity_class", "") or ("error-legacy" if r.get("severity") == "error" else "warn-legacy") + desc = r.get("description", "") + why = r.get("why", "") or r.get("rationale", "") + example = r.get("example", "") + block = f"RULE {rid} [{sc}]\nDescription: {desc}\nWhy: {why}" + if example: + block += f"\nExample of the canonical shape: {example}" + rule_blocks.append(block) + + if kind == "plan": + artifact_label = "PLAN (the agent intends to execute these steps)" + else: + artifact_label = "STAGED DIFF (the agent is about to commit these changes)" + + return f"""You are an architectural reviewer. The codebase has the following architectural rules. Your job is to compare the {artifact_label} against EACH rule and decide whether the rule is violated, respected, or not relevant. + +Reason about INTENT, not keywords. A rule may be violated even if the artifact uses different wording — what matters is whether the change crosses the rule's architectural boundary. + +For each rule, return one entry in `diagnostics` with these fields: + - `rule_id`: the rule's id + - `severity_class`: copy from the rule + - `verdict`: one of "violates" / "respects" / "not_relevant" + - `evidence`: short quote / step reference that grounded your verdict (only for "violates") + - `suggested_fix`: concrete action the agent should take (only for "violates") + +Output ONLY valid JSON of the form: +{{ + "diagnostics": [...], + "highest_severity": "decision_violation|pitfall_triggered|tradeoff_undermined|pattern_divergence|none" +}} + +ARCHITECTURAL RULES: + +{chr(10).join(rule_blocks)} + +{artifact_label}: + +{input_text} +""" + + +def _invoke_claude_classifier(prompt: str) -> dict[str, Any] | None: + """Run claude CLI with the prompt. Returns parsed JSON verdict or None on any failure.""" + try: + result = subprocess.run( + [ + "claude", + "-p", prompt, + "--output-format", "json", + "--model", CLASSIFIER_MODEL, + ], + capture_output=True, + text=True, + timeout=CLASSIFIER_TIMEOUT_SECS, + ) + except (FileNotFoundError, subprocess.TimeoutExpired): + return None + if result.returncode != 0: + print(f"[Archie] classifier exited {result.returncode}: {result.stderr[:300]}", file=sys.stderr) + return None + + # claude --output-format json returns an envelope with `result` field + # holding the assistant's stringified output. Parse the envelope first, + # then parse the inner JSON. + try: + envelope = json.loads(result.stdout) + except json.JSONDecodeError: + # Sometimes the CLI just prints raw text — try parsing directly + try: + return json.loads(result.stdout) + except json.JSONDecodeError: + return None + + inner = envelope.get("result") if isinstance(envelope, dict) else None + if isinstance(inner, str): + # Strip any code fences the model may have wrapped around the JSON + s = inner.strip() + if s.startswith("```"): + s = s.split("\n", 1)[1] if "\n" in s else s + if s.endswith("```"): + s = s.rsplit("```", 1)[0] + try: + return json.loads(s) + except json.JSONDecodeError: + return None + return None + + +# --------------------------------------------------------------------------- +# Output rendering +# --------------------------------------------------------------------------- + + +SEVERITY_BLOCKING = {"decision_violation", "pitfall_triggered"} + + +def _render_diagnostics(verdict: dict[str, Any]) -> bool: + """Print human-readable diagnostics. Return True if any blocking violation.""" + diags = verdict.get("diagnostics") or [] + if not isinstance(diags, list): + return False + blocking = False + for d in diags: + if not isinstance(d, dict): + continue + if d.get("verdict") != "violates": + continue + rid = d.get("rule_id", "?") + sc = d.get("severity_class", "") + evidence = d.get("evidence", "") + fix = d.get("suggested_fix", "") + if sc in SEVERITY_BLOCKING: + label = "BLOCKED" + blocking = True + elif sc == "tradeoff_undermined": + label = "WARN" + elif sc == "pattern_divergence": + label = "INFO" + else: + label = sc.upper() or "INFO" + print(f"[Archie {label}] {rid} [{sc}]") + if evidence: + print(f" Evidence: {evidence}") + if fix: + print(f" Suggested fix: {fix}") + return blocking + + +def _render_advisory(rules: list[dict[str, Any]]) -> None: + """Fallback when claude CLI is unavailable: print the rule set as guidance.""" + print("[Archie] Classifier unavailable (claude CLI not on PATH or failed). " + "Architectural rules below — review the plan/diff against each, " + "block any decision_violation or pitfall_triggered before proceeding.") + print("") + for r in rules: + rid = r.get("id", "?") + sc = r.get("severity_class", "") or r.get("severity", "warn") + desc = r.get("description", "") + why = r.get("why", "") or r.get("rationale", "") + print(f" RULE {rid} [{sc}]: {desc}") + if why: + for ln in why.splitlines() or [why]: + print(f" WHY: {ln}") + + +# --------------------------------------------------------------------------- +# Subcommands +# --------------------------------------------------------------------------- + + +def cmd_plan(project_root: Path) -> int: + archie_dir = project_root / ".archie" + rules = _load_architectural_rules(archie_dir) + if not rules: + return 0 # nothing to compare against + plan_text = _read_plan_from_stdin().strip() + if not plan_text: + return 0 + + prompt = _build_classifier_prompt(plan_text, "plan", rules) + verdict = _invoke_claude_classifier(prompt) + if verdict is None: + _render_advisory(rules) + return 0 + blocking = _render_diagnostics(verdict) + return 2 if blocking else 0 + + +def cmd_commit(project_root: Path) -> int: + archie_dir = project_root / ".archie" + rules = _load_architectural_rules(archie_dir) + if not rules: + return 0 + diff = _read_staged_diff(project_root).strip() + if not diff: + return 0 + + prompt = _build_classifier_prompt(diff, "diff", rules) + verdict = _invoke_claude_classifier(prompt) + if verdict is None: + _render_advisory(rules) + return 0 + blocking = _render_diagnostics(verdict) + return 2 if blocking else 0 + + +def main() -> int: + if len(sys.argv) < 3: + print("Usage:", file=sys.stderr) + print(" python3 align_check.py plan ", file=sys.stderr) + print(" python3 align_check.py commit ", file=sys.stderr) + return 1 + subcmd = sys.argv[1] + project_root = Path(sys.argv[2]).resolve() + if not project_root.is_dir(): + print(f"Error: {project_root} is not a directory", file=sys.stderr) + return 1 + # Disable via env var — useful for users who don't want the latency + if os.environ.get("ARCHIE_DISABLE_ALIGN_CHECK") == "1": + return 0 + if subcmd == "plan": + return cmd_plan(project_root) + if subcmd == "commit": + return cmd_commit(project_root) + print(f"Unknown subcommand: {subcmd}", file=sys.stderr) + return 1 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.archie/arch_review.py b/.archie/arch_review.py new file mode 100755 index 0000000000..07c013c108 --- /dev/null +++ b/.archie/arch_review.py @@ -0,0 +1,311 @@ +#!/usr/bin/env python3 +"""Archie architectural review — gathers context for post-plan and pre-commit hooks. + +Called by hook scripts to assemble blueprint context + plan/diff for Claude +to spawn a reviewer subagent. + +Subcommands: + plan — gather context for plan review + diff — gather context for pre-commit review + +Outputs structured review prompt to stdout that the hook passes to Claude. + +Zero dependencies beyond Python 3.9+ stdlib. +""" +from __future__ import annotations + +import json +import subprocess +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +from _common import _load_json, safe_read_text # noqa: E402 + +# Comprehensive depth lifts content-comprehensiveness render slices. Set from +# __main__ when "--comprehensive" is present in argv. Render functions read this +# module global via _cap(). +_COMPREHENSIVE = False + + +def _cap(seq, n): + """Cap seq to n items unless comprehensive depth is active.""" + return seq if _COMPREHENSIVE else seq[:n] + + +def _get_blueprint_context(root: Path) -> str: + """Extract key architectural constraints from blueprint.""" + bp = _load_json(root / ".archie" / "blueprint.json") + if not bp: + return "" + + parts = [] + + # Key decisions + decisions = bp.get("decisions", {}) + key_decs = decisions.get("key_decisions", []) + if key_decs: + parts.append("## Key Architectural Decisions") + for d in _cap(key_decs, 8): + if isinstance(d, dict): + title = d.get("title", "") + chosen = d.get("chosen", "") + parts.append(f"- **{title}**: {chosen}") + elif isinstance(d, str): + parts.append(f"- {d}") + else: + print(f"Warning: unexpected {type(d).__name__} in key_decisions, coercing", file=sys.stderr) + parts.append(f"- {str(d)}") + + # Trade-offs with violation signals + trade_offs = decisions.get("trade_offs", []) + if trade_offs: + parts.append("\n## Trade-offs (violation signals)") + for t in _cap(trade_offs, 5): + if isinstance(t, dict): + accept = t.get("accept", "") + signals = t.get("violation_signals", []) + if signals: + parts.append(f"- {accept} — signals: {', '.join(_cap(signals, 5))}") + elif isinstance(t, str): + parts.append(f"- {t}") + else: + print(f"Warning: unexpected {type(t).__name__} in trade_offs, coercing", file=sys.stderr) + parts.append(f"- {str(t)}") + + # Decision chain + chain = decisions.get("decision_chain", {}) + if chain: + root_constraint = chain.get("root", "") + if root_constraint: + parts.append(f"\n## Root Constraint: {root_constraint}") + + # Development rules + dev_rules = bp.get("development_rules", []) + if dev_rules: + parts.append("\n## Development Rules") + for r in _cap(dev_rules, 10): + if isinstance(r, dict): + parts.append(f"- {r.get('rule', '')}") + elif isinstance(r, str): + parts.append(f"- {r}") + else: + print(f"Warning: unexpected {type(r).__name__} in development_rules, coercing", file=sys.stderr) + parts.append(f"- {str(r)}") + + # Component boundaries + comps = bp.get("components", {}) + comp_list = comps.get("components", []) if isinstance(comps, dict) else [] + if comp_list: + parts.append("\n## Component Boundaries") + for c in _cap(comp_list, 10): + if isinstance(c, dict): + name = c.get("name", "") + loc = c.get("location", "") + deps = c.get("depends_on", []) + parts.append(f"- **{name}** ({loc}) depends on: {', '.join(deps) if deps else 'none'}") + elif isinstance(c, str): + parts.append(f"- {c}") + else: + print(f"Warning: unexpected {type(c).__name__} in components, coercing", file=sys.stderr) + parts.append(f"- {str(c)}") + + return "\n".join(parts) + + +def _get_rules_summary(root: Path) -> str: + """Extract architectural rules with semantic content for the AI reviewer. + + Reads new-shape fields (`severity_class`, `why`, `example`) when present, + falls back to legacy `severity` + `rationale` so old rules.json still + produces a useful summary. + """ + rules_data = _load_json(root / ".archie" / "rules.json") + rules = rules_data.get("rules", []) if isinstance(rules_data, dict) else [] + if not rules: + return "" + + parts = ["## Architectural Rules"] + parts.append( + "Evaluate the change against each rule's *intent* (the WHY block). " + "Block any decision_violation or pitfall_triggered. Warn on tradeoff_undermined. " + "Pattern_divergence is informational unless the divergence is structural.\n" + ) + for r in rules: + if not isinstance(r, dict): + continue + rid = r.get("id", "") + severity_class = r.get("severity_class", "") + sev = severity_class or r.get("severity", "warn") + desc = r.get("description", "") + why = r.get("why", "") or r.get("rationale", "") + example = r.get("example", "") + applies = r.get("applies_to", "") or r.get("file_pattern", "") + scope = f" (scope: `{applies}`)" if applies else "" + header = f"- **[{sev}]** {rid}: {desc}{scope}" if rid else f"- **[{sev}]** {desc}{scope}" + parts.append(header) + if why: + parts.append(f" *Why:* {why}") + if example: + parts.append(f" *Example:* {example}") + + return "\n".join(parts) + + +def _get_folder_context(root: Path, changed_files: list[str]) -> str: + """Get relevant folder CLAUDE.md content for changed files.""" + seen_folders = set() + parts = [] + + for fp in changed_files[:20]: + folder = str(Path(fp).parent) + if folder in seen_folders or folder == ".": + continue + seen_folders.add(folder) + + claude_md = root / folder / "CLAUDE.md" + if claude_md.exists(): + content = safe_read_text(claude_md, root) + # Truncate to keep context manageable + if len(content) > 1500: + content = content[:1500] + "\n... (truncated)" + parts.append(f"### {folder}/CLAUDE.md\n{content}") + + return "\n\n".join(parts[:5]) + + +def cmd_plan(root: Path): + """Gather context for plan review. Output review instructions to stdout.""" + bp_context = _get_blueprint_context(root) + rules = _get_rules_summary(root) + + if not bp_context: + # No blueprint = no architectural context to review against + sys.exit(0) + + print("[Archie] Architectural plan review required.") + print("") + print("Before executing this plan, spawn a reviewer subagent (model: sonnet) to check it against the architecture.") + print("Feed the reviewer the plan content (read it from the plan file) plus the following architectural context:") + print("") + print("---BEGIN ARCHITECTURAL CONTEXT---") + print(bp_context) + if rules: + print("") + print(rules) + print("---END ARCHITECTURAL CONTEXT---") + print("") + print("The reviewer subagent should check:") + print("1. Does the plan violate any key architectural decisions?") + print("2. Does it respect component boundaries and dependency directions?") + print("3. Does it trigger any trade-off violation signals?") + print("4. Does it follow the development rules?") + print("5. Does the plan violate the INTENT of any architectural rule? Read each rule's rationale — evaluate whether the plan undermines the reasoning, not just whether it matches a regex pattern.") + print("") + print("Return JSON: {\"approved\": true/false, \"violations\": [{\"decision\": \"...\", \"concern\": \"...\", \"suggestion\": \"...\"}]}") + print("") + print("If violations are found, revise the plan before proceeding. If approved, continue with execution.") + + +def cmd_diff(root: Path): + """Gather context for pre-commit review. Output review instructions to stdout.""" + # Get staged diff + try: + diff_result = subprocess.run( + ["git", "-C", str(root), "diff", "--cached", "--stat"], + capture_output=True, text=True, timeout=10, + ) + diff_stat = diff_result.stdout.strip() + except (subprocess.TimeoutExpired, FileNotFoundError): + diff_stat = "" + + if not diff_stat: + # Nothing staged = nothing to review + sys.exit(0) + + # Get changed file list + try: + files_result = subprocess.run( + ["git", "-C", str(root), "diff", "--cached", "--name-only"], + capture_output=True, text=True, timeout=10, + ) + changed_files = [f for f in files_result.stdout.strip().split("\n") if f] + except (subprocess.TimeoutExpired, FileNotFoundError): + changed_files = [] + + # Get the actual diff (truncated for context window) + try: + full_diff = subprocess.run( + ["git", "-C", str(root), "diff", "--cached"], + capture_output=True, text=True, timeout=10, + ) + diff_content = full_diff.stdout + if len(diff_content) > 15000: + diff_content = diff_content[:15000] + "\n... (truncated, full diff too large)" + except (subprocess.TimeoutExpired, FileNotFoundError): + diff_content = "" + + bp_context = _get_blueprint_context(root) + rules = _get_rules_summary(root) + folder_context = _get_folder_context(root, changed_files) + + if not bp_context: + sys.exit(0) + + print("[Archie] Pre-commit architectural review required.") + print("") + print(f"Staged changes: {diff_stat}") + print("") + print("Before committing, spawn a reviewer subagent (model: sonnet) to check the staged changes against the architecture.") + print("Feed the reviewer the diff below plus the architectural context:") + print("") + print("---BEGIN STAGED DIFF---") + print(diff_content) + print("---END STAGED DIFF---") + print("") + if folder_context: + print("---BEGIN FOLDER PATTERNS---") + print(folder_context) + print("---END FOLDER PATTERNS---") + print("") + print("---BEGIN ARCHITECTURAL CONTEXT---") + print(bp_context) + if rules: + print("") + print(rules) + print("---END ARCHITECTURAL CONTEXT---") + print("") + print("The reviewer subagent should check:") + print("1. Do the changes violate any key architectural decisions?") + print("2. Do files follow the patterns described in their folder's CLAUDE.md?") + print("3. Are component boundaries and dependency directions respected?") + print("4. Are there any trade-off violation signals in the new code?") + print("5. Do the changes follow the development rules?") + print("6. Do the changes violate the INTENT of any architectural rule? Read each rule's rationale — evaluate whether the change undermines the reasoning, not just whether it matches a regex pattern.") + print("") + print("Return JSON: {\"approved\": true/false, \"violations\": [{\"file\": \"...\", \"rule\": \"...\", \"concern\": \"...\", \"suggestion\": \"...\"}]}") + print("") + print("If violations are found, fix them before committing. If approved, proceed with the commit.") + + +if __name__ == "__main__": + if len(sys.argv) < 3: + print("Usage:", file=sys.stderr) + print(" python3 arch_review.py plan ", file=sys.stderr) + print(" python3 arch_review.py diff ", file=sys.stderr) + sys.exit(1) + + # Module-level: assign directly (no `global` needed at module scope). + # Render functions read this module global via _cap(). + _COMPREHENSIVE = "--comprehensive" in sys.argv + + subcmd = sys.argv[1] + root = Path(sys.argv[2]).resolve() + + if subcmd == "plan": + cmd_plan(root) + elif subcmd == "diff": + cmd_diff(root) + else: + print(f"Unknown subcommand: {subcmd}", file=sys.stderr) + sys.exit(1) diff --git a/.archie/archie_config.json b/.archie/archie_config.json new file mode 100644 index 0000000000..279df37056 --- /dev/null +++ b/.archie/archie_config.json @@ -0,0 +1,7 @@ +{ + "scope": "whole", + "monorepo_type": "none", + "workspaces": [], + "schema_version": 1, + "reconfigured_at": "2026-06-05T13:00:03Z" +} diff --git a/.archie/blueprint.json b/.archie/blueprint.json new file mode 100644 index 0000000000..8c2535dd15 --- /dev/null +++ b/.archie/blueprint.json @@ -0,0 +1,9956 @@ +{ + "meta": { + "architecture_style": "Multi-binary Go backend organized as domain packages under openmeter/, each following a hand-rolled service/adapter/connector pattern (interfaces declared in the domain root package, concrete struct constructors in nested service/ and adapter/ subpackages, wired together by Google Wire in app/common). Persistence is Ent ORM over PostgreSQL with a single shared generated client (openmeter/ent/db). Event-time usage metering data flows through Kafka into ClickHouse via streaming connectors; an async event bus (Watermill over Kafka) drives billing/notification/balance workers. Two parallel HTTP API surfaces coexist: a legacy v1 surface assembled in openmeter/server/router from per-domain httpdriver/httphandler packages, and a newer AIP-style v3 surface in api/v3 with centralized handlers that delegate to the same domain services. API contract is authored in TypeSpec (api/spec, two packages: legacy + aip) and code-generated to OpenAPI then to Go (oapi-codegen) and to JS/Python/Go SDKs. A separate Benthos/Redpanda-Connect collector binary (collector/) ships usage events from external sources. Cross-cutting dependency magnets (pkg/models, pkg/clock, pkg/pagination, openmeter/customer, openmeter/productcatalog, openmeter/billing) are pulled in widely; the only import cycles detected are test-harness-induced (production/test packages importing the test/billing fixtures package).", + "platforms": [ + "backend", + "cli", + "shared", + "web-frontend" + ], + "executive_summary": "OpenMeter is a multi-tenant Go usage-metering and billing platform that ingests CloudEvents usage data, aggregates it in ClickHouse, and drives entitlements, credit grants, a double-entry ledger, and invoice/charge billing through a versioned v1+v3 REST API. It is built as a single-Go-module modulith: roughly 35 layered domain packages under openmeter/ (each splitting Service and Adapter interfaces, Ent/PostgreSQL persistence, and HTTP drivers) composed by Google Wire into six runnable binaries (server, sink-worker, billing-worker, balance-worker, notification-service, jobs) plus a separate Benthos collector module. The HTTP spine routes requests through a Chi router (legacy v1 plus a Google-AIP-style v3 layer, both generated by oapi-codegen from a TypeSpec source of truth) into the domain services, which persist via transaction-aware Ent adapters to PostgreSQL while metered usage flows separately through the ingest collector and Kafka into a single append-only ClickHouse MergeTree table written by the sink worker's three-phase flush. Cross-binary work is asynchronous over Kafka behind a Watermill eventbus facade, with the billing, balance, and notification workers consuming events to advance billing, recompute balances, and deliver outbound webhooks via Svix. The architecture is a modular, event-driven Go monorepo of separately deployable services packaged as containers and orchestrated on Kubernetes via Helm, with the entire API surface and all three SDKs generated from the shared TypeSpec definition." + }, + "components": { + "structure_type": "modular", + "components": [ + { + "name": "Server entrypoint & DI bootstrap", + "location": "cmd/server", + "platform": "backend", + "responsibility": "main() loads config via Viper (with config.DecodeHook), validates it, calls Wire-generated initializeApplication(ctx, conf) to build the full Application graph, then runs app.Migrate(ctx) BEFORE provisioning the default namespace. It registers namespace handlers (app.LedgerNamespaceHandler, app.KafkaIngestNamespaceHandler) prior to initNamespace, constructs a debug.NewDebugConnector wrapping the StreamingConnector, and starts the HTTP server plus telemetry server through oklog/run. Panics are funneled through log.PanicLogger(log.WithExit).", + "depends_on": [ + "app/common", + "app/config", + "openmeter/server", + "openmeter/server/router", + "openmeter/namespace", + "openmeter/ingest/kafkaingest", + "openmeter/debug", + "pkg/errorsx", + "pkg/log" + ], + "exposes_to": [], + "key_interfaces": [ + { + "name": "main", + "methods": [ + "main" + ], + "description": "Process entrypoint: config load/validate, build Application, migrate DB, register namespace handlers, run server + telemetry via oklog/run group" + } + ], + "key_files": [ + { + "file": "cmd/server/main.go", + "description": "Boots the OpenMeter API server; migrates DB before namespace provisioning and registers ledger + kafka-ingest namespace handlers" + } + ], + "kind": "service", + "group": "cmd" + }, + { + "name": "Worker & job entrypoints", + "location": "cmd", + "platform": "backend", + "responsibility": "Five additional binaries beyond the API server, each with its own main.go repeating the same Viper config-load/validate boilerplate (cmd/server/main.go pattern) and then building a worker-specific Wire application: billing-worker (invoice advancement/collection + subscription\u2192billing reconciliation), balance-worker (entitlement balance snapshotting from usage events), sink-worker (Kafka\u2192ClickHouse usage event sink), notification-service (notification event delivery), and jobs (one-off operational jobs). All share app/config and pkg/log.PanicLogger.", + "depends_on": [ + "app/common", + "app/config", + "pkg/log" + ], + "exposes_to": [], + "key_interfaces": [ + { + "name": "billing-worker main", + "methods": [ + "main" + ], + "description": "Loads config and runs the billing worker application" + }, + { + "name": "balance-worker main", + "methods": [ + "main" + ], + "description": "Runs the entitlement balance worker" + }, + { + "name": "sink-worker main", + "methods": [ + "main" + ], + "description": "Runs the Kafka-to-ClickHouse usage sink" + }, + { + "name": "notification-service main", + "methods": [ + "main" + ], + "description": "Runs the notification delivery service" + }, + { + "name": "jobs main", + "methods": [ + "main" + ], + "description": "Runs one-off operational jobs" + } + ], + "key_files": [ + { + "file": "cmd/billing-worker/main.go", + "description": "Billing worker entrypoint; identical config bootstrap to the server main" + }, + { + "file": "cmd/balance-worker/main.go", + "description": "Entitlement balance worker entrypoint" + }, + { + "file": "cmd/sink-worker/main.go", + "description": "Usage event sink-worker entrypoint" + }, + { + "file": "cmd/notification-service/main.go", + "description": "Notification delivery service entrypoint" + }, + { + "file": "cmd/jobs/main.go", + "description": "Operational jobs entrypoint" + } + ], + "kind": "cli", + "group": "cmd" + }, + { + "name": "Application wiring (app/common)", + "location": "app/common", + "platform": "backend", + "responsibility": "The dependency-injection layer. Each file is a Google Wire provider set (wire.NewSet) for one subsystem: billing.go declares BillingRegistry/ChargesRegistry bundling billing.Service plus flatfee/usagebased/creditpurchase/recognizer charge services; ledger.go wires concrete-or-noop ledger account/resolver services gated on credits.enabled; database.go, clickhouse.go, kafka.go, streaming.go provide infra clients; openmeter_server.go / openmeter_billingworker.go / openmeter_sinkworker.go / openmeter_balanceworker.go / openmeter_notification.go assemble per-binary Application structs. Constructor functions take explicit *slog.Logger and config inputs (never slog.Default()).", + "depends_on": [ + "app/config", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/rating", + "openmeter/customer", + "openmeter/ledger", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "openmeter/ent/db", + "pkg/framework/lockr", + "pkg/featuregate" + ], + "exposes_to": [ + "cmd/server", + "cmd/billing-worker", + "cmd/balance-worker", + "cmd/sink-worker", + "cmd/notification-service", + "cmd/jobs" + ], + "key_interfaces": [ + { + "name": "BillingRegistry", + "methods": [ + "ChargesServiceOrNil" + ], + "description": "Bundles billing.Service + ChargesRegistry so downstream callers depend on one struct rather than individual charge services" + }, + { + "name": "Billing (wire.NewSet)", + "methods": [ + "BillingAdapter", + "NewBillingRatingService", + "NewLedgerBreakageService", + "NewBillingRegistry", + "NewBillingCustomerOverrideService" + ], + "description": "Wire provider set assembling the billing + charges stack" + } + ], + "key_files": [ + { + "file": "app/common/billing.go", + "description": "Wire providers for billing/charges; defines BillingRegistry and ChargesRegistry aggregation structs" + }, + { + "file": "app/common/ledger.go", + "description": "Wires concrete vs noop ledger account/resolver services depending on credits.enabled" + }, + { + "file": "app/common/openmeter_server.go", + "description": "Assembles the API server Application provider set" + }, + { + "file": "app/common/openmeter_billingworker.go", + "description": "Assembles the billing worker Application" + }, + { + "file": "app/common/database.go", + "description": "Provides the Ent/pgx PostgreSQL client" + }, + { + "file": "app/common/clickhouse.go", + "description": "Provides the ClickHouse client used by streaming" + } + ], + "kind": "lib", + "group": "app" + }, + { + "name": "Billing domain", + "location": "openmeter/billing", + "platform": "backend", + "responsibility": "Largest domain (41 files in root, 95 in-edges). Root package declares the billing.Service and billing.Adapter interfaces plus invoice/line/profile/customer-override/discount/tax models and the StandardInvoiceHooks. service/ implements billing.Service (struct Service holds adapter, customerService, appService, taxCodeService, ratingService, featureService, meterService, streamingConnector, eventbus.Publisher, an engineRegistry of lineEngines, and an invoicecalc.Calculator) orchestrating the invoice state machine, gathering\u2192standard invoice conversion, line splitting, sequence numbering, and quantity snapshots. adapter/ implements billing.Adapter over Ent with HijackTx/WithTx transaction hijacking. Sub-areas: charges/ (usage-based & flatfee & credit-purchase charge lifecycle state machines), rating/ (pricing engine), worker/ (auto-advance, collect, subscriptionsync reconciliation), lineengine/, validators/, httpdriver/ (legacy v1 HTTP). Uses goderive (derived.gen.go) and goverter.", + "depends_on": [ + "openmeter/app", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/billing/rating", + "openmeter/billing/lineengine", + "openmeter/billing/service/invoicecalc", + "openmeter/watermill/eventbus", + "openmeter/ent/db", + "pkg/framework/transaction", + "pkg/framework/entutils", + "pkg/models" + ], + "exposes_to": [ + "app/common", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/customers/billing", + "openmeter/server/router", + "openmeter/billing/charges", + "openmeter/billing/worker" + ], + "key_interfaces": [ + { + "name": "billing.Service", + "methods": [ + "(invoice lifecycle, profile, customer-override, gathering & standard invoice, line, sequence, quantity-snapshot operations declared across openmeter/billing/*.go)" + ], + "description": "Primary billing facade interface implemented by billingservice.Service" + }, + { + "name": "billing.Adapter", + "methods": [ + "Tx", + "WithTx", + "Self" + ], + "description": "Ent-backed persistence + transaction hijacking contract for billing" + }, + { + "name": "Config.Validate", + "methods": [ + "Validate" + ], + "description": "Service Config validates all injected dependencies are non-nil before constructing Service" + } + ], + "key_files": [ + { + "file": "openmeter/billing/service/service.go", + "description": "billingservice.Service struct + Config with explicit dependency validation; central invoice orchestration" + }, + { + "file": "openmeter/billing/adapter/adapter.go", + "description": "Ent adapter implementing billing.Adapter with HijackTx/WithTx transaction handling" + }, + { + "file": "openmeter/billing/invoice.go", + "description": "Invoice domain model + interface declarations" + }, + { + "file": "openmeter/billing/derived.gen.go", + "description": "goderive-generated equality/clone helpers (DO NOT EDIT)" + }, + { + "file": "openmeter/billing/service/invoicecalc", + "description": "Invoice calculation engine subpackage" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Charges sub-system", + "location": "openmeter/billing/charges", + "platform": "backend", + "responsibility": "Usage-based billing charge engine layered under billing. meta/ holds charge-meta queries (39 in-edges); service/ drives charge creation/advancement and the realization runs; usagebased/, flatfee/, creditpurchase/ implement per-charge-type lifecycle state machines; invoiceupdater/, lineage/ link charges back to invoice lines; models/ subpackages (chargemeta, creditrealization, invoicedusage, ledgertransaction, payment) carry value types. Adapter helpers are kept transaction-aware via entutils.TransactingRepo even when handed a raw *entdb.Client. Lifecycle tests drive charges.Service.Create/AdvanceCharges/ApplyPatches.", + "depends_on": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/ledger", + "openmeter/credit", + "openmeter/ent/db", + "pkg/framework/entutils" + ], + "exposes_to": [ + "app/common", + "api/v3/handlers/customers/charges", + "openmeter/billing/worker/subscriptionsync" + ], + "key_interfaces": [ + { + "name": "charges.Service", + "methods": [ + "Create", + "AdvanceCharges", + "ApplyPatches" + ], + "description": "Charge lifecycle facade exercised by both production wiring and tests" + } + ], + "key_files": [ + { + "file": "openmeter/billing/charges/service", + "description": "Charge creation/advancement service + realization runs" + }, + { + "file": "openmeter/billing/charges/meta", + "description": "Charge-meta queries; high-fan-in (39 in-edges)" + }, + { + "file": "openmeter/billing/charges/usagebased", + "description": "Usage-based charge lifecycle state machine" + }, + { + "file": "openmeter/billing/charges/flatfee", + "description": "Flat-fee charge lifecycle" + }, + { + "file": "openmeter/billing/charges/creditpurchase", + "description": "Credit-purchase charge lifecycle" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Customer domain", + "location": "openmeter/customer", + "platform": "backend", + "responsibility": "High-fan-in domain (103 in-edges). Root declares customer.Service plus customer model, errors, events, and a requestvalidator. service/ implements the service (with service/hooks for lifecycle hooks); adapter/ is the Ent persistence layer; app/ holds app-integration types; httpdriver/ is the legacy v1 HTTP layer; testutils/ provides shared test fixtures. Consumed by billing, subscription, ledger and the v3 customers handlers.", + "depends_on": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/clock" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/subscription", + "openmeter/ledger", + "api/v3/handlers/customers", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "customer.Service", + "methods": [ + "(customer CRUD + lifecycle declared in openmeter/customer/customer.go)" + ], + "description": "Customer service facade" + } + ], + "key_files": [ + { + "file": "openmeter/customer/customer.go", + "description": "Customer domain model + service interface" + }, + { + "file": "openmeter/customer/service/service.go", + "description": "Customer service implementation" + }, + { + "file": "openmeter/customer/adapter", + "description": "Ent-backed customer persistence" + }, + { + "file": "openmeter/customer/requestvalidator.go", + "description": "Customer request validation" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Product catalog domain", + "location": "openmeter/productcatalog", + "platform": "backend", + "responsibility": "Highest non-pkg fan-in (104 in-edges). Holds plan, addon, planaddon, ratecard, price, discount, tax, feature, and pro-rating value types and rules at the root, with adapter/ (Ent), feature/ (FeatureConnector + FeatureRepo, itself 67 in-edges), featureresolver/, plan/ (service+adapter), addon/, planaddon/, subscription/ (plan\u2192subscription bridge), driver/ + http/ (HTTP), and testutils/. Defines the catalog primitives that subscription, billing, and entitlement build on.", + "depends_on": [ + "openmeter/ent/db", + "openmeter/meter", + "pkg/models", + "pkg/currencyx", + "pkg/datetime" + ], + "exposes_to": [ + "openmeter/subscription", + "openmeter/billing", + "openmeter/entitlement", + "api/v3/handlers/plans", + "api/v3/handlers/features", + "api/v3/handlers/addons", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "feature.FeatureConnector", + "methods": [ + "(feature CRUD/query declared in openmeter/productcatalog/feature)" + ], + "description": "Feature connector used across billing/entitlement/notification" + }, + { + "name": "feature.FeatureRepo", + "methods": [ + "(feature persistence contract)" + ], + "description": "Feature repository interface" + } + ], + "key_files": [ + { + "file": "openmeter/productcatalog/plan.go", + "description": "Plan domain model + rules" + }, + { + "file": "openmeter/productcatalog/ratecard.go", + "description": "Rate card model used by pricing" + }, + { + "file": "openmeter/productcatalog/feature", + "description": "Feature connector/repo subpackage (high fan-in)" + }, + { + "file": "openmeter/productcatalog/addon.go", + "description": "Addon model" + }, + { + "file": "openmeter/productcatalog/price.go", + "description": "Price model and rules" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Subscription domain", + "location": "openmeter/subscription", + "platform": "backend", + "responsibility": "31-file domain (37 in-edges, 25 out-edges). Root holds the subscription spec model (subscriptionspec.go), views (subscriptionview.go), patch system (patch.go + patch/), apply/sync logic (apply.go), phase/item/timing models, uniqueness rules, billing bridge (billing.go), and entitlement bridge (entitlement.go, entitlement/). repo/ persists; service/ + workflow/ orchestrate creation/edit/cancel/plan-change; addon/ (with diff/, repo/, service/) is the subscription-addon sub-system; hooks/ and validators/ enforce invariants. Bridges product catalog plans to live customer subscriptions and into billing + entitlement.", + "depends_on": [ + "openmeter/productcatalog", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/billing", + "openmeter/ent/db", + "pkg/datetime", + "pkg/models" + ], + "exposes_to": [ + "api/v3/handlers/subscriptions", + "openmeter/server/router", + "openmeter/billing/worker/subscriptionsync", + "app/common" + ], + "key_interfaces": [ + { + "name": "subscription.Service", + "methods": [ + "(create/list/get/cancel/change declared in openmeter/subscription/service.go)" + ], + "description": "Subscription service facade" + }, + { + "name": "Subscription patch system", + "methods": [ + "(patch application declared in subscription/patch.go)" + ], + "description": "Declarative patches that transform a subscription spec" + } + ], + "key_files": [ + { + "file": "openmeter/subscription/subscriptionspec.go", + "description": "Subscription spec model (target state)" + }, + { + "file": "openmeter/subscription/subscriptionview.go", + "description": "Materialized subscription view" + }, + { + "file": "openmeter/subscription/patch.go", + "description": "Patch system entry point" + }, + { + "file": "openmeter/subscription/apply.go", + "description": "Sync/apply algorithm" + }, + { + "file": "openmeter/subscription/billing.go", + "description": "Subscription\u2192billing bridge types" + }, + { + "file": "openmeter/subscription/workflow", + "description": "Workflow orchestration layer" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Entitlement domain", + "location": "openmeter/entitlement", + "platform": "backend", + "responsibility": "Access-control domain (40 in-edges, 19 out-edges). Root declares entitlement.Service, EntitlementRepo, the access model (access.go), entitlement types (metered/boolean/static), grant linkage (entitlement_grant.go), and usage-period logic (usageperiod.go). metered/ holds the metered-entitlement connector tying entitlements to credit grants + usage; balanceworker/ computes balance snapshots from usage events (driven by cmd/balance-worker); driver/ + driver/v2 expose legacy v1 + v2 HTTP; hooks/subscription wires entitlement provisioning to subscription lifecycle; snapshot/, static/, boolean/, validators/ round it out.", + "depends_on": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/productcatalog/feature", + "openmeter/meter", + "openmeter/streaming", + "openmeter/ent/db", + "pkg/models", + "pkg/timeutil" + ], + "exposes_to": [ + "openmeter/subscription", + "api/v3/handlers/customers/entitlementaccess", + "openmeter/server/router", + "openmeter/registry", + "cmd/balance-worker" + ], + "key_interfaces": [ + { + "name": "entitlement.Service", + "methods": [ + "(entitlement CRUD + access checks declared in openmeter/entitlement/connector.go)" + ], + "description": "Entitlement service facade" + }, + { + "name": "meteredentitlement.Connector", + "methods": [ + "(metered balance/reset operations)" + ], + "description": "Connector binding metered entitlements to credit grants and usage" + } + ], + "key_files": [ + { + "file": "openmeter/entitlement/connector.go", + "description": "Entitlement service interface" + }, + { + "file": "openmeter/entitlement/access.go", + "description": "Entitlement access-evaluation model" + }, + { + "file": "openmeter/entitlement/metered", + "description": "Metered entitlement connector" + }, + { + "file": "openmeter/entitlement/balanceworker", + "description": "Balance snapshot computation for the balance worker" + }, + { + "file": "openmeter/entitlement/driver", + "description": "Legacy v1/v2 entitlement HTTP drivers" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Credit & grant domain", + "location": "openmeter/credit", + "platform": "backend", + "responsibility": "Credit-grant accounting feeding entitlements. Root declares BalanceConnector, GrantConnector, balance/ (balance computation), engine/ (grant-burn-down engine), grant/ (grant model + Repo + OwnerConnector), hook/ (lifecycle hooks). The whole credit stack is feature-gated by credits.enabled at the wiring layer. Used by the metered-entitlement connector and the registry.", + "depends_on": [ + "openmeter/credit/grant", + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/ent/db", + "pkg/models", + "pkg/timeutil" + ], + "exposes_to": [ + "openmeter/entitlement/metered", + "openmeter/registry", + "openmeter/billing/charges/creditpurchase", + "api/v3/handlers/customers/credits" + ], + "key_interfaces": [ + { + "name": "credit.BalanceConnector", + "methods": [ + "(credit balance computation)" + ], + "description": "Computes credit balances" + }, + { + "name": "credit.GrantConnector", + "methods": [ + "(grant CRUD)" + ], + "description": "Manages credit grants" + }, + { + "name": "grant.OwnerConnector", + "methods": [ + "(grant owner resolution)" + ], + "description": "Resolves grant ownership" + } + ], + "key_files": [ + { + "file": "openmeter/credit/engine", + "description": "Grant burn-down engine" + }, + { + "file": "openmeter/credit/balance", + "description": "Credit balance computation" + }, + { + "file": "openmeter/credit/grant", + "description": "Grant model, Repo, OwnerConnector" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Ledger domain", + "location": "openmeter/ledger", + "platform": "backend", + "responsibility": "Double-entry-style ledger for customer credit accounts (35 in-edges, 17 out-edges), feature-gated by credits.enabled. Root holds account/transaction/balance/routing primitives, impact analysis (impact.go), routing rules + validator (routing.go, routing_validator.go), and a noop/ implementation used when credits are off. account/ has its own service/+adapter/ (account_business.go, account_customer.go, subaccount.go); transactions/, historical/ (+adapter), resolvers/ (+adapter), routingrules/, recognizer/, breakage/, chargeadapter/, customerbalance/, collector/ are sub-areas. When credits are disabled app/common wires noop services; real backfill must construct concrete account+resolver adapters directly.", + "depends_on": [ + "openmeter/customer", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/models", + "pkg/datetime" + ], + "exposes_to": [ + "openmeter/billing/charges", + "api/v3/handlers/customers/credits", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "ledger account service", + "methods": [ + "(account create/resolve/balance declared in openmeter/ledger/account)" + ], + "description": "Customer ledger account management" + }, + { + "name": "ledger routing", + "methods": [ + "(routing rule evaluation in routing.go / routing_validator.go)" + ], + "description": "Routes ledger entries to accounts via rules" + } + ], + "key_files": [ + { + "file": "openmeter/ledger/account/service", + "description": "Ledger account service implementation" + }, + { + "file": "openmeter/ledger/account/adapter", + "description": "Ledger account Ent persistence" + }, + { + "file": "openmeter/ledger/noop", + "description": "No-op ledger used when credits.enabled is false" + }, + { + "file": "openmeter/ledger/routing.go", + "description": "Ledger entry routing rules" + }, + { + "file": "openmeter/ledger/impact.go", + "description": "Ledger impact analysis" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Meter domain", + "location": "openmeter/meter", + "platform": "backend", + "responsibility": "Meter definition domain (70 in-edges). Root declares meter.Service, the Meter model, MeterQueryRow, and event parsing (parse.go). service/ implements the service; adapter/ persists via Ent; mockadapter/ is a test double; httphandler/ exposes v1 meter HTTP. Meters define how raw usage events are aggregated; consumed by streaming, billing, and entitlement.", + "depends_on": [ + "openmeter/namespace", + "openmeter/ent/db", + "pkg/models", + "pkg/slicesx" + ], + "exposes_to": [ + "openmeter/streaming", + "openmeter/billing", + "openmeter/entitlement", + "api/v3/handlers/meters", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "meter.Service", + "methods": [ + "(meter CRUD/query declared in openmeter/meter/service.go)" + ], + "description": "Meter definition service" + }, + { + "name": "Meter.parse", + "methods": [ + "parse" + ], + "description": "Parses/validates meter aggregation config" + } + ], + "key_files": [ + { + "file": "openmeter/meter/meter.go", + "description": "Meter model + service interface" + }, + { + "file": "openmeter/meter/service/service.go", + "description": "Meter service implementation" + }, + { + "file": "openmeter/meter/parse.go", + "description": "Meter aggregation parsing" + }, + { + "file": "openmeter/meter/mockadapter", + "description": "In-memory meter adapter for tests" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Streaming / usage query (ClickHouse)", + "location": "openmeter/streaming", + "platform": "backend", + "responsibility": "Defines the streaming.Connector interface (extends namespace.Handler) for reading metered usage out of ClickHouse: CountEvents, ListEvents, ListEventsV2, ListSubjects, ListGroupByValues, QueryMeter, BatchInsert, ValidateJSONPath. clickhouse/ holds the concrete ClickHouse implementation; retry/ adds retry behavior; usageattribution.go maps events to customers; testutils/ provides a MockStreamingConnector with SetSimpleEvents and explicit StoredAt for late-arriving-usage tests. The RawEvent struct carries CloudEvents-shaped fields with both `ch` (ClickHouse) and `json` tags.", + "depends_on": [ + "openmeter/meter", + "openmeter/namespace", + "pkg/models" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/entitlement", + "openmeter/sink", + "openmeter/debug", + "api/v3/handlers/meters" + ], + "key_interfaces": [ + { + "name": "streaming.Connector", + "methods": [ + "CountEvents", + "ListEvents", + "ListEventsV2", + "ListSubjects", + "ListGroupByValues", + "QueryMeter", + "BatchInsert", + "ValidateJSONPath" + ], + "description": "Usage event read/aggregation contract over ClickHouse; embeds namespace.Handler" + } + ], + "key_files": [ + { + "file": "openmeter/streaming/connector.go", + "description": "Connector interface + RawEvent struct with ClickHouse/json tags" + }, + { + "file": "openmeter/streaming/clickhouse", + "description": "ClickHouse-backed connector implementation" + }, + { + "file": "openmeter/streaming/usageattribution.go", + "description": "Attributes usage events to customers" + }, + { + "file": "openmeter/streaming/testutils", + "description": "MockStreamingConnector for tests" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Ingest & sink pipeline", + "location": "openmeter/ingest", + "platform": "backend", + "responsibility": "Usage event intake. ingest/ defines the ingest service, in-memory and dedupe collectors (dedupe.go, inmemory.go), kafkaingest/ publishes events to Kafka, ingestadapter/ adapts, httpdriver/ exposes the v1 ingest HTTP endpoint. openmeter/sink (sink-worker side) consumes from Kafka: buffer.go batches events, partition.go handles partition assignment, storage.go + meters.go write to ClickHouse via the streaming connector, flushhandler/ flushes buffers. Together they form the event-time metering ingest\u2192storage path.", + "depends_on": [ + "openmeter/streaming", + "openmeter/meter", + "openmeter/namespace", + "pkg/kafka" + ], + "exposes_to": [ + "cmd/server", + "cmd/sink-worker", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "ingest service", + "methods": [ + "(event ingest + dedupe in openmeter/ingest/ingest.go, dedupe.go)" + ], + "description": "Accepts and deduplicates usage events" + }, + { + "name": "sink", + "methods": [ + "(buffer, partition, storage flush in openmeter/sink)" + ], + "description": "Kafka consumer that batches and writes usage events to ClickHouse" + } + ], + "key_files": [ + { + "file": "openmeter/ingest/ingest.go", + "description": "Ingest service entrypoint" + }, + { + "file": "openmeter/ingest/dedupe.go", + "description": "Event deduplication" + }, + { + "file": "openmeter/ingest/kafkaingest", + "description": "Kafka producer for ingested events" + }, + { + "file": "openmeter/sink/buffer.go", + "description": "Sink-side event batching buffer" + }, + { + "file": "openmeter/sink/storage.go", + "description": "Writes batched events to ClickHouse" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Notification domain", + "location": "openmeter/notification", + "platform": "backend", + "responsibility": "Notification event pipeline. Root declares notification.Service + notification.Repository, channel/rule/event/eventpayload/deliverystatus models, and entitlement-specific event types (entitlements.go, invoice.go). service/ implements the service (struct Service holds feature connector, adapter repository, webhook.Handler, logger); consumer/ is the Kafka consumer side (driven by cmd/notification-service); eventhandler/ processes events; webhook/ integrates with Svix for webhook delivery; httpdriver/ exposes v1 HTTP; internal/ holds private helpers.", + "depends_on": [ + "openmeter/notification/webhook", + "openmeter/productcatalog/feature", + "openmeter/ent/db", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "exposes_to": [ + "cmd/notification-service", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "notification.Service", + "methods": [ + "(rule/channel/event CRUD + delivery declared in openmeter/notification/service.go)" + ], + "description": "Notification service facade" + }, + { + "name": "notification.Repository", + "methods": [ + "(notification persistence)" + ], + "description": "Notification persistence contract" + }, + { + "name": "webhook.Handler", + "methods": [ + "(Svix webhook delivery)" + ], + "description": "Webhook delivery via Svix" + } + ], + "key_files": [ + { + "file": "openmeter/notification/service/service.go", + "description": "Notification Service struct + Config validation" + }, + { + "file": "openmeter/notification/consumer", + "description": "Kafka consumer for notification events" + }, + { + "file": "openmeter/notification/webhook", + "description": "Svix webhook integration" + }, + { + "file": "openmeter/notification/eventpayload.go", + "description": "Notification event payload model" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "App / marketplace integrations", + "location": "openmeter/app", + "platform": "backend", + "responsibility": "Third-party app/marketplace framework (53 in-edges). Root declares app.Service, the app/marketplace registry (registry.go, marketplace.go), webhook handling, and an appbase. stripe/ implements the Stripe billing integration; custominvoicing/ implements a custom-invoicing app; sandbox/ is a test app; httpdriver/ + service/ + adapter/ provide HTTP/service/persistence. Apps plug into billing (invoice delivery, payment).", + "depends_on": [ + "openmeter/customer", + "openmeter/secret", + "openmeter/ent/db", + "pkg/models" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "app.Service", + "methods": [ + "(app install/list/marketplace declared in openmeter/app/service.go)" + ], + "description": "App lifecycle + marketplace service" + } + ], + "key_files": [ + { + "file": "openmeter/app/service.go", + "description": "App service implementation" + }, + { + "file": "openmeter/app/stripe", + "description": "Stripe billing app integration" + }, + { + "file": "openmeter/app/custominvoicing", + "description": "Custom-invoicing app" + }, + { + "file": "openmeter/app/marketplace.go", + "description": "App marketplace registry" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Ent schema (DB source of truth)", + "location": "openmeter/ent/schema", + "platform": "backend", + "responsibility": "Hand-written Ent entity definitions that are the source of truth for the PostgreSQL schema. ~35 schema files spanning customer, billing (billing.go), charges (charges*.go), subscription (+addon, +billingsync), entitlement, grant, feature, ledger_* (account, customer_account, entry, transaction, transaction_group, breakage_record), llmcostprice, notification, plan/addon, ratecard, meter, taxcode, app/app_stripe, balance_snapshot, usage_reset. Schemas use shared Mixins from pkg/framework/entutils (ResourceMixin, CustomerAddressMixin, AnnotationsMixin). Generated into openmeter/ent/db (407 files, DO NOT EDIT) via `make generate`; migrations generated from schema diffs via Atlas.", + "depends_on": [ + "pkg/framework/entutils", + "pkg/clock", + "pkg/currencyx" + ], + "exposes_to": [ + "openmeter/ent/db" + ], + "key_interfaces": [ + { + "name": "Customer (ent.Schema)", + "methods": [ + "Mixin", + "Fields", + "Edges", + "Indexes" + ], + "description": "Customer entity: key/primary_email/currency fields, ResourceMixin + CustomerAddressMixin(billing prefix) + AnnotationsMixin" + } + ], + "key_files": [ + { + "file": "openmeter/ent/schema/customer.go", + "description": "Customer entity schema with billing-address and annotations mixins" + }, + { + "file": "openmeter/ent/schema/billing.go", + "description": "Billing entities schema" + }, + { + "file": "openmeter/ent/schema/subscription.go", + "description": "Subscription entity schema" + }, + { + "file": "openmeter/ent/schema/ledger_entry.go", + "description": "Ledger entry entity schema" + }, + { + "file": "openmeter/ent/schema/charges.go", + "description": "Charges entity schema" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Generated Ent client", + "location": "openmeter/ent/db", + "platform": "backend", + "responsibility": "Ent-generated ORM client (407 files, 60 in-edges, 108 out-edges). Single shared *entdb.Client used by every domain adapter for PostgreSQL access; supports transaction hijacking (HijackTx) consumed by adapters' Tx/WithTx. predicate/ subpackage (94 in-edges) holds query predicates. All files carry `// Code generated ... DO NOT EDIT` headers; regenerated from openmeter/ent/schema via `make generate`. Its breadth makes it the dominant node in the large generated-code import cycle (cycle 0).", + "depends_on": [ + "openmeter/ent/schema" + ], + "exposes_to": [ + "openmeter/billing/adapter", + "openmeter/customer/adapter", + "openmeter/subscription/repo", + "openmeter/ledger/account/adapter", + "openmeter/notification/adapter", + "(all domain adapters)" + ], + "key_interfaces": [ + { + "name": "entdb.Client", + "methods": [ + "HijackTx", + "NewTxClientFromRawConfig", + "Client" + ], + "description": "Generated Ent client exposing transaction hijacking used by domain adapters" + } + ], + "key_files": [ + { + "file": "openmeter/ent/db", + "description": "Generated Ent ORM client (DO NOT EDIT)" + }, + { + "file": "openmeter/ent/db/predicate", + "description": "Generated query predicates (94 in-edges)" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Registry & builder", + "location": "openmeter/registry", + "platform": "backend", + "responsibility": "Aggregation structs that bundle related connectors for downstream consumers. registry.Entitlement groups Feature/FeatureRepo connectors, EntitlementOwner (grant.OwnerConnector), CreditBalance/Grant connectors, GrantRepo, MeteredEntitlement connector, Entitlement service, and EntitlementRepo into one struct. builder/ assembles these registries. This is the in-domain counterpart to app/common's Wire registries.", + "depends_on": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature" + ], + "exposes_to": [ + "app/common", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "registry.Entitlement", + "methods": [], + "description": "Struct bundling feature/credit/grant/entitlement connectors for downstream wiring" + } + ], + "key_files": [ + { + "file": "openmeter/registry/entitlement.go", + "description": "Entitlement registry aggregation struct" + }, + { + "file": "openmeter/registry/builder", + "description": "Registry assembly logic" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "Legacy v1 HTTP router", + "location": "openmeter/server/router", + "platform": "backend", + "responsibility": "Assembles the legacy v1 HTTP API. router.go validates requests against the embedded OpenAPI 3 spec (kin-openapi openapi3/openapi3filter) and wires per-domain httpdriver/httphandler packages (customer, billing, credit, entitlement v1+v2, meter, meterevent, ingest, ledger/customerbalance, llmcost, notification, portal, productcatalog/addon/plan/feature, app/stripe/custominvoicing, subject, subscription, debug, info) into Chi routes implementing the generated api.ServerInterface from api/api.gen.go. The sibling openmeter/server holds CORS + server lifecycle.", + "depends_on": [ + "api", + "api/v3/handlers/currencies", + "app/config", + "openmeter/customer", + "openmeter/billing", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/ledger", + "(all domain httpdriver packages)" + ], + "exposes_to": [ + "cmd/server", + "openmeter/server" + ], + "key_interfaces": [ + { + "name": "Router", + "methods": [ + "(implements api.ServerInterface generated from legacy TypeSpec)" + ], + "description": "Chi router validating against embedded OpenAPI3 spec and delegating to domain httpdrivers" + } + ], + "key_files": [ + { + "file": "openmeter/server/router/router.go", + "description": "Legacy v1 router; OpenAPI3 request validation + per-domain httpdriver wiring" + }, + { + "file": "openmeter/server/server.go", + "description": "Server lifecycle" + }, + { + "file": "openmeter/server/router/billing.go", + "description": "Billing route registrations" + }, + { + "file": "openmeter/server/router/subscription.go", + "description": "Subscription route registrations" + } + ], + "kind": "lib", + "group": "openmeter" + }, + { + "name": "v3 API layer (AIP-style)", + "location": "api/v3", + "platform": "backend", + "responsibility": "Newer Google-AIP-style HTTP API. api.gen.go is the oapi-codegen-generated ServerInterface; server/routes.go implements every operation as a thin method delegating to a per-resource handler (e.g. s.metersHandler.CreateMeter().With(meterId).ServeHTTP). handlers/ holds one package per resource (meters, events, customers + nested billing/charges/credits/entitlementaccess, subscriptions, apps, billingprofiles, taxcodes, currencies, features, featurecost, llmcost, plans, addons) each defining a Handler interface + struct with New(resolveNamespace, service, options...) returning httptransport handlers. filters/ implements AIP query-param filtering; apierrors/, render/, request/, response/, oasmiddleware/ are shared HTTP plumbing. Not all generated operations are implemented: credits operations are gated on Credits.Enabled and delegate to api.Unimplemented otherwise; CreateCreditAdjustment and QueryGovernanceAccess are always unimplemented.", + "depends_on": [ + "api/v3 (generated)", + "openmeter/customer", + "openmeter/meter", + "openmeter/subscription", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/credit", + "openmeter/ledger", + "pkg/framework/transport/httptransport", + "pkg/framework/commonhttp" + ], + "exposes_to": [ + "openmeter/server/router", + "cmd/server" + ], + "key_interfaces": [ + { + "name": "v3 Server (meters)", + "methods": [ + "CreateMeter", + "GetMeter", + "ListMeters", + "UpdateMeter", + "DeleteMeter", + "QueryMeter (JSON + text/csv content negotiation)" + ], + "description": "Meter operations with CSV/JSON content negotiation in QueryMeter" + }, + { + "name": "v3 Server (customers)", + "methods": [ + "CreateCustomer", + "GetCustomer", + "ListCustomers", + "UpsertCustomer", + "DeleteCustomer", + "ListCustomerEntitlementAccess" + ], + "description": "Customer operations (Upsert, not Create+Update separately, on the id route)" + }, + { + "name": "v3 Server (subscriptions)", + "methods": [ + "CreateSubscription", + "ListSubscriptions", + "GetSubscription", + "CancelSubscription", + "UnscheduleCancelation", + "ChangeSubscription" + ], + "description": "Subscription lifecycle (no Delete; cancel/unschedule/change instead)" + }, + { + "name": "v3 Server (plans)", + "methods": [ + "ListPlans", + "CreatePlan", + "GetPlan", + "UpdatePlan", + "DeletePlan", + "ArchivePlan", + "PublishPlan" + ], + "description": "Plan lifecycle including Archive/Publish state transitions" + }, + { + "name": "v3 Server (credits, gated)", + "methods": [ + "GetCustomerCreditBalance", + "ListCreditGrants", + "CreateCreditGrant", + "GetCreditGrant", + "UpdateCreditGrantExternalSettlement", + "ListCreditTransactions" + ], + "description": "Credit operations that short-circuit to Unimplemented when Credits.Enabled is false or services are nil" + }, + { + "name": "customers.Handler", + "methods": [ + "ListCustomers", + "CreateCustomer", + "DeleteCustomer", + "GetCustomer", + "UpsertCustomer" + ], + "description": "Per-resource handler interface; struct holds resolveNamespace func + service + httptransport options" + } + ], + "key_files": [ + { + "file": "api/v3/server/routes.go", + "description": "v3 ServerInterface impl: thin delegators to per-resource handlers with explicit unimplemented/feature-gated operations" + }, + { + "file": "api/v3/handlers/customers/handler.go", + "description": "Customers Handler interface + New(resolveNamespace, service, options) constructor" + }, + { + "file": "api/v3/api.gen.go", + "description": "oapi-codegen-generated v3 server interface (DO NOT EDIT)" + }, + { + "file": "api/v3/filters", + "description": "AIP query-parameter filtering" + }, + { + "file": "api/v3/apierrors", + "description": "Shared v3 error rendering" + } + ], + "kind": "lib", + "group": "api" + }, + { + "name": "Generated API contract & v1 server interface", + "location": "api", + "platform": "shared", + "responsibility": "Top-level api package (43 in-edges): api.gen.go is the oapi-codegen-generated legacy v1 ServerInterface + types; convert.gen.go/convert.go are goverter type converters; openapi.yaml + openapi.cloud.yaml are the generated OpenAPI specs (from TypeSpec); types/ holds shared API types. Consumed by both the legacy router and v3. This package is the Go-side boundary of the TypeSpec\u2192OpenAPI\u2192Go generation chain.", + "depends_on": [ + "pkg/models" + ], + "exposes_to": [ + "openmeter/server/router", + "api/v3", + "openmeter/*/httpdriver" + ], + "key_interfaces": [ + { + "name": "api.ServerInterface", + "methods": [ + "(all v1 operations generated from legacy TypeSpec)" + ], + "description": "Generated legacy v1 server contract" + } + ], + "key_files": [ + { + "file": "api/api.gen.go", + "description": "oapi-codegen-generated v1 server interface + types (DO NOT EDIT)" + }, + { + "file": "api/openapi.yaml", + "description": "Generated OpenAPI spec (DO NOT EDIT)" + }, + { + "file": "api/convert.go", + "description": "goverter converter interface for API types" + } + ], + "kind": "lib", + "group": "api" + }, + { + "name": "TypeSpec API specification", + "location": "api/spec", + "platform": "shared", + "responsibility": "Node/pnpm workspace authoring the API contract in TypeSpec, the source of truth for OpenAPI. Two packages under packages/: legacy/ (src/main.tsp + auth/errors/debug/events/meters/filter/portal/subjects/rest/query/types.tsp and an app/ subtree) drives the v1 API; aip/ (src/main.tsp, openmeter.tsp, konnect.tsp, test.tsp) drives the Google-AIP-style v3 API. Each package also ships compiled JS libs (lib/index.js with custom AIP/legacy lint rules under lib/rules). Generation orchestrated by Makefile + pnpm scripts (generate/format/lint).", + "depends_on": [], + "exposes_to": [ + "api" + ], + "key_interfaces": [ + { + "name": "legacy TypeSpec", + "methods": [], + "description": "main.tsp composing auth/errors/events/meters/portal/subjects modules for v1" + }, + { + "name": "aip TypeSpec", + "methods": [], + "description": "main.tsp + openmeter.tsp defining the AIP-style v3 surface" + } + ], + "key_files": [ + { + "file": "api/spec/packages/legacy/src/main.tsp", + "description": "Legacy v1 API TypeSpec root" + }, + { + "file": "api/spec/packages/aip/src/main.tsp", + "description": "AIP-style v3 API TypeSpec root" + }, + { + "file": "api/spec/packages/aip/src/openmeter.tsp", + "description": "v3 OpenMeter resource definitions" + }, + { + "file": "api/spec/pnpm-workspace.yaml", + "description": "pnpm workspace tying the two spec packages together" + } + ], + "kind": "lib", + "group": "api" + }, + { + "name": "JavaScript/TypeScript SDK", + "location": "api/client/javascript", + "platform": "web-frontend", + "responsibility": "Published @openmeter/sdk npm package. src/client/index.ts builds an openapi-fetch typed client (paths from generated schemas.js, encodeDates helper) and composes per-resource wrapper classes (Addons, Apps, Billing, Customers, Debug, Entitlements + EntitlementsV2, Events, Features, Info, Meters, Notifications, Plans, Portal, Subjects, SubscriptionAddons, Subscriptions). src/portal/ is a separate portal client; src/zod/ provides Zod schemas; src/react/context.tsx provides a React context (react is a peerDependency). Generated via orval (orval.config.ts) from the OpenAPI spec; built/tested with biome + vitest.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "OpenMeter client", + "methods": [ + "Addons", + "Apps", + "Billing", + "Customers", + "Debug", + "Entitlements", + "EntitlementsV2", + "Events", + "Features", + "Info", + "Meters", + "Notifications", + "Plans", + "Portal", + "Subjects", + "SubscriptionAddons", + "Subscriptions" + ], + "description": "Typed openapi-fetch client composing per-resource wrapper classes" + } + ], + "key_files": [ + { + "file": "api/client/javascript/src/client/index.ts", + "description": "Main SDK client composing per-resource wrappers over openapi-fetch" + }, + { + "file": "api/client/javascript/index.ts", + "description": "Package entrypoint re-exporting the client" + }, + { + "file": "api/client/javascript/src/react/context.tsx", + "description": "React context provider (react peerDependency)" + }, + { + "file": "api/client/javascript/orval.config.ts", + "description": "orval codegen config generating the client from OpenAPI" + } + ], + "kind": "lib", + "group": "api" + }, + { + "name": "Python SDK", + "location": "api/client/python", + "platform": "shared", + "responsibility": "Published `openmeter` Poetry package (Apache-2.0), a corehttp-based client supporting sync + async usage (examples/sync, examples/async). Depends on isodate, corehttp[requests,aiohttp], cloudevents, urllib3. Generated client code from the OpenAPI spec; not imported by the Go backend.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "OpenMeter Python client", + "methods": [ + "(sync + async usage-metering client operations)" + ], + "description": "corehttp-based generated client" + } + ], + "key_files": [ + { + "file": "api/client/python/pyproject.toml", + "description": "Poetry package definition + dependencies" + }, + { + "file": "api/client/python/examples/sync", + "description": "Synchronous client usage examples" + }, + { + "file": "api/client/python/examples/async", + "description": "Asynchronous client usage examples" + } + ], + "kind": "lib", + "group": "api" + }, + { + "name": "Collector (Benthos/Redpanda Connect)", + "location": "collector", + "platform": "backend", + "responsibility": "Separate Go module + binary that streams external usage events into OpenMeter. cmd/main.go runs a Benthos (Redpanda Connect) CLI assembled from registered plugins: benthos/input, benthos/output, benthos/bloblang (custom bloblang mapping plugins), benthos/services/leaderelection (Kubernetes-style leader election CLI opts), plus benthos/presets and benthos/internal. Pulls in redpanda-data/benthos v4 + connect free bundle. Independent go.mod, so not part of the root module's import graph.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "collector main", + "methods": [ + "main" + ], + "description": "Runs the Benthos CLI with leader-election opts and registered input/output/bloblang plugins" + } + ], + "key_files": [ + { + "file": "collector/cmd/main.go", + "description": "Benthos CLI entrypoint registering OpenMeter input/output/bloblang plugins + leader election" + }, + { + "file": "collector/benthos/input", + "description": "Custom Benthos input plugins" + }, + { + "file": "collector/benthos/output", + "description": "Custom Benthos output plugins" + }, + { + "file": "collector/benthos/services/leaderelection", + "description": "Leader-election service for HA collector deployments" + } + ], + "kind": "app", + "group": "collector" + }, + { + "name": "Shared utility packages (pkg/)", + "location": "pkg", + "platform": "shared", + "responsibility": "Cross-cutting Go utilities, several of which are the codebase's biggest dependency magnets: pkg/models (229 in-edges) holds shared domain models + the NewNillableGenericValidationError error aggregation used by Validate() methods; pkg/pagination (119 in-edges); pkg/clock (100 in-edges, FreezeTime/UnFreeze test helpers); pkg/currencyx (91, currency.Code type used in ent schema); pkg/timeutil (82); pkg/framework/entutils (74, Ent mixins + TransactingRepo + TxDriver transaction helpers); pkg/framework/transaction (70, transaction.Driver); pkg/datetime (65); pkg/framework/commonhttp (63, GetMediaType); pkg/filter (53); pkg/framework/transport/httptransport (47, the .With().ServeHTTP handler abstraction used by v3). Also kafka, redis, log, otelx, lockr, models, set, slicesx, sortx, strcase, treex, etc.", + "depends_on": [], + "exposes_to": [ + "openmeter/*", + "api/*", + "cmd/*", + "app/*" + ], + "key_interfaces": [ + { + "name": "models", + "methods": [ + "NewNillableGenericValidationError" + ], + "description": "Validation error aggregation wrapping errors.Join, the project-standard Validate() return" + }, + { + "name": "entutils", + "methods": [ + "TransactingRepo", + "TransactingRepoWithNoValue", + "NewTxDriver", + "ResourceMixin", + "CustomerAddressMixin", + "AnnotationsMixin" + ], + "description": "Ent transaction helpers + shared schema mixins" + }, + { + "name": "httptransport", + "methods": [ + "(.With(params).ServeHTTP handler abstraction + HandlerOption)" + ], + "description": "Generic typed HTTP handler used throughout v3 handlers" + }, + { + "name": "clock", + "methods": [ + "FreezeTime", + "UnFreeze" + ], + "description": "Mockable clock for tests" + } + ], + "key_files": [ + { + "file": "pkg/models", + "description": "Shared domain models + validation error helpers (229 in-edges)" + }, + { + "file": "pkg/framework/entutils", + "description": "Ent mixins + transaction-aware repo helpers" + }, + { + "file": "pkg/framework/transaction", + "description": "transaction.Driver abstraction" + }, + { + "file": "pkg/framework/transport/httptransport", + "description": "Typed HTTP handler abstraction used by v3" + }, + { + "file": "pkg/clock", + "description": "Mockable clock with FreezeTime/UnFreeze" + } + ], + "kind": "lib", + "group": "pkg" + }, + { + "name": "Database migrations", + "location": "tools/migrate", + "platform": "backend", + "responsibility": "Migration tooling and SQL files. migrations/ holds golang-migrate-format timestamped .up.sql/.down.sql pairs plus atlas.sum, generated from Ent schema diffs via `atlas migrate --env local diff ` (atlas.hcl points schema source at ent://openmeter/ent/schema). cmd/viewgen/main.go is a generator for Ent views (which don't auto-appear in generated migrate metadata). Migrations run on startup when postgres.autoMigrate is ent or migration.", + "depends_on": [ + "openmeter/ent/schema" + ], + "exposes_to": [ + "cmd/server" + ], + "key_interfaces": [ + { + "name": "viewgen", + "methods": [ + "main" + ], + "description": "Generates SQL for Ent ent.View schemas that Atlas diff omits" + } + ], + "key_files": [ + { + "file": "tools/migrate/cmd/viewgen/main.go", + "description": "Ent view DDL generator" + }, + { + "file": "tools/migrate/migrations", + "description": "Timestamped golang-migrate SQL files + atlas.sum" + } + ], + "kind": "app", + "group": "tools" + } + ] + }, + "architecture_rules": { + "file_placement_rules": [ + { + "component_type": "Domain service interface", + "naming_pattern": ".go / service.go / connector.go in the domain root package", + "location": "openmeter//", + "example": "openmeter/billing/invoice.go declares billing.Service; openmeter/streaming/connector.go declares streaming.Connector", + "description": "Domain root packages declare interfaces (Service/Adapter/Connector/Repository) and value models; implementations live in nested subpackages. Confirmed by reading billing, customer, streaming, notification, entitlement." + }, + { + "component_type": "Service implementation", + "naming_pattern": "service/service.go with a Service struct + Config{...} + Config.Validate() + New(Config)", + "location": "openmeter//service/", + "example": "openmeter/billing/service/service.go (Service struct, Config with per-field non-nil Validate); openmeter/notification/service/service.go follows the same shape", + "description": "Concrete services live in a service/ subpackage, take a Config struct of injected dependencies, validate each is non-nil in Config.Validate(), and assert interface satisfaction via `var _ billing.Service = (*Service)(nil)`. Loggers are injected, never slog.Default()." + }, + { + "component_type": "Persistence adapter", + "naming_pattern": "adapter/adapter.go with an adapter struct holding *entdb.Client + Tx/WithTx/Self", + "location": "openmeter//adapter/", + "example": "openmeter/billing/adapter/adapter.go implements billing.Adapter with HijackTx/WithTx; openmeter/customer/adapter follows suit", + "description": "Ent persistence is isolated in adapter/ packages that hold *entdb.Client and implement transaction hijacking (Tx returns a transaction.Driver; WithTx rebuilds the adapter from the tx config). Confirmed in billing/adapter/adapter.go." + }, + { + "component_type": "Legacy v1 HTTP layer", + "naming_pattern": "httpdriver/ or httphandler/ co-located inside the domain package", + "location": "openmeter//httpdriver/ (or httphandler/)", + "example": "openmeter/customer/httpdriver, openmeter/meter/httphandler, openmeter/notification/httpdriver \u2014 all imported by openmeter/server/router/router.go", + "description": "The legacy v1 API keeps HTTP handlers co-located with each domain as httpdriver/httphandler packages, assembled in openmeter/server/router/router.go. Confirmed by router.go imports." + }, + { + "component_type": "v3 HTTP handler", + "naming_pattern": "handlers//{handler.go,.go,convert.gen.go} with Handler interface + New(resolveNamespace, service, options...)", + "location": "api/v3/handlers//", + "example": "api/v3/handlers/customers/handler.go (Handler interface, handler struct, New); per-operation files create.go/get.go/list.go/delete.go/upsert.go", + "description": "The v3 API centralizes handlers under api/v3/handlers/, one package per resource (nested for sub-resources e.g. customers/charges, customers/credits). Each exposes a Handler interface returning httptransport handlers; routes in api/v3/server/routes.go delegate via .With(params).ServeHTTP. Confirmed in customers/handler.go + routes.go." + }, + { + "component_type": "Type conversion", + "naming_pattern": "convert.go (goverter interface) \u2192 convert.gen.go (generated); derived.gen.go (goderive)", + "location": "alongside the package that owns the types (api/, openmeter/billing/, api/v3/handlers/customers/)", + "example": "api/convert.go + api/convert.gen.go; openmeter/billing/derived.gen.go; api/v3/handlers/customers/convert.gen.go", + "description": "Domain\u2194API\u2194DB conversions use goverter (*.convert.go \u2192 convert.gen.go) and goderive (derived.gen.go). Generated files carry DO-NOT-EDIT headers. Confirmed by file listings in api/ and billing/." + }, + { + "component_type": "Unit / integration tests", + "naming_pattern": "_test.go co-located with source; cross-domain integration suites under test//", + "location": "co-located in each package AND top-level test/ (test/billing, test/customer, test/entitlement, test/subscription, test/credits, test/notification, test/app)", + "example": "openmeter/billing/charges/service/usagebased_test.go (co-located); test/billing (shared billing integration harness imported by charges/service tests)", + "description": "Most tests are co-located *_test.go files. Heavier cross-cutting integration suites and shared harnesses live under a top-level test/ tree organized by domain; e.g. test/billing is imported by openmeter/billing/charges/service/*_test.go and subscriptionsync/service/base_test.go." + }, + { + "component_type": "End-to-end tests", + "naming_pattern": "_test.go + docker-compose.*.yaml in e2e/", + "location": "e2e/", + "example": "e2e/e2e_test.go, e2e/addons_v3_test.go, e2e/customer_credits_v3_test.go, e2e/entitlement_parity_test.go, e2e/docker-compose.infra.yaml", + "description": "HTTP-over-the-wire e2e tests run against a live server defined by docker-compose files in e2e/, separate from the in-process integration tests in test/. Confirmed by e2e/ listing." + }, + { + "component_type": "Ent schema (DB source of truth)", + "naming_pattern": ".go with a struct embedding ent.Schema + Mixin()/Fields()/Edges()", + "location": "openmeter/ent/schema/", + "example": "openmeter/ent/schema/customer.go (Customer ent.Schema, ResourceMixin + CustomerAddressMixin + AnnotationsMixin)", + "description": "Hand-written Ent schemas are the DB source of truth; generated client goes to openmeter/ent/db (DO NOT EDIT). Schemas reuse mixins from pkg/framework/entutils. Confirmed by customer.go." + }, + { + "component_type": "DI / wiring providers", + "naming_pattern": "one wire.NewSet provider-set file per subsystem", + "location": "app/common/", + "example": "app/common/billing.go (var Billing = wire.NewSet(...)), app/common/ledger.go, app/common/openmeter_server.go", + "description": "Google Wire provider sets live in app/common, one file per subsystem; per-binary Application structs assembled in openmeter_.go files. Wire-generated output is wire_gen.go (DO NOT EDIT). Confirmed by billing.go." + }, + { + "component_type": "Service entrypoints", + "naming_pattern": "cmd//main.go", + "location": "cmd/", + "example": "cmd/server/main.go, cmd/billing-worker/main.go, cmd/sink-worker/main.go", + "description": "Each binary is a cmd//main.go that shares the Viper config-load/validate boilerplate then calls a Wire-generated initialize. Confirmed by server + billing-worker mains." + }, + { + "component_type": "SQL migrations", + "naming_pattern": "_.up.sql / .down.sql + atlas.sum", + "location": "tools/migrate/migrations/", + "example": "tools/migrate/migrations/*.up.sql generated by `atlas migrate --env local diff`", + "description": "Migrations are golang-migrate-format timestamped pairs generated from Ent schema diffs via Atlas (atlas.hcl). Stated in AGENTS.md and confirmed by directory listing." + } + ], + "naming_conventions": [ + { + "scope": "Go domain root packages", + "pattern": "single lowercase word matching the domain", + "examples": [ + "billing", + "customer", + "subscription", + "entitlement", + "streaming", + "notification", + "ledger", + "meter" + ], + "description": "Each domain root package is a single lowercase noun; verified across openmeter/ subdirectories." + }, + { + "scope": "Go implementation subpackages with import aliases", + "pattern": "package named service/adapter but imported with a domain-prefixed alias", + "examples": [ + "package billingservice in service/service.go imported as billingservice", + "package billingadapter in adapter/adapter.go", + "package customers in api/v3/handlers/customers" + ], + "description": "Implementation subpackages are physically named service/adapter but declare a domain-prefixed package name (billingservice, billingadapter) so call sites read unambiguously. Confirmed in billing service.go (package billingservice) and adapter.go (package billingadapter)." + }, + { + "scope": "Go interface-satisfaction assertions", + "pattern": "var _ = (*)(nil)", + "examples": [ + "var _ billing.Service = (*Service)(nil)", + "var _ billing.Adapter = (*adapter)(nil)", + "var _ notification.Service = (*Service)(nil)" + ], + "description": "Compile-time interface conformance is asserted with the blank-identifier pattern at the top of each implementation file. Confirmed in billing service.go, adapter.go, notification service.go." + }, + { + "scope": "Constructor + config", + "pattern": "type Config struct {...}; func (c Config) Validate() error; func New(config Config) (Iface, error)", + "examples": [ + "billingadapter.New(Config)", + "billingservice Config.Validate() returning errors.New per nil field", + "notification service New(Config)" + ], + "description": "Services/adapters take a Config struct, validate each dependency non-nil, and return via New(config). Confirmed in billing adapter.go and service.go and notification service.go." + }, + { + "scope": "Generated Go files", + "pattern": "*.gen.go and wire_gen.go and ent/db/ with `// Code generated ... DO NOT EDIT` header", + "examples": [ + "api/api.gen.go", + "api/v3/api.gen.go", + "openmeter/billing/derived.gen.go", + "openmeter/billing/service/convert.gen.go", + "wire_gen.go" + ], + "description": "All generated Go carries the canonical DO-NOT-EDIT header and a *.gen.go (or wire_gen.go / ent/db/) name. Confirmed across api/ and billing/." + }, + { + "scope": "Go test files", + "pattern": "_test.go co-located", + "examples": [ + "openmeter/billing/service/invoice_test.go", + "openmeter/subscription/patch_test.go", + "openmeter/entitlement/usageperiod_test.go" + ], + "description": "Tests follow Go's standard _test.go suffix co-located with the file under test. Verified across multiple domains." + }, + { + "scope": "TypeScript SDK files", + "pattern": "kebab-case modules, PascalCase exported wrapper classes", + "examples": [ + "src/client/subscription-addons.js exporting class SubscriptionAddons", + "src/client/index.ts", + "src/react/context.tsx" + ], + "description": "JS SDK source uses kebab-case filenames with PascalCase class exports (Subscriptions, SubscriptionAddons, EntitlementsV2). Confirmed in src/client/index.ts imports." + }, + { + "scope": "TypeSpec spec files", + "pattern": "lowercase .tsp under packages//src/", + "examples": [ + "api/spec/packages/legacy/src/meters.tsp", + "api/spec/packages/aip/src/openmeter.tsp", + "api/spec/packages/legacy/src/main.tsp" + ], + "description": "TypeSpec sources are lowercase feature-named .tsp files; each package has a main.tsp root. Confirmed by find of *.tsp." + }, + { + "scope": "Ent schema files", + "pattern": "snake_case or compound lowercase .go matching the entity", + "examples": [ + "openmeter/ent/schema/ledger_account.go", + "openmeter/ent/schema/balance_snapshot.go", + "openmeter/ent/schema/chargesusagebased.go", + "openmeter/ent/schema/customer.go" + ], + "description": "Ent schema filenames are lowercase, sometimes snake_case for multi-word entities (ledger_account, balance_snapshot, usage_reset) and sometimes run-together (chargesusagebased). Confirmed by ent/schema listing." + } + ] + }, + "workspace_topology": { + "type": "none", + "members": [ + { + "name": "openmeter", + "path": ".", + "role": "app" + }, + { + "name": "collector", + "path": "collector", + "role": "app" + }, + { + "name": "spec", + "path": "api/spec", + "role": "lib" + }, + { + "name": "python", + "path": "api/client/python", + "role": "lib" + }, + { + "name": "javascript", + "path": "api/client/javascript", + "role": "lib" + } + ], + "edges": [], + "cycles": [], + "dependency_magnets": [] + }, + "findings": [ + { + "problem_statement": "Production (non-test) service package openmeter/billing/worker/subscriptionsync/service forms an import cycle with the test/billing fixtures package and openmeter/billing/charges/service via test files, indicating cross-package test harnesses are tightly coupled to multiple production service packages.", + "evidence": [ + "openmeter/billing/worker/subscriptionsync/service/base_test.go imports billingtest \"github.com/openmeterio/openmeter/test/billing\"", + "test/billing/*.go imports subscriptionsyncservice \"github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service\"", + "openmeter/billing/charges/service/*_test.go (base_test.go, usagebased_test.go, creditpurchase_test.go, lineage_test.go, taxcode_test.go, featureid_test.go, gathering_preview_test.go, invoicable_test.go) import test/billing", + ".archie/dependency_graph.json cycle 3: ['openmeter/billing/charges/service','openmeter/billing/charges/testutils','openmeter/billing/worker/subscriptionsync/service','test/billing']" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warning", + "confidence": 0.85, + "applies_to": [ + "openmeter" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "Rating service subpackages openmeter/billing/rating/service, .../mutator, .../rate, and .../testutil form a 4-directory import cycle, with mutator and rate cross-importing each other and the service root.", + "evidence": [ + "openmeter/billing/rating/service/mutator/*.go imports \"github.com/openmeterio/openmeter/openmeter/billing/rating/service/rate\"", + "openmeter/billing/rating/service/rate/*.go imports \"github.com/openmeterio/openmeter/openmeter/billing/rating/service/testutil\"", + ".archie/dependency_graph.json cycle 2: ['openmeter/billing/rating/service','openmeter/billing/rating/service/mutator','openmeter/billing/rating/service/rate','openmeter/billing/rating/service/testutil']" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warning", + "confidence": 0.75, + "applies_to": [ + "openmeter" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "Two parallel HTTP API surfaces (legacy v1 in openmeter/server/router with per-domain httpdriver packages, and AIP-style v3 in api/v3 with centralized handlers) coexist and both delegate to the same domain services, creating two divergent handler conventions, two generated server interfaces, and partially-unimplemented v3 operations.", + "evidence": [ + "openmeter/server/router/router.go wires ~25 per-domain httpdriver/httphandler packages and implements api.ServerInterface from api/api.gen.go (legacy v1)", + "api/v3/server/routes.go implements a separate generated ServerInterface delegating to api/v3/handlers/* packages", + "api/v3/server/routes.go: CreateCreditAdjustment and QueryGovernanceAccess always call api.Unimplemented; GetCustomerCreditBalance/ListCreditGrants/CreateCreditGrant/etc. short-circuit to Unimplemented when s.Credits.Enabled is false", + "api/spec has two TypeSpec packages (legacy/ and aip/) generating the two surfaces" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.9, + "applies_to": [ + "openmeter", + "spec" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "The v3 customers list API exposes case-insensitive contains/ocontains filters on name, primary_email and key that compile to leading-wildcard ILIKE and cannot use the plain btree indexes on the customers table, forcing full sequential scans (plus a second seq-scan from Paginate's COUNT(*)).", + "evidence": [ + "openmeter/ent/schema/customer.go:42 \u2014 TODO(DoS hardening) comment describing the ILIKE seq-scan amplification and the missing pg_trgm GIN indexes", + "openmeter/ent/schema/customer.go:64 \u2014 index.Fields(\"name\") / index.Fields(\"primary_email\") are plain btree, unusable for leading-wildcard ILIKE" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "openmeter/ent/schema/customer.go", + "api/v3/filters/filter.go", + "api/v3/handlers/customers/list.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "CustomerSubjects.subject_key has no foreign key to Subject.key, so a customer can be linked to a subject key that does not exist as a Subject row (referential integrity is unenforced at the DB level).", + "evidence": [ + "openmeter/ent/schema/customer.go:147 \u2014 FIXME: enable foreign key constraints; Ent doesn't support FK on non-ID fields (https://github.com/ent/ent/issues/2549)" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/customer.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "ent.View-declared schemas (ChargesSearchV1) generate query code but do not appear in the generated migrate.Tables list, so the view's DDL is not produced by `atlas migrate diff` and must be created/maintained via hand-written SQL migrations \u2014 a silent drift risk between the Go view definition and the actual database view.", + "evidence": [ + "openmeter/ent/schema/charges.go:48 \u2014 ChargesSearchV1 declared as ent.View", + "AGENTS.md 'Ent view caveat' \u2014 views do not appear in openmeter/ent/db/migrate/schema.go or migrate.Tables" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warn", + "confidence": 0.75, + "applies_to": [ + "openmeter/ent/schema/charges.go", + "tools/migrate/migrations" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "LedgerBreakageRecord and LedgerSubAccountRoute store cross-entity references (transaction/sub-account/plan ids, currency, tax_code) as plain char(26)/text columns with no foreign keys, so referential integrity of these accounting-projection rows is not enforced by the database.", + "evidence": [ + "openmeter/ent/schema/ledger_breakage_record.go:19 \u2014 comment: breakage records intentionally keep ledger references as plain IDs (projection rows, not source of truth)", + "openmeter/ent/schema/ledger_account.go:117 \u2014 currency/tax_code are literal routing values denormalized from routing_key, not FKs" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/ledger_breakage_record.go", + "openmeter/ent/schema/ledger_account.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "BillingInvoiceLine and several billing/discount tables carry Deprecated columns (line_ids, type, quantity, pre_line_period_quantity, split-line-group tax_config/tax_code_id/tax_behavior) that are still physically present, indicating an in-progress, unfinished schema migration where old and new columns coexist.", + "evidence": [ + "openmeter/ent/schema/billing.go:416 \u2014 line_ids Deprecated('invoice discounts are deprecated, use line_discounts instead')", + "openmeter/ent/schema/billing.go:793 \u2014 discount type/quantity Deprecated due to split of amount and usage discount tables", + "openmeter/ent/schema/billing.go:631 \u2014 split line group tax fields Deprecated", + "openmeter/ent/schema/billing.go:1170 \u2014 schema_level field tracks an in-progress invoice-line migration" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/billing.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "ClickHouse usage-event tables have no in-repo migration tooling: schema evolves only through the idempotent CREATE TABLE IF NOT EXISTS path and ad-hoc ALTERs, so a column added to the RawEvent Go struct without a matching Define()/ALTER will silently diverge from existing per-namespace tables.", + "evidence": [ + "openmeter/streaming/clickhouse/event_query.go:20 \u2014 createEventsTable.toSQL builds CREATE TABLE ... IF NOT EXISTS with hand-listed Define() columns", + "openmeter/streaming/connector.go:24 \u2014 RawEvent struct is the Go-side shape with no migration coupling" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.65, + "applies_to": [ + "openmeter/streaming/clickhouse/event_query.go", + "openmeter/streaming/connector.go" + ], + "source": "scan:data", + "depth": "draft" + } + ], + "communication": { + "patterns": [ + { + "name": "Wire compile-time dependency injection", + "when_to_use": "Wiring a new domain service, adapter, hook, or worker into a binary's object graph", + "how_it_works": "Each binary (cmd/server, cmd/billing-worker, etc.) declares a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets. Providers are plain constructor functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService)). `make generate` runs wire to emit wire_gen.go which call the constructors in dependency order. Constructors take explicit deps (logger, *entdb.Client, eventbus.Publisher) and return (Service, error); they never reach for globals.", + "examples": [ + "cmd/server/wire.go", + "app/common/customer.go", + "app/common/app.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Service / Adapter layered package with Config-validating constructor", + "when_to_use": "Creating or extending any domain package under openmeter/ (billing, customer, entitlement, subscription, notification, ledger, charges, app)", + "how_it_works": "A package exposes a Service interface and an Adapter interface in its root. The service struct (openmeter/customer/service) holds the adapter plus collaborators; the adapter struct (openmeter/customer/adapter) holds *entdb.Client. Both have a New(config) constructor whose Config has a Validate() error checked first thing in New \u2014 returning errors instead of panicking. The service var-asserts the interface: `var _ customer.Service = (*Service)(nil)`.", + "examples": [ + "openmeter/customer/service/service.go", + "openmeter/customer/adapter/adapter.go", + "app/common/customer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Transaction-aware Ent repository (TransactingRepo / HijackTx WithTx)", + "when_to_use": "Any adapter method that reads or writes via Ent and must participate in a caller-supplied transaction", + "how_it_works": "The adapter implements entutils.TxCreator (Tx() hijacks an Ent tx into the context) and TxUser (WithTx rebuilds the adapter bound to the tx client from raw config; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}): if a tx driver is already on the context it rebinds to it, otherwise it runs on the base client. transaction.Run(ctx, creator, cb) opens/commits/rolls-back and stores the driver on context; nested Run calls reuse the existing driver and emit savepoints.", + "examples": [ + "pkg/framework/entutils/transaction.go", + "pkg/framework/transaction/transaction.go", + "openmeter/customer/adapter/adapter.go" + ], + "applicable_when": "pkg/framework/entutils/transaction.go:199 TransactingRepo only rebinds when a *TxDriver is found on ctx, else falls back to repo.Self() \u2014 applies to adapter helpers whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator", + "do_not_apply_when": [ + "Helper accepts a raw *entdb.Client argument instead of reading the tx from ctx \u2014 per AGENTS.md the charges adapter convention still requires wrapping such helpers with entutils.TransactingRepo so they rebind to the ctx tx; passing a non-tx client silently writes outside the caller's transaction", + "Pure in-memory adapter with no Ent client (e.g. app marketplace registry map in openmeter/app/adapter/marketplace.go:120) \u2014 there is no transaction to join" + ], + "scope": [] + }, + { + "name": "Postgres transaction-scoped advisory lock (lockr)", + "when_to_use": "Serializing concurrent business operations that span multiple rows/tables for one logical entity, e.g. all subscription mutations for a customer or all charge advances for a customer", + "how_it_works": "lockr.NewKey(scopes...) builds a colon-joined scope string, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx. The lock auto-releases on commit/rollback. getTxClient first asserts the call is inside a real postgres tx (transaction_timestamp() != statement_timestamp()) and errors otherwise. Domain code wraps the key behind a typed helper such as subscription.GetCustomerLock(customerId) = NewKey(\"customer\", customerId, \"subscription\").", + "examples": [ + "pkg/framework/lockr/locker.go", + "pkg/framework/lockr/key.go", + "openmeter/subscription/locks.go", + "openmeter/subscription/service/service.go" + ], + "applicable_when": "The lock-key identity component must be a globally-unique row identifier. subscription.GetCustomerLock (openmeter/subscription/locks.go:6) keys on the customer id, and customer ids are PK-unique via the IDMixin `field.String(\"id\").Unique()` + `index.Fields(\"namespace\",\"id\").Unique()` declared in pkg/framework/entutils/mixins.go:90-104,77 \u2014 so one (\"customer\", id, scope) key maps to exactly one customer and the advisory lock serializes only that customer's operations", + "do_not_apply_when": [ + "Caller would key the lock on a non-unique column \u2014 e.g. customer `key` is only unique under namespace+deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62) not globally; a lock keyed on raw `key` could serialize unrelated customers across namespaces or collide a live row with a soft-deleted one", + "Caller is not inside a postgres transaction \u2014 lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails", + "Operation mutates exactly one row and needs no cross-row invariant \u2014 Ent SELECT ... FOR UPDATE row locking suffices and avoids two distinct scope strings colliding into the same 64-bit advisory slot" + ], + "scope": [ + "subscription", + "entitlement", + "billing", + "ledger" + ] + }, + { + "name": "Service hook registry (ServiceHookRegistry)", + "when_to_use": "Letting one domain react to another domain's lifecycle events in-process (e.g. provision a ledger account when a customer is created, sync a customer when a subject is created)", + "how_it_works": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common build the hook implementation and call targetService.RegisterHooks(h) at startup; when the feature is disabled the provider returns a Noop hook instead (e.g. NewCustomerLedgerServiceHook returns ledgerresolvers.NoopCustomerLedgerHook{} when creditsConfig.Enabled is false). Hooks fire synchronously inside the producing service's flow.", + "examples": [ + "openmeter/customer/service/service.go", + "app/common/customer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "In-process event bus over Watermill CQRS (eventbus.Publisher)", + "when_to_use": "Emitting domain events (ingest, balance-worker, system events) to Kafka for asynchronous workers to consume", + "how_it_works": "eventbus.New wraps a watermill cqrs.EventBus. Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix: ingest-subsystem-prefixed events to IngestEventsTopic, balance-worker-prefixed to BalanceWorkerEventsTopic, everything else to SystemEventsTopic. Producers call publisher.WithContext(ctx).PublishIfNoError(event, err) to inline publish-or-propagate. nil events are intentionally dropped (a handler returning nil means 'publish nothing').", + "examples": [ + "openmeter/watermill/eventbus/eventbus.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Kafka consumer via Watermill grouphandler (type-routed event dispatch)", + "when_to_use": "Building a worker (notification, billing-worker, balance-worker) that consumes CloudEvents off Kafka and fans them to per-event-type handlers", + "how_it_works": "grouphandler.NewNoPublishingHandler builds a map[eventName][]GroupEventHandler. On each message it derives the CloudEvent type via the marshaler, looks up handlers, unmarshals once into handler[0].NewEvent(), and runs all matching handlers joining their errors. Unknown event types are counted as 'ignored' and ack'd (return nil), not failed. Per-message processing time and status counters are emitted to OpenTelemetry.", + "examples": [ + "openmeter/watermill/grouphandler/grouphandler.go", + "openmeter/notification/consumer/consumer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Explicit finite state machine (qmuntal/stateless) with external storage", + "when_to_use": "Modeling the invoice lifecycle and per-charge UBP lifecycle where transitions are guarded and have side effects", + "how_it_works": "stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (the invoice/charge), not in the FSM. Each state is Configure'd with Permit(trigger, targetState) edges, guarded variants PermitDynamic(trigger, target, guardFn), and OnActive side-effect callbacks composed via statelessx.AllOf/BoolFn. The invoice machine is pooled (sync.Pool, invoiceStateMachineCache) and reset per use. The charges machine is a generic Machine[CHARGE, BASE, STATUS] driven by AdvanceUntilStateStable and a Persistence{UpdateBase, Refetch} struct, accumulating invoiceupdater.Patch side effects.", + "examples": [ + "openmeter/billing/service/stdinvoicestate.go", + "openmeter/billing/charges/statemachine/machine.go" + ], + "applicable_when": "openmeter/billing/charges/statemachine/machine.go:16 the STATUS type parameter is constrained `~string` + Validate() error, and machine.go:39 requires CHARGE to implement ChargeLike (GetStatus/WithStatus/GetBase/WithBase) \u2014 applies to charge aggregates that carry their status as a string enum and can rebuild themselves with a new status", + "do_not_apply_when": [ + "State is not externally owned by the aggregate \u2014 these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the domain object; an in-memory-state FSM would not persist transitions across the request", + "A transition has no guard and no side effect and the type has only two states \u2014 a plain bool/enum field is simpler than configuring a stateless machine" + ], + "scope": [ + "billing", + "charges" + ] + }, + { + "name": "In-memory map registry with type-asserted factory dispatch (app marketplace)", + "when_to_use": "Pluggable app integrations (Stripe, custom-invoicing, sandbox) registered at startup and instantiated on demand by type", + "how_it_works": "The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate types and validates the listing. Install operations look up the RegistryItem and type-assert the Factory to the capability interface actually requested (Factory.(app.AppFactoryInstallWithAPIKey) vs Factory.(app.AppFactoryInstall)), returning a GenericValidationError if the app doesn't support that install method.", + "examples": [ + "openmeter/app/adapter/marketplace.go", + "openmeter/app/registry.go", + "openmeter/app/marketplace.go", + "openmeter/app/stripe/service/service.go" + ], + "applicable_when": "openmeter/app/adapter/marketplace.go:121 RegisterMarketplaceListing rejects a second registration of the same AppType \u2014 applies to integration factories that register exactly once per process at wiring time; the map is the single source of installable app types and capability support is discovered by interface type-assertion on Factory", + "do_not_apply_when": [ + "Registration happens after the listing surface is already serving requests \u2014 the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live" + ], + "scope": [ + "app" + ] + }, + { + "name": "Per-subtype connector dispatch behind a single Service (entitlement)", + "when_to_use": "A service whose behavior branches by an enum subtype (metered / static / boolean entitlements) where each subtype has its own logic implementation", + "how_it_works": "entitlement.SubTypeConnector is implemented three times (metered/static/boolean connector.go). The aggregate service holds all three as fields and getTypeConnector(typed) switches on EntitlementType to return the right connector, returning an error in the default case. Sub-type-specific create/value logic is delegated to the selected connector while the umbrella service owns shared concerns.", + "examples": [ + "openmeter/entitlement/entitlement_types.go", + "openmeter/entitlement/service/service.go", + "openmeter/entitlement/metered/connector.go" + ], + "applicable_when": "openmeter/entitlement/service/service.go:424 getTypeConnector switches over the closed EntitlementType set declared in openmeter/entitlement/entitlement.go:331 (Values()={metered,static,boolean}) with a default-error arm \u2014 applies when adding behavior keyed on an entitlement subtype; a new EntitlementType value MUST also get a SubTypeConnector field + switch arm or it falls through to the default error", + "do_not_apply_when": [ + "The branching value is open/user-defined rather than the fixed EntitlementType enum \u2014 a closed switch with a default-error arm would reject legitimate values" + ], + "scope": [ + "entitlement" + ] + }, + { + "name": "Generic HTTP handler pipeline (httptransport.Handler[Request,Response])", + "when_to_use": "Implementing a v1 HTTP endpoint: decode request -> call service -> encode response, with consistent error encoding", + "how_it_works": "httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts) builds a typed handler. Per-domain httpdriver packages compose a decoder (request -> typed Request), the service call, and an encoder, plus an errorEncoder that maps domain error types to status codes. Handlers can be Chain'd with operation.Middleware.", + "examples": [ + "pkg/framework/transport/httptransport/handler.go", + "openmeter/notification/httpdriver/handler.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Domain-error to HTTP-status mapping via typed error encoders", + "when_to_use": "Translating service-layer errors into HTTP responses (RFC7807 problem documents)", + "how_it_works": "Two complementary mechanisms. (1) Per-handler errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T](ctx, status, err, w) \u2014 ordered short-circuit on errors.As against concrete domain error types (e.g. notification.NotFoundError->404, GenericValidationError->400, UpdateAfterDeleteError->409). (2) Generic errors carry an HTTP status as a ValidationIssue attribute (openmeter.http.status_code); commonhttp.HandleIssueIfHTTPStatusKnown maps it but only when all issues agree on a single status ('singular' behavior), else declines. The v3 surface mirrors the same singular logic in apierrors.NewV3ErrorHandlerFunc, rendering v3 BaseAPIError shapes.", + "examples": [ + "pkg/framework/commonhttp/errors.go", + "openmeter/notification/httpdriver/errors.go", + "api/v3/apierrors/handler.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Accumulating Validate() with NillableGenericValidationError", + "when_to_use": "Validating any input struct or domain config", + "how_it_works": "Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf(\"field: %w\", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil. Simpler single-field checks return models.NewGenericValidationError(...) directly. The generic validation error maps to HTTP 400 at the edge.", + "examples": [ + "openmeter/app/marketplace.go", + "pkg/models/errors.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Goverter / Goderive code-generated type converters", + "when_to_use": "Translating between domain, API, and DB representations without hand-writing boilerplate mappers", + "how_it_works": "convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations. Hand-written conversion files/functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the /go-types-conversion skill). Never edit *.gen.go (Code generated ... DO NOT EDIT header).", + "examples": [ + "openmeter/customer/adapter/entitymapping.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Svix-backed webhook delivery behind a Handler interface", + "when_to_use": "Delivering notification events to customer-configured HTTP endpoints", + "how_it_works": "notification/webhook defines a Handler interface (CreateWebhook, UpdateWebhook, endpoint secret/header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. The notification event pipeline reconciles delivery state via eventhandler/reconcile.go.", + "examples": [ + "openmeter/notification/webhook/svix/webhook.go", + "openmeter/notification/webhook/noop/noop.go", + "openmeter/notification/eventhandler/reconcile.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Ent schema mixins for cross-cutting columns (ResourceMixin/IDMixin/TimeMixin/AnnotationsMixin)", + "when_to_use": "Defining a new persisted entity that needs the standard id/namespace/metadata/timestamps and soft-delete columns", + "how_it_works": "Schema structs compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index. UniqueResourceMixin adds a (namespace,key,deleted_at) unique index approximating partial-unique-on-not-deleted. Soft delete is via deleted_at; unique indexes are scoped with deleted_at to avoid resurrect collisions.", + "examples": [ + "pkg/framework/entutils/mixins.go", + "openmeter/ent/schema/customer.go" + ], + "applicable_when": "pkg/framework/entutils/mixins.go:47 UniqueResourceMixin's (namespace,key,deleted_at) unique index only approximates partial uniqueness \u2014 same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration; applies to entities relying on key-uniqueness for soft-deleted rows", + "do_not_apply_when": [ + "Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL \u2014 must add a custom SQL migration with IndexWhere, as the customer schema does at openmeter/ent/schema/customer.go:58-62, rather than relying on the mixin's deleted_at-in-key approximation" + ], + "scope": [] + } + ], + "integrations": [ + { + "service": "PostgreSQL (Ent ORM + Atlas + pgx)", + "purpose": "Primary transactional datastore for all domain entities; schema generated from ent schema, migrated via Atlas/golang-migrate", + "integration_point": "openmeter/ent/schema/, pkg/framework/entutils/transaction.go, app/common/database.go, tools/migrate/migrations/" + }, + { + "service": "ClickHouse", + "purpose": "Analytics store for metered usage events; streaming queries (CountEvents, QueryMeter) feed entitlement balance and billing", + "integration_point": "openmeter/streaming/clickhouse/, openmeter/streaming/connector.go, app/common/clickhouse.go" + }, + { + "service": "Kafka (confluent-kafka-go + Watermill CQRS)", + "purpose": "Event backbone: ingest events, system events, balance-worker events; consumed by notification/billing/balance/sink workers", + "integration_point": "openmeter/watermill/eventbus/eventbus.go, openmeter/watermill/grouphandler/grouphandler.go, app/common/kafka.go, openmeter/notification/consumer/consumer.go" + }, + { + "service": "Svix", + "purpose": "Outbound webhook delivery to customer endpoints for notification events", + "integration_point": "openmeter/notification/webhook/svix/webhook.go, openmeter/notification/webhook/svix/svix.go" + }, + { + "service": "Stripe", + "purpose": "Payment/invoicing app integration registered in the app marketplace; handles inbound Stripe webhooks", + "integration_point": "openmeter/app/stripe/service/service.go, openmeter/app/stripe/service/factory.go, openmeter/app/stripe/httpdriver/webhook.go" + }, + { + "service": "GOBL", + "purpose": "Invoice document format/representation for billing invoices", + "integration_point": "openmeter/billing/service/" + }, + { + "service": "OpenTelemetry", + "purpose": "Tracing and metrics across services, Kafka consumers, and Svix calls", + "integration_point": "app/common/telemetry.go, openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/webhook/svix/webhook.go" + }, + { + "service": "Redis", + "purpose": "Dedupe and supporting caches (optional)", + "integration_point": "pkg/redis/, openmeter/dedupe/" + }, + { + "service": "Viper + Cobra", + "purpose": "Configuration loading and CLI command structure for the binaries", + "integration_point": "app/config/, app/common/config.go" + } + ], + "pattern_selection_guide": [ + { + "scenario": "Adding a new domain package with persistence", + "pattern": "Service/Adapter layered package with Config.Validate() constructors + Ent adapter implementing TxCreator/TxUser", + "rationale": "Matches every existing domain (customer, billing, entitlement); transaction-awareness via entutils.TransactingRepo lets the adapter join caller transactions and keeps namespace/multi-tenancy handling uniform." + }, + { + "scenario": "Wiring a new service/hook/worker into a binary", + "pattern": "Add a wire.NewSet provider in app/common/*.go and reference it from the binary's wire.go, then run make generate", + "rationale": "Wire is the single DI mechanism; constructors take explicit deps and return errors, so feature flags (e.g. credits.enabled) gate wiring by returning Noop implementations." + }, + { + "scenario": "Serializing all operations for one logical entity across multiple tables", + "pattern": "lockr advisory lock keyed on a globally-unique id inside transaction.Run", + "rationale": "pg_advisory_xact_lock auto-releases with the tx and serializes business flows the DB's row locks can't span; only safe when the key's id component is PK-unique (see lockr precondition)." + }, + { + "scenario": "Reacting to another domain's lifecycle event in-process", + "pattern": "ServiceHookRegistry hook registered at wiring time (Noop when feature disabled)", + "rationale": "Synchronous, transactional in-process coupling without a Kafka round-trip; used for ledger provisioning, subject->customer sync, entitlement validation." + }, + { + "scenario": "Reacting to events asynchronously across workers", + "pattern": "eventbus.Publish -> Kafka topic by event-name prefix -> grouphandler type-routed consumer", + "rationale": "Decouples producers from workers; unknown event types are safely ignored/ack'd, and per-type handlers unmarshal once." + }, + { + "scenario": "Modeling a guarded multi-step lifecycle with side effects (invoice, charge)", + "pattern": "qmuntal/stateless FSM with external storage on the aggregate", + "rationale": "Permit/PermitDynamic/OnActive make legal transitions and guards explicit and testable; state lives on the persisted aggregate so transitions survive across requests." + }, + { + "scenario": "Pluggable third-party app integration (Stripe-like)", + "pattern": "RegisterMarketplaceListing into the in-memory app registry; capabilities discovered by Factory type-assertion", + "rationale": "Single registration point with duplicate rejection; install methods are validated against the listing and the factory's implemented interfaces." + }, + { + "scenario": "Behavior that branches by a fixed enum subtype", + "pattern": "Per-subtype connector behind one service with a getTypeConnector switch (default-error arm)", + "rationale": "Keeps shared concerns in the umbrella service while delegating subtype logic; the default-error arm forces a new enum value to be wired explicitly." + }, + { + "scenario": "Returning errors to HTTP clients with correct status", + "pattern": "Typed error encoders (HandleErrorIfTypeMatches) plus ValidationIssue http.status_code attribute mapping", + "rationale": "Centralizes RFC7807 problem rendering; the 'singular' rule avoids ambiguous multi-status responses, and v3 mirrors the same logic in apierrors." + }, + { + "scenario": "Validating input structs", + "pattern": "Accumulate errs []error and return NewNillableGenericValidationError(errors.Join(...))", + "rationale": "Reports all field errors at once with field-prefixed wrapping and maps cleanly to HTTP 400." + }, + { + "scenario": "Converting between domain/API/DB types", + "pattern": "Goverter/Goderive generated converters; hand-written FromAPI/ToAPI/FromDB/ToDB helpers", + "rationale": "Generated mappers cut boilerplate; the naming convention (per /go-types-conversion) keeps translation direction unambiguous." + } + ] + }, + "quick_reference": { + "pattern_selection": [ + { + "scenario": "New persisted domain package", + "pattern": "Service/Adapter + Config.Validate() constructor + Ent TxCreator/TxUser adapter", + "scope": [] + }, + { + "scenario": "Wire a service/worker into a binary", + "pattern": "wire.NewSet provider in app/common + binary wire.go + make generate", + "scope": [] + }, + { + "scenario": "Run repository logic inside/optionally-inside a transaction", + "pattern": "transaction.Run + entutils.TransactingRepo", + "scope": [] + }, + { + "scenario": "Serialize all ops for one entity across tables", + "pattern": "lockr advisory lock on globally-unique id inside transaction.Run", + "scope": [ + "subscription", + "entitlement", + "billing", + "ledger" + ] + }, + { + "scenario": "React to another domain's lifecycle in-process", + "pattern": "ServiceHookRegistry hook (Noop when disabled)", + "scope": [] + }, + { + "scenario": "Async cross-worker reaction", + "pattern": "eventbus.Publish -> Kafka by prefix -> grouphandler type-routed consumer", + "scope": [] + }, + { + "scenario": "Guarded multi-step lifecycle (invoice/charge)", + "pattern": "qmuntal/stateless FSM with external storage", + "scope": [ + "billing", + "charges" + ] + }, + { + "scenario": "Pluggable app integration", + "pattern": "RegisterMarketplaceListing + Factory type-assertion dispatch", + "scope": [ + "app" + ] + }, + { + "scenario": "Behavior branching by fixed enum subtype", + "pattern": "Per-subtype connector + getTypeConnector switch (default error)", + "scope": [ + "entitlement" + ] + }, + { + "scenario": "Map domain errors to HTTP status", + "pattern": "HandleErrorIfTypeMatches chain / http.status_code ValidationIssue attribute", + "scope": [] + }, + { + "scenario": "Validate input struct", + "pattern": "errs []error + NewNillableGenericValidationError(errors.Join)", + "scope": [] + } + ], + "error_mapping": [ + { + "error": "models.GenericValidationError (and NewNillableGenericValidationError)", + "status_code": 400, + "description": "Input validation failure; collected field-prefixed issues. Mapped at handler errorEncoders and api/v3/apierrors apiErrorFromHTTPStatus." + }, + { + "error": "api/v3 generated router binding errors (InvalidParamFormatError, RequiredParamError, RequiredHeaderError, TooManyValuesForParamError, UnmarshalingParamError, UnescapedCookieParamError)", + "status_code": 400, + "description": "Query/path/header parse failures converted to v3 InvalidParameters by NewV3ErrorHandlerFunc (api/v3/apierrors/handler.go)." + }, + { + "error": "models.GenericUnauthorizedError", + "status_code": 401, + "description": "Unauthenticated; mapped via apiErrorFromHTTPStatus StatusUnauthorized." + }, + { + "error": "models.GenericForbiddenError", + "status_code": 403, + "description": "Authorization denied; apiErrorFromHTTPStatus StatusForbidden." + }, + { + "error": "models.GenericNotFoundError / domain NotFoundError (e.g. notification.NotFoundError)", + "status_code": 404, + "description": "Entity not found; per-handler HandleErrorIfTypeMatches and apiErrorFromHTTPStatus StatusNotFound." + }, + { + "error": "models.GenericConflictError / notification.UpdateAfterDeleteError", + "status_code": 409, + "description": "State conflict (e.g. update after delete); HandleErrorIfTypeMatches StatusConflict." + }, + { + "error": "models.GenericPreConditionFailedError", + "status_code": 412, + "description": "Precondition failed; apiErrorFromHTTPStatus StatusPreconditionFailed." + }, + { + "error": "models.GenericNotImplementedError", + "status_code": 501, + "description": "Operation not implemented; apiErrorFromHTTPStatus StatusNotImplemented." + }, + { + "error": "Unclassified / fallthrough error (commonhttp.ErrorEncoder)", + "status_code": 500, + "description": "Default; ErrorEncoder responds 'something went wrong'. notification webhook.ValidationError/webhook.NotFoundError are intentionally mapped to 500 in the notification errorEncoder." + } + ] + }, + "technology": { + "stack": [ + { + "category": "Runtime", + "name": "Go", + "version": "1.25.6 (module); Docker builder golang:1.26.3-alpine; Nix shell go_1_26", + "purpose": "Primary backend language for all services (cmd/server, cmd/billing-worker, cmd/balance-worker, cmd/sink-worker, cmd/notification-service, cmd/jobs); module github.com/openmeterio/openmeter (go.mod)" + }, + { + "category": "Runtime", + "name": "Go (collector module)", + "version": "1.26.3", + "purpose": "Separate Go module github.com/openmeterio/openmeter/collector for the Benthos-based event collector; replaces parent module via local replace ../ (collector/go.mod)" + }, + { + "category": "Runtime", + "name": "Node.js", + "version": "v24.15.0 (.nvmrc); engines node>=22 for JS SDK", + "purpose": "TypeSpec compilation, OpenAPI tooling, JavaScript SDK build; .nvmrc is the source of truth kept aligned with the Nix CI shell (.nvmrc, AGENTS.md)" + }, + { + "category": "Runtime", + "name": "Python", + "version": "^3.9 (SDK package); Nix shell python314", + "purpose": "Generated Python client SDK (api/client/python/pyproject.toml) and atlas.sum / migrate check scripts under .github/tools/migrate" + }, + { + "category": "Backend Framework", + "name": "Chi router (go-chi/chi)", + "version": "v5.2.5", + "purpose": "HTTP router for the API server; oapi-codegen generates Chi server stubs (go.mod, openmeter/server)" + }, + { + "category": "Backend Framework", + "name": "go-chi/cors + go-chi/render", + "version": "cors v1.2.2, render v1.0.3", + "purpose": "CORS middleware and response rendering for HTTP handlers (go.mod)" + }, + { + "category": "Backend Framework", + "name": "oapi-codegen", + "version": "v2.6.1-0.20260403235458 (tool); runtime v1.4.1; nethttp-middleware v1.1.2", + "purpose": "Generates Go server/client code from the OpenAPI spec (api/api.gen.go, api/v3/api.gen.go, api/client/go/client.gen.go); chi-middleware template is patched for custom filter parsing (Makefile patch-oapi-templates)" + }, + { + "category": "API Definition", + "name": "TypeSpec", + "version": "@typespec/* with prettier-plugin 1.11.0", + "purpose": "Source of truth for the API in api/spec/ (legacy + aip packages), compiled to OpenAPI then to SDKs (api/spec/package.json, AGENTS.md)" + }, + { + "category": "API Definition", + "name": "OpenAPI / kin-openapi", + "version": "kin-openapi v0.139.0", + "purpose": "OpenAPI spec parsing and response validation; specs at api/openapi.yaml, api/openapi.cloud.yaml, api/v3/openapi.yaml (go.mod, config.example.yaml server.responseValidation)" + }, + { + "category": "Database", + "name": "PostgreSQL", + "version": "server postgres:15 (atlas dev db); pgx/v5 v5.9.2 driver; lib/pq v1.12.3", + "purpose": "Primary transactional datastore; local DSN postgres://postgres:postgres@localhost:5432/postgres (atlas.hcl, docker-compose)" + }, + { + "category": "Database / ORM", + "name": "Ent (entgo.io/ent)", + "version": "v0.14.6", + "purpose": "Schema-as-code ORM; schemas in openmeter/ent/schema/*.go are the DB source of truth, generated code in openmeter/ent/db/ (DO NOT EDIT) (go.mod, AGENTS.md)" + }, + { + "category": "Database / Migrations", + "name": "Atlas (ariga.io/atlas) + atlasx", + "version": "atlas pinned 0.36.0 in flake atlasx; ariga.io/atlas v0.36.2-0.20250730", + "purpose": "Generates SQL migrations by diffing the Ent schema; golang-migrate format files in tools/migrate/migrations/ (atlas.hcl, flake.nix)" + }, + { + "category": "Database / Migrations", + "name": "golang-migrate", + "version": "v4.19.1", + "purpose": "Migration file format and runtime application of tools/migrate/migrations/*.up.sql/*.down.sql (go.mod, atlas.hcl migrations_format=golang-migrate)" + }, + { + "category": "Database / Codegen", + "name": "sqlc", + "version": "provided via Nix shell (sqlc); gen target generate-sqlc-testdata", + "purpose": "Generates SQLC migration testdata for specific schema versions (Makefile generate-sqlc-testdata, flake.nix packages)" + }, + { + "category": "Analytics Database", + "name": "ClickHouse (clickhouse-go/v2 + ch-go)", + "version": "clickhouse-go/v2 v2.46.0, ch-go v0.72.0", + "purpose": "Stores and aggregates metering events; ports 8123/9000/9009 in docker-compose; TEST_CLICKHOUSE_DSN used in CI (go.mod, docker-compose, ci.yaml)" + }, + { + "category": "Cache / Dedupe", + "name": "Redis (go-redis/v9)", + "version": "v9.20.0 + redisotel v9.20.0", + "purpose": "Event deduplication and caching; docker-compose redis profile, port 6379 (go.mod, docker-compose)" + }, + { + "category": "Cache", + "name": "hashicorp/golang-lru/v2", + "version": "v2.0.7", + "purpose": "In-process LRU caches (e.g. Kafka topic provisioner cache) (go.mod, pkg/lrux)" + }, + { + "category": "Queue / Streaming", + "name": "Kafka (confluent-kafka-go/v2)", + "version": "v2.14.1 (librdkafka v2.14.1 pinned in flake)", + "purpose": "Event ingestion bus; requires CGO + -tags=dynamic to link librdkafka; Docker uses -tags musl static build (go.mod, Makefile GO_BUILD_FLAGS, flake.nix, Dockerfile)" + }, + { + "category": "Queue / Streaming", + "name": "IBM/sarama", + "version": "v1.49.0", + "purpose": "Secondary Kafka client library used alongside Watermill (go.mod)" + }, + { + "category": "Queue / Messaging", + "name": "Watermill + watermill-kafka/v3", + "version": "watermill v1.5.2, watermill-kafka/v3 v3.1.2", + "purpose": "Message router / event-driven pipeline framework for worker services (go.mod, openmeter/watermill)" + }, + { + "category": "Events", + "name": "CloudEvents SDK (cloudevents/sdk-go/v2)", + "version": "v2.16.2", + "purpose": "CloudEvents envelope for metering events; schema at cloudevents.spec.json (go.mod)" + }, + { + "category": "Invoicing", + "name": "GOBL (invopop/gobl)", + "version": "v0.403.0", + "purpose": "Open-source invoice document format for billing/invoicing (go.mod, openmeter/billing)" + }, + { + "category": "Payments", + "name": "Stripe (stripe-go/v80)", + "version": "v80.2.1", + "purpose": "Stripe payment/app integration (go.mod, openmeter/app)" + }, + { + "category": "Webhooks", + "name": "Svix (svix/svix-webhooks)", + "version": "v1.95.1", + "purpose": "Webhook delivery for notifications; docker-compose svix profile port 8071, needs SVIX_JWT_SECRET (go.mod, docker-compose, Makefile)" + }, + { + "category": "Auth", + "name": "golang-jwt/jwt/v5", + "version": "v5.3.1", + "purpose": "JWT handling (portal tokens, Svix JWT) (go.mod, openmeter/portal)" + }, + { + "category": "Auth", + "name": "xdg-go/scram", + "version": "v1.2.0", + "purpose": "SASL/SCRAM authentication for Kafka brokers (go.mod)" + }, + { + "category": "State Machine", + "name": "qmuntal/stateless", + "version": "v1.8.0", + "purpose": "State machine library used for invoice/charge lifecycle state machines (go.mod, openmeter/billing/charges)" + }, + { + "category": "Decimal / Money", + "name": "alpacahq/alpacadecimal + govalues/decimal + shopspring/decimal", + "version": "alpacadecimal v0.0.9, govalues/decimal v0.1.36, shopspring/decimal v1.4.0", + "purpose": "Exact decimal arithmetic for monetary amounts; tests assert via InexactFloat64() (go.mod, AGENTS.md)" + }, + { + "category": "Validation", + "name": "models.NewNillableGenericValidationError (custom) + getkin/kin-openapi", + "version": "kin-openapi v0.139.0", + "purpose": "Validate() methods collect errors into errors.Join and wrap with field context; OpenAPI request/response validation at the HTTP edge (AGENTS.md, pkg/models)" + }, + { + "category": "Scheduling", + "name": "go-co-op/gocron/v2 + robfig/cron/v3", + "version": "gocron v2.21.2, cron v3.0.1", + "purpose": "Periodic job scheduling (cmd/jobs, e.g. llm-cost sync) (go.mod, Makefile llm-cost-sync)" + }, + { + "category": "Distributed Locking", + "name": "cirello.io/pglock", + "version": "v1.16.1", + "purpose": "Postgres-advisory-lock-based distributed locking (distributed_locks table excluded from atlas diff) (go.mod, atlas.hcl migration_exlude)" + }, + { + "category": "Config", + "name": "Viper + Cobra + pflag", + "version": "viper v1.21.0, cobra v1.10.2, pflag v1.0.10", + "purpose": "Configuration loading (config.yaml from config.example.yaml) and CLI command structure (go.mod, app/config, Makefile)" + }, + { + "category": "DI / Wiring", + "name": "google/wire", + "version": "v0.7.0 (tool: google/wire/cmd/wire)", + "purpose": "Compile-time dependency injection; providers in **/wire.go generate **/wire_gen.go (go.mod tool, AGENTS.md, app/common)" + }, + { + "category": "Codegen", + "name": "goverter (jmattheis/goverter)", + "version": "v1.9.3 (tool)", + "purpose": "Generates type converters from **/convert.go interfaces into **/convert.gen.go (go.mod tool, AGENTS.md)" + }, + { + "category": "Codegen", + "name": "goderive (awalterschulze/goderive)", + "version": "v0.5.1 (tool)", + "purpose": "Generates derived code from annotations, e.g. billing/derived.gen.go (go.mod tool, AGENTS.md)" + }, + { + "category": "Observability", + "name": "OpenTelemetry (go.opentelemetry.io/otel)", + "version": "otel v1.44.0 + otlp grpc/http exporters; otelslog bridge v0.19.0; otelsql v0.42.0; otelhttp v0.69.0", + "purpose": "Tracing, metrics and structured-log export across all services (go.mod, pkg/otelx)" + }, + { + "category": "Observability / Metrics", + "name": "Prometheus client_golang", + "version": "v1.23.2 + otel prometheus exporter v0.66.0", + "purpose": "Prometheus metrics exposition (go.mod)" + }, + { + "category": "Logging", + "name": "log/slog + samber/slog-multi + lmittmann/tint + golang-cz/devslog", + "version": "slog-multi v1.8.0, tint v1.1.3, devslog v0.0.15", + "purpose": "Structured logging; loggers are injected explicitly, slog.Default() fallback is forbidden in prod constructors (go.mod, AGENTS.md, pkg/log)" + }, + { + "category": "Health", + "name": "AppsFlyer/go-sundheit", + "version": "v0.6.0", + "purpose": "Liveness/readiness health checks (go.mod, pkg/gosundheit)" + }, + { + "category": "Utilities", + "name": "samber/lo + samber/mo", + "version": "lo v1.53.0, mo v1.16.0", + "purpose": "Functional slice/map helpers; lo.ToPtr/lo.Must preferred over local wrappers (go.mod, AGENTS.md, .agents/skills samber-lo)" + }, + { + "category": "Utilities", + "name": "rickb777/period + custom pkg/datetime", + "version": "period v1.0.27", + "purpose": "ISO-8601 duration/period handling for billing cadences (go.mod, pkg/datetime)" + }, + { + "category": "Utilities", + "name": "oklog/ulid/v2 + google/uuid", + "version": "ulid v2.1.1, uuid v1.6.0", + "purpose": "ULID/UUID identifier generation (go.mod, pkg/models)" + }, + { + "category": "Resilience", + "name": "avast/retry-go/v4 + sony/gobreaker", + "version": "retry-go v4.7.0, gobreaker v1.0.0", + "purpose": "Retry and circuit-breaker patterns for external calls (go.mod)" + }, + { + "category": "Testing", + "name": "stretchr/testify", + "version": "v1.11.1", + "purpose": "Assertion/require + mock framework for all Go tests (go.mod, AGENTS.md /test skill)" + }, + { + "category": "Testing", + "name": "gotestsum", + "version": "v1.13.0 (tool)", + "purpose": "Test runner with richer output (go.mod tool, flake)" + }, + { + "category": "Testing", + "name": "peterldowns/pgtestdb", + "version": "v0.1.1", + "purpose": "Ephemeral Postgres test databases per test; requires POSTGRES_HOST=127.0.0.1 or suites skip (go.mod, AGENTS.md)" + }, + { + "category": "Testing", + "name": "brianvoe/gofakeit/v6", + "version": "v6.28.0", + "purpose": "Fake data generation in tests (go.mod)" + }, + { + "category": "Testing (JS SDK)", + "name": "Vitest + fetch-mock", + "version": "vitest 4.1.4, @fetch-mock/vitest 0.2.18", + "purpose": "JavaScript SDK unit tests (api/client/javascript/package.json)" + }, + { + "category": "Linting (Go)", + "name": "golangci-lint", + "version": "config version 2; provided by Nix shell", + "purpose": "Linters: bodyclose, errcheck, govet, ineffassign, misspell, nolintlint, sloglint, staticcheck, unconvert, whitespace; formatters gci/gofmt/gofumpt/goimports with prefix github.com/openmeterio/openmeter; fast variant .golangci-fast.yaml (.golangci.yaml, Makefile lint-go)" + }, + { + "category": "Linting (API)", + "name": "Spectral + Prettier (TypeSpec)", + "version": "spectral-cli 6.16.0 (via pnpx), prettier 3.8.3", + "purpose": "Lints OpenAPI specs and formats TypeSpec (Makefile lint-openapi, api/spec/package.json, flake.nix)" + }, + { + "category": "Linting / Formatting (JS SDK)", + "name": "Biome", + "version": "@biomejs/biome 2.4.11", + "purpose": "Format + lint for the JavaScript SDK (api/client/javascript/package.json)" + }, + { + "category": "Linting (Helm)", + "name": "helm lint + helm-docs", + "version": "kubernetes-helm + helm-docs via Nix", + "purpose": "Lints deploy/charts/openmeter and deploy/charts/benthos-collector (Makefile lint-helm, flake.nix)" + }, + { + "category": "SDK Tooling (JS)", + "name": "openapi-typescript + orval + openapi-fetch + zod", + "version": "openapi-typescript 7.13.0, orval 8.7.0, openapi-fetch 0.17.0, zod 4.3.6", + "purpose": "Generates TS client types, Zod schemas and fetch client for @openmeter/sdk (api/client/javascript/package.json)" + }, + { + "category": "Collector", + "name": "Benthos / Redpanda Connect", + "version": "benthos/v4 v4.73.0, connect free bundle v4.93.0", + "purpose": "Stream-processing collector binary (cmd in collector module) packaged as benthos-collector (collector/go.mod, Makefile build-benthos-collector, benthos-collector.Dockerfile)" + }, + { + "category": "Collector (K8s)", + "name": "controller-runtime + k8s.io client-go", + "version": "controller-runtime v0.24.1, client-go v0.36.1", + "purpose": "Kubernetes integration for the collector (collector/go.mod)" + }, + { + "category": "Dev Environment", + "name": "Nix + devenv + flake-parts + git-hooks", + "version": "nixpkgs-unstable; devenv flake; prek pre-commit", + "purpose": "Reproducible dev/CI shell `nix develop --impure .#ci` providing go/node/python/atlas/golangci-lint/air/helm/benthos/sqlc; enterShell rewrites .nvmrc from node -v (flake.nix, AGENTS.md, ci.yaml)" + }, + { + "category": "Dev Environment", + "name": "air (hot reload)", + "version": "via Nix shell", + "purpose": "Hot-reload runner for each service via per-cmd .air.toml (Makefile server/sink-worker/etc., cmd/*/.air.toml)" + }, + { + "category": "Commit Tooling", + "name": "commitizen / prek", + "version": "cz + prek via Nix git-hooks", + "purpose": "Conventional-commit enforcement; CI runs `prek run -a` and `prek run --stage manual` (flake.nix git-hooks, ci.yaml Validate commit messages)" + } + ], + "run_commands": { + "up": "docker compose up -d (start kafka/clickhouse + profiled postgres/redis/svix/dev deps)", + "down": "docker compose down --remove-orphans --volumes", + "server": "air -c ./cmd/server/.air.toml (hot-reload API server; checks config.yaml freshness)", + "sink-worker": "air -c ./cmd/sink-worker/.air.toml", + "balance-worker": "air -c ./cmd/balance-worker/.air.toml", + "billing-worker": "air -c ./cmd/billing-worker/.air.toml", + "notification-service": "air -c ./cmd/notification-service/.air.toml", + "llm-cost-sync": "go run ./cmd/jobs llm-cost sync", + "test": "PGPASSWORD=postgres psql ... && POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic ./...", + "test-nocache": "POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic -count=1 ./...", + "test-all": "docker compose up -d postgres svix redis && SVIX_HOST=localhost SVIX_JWT_SECRET=DUMMY_JWT_SECRET go test -tags=dynamic -count=1 ./...", + "etoe": "make -C e2e test-local (TZ=UTC OPENMETER_ADDRESS=http://localhost:38888 go test -count=1 ./...)", + "etoe-slow": "RUN_SLOW_TESTS=1 make -C e2e test-local", + "generate": "patch-oapi-templates + go generate ./...", + "generate-all": "update-openapi + generate-javascript-sdk + go generate ./...", + "gen-api": "update-openapi (make -C api/spec generate + go generate ./api/...) + generate-javascript-sdk", + "update-openapi": "patch-oapi-templates + make -C api/spec generate + go generate ./api/...", + "generate-javascript-sdk": "make -C api/client/javascript generate (pnpm install + generate + build + test)", + "patch-oapi-templates": "copy oapi-codegen chi-middleware.tmpl and apply api/v3/templates/chi-middleware.tmpl.patch", + "generate-view-sql": "go run ./tools/migrate/cmd/viewgen (SQL for ent.View schemas)", + "generate-sqlc-testdata": "VERSION= ./tools/migrate/generate-sqlc-testdata.sh", + "migrate-check": "migrate-check-schema + migrate-check-diff + migrate-check-lint + migrate-check-validate", + "migrate-check-diff": "atlas migrate --env local diff migrate-check (must produce no changes)", + "migrate-check-lint": "atlas migrate --env local lint --latest 10", + "migrate-check-validate": "atlas migrate --env local validate", + "atlas-diff": "atlas migrate --env local diff (generate new migration)", + "lint": "lint-go + lint-api-spec + lint-openapi + lint-helm", + "lint-go": "golangci-lint run -v ./...", + "lint-go-fast": "golangci-lint run -v --config .golangci-fast.yaml $(GO_LINT_PATH)", + "lint-go-style": "golangci-lint fmt -v -d $(GO_LINT_PATH)", + "lint-go-head": "golangci-lint run --new-from-rev=HEAD~1", + "lint-openapi": "spectral lint api/openapi.yaml api/openapi.cloud.yaml api/v3/openapi.yaml", + "lint-helm": "helm lint deploy/charts/openmeter && helm lint deploy/charts/benthos-collector", + "fmt": "golangci-lint run --fix", + "mod": "go mod tidy && go mod tidy -C collector", + "build": "build-server build-sink-worker build-benthos-collector build-balance-worker build-billing-worker build-notification-service build-jobs", + "build-server": "go build -o build/server -tags=dynamic ./cmd/server", + "build-benthos-collector": "go build -C collector -o ../build/benthos-collector -tags=dynamic ./cmd", + "build-benthos-collector-release": "CGO_ENABLED=0 GOOS=.. GOARCH=.. go build -C collector -trimpath -ldflags '-s -w -X main.version=..' (set GOOS/GOARCH/VERSION)", + "package-helm-chart": "helm-docs + helm dependency update + helm package (set CHART and VERSION)", + "seed": "benthos -c etc/seed/seed.yaml", + "ci": "make generate-all && make -j 10 lint test etoe", + "ci-shell": "nix develop --impure .#ci -c (run any toolchain command in the reproducible CI shell)" + }, + "project_structure": "openmeter/\n\u251c\u2500\u2500 api/ # API layer (generated + source)\n\u2502 \u251c\u2500\u2500 spec/ # TypeSpec source of truth (packages/legacy, packages/aip)\n\u2502 \u251c\u2500\u2500 api.gen.go # oapi-codegen legacy server/types (generated)\n\u2502 \u251c\u2500\u2500 v3/ # v3 (AIP) API: api.gen.go, openapi.yaml, filters, templates\n\u2502 \u251c\u2500\u2500 openapi.yaml / openapi.cloud.yaml\n\u2502 \u2514\u2500\u2500 client/ # javascript (pnpm/@openmeter/sdk), go, python SDKs\n\u251c\u2500\u2500 app/\n\u2502 \u251c\u2500\u2500 common/ # Wire DI providers (wire.go -> wire_gen.go)\n\u2502 \u2514\u2500\u2500 config/ # Viper config structs\n\u251c\u2500\u2500 cmd/ # Service entrypoints (.air.toml each)\n\u2502 \u251c\u2500\u2500 server/ billing-worker/ balance-worker/ sink-worker/\n\u2502 \u251c\u2500\u2500 notification-service/ jobs/\n\u251c\u2500\u2500 openmeter/ # Core business logic (layered service/adapter)\n\u2502 \u251c\u2500\u2500 billing/ (service/, adapter/, rating/, worker/, charges/)\n\u2502 \u251c\u2500\u2500 subscription/ entitlement/ credit/ ledger/ customer/\n\u2502 \u251c\u2500\u2500 notification/ (service/, adapter/, consumer/, eventhandler/, webhook/, httpdriver/)\n\u2502 \u251c\u2500\u2500 meter/ meterevent/ ingest/ sink/ streaming/ productcatalog/\n\u2502 \u251c\u2500\u2500 app/ secret/ portal/ namespace/ llmcost/ cost/ progressmanager/\n\u2502 \u251c\u2500\u2500 ent/schema/ # Ent entity definitions (DB source of truth)\n\u2502 \u251c\u2500\u2500 ent/db/ # Generated ent code (DO NOT EDIT)\n\u2502 \u251c\u2500\u2500 registry/ server/ watermill/ event/ testutils/\n\u251c\u2500\u2500 pkg/ # Shared utils (clock, models, filter, framework/entutils, kafka, otelx, pagination, ...)\n\u251c\u2500\u2500 collector/ # Separate Go module: Benthos/Redpanda Connect collector\n\u251c\u2500\u2500 tools/migrate/ # Migration tooling + migrations/ (golang-migrate SQL) + atlas.sum\n\u251c\u2500\u2500 e2e/ # End-to-end tests (docker-compose driven)\n\u251c\u2500\u2500 deploy/charts/ # Helm charts: openmeter, benthos-collector\n\u251c\u2500\u2500 docs/ etc/ quickstart/ test/\n\u251c\u2500\u2500 Dockerfile benthos-collector.Dockerfile docker-compose*.yaml\n\u251c\u2500\u2500 atlas.hcl flake.nix Makefile justfile .golangci.yaml config.example.yaml", + "templates": [ + { + "component_type": "domain service", + "description": "Service layer struct in openmeter//service/service.go: takes a Config of injected deps (Repository, sub-services, *slog.Logger), New() validates required deps and asserts the interface. Loggers injected, never slog.Default().", + "file_path_template": "openmeter//service/service.go", + "code": "var _ .Service = (*Service)(nil)\ntype Config struct { Adapter .Repository; Logger *slog.Logger }\nfunc New(c Config) (*Service, error) { if c.Adapter == nil { return nil, errors.New(\"missing repository\") }; return &Service{adapter: c.Adapter, logger: c.Logger}, nil }" + }, + { + "component_type": "domain adapter (Ent repo)", + "description": "Repository/adapter in openmeter//adapter/adapter.go: wraps *entdb.Client, Config.Validate() requires client+logger, returns the domain Repository interface; helpers stay transaction-aware via entutils.TransactingRepo.", + "file_path_template": "openmeter//adapter/adapter.go", + "code": "type Config struct { Client *entdb.Client; Logger *slog.Logger }\nfunc (c Config) Validate() error { if c.Client == nil { return errors.New(\"postgres client is required\") }; return nil }\nfunc New(c Config) (.Repository, error) { if err := c.Validate(); err != nil { return nil, err }; return &adapter{db: c.Client, logger: c.Logger}, nil }" + }, + { + "component_type": "Ent schema entity", + "description": "Entity definition in openmeter/ent/schema/.go: embed ent.Schema, declare Mixin() (IDMixin/TimeMixin/MetadataMixin), Fields(), Edges(), Indexes(); run `make generate` then `atlas migrate --env local diff ` to produce migrations.", + "file_path_template": "openmeter/ent/schema/.go", + "code": "type Feature struct { ent.Schema }\nfunc (Feature) Mixin() []ent.Mixin { return []ent.Mixin{entutils.IDMixin{}, entutils.TimeMixin{}, entutils.MetadataMixin{}} }\nfunc (Feature) Fields() []ent.Field { return []ent.Field{ field.String(\"namespace\").NotEmpty().Immutable() } }" + }, + { + "component_type": "HTTP handler (httpdriver)", + "description": "HTTP handlers live in openmeter//httpdriver/ and are wired into the Chi server via generated oapi-codegen stubs; validation surfaces ValidationIssue (see /api skill).", + "file_path_template": "openmeter//httpdriver/.go", + "code": "func (h *handler) Create() CreateHandler { return httptransport.NewHandlerWithArgs(resolveRequest, handle, encodeResponse) }" + }, + { + "component_type": "Goverter converter", + "description": "Define a converter interface with goverter annotations in /convert.go; `make generate` emits /convert.gen.go. Use FromAPI/ToAPI/FromDB/ToDB naming (/go-types-conversion skill).", + "file_path_template": "openmeter//convert.go", + "code": "// goverter:converter\ntype Converter interface { ToAPI(domain.X) api.X }" + }, + { + "component_type": "Wire DI provider", + "description": "Register a new dependency by adding a provider to a wire.go set in app/common/ (or domain registry), then run `make generate` to regenerate wire_gen.go.", + "file_path_template": "app/common/wire.go", + "code": "var Set = wire.NewSet(adapter.New, service.New, wire.Bind(new(domain.Service), new(*service.Service)))" + }, + { + "component_type": "SQL migration", + "description": "Generated by diffing the Ent schema; never hand-edit timestamped files except ent.View DDL which Atlas does not emit. atlas.sum must stay append-only (enforced in pr-checks.yaml).", + "file_path_template": "tools/migrate/migrations/_.up.sql / .down.sql", + "code": "-- generated via: atlas migrate --env local diff " + }, + { + "component_type": "service test (TestEnv)", + "description": "Tests build deps from underlying constructors (repos/adapters/services/lockr), not app/common wiring; require POSTGRES_HOST=127.0.0.1; use t.Context(); freeze time with clock.FreezeTime + defer clock.UnFreeze (/test skill, AGENTS.md).", + "file_path_template": "openmeter//.../_test.go", + "code": "func TestX(t *testing.T) { ctx := t.Context(); /* given/when/then */ require.Equal(t, float64(5), got.InexactFloat64()) }" + } + ] + }, + "deployment": { + "runtime_environment": "self-hosted (Kubernetes via Helm; container images on GHCR; binaries cross-compiled for linux/darwin amd64/arm64)", + "compute_services": [ + "Kubernetes Deployments (Helm chart deploy/charts/openmeter)", + "containers run on depot-ubuntu CI/Depot build runners", + "long-running worker processes: server, sink-worker, balance-worker, billing-worker, notification-service, jobs" + ], + "container_runtime": "Docker (multi-stage; golang:1.26.3-alpine builder + tonistiigi/xx cross-compile, alpine:3.23.4 runtime; static musl builds linking librdkafka)", + "orchestration": "Kubernetes (Helm) for production; Docker Compose for local dev and e2e (docker-compose.yaml, docker-compose.base.yaml, e2e/docker-compose.*.yaml)", + "serverless_functions": "none", + "ci_cd": [ + "GitHub Actions (.github/workflows/): ci.yaml (build/lint/test/migrations/generators via nix develop .#ci on Depot runners), release.yaml (tag-triggered artifacts/helm/binaries/SDKs), artifacts.yaml (Depot build-push container images), npm-release.yaml (OIDC trusted publish), sdk-python-dev-release.yaml, pr-checks.yaml (atlas.sum append-only, release-note label), security.yaml (Trufflehog secret scan + SCA), codeql.yml + codeql-go.yaml, analysis-scorecard.yaml, untrusted-artifacts.yaml, require-all-reviewers.yml, workflow-result.yaml", + "Depot (depot/build-push-action, depot/setup-action) for fast multi-arch container builds, project from vars.DEPOT_PROJECT" + ], + "distribution": [ + "GitHub Container Registry ghcr.io/openmeterio/openmeter (server image, multi-arch linux/amd64+arm64)", + "ghcr.io/openmeterio/benthos-collector container image", + "Helm charts pushed to oci://ghcr.io/openmeterio/helm-charts (openmeter, benthos-collector)", + "npm @openmeter/sdk (OIDC trusted publishing, dist-tags latest/beta)", + "PyPI openmeter Python SDK (poetry, POETRY_PYPI_TOKEN_PYPI)", + "GitHub Releases with benthos-collector cross-compiled tarballs + sha256 checksums" + ], + "infrastructure_as_code": "Helm charts (deploy/charts/openmeter, deploy/charts/benthos-collector); chart deps: altinity-clickhouse-operator, bitnami kafka/postgresql/redis subcharts", + "supporting_services": [ + "PostgreSQL (primary DB)", + "ClickHouse (analytics, optional altinity-clickhouse-operator)", + "Kafka (event bus, bitnami subchart)", + "Redis (dedupe/cache, bitnami subchart)", + "Svix (webhook delivery)", + "Stripe (payments)" + ], + "environment_config": "config.yaml (copied from config.example.yaml by Make targets; Viper-loaded). Key settings: address, telemetry, server.responseValidation, postgres.url/autoMigrate, ingest.kafka, dedupe, billing, notification, credits.enabled, meter definitions. CI env vars: POSTGRES_HOST=127.0.0.1, SVIX_HOST, SVIX_JWT_SECRET, TEST_CLICKHOUSE_DSN, GOTMPDIR/TMPDIR redirected to workspace on Depot. Secrets via GitHub Actions: GITHUB_TOKEN, PYPI_TOKEN, DEPOT_PROJECT (var); npm via OIDC id-token.", + "key_files": [ + "Dockerfile", + "benthos-collector.Dockerfile", + ".dockerignore", + "docker-compose.yaml", + "docker-compose.base.yaml", + "entrypoint.sh", + "atlas.hcl", + "flake.nix", + "flake.lock", + ".nvmrc", + "Makefile", + "justfile", + ".golangci.yaml", + ".golangci-fast.yaml", + "config.example.yaml", + "deploy/charts/openmeter/Chart.yaml", + "deploy/charts/openmeter/values.yaml", + "deploy/charts/benthos-collector/Chart.yaml", + "deploy/charts/Makefile", + ".github/workflows/ci.yaml", + ".github/workflows/release.yaml", + ".github/workflows/artifacts.yaml", + ".github/workflows/npm-release.yaml", + ".github/workflows/security.yaml", + ".github/workflows/pr-checks.yaml", + ".github/workflows/codeql.yml", + "tools/migrate/migrations/atlas.sum", + "api/spec/package.json", + "api/client/javascript/package.json", + "api/client/python/pyproject.toml" + ] + }, + "development_rules": [ + { + "category": "anti_pattern", + "rule": "Never hand-edit files carrying a `// Code generated by X, DO NOT EDIT.` header \u2014 openmeter/ent/db/, **/wire_gen.go, **/convert.gen.go, billing/derived.gen.go, api/api.gen.go, api/v3/api.gen.go, api/client/go/client.gen.go; regenerate via make generate / make gen-api.", + "source": "AGENTS.md Code Generation table; openmeter/ent/db/" + }, + { + "category": "wiring", + "rule": "Always change the Ent schema in openmeter/ent/schema/*.go first, then run `make generate` to regenerate openmeter/ent/db/, then `atlas migrate --env local diff ` to emit migrations \u2014 never write DB columns or migration SQL by hand.", + "source": "AGENTS.md Database Migrations; openmeter/ent/schema/feature.go" + }, + { + "category": "anti_pattern", + "rule": "Never use panic in non-test code; if a new failure mode is possible, change the function signature to return an error and propagate it.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "anti_pattern", + "rule": "Never introduce context.Background() or context.TODO() to sidestep missing context propagation; propagate the caller's context through the full path, or drop the unused context.Context parameter.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "pattern_to_follow", + "rule": "In production constructors/initialization, always require and inject a *slog.Logger explicitly via Config; never fall back to slog.Default().", + "source": "AGENTS.md Coding Conventions; openmeter/notification/service/service.go, openmeter/notification/adapter/adapter.go" + }, + { + "category": "pattern_to_follow", + "rule": "Build a service via its Config struct + New() constructor that validates required dependencies and asserts the interface (var _ Service = (*Service)(nil)); adapters validate via Config.Validate() requiring client+logger.", + "source": "openmeter/notification/service/service.go; openmeter/notification/adapter/adapter.go" + }, + { + "category": "pattern_to_follow", + "rule": "For Validate() methods, collect all issues into `var errs []error` and return models.NewNillableGenericValidationError(errors.Join(errs...)); wrap field context with fmt.Errorf(\"field: %w\", err) and use errors.New for simple local checks \u2014 do not return on the first invalid field.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "pattern_to_follow", + "rule": "Use samber/lo helpers instead of local wrappers: slices.Clone for defensive copies, lo.ToPtr for pointer literals, lo.Must only for (value,err) panic-on-failure test setup; never add local ptr/must/loPtr/loMust helpers.", + "source": "AGENTS.md Coding Conventions; .agents/skills samber-lo" + }, + { + "category": "boundary", + "rule": "In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware: even helpers taking a raw *entdb.Client must wrap their body with entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to the tx already in ctx.", + "source": "AGENTS.md Coding Conventions; openmeter/billing/charges adapter" + }, + { + "category": "boundary", + "rule": "Keep domain test helpers under openmeter/.../testutils independent of app/common; build test dependencies from underlying constructors (repos, adapters, services, lockr), not the wiring layer, to avoid test-only import cycles.", + "source": "AGENTS.md Testing" + }, + { + "category": "data_flow", + "rule": "When changing the API, edit TypeSpec in api/spec/ first, then run `make gen-api` (OpenAPI + SDKs), then `make generate` (Go server/client). Adding @query to a TypeSpec file without HTTP decorators requires importing @typespec/http and `using TypeSpec.Http;`.", + "source": "AGENTS.md Code Generation workflow" + }, + { + "category": "pattern_to_follow", + "rule": "For type-translation files/functions use FromAPI.../ToAPI.../FromDB.../ToDB... naming and `map`/`mapped` terminology (never project/projected); follow the /go-types-conversion skill.", + "source": "AGENTS.md Coding Conventions; .agents/skills/go-types-conversion" + }, + { + "category": "wiring", + "rule": "When credits.enabled is false, ledger account services/resolvers are wired to noop in app/common; any ledger backfill that must write real ledger_accounts/ledger_customer_accounts rows must construct concrete ledger adapters directly rather than relying on default DI outputs.", + "source": "AGENTS.md Configuration" + }, + { + "category": "wiring", + "rule": "cmd/server/main.go migrates the DB before creating the default namespace; register namespace handlers before initNamespace(...) if they must provision the default namespace during startup.", + "source": "AGENTS.md Architecture" + }, + { + "category": "anti_pattern", + "rule": "Never use raw decimal-equality booleans in tests when precision allows; assert via require.Equal(t, expectedFloat64, actual.InexactFloat64()) and prefer simple float64(5) literals over verbose decimal construction.", + "source": "AGENTS.md Testing" + }, + { + "category": "pattern_to_follow", + "rule": "In tests, prefer t.Context() over context.Background(); pair clock.FreezeTime(...) with defer clock.UnFreeze() in the same scope so later subtests do not inherit frozen time.", + "source": "AGENTS.md Testing" + }, + { + "category": "anti_pattern", + "rule": "Do not extract helpers that only wrap 2-4 trivial lines/guards without adding domain intent, and remove leftover pass-through wrappers that only call another function \u2014 call the underlying function directly.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "boundary", + "rule": "ent.View schemas generate query code but do NOT appear in openmeter/ent/db/migrate/schema.go or migrate.Tables; their DDL needs an explicit SQL migration (use `make generate-view-sql` / tools/migrate/cmd/viewgen) \u2014 do not assume atlas diff will emit them.", + "source": "AGENTS.md Ent view caveat; Makefile generate-view-sql" + } + ], + "infrastructure_rules": [ + { + "category": "ci_cd", + "rule": "Always run toolchain commands through the Nix CI shell `nix develop --impure .#ci -c ` when go/gofmt/golangci-lint/atlas are missing from the ambient shell; CI itself runs build/lint/test/migrate-check/generators this way.", + "source": "AGENTS.md Testing; .github/workflows/ci.yaml" + }, + { + "category": "ci_cd", + "rule": "Always set POSTGRES_HOST=127.0.0.1 for DB-touching Go tests (and ensure Postgres is up via `docker compose up -d postgres`), or suites silently skip; run tests with -tags=dynamic (confluent-kafka-go) and the Make parallelism flags -p 128 -parallel 16.", + "source": "AGENTS.md Testing; Makefile test" + }, + { + "category": "ci_cd", + "rule": "Never let generated artifacts drift: CI fails if `make update-openapi`, `make generate-javascript-sdk`, or `go generate ./...` produce any git diff or untracked files \u2014 run make generate-all and commit before pushing.", + "source": ".github/workflows/ci.yaml generators-* jobs" + }, + { + "category": "ci_cd", + "rule": "Always keep .nvmrc byte-identical to `nix develop --impure .#ci -c node -v`; CI fails the build job on mismatch and flake.nix enterShell rewrites .nvmrc from `node -v`.", + "source": ".github/workflows/ci.yaml Validate Node version file; flake.nix enterShell; AGENTS.md" + }, + { + "category": "git", + "rule": "tools/migrate/migrations/atlas.sum is append-only; pr-checks.yaml runs check_atlas_sum_append_only.py against the PR base SHA and migrate-check enforces non-linear=error, data_depend=error, incompatible=error (destructive allowed).", + "source": ".github/workflows/pr-checks.yaml; atlas.hcl lint; Makefile migrate-check" + }, + { + "category": "git", + "rule": "Every PR must carry a release-note label (one of release-note/ignore, kind/feature, release-note/feature, kind/bug, release-note/bug-fix, release-note/breaking-change); commit messages must follow Conventional Commits enforced by commitizen/prek (`prek run -a` and `prek run --stage manual` in CI).", + "source": ".github/workflows/pr-checks.yaml release-label; flake.nix git-hooks; .github/workflows/ci.yaml Validate commit messages" + }, + { + "category": "git", + "rule": "End commit messages with the `Co-Authored-By: Claude ...` trailer and PR bodies with the Claude Code generated line; branch off main before committing/pushing and only push when asked.", + "source": "system git instructions; AGENTS.md" + }, + { + "category": "distribution", + "rule": "Container images and Helm charts are tag-only releases pushed to ghcr.io (images ghcr.io/openmeterio/openmeter + benthos-collector multi-arch linux/amd64+arm64; charts to oci://ghcr.io/openmeterio/helm-charts) \u2014 release.yaml jobs gate on github.ref_type == 'tag'.", + "source": ".github/workflows/release.yaml; .github/workflows/artifacts.yaml; deploy/charts/openmeter/Chart.yaml" + }, + { + "category": "distribution", + "rule": "Release tags must match v[0-9]+.[0-9]+.[0-9]+ (optionally -dev.N / -beta.N); main pushes publish a per-commit npm beta (1.0.0-beta-, dist-tag beta) while tags publish latest.", + "source": ".github/workflows/release.yaml on.push.tags + sdk-javascript-meta" + }, + { + "category": "distribution", + "rule": "The npm @openmeter/sdk is published via OIDC Trusted Publishing (id-token: write, no token); the trusted publisher entry is keyed on the caller workflow file + the `prod` environment, so npm-release.yaml must be invoked from release.yaml and run on a GitHub-hosted runner with NPM_CONFIG_PROVENANCE=true.", + "source": ".github/workflows/npm-release.yaml" + }, + { + "category": "secrets", + "rule": "Provide release secrets via GitHub Actions: GITHUB_TOKEN (GHCR/helm push), POETRY_PYPI_TOKEN_PYPI from secrets.PYPI_TOKEN (PyPI), vars.DEPOT_PROJECT (Depot builds), vars.TEST_CLICKHOUSE_DSN (tests); SVIX_JWT_SECRET=DUMMY_JWT_SECRET is a non-sensitive dev value only.", + "source": ".github/workflows/release.yaml; .github/workflows/ci.yaml; Makefile SVIX_JWT_SECRET" + }, + { + "category": "secrets", + "rule": "Trufflehog secret scanning runs on PRs/pushes to main and fails on findings; never commit real secrets.", + "source": ".github/workflows/security.yaml secret-scanning" + }, + { + "category": "env_setup", + "rule": "Copy config.example.yaml to config.yaml (Make targets do this automatically) and `touch` it whenever config.example.yaml changes, or `make server`/worker targets abort with a diff warning.", + "source": "Makefile server target config.yaml freshness check; AGENTS.md Configuration" + }, + { + "category": "env_setup", + "rule": "Local Postgres DSN is postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable; start dependencies with `make up` (docker compose; profiles dev/redis/webhook control optional services) and stop with `make down`.", + "source": "atlas.hcl; docker-compose.yaml; Makefile up/down" + }, + { + "category": "env_setup", + "rule": "Load the repo environment with direnv (or `direnv exec . `); when direnv/ambient tools are missing, fall back to `nix develop --impure .#ci -c ...`. The Nix shell provides go/node/python/atlasx/golangci-lint/air/helm/benthos/sqlc/spectral/codegraph.", + "source": "AGENTS.md Configuration/Testing; flake.nix packages" + }, + { + "category": "ci_cd", + "rule": "The Go build/test in Docker and Depot CI uses CGO + musl static linking against librdkafka pinned to v2.14.1; redirect GOTMPDIR/TMPDIR to the workspace on Depot runners to avoid ENOSPC in /run.", + "source": "Dockerfile (-tags musl, -linkmode external -extldflags static); flake.nix rdkafka rev v2.14.1; .github/workflows/ci.yaml build/test" + }, + { + "category": "dependency_registry", + "rule": "Keep both Go modules tidy together: `go mod tidy` for the root and `go mod tidy -C collector` for the collector module (which replaces the parent via local replace ../); the collector pulls a large Benthos/Redpanda Connect dependency tree.", + "source": "Makefile mod; collector/go.mod replace directive" + }, + { + "category": "dependency_registry", + "rule": "Drop incidental go.sum additions (e.g. tablewriter) introduced by `make generate` or `atlas migrate diff` unless the task explicitly requires a dependency change.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "ci_cd", + "rule": "The chi-middleware oapi-codegen template is patched: run `make patch-oapi-templates` (copies the vendored template and applies api/v3/templates/chi-middleware.tmpl.patch) before code generation, as `make generate` does automatically.", + "source": "Makefile patch-oapi-templates; .github/workflows/ci.yaml generators-go" + } + ], + "frontend": { + "framework": "none (generated TypeScript SDK only)", + "rendering_strategy": "", + "ui_components": [], + "state_management": { + "approach": "Not applicable \u2014 there is no application UI. The only client surface is the generated @openmeter/sdk npm package (api/client/javascript), an OpenAPI-derived API client. The optional React sub-export (api/client/javascript/src/react/context.tsx) provides only a context/provider/hook to inject an OpenMeter client instance; it holds no application state of its own.", + "global_state": [ + { + "store": "OpenMeterContext (api/client/javascript/src/react/context.tsx)", + "purpose": "React Context whose value is an OpenMeter portal client instance or null (unauthenticated). Created with createContext(null); OpenMeterProvider sets the value and useOpenMeter reads it, throwing only when the context is undefined (used outside a provider). This injects the SDK client; it does not manage any UI/application state." + } + ], + "server_state": "No client-side server-state library (no React Query/SWR/Apollo). Each SDK resource method calls openapi-fetch (this.client.GET/POST/PUT/DELETE/PATCH) and pipes the raw result through transformResponse (api/client/javascript/src/client/utils.ts), which throws HTTPError on resp.error or status >= 400 and recursively decodes ISO date strings to JS Date objects via decodeDates. Callers own any caching/state.", + "local_state": "Not applicable \u2014 no UI components with local state exist.", + "rationale": "OpenMeter is a Go backend/usage-metering platform with no first-party application UI (frontend_ratio = 0.0). The api/client/javascript package is a published API client (@openmeter/sdk), generated from the TypeSpec-derived OpenAPI spec (openapi-typescript + orval). React appears only as a devDependency (react 19.2.5) and a peerDependency (react >=18.0.0) to support the optional /react context export; it is not an application framework here." + }, + "routing": [], + "data_fetching": [ + { + "name": "OpenMeter admin client", + "mechanism": "Class-per-resource wrappers over openapi-fetch (api/client/javascript/src/client/index.ts). The root OpenMeter class creates a typed createClient with optional Bearer auth (Authorization: `Bearer ${apiKey}` when apiKey is set) and a querySerializer (array form/explode, object deepObject/explode) that runs encodeDates to serialize Date -> ISO string. It instantiates resource classes as public fields: addons, apps, billing, customers, debug, entitlementsV1, entitlements, events, features, info, meters, notifications, plans, portal, subjects, subscriptionAddons, subscriptions.", + "when_to_use": "Server-side / admin access to the full OpenMeter API using an API key.", + "examples": [ + "new OpenMeter({ baseUrl, apiKey }).meters.list()", + "openmeter.meters.query(idOrSlug, query) and openmeter.meters.queryPost(...) (api/client/javascript/src/client/meters.ts; queryPost at line 180 for queries exceeding URL length limits)", + "openmeter.events.ingest(...) sends Content-Type: application/cloudevents-batch+json (api/client/javascript/src/client/events.ts line 27)" + ] + }, + { + "name": "OpenMeter portal client", + "mechanism": "Separate minimal class (api/client/javascript/src/portal/index.ts) authenticated by a required portalToken (Authorization: `Bearer ${config.portalToken}`). Exposes exactly one method, query(meterSlug, query?, options?), hitting GET /api/v1/portal/meters/{meterSlug}/query with an explicit Accept: application/json header. Reuses encodeDates/transformResponse from ../client/utils.js. This client is what the React export injects.", + "when_to_use": "End-customer/browser-facing portal access scoped to a portal token; intentionally omits all admin endpoints (capability separation enforced at the type level).", + "examples": [ + "new OpenMeter({ baseUrl: 'https://openmeter.cloud', portalToken }).query('api-requests', { from, to, windowSize: 'DAY' })", + "Injected via OpenMeterProvider value={client} and read with useOpenMeter() (api/client/javascript/src/react/context.tsx)" + ] + }, + { + "name": "RequestOptions / AbortSignal threading", + "mechanism": "Every public SDK method accepts options?: RequestOptions (Pick from api/client/javascript/src/client/common.ts) and spreads ...options into the openapi-fetch call, propagating AbortSignal for cancellation.", + "when_to_use": "To cancel or otherwise control in-flight requests from a caller (e.g. component cleanup).", + "examples": [ + "openmeter.meters.list({ signal: abortController.signal })" + ] + } + ], + "styling": "Not applicable \u2014 no UI, no stylesheets, no component library, no design tokens. The api/client/javascript package uses Biome (biome.json) solely as its linter/formatter; it is not a styling system.", + "key_conventions": [ + "No application UI exists: OpenMeter is a Go usage-metering backend (frontend_ratio = 0.0). The only client-facing surface is the generated @openmeter/sdk npm package under api/client/javascript.", + "SDK is generated-first, wrapper-second: src/client/schemas.ts (openapi-typescript via scripts/generate.ts) and src/zod/index.ts (orval, per orval.config.ts) are generated from the OpenAPI spec and carry 'Do not edit manually' headers \u2014 never hand-edited.", + "Four named sub-package exports in package.json: '.' (admin client -> dist/index.js), './portal' (portal-token client), './react' (React context/provider/hook), './zod' (orval-generated Zod schemas). New resource classes are registered as public fields on the root OpenMeter class in src/client/index.ts.", + "One file per domain resource under src/client/ (addons.ts, apps.ts, billing.ts, customers.ts, events.ts, meters.ts, notifications.ts, plans.ts, subscriptions.ts, etc.); each exports a class taking Client and returning transformResponse(resp) \u2014 callers never read resp.data directly.", + "Centralized date handling (api/client/javascript/src/client/utils.ts): encodeDates (Date -> ISO string) is applied in the querySerializer; decodeDates (ISO string -> Date, matched by ISODateFormat regex) runs inside transformResponse.", + "Error handling: transformResponse throws HTTPError (api/client/javascript/src/client/common.ts) on resp.error or HTTP status >= 400; HTTPError.fromResponse extracts problem.detail/type/title/status when Content-Type is application/problem+json (RFC 7807); isHTTPError is the type guard.", + "React integration (src/react/context.tsx) is the only .tsx file; it carries the 'use client' directive (first line) for Next.js App Router compatibility, re-exports the portal surface wholesale (export * from '../portal/index.js'), and provides only Context plumbing (OpenMeterContext / OpenMeterProvider / useOpenMeter) \u2014 no rendered UI.", + "Tooling: pnpm package manager (pinned in package.json), dual ESM/CJS build via @knighted/duel, Node >= 22 engine, Vitest tests colocated as *.spec.ts (e.g. src/client/events.spec.ts) using @fetch-mock/vitest. Published library supports React >=18 via peerDependency.", + "The quickstart/ directory is a Go + docker-compose deployment example (quickstart/quickstart_test.go, docker-compose.yaml, config.yaml), not a web UI." + ] + }, + "data_overview": "OpenMeter persists its control-plane state in PostgreSQL via the Ent ORM (~70 tables across customer, entitlement/credit, productcatalog, subscription, billing, charges, ledger, notification, and app domains; source of truth is openmeter/ent/schema/*.go, Atlas migrations under tools/migrate/migrations/). Raw usage events live in ClickHouse (per-namespace om__events MergeTree table) and flow there through per-namespace Kafka ingest topics consumed by the sink-worker; Redis backs event deduplication and async query progress tracking. Almost every Postgres table is multi-tenant (namespace-scoped), uses ULID char(26) ids, and soft-deletes via deleted_at.", + "data_models": [ + { + "name": "Customer", + "description": "A billable end-customer; carries billing address snapshot fields and an optional currency, and fans out to subscriptions, entitlements, charges and billing overrides (see openmeter/ent/schema/customer.go:16).", + "location": "openmeter/ent/schema/customer.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/customer", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "billing_address_country", + "type": "char(2)" + }, + { + "name": "billing_address_postal_code", + "type": "TEXT" + }, + { + "name": "billing_address_state", + "type": "TEXT" + }, + { + "name": "billing_address_city", + "type": "TEXT" + }, + { + "name": "billing_address_line1", + "type": "TEXT" + }, + { + "name": "billing_address_line2", + "type": "TEXT" + }, + { + "name": "billing_address_phone_number", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT", + "description": "External-facing stable customer key; stored as empty string (not NULL) when unset so a unique index can be applied (see openmeter/ent/schema/customer.go:33)." + }, + { + "name": "primary_email", + "type": "TEXT" + }, + { + "name": "currency", + "type": "char(3)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:58)", + "INDEX(name), INDEX(primary_email), INDEX(created_at)", + "soft_delete (deleted_at)", + "audit (created_at, updated_at)", + "FK apps/subjects/billing_customer_override \u2192 ON DELETE CASCADE (see openmeter/ent/schema/customer.go:73)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Add the column to Customer.Fields() in openmeter/ent/schema/customer.go, run `make generate`, then `atlas migrate --env local diff ` to emit the SQL under tools/migrate/migrations/.", + "example": "field.String(\"key\").Optional()," + }, + "how_to_modify": { + "prose": "Never edit historical migrations; add a new ent field/index and generate a new migration. The committed v3 list-filter TODO in customer.go warns to add pg_trgm GIN indexes via a custom SQL migration before exposing ILIKE contains filters.", + "example": "" + }, + "how_to_read": { + "prose": "Through the customer adapter/service; the schema notes the v3 list API exposes case-insensitive contains filters compiling to ILIKE.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CustomerSubjects", + "description": "Join table linking a Customer to one or more subject keys (the metering identity); FK to Subject.key is intentionally absent because Ent cannot FK non-ID fields (see openmeter/ent/schema/customer.go:147).", + "location": "openmeter/ent/schema/customer.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/customer", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "subject_key", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "UNIQUE(namespace, subject_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:123)", + "FK customer_id \u2192 customers.id ON DELETE CASCADE", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit CustomerSubjects in customer.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Subject", + "description": "The metered identity (e.g. a user/account key) that events are attributed to; carries optional stripe_customer_id and free-form metadata (see openmeter/ent/schema/subject.go:13).", + "location": "openmeter/ent/schema/subject.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subject", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "display_name", + "type": "TEXT" + }, + { + "name": "stripe_customer_id", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/subject.go:45)", + "UNIQUE(namespace, id)", + "INDEX(display_name), INDEX(created_at, id)", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Subject.Fields() in subject.go, regenerate and diff a migration.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Meter", + "description": "Definition of how to aggregate raw usage events (event_type + aggregation + optional value_property/group_by) into a metered value; event_from bounds which events count (see openmeter/ent/schema/meter.go:14).", + "location": "openmeter/ent/schema/meter.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/meter", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "event_type", + "type": "TEXT", + "description": "CloudEvents `type` value this meter filters on when scanning the ClickHouse events table (see openmeter/ent/schema/meter.go:30)." + }, + { + "name": "value_property", + "type": "TEXT", + "description": "JSONPath into the event data extracting the numeric value; optional for COUNT aggregation (see openmeter/ent/schema/meter.go:32)." + }, + { + "name": "group_by", + "type": "jsonb" + }, + { + "name": "aggregation", + "type": "enum" + }, + { + "name": "event_from", + "type": "TIMESTAMPTZ", + "description": "If set, only events at/after this time are included in the meter (see openmeter/ent/schema/meter.go:36)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/meter.go:43)", + "INDEX(namespace, event_type)", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Meter.Fields() and regenerate. Meters are the bridge between Postgres definitions and the ClickHouse om__events table queried by openmeter/streaming/clickhouse/meter_query.go.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Meter aggregation queries run against ClickHouse via the streaming connector, not Postgres.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Feature", + "description": "A purchasable/grantable capability tied to a meter; holds unit-cost configuration (manual amount or LLM-provider/model/token pricing) and is archived via archived_at rather than deleted (see openmeter/ent/schema/feature.go:17).", + "location": "openmeter/ent/schema/feature.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog/feature", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "meter_slug", + "type": "TEXT", + "description": "Deprecated meter reference by slug; to be removed in Phase 2 in favor of meter_id (see openmeter/ent/schema/feature.go:35)." + }, + { + "name": "meter_id", + "type": "TEXT" + }, + { + "name": "meter_group_by_filters", + "type": "jsonb" + }, + { + "name": "advanced_meter_group_by_filters", + "type": "jsonb" + }, + { + "name": "unit_cost_type", + "type": "TEXT" + }, + { + "name": "unit_cost_manual_amount", + "type": "numeric" + }, + { + "name": "unit_cost_llm_provider_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_provider", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_model_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_model", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_token_type_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_token_type", + "type": "TEXT" + }, + { + "name": "archived_at", + "type": "TIMESTAMPTZ", + "description": "Soft-archive timestamp; features are uniqueness-scoped to archived_at IS NULL rather than deleted_at (see openmeter/ent/schema/feature.go:67)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE archived_at IS NULL (see openmeter/ent/schema/feature.go:66)", + "CHECK unit_cost_llm_{provider,model,token_type} property vs literal mutually exclusive (see openmeter/ent/schema/feature.go:55)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Feature.Fields() and Annotations() (for CHECK constraints) in feature.go, regenerate, diff a migration.", + "example": "entsql.Checks(map[string]string{\n \"unit_cost_llm_provider_mutual_exclusive\": \"NOT (unit_cost_llm_provider_property IS NOT NULL AND unit_cost_llm_provider IS NOT NULL)\",\n})" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Entitlement", + "description": "A customer's right to consume a feature (metered, boolean, or static); anchors usage periods and links to grants, usage resets and balance snapshots (see openmeter/ent/schema/entitlement.go:20).", + "location": "openmeter/ent/schema/entitlement.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/entitlement", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "entitlement_type", + "type": "enum" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "feature_key", + "type": "TEXT", + "description": "Validated to reject valid ULIDs so feature keys never collide with ids (see openmeter/ent/schema/entitlement.go:41)." + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "measure_usage_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "issue_after_reset", + "type": "FLOAT" + }, + { + "name": "issue_after_reset_priority", + "type": "uint8" + }, + { + "name": "is_soft_limit", + "type": "BOOL" + }, + { + "name": "preserve_overage_at_reset", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb" + }, + { + "name": "usage_period_interval", + "type": "TEXT", + "description": "ISO8601 duration string defining the recurring usage period (see openmeter/ent/schema/entitlement.go:61)." + }, + { + "name": "usage_period_anchor", + "type": "TIMESTAMPTZ", + "description": "Original anchor time; no longer overwritten on reset \u2014 the effective anchor is derived from the last UsageReset queried dynamically (see openmeter/ent/schema/entitlement.go:62)." + }, + { + "name": "current_usage_period_start", + "type": "TIMESTAMPTZ", + "description": "Denormalized current-period start; schema TODO marks it for removal in favor of calculation (see openmeter/ent/schema/entitlement.go:63)." + }, + { + "name": "current_usage_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(created_at, id) (see openmeter/ent/schema/entitlement.go:85)", + "INDEX(current_usage_period_end, deleted_at) \u2014 used to collect entitlements with due resets (see openmeter/ent/schema/entitlement.go:84)", + "FK feature_id \u2192 features.id, FK customer_id \u2192 customers.id", + "child usage_reset/grant/balance_snapshot ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Entitlement.Fields() in entitlement.go and regenerate; many fields are Immutable and Nillable. The current_usage_period_* columns are slated for removal in favor of dynamic computation.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Grant", + "description": "A credit grant against an entitlement (owner_id) with amount, priority, expiration and recurrence; voided_at soft-voids it (see openmeter/ent/schema/grant.go:15).", + "location": "openmeter/ent/schema/grant.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/credit/grant", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "owner_id", + "type": "char(26)", + "description": "Entitlement id this grant belongs to (FK to entitlements via the grant edge) (see openmeter/ent/schema/grant.go:67)." + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "priority", + "type": "uint8" + }, + { + "name": "effective_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "expiration", + "type": "jsonb" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "voided_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "reset_max_rollover", + "type": "numeric" + }, + { + "name": "reset_min_rollover", + "type": "numeric" + }, + { + "name": "recurrence_period", + "type": "TEXT" + }, + { + "name": "recurrence_anchor", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, owner_id), INDEX(effective_at, expires_at)", + "FK owner_id \u2192 entitlements.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Grant.Fields() in grant.go, regenerate, diff migration.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BalanceSnapshot", + "description": "Cached point-in-time credit balance for an entitlement owner (grant_balances + usage + overage at a timestamp), used to avoid recomputing the full ledger from scratch (see openmeter/ent/schema/balance_snapshot.go:15).", + "location": "openmeter/ent/schema/balance_snapshot.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/credit/balance", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "owner_id", + "type": "char(26)" + }, + { + "name": "grant_balances", + "type": "jsonb" + }, + { + "name": "usage", + "type": "jsonb" + }, + { + "name": "balance", + "type": "numeric" + }, + { + "name": "overage", + "type": "numeric" + }, + { + "name": "at", + "type": "TIMESTAMPTZ", + "description": "The instant this balance was snapshotted; queried as the high-water mark for resuming balance computation (see openmeter/ent/schema/balance_snapshot.go:43)." + } + ], + "guarantees": [ + "INDEX(namespace, owner_id, at) WHERE deleted_at IS NULL (see openmeter/ent/schema/balance_snapshot.go:49)", + "FK owner_id \u2192 entitlements.id ON DELETE CASCADE", + "all value fields Immutable" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BalanceSnapshot.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "UsageReset", + "description": "Records an entitlement usage-period reset event (reset_time + anchor + interval); the entitlement's effective anchor is derived from the latest reset rather than from the entitlement row (see openmeter/ent/schema/usage_reset.go:14).", + "location": "openmeter/ent/schema/usage_reset.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/entitlement", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "entitlement_id", + "type": "char(26)" + }, + { + "name": "reset_time", + "type": "TIMESTAMPTZ" + }, + { + "name": "anchor", + "type": "TIMESTAMPTZ" + }, + { + "name": "usage_period_interval", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, entitlement_id, reset_time)", + "FK entitlement_id \u2192 entitlements.id ON DELETE CASCADE", + "all fields Immutable" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit UsageReset.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Plan", + "description": "A versioned product-catalog plan (key + version) with default billing cadence, pro-rating config, settlement mode and effective window; phases hang off it (see openmeter/ent/schema/productcatalog.go:16).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "version", + "type": "INT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "pro_rating_config", + "type": "jsonb" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum", + "description": "Defaults to credit-then-invoice settlement (see openmeter/ent/schema/productcatalog.go:57)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:78)", + "version >= 1", + "phases/addons ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Plan.Fields() in productcatalog.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanPhase", + "description": "An ordered phase within a Plan (index + optional duration) that groups ratecards (see openmeter/ent/schema/productcatalog.go:86).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "index", + "type": "uint8" + }, + { + "name": "duration", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(plan_id, key) WHERE deleted_at IS NULL", + "UNIQUE(plan_id, index) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:133)", + "ratecards ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit PlanPhase.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanRateCard", + "description": "A ratecard within a plan phase (shared RateCard mixin: type, price, entitlement_template, discounts, tax) referencing an optional feature (see openmeter/ent/schema/productcatalog.go:141).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "entitlement_template", + "type": "jsonb" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "phase_id", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(phase_id, key) WHERE deleted_at IS NULL", + "UNIQUE(phase_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:193)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "RateCard fields come from the shared RateCard mixin in ratecard.go; phase_id/feature_id are added in PlanRateCard.Fields(). Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Addon", + "description": "A versioned add-on product (single or multi instance) that can be attached to plans and subscriptions; annotations are GIN-indexed (see openmeter/ent/schema/addon.go:16).", + "location": "openmeter/ent/schema/addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "version", + "type": "INT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "instance_type", + "type": "enum" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:72)", + "GIN INDEX(annotations)", + "ratecards/plans/subscription_addons ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Addon.Fields() in addon.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AddonRateCard", + "description": "RateCard belonging to an Addon (same RateCard mixin shape as PlanRateCard) (see openmeter/ent/schema/addon.go:87).", + "location": "openmeter/ent/schema/addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(addon_id, key) WHERE deleted_at IS NULL", + "UNIQUE(addon_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:139)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit AddonRateCard.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanAddon", + "description": "Join table declaring which Addon is available for a Plan, from which phase and up to what quantity (see openmeter/ent/schema/planaddon.go:13).", + "location": "openmeter/ent/schema/planaddon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "from_plan_phase", + "type": "TEXT" + }, + { + "name": "max_quantity", + "type": "INT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, plan_id, addon_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/planaddon.go:65)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit PlanAddon.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Subscription", + "description": "An active customer subscription instance with cadenced active window, currency, billing anchor/cadence, pro-rating and settlement mode; root of phases/items and billing/charge edges (see openmeter/ent/schema/subscription.go:18).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "TEXT" + }, + { + "name": "currency", + "type": "char(3)" + }, + { + "name": "billing_anchor", + "type": "TIMESTAMPTZ" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "pro_rating_config", + "type": "jsonb" + }, + { + "name": "settlement_mode", + "type": "enum" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, customer_id)", + "FK customer_id \u2192 customers.id (required, immutable)", + "phases/addons/billing_sync_state ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Subscription.Fields() in subscription.go and regenerate. Subscription is cadenced (active_from/active_to via CadencedMixin).", + "example": "" + }, + "how_to_modify": { + "prose": "See the /subscription skill for the sync algorithm; subscription edits drive billing/charge reconciliation.", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionPhase", + "description": "A time-bounded phase of a subscription; sort_hint disambiguates phases that share an active_from (zero-length phases) (see openmeter/ent/schema/subscription.go:95).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "subscription_id", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "sort_hint", + "type": "uint8", + "description": "Tie-breaker for ordering phases with equal active_from (see openmeter/ent/schema/subscription.go:115)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, subscription_id, key)", + "FK subscription_id \u2192 subscriptions.id ON DELETE CASCADE", + "items ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionPhase.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionItem", + "description": "A ratecard-instance inside a phase carrying its own mutable cadence and effective price/entitlement/discount config; active_*_override_relative_to_phase_start preserves intended cadence across edits/cancels (see openmeter/ent/schema/subscription.go:141).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "phase_id", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "entitlement_id", + "type": "TEXT" + }, + { + "name": "restarts_billing_period", + "type": "BOOL" + }, + { + "name": "active_from_override_relative_to_phase_start", + "type": "TEXT", + "description": "ISO duration offset from phase start preserving the intended item cadence across edits/cancels (see openmeter/ent/schema/subscription.go:173)." + }, + { + "name": "active_to_override_relative_to_phase_start", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "entitlement_template", + "type": "jsonb" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, phase_id, key)", + "FK phase_id \u2192 subscription_phases.id, FK entitlement_id \u2192 entitlements.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionItem.Fields() and regenerate. Note items are intentionally NOT cadenced via CadencedMixin because their cadence is mutable.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionAddon", + "description": "An instantiated addon attached to a subscription; quantity history lives in SubscriptionAddonQuantity (see openmeter/ent/schema/subscription_addon.go:14).", + "location": "openmeter/ent/schema/subscription_addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "subscription_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "FK subscription_id \u2192 subscriptions.id (required), FK addon_id \u2192 addons.id (required)", + "quantities ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionAddon.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionAddonQuantity", + "description": "Append-only quantity-over-time records for a SubscriptionAddon (active_from + immutable quantity) (see openmeter/ent/schema/subscription_addon.go:56).", + "location": "openmeter/ent/schema/subscription_addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "quantity", + "type": "INT" + }, + { + "name": "subscription_addon_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "quantity >= 0, immutable", + "FK subscription_addon_id \u2192 subscription_addons.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionAddonQuantity.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionBillingSyncState", + "description": "Per-subscription bookkeeping for the billing sync bridge: whether it has billables, when it was last synced, and when the next sync is due (see openmeter/ent/schema/subscriptionbillingsync.go:13).", + "location": "openmeter/ent/schema/subscriptionbillingsync.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/worker/subscriptionsync", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "subscription_id", + "type": "char(26)" + }, + { + "name": "has_billables", + "type": "BOOL" + }, + { + "name": "synced_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "next_sync_after", + "type": "TIMESTAMPTZ", + "description": "Schedules the next reconciliation pass; NULL means no pending re-sync (see openmeter/ent/schema/subscriptionbillingsync.go:28)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, subscription_id) (see openmeter/ent/schema/subscriptionbillingsync.go:41)", + "FK subscription_id \u2192 subscriptions.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionBillingSyncState.Fields() and regenerate. This table has no TimeMixin (no created/updated/deleted_at).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingProfile", + "description": "A billing configuration tying supplier identity + tax/invoicing/payment apps + workflow config; one default per namespace (see openmeter/ent/schema/billing.go:28).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "supplier_address_*", + "type": "TEXT" + }, + { + "name": "tax_app_id", + "type": "char(26)" + }, + { + "name": "invoicing_app_id", + "type": "char(26)" + }, + { + "name": "payment_app_id", + "type": "char(26)" + }, + { + "name": "workflow_config_id", + "type": "TEXT" + }, + { + "name": "default", + "type": "BOOL" + }, + { + "name": "supplier_name", + "type": "TEXT" + }, + { + "name": "supplier_tax_code", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, default) WHERE \"default\" AND deleted_at IS NULL \u2014 at most one default profile per namespace (see openmeter/ent/schema/billing.go:102)", + "FK tax_app/invoicing_app/payment_app \u2192 apps.id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingProfile.Fields() in billing.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingWorkflowConfig", + "description": "Cloneable invoicing workflow settings (collection alignment, draft/due periods, auto-advance, progressive billing, tax enable/enforce) referenced by profiles, overrides and invoices (see openmeter/ent/schema/billing.go:110).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "collection_alignment", + "type": "enum" + }, + { + "name": "anchored_alignment_detail", + "type": "jsonb" + }, + { + "name": "line_collection_period", + "type": "TEXT" + }, + { + "name": "invoice_auto_advance", + "type": "BOOL" + }, + { + "name": "invoice_draft_period", + "type": "TEXT" + }, + { + "name": "invoice_due_after", + "type": "TEXT" + }, + { + "name": "invoice_collection_method", + "type": "enum" + }, + { + "name": "invoice_progressive_billing", + "type": "BOOL" + }, + { + "name": "invoice_default_tax_settings", + "type": "jsonb" + }, + { + "name": "tax_enabled", + "type": "BOOL" + }, + { + "name": "tax_enforced", + "type": "BOOL" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingWorkflowConfig.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingCustomerOverride", + "description": "Per-customer overrides of billing profile / workflow settings (one per customer); NULL override fields fall back to the profile (see openmeter/ent/schema/billing.go:178).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "billing_profile_id", + "type": "char(26)" + }, + { + "name": "collection_alignment", + "type": "enum" + }, + { + "name": "anchored_alignment_detail", + "type": "jsonb" + }, + { + "name": "line_collection_period", + "type": "TEXT" + }, + { + "name": "invoice_auto_advance", + "type": "BOOL" + }, + { + "name": "invoice_draft_period", + "type": "TEXT" + }, + { + "name": "invoice_due_after", + "type": "TEXT" + }, + { + "name": "invoice_collection_method", + "type": "enum" + }, + { + "name": "invoice_progressive_billing", + "type": "BOOL" + }, + { + "name": "invoice_default_tax_config", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:258)", + "FK customer_id \u2192 customers.id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingCustomerOverride.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoice", + "description": "An invoice in gathering or standard state, snapshotting customer/supplier identity, addresses, cloned profile settings and lifecycle timestamps; status_details_cache is GIN-indexed and collection_at has dual gathering/standard semantics (see openmeter/ent/schema/billing.go:1018).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "supplier_name", + "type": "TEXT" + }, + { + "name": "supplier_tax_code", + "type": "TEXT" + }, + { + "name": "customer_key", + "type": "TEXT" + }, + { + "name": "customer_name", + "type": "TEXT" + }, + { + "name": "customer_usage_attribution", + "type": "jsonb" + }, + { + "name": "number", + "type": "TEXT" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "source_billing_profile_id", + "type": "char(26)" + }, + { + "name": "voided_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "issued_at", + "type": "TIMESTAMPTZ", + "description": "Can be in the future for pre-issued invoices (see openmeter/ent/schema/billing.go:1087)." + }, + { + "name": "sent_to_customer_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "draft_until", + "type": "TIMESTAMPTZ" + }, + { + "name": "quantity_snapshoted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "due_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "status", + "type": "enum" + }, + { + "name": "status_details_cache", + "type": "jsonb" + }, + { + "name": "workflow_config_id", + "type": "char(26)" + }, + { + "name": "tax_app_id", + "type": "char(26)" + }, + { + "name": "invoicing_app_id", + "type": "char(26)" + }, + { + "name": "payment_app_id", + "type": "char(26)" + }, + { + "name": "period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "collection_at", + "type": "TIMESTAMPTZ", + "description": "Dual purpose: on gathering invoices defines when pending lines collect into a draft; on standard invoices the post-creation collection/snapshot cutoff for metered lines (see openmeter/ent/schema/billing.go:1154)." + }, + { + "name": "payment_processing_entered_at", + "type": "TIMESTAMPTZ", + "description": "When the invoice first entered payment-processing; used for staleness/fraud guarding (see openmeter/ent/schema/billing.go:1164)." + }, + { + "name": "schema_level", + "type": "INT", + "description": "Write schema version used during the in-progress invoice-line migration (see openmeter/ent/schema/billing.go:1170)." + }, + { + "name": "supplier_address_*", + "type": "TEXT" + }, + { + "name": "customer_address_*", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id, currency) WHERE deleted_at IS NULL AND status = 'gathering' \u2014 one gathering invoice per customer+currency (see openmeter/ent/schema/billing.go:1193)", + "GIN INDEX(status_details_cache)", + "INDEX(namespace, status), INDEX(namespace, issued_at)", + "FK source_billing_profile_id immutable (profile change forces void)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingInvoice.Fields() in billing.go and regenerate. Invoice has supplier AND customer address mixins (two CustomerAddressMixin prefixes).", + "example": "" + }, + "how_to_modify": { + "prose": "See the /billing skill for the invoice state machine.", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLine", + "description": "The primary invoice line table (flat-fee or usage-based) carrying service/billing period, managed_by, parent_line hierarchy, subscription+charge linkage and totals; intended to eventually absorb the ubp line config (see openmeter/ent/schema/billing.go:303).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name/description/metadata/annotations", + "type": "TEXT/jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "managed_by", + "type": "enum" + }, + { + "name": "parent_line_id", + "type": "char(26)" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "override_collection_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "status", + "type": "enum" + }, + { + "name": "quantity", + "type": "numeric", + "description": "Optional; for usage-based billing it is only persisted when the invoice is issued (see openmeter/ent/schema/billing.go:352)." + }, + { + "name": "ratecard_discounts", + "type": "jsonb" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT", + "description": "Stable key per parent line for upserting/identifying lines created for the same reason (e.g. tiered price tier) across invoices (see openmeter/ent/schema/billing.go:370)." + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "subscription_billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "split_line_group_id", + "type": "char(26)" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "engine", + "type": "enum" + }, + { + "name": "line_ids", + "type": "char(26)", + "description": "Deprecated: invoice discounts moved to line_discounts (see openmeter/ent/schema/billing.go:416)." + }, + { + "name": "credits_applied", + "type": "jsonb" + }, + { + "name": "amount/totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:440)", + "FK invoice_id \u2192 billing_invoices.id (required)", + "detailed_lines/discount children ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingInvoiceLine.Fields() in billing.go and regenerate. This table aggregates several mixins (Annotations, Resource, InvoiceLineBase, Tax, totals, externalid.Line).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceFlatFeeLineConfig", + "description": "Per-unit amount + category + payment term config for a flat-fee invoice line (see openmeter/ent/schema/billing.go:511).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "per_unit_amount", + "type": "numeric" + }, + { + "name": "category", + "type": "enum" + }, + { + "name": "payment_term", + "type": "enum" + }, + { + "name": "index", + "type": "INT", + "description": "Sort order, only meaningful for detailed lines (see openmeter/ent/schema/billing.go:534)." + } + ], + "guarantees": [ + "PK id" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceUsageBasedLineConfig", + "description": "Usage-based line config: price type, feature key, price JSON and pre-line/metered quantities (see openmeter/ent/schema/billing.go:541).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "price_type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "metered_pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "metered_quantity", + "type": "numeric" + } + ], + "guarantees": [ + "PK id" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceSplitLineGroup", + "description": "Groups invoice lines that result from splitting a single usage-based service period across progressive-billing invoices; tax fields are deprecated here (see openmeter/ent/schema/billing.go:611).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "tax_config", + "type": "jsonb", + "description": "Deprecated: split groups no longer carry tax config (see openmeter/ent/schema/billing.go:631)." + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "service_period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "service_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "unique_reference_id", + "type": "TEXT" + }, + { + "name": "ratecard_discounts", + "type": "jsonb" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "subscription_billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "charge_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:717)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLineDiscount", + "description": "Amount discount applied to an invoice line (reason + amount + rounding); several quantity fields are deprecated after splitting amount vs usage discount tables (see openmeter/ent/schema/billing.go:755).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "rounding_amount", + "type": "numeric" + }, + { + "name": "source_discount", + "type": "jsonb" + }, + { + "name": "type", + "type": "TEXT", + "description": "Deprecated after splitting amount/usage discount tables (see openmeter/ent/schema/billing.go:793)." + }, + { + "name": "quantity", + "type": "numeric" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:820)", + "FK line_id \u2192 billing_invoice_lines.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLineUsageDiscount", + "description": "Usage (quantity) discount applied to a usage-based invoice line (see openmeter/ent/schema/billing.go:838).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "quantity", + "type": "numeric" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "reason_details", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL", + "FK line_id \u2192 billing_invoice_lines.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingStandardInvoiceDetailedLine", + "description": "Detailed (child) line of a standard invoice produced by the v2 line model, linked to a parent BillingInvoiceLine (see openmeter/ent/schema/billing.go:898).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "parent_line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/billing.go:926)", + "FK invoice_id, parent_line_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Fields come mostly from stddetailedline.Mixin. Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingStandardInvoiceDetailedLineAmountDiscount", + "description": "Amount discount on a standard-invoice detailed line (see openmeter/ent/schema/billing.go:956).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "rounding_amount", + "type": "numeric" + }, + { + "name": "source_discount", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:996)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceValidationIssue", + "description": "A validation issue attached to an invoice, deduped per invoice via a 32-byte dedupe_hash (see openmeter/ent/schema/billing.go:1249).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "severity", + "type": "enum" + }, + { + "name": "code", + "type": "TEXT" + }, + { + "name": "message", + "type": "TEXT" + }, + { + "name": "path", + "type": "TEXT" + }, + { + "name": "component", + "type": "TEXT" + }, + { + "name": "dedupe_hash", + "type": "bytea(32)", + "description": "32-byte hash that dedupes identical issues per invoice via the unique index (see openmeter/ent/schema/billing.go:1286)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, invoice_id, dedupe_hash) (see openmeter/ent/schema/billing.go:1294)", + "FK invoice_id \u2192 billing_invoices.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingSequenceNumbers", + "description": "Monotonic counter per (namespace, scope) for generating invoice numbers (see openmeter/ent/schema/billing.go:1308).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "scope", + "type": "TEXT" + }, + { + "name": "last", + "type": "numeric" + } + ], + "guarantees": [ + "UNIQUE(namespace, scope) (see openmeter/ent/schema/billing.go:1330)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. No id/audit columns \u2014 keyed by (namespace, scope).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingCustomerLock", + "description": "Row used as a per-customer advisory lock during billing mutations (one row per customer) (see openmeter/ent/schema/billing.go:1334).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:1356)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Locked via SELECT ... FOR UPDATE during billing mutations.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceWriteSchemaLevel", + "description": "Temporary single-row-keyed table tracking the active write schema level for billing invoices during the line-model migration (see openmeter/ent/schema/billing.go:1363).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "TEXT" + }, + { + "name": "schema_level", + "type": "INT" + } + ], + "guarantees": [ + "PK id (UNIQUE)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Temporary migration table; no mixins. Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Charge", + "description": "Polymorphic parent row for a billable charge; exactly one of the three per-type FK columns (flat_fee/credit_purchase/usage_based) points to the subtype, with unique_reference_id for idempotent creation (see openmeter/ent/schema/charges.go:96).", + "location": "openmeter/ent/schema/charges.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "unique_reference_id", + "type": "TEXT", + "description": "Idempotency key for a charge; uniqueness is enforced only when set and not deleted (see openmeter/ent/schema/charges.go:116)." + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "charge_flat_fee_id", + "type": "TEXT" + }, + { + "name": "charge_credit_purchase_id", + "type": "TEXT" + }, + { + "name": "charge_usage_based_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/charges.go:167)", + "exactly one of the three subtype FK columns is set" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Charge.Fields() in charges.go and regenerate. See the /charges skill for charge creation and advancement.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "The ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables) provides a unified read surface (see openmeter/ent/schema/charges.go:48).", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargesSearchV1", + "description": "Postgres VIEW UNION-ALLing charge_credit_purchases, charge_flat_fees and charge_usage_based into a unified searchable charge-meta surface; declared as ent.View with no mixins (see openmeter/ent/schema/charges.go:48).", + "location": "openmeter/ent/schema/charges.go", + "kind": "value_object", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/meta", + "fields": [ + { + "name": "type", + "type": "enum" + }, + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "status", + "type": "TEXT" + }, + { + "name": "unique_reference_id", + "type": "TEXT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "managed_by", + "type": "TEXT" + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "advance_after", + "type": "TIMESTAMPTZ" + }, + { + "name": "service_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "TEXT" + } + ], + "guarantees": [ + "read-only view; per AGENTS.md ent.View DDL may need explicit SQL migration (not in migrate.Tables)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Modify buildChargesSearchV1TableSelector / chargesSearchV1Columns in charges.go. Per the AGENTS.md ent.View caveat, view DDL may need a hand-written SQL migration since views don't appear in generated migrate.Tables.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeFlatFee", + "description": "Flat-fee charge subtype: payment term, pro-rating, pre/post-proration amounts, settlement and detailed status; has realization runs (see openmeter/ent/schema/chargesflatfee.go:23).", + "location": "openmeter/ent/schema/chargesflatfee.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/flatfee", + "fields": [ + { + "name": "id (chargemeta.Mixin)", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "payment_term", + "type": "TEXT" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "pro_rating", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "amount_before_proration", + "type": "numeric" + }, + { + "name": "amount_after_proration", + "type": "numeric" + }, + { + "name": "current_realization_run_id", + "type": "char(26)" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "tax_code FK ON DELETE SET NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeFlatFee.Fields() in chargesflatfee.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeFlatFeeRun", + "description": "A realization run for a flat-fee charge over a service period, producing detailed lines / payment / invoiced-usage and linking to invoice lines (see openmeter/ent/schema/chargesflatfee.go:141).", + "location": "openmeter/ent/schema/chargesflatfee.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/flatfee", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "initial_type", + "type": "enum" + }, + { + "name": "service_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "amount_after_proration", + "type": "numeric" + }, + { + "name": "no_fiat_transaction_required", + "type": "BOOL" + }, + { + "name": "immutable", + "type": "BOOL" + }, + { + "name": "totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, charge_id)", + "line_id/invoice_id FK ON DELETE SET NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeFlatFeeRun.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBased", + "description": "Usage-based charge subtype tied to a feature with rating engine, price JSON and realization runs; table explicitly named charge_usage_based (see openmeter/ent/schema/chargesusagebased.go:24).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "rating_engine", + "type": "enum" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "current_realization_run_id", + "type": "char(26)" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "FK feature_id \u2192 features.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeUsageBased.Fields() in chargesusagebased.go and regenerate. Note Annotations() forces table name to charge_usage_based.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBasedRuns", + "description": "A realization run for a usage-based charge; stored_at_lt is the late-arriving-event cutoff and metered_quantity the measured usage for the period (see openmeter/ent/schema/chargesusagebased.go:143).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "initial_type", + "type": "enum" + }, + { + "name": "stored_at_lt", + "type": "TIMESTAMPTZ", + "description": "Upper bound on event stored_at included in this run, implementing the late-arriving usage cutoff (see openmeter/ent/schema/chargesusagebased.go:179)." + }, + { + "name": "service_period_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "detailed_lines_present", + "type": "BOOL" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "metered_quantity", + "type": "numeric" + }, + { + "name": "no_fiat_transaction_required", + "type": "BOOL" + }, + { + "name": "totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, charge_id)", + "FK feature_id \u2192 features.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeUsageBasedRuns.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBasedRunDetailedLine", + "description": "Detailed (priced) line produced by a usage-based realization run; corrects_run_id links a correction line back to a superseded run (see openmeter/ent/schema/chargesusagebased.go:260).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "run_id", + "type": "char(26)" + }, + { + "name": "pricer_reference_id", + "type": "TEXT" + }, + { + "name": "corrects_run_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id (stddetailedline.Mixin)", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, charge_id, run_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/chargesusagebased.go:324)", + "table explicitly named charge_usage_based_run_detailed_line" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeCreditPurchase", + "description": "Credit-purchase charge subtype: credit amount, effective/expiry window, priority, feature filters, settlement JSON and detailed status; links to a granted credit + payment edges (see openmeter/ent/schema/chargescreditpurchase.go:21).", + "location": "openmeter/ent/schema/chargescreditpurchase.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditpurchase", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "credit_amount", + "type": "numeric" + }, + { + "name": "effective_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "priority", + "type": "INT" + }, + { + "name": "feature_filters", + "type": "text[]", + "description": "Restricts which features the purchased credit applies to (added in migration 20260605120000) (see openmeter/ent/schema/chargescreditpurchase.go:50)." + }, + { + "name": "settlement", + "type": "jsonb" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "FK customer_id \u2192 customers.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeCreditPurchase.Fields() in chargescreditpurchase.go and regenerate. feature_filters was added via tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql.", + "example": "ALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"feature_filters\" text[] NULL;" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CreditRealizationLineage", + "description": "Tracks the lineage of a realized credit allocation for a charge (root_realization_id + origin_kind + advance_features), with closeable segments (see openmeter/ent/schema/creditrealizationlineage.go:24).", + "location": "openmeter/ent/schema/creditrealizationlineage.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditrealization", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "root_realization_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "origin_kind", + "type": "enum" + }, + { + "name": "advance_features", + "type": "text[]", + "description": "Feature filters carried by the originating advance (added in migration 20260605120000) (see openmeter/ent/schema/creditrealizationlineage.go:65)." + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, root_realization_id) (see openmeter/ent/schema/creditrealizationlineage.go:91)", + "FK charge_id \u2192 charges.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit CreditRealizationLineage.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CreditRealizationLineageSegment", + "description": "A segment of a credit realization lineage tracking amount + state transitions and backing transaction groups; closed_at marks settlement (see openmeter/ent/schema/creditrealizationlineage.go:97).", + "location": "openmeter/ent/schema/creditrealizationlineage.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditrealization", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "lineage_id", + "type": "char(26)" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "state", + "type": "enum" + }, + { + "name": "backing_transaction_group_id", + "type": "char(26)" + }, + { + "name": "source_state", + "type": "enum" + }, + { + "name": "source_backing_transaction_group_id", + "type": "char(26)" + }, + { + "name": "closed_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "INDEX(lineage_id, closed_at)", + "FK lineage_id \u2192 credit_realization_lineages.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. This table has no namespace/time mixins.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerAccount", + "description": "A double-entry ledger account of a given account_type; parent of sub-accounts and routing rows (see openmeter/ent/schema/ledger_account.go:16).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "account_type", + "type": "enum" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerAccount.Fields() in ledger_account.go and regenerate. See the /ledger skill.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerSubAccount", + "description": "A sub-account keyed by (account_id, route_id) that holds ledger entries (see openmeter/ent/schema/ledger_account.go:48).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "account_id", + "type": "char(26)" + }, + { + "name": "route_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, account_id, route_id)", + "FK account_id, route_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerSubAccountRoute", + "description": "Routing rule mapping a routing_key (currency/tax/feature/cost-basis/priority dimensions, denormalized as literal columns, not FKs) to a sub-account within an account (see openmeter/ent/schema/ledger_account.go:96).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "account_id", + "type": "char(26)" + }, + { + "name": "routing_key_version", + "type": "TEXT" + }, + { + "name": "routing_key", + "type": "TEXT" + }, + { + "name": "currency", + "type": "TEXT", + "description": "Literal routing value denormalized from routing_key for filtering, not a FK (see openmeter/ent/schema/ledger_account.go:117)." + }, + { + "name": "tax_code", + "type": "TEXT", + "description": "Stores the TaxCode.Key string as a routing dimension, not a FK to tax_codes (see openmeter/ent/schema/ledger_account.go:119)." + }, + { + "name": "tax_behavior", + "type": "TEXT" + }, + { + "name": "features", + "type": "text[]" + }, + { + "name": "cost_basis", + "type": "numeric" + }, + { + "name": "credit_priority", + "type": "INT" + }, + { + "name": "transaction_authorization_status", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, account_id, routing_key_version, routing_key) (see openmeter/ent/schema/ledger_account.go:140)", + "FK account_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerSubAccountRoute.Fields() and regenerate. The features text[] column was changed via migration 20260604143000_ledger_route_features_text_array; tax_behavior added in 20260520130500.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerTransactionGroup", + "description": "Groups related ledger transactions that must be booked atomically (see openmeter/ent/schema/ledger_transaction_group.go:11).", + "location": "openmeter/ent/schema/ledger_transaction_group.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerTransaction", + "description": "A booked transaction within a group, dated by booked_at, made up of balanced entries (see openmeter/ent/schema/ledger_transaction.go:13).", + "location": "openmeter/ent/schema/ledger_transaction.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "group_id", + "type": "char(26)" + }, + { + "name": "booked_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)", + "INDEX(namespace, booked_at)", + "FK group_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerEntry", + "description": "A single signed amount posting against a sub-account within a transaction; identity_key dedupes entries within a (transaction, sub_account) (see openmeter/ent/schema/ledger_entry.go:15).", + "location": "openmeter/ent/schema/ledger_entry.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "sub_account_id", + "type": "char(26)" + }, + { + "name": "identity_key", + "type": "TEXT", + "description": "Per-(transaction, sub_account) dedup key enforced by a unique index; defaults to empty string (see openmeter/ent/schema/ledger_entry.go:33)." + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "transaction_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(transaction_id, sub_account_id, identity_key) (see openmeter/ent/schema/ledger_entry.go:67)", + "amount immutable", + "FK transaction_id, sub_account_id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerEntry.Fields() and regenerate. Entries are append-only (immutable amount).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerCustomerAccount", + "description": "Private link table mapping a customer to their ledger accounts \u2014 one FBO and one Receivable account per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:14).", + "location": "openmeter/ent/schema/ledger_customer_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "customer_id", + "type": "TEXT" + }, + { + "name": "account_type", + "type": "enum" + }, + { + "name": "account_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id, account_type) \u2014 one FBO + one Receivable per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:38)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. AGENTS.md notes that when credits.enabled is false, ledger account services are noop; backfills writing real ledger_customer_accounts rows must construct concrete adapters directly.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerBreakageRecord", + "description": "Projection row recording credit breakage (expired/unused credit) with full source-vs-breakage transaction lineage; intentionally keeps ledger references as plain IDs because it is a projection, not accounting source of truth (see openmeter/ent/schema/ledger_breakage_record.go:15).", + "location": "openmeter/ent/schema/ledger_breakage_record.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger/breakage", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "kind", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "credit_priority", + "type": "INT" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "source_kind", + "type": "enum" + }, + { + "name": "source_transaction_group_id", + "type": "char(26)" + }, + { + "name": "source_transaction_id", + "type": "char(26)" + }, + { + "name": "source_entry_id", + "type": "char(26)" + }, + { + "name": "breakage_transaction_group_id", + "type": "char(26)" + }, + { + "name": "breakage_transaction_id", + "type": "char(26)" + }, + { + "name": "fbo_sub_account_id", + "type": "char(26)" + }, + { + "name": "breakage_sub_account_id", + "type": "char(26)" + }, + { + "name": "plan_id", + "type": "char(26)" + }, + { + "name": "release_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, customer_id, currency, credit_priority, expires_at, id)", + "references stored as plain IDs (no FKs) by design (see openmeter/ent/schema/ledger_breakage_record.go:19)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerBreakageRecord.Fields() and regenerate. Added via migration 20260517121831_add_credit_expiration_breakage.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "App", + "description": "An installed integration/app of a given type and status (e.g. stripe, custom-invoicing); linked to customers and used as tax/invoicing/payment provider on billing profiles and invoices (see openmeter/ent/schema/app.go:16).", + "location": "openmeter/ent/schema/app.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "type", + "type": "TEXT" + }, + { + "name": "status", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)", + "customer_apps ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit App.Fields() in app.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomer", + "description": "Join table linking an App install to a Customer (see openmeter/ent/schema/app.go:53).", + "location": "openmeter/ent/schema/app.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app.go:77)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppStripe", + "description": "Stripe app configuration (account id, livemode, webhook id, and sensitive api_key/webhook_secret) (see openmeter/ent/schema/app_stripe.go:15).", + "location": "openmeter/ent/schema/app_stripe.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/stripe", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "stripe_account_id", + "type": "TEXT" + }, + { + "name": "stripe_livemode", + "type": "BOOL" + }, + { + "name": "api_key", + "type": "TEXT", + "description": "Ent Sensitive() field \u2014 redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:31)." + }, + { + "name": "masked_api_key", + "type": "TEXT" + }, + { + "name": "stripe_webhook_id", + "type": "TEXT" + }, + { + "name": "webhook_secret", + "type": "TEXT", + "description": "Ent Sensitive() field \u2014 redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:34)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, stripe_account_id, stripe_livemode) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:40)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit AppStripe.Fields() and regenerate. Use .Sensitive() for secret columns.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppStripeCustomer", + "description": "Links a Stripe app to a Customer with the Stripe customer id and default payment method (see openmeter/ent/schema/app_stripe.go:62).", + "location": "openmeter/ent/schema/app_stripe.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/stripe", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "stripe_customer_id", + "type": "TEXT" + }, + { + "name": "stripe_default_payment_method_id", + "type": "TEXT" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL", + "UNIQUE(app_id, stripe_customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:93)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomInvoicing", + "description": "Custom-invoicing app config toggling draft/issuing sync hooks (see openmeter/ent/schema/appcustominvoicing.go:15).", + "location": "openmeter/ent/schema/appcustominvoicing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/custominvoicing", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "enable_draft_sync_hook", + "type": "BOOL" + }, + { + "name": "enable_issuing_sync_hook", + "type": "BOOL" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomInvoicingCustomer", + "description": "Links a custom-invoicing app to a Customer (see openmeter/ent/schema/appcustominvoicing.go:54).", + "location": "openmeter/ent/schema/appcustominvoicing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/custominvoicing", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "TaxCode", + "description": "A reusable tax code resource with optional per-app mappings, referenced by ratecards, lines, charges and org defaults (see openmeter/ent/schema/taxcode.go:18).", + "location": "openmeter/ent/schema/taxcode.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/taxcode", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_mappings", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/taxcode.go:44)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit TaxCode.Fields() and regenerate. Migration 20260527120000_dedupe_tax_codes_by_app_mapping consolidated duplicate tax codes.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "OrganizationDefaultTaxCodes", + "description": "Per-namespace default tax codes for invoicing and credit grants; namespace declared explicitly (not via mixin) to keep a unique constraint (see openmeter/ent/schema/organizationdefaulttaxcodes.go:15).", + "location": "openmeter/ent/schema/organizationdefaulttaxcodes.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/taxcode", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoicing_tax_code_id", + "type": "char(26)" + }, + { + "name": "credit_grant_tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace) WHERE deleted_at IS NULL (see openmeter/ent/schema/organizationdefaulttaxcodes.go:57)", + "FK both tax_code ids \u2192 tax_codes.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CustomCurrency", + "description": "A namespace-defined non-fiat currency (code/name/symbol) with a cost-basis history; e.g. for credit-token style billing (see openmeter/ent/schema/custom_currencies.go:16).", + "location": "openmeter/ent/schema/custom_currencies.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/currency", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "code", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "symbol", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, code) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:51)", + "cost_basis_history ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CurrencyCostBasis", + "description": "Time-effective exchange rate of a custom currency to a fiat code (see openmeter/ent/schema/custom_currencies.go:61).", + "location": "openmeter/ent/schema/custom_currencies.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/currency", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "custom_currency_id", + "type": "char(26)" + }, + { + "name": "fiat_code", + "type": "TEXT" + }, + { + "name": "rate", + "type": "numeric" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, custom_currency_id, fiat_code, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:108)", + "FK custom_currency_id \u2192 custom_currencies.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LLMCostPrice", + "description": "Canonical per-token LLM pricing rows; namespace NULL means a global default, a set namespace is an override (see openmeter/ent/schema/llmcostprice.go:16).", + "location": "openmeter/ent/schema/llmcostprice.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/llmcost", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "namespace", + "type": "TEXT", + "description": "NULL for global prices, set for namespace overrides (see openmeter/ent/schema/llmcostprice.go:32)." + }, + { + "name": "provider", + "type": "TEXT" + }, + { + "name": "model_id", + "type": "TEXT" + }, + { + "name": "model_name", + "type": "TEXT" + }, + { + "name": "input_per_token", + "type": "numeric" + }, + { + "name": "output_per_token", + "type": "numeric" + }, + { + "name": "cache_read_per_token", + "type": "numeric" + }, + { + "name": "reasoning_per_token", + "type": "numeric" + }, + { + "name": "cache_write_per_token", + "type": "numeric" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "source", + "type": "TEXT" + }, + { + "name": "source_prices", + "type": "jsonb" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(provider, model_id, namespace, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/llmcostprice.go:85)", + "partial index for global lookups WHERE namespace IS NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LLMCostPrice.Fields() in llmcostprice.go and regenerate. This table notably does NOT use NamespaceMixin (namespace is nullable).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Override resolution: look up namespace override first, then fall back to the global (namespace IS NULL) row.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationChannel", + "description": "A delivery channel (currently webhook) holding a type-tagged config JSON resolved by a custom value scanner (see openmeter/ent/schema/notification.go:21).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "disabled", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb", + "description": "Type-discriminated channel config (e.g. webhook), serialized via ChannelConfigValueScanner (see openmeter/ent/schema/notification.go:230)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationChannel.Fields() in notification.go and regenerate. New config variants need a case added to ChannelConfigValueScanner. See the /notification skill.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationRule", + "description": "A rule binding an event type to channels with a type-tagged config (balance threshold, entitlement reset, invoice created/updated) (see openmeter/ent/schema/notification.go:67).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "disabled", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb", + "description": "Type-discriminated rule config serialized via RuleConfigValueScanner (see openmeter/ent/schema/notification.go:290)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationRule.Fields() and regenerate. New event-type configs require a case in RuleConfigValueScanner.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationEvent", + "description": "A fired notification event instance carrying a JSON payload and the rule_id that produced it (see openmeter/ent/schema/notification.go:118).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "rule_id", + "type": "char(26)" + }, + { + "name": "payload", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)", + "FK rule_id \u2192 notification_rules.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationEvent.Fields() and regenerate. Note: only created_at (no updated/deleted) \u2014 events are append-only.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationEventDeliveryStatus", + "description": "Per-(event, channel) delivery state machine row with reason, next_attempt_at and an attempts history; drives the reconciliation/retry loop (see openmeter/ent/schema/notification.go:170).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "event_id", + "type": "TEXT" + }, + { + "name": "channel_id", + "type": "TEXT" + }, + { + "name": "state", + "type": "enum" + }, + { + "name": "reason", + "type": "TEXT" + }, + { + "name": "next_attempt_at", + "type": "TIMESTAMPTZ", + "description": "When the reconciliation loop should next retry delivery (see openmeter/ent/schema/notification.go:201)." + }, + { + "name": "attempts", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, event_id, channel_id), INDEX(namespace, state, next_attempt_at) \u2014 drives retry polling (see openmeter/ent/schema/notification.go:220)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationEventDeliveryStatus.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Reconciliation loop polls state + next_attempt_at; see the /notification skill.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "RawEvent", + "description": "The CloudEvents-shaped usage event row stored in the ClickHouse om__events table; data is the raw JSON payload, store_row_id a generated ULID per stored copy and customer_id an optional attribution (see openmeter/streaming/connector.go:24).", + "location": "openmeter/streaming/connector.go", + "kind": "document", + "store": "clickhouse_events", + "owned_by_component": "openmeter/streaming", + "fields": [ + { + "name": "namespace", + "type": "String" + }, + { + "name": "id", + "type": "String" + }, + { + "name": "type", + "type": "LowCardinality(String)" + }, + { + "name": "subject", + "type": "String" + }, + { + "name": "source", + "type": "String" + }, + { + "name": "time", + "type": "DateTime" + }, + { + "name": "data", + "type": "String", + "description": "Raw JSON event payload from which meters extract values via value_property JSONPath (see openmeter/streaming/connector.go:31)." + }, + { + "name": "ingested_at", + "type": "DateTime" + }, + { + "name": "stored_at", + "type": "DateTime", + "description": "When the row landed in ClickHouse; used as the late-arriving-usage cutoff in usage-based billing realization runs (see openmeter/sink/storage.go:62)." + }, + { + "name": "store_row_id", + "type": "String", + "description": "Per-stored-row ULID assigned by the sink on insert; distinguishes physical copies of the same logical event id (see openmeter/sink/storage.go:63)." + }, + { + "name": "customer_id", + "type": "String" + } + ], + "guarantees": [ + "ENGINE = MergeTree PARTITION BY toYYYYMM(time) (see openmeter/streaming/clickhouse/event_query.go:38)", + "ORDER BY (namespace, type, subject, toStartOfHour(time)) (see openmeter/streaming/clickhouse/event_query.go:45)", + "minmax skip-index on stored_at", + "no soft-delete; append-only; logical dedup happens upstream in Redis before insert" + ], + "consumers": [ + { + "object": "ClickHouseStorage.BatchInsert", + "file": "openmeter/sink/storage.go", + "role": "sole writer \u2014 maps SinkMessages to RawEvents and batch-inserts them into ClickHouse, stamping stored_at/store_row_id" + }, + { + "object": "createEventsTable.toSQL", + "file": "openmeter/streaming/clickhouse/event_query.go", + "role": "emits the CREATE TABLE DDL for the per-namespace events table" + }, + { + "object": "queryEventsTable", + "file": "openmeter/streaming/clickhouse/event_query.go", + "role": "builds list/count queries filtering by namespace/time/subject" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Add a column to RawEvent in openmeter/streaming/connector.go (with ch:\"...\" tag) AND to the createEventsTable.Define(...) calls in openmeter/streaming/clickhouse/event_query.go; the table is created idempotently (IF NOT EXISTS) on connector startup. There is no Atlas migration for ClickHouse.", + "example": "sb.Define(\"store_row_id\", \"String\")" + }, + "how_to_modify": { + "prose": "ClickHouse columns are added via the IF NOT EXISTS create path or ALTER TABLE; changing ORDER BY/partitioning is a breaking schema change requiring a new table and backfill.", + "example": "" + }, + "how_to_read": { + "prose": "Always through the streaming.Connector (ListEvents/ListEventsV2/CountEvents/QueryMeter), never raw ClickHouse from handlers.", + "example": "events, err := connector.ListEvents(ctx, namespace, params)" + }, + "backup_strategy": "", + "tests": [ + "openmeter/streaming/clickhouse/event_query_test.go", + "openmeter/streaming/clickhouse/event_query_v2_test.go", + "openmeter/streaming/clickhouse/meter_query_test.go" + ] + } + }, + { + "name": "SinkMessage", + "description": "In-flight per-event message inside the sink-worker carrying the deserialized CloudEvent plus namespace and ingested/stored timestamps before it is mapped to a RawEvent and persisted (see openmeter/sink/storage.go:52).", + "location": "openmeter/sink/models/models.go", + "kind": "value_object", + "store": "", + "owned_by_component": "openmeter/sink", + "fields": [ + { + "name": "Namespace", + "type": "string" + }, + { + "name": "Serialized", + "type": "*serializer.CloudEventsKafkaPayload" + }, + { + "name": "IngestedAt", + "type": "*time.Time" + }, + { + "name": "StoredAt", + "type": "*time.Time" + } + ], + "guarantees": [ + "transient; not persisted as-is \u2014 mapped to RawEvent for ClickHouse insert (see openmeter/sink/storage.go:53)" + ], + "consumers": [ + { + "object": "ClickHouseStorage.BatchInsert", + "file": "openmeter/sink/storage.go", + "role": "consumes SinkMessages and maps them to ClickHouse RawEvents" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Edit the SinkMessage struct in openmeter/sink/models/models.go.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "dedupe.Item", + "description": "The deduplication key (namespace + event id + source) hashed into a Redis key with TTL to drop duplicate ingest events (see openmeter/dedupe/redisdedupe/redisdedupe.go:45).", + "location": "openmeter/dedupe/dedupe.go", + "kind": "key_value", + "store": "redis", + "owned_by_component": "openmeter/dedupe", + "fields": [ + { + "name": "Namespace", + "type": "string" + }, + { + "name": "ID", + "type": "string" + }, + { + "name": "Source", + "type": "string" + } + ], + "guarantees": [ + "TTL = Deduplicator.Expiration (see openmeter/dedupe/redisdedupe/redisdedupe.go:84)", + "SET NX semantics \u2014 first writer wins, returns unique=true (see openmeter/dedupe/redisdedupe/redisdedupe.go:82)", + "key may be raw key or sha-hashed depending on DedupeMode (rawkey/keyhash/keyhash-migration) (see openmeter/dedupe/redisdedupe/redisdedupe.go:51)" + ], + "consumers": [ + { + "object": "Deduplicator.IsUnique", + "file": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "role": "checks-and-sets the dedup key atomically (SET NX); returns whether the event is new" + }, + { + "object": "Deduplicator.CheckUniqueBatch", + "file": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "role": "MGET batch read path classifying items into unique vs already-processed" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Dedup keys are produced from dedupe.Item.Key(); the Redis value is empty \u2014 only key presence matters. Change the key shape in dedupe.Item / keyhash.go.", + "example": "d.Redis.SetArgs(ctx, key, \"\", redis.SetArgs{TTL: d.Expiration, Mode: \"nx\"})" + }, + "how_to_modify": { + "prose": "Changing the hashing format requires a migration mode (DedupeModeKeyHashMigration) that checks both old and new key formats during transition.", + "example": "" + }, + "how_to_read": { + "prose": "Via Deduplicator.IsUnique/CheckUnique/CheckUniqueBatch; never touch Redis keys directly.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Progress", + "description": "Async-query progress state cached in Redis under key progress:: with a TTL, used to report long-running event-query progress (see openmeter/progressmanager/adapter/progress.go:16).", + "location": "openmeter/progressmanager/entity/progressmanager.go", + "kind": "key_value", + "store": "redis", + "owned_by_component": "openmeter/progressmanager", + "fields": [], + "guarantees": [ + "key = progress:: (optionally prefixed) (see openmeter/progressmanager/adapter/progress.go:65)", + "JSON-serialized value with TTL = adapter.expiration (see openmeter/progressmanager/adapter/progress.go:56)", + "missing key \u2192 NotFound (redis.Nil) (see openmeter/progressmanager/adapter/progress.go:29)" + ], + "consumers": [ + { + "object": "adapter.UpsertProgress", + "file": "openmeter/progressmanager/adapter/progress.go", + "role": "writes JSON progress with TTL (SET)" + }, + { + "object": "adapter.GetProgress", + "file": "openmeter/progressmanager/adapter/progress.go", + "role": "reads/unmarshals progress; returns NotFound on missing key" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Edit the Progress entity in openmeter/progressmanager/entity/progressmanager.go; it is JSON-marshaled wholesale into the Redis value.", + "example": "a.redis.Set(ctx, a.getKey(input.ProgressID), data, a.expiration)" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Via progressmanager service GetProgress; a noop adapter exists when Redis is not configured.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + } + ], + "persistence_stores": [ + { + "name": "primary_postgres", + "description": "Source-of-truth control-plane store; schema is defined in Ent (openmeter/ent/schema/*.go) and migrated with Atlas-generated golang-migrate SQL. Almost all tables are namespace-scoped with ULID char(26) ids and deleted_at soft-deletes (see openmeter/ent/schema/customer.go:21).", + "engine": "PostgreSQL (Ent ORM + Atlas migrations + pgx)", + "role": "primary", + "migrations_dir": "tools/migrate/migrations", + "backup_strategy": "", + "owned_models": [ + "Customer", + "CustomerSubjects", + "Subject", + "Meter", + "Feature", + "Entitlement", + "Grant", + "BalanceSnapshot", + "UsageReset", + "Plan", + "PlanPhase", + "PlanRateCard", + "Addon", + "AddonRateCard", + "PlanAddon", + "Subscription", + "SubscriptionPhase", + "SubscriptionItem", + "SubscriptionAddon", + "SubscriptionAddonQuantity", + "SubscriptionBillingSyncState", + "BillingProfile", + "BillingWorkflowConfig", + "BillingCustomerOverride", + "BillingInvoice", + "BillingInvoiceLine", + "BillingInvoiceFlatFeeLineConfig", + "BillingInvoiceUsageBasedLineConfig", + "BillingInvoiceSplitLineGroup", + "BillingInvoiceLineDiscount", + "BillingInvoiceLineUsageDiscount", + "BillingStandardInvoiceDetailedLine", + "BillingStandardInvoiceDetailedLineAmountDiscount", + "BillingInvoiceValidationIssue", + "BillingSequenceNumbers", + "BillingCustomerLock", + "BillingInvoiceWriteSchemaLevel", + "Charge", + "ChargesSearchV1", + "ChargeFlatFee", + "ChargeFlatFeeRun", + "ChargeUsageBased", + "ChargeUsageBasedRuns", + "ChargeUsageBasedRunDetailedLine", + "ChargeCreditPurchase", + "CreditRealizationLineage", + "CreditRealizationLineageSegment", + "LedgerAccount", + "LedgerSubAccount", + "LedgerSubAccountRoute", + "LedgerTransactionGroup", + "LedgerTransaction", + "LedgerEntry", + "LedgerCustomerAccount", + "LedgerBreakageRecord", + "App", + "AppCustomer", + "AppStripe", + "AppStripeCustomer", + "AppCustomInvoicing", + "AppCustomInvoicingCustomer", + "TaxCode", + "OrganizationDefaultTaxCodes", + "CustomCurrency", + "CurrencyCostBasis", + "LLMCostPrice", + "NotificationChannel", + "NotificationRule", + "NotificationEvent", + "NotificationEventDeliveryStatus" + ], + "writers": [ + "App / marketplace integrations", + "Billing domain", + "Charges sub-system", + "Credit & grant domain", + "Customer domain", + "Entitlement domain", + "Ledger domain", + "Meter domain", + "Notification domain", + "Product catalog domain", + "Subscription domain" + ] + }, + { + "name": "clickhouse_events", + "description": "Append-only analytics store holding raw usage events in per-namespace MergeTree tables named om__events; meters aggregate over it and usage-based billing reads metered quantities from it. Tables are created idempotently on connector startup, not via Atlas (see openmeter/streaming/clickhouse/event_query.go:20).", + "engine": "ClickHouse (MergeTree)", + "role": "analytics", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [ + "RawEvent" + ], + "writers": [ + "Streaming / usage query (ClickHouse)" + ] + }, + { + "name": "kafka_ingest", + "description": "Per-namespace ingest event topics (template om_%s_events) that the API ingest path produces to and the sink-worker consumes (subscribing via regexp ^om__events$) before writing to ClickHouse; plus system event topics om_sys.api_events / om_sys.ingest_events / om_sys.balance_worker_events and the notification DLQ om_sys.notification_service_dlq (see app/config/ingest.go:180, app/config/events.go:230).", + "engine": "Kafka (confluent-kafka-go + Watermill)", + "role": "queue", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [], + "writers": [] + }, + { + "name": "redis", + "description": "Cache/coordination store: ingest event deduplication via SET NX keys with TTL (openmeter/dedupe/redisdedupe) and async query progress under progress:: keys with TTL (openmeter/progressmanager/adapter) (see openmeter/dedupe/redisdedupe/redisdedupe.go:32).", + "engine": "Redis (go-redis v9)", + "role": "cache", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [ + "dedupe.Item", + "Progress" + ], + "writers": [] + } + ], + "decisions": { + "architectural_style": { + "title": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "chosen": "OpenMeter is one Go module (github.com/openmeterio/openmeter) compiled into six long-running binaries (cmd/server, cmd/billing-worker, cmd/balance-worker, cmd/sink-worker, cmd/notification-service, cmd/jobs) plus a separate collector module. The control plane is organized as ~17 domain packages under openmeter/ (billing, charges, customer, productcatalog, subscription, entitlement, credit, ledger, meter, notification, app, streaming, ingest/sink), each a hand-rolled service/adapter/connector layer: interfaces declared in the domain root, concrete struct constructors with Config.Validate() in nested service/ and adapter/ subpackages, wired together at compile time by Google Wire provider sets in app/common/*.go. Persistence splits across four stores: PostgreSQL (Ent ORM + Atlas migrations, ~70 namespace-scoped tables) is the source-of-truth control plane; ClickHouse (per-namespace om__events MergeTree) is the append-only usage data plane; Kafka (confluent-kafka-go + Watermill CQRS) carries ingest events and system domain events; Redis backs dedupe and async-query progress. Two HTTP surfaces coexist: a legacy v1 router (openmeter/server/router) composing per-domain httpdriver packages over httptransport.Handler[Req,Resp], and a newer AIP-style v3 surface (api/v3) of thin oapi-codegen delegators. The API contract is authored once in TypeSpec (api/spec, legacy + aip packages) and code-generated to OpenAPI, then to Go server/client (oapi-codegen), Go/JS/Python SDKs, and goverter/goderive converters.", + "rationale": "The architecture is dictated by the product: high-volume event-time usage metering feeding transactional billing. Metering wants an append-only columnar store and a streaming pipeline (ClickHouse + Kafka + sink-worker), while billing/subscription/entitlement want ACID transactions and cross-row invariants (PostgreSQL + Ent + lockr advisory locks). Splitting the binaries lets the read-heavy ingest/sink path and the latency-tolerant billing/notification/balance workers scale and fail independently while sharing one codebase and one Ent client (openmeter/ent/db) \u2014 the meta architecture_style notes the only real import cycles are test-fixture induced, so the single module stays clean. Wire compile-time DI (app/common) makes each binary assemble only the providers it needs (e.g. cmd/billing-worker pulls BillingRegistry/ChargesRegistry, not the ingest HTTP driver). The TypeSpec-to-everything codegen chain keeps three SDKs and two server stubs from drifting from one source of truth. The service/adapter split with transaction-aware adapters (entutils.TransactingRepo / HijackTx) is what lets one domain's service compose another's inside a single Postgres transaction \u2014 the load-bearing requirement for subscription\u2192billing\u2192charges\u2192ledger consistency.", + "alternatives_rejected": [ + "A single all-in-one binary \u2014 rejected because ingest/sink throughput and billing/notification cadence have opposing scaling and failure profiles; the worker binaries (cmd/sink-worker, cmd/billing-worker, cmd/balance-worker, cmd/notification-service) exist precisely so usage intake does not share a process with invoice finalization.", + "Storing usage events in PostgreSQL alongside control-plane state \u2014 rejected because per-namespace MergeTree partitioned by toYYYYMM(time) (openmeter/streaming/clickhouse/event_query.go) is built for append-only aggregation scans that would crush an OLTP Postgres; meters aggregate over ClickHouse, billing reads metered quantities from it.", + "Microservices with separate databases per domain \u2014 rejected in favor of one shared Ent client and one Postgres so that subscription, billing, charges, and ledger mutations can compose inside a single ACID transaction guarded by one advisory lock (lockr) instead of needing distributed transactions or sagas.", + "Hand-written OpenAPI and hand-maintained SDKs \u2014 rejected for TypeSpec-first codegen (api/spec \u2192 openapi.yaml \u2192 oapi-codegen + orval + poetry) so the v1 stub, v3 stub, and three client SDKs cannot diverge from the contract.", + "A DI container resolved at runtime (reflection-based) \u2014 rejected for Google Wire compile-time generation so missing providers fail the build, not the boot." + ] + }, + "key_decisions": [ + { + "title": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "chosen": "Every domain adapter holds a *entdb.Client and implements entutils.TxCreator (Tx() hijacks an Ent tx onto the context) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}), which rebinds to the *TxDriver already on the context if one exists and otherwise falls back to repo.Self() (pkg/framework/entutils/transaction.go:199).", + "rationale": "This is the seam that lets one domain's service participate in another domain's transaction over the single shared Ent client (Generated Ent client component, openmeter/ent/db). Without it, subscription\u2192billing\u2192charges\u2192ledger composition could not be atomic. AGENTS.md elevates this to a hard convention for the charges adapter: even helpers that accept a raw *entdb.Client must still wrap their body in entutils.TransactingRepo so they rebind to the ctx tx rather than silently writing outside the caller's transaction. Implemented in pkg/framework/entutils/transaction.go and pkg/framework/transaction/transaction.go, consumed by every adapter (openmeter/customer/adapter/adapter.go, openmeter/billing/adapter/adapter.go).", + "alternatives_rejected": [ + "Passing an explicit *sql.Tx or tx-bound client through every method signature \u2014 rejected because it pollutes every domain interface and is easy to forget; the context-carried *TxDriver makes the tx ambient and the rebind automatic.", + "A repository-per-aggregate with its own connection pool \u2014 rejected because cross-domain atomic writes need one connection/transaction, not coordinated commits." + ], + "forced_by": "Single shared Ent client + the requirement that subscription, billing, charges, and ledger mutations be atomic across domains.", + "enables": "Composable service-in-service transactions, the lockr advisory-lock pattern (which asserts it runs inside a real Postgres tx), and the subscription\u2192billing sync writing invoice lines, split-line groups, and charges in one commit." + }, + { + "title": "Postgres transaction-scoped advisory locking (lockr)", + "chosen": "lockr.NewKey(scopes...) joins a colon-separated scope, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-releasing on commit/rollback. getTxClient first hard-asserts the caller is inside a real Postgres transaction (transaction_timestamp() != statement_timestamp()) and errors otherwise (pkg/framework/lockr/locker.go:134).", + "rationale": "Subscription mutations, billing mutations, and charge advances each touch many rows/tables for one customer and must be serialized per logical entity without serializing the whole table. lockr keys on a globally-unique row id (subscription.GetCustomerLock keys on customer id, openmeter/subscription/locks.go:6; customer ids are PK-unique via IDMixin). It is deliberately Postgres-tx-scoped so the lock cannot leak past the transaction boundary. Implemented in pkg/framework/lockr/{locker.go,key.go}; used across subscription, billing, ledger, entitlement. Note there is also a row-based BillingCustomerLock table (openmeter/ent/schema/billing.go:1334) used via SELECT ... FOR UPDATE for the same per-customer serialization in billing.", + "alternatives_rejected": [ + "Application-level mutexes \u2014 rejected because the binaries are horizontally scaled; an in-process lock would not serialize across replicas.", + "Redis/distributed lock (the repo has cirello.io/pglock available) \u2014 rejected for the in-transaction case because pg_advisory_xact_lock ties lock lifetime to the exact transaction that does the writes, eliminating lock-then-die orphan windows.", + "Keying the lock on customer.key \u2014 rejected because key is only unique under namespace + deleted_at IS NULL, so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one." + ], + "forced_by": "Multi-replica workers mutating multi-row per-customer aggregates that need a serialization point.", + "enables": "Safe concurrent subscription edits, billing finalization, and charge advancement for different customers in parallel while serializing operations on the same customer." + }, + { + "title": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "chosen": "stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (invoice.status / charge.status), not inside the FSM. States are Configure'd with Permit / PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over a STATUS ~string + Validate() type and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase) (openmeter/billing/charges/statemachine/machine.go:16,39).", + "rationale": "Invoice and usage-based-charge lifecycles have guarded transitions with side effects (calculation, finalization, voiding) that must be auditable and persisted across requests. Externalizing state onto the row means a transition computed in one request is durable and the next request resumes from the stored status. Implemented in openmeter/billing/service/stdinvoicestate.go:48 and openmeter/billing/charges/statemachine/machine.go.", + "alternatives_rejected": [ + "Ad-hoc if/switch transition code on a status field \u2014 rejected because guards and side effects scatter and illegal transitions become possible; the FSM centralizes the legal edge set.", + "In-memory-state FSM \u2014 rejected because transitions must survive across requests; external storage on the aggregate is mandatory.", + "A stateless machine for trivially-two-state fields \u2014 explicitly avoided; a plain bool/enum is simpler where there is no guard and no side effect." + ], + "forced_by": "Guarded, side-effecting, auditable invoice and charge lifecycles that span multiple requests.", + "enables": "A single legal-transition source of truth per aggregate, reusable across flat-fee/usage-based/credit-purchase charge subtypes via the generic ChargeLike constraint." + }, + { + "title": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "chosen": "The API is authored in TypeSpec under api/spec (two pnpm packages: legacy and aip). make gen-api compiles it to api/openapi.yaml / api/v3/openapi.yaml, then oapi-codegen generates api/api.gen.go (v1 ServerInterface) and api/v3/api.gen.go (v3 ServerInterface), orval generates the JS SDK, poetry/corehttp the Python SDK, and goverter/goderive generate type converters (convert.gen.go, billing/derived.gen.go). All carry a 'DO NOT EDIT' header.", + "rationale": "Two server surfaces and three published SDKs cannot be kept consistent by hand. TypeSpec is the single source of truth; the codegen chain enforces it. The Makefile even patches the oapi-codegen chi-middleware template (patch-oapi-templates) for custom AIP filter parsing. Components: TypeSpec API specification, Generated API contract & v1 server interface, v3 API layer, JavaScript/TypeScript SDK, Python SDK.", + "alternatives_rejected": [ + "OpenAPI YAML as the hand-edited source of truth \u2014 rejected because TypeSpec is more composable/typed and avoids drift between the two API packages.", + "Hand-written SDKs \u2014 rejected; orval/poetry generation keeps JS/Python/Go clients lock-step with the spec.", + "Hand-written domain\u2194API\u2194DB mappers \u2014 rejected for goverter/goderive generation following the FromAPI/ToAPI/FromDB/ToDB naming convention (go-types-conversion skill)." + ], + "forced_by": "Two coexisting API surfaces (v1 + AIP v3) plus three published SDKs that must not diverge from one contract.", + "enables": "Adding an endpoint by editing .tsp and re-running make gen-api / make generate; compile-time detection of contract drift." + }, + { + "title": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "chosen": "Each binary has a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets; constructors are plain functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService); BillingRegistry/ChargesRegistry aggregation structs in app/common/billing.go). make generate runs wire to emit wire_gen.go. Feature flags switch concrete vs noop providers at wiring time (app/common/ledger.go picks concrete or noop ledger services on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled).", + "rationale": "Six binaries share one module but each needs a different object graph. Compile-time DI means a missing provider fails the build, and each binary only links the providers it declares. Feature-gating at the provider level (credits.enabled, webhooks enabled) is the single seam where a whole subsystem becomes a no-op without touching call sites. Components: Application wiring (app/common), Server entrypoint & DI bootstrap.", + "alternatives_rejected": [ + "Runtime/reflection DI container \u2014 rejected because Wire surfaces wiring errors at build time and generates inspectable code.", + "Manual constructor wiring in each main() \u2014 rejected; the graph (billing\u2192charges\u2192ledger\u2192customer\u2192productcatalog) is too large to wire by hand per binary without divergence.", + "Feature flags checked deep in service logic \u2014 rejected in favor of swapping provider implementations (concrete vs noop) at the wiring seam so disabled features short-circuit cleanly (AGENTS.md: credits.enabled noop wiring)." + ], + "forced_by": "Six binaries over one module, each needing a distinct subset of the domain graph, plus feature flags that must disable whole subsystems.", + "enables": "Per-binary minimal object graphs, build-time wiring validation, and clean feature-flag disablement via noop provider swaps." + }, + { + "title": "Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions", + "chosen": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common construct the hook and call targetService.RegisterHooks(h) at startup; when a feature is off the provider registers a Noop hook instead (e.g. customer-created \u2192 provision a ledger account; subject-created \u2192 sync customer). Implemented in openmeter/customer/service/service.go, wired in app/common/customer.go.", + "rationale": "Some cross-domain effects must be synchronous and in-process (provisioning a ledger account when a customer is created), unlike the asynchronous Kafka event bus used for billing/notification. The hook registry is the in-process counterpart to the event bus, and registration at wiring time keeps the coupling explicit and feature-gatable.", + "alternatives_rejected": [ + "Routing every cross-domain reaction through Kafka \u2014 rejected for effects that must commit in the same transaction as the triggering write (ledger provisioning), where eventual consistency is unacceptable.", + "Hard-coding the dependent call inside the triggering service \u2014 rejected because it would create a compile-time dependency from customer onto ledger and prevent the noop-when-disabled swap." + ], + "forced_by": "Cross-domain effects that must be synchronous/transactional and feature-gatable, alongside the async event bus for the rest.", + "enables": "Provisioning ledger/customer state on lifecycle events without a static dependency edge, switchable to Noop when the feature is disabled." + }, + { + "title": "Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in", + "chosen": "Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest \u2192 IngestEventsTopic, balance-worker \u2192 BalanceWorkerEventsTopic, everything else \u2192 SystemEventsTopic) (openmeter/watermill/eventbus/eventbus.go). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored (openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/consumer/consumer.go).", + "rationale": "Usage ingest and domain events have different durability/throughput needs, so they are routed to distinct topics; workers (notification, billing, balance) consume CloudEvents and fan them to per-type handlers without each worker re-implementing topic/dispatch plumbing. CloudEvents is the wire format (cloudevents/sdk-go/v2). There is also a notification DLQ topic om_sys.notification_service_dlq.", + "alternatives_rejected": [ + "Direct confluent-kafka-go produce/consume in every worker \u2014 rejected; Watermill CQRS + grouphandler centralizes marshaling, topic routing, and type dispatch.", + "A single Kafka topic for all events \u2014 rejected because ingest volume and system events have different scaling/retention profiles; prefix-based topic routing separates them.", + "Synchronous cross-binary calls \u2014 rejected; workers are decoupled by Kafka so the API path does not block on billing/notification work." + ], + "forced_by": "Decoupled worker binaries consuming high-volume usage events and lower-volume domain events with different topic/retention needs.", + "enables": "Adding a new event handler by registering it in the grouphandler map; routing a new event type by prefix; independent worker scaling and a DLQ for poison notification messages." + }, + { + "title": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations", + "chosen": "The app adapter holds registry map[AppType]RegistryItem. Each integration's constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) exactly once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing (openmeter/app/adapter/marketplace.go:121). Install operations look up the factory by AppType. Implementations: stripe, custominvoicing, sandbox.", + "rationale": "Third-party billing/invoicing integrations are pluggable and discovered by type. A startup-time registration map is the single source of installable app types; capability support is discovered by type assertion on the constructed instance. The map has no late-registration locking, so all listings must register during DI before the HTTP/worker surface is live. Component: App / marketplace integrations.", + "alternatives_rejected": [ + "A hard-coded switch over app types \u2014 rejected; the registry lets a new integration register itself from its own package without editing a central switch.", + "Runtime/dynamic plugin loading \u2014 rejected; registration is compile-time-known and validated once at wiring, avoiding late-registration races." + ], + "forced_by": "Pluggable Stripe / custom-invoicing / sandbox integrations that must be addable without editing a central dispatch.", + "enables": "Adding a marketplace app by registering a RegistryItem at wiring time and implementing the capability interfaces it advertises." + }, + { + "title": "Per-subtype connector dispatch behind one entitlement Service", + "chosen": "entitlement.SubTypeConnector is implemented three times (metered/static/boolean, each in its own connector.go). The aggregate service holds all three and getTypeConnector(typed) switches over the closed EntitlementType set with a default-error arm (openmeter/entitlement/service/service.go:424; values metered/static/boolean from openmeter/entitlement/entitlement.go:331).", + "rationale": "Entitlement behavior branches by a fixed enum subtype, each with its own create/value logic. A closed switch with a default-error arm keeps the type set sealed and forces every new subtype to be handled explicitly. This mirrors the charges subtype split (flat_fee / usage_based / credit_purchase) where the Charge row carries exactly one of three subtype FK columns.", + "alternatives_rejected": [ + "One mega-service with inline branching everywhere \u2014 rejected; the per-subtype connector isolates each subtype's logic behind a uniform interface.", + "Open/registry-based subtype dispatch \u2014 rejected because the subtype set is fixed (a closed enum) and a default-error arm should reject unknown values rather than accept user-defined ones." + ], + "forced_by": "A fixed enum of entitlement subtypes each needing distinct create/value logic.", + "enables": "Adding a subtype by implementing SubTypeConnector and adding one switch arm; the compiler/default-arm flags any unhandled subtype." + }, + { + "title": "Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view", + "chosen": "Charge is a polymorphic parent row where exactly one of three subtype FK columns (flat_fee / credit_purchase / usage_based) points to the subtype table, with UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL for idempotent creation (openmeter/ent/schema/charges.go:167). Reads go through the ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables). The view DDL is shipped via an explicit SQL migration because Ent views do not appear in generated migrate.Tables (AGENTS.md ent-view caveat).", + "rationale": "Charges share a common base but have type-specific lifecycle/run tables (ChargeFlatFeeRun, ChargeUsageBasedRuns, CreditRealizationLineage). The parent-plus-subtype layout keeps the shared columns in one place and the idempotency key makes charge creation safe under retries. The search view denormalizes reads across subtypes. Components: Charges sub-system; data models Charge, ChargesSearchV1, ChargeFlatFee, ChargeUsageBased, ChargeCreditPurchase.", + "alternatives_rejected": [ + "Single wide charges table with nullable type-specific columns \u2014 rejected; type-specific run/lineage children would not fit and the table would be sparse.", + "Separate top-level tables per charge type with no shared parent \u2014 rejected; loses the shared base, the single idempotency key, and the unified search surface.", + "Relying on Ent to emit the view in migrate.Tables \u2014 rejected/impossible: ent.View schemas generate query code but not migration metadata in this repo, so the view DDL needs a hand-written SQL migration." + ], + "forced_by": "Three charge subtypes with distinct run/lineage child tables that still need one idempotency key and one read surface.", + "enables": "Idempotent charge creation under retries and unified cross-subtype charge search, while keeping subtype lifecycles isolated." + }, + { + "title": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "chosen": "Persisted entities compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index; UniqueResourceMixin adds a (namespace,key,deleted_at) unique index that only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47). The Ent schema (openmeter/ent/schema/*.go) is the single source of truth; Atlas diffs it into golang-migrate SQL under tools/migrate/migrations.", + "rationale": "~70 tables share the same multi-tenant, soft-delete, ULID-id, audit, metadata-jsonb shape; mixins enforce it once instead of per-table. The (namespace,key,deleted_at) approximation is a known sharp edge: same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration, so entities needing true partial-uniqueness (Customer) ship a custom IndexWhere SQL migration (openmeter/ent/schema/customer.go:58-62). The data_overview confirms almost every Postgres table is namespace-scoped, ULID-id'd, and deleted_at soft-deleted.", + "alternatives_rejected": [ + "Repeating id/namespace/timestamp columns in every schema file \u2014 rejected; mixins keep the multi-tenant contract uniform and DRY.", + "Hard deletes \u2014 rejected in favor of deleted_at soft-deletes so historical billing/usage references survive.", + "Trusting the mixin's deleted_at-in-key index for real partial uniqueness \u2014 rejected where correctness matters; a custom partial-unique SQL migration is required." + ], + "forced_by": "A ~70-table multi-tenant schema needing uniform id/namespace/audit/soft-delete columns across every domain.", + "enables": "Adding an entity by composing mixins and running make generate + atlas diff; consistent namespace scoping and soft-delete semantics everywhere." + }, + { + "title": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "chosen": "v1: openmeter/server/router validates each request against the embedded OpenAPI 3 spec (kin-openapi openapi3filter) and wires per-domain httpdriver packages, each composing httptransport.NewHandler[Request,Response](decode, service-op, encode) with a typed errorEncoder that maps domain errors to RFC7807 problem documents. v3: api/v3/server/routes.go implements the oapi-codegen ServerInterface as thin methods delegating to per-resource handlers (api/v3/handlers/*), with explicitly Unimplemented / feature-gated operations and AIP query-parameter filtering (api/v3/filters). Both call the same domain services.", + "rationale": "v3 is the forward AIP-style surface; v1 cannot be dropped without breaking clients, so both surfaces front the identical domain services and share error rendering (commonhttp.HandleErrorIfTypeMatches, api/v3/apierrors). The generic httptransport.Handler[Req,Resp] gives v1 consistent decode\u2192service\u2192encode\u2192error-encode plumbing; v3 leans on generated stubs plus thin delegators.", + "alternatives_rejected": [ + "Forcing a hard cutover from v1 to v3 \u2014 rejected; existing clients depend on v1, so the surfaces coexist over shared services.", + "Duplicating domain logic per surface \u2014 rejected; both surfaces are thin transport adapters over the same services, so behavior cannot diverge.", + "Per-handler ad-hoc error-to-status mapping \u2014 rejected for the ordered typed errorEncoder chain (errors.As short-circuit) so domain error types map to status codes consistently." + ], + "forced_by": "An installed v1 client base plus a new AIP-style API direction, both needing the same domain behavior.", + "enables": "Migrating endpoints to v3 incrementally while v1 keeps working, with one set of domain services and one error-mapping convention behind both." + }, + { + "title": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate", + "chosen": "Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf(\"field: %w\", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil; single-field checks use models.NewGenericValidationError(...) directly (pkg/models/errors.go, openmeter/app/marketplace.go). Service and adapter Config structs also carry Validate() and constructors reject invalid config at New().", + "rationale": "Validation must report all problems at once (not fail-fast) and surface as a single 400/ValidationIssue at the HTTP boundary. Centralizing on NewNillableGenericValidationError + errors.Join makes the nil-vs-error contract uniform across every domain and lets the error encoders map one error type to 400. AGENTS.md mandates this shape for Validate() methods. pkg/models is the 229-in-edge dependency magnet that carries it.", + "alternatives_rejected": [ + "Returning on the first invalid field \u2014 rejected; callers and API consumers want all issues at once.", + "A bespoke validation library per domain \u2014 rejected; one shared error aggregation type keeps HTTP error mapping uniform.", + "Validating only at the HTTP layer \u2014 rejected; service/adapter Config.Validate() catches misconfiguration at construction, before the binary serves traffic." + ], + "forced_by": "Multiple API surfaces and many domains all needing a consistent multi-issue validation contract that maps to one HTTP status.", + "enables": "Aggregated 400 ValidationIssue responses, fail-at-construction config validation, and one error type for the encoders to match." + } + ], + "trade_offs": [ + { + "accept": "Context-ambient transactions: the active tx is carried on context.Context and rebound by entutils.TransactingRepo, not visible in method signatures.", + "benefit": "Cross-domain service composition can be atomic over one Ent client without threading a tx parameter through every interface; subscription\u2192billing\u2192charges\u2192ledger commit together.", + "caused_by": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "violation_signals": [ + "context.Background()", + "context.TODO()", + "func(... db *entdb.Client ...) without entutils.TransactingRepo wrapper", + "passing *entdb.Client into a helper that writes", + "bypassing WithTx / Self()" + ] + }, + { + "accept": "Advisory locks must run inside a real Postgres transaction and must key on a globally-unique id; misuse (no tx, or keying on a non-unique column) is only caught at runtime.", + "benefit": "Per-customer serialization of multi-row subscription/billing/charge operations across replicas, with the lock auto-released on commit/rollback (no orphan locks).", + "caused_by": "Postgres transaction-scoped advisory locking (lockr)", + "violation_signals": [ + "lockr.NewKey on customer key", + "LockForTX outside transaction.Run", + "sync.Mutex for cross-replica serialization", + "pg_advisory_lock (session-scoped, not xact)", + "locking on a namespace-non-unique column" + ] + }, + { + "accept": "Six binaries over one module: shared code is convenient but a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, and all binaries must be rebuilt/redeployed together.", + "benefit": "One codebase, one Ent client, one transaction boundary for cross-domain atomicity; workers scale and fail independently while sharing types.", + "caused_by": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "violation_signals": [ + "go.mod split per binary", + "duplicating pkg/models types per service", + "separate database per domain", + "distributed transaction / saga between binaries" + ] + }, + { + "accept": "TypeSpec-first codegen: any contract change requires regenerating OpenAPI, two Go server stubs, three SDKs, and goverter/goderive converters; generated files must never be hand-edited.", + "benefit": "Two API surfaces and three SDKs can never drift from one source of truth; contract drift becomes a build failure.", + "caused_by": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "violation_signals": [ + "editing api/api.gen.go", + "editing api/openapi.yaml by hand", + "editing convert.gen.go", + "hand-writing SDK client methods", + "skipping make gen-api after .tsp change" + ] + }, + { + "accept": "A separate ClickHouse store and Kafka pipeline for usage events: two more stateful systems to operate, and ClickHouse tables are created idempotently at connector startup outside Atlas migration discipline.", + "benefit": "High-volume append-only usage ingest and aggregation scale independently of OLTP Postgres; meters and usage-based billing read aggregated quantities efficiently.", + "caused_by": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "violation_signals": [ + "storing usage events in Postgres", + "ALTER TABLE om_ events via Atlas", + "removing the sink-worker", + "joining RawEvent against Postgres tables" + ] + }, + { + "accept": "External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge.", + "benefit": "Invoice/charge transitions are durable across requests, auditable, and illegal transitions are rejected at the single edge-set definition.", + "caused_by": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "violation_signals": [ + "mutating invoice.status directly", + "if/switch on status instead of Permit edges", + "NewStateMachine (in-memory) for a persisted aggregate", + "adding a status without a Permit edge" + ] + }, + { + "accept": "Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning).", + "benefit": "Whole subsystems (ledger, Svix webhooks) cleanly become no-ops without runtime conditionals scattered through service logic.", + "caused_by": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "violation_signals": [ + "if credits.enabled inside service method", + "constructing ledger adapters when credits disabled", + "Svix client built when webhooks disabled", + "missing noop provider for a gated subsystem" + ] + }, + { + "accept": "The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness; entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration.", + "benefit": "Most entities get key-uniqueness for free from the mixin; the few that need strict partial uniqueness opt into a custom migration.", + "caused_by": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "violation_signals": [ + "relying on UniqueResourceMixin for strict partial uniqueness", + "deleting customer.go IndexWhere migration", + "same-key create after soft-delete without partial index" + ] + }, + { + "accept": "Two HTTP surfaces (v1 + v3) front the same services indefinitely: every behavior change must be checked against both transport layers and both error-rendering paths.", + "benefit": "Existing v1 clients keep working while new endpoints land on the AIP v3 surface; no forced client migration.", + "caused_by": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "violation_signals": [ + "v3 handler with its own domain logic", + "duplicating a service call in both surfaces with diverging behavior", + "dropping the v1 router", + "v3 endpoint not delegating to a shared domain service" + ] + } + ], + "out_of_scope": [ + { + "item": "A bundled web UI / dashboard application \u2014 the frontend surface is published SDKs (JS/TS with a React context provider, Python) and a Cloud product, not an in-repo web app.", + "made_out_of_scope_by": "Multi-binary Go control plane with code-generated API contract" + }, + { + "item": "Distributed transactions / sagas across services \u2014 cross-domain consistency is achieved with one shared Ent client, one Postgres transaction, and lockr advisory locks, not a coordination protocol.", + "made_out_of_scope_by": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)" + }, + { + "item": "Storing or migrating usage events in PostgreSQL \u2014 usage events live only in ClickHouse (append-only MergeTree), created idempotently at startup, outside Atlas/Ent migration discipline.", + "made_out_of_scope_by": "Multi-binary control plane with an event-time usage-metering data plane" + }, + { + "item": "Hand-written OpenAPI specs or hand-written SDK client methods \u2014 the contract is generated from TypeSpec; editing generated files is forbidden.", + "made_out_of_scope_by": "TypeSpec-first API contract with full codegen fan-out" + }, + { + "item": "Runtime/reflection-based dependency injection or dynamic plugin loading \u2014 DI is compile-time via Wire; app integrations register at wiring time into an in-memory map, not via runtime plugins.", + "made_out_of_scope_by": "Google Wire compile-time dependency injection in app/common" + }, + { + "item": "Hard deletes of control-plane rows \u2014 entities soft-delete via deleted_at so historical billing/usage references survive.", + "made_out_of_scope_by": "Ent schema mixins as the cross-cutting column contract" + }, + { + "item": "In-process/in-memory event delivery as the only mechanism \u2014 asynchronous cross-binary work goes through Kafka (Watermill CQRS); the in-process hook registry is reserved for synchronous/transactional cross-domain effects.", + "made_out_of_scope_by": "Two-tier async messaging and the Service hook registry" + }, + { + "item": "panic-based error handling and slog.Default() fallbacks in production code \u2014 AGENTS.md forbids panics in non-test paths and requires explicitly injected *slog.Logger.", + "made_out_of_scope_by": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate" + }, + { + "item": "External payment/invoice engines hard-wired into the core \u2014 Stripe and custom-invoicing are pluggable marketplace apps registered through the app registry, and invoice formatting uses GOBL behind the billing service.", + "made_out_of_scope_by": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations" + } + ], + "decision_chain": { + "root": "Provide event-time usage metering AND ACID usage-based billing on the same multi-tenant platform: high-volume append-only usage events must aggregate cheaply, while subscriptions/invoices/credits/ledger demand cross-row transactional invariants \u2014 over one shared codebase.", + "forces": [ + { + "decision": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "rationale": "Read-heavy ingest/aggregation and transaction-heavy billing have opposing scaling and failure profiles, so usage events go to a columnar append-only store and a streaming pipeline while control-plane state stays in OLTP Postgres \u2014 split into independently scalable binaries sharing one module.", + "violation_keywords": [ + "usage events in postgres", + "single monolith binary", + "microservice per domain with own db", + "mongodb", + "dynamodb for control plane" + ], + "forces": [ + { + "decision": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "rationale": "One shared Postgres schema across ~70 multi-tenant tables needs a uniform namespace/ULID/audit/soft-delete shape, defined once via mixins with Ent as source of truth and Atlas-generated migrations.", + "violation_keywords": [ + "gorm", + "prisma", + "sqlalchemy", + "hard delete", + "DROP without deleted_at", + "uuid v4 pk instead of ulid", + "per-table id column duplication" + ], + "forces": [] + }, + { + "decision": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "rationale": "Cross-domain atomicity over a single shared Ent client requires adapters that join a caller-supplied transaction carried on context, rather than each owning its own connection.", + "violation_keywords": [ + "context.Background()", + "context.TODO()", + "raw *entdb.Client into a writing helper", + "separate db connection per repo", + "two-phase commit" + ], + "forces": [ + { + "decision": "Postgres transaction-scoped advisory locking (lockr)", + "rationale": "Multi-replica workers mutating multi-row per-customer aggregates need a serialization point tied to the transaction; pg_advisory_xact_lock keyed on a unique id auto-releases on commit.", + "violation_keywords": [ + "sync.Mutex", + "pg_advisory_lock", + "redis lock for in-tx serialization", + "lock on customer key", + "LockForTX outside transaction.Run" + ], + "forces": [] + }, + { + "decision": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "rationale": "Guarded, side-effecting invoice/charge transitions must be durable across requests, so the FSM stores status on the persisted aggregate inside the transaction.", + "violation_keywords": [ + "NewStateMachine (in-memory)", + "invoice.status = ... direct mutation", + "if status == switch transitions", + "ad-hoc lifecycle flags" + ], + "forces": [] + }, + { + "decision": "Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view", + "rationale": "Three charge subtypes with distinct run/lineage children still need one idempotency key and one read surface, written transactionally with the rest of billing.", + "violation_keywords": [ + "single wide charges table", + "charge create without unique_reference_id", + "ent.View expected in migrate.Tables", + "separate charge tables without parent" + ], + "forces": [] + }, + { + "decision": "Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions", + "rationale": "Effects that must commit in the same transaction as the triggering write (ledger provisioning on customer create) are registered as in-process hooks, not routed through Kafka.", + "violation_keywords": [ + "kafka publish for transactional side effect", + "static import of ledger from customer", + "hard-coded cross-domain call in service body" + ], + "forces": [] + } + ] + }, + { + "decision": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "rationale": "Six binaries over one module each need a distinct object graph; compile-time DI assembles only the needed providers and fails the build on a missing one, and provider swaps (concrete vs noop) gate features.", + "violation_keywords": [ + "reflection DI container", + "runtime service locator", + "manual wiring in main()", + "if feature.enabled inside service logic" + ], + "forces": [ + { + "decision": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations", + "rationale": "Pluggable Stripe/custom-invoicing integrations register exactly once at wiring time into a duplicate-rejecting map that is the single source of installable app types.", + "violation_keywords": [ + "central switch over app type", + "runtime plugin load", + "late registration after server start", + "duplicate AppType registration" + ], + "forces": [] + } + ] + }, + { + "decision": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "rationale": "Two API surfaces and three published SDKs cannot be kept consistent by hand, so a single TypeSpec source generates OpenAPI, both Go server stubs, the SDKs, and the type converters.", + "violation_keywords": [ + "edit api.gen.go", + "hand-edit openapi.yaml", + "edit convert.gen.go", + "hand-written SDK method", + "edit wire_gen.go" + ], + "forces": [ + { + "decision": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "rationale": "An installed v1 client base plus a new AIP direction means both surfaces front the identical domain services, sharing typed error-to-status mapping.", + "violation_keywords": [ + "duplicate domain logic per surface", + "ad-hoc status code per handler", + "drop v1 router", + "bypass httptransport.Handler" + ], + "forces": [] + }, + { + "decision": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate", + "rationale": "Multiple surfaces and domains need one multi-issue validation contract that maps to a single 400 ValidationIssue.", + "violation_keywords": [ + "return on first invalid field", + "panic on invalid input", + "custom validation error per domain", + "slog.Default() fallback" + ], + "forces": [] + } + ] + }, + { + "decision": "Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in", + "rationale": "Decoupled worker binaries consume high-volume usage events and lower-volume domain events with different topic/retention needs, fanned to per-type handlers via a shared dispatch.", + "violation_keywords": [ + "direct confluent-kafka produce in worker", + "single topic for all events", + "synchronous cross-binary call", + "no DLQ for poison messages" + ], + "forces": [ + { + "decision": "Per-subtype connector dispatch behind one entitlement Service", + "rationale": "Entitlement (and analogously charge) behavior branches by a closed enum subtype consumed by workers and services, isolated behind a uniform SubTypeConnector with a default-error arm.", + "violation_keywords": [ + "inline switch over entitlement type everywhere", + "open/registry subtype dispatch", + "default arm that accepts unknown subtype" + ], + "forces": [] + } + ] + } + ] + } + ] + } + }, + "implementation_guidelines": [ + { + "capability": "Transaction-aware Ent adapter participating in a caller's transaction", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6", + "github.com/jackc/pgx/v5 v5.9.2" + ], + "pattern_description": "Adapter structs hold a *entdb.Client and implement entutils.TxCreator (Tx hijacks an Ent tx onto ctx) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self returns the non-tx instance). Each adapter method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}) so it transparently joins a caller-supplied tx (rebinding on the *TxDriver in ctx) or runs standalone via Self(). Services compose other services' adapters inside one transaction.Run.", + "key_files": [ + "pkg/framework/entutils/transaction.go", + "pkg/framework/transaction/transaction.go", + "openmeter/customer/adapter/adapter.go", + "openmeter/billing/adapter/adapter.go" + ], + "usage_example": "func (a *adapter) GetCustomer(ctx context.Context, id models.NamespacedID) (*customer.Customer, error) {\n return entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep *adapter) (*customer.Customer, error) {\n row, err := rep.db.Customer.Query().\n Where(customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)).\n Only(ctx)\n if err != nil {\n return nil, err\n }\n return mapCustomerFromDB(row), nil\n })\n}", + "applicable_when": "Adapter whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator \u2014 TransactingRepo only rebinds when a *TxDriver is on ctx, else falls back to repo.Self() (pkg/framework/entutils/transaction.go:199).", + "do_not_apply_when": [ + "Pure in-memory adapter with no Ent client (registry/map-backed components) \u2014 there is no transaction to join (openmeter/app/adapter/marketplace.go:120).", + "Helper that accepts a raw *entdb.Client argument instead of reading the tx from ctx \u2014 per AGENTS.md the charges adapter convention still requires wrapping the body with entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the ctx tx; passing a non-tx client silently writes outside the caller's transaction." + ], + "scope": [], + "tips": [ + "Never introduce context.Background()/context.TODO() to sidestep tx propagation (AGENTS.md); thread the caller's ctx through the full path.", + "Self() must return the non-tx instance so standalone calls do not accidentally reuse a stale tx client.", + "Use transaction.Run(...) at the service layer to open the tx that adapters then join." + ] + }, + { + "capability": "Per-customer serialization with Postgres advisory locks (lockr)", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6 (pg_advisory_xact_lock via raw SQL)", + "github.com/zeebo/xxh3 (xxh3 hash)" + ], + "pattern_description": "lockr.NewKey(scopes...) joins scopes with ':' and xxh3-hashes to a 64-bit int; Locker.LockForTX runs SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-released on commit/rollback. Domains expose typed key builders (subscription.GetCustomerLock(customerID)). getTxClient asserts the call is inside a real Postgres tx and errors otherwise.", + "key_files": [ + "pkg/framework/lockr/locker.go", + "pkg/framework/lockr/key.go", + "openmeter/subscription/locks.go", + "openmeter/subscription/service/service.go" + ], + "usage_example": "err := transaction.Run(ctx, a.driver, func(ctx context.Context) error {\n key := subscription.GetCustomerLock(customerID)\n if err := a.locker.LockForTX(ctx, key); err != nil {\n return err\n }\n // all mutations below are serialized per-customer and\n // the lock releases automatically when this tx commits\n return a.applySubscriptionEdits(ctx, edits)\n})", + "applicable_when": "The lock-key identity component is a globally-unique row id \u2014 subscription.GetCustomerLock keys on customer id, and customer ids are PK-unique via IDMixin field.String(\"id\").Unique() + index.Fields(\"namespace\",\"id\").Unique() (openmeter/subscription/locks.go:6).", + "do_not_apply_when": [ + "Caller keys the lock on a namespace-non-unique column \u2014 customer key is only unique under namespace + deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62), so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one.", + "Caller is not inside a Postgres transaction \u2014 lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails.", + "Operation mutates exactly one row with no cross-row invariant \u2014 Ent SELECT ... FOR UPDATE row locking suffices and avoids two scope strings colliding into the same 64-bit advisory slot." + ], + "scope": [ + "subscription", + "billing", + "ledger", + "entitlement" + ], + "tips": [ + "Two distinct scope strings can xxh3-collide into the same advisory slot; keep scope vocabularies disjoint per domain.", + "Billing also serializes per-customer via the BillingCustomerLock row (SELECT ... FOR UPDATE) \u2014 pick the mechanism the surrounding code already uses for that domain.", + "The lock is transaction-scoped: do work and commit; do not hold across multiple transactions." + ] + }, + { + "capability": "Guarded lifecycle state machine with external (aggregate-stored) state", + "category": "state_management", + "libraries": [ + "github.com/qmuntal/stateless v1.8.0" + ], + "pattern_description": "stateless.NewStateMachineWithExternalStorage keeps the current state on the domain aggregate (invoice.status / charge.status). Each state is Configure'd with Permit/PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over STATUS (~string + Validate()) and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase).", + "key_files": [ + "openmeter/billing/service/stdinvoicestate.go", + "openmeter/billing/charges/statemachine/machine.go" + ], + "usage_example": "sm := stateless.NewStateMachineWithExternalStorage(\n func(ctx context.Context) (any, error) { return inv.Status, nil },\n func(ctx context.Context, s any) error { inv.Status = s.(billing.InvoiceStatus); return nil },\n stateless.FiringImmediate,\n)\nsm.Configure(billing.InvoiceStatusDraft).\n Permit(triggerFinalize, billing.InvoiceStatusIssued).\n OnActive(func(ctx context.Context, _ ...any) error {\n return svc.finalizeInvoice(ctx, inv)\n })\nif err := sm.Fire(triggerFinalize); err != nil {\n return err\n}", + "applicable_when": "Charge aggregate that carries its status as a string enum and implements ChargeLike \u2014 machine.go:39 requires GetStatus/WithStatus/GetBase/WithBase and machine.go:16 constrains STATUS to ~string + Validate().", + "do_not_apply_when": [ + "State is not externally owned by the aggregate \u2014 these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the persisted row; an in-memory-state FSM would not persist transitions across requests.", + "A transition has no guard and no side effect and the type has only two states \u2014 a plain bool/enum field is simpler than configuring a stateless machine." + ], + "scope": [ + "billing", + "charges" + ], + "tips": [ + "Declare every legal transition as a Permit edge; a status reachable only by direct mutation bypasses guards and side effects.", + "OnActive side effects run inside the surrounding transaction \u2014 keep them idempotent for retry safety.", + "Reuse the generic charge machine across flat-fee/usage-based/credit-purchase by satisfying ChargeLike rather than writing a new machine per subtype." + ] + }, + { + "capability": "Compile-time dependency injection with feature-gated provider swaps (Wire)", + "category": "state_management", + "libraries": [ + "github.com/google/wire v0.7.0" + ], + "pattern_description": "Constructors are grouped into wire.NewSet provider sets per concern in app/common/*.go; each binary's build-tagged wire.go (//go:build wireinject) lists the sets it needs and make generate emits wire_gen.go. Feature flags choose concrete vs noop providers at wiring time (app/common/ledger.go on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled).", + "key_files": [ + "cmd/server/wire.go", + "app/common/customer.go", + "app/common/billing.go", + "app/common/ledger.go", + "app/common/app.go" + ], + "usage_example": "// app/common/customer.go\nvar Customer = wire.NewSet(\n NewCustomerService,\n NewCustomerAdapter,\n)\n\nfunc NewCustomerLedgerService(conf config.Configuration) customer.ServiceHook {\n if !conf.Credits.Enabled {\n return ledgernoop.NewCustomerHook() // feature disabled -> noop\n }\n return ledger.NewCustomerHook(/* concrete deps */)\n}", + "applicable_when": "Subsystem gated by a config flag that must disable cleanly at every layer \u2014 credits.enabled wires ledger account services/resolvers to noop implementations across api/v3 handlers, customer ledger hooks, and namespace provisioning (app/common/ledger.go; AGENTS.md).", + "do_not_apply_when": [ + "Checking the feature flag inside service business logic instead of swapping the provider \u2014 a disabled subsystem must be a noop at the wiring seam, not a runtime conditional scattered through methods (AGENTS.md credits.enabled guidance).", + "Any ledger-account backfill that must write real ledger_accounts / ledger_customer_accounts rows \u2014 when credits.enabled is false the default DI outputs are noop, so the backfill must construct concrete ledger account + resolver adapters directly (AGENTS.md)." + ], + "scope": [], + "tips": [ + "Never edit wire_gen.go by hand; change the provider set and run make generate.", + "Each binary links only the provider sets in its wire.go \u2014 adding a service to one binary does not add it to the others.", + "Register namespace handlers before initNamespace(...) in cmd/server/main.go if they must provision the default namespace at startup (AGENTS.md)." + ] + }, + { + "capability": "Domain events over Kafka via Watermill CQRS and type-routed consumers", + "category": "notifications", + "libraries": [ + "github.com/ThreeDotsLabs/watermill v1.5.2", + "github.com/ThreeDotsLabs/watermill-kafka/v3 v3.1.2", + "github.com/cloudevents/sdk-go/v2 v2.16.2", + "github.com/confluentinc/confluent-kafka-go/v2 v2.14.1" + ], + "pattern_description": "Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest/balance-worker/system). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored. A notification DLQ topic (om_sys.notification_service_dlq) catches poison messages.", + "key_files": [ + "openmeter/watermill/eventbus/eventbus.go", + "openmeter/watermill/grouphandler/grouphandler.go", + "openmeter/notification/consumer/consumer.go" + ], + "usage_example": "handler := grouphandler.NewNoPublishingHandler(\n logger,\n eventMarshaler,\n grouphandler.NewGroupEventHandler(func(ctx context.Context, e *MyEvent) error {\n return svc.Handle(ctx, e)\n }),\n)\n// publishing from a producer:\nif err := eventBus.Publish(ctx, myEvent); err != nil {\n return err\n}", + "applicable_when": "Asynchronous cross-binary work where eventual consistency is acceptable \u2014 publish routes by event-name prefix to IngestEventsTopic/BalanceWorkerEventsTopic/SystemEventsTopic (openmeter/watermill/eventbus/eventbus.go).", + "do_not_apply_when": [ + "Cross-domain effect that must commit in the same transaction as the triggering write (e.g. provisioning a ledger account on customer create) \u2014 use the in-process Service hook registry (openmeter/customer/service/service.go), not Kafka.", + "Producing/consuming Kafka directly with confluent-kafka-go instead of the eventbus/grouphandler abstractions \u2014 bypasses topic routing, CloudEvents marshaling, and unknown-type accounting." + ], + "scope": [ + "notification", + "billing", + "entitlement", + "ingest" + ], + "tips": [ + "Event-name prefix determines the topic; name new events consistently so they route correctly.", + "All handlers for a type run and their errors are joined \u2014 make each handler independently retry-safe.", + "Unknown event types are ignored (counted), not errored \u2014 a missing handler registration fails silently." + ] + }, + { + "capability": "Pluggable third-party app integration via the marketplace registry", + "category": "payments", + "libraries": [ + "github.com/stripe/stripe-go/v80 v80.2.1", + "github.com/invopop/gobl v0.403.0" + ], + "pattern_description": "The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing. Install operations look up the factory by AppType; capability support (e.g. billing) is discovered by type-asserting the constructed instance against capability interfaces.", + "key_files": [ + "openmeter/app/adapter/marketplace.go", + "openmeter/app/registry.go", + "openmeter/app/marketplace.go", + "openmeter/app/stripe/service/service.go" + ], + "usage_example": "func NewStripeService(appSvc app.Service, deps Deps) (Service, error) {\n s := &service{deps: deps}\n err := appSvc.RegisterMarketplaceListing(app.RegistryItem{\n Listing: stripeListing,\n Factory: s, // builds an App instance for an install\n })\n if err != nil {\n return nil, err\n }\n return s, nil\n}", + "applicable_when": "Integration factory that registers exactly once per process at DI wiring time \u2014 RegisterMarketplaceListing rejects a second registration of the same AppType (openmeter/app/adapter/marketplace.go:121).", + "do_not_apply_when": [ + "Registration happens after the listing surface is already serving requests \u2014 the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live (openmeter/app/adapter/marketplace.go:121)." + ], + "scope": [ + "app" + ], + "tips": [ + "Discover an installed app's billing/invoicing capability by type assertion against the capability interface, not by an AppType switch.", + "Use GOBL for invoice document formatting behind the billing service rather than emitting payment-provider-specific invoice shapes.", + "Stripe API access uses stripe-go/v80; keep the pinned major in sync with the SDK version in go.mod." + ] + }, + { + "capability": "Persisted entity definition via Ent schema mixins + Atlas migrations", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6", + "ariga.io/atlas v0.36.x", + "github.com/golang-migrate/migrate/v4 v4.19.1", + "github.com/oklog/ulid/v2 v2.1.1" + ], + "pattern_description": "A schema struct composes entutils mixins in Mixin() (ResourceMixin \u2192 IDMixin ULID char(26) PK + NamespaceMixin + MetadataMixin jsonb + TimeMixin created/updated/deleted_at + unique (namespace,id); UniqueResourceMixin adds a (namespace,key,deleted_at) unique index). Edit the schema, run make generate to regenerate openmeter/ent/db, then atlas migrate --env local diff to emit .up.sql/.down.sql under tools/migrate/migrations and update atlas.sum.", + "key_files": [ + "pkg/framework/entutils/mixins.go", + "openmeter/ent/schema/customer.go", + "openmeter/ent/schema/billing.go", + "tools/migrate/migrations" + ], + "usage_example": "func (Customer) Mixin() []ent.Mixin {\n return []ent.Mixin{\n entutils.ResourceMixin{}, // id+namespace+metadata+timestamps+soft-delete\n BillingAddressMixin{},\n }\n}\n\nfunc (Customer) Fields() []ent.Field {\n return []ent.Field{\n field.String(\"key\").Optional(),\n field.String(\"primary_email\").Optional(),\n }\n}", + "applicable_when": "Entity relying on key-uniqueness within a namespace \u2014 UniqueResourceMixin's (namespace,key,deleted_at) index only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47).", + "do_not_apply_when": [ + "Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL \u2014 add a custom SQL migration with IndexWhere as Customer does (openmeter/ent/schema/customer.go:58-62), rather than relying on the mixin's deleted_at-in-key approximation.", + "Ent ent.View schemas \u2014 they generate query code but do NOT appear in migrate.Tables, so the view DDL needs an explicit SQL migration (ChargesSearchV1; AGENTS.md ent-view caveat)." + ], + "scope": [], + "tips": [ + "Never edit openmeter/ent/db (generated); change the schema and run make generate.", + "Drop incidental go.sum entries (e.g. tablewriter) that make generate / atlas diff add unless the task requires a dependency change (AGENTS.md).", + "pr-checks enforce atlas.sum append-only; never rewrite existing migration files." + ] + }, + { + "capability": "Typed v1 HTTP handler with domain-error-to-status mapping", + "category": "networking", + "libraries": [ + "github.com/go-chi/chi/v5 v5.2.5", + "github.com/getkin/kin-openapi v0.139.0", + "github.com/go-chi/render v1.0.3" + ], + "pattern_description": "Per-domain httpdriver packages build httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts): a decoder maps the HTTP request to a typed Request, the service op runs, an encoder writes the Response, and an errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T] in order, short-circuiting on errors.As against concrete domain error types into RFC7807 problem documents. The v1 router validates requests against the embedded OpenAPI3 spec first.", + "key_files": [ + "pkg/framework/transport/httptransport/handler.go", + "openmeter/notification/httpdriver/handler.go", + "pkg/framework/commonhttp/errors.go", + "openmeter/notification/httpdriver/errors.go" + ], + "usage_example": "func (h handler) GetChannel() httptransport.Handler[GetChannelRequest, api.Channel] {\n return httptransport.NewHandler(\n func(ctx context.Context, r *http.Request) (GetChannelRequest, error) {\n return GetChannelRequest{ID: chi.URLParam(r, \"id\")}, nil\n },\n func(ctx context.Context, req GetChannelRequest) (api.Channel, error) {\n return h.service.GetChannel(ctx, req.ID)\n },\n commonhttp.JSONResponseEncoder[api.Channel],\n httptransport.WithErrorEncoder(h.resolveErrorEncoder()),\n )\n}", + "applicable_when": "Implementing a v1 endpoint where domain errors must map to HTTP status \u2014 errorEncoder uses ordered errors.As short-circuits (notification.NotFoundError\u2192404, GenericValidationError\u2192400, UpdateAfterDeleteError\u2192409) (openmeter/notification/httpdriver/errors.go).", + "do_not_apply_when": [ + "Implementing a v3 AIP endpoint \u2014 v3 uses oapi-codegen ServerInterface delegators in api/v3/server/routes.go with shared rendering in api/v3/apierrors, not httptransport.Handler.", + "A handler that maps a domain error inline to a status instead of through the typed errorEncoder chain \u2014 breaks the uniform RFC7807 mapping (pkg/framework/commonhttp/errors.go)." + ], + "scope": [], + "tips": [ + "Order the errorEncoder chain most-specific-first; errors.As stops at the first match.", + "Return domain error types (NotFoundError, GenericValidationError) from services so the encoder can map them \u2014 do not pre-format HTTP errors in services.", + "GenericValidationError from accumulating Validate() maps to a single 400 ValidationIssue." + ] + }, + { + "capability": "In-process cross-domain reactions via Service hook registry", + "category": "state_management", + "libraries": [ + "github.com/openmeterio/openmeter/pkg/models (ServiceHookRegistry)" + ], + "pattern_description": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]); on a lifecycle event it invokes registered hooks synchronously inside the same transaction. Wire providers in app/common build the hook and call targetService.RegisterHooks(h) at startup, registering a Noop hook when the feature is disabled.", + "key_files": [ + "openmeter/customer/service/service.go", + "app/common/customer.go", + "pkg/models" + ], + "usage_example": "// at wiring time in app/common/customer.go\nledgerHook := NewCustomerLedgerService(conf) // concrete or Noop\ncustomerService.RegisterHooks(ledgerHook)\n\n// the hook reacts to customer creation in-process / in-tx\nfunc (h *ledgerHook) PostCreate(ctx context.Context, c *customer.Customer) error {\n return h.ledger.ProvisionAccount(ctx, c)\n}", + "applicable_when": "Cross-domain effect that must be synchronous and transactional with the triggering write and feature-gatable \u2014 customer-create \u2192 ledger account provisioning is registered as a hook and swapped to Noop when credits.enabled is false (app/common/customer.go).", + "do_not_apply_when": [ + "Effect tolerates eventual consistency and should not block the triggering transaction \u2014 publish a domain event over the Kafka eventbus instead (openmeter/watermill/eventbus/eventbus.go).", + "Triggering service would gain a static import dependency on the dependent domain \u2014 the hook registry exists precisely to avoid that compile-time edge; do not hard-code the dependent call in the service body." + ], + "scope": [ + "customer", + "subscription", + "ledger" + ], + "tips": [ + "Hooks run inside the triggering transaction; a hook error should roll the whole operation back when the effect is mandatory.", + "Provide a Noop hook implementation so a disabled feature registers a no-op rather than nothing.", + "Keep hook signatures generic via ServiceHook[T] so multiple reactors can register against one service." + ] + }, + { + "capability": "Code-generated type conversion between domain, API, and DB representations", + "category": "persistence", + "libraries": [ + "github.com/jmattheis/goverter v1.9.3", + "github.com/awalterschulze/goderive v0.5.1" + ], + "pattern_description": "convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations (equality/clone helpers). Hand-written conversion functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the go-types-conversion skill); make generate regenerates them.", + "key_files": [ + "api/convert.go", + "api/convert.gen.go", + "openmeter/billing/derived.gen.go", + "openmeter/customer/adapter/entitymapping.go" + ], + "usage_example": "// goverter interface in convert.go (source of generation)\n// goverter:converter\ntype Converter interface {\n ToAPICustomer(c customer.Customer) api.Customer\n FromAPICustomerCreate(in api.CustomerCreate) customer.CustomerMutate\n}\n// run `make generate` -> convert.gen.go implements Converter", + "applicable_when": "Translating between domain/API/DB types where the mapping is structural \u2014 hand-written mappers must use FromAPI/ToAPI/FromDB/ToDB names (openmeter/customer/adapter/entitymapping.go).", + "do_not_apply_when": [ + "Editing a *.gen.go converter by hand \u2014 they carry a DO NOT EDIT header; change convert.go (goverter) or the goderive annotation and regenerate.", + "Using project/projected terminology for domain mapping \u2014 AGENTS.md mandates map/mapped terminology and the FromAPI/ToAPI/FromDB/ToDB function names." + ], + "scope": [], + "tips": [ + "For equality/clone of billing aggregates use the goderive-generated helpers in derived.gen.go rather than hand-writing deep-equals.", + "Keep one converter interface per boundary (API\u2194domain, DB\u2194domain) so goverter generation stays scoped." + ] + }, + { + "capability": "Svix-backed webhook delivery behind a Handler interface", + "category": "notifications", + "libraries": [ + "github.com/svix/svix-webhooks v1.95.1", + "go.opentelemetry.io/otel v1.44.0" + ], + "pattern_description": "notification/webhook defines a Handler interface (CreateWebhook/UpdateWebhook/endpoint secret + header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. A reconciliation loop in eventhandler/reconcile.go re-drives delivery for events whose webhook send did not confirm.", + "key_files": [ + "openmeter/notification/webhook/svix/webhook.go", + "openmeter/notification/webhook/noop/noop.go", + "openmeter/notification/eventhandler/reconcile.go" + ], + "usage_example": "func NewWebhookHandler(conf config.NotificationConfiguration) (webhook.Handler, error) {\n if !conf.Webhook.Enabled {\n return noop.NewHandler(), nil\n }\n return svix.NewHandler(svix.Config{\n ServerURL: conf.Webhook.SvixServerURL,\n APIKey: conf.Webhook.SvixAPIKey,\n })\n}", + "applicable_when": "Delivering notification events to customer-configured endpoints where delivery is feature-gated \u2014 the Handler interface has both a Svix and a noop implementation selected at wiring time (openmeter/notification/webhook/noop/noop.go).", + "do_not_apply_when": [ + "Webhooks disabled in config \u2014 wire the noop Handler, not the Svix one, so no Svix API key is required (openmeter/notification/webhook/noop/noop.go).", + "Treating a Svix send as the durable source of truth \u2014 the NotificationEventDeliveryStatus row + reconcile loop (openmeter/notification/eventhandler/reconcile.go) are authoritative; an un-reconciled send can be re-driven." + ], + "scope": [ + "notification" + ], + "tips": [ + "Persist NotificationEventDeliveryStatus before/around the Svix call so the reconcile loop can recover unconfirmed deliveries.", + "Wrap Svix calls in tracex spans for observability (the svix Handler already does).", + "Payload versioning lives in eventpayload.go \u2014 bump the payload version when changing the wire shape (see /notification skill)." + ] + } + ], + "pitfalls": [ + { + "id": "pf_0010", + "problem_statement": "Cross-aggregate references in the Postgres ledger (LedgerCustomerAccount.account_id/customer_id) and the ClickHouse usage tables are deliberately FK-less and migration-less, so referential integrity and column/struct alignment are enforced only by application code with no database-level guard.", + "evidence": [ + "openmeter/ent/schema/ledger_customer_account.go func Edges() returns nil; customer_id and account_id are field.String(...).Immutable() with no FK to Customer or LedgerAccount (intentional, to avoid import cycles between ledger and customer/account).", + "openmeter/customer/adapter/customer.go DeleteCustomer is a soft-delete (SetDeletedAt) and never touches LedgerCustomerAccount, while it cascade-deletes only edge-linked children - LedgerCustomerAccount is not an edge, so a hard customer purge would leave dangling rows undetected.", + "openmeter/streaming/clickhouse/connector.go calls createTable only when !SkipCreateTables, and event_query.go:25 uses IfNotExists() - the events table is create-if-absent with no diff/migration path.", + "openmeter/streaming/connector.go:24-35 RawEvent columns must be kept in sync with the ClickHouse DDL (event_query.go:26-36) and the INSERT column list (event_query.go:207) by hand." + ], + "root_cause": "Two decisions converge: the 'Layered Domain Service/Adapter' import-cycle-avoidance keeps the ledger link table FK-less (Edges() returns nil so Ent emits no foreign key), and the multi-store decision (Postgres+Ent+Atlas for domain, ClickHouse create-if-not-exists for usage) leaves ClickHouse outside the migration pipeline. Neither path has a database-level integrity or schema-diff guard, so a hard-deleted account leaving dangling LedgerCustomerAccount rows, or a RawEvent struct change not mirrored in the DDL/INSERT list, drifts undetected until a runtime read fails.", + "fix_direction": [ + "Add application-level integrity checks/tests asserting every LedgerCustomerAccount.account_id and customer_id resolves to a live row, and cover any account/customer hard-deletion path.", + "Introduce a ClickHouse migration mechanism (or an ALTER-on-startup reconcile) so RawEvent column changes propagate to already-provisioned tables.", + "Add a contract test asserting the RawEvent ch: field set equals the createEventsTable DDL column set and the INSERT column list, in order.", + "Document the FK-less and migration-less invariants in openmeter/ledger and openmeter/streaming CLAUDE.md so future schema edits know the integrity burden is on application code." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/ledger_customer_account.go", + "openmeter/ledger", + "openmeter/streaming/connector.go", + "openmeter/streaming/clickhouse/event_query.go" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0011", + "problem_statement": "An in-progress billing-invoice schema migration keeps deprecated columns and a two-place schema_level discriminator (per-row column plus a temporary BillingInvoiceWriteSchemaLevel table) live, creating coupled cleanup debt that must be removed in lockstep across the Ent schema and the billing adapter once migration completes.", + "evidence": [ + "openmeter/ent/schema/billing.go:417 line_ids Deprecated; billing.go:631 BillingInvoiceSplitLineGroup tax_config/tax_code_id/tax_behavior Deprecated; billing.go:793 discount type/quantity/pre_line_period_quantity Deprecated.", + "openmeter/ent/schema/billing.go:1171 field.Int(\"schema_level\").Default(1) on BillingInvoice; billing.go:1363 BillingInvoiceWriteSchemaLevel is a temporary single-row table tracking the write schema level.", + "openmeter/billing/adapter/schemalevel.go and gatheringinvoice.go:43/58 read and set the discriminator; gatheringinvoice.go:424 / invoicelinesplitgroup.go:254 branch read mapping on invoice.SchemaLevel; lock.go:55 runs a per-customer migrateCustomerInvoices keyed on minSchemaLevel - the dual-write/dual-read logic spans multiple adapter files." + ], + "root_cause": "Stems from the Ent-schema-as-source-of-truth persistence decision under an incremental (not breaking-cutover) invoice-line migration: rather than one cutover, the schema carries deprecated columns plus a schema_level discriminator encoded in two artifacts (the BillingInvoice.schema_level column and the standalone BillingInvoiceWriteSchemaLevel table), and the adapter reads GetInvoiceDefaultSchemaLevel/SetSchemaLevel and branches mapGatheringInvoiceLinesFromDB on the level to write and read both shapes. Because the versioning state lives in two places and the dual-write branches live across several adapter files, the cleanup is a multi-artifact schema-plus-adapter operation that can be left half-done if the migration stalls.", + "fix_direction": [ + "Maintain an explicit checklist of the deprecated columns and the two schema_level artifacts (BillingInvoice.schema_level + BillingInvoiceWriteSchemaLevel) to drop together.", + "When GetInvoiceDefaultSchemaLevel reports a single level everywhere, drop the field, the BillingInvoiceWriteSchemaLevel table, the adapter dual-shape map branches, and lock.go migrateCustomerInvoices in one migration.", + "Generate and verify the Atlas down-migration for the column drops before landing, given the atlas.sum linear-chain constraint.", + "Add a post-cutover test asserting no live billing_invoice row references a deprecated column and no row has schema_level below the target." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/billing.go", + "openmeter/billing/adapter" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0012", + "problem_statement": "LedgerSubAccountRoute denormalizes routing dimensions (currency, tax_code, tax_behavior, features, cost_basis, credit_priority) as plain immutable literal columns with no FK to their source tables - tax_code stores TaxCode.Key, not a FK - so a created route can hold a value that no longer matches the canonical table with no database-level guard.", + "evidence": [ + "openmeter/ent/schema/ledger_account.go:116 comment '// Literal routing values (denormalized from routing_key for query filtering; not FKs).'", + "openmeter/ent/schema/ledger_account.go:118 comment '// tax_code stores the TaxCode.Key string used as a routing dimension, not a FK to the tax_codes table.'", + "openmeter/ent/schema/ledger_account.go:117-130 currency/tax_code/tax_behavior/features/cost_basis/credit_priority are all field.*(...).Immutable() with no edge - so the values are write-once snapshots, but nothing verifies they matched the source table at write time or remain valid afterward." + ], + "root_cause": "Stems from the 'Double-entry ledger with FK-less cross-aggregate links' decision plus a query-performance denormalization: ledger sub-account routes flatten routing dimensions into literal columns (ledger_account.go:116-118) for filterable querying instead of FK-joining to tax_codes/currencies, because adding those edges would couple the ledger schema to the tax/catalog aggregates. The columns are Immutable() (write-once snapshots, so they cannot drift after creation), but there is no FK or CHECK to validate that tax_code/currency matched a canonical row at insert time, so an application bug or a later rename of a TaxCode.Key leaves the route pointing at a value the source table no longer recognises, undetectable at the database level.", + "fix_direction": [ + "Add application-level validation in the ledger resolver that tax_code/currency exist in their canonical tables before a LedgerSubAccountRoute is created.", + "Add a reconciliation test asserting every LedgerSubAccountRoute.tax_code resolves to a live TaxCode.Key and currency is a valid ISO-4217 code.", + "Document the snapshot-immutable-not-FK invariant in openmeter/ledger CLAUDE.md so future edits know these columns are write-once denormalized values, not live references.", + "If tax codes can be renamed, define a policy (block rename while routes reference the key, or carry a stable TaxCode id alongside the human key)." + ], + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/ledger_account.go", + "openmeter/ledger" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0013", + "problem_statement": "Ledger transaction-template code resolution converts a recoverable error into a process panic: TemplateCode(template) panics when a TransactionTemplate's code() returns an empty string, so a newly added template that forgets to declare its code() crashes the ledger collector at runtime instead of failing the build or returning an error.", + "evidence": [ + "openmeter/ledger/transactions/codes.go:109-115 func TemplateCode(template TransactionTemplate) string { code, err := templateCode(template); if err != nil { panic(err) }; return string(code) }.", + "openmeter/ledger/transactions/codes.go:83-89 templateCode returns fmt.Errorf('unknown transaction template code for %T', template) when template.code() == '' - the only error source.", + "openmeter/ledger/collector/correct.go:241,285,293,361,511,656 and collect.go:281,283 call transactions.TemplateCode(...) directly in production correction/collection paths.", + "AGENTS.md: 'Never use panic in non-test code paths. If a new failure mode is possible, change the function signature to return an error and propagate it explicitly.'" + ], + "root_cause": "Stems from the 'Double-entry ledger with template-only transaction construction' decision: each correction/collection template implements code() to self-identify, and TemplateCode (codes.go:113) was given a string return type (not (string, error)) so call sites in collector/correct.go and collect.go can use it inline in switch/case and as map keys. To preserve that ergonomic signature, the helper swallows the error by panicking. Every current TransactionTemplate returns a non-empty code, so the panic is not firing today - but it is reachable the moment a new template is registered without a code(), violating the no-panic-in-production rule and turning a static omission into a runtime crash in a financial path. There is no triggering caller that fires it now, so this is a latent class, not a finding.", + "fix_direction": [ + "Change TemplateCode to return (string, error) and propagate the error through collector/correct.go and collect.go call sites, replacing inline switch/case usage with an explicit lookup-and-handle.", + "Alternatively, enforce code() completeness with a compile-time-adjacent registry test that constructs every TransactionTemplate implementation and asserts code() != '' (so a missing code fails CI, not production).", + "Add a lint/grep CI guard flagging panic( in openmeter/ledger/** outside _test.go to keep the no-panic rule enforced as the ledger grows.", + "Document in openmeter/ledger/transactions/CLAUDE.md that every new TransactionTemplate must declare a non-empty code() and is covered by the registry test." + ], + "severity": "warn", + "confidence": 0.75, + "applies_to": [ + "openmeter/ledger/transactions/codes.go", + "openmeter/ledger/collector", + "openmeter/ledger/transactions" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + }, + { + "id": "pf_0014", + "problem_statement": "Internal test packages of production service directories (package service in openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service) import the shared test/billing fixtures package, which in turn imports those same service packages from its own _test files, forming a test-only import cycle that couples multiple production service trees through one mutable fixture package.", + "evidence": [ + "openmeter/billing/charges/service/base_test.go declares 'package service' (internal test package) and imports billingtest 'github.com/openmeterio/openmeter/test/billing'.", + "openmeter/billing/worker/subscriptionsync/service/base_test.go declares 'package service' and imports test/billing.", + "test/billing/subscription_test.go imports github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service - the back-edge that closes the loop (note: test/billing NON-test files do NOT import these service packages, so there is no production import cycle - the cycle is confined to the test graph).", + ".archie dependency graph cycle: ['openmeter/billing/charges/service','openmeter/billing/charges/testutils','openmeter/billing/worker/subscriptionsync/service','test/billing'].", + "AGENTS.md: 'Keep domain test helpers under openmeter/.../testutils independent from app/common ... or unrelated wiring additions can create test-only import cycles.'" + ], + "root_cause": "Stems from the 'Layered Domain Service / Adapter / HTTP-driver' pattern plus the shared cross-package test harness (test/billing BaseSuite/SubscriptionMixin) that the /billing and /subscriptionsync skills steer tests toward: because charges and subscriptionsync internal _test files (package service) reuse the same heavyweight test/billing fixtures, and test/billing's own _test files reach back into those service packages, the test compilation graph forms a cycle. Go tolerates it today only because the back-edges live in _test files of different packages, but any move of a back-edge import into a non-test file of test/billing (e.g. a fixture helper that constructs a real subscriptionsync service) would convert it into a hard production import cycle that breaks the build. The shared mutable fixture package is the single coupling point that makes this fragile.", + "fix_direction": [ + "Keep test/billing's non-test files free of imports into openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service; restrict those imports to _test files only, and add a CI grep guard asserting it.", + "Split test/billing into a minimal fixture-construction core (no service imports) and per-domain test-only extensions, so each service tree depends on the smallest fixture surface.", + "Per AGENTS.md, build test dependencies from underlying package constructors (repos, adapters, services, lockr) rather than routing through the shared harness where a lighter fixture suffices.", + "Document the test-only-cycle constraint in openmeter/billing/charges/service/CLAUDE.md and test/billing/CLAUDE.md so future fixture additions do not promote a _test back-edge into production code." + ], + "severity": "warn", + "confidence": 0.7, + "applies_to": [ + "test/billing", + "openmeter/billing/charges/service", + "openmeter/billing/charges/testutils", + "openmeter/billing/worker/subscriptionsync/service" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + }, + { + "id": "pf_0015", + "problem_statement": "Two parallel HTTP API surfaces (legacy v1 in openmeter/server/router and AIP-style v3 in api/v3) are generated from one TypeSpec source and both delegate to the same domain services, but v3 carries permanently-unimplemented and feature-gated operations that satisfy the generated interface via api.Unimplemented{}, so the advertised contract diverges from the runtime capability with no compile-time signal.", + "evidence": [ + "openmeter/server/router/router.go wires ~25 per-domain httpdriver/httphandler packages and implements api.ServerInterface from api/api.gen.go (legacy v1).", + "api/v3/server/routes.go implements a separate generated ServerInterface delegating to api/v3/handlers/* packages.", + "api/v3/server/routes.go:419 CreateCreditAdjustment and routes.go:473 QueryGovernanceAccess always call api.Unimplemented (HTTP 501); routes.go:372-435 GetCustomerCreditBalance / ListCreditGrants / CreateCreditGrant / ListCreditTransactions short-circuit to Unimplemented when s.Credits.Enabled is false.", + "api/v3/api.gen.go:7186-7191 type Unimplemented struct{} writes http.StatusNotImplemented for each endpoint - the satisfy-the-interface escape hatch.", + "api/spec has two TypeSpec packages (legacy/ and aip/) generating the two surfaces plus all three SDKs." + ], + "root_cause": "Stems from the 'TypeSpec as the single source of truth for both v1 and v3 HTTP APIs and all three SDKs' decision under an in-progress v1->v3 migration: TypeSpec generates each operation's server-interface method and SDK client method from the contract independently of whether the server implements it, and the v3 Server is allowed to satisfy the generated ServerInterface by embedding/delegating to api.Unimplemented{} (api.gen.go:7186), which always returns 501. Because Go only checks that the interface is satisfied, a permanently-stubbed or feature-gated operation compiles identically to a finished one. Maintaining two surfaces (v1 httpdriver vs v3 centralized handlers) with two handler conventions doubles the places where a published-but-unimplemented operation can hide, and the SDKs advertise capability the runtime never provides.", + "fix_direction": [ + "Inventory every v3 operation whose Server method body is only a call to api.Unimplemented; for each, decide implement / feature-gate-and-document / mark-unstable-in-TypeSpec.", + "Add a generated-vs-implemented audit test that fails CI when a v3 Server method delegates only to api.Unimplemented for an operation the spec marks stable.", + "Establish a single documented convention for the two surfaces' handler shape (or a migration plan to retire v1 httpdriver) so reviewers are not maintaining two divergent conventions indefinitely.", + "Surface feature-gated/unimplemented status in the OpenAPI operation descriptions so SDK consumers see it, and track the v1->v3 cutover in api/v3/server/CLAUDE.md." + ], + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "api/v3/server", + "api/v3/handlers", + "openmeter/server/router", + "api/spec", + "api/client" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + } + ], + "notes": "SCAN_MODE=full produced fresh from blueprint_raw.json Wave-1 analysis. Preserved all 13 prior canonical findings (f_0001-f_0013) verbatim with ids/first_seen/verdict_history/status intact, root causes re-named in the Design agent's key_decisions vocabulary (e.g. 'credits.enabled feature flag enforced at four independent wiring layers via noop implementations', 'Namespace Manager fan-out provisioning with cmd/server as the sole handler registrant', 'Kafka + Watermill async backbone with three name-prefix-routed topics'). Re-verified and corrected drifted line numbers against current source: server.go context.Background now :222-223 (was :213), eventbus default case now :142 (was :141), grouphandler return nil :54, appclient UpdateAppStatus :240 (stable), customer adapter FieldName filter :59 (stable). Active findings bumped confirmed_in_scan (f_0003->7, f_0005->7, f_0006->6, f_0007->6, f_0008->5, f_0009->4, f_0010->4, f_0011->3, f_0012->2, f_0013->2); demoted findings (f_0001,f_0002,f_0004) left at demoted state. ONE new finding: f_0014 - v3 CreateCreditAdjustment (routes.go:419) and QueryGovernanceAccess (routes.go:473) unconditionally return HTTP 501 despite being advertised stable in the generated TypeSpec/OpenAPI contract and all three SDKs; verified api.Unimplemented (api.gen.go:7186-7191) writes StatusNotImplemented, and sibling credit handlers DO delegate to real handlers when Enabled - so these two are permanent stubs, not feature gates; fires on every call -> finding, paired to new pf_0015. THREE new pitfalls: pf_0013 (panic-in-production in ledger TemplateCode codes.go:113 when a template's code() is empty - latent class, no current firing caller since all registered templates have codes, so pitfall not finding); pf_0014 (test-only import cycle through shared test/billing fixtures - Wave-1 structure draft #1 was filed as a 'production cycle' but verification shows test/billing NON-test files do NOT import charges/service or subscriptionsync/service, so it is a test-graph coupling pitfall, not a production-cycle finding); pf_0015 (dual v1/v3 API surface with api.Unimplemented escape hatch diverging contract from runtime - the architectural class behind f_0014, also covering Wave-1 structure draft #3). Wave-1 structure draft #2 (rating service mutator/rate/testutil 4-dir cycle) was investigated and is NOT a real cycle: rate's test files use 'package rate_test' (external test package, which Go fully supports) and testutil/ubptest.go importing service does not close a production loop - dropped, no finding or pitfall emitted for it. All five Wave-1 Data-agent drafts remain covered (customer ILIKE -> f_0011; ClickHouse migration-less -> f_0013/pf_0010; billing schema_level -> f_0012/pf_0011; LedgerCustomerAccount FK-less -> pf_0010; LedgerSubAccountRoute denormalization -> pf_0012). Total store: 14 findings (13 carried + 1 new), 6 pitfalls (3 carried + 3 new). Soft floor of 3 met for both streams.", + "architecture_diagram": "graph TD\n Client[\"API clients / SDKs (Go, JS, Python)\"] --> Server[\"cmd/server: Chi v1+v3 HTTP API (oapi-codegen)\"]\n Server --> Domains[\"openmeter/* domain services (billing, customer, subscription, entitlement, credit, ledger, meter)\"]\n Domains --> Ent[\"Ent adapters + entutils.TransactingRepo\"]\n Ent --> Postgres[(\"PostgreSQL (Ent schema + Atlas)\")]\n Domains --> EventBus[\"Watermill eventbus.Publisher\"]\n EventBus --> Kafka[(\"Kafka topics (ingest / system / worker)\")]\n Client -->|usage events| Ingest[\"ingest.Collector (Redis dedupe)\"]\n Ingest --> Kafka\n Kafka --> Sink[\"cmd/sink-worker: 3-phase flush\"]\n Sink --> ClickHouse[(\"ClickHouse events (MergeTree)\")]\n Kafka --> Workers[\"billing-worker / balance-worker / notification-service\"]\n Workers --> Domains\n ClickHouse --> Domains\n Workers --> Svix[\"Svix webhook delivery\"]" +} \ No newline at end of file diff --git a/.archie/blueprint_raw.json b/.archie/blueprint_raw.json new file mode 100644 index 0000000000..015e5f2b42 --- /dev/null +++ b/.archie/blueprint_raw.json @@ -0,0 +1,9882 @@ +{ + "meta": { + "architecture_style": "Multi-binary Go backend organized as domain packages under openmeter/, each following a hand-rolled service/adapter/connector pattern (interfaces declared in the domain root package, concrete struct constructors in nested service/ and adapter/ subpackages, wired together by Google Wire in app/common). Persistence is Ent ORM over PostgreSQL with a single shared generated client (openmeter/ent/db). Event-time usage metering data flows through Kafka into ClickHouse via streaming connectors; an async event bus (Watermill over Kafka) drives billing/notification/balance workers. Two parallel HTTP API surfaces coexist: a legacy v1 surface assembled in openmeter/server/router from per-domain httpdriver/httphandler packages, and a newer AIP-style v3 surface in api/v3 with centralized handlers that delegate to the same domain services. API contract is authored in TypeSpec (api/spec, two packages: legacy + aip) and code-generated to OpenAPI then to Go (oapi-codegen) and to JS/Python/Go SDKs. A separate Benthos/Redpanda-Connect collector binary (collector/) ships usage events from external sources. Cross-cutting dependency magnets (pkg/models, pkg/clock, pkg/pagination, openmeter/customer, openmeter/productcatalog, openmeter/billing) are pulled in widely; the only import cycles detected are test-harness-induced (production/test packages importing the test/billing fixtures package).", + "platforms": [ + "backend", + "cli", + "shared", + "web-frontend" + ], + "executive_summary": "OpenMeter is a multi-tenant Go usage-metering and billing platform that ingests CloudEvents usage data, aggregates it in ClickHouse, and drives entitlements, credit grants, a double-entry ledger, and invoice/charge billing through a versioned v1+v3 REST API. It is built as a single-Go-module modulith: roughly 35 layered domain packages under openmeter/ (each splitting Service and Adapter interfaces, Ent/PostgreSQL persistence, and HTTP drivers) composed by Google Wire into six runnable binaries (server, sink-worker, billing-worker, balance-worker, notification-service, jobs) plus a separate Benthos collector module. The HTTP spine routes requests through a Chi router (legacy v1 plus a Google-AIP-style v3 layer, both generated by oapi-codegen from a TypeSpec source of truth) into the domain services, which persist via transaction-aware Ent adapters to PostgreSQL while metered usage flows separately through the ingest collector and Kafka into a single append-only ClickHouse MergeTree table written by the sink worker's three-phase flush. Cross-binary work is asynchronous over Kafka behind a Watermill eventbus facade, with the billing, balance, and notification workers consuming events to advance billing, recompute balances, and deliver outbound webhooks via Svix. The architecture is a modular, event-driven Go monorepo of separately deployable services packaged as containers and orchestrated on Kubernetes via Helm, with the entire API surface and all three SDKs generated from the shared TypeSpec definition." + }, + "components": { + "structure_type": "modular", + "components": [ + { + "name": "Server entrypoint & DI bootstrap", + "location": "cmd/server", + "platform": "backend", + "responsibility": "main() loads config via Viper (with config.DecodeHook), validates it, calls Wire-generated initializeApplication(ctx, conf) to build the full Application graph, then runs app.Migrate(ctx) BEFORE provisioning the default namespace. It registers namespace handlers (app.LedgerNamespaceHandler, app.KafkaIngestNamespaceHandler) prior to initNamespace, constructs a debug.NewDebugConnector wrapping the StreamingConnector, and starts the HTTP server plus telemetry server through oklog/run. Panics are funneled through log.PanicLogger(log.WithExit).", + "depends_on": [ + "app/common", + "app/config", + "openmeter/server", + "openmeter/server/router", + "openmeter/namespace", + "openmeter/ingest/kafkaingest", + "openmeter/debug", + "pkg/errorsx", + "pkg/log" + ], + "exposes_to": [], + "key_interfaces": [ + { + "name": "main", + "methods": [ + "main" + ], + "description": "Process entrypoint: config load/validate, build Application, migrate DB, register namespace handlers, run server + telemetry via oklog/run group" + } + ], + "key_files": [ + { + "file": "cmd/server/main.go", + "description": "Boots the OpenMeter API server; migrates DB before namespace provisioning and registers ledger + kafka-ingest namespace handlers" + } + ] + }, + { + "name": "Worker & job entrypoints", + "location": "cmd", + "platform": "backend", + "responsibility": "Five additional binaries beyond the API server, each with its own main.go repeating the same Viper config-load/validate boilerplate (cmd/server/main.go pattern) and then building a worker-specific Wire application: billing-worker (invoice advancement/collection + subscription\u2192billing reconciliation), balance-worker (entitlement balance snapshotting from usage events), sink-worker (Kafka\u2192ClickHouse usage event sink), notification-service (notification event delivery), and jobs (one-off operational jobs). All share app/config and pkg/log.PanicLogger.", + "depends_on": [ + "app/common", + "app/config", + "pkg/log" + ], + "exposes_to": [], + "key_interfaces": [ + { + "name": "billing-worker main", + "methods": [ + "main" + ], + "description": "Loads config and runs the billing worker application" + }, + { + "name": "balance-worker main", + "methods": [ + "main" + ], + "description": "Runs the entitlement balance worker" + }, + { + "name": "sink-worker main", + "methods": [ + "main" + ], + "description": "Runs the Kafka-to-ClickHouse usage sink" + }, + { + "name": "notification-service main", + "methods": [ + "main" + ], + "description": "Runs the notification delivery service" + }, + { + "name": "jobs main", + "methods": [ + "main" + ], + "description": "Runs one-off operational jobs" + } + ], + "key_files": [ + { + "file": "cmd/billing-worker/main.go", + "description": "Billing worker entrypoint; identical config bootstrap to the server main" + }, + { + "file": "cmd/balance-worker/main.go", + "description": "Entitlement balance worker entrypoint" + }, + { + "file": "cmd/sink-worker/main.go", + "description": "Usage event sink-worker entrypoint" + }, + { + "file": "cmd/notification-service/main.go", + "description": "Notification delivery service entrypoint" + }, + { + "file": "cmd/jobs/main.go", + "description": "Operational jobs entrypoint" + } + ] + }, + { + "name": "Application wiring (app/common)", + "location": "app/common", + "platform": "backend", + "responsibility": "The dependency-injection layer. Each file is a Google Wire provider set (wire.NewSet) for one subsystem: billing.go declares BillingRegistry/ChargesRegistry bundling billing.Service plus flatfee/usagebased/creditpurchase/recognizer charge services; ledger.go wires concrete-or-noop ledger account/resolver services gated on credits.enabled; database.go, clickhouse.go, kafka.go, streaming.go provide infra clients; openmeter_server.go / openmeter_billingworker.go / openmeter_sinkworker.go / openmeter_balanceworker.go / openmeter_notification.go assemble per-binary Application structs. Constructor functions take explicit *slog.Logger and config inputs (never slog.Default()).", + "depends_on": [ + "app/config", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/rating", + "openmeter/customer", + "openmeter/ledger", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "openmeter/ent/db", + "pkg/framework/lockr", + "pkg/featuregate" + ], + "exposes_to": [ + "cmd/server", + "cmd/billing-worker", + "cmd/balance-worker", + "cmd/sink-worker", + "cmd/notification-service", + "cmd/jobs" + ], + "key_interfaces": [ + { + "name": "BillingRegistry", + "methods": [ + "ChargesServiceOrNil" + ], + "description": "Bundles billing.Service + ChargesRegistry so downstream callers depend on one struct rather than individual charge services" + }, + { + "name": "Billing (wire.NewSet)", + "methods": [ + "BillingAdapter", + "NewBillingRatingService", + "NewLedgerBreakageService", + "NewBillingRegistry", + "NewBillingCustomerOverrideService" + ], + "description": "Wire provider set assembling the billing + charges stack" + } + ], + "key_files": [ + { + "file": "app/common/billing.go", + "description": "Wire providers for billing/charges; defines BillingRegistry and ChargesRegistry aggregation structs" + }, + { + "file": "app/common/ledger.go", + "description": "Wires concrete vs noop ledger account/resolver services depending on credits.enabled" + }, + { + "file": "app/common/openmeter_server.go", + "description": "Assembles the API server Application provider set" + }, + { + "file": "app/common/openmeter_billingworker.go", + "description": "Assembles the billing worker Application" + }, + { + "file": "app/common/database.go", + "description": "Provides the Ent/pgx PostgreSQL client" + }, + { + "file": "app/common/clickhouse.go", + "description": "Provides the ClickHouse client used by streaming" + } + ] + }, + { + "name": "Billing domain", + "location": "openmeter/billing", + "platform": "backend", + "responsibility": "Largest domain (41 files in root, 95 in-edges). Root package declares the billing.Service and billing.Adapter interfaces plus invoice/line/profile/customer-override/discount/tax models and the StandardInvoiceHooks. service/ implements billing.Service (struct Service holds adapter, customerService, appService, taxCodeService, ratingService, featureService, meterService, streamingConnector, eventbus.Publisher, an engineRegistry of lineEngines, and an invoicecalc.Calculator) orchestrating the invoice state machine, gathering\u2192standard invoice conversion, line splitting, sequence numbering, and quantity snapshots. adapter/ implements billing.Adapter over Ent with HijackTx/WithTx transaction hijacking. Sub-areas: charges/ (usage-based & flatfee & credit-purchase charge lifecycle state machines), rating/ (pricing engine), worker/ (auto-advance, collect, subscriptionsync reconciliation), lineengine/, validators/, httpdriver/ (legacy v1 HTTP). Uses goderive (derived.gen.go) and goverter.", + "depends_on": [ + "openmeter/app", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/billing/rating", + "openmeter/billing/lineengine", + "openmeter/billing/service/invoicecalc", + "openmeter/watermill/eventbus", + "openmeter/ent/db", + "pkg/framework/transaction", + "pkg/framework/entutils", + "pkg/models" + ], + "exposes_to": [ + "app/common", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/customers/billing", + "openmeter/server/router", + "openmeter/billing/charges", + "openmeter/billing/worker" + ], + "key_interfaces": [ + { + "name": "billing.Service", + "methods": [ + "(invoice lifecycle, profile, customer-override, gathering & standard invoice, line, sequence, quantity-snapshot operations declared across openmeter/billing/*.go)" + ], + "description": "Primary billing facade interface implemented by billingservice.Service" + }, + { + "name": "billing.Adapter", + "methods": [ + "Tx", + "WithTx", + "Self" + ], + "description": "Ent-backed persistence + transaction hijacking contract for billing" + }, + { + "name": "Config.Validate", + "methods": [ + "Validate" + ], + "description": "Service Config validates all injected dependencies are non-nil before constructing Service" + } + ], + "key_files": [ + { + "file": "openmeter/billing/service/service.go", + "description": "billingservice.Service struct + Config with explicit dependency validation; central invoice orchestration" + }, + { + "file": "openmeter/billing/adapter/adapter.go", + "description": "Ent adapter implementing billing.Adapter with HijackTx/WithTx transaction handling" + }, + { + "file": "openmeter/billing/invoice.go", + "description": "Invoice domain model + interface declarations" + }, + { + "file": "openmeter/billing/derived.gen.go", + "description": "goderive-generated equality/clone helpers (DO NOT EDIT)" + }, + { + "file": "openmeter/billing/service/invoicecalc", + "description": "Invoice calculation engine subpackage" + } + ] + }, + { + "name": "Charges sub-system", + "location": "openmeter/billing/charges", + "platform": "backend", + "responsibility": "Usage-based billing charge engine layered under billing. meta/ holds charge-meta queries (39 in-edges); service/ drives charge creation/advancement and the realization runs; usagebased/, flatfee/, creditpurchase/ implement per-charge-type lifecycle state machines; invoiceupdater/, lineage/ link charges back to invoice lines; models/ subpackages (chargemeta, creditrealization, invoicedusage, ledgertransaction, payment) carry value types. Adapter helpers are kept transaction-aware via entutils.TransactingRepo even when handed a raw *entdb.Client. Lifecycle tests drive charges.Service.Create/AdvanceCharges/ApplyPatches.", + "depends_on": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/ledger", + "openmeter/credit", + "openmeter/ent/db", + "pkg/framework/entutils" + ], + "exposes_to": [ + "app/common", + "api/v3/handlers/customers/charges", + "openmeter/billing/worker/subscriptionsync" + ], + "key_interfaces": [ + { + "name": "charges.Service", + "methods": [ + "Create", + "AdvanceCharges", + "ApplyPatches" + ], + "description": "Charge lifecycle facade exercised by both production wiring and tests" + } + ], + "key_files": [ + { + "file": "openmeter/billing/charges/service", + "description": "Charge creation/advancement service + realization runs" + }, + { + "file": "openmeter/billing/charges/meta", + "description": "Charge-meta queries; high-fan-in (39 in-edges)" + }, + { + "file": "openmeter/billing/charges/usagebased", + "description": "Usage-based charge lifecycle state machine" + }, + { + "file": "openmeter/billing/charges/flatfee", + "description": "Flat-fee charge lifecycle" + }, + { + "file": "openmeter/billing/charges/creditpurchase", + "description": "Credit-purchase charge lifecycle" + } + ] + }, + { + "name": "Customer domain", + "location": "openmeter/customer", + "platform": "backend", + "responsibility": "High-fan-in domain (103 in-edges). Root declares customer.Service plus customer model, errors, events, and a requestvalidator. service/ implements the service (with service/hooks for lifecycle hooks); adapter/ is the Ent persistence layer; app/ holds app-integration types; httpdriver/ is the legacy v1 HTTP layer; testutils/ provides shared test fixtures. Consumed by billing, subscription, ledger and the v3 customers handlers.", + "depends_on": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/clock" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/subscription", + "openmeter/ledger", + "api/v3/handlers/customers", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "customer.Service", + "methods": [ + "(customer CRUD + lifecycle declared in openmeter/customer/customer.go)" + ], + "description": "Customer service facade" + } + ], + "key_files": [ + { + "file": "openmeter/customer/customer.go", + "description": "Customer domain model + service interface" + }, + { + "file": "openmeter/customer/service/service.go", + "description": "Customer service implementation" + }, + { + "file": "openmeter/customer/adapter", + "description": "Ent-backed customer persistence" + }, + { + "file": "openmeter/customer/requestvalidator.go", + "description": "Customer request validation" + } + ] + }, + { + "name": "Product catalog domain", + "location": "openmeter/productcatalog", + "platform": "backend", + "responsibility": "Highest non-pkg fan-in (104 in-edges). Holds plan, addon, planaddon, ratecard, price, discount, tax, feature, and pro-rating value types and rules at the root, with adapter/ (Ent), feature/ (FeatureConnector + FeatureRepo, itself 67 in-edges), featureresolver/, plan/ (service+adapter), addon/, planaddon/, subscription/ (plan\u2192subscription bridge), driver/ + http/ (HTTP), and testutils/. Defines the catalog primitives that subscription, billing, and entitlement build on.", + "depends_on": [ + "openmeter/ent/db", + "openmeter/meter", + "pkg/models", + "pkg/currencyx", + "pkg/datetime" + ], + "exposes_to": [ + "openmeter/subscription", + "openmeter/billing", + "openmeter/entitlement", + "api/v3/handlers/plans", + "api/v3/handlers/features", + "api/v3/handlers/addons", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "feature.FeatureConnector", + "methods": [ + "(feature CRUD/query declared in openmeter/productcatalog/feature)" + ], + "description": "Feature connector used across billing/entitlement/notification" + }, + { + "name": "feature.FeatureRepo", + "methods": [ + "(feature persistence contract)" + ], + "description": "Feature repository interface" + } + ], + "key_files": [ + { + "file": "openmeter/productcatalog/plan.go", + "description": "Plan domain model + rules" + }, + { + "file": "openmeter/productcatalog/ratecard.go", + "description": "Rate card model used by pricing" + }, + { + "file": "openmeter/productcatalog/feature", + "description": "Feature connector/repo subpackage (high fan-in)" + }, + { + "file": "openmeter/productcatalog/addon.go", + "description": "Addon model" + }, + { + "file": "openmeter/productcatalog/price.go", + "description": "Price model and rules" + } + ] + }, + { + "name": "Subscription domain", + "location": "openmeter/subscription", + "platform": "backend", + "responsibility": "31-file domain (37 in-edges, 25 out-edges). Root holds the subscription spec model (subscriptionspec.go), views (subscriptionview.go), patch system (patch.go + patch/), apply/sync logic (apply.go), phase/item/timing models, uniqueness rules, billing bridge (billing.go), and entitlement bridge (entitlement.go, entitlement/). repo/ persists; service/ + workflow/ orchestrate creation/edit/cancel/plan-change; addon/ (with diff/, repo/, service/) is the subscription-addon sub-system; hooks/ and validators/ enforce invariants. Bridges product catalog plans to live customer subscriptions and into billing + entitlement.", + "depends_on": [ + "openmeter/productcatalog", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/billing", + "openmeter/ent/db", + "pkg/datetime", + "pkg/models" + ], + "exposes_to": [ + "api/v3/handlers/subscriptions", + "openmeter/server/router", + "openmeter/billing/worker/subscriptionsync", + "app/common" + ], + "key_interfaces": [ + { + "name": "subscription.Service", + "methods": [ + "(create/list/get/cancel/change declared in openmeter/subscription/service.go)" + ], + "description": "Subscription service facade" + }, + { + "name": "Subscription patch system", + "methods": [ + "(patch application declared in subscription/patch.go)" + ], + "description": "Declarative patches that transform a subscription spec" + } + ], + "key_files": [ + { + "file": "openmeter/subscription/subscriptionspec.go", + "description": "Subscription spec model (target state)" + }, + { + "file": "openmeter/subscription/subscriptionview.go", + "description": "Materialized subscription view" + }, + { + "file": "openmeter/subscription/patch.go", + "description": "Patch system entry point" + }, + { + "file": "openmeter/subscription/apply.go", + "description": "Sync/apply algorithm" + }, + { + "file": "openmeter/subscription/billing.go", + "description": "Subscription\u2192billing bridge types" + }, + { + "file": "openmeter/subscription/workflow", + "description": "Workflow orchestration layer" + } + ] + }, + { + "name": "Entitlement domain", + "location": "openmeter/entitlement", + "platform": "backend", + "responsibility": "Access-control domain (40 in-edges, 19 out-edges). Root declares entitlement.Service, EntitlementRepo, the access model (access.go), entitlement types (metered/boolean/static), grant linkage (entitlement_grant.go), and usage-period logic (usageperiod.go). metered/ holds the metered-entitlement connector tying entitlements to credit grants + usage; balanceworker/ computes balance snapshots from usage events (driven by cmd/balance-worker); driver/ + driver/v2 expose legacy v1 + v2 HTTP; hooks/subscription wires entitlement provisioning to subscription lifecycle; snapshot/, static/, boolean/, validators/ round it out.", + "depends_on": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/productcatalog/feature", + "openmeter/meter", + "openmeter/streaming", + "openmeter/ent/db", + "pkg/models", + "pkg/timeutil" + ], + "exposes_to": [ + "openmeter/subscription", + "api/v3/handlers/customers/entitlementaccess", + "openmeter/server/router", + "openmeter/registry", + "cmd/balance-worker" + ], + "key_interfaces": [ + { + "name": "entitlement.Service", + "methods": [ + "(entitlement CRUD + access checks declared in openmeter/entitlement/connector.go)" + ], + "description": "Entitlement service facade" + }, + { + "name": "meteredentitlement.Connector", + "methods": [ + "(metered balance/reset operations)" + ], + "description": "Connector binding metered entitlements to credit grants and usage" + } + ], + "key_files": [ + { + "file": "openmeter/entitlement/connector.go", + "description": "Entitlement service interface" + }, + { + "file": "openmeter/entitlement/access.go", + "description": "Entitlement access-evaluation model" + }, + { + "file": "openmeter/entitlement/metered", + "description": "Metered entitlement connector" + }, + { + "file": "openmeter/entitlement/balanceworker", + "description": "Balance snapshot computation for the balance worker" + }, + { + "file": "openmeter/entitlement/driver", + "description": "Legacy v1/v2 entitlement HTTP drivers" + } + ] + }, + { + "name": "Credit & grant domain", + "location": "openmeter/credit", + "platform": "backend", + "responsibility": "Credit-grant accounting feeding entitlements. Root declares BalanceConnector, GrantConnector, balance/ (balance computation), engine/ (grant-burn-down engine), grant/ (grant model + Repo + OwnerConnector), hook/ (lifecycle hooks). The whole credit stack is feature-gated by credits.enabled at the wiring layer. Used by the metered-entitlement connector and the registry.", + "depends_on": [ + "openmeter/credit/grant", + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/ent/db", + "pkg/models", + "pkg/timeutil" + ], + "exposes_to": [ + "openmeter/entitlement/metered", + "openmeter/registry", + "openmeter/billing/charges/creditpurchase", + "api/v3/handlers/customers/credits" + ], + "key_interfaces": [ + { + "name": "credit.BalanceConnector", + "methods": [ + "(credit balance computation)" + ], + "description": "Computes credit balances" + }, + { + "name": "credit.GrantConnector", + "methods": [ + "(grant CRUD)" + ], + "description": "Manages credit grants" + }, + { + "name": "grant.OwnerConnector", + "methods": [ + "(grant owner resolution)" + ], + "description": "Resolves grant ownership" + } + ], + "key_files": [ + { + "file": "openmeter/credit/engine", + "description": "Grant burn-down engine" + }, + { + "file": "openmeter/credit/balance", + "description": "Credit balance computation" + }, + { + "file": "openmeter/credit/grant", + "description": "Grant model, Repo, OwnerConnector" + } + ] + }, + { + "name": "Ledger domain", + "location": "openmeter/ledger", + "platform": "backend", + "responsibility": "Double-entry-style ledger for customer credit accounts (35 in-edges, 17 out-edges), feature-gated by credits.enabled. Root holds account/transaction/balance/routing primitives, impact analysis (impact.go), routing rules + validator (routing.go, routing_validator.go), and a noop/ implementation used when credits are off. account/ has its own service/+adapter/ (account_business.go, account_customer.go, subaccount.go); transactions/, historical/ (+adapter), resolvers/ (+adapter), routingrules/, recognizer/, breakage/, chargeadapter/, customerbalance/, collector/ are sub-areas. When credits are disabled app/common wires noop services; real backfill must construct concrete account+resolver adapters directly.", + "depends_on": [ + "openmeter/customer", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/models", + "pkg/datetime" + ], + "exposes_to": [ + "openmeter/billing/charges", + "api/v3/handlers/customers/credits", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "ledger account service", + "methods": [ + "(account create/resolve/balance declared in openmeter/ledger/account)" + ], + "description": "Customer ledger account management" + }, + { + "name": "ledger routing", + "methods": [ + "(routing rule evaluation in routing.go / routing_validator.go)" + ], + "description": "Routes ledger entries to accounts via rules" + } + ], + "key_files": [ + { + "file": "openmeter/ledger/account/service", + "description": "Ledger account service implementation" + }, + { + "file": "openmeter/ledger/account/adapter", + "description": "Ledger account Ent persistence" + }, + { + "file": "openmeter/ledger/noop", + "description": "No-op ledger used when credits.enabled is false" + }, + { + "file": "openmeter/ledger/routing.go", + "description": "Ledger entry routing rules" + }, + { + "file": "openmeter/ledger/impact.go", + "description": "Ledger impact analysis" + } + ] + }, + { + "name": "Meter domain", + "location": "openmeter/meter", + "platform": "backend", + "responsibility": "Meter definition domain (70 in-edges). Root declares meter.Service, the Meter model, MeterQueryRow, and event parsing (parse.go). service/ implements the service; adapter/ persists via Ent; mockadapter/ is a test double; httphandler/ exposes v1 meter HTTP. Meters define how raw usage events are aggregated; consumed by streaming, billing, and entitlement.", + "depends_on": [ + "openmeter/namespace", + "openmeter/ent/db", + "pkg/models", + "pkg/slicesx" + ], + "exposes_to": [ + "openmeter/streaming", + "openmeter/billing", + "openmeter/entitlement", + "api/v3/handlers/meters", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "meter.Service", + "methods": [ + "(meter CRUD/query declared in openmeter/meter/service.go)" + ], + "description": "Meter definition service" + }, + { + "name": "Meter.parse", + "methods": [ + "parse" + ], + "description": "Parses/validates meter aggregation config" + } + ], + "key_files": [ + { + "file": "openmeter/meter/meter.go", + "description": "Meter model + service interface" + }, + { + "file": "openmeter/meter/service/service.go", + "description": "Meter service implementation" + }, + { + "file": "openmeter/meter/parse.go", + "description": "Meter aggregation parsing" + }, + { + "file": "openmeter/meter/mockadapter", + "description": "In-memory meter adapter for tests" + } + ] + }, + { + "name": "Streaming / usage query (ClickHouse)", + "location": "openmeter/streaming", + "platform": "backend", + "responsibility": "Defines the streaming.Connector interface (extends namespace.Handler) for reading metered usage out of ClickHouse: CountEvents, ListEvents, ListEventsV2, ListSubjects, ListGroupByValues, QueryMeter, BatchInsert, ValidateJSONPath. clickhouse/ holds the concrete ClickHouse implementation; retry/ adds retry behavior; usageattribution.go maps events to customers; testutils/ provides a MockStreamingConnector with SetSimpleEvents and explicit StoredAt for late-arriving-usage tests. The RawEvent struct carries CloudEvents-shaped fields with both `ch` (ClickHouse) and `json` tags.", + "depends_on": [ + "openmeter/meter", + "openmeter/namespace", + "pkg/models" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/entitlement", + "openmeter/sink", + "openmeter/debug", + "api/v3/handlers/meters" + ], + "key_interfaces": [ + { + "name": "streaming.Connector", + "methods": [ + "CountEvents", + "ListEvents", + "ListEventsV2", + "ListSubjects", + "ListGroupByValues", + "QueryMeter", + "BatchInsert", + "ValidateJSONPath" + ], + "description": "Usage event read/aggregation contract over ClickHouse; embeds namespace.Handler" + } + ], + "key_files": [ + { + "file": "openmeter/streaming/connector.go", + "description": "Connector interface + RawEvent struct with ClickHouse/json tags" + }, + { + "file": "openmeter/streaming/clickhouse", + "description": "ClickHouse-backed connector implementation" + }, + { + "file": "openmeter/streaming/usageattribution.go", + "description": "Attributes usage events to customers" + }, + { + "file": "openmeter/streaming/testutils", + "description": "MockStreamingConnector for tests" + } + ] + }, + { + "name": "Ingest & sink pipeline", + "location": "openmeter/ingest", + "platform": "backend", + "responsibility": "Usage event intake. ingest/ defines the ingest service, in-memory and dedupe collectors (dedupe.go, inmemory.go), kafkaingest/ publishes events to Kafka, ingestadapter/ adapts, httpdriver/ exposes the v1 ingest HTTP endpoint. openmeter/sink (sink-worker side) consumes from Kafka: buffer.go batches events, partition.go handles partition assignment, storage.go + meters.go write to ClickHouse via the streaming connector, flushhandler/ flushes buffers. Together they form the event-time metering ingest\u2192storage path.", + "depends_on": [ + "openmeter/streaming", + "openmeter/meter", + "openmeter/namespace", + "pkg/kafka" + ], + "exposes_to": [ + "cmd/server", + "cmd/sink-worker", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "ingest service", + "methods": [ + "(event ingest + dedupe in openmeter/ingest/ingest.go, dedupe.go)" + ], + "description": "Accepts and deduplicates usage events" + }, + { + "name": "sink", + "methods": [ + "(buffer, partition, storage flush in openmeter/sink)" + ], + "description": "Kafka consumer that batches and writes usage events to ClickHouse" + } + ], + "key_files": [ + { + "file": "openmeter/ingest/ingest.go", + "description": "Ingest service entrypoint" + }, + { + "file": "openmeter/ingest/dedupe.go", + "description": "Event deduplication" + }, + { + "file": "openmeter/ingest/kafkaingest", + "description": "Kafka producer for ingested events" + }, + { + "file": "openmeter/sink/buffer.go", + "description": "Sink-side event batching buffer" + }, + { + "file": "openmeter/sink/storage.go", + "description": "Writes batched events to ClickHouse" + } + ] + }, + { + "name": "Notification domain", + "location": "openmeter/notification", + "platform": "backend", + "responsibility": "Notification event pipeline. Root declares notification.Service + notification.Repository, channel/rule/event/eventpayload/deliverystatus models, and entitlement-specific event types (entitlements.go, invoice.go). service/ implements the service (struct Service holds feature connector, adapter repository, webhook.Handler, logger); consumer/ is the Kafka consumer side (driven by cmd/notification-service); eventhandler/ processes events; webhook/ integrates with Svix for webhook delivery; httpdriver/ exposes v1 HTTP; internal/ holds private helpers.", + "depends_on": [ + "openmeter/notification/webhook", + "openmeter/productcatalog/feature", + "openmeter/ent/db", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "exposes_to": [ + "cmd/notification-service", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "notification.Service", + "methods": [ + "(rule/channel/event CRUD + delivery declared in openmeter/notification/service.go)" + ], + "description": "Notification service facade" + }, + { + "name": "notification.Repository", + "methods": [ + "(notification persistence)" + ], + "description": "Notification persistence contract" + }, + { + "name": "webhook.Handler", + "methods": [ + "(Svix webhook delivery)" + ], + "description": "Webhook delivery via Svix" + } + ], + "key_files": [ + { + "file": "openmeter/notification/service/service.go", + "description": "Notification Service struct + Config validation" + }, + { + "file": "openmeter/notification/consumer", + "description": "Kafka consumer for notification events" + }, + { + "file": "openmeter/notification/webhook", + "description": "Svix webhook integration" + }, + { + "file": "openmeter/notification/eventpayload.go", + "description": "Notification event payload model" + } + ] + }, + { + "name": "App / marketplace integrations", + "location": "openmeter/app", + "platform": "backend", + "responsibility": "Third-party app/marketplace framework (53 in-edges). Root declares app.Service, the app/marketplace registry (registry.go, marketplace.go), webhook handling, and an appbase. stripe/ implements the Stripe billing integration; custominvoicing/ implements a custom-invoicing app; sandbox/ is a test app; httpdriver/ + service/ + adapter/ provide HTTP/service/persistence. Apps plug into billing (invoice delivery, payment).", + "depends_on": [ + "openmeter/customer", + "openmeter/secret", + "openmeter/ent/db", + "pkg/models" + ], + "exposes_to": [ + "openmeter/billing", + "openmeter/server/router", + "app/common" + ], + "key_interfaces": [ + { + "name": "app.Service", + "methods": [ + "(app install/list/marketplace declared in openmeter/app/service.go)" + ], + "description": "App lifecycle + marketplace service" + } + ], + "key_files": [ + { + "file": "openmeter/app/service.go", + "description": "App service implementation" + }, + { + "file": "openmeter/app/stripe", + "description": "Stripe billing app integration" + }, + { + "file": "openmeter/app/custominvoicing", + "description": "Custom-invoicing app" + }, + { + "file": "openmeter/app/marketplace.go", + "description": "App marketplace registry" + } + ] + }, + { + "name": "Ent schema (DB source of truth)", + "location": "openmeter/ent/schema", + "platform": "backend", + "responsibility": "Hand-written Ent entity definitions that are the source of truth for the PostgreSQL schema. ~35 schema files spanning customer, billing (billing.go), charges (charges*.go), subscription (+addon, +billingsync), entitlement, grant, feature, ledger_* (account, customer_account, entry, transaction, transaction_group, breakage_record), llmcostprice, notification, plan/addon, ratecard, meter, taxcode, app/app_stripe, balance_snapshot, usage_reset. Schemas use shared Mixins from pkg/framework/entutils (ResourceMixin, CustomerAddressMixin, AnnotationsMixin). Generated into openmeter/ent/db (407 files, DO NOT EDIT) via `make generate`; migrations generated from schema diffs via Atlas.", + "depends_on": [ + "pkg/framework/entutils", + "pkg/clock", + "pkg/currencyx" + ], + "exposes_to": [ + "openmeter/ent/db" + ], + "key_interfaces": [ + { + "name": "Customer (ent.Schema)", + "methods": [ + "Mixin", + "Fields", + "Edges", + "Indexes" + ], + "description": "Customer entity: key/primary_email/currency fields, ResourceMixin + CustomerAddressMixin(billing prefix) + AnnotationsMixin" + } + ], + "key_files": [ + { + "file": "openmeter/ent/schema/customer.go", + "description": "Customer entity schema with billing-address and annotations mixins" + }, + { + "file": "openmeter/ent/schema/billing.go", + "description": "Billing entities schema" + }, + { + "file": "openmeter/ent/schema/subscription.go", + "description": "Subscription entity schema" + }, + { + "file": "openmeter/ent/schema/ledger_entry.go", + "description": "Ledger entry entity schema" + }, + { + "file": "openmeter/ent/schema/charges.go", + "description": "Charges entity schema" + } + ] + }, + { + "name": "Generated Ent client", + "location": "openmeter/ent/db", + "platform": "backend", + "responsibility": "Ent-generated ORM client (407 files, 60 in-edges, 108 out-edges). Single shared *entdb.Client used by every domain adapter for PostgreSQL access; supports transaction hijacking (HijackTx) consumed by adapters' Tx/WithTx. predicate/ subpackage (94 in-edges) holds query predicates. All files carry `// Code generated ... DO NOT EDIT` headers; regenerated from openmeter/ent/schema via `make generate`. Its breadth makes it the dominant node in the large generated-code import cycle (cycle 0).", + "depends_on": [ + "openmeter/ent/schema" + ], + "exposes_to": [ + "openmeter/billing/adapter", + "openmeter/customer/adapter", + "openmeter/subscription/repo", + "openmeter/ledger/account/adapter", + "openmeter/notification/adapter", + "(all domain adapters)" + ], + "key_interfaces": [ + { + "name": "entdb.Client", + "methods": [ + "HijackTx", + "NewTxClientFromRawConfig", + "Client" + ], + "description": "Generated Ent client exposing transaction hijacking used by domain adapters" + } + ], + "key_files": [ + { + "file": "openmeter/ent/db", + "description": "Generated Ent ORM client (DO NOT EDIT)" + }, + { + "file": "openmeter/ent/db/predicate", + "description": "Generated query predicates (94 in-edges)" + } + ] + }, + { + "name": "Registry & builder", + "location": "openmeter/registry", + "platform": "backend", + "responsibility": "Aggregation structs that bundle related connectors for downstream consumers. registry.Entitlement groups Feature/FeatureRepo connectors, EntitlementOwner (grant.OwnerConnector), CreditBalance/Grant connectors, GrantRepo, MeteredEntitlement connector, Entitlement service, and EntitlementRepo into one struct. builder/ assembles these registries. This is the in-domain counterpart to app/common's Wire registries.", + "depends_on": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature" + ], + "exposes_to": [ + "app/common", + "openmeter/server/router" + ], + "key_interfaces": [ + { + "name": "registry.Entitlement", + "methods": [], + "description": "Struct bundling feature/credit/grant/entitlement connectors for downstream wiring" + } + ], + "key_files": [ + { + "file": "openmeter/registry/entitlement.go", + "description": "Entitlement registry aggregation struct" + }, + { + "file": "openmeter/registry/builder", + "description": "Registry assembly logic" + } + ] + }, + { + "name": "Legacy v1 HTTP router", + "location": "openmeter/server/router", + "platform": "backend", + "responsibility": "Assembles the legacy v1 HTTP API. router.go validates requests against the embedded OpenAPI 3 spec (kin-openapi openapi3/openapi3filter) and wires per-domain httpdriver/httphandler packages (customer, billing, credit, entitlement v1+v2, meter, meterevent, ingest, ledger/customerbalance, llmcost, notification, portal, productcatalog/addon/plan/feature, app/stripe/custominvoicing, subject, subscription, debug, info) into Chi routes implementing the generated api.ServerInterface from api/api.gen.go. The sibling openmeter/server holds CORS + server lifecycle.", + "depends_on": [ + "api", + "api/v3/handlers/currencies", + "app/config", + "openmeter/customer", + "openmeter/billing", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/ledger", + "(all domain httpdriver packages)" + ], + "exposes_to": [ + "cmd/server", + "openmeter/server" + ], + "key_interfaces": [ + { + "name": "Router", + "methods": [ + "(implements api.ServerInterface generated from legacy TypeSpec)" + ], + "description": "Chi router validating against embedded OpenAPI3 spec and delegating to domain httpdrivers" + } + ], + "key_files": [ + { + "file": "openmeter/server/router/router.go", + "description": "Legacy v1 router; OpenAPI3 request validation + per-domain httpdriver wiring" + }, + { + "file": "openmeter/server/server.go", + "description": "Server lifecycle" + }, + { + "file": "openmeter/server/router/billing.go", + "description": "Billing route registrations" + }, + { + "file": "openmeter/server/router/subscription.go", + "description": "Subscription route registrations" + } + ] + }, + { + "name": "v3 API layer (AIP-style)", + "location": "api/v3", + "platform": "backend", + "responsibility": "Newer Google-AIP-style HTTP API. api.gen.go is the oapi-codegen-generated ServerInterface; server/routes.go implements every operation as a thin method delegating to a per-resource handler (e.g. s.metersHandler.CreateMeter().With(meterId).ServeHTTP). handlers/ holds one package per resource (meters, events, customers + nested billing/charges/credits/entitlementaccess, subscriptions, apps, billingprofiles, taxcodes, currencies, features, featurecost, llmcost, plans, addons) each defining a Handler interface + struct with New(resolveNamespace, service, options...) returning httptransport handlers. filters/ implements AIP query-param filtering; apierrors/, render/, request/, response/, oasmiddleware/ are shared HTTP plumbing. Not all generated operations are implemented: credits operations are gated on Credits.Enabled and delegate to api.Unimplemented otherwise; CreateCreditAdjustment and QueryGovernanceAccess are always unimplemented.", + "depends_on": [ + "api/v3 (generated)", + "openmeter/customer", + "openmeter/meter", + "openmeter/subscription", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/credit", + "openmeter/ledger", + "pkg/framework/transport/httptransport", + "pkg/framework/commonhttp" + ], + "exposes_to": [ + "openmeter/server/router", + "cmd/server" + ], + "key_interfaces": [ + { + "name": "v3 Server (meters)", + "methods": [ + "CreateMeter", + "GetMeter", + "ListMeters", + "UpdateMeter", + "DeleteMeter", + "QueryMeter (JSON + text/csv content negotiation)" + ], + "description": "Meter operations with CSV/JSON content negotiation in QueryMeter" + }, + { + "name": "v3 Server (customers)", + "methods": [ + "CreateCustomer", + "GetCustomer", + "ListCustomers", + "UpsertCustomer", + "DeleteCustomer", + "ListCustomerEntitlementAccess" + ], + "description": "Customer operations (Upsert, not Create+Update separately, on the id route)" + }, + { + "name": "v3 Server (subscriptions)", + "methods": [ + "CreateSubscription", + "ListSubscriptions", + "GetSubscription", + "CancelSubscription", + "UnscheduleCancelation", + "ChangeSubscription" + ], + "description": "Subscription lifecycle (no Delete; cancel/unschedule/change instead)" + }, + { + "name": "v3 Server (plans)", + "methods": [ + "ListPlans", + "CreatePlan", + "GetPlan", + "UpdatePlan", + "DeletePlan", + "ArchivePlan", + "PublishPlan" + ], + "description": "Plan lifecycle including Archive/Publish state transitions" + }, + { + "name": "v3 Server (credits, gated)", + "methods": [ + "GetCustomerCreditBalance", + "ListCreditGrants", + "CreateCreditGrant", + "GetCreditGrant", + "UpdateCreditGrantExternalSettlement", + "ListCreditTransactions" + ], + "description": "Credit operations that short-circuit to Unimplemented when Credits.Enabled is false or services are nil" + }, + { + "name": "customers.Handler", + "methods": [ + "ListCustomers", + "CreateCustomer", + "DeleteCustomer", + "GetCustomer", + "UpsertCustomer" + ], + "description": "Per-resource handler interface; struct holds resolveNamespace func + service + httptransport options" + } + ], + "key_files": [ + { + "file": "api/v3/server/routes.go", + "description": "v3 ServerInterface impl: thin delegators to per-resource handlers with explicit unimplemented/feature-gated operations" + }, + { + "file": "api/v3/handlers/customers/handler.go", + "description": "Customers Handler interface + New(resolveNamespace, service, options) constructor" + }, + { + "file": "api/v3/api.gen.go", + "description": "oapi-codegen-generated v3 server interface (DO NOT EDIT)" + }, + { + "file": "api/v3/filters", + "description": "AIP query-parameter filtering" + }, + { + "file": "api/v3/apierrors", + "description": "Shared v3 error rendering" + } + ] + }, + { + "name": "Generated API contract & v1 server interface", + "location": "api", + "platform": "shared", + "responsibility": "Top-level api package (43 in-edges): api.gen.go is the oapi-codegen-generated legacy v1 ServerInterface + types; convert.gen.go/convert.go are goverter type converters; openapi.yaml + openapi.cloud.yaml are the generated OpenAPI specs (from TypeSpec); types/ holds shared API types. Consumed by both the legacy router and v3. This package is the Go-side boundary of the TypeSpec\u2192OpenAPI\u2192Go generation chain.", + "depends_on": [ + "pkg/models" + ], + "exposes_to": [ + "openmeter/server/router", + "api/v3", + "openmeter/*/httpdriver" + ], + "key_interfaces": [ + { + "name": "api.ServerInterface", + "methods": [ + "(all v1 operations generated from legacy TypeSpec)" + ], + "description": "Generated legacy v1 server contract" + } + ], + "key_files": [ + { + "file": "api/api.gen.go", + "description": "oapi-codegen-generated v1 server interface + types (DO NOT EDIT)" + }, + { + "file": "api/openapi.yaml", + "description": "Generated OpenAPI spec (DO NOT EDIT)" + }, + { + "file": "api/convert.go", + "description": "goverter converter interface for API types" + } + ] + }, + { + "name": "TypeSpec API specification", + "location": "api/spec", + "platform": "shared", + "responsibility": "Node/pnpm workspace authoring the API contract in TypeSpec, the source of truth for OpenAPI. Two packages under packages/: legacy/ (src/main.tsp + auth/errors/debug/events/meters/filter/portal/subjects/rest/query/types.tsp and an app/ subtree) drives the v1 API; aip/ (src/main.tsp, openmeter.tsp, konnect.tsp, test.tsp) drives the Google-AIP-style v3 API. Each package also ships compiled JS libs (lib/index.js with custom AIP/legacy lint rules under lib/rules). Generation orchestrated by Makefile + pnpm scripts (generate/format/lint).", + "depends_on": [], + "exposes_to": [ + "api" + ], + "key_interfaces": [ + { + "name": "legacy TypeSpec", + "methods": [], + "description": "main.tsp composing auth/errors/events/meters/portal/subjects modules for v1" + }, + { + "name": "aip TypeSpec", + "methods": [], + "description": "main.tsp + openmeter.tsp defining the AIP-style v3 surface" + } + ], + "key_files": [ + { + "file": "api/spec/packages/legacy/src/main.tsp", + "description": "Legacy v1 API TypeSpec root" + }, + { + "file": "api/spec/packages/aip/src/main.tsp", + "description": "AIP-style v3 API TypeSpec root" + }, + { + "file": "api/spec/packages/aip/src/openmeter.tsp", + "description": "v3 OpenMeter resource definitions" + }, + { + "file": "api/spec/pnpm-workspace.yaml", + "description": "pnpm workspace tying the two spec packages together" + } + ] + }, + { + "name": "JavaScript/TypeScript SDK", + "location": "api/client/javascript", + "platform": "web-frontend", + "responsibility": "Published @openmeter/sdk npm package. src/client/index.ts builds an openapi-fetch typed client (paths from generated schemas.js, encodeDates helper) and composes per-resource wrapper classes (Addons, Apps, Billing, Customers, Debug, Entitlements + EntitlementsV2, Events, Features, Info, Meters, Notifications, Plans, Portal, Subjects, SubscriptionAddons, Subscriptions). src/portal/ is a separate portal client; src/zod/ provides Zod schemas; src/react/context.tsx provides a React context (react is a peerDependency). Generated via orval (orval.config.ts) from the OpenAPI spec; built/tested with biome + vitest.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "OpenMeter client", + "methods": [ + "Addons", + "Apps", + "Billing", + "Customers", + "Debug", + "Entitlements", + "EntitlementsV2", + "Events", + "Features", + "Info", + "Meters", + "Notifications", + "Plans", + "Portal", + "Subjects", + "SubscriptionAddons", + "Subscriptions" + ], + "description": "Typed openapi-fetch client composing per-resource wrapper classes" + } + ], + "key_files": [ + { + "file": "api/client/javascript/src/client/index.ts", + "description": "Main SDK client composing per-resource wrappers over openapi-fetch" + }, + { + "file": "api/client/javascript/index.ts", + "description": "Package entrypoint re-exporting the client" + }, + { + "file": "api/client/javascript/src/react/context.tsx", + "description": "React context provider (react peerDependency)" + }, + { + "file": "api/client/javascript/orval.config.ts", + "description": "orval codegen config generating the client from OpenAPI" + } + ] + }, + { + "name": "Python SDK", + "location": "api/client/python", + "platform": "shared", + "responsibility": "Published `openmeter` Poetry package (Apache-2.0), a corehttp-based client supporting sync + async usage (examples/sync, examples/async). Depends on isodate, corehttp[requests,aiohttp], cloudevents, urllib3. Generated client code from the OpenAPI spec; not imported by the Go backend.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "OpenMeter Python client", + "methods": [ + "(sync + async usage-metering client operations)" + ], + "description": "corehttp-based generated client" + } + ], + "key_files": [ + { + "file": "api/client/python/pyproject.toml", + "description": "Poetry package definition + dependencies" + }, + { + "file": "api/client/python/examples/sync", + "description": "Synchronous client usage examples" + }, + { + "file": "api/client/python/examples/async", + "description": "Asynchronous client usage examples" + } + ] + }, + { + "name": "Collector (Benthos/Redpanda Connect)", + "location": "collector", + "platform": "backend", + "responsibility": "Separate Go module + binary that streams external usage events into OpenMeter. cmd/main.go runs a Benthos (Redpanda Connect) CLI assembled from registered plugins: benthos/input, benthos/output, benthos/bloblang (custom bloblang mapping plugins), benthos/services/leaderelection (Kubernetes-style leader election CLI opts), plus benthos/presets and benthos/internal. Pulls in redpanda-data/benthos v4 + connect free bundle. Independent go.mod, so not part of the root module's import graph.", + "depends_on": [], + "exposes_to": [], + "key_interfaces": [ + { + "name": "collector main", + "methods": [ + "main" + ], + "description": "Runs the Benthos CLI with leader-election opts and registered input/output/bloblang plugins" + } + ], + "key_files": [ + { + "file": "collector/cmd/main.go", + "description": "Benthos CLI entrypoint registering OpenMeter input/output/bloblang plugins + leader election" + }, + { + "file": "collector/benthos/input", + "description": "Custom Benthos input plugins" + }, + { + "file": "collector/benthos/output", + "description": "Custom Benthos output plugins" + }, + { + "file": "collector/benthos/services/leaderelection", + "description": "Leader-election service for HA collector deployments" + } + ] + }, + { + "name": "Shared utility packages (pkg/)", + "location": "pkg", + "platform": "shared", + "responsibility": "Cross-cutting Go utilities, several of which are the codebase's biggest dependency magnets: pkg/models (229 in-edges) holds shared domain models + the NewNillableGenericValidationError error aggregation used by Validate() methods; pkg/pagination (119 in-edges); pkg/clock (100 in-edges, FreezeTime/UnFreeze test helpers); pkg/currencyx (91, currency.Code type used in ent schema); pkg/timeutil (82); pkg/framework/entutils (74, Ent mixins + TransactingRepo + TxDriver transaction helpers); pkg/framework/transaction (70, transaction.Driver); pkg/datetime (65); pkg/framework/commonhttp (63, GetMediaType); pkg/filter (53); pkg/framework/transport/httptransport (47, the .With().ServeHTTP handler abstraction used by v3). Also kafka, redis, log, otelx, lockr, models, set, slicesx, sortx, strcase, treex, etc.", + "depends_on": [], + "exposes_to": [ + "openmeter/*", + "api/*", + "cmd/*", + "app/*" + ], + "key_interfaces": [ + { + "name": "models", + "methods": [ + "NewNillableGenericValidationError" + ], + "description": "Validation error aggregation wrapping errors.Join, the project-standard Validate() return" + }, + { + "name": "entutils", + "methods": [ + "TransactingRepo", + "TransactingRepoWithNoValue", + "NewTxDriver", + "ResourceMixin", + "CustomerAddressMixin", + "AnnotationsMixin" + ], + "description": "Ent transaction helpers + shared schema mixins" + }, + { + "name": "httptransport", + "methods": [ + "(.With(params).ServeHTTP handler abstraction + HandlerOption)" + ], + "description": "Generic typed HTTP handler used throughout v3 handlers" + }, + { + "name": "clock", + "methods": [ + "FreezeTime", + "UnFreeze" + ], + "description": "Mockable clock for tests" + } + ], + "key_files": [ + { + "file": "pkg/models", + "description": "Shared domain models + validation error helpers (229 in-edges)" + }, + { + "file": "pkg/framework/entutils", + "description": "Ent mixins + transaction-aware repo helpers" + }, + { + "file": "pkg/framework/transaction", + "description": "transaction.Driver abstraction" + }, + { + "file": "pkg/framework/transport/httptransport", + "description": "Typed HTTP handler abstraction used by v3" + }, + { + "file": "pkg/clock", + "description": "Mockable clock with FreezeTime/UnFreeze" + } + ] + }, + { + "name": "Database migrations", + "location": "tools/migrate", + "platform": "backend", + "responsibility": "Migration tooling and SQL files. migrations/ holds golang-migrate-format timestamped .up.sql/.down.sql pairs plus atlas.sum, generated from Ent schema diffs via `atlas migrate --env local diff ` (atlas.hcl points schema source at ent://openmeter/ent/schema). cmd/viewgen/main.go is a generator for Ent views (which don't auto-appear in generated migrate metadata). Migrations run on startup when postgres.autoMigrate is ent or migration.", + "depends_on": [ + "openmeter/ent/schema" + ], + "exposes_to": [ + "cmd/server" + ], + "key_interfaces": [ + { + "name": "viewgen", + "methods": [ + "main" + ], + "description": "Generates SQL for Ent ent.View schemas that Atlas diff omits" + } + ], + "key_files": [ + { + "file": "tools/migrate/cmd/viewgen/main.go", + "description": "Ent view DDL generator" + }, + { + "file": "tools/migrate/migrations", + "description": "Timestamped golang-migrate SQL files + atlas.sum" + } + ] + } + ] + }, + "architecture_rules": { + "file_placement_rules": [ + { + "component_type": "Domain service interface", + "naming_pattern": ".go / service.go / connector.go in the domain root package", + "location": "openmeter//", + "example": "openmeter/billing/invoice.go declares billing.Service; openmeter/streaming/connector.go declares streaming.Connector", + "description": "Domain root packages declare interfaces (Service/Adapter/Connector/Repository) and value models; implementations live in nested subpackages. Confirmed by reading billing, customer, streaming, notification, entitlement." + }, + { + "component_type": "Service implementation", + "naming_pattern": "service/service.go with a Service struct + Config{...} + Config.Validate() + New(Config)", + "location": "openmeter//service/", + "example": "openmeter/billing/service/service.go (Service struct, Config with per-field non-nil Validate); openmeter/notification/service/service.go follows the same shape", + "description": "Concrete services live in a service/ subpackage, take a Config struct of injected dependencies, validate each is non-nil in Config.Validate(), and assert interface satisfaction via `var _ billing.Service = (*Service)(nil)`. Loggers are injected, never slog.Default()." + }, + { + "component_type": "Persistence adapter", + "naming_pattern": "adapter/adapter.go with an adapter struct holding *entdb.Client + Tx/WithTx/Self", + "location": "openmeter//adapter/", + "example": "openmeter/billing/adapter/adapter.go implements billing.Adapter with HijackTx/WithTx; openmeter/customer/adapter follows suit", + "description": "Ent persistence is isolated in adapter/ packages that hold *entdb.Client and implement transaction hijacking (Tx returns a transaction.Driver; WithTx rebuilds the adapter from the tx config). Confirmed in billing/adapter/adapter.go." + }, + { + "component_type": "Legacy v1 HTTP layer", + "naming_pattern": "httpdriver/ or httphandler/ co-located inside the domain package", + "location": "openmeter//httpdriver/ (or httphandler/)", + "example": "openmeter/customer/httpdriver, openmeter/meter/httphandler, openmeter/notification/httpdriver \u2014 all imported by openmeter/server/router/router.go", + "description": "The legacy v1 API keeps HTTP handlers co-located with each domain as httpdriver/httphandler packages, assembled in openmeter/server/router/router.go. Confirmed by router.go imports." + }, + { + "component_type": "v3 HTTP handler", + "naming_pattern": "handlers//{handler.go,.go,convert.gen.go} with Handler interface + New(resolveNamespace, service, options...)", + "location": "api/v3/handlers//", + "example": "api/v3/handlers/customers/handler.go (Handler interface, handler struct, New); per-operation files create.go/get.go/list.go/delete.go/upsert.go", + "description": "The v3 API centralizes handlers under api/v3/handlers/, one package per resource (nested for sub-resources e.g. customers/charges, customers/credits). Each exposes a Handler interface returning httptransport handlers; routes in api/v3/server/routes.go delegate via .With(params).ServeHTTP. Confirmed in customers/handler.go + routes.go." + }, + { + "component_type": "Type conversion", + "naming_pattern": "convert.go (goverter interface) \u2192 convert.gen.go (generated); derived.gen.go (goderive)", + "location": "alongside the package that owns the types (api/, openmeter/billing/, api/v3/handlers/customers/)", + "example": "api/convert.go + api/convert.gen.go; openmeter/billing/derived.gen.go; api/v3/handlers/customers/convert.gen.go", + "description": "Domain\u2194API\u2194DB conversions use goverter (*.convert.go \u2192 convert.gen.go) and goderive (derived.gen.go). Generated files carry DO-NOT-EDIT headers. Confirmed by file listings in api/ and billing/." + }, + { + "component_type": "Unit / integration tests", + "naming_pattern": "_test.go co-located with source; cross-domain integration suites under test//", + "location": "co-located in each package AND top-level test/ (test/billing, test/customer, test/entitlement, test/subscription, test/credits, test/notification, test/app)", + "example": "openmeter/billing/charges/service/usagebased_test.go (co-located); test/billing (shared billing integration harness imported by charges/service tests)", + "description": "Most tests are co-located *_test.go files. Heavier cross-cutting integration suites and shared harnesses live under a top-level test/ tree organized by domain; e.g. test/billing is imported by openmeter/billing/charges/service/*_test.go and subscriptionsync/service/base_test.go." + }, + { + "component_type": "End-to-end tests", + "naming_pattern": "_test.go + docker-compose.*.yaml in e2e/", + "location": "e2e/", + "example": "e2e/e2e_test.go, e2e/addons_v3_test.go, e2e/customer_credits_v3_test.go, e2e/entitlement_parity_test.go, e2e/docker-compose.infra.yaml", + "description": "HTTP-over-the-wire e2e tests run against a live server defined by docker-compose files in e2e/, separate from the in-process integration tests in test/. Confirmed by e2e/ listing." + }, + { + "component_type": "Ent schema (DB source of truth)", + "naming_pattern": ".go with a struct embedding ent.Schema + Mixin()/Fields()/Edges()", + "location": "openmeter/ent/schema/", + "example": "openmeter/ent/schema/customer.go (Customer ent.Schema, ResourceMixin + CustomerAddressMixin + AnnotationsMixin)", + "description": "Hand-written Ent schemas are the DB source of truth; generated client goes to openmeter/ent/db (DO NOT EDIT). Schemas reuse mixins from pkg/framework/entutils. Confirmed by customer.go." + }, + { + "component_type": "DI / wiring providers", + "naming_pattern": "one wire.NewSet provider-set file per subsystem", + "location": "app/common/", + "example": "app/common/billing.go (var Billing = wire.NewSet(...)), app/common/ledger.go, app/common/openmeter_server.go", + "description": "Google Wire provider sets live in app/common, one file per subsystem; per-binary Application structs assembled in openmeter_.go files. Wire-generated output is wire_gen.go (DO NOT EDIT). Confirmed by billing.go." + }, + { + "component_type": "Service entrypoints", + "naming_pattern": "cmd//main.go", + "location": "cmd/", + "example": "cmd/server/main.go, cmd/billing-worker/main.go, cmd/sink-worker/main.go", + "description": "Each binary is a cmd//main.go that shares the Viper config-load/validate boilerplate then calls a Wire-generated initialize. Confirmed by server + billing-worker mains." + }, + { + "component_type": "SQL migrations", + "naming_pattern": "_.up.sql / .down.sql + atlas.sum", + "location": "tools/migrate/migrations/", + "example": "tools/migrate/migrations/*.up.sql generated by `atlas migrate --env local diff`", + "description": "Migrations are golang-migrate-format timestamped pairs generated from Ent schema diffs via Atlas (atlas.hcl). Stated in AGENTS.md and confirmed by directory listing." + } + ], + "naming_conventions": [ + { + "scope": "Go domain root packages", + "pattern": "single lowercase word matching the domain", + "examples": [ + "billing", + "customer", + "subscription", + "entitlement", + "streaming", + "notification", + "ledger", + "meter" + ], + "description": "Each domain root package is a single lowercase noun; verified across openmeter/ subdirectories." + }, + { + "scope": "Go implementation subpackages with import aliases", + "pattern": "package named service/adapter but imported with a domain-prefixed alias", + "examples": [ + "package billingservice in service/service.go imported as billingservice", + "package billingadapter in adapter/adapter.go", + "package customers in api/v3/handlers/customers" + ], + "description": "Implementation subpackages are physically named service/adapter but declare a domain-prefixed package name (billingservice, billingadapter) so call sites read unambiguously. Confirmed in billing service.go (package billingservice) and adapter.go (package billingadapter)." + }, + { + "scope": "Go interface-satisfaction assertions", + "pattern": "var _ = (*)(nil)", + "examples": [ + "var _ billing.Service = (*Service)(nil)", + "var _ billing.Adapter = (*adapter)(nil)", + "var _ notification.Service = (*Service)(nil)" + ], + "description": "Compile-time interface conformance is asserted with the blank-identifier pattern at the top of each implementation file. Confirmed in billing service.go, adapter.go, notification service.go." + }, + { + "scope": "Constructor + config", + "pattern": "type Config struct {...}; func (c Config) Validate() error; func New(config Config) (Iface, error)", + "examples": [ + "billingadapter.New(Config)", + "billingservice Config.Validate() returning errors.New per nil field", + "notification service New(Config)" + ], + "description": "Services/adapters take a Config struct, validate each dependency non-nil, and return via New(config). Confirmed in billing adapter.go and service.go and notification service.go." + }, + { + "scope": "Generated Go files", + "pattern": "*.gen.go and wire_gen.go and ent/db/ with `// Code generated ... DO NOT EDIT` header", + "examples": [ + "api/api.gen.go", + "api/v3/api.gen.go", + "openmeter/billing/derived.gen.go", + "openmeter/billing/service/convert.gen.go", + "wire_gen.go" + ], + "description": "All generated Go carries the canonical DO-NOT-EDIT header and a *.gen.go (or wire_gen.go / ent/db/) name. Confirmed across api/ and billing/." + }, + { + "scope": "Go test files", + "pattern": "_test.go co-located", + "examples": [ + "openmeter/billing/service/invoice_test.go", + "openmeter/subscription/patch_test.go", + "openmeter/entitlement/usageperiod_test.go" + ], + "description": "Tests follow Go's standard _test.go suffix co-located with the file under test. Verified across multiple domains." + }, + { + "scope": "TypeScript SDK files", + "pattern": "kebab-case modules, PascalCase exported wrapper classes", + "examples": [ + "src/client/subscription-addons.js exporting class SubscriptionAddons", + "src/client/index.ts", + "src/react/context.tsx" + ], + "description": "JS SDK source uses kebab-case filenames with PascalCase class exports (Subscriptions, SubscriptionAddons, EntitlementsV2). Confirmed in src/client/index.ts imports." + }, + { + "scope": "TypeSpec spec files", + "pattern": "lowercase .tsp under packages//src/", + "examples": [ + "api/spec/packages/legacy/src/meters.tsp", + "api/spec/packages/aip/src/openmeter.tsp", + "api/spec/packages/legacy/src/main.tsp" + ], + "description": "TypeSpec sources are lowercase feature-named .tsp files; each package has a main.tsp root. Confirmed by find of *.tsp." + }, + { + "scope": "Ent schema files", + "pattern": "snake_case or compound lowercase .go matching the entity", + "examples": [ + "openmeter/ent/schema/ledger_account.go", + "openmeter/ent/schema/balance_snapshot.go", + "openmeter/ent/schema/chargesusagebased.go", + "openmeter/ent/schema/customer.go" + ], + "description": "Ent schema filenames are lowercase, sometimes snake_case for multi-word entities (ledger_account, balance_snapshot, usage_reset) and sometimes run-together (chargesusagebased). Confirmed by ent/schema listing." + } + ] + }, + "workspace_topology": { + "type": "none", + "members": [ + { + "name": "openmeter", + "path": ".", + "role": "app" + }, + { + "name": "collector", + "path": "collector", + "role": "app" + }, + { + "name": "spec", + "path": "api/spec", + "role": "lib" + }, + { + "name": "python", + "path": "api/client/python", + "role": "lib" + }, + { + "name": "javascript", + "path": "api/client/javascript", + "role": "lib" + } + ], + "edges": [], + "cycles": [], + "dependency_magnets": [] + }, + "findings": [ + { + "problem_statement": "Production (non-test) service package openmeter/billing/worker/subscriptionsync/service forms an import cycle with the test/billing fixtures package and openmeter/billing/charges/service via test files, indicating cross-package test harnesses are tightly coupled to multiple production service packages.", + "evidence": [ + "openmeter/billing/worker/subscriptionsync/service/base_test.go imports billingtest \"github.com/openmeterio/openmeter/test/billing\"", + "test/billing/*.go imports subscriptionsyncservice \"github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service\"", + "openmeter/billing/charges/service/*_test.go (base_test.go, usagebased_test.go, creditpurchase_test.go, lineage_test.go, taxcode_test.go, featureid_test.go, gathering_preview_test.go, invoicable_test.go) import test/billing", + ".archie/dependency_graph.json cycle 3: ['openmeter/billing/charges/service','openmeter/billing/charges/testutils','openmeter/billing/worker/subscriptionsync/service','test/billing']" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warning", + "confidence": 0.85, + "applies_to": [ + "openmeter" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "Rating service subpackages openmeter/billing/rating/service, .../mutator, .../rate, and .../testutil form a 4-directory import cycle, with mutator and rate cross-importing each other and the service root.", + "evidence": [ + "openmeter/billing/rating/service/mutator/*.go imports \"github.com/openmeterio/openmeter/openmeter/billing/rating/service/rate\"", + "openmeter/billing/rating/service/rate/*.go imports \"github.com/openmeterio/openmeter/openmeter/billing/rating/service/testutil\"", + ".archie/dependency_graph.json cycle 2: ['openmeter/billing/rating/service','openmeter/billing/rating/service/mutator','openmeter/billing/rating/service/rate','openmeter/billing/rating/service/testutil']" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warning", + "confidence": 0.75, + "applies_to": [ + "openmeter" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "Two parallel HTTP API surfaces (legacy v1 in openmeter/server/router with per-domain httpdriver packages, and AIP-style v3 in api/v3 with centralized handlers) coexist and both delegate to the same domain services, creating two divergent handler conventions, two generated server interfaces, and partially-unimplemented v3 operations.", + "evidence": [ + "openmeter/server/router/router.go wires ~25 per-domain httpdriver/httphandler packages and implements api.ServerInterface from api/api.gen.go (legacy v1)", + "api/v3/server/routes.go implements a separate generated ServerInterface delegating to api/v3/handlers/* packages", + "api/v3/server/routes.go: CreateCreditAdjustment and QueryGovernanceAccess always call api.Unimplemented; GetCustomerCreditBalance/ListCreditGrants/CreateCreditGrant/etc. short-circuit to Unimplemented when s.Credits.Enabled is false", + "api/spec has two TypeSpec packages (legacy/ and aip/) generating the two surfaces" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.9, + "applies_to": [ + "openmeter", + "spec" + ], + "source": "scan:structure", + "depth": "draft" + }, + { + "problem_statement": "The v3 customers list API exposes case-insensitive contains/ocontains filters on name, primary_email and key that compile to leading-wildcard ILIKE and cannot use the plain btree indexes on the customers table, forcing full sequential scans (plus a second seq-scan from Paginate's COUNT(*)).", + "evidence": [ + "openmeter/ent/schema/customer.go:42 \u2014 TODO(DoS hardening) comment describing the ILIKE seq-scan amplification and the missing pg_trgm GIN indexes", + "openmeter/ent/schema/customer.go:64 \u2014 index.Fields(\"name\") / index.Fields(\"primary_email\") are plain btree, unusable for leading-wildcard ILIKE" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "openmeter/ent/schema/customer.go", + "api/v3/filters/filter.go", + "api/v3/handlers/customers/list.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "CustomerSubjects.subject_key has no foreign key to Subject.key, so a customer can be linked to a subject key that does not exist as a Subject row (referential integrity is unenforced at the DB level).", + "evidence": [ + "openmeter/ent/schema/customer.go:147 \u2014 FIXME: enable foreign key constraints; Ent doesn't support FK on non-ID fields (https://github.com/ent/ent/issues/2549)" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/customer.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "ent.View-declared schemas (ChargesSearchV1) generate query code but do not appear in the generated migrate.Tables list, so the view's DDL is not produced by `atlas migrate diff` and must be created/maintained via hand-written SQL migrations \u2014 a silent drift risk between the Go view definition and the actual database view.", + "evidence": [ + "openmeter/ent/schema/charges.go:48 \u2014 ChargesSearchV1 declared as ent.View", + "AGENTS.md 'Ent view caveat' \u2014 views do not appear in openmeter/ent/db/migrate/schema.go or migrate.Tables" + ], + "root_cause": "", + "fix_direction": "", + "severity": "warn", + "confidence": 0.75, + "applies_to": [ + "openmeter/ent/schema/charges.go", + "tools/migrate/migrations" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "LedgerBreakageRecord and LedgerSubAccountRoute store cross-entity references (transaction/sub-account/plan ids, currency, tax_code) as plain char(26)/text columns with no foreign keys, so referential integrity of these accounting-projection rows is not enforced by the database.", + "evidence": [ + "openmeter/ent/schema/ledger_breakage_record.go:19 \u2014 comment: breakage records intentionally keep ledger references as plain IDs (projection rows, not source of truth)", + "openmeter/ent/schema/ledger_account.go:117 \u2014 currency/tax_code are literal routing values denormalized from routing_key, not FKs" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/ledger_breakage_record.go", + "openmeter/ent/schema/ledger_account.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "BillingInvoiceLine and several billing/discount tables carry Deprecated columns (line_ids, type, quantity, pre_line_period_quantity, split-line-group tax_config/tax_code_id/tax_behavior) that are still physically present, indicating an in-progress, unfinished schema migration where old and new columns coexist.", + "evidence": [ + "openmeter/ent/schema/billing.go:416 \u2014 line_ids Deprecated('invoice discounts are deprecated, use line_discounts instead')", + "openmeter/ent/schema/billing.go:793 \u2014 discount type/quantity Deprecated due to split of amount and usage discount tables", + "openmeter/ent/schema/billing.go:631 \u2014 split line group tax fields Deprecated", + "openmeter/ent/schema/billing.go:1170 \u2014 schema_level field tracks an in-progress invoice-line migration" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/billing.go" + ], + "source": "scan:data", + "depth": "draft" + }, + { + "problem_statement": "ClickHouse usage-event tables have no in-repo migration tooling: schema evolves only through the idempotent CREATE TABLE IF NOT EXISTS path and ad-hoc ALTERs, so a column added to the RawEvent Go struct without a matching Define()/ALTER will silently diverge from existing per-namespace tables.", + "evidence": [ + "openmeter/streaming/clickhouse/event_query.go:20 \u2014 createEventsTable.toSQL builds CREATE TABLE ... IF NOT EXISTS with hand-listed Define() columns", + "openmeter/streaming/connector.go:24 \u2014 RawEvent struct is the Go-side shape with no migration coupling" + ], + "root_cause": "", + "fix_direction": "", + "severity": "info", + "confidence": 0.65, + "applies_to": [ + "openmeter/streaming/clickhouse/event_query.go", + "openmeter/streaming/connector.go" + ], + "source": "scan:data", + "depth": "draft" + } + ], + "communication": { + "patterns": [ + { + "name": "Wire compile-time dependency injection", + "when_to_use": "Wiring a new domain service, adapter, hook, or worker into a binary's object graph", + "how_it_works": "Each binary (cmd/server, cmd/billing-worker, etc.) declares a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets. Providers are plain constructor functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService)). `make generate` runs wire to emit wire_gen.go which call the constructors in dependency order. Constructors take explicit deps (logger, *entdb.Client, eventbus.Publisher) and return (Service, error); they never reach for globals.", + "examples": [ + "cmd/server/wire.go", + "app/common/customer.go", + "app/common/app.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Service / Adapter layered package with Config-validating constructor", + "when_to_use": "Creating or extending any domain package under openmeter/ (billing, customer, entitlement, subscription, notification, ledger, charges, app)", + "how_it_works": "A package exposes a Service interface and an Adapter interface in its root. The service struct (openmeter/customer/service) holds the adapter plus collaborators; the adapter struct (openmeter/customer/adapter) holds *entdb.Client. Both have a New(config) constructor whose Config has a Validate() error checked first thing in New \u2014 returning errors instead of panicking. The service var-asserts the interface: `var _ customer.Service = (*Service)(nil)`.", + "examples": [ + "openmeter/customer/service/service.go", + "openmeter/customer/adapter/adapter.go", + "app/common/customer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Transaction-aware Ent repository (TransactingRepo / HijackTx WithTx)", + "when_to_use": "Any adapter method that reads or writes via Ent and must participate in a caller-supplied transaction", + "how_it_works": "The adapter implements entutils.TxCreator (Tx() hijacks an Ent tx into the context) and TxUser (WithTx rebuilds the adapter bound to the tx client from raw config; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}): if a tx driver is already on the context it rebinds to it, otherwise it runs on the base client. transaction.Run(ctx, creator, cb) opens/commits/rolls-back and stores the driver on context; nested Run calls reuse the existing driver and emit savepoints.", + "examples": [ + "pkg/framework/entutils/transaction.go", + "pkg/framework/transaction/transaction.go", + "openmeter/customer/adapter/adapter.go" + ], + "applicable_when": "pkg/framework/entutils/transaction.go:199 TransactingRepo only rebinds when a *TxDriver is found on ctx, else falls back to repo.Self() \u2014 applies to adapter helpers whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator", + "do_not_apply_when": [ + "Helper accepts a raw *entdb.Client argument instead of reading the tx from ctx \u2014 per AGENTS.md the charges adapter convention still requires wrapping such helpers with entutils.TransactingRepo so they rebind to the ctx tx; passing a non-tx client silently writes outside the caller's transaction", + "Pure in-memory adapter with no Ent client (e.g. app marketplace registry map in openmeter/app/adapter/marketplace.go:120) \u2014 there is no transaction to join" + ], + "scope": [] + }, + { + "name": "Postgres transaction-scoped advisory lock (lockr)", + "when_to_use": "Serializing concurrent business operations that span multiple rows/tables for one logical entity, e.g. all subscription mutations for a customer or all charge advances for a customer", + "how_it_works": "lockr.NewKey(scopes...) builds a colon-joined scope string, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx. The lock auto-releases on commit/rollback. getTxClient first asserts the call is inside a real postgres tx (transaction_timestamp() != statement_timestamp()) and errors otherwise. Domain code wraps the key behind a typed helper such as subscription.GetCustomerLock(customerId) = NewKey(\"customer\", customerId, \"subscription\").", + "examples": [ + "pkg/framework/lockr/locker.go", + "pkg/framework/lockr/key.go", + "openmeter/subscription/locks.go", + "openmeter/subscription/service/service.go" + ], + "applicable_when": "The lock-key identity component must be a globally-unique row identifier. subscription.GetCustomerLock (openmeter/subscription/locks.go:6) keys on the customer id, and customer ids are PK-unique via the IDMixin `field.String(\"id\").Unique()` + `index.Fields(\"namespace\",\"id\").Unique()` declared in pkg/framework/entutils/mixins.go:90-104,77 \u2014 so one (\"customer\", id, scope) key maps to exactly one customer and the advisory lock serializes only that customer's operations", + "do_not_apply_when": [ + "Caller would key the lock on a non-unique column \u2014 e.g. customer `key` is only unique under namespace+deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62) not globally; a lock keyed on raw `key` could serialize unrelated customers across namespaces or collide a live row with a soft-deleted one", + "Caller is not inside a postgres transaction \u2014 lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails", + "Operation mutates exactly one row and needs no cross-row invariant \u2014 Ent SELECT ... FOR UPDATE row locking suffices and avoids two distinct scope strings colliding into the same 64-bit advisory slot" + ], + "scope": [ + "subscription", + "entitlement", + "billing", + "ledger" + ] + }, + { + "name": "Service hook registry (ServiceHookRegistry)", + "when_to_use": "Letting one domain react to another domain's lifecycle events in-process (e.g. provision a ledger account when a customer is created, sync a customer when a subject is created)", + "how_it_works": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common build the hook implementation and call targetService.RegisterHooks(h) at startup; when the feature is disabled the provider returns a Noop hook instead (e.g. NewCustomerLedgerServiceHook returns ledgerresolvers.NoopCustomerLedgerHook{} when creditsConfig.Enabled is false). Hooks fire synchronously inside the producing service's flow.", + "examples": [ + "openmeter/customer/service/service.go", + "app/common/customer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "In-process event bus over Watermill CQRS (eventbus.Publisher)", + "when_to_use": "Emitting domain events (ingest, balance-worker, system events) to Kafka for asynchronous workers to consume", + "how_it_works": "eventbus.New wraps a watermill cqrs.EventBus. Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix: ingest-subsystem-prefixed events to IngestEventsTopic, balance-worker-prefixed to BalanceWorkerEventsTopic, everything else to SystemEventsTopic. Producers call publisher.WithContext(ctx).PublishIfNoError(event, err) to inline publish-or-propagate. nil events are intentionally dropped (a handler returning nil means 'publish nothing').", + "examples": [ + "openmeter/watermill/eventbus/eventbus.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Kafka consumer via Watermill grouphandler (type-routed event dispatch)", + "when_to_use": "Building a worker (notification, billing-worker, balance-worker) that consumes CloudEvents off Kafka and fans them to per-event-type handlers", + "how_it_works": "grouphandler.NewNoPublishingHandler builds a map[eventName][]GroupEventHandler. On each message it derives the CloudEvent type via the marshaler, looks up handlers, unmarshals once into handler[0].NewEvent(), and runs all matching handlers joining their errors. Unknown event types are counted as 'ignored' and ack'd (return nil), not failed. Per-message processing time and status counters are emitted to OpenTelemetry.", + "examples": [ + "openmeter/watermill/grouphandler/grouphandler.go", + "openmeter/notification/consumer/consumer.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Explicit finite state machine (qmuntal/stateless) with external storage", + "when_to_use": "Modeling the invoice lifecycle and per-charge UBP lifecycle where transitions are guarded and have side effects", + "how_it_works": "stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (the invoice/charge), not in the FSM. Each state is Configure'd with Permit(trigger, targetState) edges, guarded variants PermitDynamic(trigger, target, guardFn), and OnActive side-effect callbacks composed via statelessx.AllOf/BoolFn. The invoice machine is pooled (sync.Pool, invoiceStateMachineCache) and reset per use. The charges machine is a generic Machine[CHARGE, BASE, STATUS] driven by AdvanceUntilStateStable and a Persistence{UpdateBase, Refetch} struct, accumulating invoiceupdater.Patch side effects.", + "examples": [ + "openmeter/billing/service/stdinvoicestate.go", + "openmeter/billing/charges/statemachine/machine.go" + ], + "applicable_when": "openmeter/billing/charges/statemachine/machine.go:16 the STATUS type parameter is constrained `~string` + Validate() error, and machine.go:39 requires CHARGE to implement ChargeLike (GetStatus/WithStatus/GetBase/WithBase) \u2014 applies to charge aggregates that carry their status as a string enum and can rebuild themselves with a new status", + "do_not_apply_when": [ + "State is not externally owned by the aggregate \u2014 these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the domain object; an in-memory-state FSM would not persist transitions across the request", + "A transition has no guard and no side effect and the type has only two states \u2014 a plain bool/enum field is simpler than configuring a stateless machine" + ], + "scope": [ + "billing", + "charges" + ] + }, + { + "name": "In-memory map registry with type-asserted factory dispatch (app marketplace)", + "when_to_use": "Pluggable app integrations (Stripe, custom-invoicing, sandbox) registered at startup and instantiated on demand by type", + "how_it_works": "The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate types and validates the listing. Install operations look up the RegistryItem and type-assert the Factory to the capability interface actually requested (Factory.(app.AppFactoryInstallWithAPIKey) vs Factory.(app.AppFactoryInstall)), returning a GenericValidationError if the app doesn't support that install method.", + "examples": [ + "openmeter/app/adapter/marketplace.go", + "openmeter/app/registry.go", + "openmeter/app/marketplace.go", + "openmeter/app/stripe/service/service.go" + ], + "applicable_when": "openmeter/app/adapter/marketplace.go:121 RegisterMarketplaceListing rejects a second registration of the same AppType \u2014 applies to integration factories that register exactly once per process at wiring time; the map is the single source of installable app types and capability support is discovered by interface type-assertion on Factory", + "do_not_apply_when": [ + "Registration happens after the listing surface is already serving requests \u2014 the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live" + ], + "scope": [ + "app" + ] + }, + { + "name": "Per-subtype connector dispatch behind a single Service (entitlement)", + "when_to_use": "A service whose behavior branches by an enum subtype (metered / static / boolean entitlements) where each subtype has its own logic implementation", + "how_it_works": "entitlement.SubTypeConnector is implemented three times (metered/static/boolean connector.go). The aggregate service holds all three as fields and getTypeConnector(typed) switches on EntitlementType to return the right connector, returning an error in the default case. Sub-type-specific create/value logic is delegated to the selected connector while the umbrella service owns shared concerns.", + "examples": [ + "openmeter/entitlement/entitlement_types.go", + "openmeter/entitlement/service/service.go", + "openmeter/entitlement/metered/connector.go" + ], + "applicable_when": "openmeter/entitlement/service/service.go:424 getTypeConnector switches over the closed EntitlementType set declared in openmeter/entitlement/entitlement.go:331 (Values()={metered,static,boolean}) with a default-error arm \u2014 applies when adding behavior keyed on an entitlement subtype; a new EntitlementType value MUST also get a SubTypeConnector field + switch arm or it falls through to the default error", + "do_not_apply_when": [ + "The branching value is open/user-defined rather than the fixed EntitlementType enum \u2014 a closed switch with a default-error arm would reject legitimate values" + ], + "scope": [ + "entitlement" + ] + }, + { + "name": "Generic HTTP handler pipeline (httptransport.Handler[Request,Response])", + "when_to_use": "Implementing a v1 HTTP endpoint: decode request -> call service -> encode response, with consistent error encoding", + "how_it_works": "httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts) builds a typed handler. Per-domain httpdriver packages compose a decoder (request -> typed Request), the service call, and an encoder, plus an errorEncoder that maps domain error types to status codes. Handlers can be Chain'd with operation.Middleware.", + "examples": [ + "pkg/framework/transport/httptransport/handler.go", + "openmeter/notification/httpdriver/handler.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Domain-error to HTTP-status mapping via typed error encoders", + "when_to_use": "Translating service-layer errors into HTTP responses (RFC7807 problem documents)", + "how_it_works": "Two complementary mechanisms. (1) Per-handler errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T](ctx, status, err, w) \u2014 ordered short-circuit on errors.As against concrete domain error types (e.g. notification.NotFoundError->404, GenericValidationError->400, UpdateAfterDeleteError->409). (2) Generic errors carry an HTTP status as a ValidationIssue attribute (openmeter.http.status_code); commonhttp.HandleIssueIfHTTPStatusKnown maps it but only when all issues agree on a single status ('singular' behavior), else declines. The v3 surface mirrors the same singular logic in apierrors.NewV3ErrorHandlerFunc, rendering v3 BaseAPIError shapes.", + "examples": [ + "pkg/framework/commonhttp/errors.go", + "openmeter/notification/httpdriver/errors.go", + "api/v3/apierrors/handler.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Accumulating Validate() with NillableGenericValidationError", + "when_to_use": "Validating any input struct or domain config", + "how_it_works": "Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf(\"field: %w\", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil. Simpler single-field checks return models.NewGenericValidationError(...) directly. The generic validation error maps to HTTP 400 at the edge.", + "examples": [ + "openmeter/app/marketplace.go", + "pkg/models/errors.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Goverter / Goderive code-generated type converters", + "when_to_use": "Translating between domain, API, and DB representations without hand-writing boilerplate mappers", + "how_it_works": "convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations. Hand-written conversion files/functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the /go-types-conversion skill). Never edit *.gen.go (Code generated ... DO NOT EDIT header).", + "examples": [ + "openmeter/customer/adapter/entitymapping.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Svix-backed webhook delivery behind a Handler interface", + "when_to_use": "Delivering notification events to customer-configured HTTP endpoints", + "how_it_works": "notification/webhook defines a Handler interface (CreateWebhook, UpdateWebhook, endpoint secret/header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. The notification event pipeline reconciles delivery state via eventhandler/reconcile.go.", + "examples": [ + "openmeter/notification/webhook/svix/webhook.go", + "openmeter/notification/webhook/noop/noop.go", + "openmeter/notification/eventhandler/reconcile.go" + ], + "applicable_when": "", + "do_not_apply_when": [], + "scope": [] + }, + { + "name": "Ent schema mixins for cross-cutting columns (ResourceMixin/IDMixin/TimeMixin/AnnotationsMixin)", + "when_to_use": "Defining a new persisted entity that needs the standard id/namespace/metadata/timestamps and soft-delete columns", + "how_it_works": "Schema structs compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index. UniqueResourceMixin adds a (namespace,key,deleted_at) unique index approximating partial-unique-on-not-deleted. Soft delete is via deleted_at; unique indexes are scoped with deleted_at to avoid resurrect collisions.", + "examples": [ + "pkg/framework/entutils/mixins.go", + "openmeter/ent/schema/customer.go" + ], + "applicable_when": "pkg/framework/entutils/mixins.go:47 UniqueResourceMixin's (namespace,key,deleted_at) unique index only approximates partial uniqueness \u2014 same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration; applies to entities relying on key-uniqueness for soft-deleted rows", + "do_not_apply_when": [ + "Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL \u2014 must add a custom SQL migration with IndexWhere, as the customer schema does at openmeter/ent/schema/customer.go:58-62, rather than relying on the mixin's deleted_at-in-key approximation" + ], + "scope": [] + } + ], + "integrations": [ + { + "service": "PostgreSQL (Ent ORM + Atlas + pgx)", + "purpose": "Primary transactional datastore for all domain entities; schema generated from ent schema, migrated via Atlas/golang-migrate", + "integration_point": "openmeter/ent/schema/, pkg/framework/entutils/transaction.go, app/common/database.go, tools/migrate/migrations/" + }, + { + "service": "ClickHouse", + "purpose": "Analytics store for metered usage events; streaming queries (CountEvents, QueryMeter) feed entitlement balance and billing", + "integration_point": "openmeter/streaming/clickhouse/, openmeter/streaming/connector.go, app/common/clickhouse.go" + }, + { + "service": "Kafka (confluent-kafka-go + Watermill CQRS)", + "purpose": "Event backbone: ingest events, system events, balance-worker events; consumed by notification/billing/balance/sink workers", + "integration_point": "openmeter/watermill/eventbus/eventbus.go, openmeter/watermill/grouphandler/grouphandler.go, app/common/kafka.go, openmeter/notification/consumer/consumer.go" + }, + { + "service": "Svix", + "purpose": "Outbound webhook delivery to customer endpoints for notification events", + "integration_point": "openmeter/notification/webhook/svix/webhook.go, openmeter/notification/webhook/svix/svix.go" + }, + { + "service": "Stripe", + "purpose": "Payment/invoicing app integration registered in the app marketplace; handles inbound Stripe webhooks", + "integration_point": "openmeter/app/stripe/service/service.go, openmeter/app/stripe/service/factory.go, openmeter/app/stripe/httpdriver/webhook.go" + }, + { + "service": "GOBL", + "purpose": "Invoice document format/representation for billing invoices", + "integration_point": "openmeter/billing/service/" + }, + { + "service": "OpenTelemetry", + "purpose": "Tracing and metrics across services, Kafka consumers, and Svix calls", + "integration_point": "app/common/telemetry.go, openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/webhook/svix/webhook.go" + }, + { + "service": "Redis", + "purpose": "Dedupe and supporting caches (optional)", + "integration_point": "pkg/redis/, openmeter/dedupe/" + }, + { + "service": "Viper + Cobra", + "purpose": "Configuration loading and CLI command structure for the binaries", + "integration_point": "app/config/, app/common/config.go" + } + ], + "pattern_selection_guide": [ + { + "scenario": "Adding a new domain package with persistence", + "pattern": "Service/Adapter layered package with Config.Validate() constructors + Ent adapter implementing TxCreator/TxUser", + "rationale": "Matches every existing domain (customer, billing, entitlement); transaction-awareness via entutils.TransactingRepo lets the adapter join caller transactions and keeps namespace/multi-tenancy handling uniform." + }, + { + "scenario": "Wiring a new service/hook/worker into a binary", + "pattern": "Add a wire.NewSet provider in app/common/*.go and reference it from the binary's wire.go, then run make generate", + "rationale": "Wire is the single DI mechanism; constructors take explicit deps and return errors, so feature flags (e.g. credits.enabled) gate wiring by returning Noop implementations." + }, + { + "scenario": "Serializing all operations for one logical entity across multiple tables", + "pattern": "lockr advisory lock keyed on a globally-unique id inside transaction.Run", + "rationale": "pg_advisory_xact_lock auto-releases with the tx and serializes business flows the DB's row locks can't span; only safe when the key's id component is PK-unique (see lockr precondition)." + }, + { + "scenario": "Reacting to another domain's lifecycle event in-process", + "pattern": "ServiceHookRegistry hook registered at wiring time (Noop when feature disabled)", + "rationale": "Synchronous, transactional in-process coupling without a Kafka round-trip; used for ledger provisioning, subject->customer sync, entitlement validation." + }, + { + "scenario": "Reacting to events asynchronously across workers", + "pattern": "eventbus.Publish -> Kafka topic by event-name prefix -> grouphandler type-routed consumer", + "rationale": "Decouples producers from workers; unknown event types are safely ignored/ack'd, and per-type handlers unmarshal once." + }, + { + "scenario": "Modeling a guarded multi-step lifecycle with side effects (invoice, charge)", + "pattern": "qmuntal/stateless FSM with external storage on the aggregate", + "rationale": "Permit/PermitDynamic/OnActive make legal transitions and guards explicit and testable; state lives on the persisted aggregate so transitions survive across requests." + }, + { + "scenario": "Pluggable third-party app integration (Stripe-like)", + "pattern": "RegisterMarketplaceListing into the in-memory app registry; capabilities discovered by Factory type-assertion", + "rationale": "Single registration point with duplicate rejection; install methods are validated against the listing and the factory's implemented interfaces." + }, + { + "scenario": "Behavior that branches by a fixed enum subtype", + "pattern": "Per-subtype connector behind one service with a getTypeConnector switch (default-error arm)", + "rationale": "Keeps shared concerns in the umbrella service while delegating subtype logic; the default-error arm forces a new enum value to be wired explicitly." + }, + { + "scenario": "Returning errors to HTTP clients with correct status", + "pattern": "Typed error encoders (HandleErrorIfTypeMatches) plus ValidationIssue http.status_code attribute mapping", + "rationale": "Centralizes RFC7807 problem rendering; the 'singular' rule avoids ambiguous multi-status responses, and v3 mirrors the same logic in apierrors." + }, + { + "scenario": "Validating input structs", + "pattern": "Accumulate errs []error and return NewNillableGenericValidationError(errors.Join(...))", + "rationale": "Reports all field errors at once with field-prefixed wrapping and maps cleanly to HTTP 400." + }, + { + "scenario": "Converting between domain/API/DB types", + "pattern": "Goverter/Goderive generated converters; hand-written FromAPI/ToAPI/FromDB/ToDB helpers", + "rationale": "Generated mappers cut boilerplate; the naming convention (per /go-types-conversion) keeps translation direction unambiguous." + } + ] + }, + "quick_reference": { + "pattern_selection": [ + { + "scenario": "New persisted domain package", + "pattern": "Service/Adapter + Config.Validate() constructor + Ent TxCreator/TxUser adapter", + "scope": [] + }, + { + "scenario": "Wire a service/worker into a binary", + "pattern": "wire.NewSet provider in app/common + binary wire.go + make generate", + "scope": [] + }, + { + "scenario": "Run repository logic inside/optionally-inside a transaction", + "pattern": "transaction.Run + entutils.TransactingRepo", + "scope": [] + }, + { + "scenario": "Serialize all ops for one entity across tables", + "pattern": "lockr advisory lock on globally-unique id inside transaction.Run", + "scope": [ + "subscription", + "entitlement", + "billing", + "ledger" + ] + }, + { + "scenario": "React to another domain's lifecycle in-process", + "pattern": "ServiceHookRegistry hook (Noop when disabled)", + "scope": [] + }, + { + "scenario": "Async cross-worker reaction", + "pattern": "eventbus.Publish -> Kafka by prefix -> grouphandler type-routed consumer", + "scope": [] + }, + { + "scenario": "Guarded multi-step lifecycle (invoice/charge)", + "pattern": "qmuntal/stateless FSM with external storage", + "scope": [ + "billing", + "charges" + ] + }, + { + "scenario": "Pluggable app integration", + "pattern": "RegisterMarketplaceListing + Factory type-assertion dispatch", + "scope": [ + "app" + ] + }, + { + "scenario": "Behavior branching by fixed enum subtype", + "pattern": "Per-subtype connector + getTypeConnector switch (default error)", + "scope": [ + "entitlement" + ] + }, + { + "scenario": "Map domain errors to HTTP status", + "pattern": "HandleErrorIfTypeMatches chain / http.status_code ValidationIssue attribute", + "scope": [] + }, + { + "scenario": "Validate input struct", + "pattern": "errs []error + NewNillableGenericValidationError(errors.Join)", + "scope": [] + } + ], + "error_mapping": [ + { + "error": "models.GenericValidationError (and NewNillableGenericValidationError)", + "status_code": 400, + "description": "Input validation failure; collected field-prefixed issues. Mapped at handler errorEncoders and api/v3/apierrors apiErrorFromHTTPStatus." + }, + { + "error": "api/v3 generated router binding errors (InvalidParamFormatError, RequiredParamError, RequiredHeaderError, TooManyValuesForParamError, UnmarshalingParamError, UnescapedCookieParamError)", + "status_code": 400, + "description": "Query/path/header parse failures converted to v3 InvalidParameters by NewV3ErrorHandlerFunc (api/v3/apierrors/handler.go)." + }, + { + "error": "models.GenericUnauthorizedError", + "status_code": 401, + "description": "Unauthenticated; mapped via apiErrorFromHTTPStatus StatusUnauthorized." + }, + { + "error": "models.GenericForbiddenError", + "status_code": 403, + "description": "Authorization denied; apiErrorFromHTTPStatus StatusForbidden." + }, + { + "error": "models.GenericNotFoundError / domain NotFoundError (e.g. notification.NotFoundError)", + "status_code": 404, + "description": "Entity not found; per-handler HandleErrorIfTypeMatches and apiErrorFromHTTPStatus StatusNotFound." + }, + { + "error": "models.GenericConflictError / notification.UpdateAfterDeleteError", + "status_code": 409, + "description": "State conflict (e.g. update after delete); HandleErrorIfTypeMatches StatusConflict." + }, + { + "error": "models.GenericPreConditionFailedError", + "status_code": 412, + "description": "Precondition failed; apiErrorFromHTTPStatus StatusPreconditionFailed." + }, + { + "error": "models.GenericNotImplementedError", + "status_code": 501, + "description": "Operation not implemented; apiErrorFromHTTPStatus StatusNotImplemented." + }, + { + "error": "Unclassified / fallthrough error (commonhttp.ErrorEncoder)", + "status_code": 500, + "description": "Default; ErrorEncoder responds 'something went wrong'. notification webhook.ValidationError/webhook.NotFoundError are intentionally mapped to 500 in the notification errorEncoder." + } + ] + }, + "technology": { + "stack": [ + { + "category": "Runtime", + "name": "Go", + "version": "1.25.6 (module); Docker builder golang:1.26.3-alpine; Nix shell go_1_26", + "purpose": "Primary backend language for all services (cmd/server, cmd/billing-worker, cmd/balance-worker, cmd/sink-worker, cmd/notification-service, cmd/jobs); module github.com/openmeterio/openmeter (go.mod)" + }, + { + "category": "Runtime", + "name": "Go (collector module)", + "version": "1.26.3", + "purpose": "Separate Go module github.com/openmeterio/openmeter/collector for the Benthos-based event collector; replaces parent module via local replace ../ (collector/go.mod)" + }, + { + "category": "Runtime", + "name": "Node.js", + "version": "v24.15.0 (.nvmrc); engines node>=22 for JS SDK", + "purpose": "TypeSpec compilation, OpenAPI tooling, JavaScript SDK build; .nvmrc is the source of truth kept aligned with the Nix CI shell (.nvmrc, AGENTS.md)" + }, + { + "category": "Runtime", + "name": "Python", + "version": "^3.9 (SDK package); Nix shell python314", + "purpose": "Generated Python client SDK (api/client/python/pyproject.toml) and atlas.sum / migrate check scripts under .github/tools/migrate" + }, + { + "category": "Backend Framework", + "name": "Chi router (go-chi/chi)", + "version": "v5.2.5", + "purpose": "HTTP router for the API server; oapi-codegen generates Chi server stubs (go.mod, openmeter/server)" + }, + { + "category": "Backend Framework", + "name": "go-chi/cors + go-chi/render", + "version": "cors v1.2.2, render v1.0.3", + "purpose": "CORS middleware and response rendering for HTTP handlers (go.mod)" + }, + { + "category": "Backend Framework", + "name": "oapi-codegen", + "version": "v2.6.1-0.20260403235458 (tool); runtime v1.4.1; nethttp-middleware v1.1.2", + "purpose": "Generates Go server/client code from the OpenAPI spec (api/api.gen.go, api/v3/api.gen.go, api/client/go/client.gen.go); chi-middleware template is patched for custom filter parsing (Makefile patch-oapi-templates)" + }, + { + "category": "API Definition", + "name": "TypeSpec", + "version": "@typespec/* with prettier-plugin 1.11.0", + "purpose": "Source of truth for the API in api/spec/ (legacy + aip packages), compiled to OpenAPI then to SDKs (api/spec/package.json, AGENTS.md)" + }, + { + "category": "API Definition", + "name": "OpenAPI / kin-openapi", + "version": "kin-openapi v0.139.0", + "purpose": "OpenAPI spec parsing and response validation; specs at api/openapi.yaml, api/openapi.cloud.yaml, api/v3/openapi.yaml (go.mod, config.example.yaml server.responseValidation)" + }, + { + "category": "Database", + "name": "PostgreSQL", + "version": "server postgres:15 (atlas dev db); pgx/v5 v5.9.2 driver; lib/pq v1.12.3", + "purpose": "Primary transactional datastore; local DSN postgres://postgres:postgres@localhost:5432/postgres (atlas.hcl, docker-compose)" + }, + { + "category": "Database / ORM", + "name": "Ent (entgo.io/ent)", + "version": "v0.14.6", + "purpose": "Schema-as-code ORM; schemas in openmeter/ent/schema/*.go are the DB source of truth, generated code in openmeter/ent/db/ (DO NOT EDIT) (go.mod, AGENTS.md)" + }, + { + "category": "Database / Migrations", + "name": "Atlas (ariga.io/atlas) + atlasx", + "version": "atlas pinned 0.36.0 in flake atlasx; ariga.io/atlas v0.36.2-0.20250730", + "purpose": "Generates SQL migrations by diffing the Ent schema; golang-migrate format files in tools/migrate/migrations/ (atlas.hcl, flake.nix)" + }, + { + "category": "Database / Migrations", + "name": "golang-migrate", + "version": "v4.19.1", + "purpose": "Migration file format and runtime application of tools/migrate/migrations/*.up.sql/*.down.sql (go.mod, atlas.hcl migrations_format=golang-migrate)" + }, + { + "category": "Database / Codegen", + "name": "sqlc", + "version": "provided via Nix shell (sqlc); gen target generate-sqlc-testdata", + "purpose": "Generates SQLC migration testdata for specific schema versions (Makefile generate-sqlc-testdata, flake.nix packages)" + }, + { + "category": "Analytics Database", + "name": "ClickHouse (clickhouse-go/v2 + ch-go)", + "version": "clickhouse-go/v2 v2.46.0, ch-go v0.72.0", + "purpose": "Stores and aggregates metering events; ports 8123/9000/9009 in docker-compose; TEST_CLICKHOUSE_DSN used in CI (go.mod, docker-compose, ci.yaml)" + }, + { + "category": "Cache / Dedupe", + "name": "Redis (go-redis/v9)", + "version": "v9.20.0 + redisotel v9.20.0", + "purpose": "Event deduplication and caching; docker-compose redis profile, port 6379 (go.mod, docker-compose)" + }, + { + "category": "Cache", + "name": "hashicorp/golang-lru/v2", + "version": "v2.0.7", + "purpose": "In-process LRU caches (e.g. Kafka topic provisioner cache) (go.mod, pkg/lrux)" + }, + { + "category": "Queue / Streaming", + "name": "Kafka (confluent-kafka-go/v2)", + "version": "v2.14.1 (librdkafka v2.14.1 pinned in flake)", + "purpose": "Event ingestion bus; requires CGO + -tags=dynamic to link librdkafka; Docker uses -tags musl static build (go.mod, Makefile GO_BUILD_FLAGS, flake.nix, Dockerfile)" + }, + { + "category": "Queue / Streaming", + "name": "IBM/sarama", + "version": "v1.49.0", + "purpose": "Secondary Kafka client library used alongside Watermill (go.mod)" + }, + { + "category": "Queue / Messaging", + "name": "Watermill + watermill-kafka/v3", + "version": "watermill v1.5.2, watermill-kafka/v3 v3.1.2", + "purpose": "Message router / event-driven pipeline framework for worker services (go.mod, openmeter/watermill)" + }, + { + "category": "Events", + "name": "CloudEvents SDK (cloudevents/sdk-go/v2)", + "version": "v2.16.2", + "purpose": "CloudEvents envelope for metering events; schema at cloudevents.spec.json (go.mod)" + }, + { + "category": "Invoicing", + "name": "GOBL (invopop/gobl)", + "version": "v0.403.0", + "purpose": "Open-source invoice document format for billing/invoicing (go.mod, openmeter/billing)" + }, + { + "category": "Payments", + "name": "Stripe (stripe-go/v80)", + "version": "v80.2.1", + "purpose": "Stripe payment/app integration (go.mod, openmeter/app)" + }, + { + "category": "Webhooks", + "name": "Svix (svix/svix-webhooks)", + "version": "v1.95.1", + "purpose": "Webhook delivery for notifications; docker-compose svix profile port 8071, needs SVIX_JWT_SECRET (go.mod, docker-compose, Makefile)" + }, + { + "category": "Auth", + "name": "golang-jwt/jwt/v5", + "version": "v5.3.1", + "purpose": "JWT handling (portal tokens, Svix JWT) (go.mod, openmeter/portal)" + }, + { + "category": "Auth", + "name": "xdg-go/scram", + "version": "v1.2.0", + "purpose": "SASL/SCRAM authentication for Kafka brokers (go.mod)" + }, + { + "category": "State Machine", + "name": "qmuntal/stateless", + "version": "v1.8.0", + "purpose": "State machine library used for invoice/charge lifecycle state machines (go.mod, openmeter/billing/charges)" + }, + { + "category": "Decimal / Money", + "name": "alpacahq/alpacadecimal + govalues/decimal + shopspring/decimal", + "version": "alpacadecimal v0.0.9, govalues/decimal v0.1.36, shopspring/decimal v1.4.0", + "purpose": "Exact decimal arithmetic for monetary amounts; tests assert via InexactFloat64() (go.mod, AGENTS.md)" + }, + { + "category": "Validation", + "name": "models.NewNillableGenericValidationError (custom) + getkin/kin-openapi", + "version": "kin-openapi v0.139.0", + "purpose": "Validate() methods collect errors into errors.Join and wrap with field context; OpenAPI request/response validation at the HTTP edge (AGENTS.md, pkg/models)" + }, + { + "category": "Scheduling", + "name": "go-co-op/gocron/v2 + robfig/cron/v3", + "version": "gocron v2.21.2, cron v3.0.1", + "purpose": "Periodic job scheduling (cmd/jobs, e.g. llm-cost sync) (go.mod, Makefile llm-cost-sync)" + }, + { + "category": "Distributed Locking", + "name": "cirello.io/pglock", + "version": "v1.16.1", + "purpose": "Postgres-advisory-lock-based distributed locking (distributed_locks table excluded from atlas diff) (go.mod, atlas.hcl migration_exlude)" + }, + { + "category": "Config", + "name": "Viper + Cobra + pflag", + "version": "viper v1.21.0, cobra v1.10.2, pflag v1.0.10", + "purpose": "Configuration loading (config.yaml from config.example.yaml) and CLI command structure (go.mod, app/config, Makefile)" + }, + { + "category": "DI / Wiring", + "name": "google/wire", + "version": "v0.7.0 (tool: google/wire/cmd/wire)", + "purpose": "Compile-time dependency injection; providers in **/wire.go generate **/wire_gen.go (go.mod tool, AGENTS.md, app/common)" + }, + { + "category": "Codegen", + "name": "goverter (jmattheis/goverter)", + "version": "v1.9.3 (tool)", + "purpose": "Generates type converters from **/convert.go interfaces into **/convert.gen.go (go.mod tool, AGENTS.md)" + }, + { + "category": "Codegen", + "name": "goderive (awalterschulze/goderive)", + "version": "v0.5.1 (tool)", + "purpose": "Generates derived code from annotations, e.g. billing/derived.gen.go (go.mod tool, AGENTS.md)" + }, + { + "category": "Observability", + "name": "OpenTelemetry (go.opentelemetry.io/otel)", + "version": "otel v1.44.0 + otlp grpc/http exporters; otelslog bridge v0.19.0; otelsql v0.42.0; otelhttp v0.69.0", + "purpose": "Tracing, metrics and structured-log export across all services (go.mod, pkg/otelx)" + }, + { + "category": "Observability / Metrics", + "name": "Prometheus client_golang", + "version": "v1.23.2 + otel prometheus exporter v0.66.0", + "purpose": "Prometheus metrics exposition (go.mod)" + }, + { + "category": "Logging", + "name": "log/slog + samber/slog-multi + lmittmann/tint + golang-cz/devslog", + "version": "slog-multi v1.8.0, tint v1.1.3, devslog v0.0.15", + "purpose": "Structured logging; loggers are injected explicitly, slog.Default() fallback is forbidden in prod constructors (go.mod, AGENTS.md, pkg/log)" + }, + { + "category": "Health", + "name": "AppsFlyer/go-sundheit", + "version": "v0.6.0", + "purpose": "Liveness/readiness health checks (go.mod, pkg/gosundheit)" + }, + { + "category": "Utilities", + "name": "samber/lo + samber/mo", + "version": "lo v1.53.0, mo v1.16.0", + "purpose": "Functional slice/map helpers; lo.ToPtr/lo.Must preferred over local wrappers (go.mod, AGENTS.md, .agents/skills samber-lo)" + }, + { + "category": "Utilities", + "name": "rickb777/period + custom pkg/datetime", + "version": "period v1.0.27", + "purpose": "ISO-8601 duration/period handling for billing cadences (go.mod, pkg/datetime)" + }, + { + "category": "Utilities", + "name": "oklog/ulid/v2 + google/uuid", + "version": "ulid v2.1.1, uuid v1.6.0", + "purpose": "ULID/UUID identifier generation (go.mod, pkg/models)" + }, + { + "category": "Resilience", + "name": "avast/retry-go/v4 + sony/gobreaker", + "version": "retry-go v4.7.0, gobreaker v1.0.0", + "purpose": "Retry and circuit-breaker patterns for external calls (go.mod)" + }, + { + "category": "Testing", + "name": "stretchr/testify", + "version": "v1.11.1", + "purpose": "Assertion/require + mock framework for all Go tests (go.mod, AGENTS.md /test skill)" + }, + { + "category": "Testing", + "name": "gotestsum", + "version": "v1.13.0 (tool)", + "purpose": "Test runner with richer output (go.mod tool, flake)" + }, + { + "category": "Testing", + "name": "peterldowns/pgtestdb", + "version": "v0.1.1", + "purpose": "Ephemeral Postgres test databases per test; requires POSTGRES_HOST=127.0.0.1 or suites skip (go.mod, AGENTS.md)" + }, + { + "category": "Testing", + "name": "brianvoe/gofakeit/v6", + "version": "v6.28.0", + "purpose": "Fake data generation in tests (go.mod)" + }, + { + "category": "Testing (JS SDK)", + "name": "Vitest + fetch-mock", + "version": "vitest 4.1.4, @fetch-mock/vitest 0.2.18", + "purpose": "JavaScript SDK unit tests (api/client/javascript/package.json)" + }, + { + "category": "Linting (Go)", + "name": "golangci-lint", + "version": "config version 2; provided by Nix shell", + "purpose": "Linters: bodyclose, errcheck, govet, ineffassign, misspell, nolintlint, sloglint, staticcheck, unconvert, whitespace; formatters gci/gofmt/gofumpt/goimports with prefix github.com/openmeterio/openmeter; fast variant .golangci-fast.yaml (.golangci.yaml, Makefile lint-go)" + }, + { + "category": "Linting (API)", + "name": "Spectral + Prettier (TypeSpec)", + "version": "spectral-cli 6.16.0 (via pnpx), prettier 3.8.3", + "purpose": "Lints OpenAPI specs and formats TypeSpec (Makefile lint-openapi, api/spec/package.json, flake.nix)" + }, + { + "category": "Linting / Formatting (JS SDK)", + "name": "Biome", + "version": "@biomejs/biome 2.4.11", + "purpose": "Format + lint for the JavaScript SDK (api/client/javascript/package.json)" + }, + { + "category": "Linting (Helm)", + "name": "helm lint + helm-docs", + "version": "kubernetes-helm + helm-docs via Nix", + "purpose": "Lints deploy/charts/openmeter and deploy/charts/benthos-collector (Makefile lint-helm, flake.nix)" + }, + { + "category": "SDK Tooling (JS)", + "name": "openapi-typescript + orval + openapi-fetch + zod", + "version": "openapi-typescript 7.13.0, orval 8.7.0, openapi-fetch 0.17.0, zod 4.3.6", + "purpose": "Generates TS client types, Zod schemas and fetch client for @openmeter/sdk (api/client/javascript/package.json)" + }, + { + "category": "Collector", + "name": "Benthos / Redpanda Connect", + "version": "benthos/v4 v4.73.0, connect free bundle v4.93.0", + "purpose": "Stream-processing collector binary (cmd in collector module) packaged as benthos-collector (collector/go.mod, Makefile build-benthos-collector, benthos-collector.Dockerfile)" + }, + { + "category": "Collector (K8s)", + "name": "controller-runtime + k8s.io client-go", + "version": "controller-runtime v0.24.1, client-go v0.36.1", + "purpose": "Kubernetes integration for the collector (collector/go.mod)" + }, + { + "category": "Dev Environment", + "name": "Nix + devenv + flake-parts + git-hooks", + "version": "nixpkgs-unstable; devenv flake; prek pre-commit", + "purpose": "Reproducible dev/CI shell `nix develop --impure .#ci` providing go/node/python/atlas/golangci-lint/air/helm/benthos/sqlc; enterShell rewrites .nvmrc from node -v (flake.nix, AGENTS.md, ci.yaml)" + }, + { + "category": "Dev Environment", + "name": "air (hot reload)", + "version": "via Nix shell", + "purpose": "Hot-reload runner for each service via per-cmd .air.toml (Makefile server/sink-worker/etc., cmd/*/.air.toml)" + }, + { + "category": "Commit Tooling", + "name": "commitizen / prek", + "version": "cz + prek via Nix git-hooks", + "purpose": "Conventional-commit enforcement; CI runs `prek run -a` and `prek run --stage manual` (flake.nix git-hooks, ci.yaml Validate commit messages)" + } + ], + "run_commands": { + "up": "docker compose up -d (start kafka/clickhouse + profiled postgres/redis/svix/dev deps)", + "down": "docker compose down --remove-orphans --volumes", + "server": "air -c ./cmd/server/.air.toml (hot-reload API server; checks config.yaml freshness)", + "sink-worker": "air -c ./cmd/sink-worker/.air.toml", + "balance-worker": "air -c ./cmd/balance-worker/.air.toml", + "billing-worker": "air -c ./cmd/billing-worker/.air.toml", + "notification-service": "air -c ./cmd/notification-service/.air.toml", + "llm-cost-sync": "go run ./cmd/jobs llm-cost sync", + "test": "PGPASSWORD=postgres psql ... && POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic ./...", + "test-nocache": "POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic -count=1 ./...", + "test-all": "docker compose up -d postgres svix redis && SVIX_HOST=localhost SVIX_JWT_SECRET=DUMMY_JWT_SECRET go test -tags=dynamic -count=1 ./...", + "etoe": "make -C e2e test-local (TZ=UTC OPENMETER_ADDRESS=http://localhost:38888 go test -count=1 ./...)", + "etoe-slow": "RUN_SLOW_TESTS=1 make -C e2e test-local", + "generate": "patch-oapi-templates + go generate ./...", + "generate-all": "update-openapi + generate-javascript-sdk + go generate ./...", + "gen-api": "update-openapi (make -C api/spec generate + go generate ./api/...) + generate-javascript-sdk", + "update-openapi": "patch-oapi-templates + make -C api/spec generate + go generate ./api/...", + "generate-javascript-sdk": "make -C api/client/javascript generate (pnpm install + generate + build + test)", + "patch-oapi-templates": "copy oapi-codegen chi-middleware.tmpl and apply api/v3/templates/chi-middleware.tmpl.patch", + "generate-view-sql": "go run ./tools/migrate/cmd/viewgen (SQL for ent.View schemas)", + "generate-sqlc-testdata": "VERSION= ./tools/migrate/generate-sqlc-testdata.sh", + "migrate-check": "migrate-check-schema + migrate-check-diff + migrate-check-lint + migrate-check-validate", + "migrate-check-diff": "atlas migrate --env local diff migrate-check (must produce no changes)", + "migrate-check-lint": "atlas migrate --env local lint --latest 10", + "migrate-check-validate": "atlas migrate --env local validate", + "atlas-diff": "atlas migrate --env local diff (generate new migration)", + "lint": "lint-go + lint-api-spec + lint-openapi + lint-helm", + "lint-go": "golangci-lint run -v ./...", + "lint-go-fast": "golangci-lint run -v --config .golangci-fast.yaml $(GO_LINT_PATH)", + "lint-go-style": "golangci-lint fmt -v -d $(GO_LINT_PATH)", + "lint-go-head": "golangci-lint run --new-from-rev=HEAD~1", + "lint-openapi": "spectral lint api/openapi.yaml api/openapi.cloud.yaml api/v3/openapi.yaml", + "lint-helm": "helm lint deploy/charts/openmeter && helm lint deploy/charts/benthos-collector", + "fmt": "golangci-lint run --fix", + "mod": "go mod tidy && go mod tidy -C collector", + "build": "build-server build-sink-worker build-benthos-collector build-balance-worker build-billing-worker build-notification-service build-jobs", + "build-server": "go build -o build/server -tags=dynamic ./cmd/server", + "build-benthos-collector": "go build -C collector -o ../build/benthos-collector -tags=dynamic ./cmd", + "build-benthos-collector-release": "CGO_ENABLED=0 GOOS=.. GOARCH=.. go build -C collector -trimpath -ldflags '-s -w -X main.version=..' (set GOOS/GOARCH/VERSION)", + "package-helm-chart": "helm-docs + helm dependency update + helm package (set CHART and VERSION)", + "seed": "benthos -c etc/seed/seed.yaml", + "ci": "make generate-all && make -j 10 lint test etoe", + "ci-shell": "nix develop --impure .#ci -c (run any toolchain command in the reproducible CI shell)" + }, + "project_structure": "openmeter/\n\u251c\u2500\u2500 api/ # API layer (generated + source)\n\u2502 \u251c\u2500\u2500 spec/ # TypeSpec source of truth (packages/legacy, packages/aip)\n\u2502 \u251c\u2500\u2500 api.gen.go # oapi-codegen legacy server/types (generated)\n\u2502 \u251c\u2500\u2500 v3/ # v3 (AIP) API: api.gen.go, openapi.yaml, filters, templates\n\u2502 \u251c\u2500\u2500 openapi.yaml / openapi.cloud.yaml\n\u2502 \u2514\u2500\u2500 client/ # javascript (pnpm/@openmeter/sdk), go, python SDKs\n\u251c\u2500\u2500 app/\n\u2502 \u251c\u2500\u2500 common/ # Wire DI providers (wire.go -> wire_gen.go)\n\u2502 \u2514\u2500\u2500 config/ # Viper config structs\n\u251c\u2500\u2500 cmd/ # Service entrypoints (.air.toml each)\n\u2502 \u251c\u2500\u2500 server/ billing-worker/ balance-worker/ sink-worker/\n\u2502 \u251c\u2500\u2500 notification-service/ jobs/\n\u251c\u2500\u2500 openmeter/ # Core business logic (layered service/adapter)\n\u2502 \u251c\u2500\u2500 billing/ (service/, adapter/, rating/, worker/, charges/)\n\u2502 \u251c\u2500\u2500 subscription/ entitlement/ credit/ ledger/ customer/\n\u2502 \u251c\u2500\u2500 notification/ (service/, adapter/, consumer/, eventhandler/, webhook/, httpdriver/)\n\u2502 \u251c\u2500\u2500 meter/ meterevent/ ingest/ sink/ streaming/ productcatalog/\n\u2502 \u251c\u2500\u2500 app/ secret/ portal/ namespace/ llmcost/ cost/ progressmanager/\n\u2502 \u251c\u2500\u2500 ent/schema/ # Ent entity definitions (DB source of truth)\n\u2502 \u251c\u2500\u2500 ent/db/ # Generated ent code (DO NOT EDIT)\n\u2502 \u251c\u2500\u2500 registry/ server/ watermill/ event/ testutils/\n\u251c\u2500\u2500 pkg/ # Shared utils (clock, models, filter, framework/entutils, kafka, otelx, pagination, ...)\n\u251c\u2500\u2500 collector/ # Separate Go module: Benthos/Redpanda Connect collector\n\u251c\u2500\u2500 tools/migrate/ # Migration tooling + migrations/ (golang-migrate SQL) + atlas.sum\n\u251c\u2500\u2500 e2e/ # End-to-end tests (docker-compose driven)\n\u251c\u2500\u2500 deploy/charts/ # Helm charts: openmeter, benthos-collector\n\u251c\u2500\u2500 docs/ etc/ quickstart/ test/\n\u251c\u2500\u2500 Dockerfile benthos-collector.Dockerfile docker-compose*.yaml\n\u251c\u2500\u2500 atlas.hcl flake.nix Makefile justfile .golangci.yaml config.example.yaml", + "templates": [ + { + "component_type": "domain service", + "description": "Service layer struct in openmeter//service/service.go: takes a Config of injected deps (Repository, sub-services, *slog.Logger), New() validates required deps and asserts the interface. Loggers injected, never slog.Default().", + "file_path_template": "openmeter//service/service.go", + "code": "var _ .Service = (*Service)(nil)\ntype Config struct { Adapter .Repository; Logger *slog.Logger }\nfunc New(c Config) (*Service, error) { if c.Adapter == nil { return nil, errors.New(\"missing repository\") }; return &Service{adapter: c.Adapter, logger: c.Logger}, nil }" + }, + { + "component_type": "domain adapter (Ent repo)", + "description": "Repository/adapter in openmeter//adapter/adapter.go: wraps *entdb.Client, Config.Validate() requires client+logger, returns the domain Repository interface; helpers stay transaction-aware via entutils.TransactingRepo.", + "file_path_template": "openmeter//adapter/adapter.go", + "code": "type Config struct { Client *entdb.Client; Logger *slog.Logger }\nfunc (c Config) Validate() error { if c.Client == nil { return errors.New(\"postgres client is required\") }; return nil }\nfunc New(c Config) (.Repository, error) { if err := c.Validate(); err != nil { return nil, err }; return &adapter{db: c.Client, logger: c.Logger}, nil }" + }, + { + "component_type": "Ent schema entity", + "description": "Entity definition in openmeter/ent/schema/.go: embed ent.Schema, declare Mixin() (IDMixin/TimeMixin/MetadataMixin), Fields(), Edges(), Indexes(); run `make generate` then `atlas migrate --env local diff ` to produce migrations.", + "file_path_template": "openmeter/ent/schema/.go", + "code": "type Feature struct { ent.Schema }\nfunc (Feature) Mixin() []ent.Mixin { return []ent.Mixin{entutils.IDMixin{}, entutils.TimeMixin{}, entutils.MetadataMixin{}} }\nfunc (Feature) Fields() []ent.Field { return []ent.Field{ field.String(\"namespace\").NotEmpty().Immutable() } }" + }, + { + "component_type": "HTTP handler (httpdriver)", + "description": "HTTP handlers live in openmeter//httpdriver/ and are wired into the Chi server via generated oapi-codegen stubs; validation surfaces ValidationIssue (see /api skill).", + "file_path_template": "openmeter//httpdriver/.go", + "code": "func (h *handler) Create() CreateHandler { return httptransport.NewHandlerWithArgs(resolveRequest, handle, encodeResponse) }" + }, + { + "component_type": "Goverter converter", + "description": "Define a converter interface with goverter annotations in /convert.go; `make generate` emits /convert.gen.go. Use FromAPI/ToAPI/FromDB/ToDB naming (/go-types-conversion skill).", + "file_path_template": "openmeter//convert.go", + "code": "// goverter:converter\ntype Converter interface { ToAPI(domain.X) api.X }" + }, + { + "component_type": "Wire DI provider", + "description": "Register a new dependency by adding a provider to a wire.go set in app/common/ (or domain registry), then run `make generate` to regenerate wire_gen.go.", + "file_path_template": "app/common/wire.go", + "code": "var Set = wire.NewSet(adapter.New, service.New, wire.Bind(new(domain.Service), new(*service.Service)))" + }, + { + "component_type": "SQL migration", + "description": "Generated by diffing the Ent schema; never hand-edit timestamped files except ent.View DDL which Atlas does not emit. atlas.sum must stay append-only (enforced in pr-checks.yaml).", + "file_path_template": "tools/migrate/migrations/_.up.sql / .down.sql", + "code": "-- generated via: atlas migrate --env local diff " + }, + { + "component_type": "service test (TestEnv)", + "description": "Tests build deps from underlying constructors (repos/adapters/services/lockr), not app/common wiring; require POSTGRES_HOST=127.0.0.1; use t.Context(); freeze time with clock.FreezeTime + defer clock.UnFreeze (/test skill, AGENTS.md).", + "file_path_template": "openmeter//.../_test.go", + "code": "func TestX(t *testing.T) { ctx := t.Context(); /* given/when/then */ require.Equal(t, float64(5), got.InexactFloat64()) }" + } + ] + }, + "deployment": { + "runtime_environment": "self-hosted (Kubernetes via Helm; container images on GHCR; binaries cross-compiled for linux/darwin amd64/arm64)", + "compute_services": [ + "Kubernetes Deployments (Helm chart deploy/charts/openmeter)", + "containers run on depot-ubuntu CI/Depot build runners", + "long-running worker processes: server, sink-worker, balance-worker, billing-worker, notification-service, jobs" + ], + "container_runtime": "Docker (multi-stage; golang:1.26.3-alpine builder + tonistiigi/xx cross-compile, alpine:3.23.4 runtime; static musl builds linking librdkafka)", + "orchestration": "Kubernetes (Helm) for production; Docker Compose for local dev and e2e (docker-compose.yaml, docker-compose.base.yaml, e2e/docker-compose.*.yaml)", + "serverless_functions": "none", + "ci_cd": [ + "GitHub Actions (.github/workflows/): ci.yaml (build/lint/test/migrations/generators via nix develop .#ci on Depot runners), release.yaml (tag-triggered artifacts/helm/binaries/SDKs), artifacts.yaml (Depot build-push container images), npm-release.yaml (OIDC trusted publish), sdk-python-dev-release.yaml, pr-checks.yaml (atlas.sum append-only, release-note label), security.yaml (Trufflehog secret scan + SCA), codeql.yml + codeql-go.yaml, analysis-scorecard.yaml, untrusted-artifacts.yaml, require-all-reviewers.yml, workflow-result.yaml", + "Depot (depot/build-push-action, depot/setup-action) for fast multi-arch container builds, project from vars.DEPOT_PROJECT" + ], + "distribution": [ + "GitHub Container Registry ghcr.io/openmeterio/openmeter (server image, multi-arch linux/amd64+arm64)", + "ghcr.io/openmeterio/benthos-collector container image", + "Helm charts pushed to oci://ghcr.io/openmeterio/helm-charts (openmeter, benthos-collector)", + "npm @openmeter/sdk (OIDC trusted publishing, dist-tags latest/beta)", + "PyPI openmeter Python SDK (poetry, POETRY_PYPI_TOKEN_PYPI)", + "GitHub Releases with benthos-collector cross-compiled tarballs + sha256 checksums" + ], + "infrastructure_as_code": "Helm charts (deploy/charts/openmeter, deploy/charts/benthos-collector); chart deps: altinity-clickhouse-operator, bitnami kafka/postgresql/redis subcharts", + "supporting_services": [ + "PostgreSQL (primary DB)", + "ClickHouse (analytics, optional altinity-clickhouse-operator)", + "Kafka (event bus, bitnami subchart)", + "Redis (dedupe/cache, bitnami subchart)", + "Svix (webhook delivery)", + "Stripe (payments)" + ], + "environment_config": "config.yaml (copied from config.example.yaml by Make targets; Viper-loaded). Key settings: address, telemetry, server.responseValidation, postgres.url/autoMigrate, ingest.kafka, dedupe, billing, notification, credits.enabled, meter definitions. CI env vars: POSTGRES_HOST=127.0.0.1, SVIX_HOST, SVIX_JWT_SECRET, TEST_CLICKHOUSE_DSN, GOTMPDIR/TMPDIR redirected to workspace on Depot. Secrets via GitHub Actions: GITHUB_TOKEN, PYPI_TOKEN, DEPOT_PROJECT (var); npm via OIDC id-token.", + "key_files": [ + "Dockerfile", + "benthos-collector.Dockerfile", + ".dockerignore", + "docker-compose.yaml", + "docker-compose.base.yaml", + "entrypoint.sh", + "atlas.hcl", + "flake.nix", + "flake.lock", + ".nvmrc", + "Makefile", + "justfile", + ".golangci.yaml", + ".golangci-fast.yaml", + "config.example.yaml", + "deploy/charts/openmeter/Chart.yaml", + "deploy/charts/openmeter/values.yaml", + "deploy/charts/benthos-collector/Chart.yaml", + "deploy/charts/Makefile", + ".github/workflows/ci.yaml", + ".github/workflows/release.yaml", + ".github/workflows/artifacts.yaml", + ".github/workflows/npm-release.yaml", + ".github/workflows/security.yaml", + ".github/workflows/pr-checks.yaml", + ".github/workflows/codeql.yml", + "tools/migrate/migrations/atlas.sum", + "api/spec/package.json", + "api/client/javascript/package.json", + "api/client/python/pyproject.toml" + ] + }, + "development_rules": [ + { + "category": "anti_pattern", + "rule": "Never hand-edit files carrying a `// Code generated by X, DO NOT EDIT.` header \u2014 openmeter/ent/db/, **/wire_gen.go, **/convert.gen.go, billing/derived.gen.go, api/api.gen.go, api/v3/api.gen.go, api/client/go/client.gen.go; regenerate via make generate / make gen-api.", + "source": "AGENTS.md Code Generation table; openmeter/ent/db/" + }, + { + "category": "wiring", + "rule": "Always change the Ent schema in openmeter/ent/schema/*.go first, then run `make generate` to regenerate openmeter/ent/db/, then `atlas migrate --env local diff ` to emit migrations \u2014 never write DB columns or migration SQL by hand.", + "source": "AGENTS.md Database Migrations; openmeter/ent/schema/feature.go" + }, + { + "category": "anti_pattern", + "rule": "Never use panic in non-test code; if a new failure mode is possible, change the function signature to return an error and propagate it.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "anti_pattern", + "rule": "Never introduce context.Background() or context.TODO() to sidestep missing context propagation; propagate the caller's context through the full path, or drop the unused context.Context parameter.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "pattern_to_follow", + "rule": "In production constructors/initialization, always require and inject a *slog.Logger explicitly via Config; never fall back to slog.Default().", + "source": "AGENTS.md Coding Conventions; openmeter/notification/service/service.go, openmeter/notification/adapter/adapter.go" + }, + { + "category": "pattern_to_follow", + "rule": "Build a service via its Config struct + New() constructor that validates required dependencies and asserts the interface (var _ Service = (*Service)(nil)); adapters validate via Config.Validate() requiring client+logger.", + "source": "openmeter/notification/service/service.go; openmeter/notification/adapter/adapter.go" + }, + { + "category": "pattern_to_follow", + "rule": "For Validate() methods, collect all issues into `var errs []error` and return models.NewNillableGenericValidationError(errors.Join(errs...)); wrap field context with fmt.Errorf(\"field: %w\", err) and use errors.New for simple local checks \u2014 do not return on the first invalid field.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "pattern_to_follow", + "rule": "Use samber/lo helpers instead of local wrappers: slices.Clone for defensive copies, lo.ToPtr for pointer literals, lo.Must only for (value,err) panic-on-failure test setup; never add local ptr/must/loPtr/loMust helpers.", + "source": "AGENTS.md Coding Conventions; .agents/skills samber-lo" + }, + { + "category": "boundary", + "rule": "In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware: even helpers taking a raw *entdb.Client must wrap their body with entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to the tx already in ctx.", + "source": "AGENTS.md Coding Conventions; openmeter/billing/charges adapter" + }, + { + "category": "boundary", + "rule": "Keep domain test helpers under openmeter/.../testutils independent of app/common; build test dependencies from underlying constructors (repos, adapters, services, lockr), not the wiring layer, to avoid test-only import cycles.", + "source": "AGENTS.md Testing" + }, + { + "category": "data_flow", + "rule": "When changing the API, edit TypeSpec in api/spec/ first, then run `make gen-api` (OpenAPI + SDKs), then `make generate` (Go server/client). Adding @query to a TypeSpec file without HTTP decorators requires importing @typespec/http and `using TypeSpec.Http;`.", + "source": "AGENTS.md Code Generation workflow" + }, + { + "category": "pattern_to_follow", + "rule": "For type-translation files/functions use FromAPI.../ToAPI.../FromDB.../ToDB... naming and `map`/`mapped` terminology (never project/projected); follow the /go-types-conversion skill.", + "source": "AGENTS.md Coding Conventions; .agents/skills/go-types-conversion" + }, + { + "category": "wiring", + "rule": "When credits.enabled is false, ledger account services/resolvers are wired to noop in app/common; any ledger backfill that must write real ledger_accounts/ledger_customer_accounts rows must construct concrete ledger adapters directly rather than relying on default DI outputs.", + "source": "AGENTS.md Configuration" + }, + { + "category": "wiring", + "rule": "cmd/server/main.go migrates the DB before creating the default namespace; register namespace handlers before initNamespace(...) if they must provision the default namespace during startup.", + "source": "AGENTS.md Architecture" + }, + { + "category": "anti_pattern", + "rule": "Never use raw decimal-equality booleans in tests when precision allows; assert via require.Equal(t, expectedFloat64, actual.InexactFloat64()) and prefer simple float64(5) literals over verbose decimal construction.", + "source": "AGENTS.md Testing" + }, + { + "category": "pattern_to_follow", + "rule": "In tests, prefer t.Context() over context.Background(); pair clock.FreezeTime(...) with defer clock.UnFreeze() in the same scope so later subtests do not inherit frozen time.", + "source": "AGENTS.md Testing" + }, + { + "category": "anti_pattern", + "rule": "Do not extract helpers that only wrap 2-4 trivial lines/guards without adding domain intent, and remove leftover pass-through wrappers that only call another function \u2014 call the underlying function directly.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "boundary", + "rule": "ent.View schemas generate query code but do NOT appear in openmeter/ent/db/migrate/schema.go or migrate.Tables; their DDL needs an explicit SQL migration (use `make generate-view-sql` / tools/migrate/cmd/viewgen) \u2014 do not assume atlas diff will emit them.", + "source": "AGENTS.md Ent view caveat; Makefile generate-view-sql" + } + ], + "infrastructure_rules": [ + { + "category": "ci_cd", + "rule": "Always run toolchain commands through the Nix CI shell `nix develop --impure .#ci -c ` when go/gofmt/golangci-lint/atlas are missing from the ambient shell; CI itself runs build/lint/test/migrate-check/generators this way.", + "source": "AGENTS.md Testing; .github/workflows/ci.yaml" + }, + { + "category": "ci_cd", + "rule": "Always set POSTGRES_HOST=127.0.0.1 for DB-touching Go tests (and ensure Postgres is up via `docker compose up -d postgres`), or suites silently skip; run tests with -tags=dynamic (confluent-kafka-go) and the Make parallelism flags -p 128 -parallel 16.", + "source": "AGENTS.md Testing; Makefile test" + }, + { + "category": "ci_cd", + "rule": "Never let generated artifacts drift: CI fails if `make update-openapi`, `make generate-javascript-sdk`, or `go generate ./...` produce any git diff or untracked files \u2014 run make generate-all and commit before pushing.", + "source": ".github/workflows/ci.yaml generators-* jobs" + }, + { + "category": "ci_cd", + "rule": "Always keep .nvmrc byte-identical to `nix develop --impure .#ci -c node -v`; CI fails the build job on mismatch and flake.nix enterShell rewrites .nvmrc from `node -v`.", + "source": ".github/workflows/ci.yaml Validate Node version file; flake.nix enterShell; AGENTS.md" + }, + { + "category": "git", + "rule": "tools/migrate/migrations/atlas.sum is append-only; pr-checks.yaml runs check_atlas_sum_append_only.py against the PR base SHA and migrate-check enforces non-linear=error, data_depend=error, incompatible=error (destructive allowed).", + "source": ".github/workflows/pr-checks.yaml; atlas.hcl lint; Makefile migrate-check" + }, + { + "category": "git", + "rule": "Every PR must carry a release-note label (one of release-note/ignore, kind/feature, release-note/feature, kind/bug, release-note/bug-fix, release-note/breaking-change); commit messages must follow Conventional Commits enforced by commitizen/prek (`prek run -a` and `prek run --stage manual` in CI).", + "source": ".github/workflows/pr-checks.yaml release-label; flake.nix git-hooks; .github/workflows/ci.yaml Validate commit messages" + }, + { + "category": "git", + "rule": "End commit messages with the `Co-Authored-By: Claude ...` trailer and PR bodies with the Claude Code generated line; branch off main before committing/pushing and only push when asked.", + "source": "system git instructions; AGENTS.md" + }, + { + "category": "distribution", + "rule": "Container images and Helm charts are tag-only releases pushed to ghcr.io (images ghcr.io/openmeterio/openmeter + benthos-collector multi-arch linux/amd64+arm64; charts to oci://ghcr.io/openmeterio/helm-charts) \u2014 release.yaml jobs gate on github.ref_type == 'tag'.", + "source": ".github/workflows/release.yaml; .github/workflows/artifacts.yaml; deploy/charts/openmeter/Chart.yaml" + }, + { + "category": "distribution", + "rule": "Release tags must match v[0-9]+.[0-9]+.[0-9]+ (optionally -dev.N / -beta.N); main pushes publish a per-commit npm beta (1.0.0-beta-, dist-tag beta) while tags publish latest.", + "source": ".github/workflows/release.yaml on.push.tags + sdk-javascript-meta" + }, + { + "category": "distribution", + "rule": "The npm @openmeter/sdk is published via OIDC Trusted Publishing (id-token: write, no token); the trusted publisher entry is keyed on the caller workflow file + the `prod` environment, so npm-release.yaml must be invoked from release.yaml and run on a GitHub-hosted runner with NPM_CONFIG_PROVENANCE=true.", + "source": ".github/workflows/npm-release.yaml" + }, + { + "category": "secrets", + "rule": "Provide release secrets via GitHub Actions: GITHUB_TOKEN (GHCR/helm push), POETRY_PYPI_TOKEN_PYPI from secrets.PYPI_TOKEN (PyPI), vars.DEPOT_PROJECT (Depot builds), vars.TEST_CLICKHOUSE_DSN (tests); SVIX_JWT_SECRET=DUMMY_JWT_SECRET is a non-sensitive dev value only.", + "source": ".github/workflows/release.yaml; .github/workflows/ci.yaml; Makefile SVIX_JWT_SECRET" + }, + { + "category": "secrets", + "rule": "Trufflehog secret scanning runs on PRs/pushes to main and fails on findings; never commit real secrets.", + "source": ".github/workflows/security.yaml secret-scanning" + }, + { + "category": "env_setup", + "rule": "Copy config.example.yaml to config.yaml (Make targets do this automatically) and `touch` it whenever config.example.yaml changes, or `make server`/worker targets abort with a diff warning.", + "source": "Makefile server target config.yaml freshness check; AGENTS.md Configuration" + }, + { + "category": "env_setup", + "rule": "Local Postgres DSN is postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable; start dependencies with `make up` (docker compose; profiles dev/redis/webhook control optional services) and stop with `make down`.", + "source": "atlas.hcl; docker-compose.yaml; Makefile up/down" + }, + { + "category": "env_setup", + "rule": "Load the repo environment with direnv (or `direnv exec . `); when direnv/ambient tools are missing, fall back to `nix develop --impure .#ci -c ...`. The Nix shell provides go/node/python/atlasx/golangci-lint/air/helm/benthos/sqlc/spectral/codegraph.", + "source": "AGENTS.md Configuration/Testing; flake.nix packages" + }, + { + "category": "ci_cd", + "rule": "The Go build/test in Docker and Depot CI uses CGO + musl static linking against librdkafka pinned to v2.14.1; redirect GOTMPDIR/TMPDIR to the workspace on Depot runners to avoid ENOSPC in /run.", + "source": "Dockerfile (-tags musl, -linkmode external -extldflags static); flake.nix rdkafka rev v2.14.1; .github/workflows/ci.yaml build/test" + }, + { + "category": "dependency_registry", + "rule": "Keep both Go modules tidy together: `go mod tidy` for the root and `go mod tidy -C collector` for the collector module (which replaces the parent via local replace ../); the collector pulls a large Benthos/Redpanda Connect dependency tree.", + "source": "Makefile mod; collector/go.mod replace directive" + }, + { + "category": "dependency_registry", + "rule": "Drop incidental go.sum additions (e.g. tablewriter) introduced by `make generate` or `atlas migrate diff` unless the task explicitly requires a dependency change.", + "source": "AGENTS.md Coding Conventions" + }, + { + "category": "ci_cd", + "rule": "The chi-middleware oapi-codegen template is patched: run `make patch-oapi-templates` (copies the vendored template and applies api/v3/templates/chi-middleware.tmpl.patch) before code generation, as `make generate` does automatically.", + "source": "Makefile patch-oapi-templates; .github/workflows/ci.yaml generators-go" + } + ], + "frontend": { + "framework": "none (generated TypeScript SDK only)", + "rendering_strategy": "", + "ui_components": [], + "state_management": { + "approach": "Not applicable \u2014 there is no application UI. The only client surface is the generated @openmeter/sdk npm package (api/client/javascript), an OpenAPI-derived API client. The optional React sub-export (api/client/javascript/src/react/context.tsx) provides only a context/provider/hook to inject an OpenMeter client instance; it holds no application state of its own.", + "global_state": [ + { + "store": "OpenMeterContext (api/client/javascript/src/react/context.tsx)", + "purpose": "React Context whose value is an OpenMeter portal client instance or null (unauthenticated). Created with createContext(null); OpenMeterProvider sets the value and useOpenMeter reads it, throwing only when the context is undefined (used outside a provider). This injects the SDK client; it does not manage any UI/application state." + } + ], + "server_state": "No client-side server-state library (no React Query/SWR/Apollo). Each SDK resource method calls openapi-fetch (this.client.GET/POST/PUT/DELETE/PATCH) and pipes the raw result through transformResponse (api/client/javascript/src/client/utils.ts), which throws HTTPError on resp.error or status >= 400 and recursively decodes ISO date strings to JS Date objects via decodeDates. Callers own any caching/state.", + "local_state": "Not applicable \u2014 no UI components with local state exist.", + "rationale": "OpenMeter is a Go backend/usage-metering platform with no first-party application UI (frontend_ratio = 0.0). The api/client/javascript package is a published API client (@openmeter/sdk), generated from the TypeSpec-derived OpenAPI spec (openapi-typescript + orval). React appears only as a devDependency (react 19.2.5) and a peerDependency (react >=18.0.0) to support the optional /react context export; it is not an application framework here." + }, + "routing": [], + "data_fetching": [ + { + "name": "OpenMeter admin client", + "mechanism": "Class-per-resource wrappers over openapi-fetch (api/client/javascript/src/client/index.ts). The root OpenMeter class creates a typed createClient with optional Bearer auth (Authorization: `Bearer ${apiKey}` when apiKey is set) and a querySerializer (array form/explode, object deepObject/explode) that runs encodeDates to serialize Date -> ISO string. It instantiates resource classes as public fields: addons, apps, billing, customers, debug, entitlementsV1, entitlements, events, features, info, meters, notifications, plans, portal, subjects, subscriptionAddons, subscriptions.", + "when_to_use": "Server-side / admin access to the full OpenMeter API using an API key.", + "examples": [ + "new OpenMeter({ baseUrl, apiKey }).meters.list()", + "openmeter.meters.query(idOrSlug, query) and openmeter.meters.queryPost(...) (api/client/javascript/src/client/meters.ts; queryPost at line 180 for queries exceeding URL length limits)", + "openmeter.events.ingest(...) sends Content-Type: application/cloudevents-batch+json (api/client/javascript/src/client/events.ts line 27)" + ] + }, + { + "name": "OpenMeter portal client", + "mechanism": "Separate minimal class (api/client/javascript/src/portal/index.ts) authenticated by a required portalToken (Authorization: `Bearer ${config.portalToken}`). Exposes exactly one method, query(meterSlug, query?, options?), hitting GET /api/v1/portal/meters/{meterSlug}/query with an explicit Accept: application/json header. Reuses encodeDates/transformResponse from ../client/utils.js. This client is what the React export injects.", + "when_to_use": "End-customer/browser-facing portal access scoped to a portal token; intentionally omits all admin endpoints (capability separation enforced at the type level).", + "examples": [ + "new OpenMeter({ baseUrl: 'https://openmeter.cloud', portalToken }).query('api-requests', { from, to, windowSize: 'DAY' })", + "Injected via OpenMeterProvider value={client} and read with useOpenMeter() (api/client/javascript/src/react/context.tsx)" + ] + }, + { + "name": "RequestOptions / AbortSignal threading", + "mechanism": "Every public SDK method accepts options?: RequestOptions (Pick from api/client/javascript/src/client/common.ts) and spreads ...options into the openapi-fetch call, propagating AbortSignal for cancellation.", + "when_to_use": "To cancel or otherwise control in-flight requests from a caller (e.g. component cleanup).", + "examples": [ + "openmeter.meters.list({ signal: abortController.signal })" + ] + } + ], + "styling": "Not applicable \u2014 no UI, no stylesheets, no component library, no design tokens. The api/client/javascript package uses Biome (biome.json) solely as its linter/formatter; it is not a styling system.", + "key_conventions": [ + "No application UI exists: OpenMeter is a Go usage-metering backend (frontend_ratio = 0.0). The only client-facing surface is the generated @openmeter/sdk npm package under api/client/javascript.", + "SDK is generated-first, wrapper-second: src/client/schemas.ts (openapi-typescript via scripts/generate.ts) and src/zod/index.ts (orval, per orval.config.ts) are generated from the OpenAPI spec and carry 'Do not edit manually' headers \u2014 never hand-edited.", + "Four named sub-package exports in package.json: '.' (admin client -> dist/index.js), './portal' (portal-token client), './react' (React context/provider/hook), './zod' (orval-generated Zod schemas). New resource classes are registered as public fields on the root OpenMeter class in src/client/index.ts.", + "One file per domain resource under src/client/ (addons.ts, apps.ts, billing.ts, customers.ts, events.ts, meters.ts, notifications.ts, plans.ts, subscriptions.ts, etc.); each exports a class taking Client and returning transformResponse(resp) \u2014 callers never read resp.data directly.", + "Centralized date handling (api/client/javascript/src/client/utils.ts): encodeDates (Date -> ISO string) is applied in the querySerializer; decodeDates (ISO string -> Date, matched by ISODateFormat regex) runs inside transformResponse.", + "Error handling: transformResponse throws HTTPError (api/client/javascript/src/client/common.ts) on resp.error or HTTP status >= 400; HTTPError.fromResponse extracts problem.detail/type/title/status when Content-Type is application/problem+json (RFC 7807); isHTTPError is the type guard.", + "React integration (src/react/context.tsx) is the only .tsx file; it carries the 'use client' directive (first line) for Next.js App Router compatibility, re-exports the portal surface wholesale (export * from '../portal/index.js'), and provides only Context plumbing (OpenMeterContext / OpenMeterProvider / useOpenMeter) \u2014 no rendered UI.", + "Tooling: pnpm package manager (pinned in package.json), dual ESM/CJS build via @knighted/duel, Node >= 22 engine, Vitest tests colocated as *.spec.ts (e.g. src/client/events.spec.ts) using @fetch-mock/vitest. Published library supports React >=18 via peerDependency.", + "The quickstart/ directory is a Go + docker-compose deployment example (quickstart/quickstart_test.go, docker-compose.yaml, config.yaml), not a web UI." + ] + }, + "data_overview": "OpenMeter persists its control-plane state in PostgreSQL via the Ent ORM (~70 tables across customer, entitlement/credit, productcatalog, subscription, billing, charges, ledger, notification, and app domains; source of truth is openmeter/ent/schema/*.go, Atlas migrations under tools/migrate/migrations/). Raw usage events live in ClickHouse (per-namespace om__events MergeTree table) and flow there through per-namespace Kafka ingest topics consumed by the sink-worker; Redis backs event deduplication and async query progress tracking. Almost every Postgres table is multi-tenant (namespace-scoped), uses ULID char(26) ids, and soft-deletes via deleted_at.", + "data_models": [ + { + "name": "Customer", + "description": "A billable end-customer; carries billing address snapshot fields and an optional currency, and fans out to subscriptions, entitlements, charges and billing overrides (see openmeter/ent/schema/customer.go:16).", + "location": "openmeter/ent/schema/customer.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/customer", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "billing_address_country", + "type": "char(2)" + }, + { + "name": "billing_address_postal_code", + "type": "TEXT" + }, + { + "name": "billing_address_state", + "type": "TEXT" + }, + { + "name": "billing_address_city", + "type": "TEXT" + }, + { + "name": "billing_address_line1", + "type": "TEXT" + }, + { + "name": "billing_address_line2", + "type": "TEXT" + }, + { + "name": "billing_address_phone_number", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT", + "description": "External-facing stable customer key; stored as empty string (not NULL) when unset so a unique index can be applied (see openmeter/ent/schema/customer.go:33)." + }, + { + "name": "primary_email", + "type": "TEXT" + }, + { + "name": "currency", + "type": "char(3)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:58)", + "INDEX(name), INDEX(primary_email), INDEX(created_at)", + "soft_delete (deleted_at)", + "audit (created_at, updated_at)", + "FK apps/subjects/billing_customer_override \u2192 ON DELETE CASCADE (see openmeter/ent/schema/customer.go:73)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Add the column to Customer.Fields() in openmeter/ent/schema/customer.go, run `make generate`, then `atlas migrate --env local diff ` to emit the SQL under tools/migrate/migrations/.", + "example": "field.String(\"key\").Optional()," + }, + "how_to_modify": { + "prose": "Never edit historical migrations; add a new ent field/index and generate a new migration. The committed v3 list-filter TODO in customer.go warns to add pg_trgm GIN indexes via a custom SQL migration before exposing ILIKE contains filters.", + "example": "" + }, + "how_to_read": { + "prose": "Through the customer adapter/service; the schema notes the v3 list API exposes case-insensitive contains filters compiling to ILIKE.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CustomerSubjects", + "description": "Join table linking a Customer to one or more subject keys (the metering identity); FK to Subject.key is intentionally absent because Ent cannot FK non-ID fields (see openmeter/ent/schema/customer.go:147).", + "location": "openmeter/ent/schema/customer.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/customer", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "subject_key", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "UNIQUE(namespace, subject_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:123)", + "FK customer_id \u2192 customers.id ON DELETE CASCADE", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit CustomerSubjects in customer.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Subject", + "description": "The metered identity (e.g. a user/account key) that events are attributed to; carries optional stripe_customer_id and free-form metadata (see openmeter/ent/schema/subject.go:13).", + "location": "openmeter/ent/schema/subject.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subject", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "display_name", + "type": "TEXT" + }, + { + "name": "stripe_customer_id", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/subject.go:45)", + "UNIQUE(namespace, id)", + "INDEX(display_name), INDEX(created_at, id)", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Subject.Fields() in subject.go, regenerate and diff a migration.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Meter", + "description": "Definition of how to aggregate raw usage events (event_type + aggregation + optional value_property/group_by) into a metered value; event_from bounds which events count (see openmeter/ent/schema/meter.go:14).", + "location": "openmeter/ent/schema/meter.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/meter", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "event_type", + "type": "TEXT", + "description": "CloudEvents `type` value this meter filters on when scanning the ClickHouse events table (see openmeter/ent/schema/meter.go:30)." + }, + { + "name": "value_property", + "type": "TEXT", + "description": "JSONPath into the event data extracting the numeric value; optional for COUNT aggregation (see openmeter/ent/schema/meter.go:32)." + }, + { + "name": "group_by", + "type": "jsonb" + }, + { + "name": "aggregation", + "type": "enum" + }, + { + "name": "event_from", + "type": "TIMESTAMPTZ", + "description": "If set, only events at/after this time are included in the meter (see openmeter/ent/schema/meter.go:36)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/meter.go:43)", + "INDEX(namespace, event_type)", + "soft_delete (deleted_at)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Meter.Fields() and regenerate. Meters are the bridge between Postgres definitions and the ClickHouse om__events table queried by openmeter/streaming/clickhouse/meter_query.go.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Meter aggregation queries run against ClickHouse via the streaming connector, not Postgres.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Feature", + "description": "A purchasable/grantable capability tied to a meter; holds unit-cost configuration (manual amount or LLM-provider/model/token pricing) and is archived via archived_at rather than deleted (see openmeter/ent/schema/feature.go:17).", + "location": "openmeter/ent/schema/feature.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog/feature", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "meter_slug", + "type": "TEXT", + "description": "Deprecated meter reference by slug; to be removed in Phase 2 in favor of meter_id (see openmeter/ent/schema/feature.go:35)." + }, + { + "name": "meter_id", + "type": "TEXT" + }, + { + "name": "meter_group_by_filters", + "type": "jsonb" + }, + { + "name": "advanced_meter_group_by_filters", + "type": "jsonb" + }, + { + "name": "unit_cost_type", + "type": "TEXT" + }, + { + "name": "unit_cost_manual_amount", + "type": "numeric" + }, + { + "name": "unit_cost_llm_provider_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_provider", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_model_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_model", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_token_type_property", + "type": "TEXT" + }, + { + "name": "unit_cost_llm_token_type", + "type": "TEXT" + }, + { + "name": "archived_at", + "type": "TIMESTAMPTZ", + "description": "Soft-archive timestamp; features are uniqueness-scoped to archived_at IS NULL rather than deleted_at (see openmeter/ent/schema/feature.go:67)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE archived_at IS NULL (see openmeter/ent/schema/feature.go:66)", + "CHECK unit_cost_llm_{provider,model,token_type} property vs literal mutually exclusive (see openmeter/ent/schema/feature.go:55)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Feature.Fields() and Annotations() (for CHECK constraints) in feature.go, regenerate, diff a migration.", + "example": "entsql.Checks(map[string]string{\n \"unit_cost_llm_provider_mutual_exclusive\": \"NOT (unit_cost_llm_provider_property IS NOT NULL AND unit_cost_llm_provider IS NOT NULL)\",\n})" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Entitlement", + "description": "A customer's right to consume a feature (metered, boolean, or static); anchors usage periods and links to grants, usage resets and balance snapshots (see openmeter/ent/schema/entitlement.go:20).", + "location": "openmeter/ent/schema/entitlement.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/entitlement", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "entitlement_type", + "type": "enum" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "feature_key", + "type": "TEXT", + "description": "Validated to reject valid ULIDs so feature keys never collide with ids (see openmeter/ent/schema/entitlement.go:41)." + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "measure_usage_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "issue_after_reset", + "type": "FLOAT" + }, + { + "name": "issue_after_reset_priority", + "type": "uint8" + }, + { + "name": "is_soft_limit", + "type": "BOOL" + }, + { + "name": "preserve_overage_at_reset", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb" + }, + { + "name": "usage_period_interval", + "type": "TEXT", + "description": "ISO8601 duration string defining the recurring usage period (see openmeter/ent/schema/entitlement.go:61)." + }, + { + "name": "usage_period_anchor", + "type": "TIMESTAMPTZ", + "description": "Original anchor time; no longer overwritten on reset \u2014 the effective anchor is derived from the last UsageReset queried dynamically (see openmeter/ent/schema/entitlement.go:62)." + }, + { + "name": "current_usage_period_start", + "type": "TIMESTAMPTZ", + "description": "Denormalized current-period start; schema TODO marks it for removal in favor of calculation (see openmeter/ent/schema/entitlement.go:63)." + }, + { + "name": "current_usage_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(created_at, id) (see openmeter/ent/schema/entitlement.go:85)", + "INDEX(current_usage_period_end, deleted_at) \u2014 used to collect entitlements with due resets (see openmeter/ent/schema/entitlement.go:84)", + "FK feature_id \u2192 features.id, FK customer_id \u2192 customers.id", + "child usage_reset/grant/balance_snapshot ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Entitlement.Fields() in entitlement.go and regenerate; many fields are Immutable and Nillable. The current_usage_period_* columns are slated for removal in favor of dynamic computation.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Grant", + "description": "A credit grant against an entitlement (owner_id) with amount, priority, expiration and recurrence; voided_at soft-voids it (see openmeter/ent/schema/grant.go:15).", + "location": "openmeter/ent/schema/grant.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/credit/grant", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "owner_id", + "type": "char(26)", + "description": "Entitlement id this grant belongs to (FK to entitlements via the grant edge) (see openmeter/ent/schema/grant.go:67)." + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "priority", + "type": "uint8" + }, + { + "name": "effective_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "expiration", + "type": "jsonb" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "voided_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "reset_max_rollover", + "type": "numeric" + }, + { + "name": "reset_min_rollover", + "type": "numeric" + }, + { + "name": "recurrence_period", + "type": "TEXT" + }, + { + "name": "recurrence_anchor", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, owner_id), INDEX(effective_at, expires_at)", + "FK owner_id \u2192 entitlements.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Grant.Fields() in grant.go, regenerate, diff migration.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BalanceSnapshot", + "description": "Cached point-in-time credit balance for an entitlement owner (grant_balances + usage + overage at a timestamp), used to avoid recomputing the full ledger from scratch (see openmeter/ent/schema/balance_snapshot.go:15).", + "location": "openmeter/ent/schema/balance_snapshot.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/credit/balance", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "owner_id", + "type": "char(26)" + }, + { + "name": "grant_balances", + "type": "jsonb" + }, + { + "name": "usage", + "type": "jsonb" + }, + { + "name": "balance", + "type": "numeric" + }, + { + "name": "overage", + "type": "numeric" + }, + { + "name": "at", + "type": "TIMESTAMPTZ", + "description": "The instant this balance was snapshotted; queried as the high-water mark for resuming balance computation (see openmeter/ent/schema/balance_snapshot.go:43)." + } + ], + "guarantees": [ + "INDEX(namespace, owner_id, at) WHERE deleted_at IS NULL (see openmeter/ent/schema/balance_snapshot.go:49)", + "FK owner_id \u2192 entitlements.id ON DELETE CASCADE", + "all value fields Immutable" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BalanceSnapshot.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "UsageReset", + "description": "Records an entitlement usage-period reset event (reset_time + anchor + interval); the entitlement's effective anchor is derived from the latest reset rather than from the entitlement row (see openmeter/ent/schema/usage_reset.go:14).", + "location": "openmeter/ent/schema/usage_reset.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/entitlement", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "entitlement_id", + "type": "char(26)" + }, + { + "name": "reset_time", + "type": "TIMESTAMPTZ" + }, + { + "name": "anchor", + "type": "TIMESTAMPTZ" + }, + { + "name": "usage_period_interval", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, entitlement_id, reset_time)", + "FK entitlement_id \u2192 entitlements.id ON DELETE CASCADE", + "all fields Immutable" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit UsageReset.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Plan", + "description": "A versioned product-catalog plan (key + version) with default billing cadence, pro-rating config, settlement mode and effective window; phases hang off it (see openmeter/ent/schema/productcatalog.go:16).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "version", + "type": "INT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "pro_rating_config", + "type": "jsonb" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum", + "description": "Defaults to credit-then-invoice settlement (see openmeter/ent/schema/productcatalog.go:57)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:78)", + "version >= 1", + "phases/addons ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Plan.Fields() in productcatalog.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanPhase", + "description": "An ordered phase within a Plan (index + optional duration) that groups ratecards (see openmeter/ent/schema/productcatalog.go:86).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "index", + "type": "uint8" + }, + { + "name": "duration", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(plan_id, key) WHERE deleted_at IS NULL", + "UNIQUE(plan_id, index) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:133)", + "ratecards ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit PlanPhase.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanRateCard", + "description": "A ratecard within a plan phase (shared RateCard mixin: type, price, entitlement_template, discounts, tax) referencing an optional feature (see openmeter/ent/schema/productcatalog.go:141).", + "location": "openmeter/ent/schema/productcatalog.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "entitlement_template", + "type": "jsonb" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "phase_id", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(phase_id, key) WHERE deleted_at IS NULL", + "UNIQUE(phase_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:193)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "RateCard fields come from the shared RateCard mixin in ratecard.go; phase_id/feature_id are added in PlanRateCard.Fields(). Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Addon", + "description": "A versioned add-on product (single or multi instance) that can be attached to plans and subscriptions; annotations are GIN-indexed (see openmeter/ent/schema/addon.go:16).", + "location": "openmeter/ent/schema/addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "version", + "type": "INT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "instance_type", + "type": "enum" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:72)", + "GIN INDEX(annotations)", + "ratecards/plans/subscription_addons ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Addon.Fields() in addon.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AddonRateCard", + "description": "RateCard belonging to an Addon (same RateCard mixin shape as PlanRateCard) (see openmeter/ent/schema/addon.go:87).", + "location": "openmeter/ent/schema/addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(addon_id, key) WHERE deleted_at IS NULL", + "UNIQUE(addon_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:139)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit AddonRateCard.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "PlanAddon", + "description": "Join table declaring which Addon is available for a Plan, from which phase and up to what quantity (see openmeter/ent/schema/planaddon.go:13).", + "location": "openmeter/ent/schema/planaddon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/productcatalog", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "from_plan_phase", + "type": "TEXT" + }, + { + "name": "max_quantity", + "type": "INT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, plan_id, addon_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/planaddon.go:65)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit PlanAddon.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Subscription", + "description": "An active customer subscription instance with cadenced active window, currency, billing anchor/cadence, pro-rating and settlement mode; root of phases/items and billing/charge edges (see openmeter/ent/schema/subscription.go:18).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "plan_id", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "TEXT" + }, + { + "name": "currency", + "type": "char(3)" + }, + { + "name": "billing_anchor", + "type": "TIMESTAMPTZ" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "pro_rating_config", + "type": "jsonb" + }, + { + "name": "settlement_mode", + "type": "enum" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, customer_id)", + "FK customer_id \u2192 customers.id (required, immutable)", + "phases/addons/billing_sync_state ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Subscription.Fields() in subscription.go and regenerate. Subscription is cadenced (active_from/active_to via CadencedMixin).", + "example": "" + }, + "how_to_modify": { + "prose": "See the /subscription skill for the sync algorithm; subscription edits drive billing/charge reconciliation.", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionPhase", + "description": "A time-bounded phase of a subscription; sort_hint disambiguates phases that share an active_from (zero-length phases) (see openmeter/ent/schema/subscription.go:95).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "subscription_id", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "sort_hint", + "type": "uint8", + "description": "Tie-breaker for ordering phases with equal active_from (see openmeter/ent/schema/subscription.go:115)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, subscription_id, key)", + "FK subscription_id \u2192 subscriptions.id ON DELETE CASCADE", + "items ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionPhase.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionItem", + "description": "A ratecard-instance inside a phase carrying its own mutable cadence and effective price/entitlement/discount config; active_*_override_relative_to_phase_start preserves intended cadence across edits/cancels (see openmeter/ent/schema/subscription.go:141).", + "location": "openmeter/ent/schema/subscription.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "phase_id", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "entitlement_id", + "type": "TEXT" + }, + { + "name": "restarts_billing_period", + "type": "BOOL" + }, + { + "name": "active_from_override_relative_to_phase_start", + "type": "TEXT", + "description": "ISO duration offset from phase start preserving the intended item cadence across edits/cancels (see openmeter/ent/schema/subscription.go:173)." + }, + { + "name": "active_to_override_relative_to_phase_start", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "entitlement_template", + "type": "jsonb" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "billing_cadence", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "discounts", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, phase_id, key)", + "FK phase_id \u2192 subscription_phases.id, FK entitlement_id \u2192 entitlements.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionItem.Fields() and regenerate. Note items are intentionally NOT cadenced via CadencedMixin because their cadence is mutable.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionAddon", + "description": "An instantiated addon attached to a subscription; quantity history lives in SubscriptionAddonQuantity (see openmeter/ent/schema/subscription_addon.go:14).", + "location": "openmeter/ent/schema/subscription_addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "addon_id", + "type": "TEXT" + }, + { + "name": "subscription_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "FK subscription_id \u2192 subscriptions.id (required), FK addon_id \u2192 addons.id (required)", + "quantities ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionAddon.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionAddonQuantity", + "description": "Append-only quantity-over-time records for a SubscriptionAddon (active_from + immutable quantity) (see openmeter/ent/schema/subscription_addon.go:56).", + "location": "openmeter/ent/schema/subscription_addon.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/subscription", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "active_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "quantity", + "type": "INT" + }, + { + "name": "subscription_addon_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "quantity >= 0, immutable", + "FK subscription_addon_id \u2192 subscription_addons.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionAddonQuantity.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "SubscriptionBillingSyncState", + "description": "Per-subscription bookkeeping for the billing sync bridge: whether it has billables, when it was last synced, and when the next sync is due (see openmeter/ent/schema/subscriptionbillingsync.go:13).", + "location": "openmeter/ent/schema/subscriptionbillingsync.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/worker/subscriptionsync", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "subscription_id", + "type": "char(26)" + }, + { + "name": "has_billables", + "type": "BOOL" + }, + { + "name": "synced_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "next_sync_after", + "type": "TIMESTAMPTZ", + "description": "Schedules the next reconciliation pass; NULL means no pending re-sync (see openmeter/ent/schema/subscriptionbillingsync.go:28)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, subscription_id) (see openmeter/ent/schema/subscriptionbillingsync.go:41)", + "FK subscription_id \u2192 subscriptions.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit SubscriptionBillingSyncState.Fields() and regenerate. This table has no TimeMixin (no created/updated/deleted_at).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingProfile", + "description": "A billing configuration tying supplier identity + tax/invoicing/payment apps + workflow config; one default per namespace (see openmeter/ent/schema/billing.go:28).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "supplier_address_*", + "type": "TEXT" + }, + { + "name": "tax_app_id", + "type": "char(26)" + }, + { + "name": "invoicing_app_id", + "type": "char(26)" + }, + { + "name": "payment_app_id", + "type": "char(26)" + }, + { + "name": "workflow_config_id", + "type": "TEXT" + }, + { + "name": "default", + "type": "BOOL" + }, + { + "name": "supplier_name", + "type": "TEXT" + }, + { + "name": "supplier_tax_code", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, default) WHERE \"default\" AND deleted_at IS NULL \u2014 at most one default profile per namespace (see openmeter/ent/schema/billing.go:102)", + "FK tax_app/invoicing_app/payment_app \u2192 apps.id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingProfile.Fields() in billing.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingWorkflowConfig", + "description": "Cloneable invoicing workflow settings (collection alignment, draft/due periods, auto-advance, progressive billing, tax enable/enforce) referenced by profiles, overrides and invoices (see openmeter/ent/schema/billing.go:110).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "collection_alignment", + "type": "enum" + }, + { + "name": "anchored_alignment_detail", + "type": "jsonb" + }, + { + "name": "line_collection_period", + "type": "TEXT" + }, + { + "name": "invoice_auto_advance", + "type": "BOOL" + }, + { + "name": "invoice_draft_period", + "type": "TEXT" + }, + { + "name": "invoice_due_after", + "type": "TEXT" + }, + { + "name": "invoice_collection_method", + "type": "enum" + }, + { + "name": "invoice_progressive_billing", + "type": "BOOL" + }, + { + "name": "invoice_default_tax_settings", + "type": "jsonb" + }, + { + "name": "tax_enabled", + "type": "BOOL" + }, + { + "name": "tax_enforced", + "type": "BOOL" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingWorkflowConfig.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingCustomerOverride", + "description": "Per-customer overrides of billing profile / workflow settings (one per customer); NULL override fields fall back to the profile (see openmeter/ent/schema/billing.go:178).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "billing_profile_id", + "type": "char(26)" + }, + { + "name": "collection_alignment", + "type": "enum" + }, + { + "name": "anchored_alignment_detail", + "type": "jsonb" + }, + { + "name": "line_collection_period", + "type": "TEXT" + }, + { + "name": "invoice_auto_advance", + "type": "BOOL" + }, + { + "name": "invoice_draft_period", + "type": "TEXT" + }, + { + "name": "invoice_due_after", + "type": "TEXT" + }, + { + "name": "invoice_collection_method", + "type": "enum" + }, + { + "name": "invoice_progressive_billing", + "type": "BOOL" + }, + { + "name": "invoice_default_tax_config", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:258)", + "FK customer_id \u2192 customers.id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingCustomerOverride.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoice", + "description": "An invoice in gathering or standard state, snapshotting customer/supplier identity, addresses, cloned profile settings and lifecycle timestamps; status_details_cache is GIN-indexed and collection_at has dual gathering/standard semantics (see openmeter/ent/schema/billing.go:1018).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "supplier_name", + "type": "TEXT" + }, + { + "name": "supplier_tax_code", + "type": "TEXT" + }, + { + "name": "customer_key", + "type": "TEXT" + }, + { + "name": "customer_name", + "type": "TEXT" + }, + { + "name": "customer_usage_attribution", + "type": "jsonb" + }, + { + "name": "number", + "type": "TEXT" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "source_billing_profile_id", + "type": "char(26)" + }, + { + "name": "voided_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "issued_at", + "type": "TIMESTAMPTZ", + "description": "Can be in the future for pre-issued invoices (see openmeter/ent/schema/billing.go:1087)." + }, + { + "name": "sent_to_customer_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "draft_until", + "type": "TIMESTAMPTZ" + }, + { + "name": "quantity_snapshoted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "due_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "status", + "type": "enum" + }, + { + "name": "status_details_cache", + "type": "jsonb" + }, + { + "name": "workflow_config_id", + "type": "char(26)" + }, + { + "name": "tax_app_id", + "type": "char(26)" + }, + { + "name": "invoicing_app_id", + "type": "char(26)" + }, + { + "name": "payment_app_id", + "type": "char(26)" + }, + { + "name": "period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "collection_at", + "type": "TIMESTAMPTZ", + "description": "Dual purpose: on gathering invoices defines when pending lines collect into a draft; on standard invoices the post-creation collection/snapshot cutoff for metered lines (see openmeter/ent/schema/billing.go:1154)." + }, + { + "name": "payment_processing_entered_at", + "type": "TIMESTAMPTZ", + "description": "When the invoice first entered payment-processing; used for staleness/fraud guarding (see openmeter/ent/schema/billing.go:1164)." + }, + { + "name": "schema_level", + "type": "INT", + "description": "Write schema version used during the in-progress invoice-line migration (see openmeter/ent/schema/billing.go:1170)." + }, + { + "name": "supplier_address_*", + "type": "TEXT" + }, + { + "name": "customer_address_*", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id, currency) WHERE deleted_at IS NULL AND status = 'gathering' \u2014 one gathering invoice per customer+currency (see openmeter/ent/schema/billing.go:1193)", + "GIN INDEX(status_details_cache)", + "INDEX(namespace, status), INDEX(namespace, issued_at)", + "FK source_billing_profile_id immutable (profile change forces void)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingInvoice.Fields() in billing.go and regenerate. Invoice has supplier AND customer address mixins (two CustomerAddressMixin prefixes).", + "example": "" + }, + "how_to_modify": { + "prose": "See the /billing skill for the invoice state machine.", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLine", + "description": "The primary invoice line table (flat-fee or usage-based) carrying service/billing period, managed_by, parent_line hierarchy, subscription+charge linkage and totals; intended to eventually absorb the ubp line config (see openmeter/ent/schema/billing.go:303).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name/description/metadata/annotations", + "type": "TEXT/jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "tax_config", + "type": "jsonb" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "managed_by", + "type": "enum" + }, + { + "name": "parent_line_id", + "type": "char(26)" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "override_collection_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "status", + "type": "enum" + }, + { + "name": "quantity", + "type": "numeric", + "description": "Optional; for usage-based billing it is only persisted when the invoice is issued (see openmeter/ent/schema/billing.go:352)." + }, + { + "name": "ratecard_discounts", + "type": "jsonb" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT", + "description": "Stable key per parent line for upserting/identifying lines created for the same reason (e.g. tiered price tier) across invoices (see openmeter/ent/schema/billing.go:370)." + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "subscription_billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "split_line_group_id", + "type": "char(26)" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "engine", + "type": "enum" + }, + { + "name": "line_ids", + "type": "char(26)", + "description": "Deprecated: invoice discounts moved to line_discounts (see openmeter/ent/schema/billing.go:416)." + }, + { + "name": "credits_applied", + "type": "jsonb" + }, + { + "name": "amount/totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:440)", + "FK invoice_id \u2192 billing_invoices.id (required)", + "detailed_lines/discount children ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit BillingInvoiceLine.Fields() in billing.go and regenerate. This table aggregates several mixins (Annotations, Resource, InvoiceLineBase, Tax, totals, externalid.Line).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceFlatFeeLineConfig", + "description": "Per-unit amount + category + payment term config for a flat-fee invoice line (see openmeter/ent/schema/billing.go:511).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "per_unit_amount", + "type": "numeric" + }, + { + "name": "category", + "type": "enum" + }, + { + "name": "payment_term", + "type": "enum" + }, + { + "name": "index", + "type": "INT", + "description": "Sort order, only meaningful for detailed lines (see openmeter/ent/schema/billing.go:534)." + } + ], + "guarantees": [ + "PK id" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceUsageBasedLineConfig", + "description": "Usage-based line config: price type, feature key, price JSON and pre-line/metered quantities (see openmeter/ent/schema/billing.go:541).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "price_type", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "metered_pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "metered_quantity", + "type": "numeric" + } + ], + "guarantees": [ + "PK id" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceSplitLineGroup", + "description": "Groups invoice lines that result from splitting a single usage-based service period across progressive-billing invoices; tax fields are deprecated here (see openmeter/ent/schema/billing.go:611).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "tax_config", + "type": "jsonb", + "description": "Deprecated: split groups no longer carry tax config (see openmeter/ent/schema/billing.go:631)." + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "enum" + }, + { + "name": "service_period_start", + "type": "TIMESTAMPTZ" + }, + { + "name": "service_period_end", + "type": "TIMESTAMPTZ" + }, + { + "name": "unique_reference_id", + "type": "TEXT" + }, + { + "name": "ratecard_discounts", + "type": "jsonb" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "subscription_billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "charge_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:717)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLineDiscount", + "description": "Amount discount applied to an invoice line (reason + amount + rounding); several quantity fields are deprecated after splitting amount vs usage discount tables (see openmeter/ent/schema/billing.go:755).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "rounding_amount", + "type": "numeric" + }, + { + "name": "source_discount", + "type": "jsonb" + }, + { + "name": "type", + "type": "TEXT", + "description": "Deprecated after splitting amount/usage discount tables (see openmeter/ent/schema/billing.go:793)." + }, + { + "name": "quantity", + "type": "numeric" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:820)", + "FK line_id \u2192 billing_invoice_lines.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceLineUsageDiscount", + "description": "Usage (quantity) discount applied to a usage-based invoice line (see openmeter/ent/schema/billing.go:838).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "quantity", + "type": "numeric" + }, + { + "name": "pre_line_period_quantity", + "type": "numeric" + }, + { + "name": "reason_details", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL", + "FK line_id \u2192 billing_invoice_lines.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingStandardInvoiceDetailedLine", + "description": "Detailed (child) line of a standard invoice produced by the v2 line model, linked to a parent BillingInvoiceLine (see openmeter/ent/schema/billing.go:898).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "parent_line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/billing.go:926)", + "FK invoice_id, parent_line_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Fields come mostly from stddetailedline.Mixin. Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingStandardInvoiceDetailedLineAmountDiscount", + "description": "Amount discount on a standard-invoice detailed line (see openmeter/ent/schema/billing.go:956).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id", + "type": "TEXT" + }, + { + "name": "reason", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "rounding_amount", + "type": "numeric" + }, + { + "name": "source_discount", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:996)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceValidationIssue", + "description": "A validation issue attached to an invoice, deduped per invoice via a 32-byte dedupe_hash (see openmeter/ent/schema/billing.go:1249).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "severity", + "type": "enum" + }, + { + "name": "code", + "type": "TEXT" + }, + { + "name": "message", + "type": "TEXT" + }, + { + "name": "path", + "type": "TEXT" + }, + { + "name": "component", + "type": "TEXT" + }, + { + "name": "dedupe_hash", + "type": "bytea(32)", + "description": "32-byte hash that dedupes identical issues per invoice via the unique index (see openmeter/ent/schema/billing.go:1286)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, invoice_id, dedupe_hash) (see openmeter/ent/schema/billing.go:1294)", + "FK invoice_id \u2192 billing_invoices.id ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingSequenceNumbers", + "description": "Monotonic counter per (namespace, scope) for generating invoice numbers (see openmeter/ent/schema/billing.go:1308).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "scope", + "type": "TEXT" + }, + { + "name": "last", + "type": "numeric" + } + ], + "guarantees": [ + "UNIQUE(namespace, scope) (see openmeter/ent/schema/billing.go:1330)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. No id/audit columns \u2014 keyed by (namespace, scope).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingCustomerLock", + "description": "Row used as a per-customer advisory lock during billing mutations (one row per customer) (see openmeter/ent/schema/billing.go:1334).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:1356)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Locked via SELECT ... FOR UPDATE during billing mutations.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "BillingInvoiceWriteSchemaLevel", + "description": "Temporary single-row-keyed table tracking the active write schema level for billing invoices during the line-model migration (see openmeter/ent/schema/billing.go:1363).", + "location": "openmeter/ent/schema/billing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing", + "fields": [ + { + "name": "id", + "type": "TEXT" + }, + { + "name": "schema_level", + "type": "INT" + } + ], + "guarantees": [ + "PK id (UNIQUE)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Temporary migration table; no mixins. Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Charge", + "description": "Polymorphic parent row for a billable charge; exactly one of the three per-type FK columns (flat_fee/credit_purchase/usage_based) points to the subtype, with unique_reference_id for idempotent creation (see openmeter/ent/schema/charges.go:96).", + "location": "openmeter/ent/schema/charges.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges", + "fields": [ + { + "name": "id", + "type": "char(26) ULID" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "unique_reference_id", + "type": "TEXT", + "description": "Idempotency key for a charge; uniqueness is enforced only when set and not deleted (see openmeter/ent/schema/charges.go:116)." + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "charge_flat_fee_id", + "type": "TEXT" + }, + { + "name": "charge_credit_purchase_id", + "type": "TEXT" + }, + { + "name": "charge_usage_based_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/charges.go:167)", + "exactly one of the three subtype FK columns is set" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit Charge.Fields() in charges.go and regenerate. See the /charges skill for charge creation and advancement.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "The ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables) provides a unified read surface (see openmeter/ent/schema/charges.go:48).", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargesSearchV1", + "description": "Postgres VIEW UNION-ALLing charge_credit_purchases, charge_flat_fees and charge_usage_based into a unified searchable charge-meta surface; declared as ent.View with no mixins (see openmeter/ent/schema/charges.go:48).", + "location": "openmeter/ent/schema/charges.go", + "kind": "value_object", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/meta", + "fields": [ + { + "name": "type", + "type": "enum" + }, + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "status", + "type": "TEXT" + }, + { + "name": "unique_reference_id", + "type": "TEXT" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "managed_by", + "type": "TEXT" + }, + { + "name": "subscription_id/subscription_phase_id/subscription_item_id", + "type": "TEXT" + }, + { + "name": "advance_after", + "type": "TIMESTAMPTZ" + }, + { + "name": "service_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "billing_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "tax_code_id", + "type": "char(26)" + }, + { + "name": "tax_behavior", + "type": "TEXT" + } + ], + "guarantees": [ + "read-only view; per AGENTS.md ent.View DDL may need explicit SQL migration (not in migrate.Tables)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Modify buildChargesSearchV1TableSelector / chargesSearchV1Columns in charges.go. Per the AGENTS.md ent.View caveat, view DDL may need a hand-written SQL migration since views don't appear in generated migrate.Tables.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeFlatFee", + "description": "Flat-fee charge subtype: payment term, pro-rating, pre/post-proration amounts, settlement and detailed status; has realization runs (see openmeter/ent/schema/chargesflatfee.go:23).", + "location": "openmeter/ent/schema/chargesflatfee.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/flatfee", + "fields": [ + { + "name": "id (chargemeta.Mixin)", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "payment_term", + "type": "TEXT" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "pro_rating", + "type": "enum" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "amount_before_proration", + "type": "numeric" + }, + { + "name": "amount_after_proration", + "type": "numeric" + }, + { + "name": "current_realization_run_id", + "type": "char(26)" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "tax_code FK ON DELETE SET NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeFlatFee.Fields() in chargesflatfee.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeFlatFeeRun", + "description": "A realization run for a flat-fee charge over a service period, producing detailed lines / payment / invoiced-usage and linking to invoice lines (see openmeter/ent/schema/chargesflatfee.go:141).", + "location": "openmeter/ent/schema/chargesflatfee.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/flatfee", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "initial_type", + "type": "enum" + }, + { + "name": "service_period_from/to", + "type": "TIMESTAMPTZ" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "amount_after_proration", + "type": "numeric" + }, + { + "name": "no_fiat_transaction_required", + "type": "BOOL" + }, + { + "name": "immutable", + "type": "BOOL" + }, + { + "name": "totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, charge_id)", + "line_id/invoice_id FK ON DELETE SET NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeFlatFeeRun.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBased", + "description": "Usage-based charge subtype tied to a feature with rating engine, price JSON and realization runs; table explicitly named charge_usage_based (see openmeter/ent/schema/chargesusagebased.go:24).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "invoice_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "settlement_mode", + "type": "enum" + }, + { + "name": "discounts", + "type": "jsonb" + }, + { + "name": "feature_key", + "type": "TEXT" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "rating_engine", + "type": "enum" + }, + { + "name": "price", + "type": "jsonb" + }, + { + "name": "current_realization_run_id", + "type": "char(26)" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "FK feature_id \u2192 features.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeUsageBased.Fields() in chargesusagebased.go and regenerate. Note Annotations() forces table name to charge_usage_based.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBasedRuns", + "description": "A realization run for a usage-based charge; stored_at_lt is the late-arriving-event cutoff and metered_quantity the measured usage for the period (see openmeter/ent/schema/chargesusagebased.go:143).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "feature_id", + "type": "char(26)" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "initial_type", + "type": "enum" + }, + { + "name": "stored_at_lt", + "type": "TIMESTAMPTZ", + "description": "Upper bound on event stored_at included in this run, implementing the late-arriving usage cutoff (see openmeter/ent/schema/chargesusagebased.go:179)." + }, + { + "name": "service_period_to", + "type": "TIMESTAMPTZ" + }, + { + "name": "detailed_lines_present", + "type": "BOOL" + }, + { + "name": "line_id", + "type": "char(26)" + }, + { + "name": "invoice_id", + "type": "char(26)" + }, + { + "name": "metered_quantity", + "type": "numeric" + }, + { + "name": "no_fiat_transaction_required", + "type": "BOOL" + }, + { + "name": "totals fields", + "type": "numeric" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, charge_id)", + "FK feature_id \u2192 features.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeUsageBasedRuns.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeUsageBasedRunDetailedLine", + "description": "Detailed (priced) line produced by a usage-based realization run; corrects_run_id links a correction line back to a superseded run (see openmeter/ent/schema/chargesusagebased.go:260).", + "location": "openmeter/ent/schema/chargesusagebased.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/usagebased", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "run_id", + "type": "char(26)" + }, + { + "name": "pricer_reference_id", + "type": "TEXT" + }, + { + "name": "corrects_run_id", + "type": "char(26)" + }, + { + "name": "child_unique_reference_id (stddetailedline.Mixin)", + "type": "TEXT" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, charge_id, run_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/chargesusagebased.go:324)", + "table explicitly named charge_usage_based_run_detailed_line" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "ChargeCreditPurchase", + "description": "Credit-purchase charge subtype: credit amount, effective/expiry window, priority, feature filters, settlement JSON and detailed status; links to a granted credit + payment edges (see openmeter/ent/schema/chargescreditpurchase.go:21).", + "location": "openmeter/ent/schema/chargescreditpurchase.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditpurchase", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "credit_amount", + "type": "numeric" + }, + { + "name": "effective_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "priority", + "type": "INT" + }, + { + "name": "feature_filters", + "type": "text[]", + "description": "Restricts which features the purchased credit applies to (added in migration 20260605120000) (see openmeter/ent/schema/chargescreditpurchase.go:50)." + }, + { + "name": "settlement", + "type": "jsonb" + }, + { + "name": "status_detailed", + "type": "enum" + }, + { + "name": "tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(tax_code_id)", + "FK customer_id \u2192 customers.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit ChargeCreditPurchase.Fields() in chargescreditpurchase.go and regenerate. feature_filters was added via tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql.", + "example": "ALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"feature_filters\" text[] NULL;" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CreditRealizationLineage", + "description": "Tracks the lineage of a realized credit allocation for a charge (root_realization_id + origin_kind + advance_features), with closeable segments (see openmeter/ent/schema/creditrealizationlineage.go:24).", + "location": "openmeter/ent/schema/creditrealizationlineage.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditrealization", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "charge_id", + "type": "char(26)" + }, + { + "name": "root_realization_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "origin_kind", + "type": "enum" + }, + { + "name": "advance_features", + "type": "text[]", + "description": "Feature filters carried by the originating advance (added in migration 20260605120000) (see openmeter/ent/schema/creditrealizationlineage.go:65)." + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, root_realization_id) (see openmeter/ent/schema/creditrealizationlineage.go:91)", + "FK charge_id \u2192 charges.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit CreditRealizationLineage.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CreditRealizationLineageSegment", + "description": "A segment of a credit realization lineage tracking amount + state transitions and backing transaction groups; closed_at marks settlement (see openmeter/ent/schema/creditrealizationlineage.go:97).", + "location": "openmeter/ent/schema/creditrealizationlineage.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/billing/charges/creditrealization", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "lineage_id", + "type": "char(26)" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "state", + "type": "enum" + }, + { + "name": "backing_transaction_group_id", + "type": "char(26)" + }, + { + "name": "source_state", + "type": "enum" + }, + { + "name": "source_backing_transaction_group_id", + "type": "char(26)" + }, + { + "name": "closed_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "INDEX(lineage_id, closed_at)", + "FK lineage_id \u2192 credit_realization_lineages.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. This table has no namespace/time mixins.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerAccount", + "description": "A double-entry ledger account of a given account_type; parent of sub-accounts and routing rows (see openmeter/ent/schema/ledger_account.go:16).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "account_type", + "type": "enum" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerAccount.Fields() in ledger_account.go and regenerate. See the /ledger skill.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerSubAccount", + "description": "A sub-account keyed by (account_id, route_id) that holds ledger entries (see openmeter/ent/schema/ledger_account.go:48).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "account_id", + "type": "char(26)" + }, + { + "name": "route_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, account_id, route_id)", + "FK account_id, route_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerSubAccountRoute", + "description": "Routing rule mapping a routing_key (currency/tax/feature/cost-basis/priority dimensions, denormalized as literal columns, not FKs) to a sub-account within an account (see openmeter/ent/schema/ledger_account.go:96).", + "location": "openmeter/ent/schema/ledger_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "account_id", + "type": "char(26)" + }, + { + "name": "routing_key_version", + "type": "TEXT" + }, + { + "name": "routing_key", + "type": "TEXT" + }, + { + "name": "currency", + "type": "TEXT", + "description": "Literal routing value denormalized from routing_key for filtering, not a FK (see openmeter/ent/schema/ledger_account.go:117)." + }, + { + "name": "tax_code", + "type": "TEXT", + "description": "Stores the TaxCode.Key string as a routing dimension, not a FK to tax_codes (see openmeter/ent/schema/ledger_account.go:119)." + }, + { + "name": "tax_behavior", + "type": "TEXT" + }, + { + "name": "features", + "type": "text[]" + }, + { + "name": "cost_basis", + "type": "numeric" + }, + { + "name": "credit_priority", + "type": "INT" + }, + { + "name": "transaction_authorization_status", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, account_id, routing_key_version, routing_key) (see openmeter/ent/schema/ledger_account.go:140)", + "FK account_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerSubAccountRoute.Fields() and regenerate. The features text[] column was changed via migration 20260604143000_ledger_route_features_text_array; tax_behavior added in 20260520130500.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerTransactionGroup", + "description": "Groups related ledger transactions that must be booked atomically (see openmeter/ent/schema/ledger_transaction_group.go:11).", + "location": "openmeter/ent/schema/ledger_transaction_group.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerTransaction", + "description": "A booked transaction within a group, dated by booked_at, made up of balanced entries (see openmeter/ent/schema/ledger_transaction.go:13).", + "location": "openmeter/ent/schema/ledger_transaction.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "group_id", + "type": "char(26)" + }, + { + "name": "booked_at", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)", + "INDEX(namespace, booked_at)", + "FK group_id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerEntry", + "description": "A single signed amount posting against a sub-account within a transaction; identity_key dedupes entries within a (transaction, sub_account) (see openmeter/ent/schema/ledger_entry.go:15).", + "location": "openmeter/ent/schema/ledger_entry.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "sub_account_id", + "type": "char(26)" + }, + { + "name": "identity_key", + "type": "TEXT", + "description": "Per-(transaction, sub_account) dedup key enforced by a unique index; defaults to empty string (see openmeter/ent/schema/ledger_entry.go:33)." + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "transaction_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(transaction_id, sub_account_id, identity_key) (see openmeter/ent/schema/ledger_entry.go:67)", + "amount immutable", + "FK transaction_id, sub_account_id (required, immutable)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerEntry.Fields() and regenerate. Entries are append-only (immutable amount).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerCustomerAccount", + "description": "Private link table mapping a customer to their ledger accounts \u2014 one FBO and one Receivable account per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:14).", + "location": "openmeter/ent/schema/ledger_customer_account.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "customer_id", + "type": "TEXT" + }, + { + "name": "account_type", + "type": "enum" + }, + { + "name": "account_id", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, customer_id, account_type) \u2014 one FBO + one Receivable per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:38)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate. AGENTS.md notes that when credits.enabled is false, ledger account services are noop; backfills writing real ledger_customer_accounts rows must construct concrete adapters directly.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LedgerBreakageRecord", + "description": "Projection row recording credit breakage (expired/unused credit) with full source-vs-breakage transaction lineage; intentionally keeps ledger references as plain IDs because it is a projection, not accounting source of truth (see openmeter/ent/schema/ledger_breakage_record.go:15).", + "location": "openmeter/ent/schema/ledger_breakage_record.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/ledger/breakage", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "kind", + "type": "enum" + }, + { + "name": "amount", + "type": "numeric" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "currency", + "type": "varchar(3)" + }, + { + "name": "credit_priority", + "type": "INT" + }, + { + "name": "expires_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "source_kind", + "type": "enum" + }, + { + "name": "source_transaction_group_id", + "type": "char(26)" + }, + { + "name": "source_transaction_id", + "type": "char(26)" + }, + { + "name": "source_entry_id", + "type": "char(26)" + }, + { + "name": "breakage_transaction_group_id", + "type": "char(26)" + }, + { + "name": "breakage_transaction_id", + "type": "char(26)" + }, + { + "name": "fbo_sub_account_id", + "type": "char(26)" + }, + { + "name": "breakage_sub_account_id", + "type": "char(26)" + }, + { + "name": "plan_id", + "type": "char(26)" + }, + { + "name": "release_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, customer_id, currency, credit_priority, expires_at, id)", + "references stored as plain IDs (no FKs) by design (see openmeter/ent/schema/ledger_breakage_record.go:19)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LedgerBreakageRecord.Fields() and regenerate. Added via migration 20260517121831_add_credit_expiration_breakage.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "App", + "description": "An installed integration/app of a given type and status (e.g. stripe, custom-invoicing); linked to customers and used as tax/invoicing/payment provider on billing profiles and invoices (see openmeter/ent/schema/app.go:16).", + "location": "openmeter/ent/schema/app.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "type", + "type": "TEXT" + }, + { + "name": "status", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)", + "customer_apps ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit App.Fields() in app.go and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomer", + "description": "Join table linking an App install to a Customer (see openmeter/ent/schema/app.go:53).", + "location": "openmeter/ent/schema/app.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app.go:77)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppStripe", + "description": "Stripe app configuration (account id, livemode, webhook id, and sensitive api_key/webhook_secret) (see openmeter/ent/schema/app_stripe.go:15).", + "location": "openmeter/ent/schema/app_stripe.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/stripe", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "stripe_account_id", + "type": "TEXT" + }, + { + "name": "stripe_livemode", + "type": "BOOL" + }, + { + "name": "api_key", + "type": "TEXT", + "description": "Ent Sensitive() field \u2014 redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:31)." + }, + { + "name": "masked_api_key", + "type": "TEXT" + }, + { + "name": "stripe_webhook_id", + "type": "TEXT" + }, + { + "name": "webhook_secret", + "type": "TEXT", + "description": "Ent Sensitive() field \u2014 redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:34)." + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, stripe_account_id, stripe_livemode) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:40)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit AppStripe.Fields() and regenerate. Use .Sensitive() for secret columns.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppStripeCustomer", + "description": "Links a Stripe app to a Customer with the Stripe customer id and default payment method (see openmeter/ent/schema/app_stripe.go:62).", + "location": "openmeter/ent/schema/app_stripe.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/stripe", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + }, + { + "name": "stripe_customer_id", + "type": "TEXT" + }, + { + "name": "stripe_default_payment_method_id", + "type": "TEXT" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL", + "UNIQUE(app_id, stripe_customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:93)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomInvoicing", + "description": "Custom-invoicing app config toggling draft/issuing sync hooks (see openmeter/ent/schema/appcustominvoicing.go:15).", + "location": "openmeter/ent/schema/appcustominvoicing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/custominvoicing", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "enable_draft_sync_hook", + "type": "BOOL" + }, + { + "name": "enable_issuing_sync_hook", + "type": "BOOL" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, id)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "AppCustomInvoicingCustomer", + "description": "Links a custom-invoicing app to a Customer (see openmeter/ent/schema/appcustominvoicing.go:54).", + "location": "openmeter/ent/schema/appcustominvoicing.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/app/custominvoicing", + "fields": [ + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_id", + "type": "char(26)" + }, + { + "name": "customer_id", + "type": "char(26)" + } + ], + "guarantees": [ + "UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "TaxCode", + "description": "A reusable tax code resource with optional per-app mappings, referenced by ratecards, lines, charges and org defaults (see openmeter/ent/schema/taxcode.go:18).", + "location": "openmeter/ent/schema/taxcode.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/taxcode", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "key", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "description", + "type": "TEXT" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "app_mappings", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/taxcode.go:44)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit TaxCode.Fields() and regenerate. Migration 20260527120000_dedupe_tax_codes_by_app_mapping consolidated duplicate tax codes.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "OrganizationDefaultTaxCodes", + "description": "Per-namespace default tax codes for invoicing and credit grants; namespace declared explicitly (not via mixin) to keep a unique constraint (see openmeter/ent/schema/organizationdefaulttaxcodes.go:15).", + "location": "openmeter/ent/schema/organizationdefaulttaxcodes.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/taxcode", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "invoicing_tax_code_id", + "type": "char(26)" + }, + { + "name": "credit_grant_tax_code_id", + "type": "char(26)" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace) WHERE deleted_at IS NULL (see openmeter/ent/schema/organizationdefaulttaxcodes.go:57)", + "FK both tax_code ids \u2192 tax_codes.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CustomCurrency", + "description": "A namespace-defined non-fiat currency (code/name/symbol) with a cost-basis history; e.g. for credit-token style billing (see openmeter/ent/schema/custom_currencies.go:16).", + "location": "openmeter/ent/schema/custom_currencies.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/currency", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "code", + "type": "TEXT" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "symbol", + "type": "TEXT" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, code) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:51)", + "cost_basis_history ON DELETE CASCADE" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "CurrencyCostBasis", + "description": "Time-effective exchange rate of a custom currency to a fiat code (see openmeter/ent/schema/custom_currencies.go:61).", + "location": "openmeter/ent/schema/custom_currencies.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/currency", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "custom_currency_id", + "type": "char(26)" + }, + { + "name": "fiat_code", + "type": "TEXT" + }, + { + "name": "rate", + "type": "numeric" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(namespace, custom_currency_id, fiat_code, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:108)", + "FK custom_currency_id \u2192 custom_currencies.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "LLMCostPrice", + "description": "Canonical per-token LLM pricing rows; namespace NULL means a global default, a set namespace is an override (see openmeter/ent/schema/llmcostprice.go:16).", + "location": "openmeter/ent/schema/llmcostprice.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/llmcost", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "namespace", + "type": "TEXT", + "description": "NULL for global prices, set for namespace overrides (see openmeter/ent/schema/llmcostprice.go:32)." + }, + { + "name": "provider", + "type": "TEXT" + }, + { + "name": "model_id", + "type": "TEXT" + }, + { + "name": "model_name", + "type": "TEXT" + }, + { + "name": "input_per_token", + "type": "numeric" + }, + { + "name": "output_per_token", + "type": "numeric" + }, + { + "name": "cache_read_per_token", + "type": "numeric" + }, + { + "name": "reasoning_per_token", + "type": "numeric" + }, + { + "name": "cache_write_per_token", + "type": "numeric" + }, + { + "name": "currency", + "type": "TEXT" + }, + { + "name": "source", + "type": "TEXT" + }, + { + "name": "source_prices", + "type": "jsonb" + }, + { + "name": "effective_from", + "type": "TIMESTAMPTZ" + }, + { + "name": "effective_to", + "type": "TIMESTAMPTZ" + } + ], + "guarantees": [ + "PK id", + "UNIQUE(provider, model_id, namespace, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/llmcostprice.go:85)", + "partial index for global lookups WHERE namespace IS NULL" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit LLMCostPrice.Fields() in llmcostprice.go and regenerate. This table notably does NOT use NamespaceMixin (namespace is nullable).", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Override resolution: look up namespace override first, then fall back to the global (namespace IS NULL) row.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationChannel", + "description": "A delivery channel (currently webhook) holding a type-tagged config JSON resolved by a custom value scanner (see openmeter/ent/schema/notification.go:21).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "disabled", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb", + "description": "Type-discriminated channel config (e.g. webhook), serialized via ChannelConfigValueScanner (see openmeter/ent/schema/notification.go:230)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationChannel.Fields() in notification.go and regenerate. New config variants need a case added to ChannelConfigValueScanner. See the /notification skill.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationRule", + "description": "A rule binding an event type to channels with a type-tagged config (balance threshold, entitlement reset, invoice created/updated) (see openmeter/ent/schema/notification.go:67).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "created_at/updated_at/deleted_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "metadata", + "type": "jsonb" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "name", + "type": "TEXT" + }, + { + "name": "disabled", + "type": "BOOL" + }, + { + "name": "config", + "type": "jsonb", + "description": "Type-discriminated rule config serialized via RuleConfigValueScanner (see openmeter/ent/schema/notification.go:290)." + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationRule.Fields() and regenerate. New event-type configs require a case in RuleConfigValueScanner.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationEvent", + "description": "A fired notification event instance carrying a JSON payload and the rule_id that produced it (see openmeter/ent/schema/notification.go:118).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "type", + "type": "enum" + }, + { + "name": "rule_id", + "type": "char(26)" + }, + { + "name": "payload", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, type)", + "FK rule_id \u2192 notification_rules.id (required)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationEvent.Fields() and regenerate. Note: only created_at (no updated/deleted) \u2014 events are append-only.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "NotificationEventDeliveryStatus", + "description": "Per-(event, channel) delivery state machine row with reason, next_attempt_at and an attempts history; drives the reconciliation/retry loop (see openmeter/ent/schema/notification.go:170).", + "location": "openmeter/ent/schema/notification.go", + "kind": "table", + "store": "primary_postgres", + "owned_by_component": "openmeter/notification", + "fields": [ + { + "name": "id", + "type": "char(26)" + }, + { + "name": "namespace", + "type": "TEXT" + }, + { + "name": "annotations", + "type": "jsonb" + }, + { + "name": "created_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "updated_at", + "type": "TIMESTAMPTZ" + }, + { + "name": "event_id", + "type": "TEXT" + }, + { + "name": "channel_id", + "type": "TEXT" + }, + { + "name": "state", + "type": "enum" + }, + { + "name": "reason", + "type": "TEXT" + }, + { + "name": "next_attempt_at", + "type": "TIMESTAMPTZ", + "description": "When the reconciliation loop should next retry delivery (see openmeter/ent/schema/notification.go:201)." + }, + { + "name": "attempts", + "type": "jsonb" + } + ], + "guarantees": [ + "PK id", + "INDEX(namespace, event_id, channel_id), INDEX(namespace, state, next_attempt_at) \u2014 drives retry polling (see openmeter/ent/schema/notification.go:220)" + ], + "consumers": [], + "lifecycle": { + "how_to_add": { + "prose": "Edit NotificationEventDeliveryStatus.Fields() and regenerate.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Reconciliation loop polls state + next_attempt_at; see the /notification skill.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "RawEvent", + "description": "The CloudEvents-shaped usage event row stored in the ClickHouse om__events table; data is the raw JSON payload, store_row_id a generated ULID per stored copy and customer_id an optional attribution (see openmeter/streaming/connector.go:24).", + "location": "openmeter/streaming/connector.go", + "kind": "document", + "store": "clickhouse_events", + "owned_by_component": "openmeter/streaming", + "fields": [ + { + "name": "namespace", + "type": "String" + }, + { + "name": "id", + "type": "String" + }, + { + "name": "type", + "type": "LowCardinality(String)" + }, + { + "name": "subject", + "type": "String" + }, + { + "name": "source", + "type": "String" + }, + { + "name": "time", + "type": "DateTime" + }, + { + "name": "data", + "type": "String", + "description": "Raw JSON event payload from which meters extract values via value_property JSONPath (see openmeter/streaming/connector.go:31)." + }, + { + "name": "ingested_at", + "type": "DateTime" + }, + { + "name": "stored_at", + "type": "DateTime", + "description": "When the row landed in ClickHouse; used as the late-arriving-usage cutoff in usage-based billing realization runs (see openmeter/sink/storage.go:62)." + }, + { + "name": "store_row_id", + "type": "String", + "description": "Per-stored-row ULID assigned by the sink on insert; distinguishes physical copies of the same logical event id (see openmeter/sink/storage.go:63)." + }, + { + "name": "customer_id", + "type": "String" + } + ], + "guarantees": [ + "ENGINE = MergeTree PARTITION BY toYYYYMM(time) (see openmeter/streaming/clickhouse/event_query.go:38)", + "ORDER BY (namespace, type, subject, toStartOfHour(time)) (see openmeter/streaming/clickhouse/event_query.go:45)", + "minmax skip-index on stored_at", + "no soft-delete; append-only; logical dedup happens upstream in Redis before insert" + ], + "consumers": [ + { + "object": "ClickHouseStorage.BatchInsert", + "file": "openmeter/sink/storage.go", + "role": "sole writer \u2014 maps SinkMessages to RawEvents and batch-inserts them into ClickHouse, stamping stored_at/store_row_id" + }, + { + "object": "createEventsTable.toSQL", + "file": "openmeter/streaming/clickhouse/event_query.go", + "role": "emits the CREATE TABLE DDL for the per-namespace events table" + }, + { + "object": "queryEventsTable", + "file": "openmeter/streaming/clickhouse/event_query.go", + "role": "builds list/count queries filtering by namespace/time/subject" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Add a column to RawEvent in openmeter/streaming/connector.go (with ch:\"...\" tag) AND to the createEventsTable.Define(...) calls in openmeter/streaming/clickhouse/event_query.go; the table is created idempotently (IF NOT EXISTS) on connector startup. There is no Atlas migration for ClickHouse.", + "example": "sb.Define(\"store_row_id\", \"String\")" + }, + "how_to_modify": { + "prose": "ClickHouse columns are added via the IF NOT EXISTS create path or ALTER TABLE; changing ORDER BY/partitioning is a breaking schema change requiring a new table and backfill.", + "example": "" + }, + "how_to_read": { + "prose": "Always through the streaming.Connector (ListEvents/ListEventsV2/CountEvents/QueryMeter), never raw ClickHouse from handlers.", + "example": "events, err := connector.ListEvents(ctx, namespace, params)" + }, + "backup_strategy": "", + "tests": [ + "openmeter/streaming/clickhouse/event_query_test.go", + "openmeter/streaming/clickhouse/event_query_v2_test.go", + "openmeter/streaming/clickhouse/meter_query_test.go" + ] + } + }, + { + "name": "SinkMessage", + "description": "In-flight per-event message inside the sink-worker carrying the deserialized CloudEvent plus namespace and ingested/stored timestamps before it is mapped to a RawEvent and persisted (see openmeter/sink/storage.go:52).", + "location": "openmeter/sink/models/models.go", + "kind": "value_object", + "store": "", + "owned_by_component": "openmeter/sink", + "fields": [ + { + "name": "Namespace", + "type": "string" + }, + { + "name": "Serialized", + "type": "*serializer.CloudEventsKafkaPayload" + }, + { + "name": "IngestedAt", + "type": "*time.Time" + }, + { + "name": "StoredAt", + "type": "*time.Time" + } + ], + "guarantees": [ + "transient; not persisted as-is \u2014 mapped to RawEvent for ClickHouse insert (see openmeter/sink/storage.go:53)" + ], + "consumers": [ + { + "object": "ClickHouseStorage.BatchInsert", + "file": "openmeter/sink/storage.go", + "role": "consumes SinkMessages and maps them to ClickHouse RawEvents" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Edit the SinkMessage struct in openmeter/sink/models/models.go.", + "example": "" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "dedupe.Item", + "description": "The deduplication key (namespace + event id + source) hashed into a Redis key with TTL to drop duplicate ingest events (see openmeter/dedupe/redisdedupe/redisdedupe.go:45).", + "location": "openmeter/dedupe/dedupe.go", + "kind": "key_value", + "store": "redis", + "owned_by_component": "openmeter/dedupe", + "fields": [ + { + "name": "Namespace", + "type": "string" + }, + { + "name": "ID", + "type": "string" + }, + { + "name": "Source", + "type": "string" + } + ], + "guarantees": [ + "TTL = Deduplicator.Expiration (see openmeter/dedupe/redisdedupe/redisdedupe.go:84)", + "SET NX semantics \u2014 first writer wins, returns unique=true (see openmeter/dedupe/redisdedupe/redisdedupe.go:82)", + "key may be raw key or sha-hashed depending on DedupeMode (rawkey/keyhash/keyhash-migration) (see openmeter/dedupe/redisdedupe/redisdedupe.go:51)" + ], + "consumers": [ + { + "object": "Deduplicator.IsUnique", + "file": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "role": "checks-and-sets the dedup key atomically (SET NX); returns whether the event is new" + }, + { + "object": "Deduplicator.CheckUniqueBatch", + "file": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "role": "MGET batch read path classifying items into unique vs already-processed" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Dedup keys are produced from dedupe.Item.Key(); the Redis value is empty \u2014 only key presence matters. Change the key shape in dedupe.Item / keyhash.go.", + "example": "d.Redis.SetArgs(ctx, key, \"\", redis.SetArgs{TTL: d.Expiration, Mode: \"nx\"})" + }, + "how_to_modify": { + "prose": "Changing the hashing format requires a migration mode (DedupeModeKeyHashMigration) that checks both old and new key formats during transition.", + "example": "" + }, + "how_to_read": { + "prose": "Via Deduplicator.IsUnique/CheckUnique/CheckUniqueBatch; never touch Redis keys directly.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + }, + { + "name": "Progress", + "description": "Async-query progress state cached in Redis under key progress:: with a TTL, used to report long-running event-query progress (see openmeter/progressmanager/adapter/progress.go:16).", + "location": "openmeter/progressmanager/entity/progressmanager.go", + "kind": "key_value", + "store": "redis", + "owned_by_component": "openmeter/progressmanager", + "fields": [], + "guarantees": [ + "key = progress:: (optionally prefixed) (see openmeter/progressmanager/adapter/progress.go:65)", + "JSON-serialized value with TTL = adapter.expiration (see openmeter/progressmanager/adapter/progress.go:56)", + "missing key \u2192 NotFound (redis.Nil) (see openmeter/progressmanager/adapter/progress.go:29)" + ], + "consumers": [ + { + "object": "adapter.UpsertProgress", + "file": "openmeter/progressmanager/adapter/progress.go", + "role": "writes JSON progress with TTL (SET)" + }, + { + "object": "adapter.GetProgress", + "file": "openmeter/progressmanager/adapter/progress.go", + "role": "reads/unmarshals progress; returns NotFound on missing key" + } + ], + "lifecycle": { + "how_to_add": { + "prose": "Edit the Progress entity in openmeter/progressmanager/entity/progressmanager.go; it is JSON-marshaled wholesale into the Redis value.", + "example": "a.redis.Set(ctx, a.getKey(input.ProgressID), data, a.expiration)" + }, + "how_to_modify": { + "prose": "", + "example": "" + }, + "how_to_read": { + "prose": "Via progressmanager service GetProgress; a noop adapter exists when Redis is not configured.", + "example": "" + }, + "backup_strategy": "", + "tests": [] + } + } + ], + "persistence_stores": [ + { + "name": "primary_postgres", + "description": "Source-of-truth control-plane store; schema is defined in Ent (openmeter/ent/schema/*.go) and migrated with Atlas-generated golang-migrate SQL. Almost all tables are namespace-scoped with ULID char(26) ids and deleted_at soft-deletes (see openmeter/ent/schema/customer.go:21).", + "engine": "PostgreSQL (Ent ORM + Atlas migrations + pgx)", + "role": "primary", + "migrations_dir": "tools/migrate/migrations", + "backup_strategy": "", + "owned_models": [ + "Customer", + "CustomerSubjects", + "Subject", + "Meter", + "Feature", + "Entitlement", + "Grant", + "BalanceSnapshot", + "UsageReset", + "Plan", + "PlanPhase", + "PlanRateCard", + "Addon", + "AddonRateCard", + "PlanAddon", + "Subscription", + "SubscriptionPhase", + "SubscriptionItem", + "SubscriptionAddon", + "SubscriptionAddonQuantity", + "SubscriptionBillingSyncState", + "BillingProfile", + "BillingWorkflowConfig", + "BillingCustomerOverride", + "BillingInvoice", + "BillingInvoiceLine", + "BillingInvoiceFlatFeeLineConfig", + "BillingInvoiceUsageBasedLineConfig", + "BillingInvoiceSplitLineGroup", + "BillingInvoiceLineDiscount", + "BillingInvoiceLineUsageDiscount", + "BillingStandardInvoiceDetailedLine", + "BillingStandardInvoiceDetailedLineAmountDiscount", + "BillingInvoiceValidationIssue", + "BillingSequenceNumbers", + "BillingCustomerLock", + "BillingInvoiceWriteSchemaLevel", + "Charge", + "ChargesSearchV1", + "ChargeFlatFee", + "ChargeFlatFeeRun", + "ChargeUsageBased", + "ChargeUsageBasedRuns", + "ChargeUsageBasedRunDetailedLine", + "ChargeCreditPurchase", + "CreditRealizationLineage", + "CreditRealizationLineageSegment", + "LedgerAccount", + "LedgerSubAccount", + "LedgerSubAccountRoute", + "LedgerTransactionGroup", + "LedgerTransaction", + "LedgerEntry", + "LedgerCustomerAccount", + "LedgerBreakageRecord", + "App", + "AppCustomer", + "AppStripe", + "AppStripeCustomer", + "AppCustomInvoicing", + "AppCustomInvoicingCustomer", + "TaxCode", + "OrganizationDefaultTaxCodes", + "CustomCurrency", + "CurrencyCostBasis", + "LLMCostPrice", + "NotificationChannel", + "NotificationRule", + "NotificationEvent", + "NotificationEventDeliveryStatus" + ] + }, + { + "name": "clickhouse_events", + "description": "Append-only analytics store holding raw usage events in per-namespace MergeTree tables named om__events; meters aggregate over it and usage-based billing reads metered quantities from it. Tables are created idempotently on connector startup, not via Atlas (see openmeter/streaming/clickhouse/event_query.go:20).", + "engine": "ClickHouse (MergeTree)", + "role": "analytics", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [ + "RawEvent" + ] + }, + { + "name": "kafka_ingest", + "description": "Per-namespace ingest event topics (template om_%s_events) that the API ingest path produces to and the sink-worker consumes (subscribing via regexp ^om__events$) before writing to ClickHouse; plus system event topics om_sys.api_events / om_sys.ingest_events / om_sys.balance_worker_events and the notification DLQ om_sys.notification_service_dlq (see app/config/ingest.go:180, app/config/events.go:230).", + "engine": "Kafka (confluent-kafka-go + Watermill)", + "role": "queue", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [] + }, + { + "name": "redis", + "description": "Cache/coordination store: ingest event deduplication via SET NX keys with TTL (openmeter/dedupe/redisdedupe) and async query progress under progress:: keys with TTL (openmeter/progressmanager/adapter) (see openmeter/dedupe/redisdedupe/redisdedupe.go:32).", + "engine": "Redis (go-redis v9)", + "role": "cache", + "migrations_dir": "", + "backup_strategy": "", + "owned_models": [ + "dedupe.Item", + "Progress" + ] + } + ], + "decisions": { + "architectural_style": { + "title": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "chosen": "OpenMeter is one Go module (github.com/openmeterio/openmeter) compiled into six long-running binaries (cmd/server, cmd/billing-worker, cmd/balance-worker, cmd/sink-worker, cmd/notification-service, cmd/jobs) plus a separate collector module. The control plane is organized as ~17 domain packages under openmeter/ (billing, charges, customer, productcatalog, subscription, entitlement, credit, ledger, meter, notification, app, streaming, ingest/sink), each a hand-rolled service/adapter/connector layer: interfaces declared in the domain root, concrete struct constructors with Config.Validate() in nested service/ and adapter/ subpackages, wired together at compile time by Google Wire provider sets in app/common/*.go. Persistence splits across four stores: PostgreSQL (Ent ORM + Atlas migrations, ~70 namespace-scoped tables) is the source-of-truth control plane; ClickHouse (per-namespace om__events MergeTree) is the append-only usage data plane; Kafka (confluent-kafka-go + Watermill CQRS) carries ingest events and system domain events; Redis backs dedupe and async-query progress. Two HTTP surfaces coexist: a legacy v1 router (openmeter/server/router) composing per-domain httpdriver packages over httptransport.Handler[Req,Resp], and a newer AIP-style v3 surface (api/v3) of thin oapi-codegen delegators. The API contract is authored once in TypeSpec (api/spec, legacy + aip packages) and code-generated to OpenAPI, then to Go server/client (oapi-codegen), Go/JS/Python SDKs, and goverter/goderive converters.", + "rationale": "The architecture is dictated by the product: high-volume event-time usage metering feeding transactional billing. Metering wants an append-only columnar store and a streaming pipeline (ClickHouse + Kafka + sink-worker), while billing/subscription/entitlement want ACID transactions and cross-row invariants (PostgreSQL + Ent + lockr advisory locks). Splitting the binaries lets the read-heavy ingest/sink path and the latency-tolerant billing/notification/balance workers scale and fail independently while sharing one codebase and one Ent client (openmeter/ent/db) \u2014 the meta architecture_style notes the only real import cycles are test-fixture induced, so the single module stays clean. Wire compile-time DI (app/common) makes each binary assemble only the providers it needs (e.g. cmd/billing-worker pulls BillingRegistry/ChargesRegistry, not the ingest HTTP driver). The TypeSpec-to-everything codegen chain keeps three SDKs and two server stubs from drifting from one source of truth. The service/adapter split with transaction-aware adapters (entutils.TransactingRepo / HijackTx) is what lets one domain's service compose another's inside a single Postgres transaction \u2014 the load-bearing requirement for subscription\u2192billing\u2192charges\u2192ledger consistency.", + "alternatives_rejected": [ + "A single all-in-one binary \u2014 rejected because ingest/sink throughput and billing/notification cadence have opposing scaling and failure profiles; the worker binaries (cmd/sink-worker, cmd/billing-worker, cmd/balance-worker, cmd/notification-service) exist precisely so usage intake does not share a process with invoice finalization.", + "Storing usage events in PostgreSQL alongside control-plane state \u2014 rejected because per-namespace MergeTree partitioned by toYYYYMM(time) (openmeter/streaming/clickhouse/event_query.go) is built for append-only aggregation scans that would crush an OLTP Postgres; meters aggregate over ClickHouse, billing reads metered quantities from it.", + "Microservices with separate databases per domain \u2014 rejected in favor of one shared Ent client and one Postgres so that subscription, billing, charges, and ledger mutations can compose inside a single ACID transaction guarded by one advisory lock (lockr) instead of needing distributed transactions or sagas.", + "Hand-written OpenAPI and hand-maintained SDKs \u2014 rejected for TypeSpec-first codegen (api/spec \u2192 openapi.yaml \u2192 oapi-codegen + orval + poetry) so the v1 stub, v3 stub, and three client SDKs cannot diverge from the contract.", + "A DI container resolved at runtime (reflection-based) \u2014 rejected for Google Wire compile-time generation so missing providers fail the build, not the boot." + ] + }, + "key_decisions": [ + { + "title": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "chosen": "Every domain adapter holds a *entdb.Client and implements entutils.TxCreator (Tx() hijacks an Ent tx onto the context) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}), which rebinds to the *TxDriver already on the context if one exists and otherwise falls back to repo.Self() (pkg/framework/entutils/transaction.go:199).", + "rationale": "This is the seam that lets one domain's service participate in another domain's transaction over the single shared Ent client (Generated Ent client component, openmeter/ent/db). Without it, subscription\u2192billing\u2192charges\u2192ledger composition could not be atomic. AGENTS.md elevates this to a hard convention for the charges adapter: even helpers that accept a raw *entdb.Client must still wrap their body in entutils.TransactingRepo so they rebind to the ctx tx rather than silently writing outside the caller's transaction. Implemented in pkg/framework/entutils/transaction.go and pkg/framework/transaction/transaction.go, consumed by every adapter (openmeter/customer/adapter/adapter.go, openmeter/billing/adapter/adapter.go).", + "alternatives_rejected": [ + "Passing an explicit *sql.Tx or tx-bound client through every method signature \u2014 rejected because it pollutes every domain interface and is easy to forget; the context-carried *TxDriver makes the tx ambient and the rebind automatic.", + "A repository-per-aggregate with its own connection pool \u2014 rejected because cross-domain atomic writes need one connection/transaction, not coordinated commits." + ], + "forced_by": "Single shared Ent client + the requirement that subscription, billing, charges, and ledger mutations be atomic across domains.", + "enables": "Composable service-in-service transactions, the lockr advisory-lock pattern (which asserts it runs inside a real Postgres tx), and the subscription\u2192billing sync writing invoice lines, split-line groups, and charges in one commit." + }, + { + "title": "Postgres transaction-scoped advisory locking (lockr)", + "chosen": "lockr.NewKey(scopes...) joins a colon-separated scope, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-releasing on commit/rollback. getTxClient first hard-asserts the caller is inside a real Postgres transaction (transaction_timestamp() != statement_timestamp()) and errors otherwise (pkg/framework/lockr/locker.go:134).", + "rationale": "Subscription mutations, billing mutations, and charge advances each touch many rows/tables for one customer and must be serialized per logical entity without serializing the whole table. lockr keys on a globally-unique row id (subscription.GetCustomerLock keys on customer id, openmeter/subscription/locks.go:6; customer ids are PK-unique via IDMixin). It is deliberately Postgres-tx-scoped so the lock cannot leak past the transaction boundary. Implemented in pkg/framework/lockr/{locker.go,key.go}; used across subscription, billing, ledger, entitlement. Note there is also a row-based BillingCustomerLock table (openmeter/ent/schema/billing.go:1334) used via SELECT ... FOR UPDATE for the same per-customer serialization in billing.", + "alternatives_rejected": [ + "Application-level mutexes \u2014 rejected because the binaries are horizontally scaled; an in-process lock would not serialize across replicas.", + "Redis/distributed lock (the repo has cirello.io/pglock available) \u2014 rejected for the in-transaction case because pg_advisory_xact_lock ties lock lifetime to the exact transaction that does the writes, eliminating lock-then-die orphan windows.", + "Keying the lock on customer.key \u2014 rejected because key is only unique under namespace + deleted_at IS NULL, so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one." + ], + "forced_by": "Multi-replica workers mutating multi-row per-customer aggregates that need a serialization point.", + "enables": "Safe concurrent subscription edits, billing finalization, and charge advancement for different customers in parallel while serializing operations on the same customer." + }, + { + "title": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "chosen": "stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (invoice.status / charge.status), not inside the FSM. States are Configure'd with Permit / PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over a STATUS ~string + Validate() type and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase) (openmeter/billing/charges/statemachine/machine.go:16,39).", + "rationale": "Invoice and usage-based-charge lifecycles have guarded transitions with side effects (calculation, finalization, voiding) that must be auditable and persisted across requests. Externalizing state onto the row means a transition computed in one request is durable and the next request resumes from the stored status. Implemented in openmeter/billing/service/stdinvoicestate.go:48 and openmeter/billing/charges/statemachine/machine.go.", + "alternatives_rejected": [ + "Ad-hoc if/switch transition code on a status field \u2014 rejected because guards and side effects scatter and illegal transitions become possible; the FSM centralizes the legal edge set.", + "In-memory-state FSM \u2014 rejected because transitions must survive across requests; external storage on the aggregate is mandatory.", + "A stateless machine for trivially-two-state fields \u2014 explicitly avoided; a plain bool/enum is simpler where there is no guard and no side effect." + ], + "forced_by": "Guarded, side-effecting, auditable invoice and charge lifecycles that span multiple requests.", + "enables": "A single legal-transition source of truth per aggregate, reusable across flat-fee/usage-based/credit-purchase charge subtypes via the generic ChargeLike constraint." + }, + { + "title": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "chosen": "The API is authored in TypeSpec under api/spec (two pnpm packages: legacy and aip). make gen-api compiles it to api/openapi.yaml / api/v3/openapi.yaml, then oapi-codegen generates api/api.gen.go (v1 ServerInterface) and api/v3/api.gen.go (v3 ServerInterface), orval generates the JS SDK, poetry/corehttp the Python SDK, and goverter/goderive generate type converters (convert.gen.go, billing/derived.gen.go). All carry a 'DO NOT EDIT' header.", + "rationale": "Two server surfaces and three published SDKs cannot be kept consistent by hand. TypeSpec is the single source of truth; the codegen chain enforces it. The Makefile even patches the oapi-codegen chi-middleware template (patch-oapi-templates) for custom AIP filter parsing. Components: TypeSpec API specification, Generated API contract & v1 server interface, v3 API layer, JavaScript/TypeScript SDK, Python SDK.", + "alternatives_rejected": [ + "OpenAPI YAML as the hand-edited source of truth \u2014 rejected because TypeSpec is more composable/typed and avoids drift between the two API packages.", + "Hand-written SDKs \u2014 rejected; orval/poetry generation keeps JS/Python/Go clients lock-step with the spec.", + "Hand-written domain\u2194API\u2194DB mappers \u2014 rejected for goverter/goderive generation following the FromAPI/ToAPI/FromDB/ToDB naming convention (go-types-conversion skill)." + ], + "forced_by": "Two coexisting API surfaces (v1 + AIP v3) plus three published SDKs that must not diverge from one contract.", + "enables": "Adding an endpoint by editing .tsp and re-running make gen-api / make generate; compile-time detection of contract drift." + }, + { + "title": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "chosen": "Each binary has a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets; constructors are plain functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService); BillingRegistry/ChargesRegistry aggregation structs in app/common/billing.go). make generate runs wire to emit wire_gen.go. Feature flags switch concrete vs noop providers at wiring time (app/common/ledger.go picks concrete or noop ledger services on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled).", + "rationale": "Six binaries share one module but each needs a different object graph. Compile-time DI means a missing provider fails the build, and each binary only links the providers it declares. Feature-gating at the provider level (credits.enabled, webhooks enabled) is the single seam where a whole subsystem becomes a no-op without touching call sites. Components: Application wiring (app/common), Server entrypoint & DI bootstrap.", + "alternatives_rejected": [ + "Runtime/reflection DI container \u2014 rejected because Wire surfaces wiring errors at build time and generates inspectable code.", + "Manual constructor wiring in each main() \u2014 rejected; the graph (billing\u2192charges\u2192ledger\u2192customer\u2192productcatalog) is too large to wire by hand per binary without divergence.", + "Feature flags checked deep in service logic \u2014 rejected in favor of swapping provider implementations (concrete vs noop) at the wiring seam so disabled features short-circuit cleanly (AGENTS.md: credits.enabled noop wiring)." + ], + "forced_by": "Six binaries over one module, each needing a distinct subset of the domain graph, plus feature flags that must disable whole subsystems.", + "enables": "Per-binary minimal object graphs, build-time wiring validation, and clean feature-flag disablement via noop provider swaps." + }, + { + "title": "Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions", + "chosen": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common construct the hook and call targetService.RegisterHooks(h) at startup; when a feature is off the provider registers a Noop hook instead (e.g. customer-created \u2192 provision a ledger account; subject-created \u2192 sync customer). Implemented in openmeter/customer/service/service.go, wired in app/common/customer.go.", + "rationale": "Some cross-domain effects must be synchronous and in-process (provisioning a ledger account when a customer is created), unlike the asynchronous Kafka event bus used for billing/notification. The hook registry is the in-process counterpart to the event bus, and registration at wiring time keeps the coupling explicit and feature-gatable.", + "alternatives_rejected": [ + "Routing every cross-domain reaction through Kafka \u2014 rejected for effects that must commit in the same transaction as the triggering write (ledger provisioning), where eventual consistency is unacceptable.", + "Hard-coding the dependent call inside the triggering service \u2014 rejected because it would create a compile-time dependency from customer onto ledger and prevent the noop-when-disabled swap." + ], + "forced_by": "Cross-domain effects that must be synchronous/transactional and feature-gatable, alongside the async event bus for the rest.", + "enables": "Provisioning ledger/customer state on lifecycle events without a static dependency edge, switchable to Noop when the feature is disabled." + }, + { + "title": "Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in", + "chosen": "Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest \u2192 IngestEventsTopic, balance-worker \u2192 BalanceWorkerEventsTopic, everything else \u2192 SystemEventsTopic) (openmeter/watermill/eventbus/eventbus.go). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored (openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/consumer/consumer.go).", + "rationale": "Usage ingest and domain events have different durability/throughput needs, so they are routed to distinct topics; workers (notification, billing, balance) consume CloudEvents and fan them to per-type handlers without each worker re-implementing topic/dispatch plumbing. CloudEvents is the wire format (cloudevents/sdk-go/v2). There is also a notification DLQ topic om_sys.notification_service_dlq.", + "alternatives_rejected": [ + "Direct confluent-kafka-go produce/consume in every worker \u2014 rejected; Watermill CQRS + grouphandler centralizes marshaling, topic routing, and type dispatch.", + "A single Kafka topic for all events \u2014 rejected because ingest volume and system events have different scaling/retention profiles; prefix-based topic routing separates them.", + "Synchronous cross-binary calls \u2014 rejected; workers are decoupled by Kafka so the API path does not block on billing/notification work." + ], + "forced_by": "Decoupled worker binaries consuming high-volume usage events and lower-volume domain events with different topic/retention needs.", + "enables": "Adding a new event handler by registering it in the grouphandler map; routing a new event type by prefix; independent worker scaling and a DLQ for poison notification messages." + }, + { + "title": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations", + "chosen": "The app adapter holds registry map[AppType]RegistryItem. Each integration's constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) exactly once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing (openmeter/app/adapter/marketplace.go:121). Install operations look up the factory by AppType. Implementations: stripe, custominvoicing, sandbox.", + "rationale": "Third-party billing/invoicing integrations are pluggable and discovered by type. A startup-time registration map is the single source of installable app types; capability support is discovered by type assertion on the constructed instance. The map has no late-registration locking, so all listings must register during DI before the HTTP/worker surface is live. Component: App / marketplace integrations.", + "alternatives_rejected": [ + "A hard-coded switch over app types \u2014 rejected; the registry lets a new integration register itself from its own package without editing a central switch.", + "Runtime/dynamic plugin loading \u2014 rejected; registration is compile-time-known and validated once at wiring, avoiding late-registration races." + ], + "forced_by": "Pluggable Stripe / custom-invoicing / sandbox integrations that must be addable without editing a central dispatch.", + "enables": "Adding a marketplace app by registering a RegistryItem at wiring time and implementing the capability interfaces it advertises." + }, + { + "title": "Per-subtype connector dispatch behind one entitlement Service", + "chosen": "entitlement.SubTypeConnector is implemented three times (metered/static/boolean, each in its own connector.go). The aggregate service holds all three and getTypeConnector(typed) switches over the closed EntitlementType set with a default-error arm (openmeter/entitlement/service/service.go:424; values metered/static/boolean from openmeter/entitlement/entitlement.go:331).", + "rationale": "Entitlement behavior branches by a fixed enum subtype, each with its own create/value logic. A closed switch with a default-error arm keeps the type set sealed and forces every new subtype to be handled explicitly. This mirrors the charges subtype split (flat_fee / usage_based / credit_purchase) where the Charge row carries exactly one of three subtype FK columns.", + "alternatives_rejected": [ + "One mega-service with inline branching everywhere \u2014 rejected; the per-subtype connector isolates each subtype's logic behind a uniform interface.", + "Open/registry-based subtype dispatch \u2014 rejected because the subtype set is fixed (a closed enum) and a default-error arm should reject unknown values rather than accept user-defined ones." + ], + "forced_by": "A fixed enum of entitlement subtypes each needing distinct create/value logic.", + "enables": "Adding a subtype by implementing SubTypeConnector and adding one switch arm; the compiler/default-arm flags any unhandled subtype." + }, + { + "title": "Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view", + "chosen": "Charge is a polymorphic parent row where exactly one of three subtype FK columns (flat_fee / credit_purchase / usage_based) points to the subtype table, with UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL for idempotent creation (openmeter/ent/schema/charges.go:167). Reads go through the ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables). The view DDL is shipped via an explicit SQL migration because Ent views do not appear in generated migrate.Tables (AGENTS.md ent-view caveat).", + "rationale": "Charges share a common base but have type-specific lifecycle/run tables (ChargeFlatFeeRun, ChargeUsageBasedRuns, CreditRealizationLineage). The parent-plus-subtype layout keeps the shared columns in one place and the idempotency key makes charge creation safe under retries. The search view denormalizes reads across subtypes. Components: Charges sub-system; data models Charge, ChargesSearchV1, ChargeFlatFee, ChargeUsageBased, ChargeCreditPurchase.", + "alternatives_rejected": [ + "Single wide charges table with nullable type-specific columns \u2014 rejected; type-specific run/lineage children would not fit and the table would be sparse.", + "Separate top-level tables per charge type with no shared parent \u2014 rejected; loses the shared base, the single idempotency key, and the unified search surface.", + "Relying on Ent to emit the view in migrate.Tables \u2014 rejected/impossible: ent.View schemas generate query code but not migration metadata in this repo, so the view DDL needs a hand-written SQL migration." + ], + "forced_by": "Three charge subtypes with distinct run/lineage child tables that still need one idempotency key and one read surface.", + "enables": "Idempotent charge creation under retries and unified cross-subtype charge search, while keeping subtype lifecycles isolated." + }, + { + "title": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "chosen": "Persisted entities compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index; UniqueResourceMixin adds a (namespace,key,deleted_at) unique index that only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47). The Ent schema (openmeter/ent/schema/*.go) is the single source of truth; Atlas diffs it into golang-migrate SQL under tools/migrate/migrations.", + "rationale": "~70 tables share the same multi-tenant, soft-delete, ULID-id, audit, metadata-jsonb shape; mixins enforce it once instead of per-table. The (namespace,key,deleted_at) approximation is a known sharp edge: same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration, so entities needing true partial-uniqueness (Customer) ship a custom IndexWhere SQL migration (openmeter/ent/schema/customer.go:58-62). The data_overview confirms almost every Postgres table is namespace-scoped, ULID-id'd, and deleted_at soft-deleted.", + "alternatives_rejected": [ + "Repeating id/namespace/timestamp columns in every schema file \u2014 rejected; mixins keep the multi-tenant contract uniform and DRY.", + "Hard deletes \u2014 rejected in favor of deleted_at soft-deletes so historical billing/usage references survive.", + "Trusting the mixin's deleted_at-in-key index for real partial uniqueness \u2014 rejected where correctness matters; a custom partial-unique SQL migration is required." + ], + "forced_by": "A ~70-table multi-tenant schema needing uniform id/namespace/audit/soft-delete columns across every domain.", + "enables": "Adding an entity by composing mixins and running make generate + atlas diff; consistent namespace scoping and soft-delete semantics everywhere." + }, + { + "title": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "chosen": "v1: openmeter/server/router validates each request against the embedded OpenAPI 3 spec (kin-openapi openapi3filter) and wires per-domain httpdriver packages, each composing httptransport.NewHandler[Request,Response](decode, service-op, encode) with a typed errorEncoder that maps domain errors to RFC7807 problem documents. v3: api/v3/server/routes.go implements the oapi-codegen ServerInterface as thin methods delegating to per-resource handlers (api/v3/handlers/*), with explicitly Unimplemented / feature-gated operations and AIP query-parameter filtering (api/v3/filters). Both call the same domain services.", + "rationale": "v3 is the forward AIP-style surface; v1 cannot be dropped without breaking clients, so both surfaces front the identical domain services and share error rendering (commonhttp.HandleErrorIfTypeMatches, api/v3/apierrors). The generic httptransport.Handler[Req,Resp] gives v1 consistent decode\u2192service\u2192encode\u2192error-encode plumbing; v3 leans on generated stubs plus thin delegators.", + "alternatives_rejected": [ + "Forcing a hard cutover from v1 to v3 \u2014 rejected; existing clients depend on v1, so the surfaces coexist over shared services.", + "Duplicating domain logic per surface \u2014 rejected; both surfaces are thin transport adapters over the same services, so behavior cannot diverge.", + "Per-handler ad-hoc error-to-status mapping \u2014 rejected for the ordered typed errorEncoder chain (errors.As short-circuit) so domain error types map to status codes consistently." + ], + "forced_by": "An installed v1 client base plus a new AIP-style API direction, both needing the same domain behavior.", + "enables": "Migrating endpoints to v3 incrementally while v1 keeps working, with one set of domain services and one error-mapping convention behind both." + }, + { + "title": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate", + "chosen": "Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf(\"field: %w\", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil; single-field checks use models.NewGenericValidationError(...) directly (pkg/models/errors.go, openmeter/app/marketplace.go). Service and adapter Config structs also carry Validate() and constructors reject invalid config at New().", + "rationale": "Validation must report all problems at once (not fail-fast) and surface as a single 400/ValidationIssue at the HTTP boundary. Centralizing on NewNillableGenericValidationError + errors.Join makes the nil-vs-error contract uniform across every domain and lets the error encoders map one error type to 400. AGENTS.md mandates this shape for Validate() methods. pkg/models is the 229-in-edge dependency magnet that carries it.", + "alternatives_rejected": [ + "Returning on the first invalid field \u2014 rejected; callers and API consumers want all issues at once.", + "A bespoke validation library per domain \u2014 rejected; one shared error aggregation type keeps HTTP error mapping uniform.", + "Validating only at the HTTP layer \u2014 rejected; service/adapter Config.Validate() catches misconfiguration at construction, before the binary serves traffic." + ], + "forced_by": "Multiple API surfaces and many domains all needing a consistent multi-issue validation contract that maps to one HTTP status.", + "enables": "Aggregated 400 ValidationIssue responses, fail-at-construction config validation, and one error type for the encoders to match." + } + ], + "trade_offs": [ + { + "accept": "Context-ambient transactions: the active tx is carried on context.Context and rebound by entutils.TransactingRepo, not visible in method signatures.", + "benefit": "Cross-domain service composition can be atomic over one Ent client without threading a tx parameter through every interface; subscription\u2192billing\u2192charges\u2192ledger commit together.", + "caused_by": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "violation_signals": [ + "context.Background()", + "context.TODO()", + "func(... db *entdb.Client ...) without entutils.TransactingRepo wrapper", + "passing *entdb.Client into a helper that writes", + "bypassing WithTx / Self()" + ] + }, + { + "accept": "Advisory locks must run inside a real Postgres transaction and must key on a globally-unique id; misuse (no tx, or keying on a non-unique column) is only caught at runtime.", + "benefit": "Per-customer serialization of multi-row subscription/billing/charge operations across replicas, with the lock auto-released on commit/rollback (no orphan locks).", + "caused_by": "Postgres transaction-scoped advisory locking (lockr)", + "violation_signals": [ + "lockr.NewKey on customer key", + "LockForTX outside transaction.Run", + "sync.Mutex for cross-replica serialization", + "pg_advisory_lock (session-scoped, not xact)", + "locking on a namespace-non-unique column" + ] + }, + { + "accept": "Six binaries over one module: shared code is convenient but a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, and all binaries must be rebuilt/redeployed together.", + "benefit": "One codebase, one Ent client, one transaction boundary for cross-domain atomicity; workers scale and fail independently while sharing types.", + "caused_by": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "violation_signals": [ + "go.mod split per binary", + "duplicating pkg/models types per service", + "separate database per domain", + "distributed transaction / saga between binaries" + ] + }, + { + "accept": "TypeSpec-first codegen: any contract change requires regenerating OpenAPI, two Go server stubs, three SDKs, and goverter/goderive converters; generated files must never be hand-edited.", + "benefit": "Two API surfaces and three SDKs can never drift from one source of truth; contract drift becomes a build failure.", + "caused_by": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "violation_signals": [ + "editing api/api.gen.go", + "editing api/openapi.yaml by hand", + "editing convert.gen.go", + "hand-writing SDK client methods", + "skipping make gen-api after .tsp change" + ] + }, + { + "accept": "A separate ClickHouse store and Kafka pipeline for usage events: two more stateful systems to operate, and ClickHouse tables are created idempotently at connector startup outside Atlas migration discipline.", + "benefit": "High-volume append-only usage ingest and aggregation scale independently of OLTP Postgres; meters and usage-based billing read aggregated quantities efficiently.", + "caused_by": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "violation_signals": [ + "storing usage events in Postgres", + "ALTER TABLE om_ events via Atlas", + "removing the sink-worker", + "joining RawEvent against Postgres tables" + ] + }, + { + "accept": "External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge.", + "benefit": "Invoice/charge transitions are durable across requests, auditable, and illegal transitions are rejected at the single edge-set definition.", + "caused_by": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "violation_signals": [ + "mutating invoice.status directly", + "if/switch on status instead of Permit edges", + "NewStateMachine (in-memory) for a persisted aggregate", + "adding a status without a Permit edge" + ] + }, + { + "accept": "Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning).", + "benefit": "Whole subsystems (ledger, Svix webhooks) cleanly become no-ops without runtime conditionals scattered through service logic.", + "caused_by": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "violation_signals": [ + "if credits.enabled inside service method", + "constructing ledger adapters when credits disabled", + "Svix client built when webhooks disabled", + "missing noop provider for a gated subsystem" + ] + }, + { + "accept": "The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness; entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration.", + "benefit": "Most entities get key-uniqueness for free from the mixin; the few that need strict partial uniqueness opt into a custom migration.", + "caused_by": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "violation_signals": [ + "relying on UniqueResourceMixin for strict partial uniqueness", + "deleting customer.go IndexWhere migration", + "same-key create after soft-delete without partial index" + ] + }, + { + "accept": "Two HTTP surfaces (v1 + v3) front the same services indefinitely: every behavior change must be checked against both transport layers and both error-rendering paths.", + "benefit": "Existing v1 clients keep working while new endpoints land on the AIP v3 surface; no forced client migration.", + "caused_by": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "violation_signals": [ + "v3 handler with its own domain logic", + "duplicating a service call in both surfaces with diverging behavior", + "dropping the v1 router", + "v3 endpoint not delegating to a shared domain service" + ] + } + ], + "out_of_scope": [ + { + "item": "A bundled web UI / dashboard application \u2014 the frontend surface is published SDKs (JS/TS with a React context provider, Python) and a Cloud product, not an in-repo web app.", + "made_out_of_scope_by": "Multi-binary Go control plane with code-generated API contract" + }, + { + "item": "Distributed transactions / sagas across services \u2014 cross-domain consistency is achieved with one shared Ent client, one Postgres transaction, and lockr advisory locks, not a coordination protocol.", + "made_out_of_scope_by": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)" + }, + { + "item": "Storing or migrating usage events in PostgreSQL \u2014 usage events live only in ClickHouse (append-only MergeTree), created idempotently at startup, outside Atlas/Ent migration discipline.", + "made_out_of_scope_by": "Multi-binary control plane with an event-time usage-metering data plane" + }, + { + "item": "Hand-written OpenAPI specs or hand-written SDK client methods \u2014 the contract is generated from TypeSpec; editing generated files is forbidden.", + "made_out_of_scope_by": "TypeSpec-first API contract with full codegen fan-out" + }, + { + "item": "Runtime/reflection-based dependency injection or dynamic plugin loading \u2014 DI is compile-time via Wire; app integrations register at wiring time into an in-memory map, not via runtime plugins.", + "made_out_of_scope_by": "Google Wire compile-time dependency injection in app/common" + }, + { + "item": "Hard deletes of control-plane rows \u2014 entities soft-delete via deleted_at so historical billing/usage references survive.", + "made_out_of_scope_by": "Ent schema mixins as the cross-cutting column contract" + }, + { + "item": "In-process/in-memory event delivery as the only mechanism \u2014 asynchronous cross-binary work goes through Kafka (Watermill CQRS); the in-process hook registry is reserved for synchronous/transactional cross-domain effects.", + "made_out_of_scope_by": "Two-tier async messaging and the Service hook registry" + }, + { + "item": "panic-based error handling and slog.Default() fallbacks in production code \u2014 AGENTS.md forbids panics in non-test paths and requires explicitly injected *slog.Logger.", + "made_out_of_scope_by": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate" + }, + { + "item": "External payment/invoice engines hard-wired into the core \u2014 Stripe and custom-invoicing are pluggable marketplace apps registered through the app registry, and invoice formatting uses GOBL behind the billing service.", + "made_out_of_scope_by": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations" + } + ], + "decision_chain": { + "root": "Provide event-time usage metering AND ACID usage-based billing on the same multi-tenant platform: high-volume append-only usage events must aggregate cheaply, while subscriptions/invoices/credits/ledger demand cross-row transactional invariants \u2014 over one shared codebase.", + "forces": [ + { + "decision": "Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane", + "rationale": "Read-heavy ingest/aggregation and transaction-heavy billing have opposing scaling and failure profiles, so usage events go to a columnar append-only store and a streaming pipeline while control-plane state stays in OLTP Postgres \u2014 split into independently scalable binaries sharing one module.", + "violation_keywords": [ + "usage events in postgres", + "single monolith binary", + "microservice per domain with own db", + "mongodb", + "dynamodb for control plane" + ], + "forces": [ + { + "decision": "Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)", + "rationale": "One shared Postgres schema across ~70 multi-tenant tables needs a uniform namespace/ULID/audit/soft-delete shape, defined once via mixins with Ent as source of truth and Atlas-generated migrations.", + "violation_keywords": [ + "gorm", + "prisma", + "sqlalchemy", + "hard delete", + "DROP without deleted_at", + "uuid v4 pk instead of ulid", + "per-table id column duplication" + ], + "forces": [] + }, + { + "decision": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)", + "rationale": "Cross-domain atomicity over a single shared Ent client requires adapters that join a caller-supplied transaction carried on context, rather than each owning its own connection.", + "violation_keywords": [ + "context.Background()", + "context.TODO()", + "raw *entdb.Client into a writing helper", + "separate db connection per repo", + "two-phase commit" + ], + "forces": [ + { + "decision": "Postgres transaction-scoped advisory locking (lockr)", + "rationale": "Multi-replica workers mutating multi-row per-customer aggregates need a serialization point tied to the transaction; pg_advisory_xact_lock keyed on a unique id auto-releases on commit.", + "violation_keywords": [ + "sync.Mutex", + "pg_advisory_lock", + "redis lock for in-tx serialization", + "lock on customer key", + "LockForTX outside transaction.Run" + ], + "forces": [] + }, + { + "decision": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles", + "rationale": "Guarded, side-effecting invoice/charge transitions must be durable across requests, so the FSM stores status on the persisted aggregate inside the transaction.", + "violation_keywords": [ + "NewStateMachine (in-memory)", + "invoice.status = ... direct mutation", + "if status == switch transitions", + "ad-hoc lifecycle flags" + ], + "forces": [] + }, + { + "decision": "Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view", + "rationale": "Three charge subtypes with distinct run/lineage children still need one idempotency key and one read surface, written transactionally with the rest of billing.", + "violation_keywords": [ + "single wide charges table", + "charge create without unique_reference_id", + "ent.View expected in migrate.Tables", + "separate charge tables without parent" + ], + "forces": [] + }, + { + "decision": "Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions", + "rationale": "Effects that must commit in the same transaction as the triggering write (ledger provisioning on customer create) are registered as in-process hooks, not routed through Kafka.", + "violation_keywords": [ + "kafka publish for transactional side effect", + "static import of ledger from customer", + "hard-coded cross-domain call in service body" + ], + "forces": [] + } + ] + }, + { + "decision": "Google Wire compile-time dependency injection in app/common, per-binary provider sets", + "rationale": "Six binaries over one module each need a distinct object graph; compile-time DI assembles only the needed providers and fails the build on a missing one, and provider swaps (concrete vs noop) gate features.", + "violation_keywords": [ + "reflection DI container", + "runtime service locator", + "manual wiring in main()", + "if feature.enabled inside service logic" + ], + "forces": [ + { + "decision": "In-memory map registry with type-asserted factory dispatch for app/marketplace integrations", + "rationale": "Pluggable Stripe/custom-invoicing integrations register exactly once at wiring time into a duplicate-rejecting map that is the single source of installable app types.", + "violation_keywords": [ + "central switch over app type", + "runtime plugin load", + "late registration after server start", + "duplicate AppType registration" + ], + "forces": [] + } + ] + }, + { + "decision": "TypeSpec-first API contract with full codegen fan-out (OpenAPI \u2192 oapi-codegen + 3 SDKs + goverter/goderive)", + "rationale": "Two API surfaces and three published SDKs cannot be kept consistent by hand, so a single TypeSpec source generates OpenAPI, both Go server stubs, the SDKs, and the type converters.", + "violation_keywords": [ + "edit api.gen.go", + "hand-edit openapi.yaml", + "edit convert.gen.go", + "hand-written SDK method", + "edit wire_gen.go" + ], + "forces": [ + { + "decision": "Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services", + "rationale": "An installed v1 client base plus a new AIP direction means both surfaces front the identical domain services, sharing typed error-to-status mapping.", + "violation_keywords": [ + "duplicate domain logic per surface", + "ad-hoc status code per handler", + "drop v1 router", + "bypass httptransport.Handler" + ], + "forces": [] + }, + { + "decision": "Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate", + "rationale": "Multiple surfaces and domains need one multi-issue validation contract that maps to a single 400 ValidationIssue.", + "violation_keywords": [ + "return on first invalid field", + "panic on invalid input", + "custom validation error per domain", + "slog.Default() fallback" + ], + "forces": [] + } + ] + }, + { + "decision": "Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in", + "rationale": "Decoupled worker binaries consume high-volume usage events and lower-volume domain events with different topic/retention needs, fanned to per-type handlers via a shared dispatch.", + "violation_keywords": [ + "direct confluent-kafka produce in worker", + "single topic for all events", + "synchronous cross-binary call", + "no DLQ for poison messages" + ], + "forces": [ + { + "decision": "Per-subtype connector dispatch behind one entitlement Service", + "rationale": "Entitlement (and analogously charge) behavior branches by a closed enum subtype consumed by workers and services, isolated behind a uniform SubTypeConnector with a default-error arm.", + "violation_keywords": [ + "inline switch over entitlement type everywhere", + "open/registry subtype dispatch", + "default arm that accepts unknown subtype" + ], + "forces": [] + } + ] + } + ] + } + ] + } + }, + "implementation_guidelines": [ + { + "capability": "Transaction-aware Ent adapter participating in a caller's transaction", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6", + "github.com/jackc/pgx/v5 v5.9.2" + ], + "pattern_description": "Adapter structs hold a *entdb.Client and implement entutils.TxCreator (Tx hijacks an Ent tx onto ctx) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self returns the non-tx instance). Each adapter method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}) so it transparently joins a caller-supplied tx (rebinding on the *TxDriver in ctx) or runs standalone via Self(). Services compose other services' adapters inside one transaction.Run.", + "key_files": [ + "pkg/framework/entutils/transaction.go", + "pkg/framework/transaction/transaction.go", + "openmeter/customer/adapter/adapter.go", + "openmeter/billing/adapter/adapter.go" + ], + "usage_example": "func (a *adapter) GetCustomer(ctx context.Context, id models.NamespacedID) (*customer.Customer, error) {\n return entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep *adapter) (*customer.Customer, error) {\n row, err := rep.db.Customer.Query().\n Where(customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)).\n Only(ctx)\n if err != nil {\n return nil, err\n }\n return mapCustomerFromDB(row), nil\n })\n}", + "applicable_when": "Adapter whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator \u2014 TransactingRepo only rebinds when a *TxDriver is on ctx, else falls back to repo.Self() (pkg/framework/entutils/transaction.go:199).", + "do_not_apply_when": [ + "Pure in-memory adapter with no Ent client (registry/map-backed components) \u2014 there is no transaction to join (openmeter/app/adapter/marketplace.go:120).", + "Helper that accepts a raw *entdb.Client argument instead of reading the tx from ctx \u2014 per AGENTS.md the charges adapter convention still requires wrapping the body with entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the ctx tx; passing a non-tx client silently writes outside the caller's transaction." + ], + "scope": [], + "tips": [ + "Never introduce context.Background()/context.TODO() to sidestep tx propagation (AGENTS.md); thread the caller's ctx through the full path.", + "Self() must return the non-tx instance so standalone calls do not accidentally reuse a stale tx client.", + "Use transaction.Run(...) at the service layer to open the tx that adapters then join." + ] + }, + { + "capability": "Per-customer serialization with Postgres advisory locks (lockr)", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6 (pg_advisory_xact_lock via raw SQL)", + "github.com/zeebo/xxh3 (xxh3 hash)" + ], + "pattern_description": "lockr.NewKey(scopes...) joins scopes with ':' and xxh3-hashes to a 64-bit int; Locker.LockForTX runs SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-released on commit/rollback. Domains expose typed key builders (subscription.GetCustomerLock(customerID)). getTxClient asserts the call is inside a real Postgres tx and errors otherwise.", + "key_files": [ + "pkg/framework/lockr/locker.go", + "pkg/framework/lockr/key.go", + "openmeter/subscription/locks.go", + "openmeter/subscription/service/service.go" + ], + "usage_example": "err := transaction.Run(ctx, a.driver, func(ctx context.Context) error {\n key := subscription.GetCustomerLock(customerID)\n if err := a.locker.LockForTX(ctx, key); err != nil {\n return err\n }\n // all mutations below are serialized per-customer and\n // the lock releases automatically when this tx commits\n return a.applySubscriptionEdits(ctx, edits)\n})", + "applicable_when": "The lock-key identity component is a globally-unique row id \u2014 subscription.GetCustomerLock keys on customer id, and customer ids are PK-unique via IDMixin field.String(\"id\").Unique() + index.Fields(\"namespace\",\"id\").Unique() (openmeter/subscription/locks.go:6).", + "do_not_apply_when": [ + "Caller keys the lock on a namespace-non-unique column \u2014 customer key is only unique under namespace + deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62), so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one.", + "Caller is not inside a Postgres transaction \u2014 lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails.", + "Operation mutates exactly one row with no cross-row invariant \u2014 Ent SELECT ... FOR UPDATE row locking suffices and avoids two scope strings colliding into the same 64-bit advisory slot." + ], + "scope": [ + "subscription", + "billing", + "ledger", + "entitlement" + ], + "tips": [ + "Two distinct scope strings can xxh3-collide into the same advisory slot; keep scope vocabularies disjoint per domain.", + "Billing also serializes per-customer via the BillingCustomerLock row (SELECT ... FOR UPDATE) \u2014 pick the mechanism the surrounding code already uses for that domain.", + "The lock is transaction-scoped: do work and commit; do not hold across multiple transactions." + ] + }, + { + "capability": "Guarded lifecycle state machine with external (aggregate-stored) state", + "category": "state_management", + "libraries": [ + "github.com/qmuntal/stateless v1.8.0" + ], + "pattern_description": "stateless.NewStateMachineWithExternalStorage keeps the current state on the domain aggregate (invoice.status / charge.status). Each state is Configure'd with Permit/PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over STATUS (~string + Validate()) and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase).", + "key_files": [ + "openmeter/billing/service/stdinvoicestate.go", + "openmeter/billing/charges/statemachine/machine.go" + ], + "usage_example": "sm := stateless.NewStateMachineWithExternalStorage(\n func(ctx context.Context) (any, error) { return inv.Status, nil },\n func(ctx context.Context, s any) error { inv.Status = s.(billing.InvoiceStatus); return nil },\n stateless.FiringImmediate,\n)\nsm.Configure(billing.InvoiceStatusDraft).\n Permit(triggerFinalize, billing.InvoiceStatusIssued).\n OnActive(func(ctx context.Context, _ ...any) error {\n return svc.finalizeInvoice(ctx, inv)\n })\nif err := sm.Fire(triggerFinalize); err != nil {\n return err\n}", + "applicable_when": "Charge aggregate that carries its status as a string enum and implements ChargeLike \u2014 machine.go:39 requires GetStatus/WithStatus/GetBase/WithBase and machine.go:16 constrains STATUS to ~string + Validate().", + "do_not_apply_when": [ + "State is not externally owned by the aggregate \u2014 these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the persisted row; an in-memory-state FSM would not persist transitions across requests.", + "A transition has no guard and no side effect and the type has only two states \u2014 a plain bool/enum field is simpler than configuring a stateless machine." + ], + "scope": [ + "billing", + "charges" + ], + "tips": [ + "Declare every legal transition as a Permit edge; a status reachable only by direct mutation bypasses guards and side effects.", + "OnActive side effects run inside the surrounding transaction \u2014 keep them idempotent for retry safety.", + "Reuse the generic charge machine across flat-fee/usage-based/credit-purchase by satisfying ChargeLike rather than writing a new machine per subtype." + ] + }, + { + "capability": "Compile-time dependency injection with feature-gated provider swaps (Wire)", + "category": "state_management", + "libraries": [ + "github.com/google/wire v0.7.0" + ], + "pattern_description": "Constructors are grouped into wire.NewSet provider sets per concern in app/common/*.go; each binary's build-tagged wire.go (//go:build wireinject) lists the sets it needs and make generate emits wire_gen.go. Feature flags choose concrete vs noop providers at wiring time (app/common/ledger.go on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled).", + "key_files": [ + "cmd/server/wire.go", + "app/common/customer.go", + "app/common/billing.go", + "app/common/ledger.go", + "app/common/app.go" + ], + "usage_example": "// app/common/customer.go\nvar Customer = wire.NewSet(\n NewCustomerService,\n NewCustomerAdapter,\n)\n\nfunc NewCustomerLedgerService(conf config.Configuration) customer.ServiceHook {\n if !conf.Credits.Enabled {\n return ledgernoop.NewCustomerHook() // feature disabled -> noop\n }\n return ledger.NewCustomerHook(/* concrete deps */)\n}", + "applicable_when": "Subsystem gated by a config flag that must disable cleanly at every layer \u2014 credits.enabled wires ledger account services/resolvers to noop implementations across api/v3 handlers, customer ledger hooks, and namespace provisioning (app/common/ledger.go; AGENTS.md).", + "do_not_apply_when": [ + "Checking the feature flag inside service business logic instead of swapping the provider \u2014 a disabled subsystem must be a noop at the wiring seam, not a runtime conditional scattered through methods (AGENTS.md credits.enabled guidance).", + "Any ledger-account backfill that must write real ledger_accounts / ledger_customer_accounts rows \u2014 when credits.enabled is false the default DI outputs are noop, so the backfill must construct concrete ledger account + resolver adapters directly (AGENTS.md)." + ], + "scope": [], + "tips": [ + "Never edit wire_gen.go by hand; change the provider set and run make generate.", + "Each binary links only the provider sets in its wire.go \u2014 adding a service to one binary does not add it to the others.", + "Register namespace handlers before initNamespace(...) in cmd/server/main.go if they must provision the default namespace at startup (AGENTS.md)." + ] + }, + { + "capability": "Domain events over Kafka via Watermill CQRS and type-routed consumers", + "category": "notifications", + "libraries": [ + "github.com/ThreeDotsLabs/watermill v1.5.2", + "github.com/ThreeDotsLabs/watermill-kafka/v3 v3.1.2", + "github.com/cloudevents/sdk-go/v2 v2.16.2", + "github.com/confluentinc/confluent-kafka-go/v2 v2.14.1" + ], + "pattern_description": "Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest/balance-worker/system). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored. A notification DLQ topic (om_sys.notification_service_dlq) catches poison messages.", + "key_files": [ + "openmeter/watermill/eventbus/eventbus.go", + "openmeter/watermill/grouphandler/grouphandler.go", + "openmeter/notification/consumer/consumer.go" + ], + "usage_example": "handler := grouphandler.NewNoPublishingHandler(\n logger,\n eventMarshaler,\n grouphandler.NewGroupEventHandler(func(ctx context.Context, e *MyEvent) error {\n return svc.Handle(ctx, e)\n }),\n)\n// publishing from a producer:\nif err := eventBus.Publish(ctx, myEvent); err != nil {\n return err\n}", + "applicable_when": "Asynchronous cross-binary work where eventual consistency is acceptable \u2014 publish routes by event-name prefix to IngestEventsTopic/BalanceWorkerEventsTopic/SystemEventsTopic (openmeter/watermill/eventbus/eventbus.go).", + "do_not_apply_when": [ + "Cross-domain effect that must commit in the same transaction as the triggering write (e.g. provisioning a ledger account on customer create) \u2014 use the in-process Service hook registry (openmeter/customer/service/service.go), not Kafka.", + "Producing/consuming Kafka directly with confluent-kafka-go instead of the eventbus/grouphandler abstractions \u2014 bypasses topic routing, CloudEvents marshaling, and unknown-type accounting." + ], + "scope": [ + "notification", + "billing", + "entitlement", + "ingest" + ], + "tips": [ + "Event-name prefix determines the topic; name new events consistently so they route correctly.", + "All handlers for a type run and their errors are joined \u2014 make each handler independently retry-safe.", + "Unknown event types are ignored (counted), not errored \u2014 a missing handler registration fails silently." + ] + }, + { + "capability": "Pluggable third-party app integration via the marketplace registry", + "category": "payments", + "libraries": [ + "github.com/stripe/stripe-go/v80 v80.2.1", + "github.com/invopop/gobl v0.403.0" + ], + "pattern_description": "The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing. Install operations look up the factory by AppType; capability support (e.g. billing) is discovered by type-asserting the constructed instance against capability interfaces.", + "key_files": [ + "openmeter/app/adapter/marketplace.go", + "openmeter/app/registry.go", + "openmeter/app/marketplace.go", + "openmeter/app/stripe/service/service.go" + ], + "usage_example": "func NewStripeService(appSvc app.Service, deps Deps) (Service, error) {\n s := &service{deps: deps}\n err := appSvc.RegisterMarketplaceListing(app.RegistryItem{\n Listing: stripeListing,\n Factory: s, // builds an App instance for an install\n })\n if err != nil {\n return nil, err\n }\n return s, nil\n}", + "applicable_when": "Integration factory that registers exactly once per process at DI wiring time \u2014 RegisterMarketplaceListing rejects a second registration of the same AppType (openmeter/app/adapter/marketplace.go:121).", + "do_not_apply_when": [ + "Registration happens after the listing surface is already serving requests \u2014 the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live (openmeter/app/adapter/marketplace.go:121)." + ], + "scope": [ + "app" + ], + "tips": [ + "Discover an installed app's billing/invoicing capability by type assertion against the capability interface, not by an AppType switch.", + "Use GOBL for invoice document formatting behind the billing service rather than emitting payment-provider-specific invoice shapes.", + "Stripe API access uses stripe-go/v80; keep the pinned major in sync with the SDK version in go.mod." + ] + }, + { + "capability": "Persisted entity definition via Ent schema mixins + Atlas migrations", + "category": "persistence", + "libraries": [ + "entgo.io/ent v0.14.6", + "ariga.io/atlas v0.36.x", + "github.com/golang-migrate/migrate/v4 v4.19.1", + "github.com/oklog/ulid/v2 v2.1.1" + ], + "pattern_description": "A schema struct composes entutils mixins in Mixin() (ResourceMixin \u2192 IDMixin ULID char(26) PK + NamespaceMixin + MetadataMixin jsonb + TimeMixin created/updated/deleted_at + unique (namespace,id); UniqueResourceMixin adds a (namespace,key,deleted_at) unique index). Edit the schema, run make generate to regenerate openmeter/ent/db, then atlas migrate --env local diff to emit .up.sql/.down.sql under tools/migrate/migrations and update atlas.sum.", + "key_files": [ + "pkg/framework/entutils/mixins.go", + "openmeter/ent/schema/customer.go", + "openmeter/ent/schema/billing.go", + "tools/migrate/migrations" + ], + "usage_example": "func (Customer) Mixin() []ent.Mixin {\n return []ent.Mixin{\n entutils.ResourceMixin{}, // id+namespace+metadata+timestamps+soft-delete\n BillingAddressMixin{},\n }\n}\n\nfunc (Customer) Fields() []ent.Field {\n return []ent.Field{\n field.String(\"key\").Optional(),\n field.String(\"primary_email\").Optional(),\n }\n}", + "applicable_when": "Entity relying on key-uniqueness within a namespace \u2014 UniqueResourceMixin's (namespace,key,deleted_at) index only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47).", + "do_not_apply_when": [ + "Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL \u2014 add a custom SQL migration with IndexWhere as Customer does (openmeter/ent/schema/customer.go:58-62), rather than relying on the mixin's deleted_at-in-key approximation.", + "Ent ent.View schemas \u2014 they generate query code but do NOT appear in migrate.Tables, so the view DDL needs an explicit SQL migration (ChargesSearchV1; AGENTS.md ent-view caveat)." + ], + "scope": [], + "tips": [ + "Never edit openmeter/ent/db (generated); change the schema and run make generate.", + "Drop incidental go.sum entries (e.g. tablewriter) that make generate / atlas diff add unless the task requires a dependency change (AGENTS.md).", + "pr-checks enforce atlas.sum append-only; never rewrite existing migration files." + ] + }, + { + "capability": "Typed v1 HTTP handler with domain-error-to-status mapping", + "category": "networking", + "libraries": [ + "github.com/go-chi/chi/v5 v5.2.5", + "github.com/getkin/kin-openapi v0.139.0", + "github.com/go-chi/render v1.0.3" + ], + "pattern_description": "Per-domain httpdriver packages build httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts): a decoder maps the HTTP request to a typed Request, the service op runs, an encoder writes the Response, and an errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T] in order, short-circuiting on errors.As against concrete domain error types into RFC7807 problem documents. The v1 router validates requests against the embedded OpenAPI3 spec first.", + "key_files": [ + "pkg/framework/transport/httptransport/handler.go", + "openmeter/notification/httpdriver/handler.go", + "pkg/framework/commonhttp/errors.go", + "openmeter/notification/httpdriver/errors.go" + ], + "usage_example": "func (h handler) GetChannel() httptransport.Handler[GetChannelRequest, api.Channel] {\n return httptransport.NewHandler(\n func(ctx context.Context, r *http.Request) (GetChannelRequest, error) {\n return GetChannelRequest{ID: chi.URLParam(r, \"id\")}, nil\n },\n func(ctx context.Context, req GetChannelRequest) (api.Channel, error) {\n return h.service.GetChannel(ctx, req.ID)\n },\n commonhttp.JSONResponseEncoder[api.Channel],\n httptransport.WithErrorEncoder(h.resolveErrorEncoder()),\n )\n}", + "applicable_when": "Implementing a v1 endpoint where domain errors must map to HTTP status \u2014 errorEncoder uses ordered errors.As short-circuits (notification.NotFoundError\u2192404, GenericValidationError\u2192400, UpdateAfterDeleteError\u2192409) (openmeter/notification/httpdriver/errors.go).", + "do_not_apply_when": [ + "Implementing a v3 AIP endpoint \u2014 v3 uses oapi-codegen ServerInterface delegators in api/v3/server/routes.go with shared rendering in api/v3/apierrors, not httptransport.Handler.", + "A handler that maps a domain error inline to a status instead of through the typed errorEncoder chain \u2014 breaks the uniform RFC7807 mapping (pkg/framework/commonhttp/errors.go)." + ], + "scope": [], + "tips": [ + "Order the errorEncoder chain most-specific-first; errors.As stops at the first match.", + "Return domain error types (NotFoundError, GenericValidationError) from services so the encoder can map them \u2014 do not pre-format HTTP errors in services.", + "GenericValidationError from accumulating Validate() maps to a single 400 ValidationIssue." + ] + }, + { + "capability": "In-process cross-domain reactions via Service hook registry", + "category": "state_management", + "libraries": [ + "github.com/openmeterio/openmeter/pkg/models (ServiceHookRegistry)" + ], + "pattern_description": "A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]); on a lifecycle event it invokes registered hooks synchronously inside the same transaction. Wire providers in app/common build the hook and call targetService.RegisterHooks(h) at startup, registering a Noop hook when the feature is disabled.", + "key_files": [ + "openmeter/customer/service/service.go", + "app/common/customer.go", + "pkg/models" + ], + "usage_example": "// at wiring time in app/common/customer.go\nledgerHook := NewCustomerLedgerService(conf) // concrete or Noop\ncustomerService.RegisterHooks(ledgerHook)\n\n// the hook reacts to customer creation in-process / in-tx\nfunc (h *ledgerHook) PostCreate(ctx context.Context, c *customer.Customer) error {\n return h.ledger.ProvisionAccount(ctx, c)\n}", + "applicable_when": "Cross-domain effect that must be synchronous and transactional with the triggering write and feature-gatable \u2014 customer-create \u2192 ledger account provisioning is registered as a hook and swapped to Noop when credits.enabled is false (app/common/customer.go).", + "do_not_apply_when": [ + "Effect tolerates eventual consistency and should not block the triggering transaction \u2014 publish a domain event over the Kafka eventbus instead (openmeter/watermill/eventbus/eventbus.go).", + "Triggering service would gain a static import dependency on the dependent domain \u2014 the hook registry exists precisely to avoid that compile-time edge; do not hard-code the dependent call in the service body." + ], + "scope": [ + "customer", + "subscription", + "ledger" + ], + "tips": [ + "Hooks run inside the triggering transaction; a hook error should roll the whole operation back when the effect is mandatory.", + "Provide a Noop hook implementation so a disabled feature registers a no-op rather than nothing.", + "Keep hook signatures generic via ServiceHook[T] so multiple reactors can register against one service." + ] + }, + { + "capability": "Code-generated type conversion between domain, API, and DB representations", + "category": "persistence", + "libraries": [ + "github.com/jmattheis/goverter v1.9.3", + "github.com/awalterschulze/goderive v0.5.1" + ], + "pattern_description": "convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations (equality/clone helpers). Hand-written conversion functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the go-types-conversion skill); make generate regenerates them.", + "key_files": [ + "api/convert.go", + "api/convert.gen.go", + "openmeter/billing/derived.gen.go", + "openmeter/customer/adapter/entitymapping.go" + ], + "usage_example": "// goverter interface in convert.go (source of generation)\n// goverter:converter\ntype Converter interface {\n ToAPICustomer(c customer.Customer) api.Customer\n FromAPICustomerCreate(in api.CustomerCreate) customer.CustomerMutate\n}\n// run `make generate` -> convert.gen.go implements Converter", + "applicable_when": "Translating between domain/API/DB types where the mapping is structural \u2014 hand-written mappers must use FromAPI/ToAPI/FromDB/ToDB names (openmeter/customer/adapter/entitymapping.go).", + "do_not_apply_when": [ + "Editing a *.gen.go converter by hand \u2014 they carry a DO NOT EDIT header; change convert.go (goverter) or the goderive annotation and regenerate.", + "Using project/projected terminology for domain mapping \u2014 AGENTS.md mandates map/mapped terminology and the FromAPI/ToAPI/FromDB/ToDB function names." + ], + "scope": [], + "tips": [ + "For equality/clone of billing aggregates use the goderive-generated helpers in derived.gen.go rather than hand-writing deep-equals.", + "Keep one converter interface per boundary (API\u2194domain, DB\u2194domain) so goverter generation stays scoped." + ] + }, + { + "capability": "Svix-backed webhook delivery behind a Handler interface", + "category": "notifications", + "libraries": [ + "github.com/svix/svix-webhooks v1.95.1", + "go.opentelemetry.io/otel v1.44.0" + ], + "pattern_description": "notification/webhook defines a Handler interface (CreateWebhook/UpdateWebhook/endpoint secret + header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. A reconciliation loop in eventhandler/reconcile.go re-drives delivery for events whose webhook send did not confirm.", + "key_files": [ + "openmeter/notification/webhook/svix/webhook.go", + "openmeter/notification/webhook/noop/noop.go", + "openmeter/notification/eventhandler/reconcile.go" + ], + "usage_example": "func NewWebhookHandler(conf config.NotificationConfiguration) (webhook.Handler, error) {\n if !conf.Webhook.Enabled {\n return noop.NewHandler(), nil\n }\n return svix.NewHandler(svix.Config{\n ServerURL: conf.Webhook.SvixServerURL,\n APIKey: conf.Webhook.SvixAPIKey,\n })\n}", + "applicable_when": "Delivering notification events to customer-configured endpoints where delivery is feature-gated \u2014 the Handler interface has both a Svix and a noop implementation selected at wiring time (openmeter/notification/webhook/noop/noop.go).", + "do_not_apply_when": [ + "Webhooks disabled in config \u2014 wire the noop Handler, not the Svix one, so no Svix API key is required (openmeter/notification/webhook/noop/noop.go).", + "Treating a Svix send as the durable source of truth \u2014 the NotificationEventDeliveryStatus row + reconcile loop (openmeter/notification/eventhandler/reconcile.go) are authoritative; an un-reconciled send can be re-driven." + ], + "scope": [ + "notification" + ], + "tips": [ + "Persist NotificationEventDeliveryStatus before/around the Svix call so the reconcile loop can recover unconfirmed deliveries.", + "Wrap Svix calls in tracex spans for observability (the svix Handler already does).", + "Payload versioning lives in eventpayload.go \u2014 bump the payload version when changing the wire shape (see /notification skill)." + ] + } + ], + "pitfalls": [ + { + "id": "pf_0010", + "problem_statement": "Cross-aggregate references in the Postgres ledger (LedgerCustomerAccount.account_id/customer_id) and the ClickHouse usage tables are deliberately FK-less and migration-less, so referential integrity and column/struct alignment are enforced only by application code with no database-level guard.", + "evidence": [ + "openmeter/ent/schema/ledger_customer_account.go func Edges() returns nil; customer_id and account_id are field.String(...).Immutable() with no FK to Customer or LedgerAccount (intentional, to avoid import cycles between ledger and customer/account).", + "openmeter/customer/adapter/customer.go DeleteCustomer is a soft-delete (SetDeletedAt) and never touches LedgerCustomerAccount, while it cascade-deletes only edge-linked children - LedgerCustomerAccount is not an edge, so a hard customer purge would leave dangling rows undetected.", + "openmeter/streaming/clickhouse/connector.go calls createTable only when !SkipCreateTables, and event_query.go:25 uses IfNotExists() - the events table is create-if-absent with no diff/migration path.", + "openmeter/streaming/connector.go:24-35 RawEvent columns must be kept in sync with the ClickHouse DDL (event_query.go:26-36) and the INSERT column list (event_query.go:207) by hand." + ], + "root_cause": "Two decisions converge: the 'Layered Domain Service/Adapter' import-cycle-avoidance keeps the ledger link table FK-less (Edges() returns nil so Ent emits no foreign key), and the multi-store decision (Postgres+Ent+Atlas for domain, ClickHouse create-if-not-exists for usage) leaves ClickHouse outside the migration pipeline. Neither path has a database-level integrity or schema-diff guard, so a hard-deleted account leaving dangling LedgerCustomerAccount rows, or a RawEvent struct change not mirrored in the DDL/INSERT list, drifts undetected until a runtime read fails.", + "fix_direction": [ + "Add application-level integrity checks/tests asserting every LedgerCustomerAccount.account_id and customer_id resolves to a live row, and cover any account/customer hard-deletion path.", + "Introduce a ClickHouse migration mechanism (or an ALTER-on-startup reconcile) so RawEvent column changes propagate to already-provisioned tables.", + "Add a contract test asserting the RawEvent ch: field set equals the createEventsTable DDL column set and the INSERT column list, in order.", + "Document the FK-less and migration-less invariants in openmeter/ledger and openmeter/streaming CLAUDE.md so future schema edits know the integrity burden is on application code." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/ledger_customer_account.go", + "openmeter/ledger", + "openmeter/streaming/connector.go", + "openmeter/streaming/clickhouse/event_query.go" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0011", + "problem_statement": "An in-progress billing-invoice schema migration keeps deprecated columns and a two-place schema_level discriminator (per-row column plus a temporary BillingInvoiceWriteSchemaLevel table) live, creating coupled cleanup debt that must be removed in lockstep across the Ent schema and the billing adapter once migration completes.", + "evidence": [ + "openmeter/ent/schema/billing.go:417 line_ids Deprecated; billing.go:631 BillingInvoiceSplitLineGroup tax_config/tax_code_id/tax_behavior Deprecated; billing.go:793 discount type/quantity/pre_line_period_quantity Deprecated.", + "openmeter/ent/schema/billing.go:1171 field.Int(\"schema_level\").Default(1) on BillingInvoice; billing.go:1363 BillingInvoiceWriteSchemaLevel is a temporary single-row table tracking the write schema level.", + "openmeter/billing/adapter/schemalevel.go and gatheringinvoice.go:43/58 read and set the discriminator; gatheringinvoice.go:424 / invoicelinesplitgroup.go:254 branch read mapping on invoice.SchemaLevel; lock.go:55 runs a per-customer migrateCustomerInvoices keyed on minSchemaLevel - the dual-write/dual-read logic spans multiple adapter files." + ], + "root_cause": "Stems from the Ent-schema-as-source-of-truth persistence decision under an incremental (not breaking-cutover) invoice-line migration: rather than one cutover, the schema carries deprecated columns plus a schema_level discriminator encoded in two artifacts (the BillingInvoice.schema_level column and the standalone BillingInvoiceWriteSchemaLevel table), and the adapter reads GetInvoiceDefaultSchemaLevel/SetSchemaLevel and branches mapGatheringInvoiceLinesFromDB on the level to write and read both shapes. Because the versioning state lives in two places and the dual-write branches live across several adapter files, the cleanup is a multi-artifact schema-plus-adapter operation that can be left half-done if the migration stalls.", + "fix_direction": [ + "Maintain an explicit checklist of the deprecated columns and the two schema_level artifacts (BillingInvoice.schema_level + BillingInvoiceWriteSchemaLevel) to drop together.", + "When GetInvoiceDefaultSchemaLevel reports a single level everywhere, drop the field, the BillingInvoiceWriteSchemaLevel table, the adapter dual-shape map branches, and lock.go migrateCustomerInvoices in one migration.", + "Generate and verify the Atlas down-migration for the column drops before landing, given the atlas.sum linear-chain constraint.", + "Add a post-cutover test asserting no live billing_invoice row references a deprecated column and no row has schema_level below the target." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/billing.go", + "openmeter/billing/adapter" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0012", + "problem_statement": "LedgerSubAccountRoute denormalizes routing dimensions (currency, tax_code, tax_behavior, features, cost_basis, credit_priority) as plain immutable literal columns with no FK to their source tables - tax_code stores TaxCode.Key, not a FK - so a created route can hold a value that no longer matches the canonical table with no database-level guard.", + "evidence": [ + "openmeter/ent/schema/ledger_account.go:116 comment '// Literal routing values (denormalized from routing_key for query filtering; not FKs).'", + "openmeter/ent/schema/ledger_account.go:118 comment '// tax_code stores the TaxCode.Key string used as a routing dimension, not a FK to the tax_codes table.'", + "openmeter/ent/schema/ledger_account.go:117-130 currency/tax_code/tax_behavior/features/cost_basis/credit_priority are all field.*(...).Immutable() with no edge - so the values are write-once snapshots, but nothing verifies they matched the source table at write time or remain valid afterward." + ], + "root_cause": "Stems from the 'Double-entry ledger with FK-less cross-aggregate links' decision plus a query-performance denormalization: ledger sub-account routes flatten routing dimensions into literal columns (ledger_account.go:116-118) for filterable querying instead of FK-joining to tax_codes/currencies, because adding those edges would couple the ledger schema to the tax/catalog aggregates. The columns are Immutable() (write-once snapshots, so they cannot drift after creation), but there is no FK or CHECK to validate that tax_code/currency matched a canonical row at insert time, so an application bug or a later rename of a TaxCode.Key leaves the route pointing at a value the source table no longer recognises, undetectable at the database level.", + "fix_direction": [ + "Add application-level validation in the ledger resolver that tax_code/currency exist in their canonical tables before a LedgerSubAccountRoute is created.", + "Add a reconciliation test asserting every LedgerSubAccountRoute.tax_code resolves to a live TaxCode.Key and currency is a valid ISO-4217 code.", + "Document the snapshot-immutable-not-FK invariant in openmeter/ledger CLAUDE.md so future edits know these columns are write-once denormalized values, not live references.", + "If tax codes can be renamed, define a policy (block rename while routes reference the key, or carry a stable TaxCode id alongside the human key)." + ], + "severity": "info", + "confidence": 0.7, + "applies_to": [ + "openmeter/ent/schema/ledger_account.go", + "openmeter/ledger" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-04", + "confirmed_in_scan": 2 + }, + { + "id": "pf_0013", + "problem_statement": "Ledger transaction-template code resolution converts a recoverable error into a process panic: TemplateCode(template) panics when a TransactionTemplate's code() returns an empty string, so a newly added template that forgets to declare its code() crashes the ledger collector at runtime instead of failing the build or returning an error.", + "evidence": [ + "openmeter/ledger/transactions/codes.go:109-115 func TemplateCode(template TransactionTemplate) string { code, err := templateCode(template); if err != nil { panic(err) }; return string(code) }.", + "openmeter/ledger/transactions/codes.go:83-89 templateCode returns fmt.Errorf('unknown transaction template code for %T', template) when template.code() == '' - the only error source.", + "openmeter/ledger/collector/correct.go:241,285,293,361,511,656 and collect.go:281,283 call transactions.TemplateCode(...) directly in production correction/collection paths.", + "AGENTS.md: 'Never use panic in non-test code paths. If a new failure mode is possible, change the function signature to return an error and propagate it explicitly.'" + ], + "root_cause": "Stems from the 'Double-entry ledger with template-only transaction construction' decision: each correction/collection template implements code() to self-identify, and TemplateCode (codes.go:113) was given a string return type (not (string, error)) so call sites in collector/correct.go and collect.go can use it inline in switch/case and as map keys. To preserve that ergonomic signature, the helper swallows the error by panicking. Every current TransactionTemplate returns a non-empty code, so the panic is not firing today - but it is reachable the moment a new template is registered without a code(), violating the no-panic-in-production rule and turning a static omission into a runtime crash in a financial path. There is no triggering caller that fires it now, so this is a latent class, not a finding.", + "fix_direction": [ + "Change TemplateCode to return (string, error) and propagate the error through collector/correct.go and collect.go call sites, replacing inline switch/case usage with an explicit lookup-and-handle.", + "Alternatively, enforce code() completeness with a compile-time-adjacent registry test that constructs every TransactionTemplate implementation and asserts code() != '' (so a missing code fails CI, not production).", + "Add a lint/grep CI guard flagging panic( in openmeter/ledger/** outside _test.go to keep the no-panic rule enforced as the ledger grows.", + "Document in openmeter/ledger/transactions/CLAUDE.md that every new TransactionTemplate must declare a non-empty code() and is covered by the registry test." + ], + "severity": "warn", + "confidence": 0.75, + "applies_to": [ + "openmeter/ledger/transactions/codes.go", + "openmeter/ledger/collector", + "openmeter/ledger/transactions" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + }, + { + "id": "pf_0014", + "problem_statement": "Internal test packages of production service directories (package service in openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service) import the shared test/billing fixtures package, which in turn imports those same service packages from its own _test files, forming a test-only import cycle that couples multiple production service trees through one mutable fixture package.", + "evidence": [ + "openmeter/billing/charges/service/base_test.go declares 'package service' (internal test package) and imports billingtest 'github.com/openmeterio/openmeter/test/billing'.", + "openmeter/billing/worker/subscriptionsync/service/base_test.go declares 'package service' and imports test/billing.", + "test/billing/subscription_test.go imports github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service - the back-edge that closes the loop (note: test/billing NON-test files do NOT import these service packages, so there is no production import cycle - the cycle is confined to the test graph).", + ".archie dependency graph cycle: ['openmeter/billing/charges/service','openmeter/billing/charges/testutils','openmeter/billing/worker/subscriptionsync/service','test/billing'].", + "AGENTS.md: 'Keep domain test helpers under openmeter/.../testutils independent from app/common ... or unrelated wiring additions can create test-only import cycles.'" + ], + "root_cause": "Stems from the 'Layered Domain Service / Adapter / HTTP-driver' pattern plus the shared cross-package test harness (test/billing BaseSuite/SubscriptionMixin) that the /billing and /subscriptionsync skills steer tests toward: because charges and subscriptionsync internal _test files (package service) reuse the same heavyweight test/billing fixtures, and test/billing's own _test files reach back into those service packages, the test compilation graph forms a cycle. Go tolerates it today only because the back-edges live in _test files of different packages, but any move of a back-edge import into a non-test file of test/billing (e.g. a fixture helper that constructs a real subscriptionsync service) would convert it into a hard production import cycle that breaks the build. The shared mutable fixture package is the single coupling point that makes this fragile.", + "fix_direction": [ + "Keep test/billing's non-test files free of imports into openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service; restrict those imports to _test files only, and add a CI grep guard asserting it.", + "Split test/billing into a minimal fixture-construction core (no service imports) and per-domain test-only extensions, so each service tree depends on the smallest fixture surface.", + "Per AGENTS.md, build test dependencies from underlying package constructors (repos, adapters, services, lockr) rather than routing through the shared harness where a lighter fixture suffices.", + "Document the test-only-cycle constraint in openmeter/billing/charges/service/CLAUDE.md and test/billing/CLAUDE.md so future fixture additions do not promote a _test back-edge into production code." + ], + "severity": "warn", + "confidence": 0.7, + "applies_to": [ + "test/billing", + "openmeter/billing/charges/service", + "openmeter/billing/charges/testutils", + "openmeter/billing/worker/subscriptionsync/service" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + }, + { + "id": "pf_0015", + "problem_statement": "Two parallel HTTP API surfaces (legacy v1 in openmeter/server/router and AIP-style v3 in api/v3) are generated from one TypeSpec source and both delegate to the same domain services, but v3 carries permanently-unimplemented and feature-gated operations that satisfy the generated interface via api.Unimplemented{}, so the advertised contract diverges from the runtime capability with no compile-time signal.", + "evidence": [ + "openmeter/server/router/router.go wires ~25 per-domain httpdriver/httphandler packages and implements api.ServerInterface from api/api.gen.go (legacy v1).", + "api/v3/server/routes.go implements a separate generated ServerInterface delegating to api/v3/handlers/* packages.", + "api/v3/server/routes.go:419 CreateCreditAdjustment and routes.go:473 QueryGovernanceAccess always call api.Unimplemented (HTTP 501); routes.go:372-435 GetCustomerCreditBalance / ListCreditGrants / CreateCreditGrant / ListCreditTransactions short-circuit to Unimplemented when s.Credits.Enabled is false.", + "api/v3/api.gen.go:7186-7191 type Unimplemented struct{} writes http.StatusNotImplemented for each endpoint - the satisfy-the-interface escape hatch.", + "api/spec has two TypeSpec packages (legacy/ and aip/) generating the two surfaces plus all three SDKs." + ], + "root_cause": "Stems from the 'TypeSpec as the single source of truth for both v1 and v3 HTTP APIs and all three SDKs' decision under an in-progress v1->v3 migration: TypeSpec generates each operation's server-interface method and SDK client method from the contract independently of whether the server implements it, and the v3 Server is allowed to satisfy the generated ServerInterface by embedding/delegating to api.Unimplemented{} (api.gen.go:7186), which always returns 501. Because Go only checks that the interface is satisfied, a permanently-stubbed or feature-gated operation compiles identically to a finished one. Maintaining two surfaces (v1 httpdriver vs v3 centralized handlers) with two handler conventions doubles the places where a published-but-unimplemented operation can hide, and the SDKs advertise capability the runtime never provides.", + "fix_direction": [ + "Inventory every v3 operation whose Server method body is only a call to api.Unimplemented; for each, decide implement / feature-gate-and-document / mark-unstable-in-TypeSpec.", + "Add a generated-vs-implemented audit test that fails CI when a v3 Server method delegates only to api.Unimplemented for an operation the spec marks stable.", + "Establish a single documented convention for the two surfaces' handler shape (or a migration plan to retire v1 httpdriver) so reviewers are not maintaining two divergent conventions indefinitely.", + "Surface feature-gated/unimplemented status in the OpenAPI operation descriptions so SDK consumers see it, and track the v1->v3 cutover in api/v3/server/CLAUDE.md." + ], + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "api/v3/server", + "api/v3/handlers", + "openmeter/server/router", + "api/spec", + "api/client" + ], + "source": "deep:synthesis", + "depth": "canonical", + "first_seen": "2026-06-05", + "confirmed_in_scan": 1 + } + ], + "notes": "SCAN_MODE=full produced fresh from blueprint_raw.json Wave-1 analysis. Preserved all 13 prior canonical findings (f_0001-f_0013) verbatim with ids/first_seen/verdict_history/status intact, root causes re-named in the Design agent's key_decisions vocabulary (e.g. 'credits.enabled feature flag enforced at four independent wiring layers via noop implementations', 'Namespace Manager fan-out provisioning with cmd/server as the sole handler registrant', 'Kafka + Watermill async backbone with three name-prefix-routed topics'). Re-verified and corrected drifted line numbers against current source: server.go context.Background now :222-223 (was :213), eventbus default case now :142 (was :141), grouphandler return nil :54, appclient UpdateAppStatus :240 (stable), customer adapter FieldName filter :59 (stable). Active findings bumped confirmed_in_scan (f_0003->7, f_0005->7, f_0006->6, f_0007->6, f_0008->5, f_0009->4, f_0010->4, f_0011->3, f_0012->2, f_0013->2); demoted findings (f_0001,f_0002,f_0004) left at demoted state. ONE new finding: f_0014 - v3 CreateCreditAdjustment (routes.go:419) and QueryGovernanceAccess (routes.go:473) unconditionally return HTTP 501 despite being advertised stable in the generated TypeSpec/OpenAPI contract and all three SDKs; verified api.Unimplemented (api.gen.go:7186-7191) writes StatusNotImplemented, and sibling credit handlers DO delegate to real handlers when Enabled - so these two are permanent stubs, not feature gates; fires on every call -> finding, paired to new pf_0015. THREE new pitfalls: pf_0013 (panic-in-production in ledger TemplateCode codes.go:113 when a template's code() is empty - latent class, no current firing caller since all registered templates have codes, so pitfall not finding); pf_0014 (test-only import cycle through shared test/billing fixtures - Wave-1 structure draft #1 was filed as a 'production cycle' but verification shows test/billing NON-test files do NOT import charges/service or subscriptionsync/service, so it is a test-graph coupling pitfall, not a production-cycle finding); pf_0015 (dual v1/v3 API surface with api.Unimplemented escape hatch diverging contract from runtime - the architectural class behind f_0014, also covering Wave-1 structure draft #3). Wave-1 structure draft #2 (rating service mutator/rate/testutil 4-dir cycle) was investigated and is NOT a real cycle: rate's test files use 'package rate_test' (external test package, which Go fully supports) and testutil/ubptest.go importing service does not close a production loop - dropped, no finding or pitfall emitted for it. All five Wave-1 Data-agent drafts remain covered (customer ILIKE -> f_0011; ClickHouse migration-less -> f_0013/pf_0010; billing schema_level -> f_0012/pf_0011; LedgerCustomerAccount FK-less -> pf_0010; LedgerSubAccountRoute denormalization -> pf_0012). Total store: 14 findings (13 carried + 1 new), 6 pitfalls (3 carried + 3 new). Soft floor of 3 met for both streams.", + "architecture_diagram": "graph TD\n Client[\"API clients / SDKs (Go, JS, Python)\"] --> Server[\"cmd/server: Chi v1+v3 HTTP API (oapi-codegen)\"]\n Server --> Domains[\"openmeter/* domain services (billing, customer, subscription, entitlement, credit, ledger, meter)\"]\n Domains --> Ent[\"Ent adapters + entutils.TransactingRepo\"]\n Ent --> Postgres[(\"PostgreSQL (Ent schema + Atlas)\")]\n Domains --> EventBus[\"Watermill eventbus.Publisher\"]\n EventBus --> Kafka[(\"Kafka topics (ingest / system / worker)\")]\n Client -->|usage events| Ingest[\"ingest.Collector (Redis dedupe)\"]\n Ingest --> Kafka\n Kafka --> Sink[\"cmd/sink-worker: 3-phase flush\"]\n Sink --> ClickHouse[(\"ClickHouse events (MergeTree)\")]\n Kafka --> Workers[\"billing-worker / balance-worker / notification-service\"]\n Workers --> Domains\n ClickHouse --> Domains\n Workers --> Svix[\"Svix webhook delivery\"]" +} \ No newline at end of file diff --git a/.archie/c4.json b/.archie/c4.json new file mode 100644 index 0000000000..0b0cca34b3 --- /dev/null +++ b/.archie/c4.json @@ -0,0 +1,5 @@ +{ + "context": "C4Context\ntitle System Context \u2014 openmeter\nSystem(openmeter, \"openmeter\", \"This system\")\nSystem_Ext(gobl, \"GOBL\", \"External system\")\nSystem_Ext(opentelemetry, \"OpenTelemetry\", \"External system\")\nSystem_Ext(stripe, \"Stripe\", \"External system\")\nSystem_Ext(svix, \"Svix\", \"External system\")\nSystem_Ext(viper_cobra, \"Viper + Cobra\", \"External system\")\nSystemDb(clickhouse_events, \"clickhouse_events\", \"Datastore\")\nSystemDb(kafka_ingest, \"kafka_ingest\", \"Datastore\")\nSystemDb(primary_postgres, \"primary_postgres\", \"Datastore\")\nSystemDb(redis, \"redis\", \"Datastore\")\nRel(openmeter, clickhouse_events, \"reads/writes\")\nRel(openmeter, gobl, \"uses\")\nRel(openmeter, kafka_ingest, \"reads/writes\")\nRel(openmeter, opentelemetry, \"uses\")\nRel(openmeter, primary_postgres, \"reads/writes\")\nRel(openmeter, redis, \"reads/writes\")\nRel(openmeter, stripe, \"uses\")\nRel(openmeter, svix, \"uses\")\nRel(openmeter, viper_cobra, \"uses\")", + "container": "C4Container\ntitle Containers \u2014 openmeter\nSystem_Boundary(b_cmd, \"cmd\") {\n Container(cmd_balance_worker_main_go, \"balance-worker\", \"worker\")\n Container(cmd_billing_worker_main_go, \"billing-worker\", \"worker\")\n Container(cmd_jobs_main_go, \"jobs\", \"cli\")\n Container(cmd_notification_service_main_go, \"notification-service\", \"service\")\n Container(cmd_server_main_go, \"server\", \"service\")\n Container(cmd_sink_worker_main_go, \"sink-worker\", \"worker\")\n}\nSystem_Boundary(b_collector, \"collector\") {\n Container(collector_cmd_main_go, \"cmd\", \"app\")\n}\nSystem_Boundary(b_tools, \"tools\") {\n Container(tools_migrate_cmd_viewgen_main_go, \"viewgen\", \"app\")\n}\nContainerDb(clickhouse_events, \"clickhouse_events\", \"Datastore\")\nContainerDb(kafka_ingest, \"kafka_ingest\", \"Datastore\")\nContainerDb(primary_postgres, \"primary_postgres\", \"Datastore\")\nContainerDb(redis, \"redis\", \"Datastore\")\nSystem_Ext(gobl, \"GOBL\", \"External system\")\nSystem_Ext(opentelemetry, \"OpenTelemetry\", \"External system\")\nSystem_Ext(stripe, \"Stripe\", \"External system\")\nSystem_Ext(svix, \"Svix\", \"External system\")\nSystem_Ext(viper_cobra, \"Viper + Cobra\", \"External system\")\nRel(cmd_balance_worker_main_go, clickhouse_events, \"writes\")\nRel(cmd_balance_worker_main_go, primary_postgres, \"writes\")\nRel(cmd_billing_worker_main_go, clickhouse_events, \"writes\")\nRel(cmd_billing_worker_main_go, primary_postgres, \"writes\")\nRel(cmd_jobs_main_go, clickhouse_events, \"writes\")\nRel(cmd_jobs_main_go, primary_postgres, \"writes\")\nRel(cmd_notification_service_main_go, clickhouse_events, \"writes\")\nRel(cmd_notification_service_main_go, primary_postgres, \"writes\")\nRel(cmd_server_main_go, clickhouse_events, \"writes\")\nRel(cmd_server_main_go, primary_postgres, \"writes\")\nRel(cmd_sink_worker_main_go, clickhouse_events, \"writes\")\nRel(cmd_sink_worker_main_go, primary_postgres, \"writes\")\nRel(collector_cmd_main_go, clickhouse_events, \"writes\")\nRel(collector_cmd_main_go, primary_postgres, \"writes\")", + "component": "C4Component\ntitle Components \u2014 openmeter\nContainer_Boundary(bc_api, \"api\") {\n Component(generated_api_contract_v1_server_interface, \"Generated API contract & v1 server interface\", \"Top-level api package (43 in-edges): api.gen.go is the oapi-\")\n Component(javascript_typescript_sdk, \"JavaScript/TypeScript SDK\", \"Published @openmeter/sdk npm package. src/client/index.ts bu\")\n Component(python_sdk, \"Python SDK\", \"Published `openmeter` Poetry package (Apache-2.0), a corehtt\")\n Component(typespec_api_specification, \"TypeSpec API specification\", \"Node/pnpm workspace authoring the API contract in TypeSpec, \")\n Component(v3_api_layer_aip_style, \"v3 API layer (AIP-style)\", \"Newer Google-AIP-style HTTP API. api.gen.go is the oapi-code\")\n}\nContainer_Boundary(bc_app, \"app\") {\n Component(application_wiring_app_common, \"Application wiring (app/common)\", \"The dependency-injection layer. Each file is a Google Wire p\")\n}\nContainer_Boundary(bc_cmd, \"cmd\") {\n Component(server_entrypoint_di_bootstrap, \"Server entrypoint & DI bootstrap\", \"main() loads config via Viper (with config.DecodeHook), vali\")\n Component(worker_job_entrypoints, \"Worker & job entrypoints\", \"Five additional binaries beyond the API server, each with it\")\n}\nContainer_Boundary(bc_collector, \"collector\") {\n Component(collector_benthos_redpanda_connect, \"Collector (Benthos/Redpanda Connect)\", \"Separate Go module + binary that streams external usage even\")\n}\nContainer_Boundary(bc_openmeter, \"openmeter\") {\n Component(app_marketplace_integrations, \"App / marketplace integrations\", \"Third-party app/marketplace framework (53 in-edges). Root de\")\n Component(billing_domain, \"Billing domain\", \"Largest domain (41 files in root, 95 in-edges). Root package\")\n Component(charges_sub_system, \"Charges sub-system\", \"Usage-based billing charge engine layered under billing. met\")\n Component(credit_grant_domain, \"Credit & grant domain\", \"Credit-grant accounting feeding entitlements. Root declares \")\n Component(customer_domain, \"Customer domain\", \"High-fan-in domain (103 in-edges). Root declares customer.Se\")\n Component(ent_schema_db_source_of_truth, \"Ent schema (DB source of truth)\", \"Hand-written Ent entity definitions that are the source of t\")\n Component(entitlement_domain, \"Entitlement domain\", \"Access-control domain (40 in-edges, 19 out-edges). Root decl\")\n Component(generated_ent_client, \"Generated Ent client\", \"Ent-generated ORM client (407 files, 60 in-edges, 108 out-ed\")\n Component(ingest_sink_pipeline, \"Ingest & sink pipeline\", \"Usage event intake. ingest/ defines the ingest service, in-m\")\n Component(ledger_domain, \"Ledger domain\", \"Double-entry-style ledger for customer credit accounts (35 i\")\n Component(legacy_v1_http_router, \"Legacy v1 HTTP router\", \"Assembles the legacy v1 HTTP API. router.go validates reques\")\n Component(meter_domain, \"Meter domain\", \"Meter definition domain (70 in-edges). Root declares meter.S\")\n Component(notification_domain, \"Notification domain\", \"Notification event pipeline. Root declares notification.Serv\")\n Component(product_catalog_domain, \"Product catalog domain\", \"Highest non-pkg fan-in (104 in-edges). Holds plan, addon, pl\")\n Component(registry_builder, \"Registry & builder\", \"Aggregation structs that bundle related connectors for downs\")\n Component(streaming_usage_query_clickhouse, \"Streaming / usage query (ClickHouse)\", \"Defines the streaming.Connector interface (extends namespace\")\n Component(subscription_domain, \"Subscription domain\", \"31-file domain (37 in-edges, 25 out-edges). Root holds the s\")\n}\nContainer_Boundary(bc_pkg, \"pkg\") {\n Component(shared_utility_packages_pkg, \"Shared utility packages (pkg/)\", \"Cross-cutting Go utilities, several of which are the codebas\")\n}\nContainer_Boundary(bc_tools, \"tools\") {\n Component(database_migrations, \"Database migrations\", \"Migration tooling and SQL files. migrations/ holds golang-mi\")\n}\nRel(app_marketplace_integrations, generated_api_contract_v1_server_interface, \"depends on\")\nRel(app_marketplace_integrations, shared_utility_packages_pkg, \"depends on\")\nRel(application_wiring_app_common, app_marketplace_integrations, \"depends on\")\nRel(application_wiring_app_common, billing_domain, \"depends on\")\nRel(application_wiring_app_common, charges_sub_system, \"depends on\")\nRel(application_wiring_app_common, customer_domain, \"depends on\")\nRel(application_wiring_app_common, database_migrations, \"depends on\")\nRel(application_wiring_app_common, entitlement_domain, \"depends on\")\nRel(application_wiring_app_common, generated_api_contract_v1_server_interface, \"depends on\")\nRel(application_wiring_app_common, generated_ent_client, \"depends on\")\nRel(application_wiring_app_common, ingest_sink_pipeline, \"depends on\")\nRel(application_wiring_app_common, ledger_domain, \"depends on\")\nRel(application_wiring_app_common, meter_domain, \"depends on\")\nRel(application_wiring_app_common, notification_domain, \"depends on\")\nRel(application_wiring_app_common, product_catalog_domain, \"depends on\")\nRel(application_wiring_app_common, registry_builder, \"depends on\")\nRel(application_wiring_app_common, shared_utility_packages_pkg, \"depends on\")\nRel(application_wiring_app_common, streaming_usage_query_clickhouse, \"depends on\")\nRel(application_wiring_app_common, subscription_domain, \"depends on\")\nRel(billing_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(billing_domain, shared_utility_packages_pkg, \"depends on\")\nRel(charges_sub_system, database_migrations, \"depends on\")\nRel(charges_sub_system, shared_utility_packages_pkg, \"depends on\")\nRel(collector_benthos_redpanda_connect, generated_api_contract_v1_server_interface, \"depends on\")\nRel(credit_grant_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(credit_grant_domain, shared_utility_packages_pkg, \"depends on\")\nRel(customer_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(customer_domain, shared_utility_packages_pkg, \"depends on\")\nRel(database_migrations, product_catalog_domain, \"depends on\")\nRel(database_migrations, shared_utility_packages_pkg, \"depends on\")\nRel(ent_schema_db_source_of_truth, shared_utility_packages_pkg, \"depends on\")\nRel(entitlement_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(entitlement_domain, shared_utility_packages_pkg, \"depends on\")\nRel(generated_api_contract_v1_server_interface, meter_domain, \"depends on\")\nRel(generated_api_contract_v1_server_interface, shared_utility_packages_pkg, \"depends on\")\nRel(generated_ent_client, shared_utility_packages_pkg, \"depends on\")\nRel(ingest_sink_pipeline, generated_api_contract_v1_server_interface, \"depends on\")\nRel(ingest_sink_pipeline, shared_utility_packages_pkg, \"depends on\")\nRel(ledger_domain, database_migrations, \"depends on\")\nRel(ledger_domain, shared_utility_packages_pkg, \"depends on\")\nRel(legacy_v1_http_router, generated_api_contract_v1_server_interface, \"depends on\")\nRel(legacy_v1_http_router, shared_utility_packages_pkg, \"depends on\")\nRel(legacy_v1_http_router, v3_api_layer_aip_style, \"depends on\")\nRel(meter_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(meter_domain, shared_utility_packages_pkg, \"depends on\")\nRel(notification_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(notification_domain, shared_utility_packages_pkg, \"depends on\")\nRel(product_catalog_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(product_catalog_domain, shared_utility_packages_pkg, \"depends on\")\nRel(registry_builder, shared_utility_packages_pkg, \"depends on\")\nRel(server_entrypoint_di_bootstrap, application_wiring_app_common, \"depends on\")\nRel(server_entrypoint_di_bootstrap, billing_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, customer_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, generated_ent_client, \"depends on\")\nRel(server_entrypoint_di_bootstrap, ingest_sink_pipeline, \"depends on\")\nRel(server_entrypoint_di_bootstrap, ledger_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, legacy_v1_http_router, \"depends on\")\nRel(server_entrypoint_di_bootstrap, meter_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, notification_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, product_catalog_domain, \"depends on\")\nRel(server_entrypoint_di_bootstrap, registry_builder, \"depends on\")\nRel(server_entrypoint_di_bootstrap, shared_utility_packages_pkg, \"depends on\")\nRel(server_entrypoint_di_bootstrap, streaming_usage_query_clickhouse, \"depends on\")\nRel(shared_utility_packages_pkg, generated_api_contract_v1_server_interface, \"depends on\")\nRel(shared_utility_packages_pkg, generated_ent_client, \"depends on\")\nRel(shared_utility_packages_pkg, v3_api_layer_aip_style, \"depends on\")\nRel(streaming_usage_query_clickhouse, shared_utility_packages_pkg, \"depends on\")\nRel(subscription_domain, database_migrations, \"depends on\")\nRel(subscription_domain, generated_api_contract_v1_server_interface, \"depends on\")\nRel(subscription_domain, shared_utility_packages_pkg, \"depends on\")\nRel(v3_api_layer_aip_style, app_marketplace_integrations, \"depends on\")\nRel(v3_api_layer_aip_style, billing_domain, \"depends on\")\nRel(v3_api_layer_aip_style, charges_sub_system, \"depends on\")\nRel(v3_api_layer_aip_style, customer_domain, \"depends on\")\nRel(v3_api_layer_aip_style, entitlement_domain, \"depends on\")\nRel(v3_api_layer_aip_style, ingest_sink_pipeline, \"depends on\")\nRel(v3_api_layer_aip_style, ledger_domain, \"depends on\")\nRel(v3_api_layer_aip_style, meter_domain, \"depends on\")\nRel(v3_api_layer_aip_style, product_catalog_domain, \"depends on\")\nRel(v3_api_layer_aip_style, shared_utility_packages_pkg, \"depends on\")\nRel(v3_api_layer_aip_style, streaming_usage_query_clickhouse, \"depends on\")\nRel(v3_api_layer_aip_style, subscription_domain, \"depends on\")\nRel(worker_job_entrypoints, app_marketplace_integrations, \"depends on\")\nRel(worker_job_entrypoints, application_wiring_app_common, \"depends on\")\nRel(worker_job_entrypoints, billing_domain, \"depends on\")\nRel(worker_job_entrypoints, charges_sub_system, \"depends on\")\nRel(worker_job_entrypoints, customer_domain, \"depends on\")\nRel(worker_job_entrypoints, entitlement_domain, \"depends on\")\nRel(worker_job_entrypoints, generated_ent_client, \"depends on\")\nRel(worker_job_entrypoints, ingest_sink_pipeline, \"depends on\")\nRel(worker_job_entrypoints, ledger_domain, \"depends on\")\nRel(worker_job_entrypoints, meter_domain, \"depends on\")\nRel(worker_job_entrypoints, notification_domain, \"depends on\")\nRel(worker_job_entrypoints, product_catalog_domain, \"depends on\")\nRel(worker_job_entrypoints, registry_builder, \"depends on\")\nRel(worker_job_entrypoints, shared_utility_packages_pkg, \"depends on\")\nRel(worker_job_entrypoints, streaming_usage_query_clickhouse, \"depends on\")" +} \ No newline at end of file diff --git a/.archie/deep_scan_state.json b/.archie/deep_scan_state.json new file mode 100644 index 0000000000..054ce398ac --- /dev/null +++ b/.archie/deep_scan_state.json @@ -0,0 +1,27 @@ +{ + "completed_steps": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "last_completed": 9, + "status": "completed", + "started_at": "2026-06-05T12:58:48.310084+00:00", + "run_context": { + "scan_mode": "full", + "depth": "comprehensive", + "scope": "whole", + "intent_layer": "yes", + "monorepo_type": "none", + "start_step": 1, + "workspaces": [ + "[]" + ] + } +} \ No newline at end of file diff --git a/.archie/dependency_graph.json b/.archie/dependency_graph.json new file mode 100644 index 0000000000..241e988542 --- /dev/null +++ b/.archie/dependency_graph.json @@ -0,0 +1,48617 @@ +{ + "nodes": [ + { + "id": "api", + "label": "api", + "component": "", + "inDegree": 43, + "outDegree": 1, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "api/client/go", + "label": "go", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "api/client/python/examples/async", + "label": "async", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/client/python/examples/sync", + "label": "sync", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/spec/packages/aip/lib", + "label": "lib", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "api/spec/packages/aip/lib/rules", + "label": "rules", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "api/spec/packages/legacy/lib", + "label": "lib", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "api/spec/packages/legacy/lib/rules", + "label": "rules", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "api/v3", + "label": "v3", + "component": "", + "inDegree": 29, + "outDegree": 1, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "api/v3/apierrors", + "label": "apierrors", + "component": "", + "inDegree": 22, + "outDegree": 8, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/v3/filters", + "label": "filters", + "component": "", + "inDegree": 11, + "outDegree": 4, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/v3/handlers/addons", + "label": "addons", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "api/v3/handlers/apps", + "label": "apps", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/v3/handlers/billingprofiles", + "label": "billingprofiles", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "api/v3/handlers/currencies", + "label": "currencies", + "component": "", + "inDegree": 2, + "outDegree": 11, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "api/v3/handlers/customers", + "label": "customers", + "component": "", + "inDegree": 1, + "outDegree": 13, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "api/v3/handlers/customers/billing", + "label": "billing", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "api/v3/handlers/customers/charges", + "label": "charges", + "component": "", + "inDegree": 1, + "outDegree": 19, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "api/v3/handlers/customers/credits", + "label": "credits", + "component": "", + "inDegree": 1, + "outDegree": 21, + "inCycle": false, + "fileCount": 12 + }, + { + "id": "api/v3/handlers/customers/entitlementaccess", + "label": "entitlementaccess", + "component": "", + "inDegree": 1, + "outDegree": 9, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "api/v3/handlers/events", + "label": "events", + "component": "", + "inDegree": 1, + "outDegree": 15, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "api/v3/handlers/featurecost", + "label": "featurecost", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "api/v3/handlers/features", + "label": "features", + "component": "", + "inDegree": 1, + "outDegree": 15, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "api/v3/handlers/llmcost", + "label": "llmcost", + "component": "", + "inDegree": 1, + "outDegree": 10, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "api/v3/handlers/meters", + "label": "meters", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": false, + "fileCount": 12 + }, + { + "id": "api/v3/handlers/meters/query", + "label": "query", + "component": "", + "inDegree": 2, + "outDegree": 8, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "api/v3/handlers/plans", + "label": "plans", + "component": "", + "inDegree": 1, + "outDegree": 15, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "api/v3/handlers/plans/planaddons", + "label": "planaddons", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "api/v3/handlers/subscriptions", + "label": "subscriptions", + "component": "", + "inDegree": 1, + "outDegree": 16, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "api/v3/handlers/subscriptions/subscriptionaddons", + "label": "subscriptionaddons", + "component": "", + "inDegree": 1, + "outDegree": 12, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "api/v3/handlers/taxcodes", + "label": "taxcodes", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "api/v3/labels", + "label": "labels", + "component": "", + "inDegree": 13, + "outDegree": 3, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "api/v3/oasmiddleware", + "label": "oasmiddleware", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "api/v3/render", + "label": "render", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "api/v3/request", + "label": "request", + "component": "", + "inDegree": 18, + "outDegree": 4, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "api/v3/response", + "label": "response", + "component": "", + "inDegree": 16, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "api/v3/server", + "label": "server", + "component": "", + "inDegree": 1, + "outDegree": 55, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "api/v3/test", + "label": "test", + "component": "", + "inDegree": 0, + "outDegree": 2, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "app/common", + "label": "common", + "component": "", + "inDegree": 6, + "outDegree": 174, + "inCycle": false, + "fileCount": 45 + }, + { + "id": "app/config", + "label": "config", + "component": "", + "inDegree": 22, + "outDegree": 16, + "inCycle": false, + "fileCount": 31 + }, + { + "id": "cmd/balance-worker", + "label": "balance-worker", + "component": "", + "inDegree": 0, + "outDegree": 5, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "cmd/billing-worker", + "label": "billing-worker", + "component": "", + "inDegree": 0, + "outDegree": 12, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "cmd/jobs", + "label": "jobs", + "component": "", + "inDegree": 0, + "outDegree": 8, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "cmd/jobs/billing", + "label": "billing", + "component": "", + "inDegree": 1, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/billing/advance", + "label": "advance", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/billing/advancecharges", + "label": "advancecharges", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/billing/collect", + "label": "collect", + "component": "", + "inDegree": 1, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/billing/subscriptionsync", + "label": "subscriptionsync", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/entitlement", + "label": "entitlement", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "cmd/jobs/internal", + "label": "internal", + "component": "", + "inDegree": 10, + "outDegree": 26, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "cmd/jobs/ledger", + "label": "ledger", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/ledger/backfillaccounts", + "label": "backfillaccounts", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/ledger/service", + "label": "service", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "cmd/jobs/llmcost", + "label": "llmcost", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/migrate", + "label": "migrate", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "cmd/jobs/quickstart", + "label": "quickstart", + "component": "", + "inDegree": 1, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "cmd/notification-service", + "label": "notification-service", + "component": "", + "inDegree": 0, + "outDegree": 12, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "cmd/server", + "label": "server", + "component": "", + "inDegree": 0, + "outDegree": 39, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "cmd/sink-worker", + "label": "sink-worker", + "component": "", + "inDegree": 0, + "outDegree": 10, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "collector/benthos/bloblang", + "label": "bloblang", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "collector/benthos/input", + "label": "input", + "component": "", + "inDegree": 1, + "outDegree": 5, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "collector/benthos/input/runai", + "label": "runai", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "collector/benthos/internal/logging", + "label": "logging", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "collector/benthos/internal/message", + "label": "message", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "collector/benthos/internal/shutdown", + "label": "shutdown", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "collector/benthos/output", + "label": "output", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "collector/benthos/services/leaderelection", + "label": "leaderelection", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "collector/cmd", + "label": "cmd", + "component": "", + "inDegree": 0, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "e2e", + "label": "e2e", + "component": "", + "inDegree": 0, + "outDegree": 7, + "inCycle": false, + "fileCount": 22 + }, + { + "id": "openmeter", + "label": "openmeter", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 0 + }, + { + "id": "openmeter/apiconverter", + "label": "apiconverter", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/app", + "label": "app", + "component": "", + "inDegree": 53, + "outDegree": 7, + "inCycle": true, + "fileCount": 13 + }, + { + "id": "openmeter/app/adapter", + "label": "adapter", + "component": "", + "inDegree": 6, + "outDegree": 8, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/app/custominvoicing", + "label": "custominvoicing", + "component": "", + "inDegree": 14, + "outDegree": 6, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/app/custominvoicing/adapter", + "label": "adapter", + "component": "", + "inDegree": 2, + "outDegree": 7, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/app/custominvoicing/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 9, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/app/custominvoicing/service", + "label": "service", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/app/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 3, + "outDegree": 12, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/app/sandbox", + "label": "sandbox", + "component": "", + "inDegree": 7, + "outDegree": 6, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/app/service", + "label": "service", + "component": "", + "inDegree": 6, + "outDegree": 5, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/app/stripe", + "label": "stripe", + "component": "", + "inDegree": 15, + "outDegree": 14, + "inCycle": false, + "fileCount": 13 + }, + { + "id": "openmeter/app/stripe/adapter", + "label": "adapter", + "component": "", + "inDegree": 3, + "outDegree": 13, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/app/stripe/client", + "label": "client", + "component": "", + "inDegree": 5, + "outDegree": 7, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "openmeter/app/stripe/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 12, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/app/stripe/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 9, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/billing", + "label": "billing", + "component": "", + "inDegree": 95, + "outDegree": 23, + "inCycle": true, + "fileCount": 41 + }, + { + "id": "openmeter/billing/adapter", + "label": "adapter", + "component": "", + "inDegree": 5, + "outDegree": 42, + "inCycle": false, + "fileCount": 18 + }, + { + "id": "openmeter/billing/charges", + "label": "charges", + "component": "", + "inDegree": 20, + "outDegree": 15, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "openmeter/billing/charges/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 14, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/charges/creditpurchase", + "label": "creditpurchase", + "component": "", + "inDegree": 17, + "outDegree": 12, + "inCycle": true, + "fileCount": 10 + }, + { + "id": "openmeter/billing/charges/creditpurchase/adapter", + "label": "adapter", + "component": "", + "inDegree": 5, + "outDegree": 21, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/billing/charges/creditpurchase/lineengine", + "label": "lineengine", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/creditpurchase/service", + "label": "service", + "component": "", + "inDegree": 5, + "outDegree": 15, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "openmeter/billing/charges/flatfee", + "label": "flatfee", + "component": "", + "inDegree": 19, + "outDegree": 17, + "inCycle": true, + "fileCount": 10 + }, + { + "id": "openmeter/billing/charges/flatfee/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 25, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "openmeter/billing/charges/flatfee/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 21, + "inCycle": false, + "fileCount": 12 + }, + { + "id": "openmeter/billing/charges/flatfee/service/realizations", + "label": "realizations", + "component": "", + "inDegree": 1, + "outDegree": 13, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/billing/charges/invoiceupdater", + "label": "invoiceupdater", + "component": "", + "inDegree": 6, + "outDegree": 6, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/billing/charges/lineage", + "label": "lineage", + "component": "", + "inDegree": 15, + "outDegree": 3, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/billing/charges/lineage/adapter", + "label": "adapter", + "component": "", + "inDegree": 7, + "outDegree": 8, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/charges/lineage/service", + "label": "service", + "component": "", + "inDegree": 7, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/meta", + "label": "meta", + "component": "", + "inDegree": 39, + "outDegree": 11, + "inCycle": true, + "fileCount": 15 + }, + { + "id": "openmeter/billing/charges/meta/adapter", + "label": "adapter", + "component": "", + "inDegree": 7, + "outDegree": 7, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/charges/models/chargemeta", + "label": "chargemeta", + "component": "", + "inDegree": 4, + "outDegree": 8, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/models/creditrealization", + "label": "creditrealization", + "component": "", + "inDegree": 23, + "outDegree": 7, + "inCycle": true, + "fileCount": 8 + }, + { + "id": "openmeter/billing/charges/models/invoicedusage", + "label": "invoicedusage", + "component": "", + "inDegree": 10, + "outDegree": 5, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/billing/charges/models/ledgertransaction", + "label": "ledgertransaction", + "component": "", + "inDegree": 16, + "outDegree": 1, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/models/payment", + "label": "payment", + "component": "", + "inDegree": 24, + "outDegree": 6, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/billing/charges/service", + "label": "service", + "component": "", + "inDegree": 2, + "outDegree": 48, + "inCycle": true, + "fileCount": 22 + }, + { + "id": "openmeter/billing/charges/statemachine", + "label": "statemachine", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/charges/testutils", + "label": "testutils", + "component": "", + "inDegree": 3, + "outDegree": 26, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/billing/charges/usagebased", + "label": "usagebased", + "component": "", + "inDegree": 25, + "outDegree": 20, + "inCycle": true, + "fileCount": 14 + }, + { + "id": "openmeter/billing/charges/usagebased/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 25, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "openmeter/billing/charges/usagebased/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 30, + "inCycle": false, + "fileCount": 15 + }, + { + "id": "openmeter/billing/charges/usagebased/service/rating", + "label": "rating", + "component": "", + "inDegree": 2, + "outDegree": 20, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/billing/charges/usagebased/service/rating/delta", + "label": "delta", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 10 + }, + { + "id": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "label": "periodpreserving", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/billing/charges/usagebased/service/rating/subtract", + "label": "subtract", + "component": "", + "inDegree": 2, + "outDegree": 10, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/billing/charges/usagebased/service/rating/testutils", + "label": "testutils", + "component": "", + "inDegree": 3, + "outDegree": 8, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/usagebased/service/run", + "label": "run", + "component": "", + "inDegree": 1, + "outDegree": 16, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "openmeter/billing/charges/worker/advance", + "label": "advance", + "component": "", + "inDegree": 2, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/charges/worker/asyncadvance", + "label": "asyncadvance", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/creditgrant", + "label": "creditgrant", + "component": "", + "inDegree": 7, + "outDegree": 9, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/creditgrant/service", + "label": "service", + "component": "", + "inDegree": 2, + "outDegree": 14, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 4, + "outDegree": 30, + "inCycle": false, + "fileCount": 12 + }, + { + "id": "openmeter/billing/lineengine", + "label": "lineengine", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/models/creditsapplied", + "label": "creditsapplied", + "component": "", + "inDegree": 4, + "outDegree": 2, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/billing/models/externalid", + "label": "externalid", + "component": "", + "inDegree": 5, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/models/stddetailedline", + "label": "stddetailedline", + "component": "", + "inDegree": 24, + "outDegree": 9, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/billing/models/totals", + "label": "totals", + "component": "", + "inDegree": 29, + "outDegree": 1, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/rating", + "label": "rating", + "component": "", + "inDegree": 18, + "outDegree": 7, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/billing/rating/service", + "label": "service", + "component": "", + "inDegree": 13, + "outDegree": 11, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/billing/rating/service/mutator", + "label": "mutator", + "component": "", + "inDegree": 2, + "outDegree": 9, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/billing/rating/service/rate", + "label": "rate", + "component": "", + "inDegree": 2, + "outDegree": 10, + "inCycle": true, + "fileCount": 15 + }, + { + "id": "openmeter/billing/rating/service/testutil", + "label": "testutil", + "component": "", + "inDegree": 3, + "outDegree": 7, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/billing/service", + "label": "service", + "component": "", + "inDegree": 5, + "outDegree": 25, + "inCycle": false, + "fileCount": 21 + }, + { + "id": "openmeter/billing/service/invoicecalc", + "label": "invoicecalc", + "component": "", + "inDegree": 6, + "outDegree": 14, + "inCycle": false, + "fileCount": 13 + }, + { + "id": "openmeter/billing/testutils", + "label": "testutils", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/validators/customer", + "label": "customer", + "component": "", + "inDegree": 1, + "outDegree": 5, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/validators/subscription", + "label": "subscription", + "component": "", + "inDegree": 1, + "outDegree": 6, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker", + "label": "worker", + "component": "", + "inDegree": 1, + "outDegree": 9, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker/advance", + "label": "advance", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker/asyncadvance", + "label": "asyncadvance", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker/collect", + "label": "collect", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker/subscriptionsync", + "label": "subscriptionsync", + "component": "", + "inDegree": 8, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 7, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/reconciler", + "label": "reconciler", + "component": "", + "inDegree": 4, + "outDegree": 8, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 47, + "inCycle": true, + "fileCount": 11 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "label": "persistedstate", + "component": "", + "inDegree": 3, + "outDegree": 11, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "label": "reconciler", + "component": "", + "inDegree": 1, + "outDegree": 18, + "inCycle": false, + "fileCount": 12 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "label": "invoiceupdater", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "label": "targetstate", + "component": "", + "inDegree": 2, + "outDegree": 11, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/cost", + "label": "cost", + "component": "", + "inDegree": 8, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/cost/adapter", + "label": "adapter", + "component": "", + "inDegree": 1, + "outDegree": 8, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/cost/service", + "label": "service", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/credit", + "label": "credit", + "component": "", + "inDegree": 13, + "outDegree": 13, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/credit/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 17, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/credit/balance", + "label": "balance", + "component": "", + "inDegree": 9, + "outDegree": 6, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/credit/driver", + "label": "driver", + "component": "", + "inDegree": 1, + "outDegree": 16, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/credit/engine", + "label": "engine", + "component": "", + "inDegree": 3, + "outDegree": 8, + "inCycle": true, + "fileCount": 11 + }, + { + "id": "openmeter/credit/grant", + "label": "grant", + "component": "", + "inDegree": 16, + "outDegree": 13, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/credit/hook", + "label": "hook", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/currencies", + "label": "currencies", + "component": "", + "inDegree": 8, + "outDegree": 5, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/currencies/adapter", + "label": "adapter", + "component": "", + "inDegree": 1, + "outDegree": 11, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/currencies/service", + "label": "service", + "component": "", + "inDegree": 1, + "outDegree": 6, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/customer", + "label": "customer", + "component": "", + "inDegree": 103, + "outDegree": 10, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/customer/adapter", + "label": "adapter", + "component": "", + "inDegree": 14, + "outDegree": 22, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/customer/app", + "label": "app", + "component": "", + "inDegree": 5, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/customer/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 4, + "outDegree": 17, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/customer/service", + "label": "service", + "component": "", + "inDegree": 13, + "outDegree": 10, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/customer/service/hooks", + "label": "hooks", + "component": "", + "inDegree": 5, + "outDegree": 17, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/customer/testutils", + "label": "testutils", + "component": "", + "inDegree": 1, + "outDegree": 10, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/debug", + "label": "debug", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/debug/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 5, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/dedupe", + "label": "dedupe", + "component": "", + "inDegree": 8, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/dedupe/memorydedupe", + "label": "memorydedupe", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/dedupe/redisdedupe", + "label": "redisdedupe", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent", + "label": "ent", + "component": "", + "inDegree": 0, + "outDegree": 6, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db", + "label": "db", + "component": "", + "inDegree": 60, + "outDegree": 108, + "inCycle": true, + "fileCount": 407 + }, + { + "id": "openmeter/ent/db/addon", + "label": "addon", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/addonratecard", + "label": "addonratecard", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/app", + "label": "app", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/appcustomer", + "label": "appcustomer", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/appcustominvoicing", + "label": "appcustominvoicing", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/appcustominvoicingcustomer", + "label": "appcustominvoicingcustomer", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/appstripe", + "label": "appstripe", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/appstripecustomer", + "label": "appstripecustomer", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/balancesnapshot", + "label": "balancesnapshot", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingcustomerlock", + "label": "billingcustomerlock", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingcustomeroverride", + "label": "billingcustomeroverride", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoice", + "label": "billinginvoice", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "label": "billinginvoiceflatfeelineconfig", + "component": "", + "inDegree": 2, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoiceline", + "label": "billinginvoiceline", + "component": "", + "inDegree": 3, + "outDegree": 5, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoicelinediscount", + "label": "billinginvoicelinediscount", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoicelineusagediscount", + "label": "billinginvoicelineusagediscount", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoicesplitlinegroup", + "label": "billinginvoicesplitlinegroup", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "label": "billinginvoiceusagebasedlineconfig", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoicevalidationissue", + "label": "billinginvoicevalidationissue", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billinginvoicewriteschemalevel", + "label": "billinginvoicewriteschemalevel", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingprofile", + "label": "billingprofile", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingsequencenumbers", + "label": "billingsequencenumbers", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingstandardinvoicedetailedline", + "label": "billingstandardinvoicedetailedline", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "label": "billingstandardinvoicedetailedlineamountdiscount", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/billingworkflowconfig", + "label": "billingworkflowconfig", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/charge", + "label": "charge", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargecreditpurchase", + "label": "chargecreditpurchase", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargecreditpurchasecreditgrant", + "label": "chargecreditpurchasecreditgrant", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "label": "chargecreditpurchaseexternalpayment", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "label": "chargecreditpurchaseinvoicedpayment", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfee", + "label": "chargeflatfee", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfeerun", + "label": "chargeflatfeerun", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "label": "chargeflatfeeruncreditallocations", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfeerundetailedline", + "label": "chargeflatfeerundetailedline", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "label": "chargeflatfeeruninvoicedusage", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeflatfeerunpayment", + "label": "chargeflatfeerunpayment", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargessearchv1", + "label": "chargessearchv1", + "component": "", + "inDegree": 2, + "outDegree": 5, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebased", + "label": "chargeusagebased", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "label": "chargeusagebasedruncreditallocations", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebasedrundetailedline", + "label": "chargeusagebasedrundetailedline", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "label": "chargeusagebasedruninvoicedusage", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebasedrunpayment", + "label": "chargeusagebasedrunpayment", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/chargeusagebasedruns", + "label": "chargeusagebasedruns", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/creditrealizationlineage", + "label": "creditrealizationlineage", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/creditrealizationlineagesegment", + "label": "creditrealizationlineagesegment", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/currencycostbasis", + "label": "currencycostbasis", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/customcurrency", + "label": "customcurrency", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/customer", + "label": "customer", + "component": "", + "inDegree": 6, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/customersubjects", + "label": "customersubjects", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/entitlement", + "label": "entitlement", + "component": "", + "inDegree": 5, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/enttest", + "label": "enttest", + "component": "", + "inDegree": 0, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ent/db/feature", + "label": "feature", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/grant", + "label": "grant", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/hook", + "label": "hook", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ent/db/ledgeraccount", + "label": "ledgeraccount", + "component": "", + "inDegree": 5, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgerbreakagerecord", + "label": "ledgerbreakagerecord", + "component": "", + "inDegree": 4, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgercustomeraccount", + "label": "ledgercustomeraccount", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgerentry", + "label": "ledgerentry", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgersubaccount", + "label": "ledgersubaccount", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgersubaccountroute", + "label": "ledgersubaccountroute", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgertransaction", + "label": "ledgertransaction", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/ledgertransactiongroup", + "label": "ledgertransactiongroup", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/llmcostprice", + "label": "llmcostprice", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/meter", + "label": "meter", + "component": "", + "inDegree": 5, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/migrate", + "label": "migrate", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/notificationchannel", + "label": "notificationchannel", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/notificationevent", + "label": "notificationevent", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/notificationeventdeliverystatus", + "label": "notificationeventdeliverystatus", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/notificationrule", + "label": "notificationrule", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/organizationdefaulttaxcodes", + "label": "organizationdefaulttaxcodes", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/plan", + "label": "plan", + "component": "", + "inDegree": 6, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/planaddon", + "label": "planaddon", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/planphase", + "label": "planphase", + "component": "", + "inDegree": 4, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/planratecard", + "label": "planratecard", + "component": "", + "inDegree": 5, + "outDegree": 3, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/predicate", + "label": "predicate", + "component": "", + "inDegree": 94, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ent/db/runtime", + "label": "runtime", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ent/db/subject", + "label": "subject", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscription", + "label": "subscription", + "component": "", + "inDegree": 4, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscriptionaddon", + "label": "subscriptionaddon", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscriptionaddonquantity", + "label": "subscriptionaddonquantity", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscriptionbillingsyncstate", + "label": "subscriptionbillingsyncstate", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscriptionitem", + "label": "subscriptionitem", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/subscriptionphase", + "label": "subscriptionphase", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/taxcode", + "label": "taxcode", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/db/usagereset", + "label": "usagereset", + "component": "", + "inDegree": 2, + "outDegree": 2, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ent/schema", + "label": "schema", + "component": "", + "inDegree": 1, + "outDegree": 28, + "inCycle": true, + "fileCount": 35 + }, + { + "id": "openmeter/ent/tx", + "label": "tx", + "component": "", + "inDegree": 12, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/entitlement", + "label": "entitlement", + "component": "", + "inDegree": 40, + "outDegree": 19, + "inCycle": true, + "fileCount": 13 + }, + { + "id": "openmeter/entitlement/adapter", + "label": "adapter", + "component": "", + "inDegree": 6, + "outDegree": 33, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/entitlement/balanceworker", + "label": "balanceworker", + "component": "", + "inDegree": 4, + "outDegree": 26, + "inCycle": true, + "fileCount": 8 + }, + { + "id": "openmeter/entitlement/balanceworker/events", + "label": "events", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/entitlement/balanceworker/filters", + "label": "filters", + "component": "", + "inDegree": 1, + "outDegree": 5, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/entitlement/boolean", + "label": "boolean", + "component": "", + "inDegree": 7, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/entitlement/driver", + "label": "driver", + "component": "", + "inDegree": 8, + "outDegree": 24, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/entitlement/driver/v2", + "label": "v2", + "component": "", + "inDegree": 2, + "outDegree": 23, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/entitlement/hooks/subscription", + "label": "subscription", + "component": "", + "inDegree": 4, + "outDegree": 3, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/entitlement/metered", + "label": "metered", + "component": "", + "inDegree": 16, + "outDegree": 42, + "inCycle": true, + "fileCount": 16 + }, + { + "id": "openmeter/entitlement/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 30, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/entitlement/snapshot", + "label": "snapshot", + "component": "", + "inDegree": 4, + "outDegree": 8, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/entitlement/static", + "label": "static", + "component": "", + "inDegree": 7, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/entitlement/validators/customer", + "label": "customer", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/event/metadata", + "label": "metadata", + "component": "", + "inDegree": 20, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/event/models", + "label": "models", + "component": "", + "inDegree": 9, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/info/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ingest", + "label": "ingest", + "component": "", + "inDegree": 8, + "outDegree": 2, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/ingest/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 6, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/ingest/ingestadapter", + "label": "ingestadapter", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ingest/kafkaingest", + "label": "kafkaingest", + "component": "", + "inDegree": 3, + "outDegree": 7, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ingest/kafkaingest/serializer", + "label": "serializer", + "component": "", + "inDegree": 8, + "outDegree": 1, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/ingest/kafkaingest/topicresolver", + "label": "topicresolver", + "component": "", + "inDegree": 4, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ledger", + "label": "ledger", + "component": "", + "inDegree": 35, + "outDegree": 11, + "inCycle": true, + "fileCount": 17 + }, + { + "id": "openmeter/ledger/account", + "label": "account", + "component": "", + "inDegree": 11, + "outDegree": 3, + "inCycle": true, + "fileCount": 8 + }, + { + "id": "openmeter/ledger/account/adapter", + "label": "adapter", + "component": "", + "inDegree": 4, + "outDegree": 13, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/ledger/account/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 5, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/ledger/breakage", + "label": "breakage", + "component": "", + "inDegree": 8, + "outDegree": 5, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/ledger/breakage/adapter", + "label": "adapter", + "component": "", + "inDegree": 5, + "outDegree": 9, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/ledger/chargeadapter", + "label": "chargeadapter", + "component": "", + "inDegree": 5, + "outDegree": 32, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "openmeter/ledger/collector", + "label": "collector", + "component": "", + "inDegree": 6, + "outDegree": 16, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/ledger/customerbalance", + "label": "customerbalance", + "component": "", + "inDegree": 6, + "outDegree": 45, + "inCycle": false, + "fileCount": 16 + }, + { + "id": "openmeter/ledger/historical", + "label": "historical", + "component": "", + "inDegree": 4, + "outDegree": 6, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/ledger/historical/adapter", + "label": "adapter", + "component": "", + "inDegree": 2, + "outDegree": 21, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/ledger/noop", + "label": "noop", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/ledger/recognizer", + "label": "recognizer", + "component": "", + "inDegree": 5, + "outDegree": 15, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/ledger/resolvers", + "label": "resolvers", + "component": "", + "inDegree": 8, + "outDegree": 15, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/ledger/resolvers/adapter", + "label": "adapter", + "component": "", + "inDegree": 3, + "outDegree": 7, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/ledger/routingrules", + "label": "routingrules", + "component": "", + "inDegree": 2, + "outDegree": 5, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/ledger/testutils", + "label": "testutils", + "component": "", + "inDegree": 12, + "outDegree": 16, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/ledger/transactions", + "label": "transactions", + "component": "", + "inDegree": 10, + "outDegree": 5, + "inCycle": true, + "fileCount": 22 + }, + { + "id": "openmeter/ledger/transactions/testutils", + "label": "testutils", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/llmcost", + "label": "llmcost", + "component": "", + "inDegree": 15, + "outDegree": 6, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/llmcost/adapter", + "label": "adapter", + "component": "", + "inDegree": 1, + "outDegree": 10, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/llmcost/service", + "label": "service", + "component": "", + "inDegree": 1, + "outDegree": 5, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/llmcost/sync", + "label": "sync", + "component": "", + "inDegree": 2, + "outDegree": 3, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "openmeter/meter", + "label": "meter", + "component": "", + "inDegree": 70, + "outDegree": 6, + "inCycle": true, + "fileCount": 8 + }, + { + "id": "openmeter/meter/adapter", + "label": "adapter", + "component": "", + "inDegree": 5, + "outDegree": 14, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/meter/httphandler", + "label": "httphandler", + "component": "", + "inDegree": 2, + "outDegree": 14, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/meter/mockadapter", + "label": "mockadapter", + "component": "", + "inDegree": 13, + "outDegree": 5, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/meter/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 6, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/meterevent", + "label": "meterevent", + "component": "", + "inDegree": 7, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/meterevent/adapter", + "label": "adapter", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/meterevent/httphandler", + "label": "httphandler", + "component": "", + "inDegree": 1, + "outDegree": 8, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/meterexport", + "label": "meterexport", + "component": "", + "inDegree": 1, + "outDegree": 4, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/meterexport/service", + "label": "service", + "component": "", + "inDegree": 0, + "outDegree": 8, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/namespace", + "label": "namespace", + "component": "", + "inDegree": 12, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/namespace/namespacedriver", + "label": "namespacedriver", + "component": "", + "inDegree": 27, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/notification", + "label": "notification", + "component": "", + "inDegree": 27, + "outDegree": 7, + "inCycle": true, + "fileCount": 15 + }, + { + "id": "openmeter/notification/adapter", + "label": "adapter", + "component": "", + "inDegree": 2, + "outDegree": 13, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/notification/consumer", + "label": "consumer", + "component": "", + "inDegree": 2, + "outDegree": 21, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/notification/eventhandler", + "label": "eventhandler", + "component": "", + "inDegree": 2, + "outDegree": 7, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/notification/eventhandler/noop", + "label": "noop", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/notification/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 2, + "outDegree": 14, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/notification/internal", + "label": "internal", + "component": "", + "inDegree": 1, + "outDegree": 9, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/notification/service", + "label": "service", + "component": "", + "inDegree": 2, + "outDegree": 8, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "openmeter/notification/webhook", + "label": "webhook", + "component": "", + "inDegree": 9, + "outDegree": 3, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/notification/webhook/noop", + "label": "noop", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/notification/webhook/secret", + "label": "secret", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/notification/webhook/svix", + "label": "svix", + "component": "", + "inDegree": 3, + "outDegree": 7, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/notification/webhook/svix/internal", + "label": "internal", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/portal", + "label": "portal", + "component": "", + "inDegree": 6, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/portal/adapter", + "label": "adapter", + "component": "", + "inDegree": 2, + "outDegree": 3, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/portal/authenticator", + "label": "authenticator", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/portal/httphandler", + "label": "httphandler", + "component": "", + "inDegree": 1, + "outDegree": 9, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog", + "label": "productcatalog", + "component": "", + "inDegree": 104, + "outDegree": 12, + "inCycle": true, + "fileCount": 23 + }, + { + "id": "openmeter/productcatalog/adapter", + "label": "adapter", + "component": "", + "inDegree": 10, + "outDegree": 20, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/addon", + "label": "addon", + "component": "", + "inDegree": 18, + "outDegree": 10, + "inCycle": false, + "fileCount": 11 + }, + { + "id": "openmeter/productcatalog/addon/adapter", + "label": "adapter", + "component": "", + "inDegree": 7, + "outDegree": 22, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/addon/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 2, + "outDegree": 15, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/addon/service", + "label": "service", + "component": "", + "inDegree": 5, + "outDegree": 18, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/driver", + "label": "driver", + "component": "", + "inDegree": 3, + "outDegree": 17, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/feature", + "label": "feature", + "component": "", + "inDegree": 67, + "outDegree": 11, + "inCycle": true, + "fileCount": 9 + }, + { + "id": "openmeter/productcatalog/featureresolver", + "label": "featureresolver", + "component": "", + "inDegree": 10, + "outDegree": 7, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/http", + "label": "http", + "component": "", + "inDegree": 6, + "outDegree": 8, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/plan", + "label": "plan", + "component": "", + "inDegree": 27, + "outDegree": 10, + "inCycle": false, + "fileCount": 14 + }, + { + "id": "openmeter/productcatalog/plan/adapter", + "label": "adapter", + "component": "", + "inDegree": 6, + "outDegree": 20, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/productcatalog/plan/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 2, + "outDegree": 17, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/plan/service", + "label": "service", + "component": "", + "inDegree": 5, + "outDegree": 17, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/planaddon", + "label": "planaddon", + "component": "", + "inDegree": 15, + "outDegree": 9, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/productcatalog/planaddon/adapter", + "label": "adapter", + "component": "", + "inDegree": 5, + "outDegree": 21, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/productcatalog/planaddon/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 10, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/planaddon/service", + "label": "service", + "component": "", + "inDegree": 5, + "outDegree": 13, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/productcatalog/subscription", + "label": "subscription", + "component": "", + "inDegree": 15, + "outDegree": 7, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/productcatalog/subscription/http", + "label": "http", + "component": "", + "inDegree": 3, + "outDegree": 28, + "inCycle": false, + "fileCount": 11 + }, + { + "id": "openmeter/productcatalog/subscription/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 12, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "openmeter/productcatalog/subscription/testutils", + "label": "testutils", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/productcatalog/testutils", + "label": "testutils", + "component": "", + "inDegree": 7, + "outDegree": 23, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/progressmanager", + "label": "progressmanager", + "component": "", + "inDegree": 6, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/progressmanager/adapter", + "label": "adapter", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/progressmanager/entity", + "label": "entity", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/progressmanager/httpdriver", + "label": "httpdriver", + "component": "", + "inDegree": 1, + "outDegree": 7, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/registry", + "label": "registry", + "component": "", + "inDegree": 8, + "outDegree": 5, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/registry/builder", + "label": "builder", + "component": "", + "inDegree": 6, + "outDegree": 21, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/secret", + "label": "secret", + "component": "", + "inDegree": 9, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/secret/adapter", + "label": "adapter", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/secret/entity", + "label": "entity", + "component": "", + "inDegree": 8, + "outDegree": 2, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/secret/service", + "label": "service", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/server", + "label": "server", + "component": "", + "inDegree": 2, + "outDegree": 59, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/server/router", + "label": "router", + "component": "", + "inDegree": 2, + "outDegree": 69, + "inCycle": false, + "fileCount": 24 + }, + { + "id": "openmeter/session", + "label": "session", + "component": "", + "inDegree": 10, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/sink", + "label": "sink", + "component": "", + "inDegree": 2, + "outDegree": 11, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/sink/flushhandler", + "label": "flushhandler", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "openmeter/sink/flushhandler/ingestnotification", + "label": "ingestnotification", + "component": "", + "inDegree": 1, + "outDegree": 8, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/sink/flushhandler/ingestnotification/events", + "label": "events", + "component": "", + "inDegree": 3, + "outDegree": 4, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/sink/models", + "label": "models", + "component": "", + "inDegree": 3, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/streaming", + "label": "streaming", + "component": "", + "inDegree": 58, + "outDegree": 6, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/streaming/clickhouse", + "label": "clickhouse", + "component": "", + "inDegree": 1, + "outDegree": 10, + "inCycle": false, + "fileCount": 18 + }, + { + "id": "openmeter/streaming/retry", + "label": "retry", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/streaming/testutils", + "label": "testutils", + "component": "", + "inDegree": 14, + "outDegree": 5, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/subject", + "label": "subject", + "component": "", + "inDegree": 27, + "outDegree": 3, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/subject/adapter", + "label": "adapter", + "component": "", + "inDegree": 12, + "outDegree": 8, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/subject/httphandler", + "label": "httphandler", + "component": "", + "inDegree": 2, + "outDegree": 8, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/subject/service", + "label": "service", + "component": "", + "inDegree": 12, + "outDegree": 10, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/subject/service/hooks", + "label": "hooks", + "component": "", + "inDegree": 6, + "outDegree": 14, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/subject/testutils", + "label": "testutils", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/subscription", + "label": "subscription", + "component": "", + "inDegree": 37, + "outDegree": 25, + "inCycle": true, + "fileCount": 31 + }, + { + "id": "openmeter/subscription/addon", + "label": "addon", + "component": "", + "inDegree": 13, + "outDegree": 16, + "inCycle": true, + "fileCount": 12 + }, + { + "id": "openmeter/subscription/addon/diff", + "label": "diff", + "component": "", + "inDegree": 2, + "outDegree": 14, + "inCycle": true, + "fileCount": 9 + }, + { + "id": "openmeter/subscription/addon/http", + "label": "http", + "component": "", + "inDegree": 1, + "outDegree": 14, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "openmeter/subscription/addon/repo", + "label": "repo", + "component": "", + "inDegree": 4, + "outDegree": 12, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/subscription/addon/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 14, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/subscription/entitlement", + "label": "entitlement", + "component": "", + "inDegree": 5, + "outDegree": 7, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/subscription/hooks/annotations", + "label": "annotations", + "component": "", + "inDegree": 3, + "outDegree": 2, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/subscription/patch", + "label": "patch", + "component": "", + "inDegree": 5, + "outDegree": 9, + "inCycle": true, + "fileCount": 11 + }, + { + "id": "openmeter/subscription/repo", + "label": "repo", + "component": "", + "inDegree": 5, + "outDegree": 19, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/subscription/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 23, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/subscription/testutils", + "label": "testutils", + "component": "", + "inDegree": 10, + "outDegree": 56, + "inCycle": true, + "fileCount": 15 + }, + { + "id": "openmeter/subscription/validators/customer", + "label": "customer", + "component": "", + "inDegree": 2, + "outDegree": 5, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/subscription/validators/subscription", + "label": "subscription", + "component": "", + "inDegree": 1, + "outDegree": 8, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "openmeter/subscription/workflow", + "label": "workflow", + "component": "", + "inDegree": 15, + "outDegree": 3, + "inCycle": true, + "fileCount": 3 + }, + { + "id": "openmeter/subscription/workflow/service", + "label": "service", + "component": "", + "inDegree": 4, + "outDegree": 24, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/taxcode", + "label": "taxcode", + "component": "", + "inDegree": 31, + "outDegree": 9, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "openmeter/taxcode/adapter", + "label": "adapter", + "component": "", + "inDegree": 12, + "outDegree": 9, + "inCycle": true, + "fileCount": 4 + }, + { + "id": "openmeter/taxcode/service", + "label": "service", + "component": "", + "inDegree": 8, + "outDegree": 7, + "inCycle": true, + "fileCount": 5 + }, + { + "id": "openmeter/taxcode/testutils", + "label": "testutils", + "component": "", + "inDegree": 2, + "outDegree": 6, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/testutils", + "label": "testutils", + "component": "", + "inDegree": 55, + "outDegree": 2, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "openmeter/watermill/driver/kafka", + "label": "kafka", + "component": "", + "inDegree": 7, + "outDegree": 3, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "openmeter/watermill/driver/kafka/metrics", + "label": "metrics", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "openmeter/watermill/driver/noop", + "label": "noop", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/watermill/eventbus", + "label": "eventbus", + "component": "", + "inDegree": 38, + "outDegree": 4, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "openmeter/watermill/grouphandler", + "label": "grouphandler", + "component": "", + "inDegree": 3, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "openmeter/watermill/marshaler", + "label": "marshaler", + "component": "", + "inDegree": 14, + "outDegree": 1, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "openmeter/watermill/router", + "label": "router", + "component": "", + "inDegree": 7, + "outDegree": 3, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "pkg/clock", + "label": "clock", + "component": "", + "inDegree": 100, + "outDegree": 1, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "pkg/cmpx", + "label": "cmpx", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/contextx", + "label": "contextx", + "component": "", + "inDegree": 4, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/convert", + "label": "convert", + "component": "", + "inDegree": 29, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/currencyx", + "label": "currencyx", + "component": "", + "inDegree": 91, + "outDegree": 0, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "pkg/datetime", + "label": "datetime", + "component": "", + "inDegree": 65, + "outDegree": 1, + "inCycle": true, + "fileCount": 12 + }, + { + "id": "pkg/defaultx", + "label": "defaultx", + "component": "", + "inDegree": 16, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/entitydiff", + "label": "entitydiff", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/equal", + "label": "equal", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/errorsx", + "label": "errorsx", + "component": "", + "inDegree": 7, + "outDegree": 3, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "pkg/expand", + "label": "expand", + "component": "", + "inDegree": 3, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/featuregate", + "label": "featuregate", + "component": "", + "inDegree": 13, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/ffx", + "label": "ffx", + "component": "", + "inDegree": 11, + "outDegree": 0, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "pkg/filter", + "label": "filter", + "component": "", + "inDegree": 53, + "outDegree": 1, + "inCycle": true, + "fileCount": 2 + }, + { + "id": "pkg/framework/clickhouseotel", + "label": "clickhouseotel", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/commonhttp", + "label": "commonhttp", + "component": "", + "inDegree": 63, + "outDegree": 5, + "inCycle": true, + "fileCount": 7 + }, + { + "id": "pkg/framework/entutils", + "label": "entutils", + "component": "", + "inDegree": 74, + "outDegree": 10, + "inCycle": true, + "fileCount": 11 + }, + { + "id": "pkg/framework/entutils/entcursor", + "label": "entcursor", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "pkg/framework/entutils/entdriver", + "label": "entdriver", + "component": "", + "inDegree": 7, + "outDegree": 1, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/entexpose", + "label": "entexpose", + "component": "", + "inDegree": 3, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/entmixinaccessor", + "label": "entmixinaccessor", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/entpaginate", + "label": "entpaginate", + "component": "", + "inDegree": 2, + "outDegree": 4, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "pkg/framework/entutils/entsetorclear", + "label": "entsetorclear", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent1", + "label": "ent1", + "component": "", + "inDegree": 0, + "outDegree": 3, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db", + "label": "db", + "component": "", + "inDegree": 5, + "outDegree": 7, + "inCycle": true, + "fileCount": 13 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/enttest", + "label": "enttest", + "component": "", + "inDegree": 0, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/example1", + "label": "example1", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/hook", + "label": "hook", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/migrate", + "label": "migrate", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/predicate", + "label": "predicate", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/db/runtime", + "label": "runtime", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent1/schema", + "label": "schema", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent2", + "label": "ent2", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db", + "label": "db", + "component": "", + "inDegree": 3, + "outDegree": 5, + "inCycle": true, + "fileCount": 11 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/enttest", + "label": "enttest", + "component": "", + "inDegree": 0, + "outDegree": 3, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/example2", + "label": "example2", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/hook", + "label": "hook", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/migrate", + "label": "migrate", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/predicate", + "label": "predicate", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/db/runtime", + "label": "runtime", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/entutils/testutils/ent2/schema", + "label": "schema", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": true, + "fileCount": 1 + }, + { + "id": "pkg/framework/lockr", + "label": "lockr", + "component": "", + "inDegree": 21, + "outDegree": 7, + "inCycle": true, + "fileCount": 6 + }, + { + "id": "pkg/framework/operation", + "label": "operation", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "pkg/framework/pgdriver", + "label": "pgdriver", + "component": "", + "inDegree": 7, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/tracex", + "label": "tracex", + "component": "", + "inDegree": 5, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/framework/transaction", + "label": "transaction", + "component": "", + "inDegree": 70, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/framework/transport/httptransport", + "label": "httptransport", + "component": "", + "inDegree": 47, + "outDegree": 5, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "pkg/framework/transport/httptransport/encoder", + "label": "encoder", + "component": "", + "inDegree": 15, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/gosundheit", + "label": "gosundheit", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/hasher", + "label": "hasher", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/idempotency", + "label": "idempotency", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/kafka", + "label": "kafka", + "component": "", + "inDegree": 5, + "outDegree": 1, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "pkg/kafka/metrics", + "label": "metrics", + "component": "", + "inDegree": 5, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/kafka/metrics/internal", + "label": "internal", + "component": "", + "inDegree": 1, + "outDegree": 1, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "pkg/kafka/metrics/stats", + "label": "stats", + "component": "", + "inDegree": 4, + "outDegree": 0, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "pkg/log", + "label": "log", + "component": "", + "inDegree": 7, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/lrux", + "label": "lrux", + "component": "", + "inDegree": 2, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/models", + "label": "models", + "component": "", + "inDegree": 229, + "outDegree": 4, + "inCycle": true, + "fileCount": 28 + }, + { + "id": "pkg/models/http", + "label": "http", + "component": "", + "inDegree": 1, + "outDegree": 2, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/otelx", + "label": "otelx", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/pagination", + "label": "pagination", + "component": "", + "inDegree": 119, + "outDegree": 0, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "pkg/pagination/v2", + "label": "v2", + "component": "", + "inDegree": 16, + "outDegree": 0, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "pkg/pglockx", + "label": "pglockx", + "component": "", + "inDegree": 3, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/pgxpoolobserver", + "label": "pgxpoolobserver", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/redis", + "label": "redis", + "component": "", + "inDegree": 1, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/ref", + "label": "ref", + "component": "", + "inDegree": 9, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/server", + "label": "server", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "pkg/set", + "label": "set", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/slicesx", + "label": "slicesx", + "component": "", + "inDegree": 42, + "outDegree": 0, + "inCycle": false, + "fileCount": 13 + }, + { + "id": "pkg/sortx", + "label": "sortx", + "component": "", + "inDegree": 51, + "outDegree": 0, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "pkg/statelessx", + "label": "statelessx", + "component": "", + "inDegree": 4, + "outDegree": 1, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/strcase", + "label": "strcase", + "component": "", + "inDegree": 5, + "outDegree": 0, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "pkg/timeutil", + "label": "timeutil", + "component": "", + "inDegree": 82, + "outDegree": 3, + "inCycle": true, + "fileCount": 12 + }, + { + "id": "pkg/treex", + "label": "treex", + "component": "", + "inDegree": 2, + "outDegree": 0, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "quickstart", + "label": "quickstart", + "component": "", + "inDegree": 0, + "outDegree": 3, + "inCycle": false, + "fileCount": 7 + }, + { + "id": "test/app", + "label": "app", + "component": "", + "inDegree": 1, + "outDegree": 29, + "inCycle": false, + "fileCount": 3 + }, + { + "id": "test/app/custominvoicing", + "label": "custominvoicing", + "component": "", + "inDegree": 0, + "outDegree": 12, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "test/app/stripe", + "label": "stripe", + "component": "", + "inDegree": 0, + "outDegree": 46, + "inCycle": false, + "fileCount": 8 + }, + { + "id": "test/billing", + "label": "billing", + "component": "", + "inDegree": 6, + "outDegree": 86, + "inCycle": true, + "fileCount": 17 + }, + { + "id": "test/credits", + "label": "credits", + "component": "", + "inDegree": 0, + "outDegree": 47, + "inCycle": false, + "fileCount": 6 + }, + { + "id": "test/customer", + "label": "customer", + "component": "", + "inDegree": 0, + "outDegree": 60, + "inCycle": false, + "fileCount": 4 + }, + { + "id": "test/entitlement/regression", + "label": "regression", + "component": "", + "inDegree": 0, + "outDegree": 38, + "inCycle": false, + "fileCount": 2 + }, + { + "id": "test/notification", + "label": "notification", + "component": "", + "inDegree": 0, + "outDegree": 26, + "inCycle": false, + "fileCount": 9 + }, + { + "id": "test/subscription", + "label": "subscription", + "component": "", + "inDegree": 0, + "outDegree": 30, + "inCycle": false, + "fileCount": 5 + }, + { + "id": "tools/migrate", + "label": "migrate", + "component": "", + "inDegree": 13, + "outDegree": 3, + "inCycle": true, + "fileCount": 15 + }, + { + "id": "tools/migrate/cmd/viewgen", + "label": "viewgen", + "component": "", + "inDegree": 0, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + }, + { + "id": "tools/migrate/viewgen", + "label": "viewgen", + "component": "", + "inDegree": 3, + "outDegree": 1, + "inCycle": false, + "fileCount": 1 + } + ], + "edges": [ + { + "from": "api", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "api/client/go", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/client/go", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/client/python/examples/async", + "to": "openmeter", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/client/python/examples/sync", + "to": "openmeter", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/spec/packages/aip/lib", + "to": "api/spec/packages/aip/lib/rules", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/spec/packages/legacy/lib", + "to": "api/spec/packages/legacy/lib/rules", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "api/v3", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "api/v3/render", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/apierrors", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/filters", + "to": "pkg/expand", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/filters", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/filters", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/filters", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/framework/transport/httptransport", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/framework/commonhttp", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3/apierrors", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "openmeter/productcatalog/addon", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3/request", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/addons", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "pkg/framework/transport/httptransport", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "api/v3", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "openmeter/app/sandbox", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "api/v3/apierrors", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "api/v3/response", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/apps", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "api/v3", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/framework/commonhttp", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "openmeter/billing", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "api/v3/request", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/billingprofiles", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "pkg/framework/transport/httptransport", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "api/v3", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "pkg/framework/commonhttp", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "api/v3/apierrors", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "openmeter/currencies", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/currencies", + "to": "api/v3/response", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/app/sandbox", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "pkg/framework/commonhttp", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/app/stripe", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/billing", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/customer", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "api/v3/request", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/billing", + "to": "openmeter/app/custominvoicing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing/charges", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "api/v3", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing/charges/flatfee", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/charges", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "openmeter/customer", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3/request", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3/response", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "api/v3/apierrors", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/billing/creditgrant", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/ledger", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "api/v3/request", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/framework/transport/httptransport", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "api/v3", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/currencyx", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "pkg/framework/commonhttp", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/ledger/customerbalance", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/credits", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "api/v3", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/customers/entitlementaccess", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/framework/transport/httptransport", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api/v3", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "openmeter/ingest", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api/v3/apierrors", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "openmeter/meterevent", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/sortx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/events", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "openmeter/cost", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "api/v3", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "api/v3/handlers/meters/query", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/featurecost", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "openmeter/productcatalog/feature", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/framework/commonhttp", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "openmeter/meter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3/request", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "openmeter/llmcost", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/features", + "to": "api/v3/labels", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "api/v3/filters", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "api/v3/request", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "openmeter/llmcost", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/llmcost", + "to": "api/v3/response", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "pkg/framework/transport/httptransport", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "pkg/framework/commonhttp", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/apierrors", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "openmeter/meter", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/handlers/meters/query", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/request", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/response", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "api/v3", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "openmeter/meter", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/meters/query", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/framework/transport/httptransport", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/framework/commonhttp", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3/apierrors", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "openmeter/productcatalog/plan", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3/request", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "pkg/framework/transport/httptransport", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "api/v3", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "api/v3/labels", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "api/v3/apierrors", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "api/v3/request", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/plans/planaddons", + "to": "openmeter/productcatalog/planaddon", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "pkg/framework/transport/httptransport", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "pkg/framework/commonhttp", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "openmeter/subscription/workflow", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3/apierrors", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "openmeter/productcatalog/subscription", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "openmeter/subscription", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3/request", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/framework/transport/httptransport", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "api/v3", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "openmeter/subscription/addon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "api/v3/request", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/subscriptions/subscriptionaddons", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "pkg/framework/transport/httptransport", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "api/v3", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "pkg/framework/commonhttp", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "openmeter/taxcode", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "api/v3/apierrors", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "api/v3/request", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "api/v3/response", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/handlers/taxcodes", + "to": "api/v3/labels", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/labels", + "to": "api/v3", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/labels", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/labels", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/oasmiddleware", + "to": "api/v3/apierrors", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/oasmiddleware", + "to": "api/v3", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/request", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/request", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/request", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/request", + "to": "api/v3", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/response", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/subscriptions/subscriptionaddons", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/apierrors", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/meterevent", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/currencies", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/billing/creditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/oasmiddleware", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/billingprofiles", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/apps", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/events", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/customers/entitlementaccess", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/ledger/noop", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/featurecost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/subscriptions", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/customers", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/cost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/ingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/plans", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/render", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/addons", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "pkg/server", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/customers/credits", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/currencies", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/customers/charges", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/meters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/customers/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/taxcodes", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/ledger/customerbalance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/productcatalog/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/features", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/plans/planaddons", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "openmeter/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/server", + "to": "api/v3/handlers/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/test", + "to": "api/v3/filters", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "api/v3/test", + "to": "api/v3/oasmiddleware", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/historical/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/portal/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/registry", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ent/db", + "weight": 17, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/portal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/webhook/svix", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/secret/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/lockr", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/streaming", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/streaming/retry", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/ffx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/gosundheit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/usagebased/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/progressmanager/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/account", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/creditpurchase/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/progressmanager", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/namespace", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/currencies", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ent/db/ledgeraccount", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/planaddon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/cost/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/sandbox", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/llmcost/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/pgdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/pglockx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/workflow", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/plan/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/llmcost", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subject", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/webhook", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/sink/flushhandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/workflow/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/repo", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/custominvoicing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/creditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/meterevent/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/subscriptionsync/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ingest/kafkaingest/topicresolver", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/streaming/clickhouse", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/account/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/clickhouseotel", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/usagebased/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/breakage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/collect", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/lineage/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/planaddon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/addon/repo", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "app/config", + "weight": 29, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/server", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/subscriptionsync/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/secret/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/entitlement/validators/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/transactions", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/featuregate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/eventhandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/usagebased", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/stripe/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/breakage", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/collector", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/customer", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/creditpurchase/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/noop", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/cost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/llmcost/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/meter/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/resolvers", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/validators/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/stripe/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/currencies/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/flatfee/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/flatfee/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/cost/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/kafka", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/kafka/metrics", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/watermill/driver/kafka", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/creditgrant/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/customer/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/resolvers/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/planaddon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/secret", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/chargeadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/worker/advance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/account/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "tools/migrate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/customerbalance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/entitlement/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subject/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/addon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/watermill/router", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/taxcode", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/meterevent", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/sink/flushhandler/ingestnotification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/hooks/annotations", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/currencies/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ingest/kafkaingest", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/namespace/namespacedriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/entitlement/balanceworker", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/subscriptionsync/reconciler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/recognizer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/historical", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/productcatalog/feature", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/meter", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/charges/creditpurchase/lineengine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/meter/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/watermill/eventbus", + "weight": 11, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/validators/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/llmcost/sync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/sink", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/billing/worker/advance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/subscription/validators/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ledger/routingrules", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/ingest/ingestadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "pkg/contextx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/custominvoicing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/notification/webhook/noop", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/common", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/notification/webhook", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/notification/webhook/svix", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/kafka", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/dedupe/redisdedupe", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/pglockx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/dedupe/memorydedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/redis", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "app/config", + "to": "pkg/errorsx", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/balance-worker", + "to": "app/config", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/balance-worker", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/balance-worker", + "to": "openmeter/watermill/driver/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/balance-worker", + "to": "app/common", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/balance-worker", + "to": "openmeter/watermill/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "app/config", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/watermill/driver/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/watermill/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/namespace", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "app/common", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/billing-worker", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/advance", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/advance", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/advancecharges", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/advancecharges", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing", + "to": "cmd/jobs/billing/collect", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing", + "to": "cmd/jobs/billing/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing", + "to": "cmd/jobs/billing/advancecharges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing", + "to": "cmd/jobs/billing/advance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/collect", + "to": "openmeter/billing/worker/collect", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/collect", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/collect", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/subscriptionsync", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/billing/subscriptionsync", + "to": "openmeter/billing/worker/subscriptionsync/reconciler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/entitlement", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/entitlement", + "to": "openmeter/entitlement/balanceworker", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/registry", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/billing/worker/subscriptionsync/reconciler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "app/common", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/billing/worker/collect", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "app/config", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "pkg/kafka/metrics", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/app/stripe", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/watermill/driver/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/namespace", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/llmcost/sync", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/secret", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/billing/charges/worker/advance", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/billing/worker/advance", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/internal", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "openmeter/ledger/account/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "openmeter/ledger/account/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "openmeter/ledger/resolvers/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "cmd/jobs/ledger/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/backfillaccounts", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger", + "to": "cmd/jobs/ledger/backfillaccounts", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "openmeter/ent/db/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/ledger/service", + "to": "pkg/pagination/v2", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/llmcost", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/quickstart", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs", + "to": "cmd/jobs/internal", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/migrate", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/migrate", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/quickstart", + "to": "cmd/jobs/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/quickstart", + "to": "cmd/jobs/billing/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/jobs/quickstart", + "to": "openmeter/billing/worker/subscriptionsync/reconciler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "app/config", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/watermill/driver/kafka", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/notification/consumer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "app/common", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/notification-service", + "to": "openmeter/watermill/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/meterevent", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/billing/creditgrant", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/registry", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/server/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/portal", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/cost", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/ingest", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/ingest/kafkaingest", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "app/common", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "pkg/ffx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "app/config", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/progressmanager", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "pkg/kafka/metrics", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/server", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/namespace", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/watermill/driver/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/currencies", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/secret", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/productcatalog/planaddon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/debug", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "pkg/featuregate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/ledger/customerbalance", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/subject/service/hooks", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/productcatalog/addon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/llmcost", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/server", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/sink/flushhandler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/sink", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "pkg/kafka", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "app/config", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/watermill/driver/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "app/common", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/ingest/kafkaingest/topicresolver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "cmd/sink-worker", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/input", + "to": "collector/benthos/services/leaderelection", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/input", + "to": "collector/benthos/internal/message", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/input", + "to": "collector/benthos/internal/shutdown", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/input", + "to": "collector/benthos/internal/logging", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/input", + "to": "collector/benthos/input/runai", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/output", + "to": "api/client/go", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/benthos/services/leaderelection", + "to": "collector/benthos/internal/logging", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/cmd", + "to": "collector/benthos/services/leaderelection", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/cmd", + "to": "collector/benthos/output", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/cmd", + "to": "collector/benthos/input", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "collector/cmd", + "to": "collector/benthos/bloblang", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "api/v3", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "pkg/convert", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "api/client/go", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "e2e", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/apiconverter", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/apiconverter", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/apiconverter", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app", + "to": "openmeter/event/metadata", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/app", + "to": "pkg/pagination", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/app", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/app", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "pkg/framework/transaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "openmeter/ent/db/appcustomer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "openmeter/ent/db/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "openmeter/app", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "openmeter/billing", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "openmeter/customer/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "openmeter/ent/db/appcustominvoicingcustomer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "openmeter/ent/db/appcustominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/adapter", + "to": "openmeter/app/custominvoicing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "openmeter/billing/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/httpdriver", + "to": "openmeter/app/custominvoicing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "pkg/framework/transaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "openmeter/app", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/custominvoicing/service", + "to": "openmeter/app/custominvoicing", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/app/sandbox", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/app/stripe", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "api", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/httpdriver", + "to": "openmeter/app/custominvoicing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "openmeter/app", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "openmeter/customer/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/sandbox", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/service", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/service", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/service", + "to": "openmeter/app", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/customer/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/secret/entity", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/app", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/billing", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/app/stripe/client", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe", + "to": "openmeter/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/secret/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/app/stripe/client", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/app/stripe", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/ent/db/appstripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/app", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/ent/db/appstripecustomer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/adapter", + "to": "openmeter/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/client", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/app/stripe/client", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/app/stripe", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "api", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/app/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/app", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/customer/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/httpdriver", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/secret/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/app/stripe", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/app/stripe/client", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/app/stripe/service", + "to": "openmeter/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/event/metadata", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "pkg/timeutil", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "openmeter/customer", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/models", + "weight": 18, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/pagination", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "openmeter/billing/models/stddetailedline", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "openmeter/productcatalog", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/slicesx", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/streaming", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/datetime", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/currencyx", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/billing/models/externalid", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/billing/models/totals", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "pkg/sortx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/billing/models/creditsapplied", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/expand", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing", + "to": "openmeter/app", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoicevalidationissue", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/convert", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/timeutil", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db", + "weight": 15, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoiceline", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/customer", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/taxcode/adapter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingcustomerlock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoicelinediscount", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoicelineusagediscount", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/pagination", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoicewriteschemalevel", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingcustomeroverride", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingworkflowconfig", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/billing/models/stddetailedline", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/clock", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/slicesx", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingprofile", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/set", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/billing/models/externalid", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingstandardinvoicedetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/entitydiff", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoice", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingsequencenumbers", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/billing/models/totals", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/sortx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/app", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/billing", + "weight": 16, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "pkg/framework/entutils", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/adapter", + "to": "openmeter/ent/db/billinginvoicesplitlinegroup", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/billing/charges/meta", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges", + "to": "openmeter/billing/charges/flatfee", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/ent/db/chargessearchv1", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/billing/charges/flatfee", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/adapter", + "to": "openmeter/billing/charges", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/currencyx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "openmeter/billing/charges/meta", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/creditpurchase", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db/chargecreditpurchasecreditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing/charges/models/chargemeta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/billing/charges/meta", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "pkg/framework/entutils", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/adapter", + "to": "openmeter/ent/db/chargecreditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/lineengine", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/lineengine", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/lineengine", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/lineengine", + "to": "openmeter/billing/service/invoicecalc", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/framework/transaction", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/statelessx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/statemachine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/meta", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/creditpurchase/service", + "to": "openmeter/billing/charges/lineage", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "pkg/timeutil", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/meta", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/ent/db", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/ent/db/chargeflatfeerun", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/models/stddetailedline", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/ent/db/chargeflatfeerundetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/models/chargemeta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/flatfee", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/ent/db/chargeflatfee", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/ent/db/chargeflatfeerunpayment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/models/totals", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "tools/migrate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "openmeter/billing/charges/meta", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/adapter", + "to": "pkg/framework/entutils", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/statelessx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/flatfee/service/realizations", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/productcatalog", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "pkg/framework/transaction", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/statemachine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/flatfee", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/meta", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "pkg/framework/transaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/service/invoicecalc", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/charges/flatfee", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/flatfee/service/realizations", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/invoiceupdater", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "openmeter/ent/db/creditrealizationlineagesegment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "openmeter/ent/db/creditrealizationlineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/adapter", + "to": "openmeter/billing/charges/lineage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/lineage", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/lineage/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/service", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/lineage/service", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/models", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/expand", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "openmeter/ent/db/charge", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/meta/adapter", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/chargemeta", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/creditrealization", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/invoicedusage", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/invoicedusage", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/invoicedusage", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/invoicedusage", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/invoicedusage", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/ledgertransaction", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/models/payment", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/timeutil", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/taxcode", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/models/payment", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/ent/db/creditrealizationlineagesegment", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/customer", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/creditpurchase/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges", + "weight": 20, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/clock", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/productcatalog", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/ledger/recognizer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/usagebased/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/flatfee/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/lineage/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/datetime", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/usagebased/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/framework/transaction", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/flatfee/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/currencyx", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/creditpurchase/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/creditpurchase/lineengine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/flatfee", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "test/billing", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/app/custominvoicing", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/meta", + "weight": 18, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/ent/db/creditrealizationlineage", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/usagebased", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/service", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/statemachine", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/statemachine", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/statemachine", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/creditpurchase/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/ledger/recognizer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/usagebased/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/flatfee/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/lineage/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/usagebased/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/flatfee/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/creditpurchase/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/creditpurchase/lineengine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/usagebased", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/testutils", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/timeutil", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/models/totals", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/meta", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/ent/db/chargeusagebasedrunpayment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/ent/db/chargeusagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/ent/db", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/ent/db/chargeusagebasedrundetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/ent/db/chargeusagebasedruns", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/models/chargemeta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/models/totals", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/meta", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "pkg/framework/entutils", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/adapter", + "to": "openmeter/billing/charges/usagebased", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/statelessx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/timeutil", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/invoiceupdater", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/productcatalog", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/slicesx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/streaming", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/rating/service/mutator", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/framework/transaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/statemachine", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/currencyx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/usagebased/service/run", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/meta", + "weight": 11, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/usagebased", + "weight": 14, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service", + "to": "openmeter/billing/charges/usagebased/service/rating", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/models/stddetailedline", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/charges/usagebased/service/rating/subtract", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/rating", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/charges/usagebased/service/rating/testutils", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/productcatalog", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/charges/usagebased", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/delta", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/rating", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/productcatalog/feature", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/models/totals", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/charges/usagebased/service/rating/delta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/charges/usagebased/service/rating/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/charges/usagebased", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/charges/usagebased/service/rating/subtract", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/charges/usagebased/service/rating/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/charges/usagebased", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/charges/usagebased", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/subtract", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/rating/testutils", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "pkg/currencyx", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/usagebased", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/lineage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/usagebased/service/run", + "to": "openmeter/billing/charges/usagebased/service/rating", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/worker/advance", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/worker/advance", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/worker/advance", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/worker/asyncadvance", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/charges/worker/asyncadvance", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/billing/creditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/creditgrant/service", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/convert", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/app/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "api", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/productcatalog/http", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/slicesx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/set", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/billing/models/externalid", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/customer/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "test/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/sortx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "openmeter/billing", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/httpdriver", + "to": "pkg/equal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "openmeter/billing/service/invoicecalc", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/lineengine", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/creditsapplied", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/creditsapplied", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "pkg/currencyx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "openmeter/billing/models/totals", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "openmeter/billing/models/creditsapplied", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "openmeter/billing/models/externalid", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/stddetailedline", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/models/totals", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating", + "to": "openmeter/billing", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/rating/service/mutator", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/rating/service/testutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/rating", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service", + "to": "openmeter/billing/rating/service/rate", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing/rating/service/testutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing/rating", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/mutator", + "to": "openmeter/billing/rating/service/rate", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/billing/rating/service/testutil", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/billing/models/stddetailedline", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/billing/models/totals", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/billing/rating", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/billing", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/productcatalog", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/rate", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "openmeter/billing/models/totals", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/rating/service/testutil", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/service", + "to": "pkg/statelessx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/customer", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/pagination", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/billing/rating", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/slicesx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/streaming", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/productcatalog/feature", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/framework/transaction", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/currencyx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/billing/lineengine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/billing/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/billing", + "weight": 20, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "openmeter/billing/service/invoicecalc", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/billing/models/stddetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/billing/rating", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/billing", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/service/invoicecalc", + "to": "openmeter/billing/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/testutils", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/customer", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/customer", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/customer", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/customer", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/customer", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "openmeter/customer/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/validators/subscription", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/advance", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/asyncadvance", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/collect", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/collect", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/collect", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/adapter", + "to": "openmeter/ent/db/subscriptionbillingsyncstate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/reconciler", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/timeutil", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/breakage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/collector", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/pagination", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/subscription/patch", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/clock", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/productcatalog", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/datetime", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/framework/tracex", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/worker/subscriptionsync/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/productcatalog/plan", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/subscription", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/flatfee", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "test/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/transactions", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "pkg/featuregate", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ledger/chargeadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/subscription/workflow", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/meta", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/productcatalog/subscription", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service", + "to": "openmeter/billing/charges/usagebased", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/billing/charges/flatfee", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/featuregate", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "weight": 11, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/timeutil", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/charges/meta", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/productcatalog", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/charges/usagebased", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/reconciler", + "to": "openmeter/billing/charges", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/framework/tracex", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "openmeter/subscription", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker/subscriptionsync/service/targetstate", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/billing/charges/worker/asyncadvance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/watermill/grouphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/billing/worker/asyncadvance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/watermill/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/billing/worker", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "openmeter/cost", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "openmeter/meter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "openmeter/llmcost", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/adapter", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/cost/service", + "to": "openmeter/cost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/customersubjects", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/credit/balance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/grant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/credit/grant", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db/balancesnapshot", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/adapter", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "pkg/framework/transaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/credit/balance", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/credit/grant", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/credit/engine", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "openmeter/credit/grant", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/balance", + "to": "openmeter/streaming", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/strcase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/entitlement/driver/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/entitlement/driver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/driver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/streaming/testutils", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "pkg/timeutil", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/meter", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/credit/balance", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/credit/grant", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/engine", + "to": "openmeter/streaming", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/event/metadata", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/event/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/grant", + "to": "openmeter/watermill/marshaler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/credit/hook", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/hook", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/hook", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/credit/hook", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/currencies", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "openmeter/ent/db/customcurrency", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "openmeter/ent/db/currencycostbasis", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/adapter", + "to": "openmeter/currencies", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "pkg/sortx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/currencies/service", + "to": "openmeter/currencies", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer", + "to": "openmeter/streaming", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/billingcustomeroverride", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/billingprofile", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/appcustomer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/appcustominvoicingcustomer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/appstripecustomer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/customersubjects", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/adapter", + "to": "openmeter/ent/db/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/app", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/app", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/app", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/productcatalog/subscription/http", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/entitlement/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/entitlement", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "openmeter/subscription", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/httpdriver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/customer/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service/hooks", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service/hooks", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/subject/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/service/hooks", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/customer/testutils", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/debug", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/debug/httpdriver", + "to": "openmeter/debug", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/debug/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/debug/httpdriver", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/debug/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/debug/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/dedupe/memorydedupe", + "to": "openmeter/dedupe", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/dedupe/redisdedupe", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebasedrunpayment", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/creditrealizationlineagesegment", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebased", + "weight": 37, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgerentry", + "weight": 15, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/planphase", + "weight": 16, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoicewriteschemalevel", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/notificationeventdeliverystatus", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/plan", + "weight": 20, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgercustomeraccount", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "pkg/datetime", + "weight": 32, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingprofile", + "weight": 23, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/appcustomer", + "weight": 15, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/currencycostbasis", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingstandardinvoicedetailedline", + "weight": 22, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/flatfee", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfee", + "weight": 33, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgeraccount", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfeerunpayment", + "weight": 17, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargessearchv1", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/taxcode", + "weight": 65, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/entitlement", + "weight": 28, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/llmcost", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscriptionaddon", + "weight": 18, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/app", + "weight": 24, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgersubaccount", + "weight": 18, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/llmcostprice", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoicelinediscount", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfeerun", + "weight": 32, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "pkg/models", + "weight": 116, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargecreditpurchasecreditgrant", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingcustomeroverride", + "weight": 19, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingworkflowconfig", + "weight": 20, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/models/stddetailedline", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/organizationdefaulttaxcodes", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/credit/grant", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebasedrundetailedline", + "weight": 18, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/productcatalog", + "weight": 59, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/notificationrule", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/customer", + "weight": 42, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscriptionphase", + "weight": 31, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoice", + "weight": 41, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/charge", + "weight": 29, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/customersubjects", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/creditrealizationlineage", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/meta", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargecreditpurchase", + "weight": 36, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/usagebased", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscriptionbillingsyncstate", + "weight": 13, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoicevalidationissue", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/schema", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/usagereset", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/grant", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/addonratecard", + "weight": 18, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgertransaction", + "weight": 15, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingcustomerlock", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/customcurrency", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoicelineusagediscount", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/credit/balance", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/balancesnapshot", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/notificationchannel", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeflatfeerundetailedline", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/planratecard", + "weight": 18, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingsequencenumbers", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/models/creditsapplied", + "weight": 16, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/appstripe", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/app", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing", + "weight": 41, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/planaddon", + "weight": 15, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgersubaccountroute", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoicesplitlinegroup", + "weight": 28, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/taxcode", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/billing/charges/models/payment", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/feature", + "weight": 34, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billinginvoiceline", + "weight": 60, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "weight": 17, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ledger", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgerbreakagerecord", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/appcustominvoicing", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/chargeusagebasedruns", + "weight": 36, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/productcatalog/feature", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscriptionitem", + "weight": 37, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "pkg/currencyx", + "weight": 33, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subject", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/meter", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/appcustominvoicingcustomer", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/notificationevent", + "weight": 15, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/appstripecustomer", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/notification", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscriptionaddonquantity", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/predicate", + "weight": 239, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/meter", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/ledgertransactiongroup", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/addon", + "weight": 19, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db", + "to": "openmeter/ent/db/subscription", + "weight": 40, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/addon", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/addon", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/addon", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/addonratecard", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/addonratecard", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/addonratecard", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/app", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/app", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/appcustomer", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/appcustominvoicing", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/appcustominvoicingcustomer", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/appstripe", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/appstripecustomer", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/balancesnapshot", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingcustomerlock", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingcustomeroverride", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingcustomeroverride", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingcustomeroverride", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingcustomeroverride", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoice", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoice", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoice", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoice", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoiceline", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceline", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceline", + "to": "openmeter/billing/models/creditsapplied", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoiceline", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoiceline", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicelinediscount", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicelinediscount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoicelineusagediscount", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicelineusagediscount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicevalidationissue", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billinginvoicevalidationissue", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billinginvoicewriteschemalevel", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingprofile", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingprofile", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingsequencenumbers", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/billingworkflowconfig", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingworkflowconfig", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingworkflowconfig", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/billingworkflowconfig", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/charge", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/charge", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchase", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchasecreditgrant", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfee", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeerun", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeerun", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeerundetailedline", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfeerundetailedline", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeerundetailedline", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfeerundetailedline", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeflatfeerunpayment", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeflatfeerunpayment", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargessearchv1", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargessearchv1", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargessearchv1", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargessearchv1", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargessearchv1", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "openmeter/billing/charges/meta", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebased", + "to": "openmeter/billing/charges/usagebased", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebasedrunpayment", + "to": "openmeter/billing/charges/models/payment", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedrunpayment", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/chargeusagebasedruns", + "to": "openmeter/billing/charges/usagebased", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/chargeusagebasedruns", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/creditrealizationlineage", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/creditrealizationlineage", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/creditrealizationlineage", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/creditrealizationlineagesegment", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/creditrealizationlineagesegment", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/currencycostbasis", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/currencycostbasis", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/customcurrency", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/customer", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/customer", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/customer", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/customersubjects", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/entitlement", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/entitlement", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/entitlement", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/enttest", + "to": "openmeter/ent/db/runtime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/enttest", + "to": "openmeter/ent/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/enttest", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/feature", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/grant", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/grant", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/hook", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgeraccount", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/ledgeraccount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgerbreakagerecord", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgerbreakagerecord", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/ledgerbreakagerecord", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgercustomeraccount", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/ledgercustomeraccount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgerentry", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgersubaccount", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgersubaccountroute", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/ledgersubaccountroute", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgertransaction", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/ledgertransactiongroup", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/llmcostprice", + "to": "openmeter/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/llmcostprice", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/meter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/meter", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/notificationchannel", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/notificationchannel", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/notificationevent", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/notificationevent", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/notificationeventdeliverystatus", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/notificationeventdeliverystatus", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/notificationrule", + "to": "openmeter/notification", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/notificationrule", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/organizationdefaulttaxcodes", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/plan", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/plan", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/plan", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/planaddon", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/planphase", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/planphase", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/planratecard", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/planratecard", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/planratecard", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subject", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscription", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscription", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subscription", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscription", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subscriptionaddon", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscriptionaddonquantity", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscriptionbillingsyncstate", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscriptionitem", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subscriptionitem", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/subscriptionitem", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subscriptionitem", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/subscriptionphase", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/taxcode", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/taxcode", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/db/usagereset", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/db/usagereset", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "pkg/framework/entutils/entcursor", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "tools/migrate/viewgen", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "pkg/framework/entutils/entsetorclear", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "pkg/framework/entutils/entmixinaccessor", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "pkg/framework/entutils/entpaginate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent", + "to": "pkg/framework/entutils/entexpose", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/models/payment", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/ledger", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/models/stddetailedline", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/credit/balance", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "pkg/clock", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/productcatalog", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "pkg/datetime", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "pkg/currencyx", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/models/externalid", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/models/chargemeta", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/flatfee", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/models/totals", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "pkg/framework/entutils", + "weight": 34, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/schema", + "to": "openmeter/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ent/tx", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/tx", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ent/tx", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/entitlement/metered", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/usagereset", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/entitlement/balanceworker", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/customer/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/framework/transaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/meter/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/customersubjects", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/ent/db/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/adapter", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/event/metadata", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement/snapshot", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "pkg/convert", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement/balanceworker/events", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/registry", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "pkg/lrux", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/watermill/marshaler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement/balanceworker/filters", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement/driver", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/watermill/grouphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/sink/flushhandler/ingestnotification/events", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/entitlement", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/notification", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/subject", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker", + "to": "openmeter/watermill/router", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/events", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/events", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/events", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/balanceworker/events", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/filters", + "to": "openmeter/entitlement/snapshot", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/filters", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/filters", + "to": "pkg/lrux", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/filters", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/balanceworker/filters", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/boolean", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/boolean", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/boolean", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/boolean", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/timeutil", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "pkg/datetime", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/entitlement/metered", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/convert", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/namespace/namespacedriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/strcase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/entitlement", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/defaultx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver", + "to": "pkg/framework/commonhttp", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/entitlement/metered", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/convert", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/framework/transport/httptransport", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "api", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/credit/grant", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/strcase", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/entitlement/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "openmeter/entitlement", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/defaultx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/framework/commonhttp", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/driver/v2", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/hooks/subscription", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/hooks/subscription", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/hooks/subscription", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/convert", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/timeutil", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/entitlement/hooks/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/credit/engine", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/models", + "weight": 13, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/filter", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/productcatalog/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/credit/balance", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/customer/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/credit/grant", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/clock", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/ent/db/balancesnapshot", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/customer/service", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/subject/service", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/testutils", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/streaming", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/credit", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/productcatalog/feature", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/datetime", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/subject/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/event/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/meter", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/meter/mockadapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/watermill/eventbus", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/credit/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/entitlement", + "weight": 12, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/defaultx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/streaming/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/framework/pgdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/entitlement/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/ent/tx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/metered", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/entitlement/metered", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/registry", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/clock", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/testutils", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/framework/lockr", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/productcatalog/feature", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/meter", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/entitlement", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/service", + "to": "pkg/framework/pgdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/service", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/snapshot", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/static", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/static", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/static", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/static", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/validators/customer", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/validators/customer", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/validators/customer", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/entitlement/validators/customer", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/info/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/info/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/info/httpdriver", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest", + "to": "openmeter/dedupe/memorydedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "openmeter/ingest", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/httpdriver", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/ingestadapter", + "to": "openmeter/ingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "pkg/kafka/metrics/stats", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "pkg/kafka", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "pkg/kafka/metrics", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "pkg/otelx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest", + "to": "openmeter/ingest/kafkaingest/topicresolver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ingest/kafkaingest/serializer", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger", + "to": "pkg/models", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger", + "to": "pkg/currencyx", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "openmeter/ledger/transactions/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger", + "to": "openmeter/ledger/transactions", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account", + "to": "openmeter/ledger", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ledger/account", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ent/db/ledgersubaccount", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ent/db/ledgersubaccountroute", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/adapter", + "to": "openmeter/ent/db/ledgeraccount", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/account/service", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/service", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/account/service", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/ledger/breakage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/ent/db/ledgerbreakagerecord", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage/adapter", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage", + "to": "openmeter/ledger", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/breakage", + "to": "openmeter/ledger/transactions", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/models/invoicedusage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/breakage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/collector", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ent/db/ledgertransaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ent/db/ledgerbreakagerecord", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/productcatalog", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/recognizer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/breakage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/lineage/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "pkg/currencyx", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/flatfee", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ledger/transactions", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/meta", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ent/db/ledgertransactiongroup", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/ent/tx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/usagebased", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/chargeadapter", + "to": "openmeter/billing/charges/lineage", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "pkg/framework/transaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "pkg/timeutil", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ledger/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ledger/breakage", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "pkg/cmpx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ent/tx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ledger", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ledger/breakage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/ledger/transactions", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/collector", + "to": "openmeter/billing/charges/lineage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/breakage", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/collector", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/customer", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/creditpurchase/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger", + "weight": 12, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/meter/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/clock", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/productcatalog", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/usagebased/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/breakage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/flatfee/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/historical", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/lineage/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/usagebased/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/flatfee/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/currencyx", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/creditpurchase/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/meter/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/flatfee", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/transactions", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ledger/chargeadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/meta", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/usagebased", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/customerbalance", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgersubaccount", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgertransaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ledger", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgerentry", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ledger/historical", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgeraccount", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ledger/account/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ledger/transactions/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgertransactiongroup", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical/adapter", + "to": "openmeter/ent/db/ledgersubaccountroute", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/historical", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical", + "to": "openmeter/ledger", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/historical", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/noop", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/lineage/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/models/ledgertransaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/ledger", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/ledger/transactions", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/recognizer", + "to": "openmeter/billing/charges/lineage", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/resolvers", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/resolvers", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ledger", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ent/db/ledgeraccount", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers", + "to": "openmeter/ent/db/ledgercustomeraccount", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/resolvers/adapter", + "to": "openmeter/ent/db/ledgercustomeraccount", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/routingrules", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/routingrules", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/routingrules", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/routingrules", + "to": "openmeter/ledger/transactions/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/routingrules", + "to": "openmeter/ledger", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/account/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/historical/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/routingrules", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/account/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/resolvers/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "openmeter/ledger/historical", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/testutils", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions", + "to": "pkg/currencyx", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/ledger/transactions", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions", + "to": "openmeter/customer", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions", + "to": "openmeter/ledger", + "weight": 20, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions/testutils", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/ledger/transactions/testutils", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/llmcost", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/llmcost", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/llmcost", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/llmcost", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "openmeter/llmcost", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/adapter", + "to": "openmeter/ent/db/llmcostprice", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/service", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/service", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/service", + "to": "openmeter/llmcost", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/sync", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/sync", + "to": "openmeter/llmcost", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/llmcost/sync", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/meter", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/ent/db/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/ent/db/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/ent/db/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/meter", + "to": "pkg/sortx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/framework/transport/httptransport", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/framework/commonhttp", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/models/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/meter", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/apiconverter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "api", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/httphandler", + "to": "openmeter/streaming", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/mockadapter", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/mockadapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/mockadapter", + "to": "openmeter/meter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/mockadapter", + "to": "openmeter/ent/db/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/mockadapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "openmeter/meter/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meter/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "openmeter/meterevent", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/adapter", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "pkg/framework/transport/httptransport", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "pkg/framework/commonhttp", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "openmeter/meterevent", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "openmeter/apiconverter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent/httphandler", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterevent", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "openmeter/meter", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "openmeter/meterexport", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/meterexport/service", + "to": "openmeter/streaming", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/ent/db/notificationrule", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/ent/db/notificationchannel", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/pagination", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/sortx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/ent/db/notificationeventdeliverystatus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/ent/db/notificationevent", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/ent/db", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "pkg/framework/entutils", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/adapter", + "to": "openmeter/notification", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification", + "to": "openmeter/notification/webhook/secret", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification", + "to": "pkg/models", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification", + "to": "pkg/pagination", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification", + "to": "pkg/sortx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/entitlement/snapshot", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/productcatalog/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "api", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/entitlement/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/subject/httphandler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/watermill/grouphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/customer/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/entitlement", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/notification", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "pkg/sortx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/billing/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/consumer", + "to": "openmeter/watermill/router", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "openmeter/notification/webhook", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "openmeter/notification/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "pkg/framework/tracex", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler", + "to": "openmeter/notification", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/eventhandler/noop", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/notification/webhook", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "pkg/sortx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "api", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/notification", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/httpdriver", + "to": "openmeter/notification/internal", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "openmeter/billing/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/internal", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "openmeter/notification/webhook", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "pkg/framework/transaction", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/service", + "to": "openmeter/notification", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook", + "to": "openmeter/notification/webhook/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/noop", + "to": "openmeter/notification/webhook", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/secret", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "openmeter/notification/webhook", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "openmeter/notification/webhook/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "openmeter/notification/webhook/svix/internal", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "pkg/idempotency", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "pkg/framework/tracex", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/notification/webhook/svix/internal", + "to": "openmeter/notification/webhook", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/adapter", + "to": "openmeter/portal", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/authenticator", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/authenticator", + "to": "openmeter/portal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/authenticator", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/authenticator", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal/httphandler", + "to": "openmeter/portal", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/portal", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/subscription/repo", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/planphase", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/plan", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/subscriptionitem", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/subscriptionphase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/planratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/adapter", + "to": "openmeter/ent/db/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/datetime", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/models", + "weight": 17, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "openmeter/taxcode", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/hasher", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog", + "to": "pkg/equal", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/productcatalog/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/addonratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/planphase", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/planratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/productcatalog/addon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/adapter", + "to": "openmeter/ent/db/addon", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "openmeter/productcatalog", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "openmeter/productcatalog/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/httpdriver", + "to": "openmeter/productcatalog/addon", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/taxcode", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/ent/db/addonratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog/addon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/addon/service", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/convert", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "openmeter/apiconverter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/strcase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/framework/operation", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "openmeter/llmcost", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/driver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/feature", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/filter", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "openmeter/meter", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/feature", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/feature", + "to": "pkg/ref", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "openmeter/productcatalog/feature", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "openmeter/productcatalog/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/featureresolver", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/http", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/http", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/productcatalog/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db/planphase", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db/plan", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/productcatalog/plan", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db/planratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/adapter", + "to": "openmeter/ent/db/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/datetime", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "openmeter/productcatalog", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "openmeter/productcatalog/plan", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "openmeter/productcatalog/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/httpdriver", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/ent/db/planratecard", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/plan", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/addon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/plan/service", + "to": "openmeter/productcatalog/planaddon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/addon", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/ent/db/plan", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/productcatalog/planaddon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/ent/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/ent/db/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/adapter", + "to": "openmeter/ent/db/addon", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "openmeter/productcatalog/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "openmeter/productcatalog/addon/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "openmeter/productcatalog/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/httpdriver", + "to": "openmeter/productcatalog/planaddon", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog/plan", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog/addon", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/planaddon/service", + "to": "openmeter/productcatalog/planaddon", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/convert", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog/driver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/framework/transport/httptransport", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/subscription/patch", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/subscription/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "api", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog/http", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/entitlement/driver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/subscription", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/framework/commonhttp", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/subscription/workflow", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog/plan/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/http", + "to": "openmeter/productcatalog/subscription", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "openmeter/subscription/workflow", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/subscription", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/subscription/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "pkg/models", + "weight": 7, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/subscription/workflow", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "pkg/clock", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/productcatalog/plan", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/productcatalog", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/productcatalog/subscription", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/subscription", + "weight": 8, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/service", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/subscription/testutils", + "to": "openmeter/productcatalog/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/planaddon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/planaddon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/plan/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/productcatalog/testutils", + "to": "openmeter/productcatalog/addon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager", + "to": "openmeter/progressmanager/entity", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/adapter", + "to": "openmeter/progressmanager/entity", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/adapter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/adapter", + "to": "openmeter/progressmanager", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/entity", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "openmeter/progressmanager/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "openmeter/progressmanager", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/progressmanager/httpdriver", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/registry", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/hooks/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/credit/balance", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry/builder", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/credit/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/entitlement/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/credit/hook", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry/builder", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/registry", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/registry", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/secret", + "to": "openmeter/secret/entity", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/adapter", + "to": "openmeter/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/adapter", + "to": "openmeter/secret/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/entity", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/entity", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/service", + "to": "openmeter/secret", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/service", + "to": "openmeter/secret/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/secret/service", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/meterevent/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/portal/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/server/router", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/credit/engine", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/portal/authenticator", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/productcatalog/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/cost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/ingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "api/v3/server", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "api/v3", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/progressmanager/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/secret/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/server", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/meter/httphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/log", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/currencies", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/subscription/workflow", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/contextx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "pkg/ref", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/credit/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/ingest/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app/stripe/httpdriver", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/notification/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/meterevent", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "api/v3/handlers/currencies", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/subscription/http", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/billing/creditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app/custominvoicing/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/entitlement/driver/v2", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/driver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/ledger", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/portal/authenticator", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/portal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/billing/charges", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/cost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/ingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/info/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "api", + "weight": 17, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/credit/grant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/entitlement/driver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/meterevent/httphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/portal/httphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/errorsx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subject/httphandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/debug/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/meter/httphandler", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/progressmanager", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/customer/httpdriver", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/currencies", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/notification", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/progressmanager/httpdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/debug", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/addon/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subscription/workflow", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subscription/addon/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/ledger/customerbalance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/plan/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/billing/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "pkg/contextx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/productcatalog/planaddon/httpdriver", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/llmcost", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/server/router", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/sink/flushhandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/ingest/kafkaingest", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "pkg/kafka/metrics/stats", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "pkg/kafka/metrics", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/ingest/kafkaingest/topicresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink", + "to": "openmeter/sink/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler", + "to": "openmeter/sink/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification/events", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification/events", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification/events", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification/events", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/sink/flushhandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/sink/flushhandler/ingestnotification/events", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/flushhandler/ingestnotification", + "to": "openmeter/sink/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/models", + "to": "openmeter/ingest/kafkaingest/serializer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/models", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/sink/models", + "to": "openmeter/dedupe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/progressmanager/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/progressmanager/entity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "pkg/filter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/meter", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "pkg/sortx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/progressmanager", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/clickhouse", + "to": "openmeter/streaming", + "weight": 10, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming", + "to": "openmeter/meter", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/retry", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/retry", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/testutils", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/streaming/testutils", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming/testutils", + "to": "openmeter/meter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/streaming/testutils", + "to": "openmeter/streaming", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "openmeter/ent/db/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/adapter", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "pkg/framework/transport/httptransport", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/httphandler", + "to": "openmeter/subject", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service/hooks", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/customer/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service/hooks", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/service", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/subject/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/service", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/entitlement/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subject/testutils", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/subscription/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "pkg/timeutil", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon", + "to": "pkg/sortx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/ent/db/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/session", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon", + "to": "openmeter/productcatalog/addon", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "pkg/datetime", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/subscription/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/subscription/addon", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/subscription/patch", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/productcatalog/plan", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/productcatalog/addon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/diff", + "to": "openmeter/subscription", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/framework/transport/httptransport", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/subscription/addon", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/framework/commonhttp", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/namespace/namespacedriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/subscription/workflow", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "api", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/productcatalog/subscription/http", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/productcatalog/http", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/subscription", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/http", + "to": "openmeter/subscription/addon/diff", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "openmeter/subscription/addon", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "openmeter/ent/db/subscriptionaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/repo", + "to": "openmeter/ent/db/subscriptionaddonquantity", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/subscription/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/subscription/addon", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/service", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/productcatalog/plan", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/productcatalog/subscription", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/subscription", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/productcatalog/planaddon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/addon/service", + "to": "openmeter/productcatalog/addon", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "openmeter/event/metadata", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/convert", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "openmeter/session", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/models", + "weight": 23, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/treex", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "openmeter/productcatalog", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/datetime", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/currencyx", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "openmeter/entitlement", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "openmeter/subscription/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/framework/commonhttp", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/entitlement", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/entitlement", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/entitlement", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/entitlement", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/entitlement", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/entitlement", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/entitlement", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/hooks/annotations", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/hooks/annotations", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "pkg/datetime", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "openmeter/subscription/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/patch", + "to": "pkg/clock", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "openmeter/testutils", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/patch", + "to": "openmeter/subscription", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db/plan", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db/subscriptionitem", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db/subscriptionphase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/subscription", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db/predicate", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/repo", + "to": "pkg/framework/entutils", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/repo", + "to": "openmeter/ent/db/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/subscription/validators/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/models", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/filter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/productcatalog", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/framework/transaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/subscription", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/subscription/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/subscription/workflow", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/service", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/workflow/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/repo", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/registry", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/hooks/annotations", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/customer", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/models", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/testutils", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/planaddon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/datetime", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/addon", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/addon/repo", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/customer/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/plan", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/planaddon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/planaddon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "pkg/framework/pgdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/workflow", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/plan/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subject/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/productcatalog/addon", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/testutils", + "to": "openmeter/subject", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/customer", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/customer", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/customer", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/customer", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/customer", + "to": "openmeter/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/validators/subscription", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/registry", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription/patch", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/clock", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/framework/lockr", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/slicesx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/ffx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/framework/transaction", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription/addon", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/productcatalog/planaddon", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription/workflow", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/subscription/workflow/service", + "to": "openmeter/subscription/addon/diff", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode/adapter", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode/adapter", + "to": "openmeter/taxcode", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "openmeter/ent/db/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "openmeter/ent/db/organizationdefaulttaxcodes", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode/adapter", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "openmeter/ent/db", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/adapter", + "to": "pkg/framework/entutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "pkg/framework/transaction", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "pkg/pagination", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode", + "to": "openmeter/namespace", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode", + "to": "openmeter/taxcode/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/service", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode/service", + "to": "pkg/models", + "weight": 4, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/service", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/taxcode/service", + "to": "openmeter/taxcode", + "weight": 5, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/service", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/service", + "to": "openmeter/taxcode/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/service", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/taxcode/testutils", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/testutils", + "to": "pkg/framework/pgdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/testutils", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/watermill/driver/kafka", + "to": "pkg/kafka", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/driver/kafka", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/driver/kafka", + "to": "openmeter/watermill/driver/kafka/metrics", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/eventbus", + "to": "openmeter/sink/flushhandler/ingestnotification/events", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/eventbus", + "to": "openmeter/watermill/driver/noop", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/eventbus", + "to": "openmeter/entitlement/balanceworker/events", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "openmeter/watermill/eventbus", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/marshaler", + "to": "openmeter/event/metadata", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/router", + "to": "pkg/framework/tracex", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/router", + "to": "app/config", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "openmeter/watermill/router", + "to": "openmeter/watermill/marshaler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/clock", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/datetime", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/entitydiff", + "to": "pkg/equal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/equal", + "to": "pkg/hasher", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/errorsx", + "to": "pkg/framework/transport/httptransport", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/errorsx", + "to": "api/v3", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/errorsx", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/filter", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/commonhttp", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/commonhttp", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/commonhttp", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/commonhttp", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/commonhttp", + "to": "pkg/defaultx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entcursor", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entcursor", + "to": "pkg/framework/entutils/testutils/ent1/db/example1", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entcursor", + "to": "pkg/framework/entutils/testutils/ent1/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entcursor", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entdriver", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/entpaginate", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entpaginate", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entpaginate", + "to": "pkg/framework/entutils/testutils/ent1/db/example1", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/entpaginate", + "to": "pkg/framework/entutils/testutils/ent1/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/framework/entutils/testutils/ent2/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/slicesx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils", + "to": "pkg/framework/entutils/testutils/ent1/db", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/framework/entutils/testutils/ent1/schema", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/framework/entutils/testutils/ent1/db/example1", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/framework/entutils/testutils/ent1/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/framework/entutils/testutils/ent1/db/predicate", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db", + "to": "pkg/pagination/v2", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db/enttest", + "to": "pkg/framework/entutils/testutils/ent1/db/runtime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db/enttest", + "to": "pkg/framework/entutils/testutils/ent1/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db/enttest", + "to": "pkg/framework/entutils/testutils/ent1/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db/example1", + "to": "pkg/framework/entutils/testutils/ent1/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/db/hook", + "to": "pkg/framework/entutils/testutils/ent1/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1", + "to": "pkg/framework/entutils/entpaginate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1", + "to": "pkg/framework/entutils/entcursor", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1", + "to": "pkg/framework/entutils/entexpose", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent1/schema", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db", + "to": "pkg/framework/entutils/testutils/ent2/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db", + "to": "pkg/framework/entutils/testutils/ent2/db/predicate", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db", + "to": "pkg/framework/entutils/testutils/ent2/db/example2", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db", + "to": "pkg/framework/entutils/testutils/ent2/schema", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db/enttest", + "to": "pkg/framework/entutils/testutils/ent2/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db/enttest", + "to": "pkg/framework/entutils/testutils/ent2/db/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db/enttest", + "to": "pkg/framework/entutils/testutils/ent2/db/runtime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db/example2", + "to": "pkg/framework/entutils/testutils/ent2/db/predicate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/db/hook", + "to": "pkg/framework/entutils/testutils/ent2/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2", + "to": "pkg/framework/entutils/entexpose", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/entutils/testutils/ent2/schema", + "to": "pkg/framework/entutils", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/lockr", + "to": "pkg/framework/transaction", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/lockr", + "to": "pkg/framework/pgdriver", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/lockr", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/lockr", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/lockr", + "to": "openmeter/ent/db", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/lockr", + "to": "pkg/framework/entutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/lockr", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/framework/pgdriver", + "to": "pkg/pgxpoolobserver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/transport/httptransport", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/transport/httptransport", + "to": "pkg/framework/commonhttp", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/transport/httptransport", + "to": "pkg/framework/transport/httptransport/encoder", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/transport/httptransport", + "to": "pkg/framework/operation", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/framework/transport/httptransport", + "to": "pkg/contextx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/kafka/metrics/internal", + "to": "pkg/kafka/metrics/stats", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/kafka/metrics", + "to": "pkg/kafka/metrics/internal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/kafka/metrics", + "to": "pkg/kafka/metrics/stats", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/kafka", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/lrux", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/models", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/models", + "to": "pkg/equal", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/models", + "to": "pkg/treex", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/models", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/models/http", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/models/http", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/statelessx", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "pkg/timeutil", + "to": "openmeter/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/timeutil", + "to": "pkg/datetime", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "pkg/timeutil", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "quickstart", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "quickstart", + "to": "api/v3", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "quickstart", + "to": "api/client/go", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "pkg/currencyx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "test/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/custominvoicing", + "to": "openmeter/app/custominvoicing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app/stripe/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/billing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "pkg/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/secret/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app/stripe/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app/stripe", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/secret/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/billing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/billing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/stripe/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/timeutil", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges/models/payment", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/breakage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/collector", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "test/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/secret/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "api", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/customer/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/stripe/client", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/stripe/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/datetime", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/secret/entity", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/stripe", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/secret/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "test/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/transactions", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/secret", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ledger/chargeadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges/meta", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/billing/charges/usagebased", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/app/stripe", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "pkg/timeutil", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/ent/db", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/taxcode/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "pkg/clock", + "weight": 9, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/rating", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/framework/lockr", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "pkg/datetime", + "weight": 10, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/ent/db/billingstandardinvoicedetailedline", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/meter/mockadapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/app/sandbox", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/subscription/workflow", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/ent/db/taxcode", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/models/totals", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/plan/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/metered", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/workflow/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/repo", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/app/custominvoicing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/billing/worker/subscriptionsync/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/models", + "weight": 14, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/models/stddetailedline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/planaddon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/addon/repo", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/billing/worker/subscriptionsync/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/billing/service/invoicecalc", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/billing/adapter", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/hooks/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/customer", + "weight": 11, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/credit/balance", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/credit", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/customer/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/plan", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/planaddon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/app/custominvoicing", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/streaming/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/entitlement/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/app", + "weight": 7, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "tools/migrate", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing", + "weight": 16, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subject/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/credit/hook", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/ent/db/billinginvoiceline", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/taxcode/service", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/subscription/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/productcatalog/feature", + "weight": 8, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/addon", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "pkg/currencyx", + "weight": 9, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/meter", + "weight": 6, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/watermill/eventbus", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/credit/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription", + "weight": 2, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/subscription/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "test/billing", + "to": "openmeter/app/custominvoicing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/billing", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/timeutil", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/taxcode", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/models/payment", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/creditgrant", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/breakage", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/collector", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/customer", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/creditpurchase/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/pagination", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/creditpurchase", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/resolvers", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/clock", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ent/db/ledgerbreakagerecord", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/productcatalog", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/recognizer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/meta/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/breakage/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/lineage/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/datetime", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/productcatalog/feature", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "pkg/currencyx", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/account", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/creditgrant/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/creditpurchase/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/flatfee", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "test/billing", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/transactions", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/app/custominvoicing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/chargeadapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/streaming/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/models/creditrealization", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ledger/customerbalance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/app", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/meta", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/ent/tx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/usagebased", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/lineage/adapter", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/credits", + "to": "openmeter/billing/charges/lineage", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/workflow/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/plan/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/repo", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/hooks/annotations", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/customer", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/billing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/models", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/addon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/filter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/meter/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/clock", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/featureresolver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/registry/builder", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/streaming", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/planaddon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/feature", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/datetime", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/ffx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/currencyx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/addon/repo", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "app/config", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/customer/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/plan", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/meter/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/planaddon/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/entitlement", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/entitlement/validators/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/subscription/service", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/app/sandbox", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/addon/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/validators/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/workflow", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/productcatalog/plan/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/billing", + "weight": 3, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subject/service/hooks", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/billing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/customer", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/metered", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/boolean", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/convert", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/ent/db", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/hooks/subscription", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/customer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/models", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/credit/balance", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/customer/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/static", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/credit/grant", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/balanceworker", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/clock", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/customer/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/subject/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/testutils", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/driver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/framework/lockr", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/credit", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/datetime", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/subject/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/meter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/framework/entutils/entdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/ent/tx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/credit/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/streaming/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "pkg/framework/pgdriver", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/entitlement/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/credit/hook", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/entitlement/regression", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/webhook", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/entitlement/snapshot", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/convert", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/timeutil", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/webhook/svix", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/webhook/secret", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/pagination", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/productcatalog/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "api", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/productcatalog/feature", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/event/models", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/meter", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/meter/mockadapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/consumer", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/entitlement", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification", + "weight": 6, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/defaultx", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/eventhandler", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/notification/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/pglockx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "pkg/sortx", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/notification", + "to": "openmeter/subject", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/worker/subscriptionsync/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/customer", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/taxcode/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/taxcode/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "pkg/models", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/subscription/patch", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "pkg/clock", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/productcatalog", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/testutils", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "pkg/datetime", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/productcatalog/feature", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/worker/subscriptionsync", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/worker/subscriptionsync/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/productcatalog/plan", + "weight": 4, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/watermill/eventbus", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/app/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/subscription", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/productcatalog/subscription/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/subscription/testutils", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "pkg/featuregate", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/app/sandbox", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/subscription/workflow", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/app", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing", + "weight": 2, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/service/invoicecalc", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/productcatalog/subscription", + "weight": 5, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/adapter", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/billing/rating/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "test/subscription", + "to": "openmeter/app/service", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "tools/migrate/cmd/viewgen", + "to": "tools/migrate/viewgen", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "tools/migrate", + "to": "openmeter/testutils", + "weight": 3, + "crossComponent": false, + "inCycle": true + }, + { + "from": "tools/migrate", + "to": "tools/migrate/viewgen", + "weight": 1, + "crossComponent": false, + "inCycle": false + }, + { + "from": "tools/migrate", + "to": "openmeter/productcatalog", + "weight": 1, + "crossComponent": false, + "inCycle": true + }, + { + "from": "tools/migrate/viewgen", + "to": "pkg/strcase", + "weight": 1, + "crossComponent": false, + "inCycle": false + } + ], + "cycles": [ + { + "directories": [ + "api", + "openmeter/app", + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/credit", + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/app", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargessearchv1", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/customer", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/meter", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/ent/db/usagereset", + "openmeter/ent/schema", + "openmeter/entitlement", + "openmeter/entitlement/balanceworker/events", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/historical", + "openmeter/ledger/historical/adapter", + "openmeter/ledger/resolvers", + "openmeter/ledger/resolvers/adapter", + "openmeter/ledger/routingrules", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/ledger/transactions/testutils", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/notification", + "openmeter/notification/webhook/secret", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/datetime", + "pkg/filter", + "pkg/framework/commonhttp", + "pkg/framework/entutils", + "pkg/framework/entutils/entdriver", + "pkg/framework/entutils/testutils/ent1/db", + "pkg/framework/entutils/testutils/ent1/schema", + "pkg/framework/entutils/testutils/ent2/db", + "pkg/framework/entutils/testutils/ent2/schema", + "pkg/framework/lockr", + "pkg/models", + "pkg/timeutil", + "tools/migrate" + ], + "evidence": [ + { + "from_file": "api/api.gen.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/app.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/appbase.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/input.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/marketplace.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/app/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/app/app.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/app/errors.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/app/events.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/app/input.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/invoicedetailedline_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/invoiceline.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/invoicelinesplitgroup.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/lineengine.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/stdinvoice.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/stdinvoice_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/stdinvoiceline.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/stdinvoiceline_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/taxconfig.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/billing/adapter.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/customer.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/customeroverride.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/invoice.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/lock.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/service.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/stdinvoice.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/app.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/customer.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/customeroverride.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/derived.gen.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/discount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoicedetailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoiceline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoicelinediscount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoicelinesplitgroup.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/invoicelinesplitgroup_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/profile.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/stdinvoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/stdinvoice_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/stdinvoiceline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/stdinvoiceline_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/taxconfig.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/billing/invoicedetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/invoicedetailedline_test.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/stdinvoice_test.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/stdinvoiceline_test.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "api", + "to_dir": "api" + }, + { + "from_file": "openmeter/billing/invoice.go", + "imports": "api", + "to_dir": "api" + }, + { + "from_file": "openmeter/billing/profile.go", + "imports": "api", + "to_dir": "api" + }, + { + "from_file": "openmeter/billing/invoice.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/billing/customeroverride.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/discount.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/invoicedetailedline_test.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/invoiceline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/invoicelinesplitgroup.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/invoicelinesplitgroup_test.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/profile.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/stdinvoiceline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/stdinvoiceline_test.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/taxconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/customer.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/gatheringinvoice.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/stdinvoice.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/stdinvoiceline.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/customeroverride.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/billing/defaults.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/billing/profile.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/billing/workflow.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/billing/lineengine.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/billing/derived.gen.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/stdinvoicecredits.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/adapter.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/app.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/customeroverride.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/errors.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/events.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/profile.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/service.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/stdinvoice.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/validationissue.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/billing/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/adapter.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/handler.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/adapter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/featurefilters.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/funded_credit_activity.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/handler.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/settlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/statemachine.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/adapter.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/service.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/adapter.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/funded_credit_activity.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/statemachine.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/charge.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/creditpurchase/funded_credit_activity.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/billing/charges/flatfee/handler.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/flatfee/service.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/detailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/handler.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/statemachine.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/flatfee/bookedat.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/flatfee/handler.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/flatfee/detailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/flatfee/handler.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/billing/charges/flatfee/service.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge_test.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/realizationrun.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/service.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/statemachine.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/flatfee/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/flatfee/bookedat.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge_test.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/flatfee/prorating.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/flatfee/charge.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/flatfee/handler.go", + "imports": "openmeter/billing/charges/lineage", + "to_dir": "openmeter/billing/charges/lineage" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/feehelper.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/patch.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/feehelper.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/charges/lineage/service.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/lineage/lineage.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/lineage/lineage_test.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/lineage/service.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/meta/adapter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/charge.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/intent.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/patch.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/patchdelete.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/patchextend.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/patchshrink.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/resource.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/subscription.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/meta/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/billing/charges/meta/intent.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/meta/patchextend_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/meta/patchshrink_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/meta/timestamps.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/meta/patch.go", + "imports": "openmeter/billing/charges/invoiceupdater", + "to_dir": "openmeter/billing/charges/invoiceupdater" + }, + { + "from_file": "openmeter/billing/charges/meta/intent.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/meta/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/meta/charge.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/meta/intent.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/meta/timestamps.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/models/chargemeta/mixin.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/allocation.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/correction.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/correction_test.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/mixin.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/models.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/allocation.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/correction.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/correction_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/lineage.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/mixin.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/models.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/realizations.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/allocation.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/correction_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/mixin.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/models.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/realizations.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/models/creditrealization/mixin.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/mixin.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/stdinvoice.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/mixin.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/stdinvoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/mixin.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/stdinvoice.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/invoicedusage/mixin.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/models/ledgertransaction/ledger.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/mixin.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/payment/models.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/models/payment/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/external.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/invoiced.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/mixin.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/models.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/models/payment/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/billing/charges/models/payment/mixin.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/payment/models.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/models/payment/invoiced.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/models/payment/mixin.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline_uniqueref.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/handler.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/rating.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/charges/usagebased/adapter.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/billing/charges/usagebased/adapter.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/billing/charges/usagebased/charge.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/billing/charges/usagebased/handler.go", + "imports": "openmeter/billing/charges/models/ledgertransaction", + "to_dir": "openmeter/billing/charges/models/ledgertransaction" + }, + { + "from_file": "openmeter/billing/charges/usagebased/charge.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/handler.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/ratingengine.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/statemachine.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline.go", + "imports": "openmeter/billing/rating", + "to_dir": "openmeter/billing/rating" + }, + { + "from_file": "openmeter/billing/charges/usagebased/rating.go", + "imports": "openmeter/billing/rating", + "to_dir": "openmeter/billing/rating" + }, + { + "from_file": "openmeter/billing/charges/usagebased/charge.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/usagebased/detailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/usagebased/rating.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/charges/usagebased/charge.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/billing/charges/usagebased/service.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/billing/charges/usagebased/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/billing/charges/usagebased/adapter.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/usagebased/handler.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/billing/charges/usagebased/rating.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/usagebased/service.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/charges/usagebased/adapter.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/charge.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/realizationrun.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/service.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/service_test.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/statemachine.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/billing/charges/usagebased/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/charges/usagebased/handler.go", + "imports": "openmeter/billing/charges/lineage", + "to_dir": "openmeter/billing/charges/lineage" + }, + { + "from_file": "openmeter/billing/models/creditsapplied/model.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/derived.gen.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mapping.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/model.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mapping.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/model.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/derived.gen.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mapping.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mixin.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/model.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mapping.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mixin.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/model.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/models/stddetailedline/mixin.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/billing/rating/service.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/billing/rating/detailedline.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/rating/line.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/rating/service.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/billing/rating/detailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/billing/rating/detailedline.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/rating/detailedline_test.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/rating/line.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/rating/service.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/billing/rating/detailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/billing/rating/line.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/credit/connector.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/trace.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/grant.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/trace.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/connector.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/connector.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/grant.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/credit/grant.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/credit/balance.go", + "imports": "openmeter/credit/engine", + "to_dir": "openmeter/credit/engine" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "openmeter/credit/engine", + "to_dir": "openmeter/credit/engine" + }, + { + "from_file": "openmeter/credit/trace.go", + "imports": "openmeter/credit/engine", + "to_dir": "openmeter/credit/engine" + }, + { + "from_file": "openmeter/credit/connector.go", + "imports": "openmeter/watermill/eventbus", + "to_dir": "openmeter/watermill/eventbus" + }, + { + "from_file": "openmeter/credit/grant.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/credit/connector.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/helper.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "openmeter/streaming/testutils", + "to_dir": "openmeter/streaming/testutils" + }, + { + "from_file": "openmeter/credit/balance/service.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/balance/usage.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/balance/repository.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/balance/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/balance/usage.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/balance/usage.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/balance/balance.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance/balance_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance/service.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance/usage.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/balance/service.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/balance/service_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/balance/usage.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "openmeter/streaming/testutils", + "to_dir": "openmeter/streaming/testutils" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/streaming/testutils", + "to_dir": "openmeter/streaming/testutils" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "openmeter/streaming/testutils", + "to_dir": "openmeter/streaming/testutils" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "openmeter/streaming/testutils", + "to_dir": "openmeter/streaming/testutils" + }, + { + "from_file": "openmeter/credit/engine/burnphase.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/engine.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/grant.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/history.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/history_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/run.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/engine/engine.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/run.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/engine/engine.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/grant.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/history.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/history_test.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/reset.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/run.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/credit/engine/burnphase.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/engine.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/grant.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/reset.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/run.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/credit/engine/engine_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/engine/reset_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/engine/run_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/engine/runresult_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/grant/events_2.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant/grant.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant/grant_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant/owner_connector.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant/repo.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/credit/grant/events_2.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/grant/grant.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/grant/owner_connector.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/grant/repo.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/credit/grant/owner_connector.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/credit/grant/grant_test.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/credit/grant/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/credit/grant/events.go", + "imports": "openmeter/subject", + "to_dir": "openmeter/subject" + }, + { + "from_file": "openmeter/credit/grant/events_2.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/credit/grant/owner_connector.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/customer/customer.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/customer/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/customer/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/customer/customer.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/customer/customer.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/customer/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/customer/adapter.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/customer/customer.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/customer/service.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_delete.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeusagebasedrunpayment", + "to_dir": "openmeter/ent/db/chargeusagebasedrunpayment" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_create.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_query.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_update.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_delete.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/creditrealizationlineagesegment", + "to_dir": "openmeter/ent/db/creditrealizationlineagesegment" + }, + { + "from_file": "openmeter/ent/db/charge.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_delete.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/chargeusagebased", + "to_dir": "openmeter/ent/db/chargeusagebased" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/plan_create.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/plan_query.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/plan_update.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planphase.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planphase_create.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planphase_delete.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planphase_query.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planphase_update.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planratecard.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planratecard_create.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planratecard_query.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/planratecard_update.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/planphase", + "to_dir": "openmeter/ent/db/planphase" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationevent_create.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationevent_query.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationevent_update.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_delete.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/notificationeventdeliverystatus", + "to_dir": "openmeter/ent/db/notificationeventdeliverystatus" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/plan.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/plan_create.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/plan_delete.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/plan_query.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/plan_update.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planaddon.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planaddon_create.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planaddon_query.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planphase.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planphase_create.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planphase_query.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/planphase_update.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/plan", + "to_dir": "openmeter/ent/db/plan" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount_create.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount_delete.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount_query.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount_update.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ent/db/addonratecard.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/addonratecard_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/addonratecard_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/entitlement.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/grant.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/grant_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/plan.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/plan_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/plan_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planphase.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planphase_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planphase_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planratecard.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planratecard_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planratecard_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/usagereset.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/usagereset_create.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/app_create.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/app_query.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/app_update.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_query.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingprofile.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingprofile_delete.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingprofile_query.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingprofile_update.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_query.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billingprofile", + "to_dir": "openmeter/ent/db/billingprofile" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeflatfeeruncreditallocations", + "to_dir": "openmeter/ent/db/chargeflatfeeruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedline", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/charge.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_delete.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/chargeflatfee", + "to_dir": "openmeter/ent/db/chargeflatfee" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_create.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_delete.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_query.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_update.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_create.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_query.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_create.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_query.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_delete.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeflatfeerunpayment", + "to_dir": "openmeter/ent/db/chargeflatfeerunpayment" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1.go", + "imports": "openmeter/ent/db/chargessearchv1", + "to_dir": "openmeter/ent/db/chargessearchv1" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1_query.go", + "imports": "openmeter/ent/db/chargessearchv1", + "to_dir": "openmeter/ent/db/chargessearchv1" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargessearchv1", + "to_dir": "openmeter/ent/db/chargessearchv1" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargessearchv1", + "to_dir": "openmeter/ent/db/chargessearchv1" + }, + { + "from_file": "openmeter/ent/db/addonratecard.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/addonratecard_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/addonratecard_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/addonratecard_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/organizationdefaulttaxcodes.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/organizationdefaulttaxcodes_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/planratecard.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/planratecard_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/planratecard_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/planratecard_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_delete.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/ent/db/balancesnapshot.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/balancesnapshot_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/balancesnapshot_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/entitlement.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/entitlement_delete.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/entitlement_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/entitlement_update.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/grant.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/grant_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/grant_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/usagereset.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/usagereset_create.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/usagereset_query.go", + "imports": "openmeter/ent/db/entitlement", + "to_dir": "openmeter/ent/db/entitlement" + }, + { + "from_file": "openmeter/ent/db/llmcostprice.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_create.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_update.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeusagebasedruncreditallocations", + "to_dir": "openmeter/ent/db/chargeusagebasedruncreditallocations" + }, + { + "from_file": "openmeter/ent/db/app.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/app_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/app_delete.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/app_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/app_update.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustomer.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustomer_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustomer_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicing.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicing_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicing_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appstripe.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appstripe_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/appstripe_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billingprofile.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billingprofile_query.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/app", + "to_dir": "openmeter/ent/db/app" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceflatfeelineconfig" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/llmcostprice.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_create.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_delete.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_query.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/llmcostprice_update.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/llmcostprice", + "to_dir": "openmeter/ent/db/llmcostprice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_delete.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoicelinediscount", + "to_dir": "openmeter/ent/db/billinginvoicelinediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_delete.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeflatfeerun", + "to_dir": "openmeter/ent/db/chargeflatfeerun" + }, + { + "from_file": "openmeter/ent/db/addon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/addon_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/addon_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingprofile.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingprofile_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/customer.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/entitlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/entitlement_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/grant.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/grant_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/grant_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerentry.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerentry_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgerentry_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransaction.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransaction_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransaction_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransactiongroup.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransactiongroup_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/ledgertransactiongroup_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/meter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/meter_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/meter_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationchannel.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationevent.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationevent_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationevent_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationrule.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationrule_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/notificationrule_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/planaddon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/planaddon_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/planaddon_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/taxcode.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/usagereset.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/usagereset_create.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/usagereset_update.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_delete.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_query.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingprofile_query.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billingprofile_update.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/customer.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/billingcustomeroverride", + "to_dir": "openmeter/ent/db/billingcustomeroverride" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingprofile.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingprofile_query.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingprofile_update.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_delete.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_query.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/billingworkflowconfig", + "to_dir": "openmeter/ent/db/billingworkflowconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/grant.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/ent/db/grant_create.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/chargeusagebasedrundetailedline", + "to_dir": "openmeter/ent/db/chargeusagebasedrundetailedline" + }, + { + "from_file": "openmeter/ent/db/addon.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addon_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addon_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addonratecard.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addonratecard_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addonratecard_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/plan.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/plan_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/plan_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/planratecard.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/planratecard_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/planratecard_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_create.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_query.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_update.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationevent.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationevent_create.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationevent_query.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationrule.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationrule_create.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationrule_delete.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationrule_query.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/notificationrule_update.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/notificationrule", + "to_dir": "openmeter/ent/db/notificationrule" + }, + { + "from_file": "openmeter/ent/db/appcustomer.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appcustomer_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appcustomer_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicingcustomer.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appstripecustomer.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appstripecustomer_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/appstripecustomer_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customer.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customer_delete.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customersubjects.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customersubjects_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/customersubjects_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/entitlement.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/entitlement_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/customer", + "to_dir": "openmeter/ent/db/customer" + }, + { + "from_file": "openmeter/ent/db/app_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/app_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/app_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_delete.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingprofile_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingprofile_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingprofile_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoice", + "to_dir": "openmeter/ent/db/billinginvoice" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/charge.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/charge_delete.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/charge_update.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_create.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_query.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/charge", + "to_dir": "openmeter/ent/db/charge" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseexternalpayment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_create.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/charge_update.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_create.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_delete.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_query.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage_update.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/creditrealizationlineage", + "to_dir": "openmeter/ent/db/creditrealizationlineage" + }, + { + "from_file": "openmeter/ent/db/charge.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/expose.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/db/charge.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_delete.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchasecreditgrant.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/chargecreditpurchase", + "to_dir": "openmeter/ent/db/chargecreditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_delete.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoicevalidationissue", + "to_dir": "openmeter/ent/db/billinginvoicevalidationissue" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/schema", + "to_dir": "openmeter/ent/schema" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/entitlement_query.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/entitlement_update.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/usagereset.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/usagereset_create.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/usagereset_delete.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/usagereset_query.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/usagereset_update.go", + "imports": "openmeter/ent/db/usagereset", + "to_dir": "openmeter/ent/db/usagereset" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/entitlement_query.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/entitlement_update.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/grant.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/grant_create.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/grant_delete.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/grant_query.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/grant_update.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/grant", + "to_dir": "openmeter/ent/db/grant" + }, + { + "from_file": "openmeter/ent/db/addon_create.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addon_query.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addon_update.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addonratecard.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addonratecard_create.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addonratecard_delete.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addonratecard_query.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/addonratecard_update.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/addonratecard", + "to_dir": "openmeter/ent/db/addonratecard" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_delete.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoicelineusagediscount", + "to_dir": "openmeter/ent/db/billinginvoicelineusagediscount" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/balancesnapshot.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/ent/db/balancesnapshot_create.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationchannel.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_create.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_delete.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_query.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_update.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationrule_create.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationrule_query.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/notificationrule_update.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/notificationchannel", + "to_dir": "openmeter/ent/db/notificationchannel" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_delete.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/chargeflatfeerundetailedline", + "to_dir": "openmeter/ent/db/chargeflatfeerundetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "to_dir": "openmeter/ent/db/billinginvoiceusagebasedlineconfig" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planphase_create.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planphase_query.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planphase_update.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planratecard.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planratecard_create.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planratecard_delete.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planratecard_query.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/planratecard_update.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/planratecard", + "to_dir": "openmeter/ent/db/planratecard" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/app.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/db/app_create.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/db/app_update.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoice.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_create.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_query.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_update.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_create.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccount_query.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_create.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_delete.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_query.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_update.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/charge_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/billinginvoicesplitlinegroup", + "to_dir": "openmeter/ent/db/billinginvoicesplitlinegroup" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/entmixinaccessor.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_delete.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/charge_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/charge_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/charge_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/billinginvoiceline", + "to_dir": "openmeter/ent/db/billinginvoiceline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "to_dir": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount_create.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount_create.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute_create.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_delete.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord_update.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/ledgerbreakagerecord", + "to_dir": "openmeter/ent/db/ledgerbreakagerecord" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoice_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_delete.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/chargeusagebasedruns", + "to_dir": "openmeter/ent/db/chargeusagebasedruns" + }, + { + "from_file": "openmeter/ent/db/feature.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/db/feature_update.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/entitlement_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/entitlement_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/entitlement_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_delete.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/taxcode_create.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/taxcode_query.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/taxcode_update.go", + "imports": "openmeter/ent/db/subscriptionitem", + "to_dir": "openmeter/ent/db/subscriptionitem" + }, + { + "from_file": "openmeter/ent/db/meter.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/db/meter_create.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationevent.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationevent_create.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationevent_delete.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationevent_query.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationevent_update.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationrule_create.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationrule_query.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/notificationrule_update.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/notificationevent", + "to_dir": "openmeter/ent/db/notificationevent" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationchannel.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_create.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationchannel_update.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationevent.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationevent_create.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationrule.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationrule_create.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationrule_update.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/setorclear.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "to_dir": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/feature.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/feature_create.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/feature_query.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/meter.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/meter_create.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/meter_delete.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/meter_query.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/meter_update.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/meter", + "to_dir": "openmeter/ent/db/meter" + }, + { + "from_file": "openmeter/ent/db/addon.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addon_create.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addon_delete.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addon_query.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addon_update.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addonratecard.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addonratecard_create.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addonratecard_query.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/addonratecard_update.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/planaddon.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/planaddon_create.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/planaddon_query.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon_create.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon_query.go", + "imports": "openmeter/ent/db/addon", + "to_dir": "openmeter/ent/db/addon" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline_update.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/client.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/customer_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/customer_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/customer_update.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/ent.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/mutation.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/plan_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/plan_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/plan_update.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/runtime.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscription.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscription_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscription_delete.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscription_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscription_update.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionaddon_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionbillingsyncstate.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_create.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/subscriptionphase_query.go", + "imports": "openmeter/ent/db/subscription", + "to_dir": "openmeter/ent/db/subscription" + }, + { + "from_file": "openmeter/ent/db/addon/addon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/addon/addon.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addon/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addonratecard/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/addonratecard/addonratecard.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/addonratecard/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/app/where.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingcustomeroverride/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoice/billinginvoice.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoice/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoice/where.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "imports": "openmeter/billing/models/creditsapplied", + "to_dir": "openmeter/billing/models/creditsapplied" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceline/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelinediscount/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicelineusagediscount/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicesplitlinegroup/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billinginvoicevalidationissue/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingprofile/where.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline/where.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedline/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/billingworkflowconfig/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/charge/where.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/where.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/where.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchase/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/where.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfee/where.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerun/where.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline/where.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerundetailedline/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeflatfeerunpayment/where.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/where.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargessearchv1/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/where.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/where.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebased/where.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline/where.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrundetailedline/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedrunpayment/where.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/chargeusagebasedruns/where.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineage/where.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/creditrealizationlineagesegment/where.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/db/customer/where.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/entitlement/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/entitlement/entitlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/grant/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/ledgeraccount/where.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgerbreakagerecord/where.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgercustomeraccount/where.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/ledgersubaccountroute/where.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/db/llmcostprice/llmcostprice.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/ent/db/meter/meter.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/db/meter/where.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/db/notificationchannel/notificationchannel.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationchannel/where.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationevent/notificationevent.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationevent/where.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationeventdeliverystatus/where.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationrule/notificationrule.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/notificationrule/where.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/db/plan/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/plan/plan.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/plan/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/planphase/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planratecard/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/planratecard/planratecard.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/planratecard/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscription/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscription/subscription.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscription/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem/subscriptionitem.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem/subscriptionitem.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/subscriptionitem/where.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/db/taxcode/taxcode.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/db/usagereset/where.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/taxcode.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/ent/schema/chargescreditpurchase.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/charges/models/payment", + "to_dir": "openmeter/billing/charges/models/payment" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/charges/models/invoicedusage", + "to_dir": "openmeter/billing/charges/models/invoicedusage" + }, + { + "from_file": "openmeter/ent/schema/ledger_account.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/schema/ledger_breakage_record.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/schema/ledger_customer_account.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ent/schema/addon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/schema/entitlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/schema/notification.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/schema/subscription.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ent/schema/billing.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/models/stddetailedline", + "to_dir": "openmeter/billing/models/stddetailedline" + }, + { + "from_file": "openmeter/ent/schema/chargescreditpurchase.go", + "imports": "openmeter/billing/charges/creditpurchase", + "to_dir": "openmeter/billing/charges/creditpurchase" + }, + { + "from_file": "openmeter/ent/schema/balance_snapshot.go", + "imports": "openmeter/credit/balance", + "to_dir": "openmeter/credit/balance" + }, + { + "from_file": "openmeter/ent/schema/grant.go", + "imports": "openmeter/credit/grant", + "to_dir": "openmeter/credit/grant" + }, + { + "from_file": "openmeter/ent/schema/charges.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ent/schema/creditrealizationlineage.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ent/schema/customer.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ent/schema/notification.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ent/schema/subscription_addon.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ent/schema/addon.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/billing.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/productcatalog.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/ratecard.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/subscription.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/taxcode.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + }, + { + "from_file": "openmeter/ent/schema/billing.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/entitlement.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/grant.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/productcatalog.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/ratecard.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/subscription.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/usage_reset.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/ent/schema/feature.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/ent/schema/meter.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/ent/schema/charges.go", + "imports": "openmeter/billing/charges/models/chargemeta", + "to_dir": "openmeter/billing/charges/models/chargemeta" + }, + { + "from_file": "openmeter/ent/schema/chargescreditpurchase.go", + "imports": "openmeter/billing/charges/models/chargemeta", + "to_dir": "openmeter/billing/charges/models/chargemeta" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/charges/models/chargemeta", + "to_dir": "openmeter/billing/charges/models/chargemeta" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/charges/models/chargemeta", + "to_dir": "openmeter/billing/charges/models/chargemeta" + }, + { + "from_file": "openmeter/ent/schema/entitlement.go", + "imports": "openmeter/entitlement", + "to_dir": "openmeter/entitlement" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/charges/flatfee", + "to_dir": "openmeter/billing/charges/flatfee" + }, + { + "from_file": "openmeter/ent/schema/notification.go", + "imports": "openmeter/notification", + "to_dir": "openmeter/notification" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/schema/creditrealizationlineage.go", + "imports": "openmeter/billing/charges/models/creditrealization", + "to_dir": "openmeter/billing/charges/models/creditrealization" + }, + { + "from_file": "openmeter/ent/schema/app.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/ent/schema/billing.go", + "imports": "openmeter/billing", + "to_dir": "openmeter/billing" + }, + { + "from_file": "openmeter/ent/schema/charges.go", + "imports": "openmeter/billing/charges/meta", + "to_dir": "openmeter/billing/charges/meta" + }, + { + "from_file": "openmeter/ent/schema/addon.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/app.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/app_stripe.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/appcustominvoicing.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/balance_snapshot.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/billing.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/charges.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/chargescreditpurchase.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/chargesflatfee.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/creditrealizationlineage.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/custom_currencies.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/customer.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/entitlement.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/feature.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/grant.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_account.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_breakage_record.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_customer_account.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_entry.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_transaction.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/ledger_transaction_group.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/llmcostprice.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/meter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/notification.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/organizationdefaulttaxcodes.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/planaddon.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/productcatalog.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/subject.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/subscription.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/subscription_addon.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/subscriptionbillingsync.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/taxcode.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/usage_reset.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ent/schema/chargesusagebased.go", + "imports": "openmeter/billing/charges/usagebased", + "to_dir": "openmeter/billing/charges/usagebased" + }, + { + "from_file": "openmeter/ent/schema/llmcostprice.go", + "imports": "openmeter/llmcost", + "to_dir": "openmeter/llmcost" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/entitlement_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/events.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/repository.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/usageperiod.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/usageperiod_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/entitlement/connector.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/entitlement/events.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/entitlement/connector.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/events.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/repository.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/uniqueness.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/uniqueness_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/entitlement/usageperiod_test.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/entitlement/uniqueness_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/entitlement/repository.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/entitlement/entitlement_grant.go", + "imports": "openmeter/credit", + "to_dir": "openmeter/credit" + }, + { + "from_file": "openmeter/entitlement/entitlement.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/entitlement/usageperiod.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/entitlement/usageperiod_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/entitlement/entitlement_types.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/entitlement/repository.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/entitlement/events.go", + "imports": "openmeter/subject", + "to_dir": "openmeter/subject" + }, + { + "from_file": "openmeter/entitlement/balanceworker/events/recalculate.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/annotations.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/impact_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/ledger_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/primitives.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/query.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/routing.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/validations.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/validations_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "openmeter/ledger/testutils", + "to_dir": "openmeter/ledger/testutils" + }, + { + "from_file": "openmeter/ledger/query.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/ledger/validations_test.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "tools/migrate", + "to_dir": "tools/migrate" + }, + { + "from_file": "openmeter/ledger/ledger_test.go", + "imports": "openmeter/ledger/transactions/testutils", + "to_dir": "openmeter/ledger/transactions/testutils" + }, + { + "from_file": "openmeter/ledger/validations_test.go", + "imports": "openmeter/ledger/transactions/testutils", + "to_dir": "openmeter/ledger/transactions/testutils" + }, + { + "from_file": "openmeter/ledger/account.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/ledger/ledger_fx_test.go", + "imports": "openmeter/ledger/transactions", + "to_dir": "openmeter/ledger/transactions" + }, + { + "from_file": "openmeter/ledger/account/account.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/account_business.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/account_customer.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/address.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/service.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/subaccount.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/account.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/repo.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/subaccount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/account/adapter/account.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/adapter/account.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "tools/migrate", + "to_dir": "tools/migrate" + }, + { + "from_file": "openmeter/ledger/account/adapter/account.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/account/adapter/account.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ledger/account/adapter/subaccount.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ledger/account/adapter/account.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ledger/account/adapter/repo_test.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ledger/account/service/service.go", + "imports": "pkg/framework/lockr", + "to_dir": "pkg/framework/lockr" + }, + { + "from_file": "openmeter/ledger/account/service/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/account/service/service.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/account/service/service.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/entry.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/ledger.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/repo.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/transaction.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/entry.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/historical/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/historical/balance.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/entry.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/ledger.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/repo.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/transaction.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/historical/adapter/repo.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/historical/adapter/sumentries_query.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/adapter/sumentries_query.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/adapter/sumentries_query.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "openmeter/ledger/historical", + "to_dir": "openmeter/ledger/historical" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ledger/historical", + "to_dir": "openmeter/ledger/historical" + }, + { + "from_file": "openmeter/ledger/historical/adapter/repo.go", + "imports": "openmeter/ledger/historical", + "to_dir": "openmeter/ledger/historical" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ledger/account/adapter", + "to_dir": "openmeter/ledger/account/adapter" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "tools/migrate", + "to_dir": "tools/migrate" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger_test.go", + "imports": "openmeter/ledger/transactions/testutils", + "to_dir": "openmeter/ledger/transactions/testutils" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/historical/adapter/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/historical/adapter/ledger.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ledger/historical/adapter/sumentries_query.go", + "imports": "openmeter/ent/db/ledgersubaccountroute", + "to_dir": "openmeter/ent/db/ledgersubaccountroute" + }, + { + "from_file": "openmeter/ledger/resolvers/account.go", + "imports": "pkg/framework/lockr", + "to_dir": "pkg/framework/lockr" + }, + { + "from_file": "openmeter/ledger/resolvers/account.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/resolvers/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/resolvers/hooks.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/resolvers/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/ledger/testutils", + "to_dir": "openmeter/ledger/testutils" + }, + { + "from_file": "openmeter/ledger/resolvers/account.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "tools/migrate", + "to_dir": "tools/migrate" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/resolvers/customeraccount.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/resolvers/account.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/customeraccount.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/errors.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/hooks.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/ledger/resolvers/account.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/customeraccount.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/errors.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/hooks.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/namespace.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/ent/db/ledgeraccount", + "to_dir": "openmeter/ent/db/ledgeraccount" + }, + { + "from_file": "openmeter/ledger/resolvers/account_test.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "openmeter/ledger/resolvers", + "to_dir": "openmeter/ledger/resolvers" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/resolvers/adapter/repo.go", + "imports": "openmeter/ent/db/ledgercustomeraccount", + "to_dir": "openmeter/ent/db/ledgercustomeraccount" + }, + { + "from_file": "openmeter/ledger/routingrules/routingrules.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/routingrules/routingrules_test.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/routingrules/routingrules_test.go", + "imports": "openmeter/ledger/transactions/testutils", + "to_dir": "openmeter/ledger/transactions/testutils" + }, + { + "from_file": "openmeter/ledger/routingrules/defaults.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/routingrules/routingrules.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/routingrules/routingrules_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/routingrules/view.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/account/service", + "to_dir": "openmeter/ledger/account/service" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/account", + "to_dir": "openmeter/ledger/account" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/historical/adapter", + "to_dir": "openmeter/ledger/historical/adapter" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/routingrules", + "to_dir": "openmeter/ledger/routingrules" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/account/adapter", + "to_dir": "openmeter/ledger/account/adapter" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/resolvers", + "to_dir": "openmeter/ledger/resolvers" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/resolvers/adapter", + "to_dir": "openmeter/ledger/resolvers/adapter" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "tools/migrate", + "to_dir": "tools/migrate" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/testutils/integration.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "openmeter/ledger/historical", + "to_dir": "openmeter/ledger/historical" + }, + { + "from_file": "openmeter/ledger/testutils/deps.go", + "imports": "pkg/framework/lockr", + "to_dir": "pkg/framework/lockr" + }, + { + "from_file": "openmeter/ledger/transactions/collection.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/transactions/correction.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/transactions/correction_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/transactions/input.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/transactions/resolve.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/ledger/transactions/testenv_test.go", + "imports": "openmeter/ledger/testutils", + "to_dir": "openmeter/ledger/testutils" + }, + { + "from_file": "openmeter/ledger/transactions/accrual.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/breakage.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/collection.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/customer.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/earnings.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/fx.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/legacy.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/resolve.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/resolve_test.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/template.go", + "imports": "openmeter/customer", + "to_dir": "openmeter/customer" + }, + { + "from_file": "openmeter/ledger/transactions/accrual.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/accrual_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/breakage.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/codes.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/collection.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/correction.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/correction_leg.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/correction_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/customer.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/customer_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/earnings.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/earnings_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/fx.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/input.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/legacy.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/priority.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/resolve.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/resolve_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/template.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/testenv_test.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/testutils/anytransaction.go", + "imports": "openmeter/ledger", + "to_dir": "openmeter/ledger" + }, + { + "from_file": "openmeter/ledger/transactions/testutils/anytransaction.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/llmcost/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/llmcost/llmcost.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/llmcost/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/llmcost/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/llmcost/service.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/llmcost/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/meter/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/meter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/meter_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/parse.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/parse_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/meter/service.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/notification/service.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/notification/channel.go", + "imports": "openmeter/notification/webhook/secret", + "to_dir": "openmeter/notification/webhook/secret" + }, + { + "from_file": "openmeter/notification/channel.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/deliverystatus.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/entitlements.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/event.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/eventpayload.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/invoice.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/rule.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/notification/entitlements.go", + "imports": "api", + "to_dir": "api" + }, + { + "from_file": "openmeter/notification/invoice.go", + "imports": "api", + "to_dir": "api" + }, + { + "from_file": "openmeter/notification/repository.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/notification/webhook/secret/secret.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/alignment.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/entitlement.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/entitlement_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/errors.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/phase.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/plan.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/plan_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/planaddon_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/ratecard.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/ratecard_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "openmeter/productcatalog/featureresolver.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/productcatalog/ratecard_test.go", + "imports": "openmeter/productcatalog/feature", + "to_dir": "openmeter/productcatalog/feature" + }, + { + "from_file": "openmeter/productcatalog/addon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/discount.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/discount_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/effectiveperiod.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/effectiveperiod_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/entitlement.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/phase.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/plan.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/planaddon.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/planaddon_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/price.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/pro_rating.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/ratecard.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/ratecard_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/tax.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/tax_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/effectiveperiod.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "openmeter/productcatalog/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/productcatalog/planaddon_test.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/productcatalog/ratecard.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/productcatalog/tax.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/productcatalog/tax_test.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/productcatalog/addon.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/productcatalog/plan.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/productcatalog/planaddon_test.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/productcatalog/ratecard.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/productcatalog/tax.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/productcatalog/tax_test.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/productcatalog/entitlement.go", + "imports": "openmeter/entitlement", + "to_dir": "openmeter/entitlement" + }, + { + "from_file": "openmeter/productcatalog/ratecard.go", + "imports": "openmeter/entitlement", + "to_dir": "openmeter/entitlement" + }, + { + "from_file": "openmeter/productcatalog/feature/connector.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/feature/featuremeter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/feature/featuremeter_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/feature/repository.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/productcatalog/feature/connector.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/productcatalog/feature/feature.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/productcatalog/feature/meter_group_by_filters_test.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/productcatalog/feature/connector.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/productcatalog/feature/feature.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/productcatalog/feature/featuremeter.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/productcatalog/feature/meter_group_by_filters_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/productcatalog/feature/unitcost.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/productcatalog/feature/connector.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/productcatalog/feature/connector.go", + "imports": "openmeter/watermill/eventbus", + "to_dir": "openmeter/watermill/eventbus" + }, + { + "from_file": "openmeter/productcatalog/feature/repository.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/streaming/connector.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/eventparams.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/query_params.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/query_params_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/usageattribution.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/usageattribution_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/streaming/eventparams.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/streaming/query_params.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/streaming/connector.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/defaults.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/query_params.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/query_params_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/testutils/streaming.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/streaming/testutils/streaming_test.go", + "imports": "pkg/filter", + "to_dir": "pkg/filter" + }, + { + "from_file": "openmeter/streaming/testutils/streaming.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/testutils/streaming_test.go", + "imports": "openmeter/meter", + "to_dir": "openmeter/meter" + }, + { + "from_file": "openmeter/streaming/testutils/streaming_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/streaming/testutils/streaming.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/streaming/testutils/streaming_test.go", + "imports": "openmeter/streaming", + "to_dir": "openmeter/streaming" + }, + { + "from_file": "openmeter/subject/adapter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/subject/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/subject/subject.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/subject/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/taxcode/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/namespacehandler.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/namespacehandler_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/service.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/taxcode.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/errors.go", + "imports": "pkg/framework/commonhttp", + "to_dir": "pkg/framework/commonhttp" + }, + { + "from_file": "openmeter/taxcode/namespacehandler_test.go", + "imports": "openmeter/taxcode/testutils", + "to_dir": "openmeter/taxcode/testutils" + }, + { + "from_file": "openmeter/taxcode/service.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/taxcode/taxcode.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/taxcode/repository.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/taxcode/namespacehandler_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/taxcode/adapter/adapter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/adapter/mapping.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/adapter/adapter.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/adapter/mapping.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "openmeter/ent/db/taxcode", + "to_dir": "openmeter/ent/db/taxcode" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "openmeter/taxcode/adapter/adapter.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/taxcode/adapter/mapping.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/taxcode/adapter/adapter.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/taxcode/adapter/taxcode.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/service/taxcode.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/service/taxcode_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/service/service.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/service/taxcode.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/service/taxcode_test.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/service/taxcode_test.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go", + "imports": "openmeter/taxcode/testutils", + "to_dir": "openmeter/taxcode/testutils" + }, + { + "from_file": "openmeter/taxcode/service/taxcode_test.go", + "imports": "openmeter/taxcode/testutils", + "to_dir": "openmeter/taxcode/testutils" + }, + { + "from_file": "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/taxcode/service/taxcode_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/taxcode/service", + "to_dir": "openmeter/taxcode/service" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/taxcode", + "to_dir": "openmeter/taxcode" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/app", + "to_dir": "openmeter/app" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "openmeter/taxcode/testutils/env.go", + "imports": "openmeter/taxcode/adapter", + "to_dir": "openmeter/taxcode/adapter" + }, + { + "from_file": "openmeter/testutils/pg_driver.go", + "imports": "pkg/framework/entutils/entdriver", + "to_dir": "pkg/framework/entutils/entdriver" + }, + { + "from_file": "openmeter/watermill/eventbus/eventbus.go", + "imports": "openmeter/entitlement/balanceworker/events", + "to_dir": "openmeter/entitlement/balanceworker/events" + }, + { + "from_file": "pkg/clock/clock_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/datetime/duration_test.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "pkg/filter/filter.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/filter/filter_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/commonhttp/encoder.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/commonhttp/errors.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/commonhttp/errors_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/entutils/idorder.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/entutils/idorder_test.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/entutils/mixins.go", + "imports": "pkg/models", + "to_dir": "pkg/models" + }, + { + "from_file": "pkg/framework/entutils/transaction_test.go", + "imports": "pkg/framework/entutils/testutils/ent2/db", + "to_dir": "pkg/framework/entutils/testutils/ent2/db" + }, + { + "from_file": "pkg/framework/entutils/mixins.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "pkg/framework/entutils/transaction_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/framework/entutils/transaction_test.go", + "imports": "pkg/framework/entutils/testutils/ent1/db", + "to_dir": "pkg/framework/entutils/testutils/ent1/db" + }, + { + "from_file": "pkg/framework/entutils/entdriver/driver.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent1/db/runtime.go", + "imports": "pkg/framework/entutils/testutils/ent1/schema", + "to_dir": "pkg/framework/entutils/testutils/ent1/schema" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent1/db/expose.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent1/schema/example1.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent2/db/expose.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent2/db/runtime.go", + "imports": "pkg/framework/entutils/testutils/ent2/schema", + "to_dir": "pkg/framework/entutils/testutils/ent2/schema" + }, + { + "from_file": "pkg/framework/entutils/testutils/ent2/schema/example2.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/lockr/locker_test.go", + "imports": "pkg/framework/entutils/entdriver", + "to_dir": "pkg/framework/entutils/entdriver" + }, + { + "from_file": "pkg/framework/lockr/session.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "pkg/framework/lockr/locker.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "pkg/framework/lockr/locker_test.go", + "imports": "openmeter/ent/db", + "to_dir": "openmeter/ent/db" + }, + { + "from_file": "pkg/framework/lockr/locker.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/lockr/locker_test.go", + "imports": "pkg/framework/entutils", + "to_dir": "pkg/framework/entutils" + }, + { + "from_file": "pkg/framework/lockr/locker_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/framework/lockr/session_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/models/model.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "pkg/models/cadence.go", + "imports": "pkg/timeutil", + "to_dir": "pkg/timeutil" + }, + { + "from_file": "pkg/timeutil/closedperiod_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/timeutil/recurrence_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/timeutil/timeline_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "pkg/timeutil/recurrence.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "pkg/timeutil/recurrence_test.go", + "imports": "pkg/datetime", + "to_dir": "pkg/datetime" + }, + { + "from_file": "pkg/timeutil/recurrence_test.go", + "imports": "pkg/clock", + "to_dir": "pkg/clock" + }, + { + "from_file": "tools/migrate/ledger_tax_behavior_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "tools/migrate/migrate_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "tools/migrate/view_parity_test.go", + "imports": "openmeter/testutils", + "to_dir": "openmeter/testutils" + }, + { + "from_file": "tools/migrate/productcatalog_test.go", + "imports": "openmeter/productcatalog", + "to_dir": "openmeter/productcatalog" + } + ] + }, + { + "directories": [ + "openmeter/credit/hook", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/customer/testutils", + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker", + "openmeter/entitlement/driver", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/meter/adapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/testutils", + "openmeter/registry", + "openmeter/registry/builder", + "openmeter/subject/service", + "openmeter/subject/service/hooks", + "openmeter/subject/testutils", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/patch", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/testutils", + "openmeter/subscription/validators/subscription", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service" + ], + "evidence": [ + { + "from_file": "openmeter/credit/hook/entitlement_hook.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/customer/service/ledger_hook_test.go", + "imports": "openmeter/customer/testutils", + "to_dir": "openmeter/customer/testutils" + }, + { + "from_file": "openmeter/customer/service/service_test.go", + "imports": "openmeter/customer/testutils", + "to_dir": "openmeter/customer/testutils" + }, + { + "from_file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/customer/service/hooks/subjectcustomer.go", + "imports": "openmeter/subject/service/hooks", + "to_dir": "openmeter/subject/service/hooks" + }, + { + "from_file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/customer/testutils/env.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/customer/testutils/env.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement_test.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/adapter/usage_reset.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement.go", + "imports": "openmeter/entitlement/balanceworker", + "to_dir": "openmeter/entitlement/balanceworker" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement_test.go", + "imports": "openmeter/entitlement/balanceworker", + "to_dir": "openmeter/entitlement/balanceworker" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement_test.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/entitlement/adapter/entitlement_test.go", + "imports": "openmeter/meter/adapter", + "to_dir": "openmeter/meter/adapter" + }, + { + "from_file": "openmeter/entitlement/balanceworker/worker.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/balanceworker/recalculate.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/entitlement/balanceworker/worker.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "imports": "openmeter/entitlement/driver", + "to_dir": "openmeter/entitlement/driver" + }, + { + "from_file": "openmeter/entitlement/balanceworker/recalculate.go", + "imports": "openmeter/entitlement/driver", + "to_dir": "openmeter/entitlement/driver" + }, + { + "from_file": "openmeter/entitlement/driver/metered.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/driver/parser.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/hooks/subscription/hook.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/entitlement/metered/lateevents_test.go", + "imports": "openmeter/entitlement/hooks/subscription", + "to_dir": "openmeter/entitlement/hooks/subscription" + }, + { + "from_file": "openmeter/entitlement/metered/utils_test.go", + "imports": "openmeter/entitlement/hooks/subscription", + "to_dir": "openmeter/entitlement/hooks/subscription" + }, + { + "from_file": "openmeter/entitlement/metered/lateevents_test.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/entitlement/metered/utils_test.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/entitlement/metered/lateevents_test.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/entitlement/metered/utils_test.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/entitlement/metered/lateevents_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/entitlement/metered/utils_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/entitlement/metered/lateevents_test.go", + "imports": "openmeter/entitlement/adapter", + "to_dir": "openmeter/entitlement/adapter" + }, + { + "from_file": "openmeter/entitlement/metered/utils_test.go", + "imports": "openmeter/entitlement/adapter", + "to_dir": "openmeter/entitlement/adapter" + }, + { + "from_file": "openmeter/entitlement/service/scheduling_test.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/service/service.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/entitlement/service/utils_test.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/entitlement/service/utils_test.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/entitlement/service/utils_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/entitlement/service/utils_test.go", + "imports": "openmeter/registry/builder", + "to_dir": "openmeter/registry/builder" + }, + { + "from_file": "openmeter/meter/adapter/manage.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/productcatalog/adapter/feature.go", + "imports": "openmeter/subscription/repo", + "to_dir": "openmeter/subscription/repo" + }, + { + "from_file": "openmeter/productcatalog/addon/adapter/adapter_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/addon/service/service_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/addon/service/taxcode_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/addon/service/addon.go", + "imports": "openmeter/productcatalog/featureresolver", + "to_dir": "openmeter/productcatalog/featureresolver" + }, + { + "from_file": "openmeter/productcatalog/featureresolver/ratecard_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/featureresolver/resolver_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/plan/adapter/adapter_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/plan/service/service_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/plan/service/taxcode_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/plan/service/plan.go", + "imports": "openmeter/productcatalog/featureresolver", + "to_dir": "openmeter/productcatalog/featureresolver" + }, + { + "from_file": "openmeter/productcatalog/planaddon/adapter/adapter_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/planaddon/adapter/mapping.go", + "imports": "openmeter/productcatalog/plan/adapter", + "to_dir": "openmeter/productcatalog/plan/adapter" + }, + { + "from_file": "openmeter/productcatalog/planaddon/adapter/mapping.go", + "imports": "openmeter/productcatalog/addon/adapter", + "to_dir": "openmeter/productcatalog/addon/adapter" + }, + { + "from_file": "openmeter/productcatalog/planaddon/service/service_test.go", + "imports": "openmeter/productcatalog/testutils", + "to_dir": "openmeter/productcatalog/testutils" + }, + { + "from_file": "openmeter/productcatalog/subscription/service.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/productcatalog/subscription/plan.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/productcatalog/subscription/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/plan/adapter", + "to_dir": "openmeter/productcatalog/plan/adapter" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/addon/adapter", + "to_dir": "openmeter/productcatalog/addon/adapter" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/featureresolver", + "to_dir": "openmeter/productcatalog/featureresolver" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/planaddon/service", + "to_dir": "openmeter/productcatalog/planaddon/service" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/planaddon/adapter", + "to_dir": "openmeter/productcatalog/planaddon/adapter" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/addon/service", + "to_dir": "openmeter/productcatalog/addon/service" + }, + { + "from_file": "openmeter/productcatalog/testutils/env.go", + "imports": "openmeter/productcatalog/plan/service", + "to_dir": "openmeter/productcatalog/plan/service" + }, + { + "from_file": "openmeter/registry/entitlement.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/entitlement/hooks/subscription", + "to_dir": "openmeter/entitlement/hooks/subscription" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/entitlement/service", + "to_dir": "openmeter/entitlement/service" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/entitlement/adapter", + "to_dir": "openmeter/entitlement/adapter" + }, + { + "from_file": "openmeter/registry/builder/entitlement.go", + "imports": "openmeter/credit/hook", + "to_dir": "openmeter/credit/hook" + }, + { + "from_file": "openmeter/subject/service/service_test.go", + "imports": "openmeter/subject/testutils", + "to_dir": "openmeter/subject/testutils" + }, + { + "from_file": "openmeter/subject/service/hooks/customersubject_test.go", + "imports": "openmeter/customer/service/hooks", + "to_dir": "openmeter/customer/service/hooks" + }, + { + "from_file": "openmeter/subject/service/hooks/customersubject_test.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/subject/service/hooks/customersubject_test.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/subject/testutils/env.go", + "imports": "openmeter/productcatalog/adapter", + "to_dir": "openmeter/productcatalog/adapter" + }, + { + "from_file": "openmeter/subject/testutils/env.go", + "imports": "openmeter/entitlement/adapter", + "to_dir": "openmeter/entitlement/adapter" + }, + { + "from_file": "openmeter/subject/testutils/env.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/subject/testutils/env.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/subscription/subscriptionview.go", + "imports": "openmeter/entitlement/metered", + "to_dir": "openmeter/entitlement/metered" + }, + { + "from_file": "openmeter/subscription/uniqueness_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/extend_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/extend.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/extend_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/apply_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/diff/addon.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/affected.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/apply.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/apply_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore_test.go", + "imports": "openmeter/subscription/patch", + "to_dir": "openmeter/subscription/patch" + }, + { + "from_file": "openmeter/subscription/addon/diff/addon.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/affected.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/apply.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/apply_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/diff.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/restore_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/diff/zeroratecard.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/repo/mapping.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/repo/subscriptionaddon.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/repo/subscriptionaddonquantity.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/repo/mapping.go", + "imports": "openmeter/productcatalog/addon/adapter", + "to_dir": "openmeter/productcatalog/addon/adapter" + }, + { + "from_file": "openmeter/subscription/addon/service/change_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/service/create_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/service/list_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/addon/service/change_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/service/create_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/service/list_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/service/service.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/addon/service/change_test.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/create_test.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/list_test.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/change_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/create_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/list_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/addon/service/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/entitlement/adapter.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/hooks/annotations/hook.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/patch_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/patch/removeitem_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/patch/unscheduleedit_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/patch/patch_test.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/patch/additem.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/additem_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/addphase.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/patch_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/removeitem.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/removeitem_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/removephase.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/stretchphase.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/stretchphase_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/unscheduleedit.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/patch/unscheduleedit_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/repo/mapping.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/repo/subscriptionitemrepo.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/repo/subscriptionphaserepo.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/repo/subscriptionrepo.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/service.go", + "imports": "openmeter/subscription/validators/subscription", + "to_dir": "openmeter/subscription/validators/subscription" + }, + { + "from_file": "openmeter/subscription/service/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/service_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/servicevalidation.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/sync.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/sync_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/synchelpers.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/service/service_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/service/sync_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/service/service_test.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/service/sync_test.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/workflow/service", + "to_dir": "openmeter/subscription/workflow/service" + }, + { + "from_file": "openmeter/subscription/testutils/repository.go", + "imports": "openmeter/subscription/repo", + "to_dir": "openmeter/subscription/repo" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/plan/adapter", + "to_dir": "openmeter/productcatalog/plan/adapter" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/hooks/annotations", + "to_dir": "openmeter/subscription/hooks/annotations" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/addon/adapter", + "to_dir": "openmeter/productcatalog/addon/adapter" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/entitlement", + "to_dir": "openmeter/subscription/entitlement" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/featureresolver", + "to_dir": "openmeter/productcatalog/featureresolver" + }, + { + "from_file": "openmeter/subscription/testutils/customer.go", + "imports": "openmeter/customer/service", + "to_dir": "openmeter/customer/service" + }, + { + "from_file": "openmeter/subscription/testutils/customer.go", + "imports": "openmeter/subject/service", + "to_dir": "openmeter/subject/service" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/registry/builder", + "to_dir": "openmeter/registry/builder" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/planaddon/service", + "to_dir": "openmeter/productcatalog/planaddon/service" + }, + { + "from_file": "openmeter/subscription/testutils/compare.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/testutils/helpers.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/addon/repo", + "to_dir": "openmeter/subscription/addon/repo" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/customer/service/hooks", + "to_dir": "openmeter/customer/service/hooks" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/planaddon/adapter", + "to_dir": "openmeter/productcatalog/planaddon/adapter" + }, + { + "from_file": "openmeter/subscription/testutils/builder.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/compare.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/helpers.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/mock.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/patch.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/plan.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/repository.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/addon/service", + "to_dir": "openmeter/productcatalog/addon/service" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/addon/service", + "to_dir": "openmeter/subscription/addon/service" + }, + { + "from_file": "openmeter/subscription/testutils/helpers.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/testutils/mock.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/testutils/helpers.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/plan.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/productcatalog/plan/service", + "to_dir": "openmeter/productcatalog/plan/service" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subject/service/hooks", + "to_dir": "openmeter/subject/service/hooks" + }, + { + "from_file": "openmeter/subscription/testutils/service.go", + "imports": "openmeter/subscription/service", + "to_dir": "openmeter/subscription/service" + }, + { + "from_file": "openmeter/subscription/validators/subscription/components.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/validators/subscription/validator.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/errors.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription_test.go", + "imports": "openmeter/registry", + "to_dir": "openmeter/registry" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription/patch", + "to_dir": "openmeter/subscription/patch" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription.go", + "imports": "openmeter/subscription/patch", + "to_dir": "openmeter/subscription/patch" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription_test.go", + "imports": "openmeter/subscription/patch", + "to_dir": "openmeter/subscription/patch" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/workflow/service/service.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription.go", + "imports": "openmeter/subscription/addon", + "to_dir": "openmeter/subscription/addon" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/service.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription_test.go", + "imports": "openmeter/subscription", + "to_dir": "openmeter/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription_test.go", + "imports": "openmeter/subscription/testutils", + "to_dir": "openmeter/subscription/testutils" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/workflow/service/service.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/workflow/service/subscription_test.go", + "imports": "openmeter/subscription/workflow", + "to_dir": "openmeter/subscription/workflow" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/productcatalog/subscription", + "to_dir": "openmeter/productcatalog/subscription" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon.go", + "imports": "openmeter/subscription/addon/diff", + "to_dir": "openmeter/subscription/addon/diff" + }, + { + "from_file": "openmeter/subscription/workflow/service/addon_test.go", + "imports": "openmeter/subscription/addon/diff", + "to_dir": "openmeter/subscription/addon/diff" + } + ] + }, + { + "directories": [ + "openmeter/billing/rating/service", + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil" + ], + "evidence": [ + { + "from_file": "openmeter/billing/rating/service/pricer.go", + "imports": "openmeter/billing/rating/service/mutator", + "to_dir": "openmeter/billing/rating/service/mutator" + }, + { + "from_file": "openmeter/billing/rating/service/options_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/detailedline.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/pricer.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/credits_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/commitments.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/credits.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/credits_test.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/discountpercentage.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/discountusage.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/mutator/types.go", + "imports": "openmeter/billing/rating/service/rate", + "to_dir": "openmeter/billing/rating/service/rate" + }, + { + "from_file": "openmeter/billing/rating/service/rate/dynamic_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/rate/flat_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/rate/package_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/rate/tieredgraduated_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/rate/tieredvolume_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/rate/unit_test.go", + "imports": "openmeter/billing/rating/service/testutil", + "to_dir": "openmeter/billing/rating/service/testutil" + }, + { + "from_file": "openmeter/billing/rating/service/testutil/ubptest.go", + "imports": "openmeter/billing/rating/service", + "to_dir": "openmeter/billing/rating/service" + } + ] + }, + { + "directories": [ + "openmeter/billing/charges/service", + "openmeter/billing/charges/testutils", + "openmeter/billing/worker/subscriptionsync/service", + "test/billing" + ], + "evidence": [ + { + "from_file": "openmeter/billing/charges/service/base_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/creditpurchase_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/featureid_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/gathering_preview_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/invoicable_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/lineage_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/taxcode_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/service/usagebased_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/charges/testutils/service.go", + "imports": "openmeter/billing/charges/service", + "to_dir": "openmeter/billing/charges/service" + }, + { + "from_file": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "imports": "test/billing", + "to_dir": "test/billing" + }, + { + "from_file": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "imports": "openmeter/billing/charges/testutils", + "to_dir": "openmeter/billing/charges/testutils" + }, + { + "from_file": "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go", + "imports": "openmeter/billing/charges/testutils", + "to_dir": "openmeter/billing/charges/testutils" + }, + { + "from_file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "imports": "openmeter/billing/charges/testutils", + "to_dir": "openmeter/billing/charges/testutils" + }, + { + "from_file": "test/billing/subscription_test.go", + "imports": "openmeter/billing/worker/subscriptionsync/service", + "to_dir": "openmeter/billing/worker/subscriptionsync/service" + } + ] + } + ], + "stats": { + "nodeCount": 507, + "edgeCount": 4257, + "cycleCount": 4 + } +} diff --git a/.archie/drift_diff.json b/.archie/drift_diff.json new file mode 100644 index 0000000000..63c8b74c8b --- /dev/null +++ b/.archie/drift_diff.json @@ -0,0 +1,2954 @@ +{ + "new": [], + "resolved": [], + "persisting": [ + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Billing domain", + "file": "openmeter/app/custominvoicing/app.go", + "import": "openmeter/billing", + "message": "App / marketplace integrations imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "import": "api", + "message": "App / marketplace integrations imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Product catalog domain", + "file": "openmeter/app/stripe/appinvoice.go", + "import": "openmeter/productcatalog", + "message": "App / marketplace integrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/app/adapter.go", + "import": "pkg/framework/entutils", + "message": "App / marketplace integrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "App / marketplace integrations", + "file": "app/common/app.go", + "import": "openmeter/app", + "message": "Application wiring (app/common) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "app/common/charges.go", + "import": "openmeter/ledger/collector", + "message": "Application wiring (app/common) imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Database migrations", + "file": "app/common/database.go", + "import": "tools/migrate", + "message": "Application wiring (app/common) imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Entitlement domain", + "file": "app/common/entitlement.go", + "import": "openmeter/entitlement/validators/customer", + "message": "Application wiring (app/common) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Generated API contract & v1 server interface", + "file": "app/common/ffx.go", + "import": "api", + "message": "Application wiring (app/common) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Ingest & sink pipeline", + "file": "app/common/kafka.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Application wiring (app/common) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Notification domain", + "file": "app/common/notification.go", + "import": "openmeter/notification", + "message": "Application wiring (app/common) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Product catalog domain", + "file": "app/common/billing.go", + "import": "openmeter/productcatalog/feature", + "message": "Application wiring (app/common) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Registry & builder", + "file": "app/common/customer.go", + "import": "openmeter/registry", + "message": "Application wiring (app/common) imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Shared utility packages (pkg/)", + "file": "app/common/billing.go", + "import": "pkg/featuregate", + "message": "Application wiring (app/common) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Subscription domain", + "file": "app/common/ffx.go", + "import": "openmeter/subscription", + "message": "Application wiring (app/common) imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Charges sub-system", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/billing/charges/meta", + "message": "Billing domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "import": "openmeter/ledger/collector", + "message": "Billing domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Billing domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Entitlement domain", + "file": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "import": "openmeter/entitlement", + "message": "Billing domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/billing/adapter/gatheringinvoice.go", + "import": "api", + "message": "Billing domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Ledger domain", + "file": "openmeter/billing/charges/service/base_test.go", + "import": "openmeter/ledger/recognizer", + "message": "Billing domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Product catalog domain", + "file": "openmeter/billing/adapter/customeroverride.go", + "import": "openmeter/productcatalog", + "message": "Billing domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/adapter.go", + "import": "pkg/framework/entutils", + "message": "Billing domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Subscription domain", + "file": "openmeter/billing/validators/customer/customer.go", + "import": "openmeter/subscription", + "message": "Billing domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "App / marketplace integrations", + "file": "openmeter/billing/charges/service/creditpurchase_test.go", + "import": "openmeter/app/custominvoicing", + "message": "Charges sub-system imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Customer domain", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/customer", + "message": "Charges sub-system imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Charges sub-system imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Meter domain", + "file": "openmeter/billing/charges/service/featureid_test.go", + "import": "openmeter/meter", + "message": "Charges sub-system imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Product catalog domain", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "openmeter/productcatalog", + "message": "Charges sub-system imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/charges/adapter.go", + "import": "pkg/framework/entutils", + "message": "Charges sub-system imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "import": "openmeter/streaming", + "message": "Charges sub-system imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Collector (Benthos/Redpanda Connect)", + "to_component": "Generated API contract & v1 server interface", + "file": "collector/benthos/output/openmeter.go", + "import": "api/client/go", + "message": "Collector (Benthos/Redpanda Connect) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Customer domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/customer", + "message": "Credit & grant domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Entitlement domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/entitlement/driver", + "message": "Credit & grant domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/credit/driver/grant.go", + "import": "api", + "message": "Credit & grant domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Meter domain", + "file": "openmeter/credit/balance/service_test.go", + "import": "openmeter/meter", + "message": "Credit & grant domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/credit/adapter/balance_snapshot.go", + "import": "pkg/clock", + "message": "Credit & grant domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/credit/balance/service.go", + "import": "openmeter/streaming", + "message": "Credit & grant domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/customer/adapter/customer_test.go", + "import": "openmeter/app", + "message": "Customer domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Billing domain", + "file": "openmeter/customer/service/hooks/subjectcustomer.go", + "import": "openmeter/billing", + "message": "Customer domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Entitlement domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/entitlement", + "message": "Customer domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "api", + "message": "Customer domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Ledger domain", + "file": "openmeter/customer/service/ledger_hook_test.go", + "import": "openmeter/ledger", + "message": "Customer domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Meter domain", + "file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "import": "openmeter/meter/mockadapter", + "message": "Customer domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Product catalog domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/productcatalog/subscription/http", + "message": "Customer domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/customer/adapter.go", + "import": "pkg/framework/entutils", + "message": "Customer domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/customer/adapter.go", + "import": "openmeter/streaming", + "message": "Customer domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Subscription domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/subscription", + "message": "Customer domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Product catalog domain", + "file": "tools/migrate/productcatalog_test.go", + "import": "openmeter/productcatalog", + "message": "Database migrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Shared utility packages (pkg/)", + "file": "tools/migrate/viewgen/viewgen.go", + "import": "pkg/strcase", + "message": "Database migrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/schema/app.go", + "import": "openmeter/app", + "message": "Ent schema (DB source of truth) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Billing domain", + "file": "openmeter/ent/schema/billing.go", + "import": "openmeter/billing", + "message": "Ent schema (DB source of truth) imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Charges sub-system", + "file": "openmeter/ent/schema/charges.go", + "import": "openmeter/billing/charges/meta", + "message": "Ent schema (DB source of truth) imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/schema/balance_snapshot.go", + "import": "openmeter/credit/balance", + "message": "Ent schema (DB source of truth) imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Entitlement domain", + "file": "openmeter/ent/schema/entitlement.go", + "import": "openmeter/entitlement", + "message": "Ent schema (DB source of truth) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Ledger domain", + "file": "openmeter/ent/schema/ledger_account.go", + "import": "openmeter/ledger", + "message": "Ent schema (DB source of truth) imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Meter domain", + "file": "openmeter/ent/schema/meter.go", + "import": "openmeter/meter", + "message": "Ent schema (DB source of truth) imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Notification domain", + "file": "openmeter/ent/schema/notification.go", + "import": "openmeter/notification", + "message": "Ent schema (DB source of truth) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Product catalog domain", + "file": "openmeter/ent/schema/addon.go", + "import": "openmeter/productcatalog", + "message": "Ent schema (DB source of truth) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/schema/addon.go", + "import": "pkg/framework/entutils", + "message": "Ent schema (DB source of truth) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Customer domain", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "openmeter/customer/adapter", + "message": "Entitlement domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/entitlement/driver/entitlement.go", + "import": "api", + "message": "Entitlement domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "import": "openmeter/ingest/kafkaingest/serializer", + "message": "Entitlement domain imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Notification domain", + "file": "openmeter/entitlement/balanceworker/filters.go", + "import": "openmeter/notification", + "message": "Entitlement domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Product catalog domain", + "file": "openmeter/entitlement/adapter/entitlement_test.go", + "import": "openmeter/productcatalog/adapter", + "message": "Entitlement domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Registry & builder", + "file": "openmeter/entitlement/balanceworker/recalculate.go", + "import": "openmeter/registry", + "message": "Entitlement domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "pkg/clock", + "message": "Entitlement domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Subscription domain", + "file": "openmeter/entitlement/hooks/subscription/hook.go", + "import": "openmeter/subscription", + "message": "Entitlement domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "Generated API contract & v1 server interface imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Billing domain", + "file": "api/v3/handlers/billingprofiles/convert.gen.go", + "import": "openmeter/billing", + "message": "Generated API contract & v1 server interface imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Charges sub-system", + "file": "api/v3/handlers/customers/charges/convert.go", + "import": "openmeter/billing/charges", + "message": "Generated API contract & v1 server interface imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Customer domain", + "file": "api/v3/handlers/customers/billing/convert.go", + "import": "openmeter/customer", + "message": "Generated API contract & v1 server interface imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "Generated API contract & v1 server interface imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "Generated API contract & v1 server interface imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ledger domain", + "file": "api/v3/handlers/customers/credits/convert.go", + "import": "openmeter/ledger", + "message": "Generated API contract & v1 server interface imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Meter domain", + "file": "api/client/go/client_test.go", + "import": "openmeter/meter", + "message": "Generated API contract & v1 server interface imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "Generated API contract & v1 server interface imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Shared utility packages (pkg/)", + "file": "api/api.gen.go", + "import": "pkg/models", + "message": "Generated API contract & v1 server interface imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "Generated API contract & v1 server interface imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Subscription domain", + "file": "api/v3/handlers/subscriptions/cancel.go", + "import": "openmeter/subscription", + "message": "Generated API contract & v1 server interface imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "v3 API layer (AIP-style)", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "Generated API contract & v1 server interface imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/db/app.go", + "import": "openmeter/app", + "message": "Generated Ent client imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Billing domain", + "file": "openmeter/ent/db/billingcustomeroverride.go", + "import": "openmeter/billing", + "message": "Generated Ent client imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Charges sub-system", + "file": "openmeter/ent/db/charge.go", + "import": "openmeter/billing/charges/meta", + "message": "Generated Ent client imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/db/balancesnapshot.go", + "import": "openmeter/credit/balance", + "message": "Generated Ent client imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Ledger domain", + "file": "openmeter/ent/db/ledgeraccount.go", + "import": "openmeter/ledger", + "message": "Generated Ent client imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Meter domain", + "file": "openmeter/ent/db/meter.go", + "import": "openmeter/meter", + "message": "Generated Ent client imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Notification domain", + "file": "openmeter/ent/db/mutation.go", + "import": "openmeter/notification", + "message": "Generated Ent client imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Product catalog domain", + "file": "openmeter/ent/db/addon.go", + "import": "openmeter/productcatalog", + "message": "Generated Ent client imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/db/addon.go", + "import": "pkg/models", + "message": "Generated Ent client imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/ingest/httpdriver/ingest.go", + "import": "api", + "message": "Ingest & sink pipeline imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ingest/httpdriver/errors.go", + "import": "pkg/framework/commonhttp", + "message": "Ingest & sink pipeline imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/app", + "message": "Ledger domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Billing domain", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Charges sub-system", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/ledger/collector", + "message": "Ledger domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Database migrations", + "file": "openmeter/ledger/account/adapter/repo_test.go", + "import": "tools/migrate", + "message": "Ledger domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Meter domain", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/meter", + "message": "Ledger domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Product catalog domain", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/productcatalog", + "message": "Ledger domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ledger/account.go", + "import": "pkg/models", + "message": "Ledger domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/streaming/testutils", + "message": "Ledger domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "App / marketplace integrations", + "file": "openmeter/server/router/appcustominvoicing.go", + "import": "openmeter/app/custominvoicing/httpdriver", + "message": "Legacy v1 HTTP router imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Charges sub-system", + "file": "openmeter/server/router/router.go", + "import": "openmeter/billing/charges", + "message": "Legacy v1 HTTP router imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Credit & grant domain", + "file": "openmeter/server/router/credit.go", + "import": "openmeter/credit/driver", + "message": "Legacy v1 HTTP router imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/server/router/router.go", + "import": "openmeter/ingest", + "message": "Legacy v1 HTTP router imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/server/router/appstripe.go", + "import": "pkg/models", + "message": "Legacy v1 HTTP router imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/server/router/router.go", + "import": "openmeter/streaming", + "message": "Legacy v1 HTTP router imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Subscription domain", + "file": "openmeter/server/router/router.go", + "import": "openmeter/subscription", + "message": "Legacy v1 HTTP router imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "v3 API layer (AIP-style)", + "file": "openmeter/server/router/router.go", + "import": "api/v3/handlers/currencies", + "message": "Legacy v1 HTTP router imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Customer domain", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/customer", + "message": "Meter domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/meter/httphandler/mapping.go", + "import": "api", + "message": "Meter domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Product catalog domain", + "file": "openmeter/meter/adapter/manage.go", + "import": "openmeter/productcatalog/adapter", + "message": "Meter domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/meter/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Meter domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/streaming", + "message": "Meter domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Billing domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/billing", + "message": "Notification domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Customer domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/customer/httpdriver", + "message": "Notification domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Entitlement domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/entitlement/snapshot", + "message": "Notification domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/notification/adapter/entitymapping_test.go", + "import": "api", + "message": "Notification domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Product catalog domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/productcatalog/driver", + "message": "Notification domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/notification/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Notification domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/productcatalog/addon/service/service_test.go", + "import": "openmeter/app", + "message": "Product catalog domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Customer domain", + "file": "openmeter/productcatalog/subscription/http/create.go", + "import": "openmeter/customer", + "message": "Product catalog domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Entitlement domain", + "file": "openmeter/productcatalog/entitlement.go", + "import": "openmeter/entitlement", + "message": "Product catalog domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "api", + "message": "Product catalog domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Notification domain", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "openmeter/notification", + "message": "Product catalog domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "pkg/clock", + "message": "Product catalog domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Subscription domain", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "openmeter/subscription/repo", + "message": "Product catalog domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Customer domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/customer", + "message": "Registry & builder imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Generated Ent client", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/ent/db", + "message": "Registry & builder imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Meter domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/meter", + "message": "Registry & builder imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Product catalog domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/productcatalog/adapter", + "message": "Registry & builder imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "pkg/framework/lockr", + "message": "Registry & builder imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/streaming", + "message": "Registry & builder imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Billing domain", + "file": "cmd/server/wire.go", + "import": "openmeter/billing/creditgrant", + "message": "Server entrypoint & DI bootstrap imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Customer domain", + "file": "cmd/server/wire.go", + "import": "openmeter/customer", + "message": "Server entrypoint & DI bootstrap imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Generated Ent client", + "file": "cmd/server/wire.go", + "import": "openmeter/ent/db", + "message": "Server entrypoint & DI bootstrap imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Server entrypoint & DI bootstrap imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ledger domain", + "file": "cmd/server/wire.go", + "import": "openmeter/ledger", + "message": "Server entrypoint & DI bootstrap imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Meter domain", + "file": "cmd/server/wire.go", + "import": "openmeter/meter", + "message": "Server entrypoint & DI bootstrap imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Notification domain", + "file": "cmd/server/wire.go", + "import": "openmeter/notification", + "message": "Server entrypoint & DI bootstrap imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Product catalog domain", + "file": "cmd/server/wire.go", + "import": "openmeter/productcatalog/addon", + "message": "Server entrypoint & DI bootstrap imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Registry & builder", + "file": "cmd/server/wire.go", + "import": "openmeter/registry", + "message": "Server entrypoint & DI bootstrap imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/server/main.go", + "import": "pkg/errorsx", + "message": "Server entrypoint & DI bootstrap imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/server/wire.go", + "import": "openmeter/streaming", + "message": "Server entrypoint & DI bootstrap imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated API contract & v1 server interface", + "file": "pkg/errorsx/helpers.go", + "import": "api", + "message": "Shared utility packages (pkg/) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated Ent client", + "file": "pkg/framework/entutils/entdriver/driver.go", + "import": "openmeter/ent/db", + "message": "Shared utility packages (pkg/) imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "v3 API layer (AIP-style)", + "file": "pkg/errorsx/helpers.go", + "import": "api/v3", + "message": "Shared utility packages (pkg/) imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Customer domain", + "file": "openmeter/streaming/clickhouse/event_query_test.go", + "import": "openmeter/customer", + "message": "Streaming / usage query (ClickHouse) imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/streaming/clickhouse/connector.go", + "import": "pkg/models", + "message": "Streaming / usage query (ClickHouse) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/subscription/addon/diff/apply_test.go", + "import": "openmeter/app", + "message": "Subscription domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Database migrations", + "file": "openmeter/subscription/testutils/db.go", + "import": "tools/migrate", + "message": "Subscription domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/subscription/addon/http/create.go", + "import": "api", + "message": "Subscription domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Meter domain", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/meter", + "message": "Subscription domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Registry & builder", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/registry", + "message": "Subscription domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/subscription/addon/addon.go", + "import": "pkg/models", + "message": "Subscription domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/streaming/testutils", + "message": "Subscription domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "App / marketplace integrations", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/app", + "message": "Worker & job entrypoints imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Billing domain", + "file": "cmd/jobs/billing/advance/advance.go", + "import": "openmeter/billing", + "message": "Worker & job entrypoints imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Charges sub-system", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/billing/charges/worker/advance", + "message": "Worker & job entrypoints imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Customer domain", + "file": "cmd/jobs/billing/advancecharges/advancecharges.go", + "import": "openmeter/customer", + "message": "Worker & job entrypoints imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Entitlement domain", + "file": "cmd/jobs/entitlement/recalculatesnapshots.go", + "import": "openmeter/entitlement/balanceworker", + "message": "Worker & job entrypoints imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Generated Ent client", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/ent/db", + "message": "Worker & job entrypoints imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Worker & job entrypoints imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ledger domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/ledger", + "message": "Worker & job entrypoints imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Legacy v1 HTTP router", + "file": "cmd/server/main.go", + "import": "openmeter/server/router", + "message": "Worker & job entrypoints imports from Legacy v1 HTTP router but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Meter domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/meter", + "message": "Worker & job entrypoints imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Notification domain", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/notification", + "message": "Worker & job entrypoints imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Product catalog domain", + "file": "cmd/billing-worker/wire_gen.go", + "import": "openmeter/productcatalog/featureresolver", + "message": "Worker & job entrypoints imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Registry & builder", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/registry", + "message": "Worker & job entrypoints imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/balance-worker/main.go", + "import": "pkg/log", + "message": "Worker & job entrypoints imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/streaming", + "message": "Worker & job entrypoints imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "v3 API layer (AIP-style) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "v3 API layer (AIP-style) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Generated API contract & v1 server interface", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "v3 API layer (AIP-style) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "v3 API layer (AIP-style) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "v3 API layer (AIP-style) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Shared utility packages (pkg/)", + "file": "api/v3/apierrors/encoder.go", + "import": "pkg/framework/commonhttp", + "message": "v3 API layer (AIP-style) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "v3 API layer (AIP-style) imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/client", + "message": "Siblings under api/ mostly use [build orchestration lives in this makefile, not the children, format and lint before generate, pnpm workspace with patched, version-pinned typespec, two packages, two api generations] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "split by language, generated per language" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/spec", + "message": "Siblings under api/ mostly use [generation source is api/spec, not these folders, hand-edited only at the seams, split by language, generated per language] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "pnpm workspace with patched, version-pinned typespec", + "two packages, two api generations" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/backfillaccounts", + "message": "Siblings under cmd/jobs/ledger/ mostly use [config-validated service constructor, counter accumulation + recordfailure, cursor pagination with max_safe_iter guard, dryrun short-circuits writes, interface-typed collaborators, missing-account detection via validationissue codes, validate + normalize input structs] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/service", + "message": "Siblings under cmd/jobs/ledger/ mostly use [cobra command + rune delegation, concrete resolver stack construction (bypass wired di), rfc3339 flag parsing to utc pointer, shared job runtime via internal.app] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "validate + normalize input structs" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/resources", + "message": "Siblings under collector/quickstart/collector/ mostly use [content-type switch for cloudevents formats, durable sqlite buffer before delivery, env-driven output config, rfc7807 error responses via mapping + sync_response, schema validation with catch, two streams bridged by inproc channel] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "label is the cross-file contract", + "resources declared, not inlined" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/streams", + "message": "Siblings under collector/quickstart/collector/ mostly use [label is the cross-file contract, resources declared, not inlined] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/decisions", + "message": "Siblings under docs/ mostly use [before/after code diffs plus copy-paste sql, date-prefixed filenames, repo-relative source links to ground claims, version range header for upgrade-path guides] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "sequential numbered adr filenames" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/migration-guides", + "message": "Siblings under docs/ mostly use [fixed madr-style section structure, outcome stated as bullet list of concrete choices, sequential numbered adr filenames] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "repo-relative source links to ground claims", + "version range header for upgrade-path guides" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/adapter", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [charge mutation always under the charge lock, lineengine drives the machine, never persists lines directly, mutate charge in-memory; the machine persists on stabilization, one state machine type per settlement mode, public methods are transaction.run wrappers over the adapter, round through the currency calculator before compare/persist, states declared via fluent configure/permit/onactive dsl] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "expands gate eager-loading", + "map* functions for db<->domain conversion", + "namespace-scoped queries always", + "register/deregister charge ids with the meta adapter", + "soft-delete + upsert for detailed lines", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/service", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [expands gate eager-loading, map* functions for db<->domain conversion, namespace-scoped queries always, register/deregister charge ids with the meta adapter, soft-delete + upsert for detailed lines, transaction-aware via entutils.transactingrepo, validate inputs before persisting] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "charge mutation always under the charge lock", + "lineengine drives the machine, never persists lines directly", + "mutate charge in-memory; the machine persists on stabilization", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "round through the currency calculator before compare/persist", + "states declared via fluent configure/permit/onactive dsl" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/adapter", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [append-only segment consumption: close + create remainder, config{adapter lineage.adapter} + new returns lineage.service, coverage shortfall is a hard error, deterministic ordering via lineage helpers, multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...), timestamps truncated to microsecond from clock.now(), validate input at the top of every mutating method] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "bulk creates for initial lineages", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "package-level helper rebuilds adapter from raw *entdb.client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/service", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [active-segment queries filter closedatisnil + order bycreatedat, bulk creates for initial lineages, ent rows mapped to domain via maplineage / mapsegment, every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue, implements lineage.adapter + entutils.txcreator, lock methods assert in-transaction then use forupdate(), package-level helper rebuilds adapter from raw *entdb.client] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "append-only segment consumption: close + create remainder", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/adapter", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [config-validated new with composed sub-services, declarative state config via stateless library + meta.trigger* constants, input.validate() then transaction.run(s.adapter, ...), invoice mutations emitted as deferred invoiceupdater.patch, not direct writes, lineengine bridges billing invoice lifecycle into state-machine triggers, realization-run lifecycle delegated to s.runs / s.rater, settlement-mode dispatch to a state machine] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "interface conformance asserts per file", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/rating", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credit reconciliation as signed-delta switch, currencycalculator.roundtoprecision before decimal compares, decisions delegated to handler, persistence to adapter, input struct + validate() per public method, lineage created/persisted alongside every credit realization, nofiattransactionrequired short-circuits fiat paths, service struct with validated config + new] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credits mutator always disabled for gross rating", + "engine dispatch on charge.state.ratingengine", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "voided realizations excluded from billable history" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/run", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credits mutator always disabled for gross rating, engine dispatch on charge.state.ratingengine, input struct with validate() before any work, lazy prior detailed-line expansion with overcharge guard, quantity snapshot via streaming with stored-at cutoff, service interface + private struct + config-validated new, voided realizations excluded from billable history] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credit reconciliation as signed-delta switch", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "input struct + validate() per public method", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "service struct with validated config + new" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [detailed-line soft-delete + upsert by childuniquereferenceid, expand-gated edge loading, exported map*fromdb mappers, interface conformance asserts per file, timestamp normalization to utc, transaction-aware repo body, validate inputs before db work] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "input.validate() then transaction.run(s.adapter, ...)", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/advance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config.validate() + new constructor, return error for consumer-level retry, single-event handle delegating to service] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config + validating constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/asyncadvance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config + validating constructor, context-aware structured logging, paginate via pagination.collectall, per-customer error isolation] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config.validate() + new constructor", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/customer", + "message": "Siblings under openmeter/billing/validators/ mostly use [capability-based customer validation, skip validation when no billable items, subscriptioncommandhook via noop embedding, wrap validation failures as conflict errors] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "aggregate validation errors with errors.join", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "sync-then-check invoice state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/subscription", + "message": "Siblings under openmeter/billing/validators/ mostly use [aggregate validation errors with errors.join, constructor nil-checks injected services, invoice type discrimination via as* accessors, requestvalidator via noop embedding, sync-then-check invoice state] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "capability-based customer validation", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "wrap validation failures as conflict errors" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/adapter", + "message": "Siblings under openmeter/cost/ mostly use [config-validated constructor returning (*service, error), validate input then delegate to adapter] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "adapter struct with constructor new and interface assertion", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/service", + "message": "Siblings under openmeter/cost/ mostly use [adapter struct with constructor new and interface assertion, defensive copy of caller slices/maps before mutation, feature filters take precedence over caller filters, internal group-by keys added for resolution, then aggregated away, not-found pricing is a non-fatal detail, not an error, pre-resolve llm prices into a cache keyed by (provider, model), resolve dimensions from static value or group-by property] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "config-validated constructor returning (*service, error)", + "validate input then delegate to adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/adapter", + "message": "Siblings under openmeter/currencies/ mostly use [fiat sourced from gobl currency.definitions, fiat/custom merge with in-memory pagination, service satisfies currencies.currencyservice, service-owned business rules, sort honors orderby/order, validate-then-run guard] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "transaction-aware via entutils.transactingrepo" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/service", + "message": "Siblings under openmeter/currencies/ mostly use [adapter satisfies currencies.adapter, constraint errors map to conflict, constructor validates config, db->domain mapping helpers, namespace-scoped queries, pkg/filter + pagination helpers, transaction-aware via entutils.transactingrepo] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "validate-then-run guard" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/memorydedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [batch ops use pipelined / mget and tolerate redis.nil, hash keys via getkeyhash (xxh3-128 + base64 rawurl), migration mode double-checks the old raw key, mode switch on every key operation, set nx with ttl as the uniqueness primitive, validate mode and guard nil client] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/redisdedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [cache stores nil values, keys carry all signal, constructor clamps invalid size to defaultsize, implement full dedupe.deduplicator interface, isunique mutates as it checks, key derived only via dedupe.item.key()] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/schema", + "message": "Siblings under openmeter/ent/ mostly use [ent-backed transaction.creator, hijacktx + newtxdriver wrapping] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "entutils mixins for identity/namespace/time", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/tx", + "message": "Siblings under openmeter/ent/ mostly use [decimals via alpacadecimal numeric, edge ownership via from/ref + field, entutils mixins for identity/namespace/time, json columns via valuescanner + jsonb, soft-delete-aware partial unique indexes, standard ent.schema quartet, ulid fk columns as char(26)] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "ent-backed transaction.creator", + "hijacktx + newtxdriver wrapping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/events", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [backend-abstracted cache, config struct with validate constructor guard, filter interface hierarchy, ttl'd rule cache keyed by namespace, validate request before scoping] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "error-collecting validate()", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "versioned eventtype triple" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/filters", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [error-collecting validate(), marshaler.event compile-time assertion, string enum with values()+validate(), subject path via metadata.composeresourcepath, versioned eventtype triple] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "filter interface hierarchy", + "ttl'd rule cache keyed by namespace", + "validate request before scoping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/metadata", + "message": "Siblings under openmeter/event/ mostly use [json-stable field tags, validatable value type] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "entity-segment constants", + "eventtype identity triple", + "resource paths via compose helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/models", + "message": "Siblings under openmeter/event/ mostly use [entity-segment constants, eventtype identity triple, resource paths via compose helpers] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "json-stable field tags", + "validatable value type" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/serializer", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [compile-time interface assertion, resolver interface, template-driven topic naming, validating constructor returning pointer + error] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "serializer interface contract", + "symmetric encode/decode helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/topicresolver", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [dedupe-derived kafka key, flat cloudeventskafkapayload struct, optional-data guard, serializer interface contract, symmetric encode/decode helpers] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "compile-time interface assertion", + "resolver interface", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/adapter", + "message": "Siblings under openmeter/ledger/account/ mostly use [data-to-domain mapping, deterministic lock ordering, nil-locker tolerance, self-wired live services, transaction.run for multi-step writes, validate-then-delegate] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "route normalization before persistence/query", + "transactingrepo wrapping", + "txuser implementation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/service", + "message": "Siblings under openmeter/ledger/account/ mostly use [eager-load required edges then validate, idempotent ensure via onconflict resolvewithignore, map* projector functions, route normalization before persistence/query, transactingrepo wrapping, txuser implementation] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "data-to-domain mapping", + "deterministic lock ordering", + "nil-locker tolerance", + "self-wired live services", + "transaction.run for multi-step writes", + "validate-then-delegate" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/adapter", + "message": "Siblings under openmeter/meterevent/ mostly use [api<->domain mapping isolated in mapping.go via apiconverter, handler interface + unexported struct + new constructor, httptransport.newhandlerwithargs three-stage handler, namespace resolved from context, never from request body, per-event validation errors flow to api.ingestedevent.validationerror, type aliases tie api types to handler signatures, v1 defaults applied in the decode function] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "missing-customer lookups are tolerated, not fatal", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/httphandler", + "message": "Siblings under openmeter/meterevent/ mostly use [constructor returns the domain service interface, cursor pagination only emits nextcursor on a full page, missing-customer lookups are tolerated, not fatal, shared eventpostprocess pipeline, translate domain params to streaming params, never query streaming directly with domain types, validate params at the top of every service method, validation errors are collected on the event, not returned] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/secret/adapter", + "message": "Siblings under openmeter/secret/ mostly use [package name differs from directory] but this folder does not", + "expected": [ + "package name differs from directory" + ], + "actual": [ + "compile-time interface assertion", + "id-equals-value plaintext encoding", + "no validation at adapter layer", + "stateless struct adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/flushhandler", + "message": "Siblings under openmeter/sink/ mostly use [leaf type-only package, stringer on int8 enum with explicit iota constants, value-receiver derivation helper] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/models", + "message": "Siblings under openmeter/sink/ mostly use [background context with timeout for callbacks, constructor validates required deps then builds, graceful drain on shutdown, idempotent close via sync.oncefunc + atomic shutdown flag, interface-first flusheventhandler, onflushsuccess is non-blocking and never re-does the write, per-handler namespaced metrics] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "leaf type-only package", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/customer", + "message": "Siblings under openmeter/subscription/validators/ mostly use [config struct with validate() and constructor guard, feature-flag-driven uniqueness mode, paginated full collection of candidate subscriptions, sub -> view -> spec pipeline of small step functions, subscriptioncommandhook via noopsubscriptioncommandhook embedding, two-phase before validation (existing-set then candidate-included)] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "active-subscription check via list + activeat=clock.now()", + "constructor validates required dependencies", + "delegate to input.validate() first", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "typed precondition/not-found errors for customer state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/subscription", + "message": "Siblings under openmeter/subscription/validators/ mostly use [active-subscription check via list + activeat=clock.now(), constructor validates required dependencies, delegate to input.validate() first, implements customer.requestvalidator via nooprequestvalidator embedding, typed precondition/not-found errors for customer state] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "config struct with validate() and constructor guard", + "feature-flag-driven uniqueness mode", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/kafka", + "message": "Siblings under openmeter/watermill/driver/ mostly use [compile-time interface assertion, value-receiver no-op methods returning nil] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/noop", + "message": "Siblings under openmeter/watermill/driver/ mostly use [centralized sarama config via createkafkaconfig(role), cloudevent subject becomes kafka partition key, injected dependencies, no global fallbacks, metric name transform via saramametricrenamer(role), options struct with validate() then constructor, sarama global logger redirected to slog adaptor, topic provisioning before publisher returns] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "compile-time interface assertion", + "value-receiver no-op methods returning nil" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/framework/entutils/testutils/ent2", + "message": "Siblings under pkg/framework/entutils/testutils/ mostly use [extension wiring stays in entc.go] but this folder does not", + "expected": [ + "extension wiring stays in entc.go", + "generate directive in package file", + "ignored-build codegen driver" + ], + "actual": [ + "generate directive in package file", + "ignored-build codegen driver" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/internal", + "message": "Siblings under pkg/kafka/metrics/ mostly use [nested collections keyed by string, string enums with unmarshaljson + int64 projection, struct fields map librdkafka json keys via json tags, windowstats for rolling percentile windows] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/stats", + "message": "Siblings under pkg/kafka/metrics/ mostly use [add is nil-safe and attribute-additive, enum stats recorded via .int64(), extended-metrics gating via `extended bool`, gauge creation always wraps errors with the metric name, internal partitions are skipped, struct-of-gauges + new + add pair, window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "windowstats for rolling percentile windows" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/custominvoicing", + "message": "Siblings under test/app/ mostly use [assert via typed error predicates, fixture builds app + customer + customer-data, invoice sync asserts stripe line items by description/amount/metadata, ledger-backed charges wired in setupsuite, set expectations with on(...).return(...) then restore(), stripe clients are testify mocks injected via factory, two test harness styles coexist] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "shared profile setup helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/stripe", + "message": "Siblings under test/app/ mostly use [builder results for sync inputs, drive invoice lifecycle through service calls, embed billingtest.basesuite, meter/streaming teardown via defer, per-test unique namespace string, shared profile setup helper] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "assert via typed error predicates", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "set expectations with on(...).return(...) then restore()", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/cmd", + "message": "Siblings under tools/migrate/ mostly use [deterministic output via name sort, generated-file header marker, load ent schema by path, not by importing generated code, only emit views, skip non-view schemas, view name fallback chain, view query precedence: viewfor[dialect] then viewas] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "generators backstop atlas gaps", + "thin main, logic in package" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/viewgen", + "message": "Siblings under tools/migrate/ mostly use [generators backstop atlas gaps, thin main, logic in package] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "deterministic output via name sort", + "generated-file header marker", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "severity": "warn" + }, + { + "type": "structural_outlier", + "folder": "api/client/go", + "message": "Uses [.go, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/javascript", + "message": "Uses [.json, .ts, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/python", + "message": "Uses [.in, .toml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "openmeter/billing", + "message": "Has 41 files \u2014 significantly more than sibling average (8). May be a god-folder that should be split.", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "pkg/models", + "message": "Has 28 files \u2014 significantly more than sibling average (4). May be a god-folder that should be split.", + "severity": "info" + } + ], + "summary": { + "previous_timestamp": "2026-06-05T14:59:32.415803+00:00", + "current_timestamp": "2026-06-05T17:18:39.481531+00:00", + "previous_total": 235, + "current_total": 235, + "new_findings": 0, + "resolved_findings": 0, + "persisting_findings": 235 + } +} \ No newline at end of file diff --git a/.archie/drift_history/drift_20260605_145932.json b/.archie/drift_history/drift_20260605_145932.json new file mode 100644 index 0000000000..d67c0fbfd2 --- /dev/null +++ b/.archie/drift_history/drift_20260605_145932.json @@ -0,0 +1,2962 @@ +{ + "pattern_divergences": [ + { + "type": "pattern_divergence", + "folder": "api/client", + "message": "Siblings under api/ mostly use [build orchestration lives in this makefile, not the children, format and lint before generate, pnpm workspace with patched, version-pinned typespec, two packages, two api generations] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "split by language, generated per language" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/spec", + "message": "Siblings under api/ mostly use [generation source is api/spec, not these folders, hand-edited only at the seams, split by language, generated per language] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "pnpm workspace with patched, version-pinned typespec", + "two packages, two api generations" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/adapter", + "message": "Siblings under openmeter/meterevent/ mostly use [api<->domain mapping isolated in mapping.go via apiconverter, handler interface + unexported struct + new constructor, httptransport.newhandlerwithargs three-stage handler, namespace resolved from context, never from request body, per-event validation errors flow to api.ingestedevent.validationerror, type aliases tie api types to handler signatures, v1 defaults applied in the decode function] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "missing-customer lookups are tolerated, not fatal", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/httphandler", + "message": "Siblings under openmeter/meterevent/ mostly use [constructor returns the domain service interface, cursor pagination only emits nextcursor on a full page, missing-customer lookups are tolerated, not fatal, shared eventpostprocess pipeline, translate domain params to streaming params, never query streaming directly with domain types, validate params at the top of every service method, validation errors are collected on the event, not returned] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/secret/adapter", + "message": "Siblings under openmeter/secret/ mostly use [package name differs from directory] but this folder does not", + "expected": [ + "package name differs from directory" + ], + "actual": [ + "compile-time interface assertion", + "id-equals-value plaintext encoding", + "no validation at adapter layer", + "stateless struct adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/models", + "message": "Siblings under openmeter/sink/ mostly use [background context with timeout for callbacks, constructor validates required deps then builds, graceful drain on shutdown, idempotent close via sync.oncefunc + atomic shutdown flag, interface-first flusheventhandler, onflushsuccess is non-blocking and never re-does the write, per-handler namespaced metrics] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "leaf type-only package", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/flushhandler", + "message": "Siblings under openmeter/sink/ mostly use [leaf type-only package, stringer on int8 enum with explicit iota constants, value-receiver derivation helper] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [detailed-line soft-delete + upsert by childuniquereferenceid, expand-gated edge loading, exported map*fromdb mappers, interface conformance asserts per file, timestamp normalization to utc, transaction-aware repo body, validate inputs before db work] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "input.validate() then transaction.run(s.adapter, ...)", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/adapter", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [config-validated new with composed sub-services, declarative state config via stateless library + meta.trigger* constants, input.validate() then transaction.run(s.adapter, ...), invoice mutations emitted as deferred invoiceupdater.patch, not direct writes, lineengine bridges billing invoice lifecycle into state-machine triggers, realization-run lifecycle delegated to s.runs / s.rater, settlement-mode dispatch to a state machine] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "interface conformance asserts per file", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/customer", + "message": "Siblings under openmeter/subscription/validators/ mostly use [config struct with validate() and constructor guard, feature-flag-driven uniqueness mode, paginated full collection of candidate subscriptions, sub -> view -> spec pipeline of small step functions, subscriptioncommandhook via noopsubscriptioncommandhook embedding, two-phase before validation (existing-set then candidate-included)] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "active-subscription check via list + activeat=clock.now()", + "constructor validates required dependencies", + "delegate to input.validate() first", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "typed precondition/not-found errors for customer state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/subscription", + "message": "Siblings under openmeter/subscription/validators/ mostly use [active-subscription check via list + activeat=clock.now(), constructor validates required dependencies, delegate to input.validate() first, implements customer.requestvalidator via nooprequestvalidator embedding, typed precondition/not-found errors for customer state] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "config struct with validate() and constructor guard", + "feature-flag-driven uniqueness mode", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/noop", + "message": "Siblings under openmeter/watermill/driver/ mostly use [centralized sarama config via createkafkaconfig(role), cloudevent subject becomes kafka partition key, injected dependencies, no global fallbacks, metric name transform via saramametricrenamer(role), options struct with validate() then constructor, sarama global logger redirected to slog adaptor, topic provisioning before publisher returns] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "compile-time interface assertion", + "value-receiver no-op methods returning nil" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/kafka", + "message": "Siblings under openmeter/watermill/driver/ mostly use [compile-time interface assertion, value-receiver no-op methods returning nil] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/internal", + "message": "Siblings under pkg/kafka/metrics/ mostly use [nested collections keyed by string, string enums with unmarshaljson + int64 projection, struct fields map librdkafka json keys via json tags, windowstats for rolling percentile windows] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/stats", + "message": "Siblings under pkg/kafka/metrics/ mostly use [add is nil-safe and attribute-additive, enum stats recorded via .int64(), extended-metrics gating via `extended bool`, gauge creation always wraps errors with the metric name, internal partitions are skipped, struct-of-gauges + new + add pair, window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "windowstats for rolling percentile windows" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/custominvoicing", + "message": "Siblings under test/app/ mostly use [assert via typed error predicates, fixture builds app + customer + customer-data, invoice sync asserts stripe line items by description/amount/metadata, ledger-backed charges wired in setupsuite, set expectations with on(...).return(...) then restore(), stripe clients are testify mocks injected via factory, two test harness styles coexist] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "shared profile setup helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/stripe", + "message": "Siblings under test/app/ mostly use [builder results for sync inputs, drive invoice lifecycle through service calls, embed billingtest.basesuite, meter/streaming teardown via defer, per-test unique namespace string, shared profile setup helper] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "assert via typed error predicates", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "set expectations with on(...).return(...) then restore()", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/viewgen", + "message": "Siblings under tools/migrate/ mostly use [generators backstop atlas gaps, thin main, logic in package] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "deterministic output via name sort", + "generated-file header marker", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/cmd", + "message": "Siblings under tools/migrate/ mostly use [deterministic output via name sort, generated-file header marker, load ent schema by path, not by importing generated code, only emit views, skip non-view schemas, view name fallback chain, view query precedence: viewfor[dialect] then viewas] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "generators backstop atlas gaps", + "thin main, logic in package" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/service", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [expands gate eager-loading, map* functions for db<->domain conversion, namespace-scoped queries always, register/deregister charge ids with the meta adapter, soft-delete + upsert for detailed lines, transaction-aware via entutils.transactingrepo, validate inputs before persisting] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "charge mutation always under the charge lock", + "lineengine drives the machine, never persists lines directly", + "mutate charge in-memory; the machine persists on stabilization", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "round through the currency calculator before compare/persist", + "states declared via fluent configure/permit/onactive dsl" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/adapter", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [charge mutation always under the charge lock, lineengine drives the machine, never persists lines directly, mutate charge in-memory; the machine persists on stabilization, one state machine type per settlement mode, public methods are transaction.run wrappers over the adapter, round through the currency calculator before compare/persist, states declared via fluent configure/permit/onactive dsl] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "expands gate eager-loading", + "map* functions for db<->domain conversion", + "namespace-scoped queries always", + "register/deregister charge ids with the meta adapter", + "soft-delete + upsert for detailed lines", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/rating", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credit reconciliation as signed-delta switch, currencycalculator.roundtoprecision before decimal compares, decisions delegated to handler, persistence to adapter, input struct + validate() per public method, lineage created/persisted alongside every credit realization, nofiattransactionrequired short-circuits fiat paths, service struct with validated config + new] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credits mutator always disabled for gross rating", + "engine dispatch on charge.state.ratingengine", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "voided realizations excluded from billable history" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/run", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credits mutator always disabled for gross rating, engine dispatch on charge.state.ratingengine, input struct with validate() before any work, lazy prior detailed-line expansion with overcharge guard, quantity snapshot via streaming with stored-at cutoff, service interface + private struct + config-validated new, voided realizations excluded from billable history] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credit reconciliation as signed-delta switch", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "input struct + validate() per public method", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "service struct with validated config + new" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/backfillaccounts", + "message": "Siblings under cmd/jobs/ledger/ mostly use [config-validated service constructor, counter accumulation + recordfailure, cursor pagination with max_safe_iter guard, dryrun short-circuits writes, interface-typed collaborators, missing-account detection via validationissue codes, validate + normalize input structs] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/service", + "message": "Siblings under cmd/jobs/ledger/ mostly use [cobra command + rune delegation, concrete resolver stack construction (bypass wired di), rfc3339 flag parsing to utc pointer, shared job runtime via internal.app] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "validate + normalize input structs" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/framework/entutils/testutils/ent2", + "message": "Siblings under pkg/framework/entutils/testutils/ mostly use [extension wiring stays in entc.go] but this folder does not", + "expected": [ + "extension wiring stays in entc.go", + "generate directive in package file", + "ignored-build codegen driver" + ], + "actual": [ + "generate directive in package file", + "ignored-build codegen driver" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/resources", + "message": "Siblings under collector/quickstart/collector/ mostly use [content-type switch for cloudevents formats, durable sqlite buffer before delivery, env-driven output config, rfc7807 error responses via mapping + sync_response, schema validation with catch, two streams bridged by inproc channel] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "label is the cross-file contract", + "resources declared, not inlined" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/streams", + "message": "Siblings under collector/quickstart/collector/ mostly use [label is the cross-file contract, resources declared, not inlined] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/decisions", + "message": "Siblings under docs/ mostly use [before/after code diffs plus copy-paste sql, date-prefixed filenames, repo-relative source links to ground claims, version range header for upgrade-path guides] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "sequential numbered adr filenames" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/migration-guides", + "message": "Siblings under docs/ mostly use [fixed madr-style section structure, outcome stated as bullet list of concrete choices, sequential numbered adr filenames] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "repo-relative source links to ground claims", + "version range header for upgrade-path guides" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/adapter", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [append-only segment consumption: close + create remainder, config{adapter lineage.adapter} + new returns lineage.service, coverage shortfall is a hard error, deterministic ordering via lineage helpers, multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...), timestamps truncated to microsecond from clock.now(), validate input at the top of every mutating method] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "bulk creates for initial lineages", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "package-level helper rebuilds adapter from raw *entdb.client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/service", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [active-segment queries filter closedatisnil + order bycreatedat, bulk creates for initial lineages, ent rows mapped to domain via maplineage / mapsegment, every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue, implements lineage.adapter + entutils.txcreator, lock methods assert in-transaction then use forupdate(), package-level helper rebuilds adapter from raw *entdb.client] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "append-only segment consumption: close + create remainder", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/advance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config.validate() + new constructor, return error for consumer-level retry, single-event handle delegating to service] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config + validating constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/asyncadvance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config + validating constructor, context-aware structured logging, paginate via pagination.collectall, per-customer error isolation] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config.validate() + new constructor", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/customer", + "message": "Siblings under openmeter/billing/validators/ mostly use [capability-based customer validation, skip validation when no billable items, subscriptioncommandhook via noop embedding, wrap validation failures as conflict errors] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "aggregate validation errors with errors.join", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "sync-then-check invoice state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/subscription", + "message": "Siblings under openmeter/billing/validators/ mostly use [aggregate validation errors with errors.join, constructor nil-checks injected services, invoice type discrimination via as* accessors, requestvalidator via noop embedding, sync-then-check invoice state] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "capability-based customer validation", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "wrap validation failures as conflict errors" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/adapter", + "message": "Siblings under openmeter/cost/ mostly use [config-validated constructor returning (*service, error), validate input then delegate to adapter] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "adapter struct with constructor new and interface assertion", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/service", + "message": "Siblings under openmeter/cost/ mostly use [adapter struct with constructor new and interface assertion, defensive copy of caller slices/maps before mutation, feature filters take precedence over caller filters, internal group-by keys added for resolution, then aggregated away, not-found pricing is a non-fatal detail, not an error, pre-resolve llm prices into a cache keyed by (provider, model), resolve dimensions from static value or group-by property] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "config-validated constructor returning (*service, error)", + "validate input then delegate to adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/adapter", + "message": "Siblings under openmeter/currencies/ mostly use [fiat sourced from gobl currency.definitions, fiat/custom merge with in-memory pagination, service satisfies currencies.currencyservice, service-owned business rules, sort honors orderby/order, validate-then-run guard] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "transaction-aware via entutils.transactingrepo" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/service", + "message": "Siblings under openmeter/currencies/ mostly use [adapter satisfies currencies.adapter, constraint errors map to conflict, constructor validates config, db->domain mapping helpers, namespace-scoped queries, pkg/filter + pagination helpers, transaction-aware via entutils.transactingrepo] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "validate-then-run guard" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/memorydedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [batch ops use pipelined / mget and tolerate redis.nil, hash keys via getkeyhash (xxh3-128 + base64 rawurl), migration mode double-checks the old raw key, mode switch on every key operation, set nx with ttl as the uniqueness primitive, validate mode and guard nil client] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/redisdedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [cache stores nil values, keys carry all signal, constructor clamps invalid size to defaultsize, implement full dedupe.deduplicator interface, isunique mutates as it checks, key derived only via dedupe.item.key()] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/schema", + "message": "Siblings under openmeter/ent/ mostly use [ent-backed transaction.creator, hijacktx + newtxdriver wrapping] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "entutils mixins for identity/namespace/time", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/tx", + "message": "Siblings under openmeter/ent/ mostly use [decimals via alpacadecimal numeric, edge ownership via from/ref + field, entutils mixins for identity/namespace/time, json columns via valuescanner + jsonb, soft-delete-aware partial unique indexes, standard ent.schema quartet, ulid fk columns as char(26)] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "ent-backed transaction.creator", + "hijacktx + newtxdriver wrapping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/events", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [backend-abstracted cache, config struct with validate constructor guard, filter interface hierarchy, ttl'd rule cache keyed by namespace, validate request before scoping] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "error-collecting validate()", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "versioned eventtype triple" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/filters", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [error-collecting validate(), marshaler.event compile-time assertion, string enum with values()+validate(), subject path via metadata.composeresourcepath, versioned eventtype triple] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "filter interface hierarchy", + "ttl'd rule cache keyed by namespace", + "validate request before scoping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/metadata", + "message": "Siblings under openmeter/event/ mostly use [json-stable field tags, validatable value type] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "entity-segment constants", + "eventtype identity triple", + "resource paths via compose helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/models", + "message": "Siblings under openmeter/event/ mostly use [entity-segment constants, eventtype identity triple, resource paths via compose helpers] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "json-stable field tags", + "validatable value type" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/serializer", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [compile-time interface assertion, resolver interface, template-driven topic naming, validating constructor returning pointer + error] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "serializer interface contract", + "symmetric encode/decode helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/topicresolver", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [dedupe-derived kafka key, flat cloudeventskafkapayload struct, optional-data guard, serializer interface contract, symmetric encode/decode helpers] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "compile-time interface assertion", + "resolver interface", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/adapter", + "message": "Siblings under openmeter/ledger/account/ mostly use [data-to-domain mapping, deterministic lock ordering, nil-locker tolerance, self-wired live services, transaction.run for multi-step writes, validate-then-delegate] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "route normalization before persistence/query", + "transactingrepo wrapping", + "txuser implementation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/service", + "message": "Siblings under openmeter/ledger/account/ mostly use [eager-load required edges then validate, idempotent ensure via onconflict resolvewithignore, map* projector functions, route normalization before persistence/query, transactingrepo wrapping, txuser implementation] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "data-to-domain mapping", + "deterministic lock ordering", + "nil-locker tolerance", + "self-wired live services", + "transaction.run for multi-step writes", + "validate-then-delegate" + ], + "severity": "warn" + } + ], + "naming_violations": [], + "dependency_violations": [ + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Server entrypoint & DI bootstrap imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/server/main.go", + "import": "pkg/errorsx", + "message": "Server entrypoint & DI bootstrap imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Billing domain", + "file": "cmd/server/wire.go", + "import": "openmeter/billing/creditgrant", + "message": "Server entrypoint & DI bootstrap imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Customer domain", + "file": "cmd/server/wire.go", + "import": "openmeter/customer", + "message": "Server entrypoint & DI bootstrap imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Generated Ent client", + "file": "cmd/server/wire.go", + "import": "openmeter/ent/db", + "message": "Server entrypoint & DI bootstrap imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ledger domain", + "file": "cmd/server/wire.go", + "import": "openmeter/ledger", + "message": "Server entrypoint & DI bootstrap imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Meter domain", + "file": "cmd/server/wire.go", + "import": "openmeter/meter", + "message": "Server entrypoint & DI bootstrap imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Notification domain", + "file": "cmd/server/wire.go", + "import": "openmeter/notification", + "message": "Server entrypoint & DI bootstrap imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Product catalog domain", + "file": "cmd/server/wire.go", + "import": "openmeter/productcatalog/addon", + "message": "Server entrypoint & DI bootstrap imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Registry & builder", + "file": "cmd/server/wire.go", + "import": "openmeter/registry", + "message": "Server entrypoint & DI bootstrap imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/server/wire.go", + "import": "openmeter/streaming", + "message": "Server entrypoint & DI bootstrap imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/balance-worker/main.go", + "import": "pkg/log", + "message": "Worker & job entrypoints imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ledger domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/ledger", + "message": "Worker & job entrypoints imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Meter domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/meter", + "message": "Worker & job entrypoints imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/streaming", + "message": "Worker & job entrypoints imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Product catalog domain", + "file": "cmd/billing-worker/wire_gen.go", + "import": "openmeter/productcatalog/featureresolver", + "message": "Worker & job entrypoints imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Billing domain", + "file": "cmd/jobs/billing/advance/advance.go", + "import": "openmeter/billing", + "message": "Worker & job entrypoints imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Customer domain", + "file": "cmd/jobs/billing/advancecharges/advancecharges.go", + "import": "openmeter/customer", + "message": "Worker & job entrypoints imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Entitlement domain", + "file": "cmd/jobs/entitlement/recalculatesnapshots.go", + "import": "openmeter/entitlement/balanceworker", + "message": "Worker & job entrypoints imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "App / marketplace integrations", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/app", + "message": "Worker & job entrypoints imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Charges sub-system", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/billing/charges/worker/advance", + "message": "Worker & job entrypoints imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Generated Ent client", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/ent/db", + "message": "Worker & job entrypoints imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Notification domain", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/notification", + "message": "Worker & job entrypoints imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Registry & builder", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/registry", + "message": "Worker & job entrypoints imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Worker & job entrypoints imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Legacy v1 HTTP router", + "file": "cmd/server/main.go", + "import": "openmeter/server/router", + "message": "Worker & job entrypoints imports from Legacy v1 HTTP router but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "App / marketplace integrations", + "file": "app/common/app.go", + "import": "openmeter/app", + "message": "Application wiring (app/common) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Product catalog domain", + "file": "app/common/billing.go", + "import": "openmeter/productcatalog/feature", + "message": "Application wiring (app/common) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Shared utility packages (pkg/)", + "file": "app/common/billing.go", + "import": "pkg/featuregate", + "message": "Application wiring (app/common) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "app/common/charges.go", + "import": "openmeter/ledger/collector", + "message": "Application wiring (app/common) imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Registry & builder", + "file": "app/common/customer.go", + "import": "openmeter/registry", + "message": "Application wiring (app/common) imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Database migrations", + "file": "app/common/database.go", + "import": "tools/migrate", + "message": "Application wiring (app/common) imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Entitlement domain", + "file": "app/common/entitlement.go", + "import": "openmeter/entitlement/validators/customer", + "message": "Application wiring (app/common) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Generated API contract & v1 server interface", + "file": "app/common/ffx.go", + "import": "api", + "message": "Application wiring (app/common) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Subscription domain", + "file": "app/common/ffx.go", + "import": "openmeter/subscription", + "message": "Application wiring (app/common) imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Ingest & sink pipeline", + "file": "app/common/kafka.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Application wiring (app/common) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Notification domain", + "file": "app/common/notification.go", + "import": "openmeter/notification", + "message": "Application wiring (app/common) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/adapter.go", + "import": "pkg/framework/entutils", + "message": "Billing domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Product catalog domain", + "file": "openmeter/billing/adapter/customeroverride.go", + "import": "openmeter/productcatalog", + "message": "Billing domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/billing/adapter/gatheringinvoice.go", + "import": "api", + "message": "Billing domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Charges sub-system", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/billing/charges/meta", + "message": "Billing domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Billing domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Ledger domain", + "file": "openmeter/billing/charges/service/base_test.go", + "import": "openmeter/ledger/recognizer", + "message": "Billing domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Subscription domain", + "file": "openmeter/billing/validators/customer/customer.go", + "import": "openmeter/subscription", + "message": "Billing domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "import": "openmeter/ledger/collector", + "message": "Billing domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Entitlement domain", + "file": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "import": "openmeter/entitlement", + "message": "Billing domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Customer domain", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/customer", + "message": "Charges sub-system imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/charges/adapter.go", + "import": "pkg/framework/entutils", + "message": "Charges sub-system imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Product catalog domain", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "openmeter/productcatalog", + "message": "Charges sub-system imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Charges sub-system imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "import": "openmeter/streaming", + "message": "Charges sub-system imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "App / marketplace integrations", + "file": "openmeter/billing/charges/service/creditpurchase_test.go", + "import": "openmeter/app/custominvoicing", + "message": "Charges sub-system imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Meter domain", + "file": "openmeter/billing/charges/service/featureid_test.go", + "import": "openmeter/meter", + "message": "Charges sub-system imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/customer/adapter.go", + "import": "openmeter/streaming", + "message": "Customer domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/customer/adapter.go", + "import": "pkg/framework/entutils", + "message": "Customer domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/customer/adapter/customer_test.go", + "import": "openmeter/app", + "message": "Customer domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "api", + "message": "Customer domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Entitlement domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/entitlement", + "message": "Customer domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Product catalog domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/productcatalog/subscription/http", + "message": "Customer domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Subscription domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/subscription", + "message": "Customer domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Billing domain", + "file": "openmeter/customer/service/hooks/subjectcustomer.go", + "import": "openmeter/billing", + "message": "Customer domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Meter domain", + "file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "import": "openmeter/meter/mockadapter", + "message": "Customer domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Ledger domain", + "file": "openmeter/customer/service/ledger_hook_test.go", + "import": "openmeter/ledger", + "message": "Customer domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Subscription domain", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "openmeter/subscription/repo", + "message": "Product catalog domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "pkg/clock", + "message": "Product catalog domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "api", + "message": "Product catalog domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Notification domain", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "openmeter/notification", + "message": "Product catalog domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/productcatalog/addon/service/service_test.go", + "import": "openmeter/app", + "message": "Product catalog domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Entitlement domain", + "file": "openmeter/productcatalog/entitlement.go", + "import": "openmeter/entitlement", + "message": "Product catalog domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Customer domain", + "file": "openmeter/productcatalog/subscription/http/create.go", + "import": "openmeter/customer", + "message": "Product catalog domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/subscription/addon/addon.go", + "import": "pkg/models", + "message": "Subscription domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/subscription/addon/diff/apply_test.go", + "import": "openmeter/app", + "message": "Subscription domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/subscription/addon/http/create.go", + "import": "api", + "message": "Subscription domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Database migrations", + "file": "openmeter/subscription/testutils/db.go", + "import": "tools/migrate", + "message": "Subscription domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Meter domain", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/meter", + "message": "Subscription domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Registry & builder", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/registry", + "message": "Subscription domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/streaming/testutils", + "message": "Subscription domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Customer domain", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "openmeter/customer/adapter", + "message": "Entitlement domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "pkg/clock", + "message": "Entitlement domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Product catalog domain", + "file": "openmeter/entitlement/adapter/entitlement_test.go", + "import": "openmeter/productcatalog/adapter", + "message": "Entitlement domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "import": "openmeter/ingest/kafkaingest/serializer", + "message": "Entitlement domain imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Notification domain", + "file": "openmeter/entitlement/balanceworker/filters.go", + "import": "openmeter/notification", + "message": "Entitlement domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Registry & builder", + "file": "openmeter/entitlement/balanceworker/recalculate.go", + "import": "openmeter/registry", + "message": "Entitlement domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/entitlement/driver/entitlement.go", + "import": "api", + "message": "Entitlement domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Subscription domain", + "file": "openmeter/entitlement/hooks/subscription/hook.go", + "import": "openmeter/subscription", + "message": "Entitlement domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/credit/adapter/balance_snapshot.go", + "import": "pkg/clock", + "message": "Credit & grant domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/credit/balance/service.go", + "import": "openmeter/streaming", + "message": "Credit & grant domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Meter domain", + "file": "openmeter/credit/balance/service_test.go", + "import": "openmeter/meter", + "message": "Credit & grant domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/credit/driver/grant.go", + "import": "api", + "message": "Credit & grant domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Customer domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/customer", + "message": "Credit & grant domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Entitlement domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/entitlement/driver", + "message": "Credit & grant domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ledger/account.go", + "import": "pkg/models", + "message": "Ledger domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Database migrations", + "file": "openmeter/ledger/account/adapter/repo_test.go", + "import": "tools/migrate", + "message": "Ledger domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Billing domain", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Charges sub-system", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/ledger/collector", + "message": "Ledger domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Product catalog domain", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/productcatalog", + "message": "Ledger domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/app", + "message": "Ledger domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Meter domain", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/meter", + "message": "Ledger domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/streaming/testutils", + "message": "Ledger domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/meter/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Meter domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Product catalog domain", + "file": "openmeter/meter/adapter/manage.go", + "import": "openmeter/productcatalog/adapter", + "message": "Meter domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Customer domain", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/customer", + "message": "Meter domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/streaming", + "message": "Meter domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/meter/httphandler/mapping.go", + "import": "api", + "message": "Meter domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/streaming/clickhouse/connector.go", + "import": "pkg/models", + "message": "Streaming / usage query (ClickHouse) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Customer domain", + "file": "openmeter/streaming/clickhouse/event_query_test.go", + "import": "openmeter/customer", + "message": "Streaming / usage query (ClickHouse) imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ingest/httpdriver/errors.go", + "import": "pkg/framework/commonhttp", + "message": "Ingest & sink pipeline imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/ingest/httpdriver/ingest.go", + "import": "api", + "message": "Ingest & sink pipeline imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/notification/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Notification domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/notification/adapter/entitymapping_test.go", + "import": "api", + "message": "Notification domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Billing domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/billing", + "message": "Notification domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Entitlement domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/entitlement/snapshot", + "message": "Notification domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Customer domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/customer/httpdriver", + "message": "Notification domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Product catalog domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/productcatalog/driver", + "message": "Notification domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/app/adapter.go", + "import": "pkg/framework/entutils", + "message": "App / marketplace integrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Billing domain", + "file": "openmeter/app/custominvoicing/app.go", + "import": "openmeter/billing", + "message": "App / marketplace integrations imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "import": "api", + "message": "App / marketplace integrations imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Product catalog domain", + "file": "openmeter/app/stripe/appinvoice.go", + "import": "openmeter/productcatalog", + "message": "App / marketplace integrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Product catalog domain", + "file": "openmeter/ent/schema/addon.go", + "import": "openmeter/productcatalog", + "message": "Ent schema (DB source of truth) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/schema/addon.go", + "import": "pkg/framework/entutils", + "message": "Ent schema (DB source of truth) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/schema/app.go", + "import": "openmeter/app", + "message": "Ent schema (DB source of truth) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/schema/balance_snapshot.go", + "import": "openmeter/credit/balance", + "message": "Ent schema (DB source of truth) imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Billing domain", + "file": "openmeter/ent/schema/billing.go", + "import": "openmeter/billing", + "message": "Ent schema (DB source of truth) imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Charges sub-system", + "file": "openmeter/ent/schema/charges.go", + "import": "openmeter/billing/charges/meta", + "message": "Ent schema (DB source of truth) imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Entitlement domain", + "file": "openmeter/ent/schema/entitlement.go", + "import": "openmeter/entitlement", + "message": "Ent schema (DB source of truth) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Ledger domain", + "file": "openmeter/ent/schema/ledger_account.go", + "import": "openmeter/ledger", + "message": "Ent schema (DB source of truth) imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Meter domain", + "file": "openmeter/ent/schema/meter.go", + "import": "openmeter/meter", + "message": "Ent schema (DB source of truth) imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Notification domain", + "file": "openmeter/ent/schema/notification.go", + "import": "openmeter/notification", + "message": "Ent schema (DB source of truth) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Product catalog domain", + "file": "openmeter/ent/db/addon.go", + "import": "openmeter/productcatalog", + "message": "Generated Ent client imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/db/addon.go", + "import": "pkg/models", + "message": "Generated Ent client imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/db/app.go", + "import": "openmeter/app", + "message": "Generated Ent client imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/db/balancesnapshot.go", + "import": "openmeter/credit/balance", + "message": "Generated Ent client imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Billing domain", + "file": "openmeter/ent/db/billingcustomeroverride.go", + "import": "openmeter/billing", + "message": "Generated Ent client imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Charges sub-system", + "file": "openmeter/ent/db/charge.go", + "import": "openmeter/billing/charges/meta", + "message": "Generated Ent client imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Ledger domain", + "file": "openmeter/ent/db/ledgeraccount.go", + "import": "openmeter/ledger", + "message": "Generated Ent client imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Meter domain", + "file": "openmeter/ent/db/meter.go", + "import": "openmeter/meter", + "message": "Generated Ent client imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Notification domain", + "file": "openmeter/ent/db/mutation.go", + "import": "openmeter/notification", + "message": "Generated Ent client imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Customer domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/customer", + "message": "Registry & builder imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Generated Ent client", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/ent/db", + "message": "Registry & builder imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Meter domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/meter", + "message": "Registry & builder imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Product catalog domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/productcatalog/adapter", + "message": "Registry & builder imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/streaming", + "message": "Registry & builder imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "pkg/framework/lockr", + "message": "Registry & builder imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "App / marketplace integrations", + "file": "openmeter/server/router/appcustominvoicing.go", + "import": "openmeter/app/custominvoicing/httpdriver", + "message": "Legacy v1 HTTP router imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/server/router/appstripe.go", + "import": "pkg/models", + "message": "Legacy v1 HTTP router imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Credit & grant domain", + "file": "openmeter/server/router/credit.go", + "import": "openmeter/credit/driver", + "message": "Legacy v1 HTTP router imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "v3 API layer (AIP-style)", + "file": "openmeter/server/router/router.go", + "import": "api/v3/handlers/currencies", + "message": "Legacy v1 HTTP router imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Charges sub-system", + "file": "openmeter/server/router/router.go", + "import": "openmeter/billing/charges", + "message": "Legacy v1 HTTP router imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/server/router/router.go", + "import": "openmeter/ingest", + "message": "Legacy v1 HTTP router imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/server/router/router.go", + "import": "openmeter/streaming", + "message": "Legacy v1 HTTP router imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Subscription domain", + "file": "openmeter/server/router/router.go", + "import": "openmeter/subscription", + "message": "Legacy v1 HTTP router imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Generated API contract & v1 server interface", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "v3 API layer (AIP-style) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "v3 API layer (AIP-style) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Shared utility packages (pkg/)", + "file": "api/v3/apierrors/encoder.go", + "import": "pkg/framework/commonhttp", + "message": "v3 API layer (AIP-style) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "v3 API layer (AIP-style) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "v3 API layer (AIP-style) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "v3 API layer (AIP-style) imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "v3 API layer (AIP-style) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Shared utility packages (pkg/)", + "file": "api/api.gen.go", + "import": "pkg/models", + "message": "Generated API contract & v1 server interface imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Meter domain", + "file": "api/client/go/client_test.go", + "import": "openmeter/meter", + "message": "Generated API contract & v1 server interface imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "v3 API layer (AIP-style)", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "Generated API contract & v1 server interface imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "Generated API contract & v1 server interface imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "Generated API contract & v1 server interface imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Billing domain", + "file": "api/v3/handlers/billingprofiles/convert.gen.go", + "import": "openmeter/billing", + "message": "Generated API contract & v1 server interface imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Customer domain", + "file": "api/v3/handlers/customers/billing/convert.go", + "import": "openmeter/customer", + "message": "Generated API contract & v1 server interface imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Charges sub-system", + "file": "api/v3/handlers/customers/charges/convert.go", + "import": "openmeter/billing/charges", + "message": "Generated API contract & v1 server interface imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ledger domain", + "file": "api/v3/handlers/customers/credits/convert.go", + "import": "openmeter/ledger", + "message": "Generated API contract & v1 server interface imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "Generated API contract & v1 server interface imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "Generated API contract & v1 server interface imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "Generated API contract & v1 server interface imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Subscription domain", + "file": "api/v3/handlers/subscriptions/cancel.go", + "import": "openmeter/subscription", + "message": "Generated API contract & v1 server interface imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Collector (Benthos/Redpanda Connect)", + "to_component": "Generated API contract & v1 server interface", + "file": "collector/benthos/output/openmeter.go", + "import": "api/client/go", + "message": "Collector (Benthos/Redpanda Connect) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated API contract & v1 server interface", + "file": "pkg/errorsx/helpers.go", + "import": "api", + "message": "Shared utility packages (pkg/) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "v3 API layer (AIP-style)", + "file": "pkg/errorsx/helpers.go", + "import": "api/v3", + "message": "Shared utility packages (pkg/) imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated Ent client", + "file": "pkg/framework/entutils/entdriver/driver.go", + "import": "openmeter/ent/db", + "message": "Shared utility packages (pkg/) imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Product catalog domain", + "file": "tools/migrate/productcatalog_test.go", + "import": "openmeter/productcatalog", + "message": "Database migrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Shared utility packages (pkg/)", + "file": "tools/migrate/viewgen/viewgen.go", + "import": "pkg/strcase", + "message": "Database migrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + } + ], + "structural_outliers": [ + { + "type": "structural_outlier", + "folder": "api/client/go", + "message": "Uses [.go, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/javascript", + "message": "Uses [.json, .ts, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/python", + "message": "Uses [.in, .toml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "openmeter/billing", + "message": "Has 41 files \u2014 significantly more than sibling average (8). May be a god-folder that should be split.", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "pkg/models", + "message": "Has 28 files \u2014 significantly more than sibling average (4). May be a god-folder that should be split.", + "severity": "info" + } + ], + "antipattern_clusters": [], + "summary": { + "total_findings": 235, + "warnings": 230, + "informational": 5, + "checks_run": [ + "pattern_divergences", + "naming_violations", + "dependency_violations", + "structural_outliers", + "antipattern_clusters" + ], + "timestamp": "2026-06-05T14:59:32.415803+00:00" + } +} \ No newline at end of file diff --git a/.archie/drift_history/drift_20260605_171839.json b/.archie/drift_history/drift_20260605_171839.json new file mode 100644 index 0000000000..7afc015f4f --- /dev/null +++ b/.archie/drift_history/drift_20260605_171839.json @@ -0,0 +1,2962 @@ +{ + "pattern_divergences": [ + { + "type": "pattern_divergence", + "folder": "api/client", + "message": "Siblings under api/ mostly use [build orchestration lives in this makefile, not the children, format and lint before generate, pnpm workspace with patched, version-pinned typespec, two packages, two api generations] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "split by language, generated per language" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/spec", + "message": "Siblings under api/ mostly use [generation source is api/spec, not these folders, hand-edited only at the seams, split by language, generated per language] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "pnpm workspace with patched, version-pinned typespec", + "two packages, two api generations" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/adapter", + "message": "Siblings under openmeter/meterevent/ mostly use [api<->domain mapping isolated in mapping.go via apiconverter, handler interface + unexported struct + new constructor, httptransport.newhandlerwithargs three-stage handler, namespace resolved from context, never from request body, per-event validation errors flow to api.ingestedevent.validationerror, type aliases tie api types to handler signatures, v1 defaults applied in the decode function] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "missing-customer lookups are tolerated, not fatal", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/httphandler", + "message": "Siblings under openmeter/meterevent/ mostly use [constructor returns the domain service interface, cursor pagination only emits nextcursor on a full page, missing-customer lookups are tolerated, not fatal, shared eventpostprocess pipeline, translate domain params to streaming params, never query streaming directly with domain types, validate params at the top of every service method, validation errors are collected on the event, not returned] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/secret/adapter", + "message": "Siblings under openmeter/secret/ mostly use [package name differs from directory] but this folder does not", + "expected": [ + "package name differs from directory" + ], + "actual": [ + "compile-time interface assertion", + "id-equals-value plaintext encoding", + "no validation at adapter layer", + "stateless struct adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/models", + "message": "Siblings under openmeter/sink/ mostly use [background context with timeout for callbacks, constructor validates required deps then builds, graceful drain on shutdown, idempotent close via sync.oncefunc + atomic shutdown flag, interface-first flusheventhandler, onflushsuccess is non-blocking and never re-does the write, per-handler namespaced metrics] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "leaf type-only package", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/flushhandler", + "message": "Siblings under openmeter/sink/ mostly use [leaf type-only package, stringer on int8 enum with explicit iota constants, value-receiver derivation helper] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [detailed-line soft-delete + upsert by childuniquereferenceid, expand-gated edge loading, exported map*fromdb mappers, interface conformance asserts per file, timestamp normalization to utc, transaction-aware repo body, validate inputs before db work] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "input.validate() then transaction.run(s.adapter, ...)", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/adapter", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [config-validated new with composed sub-services, declarative state config via stateless library + meta.trigger* constants, input.validate() then transaction.run(s.adapter, ...), invoice mutations emitted as deferred invoiceupdater.patch, not direct writes, lineengine bridges billing invoice lifecycle into state-machine triggers, realization-run lifecycle delegated to s.runs / s.rater, settlement-mode dispatch to a state machine] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "interface conformance asserts per file", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/customer", + "message": "Siblings under openmeter/subscription/validators/ mostly use [config struct with validate() and constructor guard, feature-flag-driven uniqueness mode, paginated full collection of candidate subscriptions, sub -> view -> spec pipeline of small step functions, subscriptioncommandhook via noopsubscriptioncommandhook embedding, two-phase before validation (existing-set then candidate-included)] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "active-subscription check via list + activeat=clock.now()", + "constructor validates required dependencies", + "delegate to input.validate() first", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "typed precondition/not-found errors for customer state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/subscription", + "message": "Siblings under openmeter/subscription/validators/ mostly use [active-subscription check via list + activeat=clock.now(), constructor validates required dependencies, delegate to input.validate() first, implements customer.requestvalidator via nooprequestvalidator embedding, typed precondition/not-found errors for customer state] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "config struct with validate() and constructor guard", + "feature-flag-driven uniqueness mode", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/noop", + "message": "Siblings under openmeter/watermill/driver/ mostly use [centralized sarama config via createkafkaconfig(role), cloudevent subject becomes kafka partition key, injected dependencies, no global fallbacks, metric name transform via saramametricrenamer(role), options struct with validate() then constructor, sarama global logger redirected to slog adaptor, topic provisioning before publisher returns] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "compile-time interface assertion", + "value-receiver no-op methods returning nil" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/kafka", + "message": "Siblings under openmeter/watermill/driver/ mostly use [compile-time interface assertion, value-receiver no-op methods returning nil] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/internal", + "message": "Siblings under pkg/kafka/metrics/ mostly use [nested collections keyed by string, string enums with unmarshaljson + int64 projection, struct fields map librdkafka json keys via json tags, windowstats for rolling percentile windows] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/stats", + "message": "Siblings under pkg/kafka/metrics/ mostly use [add is nil-safe and attribute-additive, enum stats recorded via .int64(), extended-metrics gating via `extended bool`, gauge creation always wraps errors with the metric name, internal partitions are skipped, struct-of-gauges + new + add pair, window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "windowstats for rolling percentile windows" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/custominvoicing", + "message": "Siblings under test/app/ mostly use [assert via typed error predicates, fixture builds app + customer + customer-data, invoice sync asserts stripe line items by description/amount/metadata, ledger-backed charges wired in setupsuite, set expectations with on(...).return(...) then restore(), stripe clients are testify mocks injected via factory, two test harness styles coexist] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "shared profile setup helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/stripe", + "message": "Siblings under test/app/ mostly use [builder results for sync inputs, drive invoice lifecycle through service calls, embed billingtest.basesuite, meter/streaming teardown via defer, per-test unique namespace string, shared profile setup helper] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "assert via typed error predicates", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "set expectations with on(...).return(...) then restore()", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/viewgen", + "message": "Siblings under tools/migrate/ mostly use [generators backstop atlas gaps, thin main, logic in package] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "deterministic output via name sort", + "generated-file header marker", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/cmd", + "message": "Siblings under tools/migrate/ mostly use [deterministic output via name sort, generated-file header marker, load ent schema by path, not by importing generated code, only emit views, skip non-view schemas, view name fallback chain, view query precedence: viewfor[dialect] then viewas] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "generators backstop atlas gaps", + "thin main, logic in package" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/service", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [expands gate eager-loading, map* functions for db<->domain conversion, namespace-scoped queries always, register/deregister charge ids with the meta adapter, soft-delete + upsert for detailed lines, transaction-aware via entutils.transactingrepo, validate inputs before persisting] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "charge mutation always under the charge lock", + "lineengine drives the machine, never persists lines directly", + "mutate charge in-memory; the machine persists on stabilization", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "round through the currency calculator before compare/persist", + "states declared via fluent configure/permit/onactive dsl" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/adapter", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [charge mutation always under the charge lock, lineengine drives the machine, never persists lines directly, mutate charge in-memory; the machine persists on stabilization, one state machine type per settlement mode, public methods are transaction.run wrappers over the adapter, round through the currency calculator before compare/persist, states declared via fluent configure/permit/onactive dsl] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "expands gate eager-loading", + "map* functions for db<->domain conversion", + "namespace-scoped queries always", + "register/deregister charge ids with the meta adapter", + "soft-delete + upsert for detailed lines", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/rating", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credit reconciliation as signed-delta switch, currencycalculator.roundtoprecision before decimal compares, decisions delegated to handler, persistence to adapter, input struct + validate() per public method, lineage created/persisted alongside every credit realization, nofiattransactionrequired short-circuits fiat paths, service struct with validated config + new] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credits mutator always disabled for gross rating", + "engine dispatch on charge.state.ratingengine", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "voided realizations excluded from billable history" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/run", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credits mutator always disabled for gross rating, engine dispatch on charge.state.ratingengine, input struct with validate() before any work, lazy prior detailed-line expansion with overcharge guard, quantity snapshot via streaming with stored-at cutoff, service interface + private struct + config-validated new, voided realizations excluded from billable history] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credit reconciliation as signed-delta switch", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "input struct + validate() per public method", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "service struct with validated config + new" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/backfillaccounts", + "message": "Siblings under cmd/jobs/ledger/ mostly use [config-validated service constructor, counter accumulation + recordfailure, cursor pagination with max_safe_iter guard, dryrun short-circuits writes, interface-typed collaborators, missing-account detection via validationissue codes, validate + normalize input structs] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/service", + "message": "Siblings under cmd/jobs/ledger/ mostly use [cobra command + rune delegation, concrete resolver stack construction (bypass wired di), rfc3339 flag parsing to utc pointer, shared job runtime via internal.app] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "validate + normalize input structs" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/framework/entutils/testutils/ent2", + "message": "Siblings under pkg/framework/entutils/testutils/ mostly use [extension wiring stays in entc.go] but this folder does not", + "expected": [ + "extension wiring stays in entc.go", + "generate directive in package file", + "ignored-build codegen driver" + ], + "actual": [ + "generate directive in package file", + "ignored-build codegen driver" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/resources", + "message": "Siblings under collector/quickstart/collector/ mostly use [content-type switch for cloudevents formats, durable sqlite buffer before delivery, env-driven output config, rfc7807 error responses via mapping + sync_response, schema validation with catch, two streams bridged by inproc channel] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "label is the cross-file contract", + "resources declared, not inlined" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/streams", + "message": "Siblings under collector/quickstart/collector/ mostly use [label is the cross-file contract, resources declared, not inlined] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/decisions", + "message": "Siblings under docs/ mostly use [before/after code diffs plus copy-paste sql, date-prefixed filenames, repo-relative source links to ground claims, version range header for upgrade-path guides] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "sequential numbered adr filenames" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/migration-guides", + "message": "Siblings under docs/ mostly use [fixed madr-style section structure, outcome stated as bullet list of concrete choices, sequential numbered adr filenames] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "repo-relative source links to ground claims", + "version range header for upgrade-path guides" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/adapter", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [append-only segment consumption: close + create remainder, config{adapter lineage.adapter} + new returns lineage.service, coverage shortfall is a hard error, deterministic ordering via lineage helpers, multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...), timestamps truncated to microsecond from clock.now(), validate input at the top of every mutating method] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "bulk creates for initial lineages", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "package-level helper rebuilds adapter from raw *entdb.client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/service", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [active-segment queries filter closedatisnil + order bycreatedat, bulk creates for initial lineages, ent rows mapped to domain via maplineage / mapsegment, every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue, implements lineage.adapter + entutils.txcreator, lock methods assert in-transaction then use forupdate(), package-level helper rebuilds adapter from raw *entdb.client] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "append-only segment consumption: close + create remainder", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/advance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config.validate() + new constructor, return error for consumer-level retry, single-event handle delegating to service] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config + validating constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/asyncadvance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config + validating constructor, context-aware structured logging, paginate via pagination.collectall, per-customer error isolation] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config.validate() + new constructor", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/customer", + "message": "Siblings under openmeter/billing/validators/ mostly use [capability-based customer validation, skip validation when no billable items, subscriptioncommandhook via noop embedding, wrap validation failures as conflict errors] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "aggregate validation errors with errors.join", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "sync-then-check invoice state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/subscription", + "message": "Siblings under openmeter/billing/validators/ mostly use [aggregate validation errors with errors.join, constructor nil-checks injected services, invoice type discrimination via as* accessors, requestvalidator via noop embedding, sync-then-check invoice state] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "capability-based customer validation", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "wrap validation failures as conflict errors" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/adapter", + "message": "Siblings under openmeter/cost/ mostly use [config-validated constructor returning (*service, error), validate input then delegate to adapter] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "adapter struct with constructor new and interface assertion", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/service", + "message": "Siblings under openmeter/cost/ mostly use [adapter struct with constructor new and interface assertion, defensive copy of caller slices/maps before mutation, feature filters take precedence over caller filters, internal group-by keys added for resolution, then aggregated away, not-found pricing is a non-fatal detail, not an error, pre-resolve llm prices into a cache keyed by (provider, model), resolve dimensions from static value or group-by property] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "config-validated constructor returning (*service, error)", + "validate input then delegate to adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/adapter", + "message": "Siblings under openmeter/currencies/ mostly use [fiat sourced from gobl currency.definitions, fiat/custom merge with in-memory pagination, service satisfies currencies.currencyservice, service-owned business rules, sort honors orderby/order, validate-then-run guard] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "transaction-aware via entutils.transactingrepo" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/service", + "message": "Siblings under openmeter/currencies/ mostly use [adapter satisfies currencies.adapter, constraint errors map to conflict, constructor validates config, db->domain mapping helpers, namespace-scoped queries, pkg/filter + pagination helpers, transaction-aware via entutils.transactingrepo] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "validate-then-run guard" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/memorydedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [batch ops use pipelined / mget and tolerate redis.nil, hash keys via getkeyhash (xxh3-128 + base64 rawurl), migration mode double-checks the old raw key, mode switch on every key operation, set nx with ttl as the uniqueness primitive, validate mode and guard nil client] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/redisdedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [cache stores nil values, keys carry all signal, constructor clamps invalid size to defaultsize, implement full dedupe.deduplicator interface, isunique mutates as it checks, key derived only via dedupe.item.key()] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/schema", + "message": "Siblings under openmeter/ent/ mostly use [ent-backed transaction.creator, hijacktx + newtxdriver wrapping] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "entutils mixins for identity/namespace/time", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/tx", + "message": "Siblings under openmeter/ent/ mostly use [decimals via alpacadecimal numeric, edge ownership via from/ref + field, entutils mixins for identity/namespace/time, json columns via valuescanner + jsonb, soft-delete-aware partial unique indexes, standard ent.schema quartet, ulid fk columns as char(26)] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "ent-backed transaction.creator", + "hijacktx + newtxdriver wrapping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/events", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [backend-abstracted cache, config struct with validate constructor guard, filter interface hierarchy, ttl'd rule cache keyed by namespace, validate request before scoping] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "error-collecting validate()", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "versioned eventtype triple" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/filters", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [error-collecting validate(), marshaler.event compile-time assertion, string enum with values()+validate(), subject path via metadata.composeresourcepath, versioned eventtype triple] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "filter interface hierarchy", + "ttl'd rule cache keyed by namespace", + "validate request before scoping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/metadata", + "message": "Siblings under openmeter/event/ mostly use [json-stable field tags, validatable value type] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "entity-segment constants", + "eventtype identity triple", + "resource paths via compose helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/models", + "message": "Siblings under openmeter/event/ mostly use [entity-segment constants, eventtype identity triple, resource paths via compose helpers] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "json-stable field tags", + "validatable value type" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/serializer", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [compile-time interface assertion, resolver interface, template-driven topic naming, validating constructor returning pointer + error] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "serializer interface contract", + "symmetric encode/decode helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/topicresolver", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [dedupe-derived kafka key, flat cloudeventskafkapayload struct, optional-data guard, serializer interface contract, symmetric encode/decode helpers] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "compile-time interface assertion", + "resolver interface", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/adapter", + "message": "Siblings under openmeter/ledger/account/ mostly use [data-to-domain mapping, deterministic lock ordering, nil-locker tolerance, self-wired live services, transaction.run for multi-step writes, validate-then-delegate] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "route normalization before persistence/query", + "transactingrepo wrapping", + "txuser implementation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/service", + "message": "Siblings under openmeter/ledger/account/ mostly use [eager-load required edges then validate, idempotent ensure via onconflict resolvewithignore, map* projector functions, route normalization before persistence/query, transactingrepo wrapping, txuser implementation] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "data-to-domain mapping", + "deterministic lock ordering", + "nil-locker tolerance", + "self-wired live services", + "transaction.run for multi-step writes", + "validate-then-delegate" + ], + "severity": "warn" + } + ], + "naming_violations": [], + "dependency_violations": [ + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Server entrypoint & DI bootstrap imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/server/main.go", + "import": "pkg/errorsx", + "message": "Server entrypoint & DI bootstrap imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Billing domain", + "file": "cmd/server/wire.go", + "import": "openmeter/billing/creditgrant", + "message": "Server entrypoint & DI bootstrap imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Customer domain", + "file": "cmd/server/wire.go", + "import": "openmeter/customer", + "message": "Server entrypoint & DI bootstrap imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Generated Ent client", + "file": "cmd/server/wire.go", + "import": "openmeter/ent/db", + "message": "Server entrypoint & DI bootstrap imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ledger domain", + "file": "cmd/server/wire.go", + "import": "openmeter/ledger", + "message": "Server entrypoint & DI bootstrap imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Meter domain", + "file": "cmd/server/wire.go", + "import": "openmeter/meter", + "message": "Server entrypoint & DI bootstrap imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Notification domain", + "file": "cmd/server/wire.go", + "import": "openmeter/notification", + "message": "Server entrypoint & DI bootstrap imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Product catalog domain", + "file": "cmd/server/wire.go", + "import": "openmeter/productcatalog/addon", + "message": "Server entrypoint & DI bootstrap imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Registry & builder", + "file": "cmd/server/wire.go", + "import": "openmeter/registry", + "message": "Server entrypoint & DI bootstrap imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/server/wire.go", + "import": "openmeter/streaming", + "message": "Server entrypoint & DI bootstrap imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/balance-worker/main.go", + "import": "pkg/log", + "message": "Worker & job entrypoints imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ledger domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/ledger", + "message": "Worker & job entrypoints imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Meter domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/meter", + "message": "Worker & job entrypoints imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/streaming", + "message": "Worker & job entrypoints imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Product catalog domain", + "file": "cmd/billing-worker/wire_gen.go", + "import": "openmeter/productcatalog/featureresolver", + "message": "Worker & job entrypoints imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Billing domain", + "file": "cmd/jobs/billing/advance/advance.go", + "import": "openmeter/billing", + "message": "Worker & job entrypoints imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Customer domain", + "file": "cmd/jobs/billing/advancecharges/advancecharges.go", + "import": "openmeter/customer", + "message": "Worker & job entrypoints imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Entitlement domain", + "file": "cmd/jobs/entitlement/recalculatesnapshots.go", + "import": "openmeter/entitlement/balanceworker", + "message": "Worker & job entrypoints imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "App / marketplace integrations", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/app", + "message": "Worker & job entrypoints imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Charges sub-system", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/billing/charges/worker/advance", + "message": "Worker & job entrypoints imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Generated Ent client", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/ent/db", + "message": "Worker & job entrypoints imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Notification domain", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/notification", + "message": "Worker & job entrypoints imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Registry & builder", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/registry", + "message": "Worker & job entrypoints imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Worker & job entrypoints imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Legacy v1 HTTP router", + "file": "cmd/server/main.go", + "import": "openmeter/server/router", + "message": "Worker & job entrypoints imports from Legacy v1 HTTP router but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "App / marketplace integrations", + "file": "app/common/app.go", + "import": "openmeter/app", + "message": "Application wiring (app/common) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Product catalog domain", + "file": "app/common/billing.go", + "import": "openmeter/productcatalog/feature", + "message": "Application wiring (app/common) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Shared utility packages (pkg/)", + "file": "app/common/billing.go", + "import": "pkg/featuregate", + "message": "Application wiring (app/common) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "app/common/charges.go", + "import": "openmeter/ledger/collector", + "message": "Application wiring (app/common) imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Registry & builder", + "file": "app/common/customer.go", + "import": "openmeter/registry", + "message": "Application wiring (app/common) imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Database migrations", + "file": "app/common/database.go", + "import": "tools/migrate", + "message": "Application wiring (app/common) imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Entitlement domain", + "file": "app/common/entitlement.go", + "import": "openmeter/entitlement/validators/customer", + "message": "Application wiring (app/common) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Generated API contract & v1 server interface", + "file": "app/common/ffx.go", + "import": "api", + "message": "Application wiring (app/common) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Subscription domain", + "file": "app/common/ffx.go", + "import": "openmeter/subscription", + "message": "Application wiring (app/common) imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Ingest & sink pipeline", + "file": "app/common/kafka.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Application wiring (app/common) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Notification domain", + "file": "app/common/notification.go", + "import": "openmeter/notification", + "message": "Application wiring (app/common) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/adapter.go", + "import": "pkg/framework/entutils", + "message": "Billing domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Product catalog domain", + "file": "openmeter/billing/adapter/customeroverride.go", + "import": "openmeter/productcatalog", + "message": "Billing domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/billing/adapter/gatheringinvoice.go", + "import": "api", + "message": "Billing domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Charges sub-system", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/billing/charges/meta", + "message": "Billing domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Billing domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Ledger domain", + "file": "openmeter/billing/charges/service/base_test.go", + "import": "openmeter/ledger/recognizer", + "message": "Billing domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Subscription domain", + "file": "openmeter/billing/validators/customer/customer.go", + "import": "openmeter/subscription", + "message": "Billing domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "import": "openmeter/ledger/collector", + "message": "Billing domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Entitlement domain", + "file": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "import": "openmeter/entitlement", + "message": "Billing domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Customer domain", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/customer", + "message": "Charges sub-system imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/charges/adapter.go", + "import": "pkg/framework/entutils", + "message": "Charges sub-system imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Product catalog domain", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "openmeter/productcatalog", + "message": "Charges sub-system imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Charges sub-system imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "import": "openmeter/streaming", + "message": "Charges sub-system imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "App / marketplace integrations", + "file": "openmeter/billing/charges/service/creditpurchase_test.go", + "import": "openmeter/app/custominvoicing", + "message": "Charges sub-system imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Meter domain", + "file": "openmeter/billing/charges/service/featureid_test.go", + "import": "openmeter/meter", + "message": "Charges sub-system imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/customer/adapter.go", + "import": "openmeter/streaming", + "message": "Customer domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/customer/adapter.go", + "import": "pkg/framework/entutils", + "message": "Customer domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/customer/adapter/customer_test.go", + "import": "openmeter/app", + "message": "Customer domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "api", + "message": "Customer domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Entitlement domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/entitlement", + "message": "Customer domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Product catalog domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/productcatalog/subscription/http", + "message": "Customer domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Subscription domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/subscription", + "message": "Customer domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Billing domain", + "file": "openmeter/customer/service/hooks/subjectcustomer.go", + "import": "openmeter/billing", + "message": "Customer domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Meter domain", + "file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "import": "openmeter/meter/mockadapter", + "message": "Customer domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Ledger domain", + "file": "openmeter/customer/service/ledger_hook_test.go", + "import": "openmeter/ledger", + "message": "Customer domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Subscription domain", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "openmeter/subscription/repo", + "message": "Product catalog domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "pkg/clock", + "message": "Product catalog domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "api", + "message": "Product catalog domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Notification domain", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "openmeter/notification", + "message": "Product catalog domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/productcatalog/addon/service/service_test.go", + "import": "openmeter/app", + "message": "Product catalog domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Entitlement domain", + "file": "openmeter/productcatalog/entitlement.go", + "import": "openmeter/entitlement", + "message": "Product catalog domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Customer domain", + "file": "openmeter/productcatalog/subscription/http/create.go", + "import": "openmeter/customer", + "message": "Product catalog domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/subscription/addon/addon.go", + "import": "pkg/models", + "message": "Subscription domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/subscription/addon/diff/apply_test.go", + "import": "openmeter/app", + "message": "Subscription domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/subscription/addon/http/create.go", + "import": "api", + "message": "Subscription domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Database migrations", + "file": "openmeter/subscription/testutils/db.go", + "import": "tools/migrate", + "message": "Subscription domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Meter domain", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/meter", + "message": "Subscription domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Registry & builder", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/registry", + "message": "Subscription domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/streaming/testutils", + "message": "Subscription domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Customer domain", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "openmeter/customer/adapter", + "message": "Entitlement domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "pkg/clock", + "message": "Entitlement domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Product catalog domain", + "file": "openmeter/entitlement/adapter/entitlement_test.go", + "import": "openmeter/productcatalog/adapter", + "message": "Entitlement domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "import": "openmeter/ingest/kafkaingest/serializer", + "message": "Entitlement domain imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Notification domain", + "file": "openmeter/entitlement/balanceworker/filters.go", + "import": "openmeter/notification", + "message": "Entitlement domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Registry & builder", + "file": "openmeter/entitlement/balanceworker/recalculate.go", + "import": "openmeter/registry", + "message": "Entitlement domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/entitlement/driver/entitlement.go", + "import": "api", + "message": "Entitlement domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Subscription domain", + "file": "openmeter/entitlement/hooks/subscription/hook.go", + "import": "openmeter/subscription", + "message": "Entitlement domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/credit/adapter/balance_snapshot.go", + "import": "pkg/clock", + "message": "Credit & grant domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/credit/balance/service.go", + "import": "openmeter/streaming", + "message": "Credit & grant domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Meter domain", + "file": "openmeter/credit/balance/service_test.go", + "import": "openmeter/meter", + "message": "Credit & grant domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/credit/driver/grant.go", + "import": "api", + "message": "Credit & grant domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Customer domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/customer", + "message": "Credit & grant domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Entitlement domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/entitlement/driver", + "message": "Credit & grant domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ledger/account.go", + "import": "pkg/models", + "message": "Ledger domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Database migrations", + "file": "openmeter/ledger/account/adapter/repo_test.go", + "import": "tools/migrate", + "message": "Ledger domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Billing domain", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Charges sub-system", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/ledger/collector", + "message": "Ledger domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Product catalog domain", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/productcatalog", + "message": "Ledger domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/app", + "message": "Ledger domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Meter domain", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/meter", + "message": "Ledger domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/streaming/testutils", + "message": "Ledger domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/meter/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Meter domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Product catalog domain", + "file": "openmeter/meter/adapter/manage.go", + "import": "openmeter/productcatalog/adapter", + "message": "Meter domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Customer domain", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/customer", + "message": "Meter domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/streaming", + "message": "Meter domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/meter/httphandler/mapping.go", + "import": "api", + "message": "Meter domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/streaming/clickhouse/connector.go", + "import": "pkg/models", + "message": "Streaming / usage query (ClickHouse) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Customer domain", + "file": "openmeter/streaming/clickhouse/event_query_test.go", + "import": "openmeter/customer", + "message": "Streaming / usage query (ClickHouse) imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ingest/httpdriver/errors.go", + "import": "pkg/framework/commonhttp", + "message": "Ingest & sink pipeline imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/ingest/httpdriver/ingest.go", + "import": "api", + "message": "Ingest & sink pipeline imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/notification/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Notification domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/notification/adapter/entitymapping_test.go", + "import": "api", + "message": "Notification domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Billing domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/billing", + "message": "Notification domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Entitlement domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/entitlement/snapshot", + "message": "Notification domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Customer domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/customer/httpdriver", + "message": "Notification domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Product catalog domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/productcatalog/driver", + "message": "Notification domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/app/adapter.go", + "import": "pkg/framework/entutils", + "message": "App / marketplace integrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Billing domain", + "file": "openmeter/app/custominvoicing/app.go", + "import": "openmeter/billing", + "message": "App / marketplace integrations imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "import": "api", + "message": "App / marketplace integrations imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Product catalog domain", + "file": "openmeter/app/stripe/appinvoice.go", + "import": "openmeter/productcatalog", + "message": "App / marketplace integrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Product catalog domain", + "file": "openmeter/ent/schema/addon.go", + "import": "openmeter/productcatalog", + "message": "Ent schema (DB source of truth) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/schema/addon.go", + "import": "pkg/framework/entutils", + "message": "Ent schema (DB source of truth) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/schema/app.go", + "import": "openmeter/app", + "message": "Ent schema (DB source of truth) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/schema/balance_snapshot.go", + "import": "openmeter/credit/balance", + "message": "Ent schema (DB source of truth) imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Billing domain", + "file": "openmeter/ent/schema/billing.go", + "import": "openmeter/billing", + "message": "Ent schema (DB source of truth) imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Charges sub-system", + "file": "openmeter/ent/schema/charges.go", + "import": "openmeter/billing/charges/meta", + "message": "Ent schema (DB source of truth) imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Entitlement domain", + "file": "openmeter/ent/schema/entitlement.go", + "import": "openmeter/entitlement", + "message": "Ent schema (DB source of truth) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Ledger domain", + "file": "openmeter/ent/schema/ledger_account.go", + "import": "openmeter/ledger", + "message": "Ent schema (DB source of truth) imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Meter domain", + "file": "openmeter/ent/schema/meter.go", + "import": "openmeter/meter", + "message": "Ent schema (DB source of truth) imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Notification domain", + "file": "openmeter/ent/schema/notification.go", + "import": "openmeter/notification", + "message": "Ent schema (DB source of truth) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Product catalog domain", + "file": "openmeter/ent/db/addon.go", + "import": "openmeter/productcatalog", + "message": "Generated Ent client imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/db/addon.go", + "import": "pkg/models", + "message": "Generated Ent client imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/db/app.go", + "import": "openmeter/app", + "message": "Generated Ent client imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/db/balancesnapshot.go", + "import": "openmeter/credit/balance", + "message": "Generated Ent client imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Billing domain", + "file": "openmeter/ent/db/billingcustomeroverride.go", + "import": "openmeter/billing", + "message": "Generated Ent client imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Charges sub-system", + "file": "openmeter/ent/db/charge.go", + "import": "openmeter/billing/charges/meta", + "message": "Generated Ent client imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Ledger domain", + "file": "openmeter/ent/db/ledgeraccount.go", + "import": "openmeter/ledger", + "message": "Generated Ent client imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Meter domain", + "file": "openmeter/ent/db/meter.go", + "import": "openmeter/meter", + "message": "Generated Ent client imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Notification domain", + "file": "openmeter/ent/db/mutation.go", + "import": "openmeter/notification", + "message": "Generated Ent client imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Customer domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/customer", + "message": "Registry & builder imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Generated Ent client", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/ent/db", + "message": "Registry & builder imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Meter domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/meter", + "message": "Registry & builder imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Product catalog domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/productcatalog/adapter", + "message": "Registry & builder imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/streaming", + "message": "Registry & builder imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "pkg/framework/lockr", + "message": "Registry & builder imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "App / marketplace integrations", + "file": "openmeter/server/router/appcustominvoicing.go", + "import": "openmeter/app/custominvoicing/httpdriver", + "message": "Legacy v1 HTTP router imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/server/router/appstripe.go", + "import": "pkg/models", + "message": "Legacy v1 HTTP router imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Credit & grant domain", + "file": "openmeter/server/router/credit.go", + "import": "openmeter/credit/driver", + "message": "Legacy v1 HTTP router imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "v3 API layer (AIP-style)", + "file": "openmeter/server/router/router.go", + "import": "api/v3/handlers/currencies", + "message": "Legacy v1 HTTP router imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Charges sub-system", + "file": "openmeter/server/router/router.go", + "import": "openmeter/billing/charges", + "message": "Legacy v1 HTTP router imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/server/router/router.go", + "import": "openmeter/ingest", + "message": "Legacy v1 HTTP router imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/server/router/router.go", + "import": "openmeter/streaming", + "message": "Legacy v1 HTTP router imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Subscription domain", + "file": "openmeter/server/router/router.go", + "import": "openmeter/subscription", + "message": "Legacy v1 HTTP router imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Generated API contract & v1 server interface", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "v3 API layer (AIP-style) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "v3 API layer (AIP-style) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Shared utility packages (pkg/)", + "file": "api/v3/apierrors/encoder.go", + "import": "pkg/framework/commonhttp", + "message": "v3 API layer (AIP-style) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "v3 API layer (AIP-style) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "v3 API layer (AIP-style) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "v3 API layer (AIP-style) imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "v3 API layer (AIP-style) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Shared utility packages (pkg/)", + "file": "api/api.gen.go", + "import": "pkg/models", + "message": "Generated API contract & v1 server interface imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Meter domain", + "file": "api/client/go/client_test.go", + "import": "openmeter/meter", + "message": "Generated API contract & v1 server interface imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "v3 API layer (AIP-style)", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "Generated API contract & v1 server interface imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "Generated API contract & v1 server interface imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "Generated API contract & v1 server interface imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Billing domain", + "file": "api/v3/handlers/billingprofiles/convert.gen.go", + "import": "openmeter/billing", + "message": "Generated API contract & v1 server interface imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Customer domain", + "file": "api/v3/handlers/customers/billing/convert.go", + "import": "openmeter/customer", + "message": "Generated API contract & v1 server interface imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Charges sub-system", + "file": "api/v3/handlers/customers/charges/convert.go", + "import": "openmeter/billing/charges", + "message": "Generated API contract & v1 server interface imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ledger domain", + "file": "api/v3/handlers/customers/credits/convert.go", + "import": "openmeter/ledger", + "message": "Generated API contract & v1 server interface imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "Generated API contract & v1 server interface imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "Generated API contract & v1 server interface imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "Generated API contract & v1 server interface imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Subscription domain", + "file": "api/v3/handlers/subscriptions/cancel.go", + "import": "openmeter/subscription", + "message": "Generated API contract & v1 server interface imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Collector (Benthos/Redpanda Connect)", + "to_component": "Generated API contract & v1 server interface", + "file": "collector/benthos/output/openmeter.go", + "import": "api/client/go", + "message": "Collector (Benthos/Redpanda Connect) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated API contract & v1 server interface", + "file": "pkg/errorsx/helpers.go", + "import": "api", + "message": "Shared utility packages (pkg/) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "v3 API layer (AIP-style)", + "file": "pkg/errorsx/helpers.go", + "import": "api/v3", + "message": "Shared utility packages (pkg/) imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated Ent client", + "file": "pkg/framework/entutils/entdriver/driver.go", + "import": "openmeter/ent/db", + "message": "Shared utility packages (pkg/) imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Product catalog domain", + "file": "tools/migrate/productcatalog_test.go", + "import": "openmeter/productcatalog", + "message": "Database migrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Shared utility packages (pkg/)", + "file": "tools/migrate/viewgen/viewgen.go", + "import": "pkg/strcase", + "message": "Database migrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + } + ], + "structural_outliers": [ + { + "type": "structural_outlier", + "folder": "api/client/go", + "message": "Uses [.go, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/javascript", + "message": "Uses [.json, .ts, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/python", + "message": "Uses [.in, .toml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "openmeter/billing", + "message": "Has 41 files \u2014 significantly more than sibling average (8). May be a god-folder that should be split.", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "pkg/models", + "message": "Has 28 files \u2014 significantly more than sibling average (4). May be a god-folder that should be split.", + "severity": "info" + } + ], + "antipattern_clusters": [], + "summary": { + "total_findings": 235, + "warnings": 230, + "informational": 5, + "checks_run": [ + "pattern_divergences", + "naming_violations", + "dependency_violations", + "structural_outliers", + "antipattern_clusters" + ], + "timestamp": "2026-06-05T17:18:39.481531+00:00" + } +} \ No newline at end of file diff --git a/.archie/drift_history/latest.json b/.archie/drift_history/latest.json new file mode 100644 index 0000000000..7afc015f4f --- /dev/null +++ b/.archie/drift_history/latest.json @@ -0,0 +1,2962 @@ +{ + "pattern_divergences": [ + { + "type": "pattern_divergence", + "folder": "api/client", + "message": "Siblings under api/ mostly use [build orchestration lives in this makefile, not the children, format and lint before generate, pnpm workspace with patched, version-pinned typespec, two packages, two api generations] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "split by language, generated per language" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/spec", + "message": "Siblings under api/ mostly use [generation source is api/spec, not these folders, hand-edited only at the seams, split by language, generated per language] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "pnpm workspace with patched, version-pinned typespec", + "two packages, two api generations" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/adapter", + "message": "Siblings under openmeter/meterevent/ mostly use [api<->domain mapping isolated in mapping.go via apiconverter, handler interface + unexported struct + new constructor, httptransport.newhandlerwithargs three-stage handler, namespace resolved from context, never from request body, per-event validation errors flow to api.ingestedevent.validationerror, type aliases tie api types to handler signatures, v1 defaults applied in the decode function] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "missing-customer lookups are tolerated, not fatal", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/httphandler", + "message": "Siblings under openmeter/meterevent/ mostly use [constructor returns the domain service interface, cursor pagination only emits nextcursor on a full page, missing-customer lookups are tolerated, not fatal, shared eventpostprocess pipeline, translate domain params to streaming params, never query streaming directly with domain types, validate params at the top of every service method, validation errors are collected on the event, not returned] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/secret/adapter", + "message": "Siblings under openmeter/secret/ mostly use [package name differs from directory] but this folder does not", + "expected": [ + "package name differs from directory" + ], + "actual": [ + "compile-time interface assertion", + "id-equals-value plaintext encoding", + "no validation at adapter layer", + "stateless struct adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/models", + "message": "Siblings under openmeter/sink/ mostly use [background context with timeout for callbacks, constructor validates required deps then builds, graceful drain on shutdown, idempotent close via sync.oncefunc + atomic shutdown flag, interface-first flusheventhandler, onflushsuccess is non-blocking and never re-does the write, per-handler namespaced metrics] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "leaf type-only package", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/flushhandler", + "message": "Siblings under openmeter/sink/ mostly use [leaf type-only package, stringer on int8 enum with explicit iota constants, value-receiver derivation helper] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [detailed-line soft-delete + upsert by childuniquereferenceid, expand-gated edge loading, exported map*fromdb mappers, interface conformance asserts per file, timestamp normalization to utc, transaction-aware repo body, validate inputs before db work] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "input.validate() then transaction.run(s.adapter, ...)", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/adapter", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [config-validated new with composed sub-services, declarative state config via stateless library + meta.trigger* constants, input.validate() then transaction.run(s.adapter, ...), invoice mutations emitted as deferred invoiceupdater.patch, not direct writes, lineengine bridges billing invoice lifecycle into state-machine triggers, realization-run lifecycle delegated to s.runs / s.rater, settlement-mode dispatch to a state machine] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "interface conformance asserts per file", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/customer", + "message": "Siblings under openmeter/subscription/validators/ mostly use [config struct with validate() and constructor guard, feature-flag-driven uniqueness mode, paginated full collection of candidate subscriptions, sub -> view -> spec pipeline of small step functions, subscriptioncommandhook via noopsubscriptioncommandhook embedding, two-phase before validation (existing-set then candidate-included)] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "active-subscription check via list + activeat=clock.now()", + "constructor validates required dependencies", + "delegate to input.validate() first", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "typed precondition/not-found errors for customer state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/subscription", + "message": "Siblings under openmeter/subscription/validators/ mostly use [active-subscription check via list + activeat=clock.now(), constructor validates required dependencies, delegate to input.validate() first, implements customer.requestvalidator via nooprequestvalidator embedding, typed precondition/not-found errors for customer state] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "config struct with validate() and constructor guard", + "feature-flag-driven uniqueness mode", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/noop", + "message": "Siblings under openmeter/watermill/driver/ mostly use [centralized sarama config via createkafkaconfig(role), cloudevent subject becomes kafka partition key, injected dependencies, no global fallbacks, metric name transform via saramametricrenamer(role), options struct with validate() then constructor, sarama global logger redirected to slog adaptor, topic provisioning before publisher returns] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "compile-time interface assertion", + "value-receiver no-op methods returning nil" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/kafka", + "message": "Siblings under openmeter/watermill/driver/ mostly use [compile-time interface assertion, value-receiver no-op methods returning nil] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/internal", + "message": "Siblings under pkg/kafka/metrics/ mostly use [nested collections keyed by string, string enums with unmarshaljson + int64 projection, struct fields map librdkafka json keys via json tags, windowstats for rolling percentile windows] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/stats", + "message": "Siblings under pkg/kafka/metrics/ mostly use [add is nil-safe and attribute-additive, enum stats recorded via .int64(), extended-metrics gating via `extended bool`, gauge creation always wraps errors with the metric name, internal partitions are skipped, struct-of-gauges + new + add pair, window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "windowstats for rolling percentile windows" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/custominvoicing", + "message": "Siblings under test/app/ mostly use [assert via typed error predicates, fixture builds app + customer + customer-data, invoice sync asserts stripe line items by description/amount/metadata, ledger-backed charges wired in setupsuite, set expectations with on(...).return(...) then restore(), stripe clients are testify mocks injected via factory, two test harness styles coexist] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "shared profile setup helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/stripe", + "message": "Siblings under test/app/ mostly use [builder results for sync inputs, drive invoice lifecycle through service calls, embed billingtest.basesuite, meter/streaming teardown via defer, per-test unique namespace string, shared profile setup helper] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "assert via typed error predicates", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "set expectations with on(...).return(...) then restore()", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/viewgen", + "message": "Siblings under tools/migrate/ mostly use [generators backstop atlas gaps, thin main, logic in package] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "deterministic output via name sort", + "generated-file header marker", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/cmd", + "message": "Siblings under tools/migrate/ mostly use [deterministic output via name sort, generated-file header marker, load ent schema by path, not by importing generated code, only emit views, skip non-view schemas, view name fallback chain, view query precedence: viewfor[dialect] then viewas] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "generators backstop atlas gaps", + "thin main, logic in package" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/service", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [expands gate eager-loading, map* functions for db<->domain conversion, namespace-scoped queries always, register/deregister charge ids with the meta adapter, soft-delete + upsert for detailed lines, transaction-aware via entutils.transactingrepo, validate inputs before persisting] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "charge mutation always under the charge lock", + "lineengine drives the machine, never persists lines directly", + "mutate charge in-memory; the machine persists on stabilization", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "round through the currency calculator before compare/persist", + "states declared via fluent configure/permit/onactive dsl" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/adapter", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [charge mutation always under the charge lock, lineengine drives the machine, never persists lines directly, mutate charge in-memory; the machine persists on stabilization, one state machine type per settlement mode, public methods are transaction.run wrappers over the adapter, round through the currency calculator before compare/persist, states declared via fluent configure/permit/onactive dsl] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "expands gate eager-loading", + "map* functions for db<->domain conversion", + "namespace-scoped queries always", + "register/deregister charge ids with the meta adapter", + "soft-delete + upsert for detailed lines", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/rating", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credit reconciliation as signed-delta switch, currencycalculator.roundtoprecision before decimal compares, decisions delegated to handler, persistence to adapter, input struct + validate() per public method, lineage created/persisted alongside every credit realization, nofiattransactionrequired short-circuits fiat paths, service struct with validated config + new] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credits mutator always disabled for gross rating", + "engine dispatch on charge.state.ratingengine", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "voided realizations excluded from billable history" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/run", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credits mutator always disabled for gross rating, engine dispatch on charge.state.ratingengine, input struct with validate() before any work, lazy prior detailed-line expansion with overcharge guard, quantity snapshot via streaming with stored-at cutoff, service interface + private struct + config-validated new, voided realizations excluded from billable history] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credit reconciliation as signed-delta switch", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "input struct + validate() per public method", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "service struct with validated config + new" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/backfillaccounts", + "message": "Siblings under cmd/jobs/ledger/ mostly use [config-validated service constructor, counter accumulation + recordfailure, cursor pagination with max_safe_iter guard, dryrun short-circuits writes, interface-typed collaborators, missing-account detection via validationissue codes, validate + normalize input structs] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/service", + "message": "Siblings under cmd/jobs/ledger/ mostly use [cobra command + rune delegation, concrete resolver stack construction (bypass wired di), rfc3339 flag parsing to utc pointer, shared job runtime via internal.app] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "validate + normalize input structs" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/framework/entutils/testutils/ent2", + "message": "Siblings under pkg/framework/entutils/testutils/ mostly use [extension wiring stays in entc.go] but this folder does not", + "expected": [ + "extension wiring stays in entc.go", + "generate directive in package file", + "ignored-build codegen driver" + ], + "actual": [ + "generate directive in package file", + "ignored-build codegen driver" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/resources", + "message": "Siblings under collector/quickstart/collector/ mostly use [content-type switch for cloudevents formats, durable sqlite buffer before delivery, env-driven output config, rfc7807 error responses via mapping + sync_response, schema validation with catch, two streams bridged by inproc channel] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "label is the cross-file contract", + "resources declared, not inlined" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/streams", + "message": "Siblings under collector/quickstart/collector/ mostly use [label is the cross-file contract, resources declared, not inlined] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/decisions", + "message": "Siblings under docs/ mostly use [before/after code diffs plus copy-paste sql, date-prefixed filenames, repo-relative source links to ground claims, version range header for upgrade-path guides] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "sequential numbered adr filenames" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/migration-guides", + "message": "Siblings under docs/ mostly use [fixed madr-style section structure, outcome stated as bullet list of concrete choices, sequential numbered adr filenames] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "repo-relative source links to ground claims", + "version range header for upgrade-path guides" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/adapter", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [append-only segment consumption: close + create remainder, config{adapter lineage.adapter} + new returns lineage.service, coverage shortfall is a hard error, deterministic ordering via lineage helpers, multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...), timestamps truncated to microsecond from clock.now(), validate input at the top of every mutating method] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "bulk creates for initial lineages", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "package-level helper rebuilds adapter from raw *entdb.client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/service", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [active-segment queries filter closedatisnil + order bycreatedat, bulk creates for initial lineages, ent rows mapped to domain via maplineage / mapsegment, every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue, implements lineage.adapter + entutils.txcreator, lock methods assert in-transaction then use forupdate(), package-level helper rebuilds adapter from raw *entdb.client] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "append-only segment consumption: close + create remainder", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/advance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config.validate() + new constructor, return error for consumer-level retry, single-event handle delegating to service] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config + validating constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/asyncadvance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config + validating constructor, context-aware structured logging, paginate via pagination.collectall, per-customer error isolation] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config.validate() + new constructor", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/customer", + "message": "Siblings under openmeter/billing/validators/ mostly use [capability-based customer validation, skip validation when no billable items, subscriptioncommandhook via noop embedding, wrap validation failures as conflict errors] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "aggregate validation errors with errors.join", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "sync-then-check invoice state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/subscription", + "message": "Siblings under openmeter/billing/validators/ mostly use [aggregate validation errors with errors.join, constructor nil-checks injected services, invoice type discrimination via as* accessors, requestvalidator via noop embedding, sync-then-check invoice state] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "capability-based customer validation", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "wrap validation failures as conflict errors" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/adapter", + "message": "Siblings under openmeter/cost/ mostly use [config-validated constructor returning (*service, error), validate input then delegate to adapter] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "adapter struct with constructor new and interface assertion", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/service", + "message": "Siblings under openmeter/cost/ mostly use [adapter struct with constructor new and interface assertion, defensive copy of caller slices/maps before mutation, feature filters take precedence over caller filters, internal group-by keys added for resolution, then aggregated away, not-found pricing is a non-fatal detail, not an error, pre-resolve llm prices into a cache keyed by (provider, model), resolve dimensions from static value or group-by property] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "config-validated constructor returning (*service, error)", + "validate input then delegate to adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/adapter", + "message": "Siblings under openmeter/currencies/ mostly use [fiat sourced from gobl currency.definitions, fiat/custom merge with in-memory pagination, service satisfies currencies.currencyservice, service-owned business rules, sort honors orderby/order, validate-then-run guard] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "transaction-aware via entutils.transactingrepo" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/service", + "message": "Siblings under openmeter/currencies/ mostly use [adapter satisfies currencies.adapter, constraint errors map to conflict, constructor validates config, db->domain mapping helpers, namespace-scoped queries, pkg/filter + pagination helpers, transaction-aware via entutils.transactingrepo] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "validate-then-run guard" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/memorydedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [batch ops use pipelined / mget and tolerate redis.nil, hash keys via getkeyhash (xxh3-128 + base64 rawurl), migration mode double-checks the old raw key, mode switch on every key operation, set nx with ttl as the uniqueness primitive, validate mode and guard nil client] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/redisdedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [cache stores nil values, keys carry all signal, constructor clamps invalid size to defaultsize, implement full dedupe.deduplicator interface, isunique mutates as it checks, key derived only via dedupe.item.key()] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/schema", + "message": "Siblings under openmeter/ent/ mostly use [ent-backed transaction.creator, hijacktx + newtxdriver wrapping] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "entutils mixins for identity/namespace/time", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/tx", + "message": "Siblings under openmeter/ent/ mostly use [decimals via alpacadecimal numeric, edge ownership via from/ref + field, entutils mixins for identity/namespace/time, json columns via valuescanner + jsonb, soft-delete-aware partial unique indexes, standard ent.schema quartet, ulid fk columns as char(26)] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "ent-backed transaction.creator", + "hijacktx + newtxdriver wrapping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/events", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [backend-abstracted cache, config struct with validate constructor guard, filter interface hierarchy, ttl'd rule cache keyed by namespace, validate request before scoping] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "error-collecting validate()", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "versioned eventtype triple" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/filters", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [error-collecting validate(), marshaler.event compile-time assertion, string enum with values()+validate(), subject path via metadata.composeresourcepath, versioned eventtype triple] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "filter interface hierarchy", + "ttl'd rule cache keyed by namespace", + "validate request before scoping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/metadata", + "message": "Siblings under openmeter/event/ mostly use [json-stable field tags, validatable value type] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "entity-segment constants", + "eventtype identity triple", + "resource paths via compose helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/models", + "message": "Siblings under openmeter/event/ mostly use [entity-segment constants, eventtype identity triple, resource paths via compose helpers] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "json-stable field tags", + "validatable value type" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/serializer", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [compile-time interface assertion, resolver interface, template-driven topic naming, validating constructor returning pointer + error] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "serializer interface contract", + "symmetric encode/decode helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/topicresolver", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [dedupe-derived kafka key, flat cloudeventskafkapayload struct, optional-data guard, serializer interface contract, symmetric encode/decode helpers] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "compile-time interface assertion", + "resolver interface", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/adapter", + "message": "Siblings under openmeter/ledger/account/ mostly use [data-to-domain mapping, deterministic lock ordering, nil-locker tolerance, self-wired live services, transaction.run for multi-step writes, validate-then-delegate] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "route normalization before persistence/query", + "transactingrepo wrapping", + "txuser implementation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/service", + "message": "Siblings under openmeter/ledger/account/ mostly use [eager-load required edges then validate, idempotent ensure via onconflict resolvewithignore, map* projector functions, route normalization before persistence/query, transactingrepo wrapping, txuser implementation] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "data-to-domain mapping", + "deterministic lock ordering", + "nil-locker tolerance", + "self-wired live services", + "transaction.run for multi-step writes", + "validate-then-delegate" + ], + "severity": "warn" + } + ], + "naming_violations": [], + "dependency_violations": [ + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Server entrypoint & DI bootstrap imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/server/main.go", + "import": "pkg/errorsx", + "message": "Server entrypoint & DI bootstrap imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Billing domain", + "file": "cmd/server/wire.go", + "import": "openmeter/billing/creditgrant", + "message": "Server entrypoint & DI bootstrap imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Customer domain", + "file": "cmd/server/wire.go", + "import": "openmeter/customer", + "message": "Server entrypoint & DI bootstrap imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Generated Ent client", + "file": "cmd/server/wire.go", + "import": "openmeter/ent/db", + "message": "Server entrypoint & DI bootstrap imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ledger domain", + "file": "cmd/server/wire.go", + "import": "openmeter/ledger", + "message": "Server entrypoint & DI bootstrap imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Meter domain", + "file": "cmd/server/wire.go", + "import": "openmeter/meter", + "message": "Server entrypoint & DI bootstrap imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Notification domain", + "file": "cmd/server/wire.go", + "import": "openmeter/notification", + "message": "Server entrypoint & DI bootstrap imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Product catalog domain", + "file": "cmd/server/wire.go", + "import": "openmeter/productcatalog/addon", + "message": "Server entrypoint & DI bootstrap imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Registry & builder", + "file": "cmd/server/wire.go", + "import": "openmeter/registry", + "message": "Server entrypoint & DI bootstrap imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/server/wire.go", + "import": "openmeter/streaming", + "message": "Server entrypoint & DI bootstrap imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/balance-worker/main.go", + "import": "pkg/log", + "message": "Worker & job entrypoints imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ledger domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/ledger", + "message": "Worker & job entrypoints imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Meter domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/meter", + "message": "Worker & job entrypoints imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/streaming", + "message": "Worker & job entrypoints imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Product catalog domain", + "file": "cmd/billing-worker/wire_gen.go", + "import": "openmeter/productcatalog/featureresolver", + "message": "Worker & job entrypoints imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Billing domain", + "file": "cmd/jobs/billing/advance/advance.go", + "import": "openmeter/billing", + "message": "Worker & job entrypoints imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Customer domain", + "file": "cmd/jobs/billing/advancecharges/advancecharges.go", + "import": "openmeter/customer", + "message": "Worker & job entrypoints imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Entitlement domain", + "file": "cmd/jobs/entitlement/recalculatesnapshots.go", + "import": "openmeter/entitlement/balanceworker", + "message": "Worker & job entrypoints imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "App / marketplace integrations", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/app", + "message": "Worker & job entrypoints imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Charges sub-system", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/billing/charges/worker/advance", + "message": "Worker & job entrypoints imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Generated Ent client", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/ent/db", + "message": "Worker & job entrypoints imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Notification domain", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/notification", + "message": "Worker & job entrypoints imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Registry & builder", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/registry", + "message": "Worker & job entrypoints imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Worker & job entrypoints imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Legacy v1 HTTP router", + "file": "cmd/server/main.go", + "import": "openmeter/server/router", + "message": "Worker & job entrypoints imports from Legacy v1 HTTP router but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "App / marketplace integrations", + "file": "app/common/app.go", + "import": "openmeter/app", + "message": "Application wiring (app/common) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Product catalog domain", + "file": "app/common/billing.go", + "import": "openmeter/productcatalog/feature", + "message": "Application wiring (app/common) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Shared utility packages (pkg/)", + "file": "app/common/billing.go", + "import": "pkg/featuregate", + "message": "Application wiring (app/common) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "app/common/charges.go", + "import": "openmeter/ledger/collector", + "message": "Application wiring (app/common) imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Registry & builder", + "file": "app/common/customer.go", + "import": "openmeter/registry", + "message": "Application wiring (app/common) imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Database migrations", + "file": "app/common/database.go", + "import": "tools/migrate", + "message": "Application wiring (app/common) imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Entitlement domain", + "file": "app/common/entitlement.go", + "import": "openmeter/entitlement/validators/customer", + "message": "Application wiring (app/common) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Generated API contract & v1 server interface", + "file": "app/common/ffx.go", + "import": "api", + "message": "Application wiring (app/common) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Subscription domain", + "file": "app/common/ffx.go", + "import": "openmeter/subscription", + "message": "Application wiring (app/common) imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Ingest & sink pipeline", + "file": "app/common/kafka.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Application wiring (app/common) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Notification domain", + "file": "app/common/notification.go", + "import": "openmeter/notification", + "message": "Application wiring (app/common) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/adapter.go", + "import": "pkg/framework/entutils", + "message": "Billing domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Product catalog domain", + "file": "openmeter/billing/adapter/customeroverride.go", + "import": "openmeter/productcatalog", + "message": "Billing domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/billing/adapter/gatheringinvoice.go", + "import": "api", + "message": "Billing domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Charges sub-system", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/billing/charges/meta", + "message": "Billing domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Billing domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Ledger domain", + "file": "openmeter/billing/charges/service/base_test.go", + "import": "openmeter/ledger/recognizer", + "message": "Billing domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Subscription domain", + "file": "openmeter/billing/validators/customer/customer.go", + "import": "openmeter/subscription", + "message": "Billing domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "import": "openmeter/ledger/collector", + "message": "Billing domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Entitlement domain", + "file": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "import": "openmeter/entitlement", + "message": "Billing domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Customer domain", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/customer", + "message": "Charges sub-system imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/charges/adapter.go", + "import": "pkg/framework/entutils", + "message": "Charges sub-system imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Product catalog domain", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "openmeter/productcatalog", + "message": "Charges sub-system imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Charges sub-system imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "import": "openmeter/streaming", + "message": "Charges sub-system imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "App / marketplace integrations", + "file": "openmeter/billing/charges/service/creditpurchase_test.go", + "import": "openmeter/app/custominvoicing", + "message": "Charges sub-system imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Meter domain", + "file": "openmeter/billing/charges/service/featureid_test.go", + "import": "openmeter/meter", + "message": "Charges sub-system imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/customer/adapter.go", + "import": "openmeter/streaming", + "message": "Customer domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/customer/adapter.go", + "import": "pkg/framework/entutils", + "message": "Customer domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/customer/adapter/customer_test.go", + "import": "openmeter/app", + "message": "Customer domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "api", + "message": "Customer domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Entitlement domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/entitlement", + "message": "Customer domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Product catalog domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/productcatalog/subscription/http", + "message": "Customer domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Subscription domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/subscription", + "message": "Customer domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Billing domain", + "file": "openmeter/customer/service/hooks/subjectcustomer.go", + "import": "openmeter/billing", + "message": "Customer domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Meter domain", + "file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "import": "openmeter/meter/mockadapter", + "message": "Customer domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Ledger domain", + "file": "openmeter/customer/service/ledger_hook_test.go", + "import": "openmeter/ledger", + "message": "Customer domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Subscription domain", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "openmeter/subscription/repo", + "message": "Product catalog domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "pkg/clock", + "message": "Product catalog domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "api", + "message": "Product catalog domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Notification domain", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "openmeter/notification", + "message": "Product catalog domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/productcatalog/addon/service/service_test.go", + "import": "openmeter/app", + "message": "Product catalog domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Entitlement domain", + "file": "openmeter/productcatalog/entitlement.go", + "import": "openmeter/entitlement", + "message": "Product catalog domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Customer domain", + "file": "openmeter/productcatalog/subscription/http/create.go", + "import": "openmeter/customer", + "message": "Product catalog domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/subscription/addon/addon.go", + "import": "pkg/models", + "message": "Subscription domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/subscription/addon/diff/apply_test.go", + "import": "openmeter/app", + "message": "Subscription domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/subscription/addon/http/create.go", + "import": "api", + "message": "Subscription domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Database migrations", + "file": "openmeter/subscription/testutils/db.go", + "import": "tools/migrate", + "message": "Subscription domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Meter domain", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/meter", + "message": "Subscription domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Registry & builder", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/registry", + "message": "Subscription domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/streaming/testutils", + "message": "Subscription domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Customer domain", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "openmeter/customer/adapter", + "message": "Entitlement domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "pkg/clock", + "message": "Entitlement domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Product catalog domain", + "file": "openmeter/entitlement/adapter/entitlement_test.go", + "import": "openmeter/productcatalog/adapter", + "message": "Entitlement domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "import": "openmeter/ingest/kafkaingest/serializer", + "message": "Entitlement domain imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Notification domain", + "file": "openmeter/entitlement/balanceworker/filters.go", + "import": "openmeter/notification", + "message": "Entitlement domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Registry & builder", + "file": "openmeter/entitlement/balanceworker/recalculate.go", + "import": "openmeter/registry", + "message": "Entitlement domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/entitlement/driver/entitlement.go", + "import": "api", + "message": "Entitlement domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Subscription domain", + "file": "openmeter/entitlement/hooks/subscription/hook.go", + "import": "openmeter/subscription", + "message": "Entitlement domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/credit/adapter/balance_snapshot.go", + "import": "pkg/clock", + "message": "Credit & grant domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/credit/balance/service.go", + "import": "openmeter/streaming", + "message": "Credit & grant domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Meter domain", + "file": "openmeter/credit/balance/service_test.go", + "import": "openmeter/meter", + "message": "Credit & grant domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/credit/driver/grant.go", + "import": "api", + "message": "Credit & grant domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Customer domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/customer", + "message": "Credit & grant domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Entitlement domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/entitlement/driver", + "message": "Credit & grant domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ledger/account.go", + "import": "pkg/models", + "message": "Ledger domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Database migrations", + "file": "openmeter/ledger/account/adapter/repo_test.go", + "import": "tools/migrate", + "message": "Ledger domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Billing domain", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Charges sub-system", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/ledger/collector", + "message": "Ledger domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Product catalog domain", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/productcatalog", + "message": "Ledger domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/app", + "message": "Ledger domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Meter domain", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/meter", + "message": "Ledger domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/streaming/testutils", + "message": "Ledger domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/meter/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Meter domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Product catalog domain", + "file": "openmeter/meter/adapter/manage.go", + "import": "openmeter/productcatalog/adapter", + "message": "Meter domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Customer domain", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/customer", + "message": "Meter domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/streaming", + "message": "Meter domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/meter/httphandler/mapping.go", + "import": "api", + "message": "Meter domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/streaming/clickhouse/connector.go", + "import": "pkg/models", + "message": "Streaming / usage query (ClickHouse) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Customer domain", + "file": "openmeter/streaming/clickhouse/event_query_test.go", + "import": "openmeter/customer", + "message": "Streaming / usage query (ClickHouse) imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ingest/httpdriver/errors.go", + "import": "pkg/framework/commonhttp", + "message": "Ingest & sink pipeline imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/ingest/httpdriver/ingest.go", + "import": "api", + "message": "Ingest & sink pipeline imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/notification/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Notification domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/notification/adapter/entitymapping_test.go", + "import": "api", + "message": "Notification domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Billing domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/billing", + "message": "Notification domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Entitlement domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/entitlement/snapshot", + "message": "Notification domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Customer domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/customer/httpdriver", + "message": "Notification domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Product catalog domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/productcatalog/driver", + "message": "Notification domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/app/adapter.go", + "import": "pkg/framework/entutils", + "message": "App / marketplace integrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Billing domain", + "file": "openmeter/app/custominvoicing/app.go", + "import": "openmeter/billing", + "message": "App / marketplace integrations imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "import": "api", + "message": "App / marketplace integrations imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Product catalog domain", + "file": "openmeter/app/stripe/appinvoice.go", + "import": "openmeter/productcatalog", + "message": "App / marketplace integrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Product catalog domain", + "file": "openmeter/ent/schema/addon.go", + "import": "openmeter/productcatalog", + "message": "Ent schema (DB source of truth) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/schema/addon.go", + "import": "pkg/framework/entutils", + "message": "Ent schema (DB source of truth) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/schema/app.go", + "import": "openmeter/app", + "message": "Ent schema (DB source of truth) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/schema/balance_snapshot.go", + "import": "openmeter/credit/balance", + "message": "Ent schema (DB source of truth) imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Billing domain", + "file": "openmeter/ent/schema/billing.go", + "import": "openmeter/billing", + "message": "Ent schema (DB source of truth) imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Charges sub-system", + "file": "openmeter/ent/schema/charges.go", + "import": "openmeter/billing/charges/meta", + "message": "Ent schema (DB source of truth) imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Entitlement domain", + "file": "openmeter/ent/schema/entitlement.go", + "import": "openmeter/entitlement", + "message": "Ent schema (DB source of truth) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Ledger domain", + "file": "openmeter/ent/schema/ledger_account.go", + "import": "openmeter/ledger", + "message": "Ent schema (DB source of truth) imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Meter domain", + "file": "openmeter/ent/schema/meter.go", + "import": "openmeter/meter", + "message": "Ent schema (DB source of truth) imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Notification domain", + "file": "openmeter/ent/schema/notification.go", + "import": "openmeter/notification", + "message": "Ent schema (DB source of truth) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Product catalog domain", + "file": "openmeter/ent/db/addon.go", + "import": "openmeter/productcatalog", + "message": "Generated Ent client imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/db/addon.go", + "import": "pkg/models", + "message": "Generated Ent client imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/db/app.go", + "import": "openmeter/app", + "message": "Generated Ent client imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/db/balancesnapshot.go", + "import": "openmeter/credit/balance", + "message": "Generated Ent client imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Billing domain", + "file": "openmeter/ent/db/billingcustomeroverride.go", + "import": "openmeter/billing", + "message": "Generated Ent client imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Charges sub-system", + "file": "openmeter/ent/db/charge.go", + "import": "openmeter/billing/charges/meta", + "message": "Generated Ent client imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Ledger domain", + "file": "openmeter/ent/db/ledgeraccount.go", + "import": "openmeter/ledger", + "message": "Generated Ent client imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Meter domain", + "file": "openmeter/ent/db/meter.go", + "import": "openmeter/meter", + "message": "Generated Ent client imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Notification domain", + "file": "openmeter/ent/db/mutation.go", + "import": "openmeter/notification", + "message": "Generated Ent client imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Customer domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/customer", + "message": "Registry & builder imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Generated Ent client", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/ent/db", + "message": "Registry & builder imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Meter domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/meter", + "message": "Registry & builder imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Product catalog domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/productcatalog/adapter", + "message": "Registry & builder imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/streaming", + "message": "Registry & builder imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "pkg/framework/lockr", + "message": "Registry & builder imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "App / marketplace integrations", + "file": "openmeter/server/router/appcustominvoicing.go", + "import": "openmeter/app/custominvoicing/httpdriver", + "message": "Legacy v1 HTTP router imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/server/router/appstripe.go", + "import": "pkg/models", + "message": "Legacy v1 HTTP router imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Credit & grant domain", + "file": "openmeter/server/router/credit.go", + "import": "openmeter/credit/driver", + "message": "Legacy v1 HTTP router imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "v3 API layer (AIP-style)", + "file": "openmeter/server/router/router.go", + "import": "api/v3/handlers/currencies", + "message": "Legacy v1 HTTP router imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Charges sub-system", + "file": "openmeter/server/router/router.go", + "import": "openmeter/billing/charges", + "message": "Legacy v1 HTTP router imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/server/router/router.go", + "import": "openmeter/ingest", + "message": "Legacy v1 HTTP router imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/server/router/router.go", + "import": "openmeter/streaming", + "message": "Legacy v1 HTTP router imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Subscription domain", + "file": "openmeter/server/router/router.go", + "import": "openmeter/subscription", + "message": "Legacy v1 HTTP router imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Generated API contract & v1 server interface", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "v3 API layer (AIP-style) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "v3 API layer (AIP-style) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Shared utility packages (pkg/)", + "file": "api/v3/apierrors/encoder.go", + "import": "pkg/framework/commonhttp", + "message": "v3 API layer (AIP-style) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "v3 API layer (AIP-style) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "v3 API layer (AIP-style) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "v3 API layer (AIP-style) imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "v3 API layer (AIP-style) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Shared utility packages (pkg/)", + "file": "api/api.gen.go", + "import": "pkg/models", + "message": "Generated API contract & v1 server interface imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Meter domain", + "file": "api/client/go/client_test.go", + "import": "openmeter/meter", + "message": "Generated API contract & v1 server interface imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "v3 API layer (AIP-style)", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "Generated API contract & v1 server interface imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "Generated API contract & v1 server interface imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "Generated API contract & v1 server interface imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Billing domain", + "file": "api/v3/handlers/billingprofiles/convert.gen.go", + "import": "openmeter/billing", + "message": "Generated API contract & v1 server interface imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Customer domain", + "file": "api/v3/handlers/customers/billing/convert.go", + "import": "openmeter/customer", + "message": "Generated API contract & v1 server interface imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Charges sub-system", + "file": "api/v3/handlers/customers/charges/convert.go", + "import": "openmeter/billing/charges", + "message": "Generated API contract & v1 server interface imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ledger domain", + "file": "api/v3/handlers/customers/credits/convert.go", + "import": "openmeter/ledger", + "message": "Generated API contract & v1 server interface imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "Generated API contract & v1 server interface imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "Generated API contract & v1 server interface imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "Generated API contract & v1 server interface imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Subscription domain", + "file": "api/v3/handlers/subscriptions/cancel.go", + "import": "openmeter/subscription", + "message": "Generated API contract & v1 server interface imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Collector (Benthos/Redpanda Connect)", + "to_component": "Generated API contract & v1 server interface", + "file": "collector/benthos/output/openmeter.go", + "import": "api/client/go", + "message": "Collector (Benthos/Redpanda Connect) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated API contract & v1 server interface", + "file": "pkg/errorsx/helpers.go", + "import": "api", + "message": "Shared utility packages (pkg/) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "v3 API layer (AIP-style)", + "file": "pkg/errorsx/helpers.go", + "import": "api/v3", + "message": "Shared utility packages (pkg/) imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated Ent client", + "file": "pkg/framework/entutils/entdriver/driver.go", + "import": "openmeter/ent/db", + "message": "Shared utility packages (pkg/) imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Product catalog domain", + "file": "tools/migrate/productcatalog_test.go", + "import": "openmeter/productcatalog", + "message": "Database migrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Shared utility packages (pkg/)", + "file": "tools/migrate/viewgen/viewgen.go", + "import": "pkg/strcase", + "message": "Database migrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + } + ], + "structural_outliers": [ + { + "type": "structural_outlier", + "folder": "api/client/go", + "message": "Uses [.go, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/javascript", + "message": "Uses [.json, .ts, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/python", + "message": "Uses [.in, .toml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "openmeter/billing", + "message": "Has 41 files \u2014 significantly more than sibling average (8). May be a god-folder that should be split.", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "pkg/models", + "message": "Has 28 files \u2014 significantly more than sibling average (4). May be a god-folder that should be split.", + "severity": "info" + } + ], + "antipattern_clusters": [], + "summary": { + "total_findings": 235, + "warnings": 230, + "informational": 5, + "checks_run": [ + "pattern_divergences", + "naming_violations", + "dependency_violations", + "structural_outliers", + "antipattern_clusters" + ], + "timestamp": "2026-06-05T17:18:39.481531+00:00" + } +} \ No newline at end of file diff --git a/.archie/drift_report.json b/.archie/drift_report.json new file mode 100644 index 0000000000..77969efef6 --- /dev/null +++ b/.archie/drift_report.json @@ -0,0 +1,3262 @@ +{ + "pattern_divergences": [ + { + "type": "pattern_divergence", + "folder": "api/client", + "message": "Siblings under api/ mostly use [build orchestration lives in this makefile, not the children, format and lint before generate, pnpm workspace with patched, version-pinned typespec, two packages, two api generations] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "split by language, generated per language" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "api/spec", + "message": "Siblings under api/ mostly use [generation source is api/spec, not these folders, hand-edited only at the seams, split by language, generated per language] but this folder does not", + "expected": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "generation source is api/spec, not these folders", + "hand-edited only at the seams", + "pnpm workspace with patched, version-pinned typespec", + "split by language, generated per language", + "two packages, two api generations" + ], + "actual": [ + "build orchestration lives in this makefile, not the children", + "format and lint before generate", + "pnpm workspace with patched, version-pinned typespec", + "two packages, two api generations" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/adapter", + "message": "Siblings under openmeter/meterevent/ mostly use [api<->domain mapping isolated in mapping.go via apiconverter, handler interface + unexported struct + new constructor, httptransport.newhandlerwithargs three-stage handler, namespace resolved from context, never from request body, per-event validation errors flow to api.ingestedevent.validationerror, type aliases tie api types to handler signatures, v1 defaults applied in the decode function] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "missing-customer lookups are tolerated, not fatal", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/meterevent/httphandler", + "message": "Siblings under openmeter/meterevent/ mostly use [constructor returns the domain service interface, cursor pagination only emits nextcursor on a full page, missing-customer lookups are tolerated, not fatal, shared eventpostprocess pipeline, translate domain params to streaming params, never query streaming directly with domain types, validate params at the top of every service method, validation errors are collected on the event, not returned] but this folder does not", + "expected": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "constructor returns the domain service interface", + "cursor pagination only emits nextcursor on a full page", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "missing-customer lookups are tolerated, not fatal", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "shared eventpostprocess pipeline", + "translate domain params to streaming params, never query streaming directly with domain types", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function", + "validate params at the top of every service method", + "validation errors are collected on the event, not returned" + ], + "actual": [ + "api<->domain mapping isolated in mapping.go via apiconverter", + "handler interface + unexported struct + new constructor", + "httptransport.newhandlerwithargs three-stage handler", + "namespace resolved from context, never from request body", + "per-event validation errors flow to api.ingestedevent.validationerror", + "type aliases tie api types to handler signatures", + "v1 defaults applied in the decode function" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/secret/adapter", + "message": "Siblings under openmeter/secret/ mostly use [package name differs from directory] but this folder does not", + "expected": [ + "package name differs from directory" + ], + "actual": [ + "compile-time interface assertion", + "id-equals-value plaintext encoding", + "no validation at adapter layer", + "stateless struct adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/models", + "message": "Siblings under openmeter/sink/ mostly use [background context with timeout for callbacks, constructor validates required deps then builds, graceful drain on shutdown, idempotent close via sync.oncefunc + atomic shutdown flag, interface-first flusheventhandler, onflushsuccess is non-blocking and never re-does the write, per-handler namespaced metrics] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "leaf type-only package", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/sink/flushhandler", + "message": "Siblings under openmeter/sink/ mostly use [leaf type-only package, stringer on int8 enum with explicit iota constants, value-receiver derivation helper] but this folder does not", + "expected": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "leaf type-only package", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics", + "stringer on int8 enum with explicit iota constants", + "value-receiver derivation helper" + ], + "actual": [ + "background context with timeout for callbacks", + "constructor validates required deps then builds", + "graceful drain on shutdown", + "idempotent close via sync.oncefunc + atomic shutdown flag", + "interface-first flusheventhandler", + "onflushsuccess is non-blocking and never re-does the write", + "per-handler namespaced metrics" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [detailed-line soft-delete + upsert by childuniquereferenceid, expand-gated edge loading, exported map*fromdb mappers, interface conformance asserts per file, timestamp normalization to utc, transaction-aware repo body, validate inputs before db work] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "input.validate() then transaction.run(s.adapter, ...)", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/adapter", + "message": "Siblings under openmeter/billing/charges/usagebased/ mostly use [config-validated new with composed sub-services, declarative state config via stateless library + meta.trigger* constants, input.validate() then transaction.run(s.adapter, ...), invoice mutations emitted as deferred invoiceupdater.patch, not direct writes, lineengine bridges billing invoice lifecycle into state-machine triggers, realization-run lifecycle delegated to s.runs / s.rater, settlement-mode dispatch to a state machine] but this folder does not", + "expected": [ + "config-validated new with composed sub-services", + "declarative state config via stateless library + meta.trigger* constants", + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "input.validate() then transaction.run(s.adapter, ...)", + "interface conformance asserts per file", + "invoice mutations emitted as deferred invoiceupdater.patch, not direct writes", + "lineengine bridges billing invoice lifecycle into state-machine triggers", + "realization-run lifecycle delegated to s.runs / s.rater", + "settlement-mode dispatch to a state machine", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "actual": [ + "detailed-line soft-delete + upsert by childuniquereferenceid", + "expand-gated edge loading", + "exported map*fromdb mappers", + "interface conformance asserts per file", + "timestamp normalization to utc", + "transaction-aware repo body", + "validate inputs before db work" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/customer", + "message": "Siblings under openmeter/subscription/validators/ mostly use [config struct with validate() and constructor guard, feature-flag-driven uniqueness mode, paginated full collection of candidate subscriptions, sub -> view -> spec pipeline of small step functions, subscriptioncommandhook via noopsubscriptioncommandhook embedding, two-phase before validation (existing-set then candidate-included)] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "active-subscription check via list + activeat=clock.now()", + "constructor validates required dependencies", + "delegate to input.validate() first", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "typed precondition/not-found errors for customer state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/subscription/validators/subscription", + "message": "Siblings under openmeter/subscription/validators/ mostly use [active-subscription check via list + activeat=clock.now(), constructor validates required dependencies, delegate to input.validate() first, implements customer.requestvalidator via nooprequestvalidator embedding, typed precondition/not-found errors for customer state] but this folder does not", + "expected": [ + "active-subscription check via list + activeat=clock.now()", + "config struct with validate() and constructor guard", + "constructor validates required dependencies", + "delegate to input.validate() first", + "feature-flag-driven uniqueness mode", + "implements customer.requestvalidator via nooprequestvalidator embedding", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)", + "typed precondition/not-found errors for customer state" + ], + "actual": [ + "config struct with validate() and constructor guard", + "feature-flag-driven uniqueness mode", + "paginated full collection of candidate subscriptions", + "sub -> view -> spec pipeline of small step functions", + "subscriptioncommandhook via noopsubscriptioncommandhook embedding", + "two-phase before validation (existing-set then candidate-included)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/noop", + "message": "Siblings under openmeter/watermill/driver/ mostly use [centralized sarama config via createkafkaconfig(role), cloudevent subject becomes kafka partition key, injected dependencies, no global fallbacks, metric name transform via saramametricrenamer(role), options struct with validate() then constructor, sarama global logger redirected to slog adaptor, topic provisioning before publisher returns] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "compile-time interface assertion", + "value-receiver no-op methods returning nil" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/watermill/driver/kafka", + "message": "Siblings under openmeter/watermill/driver/ mostly use [compile-time interface assertion, value-receiver no-op methods returning nil] but this folder does not", + "expected": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "compile-time interface assertion", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns", + "value-receiver no-op methods returning nil" + ], + "actual": [ + "centralized sarama config via createkafkaconfig(role)", + "cloudevent subject becomes kafka partition key", + "injected dependencies, no global fallbacks", + "metric name transform via saramametricrenamer(role)", + "options struct with validate() then constructor", + "sarama global logger redirected to slog adaptor", + "topic provisioning before publisher returns" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/internal", + "message": "Siblings under pkg/kafka/metrics/ mostly use [nested collections keyed by string, string enums with unmarshaljson + int64 projection, struct fields map librdkafka json keys via json tags, windowstats for rolling percentile windows] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/kafka/metrics/stats", + "message": "Siblings under pkg/kafka/metrics/ mostly use [add is nil-safe and attribute-additive, enum stats recorded via .int64(), extended-metrics gating via `extended bool`, gauge creation always wraps errors with the metric name, internal partitions are skipped, struct-of-gauges + new + add pair, window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999] but this folder does not", + "expected": [ + "add is nil-safe and attribute-additive", + "enum stats recorded via .int64()", + "extended-metrics gating via `extended bool`", + "gauge creation always wraps errors with the metric name", + "internal partitions are skipped", + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "struct-of-gauges + new + add pair", + "window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "windowstats for rolling percentile windows" + ], + "actual": [ + "nested collections keyed by string", + "string enums with unmarshaljson + int64 projection", + "struct fields map librdkafka json keys via json tags", + "windowstats for rolling percentile windows" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/custominvoicing", + "message": "Siblings under test/app/ mostly use [assert via typed error predicates, fixture builds app + customer + customer-data, invoice sync asserts stripe line items by description/amount/metadata, ledger-backed charges wired in setupsuite, set expectations with on(...).return(...) then restore(), stripe clients are testify mocks injected via factory, two test harness styles coexist] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "shared profile setup helper" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "test/app/stripe", + "message": "Siblings under test/app/ mostly use [builder results for sync inputs, drive invoice lifecycle through service calls, embed billingtest.basesuite, meter/streaming teardown via defer, per-test unique namespace string, shared profile setup helper] but this folder does not", + "expected": [ + "assert via typed error predicates", + "builder results for sync inputs", + "drive invoice lifecycle through service calls", + "embed billingtest.basesuite", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "meter/streaming teardown via defer", + "per-test unique namespace string", + "set expectations with on(...).return(...) then restore()", + "shared profile setup helper", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "actual": [ + "assert via typed error predicates", + "fixture builds app + customer + customer-data", + "invoice sync asserts stripe line items by description/amount/metadata", + "ledger-backed charges wired in setupsuite", + "set expectations with on(...).return(...) then restore()", + "stripe clients are testify mocks injected via factory", + "two test harness styles coexist" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/viewgen", + "message": "Siblings under tools/migrate/ mostly use [generators backstop atlas gaps, thin main, logic in package] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "deterministic output via name sort", + "generated-file header marker", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "tools/migrate/cmd", + "message": "Siblings under tools/migrate/ mostly use [deterministic output via name sort, generated-file header marker, load ent schema by path, not by importing generated code, only emit views, skip non-view schemas, view name fallback chain, view query precedence: viewfor[dialect] then viewas] but this folder does not", + "expected": [ + "deterministic output via name sort", + "generated-file header marker", + "generators backstop atlas gaps", + "load ent schema by path, not by importing generated code", + "only emit views, skip non-view schemas", + "thin main, logic in package", + "view name fallback chain", + "view query precedence: viewfor[dialect] then viewas" + ], + "actual": [ + "generators backstop atlas gaps", + "thin main, logic in package" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/service", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [expands gate eager-loading, map* functions for db<->domain conversion, namespace-scoped queries always, register/deregister charge ids with the meta adapter, soft-delete + upsert for detailed lines, transaction-aware via entutils.transactingrepo, validate inputs before persisting] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "charge mutation always under the charge lock", + "lineengine drives the machine, never persists lines directly", + "mutate charge in-memory; the machine persists on stabilization", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "round through the currency calculator before compare/persist", + "states declared via fluent configure/permit/onactive dsl" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/flatfee/adapter", + "message": "Siblings under openmeter/billing/charges/flatfee/ mostly use [charge mutation always under the charge lock, lineengine drives the machine, never persists lines directly, mutate charge in-memory; the machine persists on stabilization, one state machine type per settlement mode, public methods are transaction.run wrappers over the adapter, round through the currency calculator before compare/persist, states declared via fluent configure/permit/onactive dsl] but this folder does not", + "expected": [ + "charge mutation always under the charge lock", + "expands gate eager-loading", + "lineengine drives the machine, never persists lines directly", + "map* functions for db<->domain conversion", + "mutate charge in-memory; the machine persists on stabilization", + "namespace-scoped queries always", + "one state machine type per settlement mode", + "public methods are transaction.run wrappers over the adapter", + "register/deregister charge ids with the meta adapter", + "round through the currency calculator before compare/persist", + "soft-delete + upsert for detailed lines", + "states declared via fluent configure/permit/onactive dsl", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "actual": [ + "expands gate eager-loading", + "map* functions for db<->domain conversion", + "namespace-scoped queries always", + "register/deregister charge ids with the meta adapter", + "soft-delete + upsert for detailed lines", + "transaction-aware via entutils.transactingrepo", + "validate inputs before persisting" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/rating", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credit reconciliation as signed-delta switch, currencycalculator.roundtoprecision before decimal compares, decisions delegated to handler, persistence to adapter, input struct + validate() per public method, lineage created/persisted alongside every credit realization, nofiattransactionrequired short-circuits fiat paths, service struct with validated config + new] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credits mutator always disabled for gross rating", + "engine dispatch on charge.state.ratingengine", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "voided realizations excluded from billable history" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/usagebased/service/run", + "message": "Siblings under openmeter/billing/charges/usagebased/service/ mostly use [credits mutator always disabled for gross rating, engine dispatch on charge.state.ratingengine, input struct with validate() before any work, lazy prior detailed-line expansion with overcharge guard, quantity snapshot via streaming with stored-at cutoff, service interface + private struct + config-validated new, voided realizations excluded from billable history] but this folder does not", + "expected": [ + "credit reconciliation as signed-delta switch", + "credits mutator always disabled for gross rating", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "engine dispatch on charge.state.ratingengine", + "input struct + validate() per public method", + "input struct with validate() before any work", + "lazy prior detailed-line expansion with overcharge guard", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "quantity snapshot via streaming with stored-at cutoff", + "service interface + private struct + config-validated new", + "service struct with validated config + new", + "voided realizations excluded from billable history" + ], + "actual": [ + "credit reconciliation as signed-delta switch", + "currencycalculator.roundtoprecision before decimal compares", + "decisions delegated to handler, persistence to adapter", + "input struct + validate() per public method", + "lineage created/persisted alongside every credit realization", + "nofiattransactionrequired short-circuits fiat paths", + "service struct with validated config + new" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/backfillaccounts", + "message": "Siblings under cmd/jobs/ledger/ mostly use [config-validated service constructor, counter accumulation + recordfailure, cursor pagination with max_safe_iter guard, dryrun short-circuits writes, interface-typed collaborators, missing-account detection via validationissue codes, validate + normalize input structs] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "cmd/jobs/ledger/service", + "message": "Siblings under cmd/jobs/ledger/ mostly use [cobra command + rune delegation, concrete resolver stack construction (bypass wired di), rfc3339 flag parsing to utc pointer, shared job runtime via internal.app] but this folder does not", + "expected": [ + "cobra command + rune delegation", + "concrete resolver stack construction (bypass wired di)", + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "rfc3339 flag parsing to utc pointer", + "shared job runtime via internal.app", + "validate + normalize input structs" + ], + "actual": [ + "config-validated service constructor", + "counter accumulation + recordfailure", + "cursor pagination with max_safe_iter guard", + "dryrun short-circuits writes", + "interface-typed collaborators", + "missing-account detection via validationissue codes", + "validate + normalize input structs" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "pkg/framework/entutils/testutils/ent2", + "message": "Siblings under pkg/framework/entutils/testutils/ mostly use [extension wiring stays in entc.go] but this folder does not", + "expected": [ + "extension wiring stays in entc.go", + "generate directive in package file", + "ignored-build codegen driver" + ], + "actual": [ + "generate directive in package file", + "ignored-build codegen driver" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/resources", + "message": "Siblings under collector/quickstart/collector/ mostly use [content-type switch for cloudevents formats, durable sqlite buffer before delivery, env-driven output config, rfc7807 error responses via mapping + sync_response, schema validation with catch, two streams bridged by inproc channel] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "label is the cross-file contract", + "resources declared, not inlined" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "collector/quickstart/collector/streams", + "message": "Siblings under collector/quickstart/collector/ mostly use [label is the cross-file contract, resources declared, not inlined] but this folder does not", + "expected": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "label is the cross-file contract", + "resources declared, not inlined", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "actual": [ + "content-type switch for cloudevents formats", + "durable sqlite buffer before delivery", + "env-driven output config", + "rfc7807 error responses via mapping + sync_response", + "schema validation with catch", + "two streams bridged by inproc channel" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/decisions", + "message": "Siblings under docs/ mostly use [before/after code diffs plus copy-paste sql, date-prefixed filenames, repo-relative source links to ground claims, version range header for upgrade-path guides] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "sequential numbered adr filenames" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "docs/migration-guides", + "message": "Siblings under docs/ mostly use [fixed madr-style section structure, outcome stated as bullet list of concrete choices, sequential numbered adr filenames] but this folder does not", + "expected": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "fixed madr-style section structure", + "outcome stated as bullet list of concrete choices", + "repo-relative source links to ground claims", + "sequential numbered adr filenames", + "version range header for upgrade-path guides" + ], + "actual": [ + "before/after code diffs plus copy-paste sql", + "date-prefixed filenames", + "repo-relative source links to ground claims", + "version range header for upgrade-path guides" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/adapter", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [append-only segment consumption: close + create remainder, config{adapter lineage.adapter} + new returns lineage.service, coverage shortfall is a hard error, deterministic ordering via lineage helpers, multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...), timestamps truncated to microsecond from clock.now(), validate input at the top of every mutating method] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "bulk creates for initial lineages", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "package-level helper rebuilds adapter from raw *entdb.client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/lineage/service", + "message": "Siblings under openmeter/billing/charges/lineage/ mostly use [active-segment queries filter closedatisnil + order bycreatedat, bulk creates for initial lineages, ent rows mapped to domain via maplineage / mapsegment, every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue, implements lineage.adapter + entutils.txcreator, lock methods assert in-transaction then use forupdate(), package-level helper rebuilds adapter from raw *entdb.client] but this folder does not", + "expected": [ + "active-segment queries filter closedatisnil + order bycreatedat", + "append-only segment consumption: close + create remainder", + "bulk creates for initial lineages", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "ent rows mapped to domain via maplineage / mapsegment", + "every method body wrapped in entutils.transactingrepo / transactingrepowithnovalue", + "implements lineage.adapter + entutils.txcreator", + "lock methods assert in-transaction then use forupdate()", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "package-level helper rebuilds adapter from raw *entdb.client", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "actual": [ + "append-only segment consumption: close + create remainder", + "config{adapter lineage.adapter} + new returns lineage.service", + "coverage shortfall is a hard error", + "deterministic ordering via lineage helpers", + "multi-step methods wrapped in transaction.runwithnovalue(ctx, s.adapter, ...)", + "timestamps truncated to microsecond from clock.now()", + "validate input at the top of every mutating method" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/advance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config.validate() + new constructor, return error for consumer-level retry, single-event handle delegating to service] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config + validating constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/charges/worker/asyncadvance", + "message": "Siblings under openmeter/billing/charges/worker/ mostly use [config + validating constructor, context-aware structured logging, paginate via pagination.collectall, per-customer error isolation] but this folder does not", + "expected": [ + "config + validating constructor", + "config.validate() + new constructor", + "context-aware structured logging", + "paginate via pagination.collectall", + "per-customer error isolation", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "actual": [ + "config.validate() + new constructor", + "return error for consumer-level retry", + "single-event handle delegating to service" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/customer", + "message": "Siblings under openmeter/billing/validators/ mostly use [capability-based customer validation, skip validation when no billable items, subscriptioncommandhook via noop embedding, wrap validation failures as conflict errors] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "aggregate validation errors with errors.join", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "sync-then-check invoice state" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/billing/validators/subscription", + "message": "Siblings under openmeter/billing/validators/ mostly use [aggregate validation errors with errors.join, constructor nil-checks injected services, invoice type discrimination via as* accessors, requestvalidator via noop embedding, sync-then-check invoice state] but this folder does not", + "expected": [ + "aggregate validation errors with errors.join", + "capability-based customer validation", + "constructor nil-checks injected services", + "invoice type discrimination via as* accessors", + "requestvalidator via noop embedding", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "sync-then-check invoice state", + "wrap validation failures as conflict errors" + ], + "actual": [ + "capability-based customer validation", + "skip validation when no billable items", + "subscriptioncommandhook via noop embedding", + "wrap validation failures as conflict errors" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/adapter", + "message": "Siblings under openmeter/cost/ mostly use [config-validated constructor returning (*service, error), validate input then delegate to adapter] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "adapter struct with constructor new and interface assertion", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/cost/service", + "message": "Siblings under openmeter/cost/ mostly use [adapter struct with constructor new and interface assertion, defensive copy of caller slices/maps before mutation, feature filters take precedence over caller filters, internal group-by keys added for resolution, then aggregated away, not-found pricing is a non-fatal detail, not an error, pre-resolve llm prices into a cache keyed by (provider, model), resolve dimensions from static value or group-by property] but this folder does not", + "expected": [ + "adapter struct with constructor new and interface assertion", + "config-validated constructor returning (*service, error)", + "defensive copy of caller slices/maps before mutation", + "feature filters take precedence over caller filters", + "internal group-by keys added for resolution, then aggregated away", + "not-found pricing is a non-fatal detail, not an error", + "pre-resolve llm prices into a cache keyed by (provider, model)", + "resolve dimensions from static value or group-by property", + "validate input then delegate to adapter" + ], + "actual": [ + "config-validated constructor returning (*service, error)", + "validate input then delegate to adapter" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/adapter", + "message": "Siblings under openmeter/currencies/ mostly use [fiat sourced from gobl currency.definitions, fiat/custom merge with in-memory pagination, service satisfies currencies.currencyservice, service-owned business rules, sort honors orderby/order, validate-then-run guard] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "transaction-aware via entutils.transactingrepo" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/currencies/service", + "message": "Siblings under openmeter/currencies/ mostly use [adapter satisfies currencies.adapter, constraint errors map to conflict, constructor validates config, db->domain mapping helpers, namespace-scoped queries, pkg/filter + pagination helpers, transaction-aware via entutils.transactingrepo] but this folder does not", + "expected": [ + "adapter satisfies currencies.adapter", + "constraint errors map to conflict", + "constructor validates config", + "db->domain mapping helpers", + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "namespace-scoped queries", + "pkg/filter + pagination helpers", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "transaction-aware via entutils.transactingrepo", + "validate-then-run guard" + ], + "actual": [ + "fiat sourced from gobl currency.definitions", + "fiat/custom merge with in-memory pagination", + "service satisfies currencies.currencyservice", + "service-owned business rules", + "sort honors orderby/order", + "validate-then-run guard" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/memorydedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [batch ops use pipelined / mget and tolerate redis.nil, hash keys via getkeyhash (xxh3-128 + base64 rawurl), migration mode double-checks the old raw key, mode switch on every key operation, set nx with ttl as the uniqueness primitive, validate mode and guard nil client] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/dedupe/redisdedupe", + "message": "Siblings under openmeter/dedupe/ mostly use [cache stores nil values, keys carry all signal, constructor clamps invalid size to defaultsize, implement full dedupe.deduplicator interface, isunique mutates as it checks, key derived only via dedupe.item.key()] but this folder does not", + "expected": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "cache stores nil values, keys carry all signal", + "constructor clamps invalid size to defaultsize", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "implement full dedupe.deduplicator interface", + "isunique mutates as it checks", + "key derived only via dedupe.item.key()", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "actual": [ + "batch ops use pipelined / mget and tolerate redis.nil", + "hash keys via getkeyhash (xxh3-128 + base64 rawurl)", + "migration mode double-checks the old raw key", + "mode switch on every key operation", + "set nx with ttl as the uniqueness primitive", + "validate mode and guard nil client" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/schema", + "message": "Siblings under openmeter/ent/ mostly use [ent-backed transaction.creator, hijacktx + newtxdriver wrapping] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "entutils mixins for identity/namespace/time", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ent/tx", + "message": "Siblings under openmeter/ent/ mostly use [decimals via alpacadecimal numeric, edge ownership via from/ref + field, entutils mixins for identity/namespace/time, json columns via valuescanner + jsonb, soft-delete-aware partial unique indexes, standard ent.schema quartet, ulid fk columns as char(26)] but this folder does not", + "expected": [ + "decimals via alpacadecimal numeric", + "edge ownership via from/ref + field", + "ent-backed transaction.creator", + "entutils mixins for identity/namespace/time", + "hijacktx + newtxdriver wrapping", + "json columns via valuescanner + jsonb", + "soft-delete-aware partial unique indexes", + "standard ent.schema quartet", + "ulid fk columns as char(26)" + ], + "actual": [ + "ent-backed transaction.creator", + "hijacktx + newtxdriver wrapping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/events", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [backend-abstracted cache, config struct with validate constructor guard, filter interface hierarchy, ttl'd rule cache keyed by namespace, validate request before scoping] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "error-collecting validate()", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "versioned eventtype triple" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/entitlement/balanceworker/filters", + "message": "Siblings under openmeter/entitlement/balanceworker/ mostly use [error-collecting validate(), marshaler.event compile-time assertion, string enum with values()+validate(), subject path via metadata.composeresourcepath, versioned eventtype triple] but this folder does not", + "expected": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "error-collecting validate()", + "filter interface hierarchy", + "marshaler.event compile-time assertion", + "string enum with values()+validate()", + "subject path via metadata.composeresourcepath", + "ttl'd rule cache keyed by namespace", + "validate request before scoping", + "versioned eventtype triple" + ], + "actual": [ + "backend-abstracted cache", + "config struct with validate constructor guard", + "filter interface hierarchy", + "ttl'd rule cache keyed by namespace", + "validate request before scoping" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/metadata", + "message": "Siblings under openmeter/event/ mostly use [json-stable field tags, validatable value type] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "entity-segment constants", + "eventtype identity triple", + "resource paths via compose helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/event/models", + "message": "Siblings under openmeter/event/ mostly use [entity-segment constants, eventtype identity triple, resource paths via compose helpers] but this folder does not", + "expected": [ + "entity-segment constants", + "eventtype identity triple", + "json-stable field tags", + "resource paths via compose helpers", + "validatable value type" + ], + "actual": [ + "json-stable field tags", + "validatable value type" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/serializer", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [compile-time interface assertion, resolver interface, template-driven topic naming, validating constructor returning pointer + error] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "serializer interface contract", + "symmetric encode/decode helpers" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ingest/kafkaingest/topicresolver", + "message": "Siblings under openmeter/ingest/kafkaingest/ mostly use [dedupe-derived kafka key, flat cloudeventskafkapayload struct, optional-data guard, serializer interface contract, symmetric encode/decode helpers] but this folder does not", + "expected": [ + "compile-time interface assertion", + "dedupe-derived kafka key", + "flat cloudeventskafkapayload struct", + "optional-data guard", + "resolver interface", + "serializer interface contract", + "symmetric encode/decode helpers", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "actual": [ + "compile-time interface assertion", + "resolver interface", + "template-driven topic naming", + "validating constructor returning pointer + error" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/adapter", + "message": "Siblings under openmeter/ledger/account/ mostly use [data-to-domain mapping, deterministic lock ordering, nil-locker tolerance, self-wired live services, transaction.run for multi-step writes, validate-then-delegate] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "route normalization before persistence/query", + "transactingrepo wrapping", + "txuser implementation" + ], + "severity": "warn" + }, + { + "type": "pattern_divergence", + "folder": "openmeter/ledger/account/service", + "message": "Siblings under openmeter/ledger/account/ mostly use [eager-load required edges then validate, idempotent ensure via onconflict resolvewithignore, map* projector functions, route normalization before persistence/query, transactingrepo wrapping, txuser implementation] but this folder does not", + "expected": [ + "data-to-domain mapping", + "deterministic lock ordering", + "eager-load required edges then validate", + "idempotent ensure via onconflict resolvewithignore", + "map* projector functions", + "nil-locker tolerance", + "route normalization before persistence/query", + "self-wired live services", + "transactingrepo wrapping", + "transaction.run for multi-step writes", + "txuser implementation", + "validate-then-delegate" + ], + "actual": [ + "data-to-domain mapping", + "deterministic lock ordering", + "nil-locker tolerance", + "self-wired live services", + "transaction.run for multi-step writes", + "validate-then-delegate" + ], + "severity": "warn" + } + ], + "naming_violations": [], + "dependency_violations": [ + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Server entrypoint & DI bootstrap imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/server/main.go", + "import": "pkg/errorsx", + "message": "Server entrypoint & DI bootstrap imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Billing domain", + "file": "cmd/server/wire.go", + "import": "openmeter/billing/creditgrant", + "message": "Server entrypoint & DI bootstrap imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Customer domain", + "file": "cmd/server/wire.go", + "import": "openmeter/customer", + "message": "Server entrypoint & DI bootstrap imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Generated Ent client", + "file": "cmd/server/wire.go", + "import": "openmeter/ent/db", + "message": "Server entrypoint & DI bootstrap imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Ledger domain", + "file": "cmd/server/wire.go", + "import": "openmeter/ledger", + "message": "Server entrypoint & DI bootstrap imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Meter domain", + "file": "cmd/server/wire.go", + "import": "openmeter/meter", + "message": "Server entrypoint & DI bootstrap imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Notification domain", + "file": "cmd/server/wire.go", + "import": "openmeter/notification", + "message": "Server entrypoint & DI bootstrap imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Product catalog domain", + "file": "cmd/server/wire.go", + "import": "openmeter/productcatalog/addon", + "message": "Server entrypoint & DI bootstrap imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Registry & builder", + "file": "cmd/server/wire.go", + "import": "openmeter/registry", + "message": "Server entrypoint & DI bootstrap imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Server entrypoint & DI bootstrap", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/server/wire.go", + "import": "openmeter/streaming", + "message": "Server entrypoint & DI bootstrap imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Shared utility packages (pkg/)", + "file": "cmd/balance-worker/main.go", + "import": "pkg/log", + "message": "Worker & job entrypoints imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ledger domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/ledger", + "message": "Worker & job entrypoints imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Meter domain", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/meter", + "message": "Worker & job entrypoints imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "cmd/billing-worker/wire.go", + "import": "openmeter/streaming", + "message": "Worker & job entrypoints imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Product catalog domain", + "file": "cmd/billing-worker/wire_gen.go", + "import": "openmeter/productcatalog/featureresolver", + "message": "Worker & job entrypoints imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Billing domain", + "file": "cmd/jobs/billing/advance/advance.go", + "import": "openmeter/billing", + "message": "Worker & job entrypoints imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Customer domain", + "file": "cmd/jobs/billing/advancecharges/advancecharges.go", + "import": "openmeter/customer", + "message": "Worker & job entrypoints imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Entitlement domain", + "file": "cmd/jobs/entitlement/recalculatesnapshots.go", + "import": "openmeter/entitlement/balanceworker", + "message": "Worker & job entrypoints imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "App / marketplace integrations", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/app", + "message": "Worker & job entrypoints imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Charges sub-system", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/billing/charges/worker/advance", + "message": "Worker & job entrypoints imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Generated Ent client", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/ent/db", + "message": "Worker & job entrypoints imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Notification domain", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/notification", + "message": "Worker & job entrypoints imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Registry & builder", + "file": "cmd/jobs/internal/wire.go", + "import": "openmeter/registry", + "message": "Worker & job entrypoints imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Ingest & sink pipeline", + "file": "cmd/server/main.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Worker & job entrypoints imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Worker & job entrypoints", + "to_component": "Legacy v1 HTTP router", + "file": "cmd/server/main.go", + "import": "openmeter/server/router", + "message": "Worker & job entrypoints imports from Legacy v1 HTTP router but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "App / marketplace integrations", + "file": "app/common/app.go", + "import": "openmeter/app", + "message": "Application wiring (app/common) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Product catalog domain", + "file": "app/common/billing.go", + "import": "openmeter/productcatalog/feature", + "message": "Application wiring (app/common) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Shared utility packages (pkg/)", + "file": "app/common/billing.go", + "import": "pkg/featuregate", + "message": "Application wiring (app/common) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "app/common/charges.go", + "import": "openmeter/ledger/collector", + "message": "Application wiring (app/common) imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Registry & builder", + "file": "app/common/customer.go", + "import": "openmeter/registry", + "message": "Application wiring (app/common) imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Database migrations", + "file": "app/common/database.go", + "import": "tools/migrate", + "message": "Application wiring (app/common) imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Entitlement domain", + "file": "app/common/entitlement.go", + "import": "openmeter/entitlement/validators/customer", + "message": "Application wiring (app/common) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Generated API contract & v1 server interface", + "file": "app/common/ffx.go", + "import": "api", + "message": "Application wiring (app/common) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Subscription domain", + "file": "app/common/ffx.go", + "import": "openmeter/subscription", + "message": "Application wiring (app/common) imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Ingest & sink pipeline", + "file": "app/common/kafka.go", + "import": "openmeter/ingest/kafkaingest", + "message": "Application wiring (app/common) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Application wiring (app/common)", + "to_component": "Notification domain", + "file": "app/common/notification.go", + "import": "openmeter/notification", + "message": "Application wiring (app/common) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/adapter.go", + "import": "pkg/framework/entutils", + "message": "Billing domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Product catalog domain", + "file": "openmeter/billing/adapter/customeroverride.go", + "import": "openmeter/productcatalog", + "message": "Billing domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/billing/adapter/gatheringinvoice.go", + "import": "api", + "message": "Billing domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Charges sub-system", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/billing/charges/meta", + "message": "Billing domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Billing domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Ledger domain", + "file": "openmeter/billing/charges/service/base_test.go", + "import": "openmeter/ledger/recognizer", + "message": "Billing domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Subscription domain", + "file": "openmeter/billing/validators/customer/customer.go", + "import": "openmeter/subscription", + "message": "Billing domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "import": "openmeter/ledger/collector", + "message": "Billing domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Billing domain", + "to_component": "Entitlement domain", + "file": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "import": "openmeter/entitlement", + "message": "Billing domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Customer domain", + "file": "openmeter/billing/charges/adapter.go", + "import": "openmeter/customer", + "message": "Charges sub-system imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/billing/charges/adapter.go", + "import": "pkg/framework/entutils", + "message": "Charges sub-system imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Product catalog domain", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "openmeter/productcatalog", + "message": "Charges sub-system imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Database migrations", + "file": "openmeter/billing/charges/adapter/search_test.go", + "import": "tools/migrate", + "message": "Charges sub-system imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "import": "openmeter/streaming", + "message": "Charges sub-system imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "App / marketplace integrations", + "file": "openmeter/billing/charges/service/creditpurchase_test.go", + "import": "openmeter/app/custominvoicing", + "message": "Charges sub-system imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Charges sub-system", + "to_component": "Meter domain", + "file": "openmeter/billing/charges/service/featureid_test.go", + "import": "openmeter/meter", + "message": "Charges sub-system imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/customer/adapter.go", + "import": "openmeter/streaming", + "message": "Customer domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/customer/adapter.go", + "import": "pkg/framework/entutils", + "message": "Customer domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/customer/adapter/customer_test.go", + "import": "openmeter/app", + "message": "Customer domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "api", + "message": "Customer domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Entitlement domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/entitlement", + "message": "Customer domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Product catalog domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/productcatalog/subscription/http", + "message": "Customer domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Subscription domain", + "file": "openmeter/customer/httpdriver/apimapping.go", + "import": "openmeter/subscription", + "message": "Customer domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Billing domain", + "file": "openmeter/customer/service/hooks/subjectcustomer.go", + "import": "openmeter/billing", + "message": "Customer domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Meter domain", + "file": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "import": "openmeter/meter/mockadapter", + "message": "Customer domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Customer domain", + "to_component": "Ledger domain", + "file": "openmeter/customer/service/ledger_hook_test.go", + "import": "openmeter/ledger", + "message": "Customer domain imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Subscription domain", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "openmeter/subscription/repo", + "message": "Product catalog domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/productcatalog/adapter/feature.go", + "import": "pkg/clock", + "message": "Product catalog domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "api", + "message": "Product catalog domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Notification domain", + "file": "openmeter/productcatalog/addon/httpdriver/addon.go", + "import": "openmeter/notification", + "message": "Product catalog domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/productcatalog/addon/service/service_test.go", + "import": "openmeter/app", + "message": "Product catalog domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Entitlement domain", + "file": "openmeter/productcatalog/entitlement.go", + "import": "openmeter/entitlement", + "message": "Product catalog domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Product catalog domain", + "to_component": "Customer domain", + "file": "openmeter/productcatalog/subscription/http/create.go", + "import": "openmeter/customer", + "message": "Product catalog domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/subscription/addon/addon.go", + "import": "pkg/models", + "message": "Subscription domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/subscription/addon/diff/apply_test.go", + "import": "openmeter/app", + "message": "Subscription domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/subscription/addon/http/create.go", + "import": "api", + "message": "Subscription domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Database migrations", + "file": "openmeter/subscription/testutils/db.go", + "import": "tools/migrate", + "message": "Subscription domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Meter domain", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/meter", + "message": "Subscription domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Registry & builder", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/registry", + "message": "Subscription domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Subscription domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/subscription/testutils/service.go", + "import": "openmeter/streaming/testutils", + "message": "Subscription domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Customer domain", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "openmeter/customer/adapter", + "message": "Entitlement domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/entitlement/adapter/entitlement.go", + "import": "pkg/clock", + "message": "Entitlement domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Product catalog domain", + "file": "openmeter/entitlement/adapter/entitlement_test.go", + "import": "openmeter/productcatalog/adapter", + "message": "Entitlement domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "import": "openmeter/ingest/kafkaingest/serializer", + "message": "Entitlement domain imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Notification domain", + "file": "openmeter/entitlement/balanceworker/filters.go", + "import": "openmeter/notification", + "message": "Entitlement domain imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Registry & builder", + "file": "openmeter/entitlement/balanceworker/recalculate.go", + "import": "openmeter/registry", + "message": "Entitlement domain imports from Registry & builder but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/entitlement/driver/entitlement.go", + "import": "api", + "message": "Entitlement domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Entitlement domain", + "to_component": "Subscription domain", + "file": "openmeter/entitlement/hooks/subscription/hook.go", + "import": "openmeter/subscription", + "message": "Entitlement domain imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/credit/adapter/balance_snapshot.go", + "import": "pkg/clock", + "message": "Credit & grant domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/credit/balance/service.go", + "import": "openmeter/streaming", + "message": "Credit & grant domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Meter domain", + "file": "openmeter/credit/balance/service_test.go", + "import": "openmeter/meter", + "message": "Credit & grant domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/credit/driver/grant.go", + "import": "api", + "message": "Credit & grant domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Customer domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/customer", + "message": "Credit & grant domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Credit & grant domain", + "to_component": "Entitlement domain", + "file": "openmeter/credit/driver/grant.go", + "import": "openmeter/entitlement/driver", + "message": "Credit & grant domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ledger/account.go", + "import": "pkg/models", + "message": "Ledger domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Database migrations", + "file": "openmeter/ledger/account/adapter/repo_test.go", + "import": "tools/migrate", + "message": "Ledger domain imports from Database migrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Billing domain", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Charges sub-system", + "file": "openmeter/ledger/chargeadapter/annotations.go", + "import": "openmeter/billing/charges/creditpurchase", + "message": "Ledger domain imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Collector (Benthos/Redpanda Connect)", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/ledger/collector", + "message": "Ledger domain imports from Collector (Benthos/Redpanda Connect) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Product catalog domain", + "file": "openmeter/ledger/chargeadapter/flatfee.go", + "import": "openmeter/productcatalog", + "message": "Ledger domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "App / marketplace integrations", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/app", + "message": "Ledger domain imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Meter domain", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/meter", + "message": "Ledger domain imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ledger domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/ledger/customerbalance/testenv_test.go", + "import": "openmeter/streaming/testutils", + "message": "Ledger domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/meter/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Meter domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Product catalog domain", + "file": "openmeter/meter/adapter/manage.go", + "import": "openmeter/productcatalog/adapter", + "message": "Meter domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Customer domain", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/customer", + "message": "Meter domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/meter/httphandler/handler.go", + "import": "openmeter/streaming", + "message": "Meter domain imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Meter domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/meter/httphandler/mapping.go", + "import": "api", + "message": "Meter domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/streaming/clickhouse/connector.go", + "import": "pkg/models", + "message": "Streaming / usage query (ClickHouse) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Streaming / usage query (ClickHouse)", + "to_component": "Customer domain", + "file": "openmeter/streaming/clickhouse/event_query_test.go", + "import": "openmeter/customer", + "message": "Streaming / usage query (ClickHouse) imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ingest/httpdriver/errors.go", + "import": "pkg/framework/commonhttp", + "message": "Ingest & sink pipeline imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ingest & sink pipeline", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/ingest/httpdriver/ingest.go", + "import": "api", + "message": "Ingest & sink pipeline imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/notification/adapter/adapter.go", + "import": "pkg/framework/entutils", + "message": "Notification domain imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/notification/adapter/entitymapping_test.go", + "import": "api", + "message": "Notification domain imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Billing domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/billing", + "message": "Notification domain imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Entitlement domain", + "file": "openmeter/notification/consumer/consumer.go", + "import": "openmeter/entitlement/snapshot", + "message": "Notification domain imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Customer domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/customer/httpdriver", + "message": "Notification domain imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Notification domain", + "to_component": "Product catalog domain", + "file": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "import": "openmeter/productcatalog/driver", + "message": "Notification domain imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/app/adapter.go", + "import": "pkg/framework/entutils", + "message": "App / marketplace integrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Billing domain", + "file": "openmeter/app/custominvoicing/app.go", + "import": "openmeter/billing", + "message": "App / marketplace integrations imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Generated API contract & v1 server interface", + "file": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "import": "api", + "message": "App / marketplace integrations imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "App / marketplace integrations", + "to_component": "Product catalog domain", + "file": "openmeter/app/stripe/appinvoice.go", + "import": "openmeter/productcatalog", + "message": "App / marketplace integrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Product catalog domain", + "file": "openmeter/ent/schema/addon.go", + "import": "openmeter/productcatalog", + "message": "Ent schema (DB source of truth) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/schema/addon.go", + "import": "pkg/framework/entutils", + "message": "Ent schema (DB source of truth) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/schema/app.go", + "import": "openmeter/app", + "message": "Ent schema (DB source of truth) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/schema/balance_snapshot.go", + "import": "openmeter/credit/balance", + "message": "Ent schema (DB source of truth) imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Billing domain", + "file": "openmeter/ent/schema/billing.go", + "import": "openmeter/billing", + "message": "Ent schema (DB source of truth) imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Charges sub-system", + "file": "openmeter/ent/schema/charges.go", + "import": "openmeter/billing/charges/meta", + "message": "Ent schema (DB source of truth) imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Entitlement domain", + "file": "openmeter/ent/schema/entitlement.go", + "import": "openmeter/entitlement", + "message": "Ent schema (DB source of truth) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Ledger domain", + "file": "openmeter/ent/schema/ledger_account.go", + "import": "openmeter/ledger", + "message": "Ent schema (DB source of truth) imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Meter domain", + "file": "openmeter/ent/schema/meter.go", + "import": "openmeter/meter", + "message": "Ent schema (DB source of truth) imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Ent schema (DB source of truth)", + "to_component": "Notification domain", + "file": "openmeter/ent/schema/notification.go", + "import": "openmeter/notification", + "message": "Ent schema (DB source of truth) imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Product catalog domain", + "file": "openmeter/ent/db/addon.go", + "import": "openmeter/productcatalog", + "message": "Generated Ent client imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/ent/db/addon.go", + "import": "pkg/models", + "message": "Generated Ent client imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "App / marketplace integrations", + "file": "openmeter/ent/db/app.go", + "import": "openmeter/app", + "message": "Generated Ent client imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Credit & grant domain", + "file": "openmeter/ent/db/balancesnapshot.go", + "import": "openmeter/credit/balance", + "message": "Generated Ent client imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Billing domain", + "file": "openmeter/ent/db/billingcustomeroverride.go", + "import": "openmeter/billing", + "message": "Generated Ent client imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Charges sub-system", + "file": "openmeter/ent/db/charge.go", + "import": "openmeter/billing/charges/meta", + "message": "Generated Ent client imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Ledger domain", + "file": "openmeter/ent/db/ledgeraccount.go", + "import": "openmeter/ledger", + "message": "Generated Ent client imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Meter domain", + "file": "openmeter/ent/db/meter.go", + "import": "openmeter/meter", + "message": "Generated Ent client imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated Ent client", + "to_component": "Notification domain", + "file": "openmeter/ent/db/mutation.go", + "import": "openmeter/notification", + "message": "Generated Ent client imports from Notification domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Customer domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/customer", + "message": "Registry & builder imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Generated Ent client", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/ent/db", + "message": "Registry & builder imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Meter domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/meter", + "message": "Registry & builder imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Product catalog domain", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/productcatalog/adapter", + "message": "Registry & builder imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "openmeter/streaming", + "message": "Registry & builder imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Registry & builder", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/registry/builder/entitlement.go", + "import": "pkg/framework/lockr", + "message": "Registry & builder imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "App / marketplace integrations", + "file": "openmeter/server/router/appcustominvoicing.go", + "import": "openmeter/app/custominvoicing/httpdriver", + "message": "Legacy v1 HTTP router imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Shared utility packages (pkg/)", + "file": "openmeter/server/router/appstripe.go", + "import": "pkg/models", + "message": "Legacy v1 HTTP router imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Credit & grant domain", + "file": "openmeter/server/router/credit.go", + "import": "openmeter/credit/driver", + "message": "Legacy v1 HTTP router imports from Credit & grant domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "v3 API layer (AIP-style)", + "file": "openmeter/server/router/router.go", + "import": "api/v3/handlers/currencies", + "message": "Legacy v1 HTTP router imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Charges sub-system", + "file": "openmeter/server/router/router.go", + "import": "openmeter/billing/charges", + "message": "Legacy v1 HTTP router imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Ingest & sink pipeline", + "file": "openmeter/server/router/router.go", + "import": "openmeter/ingest", + "message": "Legacy v1 HTTP router imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "openmeter/server/router/router.go", + "import": "openmeter/streaming", + "message": "Legacy v1 HTTP router imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Legacy v1 HTTP router", + "to_component": "Subscription domain", + "file": "openmeter/server/router/router.go", + "import": "openmeter/subscription", + "message": "Legacy v1 HTTP router imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Generated API contract & v1 server interface", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "v3 API layer (AIP-style) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "v3 API layer (AIP-style) imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Shared utility packages (pkg/)", + "file": "api/v3/apierrors/encoder.go", + "import": "pkg/framework/commonhttp", + "message": "v3 API layer (AIP-style) imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "v3 API layer (AIP-style) imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "v3 API layer (AIP-style) imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "v3 API layer (AIP-style) imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "v3 API layer (AIP-style)", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "v3 API layer (AIP-style) imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Shared utility packages (pkg/)", + "file": "api/api.gen.go", + "import": "pkg/models", + "message": "Generated API contract & v1 server interface imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Meter domain", + "file": "api/client/go/client_test.go", + "import": "openmeter/meter", + "message": "Generated API contract & v1 server interface imports from Meter domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "v3 API layer (AIP-style)", + "file": "api/v3/api.gen.go", + "import": "api/v3/filters", + "message": "Generated API contract & v1 server interface imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Product catalog domain", + "file": "api/v3/apierrors/encoder.go", + "import": "openmeter/productcatalog/feature", + "message": "Generated API contract & v1 server interface imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "App / marketplace integrations", + "file": "api/v3/handlers/apps/convert.gen.go", + "import": "openmeter/app", + "message": "Generated API contract & v1 server interface imports from App / marketplace integrations but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Billing domain", + "file": "api/v3/handlers/billingprofiles/convert.gen.go", + "import": "openmeter/billing", + "message": "Generated API contract & v1 server interface imports from Billing domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Customer domain", + "file": "api/v3/handlers/customers/billing/convert.go", + "import": "openmeter/customer", + "message": "Generated API contract & v1 server interface imports from Customer domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Charges sub-system", + "file": "api/v3/handlers/customers/charges/convert.go", + "import": "openmeter/billing/charges", + "message": "Generated API contract & v1 server interface imports from Charges sub-system but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ledger domain", + "file": "api/v3/handlers/customers/credits/convert.go", + "import": "openmeter/ledger", + "message": "Generated API contract & v1 server interface imports from Ledger domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Entitlement domain", + "file": "api/v3/handlers/customers/entitlementaccess/handler.go", + "import": "openmeter/entitlement", + "message": "Generated API contract & v1 server interface imports from Entitlement domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Streaming / usage query (ClickHouse)", + "file": "api/v3/handlers/events/convert.go", + "import": "openmeter/streaming", + "message": "Generated API contract & v1 server interface imports from Streaming / usage query (ClickHouse) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Ingest & sink pipeline", + "file": "api/v3/handlers/events/handler.go", + "import": "openmeter/ingest", + "message": "Generated API contract & v1 server interface imports from Ingest & sink pipeline but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Generated API contract & v1 server interface", + "to_component": "Subscription domain", + "file": "api/v3/handlers/subscriptions/cancel.go", + "import": "openmeter/subscription", + "message": "Generated API contract & v1 server interface imports from Subscription domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Collector (Benthos/Redpanda Connect)", + "to_component": "Generated API contract & v1 server interface", + "file": "collector/benthos/output/openmeter.go", + "import": "api/client/go", + "message": "Collector (Benthos/Redpanda Connect) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated API contract & v1 server interface", + "file": "pkg/errorsx/helpers.go", + "import": "api", + "message": "Shared utility packages (pkg/) imports from Generated API contract & v1 server interface but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "v3 API layer (AIP-style)", + "file": "pkg/errorsx/helpers.go", + "import": "api/v3", + "message": "Shared utility packages (pkg/) imports from v3 API layer (AIP-style) but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Shared utility packages (pkg/)", + "to_component": "Generated Ent client", + "file": "pkg/framework/entutils/entdriver/driver.go", + "import": "openmeter/ent/db", + "message": "Shared utility packages (pkg/) imports from Generated Ent client but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Product catalog domain", + "file": "tools/migrate/productcatalog_test.go", + "import": "openmeter/productcatalog", + "message": "Database migrations imports from Product catalog domain but does not declare it as a dependency", + "severity": "warn" + }, + { + "type": "dependency_violation", + "from_component": "Database migrations", + "to_component": "Shared utility packages (pkg/)", + "file": "tools/migrate/viewgen/viewgen.go", + "import": "pkg/strcase", + "message": "Database migrations imports from Shared utility packages (pkg/) but does not declare it as a dependency", + "severity": "warn" + } + ], + "structural_outliers": [ + { + "type": "structural_outlier", + "folder": "api/client/go", + "message": "Uses [.go, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/javascript", + "message": "Uses [.json, .ts, .yaml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "api/client/python", + "message": "Uses [.in, .toml] while siblings mostly use [.md]", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "openmeter/billing", + "message": "Has 41 files \u2014 significantly more than sibling average (8). May be a god-folder that should be split.", + "severity": "info" + }, + { + "type": "structural_outlier", + "folder": "pkg/models", + "message": "Has 28 files \u2014 significantly more than sibling average (4). May be a god-folder that should be split.", + "severity": "info" + } + ], + "antipattern_clusters": [], + "summary": { + "total_findings": 268, + "warnings": 255, + "informational": 5, + "checks_run": [ + "pattern_divergences", + "naming_violations", + "dependency_violations", + "structural_outliers", + "antipattern_clusters" + ], + "timestamp": "2026-06-05T17:18:39.481531+00:00", + "deep_findings": 33 + }, + "deep_findings": [ + { + "folder": "api/v3/handlers/customers/billing", + "file": "api/v3/handlers/customers/billing/update_billing.go", + "type": "responsibility_leak", + "severity": "error", + "decision_or_pattern": "v3 handlers must be thin delegators to shared domain services (dec-api-surface-001 / two-coexisting-HTTP-surfaces)", + "evidence": "The handle func (lines 83-193) resolves the payment app from override.MergedProfile.Apps.Payment, switches over application.GetType() (app.AppTypeStripe / AppTypeCustomInvoicing / AppTypeSandbox), performs Stripe required-field validation, constructs per-app app.CustomerData (appstripe.CustomerData / appcustominvoicing.CustomerData / appsandbox.CustomerData), then calls application.UpsertCustomerData(...) and h.billingService.UpsertCustomerOverride(...) directly. The handler orchestrates the customer-billing-data upsert across the app + billing domains instead of delegating to a single billing/customer service method.", + "message": "Customer-billing app-data orchestration (select payment app, branch on app type, build app-specific CustomerData, upsert app data + billing override) lives in the v3 handler rather than in a billing/customer service. v3 handlers should be thin delegators; this app-type dispatch and multi-service orchestration belongs in a domain service so it can be reused and tested independently of the transport layer." + }, + { + "folder": "api/v3/handlers/customers/billing", + "file": "api/v3/handlers/customers/billing/update_billing_app_data.go", + "type": "semantic_duplication", + "severity": "error", + "decision_or_pattern": "v3 handlers must be thin delegators; avoid semantic duplication across handlers", + "evidence": "The handle func (lines 73-138) repeats the exact same logic found in update_billing.go: resolve application = override.MergedProfile.Apps.Payment, switch over application.GetType() (Stripe / CustomInvoicing / Sandbox), the identical Stripe 'stripe data is required' and 'stripe customer id is required' BadRequest validations, the same appstripe.CustomerData / appcustominvoicing.CustomerData / appsandbox.CustomerData construction, and the same application.UpsertCustomerData(app.UpsertAppInstanceCustomerDataInput{...}) call. Two handler files carry byte-for-byte equivalent app-type dispatch and upsert logic.", + "message": "update_billing_app_data.go and update_billing.go duplicate the same app-type switch, Stripe field validation, per-app CustomerData construction, and UpsertCustomerData call. This domain orchestration should be extracted into one shared billing/customer service method so the two endpoints delegate rather than each re-implementing it; the duplication guarantees the two surfaces drift when app handling changes." + }, + { + "folder": "api/v3/handlers/customers/billing", + "file": "api/v3/handlers/customers/billing/get_billing.go", + "type": "responsibility_leak", + "severity": "warn", + "decision_or_pattern": "v3 handlers must be thin delegators to shared domain services", + "evidence": "The handle func (lines 45-98) selects application = override.MergedProfile.Apps.Payment and switches over application.GetType() (app.AppTypeStripe / AppTypeCustomInvoicing / AppTypeSandbox), type-asserting the returned app.CustomerData into appstripe.CustomerData / appcustominvoicing.CustomerData and assembling api.BillingAppCustomerData per app type. The per-app-type read mapping is the mirror of the write branching in update_billing.go / update_billing_app_data.go and lives in the handler.", + "message": "The customer-billing read path branches by app type (Stripe/CustomInvoicing/Sandbox) and maps each app's CustomerData inside the handler. This per-app-type knowledge belongs behind a billing/customer service that returns a normalized customer-billing view; keeping it in the handler couples the transport layer to every app integration and mirrors the write-side duplication." + }, + { + "folder": "api/v3/handlers/customers", + "file": "api/v3/handlers/customers/upsert.go", + "type": "responsibility_leak", + "severity": "warn", + "decision_or_pattern": "v3 handlers must be thin delegators; business logic belongs in the domain service", + "evidence": "The handle func (lines 56-97) contains a self-documented FIXME ('Normally, we should avoid putting business logic in handlers, and we should avoid such extra round-trips, since service.UpdateCustomer performs similar checks under the hood') and then performs an extra GetCustomer round-trip purely to backfill cus.Key into request.CustomerMutate.Key before calling UpdateCustomer, working around the fact that UpdateCustomer wipes a nil key.", + "message": "The upsert handler reimplements key-preservation logic (get-then-backfill the key) to work around UpdateCustomer's nil-key-wipe behavior, with an explicit FIXME acknowledging the business logic should not be in the handler. This invariant (key is immutable on upsert) should be enforced by a customer service upsert method so the handler can delegate without the extra round-trip and domain workaround." + }, + { + "folder": "api/v3/handlers/subscriptions", + "file": "api/v3/handlers/subscriptions/create.go", + "type": "responsibility_leak", + "severity": "warn", + "decision_or_pattern": "v3 handlers must be thin delegators to shared domain services", + "evidence": "getCustomerByIDOrKey (lines 142-166, '// TODO: move this to the customer service') and getPlanByIDOrKey (lines 168-199, '// TODO: move this to the plan service') implement id-or-key resolution branching (build customer.GetCustomerInput / plan.GetPlanInput with ID vs Key vs latest-version semantics) in the handler package. These are invoked from both create.go and change.go.", + "message": "ID-or-key lookup resolution for customers and plans lives in the subscriptions handler package (with TODOs admitting it should move to the respective services). This is domain resolution logic that the customer and plan services should own (e.g. a GetByRef method), so all surfaces share one resolution rule rather than the v3 handler carrying it." + }, + { + "folder": "api/v3/handlers/currencies", + "file": "api/v3/handlers/currencies/create.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Typed error encoder chain (apierrors.GenericErrorEncoder) on every v3 handler", + "evidence": "CreateCurrency() (lines 21-50) appends only WithOperationName via AppendOptions and omits httptransport.WithErrorEncoder(apierrors.GenericErrorEncoder()), unlike essentially every other v3 handler (e.g. create-feature, query-meter, list-credit-transactions) which append it. It also resolves the namespace via h.namespaceDecoder.GetNamespace directly instead of the shared resolveNamespace closure used elsewhere.", + "message": "The currencies create handler bypasses the per-handler typed error-encoder convention (no apierrors.GenericErrorEncoder()), so domain errors are mapped only by the default httptransport path rather than the v3 apierrors chain that the rest of the surface relies on for consistent RFC7807/status mapping. Append the GenericErrorEncoder like the other handlers (and prefer the shared resolveNamespace for consistency)." + }, + { + "folder": "api/v3/handlers/currencies", + "file": "api/v3/handlers/currencies/create_cost_basis.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Typed error encoder chain (apierrors.GenericErrorEncoder) on every v3 handler", + "evidence": "The currencies cost-basis create handler is among the only v3 handlers that do not append httptransport.WithErrorEncoder(apierrors.GenericErrorEncoder()) (confirmed by grep over api/v3/handlers: only currencies/create.go, currencies/create_cost_basis.go, and subscriptionaddons/get.go lack it).", + "message": "create_cost_basis omits the per-handler apierrors.GenericErrorEncoder() that the rest of the v3 surface attaches, diverging from the uniform typed-error-to-status mapping convention. Add the encoder so currency cost-basis errors render through the same v3 apierrors path as every other endpoint." + }, + { + "folder": "api/v3/handlers/subscriptions/subscriptionaddons", + "file": "api/v3/handlers/subscriptions/subscriptionaddons/get.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Typed error encoder chain (apierrors.GenericErrorEncoder) on every v3 handler", + "evidence": "GetSubscriptionAddon() (lines 25-58) returns models.NewGenericNotFoundError(...) from the operation but appends only WithOperationName, omitting httptransport.WithErrorEncoder(apierrors.GenericErrorEncoder()). The GenericErrorEncoder (api/v3/apierrors/encoder.go) is what runs HandleIssueIfHTTPStatusKnown to map the not-found validation issue to a 404 at the handler level.", + "message": "The subscription-addon get handler emits a GenericNotFoundError but skips the per-handler apierrors.GenericErrorEncoder() that maps such domain errors to the correct HTTP status, unlike sibling v3 handlers. Without the encoder the not-found mapping depends on the fallback path rather than the documented typed-encoder chain; append GenericErrorEncoder() for consistent 404 rendering." + }, + { + "folder": "openmeter/billing/worker/collect", + "file": "openmeter/billing/worker/collect/collect.go", + "type": "pitfall_triggered", + "severity": "error", + "decision_or_pattern": "Per-customer concurrent fan-out (goroutine-per-customer WaitGroup)", + "evidence": "InvoiceCollector.All() spawns one goroutine per customer (line 187 `go func()`), and each goroutine writes the OUTER loop variable `err` (declared in All's enclosing scope and reused by the `for err = range errChan` drain at line 207): line 190 `_, err = a.CollectCustomerInvoice(ctx, ...)` then line 195 `err = fmt.Errorf(...)` then line 198 `errChan <- err`. Multiple goroutines assign and read the same shared `err` variable concurrently with no synchronization. collect.go's own CLAUDE.md documents this as 'same race shape as advance.go; scope err locally in new code.'", + "message": "Data race on the shared `err` variable in InvoiceCollector.All(): every fan-out goroutine writes (`_, err = ...`, `err = fmt.Errorf(...)`) and then sends the same package-scoped `err` over errChan, while the drain loop also assigns it. Under `-race` this is a real WriteWrite/WriteRead race; functionally a goroutine can overwrite another's error before it is sent, so failures can be lost or misattributed to the wrong customer. Declare `err` locally inside the goroutine closure (`localErr := a.CollectCustomerInvoice(...)`) and send that. This is duplicated verbatim from the advance package, so the fix should be applied consistently to both." + }, + { + "folder": "openmeter/billing/adapter", + "file": "openmeter/billing/adapter/lock.go", + "type": "trade_off_undermined", + "severity": "error", + "decision_or_pattern": "Pessimistic per-customer serialization via BillingCustomerLock upsert + FOR UPDATE", + "evidence": "UpsertCustomerLock (lines 16-31) does `err := a.db.BillingCustomerLock.Create()...OnConflict(DoNothing()).Exec(ctx)`, then `if err != nil { if err == sql.ErrNoRows { return nil } }` and unconditionally falls through to `return nil`. There is no `return err` for any error other than sql.ErrNoRows, so a genuine DB error (connection failure, constraint, context cancellation) is silently swallowed and reported as success.", + "message": "UpsertCustomerLock swallows all non-ErrNoRows errors and always returns nil. The customer lock row is the load-bearing primitive for per-customer billing serialization (transactionForInvoiceManipulation upserts it before taking FOR UPDATE). A swallowed DB error here means the caller believes the lock row exists/was created when it may not, and the subsequent FOR UPDATE / mutation proceeds on a false premise. Return the error for any err != sql.ErrNoRows (and prefer errors.Is) instead of falling through to `return nil`. This also trips the universal `decay-empty-catch` rule for a financial-path primitive." + }, + { + "folder": "openmeter/billing/service", + "file": "openmeter/billing/service/service.go", + "type": "responsibility_leak", + "severity": "error", + "decision_or_pattern": "ConfigService wither methods return a (cloned) Service, not mutate in place", + "evidence": "WithAdvancementStrategy uses a value receiver `func (s Service) WithAdvancementStrategy(...) billing.Service { s.advancementStrategy = strategy; return &s }` (line 204, copy-then-return-pointer-to-copy). WithLockedNamespaces uses a POINTER receiver `func (s *Service) WithLockedNamespaces(namespaces []string) billing.Service { s.fsNamespaceLockdown = namespaces; return s }` (lines 210-214), mutating the shared *Service and returning the same pointer. billing/CLAUDE.md states: 'ConfigService.WithAdvancementStrategy/WithLockedNamespaces return a (cloned) Service, they do not mutate in place.'", + "message": "WithLockedNamespaces violates the documented wither contract of ConfigService: it mutates the receiver's fsNamespaceLockdown in place (pointer receiver) and returns the same instance, whereas the sibling WithAdvancementStrategy correctly returns a clone. Because the same *Service is shared across all callers/wiring, `svc.WithLockedNamespaces(ns)` retroactively locks namespaces for every other holder of that service (and the change persists after the 'derived' service goes out of scope) \u2014 namespace lockdown is then applied globally and silently. Switch to a value receiver so a clone is returned, matching WithAdvancementStrategy and the interface's clone semantics." + }, + { + "folder": "openmeter/billing/worker/subscriptionsync/service", + "file": "openmeter/billing/worker/subscriptionsync/service/sync.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Use clock.Now() (not time.Now()) so frozen-time tests are deterministic", + "evidence": "HandleSubscriptionSyncEvent (sync.go:60) passes `time.Now()` as the asOf sync reference: `return s.synchronizeSubscriptionAndInvoiceCustomer(ctx, newSubscriptionReferenceOrView(event.Subscription), time.Now())`. The sibling event handlers in handlers.go all use clock.Now() for the same purpose (HandleCancelledEvent uses `now := clock.Now()` line 19; HandleInvoiceCreation uses clock.Now() line 70; HandleDeletedEvent uses clock.Now() line 81). subscriptionsync/service/CLAUDE.md anti-patterns: 'Introducing context.Background()/time.Now() ad hoc instead of propagating ctx and using clock.Now()'.", + "message": "HandleSubscriptionSyncEvent uses time.Now() for the sync asOf while every other event handler in the same package (handlers.go) uses clock.Now(). This is an internal inconsistency that breaks frozen-time (clock.FreezeTime) determinism for this one handler and diverges from the package's own documented convention. Replace time.Now() with clock.Now() so the SubscriptionSyncEvent path matches the cancelled/deleted/invoice-creation handlers." + }, + { + "folder": "openmeter/billing/service/invoicecalc", + "file": "openmeter/billing/service/invoicecalc/gatheringrealtime.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Use clock.Now() in service-layer time stamping for frozen-time test determinism", + "evidence": "FillGatheringDetailedLineMeta stamps child.CreatedAt = time.Now() (line 23) and child.UpdatedAt = time.Now() (line 27) directly in the invoicecalc pipeline, which the package CLAUDE.md describes as the 'Pure, stateless calculation pipeline' relied on by clock-frozen unit tests (collectionat_test.go, taxconfig_test.go). The rest of the billing service/calc stack uses pkg/clock (e.g. stdinvoicestate.go uses clock.Now() throughout).", + "message": "gatheringrealtime.go stamps detailed-line CreatedAt/UpdatedAt via time.Now() inside the otherwise-pure invoicecalc pipeline, diverging from the repo-wide clock.Now() convention. This makes the real-time gathering preview non-deterministic under clock.FreezeTime and inconsistent with how the invoice state machine and other calc steps obtain time. Use clock.Now().UTC() so previews are testable with frozen time and stamp UTC consistently." + }, + { + "folder": "openmeter/billing/service", + "file": "openmeter/billing/service/invoice.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Invoice status transitions go through the qmuntal/stateless Permit edges, not direct status mutation", + "evidence": "SimulateInvoice (func at invoice.go:852) directly assigns `invoice.Status = billing.StandardInvoiceStatusDraftInvalid` and `invoice.StatusDetails.Failed = true` (lines 975-976) by scanning ValidationIssues, instead of driving the InvoiceStateMachine (TriggerFailed -> StandardInvoiceStatusDraftInvalid) that owns this transition in stdinvoicestate.go. patterns.md / billing-lifecycle enforcement: 'Do not mutate invoice.status directly ... every legal transition must be declared as a Permit edge.'", + "message": "SimulateInvoice hand-sets the draft.invalid status and Failed flag rather than running the state machine. While this is a read-only simulation that never persists (so it does not corrupt durable state), it duplicates the FSM's failed-transition semantics outside the single Permit-edge source of truth in stdinvoicestate.go; if the failed-state derivation (e.g. additional side effects in the DraftInvalid OnActive, or future status-detail computation) changes, the simulated path will silently drift from the real one. Prefer running the FSM (or a shared helper that derives status from critical issues) so simulation and live advancement cannot diverge." + }, + { + "folder": "openmeter/billing/charges/creditpurchase/service", + "file": "openmeter/billing/charges/creditpurchase/service/invoice.go", + "type": "decision_violation", + "severity": "error", + "decision_or_pattern": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles (dec-fsm-001 / tr-fsm-002)", + "evidence": "PostInvoiceDraftCreated sets `charge.Status = creditpurchase.StatusActive` then calls `s.adapter.UpdateCharge(ctx, charge.ChargeBase)` directly (lines 43-45); PostInvoicePaymentSettled sets `charge.Status = creditpurchase.StatusFinal` then `s.adapter.UpdateCharge` directly (lines 124-126).", + "message": "Credit-purchase invoice-settlement status transitions mutate charge.Status directly and persist via the adapter instead of driving them through the chargestatemachine FSM, bypassing the Permit/guard edge set so illegal transitions and missed side-effects (e.g. patch accumulation) become possible \u2014 exactly the anti-pattern the creditpurchase/service CLAUDE.md calls out ('Bypassing the settlement-type state machine and mutating charge.Status directly')." + }, + { + "folder": "openmeter/billing/charges/creditpurchase/service", + "file": "openmeter/billing/charges/creditpurchase/service/external.go", + "type": "decision_violation", + "severity": "error", + "decision_or_pattern": "Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles (dec-fsm-001 / tr-fsm-002)", + "evidence": "onExternalCreditPurchase sets `charge.Status = creditpurchase.StatusActive` then `s.adapter.UpdateCharge(ctx, charge.ChargeBase)` (lines 51-53); HandleExternalPaymentSettled sets `charge.Status = creditpurchase.StatusFinal` then `s.adapter.UpdateCharge` (lines 168-170). Only the promotional path uses NewPromotionalCreditPurchaseStateMachine.", + "message": "External credit-purchase settlement performs status transitions by direct field mutation plus adapter.UpdateCharge rather than through the chargestatemachine FSM (whose StatusActive transitions are never wired for the external/invoice settlement types in statemachine.go), eroding the 'one generic Machine drives every charge-type transition' decision and leaving the charge lifecycle for two of three settlement types outside the state machine." + }, + { + "folder": "openmeter/billing/charges/usagebased/service", + "file": "openmeter/billing/charges/usagebased/service/statemachine.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "In production constructors always require and inject *slog.Logger via Config; never fall back to slog.Default() (prac-slog-001)", + "evidence": "newStateMachineBase sets `Logger: lo.CoalesceOrEmpty(config.Logger, slog.Default())` (line 94); the surrounding usagebased service Config (service.go) has no Logger field at all, so the per-state-machine Logger silently degrades to slog.Default() in production.", + "message": "The usage-based charge state machine falls back to slog.Default() instead of requiring an injected logger, violating the project rule that production code must never use slog.Default() \u2014 it hides the dependency and yields uncontrolled logging configuration for the IsAfterCollectionPeriod error path that logs against this logger." + }, + { + "folder": "openmeter/billing/charges/creditpurchase/adapter", + "file": "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go", + "type": "abstraction_bypass", + "severity": "warn", + "decision_or_pattern": "Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx) (dec-tx-001 / dec-tx-002)", + "evidence": "Adapter method `ListFundedCreditActivities` delegates to `ListFundedCreditActivities(ctx, a.db, input)`, passing the raw non-tx `a.db`; the package-level function queries Ent (`dbClient.ChargeCreditPurchaseCreditGrant.Query()...`) with no entutils.TransactingRepo wrapper, so it never rebinds to a *TxDriver carried on ctx.", + "message": "The read uses the base `a.db` directly instead of the ctx-bound tx client, so when called inside a caller's transaction it reads outside that transaction (missing uncommitted writes / stale snapshot) \u2014 contradicting this adapter's own CLAUDE.md rule that every method (even helpers handed a raw *entdb.Client) must wrap its body in entutils.TransactingRepo and never use a.db directly." + }, + { + "folder": "openmeter/ledger/chargeadapter", + "file": "openmeter/ledger/chargeadapter/usagebased.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Stamp charge annotations on every input and the group", + "evidence": "usageBasedHandler.OnInvoiceUsageAccrued (lines 83-87) calls transactions.GroupInputs(...inputs...) with the charge annotations only at group level, omitting the per-input `for i, txInput := range inputs { inputs[i] = transactions.WithAnnotations(txInput, annotations) }` loop that flatfee.go OnInvoiceUsageAccrued (131-135) and this file's own OnPaymentAuthorized (142-146) / OnPaymentSettled (202-206) apply", + "message": "OnInvoiceUsageAccrued commits its ledger group without stamping the charge annotations on each transaction input, contradicting the chargeadapter anti-pattern that requires annotations on both each input AND the group (GroupInputs does not propagate group annotations to inputs)." + }, + { + "folder": "openmeter/ledger/account/adapter", + "file": "openmeter/ledger/account/adapter/subaccount.go", + "type": "abstraction_bypass", + "severity": "warn", + "decision_or_pattern": "Transaction-aware Ent repository (TransactingRepo); charges adapter raw *entdb.Client helpers must still wrap bodies", + "evidence": "private helper resolveOrCreateRoute (lines 71-123) accesses r.db.LedgerSubAccountRoute directly (lines 82, 110) and is NOT wrapped in entutils.TransactingRepo; it only stays tx-safe because EnsureSubAccount happens to invoke it as tx.resolveOrCreateRoute on the rebound repo", + "message": "resolveOrCreateRoute reads/writes routes via r.db outside a TransactingRepo wrapper, so its transaction-safety depends solely on always being called on the tx-rebound receiver \u2014 a latent bypass of the tx-aware-adapter pattern flagged in this folder's anti-patterns." + }, + { + "folder": "openmeter/currencies/adapter", + "file": "openmeter/currencies/adapter/currencies.go", + "type": "abstraction_bypass", + "severity": "error", + "decision_or_pattern": "Transaction-aware Ent repository (TransactingRepo / WithTx / Self)", + "evidence": "Every method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) {...}) but the closure body uses the OUTER receiver `a.db` instead of the rebound `tx.db`: line 48 `q := a.db.CustomCurrency.Query()`, line 90 `curr, err := a.db.CustomCurrency.Create()`, line 109 `costBasis, err := a.db.CurrencyCostBasis.Create()`, line 129 `q := a.db.CurrencyCostBasis.Query()`. The receiver is named `a` (func (a *adapter) ...) and the rebound parameter is named `tx`, so `a.db` is the non-tx base client. Contrast the canonical customer adapter (openmeter/customer/adapter/customer.go:39,234) which uses `repo.db.Customer.Query()` \u2014 the rebound tx client. The sibling taxcode/llmcost adapters instead shadow the receiver name (func(ctx, a *adapter)) so their `a.db` is correctly the tx client.", + "message": "currencies adapter defeats TransactingRepo: all four methods (incl. CreateCurrency and CreateCostBasis) execute against the outer non-tx client `a.db` rather than the rebound `tx.db`. Cross-domain callers that compose a currencies write inside transaction.Run will have those writes silently committed outside their transaction, breaking the atomicity guarantee dec-tx-001 exists to provide. Reference the rebound parameter (rename `tx` to `repo` and use `repo.db`) in every closure." + }, + { + "folder": "openmeter/server", + "file": "openmeter/server/server.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Inject *slog.Logger explicitly via Config; never fall back to slog.Default() (prac-slog-001)", + "evidence": "server.go uses package-level slog and slog.Default() despite an injected logger being available: line 115 `server.NewRequestLoggerMiddleware(slog.Default().Handler())`, line 184 `r.Use(server.NewRequestLoggerMiddleware(slog.Default().Handler()))`, plus construction-error logging via package-level slog.Error at lines 78, 88, 155, 164. config.RouterConfig.Logger (*slog.Logger) is present and nil-checked in openmeter/server/router/router.go:124,471, so an injected logger exists but is bypassed.", + "message": "The HTTP server wires its request-logger middleware from slog.Default() and logs construction errors via package-level slog.Error, even though config.RouterConfig.Logger is injected and validated. AGENTS.md mandates the injected *slog.Logger be used; slog.Default() hides the dependency and yields uncontrolled logging config. Thread config.RouterConfig.Logger into NewServer's middleware and error paths." + }, + { + "folder": "openmeter/currencies/service", + "file": "openmeter/currencies/service/service.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Config-validating constructor: New(Config) (Iface, error) with Config.Validate() (name-config-001 / place-service-001)", + "evidence": "func New(adapter currencies.Adapter) *Service { return &Service{adapter: adapter} } takes a positional dependency, has no Config struct, performs no Config.Validate()/nil-check of the adapter, and returns the concrete *Service rather than the currencies.CurrencyService interface. Sibling services follow the project pattern: taxcode (Config + Validate + New(config) returning interface, openmeter/taxcode/service/service.go:19-43), productcatalog/addon and plan (Config with Logger nil-check, New returning the interface). The Service struct also carries no injected *slog.Logger.", + "message": "currencies service diverges from the standard Config+Validate()+New(Config)(Iface,error) constructor convention: positional adapter arg, no dependency validation, no injected logger, and it returns the concrete struct instead of the domain interface. Adopt the Config struct + Validate() + interface-returning New shape used by taxcode/addon/plan." + }, + { + "folder": "openmeter/llmcost/service", + "file": "openmeter/llmcost/service/service.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Config-validating constructor: New(Config) with Config.Validate() asserting non-nil deps (name-config-001)", + "evidence": "func New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service { return &service{adapter: adapter, logger: logger} } takes positional args with no Config struct and no validation that adapter or logger are non-nil. Project convention (taxcode service.go:19-43, addon/plan service.go) is a Config struct whose Validate() returns errors.New for each missing dependency, invoked at the top of New.", + "message": "llmcost service constructor takes positional adapter+logger and skips dependency validation, diverging from the Config + Config.Validate() (non-nil deps) + New(config) constructor pattern used across the codebase. A nil adapter/logger would only surface as a later nil-pointer panic instead of a clear construction error." + }, + { + "folder": "app/config", + "file": "app/config/telemetry.go", + "type": "pitfall_triggered", + "severity": "warn", + "decision_or_pattern": "Never panic in non-test code; return an error for a recoverable failure mode (pf-ledger-panic-001 / AGENTS.md)", + "evidence": "TraceTelemetryConfig.GetSampler() (line 126) panics on a recoverable parse error: `ratio, err := strconv.ParseFloat(c.Sampler, 64); if err != nil { panic(fmt.Errorf(\"trace: invalid ratio: %w\", err)) }` (line 135-137). The Sampler value is operator-supplied config; an invalid value is a normal user-input failure, not a programmer invariant. The getter's signature returns only sdktrace.Sampler, so the panic was chosen to keep the no-error signature.", + "message": "GetSampler() converts a recoverable config-parse error (invalid trace sampler ratio) into a process panic, violating the AGENTS.md no-panic-in-non-test rule. A malformed `telemetry.trace.sampler` string crashes startup via panic rather than a propagated error. Either validate the sampler in TraceTelemetryConfig.Validate() (so it is rejected before use) or change GetSampler() to return (sdktrace.Sampler, error) and propagate it." + }, + { + "folder": "openmeter/ent/schema", + "file": "openmeter/ent/schema/ledger_account.go", + "type": "pitfall_triggered", + "severity": "warn", + "decision_or_pattern": "Ledger denormalized routing dimensions are FK-less literal columns guarded only by application code", + "evidence": "LedgerSubAccountRoute.Fields() (ledger_account.go:108-135) declares currency (line 118), tax_code (line 120, storing TaxCode.Key as a string, explicitly 'not a FK to the tax_codes table'), tax_behavior, features text[], cost_basis and credit_priority as plain field.String/field.Other(...).Immutable() columns with NO edge to TaxCode/Customer/Currency. The package has no routing_validator coverage for tax_code/currency existence (grep of openmeter/ledger/routing_validator.go for tax_code/TaxCode returns nothing), so a route can be created or persist with a tax_code/currency value that no longer matches any canonical tax_codes/currency row, undetectable at the DB level.", + "message": "LedgerSubAccountRoute denormalizes routing dimensions (currency, tax_code as TaxCode.Key, tax_behavior, features, cost_basis, credit_priority) as immutable literal columns with no FK and no application-level existence validation. This is the documented FK-less-denormalized-routing pitfall (pitfalls.md): referential integrity is enforced only by application code, but no validator asserts tax_code/currency resolve to live canonical rows at route-create time. Add a resolver-side existence check (and a reconciliation test) so an invalid tax_code/currency cannot be written." + }, + { + "folder": "openmeter/ent/schema", + "file": "openmeter/ent/schema/ledger_account.go", + "type": "trade_off_undermined", + "severity": "warn", + "decision_or_pattern": "Ent schema is the DB source of truth, Atlas diffs migrations from it (schema-evolution / atlas.sum destructive-allowed)", + "evidence": "The features column was migrated from jsonb to text[] via a destructive drop-and-recreate: tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql does `ALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"features\", ADD COLUMN \"features\" text[] NULL;` and the matching .down.sql does the same in reverse (DROP + ADD jsonb). Both directions discard any existing per-route features data. The schema field (ledger_account.go:124-127) is the source of this Atlas diff.", + "message": "Changing LedgerSubAccountRoute.features from jsonb to text[] produced a DROP COLUMN + ADD COLUMN migration that silently destroys existing route feature data (and the down migration loses it again). atlas lint allows destructive changes, so this passed migrate-check, but a column-type change on a populated denormalized routing column should be done with a USING cast / data-preserving conversion rather than drop-and-recreate. Confirm no production routes carried features before relying on this migration, and prefer in-place type conversion for future routing-column type changes." + }, + { + "folder": "openmeter/ent/schema", + "file": "openmeter/ent/schema/ledger_entry.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "LedgerEntry/LedgerTransaction are append-only, immutable accounting source of truth (data-models.md: amount immutable, append-only)", + "evidence": "LedgerEntry.Mixin() (ledger_entry.go:19-26) composes entutils.TimeMixin{}, which adds a mutable deleted_at soft-delete column, and Indexes() adds index.Fields(\"created_at\",\"id\").Annotations(entsql.IndexWhere(\"deleted_at IS NULL\")) (ledger_entry.go:68-70) \u2014 i.e. the schema actively supports soft-deleting entries. Yet data-models.md documents LedgerEntry as 'amount immutable', 'append-only', and the per-folder CLAUDE.md states 'LedgerEntry/Transaction fields are Immutable() \u2014 append-only accounting source of truth'. A soft-deletable row contradicts an append-only ledger invariant: a deleted_at write mutates the accounting record.", + "message": "LedgerEntry mixes in TimeMixin (giving it a mutable deleted_at) and even indexes on deleted_at IS NULL, contradicting the documented append-only/immutable accounting-source-of-truth invariant for ledger entries. Either drop the soft-delete capability from the ledger entry/transaction tables (true append-only) or update the documented invariant \u2014 silently allowing soft-deletes on double-entry rows erodes the auditability the ledger design depends on." + }, + { + "folder": "openmeter/ent/schema", + "file": "openmeter/ent/schema/customer.go", + "type": "pitfall_triggered", + "severity": "warn", + "decision_or_pattern": "Add pg_trgm GIN indexes before exposing case-insensitive contains filters (data-modeling enforcement data-customer-ilike-001)", + "evidence": "Customer.Indexes() (customer.go:41-69) carries only plain btree indexes on name (line 64) and primary_email (line 65); the in-code TODO (customer.go:42-55) documents that the v3 filter API exposes case-insensitive contains/ocontains on name, primary_email and key compiling to leading-wildcard ILIKE that these btree indexes cannot serve, and instructs adding pg_trgm GIN indexes via a custom SQL migration 'before exposing the v3 customers list handler'. No pg_trgm/gin_trgm_ops migration exists under tools/migrate/migrations (grep finds none).", + "message": "The customer schema still ships only btree indexes while the documented prerequisite \u2014 a custom pg_trgm GIN migration on lower(name)/lower(primary_email)/lower(key) \u2014 has not been added, even though the v3 customers list filter (ILIKE leading-wildcard) is the consumer this guards. If the v3 list handler is live, every contains-filter request runs a full seq scan (plus a COUNT(*) seq scan). Land the pg_trgm GIN custom SQL migration before the v3 customers list filters are exposed, per the standing TODO." + }, + { + "folder": "test/credits", + "file": "test/credits/sanity_test.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Assert decimal equality in tests via require.Equal on InexactFloat64() (prac-test-decimal-001)", + "evidence": "Dozens of raw decimal-equality booleans: s.True(...Amount.Equal(setup.amount)) (line 1540); s.True(s.MustCustomerReceivableBalance(...).Equal(amount.Neg())) and the whole balance-assertion block (lines 1560-1602, 1665-1729, 2333-2334); the cost-basis settlement matrix (lines 2459-2512); rating sums (rating_test.go mirrors this); plus the assertDelta helpers at lines 2067 and 2656 using s.True(actual.Equal(expected), ...). The same file already uses the canonical s.AssertDecimalEqual(expected, actual, msg) helper at lines 815-819, so the boolean .Equal() form is an available-pattern erosion, not a forced workaround.", + "message": "Replace s.True(.Equal()) with require.Equal(t, expected.InexactFloat64(), actual.InexactFloat64()) or the suite's AssertDecimalEqual(expected, actual, msg) (already used in this file). Boolean .Equal() assertions print no expected-vs-actual diff on failure and bake the wrong precision-comparison habit into the most-copied credits test file. (Note: time.Time .Equal() calls such as servicePeriod.From.Equal(...) / ExpiresAt.Equal(...) are legitimate and out of scope.)" + }, + { + "folder": "test/credits", + "file": "test/credits/base.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Assert decimal equality in tests via require.Equal on InexactFloat64() (prac-test-decimal-001)", + "evidence": "Shared NON-_test suite helpers bake raw decimal-equality booleans into fixture/assertion code: MustRecognizeRevenue does s.True(result.RecognizedAmount.Equal(amount), ...) (line 565); the credit-purchase balance helper does s.True(s.MustCustomerFBOBalanceWithPriorityAsOf(...).Equal(input.Amount)) and three sibling branches (lines 687, 689, 693, 695). These are in base.go (the credits BaseSuite), so every test calling them inherits the boolean-comparison anti-pattern.", + "message": "These are shared assertion helpers in the credits BaseSuite, so the erosion has high leverage: use AssertDecimalEqual / require.Equal on InexactFloat64() inside MustRecognizeRevenue and the FBO-balance assertion helper instead of s.True(decimal.Equal(decimal)). Boolean comparison loses the expected/actual diff on failure across every credits test that relies on these helpers." + }, + { + "folder": "test/credits", + "file": "test/credits/rating_test.go", + "type": "pattern_erosion", + "severity": "warn", + "decision_or_pattern": "Assert decimal equality in tests via require.Equal on InexactFloat64() (prac-test-decimal-001)", + "evidence": "Lines 118-121 assert alpacadecimal values with booleans: s.True(alpacadecimal.NewFromInt(7).Equal(realtimeByReference[standardRateReference])); s.True(alpacadecimal.NewFromInt(14).Equal(realtimeByReference[doubleRateReference])); s.True(alpacadecimal.Zero.Equal(bookedByReference[standardRateReference])); s.True(alpacadecimal.Zero.Equal(bookedByReference[doubleRateReference])).", + "message": "Switch these realtime/booked rating-total assertions to require.Equal(t, float64(7), realtimeByReference[...].InexactFloat64()) (or the suite AssertDecimalEqual) so a mismatch shows expected vs actual. The expected values (7, 14, 0) are simple integers and fit the float64-literal convention the project mandates." + }, + { + "folder": "test/subscription", + "file": "test/subscription/scenario_firstofmonth_test.go", + "type": "trade_off_undermined", + "severity": "warn", + "decision_or_pattern": "Pair clock.SetTime/FreezeTime with defer clock.ResetTime/UnFreeze in the same scope (prac-test-ctx-001)", + "evidence": "Both plain (non-suite) test functions freeze the global clock with no reset anywhere in the file. TestBillingOnFirstOfMonth calls clock.SetTime(currentTime) at line 40 (and advances at line 212) with no defer clock.ResetTime()/t.Cleanup. TestAnchoredAlignment_MidMonthStart_EarlyCancel_IssueNextAnchor calls clock.SetTime(currentTime) at line 327 (advances at 414) likewise. grep shows zero clock.ResetTime/UnFreeze/t.Cleanup(clock.ResetTime) in the file. The deferred cleanup is tDeps.cleanup(t), wired to dbDeps.Cleanup in framework_test.go:175 \u2014 DB teardown only, it does NOT reset the clock. Unlike the testify-suite credits/billing harnesses, these are bare func Test... with no suite-level TearDownTest safety net.", + "message": "Add defer clock.ResetTime() (or t.Cleanup(clock.ResetTime)) immediately after the initial clock.SetTime in each of these two test functions. Because they are standalone test functions (no suite TearDownTest) and the only deferred cleanup is the DB cleanup, the frozen global clock leaks past the test and makes any later clock-sensitive test in the package non-deterministic depending on run order. The package's own CLAUDE.md anti-pattern list flags exactly this." + } + ] +} \ No newline at end of file diff --git a/.archie/enrich_batches.json b/.archie/enrich_batches.json new file mode 100644 index 0000000000..6f158a8a26 --- /dev/null +++ b/.archie/enrich_batches.json @@ -0,0 +1,3710 @@ +{ + "version": 2, + "run_id": "521f4104c65e", + "project_slug": "openmeter", + "folders": { + ".codex/agents": { + "children": [], + "depth": 2, + "size_chars": 484 + }, + ".codex/rules": { + "children": [], + "depth": 2, + "size_chars": 12351 + }, + "api": { + "children": [ + "api/client", + "api/spec", + "api/types", + "api/v3" + ], + "depth": 1, + "size_chars": 31249 + }, + "api/client/go": { + "children": [], + "depth": 3, + "size_chars": 13766 + }, + "api/client/javascript": { + "children": [ + "api/client/javascript/patches", + "api/client/javascript/scripts", + "api/client/javascript/src" + ], + "depth": 3, + "size_chars": 38332 + }, + "api/client/javascript/patches": { + "children": [], + "depth": 4, + "size_chars": 15000 + }, + "api/client/javascript/scripts": { + "children": [], + "depth": 4, + "size_chars": 2271 + }, + "api/client/javascript/src/client": { + "children": [], + "depth": 5, + "size_chars": 123815 + }, + "api/client/javascript/src/portal": { + "children": [], + "depth": 5, + "size_chars": 2854 + }, + "api/client/javascript/src/react": { + "children": [], + "depth": 5, + "size_chars": 736 + }, + "api/client/javascript/src/zod": { + "children": [], + "depth": 5, + "size_chars": 15000 + }, + "api/client/node": { + "children": [], + "depth": 3, + "size_chars": 85 + }, + "api/client/python": { + "children": [ + "api/client/python/examples", + "api/client/python/openmeter", + "api/client/python/scripts" + ], + "depth": 3, + "size_chars": 16723 + }, + "api/client/python/examples": { + "children": [ + "api/client/python/examples/async", + "api/client/python/examples/sync" + ], + "depth": 4, + "size_chars": 939 + }, + "api/client/python/examples/async": { + "children": [], + "depth": 5, + "size_chars": 12730 + }, + "api/client/python/examples/sync": { + "children": [], + "depth": 5, + "size_chars": 11541 + }, + "api/client/python/openmeter": { + "children": [ + "api/client/python/openmeter/_generated", + "api/client/python/openmeter/aio", + "api/client/python/openmeter/models", + "api/client/python/openmeter/operations" + ], + "depth": 4, + "size_chars": 5464 + }, + "api/client/python/openmeter/_generated": { + "children": [ + "api/client/python/openmeter/_generated/_utils", + "api/client/python/openmeter/_generated/aio", + "api/client/python/openmeter/_generated/models", + "api/client/python/openmeter/_generated/operations" + ], + "depth": 5, + "size_chars": 20474 + }, + "api/client/python/openmeter/_generated/_utils": { + "children": [], + "depth": 6, + "size_chars": 30000 + }, + "api/client/python/openmeter/_generated/aio": { + "children": [ + "api/client/python/openmeter/_generated/aio/operations" + ], + "depth": 6, + "size_chars": 16292 + }, + "api/client/python/openmeter/_generated/aio/operations": { + "children": [], + "depth": 7, + "size_chars": 19426 + }, + "api/client/python/openmeter/_generated/models": { + "children": [], + "depth": 6, + "size_chars": 45515 + }, + "api/client/python/openmeter/_generated/operations": { + "children": [], + "depth": 6, + "size_chars": 19426 + }, + "api/client/python/openmeter/aio": { + "children": [ + "api/client/python/openmeter/aio/operations" + ], + "depth": 5, + "size_chars": 1486 + }, + "api/client/python/openmeter/aio/operations": { + "children": [], + "depth": 6, + "size_chars": 892 + }, + "api/client/python/openmeter/models": { + "children": [], + "depth": 5, + "size_chars": 879 + }, + "api/client/python/openmeter/operations": { + "children": [], + "depth": 5, + "size_chars": 858 + }, + "api/client/python/scripts": { + "children": [], + "depth": 4, + "size_chars": 1699 + }, + "api/client/web": { + "children": [], + "depth": 3, + "size_chars": 84 + }, + "api/spec": { + "children": [ + "api/spec/packages", + "api/spec/patches" + ], + "depth": 2, + "size_chars": 20156 + }, + "api/spec/packages/aip": { + "children": [ + "api/spec/packages/aip/common", + "api/spec/packages/aip/lib", + "api/spec/packages/aip/scripts", + "api/spec/packages/aip/src" + ], + "depth": 4, + "size_chars": 1842 + }, + "api/spec/packages/aip/common/definitions": { + "children": [], + "depth": 6, + "size_chars": 40481 + }, + "api/spec/packages/aip/lib": { + "children": [ + "api/spec/packages/aip/lib/rules" + ], + "depth": 5, + "size_chars": 996 + }, + "api/spec/packages/aip/lib/rules": { + "children": [], + "depth": 6, + "size_chars": 19817 + }, + "api/spec/packages/aip/scripts": { + "children": [], + "depth": 5, + "size_chars": 8686 + }, + "api/spec/packages/aip/src": { + "children": [ + "api/spec/packages/aip/src/apps", + "api/spec/packages/aip/src/billing", + "api/spec/packages/aip/src/common", + "api/spec/packages/aip/src/currencies", + "api/spec/packages/aip/src/customers", + "api/spec/packages/aip/src/defaults", + "api/spec/packages/aip/src/entitlements", + "api/spec/packages/aip/src/events", + "api/spec/packages/aip/src/features", + "api/spec/packages/aip/src/governance", + "api/spec/packages/aip/src/invoices", + "api/spec/packages/aip/src/llmcost", + "api/spec/packages/aip/src/meters", + "api/spec/packages/aip/src/productcatalog", + "api/spec/packages/aip/src/shared", + "api/spec/packages/aip/src/subscriptions", + "api/spec/packages/aip/src/tax" + ], + "depth": 5, + "size_chars": 16422 + }, + "api/spec/packages/aip/src/apps": { + "children": [], + "depth": 6, + "size_chars": 22669 + }, + "api/spec/packages/aip/src/billing": { + "children": [], + "depth": 6, + "size_chars": 15867 + }, + "api/spec/packages/aip/src/common": { + "children": [], + "depth": 6, + "size_chars": 13011 + }, + "api/spec/packages/aip/src/currencies": { + "children": [ + "api/spec/packages/aip/src/currencies/cost-bases" + ], + "depth": 6, + "size_chars": 5127 + }, + "api/spec/packages/aip/src/currencies/cost-bases": { + "children": [], + "depth": 7, + "size_chars": 2748 + }, + "api/spec/packages/aip/src/customers": { + "children": [ + "api/spec/packages/aip/src/customers/charges", + "api/spec/packages/aip/src/customers/credits" + ], + "depth": 6, + "size_chars": 11131 + }, + "api/spec/packages/aip/src/customers/charges": { + "children": [], + "depth": 7, + "size_chars": 8819 + }, + "api/spec/packages/aip/src/customers/credits": { + "children": [], + "depth": 7, + "size_chars": 20836 + }, + "api/spec/packages/aip/src/defaults": { + "children": [], + "depth": 6, + "size_chars": 1931 + }, + "api/spec/packages/aip/src/entitlements": { + "children": [], + "depth": 6, + "size_chars": 2376 + }, + "api/spec/packages/aip/src/events": { + "children": [], + "depth": 6, + "size_chars": 6874 + }, + "api/spec/packages/aip/src/features": { + "children": [], + "depth": 6, + "size_chars": 11181 + }, + "api/spec/packages/aip/src/governance": { + "children": [], + "depth": 6, + "size_chars": 7284 + }, + "api/spec/packages/aip/src/invoices": { + "children": [], + "depth": 6, + "size_chars": 3050 + }, + "api/spec/packages/aip/src/llmcost": { + "children": [], + "depth": 6, + "size_chars": 7367 + }, + "api/spec/packages/aip/src/meters": { + "children": [], + "depth": 6, + "size_chars": 11002 + }, + "api/spec/packages/aip/src/productcatalog": { + "children": [], + "depth": 6, + "size_chars": 32677 + }, + "api/spec/packages/aip/src/shared": { + "children": [], + "depth": 6, + "size_chars": 22241 + }, + "api/spec/packages/aip/src/subscriptions": { + "children": [], + "depth": 6, + "size_chars": 12354 + }, + "api/spec/packages/aip/src/tax": { + "children": [], + "depth": 6, + "size_chars": 2721 + }, + "api/spec/packages/legacy": { + "children": [ + "api/spec/packages/legacy/lib", + "api/spec/packages/legacy/src" + ], + "depth": 4, + "size_chars": 5223 + }, + "api/spec/packages/legacy/lib": { + "children": [ + "api/spec/packages/legacy/lib/rules" + ], + "depth": 5, + "size_chars": 658 + }, + "api/spec/packages/legacy/lib/rules": { + "children": [], + "depth": 6, + "size_chars": 8115 + }, + "api/spec/packages/legacy/src": { + "children": [ + "api/spec/packages/legacy/src/app", + "api/spec/packages/legacy/src/billing", + "api/spec/packages/legacy/src/cloud", + "api/spec/packages/legacy/src/customer", + "api/spec/packages/legacy/src/entitlements", + "api/spec/packages/legacy/src/info", + "api/spec/packages/legacy/src/notification", + "api/spec/packages/legacy/src/productcatalog" + ], + "depth": 5, + "size_chars": 63432 + }, + "api/spec/packages/legacy/src/app": { + "children": [], + "depth": 6, + "size_chars": 37700 + }, + "api/spec/packages/legacy/src/billing": { + "children": [ + "api/spec/packages/legacy/src/billing/invoices" + ], + "depth": 6, + "size_chars": 37706 + }, + "api/spec/packages/legacy/src/billing/invoices": { + "children": [], + "depth": 7, + "size_chars": 30881 + }, + "api/spec/packages/legacy/src/cloud": { + "children": [], + "depth": 6, + "size_chars": 11295 + }, + "api/spec/packages/legacy/src/customer": { + "children": [], + "depth": 6, + "size_chars": 12553 + }, + "api/spec/packages/legacy/src/entitlements": { + "children": [ + "api/spec/packages/legacy/src/entitlements/v2" + ], + "depth": 6, + "size_chars": 36432 + }, + "api/spec/packages/legacy/src/entitlements/v2": { + "children": [], + "depth": 7, + "size_chars": 21730 + }, + "api/spec/packages/legacy/src/info": { + "children": [], + "depth": 6, + "size_chars": 1745 + }, + "api/spec/packages/legacy/src/notification": { + "children": [], + "depth": 6, + "size_chars": 32717 + }, + "api/spec/packages/legacy/src/productcatalog": { + "children": [], + "depth": 6, + "size_chars": 70178 + }, + "api/spec/patches": { + "children": [], + "depth": 3, + "size_chars": 75000 + }, + "api/types": { + "children": [], + "depth": 2, + "size_chars": 267 + }, + "api/v3": { + "children": [ + "api/v3/apierrors", + "api/v3/filters", + "api/v3/handlers", + "api/v3/labels", + "api/v3/oasmiddleware", + "api/v3/render", + "api/v3/request", + "api/v3/response", + "api/v3/server", + "api/v3/templates", + "api/v3/test" + ], + "depth": 2, + "size_chars": 15750 + }, + "api/v3/apierrors": { + "children": [], + "depth": 3, + "size_chars": 22898 + }, + "api/v3/filters": { + "children": [], + "depth": 3, + "size_chars": 54507 + }, + "api/v3/handlers/addons": { + "children": [], + "depth": 4, + "size_chars": 30903 + }, + "api/v3/handlers/apps": { + "children": [], + "depth": 4, + "size_chars": 10751 + }, + "api/v3/handlers/billingprofiles": { + "children": [], + "depth": 4, + "size_chars": 26367 + }, + "api/v3/handlers/currencies": { + "children": [], + "depth": 4, + "size_chars": 12648 + }, + "api/v3/handlers/customers": { + "children": [ + "api/v3/handlers/customers/billing", + "api/v3/handlers/customers/charges", + "api/v3/handlers/customers/credits", + "api/v3/handlers/customers/entitlementaccess" + ], + "depth": 4, + "size_chars": 17218 + }, + "api/v3/handlers/customers/billing": { + "children": [], + "depth": 5, + "size_chars": 30726 + }, + "api/v3/handlers/customers/charges": { + "children": [], + "depth": 5, + "size_chars": 23731 + }, + "api/v3/handlers/customers/credits": { + "children": [], + "depth": 5, + "size_chars": 42747 + }, + "api/v3/handlers/customers/entitlementaccess": { + "children": [], + "depth": 5, + "size_chars": 5775 + }, + "api/v3/handlers/events": { + "children": [], + "depth": 4, + "size_chars": 18398 + }, + "api/v3/handlers/featurecost": { + "children": [], + "depth": 4, + "size_chars": 6097 + }, + "api/v3/handlers/features": { + "children": [], + "depth": 4, + "size_chars": 40424 + }, + "api/v3/handlers/llmcost": { + "children": [], + "depth": 4, + "size_chars": 20058 + }, + "api/v3/handlers/meters": { + "children": [ + "api/v3/handlers/meters/query" + ], + "depth": 4, + "size_chars": 25880 + }, + "api/v3/handlers/meters/query": { + "children": [], + "depth": 5, + "size_chars": 23105 + }, + "api/v3/handlers/plans": { + "children": [ + "api/v3/handlers/plans/planaddons" + ], + "depth": 4, + "size_chars": 45590 + }, + "api/v3/handlers/plans/planaddons": { + "children": [], + "depth": 5, + "size_chars": 12943 + }, + "api/v3/handlers/subscriptions": { + "children": [ + "api/v3/handlers/subscriptions/subscriptionaddons" + ], + "depth": 4, + "size_chars": 26580 + }, + "api/v3/handlers/subscriptions/subscriptionaddons": { + "children": [], + "depth": 5, + "size_chars": 8469 + }, + "api/v3/handlers/taxcodes": { + "children": [], + "depth": 4, + "size_chars": 19351 + }, + "api/v3/labels": { + "children": [], + "depth": 3, + "size_chars": 13817 + }, + "api/v3/oasmiddleware": { + "children": [], + "depth": 3, + "size_chars": 19642 + }, + "api/v3/render": { + "children": [], + "depth": 3, + "size_chars": 1565 + }, + "api/v3/request": { + "children": [], + "depth": 3, + "size_chars": 7317 + }, + "api/v3/response": { + "children": [], + "depth": 3, + "size_chars": 2376 + }, + "api/v3/server": { + "children": [], + "depth": 3, + "size_chars": 30000 + }, + "api/v3/templates": { + "children": [], + "depth": 3, + "size_chars": 1021 + }, + "api/v3/test": { + "children": [], + "depth": 3, + "size_chars": 25341 + }, + "app/common": { + "children": [], + "depth": 2, + "size_chars": 140051 + }, + "app/config": { + "children": [], + "depth": 2, + "size_chars": 101508 + }, + "cmd/balance-worker": { + "children": [], + "depth": 2, + "size_chars": 3669 + }, + "cmd/billing-worker": { + "children": [], + "depth": 2, + "size_chars": 4419 + }, + "cmd/jobs": { + "children": [ + "cmd/jobs/billing", + "cmd/jobs/entitlement", + "cmd/jobs/internal", + "cmd/jobs/ledger", + "cmd/jobs/llmcost", + "cmd/jobs/migrate", + "cmd/jobs/quickstart" + ], + "depth": 2, + "size_chars": 2530 + }, + "cmd/jobs/billing": { + "children": [ + "cmd/jobs/billing/advance", + "cmd/jobs/billing/advancecharges", + "cmd/jobs/billing/collect", + "cmd/jobs/billing/subscriptionsync" + ], + "depth": 3, + "size_chars": 542 + }, + "cmd/jobs/billing/advance": { + "children": [], + "depth": 4, + "size_chars": 2201 + }, + "cmd/jobs/billing/advancecharges": { + "children": [], + "depth": 4, + "size_chars": 2191 + }, + "cmd/jobs/billing/collect": { + "children": [], + "depth": 4, + "size_chars": 2766 + }, + "cmd/jobs/billing/subscriptionsync": { + "children": [], + "depth": 4, + "size_chars": 2526 + }, + "cmd/jobs/entitlement": { + "children": [], + "depth": 3, + "size_chars": 1354 + }, + "cmd/jobs/internal": { + "children": [], + "depth": 3, + "size_chars": 6089 + }, + "cmd/jobs/ledger": { + "children": [ + "cmd/jobs/ledger/backfillaccounts", + "cmd/jobs/ledger/service" + ], + "depth": 3, + "size_chars": 254 + }, + "cmd/jobs/ledger/backfillaccounts": { + "children": [], + "depth": 4, + "size_chars": 4173 + }, + "cmd/jobs/ledger/service": { + "children": [], + "depth": 4, + "size_chars": 18507 + }, + "cmd/jobs/llmcost": { + "children": [], + "depth": 3, + "size_chars": 494 + }, + "cmd/jobs/migrate": { + "children": [], + "depth": 3, + "size_chars": 1089 + }, + "cmd/jobs/quickstart": { + "children": [], + "depth": 3, + "size_chars": 2980 + }, + "cmd/notification-service": { + "children": [], + "depth": 2, + "size_chars": 6418 + }, + "cmd/server": { + "children": [], + "depth": 2, + "size_chars": 17947 + }, + "cmd/sink-worker": { + "children": [], + "depth": 2, + "size_chars": 5754 + }, + "collector": { + "children": [ + "collector/benthos", + "collector/cmd", + "collector/quickstart" + ], + "depth": 1, + "size_chars": 19775 + }, + "collector/benthos/bloblang": { + "children": [], + "depth": 3, + "size_chars": 1039 + }, + "collector/benthos/input": { + "children": [ + "collector/benthos/input/runai" + ], + "depth": 3, + "size_chars": 43159 + }, + "collector/benthos/input/runai": { + "children": [], + "depth": 4, + "size_chars": 23707 + }, + "collector/benthos/internal": { + "children": [ + "collector/benthos/internal/logging", + "collector/benthos/internal/message", + "collector/benthos/internal/shutdown" + ], + "depth": 3, + "size_chars": 1056 + }, + "collector/benthos/internal/logging": { + "children": [], + "depth": 4, + "size_chars": 1421 + }, + "collector/benthos/internal/message": { + "children": [], + "depth": 4, + "size_chars": 3824 + }, + "collector/benthos/internal/shutdown": { + "children": [], + "depth": 4, + "size_chars": 4844 + }, + "collector/benthos/presets/http-server": { + "children": [], + "depth": 4, + "size_chars": 3372 + }, + "collector/benthos/presets/kubernetes-pod-exec-time": { + "children": [], + "depth": 4, + "size_chars": 3621 + }, + "collector/benthos/services/leaderelection": { + "children": [], + "depth": 4, + "size_chars": 8181 + }, + "collector/cmd": { + "children": [], + "depth": 2, + "size_chars": 1009 + }, + "collector/quickstart": { + "children": [ + "collector/quickstart/collector", + "collector/quickstart/seeder" + ], + "depth": 2, + "size_chars": 1501 + }, + "collector/quickstart/collector": { + "children": [ + "collector/quickstart/collector/resources", + "collector/quickstart/collector/streams" + ], + "depth": 3, + "size_chars": 266 + }, + "collector/quickstart/collector/resources": { + "children": [], + "depth": 4, + "size_chars": 75 + }, + "collector/quickstart/collector/streams": { + "children": [], + "depth": 4, + "size_chars": 2612 + }, + "collector/quickstart/seeder": { + "children": [], + "depth": 3, + "size_chars": 2064 + }, + "deploy": { + "children": [ + "deploy/charts" + ], + "depth": 1, + "size_chars": 1138 + }, + "deploy/charts": { + "children": [ + "deploy/charts/benthos-collector", + "deploy/charts/openmeter" + ], + "depth": 2, + "size_chars": 1990 + }, + "deploy/charts/benthos-collector": { + "children": [ + "deploy/charts/benthos-collector/templates" + ], + "depth": 3, + "size_chars": 14390 + }, + "deploy/charts/benthos-collector/templates": { + "children": [], + "depth": 4, + "size_chars": 13345 + }, + "deploy/charts/openmeter": { + "children": [ + "deploy/charts/openmeter/templates" + ], + "depth": 3, + "size_chars": 27827 + }, + "deploy/charts/openmeter/templates": { + "children": [], + "depth": 4, + "size_chars": 41683 + }, + "docs": { + "children": [ + "docs/decisions", + "docs/migration-guides" + ], + "depth": 1, + "size_chars": 11435 + }, + "docs/decisions": { + "children": [], + "depth": 2, + "size_chars": 8380 + }, + "docs/migration-guides": { + "children": [], + "depth": 2, + "size_chars": 12031 + }, + "e2e": { + "children": [], + "depth": 1, + "size_chars": 155743 + }, + "etc/seed": { + "children": [ + "etc/seed/streams" + ], + "depth": 2, + "size_chars": 2171 + }, + "etc/seed/streams": { + "children": [], + "depth": 3, + "size_chars": 4895 + }, + "etc/wiretap": { + "children": [], + "depth": 2, + "size_chars": 150 + }, + "openmeter/apiconverter": { + "children": [], + "depth": 2, + "size_chars": 2608 + }, + "openmeter/app": { + "children": [ + "openmeter/app/adapter", + "openmeter/app/custominvoicing", + "openmeter/app/httpdriver", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/app/stripe" + ], + "depth": 2, + "size_chars": 31823 + }, + "openmeter/app/adapter": { + "children": [], + "depth": 3, + "size_chars": 19172 + }, + "openmeter/app/custominvoicing": { + "children": [ + "openmeter/app/custominvoicing/adapter", + "openmeter/app/custominvoicing/httpdriver", + "openmeter/app/custominvoicing/service" + ], + "depth": 3, + "size_chars": 14048 + }, + "openmeter/app/custominvoicing/adapter": { + "children": [], + "depth": 4, + "size_chars": 6764 + }, + "openmeter/app/custominvoicing/httpdriver": { + "children": [], + "depth": 4, + "size_chars": 10915 + }, + "openmeter/app/custominvoicing/service": { + "children": [], + "depth": 4, + "size_chars": 8101 + }, + "openmeter/app/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 41176 + }, + "openmeter/app/sandbox": { + "children": [], + "depth": 3, + "size_chars": 17789 + }, + "openmeter/app/service": { + "children": [], + "depth": 3, + "size_chars": 7323 + }, + "openmeter/app/stripe": { + "children": [ + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/client", + "openmeter/app/stripe/httpdriver", + "openmeter/app/stripe/service" + ], + "depth": 3, + "size_chars": 53983 + }, + "openmeter/app/stripe/adapter": { + "children": [], + "depth": 4, + "size_chars": 27952 + }, + "openmeter/app/stripe/client": { + "children": [], + "depth": 4, + "size_chars": 50233 + }, + "openmeter/app/stripe/httpdriver": { + "children": [], + "depth": 4, + "size_chars": 36321 + }, + "openmeter/app/stripe/service": { + "children": [], + "depth": 4, + "size_chars": 22431 + }, + "openmeter/billing": { + "children": [ + "openmeter/billing/adapter", + "openmeter/billing/charges", + "openmeter/billing/creditgrant", + "openmeter/billing/httpdriver", + "openmeter/billing/lineengine", + "openmeter/billing/models", + "openmeter/billing/rating", + "openmeter/billing/service", + "openmeter/billing/testutils", + "openmeter/billing/validators", + "openmeter/billing/worker" + ], + "depth": 2, + "size_chars": 227682 + }, + "openmeter/billing/adapter": { + "children": [], + "depth": 3, + "size_chars": 150993 + }, + "openmeter/billing/charges": { + "children": [ + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models", + "openmeter/billing/charges/service", + "openmeter/billing/charges/statemachine", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/worker" + ], + "depth": 3, + "size_chars": 28174 + }, + "openmeter/billing/charges/adapter": { + "children": [], + "depth": 4, + "size_chars": 16884 + }, + "openmeter/billing/charges/creditpurchase": { + "children": [ + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service" + ], + "depth": 4, + "size_chars": 29996 + }, + "openmeter/billing/charges/creditpurchase/adapter": { + "children": [], + "depth": 5, + "size_chars": 31874 + }, + "openmeter/billing/charges/creditpurchase/lineengine": { + "children": [], + "depth": 5, + "size_chars": 4270 + }, + "openmeter/billing/charges/creditpurchase/service": { + "children": [], + "depth": 5, + "size_chars": 35195 + }, + "openmeter/billing/charges/flatfee": { + "children": [ + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service" + ], + "depth": 4, + "size_chars": 39718 + }, + "openmeter/billing/charges/flatfee/adapter": { + "children": [], + "depth": 5, + "size_chars": 47275 + }, + "openmeter/billing/charges/flatfee/service": { + "children": [ + "openmeter/billing/charges/flatfee/service/realizations" + ], + "depth": 5, + "size_chars": 64066 + }, + "openmeter/billing/charges/flatfee/service/realizations": { + "children": [], + "depth": 6, + "size_chars": 35944 + }, + "openmeter/billing/charges/invoiceupdater": { + "children": [], + "depth": 4, + "size_chars": 21599 + }, + "openmeter/billing/charges/lineage": { + "children": [ + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service" + ], + "depth": 4, + "size_chars": 12449 + }, + "openmeter/billing/charges/lineage/adapter": { + "children": [], + "depth": 5, + "size_chars": 10957 + }, + "openmeter/billing/charges/lineage/service": { + "children": [], + "depth": 5, + "size_chars": 8049 + }, + "openmeter/billing/charges/meta": { + "children": [ + "openmeter/billing/charges/meta/adapter" + ], + "depth": 4, + "size_chars": 31349 + }, + "openmeter/billing/charges/meta/adapter": { + "children": [], + "depth": 5, + "size_chars": 3383 + }, + "openmeter/billing/charges/models/chargemeta": { + "children": [], + "depth": 5, + "size_chars": 10691 + }, + "openmeter/billing/charges/models/creditrealization": { + "children": [], + "depth": 5, + "size_chars": 42364 + }, + "openmeter/billing/charges/models/invoicedusage": { + "children": [], + "depth": 5, + "size_chars": 4118 + }, + "openmeter/billing/charges/models/ledgertransaction": { + "children": [], + "depth": 5, + "size_chars": 1432 + }, + "openmeter/billing/charges/models/payment": { + "children": [], + "depth": 5, + "size_chars": 14007 + }, + "openmeter/billing/charges/service": { + "children": [], + "depth": 4, + "size_chars": 168755 + }, + "openmeter/billing/charges/statemachine": { + "children": [], + "depth": 4, + "size_chars": 16092 + }, + "openmeter/billing/charges/testutils": { + "children": [], + "depth": 4, + "size_chars": 13815 + }, + "openmeter/billing/charges/usagebased": { + "children": [ + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service" + ], + "depth": 4, + "size_chars": 59523 + }, + "openmeter/billing/charges/usagebased/adapter": { + "children": [], + "depth": 5, + "size_chars": 45789 + }, + "openmeter/billing/charges/usagebased/service": { + "children": [ + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/run" + ], + "depth": 5, + "size_chars": 101484 + }, + "openmeter/billing/charges/usagebased/service/rating": { + "children": [ + "openmeter/billing/charges/usagebased/service/rating/delta", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "openmeter/billing/charges/usagebased/service/rating/subtract", + "openmeter/billing/charges/usagebased/service/rating/testutils" + ], + "depth": 6, + "size_chars": 34532 + }, + "openmeter/billing/charges/usagebased/service/rating/delta": { + "children": [], + "depth": 7, + "size_chars": 90135 + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving": { + "children": [], + "depth": 7, + "size_chars": 36336 + }, + "openmeter/billing/charges/usagebased/service/rating/subtract": { + "children": [], + "depth": 7, + "size_chars": 29332 + }, + "openmeter/billing/charges/usagebased/service/rating/testutils": { + "children": [], + "depth": 7, + "size_chars": 3721 + }, + "openmeter/billing/charges/usagebased/service/run": { + "children": [], + "depth": 6, + "size_chars": 42997 + }, + "openmeter/billing/charges/worker/advance": { + "children": [], + "depth": 5, + "size_chars": 2852 + }, + "openmeter/billing/charges/worker/asyncadvance": { + "children": [], + "depth": 5, + "size_chars": 1285 + }, + "openmeter/billing/creditgrant": { + "children": [ + "openmeter/billing/creditgrant/service" + ], + "depth": 3, + "size_chars": 7542 + }, + "openmeter/billing/creditgrant/service": { + "children": [], + "depth": 4, + "size_chars": 8986 + }, + "openmeter/billing/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 79708 + }, + "openmeter/billing/lineengine": { + "children": [], + "depth": 3, + "size_chars": 11224 + }, + "openmeter/billing/models/creditsapplied": { + "children": [], + "depth": 4, + "size_chars": 1389 + }, + "openmeter/billing/models/externalid": { + "children": [], + "depth": 4, + "size_chars": 3264 + }, + "openmeter/billing/models/stddetailedline": { + "children": [], + "depth": 4, + "size_chars": 11600 + }, + "openmeter/billing/models/totals": { + "children": [], + "depth": 4, + "size_chars": 11029 + }, + "openmeter/billing/rating": { + "children": [ + "openmeter/billing/rating/service" + ], + "depth": 3, + "size_chars": 15799 + }, + "openmeter/billing/rating/service": { + "children": [ + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil" + ], + "depth": 4, + "size_chars": 18163 + }, + "openmeter/billing/rating/service/mutator": { + "children": [], + "depth": 5, + "size_chars": 29454 + }, + "openmeter/billing/rating/service/rate": { + "children": [], + "depth": 5, + "size_chars": 91601 + }, + "openmeter/billing/rating/service/testutil": { + "children": [], + "depth": 5, + "size_chars": 4408 + }, + "openmeter/billing/service": { + "children": [ + "openmeter/billing/service/invoicecalc" + ], + "depth": 3, + "size_chars": 136231 + }, + "openmeter/billing/service/invoicecalc": { + "children": [], + "depth": 4, + "size_chars": 48882 + }, + "openmeter/billing/testutils": { + "children": [], + "depth": 3, + "size_chars": 2230 + }, + "openmeter/billing/validators/customer": { + "children": [], + "depth": 4, + "size_chars": 2830 + }, + "openmeter/billing/validators/subscription": { + "children": [], + "depth": 4, + "size_chars": 2848 + }, + "openmeter/billing/worker": { + "children": [ + "openmeter/billing/worker/advance", + "openmeter/billing/worker/asyncadvance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync" + ], + "depth": 3, + "size_chars": 7170 + }, + "openmeter/billing/worker/advance": { + "children": [], + "depth": 4, + "size_chars": 5815 + }, + "openmeter/billing/worker/asyncadvance": { + "children": [], + "depth": 4, + "size_chars": 1272 + }, + "openmeter/billing/worker/collect": { + "children": [], + "depth": 4, + "size_chars": 6399 + }, + "openmeter/billing/worker/subscriptionsync": { + "children": [ + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/billing/worker/subscriptionsync/service" + ], + "depth": 4, + "size_chars": 2915 + }, + "openmeter/billing/worker/subscriptionsync/adapter": { + "children": [], + "depth": 5, + "size_chars": 4487 + }, + "openmeter/billing/worker/subscriptionsync/reconciler": { + "children": [], + "depth": 5, + "size_chars": 7159 + }, + "openmeter/billing/worker/subscriptionsync/service": { + "children": [ + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler", + "openmeter/billing/worker/subscriptionsync/service/targetstate" + ], + "depth": 5, + "size_chars": 106347 + }, + "openmeter/billing/worker/subscriptionsync/service/persistedstate": { + "children": [], + "depth": 6, + "size_chars": 22887 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler": { + "children": [ + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater" + ], + "depth": 6, + "size_chars": 73130 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater": { + "children": [], + "depth": 7, + "size_chars": 22583 + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate": { + "children": [], + "depth": 6, + "size_chars": 44562 + }, + "openmeter/cost": { + "children": [ + "openmeter/cost/adapter", + "openmeter/cost/service" + ], + "depth": 2, + "size_chars": 1889 + }, + "openmeter/cost/adapter": { + "children": [], + "depth": 3, + "size_chars": 34548 + }, + "openmeter/cost/service": { + "children": [], + "depth": 3, + "size_chars": 760 + }, + "openmeter/credit": { + "children": [ + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/driver", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/credit/hook" + ], + "depth": 2, + "size_chars": 34032 + }, + "openmeter/credit/adapter": { + "children": [], + "depth": 3, + "size_chars": 13242 + }, + "openmeter/credit/balance": { + "children": [], + "depth": 3, + "size_chars": 17341 + }, + "openmeter/credit/driver": { + "children": [], + "depth": 3, + "size_chars": 11215 + }, + "openmeter/credit/engine": { + "children": [], + "depth": 3, + "size_chars": 84082 + }, + "openmeter/credit/grant": { + "children": [], + "depth": 3, + "size_chars": 24238 + }, + "openmeter/credit/hook": { + "children": [], + "depth": 3, + "size_chars": 970 + }, + "openmeter/currencies": { + "children": [ + "openmeter/currencies/adapter", + "openmeter/currencies/service" + ], + "depth": 2, + "size_chars": 5539 + }, + "openmeter/currencies/adapter": { + "children": [], + "depth": 3, + "size_chars": 6829 + }, + "openmeter/currencies/service": { + "children": [], + "depth": 3, + "size_chars": 12940 + }, + "openmeter/customer": { + "children": [ + "openmeter/customer/adapter", + "openmeter/customer/app", + "openmeter/customer/httpdriver", + "openmeter/customer/service", + "openmeter/customer/testutils" + ], + "depth": 2, + "size_chars": 25331 + }, + "openmeter/customer/adapter": { + "children": [], + "depth": 3, + "size_chars": 34724 + }, + "openmeter/customer/app": { + "children": [], + "depth": 3, + "size_chars": 786 + }, + "openmeter/customer/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 24176 + }, + "openmeter/customer/service": { + "children": [ + "openmeter/customer/service/hooks" + ], + "depth": 3, + "size_chars": 19055 + }, + "openmeter/customer/service/hooks": { + "children": [], + "depth": 4, + "size_chars": 29102 + }, + "openmeter/customer/testutils": { + "children": [], + "depth": 3, + "size_chars": 3710 + }, + "openmeter/debug": { + "children": [ + "openmeter/debug/httpdriver" + ], + "depth": 2, + "size_chars": 2246 + }, + "openmeter/debug/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 2606 + }, + "openmeter/dedupe": { + "children": [ + "openmeter/dedupe/memorydedupe", + "openmeter/dedupe/redisdedupe" + ], + "depth": 2, + "size_chars": 1127 + }, + "openmeter/dedupe/memorydedupe": { + "children": [], + "depth": 3, + "size_chars": 3185 + }, + "openmeter/dedupe/redisdedupe": { + "children": [], + "depth": 3, + "size_chars": 6757 + }, + "openmeter/ent": { + "children": [ + "openmeter/ent/schema", + "openmeter/ent/tx" + ], + "depth": 2, + "size_chars": 1246 + }, + "openmeter/ent/schema": { + "children": [], + "depth": 3, + "size_chars": 131185 + }, + "openmeter/ent/tx": { + "children": [], + "depth": 3, + "size_chars": 741 + }, + "openmeter/entitlement": { + "children": [ + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker", + "openmeter/entitlement/boolean", + "openmeter/entitlement/driver", + "openmeter/entitlement/hooks", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/snapshot", + "openmeter/entitlement/validators" + ], + "depth": 2, + "size_chars": 64543 + }, + "openmeter/entitlement/adapter": { + "children": [], + "depth": 3, + "size_chars": 32984 + }, + "openmeter/entitlement/balanceworker": { + "children": [ + "openmeter/entitlement/balanceworker/events", + "openmeter/entitlement/balanceworker/filters" + ], + "depth": 3, + "size_chars": 53163 + }, + "openmeter/entitlement/balanceworker/events": { + "children": [], + "depth": 4, + "size_chars": 3053 + }, + "openmeter/entitlement/balanceworker/filters": { + "children": [], + "depth": 4, + "size_chars": 7766 + }, + "openmeter/entitlement/boolean": { + "children": [], + "depth": 3, + "size_chars": 2949 + }, + "openmeter/entitlement/driver": { + "children": [ + "openmeter/entitlement/driver/v2" + ], + "depth": 3, + "size_chars": 45648 + }, + "openmeter/entitlement/driver/v2": { + "children": [], + "depth": 4, + "size_chars": 53948 + }, + "openmeter/entitlement/hooks/subscription": { + "children": [], + "depth": 4, + "size_chars": 1621 + }, + "openmeter/entitlement/metered": { + "children": [], + "depth": 3, + "size_chars": 118580 + }, + "openmeter/entitlement/service": { + "children": [], + "depth": 3, + "size_chars": 57621 + }, + "openmeter/entitlement/snapshot": { + "children": [], + "depth": 3, + "size_chars": 5920 + }, + "openmeter/entitlement/validators/customer": { + "children": [], + "depth": 4, + "size_chars": 1511 + }, + "openmeter/event/metadata": { + "children": [], + "depth": 3, + "size_chars": 2328 + }, + "openmeter/event/models": { + "children": [], + "depth": 3, + "size_chars": 469 + }, + "openmeter/info/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 1751 + }, + "openmeter/ingest": { + "children": [ + "openmeter/ingest/httpdriver", + "openmeter/ingest/ingestadapter", + "openmeter/ingest/kafkaingest" + ], + "depth": 2, + "size_chars": 6076 + }, + "openmeter/ingest/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 8757 + }, + "openmeter/ingest/ingestadapter": { + "children": [], + "depth": 3, + "size_chars": 2294 + }, + "openmeter/ingest/kafkaingest": { + "children": [ + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver" + ], + "depth": 3, + "size_chars": 9138 + }, + "openmeter/ingest/kafkaingest/serializer": { + "children": [], + "depth": 4, + "size_chars": 8524 + }, + "openmeter/ingest/kafkaingest/topicresolver": { + "children": [], + "depth": 4, + "size_chars": 890 + }, + "openmeter/ledger": { + "children": [ + "openmeter/ledger/account", + "openmeter/ledger/breakage", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/customerbalance", + "openmeter/ledger/historical", + "openmeter/ledger/noop", + "openmeter/ledger/recognizer", + "openmeter/ledger/resolvers", + "openmeter/ledger/routingrules", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions" + ], + "depth": 2, + "size_chars": 85606 + }, + "openmeter/ledger/account": { + "children": [ + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service" + ], + "depth": 3, + "size_chars": 11333 + }, + "openmeter/ledger/account/adapter": { + "children": [], + "depth": 4, + "size_chars": 23770 + }, + "openmeter/ledger/account/service": { + "children": [], + "depth": 4, + "size_chars": 4527 + }, + "openmeter/ledger/breakage": { + "children": [ + "openmeter/ledger/breakage/adapter" + ], + "depth": 3, + "size_chars": 38389 + }, + "openmeter/ledger/breakage/adapter": { + "children": [], + "depth": 4, + "size_chars": 10585 + }, + "openmeter/ledger/chargeadapter": { + "children": [], + "depth": 3, + "size_chars": 82580 + }, + "openmeter/ledger/collector": { + "children": [], + "depth": 3, + "size_chars": 65442 + }, + "openmeter/ledger/customerbalance": { + "children": [], + "depth": 3, + "size_chars": 97971 + }, + "openmeter/ledger/historical": { + "children": [ + "openmeter/ledger/historical/adapter" + ], + "depth": 3, + "size_chars": 13980 + }, + "openmeter/ledger/historical/adapter": { + "children": [], + "depth": 4, + "size_chars": 37181 + }, + "openmeter/ledger/noop": { + "children": [], + "depth": 3, + "size_chars": 9947 + }, + "openmeter/ledger/recognizer": { + "children": [], + "depth": 3, + "size_chars": 17992 + }, + "openmeter/ledger/resolvers": { + "children": [ + "openmeter/ledger/resolvers/adapter" + ], + "depth": 3, + "size_chars": 20865 + }, + "openmeter/ledger/resolvers/adapter": { + "children": [], + "depth": 4, + "size_chars": 3178 + }, + "openmeter/ledger/routingrules": { + "children": [], + "depth": 3, + "size_chars": 36430 + }, + "openmeter/ledger/testutils": { + "children": [], + "depth": 3, + "size_chars": 8486 + }, + "openmeter/ledger/transactions": { + "children": [ + "openmeter/ledger/transactions/testutils" + ], + "depth": 3, + "size_chars": 114151 + }, + "openmeter/ledger/transactions/testutils": { + "children": [], + "depth": 4, + "size_chars": 2170 + }, + "openmeter/llmcost": { + "children": [ + "openmeter/llmcost/adapter", + "openmeter/llmcost/service", + "openmeter/llmcost/sync" + ], + "depth": 2, + "size_chars": 30886 + }, + "openmeter/llmcost/adapter": { + "children": [], + "depth": 3, + "size_chars": 14356 + }, + "openmeter/llmcost/service": { + "children": [], + "depth": 3, + "size_chars": 12586 + }, + "openmeter/llmcost/sync": { + "children": [], + "depth": 3, + "size_chars": 50014 + }, + "openmeter/meter": { + "children": [ + "openmeter/meter/adapter", + "openmeter/meter/httphandler", + "openmeter/meter/mockadapter", + "openmeter/meter/service" + ], + "depth": 2, + "size_chars": 45526 + }, + "openmeter/meter/adapter": { + "children": [], + "depth": 3, + "size_chars": 17037 + }, + "openmeter/meter/httphandler": { + "children": [], + "depth": 3, + "size_chars": 37148 + }, + "openmeter/meter/mockadapter": { + "children": [], + "depth": 3, + "size_chars": 9083 + }, + "openmeter/meter/service": { + "children": [], + "depth": 3, + "size_chars": 7733 + }, + "openmeter/meterevent": { + "children": [ + "openmeter/meterevent/adapter", + "openmeter/meterevent/httphandler" + ], + "depth": 2, + "size_chars": 9802 + }, + "openmeter/meterevent/adapter": { + "children": [], + "depth": 3, + "size_chars": 10672 + }, + "openmeter/meterevent/httphandler": { + "children": [], + "depth": 3, + "size_chars": 7660 + }, + "openmeter/meterexport": { + "children": [ + "openmeter/meterexport/service" + ], + "depth": 2, + "size_chars": 9305 + }, + "openmeter/meterexport/service": { + "children": [], + "depth": 3, + "size_chars": 26916 + }, + "openmeter/namespace": { + "children": [ + "openmeter/namespace/namespacedriver" + ], + "depth": 2, + "size_chars": 6118 + }, + "openmeter/namespace/namespacedriver": { + "children": [], + "depth": 3, + "size_chars": 332 + }, + "openmeter/notification": { + "children": [ + "openmeter/notification/adapter", + "openmeter/notification/consumer", + "openmeter/notification/eventhandler", + "openmeter/notification/httpdriver", + "openmeter/notification/internal", + "openmeter/notification/service", + "openmeter/notification/webhook" + ], + "depth": 2, + "size_chars": 48352 + }, + "openmeter/notification/adapter": { + "children": [], + "depth": 3, + "size_chars": 34510 + }, + "openmeter/notification/consumer": { + "children": [], + "depth": 3, + "size_chars": 42344 + }, + "openmeter/notification/eventhandler": { + "children": [ + "openmeter/notification/eventhandler/noop" + ], + "depth": 3, + "size_chars": 26333 + }, + "openmeter/notification/eventhandler/noop": { + "children": [], + "depth": 4, + "size_chars": 484 + }, + "openmeter/notification/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 45368 + }, + "openmeter/notification/internal": { + "children": [], + "depth": 3, + "size_chars": 7672 + }, + "openmeter/notification/service": { + "children": [], + "depth": 3, + "size_chars": 23773 + }, + "openmeter/notification/webhook": { + "children": [ + "openmeter/notification/webhook/noop", + "openmeter/notification/webhook/secret", + "openmeter/notification/webhook/svix" + ], + "depth": 3, + "size_chars": 12375 + }, + "openmeter/notification/webhook/noop": { + "children": [], + "depth": 4, + "size_chars": 2645 + }, + "openmeter/notification/webhook/secret": { + "children": [], + "depth": 4, + "size_chars": 996 + }, + "openmeter/notification/webhook/svix": { + "children": [ + "openmeter/notification/webhook/svix/internal" + ], + "depth": 4, + "size_chars": 33832 + }, + "openmeter/notification/webhook/svix/internal": { + "children": [], + "depth": 5, + "size_chars": 2485 + }, + "openmeter/portal": { + "children": [ + "openmeter/portal/adapter", + "openmeter/portal/authenticator", + "openmeter/portal/httphandler" + ], + "depth": 2, + "size_chars": 3560 + }, + "openmeter/portal/adapter": { + "children": [], + "depth": 3, + "size_chars": 5052 + }, + "openmeter/portal/authenticator": { + "children": [], + "depth": 3, + "size_chars": 5221 + }, + "openmeter/portal/httphandler": { + "children": [], + "depth": 3, + "size_chars": 8037 + }, + "openmeter/productcatalog": { + "children": [ + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/driver", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/testutils" + ], + "depth": 2, + "size_chars": 176493 + }, + "openmeter/productcatalog/adapter": { + "children": [], + "depth": 3, + "size_chars": 29930 + }, + "openmeter/productcatalog/addon": { + "children": [ + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/httpdriver", + "openmeter/productcatalog/addon/service" + ], + "depth": 3, + "size_chars": 43845 + }, + "openmeter/productcatalog/addon/adapter": { + "children": [], + "depth": 4, + "size_chars": 40668 + }, + "openmeter/productcatalog/addon/httpdriver": { + "children": [], + "depth": 4, + "size_chars": 17717 + }, + "openmeter/productcatalog/addon/service": { + "children": [], + "depth": 4, + "size_chars": 46376 + }, + "openmeter/productcatalog/driver": { + "children": [], + "depth": 3, + "size_chars": 17847 + }, + "openmeter/productcatalog/feature": { + "children": [], + "depth": 3, + "size_chars": 39987 + }, + "openmeter/productcatalog/featureresolver": { + "children": [], + "depth": 3, + "size_chars": 21371 + }, + "openmeter/productcatalog/http": { + "children": [], + "depth": 3, + "size_chars": 16371 + }, + "openmeter/productcatalog/plan": { + "children": [ + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/httpdriver", + "openmeter/productcatalog/plan/service" + ], + "depth": 3, + "size_chars": 62432 + }, + "openmeter/productcatalog/plan/adapter": { + "children": [], + "depth": 4, + "size_chars": 46511 + }, + "openmeter/productcatalog/plan/httpdriver": { + "children": [], + "depth": 4, + "size_chars": 22952 + }, + "openmeter/productcatalog/plan/service": { + "children": [], + "depth": 4, + "size_chars": 46369 + }, + "openmeter/productcatalog/planaddon": { + "children": [ + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/httpdriver", + "openmeter/productcatalog/planaddon/service" + ], + "depth": 3, + "size_chars": 17546 + }, + "openmeter/productcatalog/planaddon/adapter": { + "children": [], + "depth": 4, + "size_chars": 31102 + }, + "openmeter/productcatalog/planaddon/httpdriver": { + "children": [], + "depth": 4, + "size_chars": 13908 + }, + "openmeter/productcatalog/planaddon/service": { + "children": [], + "depth": 4, + "size_chars": 29067 + }, + "openmeter/productcatalog/subscription": { + "children": [ + "openmeter/productcatalog/subscription/http", + "openmeter/productcatalog/subscription/service", + "openmeter/productcatalog/subscription/testutils" + ], + "depth": 3, + "size_chars": 4664 + }, + "openmeter/productcatalog/subscription/http": { + "children": [], + "depth": 4, + "size_chars": 51030 + }, + "openmeter/productcatalog/subscription/service": { + "children": [], + "depth": 4, + "size_chars": 41980 + }, + "openmeter/productcatalog/subscription/testutils": { + "children": [], + "depth": 4, + "size_chars": 2437 + }, + "openmeter/productcatalog/testutils": { + "children": [], + "depth": 3, + "size_chars": 13252 + }, + "openmeter/progressmanager": { + "children": [ + "openmeter/progressmanager/adapter", + "openmeter/progressmanager/entity", + "openmeter/progressmanager/httpdriver" + ], + "depth": 2, + "size_chars": 760 + }, + "openmeter/progressmanager/adapter": { + "children": [], + "depth": 3, + "size_chars": 5334 + }, + "openmeter/progressmanager/entity": { + "children": [], + "depth": 3, + "size_chars": 2162 + }, + "openmeter/progressmanager/httpdriver": { + "children": [], + "depth": 3, + "size_chars": 3182 + }, + "openmeter/registry": { + "children": [ + "openmeter/registry/builder" + ], + "depth": 2, + "size_chars": 762 + }, + "openmeter/registry/builder": { + "children": [], + "depth": 3, + "size_chars": 5619 + }, + "openmeter/secret": { + "children": [ + "openmeter/secret/adapter", + "openmeter/secret/entity", + "openmeter/secret/service" + ], + "depth": 2, + "size_chars": 1192 + }, + "openmeter/secret/adapter": { + "children": [], + "depth": 3, + "size_chars": 1850 + }, + "openmeter/secret/entity": { + "children": [], + "depth": 3, + "size_chars": 3308 + }, + "openmeter/secret/service": { + "children": [], + "depth": 3, + "size_chars": 2108 + }, + "openmeter/server": { + "children": [ + "openmeter/server/router" + ], + "depth": 2, + "size_chars": 31329 + }, + "openmeter/server/router": { + "children": [], + "depth": 3, + "size_chars": 66157 + }, + "openmeter/session": { + "children": [], + "depth": 2, + "size_chars": 2177 + }, + "openmeter/sink": { + "children": [ + "openmeter/sink/flushhandler", + "openmeter/sink/models" + ], + "depth": 2, + "size_chars": 24872 + }, + "openmeter/sink/flushhandler": { + "children": [ + "openmeter/sink/flushhandler/ingestnotification" + ], + "depth": 3, + "size_chars": 9462 + }, + "openmeter/sink/flushhandler/ingestnotification": { + "children": [ + "openmeter/sink/flushhandler/ingestnotification/events" + ], + "depth": 4, + "size_chars": 4545 + }, + "openmeter/sink/flushhandler/ingestnotification/events": { + "children": [], + "depth": 5, + "size_chars": 1954 + }, + "openmeter/sink/models": { + "children": [], + "depth": 3, + "size_chars": 1185 + }, + "openmeter/streaming": { + "children": [ + "openmeter/streaming/clickhouse", + "openmeter/streaming/retry", + "openmeter/streaming/testutils" + ], + "depth": 2, + "size_chars": 25920 + }, + "openmeter/streaming/clickhouse": { + "children": [], + "depth": 3, + "size_chars": 110568 + }, + "openmeter/streaming/retry": { + "children": [], + "depth": 3, + "size_chars": 11914 + }, + "openmeter/streaming/testutils": { + "children": [], + "depth": 3, + "size_chars": 23734 + }, + "openmeter/subject": { + "children": [ + "openmeter/subject/adapter", + "openmeter/subject/httphandler", + "openmeter/subject/service", + "openmeter/subject/testutils" + ], + "depth": 2, + "size_chars": 4626 + }, + "openmeter/subject/adapter": { + "children": [], + "depth": 3, + "size_chars": 10694 + }, + "openmeter/subject/httphandler": { + "children": [], + "depth": 3, + "size_chars": 11930 + }, + "openmeter/subject/service": { + "children": [ + "openmeter/subject/service/hooks" + ], + "depth": 3, + "size_chars": 13513 + }, + "openmeter/subject/service/hooks": { + "children": [], + "depth": 4, + "size_chars": 17141 + }, + "openmeter/subject/testutils": { + "children": [], + "depth": 3, + "size_chars": 4604 + }, + "openmeter/subscription": { + "children": [ + "openmeter/subscription/addon", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks", + "openmeter/subscription/patch", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/testutils", + "openmeter/subscription/validators", + "openmeter/subscription/workflow" + ], + "depth": 2, + "size_chars": 147578 + }, + "openmeter/subscription/addon": { + "children": [ + "openmeter/subscription/addon/diff", + "openmeter/subscription/addon/http", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service" + ], + "depth": 3, + "size_chars": 47254 + }, + "openmeter/subscription/addon/diff": { + "children": [], + "depth": 4, + "size_chars": 49315 + }, + "openmeter/subscription/addon/http": { + "children": [], + "depth": 4, + "size_chars": 16041 + }, + "openmeter/subscription/addon/repo": { + "children": [], + "depth": 4, + "size_chars": 12621 + }, + "openmeter/subscription/addon/service": { + "children": [], + "depth": 4, + "size_chars": 42566 + }, + "openmeter/subscription/entitlement": { + "children": [], + "depth": 3, + "size_chars": 5065 + }, + "openmeter/subscription/hooks/annotations": { + "children": [], + "depth": 4, + "size_chars": 6686 + }, + "openmeter/subscription/patch": { + "children": [], + "depth": 3, + "size_chars": 57397 + }, + "openmeter/subscription/repo": { + "children": [], + "depth": 3, + "size_chars": 28549 + }, + "openmeter/subscription/service": { + "children": [], + "depth": 3, + "size_chars": 70935 + }, + "openmeter/subscription/testutils": { + "children": [], + "depth": 3, + "size_chars": 63585 + }, + "openmeter/subscription/validators/customer": { + "children": [], + "depth": 4, + "size_chars": 3784 + }, + "openmeter/subscription/validators/subscription": { + "children": [], + "depth": 4, + "size_chars": 8891 + }, + "openmeter/subscription/workflow": { + "children": [ + "openmeter/subscription/workflow/service" + ], + "depth": 3, + "size_chars": 3391 + }, + "openmeter/subscription/workflow/service": { + "children": [], + "depth": 4, + "size_chars": 53015 + }, + "openmeter/taxcode": { + "children": [ + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/taxcode/testutils" + ], + "depth": 2, + "size_chars": 33499 + }, + "openmeter/taxcode/adapter": { + "children": [], + "depth": 3, + "size_chars": 13436 + }, + "openmeter/taxcode/service": { + "children": [], + "depth": 3, + "size_chars": 26481 + }, + "openmeter/taxcode/testutils": { + "children": [], + "depth": 3, + "size_chars": 3474 + }, + "openmeter/testutils": { + "children": [], + "depth": 2, + "size_chars": 6207 + }, + "openmeter/watermill/driver/kafka": { + "children": [ + "openmeter/watermill/driver/kafka/metrics" + ], + "depth": 4, + "size_chars": 10147 + }, + "openmeter/watermill/driver/kafka/metrics": { + "children": [], + "depth": 5, + "size_chars": 6382 + }, + "openmeter/watermill/driver/noop": { + "children": [], + "depth": 4, + "size_chars": 338 + }, + "openmeter/watermill/eventbus": { + "children": [], + "depth": 3, + "size_chars": 4537 + }, + "openmeter/watermill/grouphandler": { + "children": [], + "depth": 3, + "size_chars": 3954 + }, + "openmeter/watermill/marshaler": { + "children": [], + "depth": 3, + "size_chars": 5436 + }, + "openmeter/watermill/nopublisher": { + "children": [], + "depth": 3, + "size_chars": 615 + }, + "openmeter/watermill/router": { + "children": [], + "depth": 3, + "size_chars": 19369 + }, + "pkg/clock": { + "children": [], + "depth": 2, + "size_chars": 1254 + }, + "pkg/cmpx": { + "children": [], + "depth": 2, + "size_chars": 260 + }, + "pkg/contextx": { + "children": [], + "depth": 2, + "size_chars": 1416 + }, + "pkg/convert": { + "children": [], + "depth": 2, + "size_chars": 1894 + }, + "pkg/currencyx": { + "children": [], + "depth": 2, + "size_chars": 22701 + }, + "pkg/datetime": { + "children": [], + "depth": 2, + "size_chars": 45101 + }, + "pkg/defaultx": { + "children": [], + "depth": 2, + "size_chars": 222 + }, + "pkg/entitydiff": { + "children": [], + "depth": 2, + "size_chars": 7383 + }, + "pkg/equal": { + "children": [], + "depth": 2, + "size_chars": 642 + }, + "pkg/errorsx": { + "children": [], + "depth": 2, + "size_chars": 6527 + }, + "pkg/expand": { + "children": [], + "depth": 2, + "size_chars": 1164 + }, + "pkg/featuregate": { + "children": [], + "depth": 2, + "size_chars": 262 + }, + "pkg/ffx": { + "children": [], + "depth": 2, + "size_chars": 2339 + }, + "pkg/filter": { + "children": [], + "depth": 2, + "size_chars": 30000 + }, + "pkg/framework": { + "children": [ + "pkg/framework/clickhouseotel", + "pkg/framework/commonhttp", + "pkg/framework/entutils", + "pkg/framework/lockr", + "pkg/framework/operation", + "pkg/framework/pgdriver", + "pkg/framework/tracex", + "pkg/framework/transaction", + "pkg/framework/transport" + ], + "depth": 2, + "size_chars": 2254 + }, + "pkg/framework/clickhouseotel": { + "children": [], + "depth": 3, + "size_chars": 8697 + }, + "pkg/framework/commonhttp": { + "children": [], + "depth": 3, + "size_chars": 14695 + }, + "pkg/framework/entutils": { + "children": [ + "pkg/framework/entutils/entcursor", + "pkg/framework/entutils/entdriver", + "pkg/framework/entutils/entexpose", + "pkg/framework/entutils/entmixinaccessor", + "pkg/framework/entutils/entpaginate", + "pkg/framework/entutils/entsetorclear", + "pkg/framework/entutils/testutils" + ], + "depth": 3, + "size_chars": 39245 + }, + "pkg/framework/entutils/entcursor": { + "children": [], + "depth": 4, + "size_chars": 5445 + }, + "pkg/framework/entutils/entdriver": { + "children": [], + "depth": 4, + "size_chars": 1356 + }, + "pkg/framework/entutils/entexpose": { + "children": [], + "depth": 4, + "size_chars": 3620 + }, + "pkg/framework/entutils/entmixinaccessor": { + "children": [], + "depth": 4, + "size_chars": 1340 + }, + "pkg/framework/entutils/entpaginate": { + "children": [], + "depth": 4, + "size_chars": 6378 + }, + "pkg/framework/entutils/entsetorclear": { + "children": [], + "depth": 4, + "size_chars": 1541 + }, + "pkg/framework/entutils/testutils/ent1": { + "children": [ + "pkg/framework/entutils/testutils/ent1/schema" + ], + "depth": 5, + "size_chars": 855 + }, + "pkg/framework/entutils/testutils/ent1/schema": { + "children": [], + "depth": 6, + "size_chars": 537 + }, + "pkg/framework/entutils/testutils/ent2": { + "children": [ + "pkg/framework/entutils/testutils/ent2/schema" + ], + "depth": 5, + "size_chars": 679 + }, + "pkg/framework/entutils/testutils/ent2/schema": { + "children": [], + "depth": 6, + "size_chars": 537 + }, + "pkg/framework/lockr": { + "children": [], + "depth": 3, + "size_chars": 31488 + }, + "pkg/framework/operation": { + "children": [], + "depth": 3, + "size_chars": 4513 + }, + "pkg/framework/pgdriver": { + "children": [], + "depth": 3, + "size_chars": 2587 + }, + "pkg/framework/tracex": { + "children": [], + "depth": 3, + "size_chars": 2032 + }, + "pkg/framework/transaction": { + "children": [], + "depth": 3, + "size_chars": 3457 + }, + "pkg/framework/transport/httptransport": { + "children": [ + "pkg/framework/transport/httptransport/encoder" + ], + "depth": 4, + "size_chars": 9597 + }, + "pkg/framework/transport/httptransport/encoder": { + "children": [], + "depth": 5, + "size_chars": 562 + }, + "pkg/gosundheit": { + "children": [], + "depth": 2, + "size_chars": 960 + }, + "pkg/hasher": { + "children": [], + "depth": 2, + "size_chars": 192 + }, + "pkg/idempotency": { + "children": [], + "depth": 2, + "size_chars": 462 + }, + "pkg/kafka": { + "children": [ + "pkg/kafka/metrics" + ], + "depth": 2, + "size_chars": 41873 + }, + "pkg/kafka/metrics": { + "children": [ + "pkg/kafka/metrics/internal", + "pkg/kafka/metrics/stats" + ], + "depth": 3, + "size_chars": 10741 + }, + "pkg/kafka/metrics/internal": { + "children": [], + "depth": 4, + "size_chars": 43701 + }, + "pkg/kafka/metrics/stats": { + "children": [], + "depth": 4, + "size_chars": 20690 + }, + "pkg/log": { + "children": [], + "depth": 2, + "size_chars": 2811 + }, + "pkg/lrux": { + "children": [], + "depth": 2, + "size_chars": 4423 + }, + "pkg/models": { + "children": [ + "pkg/models/http" + ], + "depth": 2, + "size_chars": 87223 + }, + "pkg/models/http": { + "children": [], + "depth": 3, + "size_chars": 799 + }, + "pkg/otelx": { + "children": [], + "depth": 2, + "size_chars": 676 + }, + "pkg/pagination": { + "children": [ + "pkg/pagination/v2" + ], + "depth": 2, + "size_chars": 7554 + }, + "pkg/pagination/v2": { + "children": [], + "depth": 3, + "size_chars": 16392 + }, + "pkg/pglockx": { + "children": [], + "depth": 2, + "size_chars": 1170 + }, + "pkg/pgxpoolobserver": { + "children": [], + "depth": 2, + "size_chars": 6014 + }, + "pkg/redis": { + "children": [], + "depth": 2, + "size_chars": 4147 + }, + "pkg/ref": { + "children": [], + "depth": 2, + "size_chars": 617 + }, + "pkg/server": { + "children": [], + "depth": 2, + "size_chars": 3664 + }, + "pkg/set": { + "children": [], + "depth": 2, + "size_chars": 3875 + }, + "pkg/slicesx": { + "children": [], + "depth": 2, + "size_chars": 7139 + }, + "pkg/sortx": { + "children": [], + "depth": 2, + "size_chars": 388 + }, + "pkg/statelessx": { + "children": [], + "depth": 2, + "size_chars": 1474 + }, + "pkg/strcase": { + "children": [], + "depth": 2, + "size_chars": 2567 + }, + "pkg/timeutil": { + "children": [], + "depth": 2, + "size_chars": 65240 + }, + "pkg/treex": { + "children": [], + "depth": 2, + "size_chars": 18686 + }, + "quickstart": { + "children": [], + "depth": 1, + "size_chars": 17718 + }, + "test/app": { + "children": [ + "test/app/custominvoicing", + "test/app/stripe" + ], + "depth": 2, + "size_chars": 12092 + }, + "test/app/custominvoicing": { + "children": [], + "depth": 3, + "size_chars": 15062 + }, + "test/app/stripe": { + "children": [], + "depth": 3, + "size_chars": 64899 + }, + "test/billing": { + "children": [], + "depth": 2, + "size_chars": 193522 + }, + "test/credits": { + "children": [], + "depth": 2, + "size_chars": 79662 + }, + "test/customer": { + "children": [], + "depth": 2, + "size_chars": 46723 + }, + "test/entitlement/regression": { + "children": [], + "depth": 3, + "size_chars": 24106 + }, + "test/notification": { + "children": [], + "depth": 2, + "size_chars": 72237 + }, + "test/subscription": { + "children": [], + "depth": 2, + "size_chars": 42924 + }, + "tools": { + "children": [ + "tools/migrate" + ], + "depth": 1, + "size_chars": 1937 + }, + "tools/migrate": { + "children": [ + "tools/migrate/cmd", + "tools/migrate/viewgen" + ], + "depth": 2, + "size_chars": 88408 + }, + "tools/migrate/cmd/viewgen": { + "children": [], + "depth": 4, + "size_chars": 522 + }, + "tools/migrate/viewgen": { + "children": [], + "depth": 3, + "size_chars": 2648 + }, + "tools/migrate/cmd": { + "children": [ + "tools/migrate/cmd/viewgen" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "test": { + "children": [ + "test/app", + "test/billing", + "test/credits", + "test/customer", + "test/entitlement", + "test/notification", + "test/subscription" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "test/entitlement": { + "children": [ + "test/entitlement/regression" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "pkg": { + "children": [ + "pkg/clock", + "pkg/cmpx", + "pkg/contextx", + "pkg/convert", + "pkg/currencyx", + "pkg/datetime", + "pkg/defaultx", + "pkg/entitydiff", + "pkg/equal", + "pkg/errorsx", + "pkg/expand", + "pkg/featuregate", + "pkg/ffx", + "pkg/filter", + "pkg/framework", + "pkg/gosundheit", + "pkg/hasher", + "pkg/idempotency", + "pkg/kafka", + "pkg/log", + "pkg/lrux", + "pkg/models", + "pkg/otelx", + "pkg/pagination", + "pkg/pglockx", + "pkg/pgxpoolobserver", + "pkg/redis", + "pkg/ref", + "pkg/server", + "pkg/set", + "pkg/slicesx", + "pkg/sortx", + "pkg/statelessx", + "pkg/strcase", + "pkg/timeutil", + "pkg/treex" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "pkg/framework/transport": { + "children": [ + "pkg/framework/transport/httptransport" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "pkg/framework/entutils/testutils": { + "children": [ + "pkg/framework/entutils/testutils/ent1", + "pkg/framework/entutils/testutils/ent2" + ], + "depth": 4, + "size_chars": 0, + "structural": true + }, + "openmeter/watermill": { + "children": [ + "openmeter/watermill/driver", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler", + "openmeter/watermill/marshaler", + "openmeter/watermill/nopublisher", + "openmeter/watermill/router" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "openmeter": { + "children": [ + "openmeter/apiconverter", + "openmeter/app", + "openmeter/billing", + "openmeter/cost", + "openmeter/credit", + "openmeter/currencies", + "openmeter/customer", + "openmeter/debug", + "openmeter/dedupe", + "openmeter/ent", + "openmeter/entitlement", + "openmeter/event", + "openmeter/info", + "openmeter/ingest", + "openmeter/ledger", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/meterexport", + "openmeter/namespace", + "openmeter/notification", + "openmeter/portal", + "openmeter/productcatalog", + "openmeter/progressmanager", + "openmeter/registry", + "openmeter/secret", + "openmeter/server", + "openmeter/session", + "openmeter/sink", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subscription", + "openmeter/taxcode", + "openmeter/testutils", + "openmeter/watermill" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "openmeter/watermill/driver": { + "children": [ + "openmeter/watermill/driver/kafka", + "openmeter/watermill/driver/noop" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/subscription/validators": { + "children": [ + "openmeter/subscription/validators/customer", + "openmeter/subscription/validators/subscription" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/subscription/hooks": { + "children": [ + "openmeter/subscription/hooks/annotations" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/info": { + "children": [ + "openmeter/info/httpdriver" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "openmeter/event": { + "children": [ + "openmeter/event/metadata", + "openmeter/event/models" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "openmeter/entitlement/validators": { + "children": [ + "openmeter/entitlement/validators/customer" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/entitlement/hooks": { + "children": [ + "openmeter/entitlement/hooks/subscription" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/billing/validators": { + "children": [ + "openmeter/billing/validators/customer", + "openmeter/billing/validators/subscription" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/billing/models": { + "children": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "openmeter/billing/charges/worker": { + "children": [ + "openmeter/billing/charges/worker/advance", + "openmeter/billing/charges/worker/asyncadvance" + ], + "depth": 4, + "size_chars": 0, + "structural": true + }, + "openmeter/billing/charges/models": { + "children": [ + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment" + ], + "depth": 4, + "size_chars": 0, + "structural": true + }, + "etc": { + "children": [ + "etc/seed", + "etc/wiretap" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "collector/benthos/services": { + "children": [ + "collector/benthos/services/leaderelection" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "collector/benthos": { + "children": [ + "collector/benthos/bloblang", + "collector/benthos/input", + "collector/benthos/internal", + "collector/benthos/presets", + "collector/benthos/services" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "collector/benthos/presets": { + "children": [ + "collector/benthos/presets/http-server", + "collector/benthos/presets/kubernetes-pod-exec-time" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "cmd": { + "children": [ + "cmd/balance-worker", + "cmd/billing-worker", + "cmd/jobs", + "cmd/notification-service", + "cmd/server", + "cmd/sink-worker" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "app": { + "children": [ + "app/common", + "app/config" + ], + "depth": 1, + "size_chars": 0, + "structural": true + }, + "api/v3/handlers": { + "children": [ + "api/v3/handlers/addons", + "api/v3/handlers/apps", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/currencies", + "api/v3/handlers/customers", + "api/v3/handlers/events", + "api/v3/handlers/featurecost", + "api/v3/handlers/features", + "api/v3/handlers/llmcost", + "api/v3/handlers/meters", + "api/v3/handlers/plans", + "api/v3/handlers/subscriptions", + "api/v3/handlers/taxcodes" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "api/spec/packages": { + "children": [ + "api/spec/packages/aip", + "api/spec/packages/legacy" + ], + "depth": 3, + "size_chars": 0, + "structural": true + }, + "api/spec/packages/aip/common": { + "children": [ + "api/spec/packages/aip/common/definitions" + ], + "depth": 5, + "size_chars": 0, + "structural": true + }, + "api/client": { + "children": [ + "api/client/go", + "api/client/javascript", + "api/client/node", + "api/client/python", + "api/client/web" + ], + "depth": 2, + "size_chars": 0, + "structural": true + }, + "api/client/javascript/src": { + "children": [ + "api/client/javascript/src/client", + "api/client/javascript/src/portal", + "api/client/javascript/src/react", + "api/client/javascript/src/zod" + ], + "depth": 4, + "size_chars": 0, + "structural": true + }, + ".codex": { + "children": [ + ".codex/agents", + ".codex/rules" + ], + "depth": 1, + "size_chars": 0, + "structural": true + } + }, + "leaves": [ + ".codex/agents", + ".codex/rules", + "api/client/go", + "api/client/javascript/patches", + "api/client/javascript/scripts", + "api/client/javascript/src/client", + "api/client/javascript/src/portal", + "api/client/javascript/src/react", + "api/client/javascript/src/zod", + "api/client/node", + "api/client/python/examples/async", + "api/client/python/examples/sync", + "api/client/python/openmeter/_generated/_utils", + "api/client/python/openmeter/_generated/aio/operations", + "api/client/python/openmeter/_generated/models", + "api/client/python/openmeter/_generated/operations", + "api/client/python/openmeter/aio/operations", + "api/client/python/openmeter/models", + "api/client/python/openmeter/operations", + "api/client/python/scripts", + "api/client/web", + "api/spec/packages/aip/common/definitions", + "api/spec/packages/aip/lib/rules", + "api/spec/packages/aip/scripts", + "api/spec/packages/aip/src/apps", + "api/spec/packages/aip/src/billing", + "api/spec/packages/aip/src/common", + "api/spec/packages/aip/src/currencies/cost-bases", + "api/spec/packages/aip/src/customers/charges", + "api/spec/packages/aip/src/customers/credits", + "api/spec/packages/aip/src/defaults", + "api/spec/packages/aip/src/entitlements", + "api/spec/packages/aip/src/events", + "api/spec/packages/aip/src/features", + "api/spec/packages/aip/src/governance", + "api/spec/packages/aip/src/invoices", + "api/spec/packages/aip/src/llmcost", + "api/spec/packages/aip/src/meters", + "api/spec/packages/aip/src/productcatalog", + "api/spec/packages/aip/src/shared", + "api/spec/packages/aip/src/subscriptions", + "api/spec/packages/aip/src/tax", + "api/spec/packages/legacy/lib/rules", + "api/spec/packages/legacy/src/app", + "api/spec/packages/legacy/src/billing/invoices", + "api/spec/packages/legacy/src/cloud", + "api/spec/packages/legacy/src/customer", + "api/spec/packages/legacy/src/entitlements/v2", + "api/spec/packages/legacy/src/info", + "api/spec/packages/legacy/src/notification", + "api/spec/packages/legacy/src/productcatalog", + "api/spec/patches", + "api/types", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/handlers/addons", + "api/v3/handlers/apps", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/currencies", + "api/v3/handlers/customers/billing", + "api/v3/handlers/customers/charges", + "api/v3/handlers/customers/credits", + "api/v3/handlers/customers/entitlementaccess", + "api/v3/handlers/events", + "api/v3/handlers/featurecost", + "api/v3/handlers/features", + "api/v3/handlers/llmcost", + "api/v3/handlers/meters/query", + "api/v3/handlers/plans/planaddons", + "api/v3/handlers/subscriptions/subscriptionaddons", + "api/v3/handlers/taxcodes", + "api/v3/labels", + "api/v3/oasmiddleware", + "api/v3/render", + "api/v3/request", + "api/v3/response", + "api/v3/server", + "api/v3/templates", + "api/v3/test", + "app/common", + "app/config", + "cmd/balance-worker", + "cmd/billing-worker", + "cmd/jobs/billing/advance", + "cmd/jobs/billing/advancecharges", + "cmd/jobs/billing/collect", + "cmd/jobs/billing/subscriptionsync", + "cmd/jobs/entitlement", + "cmd/jobs/internal", + "cmd/jobs/ledger/backfillaccounts", + "cmd/jobs/ledger/service", + "cmd/jobs/llmcost", + "cmd/jobs/migrate", + "cmd/jobs/quickstart", + "cmd/notification-service", + "cmd/server", + "cmd/sink-worker", + "collector/benthos/bloblang", + "collector/benthos/input/runai", + "collector/benthos/internal/logging", + "collector/benthos/internal/message", + "collector/benthos/internal/shutdown", + "collector/benthos/presets/http-server", + "collector/benthos/presets/kubernetes-pod-exec-time", + "collector/benthos/services/leaderelection", + "collector/cmd", + "collector/quickstart/collector/resources", + "collector/quickstart/collector/streams", + "collector/quickstart/seeder", + "deploy/charts/benthos-collector/templates", + "deploy/charts/openmeter/templates", + "docs/decisions", + "docs/migration-guides", + "e2e", + "etc/seed/streams", + "etc/wiretap", + "openmeter/apiconverter", + "openmeter/app/adapter", + "openmeter/app/custominvoicing/adapter", + "openmeter/app/custominvoicing/httpdriver", + "openmeter/app/custominvoicing/service", + "openmeter/app/httpdriver", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/client", + "openmeter/app/stripe/httpdriver", + "openmeter/app/stripe/service", + "openmeter/billing/adapter", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/service", + "openmeter/billing/charges/statemachine", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service/rating/delta", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "openmeter/billing/charges/usagebased/service/rating/subtract", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/billing/charges/worker/advance", + "openmeter/billing/charges/worker/asyncadvance", + "openmeter/billing/creditgrant/service", + "openmeter/billing/httpdriver", + "openmeter/billing/lineengine", + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/billing/service/invoicecalc", + "openmeter/billing/testutils", + "openmeter/billing/validators/customer", + "openmeter/billing/validators/subscription", + "openmeter/billing/worker/advance", + "openmeter/billing/worker/asyncadvance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/cost/adapter", + "openmeter/cost/service", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/driver", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/credit/hook", + "openmeter/currencies/adapter", + "openmeter/currencies/service", + "openmeter/customer/adapter", + "openmeter/customer/app", + "openmeter/customer/httpdriver", + "openmeter/customer/service/hooks", + "openmeter/customer/testutils", + "openmeter/debug/httpdriver", + "openmeter/dedupe/memorydedupe", + "openmeter/dedupe/redisdedupe", + "openmeter/ent/schema", + "openmeter/ent/tx", + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker/events", + "openmeter/entitlement/balanceworker/filters", + "openmeter/entitlement/boolean", + "openmeter/entitlement/driver/v2", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/snapshot", + "openmeter/entitlement/validators/customer", + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/info/httpdriver", + "openmeter/ingest/httpdriver", + "openmeter/ingest/ingestadapter", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/customerbalance", + "openmeter/ledger/historical/adapter", + "openmeter/ledger/noop", + "openmeter/ledger/recognizer", + "openmeter/ledger/resolvers/adapter", + "openmeter/ledger/routingrules", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions/testutils", + "openmeter/llmcost/adapter", + "openmeter/llmcost/service", + "openmeter/llmcost/sync", + "openmeter/meter/adapter", + "openmeter/meter/httphandler", + "openmeter/meter/mockadapter", + "openmeter/meter/service", + "openmeter/meterevent/adapter", + "openmeter/meterevent/httphandler", + "openmeter/meterexport/service", + "openmeter/namespace/namespacedriver", + "openmeter/notification/adapter", + "openmeter/notification/consumer", + "openmeter/notification/eventhandler/noop", + "openmeter/notification/httpdriver", + "openmeter/notification/internal", + "openmeter/notification/service", + "openmeter/notification/webhook/noop", + "openmeter/notification/webhook/secret", + "openmeter/notification/webhook/svix/internal", + "openmeter/portal/adapter", + "openmeter/portal/authenticator", + "openmeter/portal/httphandler", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/httpdriver", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/driver", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/httpdriver", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/httpdriver", + "openmeter/productcatalog/planaddon/service", + "openmeter/productcatalog/subscription/http", + "openmeter/productcatalog/subscription/service", + "openmeter/productcatalog/subscription/testutils", + "openmeter/productcatalog/testutils", + "openmeter/progressmanager/adapter", + "openmeter/progressmanager/entity", + "openmeter/progressmanager/httpdriver", + "openmeter/registry/builder", + "openmeter/secret/adapter", + "openmeter/secret/entity", + "openmeter/secret/service", + "openmeter/server/router", + "openmeter/session", + "openmeter/sink/flushhandler/ingestnotification/events", + "openmeter/sink/models", + "openmeter/streaming/clickhouse", + "openmeter/streaming/retry", + "openmeter/streaming/testutils", + "openmeter/subject/adapter", + "openmeter/subject/httphandler", + "openmeter/subject/service/hooks", + "openmeter/subject/testutils", + "openmeter/subscription/addon/diff", + "openmeter/subscription/addon/http", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/patch", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/testutils", + "openmeter/subscription/validators/customer", + "openmeter/subscription/validators/subscription", + "openmeter/subscription/workflow/service", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "openmeter/watermill/driver/kafka/metrics", + "openmeter/watermill/driver/noop", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler", + "openmeter/watermill/marshaler", + "openmeter/watermill/nopublisher", + "openmeter/watermill/router", + "pkg/clock", + "pkg/cmpx", + "pkg/contextx", + "pkg/convert", + "pkg/currencyx", + "pkg/datetime", + "pkg/defaultx", + "pkg/entitydiff", + "pkg/equal", + "pkg/errorsx", + "pkg/expand", + "pkg/featuregate", + "pkg/ffx", + "pkg/filter", + "pkg/framework/clickhouseotel", + "pkg/framework/commonhttp", + "pkg/framework/entutils/entcursor", + "pkg/framework/entutils/entdriver", + "pkg/framework/entutils/entexpose", + "pkg/framework/entutils/entmixinaccessor", + "pkg/framework/entutils/entpaginate", + "pkg/framework/entutils/entsetorclear", + "pkg/framework/entutils/testutils/ent1/schema", + "pkg/framework/entutils/testutils/ent2/schema", + "pkg/framework/lockr", + "pkg/framework/operation", + "pkg/framework/pgdriver", + "pkg/framework/tracex", + "pkg/framework/transaction", + "pkg/framework/transport/httptransport/encoder", + "pkg/gosundheit", + "pkg/hasher", + "pkg/idempotency", + "pkg/kafka/metrics/internal", + "pkg/kafka/metrics/stats", + "pkg/log", + "pkg/lrux", + "pkg/models/http", + "pkg/otelx", + "pkg/pagination/v2", + "pkg/pglockx", + "pkg/pgxpoolobserver", + "pkg/redis", + "pkg/ref", + "pkg/server", + "pkg/set", + "pkg/slicesx", + "pkg/sortx", + "pkg/statelessx", + "pkg/strcase", + "pkg/timeutil", + "pkg/treex", + "quickstart", + "test/app/custominvoicing", + "test/app/stripe", + "test/billing", + "test/credits", + "test/customer", + "test/entitlement/regression", + "test/notification", + "test/subscription", + "tools/migrate/cmd/viewgen", + "tools/migrate/viewgen" + ], + "roots": [ + ".codex", + "api", + "app", + "cmd", + "collector", + "deploy", + "docs", + "e2e", + "etc", + "openmeter", + "pkg", + "quickstart", + "test", + "tools" + ] +} \ No newline at end of file diff --git a/.archie/enrich_state.json b/.archie/enrich_state.json new file mode 100644 index 0000000000..2dc8dde0ad --- /dev/null +++ b/.archie/enrich_state.json @@ -0,0 +1,529 @@ +{ + "done": [ + ".codex", + ".codex/agents", + ".codex/rules", + "api", + "api/client", + "api/client/go", + "api/client/javascript", + "api/client/javascript/patches", + "api/client/javascript/scripts", + "api/client/javascript/src", + "api/client/javascript/src/client", + "api/client/javascript/src/portal", + "api/client/javascript/src/react", + "api/client/javascript/src/zod", + "api/client/node", + "api/client/python", + "api/client/python/examples", + "api/client/python/examples/async", + "api/client/python/examples/sync", + "api/client/python/openmeter", + "api/client/python/openmeter/_generated", + "api/client/python/openmeter/_generated/_utils", + "api/client/python/openmeter/_generated/aio", + "api/client/python/openmeter/_generated/aio/operations", + "api/client/python/openmeter/_generated/models", + "api/client/python/openmeter/_generated/operations", + "api/client/python/openmeter/aio", + "api/client/python/openmeter/aio/operations", + "api/client/python/openmeter/models", + "api/client/python/openmeter/operations", + "api/client/python/scripts", + "api/client/web", + "api/spec", + "api/spec/packages", + "api/spec/packages/aip", + "api/spec/packages/aip/common", + "api/spec/packages/aip/common/definitions", + "api/spec/packages/aip/lib", + "api/spec/packages/aip/lib/rules", + "api/spec/packages/aip/scripts", + "api/spec/packages/aip/src", + "api/spec/packages/aip/src/apps", + "api/spec/packages/aip/src/billing", + "api/spec/packages/aip/src/common", + "api/spec/packages/aip/src/currencies", + "api/spec/packages/aip/src/currencies/cost-bases", + "api/spec/packages/aip/src/customers", + "api/spec/packages/aip/src/customers/charges", + "api/spec/packages/aip/src/customers/credits", + "api/spec/packages/aip/src/defaults", + "api/spec/packages/aip/src/entitlements", + "api/spec/packages/aip/src/events", + "api/spec/packages/aip/src/features", + "api/spec/packages/aip/src/governance", + "api/spec/packages/aip/src/invoices", + "api/spec/packages/aip/src/llmcost", + "api/spec/packages/aip/src/meters", + "api/spec/packages/aip/src/productcatalog", + "api/spec/packages/aip/src/shared", + "api/spec/packages/aip/src/subscriptions", + "api/spec/packages/aip/src/tax", + "api/spec/packages/legacy", + "api/spec/packages/legacy/lib", + "api/spec/packages/legacy/lib/rules", + "api/spec/packages/legacy/src", + "api/spec/packages/legacy/src/app", + "api/spec/packages/legacy/src/billing", + "api/spec/packages/legacy/src/billing/invoices", + "api/spec/packages/legacy/src/cloud", + "api/spec/packages/legacy/src/customer", + "api/spec/packages/legacy/src/entitlements", + "api/spec/packages/legacy/src/entitlements/v2", + "api/spec/packages/legacy/src/info", + "api/spec/packages/legacy/src/notification", + "api/spec/packages/legacy/src/productcatalog", + "api/spec/patches", + "api/types", + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/handlers", + "api/v3/handlers/addons", + "api/v3/handlers/apps", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/currencies", + "api/v3/handlers/customers", + "api/v3/handlers/customers/billing", + "api/v3/handlers/customers/charges", + "api/v3/handlers/customers/credits", + "api/v3/handlers/customers/entitlementaccess", + "api/v3/handlers/events", + "api/v3/handlers/featurecost", + "api/v3/handlers/features", + "api/v3/handlers/llmcost", + "api/v3/handlers/meters", + "api/v3/handlers/meters/query", + "api/v3/handlers/plans", + "api/v3/handlers/plans/planaddons", + "api/v3/handlers/subscriptions", + "api/v3/handlers/subscriptions/subscriptionaddons", + "api/v3/handlers/taxcodes", + "api/v3/labels", + "api/v3/oasmiddleware", + "api/v3/render", + "api/v3/request", + "api/v3/response", + "api/v3/server", + "api/v3/templates", + "api/v3/test", + "app", + "app/common", + "app/config", + "cmd", + "cmd/balance-worker", + "cmd/billing-worker", + "cmd/jobs", + "cmd/jobs/billing", + "cmd/jobs/billing/advance", + "cmd/jobs/billing/advancecharges", + "cmd/jobs/billing/collect", + "cmd/jobs/billing/subscriptionsync", + "cmd/jobs/entitlement", + "cmd/jobs/internal", + "cmd/jobs/ledger", + "cmd/jobs/ledger/backfillaccounts", + "cmd/jobs/ledger/service", + "cmd/jobs/llmcost", + "cmd/jobs/migrate", + "cmd/jobs/quickstart", + "cmd/notification-service", + "cmd/server", + "cmd/sink-worker", + "collector", + "collector/benthos", + "collector/benthos/bloblang", + "collector/benthos/input", + "collector/benthos/input/runai", + "collector/benthos/internal", + "collector/benthos/internal/logging", + "collector/benthos/internal/message", + "collector/benthos/internal/shutdown", + "collector/benthos/presets", + "collector/benthos/presets/http-server", + "collector/benthos/presets/kubernetes-pod-exec-time", + "collector/benthos/services", + "collector/benthos/services/leaderelection", + "collector/cmd", + "collector/quickstart", + "collector/quickstart/collector", + "collector/quickstart/collector/resources", + "collector/quickstart/collector/streams", + "collector/quickstart/seeder", + "deploy", + "deploy/charts", + "deploy/charts/benthos-collector", + "deploy/charts/benthos-collector/templates", + "deploy/charts/openmeter", + "deploy/charts/openmeter/templates", + "docs", + "docs/decisions", + "docs/migration-guides", + "e2e", + "etc", + "etc/seed", + "etc/seed/streams", + "etc/wiretap", + "openmeter", + "openmeter/apiconverter", + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/custominvoicing", + "openmeter/app/custominvoicing/adapter", + "openmeter/app/custominvoicing/httpdriver", + "openmeter/app/custominvoicing/service", + "openmeter/app/httpdriver", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/app/stripe", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/client", + "openmeter/app/stripe/httpdriver", + "openmeter/app/stripe/service", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/charges", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/models", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/service", + "openmeter/billing/charges/statemachine", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/rating/delta", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "openmeter/billing/charges/usagebased/service/rating/subtract", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/billing/charges/worker", + "openmeter/billing/charges/worker/advance", + "openmeter/billing/charges/worker/asyncadvance", + "openmeter/billing/creditgrant", + "openmeter/billing/creditgrant/service", + "openmeter/billing/httpdriver", + "openmeter/billing/lineengine", + "openmeter/billing/models", + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/billing/service", + "openmeter/billing/service/invoicecalc", + "openmeter/billing/testutils", + "openmeter/billing/validators", + "openmeter/billing/validators/customer", + "openmeter/billing/validators/subscription", + "openmeter/billing/worker", + "openmeter/billing/worker/advance", + "openmeter/billing/worker/asyncadvance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/billing/worker/subscriptionsync/service", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/cost", + "openmeter/cost/adapter", + "openmeter/cost/service", + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/driver", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/credit/hook", + "openmeter/currencies", + "openmeter/currencies/adapter", + "openmeter/currencies/service", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/app", + "openmeter/customer/httpdriver", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/customer/testutils", + "openmeter/debug", + "openmeter/debug/httpdriver", + "openmeter/dedupe", + "openmeter/dedupe/memorydedupe", + "openmeter/dedupe/redisdedupe", + "openmeter/ent", + "openmeter/ent/schema", + "openmeter/ent/tx", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker", + "openmeter/entitlement/balanceworker/events", + "openmeter/entitlement/balanceworker/filters", + "openmeter/entitlement/boolean", + "openmeter/entitlement/driver", + "openmeter/entitlement/driver/v2", + "openmeter/entitlement/hooks", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/snapshot", + "openmeter/entitlement/validators", + "openmeter/entitlement/validators/customer", + "openmeter/event", + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/info", + "openmeter/info/httpdriver", + "openmeter/ingest", + "openmeter/ingest/httpdriver", + "openmeter/ingest/ingestadapter", + "openmeter/ingest/kafkaingest", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/customerbalance", + "openmeter/ledger/historical", + "openmeter/ledger/historical/adapter", + "openmeter/ledger/noop", + "openmeter/ledger/recognizer", + "openmeter/ledger/resolvers", + "openmeter/ledger/resolvers/adapter", + "openmeter/ledger/routingrules", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/ledger/transactions/testutils", + "openmeter/llmcost", + "openmeter/llmcost/adapter", + "openmeter/llmcost/service", + "openmeter/llmcost/sync", + "openmeter/meter", + "openmeter/meter/adapter", + "openmeter/meter/httphandler", + "openmeter/meter/mockadapter", + "openmeter/meter/service", + "openmeter/meterevent", + "openmeter/meterevent/adapter", + "openmeter/meterevent/httphandler", + "openmeter/meterexport", + "openmeter/meterexport/service", + "openmeter/namespace", + "openmeter/namespace/namespacedriver", + "openmeter/notification", + "openmeter/notification/adapter", + "openmeter/notification/consumer", + "openmeter/notification/eventhandler", + "openmeter/notification/eventhandler/noop", + "openmeter/notification/httpdriver", + "openmeter/notification/internal", + "openmeter/notification/service", + "openmeter/notification/webhook", + "openmeter/notification/webhook/noop", + "openmeter/notification/webhook/secret", + "openmeter/notification/webhook/svix", + "openmeter/notification/webhook/svix/internal", + "openmeter/portal", + "openmeter/portal/adapter", + "openmeter/portal/authenticator", + "openmeter/portal/httphandler", + "openmeter/productcatalog", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/httpdriver", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/driver", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/httpdriver", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/httpdriver", + "openmeter/productcatalog/planaddon/service", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/http", + "openmeter/productcatalog/subscription/service", + "openmeter/productcatalog/subscription/testutils", + "openmeter/productcatalog/testutils", + "openmeter/progressmanager", + "openmeter/progressmanager/adapter", + "openmeter/progressmanager/entity", + "openmeter/progressmanager/httpdriver", + "openmeter/registry", + "openmeter/registry/builder", + "openmeter/secret", + "openmeter/secret/adapter", + "openmeter/secret/entity", + "openmeter/secret/service", + "openmeter/server", + "openmeter/server/router", + "openmeter/session", + "openmeter/sink", + "openmeter/sink/flushhandler", + "openmeter/sink/flushhandler/ingestnotification", + "openmeter/sink/flushhandler/ingestnotification/events", + "openmeter/sink/models", + "openmeter/streaming", + "openmeter/streaming/clickhouse", + "openmeter/streaming/retry", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/httphandler", + "openmeter/subject/service", + "openmeter/subject/service/hooks", + "openmeter/subject/testutils", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/addon/http", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/patch", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/testutils", + "openmeter/subscription/validators", + "openmeter/subscription/validators/customer", + "openmeter/subscription/validators/subscription", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "openmeter/watermill", + "openmeter/watermill/driver", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/driver/kafka/metrics", + "openmeter/watermill/driver/noop", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler", + "openmeter/watermill/marshaler", + "openmeter/watermill/nopublisher", + "openmeter/watermill/router", + "pkg", + "pkg/clock", + "pkg/cmpx", + "pkg/contextx", + "pkg/convert", + "pkg/currencyx", + "pkg/datetime", + "pkg/defaultx", + "pkg/entitydiff", + "pkg/equal", + "pkg/errorsx", + "pkg/expand", + "pkg/featuregate", + "pkg/ffx", + "pkg/filter", + "pkg/framework", + "pkg/framework/clickhouseotel", + "pkg/framework/commonhttp", + "pkg/framework/entutils", + "pkg/framework/entutils/entcursor", + "pkg/framework/entutils/entdriver", + "pkg/framework/entutils/entexpose", + "pkg/framework/entutils/entmixinaccessor", + "pkg/framework/entutils/entpaginate", + "pkg/framework/entutils/entsetorclear", + "pkg/framework/entutils/testutils", + "pkg/framework/entutils/testutils/ent1", + "pkg/framework/entutils/testutils/ent1/schema", + "pkg/framework/entutils/testutils/ent2", + "pkg/framework/entutils/testutils/ent2/schema", + "pkg/framework/lockr", + "pkg/framework/operation", + "pkg/framework/pgdriver", + "pkg/framework/tracex", + "pkg/framework/transaction", + "pkg/framework/transport", + "pkg/framework/transport/httptransport", + "pkg/framework/transport/httptransport/encoder", + "pkg/gosundheit", + "pkg/hasher", + "pkg/idempotency", + "pkg/kafka", + "pkg/kafka/metrics", + "pkg/kafka/metrics/internal", + "pkg/kafka/metrics/stats", + "pkg/log", + "pkg/lrux", + "pkg/models", + "pkg/models/http", + "pkg/otelx", + "pkg/pagination", + "pkg/pagination/v2", + "pkg/pglockx", + "pkg/pgxpoolobserver", + "pkg/redis", + "pkg/ref", + "pkg/server", + "pkg/set", + "pkg/slicesx", + "pkg/sortx", + "pkg/statelessx", + "pkg/strcase", + "pkg/timeutil", + "pkg/treex", + "quickstart", + "test", + "test/app", + "test/app/custominvoicing", + "test/app/stripe", + "test/billing", + "test/credits", + "test/customer", + "test/entitlement", + "test/entitlement/regression", + "test/notification", + "test/subscription", + "tools", + "tools/migrate", + "tools/migrate/cmd", + "tools/migrate/cmd/viewgen", + "tools/migrate/viewgen" + ], + "wave": 241 +} \ No newline at end of file diff --git a/.archie/enrich_state.lock b/.archie/enrich_state.lock new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.archie/enrichments/w0.json b/.archie/enrichments/w0.json new file mode 100644 index 0000000000..b936b30130 --- /dev/null +++ b/.archie/enrichments/w0.json @@ -0,0 +1,269 @@ +{ + "pkg": { + "purpose": "Domain-agnostic shared Go utilities \u2014 the foundational layer every openmeter/* domain, api/*, cmd/*, and app/* package builds on. Its primary constraint: code here must NOT import openmeter/* domain packages, so it stays a pure dependency sink (pkg/models alone has ~229 in-edges).", + "patterns": [ + { + "name": "Validate() aggregates, never short-circuits", + "description": "Validate() methods collect into `var errs []error`, errors.Join them, and return models.NewNillableGenericValidationError(...). Established in pkg/models and mirrored by pkg/currencyx, pkg/filter, pkg/expand, pkg/timeutil.", + "example": "return models.NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "Read time via clock.Now()", + "description": "Time-dependent utilities (pkg/lrux expiry, period/cadence math) read pkg/clock.Now() not time.Now(), so clock.FreezeTime/UnFreeze make tests deterministic.", + "example": "import \"github.com/openmeterio/openmeter/pkg/clock\"; now := clock.Now()" + }, + { + "name": "Config struct with Validate + Configure(viper) + New constructor", + "description": "Infra packages (pkg/redis, pkg/kafka, pkg/pglockx) expose a Config with Validate(), viper Configure(), and a validating New* constructor; direct client construction that skips OTel/validation is forbidden.", + "example": "client, err := cfg.NewClient(...) // not redis.NewClient(rawOpts) directly" + }, + { + "name": "Inject *slog.Logger, never slog.Default()", + "description": "pkg/errorsx, pkg/gosundheit, pkg/log, pkg/kafka require an explicitly injected logger; falling back to slog.Default() in a constructor is a project-wide anti-pattern.", + "example": "func NewSlogHandler(logger *slog.Logger) Handler" + }, + { + "name": "Generic value helpers wrap samber/lo, not replace it", + "description": "pkg/slicesx, pkg/convert, pkg/defaultx, pkg/set complement lo with nil-preserving / empty-aware / error-aware variants; only add a local wrapper when lo cannot express it (e.g. convert.MapToPointer vs lo.EmptyableToPtr).", + "example": "ptr := convert.MapToPointer(m) // lo.EmptyableToPtr mishandles maps" + }, + { + "name": "Cycle-break by duplication, not cross-import", + "description": "pkg/equal duplicates the Equaler[T] interface from pkg/models specifically to avoid an import cycle; foundational packages stay maximally importable by holding only generic primitives.", + "example": "// pkg/equal: Equaler[T] duplicated, must NOT import pkg/models" + }, + { + "name": "Single-purpose leaf packages", + "description": "Most children own one tightly-scoped concern (pkg/cmpx, pkg/hasher, pkg/idempotency, pkg/strcase, pkg/sortx). Resist adding unrelated logic; grow a new sibling package instead.", + "example": "pkg/sortx holds only the ASC/DESC Order enum shared codebase-wide" + } + ], + "key_file_guides": [ + { + "file": "pkg/models", + "role": "Most-depended-on package (~229 in-edges): ManagedModel/NamespacedModel/CadencedModel, the Generic*Error taxonomy, and the ValidationIssue/FieldDescriptor RFC-7807 mapping. Signatures here are effectively frozen public API.", + "watch_for": "ErrorSeverity is inverted (Critical is the LOWEST value); never set ValidationIssue fields directly \u2014 use the With* option constructors which Clone." + }, + { + "file": "pkg/framework", + "role": "Structural sub-namespace owning transaction/entutils (the adapter transaction foundation), the operation->httptransport->commonhttp HTTP stack, lockr, pgdriver, tracex.", + "watch_for": "entutils.TransactingRepo/TxDriver is the ONLY sanctioned shared-transaction path \u2014 never reach to Ent's native client.Tx; framework must not import any openmeter/* domain package." + }, + { + "file": "pkg/pagination", + "role": "v1 offset/limit primitives (Page 1-based, Result[T], NewPaginator closure, CollectAll) used by ~119 packages; cursor/keyset lives in pkg/pagination/v2.", + "watch_for": "PageNumber is 1-based (Offset() goes negative if treated as 0-based); CollectAll returns nil (not partial) on error." + }, + { + "file": "pkg/timeutil", + "role": "Period/Recurrence/Timeline algebra used by billing, subscription, entitlement, credit; immutable value receivers delegating calendar math to pkg/datetime.", + "watch_for": "OpenPeriod.Intersection==nil means NO overlap (not empty); use Recurrence not raw time.Add so variable-length months don't overflow." + }, + { + "file": "pkg/datetime", + "role": "DateTime (RFC9557 time.Time wrapper) and ISODuration over rickb777/period; no-overflow calendar arithmetic via shiftClockTo.", + "watch_for": "Use DateTime.Add* not time.AddDate (month-end overflow); MarshalJSON serializes RFC3339 and drops bracket timezone/nanos." + }, + { + "file": "pkg/filter", + "role": "AIP-style typed query filters (FilterString/Integer/Time/...) emitting BOTH Ent predicates and go-sqlbuilder WHERE expressions; ~53 in-edges from v3 handlers/adapters.", + "watch_for": "An operator added to Select but not SelectWhereExpr (or vice versa) silently diverges the two SQL emitters; escape LIKE input via EscapeLikePattern." + }, + { + "file": "pkg/kafka", + "role": "Typed librdkafka Consumer/Producer/Admin config builders + LRU-cached idempotent TopicProvisioner; consumed by ingest, sink, watermill, cmd/*.", + "watch_for": "Every config struct needs `var _ ConfigMapper`/`var _ ConfigValidator`; guard SetKey on non-zero or you override librdkafka defaults; tolerate ErrTopicAlreadyExists." + }, + { + "file": "pkg/currencyx", + "role": "Currency Code (ISO 4217, used directly in the Ent schema), Calculator (resolves precision once), largest-remainder amount allocation over gobl.", + "watch_for": "Calculator{} constructed directly has nil Def and panics on RoundToPrecision; round to subunits via RoundToPrecision (JPY has 0 subunits), not decimal.Round." + } + ], + "anti_patterns": [ + "Importing any openmeter/* domain package from anywhere under pkg/ \u2014 it must remain a pure dependency sink so every domain can depend on it.", + "Calling time.Now() instead of clock.Now() in time-dependent utilities, breaking deterministic FreezeTime tests.", + "Falling back to slog.Default() in a constructor instead of requiring an injected *slog.Logger.", + "Adding local pointer/slice/must/default wrappers when github.com/samber/lo already covers the need (pkg/convert's empty-aware container helpers are the sanctioned exception).", + "Returning on the first validation error instead of joining all issues into models.NewNillableGenericValidationError." + ], + "decisions": [ + { + "decision": "pkg is a flat collection of single-purpose, domain-agnostic packages rather than a layered library.", + "rationale": "Keeping each utility narrow and free of domain imports maximizes reuse and lets 200+ packages depend on them without import cycles." + }, + { + "decision": "pkg/framework concentrates the cross-cutting transaction, HTTP-operation, locking, and driver foundations as its own sub-namespace.", + "rationale": "These sit at the bottom of the dependency graph; isolating them as domain-agnostic foundations means every domain's service/adapter layer can build on one sanctioned transaction and HTTP-handler abstraction." + }, + { + "decision": "pkg/equal duplicates pkg/models' Equaler rather than sharing it.", + "rationale": "Deliberate duplication breaks an import cycle so equality-based diffing stays usable from packages that pkg/models would otherwise depend on." + } + ], + "code_examples": [ + { + "scenario": "The project-standard Validate() that aggregates all field issues", + "code": "import (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nfunc (i Input) Validate() error {\n\tvar errs []error\n\tif i.Name == \"\" {\n\t\terrs = append(errs, errors.New(\"name is required\"))\n\t}\n\tif err := i.Currency.Validate(); err != nil {\n\t\terrs = append(errs, fmt.Errorf(\"currency: %w\", err))\n\t}\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "api": { + "purpose": "Go-side boundary of the TypeSpec->OpenAPI->Go generation chain for the legacy v1/v2 API. Holds the oapi-codegen-generated ServerInterface + request/response types (api.gen.go), the generated OpenAPI specs (openapi.yaml / openapi.cloud.yaml), and goverter type converters between near-identical generated types. Primary constraint: everything here except the tiny //go:generate stub files is generated and must not be hand-edited.", + "patterns": [ + { + "name": "Generated code is read-only", + "description": "api.gen.go, convert.gen.go, openapi.yaml, openapi.cloud.yaml all carry 'Code generated ... DO NOT EDIT' headers. To change them, edit the TypeSpec in api/spec and run make gen-api.", + "example": "// Code generated by github.com/oapi-codegen/oapi-codegen/v2 ... DO NOT EDIT.\\npackage api" + }, + { + "name": "Enums emit a Valid() guard", + "description": "Every generated enum type (AddonStatus, AppType, CollectionMethod, ...) gets a Valid() bool method switching over its const members; downstream code uses these for validation rather than re-listing values.", + "example": "func (e AddonStatus) Valid() bool { switch e { case AddonStatusActive: return true ... default: return false } }" + }, + { + "name": "Goverter bridges duplicate generated types", + "description": "oapi-codegen produces distinct Go types for the same shape (e.g. BillingDiscountPercentage vs DiscountPercentage). convert.go declares typed func variables under goverter pragmas; convert.gen.go fills them in init().", + "example": "// goverter:variables\\nvar ( FromBillingDiscountPercentageToDiscountPercentage func(BillingDiscountPercentage) DiscountPercentage )" + }, + { + "name": "Generation driven by codegen.yaml", + "description": "api.go is a one-line //go:generate stub pointing at codegen.yaml, which sets chi-server: true, models: true, embedded-spec: true and compatibility flags (always-prefix-enum-values, disable-required-readonly-as-pointer).", + "example": "//go:generate go tool .../oapi-codegen --config=codegen.yaml ./openapi.yaml" + }, + { + "name": "Problem+json error envelope", + "description": "All operations in the spec map non-2xx responses to shared $ref problem schemas (BadRequestProblemResponse, UnauthorizedProblemResponse, ...). New legacy endpoints reuse these, not bespoke error bodies.", + "example": "'400': content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse'" + } + ], + "key_file_guides": [ + { + "file": "api.gen.go", + "role": "oapi-codegen output: chi ServerInterface, all v1 request/response models, enum consts + Valid() methods, embedded spec", + "watch_for": "Never edit by hand; it is regenerated wholesale. A type appearing twice with a Billing- prefix is intentional (resolved via convert.gen.go)." + }, + { + "file": "api.go", + "role": "//go:generate stub invoking oapi-codegen against openapi.yaml", + "watch_for": "Only the generate directive lives here; do not add Go logic." + }, + { + "file": "codegen.yaml", + "role": "oapi-codegen configuration (package, chi-server/models/embedded-spec, compatibility flags)", + "watch_for": "Changing flags like always-prefix-enum-values or disable-required-readonly-as-pointer churns the entire api.gen.go." + }, + { + "file": "convert.go", + "role": "Hand-written goverter:variables declarations for API<->API type conversion", + "watch_for": "Declare only func signatures under goverter pragmas; bodies are generated. goverter:enum no is set." + }, + { + "file": "convert.gen.go", + "role": "Goverter-generated init() bodies for the convert.go variables (//go:build !goverter)", + "watch_for": "DO NOT EDIT; regenerate via goverter when convert.go changes." + }, + { + "file": "openapi.yaml", + "role": "Generated OpenAPI 3.0 spec for the self-hosted v1 API (source for api.gen.go and SDKs)", + "watch_for": "Edit TypeSpec in api/spec, not this file." + }, + { + "file": "openapi.cloud.yaml", + "role": "Generated OpenAPI spec for the Cloud API variant", + "watch_for": "Same generation source as openapi.yaml; do not diverge by hand." + }, + { + "file": "types/doc.go", + "role": "Placeholder package doc for shared API types", + "watch_for": "types/ is otherwise effectively empty; do not assume rich shared-type logic lives here." + } + ], + "anti_patterns": [ + "Hand-editing api.gen.go, convert.gen.go, openapi.yaml or openapi.cloud.yaml instead of changing api/spec TypeSpec and running make gen-api", + "Adding a v3/AIP endpoint here \u2014 v3 lives in api/v3, this package is legacy v1/v2 only", + "Writing conversion logic in convert.go function bodies instead of declaring goverter:variables signatures and letting goverter fill convert.gen.go", + "Introducing a bespoke error response schema on a new operation instead of reusing the shared problem+json $refs", + "Re-listing enum members in caller code instead of using the generated Valid() method" + ], + "decisions": [ + { + "decision": "TypeSpec is the single source of truth; this package is purely generated output plus tiny generate stubs.", + "rationale": "Keeps the OpenAPI spec, Go server contract, and multi-language SDKs in lockstep from one authored source." + }, + { + "decision": "Use goverter to bridge oapi-codegen's duplicate generated types.", + "rationale": "oapi-codegen emits distinct Go types for identical shapes; codegen'd converters avoid hand-maintained, error-prone copy functions." + } + ], + "code_examples": [ + { + "scenario": "Declaring an API<->API type converter that goverter implements", + "code": "//go:generate go tool github.com/jmattheis/goverter/cmd/goverter gen ./\\npackage api\\n\\n// goverter:variables\\n// goverter:skipCopySameType\\n// goverter:output:file ./convert.gen.go\\n// goverter:enum no\\nvar (\\n\\tFromBillingDiscountPercentageToDiscountPercentage func(BillingDiscountPercentage) DiscountPercentage\\n\\tFromBillingDiscountUsageToDiscountUsage func(BillingDiscountUsage) DiscountUsage\\n)" + } + ] + }, + "openmeter": { + "purpose": "Structural root of OpenMeter's core business logic. It owns no direct source files; each child is a self-contained domain or infrastructure package (billing, subscription, entitlement, customer, ledger, notification, streaming, sink, watermill, etc.) following the service/adapter layering, and downstream wiring (app/common, cmd/*) plus the v3 handlers compose them.", + "patterns": [ + { + "name": "Domain package = interface root + layered sub-packages", + "description": "A domain's root declares Service/Adapter (or Repository) interfaces plus value types; persistence lives in a child adapter/, orchestration in service/, transport in httpdriver/httphandler/ or the v3 handlers. See billing, customer, subject, notification, taxcode.", + "example": "openmeter/subject/{subject.go,service.go,adapter.go} -> service/, adapter/, httphandler/, testutils/" + }, + { + "name": "Write path goes through Service, never Adapter", + "description": "Adapters are Ent/transport-only; the Service owns transaction.Run, hooks, and Validate(). Calling the Adapter directly skips all three.", + "example": "subject.Service.Create wraps adapter writes in transaction.Run + hooks; direct adapter writes are an anti-pattern" + }, + { + "name": "Collect-then-wrap validation", + "description": "Validate()/Input.Validate() accumulate into var errs []error and return models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on first invalid field. Pervasive across billing, productcatalog, notification, taxcode, app.", + "example": "errs = append(errs, fmt.Errorf(\"field: %w\", err)); return models.NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "Coded ValidationIssue error catalogs", + "description": "Domain errors are typed, coded sentinels (ValidationIssue with attrs / IsX helpers) in an errors.go, not raw fmt.Errorf \u2014 they carry HTTP status, severity and frontend code matching. See billing, ledger, taxcode, app, customer.", + "example": "billing.NewValidationError(...) sentinels in errors.go; ledger ValidationIssue.WithAttrs" + }, + { + "name": "Discriminated-union value types with central registries", + "description": "Sum types keyed by a Type discriminator (Price/RateCard, Channel/Rule config, EventType, AppType, EntitlementType) must switch on the discriminator and be added to the central Values()/list. Marshaling the wrapper directly causes wrong shape / recursion.", + "example": "productcatalog Price/RateCard custom JSON; notification EventType registered in eventTypes slice; app AppType.Validate" + }, + { + "name": "Namespace-tenant seam", + "description": "Components that provision per-tenant state register a namespace.Handler (CreateNamespace/DeleteNamespace) on the central Manager; the active tenant is resolved from context via the namespacedriver decoder, never from body/query.", + "example": "taxcode/namespacehandler.go seeds org defaults inside one CreateNamespace transaction" + }, + { + "name": "Feature-gated wiring (credits.enabled)", + "description": "ledger and related credit/customer-account paths are gated by credits.enabled; when off, app/common wires noop implementations. Code touching ledger accounts must respect this gate at every layer.", + "example": "openmeter/ledger/noop used when credits disabled" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Putting Ent/SQL or HTTP code in a domain root package \u2014 roots are interfaces + value types + pure model logic; persistence belongs in adapter/, transport in the httpdriver/handlers", + "Writing through an Adapter directly instead of the Service, bypassing transaction.Run, hooks, and Validate()", + "Returning bare fmt.Errorf instead of the domain's coded ValidationIssue sentinels, losing HTTP status / severity / frontend-code matching", + "Adding a discriminated-union variant (Price, ChannelType, EventType, AppType) without updating its central registry/Values() and every Validate() switch", + "Letting Service and Adapter/Repository method sets drift apart, or constructing services via struct literals instead of their New constructors" + ], + "decisions": [ + { + "decision": "Each domain is an interface-rooted package with separate adapter/service/transport children rather than one flat package.", + "rationale": "Enforces dependency direction (transport -> service -> adapter), keeps roots import-light, and lets app/common compose narrow contracts via Wire." + }, + { + "decision": "Domain errors and validation are modeled as coded ValidationIssue sentinels with errors.Join accumulation.", + "rationale": "Gives consistent HTTP status mapping, severity, and frontend code-matching, and surfaces all invalid fields at once." + }, + { + "decision": "Tenancy and feature gating are cross-cutting seams (namespace.Handler, credits.enabled noop wiring) rather than per-package conditionals.", + "rationale": "Lets every domain provision/disable consistently without duplicating multi-tenant or feature-flag logic." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w1.json b/.archie/enrichments/w1.json new file mode 100644 index 0000000000..b790852b7d --- /dev/null +++ b/.archie/enrichments/w1.json @@ -0,0 +1,175 @@ +{ + "api/spec/packages": { + "purpose": "pnpm workspace container holding the two TypeSpec source-of-truth packages that author the OpenMeter API contract. It splits the surface by API generation: legacy/ emits the v1/v2 + Cloud OpenAPI (and a Python client), while aip/ emits the Google-AIP-style v3 OpenAPI. Everything downstream (api/openapi.yaml, api/v3/openapi.yaml, Go/JS SDKs) is generated from these .tsp sources and must never be hand-edited.", + "patterns": [ + { + "name": "Two packages, two API generations", + "description": "legacy/ owns v1/v2 + Cloud; aip/ owns the AIP-style v3 surface. Pick the package by which API version the change targets; do not cross-author v3 types in legacy or vice versa.", + "example": "v3 list-filter type -> packages/aip/src; new v1 portal endpoint -> packages/legacy/src" + }, + { + "name": "Workspace member discovery via pnpm-workspace.yaml", + "description": "../pnpm-workspace.yaml globs 'packages/*', so each child is a standalone pnpm package with its own package.json/tspconfig.yaml. A new sibling only participates once it lives directly under packages/.", + "example": "packages:\\n - packages/*" + }, + { + "name": "Build orchestrated from the parent spec Makefile, not here", + "description": "../Makefile generate target runs pnpm generate across both members, then post-processes (yq $ref rewrite of AIP filters), bundles the aip output, and copies emitted YAML to api/openapi.yaml, api/openapi.cloud.yaml, api/v3/openapi.yaml. Output paths are fixed by that target.", + "example": "cp packages/legacy/output/openapi.OpenMeter.yaml ../openapi.yaml" + } + ], + "key_file_guides": [ + { + "file": "aip/", + "role": "TypeSpec package for the AIP-style v3 API; stricter custom linter (kebab op-ids, no-nullable, field-prefix); two-stage tsp-compile-then-Node-post-process build with shared common/definitions fragments.", + "watch_for": "Skipping flatten-allof / seal-object-schemas post-processors, or editing emitted output/definitions YAML instead of src/." + }, + { + "file": "legacy/", + "role": "TypeSpec package for v1/v2 + Cloud; dual emit (OpenAPI3 + Python client) via tspconfig.yaml + tspconfig.client.yaml, with a lighter custom linter than aip.", + "watch_for": "Pointing the OpenAPI emit at ./src instead of ./src/cloud, and CRUD bodies not using the Rest.Resource ResourceCreate/ReplaceModel templates from README." + } + ], + "anti_patterns": [ + "Editing generated artifacts (api/openapi.yaml, api/v3/openapi.yaml, api/api.gen.go, Go/JS/Python SDKs) instead of the .tsp sources here.", + "Adding v3 surface to legacy/ or v1 surface to aip/ instead of the package matching the API generation.", + "Adding a package outside packages/* so pnpm-workspace.yaml never picks it up.", + "Running tsp compile directly and bypassing the parent Makefile generate target (misses the yq filter $ref rewrite, the aip openapi bundle, and the copy-to-api steps)." + ], + "decisions": [ + { + "decision": "Two separate TypeSpec packages rather than one shared spec.", + "rationale": "v1/legacy and v3/AIP have divergent conventions and linters (AIP enforces kebab op-ids, no-nullable, field prefixes); isolating them lets each evolve and lint independently while sharing one pnpm workspace." + }, + { + "decision": "Cross-package generation logic lives in the parent spec Makefile, not inside packages/.", + "rationale": "Steps spanning both members (yq filter $ref rewrite, openapi bundle of the aip output, copying emitted YAML into api/ and api/v3/) must run in a fixed order, so they sit one level up rather than in either package." + } + ], + "code_examples": [] + }, + "api/client": { + "purpose": "Structural root for the published, multi-language OpenMeter client SDKs. Every sub-package here is generated from the TypeSpec/OpenAPI contract in api/spec and is consumed by external users; only the Go SDK is imported by the Go backend itself (e.g. e2e, quickstart).", + "patterns": [ + { + "name": "Split by language, generated per language", + "description": "Each child owns one SDK language with its own generator/toolchain: go/ (oapi-codegen via codegen.yaml), javascript/ (orval via orval.config.ts), python/ (TypeSpec http-client-python). node/ and web/ are README-only stubs.", + "example": "api/client/go/codegen.yaml drives oapi-codegen; api/client/javascript/orval.config.ts drives orval" + }, + { + "name": "Hand-edited only at the seams", + "description": "Generated code (client.gen.go, javascript/src/) is never edited; thin hand-written wrappers add auth/ergonomics. In go/, client.go adds NewAuthClient / IngestEvent helpers over the generated Client.", + "example": "api/client/go/client.go: NewAuthClientWithResponses and IngestEventBatch wrap generated *Client methods" + }, + { + "name": "Generation source is api/spec, not these folders", + "description": "All client code derives from the OpenAPI specs produced by api/spec; regenerate via `make gen-api` at the repo root. Editing a child's generated output is always wrong.", + "example": "go/client.go carries a //go:generate oapi-codegen directive consuming ../../openapi.cloud.yaml" + } + ], + "key_file_guides": [ + { + "file": "go/client.gen.go", + "role": "oapi-codegen output: full v1/cloud Client, ClientWithResponses, and request/response types (~1.7MB).", + "watch_for": "DO NOT EDIT; regenerate via the //go:generate directive in client.go (make gen-api)" + }, + { + "file": "go/client.go", + "role": "Hand-written auth + event-ingest convenience wrappers over the generated client.", + "watch_for": "Only place for Go-side ergonomics; keep wrappers as thin pass-throughs to generated methods" + }, + { + "file": "javascript/orval.config.ts", + "role": "orval generator config for the TypeScript SDK (output under src/).", + "watch_for": "src/ is generated from the spec; change generation here, not the src output" + } + ], + "anti_patterns": [ + "Editing any generated artifact (go/client.gen.go, javascript/src/, python/openmeter/) instead of the api/spec .tsp source", + "Importing a non-Go client (javascript/python) from the Go backend", + "Adding language-SDK logic outside the per-language child folder" + ], + "decisions": [ + { + "decision": "One generated SDK per language, each with its own native generator/toolchain.", + "rationale": "Idiomatic per-language clients beat one forced abstraction; all stay in sync because they share a single OpenAPI source of truth." + } + ], + "code_examples": [] + }, + "api/spec": { + "purpose": "TypeSpec source of truth for the OpenMeter API contract, authored as a pnpm workspace. It compiles two TypeSpec packages into the OpenAPI specs and SDKs the rest of the repo depends on; everything under api/ (openapi.yaml, api/v3/openapi.yaml, api.gen.go, all client SDKs) is generated downstream from here.", + "patterns": [ + { + "name": "Two packages, two API generations", + "description": "packages/legacy/ emits the v1/v2 OpenMeter + Cloud specs and the Python client; packages/aip/ emits the AIP-style v3 spec. Add new surface to the package matching the API generation.", + "example": "package.json `generate` runs `--filter @openmeter/api-spec-legacy run generate && --filter @openmeter/api-spec-aip run generate`" + }, + { + "name": "Build orchestration lives in this Makefile, not the children", + "description": "The api/spec Makefile runs pnpm generate, then AIP $ref rewriting (yq), `openapi bundle` for v3, and copies outputs into ../ and ../v3/. Running `tsp compile` directly skips these steps.", + "example": "Makefile generate rewrites SortQuery/StringFieldFilter schemas to $ref common/definitions/aip_filters.yaml, then cp legacy outputs to ../openapi.yaml and ../openapi.cloud.yaml" + }, + { + "name": "pnpm workspace with patched, version-pinned TypeSpec", + "description": "pnpm-workspace.yaml globs packages/*; TypeSpec compiler/http/openapi/openapi3 and http-client-python are pinned and locally patched under patches/. .npmrc enforces save-exact=true.", + "example": "package.json pnpm.patchedDependencies maps @typespec/http, @typespec/compiler, @typespec/openapi(3), @typespec/http-client-python to files in patches/" + }, + { + "name": "Format and lint before generate", + "description": "`format` (prettier + aip format) and `lint` (prettier --check + per-package lint incl. custom AIP/legacy rules) run via pnpm scripts; the Makefile generate target depends on format.", + "example": "Makefile `generate: format`; package.json `lint` runs prettier --check plus both package lint scripts" + } + ], + "key_file_guides": [ + { + "file": "Makefile", + "role": "Top-level orchestration: install, format, generate (yq $ref rewrite + openapi bundle + copy-to-api), lint.", + "watch_for": "The copy/bundle/yq steps live ONLY here; bypassing them leaves api/openapi.yaml and api/v3/openapi.yaml stale or with inline filter schemas instead of $ref" + }, + { + "file": "package.json", + "role": "Workspace root: generate/format/lint scripts, pinned TypeSpec deps, patchedDependencies/overrides.", + "watch_for": "private, version 0.1.0; exports map points at packages/*/output, which are gitignored build artifacts" + }, + { + "file": "pnpm-workspace.yaml", + "role": "Declares workspace members as packages/* with trustPolicy/minimumReleaseAge guards.", + "watch_for": "A new package outside packages/* is never discovered by pnpm" + }, + { + "file": "patches/", + "role": "Local patches for the pinned TypeSpec compiler/http/openapi/openapi3/http-client-python packages.", + "watch_for": "Bumping a patched dep requires regenerating its patch hash in package.json" + }, + { + "file": ".gitignore / .prettierignore", + "role": "Excludes generated output (**/output/, packages/**/output/), node_modules, and pnpm-lock from formatting/VCS.", + "watch_for": "Generated OpenAPI under packages/*/output is intentionally untracked; the committed artifacts are the copies in api/" + } + ], + "anti_patterns": [ + "Editing generated artifacts (api/openapi.yaml, api/v3/openapi.yaml, api.gen.go, Go/JS/Python SDKs) instead of the .tsp sources here", + "Running tsp compile directly and skipping the Makefile (misses the yq $ref rewrite, AIP openapi bundle, and copy-to-api steps)", + "Adding v3 surface to packages/legacy or v1/v2 surface to packages/aip", + "Putting cross-package generation logic inside packages/* instead of the parent Makefile", + "Unpinning or floating TypeSpec dependency versions, invalidating the local patches" + ], + "decisions": [ + { + "decision": "Two separate TypeSpec packages (legacy v1/v2/cloud and AIP v3) rather than one shared spec.", + "rationale": "The v3 surface follows Kong AIP conventions and a different pipeline (bundle + filter $ref rewrite) than the legacy surface, so they stay isolated." + }, + { + "decision": "TypeSpec is the single source of truth; all OpenAPI and SDKs are generated.", + "rationale": "Keeps multi-language clients and server stubs consistent and lets the API contract be authored once." + } + ], + "code_examples": [ + { + "scenario": "Regenerate all specs and SDKs from the TypeSpec sources", + "code": "make gen-api # repo root, or:\nmake -C api/spec generate # pnpm generate, yq $ref rewrite, openapi bundle, then copy to api/ and api/v3/" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w10.json b/.archie/enrichments/w10.json new file mode 100644 index 0000000000..ddee55e8fb --- /dev/null +++ b/.archie/enrichments/w10.json @@ -0,0 +1,315 @@ +{ + "openmeter/productcatalog": { + "purpose": "Root of the product-catalog domain and the highest-fan-in non-pkg package. The root files define the shared catalog value types (Price, RateCard, Discounts, EntitlementTemplate, TaxConfig, EffectivePeriod, ProRatingConfig, SettlementMode, Alignment) plus the FeatureResolver interface; subscription, billing, and entitlement all build on these primitives. Sub-packages split by concern: feature/, plan/, addon/, planaddon/ (domains), adapter/ (Ent), driver/+http/ (HTTP), featureresolver/, subscription/ (plan->subscription bridge), testutils/.", + "patterns": [ + { + "name": "Discriminated union value types", + "description": "Price, RateCard, and EntitlementTemplate are sum types: a private `t TypeEnum` field plus one pointer per variant, an `AsX()/FromX()` accessor interface (pricer, entitlementTemplater), and type-switch MarshalJSON/UnmarshalJSON keyed on a `type` field.", + "example": "type Price struct { t PriceType; flat *FlatPrice; unit *UnitPrice; ... } with `var _ pricer = (*Price)(nil)`" + }, + { + "name": "ValidateWith + ValidatorFunc composition", + "description": "Validation is composed from `models.ValidatorFunc[T]` closures applied via `models.Validate(v, fns...)`, not ad-hoc inline checks. Named validators like PercentageDiscountWithValidValue() / ValidateEffectivePeriod() are reusable.", + "example": "func (d PercentageDiscount) Validate() error { return d.ValidateWith(PercentageDiscountWithValidValue()) }" + }, + { + "name": "Collect-then-wrap validation", + "description": "Multi-field Validate() accumulates into `var errs []error`, prefixes each with models.ErrorWithFieldPrefix(NewFieldSelectorGroup(...)), and returns models.NewGenericValidationError / NewNillableGenericValidationError(errors.Join(errs...)).", + "example": "Discounts.Validate wraps percentage/usage errors under field selectors then under a 'discounts' group" + }, + { + "name": "Models contract assertions", + "description": "Each value type asserts the interfaces it satisfies at package scope: models.Validator, models.Equaler[T], models.Clonable[T], models.CustomValidator[T], hasher.Hasher.", + "example": "var ( _ models.Validator = (*UsageDiscount)(nil); _ hasher.Hasher = (*UsageDiscount)(nil) )" + }, + { + "name": "ValidateForPrice context validation", + "description": "Discounts carry a second validation pass that depends on the owning Price (e.g. usage discount illegal on FlatPriceType). New price-dependent rules go in ValidateForPrice(*Price), not Validate().", + "example": "UsageDiscountWithPrice returns ErrUsageDiscountWithFlatPrice when price.Type()==FlatPriceType" + }, + { + "name": "ISODuration cadence alignment", + "description": "Billing cadences are compared via datetime.ISODuration.Simplify(true) + DivisibleBy both ways, never by raw numeric comparison; ValidateBillingCadencesAlign is the canonical check.", + "example": "ok, err := pSimple.DivisibleBy(rcSimple)" + }, + { + "name": "Hash-based equality for discounts", + "description": "Discount value types implement hasher.Hasher by concatenating canonical String() forms; Discounts.Equal compares via equal.HasherPtrEqual rather than reflect.DeepEqual.", + "example": "func (d PercentageDiscount) Hash() hasher.Hash { return hasher.NewHash([]byte(d.Percentage.String())) }" + } + ], + "key_file_guides": [ + { + "file": "price.go", + "role": "Price sum type (flat/unit/tiered/dynamic/package), PaymentTermType, Commitments, pricer interface", + "watch_for": "Never call json.Marshal(p) inside Price.MarshalJSON; switch on p.t and serialize the embedded variant" + }, + { + "file": "ratecard.go", + "role": "RateCard interface (FlatFee/UsageBased) with Merge/ChangeMeta/Clone and RateCardMeta", + "watch_for": "UsageBasedRateCard must carry a non-zero billing cadence; ChangeMeta is the only sanctioned mutation entry point" + }, + { + "file": "entitlement.go", + "role": "EntitlementTemplate sum type over metered/static/boolean, marshals with a `type` discriminator", + "watch_for": "Default branch in MarshalJSON/UnmarshalJSON errors on unknown type \u2014 keep the switch exhaustive" + }, + { + "file": "discount.go", + "role": "PercentageDiscount, UsageDiscount, Discounts container with Validate + ValidateForPrice", + "watch_for": "Usage discount is invalid with a flat price; keep Hash/Clone/Equal in sync when adding a field" + }, + { + "file": "effectiveperiod.go", + "role": "EffectivePeriod (EffectiveFrom/To) embedded by plans/addons; AsPeriod()->timeutil.OpenPeriod", + "watch_for": "EffectiveTo without EffectiveFrom is rejected (ErrEffectivePeriodFromNotSet)" + }, + { + "file": "alignment.go", + "role": "ValidateBillingCadencesAlign \u2014 plan vs ratecard cadence divisibility", + "watch_for": "P1M vs P4W are not numerically comparable; always go through Simplify+DivisibleBy" + }, + { + "file": "pro_rating.go", + "role": "ProRatingConfig/ProRatingMode (only prorate_prices)", + "watch_for": "Validate short-circuits when !Enabled; add new modes to the switch and Values()" + }, + { + "file": "featureresolver.go", + "role": "FeatureResolver / NamespacedFeatureResolver interfaces (impl in featureresolver/)", + "watch_for": "Interface only \u2014 do not put lookup logic here; it belongs in the featureresolver sub-package" + } + ], + "anti_patterns": [ + "Marshaling a union (Price/RateCard/EntitlementTemplate) via json.Marshal on the wrapper itself instead of switching on the discriminator and serializing the active variant (infinite recursion / wrong shape)", + "Writing inline validation branches instead of composing models.ValidatorFunc closures via ValidateWith/models.Validate", + "Returning on the first invalid field instead of collecting errs and returning NewGenericValidationError/NewNillableGenericValidationError(errors.Join(...)) with field prefixes", + "Comparing billing cadences numerically (P1M==P4W) instead of ValidateBillingCadencesAlign / Simplify+DivisibleBy", + "Adding DB or HTTP code to this root package \u2014 persistence lives in adapter/ and the per-domain adapter children, HTTP in driver/http/ and httpdriver children" + ], + "decisions": [ + { + "decision": "Catalog value types are self-validating sum types with custom JSON, not Ent rows or plain structs", + "rationale": "Plan/addon/ratecard prices are polymorphic and reused across subscription, billing, and entitlement; a typed union with discriminated JSON keeps the wire shape and the domain invariants in one place" + }, + { + "decision": "FeatureResolver is declared here but implemented in featureresolver/", + "rationale": "Avoids a dependency cycle: subscription/billing depend on the resolver interface while the implementation depends on feature.FeatureConnector" + } + ], + "code_examples": [ + { + "scenario": "Compose a ValidatorFunc and accumulate field-prefixed errors", + "code": "func (d Discounts) Validate() error {\n\tvar errs []error\n\tif d.Percentage != nil {\n\t\tif err := d.Percentage.Validate(); err != nil {\n\t\t\terrs = append(errs, models.ErrorWithFieldPrefix(\n\t\t\t\tmodels.NewFieldSelectorGroup(models.NewFieldSelector(\"percentage\")), err))\n\t\t}\n\t}\n\tif err := errors.Join(errs...); err != nil {\n\t\treturn models.NewGenericValidationError(err)\n\t}\n\treturn nil\n}" + } + ] + }, + "openmeter/progressmanager": { + "purpose": "Small standalone domain that tracks per-operation progress counters (e.g. long-running ClickHouse queries). The root files declare the Adapter and Service interfaces; entity/ holds the I/O-free domain types, adapter/ is the Redis-backed store (with noop/mock variants), httpdriver/ exposes a read-only GetProgress endpoint.", + "patterns": [ + { + "name": "Interface-only root", + "description": "adapter.go and service.go declare Adapter/Service as aliases of ProgressManagerAdapter/ProgressManagerService \u2014 both expose the same GetProgress/UpsertProgress pair over entity input types. No logic lives at the root.", + "example": "type Service interface { ProgressManagerService } with GetProgress(ctx, entity.GetProgressInput) and UpsertProgress(ctx, entity.UpsertProgressInput)" + }, + { + "name": "Dedicated method-input structs", + "description": "Operations take entity.GetProgressInput / entity.UpsertProgressInput wrappers (validated in entity/) rather than loose parameters.", + "example": "GetProgress(ctx context.Context, input entity.GetProgressInput) (*entity.Progress, error)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Adapter interface (Redis-backed persistence contract)", + "watch_for": "Keep it a thin alias of ProgressManagerAdapter; the real store, noop, and mock live in adapter/" + }, + { + "file": "service.go", + "role": "Service interface mirroring the adapter surface", + "watch_for": "Service and Adapter expose the same two methods \u2014 keep them in sync when adding operations" + } + ], + "anti_patterns": [ + "Putting Redis access, key construction, or validation logic in the root interfaces instead of adapter/ and entity/", + "Letting Service and Adapter method sets drift apart", + "Backing progress with Postgres/Ent \u2014 this domain is intentionally Redis-only with TTL expiry" + ], + "decisions": [ + { + "decision": "Root is interface-only; implementation, types, and transport are all in sub-packages", + "rationale": "Keeps the domain contract importable without pulling in Redis or HTTP dependencies, and lets app/common swap the real adapter for the noop variant" + } + ], + "code_examples": [] + }, + "openmeter/subject": { + "purpose": "Subject domain: subjects are usage-attribution identities (a key plus optional display name / stripe customer id) kept loosely in sync with customers. Root files define the Subject model, the Adapter and Service interfaces, and the OptionalNullable update helper. service/ is the only write path (transactional + hooks), adapter/ is Ent-backed, httphandler/ is HTTP transport, testutils/ wires a real Postgres harness.", + "patterns": [ + { + "name": "Adapter/Service split with TxCreator", + "description": "Adapter embeds entutils.TxCreator and exposes raw CRUD/List; Service (in service/) wraps every mutation in transaction.Run and fires models.ServiceHooks[Subject]. The Service interface embeds models.ServiceHooks[Subject].", + "example": "type Service interface { models.ServiceHooks[Subject]; Create(...); Update(...); Delete(...) }" + }, + { + "name": "Input struct Validate()", + "description": "CreateInput/UpdateInput/GetSubjectAdapterInput each have Validate() that accumulates into errs and returns errors.Join; the service wraps these as models.NewGenericValidationError.", + "example": "func (i CreateInput) Validate() error { ... if len(errs)>0 { return errors.Join(errs...) } }" + }, + { + "name": "OptionalNullable for tri-state updates", + "description": "UpdateInput uses OptionalNullable[T]{Value, IsSet} to distinguish unset vs explicit-null vs value; the adapter must honor IsSet rather than calling SetX unconditionally. The file comment marks this pattern as intentionally local to this adapter.", + "example": "DisplayName OptionalNullable[string]" + }, + { + "name": "Key-only event payload", + "description": "SubjectKey is a minimal {Key} projection used in entitlement events to shrink payload size.", + "example": "type SubjectKey struct { Key string }" + } + ], + "key_file_guides": [ + { + "file": "subject.go", + "role": "Subject domain model (ManagedModel + namespace/key/displayName/metadata/stripeCustomerId) and SubjectKey", + "watch_for": "StripeCustomerId is deprecated in favor of the customer application entity; key is the only required field in Validate()" + }, + { + "file": "service.go", + "role": "Service interface, ListParams/ListSortBy, CreateInput/UpdateInput, OptionalNullable helper", + "watch_for": "OptionalNullable is flagged 'unique to this adapter, should not be reused'; updates depend on IsSet semantics" + }, + { + "file": "adapter.go", + "role": "Adapter interface (CRUD + GetByIdOrKey/GetByKey/GetById/List) embedding entutils.TxCreator", + "watch_for": "GetByIdOrKey is a convenience method \u2014 prefer GetById/GetByKey; all reads are namespace-scoped" + } + ], + "anti_patterns": [ + "Writing through the Adapter directly instead of the Service (skips transaction.Run, hooks, and validation)", + "On Update, calling SetX unconditionally instead of branching on OptionalNullable.IsSet (silently nulls or overwrites fields)", + "Hard-deleting subjects or cascading into entitlements \u2014 Delete is soft and entitlements outlive the subject", + "Cross-importing customer/entitlement services into the Service \u2014 it depends only on subject.Adapter plus a hook registry", + "Constructing Service via a struct literal instead of New, or passing a nil adapter" + ], + "decisions": [ + { + "decision": "Service depends only on subject.Adapter and a hook registry, not on customer/entitlement services", + "rationale": "Subjects are an attribution identity; keeping the service dependency-light avoids cycles and lets customer-sync run as a hook rather than an inline cross-service call" + }, + { + "decision": "Subject delete is soft and never touches entitlements", + "rationale": "Usage data and entitlements must survive subject removal for billing/audit" + } + ], + "code_examples": [ + { + "scenario": "Adapter interface embedding TxCreator with namespaced reads", + "code": "type Adapter interface {\n\tCreate(ctx context.Context, input CreateInput) (Subject, error)\n\tUpdate(ctx context.Context, input UpdateInput) (Subject, error)\n\tGetByKey(ctx context.Context, key models.NamespacedKey) (Subject, error)\n\tList(ctx context.Context, namespace string, params ListParams) (pagination.Result[Subject], error)\n\tDelete(ctx context.Context, id models.NamespacedID) error\n\tentutils.TxCreator\n}" + } + ] + }, + "openmeter/subscription": { + "purpose": "Subscription domain root: bridges product-catalog plans to live customer subscriptions and forward into billing + entitlement. The root holds the in-memory SubscriptionSpec model, views, the declarative patch system, the apply/sync primitives, the state machine, timing/phase/item models, and the billing/entitlement bridge types. repo/ persists, service/+workflow/ orchestrate, addon/ is the addon sub-system, hooks/+validators/ enforce invariants.", + "patterns": [ + { + "name": "Spec is the unit of manipulation", + "description": "SubscriptionSpec (CreateSubscriptionPlanInput + CreateSubscriptionCustomerInput + Phases map of pointers) is the central mutable object. Patches and addons mutate it via AppliesToSpec.ApplyTo(spec, ApplyContext); the service syncs the spec to the DB rather than editing rows directly.", + "example": "type AppliesToSpec interface { ApplyTo(spec *SubscriptionSpec, actx ApplyContext) error }" + }, + { + "name": "Phases use pointer maps and cumulative StartAfter", + "description": "Phases is map[string]*SubscriptionPhaseSpec so patches can mutate in place; phase timing is expressed as StartAfter ISODuration added to ActiveFrom (GetPhaseCadence), never absolute timestamps.", + "example": "phaseStartTime, _ := phase.StartAfter.AddTo(s.ActiveFrom)" + }, + { + "name": "Typed patch errors mapped to API status", + "description": "Patches return *PatchValidationError / *PatchForbiddenError / *PatchConflictError; the Patch interface couples AppliesToSpec + Validate + Op() + Path(). Apply aggregation tolerates issues tagged AllowedDuringApplyingToSpecError.", + "example": "type Patch interface { AppliesToSpec; Validate() error; Op() PatchOperation; Path() SpecPath }" + }, + { + "name": "State machine gates lifecycle actions", + "description": "NewStateMachine(status) (qmuntal/stateless) defines the legal transitions (Inactive->Create->Active, Active reentry Update/ChangeAddons, Active->Cancel->Canceled, Canceled->Continue->Active, Scheduled->Delete). CanTransitionOrErr returns models.NewGenericForbiddenError when disallowed.", + "example": "sm.Configure(SubscriptionStatusActive).PermitReentry(SubscriptionActionUpdate).Permit(SubscriptionActionCancel, SubscriptionStatusCanceled)" + }, + { + "name": "Three-tier spec inputs", + "description": "Plan-derived fields use the *PlanInput suffix, customer-derived fields the *CustomerInput suffix, and the merged result the *Spec suffix; SubscriptionSpec embeds both inputs inline.", + "example": "CreateSubscriptionPlanInput + CreateSubscriptionCustomerInput composed into SubscriptionSpec" + }, + { + "name": "Operation context marker", + "description": "subscription-driven mutations carry NewSubscriptionOperationContext(ctx); downstream hooks check IsSubscriptionOperation(ctx) to avoid re-entrant side effects.", + "example": "func IsSubscriptionOperation(ctx context.Context) bool" + } + ], + "key_file_guides": [ + { + "file": "subscriptionspec.go", + "role": "SubscriptionSpec + Create*PlanInput/Create*CustomerInput, ToCreateSubscriptionEntityInput, GetPhaseCadence/GetSortedPhases", + "watch_for": "Phases is a pointer map for in-place patch mutation; phase cadence is derived from StartAfter+ActiveFrom and clamped by ActiveTo" + }, + { + "file": "apply.go", + "role": "AppliesToSpec interface, ApplyContext, NewAggregateAppliesToSpec, AllowedDuringApplyingToSpecError", + "watch_for": "ApplyTo should only be invoked via spec.Apply so post-apply validation runs; some issues are tolerated only when tagged allowed-during-apply" + }, + { + "file": "patch.go", + "role": "Patch/ValuePatch interfaces, PatchOperation enum, typed patch errors", + "watch_for": "Return PatchValidationError/PatchForbiddenError/PatchConflictError (not bare errors) so HTTP maps to 4xx; concrete patches live in patch/" + }, + { + "file": "state.go", + "role": "SubscriptionStatus/SubscriptionAction enums and the stateless state machine", + "watch_for": "Gate every lifecycle action through CanTransitionOrErr before mutating; Cancel/Continue are real transitions, Update is a reentry" + }, + { + "file": "billing.go", + "role": "BillingBehaviorOverride (RestartBillingPeriod anchor at item ActiveFrom)", + "watch_for": "ProratingBehavior is intentionally not yet wired; restart anchors to the item's ActiveFrom" + }, + { + "file": "entitlement.go", + "role": "EntitlementAdapter contract for scheduling/fetching item-linked entitlements", + "watch_for": "Subscription depends on this interface, not entitlement internals; impl is in subscription/entitlement" + }, + { + "file": "subscriptionview.go", + "role": "SubscriptionView (read projection) with AsSpec() round-trip", + "watch_for": "Mutate via view.AsSpec() -> spec edit -> Service.Update, never edit view items directly" + }, + { + "file": "context.go", + "role": "Subscription operation context marker", + "watch_for": "Set it on subscription-originated writes so hooks can skip re-entrant work" + } + ], + "anti_patterns": [ + "Editing persisted subscription/phase/item rows directly instead of building a target SubscriptionSpec and running sync", + "Computing phase/item activity as absolute timestamps instead of StartAfter/ISODuration relative to ActiveFrom", + "Returning bare errors from patches instead of the typed PatchValidationError/PatchForbiddenError/PatchConflictError", + "Performing a lifecycle action without passing it through SubscriptionStateMachine.CanTransitionOrErr", + "Adding DB or HTTP code to the root package \u2014 persistence is in repo/, transport via the v3 handlers, orchestration in service/ and workflow/" + ], + "decisions": [ + { + "decision": "All mutation flows through a declarative spec + sync diff rather than imperative row edits", + "rationale": "Patches, addons, plan-changes, cancel, and continue can all be expressed as transforms on a single SubscriptionSpec, so one sync algorithm reconciles target state and history immutability uniformly" + }, + { + "decision": "Lifecycle legality is encoded in a stateless state machine, not scattered if-checks", + "rationale": "Create/Update/Cancel/Continue/Delete/ChangeAddons have a small fixed transition graph; centralizing it makes forbidden transitions return a consistent GenericForbiddenError" + }, + { + "decision": "Phase timing is relative (StartAfter ISODuration), not absolute", + "rationale": "A spec can be re-anchored to any ActiveFrom (migrations, plan changes) without rewriting every phase timestamp" + } + ], + "code_examples": [ + { + "scenario": "Aggregate patches onto a spec, tolerating only allowed-during-apply issues", + "code": "func NewAggregateAppliesToSpec(applieses []AppliesToSpec) AppliesToSpec {\n\treturn NewAppliesToSpec(func(spec *SubscriptionSpec, actx ApplyContext) error {\n\t\tfor i, applies := range applieses {\n\t\t\tif err := spec.Apply(applies, actx); err != nil {\n\t\t\t\tissues, e := models.AsValidationIssues(err)\n\t\t\t\tif e != nil { return models.ErrorWithComponent(models.ComponentName(fmt.Sprintf(\"patch at idx %d\", i)), e) }\n\t\t\t\tif lo.EveryBy(issues, func(is models.ValidationIssue) bool {\n\t\t\t\t\treturn IsValidationIssueWithBoolAttr(is, subscriptionPatchErrAttrNameAllowedDuringApplyingToSpecError)\n\t\t\t\t}) { continue }\n\t\t\t\treturn models.ErrorWithComponent(models.ComponentName(fmt.Sprintf(\"patch at idx %d\", i)), err)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w100.json b/.archie/enrichments/w100.json new file mode 100644 index 0000000000..ea86c2dffa --- /dev/null +++ b/.archie/enrichments/w100.json @@ -0,0 +1,67 @@ +{ + "openmeter/ledger/resolvers/adapter": { + "purpose": "Ent-backed persistence adapter for the ledger resolvers package: it implements resolvers.CustomerAccountRepo, which manages the linking table (ledger_customer_account) mapping a customer to its ledger account IDs by AccountType. Single-file leaf adapter, feature-gated behind credits.enabled at the wiring layer.", + "patterns": [ + { + "name": "Interface-compliance assertion against parent package", + "description": "The unexported repo struct must satisfy resolvers.CustomerAccountRepo via a compile-time var _ assertion; NewRepo returns the interface type, not the concrete struct.", + "example": "var _ resolvers.CustomerAccountRepo = (*repo)(nil); func NewRepo(db *entdb.Client) resolvers.CustomerAccountRepo { return &repo{db: db} }" + }, + { + "name": "entutils TxUser trio (Tx/WithTx/Self)", + "description": "Every repo implements Tx (HijackTx + NewTxDriver), WithTx (rebind via NewTxClientFromRawConfig), and Self, plus var _ entutils.TxUser[*repo]; this is what makes TransactingRepo helpers work.", + "example": "func (r *repo) WithTx(ctx context.Context, tx *entutils.TxDriver) *repo { return &repo{db: entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()).Client()} }" + }, + { + "name": "Transaction-aware method bodies", + "description": "Read methods wrap bodies in entutils.TransactingRepo; mutation methods with no return value use entutils.TransactingRepoWithNoValue. Never call tx.db directly outside one of these wrappers.", + "example": "return entutils.TransactingRepoWithNoValue(ctx, r, func(ctx context.Context, tx *repo) error { _, err := tx.db.LedgerCustomerAccount.Create()... })" + }, + { + "name": "Constraint-error to typed domain error", + "description": "On Create, detect duplicates with entdb.IsConstraintError, re-query the existing row, and return the typed resolvers.CustomerAccountAlreadyExistsError rather than leaking the raw Ent error.", + "example": "if entdb.IsConstraintError(err) { existing, _ := tx.db.LedgerCustomerAccount.Query()...Only(ctx); return &resolvers.CustomerAccountAlreadyExistsError{...} }" + }, + { + "name": "Namespace + customer scoping on every query", + "description": "All LedgerCustomerAccount queries filter by ledgercustomeraccountdb.Namespace and CustomerID from the input/customer.CustomerID; multi-tenancy is enforced here, not by the caller.", + "example": "Where(ledgercustomeraccountdb.Namespace(customerID.Namespace), ledgercustomeraccountdb.CustomerID(customerID.ID))" + }, + { + "name": "AccountType-keyed result maps", + "description": "GetCustomerAccountIDs returns map[ledger.AccountType]string built by ranging entities; AccountType is the map key so each customer holds at most one account per type.", + "example": "result := make(map[ledger.AccountType]string, len(entities)); for _, e := range entities { result[e.AccountType] = e.AccountID }" + } + ], + "key_file_guides": [ + { + "file": "repo.go", + "role": "Entire adapter: defines repo, NewRepo, the Tx/WithTx/Self trio, and the two CustomerAccountRepo methods CreateCustomerAccount and GetCustomerAccountIDs.", + "watch_for": "Adding a method that touches tx.db without a TransactingRepo wrapper breaks tx propagation; returning the raw Ent constraint error instead of CustomerAccountAlreadyExistsError loses the typed-error contract; forgetting the namespace filter leaks rows across tenants." + } + ], + "anti_patterns": [ + "Returning the concrete *repo from NewRepo instead of the resolvers.CustomerAccountRepo interface.", + "Calling r.db / tx.db.LedgerCustomerAccount outside entutils.TransactingRepo or TransactingRepoWithNoValue (loses ctx-carried transaction).", + "Surfacing raw entdb constraint errors instead of mapping them to resolvers.CustomerAccountAlreadyExistsError.", + "Querying LedgerCustomerAccount without scoping by Namespace and CustomerID.", + "Defining domain input/output types here \u2014 CreateCustomerAccountInput and the repo interface live in the parent resolvers package; this folder only implements." + ], + "decisions": [ + { + "decision": "Adapter is a thin single-file leaf with no service logic.", + "rationale": "Business logic lives in the resolvers service layer; this folder only translates the CustomerAccountRepo interface into Ent calls against the ledger_customer_account linking table." + }, + { + "decision": "Duplicate creation is treated idempotently via constraint detection + re-query.", + "rationale": "Account backfill and concurrent provisioning can race; returning a typed AlreadyExists error carrying the existing AccountID lets callers reconcile without a separate lookup." + } + ], + "code_examples": [ + { + "scenario": "Read method scoped to a customer and rebound to the ctx transaction", + "code": "func (r *repo) GetCustomerAccountIDs(ctx context.Context, customerID customer.CustomerID) (map[ledger.AccountType]string, error) {\n\treturn entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (map[ledger.AccountType]string, error) {\n\t\tentities, err := tx.db.LedgerCustomerAccount.Query().\n\t\t\tWhere(\n\t\t\t\tledgercustomeraccountdb.Namespace(customerID.Namespace),\n\t\t\t\tledgercustomeraccountdb.CustomerID(customerID.ID),\n\t\t\t).All(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to get ledger customer accounts: %w\", err)\n\t\t}\n\t\tresult := make(map[ledger.AccountType]string, len(entities))\n\t\tfor _, entity := range entities {\n\t\t\tresult[entity.AccountType] = entity.AccountID\n\t\t}\n\t\treturn result, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w101.json b/.archie/enrichments/w101.json new file mode 100644 index 0000000000..df242da42a --- /dev/null +++ b/.archie/enrichments/w101.json @@ -0,0 +1,51 @@ +{ + "openmeter/ledger/transactions/testutils": { + "purpose": "Test-only helpers that provide concrete, field-settable implementations of the ledger package's input interfaces (EntryInput, TransactionInput, TransactionGroupInput) so tests can construct arbitrary ledger transaction inputs without the production builders.", + "patterns": [ + { + "name": "Interface conformance via compile-time assertion", + "description": "Every struct asserts it satisfies the corresponding ledger interface with a blank var declaration, so a signature drift in the ledger interface breaks compilation here immediately.", + "example": "var _ ledger.EntryInput = (*AnyEntryInput)(nil)" + }, + { + "name": "Value-field + getter-method mirror", + "description": "Each interface method is backed by an exported `...Value` struct field; the method just returns the field, letting tests set inputs declaratively while still satisfying the interface.", + "example": "AnyEntryInput{AmountValue: ...} with func (a *AnyEntryInput) Amount() alpacadecimal.Decimal { return a.AmountValue }" + }, + { + "name": "Pointer-receiver methods", + "description": "All methods use pointer receivers and assertions use `(*Type)(nil)`; pass `&AnyEntryInput{...}` to consumers expecting the interface.", + "example": "func (a *AnyTransactionInput) BookedAt() time.Time { return a.BookedAtValue }" + }, + { + "name": "lo.Map for slice-of-pointer to slice-of-interface widening", + "description": "Collection getters convert `[]*AnyEntryInput` to `[]ledger.EntryInput` via lo.Map rather than manual loops, matching repo samber/lo conventions.", + "example": "lo.Map(a.EntryInputsValues, func(e *AnyEntryInput, _ int) ledger.EntryInput { return e })" + } + ], + "key_file_guides": [ + { + "file": "anytransaction.go", + "role": "Sole file: defines AnyEntryInput, AnyTransactionInput, AnyTransactionGroupInput plus the AsGroupInput convenience that wraps a single transaction into a group input.", + "watch_for": "AsGroupInput always wraps exactly one transaction; do not assume it merges multiple. Keep the `var _ ledger.X = (*AnyX)(nil)` assertions in sync when adding fields." + } + ], + "anti_patterns": [ + "Importing this testutils package from non-test production code \u2014 it only exists to satisfy ledger interfaces in tests.", + "Adding business logic to the getters; they must remain trivial field returns so the structs stay pure test fixtures.", + "Dropping a `var _ ledger.X = (*AnyX)(nil)` assertion \u2014 without it, interface drift goes undetected." + ], + "decisions": [ + { + "decision": "Mirror each ledger input interface with an `Any...Input` struct whose every method returns a settable exported field.", + "rationale": "Production input builders enforce invariants; tests need to inject arbitrary or invalid inputs to exercise validation and edge cases, so a plain field-backed implementation is required." + } + ], + "code_examples": [ + { + "scenario": "Build a ledger transaction group input fixture for a test", + "code": "import (\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger/transactions/testutils\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nentry := &testutils.AnyEntryInput{\n\tAddress: addr, // ledger.PostingAddress\n\tAmountValue: alpacadecimal.NewFromInt(100),\n\tIdentityKeyValue: \"grant-1\",\n}\ntx := &testutils.AnyTransactionInput{\n\tBookedAtValue: clock.Now(),\n\tEntryInputsValues: []*testutils.AnyEntryInput{entry},\n}\nvar group ledger.TransactionGroupInput = tx.AsGroupInput(\"default\", models.Annotations{})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w102.json b/.archie/enrichments/w102.json new file mode 100644 index 0000000000..ad4623cb28 --- /dev/null +++ b/.archie/enrichments/w102.json @@ -0,0 +1,250 @@ +{ + "openmeter/llmcost/adapter": { + "purpose": "Ent-backed persistence adapter for the llmcost domain, implementing llmcost.Adapter against the LLMCostPrice table. Owns all SQL access for global prices (namespace IS NULL) and per-namespace manual overrides, plus their soft-delete and effective-period resolution semantics.", + "patterns": [ + { + "name": "Config-validated constructor returning interface", + "description": "New(Config) returns (llmcost.Adapter, error); Config.Validate() collects missing Client/Logger into errors.Join before constructing. Compile-time assertions var _ models.Validator = (*Config)(nil) and var _ llmcost.Adapter = (*adapter)(nil) enforce the contracts.", + "example": "func New(config Config) (llmcost.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client, logger: config.Logger}, nil }" + }, + { + "name": "Transaction plumbing via entutils", + "description": "adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebind via entdb.NewTxClientFromRawConfig), and Self. Every write/list wraps its body in entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the tx in ctx.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (llmcost.Price, error) { ... })" + }, + { + "name": "Validate input before any query", + "description": "Each method calls input.Validate() as the first statement inside the transaction closure (or at top of ResolvePrice) before touching a.db.", + "example": "if err := input.Validate(); err != nil { return llmcost.Price{}, err }" + }, + { + "name": "Soft delete everywhere", + "description": "All reads filter pricedb.DeletedAtIsNil(); deletes/replacements SetDeletedAt(clock.Now()) instead of removing rows. CreateOverride soft-deletes the prior active manual override before inserting the new one.", + "example": "Where(pricedb.DeletedAtIsNil()).Where(pricedb.NamespaceIsNil())" + }, + { + "name": "Namespace-aware price resolution ordering", + "description": "ResolvePrice ORs NamespaceEQ(input.Namespace) with NamespaceIsNil(), filters EffectiveFrom<=at and (EffectiveTo IS NULL or >at), then Orders ByNamespace(desc) so a namespace override wins over the global row.", + "example": "Order(pricedb.ByNamespace(sql.OrderDesc()), pricedb.ByEffectiveFrom(sql.OrderDesc())).First(ctx)" + }, + { + "name": "Domain error mapping", + "description": "entdb.IsNotFound -> llmcost.NewPriceNotFoundError / NewPriceOverrideNotFoundError; entdb.IsConstraintError -> models.NewGenericConflictError. Never leak raw ent errors as not-found.", + "example": "if entdb.IsNotFound(err) { return llmcost.Price{}, llmcost.NewPriceOverrideNotFoundError(input.ID) }" + }, + { + "name": "filter.ApplyToQuery for list filtering", + "description": "List methods apply optional FilterString inputs via filter.ApplyToQuery(query, input.X, pricedb.FieldX) and order via entutils.GetOrdering(input.Order) with an explicit OrderBy switch defaulting to model ID.", + "example": "query = filter.ApplyToQuery(query, input.Provider, pricedb.FieldProvider)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config, New, the adapter struct, and Tx/WithTx/Self transaction plumbing.", + "watch_for": "Requires both Client and Logger; do not fall back to slog.Default(). WithTx must rebuild from *tx.GetConfig()." + }, + { + "file": "price.go", + "role": "All Adapter methods: ListPrices, GetPrice, ResolvePrice, CreateOverride, DeleteOverride, ListOverrides, UpsertGlobalPrice.", + "watch_for": "ResolvePrice intentionally does NOT use a transaction (read-only, uses clock.Now() when input.At is nil). ListOverrides hard-codes source=manual and must not also apply a user source filter (creates contradictory WHERE)." + }, + { + "file": "mapping.go", + "role": "mapPriceFromEntity (db.LLMCostPrice -> llmcost.Price) and decimalOrZero helper.", + "watch_for": "Optional pricing fields (CacheRead/CacheWrite/Reasoning) are stored non-null; a zero decimal means 'not set' and is dropped to a nil pointer via !entity.X.IsZero(). decimalOrZero reverses this on writes." + } + ], + "anti_patterns": [ + "Using a raw *entdb.Client directly instead of wrapping in entutils.TransactingRepo, breaking tx-awareness in ctx.", + "Hard-deleting rows or skipping pricedb.DeletedAtIsNil() filters, exposing soft-deleted prices.", + "Returning entdb.IsNotFound errors directly instead of mapping to llmcost.NewPrice*NotFoundError.", + "Adding a user-supplied source filter inside ListOverrides (already constrained to source=manual).", + "Persisting optional pricing pointers without decimalOrZero, or mapping zero decimals back to non-nil pointers." + ], + "decisions": [ + { + "decision": "Global prices use NULL namespace; overrides set the namespace and source=manual.", + "rationale": "A single LLMCostPrice table holds both tiers; resolution prefers the namespace override via ByNamespace(desc) ordering without a separate table." + }, + { + "decision": "ResolvePrice bypasses the transaction wrapper.", + "rationale": "It is a hot read-only path on the metering/cost lookup; avoiding HijackTx reduces overhead." + }, + { + "decision": "UpsertGlobalPrice updates the current (EffectiveTo IS NULL) row in place rather than versioning.", + "rationale": "The sync reconciler refreshes canonical system prices repeatedly; in-place update keeps one current global row per provider/model." + } + ], + "code_examples": [ + { + "scenario": "Tx-aware adapter write with input validation, soft-delete of prior override, and error mapping", + "code": "func (a *adapter) CreateOverride(ctx context.Context, input llmcost.CreateOverrideInput) (llmcost.Price, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (llmcost.Price, error) {\n\t\tif err := input.Validate(); err != nil {\n\t\t\treturn llmcost.Price{}, err\n\t\t}\n\t\t_, _ = a.db.LLMCostPrice.Update().\n\t\t\tWhere(pricedb.DeletedAtIsNil(), pricedb.NamespaceEQ(input.Namespace), pricedb.ProviderEQ(string(input.Provider)), pricedb.ModelIDEQ(input.ModelID), pricedb.SourceEQ(string(llmcost.PriceSourceManual))).\n\t\t\tSetDeletedAt(clock.Now()).Save(ctx)\n\t\tentity, err := a.db.LLMCostPrice.Create().SetNamespace(input.Namespace).SetSource(string(llmcost.PriceSourceManual)).Save(ctx)\n\t\tif err != nil {\n\t\t\tif entdb.IsConstraintError(err) {\n\t\t\t\terr = models.NewGenericConflictError(err)\n\t\t\t}\n\t\t\treturn llmcost.Price{}, fmt.Errorf(\"failed to create override: %w\", err)\n\t\t}\n\t\treturn mapPriceFromEntity(entity)\n\t})\n}" + } + ] + }, + "openmeter/llmcost/service": { + "purpose": "Thin service layer over llmcost.Adapter that adds the namespace-override overlay business logic on top of global prices, while delegating persistence. Implements llmcost.Service.", + "patterns": [ + { + "name": "Constructor injects adapter + logger", + "description": "New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service stores both on the service struct. No DI wiring lives here.", + "example": "func New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service { return &service{adapter: adapter, logger: logger} }" + }, + { + "name": "Wrap mutations/reads in transaction.Run", + "description": "Service methods that compose multiple adapter calls run inside transaction.Run / transaction.RunWithNoValue against s.adapter, so overlay reads and writes share one tx.", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[llmcost.Price], error) { ... })" + }, + { + "name": "Namespace override overlay on ListPrices", + "description": "After fetching global prices, batch-fetch ListOverrides for the namespace, index them by (provider, model_id), and replace matching global rows in place. Skipped when namespace is empty, result empty, or the source filter excludes manual.", + "example": "overrideMap[overrideKey{string(o.Provider), o.ModelID}] = o; result.Items[i] = o" + }, + { + "name": "Source-filter consistency guard", + "description": "sourceFilterExcludesManual inspects FilterString Eq/Ne to decide if applying the manual override overlay would violate a user source filter; if so, skip the overlay.", + "example": "if source.Eq != nil && *source.Eq != manual { return true }" + }, + { + "name": "GetPrice override fallthrough", + "description": "When a global price is returned for a set namespace, ResolvePrice is consulted; a manual override replaces it, and IsGenericNotFoundError is treated as 'no override, keep global'.", + "example": "if models.IsGenericNotFoundError(err) { return price, nil }" + }, + { + "name": "Pass-through for single-adapter operations", + "description": "ResolvePrice delegates directly without a transaction; CreateOverride/DeleteOverride/ListOverrides just wrap the single adapter call in transaction.Run for consistency.", + "example": "func (s *service) ResolvePrice(ctx, input) (llmcost.Price, error) { return s.adapter.ResolvePrice(ctx, input) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "service struct, New, all llmcost.Service methods, and the sourceFilterExcludesManual helper.", + "watch_for": "ListPrices and GetPrice mutate/replace result items with overrides \u2014 preserve the skip conditions (empty namespace, empty result, source filter excludes manual) or you leak overrides into filtered/global views." + }, + { + "file": "service_test.go", + "role": "Unit tests using an in-package mockAdapter + noopDriver covering the overlay matrix and sourceFilterExcludesManual truth table.", + "watch_for": "mockAdapter.Tx returns a noopDriver so transaction.Run works without a DB; new Service methods need a mockAdapter stub or tests won't compile." + } + ], + "anti_patterns": [ + "Applying the manual override overlay when sourceFilterExcludesManual returns true (violates the caller's source filter).", + "Overlaying overrides when input.Namespace is empty (global listing must stay global).", + "Treating ResolvePrice not-found as a hard error in GetPrice instead of falling back to the global price.", + "Putting Ent/DB queries in the service layer instead of delegating to llmcost.Adapter.", + "Calling overlay logic outside transaction.Run so the override fetch and base read use different snapshots." + ], + "decisions": [ + { + "decision": "Overrides are overlaid in the service, not the adapter.", + "rationale": "The adapter keeps clean global vs namespace queries; the service expresses the 'namespace override wins' product rule and batches override lookups for O(1) replacement." + }, + { + "decision": "Source filter is honored by skipping the overlay rather than re-querying.", + "rationale": "Namespace overrides are always source=manual, so when the filter excludes manual the overlay would contradict the filter; skipping is cheaper and correct." + } + ], + "code_examples": [ + { + "scenario": "ListPrices with namespace override overlay guarded by the source filter", + "code": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[llmcost.Price], error) {\n\tresult, err := s.adapter.ListPrices(ctx, input)\n\tif err != nil { return pagination.Result[llmcost.Price]{}, err }\n\tif input.Namespace == \"\" || len(result.Items) == 0 || sourceFilterExcludesManual(input.Source) {\n\t\treturn result, nil\n\t}\n\toverrides, err := s.adapter.ListOverrides(ctx, llmcost.ListOverridesInput{Namespace: input.Namespace, Provider: input.Provider, ModelID: input.ModelID})\n\tif err != nil { return pagination.Result[llmcost.Price]{}, err }\n\toverrideMap := make(map[overrideKey]llmcost.Price, len(overrides.Items))\n\tfor _, o := range overrides.Items { overrideMap[overrideKey{string(o.Provider), o.ModelID}] = o }\n\tfor i, p := range result.Items {\n\t\tif o, ok := overrideMap[overrideKey{string(p.Provider), p.ModelID}]; ok { result.Items[i] = o }\n\t}\n\treturn result, nil\n})" + } + ] + }, + "openmeter/llmcost/sync": { + "purpose": "Background sync pipeline that fetches LLM model prices from external sources (e.g. models.dev), normalizes provider/model IDs, deduplicates, and reconciles multi-source agreement into canonical system global prices via llmcost.Adapter.UpsertGlobalPrice. Run by app/common and cmd/jobs.", + "patterns": [ + { + "name": "Fetcher interface per source", + "description": "Each external source implements Fetcher{ Source() llmcost.PriceSource; Fetch(ctx) ([]llmcost.SourcePrice, error) }. NewModelsDevFetcher is the built-in; DefaultFetchers(client) returns the registered list.", + "example": "type Fetcher interface { Source() llmcost.PriceSource; Fetch(ctx context.Context) ([]llmcost.SourcePrice, error) }" + }, + { + "name": "SyncJob orchestration phases", + "description": "SyncJob.Run executes fetch+normalize -> deduplicate -> optional filter -> reconcile. A failing fetcher logs and is skipped (continue), never failing the whole job.", + "example": "continue // Don't fail entire sync if one source is down" + }, + { + "name": "Normalizer canonicalizes provider+model", + "description": "ModelIDNormalizer.Normalize delegates to llmcost.NormalizeModelID, lowercasing, trimming, mapping provider aliases (gemini->google, aws->amazon), and stripping date version suffixes (gpt-4o-2024-08-06 -> gpt-4o).", + "example": "func (n *defaultNormalizer) Normalize(modelID, provider string) (string, string) { return llmcost.NormalizeModelID(provider, modelID) }" + }, + { + "name": "Per-source deduplication before reconcile", + "description": "deduplicateSourcePrices collapses duplicate (source, provider, model_id) keys that normalization created, preferring model names without a '/' provider prefix and using lexicographic tie-break, to prevent false multi-source agreement.", + "example": "if existingHasPrefix && !newHasPrefix || existingHasPrefix == newHasPrefix && p.ModelName < existing.ModelName { result[idx] = p }" + }, + { + "name": "Tolerance-based multi-source agreement", + "description": "Reconciler groups by (provider, model_id), requires >= minAgreement sources agreeing within priceTolerance (pricesAgree on all token dimensions incl. optional ones), averages the agreeing prices, and upserts a PriceSourceSystem global price with a SourcePricesMap.", + "example": "agreeing := r.findAgreement(sourcePrices); if agreeing == nil { skipped++; continue }" + }, + { + "name": "Optional decimal agreement semantics", + "description": "optionalDecimalsAgree: both nil agree, exactly one nil disagrees, both set delegate to decimalsAgree (zero-vs-nonzero disagree, else within ratio tolerance). averageOptionalDecimal returns nil if the first price's field is unset.", + "example": "if a == nil && b == nil { return true }; if a == nil || b == nil { return false }" + }, + { + "name": "Config caps minAgreement at fetcher count", + "description": "NewSyncJob defaults MinSourceAgreement<=0 to DefaultMinSourceAgreement(2) but caps it at len(fetchers) so a single-fetcher setup can still reconcile.", + "example": "if numFetchers := len(fetchers); numFetchers > 0 && minAgreement > numFetchers { minAgreement = numFetchers }" + } + ], + "key_file_guides": [ + { + "file": "sync.go", + "role": "SyncJob, SyncJobConfig, NewSyncJob, DefaultFetchers, deduplicateSourcePrices, and the Run pipeline.", + "watch_for": "Filter reuses allPrices[:0] in place; dedup must run BEFORE reconcile or provider-alias collapse creates false agreement. minAgreement capping logic is load-bearing for single-source setups." + }, + { + "file": "fetcher_modelsdev.go", + "role": "modelsDevFetcher fetching https://models.dev/api.json, converting per-million prices to per-token (Div(perMillion)) and stripping provider prefixes from model IDs/names.", + "watch_for": "Skips models lacking cost.Input or cost.Output. Provider key is lowercased; empty provider entries are skipped. Optional cache/reasoning fields are pointer-set only when present." + }, + { + "file": "reconciler.go", + "role": "Reconciler, NewReconciler (clamps minAgreement<=0 and priceTolerance<0 to defaults), Reconcile, findAgreement, pricesAgree, averagePrices and decimal helpers.", + "watch_for": "DefaultMinSourceAgreement=2, DefaultPriceTolerance=0.01. decimalsAgree treats zero-vs-nonzero as disagreement; ratio is diff/max. Upsert failures are collected into errors.Join, not returned eagerly." + }, + { + "file": "normalizer.go", + "role": "ModelIDNormalizer interface, defaultNormalizer wrapping llmcost.NormalizeModelID.", + "watch_for": "Generic transforms only; source-specific cleanup belongs in each Fetcher. Provider alias and version-suffix logic lives in llmcost.NormalizeModelID, not here." + }, + { + "file": "fetcher.go", + "role": "Fetcher interface definition.", + "watch_for": "Source() must return a stable PriceSource string used as the SourcePricesMap key in reconciliation." + } + ], + "anti_patterns": [ + "Failing the whole SyncJob.Run when a single Fetcher errors instead of logging and continuing.", + "Reconciling before deduplicateSourcePrices runs, letting provider-alias collapse fake multi-source agreement.", + "Requiring more agreeing sources than fetchers exist (must cap minAgreement at len(fetchers)).", + "Doing source-specific cleanup inside the normalizer instead of in the Fetcher before returning prices.", + "Treating a missing optional pricing field as zero in agreement checks (one nil must disagree with a set value)." + ], + "decisions": [ + { + "decision": "Canonical global prices require multi-source agreement within tolerance, then average.", + "rationale": "Single-source external data is unreliable; requiring >=2 sources within 1% and averaging produces a defensible PriceSourceSystem price with a full SourcePricesMap audit trail." + }, + { + "decision": "Deduplicate per source after normalization, before reconciliation.", + "rationale": "Provider aliases (azure_ai and azure) collapse to one key; without dedup a single source would appear as two agreeing sources." + }, + { + "decision": "Prices are fetched per-million then divided to per-token at the fetcher boundary.", + "rationale": "Keeps the internal llmcost.ModelPricing in a single per-token unit so the reconciler and adapter never deal with source-specific scaling." + } + ], + "code_examples": [ + { + "scenario": "Full sync cycle: fetch (skip on error) -> normalize -> deduplicate -> filter -> reconcile", + "code": "func (j *SyncJob) Run(ctx context.Context) error {\n\tvar allPrices []llmcost.SourcePrice\n\tfor _, f := range j.fetchers {\n\t\tprices, err := f.Fetch(ctx)\n\t\tif err != nil {\n\t\t\tj.logger.Error(\"failed to fetch prices\", \"source\", f.Source(), \"error\", err)\n\t\t\tcontinue\n\t\t}\n\t\tfor _, p := range prices {\n\t\t\tprovider, modelID := j.normalizer.Normalize(p.ModelID, string(p.Provider))\n\t\t\tp.Provider = llmcost.Provider(provider)\n\t\t\tp.ModelID = modelID\n\t\t\tallPrices = append(allPrices, p)\n\t\t}\n\t}\n\tallPrices = deduplicateSourcePrices(allPrices)\n\tif j.filter != nil {\n\t\tfiltered := allPrices[:0]\n\t\tfor _, p := range allPrices { if j.filter(p) { filtered = append(filtered, p) } }\n\t\tallPrices = filtered\n\t}\n\treturn j.reconciler.Reconcile(ctx, allPrices)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w103.json b/.archie/enrichments/w103.json new file mode 100644 index 0000000000..cdfc4464e7 --- /dev/null +++ b/.archie/enrichments/w103.json @@ -0,0 +1,306 @@ +{ + "openmeter/meter/adapter": { + "purpose": "Ent-backed persistence layer for meter definitions. Implements meter.Service against db.Meter and answers meter-dependency queries (active features/entitlements) used by the meter service before allowing deletes/group-by drops.", + "patterns": [ + { + "name": "Adapter implements meter.Service", + "description": "Adapter is constructed via New(Config) with a *db.Client and *slog.Logger, both validated as non-nil in Config.Validate(). Compile-time assert `var _ meter.Service = (*Adapter)(nil)`.", + "example": "func New(config Config) (*Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "TxCreator wiring", + "description": "Adapter exposes Tx/WithTx/Self so it plugs into entutils.TransactingRepo. Tx uses a.db.HijackTx; WithTx rebuilds via db.NewTxClientFromRawConfig. Every mutating method wraps its body in transaction.Run(ctx, a, ...) + entutils.TransactingRepo(ctx, a, func(ctx, repo *Adapter)...).", + "example": "return transaction.Run(ctx, a, func(ctx) (Meter, error) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *Adapter)...) })" + }, + { + "name": "Entity->domain via MapFromEntityFactory", + "description": "Every read maps *db.Meter to meter.Meter through MapFromEntityFactory; list paths use pagination.MapResultErr(entities, MapFromEntityFactory). Never hand-build meter.Meter inline.", + "example": "resp, err := pagination.MapResultErr(entities, MapFromEntityFactory)" + }, + { + "name": "Constraint/not-found error translation", + "description": "Translate db errors to domain errors: db.IsConstraintError -> models.NewGenericConflictError; db.IsNotFound -> meterpkg.NewMeterNotFoundError(key) or models.NewGenericValidationError. Validation errors are wrapped with models.NewGenericValidationError.", + "example": "if db.IsConstraintError(err) { return Meter{}, models.NewGenericConflictError(fmt.Errorf(\"meter with the same slug already exists\")) }" + }, + { + "name": "Soft delete and live-row filtering", + "description": "DeleteMeter sets DeletedAt rather than removing rows; queries gate on meterdb.DeletedAtIsNil and feature/entitlement queries use Or(DeletedAtIsNil, DeletedAtGT(clock.Now())) and Or(ArchivedAtIsNil, ArchivedAtGT(clock.Now())).", + "example": "repo.db.Meter.UpdateOneID(meter.ID).SetDeletedAt(time.Now()).Save(ctx)" + }, + { + "name": "Filter/order via pkg helpers", + "description": "ListMeters applies filter.ApplyToQuery(query, params.Key, meterdb.FieldKey) for FilterString fields and entutils.GetOrdering(params.Order) + meterdb.ByKey/ByName/etc for ordering. Add new order keys by extending the switch on params.OrderBy.", + "example": "query = filter.ApplyToQuery(query, params.Key, meterdb.FieldKey)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Adapter struct, Config+Validate, New, and Tx/WithTx/Self transaction plumbing", + "watch_for": "Both Client and Logger must be non-nil; do not inject slog.Default() as fallback" + }, + { + "file": "manage.go", + "role": "Mutations (CreateMeter/UpdateMeter/DeleteMeter) and dependency checks (HasActiveFeatureForMeter, HasEntitlementForMeter, ListFeaturesForMeter)", + "watch_for": "UpdateMeter only sets mutable fields (Name, Description, GroupBy, Metadata, Annotations); Key/Aggregation/EventType are immutable. Use SetOrClearAnnotations for nillable annotation updates" + }, + { + "file": "meter.go", + "role": "Reads (ListMeters, GetMeterByIDOrSlug) and MapFromEntityFactory mapper", + "watch_for": "GetMeterByIDOrSlug matches ID OR (Key AND DeletedAtIsNil); MapFromEntityFactory returns error on nil entity" + }, + { + "file": "adapter_test.go", + "role": "TestEnv harness (NewTestEnv, DBSchemaMigrate) over real Postgres via testutils.InitPostgresDB", + "watch_for": "Requires Postgres; use env.Meter (Adapter) directly, not service wiring" + } + ], + "anti_patterns": [ + "Building meter.Meter inline instead of MapFromEntityFactory", + "Performing mutations without transaction.Run + entutils.TransactingRepo (loses tx context binding)", + "Returning raw ent errors instead of translating via db.IsConstraintError/db.IsNotFound to domain errors", + "Hard-deleting meter rows instead of SetDeletedAt", + "Adding business rules (event-type/reserved-type validation, publish events) here \u2014 that belongs in meter/service" + ], + "decisions": [ + { + "decision": "Adapter directly satisfies meter.Service (read+CRUD) but business orchestration lives in meter/service ManageService", + "rationale": "Keeps persistence pure; service layer owns hooks, namespace provisioning, event publishing and reserved-event-type validation" + }, + { + "decision": "Feature/entitlement existence checks live in the meter adapter", + "rationale": "DeleteMeter and group-by-drop validation in the service need to query foreign tables; doing it via Ent here keeps it transaction-aware" + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware mutation returning a mapped domain value", + "code": "func (a *Adapter) CreateMeter(ctx context.Context, input meterpkg.CreateMeterInput) (meterpkg.Meter, error) {\n\tif err := input.Validate(); err != nil { return meterpkg.Meter{}, err }\n\treturn transaction.Run(ctx, a, func(ctx context.Context) (meterpkg.Meter, error) {\n\t\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *Adapter) (meterpkg.Meter, error) {\n\t\t\tentity, err := repo.db.Meter.Create().SetNamespace(input.Namespace).SetKey(input.Key).Save(ctx)\n\t\t\tif err != nil {\n\t\t\t\tif db.IsConstraintError(err) { return meterpkg.Meter{}, models.NewGenericConflictError(fmt.Errorf(\"meter with the same slug already exists\")) }\n\t\t\t\treturn meterpkg.Meter{}, fmt.Errorf(\"failed to create meter: %w\", err)\n\t\t\t}\n\t\t\treturn MapFromEntityFactory(entity)\n\t\t})\n\t})\n}" + } + ] + }, + "openmeter/meter/httphandler": { + "purpose": "v1 HTTP driver (package httpdriver) for meter CRUD plus meter querying (JSON + CSV), subjects, and group-by values. Bridges api.* request/response types to meter.ManageService and the streaming.Connector.", + "patterns": [ + { + "name": "httptransport handler factories", + "description": "Each operation is a method on *handler returning a typed handler built with httptransport.NewHandler / NewHandlerWithArgs: a decode func (ctx, r, params)->Request and a business func (ctx, Request)->Response, plus an encoder and WithOperationName option. All handler methods are declared on the Handler interface.", + "example": "func (h *handler) ListMeters() ListMetersHandler { return httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoderWithStatus[ListMetersResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listMeters\"))...) }" + }, + { + "name": "Namespace from decoder, not request", + "description": "Every decode func calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace(ctx); failure is a 500 commonhttp.NewHTTPError. Never read namespace from the body/path.", + "example": "ns, err := h.resolveNamespace(ctx)" + }, + { + "name": "API<->domain mapping in mapping.go", + "description": "Conversions follow FromAPI/ToAPI naming: ToAPIMeter, ToAPIMeterQueryResult/Row, ToRequestFromQueryParamsPOSTBody, and toQueryParamsFromRequest. Handlers never construct streaming.QueryParams inline \u2014 they go through toQueryParamsFromRequest.", + "example": "params, err := h.toQueryParamsFromRequest(ctx, meter, ToRequestFromQueryParamsPOSTBody(request.params))" + }, + { + "name": "GET and POST query share one param shape", + "description": "GET QueryMeter converts api.QueryMeterParams to the POST body via ToRequestFromQueryParamsPOSTBody, then both feed toQueryParamsFromRequest. CSV variants reuse QueryMeterParams/QueryMeterRequest type aliases.", + "example": "type QueryMeterCSVRequest = QueryMeterRequest" + }, + { + "name": "ClickHouse JSONPath validation on write", + "description": "CreateMeter calls validateJSONPaths and UpdateMeter calls validateGroupByJSONPaths against streaming.ValidateJSONPath before persisting, because ClickHouse is stricter than Go JSONPath libs. Invalid paths return models.NewGenericValidationError.", + "example": "err := validateJSONPaths(ctx, h.streaming, request.MeterCreate.ValueProperty, request.MeterCreate.GroupBy)" + }, + { + "name": "Subject/customer/group-by validation against meter config", + "description": "toQueryParamsFromRequest rejects group-by keys not in m.GroupBy (except special `subject`/`customer_id`), auto-adds subject/customer_id to GroupBy when filtered, and forbids AdvancedMeterGroupByFilters together with FilterGroupBy.", + "example": "if ok := groupBy == \"subject\" || groupBy == \"customer_id\" || m.GroupBy[groupBy] != \"\"; !ok { return params, models.NewGenericValidationError(...) }" + }, + { + "name": "CSV responses via commonhttp.CSVResponse", + "description": "CSV handlers return a queryMeterCSVResult implementing Records()/FileName(); subject display names are resolved via subjectService.List keyed by subject key. Use commonhttp.CSVResponseEncoder.", + "example": "response := NewQueryMeterCSVResult(meter.Key, params.GroupBy, rows, subjectsByKey)" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/MeterHandler interfaces, handler struct, New constructor, resolveNamespace", + "watch_for": "Depends on meter.ManageService (not meter.Service), customer.Service, streaming.Connector, subject.Service \u2014 all injected" + }, + { + "file": "meter.go", + "role": "CRUD handlers (List/Get/Create/Update/Delete) + JSONPath validation helpers", + "watch_for": "CreateMeter defaults Name to Slug; UpdateMeter re-fetches current meter and only updates mutable fields; DeleteMeter resolves to ID then deletes" + }, + { + "file": "query.go", + "role": "QueryMeter (GET), QueryMeterPost, ListSubjects, ListGroupByValues handlers", + "watch_for": "ListGroupByValues defaults From to last 24h when both From/To nil; query handlers always GetMeterByIDOrSlug first" + }, + { + "file": "query_csv.go", + "role": "CSV query handlers and queryMeterCSVResult Records()/FileName()", + "watch_for": "CSV column order: window_start, window_end, [subject], [subject_display_name], groupBy..., value; subject is filtered out of groupByKeys" + }, + { + "file": "mapping.go", + "role": "ToAPIMeter/QueryRow mappers and toQueryParamsFromRequest/getFilterCustomer", + "watch_for": "AdvancedMeterGroupByFilters and FilterGroupBy are mutually exclusive; customer IDs are resolved+validated via customerService.ListCustomers" + } + ], + "anti_patterns": [ + "Reading namespace from request body or path instead of resolveNamespace(ctx)", + "Constructing streaming.QueryParams inline instead of via toQueryParamsFromRequest", + "Skipping ClickHouse JSONPath validation when creating/updating meters", + "Accepting group-by keys not present in meter.GroupBy (besides subject/customer_id)", + "Allowing AdvancedMeterGroupByFilters and FilterGroupBy together" + ], + "decisions": [ + { + "decision": "POST and GET query share one param representation by converting GET params into the POST body shape", + "rationale": "Single toQueryParamsFromRequest path avoids duplicating validation/group-by logic across transports" + }, + { + "decision": "JSONPath validation is delegated to the streaming connector (ClickHouse)", + "rationale": "ClickHouse parsing is stricter than Go JSONPath libraries, so validating against the real engine prevents storing meters that fail at query time" + } + ], + "code_examples": [ + { + "scenario": "Query handler: resolve namespace, fetch meter, map params, query streaming", + "code": "func (h *handler) QueryMeterPost() QueryMeterPostHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, idOrSlug QueryMeterPostParams) (QueryMeterPostRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return QueryMeterPostRequest{}, err }\n\t\t\tvar body api.QueryMeterPostJSONRequestBody\n\t\t\tif err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return QueryMeterPostRequest{}, err }\n\t\t\treturn QueryMeterPostRequest{namespace: ns, idOrSlug: idOrSlug, params: body}, nil\n\t\t},\n\t\tfunc(ctx context.Context, req QueryMeterPostRequest) (QueryMeterPostResponse, error) {\n\t\t\tm, err := h.meterService.GetMeterByIDOrSlug(ctx, meter.GetMeterInput{Namespace: req.namespace, IDOrSlug: req.idOrSlug})\n\t\t\tif err != nil { return nil, err }\n\t\t\tparams, err := h.toQueryParamsFromRequest(ctx, m, req.params)\n\t\t\tif err != nil { return nil, err }\n\t\t\trows, err := h.streaming.QueryMeter(ctx, req.namespace, m, params)\n\t\t\tif err != nil { return nil, err }\n\t\t\tresp := ToAPIMeterQueryResult(req.params.From, req.params.To, req.params.WindowSize, rows)\n\t\t\treturn &resp, nil\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[QueryMeterPostResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"queryMeterPost\"))...,\n\t)\n}" + } + ] + }, + "openmeter/meter/mockadapter": { + "purpose": "In-memory test double for meter.Service / meter.ManageService used across many test suites. Stores meters in a slice and can optionally mirror them into Postgres so feature.meter_id FK constraints are satisfied in DB-backed tests.", + "patterns": [ + { + "name": "Two constructors: read-only and manage", + "description": "New([]meter.Meter) returns *adapter (meter.Service); NewManage([]meter.Meter) wraps it in manageAdapter embedding meter.Service to satisfy meter.ManageService. Compile-time asserts exist for both interfaces.", + "example": "var _ meter.Service = (*adapter)(nil); var _ meter.ManageService = (*manageAdapter)(nil)" + }, + { + "name": "Validate meters on ingress", + "description": "New and ReplaceMeters call m.Validate() on every meter and wrap failures in models.NewGenericValidationError. init() (sync.Once) ensures the meters slice is non-nil.", + "example": "if err := m.Validate(); err != nil { return nil, models.NewGenericValidationError(...) }" + }, + { + "name": "Defensive slice copies", + "description": "getMeters() returns slices.Clone(c.meters) and New stores slices.Clone(meters) so callers cannot mutate internal state. ReplaceMeters clones before mutating IDs.", + "example": "return slices.Clone(c.meters)" + }, + { + "name": "Optional PG sync via SetDBClient", + "description": "SetDBClient(*entdb.Client) stores the client and ReplaceMeters upserts meters into db.Meter so features.meter_id FKs resolve. PG sync runs before updating in-memory state to avoid partial-failure inconsistency; reuses existing (namespace,key) rows from shared template DBs.", + "example": "if c.dbClient != nil { ... synced[i].ID = existing.ID ... } c.meters = synced" + }, + { + "name": "In-memory filter/pagination semantics mirror the real adapter", + "description": "ListMeters filters by namespace/IDFilter/Key.In in-memory and reproduces pagination (IsZero -> whole set, else page slice). GetMeterByIDOrSlug matches ID or Key within namespace.", + "example": "if params.Key != nil && params.Key.In != nil && !slices.Contains(*params.Key.In, meter.Key) { continue }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "adapter/manageAdapter structs, New/NewManage, init, SetDBClient, TestAdapter alias", + "watch_for": "TestAdapter = adapter is the exported test handle; SetDBClient nils dbClient back out if initial sync fails" + }, + { + "file": "manage.go", + "role": "Mock CreateMeter/UpdateMeter/DeleteMeter on manageAdapter", + "watch_for": "Assigns ulid.Make() IDs; RegisterPreUpdateMeterHook returns NewGenericNotImplementedError; these mutate the slice but do NOT auto-sync to PG (use ReplaceMeters for that)" + }, + { + "file": "meter.go", + "role": "ListMeters/GetMeterByIDOrSlug/ReplaceMeters/getMeters", + "watch_for": "ReplaceMeters is the only PG-syncing mutation; pagination math uses PageNumber-1 index and may produce an out-of-range empty page" + } + ], + "anti_patterns": [ + "Using this in production wiring \u2014 it is a test-only double (package adapter under mockadapter)", + "Mutating the slice returned by getMeters and expecting it to persist (it is a clone)", + "Relying on CreateMeter/UpdateMeter in manage.go to satisfy features.meter_id FKs (only ReplaceMeters syncs to PG)", + "Updating in-memory meters before PG sync succeeds (breaks the partial-failure guarantee)" + ], + "decisions": [ + { + "decision": "Optional SetDBClient/ReplaceMeters PG mirroring", + "rationale": "Tests that exercise features/entitlements need real meter rows for FK constraints, but most meter tests want a pure in-memory store; making PG sync opt-in keeps both fast" + }, + { + "decision": "Reuse existing (namespace,key) DB rows when IDs differ", + "rationale": "Shared test template DBs may already contain a meter with the same key; reusing its ID keeps FK references valid instead of failing on a conflict" + } + ], + "code_examples": [ + { + "scenario": "Construct a manage-capable mock and optionally back it with Postgres", + "code": "svc, err := mockadapter.NewManage([]meter.Meter{m})\nif err != nil { /* ... */ }\n// optionally satisfy features.meter_id FKs in DB-backed tests\nif err := svc.(interface{ SetDBClient(*entdb.Client) error }).SetDBClient(client); err != nil { /* ... */ }" + } + ] + }, + "openmeter/meter/service": { + "purpose": "Business-logic layer for meter management. Service is a thin read wrapper over the Ent adapter; ManageService adds reserved-event-type validation, pre-update hooks, namespace provisioning, feature/entitlement dependency guards, and event publishing.", + "patterns": [ + { + "name": "Service vs ManageService split", + "description": "Service (service.go) embeds nothing and only forwards ListMeters/GetMeterByIDOrSlug to the adapter. ManageService (manage.go) embeds meter.Service (set to New(adapter)) and adds the write methods plus orchestration. Asserts `var _ meter.Service`/`var _ meter.ManageService`.", + "example": "func NewManage(...) *ManageService { return &ManageService{ Service: New(adapter), adapter: adapter, ... } }" + }, + { + "name": "Reserved event-type validation", + "description": "Create/Update/Delete run s.eventTypeValidator (meter.NewEventTypeValidator(reservedEventTypes)) unless input.AllowReservedEventTypes is set, returning models.NewGenericValidationError on failure.", + "example": "if !input.AllowReservedEventTypes { if err := s.eventTypeValidator(input.EventType); err != nil { return Meter{}, models.NewGenericValidationError(...) } }" + }, + { + "name": "Dependency guards before destructive changes", + "description": "DeleteMeter blocks (NewGenericConflictError) if adapter.HasActiveFeatureForMeter or HasEntitlementForMeter is true. UpdateMeter blocks dropping a group-by key still referenced by any feature.MeterGroupByFilters via adapter.ListFeaturesForMeter.", + "example": "if hasFeatures { return models.NewGenericConflictError(fmt.Errorf(\"meter has active features and cannot be deleted\")) }" + }, + { + "name": "Publish lifecycle events after mutation", + "description": "Each successful mutation publishes via s.publisher (eventbus.Publisher): meter.NewMeterCreateEvent / NewMeterUpdateEvent / NewMeterDeleteEvent. Delete re-fetches the (soft-deleted) meter to publish its final state.", + "example": "if err := s.publisher.Publish(ctx, meter.NewMeterCreateEvent(ctx, &createdMeter)); err != nil { ... }" + }, + { + "name": "Pre-update hooks", + "description": "RegisterPreUpdateMeterHook appends to s.preUpdateHooks; UpdateMeter runs all hooks (ctx, input) before calling adapter.UpdateMeter. Annotations default to the current meter's when input.Annotations is nil.", + "example": "for _, hook := range s.preUpdateHooks { if err := hook(ctx, input); err != nil { return Meter{}, err } }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Read-only Service (New, ListMeters, GetMeterByIDOrSlug) forwarding to adapter", + "watch_for": "Pure pass-through; do not add write methods or business rules here" + }, + { + "file": "manage.go", + "role": "ManageService: NewManage constructor, CreateMeter/UpdateMeter/DeleteMeter, hook registration, event publishing, dependency guards", + "watch_for": "CreateMeter still calls namespaceManager.CreateNamespace (TODO to remove); DeleteMeter is idempotent on already-deleted meters (returns nil); UpdateMeter validates input against currentMeter.ValueProperty" + } + ], + "anti_patterns": [ + "Putting persistence/Ent queries in the service layer instead of the adapter", + "Mutating a meter without running reserved-event-type validation (unless AllowReservedEventTypes)", + "Deleting a meter or dropping a group-by key without the feature/entitlement guard checks", + "Skipping event publication after a successful mutation", + "Bypassing pre-update hooks in UpdateMeter" + ], + "decisions": [ + { + "decision": "ManageService embeds Service (read API) and delegates writes to the adapter", + "rationale": "Keeps reads uniform between Service and ManageService while concentrating orchestration (hooks, events, guards, namespace provisioning) in one place" + }, + { + "decision": "Delete/update guard on dependent features and entitlements", + "rationale": "Meters back features and metered entitlements; allowing deletion or incompatible group-by drops would orphan or break those references, so the service refuses with a conflict error" + } + ], + "code_examples": [ + { + "scenario": "Mutation orchestration: validate, persist via adapter, publish event", + "code": "func (s *ManageService) CreateMeter(ctx context.Context, input meter.CreateMeterInput) (meter.Meter, error) {\n\tif err := input.Validate(); err != nil { return meter.Meter{}, fmt.Errorf(\"invalid create meter params: %w\", err) }\n\tif !input.AllowReservedEventTypes {\n\t\tif err := s.eventTypeValidator(input.EventType); err != nil { return meter.Meter{}, models.NewGenericValidationError(fmt.Errorf(\"invalid event type: %w\", err)) }\n\t}\n\tcreatedMeter, err := s.adapter.CreateMeter(ctx, input)\n\tif err != nil { return createdMeter, err }\n\tif err := s.namespaceManager.CreateNamespace(ctx, input.Namespace); err != nil { return createdMeter, fmt.Errorf(\"failed to create namespace: %w\", err) }\n\tif err := s.publisher.Publish(ctx, meter.NewMeterCreateEvent(ctx, &createdMeter)); err != nil { return createdMeter, fmt.Errorf(\"failed to publish meter created event: %w\", err) }\n\treturn createdMeter, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w104.json b/.archie/enrichments/w104.json new file mode 100644 index 0000000000..09b1f2da79 --- /dev/null +++ b/.archie/enrichments/w104.json @@ -0,0 +1,162 @@ +{ + "openmeter/meterevent/adapter": { + "purpose": "Adapter implementation of meterevent.Service: reads raw events from the streaming.Connector (ClickHouse) and post-processes them into enriched meterevent.Event values (customer-ID resolution + meter validation). This is a read-only query layer, not an Ent/Postgres adapter.", + "patterns": [ + { + "name": "Constructor returns the domain Service interface", + "description": "New(streamingConnector, customerService, meterService) returns meterevent.Service; the concrete *adapter is unexported and asserted with `var _ meterevent.Service = (*adapter)(nil)`.", + "example": "func New(streamingConnector streaming.Connector, customerService customer.Service, meterService meter.Service) meterevent.Service" + }, + { + "name": "Validate params at the top of every Service method", + "description": "Each public method calls params.Validate() first and wraps failures in models.NewGenericValidationError(fmt.Errorf(\"validate input: %w\", err)) before any I/O.", + "example": "if err := params.Validate(); err != nil { return ..., models.NewGenericValidationError(fmt.Errorf(\"validate input: %w\", err)) }" + }, + { + "name": "Translate domain params to streaming params, never query streaming directly with domain types", + "description": "ListEvents/ListEventsV2 build streaming.ListEventsParams / streaming.ListEventsV2Params field-by-field, then call a.streamingConnector. CustomerID filters are resolved to []streaming.Customer via listCustomers before passing down.", + "example": "listParams := streaming.ListEventsV2Params{Namespace: params.Namespace, Cursor: params.Cursor, ...}" + }, + { + "name": "Shared eventPostProcess pipeline", + "description": "Both list methods funnel raw events through eventPostProcess: mapEventsToMeterEvents -> enrichEventsWithCustomerID -> validateEvents. Add new per-event enrichment as a step here, not inline in list methods.", + "example": "meterEvents := mapEventsToMeterEvents(rawEvents); meterEvents, err = a.enrichEventsWithCustomerID(...); meterEvents, err = a.validateEvents(...)" + }, + { + "name": "Validation errors are collected on the event, not returned", + "description": "validateEvents appends to event.ValidationErrors (no meter match, parse failure, missing customer) instead of failing the whole list; the event is still returned so the API can surface per-event ValidationError.", + "example": "validationErrors = append(validationErrors, fmt.Errorf(\"no meter found for event type: %s\", event.Type)); event.ValidationErrors = validationErrors" + }, + { + "name": "Cursor pagination only emits NextCursor on a full page", + "description": "ListEventsV2 propagates listParams.SortBy onto each Event so Event.Cursor() matches the ORDER BY, and only sets result.NextCursor when len(meterEvents) == effectiveLimit (lo.FromPtrOr(params.Limit, meterevent.MaximumLimit)).", + "example": "if len(meterEvents) > 0 && len(meterEvents) == effectiveLimit { cursor := meterEvents[len(meterEvents)-1].Cursor(); result.NextCursor = &cursor }" + }, + { + "name": "Missing-customer lookups are tolerated, not fatal", + "description": "enrichEventsWithCustomerID treats models.IsGenericNotFoundError from GetCustomerByUsageAttribution as 'leave CustomerID nil' (later flagged in validateEvents); only non-not-found errors abort.", + "example": "if models.IsGenericNotFoundError(err) { eventsWithCustomerID = append(eventsWithCustomerID, event); continue }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Defines the unexported adapter struct, its three injected dependencies, the New constructor, and the meterevent.Service compile-time assertion.", + "watch_for": "Return meterevent.Service (not *adapter) from New; keep the `var _ meterevent.Service = (*adapter)(nil)` assertion when adding methods." + }, + { + "file": "event.go", + "role": "All Service method bodies: ListEvents (v1), ListEventsV2 (cursor-paginated), plus helpers listCustomers, eventPostProcess, mapEventsToMeterEvents, validateEvents, enrichEventsWithCustomerID.", + "watch_for": "enrichEventsWithCustomerID has a FIXME: it queries the customer service per-event (only cached by subject) \u2014 do not amplify N+1 lookups; meter validation iterates all meters per event." + } + ], + "anti_patterns": [ + "Querying streaming.Connector with domain (meterevent) param types instead of building streaming.ListEventsParams / ListEventsV2Params.", + "Returning an error from validateEvents/enrich when a single event fails validation or has no customer \u2014 failures belong in event.ValidationErrors.", + "Setting NextCursor unconditionally or forgetting to propagate SortBy onto events, which desynchronizes Event.Cursor() from the query ORDER BY.", + "Skipping params.Validate() or not wrapping its error in models.NewGenericValidationError.", + "Treating a not-found customer in enrichEventsWithCustomerID as a hard error instead of leaving CustomerID nil." + ], + "decisions": [ + { + "decision": "Customer-ID resolution and meter validation are done in the adapter post-process rather than the streaming layer.", + "rationale": "Streaming (ClickHouse) only stores raw CloudEvents; customer attribution and meter schema validation require the customer and meter services, keeping the streaming connector domain-agnostic." + }, + { + "decision": "Validation issues are attached per-event (ValidationErrors) instead of short-circuiting the list.", + "rationale": "Event listing is a debugging/observability surface; users need to see invalid events alongside valid ones with their specific failure reasons." + } + ], + "code_examples": [ + { + "scenario": "Adapter list method: validate, map domain->streaming params, query, post-process", + "code": "func (a *adapter) ListEventsV2(ctx context.Context, params meterevent.ListEventsV2Params) (pagination.Result[meterevent.Event], error) {\n\tif err := params.Validate(); err != nil {\n\t\treturn pagination.Result[meterevent.Event]{}, models.NewGenericValidationError(fmt.Errorf(\"validate input: %w\", err))\n\t}\n\tlistParams := streaming.ListEventsV2Params{Namespace: params.Namespace, Cursor: params.Cursor, Limit: params.Limit, /* ... */}\n\tevents, err := a.streamingConnector.ListEventsV2(ctx, listParams)\n\tif err != nil {\n\t\treturn pagination.Result[meterevent.Event]{}, fmt.Errorf(\"query events: %w\", err)\n\t}\n\tmeterEvents, err := a.eventPostProcess(ctx, params.Namespace, events)\n\tif err != nil {\n\t\treturn pagination.Result[meterevent.Event]{}, fmt.Errorf(\"post process events: %w\", err)\n\t}\n\treturn pagination.Result[meterevent.Event]{Items: meterEvents}, nil\n}" + } + ] + }, + "openmeter/meterevent/httphandler": { + "purpose": "HTTP transport layer for the meterevent domain: exposes ListEvents (v1) and ListEventsV2 (cursor-paginated) handlers that decode api.* params into meterevent.Service inputs, call the service, and encode meterevent.Event into api.IngestedEvent (CloudEvents).", + "patterns": [ + { + "name": "httptransport.NewHandlerWithArgs three-stage handler", + "description": "Each handler is built from (decode request, business call, encoder) plus options. Decode resolves namespace via h.resolveNamespace(ctx); encode uses commonhttp.JSONResponseEncoderWithStatus[...](http.StatusOK); options append httptransport.WithOperationName(...).", + "example": "httptransport.NewHandlerWithArgs(decodeFn, func(ctx, req) (Resp, error){ ... h.metereventService.ListEventsV2(ctx, params) }, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listEventsV2\"))...)" + }, + { + "name": "Handler interface + unexported struct + New constructor", + "description": "handler.go declares Handler (composed of EventHandler), the unexported handler struct with namespaceDecoder/options/metereventService, a `var _ Handler = (*handler)(nil)` assertion, and New(...) returning Handler.", + "example": "type Handler interface { EventHandler }; var _ Handler = (*handler)(nil)" + }, + { + "name": "Type aliases tie api types to handler signatures", + "description": "Each handler file aliases Request/Response/Params/Handler types, e.g. ListEventsV2Request = meterevent.ListEventsV2Params, ListEventsV2Response = api.IngestedEventCursorPaginatedResponse, keeping decode/encode signatures explicit.", + "example": "type ( ListEventsV2Request = meterevent.ListEventsV2Params; ListEventsV2Response = api.IngestedEventCursorPaginatedResponse )" + }, + { + "name": "Namespace resolved from context, never from request body", + "description": "resolveNamespace(ctx) reads namespaceDecoder.GetNamespace(ctx); a missing namespace yields commonhttp.NewHTTPError(http.StatusInternalServerError, ...). All decode functions call it first.", + "example": "ns, err := h.resolveNamespace(ctx); if err != nil { return ListEventsV2Request{}, err }" + }, + { + "name": "api<->domain mapping isolated in mapping.go via apiconverter", + "description": "convertListEventsV2Params uses apiconverter.ConvertCursorPtr/ConvertStringPtr/ConvertIDExactPtr/ConvertTimePtr; convertEvent builds a CloudEvents event.New() and convertListEventsV2Response wraps items + NextCursor via events.NextCursor.EncodePtr().", + "example": "p.CustomerID = apiconverter.ConvertIDExactPtr(params.Filter.CustomerId); p.Time = apiconverter.ConvertTimePtr(params.Filter.Time)" + }, + { + "name": "Per-event validation errors flow to api.IngestedEvent.ValidationError", + "description": "convertEvent joins e.ValidationErrors into a single *string via lo.EmptyableToPtr(errors.Join(...).Error()) so the service's collected validation issues surface in the response without failing the call.", + "example": "if len(e.ValidationErrors) > 0 { validationError = lo.EmptyableToPtr(errors.Join(e.ValidationErrors...).Error()) }" + }, + { + "name": "v1 defaults applied in the decode function", + "description": "ListEvents decode applies defaults: From defaults to time.Now().Add(-meterevent.MaximumFromDuration).Add(time.Second) and Limit to meterevent.MaximumLimit via lo.FromPtrOr.", + "example": "From: lo.FromPtrOr(params.From, minimumFrom), Limit: lo.FromPtrOr(params.Limit, meterevent.MaximumLimit)" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/EventHandler interfaces, handler struct, New constructor, resolveNamespace helper.", + "watch_for": "Add new endpoint methods to EventHandler and keep the `var _ Handler = (*handler)(nil)` assertion; resolveNamespace returns 500 (internal) on missing namespace, not 400." + }, + { + "file": "event.go", + "role": "ListEvents (v1) handler: applies From/Limit defaults, calls ListEvents, converts each event via convertEvent into []api.IngestedEvent.", + "watch_for": "minimumFrom adds an extra second to dodge validation; conversion errors abort the whole response." + }, + { + "file": "event_v2.go", + "role": "ListEventsV2 (cursor) handler: decodes via convertListEventsV2Params (wrapping errors in models.NewGenericValidationError), encodes via convertListEventsV2Response.", + "watch_for": "Decode-stage conversion errors must be wrapped as NewGenericValidationError (400); business-stage errors are returned raw." + }, + { + "file": "mapping.go", + "role": "All api<->domain conversion: convertListEventsV2Params, convertEvent (CloudEvents construction + JSON data unmarshal), convertListEventsV2Response.", + "watch_for": "convertEvent only sets data when e.Data != \"\" and json.Unmarshals it; use apiconverter.* helpers for pointer/cursor/id/time conversions rather than hand-rolling." + } + ], + "anti_patterns": [ + "Calling the streaming connector or building business logic in the handler \u2014 handlers only decode/encode and delegate to meterevent.Service.", + "Reading namespace from request params instead of resolveNamespace(ctx)/namespaceDecoder.", + "Failing the request when an event has validation errors instead of surfacing them via api.IngestedEvent.ValidationError.", + "Hand-writing api<->domain field conversion inline instead of using apiconverter helpers in mapping.go.", + "Omitting httptransport.WithOperationName, breaking telemetry/operation naming." + ], + "decisions": [ + { + "decision": "v1 (ListEvents -> []IngestedEvent) and v2 (ListEventsV2 -> IngestedEventCursorPaginatedResponse) are separate handlers/files with separate type aliases.", + "rationale": "v2 introduces cursor pagination and a Filter object; keeping them split avoids overloading one decode path and lets each evolve independently." + }, + { + "decision": "Events are serialized as CloudEvents (event.New()) embedded in api.IngestedEvent.", + "rationale": "OpenMeter ingests CloudEvents; the listing API returns the original event envelope plus enrichment (CustomerId, IngestedAt, StoredAt, ValidationError)." + } + ], + "code_examples": [ + { + "scenario": "Cursor-paginated handler wiring with namespace resolve, validation-wrapped decode, and mapping helpers", + "code": "func (h *handler) ListEventsV2() ListEventsV2Handler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, params ListEventsV2Params) (ListEventsV2Request, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn ListEventsV2Request{}, err\n\t\t\t}\n\t\t\tp, err := convertListEventsV2Params(params, ns)\n\t\t\tif err != nil {\n\t\t\t\treturn ListEventsV2Request{}, models.NewGenericValidationError(err)\n\t\t\t}\n\t\t\treturn p, nil\n\t\t},\n\t\tfunc(ctx context.Context, params ListEventsV2Request) (ListEventsV2Response, error) {\n\t\t\tevents, err := h.metereventService.ListEventsV2(ctx, params)\n\t\t\tif err != nil {\n\t\t\t\treturn ListEventsV2Response{}, err\n\t\t\t}\n\t\t\treturn convertListEventsV2Response(events)\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[ListEventsV2Response](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listEventsV2\"))...,\n\t)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w105.json b/.archie/enrichments/w105.json new file mode 100644 index 0000000000..ba76c4db3d --- /dev/null +++ b/.archie/enrichments/w105.json @@ -0,0 +1,96 @@ +{ + "openmeter/meterexport/service": { + "purpose": "Concrete implementation (package meterexportservice) of the meterexport.Service interface. It re-queries existing meter values and re-emits them as synthetic streaming.RawEvent records, used to backfill/replay meter data into a target meter via a streaming, channel-based pipeline.", + "patterns": [ + { + "name": "Config-validated constructor returning interface conformance", + "description": "New(Config) validates required deps via Config.validate() before returning *service; package asserts var _ meterexport.Service = (*service)(nil).", + "example": "func New(config Config) (*service, error) { if err := config.validate(); err != nil { return nil, err }; return &service{Config: config}, nil }" + }, + { + "name": "Channel-based streaming with deferred close by producer", + "description": "Exported export methods and funnel own their output channels and close them via a top-of-function defer (close(resultCh); close(errCh)). The function returns an error only for start-up failures; runtime errors go to errCh.", + "example": "func (s *service) funnel(...) error { defer func(){ close(resultCh); close(errCh) }(); ... }" + }, + { + "name": "Producer/consumer split via errgroup", + "description": "ExportSyntheticMeterData uses errgroup.WithContext: one g.Go consumes meter.MeterQueryRow from meterRowCh and converts to events, another g.Go runs funnel as producer. g.Wait() joins them.", + "example": "g, ctx := errgroup.WithContext(ctx); g.Go(consumer); g.Go(func() error { return s.funnel(...) }); g.Wait()" + }, + { + "name": "Single context-cancellation report via sync.Once", + "description": "Because both funnel and consumer can observe ctx.Done(), sendCtxErr is guarded by sync.Once so exactly one context.Canceled/DeadlineExceeded reaches errCh. Consumer filters context errors out of meterRowErrCh and relies on sendCtxErr instead.", + "example": "var sendCtxErrOnce sync.Once; sendCtxErr := func(){ sendCtxErrOnce.Do(func(){ if err := ctx.Err(); err != nil { errCh <- err } }) }" + }, + { + "name": "Validate-then-fetch shared helper", + "description": "validateAndGetMeter(config) centralizes config.Validate(), meter lookup via MeterService.GetMeterByIDOrSlug, aggregation guard (only Sum/Count), and TargetMeterDescriptor construction. GetTargetMeterDescriptor and ExportSyntheticMeterData both call it.", + "example": "m, descriptor, err := s.validateAndGetMeter(ctx, config)" + }, + { + "name": "Batched time-window iteration capped at TARGET_ROWS_PER_QUERY", + "description": "funnel walks [from,to) in slices computed by iterateQueryTime, advancing windowSize.AddTo up to TARGET_ROWS_PER_QUERY (500) windows per QueryMeter call, clamping to params.To.", + "example": "queryTo, err := iterateQueryTime(queryFrom, params.queryParams.To, *params.queryParams.WindowSize)" + }, + { + "name": "Iterator wrapper cancels underlying op on early break", + "description": "ExportSyntheticMeterDataIter validates upfront, then returns an iter.Seq2[streaming.RawEvent, error] backed by a cancellable context; a failed yield returns and defer cancel() stops the goroutine-driven export.", + "example": "ctx, cancel := context.WithCancel(ctx); defer cancel(); if !yield(event, nil) { return }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines Config (EventSourceGroup, StreamingConnector, MeterService), service struct embedding Config, New constructor, and the meterexport.Service interface assertion.", + "watch_for": "All three Config fields are required; New returns error if any is missing. Keep the var _ meterexport.Service assertion satisfied when adding interface methods." + }, + { + "file": "syntheticdata.go", + "role": "Core export: validateAndGetMeter, GetTargetMeterDescriptor, ExportSyntheticMeterData (errgroup producer/consumer), createEventFromMeterRow, and SUM_VALUE_PROPERTY_KEY const.", + "watch_for": "Only Sum/Count aggregations are supported; both map to a SUM descriptor with ValueProperty 'value'. Event Source is fmt.Sprintf(\"%s:%s/%s\", EventSourceGroup, ns, id). Do not break the sendCtxErr sync.Once guard or you'll emit duplicate context errors." + }, + { + "file": "funnel.go", + "role": "Producer: funnelParams + validation, funnel() streaming meter query loop, iterateQueryTime time-window stepper, TARGET_ROWS_PER_QUERY const.", + "watch_for": "funnelParams.validate rejects unsupported params (ClientID, FilterCustomer, FilterGroupBy) and requires From + WindowSize. funnel checks ctx.Err() each iteration and pushes to errCh then returns nil (no return error mid-stream)." + }, + { + "file": "syntheticdata_iter.go", + "role": "Ergonomic iter.Seq2 wrapper over ExportSyntheticMeterData with early-break cancellation and result/error interleaving plus a startupErrCh.", + "watch_for": "Drains both resultCh and errCh on close to avoid dropping tail events/errors; nils out startupErrCh after close to stop reselecting it." + }, + { + "file": "service_test.go", + "role": "Table-driven tests using MockMeterService and testutils.NewMockStreamingConnector/AddSimpleEvent; covers SUM/COUNT export, unsupported-aggregation rejection, validation, not-found, context cancellation (exactly-one context.Canceled), and New validation.", + "watch_for": "Context-cancellation tests assert contextCanceledCount == 1 \u2014 regressions in sendCtxErr's sync.Once will fail here. Mock streaming events are matched by MeterSlug == meter.Key." + } + ], + "anti_patterns": [ + "Closing resultCh/errCh anywhere other than the producer's top-level defer \u2014 double-close panics or leaks.", + "Returning a runtime error from funnel/export mid-stream instead of sending it to errCh \u2014 callers consume errors off the channel, not the return value.", + "Bypassing validateAndGetMeter and querying the meter directly \u2014 skips the Sum/Count aggregation guard and descriptor construction.", + "Removing the sendCtxErr sync.Once guard or letting both funnel and consumer push ctx.Err() to errCh \u2014 produces duplicate context.Canceled reports.", + "Adding support for ClientID/FilterCustomer/FilterGroupBy query params without removing the explicit rejects in validateUnsupportedParams." + ], + "decisions": [ + { + "decision": "Stream via channels + errgroup rather than collecting a slice.", + "rationale": "Exports can span large time ranges (funnel batches 500 windows per query); streaming bounds memory and lets callers backpressure or cancel mid-flight." + }, + { + "decision": "Normalize Sum and Count source meters to a single SUM target descriptor with value property 'value'.", + "rationale": "Both aggregations can be replayed as additive SUM events, so a synthetic target meter only needs one value-bearing property; other aggregations are rejected up front." + }, + { + "decision": "Provide both a channel API (ExportSyntheticMeterData) and an iter.Seq2 wrapper (ExportSyntheticMeterDataIter).", + "rationale": "The channel form integrates with worker pipelines; the iterator form gives ergonomic range-over-func consumption with automatic cancellation on early break." + } + ], + "code_examples": [ + { + "scenario": "Producer/consumer export with single-shot context error reporting", + "code": "g, ctx := errgroup.WithContext(ctx)\nvar sendCtxErrOnce sync.Once\nsendCtxErr := func() { sendCtxErrOnce.Do(func() { if err := ctx.Err(); err != nil { errCh <- err } }) }\ng.Go(func() error {\n for {\n select {\n case <-ctx.Done(): sendCtxErr(); return nil\n case row, ok := <-meterRowCh:\n if !ok { sendCtxErr(); return nil }\n event, err := s.createEventFromMeterRow(m, row)\n if err != nil { errCh <- fmt.Errorf(\"create event from meter row: %w\", err); continue }\n resultCh <- event\n }\n }\n})\ng.Go(func() error { return s.funnel(ctx, funnelParams{meter: m, queryParams: streaming.QueryParams{From: ¶ms.Period.From, To: params.Period.To, WindowSize: ¶ms.ExportWindowSize, GroupBy: []string{\"subject\"}}}, meterRowCh, meterRowErrCh) })\nif err := g.Wait(); err != nil { return fmt.Errorf(\"export synthetic meter data: %w\", err) }" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w106.json b/.archie/enrichments/w106.json new file mode 100644 index 0000000000..cd277055a3 --- /dev/null +++ b/.archie/enrichments/w106.json @@ -0,0 +1,51 @@ +{ + "openmeter/namespace/namespacedriver": { + "purpose": "Defines the NamespaceDecoder seam that every HTTP driver/handler uses to resolve the active tenant namespace from a request context, decoupling handlers from how the namespace is determined (static config today, auth-derived later).", + "patterns": [ + { + "name": "Single-method decoder interface", + "description": "NamespaceDecoder exposes exactly one method GetNamespace(ctx) (string, bool); the bool reports presence rather than returning an error. Handlers consume the interface, never a concrete type.", + "example": "ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { /* reject */ }" + }, + { + "name": "Depend on interface, inject concrete", + "description": "Downstream httpdrivers store a namespacedriver.NamespaceDecoder field; wiring (app/common/namespace.go, openmeter/server/router) supplies the concrete StaticNamespaceDecoder.", + "example": "namespaceDecoder namespacedriver.NamespaceDecoder // field type is the interface" + }, + { + "name": "Context-only input", + "description": "Resolution takes only context.Context. The namespace is expected to be carried in/derived from ctx, not passed as request parameters.", + "example": "func (d StaticNamespaceDecoder) GetNamespace(ctx context.Context) (string, bool)" + } + ], + "key_file_guides": [ + { + "file": "decoder.go", + "role": "Declares the NamespaceDecoder interface and the StaticNamespaceDecoder string implementation that always returns its configured namespace with ok=true.", + "watch_for": "StaticNamespaceDecoder ignores ctx and never returns ok=false; do not rely on it to reject missing namespaces. Keep this package dependency-free (only stdlib context) since ~25 httpdrivers import it." + } + ], + "anti_patterns": [ + "Adding domain, DB, or auth dependencies to this package \u2014 it must stay a leaf imported by every httpdriver without cycles.", + "Returning an error instead of the (string, bool) contract from GetNamespace implementations.", + "Having handlers branch on the concrete StaticNamespaceDecoder type instead of the NamespaceDecoder interface.", + "Reading the namespace from request body/query params here rather than from context." + ], + "decisions": [ + { + "decision": "Model namespace resolution as a one-method interface in its own tiny package.", + "rationale": "Lets a static, config-driven namespace be swapped for an auth/tenant-derived one later without touching the many httpdrivers that depend on it." + }, + { + "decision": "Use (string, bool) instead of (string, error).", + "rationale": "Absence of a namespace is a normal control-flow case for handlers, not an exceptional one; the bool keeps call sites terse." + } + ], + "code_examples": [ + { + "scenario": "Resolving the namespace in an HTTP handler", + "code": "import \"github.com/openmeterio/openmeter/openmeter/namespace/namespacedriver\"\n\ntype handler struct {\n\tnamespaceDecoder namespacedriver.NamespaceDecoder\n}\n\nfunc (h *handler) resolveNamespace(ctx context.Context) (string, error) {\n\tns, ok := h.namespaceDecoder.GetNamespace(ctx)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"namespace not found\")\n\t}\n\treturn ns, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w107.json b/.archie/enrichments/w107.json new file mode 100644 index 0000000000..cb48a0ede1 --- /dev/null +++ b/.archie/enrichments/w107.json @@ -0,0 +1,411 @@ +{ + "openmeter/notification/adapter": { + "purpose": "Ent-backed persistence layer for notification channels, rules, events, and delivery statuses. Implements notification.Repository against entdb.Client; all reads/writes are namespace-scoped and transaction-aware.", + "patterns": [ + { + "name": "TransactingRepo wrapper on every method", + "description": "Each repository method defines an inner fn(ctx, *adapter) and returns entutils.TransactingRepo(ctx, a, fn) (or TransactingRepoWithNoValue for void). This rebinds the adapter to the tx carried in ctx.", + "example": "func (a *adapter) GetChannel(...) (*notification.Channel, error) { fn := func(ctx, a *adapter)(...){...}; return entutils.TransactingRepo(ctx, a, fn) }" + }, + { + "name": "Tx/WithTx/Self transaction triad", + "description": "adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebuilds adapter from raw tx config via entdb.NewTxClientFromRawConfig), and Self \u2014 the contract entutils.TransactingRepo expects.", + "example": "func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }" + }, + { + "name": "Soft-delete filtering on list/get", + "description": "Channels and rules use SetDeletedAt(clock.Now())+SetDisabled(true) for deletes; queries filter with Or(DeletedAtIsNil(), DeletedAtGT(now)). EagerLoadActiveChannels / EagerLoadRulesWithActiveChannels apply the same predicate to edges.", + "example": "channeldb.Or(channeldb.DeletedAtIsNil(), channeldb.DeletedAtGT(clock.Now()))" + }, + { + "name": "DB<->domain mapping via *FromDBEntity functions", + "description": "All conversion from entdb rows to domain lives in entitymapping.go: ChannelFromDBEntity, RuleFromDBEntity, EventFromDBEntity, EventDeliveryStatusFromDBEntity. Every timestamp is forced .UTC().", + "example": "result = append(result, *ChannelFromDBEntity(*item))" + }, + { + "name": "NotFound mapped to notification.NotFoundError", + "description": "On entdb.IsNotFound(err), return notification.NotFoundError{NamespacedID:{Namespace, ID}} rather than the raw ent error so the httpdriver error encoder can map it to 404.", + "example": "if entdb.IsNotFound(err) { return nil, notification.NotFoundError{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.ID}} }" + }, + { + "name": "Annotation JSONB filtering for event queries", + "description": "ListEvents filters on annotation keys via entutils.JSONBIn(eventdb.FieldAnnotations, key, values) \u2014 used for dedupe hashes, feature/subject key+id, etc. Add new filterable annotations the same way.", + "example": "entutils.JSONBIn(eventdb.FieldAnnotations, notification.AnnotationBalanceEventDedupeHash, params.DeduplicationHashes)" + }, + { + "name": "Event creation also fans out delivery statuses", + "description": "CreateEvent inserts the event, re-fetches the rule with active channels, then CreateBulk a NotificationEventDeliveryStatus (state Pending) per channel, wiring eventRow.Edges manually before mapping.", + "example": "q := a.db.NotificationEventDeliveryStatus.Create().SetEventID(eventRow.ID).SetChannelID(channel.ID).SetState(notification.EventDeliveryStatusStatePending)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client,Logger}+Validate, New() returning notification.Repository, and the Tx/WithTx/Self triad", + "watch_for": "New requires both Client and Logger non-nil; do not fall back to slog.Default()." + }, + { + "file": "entitymapping.go", + "role": "All DB->domain mappers + eventPayloadFromJSON which version-gates invoice payloads", + "watch_for": "eventPayloadFromJSON rejects invoice payloads whose Version != EventPayloadVersionCurrent; preserve UTC() on all timestamps." + }, + { + "file": "event.go", + "role": "ListEvents/GetEvent/CreateEvent + EagerLoadRulesWithActiveChannels", + "watch_for": "CreateEvent must keep delivery-status CreateBulk inside the same fn so it shares the tx; eager-loads must use clock.Now()." + }, + { + "file": "rule.go", + "role": "Rule CRUD + EagerLoadActiveChannels; UpdateRule does ClearChannels().AddChannelIDs()", + "watch_for": "UpdateRule replaces (not merges) channel edges; channel edges are re-queried separately to populate the returned domain object." + }, + { + "file": "channel.go", + "role": "Channel CRUD; DeleteChannel is a soft delete (SetDisabled+SetDeletedAt)", + "watch_for": "Deletes are soft; list excludes deleted channels but GetChannel does not filter deleted." + }, + { + "file": "deliverystatus.go", + "role": "List/Get/UpdateEventDeliveryStatus; time bounds forced to UTC", + "watch_for": "NextAttempt is normalized via lo.ToPtr(...UTC()); uses SetOrClearNextAttemptAt for nil-able field." + }, + { + "file": "entitymapping_test.go", + "role": "Guards EventPayload JSON shape and version gating", + "watch_for": "TestEventPayloadV1JSONShape asserts api.Invoice fields sit flat under invoice.* \u2014 embedding/tag regressions break stored JSONB." + } + ], + "anti_patterns": [ + "Calling a.db directly in a method without wrapping in entutils.TransactingRepo/TransactingRepoWithNoValue \u2014 loses tx propagation", + "Returning raw entdb errors instead of notification.NotFoundError on not-found", + "Hard-deleting channels/rules instead of soft-delete (SetDeletedAt+SetDisabled)", + "Mapping DB rows inline instead of via the *FromDBEntity functions in entitymapping.go", + "Storing non-UTC timestamps or skipping .UTC() in mappers" + ], + "decisions": [ + { + "decision": "Soft-delete with DeletedAt + Disabled rather than physical delete", + "rationale": "Events reference rules/channels historically; physical delete would orphan delivery history and break audit/resend." + }, + { + "decision": "Annotations stored as JSONB and queried via entutils.JSONBIn", + "rationale": "Lets the consumer dedupe and filter events by feature/subject/dedupe-hash without dedicated columns per dimension." + } + ], + "code_examples": [ + { + "scenario": "Adding a namespace-scoped repository read with tx propagation and NotFound mapping", + "code": "func (a *adapter) GetRule(ctx context.Context, params notification.GetRuleInput) (*notification.Rule, error) {\n\tfn := func(ctx context.Context, a *adapter) (*notification.Rule, error) {\n\t\trow, err := a.db.NotificationRule.Query().\n\t\t\tWhere(ruledb.ID(params.ID), ruledb.Namespace(params.Namespace)).\n\t\t\tWithChannels(EagerLoadActiveChannels(clock.Now())).First(ctx)\n\t\tif err != nil {\n\t\t\tif entdb.IsNotFound(err) {\n\t\t\t\treturn nil, notification.NotFoundError{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.ID}}\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"failed to fetch notification rule: %w\", err)\n\t\t}\n\t\treturn RuleFromDBEntity(*row), nil\n\t}\n\treturn entutils.TransactingRepo(ctx, a, fn)\n}" + } + ] + }, + "openmeter/notification/consumer": { + "purpose": "Kafka/Watermill consumer (driven by cmd/notification-service) that subscribes to system events and turns entitlement balance.snapshot, entitlement reset, and standard-invoice created/updated events into notification.Events via the notification.Service. The deduplication logic here is the package's most subtle code.", + "patterns": [ + { + "name": "grouphandler fan-in over typed events", + "description": "Consumer.New registers one consumer handler on SystemEventsTopic built from grouphandler.NewNoPublishingHandler with NewGroupEventHandler closures per typed event (snapshot.SnapshotEvent, billing.StandardInvoiceCreatedEvent, billing.StandardInvoiceUpdatedEvent). Each closure nil-checks then delegates to a struct handler.", + "example": "grouphandler.NewGroupEventHandler(func(ctx, event *billing.StandardInvoiceCreatedEvent) error { if event==nil {return nil}; return consumer.invoiceHandler.Handle(ctx, event.EventStandardInvoice, notification.EventTypeInvoiceCreated) })" + }, + { + "name": "Per-event-type handler structs holding Notification+Logger", + "description": "EntitlementSnapshotHandler and InvoiceEventHandler each hold a notification.Service and a *slog.Logger (group-scoped via opts.Logger.WithGroup). Add new event kinds as new handler structs, not new methods on Consumer.", + "example": "type InvoiceEventHandler struct { Notification notification.Service; Logger *slog.Logger }" + }, + { + "name": "Rule fan-out + feature filtering", + "description": "Handlers ListRules for the relevant EventType+namespace then lo.Filter by rule.Config..Features against event FeatureID/FeatureKey (empty Features => match all). Errors per-rule are collected with errors.Join, not returned early.", + "example": "slices.Contains(rule.Config.BalanceThreshold.Features, event.Entitlement.FeatureID) || slices.Contains(..., event.Entitlement.FeatureKey)" + }, + { + "name": "Dedupe via BalanceEventDedupHash (V1 sha256 / V2 xxh3)", + "description": "Before creating a balance-threshold event the handler computes NewBalanceEventDedupHash and ListEvents over the current usage period with DeduplicationHashes [V1,V2]; only creates when no prior event exists or the last event used a different threshold. The dedupe hash is also stored as an annotation.", + "example": "DeduplicationHashes: []string{dedupHash.V1(), dedupHash.V2()}" + }, + { + "name": "Snapshot eligibility gating", + "description": "isBalanceThresholdEvent requires EntitlementTypeMetered, Update/Reset operation, IsActive(clock.Now()), and non-nil Value.Balance/Usage. isEntitlementResetEvent additionally requires ValueOperationReset. EntitlementSnapshotHandler.Handle runs both branches.", + "example": "if event.Entitlement.EntitlementType != entitlement.EntitlementTypeMetered { return false }" + }, + { + "name": "Payload built from driver mappers, not raw structs", + "description": "Event payloads are assembled by mapping domain to API via entitlementdriver.Parser.ToMetered, productcatalogdriver.MapFeatureToResponse, subjecthttphandler.FromSubject, customerhttphandler.CustomerToAPI, billinghttp.MapEventInvoiceToAPI before calling Notification.CreateEvent.", + "example": "apiInvoice, err := billinghttp.MapEventInvoiceToAPI(event)" + } + ], + "key_file_guides": [ + { + "file": "consumer.go", + "role": "Options{Validate}, Consumer struct, New() wires router + group handlers, Run/Close", + "watch_for": "Gathering invoices are skipped downstream (invoice.go), not here; every group closure must nil-check the event pointer." + }, + { + "file": "entitlementsnapshot.go", + "role": "EntitlementSnapshotHandler dispatcher routing snapshot events to balance-threshold and reset branches", + "watch_for": "Both branches may fire for one event; keep them independent and wrap each error with context." + }, + { + "file": "entitlementbalancethreshold.go", + "role": "Threshold activation math, getActiveThresholdsWithHighestPriority, dedupe hash, createEvent", + "watch_for": "totalGrants==0 => ErrNoBalanceAvailable (skip, don't error); balance and overage cannot both be >absoluteZero; V2 hash uses thresholdKind so usage/balance kinds dedupe independently." + }, + { + "file": "entitlementreset.go", + "role": "Reset-event handling; one event per usage period (skips if any prior event in period)", + "watch_for": "createResetEvent reuses the balance event version (TODO OM-1508) \u2014 keep the Customer.ID guard before CustomerToAPI." + }, + { + "file": "invoice.go", + "role": "InvoiceEventHandler: skip gathering invoices, fan out to active non-disabled rules, annotate with invoice id/number", + "watch_for": "Returns nil (not error) when no rules or status==Gathering; payload Version must be EventPayloadVersionCurrent." + } + ], + "anti_patterns": [ + "Creating a balance-threshold event without checking the dedupe hash against the current usage period", + "Returning early on the first rule error instead of collecting via errors.Join", + "Treating totalGrants==0 as a real error instead of skipping (ErrNoBalanceAvailable)", + "Building API payloads by hand instead of via the *driver mapping helpers", + "Emitting notification events for gathering-status invoices" + ], + "decisions": [ + { + "decision": "Two dedupe hash versions (V1 sha256, V2 xxh3 including thresholdKind)", + "rationale": "V2 separates usage vs balance threshold kinds so both can fire in one period; querying both hashes keeps backward compatibility with events created under V1." + }, + { + "decision": "Reset events are one-per-usage-period", + "rationale": "A reset is a single boundary event; re-emitting on every subsequent snapshot in the same period would spam channels." + } + ], + "code_examples": [ + { + "scenario": "Fan-out + feature-filter + dedupe before creating a notification event", + "code": "rules, err := b.Notification.ListRules(ctx, notification.ListRulesInput{\n\tNamespaces: []string{event.Namespace.ID},\n\tTypes: []notification.EventType{notification.EventTypeBalanceThreshold},\n})\naffected := lo.Filter(rules.Items, func(r notification.Rule, _ int) bool {\n\tif len(r.Config.BalanceThreshold.Features) == 0 { return true }\n\treturn slices.Contains(r.Config.BalanceThreshold.Features, event.Entitlement.FeatureID)\n})\nfor _, rule := range affected {\n\tif err := b.handleRule(ctx, event, rule); err != nil { errs = append(errs, err) }\n}\nreturn errors.Join(errs...)" + } + ] + }, + "openmeter/notification/httpdriver": { + "purpose": "v1 HTTP transport for notification channels, rules, and events, mounted by openmeter/server/router. Decodes requests, resolves namespace, calls notification.Service, and maps domain<->api via FromX/AsX functions.", + "patterns": [ + { + "name": "httptransport handler trio per endpoint", + "description": "Each operation defines Request/Response/Handler type aliases then a (h *handler) method returning httptransport.NewHandler[WithArgs] with a decode fn, a business fn, a JSON encoder, and AppendOptions(WithOperationName, WithErrorEncoder(errorEncoder())).", + "example": "type (ListRulesRequest = notification.ListRulesInput; ListRulesHandler httptransport.HandlerWithArgs[ListRulesRequest, ListRulesResponse, ListRulesParams])" + }, + { + "name": "Namespace resolved via h.resolveNamespace(ctx)", + "description": "Every decode fn first calls h.resolveNamespace(ctx) (wraps namespaceDecoder.GetNamespace, 500 on miss) and threads the namespace into the *Input.", + "example": "ns, err := h.resolveNamespace(ctx); req := ListChannelsRequest{Namespaces: []string{ns}, ...}" + }, + { + "name": "Discriminated rule create/update via ValueByDiscriminator", + "description": "CreateRule/UpdateRule call body.ValueByDiscriminator() then switch on the api.NotificationRule*CreateRequest concrete type to pick the matching AsRuleCreateRequest/UpdateRequest mapper.", + "example": "switch v := value.(type) { case api.NotificationRuleBalanceThresholdCreateRequest: req = AsRuleBalanceThresholdCreateRequest(v, ns) ... }" + }, + { + "name": "Domain<->API mapping in mapping.go (FromX / AsX)", + "description": "FromChannel/FromRule/FromEvent map domain to api; AsChannelWebhook*/AsRule*Request map api to *Input. FromRule switches on rule.Type and uses api union setters (rule.FromNotificationRuleBalanceThreshold(...)).", + "example": "err = rule.FromNotificationRuleBalanceThreshold(FromRuleBalanceThreshold(r))" + }, + { + "name": "Centralized error encoder", + "description": "errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for notification.NotFoundError(404), feature.FeatureNotFoundError(400), models.GenericValidationError(400), webhook.Validation/NotFound(500), notification.UpdateAfterDeleteError(409). All handlers attach it via WithErrorEncoder.", + "example": "commonhttp.HandleErrorIfTypeMatches[notification.NotFoundError](ctx, http.StatusNotFound, err, w)" + }, + { + "name": "TestRule generates a synthetic event", + "description": "TestRule loads the rule, calls internal.TestEventGenerator.Generate for the rule type, then CreateEvent with annotation AnnotationRuleTestEvent=true.", + "example": "testEvent, _ := h.testEventGenerator.Generate(ctx, internal.EventGeneratorInput{Namespace: request.Namespace, EventType: rule.Type})" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler interface (Channel/Rule/Event sub-interfaces), handler struct, New() wiring service+TestEventGenerator+namespaceDecoder", + "watch_for": "New requires billing.Service (only to build the TestEventGenerator); resolveNamespace returns 500 on missing namespace." + }, + { + "file": "mapping.go", + "role": "All Domain<->API converters; FromRule dispatches per EventType", + "watch_for": "Adding a new rule/event type requires a new AsRule*Create+Update pair AND a FromRule* + FromRule switch case, or you get a GenericValidationError 'invalid rule type'." + }, + { + "file": "rule.go", + "role": "Rule CRUD + TestRule handlers using ValueByDiscriminator", + "watch_for": "The create/update switch has no default \u2014 an unhandled discriminator yields a zero-value req silently; add the case when extending." + }, + { + "file": "channel.go", + "role": "Channel CRUD handlers; only ChannelTypeWebhook supported", + "watch_for": "FromChannel returns GenericValidationError for non-webhook types; DeleteChannel uses EmptyResponseEncoder/204." + }, + { + "file": "event.go", + "role": "ListEvents/GetEvent/ResendEvent handlers; list params map subject/feature/rule/channel/from/to", + "watch_for": "ResendEvent returns 202 Accepted with EmptyResponseEncoder; body.Channels is optional." + }, + { + "file": "errors.go", + "role": "errorEncoder() status mapping for all notification handlers", + "watch_for": "New domain error types are invisible to clients (default 500) until added here." + }, + { + "file": "mapping_test.go", + "role": "Guards FromEventAsInvoiceCreated/UpdatedPayload pass-through and nil handling", + "watch_for": "Nil InvoicePayload must produce an error, not a zero api.Invoice." + } + ], + "anti_patterns": [ + "Hand-decoding namespace instead of h.resolveNamespace(ctx)", + "Adding a rule/event type without updating both AsRule* mappers and the FromRule switch", + "Returning a new domain error type without registering it in errors.go (becomes a 500)", + "Bypassing httptransport.NewHandler and writing the ResponseWriter directly", + "Omitting WithOperationName/WithErrorEncoder from AppendOptions" + ], + "decisions": [ + { + "decision": "Request/Response are type aliases of notification.*Input / api.* rather than bespoke DTOs", + "rationale": "Keeps the transport layer a thin adapter \u2014 the service input type IS the request, minimizing mapping surface." + }, + { + "decision": "Single shared errorEncoder() across all handlers", + "rationale": "Uniform HTTP status mapping for domain errors regardless of which endpoint surfaced them." + } + ], + "code_examples": [ + { + "scenario": "A list endpoint: decode params + namespace, call service, map domain to API", + "code": "func (h *handler) ListChannels() ListChannelsHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, params ListChannelsParams) (ListChannelsRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return ListChannelsRequest{}, err }\n\t\t\treturn ListChannelsRequest{Namespaces: []string{ns}, Page: pagination.Page{PageSize: lo.FromPtrOr(params.PageSize, notification.DefaultPageSize)}}, nil\n\t\t},\n\t\tfunc(ctx context.Context, req ListChannelsRequest) (ListChannelsResponse, error) {\n\t\t\tresp, err := h.service.ListChannels(ctx, req)\n\t\t\t/* map resp.Items via FromChannel */ return ListChannelsResponse{}, err\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[ListChannelsResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listNotificationChannels\"), httptransport.WithErrorEncoder(errorEncoder()))...,\n\t)\n}" + } + ] + }, + "openmeter/notification/internal": { + "purpose": "Private helper package (imported only by httpdriver) hosting TestEventGenerator, which fabricates representative EventPayloads for the 'test rule' endpoint across all event types.", + "patterns": [ + { + "name": "TestEventGenerator dispatch by EventType", + "description": "Generate validates EventGeneratorInput then switches on EventType: balance-threshold and entitlement-reset return hardcoded fixtures; invoice types build a real payload via billingService.SimulateInvoice.", + "example": "switch in.EventType { case notification.EventTypeBalanceThreshold: return t.newTestBalanceThresholdPayload(), nil; ... }" + }, + { + "name": "Balance payload derives from reset payload", + "description": "newTestBalanceThresholdPayload calls newTestEntitlementResetPayload, flips Type, and converts EntitlementReset into a BalanceThresholdPayload by casting EntitlementValuePayloadBase(*payload.EntitlementReset).", + "example": "payload.BalanceThreshold = ¬ification.BalanceThresholdPayload{EntitlementValuePayloadBase: notification.EntitlementValuePayloadBase(*payload.EntitlementReset), Threshold: ...}" + }, + { + "name": "Invoice fixture uses real billing simulation", + "description": "newTestInvoicePayload constructs a customer + flat-fee line, calls billingService.SimulateInvoice, wraps via billing.NewEventStandardInvoice, then maps with billinghttp.MapEventInvoiceToAPI \u2014 exercising the real billing path rather than a stub.", + "example": "invoice, err := t.billingService.SimulateInvoice(ctx, billing.SimulateInvoiceInput{...}); eventInvoice, _ := billing.NewEventStandardInvoice(invoice)" + } + ], + "key_file_guides": [ + { + "file": "rule.go", + "role": "TestEventGenerator{billingService}, NewTestEventGenerator, EventGeneratorInput{Validate}, Generate + per-type fixture builders", + "watch_for": "Invoice fixtures require a live billing.Service (SimulateInvoice); the entitlement/feature/subject fixtures are hardcoded ULIDs/values \u2014 adding a new event type needs a new case in Generate or it errors 'unsupported event type'." + } + ], + "anti_patterns": [ + "Importing this package outside httpdriver (it is intentionally internal)", + "Hand-rolling an invoice fixture instead of going through billingService.SimulateInvoice", + "Adding an EventType to the system without a Generate case (TestRule will fail)" + ], + "decisions": [ + { + "decision": "Invoice test payloads use real SimulateInvoice rather than canned JSON", + "rationale": "Guarantees the test event's invoice shape matches what production billing actually emits, so channel integrations can be validated end-to-end." + } + ], + "code_examples": [ + { + "scenario": "Generating a type-specific test event payload", + "code": "func (t *TestEventGenerator) Generate(ctx context.Context, in EventGeneratorInput) (notification.EventPayload, error) {\n\tif err := in.Validate(); err != nil { return notification.EventPayload{}, err }\n\tswitch in.EventType {\n\tcase notification.EventTypeBalanceThreshold:\n\t\treturn t.newTestBalanceThresholdPayload(), nil\n\tcase notification.EventTypeInvoiceCreated, notification.EventTypeInvoiceUpdated:\n\t\treturn t.newTestInvoicePayload(ctx, in.Namespace, in.EventType)\n\tdefault:\n\t\treturn notification.EventPayload{}, fmt.Errorf(\"unsupported event type: %s\", in.EventType)\n\t}\n}" + } + ] + }, + "openmeter/notification/service": { + "purpose": "Business-logic implementation of notification.Service. Orchestrates the adapter (persistence) and webhook.Handler (Svix), validates inputs, and keeps webhook channels in sync with rule/channel mutations inside transactions.", + "patterns": [ + { + "name": "Validate then transaction.Run(ctx, s.adapter, fn)", + "description": "Mutating methods call params.Validate() first, then wrap side-effects in transaction.Run / transaction.RunWithNoValue over s.adapter so DB writes and webhook calls commit/roll back together. Pure reads delegate straight to the adapter.", + "example": "if err := params.Validate(); err != nil { return ... }; return transaction.Run(ctx, s.adapter, fn)" + }, + { + "name": "Channel writes mirror to Svix webhook", + "description": "CreateChannel persists, then s.webhook.CreateWebhook, then re-UpdateChannel to store the returned signing secret. UpdateChannel re-syncs via UpdateWebhook including the rule IDs assigned to the channel. Only ChannelTypeWebhook is handled; default returns an error.", + "example": "wb, _ := s.webhook.CreateWebhook(ctx, webhook.CreateWebhookInput{...}); updateIn.Config.WebHook.SigningSecret = wb.Secret" + }, + { + "name": "Rule channel-assignment diffing", + "description": "UpdateRule computes notification.NewChannelIDsDifference(new, old); returns early if unchanged, otherwise fetches affected channels and calls webhook.UpdateWebhookChannels with AddChannels/RemoveChannels per InAdditions/InRemovals.", + "example": "channelIDsDiff := notification.NewChannelIDsDifference(params.Channels, oldChannelIDs)" + }, + { + "name": "Config + feature validation", + "description": "Create/UpdateRule validate config via params.Config.ValidateWith(notification.ValidateRuleConfigWithFeatures(ctx, s, ns)) and channels via ValidateRuleChannels[I](ctx, s) \u2014 a generic over CreateRuleInput|UpdateRuleInput that checks every channel exists.", + "example": "err := params.ValidateWith(ValidateRuleChannels[notification.CreateRuleInput](ctx, s))" + }, + { + "name": "Guard mutations against deleted aggregates", + "description": "UpdateChannel/UpdateRule fetch the current row and return notification.UpdateAfterDeleteError when DeletedAt != nil; CreateEvent rejects deleted/disabled rules (NotFoundError / GenericValidationError).", + "example": "if rule.DeletedAt != nil { return nil, notification.UpdateAfterDeleteError{Err: errors.New(\"not allowed to update deleted rule\")} }" + }, + { + "name": "Max-channels-per-webhook surfaced as validation error", + "description": "When webhook.UpdateWebhookChannels returns webhook.IsMaxChannelsPerWebhookExceededError, wrap as models.NewGenericValidationError referencing webhook.MaxChannelsPerWebhook rather than a generic 500.", + "example": "if webhook.IsMaxChannelsPerWebhookExceededError(err) { return nil, models.NewGenericValidationError(...) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct (feature, adapter, webhook, logger), Config+New() validation, ChannelIDMetadataKey, ListFeature helper", + "watch_for": "New requires Adapter, FeatureConnector, Webhook, Logger all non-nil; Service satisfies notification.Service (compile-time _ assertion)." + }, + { + "file": "channel.go", + "role": "Channel CRUD with Svix sync; DeleteChannel blocks if any rule references the channel", + "watch_for": "DeleteChannel returns GenericValidationError when rules reference it; UpdateChannel forbids changing channel Type and re-pushes assigned rule IDs to the webhook." + }, + { + "file": "rule.go", + "role": "Rule CRUD + ValidateRuleChannels generic + UpdateRule channel diffing", + "watch_for": "UpdateRule short-circuits webhook sync when channel set unchanged; over-fetch guard uses 2*MaxChannelsPerRule page size." + }, + { + "file": "event.go", + "role": "CreateEvent (rejects deleted/disabled rules), ListEvents/GetEvent, ResendEvent state-machine", + "watch_for": "ResendEvent only resets statuses in Sending/Success/Failed to Resending, skips disabled channels, and stamps AnnotationEventResendTimestamp." + }, + { + "file": "deliverystatus.go", + "role": "UpdateEventDeliveryStatus (in tx), List/GetEventsDeliveryStatus", + "watch_for": "Only the update wraps in transaction.Run; reads delegate directly." + } + ], + "anti_patterns": [ + "Mutating channels/rules without transaction.Run wrapping both DB write and webhook call", + "Skipping params.Validate() / ValidateRuleConfigWithFeatures / ValidateRuleChannels before persisting", + "Updating a deleted aggregate instead of returning notification.UpdateAfterDeleteError", + "Deleting a channel still referenced by a rule (must return a validation error)", + "Surfacing max-channels-exceeded as a 500 instead of a GenericValidationError" + ], + "decisions": [ + { + "decision": "Webhook side-effects run inside the same transaction as DB writes", + "rationale": "Channel/rule state in Postgres and Svix must stay consistent; a failed Svix call rolls back the DB mutation." + }, + { + "decision": "Channel deletion is blocked while rules reference it", + "rationale": "Prevents orphaning rules whose only delivery target would vanish; forces explicit rule reassignment first." + } + ], + "code_examples": [ + { + "scenario": "A mutating service method: validate, then run DB + webhook in one transaction", + "code": "func (s Service) CreateChannel(ctx context.Context, params notification.CreateChannelInput) (*notification.Channel, error) {\n\tif err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid params: %w\", err) }\n\tfn := func(ctx context.Context) (*notification.Channel, error) {\n\t\tchannel, err := s.adapter.CreateChannel(ctx, params)\n\t\tif err != nil { return nil, err }\n\t\twb, err := s.webhook.CreateWebhook(ctx, webhook.CreateWebhookInput{Namespace: params.Namespace, ID: &channel.ID, URL: channel.Config.WebHook.URL})\n\t\tif err != nil { return nil, err }\n\t\tupdateIn := notification.UpdateChannelInput{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: channel.ID}, Config: channel.Config}\n\t\tupdateIn.Config.WebHook.SigningSecret = wb.Secret\n\t\treturn s.adapter.UpdateChannel(ctx, updateIn)\n\t}\n\treturn transaction.Run(ctx, s.adapter, fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w108.json b/.archie/enrichments/w108.json new file mode 100644 index 0000000000..e8d3df95fd --- /dev/null +++ b/.archie/enrichments/w108.json @@ -0,0 +1,52 @@ +{ + "openmeter/notification/eventhandler/noop": { + "purpose": "No-op implementation of notification.EventHandler used when notification event dispatch/reconciliation is disabled or unwired. Satisfies the full interface contract so DI can always supply a handler without running Kafka/Svix delivery side effects.", + "patterns": [ + { + "name": "Compile-time interface assertion", + "description": "Assert the no-op type satisfies notification.EventHandler at compile time so interface drift breaks the build, not runtime.", + "example": "var _ notification.EventHandler = (*Handler)(nil)" + }, + { + "name": "All methods return nil / no side effects", + "description": "Every EventHandler method (Dispatch, Reconcile, Start, Close) must be a pure no-op returning nil. No state, no goroutines, no I/O.", + "example": "func (h Handler) Dispatch(_ context.Context, _ *notification.Event) error { return nil }" + }, + { + "name": "Value-receiver empty struct", + "description": "Handler is an empty struct{} with value receivers; it holds no dependencies (no logger, no repo, no webhook.Handler) unlike the real eventhandler/service implementation.", + "example": "type Handler struct{}" + }, + { + "name": "Fallible constructor signature parity", + "description": "New() returns (*Handler, error) to mirror the real handler constructor so callers/DI can swap implementations without changing call sites, even though error is always nil.", + "example": "func New() (*Handler, error) { return &Handler{}, nil }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Sole file; defines Handler{} and its four EventHandler methods plus New(). The complete no-op surface.", + "watch_for": "Keep method set in lockstep with notification.EventHandler in openmeter/notification/eventhandler.go (Dispatch, Reconcile via embedded EventDispatcher/EventReconciler, Start, Close). Adding a method there silently breaks the var _ assertion here until updated." + } + ], + "anti_patterns": [ + "Adding fields, loggers, or goroutines to Handler \u2014 the whole point is zero side effects.", + "Returning a non-nil error from any method or from New(); callers assume the no-op never fails.", + "Importing webhook/Svix, Kafka, or repository packages here \u2014 that recreates the real handler and defeats the no-op purpose.", + "Letting the method set drift from notification.EventHandler; the contract is defined upstream, not here." + ], + "decisions": [ + { + "decision": "Provide a no-op EventHandler in its own package rather than nil.", + "rationale": "DI/wiring (app/common, cmd/notification-service) can always inject a valid handler; disabling notification delivery becomes a constructor swap, avoiding nil-checks at every call site." + } + ], + "code_examples": [ + { + "scenario": "Full no-op handler satisfying notification.EventHandler", + "code": "package noop\n\nimport (\n\t\"context\"\n\n\t\"github.com/openmeterio/openmeter/openmeter/notification\"\n)\n\nvar _ notification.EventHandler = (*Handler)(nil)\n\ntype Handler struct{}\n\nfunc (h Handler) Dispatch(_ context.Context, _ *notification.Event) error { return nil }\nfunc (h Handler) Reconcile(_ context.Context) error { return nil }\nfunc (h Handler) Start() error { return nil }\nfunc (h Handler) Close() error { return nil }\n\nfunc New() (*Handler, error) { return &Handler{}, nil }" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w109.json b/.archie/enrichments/w109.json new file mode 100644 index 0000000000..c177203cb5 --- /dev/null +++ b/.archie/enrichments/w109.json @@ -0,0 +1,97 @@ +{ + "openmeter/notification/webhook/noop": { + "purpose": "No-op implementation of webhook.Handler (Svix webhook delivery interface) wired by app/common when webhook delivery is disabled or unconfigured. Every method logs the call and returns webhook.ErrNotImplemented (or an empty slice) so the system stays operable without a real Svix backend.", + "patterns": [ + { + "name": "Compile-time interface assertion", + "description": "Assert the no-op satisfies webhook.Handler so the contract stays in sync as methods are added/removed.", + "example": "var _ webhook.Handler = (*Handler)(nil)" + }, + { + "name": "Implement every webhook.Handler method", + "description": "Each interface method (RegisterEventTypes, CreateWebhook, UpdateWebhook, UpdateWebhookChannels, DeleteWebhook, GetWebhook, ListWebhooks, SendMessage, GetMessage, ResendMessage) must be present; adding a method to webhook.Handler requires a stub here or compilation fails.", + "example": "func (h Handler) CreateWebhook(ctx context.Context, params webhook.CreateWebhookInput) (*webhook.Webhook, error) { ... return nil, webhook.ErrNotImplemented }" + }, + { + "name": "Return webhook.ErrNotImplemented (never panic)", + "description": "Methods returning error must return webhook.ErrNotImplemented; pointer returns use nil; ListWebhooks returns an empty []webhook.Webhook{} not nil.", + "example": "return []webhook.Webhook{}, webhook.ErrNotImplemented" + }, + { + "name": "Logger tagged at construction", + "description": "New(logger) wraps the injected logger with a stable attribute so noop log lines are distinguishable; do not fall back to slog.Default().", + "example": "logger: logger.With(slog.String(\"webhook_handler\", \"noop\"))" + }, + { + "name": "InfoContext logging on every call", + "description": "Each method logs intent with the request context before returning, giving operators visibility into calls that hit the disabled handler.", + "example": "h.logger.InfoContext(ctx, \"sending message\", \"params\", params)" + } + ], + "key_file_guides": [ + { + "file": "noop.go", + "role": "Sole file: Handler struct (logger only) plus New(logger) constructor and stub implementations of all 10 webhook.Handler methods.", + "watch_for": "Keep the var _ webhook.Handler assertion; keep ListWebhooks returning an empty slice (callers may range over it); never substitute panic or slog.Default()." + } + ], + "anti_patterns": [ + "Removing or stubbing only part of webhook.Handler \u2014 the compile-time assertion will break the build.", + "Returning nil error from a write/delete method, which would falsely signal success to callers expecting ErrNotImplemented.", + "Using slog.Default() instead of the injected, tagged logger.", + "Adding real Svix logic here \u2014 that belongs in openmeter/notification/webhook/svix." + ], + "decisions": [ + { + "decision": "Provide a no-op Handler rather than a nil interface.", + "rationale": "Lets app/common wire notification without a configured webhook backend; callers can invoke methods safely and branch on webhook.ErrNotImplemented instead of nil-checking the handler." + } + ], + "code_examples": [] + }, + "openmeter/notification/webhook/secret": { + "purpose": "Generates and validates Svix-style webhook signing secrets used by the notification webhook layer. Pure utility leaf package with no dependencies beyond crypto/rand, encoding/base64, and pkg/models for validation errors.", + "patterns": [ + { + "name": "whsec_ prefixed base64 secrets", + "description": "NewSigningSecret reads `size` random bytes via crypto/rand and returns them base64-encoded with the SigningSecretPrefix (\"whsec_\"). DefaultSigningSecretSize is 32; use NewSigningSecretWithDefaultSize() for the standard size.", + "example": "return \"whsec_\" + base64.StdEncoding.EncodeToString(b), nil" + }, + { + "name": "Aggregate validation via NewNillableGenericValidationError", + "description": "ValidateSigningSecret collects all issues into `var errs []error`, then returns models.NewNillableGenericValidationError(errors.Join(errs...)) so callers get nil when valid and a combined error otherwise.", + "example": "return models.NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "Strip optional prefix before validating", + "description": "Validation CutPrefixes SigningSecretPrefix first, then checks length (32-100 chars) and base64 decodability on the remainder, so secrets validate with or without the prefix.", + "example": "s, _ := strings.CutPrefix(secret, SigningSecretPrefix)" + } + ], + "key_file_guides": [ + { + "file": "secret.go", + "role": "Sole file: DefaultSigningSecretSize/SigningSecretPrefix constants, NewSigningSecret(size), NewSigningSecretWithDefaultSize(), and ValidateSigningSecret(secret).", + "watch_for": "Length bounds (32-100) are checked on the prefix-stripped string; keep crypto/rand (not math/rand); base64.StdEncoding must match between generation and decode validation." + } + ], + "anti_patterns": [ + "Using math/rand instead of crypto/rand for secret generation.", + "Returning on the first validation failure instead of joining all errs.", + "Hardcoding the \"whsec_\" literal in callers instead of using SigningSecretPrefix.", + "Mixing base64 encodings (URL vs Std) between NewSigningSecret and ValidateSigningSecret." + ], + "decisions": [ + { + "decision": "Mirror Svix's whsec_-prefixed base64 secret format.", + "rationale": "The notification webhook layer integrates with Svix, so signing secrets must be interoperable with Svix's expected format." + } + ], + "code_examples": [ + { + "scenario": "Validate an incoming signing secret with or without the prefix", + "code": "func ValidateSigningSecret(secret string) error {\n\tvar errs []error\n\ts, _ := strings.CutPrefix(secret, SigningSecretPrefix)\n\tif len(s) < 32 || len(s) > 100 {\n\t\terrs = append(errs, errors.New(\"secret length must be between 32 to 100 chars without the optional prefix\"))\n\t}\n\tif _, err := base64.StdEncoding.DecodeString(s); err != nil {\n\t\terrs = append(errs, errors.New(\"invalid base64 string\"))\n\t}\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w11.json b/.archie/enrichments/w11.json new file mode 100644 index 0000000000..269b24ba73 --- /dev/null +++ b/.archie/enrichments/w11.json @@ -0,0 +1,96 @@ +{ + "openmeter/billing/rating": { + "purpose": "The pricing-engine domain root for billing. It declares the rating.Service interface (ResolveBillablePeriod + GenerateDetailedLines), the line-accessor contracts the engine reads pricing/usage from, the DetailedLine result model with its monetary math, and the stable ChildUniqueReferenceID constants that name every generated detailed line. The concrete engine lives in the service/ child; this package is the type/contract surface plus pure decimal arithmetic.", + "patterns": [ + { + "name": "Accessor-interface input contracts", + "description": "The engine never takes a concrete line struct; it reads via PriceAccessor / GatheringLineAccessor / StandardLineAccessor interfaces. New pricing inputs must be added as accessor methods, not as fields on a request struct.", + "example": "StandardLineAccessor.GetMeteredQuantity() (*alpacadecimal.Decimal, error); GetRateCardDiscounts() billing.Discounts; IsProgressivelyBilled() bool" + }, + { + "name": "Stable ChildUniqueReferenceID constants", + "description": "Every detailed line a pricer emits is keyed by a const from const.go (e.g. UsageChildUniqueReferenceID, GraduatedTieredPriceUsageChildUniqueReferenceID format string). These IDs are the external sync key \u2014 reuse the existing const, never inline a literal.", + "example": "VolumeUnitPriceChildUniqueReferenceID = \"volume-tiered-price\"; GraduatedTieredPriceUsageChildUniqueReferenceID = \"graduated-tiered-%d-price-usage\"" + }, + { + "name": "All money math via currencyx.Calculator.RoundToPrecision", + "description": "DetailedLine.TotalAmount and AddDiscountForOverage round every intermediate via in.Currency.RoundToPrecision before comparing or subtracting. Never compare raw decimals or floats directly.", + "example": "total := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity)); total = total.Sub(in.AmountDiscounts.SumAmount(in.Currency))" + }, + { + "name": "Total = perUnit*qty minus discounts minus credits", + "description": "TotalAmount(getTotalAmountInput) is the single canonical formula: round(perUnit*qty) - AmountDiscounts.SumAmount - CreditsApplied.SumAmount. DetailedLine.TotalAmount and DetailedLines.Sum both route through it.", + "example": "func TotalAmount(in getTotalAmountInput) alpacadecimal.Decimal { total := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity)); total = total.Sub(in.AmountDiscounts.SumAmount(in.Currency)); ... }" + }, + { + "name": "Functional options for engine behaviour", + "description": "GenerateDetailedLines takes ...GenerateDetailedLinesOption (WithMinimumCommitmentIgnored, WithCreditsMutatorDisabled) collapsed via NewGenerateDetailedLinesOptions. Add behaviour flags as new With* options, not as new method overloads.", + "example": "func WithCreditsMutatorDisabled() GenerateDetailedLinesOption { return func(o *GenerateDetailedLinesOptions){ o.DisableCreditsMutator = true } }" + }, + { + "name": "Validate inputs before pricing", + "description": "Input structs (ResolveBillablePeriodInput) and result models (DetailedLine) carry Validate() returning fmt.Errorf on missing/invalid fields. DetailedLine.Validate rejects negative PerUnitAmount but intentionally allows negative Quantity (usage corrections).", + "example": "func (i ResolveBillablePeriodInput) Validate() error { if i.Line == nil { return fmt.Errorf(\"line is required\") } ... }" + }, + { + "name": "Max-spend overage applied as an AmountLineDiscount", + "description": "AddDiscountForOverage models the maximum-spend cap by appending a billing.AmountLineDiscountManaged with ChildUniqueReferenceID=billing.LineMaximumSpendReferenceID and Reason=MaximumSpendDiscount, returning a copy of the line \u2014 it never mutates totals directly.", + "example": "i.AmountDiscounts = append(i.AmountDiscounts, billing.AmountLineDiscountManaged{ AmountLineDiscount: billing.AmountLineDiscount{ Amount: discountAmount, LineDiscountBase: billing.LineDiscountBase{ ChildUniqueReferenceID: lo.ToPtr(billing.LineMaximumSpendReferenceID), Reason: billing.NewDiscountReasonFrom(billing.MaximumSpendDiscount{}) }}})" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Declares the rating.Service interface (ResolveBillablePeriod, GenerateDetailedLines), the option type + With* helpers, and the result/input structs (GenerateDetailedLinesResult with FinalUsage/FinalStandardLineDiscounts/Totals, ResolveBillablePeriodInput with its Validate).", + "watch_for": "This is interface-only; the implementation is in service/. ResolveBillablePeriodInput.Validate requires Line, FeatureMeters, and non-zero AsOf." + }, + { + "file": "line.go", + "role": "Defines the three accessor interfaces the engine consumes: PriceAccessor (base: GetPrice/GetServicePeriod/GetFeatureKey), GatheringLineAccessor (gathering-phase, adds split-group/invoiceAt/ID), StandardLineAccessor (standard-phase, adds currency, metered quantity, credits, discounts, progressive-billing accessors).", + "watch_for": "Add new pricing inputs here as accessor methods. GetMeteredQuantity / GetMeteredPreLinePeriodQuantity / GetPreviouslyBilledAmount return errors \u2014 callers must handle them." + }, + { + "file": "detailedline.go", + "role": "DetailedLine result model + pure monetary math: TotalAmount/getTotalAmountInput, DetailedLines.Sum, and AddDiscountForOverage for max-spend capping. Carries AmountDiscounts, CreditsApplied, totals.Totals, Category, PaymentTerm.", + "watch_for": "TotalAmount is the only money formula \u2014 do not duplicate it. AddDiscountForOverage returns a copy (value receiver); reassign the result. Validate allows negative Quantity but not negative PerUnitAmount." + }, + { + "file": "const.go", + "role": "Canonical ChildUniqueReferenceID string constants for every detailed-line variant (usage, flat-price, unit-price, volume, graduated-tiered format strings, rate-card-discount).", + "watch_for": "These are external sync keys; changing a value breaks downstream line reconciliation. Per-type IDs are flagged for deprecation toward generic single-child names \u2014 prefer existing consts over new literals." + }, + { + "file": "detailedline_test.go", + "role": "Table tests for DetailedLine.Validate (negative qty allowed, negative perUnit rejected) and AddDiscountForOverage covering no-overage, currency rounding, partial discount, and 100% discount cases.", + "watch_for": "Asserts exact discount Amount and the fixed description format 'Maximum spend discount for charges over ' \u2014 keep formatMaximumSpendDiscountDescription in sync." + } + ], + "anti_patterns": [ + "Adding concrete request fields instead of extending PriceAccessor/GatheringLineAccessor/StandardLineAccessor \u2014 the engine reads exclusively through these interfaces.", + "Computing line totals with raw alpacadecimal or float math instead of routing through TotalAmount / currencyx.Calculator.RoundToPrecision.", + "Inlining a ChildUniqueReferenceID string literal rather than using the const.go constant \u2014 these are external sync keys.", + "Mutating DetailedLine totals in place; AddDiscountForOverage has a value receiver and returns a new line, so the result must be reassigned.", + "Rejecting negative Quantity in DetailedLine.Validate \u2014 negative quantity is a supported usage-correction case (only PerUnitAmount must be non-negative)." + ], + "decisions": [ + { + "decision": "Engine inputs are accessor interfaces, not structs.", + "rationale": "Gathering vs standard invoice phases expose different data; interfaces let the same pricer code read lazily-computed/errorable values (metered quantity, previously-billed amount) without coupling to a concrete line type." + }, + { + "decision": "Detailed-line monetary math lives in this root package as pure functions.", + "rationale": "Totals must be recomputed deterministically from perUnit*qty minus discounts/credits with consistent currency rounding; centralizing it in TotalAmount keeps the service/ pricers and external callers from diverging." + }, + { + "decision": "Max-spend cap is expressed as a discount line, not a total override.", + "rationale": "Only detailed-line children are synced externally; encoding the cap as an AmountLineDiscount with MaximumSpendDiscount reason keeps the parent line total derivable and auditable." + } + ], + "code_examples": [ + { + "scenario": "Canonical detailed-line total: round(perUnit*qty) then subtract discounts and credits via the currency calculator.", + "code": "import (\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/pkg/currencyx\"\n)\n\nfunc TotalAmount(in getTotalAmountInput) alpacadecimal.Decimal {\n\ttotal := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity))\n\ttotal = total.Sub(in.AmountDiscounts.SumAmount(in.Currency))\n\ttotal = total.Sub(in.CreditsApplied.SumAmount(in.Currency))\n\treturn total\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w110.json b/.archie/enrichments/w110.json new file mode 100644 index 0000000000..9edfaa5056 --- /dev/null +++ b/.archie/enrichments/w110.json @@ -0,0 +1,61 @@ +{ + "openmeter/notification/webhook/svix/internal": { + "purpose": "Private helper package for the Svix webhook integration that translates raw `*svix.Error` HTTP failures into the notification domain's `webhook` error taxonomy (recoverable/retryable/validation/not-found). It is the single boundary where Svix SDK error shapes are decoded and reclassified for the delivery layer.", + "patterns": [ + { + "name": "Single public entrypoint WrapSvixError", + "description": "External callers go through `WrapSvixError(err)`; it returns `nil` for nil input, passes through errors that are not `*svix.Error`, and otherwise decodes and re-wraps. Do not export new ad-hoc wrappers \u2014 extend this function.", + "example": "svixErr, ok := lo.ErrorsAs[*svix.Error](err); if !ok { return err }" + }, + { + "name": "HTTP status -> webhook error class mapping in SvixError.Wrap", + "description": "`SvixError.Wrap()` is the authoritative status->class switch: 400/409/422 -> `webhook.NewUnrecoverableError(webhook.NewValidationError(...))`, 404 -> `webhook.NewNotFoundError`, 429/5xx -> `webhook.NewRetryableError(..., RetryAfter)`. New status handling belongs in this switch, not at call sites.", + "example": "case http.StatusTooManyRequests: return webhook.NewRetryableError(e, e.RetryAfter)" + }, + { + "name": "Two-shape body decoding by status", + "description": "422 responses are unmarshalled into `SvixValidationErrorBody` (list of `SvixValidationError{Loc,Message,Type}`); all other statuses into the flat `SvixErrorBody{Code,Detail}`. Match the JSON tag shape Svix actually returns when adding a status branch.", + "example": "var body SvixValidationErrorBody; json.Unmarshal(svixErr.Body(), &body)" + }, + { + "name": "Compile-time error interface assertion", + "description": "`var _ error = (*SvixError)(nil)` enforces that `SvixError` implements `error`; keep `Error()` defined so this assertion holds.", + "example": "var _ error = (*SvixError)(nil)" + }, + { + "name": "samber/lo for nil-safe pointer and slice ops", + "description": "Use `lo.FromPtrOr`, `lo.ToPtr`, `lo.Map`, `lo.ErrorsAs` rather than manual nil checks or local helpers, consistent with repo conventions.", + "example": "buf.WriteString(lo.FromPtrOr(e.Code, \"unknown svix error\"))" + } + ], + "key_file_guides": [ + { + "file": "error.go", + "role": "The entire package: defines `SvixError` value type, its `Error()`/`Wrap()` methods, the `SvixErrorBody`/`SvixValidationErrorBody`/`SvixValidationError` decode structs, and `WrapSvixError` translator.", + "watch_for": "JSON-decode failures fall back to wrapping the ORIGINAL `err` (not the parse error) via `fmt.Errorf(\"failed to parse Svix error response: %w\", err)` \u2014 keep this so the underlying Svix error is preserved. `Wrap()`'s `default` branch returns the raw `SvixError` unwrapped, so unmapped statuses are neither retryable nor validation errors." + } + ], + "anti_patterns": [ + "Classifying Svix HTTP statuses (retryable vs unrecoverable) at delivery call sites instead of inside `SvixError.Wrap()`.", + "Returning a raw `*svix.Error` from this package \u2014 always funnel through `WrapSvixError` so it becomes a `webhook` domain error.", + "Importing this `internal` package from outside `openmeter/notification/webhook/svix` (Go internal visibility rules forbid it).", + "On JSON unmarshal failure, wrapping the parse error instead of the original `err`, which would hide the real Svix failure." + ], + "decisions": [ + { + "decision": "Reclassify Svix errors into the `webhook` package's recoverable/retryable/validation/not-found taxonomy here rather than in the consumer.", + "rationale": "The Kafka/delivery layer needs a stable retry signal independent of Svix's HTTP encoding; centralizing the mapping keeps retry policy in one place." + }, + { + "decision": "Separate 422 validation bodies from generic error bodies.", + "rationale": "Svix returns a structured per-field `loc/msg/type` list only for validation (422), so a distinct struct and human-readable `[location=... type=...]` formatting is required." + } + ], + "code_examples": [ + { + "scenario": "Translate a Svix SDK error into a domain webhook error", + "code": "import (\n\t\"net/http\"\n\tsvix \"github.com/svix/svix-webhooks/go\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification/webhook\"\n)\n\n// WrapSvixError turns *svix.Error into a webhook.* error; non-svix errors pass through.\nfunc WrapSvixError(err error) error {\n\tsvixErr, ok := lo.ErrorsAs[*svix.Error](err)\n\tif !ok {\n\t\treturn err\n\t}\n\treturn SvixError{HTTPStatus: svixErr.Status(), Code: &body.Code, Details: []string{body.Detail}}.Wrap()\n}\n\n// Wrap maps status -> webhook taxonomy (429/5xx retryable, 4xx unrecoverable/validation).\nfunc (e SvixError) Wrap() error { /* switch e.HTTPStatus ... */ }" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w111.json b/.archie/enrichments/w111.json new file mode 100644 index 0000000000..14373e5276 --- /dev/null +++ b/.archie/enrichments/w111.json @@ -0,0 +1,215 @@ +{ + "openmeter/portal/adapter": { + "purpose": "Adapter implementation of the portal.Service interface for issuing and validating namespace-scoped JWT portal tokens (HS256). Tokens grant subjects read access to specific meter slugs; this is the only place tokens are minted/verified.", + "patterns": [ + { + "name": "Config.Validate + New constructor", + "description": "New(config Config) validates before constructing; non-empty Secret and non-zero Expire are mandatory.", + "example": "func New(config Config) (portal.Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{secret: []byte(config.Secret), expire: config.Expire}, nil }" + }, + { + "name": "Compile-time interface assertion", + "description": "Every adapter declares `var _ portal.Service = (*adapter)(nil)` so it must implement the full interface.", + "example": "var _ portal.Service = (*adapter)(nil)" + }, + { + "name": "JWT minted with fixed issuer + HS256", + "description": "CreateToken signs JTWPortalTokenClaims with jwt.SigningMethodHS256, Issuer=PortalTokenIssuer (\"openmeter\"), embedding Namespace, Id (uuid), Subject, AllowedMeterSlugs.", + "example": "jwt.NewWithClaims(jwt.SigningMethodHS256, JTWPortalTokenClaims{Namespace: input.Namespace, Id: id, RegisteredClaims: jwt.RegisteredClaims{Issuer: PortalTokenIssuer, ...}})" + }, + { + "name": "Strict parser options on Validate", + "description": "Validate parses with WithStrictDecoding, WithExpirationRequired, WithIssuer(PortalTokenIssuer), WithValidMethods([HS256]); never relax these.", + "example": "opts := []jwt.ParserOption{jwt.WithStrictDecoding(), jwt.WithExpirationRequired(), jwt.WithIssuer(PortalTokenIssuer), jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Name})}" + }, + { + "name": "Input validation delegated to input type", + "description": "Handler methods call input.Validate() (e.g. CreateToken calls input.Validate()) rather than re-implementing field checks.", + "example": "if err := input.Validate(); err != nil { return nil, err }" + }, + { + "name": "Unimplemented ops return NewGenericNotImplementedError", + "description": "ListTokens and InvalidateToken (stateless JWT, no store) return models.NewGenericNotImplementedError; noopAdapter returns it for everything.", + "example": "return resp, models.NewGenericNotImplementedError(fmt.Errorf(\"listing tokens\"))" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config struct (Secret, Expire), Validate(), New() factory, and the adapter struct holding secret []byte + expire time.Duration.", + "watch_for": "Secret is stored as []byte; both fields are required by Validate \u2014 adding a code path that bypasses New skips validation." + }, + { + "file": "token.go", + "role": "JTWPortalTokenClaims type plus CreateToken/Validate/ListTokens/InvalidateToken adapter methods.", + "watch_for": "ListTokens/InvalidateToken are intentionally not-implemented because tokens are stateless JWTs with no backing store; do not stub fake success. ExpiresAt defaults to now+expire unless input overrides." + }, + { + "file": "noop.go", + "role": "noopAdapter via NewNoop() returning portal.Service whose every method errors with NotImplemented \u2014 used when portal is disabled.", + "watch_for": "Keep noop method set in sync with the portal.Service interface or the var-assertion would fail elsewhere." + } + ], + "anti_patterns": [ + "Relaxing JWT parser options (dropping WithIssuer/WithValidMethods/WithExpirationRequired) \u2014 opens token forgery / alg confusion.", + "Mapping the raw token string in any output except CreateToken \u2014 the token secret must only leave the system once at creation.", + "Constructing adapter directly instead of via New(), bypassing Config.Validate.", + "Returning fake success from ListTokens/InvalidateToken; they are unimplemented by design (stateless JWT)." + ], + "decisions": [ + { + "decision": "Portal tokens are stateless signed JWTs, not DB rows.", + "rationale": "No revocation store exists, so ListTokens/InvalidateToken return NotImplemented rather than pretending to manage persisted state." + }, + { + "decision": "A noop adapter shares the package.", + "rationale": "Lets DI wire a portal.Service that hard-fails when the portal feature is disabled, keeping the interface non-nil." + } + ], + "code_examples": [ + { + "scenario": "Mint a namespace-scoped portal token", + "code": "token := jwt.NewWithClaims(jwt.SigningMethodHS256, JTWPortalTokenClaims{\n Namespace: input.Namespace,\n Id: uuid.New().String(),\n RegisteredClaims: jwt.RegisteredClaims{\n Subject: input.Subject,\n ExpiresAt: jwt.NewNumericDate(expiresAt),\n IssuedAt: jwt.NewNumericDate(time.Now()),\n Issuer: PortalTokenIssuer,\n },\n AllowedMeterSlugs: *allowedMeterSlugs,\n})\ntokenString, err := token.SignedString(a.secret)" + } + ] + }, + "openmeter/portal/authenticator": { + "purpose": "HTTP middleware that authenticates incoming requests by interpreting OpenAPI 3 security requirements and verifying portal Bearer tokens via portal.Service, injecting the authenticated subject into request context.", + "patterns": [ + { + "name": "OpenAPI-driven security resolution", + "description": "Middleware reads the swagger doc per route: getSecurityRequirements falls back to swagger.Security but prefers the matched operation's Security via chi RoutePattern.", + "example": "path := swagger.Paths.Find(rctx.RoutePattern()); if op := path.GetOperation(r.Method); op != nil && op.Security != nil { security = op.Security }" + }, + { + "name": "Try requirements in order, join errors", + "description": "validateSecurityRequirements returns nil on first satisfied requirement; if none pass it returns errors.Join of all attempts.", + "example": "for _, sr := range securityRequirements { r, err = a.validateSecurityRequirement(sr, w, r); if err == nil { return r, nil }; errs = append(errs, err) }; return r, errors.Join(errs...)" + }, + { + "name": "Security scheme name -> authenticator func", + "description": "getAuthenticatorFunc maps a scheme name to a verifier; the only known scheme is derived from api.PortalTokenAuthScopes split on '.'.", + "example": "case strings.Split(string(api.PortalTokenAuthScopes), \".\")[0]: return a.verifyPortalToken" + }, + { + "name": "Subject stored under typed context key", + "description": "verifyPortalToken injects claims.Subject under AuthenticatorSubjectSessionKey; GetAuthenticatedSubject reads it (empty string = unauthenticated).", + "example": "r = r.WithContext(context.WithValue(r.Context(), AuthenticatorSubjectSessionKey, claims.Subject))" + }, + { + "name": "Meter-slug scoping enforced at middleware", + "description": "verifyPortalToken reads chi URLParam \"meterSlug\" and rejects when claims.AllowedMeterSlugs is non-empty and does not contain it.", + "example": "if len(claims.AllowedMeterSlugs) != 0 && !slices.Contains(claims.AllowedMeterSlugs, meterSlug) { return r, errors.New(\"meter slug not allowed\") }" + }, + { + "name": "Problem-JSON error responses", + "description": "Auth failures respond 401, internal failures 500 via models.NewStatusProblem(...).Respond(w); internal errors also go through errorHandler.HandleContext.", + "example": "models.NewStatusProblem(r.Context(), err, http.StatusUnauthorized).Respond(w)" + } + ], + "key_file_guides": [ + { + "file": "authenticator.go", + "role": "Whole package: Authenticator struct (portal.Service + errorsx.Handler), NewAuthenticator, NewAuthenticatorMiddlewareFunc(swagger), verifyPortalToken, and the typed context-key helpers.", + "watch_for": "verifyPortalToken double-checks expiry/subject even though adapter.Validate already enforces them \u2014 keep both. Bearer header must be exactly two space-split parts with 'Bearer' prefix. Unknown security scheme names yield a 500 internal error, not a 401." + } + ], + "anti_patterns": [ + "Bypassing OpenAPI security requirements (hardcoding auth on/off) instead of letting getSecurityRequirements drive it.", + "Reading the subject from anywhere but GetAuthenticatedSubject / AuthenticatorSubjectSessionKey.", + "Returning the request unwrapped after a successful auth (must carry the subject in context via r.WithContext).", + "Treating an empty subject as authenticated \u2014 GetAuthenticatedSubject returns false for empty strings." + ], + "decisions": [ + { + "decision": "Authentication is generic over OpenAPI 3 security requirements rather than hardcoded per route.", + "rationale": "The generated swagger doc is the single source of truth for which endpoints require which scheme, so middleware reflects spec changes automatically." + }, + { + "decision": "Verifier resolves schemes by name from api.PortalTokenAuthScopes.", + "rationale": "Keeps the middleware aligned with generated API scope constants instead of literal scheme strings." + } + ], + "code_examples": [ + { + "scenario": "Verify a portal Bearer token and inject the subject", + "code": "claims, err := a.portal.Validate(r.Context(), bearerToken)\nif err != nil { return r, fmt.Errorf(\"invalid token: %w\", err) }\nif claims.Subject == \"\" { return r, errors.New(\"invalid subject\") }\nif len(claims.AllowedMeterSlugs) != 0 && !slices.Contains(claims.AllowedMeterSlugs, meterSlug) {\n return r, errors.New(\"meter slug not allowed\")\n}\nr = r.WithContext(context.WithValue(r.Context(), AuthenticatorSubjectSessionKey, claims.Subject))" + } + ] + }, + "openmeter/portal/httphandler": { + "purpose": "HTTP transport layer (package httpdriver) exposing portal token endpoints \u2014 create, list, invalidate \u2014 by wrapping portal.Service and meter.Service in the project's httptransport.Handler request/response pattern.", + "patterns": [ + { + "name": "httptransport three-function handler", + "description": "Each endpoint returns a typed handler built from a request decoder, business logic func, and response encoder, with WithOperationName set.", + "example": "httptransport.NewHandler(decode, exec, commonhttp.JSONResponseEncoderWithStatus[CreateTokenResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"createPortalToken\"))...)" + }, + { + "name": "Handler interface composition", + "description": "handler implements TokenHandler (CreateToken/ListTokens/InvalidateToken) with `var _ Handler = (*handler)(nil)`; constructed via New(namespaceDecoder, portalService, meterService, options...).", + "example": "type Handler interface { TokenHandler }" + }, + { + "name": "Namespace resolved from decoder", + "description": "Every handler calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace; missing namespace is a 500.", + "example": "ns, err := h.resolveNamespace(ctx); if err != nil { return ListTokensRequest{}, err }" + }, + { + "name": "Type aliases for request/response/handler", + "description": "Each endpoint declares aliases (e.g. CreateTokenRequest = portal.CreateTokenInput, CreateTokenResponse = *api.PortalToken) tying transport types to domain/API types.", + "example": "type CreateTokenHandler httptransport.Handler[CreateTokenRequest, CreateTokenResponse]" + }, + { + "name": "Centralized API mapping", + "description": "mapping.go toAPIPortalToken converts portal.PortalToken -> api.PortalToken and deliberately omits Token; CreateToken re-attaches token.Token after mapping.", + "example": "portalToken := toAPIPortalToken(token); portalToken.Token = token.Token" + }, + { + "name": "Meter-slug validation before token creation", + "description": "CreateToken validates every AllowedMeterSlug exists via meterService.ListMeters (filter.FilterString{In:...}) returning meter.NewMeterNotFoundError on miss.", + "example": "if _, ok := metersBySlug[slug]; !ok { return nil, meter.NewMeterNotFoundError(slug) }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/TokenHandler interfaces, handler struct (namespaceDecoder, options, portalService, meterService), New() constructor, resolveNamespace helper.", + "watch_for": "Package is named httpdriver despite the folder being httphandler \u2014 match the package name. resolveNamespace returns a 500 (commonhttp.NewHTTPError) not 400 when namespace missing." + }, + { + "file": "portal.go", + "role": "CreateToken/ListTokens/InvalidateToken handlers with their request/response type aliases and operation names.", + "watch_for": "CreateToken still returns http.StatusOK (TODO says should be 201). ListTokens hardcodes page 1 with default pageSize 25. InvalidateToken uses EmptyResponseEncoder with 204. Empty (but non-nil) AllowedMeterSlugs array is a validation error." + }, + { + "file": "mapping.go", + "role": "toAPIPortalToken domain->API mapper; sets Expired=true when ExpiresAt is in the past.", + "watch_for": "Never map Token here \u2014 it is a security risk; only CreateToken sets it explicitly afterward." + } + ], + "anti_patterns": [ + "Mapping the raw token into the API response inside toAPIPortalToken (leaks the secret on list/get).", + "Skipping resolveNamespace / hardcoding a namespace instead of reading the namespace decoder.", + "Creating a token without validating AllowedMeterSlugs against meterService.ListMeters.", + "Writing inline JSON encoding instead of commonhttp encoders + httptransport handler wrappers.", + "Allowing an empty-but-present AllowedMeterSlugs array through to the service." + ], + "decisions": [ + { + "decision": "Token string is excluded from the standard mapper and only attached in CreateToken.", + "rationale": "The signed token is sensitive and must be returned exactly once at creation, never on list/invalidate responses." + }, + { + "decision": "Handlers depend on meter.Service in addition to portal.Service.", + "rationale": "AllowedMeterSlugs must reference real meters, so creation validates slugs against the meter catalog before issuing a token." + } + ], + "code_examples": [ + { + "scenario": "Validate meter slugs then create a token, attaching the secret once", + "code": "meterList, err := h.meterService.ListMeters(ctx, meter.ListMetersParams{\n Namespace: request.Namespace,\n Key: &filter.FilterString{In: request.AllowedMeterSlugs},\n})\nmetersBySlug := lo.KeyBy(meterList.Items, func(m meter.Meter) string { return m.Key })\nfor _, slug := range *request.AllowedMeterSlugs {\n if _, ok := metersBySlug[slug]; !ok { return nil, meter.NewMeterNotFoundError(slug) }\n}\ntoken, err := h.portalService.CreateToken(ctx, request)\nportalToken := toAPIPortalToken(token)\nportalToken.Token = token.Token" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w112.json b/.archie/enrichments/w112.json new file mode 100644 index 0000000000..ee0b502ee7 --- /dev/null +++ b/.archie/enrichments/w112.json @@ -0,0 +1,397 @@ +{ + "openmeter/productcatalog/adapter": { + "purpose": "Ent-backed persistence layer for the productcatalog feature domain. Implements feature.FeatureRepo (NewPostgresFeatureRepo) over openmeter/ent/db, translating feature domain types to/from the db.Feature entity.", + "patterns": [ + { + "name": "Repo constructor returns the domain interface", + "description": "NewPostgresFeatureRepo(db, logger) returns feature.FeatureRepo, not the concrete *featureDBAdapter. Wire other adapters the same way.", + "example": "func NewPostgresFeatureRepo(db *db.Client, logger *slog.Logger) feature.FeatureRepo" + }, + { + "name": "Entity->domain mapping via MapFeatureEntity", + "description": "All read paths end in MapFeatureEntity(*db.Feature) feature.Feature. Do not hand-build feature.Feature elsewhere in this package.", + "example": "return MapFeatureEntity(entity), nil" + }, + { + "name": "Re-fetch with WithMeter for MeterSlug backcompat", + "description": "When MeterID is set, re-query with WithMeter(Select(FieldID,FieldKey)) so MapFeatureEntity can populate the deprecated MeterSlug field.", + "example": ".WithMeter(func(mq *db.MeterQuery){ mq.Select(dbmeter.FieldID, dbmeter.FieldKey) })" + }, + { + "name": "Archive is soft + cross-aggregate guard", + "description": "ArchiveFeature sets ArchivedAt (no hard delete) and first checks Plan and Subscription references, returning feature.ForbiddenError if the feature is still in use.", + "example": "if planReferencesIt { return &feature.ForbiddenError{...} }" + }, + { + "name": "Filter helpers + pagination dual-mode", + "description": "List uses filter.ApplyToQuery for Key/Name/MeterIDs and supports both Page (Paginate) and legacy Limit/Offset; ArchivedAt filtering gated on IncludeArchived.", + "example": "query = filter.ApplyToQuery(query, params.Key, dbfeature.FieldKey)" + }, + { + "name": "UnitCost type-switch with explicit clears", + "description": "Create/Update map UnitCost by Type (Manual/LLM), and Update always clears the opposite type's columns so type switches persist cleanly.", + "example": "switch unitCost.Type { case feature.UnitCostTypeManual: query = query.ClearUnitCostLlm...().SetUnitCostType(...) }" + }, + { + "name": "Transactionality via entutils TxUser/TxCreator", + "description": "transaction.go implements Tx/WithTx/Self by hijacking the ent tx and rebuilding the repo from the raw tx config.", + "example": "func (e *featureDBAdapter) WithTx(ctx, tx) feature.FeatureRepo { txClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return NewPostgresFeatureRepo(txClient.Client(), e.logger) }" + } + ], + "key_file_guides": [ + { + "file": "feature.go", + "role": "featureDBAdapter implementing FeatureRepo CRUD/list and MapFeatureEntity mapping.", + "watch_for": "MeterSlug is deprecated/v1-only \u2014 only populated from the Meter edge; ArchiveFeature's plan/subscription guards (FIXME OM-1055) live in the DB layer intentionally." + }, + { + "file": "transaction.go", + "role": "TxCreator/TxUser implementation for FeatureRepo.", + "watch_for": "WithTx must rebuild via NewPostgresFeatureRepo so the new repo binds to the tx client; do not return the original receiver." + }, + { + "file": "feature_test.go", + "role": "Postgres-backed repo tests using testutils.InitPostgresDB and a serializing sync.Mutex.", + "watch_for": "Tests pre-create the Meter row to satisfy the FK; they run t.Parallel but lock a shared mutex." + } + ], + "anti_patterns": [ + "Constructing feature.Feature manually in read paths instead of calling MapFeatureEntity", + "Setting UnitCost columns without clearing the opposite cost type on Update (stale LLM/manual fields survive)", + "Hard-deleting features instead of setting ArchivedAt", + "Skipping the WithMeter re-fetch and leaving MeterSlug empty for v1 consumers" + ], + "decisions": [ + { + "decision": "Cross-aggregate plan/subscription reference checks live inside the DB adapter", + "rationale": "FIXME OM-1055 notes features are referenced by ID with no versioning, so the guard sits at the persistence boundary until productcatalog/plan and feature are unified." + }, + { + "decision": "Keep MeterSlug derived from the Meter edge", + "rationale": "v1 API backward compatibility; MeterID is the source of truth going forward." + } + ], + "code_examples": [ + { + "scenario": "Constructing the Postgres feature repository", + "code": "import (\n \"github.com/openmeterio/openmeter/openmeter/ent/db\"\n \"github.com/openmeterio/openmeter/openmeter/productcatalog/adapter\"\n)\n\nrepo := adapter.NewPostgresFeatureRepo(dbClient, logger) // returns feature.FeatureRepo" + } + ] + }, + "openmeter/productcatalog/driver": { + "purpose": "HTTP transport layer (package productcatalogdriver) for the feature API. Wires feature.FeatureConnector + meter/llmcost services into httptransport handlers and maps between api.* and feature.* types.", + "patterns": [ + { + "name": "Handler interface + handlers struct", + "description": "FeatureHandler exposes Get/Create/List/DeleteFeature; featureHandlers holds connector, namespaceDecoder, meterService, llmcostService. New handlers go through NewFeatureHandler.", + "example": "func NewFeatureHandler(connector feature.FeatureConnector, namespaceDecoder, meterService, llmcostService, options...) FeatureHandler" + }, + { + "name": "httptransport three-stage handlers", + "description": "Each endpoint is NewHandler/NewHandlerWithArgs(decodeRequest, businessLogic, responseEncoder, options...) with WithOperationName and an error encoder.", + "example": "httptransport.NewHandlerWithArgs(decode, exec, commonhttp.JSONResponseEncoder, ...WithOperationName(\"getFeature\"))" + }, + { + "name": "Namespace resolution from context", + "description": "Every decode step calls h.resolveNamespace(ctx) via namespaceDecoder.GetNamespace; missing namespace is a 500.", + "example": "ns, err := h.resolveNamespace(ctx)" + }, + { + "name": "Centralized error encoder", + "description": "getErrorEncoder() in errors.go maps each feature.*Error / meter error to an HTTP status via commonhttp.HandleErrorIfTypeMatches; attach it with WithErrorEncoder.", + "example": "HandleErrorIfTypeMatches[*feature.FeatureNotFoundError](ctx, http.StatusNotFound, err, w)" + }, + { + "name": "API<->domain mapping in parser.go", + "description": "MapFeatureToResponse, MapFeatureCreateInputsRequest, and domainUnitCostToAPI/apiUnitCostToDomain own all api.Feature translation; handlers call these, not inline conversions.", + "example": "resp, err := MapFeatureToResponse(*feat)" + }, + { + "name": "MeterSlug resolved to MeterID at the boundary", + "description": "CreateFeature decode resolves parsedBody.MeterSlug via meterService.GetMeterByIDOrSlug into a meterID before building inputs.", + "example": "m, err := h.meterService.GetMeterByIDOrSlug(ctx, meter.GetMeterInput{Namespace: ns, IDOrSlug: *parsedBody.MeterSlug})" + }, + { + "name": "List dual-shape response", + "description": "ListFeatures returns commonhttp.Union of []api.Feature (legacy) vs pagination.Result; selection driven by params.Page.IsZero().", + "example": "if params.Page.IsZero() { response.Option1 = &mapped } else { response.Option2 = ... }" + } + ], + "key_file_guides": [ + { + "file": "feature.go", + "role": "FeatureHandler interface, featureHandlers, and all four endpoint definitions.", + "watch_for": "DeleteFeature uses operation.AsNoResponseOperation(connector.ArchiveFeature); LLM pricing enrichment only runs when UnitCost.Type==LLM and llmcostService!=nil; list rejects PageSize>1000." + }, + { + "file": "parser.go", + "role": "api<->feature mapping (response + create inputs + unit cost).", + "watch_for": "AdvancedMeterGroupByFilters takes precedence over legacy MeterGroupByFilters; unit cost conversion returns errors that must propagate." + }, + { + "file": "errors.go", + "role": "getErrorEncoder mapping domain errors to HTTP status codes.", + "watch_for": "Add new feature error types here or they fall through to a generic 500." + } + ], + "anti_patterns": [ + "Building api.Feature inline instead of MapFeatureToResponse / parser.go helpers", + "Reading the namespace directly instead of resolveNamespace(ctx)", + "Adding endpoints without WithOperationName or without registering errors in getErrorEncoder", + "Passing meter slug through to the connector instead of resolving it to a meter ID first" + ], + "decisions": [ + { + "decision": "Package is named productcatalogdriver, not driver", + "rationale": "Avoids collisions and matches the project's *driver HTTP-layer naming convention." + }, + { + "decision": "List endpoint returns a Union of slice vs paginated result", + "rationale": "Preserves the legacy un-paginated v1 response shape while supporting page-based pagination." + } + ], + "code_examples": [ + { + "scenario": "Defining an httptransport handler with namespace + error encoder", + "code": "func (h *featureHandlers) GetFeature() GetFeatureHandler {\n return httptransport.NewHandlerWithArgs(\n func(ctx context.Context, r *http.Request, featureID string) (models.NamespacedID, error) {\n ns, err := h.resolveNamespace(ctx)\n if err != nil { return models.NamespacedID{}, err }\n return models.NamespacedID{Namespace: ns, ID: featureID}, nil\n },\n func(ctx context.Context, id models.NamespacedID) (api.Feature, error) {\n feat, err := h.connector.GetFeature(ctx, id.Namespace, id.ID, feature.IncludeArchivedFeatureFalse)\n if err != nil { return api.Feature{}, err }\n return MapFeatureToResponse(*feat)\n },\n commonhttp.JSONResponseEncoder,\n httptransport.AppendOptions(h.options, httptransport.WithErrorEncoder(getErrorEncoder()), httptransport.WithOperationName(\"getFeature\"))...,\n )\n}" + } + ] + }, + "openmeter/productcatalog/feature": { + "purpose": "Core feature domain: the Feature aggregate plus FeatureConnector (business logic) and FeatureRepo (persistence contract). Highest-fanin sub-package \u2014 billing, entitlement, subscription, and notification all depend on it.", + "patterns": [ + { + "name": "Connector validates, repo persists", + "description": "featureConnector wraps FeatureRepo + meterService + eventbus.Publisher. All validation (meter aggregation, unit cost, key-not-ULID, key uniqueness) happens in the connector before calling featureRepo.", + "example": "func NewFeatureConnector(featureRepo FeatureRepo, meterService meterpkg.Service, publisher eventbus.Publisher) FeatureConnector" + }, + { + "name": "Publish domain event after every mutation", + "description": "Create/Update/Archive publish NewFeatureCreateEvent/UpdateEvent/ArchiveEvent via publisher.Publish; event names live in event.go (feature.created/updated/archived, v1).", + "example": "c.publisher.Publish(ctx, NewFeatureCreateEvent(ctx, &createdFeature))" + }, + { + "name": "Validate() collects errors via NewNillableGenericValidationError", + "description": "Input structs (UpdateFeatureInputs, ListFeaturesParams, ArchiveFeatureInput, FeatureOrderBy) gather into []error and return models.NewNillableGenericValidationError(errors.Join(...)).", + "example": "return models.NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "Typed domain errors", + "description": "feature.go defines FeatureNotFoundError, FeatureWithNameAlreadyExistsError, FeatureInvalidMeterAggregationError, FeatureInvalidFiltersError, ForbiddenError \u2014 return these (HTTP layer maps them).", + "example": "return Feature{}, &FeatureWithNameAlreadyExistsError{Name: feature.Key, ID: found.ID}" + }, + { + "name": "Latest-by-key feature resolution", + "description": "ResolveFeatureMeters/getLastFeatures resolve a key to the latest (preferring unarchived, else most-recently-archived) feature while keeping explicit IDs addressable; uses the lastEntityAccessor[Feature] abstraction.", + "example": "func getLastFeatures(features []Feature) map[string]Feature { return getLastEntity(features, featureAccessor{}) }" + }, + { + "name": "UnitCost is a typed sum (manual | llm) with two-stage validation", + "description": "UnitCost.Validate() enforces type/field exclusivity; ValidateWithMeter(meter) additionally checks LLM property names exist in meter.GroupBy. LLM cost requires an associated meter.", + "example": "if err := feature.UnitCost.ValidateWithMeter(*resolvedMeter); err != nil { ... }" + }, + { + "name": "MeterGroupByFilters legacy<->filter conversions", + "description": "ConvertMapStringToMeterGroupByFilters / ConvertMeterGroupByFiltersToMapString bridge the legacy map[string]string and filter.FilterString forms; the latter returns nil unless all filters are pure Eq.", + "example": "result[k] = filter.FilterString{Eq: &v}" + } + ], + "key_file_guides": [ + { + "file": "connector.go", + "role": "FeatureConnector interface + featureConnector business logic and input/param structs.", + "watch_for": "TODO marks this for migration to the service pattern; CreateFeature normalizes MeterID via the meter service and rejects ULID-shaped keys; validMeterAggregations whitelist gates feature creation." + }, + { + "file": "feature.go", + "role": "Feature aggregate, Validate(), typed errors, MeterGroupByFilters.", + "watch_for": "MeterSlug is deprecated (v1 only) \u2014 prefer MeterID; Feature.Validate requires CreatedAt/UpdatedAt non-zero." + }, + { + "file": "repository.go", + "role": "FeatureRepo interface incl. entutils.TxCreator/TxUser.", + "watch_for": "Adding a repo method requires implementing it in productcatalog/adapter and keeping it tx-aware." + }, + { + "file": "unitcost.go", + "role": "UnitCost/ManualUnitCost/LLMUnitCost types, Validate, ValidateWithMeter, LLMTokenType enum.", + "watch_for": "Each LLM dimension is exactly-one-of property-or-static-value (mutually exclusive); token_type must be in the valid set (input/output/cache_read/cache_write/reasoning/request/response)." + }, + { + "file": "featuremeter.go", + "role": "FeatureMeter/FeatureMeters collection + ResolveFeatureMeters (latest-by-key resolution joined with meters).", + "watch_for": "Resolution lists with IncludeArchived=true then picks the latest; requireMeter=true errors if a feature has no meter." + }, + { + "file": "event.go", + "role": "feature.created/updated/archived events with EventName/EventMetadata/Validate.", + "watch_for": "ArchiveEvent.Validate requires ArchivedAt set; EventMetadata.Time differs per event (CreatedAt/UpdatedAt/ArchivedAt)." + } + ], + "anti_patterns": [ + "Mutating features through FeatureRepo directly, bypassing the connector's validation and event publishing", + "Returning generic errors where a typed feature.*Error exists (breaks HTTP status mapping)", + "Allowing a ULID-shaped feature Key (explicitly rejected to keep ID/key slots distinguishable)", + "Configuring LLM UnitCost without an associated meter or with both property and static value set", + "Treating MeterSlug as authoritative instead of MeterID" + ], + "decisions": [ + { + "decision": "Features are archived (ArchivedAt), never versioned or hard-deleted", + "rationale": "Features are referenced by ID with no publish-new-version action, so active plan/subscription references brick changes either way; archiving keeps history addressable by ID while key resolves to latest." + }, + { + "decision": "Key resolution prefers unarchived then most-recently-archived", + "rationale": "Lets callers reference a feature by stable key while old versions stay reachable by explicit ID (see featuremeter_test cases)." + }, + { + "decision": "FeatureConnector kept as a connector, not yet a service", + "rationale": "Explicit TODO to refactor to the standard service pattern; new code should not entrench the connector shape further." + } + ], + "code_examples": [ + { + "scenario": "Validating and creating a feature with event publication", + "code": "// in featureConnector.CreateFeature\nif _, err := ulid.Parse(feature.Key); err == nil {\n return Feature{}, models.NewGenericValidationError(fmt.Errorf(\"Feature key cannot be a valid ULID\"))\n}\ncreatedFeature, err := c.featureRepo.CreateFeature(ctx, feature)\nif err != nil { return Feature{}, err }\nif err := c.publisher.Publish(ctx, NewFeatureCreateEvent(ctx, &createdFeature)); err != nil {\n return createdFeature, fmt.Errorf(\"failed to publish feature created event: %w\", err)\n}" + } + ] + }, + "openmeter/productcatalog/featureresolver": { + "purpose": "Thin resolution layer implementing productcatalog.FeatureResolver over feature.FeatureConnector. Resolves rate-card feature ID/key references to concrete features and back-fills resolved IDs onto rate cards.", + "patterns": [ + { + "name": "Constructor returns the productcatalog interface", + "description": "New(service feature.FeatureConnector) returns productcatalog.FeatureResolver; nil service is an error.", + "example": "func New(service feature.FeatureConnector) (productcatalog.FeatureResolver, error)" + }, + { + "name": "Namespaced wrapper over namespace-explicit core", + "description": "resolver.WithNamespace returns namespacedResolver that forwards to resolver.Resolve/BatchResolve with the bound namespace; core methods always take namespace explicitly.", + "example": "func (r *resolver) WithNamespace(ns string) productcatalog.NamespacedFeatureResolver" + }, + { + "name": "BatchResolve via pagination.CollectAll", + "description": "BatchResolve pages through ListFeatures (IncludeArchived=false) with pagination.NewPaginator/CollectAll and returns a map keyed by both ID and Key, nil for misses.", + "example": "pagination.CollectAll(ctx, pagination.NewPaginator(func(ctx, page){ return r.service.ListFeatures(ctx, feature.ListFeaturesParams{IDsOrKeys: idsOrKeys, ...}) }), min(len(idsOrKeys), 100))" + }, + { + "name": "Resolve enforces ID/key slot correctness", + "description": "Resolve returns GenericNotFoundError for misses and GenericConflictError when a value resolves to a feature whose ID/Key doesn't match the requested slot (id-is-actually-a-key etc.).", + "example": "if f.ID != *id { return nil, models.NewGenericConflictError(...) }" + }, + { + "name": "ResolveFeaturesForRateCards mutates in place with field-prefixed errors", + "description": "Iterates *RateCards, BatchResolves all feature IDs+keys, then rc.SetFeature(&f.ID, &f.Key); collects models.ErrorWithFieldPrefix(ratecards[key]) into a NillableGenericValidationError.", + "example": "rc.SetFeature(&(f).ID, &(f).Key)" + } + ], + "key_file_guides": [ + { + "file": "resolver.go", + "role": "resolver/namespacedResolver implementing FeatureResolver/NamespacedFeatureResolver.", + "watch_for": "Header note says this should live under feature/ after refactor; Resolve distinguishes NotFound vs Conflict \u2014 preserve both error types." + }, + { + "file": "ratecard.go", + "role": "ResolveFeaturesForRateCards: batch-resolve and back-fill feature refs on rate cards.", + "watch_for": "Uses productcatalog.ErrRateCardFeatureNotFound / ErrRateCardFeatureMismatch; skips rate cards without HasFeature(); errors carry the ratecard.key field selector." + }, + { + "file": "ratecard_test.go", + "role": "DB-backed tests via pctestutils.NewTestEnv covering success/not-found/mismatch/wrong-slot.", + "watch_for": "Exercises the id-in-key-slot and key-in-id-slot mismatch cases \u2014 keep those guards intact." + } + ], + "anti_patterns": [ + "Reimplementing feature lookup against the repo instead of going through FeatureResolver", + "Collapsing NotFound and Conflict into one error (tests assert each distinctly)", + "Resolving rate cards that lack a feature (must skip when !rc.HasFeature())", + "Dropping the field-prefix on rate-card resolution errors (callers rely on ratecard.key context)" + ], + "decisions": [ + { + "decision": "Resolver lives outside the feature package", + "rationale": "Explicit NOTE: should move under feature/ post-refactor; kept separate to avoid the connector's pending service migration." + }, + { + "decision": "BatchResolve keys results by both ID and key", + "rationale": "Callers (rate cards) reference features by either slot, and a single map lets the caller look up whichever it holds." + } + ], + "code_examples": [ + { + "scenario": "Resolving and back-filling features onto rate cards", + "code": "resolver, _ := featureresolver.New(featureConnector)\nif err := featureresolver.ResolveFeaturesForRateCards(ctx, resolver, namespace, rateCards); err != nil {\n return err // NillableGenericValidationError wrapping ErrRateCardFeatureNotFound/Mismatch\n}" + } + ] + }, + "openmeter/productcatalog/http": { + "purpose": "Shared API<->domain mapping (package http) for productcatalog value types \u2014 rate cards, prices, entitlement templates, tax config, discounts. Reused by plan, addon, planaddon, subscription, and billing HTTP drivers.", + "patterns": [ + { + "name": "FromX / AsX mapping convention", + "description": "FromRateCard/FromTaxConfig/FromEntitlementTemplate map domain->api; AsRateCard/AsFlatFeeRateCard/AsUsageBasedRateCard/AsTaxConfig map api->domain. Follow this naming for new conversions.", + "example": "func FromRateCard(r productcatalog.RateCard) (api.RateCard, error)" + }, + { + "name": "Discriminator-driven union mapping", + "description": "Mapping branches on r.Type()/r.Discriminator() (FlatFeeRateCardType, UsageBasedRateCardType) and price.Type() (Flat/Unit/Tiered/Dynamic/Package), using oapi-codegen FromX setters on the union.", + "example": "switch price.Type() { case productcatalog.TieredPriceType: ... resp.FromTieredPriceWithCommitments(...) }" + }, + { + "name": "Decimal and ISO-duration string conversion", + "description": "Amounts cross the boundary as strings (alpacadecimal .String() / decimal.NewFromString); billing cadences as datetime.ISODurationString parsed via Parse/ParsePtrOrNil.", + "example": "rc.BillingCadence, err = datetime.ISODurationString(usage.BillingCadence).Parse()" + }, + { + "name": "ValidationIssue error encoder per ResourceKind", + "description": "ValidationErrorEncoder(kind) extracts models.AsValidationIssues and emits a validationError with a validationErrors extension; resource.go defines ResourceKind constants (plan, add-on).", + "example": "http.ValidationErrorEncoder(http.ResourceKindPlan)" + }, + { + "name": "Wrap every cast failure with context", + "description": "Conversions return fmt.Errorf(\"failed to cast X: %w\", err); never swallow union-cast errors.", + "example": "return resp, fmt.Errorf(\"failed to cast FlatPrice: %w\", err)" + } + ], + "key_file_guides": [ + { + "file": "mapping.go", + "role": "All rate-card / price / entitlement-template / tax / discount conversions in both directions.", + "watch_for": "UsageBasedRateCard requires a non-nil billing cadence (errors otherwise); DynamicPrice omits Multiplier when equal to DynamicPriceDefaultMultiplier; entitlement template mapping switches on entitlement.EntitlementType*." + }, + { + "file": "errors.go", + "role": "ValidationErrorEncoder + validationError carrying ResourceKind and ValidationIssues.", + "watch_for": "Only fires when models.AsValidationIssues yields issues; returns false (passes through) otherwise." + }, + { + "file": "resource.go", + "role": "ResourceKind enum (plan, add-on) used to label validation errors.", + "watch_for": "Add a kind here before referencing it in a new driver's ValidationErrorEncoder." + } + ], + "anti_patterns": [ + "Passing decimals or durations as floats/raw numbers instead of strings across the API boundary", + "Skipping the discriminator switch and casting a union to the wrong concrete type", + "Swallowing oapi-codegen FromX/AsX cast errors instead of wrapping with context", + "Emitting a 0/empty billing cadence for a UsageBasedRateCard" + ], + "decisions": [ + { + "decision": "Shared mapping lives in one http package consumed by many drivers", + "rationale": "Plan/addon/planaddon/subscription/billing all serialize the same rate-card and price unions, so conversion is centralized to stay consistent." + }, + { + "decision": "Validation surfaces as a typed validationError with a validationErrors extension", + "rationale": "Lets the HTTP layer return structured per-field issues (models.ValidationIssues) with a stable resource label." + } + ], + "code_examples": [ + { + "scenario": "Wiring a resource validation error encoder", + "code": "import pchttp \"github.com/openmeterio/openmeter/openmeter/productcatalog/http\"\n\nhttptransport.WithErrorEncoder(\n pchttp.ValidationErrorEncoder(pchttp.ResourceKindPlan),\n)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w113.json b/.archie/enrichments/w113.json new file mode 100644 index 0000000000..63b7a9fe8a --- /dev/null +++ b/.archie/enrichments/w113.json @@ -0,0 +1,92 @@ +{ + "openmeter/productcatalog/testutils": { + "purpose": "Shared test fixtures and an in-process TestEnv harness for the product catalog domain. Provides factory functions (NewTestPlan, NewTestAddon, NewTestFeature, NewTestMeters) and a fully wired TestEnv that boots feature/plan/addon/planaddon/taxcode services against a real Postgres instance for integration tests.", + "patterns": [ + { + "name": "Factory returns Create*Input, not the aggregate", + "description": "Test factories return the service's input struct (e.g. plan.CreatePlanInput, addon.CreateAddonInput, feature.CreateFeatureInputs) so tests drive the real service.Create path rather than fabricating domain objects.", + "example": "func NewTestPlan(t, namespace, transformers...) plan.CreatePlanInput" + }, + { + "name": "Functional-option transformers via generics", + "description": "Mutation of fixtures uses TransformerFunc[T any] = func(*testing.T, *T) applied in a loop at the end of the factory. Add new knobs as WithX helpers returning TransformerFunc[productcatalog.Plan], never by adding bool/param args.", + "example": "WithPlanPhases(phases...), WithPlanKey(key); applied as `for _, tr := range transformers { tr(t, &input.Plan) }`" + }, + { + "name": "t.Helper() in every factory", + "description": "Every exported factory and transformer calls t.Helper() as its first statement so failures point at the test, not the fixture.", + "example": "func NewTestFeature(t *testing.T, namespace string) ... { t.Helper(); ... }" + }, + { + "name": "TestEnv wires real adapters+services, not mocks", + "description": "NewTestEnv constructs concrete Postgres adapters (productcatalogadapter.NewPostgresFeatureRepo, planadapter.New, addonadapter.New, planaddonadapter.New, taxcodeadapter.New) and real services, plus eventbus.NewMock(t) publisher and meteradapter (mock) \u2014 the underlying-constructor approach mandated by AGENTS.md (no app/common wiring).", + "example": "featureService := feature.NewFeatureConnector(featureAdapter, meterAdapter, publisher)" + }, + { + "name": "Postgres-backed env with idempotent teardown", + "description": "DB comes from testutils.InitPostgresDB(t); Close uses sync.Once and closes EntDriver, PGDriver, and Client. DBSchemaMigrate runs Schema.Create on demand.", + "example": "e.close.Do(func() { e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })" + }, + { + "name": "ULID for all generated test IDs and namespaces", + "description": "NewTestULID is the single ID source; NewTestNamespace is an alias of it. Never hardcode IDs/namespaces \u2014 pass a fresh ULID per test for isolation.", + "example": "var NewTestNamespace = NewTestULID" + } + ], + "key_file_guides": [ + { + "file": "env.go", + "role": "Defines TestEnv struct and NewTestEnv \u2014 the integration harness exposing Feature/Plan/Addon/PlanAddon services + repositories.", + "watch_for": "Service wiring order matters: featureResolver wraps featureService and feeds both plan and addon services; planaddon depends on both plan and addon services. Uses context.Background() in DBSchemaMigrate/Close (harness lifecycle, predates t.Context())." + }, + { + "file": "plan.go", + "role": "NewTestPlan factory plus TransformerFunc/WithPlanPhases/WithPlanKey options and MonthPeriod constant.", + "watch_for": "Default plan ships a single 'free' phase with a FlatFeeRateCard at amount 0, InArrears term, Stripe tax code txcd_10000000, ProRating enabled (ProratePrices), CreditThenInvoiceSettlementMode. Override via transformers, not by editing the literal." + }, + { + "file": "addon.go", + "role": "NewTestAddon \u2014 builds addon.CreateAddonInput with AddonInstanceTypeSingle, USD currency, variadic RateCards.", + "watch_for": "Key/Name are fixed 'test-addon'; for multiple addons in one namespace you must vary them yourself." + }, + { + "file": "feature.go", + "role": "NewTestFeature (bare feature) and NewTestFeatureFromMeter (derives key/name/groupby from a meter.Meter).", + "watch_for": "NewTestFeatureFromMeter uses feature.ConvertMapStringToMeterGroupByFilters and lo.ToPtr(meter.ID) \u2014 keep in sync with feature input shape." + }, + { + "file": "meters.go", + "role": "NewTestMeters \u2014 three canonical meters (count/api_requests, sum/tokens, sum/workload duration).", + "watch_for": "Each meter gets a fresh NewTestULID ID; ValueProperty is set only on sum meters." + }, + { + "file": "namespace.go", + "role": "NewTestULID and the NewTestNamespace alias.", + "watch_for": "Uses ulid.MustNew with crypto/rand \u2014 generation can theoretically fail under entropy starvation but is treated as test-only." + } + ], + "anti_patterns": [ + "Importing app/common or the DI/wiring layer to build TestEnv \u2014 must construct adapters/services from their package constructors to avoid import cycles.", + "Adding boolean/positional parameters to factories instead of new WithX transformer options.", + "Returning a fully-built productcatalog aggregate from a factory instead of the service Create*Input.", + "Hardcoding IDs or namespaces instead of using NewTestULID/NewTestNamespace, breaking per-test isolation.", + "Swapping concrete Postgres adapters for mocks in NewTestEnv \u2014 these are integration fixtures expecting a real DB." + ], + "decisions": [ + { + "decision": "TestEnv composes real Postgres adapters + real services with only the meter adapter and event publisher mocked.", + "rationale": "Catalog tests exercise the genuine persistence and cross-service (plan\u2194addon\u2194planaddon\u2194feature) paths; mocking would hide adapter and SQL behavior." + }, + { + "decision": "Generic TransformerFunc[T] option pattern over per-field setters.", + "rationale": "Keeps factories a single source of sane defaults while letting each test override only what it cares about, without combinatorial parameter lists." + } + ], + "code_examples": [ + { + "scenario": "Customize a test plan with extra phases in an integration test", + "code": "env := testutils.NewTestEnv(t)\ndefer env.Close(t)\nenv.DBSchemaMigrate(t)\nns := testutils.NewTestNamespace(t)\ninput := testutils.NewTestPlan(t, ns,\n testutils.WithPlanKey(\"pro\"),\n testutils.WithPlanPhases(phase1, phase2),\n)\np, err := env.Plan.CreatePlan(t.Context(), input)\nrequire.NoError(t, err)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w114.json b/.archie/enrichments/w114.json new file mode 100644 index 0000000000..4a23f2c253 --- /dev/null +++ b/.archie/enrichments/w114.json @@ -0,0 +1,256 @@ +{ + "openmeter/productcatalog/addon/adapter": { + "purpose": "Ent-backed persistence layer for product-catalog add-ons, implementing the addon.Repository interface. Owns all SQL queries, eager-loading, and bidirectional mapping between Ent rows and domain addon types.", + "patterns": [ + { + "name": "Config-validated constructor returning the domain interface", + "description": "New(Config) validates Client+Logger via Config.Validate() (collects errs, errors.Join) and returns addon.Repository, not *adapter. Compile-time asserts: var _ models.Validator = (*Config)(nil) and var _ addon.Repository = (*adapter)(nil).", + "example": "func New(config Config) (addon.Repository, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Transaction-aware repo methods via entutils.TransactingRepo", + "description": "Every Repository method wraps its body in a closure `fn(ctx, a *adapter)` passed to entutils.TransactingRepo[T, *adapter](ctx, a, fn). The adapter implements Tx/WithTx/Self so it rebinds to the tx client carried in ctx.", + "example": "return entutils.TransactingRepo[*addon.Addon, *adapter](ctx, a, fn)" + }, + { + "name": "Validate params first inside fn", + "description": "Each closure begins with `if err := params.Validate(); err != nil { return ..., fmt.Errorf(\"invalid ... parameters: %w\", err) }` before touching the DB.", + "example": "if err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid create add-on parameters: %w\", err) }" + }, + { + "name": "Ent predicate filters via package aliases + filter.ApplyToQuery", + "description": "Queries use addondb/addonratecarddb/planaddondb aliases for typed predicates and pkg/filter ApplyToQuery for FilterString/FilterULID fields (ID, Key, Name, Currency). Status filters are hand-built EffectiveFrom/EffectiveTo predicate sets.", + "example": "query = filter.ApplyToQuery(query, params.Key, addondb.FieldKey)" + }, + { + "name": "FromXRow mappers + asAddonRateCardRow", + "description": "DB\u2192domain via FromAddonRow/FromAddonRateCardRow/FromPlanAddonRow/FromPlanRow/FromPlanPhaseRow/FromPlanRateCardRow in mapping.go; domain\u2192DB via asAddonRateCardRow. RateCard.Type switches on FlatFeeRateCardType vs UsageBasedRateCardType.", + "example": "add, err := FromAddonRow(*addonRow)" + }, + { + "name": "Soft-delete and refetch-after-write", + "description": "DeleteAddon sets DeletedAt (no hard delete) and list/get exclude DeletedAtIsNil unless IncludeDeleted. Create/Update refetch with WithRatecards(AddonEagerLoadRateCardsFn) to populate subresources before mapping.", + "example": "SetDeletedAt(deletedAt); query = query.Where(addondb.DeletedAtIsNil())" + }, + { + "name": "Ratecards replaced wholesale, not patched", + "description": "UpdateAddon deletes all AddonRateCard rows for the addon then bulk-recreates via rateCardBulkCreate when params.RateCards != nil; if nil, ratecards are left untouched.", + "example": "a.db.AddonRateCard.Delete().Where(addonratecarddb.AddonID(add.ID)).Exec(ctx)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor and adapter struct with Tx/WithTx/Self plumbing for transaction.Driver.", + "watch_for": "WithTx must rebuild via entdb.NewTxClientFromRawConfig; never share the base *entdb.Client across tx boundaries." + }, + { + "file": "addon.go", + "role": "Repository CRUD: ListAddons, CreateAddon, GetAddon, UpdateAddon, DeleteAddon plus eager-load funcs AddonEagerLoadRateCardsFn and addonEagerLoadActivePlans.", + "watch_for": "GetAddon-by-key uses raw sql.Selector MAX(version) subquery for IncludeLatest; status predicates rely on clock.Now() so freeze time in tests. AddonStatusInvalid means EffectiveTo < EffectiveFrom." + }, + { + "file": "mapping.go", + "role": "Row<->domain mappers including tax-code backfill (BackfillTaxConfig) and feature-key workaround when only FeatureID is set.", + "watch_for": "FromAddonRateCardRow needs Edges.FeaturesOrErr/TaxCodeOrErr eagerly loaded or it errors; asAddonRateCardRow requires a known RateCard type (Flat/UsageBased) else returns error." + }, + { + "file": "adapter_test.go", + "role": "Postgres integration test (TestPostgresAdapter) driving CRUD + status-filter scenarios through pctestutils.NewTestEnv.", + "watch_for": "Uses clock.SetTime/ResetTime for status assertions; requires Postgres (POSTGRES_HOST)." + } + ], + "anti_patterns": [ + "Calling a.db directly outside a TransactingRepo closure, bypassing tx rebinding in ctx.", + "Hard-deleting addon rows instead of SetDeletedAt soft delete.", + "Mapping a ratecard row without eager-loading its Features/TaxCode edges (FromAddonRateCardRow will error).", + "Returning *adapter from New instead of addon.Repository.", + "Patching individual ratecards on update instead of delete-all + bulk recreate." + ], + "decisions": [ + { + "decision": "Ratecards are eager-loaded via shared AddonEagerLoadRateCardsFn on every read path.", + "rationale": "Domain Addon is incomplete without ratecards; centralizing the eager-load predicate keeps deleted-ratecard filtering consistent." + }, + { + "decision": "Versioning by (namespace, key, version) with a MAX(version) subquery for latest.", + "rationale": "Add-ons are immutable versions; latest-by-key lookups must resolve the highest version atomically in SQL." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware repository method skeleton", + "code": "func (a *adapter) GetAddon(ctx context.Context, params addon.GetAddonInput) (*addon.Addon, error) {\n\tfn := func(ctx context.Context, a *adapter) (*addon.Addon, error) {\n\t\tif err := params.Validate(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid get add-on parameters: %w\", err)\n\t\t}\n\t\taddonRow, err := a.db.Addon.Query().\n\t\t\tWhere(addondb.And(addondb.Namespace(params.Namespace), addondb.ID(params.ID))).\n\t\t\tWithRatecards(AddonEagerLoadRateCardsFn).First(ctx)\n\t\tif err != nil {\n\t\t\tif entdb.IsNotFound(err) {\n\t\t\t\treturn nil, addon.NewNotFoundError(addon.NotFoundErrorParams{Namespace: params.Namespace, ID: params.ID})\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"failed to get add-on: %w\", err)\n\t\t}\n\t\treturn FromAddonRow(*addonRow)\n\t}\n\treturn entutils.TransactingRepo[*addon.Addon, *adapter](ctx, a, fn)\n}" + } + ] + }, + "openmeter/productcatalog/addon/httpdriver": { + "purpose": "HTTP transport layer for add-on endpoints, translating api.* request/response types to addon.Service calls via the httptransport framework. The only place add-on REST shape is mapped to/from domain.", + "patterns": [ + { + "name": "httptransport handler triple (decode, business, encode)", + "description": "Each endpoint method returns a typed handler built with httptransport.NewHandler / NewHandlerWithArgs taking a request decoder, a service-calling func, and a response encoder. Request/Response/Handler types are declared as type aliases in a `type (...)` block.", + "example": "func (h *handler) CreateAddon() CreateAddonHandler { return httptransport.NewHandler(decode, func(ctx, req) { h.service.CreateAddon(ctx, req) }, encoder, opts...) }" + }, + { + "name": "Namespace resolution before building request", + "description": "Every decode func calls h.resolveNamespace(ctx) first (wrapping namespaceDecoder.GetNamespace) and stamps NamespacedModel/NamespacedID onto the request.", + "example": "ns, err := h.resolveNamespace(ctx); req.NamespacedID = models.NamespacedID{Namespace: ns, ID: addonID}" + }, + { + "name": "Mapping via FromAddon / AsCreateAddonRequest / AsUpdateAddonRequest", + "description": "Domain\u2192API uses FromAddon (which also emits ValidationErrors and switches on a.Status()); API\u2192domain uses AsCreateAddonRequest/AsUpdateAddonRequest delegating ratecard conversion to productcatalog/http AsRateCards.", + "example": "return FromAddon(*a)" + }, + { + "name": "Shared productcatalog ValidationErrorEncoder per operation", + "description": "Every handler appends httptransport.WithOperationName(...) and WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon)) to h.options.", + "example": "httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon))" + }, + { + "name": "Handler interface composition + private struct", + "description": "driver.go exposes a Handler interface embedding AddonHandler (one method per endpoint); the concrete *handler{service, namespaceDecoder, options} is private with var _ Handler = (*handler)(nil) and a New(...) constructor.", + "example": "type Handler interface { AddonHandler }" + }, + { + "name": "IgnoreNonCriticalIssues on create/update", + "description": "Create/Update decoders set req.IgnoreNonCriticalIssues = true so non-critical validation issues surface as response ValidationErrors rather than hard failures.", + "example": "req.IgnoreNonCriticalIssues = true" + }, + { + "name": "Publish/Archive synthesize EffectivePeriod from clock.Now()", + "description": "PublishAddon sets EffectiveFrom = clock.Now(); ArchiveAddon sets EffectiveTo = clock.Now() (API spec does not yet carry these \u2014 see TODO(chrisgacsal)).", + "example": "EffectivePeriod: productcatalog.EffectivePeriod{EffectiveFrom: lo.ToPtr(clock.Now())}" + } + ], + "key_file_guides": [ + { + "file": "addon.go", + "role": "All seven endpoint handlers: ListAddons, CreateAddon, UpdateAddon, DeleteAddon, GetAddon, PublishAddon, ArchiveAddon.", + "watch_for": "GetAddon uses ref.ParseIDOrKey to split ULID vs key; list filters map api slices into filter.FilterString/FilterULID with In set. Status param maps api.AddonStatus -> productcatalog.AddonStatus." + }, + { + "file": "driver.go", + "role": "Handler/AddonHandler interfaces, *handler struct, resolveNamespace, and New constructor.", + "watch_for": "resolveNamespace returns 500 (commonhttp.NewHTTPError) when namespace missing; New takes namespaceDecoder, addon.Service, options." + }, + { + "file": "mapping.go", + "role": "FromAddon (domain->api, sets Status + ValidationErrors), AsCreateAddonRequest/AsUpdateAddonRequest (api->domain).", + "watch_for": "FromAddon must map every productcatalog.AddonStatus or returns an error on default; currency validated via currency.Code(a.Currency).Validate()." + } + ], + "anti_patterns": [ + "Building a request without first calling h.resolveNamespace and stamping the namespace.", + "Calling adapter/Ent directly instead of going through h.service (addon.Service).", + "Hand-rolling JSON encoding instead of commonhttp.JSONResponseEncoderWithStatus / EmptyResponseEncoder.", + "Omitting the productcataloghttp.ValidationErrorEncoder error encoder on a new endpoint.", + "Mapping ratecards locally instead of reusing productcatalog/http AsRateCards/FromRateCard." + ], + "decisions": [ + { + "decision": "Request/Response types are aliases of addon.*Input / api.* rather than new structs.", + "rationale": "Keeps the transport layer a thin adapter; the service owns the canonical input shape." + }, + { + "decision": "EffectivePeriod for publish/archive is set server-side from clock.Now().", + "rationale": "TypeSpec API does not yet expose effective dates (documented TODOs); clock injection keeps it testable." + } + ], + "code_examples": [ + { + "scenario": "Endpoint handler with namespace resolution and validation error encoder", + "code": "func (h *handler) CreateAddon() CreateAddonHandler {\n\treturn httptransport.NewHandler(\n\t\tfunc(ctx context.Context, r *http.Request) (CreateAddonRequest, error) {\n\t\t\tbody := api.AddonCreate{}\n\t\t\tif err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CreateAddonRequest{}, err }\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return CreateAddonRequest{}, err }\n\t\t\treq, err := AsCreateAddonRequest(body, ns)\n\t\t\tif err != nil { return CreateAddonRequest{}, err }\n\t\t\treq.IgnoreNonCriticalIssues = true\n\t\t\treturn req, nil\n\t\t},\n\t\tfunc(ctx context.Context, request CreateAddonRequest) (CreateAddonResponse, error) {\n\t\t\ta, err := h.service.CreateAddon(ctx, request)\n\t\t\tif err != nil { return CreateAddonResponse{}, err }\n\t\t\treturn FromAddon(*a)\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[CreateAddonResponse](http.StatusCreated),\n\t\thttptransport.AppendOptions(h.options,\n\t\t\thttptransport.WithOperationName(\"createAddon\"),\n\t\t\thttptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon)),\n\t\t)...,\n\t)\n}" + } + ] + }, + "openmeter/productcatalog/addon/service": { + "purpose": "Business-logic service implementing addon.Service: version lifecycle (create/publish/archive), validation, feature & tax-code resolution, transactional orchestration over addon.Repository, and event publishing.", + "patterns": [ + { + "name": "Config-validated constructor returning addon.Service", + "description": "New(Config) requires Adapter, FeatureResolver, TaxCode, Logger, Publisher (each nil-checked, returns errors.New). var _ addon.Service = (*service)(nil). Service holds adapter/taxCode/logger/publisher/featureResolver.", + "example": "func New(config Config) (addon.Service, error) { if config.Adapter == nil { return nil, errors.New(\"add-on adapter is required\") } ... }" + }, + { + "name": "transaction.Run wrapping for mutations", + "description": "Write methods (Create/Update/Delete/Publish/Archive) run their closure via transaction.Run(ctx, s.adapter, fn); read methods (List/Get) just call fn(ctx) directly without a transaction.", + "example": "return transaction.Run(ctx, s.adapter, fn)" + }, + { + "name": "Validate params then re-validate domain status before mutating", + "description": "Each method validates params, then loads the addon and calls add.AsProductCatalogAddon().ValidateWith(ValidateAddonWithStatus(...)) to enforce status gates (e.g. update only Draft, delete only Draft/Archived).", + "example": "add.AsProductCatalogAddon().ValidateWith(productcatalog.ValidateAddonWithStatus(productcatalog.AddonStatusDraft))" + }, + { + "name": "Feature + tax-code resolution before persisting ratecards", + "description": "Create/Update resolve features via featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, ns, rateCards) and tax codes via s.resolveTaxCodes -> productcatalog.ResolveTaxConfig, then merge resolved RateCardMeta back via rc.Merge.", + "example": "featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.RateCards)" + }, + { + "name": "Single-draft + auto-increment version invariant", + "description": "CreateAddon lists all versions via getAddonVersions, rejects if addonVersions.HasDraft() (NewGenericValidationError), and sets params.Version = Latest().Version + 1. addonVersions implements sort.Interface (Len/Less/Swap/Sort/Latest/HasDraft).", + "example": "if versions.HasDraft() { return nil, models.NewGenericValidationError(...) }; params.Version = lo.FromPtr(versions.Latest()).Version + 1" + }, + { + "name": "Publish archives previous active version then sets EffectivePeriod", + "description": "PublishAddon validates Publishable() + ValidateAddonWithFeatures, and for Version>1 looks up the active version by key and ArchiveAddon's it at EffectiveFrom before updating the new version's EffectivePeriod.", + "example": "s.ArchiveAddon(ctx, addon.ArchiveAddonInput{NamespacedID: ..., EffectiveTo: lo.FromPtr(params.EffectiveFrom)})" + }, + { + "name": "Emit eventbus event after every mutation", + "description": "After each successful write the service publishes via s.publisher.Publish(ctx, addon.NewAddonCreateEvent/Update/Delete/Publish event); a publish failure fails the whole transaction.", + "example": "event := addon.NewAddonCreateEvent(ctx, aa); err = s.publisher.Publish(ctx, event)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config struct, New constructor with nil-checks, and the private service struct + addon.Service assertion.", + "watch_for": "All five collaborators are mandatory; FeatureResolver is productcatalog.FeatureResolver, TaxCode is taxcode.Service, Publisher is eventbus.Publisher." + }, + { + "file": "addon.go", + "role": "All service methods (List/Create/Get/Update/Delete/Publish/Archive) plus helpers resolveTaxCodes, getAddonVersions, and addonVersions sort type.", + "watch_for": "UpdateAddon zeroes params.EffectivePeriod (state changes only via Publish/Archive). DeleteAddon requires Plans expanded (Expand.PlanAddons) and refuses delete if any active plan assignment exists." + }, + { + "file": "service_test.go", + "role": "Integration test TestAddonService over pctestutils.NewTestEnv covering create/publish/archive lifecycle with features, meters, tax codes.", + "watch_for": "Requires Postgres; builds features per meter via NewTestFeatureFromMeter and a real taxcode entity before referencing TaxConfig.TaxCodeID." + }, + { + "file": "taxcode_test.go", + "role": "Tests stripe-code -> TaxCode entity resolution and that changing a stripe code creates a new TaxCode while preserving the old entity.", + "watch_for": "Relies on resolveTaxCodes creating TaxCode entities lazily; old entities are never deleted on code change." + } + ], + "anti_patterns": [ + "Mutating addon state through UpdateAddon's EffectivePeriod instead of Publish/Archive (it is zeroed).", + "Skipping the AsProductCatalogAddon().ValidateWith status gate before a mutation.", + "Calling s.adapter mutations outside transaction.Run, losing atomicity with event publishing.", + "Creating a second draft version (violates single-draft invariant enforced by HasDraft).", + "Persisting ratecards before resolving features/tax codes, leaving FeatureID/TaxCodeID unset." + ], + "decisions": [ + { + "decision": "Event publish happens inside the same transaction as the write.", + "rationale": "Guarantees no event is emitted for a rolled-back mutation; a publish error aborts the change." + }, + { + "decision": "Versions are immutable; publish archives the prior active version rather than editing it.", + "rationale": "Preserves historical add-on definitions and keeps exactly one active version per key." + }, + { + "decision": "Tax-code resolution is lazy and additive (new stripe code -> new TaxCode entity).", + "rationale": "Avoids mutating tax codes shared by historical versions; old entities stay valid for archived add-ons." + } + ], + "code_examples": [ + { + "scenario": "Mutating service method with validation, resolution, transaction, and event publish", + "code": "func (s service) CreateAddon(ctx context.Context, params addon.CreateAddonInput) (*addon.Addon, error) {\n\tfn := func(ctx context.Context) (*addon.Addon, error) {\n\t\tif err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid create add-on params: %w\", err) }\n\t\tversions, err := s.getAddonVersions(ctx, params.Namespace, params.Key)\n\t\tif err != nil { return nil, err }\n\t\tif versions.HasDraft() { return nil, models.NewGenericValidationError(fmt.Errorf(\"only a single draft version is allowed for add-on\")) }\n\t\tparams.Version = lo.FromPtr(versions.Latest()).Version + 1\n\t\tif len(params.RateCards) > 0 {\n\t\t\tif err = featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.RateCards); err != nil { return nil, err }\n\t\t\tif err = s.resolveTaxCodes(ctx, params.Namespace, ¶ms.RateCards); err != nil { return nil, err }\n\t\t}\n\t\taa, err := s.adapter.CreateAddon(ctx, params)\n\t\tif err != nil { return nil, err }\n\t\tif err = s.publisher.Publish(ctx, addon.NewAddonCreateEvent(ctx, aa)); err != nil { return nil, err }\n\t\treturn aa, nil\n\t}\n\treturn transaction.Run(ctx, s.adapter, fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w115.json b/.archie/enrichments/w115.json new file mode 100644 index 0000000000..64985e6be6 --- /dev/null +++ b/.archie/enrichments/w115.json @@ -0,0 +1,256 @@ +{ + "openmeter/productcatalog/plan/adapter": { + "purpose": "Ent-backed persistence layer implementing plan.Repository for Plans, PlanPhases, and PlanRateCards. All DB access for the plan domain flows through here; the service layer never touches Ent directly.", + "patterns": [ + { + "name": "Transaction-aware repository methods", + "description": "Every public adapter method wraps its body in entutils.TransactingRepo[T, *adapter](ctx, a, fn) so it rebinds to any tx already carried in ctx. The adapter implements Tx/WithTx/Self to participate in transaction.Driver.", + "example": "return entutils.TransactingRepo[*plan.Plan, *adapter](ctx, a, fn)" + }, + { + "name": "Config struct + Validate + New returning interface", + "description": "Constructor New(Config) (plan.Repository, error) validates Config (Client and Logger required) before building the unexported adapter struct. var _ plan.Repository = (*adapter)(nil) enforces the contract.", + "example": "func New(config Config) (plan.Repository, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "FromXRow / asXRow mapping functions in mapping.go", + "description": "Ent row -> domain conversion lives in exported FromPlanRow/FromAddonRow/fromPlanPhaseRow/fromPlanRateCardRow; domain -> Ent in asPlanRateCardRow. RateCard type switch on r.Type dispatches FlatFee vs UsageBased.", + "example": "func FromPlanRow(p entdb.Plan) (*plan.Plan, error)" + }, + { + "name": "Eager-load edges via OrErr to detect unloaded relations", + "description": "Mapping uses p.Edges.AddonsOrErr() / RatecardsOrErr() / TaxCodeOrErr() to distinguish 'not loaded' (set nil) from real data; queries attach WithPhases/WithRatecards using shared eager-load funcs (rateCardEagerLoadFeaturesFn, rateCardEagerLoadTaxCodesFn, planPhaseEagerLoadRateCardsFn).", + "example": "addons, err := p.Edges.AddonsOrErr(); if err != nil { pp.Addons = nil }" + }, + { + "name": "Status filtering via EffectivePeriod predicates", + "description": "ListPlans translates productcatalog.PlanStatus values into Ent predicates over EffectiveFrom/EffectiveTo against clock.Now(); Active/Draft/Scheduled/Archived/Invalid each map to a distinct predicate combined with plandb.Or.", + "example": "plandb.And(plandb.EffectiveFromLTE(now), plandb.Or(plandb.EffectiveToGTE(now), plandb.EffectiveToIsNil()))" + }, + { + "name": "Bulk RateCard creation under phase create", + "description": "createPhase builds child rate cards with rateCardBulkCreate then CreateBulk(...).Exec, re-queries the phase with eager loads, and maps it back. TaxConfig/TaxCodeID/TaxBehavior and Price are set conditionally (only when non-nil).", + "example": "bulk, err := rateCardBulkCreate(a.db.PlanRateCard, params.RateCards, planPhaseRow.ID, params.Namespace)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor + adapter struct + Tx/WithTx/Self transaction plumbing", + "watch_for": "Both Client and Logger are required; New returns plan.Repository not *adapter." + }, + { + "file": "mapping.go", + "role": "Ent<->domain conversion for Plan/Addon/PlanAddon/RateCard/Phase", + "watch_for": "BackfillTaxConfig must be called to reconcile legacy TaxConfig with new TaxBehavior/TaxCode columns; FeatureKey is backfilled from the loaded feature edge when only FeatureID is set." + }, + { + "file": "phase.go", + "role": "createPhase + createPhaseInput validation + rateCardBulkCreate", + "watch_for": "Index is uint8 in DB (SetIndex(uint8(...))); validate Namespace/Key/PlanID/Name/Index>=0 before insert." + }, + { + "file": "plan.go", + "role": "ListPlans/CreatePlan/DeletePlan and other Plan CRUD with status-filter predicates", + "watch_for": "CreatePlan defaults Version to 1; OrderBy switch falls through to ByID; phases are created one-by-one via a.createPhase inside the same tx." + }, + { + "file": "adapter_test.go", + "role": "Postgres integration test via pctestutils.NewTestEnv exercising create/get/list/update/delete/status-filter", + "watch_for": "Uses env.Plan vs env.PlanRepository (service vs raw repo) deliberately; SettlementMode persistence is asserted on the repo path." + } + ], + "anti_patterns": [ + "Calling a.db.* outside an entutils.TransactingRepo/TransactingRepoWithNoValue wrapper, breaking tx propagation from ctx", + "Returning the concrete *adapter from New instead of plan.Repository", + "Reading p.Edges.X directly without the *OrErr guard, conflating 'not loaded' with 'empty'", + "Skipping BackfillTaxConfig when mapping rate cards, leaving legacy TaxConfig inconsistent with TaxBehavior/TaxCode columns", + "Encoding business rules (status transitions, version increment policy) here instead of the service layer" + ], + "decisions": [ + { + "decision": "Adapter owns only persistence + mapping; validation of business invariants lives in service", + "rationale": "Keeps Ent concerns isolated and lets the service compose multi-step transactional workflows (feature/tax resolution, events)." + }, + { + "decision": "Eager-load helpers and OrErr-based loaded detection", + "rationale": "Plans are deep aggregates (phases->ratecards->tax/feature); explicit load signalling avoids N+1 and silent empty-vs-missing bugs." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware list with status predicates", + "code": "func (a *adapter) ListPlans(ctx context.Context, params plan.ListPlansInput) (pagination.Result[plan.Plan], error) {\n fn := func(ctx context.Context, a *adapter) (pagination.Result[plan.Plan], error) {\n if err := params.Validate(); err != nil { return pagination.Result[plan.Plan]{}, err }\n query := a.db.Plan.Query().WithPhases(planPhaseIncludeDeleted(false), planPhaseEagerLoadRateCardsFn)\n // ... apply namespace/status/order predicates ...\n paged, err := query.Paginate(ctx, params.Page)\n if err != nil { return pagination.Result[plan.Plan]{}, err }\n // map paged.Items via FromPlanRow\n return response, nil\n }\n return entutils.TransactingRepo[pagination.Result[plan.Plan], *adapter](ctx, a, fn)\n}" + } + ] + }, + "openmeter/productcatalog/plan/httpdriver": { + "purpose": "HTTP transport layer for the plan API: builds httptransport handlers (List/Create/Get/Update/Delete/Publish/Archive/Next) that decode requests, map API<->domain types, and delegate to plan.Service. Pure transport \u2014 no DB, no business rules.", + "patterns": [ + { + "name": "httptransport handler-per-operation with type aliases", + "description": "Each operation defines Request/Response/Handler type aliases (Request usually = plan.) and a method returning a httptransport.NewHandler(WithArgs) triple of decode/exec/encode. Service is the only dependency invoked in the exec step.", + "example": "type CreatePlanHandler httptransport.Handler[CreatePlanRequest, CreatePlanResponse]" + }, + { + "name": "Handler interface aggregation + New constructor", + "description": "handler implements the Handler interface (PlanHandler with one method per operation). New(namespaceDecoder, service, credits, featureGate, options...) wires deps; var _ Handler = (*handler)(nil) enforces completeness.", + "example": "func New(namespaceDecoder namespacedriver.NamespaceDecoder, service plan.Service, credits appconfig.CreditsConfiguration, featureGate featuregate.Gate, options ...httptransport.HandlerOption) Handler" + }, + { + "name": "FromX / AsX mapping convention in mapping.go", + "description": "FromPlan/FromPlanPhase map domain->api.*; AsCreatePlanRequest/AsUpdatePlanRequest/AsPlanPhase map api.*->domain. RateCard and metadata mapping is delegated to the shared productcatalog/http package (http.FromRateCard, http.AsRateCards, http.FromMetadata).", + "example": "func FromPlan(p plan.Plan) (api.Plan, error)" + }, + { + "name": "Namespace resolution + ValidationErrorEncoder per handler", + "description": "Every decode step calls h.resolveNamespace(ctx) (500 if missing) before mapping; every handler appends httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(ResourceKindPlan)) and WithOperationName.", + "example": "httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindPlan))" + }, + { + "name": "Credits feature-gating for CreditOnly settlement", + "description": "featuregate.go isCreditsEnabled(ns) checks credits.Enabled, then the optional featuregate.Gate against credits.FeatureFlag. Create/Update reject CreditOnlySettlementMode with a generic validation error when credits are disabled.", + "example": "if !creditEnabled && req.SettlementMode == productcatalog.CreditOnlySettlementMode { return ..., models.NewGenericValidationError(...) }" + }, + { + "name": "ParseIDOrKey for IDOrKey path params", + "description": "Get/Next accept an IDOrKey path arg and use ref.ParseIDOrKey to split into NamespacedID.ID vs Key (ULID detection), so one route serves both lookups.", + "example": "idOrKey := ref.ParseIDOrKey(params.IDOrKey)" + } + ], + "key_file_guides": [ + { + "file": "driver.go", + "role": "Handler/PlanHandler interfaces, handler struct, New constructor, resolveNamespace", + "watch_for": "Adding an operation requires extending the PlanHandler interface or var _ Handler check fails to compile." + }, + { + "file": "plan.go", + "role": "All per-operation handlers (decode/exec/encode) and Request/Response type aliases", + "watch_for": "Publish/Archive/Next set EffectivePeriod from clock.Now() in the driver (TODO notes spec lacks the field); Create/Update set IgnoreNonCriticalIssues=true." + }, + { + "file": "mapping.go", + "role": "FromPlan/FromPlanPhase and AsCreate/AsUpdate/AsPlanPhase converters", + "watch_for": "asProRatingConfig defaults to Enabled=true + ProRatingModeProratePrices when nil; status mapping returns error on unknown PlanStatus." + }, + { + "file": "featuregate.go", + "role": "isCreditsEnabled gate combining credits config and featuregate.Gate", + "watch_for": "Returns true (gate-open) when gate is nil or FeatureFlag empty but credits.Enabled \u2014 only a configured flag actually evaluates per-namespace." + } + ], + "anti_patterns": [ + "Putting business logic (status transitions, version policy) in handlers instead of plan.Service", + "Bypassing resolveNamespace and reading the namespace ad hoc", + "Hand-mapping RateCards/metadata instead of reusing productcatalog/http helpers", + "Omitting WithErrorEncoder(ValidationErrorEncoder(ResourceKindPlan)), so validation errors serialize as generic 500s", + "Allowing CreditOnlySettlementMode through without the isCreditsEnabled guard" + ], + "decisions": [ + { + "decision": "Request types alias the service Input structs (CreatePlanRequest = plan.CreatePlanInput)", + "rationale": "Avoids a redundant transport DTO layer; mapping functions populate the same struct the service consumes." + }, + { + "decision": "Effective period for publish/archive is server-set from clock.Now()", + "rationale": "TypeSpec does not yet expose EffectivePeriod on these requests, so the driver supplies it (tracked by TODO comments)." + } + ], + "code_examples": [ + { + "scenario": "An operation handler with namespace resolution and validation encoder", + "code": "func (h *handler) CreatePlan() CreatePlanHandler {\n return httptransport.NewHandler(\n func(ctx context.Context, r *http.Request) (CreatePlanRequest, error) {\n body := api.PlanCreate{}\n if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CreatePlanRequest{}, err }\n ns, err := h.resolveNamespace(ctx)\n if err != nil { return CreatePlanRequest{}, err }\n req, err := AsCreatePlanRequest(body, ns)\n // ... isCreditsEnabled guard, set IgnoreNonCriticalIssues ...\n return req, err\n },\n func(ctx context.Context, request CreatePlanRequest) (CreatePlanResponse, error) {\n p, err := h.service.CreatePlan(ctx, request)\n if err != nil { return CreatePlanResponse{}, err }\n return FromPlan(*p)\n },\n commonhttp.JSONResponseEncoderWithStatus[CreatePlanResponse](http.StatusCreated),\n httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"createPlan\"), httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindPlan)))...,\n )\n}" + } + ] + }, + "openmeter/productcatalog/plan/service": { + "purpose": "Business-logic layer implementing plan.Service: enforces plan versioning, lifecycle/status rules, feature and tax-code resolution, event publishing, and transactional orchestration around the adapter. This is where plan invariants live.", + "patterns": [ + { + "name": "Config + New(plan.Service) with required-dependency checks", + "description": "service.go validates Adapter, FeatureResolver, Logger, TaxCode, Publisher are non-nil before building the unexported service struct. var _ plan.Service = (*service)(nil) enforces the interface.", + "example": "func New(config Config) (plan.Service, error) { if config.Adapter == nil { return nil, errors.New(\"plan adapter is required\") } ... }" + }, + { + "name": "transaction.Run around mutating operations", + "description": "Create/Delete/Update/Publish wrap their fn in transaction.Run(ctx, s.adapter, fn); read-only ListPlans/GetPlan just call fn(ctx) directly. All adapter calls inside share the tx.", + "example": "return transaction.Run(ctx, s.adapter, fn)" + }, + { + "name": "Validate -> resolve features/tax -> persist -> publish event", + "description": "Mutations call params.Validate(), then featureresolver.ResolveFeaturesForRateCards and s.resolveTaxCodes per phase, then the adapter, then s.publisher.Publish(ctx, plan.NewPlanXEvent(ctx, p)). A failed publish fails the whole tx.", + "example": "event := plan.NewPlanCreateEvent(ctx, p); if err := s.publisher.Publish(ctx, event); err != nil { return nil, err }" + }, + { + "name": "Status-gated lifecycle transitions", + "description": "Delete allows Archived/Scheduled/Draft; Update/Publish allow only Draft/Scheduled; CreatePlan enforces a single Draft version per Key and auto-increments Version. Violations return models.NewGenericValidationError.", + "example": "if !lo.Contains(allowedPlanStatuses, planStatus) { return nil, models.NewGenericValidationError(...) }" + }, + { + "name": "Field-prefixed validation errors for phase rate cards", + "description": "Feature resolution errors are wrapped with models.ErrorWithFieldPrefix using a phases[key=...] FieldSelectorGroup so API clients get precise field paths.", + "example": "models.ErrorWithFieldPrefix(phaseFieldSelector, fmt.Errorf(\"failed to expand features for ratecards...: %w\", err))" + }, + { + "name": "Publish performs deep cross-aggregate validation", + "description": "PublishPlan fetches with Expand{PlanAddons:true}, runs pp.Validate(), ValidatePlanWithFeatures, and per-addon PlanAddon.Validate (ErrPlanHasIncompatibleAddon), collecting errs via errors.Join, then archives the prior active version.", + "example": "err = pp.ValidateWith(productcatalog.ValidatePlanWithFeatures(ctx, s.featureResolver.WithNamespace(params.Namespace)))" + }, + { + "name": "resolveTaxCodes ensures Stripe tax codes exist before persist", + "description": "For each rate card with a TaxConfig, productcatalog.ResolveTaxConfig creates/links a TaxCode entity and populates TaxConfig.TaxCodeID, then rc.Merge applies the resolved meta back onto the typed rate card.", + "example": "if err := productcatalog.ResolveTaxConfig(ctx, s.taxCode, namespace, meta.TaxConfig); err != nil { return err }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config, New constructor, service struct, dependency wiring", + "watch_for": "All five deps (Adapter, FeatureResolver, Logger, TaxCode, Publisher) are mandatory; no slog.Default fallback allowed." + }, + { + "file": "plan.go", + "role": "All Service methods: ListPlans/CreatePlan/DeletePlan/GetPlan/UpdatePlan/PublishPlan/ArchivePlan and resolveTaxCodes", + "watch_for": "UpdatePlan zeroes EffectivePeriod (lifecycle only via Publish/Archive); CreatePlan rejects a second Draft and auto-increments Version; events publish inside the tx." + }, + { + "file": "service_test.go", + "role": "Integration tests via pctestutils.NewTestEnv covering plan lifecycle, addons, filters", + "watch_for": "Builds real meters/features/addons; prefer service-backed fixtures over hand-assembled aggregates." + }, + { + "file": "taxcode_test.go", + "role": "Tests for resolveTaxCodes / tax code resolution on rate cards", + "watch_for": "Asserts TaxCodeID population and TaxCode entity creation per namespace." + } + ], + "anti_patterns": [ + "Calling the adapter for a mutation outside transaction.Run, losing atomicity across phase/feature/tax steps and event publish", + "Allowing updates or publishes on Active/Archived plans (status gate must reject)", + "Skipping featureresolver.ResolveFeaturesForRateCards or resolveTaxCodes before persisting phases", + "Permitting more than one Draft version per plan Key in CreatePlan", + "Publishing without Expand{PlanAddons:true}, so add-on compatibility can't be validated" + ], + "decisions": [ + { + "decision": "Versioning and lifecycle rules live in the service, not the adapter or handler", + "rationale": "Single-draft-per-key, version auto-increment, and status-gated transitions are domain invariants that span multiple reads/writes." + }, + { + "decision": "Event publish happens inside the same transaction as the write", + "rationale": "A failed Publish rolls back the mutation, keeping the event stream consistent with persisted state (outbox-style coupling)." + }, + { + "decision": "EffectivePeriod is mutated only via Publish/Archive, zeroed on Update", + "rationale": "Forces scheduling through dedicated lifecycle operations rather than arbitrary field edits." + } + ], + "code_examples": [ + { + "scenario": "Mutation: validate, resolve features/tax per phase, persist, publish in one tx", + "code": "func (s service) CreatePlan(ctx context.Context, params plan.CreatePlanInput) (*plan.Plan, error) {\n fn := func(ctx context.Context) (*plan.Plan, error) {\n if err := params.Validate(); err != nil { return nil, err }\n // enforce single-draft-per-key + version auto-increment via ListPlans\n for idx := range params.Phases {\n if err := featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.Phases[idx].RateCards); err != nil { return nil, err }\n if err := s.resolveTaxCodes(ctx, params.Namespace, ¶ms.Phases[idx].RateCards); err != nil { return nil, err }\n }\n p, err := s.adapter.CreatePlan(ctx, params)\n if err != nil { return nil, err }\n if err := s.publisher.Publish(ctx, plan.NewPlanCreateEvent(ctx, p)); err != nil { return nil, err }\n return p, nil\n }\n return transaction.Run(ctx, s.adapter, fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w116.json b/.archie/enrichments/w116.json new file mode 100644 index 0000000000..4900a1dc57 --- /dev/null +++ b/.archie/enrichments/w116.json @@ -0,0 +1,235 @@ +{ + "openmeter/productcatalog/planaddon/adapter": { + "purpose": "Ent-backed persistence layer for plan\u2194addon assignments (the PlanAddon join entity). Implements the planaddon.Repository interface and is the only place that touches the entdb.PlanAddon table.", + "patterns": [ + { + "name": "Transaction-aware repo methods", + "description": "Every public method wraps its body in entutils.TransactingRepo[...] so it rebinds to a tx carried in ctx; the inner fn takes (ctx, *adapter).", + "example": "return entutils.TransactingRepo[*planaddon.PlanAddon, *adapter](ctx, a, fn)" + }, + { + "name": "Transaction driver trio", + "description": "adapter implements Tx (HijackTx), WithTx (NewTxClientFromRawConfig), and Self() to satisfy the entutils transactable contract.", + "example": "func (a *adapter) WithTx(ctx, tx) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); ... }" + }, + { + "name": "Validate params first", + "description": "Each method calls params.Validate() before any DB access and wraps the error with namespace/plan.id/addon.id context.", + "example": "if err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid ...: %w\", err) }" + }, + { + "name": "Eager-load via shared loader vars", + "description": "All reads attach PlanEagerLoadPhasesWithRateCardsWithFeaturesFn and AddonEagerLoadRateCardsWithFeaturesFn so edges (phases\u2192ratecards\u2192features) are populated before mapping.", + "example": "query.WithPlan(PlanEagerLoadPhasesWithRateCardsWithFeaturesFn).WithAddon(AddonEagerLoadRateCardsWithFeaturesFn)" + }, + { + "name": "Create-then-refetch", + "description": "CreatePlanAddon does Save() then re-queries by ID with eager loads to populate sub-resources before mapping to domain.", + "example": "planAddonRow, err = a.db.PlanAddon.Query().Where(...).WithPlan(...).WithAddon(...).First(ctx)" + }, + { + "name": "Soft delete", + "description": "DeletePlanAddon sets DeletedAt = clock.Now().UTC() via UpdateOneID; reads filter planaddondb.DeletedAtIsNil() unless IncludeDeleted.", + "example": "a.db.PlanAddon.UpdateOneID(planAddon.ID).SetDeletedAt(deletedAt).Exec(ctx)" + }, + { + "name": "Typed not-found errors", + "description": "On entdb.IsNotFound, return planaddon.NewNotFoundError(planaddon.NotFoundErrorParams{...}) rather than the raw ent error.", + "example": "if entdb.IsNotFound(err) { return nil, planaddon.NewNotFoundError(...) }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client,Logger} + Validate, New() returning planaddon.Repository, and the Tx/WithTx/Self transaction plumbing.", + "watch_for": "New returns the interface, not *adapter; both Client and Logger are required (validated)." + }, + { + "file": "planaddon.go", + "role": "All CRUD: ListPlanAddons, CreatePlanAddon, GetPlanAddon, UpdatePlanAddon, DeletePlanAddon plus the two eager-load loader vars.", + "watch_for": "List builds OR-of-OR predicate trees (plan/addon sub-filters via HasPlanWith/HasAddonWith); PlanKeyVersions loop has a dead planKeyVersionFilters slice that is appended empty \u2014 mirror existing style, don't rely on it. Update uses SetOrClearMaxQuantity (nil clears)." + }, + { + "file": "mapping.go", + "role": "FromPlanAddunRow maps entdb.PlanAddon \u2192 planaddon.PlanAddon, delegating to planadapter.FromPlanRow and addonadapter.FromAddonRow for edges.", + "watch_for": "If Edges.Plan/Edges.Addon is nil it falls back to a stub with only NamespacedID; non-nil-but-cast-nil is treated as an error." + }, + { + "file": "adapter_test.go", + "role": "Postgres integration test (TestPostgresAdapter) using pctestutils.NewTestEnv; drives repository directly via env.PlanAddonRepository.", + "watch_for": "Requires Postgres (POSTGRES_HOST=127.0.0.1) and env.DBSchemaMigrate(t); exercises full plan+addon+feature setup before assignment." + } + ], + "anti_patterns": [ + "Calling a.db directly in a method without wrapping in entutils.TransactingRepo (breaks tx propagation from ctx).", + "Reading PlanAddon rows without the shared eager-load loaders, leaving Plan/Addon edges unpopulated for mapping.", + "Returning raw entdb errors instead of planaddon.NewNotFoundError on IsNotFound.", + "Skipping params.Validate() before DB access.", + "Hard-deleting rows instead of setting DeletedAt." + ], + "decisions": [ + { + "decision": "Repository returns fully eager-loaded domain PlanAddon (with nested plan phases/ratecards/features).", + "rationale": "Callers (service, http) need the full plan and addon shape to validate compatibility and render API responses without N+1 refetches." + }, + { + "decision": "Create refetches after Save rather than mapping the insert result.", + "rationale": "The insert result lacks edges; a single eager-loaded refetch guarantees a complete domain object." + } + ], + "code_examples": [] + }, + "openmeter/productcatalog/planaddon/httpdriver": { + "purpose": "HTTP transport layer for plan-addon assignment endpoints (list/create/get/update/delete). Adapts api.* request/response types to the planaddon.Service and back.", + "patterns": [ + { + "name": "httptransport.NewHandlerWithArgs triple", + "description": "Each endpoint returns a typed Handler built from (decode\u2192request, service call, response encoder) plus options with WithOperationName and WithErrorEncoder.", + "example": "return httptransport.NewHandlerWithArgs(decodeFn, businessFn, commonhttp.JSONResponseEncoderWithStatus[...](http.StatusOK), httptransport.AppendOptions(...))" + }, + { + "name": "Request type aliases to service inputs", + "description": "Request types are aliases of the service input structs (e.g. CreatePlanAddonRequest = planaddon.CreatePlanAddonInput), avoiding a duplicate struct.", + "example": "type ( CreatePlanAddonRequest = planaddon.CreatePlanAddonInput; ... )" + }, + { + "name": "Namespace resolution per request", + "description": "Decode funcs call h.resolveNamespace(ctx) (via namespacedriver.NamespaceDecoder) and 500 if absent; never trust a body-supplied namespace.", + "example": "ns, err := h.resolveNamespace(ctx); req.Namespace = ns" + }, + { + "name": "As*/From* mapping functions", + "description": "Body\u2192input uses AsCreatePlanAddonRequest/AsUpdatePlanAddonRequest; domain\u2192api uses FromPlanAddon, which also surfaces ValidationErrors via AsProductCatalogPlanAddon().ValidationErrors().", + "example": "resp := api.PlanAddon{ ..., ValidationErrors: http.FromValidationErrors(validationIssues) }" + }, + { + "name": "ValidationErrorEncoder per resource kind", + "description": "All handlers attach httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon)) so validation issues render as structured HTTP errors.", + "example": "httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon))" + }, + { + "name": "Plan/addon identity via path args", + "description": "Handlers carry PlanID/AddonID or *IDOrKey through the HandlerWithArgs params struct, not the body; List packs PlanIDOrKey into both PlanIDs and PlanKeys.", + "example": "PlanIDs: []string{params.PlanIDOrKey}, PlanKeys: []string{params.PlanIDOrKey}" + } + ], + "key_file_guides": [ + { + "file": "driver.go", + "role": "Handler/PlanAddonHandler interfaces, the handler struct (service+namespaceDecoder+options), New(), and resolveNamespace.", + "watch_for": "New takes namespaceDecoder first, then service; resolveNamespace returns 500 (not 401) when namespace missing." + }, + { + "file": "planaddon.go", + "role": "The five endpoint constructors (ListPlanAddons/CreatePlanAddon/UpdatePlanAddon/DeletePlanAddon/GetPlanAddon) with request/response type aliases and DefaultPageSize/DefaultPageNumber.", + "watch_for": "Create uses StatusCreated, Delete uses EmptyResponseEncoder+StatusNoContent; List maps each item through FromPlanAddon and aborts on first cast error." + }, + { + "file": "mapping.go", + "role": "FromPlanAddon (domain\u2192api), AsCreatePlanAddonRequest/AsUpdatePlanAddonRequest (api\u2192input), AsMetadata helper.", + "watch_for": "Update maps a.FromPlanPhase to a pointer (&a.FromPlanPhase) while Create passes it by value \u2014 the nil-vs-set semantics matter downstream in the service/adapter merge." + } + ], + "anti_patterns": [ + "Reading namespace from the request body instead of resolveNamespace(ctx).", + "Adding an endpoint without WithOperationName and the ValidationErrorEncoder option.", + "Defining a new Request struct instead of aliasing the planaddon.* service input.", + "Encoding domain objects directly instead of mapping through FromPlanAddon (loses ValidationErrors/Metadata/Annotations translation)." + ], + "decisions": [ + { + "decision": "Request types alias service inputs and the handler delegates straight to planaddon.Service.", + "rationale": "Keeps the HTTP layer a thin transport adapter with no business logic, all validation living in service/adapter." + }, + { + "decision": "FromPlanAddon attaches AsProductCatalogPlanAddon().ValidationErrors() to the API payload.", + "rationale": "Plan-addon compatibility issues are returned as non-fatal validation errors on GET/LIST rather than failing the request." + } + ], + "code_examples": [] + }, + "openmeter/productcatalog/planaddon/service": { + "purpose": "Business-logic layer for plan-addon assignments: validates plan/addon state and compatibility, orchestrates the adapter, and publishes lifecycle events. Implements planaddon.Service.", + "patterns": [ + { + "name": "transaction.Run around mutations", + "description": "Create/Update/Delete wrap their fn in transaction.Run / transaction.RunWithNoValue(ctx, s.adapter, fn); read-only Get/List just invoke fn(ctx).", + "example": "return transaction.Run(ctx, s.adapter, fn)" + }, + { + "name": "Validate plan/addon state before write", + "description": "Plan must pass IsPlanDeleted(clock.Now()) + HasPlanStatus(Draft, Scheduled); addon must pass IsAddonDeleted + HasAddonStatus(Active). Failures become models.NewGenericValidationError.", + "example": "p.ValidateWith(plan.IsPlanDeleted(clock.Now()), plan.HasPlanStatus(productcatalog.PlanStatusDraft, productcatalog.PlanStatusScheduled))" + }, + { + "name": "Conflict check on create", + "description": "CreatePlanAddon pre-fetches by plan+addon and returns models.NewGenericConflictError if an assignment already exists.", + "example": "if planAddon != nil && planAddon.Plan.ID == params.PlanID && planAddon.Addon.ID == params.AddonID { return nil, models.NewGenericConflictError(...) }" + }, + { + "name": "Map typed errors to generic models errors", + "description": "errors.As against plan.NotFoundError / addon.NotFoundError / planaddon.NotFoundError, then return models.NewGenericNotFoundError so the HTTP layer renders a 404.", + "example": "if notFound := &(planaddon.NotFoundError{}); errors.As(err, ¬Found) { return nil, models.NewGenericNotFoundError(err) }" + }, + { + "name": "Patch-merge mirroring the adapter", + "description": "Update reconstructs a productcatalog.PlanAddon by merging params over existing (MaxQuantity always replaced, FromPlanPhase/Metadata/Annotations kept when nil) and validates before persisting \u2014 must stay in sync with adapter UpdatePlanAddon.", + "example": "fromPlanPhase := planAddon.FromPlanPhase; if params.FromPlanPhase != nil { fromPlanPhase = *params.FromPlanPhase }" + }, + { + "name": "Publish lifecycle events", + "description": "After each successful mutation, publish via eventbus.Publisher: NewPlanAddonCreateEvent / NewPlanAddonUpdateEvent / NewPlanAddonDeleteEvent; a publish failure fails the whole transaction.", + "example": "event := planaddon.NewPlanAddonCreateEvent(ctx, planAddon); s.publisher.Publish(ctx, event)" + }, + { + "name": "Scoped structured logging", + "description": "Each method derives a logger via s.logger.With(\"operation\", ..., \"namespace\", ..., ids...) and logs Debug at phase boundaries.", + "example": "logger := s.logger.With(\"operation\", \"create\", \"namespace\", params.Namespace, \"plan.id\", params.PlanID, \"addon.id\", params.AddonID)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config{Adapter,Plan,Addon,Logger,Publisher}, New() with explicit non-nil checks, and the service struct.", + "watch_for": "All five deps are required \u2014 New errors if any is nil; service depends on plan.Service and addon.Service (not just the repo) to validate state." + }, + { + "file": "planaddon.go", + "role": "The five Service methods. Holds the load-bearing comment block documenting patch-field merge rules that mirror the adapter.", + "watch_for": "Update's merge rules must match adapter/planaddon.go UpdatePlanAddon exactly (MaxQuantity replace vs FromPlanPhase/Metadata/Annotations keep-when-nil). Delete validates the plan is still Draft/Scheduled before deleting and is idempotent (returns nil if already DeletedAt)." + }, + { + "file": "service_test.go", + "role": "TestPlanAddonService Postgres integration test via pctestutils.NewTestEnv; full plan+addon+feature lifecycle including the 'PublishedPlan' negative case.", + "watch_for": "Asserts create fails once the plan is published/active; drives through env.PlanAddon (service) vs env.PlanAddonRepository (adapter)." + } + ], + "anti_patterns": [ + "Mutating without wrapping in transaction.Run/RunWithNoValue (publish + write must be atomic).", + "Letting the service's Update merge logic drift from the adapter's SetOrClearMaxQuantity / Set*-when-non-nil behavior.", + "Returning typed *NotFoundError up the stack instead of models.NewGenericNotFoundError.", + "Skipping plan/addon state validation (Draft/Scheduled, Active) before creating or updating an assignment.", + "Swallowing publisher errors instead of failing the transaction." + ], + "decisions": [ + { + "decision": "Service depends on plan.Service and addon.Service, not just the planaddon repository.", + "rationale": "Assignment validity depends on live plan/addon status and compatibility, which only those services can resolve." + }, + { + "decision": "Update rebuilds and Validate()s a productcatalog.PlanAddon before persisting.", + "rationale": "Catches incompatible patches (e.g. bad FromPlanPhase) before they reach the DB, keeping invalid assignments out of the table." + }, + { + "decision": "Events publish inside the transaction.", + "rationale": "Guarantees no event is emitted for a write that later rolls back." + } + ], + "code_examples": [ + { + "scenario": "Service mutation: validate, persist via adapter, publish, all inside a transaction", + "code": "func (s service) CreatePlanAddon(ctx context.Context, params planaddon.CreatePlanAddonInput) (*planaddon.PlanAddon, error) {\n\tfn := func(ctx context.Context) (*planaddon.PlanAddon, error) {\n\t\tif err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid ...: %w\", err) }\n\t\tp, err := s.plan.GetPlan(ctx, plan.GetPlanInput{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.PlanID}})\n\t\tif err != nil { /* map plan.NotFoundError -> models.NewGenericNotFoundError */ }\n\t\tif err = p.ValidateWith(plan.IsPlanDeleted(clock.Now()), plan.HasPlanStatus(productcatalog.PlanStatusDraft, productcatalog.PlanStatusScheduled)); err != nil {\n\t\t\treturn nil, models.NewGenericValidationError(err)\n\t\t}\n\t\tplanAddon, err := s.adapter.CreatePlanAddon(ctx, params)\n\t\tif err != nil { return nil, err }\n\t\tif err = s.publisher.Publish(ctx, planaddon.NewPlanAddonCreateEvent(ctx, planAddon)); err != nil { return nil, err }\n\t\treturn planAddon, nil\n\t}\n\treturn transaction.Run(ctx, s.adapter, fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w117.json b/.archie/enrichments/w117.json new file mode 100644 index 0000000000..2295f05a63 --- /dev/null +++ b/.archie/enrichments/w117.json @@ -0,0 +1,231 @@ +{ + "openmeter/productcatalog/subscription/http": { + "purpose": "HTTP driver (package httpdriver) for the plan-to-subscription bridge: decodes subscription create/change/migrate/edit/cancel/continue/restore/delete/get/list requests, maps API DTOs to plansubscription domain inputs and subscription.Patch values, and delegates to PlanSubscriptionService, SubscriptionService, and SubscriptionWorkflowService. Primary constraint: it owns all subscription API translation, so request shape ambiguity (custom plan vs plan ref) is disambiguated here.", + "patterns": [ + { + "name": "httptransport handler triple", + "description": "Every endpoint is a method on *handler returning a httptransport.Handler/HandlerWithArgs built from (decode func, business func, encoder, AppendOptions with WithOperationName + WithErrorEncoder(errorEncoder())).", + "example": "func (h *handler) CreateSubscription() CreateSubscriptionHandler { return httptransport.NewHandler(decode, exec, commonhttp.JSONResponseEncoderWithStatus[...](http.StatusCreated), httptransport.AppendOptions(h.Options, httptransport.WithOperationName(\"createSubscription\"), httptransport.WithErrorEncoder(errorEncoder()))...) }" + }, + { + "name": "Request/Response/Params type aliases per endpoint", + "description": "Each file declares a type ( ... ) block aliasing XRequest (often = plansubscription.X), XResponse (= api.Y), XParams, and XHandler = httptransport.HandlerWithArgs[...]. Reuse plansubscription request types via alias rather than redefining.", + "example": "type ( CreateSubscriptionRequest = plansubscription.CreateSubscriptionRequest; CreateSubscriptionResponse = api.Subscription )" + }, + { + "name": "Namespace resolved via h.resolveNamespace", + "description": "Every decode func starts by calling h.resolveNamespace(ctx) and builds models.NamespacedID{Namespace: ns, ID: params.ID}; never read namespace any other way.", + "example": "ns, err := h.resolveNamespace(ctx); ... ID: models.NamespacedID{Namespace: ns, ID: params.ID}" + }, + { + "name": "Custom-plan vs plan-ref disambiguation by re-marshal probe", + "description": "create.go and change.go marshal the body then unmarshal into a local testForCustomPlan{CustomPlan any} to detect which oneOf variant is present, then call body.AsCustomSubscriptionCreate()/AsPlanSubscriptionCreate(). Do not rely on generated As* succeeding to pick a branch.", + "example": "type testForCustomPlan struct { CustomPlan any `json:\"customPlan\"` }; if t.CustomPlan != nil { parsedBody, _ := body.AsCustomSubscriptionCreate() } else { body.AsPlanSubscriptionCreate() }" + }, + { + "name": "API <-> domain mapping lives in mapping.go", + "description": "All conversions use Map* / From* helpers in mapping.go (MapSubscriptionToAPI, MapSubscriptionViewToAPI, MapAPISubscriptionEditOperationToPatch, MapAPITimingToTiming). Patch decoding switches on apiPatch.Discriminator() and builds patch.PatchAddItem/RemoveItem/AddPhase/etc.", + "example": "patches = append(patches, MapAPISubscriptionEditOperationToPatch(patch))" + }, + { + "name": "Validation errors wrapped as GenericValidationError", + "description": "Decode-time semantic failures (missing customizations, bad timing, credits disabled) return models.NewGenericValidationError(...); errorEncoder() in errors.go then maps domain error types to HTTP status via commonhttp.HandleErrorIfTypeMatches.", + "example": "return EditSubscriptionRequest{}, models.NewGenericValidationError(fmt.Errorf(\"missing customizations\"))" + }, + { + "name": "Credits feature-gate guard before custom-plan create/change", + "description": "Custom plans with productcatalog.CreditOnlySettlementMode are rejected unless h.isCreditsEnabled(ns) (featuregate.go) is true, which checks Credits.Enabled, FeatureGate, and Credits.FeatureFlag.", + "example": "if !creditEnabled && req.SettlementMode == productcatalog.CreditOnlySettlementMode { return ..., models.NewGenericValidationError(...) }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler interface, HandlerConfig (services + Credits + FeatureGate), *handler struct, NewHandler, resolveNamespace.", + "watch_for": "Adding an endpoint requires adding its method to the Handler interface or wiring breaks." + }, + { + "file": "create.go", + "role": "CreateSubscription + getCustomer helper (by id or key, rejects deleted customers).", + "watch_for": "Custom-plan branch must run the credits guard; getCustomer returns NewGenericPreConditionFailedError for deleted customers." + }, + { + "file": "change.go", + "role": "ChangeSubscription; same custom/ref split as create, builds ChangeSubscriptionWorkflowInput.", + "watch_for": "Custom branch maps plan name/description/metadata onto the subscription; keep credits guard in sync with create.go." + }, + { + "file": "migrate.go", + "role": "MigrateSubscription; passes TargetVersion/StartingPhase/Timing/BillingAnchor to PlanSubscriptionService.Migrate.", + "watch_for": "WithOperationName is \"MigrateSubscription\" (capitalized) unlike others \u2014 preserve exact operation names." + }, + { + "file": "edit.go", + "role": "EditSubscription; maps body.Customizations to []subscription.Patch via MapAPISubscriptionEditOperationToPatch and calls SubscriptionWorkflowService.EditRunning.", + "watch_for": "Empty customizations is a validation error; default timing is TimingImmediate." + }, + { + "file": "cancel.go", + "role": "Cancel/Continue/Restore handlers; Restore goes through SubscriptionWorkflowService, Cancel/Continue through SubscriptionService.", + "watch_for": "Cancel defaults timing to TimingImmediate when body.Timing is nil." + }, + { + "file": "mapping.go", + "role": "All API<->domain mappers incl. patch discriminator switch and MapSubscriptionItemToAPI (feature/entitlement/price/tax).", + "watch_for": "Patch switch must cover every api.EditSubscription*Op; unknown discriminator returns an error, not a panic." + }, + { + "file": "errors.go", + "role": "errorEncoder() maps subscription/entitlement/feature error types to HTTP status; mapValidationIssueForAPI remaps spec field selectors.", + "watch_for": "New domain error types are invisible to clients until added to the HandleErrorIfTypeMatches chain." + } + ], + "anti_patterns": [ + "Branching on body.As*() success instead of the testForCustomPlan probe to pick custom-plan vs plan-ref.", + "Reading the namespace from anywhere other than h.resolveNamespace(ctx).", + "Returning raw fmt.Errorf for client-facing validation failures instead of models.NewGenericValidationError (bypasses errorEncoder status mapping).", + "Calling adapters/services directly in the encoder or skipping WithErrorEncoder(errorEncoder()), so domain errors fall through as 500s.", + "Adding a handler method without registering it in the Handler interface." + ], + "decisions": [ + { + "decision": "Subscription create/change accept both a custom inline plan and a plan reference in one endpoint.", + "rationale": "The API uses a oneOf body; the marshal/unmarshal probe is the only reliable way to disambiguate because generated As* always succeed on serializable bodies." + }, + { + "decision": "Cancel/Continue/Restore/Edit are split between SubscriptionService and SubscriptionWorkflowService.", + "rationale": "Workflow-orchestrated operations (Restore, EditRunning, Change/Migrate via PlanSubscriptionService) go through the workflow layer; simple lifecycle ops stay on the base service." + } + ], + "code_examples": [ + { + "scenario": "Standard endpoint: resolve namespace, decode, call service, map to API, encode", + "code": "func (h *handler) CancelSubscription() CancelSubscriptionHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, params CancelSubscriptionParams) (CancelSubscriptionRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return CancelSubscriptionRequest{}, err }\n\t\t\tvar body api.CancelSubscriptionJSONRequestBody\n\t\t\tif err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CancelSubscriptionRequest{}, err }\n\t\t\ttiming, err := MapAPITimingToTiming(*body.Timing)\n\t\t\tif err != nil { return CancelSubscriptionRequest{}, models.NewGenericValidationError(err) }\n\t\t\treturn CancelSubscriptionRequest{Timing: timing, ID: models.NamespacedID{Namespace: ns, ID: params.ID}}, nil\n\t\t},\n\t\tfunc(ctx context.Context, req CancelSubscriptionRequest) (CancelSubscriptionResponse, error) {\n\t\t\tsub, err := h.SubscriptionService.Cancel(ctx, req.ID, req.Timing)\n\t\t\tif err != nil { return CancelSubscriptionResponse{}, err }\n\t\t\treturn MapSubscriptionToAPI(sub), nil\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[CancelSubscriptionResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.Options, httptransport.WithOperationName(\"cancelSubscription\"), httptransport.WithErrorEncoder(errorEncoder()))...,\n\t)\n}" + } + ] + }, + "openmeter/productcatalog/subscription/service": { + "purpose": "Service implementation (package service) of plansubscription.PlanSubscriptionService \u2014 the bridge that turns a plan (inline CreatePlanInput or a published plan reference) into a subscription via the subscription workflow layer. Owns Create, Change, Migrate plus plan-resolution/validation; it does not persist anything itself, it orchestrates WorkflowService and PlanService.", + "patterns": [ + { + "name": "Config struct + New returns the interface", + "description": "service embeds Config{WorkflowService, SubscriptionService, PlanService, Logger, CustomerService}; New(c Config) returns plansubscription.PlanSubscriptionService, never the concrete *service.", + "example": "func New(c Config) plansubscription.PlanSubscriptionService { return &service{Config: c} }" + }, + { + "name": "PlanInput dispatch: AsInput vs AsRef", + "description": "Create/Change first call request.PlanInput.Validate() (wrap failures in NewGenericValidationError), then branch: AsInput() -> PlanFromPlanInput, AsRef() -> getPlanByVersion + status/deleted checks, else hard error 'should have validated already'.", + "example": "if request.PlanInput.AsInput() != nil { plan, _ = PlanFromPlanInput(*request.PlanInput.AsInput()) } else if request.PlanInput.AsRef() != nil { ... }" + }, + { + "name": "Plan lifecycle validation before subscribing", + "description": "Referenced plans are validated against clock.Now(): reject if DeletedAt is past, and require PlanStatusActive (Migrate also allows PlanStatusArchived). Errors are models.NewGenericValidationError.", + "example": "if p.StatusAt(now) != productcatalog.PlanStatusActive { return def, models.NewGenericValidationError(...) }" + }, + { + "name": "StartingPhase zeroes earlier phases", + "description": "When request.StartingPhase is set, zeroPhasesBeforeStartingPhase sets each earlier phase Duration to ISODurationFromDuration(0) (does not delete them) and errors if the starting phase key is never found.", + "example": "phase.Duration = lo.ToPtr(datetime.ISODurationFromDuration(time.Duration(0)))" + }, + { + "name": "Delegation to WorkflowService", + "description": "Create calls WorkflowService.CreateFromPlan; Change/Migrate call WorkflowService.ChangeToPlan returning (current, next). This service never writes the subscription directly.", + "example": "curr, new, err := s.WorkflowService.ChangeToPlan(ctx, request.ID, request.WorkflowInput, plan)" + }, + { + "name": "Plan-not-found normalization", + "description": "getPlanByVersion uses defaultx.WithDefault(ref.Version, 0) (plan service treats 0 as latest) and maps plan.IsNotFound(err)/nil plan to subscription.NewPlanNotFoundError(planKey, version).", + "example": "if plan.IsNotFound(err) { return nil, subscription.NewPlanNotFoundError(planKey, version) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config, service struct, New, and zeroPhasesBeforeStartingPhase helper.", + "watch_for": "Config.WorkflowService and SubscriptionService are noted as potentially mergeable (TODO); all methods assume both are present." + }, + { + "file": "create.go", + "role": "Create: builds subscription.Plan then WorkflowService.CreateFromPlan, returns subView.Subscription.", + "watch_for": "Status check differs from Change (no archived allowance); keep validation order deleted-then-status." + }, + { + "file": "change.go", + "role": "Change: resolves plan, validates active-only, returns SubscriptionChangeResponse{Current, Next}.", + "watch_for": "Unlike Create, Change requires PlanStatusActive strictly and returns both current and next views." + }, + { + "file": "migrate.go", + "role": "Migrate: fetches current sub, requires PlanRef, resolves target version, allows Active OR Archived, computes timing.", + "watch_for": "Rejects target version <= current; timing falls back to NextBillingCycle when immediate cancel timing fails ValidateForAction." + }, + { + "file": "plan.go", + "role": "getPlanByVersion, PlanFromPlanInput (cheats key='cheat'/version=1 to pass validation then unsets), PlanFromPlan.", + "watch_for": "PlanFromPlanInput temporarily sets and clears Key/Version to satisfy plan.Validate(); defaults SettlementMode to CreditThenInvoice. Marked redundant TODO \u2014 keep in sync with adapter." + } + ], + "anti_patterns": [ + "Persisting subscriptions directly instead of delegating to WorkflowService.CreateFromPlan / ChangeToPlan.", + "Skipping request.PlanInput.Validate() or the deleted/status lifecycle checks before subscribing.", + "Returning bare fmt.Errorf for user-facing plan validation failures instead of models.NewGenericValidationError.", + "Allowing PlanStatusArchived in Create/Change (only Migrate permits archived plans).", + "Deleting earlier phases for StartingPhase instead of zeroing their Duration." + ], + "decisions": [ + { + "decision": "Inline custom plans reuse plan.CreatePlanInput by faking Key/Version for validation then clearing them.", + "rationale": "plan.Validate() requires key and reference, but custom subscription plans have none; PlanFromPlanInput notes this as deliberate cheating pending a partial productcatalog type." + }, + { + "decision": "Migrate accepts archived plans while Create/Change require active.", + "rationale": "Migration moves an existing subscription forward to a newer version that may already be archived, whereas new/changed subscriptions must point at an active plan." + } + ], + "code_examples": [ + { + "scenario": "Resolve a plan ref, validate lifecycle, and change subscription via the workflow service", + "code": "func (s *service) Change(ctx context.Context, request plansubscription.ChangeSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error) {\n\tvar def plansubscription.SubscriptionChangeResponse\n\tif err := request.PlanInput.Validate(); err != nil { return def, models.NewGenericValidationError(err) }\n\tvar plan subscription.Plan\n\tif request.PlanInput.AsRef() != nil {\n\t\tp, err := s.getPlanByVersion(ctx, request.ID.Namespace, *request.PlanInput.AsRef())\n\t\tif err != nil { return def, err }\n\t\tnow := clock.Now()\n\t\tif p.StatusAt(now) != productcatalog.PlanStatusActive { return def, models.NewGenericValidationError(fmt.Errorf(\"plan %s@%d is not active\", p.Key, p.Version)) }\n\t\tplan = PlanFromPlan(*p)\n\t}\n\tcurr, next, err := s.WorkflowService.ChangeToPlan(ctx, request.ID, request.WorkflowInput, plan)\n\tif err != nil { return def, err }\n\treturn plansubscription.SubscriptionChangeResponse{Current: curr, Next: next}, nil\n}" + } + ] + }, + "openmeter/productcatalog/subscription/testutils": { + "purpose": "Test-only helpers (package testutils) for the plan-to-subscription bridge. Provides PlanSubscriptionAdapter, a thin adapter over plan.Service that resolves a plansubscription.Plan from a PlanRefInput or a plan.CreatePlanInput, mirroring the production service's plan-resolution logic for use in subscription/billing tests.", + "patterns": [ + { + "name": "Interface + Config + constructor + compile assertion", + "description": "Declares PlanSubscriptionAdapter interface, PlanSubscriptionAdapterConfig{PlanService, Logger}, adapter struct embedding the config, var _ PlanSubscriptionAdapter = &adapter{}, and NewPlanSubscriptionAdapter(config).", + "example": "var _ PlanSubscriptionAdapter = &adapter{}; func NewPlanSubscriptionAdapter(config PlanSubscriptionAdapterConfig) PlanSubscriptionAdapter { return &adapter{config} }" + }, + { + "name": "Reuse production PlanFromPlanInput", + "description": "FromInput delegates straight to service.PlanFromPlanInput(input) instead of reimplementing the cheat-validation, keeping test behavior aligned with production.", + "example": "func (a *adapter) FromInput(...) (subscription.Plan, error) { return service.PlanFromPlanInput(input) }" + }, + { + "name": "PlanNotFound normalization mirrors service", + "description": "GetVersion uses defaultx.WithDefault(ref.Version, 0) and maps plan.IsNotFound / nil plan to subscription.NewPlanNotFoundError, and rejects deleted plans via clock.Now().", + "example": "if plan.IsNotFound(err) { return nil, subscription.NewPlanNotFoundError(planKey, version) }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Sole file: PlanSubscriptionAdapter interface (GetVersion, FromInput) and its plan.Service-backed implementation.", + "watch_for": "Marked 'TODO: we can get rid of this'; GetVersion duplicates service.getPlanByVersion logic plus a deleted-plan check \u2014 keep them aligned if either changes." + } + ], + "anti_patterns": [ + "Reimplementing plan-input-to-subscription.Plan conversion instead of calling service.PlanFromPlanInput.", + "Importing this test adapter from production (app/common) code \u2014 it lives under testutils and is intended for tests only.", + "Diverging GetVersion's not-found/deleted handling from the production service.getPlanByVersion." + ], + "decisions": [ + { + "decision": "The adapter exists as a slim re-implementation/wrapper of service plan resolution for tests.", + "rationale": "Tests need a PlanSubscriptionAdapter seam without pulling the full plansubscription service wiring; the TODO acknowledges it is a candidate for removal once APIs align." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w118.json b/.archie/enrichments/w118.json new file mode 100644 index 0000000000..3f8393e391 --- /dev/null +++ b/.archie/enrichments/w118.json @@ -0,0 +1,176 @@ +{ + "openmeter/progressmanager/adapter": { + "purpose": "Persistence layer for the progressmanager domain: a Redis-backed implementation of the progressmanager.Adapter interface that stores per-operation progress counters as JSON under namespaced keys with TTL expiration. Also ships noop and testify-mock variants.", + "patterns": [ + { + "name": "Config-validated constructor", + "description": "New(Config) validates via config.Validate() (Expiration>0, Redis!=nil, Logger!=nil) before constructing the unexported *adapter; never construct the struct directly.", + "example": "func New(config Config) (progressmanager.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Interface compile-time assertion", + "description": "Every concrete type asserts the parent interface: `var _ progressmanager.Adapter = (*adapter)(nil)` and `(*adapterNoop)(nil)`. Add the same line for any new variant.", + "example": "var _ progressmanager.Adapter = (*adapter)(nil)" + }, + { + "name": "Validate input before I/O", + "description": "Each adapter method calls input.Validate() first and wraps the error (fmt.Errorf(\"validate get progress input: %w\", err)) before touching Redis.", + "example": "if err := input.Validate(); err != nil { return nil, fmt.Errorf(\"validate get progress input: %w\", err) }" + }, + { + "name": "redis.Nil -> domain not-found", + "description": "Reads translate redis.Nil into models.NewGenericNotFoundError; other Redis errors are wrapped verbatim. Never leak redis.Nil upward.", + "example": "if cmd.Err() == redis.Nil { return nil, models.NewGenericNotFoundError(fmt.Errorf(\"progress not found for id: %s\", input.ProgressID.ID)) }" + }, + { + "name": "Namespaced JSON value storage", + "description": "UpsertProgress json.Marshal's the entity.Progress and SETs it with a.expiration TTL; GetProgress json.Unmarshal's it back. Keys built only via a.getKey(ProgressID).", + "example": "a.redis.Set(ctx, a.getKey(input.ProgressID), data, a.expiration)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config struct + Validate, New() Redis adapter constructor, NewNoop() constructor, struct definitions and interface assertions.", + "watch_for": "KeyPrefix is optional (empty allowed); Expiration/Redis/Logger are required. Don't add slog.Default() fallbacks \u2014 Logger is injected." + }, + { + "file": "progress.go", + "role": "Redis Get/Upsert implementations plus getKey() key builder.", + "watch_for": "getKey concatenates staticKeyPrefix (already ends in ':') with another ':' producing 'progress::ns:id' / ':progress::ns:id'. Both branches must stay in sync if the key scheme changes." + }, + { + "file": "noop.go", + "role": "adapterNoop methods: GetProgress always returns NotFound, UpsertProgress is a silent success.", + "watch_for": "Imports entity via the bare 'entity' alias here while progress.go uses the same path \u2014 keep noop's GetProgress returning NotFound so disabled progress tracking degrades gracefully." + }, + { + "file": "mock.go", + "role": "MockProgressManager (testify mock) implementing progressmanager.Service for service-layer tests.", + "watch_for": "Mocks the SERVICE interface (not Adapter) and declares DeleteProgressByRuntimeID, which is NOT on the current progressmanager.Service interface \u2014 drift; verify against service.go before relying on it." + } + ], + "anti_patterns": [ + "Constructing &adapter{...} directly, bypassing Config.Validate().", + "Returning redis.Nil to callers instead of models.NewGenericNotFoundError.", + "Skipping input.Validate() before Redis access.", + "Building Redis keys inline instead of through getKey().", + "Falling back to slog.Default() instead of requiring Config.Logger." + ], + "decisions": [ + { + "decision": "Redis (not Postgres/Ent) backs progress.", + "rationale": "Progress is ephemeral, high-churn operation telemetry; TTL expiration auto-evicts stale runs without migrations." + }, + { + "decision": "Noop and mock variants live alongside the real adapter.", + "rationale": "Lets DI wire a no-op when progress tracking is disabled and lets service tests use testify without Redis." + } + ], + "code_examples": [ + { + "scenario": "Construct the Redis-backed adapter", + "code": "import (\n \"github.com/redis/go-redis/v9\"\n \"github.com/openmeterio/openmeter/openmeter/progressmanager/adapter\"\n)\n\nadp, err := adapter.New(adapter.Config{\n Expiration: 24 * time.Hour,\n Redis: redisClient,\n Logger: logger,\n})\nif err != nil { return err }" + } + ] + }, + "openmeter/progressmanager/entity": { + "purpose": "Domain types and validation rules for the progressmanager package: ProgressID, Progress, and the GetProgressInput/UpsertProgressInput method-input wrappers. Pure data + Validate(), no I/O.", + "patterns": [ + { + "name": "errors.Join validation accumulation", + "description": "Every Validate() collects into `var errs []error` and returns errors.Join(errs...) \u2014 it never returns on the first failure. Nested validators are wrapped with field context.", + "example": "if err := a.NamespacedModel.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"namespaced model: %w\", err)) }" + }, + { + "name": "Embedded ID + NamespacedModel", + "description": "ProgressID embeds models.NamespacedModel (json inline) plus an ID string; Progress embeds ProgressID; inputs embed the domain type they carry. Reuse embedding rather than duplicating fields.", + "example": "type Progress struct { ProgressID `json:\"id\"`; Success uint64 ... }" + }, + { + "name": "Counter invariants in Validate", + "description": "Progress.Validate enforces Success+Failed<=Total, zero counters when Total==0, and non-zero UpdatedAt. New counter fields must extend these checks.", + "example": "if a.Success+a.Failed > a.Total { errs = append(errs, errors.New(\"success and failed must be less than or equal to total\")) }" + } + ], + "key_file_guides": [ + { + "file": "progressmanager.go", + "role": "Defines ProgressID, Progress, GetProgressInput, UpsertProgressInput and their Validate() methods.", + "watch_for": "Receivers are named `a` despite the types not being adapters; UpdatedAt is required (IsZero rejected). Input wrappers exist purely to keep method signatures stable as fields grow." + } + ], + "anti_patterns": [ + "Returning on the first validation error instead of accumulating with errors.Join.", + "Adding counter fields without updating the Success+Failed<=Total / Total==0 invariants.", + "Importing anything beyond pkg/models here \u2014 this folder must stay I/O-free." + ], + "decisions": [ + { + "decision": "Method inputs are dedicated structs (GetProgressInput/UpsertProgressInput) wrapping the domain type.", + "rationale": "Keeps adapter/service signatures stable and gives each call its own Validate() seam." + } + ], + "code_examples": [ + { + "scenario": "Build and validate an upsert input", + "code": "import (\n \"time\"\n \"github.com/openmeterio/openmeter/openmeter/progressmanager/entity\"\n \"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nin := entity.UpsertProgressInput{Progress: entity.Progress{\n ProgressID: entity.ProgressID{NamespacedModel: models.NamespacedModel{Namespace: ns}, ID: id},\n Success: 3, Total: 10, UpdatedAt: time.Now(),\n}}\nif err := in.Validate(); err != nil { return err }" + } + ] + }, + "openmeter/progressmanager/httpdriver": { + "purpose": "HTTP transport layer for the progressmanager domain: wraps progressmanager.Service in httptransport handlers, decoding the namespace from context and mapping entity.Progress to api.Progress. Read-only (GetProgress) endpoint surface.", + "patterns": [ + { + "name": "Nested Handler interface + handler struct", + "description": "Handler embeds ProgressHandler which exposes GetProgress() GetProgressHandler; the unexported handler{service, namespaceDecoder, options} implements it, asserted via `var _ Handler = (*handler)(nil)`.", + "example": "type ProgressHandler interface { GetProgress() GetProgressHandler }" + }, + { + "name": "httptransport.NewHandlerWithArgs three-func shape", + "description": "Each endpoint = (decode req from *http.Request + path arg) + (logic calling h.service) + JSONResponseEncoderWithStatus, with WithOperationName appended via httptransport.AppendOptions(h.options, ...).", + "example": "httptransport.NewHandlerWithArgs(decodeFn, logicFn, commonhttp.JSONResponseEncoderWithStatus[GetProgressResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getProgress\"))...)" + }, + { + "name": "Namespace from decoder, not request body", + "description": "resolveNamespace pulls the namespace via namespaceDecoder.GetNamespace(ctx); a missing namespace is a 500 commonhttp.NewHTTPError, never trusted from the client.", + "example": "ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return \"\", commonhttp.NewHTTPError(http.StatusInternalServerError, errors.New(\"internal server error\")) }" + }, + { + "name": "Type-alias request/response/handler triplet", + "description": "Requests reuse entity types (GetProgressRequest = entity.GetProgressInput), responses reuse api types (GetProgressResponse = api.Progress), handler aliases httptransport.HandlerWithArgs[...]. Domain->API mapping via local progressToAPI.", + "example": "type GetProgressResponse = api.Progress" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/ProgressHandler interfaces, handler struct, New(namespaceDecoder, service, options...), resolveNamespace helper.", + "watch_for": "Missing namespace returns 500 (internal), not 400 \u2014 it's expected to be set by upstream middleware." + }, + { + "file": "progress.go", + "role": "GetProgress() handler implementation and progressToAPI mapper.", + "watch_for": "service.GetProgress returning a nil *Progress with no error is treated as an internal error (fmt.Errorf), not 404 \u2014 404 must come from the adapter's NotFound. progressToAPI drops namespace/ID (api.Progress only carries counters + UpdatedAt)." + } + ], + "anti_patterns": [ + "Reading the namespace from the request body/query instead of namespaceDecoder.", + "Hand-rolling http.ResponseWriter encoding instead of commonhttp JSON encoders.", + "Omitting WithOperationName, which OpenAPI/operation routing relies on.", + "Mapping entity->API outside a dedicated *ToAPI function." + ], + "decisions": [ + { + "decision": "Only GetProgress is exposed over HTTP; UpsertProgress is internal.", + "rationale": "Progress is written by background streaming/clickhouse jobs, not clients; the API is read-only polling of operation status." + } + ], + "code_examples": [ + { + "scenario": "Map a domain Progress to the API type", + "code": "import (\n \"github.com/openmeterio/openmeter/api\"\n progressmanagerentity \"github.com/openmeterio/openmeter/openmeter/progressmanager/entity\"\n)\n\nfunc progressToAPI(p progressmanagerentity.Progress) api.Progress {\n return api.Progress{Success: p.Success, Failed: p.Failed, Total: p.Total, UpdatedAt: p.UpdatedAt}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w119.json b/.archie/enrichments/w119.json new file mode 100644 index 0000000000..35528b179c --- /dev/null +++ b/.archie/enrichments/w119.json @@ -0,0 +1,67 @@ +{ + "openmeter/registry/builder": { + "purpose": "In-domain composition root that wires the entitlement/credit/grant/feature stack into a single registry.Entitlement aggregate. GetEntitlementRegistry is the one assembly function consumed by app/common DI and by tests that need a fully-wired entitlement system without the full Wire graph.", + "patterns": [ + { + "name": "Single options-in, registry-out builder", + "description": "Wiring is exposed as one exported func GetEntitlementRegistry(opts EntitlementOptions) *registry.Entitlement; all external dependencies arrive via the EntitlementOptions struct, not package globals or slog.Default().", + "example": "func GetEntitlementRegistry(opts EntitlementOptions) *registry.Entitlement { ... return ®istry.Entitlement{...} }" + }, + { + "name": "Adapters before connectors before services", + "description": "Construction follows a strict bottom-up order: Postgres repo adapters (NewPostgresFeatureRepo, NewPostgresEntitlementRepo, NewPostgresGrantRepo, NewPostgresBalanceSnapshotRepo) first, then connectors (feature, owner, credit, metered), then the entitlement service last.", + "example": "featureDBAdapter := productcatalogpgadapter.NewPostgresFeatureRepo(opts.DatabaseClient, opts.Logger)" + }, + { + "name": "Config-struct constructors", + "description": "Connectors/services that take many deps are built with a typed config literal (balance.SnapshotServiceConfig, credit.CreditConnectorConfig, entitlementservice.ServiceConfig) rather than long positional arg lists.", + "example": "creditConnector := credit.NewCreditConnector(credit.CreditConnectorConfig{GrantRepo: grantDBAdapter, ...})" + }, + { + "name": "Shared creditConnector aliasing", + "description": "One credit.NewCreditConnector instance is aliased to both creditBalanceConnector and grantConnector \u2014 the same object satisfies credit.BalanceConnector and credit.GrantConnector; do not build two separate connectors.", + "example": "creditBalanceConnector := creditConnector; grantConnector := creditConnector" + }, + { + "name": "Hook registration at wire time", + "description": "Subscription and credit hooks are attached here via RegisterHooks on the metered and entitlement connectors, not inside the connector constructors.", + "example": "entitlementConnector.RegisterHooks(entitlementsubscriptionhook.NewEntitlementSubscriptionHook(...), credithook.NewEntitlementHook(grantDBAdapter))" + }, + { + "name": "All nine registry fields populated", + "description": "The returned *registry.Entitlement must set every field (Feature, FeatureRepo, EntitlementOwner, CreditBalance, Grant, GrantRepo, MeteredEntitlement, Entitlement, EntitlementRepo) so downstream consumers can rely on non-nil connectors.", + "example": "return ®istry.Entitlement{Feature: featureConnector, FeatureRepo: featureDBAdapter, ...}" + } + ], + "key_file_guides": [ + { + "file": "entitlement.go", + "role": "Defines EntitlementOptions and GetEntitlementRegistry \u2014 the sole builder that assembles feature, credit/grant, balance snapshot, metered/static/boolean entitlement connectors plus the entitlement service into registry.Entitlement.", + "watch_for": "enttx.NewCreator(opts.DatabaseClient) supplies TransactionManager to the credit connector; Granularity is hardcoded to time.Minute and SnapshotGracePeriod comes from opts.EntitlementsConfiguration.GetGracePeriod(); the static/boolean connectors are constructed inline with no args." + } + ], + "anti_patterns": [ + "Building two separate credit connectors instead of aliasing one creditConnector to both CreditBalance and Grant.", + "Using slog.Default() or package-level globals instead of taking Logger/Tracer/Publisher through EntitlementOptions.", + "Registering hooks inside connector constructors rather than via RegisterHooks here at wire time.", + "Returning a *registry.Entitlement with any field left nil.", + "Adding business logic or queries here \u2014 this folder is composition only; logic belongs in the connector/service packages it wires." + ], + "decisions": [ + { + "decision": "Keep entitlement-stack wiring in an in-domain builder separate from app/common Wire registries.", + "rationale": "Lets tests (subscription/testutils, test/app, test/billing, test/customer) build a real entitlement system from one call without importing the full application DI graph, avoiding import cycles." + }, + { + "decision": "Reuse a single credit connector for both balance and grant roles.", + "rationale": "credit.NewCreditConnector implements both credit.BalanceConnector and credit.GrantConnector, so one instance keeps grant accounting and balance snapshotting consistent." + } + ], + "code_examples": [ + { + "scenario": "Assemble a fully-wired entitlement registry from external dependencies.", + "code": "import (\n\tregistrybuilder \"github.com/openmeterio/openmeter/openmeter/registry/builder\"\n\t\"github.com/openmeterio/openmeter/openmeter/registry\"\n)\n\nreg := registrybuilder.GetEntitlementRegistry(registrybuilder.EntitlementOptions{\n\tDatabaseClient: dbClient,\n\tEntitlementsConfiguration: cfg.Entitlements,\n\tStreamingConnector: streamingConn,\n\tLogger: logger,\n\tMeterService: meterSvc,\n\tCustomerService: customerSvc,\n\tPublisher: publisher,\n\tTracer: tracer,\n\tLocker: locker,\n})\nvar _ *registry.Entitlement = reg" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w12.json b/.archie/enrichments/w12.json new file mode 100644 index 0000000000..1e681a3a9d --- /dev/null +++ b/.archie/enrichments/w12.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/flatfee": { + "purpose": "Flat-fee charge type package: defines the domain model (Charge/ChargeBase, Intent, State, RealizationRun) and the segmented Adapter/Handler/Service interface contracts for fixed-amount charges, including proration math and the dotted per-settlement-mode Status hierarchy. The package root holds value types and interfaces only; service/ implements lifecycle state machines and adapter/ implements Ent persistence.", + "patterns": [ + { + "name": "Every input/domain type has a Validate() that collects errs", + "description": "All structs implement Validate() accumulating into var errs []error and returning models.NewNillableGenericValidationError(errors.Join(errs...)), wrapping nested errors with field context via fmt.Errorf(\"field: %w\", err).", + "example": "func (i CreateChargesInput) Validate() error { var errs []error; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Segmented adapter interfaces composed into one Adapter", + "description": "Adapter embeds ChargeAdapter, ChargeDetailedLineAdapter, ChargeCreditAllocationAdapter, ChargeRunAdapter, ChargeInvoicedUsageAdapter, ChargePaymentAdapter plus entutils.TxCreator. New persistence methods go on the narrow sub-interface, not a monolith.", + "example": "type Adapter interface { ChargeAdapter; ChargeDetailedLineAdapter; ...; entutils.TxCreator }" + }, + { + "name": "Status strings hierarchically encode meta.ChargeStatus", + "description": "Status constants are dotted paths (e.g. \"active.realization.started\"); ToMetaChargeStatus() splits on the first '.' and validates the prefix against meta.ChargeStatus. Never persist a flat-fee Status without mapping through ToMetaChargeStatus().", + "example": "metaStatus := meta.ChargeStatus(strings.SplitN(string(s), \".\", 2)[0])" + }, + { + "name": "Update inputs use mo.Option for partial patches", + "description": "UpdateRealizationRunInput fields are mo.Option[T]; only IsPresent() fields are written, and Validate() guards each present field individually (non-empty LineID, non-zero DeletedAt, etc.).", + "example": "Type mo.Option[RealizationRunType]; LineID mo.Option[*string]; if r.LineID.IsPresent() { ... }" + }, + { + "name": "Decimal amounts rounded through the currency Calculator", + "description": "All monetary math (Intent.Normalized, CalculateAmountAfterProration) obtains i.Currency.Calculator() and calls RoundToPrecision before returning; negative amounts are a validation error everywhere.", + "example": "calc, err := i.Currency.Calculator(); return calc.RoundToPrecision(amount), nil" + }, + { + "name": "Normalized() canonicalizes timestamps/periods before compare/persist", + "description": "Intent, State, RealizationRunBase, and UpdateRealizationRunInput expose Normalized() routing through meta.NormalizeTimestamp / NormalizeOptionalTimestamp / NormalizeClosedPeriod so equality and persistence are stable.", + "example": "s.AdvanceAfter = meta.NormalizeOptionalTimestamp(s.AdvanceAfter)" + }, + { + "name": "Handler is an event-callback contract returning ledger/credit values", + "description": "Handler methods (OnAllocateCredits, OnInvoiceUsageAccrued, OnCorrectCreditAllocations, OnPayment*) take an *Input value and return creditrealization/ledgertransaction value types; they describe lifecycle events, not direct persistence.", + "example": "OnAllocateCredits(ctx, OnAllocateCreditsInput) (creditrealization.CreateAllocationInputs, error)" + } + ], + "key_file_guides": [ + { + "file": "charge.go", + "role": "Core domain model: ChargeBase (meta.ManagedResource + Intent + Status + State), Charge (adds Realizations, is the meta.ChargeAccessor), Intent with proration config, State, Realizations.GetByLineID.", + "watch_for": "Mutate Charge via WithStatus/WithBase, not piecemeal field assignment. Intent.Normalized rounds AmountBeforeProration \u2014 call it before persisting." + }, + { + "file": "charge.go (CalculateAmountAfterProration)", + "role": "Proration math: returns AmountBeforeProration unchanged unless ProRating.Enabled and Mode==ProRatePrices and ServicePeriod < FullServicePeriod.", + "watch_for": "Proration must never increase the amount; zero-length or ServicePeriod>=FullServicePeriod returns the full amount; result is currency-rounded. See charge_test.go for the 15/31-day and JPY zero-decimal cases." + }, + { + "file": "adapter.go", + "role": "Declares the composed Adapter interface, its narrow sub-interfaces, and create/get input types (CreateChargesInput, CreateCurrentRunInput, GetByIDsInput, IntentWithInitialStatus).", + "watch_for": "validateExpands enforces ExpandDetailedLines requires ExpandRealizations and ExpandDeletedRealizations requires ExpandRealizations. CreateCurrentRunInput requires LineID and InvoiceID together (both nil or both set)." + }, + { + "file": "realizationrun.go", + "role": "RealizationRun model: RealizationRunBase, RealizationRun (adds CreditRealizations/AccruedUsage/Payment/DetailedLines), RealizationRunType enum, UpdateRealizationRunInput, IsVoidedBillingHistory.", + "watch_for": "InitialType must never be RealizationRunTypeInvalidDueToUnsupportedCreditNote (validation rejects it). Immutable runs cannot mutate the invoice line in place \u2014 deletion requires a credit note. IsVoidedBillingHistory is true for voided-type or DeletedAt!=nil runs." + }, + { + "file": "statemachine.go", + "role": "Defines the Status enum (dotted hierarchy) and ToMetaChargeStatus mapping; the actual state machines live in service/.", + "watch_for": "Adding a Status requires updating both the const block and Values(); the dotted prefix must be a valid meta.ChargeStatus or ToMetaChargeStatus fails." + }, + { + "file": "handler.go", + "role": "Handler interface plus its On*Input value types (OnAllocateCreditsInput, OnInvoiceUsageAccruedInput, CorrectCreditAllocationsInput, PaymentEventInput).", + "watch_for": "CorrectCreditAllocationsInput has both Validate() and ValidateWith(currencyCalculator) \u2014 currency-sensitive correction checks only run in ValidateWith. OnPaymentAuthorized/Settled share the PaymentEventInput alias." + }, + { + "file": "bookedat.go", + "role": "UsageBookedAt: ledger booking time = ServicePeriod.To for InArrears, ServicePeriod.From otherwise.", + "watch_for": "Drives credit/ledger booking timestamps \u2014 keep aligned with productcatalog.PaymentTermType semantics." + }, + { + "file": "detailedline.go / prorating.go", + "role": "detailedline.go aliases DetailedLine = stddetailedline.Base and adds DetailedLines Clone/Validate; prorating.go maps productcatalog ProRating modes to ProRatingModeAdapterEnum.", + "watch_for": "ProRatingModeAdapterEnum adds a no_prorate value absent from productcatalog \u2014 keep Values() in sync when persisting the adapter-side mode." + } + ], + "anti_patterns": [ + "Returning on the first invalid field instead of collecting into var errs []error and joining via models.NewNillableGenericValidationError.", + "Persisting a flat-fee Status or amount without normalizing (Normalized()) and mapping through ToMetaChargeStatus() / currency RoundToPrecision first.", + "Adding a persistence method to a fat single interface rather than the correct narrow sub-interface (ChargeAdapter/ChargeRunAdapter/...).", + "Allowing proration to increase the amount, or skipping the zero-length / ServicePeriod>=FullServicePeriod guards in CalculateAmountAfterProration.", + "Mutating an invoice line in place for an Immutable RealizationRun instead of issuing a credit note, or setting InitialType to the unsupported-credit-note voided type." + ], + "decisions": [ + { + "decision": "Status is a dotted string hierarchy rather than a flat enum.", + "rationale": "Fine-grained lifecycle states (active.realization.*) collapse to coarse meta.ChargeStatus via a prefix split, so the broader billing system sees a small stable status set while flat-fee tracks detailed realization progress." + }, + { + "decision": "The Adapter is split into six narrow capability interfaces composed into one.", + "rationale": "Charge, run, detailed-line, credit-allocation, payment, and invoiced-usage persistence concerns evolve independently and can be mocked/implemented in isolation while still backed by one Ent adapter struct." + }, + { + "decision": "Domain types carry both Validate() and Normalized(), and amount math is currency-aware in the model layer.", + "rationale": "Proration and rounding correctness is a billing invariant; keeping it on Intent/RealizationRun (not the service) guarantees every caller \u2014 production wiring and tests \u2014 gets identical rounded, validated values." + } + ], + "code_examples": [ + { + "scenario": "Currency-aware proration on the Intent domain type", + "code": "func (i Intent) CalculateAmountAfterProration() (alpacadecimal.Decimal, error) {\n\tif !i.ProRating.Enabled || i.ProRating.Mode != productcatalog.ProRatingModeProratePrices {\n\t\treturn i.AmountBeforeProration, nil\n\t}\n\tsp := int64(i.ServicePeriod.Duration())\n\tfull := int64(i.FullServicePeriod.Duration())\n\tif sp == 0 || full == 0 || sp >= full {\n\t\treturn i.AmountBeforeProration, nil\n\t}\n\tpct := alpacadecimal.NewFromInt(sp).Div(alpacadecimal.NewFromInt(full))\n\tcalc, err := i.Currency.Calculator()\n\tif err != nil {\n\t\treturn alpacadecimal.Decimal{}, fmt.Errorf(\"creating currency calculator: %w\", err)\n\t}\n\treturn calc.RoundToPrecision(i.AmountBeforeProration.Mul(pct)), nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w120.json b/.archie/enrichments/w120.json new file mode 100644 index 0000000000..0ca537a7ae --- /dev/null +++ b/.archie/enrichments/w120.json @@ -0,0 +1,174 @@ +{ + "openmeter/secret/adapter": { + "purpose": "Plaintext, in-memory implementation of the secret.Adapter interface used to store/retrieve app secrets (e.g. Stripe API keys). The ID and the value are identical here; production deployments are expected to swap this for a real secret store without changing the interface.", + "patterns": [ + { + "name": "Stateless struct adapter", + "description": "The adapter is an empty struct constructed via New() returning the secret.Adapter interface; it holds no DB client or state.", + "example": "func New() secret.Adapter { return &adapter{} }; type adapter struct{}" + }, + { + "name": "Compile-time interface assertion", + "description": "A var _ secret.Adapter = (*adapter)(nil) line guarantees the struct satisfies the interface from openmeter/secret.", + "example": "var _ secret.Adapter = (*adapter)(nil)" + }, + { + "name": "ID-equals-value plaintext encoding", + "description": "CreateAppSecret/UpdateAppSecret build the SecretID with NewSecretID(input.AppID, input.Value, input.Key) so the stored ID literally is the value; GetAppSecret reverses this by reading value := input.ID.", + "example": "return secretentity.NewSecretID(input.AppID, input.Value, input.Key), nil" + }, + { + "name": "No validation at adapter layer", + "description": "Adapter methods do not call input.Validate(); validation is the service layer's responsibility. Adapter trusts its inputs.", + "example": "func (a adapter) CreateAppSecret(ctx, input) (...) { return secretentity.NewSecretID(...), nil }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Constructor New() and the empty adapter struct plus the interface assertion.", + "watch_for": "New() returns the secret.Adapter interface, not *adapter; keep the var _ assertion in sync if methods change." + }, + { + "file": "secret.go", + "role": "Implements the four SecretAdapter methods (Create/Update/Get/Delete AppSecret).", + "watch_for": "This is a plaintext stub \u2014 Get returns the ID as the value and Delete is a no-op. Do NOT treat this as secure storage; a real secret-store impl must change the ID<->value mapping." + } + ], + "anti_patterns": [ + "Putting input validation here \u2014 that belongs in openmeter/secret/service.", + "Adding persistence/DB state to the struct without also threading namespacing and tx-awareness used elsewhere in the codebase.", + "Assuming GetAppSecret performs a lookup \u2014 it just echoes input.ID back as the value." + ], + "decisions": [ + { + "decision": "ID and value are identical in this implementation.", + "rationale": "It is an intentional plaintext placeholder; real implementations would store the value in an external secret store and return an opaque reference ID." + } + ], + "code_examples": [ + { + "scenario": "Constructing the secret store adapter and creating a secret", + "code": "import (\n\t\"github.com/openmeterio/openmeter/openmeter/secret/adapter\"\n\tsecretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"\n)\n\na := adapter.New()\nid, err := a.CreateAppSecret(ctx, secretentity.CreateAppSecretInput{AppID: appID, Key: \"stripe-api-key\", Value: secretValue})" + } + ] + }, + "openmeter/secret/entity": { + "purpose": "Domain types for the secret package: SecretID (a NamespacedID scoped to an app + key), Secret (id + value), the input structs for each operation, and the typed SecretNotFoundError. This is the shared vocabulary imported by adapter, service, server, and the Stripe app.", + "patterns": [ + { + "name": "Self-validating value objects", + "description": "Every type (SecretID, Secret, CreateAppSecretInput, UpdateAppSecretInput) exposes a Validate() error that returns models.NewGenericValidationError wrapping the first failure.", + "example": "func (i CreateAppSecretInput) Validate() error { if err := i.AppID.Validate(); err != nil { return models.NewGenericValidationError(errors.New(\"app id is invalid\")) } ... }" + }, + { + "name": "NamespacedID embedding for tenancy", + "description": "SecretID embeds models.NamespacedID; NewSecretID derives Namespace from appID.Namespace so every secret is tenant-scoped.", + "example": "SecretID{ NamespacedID: models.NamespacedID{Namespace: appID.Namespace, ID: id}, AppID: appID, Key: key }" + }, + { + "name": "Type aliases for read/delete inputs", + "description": "GetAppSecretInput and DeleteAppSecretInput are plain aliases for SecretID (= SecretID), not new structs, because those operations need nothing beyond the id.", + "example": "type GetAppSecretInput = SecretID; type DeleteAppSecretInput = SecretID" + }, + { + "name": "Typed not-found error with detector", + "description": "SecretNotFoundError wraps models.NewGenericNotFoundError and ships an IsSecretNotFoundError(err) helper using errors.As; it asserts models.GenericError compliance.", + "example": "var _ models.GenericError = (*SecretNotFoundError)(nil); func IsSecretNotFoundError(err error) bool { var e *SecretNotFoundError; return errors.As(err, &e) }" + }, + { + "name": "Package name differs from directory", + "description": "The package is named secretentity (not entity); importers alias it as secretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\".", + "example": "package secretentity" + } + ], + "key_file_guides": [ + { + "file": "secret.go", + "role": "Defines SecretID + NewSecretID constructor and Secret, each with Validate().", + "watch_for": "Key is required by SecretID.Validate(); a SecretID is invalid without it even if NamespacedID is set." + }, + { + "file": "input.go", + "role": "Create/Update input structs plus the Get/Delete type aliases.", + "watch_for": "CreateAppSecretInput.Validate flattens AppID errors to a generic 'app id is invalid' message, while UpdateAppSecretInput.Validate returns the underlying AppID/SecretID error verbatim \u2014 they are deliberately inconsistent." + }, + { + "file": "errors.go", + "role": "SecretNotFoundError type and IsSecretNotFoundError detector.", + "watch_for": "Use IsSecretNotFoundError for detection rather than direct type asserts; the message string says 'app with id ... not found' even though it is a secret error." + } + ], + "anti_patterns": [ + "Constructing SecretID literals directly instead of via NewSecretID \u2014 you risk leaving Namespace unset.", + "Returning raw errors from Validate() instead of wrapping in models.NewGenericValidationError.", + "Adding a value field to SecretID \u2014 the value lives only on Secret, never on the ID." + ], + "decisions": [ + { + "decision": "Get/Delete inputs are aliases of SecretID.", + "rationale": "Those operations are fully addressed by the id; a separate struct would add no fields." + } + ], + "code_examples": [ + { + "scenario": "Building and validating a namespaced secret id", + "code": "import secretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"\n\nid := secretentity.NewSecretID(appID, value, \"stripe-api-key\")\nif err := id.Validate(); err != nil { return err }" + } + ] + }, + "openmeter/secret/service": { + "purpose": "Service layer for the secret package: a thin pass-through that validates every input via input.Validate() before delegating to the configured secret.Adapter. It is the only layer that enforces validation.", + "patterns": [ + { + "name": "Validate-then-delegate", + "description": "Each method calls input.Validate(), wraps any failure in models.NewGenericValidationError with an operation-specific prefix, then forwards to the matching s.adapter method.", + "example": "if err := input.Validate(); err != nil { return secretentity.SecretID{}, models.NewGenericValidationError(fmt.Errorf(\"error create app secret: %w\", err)) }; return s.adapter.CreateAppSecret(ctx, input)" + }, + { + "name": "Config-validated constructor", + "description": "New(config Config) validates Config (adapter must be non-nil) and returns (*Service, error); the adapter is the sole dependency.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{adapter: config.Adapter}, nil }" + }, + { + "name": "Dual interface assertions", + "description": "Service asserts both secret.Service (service.go) and secret.SecretService (secret.go) at compile time, mirroring the interface composition in the parent package.", + "example": "var _ secret.Service = (*Service)(nil); var _ secret.SecretService = (*Service)(nil)" + }, + { + "name": "Package name differs from directory", + "description": "Package is secretservice, not service; wired by app/common and the Stripe test setup.", + "example": "package secretservice" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct, Config + Config.Validate (adapter non-nil), and New constructor.", + "watch_for": "adapter is the only field; New returns an error rather than panicking when Config is invalid." + }, + { + "file": "secret.go", + "role": "The four CRUD methods, each validating then delegating to the adapter.", + "watch_for": "UpdateAppSecret returns input.SecretID (not an empty id) on validation failure \u2014 keep that shape if extending." + } + ], + "anti_patterns": [ + "Skipping input.Validate() in a method \u2014 the service layer is the validation boundary above the adapter.", + "Adding business logic beyond validation+delegation; this service is intentionally a thin wrapper.", + "Falling back to slog.Default() or a nil adapter instead of requiring Config.Adapter." + ], + "decisions": [ + { + "decision": "Service does nothing but validate and delegate.", + "rationale": "Secret storage logic lives in the swappable adapter; the service guarantees inputs are valid regardless of which adapter (plaintext or real store) is wired." + } + ], + "code_examples": [ + { + "scenario": "Wiring the service over an adapter", + "code": "import (\n\tsecretservice \"github.com/openmeterio/openmeter/openmeter/secret/service\"\n\t\"github.com/openmeterio/openmeter/openmeter/secret/adapter\"\n)\n\nsvc, err := secretservice.New(secretservice.Config{Adapter: adapter.New()})\nif err != nil { return nil, err }" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w121.json b/.archie/enrichments/w121.json new file mode 100644 index 0000000000..42352ea1dd --- /dev/null +++ b/.archie/enrichments/w121.json @@ -0,0 +1,101 @@ +{ + "openmeter/server/router": { + "purpose": "Implements the generated legacy v1/v2 api.ServerInterface (api/api.gen.go) as a single *Router type whose methods are thin adapters: each handler method translates oapi-codegen path/query params into a domain httpdriver/httphandler request and calls .With(...).ServeHTTP(w, r). The Router owns no business logic \u2014 it only wires per-domain HTTP handlers built in NewRouter from injected services.", + "patterns": [ + { + "name": "Thin delegating handler methods", + "description": "Every (a *Router) Xxx method is one-to-two lines: build the driver's params struct, then a..().With(params).ServeHTTP(w, r). No business logic, no DB access, no error handling beyond what the driver does.", + "example": "func (a *Router) GetInvoice(w, r, invoiceId, params) { a.billingHandler.GetInvoice().With(httpdriver.GetInvoiceParams{InvoiceID: invoiceId, Expand: lo.FromPtr(params.Expand)}).ServeHTTP(w, r) }" + }, + { + "name": "One file per domain, methods named after ServerInterface", + "description": "Operations are grouped into per-domain files (billing.go, customer.go, entitlement.go, notification.go, etc.). Method names and signatures MUST match the generated api.ServerInterface exactly; the `var _ api.ServerInterface = (*Router)(nil)` assertion in router.go enforces total coverage at compile time.", + "example": "func (a *Router) ListAddons(w http.ResponseWriter, r *http.Request, params api.ListAddonsParams)" + }, + { + "name": "Param mapping via driver-specific structs", + "description": "When a driver needs more than a raw id/params, build the driver's own *Params struct (e.g. httpdriver.GetCustomerOverrideParams, entitlementdriver.GetEntitlementValueHandlerParams) at the call site. Use lo.FromPtr / lo.FromPtrOr to flatten optional api params, never hand-rolled nil checks.", + "example": "a.appHandler.ListCustomerData().With(apphttpdriver.ListCustomerDataParams{ListCustomerAppDataParams: params, CustomerIdOrKey: customerIdOrKey})" + }, + { + "name": "Handler construction concentrated in NewRouter", + "description": "All domain handlers are stored as unexported fields on Router and built once in NewRouter using each driver's New/NewXxxHandler constructor, passing the StaticNamespaceDecoder (default namespace) and httptransport.WithErrorHandler(config.ErrorHandler). No handler is constructed inside a request method.", + "example": "router.billingHandler = ... ; staticNamespaceDecoder := namespacedriver.StaticNamespaceDecoder(config.NamespaceManager.GetDefaultNamespace())" + }, + { + "name": "Config dependency validation", + "description": "Config carries every domain service/connector; Config.Validate() rejects nil required dependencies and NewRouter returns an error if validation fails. Adding a new dependency means adding the field, a nil-check in Validate(), and wiring in NewRouter.", + "example": "if c.Billing == nil { return errors.New(\"billing service is required\") }" + }, + { + "name": "Unimplemented endpoints explicit", + "description": "Routes not yet built return http.StatusNotImplemented inline (VoidInvoiceAction, RecalculateInvoiceTaxAction, MarketplaceOAuth2Install*) rather than relying on api.Unimplemented; noop.go keeps `var unimplemented api.ServerInterface = api.Unimplemented{}` available for future codegen gaps.", + "example": "func (a *Router) VoidInvoiceAction(...) { w.WriteHeader(http.StatusNotImplemented) }" + } + ], + "key_file_guides": [ + { + "file": "router.go", + "role": "Defines Config (all injected services), Config.Validate(), the Router struct with all handler fields, NewRouter() which builds every handler, and the api.ServerInterface compile-time assertion. Also registers cloudevents JSON body decoders for openapi3filter in init().", + "watch_for": "New endpoints need a corresponding handler field + constructor call here; forgetting the Validate() nil-check or the field breaks DI silently at runtime. Spec validation itself lives in the sibling openmeter/server package, not here." + }, + { + "file": "billing.go", + "role": "Invoice lifecycle and billing-profile/customer-override endpoints. Progress actions (advance/approve/retry/snapshot-quantities) all funnel through a.billingHandler.ProgressInvoice().With(ProgressInvoiceParams{...}).", + "watch_for": "VoidInvoiceAction and RecalculateInvoiceTaxAction are intentionally 501 Not Implemented \u2014 do not assume they work." + }, + { + "file": "entitlement.go", + "role": "Largest file: v1 subject-scoped, v1 customer-scoped, v2 entitlement and v2 customer-scoped entitlement endpoints, split across entitlementHandler, meteredEntitlementHandler, entitlementV2Handler, and customerHandler.", + "watch_for": "Three different handlers serve entitlement routes; pick the one matching v1/v2 and subject/customer scope. Section comment banners delimit the groups." + }, + { + "file": "noop.go", + "role": "Holds the api.Unimplemented fallback instance for codegen-defined-but-unbuilt operations.", + "watch_for": "Prefer explicit StatusNotImplemented inline (per the file comment) over deferring to this for partially-built domains." + }, + { + "file": "portal.go", + "role": "Portal token endpoints plus QueryPortalMeter, which authenticates via authenticator.GetAuthenticatedSubject and forwards to a.QueryMeter with the subject filter applied.", + "watch_for": "QueryPortalMeter is not yet migrated to an httpdriver \u2014 it builds api.QueryMeterParams and re-enters the router method directly; keep the subject scoping when editing." + }, + { + "file": "appstripe.go", + "role": "Stripe webhook + API key + checkout endpoints. AppStripeWebhook reads the raw body (capped via http.MaxBytesReader) before delegating.", + "watch_for": "Webhook reads r.Body manually; this is one of the few methods doing IO before delegation \u2014 preserve the MaxBytesReader cap and error->StatusProblem handling." + }, + { + "file": "meter.go", + "role": "Meter CRUD + query endpoints; QueryMeter/QueryMeterPost branch to CSV vs JSON handlers based on commonhttp.GetMediaType(r).", + "watch_for": "Content negotiation is done here, not in the driver \u2014 text/csv routes to QueryMeterCSV()/QueryMeterPostCSV()." + } + ], + "anti_patterns": [ + "Putting business logic, DB queries, or validation inside a Router method instead of the domain httpdriver/httphandler.", + "Adding a method whose name/signature does not match the generated api.ServerInterface \u2014 breaks the `var _ api.ServerInterface = (*Router)(nil)` assertion.", + "Constructing a domain handler inside a request method instead of once in NewRouter and storing it as a Router field.", + "Adding a new injected dependency to Config without a nil-check in Validate() and wiring in NewRouter.", + "Hand-rolling nil/pointer flattening for optional api params instead of lo.FromPtr / lo.FromPtrOr." + ], + "decisions": [ + { + "decision": "Router is a pure adapter over oapi-codegen ServerInterface; each method just maps params and delegates to a domain driver.", + "rationale": "Keeps the legacy v1 transport layer mechanical and lets domain packages own request decoding/validation/response shaping, so the generated interface contract is satisfied without duplicating logic." + }, + { + "decision": "All handlers built in NewRouter from a single Config of injected services using StaticNamespaceDecoder for the default namespace.", + "rationale": "Centralizes DI and namespace resolution; the legacy API operates against the single default namespace, so the decoder is static rather than request-derived." + }, + { + "decision": "Unbuilt endpoints return explicit 501 inline rather than codegen Unimplemented.", + "rationale": "Makes the not-yet-implemented surface visible and greppable in the per-domain file rather than hidden behind a shared fallback." + } + ], + "code_examples": [ + { + "scenario": "Adding a legacy v1 endpoint: map oapi-codegen params to a driver request and delegate.", + "code": "import (\n\t\"net/http\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/httpdriver\"\n)\n\nfunc (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params api.GetInvoiceParams) {\n\ta.billingHandler.GetInvoice().With(httpdriver.GetInvoiceParams{\n\t\tInvoiceID: invoiceId,\n\t\tExpand: lo.FromPtr(params.Expand),\n\t\tIncludeDeletedLines: lo.FromPtr(params.IncludeDeletedLines),\n\t}).ServeHTTP(w, r)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w122.json b/.archie/enrichments/w122.json new file mode 100644 index 0000000000..7868863d9f --- /dev/null +++ b/.archie/enrichments/w122.json @@ -0,0 +1,51 @@ +{ + "openmeter/sink/models": { + "purpose": "Shared data-transfer types for the sink-worker pipeline. Defines SinkMessage (a Kafka event in flight) and its ProcessingStatus/ProcessingState so sink, flushhandler, and ingestnotification packages exchange state without a circular import.", + "patterns": [ + { + "name": "Leaf type-only package", + "description": "This package holds plain data structs and value-method helpers only \u2014 no services, adapters, or I/O. It exists to break import cycles between openmeter/sink and its sub-packages, so keep it dependency-light (it imports only dedupe, serializer, meter, kafka).", + "example": "type SinkMessage struct { Namespace string; KafkaMessage *kafka.Message; Serialized *serializer.CloudEventsKafkaPayload; ... }" + }, + { + "name": "Stringer on int8 enum with explicit iota constants", + "description": "ProcessingState is an int8 enum with OK/DROP declared via iota and a String() method whose default branch formats unknown(%d). New states must be added to both the const block and the switch in String().", + "example": "const ( OK ProcessingState = iota; DROP )" + }, + { + "name": "Value-receiver derivation helper", + "description": "GetDedupeItem is a value-receiver method that derives a dedupe.Item from the message's Serialized payload (Id, Source) plus Namespace. It assumes Serialized is non-nil.", + "example": "func (m SinkMessage) GetDedupeItem() dedupe.Item { return dedupe.Item{Namespace: m.Namespace, ID: m.Serialized.Id, Source: m.Serialized.Source} }" + } + ], + "key_file_guides": [ + { + "file": "models.go", + "role": "Entire package: SinkMessage struct, ProcessingStatus struct, ProcessingState enum + String(), and GetDedupeItem() helper.", + "watch_for": "GetDedupeItem dereferences m.Serialized without a nil check \u2014 callers must populate Serialized before deduping. IngestedAt/StoredAt are *time.Time and may be nil. DropError carries the reason a message is DROPped; it is only meaningful when State==DROP." + } + ], + "anti_patterns": [ + "Adding service logic, persistence, or Kafka consumption here \u2014 this is a type-only leaf package; behavior belongs in openmeter/sink.", + "Importing openmeter/sink or its sub-packages from here \u2014 that reintroduces the import cycle this package was created to avoid.", + "Adding a new ProcessingState const without updating the String() switch, leaving it to fall through to unknown(%d).", + "Calling GetDedupeItem() on a SinkMessage whose Serialized is nil \u2014 it will panic." + ], + "decisions": [ + { + "decision": "Carry processing outcome as a ProcessingStatus struct ({State, DropError}) rather than a bare error.", + "rationale": "Lets the pipeline distinguish OK vs intentional DROP and attach a drop reason without conflating it with fatal processing errors." + }, + { + "decision": "Keep these types in a standalone models package instead of in openmeter/sink.", + "rationale": "openmeter/sink, flushhandler, and ingestnotification all need SinkMessage; a shared leaf package avoids cyclic imports between them." + } + ], + "code_examples": [ + { + "scenario": "Construct a SinkMessage and derive its dedupe key", + "code": "import (\n\t\"github.com/openmeterio/openmeter/openmeter/dedupe\"\n\tsinkmodels \"github.com/openmeterio/openmeter/openmeter/sink/models\"\n)\n\nmsg := sinkmodels.SinkMessage{\n\tNamespace: ns,\n\tSerialized: payload,\n\tStatus: sinkmodels.ProcessingStatus{State: sinkmodels.OK},\n}\nvar item dedupe.Item = msg.GetDedupeItem()" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w123.json b/.archie/enrichments/w123.json new file mode 100644 index 0000000000..0cb97d85dd --- /dev/null +++ b/.archie/enrichments/w123.json @@ -0,0 +1,62 @@ +{ + "openmeter/sink/flushhandler/ingestnotification/events": { + "purpose": "Defines the Watermill event contract emitted after a batch of usage events is flushed to ClickHouse: EventBatchedIngest, the 'ingest/events.ingested' (v2) message that notifies downstream consumers (notably the balance worker) which subject/meters changed. Its sole constraint is to satisfy the marshaler.Event interface so the eventbus can serialize it as a CloudEvent.", + "patterns": [ + { + "name": "marshaler.Event implementation", + "description": "Every event type must implement marshaler.Event: EventName() string, EventMetadata() metadata.EventMetadata, Validate() error. Assert conformance at compile time with a blank var.", + "example": "var _ marshaler.Event = EventBatchedIngest{}" + }, + { + "name": "Versioned EventType registration", + "description": "Declare a package-level metadata.EventType with Subsystem/Name/Version, then derive the wire name via metadata.GetEventName(...). EventName() returns this derived constant, never a hand-typed string.", + "example": "batchIngestEventType = metadata.EventType{Subsystem: EventSubsystem, Name: \"events.ingested\", Version: \"v2\"}; batchIngestEventName = metadata.GetEventName(batchIngestEventType)" + }, + { + "name": "EventMetadata via metadata.ComposeResourcePath", + "description": "Build Source/Subject from the typed helpers metadata.ComposeResourcePathRaw / ComposeResourcePath with metadata.EntitySubjectKey, not raw string concatenation, so resource paths stay namespace-scoped and consistent.", + "example": "Subject: metadata.ComposeResourcePath(b.Namespace.ID, metadata.EntitySubjectKey, b.SubjectKey)" + }, + { + "name": "Slug-based meter identity (no IDs)", + "description": "Reference meters by MeterSlugs ([]string), never meter IDs. Meter IDs are not present in the open-source build, so event payloads consumed by OSS code must not depend on them.", + "example": "MeterSlugs []string `json:\"meterSlugs\"`" + }, + { + "name": "Defensive Validate()", + "description": "Validate() delegates to Namespace.Validate() first, then checks required scalar fields (SubjectKey non-empty), returning a plain error on the first failure.", + "example": "if b.SubjectKey == \"\" { return errors.New(\"subjectKey must be set\") }" + } + ], + "key_file_guides": [ + { + "file": "events.go", + "role": "Declares EventSubsystem ('ingest'), the EventBatchedIngest payload struct, its versioned EventType, and the three marshaler.Event methods. Also exports EventVersionSubsystem for consumer subscription routing.", + "watch_for": "Changing struct fields or the Version (currently 'v2') is a wire-format break for the balance worker and any subscriber filtering on EventVersionSubsystem \u2014 bump the Version and coordinate consumers rather than mutating in place. RawEvents carries serializer.CloudEventsKafkaPayload and StoredAt carries the flush cutoff timestamp consumers use; do not repurpose." + } + ], + "anti_patterns": [ + "Hand-coding the event name string instead of deriving it from the metadata.EventType via metadata.GetEventName.", + "Adding meter IDs (or any OSS-absent identifier) to the payload; consumers in open-source must work with MeterSlugs only.", + "Mutating existing JSON fields or the Version without bumping it \u2014 silently breaks balanceworker deserialization.", + "Building Source/Subject strings by manual concatenation instead of metadata.ComposeResourcePath helpers.", + "Adding business logic, Kafka publishing, or persistence here \u2014 this package is a pure event contract; producers live in ingestnotification, consumers in entitlement/balanceworker." + ], + "decisions": [ + { + "decision": "Carry MeterSlugs rather than meter IDs in the payload.", + "rationale": "Meter IDs do not exist in the open-source version, so any OSS consumer (e.g. balanceworker) must be able to act on the event without them." + }, + { + "decision": "Embed an explicit versioned EventType ('v2') and expose EventVersionSubsystem.", + "rationale": "Lets the eventbus/consumers subscribe and route by version+subsystem, enabling backward-incompatible payload evolution via version bumps instead of in-place mutation." + } + ], + "code_examples": [ + { + "scenario": "Defining a new flush-notification event that the eventbus can marshal as a CloudEvent", + "code": "package events\n\nimport (\n\t\"errors\"\n\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/models\"\n\t\"github.com/openmeterio/openmeter/openmeter/watermill/marshaler\"\n)\n\nvar (\n\t_ marshaler.Event = EventBatchedIngest{}\n\n\tbatchIngestEventType = metadata.EventType{Subsystem: EventSubsystem, Name: \"events.ingested\", Version: \"v2\"}\n\tbatchIngestEventName = metadata.GetEventName(batchIngestEventType)\n)\n\nfunc (b EventBatchedIngest) EventName() string { return batchIngestEventName }\n\nfunc (b EventBatchedIngest) Validate() error {\n\tif err := b.Namespace.Validate(); err != nil {\n\t\treturn err\n\t}\n\tif b.SubjectKey == \"\" {\n\t\treturn errors.New(\"subjectKey must be set\")\n\t}\n\treturn nil\n}\n\nfunc (b EventBatchedIngest) EventMetadata() metadata.EventMetadata {\n\treturn metadata.EventMetadata{\n\t\tSource: metadata.ComposeResourcePathRaw(string(EventSubsystem)),\n\t\tSubject: metadata.ComposeResourcePath(b.Namespace.ID, metadata.EntitySubjectKey, b.SubjectKey),\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w124.json b/.archie/enrichments/w124.json new file mode 100644 index 0000000000..88edf43cee --- /dev/null +++ b/.archie/enrichments/w124.json @@ -0,0 +1,235 @@ +{ + "openmeter/streaming/clickhouse": { + "purpose": "Concrete ClickHouse implementation of streaming.Connector \u2014 reads/aggregates metered usage events out of a single MergeTree events table. Each public method validates params, delegates to a query-builder struct, then scans rows; the connector holds no per-request state, only Config.", + "patterns": [ + { + "name": "Per-operation query-builder struct with toSQL()", + "description": "Each read/write operation has a dedicated struct (queryMeter, queryEventsTable, queryEventsTableV2, queryCountEvents, listSubjectsQuery, InsertEventsQuery, createEventsTable) carrying Database/EventsTableName/Namespace plus params, and a toSQL() / ToSQL() (and often toCountRowSQL()) method returning (sql, args). Connector methods build this struct, call toSQL, and run c.config.ClickHouse.Query/Exec.", + "example": "query := queryMeter{Database: c.config.Database, EventsTableName: c.config.EventsTableName, Namespace: namespace, Meter: meter, ...}; sql, args, err := query.toSQL()" + }, + { + "name": "go-sqlbuilder.ClickHouse builders, never string concat", + "description": "All SQL is built via sqlbuilder.ClickHouse.NewSelectBuilder / NewInsertBuilder / NewCreateTableBuilder / NewCTEBuilder. Args are bound positionally through query.Build(); never interpolate user values into the SQL string except via sqlbuilder.Escape (see selectCustomerIdColumn).", + "example": "query := sqlbuilder.ClickHouse.NewSelectBuilder(); query.Where(query.Equal(\"namespace\", d.Namespace))" + }, + { + "name": "Validate then map known errors to typed domain errors", + "description": "Public methods first reject empty namespace / call params.Validate() wrapping in models.NewGenericValidationError, then translate ClickHouse error codes: 'code: 60' -> models.NewNamespaceNotFoundError or meterpkg.NewMeterNotFoundError; 'code: 36' (ValidateJSONPath bad args) -> (false, nil). Re-check the typed error before wrapping with fmt.Errorf.", + "example": "if strings.Contains(err.Error(), \"code: 60\") { return nil, meterpkg.NewMeterNotFoundError(query.Meter.Key) }" + }, + { + "name": "Optional query progress tracking via ClientID", + "description": "When params.ClientID != nil, build a toCountRowSQL() count query and call c.withProgressContext(ctx, namespace, clientID, countSQL, countArgs) to attach a progressmanager-tracking context. Progress failures are logged via c.config.Logger but never returned.", + "example": "ctx, err = c.withProgressContext(ctx, namespace, *params.ClientID, countSQL, countArgs); if err != nil { c.config.Logger.Error(\"failed track progress\", ...) }" + }, + { + "name": "columnFactory aliasing for join/filter columns", + "description": "Shared where/select helpers (subjectWhere, customersWhere, selectCustomerIdColumn) use columnFactory(eventsTableName) to qualify column names as alias.column. Customer attribution is resolved with a ClickHouse map(...) CTE keyed on subject via customer.GetUsageAttribution().", + "example": "getColumn := columnFactory(eventsTableName); subjectColumn := getColumn(\"subject\")" + }, + { + "name": "NullDecimal scan wrapper for decimal aggregates", + "description": "meter_query.go defines NullDecimal wrapping decimal.NullDecimal with a Scan that also accepts a raw decimal.Decimal; scanRows uses it so SUM/MIN/MAX results that ClickHouse may return as decimal-or-null are handled uniformly.", + "example": "nullDecimal := dest[2].(*NullDecimal); nullDecimal.Valid = true; nullDecimal.Decimal = decimal.NewFromFloat(value)" + }, + { + "name": "Config-validated constructor that DDLs the events table", + "description": "New(ctx, Config) runs Config.Validate() (Logger, ClickHouse, Database, EventsTableName, ProgressManager all required) then calls createTable unless SkipCreateTables. The events table schema (createEventsTable.toSQL) is MergeTree, PARTITION BY toYYYYMM(time), ORDER BY (namespace, type, subject, toStartOfHour(time)).", + "example": "if !config.SkipCreateTables { if err := connector.createTable(ctx); err != nil { return nil, fmt.Errorf(\"create tables: %w\", err) } }" + } + ], + "key_file_guides": [ + { + "file": "connector.go", + "role": "Connector struct + all streaming.Connector methods (QueryMeter, ListEvents/V2, CountEvents, ListSubjects, ListGroupByValues, BatchInsert, ValidateJSONPath) and namespace.Handler no-ops", + "watch_for": "CreateNamespace/DeleteNamespace are intentional no-ops (events table is shared across namespaces); QueryMeter sorts GroupBy for deterministic SQL and rewrites WindowStart/End to the period when WindowSize is nil" + }, + { + "file": "meter_query.go", + "role": "queryMeter struct, NullDecimal, from() event-window resolution, toSQL/toCountRowSQL/scanRows", + "watch_for": "from() merges params.From with Meter.EventFrom (takes the later); EnableDecimalPrecision / EnablePrewhere flags change generated SQL" + }, + { + "file": "event_query.go", + "role": "createEventsTable DDL, queryEventsTable, queryCountEvents, InsertEventsQuery, getTableName", + "watch_for": "events table ORDER BY/PARTITION drive query performance; toCountRowSQL only filters on ordered columns; InsertEventsQuery column order must match BatchInsert" + }, + { + "file": "event_query_v2.go", + "role": "queryEventsTableV2 builder for the advanced ListEventsV2 filtering path", + "watch_for": "v2 carries full params struct rather than discrete fields; keep filter handling aligned with pkg/filter" + }, + { + "file": "queryhelper.go", + "role": "subjectWhere, customersWhere, selectCustomerIdColumn (subject_to_customer_id map CTE), columnFactory", + "watch_for": "customer subject values come from customer.GetUsageAttribution(); escape literals with sqlbuilder.Escape; empty customer/subject sets must not emit a WHERE that excludes all rows" + }, + { + "file": "subject_query.go / group_by_values_query.go", + "role": "listSubjectsQuery and group-by value enumeration builders", + "watch_for": "these map missing-meter errors via meterpkg.IsMeterNotFoundError" + }, + { + "file": "connector_test.go", + "role": "GetMockConnector + MockClickHouse/MockRows unit tests with SkipCreateTables", + "watch_for": "mock-based tests assert exact bound args and code:60 -> MeterNotFoundError translation" + }, + { + "file": "connector_query_test.go / suite_test.go", + "role": "CHTestSuite integration tests against a real ClickHouse instance", + "watch_for": "tests skip when ClickHouse is unavailable (s.T().Skipped()); cover every MeterAggregation x EnableDecimalPrecision combination" + } + ], + "anti_patterns": [ + "Building SQL with fmt.Sprintf/string concatenation of user input instead of sqlbuilder builders + bound args (only sqlbuilder.Escape'd literals are acceptable)", + "Returning raw ClickHouse errors without translating code:60 to NamespaceNotFound/MeterNotFound \u2014 callers branch on those typed errors", + "Adding a new read method without a matching query-builder struct + toSQL(), or skipping params.Validate()", + "Letting progress-tracking (withProgressContext) failures abort the query instead of logging and continuing", + "Implementing CreateNamespace/DeleteNamespace to actually create/drop tables \u2014 the events table is shared across namespaces" + ], + "decisions": [ + { + "decision": "Single shared events MergeTree table partitioned by month and ordered (namespace, type, subject, toStartOfHour(time))", + "rationale": "Lowest-cardinality always-filtered columns left-most so ClickHouse prunes partitions and rows; namespaces share the table so create/delete-namespace are no-ops" + }, + { + "decision": "Query progress is opt-in via ClientID and best-effort", + "rationale": "Progress estimation uses a separate count query and must never fail the actual data query" + }, + { + "decision": "NullDecimal wraps decimal.NullDecimal with a permissive Scan", + "rationale": "ClickHouse may return aggregate values as decimal or null depending on EnableDecimalPrecision; a single scan target keeps scanRows uniform" + } + ], + "code_examples": [ + { + "scenario": "Adding a validated read method backed by a query-builder struct", + "code": "func (c *Connector) QueryMeter(ctx context.Context, namespace string, meter meterpkg.Meter, params streaming.QueryParams) ([]meterpkg.MeterQueryRow, error) {\n\tif namespace == \"\" {\n\t\treturn nil, fmt.Errorf(\"namespace is required\")\n\t}\n\tif err := params.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"validate params: %w\", err)\n\t}\n\tquery := queryMeter{Database: c.config.Database, EventsTableName: c.config.EventsTableName, Namespace: namespace, Meter: meter /* ... */}\n\tsql, args, err := query.toSQL()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"build sql query: %w\", err)\n\t}\n\trows, err := c.config.ClickHouse.Query(ctx, sql, args...)\n\tif err != nil {\n\t\tif strings.Contains(err.Error(), \"code: 60\") {\n\t\t\treturn nil, meterpkg.NewMeterNotFoundError(query.Meter.Key)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"clickhouse query: %w\", err)\n\t}\n\tdefer rows.Close()\n\treturn query.scanRows(rows)\n}" + } + ] + }, + "openmeter/streaming/retry": { + "purpose": "Decorator that wraps any streaming.Connector with retry-on-transient-failure behavior for ClickHouse reads. Package streamingretry; its Connector forwards every call to a downstream connector, retrying only read methods on retryable ClickHouse/network errors.", + "patterns": [ + { + "name": "Decorator over streaming.Connector", + "description": "Connector holds a downstreamConnector streaming.Connector and asserts `var _ streaming.Connector = (*Connector)(nil)`. Every interface method delegates to the downstream; read methods wrap the call in withRetry, mutating/namespace methods (BatchInsert, ValidateJSONPath, Create/DeleteNamespace) delegate directly without retry.", + "example": "func (c *Connector) ListEvents(ctx, ns, params) (...) { return withRetry(ctx, c, func() ([]streaming.RawEvent, error) { return c.downstreamConnector.ListEvents(ctx, ns, params) }) }" + }, + { + "name": "Generic withRetry helper", + "description": "withRetry[T any](ctx, c, fn func() (T, error)) wraps retry.DoWithData (avast/retry-go/v4) with retry.Context(ctx), retry.Attempts(c.maxTries), LastErrorOnly, CombineDelay(BackOffDelay, RandomDelay), Delay/MaxDelay, OnRetry logging, and a RetryIf predicate. All retried methods route through it.", + "example": "return retry.DoWithData(fn, retry.Context(ctx), retry.Attempts(uint(c.maxTries)), retry.RetryIf(...))" + }, + { + "name": "Explicit retryable-error allowlist", + "description": "RetryIf returns true only for io.EOF/io.ErrUnexpectedEOF, clickhouse.ErrAcquireConnTimeout, and *clickhouse.Exception with Code == chproto.ErrAllConnectionTriesFailed (cluster upscale/downscale, CH restarts). Everything else fails fast \u2014 do not broaden this to retry arbitrary errors.", + "example": "if errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) { return true }" + }, + { + "name": "Validated config constructor", + "description": "New(Config) calls Config.Validate() which collects errors via errors.Join: DownstreamConnector and Logger required, RetryWaitDuration > 0, MaxTries >= 1, MaxDelay >= 0. Config fields are copied into unexported Connector fields.", + "example": "if c.MaxTries < 1 { errs = append(errs, errors.New(\"max retries must be greater than or equal to 1\")) }" + } + ], + "key_file_guides": [ + { + "file": "retry.go", + "role": "Config + Validate, Connector decorator, all delegating methods, generic withRetry, RetryIf allowlist", + "watch_for": "BatchInsert and ValidateJSONPath are deliberately NOT retried; adding retry there would risk duplicate inserts. New downstream interface methods must be added here too or they won't compile against streaming.Connector" + }, + { + "file": "retry_test.go", + "role": "Config validation tests, constructor tests, withRetry behavior (success/retry/exhaustion/non-retryable), context-cancellation and backoff+jitter timing", + "watch_for": "noopConnector embeds streaming.Connector to satisfy the interface for config tests; backoff test asserts total elapsed exceeds flat-delay sum" + } + ], + "anti_patterns": [ + "Adding retry to BatchInsert or other write/mutation paths (non-idempotent \u2014 risks duplicate events)", + "Broadening RetryIf to retry generic errors instead of the explicit EOF / conn-timeout / ErrAllConnectionTriesFailed allowlist", + "Bypassing withRetry for a new read method, or calling the downstream connector directly without the generic helper", + "Using slog.Default() as a fallback \u2014 Logger is a required config field and must be injected" + ], + "decisions": [ + { + "decision": "Only read methods are retried; writes delegate straight through", + "rationale": "ClickHouse reads are idempotent and safe to repeat across CH restarts; BatchInsert is not, so retrying could double-insert events" + }, + { + "decision": "Retry triggers limited to connection-class errors (EOF, acquire timeout, ErrAllConnectionTriesFailed)", + "rationale": "These specifically occur during cluster upscale/downscale and CH restarts where the connection pool neglects pings; query-logic errors should fail fast" + } + ], + "code_examples": [ + { + "scenario": "Wrapping a downstream read with the generic retry helper and allowlist", + "code": "func withRetry[T any](ctx context.Context, c *Connector, fn func() (T, error)) (T, error) {\n\treturn retry.DoWithData(fn,\n\t\tretry.Context(ctx),\n\t\tretry.Attempts(uint(c.maxTries)),\n\t\tretry.LastErrorOnly(true),\n\t\tretry.DelayType(retry.CombineDelay(retry.BackOffDelay, retry.RandomDelay)),\n\t\tretry.Delay(c.retryWaitDuration),\n\t\tretry.MaxDelay(c.maxDelay),\n\t\tretry.RetryIf(func(err error) bool {\n\t\t\tif errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif errors.Is(err, clickhouse.ErrAcquireConnTimeout) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif e, ok := lo.ErrorsAs[*clickhouse.Exception](err); ok {\n\t\t\t\treturn e.Code == int32(chproto.ErrAllConnectionTriesFailed)\n\t\t\t}\n\t\t\treturn false\n\t\t}),\n\t)\n}" + } + ] + }, + "openmeter/streaming/testutils": { + "purpose": "In-memory MockStreamingConnector implementing streaming.Connector for unit/integration tests across billing, credit, entitlement, ledger and subscription packages. Approximates ClickHouse meter aggregation over a slice of SimpleEvent without a real database.", + "patterns": [ + { + "name": "Two-mode QueryMeter: pre-set rows or event aggregation", + "description": "If rows were registered via AddRow for the meter key, QueryMeter returns the exact rows whose WindowStart/End match params.From/To. Otherwise it falls back to aggregateEvents over registered SimpleEvents. Use AddRow for fully-controlled output; use Add/SetSimpleEvents to exercise real window aggregation.", + "example": "_, rowOk := m.rows[mm.Key]; if rowOk { /* exact match */ } else { row, err := m.aggregateEvents(mm, params) }" + }, + { + "name": "SimpleEvent with explicit StoredAt for late-arriving usage", + "description": "SimpleEvent carries Time and StoredAt; AddSimpleEvent defaults StoredAt to Time unless WithStoredAt(t) is passed. aggregateEvents pre-filters by params.FilterStoredAt using filterStoredAt (Unix-second precision, recursive $and/$or) so tests can model events visible only after a stored-at cutoff.", + "example": "m.AddSimpleEvent(slug, 1, eventTime, testutils.WithStoredAt(storedAt))" + }, + { + "name": "Events kept sorted by Time ASC", + "description": "AddSimpleEvent and SetSimpleEvents call sortMeterEvents (slices.SortStableFunc by Time.Compare) after mutation. MeterAggregationLatest relies on this ordering \u2014 it takes the last matching event's value.", + "example": "slices.SortStableFunc(m.events[meterSlug], func(a, b SimpleEvent) int { return a.Time.Compare(b.Time) })" + }, + { + "name": "ClickHouse-faithful windowing semantics", + "description": "aggregateEvents truncates from/to to streaming.MinimumWindowSizeDuration (second precision), truncates each event by effectiveWindowSize, treats window end as exclusive, supports SUM (default) and LATEST only, and drops rows with Value == 0 to mimic ClickHouse not emitting empty tumbled windows.", + "example": "rows = lo.Filter(rows, func(row meter.MeterQueryRow, _ int) bool { return row.Value != 0 })" + }, + { + "name": "Other interface methods are trivial stubs", + "description": "CountEvents/ListEvents/ListEventsV2/ListSubjects/ListGroupByValues return empty slices; BatchInsert is a no-op; Create/DeleteNamespace return nil; ValidateJSONPath returns strings.HasPrefix(jsonPath, \"$.\"). Don't rely on these for behavior \u2014 only QueryMeter is meaningfully implemented.", + "example": "func (m *MockStreamingConnector) ValidateJSONPath(ctx, jsonPath) (bool, error) { return strings.HasPrefix(jsonPath, \"$.\"), nil }" + } + ], + "key_file_guides": [ + { + "file": "streaming.go", + "role": "MockStreamingConnector, SimpleEvent, AddSimpleEvent/SetSimpleEvents/AddRow/Reset, WithStoredAt, aggregateEvents, filterStoredAt", + "watch_for": "aggregateEvents only supports SUM and LATEST \u2014 other aggregations silently sum; requires non-nil params.From and params.To; meter-not-found is returned only when no events exist for the key" + }, + { + "file": "streaming_test.go", + "role": "Table-driven tests proving window boundary, exclusive-end, LATEST ordering, and FilterStoredAt semantics", + "watch_for": "Tests use testutils.GetRFC3339Time and convert.ToPointer; they document edge cases (end-exclusive, non-aligned from/to, larger-than-period windows) that new aggregation logic must preserve" + } + ], + "anti_patterns": [ + "Expecting full ClickHouse aggregation fidelity (avg/min/max/uniqueCount/groupBy are not implemented \u2014 only SUM and LATEST)", + "Querying without setting both params.From and params.To (aggregateEvents errors)", + "Relying on ListEvents/CountEvents/ListSubjects returning data \u2014 they are empty stubs", + "Setting StoredAt to model late usage without using WithStoredAt \u2014 bare AddSimpleEvent defaults StoredAt to Time", + "Mutating m.events directly instead of via Add/SetSimpleEvent, bypassing the Time-ASC sort that LATEST depends on" + ], + "decisions": [ + { + "decision": "Mock implements aggregation rather than recording calls", + "rationale": "Downstream billing/credit/entitlement lifecycle tests need realistic meter rows over time, including late-arriving usage via StoredAt, not just call assertions" + }, + { + "decision": "Zero-value rows are filtered out of windowed results", + "rationale": "Mirrors ClickHouse not returning tumbled rows for windows with no events, so consumers see the same gaps as production" + } + ], + "code_examples": [ + { + "scenario": "Modeling late-arriving usage with an explicit stored-at cutoff", + "code": "streaming := testutils.NewMockStreamingConnector(t)\nstreaming.AddSimpleEvent(\"tokens\", 5, eventTime, testutils.WithStoredAt(storedAt))\nrows, err := streaming.QueryMeter(t.Context(), namespace, meter.Meter{Key: \"tokens\", Aggregation: meter.MeterAggregationSum}, streaming.QueryParams{\n\tFrom: &from,\n\tTo: &to,\n\tFilterStoredAt: &filter.FilterTimeUnix{FilterTime: filter.FilterTime{Lte: &cutoff}},\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w125.json b/.archie/enrichments/w125.json new file mode 100644 index 0000000000..bebf2c6fa0 --- /dev/null +++ b/.archie/enrichments/w125.json @@ -0,0 +1,199 @@ +{ + "openmeter/subject/adapter": { + "purpose": "Ent-backed persistence layer for the subject domain. Implements subject.Adapter (CRUD + List) against the entdb Subject table, mapping DB entities to subject.Subject domain models and translating Ent errors into models.Generic* errors.", + "patterns": [ + { + "name": "TxUser adapter struct", + "description": "adapter holds *entdb.Client and satisfies subject.Adapter + entutils.TxUser[*adapter] via Tx/WithTx/Self. New(db) returns error if db is nil.", + "example": "var _ entutils.TxUser[*adapter] = (*adapter)(nil); func (a *adapter) Self() *adapter { return a }" + }, + { + "name": "Every method wraps in TransactingRepo", + "description": "All read/write methods run inside entutils.TransactingRepo(ctx, a, func(ctx, tx){...}) (or TransactingRepoWithNoValue for Delete) so they rebind to a ctx-carried transaction.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (subject.Subject, error) { ... })" + }, + { + "name": "Validate input then wrap error", + "description": "Mutating methods call input.Validate() first and wrap failures with models.NewGenericValidationError before any DB call.", + "example": "if err := input.Validate(); err != nil { return subject.Subject{}, fmt.Errorf(\"invalid input: %w\", models.NewGenericValidationError(err)) }" + }, + { + "name": "Ent error \u2192 domain error translation", + "description": "db.IsNotFound\u2192NewGenericNotFoundError, db.IsConstraintError\u2192NewGenericConflictError; raw errors are wrapped with %w and namespace/key context.", + "example": "if db.IsNotFound(err) { return subject.Subject{}, models.NewGenericNotFoundError(...) }" + }, + { + "name": "Soft-delete via DeletedAt window", + "description": "Reads (GetByKey, GetByIdOrKey, List) include subjectdb.Or(DeletedAtIsNil(), DeletedAtGTE(now)); Delete sets DeletedAt=now rather than removing the row, and short-circuits if already deleted.", + "example": "subjectdb.Or(subjectdb.DeletedAtIsNil(), subjectdb.DeletedAtGTE(now))" + }, + { + "name": "OptionalNullable explicit clear on Update", + "description": "Update inspects input..IsSet and Value to decide SetX vs ClearX, working around Ent issue 2108 where nil does not null a column.", + "example": "if input.DisplayName.IsSet { if input.DisplayName.Value != nil { query.SetDisplayName(*...) } else { query.ClearDisplayName() } }" + }, + { + "name": "mapEntity is the single DB\u2192domain mapper", + "description": "All methods return mapEntity(e); it backfills empty Metadata to an empty map and copies nullable DisplayName/StripeCustomerID pointers.", + "example": "return mapEntity(subjectEntity), nil" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Constructor New(db) + TxUser plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self).", + "watch_for": "Tx uses ReadOnly:false; do not bypass WithTx or the tx context will not rebind the client." + }, + { + "file": "subject.go", + "role": "All CRUD/List methods + mapEntity. GetByIdOrKey matches ID exactly OR key within the not-deleted window.", + "watch_for": "Update's OptionalNullable clear logic is flagged as a unique pattern to be refactored; List sort for display-name-desc uses sql.OrderNullsLast()/OrderDesc() builders, not db.Desc." + } + ], + "anti_patterns": [ + "Using a passed *entdb.Client directly instead of tx.db inside a TransactingRepo closure (breaks transaction binding).", + "Returning raw Ent errors without db.IsNotFound/IsConstraintError translation to models.Generic* errors.", + "Hard-deleting subject rows or ignoring the DeletedAtGTE(now) window in reads.", + "On Update, calling SetX unconditionally instead of honoring OptionalNullable.IsSet (would silently null or overwrite fields)." + ], + "decisions": [ + { + "decision": "Soft delete with a DeletedAt timestamp window", + "rationale": "Subjects may be referenced by usage/entitlements; deletion is logical and time-gated rather than physical, and usage for the subject is intentionally not deleted." + }, + { + "decision": "Manual OptionalNullable clear handling on Update", + "rationale": "Ent does not null fields when nil is provided (ent/ent#2108), so set-vs-clear must be decided from IsSet/Value explicitly." + } + ], + "code_examples": [ + { + "scenario": "Adapter method with transaction, validation, and error mapping", + "code": "func (a *adapter) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error) {\n if err := input.Validate(); err != nil {\n return subject.Subject{}, fmt.Errorf(\"invalid input: %w\", models.NewGenericValidationError(err))\n }\n return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (subject.Subject, error) {\n e, err := tx.db.Subject.Create().SetNamespace(input.Namespace).SetKey(input.Key).Save(ctx)\n if err != nil {\n if db.IsConstraintError(err) {\n return subject.Subject{}, models.NewGenericConflictError(fmt.Errorf(\"subject with key already exists: %s\", input.Key))\n }\n return subject.Subject{}, fmt.Errorf(\"failed to create subject: %w\", err)\n }\n return mapEntity(e), nil\n })\n}" + } + ] + }, + "openmeter/subject/httphandler": { + "purpose": "HTTP transport layer (package httpdriver) for the subject API. Builds httptransport handlers for Get/List/Upsert/Delete subjects, resolves the namespace from context, calls subject.Service, and maps domain subjects to api.Subject.", + "patterns": [ + { + "name": "httptransport handler triple", + "description": "Each operation is a method returning a typed Handler built from NewHandler / NewHandlerWithArgs with (decode, business, encode) functions plus WithOperationName option.", + "example": "httptransport.NewHandlerWithArgs(decodeFn, bizFn, commonhttp.JSONResponseEncoderWithStatus[GetSubjectResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getSubject\"))...)" + }, + { + "name": "Handler interface aggregation", + "description": "handler implements Handler (= SubjectHandler) exposing GetSubject/ListSubjects/UpsertSubject/DeleteSubject; New(...) injects namespaceDecoder, logger, subjectService, entitlementConnector, options.", + "example": "type SubjectHandler interface { GetSubject() GetSubjectHandler; ... }" + }, + { + "name": "Namespace resolved via decoder", + "description": "Every decode func calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace and returns a 500 HTTPError when absent.", + "example": "ns, err := h.resolveNamespace(ctx)" + }, + { + "name": "Typed request/response aliases per op", + "description": "Each op declares ResponseT, HandlerT, and a RequestT struct (with unexported namespace field); params-bearing ops use HandlerWithArgs with a string ...Params alias.", + "example": "type ( GetSubjectParams = string; GetSubjectResponse = api.Subject; GetSubjectHandler httptransport.HandlerWithArgs[GetSubjectRequest, GetSubjectResponse, GetSubjectParams] )" + }, + { + "name": "FromSubject is the single domain\u2192api mapper", + "description": "mapping.go's FromSubject copies fields and rebuilds Metadata into a *map; all encode paths route domain subjects through it.", + "example": "return FromSubject(sub), nil" + }, + { + "name": "Double-parse body for null-vs-undefined", + "description": "UpsertSubject reads the body twice (struct + raw map) so it can detect field presence and set subject.OptionalNullable{IsSet:true} only for keys actually present in JSON.", + "example": "if _, ok := rawPayload[\"displayName\"]; ok { updateInput.DisplayName = subject.OptionalNullable[string]{IsSet: true, Value: payload.DisplayName} }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "handler struct, Handler/SubjectHandler interfaces, New constructor, resolveNamespace.", + "watch_for": "entitlementConnector is injected but unused by the shown ops; resolveNamespace returns 500, not 400, when namespace missing." + }, + { + "file": "subject.go", + "role": "All four operation builders + their request/response types.", + "watch_for": "UpsertSubject manually parses the body twice and validates stripeCustomerId has a cus_ prefix (400 on failure); DeleteSubject first GetByIdOrKey then deletes by resolved Id; both Upsert and Delete return list/nil bodies." + }, + { + "file": "mapping.go", + "role": "FromSubject domain\u2192api.Subject converter.", + "watch_for": "Metadata is rebuilt into a new *map only when non-nil; do not skip FromSubject and hand-build api.Subject." + } + ], + "anti_patterns": [ + "Calling subjectService directly without resolveNamespace (subject ops are namespace-scoped).", + "Hand-constructing api.Subject instead of using FromSubject.", + "Decoding the upsert body only once \u2014 loses the null-vs-undefined distinction the OptionalNullable update relies on.", + "Returning raw service errors without fmt.Errorf wrapping / commonhttp.NewHTTPError for client-facing validation." + ], + "decisions": [ + { + "decision": "Body double-parse (struct + raw map) in UpsertSubject", + "rationale": "oapi-codegen cannot model optional body fields (deepmap/oapi-codegen#1039); presence in the raw map is the only way to distinguish erase (null) from leave-as-is (undefined)." + }, + { + "decision": "Upsert performs list-then-create-or-update per key", + "rationale": "There is no native batch upsert; the handler lists existing keys, keys them with lo.KeyBy, then creates or partially updates each (marked TODO to optimize)." + } + ], + "code_examples": [ + { + "scenario": "A read handler with namespace resolution and httptransport wiring", + "code": "func (h *handler) GetSubject() GetSubjectHandler {\n return httptransport.NewHandlerWithArgs(\n func(ctx context.Context, r *http.Request, idOrKey GetSubjectParams) (GetSubjectRequest, error) {\n ns, err := h.resolveNamespace(ctx)\n if err != nil { return GetSubjectRequest{}, err }\n return GetSubjectRequest{namespace: ns, subjectIdOrKey: idOrKey}, nil\n },\n func(ctx context.Context, req GetSubjectRequest) (GetSubjectResponse, error) {\n sub, err := h.subjectService.GetByIdOrKey(ctx, req.namespace, req.subjectIdOrKey)\n if err != nil { return GetSubjectResponse{}, fmt.Errorf(\"failed to get subject: %w\", err) }\n return FromSubject(sub), nil\n },\n commonhttp.JSONResponseEncoderWithStatus[GetSubjectResponse](http.StatusOK),\n httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getSubject\"))...,\n )\n}" + } + ] + }, + "openmeter/subject/testutils": { + "purpose": "Test harness for the subject domain. Provides a TestEnv that wires a real Postgres-backed subject service together with customer, feature, and entitlement dependencies so subject/service tests run against production constructors.", + "patterns": [ + { + "name": "TestEnv with NewTestEnv constructor", + "description": "NewTestEnv(t) builds a TestEnv from concrete package constructors (subjectadapter.New, subjectservice.New, customeradapter/customerservice, productcatalogadapter, entitlementpgadapter) over a Postgres test DB.", + "example": "subjectAdapter, _ := subjectadapter.New(client); subjectService, _ := subjectservice.New(subjectAdapter)" + }, + { + "name": "Postgres + mock eventbus init", + "description": "DB comes from testutils.InitPostgresDB(t); events use eventbus.NewMock(t); logger is testutils.NewDiscardLogger(t); tracer is noop.", + "example": "db := testutils.InitPostgresDB(t); publisher := eventbus.NewMock(t)" + }, + { + "name": "ULID namespace helpers", + "description": "NewTestULID(t) returns a fresh ULID; NewTestNamespace is aliased to it for per-test namespace isolation.", + "example": "var NewTestNamespace = NewTestULID" + }, + { + "name": "Explicit schema migrate + idempotent Close", + "description": "DBSchemaMigrate(t) runs Schema.Create; Close(t) tears down ent/pg drivers and the client exactly once via sync.Once.", + "example": "e.close.Do(func() { e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })" + } + ], + "key_file_guides": [ + { + "file": "env.go", + "role": "Defines TestEnv (SubjectService, CustomerService, EntitlementAdapter, FeatureService, Client) and NewTestEnv/DBSchemaMigrate/Close plus ULID helpers.", + "watch_for": "Meter adapter is a mockadapter (meteradapter.New(nil)); feature/entitlement use real Postgres adapters; build deps from package constructors, never from app/common, to avoid test import cycles." + } + ], + "anti_patterns": [ + "Importing app/common wiring here \u2014 must build deps from underlying constructors per repo testutils rule.", + "Skipping DBSchemaMigrate before exercising the service (the table will not exist).", + "Calling Close more than the sync.Once guards or leaking ent/pg drivers." + ], + "decisions": [ + { + "decision": "Wire real Postgres-backed services rather than mocks for subject/customer/feature/entitlement", + "rationale": "Subject behavior (soft-delete windows, constraints) only surfaces against a real DB; mocks would hide adapter-level logic." + } + ], + "code_examples": [ + { + "scenario": "Constructing the subject test environment", + "code": "func NewTestEnv(t *testing.T) *TestEnv {\n logger := testutils.NewDiscardLogger(t)\n db := testutils.InitPostgresDB(t)\n client := db.EntDriver.Client()\n subjectAdapter, err := subjectadapter.New(client)\n require.NoError(t, err)\n subjectService, err := subjectservice.New(subjectAdapter)\n require.NoError(t, err)\n return &TestEnv{SubjectService: subjectService, Client: client, db: db, close: sync.Once{}}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w126.json b/.archie/enrichments/w126.json new file mode 100644 index 0000000000..b661518e8b --- /dev/null +++ b/.archie/enrichments/w126.json @@ -0,0 +1,72 @@ +{ + "openmeter/subject/service/hooks": { + "purpose": "Provides the customer-side service hook that auto-provisions Subjects for every key in a customer's UsageAttribution.SubjectKeys. It is the bridge that keeps the subject domain in sync when customers are created or updated, registered onto the customer service via RegisterHooks.", + "patterns": [ + { + "name": "ServiceHook implementation via Noop embedding", + "description": "Hook types alias models.ServiceHook[customer.Customer] / models.NoopServiceHook[customer.Customer]. The concrete customerSubjectHook embeds NoopCustomerSubjectHook so it only overrides the lifecycle methods it cares about (PostCreate, PostUpdate), leaving the rest as no-ops.", + "example": "type customerSubjectHook struct { NoopCustomerSubjectHook; provisioner *SubjectProvisioner; ... }" + }, + { + "name": "Config Validate() before construction", + "description": "SubjectProvisionerConfig implements models.Validator. Both NewCustomerSubjectHook and NewSubjectProvisioner call config.Validate() first and wrap failures; Validate collects errs into errors.Join (Subject, Logger, Tracer all required).", + "example": "if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid subject hook config: %w\", err) }" + }, + { + "name": "Re-entrancy guard via context flag", + "description": "EnsureSubjects short-circuits when SkipSubjectCustomerFromContext(ctx) is true. When creating a subject it passes NewContextWithSkipSubjectCustomer(ctx) into subject.Create so the reciprocal customer hook (customer/service/hooks SubjectCustomerHook) does not loop back.", + "example": "sub, err = p.subject.Create(NewContextWithSkipSubjectCustomer(ctx), subject.CreateInput{...})" + }, + { + "name": "OTel span per hook/provisioner method", + "description": "Every exported method (PostCreate, PostUpdate, EnsureSubjects, EnsureSubject) opens a tracer span, sets otelcodes.Ok/Error status, records errors, and ends the span via defer. Span names follow dotted convention like 'subject_provisioner.ensure_subjects'.", + "example": "ctx, span := p.tracer.Start(ctx, \"subject_provisioner.ensure_subjects\"); defer func(){ ...; span.End() }()" + }, + { + "name": "Get-or-create with typed not-found check", + "description": "EnsureSubject calls subject.GetByIdOrKey; treats only models.IsGenericNotFoundError(err) (or sub.IsDeleted()) as the create branch and propagates any other error wrapped with namespace/customer.id context.", + "example": "if err != nil && !models.IsGenericNotFoundError(err) { return nil, fmt.Errorf(...namespace=%s customer.id=%s...: %w, ...) }" + }, + { + "name": "Accumulate validation errors across subject keys", + "description": "EnsureSubjects iterates all UsageAttribution.SubjectKeys collecting per-key errors into errs and returns errors.Join(errs...); a returned subject whose Key != requested subKey yields a models.NewGenericValidationError instructing callers to use key not id.", + "example": "errs = append(errs, models.NewGenericValidationError(fmt.Errorf(\"use subject key instead of id...\")))" + } + ], + "key_file_guides": [ + { + "file": "customersubject.go", + "role": "Defines the customer->subject provisioning hook (customerSubjectHook), the reusable SubjectProvisioner, their configs/validators, and the skip-context helpers.", + "watch_for": "CustomerSubjectHookConfig is a type alias of SubjectProvisionerConfig; do not duplicate fields. PostCreate/PostUpdate both just call provisioner.EnsureSubjects \u2014 keep them symmetric. Always thread NewContextWithSkipSubjectCustomer through subject.Create to avoid hook recursion with the customer-side SubjectCustomerHook." + }, + { + "file": "customersubject_test.go", + "role": "Integration test wiring a real Postgres-backed TestEnv with concrete subject + customer adapters/services; registers both this hook and the reciprocal customerservicehooks.NewSubjectCustomerHook to exercise the create/conflict paths.", + "watch_for": "TestEnv is built from underlying constructors (subjectadapter.New, subjectservice.New, customeradapter.New, customerservice.New), not app/common wiring \u2014 preserve that to avoid import cycles. NoopCustomerOverrideService is a local stub satisfying billing.CustomerOverrideService." + } + ], + "anti_patterns": [ + "Calling subject.Create without NewContextWithSkipSubjectCustomer \u2014 triggers infinite recursion with the customer-side SubjectCustomerHook.", + "Returning on the first failing subject key instead of accumulating into errs and errors.Join \u2014 loses errors for other keys.", + "Treating any GetByIdOrKey error as not-found; only models.IsGenericNotFoundError (or IsDeleted) should branch into create.", + "Constructing the hook with slog.Default() or a nil Tracer/Subject \u2014 Validate() rejects nil deps and construction must fail loudly.", + "Building test dependencies from app/common wiring instead of the underlying constructors, creating test-only import cycles." + ], + "decisions": [ + { + "decision": "SubjectProvisioner is split out from the hook itself.", + "rationale": "The provisioning logic (EnsureSubjects/EnsureSubject) is reusable independent of the ServiceHook lifecycle, so it has its own constructor and config." + }, + { + "decision": "A context-key skip flag coordinates the two reciprocal hooks (subject<->customer).", + "rationale": "Customer-create provisions a subject and subject-create provisions a customer; the skip flag breaks the mutual-trigger cycle without disabling either hook globally." + } + ], + "code_examples": [ + { + "scenario": "Constructing and registering the customer subject hook", + "code": "import subjectservicehooks \"github.com/openmeterio/openmeter/openmeter/subject/service/hooks\"\n\nhook, err := subjectservicehooks.NewCustomerSubjectHook(subjectservicehooks.CustomerSubjectHookConfig{\n\tSubject: subjectService,\n\tLogger: logger,\n\tTracer: tracer,\n})\nif err != nil {\n\treturn err\n}\ncustomerService.RegisterHooks(hook) // PostCreate/PostUpdate provision subjects for UsageAttribution.SubjectKeys" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w127.json b/.archie/enrichments/w127.json new file mode 100644 index 0000000000..968de0cba2 --- /dev/null +++ b/.archie/enrichments/w127.json @@ -0,0 +1,434 @@ +{ + "openmeter/subscription/entitlement": { + "purpose": "Bridges subscription items to the entitlement domain. Implements subscription.EntitlementAdapter so the subscription service can schedule, fetch, and delete entitlements tied to subscription items without depending on entitlement internals.", + "patterns": [ + { + "name": "Implements subscription.EntitlementAdapter", + "description": "EntitlementSubscriptionAdapter satisfies the subscription.EntitlementAdapter interface; the compile-time assertion guards it.", + "example": "var _ subscription.EntitlementAdapter = &EntitlementSubscriptionAdapter{}" + }, + { + "name": "Constructor-injected dependencies", + "description": "NewSubscriptionEntitlementAdapter takes entitlement.Service, subscription.SubscriptionItemRepository, and transaction.Creator. No slog.Default or hidden globals.", + "example": "NewSubscriptionEntitlementAdapter(entitlementConnector, itemRepo, txCreator)" + }, + { + "name": "Wrap mutations in transaction.Run", + "description": "ScheduleEntitlement runs inside transaction.Run(ctx, a.txCreator, ...) so entitlement creation participates in the surrounding subscription transaction.", + "example": "return transaction.Run(ctx, a.txCreator, func(ctx context.Context) (*subscription.SubscriptionEntitlement, error) { ... })" + }, + { + "name": "Stamp SubscriptionManaged + merged annotations", + "description": "On schedule, set CreateEntitlementInputs.SubscriptionManaged = true and copy the passed annotations (e.g. AnnotationSubscriptionID) into CreateEntitlementInputs.Annotations.", + "example": "input.CreateEntitlementInputs.SubscriptionManaged = true" + }, + { + "name": "Derive cadence from entitlement ActiveFrom/ActiveTo", + "description": "Build SubscriptionEntitlement.Cadence from the entitlement's ActiveFrom/ActiveTo; error if ActiveFrom is nil (entitlement lacks cadence).", + "example": "Cadence: models.CadencedModel{ActiveFrom: *ent.ActiveFrom, ActiveTo: ent.ActiveTo}" + }, + { + "name": "Typed NotFoundError", + "description": "DeleteByItemID returns *NotFoundError{ItemID} when the item has no EntitlementID; errors carry item/namespace/at context.", + "example": "return &NotFoundError{ItemID: id}" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "EntitlementSubscriptionAdapter implementing ScheduleEntitlement, GetForSubscriptionsAt, DeleteByItemID", + "watch_for": "GetForSubscriptionsAt filters items to those with non-nil EntitlementID and fetches via ListEntitlementsWithCustomer with a zero-value Page so all entitlements are returned; do not introduce pagination here. DeleteByItemID deletes the entitlement at clock.Now()." + }, + { + "file": "errors.go", + "role": "NotFoundError type for missing subscription entitlements", + "watch_for": "Error() conditionally appends item/namespace/at; keep the struct fields optional-safe (zero values produce a shorter message)." + } + ], + "anti_patterns": [ + "Calling entitlementConnector.ScheduleEntitlement outside transaction.Run, breaking transactional consistency with the item create.", + "Forgetting to set SubscriptionManaged = true or to merge subscription annotations into CreateEntitlementInputs.Annotations.", + "Returning a SubscriptionEntitlement when entitlement.ActiveFrom is nil instead of erroring (the cadence would be invalid)." + ], + "decisions": [ + { + "decision": "Subscription depends on an EntitlementAdapter interface rather than entitlement.Service directly", + "rationale": "Keeps the subscription domain decoupled from entitlement internals and lets the adapter own the SubscriptionManaged/annotation stamping and cadence translation." + } + ], + "code_examples": [] + }, + "openmeter/subscription/patch": { + "purpose": "Concrete declarative patches that transform a SubscriptionSpec in-memory (add/remove items and phases, stretch phase, unschedule edit). Each patch enforces timing-safety invariants (cannot edit the past) before mutating the spec.", + "patterns": [ + { + "name": "Patch implements the subscription patch interface", + "description": "Each patch type asserts conformance to subscription.Patch or subscription.ValuePatch[T] and implements Op(), Path(), Validate(), ValueAsAny(), ApplyTo().", + "example": "var _ subscription.ValuePatch[subscription.SubscriptionItemSpec] = PatchAddItem{}" + }, + { + "name": "Validate before apply", + "description": "Validate() chains Path().Validate(), Op().Validate(), then the value's Validate(); wrap nested value errors with the FieldDescriptor prefix.", + "example": "return models.ErrorWithFieldPrefix(a.FieldDescriptor(), err)" + }, + { + "name": "Mutate via spec.Phases / ItemsByKey, never the DB", + "description": "ApplyTo operates only on the in-memory *subscription.SubscriptionSpec (Phases map, ItemsByKey slices). No repo or DB calls in this package.", + "example": "phase.ItemsByKey[a.ItemKey] = append(phase.ItemsByKey[a.ItemKey], &a.CreateInput)" + }, + { + "name": "Enforce past-immutability against ApplyContext.CurrentTime", + "description": "Use spec.GetCurrentPhaseAt(actx.CurrentTime) and phase StartAfter.AddTo(spec.ActiveFrom) to forbid edits to past phases; return typed PatchForbiddenError / PatchValidationError / PatchConflictError.", + "example": "return &subscription.PatchForbiddenError{Msg: fmt.Sprintf(\"cannot add item to phase %s which starts before current phase\", a.PhaseKey)}" + }, + { + "name": "Close-then-add for current-phase items", + "description": "Adding an item to the current phase closes the prior version by setting its ActiveToOverrideRelativeToPhaseStart to the new item's ActiveFrom override (history is never falsified).", + "example": "itemToClose.ActiveToOverrideRelativeToPhaseStart = a.CreateInput.ActiveFromOverrideRelativeToPhaseStart" + }, + { + "name": "Express times as ISODuration relative to phase start", + "description": "Item timing is stored as ActiveFrom/ActiveToOverrideRelativeToPhaseStart using datetime.ISODurationBetween / AddTo, not absolute times.", + "example": "diff := datetime.ISODurationBetween(phaseStartTime, actx.CurrentTime)" + } + ], + "key_file_guides": [ + { + "file": "additem.go", + "role": "PatchAddItem: appends an item version under a phase key with past/future-phase guards", + "watch_for": "Branch logic distinguishes no-current-phase, current-phase (sets ActiveFrom to now if unset), future-phase (key must be empty). When closing a current item it errors if the existing item's scheduled end is after the new start (user must delete first)." + }, + { + "file": "addphase.go", + "role": "PatchAddPhase: inserts a future phase and re-spaces later phases by a signed diff", + "watch_for": "Only future phases allowed (vST.After(CurrentTime)); recomputes StartAfter of all later phases via Duration.Subtract to preserve relative spacing. PatchConflictError if phase key already exists." + }, + { + "file": "removeitem.go", + "role": "PatchRemoveItem: removes last version for a key, or closes it if in current phase", + "watch_for": "Current-phase removal sets ActiveToOverrideRelativeToPhaseStart to now (soft-close); future-phase removal pops the slice and deletes the key when empty. Cannot remove from past phases." + }, + { + "file": "stretchphase.go / unscheduleedit.go / removephase.go", + "role": "Additional spec transforms (extend a phase, revert scheduled edits, drop a phase)", + "watch_for": "Follow the same Validate/ApplyTo + typed-error contract as the other patches." + }, + { + "file": "patch_test.go", + "role": "Shared test harness: testcase[T]/testsuite[T], getDefaultSpec, SpecsEqual", + "watch_for": "Tests call Patch.ApplyTo directly and compare via subscriptiontestutils.SpecsEqual; getDefaultSpec builds a 3-phase spec from GetExamplePlanInput. errors.As is used for typed-error assertions." + } + ], + "anti_patterns": [ + "Calling a repository or DB from a patch's ApplyTo \u2014 patches are pure spec transforms.", + "Returning a bare error instead of PatchValidationError/PatchForbiddenError/PatchConflictError, which downstream maps to API status codes.", + "Allowing edits to phases/items that start before ApplyContext.CurrentTime (rewriting history).", + "Using absolute timestamps for item activity instead of ISODuration overrides relative to phase start." + ], + "decisions": [ + { + "decision": "Item edits in the current phase close the previous version rather than mutate it", + "rationale": "Subscription history must remain immutable for billing correctness; closing then re-adding preserves the audit trail of rate-card versions." + }, + { + "decision": "Adding a phase re-spaces later phases by a signed diff", + "rationale": "Keeps the relative spacing of subsequent phases intact when a new phase is inserted, so existing schedules are not silently shifted." + } + ], + "code_examples": [ + { + "scenario": "Define a spec patch with Validate + ApplyTo", + "code": "type PatchAddItem struct {\n\tPhaseKey string\n\tItemKey string\n\tCreateInput subscription.SubscriptionItemSpec\n}\n\nvar _ subscription.ValuePatch[subscription.SubscriptionItemSpec] = PatchAddItem{}\n\nfunc (a PatchAddItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error {\n\tphase, ok := spec.Phases[a.PhaseKey]\n\tif !ok {\n\t\treturn &subscription.PatchValidationError{Msg: fmt.Sprintf(\"phase %s not found\", a.PhaseKey)}\n\t}\n\t// ... timing guards against actx.CurrentTime ...\n\tphase.ItemsByKey[a.ItemKey] = append(phase.ItemsByKey[a.ItemKey], &a.CreateInput)\n\treturn nil\n}" + } + ] + }, + "openmeter/subscription/repo": { + "purpose": "Ent-backed persistence for subscriptions, phases, and items. Implements the three subscription repository interfaces and owns DB<->domain mapping. Constraint: every method is transaction-aware via entutils.TransactingRepo.", + "patterns": [ + { + "name": "Repo implements subscription repository interface", + "description": "Each repo holds *db.Client and asserts the matching interface (SubscriptionRepository / SubscriptionPhaseRepository / SubscriptionItemRepository).", + "example": "var _ subscription.SubscriptionRepository = (*subscriptionRepo)(nil)" + }, + { + "name": "Wrap every method in entutils.TransactingRepo", + "description": "All read/write methods run inside entutils.TransactingRepo(ctx, r, func(ctx, repo) ...) so they rebind to the ctx transaction; use TransactingRepoWithNoValue for void ops.", + "example": "return entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionRepo) (subscription.Subscription, error) { ... })" + }, + { + "name": "Map DB rows in mapping.go, never inline", + "description": "MapDBSubscription, MapDBSubscripitonPhase, MapDBSubscriptionItem are the only DB->domain converters; queries call them. UTC-normalize times via convert.SafeToUTC.", + "example": "return MapDBSubscription(res)" + }, + { + "name": "Soft-delete with DeletedAt + not-deleted predicates", + "description": "Delete sets DeletedAt = clock.Now(); reads filter via SubscriptionNotDeletedAt(at) / DeletedAtGT helpers in utils.go.", + "example": "Where(SubscriptionNotDeletedAt(clock.Now())...)" + }, + { + "name": "Map ent NotFound to domain not-found errors", + "description": "Check db.IsNotFound(err) and return subscription.NewSubscriptionNotFoundError / NewItemNotFoundError / NewPhaseNotFoundError instead of leaking ent errors.", + "example": "if db.IsNotFound(err) { return subscription.SubscriptionItem{}, subscription.NewItemNotFoundError(id.ID) }" + }, + { + "name": "Tx/Self/WithTx triplet per repo", + "description": "transaction.go implements Tx (HijackTx), Self, and WithTx (NewTxClientFromRawConfig) for each repo so entutils can manage transactions.", + "example": "func (r *subscriptionRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionRepo { ... }" + }, + { + "name": "Filter/order/paginate via pkg helpers", + "description": "List uses filter.ApplyToQuery / filter.SelectPredicate, entutils.GetOrdering, sortx, and pagination.MapResultErr; status filters compose dbsubscription predicates.", + "example": "return pagination.MapResultErr(paged, MapDBSubscription)" + } + ], + "key_file_guides": [ + { + "file": "mapping.go", + "role": "DB->domain mappers; reconstructs RateCard (FlatFee vs UsageBased) from item columns", + "watch_for": "RateCard type is chosen by Price type/cadence; usage-based requires a non-nil billing cadence. FeatureID is left nil (resolved at service level). TaxConfig is backfilled from normalized TaxBehavior/TaxCode columns via BackfillTaxConfig. Item mapping requires the Phase edge to be eagerly loaded (PhaseOrErr)." + }, + { + "file": "subscriptionitemrepo.go", + "role": "Item CRUD; Create translates RateCard meta into Set* columns", + "watch_for": "Queries must .WithPhase().WithTaxCode() or MapDBSubscriptionItem fails. EntitlementTemplate/TaxConfig/Price use non-Nillable setters guarded by nil checks (the value scanners panic on nil)." + }, + { + "file": "subscriptionphaserepo.go", + "role": "Phase CRUD and at-time fetch filters", + "watch_for": "getPhaseForSubscriptionAtFilter scopes by SubscriptionID+Namespace and DeletedAt; GetForSubscriptionsAt errors on empty input filter." + }, + { + "file": "subscriptionrepo.go", + "role": "Subscription CRUD, SetEndOfCadence, UpdateAnnotations, List with status/filter logic", + "watch_for": "Create eagerly attaches the Plan edge after save so MapDBSubscription can read PlanRef. List computes Active/Canceled/Inactive/Scheduled status as predicate groups over now." + }, + { + "file": "utils.go", + "role": "Reusable subscription predicate builders (active at/after/in-period, not-deleted)", + "watch_for": "SubscriptionActiveAt uses ActiveFromLTE + (ActiveToIsNil OR ActiveToGT); reuse these instead of hand-rolling time predicates." + }, + { + "file": "transaction.go", + "role": "Tx/Self/WithTx for all three repos", + "watch_for": "Each new repo must add its triplet here or TransactingRepo cannot rebind to the active transaction." + } + ], + "anti_patterns": [ + "Querying items/phases without .WithPhase()/.WithTaxCode(), causing MapDB* to error on missing edges.", + "Returning raw ent errors instead of mapping db.IsNotFound to subscription.New*NotFoundError.", + "Hard-deleting rows instead of soft-deleting via SetDeletedAt(clock.Now()).", + "Writing a repo method that bypasses entutils.TransactingRepo and uses r.db directly outside the active transaction.", + "Duplicating mapping logic in query methods instead of calling the MapDB* functions." + ], + "decisions": [ + { + "decision": "RateCard kind is inferred from persisted columns rather than a stored discriminator", + "rationale": "Flat-fee vs usage-based is derivable from Price type and presence of a billing cadence, avoiding a separate column and keeping the schema lean." + }, + { + "decision": "Phase/Item Create accept *EntityInput types, not domain specs", + "rationale": "Specs are mapped to flat entity inputs by the service layer; the repo only persists fully-resolved entity inputs, keeping spec semantics out of the DB layer." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware repo read with not-found mapping", + "code": "func (r *subscriptionRepo) GetByID(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error) {\n\treturn entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionRepo) (subscription.Subscription, error) {\n\t\tres, err := repo.db.Subscription.Query().WithPlan().\n\t\t\tWhere(dbsubscription.ID(subscriptionID.ID), dbsubscription.Namespace(subscriptionID.Namespace)).\n\t\t\tWhere(SubscriptionNotDeletedAt(clock.Now())...).First(ctx)\n\t\tif db.IsNotFound(err) {\n\t\t\treturn subscription.Subscription{}, subscription.NewSubscriptionNotFoundError(subscriptionID.ID)\n\t\t} else if err != nil {\n\t\t\treturn subscription.Subscription{}, err\n\t\t}\n\t\treturn MapDBSubscription(res)\n\t})\n}" + } + ] + }, + "openmeter/subscription/service": { + "purpose": "Orchestration layer for the subscription lifecycle (Create/Update/Cancel/Continue/Delete/Get/List/ExpandViews). Owns the sync diff algorithm that reconciles a stored subscription to a target SubscriptionSpec, plus validation, hooks, eventing, and entitlement linkage.", + "patterns": [ + { + "name": "service implements subscription.Service via ServiceConfig DI", + "description": "New(ServiceConfig) wires repos, customer/feature services, EntitlementAdapter, TransactionManager, Publisher, Lockr, FeatureFlags, TaxCode; the unique-constraint validator is registered as a hook in New.", + "example": "var _ subscription.Service = &service{}" + }, + { + "name": "validate -> transaction.Run -> hooks -> publish", + "description": "Mutating methods validate first (state machine + currency), then run inside transaction.Run, fire Before*/After* hooks around the work, and Publish a domain event (NewCreatedEvent, NewUpdatedEvent, etc.).", + "example": "err = s.Publisher.Publish(ctx, subscription.NewCreatedEvent(ctx, view))" + }, + { + "name": "Lock customer and seed operation context", + "description": "Each public method calls subscription.NewSubscriptionOperationContext(ctx); customer-mutating ops call s.lockCustomer (Lockr.LockForTX on GetCustomerLock).", + "example": "ctx = subscription.NewSubscriptionOperationContext(ctx); s.lockCustomer(ctx, spec.CustomerId)" + }, + { + "name": "Gate transitions with the state machine", + "description": "Use subscription.NewStateMachine(view.Subscription.GetStatusAt(now)).CanTransitionOrErr(ctx, action) before Create/Update/Cancel/Continue/Delete.", + "example": "subscription.NewStateMachine(subscription.SubscriptionStatusInactive).CanTransitionOrErr(ctx, subscription.SubscriptionActionCreate)" + }, + { + "name": "sync = three-phase reconcile with touched map", + "description": "sync(view, newSpec) deletes changed/removed, recreates changed, creates new; change detection compares ToCreateSubscription*EntityInput via Equal, and dirty (touched) tracks parent/child invalidation by SpecPath.", + "example": "dirty.mark(subscription.NewPhasePath(currentPhaseView.SubscriptionPhase.Key))" + }, + { + "name": "Cancel/Continue reuse sync by mutating spec.ActiveTo", + "description": "Cancel resolves timing to a cancel time and sets spec.ActiveTo; Continue sets spec.ActiveTo = nil; both then call sync so all cadences re-derive from the subscription cadence.", + "example": "spec.ActiveTo = lo.ToPtr(cancelTime); sub, err := s.sync(ctx, view, spec)" + }, + { + "name": "Reject immutable-field changes in sync", + "description": "sync errors if CustomerId, PlanRef, ActiveFrom, or SettlementMode differ between view and newSpec.", + "example": "if !view.Subscription.PlanRef.NilEqual(newSpec.Plan) { return def, fmt.Errorf(\"cannot change plan\") }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service facade: Create/Update/Delete/Cancel/Continue/Get/GetView/List/ExpandViews, hook registration, customer locking", + "watch_for": "Create persists phases via GetSortedPhases + GetPhaseCadence then updates customer currency if unset. GetView delegates to ExpandViews; ExpandViews only supports a single customer id at a time." + }, + { + "file": "sync.go", + "role": "Core reconcile algorithm and the touched map (SpecPath parent/child invalidation)", + "watch_for": "Marked TODO(OM-1074) cleanup. Item change comparison uses a deliberately-faked 'new' entitlement reused from the current item (commented 'This is a lie') because the new entitlement does not exist yet; touching a phase forces impossibleNamespacedId so child items recompute. Order matters: delete pass, recreate-changed pass, create-new pass." + }, + { + "file": "synchelpers.go", + "role": "createPhase/createItem (with createItemOptions), deletePhase/deleteItem, resolveTaxCode", + "watch_for": "createItem schedules the entitlement via EntitlementAdapter (stamping AnnotationSubscriptionID) BEFORE building the item entity input, and resolveTaxCode mutates the spec's RateCard in place \u2014 order is load-bearing (see the in-code comment). deleteItem deletes the entitlement first when present." + }, + { + "file": "servicevalidation.go", + "role": "validateCreate/Update/Cancel/Continue: state-machine + customer + currency checks", + "watch_for": "Currency mismatch is only enforced when spec.HasBillables(); returns models.NewGenericValidationError. validateCreate also asserts spec.CustomerId == cust.ID." + }, + { + "file": "service_test.go / sync_test.go", + "role": "DB-backed lifecycle tests using subscriptiontestutils.SetupDBDeps + NewService", + "watch_for": "Tests assert spec/view equivalence via subscriptiontestutils.ValidateSpecAndView and drive edits by mutating spec.Phases then calling Update. Use clock.SetTime/FreezeTime for deterministic timing." + } + ], + "anti_patterns": [ + "Mutating subscription contents directly instead of building a target spec and calling Update/sync.", + "Skipping the NewStateMachine transition check before a lifecycle action.", + "Publishing an event or firing hooks outside the transaction.Run boundary, risking inconsistent state on rollback.", + "Changing CustomerId/Plan/ActiveFrom/SettlementMode through sync (these are explicitly rejected).", + "Building the item entity input before scheduling its entitlement / resolving tax code, which breaks the in-place RateCard enrichment." + ], + "decisions": [ + { + "decision": "Cancel and Continue are implemented on top of sync rather than as bespoke updates", + "rationale": "All phase/item cadences are derived from the subscription cadence, so adjusting spec.ActiveTo and re-syncing yields correct deactivation/reactivation for every sub-resource." + }, + { + "decision": "sync recreates a phase/item wholesale when any field changes, tracked via a touched SpecPath map", + "rationale": "Sub-resources are hard-linked to their parents; recreating the parent and re-linking children is simpler and safer than in-place field mutation, and parent/child invalidation falls out of the path-based touched map." + }, + { + "decision": "Validators are registered as hooks (e.g. unique-constraint validator) in New", + "rationale": "Lets cross-cutting invariants run inside the same Before/After hook pipeline as other behavior, keeping the service open for extension without branching its core methods." + } + ], + "code_examples": [ + { + "scenario": "Lifecycle method: validate, transact, hook, publish", + "code": "func (s *service) Update(ctx context.Context, subscriptionID models.NamespacedID, newSpec subscription.SubscriptionSpec) (subscription.Subscription, error) {\n\tctx = subscription.NewSubscriptionOperationContext(ctx)\n\tview, err := s.GetView(ctx, subscriptionID)\n\tif err != nil { return subscription.Subscription{}, err }\n\tif err := s.validateUpdate(ctx, view, newSpec); err != nil { return subscription.Subscription{}, err }\n\treturn transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (subscription.Subscription, error) {\n\t\ts.mu.RLock(); defer s.mu.RUnlock()\n\t\t_ = errors.Join(lo.Map(s.Hooks, func(v subscription.SubscriptionCommandHook, _ int) error { return v.BeforeUpdate(ctx, subscriptionID, newSpec) })...)\n\t\tsubs, err := s.sync(ctx, view, newSpec)\n\t\tif err != nil { return subs, err }\n\t\tupdatedView, _ := s.GetView(ctx, subs.NamespacedID)\n\t\treturn subs, s.Publisher.Publish(ctx, subscription.NewUpdatedEvent(ctx, updatedView))\n\t})\n}" + } + ] + }, + "openmeter/subscription/testutils": { + "purpose": "Shared test fixtures and harness for the subscription domain. Provides SetupDBDeps (migrated Postgres), NewService (a fully wired SubscriptionDependencies graph), example plans/ratecards/customers/addons, spec/view comparators, and mock service implementations.", + "patterns": [ + { + "name": "Wire real services from underlying constructors", + "description": "NewService builds the whole dependency graph from concrete adapters/services (repos, customer, entitlement registry, plan, addon, tax code, workflow) \u2014 not from app/common \u2014 to avoid test-only import cycles.", + "example": "svc, err := service.New(service.ServiceConfig{ SubscriptionRepo: subRepo, ... })" + }, + { + "name": "DB harness: SetupDBDeps + DBDeps.Cleanup", + "description": "SetupDBDeps initializes a Postgres test DB, runs migrate.OMMigrationsConfig Up under a global mutex, and returns DBDeps{DBClient, EntDriver, PGDriver}; pair with defer dbDeps.Cleanup(t).", + "example": "dbDeps := subscriptiontestutils.SetupDBDeps(t); defer dbDeps.Cleanup(t)" + }, + { + "name": "Embed-and-extend test wrappers", + "description": "Helpers embed the real interface and add t.Helper Create*-style methods (testCustomerRepo, testFeatureConnector, testAddonService, testSubscriptionRepo) that t.Fatalf on error.", + "example": "type testCustomerRepo struct { customer.Adapter; subjectService subject.Service }" + }, + { + "name": "Exported example fixtures as package vars", + "description": "Reusable constants/vars: ExampleNamespace, ExampleFeatureKey(1-3), ExampleRateCard1..5, ExampleAddonRateCard1..6, ExampleCreateCustomerInput, ISOMonth, GetExamplePlanInput.", + "example": "plan := deps.PlanHelper.CreatePlan(t, subscriptiontestutils.GetExamplePlanInput(t))" + }, + { + "name": "Spec/view comparators", + "description": "ValidateSpecAndView asserts a created view matches its source spec (incl. entitlement alignment to billing anchor and tax code backfill); SpecsEqual / SubscriptionAddonsEqual compare specs and addons.", + "example": "subscriptiontestutils.ValidateSpecAndView(t, spec, found)" + }, + { + "name": "Builders for plans and specs", + "description": "BuildTestPlanInput / BuildTestSubscriptionSpec return fluent builders (AddPhase, SetMeta, Build) generating test_phase_N keys; Build validates and syncs annotations.", + "example": "BuildTestPlanInput(t).AddPhase(lo.ToPtr(datetime.MustParseDuration(t, \"P1M\")), ExampleRateCard1.Clone())" + }, + { + "name": "Mocks implement the domain interfaces by Fn fields", + "description": "MockService and MockWorkflowService satisfy subscription.Service / workflow.Service by delegating to assignable *Fn function fields.", + "example": "var _ subscription.Service = &MockService{}" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "NewService: builds SubscriptionDependencies (the canonical integration-test fixture)", + "watch_for": "Uses a mock streaming connector and noop tracer; after meterAdapter.SetDBClient it re-reads the resolved meter ID (shared template DB may reassign it). MultiSubscriptionEnabledFF is false by default. Wires annotation cleanup hook and the workflow service." + }, + { + "file": "db.go", + "role": "SetupDBDeps / DBDeps / Cleanup", + "watch_for": "SetupDBDeps serializes via a package-level sync.Mutex and runs full migrations each call; always defer Cleanup or DB connections leak." + }, + { + "file": "compare.go", + "role": "ValidateSpecAndView, SpecsEqual, SubscriptionAddonsEqual and time helpers", + "watch_for": "ValidateSpecAndView checks entitlement UsagePeriod alignment to the truncated billing anchor and metered MeasureUsageFrom == phase start; tax-code expectations branch on TaxConfig.TaxCodeID vs Stripe.Code backfill." + }, + { + "file": "ratecard.go / addon.go / plan.go / feature.go", + "role": "Example RateCards, Addons, plan input, and feature fixtures", + "watch_for": "GetExamplePlanInput builds a fixed 3-phase plan (P1M, P2M, open-ended). Clone() rate cards before mutating shared vars to avoid cross-test contamination." + }, + { + "file": "customer.go / repository.go / builder.go", + "role": "Customer service/adapter helpers, repo wrappers, and plan/spec builders", + "watch_for": "CreateExampleCustomer creates the subjects first (UsageAttribution.SubjectKeys) then the customer; builders use clock.Now() so freeze the clock for determinism." + }, + { + "file": "mock.go", + "role": "MockService / MockWorkflowService with *Fn delegation", + "watch_for": "Unset *Fn fields panic with a nil-call; set every Fn the code under test will invoke. MarshalJSON/UnmarshalJSON on TestPatch panic by design." + }, + { + "file": "billing.go", + "role": "NoopCustomerOverrideService satisfying billing.CustomerOverrideService", + "watch_for": "Returns zero values; use only when billing behavior is irrelevant to the test." + } + ], + "anti_patterns": [ + "Importing app/common wiring here \u2014 build dependencies from underlying constructors to prevent test-only import cycles.", + "Mutating a shared Example* RateCard/var without Clone(), leaking state across tests.", + "Skipping defer dbDeps.Cleanup(t), leaking Postgres/ent/pg drivers.", + "Leaving a MockService *Fn nil for a method the test exercises (panics on nil call).", + "Assuming the meter ID stays constant across SetDBClient \u2014 read back the resolved ID." + ], + "decisions": [ + { + "decision": "NewService assembles the real service graph instead of using the app DI layer", + "rationale": "Keeps subscription test helpers independent from app/common so unrelated wiring changes don't create import cycles, while still exercising production code paths." + }, + { + "decision": "SetupDBDeps runs full migrations per call under a global mutex", + "rationale": "Guarantees a real, schema-correct Postgres for each suite and serializes setup to avoid concurrent migration races against a shared instance." + } + ], + "code_examples": [ + { + "scenario": "Standard DB-backed subscription test setup", + "code": "dbDeps := subscriptiontestutils.SetupDBDeps(t)\ndefer dbDeps.Cleanup(t)\n\ndeps := subscriptiontestutils.NewService(t, dbDeps)\nservice := deps.SubscriptionService\n\ncust := deps.CustomerAdapter.CreateExampleCustomer(t)\n_ = deps.FeatureConnector.CreateExampleFeatures(t, deps.ExampleMeterID)\nplan := deps.PlanHelper.CreatePlan(t, subscriptiontestutils.GetExamplePlanInput(t))\n\nspec, err := subscription.NewSpecFromPlan(plan, subscription.CreateSubscriptionCustomerInput{\n\tCustomerId: cust.ID, Currency: \"USD\", ActiveFrom: clock.Now(), BillingAnchor: clock.Now(), Name: \"Test\",\n})\nrequire.NoError(t, err)\nsub, err := service.Create(ctx, subscriptiontestutils.ExampleNamespace, spec)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w128.json b/.archie/enrichments/w128.json new file mode 100644 index 0000000000..543bf4ff16 --- /dev/null +++ b/.archie/enrichments/w128.json @@ -0,0 +1,324 @@ +{ + "openmeter/subscription/addon/diff": { + "purpose": "Pure-functional engine that computes how a SubscriptionAddon transforms a SubscriptionSpec (apply) and how to undo it (restore). It bridges subscription addons into the spec model by splitting/merging items per phase so the addon's rate cards are present for its cadence; constraint: this package is internal to subscription and never persists.", + "patterns": [ + { + "name": "Diffable apply/restore pair", + "description": "Every addon transform is expressed as a Diffable with GetApplies() and GetRestores() returning subscription.AppliesToSpec; the two operations must be exact inverses (restore_test asserts SpecsEqual after apply+restore).", + "example": "type Diffable interface { GetApplies() subscription.AppliesToSpec; GetRestores() subscription.AppliesToSpec }" + }, + { + "name": "AppliesToSpec closures, never direct mutation", + "description": "Spec changes are wrapped in subscription.NewAppliesToSpec(func(spec *SubscriptionSpec, actx ApplyContext) error {...}) and aggregated via subscription.NewAggregateAppliesToSpec; callers invoke spec.Apply(...). Do not mutate the spec outside an AppliesToSpec.", + "example": "return subscription.NewAppliesToSpec(func(spec *subscription.SubscriptionSpec, _ subscription.ApplyContext) error { ... })" + }, + { + "name": "Per-phase gap/intersection splitting", + "description": "getApplyForRateCard walks spec.GetSortedPhases(), intersects the addon cadence with each phase via timeutil.OpenPeriod, tracks uncovered gaps, splits existing items into difference+intersection parts, and creates new items for gaps using rc.Apply Quantity times.", + "example": "addInPhase := pCad.AsPeriod().Intersection(addPer); gaps := []timeutil.OpenPeriod{*addInPhase}" + }, + { + "name": "Quantity-driven rate card application", + "description": "rc.Apply(rateCard, annotations) is invoked exactly d.addon.Quantity times (gaps use Quantity-1 since the base card already exists); Quantity==0 yields a no-op AppliesToSpec. Merge math lives in subscriptionaddon, not here.", + "example": "for range d.addon.Quantity { err := rc.Apply(inst.RateCard, inst.Annotations) }" + }, + { + "name": "Relative cadence via setItemRelativeCadence", + "description": "Item cadences are stored as ActiveFromOverrideRelativeToPhaseStart / ActiveToOverrideRelativeToPhaseStart durations computed with datetime.ISODurationBetween(phaseStart, target); overrides equal to the phase boundary are left nil.", + "example": "item.ActiveFromOverrideRelativeToPhaseStart = &diff // datetime.ISODurationBetween(phaseCadence.ActiveFrom, *target.From)" + }, + { + "name": "Restore deletes only effectively-zero items", + "description": "restore() undoes rc.Restore Quantity times, then deletes an item only if zeroRateCardCheck.CanDelete() (zero price/entitlement AND not owned by OwnerSubscriptionSubSystem), and re-merges subsequent identical items.", + "example": "chk := zeroRateCardCheck{itemAnnotations: item.Annotations, rc: target}; if chk.CanDelete() { rmIdxs = append(rmIdxs, idx) }" + } + ], + "key_file_guides": [ + { + "file": "diff.go", + "role": "Defines Diffable interface and someDiffable (closure-backed Apply/Restore fns)", + "watch_for": "GetApplies/GetRestores must wrap fns in NewAppliesToSpec; keep the two symmetric" + }, + { + "file": "addon.go", + "role": "GetDiffableFromAddon builds a someDiffable from an addon's instances; per-instance diffable aggregates per-rate-card applies", + "watch_for": "Returns (nil, nil) when no instances/quantities \u2014 callers must nil-check the Diffable (see create.go list flow)" + }, + { + "file": "apply.go", + "role": "getApplyForRateCard: the phase-splitting algorithm; setItemRelativeCadence", + "watch_for": "Gaps use Quantity-1 applies; phases iterated only between phaseAtCadenceStart and phaseAtCadenceEnd; sort newItems by cadence" + }, + { + "file": "restore.go", + "role": "Inverse of apply: undo rc effects, delete zero items, re-merge subsequent identical items", + "watch_for": "Merge predicate compares RateCard.Equal, Annotations DeepEqual, BillingBehaviorOverride, and subsequency; empty ItemsByKey entries are deleted" + }, + { + "file": "zeroratecard.go", + "role": "zeroRateCardCheck.CanDelete \u2014 decides if a restored item is safe to remove", + "watch_for": "Only measures fields rc.Apply/Restore touches (Price, EntitlementTemplate); non-flat price or owner annotation blocks deletion" + }, + { + "file": "affected.go", + "role": "GetAffectedItemIDs maps rate-card key -> affected subscription item IDs (used by http mapping)", + "watch_for": "Marked FIXME for placement; uses AddonRateCardMatcherForAGivenPlanRateCard and dedupes with lo.Uniq" + } + ], + "anti_patterns": [ + "Mutating SubscriptionSpec phases/items outside a NewAppliesToSpec closure", + "Making GetApplies and GetRestores non-inverse (breaks restore_test SpecsEqual assertions)", + "Calling rc.Apply a number of times other than addon.Quantity (gaps use Quantity-1)", + "Persisting or reaching into repos/services from this package \u2014 it is pure spec math, internal to subscription", + "Setting absolute item cadences instead of relative ActiveFrom/ActiveToOverrideRelativeToPhaseStart durations" + ], + "decisions": [ + { + "decision": "Express addon application as reversible Diffable apply/restore rather than mutating persisted state", + "rationale": "Lets the workflow layer compose addon changes onto an in-memory spec and undo them deterministically; tests verify symmetry" + }, + { + "decision": "Item splitting/merging done by period arithmetic (timeutil.OpenPeriod gaps/difference/intersection)", + "rationale": "An addon must cover its exact cadence within each phase, possibly splitting pre-existing items; period algebra makes coverage provable" + }, + { + "decision": "RateCard merge/restore math delegated to subscriptionaddon package", + "rationale": "Keeps this package focused on spec topology; README explicitly states merging logic lives in subscriptionaddon" + } + ], + "code_examples": [] + }, + "openmeter/subscription/addon/http": { + "purpose": "HTTP driver (package httpdriver) for the subscription-addon REST surface: create, list, get, and update (quantity change) of subscription addons. Thin transport layer that decodes requests, delegates to the subscription-addon Service and subscription Workflow Service, and maps domain objects to api.SubscriptionAddon.", + "patterns": [ + { + "name": "httptransport.HandlerWithArgs triple", + "description": "Each endpoint defines Params/Request/Response/Handler type aliases and a method returning httptransport.NewHandlerWithArgs(decode, handle, encode, opts...). Decode resolves namespace and decodes body; encode uses commonhttp.JSONResponseEncoderWithStatus.", + "example": "CreateSubscriptionAddonHandler = httptransport.HandlerWithArgs[CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, CreateSubscriptionAddonParams]" + }, + { + "name": "Namespace resolution via resolveNamespace", + "description": "Every decode step calls h.resolveNamespace(ctx) (wraps NamespaceDecoder.GetNamespace) and builds models.NamespacedID from path params; missing namespace returns a 500 HTTPError.", + "example": "ns, err := h.resolveNamespace(ctx); SubscriptionID: models.NamespacedID{Namespace: ns, ID: params.SubscriptionID}" + }, + { + "name": "Workflow service for mutations, addon service for reads", + "description": "Create/Update route through h.SubscriptionWorkflowService (AddAddon / ChangeAddonQuantity); Get/List read via h.SubscriptionAddonService and fetch the SubscriptionView via h.SubscriptionService.GetView for response mapping.", + "example": "view, add, err = h.SubscriptionWorkflowService.AddAddon(ctx, req.SubscriptionID, req.AddonInput)" + }, + { + "name": "Create-or-change upsert convenience", + "description": "CreateSubscriptionAddon lists existing addons; if the AddonID already exists it calls ChangeAddonQuantity instead of AddAddon, so POST is idempotent-by-addon.", + "example": "if sAdd, ok := lo.Find(subsAdds.Items, ...); ok { ChangeAddonQuantity(...) } else { AddAddon(...) }" + }, + { + "name": "Response mapping requires both view and addon", + "description": "MapSubscriptionAddonToResponse(view, addon) computes the union period of instances, current quantity at clock.Now(), affected item IDs via addondiff.GetAffectedItemIDs, and maps rate cards via productcataloghttp.FromRateCard.", + "example": "return MapSubscriptionAddonToResponse(view, add)" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler interface, HandlerConfig (SubscriptionAddonService, SubscriptionWorkflowService, SubscriptionService, NamespaceDecoder, Logger), NewHandler, resolveNamespace", + "watch_for": "New endpoints must be added to the Handler interface and wired in router" + }, + { + "file": "create.go", + "role": "createSubscriptionAddon \u2014 decodes SubscriptionAddonCreate, upserts via workflow service", + "watch_for": "Returns 200 (not 201); contains the find-existing-then-ChangeQuantity branch" + }, + { + "file": "update.go", + "role": "updateSubscriptionAddon \u2014 ChangeAddonQuantity; requires Timing and Quantity in body", + "watch_for": "Explicitly errors if body.Timing or body.Quantity is nil before mapping" + }, + { + "file": "get.go / list.go", + "role": "Read paths; both fetch SubscriptionView via SubscriptionService.GetView to enrich the response", + "watch_for": "List uses slicesx.MapWithErr; both depend on the view being available for affected-item mapping" + }, + { + "file": "mapping.go", + "role": "MapCreateSubscriptionAddonRequestToInput and MapSubscriptionAddonToResponse", + "watch_for": "Errors with 'no instances found' if addon has zero instances; timing mapped via subscriptionhttp.MapAPITimingToTiming; depends on addondiff.GetAffectedItemIDs" + } + ], + "anti_patterns": [ + "Putting business validation or persistence in handlers \u2014 delegate to Service/WorkflowService", + "Building NamespacedID without resolveNamespace (drops tenant scoping)", + "Mapping a response without the SubscriptionView (affected item IDs and union period need it)", + "Adding an endpoint method without registering it on the Handler interface" + ], + "decisions": [ + { + "decision": "POST create doubles as quantity-change when addon already present", + "rationale": "Convenience so clients need not check existence first; keeps a single 'add this addon' verb" + }, + { + "decision": "Mutations go through the workflow service, not the addon service directly", + "rationale": "AddAddon/ChangeAddonQuantity must also sync the subscription view/spec, which is the workflow layer's responsibility" + } + ], + "code_examples": [] + }, + "openmeter/subscription/addon/repo": { + "purpose": "Ent-backed persistence (package subscriptionaddonrepo) for subscription addons and their quantity timeline. Implements subscriptionaddon.SubscriptionAddonRepository and SubscriptionAddonQuantityRepository, mapping db rows to domain types; constraint: every method is transaction-aware via entutils.TransactingRepo.", + "patterns": [ + { + "name": "TransactingRepo wrapping", + "description": "Every repo method body is wrapped in entutils.TransactingRepo(ctx, r, func(ctx, repo) {...}) so it rebinds to any tx already in ctx; Tx/Self/WithTx are implemented in transaction.go.", + "example": "return entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionAddonRepo) (...) { ... })" + }, + { + "name": "Interface assertion + constructor", + "description": "Each repo asserts the domain interface (var _ subscriptionaddon.SubscriptionAddonRepository = (*subscriptionAddonRepo)(nil)) and exposes a NewX(db *db.Client) constructor returning the unexported struct.", + "example": "var _ subscriptionaddon.SubscriptionAddonRepository = (*subscriptionAddonRepo)(nil)" + }, + { + "name": "Eager-load via querySubscriptionAddon", + "description": "Reads always go through querySubscriptionAddon which WithAddon(WithRatecards(WithFeatures, WithTaxCode)) and WithQuantities ordered by ActiveFrom then CreatedAt; mapping assumes these edges are loaded.", + "example": "query.WithAddon(func(aq){ aq.WithRatecards(...) }).WithQuantities(...)" + }, + { + "name": "Db-to-domain mapping in mapping.go", + "description": "MapSubscriptionAddon builds the domain SubscriptionAddon from edges; quantities become a timeutil.NewTimeline of Timed values; rate cards reuse addonrepo.FromAddonRow / FromAddonRateCardRow from productcatalog.", + "example": "base.Quantities = timeutil.NewTimeline(lo.Map(quantities, func(q, _){ return q.AsTimed() }))" + }, + { + "name": "Quantity changes are append-only", + "description": "subscriptionAddonQuantityRepo.Create inserts a new SubscriptionAddonQuantity row (ActiveFrom, Quantity); history is never mutated in place \u2014 the timeline is rebuilt on read.", + "example": "repo.db.SubscriptionAddonQuantity.Create().SetActiveFrom(...).SetQuantity(...).Save(ctx)" + }, + { + "name": "Optional pagination", + "description": "List returns all items as a single page when filter.Page.IsZero(), otherwise query.Paginate(ctx, filter.Page) + entutils.MapPagedWithErr; ordering selected by filter.OrderBy (ID/UpdatedAt/CreatedAt default).", + "example": "if filter.Page.IsZero() { ... pagination.NewPage(1, len(items)) } else { query.Paginate(ctx, filter.Page) }" + } + ], + "key_file_guides": [ + { + "file": "subscriptionaddon.go", + "role": "subscriptionAddonRepo: Create/Get/List plus the shared querySubscriptionAddon eager-load helper", + "watch_for": "Get returns models.NewGenericNotFoundError on db.IsNotFound; List branches on Page.IsZero; mapping relies on edges loaded by querySubscriptionAddon" + }, + { + "file": "subscriptionaddonquantity.go", + "role": "subscriptionAddonQuantityRepo: append-only Create of a quantity segment", + "watch_for": "No update/delete \u2014 changing quantity means inserting a new row keyed by ActiveFrom" + }, + { + "file": "mapping.go", + "role": "MapSubscriptionAddon(s), MapSubscriptionAddonRateCard(s), MapSubscriptionAddonQuantity(ies)", + "watch_for": "Reads entity.Edges.Addon.Edges.Ratecards (panics if Addon edge nil); reuses productcatalog addonrepo.FromAddonRow/FromAddonRateCardRow" + }, + { + "file": "transaction.go", + "role": "Tx/Self/WithTx for both repos via db.HijackTx + entutils.NewTxDriver", + "watch_for": "Required boilerplate for TransactingRepo to work; WithTx rebuilds the client from raw tx config" + } + ], + "anti_patterns": [ + "Bypassing querySubscriptionAddon on reads (mapping assumes Addon/Ratecards/Quantities edges are loaded)", + "Updating or deleting quantity rows instead of inserting a new ActiveFrom segment", + "Writing a repo method without entutils.TransactingRepo wrapping", + "Returning raw db.IsNotFound instead of models.NewGenericNotFoundError", + "Hand-mapping rate cards instead of delegating to addonrepo.FromAddonRow/FromAddonRateCardRow" + ], + "decisions": [ + { + "decision": "Quantity is an append-only timeline of (ActiveFrom, Quantity) rows", + "rationale": "Addon quantity changes over time; the domain reconstructs a timeutil.Timeline so historical quantities remain queryable" + }, + { + "decision": "Reuse productcatalog addon adapter for rate-card mapping", + "rationale": "SubscriptionAddon rate cards are addon rate cards; sharing FromAddonRow avoids divergent mapping logic" + } + ], + "code_examples": [] + }, + "openmeter/subscription/addon/service": { + "purpose": "Service layer (package service) implementing subscriptionaddon.Service: Create, Get, List, ChangeQuantity for subscription addons. It validates compatibility (plan linkage, phase availability, instance type, max quantity) before persisting through the repos and publishing watermill events.", + "patterns": [ + { + "name": "Config struct with Validate + NewService", + "description": "Dependencies (SubAddRepo, SubAddQtyRepo, Publisher, TxManager, AddonService, PlanAddonService, SubService, Logger) are passed via a Config whose Validate() checks each non-nil; NewService(cfg) returns subscriptionaddon.Service and errors on invalid config.", + "example": "func NewService(cfg Config) (subscriptionaddon.Service, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Validate-then-check-compatibility-then-transact", + "description": "Create/ChangeQuantity first input.Validate() (wrapped in models.NewGenericValidationError), then fetch addon + subscription view, run compatibility checks, and only then transaction.Run(ctx, TxManager, ...) to write + publish.", + "example": "return transaction.Run(ctx, s.cfg.TxManager, func(ctx context.Context) (...) { ... })" + }, + { + "name": "GenericValidationError for business rules", + "description": "Domain violations (single-instance qty != 1, addon not linked to plan, phase too early, max quantity exceeded, custom subscription) return models.NewGenericValidationError with a formatted message; tests assert via ErrorAs(&GenericValidationError{}).", + "example": "return nil, models.NewGenericValidationError(fmt.Errorf(\"addon %s@%d can be added a maximum of %d times\", add.Key, add.Version, *compatibility.MaxQuantity))" + }, + { + "name": "Phase-availability scan against PlanAddon compatibility", + "description": "Both Create and ChangeQuantity look up planaddon.GetPlanAddon, then iterate sView.Phases stopping at compatibility.FromPlanPhase; if the addon's start phase is reached first it errors that the addon can only start from FromPlanPhase.", + "example": "for _, phase := range sView.Phases { if phase.SubscriptionPhase.Key == compatibility.FromPlanPhase { break }; if phase...Key == phaseAtAddonStart.PhaseKey { return ...validation error } }" + }, + { + "name": "Publish customer-scoped events in-transaction", + "description": "After persisting, the service re-fetches the addon and publishes subscriptionaddon.NewCreatedEvent / NewChangeQuantityEvent with sView.Customer via the eventbus Publisher inside the same transaction.", + "example": "err = s.cfg.Publisher.Publish(ctx, subscriptionaddon.NewCreatedEvent(ctx, sView.Customer, *subscriptionAddon))" + }, + { + "name": "Create initial quantity alongside addon", + "description": "Create writes the SubscriptionAddon row then the initial CreateSubscriptionAddonQuantityRepositoryInput, then re-Get to return a fully-loaded aggregate; ChangeQuantity reuses CreateSubscriptionAddonQuantityRepositoryInput(input).", + "example": "s.cfg.SubAddQtyRepo.Create(ctx, *subAdd, subscriptionaddon.CreateSubscriptionAddonQuantityRepositoryInput{ActiveFrom: input.InitialQuantity.ActiveFrom, Quantity: input.InitialQuantity.Quantity})" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config/Validate/NewService and Create/Get/List/ChangeQuantity implementations", + "watch_for": "Compatibility-check logic is duplicated between Create and ChangeQuantity; both re-Get after write and publish in-tx; Create blocks PlanRef==nil (custom subscriptions)" + }, + { + "file": "create_test.go", + "role": "Service-backed Create tests (invalid input, missing addon/subscription, single-instance qty, plan linkage, phase, max quantity)", + "watch_for": "Uses subscriptiontestutils withDeps + createPlanWithAddon; asserts exact error strings like 'addon %s@%d is not linked to the plan'" + }, + { + "file": "change_test.go", + "role": "ChangeQuantity tests incl. max-quantity-after-purchase and single-instance guard", + "watch_for": "createExampleSubscriptionAddon helper builds plan+addon+subscription+subAddon; ChangeQuantity appends a quantity segment" + }, + { + "file": "list_test.go", + "role": "Get/List tests including pagination and name/description inheritance from addon", + "watch_for": "List returns all when Page is zero; SubscriptionAddonsEqual used for comparison" + } + ], + "anti_patterns": [ + "Persisting before running input.Validate() and plan/phase/quantity compatibility checks", + "Returning plain errors for business-rule violations instead of models.NewGenericValidationError", + "Writing without transaction.Run, or publishing events outside the transaction", + "Allowing addon purchase on a subscription with nil PlanRef (custom subscription)", + "Skipping the re-Get before returning/publishing (event and return value must carry the full aggregate)" + ], + "decisions": [ + { + "decision": "Quantity changes are modeled as new quantity segments, not in-place edits", + "rationale": "Mirrors the append-only repo timeline so an addon's quantity history is preserved; ChangeQuantity simply Creates another segment" + }, + { + "decision": "Compatibility (plan linkage, FromPlanPhase, MaxQuantity, instance type) is enforced in the service, not the repo", + "rationale": "These rules depend on PlanAddon and SubscriptionView state the repo doesn't see; service is the only place with all dependencies" + }, + { + "decision": "Events published inside the same transaction as the write", + "rationale": "Ensures created/change-quantity events are not emitted for rolled-back changes" + } + ], + "code_examples": [ + { + "scenario": "Validate, check compatibility, then persist + publish in a transaction", + "code": "func (s *service) Create(ctx context.Context, ns string, input subscriptionaddon.CreateSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn nil, models.NewGenericValidationError(fmt.Errorf(\"invalid input: %w\", err))\n\t}\n\t// ... fetch addon, sView, plan-addon compatibility, phase + max-quantity checks ...\n\treturn transaction.Run(ctx, s.cfg.TxManager, func(ctx context.Context) (*subscriptionaddon.SubscriptionAddon, error) {\n\t\tsubAdd, err := s.cfg.SubAddRepo.Create(ctx, ns, subscriptionaddon.CreateSubscriptionAddonRepositoryInput{\n\t\t\tMetadataModel: input.MetadataModel, AddonID: input.AddonID, SubscriptionID: input.SubscriptionID,\n\t\t})\n\t\tif err != nil { return nil, err }\n\t\tif _, err = s.cfg.SubAddQtyRepo.Create(ctx, *subAdd, subscriptionaddon.CreateSubscriptionAddonQuantityRepositoryInput{\n\t\t\tActiveFrom: input.InitialQuantity.ActiveFrom, Quantity: input.InitialQuantity.Quantity,\n\t\t}); err != nil { return nil, err }\n\t\tsubscriptionAddon, err := s.cfg.SubAddRepo.Get(ctx, subscriptionaddon.GetSubscriptionAddonInput{NamespacedID: *subAdd})\n\t\tif err != nil { return nil, err }\n\t\tif err = s.cfg.Publisher.Publish(ctx, subscriptionaddon.NewCreatedEvent(ctx, sView.Customer, *subscriptionAddon)); err != nil {\n\t\t\treturn subscriptionAddon, err\n\t\t}\n\t\treturn subscriptionAddon, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w129.json b/.archie/enrichments/w129.json new file mode 100644 index 0000000000..71b514b638 --- /dev/null +++ b/.archie/enrichments/w129.json @@ -0,0 +1,67 @@ +{ + "openmeter/subscription/hooks/annotations": { + "purpose": "Single-file (hook.go, package annotationhook) command hook that keeps the previous/superseding subscription cross-link annotations consistent when a subscription is deleted. It runs on BeforeDelete to repair the doubly-linked list of subscriptions so neither neighbor points at a soon-to-be-deleted subscription.", + "patterns": [ + { + "name": "Embed NoOpSubscriptionCommandHook", + "description": "The hook struct embeds subscription.NoOpSubscriptionCommandHook so it only overrides the lifecycle methods it cares about (BeforeDelete) and inherits no-op implementations for the rest.", + "example": "type AnnotationCleanupHook struct { subscription.NoOpSubscriptionCommandHook; subscriptionQueryService subscription.QueryService; subscriptionRepo subscription.SubscriptionRepository; logger *slog.Logger }" + }, + { + "name": "Constructor validates non-nil deps and returns error", + "description": "NewAnnotationCleanupHook returns (*AnnotationCleanupHook, error), nil-checking subscriptionQueryService, subscriptionRepository, and logger before constructing. Logger is injected explicitly, never slog.Default().", + "example": "if subscriptionQueryService == nil { return nil, fmt.Errorf(\"subscription query service is required\") }" + }, + { + "name": "Read links via subscription.AnnotationParser", + "description": "Never index the annotation map directly. Read superseding/previous IDs with AnnotationParser.GetSupersedingSubscriptionID / GetPreviousSubscriptionID and write with SetPreviousSubscriptionID / SetSupersedingSubscriptionID / ClearSupersedingSubscriptionID.", + "example": "supersedingID := subscription.AnnotationParser.GetSupersedingSubscriptionID(view.Subscription.Annotations)" + }, + { + "name": "Clone annotations before mutating", + "description": "Annotations from a fetched view are cloned with maps.Clone before mutation (or initialized to models.Annotations{}), so the in-memory view is never mutated in place.", + "example": "if supersedingAnnotations != nil { supersedingAnnotations = maps.Clone(supersedingAnnotations) } else { supersedingAnnotations = models.Annotations{} }" + }, + { + "name": "Tolerate missing neighbor subscriptions", + "description": "GetView failures are inspected with subscription.IsSubscriptionNotFoundError; a missing neighbor is logged and skipped (return nil) rather than failing the delete. Other errors are wrapped and propagated.", + "example": "if subscription.IsSubscriptionNotFoundError(err) { h.logger.Error(\"superseding subscription not found, continuing without cleanup\", ...); return nil }" + }, + { + "name": "Persist via SubscriptionRepository.UpdateAnnotations", + "description": "Annotation writes go through subscriptionRepo.UpdateAnnotations(ctx, NamespacedID, annotations); when the resulting map is empty it is collapsed to nil before persisting.", + "example": "if len(supersedingAnnotations) == 0 { supersedingAnnotations = nil }; _, err = h.subscriptionRepo.UpdateAnnotations(ctx, supersedingView.Subscription.NamespacedID, supersedingAnnotations)" + } + ], + "key_file_guides": [ + { + "file": "hook.go", + "role": "Defines AnnotationCleanupHook + NewAnnotationCleanupHook and the BeforeDelete handler delegating to updateSupersedingSubscriptionAnnotations and updatePreviousSubscriptionAnnotations.", + "watch_for": "The two update methods are near-mirror images (superseding vs previous direction). When editing one, keep the other symmetric. Note the asymmetry: superseding-side clears the previous key via raw delete(annotations, subscription.AnnotationPreviousSubscriptionID), while previous-side clears via AnnotationParser.ClearSupersedingSubscriptionID \u2014 don't accidentally unify them incorrectly. BeforeDelete fails the whole delete if either update returns a non-not-found error." + } + ], + "anti_patterns": [ + "Mutating view.Subscription.Annotations in place instead of cloning \u2014 corrupts the caller's in-memory view.", + "Indexing or writing the annotation map with raw string keys instead of going through subscription.AnnotationParser (except the existing delete of AnnotationPreviousSubscriptionID).", + "Failing the delete when a neighbor subscription is not found \u2014 must detect IsSubscriptionNotFoundError, log, and continue.", + "Falling back to slog.Default() instead of requiring an injected *slog.Logger in the constructor.", + "Persisting an empty (zero-length) annotation map instead of collapsing it to nil before UpdateAnnotations." + ], + "decisions": [ + { + "decision": "Cleanup runs in BeforeDelete and relinks the surviving neighbors to each other.", + "rationale": "Subscriptions form a doubly-linked previous/superseding chain via annotations; deleting a middle node would leave dangling references, so the hook stitches previous<->superseding together (or clears the dangling side) to keep the chain valid." + }, + { + "decision": "Hook embeds NoOpSubscriptionCommandHook and depends only on QueryService + SubscriptionRepository.", + "rationale": "Keeps the hook narrowly scoped to annotation repair and avoids pulling in the full mutation service, preventing import cycles and side effects beyond annotation updates." + } + ], + "code_examples": [ + { + "scenario": "Repairing the superseding neighbor's previous-link when a subscription is deleted", + "code": "func (h *AnnotationCleanupHook) updateSupersedingSubscriptionAnnotations(ctx context.Context, view subscription.SubscriptionView) error {\n\tsupersedingID := subscription.AnnotationParser.GetSupersedingSubscriptionID(view.Subscription.Annotations)\n\tpreviousID := subscription.AnnotationParser.GetPreviousSubscriptionID(view.Subscription.Annotations)\n\tif supersedingID == nil {\n\t\treturn nil\n\t}\n\tsupersedingView, err := h.subscriptionQueryService.GetView(ctx, models.NamespacedID{ID: lo.FromPtr(supersedingID), Namespace: view.Subscription.Namespace})\n\tif err != nil {\n\t\tif subscription.IsSubscriptionNotFoundError(err) {\n\t\t\th.logger.Error(\"superseding subscription not found, continuing without cleanup\", \"error\", err)\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"failed to get superseding subscription: %w\", err)\n\t}\n\tann := maps.Clone(supersedingView.Subscription.Annotations)\n\tif previousID != nil {\n\t\tann, err = subscription.AnnotationParser.SetPreviousSubscriptionID(ann, *previousID)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tdelete(ann, subscription.AnnotationPreviousSubscriptionID)\n\t\tif len(ann) == 0 {\n\t\t\tann = nil\n\t\t}\n\t}\n\t_, err = h.subscriptionRepo.UpdateAnnotations(ctx, supersedingView.Subscription.NamespacedID, ann)\n\treturn err\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w13.json b/.archie/enrichments/w13.json new file mode 100644 index 0000000000..498edf306d --- /dev/null +++ b/.archie/enrichments/w13.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/usagebased/service": { + "purpose": "The orchestration layer for usage-based billing charges: it owns the per-settlement-mode state machines (credit_only, credit_then_invoice), the billing.LineEngine implementation, and the charges.Service entrypoints (Create, AdvanceCharge, TriggerPatch, GetByID, GetCurrentTotals). It decides WHICH triggers fire and WHICH status to enter, delegating rating to the rating/ subpackage and run mechanics (persistence, credits, payments) to the run/ subpackage.", + "patterns": [ + { + "name": "Config-validated New with composed sub-services", + "description": "New(Config) validates every dependency is non-nil, then constructs the rating Service (usagebasedrating.New) and run Service (usagebasedrun.New) internally and stores them as s.rater / s.runs. Public methods are on *service.", + "example": "func New(config Config) (usagebased.Service, error) { if err := config.Validate(); err != nil { return nil, err }; rater, err := usagebasedrating.New(...); runs, err := usagebasedrun.New(...); return &service{adapter: config.Adapter, rater: rater, runs: runs, ...} }" + }, + { + "name": "Settlement-mode dispatch to a state machine", + "description": "newStateMachine switches on config.Charge.Intent.SettlementMode: CreditOnlySettlementMode -> NewCreditsOnlyStateMachine, CreditThenInvoiceSettlementMode -> NewCreditThenInvoiceStateMachine, default -> NewGenericNotImplementedError. Each state-machine constructor re-asserts the settlement mode and calls configureStates().", + "example": "switch config.Charge.Intent.SettlementMode { case productcatalog.CreditOnlySettlementMode: return NewCreditsOnlyStateMachine(config) ... default: return nil, models.NewGenericNotImplementedError(...) }" + }, + { + "name": "Declarative state config via stateless library + meta.Trigger* constants", + "description": "configureStates() builds the machine with s.Configure(Status).Permit(meta.Trigger, NextStatus, guard).OnActive/OnEntry(...). Guards use statelessx.BoolFn / WithParameters / AllOf. Status and Trigger values live in usagebased and meta packages \u2014 never invent local statuses.", + "example": "s.Configure(usagebased.StatusActive).Permit(meta.TriggerFinalInvoiceCreated, usagebased.StatusActiveFinalRealizationStarted, statelessx.BoolFn(s.IsAfterServicePeriod)).OnActive(statelessx.AllOf(s.SyncFeatureIDFromFeatureMeter, s.AdvanceAfterServicePeriodTo))" + }, + { + "name": "Input.Validate() then transaction.Run(s.adapter, ...)", + "description": "Every public service method validates its Input first, then wraps the body in transaction.Run(ctx, s.adapter, fn). Mutating-by-id flows additionally go through withLockedCharge which acquires charges.NewLockKeyForCharge + locker.LockForTX before refetching the charge.", + "example": "return s.withLockedCharge(ctx, input.ChargeID, func(ctx context.Context, charge usagebased.Charge) (*usagebased.Charge, error) { ... return stateMachine.AdvanceUntilStateStable(ctx) })" + }, + { + "name": "LineEngine bridges billing invoice lifecycle into state-machine triggers", + "description": "LineEngine implements billing.LineEngine (var _ billing.LineEngine = (*LineEngine)(nil)) returning LineEngineTypeChargeUsageBased. Its callbacks (OnStandardInvoiceCreated, OnCollectionCompleted, OnMutableStandardLinesDeleted) build a state machine per line via newStateMachineForStandardLine, fire the resolved trigger, AdvanceUntilStateStable, then populateUsageBasedStandardLineFromRun + stdLine.Validate().", + "example": "trigger := resolveInvoiceCreatedTrigger(stateMachine.GetCharge(), stdLine.Period); stateMachine.FireAndActivate(ctx, trigger, invoiceCreatedInput{LineID: stdLine.ID, InvoiceID: input.Invoice.ID, ServicePeriodTo: stdLine.Period.To})" + }, + { + "name": "Invoice mutations emitted as deferred invoiceupdater.Patch, not direct writes", + "description": "State-machine actions (DeleteCharge, ExtendCharge/ShrinkCharge handlers) never mutate invoices directly; they call s.AddInvoicePatch(invoiceupdater.New*Patch(...)). TriggerPatch drains them via stateMachine.DrainInvoicePatches() into result.InvoicePatches for the caller to apply. Voided/already-deleted runs are skipped (run.IsVoidedBillingHistory()).", + "example": "s.AddInvoicePatch(invoiceupdater.NewDeleteLinePatch(billing.LineID{Namespace: s.Charge.Namespace, ID: *run.LineID}, *run.InvoiceID))" + }, + { + "name": "Realization-run lifecycle delegated to s.runs / s.rater", + "description": "Status actions never call ent/ledger/credit/streaming directly. StartFinalRealizationRun -> s.Runs.CreateRatedRun; FinalizeRealizationRun -> s.Rater.GetDetailedRatingForUsage + s.Runs.ReconcileCredits + s.Adapter.UpsertRunDetailedLines/UpdateRealizationRun; credit correction on delete -> s.Runs.CorrectAllCredits. Totals are RoundToPrecision(CurrencyCalculator) before compare.", + "example": "result, err := s.Runs.CreateRatedRun(ctx, usagebasedrun.CreateRatedRunInput{Charge: s.Charge, Type: usagebased.RealizationRunTypeFinalRealization, CreditAllocation: usagebasedrun.CreditAllocationExact, NoFiatTransactionRequired: true, ...})" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config/New/service struct; composes rater+runs sub-services; GetLineEngine() returns &LineEngine{service: s}.", + "watch_for": "All deps are required (Validate rejects nil). Do not construct service{} directly; rater and runs must be built through New so their own Config validation runs." + }, + { + "file": "triggers.go", + "role": "AdvanceCharge, TriggerPatch, newStateMachine dispatch, getStateMachineConfigForPatch, withLockedCharge.", + "watch_for": "newStateMachine is the ONLY place settlement-mode->machine mapping belongs. withLockedCharge always re-fetches the charge with meta.ExpandRealizations after locking \u2014 don't trust a charge passed in from outside the lock." + }, + { + "file": "creditheninvoice.go", + "role": "CreditThenInvoiceStateMachine: full partial-invoice + final-realization + payment-settlement status graph; Extend/Shrink/Delete patch handlers.", + "watch_for": "Immutable boundaries (StatusActive*Issuing/Completed) MUST use UnsupportedExtendOperation/UnsupportedShrinkOperation (NewGenericPreConditionFailedError), not the real handlers. Shrinking past an invoice-backed run that is not line/invoice-backed is a precondition failure." + }, + { + "file": "creditsonly.go", + "role": "CreditsOnlyStateMachine: simpler credit-only graph; StartFinalRealizationRun / FinalizeRealizationRun; DeleteCharge honours CreditRefundPolicyCorrect.", + "watch_for": "Credit-only charges set NoFiatTransactionRequired: true and never touch the invoicing stack (Create short-circuits before gatheringLineFromUsageBasedCharge for CreditOnlySettlementMode)." + }, + { + "file": "statemachine.go", + "role": "Shared stateMachine base (embeds chargestatemachine.Machine), StateMachineConfig+Validate, newStateMachineBase, guard/advance helpers (IsAfterServicePeriod, AdvanceAfterCollectionPeriodEnd, getFinalRunStoredAtLT).", + "watch_for": "StateMachineConfig.Validate requires expanded CustomerOverride.Customer, a valid MergedProfile, FeatureMeter.Meter, and CurrencyCalculator. storedAtLT for final runs is derived from MergedProfile.WorkflowConfig.Collection.Interval." + }, + { + "file": "lineengine.go", + "role": "LineEngine: billing.LineEngine impl \u2014 Split/Build/OnStandardInvoiceCreated/OnCollectionCompleted/OnMutableStandardLinesDeleted/OnUnsupportedCreditNote + gathering preview.", + "watch_for": "Only CreditThenInvoiceSettlementMode is supported on the invoicing path; other modes error. Guards before mutation: CurrentRealizationRunID must be nil (ErrActiveRealizationRunAlreadyExists), run must belong to input.Invoice.ID, and run.DeletedAt/Payment/InvoiceUsage gate deletion." + }, + { + "file": "linemapper.go", + "role": "populateUsageBasedStandardLineFromRun + mapUsageBasedDetailedLines: projects a RealizationRun onto a billing.StandardLine (quantities, credits, detailed lines, totals).", + "watch_for": "Run detailed lines must be expanded (mo.Some) or it errors. Mapped line totals are asserted equal to run.Totals.RoundToPrecision \u2014 a mismatch is a hard error. Uses mutator.ApplyUsageDiscount for net vs raw metered quantity." + }, + { + "file": "create.go", + "role": "service.Create: bulk-creates charges (s.adapter.CreateCharges), registers them with metaAdapter.RegisterCharges (ChargeTypeUsageBased), builds gathering lines per charge.", + "watch_for": "CreditOnlySettlementMode charges return early with no GatheringLineToCreate. RatingEngine is chosen at create time via s.rater.GetPreferredRatingEngineFor(intent) and frozen into the charge intent." + } + ], + "anti_patterns": [ + "Putting settlement-mode->state-machine selection anywhere other than newStateMachine in triggers.go, or hardcoding a machine type in a handler.", + "Calling ent/ledger/credit/streaming/rating directly from a status action instead of going through s.runs, s.rater, or s.adapter (rating/run decisions live in the subpackages).", + "Mutating invoices directly from the state machine instead of emitting invoiceupdater.Patch via AddInvoicePatch / DrainInvoicePatches.", + "Letting Extend/Shrink run on immutable statuses (StatusActive*Issuing/Completed) \u2014 those must map to UnsupportedExtend/ShrinkOperation, otherwise invoice-issued callbacks lose ownership of the state.", + "Comparing run/line totals or credit amounts without RoundToPrecision(CurrencyCalculator), or projecting a run to a standard line without re-validating that line totals equal run totals." + ], + "decisions": [ + { + "decision": "Split the orchestration service (this folder) from rating/ and run/ subpackages so this layer only makes state-machine decisions while the subpackages own rating and run mechanics.", + "rationale": "Keeps the trigger/status logic auditable in one place and lets credits, payments, and rating be tested and reasoned about independently of the lifecycle graph." + }, + { + "decision": "Each settlement mode is its own state machine (CreditsOnly vs CreditThenInvoice) sharing a common stateMachine base rather than one machine with mode-conditional branches.", + "rationale": "Credit-only charges never invoice, while credit-then-invoice has partial-invoice, final-realization, and payment-settlement phases; separate configureStates() graphs keep each lifecycle explicit and prevent illegal transitions." + }, + { + "decision": "Invoice side effects are emitted as deferred invoiceupdater.Patch objects drained by the caller, not applied inline.", + "rationale": "The charge transaction and the billing invoice mutation are owned by different layers; patches let billing apply line create/delete/update against mutable vs immutable invoices appropriately (e.g. credit-note vs hard delete)." + } + ], + "code_examples": [ + { + "scenario": "Bridging a billing invoice-created event into a charge state-machine trigger and projecting the resulting run back onto the line", + "code": "func (e *LineEngine) OnStandardInvoiceCreated(ctx context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error) {\n\tif err := input.Validate(); err != nil { return nil, fmt.Errorf(\"validating input: %w\", err) }\n\treturn slicesx.MapWithErr(input.Lines, func(stdLine *billing.StandardLine) (*billing.StandardLine, error) {\n\t\tstateMachine, err := e.newStateMachineForStandardLine(ctx, stdLine)\n\t\tif err != nil { return nil, err }\n\t\tif _, err := stateMachine.AdvanceUntilStateStable(ctx); err != nil { return nil, err }\n\t\ttrigger := resolveInvoiceCreatedTrigger(stateMachine.GetCharge(), stdLine.Period)\n\t\tif stateMachine.GetCharge().State.CurrentRealizationRunID != nil {\n\t\t\treturn nil, billing.ValidationError{Err: fmt.Errorf(\"line[%s]: %w\", stdLine.ID, usagebased.ErrActiveRealizationRunAlreadyExists)}\n\t\t}\n\t\tif err := stateMachine.FireAndActivate(ctx, trigger, invoiceCreatedInput{LineID: stdLine.ID, InvoiceID: input.Invoice.ID, ServicePeriodTo: stdLine.Period.To}); err != nil { return nil, err }\n\t\tif _, err := stateMachine.AdvanceUntilStateStable(ctx); err != nil { return nil, err }\n\t\tcharge := stateMachine.GetCharge()\n\t\tcurrentRun, err := charge.GetCurrentRealizationRun()\n\t\tif err != nil { return nil, err }\n\t\tif err := populateUsageBasedStandardLineFromRun(stdLine, currentRun, charge.Realizations); err != nil { return nil, err }\n\t\treturn stdLine, stdLine.Validate()\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w130.json b/.archie/enrichments/w130.json new file mode 100644 index 0000000000..a901cd27f8 --- /dev/null +++ b/.archie/enrichments/w130.json @@ -0,0 +1,122 @@ +{ + "openmeter/subscription/validators/customer": { + "purpose": "Enforces subscription-aware invariants on customer mutations: a customer's subject keys cannot change while they have an active subscription, and a customer cannot be deleted while active subscriptions exist. Implemented as a customer.RequestValidator that is injected into the customer service.", + "patterns": [ + { + "name": "Implements customer.RequestValidator via NoopRequestValidator embedding", + "description": "Validator embeds customer.NoopRequestValidator and overrides only the hooks it cares about; the compile-time assertion `var _ customer.RequestValidator = (*Validator)(nil)` must hold.", + "example": "type Validator struct { customer.NoopRequestValidator; subscriptionService subscription.Service; customerService customer.Service }" + }, + { + "name": "Constructor validates required dependencies", + "description": "NewValidator returns an error (not panic) when subscriptionService or customerService is nil, returning *Validator and error.", + "example": "if subscriptionService == nil { return nil, fmt.Errorf(\"subscription service is required\") }" + }, + { + "name": "Active-subscription check via List + ActiveAt=clock.Now()", + "description": "Existence of an active subscription is determined by subscriptionService.List with CustomerID filter and ActiveAt set to clock.Now(); presence is `len(subscriptions.Items) > 0`.", + "example": "v.subscriptionService.List(ctx, subscription.ListSubscriptionsInput{Namespaces: []string{ns}, CustomerID: &filter.FilterULID{FilterString: filter.FilterString{Eq: &id}}, ActiveAt: lo.ToPtr(clock.Now())})" + }, + { + "name": "Delegate to input.Validate() first", + "description": "Each Validate*Customer method calls input.Validate() before performing cross-aggregate checks.", + "example": "if err := input.Validate(); err != nil { return err }" + }, + { + "name": "Typed precondition/not-found errors for customer state", + "description": "Deleted/missing customer states return models.NewGenericPreConditionFailedError / models.NewGenericNotFoundError rather than bare errors.", + "example": "return models.NewGenericPreConditionFailedError(fmt.Errorf(\"customer is deleted [...]\"))" + } + ], + "key_file_guides": [ + { + "file": "validator.go", + "role": "Single-file package `customer` holding the Validator type, NewValidator constructor, ValidateUpdateCustomer and ValidateDeleteCustomer.", + "watch_for": "ValidateUpdateCustomer only blocks subject-key changes when input.CustomerMutate.UsageAttribution.SubjectKeys is non-nil AND a subscription exists; it compares the old vs new SubjectKeys index-by-index (length then per-element). Do not relax this to a set comparison \u2014 order is significant here." + } + ], + "anti_patterns": [ + "Adding new validation methods without embedding NoopRequestValidator (breaks the customer.RequestValidator interface assertion).", + "Using time.Now() instead of clock.Now() for ActiveAt \u2014 breaks deterministic tests that freeze time.", + "Returning plain errors for deleted/not-found customers instead of the models.NewGeneric*Error constructors the HTTP layer maps to status codes.", + "Performing the customer GetCustomer lookup unconditionally rather than only when SubjectKeys are being mutated." + ], + "decisions": [ + { + "decision": "Subject-key mutation is gated on active subscriptions to keep usage attribution stable for billing.", + "rationale": "Changing which subjects feed a customer mid-subscription would silently change metered usage attribution for an active billing relationship." + } + ], + "code_examples": [] + }, + "openmeter/subscription/validators/subscription": { + "purpose": "Implements the subscription uniqueness/overlap invariant as a subscription.SubscriptionCommandHook: before and after every create/update/cancel/continue/delete it recomputes the customer's overlapping subscription set and rejects mutations that would violate uniqueness (either per-feature or per-subscription depending on the multi-subscription feature flag).", + "patterns": [ + { + "name": "SubscriptionCommandHook via NoOpSubscriptionCommandHook embedding", + "description": "SubscriptionUniqueConstraintValidator embeds subscription.NoOpSubscriptionCommandHook and overrides Before*/After* hooks; NewSubscriptionUniqueConstraintValidator returns subscription.SubscriptionCommandHook.", + "example": "type SubscriptionUniqueConstraintValidator struct { subscription.NoOpSubscriptionCommandHook; Config SubscriptionUniqueConstraintValidatorConfig }" + }, + { + "name": "Config struct with Validate() and constructor guard", + "description": "Dependencies (FeatureFlags ffx.Service, QueryService subscription.QueryService, CustomerService customer.Service) live in a Config struct with a Validate() method; the constructor returns an error if Config.Validate() fails.", + "example": "if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid subscription unique constraint validator config: %w\", err) }" + }, + { + "name": "Feature-flag-driven uniqueness mode", + "description": "validateUniqueConstraint checks subscription.MultiSubscriptionEnabledFF; if enabled it calls subscription.ValidateUniqueConstraintByFeatures, otherwise ValidateUniqueConstraintBySubscriptions. BeforeUpdate is skipped entirely when multi-subscription is disabled.", + "example": "if multiSubscriptionEnabled { return specs, subscription.ValidateUniqueConstraintByFeatures(specs) } return specs, subscription.ValidateUniqueConstraintBySubscriptions(specs)" + }, + { + "name": "Sub -> View -> Spec pipeline of small step functions", + "description": "components.go provides composable steps (collectCustomerSubscriptionsStarting, mapSubsToViews via QueryService.ExpandViews, mapViewsToSpecs via AsSpec, filterSubViews, includeSubSpec, includeSubViewUnique) that the Before/After hooks chain together.", + "example": "views, _ := v.mapSubsToViews(ctx, subs); specs, _ := v.mapViewsToSpecs(views); specs, _ = v.validateUniqueConstraint(ctx, specs)" + }, + { + "name": "Two-phase Before validation (existing-set then candidate-included)", + "description": "Before* hooks first validate the already-scheduled set alone (wrapping failures as an inconsistency error), then include the candidate spec and validate again; the candidate is excluded from the loaded set first (filterSubViews on Subscription.ID) when updating/continuing.", + "example": "specs, err = v.validateUniqueConstraint(ctx, specs); if err != nil { return fmt.Errorf(\"inconsistency error: already scheduled subscriptions are overlapping: %w\", err) }" + }, + { + "name": "Paginated full collection of candidate subscriptions", + "description": "collectCustomerSubscriptionsStarting uses pagination.CollectAll over QueryService.List with ActiveInPeriod=StartBoundedPeriod{From: starting}, page size 1000, filtered by customer + namespace.", + "example": "pagination.CollectAll(ctx, pagination.NewPaginator(func(...) { return v.Config.QueryService.List(ctx, subscription.ListSubscriptionsInput{ActiveInPeriod: &timeutil.StartBoundedPeriod{From: starting}, ...}) }), 1000)" + } + ], + "key_file_guides": [ + { + "file": "validator.go", + "role": "Holds the Config struct + Validate(), the validator type, NewSubscriptionUniqueConstraintValidator, all hook methods (BeforeCreate/Update/Continue, AfterCreate/Update/Cancel/Continue, BeforeDelete) and collectCustomerSubscriptionsStarting.", + "watch_for": "BeforeUpdate is a no-op unless MultiSubscriptionEnabledFF is on. All After* and BeforeDelete delegate to pipelineAfter, which re-validates the post-mutation set (using includeSubViewUnique to dedupe by Subscription.ID). BeforeContinue clears spec.ActiveTo (continue = indefinite) before validating." + }, + { + "file": "components.go", + "role": "Method-receiver helper steps for the validation pipeline (validateUniqueConstraint, mapSubsToViews, mapViewsToSpecs, includeSubSpec, includeSubViewUnique, filterSubViews).", + "watch_for": "mapSubsToViews delegates to Config.QueryService.ExpandViews \u2014 an extra DB round trip per hook invocation. includeSubViewUnique dedupes via lo.UniqBy on Subscription.ID; do not assume input views are already unique." + } + ], + "anti_patterns": [ + "Calling ValidateUniqueConstraintByFeatures/BySubscriptions directly instead of routing through validateUniqueConstraint (bypasses the MultiSubscriptionEnabledFF branch).", + "Forgetting to exclude the current subscription (filterSubViews on Subscription.ID) in update/continue paths, which would falsely flag a self-overlap.", + "Adding a hook that loads candidate subscriptions with a fixed page instead of pagination.CollectAll \u2014 misses customers with >1000 subscriptions.", + "Returning the inconsistency-wrapped error for the candidate-included validation; only the pre-existing-set validation should be wrapped as 'already scheduled subscriptions are overlapping'.", + "Implementing hooks without embedding NoOpSubscriptionCommandHook, breaking the subscription.SubscriptionCommandHook contract." + ], + "decisions": [ + { + "decision": "Uniqueness is enforced as a command hook rather than inline in the service, with separate Before and After passes.", + "rationale": "Before passes reject invalid mutations pre-commit; After passes re-validate the materialized state to catch inconsistencies the spec-level check could miss, keeping the invariant centralized and reusable across create/update/cancel/continue/delete." + }, + { + "decision": "Uniqueness scope (per-feature vs per-subscription) is selected by feature flag.", + "rationale": "Single-subscription deployments enforce one active subscription per customer; multi-subscription deployments instead enforce non-overlap at feature granularity." + } + ], + "code_examples": [ + { + "scenario": "A Before* hook chaining the pipeline: load overlapping subs, validate existing set, then validate with candidate included.", + "code": "func (v SubscriptionUniqueConstraintValidator) BeforeCreate(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) error {\n\tsubs, err := v.collectCustomerSubscriptionsStarting(ctx, namespace, spec.CustomerId, spec.ActiveFrom)\n\tif err != nil { return err }\n\tviews, err := v.mapSubsToViews(ctx, subs)\n\tif err != nil { return err }\n\tspecs, err := v.mapViewsToSpecs(views)\n\tif err != nil { return err }\n\tspecs, err = v.validateUniqueConstraint(ctx, specs)\n\tif err != nil { return fmt.Errorf(\"inconsistency error: already scheduled subscriptions are overlapping: %w\", err) }\n\tspecs, err = v.includeSubSpec(spec, specs)\n\tif err != nil { return err }\n\t_, err = v.validateUniqueConstraint(ctx, specs)\n\treturn err\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w131.json b/.archie/enrichments/w131.json new file mode 100644 index 0000000000..9944f39cbb --- /dev/null +++ b/.archie/enrichments/w131.json @@ -0,0 +1,86 @@ +{ + "openmeter/subscription/workflow/service": { + "purpose": "Concrete implementation of subscriptionworkflow.Service \u2014 the orchestration layer that composes subscription.Service, subscriptionaddon.Service, and customer.Service into multi-step workflows (create-from-plan, edit, change-plan, restore, add/change addon). Every workflow wraps its steps in a single transaction.Run and operates on subscription specs/views rather than raw DB rows.", + "patterns": [ + { + "name": "Single transaction per workflow", + "description": "Every exported workflow method body is wrapped in transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (...) {...}) so all sub-service calls commit or roll back atomically. Nested helpers (syncWithAddons) also open their own transaction.Run.", + "example": "transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (subscription.SubscriptionView, error) { ... })" + }, + { + "name": "Spec-then-update flow", + "description": "Workflows fetch a SubscriptionView via s.Service.GetView, derive a spec with view.AsSpec(), mutate the spec (NewSpecFromPlan, spec.ApplyMany, addon diffs), validate with spec.ValidateAlignment(), then persist via s.Service.Update / s.Service.Create, and re-fetch with GetView to return the fresh view.", + "example": "spec := curr.AsSpec(); spec.ApplyMany(...); s.Service.Update(ctx, id, spec); return s.Service.GetView(ctx, sub.NamespacedID)" + }, + { + "name": "Timing validate + resolve before mutation", + "description": "Before applying changes, validate timing against the action (inp.Timing.ValidateForAction(subscription.SubscriptionActionCreate/Update/ChangeAddons, &view)) then resolve the edit time (Timing.Resolve / ResolveForSpec). Wrap timing failures in models.NewGenericValidationError.", + "example": "if err := inp.Timing.ValidateForAction(subscription.SubscriptionActionCreate, nil); err != nil { ... }; activeFrom, err := inp.Timing.Resolve()" + }, + { + "name": "Domain typed errors via models constructors", + "description": "Return models.NewGenericValidationError, NewGenericConflictError, NewGenericForbiddenError, NewGenericPreConditionFailedError rather than bare errors for client-facing failures; wrap subscription-package errors with subscriptionworkflow.MapSubscriptionErrors.", + "example": "return def, models.NewGenericConflictError(fmt.Errorf(\"subscription already has that addon purchased\"))" + }, + { + "name": "Addon sync via diff apply/restore", + "description": "Addon mutations call syncWithAddons(view, before, after, time): build addondiff.Diffable for before/after with asDiffs (GetDiffableFromAddon), spec.ApplyMany(restores.GetRestores()) then spec.ApplyMany(applies.GetApplies()), then Update. Adding/editing addons goes through s.AddonService, never raw item patches.", + "example": "spec.ApplyMany(lo.Map(applies, func(d addondiff.Diffable, _ int) subscription.AppliesToSpec { return d.GetApplies() }), subscription.ApplyContext{CurrentTime: currentTime})" + }, + { + "name": "Customer locking for create", + "description": "CreateFromPlan calls s.lockCustomer(ctx, inp.CustomerID) (subscription.GetCustomerLock + s.Lockr.LockForTX) as the first step inside the transaction to serialize concurrent subscription creation per customer.", + "example": "if err := s.lockCustomer(ctx, inp.CustomerID); err != nil { return def, err }" + }, + { + "name": "Owner-subsystem annotation stamping", + "description": "EditRunning rewrites patch.PatchAddItem patches (both value and pointer forms) to set OwnerSubscriptionSubSystem via subscription.AnnotationParser.AddOwnerSubSystem and a unique patch ID via subscriptionworkflow.AnnotationParser.SetUniquePatchID before applying.", + "example": "subscription.AnnotationParser.AddOwnerSubSystem(ap.CreateInput.CreateSubscriptionItemInput.Annotations, subscription.OwnerSubscriptionSubSystem)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines WorkflowServiceConfig (all injected deps: Service, AddonService, CustomerService, TransactionManager, Logger, Lockr, FeatureFlags), the service struct, NewWorkflowService constructor, the compile-time interface assertion, and lockCustomer helper.", + "watch_for": "service embeds WorkflowServiceConfig directly \u2014 add new dependencies as config fields, not as struct-only fields. Keep `var _ subscriptionworkflow.Service = &service{}` satisfied." + }, + { + "file": "subscription.go", + "role": "Core lifecycle workflows: CreateFromPlan, EditRunning, ChangeToPlan, Restore. Houses spec construction (NewSpecFromPlan), addon-guard (hasAddons blocks editing subs with addons), and previous/superseding subscription annotation wiring for plan changes.", + "watch_for": "ChangeToPlan is cancel-then-create: it pins the new sub's Timing to curr.ActiveTo (verbatim) so both resolve to the exact same timestamp. Restore is gated by the MultiSubscriptionEnabledFF feature flag and deletes scheduled subs before Continue." + }, + { + "file": "addon.go", + "role": "Addon workflows: AddAddon, ChangeAddonQuantity, and the shared syncWithAddons. Helpers asDiffs (subsAddon -> addondiff.Diffable) and hasAddons. purchaseRes is the transaction return struct.", + "watch_for": "syncWithAddons restores BEFORE applying (order matters). Conflict check uses lo.SomeBy over existing addons. Namespace cross-checks (subscriptionID.Namespace vs SubscriptionAddonID.Namespace) must precede the addon fetch. The logErrWithArgs JSON-dump block is a temporary debugging aid marked TODO." + } + ], + "anti_patterns": [ + "Calling s.Service / s.AddonService adapters or persisting outside a transaction.Run wrapper \u2014 breaks atomicity of multi-step workflows.", + "Mutating a SubscriptionView's items directly instead of going through view.AsSpec(), spec mutation, and s.Service.Update.", + "Editing a subscription that has addons via EditRunning \u2014 hasAddons must reject it with NewGenericForbiddenError.", + "Applying timing without ValidateForAction + Resolve/ResolveForSpec, or returning raw errors instead of models.NewGeneric*Error for client-facing failures.", + "Bypassing s.AddonService for addon changes and hand-patching addon items, instead of building addondiff.Diffable via asDiffs/syncWithAddons." + ], + "decisions": [ + { + "decision": "Workflows are spec-centric: read view, derive spec, mutate, validate alignment, update, re-read view.", + "rationale": "The subscription spec is the single declarative source of truth; applying patches/diffs to a spec and re-validating alignment keeps phase/item invariants consistent before any DB write." + }, + { + "decision": "Plan changes are implemented as cancel-current + create-new with linked annotations rather than in-place mutation.", + "rationale": "Subscriptions are immutable over their cadence; superseding/previous-subscription annotations preserve the audit chain while the new sub starts exactly at the old sub's ActiveTo." + }, + { + "decision": "Addon effects are computed as reversible diffs (GetRestores/GetApplies) and re-synced from the full before/after addon set on every change.", + "rationale": "Recomputing the spec from the base view plus the current full addon set avoids drift and makes add/change/remove a single idempotent reconciliation path." + } + ], + "code_examples": [ + { + "scenario": "Transactional, timing-validated addon sync inside a workflow method", + "code": "res, err := transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (purchaseRes, error) {\n subView, err := s.Service.GetView(ctx, subscriptionID)\n if err != nil { return purchaseRes{}, err }\n if err := addonInp.Timing.ValidateForAction(subscription.SubscriptionActionChangeAddons, &subView); err != nil {\n return purchaseRes{}, models.NewGenericValidationError(err)\n }\n editTime, err := addonInp.Timing.ResolveForSpec(subView.AsSpec())\n if err != nil { return purchaseRes{}, err }\n subsAdd, err := s.AddonService.Create(ctx, subscriptionID.Namespace, subscriptionaddon.CreateSubscriptionAddonInput{\n AddonID: addonInp.AddonID, SubscriptionID: subscriptionID.ID,\n InitialQuantity: subscriptionaddon.CreateSubscriptionAddonQuantityInput{ActiveFrom: editTime, Quantity: addonInp.InitialQuantity},\n })\n if err != nil { return purchaseRes{}, err }\n subView, err = s.syncWithAddons(ctx, subView, subsAdds.Items, append(subsAdds.Items, *subsAdd), editTime)\n return purchaseRes{sub: subView, subAdd: *subsAdd}, err\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w132.json b/.archie/enrichments/w132.json new file mode 100644 index 0000000000..fee2f9773d --- /dev/null +++ b/.archie/enrichments/w132.json @@ -0,0 +1,216 @@ +{ + "openmeter/taxcode/adapter": { + "purpose": "Ent-backed persistence layer (taxcode.Repository) for tax codes and per-namespace organization default tax codes. All DB access is transaction-aware and namespace-scoped; this is the only place that talks to entdb.Client for taxcode tables.", + "patterns": [ + { + "name": "Repository constructor with validated Config", + "description": "New(Config) validates Client + Logger via models.Validator and returns taxcode.Repository, never the concrete *adapter.", + "example": "func New(config Config) (taxcode.Repository, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client, logger: config.Logger}, nil }" + }, + { + "name": "Tx/WithTx/Self transaction trio", + "description": "adapter implements Tx (HijackTx), WithTx (rebind via NewTxClientFromRawConfig), and Self so entutils.TransactingRepo can rebind to the ctx-carried tx.", + "example": "func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }" + }, + { + "name": "Wrap every method body in TransactingRepo", + "description": "Each repo method calls input.Validate() then entutils.TransactingRepo(ctx, a, func...) (or TransactingRepoWithNoValue for void) so it joins an existing tx.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (taxcode.TaxCode, error) { ... })" + }, + { + "name": "Namespace + soft-delete filtering", + "description": "Reads filter taxcodedb.Namespace(...) and (unless IncludeDeleted) taxcodedb.DeletedAtIsNil(); deletes are soft via SetDeletedAt(clock.Now()).", + "example": "query.Where(taxcodedb.Namespace(input.Namespace)).Where(taxcodedb.DeletedAtIsNil())" + }, + { + "name": "Map Ent entity -> domain via Map*FromEntity", + "description": "Entities are converted with MapTaxCodeFromEntity / mapOrganizationDefaultTaxCodesFromEntity; never return *db.TaxCode upward. Expand edges loaded conditionally and read via *OrErr().", + "example": "return MapTaxCodeFromEntity(entity)" + }, + { + "name": "Translate Ent errors to domain errors", + "description": "db.IsNotFound -> taxcode.New*NotFoundError; db.IsConstraintError -> models.NewGenericConflictError. Raw Ent errors are never leaked.", + "example": "if db.IsNotFound(err) { return ..., taxcode.NewTaxCodeNotFoundError(input.ID) }" + }, + { + "name": "Upsert via OnConflict on namespace partial-unique", + "description": "Org defaults upsert uses OnConflict(ConflictColumns(FieldNamespace), ConflictWhere(IsNull(FieldDeletedAt))).UpdateNewValues() then re-reads via Get to honor Expand.", + "example": "Create().SetNamespace(...).OnConflict(sql.ConflictColumns(orgdefaultsdb.FieldNamespace), sql.ConflictWhere(sql.IsNull(orgdefaultsdb.FieldDeletedAt))).UpdateNewValues().Exec(ctx)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config, New, and the Tx/WithTx/Self transaction plumbing", + "watch_for": "Return taxcode.Repository not *adapter; WithTx must rebuild db from the raw tx config, not reuse a.db." + }, + { + "file": "taxcode.go", + "role": "CRUD for TaxCode plus GetTaxCodeByAppMapping", + "watch_for": "GetTaxCodeByAppMapping uses a raw JSONB '@>' containment query and sorts system-managed first then by CreatedAt/ID \u2014 preserve that ordering; UpdateTaxCode clears AppMappings when input list is empty." + }, + { + "file": "organizationdefaulttaxcodes.go", + "role": "Get/Upsert org default tax codes with edge expansion", + "watch_for": "Expansion edges loaded only when input.Expand.* is set; mapping uses InvoicingTaxCodeOrErr()/CreditGrantTaxCodeOrErr() and errors if the requested edge wasn't loaded." + }, + { + "file": "mapping.go", + "role": "MapTaxCodeFromEntity: single source of TaxCode entity->domain conversion", + "watch_for": "AppMappings read via lo.FromPtr (nullable); Metadata wrapped with models.NewMetadata; nil entity returns an error." + } + ], + "anti_patterns": [ + "Returning *db.TaxCode or any Ent type to callers instead of mapping to taxcode domain types", + "Querying a.db directly without entutils.TransactingRepo, breaking transactional composition with the service layer", + "Omitting the Namespace or DeletedAtIsNil filter, leaking cross-namespace or soft-deleted rows", + "Leaking raw Ent errors instead of converting via db.IsNotFound / db.IsConstraintError to taxcode/models errors", + "Hard-deleting tax codes instead of soft-delete via SetDeletedAt(clock.Now())" + ], + "decisions": [ + { + "decision": "App-mapping lookup is a JSONB containment query (app_mappings @> [...]) plus in-Go stable sort", + "rationale": "A single tax code can carry multiple app mappings and multiple codes can match; system-managed seeds must win deterministically over user duplicates." + }, + { + "decision": "Org default tax codes use a partial-unique upsert keyed on namespace where deleted_at is null", + "rationale": "Exactly one active default row per namespace, kept idempotent and stable (CreatedAt/ID unchanged) across repeated upserts." + } + ], + "code_examples": [ + { + "scenario": "Adapter CRUD method: validate, transact, query namespace-scoped, translate errors, map", + "code": "func (a *adapter) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn taxcode.TaxCode{}, err\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (taxcode.TaxCode, error) {\n\t\tentity, err := a.db.TaxCode.Query().\n\t\t\tWhere(taxcodedb.Namespace(input.Namespace)).\n\t\t\tWhere(taxcodedb.ID(input.ID)).\n\t\t\tWhere(taxcodedb.DeletedAtIsNil()).\n\t\t\tOnly(ctx)\n\t\tif err != nil {\n\t\t\tif db.IsNotFound(err) {\n\t\t\t\treturn taxcode.TaxCode{}, taxcode.NewTaxCodeNotFoundError(input.ID)\n\t\t\t}\n\t\t\treturn taxcode.TaxCode{}, fmt.Errorf(\"failed to get tax code: %w\", err)\n\t\t}\n\t\treturn MapTaxCodeFromEntity(entity)\n\t})\n}" + } + ] + }, + "openmeter/taxcode/service": { + "purpose": "Business-logic layer (taxcode.Service) over taxcode.Repository: enforces cross-field invariants (namespace ownership, system-managed protection, org-default protection) and orchestrates the get-or-create-by-app-mapping flow inside transactions.", + "patterns": [ + { + "name": "Service constructor with validated Config", + "description": "New(Config) validates Adapter (taxcode.Repository) + Logger and returns *Service asserted against taxcode.Service.", + "example": "var _ taxcode.Service = (*Service)(nil)" + }, + { + "name": "Validate then transaction.Run delegating to adapter", + "description": "Every method: input.Validate() then transaction.Run(ctx, s.adapter, func...) (RunWithNoValue for void). Business checks live inside the tx callback before delegating.", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (taxcode.TaxCode, error) { return s.adapter.CreateTaxCode(ctx, input) })" + }, + { + "name": "Cross-field guards inside the transaction", + "description": "UpsertOrganizationDefaultTaxCodes re-fetches both tax code IDs via GetTaxCode to prove namespace ownership before upserting; Update/Delete fetch existing first to check IsManagedBySystem and org-default usage.", + "example": "if _, err := s.GetTaxCode(ctx, taxcode.GetTaxCodeInput{NamespacedID: models.NamespacedID{Namespace: input.Namespace, ID: input.InvoicingTaxCodeID}}); err != nil { return ..., err }" + }, + { + "name": "System-managed protection with AllowAnnotations bypass", + "description": "Update/Delete reject IsManagedBySystem() codes with NewGenericConflictError(ErrTaxCodeManagedBySystem) unless input.AllowAnnotations is set (internal seeding path).", + "example": "if existing.IsManagedBySystem() && !input.AllowAnnotations { return models.NewGenericConflictError(taxcode.ErrTaxCodeManagedBySystem) }" + }, + { + "name": "Concurrency-safe get-or-create", + "description": "GetOrCreateByAppMapping looks up, creates on not-found, and on conflict re-reads; an orphaned key (conflict then still-not-found) returns ErrTaxCodeOrphanedKey rather than poisoning the pg tx.", + "example": "if models.IsGenericConflictError(err) { tc, retryErr := s.adapter.GetTaxCodeByAppMapping(ctx, ...); ... }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct, Config, New constructor", + "watch_for": "Holds only adapter + logger; no direct DB client. Assert taxcode.Service interface compliance." + }, + { + "file": "taxcode.go", + "role": "TaxCode CRUD + GetTaxCodeByAppMapping + GetOrCreateByAppMapping", + "watch_for": "Delete blocks org-default and system-managed codes; GetOrCreate derives key as fmt.Sprintf(\"%s_%s\", AppType, TaxCode) and must distinguish orphaned-key from generic not-found." + }, + { + "file": "organizationdefaulttaxcodes.go", + "role": "Get/Upsert org defaults with namespace-ownership validation", + "watch_for": "Both InvoicingTaxCodeID and CreditGrantTaxCodeID are GetTaxCode-checked so a code from another namespace surfaces as IsTaxCodeNotFoundError, not a silent cross-tenant link." + }, + { + "file": "taxcode_test.go", + "role": "Service tests for system-managed, org-default protection, app-mapping preference", + "watch_for": "Asserts ValidationIssue.Code() equals taxcode.ErrCodeTaxCodeManagedBySystem / ErrCodeTaxCodeIsOrganizationDefault; system-managed seed must be preferred over user duplicate by GetTaxCodeByAppMapping." + }, + { + "file": "organizationdefaulttaxcodes_test.go", + "role": "Service tests for upsert idempotency, cross-namespace rejection, expand", + "watch_for": "Idempotent upsert must keep row ID and CreatedAt stable; cross-namespace tax codes must not resolve." + } + ], + "anti_patterns": [ + "Calling adapter methods outside transaction.Run, losing atomicity across the validate-then-mutate guards", + "Allowing org-default upsert without re-verifying both tax code IDs belong to the namespace (cross-tenant leak)", + "Bypassing the IsManagedBySystem() check on Update/Delete without honoring AllowAnnotations", + "Putting Ent/DB queries directly in the service instead of going through taxcode.Repository", + "Treating a post-conflict not-found as a normal not-found instead of ErrTaxCodeOrphanedKey, risking a poisoned pg transaction" + ], + "decisions": [ + { + "decision": "Namespace ownership of referenced tax codes is enforced in the service, not the DB FK", + "rationale": "Org defaults reference tax codes by ID only; the service re-fetches each by (namespace, id) so a foreign-namespace ID surfaces as not-found rather than a valid but cross-tenant link." + }, + { + "decision": "Get-or-create handles the create-conflict race explicitly", + "rationale": "Concurrent first-touch of the same app mapping must converge on one row; the retry read plus orphaned-key error keeps the surrounding Postgres transaction usable." + } + ], + "code_examples": [ + { + "scenario": "Service method: validate, transact, business guard, delegate to adapter", + "code": "func (s *Service) UpdateTaxCode(ctx context.Context, input taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn taxcode.TaxCode{}, err\n\t}\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (taxcode.TaxCode, error) {\n\t\texisting, err := s.adapter.GetTaxCode(ctx, taxcode.GetTaxCodeInput{NamespacedID: input.NamespacedID})\n\t\tif err != nil {\n\t\t\treturn taxcode.TaxCode{}, err\n\t\t}\n\t\tif existing.IsManagedBySystem() && !input.AllowAnnotations {\n\t\t\treturn taxcode.TaxCode{}, models.NewGenericConflictError(taxcode.ErrTaxCodeManagedBySystem)\n\t\t}\n\t\treturn s.adapter.UpdateTaxCode(ctx, input)\n\t})\n}" + } + ] + }, + "openmeter/taxcode/testutils": { + "purpose": "Test harness for the taxcode domain: spins up a real Postgres-backed Ent adapter + service and provides fixture helpers (CreateTaxCode, SetupNamespaceDefaults) for taxcode service/adapter tests.", + "patterns": [ + { + "name": "TestEnv built from concrete constructors", + "description": "NewTestEnv wires testutils.InitPostgresDB -> taxcodeadapter.New -> taxcodeservice.New directly, not via app/common DI, to avoid test import cycles.", + "example": "adapter, _ := taxcodeadapter.New(taxcodeadapter.Config{Client: client, Logger: logger}); svc, _ := taxcodeservice.New(taxcodeservice.Config{Adapter: adapter, Logger: logger})" + }, + { + "name": "Idempotent close via sync.Once", + "description": "Close() runs once and shuts down ent client, EntDriver, and PGDriver; tests register t.Cleanup(env.Close).", + "example": "e.close.Do(func() { e.Client.Close(); e.db.EntDriver.Close(); e.db.PGDriver.Close() })" + }, + { + "name": "Explicit schema migration step", + "description": "Tests call env.DBSchemaMigrate(t) which runs Client().Schema.Create against the test DB before exercising the service.", + "example": "err := e.db.EntDriver.Client().Schema.Create(t.Context())" + }, + { + "name": "Fixture helpers with generated defaults", + "description": "CreateTaxCode fills Namespace/Key/Name from testutils.NameGenerator when empty and lets an optional CreateTaxCodeInput override fields; SetupNamespaceDefaults seeds two tax codes and upserts org defaults.", + "example": "input.Namespace = namespace; if input.Key == \"\" { input.Key = generated.Key }" + } + ], + "key_file_guides": [ + { + "file": "env.go", + "role": "TestEnv struct, NewTestEnv, DBSchemaMigrate, Close, CreateTaxCode, SetupNamespaceDefaults", + "watch_for": "NewTestEnv already registers a t.Cleanup(Close); the second t.Cleanup(env.Close) in tests is safe only because Close is sync.Once-guarded. Discard logger via testutils.NewDiscardLogger keeps test output clean." + } + ], + "anti_patterns": [ + "Importing app/common wiring to build the service, which creates test-only import cycles \u2014 build from taxcodeadapter.New / taxcodeservice.New instead", + "Sharing a single namespace across subtests that mutate org defaults; helpers use freshly generated namespaces per scenario", + "Forgetting env.DBSchemaMigrate(t) before service calls, so the taxcode tables don't exist" + ], + "decisions": [ + { + "decision": "Harness constructs adapter+service from underlying constructors rather than DI", + "rationale": "Keeps taxcode test dependencies independent from app/common so unrelated wiring additions cannot introduce import cycles into this package." + } + ], + "code_examples": [ + { + "scenario": "Standard taxcode test setup", + "code": "env := taxcodetestutils.NewTestEnv(t)\nt.Cleanup(func() { env.Close(t) })\nenv.DBSchemaMigrate(t)\nns := testutils.NameGenerator.Generate().Key\nenv.SetupNamespaceDefaults(t.Context(), t, ns)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w133.json b/.archie/enrichments/w133.json new file mode 100644 index 0000000000..393afe2e4f --- /dev/null +++ b/.archie/enrichments/w133.json @@ -0,0 +1,272 @@ +{ + "openmeter/watermill/eventbus": { + "purpose": "Outbound event-publishing facade over Watermill's CQRS EventBus. Maps domain events to Kafka topics by event-name prefix and provides the Publisher/ContextPublisher interfaces the whole codebase uses to emit CloudEvents.", + "patterns": [ + { + "name": "Topic routing by event-name prefix", + "description": "GeneratePublishTopic switches on strings.HasPrefix(EventName, +\".\") to pick IngestEventsTopic, BalanceWorkerEventsTopic, else SystemEventsTopic. New topic-routed subsystems add a prefix case here.", + "example": "case strings.HasPrefix(params.EventName, ingestVersionSubsystemPrefix): return opts.TopicMapping.IngestEventsTopic, nil" + }, + { + "name": "Options/TopicMapping Validate() before construction", + "description": "New(Options) returns (Publisher, error) and calls opts.Validate() first; TopicMapping.Validate() requires all three topics non-empty. Never construct the bus bypassing Validate.", + "example": "func New(opts Options) (Publisher, error) { if err := opts.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "nil event is a no-op publish", + "description": "Publisher.Publish returns nil immediately when event==nil, so handlers can signal 'nothing to publish' by returning a nil event without the caller branching.", + "example": "if event == nil { return nil }" + }, + { + "name": "WithContext().PublishIfNoError chaining", + "description": "ContextPublisher inlines publish-on-success: PublishIfNoError(event, err) returns err if non-nil else publishes. Used to fold a handler's (event,err) result into one return.", + "example": "return p.WithContext(ctx).PublishIfNoError(worker.handleEvent(ctx, event))" + } + ], + "key_file_guides": [ + { + "file": "eventbus.go", + "role": "Entire package: TopicMapping, Options, Publisher/ContextPublisher interfaces, publisher impl, New, NewMock.", + "watch_for": "NewMock uses slog.Default() \u2014 acceptable in test-only constructor; production New requires an explicit Logger in Options (Validate rejects nil)." + } + ], + "anti_patterns": [ + "Adding a new Kafka topic without extending both TopicMapping (+Validate) and the GeneratePublishTopic switch.", + "Calling cqrs.NewEventBusWithConfig directly instead of going through New, bypassing Options validation and marshaler wiring.", + "Using NewMock or slog.Default() in production wiring \u2014 inject a real *slog.Logger via Options." + ], + "decisions": [ + { + "decision": "Route by event-name prefix rather than per-event topic config.", + "rationale": "Subsystems (ingest, balanceworker) own a topic; everything else falls through to SystemEventsTopic, keeping topic config to three fields." + } + ], + "code_examples": [] + }, + "openmeter/watermill/grouphandler": { + "purpose": "Fan-out event dispatcher: a single Watermill NoPublishHandlerFunc that demultiplexes one message to all GroupEventHandlers registered for that CloudEvent type, recording OTel message-count and processing-time metrics per status.", + "patterns": [ + { + "name": "Type-keyed handler map", + "description": "Handlers are stored in typeHandlerMap[eventName] keyed by marshaler.Name(handler.NewEvent()). Handle() looks up by NameFromMessage(msg); unknown/empty groups are counted 'ignored' and return nil (message ack'd).", + "example": "groupHandler, ok := h.typeHandlerMap[eventName]; if !ok || len(groupHandler) == 0 { ...Ignored; return nil }" + }, + { + "name": "Single unmarshal, shared event instance", + "description": "The event is unmarshaled once from groupHandler[0].NewEvent() then passed to every handler; all handlers for a type must accept the same concrete event struct.", + "example": "event := groupHandler[0].NewEvent(); h.marshaler.Unmarshal(msg, event)" + }, + { + "name": "errors.Join over all handlers", + "description": "All handlers run via lo.Map and their errors are joined; any non-nil result fails the whole message (status 'failed', returned for retry/DLQ). Handlers are not short-circuited.", + "example": "err := errors.Join(lo.Map(groupHandler, func(h GroupEventHandler, _ int) error { return h.Handle(msg.Context(), event) })...)" + }, + { + "name": "Metered constructor returns (*T, error)", + "description": "NewNoPublishingHandler calls getMeters(metricMeter) and propagates meter-creation errors; never construct NoPublishingHandler literal without meters.", + "example": "meters, err := getMeters(metricMeter); if err != nil { return nil, err }" + }, + { + "name": "Concurrency-safe registration", + "description": "AddHandler takes mux.Lock and Handle takes mux.RLock, so handlers can be added while the router is running.", + "example": "h.mux.Lock(); defer h.mux.Unlock(); h.typeHandlerMap[...] = append(...)" + } + ], + "key_file_guides": [ + { + "file": "grouphandler.go", + "role": "NoPublishingHandler (Handle/AddHandler), NewGroupEventHandler generic wrapper, NewNoPublishingHandler, meters + getMeters.", + "watch_for": "Handle returns nil for unregistered event types (ack'd, not DLQ'd). A returned error sends the message to retry/DLQ \u2014 keep handlers idempotent since all run on every retry." + } + ], + "anti_patterns": [ + "Returning an error for an event you simply don't handle \u2014 let the type-map miss ack it as 'ignored' instead.", + "Registering handlers for the same event type that expect different concrete event structs (only NewEvent() of the first is unmarshaled).", + "Mutating typeHandlerMap without the mux, or constructing NoPublishingHandler without getMeters." + ], + "decisions": [ + { + "decision": "One Watermill handler fans out to many group handlers in-process.", + "rationale": "Avoids one Kafka consumer per handler; multiple subscribers to the same event type share a single subscription and message decode." + } + ], + "code_examples": [ + { + "scenario": "Register multiple handlers under one Watermill consumer", + "code": "h, err := grouphandler.NewNoPublishingHandler(marshaler, metricMeter,\n grouphandler.NewGroupEventHandler(func(ctx context.Context, e *snapshot.SnapshotEvent) error { return doA(ctx, e) }),\n grouphandler.NewGroupEventHandler(func(ctx context.Context, e *snapshot.SnapshotEvent) error { return doB(ctx, e) }),\n)\nif err != nil { return err }\nrouter.AddNoPublisherHandler(\"name\", topic, subscriber, h.Handle)" + } + ] + }, + "openmeter/watermill/marshaler": { + "purpose": "CloudEvents (1.0) <-> Watermill message codec. Defines the Event interface (EventName/EventMetadata/Validate) every published event implements and serializes events as JSON CloudEvents with ce_* metadata headers.", + "patterns": [ + { + "name": "Event interface contract", + "description": "Anything published must implement Event: EventName() string, EventMetadata() metadata.EventMetadata, Validate() error. Marshal/Unmarshal type-assert to Event and fail with 'invalid event type' otherwise.", + "example": "type Event interface { EventName() string; EventMetadata() metadata.EventMetadata; Validate() error }" + }, + { + "name": "Validate runs on both marshal and unmarshal", + "description": "NewCloudEvent calls ev.Validate() before SetData; Unmarshal calls ev.Validate() after json.Unmarshal. Invalid events never cross the bus in either direction.", + "example": "if err := ev.Validate(); err != nil { return cloudevents.Event{}, err }" + }, + { + "name": "ce_* metadata headers carry routing/identity", + "description": "Marshal sets CloudEventsHeaderType/Time/Source and (if non-empty) Subject on msg.Metadata. NameFromMessage reads ce_type \u2014 this is what eventbus/grouphandler/router key on, not the payload.", + "example": "msg.Metadata.Set(CloudEventsHeaderType, ce.Type())" + }, + { + "name": "Defaulting of ID and Time", + "description": "NewCloudEvent fills empty metadata.ID with ulid.Make() and zero metadata.Time with time.Now(); Source is mandatory (errors if empty).", + "example": "if metadata.ID == \"\" { cloudEvent.SetID(ulid.Make().String()) }" + }, + { + "name": "WithSource decorator for late source binding", + "description": "WithSource(source, ev) wraps an Event, overriding EventMetadata().Source; its MarshalJSON marshals only the inner Event to avoid an embedded \"Event\" key in JSON.", + "example": "func WithSource(source string, ev Event) Event { return &eventWithSource{source: source, Event: ev} }" + } + ], + "key_file_guides": [ + { + "file": "marshaler.go", + "role": "Marshaler alias (cqrs.CommandEventMarshaler), Event interface, New, Marshal/Unmarshal, NewCloudEvent, Name, NameFromMessage; ce_* header + UnknownEventName constants.", + "watch_for": "Name() returns UnknownEventName ('io.openmeter.unknown') for non-Event values rather than erroring \u2014 a wrong type silently routes nowhere. TransformFunc, if set, runs last in Marshal and can rewrite the message." + }, + { + "file": "source.go", + "role": "eventWithSource decorator and WithSource helper for injecting CloudEvents source.", + "watch_for": "Custom MarshalJSON delegates to e.Event; if you embed an Event pointer elsewhere expecting normal struct marshaling you'll get the wrapper's behavior." + }, + { + "file": "source_test.go", + "role": "Round-trip test verifying source header set and unmarshal equality.", + "watch_for": "Reference example of a minimal Event implementation for tests." + } + ], + "anti_patterns": [ + "Publishing a struct that doesn't implement Event \u2014 Marshal returns 'invalid event type' and Name silently degrades to UnknownEventName.", + "Relying on the JSON payload for event type/routing instead of the ce_type metadata header.", + "Returning a zero/empty Source from EventMetadata \u2014 NewCloudEvent rejects it.", + "Putting routing/validation logic in Marshal callers instead of the event's Validate()." + ], + "decisions": [ + { + "decision": "CloudEvents as the wire format with metadata mirrored into Watermill headers.", + "rationale": "Lets routing/metrics layers (eventbus, grouphandler, router) inspect ce_type without decoding the full JSON payload." + } + ], + "code_examples": [] + }, + "openmeter/watermill/nopublisher": { + "purpose": "Tiny adapter pair between Watermill's HandlerFunc (returns messages) and NoPublishHandlerFunc (returns none), used when a consumer must not emit messages.", + "patterns": [ + { + "name": "Bidirectional handler adapters", + "description": "NoPublisherHandlerToHandlerFunc wraps a no-publish handler as a HandlerFunc (returns nil messages); HandlerFuncToNoPublisherHandler does the reverse and treats any produced message as the error ErrMessagesProduced.", + "example": "if len(outMessages) > 0 { return ErrMessagesProduced }" + } + ], + "key_file_guides": [ + { + "file": "nopublisher.go", + "role": "ErrMessagesProduced sentinel plus the two conversion functions.", + "watch_for": "Wrapping a HandlerFunc that legitimately returns messages will fail at runtime with ErrMessagesProduced rather than dropping them \u2014 only use on handlers expected to be side-effect-only." + } + ], + "anti_patterns": [ + "Using HandlerFuncToNoPublisherHandler on a handler that intentionally produces output messages." + ], + "decisions": [], + "code_examples": [] + }, + "openmeter/watermill/router": { + "purpose": "Builds the standard Watermill message.Router (NewDefaultRouter) with the project's middleware stack \u2014 poison-queue/DLQ, OTel metrics+tracing, correlation, recover, retry, timeout \u2014 driving every Kafka consumer (balance/billing/notification workers).", + "patterns": [ + { + "name": "Ordered middleware stack in NewDefaultRouter", + "description": "Order is load-bearing: PoisonQueueWithFilter (outermost) -> DLQ telemetry -> CorrelationID -> Recoverer -> Retry -> (optional RestoreContext+Timeout) -> HandlerMetrics. Don't reorder; comments explain why (e.g. Timeout after Retry, RestoreContext before Timeout).", + "example": "router.AddMiddleware(poisionQueue); router.AddMiddleware(dlqMetrics); router.AddMiddleware(middleware.CorrelationID, middleware.Recoverer)" + }, + { + "name": "Options.Validate() gates all required deps", + "description": "NewDefaultRouter requires Subscriber, Publisher, Logger, MetricMeter, Tracer and a valid config.ConsumerConfiguration; nil any of them and construction errors out.", + "example": "if err := opts.Validate(); err != nil { return nil, err }" + }, + { + "name": "MaxRetries off-by-one correction", + "description": "Watermill's Retry runs MaxRetries+1 times, so the code decrements opts.Config.Retry.MaxRetries by one before configuring the middleware.", + "example": "if maxRetries > 0 { maxRetries = maxRetries - 1 }" + }, + { + "name": "Context restore around Timeout", + "description": "RestoreContext middleware saves/restores msg context (watermill issue 467) so the Timeout middleware's cancelled context doesn't leak into retries.", + "example": "router.AddMiddleware(RestoreContext, middleware.Timeout(opts.Config.ProcessingTimeout))" + }, + { + "name": "WarningLogSeverityError downgrades DLQ log level", + "description": "DLQ telemetry middleware logs ErrorContext by default but switches to WarnContext when the error unwraps to *WarningLogSeverityError; wrap expected-failure errors with NewWarningLogSeverityError to avoid error-level noise.", + "example": "if _, ok := lo.ErrorsAs[*WarningLogSeverityError](err); ok { logger = opts.Logger.WarnContext }" + }, + { + "name": "Metrics keyed by ce_type", + "description": "Both HandlerMetrics and DLQ telemetry tag metrics/spans with message.event_type from the ce_type header via metricAttributeTypeFromMessage, defaulting to 'UNKNOWN'.", + "example": "ce_type := msg.Metadata.Get(marshaler.CloudEventsHeaderType); if ce_type == \"\" { ce_type = unkonwnEventType }" + } + ], + "key_file_guides": [ + { + "file": "router.go", + "role": "Options/Validate and NewDefaultRouter \u2014 the canonical middleware assembly.", + "watch_for": "Middleware order is intentional and commented; PoisonQueueWithFilter skips DLQ when router.IsClosed() so in-flight messages are NAcked/retried instead of dead-lettered on shutdown." + }, + { + "file": "metrics.go", + "role": "HandlerMetrics (per-try) and NewDLQTelemetryMiddleware (full processing incl. retries) plus metricAttributeTypeFromMessage.", + "watch_for": "Handler failures are logged as Warn ('produced later than DB commit'); DLQ middleware sets msg context to a span context and restores it via defer. NewDLQTelemetryOptions.Validate requires MetricMeter/Logger/Router/Tracer." + }, + { + "file": "context.go", + "role": "RestoreContext middleware (watermill issue 467 workaround).", + "watch_for": "Must wrap the Timeout middleware, not replace it." + }, + { + "file": "errors.go", + "role": "WarningLogSeverityError + NewWarningLogSeverityError for log-severity control; implements Unwrap.", + "watch_for": "Only affects DLQ log level, not retry/DLQ behavior itself." + }, + { + "file": "logger.go", + "role": "warningOnlyLogger adapter that downgrades watermill Error() calls to slog Warn (used for the Retry middleware logger).", + "watch_for": "Watermill only has Error/Info levels; this is the workaround to keep retry noise at warn." + }, + { + "file": "router_test.go", + "role": "Table-driven gochannel-backed integration test covering happy/failed/retry/timeout/DLQ paths.", + "watch_for": "Uses an in-memory gochannel pubsub and a DoneCondition signal; good template for testing consumer wiring." + } + ], + "anti_patterns": [ + "Reordering or removing middleware in NewDefaultRouter (DLQ/timeout/retry/context-restore interplay breaks).", + "Constructing message.Router directly for a consumer instead of NewDefaultRouter, losing DLQ/metrics/retry.", + "Logging expected/transient failures at error level instead of wrapping with NewWarningLogSeverityError.", + "Adding the Timeout middleware without RestoreContext (cancelled context leaks into retries \u2014 issue 467).", + "Forgetting the MaxRetries-1 correction, causing one extra attempt than configured." + ], + "decisions": [ + { + "decision": "Push to DLQ as the outermost step but skip it when router.IsClosed().", + "rationale": "On graceful shutdown Close() cancels contexts immediately; NAcking instead of dead-lettering lets Kafka redeliver rather than losing/duplicating to DLQ." + }, + { + "decision": "Single NewDefaultRouter with a fixed stack, escapable by building your own router.", + "rationale": "Standardizes observability and failure handling across all workers; the doc comment explicitly allows custom routers for special cases." + } + ], + "code_examples": [ + { + "scenario": "Build the standard consumer router", + "code": "router, err := router.NewDefaultRouter(router.Options{\n Subscriber: sub,\n Publisher: pub,\n Logger: logger,\n MetricMeter: metricMeter,\n Tracer: tracer,\n Config: consumerCfg, // config.ConsumerConfiguration\n})\nif err != nil { return err }\nrouter.AddNoPublisherHandler(\"name\", topic, sub, handler.Handle)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w134.json b/.archie/enrichments/w134.json new file mode 100644 index 0000000000..6333e38a41 --- /dev/null +++ b/.archie/enrichments/w134.json @@ -0,0 +1,41 @@ +{ + "openmeter/watermill/driver/noop": { + "purpose": "A no-op Watermill message.Publisher implementation that silently discards all published messages. Used by openmeter/watermill/eventbus as a null/disabled publisher when event publishing should be a no-op.", + "patterns": [ + { + "name": "Compile-time interface assertion", + "description": "Assert the type satisfies message.Publisher via a blank identifier var, so a signature drift breaks the build.", + "example": "var _ message.Publisher = (*Publisher)(nil)" + }, + { + "name": "Value-receiver no-op methods returning nil", + "description": "Publish and Close are value-receiver methods on an empty struct that do nothing and return nil error.", + "example": "func (Publisher) Publish(topic string, messages ...*message.Message) error { return nil }" + } + ], + "key_file_guides": [ + { + "file": "publisher.go", + "role": "Defines the empty Publisher struct and its no-op Publish/Close methods implementing watermill message.Publisher.", + "watch_for": "Keep Publisher zero-state (struct{}); do not add fields or side effects. Both methods must return nil and never block \u2014 this is the disabled-publishing path." + } + ], + "anti_patterns": [ + "Adding real publishing logic, buffering, or error returns \u2014 this driver exists specifically to discard messages.", + "Removing the `var _ message.Publisher = (*Publisher)(nil)` assertion, which guards against Watermill interface changes.", + "Giving Publisher state/fields, breaking its trivial value-receiver semantics." + ], + "decisions": [ + { + "decision": "Empty struct with value receivers instead of a pointer-based stateful type.", + "rationale": "A no-op publisher needs no state; value receivers make zero-value usage and copying safe and free." + } + ], + "code_examples": [ + { + "scenario": "Implementing the no-op Watermill publisher", + "code": "package noop\n\nimport \"github.com/ThreeDotsLabs/watermill/message\"\n\ntype Publisher struct{}\n\nvar _ message.Publisher = (*Publisher)(nil)\n\nfunc (Publisher) Publish(topic string, messages ...*message.Message) error {\n\treturn nil\n}\n\nfunc (Publisher) Close() error {\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w135.json b/.archie/enrichments/w135.json new file mode 100644 index 0000000000..ae7d87c21c --- /dev/null +++ b/.archie/enrichments/w135.json @@ -0,0 +1,81 @@ +{ + "openmeter/watermill/driver/kafka/metrics": { + "purpose": "Adapts the rcrowley/go-metrics registry used by Sarama into OpenTelemetry instruments, so Kafka client metrics are emitted as raw OTel events instead of relying on go-metrics' periodic scraping. Primary constraint: it must transparently wrap go-metrics types without breaking Sarama's expectations of the metrics.Registry interface.", + "patterns": [ + { + "name": "Embed-and-decorate go-metrics types", + "description": "Each wrapper struct embeds the original go-metrics interface (Meter, Counter, Gauge, GaugeFloat64, Histogram) and overrides only the mutating method to also write to an OTel instrument, then delegates to the embedded value.", + "example": "type wrappedCounter struct { metrics.Counter; otelMeter otelmetric.Int64UpDownCounter; attributes attribute.Set }; func (m *wrappedCounter) Inc(n int64) { m.otelMeter.Add(...); m.Counter.Inc(n) }" + }, + { + "name": "Registry embeds metrics.Registry and overrides Register/GetOrRegister", + "description": "registry embeds metrics.Registry and overrides only GetOrRegister and Register to wrap defs before delegating to the embedded Registry; all other Registry methods pass through.", + "example": "type registry struct { metrics.Registry; mu sync.Mutex; meticMeter otelmetric.Meter; ... }" + }, + { + "name": "go-metrics type \u2192 OTel instrument mapping", + "description": "getWrappedMeter type-switches on the go-metrics interface and picks the matching OTel instrument: Meter\u2192Int64Counter, Counter\u2192Int64UpDownCounter, GaugeFloat64\u2192Float64Gauge, Gauge\u2192Int64Gauge, Histogram\u2192Int64Histogram.", + "example": "case metrics.Counter: otelMeter, err := r.meticMeter.Int64UpDownCounter(transfomedMetric.Name)" + }, + { + "name": "Reflect-resolve function defs", + "description": "go-metrics may register a factory func instead of an instance; getWrappedMeter detects reflect.Func and calls it with no args to obtain the real metric before type-switching.", + "example": "if v := reflect.ValueOf(def); v.Kind() == reflect.Func { def = v.Call(nil)[0].Interface() }" + }, + { + "name": "Name transform with drop support", + "description": "NameTransformFn maps a go-metrics name to a TransformedMetric (Name, Attributes, Drop). Drop==true returns the original unwrapped metric so uninteresting metrics incur no OTel cost.", + "example": "if transfomedMetric.Drop { return def, nil }" + }, + { + "name": "Errors logged, never panicked", + "description": "Instrument-creation and registration failures are routed through an ErrorHandler (default no-op; LoggingErrorHandler wraps slog) and the original metric is returned, so metrics wiring never breaks Sarama.", + "example": "if err != nil { r.errorHandler(err); return def }" + }, + { + "name": "Mutex-guarded register paths", + "description": "GetOrRegister and Register both take r.mu before checking/wrapping/registering to avoid duplicate concurrent registration of the same named metric.", + "example": "r.mu.Lock(); defer r.mu.Unlock()" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Entire package: NewRegistry constructor, the registry wrapper over metrics.Registry, getWrappedMeter type dispatch, and the five wrapped* instrument decorators.", + "watch_for": "NewRegistry requires MetricMeter (returns error if nil) but defaults NameTransformFn and ErrorHandler. The Histogram case uses break (logs and falls through to return def) instead of returning early like the others \u2014 keep that asymmetry in mind when editing." + }, + { + "file": "README.md", + "role": "Documents why this adapter exists (no OTel connector for go-metrics; scraping vs raw events) and current limitations.", + "watch_for": "Documents the two intentional shortcuts: OTel calls use context.Background(), and registration errors are only logged \u2014 do not treat these as bugs to silently change." + } + ], + "anti_patterns": [ + "Replacing the embedded go-metrics interface methods entirely instead of delegating to them \u2014 Sarama still reads values back through the original go-metrics API.", + "Using slog.Default() inside the package; logging must come via LoggingErrorHandler(dest *slog.Logger) injected by the caller.", + "Panicking or returning errors up Sarama's path on instrument-creation failure; route through errorHandler and return the original def instead.", + "Adding a new go-metrics type without extending the getWrappedMeter type switch \u2014 it falls through to the default errorHandler 'unsupported metric type' branch and stays unwrapped.", + "Wrapping metrics in GetOrRegister/Register without holding r.mu, risking duplicate registration races." + ], + "decisions": [ + { + "decision": "Wrap go-metrics types and emit raw OTel events rather than build a periodic scraper.", + "rationale": "go-metrics only supports periodic scraping; wrapping the mutating methods lets the adapter push real-time events into OpenTelemetry as they happen." + }, + { + "decision": "Use context.Background() for all OTel record/add calls.", + "rationale": "go-metrics' event interface carries no context, so there is no caller context to propagate at the metric-emission site (documented limitation in README)." + }, + { + "decision": "Reflect-call func-typed defs before type-switching.", + "rationale": "go-metrics sometimes registers a factory function rather than a concrete metric; resolving it first lets the single type switch handle all registration shapes." + } + ], + "code_examples": [ + { + "scenario": "Building an OTel-backed go-metrics registry to hand to Sarama", + "code": "import (\n\t\"go.opentelemetry.io/otel/attribute\"\n\totelmetric \"go.opentelemetry.io/otel/metric\"\n\t\"github.com/openmeterio/openmeter/openmeter/watermill/driver/kafka/metrics\"\n)\n\nreg, err := metrics.NewRegistry(metrics.NewRegistryOptions{\n\tMetricMeter: meter,\n\tNameTransformFn: func(name string) metrics.TransformedMetric {\n\t\treturn metrics.TransformedMetric{Name: \"kafka_\" + name, Attributes: attribute.NewSet()}\n\t},\n\tErrorHandler: metrics.LoggingErrorHandler(logger),\n})\nif err != nil {\n\treturn err\n}\n// pass reg to sarama config.MetricRegistry" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w136.json b/.archie/enrichments/w136.json new file mode 100644 index 0000000000..1a761c5c79 --- /dev/null +++ b/.archie/enrichments/w136.json @@ -0,0 +1,239 @@ +{ + "pkg/clock": { + "purpose": "Mockable global clock so time-dependent code (billing periods, entitlement resets, subscription cadences) can be deterministically controlled in tests. A massive dependency magnet (~100 in-edges) \u2014 every package that reads 'current time' should call clock.Now() rather than time.Now().", + "patterns": [ + { + "name": "Read time via clock.Now()", + "description": "Production code that needs the current time must call clock.Now(), never time.Now() directly, so tests can freeze or drift the clock.", + "example": "now := clock.Now()" + }, + { + "name": "Atomic global state, no struct", + "description": "The clock is package-level mutable state (drift, frozen, frozenTime) guarded by sync/atomic. There is no Clock instance to inject; all access is via package functions.", + "example": "atomic.StoreInt32(&frozen, 1); frozenTime.Store(t)" + }, + { + "name": "Strip monotonic reading", + "description": "Now() calls .Round(0) on returned times to remove the monotonic clock reading, keeping wall-clock-only timestamps for stable comparisons/serialization.", + "example": "return t.Round(0)" + }, + { + "name": "Freeze must be paired with UnFreeze", + "description": "Tests calling FreezeTime(t) must defer UnFreeze() in the same scope so frozen time does not leak into later subtests (project-wide rule in AGENTS.md).", + "example": "clock.FreezeTime(t); defer clock.UnFreeze()" + } + ], + "key_file_guides": [ + { + "file": "clock.go", + "role": "Entire implementation: Now, SetTime (drift-based offset), ResetTime, FreezeTime (hard pin), UnFreeze.", + "watch_for": "SetTime sets a relative drift (clock keeps advancing), FreezeTime pins an absolute instant (clock stops). They are different mechanisms \u2014 pair SetTime with ResetTime, FreezeTime with UnFreeze." + }, + { + "file": "clock_test.go", + "role": "Demonstrates SetTime/ResetTime usage with testutils.GetRFC3339Time.", + "watch_for": "Because drift mode keeps ticking, assertions use a tolerance (diff < time.Second) rather than exact equality." + } + ], + "anti_patterns": [ + "Calling time.Now() in production code instead of clock.Now() \u2014 breaks deterministic tests.", + "FreezeTime without a deferred UnFreeze, leaking frozen time into other tests.", + "Adding a struct-based Clock or injecting a clock instance \u2014 this package is intentionally global package-level state.", + "Mixing SetTime/FreezeTime modes without resetting the previous one." + ], + "decisions": [ + { + "decision": "Global package-level clock guarded by sync/atomic rather than dependency injection.", + "rationale": "Avoids threading a Clock interface through every constructor in a ~100-importer codebase; atomics keep it goroutine-safe for parallel tests." + }, + { + "decision": "Two override modes: relative drift (SetTime) and absolute freeze (FreezeTime).", + "rationale": "Drift lets time still advance for realistic flows; freeze pins an exact instant for precise period/boundary assertions." + } + ], + "code_examples": [ + { + "scenario": "Deterministically pin current time in a test", + "code": "import \"github.com/openmeterio/openmeter/pkg/clock\"\n\nclock.FreezeTime(testutils.GetRFC3339Time(t, \"2024-06-30T15:39:00Z\"))\ndefer clock.UnFreeze()\nnow := clock.Now()" + } + ] + }, + "pkg/cmpx": { + "purpose": "Tiny generics helper exposing a Comparable[T] interface and a Compare wrapper that delegates to a type's own Compare(T) int method. Used to order domain values deterministically (e.g. ledger collector).", + "patterns": [ + { + "name": "Self-comparing types", + "description": "Types orderable via cmpx must implement Comparable[T] with a Compare(T) int method returning the standard -1/0/1 contract; Compare[T] just forwards to it.", + "example": "func Compare[T Comparable[T]](left, right T) int { return left.Compare(right) }" + } + ], + "key_file_guides": [ + { + "file": "compare.go", + "role": "Defines Comparable[T any] interface and the generic Compare function.", + "watch_for": "Compare assumes left.Compare(right) follows the standard tri-state ordering; a non-conforming Compare implementation silently corrupts sorts." + } + ], + "anti_patterns": [ + "Adding concrete comparison logic here \u2014 this package only abstracts over a type's own Compare method.", + "Importing heavy dependencies; keep this dependency-free." + ], + "decisions": [ + { + "decision": "Delegate ordering to the value's own Compare method rather than reimplementing comparators.", + "rationale": "Lets domain types own their ordering semantics while generic algorithms remain type-agnostic." + } + ], + "code_examples": [] + }, + "pkg/contextx": { + "purpose": "Context-carried structured attributes (via peterbourgon/ctxdata) plus an slog.Handler that automatically emits those attributes on every log record. Bridges request-scoped context data into structured logs.", + "patterns": [ + { + "name": "Attach attrs via WithAttr/WithAttrs", + "description": "Add request-scoped key/values with WithAttr(ctx, key, value) or WithAttrs(ctx, map); both lazily initialize the ctxdata store if absent.", + "example": "ctx = contextx.WithAttr(ctx, \"namespace\", ns)" + }, + { + "name": "Wrap slog handler to drain ctxdata", + "description": "Wrap the base slog.Handler with contextx.NewLogHandler so every Handle() pulls ctxdata.From(ctx).GetAllMap() and adds them as record attrs.", + "example": "logger := slog.New(contextx.NewLogHandler(baseHandler))" + } + ], + "key_file_guides": [ + { + "file": "attr.go", + "role": "WithAttr / WithAttrs store key-values into the ctxdata container on the context.", + "watch_for": "Set errors are intentionally ignored (_ = d.Set). Returns a new ctx when the store was just created \u2014 always use the returned context." + }, + { + "file": "log.go", + "role": "Handler implementing slog.Handler that injects all ctxdata entries into each log record.", + "watch_for": "Handle calls ctxdata.From(ctx) without a nil check before GetAllMap(); records logged with a context lacking a ctxdata store rely on ctxdata returning a usable value." + } + ], + "anti_patterns": [ + "Logging with a raw slog handler instead of the contextx-wrapped one, losing context attributes.", + "Discarding the context returned by WithAttr/WithAttrs (the store may have just been created on it)." + ], + "decisions": [ + { + "decision": "Carry log attributes on the context and drain them in a custom slog.Handler.", + "rationale": "Lets deep call sites enrich logs (namespace, request ids) without threading a logger and without per-call WithAttrs at every log statement." + } + ], + "code_examples": [ + { + "scenario": "Enrich context then have logs auto-include the attribute", + "code": "import \"github.com/openmeterio/openmeter/pkg/contextx\"\n\nlogger := slog.New(contextx.NewLogHandler(base))\nctx = contextx.WithAttr(ctx, \"namespace\", ns)\nlogger.InfoContext(ctx, \"created\") // record carries namespace attr" + } + ] + }, + "pkg/convert": { + "purpose": "Generic pointer/value and time conversion helpers used heavily by API<->domain<->DB mapping code. Notably provides empty-aware pointer wrappers for maps and slices that lo.EmptyableToPtr handles incorrectly.", + "patterns": [ + { + "name": "Empty-aware container pointers", + "description": "Use MapToPointer / SliceToPointer to convert maps/slices to pointers, returning nil when empty \u2014 these exist specifically because lo.EmptyableToPtr mishandles maps and slices.", + "example": "field := convert.SliceToPointer(items) // nil if len==0" + }, + { + "name": "Nil-safe dereference helpers", + "description": "SafeDeRef(ptr, fn) and DerefHeaderPtr guard nil before applying transforms; SafeToUTC/TimePtrIn wrap SafeDeRef for *time.Time conversions.", + "example": "utc := convert.SafeToUTC(t)" + }, + { + "name": "Underlying-string conversions", + "description": "ToStringLike converts between distinct ~string types via pointers; StringerPtrToStringPtr turns a *Stringer into *string, both nil-preserving.", + "example": "s := convert.StringerPtrToStringPtr(code)" + } + ], + "key_file_guides": [ + { + "file": "ptr.go", + "role": "Pointer helpers: ToPointer, MapToPointer, SliceToPointer, ToStringLike, SafeDeRef, SafeToUTC, DerefHeaderPtr, StringerPtrToStringPtr.", + "watch_for": "ToPointer duplicates lo.ToPtr; prefer lo.ToPtr in new code (AGENTS.md) and reserve this package for the empty-aware/nil-safe helpers lo lacks." + }, + { + "file": "time.go", + "role": "TimePtrIn converts a *time.Time into a given *time.Location, nil-preserving.", + "watch_for": "Returns nil for nil input \u2014 callers must handle the nil result." + } + ], + "anti_patterns": [ + "Using lo.EmptyableToPtr on maps/slices \u2014 use MapToPointer/SliceToPointer which correctly return nil on empty.", + "Adding a plain ToPointer call when lo.ToPtr already covers it (avoid local pointer-wrapper proliferation)." + ], + "decisions": [ + { + "decision": "Maintain custom MapToPointer/SliceToPointer despite samber/lo availability.", + "rationale": "lo.EmptyableToPtr does not treat empty maps/slices as nil, which is required for omitempty-style API mapping." + } + ], + "code_examples": [ + { + "scenario": "Map a possibly-empty slice to an omittable API field", + "code": "import \"github.com/openmeterio/openmeter/pkg/convert\"\n\nout.Items = convert.SliceToPointer(domain.Items) // nil when empty" + } + ] + }, + "pkg/currencyx": { + "purpose": "Currency primitives layered on invopop/gobl: a Code (ISO 4217) type used directly in the Ent schema, a Calculator that resolves currency precision once, and largest-remainder proportional allocation of currency amounts across weighted or capped buckets.", + "patterns": [ + { + "name": "Resolve a Calculator once, reuse it", + "description": "Get a Calculator via Code(code).Calculator() so the gobl currency Def is resolved a single time; downstream rounding/allocation assumes Def is non-nil and valid.", + "example": "calc, err := currencyx.Code(\"USD\").Calculator()" + }, + { + "name": "Round to currency subunits", + "description": "Use Calculator.RoundToPrecision / IsRoundedToPrecision (driven by Def.Subunits) for all currency rounding \u2014 USD=2 decimals, JPY=0, etc.", + "example": "amt = calc.RoundToPrecision(amt)" + }, + { + "name": "Largest-remainder allocation", + "description": "AllocateByWeight (dimensionless weights) and AllocateByAmount (amount buckets that double as caps) split an amount with floor + remainder distribution at currency precision; both omit zero allocations and accept an optional CompareKey tie-breaker for determinism.", + "example": "allocs, err := currencyx.AllocateByWeight(calc, input)" + }, + { + "name": "Aggregate validation errors with errors.Join", + "description": "validateWeightedAllocationInput / validateAmountAllocationInput collect all issues into []error and return errors.Join, matching the project Validate() convention.", + "example": "return errors.Join(errs...)" + } + ], + "key_file_guides": [ + { + "file": "currency.go", + "role": "Code type (alias of gobl currency.Code) + Calculator with Validate/RoundToPrecision/IsRoundedToPrecision.", + "watch_for": "Calculator.RoundToPrecision/IsRoundedToPrecision dereference Def without nil-checking; only construct Calculator via Code.Calculator() (or validate first). The zero-value Calculator{} is invalid." + }, + { + "file": "allocation.go", + "role": "AllocateByWeight / AllocateByAmount and their input/result structs plus validators and currencyUnit helper.", + "watch_for": "Inputs must already be rounded to currency precision and amount non-negative; AllocateByAmount errors if it cannot distribute the remainder without exceeding item caps, and rejects amount > total item amount." + } + ], + "anti_patterns": [ + "Constructing Calculator{} directly and calling RoundToPrecision \u2014 Def is nil and will panic.", + "Rounding currency amounts with ad-hoc decimal.Round instead of Calculator.RoundToPrecision (ignores per-currency subunits like JPY).", + "Passing unrounded amounts to AllocateBy* \u2014 validation rejects them.", + "Returning on the first validation error instead of joining all issues." + ], + "decisions": [ + { + "decision": "Calculator caches the gobl currency.Def so precision is resolved once and assumed valid.", + "rationale": "Avoids repeated currency.Get lookups and error handling across the many billing/ledger call sites that round amounts." + }, + { + "decision": "Allocation uses the largest-remainder quota method with an optional deterministic CompareKey.", + "rationale": "Guarantees allocated parts sum exactly to the input amount at currency precision while keeping results stable/reproducible across runs." + } + ], + "code_examples": [ + { + "scenario": "Proportionally split a currency amount across weighted keys", + "code": "import \"github.com/openmeterio/openmeter/pkg/currencyx\"\n\ncalc, _ := currencyx.Code(\"USD\").Calculator()\nallocs, err := currencyx.AllocateByWeight(calc, currencyx.WeightedAllocationInput[string]{\n Amount: amount, // must be rounded to precision\n Items: []currencyx.WeightedAllocationItem[string]{{Key: \"A\", Weight: w1}, {Key: \"B\", Weight: w2}},\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w137.json b/.archie/enrichments/w137.json new file mode 100644 index 0000000000..351dae3341 --- /dev/null +++ b/.archie/enrichments/w137.json @@ -0,0 +1,298 @@ +{ + "pkg/datetime": { + "purpose": "Custom datetime/duration value types layered over the standard library, github.com/rickb777/period, and govalues/decimal. Provides DateTime (RFC9557-aware time.Time wrapper) and ISODuration with calendar-correct, no-overflow date arithmetic used across billing, subscription, and entitlement period math.", + "patterns": [ + { + "name": "DateTime wraps time.Time, never replaces it", + "description": "DateTime embeds time.Time so all stdlib methods pass through; only Format/Parse/Add behavior is overridden. Construct with NewDateTime(t) and unwrap with AsTime().", + "example": "type DateTime struct { time.Time }; func (t DateTime) AsTime() time.Time { return t.Time }" + }, + { + "name": "No-overflow calendar arithmetic via shiftClockTo", + "description": "AddYearsNoOverflow/AddMonthsNoOverflow clamp to the last valid day of the target month (Jan 31 + 1M = Feb 28), and all Add* helpers route through shiftClockTo to mimic time.Add wall-clock behavior across DST.", + "example": "dt.AddYearsNoOverflow(y).AddMonthsNoOverflow(m).AddWeeks(w).AddDays(d)..." + }, + { + "name": "ISODuration wraps period.Period", + "description": "ISODuration embeds period.Period; build with NewISODuration(y,m,w,d,h,min,s) and round-trip strings through ISODurationString. Arithmetic (Add/Subtract/Mul) returns wrapped errors via NewDurationArithmeticError.", + "example": "type ISODuration struct { period.Period }" + }, + { + "name": "String types for ISO8601 wire form", + "description": "ISODurationString is the serialized form; use .Parse()/.ParsePtrOrNil() to get an ISODuration and .ISOString()/.ISOStringPtrOrNil() to go back. Nil-safe pointer variants exist for optional fields.", + "example": "d, err := ISODurationString(\"P1Y2M\").Parse()" + }, + { + "name": "Multi-format Parse with RFC9557 bracket timezone", + "description": "Parse() accepts RFC3339, ISO8601 (incl. Zulu/fractional), and RFC9557 'ts[Area/City]' forms; it strictly rejects malformed brackets (nested, trailing text, empty tz). DateTime.UnmarshalJSON delegates to Parse.", + "example": "Parse(\"2021-07-01T12:34:56-04:00[America/New_York]\")" + }, + { + "name": "Errors are constructors in errors.go", + "description": "All error values come from New*Error helpers (NewDateTimeParseError, NewDurationParseError, NewDurationArithmeticError, NewInvalidTimezoneError) wrapping the underlying cause with %w; do not inline fmt.Errorf for these cases.", + "example": "return NewDurationParseError(string(i), err)" + } + ], + "key_file_guides": [ + { + "file": "datetime.go", + "role": "DateTime type + Add(ISODuration) and the no-overflow Add* arithmetic helpers", + "watch_for": "MarshalJSON emits RFC3339 only (drops bracket tz and sub-second precision); shiftClockTo is the load-bearing helper \u2014 bypassing it breaks DST correctness" + }, + { + "file": "duration.go", + "role": "ISODuration type, arithmetic, DivisibleBy, AddTo, convertPeriodToSeconds", + "watch_for": "DivisibleBy brute-forces 28/29/30/31-day months x 23/24/25-hour days, so 'P1Y divisible by PT8H' is intentionally false; AddTo always returns precise=true (kept for back-compat)" + }, + { + "file": "parse.go", + "role": "Multi-layout Parse entry point", + "watch_for": "Strict bracket validation \u2014 any text after ']' or empty/nested brackets is an error; timezone is loaded via time.LoadLocation so unknown zones fail" + }, + { + "file": "constants.go", + "role": "RFC9557/ISO8601 layout strings", + "watch_for": "layoutTZName is the literal 'Europe/Budapest' placeholder swapped out during Format; do not treat it as a default timezone" + }, + { + "file": "format.go", + "role": "Format() with RFC9557 timezone-name substitution", + "watch_for": "Falls back to ISO8601 layouts (fallbackRFC9557FormatLayout) when location string is empty" + }, + { + "file": "durationstring.go", + "role": "ISODurationString parse/serialize helpers incl. nil-safe pointer variants", + "watch_for": "Parse() wraps failures in NewDurationParseError, not the raw period error" + }, + { + "file": "interval.go", + "role": "Predefined DurationSecond..DurationYear constants", + "watch_for": "Use these instead of re-constructing NewISODuration for unit durations" + }, + { + "file": "testutils.go", + "role": "Test helpers MustLoadLocation/MustParseDateTime/MustParseDuration", + "watch_for": "Non-_test file but test-only; takes *testing.T and calls t.Fatalf" + } + ], + "anti_patterns": [ + "Doing calendar math with time.AddDate directly instead of DateTime.Add* \u2014 reintroduces month-end overflow bugs the No-overflow helpers exist to prevent", + "Constructing time.Time/period.Period values directly and bypassing shiftClockTo, losing DST wall-clock semantics", + "Relying on DateTime.MarshalJSON to preserve bracket timezone or nanosecond precision (it serializes RFC3339)", + "Inlining fmt.Errorf for parse/arithmetic failures instead of the New*Error constructors", + "Treating layoutTZName ('Europe/Budapest') as a real default timezone" + ], + "decisions": [ + { + "decision": "Wrap rickb777/period and govalues/decimal rather than use time.Duration", + "rationale": "time.Duration cannot represent calendar units (months/years) needed for billing periods, and decimal seconds avoid float drift" + }, + { + "decision": "DivisibleBy tests every realistic month/day length combination", + "rationale": "Captures DST and variable-month-length edge cases so subscription cadence validation is conservative and correct" + } + ], + "code_examples": [ + { + "scenario": "Parse an ISO8601 duration and add it to a timestamp with no-overflow calendar math", + "code": "import \"github.com/openmeterio/openmeter/pkg/datetime\"\n\nd, err := datetime.ISODurationString(\"P1M\").Parse()\nif err != nil { return err }\nnext := datetime.NewDateTime(start).Add(d).AsTime() // 2024-01-31 + P1M = 2024-02-29" + } + ] + }, + "pkg/defaultx": { + "purpose": "Tiny generic helpers for defaulting optional values: WithDefault dereferences a pointer or returns a fallback, IfZero substitutes a fallback for the zero value. Used mainly in httpdriver/service layers to normalize optional API inputs.", + "patterns": [ + { + "name": "Pointer-or-default for optional fields", + "description": "WithDefault[T any](value *T, def T) T returns *value when non-nil, else def. Use for optional API request pointers.", + "example": "limit := defaultx.WithDefault(req.Limit, 100)" + }, + { + "name": "Zero-or-default for comparable values", + "description": "IfZero[T comparable](val, def T) T returns def when val equals the zero value. Use for non-pointer optionals like empty strings.", + "example": "currency := defaultx.IfZero(in.Currency, \"USD\")" + } + ], + "key_file_guides": [ + { + "file": "default.go", + "role": "Both generic helpers (WithDefault, IfZero)", + "watch_for": "IfZero requires T comparable; cannot be used on slices/maps/funcs" + } + ], + "anti_patterns": [ + "Adding non-trivial logic here \u2014 this package is intentionally two stateless generic functions" + ], + "decisions": [], + "code_examples": [] + }, + "pkg/entitydiff": { + "purpose": "Generic three-way diff (Create/Update/Delete) of entity slices keyed by ID, with soft-delete awareness. Backs billing adapter reconciliation of persisted-vs-expected state for entities with and without child entities.", + "patterns": [ + { + "name": "Entity interface contract", + "description": "Diffed types must implement Entity (GetID() string, IsDeleted() bool). Empty GetID() means a not-yet-persisted item; IsDeleted() drives delete vs skip decisions.", + "example": "type Entity interface { GetID() string; IsDeleted() bool }" + }, + { + "name": "DiffByID for entities with children", + "description": "DiffByID(DiffByIDInput[T]) compares only by ID (never field equality) and dispatches HandleCreate/HandleUpdate/HandleDelete callbacks, joining their errors with errors.Join. Use when entities own children that need recursive handling.", + "example": "entitydiff.DiffByID(entitydiff.DiffByIDInput[Line]{DBState: db, ExpectedState: exp, HandleUpdate: ...})" + }, + { + "name": "DiffByIDEqualer for leaf entities", + "description": "DiffByIDEqualer[T EqualerEntity[T]](expected, db) returns a Diff[T] and only marks an update when PersistedState.Equal(ExpectedState) is false. Use for entities with no children.", + "example": "diff := entitydiff.DiffByIDEqualer(expected, dbState)" + }, + { + "name": "Soft-delete-aware correlation", + "description": "diffByID treats IsDeleted()+no-DB-row as skip, expected-deleted+live-DB-row as Delete (carrying the expected/target state so co-edited fields persist), and DB rows absent from expected as Delete.", + "example": "if expected.IsDeleted() && !dbState.IsDeleted() { diff.Delete = append(diff.Delete, expected) }" + }, + { + "name": "NestedEntity wrappers carry a parent", + "description": "NestedEntity/EqualerNestedEntity wrap a child with its Parent while delegating GetID/IsDeleted/Equal to the child; build with NewEqualersWithParent to diff children while retaining parent context.", + "example": "wrapped := entitydiff.NewEqualersWithParent(lines, invoice)" + } + ], + "key_file_guides": [ + { + "file": "diff.go", + "role": "Diff/DiffUpdate types, diffByID core, DiffByID + DiffByIDEqualer public entry points, Union", + "watch_for": "The internal diffByID returns UpdateCandidates (unfiltered); only DiffByIDEqualer applies Equal() to drop no-op updates \u2014 DiffByID emits every candidate as an update" + }, + { + "file": "parent.go", + "role": "NestedEntity/EqualerNestedEntity parent-carrying wrappers + NewEqualersWithParent", + "watch_for": "Equal on the wrapper compares only the embedded Entity, not the Parent" + } + ], + "anti_patterns": [ + "Using DiffByIDEqualer for entities with child entities \u2014 field equality skips updates whose only change is in children", + "Assuming an empty GetID() item will be correlated to a DB row \u2014 it is always treated as Create (or skipped if deleted)", + "Expecting DiffByID to compare fields; it correlates by ID only and relies on caller callbacks" + ], + "decisions": [ + { + "decision": "Split DiffByID (callback, children) from DiffByIDEqualer (Equal-based, leaf)", + "rationale": "Parent entities need recursive child handling that field equality cannot express, while leaf entities benefit from automatic no-op-update suppression" + }, + { + "decision": "Delete entries carry the expected/target state, not the DB state, for expected-deleted rows", + "rationale": "Co-edited fields (e.g. managedBy flipping to manual alongside deleted_at) must be persisted in the same change" + } + ], + "code_examples": [ + { + "scenario": "Reconcile leaf entities, applying only real updates", + "code": "import \"github.com/openmeterio/openmeter/pkg/entitydiff\"\n\ndiff := entitydiff.DiffByIDEqualer(expectedLines, dbLines)\nfor _, c := range diff.Create { /* insert */ }\nfor _, u := range diff.Update { /* update u.ExpectedState */ }\nfor _, d := range diff.Delete { /* delete */ }" + } + ] + }, + "pkg/equal": { + "purpose": "Defines the Equaler[T] interface and nil-safe pointer comparison helpers, extracted from pkg/models specifically to avoid an import cycle. Backs equality-based diffing and value comparison across domain types.", + "patterns": [ + { + "name": "Equaler interface duplicated to break a cycle", + "description": "Equaler[T any] { Equal(other T) bool } lives here (not only in pkg/models) so low-level packages like pkg/entitydiff can depend on it without importing models. Implement Equal on domain types to satisfy it.", + "example": "type Equaler[T any] interface { Equal(other T) bool }" + }, + { + "name": "Nil-safe pointer equality helpers", + "description": "PtrEqual compares two *T where T is Equaler (both nil equal, one nil unequal); HasherPtrEqual does the same via hasher.Hasher.Hash().", + "example": "equal.PtrEqual(a, b)" + } + ], + "key_file_guides": [ + { + "file": "equal.go", + "role": "Equaler interface + PtrEqual/HasherPtrEqual", + "watch_for": "Keep this package dependency-light (only pkg/hasher) \u2014 adding heavier imports risks recreating the models import cycle it exists to avoid" + } + ], + "anti_patterns": [ + "Importing pkg/models from here \u2014 defeats the cycle-breaking purpose of duplicating Equaler", + "Adding domain-specific equality logic; this package holds only the generic interface and pointer helpers" + ], + "decisions": [ + { + "decision": "Duplicate Equaler from pkg/models instead of sharing", + "rationale": "Documented in code: avoids a circular dependency between models and packages that need the interface" + } + ], + "code_examples": [] + }, + "pkg/errorsx": { + "purpose": "Cross-cutting error utilities for the HTTP/server layer: prefix annotation that preserves errors.Join trees, a warn-level error wrapper, generated-API-error detection, and slog-based error Handlers implementing httptransport.ErrorHandler.", + "patterns": [ + { + "name": "WithPrefix preserves joined-error structure", + "description": "WithPrefix recursively prefixes each branch of an errors.Join tree (only at the top level via the Unwrap() []error interface) instead of flattening, so multi-error messages keep per-error prefixes.", + "example": "errorsx.WithPrefix(errors.Join(e1, e2), \"prefix\")" + }, + { + "name": "warnError downgrades log severity", + "description": "Wrap an error with NewWarnError to make SlogHandler log it at Warn instead of Error; detected via lo.ErrorsAs[*warnError]. context.Canceled and generated API errors are also logged as warnings.", + "example": "return errorsx.NewWarnError(err)" + }, + { + "name": "Handler interface mirrors httptransport.ErrorHandler", + "description": "Handler { Handle(err); HandleContext(ctx, err) }; SlogHandler (requires injected *slog.Logger) and NopHandler are the impls. Compile-time assertions enforce the interface match.", + "example": "var _ httptransport.ErrorHandler = (errorsx.Handler)(nil)" + }, + { + "name": "Generated API errors identified by package path", + "description": "isAPIError reflects on the error type and walks the unwrap chain (single and []error) comparing PkgPath against api and api/v3 packages, because codegen emits no common base error type.", + "example": "reflect.TypeOf(api.InvalidParamFormatError{}).PkgPath()" + } + ], + "key_file_guides": [ + { + "file": "errorsx.go", + "role": "WithPrefix + warnError/NewWarnError", + "watch_for": "WithPrefix only recurses when the error implements Unwrap() []error at the top level (deliberate) \u2014 wrapping a join with fmt.Errorf hides the inner errors from per-branch prefixing" + }, + { + "file": "handler.go", + "role": "Handler interface, SlogHandler, NopHandler", + "watch_for": "SlogHandler requires an injected logger (no slog.Default fallback per project convention); severity downgrade order is context.Canceled, then isAPIError, then warnError, else Error" + }, + { + "file": "helpers.go", + "role": "isAPIError/isErrorFromPackages reflection-based detection", + "watch_for": "Detection is by reflect PkgPath, so it breaks if generated error types move packages; both api and api/v3 must be listed" + }, + { + "file": "errorsx_test.go", + "role": "WithPrefix tree-preservation tests", + "watch_for": "Encodes the non-top-level flattening behavior as expected output" + }, + { + "file": "helpers_test.go", + "role": "isAPIError detection tests for legacy/v3/wrapped/joined errors", + "watch_for": "Asserts wrapped and joined API errors are still detected" + } + ], + "anti_patterns": [ + "Using slog.Default() to build SlogHandler \u2014 the logger must be injected explicitly per project convention", + "Flattening errors.Join before WithPrefix (e.g. via fmt.Errorf %w) \u2014 loses per-error prefixing", + "Hardcoding new API error type detection instead of extending apiErrorPackages with the generating package's path" + ], + "decisions": [ + { + "decision": "Detect generated API errors by reflecting on package path", + "rationale": "oapi-codegen output provides no shared base error or marker interface, so package matching is the most maintainable signal" + }, + { + "decision": "Provide a warn-level error wrapper and treat API/cancellation errors as warnings", + "rationale": "Keeps expected client-side and lifecycle errors out of error-level logs and alerting" + } + ], + "code_examples": [ + { + "scenario": "Build a server error handler that logs API/cancellation/warn errors at Warn level", + "code": "import (\n \"github.com/openmeterio/openmeter/pkg/errorsx\"\n)\n\nh := errorsx.NewSlogHandler(logger) // injected *slog.Logger\nh.HandleContext(ctx, errorsx.NewWarnError(err)) // logged at Warn" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w138.json b/.archie/enrichments/w138.json new file mode 100644 index 0000000000..1898ead486 --- /dev/null +++ b/.archie/enrichments/w138.json @@ -0,0 +1,231 @@ +{ + "pkg/expand": { + "purpose": "Single-file generic helper for validated, immutable expand-option lists (the `?expand=` query semantics). `Expand[T]` is a slice of self-describing enum-like values that knows its own legal value set via the `Expandable[T]` interface.", + "patterns": [ + { + "name": "Self-describing expandable type", + "description": "T must satisfy `Expandable[T]` = `comparable` + `Values() []T`; validation and enumeration are driven off `empty.Values()`, never a hard-coded list", + "example": "type Expand[T Expandable[T]] []T; values := (*new(T)).Values()" + }, + { + "name": "Immutable mutators return clones", + "description": "`With`, `Without`, `SetOrUnsetIf` never mutate the receiver \u2014 they `Clone()` first (copy into a new slice) and return the new value", + "example": "func (e Expand[T]) With(v T) Expand[T] { cloned := e.Clone(); ... }" + }, + { + "name": "Validate joins per-item errors", + "description": "`Validate()` accumulates `var errs []error` and returns `errors.Join(errs...)`; one error per invalid value rather than failing fast", + "example": "errs = append(errs, fmt.Errorf(\"invalid expand value: %v\", item)); return errors.Join(errs...)" + } + ], + "key_file_guides": [ + { + "file": "expand.go", + "role": "Whole package: `Expand[T]` slice type plus `Validate`, `Has`, `Clone`, `With`, `Without`, `SetOrUnsetIf`", + "watch_for": "`With` dedupes (no-op if value present); `Without` uses `lo.Filter` and does NOT clone first \u2014 but it returns a new slice so the receiver is still untouched" + } + ], + "anti_patterns": [ + "Mutating an Expand slice in place instead of using the clone-returning mutators", + "Hard-coding the valid value list anywhere instead of relying on T.Values()", + "Returning on the first invalid item in Validate instead of joining all errors" + ], + "decisions": [ + { + "decision": "Validation source-of-truth is the type's own Values() method", + "rationale": "Keeps the legal expand set co-located with the enum type, so new expand values can never drift out of sync with the validator" + } + ], + "code_examples": [] + }, + "pkg/featuregate": { + "purpose": "Minimal feature-gate abstraction: a one-method `Gate` interface plus a `Noop` implementation that always allows. It is the seam where real flag backends (LaunchDarkly, etc.) plug into namespace/flag boolean evaluation.", + "patterns": [ + { + "name": "Single-method Gate interface", + "description": "`Gate.EvaluateBool(namespace, flag string, defaultValue bool) (bool, error)` is the only contract; implementations live elsewhere and are injected", + "example": "type Gate interface { EvaluateBool(namespace, flag string, defaultValue bool) (bool, error) }" + }, + { + "name": "Noop returns true (open by default)", + "description": "`NewNoop()` yields `Noop{}` whose `EvaluateBool` always returns `(true, nil)` \u2014 when gating is disabled, features are ON", + "example": "func (n Noop) EvaluateBool(string, string, bool) (bool, error) { return true, nil }" + } + ], + "key_file_guides": [ + { + "file": "featuregate.go", + "role": "Defines `Gate`, `NewNoop()`, and the `Noop` struct", + "watch_for": "Noop ignores the supplied defaultValue and always returns true; do not assume the default is honored when wiring Noop in cmd/server / app/common" + } + ], + "anti_patterns": [ + "Adding business logic to Noop \u2014 it must stay a trivial always-true stub", + "Widening the Gate interface here instead of composing additional interfaces at the call site" + ], + "decisions": [ + { + "decision": "Keep the interface to a single EvaluateBool method", + "rationale": "Lets every consumer (server, billing-worker, jobs, productcatalog http) depend on a tiny seam and swap real vs noop backends without touching call sites" + } + ], + "code_examples": [] + }, + "pkg/ffx": { + "purpose": "Lightweight feature-flag service (`ffx` = feature-flag-x) keyed by `Feature` string, with three `Service` implementations: context-carried access, static config, and a test composite. Distinct from pkg/featuregate \u2014 this resolves per-feature booleans from an `AccessConfig` map carried on the request context.", + "patterns": [ + { + "name": "Service interface + multiple impls", + "description": "All implementations satisfy `Service.IsFeatureEnabled(ctx, Feature) (bool, error)`; pick via constructor: `NewContextService`, `NewStaticService`, `NewTestContextService`", + "example": "var _ Service = &staticService{}" + }, + { + "name": "Context-carried access config", + "description": "`SetAccessOnContext`/`GetAccessFromContext` stash an `AccessConfig` under unexported `accessContextKey`; missing or nil access yields `ErrContextMissing`", + "example": "ctx = ffx.SetAccessOnContext(ctx, ffx.AccessConfig{feat: true})" + }, + { + "name": "Unknown feature is an error, not false", + "description": "Both contextService and staticService return an explicit `feature %s not found` error when the feature key is absent \u2014 callers must distinguish disabled from unknown", + "example": "if !ok { return false, fmt.Errorf(\"feature %s not found\", feature) }" + }, + { + "name": "Test composite falls back static-after-context", + "description": "`testContextService` tries the context service first and only consults the static default when the context lookup errored", + "example": "v, err := s.contextService.IsFeatureEnabled(...); if err == nil { return v, nil }; return s.staticService...." + } + ], + "key_file_guides": [ + { + "file": "featureflag.go", + "role": "Core types: `Feature string`, `Service` interface, `AccessConfig map[Feature]bool` with `Merge`", + "watch_for": "`AccessConfig.Merge` mutates the receiver in place (writes other's keys into c) and also returns it \u2014 aliasing surprises" + }, + { + "file": "context.go", + "role": "`contextService` (reads AccessConfig from ctx) + `testContextService` composite + ctx get/set helpers", + "watch_for": "GetAccessFromContext treats both a missing key and a nil AccessConfig as ErrContextMissing" + }, + { + "file": "static.go", + "role": "`staticService` backed by a fixed AccessConfig, via `NewStaticService`", + "watch_for": "No fallback \u2014 an absent feature key always errors" + } + ], + "anti_patterns": [ + "Treating a not-found feature as disabled instead of handling the returned error", + "Relying on AccessConfig.Merge being non-mutating \u2014 it overwrites the receiver", + "Using NewTestContextService outside tests as the production resolver" + ], + "decisions": [ + { + "decision": "Separate static vs context-carried services behind one Service interface", + "rationale": "Lets request-scoped access (multi-tenant) override a static default while keeping consumers (subscription, billing) depending only on Service" + } + ], + "code_examples": [] + }, + "pkg/filter": { + "purpose": "The codebase's reusable AIP-style query-filter primitives: typed per-field filter structs (`FilterString`, `FilterInteger`, `FilterFloat`, `FilterTime`, `FilterTimeUnix`, `FilterBoolean`, `FilterULID`) using MongoDB-like `$eq/$ne/$in/$like/$and/$or` JSON tags, each able to validate itself and emit both Ent selector predicates and go-sqlbuilder WHERE expressions. Heavily depended on (~53 in-edges) by v3 handlers and adapters.", + "patterns": [ + { + "name": "Filter interface contract", + "description": "Every filter type satisfies `Filter`: `Validate()`, `ValidateWithComplexity(maxDepth)`, `Select(field) func(*sql.Selector)`, `SelectWhereExpr(field, *sqlbuilder.SelectBuilder) string`, `IsEmpty()`. Compile-time `var _ Filter = (*FilterX)(nil)` assertions enforce this", + "example": "var _ Filter = (*FilterString)(nil)" + }, + { + "name": "Dual SQL emission, single operator per filter", + "description": "`Select` (Ent dialect/sql) and `SelectWhereExpr` (huandu/go-sqlbuilder) must produce equivalent SQL; exactly one operator field may be set or validation returns ErrFilterMultipleOperators (`validateSingleOperator`)", + "example": "case f.Eq != nil: return sql.FieldEQ(field, *f.Eq)" + }, + { + "name": "Public Validate wraps once via models", + "description": "Public `Validate`/`ValidateWithComplexity` call an internal `validateWithComplexity` that returns raw sentinel errors, then wrap exactly once with `models.NewNillableGenericValidationError`", + "example": "return models.NewNillableGenericValidationError(f.validateWithComplexity(math.MaxInt))" + }, + { + "name": "Recursive And/Or with depth budget", + "description": "`$and`/`$or` are `*[]FilterX`; recursion decrements maxDepth and returns ErrFilterComplexityExceeded at <=0; And/Or branches build via sql.AndPredicates/OrPredicates and skip nil predicates", + "example": "for _, child := range lo.FromPtr(f.And) { if err := child.validateWithComplexity(maxDepth-1); err != nil { return err } }" + }, + { + "name": "LIKE metacharacter escaping for Contains", + "description": "`Contains`/`Ncontains` are literal substring matches built through `ContainsPattern` -> `EscapeLikePattern` which escapes \\ % _; never hand-build a LIKE pattern from user input", + "example": "return q.ILike(field, ContainsPattern(*f.Contains))" + }, + { + "name": "In-memory Match mirrors SQL semantics", + "description": "`FilterString.Match`/`matches` evaluate the filter against a Go value (Contains is case-insensitive, Like/Ilike return ErrOperationNotSupported); nil or empty filter matches everything", + "example": "func (f *FilterString) Match(value string) (bool, error) { if f == nil || f.IsEmpty() { return true, nil } ... }" + } + ], + "key_file_guides": [ + { + "file": "filter.go", + "role": "All filter types, the `Filter` interface, sentinel errors, shared helpers `validateSingleOperator`, `isEmptyFilter`, `collectStringValues`, and the LIKE helpers `EscapeLikePattern`/`ContainsPattern`/`ReverseContainsPattern`", + "watch_for": "Select returns nil for empty filters and SelectWhereExpr returns \"\" \u2014 callers must guard before applying; ILIKE in Ent is hand-built via sql.P raw SQL, not a helper, so a new operator needs both Select and SelectWhereExpr branches kept in sync" + }, + { + "file": "filter_test.go", + "role": "Table-driven parity tests asserting identical results from go-sqlbuilder (`wantExprSQL`/Args) and Ent (`wantEntSQL`/Args) plus escaping/validation cases", + "watch_for": "Any new operator/filter type must add both branches to the table and assert via assertValidationError (which checks models.IsGenericValidationError + errors.Is)" + } + ], + "anti_patterns": [ + "Adding an operator to Select but not SelectWhereExpr (or vice versa) \u2014 the two SQL emitters silently diverge", + "Building LIKE patterns from raw user input without EscapeLikePattern/ContainsPattern", + "Double-wrapping validation errors instead of returning raw sentinels from validateWithComplexity and wrapping once at the public entry", + "Allowing multiple operator fields to be set on one filter (must trip validateSingleOperator)", + "Skipping the depth budget on recursive $and/$or, enabling unbounded-complexity filters" + ], + "decisions": [ + { + "decision": "Each filter emits both Ent predicates and go-sqlbuilder expressions", + "rationale": "Ent-backed adapters and raw-SQL (e.g. ClickHouse/meter query) paths both need the same filter, so one struct serves both query builders" + }, + { + "decision": "Operator set uses Mongo-style $-prefixed JSON tags", + "rationale": "Matches the AIP-style query-parameter API contract surfaced by api/v3/filters and keeps request decoding mechanical" + } + ], + "code_examples": [ + { + "scenario": "Apply a string filter to an Ent query, guarding empties", + "code": "f := filter.FilterString{Contains: lo.ToPtr(\"needle\")}\nif err := f.Validate(); err != nil { return err }\nif pred := f.Select(\"name\"); pred != nil {\n\tquery = query.Where(pred)\n}" + } + ] + }, + "pkg/gosundheit": { + "purpose": "Thin adapter that bridges AppsFlyer go-sundheit health checks to the project's `*slog.Logger`, providing a `health.CheckListener` that logs registration/start/completion. Wired by app/common.", + "patterns": [ + { + "name": "slog-backed CheckListener", + "description": "`NewLogger(logger *slog.Logger)` returns a `health.CheckListener`; failures (result.Error != nil) log at Warn, successes at Debug, using structured slog.String/slog.Any fields", + "example": "c.logger.Warn(\"health check failed\", slog.String(\"check\", name), slog.Any(\"error\", result.Error))" + }, + { + "name": "Injected logger, no default fallback", + "description": "The logger is a required constructor argument \u2014 consistent with the repo rule against slog.Default() fallbacks", + "example": "func NewLogger(logger *slog.Logger) health.CheckListener { return checkListener{logger: logger} }" + } + ], + "key_file_guides": [ + { + "file": "logger.go", + "role": "Whole package: `checkListener` implementing OnCheckRegistered/OnCheckStarted/OnCheckCompleted, constructed via `NewLogger`", + "watch_for": "OnCheckRegistered and OnCheckCompleted both branch on result.Error; keep failure logs at Warn and routine lifecycle at Debug to avoid log noise" + } + ], + "anti_patterns": [ + "Logging healthy check lifecycle at Info/Warn level (floods logs)", + "Falling back to slog.Default() instead of requiring the injected logger" + ], + "decisions": [ + { + "decision": "Adapter pattern over go-sundheit's CheckListener", + "rationale": "Keeps the third-party health library's logging routed through the app's structured slog logger without coupling other packages to go-sundheit" + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w139.json b/.archie/enrichments/w139.json new file mode 100644 index 0000000000..f59ea219fd --- /dev/null +++ b/.archie/enrichments/w139.json @@ -0,0 +1,233 @@ +{ + "pkg/hasher": { + "purpose": "Tiny utility defining a stable hashing contract: a Hash type alias and Hasher interface, with an xxhash-backed implementation. Used to derive content hashes for domain objects (e.g. productcatalog).", + "patterns": [ + { + "name": "Hash is a uint64 type alias", + "description": "Hash is declared as `type Hash = uint64` (alias, not a named type), so it is interchangeable with raw uint64 at call sites.", + "example": "type Hash = uint64" + }, + { + "name": "Hasher interface returns Hash", + "description": "Types that participate in hashing implement `Hasher` with a single `Hash() Hash` method; consumers depend on the interface, not the concrete algorithm.", + "example": "type Hasher interface { Hash() Hash }" + }, + { + "name": "Single hashing primitive via xxhash", + "description": "All raw-byte hashing goes through `NewHash([]byte) Hash` which delegates to `xxhash.Sum64`. Do not introduce alternative hash algorithms here.", + "example": "func NewHash(data []byte) Hash { return xxhash.Sum64(data) }" + } + ], + "key_file_guides": [ + { + "file": "hasher.go", + "role": "Declares the Hash alias and Hasher interface \u2014 the public contract.", + "watch_for": "Hash is an alias; changing it to a named type would break implicit uint64 conversions across importers." + }, + { + "file": "xxhash.go", + "role": "The only concrete hashing function, NewHash, wrapping cespare/xxhash/v2.", + "watch_for": "xxhash is non-cryptographic; never use these hashes for security/signing purposes." + } + ], + "anti_patterns": [ + "Adding crypto hashing (sha256/md5) or a second algorithm in this package instead of keeping a single xxhash primitive.", + "Redefining Hash as a distinct named type, breaking uint64 interchangeability for existing callers." + ], + "decisions": [ + { + "decision": "xxhash chosen as the sole hashing primitive.", + "rationale": "Fast, non-cryptographic 64-bit hashing is sufficient for content fingerprinting/cache keys in productcatalog." + } + ], + "code_examples": [ + { + "scenario": "Implement Hasher for a domain object", + "code": "import \"github.com/openmeterio/openmeter/pkg/hasher\"\n\nfunc (o Object) Hash() hasher.Hash {\n\treturn hasher.NewHash([]byte(o.ID + o.Name))\n}" + } + ] + }, + "pkg/idempotency": { + "purpose": "Single-purpose helper for generating UUIDv7-based idempotency keys, used where outbound operations need a unique, time-ordered idempotency token (e.g. notification/webhook/svix).", + "patterns": [ + { + "name": "UUIDv7 idempotency keys", + "description": "Keys are generated via `uuid.NewV7()` and returned as strings; v7 gives time-ordered uniqueness suitable for idempotency tokens.", + "example": "u, err := uuid.NewV7(); return u.String(), nil" + }, + { + "name": "Error-returning Key plus MustKey panic variant", + "description": "`Key() (string, error)` is the safe API; `MustKey() string` panics on failure and is intended only for setup/non-recoverable paths.", + "example": "func MustKey() string { k, err := Key(); if err != nil { panic(err) }; return k }" + } + ], + "key_file_guides": [ + { + "file": "key.go", + "role": "Provides Key() and MustKey() for UUIDv7 idempotency key generation.", + "watch_for": "MustKey panics \u2014 per project convention avoid panics in production code paths; prefer Key() and propagate the error in service code." + } + ], + "anti_patterns": [ + "Using MustKey() in request/service code paths where a returned error can be propagated instead.", + "Switching to UUIDv4 or random strings, losing the time-ordered property of v7." + ], + "decisions": [ + { + "decision": "UUIDv7 over v4 for idempotency keys.", + "rationale": "v7 embeds a timestamp giving monotonic, sortable keys while preserving uniqueness." + } + ], + "code_examples": [ + { + "scenario": "Generate an idempotency key for an outbound request", + "code": "import \"github.com/openmeterio/openmeter/pkg/idempotency\"\n\nkey, err := idempotency.Key()\nif err != nil {\n\treturn fmt.Errorf(\"generate idempotency key: %w\", err)\n}" + } + ] + }, + "pkg/log": { + "purpose": "Logging support utilities (not a logger implementation): a testify-based mock slog.Handler and a deferrable PanicLogger that logs recovered panics with an OTel-compatible stack trace and then re-panics, exits, or continues.", + "patterns": [ + { + "name": "MockHandler implements slog.Handler", + "description": "`MockHandler` embeds testify `mock.Mock` and satisfies `slog.Handler` (Enabled/Handle/WithAttrs/WithGroup); a compile-time assertion `var _ slog.Handler = &MockHandler{}` enforces the contract. Construct via NewMockHandler().", + "example": "var _ slog.Handler = &MockHandler{}" + }, + { + "name": "PanicLogger with functional propagation strategy", + "description": "`PanicLogger(options ...func(*panicLoggerOptions))` is used as `defer log.PanicLogger(...)`; WithRePanic (default), WithExit, WithContinue select what happens after logging the recovered panic.", + "example": "defer log.PanicLogger(log.WithExit)" + }, + { + "name": "Stack trace recorded under OTel semantic key", + "description": "Recovered panics are logged with `debug.Stack()` under the `code.stacktrace` attribute (OTelCodeStackTrace const) for OpenTelemetry semantic-convention compatibility.", + "example": "slog.Error(description, OTelCodeStackTrace, string(debug.Stack()))" + } + ], + "key_file_guides": [ + { + "file": "mock.go", + "role": "NewMockHandler / MockHandler: a testify mock slog.Handler for asserting log behavior in tests.", + "watch_for": "Test-only helper; the four interface methods must all be kept implemented or the slog.Handler assertion breaks the build." + }, + { + "file": "panic.go", + "role": "PanicLogger plus WithRePanic/WithExit/WithContinue options and the OTelCodeStackTrace constant.", + "watch_for": "Default strategy re-panics; WithExit calls os.Exit(1). This package is the sanctioned recover point \u2014 production code elsewhere must not panic." + } + ], + "anti_patterns": [ + "Using MockHandler outside tests, or shipping log assertions into production wiring.", + "Changing the default propagation strategy away from re-panic, silently swallowing panics callers expect to propagate.", + "Logging stack traces under an ad-hoc attribute key instead of OTelCodeStackTrace." + ], + "decisions": [ + { + "decision": "PanicLogger centralizes panic recovery with a selectable propagation strategy.", + "rationale": "main entrypoints can `defer log.PanicLogger(log.WithExit)` to guarantee panics are logged with a stack trace before the process terminates." + } + ], + "code_examples": [ + { + "scenario": "Guard a main goroutine against unlogged panics", + "code": "import \"github.com/openmeterio/openmeter/pkg/log\"\n\nfunc main() {\n\tdefer log.PanicLogger(log.WithExit)\n\t// ... startup ...\n}" + } + ] + }, + "pkg/lrux": { + "purpose": "Generic LRU cache wrapper with per-item TTL on top of hashicorp/golang-lru/v2, fetching missing or expired entries through a supplied Fetcher. Used by entitlement balanceworker (and its filters) for cached lookups.", + "patterns": [ + { + "name": "Generic CacheWithItemTTL[K,V] embedding lru.Cache", + "description": "The cache embeds `*lru.Cache[K, CacheItemWithTTL[V]]` and stores values wrapped with an ExpiresAt timestamp; K is `comparable`, V is `any`.", + "example": "type CacheWithItemTTL[K comparable, V any] struct { *lru.Cache[K, CacheItemWithTTL[V]]; fetcher Fetcher[K, V]; ttl time.Duration }" + }, + { + "name": "Constructor validates fetcher and ttl", + "description": "`NewCacheWithItemTTL(size, fetcher, opts...)` returns an error if fetcher is nil or ttl < 0; TTL is set via the `WithTTL(d)` functional option (default 0 = never expires).", + "example": "cache, err := NewCacheWithItemTTL(10, fetchFn, WithTTL(time.Second*10))" + }, + { + "name": "Clock-driven expiry via pkg/clock", + "description": "Expiry is evaluated against `clock.Now()` (not time.Now), so tests can FreezeTime/SetTime. Get returns the cached value when ExpiresAt is zero or after now; otherwise it fetches and stores. Refresh always re-fetches.", + "example": "if ok && (item.ExpiresAt.IsZero() || item.ExpiresAt.After(clock.Now())) { return item.Value, nil }" + }, + { + "name": "No locking around fetch", + "description": "Get/Refresh do not hold a mutex during fetch (explicit code comment), so concurrent misses may fetch the same key multiple times \u2014 acceptable by design.", + "example": "// NOTE: we are not using a mutex here, as we don't want to limit the number of fetches for now" + } + ], + "key_file_guides": [ + { + "file": "lruitemttl.go", + "role": "CacheWithItemTTL implementation: NewCacheWithItemTTL, Get, Refresh, internal fetchItem; Fetcher type and WithTTL option.", + "watch_for": "Expiry uses clock.Now(); never substitute time.Now() or tests using FreezeTime will be bypassed. ttl=0 means entries never expire." + }, + { + "file": "lruitemttl_test.go", + "role": "Demonstrates the clock.FreezeTime/SetTime + defer clock.UnFreeze testing pattern and Get/Refresh error propagation.", + "watch_for": "Pairs FreezeTime with defer UnFreeze \u2014 replicate this when adding tests so frozen time does not leak." + } + ], + "anti_patterns": [ + "Using time.Now() instead of clock.Now() for expiry, breaking deterministic tests.", + "Assuming Get is single-flight \u2014 concurrent misses can trigger duplicate fetches by design.", + "Passing a nil fetcher or negative ttl; the constructor rejects both with an error." + ], + "decisions": [ + { + "decision": "Per-item TTL stored alongside the value (CacheItemWithTTL) rather than relying on a global cache eviction policy.", + "rationale": "Allows lazy refresh-on-read: expired items are re-fetched on Get while still bounded by LRU size." + }, + { + "decision": "No mutex around fetch.", + "rationale": "Deliberately avoids throttling fetch concurrency; duplicate fetches are tolerated to keep the cache simple and lock-free." + } + ], + "code_examples": [ + { + "scenario": "Build a TTL cache backed by a fetch function", + "code": "import (\n\t\"github.com/openmeterio/openmeter/pkg/lrux\"\n)\n\ncache, err := lrux.NewCacheWithItemTTL(\n\t1000,\n\tfunc(ctx context.Context, id string) (Entity, error) { return repo.Get(ctx, id) },\n\tlrux.WithTTL(30*time.Second),\n)\nif err != nil {\n\treturn err\n}\nv, err := cache.Get(ctx, id)" + } + ] + }, + "pkg/otelx": { + "purpose": "OpenTelemetry helper for serializing a trace.SpanContext to/from bytes (base64-encoded JSON) so span context can ride along on Kafka messages; used by ingest/kafkaingest for trace propagation.", + "patterns": [ + { + "name": "SpanContext serialized as base64(JSON)", + "description": "`SerializeSpanContext` marshals the SpanContext to JSON then base64 std-encodes it; `DeserializeSpanContext` reverses this and rebuilds via trace.NewSpanContext. Both round-trip through `trace.SpanContextConfig`.", + "example": "b, _ := c.MarshalJSON(); s := base64.StdEncoding.EncodeToString(b)" + }, + { + "name": "Stable propagation key constant", + "description": "`OTelSpanContextKey = \"otel.span.context\"` is the canonical header/metadata key for carrying serialized span context across message boundaries.", + "example": "const OTelSpanContextKey = \"otel.span.context\"" + } + ], + "key_file_guides": [ + { + "file": "spancontext.go", + "role": "SerializeSpanContext / DeserializeSpanContext plus the OTelSpanContextKey constant.", + "watch_for": "Deserialize reuses the `b` variable for the decoded bytes; format is base64-over-JSON on both sides \u2014 keep encode/decode symmetric or trace context will be lost silently." + } + ], + "anti_patterns": [ + "Changing the serialization format on one side only (e.g. dropping base64), breaking span propagation between producer and consumer.", + "Hard-coding the message key string instead of referencing OTelSpanContextKey." + ], + "decisions": [ + { + "decision": "base64-encode the JSON span context.", + "rationale": "Produces an ASCII-safe payload that can be carried in Kafka message headers/metadata without binary-encoding concerns." + } + ], + "code_examples": [ + { + "scenario": "Attach span context to a Kafka message", + "code": "import \"github.com/openmeterio/openmeter/pkg/otelx\"\n\nb, err := otelx.SerializeSpanContext(span.SpanContext())\nif err != nil {\n\treturn err\n}\nheaders[otelx.OTelSpanContextKey] = b" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w14.json b/.archie/enrichments/w14.json new file mode 100644 index 0000000000..b960c3a0ca --- /dev/null +++ b/.archie/enrichments/w14.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/worker/subscriptionsync/service": { + "purpose": "Implements subscriptionsync.Service: the orchestration layer that synchronizes a subscription's billable state into billing artifacts (invoice lines + charges). It drives the load-persisted / build-target / repair / Plan / Apply pipeline under a per-customer billing lock and persists sync state. Primary constraint: every public sync entrypoint runs inside billingService.WithLock, reconciler.Plan stays pure, and reconciler.Apply is the only writer.", + "patterns": [ + { + "name": "Plan/Apply split via buildSyncPlan then reconciler.Apply", + "description": "synchronizeSubscription always calls buildSyncPlan (pure: loads persistedstate, builds targetstate, repairs charge refs, calls s.reconciler.Plan) and only writes through s.reconciler.Apply. No mutation happens during planning.", + "example": "linesDiff, err := s.buildSyncPlan(ctx, subs, subsView, asOf, customerDeletedAt, currency, options.DryRun); ... s.reconciler.Apply(ctx, reconciler.ApplyInput{DryRun: options.DryRun, Customer: customerID, Currency: currency, Plan: linesDiff})" + }, + { + "name": "All sync work runs under withBillingLock", + "description": "The Plan->Apply->updateSyncState body of synchronizeSubscription executes inside withBillingLock(ctx, s, customerID, fn), which delegates to s.billingService.WithLock keyed on the customer. Never write billing/charge state outside this lock.", + "example": "return withBillingLock(ctx, s, customer.CustomerID{Namespace: subs.Namespace, ID: subs.CustomerId}, func(ctx context.Context) (*synchronizeSubscriptionResult, error) { ... })" + }, + { + "name": "subscriptionReferenceOrView indirection", + "description": "Public entrypoints accept either a NamespacedID or a SubscriptionView; newSubscriptionReferenceOrView normalizes both (plus subscription.Subscription) into one ref type. Use AsSubscriptionView/AsNamespacedID/GetID rather than branching on raw types.", + "example": "func (s *Service) SyncByView(ctx, view, asOf, opts...) error { _, err := s.synchronizeSubscription(ctx, newSubscriptionReferenceOrView(view), asOf, opts...); return err }" + }, + { + "name": "Config.Validate gates construction and delegates to reconciler.New", + "description": "New(Config) calls config.Validate() (BillingService, SubscriptionService, SubscriptionSyncAdapter, Logger, Tracer, FeatureGate all required) then builds the reconciler from FeatureFlags. ChargesService is optional (required only for credit-only / charge-based sync).", + "example": "if err := config.Validate(); err != nil { return nil, err }; reconcilerSvc, err := reconciler.New(reconciler.Config{BillingService: config.BillingService, ChargesService: config.ChargesService, EnableCreditThenInvoice: config.FeatureFlags.EnableCreditThenInvoice, CreditsFlag: config.FeatureFlags.CreditsFlag})" + }, + { + "name": "tracex span wrapping on every operation", + "description": "Each meaningful method opens tracex.Start / tracex.StartWithNoValue and returns span.Wrap(func(ctx)...). buildSyncPlan, synchronizeSubscription, invoicePendingLines, updateSyncState all follow this; errors propagate up through Wrap rather than panicking.", + "example": "span := tracex.Start[*reconciler.Plan](ctx, s.tracer, \"billing.worker.subscription.sync.buildSyncPlan\"); return span.Wrap(func(ctx context.Context) (*reconciler.Plan, error) { ... })" + }, + { + "name": "DryRun short-circuits before every write and state upsert", + "description": "options.DryRun (from SynchronizeSubscriptionOptions) is threaded into buildSyncPlan, reconciler.Apply, and returns before updateSyncState. Dry runs never call UpsertSyncState or persist charge item-id repairs.", + "example": "if options.DryRun { return res, nil } // returned before updateSyncState" + }, + { + "name": "Sync-state persistence via updateSyncState", + "description": "After applying, updateSyncState upserts subscriptionsync sync state through the adapter: HasBillables drives scheduling, MaxGenerationTimeLimit becomes NextSyncAfter, and PreventFurtherSyncs forces HasBillables=false (used when the customer was deleted before subscription start).", + "example": "s.subscriptionSyncAdapter.UpsertSyncState(ctx, subscriptionsync.UpsertSyncStateInput{SubscriptionID: in.SubscriptionID, HasBillables: true, NextSyncAfter: lo.ToPtr(nextSyncAfter), SyncedAt: clock.Now().UTC()})" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct, Config/FeatureFlags, New(), and the public Sync* entrypoints (SyncByView, SyncByID, SyncByViewAndInvoiceCustomer, SyncByIDAndInvoiceCustomer, GetSyncStates). Asserts var _ subscriptionsync.Service = (*Service)(nil).", + "watch_for": "ChargesService is nil-tolerant; repairChargeSubscriptionReferences and credit paths guard on it. Adding a required dep means updating Config.Validate." + }, + { + "file": "sync.go", + "role": "Core synchronizeSubscription / synchronizeSubscriptionAndInvoiceCustomer pipeline, withBillingLock, getSubscription (List with IncludeDeleted), updateSyncState, invoicePendingLines, and HandleSubscriptionSyncEvent.", + "watch_for": "Deleted subscriptions => subsView=nil (Plan must tolerate nil view). invoicePendingLines swallows billing.ErrInvoiceCreateNoLines; do not treat 'no lines' as failure." + }, + { + "file": "reconcile.go", + "role": "buildSyncPlan: wires persistedstate.NewLoader, targetstate.NewBuilder, repairChargeSubscriptionReferences, then reconciler.Plan. The single bridge from sub view + persisted state to a reconciler.Plan.", + "watch_for": "Order matters: repair runs AFTER target build and BEFORE Plan; the repaired persisted state is what is fed into Plan." + }, + { + "file": "repair.go", + "role": "repairChargeSubscriptionReferences: realigns persisted charges' subscription_item_id when subscription edits recreated the item row under the same logical (sub/phase/item/version) identity. Helpers WithSubscriptionItemID / UpdateSubscriptionItemID and persistedItemFromCharge.", + "watch_for": "Deliberately narrow: only subscription_item_id is mutated; subscription_id/phase_id mismatches are hard integrity errors. dryRun uses in-memory WithSubscriptionItemID; otherwise UpdateSubscriptionItemID persists. Carries a TODO to make item id immutable again." + }, + { + "file": "handlers.go", + "role": "Event handlers: HandleCancelledEvent, HandleInvoiceCreation (backfills the gathering invoice for affected subscriptions), HandleDeletedEvent. Thin wrappers over synchronizeSubscription*.", + "watch_for": "HandleInvoiceCreation uses clock.Now() (not the invoice time) as the sync reference to provision more lines if delayed; HandleCancelledEvent returns an error if event.Spec.ActiveTo is nil after a best-effort sync." + }, + { + "file": "ref.go", + "role": "subscriptionReferenceOrView value type + newSubscriptionReferenceOrView generic constructor (NamespacedID | SubscriptionView | Subscription) and accessors (Type, AsNamespacedID, AsSubscriptionView, GetID, Validate).", + "watch_for": "GetID/AsX return zero values or errors for the wrong reference type; always check Type() or handle the error rather than assuming a view is present." + }, + { + "file": "base_test.go", + "role": "SuiteBase test harness embedding billingtest.BaseSuite + SubscriptionMixin; builds the real adapter + Service, setupChargesService wires chargestestutils, and provides expectLines/assertCharges matchers.", + "watch_for": "afterTest resets featureFlags and MockStreamingConnector; enableProrating flips featureFlags directly. Tests drive behavior through SyncByView/SyncByViewAndInvoiceCustomer, not lower-level adapters." + }, + { + "file": "sync_credittheninvoice_test.go", + "role": "End-to-end CreditThenInvoice scenarios wiring a full ledger stack (ledgertestutils, ledgercollector, ledgerchargeadapter handlers) with FeatureFlags{EnableCreditThenInvoice:true, CreditsFlag:\"billing_credits\"}.", + "watch_for": "Requires EnsureBusinessAccounts + CreateCustomerAccounts in BeforeTest; credit-then-invoice charges route through usagebased charges, not plain invoice lines." + } + ], + "anti_patterns": [ + "Writing billing or charge state outside withBillingLock / billingService.WithLock \u2014 breaks per-customer serialization across replicas.", + "Mutating persisted billing artifacts inside buildSyncPlan or reconciler.Plan; planning must stay pure and only reconciler.Apply may write.", + "Skipping the options.DryRun guards and calling UpsertSyncState / persisting charge item-id repairs during a dry run.", + "Repairing more than subscription_item_id in repairChargeSubscriptionReferences, or swallowing a subscription_id/phase_id mismatch instead of returning the integrity error.", + "Introducing context.Background()/time.Now() ad hoc instead of propagating ctx and using clock.Now(); panicking on a bad subscription/period instead of returning an error through span.Wrap." + ], + "decisions": [ + { + "decision": "Split planning (buildSyncPlan -> reconciler.Plan) from writing (reconciler.Apply), with persistedstate/targetstate as inputs.", + "rationale": "Lets sync be dry-runnable and keeps the diff logic deterministic and side-effect-free; the reconciler is the single mutation point so atomicity and DryRun are enforced in one place." + }, + { + "decision": "Identify billable items by logical path (sub/phase/item/version/period), not by subscription_items.id, and add a narrow repair step to realign concrete item ids.", + "rationale": "Subscription edits can soft-delete and recreate an item row for the same logical item; logical identity keeps reconciliation as update/shrink rather than delete+recreate, while repair keeps charge rows pointing at the live item id." + }, + { + "decision": "ChargesService is optional in Config; reconciler and repair guard on nil.", + "rationale": "Charge-based / credit-only sync (and the credits feature) can be disabled, so the same Service supports invoice-line-only deployments without charges wiring." + } + ], + "code_examples": [ + { + "scenario": "buildSyncPlan: load persisted, build target, repair, then produce a pure reconciler.Plan", + "code": "func (s *Service) buildSyncPlan(ctx context.Context, subs subscription.Subscription, subsView *subscription.SubscriptionView, asOf time.Time, customerDeletedAt *time.Time, currency currencyx.Calculator, dryRun bool) (*reconciler.Plan, error) {\n span := tracex.Start[*reconciler.Plan](ctx, s.tracer, \"billing.worker.subscription.sync.buildSyncPlan\")\n return span.Wrap(func(ctx context.Context) (*reconciler.Plan, error) {\n persisted, err := persistedstate.NewLoader(s.billingService, s.chargesService).LoadForSubscription(ctx, subs)\n if err != nil { return nil, err }\n target, err := targetstate.NewBuilder(s.logger, s.tracer).Build(ctx, targetstate.BuildInput{AsOf: asOf, CustomerDeletedAt: customerDeletedAt, SubscriptionView: subsView, Persisted: persisted})\n if err != nil { return nil, err }\n persisted, err = s.repairChargeSubscriptionReferences(ctx, persisted, target, dryRun)\n if err != nil { return nil, err }\n return s.reconciler.Plan(ctx, reconciler.PlanInput{SubscriptionSettlementMode: subs.SettlementMode, Currency: currency, Target: target, Persisted: persisted})\n })\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w140.json b/.archie/enrichments/w140.json new file mode 100644 index 0000000000..d70e244659 --- /dev/null +++ b/.archie/enrichments/w140.json @@ -0,0 +1,213 @@ +{ + "pkg/pglockx": { + "purpose": "Thin wrapper around cirello.io/pglock that constructs a Postgres-backed distributed lock client over the `distributed_locks` table. Its primary constraint: the lock client is created via pglock.UnsafeNew and depends on validated lease/heartbeat timing.", + "patterns": [ + { + "name": "Config.Validate before construction", + "description": "New() calls config.Validate() first and refuses to build a client on invalid config, wrapping the error.", + "example": "if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid lock configuration: %w\", err) }" + }, + { + "name": "Lease/heartbeat invariant", + "description": "Validate enforces LeaseTime must be at least twice HeartbeatInterval, and Owner must be non-empty; errors collected via errors.Join.", + "example": "if c.LeaseTime/2 < c.HeartbeatInterval { errs = append(errs, errors.New(...)) }" + } + ], + "key_file_guides": [ + { + "file": "pglock.go", + "role": "Defines Config (LeaseTime, HeartbeatInterval, Owner), Validate(), and New(db, config) returning *pglock.Client over the hardcoded `distributed_locks` table.", + "watch_for": "Uses pglock.UnsafeNew (not New) \u2014 table is fixed via WithCustomTable(lockTable). DefaultHeartbeatInterval=3s, DefaultLeaseTime=1m; preserve the lease>=2*heartbeat relationship if changing defaults." + } + ], + "anti_patterns": [ + "Calling pglock.New/UnsafeNew directly instead of going through New() and skipping config validation.", + "Setting HeartbeatInterval too close to LeaseTime (violates the 2x lease invariant)." + ], + "decisions": [ + { + "decision": "Use Postgres-based pglock with a custom `distributed_locks` table.", + "rationale": "Reuses the existing Postgres dependency for distributed leader/worker locking instead of adding a separate coordination service." + } + ], + "code_examples": [] + }, + "pkg/pgxpoolobserver": { + "purpose": "OpenTelemetry instrumentation helper that registers observable metrics for a pgxpool.Pool. Single-function package consumed by pkg/framework/pgdriver to expose connection-pool stats.", + "patterns": [ + { + "name": "Register-then-callback metric registration", + "description": "Each metric is created via meter.Int64ObservableCounter/Gauge, appended to allMetrics, then a single RegisterCallback reads pool.Stat() and ObserveInt64s every value.", + "example": "_, err = meter.RegisterCallback(func(_ context.Context, o metric.Observer) error { stat := pool.Stat(); o.ObserveInt64(acquireCountMetric, stat.AcquireCount(), ...); return nil }, allMetrics...)" + }, + { + "name": "Fail-fast on metric creation error", + "description": "Every meter.Int64Observable* call is immediately error-checked and returns on failure before registering the callback.", + "example": "acquireCountMetric, err := meter.Int64ObservableCounter(\"pgxpool.acquire_count\", ...); if err != nil { return err }" + }, + { + "name": "Attribute pass-through", + "description": "additionalAttributes variadic is forwarded to every ObserveInt64 via metric.WithAttributes so callers can tag pool metrics.", + "example": "o.ObserveInt64(idleConnsMetric, int64(stat.IdleConns()), metric.WithAttributes(additionalAttributes...))" + } + ], + "key_file_guides": [ + { + "file": "observer.go", + "role": "Single exported func ObservePoolMetrics(meter, pool, ...attrs) that registers ~13 `pgxpool.*` metrics (acquire_count, idle_conns, total_conns, etc.) from pgxpool.Stat().", + "watch_for": "Avg acquire duration is only observed when acquireCount > 0 to avoid divide-by-zero. Implementation is adapted from cmackenzie1/pgxpool-prometheus; keep metric names `pgxpool.*` stable for dashboards." + } + ], + "anti_patterns": [ + "Registering multiple callbacks instead of one callback over allMetrics.", + "Computing avg acquire duration without guarding acquireCount > 0." + ], + "decisions": [ + { + "decision": "One RegisterCallback reading pool.Stat() once per collection cycle.", + "rationale": "pool.Stat() is a consistent snapshot; reading it once per observe cycle keeps all metrics coherent and cheap." + } + ], + "code_examples": [] + }, + "pkg/redis": { + "purpose": "Redis client factory and configuration for OpenMeter, supporting standalone and Sentinel failover modes with optional TLS, plus OTel tracing/metrics instrumentation.", + "patterns": [ + { + "name": "Config struct with Validate + Configure(viper)", + "description": "Config holds Address/Database/auth plus nested Sentinel and TLS structs; Validate() aggregates errors via errors.Join; Configure(v, prefix) sets viper defaults under a prefix.", + "example": "func Configure(v *viper.Viper, prefix string) { v.SetDefault(fmt.Sprintf(\"%s.address\", prefix), \"127.0.0.1:6379\") }" + }, + { + "name": "Functional options for instrumentation", + "description": "NewClient(Options, ...Option) applies WithTracingProvider/WithMeterProvider options; nil providers are ignored.", + "example": "func WithTracingProvider(p trace.TracerProvider) Option { return func(o *Options) { if p != nil { o.TracingProvider = p } } }" + }, + { + "name": "Sentinel vs standalone branch", + "description": "If Sentinel.Enabled, build redis.NewFailoverClient with MasterName + SentinelAddrs=[Address]; otherwise redis.NewClient with Addr=Address.", + "example": "if o.Sentinel.Enabled { client = redis.NewFailoverClient(&redis.FailoverOptions{MasterName: o.Sentinel.MasterName, SentinelAddrs: []string{o.Address}, ...}) }" + }, + { + "name": "Always instrument with redisotel", + "description": "Both InstrumentTracing and InstrumentMetrics are always called (provider options only added when non-nil), errors wrapped with fmt.Errorf.", + "example": "if err := redisotel.InstrumentTracing(client, tracingOpts...); err != nil { return nil, fmt.Errorf(...) }" + } + ], + "key_file_guides": [ + { + "file": "client.go", + "role": "Options struct (embeds Config + providers), Option functions, and NewClient that builds + instruments the *redis.Client.", + "watch_for": "TLS forces MinVersion TLS1.3; InsecureSkipVerify is wired from config. Sentinel uses single Address as the sentinel addr list." + }, + { + "file": "config.go", + "role": "Config struct, Validate(), Config.NewClient() convenience, and Configure(viper, prefix) defaults.", + "watch_for": "Configure sets an `expiration` default (24h) that is not a field on Config \u2014 it is read elsewhere. Validate requires Address and (when Sentinel enabled) MasterName." + } + ], + "anti_patterns": [ + "Constructing redis.Client directly instead of via NewClient/Config.NewClient (skips OTel instrumentation).", + "Adding config fields without a corresponding Configure() viper default and Validate() check." + ], + "decisions": [ + { + "decision": "Embed Config inside Options and layer functional Options for providers.", + "rationale": "Lets config-driven and DI-driven (tracer/meter) inputs combine without a wide constructor signature." + } + ], + "code_examples": [] + }, + "pkg/ref": { + "purpose": "Tiny value-type package providing IDOrKey \u2014 a reference that is either a ULID id or a string key \u2014 used widely across billing, ledger, and productcatalog to resolve resources by id-or-key.", + "patterns": [ + { + "name": "ULID-detection parsing", + "description": "ParseIDOrKey(s) tries ulid.Parse; success means it's an ID, failure means it's a Key.", + "example": "if _, err := ulid.Parse(s); err != nil { n.Key = s } else { n.ID = s }" + }, + { + "name": "Validate requires one of id/key", + "description": "IDOrKey.Validate() errors when both ID and Key are empty.", + "example": "if i.ID == \"\" && i.Key == \"\" { return fmt.Errorf(\"either id or key is required\") }" + }, + { + "name": "GetIDs/GetKeys nil-safe accessors", + "description": "GetIDs/GetKeys return nil (not empty slice) when the respective field is empty, for easy spread into filter args.", + "example": "func (i IDOrKey) GetIDs() []string { if i.ID == \"\" { return nil }; return []string{i.ID} }" + } + ], + "key_file_guides": [ + { + "file": "ref.go", + "role": "Defines IDOrKey{ID,Key} with json tags, Validate, GetIDs, GetKeys, and ParseIDOrKey.", + "watch_for": "Classification is purely ULID-shape based \u2014 a key that happens to be a valid ULID will be treated as an ID. Both fields can be set when constructed directly (e.g. from JSON), but ParseIDOrKey sets exactly one." + } + ], + "anti_patterns": [ + "Assuming a non-empty string is a key without trying ULID parse \u2014 use ParseIDOrKey.", + "Returning empty slices from GetIDs/GetKeys (breaks the nil-omit convention callers rely on)." + ], + "decisions": [], + "code_examples": [] + }, + "pkg/server": { + "purpose": "Shared HTTP server middleware and request-logging primitives reused across both api/v3/server and openmeter/server, built on go-chi middleware and OTel semconv.", + "patterns": [ + { + "name": "Middleware as func(http.Handler) http.Handler", + "description": "Each middleware is a constructor returning the standard chi/net-http middleware signature; MiddlewareFunc aliases it for cross-version reuse.", + "example": "type MiddlewareFunc func(http.Handler) http.Handler" + }, + { + "name": "OTel semconv attribute keys", + "description": "Request attributes and log fields use go.opentelemetry.io/otel/semconv/v1.27.0 keys (HTTPRequestMethodKey, URLFullKey, HTTPResponseStatusCodeKey) rather than ad-hoc strings.", + "example": "attrs[string(semconv.HTTPRequestMethodKey)] = r.Method" + }, + { + "name": "chi LogFormatter/LogEntry implementation", + "description": "RequestLogger implements middleware.LogFormatter and RequestLoggerEntry implements middleware.LogEntry (compile-time asserted via var _ ...), logging via slog at Debug on Write and Error on Panic.", + "example": "var ( _ middleware.LogFormatter = (*RequestLogger)(nil); _ middleware.LogEntry = (*RequestLoggerEntry)(nil) )" + } + ], + "key_file_guides": [ + { + "file": "attributes.go", + "role": "GetRequestAttributes(r) builds an OTel-semconv attribute map for a request; adds req_id from middleware.GetReqID.", + "watch_for": "Requires middleware.RequestID to be installed upstream or req_id will be absent. There is no semconv key for request id, so a custom `req_id` key is used." + }, + { + "file": "logger.go", + "role": "NewRequestLoggerMiddleware(slog.Handler) plus RequestLogger/RequestLoggerEntry implementing chi's logging hooks.", + "watch_for": "Successful requests log at slog.LevelDebug \u2014 they are silent at higher log levels. Panics log stack + panic value at Error." + }, + { + "file": "poweredby.go", + "role": "NewPoweredByMiddleware sets the X-Powered-By: \"OpenMeter by Kong, Inc.\" header on every response.", + "watch_for": "Header value is a constant; change it in one place. Covered by poweredby_test.go." + }, + { + "file": "middleware.go", + "role": "Declares the shared MiddlewareFunc type used across API versions.", + "watch_for": "Keep this signature identical to net/http middleware so chi .Use accepts it directly." + } + ], + "anti_patterns": [ + "Using hardcoded attribute/log-field strings instead of semconv keys.", + "Logging successful requests above Debug level (breaks the intended quiet default).", + "Duplicating the X-Powered-By value instead of using the constant in poweredby.go." + ], + "decisions": [ + { + "decision": "Centralize cross-version HTTP middleware here rather than in api/v3 or openmeter/server.", + "rationale": "Both server stacks import pkg/server so request logging, attributes, and headers stay consistent across API versions." + } + ], + "code_examples": [ + { + "scenario": "Adding a response-header middleware in chi style", + "code": "func NewPoweredByMiddleware() func(next http.Handler) http.Handler {\n\treturn func(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\tw.Header().Set(poweredByHeader, poweredByValue)\n\t\t\tnext.ServeHTTP(w, r)\n\t\t})\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w141.json b/.archie/enrichments/w141.json new file mode 100644 index 0000000000..27c80bbcc3 --- /dev/null +++ b/.archie/enrichments/w141.json @@ -0,0 +1,260 @@ +{ + "pkg/set": { + "purpose": "A tiny generic, mutex-guarded set data structure (Set[T comparable]) plus free functions for set algebra. Used by billing adapter/httpdriver to deduplicate and diff comparable keys.", + "patterns": [ + { + "name": "Constructor returns pointer", + "description": "New[T](items...) builds the internal map and returns *Set[T]; callers always hold a pointer because Set carries a sync.RWMutex which must not be copied.", + "example": "s := set.New(1, 2, 3) // *Set[int]" + }, + { + "name": "Lock discipline by intent", + "description": "Mutating methods (Add, Remove) take s.mu.Lock(); read methods (AsSlice, IsEmpty) take s.mu.RLock(). Free functions RLock every input set under defer before reading content.", + "example": "func (s *Set[T]) Add(items ...T) { s.mu.Lock(); defer s.mu.Unlock(); ... }" + }, + { + "name": "Variadic free functions for algebra", + "description": "Subtract(a, b...) and Union(sets...) are package-level functions that return a fresh *Set, never mutating inputs.", + "example": "res := set.Union(set.New(1,2), set.New(2,3))" + } + ], + "key_file_guides": [ + { + "file": "set.go", + "role": "Whole package: Set[T] type, New/Add/Remove/AsSlice/IsEmpty methods, Subtract/Union free functions.", + "watch_for": "Set embeds sync.RWMutex via field mu; never copy a Set value (always pass *Set). Subtract RLocks `a` and all `b` sets \u2014 passing the same set twice deadlocks via re-entrant RLock under contention." + }, + { + "file": "set_test.go", + "role": "Tests Union/Subtract/IsEmpty plus a locking smoke test using testify/assert.ElementsMatch.", + "watch_for": "AsSlice order is non-deterministic (map iteration); assert with ElementsMatch, not Equal." + } + ], + "anti_patterns": [ + "Copying a Set by value \u2014 duplicates the embedded mutex and breaks locking.", + "Relying on AsSlice ordering \u2014 map iteration is unordered.", + "Adding methods that read content without taking at least RLock." + ], + "decisions": [ + { + "decision": "Mutex-guarded rather than a bare map[T]struct{}.", + "rationale": "Comment-documented concurrency smoke test shows the package is meant to be safe for concurrent Add/Remove." + } + ], + "code_examples": [ + { + "scenario": "Diff two key sets without mutating inputs", + "code": "import \"github.com/openmeterio/openmeter/pkg/set\"\n\nadded := set.Subtract(set.New(newKeys...), set.New(oldKeys...))\nif !added.IsEmpty() { handle(added.AsSlice()) }" + } + ] + }, + "pkg/slicesx": { + "purpose": "Generic slice helpers that complement github.com/samber/lo: error-aware mapping, ordered diffs, grouping, normalization, and nil/empty handling. One of the most widely imported pkg utilities across billing, subscription, entitlement, and api/v3.", + "patterns": [ + { + "name": "Nil-preserving Map", + "description": "Map[T,S] returns nil for nil input and otherwise a same-length slice; MapWithErr joins per-element errors with errors.Join and returns (nil, err) if any element fails.", + "example": "out, err := slicesx.MapWithErr(in, func(x T) (S, error) { ... })" + }, + { + "name": "Diff as a queryable object", + "description": "NewDiff(base, new) wraps lo.Difference into a Diff with Additions/Removals/Changed/HasChanged plus O(1) membership via InAdditions/InRemovals/Has backed by internal maps.", + "example": "d := slicesx.NewDiff(base, next); if d.HasChanged() { ... }" + }, + { + "name": "Fail-fast uniqueness grouping", + "description": "UniqueGroupBy returns (map, false) when any key maps to more than one element, instead of silently picking one.", + "example": "m, ok := slicesx.UniqueGroupBy(items, keyFn); if !ok { return errDuplicate }" + }, + { + "name": "Normalize = sort + dedup", + "description": "Normalize[cmp.Ordered] clones, sorts, then slices.Compact; nil input stays nil. Used for stable comparable key lists.", + "example": "keys := slicesx.Normalize([]string{\"b\",\"a\",\"a\"}) // [a b]" + } + ], + "key_file_guides": [ + { + "file": "map.go", + "role": "Map and MapWithErr \u2014 the core mapping primitives.", + "watch_for": "Map preserves nil (returns nil, not []S{}); MapWithErr skips failed elements but ultimately returns nil slice plus joined error \u2014 never a partial slice." + }, + { + "file": "diff.go", + "role": "Diff[T,S] type + NewDiff built on lo.Difference and lo.SliceToMap.", + "watch_for": "Changed() does append(d.additions, d.removals...) which can mutate the additions backing array; treat the result as owned/throwaway." + }, + { + "file": "empty.go", + "role": "EmptyAsNil \u2014 collapses zero-length slices to nil, mainly for struct-equality in tests.", + "watch_for": "Intended for test equality; don't use to signal absence in production logic." + }, + { + "file": "each.go", + "role": "ForEachUntilWithErr \u2014 iterate with (breaks, err) control flow.", + "watch_for": "each_test.go contains a stray TestASDF smoke test unrelated to the package \u2014 harmless but noise." + }, + { + "file": "groupby.go", + "role": "UniqueGroupBy \u2014 group with single-element-per-key invariant.", + "watch_for": "Returns (nil, false) on collision; callers must check the bool." + }, + { + "file": "normalize.go", + "role": "Normalize \u2014 sort+compact for cmp.Ordered slices.", + "watch_for": "Compact only removes adjacent duplicates, hence the sort is required first." + }, + { + "file": "slice.go", + "role": "SliceToPtrSlice \u2014 []T to []*T taking addresses of the backing array.", + "watch_for": "Returned pointers alias the input slice's elements; mutating one mutates the other." + } + ], + "anti_patterns": [ + "Returning []S{} instead of nil from Map-style helpers \u2014 breaks nil-preservation contract.", + "Ignoring the bool from UniqueGroupBy and assuming the map is complete.", + "Calling Normalize/Compact without sorting first for non-pre-sorted data.", + "Reusing the slice returned by Diff.Changed() while still reading Additions()." + ], + "decisions": [ + { + "decision": "Wraps lo rather than replacing it.", + "rationale": "diff.go and groupby.go import samber/lo; slicesx only adds the error-aware / invariant-checking variants lo lacks." + }, + { + "decision": "Nil input short-circuits in Map/MapWithErr.", + "rationale": "Keeps nil semantics so callers can distinguish 'no slice' from 'empty result'." + } + ], + "code_examples": [ + { + "scenario": "Map a slice of domain objects to DTOs, aggregating conversion errors", + "code": "import \"github.com/openmeterio/openmeter/pkg/slicesx\"\n\nlines, err := slicesx.MapWithErr(domainLines, func(l Line) (apiLine, error) {\n return toAPILine(l)\n})\nif err != nil { return nil, err }" + } + ] + }, + "pkg/sortx": { + "purpose": "Defines the project-wide sort Order string enum (ASC/DESC) shared by list/pagination APIs and adapters across billing, customer, notification, productcatalog, and api/v3.", + "patterns": [ + { + "name": "Order string enum with default", + "description": "Order is a string type with OrderAsc=\"ASC\", OrderDesc=\"DESC\", OrderDefault=OrderAsc, OrderNone=\"\". Use these constants, never raw strings.", + "example": "order := sortx.OrderDesc" + }, + { + "name": "IsDefaultValue means unset", + "description": "IsDefaultValue() returns true only when Order==OrderNone (empty), used to decide whether to apply a fallback ordering.", + "example": "if order.IsDefaultValue() { order = sortx.OrderDefault }" + } + ], + "key_file_guides": [ + { + "file": "order.go", + "role": "Entire package: Order type, the four constants, String(), IsDefaultValue().", + "watch_for": "A TODO notes IsDefaultValue is misnamed \u2014 it checks for unset (OrderNone), not for OrderDefault. Don't assume it returns true for OrderAsc." + } + ], + "anti_patterns": [ + "Comparing against literal \"ASC\"/\"DESC\" strings instead of the constants.", + "Treating IsDefaultValue() as 'equals OrderDefault' \u2014 it only tests OrderNone." + ], + "decisions": [ + { + "decision": "Single shared enum rather than per-package order types.", + "rationale": "229+ importers across api/v3 and openmeter domains reuse one canonical Order so list endpoints stay consistent." + } + ], + "code_examples": [ + { + "scenario": "Default an unset order before querying", + "code": "import \"github.com/openmeterio/openmeter/pkg/sortx\"\n\nif order.IsDefaultValue() {\n order = sortx.OrderDefault\n}" + } + ] + }, + "pkg/statelessx": { + "purpose": "Adapter helpers that bridge typed, validated functions into the untyped func(context.Context, ...any) shape expected by a stateless state-machine/condition framework. Used by billing charge services (creditpurchase/flatfee/usagebased) and billing/service.", + "patterns": [ + { + "name": "Typed-to-untyped action adapters", + "description": "EntryFunc wraps a no-arg ActionFn; WithParameters[T models.Validator] type-asserts args[0] to T, calls T.Validate(), then invokes the typed function \u2014 all surfaced as func(ctx, ...any) error.", + "example": "h := statelessx.WithParameters(func(ctx context.Context, in CreateInput) error { ... })" + }, + { + "name": "Error-joining composition", + "description": "AllOf(fns...) runs every ActionFn regardless of individual failures and joins errors with errors.Join \u2014 no short-circuit.", + "example": "action := statelessx.AllOf(stepA, stepB, stepC)" + }, + { + "name": "Condition adapters", + "description": "BoolFn lifts func()bool to the framework's func(ctx, ...any) bool; Not negates a func()bool predicate.", + "example": "guard := statelessx.BoolFn(statelessx.Not(isClosed))" + } + ], + "key_file_guides": [ + { + "file": "actions.go", + "role": "ActionFn type, EntryFunc, AllOf, WithParameters[T models.Validator].", + "watch_for": "WithParameters validates input via T.Validate() before running \u2014 T MUST implement models.Validator; it errors (not panics) on missing/wrong-typed args[0]." + }, + { + "file": "conditions.go", + "role": "BoolFn and Not condition adapters.", + "watch_for": "Both ignore context/args entirely \u2014 only use for state-independent predicates." + } + ], + "anti_patterns": [ + "Passing a type to WithParameters that doesn't implement models.Validator \u2014 won't compile / loses validation.", + "Assuming AllOf stops on first error \u2014 it always runs all functions and joins errors.", + "Using BoolFn/Not for predicates that actually need ctx or args." + ], + "decisions": [ + { + "decision": "Generic WithParameters enforces Validate() at the framework boundary.", + "rationale": "Guarantees every typed action validates its input (via models.Validator) before the stateless transition body runs." + } + ], + "code_examples": [ + { + "scenario": "Register a validated typed action in a stateless transition", + "code": "import (\n \"github.com/openmeterio/openmeter/pkg/statelessx\"\n)\n\nentry := statelessx.WithParameters(func(ctx context.Context, in CreateChargeInput) error {\n return svc.create(ctx, in) // in.Validate() already ran\n})" + } + ] + }, + "pkg/strcase": { + "purpose": "Minimal snake_case<->camelCase string conversion, used by entitlement/credit/productcatalog HTTP drivers and tools/migrate/viewgen for identifier translation.", + "patterns": [ + { + "name": "Pure string conversion helpers", + "description": "SnakeToCamel uppercases the char after each '_'; CamelToSnake inserts '_' before each uppercase rune and lowercases it. No allocation strategy beyond strings.Builder in CamelToSnake.", + "example": "strcase.SnakeToCamel(\"a_b_c\") // \"aBC\"" + } + ], + "key_file_guides": [ + { + "file": "strcase.go", + "role": "SnakeToCamel and CamelToSnake functions.", + "watch_for": "Round-trips only for lowercase-snake input. Non-alphanumerics ('-','/') pass through. Existing uppercase in snake input is preserved, so CamelToSnake(SnakeToCamel(x)) is not guaranteed identity for mixed-case input \u2014 see TestCamelToSnakeToCamel covering only well-formed cases." + }, + { + "file": "strcase_test.go", + "role": "Table tests for both directions plus the round-trip test.", + "watch_for": "Test cases include special chars; treat them as the spec for edge behavior." + } + ], + "anti_patterns": [ + "Assuming a perfect round trip for arbitrary mixed-case input.", + "Reaching for a heavier external strcase library when these two functions already cover the API/identifier needs." + ], + "decisions": [ + { + "decision": "Hand-rolled instead of a dependency.", + "rationale": "Only two simple conversions are needed (API field <-> identifier casing), keeping the dependency surface minimal." + } + ], + "code_examples": [ + { + "scenario": "Convert an API field name to a DB-style column", + "code": "import \"github.com/openmeterio/openmeter/pkg/strcase\"\n\ncol := strcase.CamelToSnake(\"createdAt\") // \"created_at\"" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w142.json b/.archie/enrichments/w142.json new file mode 100644 index 0000000000..064ac9c22b --- /dev/null +++ b/.archie/enrichments/w142.json @@ -0,0 +1,195 @@ +{ + "pkg/timeutil": { + "purpose": "Value-type time-interval and recurrence algebra used across billing, subscription, entitlement and credit domains. Provides Period implementations (ClosedPeriod, OpenPeriod, StartBoundedPeriod), Recurrence iteration, and Timeline period derivation \u2014 all immutable, allocation-light, dependency-free except pkg/datetime.", + "patterns": [ + { + "name": "Period interface contract: three containment semantics", + "description": "Every period type implements Period (period.go): Contains (inclusive start, exclusive end), ContainsInclusive (both ends), ContainsExclusive (neither end). New period types must satisfy all three with a compile-time `var _ Period = T{}` assertion.", + "example": "var _ Period = ClosedPeriod{} // closedperiod.go; same in openperiod.go, boundedperiod.go" + }, + { + "name": "Value receivers, no mutation", + "description": "All methods take value receivers and return new structs or pointers; periods are copied freely. Intersection/Union/Difference return fresh values (or nil for OpenPeriod.Intersection meaning 'no overlap').", + "example": "func (p ClosedPeriod) Intersection(other ClosedPeriod) *ClosedPeriod // returns nil when !newFrom.Before(newTo)" + }, + { + "name": "Boundary enum gates recurrence direction", + "description": "Recurrence iteration helpers take a Boundary (Inclusive/Exclusive, boundary.go) and call Boundary.Validate() first. Inclusive returns t when it matches an anchor point; Exclusive steps to the next/prev value.", + "example": "func (r Recurrence) NextAfter(t time.Time, boundaryBehavior Boundary) (time.Time, error)" + }, + { + "name": "Iteration cap via MAX_SAFE_ITERATIONS", + "description": "All recurrence stepping loops (iterateFromNextAfterInclusive, iterateFromPrevBeforeInclusive) guard against runaway iteration with MAX_SAFE_ITERATIONS (1_000_000) and return an error rather than looping forever.", + "example": "if ic >= MAX_SAFE_ITERATIONS { return RecurrenceIterator{}, fmt.Errorf(\"recurrence.NextAfter: too many iterations\") }" + }, + { + "name": "Calendar-correct interval addition via datetime.ISODuration", + "description": "RecurrenceInterval embeds datetime.ISODuration; addIntervalNTimes uses Interval.Mul(n) then ISODuration.AddTo, returning an error when the duration is fractional/non-exact. Handles variable-length months without overflow.", + "example": "n, ok := interval.AddTo(t); if !ok { return ..., fmt.Errorf(\"next recurrence calculation wasn't exact, likely a fractional duration\") }" + }, + { + "name": "Generic Timeline derives periods from sorted timestamps", + "description": "Timeline[T] sorts a clone of inputs on construction (NewTimeline) and exposes GetClosedPeriods / GetOpenPeriods. Wrap values with AsTimed(fn) so the timeline knows how to extract each element's time. Use SimpleTimeline/NewSimpleTimeline for plain time.Time.", + "example": "tl := timeutil.NewSimpleTimeline(times); periods := tl.GetOpenPeriods()" + }, + { + "name": "Validate() collects errors, never panics", + "description": "Validate methods return descriptive errors; Recurrence.Validate aggregates via errors.Join over a []error slice. Period validators reject from.After(to) and zero anchors.", + "example": "var errs []error; ...; return errors.Join(errs...)" + } + ], + "key_file_guides": [ + { + "file": "period.go", + "role": "Defines the Period interface (ContainsInclusive/ContainsExclusive/Contains).", + "watch_for": "Adding a period type without all three methods breaks the `var _ Period` assertions." + }, + { + "file": "closedperiod.go", + "role": "Bounded [from,to] period with Overlaps, Intersection, ContainsPeriodInclusive, Truncate, IsEmpty.", + "watch_for": "Overlaps treats exactly-sequential periods ([1,2],[2,3]) as NOT overlapping; OverlapsInclusive treats them as overlapping. Intersection returns nil for zero-length or touching periods." + }, + { + "file": "openperiod.go", + "role": "Nullable-bound period (From/To *time.Time) with Intersection, Union, Difference, IsSupersetOf, Closed().", + "watch_for": "nil bound means open/unbounded. Intersection returns nil for no overlap and &OpenPeriod{} for both-empty. Union of an empty period returns empty. Closed() errors if either bound is nil." + }, + { + "file": "boundedperiod.go", + "role": "StartBoundedPeriod (required From, optional *To) \u2014 used where start is mandatory but end may be open.", + "watch_for": "Open() lifts it to OpenPeriod; no Intersection/Union here." + }, + { + "file": "recurrence.go", + "role": "Recurrence{Interval,Anchor} with NextAfter/PrevBefore/GetPeriodAt and the RecurrenceIterator (Next/Prev).", + "watch_for": "Anchor is arbitrary, not necessarily first occurrence. GetPeriodAt yields a period where Contains(t) holds (inclusive start, exclusive end). Construct via NewRecurrence/NewRecurrenceFromISODuration to get validation." + }, + { + "file": "timeline.go", + "role": "Generic Timeline[T] + Timed[T] wrapper; derives ClosedPeriods/OpenPeriods between sorted timestamps.", + "watch_for": "GetOpenPeriods on a single time returns TWO periods (open-start\u2192t and t\u2192open-end). NewTimeline clones+sorts; original slice untouched." + }, + { + "file": "boundary.go", + "role": "Boundary string enum (Inclusive/Exclusive) with Validate.", + "watch_for": "Only valid for recurrence boundary behavior; passing an arbitrary string fails Validate." + }, + { + "file": "compare.go", + "role": "Compare(a,b) returning int(a.Sub(b)).", + "watch_for": "Returns nanosecond delta as int, not a normalized -1/0/1; only the sign is meaningful and large gaps risk int overflow on 32-bit." + } + ], + "anti_patterns": [ + "Mutating a period in place or assuming a method has a pointer receiver \u2014 all are value receivers returning new values.", + "Treating OpenPeriod.Intersection==nil as 'empty intersection' \u2014 nil means NO overlap, &OpenPeriod{} means fully-open.", + "Hand-iterating recurrence with raw time.Add for months/years \u2014 use Recurrence/RecurrenceInterval so variable-length months and overflow are handled.", + "Confusing Overlaps vs OverlapsInclusive (and Contains vs ContainsInclusive) at sequential boundaries \u2014 pick the variant matching the boundary semantics you need.", + "Constructing Recurrence{} as a literal and skipping Validate \u2014 use NewRecurrence so positive interval and non-zero anchor are enforced." + ], + "decisions": [ + { + "decision": "Period types are immutable value structs implementing a shared interface.", + "rationale": "Time intervals are passed by value across billing/subscription/credit hot paths; immutability avoids aliasing bugs and the interface lets callers stay generic over closed/open/start-bounded forms." + }, + { + "decision": "Recurrence stepping is bounded by MAX_SAFE_ITERATIONS and returns errors.", + "rationale": "AGENTS forbids panics in non-test paths; a misconfigured fractional interval or far-past anchor could otherwise loop indefinitely." + }, + { + "decision": "Interval math delegates to datetime.ISODuration.AddTo with an exactness check.", + "rationale": "Calendar arithmetic (month/year boundaries, leap days) is non-trivial; centralizing in datetime keeps recurrence correct and signals fractional durations as errors instead of silent drift." + } + ], + "code_examples": [ + { + "scenario": "Iterate a monthly recurrence and get the containing period for a timestamp", + "code": "import (\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"\n\t\"github.com/openmeterio/openmeter/pkg/timeutil\"\n)\n\nrec, err := timeutil.NewRecurrence(timeutil.RecurrencePeriodMonth, anchor)\nif err != nil {\n\treturn err\n}\nperiod, err := rec.GetPeriodAt(t) // ClosedPeriod where period.Contains(t) is true\nif err != nil {\n\treturn err\n}\nnext, err := rec.NextAfter(t, timeutil.Exclusive)" + } + ] + }, + "pkg/treex": { + "purpose": "Generic pointer-identity tree/node library (Node[T], Tree[T]) used by openmeter/subscription and pkg/models for hierarchical structures with cycle-checked construction and DFS traversal. Nodes track parent/children by pointer identity, enabling immutable-style subtree swaps.", + "patterns": [ + { + "name": "Node value must be a non-nil pointer", + "description": "NewNode[T] panics unless the value's reflect.Kind is Pointer and it is non-nil. This enforces the wrapper-embedding pattern where a struct holds a *Node[*Self] pointing back to itself.", + "example": "func NewNode[T any](value T) *Node[T] { if reflect.ValueOf(value).Kind() != reflect.Pointer { panic(\"Node value has to be a pointer\") } ... }" + }, + { + "name": "Parent/child links maintained by pointer identity", + "description": "AddChild/RemoveChild/SwapChild update both the children slice and the child.parent pointer; lookups use pointer equality (lo.Find c == child). Detached nodes have parent set to nil.", + "example": "func (n *Node[T]) AddChild(child *Node[T]) { n.children = append(n.children, child); child.parent = n }" + }, + { + "name": "Tree construction validates acyclicity via DFS", + "description": "NewTree runs a DFS with visited+onStack maps, returning ErrGraphHasCycle on back-edges, ErrNodeGraphInvalid on nil nodes/children, ErrRootNodeIsNil on nil root. It does NOT clone \u2014 the passed root pointer becomes tr.root.", + "example": "if onStack[n] { return ErrGraphHasCycle }" + }, + { + "name": "Pre-order DFS with prune and error propagation", + "description": "Tree.DFS callback returns (stop bool, err error): err aborts traversal immediately; stop prunes the current node's subtree but continues with siblings. Used by Leafs().", + "example": "err = tr.DFS(func(n *Node[*T]) (bool, error) { ...; if cond { return true, nil } /* prune */; return false, nil })" + }, + { + "name": "Immutable subtree updates via ShallowClone + SwapChild/SwapNode", + "description": "ShallowClone copies the node, keeps the same value/parent, copies the children slice and reattaches children's parent pointers to the clone. Combine with SwapChild (or Tree.SwapNode for the root) to replace a node without mutating the original subtree.", + "example": "updated.node = old.node.ShallowClone(); updated.node.SetValue(updated); parent.SwapChild(old.node, updated.node)" + }, + { + "name": "Sentinel errors in errors.go", + "description": "All structural failures use the exported sentinel errors (ErrRootNodeIsNil, ErrGraphHasCycle, ErrNodeHasNoParentButNotRoot, ErrNodeGraphInvalid) so callers assert with errors.Is rather than string matching.", + "example": "assert.ErrorIs(t, err, ErrGraphHasCycle)" + } + ], + "key_file_guides": [ + { + "file": "node.go", + "role": "Node[T] type plus NewNode, AddChild/RemoveChild/SwapChild, ShallowClone, DeepClone, IsLeaf/IsRoot, Value/SetValue/Parent/Children.", + "watch_for": "NewNode panics on non-pointer or nil value (the one place treex panics \u2014 by design, library-only). ShallowClone reattaches only first-level children; DeepClone recurses and detaches the returned root (nil parent)." + }, + { + "file": "tree.go", + "role": "Tree[T] wrapper: NewTree (cycle-checked), Root, DFS, Leafs, SwapNode.", + "watch_for": "SwapNode handles root replacement (sets t.root) but errors with ErrNodeHasNoParentButNotRoot for a parentless non-root. Comment warns: swapping a node mid-DFS-walk requires backtracking or you iterate the detached subtree." + }, + { + "file": "errors.go", + "role": "Exported sentinel errors for invalid graph/node structure.", + "watch_for": "Return these (not ad-hoc fmt.Errorf) for structural failures so errors.Is checks keep working." + }, + { + "file": "usage_example_test.go", + "role": "Canonical wrapper-embedding usage (struct owns *Node[*wrapper]) and immutable-update recipes.", + "watch_for": "This is the intended consumption pattern (mirrors subscription FieldDescriptor); follow it when adding new tree-backed types." + } + ], + "anti_patterns": [ + "Calling NewNode with a non-pointer or nil pointer value \u2014 it panics; always pass a non-nil *T.", + "Manually appending to or reordering Node.children without updating child.parent \u2014 breaks pointer-identity invariants RemoveChild/SwapChild rely on.", + "Assuming NewTree clones or copies the graph \u2014 it validates in place and reuses the root pointer; mutating the original after still affects the tree.", + "Swapping a node during a DFS walk and continuing forward instead of backtracking \u2014 you will traverse the now-detached subtree.", + "Asserting structural failures by error string instead of errors.Is against the exported sentinels." + ], + "decisions": [ + { + "decision": "Nodes require pointer values and track identity by pointer.", + "rationale": "Consumers (subscription, models) embed a back-pointer (struct holding *Node[*Self]); pointer identity lets a value participate in a larger tree and supports SwapChild lookups by ==." + }, + { + "decision": "NewTree validates acyclicity but does not deep-copy.", + "rationale": "Trees can be large; copying on every construction would be wasteful, and immutable updates are opt-in via ShallowClone/DeepClone where callers actually need isolation." + }, + { + "decision": "ShallowClone reattaches first-level children to the clone.", + "rationale": "Enables immutable-style replacement of a single node while preserving the existing subtree without a full deep copy." + } + ], + "code_examples": [ + { + "scenario": "Build a cycle-checked tree of wrapper structs and traverse pre-order", + "code": "import \"github.com/openmeterio/openmeter/pkg/treex\"\n\ntype wrapper struct {\n\tname string\n\tnode *treex.Node[*wrapper]\n}\n\nfunc newWrapper(name string) *wrapper {\n\tw := &wrapper{name: name}\n\tw.node = treex.NewNode(w) // value must be non-nil pointer\n\treturn w\n}\n\nroot, child := newWrapper(\"root\"), newWrapper(\"child\")\nroot.node.AddChild(child.node)\ntr, err := treex.NewTree(root.node)\nif err != nil { // ErrGraphHasCycle / ErrNodeGraphInvalid / ErrRootNodeIsNil\n\treturn err\n}\nerr = tr.DFS(func(n *treex.Node[*wrapper]) (bool, error) {\n\t_ = n.Value().name\n\treturn false, nil\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w143.json b/.archie/enrichments/w143.json new file mode 100644 index 0000000000..a1ee4b93c0 --- /dev/null +++ b/.archie/enrichments/w143.json @@ -0,0 +1,319 @@ +{ + "pkg/framework/clickhouseotel": { + "purpose": "OpenTelemetry instrumentation wrappers around a ClickHouse connection: ClickHouseTracer wraps clickhouse.Conn to span every Query/QueryRow/Exec/AsyncInsert, and ConnPoolMetrics polls Conn.Stats() to emit pool gauges and ping health metrics.", + "patterns": [ + { + "name": "Config struct + Validate() + New constructor", + "description": "Each type has a paired XxxConfig with a Validate() error that collects nil-dependency checks into []error and returns errors.Join(errs...); the New constructor calls cfg.Validate() first and returns (T, error).", + "example": "func NewConnPoolMetrics(cfg ConnPoolMetricsConfig) (*ConnPoolMetrics, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Embedded clickhouse.Conn delegation", + "description": "ClickHouseTracer embeds clickhouse.Conn so all un-overridden methods pass through; only the query-executing methods are overridden to add spans. Compile-time assertion var _ clickhouse.Conn = (*ClickHouseTracer)(nil) guards the interface.", + "example": "type ClickHouseTracer struct { clickhouse.Conn; Tracer trace.Tracer }" + }, + { + "name": "Span-per-query with error recording", + "description": "Every wrapped method opens a span with query+args attributes, defers span.End(), and on error calls span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) before returning the original error unchanged.", + "example": "ctx, span := c.Tracer.Start(ctx, \"clickhouse.Query\", trace.WithAttributes(attribute.String(\"query\", query)))" + }, + { + "name": "Idempotent start/shutdown via sync.OnceFunc + atomic", + "description": "ConnPoolMetrics guards Start with started atomic.Bool (Swap detects double-start) and closes stopChan/doneChan exactly once with sync.OnceFunc; Shutdown signals stopClose then waits on doneChan only if started.", + "example": "if m.started.Swap(true) { return errors.New(\"conn pool metrics already started\") }" + } + ], + "key_file_guides": [ + { + "file": "otel.go", + "role": "ClickHouseTracer wrapping clickhouse.Conn; one span per Query/QueryRow/Exec/AsyncInsert; anyToStrings(args...) stringifies args for the span attribute.", + "watch_for": "args are serialized into span attributes via fmt.Sprintf(\"%v\") \u2014 avoid putting secrets in query args. Errors are recorded on the span but returned unmodified; do not swallow them." + }, + { + "file": "connpool.go", + "role": "Background poller emitting clickhouse.pool.* gauges (open/idle counts + pct of max) and clickhouse.ping_time_ms / ping_failures_total via a ticker loop in run().", + "watch_for": "ping timeout is clamped to <=5s; Shutdown blocks on doneChan, so a hung ping could delay shutdown by up to that timeout. record() is also called once before the first tick so the series exists." + } + ], + "anti_patterns": [ + "Mutating or wrapping the returned error inside the tracer methods \u2014 callers expect the underlying clickhouse error semantics; only record it on the span.", + "Calling Start twice on ConnPoolMetrics or closing stopChan/doneChan directly instead of via the OnceFunc closers.", + "Constructing either type without going through its New constructor (skipping Validate and metric registration)." + ], + "decisions": [ + { + "decision": "ConnPoolMetrics records once immediately before the ticker loop", + "rationale": "Ensures the metric series exists from the moment Start runs rather than only after the first poll interval elapses." + }, + { + "decision": "Ping timeout is bounded independently of poll interval", + "rationale": "A long poll interval must not let a single ping block shutdown indefinitely, since Shutdown waits for the run loop to drain." + } + ], + "code_examples": [ + { + "scenario": "Wrap a ClickHouse conn with tracing", + "code": "tracer, err := clickhouseotel.NewClickHouseTracer(clickhouseotel.ClickHouseTracerConfig{Tracer: tp.Tracer(\"clickhouse\"), Conn: conn})\nif err != nil { return err }\n// tracer is a clickhouse.Conn that spans every query" + } + ] + }, + "pkg/framework/commonhttp": { + "purpose": "Shared HTTP request/response plumbing for all v1/v3 handlers: typed JSON/CSV/PlainText/Redirect response encoders, a request body decoder, and the error-encoder chain that maps domain errors and models.ValidationIssue HTTP-status attributes to RFC-7807 status problems.", + "patterns": [ + { + "name": "Generic typed encoders returning encoder.ResponseEncoder[T]", + "description": "Encoders are generic over the response type and either are direct encoder functions (JSONResponseEncoder) or factories returning encoder.ResponseEncoder[Response] (JSONResponseEncoderWithStatus, EmptyResponseEncoder, RedirectResponseEncoder). Use these instead of hand-writing w.Write.", + "example": "func JSONResponseEncoderWithStatus[Response any](statusCode int) encoder.ResponseEncoder[Response]" + }, + { + "name": "Composed error encoder via short-circuit OR", + "description": "GenericErrorEncoder chains HandleIssueIfHTTPStatusKnown and HandleErrorIfTypeMatches[*models.GenericXxxError] calls with ||; the first matching mapper writes the response and returns true. Add new mappings by inserting another HandleErrorIfTypeMatches term.", + "example": "return HandleIssueIfHTTPStatusKnown(ctx, err, w) || HandleErrorIfTypeMatches[*models.GenericConflictError](ctx, http.StatusConflict, err, w) || ..." + }, + { + "name": "ValidationIssue HTTP-status attribute mapping", + "description": "Handlers attach commonhttp.WithHTTPStatusCodeAttribute(code) to a models.ValidationIssue; HandleIssueIfHTTPStatusKnown reads that private attribute, groups issues by code, and emits them under the legacy 'validationErrors' extension key while stripping the private status attribute from the response.", + "example": "models.NewValidationIssue(code, msg, commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))" + }, + { + "name": "Singular-status prioritization default", + "description": "When validation issues carry multiple distinct HTTP status codes, the default HTTPStatusAttributePriorizationBehaviorSingular returns false (declines to map) rather than guessing a status; only a single distinct code is mapped.", + "example": "if len(issuesByCodeMap) > 1 { return false }" + }, + { + "name": "Errors wrapped as ErrorWithHTTPStatusCode", + "description": "NewHTTPError(statusCode, err, extensions...) embeds the error and renders via models.NewStatusProblem(ctx, err, code).Respond(w); ExtendProblem(name, details) adds extension fields.", + "example": "NewHTTPError(http.StatusBadRequest, fmt.Errorf(\"decode json: %w\", err))" + } + ], + "key_file_guides": [ + { + "file": "errors.go", + "role": "Error-to-HTTP mapping: NewHTTPError/ErrorWithHTTPStatusCode, HandleErrorIfTypeMatches[T], HandleIssueIfHTTPStatusKnown, WithHTTPStatusCodeAttribute.", + "watch_for": "The 'validationErrors' extension key is kept only for backwards compatibility (see FIXME). HandleErrorIfTypeMatches uses lo.ErrorsAs so T must implement error or errors.As would panic." + }, + { + "file": "encoder.go", + "role": "All response encoders + GetMediaType (Accept header parse, defaults to application/json) + the two error-encoder helpers DummyErrorEncoder/GenericErrorEncoder.", + "watch_for": "GetMediaType returns a non-nil error AND a defaulted mediatype on invalid Accept; callers usually ignore the error. RedirectResponseEncoder enforces a 3xx status range." + }, + { + "file": "decoder.go", + "role": "JSONRequestBodyDecoder wrapping go-chi/render.DecodeJSON, returning a 400 HTTPError on failure.", + "watch_for": "Always wrap decode failures as a 400 \u2014 do not return the raw render error." + }, + { + "file": "union.go", + "role": "Union[Primary, Secondary] JSON marshaller where Option1 takes precedence and an empty union marshals to empty bytes.", + "watch_for": "MarshalJSON returns []byte{} (not 'null') when both options are nil, which is invalid JSON if embedded directly." + }, + { + "file": "sort.go", + "role": "GetSortOrder mapping an optional input value to sortx.Order (asc/desc/none).", + "watch_for": "Nil input maps to sortx.OrderNone via defaultx.WithDefault." + }, + { + "file": "pagination.go", + "role": "Pagination constants: DefaultPageSize=100, MaxPageSize=1000, DefaultPage=1.", + "watch_for": "Constants only \u2014 no validation logic lives here." + } + ], + "anti_patterns": [ + "Hand-writing w.WriteHeader + w.Write in handlers instead of using the typed encoders here.", + "Returning raw domain errors from handlers without routing them through GenericErrorEncoder / NewHTTPError so they become RFC-7807 problems.", + "Mapping multiple distinct HTTP status codes from one validation-issue set \u2014 the singular behavior intentionally declines that.", + "Exposing the private httpStatusCodeErrorAttribute to clients (it is stripped before responding; don't re-add it)." + ], + "decisions": [ + { + "decision": "Validation issues carry HTTP status as a private attribute rather than a typed error", + "rationale": "Lets domain layers stay HTTP-agnostic while the encoder layer derives status codes from accumulated issues." + }, + { + "decision": "Multi-status issue sets are not mapped (return false)", + "rationale": "Avoids arbitrarily picking a status when issues disagree; an outer/default handler decides instead." + } + ], + "code_examples": [ + { + "scenario": "Wire encoders into a v3 handler", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\nhttptransport.NewHandlerWithArgs(resolve, exec,\n commonhttp.JSONResponseEncoderWithStatus[CreateResponse](http.StatusCreated),\n httptransport.WithErrorEncoder(commonhttp.GenericErrorEncoder()),\n)" + } + ] + }, + "pkg/framework/lockr": { + "purpose": "Distributed business-level locking on top of PostgreSQL advisory locks, with two implementations: Locker for transaction-scoped pg_advisory_xact_lock (auto-released at tx end) and SessionLocker for connection-scoped pg_advisory_lock/pg_try_advisory_lock with explicit Releaser callbacks.", + "patterns": [ + { + "name": "Key from scopes with hash64 keyspace", + "description": "Locks are keyed by lockr.NewKey(scopes...) where each scope is non-empty and may not contain ':'; the Key.String() joins on ':' and Hash64() xxh3-hashes it into the int64 advisory-lock keyspace.", + "example": "key, err := lockr.NewKey(\"subscription\", subID)" + }, + { + "name": "Transaction-bound locking via context driver", + "description": "Locker.LockForTX requires an active tx in ctx: getTxClient calls entutils.GetDriverFromContext(ctx), rebuilds a *db.Tx from its raw config, and verifies transaction_timestamp() != statement_timestamp() before issuing pg_advisory_xact_lock. Outside a tx it errors.", + "example": "tx, err := entutils.GetDriverFromContext(ctx); // 'lockr only works in a transaction'" + }, + { + "name": "PG-side lock timeout, not context timeout", + "description": "Acquisition timeouts are enforced by the Postgres lock_timeout (set via pgdriver.WithLockTimeout); checkForTimeout maps SQLSTATE 55P03 (pgLockTimeoutErrCode) to ErrLockTimeout. Context-based cancellation is deliberately avoided because it errors the pgx tx.", + "example": "if strings.Contains(err.Error(), pgLockTimeoutErrCode) { return ErrLockTimeout }" + }, + { + "name": "Session lock + idempotent Releaser", + "description": "SessionLocker holds a dedicated *sql.Conn (Start) and returns a Releaser closure per acquisition; the releaser is sync-guarded (mu + done) so calling it twice is a no-op, and PG session advisory locks are reentrant (counter-based, one unlock per lock).", + "example": "releaser, err := locker.Lock(ctx, k); defer releaser(ctx)" + }, + { + "name": "Constructor config validation", + "description": "NewLocker validates LockerConfig.Logger; NewSessionLockr requires both Logger and PostgresDriver and tags the logger with a unique id.", + "example": "if c.Logger == nil { return fmt.Errorf(\"logger is required\") }" + } + ], + "key_file_guides": [ + { + "file": "locker.go", + "role": "Transaction-scoped Locker: LockForTX / LockForTXWithScopes issuing pg_advisory_xact_lock; getTxClient asserts an active pg transaction in ctx.", + "watch_for": "Only works inside a transaction.Driver-managed tx; returns an error if no driver is in ctx. Locks auto-release at tx commit/rollback \u2014 never released manually." + }, + { + "file": "session.go", + "role": "Connection-scoped SessionLocker with Lock/TryLock(+WithScopes), Releaser closures, Start (acquires dedicated conn), and Close (releases all + closes conn).", + "watch_for": "Must call Start before locking and Close when done or session locks dangle on the connection. TryLock returns ErrSessionLockerBusy if another goroutine holds the internal mutex, distinct from ErrNoLockAcquired." + }, + { + "file": "key.go", + "role": "Key interface + NewKey scope validation + xxh3 Hash64.", + "watch_for": "Empty scopes or scopes containing ':' are rejected; collisions are possible since 64-bit hash collapses the keyspace." + }, + { + "file": "var.go", + "role": "pgLockTimeoutErrCode = '55P03' (lock_not_available SQLSTATE).", + "watch_for": "Timeout detection is string-matched against this code; changing it silently breaks ErrLockTimeout mapping." + } + ], + "anti_patterns": [ + "Using context.WithTimeout to bound lock acquisition \u2014 pgx cancellation errors the transaction; rely on PG lock_timeout instead.", + "Calling Locker.LockForTX outside an active transaction.Driver transaction (it errors).", + "Using a SessionLocker without Start, or forgetting Close, leaving advisory locks dangling on the dedicated connection.", + "Constructing Locker/SessionLocker directly instead of via NewLocker/NewSessionLockr (skips required-dependency validation)." + ], + "decisions": [ + { + "decision": "Two distinct lockers (tx-scoped vs session-scoped)", + "rationale": "Transaction advisory locks auto-release with the tx (simplest), while session locks survive across statements for longer-lived coordination needing an explicit Releaser." + }, + { + "decision": "Timeouts use Postgres lock_timeout rather than Go context cancellation", + "rationale": "Cancelling a pgx query mid-lock leaves the connection in an errored tx state (jackc/pgx#2100); the PG-side timeout returns 55P03 while keeping the connection intact." + } + ], + "code_examples": [ + { + "scenario": "Acquire a transaction-scoped business lock", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/lockr\"\n\ntransaction.RunWithNoValue(ctx, txCreator, func(ctx context.Context) error {\n if err := locker.LockForTXWithScopes(ctx, \"subscription\", subID); err != nil {\n return err // ErrLockTimeout on 55P03\n }\n return doWork(ctx)\n})" + } + ] + }, + "pkg/framework/operation": { + "purpose": "A tiny generic abstraction for RPC-style business logic: Operation[Request, Response] is a func(ctx, Request) (Response, error), with Compose/AsNoResponseOperation combinators and a Middleware[Request,Response] chain so transport layers (HTTP handlers) stay decoupled from business logic.", + "patterns": [ + { + "name": "Operation as a generic function type", + "description": "Business logic is expressed as the function type Operation[Request, Response]; there is no interface to implement \u2014 assign a plain func to the type. AsNoResponseOperation adapts error-only (Delete-style) funcs to Operation[Request, any].", + "example": "type Operation[Request any, Response any] func(ctx context.Context, request Request) (Response, error)" + }, + { + "name": "Middleware chaining (outermost first)", + "description": "Middleware wraps an Operation; Chain composes middlewares so the first argument is the outermost wrapper and request flow traverses them in declaration order (implemented by reverse-applying the others before the outer).", + "example": "chain := operation.Chain[Req, Resp](mwAuth, mwLog); op := chain(handler)" + }, + { + "name": "Operation composition", + "description": "Compose chains two operations (op1's Response becomes op2's Request), short-circuiting on op1 error with a zero Response.", + "example": "operation.Compose(getOp, updateOp)" + } + ], + "key_file_guides": [ + { + "file": "operation.go", + "role": "Core Operation type + AsNoResponseOperation + Compose.", + "watch_for": "Compose returns the zero value of Response on op1 error; ensure that zero value is a safe sentinel for callers." + }, + { + "file": "middleware.go", + "role": "Middleware type + Chain composition helper.", + "watch_for": "Chain ordering is outermost-first; reversing the argument order silently reverses middleware execution." + } + ], + "anti_patterns": [ + "Leaking transport concerns (http.Request, response writers) into an Operation \u2014 keep them request/response struct only.", + "Relying on Compose to surface a partial op1 result on error (it returns the zero Response)." + ], + "decisions": [ + { + "decision": "Operation is a function type, not an interface", + "rationale": "Lets any plain business function be used directly and composed without boilerplate adapter structs (commented-out interface alternatives remain in operation_test.go)." + } + ], + "code_examples": [ + { + "scenario": "Define and middleware-wrap an operation", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/operation\"\n\nvar create operation.Operation[CreateReq, CreateResp] = func(ctx context.Context, r CreateReq) (CreateResp, error) {\n return svc.Create(ctx, r)\n}\nchained := operation.Chain[CreateReq, CreateResp](loggingMW)(create)" + } + ] + }, + "pkg/framework/pgdriver": { + "purpose": "Constructs the application's PostgreSQL driver: NewPostgresDriver builds a pgxpool-backed *sql.DB wrapped with OpenTelemetry (otelsql) tracing/metrics and optional pgxpool observability, exposing Driver.DB() and Driver.Close().", + "patterns": [ + { + "name": "Functional options via Option interface", + "description": "Configuration is supplied through Option values (WithTracerProvider, WithMeterProvider, WithMetricMeter, WithSpanOptions, WithLockTimeout) implemented as optionFunc applied to an internal options struct.", + "example": "pgdriver.NewPostgresDriver(ctx, url, pgdriver.WithLockTimeout(3*time.Second))" + }, + { + "name": "lock_timeout via pgx RuntimeParams", + "description": "WithLockTimeout sets connConfig.ConnConfig.RuntimeParams[\"lock_timeout\"] in milliseconds \u2014 this is what lockr relies on for PG-side lock timeouts instead of context cancellation.", + "example": "o.connConfig.ConnConfig.RuntimeParams[\"lock_timeout\"] = fmt.Sprintf(\"%d\", timeout.Milliseconds())" + }, + { + "name": "pgxpool-backed otelsql DB", + "description": "The pool is created via pgxpool.NewWithConfig, then otelsql.OpenDB(pgxstdlib.GetPoolConnector(pool)) wraps it; MaxIdleConns is set to 0 because idle connections are managed by the pgx pool, not database/sql.", + "example": "db := otelsql.OpenDB(pgxstdlib.GetPoolConnector(pool), o.otelOptions...); db.SetMaxIdleConns(0)" + }, + { + "name": "Opt-in pool metrics", + "description": "When WithMetricMeter is provided, pgxpoolobserver.ObservePoolMetrics(meter, pool) registers pool gauges before returning the driver.", + "example": "if o.metricMeter != nil { pgxpoolobserver.ObservePoolMetrics(o.metricMeter, pool) }" + } + ], + "key_file_guides": [ + { + "file": "driver.go", + "role": "Entire package: Option machinery, options/Driver structs, and NewPostgresDriver constructor.", + "watch_for": "db.SetMaxIdleConns(0) is intentional \u2014 do not change it; idle pooling is pgx's job. Close() closes the pool (and thus the *sql.DB) \u2014 there is no separate DB close." + } + ], + "anti_patterns": [ + "Constructing the *sql.DB or pgxpool directly instead of via NewPostgresDriver (loses otelsql instrumentation and the MaxIdleConns=0 invariant).", + "Setting MaxIdleConns to a non-zero value, which double-manages idle connections against the pgx pool.", + "Relying on context timeouts for PG lock waits instead of WithLockTimeout (see lockr)." + ], + "decisions": [ + { + "decision": "lock_timeout is configured as a pgx RuntimeParam", + "rationale": "Provides server-side advisory-lock acquisition timeouts (used by lockr) that keep the connection usable, unlike client-side context cancellation." + }, + { + "decision": "MaxIdleConns forced to 0 on the otelsql DB", + "rationale": "The pgxpool already owns connection lifecycle; letting database/sql also pool idle connections would conflict (per pgx stdlib guidance)." + } + ], + "code_examples": [ + { + "scenario": "Create an instrumented Postgres driver", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/pgdriver\"\n\ndrv, err := pgdriver.NewPostgresDriver(ctx, dbURL,\n pgdriver.WithMeterProvider(mp),\n pgdriver.WithMetricMeter(meter),\n pgdriver.WithLockTimeout(3*time.Second),\n)\nif err != nil { return err }\ndefer drv.Close()\nsqlDB := drv.DB()" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w144.json b/.archie/enrichments/w144.json new file mode 100644 index 0000000000..aea7032874 --- /dev/null +++ b/.archie/enrichments/w144.json @@ -0,0 +1,134 @@ +{ + "pkg/framework/tracex": { + "purpose": "Generic OpenTelemetry span wrapper that runs a callback inside a started span, recording errors and panics and setting OK/Error status automatically. Used by worker/event-handler paths (subscriptionsync, notification eventhandler/webhook, watermill router) to instrument operations without repeating span boilerplate.", + "patterns": [ + { + "name": "Start-then-Wrap span lifecycle", + "description": "Create a span with Start[T] (or StartWithNoValue), then call .Wrap(fn) exactly once; Wrap calls span.End() itself, so callers must NOT defer span.End() separately.", + "example": "tracex.Start[Result](ctx, tracer, \"my.op\").Wrap(func(ctx context.Context) (Result, error) { return doWork(ctx) })" + }, + { + "name": "Typed return via generics", + "description": "Span[T] is parameterized over the callback's return type T; the value/error pair from fn is passed through verbatim after status is set.", + "example": "func Start[T any](ctx, tracer, spanName, opts...) *Span[T]" + }, + { + "name": "No-value variant delegates to Span[any]", + "description": "SpanNoValue.Wrap builds an internal Span[any] and adapts the error-only callback to (any,error), so there is one source of truth for status/panic handling.", + "example": "func (s *SpanNoValue) Wrap(fn func(ctx context.Context) error, opts ...Option) error" + }, + { + "name": "Panic re-raised after recording", + "description": "On panic the deferred recover records the error with stacktrace attribute, sets Error status, ends the span, then re-panics \u2014 it never swallows the panic.", + "example": "panic(r) // after s.span.RecordError(...) and s.span.End()" + }, + { + "name": "Functional options for status text", + "description": "OK status description is configurable only through Option (WithOkStatusDescription); defaultOptions sets it to \"success\".", + "example": "span.Wrap(fn, tracex.WithOkStatusDescription(\"created\"))" + } + ], + "key_file_guides": [ + { + "file": "tracex.go", + "role": "Entire package: Span[T]/SpanNoValue types, Start/StartWithNoValue constructors, Wrap methods, Options + WithOkStatusDescription option.", + "watch_for": "Wrap ends the span \u2014 do not End() it again. The ctx returned by tracer.Start is stored on the Span and passed to fn as the span-scoped context; use that ctx inside fn, not the outer one, or child spans won't nest." + } + ], + "anti_patterns": [ + "Calling span.End() or deferring it around Wrap \u2014 Wrap already ends the span, causing double-End.", + "Swallowing panics inside the wrapped fn expecting tracex to convert them to errors \u2014 tracex re-panics.", + "Using the pre-Start ctx inside fn instead of the ctx argument fn receives, breaking span parent/child linkage." + ], + "decisions": [ + { + "decision": "Wrap owns span.End() and panic recovery", + "rationale": "Centralizes the record-error/set-status/end sequence so instrumented call sites stay one-liners and cannot forget to end spans or record panics." + }, + { + "decision": "SpanNoValue reuses Span[any] internally", + "rationale": "Avoids duplicating panic/status logic for the common error-only operation shape." + } + ], + "code_examples": [ + { + "scenario": "Instrument an error-only operation", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/tracex\"\n\nfunc (s *svc) Sync(ctx context.Context) error {\n return tracex.StartWithNoValue(ctx, s.tracer, \"subscriptionsync.Sync\").\n Wrap(func(ctx context.Context) error {\n return s.reconcile(ctx)\n })\n}" + } + ] + }, + "pkg/framework/transaction": { + "purpose": "Defines the transaction abstraction (Driver/Creator interfaces) and the Run/RunWithNoValue helpers that execute a callback inside a transaction, plus context-key plumbing to store and retrieve the active Driver. This is the foundation that entutils.TransactingRepo and every adapter layer build on for nested, savepoint-based transactions.", + "patterns": [ + { + "name": "Run/RunWithNoValue entrypoints", + "description": "All transactional work goes through Run[R] (returns a value) or RunWithNoValue (delegates to Run with a nil any return); never call Driver.Commit/Rollback directly from business code.", + "example": "transaction.RunWithNoValue(ctx, a.creator, func(ctx context.Context) error { ... })" + }, + { + "name": "Context-carried Driver reuse", + "description": "getTx first checks GetDriverFromContext; if a Driver is already present it is reused (joins the outer tx) instead of opening a new one, enabling nested transactions across services.", + "example": "if tx, err := GetDriverFromContext(ctx); err == nil { return ctx, tx, nil }" + }, + { + "name": "Savepoint per Run invocation", + "description": "manage() calls tx.SavePoint() before the callback so nested Run calls roll back to their own savepoint rather than aborting the whole outer transaction.", + "example": "err := tx.SavePoint(); result, err := cb(ctx, tx)" + }, + { + "name": "Single typed context key", + "description": "Driver is stored under the unexported omTransactionContextKey constant; SetDriverOnContext returns DriverConflictError if one already exists rather than overwriting.", + "example": "context.WithValue(ctx, contextKey, tx)" + }, + { + "name": "Sentinel error types for tx state", + "description": "DriverNotFoundError and DriverConflictError are concrete types checked via type assertion (not errors.Is); getTx tolerates DriverNotFoundError silently and Run tolerates DriverConflictError (nested case).", + "example": "if _, ok := err.(*DriverConflictError); !ok && err != nil { ... }" + }, + { + "name": "Panic rolls back then re-panics", + "description": "manage()'s deferred recover rolls the tx back for all downstream WithTx clients and re-panics with a message including debug.Stack() \u2014 it does not convert panic to error.", + "example": "_ = tx.Rollback(); panic(pMsg)" + } + ], + "key_file_guides": [ + { + "file": "transaction.go", + "role": "Driver/Creator interfaces and Run/RunWithNoValue/getTx/manage; the transaction execution engine.", + "watch_for": "On callback error, Rollback errors are joined via errors.Join and returned; a failed Commit also triggers Rollback. Driver must implement Commit/Rollback/SavePoint \u2014 SavePoint is what makes nesting safe." + }, + { + "file": "context.go", + "role": "Get/SetDriverOnContext plus DriverNotFoundError and DriverConflictError sentinel types keyed by omTransactionContextKey.", + "watch_for": "SetDriverOnContext refuses to replace an existing Driver (returns DriverConflictError); Run treats that conflict as the expected nested case and proceeds. Errors are matched by type assertion, so don't wrap them in ways that defeat the cast." + } + ], + "anti_patterns": [ + "Calling Driver.Commit()/Rollback() directly from a service or adapter instead of going through Run.", + "Opening a fresh transaction when ctx already carries a Driver \u2014 bypasses nested-tx reuse and savepoints.", + "Overwriting the context Driver under a different key, breaking GetDriverFromContext reuse.", + "Recovering panics inside the callback to avoid rollback \u2014 manage() relies on the panic propagating to roll back.", + "Treating DriverNotFoundError/DriverConflictError with errors.Is instead of the concrete type assertion the package uses." + ], + "decisions": [ + { + "decision": "Reuse a context-stored Driver and use savepoints", + "rationale": "Lets independently-written services compose into one outer transaction; each Run gets its own savepoint so a nested failure rolls back only its scope unless the error propagates." + }, + { + "decision": "Panic path rolls back and re-panics rather than returning an error", + "rationale": "Guarantees downstream WithTx clients see a rolled-back tx while preserving the original panic + stack for higher-level recovery/observability." + }, + { + "decision": "Concrete sentinel error types over errors.New", + "rationale": "getTx and Run distinguish 'no tx yet' (open one) from 'tx already present' (reuse) via type assertion, which sentinel strings could not express cleanly." + } + ], + "code_examples": [ + { + "scenario": "Run repository work inside a transaction", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/transaction\"\n\nfunc (a *adapter) Create(ctx context.Context, in Input) (*Out, error) {\n return transaction.Run(ctx, a.creator, func(ctx context.Context) (*Out, error) {\n // adapter reads the active Driver from ctx (via entutils.TransactingRepo)\n return a.doCreate(ctx, in)\n })\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w145.json b/.archie/enrichments/w145.json new file mode 100644 index 0000000000..e5e37bbbac --- /dev/null +++ b/.archie/enrichments/w145.json @@ -0,0 +1,222 @@ +{ + "pkg/framework/entutils/entcursor": { + "purpose": "An Ent codegen extension that attaches a Cursor(ctx, *pagination.Cursor) method to every generated Query type whose node has a created_at field, implementing keyset (cursor) pagination ordered by (created_at asc, id asc). It is registered in the Ent generator pipeline, not called at runtime.", + "patterns": [ + { + "name": "entc.Extension wrapper", + "description": "Extension embeds entc.DefaultExtension and overrides Templates() to register one gen.Template parsed from an embedded .tpl file; New() returns *Extension.", + "example": "func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate(\"entcursor\").Parse(tmplfile))} }" + }, + { + "name": "Embedded template file", + "description": "The .tpl is loaded via //go:embed cursor.tpl into var tmplfile string; template logic lives entirely in cursor.tpl, Go file is just registration glue.", + "example": "//go:embed cursor.tpl\\nvar tmplfile string" + }, + { + "name": "created_at gating", + "description": "The template only emits Cursor() for nodes that declare a created_at field (it scans $n.Fields). Nodes without created_at get no method.", + "example": "{{ range $f := $n.Fields }}{{ if eq $f.Name \"created_at\" }}{{ $hasCreatedAt = true }}{{ end }}{{ end }}" + }, + { + "name": "Keyset ordering invariant", + "description": "Cursor pagination always orders by created_at asc, id asc and the WHERE predicate is (created_at > t) OR (created_at = t AND CAST(id AS TEXT) > id). Changing one without the other breaks paging.", + "example": "s.OrderBy(sql.Asc(s.C(\"created_at\")), sql.Asc(s.C(\"id\")))" + }, + { + "name": "Non-nil empty result", + "description": "When no rows match, Items is initialized to make([]*Node, 0), never nil, so callers/JSON get [] not null; NextCursor is only set when len(items) > 0.", + "example": "if items == nil { items = make([]*Node, 0) }" + } + ], + "key_file_guides": [ + { + "file": "cursor.go", + "role": "Registers the entcursor template as an entc.Extension via embedded cursor.tpl", + "watch_for": "Template name string passed to gen.NewTemplate must match the {{ define }} block name in the .tpl" + }, + { + "file": "cursor.tpl", + "role": "Ent text/template generating the Cursor() method per node with a created_at field", + "watch_for": "Edits here regenerate code only after re-running Ent codegen; the id comparison casts to TEXT (string ID assumption) and validates cursor before applying" + }, + { + "file": "cursor_test.go", + "role": "Integration test exercising generated Cursor() against testutils/ent1 example schema on a real Postgres DB", + "watch_for": "Uses testutils.InitPostgresDB(t); covers first-page, next-page, invalid-cursor error, and empty-result paths" + } + ], + "anti_patterns": [ + "Editing the generated Cursor() methods in ent/db output instead of cursor.tpl", + "Changing the WHERE predicate or ORDER BY in a way that desyncs them, breaking stable keyset paging", + "Returning nil Items for empty results (must be make([]*Node, 0))", + "Assuming Cursor() exists on nodes without a created_at field" + ], + "decisions": [ + { + "decision": "Generate keyset pagination via an Ent template extension rather than hand-writing per-entity", + "rationale": "Uniform cursor semantics across all entities that have created_at without per-package boilerplate" + }, + { + "decision": "Cast id to TEXT in the tiebreaker comparison", + "rationale": "Provides a deterministic total order for the secondary key regardless of the underlying id column type" + } + ], + "code_examples": [] + }, + "pkg/framework/entutils/entdriver": { + "purpose": "Wraps an Ent Postgres client + dialect driver pair into a single EntPostgresDriver lifecycle object, providing Driver()/Client() accessors and Clone() for sharing the underlying *sql.DB across multiple Ent clients. The one hand-written runtime glue type tying database/sql to the generated openmeter/ent/db client.", + "patterns": [ + { + "name": "Driver+client pairing", + "description": "EntPostgresDriver holds both *entDialectSQL.Driver and *entdb.Client built from the same connection; construct via NewEntPostgresDriver(db *sql.DB) which opens the dialect driver and wraps it in entdb.NewClient.", + "example": "driver := entDialectSQL.OpenDB(dialect.Postgres, db); client := entdb.NewClient(entdb.Driver(driver))" + }, + { + "name": "Shared-connection Clone", + "description": "Clone() reuses d.driver.DB() (the same *sql.DB) to build a fresh driver+client, enabling multiple Ent clients over one pool/connection (used for transaction sharing).", + "example": "driver := entDialectSQL.OpenDB(dialect.Postgres, d.driver.DB())" + }, + { + "name": "Ordered Close", + "description": "Close() closes the client first, then the dialect driver, returning the first error; both resources are owned by this struct.", + "example": "if err := d.client.Close(); err != nil { return err }; return d.driver.Close()" + } + ], + "key_file_guides": [ + { + "file": "driver.go", + "role": "Defines EntPostgresDriver and its New/Clone/Close/Driver/Client methods over openmeter/ent/db", + "watch_for": "Imports the concrete generated entdb package \u2014 this file is the bridge to that codegen output; Clone shares the *sql.DB so closing one driver affects the shared pool" + } + ], + "anti_patterns": [ + "Constructing entdb.Client directly in callers instead of through NewEntPostgresDriver, bypassing paired lifecycle", + "Closing the shared *sql.DB via one Clone()'d driver while another clone is still in use", + "Reordering Close() so the dialect driver closes before the client" + ], + "decisions": [ + { + "decision": "Keep both driver and client in one struct with explicit accessors", + "rationale": "Callers (transaction helpers, testutils, lockr) need either the low-level driver or the typed client from a single owned lifecycle" + }, + { + "decision": "Provide Clone() over the underlying *sql.DB", + "rationale": "Enables shared-transaction patterns where multiple Ent clients operate on the same connection" + } + ], + "code_examples": [] + }, + "pkg/framework/entutils/entexpose": { + "purpose": "An Ent codegen extension that exposes generated client internals (driver/config) and adds HijackTx / NewTxClientFromRawConfig so multiple db.Client and db.Tx instances over the same connection can share a single transaction. Must be included in every Ent codegen package that participates in shared transactions.", + "patterns": [ + { + "name": "entc.Extension wrapper", + "description": "Identical registration shape to the other entutils extensions: Extension embeds entc.DefaultExtension, Templates() registers the embedded expose.tpl under name 'entexpose', New() returns *Extension.", + "example": "gen.MustParse(gen.NewTemplate(\"entexpose\").Parse(tmplfile))" + }, + { + "name": "Internal exposure for shared tx", + "description": "The template emits Client.GetConfig() returning *entutils.RawEntConfig and an ExposedTxDriver wrapping *txDriver that implements entutils.Transactable (Rollback/Commit/SavePoint/RollbackTo/Release).", + "example": "var _ entutils.Transactable = (*ExposedTxDriver)(nil)" + }, + { + "name": "HijackTx / rehydrate", + "description": "Client.HijackTx begins a tx and returns a RawEntConfig + ExposedTxDriver; NewTxClientFromRawConfig rebuilds a *Tx (with all node clients) from that raw config so a transaction can be shared across Ent codegen packages.", + "example": "func (c *Client) HijackTx(ctx, opts) (context.Context, *entutils.RawEntConfig, *ExposedTxDriver, error)" + }, + { + "name": "Savepoint via raw SQL", + "description": "SavePoint/RollbackTo/Release execute literal SAVEPOINT / ROLLBACK TO / RELEASE SAVEPOINT statements through the txDriver's ExecContext.", + "example": "d.Driver.ExecContext(context.Background(), \"SAVEPOINT \" + name)" + } + ], + "key_file_guides": [ + { + "file": "entexpose.go", + "role": "Registers the entexpose template as an entc.Extension via embedded expose.tpl", + "watch_for": "Template define name 'expose' vs registration name 'entexpose' \u2014 registration uses gen.NewTemplate name, define block is named 'expose'" + }, + { + "file": "expose.tpl", + "role": "Generates GetConfig, ExposedTxDriver, HijackTx, NewTxClientFromRawConfig into each participating Ent package", + "watch_for": "Known limitation noted in template TODO: Tx.onRollback/onCommit hooks and intersectors are ignored under shared transactions; HijackTx errors if already inside a txDriver" + } + ], + "anti_patterns": [ + "Using shared transactions and relying on Ent Tx onRollback/onCommit hooks (they are ignored by this template)", + "Forgetting to include this extension in a new Ent codegen package that must join shared transactions", + "Editing the generated GetConfig/HijackTx output instead of expose.tpl", + "Calling HijackTx on a client already running inside a transaction (returns an error)" + ], + "decisions": [ + { + "decision": "Expose driver/config internals via template-generated methods on the generated Client", + "rationale": "Cross-package shared transactions require reaching the unexported config/driver that Ent does not export by default" + }, + { + "decision": "Model savepoints with raw SQL through ExposedTxDriver", + "rationale": "Gives entutils.Transactable nested-transaction semantics over a hijacked tx without Ent's native support" + } + ], + "code_examples": [] + }, + "pkg/framework/entutils/entpaginate": { + "purpose": "An Ent codegen extension that attaches an offset/limit Paginate(ctx, pagination.Page) method to every generated Query type, returning pagination.Result with TotalCount and asserting the query satisfies pagination.Paginator. Provides page-number pagination as the counterpart to entcursor's keyset pagination.", + "patterns": [ + { + "name": "entc.Extension wrapper", + "description": "Same registration shape as the sibling extensions: Extension embeds entc.DefaultExtension, Templates() registers embedded paginate.tpl under name 'entpaginate', New() returns *Extension.", + "example": "gen.MustParse(gen.NewTemplate(\"entpaginate\").Parse(tmplfile))" + }, + { + "name": "Clone for count vs page", + "description": "Paginate clones the query for the COUNT (clearing Fields and order on the count query) and uses the original for the paged fetch, so total count is computed independently of select/order.", + "example": "countQuery := receiver.Clone(); countQuery.ctx.Fields = []string{}; countQuery.order = nil" + }, + { + "name": "Zero-page returns all", + "description": "If page.IsZero() the method sets offset=0, limit=count and returns all items while still populating TotalCount; empty count short-circuits to Items = make([]*Node,0).", + "example": "if page.IsZero() { offset = 0; limit = count }" + }, + { + "name": "Paginator type check", + "description": "Each node emits a compile-time assertion that *XQuery implements pagination.Paginator[*Node].", + "example": "var _ pagination.Paginator[*Node] = (*XQuery)(nil)" + } + ], + "key_file_guides": [ + { + "file": "paginate.go", + "role": "Registers the entpaginate template as an entc.Extension via embedded paginate.tpl", + "watch_for": "Registration name must match the {{ define }} block ('paginate') vs gen.NewTemplate name ('entpaginate')" + }, + { + "file": "paginate.tpl", + "role": "Generates Paginate() (offset/limit + TotalCount) plus the Paginator interface assertion per node", + "watch_for": "Manipulates unexported query internals (receiver.ctx.Limit/Offset, .order, .ctx.Fields) \u2014 sensitive to Ent codegen internals; resets limit/offset to zero before paging" + }, + { + "file": "paginate_test.go", + "role": "Integration test of generated Paginate() over testutils/ent1 example schema on real Postgres", + "watch_for": "Covers ordering, filtering, paging, empty page, and zero-page-returns-all behaviors; uses testutils.InitPostgresDB(t)" + } + ], + "anti_patterns": [ + "Editing generated Paginate() methods instead of paginate.tpl", + "Returning nil Items for empty results (must be make([]*Node, 0))", + "Assuming Paginate with a zero Page errors instead of returning all items", + "Relying on select fields or ordering surviving into the count query (they are cleared)" + ], + "decisions": [ + { + "decision": "Run a separate cloned COUNT query with fields/order stripped", + "rationale": "Total count must be independent of the page's projection and ordering for correct TotalCount" + }, + { + "decision": "Treat a zero Page value as 'return all items'", + "rationale": "Lets callers request the full set through the same API without a special unpaged path" + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w146.json b/.archie/enrichments/w146.json new file mode 100644 index 0000000000..1e2854ec5d --- /dev/null +++ b/.archie/enrichments/w146.json @@ -0,0 +1,61 @@ +{ + "pkg/framework/entutils/entsetorclear": { + "purpose": "A code-generation-time Ent extension (entc.Extension) that injects a custom Go template into Ent's generator, emitting SetOrClear convenience methods on every entity updater for optional, non-immutable fields. It exists only to participate in `go generate` for openmeter/ent \u2014 it ships no runtime logic.", + "patterns": [ + { + "name": "entc.Extension via embedded template", + "description": "Extension embeds entc.DefaultExtension and overrides Templates() to return one gen.Template parsed from the //go:embed'd setorclear.tpl. New() returns *Extension. This is the only public surface.", + "example": "func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate(\"entsetorclear\").Parse(tmplfile))} }" + }, + { + "name": "Template embedded at compile time", + "description": "setorclear.tpl is bound to the tmplfile string via `//go:embed setorclear.tpl`; the .tpl file must stay co-located in this package and keep its name, or the embed directive breaks the build.", + "example": "//go:embed setorclear.tpl\\nvar tmplfile string" + }, + { + "name": "Generated method is nil-pointer-driven set/clear", + "description": "For each optional non-immutable field the template emits SetOrClear(value *T) on both the bulk updater (UpdateName) and the *One updater: nil value calls Clear(), non-nil calls Set(*value).", + "example": "func (u *FooUpdate) SetOrClearBar(value *string) *FooUpdate { if value == nil { return u.ClearBar() } return u.SetBar(*value) }" + }, + { + "name": "Views are skipped", + "description": "The template guards `{{ if not ($n.IsView) }}` \u2014 ent.View schemas have no updaters, so SetOrClear methods are never generated for them. New view-related logic must respect this guard.", + "example": "{{ if not ($n.IsView) }} ... {{ end }}" + } + ], + "key_file_guides": [ + { + "file": "setorclear.go", + "role": "Defines the entc.Extension wrapper (Extension struct, Templates(), New()) and embeds the template string.", + "watch_for": "Keep New() returning *Extension \u2014 openmeter/ent/entc.go registers it via entsetorclear.New() inside entc.Generate options. Do not add runtime/business logic here; this package runs only during code generation." + }, + { + "file": "setorclear.tpl", + "role": "Ent Go-template (text/template + ent gen funcs) that renders the SetOrClear methods into the generated db package.", + "watch_for": "Must call `{{ template \"header\" $ }}` so the generated file gets the standard 'Code generated, DO NOT EDIT' header. Only Optional && !Immutable fields are eligible. Both UpdateName and UpdateName+'One' paths must stay in sync (ent has two update paths)." + } + ], + "anti_patterns": [ + "Adding runtime application logic here \u2014 this package is generator-only and is imported solely by openmeter/ent/entc.go at generate time.", + "Renaming or moving setorclear.tpl without updating the //go:embed directive, which silently breaks compilation.", + "Removing the `{{ if not ($n.IsView) }}` guard \u2014 views lack updaters and would produce invalid generated code.", + "Hand-editing the generated SetOrClear methods in openmeter/ent/db; they carry the DO NOT EDIT header and are overwritten by `make generate`." + ], + "decisions": [ + { + "decision": "Implement set-vs-clear as a generated template method rather than per-field hand-written helpers.", + "rationale": "Optional pointer fields need uniform nil=clear / value=set semantics across every entity; the pattern (sourced from ent issue #1119) auto-applies to all eligible fields and stays in sync as the schema grows." + }, + { + "decision": "Package the template as an entc.Extension instead of a standalone codegen script.", + "rationale": "Lets openmeter/ent/entc.go register it alongside other Ent generation options in a single entc.Generate invocation." + } + ], + "code_examples": [ + { + "scenario": "Registering the extension in the Ent generator (openmeter/ent/entc.go).", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/entutils/entsetorclear\"\n\nerr := entc.Generate(\"./schema\", cfg, entc.Extensions(\n entsetorclear.New(),\n // ...other extensions\n))" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w147.json b/.archie/enrichments/w147.json new file mode 100644 index 0000000000..5e1745e0de --- /dev/null +++ b/.archie/enrichments/w147.json @@ -0,0 +1,46 @@ +{ + "pkg/framework/entutils/testutils/ent1/schema": { + "purpose": "Minimal Ent schema fixture used to test the entutils package (mixins, TransactingRepo, TxDriver). The single Example1 schema is the source of truth that the sibling ../db generated client is built from.", + "patterns": [ + { + "name": "Standard Ent schema struct", + "description": "Each entity is a struct embedding ent.Schema and implementing the Mixin/Fields/Indexes/Edges methods, even when some return empty slices.", + "example": "type Example1 struct { ent.Schema }; func (Example1) Fields() []ent.Field { ... }" + }, + { + "name": "Reuse entutils mixins, do not hand-roll timestamps", + "description": "Timestamp/audit fields come from entutils mixins (TimeMixin here), not from manually-declared created_at/updated_at fields.", + "example": "func (Example1) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.TimeMixin{} } }" + }, + { + "name": "String immutable id", + "description": "Primary id is a String field marked Unique().Immutable() rather than an int autoincrement.", + "example": "field.String(\"id\").Unique().Immutable()" + } + ], + "key_file_guides": [ + { + "file": "example1.go", + "role": "Defines the Example1 Ent schema (TimeMixin + string id + example_value_1) used as a fixture for entutils tests.", + "watch_for": "Changing fields requires regenerating ../db via `make generate` (entc.go/generate.go); editing the generated db package directly will be overwritten." + } + ], + "anti_patterns": [ + "Adding production domain fields here \u2014 this is a test fixture, not a real entity; real schemas live in openmeter/ent/schema.", + "Manually adding created_at/updated_at fields instead of using entutils.TimeMixin.", + "Editing the generated ../db client to reflect a schema change instead of running code generation." + ], + "decisions": [ + { + "decision": "Keep a tiny standalone Ent schema separate from the main openmeter schema set.", + "rationale": "entutils transaction/mixin helpers need a generated Ent client to exercise TransactingRepo/TxDriver in isolation without depending on the full application schema." + } + ], + "code_examples": [ + { + "scenario": "Defining an Ent schema fixture with an entutils mixin", + "code": "package schema\n\nimport (\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n)\n\ntype Example1 struct{ ent.Schema }\n\nfunc (Example1) Mixin() []ent.Mixin { return []ent.Mixin{entutils.TimeMixin{}} }\n\nfunc (Example1) Fields() []ent.Field {\n\treturn []ent.Field{\n\t\tfield.String(\"id\").Unique().Immutable(),\n\t\tfield.String(\"example_value_1\"),\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w148.json b/.archie/enrichments/w148.json new file mode 100644 index 0000000000..e0c61905d6 --- /dev/null +++ b/.archie/enrichments/w148.json @@ -0,0 +1,46 @@ +{ + "pkg/framework/entutils/testutils/ent2/schema": { + "purpose": "Test-fixture Ent schema package defining the Example2 entity used to exercise entutils transaction/mixin helpers against a second generated Ent client (ent2). Not production code \u2014 it exists only so testutils can generate db/ and validate cross-client behavior.", + "patterns": [ + { + "name": "Standard Ent schema struct", + "description": "Each entity is a struct embedding ent.Schema with the five Ent hook methods (Mixin, Fields, Indexes, Edges). Empty hooks return empty slices, never nil-by-omission.", + "example": "type Example2 struct { ent.Schema }; func (Example2) Edges() []ent.Edge { return []ent.Edge{} }" + }, + { + "name": "Reuse entutils mixins, don't hand-roll fields", + "description": "Shared columns come from entutils mixins (e.g. entutils.TimeMixin{}) returned from Mixin(), not redeclared as fields. This mirrors production schemas under openmeter/ent/schema.", + "example": "func (Example2) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.TimeMixin{} } }" + }, + { + "name": "Immutable string id", + "description": "The primary key is an explicit field.String(\"id\").Unique().Immutable() rather than a default int id.", + "example": "field.String(\"id\").Unique().Immutable()" + } + ], + "key_file_guides": [ + { + "file": "example2.go", + "role": "Defines the Example2 test entity (id + example_value_2 string field, TimeMixin) consumed by the generated ent2/db client.", + "watch_for": "Field/mixin changes require regenerating ent2/db (the dependent generated package). Keep this aligned with the parallel ent1 fixture so transaction tests cover both clients consistently." + } + ], + "anti_patterns": [ + "Adding business/domain logic here \u2014 this is a throwaway test fixture, not a real schema.", + "Editing the generated ent2/db package by hand instead of changing this schema and regenerating.", + "Returning nil from Indexes()/Edges() instead of empty slices, breaking the established convention." + ], + "decisions": [ + { + "decision": "Schema lives under pkg/framework/entutils/testutils so transaction helpers can be tested without depending on production openmeter/ent schemas.", + "rationale": "Keeps testutils self-contained and avoids import cycles with real domain packages while still exercising real Ent codegen + entutils mixins." + } + ], + "code_examples": [ + { + "scenario": "Defining a fixture Ent entity that pulls shared columns from entutils mixins", + "code": "package schema\n\nimport (\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n)\n\ntype Example2 struct{ ent.Schema }\n\nfunc (Example2) Mixin() []ent.Mixin { return []ent.Mixin{entutils.TimeMixin{}} }\n\nfunc (Example2) Fields() []ent.Field {\n\treturn []ent.Field{\n\t\tfield.String(\"id\").Unique().Immutable(),\n\t\tfield.String(\"example_value_2\"),\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w149.json b/.archie/enrichments/w149.json new file mode 100644 index 0000000000..1d212c2d77 --- /dev/null +++ b/.archie/enrichments/w149.json @@ -0,0 +1,50 @@ +{ + "pkg/framework/transport/httptransport/encoder": { + "purpose": "Defines the two generic function-type contracts the httptransport handler abstraction uses to serialize results and errors to the HTTP wire: ResponseEncoder[Response] and ErrorEncoder. It is a pure type-declaration package with no behavior, consumed by the parent httptransport .With().ServeHTTP handler used across v3 handlers.", + "patterns": [ + { + "name": "Encoders are bare function types, not interfaces", + "description": "Both contracts are declared as named function types so callers pass closures inline rather than implementing structs. ResponseEncoder is generic over the Response type; ErrorEncoder is non-generic.", + "example": "type ResponseEncoder[Response any] func(ctx context.Context, w http.ResponseWriter, r *http.Request, response Response) error" + }, + { + "name": "ErrorEncoder returns bool to signal handled", + "description": "ErrorEncoder returns a bool (true = this encoder handled/wrote the error) so the parent transport can chain encoders and fall through to a default when one declines.", + "example": "type ErrorEncoder func(ctx context.Context, err error, w http.ResponseWriter, r *http.Request) bool" + }, + { + "name": "Stdlib-only, zero dependencies", + "description": "Imports are limited to context and net/http. No project packages, no logging, no models. Keep this package dependency-free so the whole transport layer can import it without cycles.", + "example": "import (\n\t\"context\"\n\t\"net/http\"\n)" + } + ], + "key_file_guides": [ + { + "file": "encoder.go", + "role": "Sole file; declares ResponseEncoder[Response] (returns error) and ErrorEncoder (returns bool). Both take (ctx, w, r) plus a payload.", + "watch_for": "Note the asymmetric return types: ResponseEncoder returns error, ErrorEncoder returns bool. Changing either signature breaks every callsite in pkg/framework/transport/httptransport and downstream v3 handlers." + } + ], + "anti_patterns": [ + "Adding concrete encoder implementations or HTTP-writing logic here \u2014 this package only declares the contracts; implementations live in callers/httptransport.", + "Importing project packages (models, commonhttp, log) \u2014 would introduce an import cycle into the foundational transport layer.", + "Converting the function types to interfaces \u2014 callers rely on passing plain closures." + ], + "decisions": [ + { + "decision": "Split the encoder type contracts into their own leaf package separate from httptransport.", + "rationale": "Keeps the type definitions importable by anything in the transport stack without pulling in the full handler machinery, avoiding cycles." + }, + { + "decision": "ErrorEncoder returns bool rather than error.", + "rationale": "Enables a chain-of-responsibility where each error encoder can decline (false) and let a later/default encoder handle the error." + } + ], + "code_examples": [ + { + "scenario": "Implementing a ResponseEncoder and a fall-through ErrorEncoder", + "code": "var jsonResp encoder.ResponseEncoder[MyDTO] = func(ctx context.Context, w http.ResponseWriter, r *http.Request, response MyDTO) error {\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\treturn json.NewEncoder(w).Encode(response)\n}\n\nvar notFound encoder.ErrorEncoder = func(ctx context.Context, err error, w http.ResponseWriter, r *http.Request) bool {\n\tif !errors.Is(err, ErrNotFound) {\n\t\treturn false // decline; let the next encoder handle it\n\t}\n\tw.WriteHeader(http.StatusNotFound)\n\treturn true\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w15.json b/.archie/enrichments/w15.json new file mode 100644 index 0000000000..f06a437cb7 --- /dev/null +++ b/.archie/enrichments/w15.json @@ -0,0 +1,82 @@ +{ + "openmeter/notification/webhook": { + "purpose": "Defines the transport-agnostic contract for notification webhook delivery: the webhook.Handler interface (Webhook CRUD + Message send/get/resend + EventType registration), input/output domain types, and a typed error taxonomy. Concrete delivery lives in the svix child; noop is the disabled-backend fallback. The root itself is pure interface + types + errors with no Svix dependency.", + "patterns": [ + { + "name": "Handler interface composed from sub-interfaces", + "description": "The public Handler embeds WebhookHandler, MessageHandler, and EventTypeHandler. New delivery operations must be added to one of the three sub-interfaces, not as loose top-level interfaces, so every backend (svix, noop) implements them uniformly.", + "example": "type Handler interface { WebhookHandler; MessageHandler; EventTypeHandler }" + }, + { + "name": "Input structs are models.Validator with joined errors", + "description": "Every *Input type asserts var _ models.Validator = (*XInput)(nil) and its Validate() collects into var errs []error, returning NewValidationError(errors.Join(errs...)). Never return on first invalid field.", + "example": "func (i CreateWebhookInput) Validate() error { var errs []error; if i.URL == \"\" { errs = append(errs, errors.New(\"url is required\")) }; return NewValidationError(errors.Join(errs...)) }" + }, + { + "name": "Typed error constructors + Is* predicates", + "description": "errors.go defines NotFoundError, ValidationError, RetryableError, UnrecoverableError, MessageAlreadyExistsError via New*/Is* pairs over a generic isError[T] using errors.As. Callers classify with the Is* predicates, never type-switch directly.", + "example": "if webhook.IsMessageAlreadyExistsError(err) { /* idempotent skip */ }" + }, + { + "name": "Namespace as first field, threaded everywhere", + "description": "Every Input/output struct (Webhook, Message, SendMessageInput, ...) carries a Namespace string for multi-tenancy; the svix backend maps it directly to the Svix application UID.", + "example": "type SendMessageInput struct { Namespace string; EventID string; ... }" + }, + { + "name": "Event type catalog is centralized constants", + "description": "events.go is the single source of truth for notification event types (NotificationEventTypes slice + EventTypeEntitlements*/EventTypeInvoice* values keyed by GroupName). New event types are registered here, not redefined per backend.", + "example": "var NotificationEventTypes = []EventType{ EventTypeEntitlementsBalanceThreshold, EventTypeEntitlementsReset, EventTypeInvoiceCreated, EventTypeInvoiceUpdated }" + }, + { + "name": "Secret validation delegated to webhook/secret", + "description": "CreateWebhookInput/UpdateWebhookInput.Validate call secret.ValidateSigningSecret for non-empty secrets rather than inlining whsec_ format checks.", + "example": "if err := secret.ValidateSigningSecret(*i.Secret); err != nil { errs = append(errs, fmt.Errorf(\"invalid secret: %w\", err)) }" + }, + { + "name": "Channel cap enforced via shared constant + sentinel error", + "description": "MaxChannelsPerWebhook (10) and ErrMaxChannelsPerWebhookExceeded are defined once here; backends reference them rather than redefining the limit.", + "example": "const MaxChannelsPerWebhook = 10" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Declares the Handler interface (and its three component interfaces) plus all Webhook/Message/EventType domain and Input types with their Validate methods.", + "watch_for": "DeleteWebhookInput is a type alias of GetWebhookInput; Payload is map[string]any. Adding a method here means every implementer (svix, noop) must be updated or the build breaks via their compile-time assertions." + }, + { + "file": "errors.go", + "role": "Typed error taxonomy with New*/Is* helpers built on generic isError[T] (errors.As).", + "watch_for": "All New* constructors return nil when given a nil err. RetryableError defaults to DefaultRetryAfter (15s) when after==0. GetMessage/ResendMessage inputs validate that ID OR EventID is present, not both." + }, + { + "file": "events.go", + "role": "Canonical registry of notification EventType values and the NotificationEventTypes slice used to register types with the delivery backend.", + "watch_for": "FIXME comments note JSON schemas are not yet attached; a new event type must be both declared and appended to NotificationEventTypes or it will not be registered." + } + ], + "anti_patterns": [ + "Adding a webhook operation as a new top-level interface instead of extending WebhookHandler/MessageHandler/EventTypeHandler \u2014 breaks the uniform Handler contract.", + "Returning on the first failed field in a Validate() method instead of joining all errs via errors.Join + NewValidationError.", + "Type-switching on concrete error types instead of using the Is* predicates (IsNotFoundError, IsRetryableError, etc.).", + "Hardcoding the channel limit (10) or whsec_ secret format in callers instead of using MaxChannelsPerWebhook / the secret package.", + "Importing the svix SDK or Svix-specific logic into this root package \u2014 concrete delivery belongs in webhook/svix; this layer stays transport-agnostic." + ], + "decisions": [ + { + "decision": "Split Handler into WebhookHandler + MessageHandler + EventTypeHandler.", + "rationale": "Keeps responsibilities separable so implementers and tests reason about webhook lifecycle, message delivery, and type registration independently while still satisfying one Handler." + }, + { + "decision": "Keep the delivery contract, types, and errors in the root with no Svix dependency.", + "rationale": "Allows noop and svix backends to be swapped via DI (app/common) without callers depending on a specific provider." + } + ], + "code_examples": [ + { + "scenario": "Defining a validated webhook input and classifying the resulting error", + "code": "var _ models.Validator = (*SendMessageInput)(nil)\n\nfunc (i SendMessageInput) Validate() error {\n\tvar errs []error\n\tif i.Namespace == \"\" {\n\t\terrs = append(errs, errors.New(\"namespace is required\"))\n\t}\n\tif len(i.Payload) == 0 {\n\t\terrs = append(errs, errors.New(\"payload must not be empty\"))\n\t}\n\treturn NewValidationError(errors.Join(errs...))\n}\n\n// caller side:\nif _, err := handler.SendMessage(ctx, in); webhook.IsMessageAlreadyExistsError(err) {\n\treturn nil // idempotent\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w150.json b/.archie/enrichments/w150.json new file mode 100644 index 0000000000..cd59beb581 --- /dev/null +++ b/.archie/enrichments/w150.json @@ -0,0 +1,161 @@ +{ + "pkg/kafka/metrics/internal": { + "purpose": "Internal OpenTelemetry metric-instrument wrappers that translate librdkafka statistics (from the sibling stats package) into OTel Int64Gauge recordings for brokers, consumer groups, partitions, and topics. Not importable outside pkg/kafka/metrics (Go internal package).", + "patterns": [ + { + "name": "Struct-of-gauges + New + Add pair", + "description": "Each metric group is a struct holding metric.Int64Gauge fields, constructed by a NewXxxMetrics(meter metric.Meter, ...) (*Xxx, error) constructor and populated by an Add(ctx, stats *stats.Yyy, attrs ...attribute.KeyValue) method. New code must follow this exact triad.", + "example": "type BrokerMetrics struct { State metric.Int64Gauge; ... }; func NewBrokerMetrics(meter, extended) (*BrokerMetrics, error); func (m *BrokerMetrics) Add(ctx, stats, attrs...)" + }, + { + "name": "Gauge creation always wraps errors with the metric name", + "description": "Every meter.Int64Gauge(...) call is immediately followed by an `if err != nil { return nil, fmt.Errorf(\"failed to create metric: : %w\", err) }` guard. Use the exact metric name string in the wrap.", + "example": "m.State, err = meter.Int64Gauge(\"kafka.broker.state\", ...); if err != nil { return nil, fmt.Errorf(\"failed to create metric: kafka.broker.state: %w\", err) }" + }, + { + "name": "Add is nil-safe and attribute-additive", + "description": "Add returns early when stats == nil, then appends identity attributes (node_name/node_id, topic, partition) onto the incoming attrs slice before Record. Sub-metric structs (latency/throttle/message/offset) are only invoked when their pointer field is non-nil.", + "example": "if stats == nil { return }; attrs = append(attrs, attribute.String(\"topic\", stats.Topic)); if m.batchMetrics != nil { m.batchMetrics.Add(ctx, stats, attrs...) }" + }, + { + "name": "Extended-metrics gating via `extended bool`", + "description": "Constructors accept an `extended bool` and only build the heavy sub-metric structs (latency, throttle, batch, message, offset percentiles) when true, leaving those pointer fields nil otherwise. Add then skips nil sub-metrics.", + "example": "if extended { m.latencyMetrics, err = NewBrokerLatencyMetrics(meter); ... m.throttleMetrics, err = NewBrokerThrottleMetrics(meter) }" + }, + { + "name": "Window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999", + "description": "stats.WindowStats fields (Latency, Throttle, BatchSize, BatchCount) map to a fixed set of 11 gauges named *_min/_max/_avg/_sum/_stddev/_p50/_p75/_p90/_p95/_p99/_p9999, each recorded from the matching WindowStats field.", + "example": "m.LatencyP9999.Record(ctx, stats.Latency.P9999, metric.WithAttributes(attrs...))" + }, + { + "name": "Enum stats recorded via .Int64()", + "description": "String-enum stats (BrokerSource, BrokerState, ConsumerGroupState/JoinState) are recorded by calling their .Int64() projection from the stats package, not the raw string.", + "example": "m.State.Record(ctx, stats.State.Int64(), metric.WithAttributes(attrs...))" + }, + { + "name": "Internal partitions are skipped", + "description": "When iterating topic partitions, partitions with Partition < 0 (internal UA/UnAssigned) are skipped before recording partition metrics.", + "example": "for _, partition := range stats.Partitions { if partition.Partition < 0 { continue }; m.partitionMetrics.Add(ctx, &partition, attrs...) }" + } + ], + "key_file_guides": [ + { + "file": "broker.go", + "role": "BrokerMetrics + BrokerLatencyMetrics + BrokerThrottleMetrics; per-broker request/response/connect counters plus optional rtt/throttle percentile windows.", + "watch_for": "Each new gauge needs a matching Record call in Add AND its own error-wrap on construction; the metric name in the fmt.Errorf wrap must match the gauge name (note: a couple of existing wraps reuse kafka.broker.state \u2014 keep names accurate for new code)." + }, + { + "file": "consumergroup.go", + "role": "ConsumerGroupMetrics; consumer-group state/join-state/rebalance/assignment gauges.", + "watch_for": "State and JoinState are recorded via .Int64(); does not append node attributes (unlike broker)." + }, + { + "file": "partition.go", + "role": "PartitionMetrics + PartitionMessageMetrics + PartitionOffsetMetrics; per-partition lag, offsets, queue depths, throughput.", + "watch_for": "Adds attribute.Int64(\"partition\", stats.Partition); offset/message sub-metrics are extended-gated; Add takes *stats.Partition (singular type name), not a slice." + }, + { + "file": "topic.go", + "role": "TopicMetrics + TopicBatchMetrics; topic age/metadata-age plus optional batch size/count windows, and owns the PartitionMetrics for its partitions.", + "watch_for": "partitionMetrics is built unconditionally (NewPartitionMetrics is called regardless of extended); only batchMetrics is extended-gated. Iterates stats.Partitions and skips Partition < 0." + } + ], + "anti_patterns": [ + "Constructing a meter.Int64Gauge without the immediate `if err != nil { return nil, fmt.Errorf(\"failed to create metric: : %w\", err) }` guard", + "Recording an enum stat as a raw string instead of calling its .Int64() projection", + "Calling a sub-metric struct's Add without a nil-pointer check, or forgetting the early `if stats == nil { return }` guard", + "Exporting these helpers for use outside pkg/kafka/metrics \u2014 this is a Go internal package by design", + "Recording the internal partition (Partition < 0) instead of skipping it" + ], + "decisions": [ + { + "decision": "Metrics modeled as Int64Gauge wrappers over the stats package rather than computed in-line", + "rationale": "Cleanly separates librdkafka JSON parsing (stats) from OTel instrument lifecycle (internal), letting the parent metrics package register and feed them on each stats callback." + }, + { + "decision": "Extended/percentile metrics are opt-in via an `extended bool`", + "rationale": "Per-broker/topic/partition percentile histograms are high-cardinality and expensive; default deployments skip them and only build base counters." + } + ], + "code_examples": [ + { + "scenario": "Adding a new gauge to a metric group: construct with error-wrap, record nil-safely with attributes", + "code": "func NewConsumerGroupMetrics(meter metric.Meter) (*ConsumerGroupMetrics, error) {\n\tvar err error\n\tm := &ConsumerGroupMetrics{}\n\tm.State, err = meter.Int64Gauge(\n\t\t\"kafka.consumer_group.state\",\n\t\tmetric.WithDescription(\"Local consumer group handler's state\"),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create metric: kafka.consumer_group.state: %w\", err)\n\t}\n\treturn m, nil\n}\n\nfunc (m *ConsumerGroupMetrics) Add(ctx context.Context, stats *stats.ConsumerGroupStats, attrs ...attribute.KeyValue) {\n\tif stats == nil {\n\t\treturn\n\t}\n\tm.State.Record(ctx, stats.State.Int64(), metric.WithAttributes(attrs...))\n}" + } + ] + }, + "pkg/kafka/metrics/stats": { + "purpose": "Plain Go structs that unmarshal librdkafka's STATISTICS.md JSON (the rdkafka stats callback payload) into typed BrokerStats/TopicStats/Partition/ConsumerGroupStats/Stats, with string-enum types that expose stable .Int64() codes for metric recording. Pure data/parsing layer with no OTel dependency.", + "patterns": [ + { + "name": "Struct fields map librdkafka JSON keys via json tags", + "description": "Every field carries a `json:\"...\"` tag matching librdkafka's stats schema (e.g. RequestsSent int64 `json:\"tx\"`, MessagesInQueue `json:\"msgq_cnt\"`). Field names are human-readable; tags are the cryptic rdkafka keys. New fields must use the exact rdkafka key from STATISTICS.md.", + "example": "RequestsAwaitingTransmission int64 `json:\"outbuf_cnt\"`" + }, + { + "name": "String enums with UnmarshalJSON + Int64 projection", + "description": "Enum types (BrokerSource, BrokerState, ConsumerGroupState, ConsumerGroupJoinState) are `type X string` with const values, a case-insensitive UnmarshalJSON (strings.ToLower(strings.TrimSpace(value))) defaulting to the Unknown variant, and an Int64() method returning a fixed integer code (Unknown => -1).", + "example": "func (s BrokerState) Int64() int64 { switch s { case BrokerStateUp: i = 6; ...; default: i = -1 }; return i }" + }, + { + "name": "WindowStats for rolling percentile windows", + "description": "Any rolling-window stat (rtt, throttle, batch_size, batch_count) is typed as WindowStats with Min/Max/Avg/Sum/Count/StdDev/P50..P9999 fields. The p99.99 field tag is `json:\"p99_99\"`.", + "example": "Latency WindowStats `json:\"rtt\"`; Throttle WindowStats `json:\"throttle\"`" + }, + { + "name": "Nested collections keyed by string", + "description": "Aggregates use map[string]T for child collections: Stats.Brokers map[string]BrokerStats, Stats.Topics map[string]TopicStats, TopicStats.Partitions map[string]Partition, keyed by rdkafka's string identifiers (broker name, topic name, partition id as string).", + "example": "Topics map[string]TopicStats `json:\"topics\"`" + } + ], + "key_file_guides": [ + { + "file": "stats.go", + "role": "Top-level Stats struct (the full rdkafka payload root) plus the shared WindowStats type used for all percentile windows.", + "watch_for": "Stats is the unmarshal entrypoint; WindowStats.P9999 maps to json key `p99_99`, not `p9999`." + }, + { + "file": "broker.go", + "role": "BrokerStats plus BrokerSource and BrokerState enums (with UnmarshalJSON + Int64).", + "watch_for": "BrokerState.Int64 maps up=6/update=7 and unknown=-1; keep the int codes stable since internal/broker.go documents them in metric descriptions." + }, + { + "file": "consumergroup.go", + "role": "ConsumerGroupStats plus ConsumerGroupState and ConsumerGroupJoinState enums.", + "watch_for": "JoinState has 9 variants (init..steady, codes 0-8); the wait-incr-unassign-to-complete json value is abbreviated, not the full Go const name." + }, + { + "file": "topic.go", + "role": "TopicStats and Partition structs (no enums). Partition holds offsets, lag, queue depths, throughput.", + "watch_for": "Partition id -1 denotes the internal UA/UnAssigned partition (callers in internal/ skip it); offset fields like StoredOffset use librdkafka sentinel -1001." + }, + { + "file": "stats_test.go", + "role": "Round-trip test unmarshalling testdata/stats.json and asserting broker/topic/partition fields.", + "watch_for": "Uses //go:embed testdata/stats.json; new fields with parsing logic should be asserted here against a representative payload." + } + ], + "anti_patterns": [ + "Adding a field without the correct librdkafka json tag (the Go field name will silently not bind to the rdkafka key)", + "Adding an enum variant without updating both UnmarshalJSON (lowercase value) and Int64() (stable code), or omitting the default->Unknown/-1 case", + "Changing an existing enum Int64() code \u2014 the integer mappings are documented in internal/ metric descriptions and consumed downstream", + "Importing OTel or any metric machinery here \u2014 this package is pure data and must stay dependency-light" + ], + "decisions": [ + { + "decision": "librdkafka stats are modeled as typed Go structs with explicit json tags rather than a generic map", + "rationale": "Gives type-safe access and self-documenting field names while still binding to librdkafka's terse STATISTICS.md keys." + }, + { + "decision": "Enums carry an Int64() projection alongside string values", + "rationale": "OTel gauges are numeric, so the sibling internal package records enum state as a stable integer code; keeping the projection on the type centralizes the mapping." + } + ], + "code_examples": [ + { + "scenario": "Defining a librdkafka string enum with case-insensitive unmarshal and numeric projection", + "code": "type BrokerState string\n\nconst (\n\tBrokerStateUnknown BrokerState = \"unknown\"\n\tBrokerStateUp BrokerState = \"up\"\n)\n\nfunc (s *BrokerState) UnmarshalJSON(data []byte) error {\n\tvar value string\n\tif err := json.Unmarshal(data, &value); err != nil {\n\t\treturn fmt.Errorf(\"failed to unmarshal value: %s\", data)\n\t}\n\tswitch strings.ToLower(strings.TrimSpace(value)) {\n\tcase \"up\":\n\t\t*s = BrokerStateUp\n\tdefault:\n\t\t*s = BrokerStateUnknown\n\t}\n\treturn nil\n}\n\nfunc (s BrokerState) Int64() int64 {\n\tswitch s {\n\tcase BrokerStateUp:\n\t\treturn 6\n\tdefault:\n\t\treturn -1\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w151.json b/.archie/enrichments/w151.json new file mode 100644 index 0000000000..18c0d4bcd3 --- /dev/null +++ b/.archie/enrichments/w151.json @@ -0,0 +1,51 @@ +{ + "pkg/models/http": { + "purpose": "Tiny conversion layer that maps the domain types models.Annotations and models.Metadata to/from their generated api.* counterparts. Exists so HTTP handlers (e.g. openmeter/meter/httphandler) translate annotation/metadata bags without redefining the cast at every call site.", + "patterns": [ + { + "name": "FromX / AsX directional naming", + "description": "Domain->API conversion is named From* (returns *api.T); API->domain conversion is named As* (returns models.T). Follow this paired naming for any new type added here.", + "example": "func FromAnnotations(a models.Annotations) *api.Annotations; func AsAnnotations(a *api.Annotations) models.Annotations" + }, + { + "name": "Identical underlying type cast, not field copy", + "description": "models.Annotations and api.Annotations share the same underlying type, so conversion is a direct Go type conversion `(api.Annotations)(x)` wrapped with lo.ToPtr \u2014 never a manual field-by-field build.", + "example": "return lo.ToPtr((api.Annotations)(annotations))" + }, + { + "name": "Nil-guard on pointer inputs", + "description": "As* functions take a pointer and must return nil (the zero map) when the input pointer is nil before dereferencing.", + "example": "if annotations == nil { return nil }" + } + ], + "key_file_guides": [ + { + "file": "annotation.go", + "role": "FromAnnotations / AsAnnotations converting between models.Annotations and *api.Annotations.", + "watch_for": "AsAnnotations must nil-check before dereferencing *annotations or it panics on a nil pointer." + }, + { + "file": "metadata.go", + "role": "FromMetadata / AsMetadata converting between models.Metadata and *api.Metadata.", + "watch_for": "Same nil-guard requirement as annotation.go; the two files are structurally identical and should stay in lockstep." + } + ], + "anti_patterns": [ + "Manually copying map entries instead of a single underlying-type conversion \u2014 breaks the assumption that the domain and api types are byte-identical.", + "Omitting the nil pointer guard in As* functions, causing a nil-dereference panic.", + "Using ad-hoc names (ConvertAnnotations, ToModel) instead of the From*/As* convention used here and in the go-types-conversion skill." + ], + "decisions": [ + { + "decision": "Keep these casts in a shared pkg/models/http package rather than inline in each handler.", + "rationale": "Annotations/Metadata appear across many HTTP handlers; centralizing the trivial cast keeps the From*/As* naming consistent and avoids re-deriving the type-conversion at each site." + } + ], + "code_examples": [ + { + "scenario": "Adding a new annotation/metadata-style conversion in this package.", + "code": "import (\n\t\"github.com/samber/lo\"\n\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nfunc FromMetadata(metadata models.Metadata) *api.Metadata {\n\treturn lo.ToPtr((api.Metadata)(metadata))\n}\n\nfunc AsMetadata(metadata *api.Metadata) models.Metadata {\n\tif metadata == nil {\n\t\treturn nil\n\t}\n\treturn (models.Metadata)(*metadata)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w152.json b/.archie/enrichments/w152.json new file mode 100644 index 0000000000..b2ee84fbc8 --- /dev/null +++ b/.archie/enrichments/w152.json @@ -0,0 +1,86 @@ +{ + "pkg/pagination/v2": { + "purpose": "Cursor-based (keyset) pagination primitives. Provides an opaque base64 Cursor (time+ID), a generic Paginator[T] interface backed by a closure, a Result[T] page wrapper, and CollectAll to drain a paginator across pages. This is the v2 cursor pagination model distinct from the older offset/limit pagination in pkg/pagination.", + "patterns": [ + { + "name": "Cursor is always UTC-normalized", + "description": "NewCursor stores Time as t.UTC(); Encode re-applies .UTC() before formatting. Two cursors for the same instant in different zones must encode identically.", + "example": "cursor := NewCursor(nyTime, \"id\") // cursor.Time == nyTime.UTC()" + }, + { + "name": "Cursor wire format is base64(,)", + "description": "Encode/Decode use cursorDelimiter \",\" and SplitN(...,2) so the ID may itself contain commas. Never hand-construct the encoded string; round-trip via Encode/DecodeCursor.", + "example": "encoded := c.Encode(); c2, err := DecodeCursor(encoded)" + }, + { + "name": "Cursor implements encoding.Text(Un)Marshaler", + "description": "MarshalText delegates to Encode, UnmarshalText to the decode path. EncodePtr returns nil for a nil receiver so it maps cleanly to optional API fields.", + "example": "nextCursor := result.NextCursor.EncodePtr() // *string, nil-safe" + }, + { + "name": "Paginate via NewPaginator closure, not a custom struct", + "description": "Paginator[T] is a one-method interface; NewPaginator wraps a func(ctx, *Cursor) (Result[T], error). Implement pagination by supplying the closure rather than defining new Paginator types.", + "example": "p := NewPaginator[int](func(ctx context.Context, cur *Cursor) (Result[int], error) { ... })" + }, + { + "name": "NextCursor derived from last item's Cursor()", + "description": "NewResult requires T to implement Item (Cursor() Cursor) and sets NextCursor from the last item, or nil for an empty page. Items signal end-of-data by returning Result with NextCursor==nil.", + "example": "func (i TestItem) Cursor() Cursor { return NewCursor(i.CreatedAt, i.ID) }" + }, + { + "name": "CollectAll is bounded and error-tolerant", + "description": "CollectAll loops at most MAX_SAFE_ITER (10_000) pages, copies the incoming cursor defensively, stops when NextCursor==nil, and on error returns the items gathered so far alongside the error (not nil).", + "example": "all, err := CollectAll[T](ctx, paginator, cursor) // partial 'all' usable even when err != nil" + } + ], + "key_file_guides": [ + { + "file": "cursor.go", + "role": "Cursor{Time,ID} value type: NewCursor, Validate, Encode/EncodePtr, DecodeCursor, MarshalText/UnmarshalText.", + "watch_for": "Encode forces UTC and uses time.RFC3339 (second precision) \u2014 sub-second time is lost across a round trip. Validate rejects zero Time and empty ID." + }, + { + "file": "pagination.go", + "role": "Item interface (Cursor() Cursor), Paginator[T] interface, and NewPaginator closure constructor.", + "watch_for": "paginator[T] is unexported; the only construction path is NewPaginator. Don't add parallel Paginator implementations unless genuinely needed." + }, + { + "file": "result.go", + "role": "Result[T]{Items, NextCursor} page struct and NewResult constructor (T constrained to Item).", + "watch_for": "NewResult's NextCursor is the LAST item's own cursor \u2014 it is an inclusive keyset marker, not an exclusive offset. Empty input yields nil NextCursor." + }, + { + "file": "collect.go", + "role": "CollectAll generic drain loop with MAX_SAFE_ITER cap and defensive cursor copy.", + "watch_for": "An always-non-nil NextCursor paginator silently caps at 10_000 items with no error; ensure terminating conditions set NextCursor==nil." + } + ], + "anti_patterns": [ + "Constructing or parsing the encoded cursor string manually instead of via Encode/DecodeCursor (breaks base64 + comma-in-ID handling).", + "Storing or comparing Cursor.Time in a non-UTC zone \u2014 breaks encode stability and equality assertions.", + "Relying on sub-second precision surviving Encode/Decode (RFC3339 truncates to seconds).", + "Defining a new Paginator[T] struct instead of NewPaginator; or building offset-style pagination here (that belongs in the v1 pkg/pagination).", + "Assuming CollectAll returns nil items on error \u2014 it returns the partially collected slice." + ], + "decisions": [ + { + "decision": "Cursor encodes time+ID and is UTC-normalized + base64.", + "rationale": "Keyset pagination needs a stable, opaque, zone-independent ordering token safe to pass over HTTP query params." + }, + { + "decision": "CollectAll returns gathered items together with any mid-stream error.", + "rationale": "Callers can use partial results and still surface the failure, rather than losing already-fetched pages." + }, + { + "decision": "Paginator is a closure-backed generic interface.", + "rationale": "Lets each call site supply its own page-fetch logic without a bespoke type, keeping the package a pure utility." + } + ], + "code_examples": [ + { + "scenario": "Build a paginator and drain all pages with CollectAll", + "code": "p := pagination.NewPaginator[int](func(ctx context.Context, cur *pagination.Cursor) (pagination.Result[int], error) {\n page, next, err := fetchPage(ctx, cur)\n if err != nil {\n return pagination.Result[int]{}, err\n }\n return pagination.Result[int]{Items: page, NextCursor: next}, nil\n})\n\nall, err := pagination.CollectAll[int](ctx, p, nil)\nif err != nil {\n // 'all' still holds items collected before the failure\n return all, err\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w153.json b/.archie/enrichments/w153.json new file mode 100644 index 0000000000..d458474911 --- /dev/null +++ b/.archie/enrichments/w153.json @@ -0,0 +1,371 @@ +{ + "test/billing": { + "purpose": "Integration test suite for the billing domain (package `billing`), exercising invoice lifecycle, profiles, customer overrides, tax config, line splitting, and subscription-to-billing sync against a real Postgres database. The shared `BaseSuite` constructs the full billing stack from concrete constructors (not app/common wiring) so tests run end-to-end through `BillingService`/`BillingAdapter`.", + "patterns": [ + { + "name": "Embed BaseSuite, run with testify/suite", + "description": "Every test file declares `type XxxTestSuite struct { BaseSuite }` and a `func TestXxx(t *testing.T) { suite.Run(t, new(XxxTestSuite)) }`. BaseSuite.SetupSuite wires the entire stack; do not re-wire services per test.", + "example": "type BillingAdapterTestSuite struct { BaseSuite }; func TestBillingAdapter(t *testing.T){ suite.Run(t, new(BillingAdapterTestSuite)) }" + }, + { + "name": "Stack built from concrete constructors", + "description": "setupSuite calls billingservice.New, billingadapter.New, customerservice.New, appservice.New, taxcodeservice.New, meteradapter.New (mockadapter), streamingtestutils.NewMockStreamingConnector directly \u2014 never app/common DI. Add new deps the same way.", + "example": "billingService, err := billingservice.New(billingservice.Config{Adapter: billingAdapter, RatingService: billingratingservice.New(), CustomerService: s.CustomerService, AppService: s.AppService, TaxCodeService: taxCodeService, ...})" + }, + { + "name": "Per-test namespace + provisioning sequence", + "description": "Each test creates an isolated namespace, then InstallSandboxApp(ns), CreateTestCustomer(ns, key), and ProvisionBillingProfile(ctx, ns, app.GetID(), opts...). Use s.GetUniqueNamespace(prefix) for ULID-suffixed uniqueness across parallel suites.", + "example": "sandboxApp := s.InstallSandboxApp(s.T(), ns); cust := s.CreateTestCustomer(ns, \"test\"); s.ProvisionBillingProfile(ctx, ns, sandboxApp.GetID(), WithProgressiveBilling())" + }, + { + "name": "Drive behavior via BillingService, not the adapter", + "description": "Lifecycle is exercised through CreatePendingInvoiceLines, InvoicePendingLines, UpdateProfile, UpsertCustomerOverride, UpdateStandardInvoice (with EditFn). BillingAdapter is used directly only in adapter_test.go.", + "example": "res, err := s.BillingService.CreatePendingInvoiceLines(ctx, billing.CreatePendingInvoiceLinesInput{Customer: cust.GetID(), Currency: currencyx.Code(currency.USD), Lines: []billing.GatheringLine{...}})" + }, + { + "name": "Deterministic clock with paired reset", + "description": "Tests that depend on time use clock.SetTime(...) with `defer clock.ResetTime()` (or clock.FreezeTime + clock.UnFreeze). BaseSuite.TearDownTest also calls clock.UnFreeze/ResetTime as a safety net.", + "example": "clock.SetTime(lo.Must(time.Parse(time.RFC3339, \"2025-01-01T00:00:00Z\"))); defer clock.ResetTime()" + }, + { + "name": "Mock streaming for usage", + "description": "Usage is injected via s.MockStreamingConnector.AddSimpleEvent(meterSlug, value, at) with explicit timestamps, and reset with defer s.MockStreamingConnector.Reset(). Meters are registered through s.MeterAdapter.ReplaceMeters.", + "example": "s.MockStreamingConnector.AddSimpleEvent(meterSlug, 100, now.Add(time.Minute)); defer s.MockStreamingConnector.Reset()" + }, + { + "name": "Decimal assertions via InexactFloat64", + "description": "alpacadecimal.Decimal comparisons use require.Equal(t, float64(N), actual.InexactFloat64()); totals are checked with the requireTotals(t, expectedTotals{...}, line.Totals) helper.", + "example": "s.Equal(float64(100), detailedLine.PerUnitAmount.InexactFloat64())" + } + ], + "key_file_guides": [ + { + "file": "suite.go", + "role": "BaseSuite: TestDB/DBClient, BillingService, BillingAdapter, InvoiceCalculator (MockableInvoiceCalculator), CustomerService, AppService, SandboxApp, TaxCodeService; helpers InstallSandboxApp, CreateTestCustomer, GetUniqueNamespace, DebugDumpInvoice, CreateGatheringInvoice", + "watch_for": "setupSuite honors TEST_DISABLE_ATLAS (schema.Create vs atlas migrate). Hooks (subject/customer/entitlement) are registered here; missing a hook breaks cross-domain side effects." + }, + { + "file": "subscription_suite.go", + "role": "SubscriptionMixin + SubscriptionMixInDependencies: builds plan/subscription/addon/workflow/entitlement services via SetupSuite(t, deps). Get deps from BaseSuite.GetSubscriptionMixInDependencies()", + "watch_for": "deps.Validate() requires DBClient, FeatureRepo, FeatureService, CustomerService, MeterAdapter, MockStreamingConnector all non-nil. MultiSubscriptionEnabledFF is forced true here via ffx.NewStaticService." + }, + { + "file": "profile.go", + "role": "minimalCreateProfileInputTemplate(appID) \u2014 canonical CreateProfileInput with PT0S collection interval, AutoAdvance, AlignmentKindSubscription", + "watch_for": "Collection interval is PT0S (immediate) by design; collection tests must override it." + }, + { + "file": "adapter_test.go", + "role": "Direct BillingAdapter tests (CreateInvoice, detailed-line ID reuse via DetailedLinesWithIDReuse, ChildUniqueReferenceID)", + "watch_for": "Only file allowed to call BillingAdapter directly; constructs StandardLine/DetailedLine fixtures by hand." + }, + { + "file": "tax_test.go", + "role": "Tax config snapshotting through profile/override/invoice, line-splitting tax retention", + "watch_for": "Verifies normalized tax_code_id / tax_behavior DB columns via s.DBClient.BillingInvoiceLine.Query(), not just JSONB." + }, + { + "file": "taxcode_dual_write_test.go", + "role": "TaxCode FK dual-write/dual-read regression matrix (Group A profiles, Group B overrides) using assertTaxConfigHasStripeCode / assertInvoiceLineTaxCode", + "watch_for": "Stale-FK regressions: clearing Stripe must clear TaxCodeID; bare TaxCodeID without Stripe.Code is an intentional migration-path input that backfills Stripe.Code." + }, + { + "file": "ubpflatfee_test.go", + "role": "Usage-based flat-fee line creation, percentage discounts, validations", + "watch_for": "Uses billing.NewFlatFeeGatheringLine(billing.NewFlatFeeLineInput{...}); ExpectJSONEqual on WithoutDBState() to compare lines ignoring DB-assigned fields." + }, + { + "file": "schemamigration_test.go", + "role": "Migration-oriented tests manipulating detailed child lines (markAllDetailedChildrenDeleted)", + "watch_for": "May force atlas via SetupSuiteOptions{ForceAtlas:true}; exercises real migration SQL." + } + ], + "anti_patterns": [ + "Wiring billing services through app/common DI instead of the concrete *.New constructors used in suite.go (can create test-only import cycles).", + "Calling BillingAdapter directly outside adapter_test.go instead of going through BillingService.", + "Using clock.SetTime/FreezeTime without a paired defer clock.ResetTime()/UnFreeze() \u2014 leaks frozen time into later subtests.", + "Reusing a fixed namespace string across parallel suites instead of GetUniqueNamespace; namespaces collide and tests flake.", + "Asserting decimals with expected.Equal(actual) booleans instead of InexactFloat64() / requireTotals." + ], + "decisions": [ + { + "decision": "BaseSuite assembles the whole billing stack from package constructors", + "rationale": "Tests must run the real service/adapter/rating paths end-to-end against Postgres while staying independent of the application wiring layer to avoid import cycles." + }, + { + "decision": "Subscription dependencies are a separate SubscriptionMixin", + "rationale": "Not every billing test needs the heavyweight subscription/plan/entitlement stack; mixin keeps base setup lean and shares deps explicitly." + }, + { + "decision": "Streaming and meters are mocked, Postgres is real", + "rationale": "Usage and meter lookups are deterministic via MockStreamingConnector while invoice/line persistence is validated against the actual schema and migrations." + } + ], + "code_examples": [ + { + "scenario": "Provision a customer+profile and assert a usage-based flat-fee invoice line", + "code": "func (s *UBPFlatFeeLineTestSuite) TestPendingLineCreation() {\n ns := \"ns-ubpff\"; ctx := context.Background()\n clock.SetTime(lo.Must(time.Parse(time.RFC3339, \"2025-01-01T00:00:00Z\"))); defer clock.ResetTime()\n sandboxApp := s.InstallSandboxApp(s.T(), ns)\n cust := s.CreateTestCustomer(ns, \"test\")\n s.ProvisionBillingProfile(ctx, ns, sandboxApp.GetID(), WithProgressiveBilling())\n res, err := s.BillingService.CreatePendingInvoiceLines(ctx, billing.CreatePendingInvoiceLinesInput{\n Customer: cust.GetID(), Currency: \"USD\",\n Lines: []billing.GatheringLine{billing.NewFlatFeeGatheringLine(billing.NewFlatFeeLineInput{\n Period: timeutil.ClosedPeriod{From: clock.Now(), To: clock.Now().Add(24*time.Hour)},\n InvoiceAt: clock.Now().Add(24*time.Hour), PerUnitAmount: alpacadecimal.NewFromInt(100),\n PaymentTerm: productcatalog.InArrearsPaymentTerm,\n })},\n })\n s.NoError(err); s.NotNil(res)\n}" + } + ] + }, + "test/credits": { + "purpose": "Integration test suite (package `credits`) for the ledger-backed credit + charges system, validating credit purchases, credit-then-invoice settlement, revenue recognition, breakage, and FBO/receivable balances. Its BaseSuite embeds test/billing.BaseSuite and layers the full ledger/charges stack on top.", + "patterns": [ + { + "name": "Embed billingtest.BaseSuite, extend in SetupSuite", + "description": "credits BaseSuite embeds billingtest.BaseSuite; its SetupSuite first calls s.BaseSuite.SetupSuite() then builds ledger/charges services from ledgertestutils.InitDeps(s.DBClient, logger) and chargestestutils.NewServices.", + "example": "func (s *BaseSuite) SetupSuite(){ s.BaseSuite.SetupSuite(); deps, err := ledgertestutils.InitDeps(s.DBClient, logger); ... }" + }, + { + "name": "Build charges stack via chargestestutils.NewServices", + "description": "Charges, CreditPurchaseSvc, UsageBasedSvc come from chargestestutils.NewServices(t, Config{...}) wired with ledger charge handlers (NewFlatFeeHandler, NewCreditPurchaseHandler, NewUsageBasedHandler) and transactions.ResolverDependencies.", + "example": "stack, err := chargestestutils.NewServices(s.T(), chargestestutils.Config{Client: s.DBClient, BillingService: s.BillingService, FlatFeeHandler: flatFeeHandler, CreditPurchaseHandler: creditPurchaseHandler, UsageBasedHandler: ...})" + }, + { + "name": "Ledger-backed customers need explicit account provisioning", + "description": "Use CreateLedgerBackedCustomer(ns, key): it calls LedgerResolver.EnsureBusinessAccounts then CreateTestCustomer then LedgerResolver.CreateCustomerAccounts. A plain CreateTestCustomer has no ledger accounts.", + "example": "cust := s.CreateLedgerBackedCustomer(ns, \"test\")" + }, + { + "name": "ChargeIntent via CreateMockChargeIntent", + "description": "Charge intents are assembled by CreateMockChargeIntent(CreateMockChargeIntentInput{...}) which validates inputs, derives invoiceAt from payment term, and builds flatfee.Intent or usagebased.Intent wrapped by charges.NewChargeIntent. Default settlement is CreditThenInvoiceSettlementMode.", + "example": "intent := s.CreateMockChargeIntent(CreateMockChargeIntentInput{Customer: cust.GetID(), Currency: USD, ServicePeriod: period, Price: productcatalog.NewPriceFrom(...)})" + }, + { + "name": "Balance assertions via Must* helpers with mo.Option cost basis", + "description": "Balances are read through MustCustomerFBOBalance / MustCustomerReceivableBalance (+ ...WithPriority/AsOf/ForFeatures/ForTaxCode variants). Cost-basis arg is mo.Option[*alpacadecimal.Decimal]: mo.None()=all, mo.Some(nil)=nil-cost-basis route, mo.Some(&v)=one route.", + "example": "bal := s.MustCustomerFBOBalance(cust.GetID(), USD, mo.None[*alpacadecimal.Decimal]())" + }, + { + "name": "Reset streaming + clock in TearDownTest", + "description": "credits BaseSuite.TearDownTest calls s.MockStreamingConnector.Reset(), clock.UnFreeze(), clock.ResetTime(); per-test clock/streaming changes still need their own defers.", + "example": "func (s *BaseSuite) TearDownTest(){ s.MockStreamingConnector.Reset(); clock.UnFreeze(); clock.ResetTime() }" + } + ], + "key_file_guides": [ + { + "file": "base.go", + "role": "credits BaseSuite (embeds billingtest.BaseSuite) with Charges, CreditPurchaseSvc, UsageBasedSvc, CustomerBalanceSvc, Ledger, BalanceQuerier, LedgerAccountService, LedgerResolver, BreakageService, RevenueRecognizer; helpers CreateMockChargeIntent, CreateLedgerBackedCustomer, Must*Balance", + "watch_for": "ledgertestutils.InitDeps returns HistoricalLedger used as both Ledger and BalanceQuerier; resolver vs account-service roles in transactions.ResolverDependencies are distinct (AccountService=ResolversService, AccountCatalog=AccountService)." + }, + { + "file": "credit_then_invoice_test.go", + "role": "Exercises the credit-then-invoice settlement lifecycle end-to-end", + "watch_for": "Drive via Charges.Create/AdvanceCharges/ApplyPatches and CreditPurchaseSvc, not low-level ledger adapters." + }, + { + "file": "creditgrant_test.go", + "role": "Credit grant / purchase scenarios and resulting FBO balances", + "watch_for": "Assert balances with the mo.Option cost-basis conventions." + }, + { + "file": "rating_test.go", + "role": "Rating-backed charge fixtures (production rating path)", + "watch_for": "Prefer rating-backed fixtures over hand-built charges where the real path can express the scenario." + }, + { + "file": "sanity_lifecycle_test.go", + "role": "Broad lifecycle sanity checks across credit + charge phases", + "watch_for": "Late-arriving usage modeled via MockStreamingConnector with explicit StoredAt to exercise stored-at cutoff in finalization." + } + ], + "anti_patterns": [ + "Calling ledger or charge adapters directly instead of Charges.Service / CreditPurchaseSvc / UsageBasedSvc.", + "Using CreateTestCustomer for ledger scenarios \u2014 it lacks FBO/receivable accounts; use CreateLedgerBackedCustomer.", + "Passing a raw decimal where a cost-basis mo.Option is expected (mo.None vs mo.Some(nil) vs mo.Some(&v) mean different balance routes).", + "Re-wiring the billing stack instead of reusing the embedded billingtest.BaseSuite.SetupSuite().", + "Forgetting per-test streaming reset / clock reset on top of the suite-level TearDownTest." + ], + "decisions": [ + { + "decision": "credits BaseSuite embeds the billing BaseSuite", + "rationale": "Credits/charges sit on top of billing invoices; reusing the billing stack avoids duplicating customer/profile/invoice wiring and keeps both domains consistent." + }, + { + "decision": "Ledger deps come from ledgertestutils.InitDeps + chargestestutils.NewServices", + "rationale": "Keeps test wiring aligned with the production ledger/charges construction while staying independent from app/common DI." + } + ], + "code_examples": [ + { + "scenario": "Set up a ledger-backed customer and create a charge intent", + "code": "func (s *BaseSuite) example(ns string, period timeutil.ClosedPeriod) {\n cust := s.CreateLedgerBackedCustomer(ns, \"test\")\n intent := s.CreateMockChargeIntent(CreateMockChargeIntentInput{\n Customer: cust.GetID(), Currency: USD, ServicePeriod: period,\n Price: productcatalog.NewPriceFrom(productcatalog.FlatPrice{\n Amount: alpacadecimal.NewFromInt(100), PaymentTerm: productcatalog.InAdvancePaymentTerm,\n }),\n })\n _ = intent\n bal := s.MustCustomerFBOBalance(cust.GetID(), USD, mo.None[*alpacadecimal.Decimal]())\n _ = bal\n}" + } + ] + }, + "test/customer": { + "purpose": "Integration test suite (package `customer`) for the customer domain and its cross-cutting interactions with subjects, subscriptions, entitlements, and billing. Tests run against a real Postgres DB through an interface-based TestEnv rather than testify suites.", + "patterns": [ + { + "name": "Interface-based TestEnv accessor, not embedded suite", + "description": "TestEnv is an interface exposing App(), Customer(), Subscription(), SubscriptionWorkflow(), Entitlement(), Feature(), Subject(), Plan(), Billing(), Meter(), Close(). Test methods read services via s.Env.Customer() etc.; CustomerHandlerTestSuite just holds an Env + namespace.", + "example": "service := s.Env.Customer(); subj, err := s.Env.Subject().GetByKey(ctx, models.NamespacedKey{...})" + }, + { + "name": "Single Test func drives subtests with explicit ctx", + "description": "One TestCustomer(t) creates the env via NewTestEnv(t, ctx), defers env.Close(), then runs named subtests by calling suite methods with the signature (ctx context.Context, t *testing.T). No suite.Run.", + "example": "t.Run(\"TestCreate\", func(t *testing.T){ testSuite.TestCreate(ctx, t) })" + }, + { + "name": "Fresh ULID namespace per test method", + "description": "Each suite method begins with s.setupNamespace(t) which sets s.namespace = ulid.Make().String(); shared test constants (TestKey, TestName, TestAddress, TestSubjectKeys) are package vars.", + "example": "func (s *CustomerHandlerTestSuite) TestCreate(ctx, t){ s.setupNamespace(t); ... }" + }, + { + "name": "Customer<->subject hooks wired in NewTestEnv", + "description": "NewTestEnv registers SubjectCustomerHook and CustomerSubjectHook so creating a customer materializes subjects and vice versa; CustomerOverride is a noopCustomerOverrideService (no billing override side effects here).", + "example": "customerService.RegisterHooks(customerSubjectHook); subjectService.RegisterHooks(subjectCustomerHook)" + }, + { + "name": "Conflict assertions via typed error checks", + "description": "Key/subject conflicts are asserted with customer.IsSubjectKeyConflictError(err) and models.IsGenericConflictError(err) rather than string matching.", + "example": "require.True(t, models.IsGenericConflictError(err), \"key overlaps with subject\")" + }, + { + "name": "DB deps from subscriptiontestutils.SetupDBDeps", + "description": "Postgres/ent client comes from subscriptiontestutils.SetupDBDeps(t); env.Close() runs dbDeps.Cleanup(t). Real meter adapter (meter/adapter) is used, with MockStreamingConnector for usage.", + "example": "dbDeps := subscriptiontestutils.SetupDBDeps(t); closerFunc := func() error { dbDeps.Cleanup(t); return nil }" + } + ], + "key_file_guides": [ + { + "file": "testenv.go", + "role": "TestEnv interface + testEnv impl + NewTestEnv(t, ctx): wires app/customer/subject/entitlement/feature/plan/billing/subscription/meter from concrete constructors; registers customer/subject hooks and request validators (entitlement, subscription customer)", + "watch_for": "MultiSubscriptionEnabledFF is false here (ffx.NewTestContextService). CustomerOverride hook uses noopCustomerOverrideService \u2014 billing-override side effects are intentionally absent." + }, + { + "file": "customer.go", + "role": "CustomerHandlerTestSuite + TestCreate/TestUpdate/TestUpdateWithSubscriptionPresent; package-level Test* fixtures (TestKey, TestAddress, TestSubjectKeys)", + "watch_for": "UsageAttribution is nil when there are no subject keys (asserted repeatedly). Updating a customer that has a subscription cannot change UsageAttribution." + }, + { + "file": "subject.go", + "role": "TestSubjectDeletion (dangling vs attributed subjects) and TestMultiSubjectIntegrationFlow (full meter+feature+plan+subscription+invoice flow)", + "watch_for": "Deleting a dangling subject is allowed; deleting an attributed subject removes it from usage attribution (leaving UsageAttribution nil), and must not error even with entitlements present." + }, + { + "file": "customer_test.go", + "role": "Entry-point TestCustomer wiring env and dispatching Customer + Subject subtests", + "watch_for": "Single shared env across all subtests; namespaces isolate them, so do not assume a clean DB per subtest." + }, + { + "file": "subject.go", + "role": "Cross-domain integration via s.installSandboxApp / s.createDefaultProfile helpers", + "watch_for": "Uses subscriptionworkflow.CreateFromPlan and plansubscriptionservice.PlanFromPlan; relies on clock.SetTime + t.Cleanup(clock.ResetTime)." + } + ], + "anti_patterns": [ + "Reaching for testify/suite.Run \u2014 this package uses a plain TestCustomer with method dispatch and an interface TestEnv.", + "Sharing a hardcoded namespace instead of calling setupNamespace (ULID) at the top of each test method.", + "Asserting conflicts by error string instead of customer.IsSubjectKeyConflictError / models.IsGenericConflictError.", + "Expecting an empty UsageAttribution struct \u2014 it is nil when no subject keys exist.", + "Forgetting defer env.Close() (dbDeps.Cleanup) \u2014 leaks the test database." + ], + "decisions": [ + { + "decision": "TestEnv is an interface with one shared instance per Test func", + "rationale": "Customer tests need many collaborating services (subject, entitlement, subscription, billing); a single wired env with namespace isolation is cheaper than per-subtest stacks." + }, + { + "decision": "CustomerOverride is noop and multi-subscription FF is off", + "rationale": "This suite focuses on customer/subject lifecycle, not billing override or multi-subscription behavior, so those paths are intentionally disabled to keep tests focused." + } + ], + "code_examples": [ + { + "scenario": "Spin up the env and run customer subtests", + "code": "func TestCustomer(t *testing.T) {\n ctx, cancel := context.WithCancel(context.Background()); defer cancel()\n env, err := NewTestEnv(t, ctx)\n require.NoError(t, err)\n defer func(){ _ = env.Close() }()\n testSuite := CustomerHandlerTestSuite{Env: env}\n t.Run(\"TestCreate\", func(t *testing.T){ testSuite.TestCreate(ctx, t) })\n}" + } + ] + }, + "test/notification": { + "purpose": "Integration test suite (package `notification`) for the notification domain: channels, rules, events, repository filtering, the balance-threshold consumer, and Svix webhook delivery. Uses an interface-based TestEnv backed by real Postgres plus a real (local) Svix server.", + "patterns": [ + { + "name": "Interface TestEnv + single TestNotification dispatcher", + "description": "TestEnv exposes NotificationRepo(), Notification(), NotificationWebhook(), Feature(), Meter(), Namespace(), Close(). TestNotification(t) builds one env via NewTestEnv(t, ctx, namespace), then runs Webhook/Channel/Rule/Event/Repository/Consumer subtests, each backed by a small XxxTestSuite{Env}.", + "example": "env, err := NewTestEnv(t, ctx, namespace); testSuite := ChannelTestSuite{Env: env}; t.Run(\"Create\", func(t *testing.T){ testSuite.TestCreate(ctx, t) })" + }, + { + "name": "Namespace from NewTestNamespace (ULID)", + "description": "namespace := NewTestNamespace(t) (alias of NewTestULID) is created once and passed into NewTestEnv; suites read it via s.Env.Namespace().", + "example": "namespace := NewTestNamespace(t); env, _ := NewTestEnv(t, ctx, namespace)" + }, + { + "name": "Real Svix + Postgres, mock meter/eventbus", + "description": "NewTestEnv connects to a Svix server (webhooksvix.New with svix.New using a JWT from NewSvixAuthToken), real Postgres (testutils.InitPostgresDB + Schema.Create), a mock meter adapter (meter/mockadapter), and eventbus.NewMock. Svix host/secret come from SVIX_HOST / SVIX_JWT_SECRET env (defaults 127.0.0.1 / DUMMY_JWT_SECRET).", + "example": "svixAPIKey, _ := NewSvixAuthToken(svixJWTSigningSecret); webhook, _ := webhooksvix.New(webhooksvix.Config{SvixAPIClient: svixAPIClient, ...})" + }, + { + "name": "Event handler runs as a background goroutine", + "description": "NewTestEnv builds eventhandler.New (with a pglockx lock client) and starts it via `go eventHandler.Start()`; closerFunc must eventHandler.Close() plus close ent/PG drivers. Consumer tests rely on this running loop.", + "example": "go func(){ _ = eventHandler.Start() }(); closerFunc := func() error { return errors.Join(eventHandler.Close(), entClient.Close(), ...) }" + }, + { + "name": "Builder helpers for inputs", + "description": "Channel/rule/event inputs use builder funcs like NewCreateChannelInput(namespace, name) returning notification.CreateChannelInput with ChannelTypeWebhook config; repository tests tag events with notification.AnnotationEventFeatureID/Key and AnnotationEventSubjectID/Key for filtering.", + "example": "createIn := NewCreateChannelInput(s.Env.Namespace(), \"NotificationCreateChannel\"); channel, err := service.CreateChannel(ctx, createIn)" + } + ], + "key_file_guides": [ + { + "file": "testenv.go", + "role": "TestEnv interface + NewTestEnv: wires notification adapter/service/webhook(Svix)/eventhandler, feature connector, mock meter; defines Test* constants (TestFeatureKey/ID, TestSubjectKey/ID, TestWebhookURL, TestSigningSecret) and NewTestNamespace", + "watch_for": "Requires a reachable Svix server (SvixServerURLTemplate http://host:8071) \u2014 these tests need make test-all / Svix dependency. Event handler goroutine + pglockx lock must be closed via closerFunc." + }, + { + "file": "helpers.go", + "role": "NewSvixAuthToken(signingSecret) (HS256 JWT for svix-server) and NewClickhouseClient(addr)", + "watch_for": "JWT issuer is hardcoded \"svix-server\" with a fixed expiry; ClickHouse creds are the local default/default." + }, + { + "file": "notification_test.go", + "role": "TestNotification entry point dispatching Webhook/Channel/Rule/Event/Repository/Consumer suites", + "watch_for": "Several suites call testSuite.Setup(ctx, t) before subtests; skipping Setup leaves rules/channels/events uncreated." + }, + { + "file": "repository.go", + "role": "RepositoryTestSuite: creates channel+rule+events with feature/subject annotations, tests ListEvents filtering by Features/Subjects", + "watch_for": "Feature filtering matches either the feature ID or key (TestFeatureID/TestFeatureKey); annotations are the AnnotationEvent* constants." + }, + { + "file": "channel.go", + "role": "ChannelTestSuite + NewCreateChannelInput builder (webhook channel with custom headers, URL, signing secret)", + "watch_for": "Channel config carries SigningSecret; webhook secret helpers live in notification/webhook/secret." + }, + { + "file": "consumer_balance.go", + "role": "BalanceNotificaiontHandlerTestSuite for the balance-threshold consumer (granting flow, feature filtering)", + "watch_for": "Depends on the running eventHandler goroutine to process events; assertions may need to wait for async delivery." + }, + { + "file": "webhook.go", + "role": "WebhookTestSuite exercising Svix webhook CRUD (create/update/delete/get/list)", + "watch_for": "Hits the live Svix server; flaky/skipped without the Svix dependency up." + } + ], + "anti_patterns": [ + "Assuming no external dependency \u2014 these tests need a real Svix server (and Postgres); they are gated behind make test-all, not plain make test.", + "Forgetting closerFunc/Close (eventHandler.Close + driver closes) \u2014 leaks the goroutine, lock, and DB.", + "Hardcoding a namespace instead of NewTestNamespace(t); namespaces isolate the shared env.", + "Skipping testSuite.Setup(ctx, t) before subtests that depend on pre-created channels/rules/events.", + "Filtering events by raw map access instead of the notification.AnnotationEvent* constants." + ], + "decisions": [ + { + "decision": "TestEnv runs a real eventhandler goroutine plus a real Svix client", + "rationale": "Notification delivery and the balance-threshold consumer are inherently async and provider-backed; only a running handler + real Svix exercise the true delivery path." + }, + { + "decision": "Meter and eventbus are mocked while Postgres and Svix are real", + "rationale": "Channel/rule/event persistence and webhook delivery are the system under test; metering and event publishing are stubbed to keep scenarios deterministic." + } + ], + "code_examples": [ + { + "scenario": "Construct the env and run a channel subtest", + "code": "func TestNotification(t *testing.T) {\n ctx, cancel := context.WithCancel(t.Context()); defer cancel()\n namespace := NewTestNamespace(t)\n env, err := NewTestEnv(t, ctx, namespace)\n require.NoError(t, err)\n t.Cleanup(func(){ _ = env.Close() })\n testSuite := ChannelTestSuite{Env: env}\n t.Run(\"Create\", func(t *testing.T){ testSuite.TestCreate(ctx, t) })\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w154.json b/.archie/enrichments/w154.json new file mode 100644 index 0000000000..f7d7b23742 --- /dev/null +++ b/.archie/enrichments/w154.json @@ -0,0 +1,92 @@ +{ + "test/subscription": { + "purpose": "Integration test suite (package subscription_test) for end-to-end subscription lifecycle scenarios that cross the subscription, productcatalog, billing, and billing/worker/subscriptionsync boundaries. Each scenario_*_test.go file wires a full real-service stack via setup() and drives one named bug-regression or alignment scenario (aligned edits, edit+cancel, entitlement-in-next-phase, first-of-month/anchored billing).", + "patterns": [ + { + "name": "Single shared setup() builds the full real-service stack", + "description": "Every test calls tDeps := setup(t, setupConfig{}) then defer tDeps.cleanup(t). setup() constructs real adapters/services (app, billing, taxcode, subscriptionsync) on top of subscriptiontestutils.SetupDBDeps + NewService \u2014 not mocks \u2014 so scenarios exercise production code paths.", + "example": "tDeps := setup(t, setupConfig{}); defer tDeps.cleanup(t)" + }, + { + "name": "Hardcoded test-namespace", + "description": "All scenarios use namespace := \"test-namespace\"; this string is baked into setup() (app CreateApp calls use it). Do not parameterize the namespace per-test \u2014 the framework's sandbox app provisioning assumes it.", + "example": "namespace := \"test-namespace\"" + }, + { + "name": "clock.SetTime drives the timeline", + "description": "Tests freeze and advance time with pkg/clock: clock.SetTime(currentTime) at start, then reassign currentTime = currentTime.Add(...) / clock.Now().Add(...) and SetTime again before each lifecycle step (edit, cancel, sync).", + "example": "currentTime = currentTime.Add(time.Minute); clock.SetTime(currentTime)" + }, + { + "name": "Standard plan->publish->customer->subscribe arc", + "description": "Scenarios build features (FeatureConnector.CreateFeature / CreateExampleFeatures), then PlanService.CreatePlan + PublishPlan, CustomerService.CreateCustomer, build a pcsubscription.PlanInput via FromRef, then pcSubscriptionService.Create with a CreateSubscriptionWorkflowInput.", + "example": "pi := &pcsubscription.PlanInput{}; pi.FromRef(&pcsubscription.PlanRefInput{Key: p.Key, Version: &p.Version})" + }, + { + "name": "Edits go through the workflow EditRunning + patches", + "description": "Subscription edits use subscriptionWorkflowService.EditRunning with []subscription.Patch (patch.PatchRemoveItem then patch.PatchAddItem with a full SubscriptionItemSpec) and an explicit subscription.Timing. Cancels use subscriptionService.Cancel with subscription.Timing.", + "example": "EditRunning(ctx, s.NamespacedID, []subscription.Patch{patch.PatchRemoveItem{...}, patch.PatchAddItem{...}}, subscription.Timing{Enum: lo.ToPtr(subscription.TimingImmediate)})" + }, + { + "name": "Billing assertions via gathering invoices + sync", + "description": "Billing scenarios create a profile from minimalCreateProfileInputTemplate, call subscriptionSyncService.SyncByView(ctx, view, until), then assert on billingService.ListGatheringInvoices results (GatheringLine ServicePeriod/InvoiceAt), grouping lines with lo.GroupBy on FeatureKey/ChildUniqueReferenceID.", + "example": "require.NoError(t, tDeps.subscriptionSyncService.SyncByView(ctx, view, firstOfMonth.AddDate(0, 1, 0)))" + }, + { + "name": "Durations via datetime.MustParseDuration(t, ...)", + "description": "ISO durations are built with datetime.MustParseDuration(t, \"P1M\") in test bodies; profile template uses lo.Must(datetime.ISODurationString(\"P1D\").Parse()). Prices use alpacadecimal.NewFromInt and productcatalog.NewPriceFrom.", + "example": "BillingCadence: datetime.MustParseDuration(t, \"P1M\")" + } + ], + "key_file_guides": [ + { + "file": "framework_test.go", + "role": "Defines testDeps struct, setupConfig, setup(t, cfg) which wires the entire real-service stack, and minimalCreateProfileInputTemplate(appID) for billing profiles. The only non-scenario file; the shared harness all scenarios depend on.", + "watch_for": "setup() creates TWO sandbox apps ('Test Sandbox' and 'Sandbox') and returns the 'Sandbox' one as tDeps.sandboxApp. billingService is wrapped with a MockableCalculator via WithInvoiceCalculator. Profile interval is PT0S so invoices collect immediately unless a scenario overrides it." + }, + { + "file": "scenario_editaligned_test.go", + "role": "TestEditingEntitlementOfAlignedSub \u2014 verifies that editing a metered entitlement item preserves the entitlement's CurrentUsagePeriod (cadence alignment) across PatchRemoveItem+PatchAddItem.", + "watch_for": "Asserts the edited item is at index [1] in ItemsByKey (the original is [0]); compares CurrentUsagePeriod.From/To equality and CreatedAt strictly increasing." + }, + { + "file": "scenario_editcancel_test.go", + "role": "TestEditingAndCanceling \u2014 boolean-entitlement plan; creates a main customer plus 10 extra customers/subscriptions, edits one sub, then cancels it. Regression coverage for edit-then-cancel sequencing.", + "watch_for": "Extra customers use SubjectKeys subject_2..subject_11 (fmt.Sprintf with i+2). No billing assertions here \u2014 purely lifecycle success (require.NoError)." + }, + { + "file": "scenario_entinnextphase_test.go", + "role": "TestSubWithMeteredEntitlement \u2014 two-phase plan (1-week first phase, then second) each with a metered entitlement ratecard; reproduces a creation failure when an entitlement spans into the next phase. The assertion is simply that Create succeeds.", + "watch_for": "Comment 'THIS IS THE TEST, it used to fail' marks the regression intent; BillingAnchor is nil (aligns billing to subscription start)." + }, + { + "file": "scenario_firstofmonth_test.go", + "role": "TestBillingOnFirstOfMonth and TestAnchoredAlignment_MidMonthStart_EarlyCancel_IssueNextAnchor \u2014 the most assertion-heavy file; mixes in-arrears monthly, in-advance flat-fee monthly, and in-arrears daily ratecards, then checks gathering-invoice line ServicePeriod/InvoiceAt for proration and anchored alignment.", + "watch_for": "Uses BillingAnchor (&firstOfMonth) on the workflow input AND AlignmentKindAnchored + AnchoredAlignmentDetail on the profile in the second test. Daily ratecard produces 16 lines (15th->30th) with the first being a partial half-day line. Subtests use t.Run." + } + ], + "anti_patterns": [ + "Constructing services from app/common wiring instead of the underlying adapter/service constructors used in setup() \u2014 risks test-only import cycles (see subscriptiontestutils guidance).", + "Using context.Background() time/now or time.Now() instead of pkg/clock \u2014 scenarios depend on a frozen, advanceable clock and would become non-deterministic.", + "Changing the hardcoded 'test-namespace' string \u2014 sandbox app provisioning and profile inputs assume it.", + "Asserting subscription edits by mutating the original view in place \u2014 edited items are appended (new index) into ItemsByKey, the original entry is retained.", + "Calling lower-level billing/charge adapters directly to model usage instead of driving through SyncByView and ListGatheringInvoices." + ], + "decisions": [ + { + "decision": "Each scenario file is a self-contained named regression test rather than table-driven cases.", + "rationale": "Each scenario reproduces a distinct historical bug or alignment edge case with bespoke plan shapes and timeline manipulation; table-driving would obscure the per-scenario intent comments (e.g. 'it used to fail')." + }, + { + "decision": "setup() builds the real billing + subscriptionsync stack and only mocks the streaming connector and invoice calculator.", + "rationale": "These tests exist to validate the subscription->billing sync bridge end to end, so production service paths must run; only external usage data (MockStreamingConnector) and final invoice calc are substituted." + } + ], + "code_examples": [ + { + "scenario": "Standard create-plan-and-subscribe arc shared by every scenario", + "code": "tDeps := setup(t, setupConfig{})\ndefer tDeps.cleanup(t)\nclock.SetTime(currentTime)\n\nf, _ := tDeps.FeatureConnector.CreateFeature(ctx, feature.CreateFeatureInputs{\n Name: \"Example Feature\", Key: \"test_feature_1\", Namespace: namespace,\n MeterID: lo.ToPtr(tDeps.ExampleMeterID),\n})\np, _ := tDeps.PlanService.CreatePlan(ctx, plan.CreatePlanInput{ /* PlanMeta + Phases + RateCards */ })\np, _ = tDeps.PlanService.PublishPlan(ctx, plan.PublishPlanInput{\n NamespacedID: p.NamespacedID,\n EffectivePeriod: productcatalog.EffectivePeriod{EffectiveFrom: lo.ToPtr(currentTime)},\n})\nc, _ := tDeps.CustomerService.CreateCustomer(ctx, customer.CreateCustomerInput{ /* ... */ })\npi := &pcsubscription.PlanInput{}\npi.FromRef(&pcsubscription.PlanRefInput{Key: p.Key, Version: &p.Version})\ns, _ := tDeps.pcSubscriptionService.Create(ctx, pcsubscription.CreateSubscriptionRequest{\n WorkflowInput: subscriptionworkflow.CreateSubscriptionWorkflowInput{\n Namespace: namespace, CustomerID: c.ID,\n ChangeSubscriptionWorkflowInput: subscriptionworkflow.ChangeSubscriptionWorkflowInput{\n Timing: subscription.Timing{Custom: ¤tTime}, Name: \"Test Subscription\",\n },\n },\n PlanInput: *pi,\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w155.json b/.archie/enrichments/w155.json new file mode 100644 index 0000000000..45352367e1 --- /dev/null +++ b/.archie/enrichments/w155.json @@ -0,0 +1,180 @@ +{ + "test/app/custominvoicing": { + "purpose": "Integration tests for the custom-invoicing app (openmeter/app/custominvoicing) verifying that draft/issuing sync hooks and payment-status triggers drive a billing invoice through its state machine. Tests are built on billingtest.BaseSuite, not the application wiring layer.", + "patterns": [ + { + "name": "Embed billingtest.BaseSuite", + "description": "Test suites embed billingtest.BaseSuite, exposing services like AppService, CustomerService, MeterAdapter, FeatureService, BillingService, CustomInvoicingService, MockStreamingConnector. CustomInvoicingEventTestSuite further embeds CustomInvoicingTestSuite to reuse setup.", + "example": "type CustomInvoicingTestSuite struct { billingtest.BaseSuite }" + }, + { + "name": "Shared profile setup helper", + "description": "setupDefaultBillingProfile installs the custom-invoicing app via AppService.InstallMarketplaceListing (app.AppTypeCustomInvoicing), pushes appcustominvoicing.Configuration through AppService.UpdateApp, then ProvisionBillingProfile. Toggle EnableDraftSyncHook / EnableIssuingSyncHook per scenario.", + "example": "s.setupDefaultBillingProfile(ctx, namespace, appcustominvoicing.Configuration{EnableDraftSyncHook: true, EnableIssuingSyncHook: true})" + }, + { + "name": "Drive invoice lifecycle through service calls", + "description": "Create gathering lines via BillingService.CreatePendingInvoiceLines, materialize via InvoicePendingLines, then advance with CustomInvoicingService.SyncDraftInvoice, SyncIssuingInvoice, HandlePaymentTrigger; assert exact billing.StandardInvoiceStatus* after each.", + "example": "draftSyncedInvoice, err := s.CustomInvoicingService.SyncDraftInvoice(ctx, appcustominvoicing.SyncDraftInvoiceInput{InvoiceID: invoice.GetInvoiceID(), UpsertInvoiceResults: upsertResults})" + }, + { + "name": "Builder results for sync inputs", + "description": "Sync inputs are constructed with the billing fluent builders billing.NewUpsertStandardInvoiceResult() and billing.NewFinalizeStandardInvoiceResult() with chained SetInvoiceNumber/SetExternalID/SetPaymentExternalID/AddLineExternalID.", + "example": "billing.NewUpsertStandardInvoiceResult().SetInvoiceNumber(\"DRAFT-123\").SetExternalID(\"ext-123\").AddLineExternalID(invoice.Lines.OrEmpty()[0].ID, \"ext-123\")" + }, + { + "name": "Per-test unique namespace string", + "description": "Each test hardcodes a descriptive namespace string (e.g. \"ns-custom-invoicing-flow\") rather than ULIDs, and uses context.Background() at the top of the test body.", + "example": "namespace := \"ns-custom-invoicing-flow\"" + }, + { + "name": "Meter/streaming teardown via defer", + "description": "Tests that set up meters and stream events clean up with deferred s.MeterAdapter.ReplaceMeters(ctx, []meter.Meter{}) and s.MockStreamingConnector.Reset().", + "example": "defer s.MockStreamingConnector.Reset()" + } + ], + "key_file_guides": [ + { + "file": "invocing_test.go", + "role": "Main suite (note misspelled filename). Defines CustomInvoicingTestSuite, setupDefaultBillingProfile, and full lifecycle tests TestInvoicingFlowHooksEnabled and TestInvoicingFlowPaymentStatusOnly.", + "watch_for": "Filename is 'invocing' not 'invoicing'. With hooks disabled, InvoicePendingLines lands directly in PaymentProcessingPending and assigns a generic number like INV-TECU-1; with hooks enabled it lands in DraftSyncing and requires explicit SyncDraftInvoice." + }, + { + "file": "event_test.go", + "role": "CustomInvoicingEventTestSuite verifying billing.NewStandardInvoiceCreatedEvent is JSON round-trippable and carries app bases (Tax/Payment/Invoicing) plus Meta decoded via appcustominvoicing.Meta.FromEventAppData.", + "watch_for": "Asserts event.Apps.*.AppBase equals invoice.Workflow.Apps.*.GetAppBase(); Meta.Configuration flags must survive marshal/unmarshal." + } + ], + "anti_patterns": [ + "Calling app/billing adapters directly or importing app/common wiring instead of building from BaseSuite-provided services.", + "Asserting invoice progress without checking the exact billing.StandardInvoiceStatus* enum at each step.", + "Leaving meters or streamed events in place across tests (always defer ReplaceMeters({}) and MockStreamingConnector.Reset()).", + "Assuming hooks-disabled and hooks-enabled flows produce the same terminal status \u2014 they diverge at InvoicePendingLines." + ], + "decisions": [ + { + "decision": "Tests exercise CustomInvoicingService.SyncDraftInvoice/SyncIssuingInvoice/HandlePaymentTrigger rather than simulating webhook callbacks.", + "rationale": "Validates the real state-machine transitions and external-ID propagation the custom-invoicing app guarantees to integrators." + }, + { + "decision": "Payment triggers are validated for full-mesh legality (e.g. paid cannot transition to uncollectible), expecting billing.ValidationError.", + "rationale": "Ensures invalid status transitions surface as ValidationError rather than silent state corruption." + } + ], + "code_examples": [ + { + "scenario": "Advance a custom-invoicing invoice from draft.syncing to issuing.syncing", + "code": "upsertResults := billing.NewUpsertStandardInvoiceResult().\n\tSetInvoiceNumber(\"DRAFT-123\").\n\tSetExternalID(\"ext-123\").\n\tAddLineExternalID(invoice.Lines.OrEmpty()[0].ID, \"ext-123\")\n\ndraftSyncedInvoice, err := s.CustomInvoicingService.SyncDraftInvoice(ctx, appcustominvoicing.SyncDraftInvoiceInput{\n\tInvoiceID: invoice.GetInvoiceID(),\n\tUpsertInvoiceResults: upsertResults,\n})\ns.NoError(err)\ns.Equal(billing.StandardInvoiceStatusIssuingSyncing, draftSyncedInvoice.Status)" + } + ] + }, + "test/app/stripe": { + "purpose": "Integration tests for the Stripe app (openmeter/app/stripe): app lifecycle (install/get/update/uninstall), customer-data validation, and Stripe invoice sync including credit/usage-based progressive billing. Stripe API access is fully mocked via testify mocks so no live Stripe calls occur.", + "patterns": [ + { + "name": "Two test harness styles coexist", + "description": "App-handler tests use a hand-built TestEnv (NewTestEnv in testenv.go) returning a TestEnv interface; invoice tests embed billingtest.BaseSuite (StripeInvoiceTestSuite) and wire the stripe adapter/service in SetupSuite. Match the style of the file you extend.", + "example": "type StripeInvoiceTestSuite struct { billingtest.BaseSuite; AppStripeService appstripe.Service; Fixture *Fixture; StripeAppClient *StripeAppClientMock; Charges charges.Service; LedgerResolver *ledgerresolvers.AccountResolver }" + }, + { + "name": "Stripe clients are testify mocks injected via factory", + "description": "StripeClientMock and StripeAppClientMock (stripe_mock.go) implement stripeclient interfaces; they are injected through appstripeadapter.Config.StripeClientFactory / StripeAppClientFactory closures that ignore config and return the mock. Each mock method calls input.Validate() before c.Called(...).", + "example": "StripeAppClientFactory: func(config stripeclient.StripeAppClientConfig) (stripeclient.StripeAppClient, error) { return stripeAppClient, nil }" + }, + { + "name": "Set expectations with On(...).Return(...) then Restore()", + "description": "Program Stripe behavior per scenario via s.Env.StripeAppClient().On(\"GetCustomer\", id).Return(...). Mocks expose Restore() which truncates ExpectedCalls; defer it (or TearDownTest calls it) so expectations do not leak between subtests.", + "example": "s.Env.StripeAppClient().On(\"GetCustomer\", newStripeCustomerID).Return(stripeclient.StripeCustomer{StripeCustomerID: newStripeCustomerID}, nil)\ndefer s.Env.StripeAppClient().Restore()" + }, + { + "name": "Fixture builds app + customer + customer-data", + "description": "Fixture (fixture.go) centralizes setup: setupApp (InstallMarketplaceListingWithAPIKey with app.AppTypeStripe), setupCustomer, setupAppCustomerData (default cus_123), and setupAppWithCustomer chaining all three. Random stripe account ids via getStripeAccountId().", + "example": "testApp, customer, customerData, err := s.Env.Fixture().setupAppWithCustomer(ctx, s.namespace)" + }, + { + "name": "Assert via typed error predicates", + "description": "Error outcomes are checked with domain predicates not string matching: app.IsAppNotFoundError, app.IsAppCustomerPreConditionError, app.IsAppProviderPreConditionError, models.IsGenericConflictError.", + "example": "require.True(t, app.IsAppCustomerPreConditionError(err))" + }, + { + "name": "Invoice sync asserts Stripe line items by description/amount/metadata", + "description": "expectStripeInvoiceCreate and expectStripeInvoiceAddLines (invoice_credits_test.go) program CreateInvoice/AddInvoiceLines with mock.MatchedBy, keying expected items by Description and asserting Amount (cents), Metadata om_line_type and non-empty om_line_id.", + "example": "s.expectStripeInvoiceAddLines(\"stripe-partial-invoice-id\", []expectedStripeInvoiceItem{{Amount: 500, Description: \"...usage in period (5 x $1)\", Type: \"line\"}, {Amount: -500, Description: \"credits applied for ...\", Type: \"credit\"}})" + }, + { + "name": "Ledger-backed charges wired in SetupSuite", + "description": "Credit/usage scenarios build the charges stack via chargestestutils.NewServices with ledger handlers (NewCreditPurchaseHandler, NewFlatFeeHandler, NewUsageBasedHandler) from ledgertestutils.InitDeps, and create ledger-backed customers via LedgerResolver.EnsureBusinessAccounts/CreateCustomerAccounts.", + "example": "s.Charges = chargeStack.ChargesService" + } + ], + "key_file_guides": [ + { + "file": "testenv.go", + "role": "NewTestEnv builds an isolated Postgres-backed TestEnv (customer/app/billing/appstripe services) with mock Stripe clients and a MockSecretService; returns a TestEnv interface with accessors and Close().", + "watch_for": "Uses testutils.InitPostgresDB + entClient.Schema.Create; closerFunc closes ent and PG drivers. Env is shared across subtests (see 'TODO: do not share env between tests')." + }, + { + "file": "app_test.go", + "role": "Top-level TestAppStripe entrypoint that constructs the env once and runs AppHandlerTestSuite subtests (Create/Get/Update/Uninstall/CustomerData/Validate/CheckoutSession/PortalSession/UpdateAPIKey).", + "watch_for": "Single env reused for all subtests; mock expectations must be Restore()d between them." + }, + { + "file": "appstripe.go", + "role": "AppHandlerTestSuite methods: TestCreate, TestGet, TestUpdate, TestUninstall, TestCustomerData, TestCustomerValidate, plus TestStripeAPIKey constant and setupNamespace (ULID per test).", + "watch_for": "Long mock dance in TestCustomerData: Restore() and re-program On(...) between sub-scenarios; pre-condition errors distinguish customer vs provider failures." + }, + { + "file": "fixture.go", + "role": "Fixture struct and setupApp/setupCustomer/setupAppCustomerData/setupAppWithCustomer; defaultStripeCustomerID=cus_123; getStripeAccountId() random acct_ ids.", + "watch_for": "setupApp programs GetAccount + SetupWebhook mocks and defers Restore() \u2014 calling it twice in one scenario re-stacks expectations." + }, + { + "file": "invoice_test.go", + "role": "StripeInvoiceTestSuite + SetupSuite wiring (secret/appstripe adapter+service, ledger deps, charges stack, fixture); TestComplexInvoice covering multi-line UBP invoicing (flat/tiered/AI) with tax codes.", + "watch_for": "SetupSuite uses slog.Default() (acceptable in tests only). MockStreamingConnector seeded with out-of-period 0 events to baseline; defer Reset()." + }, + { + "file": "invoice_credits_test.go", + "role": "Progressive-billing credit-then-invoice test driving charges.Service.Create (creditpurchase + usagebased intents) and asserting Stripe line/credit items; defines expectStripeInvoiceCreate/AddLines and intent builders.", + "watch_for": "Uses clock.FreezeTime/UnFreeze around fixed dates; RemoveCircularReferences() before UpsertStandardInvoice; settles credit purchase via HandleCreditPurchaseExternalPaymentStateTransition (Authorized then Settled)." + }, + { + "file": "stripe_mock.go", + "role": "StripeClientMock and StripeAppClientMock implementing stripeclient.StripeClient/StripeAppClient; Restore() truncates ExpectedCalls; AddInvoiceLines/UpdateInvoiceLines stable-sort inputs for deterministic matching.", + "watch_for": "Most methods call input.Validate() before Called(); DeleteInvoice returns args.Error(1) (index 1) \u2014 a quirk vs the usual Error(0)." + }, + { + "file": "secret_mock.go", + "role": "MockSecretService wrapping a real secretservice with EnableMock/DisableMock toggle; delegates to original when mock disabled, otherwise records Called() and validates input.", + "watch_for": "Implements secret.SecretService (compile-time assert var _); validation runs even in mock mode and returns models.NewGenericValidationError." + } + ], + "anti_patterns": [ + "Issuing real Stripe API calls \u2014 always go through StripeClientMock/StripeAppClientMock factories.", + "Leaving mock expectations un-Restore()d between subtests; the env/mocks are shared and will bleed expectations.", + "Matching Stripe invoice errors by string instead of typed predicates (app.IsApp*Error, models.IsGenericConflictError).", + "Forgetting clock.UnFreeze() / MockStreamingConnector.Reset() defers in invoice tests, leaking frozen time or events.", + "Hand-building app/customer/billing services in invoice tests instead of reusing BaseSuite + Fixture wiring." + ], + "decisions": [ + { + "decision": "Stripe access is abstracted behind stripeclient interfaces and injected via factory closures so tests swap in mocks.", + "rationale": "Lets integration tests exercise the full adapter/service stack against real Postgres while keeping Stripe deterministic and offline." + }, + { + "decision": "Invoice/credit tests reuse billingtest.BaseSuite and the ledger/charges test utilities rather than the app/common DI layer.", + "rationale": "Keeps test dependencies built from concrete package constructors, avoiding test-only import cycles per repo testing guidance." + }, + { + "decision": "Stripe line-item assertions key on Description with metadata (om_line_type, om_line_id) and cent amounts via mock.MatchedBy.", + "rationale": "Line ordering is non-deterministic, so matching by stable description/metadata is more robust than positional assertions." + } + ], + "code_examples": [ + { + "scenario": "Assert a synced Stripe invoice contains the expected usage line and credit line", + "code": "s.expectStripeInvoiceCreate(stripeApp.GetID(), cust.GetID(), partialInvoice.ID, customerData.StripeCustomerID, \"stripe-partial-invoice-id\")\ns.expectStripeInvoiceAddLines(\"stripe-partial-invoice-id\", []expectedStripeInvoiceItem{\n\t{Amount: 500, Description: \"usage-based-progressive-credit-then-invoice: usage in period (5 x $1)\", Type: \"line\"},\n\t{Amount: -500, Description: \"credits applied for usage-based-progressive-credit-then-invoice: usage in period\", Type: \"credit\"},\n})\n\nstripePartialInvoice := lo.Must(partialInvoice.RemoveCircularReferences())\nupsertResult, err := stripeInvoicingApp.UpsertStandardInvoice(ctx, stripePartialInvoice)\ns.NoError(err)\ns.StripeAppClient.AssertExpectations(s.T())" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w156.json b/.archie/enrichments/w156.json new file mode 100644 index 0000000000..5c7b701b48 --- /dev/null +++ b/.archie/enrichments/w156.json @@ -0,0 +1,72 @@ +{ + "test/entitlement/regression": { + "purpose": "Regression test suite that exercises the full metered-entitlement + credit-grant stack (feature, entitlement, grant, balance snapshot, reset, void) end-to-end against a real Postgres DB, reproducing historically faulty balance-calculation scenarios. Its primary constraint: tests wire the production connectors directly and drive time via clock so balance/reset/expiry interactions are deterministic.", + "patterns": [ + { + "name": "Real-stack assembly via setupDependencies", + "description": "Each test calls setupDependencies(t), which builds the entire entitlement/credit graph from concrete constructors (feature, grant, balance snapshot, metered/static/boolean connectors, customer, subject) against a fresh Postgres DB from testutils.InitPostgresDB(t). Build from package constructors, never from app/common wiring.", + "example": "deps := setupDependencies(t); defer deps.Close()" + }, + { + "name": "Deterministic time via clock + frozen RFC3339", + "description": "Every temporal step uses clock.SetTime(testutils.GetRFC3339Time(t, \"...\")) to advance the simulated clock, with defer clock.ResetTime() at the top of each test. Balances are queried at explicit timestamps; reset/expiry math depends on these exact times.", + "example": "defer clock.ResetTime(); clock.SetTime(testutils.GetRFC3339Time(t, \"2024-06-28T14:30:21Z\"))" + }, + { + "name": "Usage injected through MockStreamingConnector", + "description": "Usage events are added via deps.Streaming.AddSimpleEvent(\"meter-1\", value, time). The meter is named meter-1 with MeterAggregationCount; events placed far in the future are a deliberate hack to avoid streaming errors while keeping them out of the queried window.", + "example": "deps.Streaming.AddSimpleEvent(\"meter-1\", 10, testutils.GetRFC3339Time(t, \"2024-07-09T13:09:00Z\"))" + }, + { + "name": "Customer+subject created together before entitlement", + "description": "createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, ns, key, name) creates a subject then a customer with UsageAttribution SubjectKeys=[key]; the returned customer's GetUsageAttribution() feeds CreateEntitlementInputs.UsageAttribution.", + "example": "cust := createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, \"namespace-1\", \"subject-1\", \"Subject 1\")" + }, + { + "name": "Hooks registered on connectors after construction", + "description": "meteredEntitlementConnector.RegisterHooks(...) and entitlementConnector.RegisterHooks(...) wire the subscription hook and credit EntitlementHook, mirroring production wiring so reset/void side effects fire.", + "example": "entitlementConnector.RegisterHooks(entitlementsubscriptionhook.NewEntitlementSubscriptionHook(...), credithook.NewEntitlementHook(grantRepo))" + }, + { + "name": "Balance asserted by exact float at a timestamp", + "description": "Tests call deps.MeteredEntitlementConnector.GetEntitlementBalance(ctx, models.NamespacedID{Namespace, ID}, at) and assert.Equal an exact float (e.g. 30.0, 0.0, 488.0). Comments document why the expected value holds (grant priority, expiry, reset rollover).", + "example": "assert.Equal(488.0, currentBalance.Balance)" + } + ], + "key_file_guides": [ + { + "file": "framework_test.go", + "role": "Test harness: Dependencies struct, Close(), setupDependencies(t) wiring the full credit+entitlement stack, and createCustomerAndSubject helper. Package framework_test.", + "watch_for": "Uses slog.Default() and context.Background() and eventbus.NewMock(t) \u2014 acceptable in this test-only harness but do not copy into production constructors. meter-1 / namespace-1 / Meter1ID are hardcoded; all entitlements must target namespace-1." + }, + { + "file": "scenario_test.go", + "role": "The actual regression cases: TestGrantExpiringAtReset, TestGrantExpiringAndRecurringAtReset, TestBalanceCalculationsAfterVoiding, TestCreatingEntitlementsForKeyOfArchivedFeatures. Each is a timed sequence of feature/entitlement/grant/reset/void calls with balance assertions.", + "watch_for": "Expected balances encode subtle grant-priority/expiry/reset-rollover semantics; comments (e.g. 'This test was previously faulty') flag historical bugs \u2014 do not 'fix' an assertion to make it pass without understanding the documented reason." + } + ], + "anti_patterns": [ + "Importing app/common or production DI wiring instead of building deps from package constructors \u2014 creates test-only import cycles and defeats the regression intent.", + "Using time.Now() or real sleeps instead of clock.SetTime + frozen RFC3339 timestamps \u2014 makes reset/expiry math nondeterministic.", + "Omitting defer clock.ResetTime() / defer deps.Close() \u2014 leaks frozen time and DB resources into other tests.", + "Changing an asserted balance float to silence a failure without reconciling it against the grant priority / expiry / rollover comments.", + "Adding usage with AddSimpleEvent inside the queried window when the scenario intends it to be ignored (future-dated hack)." + ], + "decisions": [ + { + "decision": "Assemble production connectors directly against a real Postgres DB rather than mocking the credit/entitlement engine.", + "rationale": "These are regression tests for balance-calculation bugs that only surface through the real grant/snapshot/reset interaction; mocks would hide them." + }, + { + "decision": "Drive all time through pkg/clock with hardcoded RFC3339 instants.", + "rationale": "Entitlement usage periods, grant expiration, and reset anchors are time-sensitive; deterministic clock control makes the exact expected balances reproducible." + } + ], + "code_examples": [ + { + "scenario": "Standard regression test skeleton: timed feature/entitlement/grant setup then exact-balance assertion.", + "code": "func TestX(t *testing.T) {\n\tdefer clock.ResetTime()\n\tdeps := setupDependencies(t)\n\tdefer deps.Close()\n\tctx := context.Background()\n\tassert := assert.New(t)\n\n\tclock.SetTime(testutils.GetRFC3339Time(t, \"2024-06-28T14:30:21Z\"))\n\tfeature, _ := deps.FeatureConnector.CreateFeature(ctx, feature.CreateFeatureInputs{Name: \"feature-1\", Key: \"feature-1\", Namespace: \"namespace-1\", MeterID: convert.ToPointer(deps.Meter1ID)})\n\tcust := createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, \"namespace-1\", \"subject-1\", \"Subject 1\")\n\tentitlement, _ := deps.EntitlementConnector.CreateEntitlement(ctx, entitlement.CreateEntitlementInputs{Namespace: \"namespace-1\", FeatureID: &feature.ID, FeatureKey: &feature.Key, UsageAttribution: cust.GetUsageAttribution(), EntitlementType: entitlement.EntitlementTypeMetered, UsagePeriod: lo.ToPtr(entitlement.NewUsagePeriodInputFromRecurrence(timeutil.Recurrence{Interval: timeutil.RecurrencePeriodDaily, Anchor: testutils.GetRFC3339Time(t, \"2024-06-28T14:48:00Z\")}))}, nil)\n\tbal, _ := deps.MeteredEntitlementConnector.GetEntitlementBalance(ctx, models.NamespacedID{Namespace: \"namespace-1\", ID: entitlement.ID}, testutils.GetRFC3339Time(t, \"2024-06-28T14:36:45Z\"))\n\tassert.Equal(30.0, bal.Balance)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w157.json b/.archie/enrichments/w157.json new file mode 100644 index 0000000000..f7fff50523 --- /dev/null +++ b/.archie/enrichments/w157.json @@ -0,0 +1,66 @@ +{ + "tools/migrate/viewgen": { + "purpose": "Standalone Go generator that emits CREATE VIEW SQL for Ent schemas declared with ent.View, which Atlas diff omits from generated migrate metadata. It bridges the gap so view DDL can be materialized into a SQL file (default ./tools/migrate/views.sql) for the migration pipeline.", + "patterns": [ + { + "name": "Load Ent schema by path, not by importing generated code", + "description": "GenerateSQL reads schemas via (&load.Config{Path: schemaPath}).Load() from entgo.io/ent/entc/load, operating on []*load.Schema rather than the compiled ent/db package. New code must keep using load.Config so it works against ent://openmeter/ent/schema independently.", + "example": "spec, err := (&load.Config{Path: schemaPath}).Load()" + }, + { + "name": "Only emit views, skip non-view schemas", + "description": "CollectViews iterates schemas and `continue`s unless s.View is true, then requires an EntSQL annotation. A schema with no EntSQL annotation or no ViewFor[dialect]/ViewAs query is silently skipped.", + "example": "if !s.View { continue }" + }, + { + "name": "View query precedence: ViewFor[dialect] then ViewAs", + "description": "Resolve the SQL body from ant.ViewFor[dialectName] first; fall back to ant.ViewAs only when the dialect-specific query is empty. Both trimmed; empty means skip.", + "example": "query := strings.TrimSpace(ant.ViewFor[dialectName]); if query == \"\" { query = strings.TrimSpace(ant.ViewAs) }" + }, + { + "name": "View name fallback chain", + "description": "Name resolves as ant.Table, then s.Config.Table, then strcase.CamelToSnake(inflect.Pluralize(s.Name)). New schemas relying on default naming must accept the pluralized snake_case result.", + "example": "name := ant.Table; if name == \"\" { name = s.Config.Table }; if name == \"\" { name = strcase.CamelToSnake(inflect.Pluralize(s.Name)) }" + }, + { + "name": "Deterministic output via name sort", + "description": "Views are sort.Slice'd by Name before rendering so generated SQL is stable across runs and diff-friendly.", + "example": "sort.Slice(views, func(i, j int) bool { return views[i].Name < views[j].Name })" + }, + { + "name": "Generated-file header marker", + "description": "RenderSQL prepends `-- Code generated by viewgen, DO NOT EDIT.` and a regenerate hint; the output file must never be hand-edited, matching repo-wide generated-code conventions.", + "example": "buf.WriteString(\"-- Code generated by viewgen, DO NOT EDIT.\\n\")" + } + ], + "key_file_guides": [ + { + "file": "viewgen.go", + "role": "Entire package: GenerateSQL/GenerateFile drive the flow; CollectViews extracts ViewDef{Name,Query} from load.Schema; RenderSQL emits CREATE VIEW statements; entSQLAnnotation decodes the EntSQL annotation.", + "watch_for": "entSQLAnnotation round-trips the raw annotation through json.Marshal/Unmarshal into entsql.Annotation; a schema lacking the \"EntSQL\" key returns (nil, nil) and is skipped, not an error. DefaultOutputPath is hardcoded to ./tools/migrate/views.sql relative to repo root." + } + ], + "anti_patterns": [ + "Importing openmeter/ent/db generated code to enumerate views instead of load.Config \u2014 defeats the point that views are absent from generated migrate metadata.", + "Editing the generated views.sql output by hand; it carries a DO NOT EDIT header and is overwritten on regeneration.", + "Using fmt.Fprintf without %q for the view name, breaking identifier quoting in the emitted CREATE VIEW.", + "Removing the sort.Slice on views, producing nondeterministic SQL output and noisy diffs." + ], + "decisions": [ + { + "decision": "Generate view DDL separately from Atlas migration diff.", + "rationale": "In this repo's Ent/Atlas setup, ent.View schemas produce query code but do not appear in generated migrate.Tables, so view DDL needs an explicit generation path until generator support lands." + }, + { + "decision": "Resolve the SQL body via ViewFor[dialect] before ViewAs.", + "rationale": "Lets a schema provide Postgres-specific view SQL while keeping a generic ViewAs fallback for dialect-agnostic cases." + } + ], + "code_examples": [ + { + "scenario": "Generate the views SQL file from the Ent schema directory", + "code": "import \"github.com/openmeterio/openmeter/tools/migrate/viewgen\"\n\nif err := viewgen.GenerateFile(\"ent://openmeter/ent/schema\", viewgen.DefaultOutputPath); err != nil {\n return fmt.Errorf(\"generate views: %w\", err)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w158.json b/.archie/enrichments/w158.json new file mode 100644 index 0000000000..a2a04f7266 --- /dev/null +++ b/.archie/enrichments/w158.json @@ -0,0 +1,46 @@ +{ + "tools/migrate/cmd/viewgen": { + "purpose": "CLI entrypoint that generates the SQL DDL file for Ent `ent.View` schemas, which Atlas migrate diff omits from generated migration metadata. It is a thin `main` wrapper that parses flags and delegates all logic to the `tools/migrate/viewgen` package; the output (default `./tools/migrate/views.sql`) backstops the gap where view DDL must be emitted via explicit SQL.", + "patterns": [ + { + "name": "Delegate to viewgen package, keep main thin", + "description": "main() only parses `-schema` and `-out` flags and calls viewgen.GenerateFile; no view-collection or SQL-rendering logic lives here. New behavior belongs in tools/migrate/viewgen, not main.go.", + "example": "if err := viewgen.GenerateFile(*schemaPath, *outPath); err != nil { exitf(\"%v\", err) }" + }, + { + "name": "Exit on error via os.Exit(1)", + "description": "Errors are reported with the local exitf helper that writes to os.Stderr and calls os.Exit(1). This is a generator binary (package main), so process-exit error handling is acceptable here, unlike library code which must return errors.", + "example": "func exitf(format string, args ...any) { fmt.Fprintf(os.Stderr, format+\"\\n\", args...); os.Exit(1) }" + }, + { + "name": "Default flags mirror package constants", + "description": "The -out default is viewgen.DefaultOutputPath (`./tools/migrate/views.sql`) and -schema defaults to `./openmeter/ent/schema`; these are run relative to the repo root (the make target's cwd), not this directory.", + "example": "outPath := flag.String(\"out\", viewgen.DefaultOutputPath, \"output SQL file path\")" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "CLI: parses -schema/-out flags and invokes viewgen.GenerateFile; only file in this package.", + "watch_for": "Paths are relative to the caller's working directory (repo root via the make target), not to cmd/viewgen. Do not add view logic here \u2014 it lives in tools/migrate/viewgen/viewgen.go (CollectViews/RenderSQL)." + } + ], + "anti_patterns": [ + "Adding view-collection or SQL-rendering logic in main.go instead of the tools/migrate/viewgen package.", + "Hardcoding the output path instead of referencing viewgen.DefaultOutputPath.", + "Hand-editing the generated views.sql output (header says `Code generated by viewgen, DO NOT EDIT.`); regenerate with `make generate-view-sql`." + ], + "decisions": [ + { + "decision": "A standalone generator binary exists for Ent views at all.", + "rationale": "In this repo's Ent/Atlas setup, `ent.View` schemas do not appear in generated migrate.Tables, so `atlas migrate diff` reports no changes for views; viewgen emits the CREATE VIEW DDL that Atlas cannot derive." + } + ], + "code_examples": [ + { + "scenario": "Generate the views SQL file from the Ent schema", + "code": "import \"github.com/openmeterio/openmeter/tools/migrate/viewgen\"\n\nfunc main() {\n schemaPath := flag.String(\"schema\", \"./openmeter/ent/schema\", \"path to the ent schema package\")\n outPath := flag.String(\"out\", viewgen.DefaultOutputPath, \"output SQL file path\")\n flag.Parse()\n if err := viewgen.GenerateFile(*schemaPath, *outPath); err != nil {\n exitf(\"%v\", err)\n }\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w16.json b/.archie/enrichments/w16.json new file mode 100644 index 0000000000..82c782d74b --- /dev/null +++ b/.archie/enrichments/w16.json @@ -0,0 +1,91 @@ +{ + "openmeter/sink/flushhandler": { + "purpose": "Async, decoupling layer that runs side-effect callbacks after the sink successfully flushes a batch of usage events to ClickHouse. It owns the generic queue+drain machinery (flushEventHandler) and a fan-out multiplexer (FlushEventHandlers); the concrete flush effect (ingest notifications) lives in the ingestnotification child.", + "patterns": [ + { + "name": "Interface-first FlushEventHandler", + "description": "Everything is wired against the FlushEventHandler interface (OnFlushSuccess/Start/WaitForDrain/Close) in types.go. Concrete handlers and the multiplexer both assert `var _ FlushEventHandler = (*T)(nil)`.", + "example": "var _ FlushEventHandler = (*flushEventHandler)(nil)" + }, + { + "name": "Constructor validates required deps then builds", + "description": "NewFlushEventHandler returns (FlushEventHandler, error) and rejects empty Name, nil Callback, nil Logger, nil MetricMeter before constructing; defaults applied for zero timeouts. No slog.Default() fallback.", + "example": "if opts.Logger == nil { return nil, errors.New(\"logger is required\") }" + }, + { + "name": "OnFlushSuccess is non-blocking and never re-does the write", + "description": "OnFlushSuccess only enqueues the batch onto the buffered events channel (defaultFlushChanSize=1000) and records metrics; the actual callback runs on the background goroutine. It must never reverse the already-committed ClickHouse write.", + "example": "case f.events <- event: f.metrics.eventsReceived.Add(ctx, 1)" + }, + { + "name": "Background context with timeout for callbacks", + "description": "invokeCallbackWithTimeout deliberately uses context.Background() + CallbackTimeout (default 30s) so a canceled parent context still lets callbacks reach external systems; the parent trace span is re-attached via trace.ContextWithSpan.", + "example": "ctx, cancel := context.WithTimeout(context.Background(), f.callbackTimeout)" + }, + { + "name": "Graceful drain on shutdown", + "description": "On ctx.Done/stopChan the loop calls Close() (closes events channel under mutex), then drains remaining batches with a fresh drainTimeout context before closing drainDone. WaitForDrain blocks until drainDone.", + "example": "for event := range f.events { f.invokeCallback(drainContext, event) }" + }, + { + "name": "Idempotent close via sync.OnceFunc + atomic shutdown flag", + "description": "isShutdown (atomic.Bool) gates re-entry; all channel closes (eventsClose, stopChanClose, drainDoneClose) are wrapped in sync.OnceFunc so double-Close is safe.", + "example": "if f.isShutdown.Swap(true) { return nil }" + }, + { + "name": "Per-handler namespaced metrics", + "description": "newMetrics builds Int64Counters/Histogram keyed by handler name (sink.flush_handler..events_received etc). New handlers get isolated metric names via opts.Name.", + "example": "meter.Int64Counter(fmt.Sprintf(\"sink.flush_handler.%s.events_received\", handlerName))" + } + ], + "key_file_guides": [ + { + "file": "types.go", + "role": "Defines the FlushEventHandler interface and FlushCallback func type \u2014 the contract every handler and the mux satisfy.", + "watch_for": "Adding methods here forces updates to both flushEventHandler and FlushEventHandlers; keep the interface narrow." + }, + { + "file": "handler.go", + "role": "The generic async queue: NewFlushEventHandler, the start/drain goroutine loop, OnFlushSuccess enqueue, and timeout/trace handling.", + "watch_for": "events channel is closed under f.mu in Close(); OnFlushSuccess also takes f.mu \u2014 do not send on events outside this locking or you risk send-on-closed-channel. Callbacks intentionally run on context.Background(), not the request ctx." + }, + { + "file": "mux.go", + "role": "FlushEventHandlers fan-out: registers multiple handlers + OnDrainComplete hooks, joins per-handler errors on OnFlushSuccess/Close, runs onDrainComplete callbacks after all drains finish.", + "watch_for": "Start() short-circuits on the first error (returns immediately) whereas OnFlushSuccess/Close join all errors \u2014 the asymmetry is intentional." + }, + { + "file": "meters.go", + "role": "OTel metric set construction (eventsReceived/Processed/Failed, eventProcessingTime, eventChannelFull) namespaced by handler name.", + "watch_for": "Every counter creation can error; propagate it \u2014 don't ignore the err returns." + } + ], + "anti_patterns": [ + "Doing the callback work synchronously inside OnFlushSuccess instead of enqueueing \u2014 it would block the sink's flush path.", + "Returning an error from OnFlushSuccess that the caller treats as a flush failure, causing re-processing of already-committed ClickHouse writes.", + "Using the inbound request ctx (or context.TODO) for the callback instead of the background-context+timeout pattern, breaking external calls when the parent is canceled.", + "Sending on the events channel without holding f.mu, racing eventsClose() in Close() and panicking on send-on-closed-channel.", + "Implementing FlushEventHandler from scratch in a downstream package instead of wrapping NewFlushEventHandler and supplying only a FlushCallback." + ], + "decisions": [ + { + "decision": "Run callbacks on a background goroutine fed by a buffered channel rather than inline in OnFlushSuccess.", + "rationale": "Keeps the sink's flush latency independent of downstream notification work and lets the sink commit to ClickHouse without waiting on Kafka/eventbus publishes." + }, + { + "decision": "Callbacks execute on context.Background() with an explicit CallbackTimeout; only the trace span is propagated.", + "rationale": "A canceled parent (shutdown/request cancel) must not abort an external side-effect mid-flight; the timeout bounds the work instead while traces stay linked." + }, + { + "decision": "Provide a FlushEventHandlers multiplexer that aggregates handlers and joins errors.", + "rationale": "Multiple independent post-flush effects (e.g. ingest notifications) can be registered and drained together without each implementing lifecycle plumbing." + } + ], + "code_examples": [ + { + "scenario": "Wrap a side-effect callback as a flush handler and register it in the mux", + "code": "h, err := flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{\n Name: \"ingest_notification\",\n Logger: logger,\n MetricMeter: metricMeter,\n Callback: func(ctx context.Context, msgs []models.SinkMessage) error {\n return publishIngestEvents(ctx, msgs)\n },\n})\nif err != nil { return err }\nmux := flushhandler.NewFlushEventHandlers()\nmux.AddHandler(h)\n_ = mux.Start(ctx)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w17.json b/.archie/enrichments/w17.json new file mode 100644 index 0000000000..b7d381daee --- /dev/null +++ b/.archie/enrichments/w17.json @@ -0,0 +1,297 @@ +{ + "openmeter/meterevent": { + "purpose": "Domain root for reading raw metering events back out of the streaming store (ClickHouse). Defines the meterevent.Service interface (ListEvents v1 and cursor-paginated ListEventsV2), the enriched Event value type, and the param/validation contracts; children split into adapter (streaming-backed query) and httphandler (HTTP transport).", + "patterns": [ + { + "name": "Service interface defined at package root", + "description": "service.go declares the Service interface with ListEvents/ListEventsV2; adapter and httphandler depend on this interface, never on each other's concrete types.", + "example": "type Service interface { ListEvents(...); ListEventsV2(...) }" + }, + { + "name": "Params carry their own Validate()", + "description": "Each input struct (ListEventsParams, ListEventsV2Params) implements Validate() that accumulates into var errs []error and returns errors.Join(errs...); field errors wrapped with fmt.Errorf(\"field: %w\", err).", + "example": "if i.Namespace == \"\" { errs = append(errs, errors.New(\"namespace is required\")) }" + }, + { + "name": "Event implements pagination.Item via Cursor()", + "description": "var _ pagination.Item = (*Event)(nil); Cursor() switches on Event.SortBy (EventSortFieldIngestedAt/StoredAt/Time) and pairs the matching timestamp with StoreRowID as the keyset tiebreak.", + "example": "case streaming.EventSortFieldIngestedAt: return pagination.NewCursor(e.IngestedAt, e.StoreRowID)" + }, + { + "name": "Cursor column must match query ORDER BY", + "description": "SortBy on the Event must be the same column used to build the streaming query, or keyset pagination loses/duplicates rows. The adapter must propagate SortBy onto each returned Event.", + "example": "default: // EventSortFieldTime and zero value -> pagination.NewCursor(e.Time, e.StoreRowID)" + }, + { + "name": "Time-window and limit bounds are hard constants", + "description": "MaximumFromDuration (32 days) and MaximumLimit (100) bound every query; From must be after now-MaximumFromDuration and Limit in [1, MaximumLimit].", + "example": "minimumFrom := time.Now().Add(-MaximumFromDuration)" + }, + { + "name": "CustomerID filter supports only $in", + "description": "ListEventsV2Params.Validate rejects a CustomerID FilterString that is non-empty but has In == nil.", + "example": "if !p.CustomerID.IsEmpty() && p.CustomerID.In == nil { errs = append(errs, errors.New(\"customer id filter supports only in\")) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service interface, Event type, ListEventsParams/ListEventsV2Params with Validate(), MaximumFromDuration/MaximumLimit constants, and Event.Cursor().", + "watch_for": "Event.Cursor() must stay in sync with the streaming ORDER BY; adding a new EventSortField requires a new switch case and SortBy.Validate() acceptance." + }, + { + "file": "service_test.go", + "role": "Table-driven tests for ListEventsV2Params.Validate and Event.Cursor across all SortBy values.", + "watch_for": "Cursor tests assert StoreRowID is always the tiebreak ID regardless of SortBy; keep that invariant when editing Cursor()." + } + ], + "anti_patterns": [ + "Returning an error from list when a single event fails validation/customer-lookup instead of attaching to Event.ValidationErrors.", + "Letting Event.SortBy diverge from the column the adapter sorted by \u2014 breaks keyset pagination.", + "Allowing a CustomerID FilterString with Eq (anything other than In) through Validate.", + "Skipping params.Validate() at the top of a Service method.", + "Bypassing the 32-day / limit-100 bounds when adding new query paths." + ], + "decisions": [ + { + "decision": "Events are read from the streaming store and enriched (customer-ID, meter validation) in the adapter, not in the streaming layer.", + "rationale": "Keeps streaming.Connector domain-agnostic; meterevent owns the enriched Event shape and per-event validation semantics." + }, + { + "decision": "Two list methods (v1 slice, v2 cursor) coexist on one interface.", + "rationale": "v1 is the legacy ingested-event listing; v2 adds AIP-style FilterString/FilterTime filters and keyset pagination without breaking v1 callers." + } + ], + "code_examples": [ + { + "scenario": "Cursor selection keyed on SortBy", + "code": "func (e Event) Cursor() pagination.Cursor {\n\tswitch e.SortBy {\n\tcase streaming.EventSortFieldIngestedAt:\n\t\treturn pagination.NewCursor(e.IngestedAt, e.StoreRowID)\n\tcase streaming.EventSortFieldStoredAt:\n\t\treturn pagination.NewCursor(e.StoredAt, e.StoreRowID)\n\tdefault:\n\t\treturn pagination.NewCursor(e.Time, e.StoreRowID)\n\t}\n}" + } + ] + }, + "openmeter/meterexport": { + "purpose": "Domain root for exporting/replaying meter data: defines the meterexport.Service interface that re-queries existing meter values and re-emits them as synthetic, pre-aggregated streaming.RawEvent records (one event per WindowSize). The single child (service) holds the channel/errgroup streaming implementation.", + "patterns": [ + { + "name": "Service interface + config/param types at root", + "description": "service.go declares the Service interface (GetTargetMeterDescriptor, ExportSyntheticMeterData, ExportSyntheticMeterDataIter), TargetMeterDescriptor, DataExportConfig, and DataExportParams. The concrete impl lives in package meterexportservice.", + "example": "type Service interface { GetTargetMeterDescriptor(...); ExportSyntheticMeterData(...); ExportSyntheticMeterDataIter(...) }" + }, + { + "name": "Streaming export via channels, errors out-of-band", + "description": "ExportSyntheticMeterData(ctx, params, result chan<- streaming.RawEvent, err chan<- error) returns an error only if it fails to START; per-item failures go on the err channel and callers cancel ctx to stop.", + "example": "ExportSyntheticMeterData(ctx, params, result chan<- streaming.RawEvent, err chan<- error) error" + }, + { + "name": "Iterator wrapper mirrors the channel API", + "description": "ExportSyntheticMeterDataIter returns iter.Seq2[streaming.RawEvent, error]; breaking the range loop auto-cancels the operation and errors are yielded inline with a zero-valued event.", + "example": "for event, err := range seq { if err != nil { ... } process(event) }" + }, + { + "name": "Config/Params validate by accumulation", + "description": "DataExportConfig.Validate and DataExportParams.Validate collect into var errs []error and return errors.Join(errs...); Params embeds DataExportConfig and adds a timeutil.StartBoundedPeriod.", + "example": "if c.ExportWindowSize == \"\" { errs = append(errs, errors.New(\"export window size is required\")) }" + }, + { + "name": "Timezone-aware JSON via custom Marshal/Unmarshal", + "description": "DataExportConfig has explicit MarshalJSON/UnmarshalJSON that serialize *time.Location as its IANA name string (empty => nil) using the dataExportConfigJSON shadow struct.", + "example": "if raw.ExportWindowTimeZone != \"\" { loc, err := time.LoadLocation(raw.ExportWindowTimeZone); ... }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service interface, TargetMeterDescriptor, DataExportConfig/DataExportParams with Validate() and JSON marshalling.", + "watch_for": "ExportWindowTimeZone is a *time.Location; nil marshals to \"\" and does NOT round-trip back to a non-nil location. Only SUM and COUNT meters are supported; GroupBy/Customers not honored." + }, + { + "file": "service_test.go", + "role": "JSON round-trip and UnmarshalJSON tests for DataExportConfig, including the invalid-timezone error path.", + "watch_for": "Round-trip assertions skip the nil-timezone case on purpose; preserve that when changing marshalling." + } + ], + "anti_patterns": [ + "Returning a runtime error from the export mid-stream instead of sending it to the err channel.", + "Closing the result/err channels anywhere other than the producer's top-level defer.", + "Adding GroupBy/Customer/ClientID query support without honoring the documented unsupported-param rejects.", + "Assuming a nil ExportWindowTimeZone round-trips through JSON (it serializes to empty and decodes to nil)." + ], + "decisions": [ + { + "decision": "Export is streamed via channels + errgroup rather than collecting a slice.", + "rationale": "Meters can hold huge event volumes; pre-aggregating one event per WindowSize and streaming avoids buffering the entire reconstruction in memory." + }, + { + "decision": "Both a channel API and an iter.Seq2 wrapper are exposed.", + "rationale": "The channel form gives callers explicit lifecycle/cancellation control; the iterator form is ergonomic for simple range-loop consumers with inline error handling." + } + ], + "code_examples": [ + { + "scenario": "Streaming export interface signature", + "code": "// per-item errors go to the err channel; a returned error only means start failed\nExportSyntheticMeterData(\n\tctx context.Context,\n\tparams DataExportParams,\n\tresult chan<- streaming.RawEvent,\n\terr chan<- error,\n) error" + } + ] + }, + "openmeter/namespace": { + "purpose": "Foundational tenancy package: defines the Manager that fans namespace create/delete across registered Handlers (one per component) plus the namespacedriver seam that resolves the active tenant from request context. Imported by nearly every httpdriver, so it must stay dependency-light.", + "patterns": [ + { + "name": "Manager fans out to registered Handlers", + "description": "Manager.CreateNamespace/DeleteNamespace iterate config.Handlers, calling each Handler.CreateNamespace/DeleteNamespace and joining errors. Components register via RegisterHandler.", + "example": "for _, handler := range m.config.Handlers { err := handler.CreateNamespace(ctx, name); ... }" + }, + { + "name": "Handler is a two-method per-component interface", + "description": "Each component that owns namespace-scoped state implements Handler{CreateNamespace, DeleteNamespace}; an empty name means the default namespace.", + "example": "type Handler interface { CreateNamespace(ctx, name) error; DeleteNamespace(ctx, name) error }" + }, + { + "name": "Constructor + invariant guards", + "description": "NewManager requires a non-empty DefaultNamespace and rejects nil handlers; CreateNamespace rejects empty names; DeleteNamespace refuses to delete the default namespace.", + "example": "if name == m.config.DefaultNamespace { return errors.New(\"cannot delete default namespace\") }" + }, + { + "name": "Handler list guarded by RWMutex", + "description": "config.Handlers is read under m.mu.RLock during create/delete and written under m.mu.Lock in RegisterHandler, so registration is safe to call after construction.", + "example": "m.mu.RLock(); defer m.mu.RUnlock()" + }, + { + "name": "Errors joined, not short-circuited", + "description": "createNamespace/deleteNamespace collect each handler's error and return errors.Join(errs...) so one failing component does not skip the others (resiliency TODO noted in code).", + "example": "errs = append(errs, err); ... return errors.Join(errs...)" + } + ], + "key_file_guides": [ + { + "file": "namespace.go", + "role": "Manager, ManagerConfig, Handler interface, and CreateNamespace/DeleteNamespace/CreateDefaultNamespace/RegisterHandler orchestration.", + "watch_for": "No rollback/retry yet (TODO); a partial failure across handlers leaves namespaces half-created. The default namespace cannot be deleted." + }, + { + "file": "namespace_test.go", + "role": "Tests Manager create/delete/register fan-out using an in-memory fakeHandler.", + "watch_for": "fakeHandler guards its map with a mutex; keep handler implementations concurrency-safe." + } + ], + "anti_patterns": [ + "Adding domain/DB/auth dependencies to this package \u2014 it is a leaf imported by nearly every httpdriver and must avoid import cycles.", + "Short-circuiting handler iteration on the first error instead of joining all errors.", + "Allowing deletion of the configured DefaultNamespace.", + "Reading the active namespace from request body/query rather than from context via the namespacedriver decoder." + ], + "decisions": [ + { + "decision": "Namespace creation is orchestrated through per-component Handlers registered on a central Manager.", + "rationale": "Each component (billing, entitlement, etc.) provisions its own namespace-scoped state; the Manager decouples the orchestration from the components." + }, + { + "decision": "namespacedriver exposes namespace resolution as a one-method NamespaceDecoder interface returning (string, bool).", + "rationale": "Handlers depend on the interface so the source of the namespace (static config today, auth-derived later) can change without touching every httpdriver." + } + ], + "code_examples": [ + { + "scenario": "Fan-out create with joined errors", + "code": "func (m *Manager) createNamespace(ctx context.Context, name string) error {\n\tvar errs []error\n\tm.mu.RLock()\n\tdefer m.mu.RUnlock()\n\tfor _, handler := range m.config.Handlers {\n\t\tif err := handler.CreateNamespace(ctx, name); err != nil {\n\t\t\terrs = append(errs, err)\n\t\t}\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + }, + "openmeter/portal": { + "purpose": "Domain root for the customer-facing portal: defines portal.Service for minting/validating namespace-scoped, meter-slug-restricted JWT tokens that grant subjects read access. Children split into adapter (HS256 token mint/verify), authenticator (OpenAPI-driven Bearer middleware), and httphandler (token CRUD transport).", + "patterns": [ + { + "name": "Service is a token-management interface", + "description": "service.go declares Service = PortalTokenService{CreateToken, Validate, ListTokens, InvalidateToken}. Tokens are stateless signed JWTs, so ListTokens/InvalidateToken are unimplemented by design in the adapter.", + "example": "type PortalTokenService interface { CreateToken(...); Validate(...); ListTokens(...); InvalidateToken(...) }" + }, + { + "name": "Inputs validate by accumulation", + "description": "CreateTokenInput/ListTokensInput/InvalidateTokenInput each implement Validate() collecting into var errs []error and returning errors.Join(errs...); empty errs returns nil.", + "example": "if i.Namespace == \"\" { errs = append(errs, fmt.Errorf(\"namespace is required\")) }" + }, + { + "name": "Token string only ever leaves on creation", + "description": "PortalToken.Token is a *string documented \"Only set when creating a token\"; the standard mapper omits it so list/get never leak the secret.", + "example": "Token *string // Only set when creating a token." + }, + { + "name": "Empty AllowedMeterSlugs means all meters", + "description": "PortalTokenClaims.AllowedMeterSlugs empty list = all slugs allowed; CreateTokenInput.Validate rejects individual empty-string slugs but accepts an empty list.", + "example": "for _, slug := range *i.AllowedMeterSlugs { if slug == \"\" { errs = append(errs, fmt.Errorf(\"allowed meter slug cannot be empty\")) } }" + }, + { + "name": "InvalidateToken needs id or subject", + "description": "InvalidateTokenInput.Validate requires at least one of ID/Subject and rejects empty-but-present values.", + "example": "if i.ID == nil && i.Subject == nil { errs = append(errs, fmt.Errorf(\"either id or subject must be provided\")) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service/PortalTokenService interfaces, PortalToken/PortalTokenClaims types, and the three Input structs with Validate().", + "watch_for": "ListTokens/InvalidateToken are stateless-JWT no-ops in the adapter \u2014 do not assume DB-backed behavior. PortalToken.Token must stay omitted from list/get mappings." + } + ], + "anti_patterns": [ + "Mapping PortalToken.Token into any response other than CreateToken \u2014 leaks the secret.", + "Relaxing JWT parser options (WithIssuer/WithValidMethods/WithExpirationRequired) in the adapter \u2014 enables forgery / alg confusion.", + "Returning fake success from ListTokens/InvalidateToken instead of the by-design not-implemented behavior.", + "Creating a token without validating AllowedMeterSlugs against meter.Service in the handler.", + "Reading the namespace from request params instead of the namespace decoder." + ], + "decisions": [ + { + "decision": "Portal tokens are stateless HS256 JWTs, not DB rows.", + "rationale": "Tokens are self-validating (namespace + subject + allowed meter slugs + expiry in claims), so listing/invalidation of arbitrary tokens is not supported." + }, + { + "decision": "Authentication is generic over OpenAPI 3 security requirements rather than hardcoded per route.", + "rationale": "The authenticator resolves schemes by name from api.PortalTokenAuthScopes and tries requirements in order, so adding/removing auth is spec-driven." + } + ], + "code_examples": [ + { + "scenario": "CreateTokenInput validation with joined errors", + "code": "func (i CreateTokenInput) Validate() error {\n\tvar errs []error\n\tif i.Namespace == \"\" { errs = append(errs, fmt.Errorf(\"namespace is required\")) }\n\tif i.Subject == \"\" { errs = append(errs, fmt.Errorf(\"subject is required\")) }\n\tif i.ExpiresAt != nil && i.ExpiresAt.Before(time.Now()) {\n\t\terrs = append(errs, fmt.Errorf(\"expiration date must be in the future\"))\n\t}\n\tif len(errs) > 0 { return errors.Join(errs...) }\n\treturn nil\n}" + } + ] + }, + "openmeter/watermill/driver": { + "purpose": "Structural folder owning the Watermill message.Publisher/Subscriber transport implementations. It splits by concrete transport: kafka/ is the real Sarama-backed production driver; noop/ is the null publisher that silently discards messages when event publishing is disabled. Both feed openmeter/watermill/eventbus, which selects between them.", + "patterns": [ + { + "name": "Transport selection lives above this folder", + "description": "Driver subpackages only construct a Publisher/Subscriber; the choice of kafka vs noop is made by the consumer (eventbus / app wiring), not inside a driver. Keep drivers ignorant of when they are chosen.", + "example": "eventbus uses noop.Publisher{} when publishing is disabled, else the kafka publisher from broker.go" + }, + { + "name": "Every driver satisfies the same Watermill contract via compile-time assertion", + "description": "Each concrete driver must assert the Watermill interface it implements so a transport swap stays type-safe.", + "example": "noop/publisher.go: var _ message.Publisher = (*Publisher)(nil)" + }, + { + "name": "Config-driven construction with explicit dependency injection", + "description": "The real driver (kafka) takes an Options/BrokerOptions struct validated via Validate() before building Sarama/Watermill objects; loggers and meters are injected, never defaulted via slog.Default().", + "example": "kafka/broker.go: in.Validate() then createKafkaConfig(role) before publisher/subscriber creation" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Adding a new transport that skips the message.Publisher/Subscriber compile-time interface assertion \u2014 breaks the swappability contract eventbus relies on.", + "Pushing transport-selection logic (kafka-vs-noop) down into a driver subpackage instead of keeping it in eventbus/app wiring.", + "Leaking Sarama/Kafka config or partition-key logic into the noop driver \u2014 noop must stay dependency-free and side-effect-free." + ], + "decisions": [ + { + "decision": "Drivers are split by concrete transport (kafka, noop) as sibling subpackages rather than one package with a mode flag.", + "rationale": "Lets noop stay zero-dependency and trivially value-receiver based, while kafka pulls in Sarama, SASL/SCRAM, and OTel metrics without leaking those concerns into the disabled path." + }, + { + "decision": "The null/disabled publisher is a real driver (noop) rather than a nil publisher or per-call-site guards.", + "rationale": "Consumers always hold a valid message.Publisher, so publish call sites need no nil checks regardless of whether eventing is enabled." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w18.json b/.archie/enrichments/w18.json new file mode 100644 index 0000000000..ed3a8c2366 --- /dev/null +++ b/.archie/enrichments/w18.json @@ -0,0 +1,437 @@ +{ + "openmeter/registry": { + "purpose": "In-domain composition layer that bundles the entitlement/credit/grant/feature connectors into a single registry.Entitlement aggregate struct, so downstream wiring (app/common DI, tests) consumes one struct instead of nine separate connectors. The domain-side counterpart to app/common's Wire registries.", + "patterns": [ + { + "name": "Aggregate-struct registry", + "description": "registry.Entitlement is a plain struct of interface-typed fields, no methods; it only groups connectors built elsewhere.", + "example": "Entitlement{ Feature, FeatureRepo, EntitlementOwner, CreditBalance, Grant, GrantRepo, MeteredEntitlement, Entitlement, EntitlementRepo }" + }, + { + "name": "Interface-typed fields only", + "description": "Every field is an interface (feature.FeatureConnector, credit.BalanceConnector, grant.OwnerConnector, entitlement.Service, ...) \u2014 no concrete adapters stored here.", + "example": "CreditBalance credit.BalanceConnector" + }, + { + "name": "Assembly lives in builder/", + "description": "The struct is declared here; the only assembly function (GetEntitlementRegistry) lives in registry/builder and is the single entry point that populates all fields.", + "example": "registry/builder/entitlement.go" + } + ], + "key_file_guides": [ + { + "file": "entitlement.go", + "role": "Declares the registry.Entitlement aggregate struct grouping feature/credit/grant/entitlement connectors.", + "watch_for": "Adding a field here means builder/ must populate it; a nil field returned from the builder breaks downstream consumers." + } + ], + "anti_patterns": [ + "Adding business logic, queries, or methods to registry.Entitlement \u2014 it is a pure container.", + "Storing concrete adapter types instead of the connector/service interfaces.", + "Building the registry anywhere other than registry/builder.GetEntitlementRegistry." + ], + "decisions": [ + { + "decision": "Keep entitlement-stack wiring in an in-domain builder separate from app/common Wire registries.", + "rationale": "Tests need a fully-wired entitlement system without the full Wire graph." + } + ], + "code_examples": [ + { + "scenario": "The aggregate struct exposed to downstream wiring", + "code": "type Entitlement struct {\n\tFeature feature.FeatureConnector\n\tFeatureRepo feature.FeatureRepo\n\tEntitlementOwner grant.OwnerConnector\n\tCreditBalance credit.BalanceConnector\n\tGrant credit.GrantConnector\n\tGrantRepo grant.Repo\n\tMeteredEntitlement meteredentitlement.Connector\n\tEntitlement entitlement.Service\n\tEntitlementRepo entitlement.EntitlementRepo\n}" + } + ] + }, + "openmeter/secret": { + "purpose": "Defines the Adapter and Service interfaces for storing/retrieving app secrets (e.g. Stripe API keys); the package root holds only interface declarations while entity/, service/, and adapter/ hold the types, validate-and-delegate service, and the in-memory plaintext implementation respectively.", + "patterns": [ + { + "name": "Interface-only package root", + "description": "secret.go and adapter.go declare Service/Adapter interfaces (each composing a single SecretService/SecretAdapter); no implementations live at the root.", + "example": "type Service interface { SecretService }" + }, + { + "name": "Mirrored Service/Adapter contracts", + "description": "Service and Adapter expose the identical CreateAppSecret/UpdateAppSecret/GetAppSecret/DeleteAppSecret method set \u2014 service validates then delegates to adapter.", + "example": "GetAppSecret(ctx, input secretentity.GetAppSecretInput) (secretentity.Secret, error)" + }, + { + "name": "Input/output types live in entity/", + "description": "All method signatures take secretentity.* input structs and return secretentity.SecretID/Secret; never raw strings.", + "example": "secretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Declares Adapter/SecretAdapter \u2014 the storage contract implemented by secret/adapter.", + "watch_for": "GetAppSecret in the default adapter echoes input.ID back as the value; it is not a real lookup." + }, + { + "file": "service.go", + "role": "Declares Service/SecretService \u2014 the validation boundary implemented by secret/service.", + "watch_for": "The service is the only layer that validates; do not skip input.Validate() there." + } + ], + "anti_patterns": [ + "Putting validation or business logic in the package-root interfaces or the adapter \u2014 validation belongs only in secret/service.", + "Adding a method to Service without adding the matching method to Adapter (they must stay mirrored).", + "Threading raw secret strings instead of secretentity.SecretID/Secret types." + ], + "decisions": [ + { + "decision": "Split Service and Adapter into separate interfaces with identical method sets.", + "rationale": "Lets a real secret store replace the in-memory plaintext adapter without touching the service or callers." + } + ], + "code_examples": [ + { + "scenario": "The storage contract every secret adapter must satisfy", + "code": "type SecretAdapter interface {\n\tCreateAppSecret(ctx context.Context, input secretentity.CreateAppSecretInput) (secretentity.SecretID, error)\n\tUpdateAppSecret(ctx context.Context, input secretentity.UpdateAppSecretInput) (secretentity.SecretID, error)\n\tGetAppSecret(ctx context.Context, input secretentity.GetAppSecretInput) (secretentity.Secret, error)\n\tDeleteAppSecret(ctx context.Context, input secretentity.DeleteAppSecretInput) error\n}" + } + ] + }, + "openmeter/server": { + "purpose": "HTTP server assembly: NewServer wires the chi router, OpenAPI validation/auth middleware, the v3 API (api/v3/server) and the legacy v1/v2 Router (server/router) into one *Server. It owns transport-level concerns \u2014 middleware stacks, CORS, error mapping \u2014 never domain logic.", + "patterns": [ + { + "name": "Two route groups under one chi router", + "description": "NewServer registers v3 routes via v3server.NewServer(...).RegisterRoutes in one chi.Group and the legacy api.HandlerWithOptions(impl,...) in another, both fed the same materialized hook middlewares.", + "example": "hookMiddlewares := collectMiddlewareHooks(config.RouterHooks.Middlewares)" + }, + { + "name": "Hook middlewares materialized once", + "description": "MiddlewareHooks are run a single time into a flat slice via collectMiddlewareHooks/middlewareCollector and reused for both groups; running hooks per-group would execute bodies twice.", + "example": "v3Middlewares := append([]server.MiddlewareFunc{}, hookMiddlewares...)" + }, + { + "name": "OpenAPI-driven validation + auth middleware", + "description": "Legacy group uses authenticator.NewAuthenticator(...) + oapimiddleware.OapiRequestValidatorWithOptions(swagger,...) with ExcludeReadOnlyValidations and a NoopAuthenticationFunc.", + "example": "swagger.Servers = nil // skip server-name validation" + }, + { + "name": "Typed param-error mapping", + "description": "errorHandlerReply switches on api.*ParamError types and maps each to models.NewStatusProblem with the right HTTP status.", + "example": "case *api.RequiredParamError: ... http.StatusBadRequest" + }, + { + "name": "Default namespace via StaticNamespaceDecoder", + "description": "Both the v3 server and the legacy Router resolve namespace from NamespaceManager.GetDefaultNamespace() through namespacedriver.StaticNamespaceDecoder.", + "example": "NamespaceDecoder: namespacedriver.StaticNamespaceDecoder(...)" + } + ], + "key_file_guides": [ + { + "file": "server.go", + "role": "NewServer: assembles chi router, middleware stacks, v3 + legacy route groups, OpenAPI validation, and error handling.", + "watch_for": "v3 and legacy groups must receive the same hookMiddlewares slice; re-invoking hooks per group double-runs side effects. Every RouterConfig.* field passed to v3server.Config must be wired by the caller." + }, + { + "file": "cors.go", + "role": "corsHandler wraps go-chi/cors to apply CORS only to AllowedPaths prefixes (else pass through).", + "watch_for": "Empty AllowedPaths applies CORS to ALL paths." + }, + { + "file": "router/", + "role": "Implements the generated legacy api.ServerInterface as the *Router passed as impl to api.HandlerWithOptions.", + "watch_for": "Router methods must match the generated ServerInterface signatures and contain no business logic." + } + ], + "anti_patterns": [ + "Putting domain logic, DB queries, or validation in server.go \u2014 it is transport assembly only.", + "Calling RouterHooks.Middlewares hooks separately per route group instead of once via collectMiddlewareHooks.", + "Bypassing models.NewStatusProblem / errorHandlerReply when emitting HTTP error responses.", + "Leaving swagger.Servers populated (re-enables server-name validation that breaks unknown deployments)." + ], + "decisions": [ + { + "decision": "Mount v3 and legacy v1/v2 APIs as separate chi groups within one server.", + "rationale": "Each version has its own generated handler set and validation, but must share the same OTEL/logging middleware stack." + }, + { + "decision": "Materialize MiddlewareHooks once before mounting either group.", + "rationale": "Avoids double-running hook bodies, which is unsafe for hooks with construction side effects." + } + ], + "code_examples": [ + { + "scenario": "Mapping generated OpenAPI param errors to HTTP problems", + "code": "func errorHandlerReply(w http.ResponseWriter, r *http.Request, err error) {\n\tswitch e := err.(type) {\n\tcase *api.RequiredParamError:\n\t\terr := fmt.Errorf(\"required param missing %s: %w\", e.ParamName, err)\n\t\tmodels.NewStatusProblem(r.Context(), err, http.StatusBadRequest).Respond(w)\n\tdefault:\n\t\terr := fmt.Errorf(\"unhandled server error: %w\", err)\n\t\tmodels.NewStatusProblem(r.Context(), err, http.StatusInternalServerError).Respond(w)\n\t}\n}" + } + ] + }, + "openmeter/streaming": { + "purpose": "Defines the streaming.Connector interface (embedding namespace.Handler) for reading/aggregating metered usage out of ClickHouse, plus the shared param structs (QueryParams, ListEventsParams/V2, ListSubjectsParams, ListGroupByValuesParams) and the RawEvent/CustomerUsageAttribution value types. Concrete impls live in clickhouse/, retry/, and testutils/.", + "patterns": [ + { + "name": "Self-validating param structs", + "description": "Every params type has a Validate() that collects into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) (or errors.Join for ListEvents*). Callers/impls must Validate before querying.", + "example": "return models.NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "RawEvent dual-tagged for ClickHouse + JSON", + "description": "RawEvent fields carry both `ch:\"...\"` (ClickHouse column) and `json:\"...\"` tags; Namespace is `json:\"-\"` and stored_at/ingested_at use omitempty,omitzero.", + "example": "Time time.Time `ch:\"time\" json:\"time\"`" + }, + { + "name": "Usage attribution by key/subject, never by ID", + "description": "CustomerUsageAttribution attributes usage via Key + SubjectKeys (GetValues); ID exists only to map subjects to customers and is excluded from attribution values.", + "example": "NewCustomerUsageAttribution(id, key, subjectKeys)" + }, + { + "name": "Group-by/filter ambiguity guards", + "description": "QueryParams.Validate rejects multiple subject/customer filters unless the matching group-by is present, and requires a customer filter when grouping by customer_id.", + "example": "len(p.FilterCustomer) > 1 && !slices.Contains(p.GroupBy, \"customer_id\")" + }, + { + "name": "EventSortField allowlist with zero-value default", + "description": "EventSortField.Validate treats \"\" as valid (resolved to time at query time) and rejects anything outside Values(); used by ListEventsV2Params.SortBy.", + "example": "EventSortFieldTime / EventSortFieldIngestedAt / EventSortFieldStoredAt" + } + ], + "key_file_guides": [ + { + "file": "connector.go", + "role": "Declares the Connector interface (CountEvents/ListEvents/ListEventsV2/ListSubjects/ListGroupByValues/QueryMeter/BatchInsert/ValidateJSONPath), RawEvent, and the list-subjects/group-by param validators.", + "watch_for": "Connector embeds namespace.Handler \u2014 impls must implement CreateNamespace/DeleteNamespace too; ListGroupByValues caps the window at 30 days and rejects From older than 90 days." + }, + { + "file": "query_params.go", + "role": "QueryMeter input (QueryParams) with the filter/group-by ambiguity validation rules.", + "watch_for": "Adding a filter field without adding its ambiguity guard can produce ambiguous aggregation results." + }, + { + "file": "eventparams.go", + "role": "ListEventsParams / ListEventsV2Params plus EventSortField; V2 uses pkg/filter.FilterString/FilterTime and a pagination.Cursor.", + "watch_for": "V2 filters validate via ValidateWithComplexity(1); ListEvents Validate returns plain errors.Join (not the generic-validation wrapper)." + }, + { + "file": "usageattribution.go", + "role": "Customer interface + CustomerUsageAttribution (Validate/GetValues/Equal).", + "watch_for": "Validate requires an ID and at least one of Key or non-empty SubjectKeys; Equal compares SubjectKeys order-sensitively." + }, + { + "file": "defaults.go", + "role": "MinimumWindowSize / MinimumWindowSizeDuration constants (1 second).", + "watch_for": "These bound the smallest representable aggregation window." + } + ], + "anti_patterns": [ + "Adding a Connector method or params field without a Validate() rule on its param struct.", + "Attributing usage to a customer by ID instead of Key/SubjectKeys.", + "Dropping the `ch` or `json` tag on a RawEvent field, or giving Namespace a JSON tag (it is `json:\"-\"`).", + "Allowing multiple subject/customer filters without the corresponding group-by, or customer_id group-by without a customer filter.", + "Implementing CreateNamespace/DeleteNamespace to create/drop tables \u2014 the events table is shared across namespaces (see clickhouse/)." + ], + "decisions": [ + { + "decision": "Connector embeds namespace.Handler.", + "rationale": "Usage storage participates in namespace provisioning lifecycle even though the ClickHouse events table is shared." + }, + { + "decision": "Usage attribution carries ID separately from attribution values.", + "rationale": "ID is needed to map subjects to customers but usage is attributed only by key/subject keys." + } + ], + "code_examples": [ + { + "scenario": "The usage read/aggregation contract over ClickHouse", + "code": "type Connector interface {\n\tnamespace.Handler\n\n\tCountEvents(ctx context.Context, namespace string, params CountEventsParams) ([]CountEventRow, error)\n\tListEvents(ctx context.Context, namespace string, params ListEventsParams) ([]RawEvent, error)\n\tListEventsV2(ctx context.Context, params ListEventsV2Params) ([]RawEvent, error)\n\tListSubjects(ctx context.Context, params ListSubjectsParams) ([]string, error)\n\tListGroupByValues(ctx context.Context, params ListGroupByValuesParams) ([]string, error)\n\tQueryMeter(ctx context.Context, namespace string, meter meter.Meter, params QueryParams) ([]meter.MeterQueryRow, error)\n\tBatchInsert(ctx context.Context, events []RawEvent) error\n\tValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)\n}" + } + ] + }, + "openmeter/taxcode": { + "purpose": "Domain package for tax codes and per-namespace OrganizationDefaultTaxCodes: the root declares the Service/Repository interfaces, all input/domain types (TaxCode, TaxCodeAppMappings, OrganizationDefaultTaxCodes), ValidationIssue-based errors, system-managed annotations, and a namespace.Handler that seeds tax codes on namespace creation. adapter/ (Ent), service/, and testutils/ implement and test it.", + "patterns": [ + { + "name": "ValidationIssue error catalog", + "description": "errors.go declares package-level models.ErrorCode constants + models.NewValidationIssue vars (with HTTP status attributes) and typed detectors (IsTaxCodeNotFoundError, IsOrganizationDefaultTaxCodesNotFoundError, etc.).", + "example": "var ErrTaxCodeNotFound = models.NewValidationIssue(ErrCodeTaxCodeNotFound, ..., commonhttp.WithHTTPStatusCodeAttribute(http.StatusNotFound))" + }, + { + "name": "Errors-slice Validate", + "description": "Every input/domain Validate collects into var errs []error (NamespacedID/AppMappings/field checks) and returns models.NewNillableGenericValidationError(errors.Join(errs...)).", + "example": "_ models.Validator = (*CreateTaxCodeInput)(nil)" + }, + { + "name": "System-managed annotation marker", + "description": "annotations.go defines AnnotationKeyManagedBy / AnnotationValueManagedBySystem; TaxCode.IsManagedBySystem reads them; system-created codes are protected from update/delete.", + "example": "Annotations: models.Annotations{AnnotationKeyManagedBy: AnnotationValueManagedBySystem}" + }, + { + "name": "App-type-specific tax code format validation", + "description": "TaxCodeAppMapping.Validate switches on AppType (e.g. app.AppTypeStripe requires TaxCodeStripeRegexp `^txcd_\\d{8}$`); TaxCodeAppMappings enforces unique app types via lo.UniqBy.", + "example": "if !TaxCodeStripeRegexp.MatchString(t.TaxCode) { errs = append(errs, ErrTaxCodeStripeInvalid) }" + }, + { + "name": "Idempotent transactional namespace seeding", + "description": "NamespaceHandler.CreateNamespace runs all seed creates + org-default upsert in one transaction.RunWithNoValue, pre-listing existing codes and re-listing on a conflict (ensureTaxCode); validate() enforces exactly one DefaultInvoicing and one DefaultCreditGrant seed.", + "example": "transaction.RunWithNoValue(ctx, h.transactionManager, func(ctx) error {...})" + }, + { + "name": "Orphaned-key sentinel error", + "description": "ErrTaxCodeOrphanedKey (a plain errors.New, not a ValidationIssue) signals a key-exists-but-mapping-changed race to avoid poisoning the pg transaction (25P02).", + "example": "func IsTaxCodeOrphanedKeyError(err error) bool { return errors.Is(err, ErrTaxCodeOrphanedKey) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service = TaxCodeService + OrganizationDefaultTaxCodesService; declares all *Input types with Validate and the AllowAnnotations inputOptions.", + "watch_for": "GetOrCreateByAppMapping is service-only (not on Repository); IncludeDeleted on Get/List inputs is internal-only, never from API handlers." + }, + { + "file": "repository.go", + "role": "Repository = entutils.TxCreator + tax code + org-default persistence methods.", + "watch_for": "Repository has no GetOrCreateByAppMapping \u2014 that orchestration lives in the service inside a transaction." + }, + { + "file": "taxcode.go", + "role": "Domain types: TaxCode, TaxCodeAppMapping(s), OrganizationDefaultTaxCodes + Expand, with Validate/Equal/IsManagedBySystem/GetAppMapping.", + "watch_for": "TaxCode.Equal excludes ManagedModel timestamps, Metadata, and Annotations from comparison." + }, + { + "file": "errors.go", + "role": "Error code constants, ValidationIssue vars, constructors and Is* detectors.", + "watch_for": "ErrTaxCodeOrphanedKey is a plain error, not a ValidationIssue \u2014 detect with errors.Is, others with errors.As + Code()." + }, + { + "file": "namespacehandler.go", + "role": "NamespaceHandler implements namespace.Handler; seeds tax codes + org defaults idempotently in a transaction.", + "watch_for": "Config.validate() requires exactly one DefaultInvoicing and one DefaultCreditGrant seed; DeleteNamespace is intentionally a no-op." + }, + { + "file": "annotations.go", + "role": "Defines the managed-by annotation key/value used to mark system-created tax codes.", + "watch_for": "Only system-managed codes are protected from mutation; pre-existing codes without the annotation are left untouched by seeding." + } + ], + "anti_patterns": [ + "Returning raw errors from Validate() instead of wrapping with models.NewNillableGenericValidationError.", + "Detecting ErrTaxCodeOrphanedKey with errors.As/ValidationIssue instead of errors.Is (it is a plain sentinel).", + "Mutating or deleting a system-managed tax code without honoring AllowAnnotations / the IsManagedBySystem guard.", + "Running seed creation or org-default upsert outside the single CreateNamespace transaction.", + "Adding a Stripe app mapping whose tax code does not match the `^txcd_\\d{8}$` regexp." + ], + "decisions": [ + { + "decision": "Org defaults seeded require exactly one invoicing and one credit-grant seed.", + "rationale": "OrganizationDefaultTaxCodes must reference both a single invoicing and a single credit-grant tax code per namespace." + }, + { + "decision": "Use a typed sentinel ErrTaxCodeOrphanedKey for the create-conflict race.", + "rationale": "Prevents a raw pg constraint error (25P02) from poisoning the surrounding transaction." + }, + { + "decision": "Mark system-created codes via annotation rather than a DB column.", + "rationale": "IsManagedBySystem can gate update/delete protection without a schema change, and pre-existing user codes stay unmanaged." + } + ], + "code_examples": [ + { + "scenario": "Idempotent seeding of tax codes inside one transaction", + "code": "func (h *NamespaceHandler) CreateNamespace(ctx context.Context, ns string) error {\n\treturn transaction.RunWithNoValue(ctx, h.transactionManager, func(ctx context.Context) error {\n\t\tlisted, err := h.service.ListTaxCodes(ctx, ListTaxCodesInput{Namespace: ns})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"list tax codes: %w\", err)\n\t\t}\n\t\texistingByKey := lo.SliceToMap(listed.Items, func(tc TaxCode) (string, TaxCode) { return tc.Key, tc })\n\t\tvar invoicingID, creditGrantID string\n\t\tfor _, seed := range h.seeds {\n\t\t\tid, err := h.ensureTaxCode(ctx, ns, seed, existingByKey)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"seed tax code %q: %w\", seed.Key, err)\n\t\t\t}\n\t\t\tif seed.DefaultInvoicing { invoicingID = id }\n\t\t\tif seed.DefaultCreditGrant { creditGrantID = id }\n\t\t}\n\t\treturn nil\n\t})\n}" + } + ] + }, + "pkg/kafka": { + "purpose": "Shared Kafka utility package: typed librdkafka config builders (Consumer/Producer/Admin), an LRU-cached idempotent TopicProvisioner, and slog bridging for librdkafka's log channel. Consumed by ingest/kafkaingest, sink, watermill/driver/kafka, and the cmd/* entrypoints to construct confluent-kafka-go clients from validated OpenMeter config.", + "patterns": [ + { + "name": "Config types implement ConfigMapper + ConfigValidator", + "description": "Every config struct provides AsConfigMap() (kafka.ConfigMap, error) and Validate() error, asserted at package scope via compile-time `var _ ConfigMapper = (*T)(nil)` / `var _ ConfigValidator = (*T)(nil)` checks.", + "example": "var (_ ConfigMapper = (*ConsumerConfigParams)(nil); _ ConfigValidator = (*ConsumerConfigParams)(nil))" + }, + { + "name": "Composed config + mergeConfigsToMap", + "description": "Top-level ConsumerConfig/ProducerConfig embed CommonConfigParams plus a role-specific params struct; AsConfigMap delegates to mergeConfigsToMap(...) and Validate loops a []ConfigValidator returning the first error.", + "example": "func (c ConsumerConfig) AsConfigMap() (kafka.ConfigMap, error) { return mergeConfigsToMap(c.CommonConfigParams, c.ConsumerConfigParams) }" + }, + { + "name": "Only-set-if-nonzero ConfigMap keys", + "description": "AsConfigMap only calls m.SetKey(...) for non-zero fields (string != \"\", duration > 0), leaving librdkafka defaults intact otherwise; every SetKey error is wrapped/returned.", + "example": "if c.ClientID != \"\" { if err := m.SetKey(\"client.id\", c.ClientID); err != nil { return nil, err } }" + }, + { + "name": "String-enum types with configValue interface", + "description": "Enums (BrokerAddressFamily, AutoOffsetReset, Partitioner, TimeDurationMilliSeconds) implement fmt.Stringer + encoding.TextUnmarshaler + json.Unmarshaler, with UnmarshalJSON delegating to UnmarshalText, plus a ValidValues[T] slice for validation.", + "example": "func (s *BrokerAddressFamily) UnmarshalJSON(data []byte) error { return s.UnmarshalText(data) }" + }, + { + "name": "OTel metric creation with wrapped errors", + "description": "In NewTopicProvisioner each Meter.Int64Counter/Int64Gauge call is immediately followed by `if err != nil { return nil, fmt.Errorf(\"failed to create metric: : %w\", err) }`; metrics live in an anonymous struct field on topicProvisioner.", + "example": "provisioner.metrics.Errors, err = config.Meter.Int64Counter(\"topicprovisioner.errors\", ...)" + }, + { + "name": "Required-dependency constructor guards", + "description": "NewTopicProvisioner returns an error (never panics) when AdminClient, Logger, or Meter is nil; interface seams (AdminClient, TopicProvisioner, LogEmitter) enable mock tests.", + "example": "if config.Meter == nil { return nil, errors.New(\"meter is required\") }" + }, + { + "name": "Idempotent provisioning via LRU cache + benign-error tolerance", + "description": "Provision skips topics already in the expirable LRU cache; CreateTopics results with ErrNoError/ErrTopicAlreadyExists (or ErrNoError/ErrUnknownTopicOrPart on delete) are treated as success and cached, all other errors collected via errors.Join. DeProvision skips empty names and protectedTopics.", + "example": "case kafka.ErrNoError, kafka.ErrTopicAlreadyExists: _ = p.cache.Add(result.Topic, struct{}{})" + } + ], + "key_file_guides": [ + { + "file": "config.go", + "role": "All typed config structs (CommonConfigParams, ConsumerConfigParams, ProducerConfigParams, composed ConsumerConfig/ProducerConfig/AdminConfig), enum types, ValidValues[T], mergeConfigsToMap.", + "watch_for": "A new field needs both an AsConfigMap SetKey branch and (if validated) a Validate check; localhost/127.0.0.1 brokers auto-force broker.address.family=v4 when unset; setting TopicMetadataRefreshInterval also writes metadata.max.age.ms = 3x." + }, + { + "file": "topicprovisioner.go", + "role": "TopicProvisioner interface + topicProvisioner impl with LRU cache + OTel metrics; TopicConfig/TopicProvisionerConfig; TopicProvisionerNoop; AdminClient interface seam.", + "watch_for": "TopicConfig.Validate requires non-empty Name and Partitions > 0; ReplicationFactor/retention.ms only set when > 0; DeProvision silently skips protectedTopics \u2014 never bypass that guard." + }, + { + "file": "log.go", + "role": "Bridges librdkafka's go.logs.channel to *slog.Logger via LogEmitter, LogProcessor (execute/interrupt run-group pair), ConsumeLogChannel, and syslog->slog.Level mapping.", + "watch_for": "Requires go.logs.channel.enable=true (set in Consumer/Producer AsConfigMap); mapLogLevel maps 0-3->Error, 4->Warn, 5->Info, else Debug." + }, + { + "file": "kafka.go", + "role": "Package doc comment only.", + "watch_for": "No logic here; godoc anchor for the package." + }, + { + "file": "config_test.go", + "role": "Table-driven tests for config-map building, enum UnmarshalText/UnmarshalJSON round-trips, and Validate error messages.", + "watch_for": "New config keys must be added to ExpectedConfigMap; tests compare exact error strings, so changing a Validate message breaks them." + }, + { + "file": "topicprovisioner_test.go", + "role": "Tests provisioning via mockTopicProvisioner (an AdminClient mock) using a noop meter and testutils.NewDiscardLogger.", + "watch_for": "Uses noop.NewMeterProvider() and testutils.NewDiscardLogger(t) \u2014 mirror this for new provisioner tests." + } + ], + "anti_patterns": [ + "Adding a config struct without the `var _ ConfigMapper`/`var _ ConfigValidator` assertions, or implementing only one of AsConfigMap/Validate.", + "Unconditionally SetKey-ing a field (overriding librdkafka defaults) instead of guarding on the non-zero check, or ignoring the SetKey error.", + "Creating an OTel instrument in NewTopicProvisioner without the immediate `fmt.Errorf(\"failed to create metric: : %w\", err)` guard.", + "panicking or using slog.Default() in the provisioner instead of returning an error / requiring an injected *slog.Logger and metric.Meter.", + "Treating ErrTopicAlreadyExists (Provision) or ErrUnknownTopicOrPart (DeProvision) as hard failures, or deleting topics in protectedTopics." + ], + "decisions": [ + { + "decision": "Config is split into a shared CommonConfigParams plus role-specific params structs, composed into ConsumerConfig/ProducerConfig/AdminConfig.", + "rationale": "Common broker/SASL/stats/debug settings are reused across roles while consumer- and producer-only tuning stays type-segregated and independently validatable." + }, + { + "decision": "TopicProvisioner keeps an expirable LRU cache of provisioned topic names.", + "rationale": "Lets callers invoke Provision repeatedly with the same topic set without an extra round-trip to Kafka brokers for already-known topics." + }, + { + "decision": "Localhost brokers default broker.address.family to IPv4 when unset.", + "rationale": "OSX resolvers return IPv6 first, breaking local dev against localhost brokers (openmeter issue #321)." + } + ], + "code_examples": [ + { + "scenario": "Define a validated, config-mappable Kafka config struct", + "code": "var (\n\t_ ConfigMapper = (*ProducerConfigParams)(nil)\n\t_ ConfigValidator = (*ProducerConfigParams)(nil)\n)\n\ntype ProducerConfigParams struct {\n\tPartitioner Partitioner\n}\n\nfunc (p ProducerConfigParams) Validate() error {\n\tif p.Partitioner != \"\" && !slices.Contains(PartitionerValues, p.Partitioner) {\n\t\treturn errors.New(\"invalid partitioner config\")\n\t}\n\treturn nil\n}\n\nfunc (p ProducerConfigParams) AsConfigMap() (kafka.ConfigMap, error) {\n\tm := kafka.ConfigMap{\"go.logs.channel.enable\": true}\n\tif p.Partitioner != \"\" {\n\t\tif err := m.SetKey(\"partitioner\", p.Partitioner); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn m, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w19.json b/.archie/enrichments/w19.json new file mode 100644 index 0000000000..466f4cdfae --- /dev/null +++ b/.archie/enrichments/w19.json @@ -0,0 +1,29 @@ +{ + "pkg/framework/transport": { + "purpose": "Structural namespace owning the codebase's transport-layer handler primitives. Its sole child, httptransport, supplies the generic decode->operate->encode HTTP handler abstraction that every v3 handler and most openmeter/*/httpdriver packages build on (47 in-edges); the constraint is that everything here stays domain-agnostic.", + "patterns": [ + { + "name": "Transport primitives live one level down", + "description": "This folder has no direct source files; all handler machinery lives in the httptransport sub-package. New transport abstractions (e.g. a future grpctransport) belong as sibling sub-packages, not as files at this level.", + "example": "pkg/framework/transport/httptransport/{handler.go,argshandler.go,options.go}" + }, + { + "name": "Domain-agnostic transport layer", + "description": "Code under this tree depends only on framework primitives (pkg/framework/operation, pkg/framework/commonhttp, pkg/contextx, pkg/models) and the encoder subpackage, never on openmeter/* domain packages, so it stays a reusable foundation.", + "example": "httptransport wraps an operation.Operation; it never imports billing/customer/etc." + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Adding domain-specific handler code directly under transport/ instead of inside httptransport or a new transport sub-package \u2014 pollutes the foundational layer.", + "Importing openmeter/* domain packages from anything in this tree \u2014 the transport primitive must remain decoupled from concrete domains." + ], + "decisions": [ + { + "decision": "Transport is a structural namespace with one concrete child (httptransport) rather than a flat package.", + "rationale": "Leaves room for additional transports (gRPC, etc.) as siblings while keeping the generic HTTP decode->operate->encode handler isolated and reusable across v3 handlers and httpdriver packages." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w2.json b/.archie/enrichments/w2.json new file mode 100644 index 0000000000..45320ec810 --- /dev/null +++ b/.archie/enrichments/w2.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing": { + "purpose": "Root of the billing domain: the contract surface that declares the billing.Service and billing.Adapter interfaces, all invoice/line/profile/customer-override/discount/tax domain models, the invoice state machine vocabulary (StandardInvoiceStatus/Trigger/Operation), the LineEngine plug-in contract, and the billing error/ValidationIssue taxonomy. This package is interfaces + value types + pure model logic only; orchestration lives in service/, persistence in adapter/, and concrete pricing/line/charge/worker logic in the sibling sub-packages.", + "patterns": [ + { + "name": "Service and Adapter are interface compositions", + "description": "billing.Service and billing.Adapter are each a single interface that embeds many narrow sub-interfaces (ProfileService, InvoiceService, LineEngineService, ... / ProfileAdapter, GatheringInvoiceAdapter, SequenceAdapter, ...). New capability = a new sub-interface added to the composite, implemented in service/ or adapter/, never inline here.", + "example": "type Service interface { ProfileService; CustomerOverrideService; InvoiceLineService; LineEngineService; ...; ConfigService } and type Adapter interface { ProfileAdapter; ...; entutils.TxCreator }" + }, + { + "name": "Validate() collects then NewNillableGenericValidationError", + "description": "Validate() on model/input structs accumulates into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on the first failure (see SyncDraftStandardInvoiceInput.Validate, EventStandardInvoice.Validate, the LineEngine input Validates).", + "example": "func (i SyncDraftStandardInvoiceInput) Validate() error { var errs []error; if err := i.InvoiceID.Validate(); err != nil { errs = append(errs, err) }; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Error sentinels are coded ValidationIssue values, not error strings", + "description": "All billing-facing sentinels in errors.go are built with NewValidationError(code, message), which returns a billing.ValidationIssue (code + severity). Add new failures as a coded sentinel so HTTP status, severity, and frontend code-matching survive; never surface a bare fmt.Errorf to callers.", + "example": "ErrInvoiceCannotAdvance = NewValidationError(\"invoice_cannot_advance\", \"invoice cannot advance\")" + }, + { + "name": "Snapshot models, never live references", + "description": "Invoice-scoped models snapshot upstream entities at creation time (InvoiceCustomer copies customer.Customer fields; usage-based quantity is captured into the line and never updated). New invoice fields depending on Customer/Profile/CustomerOverride must be copied in, not referenced.", + "example": "func NewInvoiceCustomer(cust customer.Customer) InvoiceCustomer { ... } // copies Key/Name/BillingAddress so later customer edits cannot rewrite issued invoices" + }, + { + "name": "Events carry circular-ref-stripped, app-stripped, versioned payloads", + "description": "Invoice events are constructed via NewEventStandardInvoice which calls invoice.RemoveCircularReferences() and nils Workflow.Apps (not JSON-marshallable), promoting apps into a separate InvoiceApps struct. EventName() is versioned via metadata.GetEventName (e.g. invoice.created v2, invoice.updated v3, invoice.advance v1).", + "example": "payload, err := invoice.RemoveCircularReferences(); payload.Workflow.Apps = nil; apps.Invoicing, _ = app.NewEventApp(invoice.Workflow.Apps.Invoicing)" + }, + { + "name": "Status strings are dotted; ShortStatus drives category matching", + "description": "StandardInvoiceStatus values are \"category.detail\" (e.g. draft.collecting); ShortStatus() splits on the first dot so a StandardInvoiceStatusCategory matches any sub-state. New statuses must be added to validStatuses, and to finalStatuses/failedStatuses if terminal/failing.", + "example": "func (s StandardInvoiceStatus) ShortStatus() string { parts := strings.SplitN(string(s), \".\", 2); return parts[0] }" + }, + { + "name": "LineEngine hooks reuse input line IDs and preview is side-effect-free", + "description": "billing.LineEngine is the per-line-type plug-in (invoicing + the three charge types). BuildStandardInvoiceLines/preview must reuse the exact input gathering-line IDs; the preview variant must not persist, allocate credits, mutate IDs, or emit events. Engines register via Service.RegisterLineEngine keyed by GetLineEngineType().", + "example": "LineEngineTypeInvoice / LineEngineTypeChargeFlatFee / ...ChargeUsageBased / ...ChargeCreditPurchase; BuildStandardLinesForGatheringPreview \"must be side-effect free\"" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Declares the composite billing.Service interface and every sub-interface (Profile, CustomerOverride, InvoiceLine, LineEngine, SplitLineGroup, Invoice, GatheringInvoice, StandardInvoice, Sequence, Lockable, InvoiceApp, Config).", + "watch_for": "Add new methods to the correct narrow sub-interface; service/ must then implement them. ConfigService.WithAdvancementStrategy/WithLockedNamespaces return a (cloned) Service, they do not mutate in place." + }, + { + "file": "adapter.go", + "role": "Declares billing.Adapter as a composition of persistence sub-interfaces plus entutils.TxCreator; the pure Ent-backed contract.", + "watch_for": "Adapter is persistence only \u2014 no business logic. Gathering vs standard invoice operations live in distinct sub-interfaces; pick the right one." + }, + { + "file": "errors.go", + "role": "Central billing error taxonomy: coded ValidationError sentinels (Err*), NotFoundError, AppError, UpdateAfterDeleteError, ErrSnapshotInvalidDatabaseState, plus EncodeValidationIssues for HTTP encoding.", + "watch_for": "NewValidationError returns a billing.ValidationIssue (defined in validationissue.go), not a plain error. ErrSnapshotInvalidDatabaseState is special-cased to move the invoice to draft.invalid; do not collapse it into a generic error." + }, + { + "file": "stdinvoice.go", + "role": "StandardInvoice model plus the full StandardInvoiceStatus enum, StandardInvoiceStatusCategory, validStatuses/finalStatuses/failedStatuses, and matcher helpers.", + "watch_for": "A new status must be appended to validStatuses or Validate() rejects it; classify into finalStatuses/failedStatuses as appropriate; statuses are dotted and matched by ShortStatus()." + }, + { + "file": "stdinvoicestate.go", + "role": "State-machine vocabulary: InvoiceTrigger aliases over stateless.Trigger (TriggerNext/Approve/Retry/Failed/ForceCollect/...) and the StandardInvoiceOperation enum.", + "watch_for": "Triggers/operations are declared here but transition wiring lives in service/ (qmuntal/stateless). Adding a trigger here without wiring it does nothing." + }, + { + "file": "lineengine.go", + "role": "billing.LineEngine + billing.LineCalculator interfaces, LineEngineType discriminators, and per-hook input structs (BuildStandardInvoiceLinesInput, CalculateLinesInput, StandardLineEventInput, SplitGatheringLineInput).", + "watch_for": "Adding a hook means updating every engine impl plus testutils.NoopLineEngine. Keep BuildStandardLinesForGatheringPreview side-effect-free. NewLineEngineValidationError wraps failures into a ValidationIssue with a component name." + }, + { + "file": "app.go", + "role": "InvoicingApp / InvoicingAppPostAdvanceHook / InvoicingAppAsyncSyncer interfaces apps implement, plus Upsert/Finalize result builders and SyncInput (draft/issuing) types that MergeIntoInvoice.", + "watch_for": "The invoice passed to app callbacks is read-only and may be a stale in-memory snapshot \u2014 never call back into billing.Service from these hooks. Result structs use fluent Set*/Get* (bool-presence) accessors." + }, + { + "file": "events.go", + "role": "Versioned invoice domain events (StandardInvoiceCreated v2, Updated v3, AdvanceStandardInvoice v1) and the InvoiceApps payload; eventsgathering.go covers GatheringInvoiceCreatedEvent.", + "watch_for": "Bump Version in EventName() on a breaking payload change. Always build via NewEventStandardInvoice so circular refs and non-marshallable Apps are stripped." + } + ], + "anti_patterns": [ + "Putting orchestration, DB access, or state-machine transition logic in this root package \u2014 it is interfaces + value types + pure model math; behavior belongs in service/ and adapter/.", + "Surfacing a new failure as a bare fmt.Errorf instead of a coded NewValidationError sentinel in errors.go, losing HTTP status, severity, and frontend code-matching.", + "Returning on the first invalid field in a Validate() method instead of collecting into errs and returning models.NewNillableGenericValidationError(errors.Join(errs...)).", + "Storing a live pointer to Customer/Profile/CustomerOverride on an invoice/line model instead of snapshotting the needed fields (e.g. via NewInvoiceCustomer) \u2014 issued invoices must not change retroactively.", + "Adding a StandardInvoiceStatus or LineEngine hook without updating the central lists (validStatuses/finalStatuses) or every LineEngine implementation incl. testutils.NoopLineEngine, leaving the state machine / engine registry inconsistent." + ], + "decisions": [ + { + "decision": "billing.Service and billing.Adapter are large interface compositions of narrow sub-interfaces rather than one flat interface.", + "rationale": "Lets handlers and workers depend on just the slice they need and keeps the service/ struct's surface organised by concern (profile, invoice, line, sequence, lock, config)." + }, + { + "decision": "Invoice-facing errors are modeled as coded ValidationIssue sentinels returned alongside the (still-returned) invoice, not as fatal errors.", + "rationale": "Invoices can have issues at many independent layers (missing profile, provider failure, etc.); clients need the invoice plus machine-readable codes (EncodeValidationIssues) rather than string-matched failures." + }, + { + "decision": "Invoice models snapshot upstream entities and the package uses goderive (generate.go) for derived equality/clone helpers (derived.gen.go).", + "rationale": "Snapshotting guarantees an issued invoice is immutable to later customer/profile edits; goderive avoids hand-writing the deep-equality and clone logic the snapshot/diff flows rely on." + } + ], + "code_examples": [ + { + "scenario": "Adding an invoice failure: declare it as a coded ValidationIssue sentinel and validate inputs by collecting errors", + "code": "// errors.go \u2014 sentinel is a billing.ValidationIssue (carries code + severity)\nvar ErrInvoiceCannotAdvance = NewValidationError(\"invoice_cannot_advance\", \"invoice cannot advance\")\n\n// any input Validate(): collect, don't early-return\nfunc (i SyncDraftStandardInvoiceInput) Validate() error {\n\tvar errs []error\n\tif err := i.InvoiceID.Validate(); err != nil {\n\t\terrs = append(errs, err)\n\t}\n\tif i.AdditionalMetadata == nil {\n\t\terrs = append(errs, fmt.Errorf(\"additional metadata is required\"))\n\t}\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w20.json b/.archie/enrichments/w20.json new file mode 100644 index 0000000000..4b83c1a09e --- /dev/null +++ b/.archie/enrichments/w20.json @@ -0,0 +1,35 @@ +{ + "pkg/framework/entutils/testutils": { + "purpose": "Structural folder holding two standalone Ent codegen fixtures (ent1, ent2) used exclusively to test pkg/framework/entutils transaction and mixin helpers (TransactingRepo, TxDriver, mixins, cursor/paginate) in isolation from the production openmeter/ent schema set. It owns the test-only generated Ent surface, not production code.", + "patterns": [ + { + "name": "Two-client transaction test fixtures", + "description": "Children ent1 and ent2 each generate an independent Ent db/ client (Example1, Example2 schemas) so entutils helpers can be exercised across two separate clients in the same test without touching the real schema.", + "example": "transaction_test.go imports both testutils/ent1/db and testutils/ent2/db" + }, + { + "name": "Deliberate fixture divergence", + "description": "ent1 is the feature-complete fixture (entpaginate + entcursor + entexpose); ent2 is intentionally leaner (entexpose only). entcursor/cursor_test.go and entpaginate/paginate_test.go depend on ent1's fuller generated surface.", + "example": "entpaginate/paginate_test.go imports testutils/ent1/db only" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Adding production schema concerns to these fixtures \u2014 they exist only to test entutils helpers, not to mirror openmeter/ent.", + "Hand-editing any generated db/ client under ent1 or ent2 instead of editing schema/ and regenerating.", + "Collapsing ent1 and ent2 into one fixture \u2014 two independent clients are required to test cross-client transaction behavior.", + "Forcing ent2 to match ent1's extension list \u2014 the leaner ent2 is intentional." + ], + "decisions": [ + { + "decision": "Keep test-only Ent clients here, fully separate from openmeter/ent.", + "rationale": "Lets entutils transaction/mixin helpers be unit-tested against a tiny stable schema without coupling to the large production schema or its migrations." + }, + { + "decision": "Maintain two fixtures of differing completeness (ent1 full, ent2 lean).", + "rationale": "ent1 covers paginate/cursor-dependent tests; the second client enables cross-client transaction tests while staying minimal." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w21.json b/.archie/enrichments/w21.json new file mode 100644 index 0000000000..8ed6d3c7e2 --- /dev/null +++ b/.archie/enrichments/w21.json @@ -0,0 +1,504 @@ +{ + "openmeter/billing/charges/creditpurchase": { + "purpose": "Domain package for the credit-purchase charge type: defines the Charge/ChargeBase/Intent value types, the three-variant Settlement (invoice/external/promotional), the persistence Adapter and lifecycle Service interfaces, and the ledger Handler contract. Constraint: every public input has a Validate() and all settlement variants must agree on currency with the credit Intent.", + "patterns": [ + { + "name": "Validate() collects errors then NewNillableGenericValidationError", + "description": "Every input/value type implements Validate() by accumulating into `var errs []error` with `fmt.Errorf(\"field: %w\", err)` wrapping, returning models.NewNillableGenericValidationError(errors.Join(errs...))", + "example": "CreateChargeInput.Validate, Charge.Validate, Intent.Validate" + }, + { + "name": "Tagged-union Settlement with private fields + constructor", + "description": "Settlement holds a `t SettlementType` discriminant and private `*InvoiceSettlement/*ExternalSettlement/*PromotionalSettlement`; build only via NewSettlement[T], read via AsInvoiceSettlement/AsExternalSettlement/AsPromotionalSettlement (error on type mismatch), with custom MarshalJSON/UnmarshalJSON keyed on `type`", + "example": "NewSettlement(InvoiceSettlement{...}); s.AsExternalSettlement()" + }, + { + "name": "Status enum aliased from meta.ChargeStatus", + "description": "Status constants (StatusCreated/Active/Final/Deleted) are defined as Status(meta.ChargeStatus...) and convert back via ToMetaChargeStatus(); never invent a separate status space", + "example": "StatusActive = Status(meta.ChargeStatusActive)" + }, + { + "name": "Intent.Normalized() before persist", + "description": "Intent.Normalized() normalizes embedded meta.Intent, optional timestamps via meta.NormalizeOptionalTimestamp, feature filters, and rounds CreditAmount via Currency.Calculator()", + "example": "i.CreditAmount = calc.RoundToPrecision(i.CreditAmount)" + }, + { + "name": "Realizations are expand-only edge data", + "description": "Charge embeds ChargeBase + Realizations (CreditGrantRealization/ExternalPaymentSettlement/InvoiceSettlement pointers); State struct is intentionally empty \u2014 all lifecycle outcomes live in Realizations, loaded only under meta.ExpandRealizations", + "example": "type State struct{}" + }, + { + "name": "Handler interface mediates all ledger side-effects", + "description": "Ledger interaction is an injected Handler (OnPromotionalCreditPurchase, OnCreditPurchaseInitiated, OnCreditPurchasePaymentAuthorized/Settled) returning ledgertransaction.GroupReference; the package's value types never call ledger directly", + "example": "Handler.OnCreditPurchaseInitiated(ctx, charge)" + }, + { + "name": "ValidationIssue errors with HTTP attributes", + "description": "Errors are models.NewValidationIssue with an ErrorCode const, severity and commonhttp.WithHTTPStatusCodeAttribute \u2014 not plain fmt.Errorf", + "example": "ErrCreditPurchaseChargeNotActive (StatusBadRequest)" + } + ], + "key_file_guides": [ + { + "file": "charge.go", + "role": "ChargeBase/Charge/Intent/Realizations/State value types and their Validate/normalize/getters", + "watch_for": "EffectiveAt is validated as not-yet-supported (returns error if non-nil); CreditAmount must be positive; settlement currency must equal Intent.Currency" + }, + { + "file": "settlement.go", + "role": "SettlementType enum + tagged-union Settlement with JSON round-trip and AsX accessors", + "watch_for": "Construct only via NewSettlement; MarshalJSON errors if the variant pointer for the discriminant is nil; promotional carries no payload" + }, + { + "file": "adapter.go", + "role": "Adapter interface (Charge/ExternalPayment/CreditGrant/InvoicedPayment + entutils.TxCreator) and its input structs", + "watch_for": "All inputs Validate namespace + Expands; GetByID/GetByIDs require ChargeID/Expands validation before DB access" + }, + { + "file": "service.go", + "role": "Service interface composed of CreditPurchaseService + ExternalPaymentLifecycle + InvoicePaymentLifecycle; ChargeWithGatheringLine result", + "watch_for": "Create handles a single Intent only; invoice-settled lifecycle is driven by PostInvoice* hooks, not Create" + }, + { + "file": "handler.go", + "role": "Ledger Handler contract documenting the cost-basis>0 happy path (initiated -> authorized -> settled) vs promotional (single call)", + "watch_for": "Promotional purchases call ONLY OnPromotionalCreditPurchase; failed payments can occur after initiated or after authorized" + }, + { + "file": "statemachine.go", + "role": "Status enum aliased to meta.ChargeStatus + ToMetaChargeStatus", + "watch_for": "Keep the four statuses in lockstep with meta.ChargeStatus values" + }, + { + "file": "featurefilters.go", + "role": "FeatureFilters []string with Validate (no empty/dup) and Normalize (sorted+uniq via slicesx.Normalize)", + "watch_for": "Normalize length mismatch is how duplicate detection works" + }, + { + "file": "funded_credit_activity.go", + "role": "FundedCreditActivity read model + keyset cursor (FundedAt/ChargeCreatedAt/ChargeID) for ListFundedCreditActivities", + "watch_for": "After and Before cursors are mutually exclusive; Limit must be >= 1" + } + ], + "anti_patterns": [ + "Constructing a Settlement by setting struct fields directly instead of NewSettlement[T] \u2014 private fields make this impossible and JSON marshal fails on nil variant", + "Returning plain fmt.Errorf for lifecycle conflicts instead of the predefined ValidationIssue in errors.go", + "Putting ledger/credit-grant side effects in this package's value types \u2014 they belong behind the injected Handler in the service sub-package", + "Setting Intent.EffectiveAt \u2014 validation rejects it as not-yet-supported", + "Reading Realizations without expanding meta.ExpandRealizations (they come back nil/unmapped)" + ], + "decisions": [ + { + "decision": "Settlement is a JSON-tagged union with private variant pointers", + "rationale": "Forces construction through NewSettlement and a single `type` discriminant so invalid combinations are unrepresentable and persistence is stable" + }, + { + "decision": "State struct is empty; all lifecycle outcomes live in Realizations edges", + "rationale": "Lifecycle results (credit grant, external/invoice settlement) are append-only child rows loaded on demand rather than mutable base-row fields" + }, + { + "decision": "Status values alias meta.ChargeStatus", + "rationale": "Keeps the per-type charge status compatible with the shared charge-meta status space used by the generic charge engine" + } + ], + "code_examples": [ + { + "scenario": "Validating a credit-purchase Intent with settlement-currency cross-check", + "code": "func (i Intent) Validate() error {\n var errs []error\n if err := i.Intent.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"intent meta: %w\", err)) }\n if !i.CreditAmount.IsPositive() { errs = append(errs, fmt.Errorf(\"credit amount must be positive\")) }\n if err := i.Settlement.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"settlement: %w\", err)) }\n if s, err := i.Settlement.AsInvoiceSettlement(); err == nil && s.Currency != i.Currency {\n errs = append(errs, fmt.Errorf(\"settlement currency %q must match credit currency %q\", s.Currency, i.Currency))\n }\n return models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "openmeter/billing/charges/lineage": { + "purpose": "Domain package defining the credit-realization lineage model \u2014 the append-only audit trail tracking how each charge's realized value moves through states (real_credit/advance_uncovered -> advance_backfilled -> earnings_recognized) and is consumed during corrections. Declares the Service and Adapter interfaces plus the Lineage/Segment value types and pure sorting/matching helpers.", + "patterns": [ + { + "name": "Service/Adapter split with shared method names", + "description": "Service is business orchestration (CreateInitialLineages, PersistCorrectionLineageSegments, BackfillAdvanceLineageSegments, Close/CreateSegment); Adapter (entutils.TxCreator) is persistence with Lock* + Load* + List* primitives the service composes", + "example": "Service.PersistCorrectionLineageSegments composes Adapter.LockCorrectionLineages + CreateSegment" + }, + { + "name": "State-precedence sort for correction consumption", + "description": "SortCorrectionPersistSegments orders segments by state precedence (earnings_recognizedsettled) payment settlements with External and Invoiced variants sharing a Base", + "watch_for": "StatusSettled requires both authorized+settled ledger data; line_id/invoice_id immutable; use predefined ValidationIssues" + } + ], + "anti_patterns": [ + "Adding business orchestration here \u2014 these are value-type/mixin packages; logic lives in charge services", + "Calling Set* on a concrete *entdb.XCreate instead of the generic Create/Update helpers (bypasses normalization)", + "Persisting non-UTC timestamps or unrounded decimals", + "Putting charge-type-specific fields in the broadly imported ledgertransaction leaf package" + ], + "decisions": [ + { + "decision": "Schema mixin and domain mapping co-located per concern", + "rationale": "Keeps the persisted Ent shape and the validated domain shape in one place so each charge type embeds a single source of truth" + }, + { + "decision": "Corrections and settlements are append-only/immutable rows", + "rationale": "Credit realizations and payments form an audit trail; in-place edits would lose lifecycle history" + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/worker": { + "purpose": "Structural parent for charge-advancement workers. No source files of its own; its two children split how usage-based charges are advanced past their advance-after watermark: advance/ is the batch sweep across all customers, asyncadvance/ is the per-event Kafka handler. Both are thin orchestration over charges.ChargeService with no business logic.", + "patterns": [ + { + "name": "Config.Validate() + New constructor with nil-dependency guards", + "description": "Both workers require Logger and charges.ChargeService via a validated Config; constructors reject nil rather than falling back to slog.Default()", + "example": "advance.AutoAdvancer New, asyncadvance.Handler New" + }, + { + "name": "Delegation-only over charges.ChargeService", + "description": "Workers map their trigger (namespace scan / AdvanceChargesEvent) into charges.AdvanceChargesInput and delegate; no advancement logic lives here", + "example": "asyncadvance.Handle builds AdvanceChargesInput from the event" + }, + { + "name": "Error handling differs by transport", + "description": "advance/ accumulates per-customer failures into errors.Join (best-effort batch); asyncadvance/ returns the error so the message bus retries", + "example": "advance.All aggregates; asyncadvance.Handle returns err" + } + ], + "key_file_guides": [ + { + "file": "advance/", + "role": "AutoAdvancer.All batch sweep paginating customers with charges past their advance-after watermark via pagination.CollectAll", + "watch_for": "Must NOT return early on first customer error \u2014 aggregate into errors.Join so remaining customers still advance" + }, + { + "file": "asyncadvance/", + "role": "Watermill/Kafka Handler advancing charges for a single customer per charges.AdvanceChargesEvent", + "watch_for": "Returning nil on failure silently drops advancement \u2014 the returned error is the retry signal" + } + ], + "anti_patterns": [ + "Adding charge-advancement business logic in either worker \u2014 it belongs in charges.ChargeService", + "advance/: returning on the first customer error instead of accumulating into errors.Join", + "asyncadvance/: swallowing the Handle error and returning nil (drops the message-bus retry)", + "Constructing a worker directly instead of via New/Config.Validate (bypasses nil guards)", + "Falling back to slog.Default() instead of requiring Logger through Config" + ], + "decisions": [ + { + "decision": "Batch sweep (advance/) and per-event handler (asyncadvance/) are separate packages", + "rationale": "Different invocation models and error semantics \u2014 best-effort aggregation vs single-event retry \u2014 keep cleanly separated" + } + ], + "code_examples": [] + }, + "tools/migrate": { + "purpose": "Database migration engine and the authoritative store of golang-migrate-format SQL migrations plus their up/down/up data-migration tests. Wraps golang-migrate/v4 with an embedded migrations FS (state table schema_om), supports an ignore marker, and is the runtime entrypoint invoked on server startup when postgres.autoMigrate is ent or migration.", + "patterns": [ + { + "name": "Migrate wraps golang-migrate via type alias", + "description": "Migrate embeds *goMigrate (a type alias for migrate.Migrate) so Migrate.Migrate(version) can call goMigrate.Migrate without a name clash, and every wrapper (Up/Down/Migrate) routes through filterErrNoChange to swallow migrate.ErrNoChange", + "example": "func (m *Migrate) Up() error { return m.filterErrNoChange(m.goMigrate.Up()) }" + }, + { + "name": "Config validated, no slog.Default fallback", + "description": "MigrateOptions and MigrationsConfig each Validate() by collecting into []error and returning errors.Join(...); Logger is a required *slog.Logger, and ConnectionString, FS, FSPath, StateTableName are all required", + "example": "if m.Logger == nil { errs = append(errs, errors.New(\"logger is required\")) }" + }, + { + "name": "Embedded migrations + SourceWrapper ignore marker", + "description": "//go:embed migrations supplies OMMigrationsConfig; New wraps the FS in NewSourceWrapper which recursively reads dirs and drops any file whose lines start with '-- migration:ignore' (IgnoreMarker)", + "example": "const IgnoreMarker = \"-- migration:ignore\"" + }, + { + "name": "Migration table name injected via query param", + "description": "setMigrationTableName parses the connection URL and sets x-migrations-table to StateTableName (schema_om) so OpenMeter's migrations don't collide with Ent's default state table", + "example": "values.Set(\"x-migrations-table\", tableName)" + }, + { + "name": "Data-migration tests use runner/stops harness", + "description": "Tests in package migrate_test build runner{stops: stops{...}} where each stop has version, direction (directionUp/directionDown), and action(t, db); the runner migrates to each up version ascending, runs the action, then Up, descending downs, purge, Down, Up to prove reversibility", + "example": "runner{stops: stops{{version: 20260511120000, direction: directionUp, action: func(t *testing.T, db *sql.DB){...}}}}.Test(t)" + }, + { + "name": "Raw *sql.DB for fixtures, never an ORM", + "description": "Test actions insert/assert with db.Exec/db.QueryRow on testutils.InitPostgresDB(t).PGDriver.DB() because any ORM would only know the latest schema; fixtures use ulid.Make().String() ids and explicit column lists valid at that version", + "example": "_, err := db.Exec(`INSERT INTO features (namespace, id, ...) VALUES ($1, $2, ...)`, ...)" + }, + { + "name": "View parity guarded by viewgen", + "description": "view_parity_test.go regenerates views via viewgen.GenerateSQL, strips CREATE/DROP VIEW out of the real migrations, and asserts pg_get_viewdef + information_schema.columns match between a fully-migrated DB and a generated-schema DB", + "example": "sql, err := viewgen.GenerateSQL(\"../../openmeter/ent/schema\")" + } + ], + "key_file_guides": [ + { + "file": "migrate.go", + "role": "Core Migrate type, New() constructor, OMMigrationsConfig with embedded migrations FS, validation, WaitForMigrationJob, LatestVersion, table-name injection, Close helpers", + "watch_for": "Always go through filterErrNoChange; never call goMigrate.Up directly. WaitForMigrationJob fails on a dirty DB. MigrationsTable is fixed to schema_om" + }, + { + "file": "fs.go", + "role": "SourceWrapper implementing fs.ReadDirFS/ReadFileFS that flattens nested dirs and skips files starting with the '-- migration:ignore' IgnoreMarker", + "watch_for": "ReadDir recurses and scans every file's content; a misplaced ignore marker silently drops a migration from the embedded source" + }, + { + "file": "migrate_test.go", + "role": "Defines the runner/stops/stop harness, directionUp/directionDown constants, ups()/downs() ordering, and purgeDB. TestUpDownUp runs the full forward/back/forward cycle with no stops", + "watch_for": "purgeDB TRUNCATE CASCADE skips the schema_om state table; down-then-up must succeed. Stops sorted ascending for ups, descending for downs" + }, + { + "file": "view_parity_test.go", + "role": "Asserts hand-written view DDL in migrations matches viewgen output by diffing column metadata and normalized view definitions across two fresh DBs", + "watch_for": "buildMigrationsWithoutViews strips any statement matching the VIEW regex; a view added to migrations but not the Ent schema (or vice versa) breaks this test" + }, + { + "file": "*_test.go (data migrations)", + "role": "One file per non-trivial data migration (dedupe_tax_codes, feature_meter_id, flatfee_runs, llmcost_normalize_providers, ledger_tax_behavior, productcatalog, feature_advanced_meter_group_by_filters) asserting before/after row state", + "watch_for": "Fixtures must match the exact column set valid at the targeted version; pass full JSON strings as bound params ($n::jsonb) to dodge Postgres char(26)-vs-jsonb parameter type inference errors" + }, + { + "file": "generate-sqlc-testdata.sh", + "role": "Spins up postgres, migrates a scratch DB to VERSION, pg_dumps the schema, and runs sqlc generate into testdata/sqlcgen/", + "watch_for": "Requires the nix dev shell (docker, migrate, pg_dump, sqlc) and uses x-migrations-table=schema_om to match the runtime migration table" + }, + { + "file": "ledger_tax_behavior_test.go", + "role": "Documents a rollback guard: a down migration that fails loudly when V2 routing-key rows still exist rather than silently corrupting routes", + "watch_for": "Irreversible-with-data down migrations should RAISE an explicit error; the test asserts the exact message" + } + ], + "anti_patterns": [ + "Using an ORM or ent client inside migration tests; only raw *sql.DB sees the historical schema at a given version", + "Hand-editing tools/migrate/views.sql \u2014 it carries a 'Code generated by viewgen, DO NOT EDIT.' header and is overwritten by make generate-view-sql", + "Calling goMigrate.Up/Down/Migrate directly and re-leaking migrate.ErrNoChange instead of going through the Migrate wrapper methods", + "Writing an irreversible down migration without a loud guard (see ledger_tax_behavior) \u2014 TestUpDownUp purges then runs Down then Up and will fail", + "Adding a CREATE VIEW to a migration without keeping the Ent view schema in sync, breaking view_parity_test's column/definition diff" + ], + "decisions": [ + { + "decision": "Replace ent.Schema.Create with a lightweight golang-migrate wrapper over an embedded SQL FS", + "rationale": "Gives explicit, reviewable, reversible SQL migrations with a dedicated schema_om state table instead of opaque auto-create, while still being generated from Ent schema diffs via Atlas" + }, + { + "decision": "Test every non-trivial data migration with a forward/backward/forward stops harness against real Postgres", + "rationale": "Data transforms (backfills, dedup, normalization, JSONB rewrites) can't be verified by schema diff alone; the runner proves both the data result and full reversibility" + }, + { + "decision": "Generate view DDL separately (viewgen) and validate parity rather than relying on Atlas diff", + "rationale": "Ent ent.View schemas don't appear in generated migrate metadata, so view SQL must be authored/checked independently to stay consistent with the Ent schema" + } + ], + "code_examples": [ + { + "scenario": "Constructing a migrator and running a targeted data-migration verification in a test", + "code": "import (\n\t\"github.com/openmeterio/openmeter/openmeter/testutils\"\n\t\"github.com/openmeterio/openmeter/tools/migrate\"\n)\n\ntestDB := testutils.InitPostgresDB(t)\ndefer testDB.PGDriver.Close()\n\nmigrator, err := migrate.New(migrate.MigrateOptions{\n\tConnectionString: testDB.URL,\n\tMigrations: migrate.OMMigrationsConfig,\n\tLogger: testutils.NewLogger(t),\n})\nrequire.NoError(t, err)\ndefer func() { err1, err2 := migrator.Close(); require.NoError(t, errors.Join(err1, err2)) }()\n\nrequire.NoError(t, migrator.Migrate(20260520130500))\ndb := testDB.PGDriver.DB() // raw *sql.DB \u2014 never an ORM" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w22.json b/.archie/enrichments/w22.json new file mode 100644 index 0000000000..3da51e9048 --- /dev/null +++ b/.archie/enrichments/w22.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/flatfee/service": { + "purpose": "Service layer for flat-fee charges: owns the per-settlement-mode lifecycle state machines (credit_only, credit_then_invoice), the billing.LineEngine implementation that bridges charges to standard invoice lines, charge creation, and fiat payment authorization/settlement. It makes all lifecycle/state decisions and delegates realization mechanics (credit math, line/totals persistence) to the realizations/ child Service.", + "patterns": [ + { + "name": "Public methods are transaction.Run wrappers over the adapter", + "description": "Every exported service method validates its input then runs the body inside transaction.Run(ctx, s.adapter, ...) (or RunWithNoValue). Reads and writes both go through this so the adapter rebinds to the tx in ctx.", + "example": "func (s *service) GetByID(ctx, input) (...) { if err := input.Validate(); err != nil { return ... }; return transaction.Run(ctx, s.adapter, func(ctx) {...}) }" + }, + { + "name": "One state machine type per settlement mode", + "description": "Each settlement mode has its own *StateMachine embedding *stateMachine. Constructors (NewCreditsOnlyStateMachine, NewCreditThenInvoiceStateMachine) hard-assert config.Charge.Intent.SettlementMode, call newStateMachineBase, then configureStates(). newStateMachine() in triggers.go dispatches by SettlementMode and errors with NewGenericNotImplementedError otherwise.", + "example": "if config.Charge.Intent.SettlementMode != productcatalog.CreditThenInvoiceSettlementMode { return nil, fmt.Errorf(...) }" + }, + { + "name": "States declared via fluent Configure/Permit/OnActive DSL", + "description": "configureStates() wires transitions with s.Configure(status).Permit(meta.TriggerX, nextStatus, statelessx.BoolFn(guard)).InternalTransition(meta.TriggerExtend, statelessx.WithParameters(s.ExtendCharge)).OnActive(action). Guards are bool methods; actions are ctx-taking methods on the machine.", + "example": "s.Configure(flatfee.StatusCreated).Permit(meta.TriggerNext, flatfee.StatusActive, statelessx.BoolFn(s.IsInsideServicePeriod))" + }, + { + "name": "LineEngine drives the machine, never persists lines directly", + "description": "LineEngine handlers (OnStandardInvoiceCreated, OnInvoiceIssued, OnCollectionCompleted) load the charge, build a state machine, Fire/AdvanceUntilStateStable, then mutate the passed *billing.StandardLine in place via populateFlatFeeStandardLineFromRun and return it; billing persists.", + "example": "stateMachine.FireAndActivate(ctx, meta.TriggerFinalInvoiceCreated, billing.StandardLineWithInvoiceHeader{Line: stdLine, Invoice: input.Invoice})" + }, + { + "name": "Mutate charge in-memory; the machine persists on stabilization", + "description": "Action methods set s.Charge.State/Intent/Status/Realizations.CurrentRun and AddInvoicePatch(...); they do NOT call UpdateCharge themselves (chargestatemachine.Persistence.UpdateBase handles it). AdvanceAfter is cleared via the StatusFinal ClearAdvanceAfter OnActive hook.", + "example": "s.Charge.Realizations.CurrentRun = &result.Run; s.Charge.State.AdvanceAfter = nil" + }, + { + "name": "Charge mutation always under the charge lock", + "description": "AdvanceCharge and TriggerPatch route through withLockedCharge, which takes charges.NewLockKeyForCharge + locker.LockForTX inside a tx, re-fetches with meta.ExpandRealizations, then runs fn. Invoice patches are drained via stateMachine.DrainInvoicePatches() into the result.", + "example": "key, _ := charges.NewLockKeyForCharge(chargeID); s.locker.LockForTX(ctx, key)" + }, + { + "name": "Round through the currency Calculator before compare/persist", + "description": "Amounts are rounded via intent.Currency.Calculator().RoundToPrecision before negativity checks, credit allocation, or totals equality assertions. Mapped line totals are reconciled against run.Totals and an error returned on mismatch.", + "example": "amount := currencyCalculator.RoundToPrecision(s.Charge.State.AmountAfterProration); if amount.IsNegative() { return fmt.Errorf(...) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config/New constructor + service struct; wires realizations sub-Service, holds creditNotesSupported atomic.Bool; GetLineEngine() returns *LineEngine; asserts flatfee.FlatFeeService.", + "watch_for": "SetCreditNotesSupportedByLineUpdater requires *testing.T and must never run in production; New seeds creditNotesSupported from charges.CreditNotesSupportedByLineUpdater." + }, + { + "file": "statemachine.go", + "role": "stateMachine base embedding chargestatemachine.Machine; newStateMachineBase wires Persistence{UpdateBase, Refetch}; shared guards/actions (IsInsideServicePeriod, AdvanceAfterServicePeriodFrom/To, ClearAdvanceAfter).", + "watch_for": "Refetch always expands meta.ExpandRealizations; guards read clock.Now() so tests must clock.FreezeTime." + }, + { + "file": "creditheninvoice.go", + "role": "CreditThenInvoiceStateMachine: full realization lifecycle (active -> realization started/processing/issuing/completed -> awaiting payment settlement -> final); generateInvoicePatches handles extend/shrink and the immutable-invoice fallback.", + "watch_for": "When !CreditNotesSupported and currentRun.Immutable with a changed amount, only a delete patch is emitted to avoid double-charging; zero-amount patches drive StatusFinal/StatusCreated transitions explicitly." + }, + { + "file": "creditsonly.go", + "role": "CreditsOnlyStateMachine: created -> active -> final, AllocateCredits at final (via realizations.AllocateCreditsOnly), DeleteCharge honors CreditRefundPolicyCorrect.", + "watch_for": "Credit-only charges never touch the invoicing stack; DeleteCharge must CorrectAllCredits on existing lineage, not create raw negative rows." + }, + { + "file": "lineengine.go", + "role": "billing.LineEngine impl (LineEngineTypeChargeFlatFee): BuildStandardInvoiceLines, OnStandardInvoiceCreated, OnInvoiceIssued, OnCollectionCompleted, OnMutableStandardLinesDeleted, OnUnsupportedCreditNote, payment hooks; getChargesForStandardLineEvent batch-loads charges.", + "watch_for": "SplitGatheringLine returns an error (flat fee is not progressively billed); deletion handlers reject runs with AccruedUsage/Payment or that are still CurrentRun, and correct credits via realizations.CorrectAllCredits." + }, + { + "file": "payment.go", + "role": "postInvoicePaymentAuthorized/Settled: book fiat payment via handler.OnPaymentAuthorized/OnPaymentSettled and persist payment settlement rows; getPaymentTotal/validatePaymentRunForLine helpers.", + "watch_for": "getPaymentTotal errors on no-fiat runs, missing AccruedUsage, or zero totals; NoFiatTransactionRequired runs short-circuit before any payment booking." + }, + { + "file": "create.go", + "role": "Create(): bulk-builds flatfee.IntentWithInitialStatus, resolves feature IDs, calls adapter.CreateCharges, then builds gathering lines for credit_then_invoice non-zero charges via buildFlatFeeGatheringLine.", + "watch_for": "Credit-only and zero-amount charges return ChargeWithGatheringLine with no GatheringLineToCreate; buildFlatFeeGatheringLine rejects non-credit_then_invoice charges." + }, + { + "file": "triggers.go", + "role": "AdvanceCharge, TriggerPatch, newStateMachine dispatcher, withLockedCharge helper.", + "watch_for": "CreditNotesSupported is read via .Load() each time a machine is built; TriggerPatch drains invoice patches into meta.TriggerPatchResult." + } + ], + "anti_patterns": [ + "Calling adapter writes (CreateCharges, CreatePayment, UpdateRealizationRun) outside a transaction.Run/RunWithNoValue block.", + "Persisting the charge from inside an action method instead of mutating s.Charge and letting chargestatemachine.Persistence.UpdateBase write it on stabilization.", + "Putting credit math, detailed-line construction, or totals persistence here instead of delegating to the realizations sub-Service (s.Realizations / s.service.realizations).", + "Mutating or persisting invoice lines directly from a LineEngine handler instead of mutating the passed *billing.StandardLine and emitting invoiceupdater.Patch values.", + "Mutating a charge without withLockedCharge, or skipping in.Validate()/RoundToPrecision before comparing or persisting amounts." + ], + "decisions": [ + { + "decision": "State machines are split per settlement mode rather than one parameterized machine.", + "rationale": "credit_only and credit_then_invoice have fundamentally different lifecycles (no invoicing stack vs. realization+payment), so each owns its own Configure graph and guards." + }, + { + "decision": "creditNotesSupported is an atomic.Bool read per state-machine build.", + "rationale": "Until the line updater can correct immutable invoice lines with credit notes, extend/shrink on already-invoiced periods must degrade to delete-only patches; the flag lets tests toggle the future behavior without rewiring." + }, + { + "decision": "The service makes lifecycle decisions; realizations/ is mechanics-only.", + "rationale": "Keeps the state graph and invoice-patch routing testable in one place while credit allocation/correction and detailed-line persistence stay a pure mechanics layer that cannot make transitions." + } + ], + "code_examples": [ + { + "scenario": "A LineEngine handler advances the charge state machine and maps the resulting run back onto the standard line.", + "code": "func (e *LineEngine) OnInvoiceIssued(ctx context.Context, input billing.OnInvoiceIssuedInput) error {\n\tif err := input.Validate(); err != nil {\n\t\treturn fmt.Errorf(\"validating input: %w\", err)\n\t}\n\tfor _, stdLine := range input.Lines {\n\t\tstateMachine, err := e.newStateMachineForStandardLine(ctx, stdLine)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := stateMachine.FireAndActivate(ctx, meta.TriggerInvoiceIssued, billing.StandardLineWithInvoiceHeader{\n\t\t\tLine: stdLine,\n\t\t\tInvoice: input.Invoice,\n\t\t}); err != nil {\n\t\t\treturn fmt.Errorf(\"triggering invoice_issued for charge[%s]: %w\", stateMachine.GetCharge().ID, err)\n\t\t}\n\t\tif _, err := stateMachine.AdvanceUntilStateStable(ctx); err != nil {\n\t\t\treturn fmt.Errorf(\"advancing flat fee charge[%s] after invoice_issued: %w\", stateMachine.GetCharge().ID, err)\n\t\t}\n\t}\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w23.json b/.archie/enrichments/w23.json new file mode 100644 index 0000000000..a6623dd195 --- /dev/null +++ b/.archie/enrichments/w23.json @@ -0,0 +1,205 @@ +{ + "api/spec/packages/legacy/src/productcatalog": { + "purpose": "TypeSpec source of truth for the v1 product-catalog API surface: features, plans, addons, plan-addon assignments, rate cards, prices, discounts, tax, pro-rating, and subscriptions. Models defined here compile to api/openapi.yaml and downstream Go/JS SDKs via `make gen-api` \u2014 edit the .tsp, never the generated code.", + "patterns": [ + { + "name": "namespace OpenMeter for every model file", + "description": "Every .tsp declares `namespace OpenMeter;` after imports so all models join the single OpenMeter namespace; routes.tsp additionally does `using TypeSpec.Http;` and `using TypeSpec.OpenAPI;`.", + "example": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\nnamespace OpenMeter;" + }, + { + "name": "@friendlyName on every exposed model/enum/union", + "description": "Each generated schema name comes from @friendlyName, not the TypeSpec identifier \u2014 e.g. `@friendlyName(\"RateCardFlatFee\")`, `@friendlyName(\"BillingSettlementMode\") enum SettlementMode`. Adding a model without @friendlyName produces an unstable auto-generated OpenAPI name.", + "example": "@friendlyName(\"FlatPrice\")\nmodel FlatPrice { type: PriceType.flat; amount: Money; }" + }, + { + "name": "Discriminated unions for polymorphic types", + "description": "Price, RateCard, RateCardUsageBasedPrice, RateCardEntitlement, FeatureUnitCost, SubscriptionEditOperation all use `@discriminated(#{ envelope: \"none\", discriminatorPropertyName: \"type\" })` (or \"op\") with a per-variant literal discriminator field (e.g. `type: PriceType.flat`).", + "example": "@discriminated(#{ envelope: \"none\", discriminatorPropertyName: \"type\" })\nunion RateCard { flat_fee: RateCardFlatFee, usage_based: RateCardUsageBased }" + }, + { + "name": "Lifecycle @visibility on every field", + "description": "Fields annotate `@visibility(Lifecycle.Read)`, `(Lifecycle.Read, Lifecycle.Create)`, or `(Read, Create, Update)` to drive Create/Replace model generation. Server-computed fields (version, status, effectiveFrom/To, annotations, validationErrors) are Read-only.", + "example": "@visibility(Lifecycle.Read)\nstatus: PlanStatus;" + }, + { + "name": "Compose, don't duplicate, via spread + OmitProperties/Resource mixins", + "description": "Models reuse shared shapes with `...UniqueResource`, `...ResourceTimestamps`, `...Archiveable`, `...global.Resource`, `...global.CadencedResource`, and derive create bodies with `OmitProperties<...>` / `ResourceCreateModel` / `@withVisibility(Lifecycle.Create)` rather than redefining fields.", + "example": "model Feature { ...ResourceTimestamps; ...Archiveable; ...FeatureCreateInputs; @visibility(Lifecycle.Read) id: ULID; }" + }, + { + "name": "ISO8601 durations and Money/Numeric scalars", + "description": "Durations use `duration` with `@encode(DurationKnownEncoding.ISO8601)`; monetary/quantity values use the shared `Money`, `Numeric`, `Percentage`, `CurrencyCode`, `ULID`, `Key` scalars from ../types.tsp \u2014 not raw number/string.", + "example": "@encode(DurationKnownEncoding.ISO8601)\nbillingCadence: duration | null;" + }, + { + "name": "Route interfaces carry @route/@tag/@operationId per operation", + "description": "routes.tsp groups endpoints into interfaces (FeaturesEndpoints, PlansEndpoints, AddonsEndpoints, SubscriptionsEndpoints) under `@route(\"/api/v1/...\")` + `@tag`, each op tagged `@operationId` (the SDK method name) and `@summary`, returning `Model | NotFoundError | CommonErrors`.", + "example": "@get @operationId(\"getFeature\") @summary(\"Get feature\")\nget(@path featureId: string): Feature | NotFoundError | CommonErrors;" + } + ], + "key_file_guides": [ + { + "file": "main.tsp", + "role": "Package barrel \u2014 imports `..` then every sibling .tsp (discounts, plan, prices, ratecards, routes, tax, subscription, alignment, addon, planaddon). New files must be added here or they are not compiled.", + "watch_for": "Adding a new .tsp without an import line here silently drops it from the OpenAPI output." + }, + { + "file": "routes.tsp", + "role": "All HTTP operations for features/plans/plan-addons/addons/subscriptions. Only file using @route/@get/@post and the `using TypeSpec.Http` directive.", + "watch_for": "@operationId is the public SDK method name \u2014 renaming is a breaking SDK change. Subscription ops return CommonSubscriptionErrors (with validation extensions), not plain CommonErrors." + }, + { + "file": "ratecards.tsp", + "role": "RateCardBase generic + RateCardFlatFee/RateCardUsageBased + RateCardEntitlement union deriving from EntitlementMetered/Static/BooleanCreateInputs via OmitProperties.", + "watch_for": "Entitlement templates omit featureKey/featureId/usagePeriod because the rate card supplies them; do not re-add those fields." + }, + { + "file": "prices.tsp", + "role": "Price union (flat/unit/tiered/dynamic/package) and the *WithCommitments variants that spread SpendCommitments.", + "watch_for": "RateCardUsageBasedPrice (in ratecards.tsp) references the WithCommitments variants; flat-fee rate cards use FlatPriceWithPaymentTerm only." + }, + { + "file": "plan.tsp", + "role": "Plan, PlanPhase, PlanStatus, SettlementMode (@friendlyName BillingSettlementMode), PlanReference/Input. proRatingConfig and settlementMode carry default object literals.", + "watch_for": "PlanStatus is Read-only/computed from effectiveFrom/effectiveTo; phases requires @minItems(1)." + }, + { + "file": "subscription.tsp", + "role": "Largest model file: Subscription, SubscriptionExpanded, phases/items, Create/Change unions (Plan vs Custom), SubscriptionTiming, and the SubscriptionEditOperation discriminated union (op-based).", + "watch_for": "Imports ../entitlements/main.tsp and uses `global.` prefixed shared types; SubscriptionEdit.customizations capped at @maxItems(100)." + }, + { + "file": "errors.tsp", + "role": "Subscription-specific error envelope: CommonSubscriptionErrors alias and Subscription{BadRequest,Conflict}ErrorResponse overriding `extensions` with SubscriptionErrorExtensions (validationErrors).", + "watch_for": "These wrap the base BadRequestError/ConflictError via OmitProperties<..., \"extensions\">; keep them in sync with ../errors.tsp." + }, + { + "file": "features.tsp", + "role": "Feature/FeatureCreateInputs plus FeatureUnitCost union (manual vs llm) and FeatureLLMUnitCost pricing lookup. Uses `using TypeSpec.OpenAPI`.", + "watch_for": "meterGroupByFilters is #deprecated in favor of advancedMeterGroupByFilters; LLM cost provider/model/tokenType each have a *Property variant that is mutually exclusive with the static value." + } + ], + "anti_patterns": [ + "Editing api/openapi.yaml or generated Go/JS SDK files instead of these .tsp sources \u2014 they are overwritten by `make gen-api`.", + "Adding a model/enum without @friendlyName, or a new .tsp without importing it in main.tsp.", + "Adding @query/@route/@get decorators in a file that lacks `import \"@typespec/http\"` + `using TypeSpec.Http;` (compile error: Unknown decorator).", + "Making a server-computed field (version, status, effective dates, validationErrors, annotations) Create/Update-writable instead of @visibility(Lifecycle.Read).", + "Redefining fields by hand instead of composing with spread/OmitProperties/ResourceCreateModel, drifting create bodies out of sync with the read model." + ], + "decisions": [ + { + "decision": "TypeSpec is the single source of truth; OpenAPI and all SDKs are generated.", + "rationale": "One contract definition keeps v1 server code, Go client, and JS client provably in sync; per AGENTS.md the workflow is edit .tsp -> make gen-api -> make generate." + }, + { + "decision": "Envelope-less discriminated unions keyed on `type`/`op`.", + "rationale": "Produces flat OpenAPI discriminator schemas that map cleanly to Go interface implementations for prices, rate cards, and subscription edit operations without an extra wrapper object." + }, + { + "decision": "Subscriptions get a dedicated error family (CommonSubscriptionErrors with validation extensions).", + "rationale": "Subscription create/edit/change need structured validationErrors in the 400/409 body that the generic CommonErrors do not carry." + } + ], + "code_examples": [ + { + "scenario": "Defining a polymorphic catalog type with a friendly name, an envelope-less discriminator, and lifecycle visibility.", + "code": "import \"@typespec/http\";\nimport \"../types.tsp\";\n\nnamespace OpenMeter;\n\n@friendlyName(\"FlatPrice\")\nmodel FlatPrice {\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n type: PriceType.flat;\n\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n amount: Money;\n}\n\n@friendlyName(\"Price\")\n@discriminated(#{ envelope: \"none\", discriminatorPropertyName: \"type\" })\nunion Price {\n flat: FlatPrice,\n unit: UnitPrice,\n tiered: TieredPrice,\n}" + } + ] + }, + "openmeter/billing/charges/usagebased/service/rating": { + "purpose": "Rating orchestration layer for usage-based charges: snapshots metered quantity at a stored-at cutoff, then dispatches to one of two delta-rating engines (delta or periodpreserving) to produce gross detailed lines and totals for a charge run. It is the bridge between the streaming meter, billing rating, and the per-period delta engines in its subpackages.", + "patterns": [ + { + "name": "Service interface + private struct + Config-validated New", + "description": "Public Service interface (GetTotalsForUsage, GetDetailedRatingForUsage, GetPreferredRatingEngineFor) implemented by unexported *service; New(Config) validates non-nil deps via Config.Validate() before constructing.", + "example": "func New(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; ... }" + }, + { + "name": "Input struct with Validate() before any work", + "description": "Each entry point takes a typed Input struct whose Validate() runs first; service period bounds must satisfy From < ServicePeriodTo <= Intent.ServicePeriod.To and StoredAtLT must be non-zero.", + "example": "func (i GetDetailedRatingForUsageInput) Validate() error { if !i.ServicePeriodTo.After(period.From) {...}; if i.StoredAtLT.IsZero() {...} }" + }, + { + "name": "Engine dispatch on charge.State.RatingEngine", + "description": "GetDetailedRatingForUsage switches on charge.State.RatingEngine: RatingEngineDelta -> deltaRater.Rate, RatingEnginePeriodPreserving -> ratePeriodPreservingDetails; unknown engine returns an error. Both engines are constructed in New (delta.New/periodpreserving.New).", + "example": "switch charge.State.RatingEngine { case usagebased.RatingEngineDelta: ... case usagebased.RatingEnginePeriodPreserving: ... default: return ..., fmt.Errorf(\"unsupported rating engine: %s\", ...) }" + }, + { + "name": "Credits mutator always disabled for gross rating", + "description": "Rating here must stay gross; the totals path passes billingrating.WithCreditsMutatorDisabled() because run creation applies credits later. The delta/periodpreserving engines also strip credits internally.", + "example": "opts := []billingrating.GenerateDetailedLinesOption{ billingrating.WithCreditsMutatorDisabled() }" + }, + { + "name": "Voided realizations excluded from billable history", + "description": "Eligible prior runs are filtered with run.IsVoidedBillingHistory() == false and ServicePeriodTo strictly before current ServicePeriodTo; voided runs are skipped for both detailed-line loading and delta subtraction.", + "example": "eligibleRealizations := lo.Filter(charge.Realizations, func(run usagebased.RealizationRun, _ int) bool { if run.IsVoidedBillingHistory() { return false }; return run.ServicePeriodTo.Before(in.ServicePeriodTo) })" + }, + { + "name": "Lazy prior detailed-line expansion with overcharge guard", + "description": "ensureDetailedLinesLoadedForRating only calls detailedLinesFetcher when a non-voided prior run before the cutoff lacks detailed lines, then re-asserts all eligible priors are expanded \u2014 rating refuses to proceed on incomplete prior runs to avoid overcharging.", + "example": "if run.ServicePeriodTo.Before(servicePeriodTo) && !run.DetailedLines.IsPresent() { return ..., fmt.Errorf(\"prior runs[%d]: detailed lines must be expanded\", idx) }" + }, + { + "name": "Quantity snapshot via streaming with stored-at cutoff", + "description": "snapshotQuantity builds streaming.QueryParams with FilterCustomer, From/To from the service period, FilterGroupBy from MeterGroupByFilters, and FilterStoredAt Lt = StoredAtLT, then sums rows via summarizeMeterQueryRow.", + "example": "FilterStoredAt: &filter.FilterTimeUnix{ FilterTime: filter.FilterTime{ Lt: &in.StoredAtLT } }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service interface, Config + Validate, *service struct, New constructor wiring deltaRater/periodPreservingRater and the DetailedLinesFetcher interface.", + "watch_for": "GetPreferredRatingEngineFor currently always returns RatingEngineDelta regardless of intent; do not assume periodpreserving is auto-selected." + }, + { + "file": "details.go", + "role": "GetDetailedRatingForUsage: loads prior lines, snapshots current quantity, dispatches to delta or periodpreserving, builds PriorPeriod cumulative snapshots.", + "watch_for": "currentBillingPeriod advances From past the latest eligible realization's ServicePeriodTo; prior-period meter queries are cumulative from Intent.ServicePeriod.From, while PriorPeriod.ServicePeriod is only the billing slice." + }, + { + "file": "quantitysnapshot.go", + "role": "getQuantityForUsage / snapshotQuantity / summarizeMeterQueryRow \u2014 the only place meters are queried; wraps validation failures in billing.ValidationError.", + "watch_for": "summarizeMeterQueryRow sums all rows as float via alpacadecimal.NewFromFloat(row.Value); precision loss originates here, not in the engines." + }, + { + "file": "totals.go", + "role": "GetTotalsForUsage: fast path that snapshots quantity then calls ratingService.GenerateDetailedLines directly, returning only Totals.", + "watch_for": "Always passes WithCreditsMutatorDisabled; WithMinimumCommitmentIgnored is conditional on IgnoreMinimumCommitment. Bypasses the delta/periodpreserving engines entirely." + }, + { + "file": "service_test.go", + "role": "Behavior tests using stubRatingService, MockStreamingConnector, billingratingservice.New(), and ratingtestutils expectation helpers (ToExpectedDetailedLinesWithServicePeriod, ToExpectedTotals).", + "watch_for": "Tests assert credits mutator disabled (lastOpts.DisableCreditsMutator), current-run-on-charge is ignored, and prior detailed lines are fetched exactly once." + } + ], + "anti_patterns": [ + "Querying meters outside snapshotQuantity, or skipping the StoredAtLT/FilterStoredAt cutoff \u2014 stored-at consistency across current and prior snapshots is load-bearing.", + "Treating voided realizations (IsVoidedBillingHistory) as previously invoiced periods \u2014 they must be excluded from eligible realizations and detailed-line loading.", + "Proceeding to rate when a non-voided prior run before the cutoff has unexpanded detailed lines \u2014 this overcharges customers and the guard exists to prevent it.", + "Rating without WithCreditsMutatorDisabled here \u2014 totals/lines must be gross because credits are applied later during run creation.", + "Selecting the rating engine anywhere but via charge.State.RatingEngine, or assuming GetPreferredRatingEngineFor returns periodpreserving (it returns Delta)." + ], + "decisions": [ + { + "decision": "Two interchangeable rating engines (delta, periodpreserving) selected per-charge via State.RatingEngine, both constructed in New.", + "rationale": "Delta rolls all corrections onto the current run period (invoice-safe today); periodpreserving keeps corrections on their original period but is not yet invoice-safe." + }, + { + "decision": "Prior-period quantities are re-queried cumulatively from Intent.ServicePeriod.From using the current run's StoredAtLT, not copied from stored prior snapshots.", + "rationale": "Rating engines need cumulative quantity for correct delta subtraction; a TODO documents a future optimization to reuse prior snapshots for monotonic meters." + }, + { + "decision": "GetTotalsForUsage bypasses the delta engines and calls billing rating directly.", + "rationale": "Totals do not require per-period detailed-line subtraction, so the fast path avoids generating detailed lines." + } + ], + "code_examples": [ + { + "scenario": "Snapshot metered quantity with a stored-at cutoff and dispatch to the delta engine.", + "code": "currentQuantity, err := s.snapshotQuantity(ctx, snapshotQuantityInput{\n Customer: in.Customer.Customer,\n FeatureMeter: in.FeatureMeter,\n ServicePeriod: currentRunServicePeriod,\n StoredAtLT: in.StoredAtLT,\n})\nif err != nil { return GetDetailedRatingForUsageResult{}, fmt.Errorf(\"get current quantity: %w\", err) }\n\nout, err := s.deltaRater.Rate(ctx, delta.Input{\n Intent: charge.Intent,\n CurrentPeriod: delta.CurrentPeriod{\n MeteredQuantity: currentQuantity,\n ServicePeriod: currentBillingPeriod(currentRunServicePeriod, eligibleRealizations),\n },\n AlreadyBilledDetailedLines: alreadyBilledDetailedLines,\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w24.json b/.archie/enrichments/w24.json new file mode 100644 index 0000000000..1c7ff145ea --- /dev/null +++ b/.archie/enrichments/w24.json @@ -0,0 +1,96 @@ +{ + "openmeter/billing/rating/service": { + "purpose": "Implements rating.Service (the pricing engine entrypoint) as a stateless `service struct{}` constructed via New(). It orchestrates the per-line calculation flow: select a pricer for the price type, wrap it with pre/post-calculation mutators in a priceMutator, resolve the billable period, and emit priced rating.DetailedLines with totals. All monetary math routes through currencyx.Calculator.RoundToPrecision.", + "patterns": [ + { + "name": "Stateless service implementing rating.Service", + "description": "The struct holds no fields; all per-call state comes from the StandardLineAccessor input and GenerateDetailedLinesOptions. Construct with New() which returns rating.Service.", + "example": "type service struct{}; func New() rating.Service { return &service{} }" + }, + { + "name": "Pricer selection by price Type()", + "description": "getPricerFor switches on line.GetPrice().Type() (FlatPriceType, UnitPriceType, TieredPriceType, PackagePriceType, DynamicPriceType) to pick a rate.Pricer; unknown types return an error, never a panic or default pricer.", + "example": "switch linePrice.Type() { case productcatalog.UnitPriceType: basePricer = rate.Unit{} ... default: return nil, fmt.Errorf(\"unsupported price type: %s\", linePrice.Type()) }" + }, + { + "name": "priceMutator pipeline ordering", + "description": "GenerateDetailedLines applies PreCalculation mutators to the input, runs the base Pricer, then PostCalculation mutators over the resulting lines. Order is fixed: DiscountUsage (pre) -> Pricer -> DiscountPercentage, MaxAmountCommitment, MinAmountCommitment, Credits (post). Flat prices get only DiscountPercentage + optional Credits and no commitments.", + "example": "&priceMutator{PreCalculation: []mutator.PreCalculationMutator{&mutator.DiscountUsage{}}, Pricer: basePricer, PostCalculation: postCalculationMutators}" + }, + { + "name": "Options gate mutator inclusion", + "description": "rating.GenerateDetailedLinesOptions flags (IgnoreMinimumCommitment, DisableCreditsMutator) conditionally append MinAmountCommitment / Credits to the post-calculation chain. Charges pricing uses IgnoreMinimumCommitment so min-spend only appears after the service period end.", + "example": "if !opts.IgnoreMinimumCommitment { postCalculationMutators = append(postCalculationMutators, &mutator.MinAmountCommitment{}) }" + }, + { + "name": "Validate input before pricing", + "description": "Both GenerateDetailedLines and ResolveBillablePeriod call validateStandardLine / in.Validate() and PricerCalculateInput.Validate() before any calculation; flat lines skip usage extraction, non-flat lines pull metered + pre-line-period quantities.", + "example": "if err := validateStandardLine(in); err != nil { return rating.GenerateDetailedLinesResult{}, fmt.Errorf(\"validating billable line: %w\", err) }" + }, + { + "name": "Totals computed in service, not pricers", + "description": "getTotalsFromDetailedLines walks each DetailedLine, sets per-line Totals via calculateDetailedLineTotals, then sums them (RoundToPrecision) into the UBP line total. CategoryCommitment lines map their amount to ChargesTotal; all others to Amount.", + "example": "in.Totals = totals.Sum(lo.Map(in.DetailedLines, func(l rating.DetailedLine, _ int) totals.Totals { return l.Totals })...).RoundToPrecision(calc)" + }, + { + "name": "Progressive-billing gated by meter aggregation", + "description": "ResolveBillablePeriod force-disables ProgressiveBilling unless the underlying meter aggregation is increase-only (Sum, Count, Max, UniqueCount via isDependingOnIncreaseOnlyMeters). FlatPriceType never allows progressive billing.", + "example": "if !meterTypeAllowsProgressiveBilling { in.ProgressiveBilling = false }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines the empty `service struct{}` and New() rating.Service constructor.", + "watch_for": "Do not add fields/dependencies here; the engine is intentionally stateless and driven by inputs." + }, + { + "file": "pricer.go", + "role": "getPricerFor maps price type -> rate.Pricer and assembles the priceMutator pre/Pricer/post pipeline; priceMutator.GenerateDetailedLines and ResolveBillablePeriod run the flow.", + "watch_for": "Mutator ordering is load-bearing (discounts before commitments before credits). New price types must be added to the switch and to FlatPriceType handling, and unknown types must error not default." + }, + { + "file": "detailedline.go", + "role": "Public GenerateDetailedLines entrypoint, validateStandardLine, and totals computation (getTotalsFromDetailedLines, calculateDetailedLineTotals).", + "watch_for": "Do NOT fold discounts/credits into the UBP line totals beyond children \u2014 external apps (Stripe) only sync detailed lines, see the in-code WARNING. Flat prices skip Usage population." + }, + { + "file": "billableperiod.go", + "role": "ResolveBillablePeriod delegates to the pricer after gating progressive billing on increase-only meter aggregation (isDependingOnIncreaseOnlyMeters).", + "watch_for": "Non-increase-only meters must be billed in arrears truncated by window; missing feature key or nil meter must error." + }, + { + "file": "options_test.go", + "role": "Validates option behavior (WithMinimumCommitmentIgnored, WithCreditsMutatorDisabled) through testutil.RunCalculationTestCase against the real service.", + "watch_for": "Tests assert full rating.DetailedLines including ChildUniqueReferenceID and Totals; keep new options covered through the harness, not direct mutator calls." + } + ], + "anti_patterns": [ + "Adding state/dependencies to the `service struct{}` instead of passing them via StandardLineAccessor / GenerateDetailedLinesOptions.", + "Reordering or bypassing the priceMutator pipeline (pre -> Pricer -> post) \u2014 discounts, commitments, and credits depend on a fixed order.", + "Computing totals with float or raw decimal math instead of currencyx.Calculator.RoundToPrecision in calculateDetailedLineTotals / getTotalsFromDetailedLines.", + "Injecting discount/credit/commitment logic into totals on the parent UBP line \u2014 only detailed-line children are synced externally (see the WARNING comment).", + "Returning a default pricer for an unrecognized price Type() instead of erroring; or enabling progressive billing for flat/non-increase-only meters." + ], + "decisions": [ + { + "decision": "Pricing engine is a stateless service driven entirely by input accessors and option flags.", + "rationale": "Pricers and mutators must be deterministic and re-runnable (post-calculation mutators are idempotent), so no shared service state is kept across calls." + }, + { + "decision": "Calculation modeled as a priceMutator wrapping a base Pricer with ordered pre/post mutator slices rather than a monolithic per-price function.", + "rationale": "Lets commitments, discounts, and credits be composed and conditionally toggled per call (charges vs invoice) without duplicating per-price-type logic." + }, + { + "decision": "Totals are recomputed at the service layer from detailed-line children, not carried from external systems.", + "rationale": "Only detailed lines are synced to external billing apps; parent UBP totals are derived locally and must not embed app-specific discount logic." + } + ], + "code_examples": [ + { + "scenario": "Selecting a pricer and building the mutator pipeline for a non-flat price", + "code": "func getPricerFor(line rating.PriceAccessor, opts rating.GenerateDetailedLinesOptions) (*priceMutator, error) {\n\tlinePrice := line.GetPrice()\n\tvar basePricer rate.Pricer\n\tswitch linePrice.Type() {\n\tcase productcatalog.UnitPriceType:\n\t\tbasePricer = rate.Unit{}\n\tcase productcatalog.TieredPriceType:\n\t\tbasePricer = rate.Tiered{}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported price type: %s\", linePrice.Type())\n\t}\n\tpost := []mutator.PostCalculationMutator{&mutator.DiscountPercentage{}, &mutator.MaxAmountCommitment{}}\n\tif !opts.IgnoreMinimumCommitment {\n\t\tpost = append(post, &mutator.MinAmountCommitment{})\n\t}\n\tif !opts.DisableCreditsMutator {\n\t\tpost = append(post, &mutator.Credits{})\n\t}\n\treturn &priceMutator{PreCalculation: []mutator.PreCalculationMutator{&mutator.DiscountUsage{}}, Pricer: basePricer, PostCalculation: post}, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w25.json b/.archie/enrichments/w25.json new file mode 100644 index 0000000000..06554a19dc --- /dev/null +++ b/.archie/enrichments/w25.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/worker/subscriptionsync/service/reconciler": { + "purpose": "The planning side of the subscription->billing sync bridge: diffs subscription target state against persisted billing state and produces a Plan of invoice-line patches and charge patches, then applies it via billing.Service / charges.Service. It decides WHAT must change; the child invoiceupdater package executes invoice writes. Primary constraint: every diffed item must route to exactly one backend (invoice line, split-line hierarchy, flat-fee charge, or usage-based charge) and the chosen backend must stay consistent across runs.", + "patterns": [ + { + "name": "Reconciler = Plan then Apply", + "description": "Service.Plan(ctx, PlanInput) builds a *Plan (pure, no writes) and Service.Apply(ctx, ApplyInput) executes it. DryRun in ApplyInput logs patches via invoiceUpdater.LogPatches + logChargesPatches and returns without writing.", + "example": "plan, _ := s.Plan(ctx, PlanInput{Target: t, Persisted: p}); s.Apply(ctx, ApplyInput{Plan: plan, Customer: cid, Currency: cc})" + }, + { + "name": "PatchCollection interface per backend", + "description": "Every backend collection implements PatchCollection (AddCreate/AddDelete/AddShrink/AddExtend/AddProrate + GetLineEngineType). diffItem dispatches one of these methods based on target/existing presence and period-end comparison. New backends must satisfy the full interface.", + "example": "func (c *flatFeeChargeCollection) AddShrink(_ string, existing persistedstate.Item, target targetstate.StateItem) error" + }, + { + "name": "Router resolves the backend, not the diff", + "description": "patchCollectionRouter.GetCollectionFor(item) maps a persisted Item.Type() to its collection; ResolveDefaultCollection(target) picks the backend for a NEW target from settlement mode + credits gate + price type. Plan routes EXISTING items by item type, falling back to the default collection only for brand-new uniqueIDs (graceful invoice->charge migration).", + "example": "case persistedstate.ItemTypeChargeFlatFee: return c.flatFeeChargeCollection, nil" + }, + { + "name": "diffItem create/delete/shrink/extend/prorate decision tree", + "description": "nil target + existing => AddDelete; target + nil existing => AddCreate; otherwise compare ServicePeriod.To: Before=>AddShrink, After=>AddExtend, equal=>no-op. Flat-fee invoice lines additionally use semanticProrateDecision (LineEngineTypeInvoice only) to emit AddProrate when amount or period drifts.", + "example": "case targetPeriod.To.Before(existingPeriod.To): return patches.AddShrink(target.UniqueID, existing, *target)" + }, + { + "name": "Charge period changes: emulated replacement vs native patch by settlement mode", + "description": "In flat/usage charge collections, AddShrink/AddExtend emit a native chargesmeta.NewPatchShrink/NewPatchExtend ONLY when the existing charge's Intent.SettlementMode == CreditThenInvoiceSettlementMode; otherwise they call addEmulatedReplacement (delete patch + fresh create intent). AddProrate is unsupported for charges (returns unsupportedOperationError).", + "example": "if existingCharge.GetFlatFeeCharge().Intent.SettlementMode != productcatalog.CreditThenInvoiceSettlementMode { return c.addEmulatedReplacement(existing, intent) }" + }, + { + "name": "filterInScopeLines before diffing", + "description": "Plan filters target items first: drops !IsBillable(); charge-backed targets pass on billability alone; invoice-backed targets are dropped when GetExpectedLine() returns nil. This makes non-billable/non-realizing targets behave as absent and reconcile to delete/no-op.", + "example": "if defaultCollection.GetLineEngineType().IsCharge() { out = append(out, line); continue }" + }, + { + "name": "Config.Validate gates construction", + "description": "New(Config) requires non-nil BillingService, Logger, FeatureGate; ChargesService is required only when EnableCreditThenInvoice. CreditOnly settlement is rejected at Plan if chargesService is nil. Collections build via newPatchCollectionRouter whose config.Validate enforces capacity>0, invoices!=nil, featureGate!=nil.", + "example": "if c.EnableCreditThenInvoice && c.ChargesService == nil { return fmt.Errorf(\"charges service is required when credit then invoice is enabled\") }" + } + ], + "key_file_guides": [ + { + "file": "reconciler.go", + "role": "Public Reconciler interface, Service, Config, Plan/Apply, diffItem decision tree, filterInScopeLines. Owns create/delete/shrink/extend/prorate routing.", + "watch_for": "Plan routes existing items by GetCollectionFor (existing Item.Type) and only new uniqueIDs by ResolveDefaultCollection. Apply must apply invoice patches via invoiceUpdater BEFORE charge patches, and errors if ChargePatches non-empty while chargesService is nil." + }, + { + "file": "patch.go", + "role": "Patch/InvoicePatch/PatchCollection interfaces and patchCollectionRouter (holds the 4 backend collections + credits gating). CollectInvoicePatches / CollectChargePatches aggregate plan output.", + "watch_for": "ResolveDefaultCollection assumes price is non-nil (guaranteed by filterInScopeLines). isCreditsEnabled returns false when creditsEnabled is off; nil featureGate or empty creditsFlag => enabled." + }, + { + "file": "patchcharge.go", + "role": "chargePatchCollection base shared by flat/usage charge collections: addCreate/addPatch dedup by chargeID, addEmulatedReplacement (delete+create), newChargeIntentBaseFromTargetState builds chargesmeta.Intent from target state.", + "watch_for": "addPatch rejects duplicate chargeID; AddProrate is intentionally unsupported. newChargeIntentBaseFromTargetState clones Annotations/Metadata and sets ManagedBy=SubscriptionManagedLine + UniqueReferenceID=target.UniqueID." + }, + { + "file": "patchchargeflatfee.go", + "role": "flatFeeChargeCollection: AddCreate/AddShrink/AddExtend; newFlatFeeChargeIntent converts rate card price.AsFlat() into a chargesflatfee.Intent.", + "watch_for": "Shrink/Extend emit a native patch only for CreditThenInvoice settlement, else emulated replacement. existing must implement persistedstate.FlatFeeChargeGetter or it errors." + }, + { + "file": "patchchargeusagebased.go", + "role": "usageBasedChargeCollection: same create/shrink/extend shape for usage-based charges; newUsageBasedChargeIntent carries Price + Discounts.", + "watch_for": "existing must satisfy persistedstate.UsageBasedChargeGetter; settlement-mode branching mirrors flat fee." + }, + { + "file": "patchinvoiceline.go / patchinvoicelinehierarchy.go", + "role": "lineInvoicePatchCollection and lineHierarchyPatchCollection implement invoice-line and split-line-group diffs, emitting invoiceupdater.New*Patch. Hierarchy mutates child lines + updates the SplitLineGroup via ToUpdate().", + "watch_for": "Both compile-time assert _ PatchCollection / _ InvoicePatchCollection. Hierarchy AddCreate/AddProrate are unsupported (error). Shrink/Extend assert target end strictly before/after existing end. ServicePeriod.Truncate(streaming.MinimumWindowSizeDuration).IsEmpty() => delete patch instead of update." + }, + { + "file": "patchhelpers.go", + "role": "shouldSkipLinePatch / shouldSkipHierarchyPatch (AnnotationSubscriptionSyncIgnore + SubscriptionManagedLine guards) and getPatchesForUpdateUsageBasedLine (clone, set service period, set invoice-at on gathering invoices).", + "watch_for": "Skips any line not managed by SubscriptionManagedLine or flagged AnnotationSubscriptionSyncIgnore. Returns nil (no-op) when nothing changed." + }, + { + "file": "prorate.go", + "role": "semanticProrateDecision: flat-fee-only proration decision comparing existing vs expected per-unit amount and service period; errors for split-line hierarchies.", + "watch_for": "Only meaningful for invoice flat-fee lines; returns empty decision (ShouldProrate=false) for usage-based/non-flat-fee. diffItem calls it only when LineEngineType==Invoice." + } + ], + "anti_patterns": [ + "Diffing by target backend instead of existing item type: Plan must use GetCollectionFor(existing) for items already in persisted state and only fall back to ResolveDefaultCollection for brand-new uniqueIDs, or invoice->charge migrations break.", + "Adding a charge AddProrate or a hierarchy AddCreate/AddProrate path: these are deliberately unsupported and return errors; period changes for charges must flow through shrink/extend.", + "Emitting a native charge shrink/extend patch for a non-CreditThenInvoice charge: those must become an emulated delete+create replacement via addEmulatedReplacement.", + "Mutating invoice lines directly here instead of producing invoiceupdater.Patch values (NewCreateLinePatch/NewUpdateLinePatch/NewDeleteLinePatch/NewUpdateSplitLineGroupPatch) for the invoiceupdater child to apply.", + "Skipping the SubscriptionManagedLine / AnnotationSubscriptionSyncIgnore guards (shouldSkipLinePatch/shouldSkipHierarchyPatch) and patching customer-owned or sync-ignored lines." + ], + "decisions": [ + { + "decision": "Plan is pure and Apply is the only writer; DryRun logs instead of writing.", + "rationale": "Separating computation from side effects makes the diff deterministic and testable, and lets the worker preview drift (DryRun) before committing invoice/charge mutations." + }, + { + "decision": "A router selects one of four backend collections per item, gated by settlement mode + credits feature flag + price type.", + "rationale": "The same subscription item can be realized as an invoice line, a split-line hierarchy, or a flat/usage charge depending on credits/settlement config; routing keeps each artifact's lifecycle isolated and enables graceful migration between backends." + }, + { + "decision": "Charge period changes are emulated replacements except under CreditThenInvoice, and proration is delegated entirely to the charge domain.", + "rationale": "Only CreditThenInvoice charges expose native shrink/extend semantics; for other modes a delete+recreate keeps the charge state correct, and the charge stack recomputes effective amounts from updated periods so the reconciler never prorates charges itself." + } + ], + "code_examples": [ + { + "scenario": "diffItem dispatching the correct PatchCollection method based on presence and period drift", + "code": "func (s *Service) diffItem(target *targetstate.StateItem, existing persistedstate.Item, patches PatchCollection) error {\n\tswitch {\n\tcase target == nil && existing == nil:\n\t\treturn nil\n\tcase target == nil && existing != nil:\n\t\treturn patches.AddDelete(lo.FromPtr(existing.ChildUniqueReferenceID()), existing)\n\tcase target != nil && existing == nil:\n\t\treturn patches.AddCreate(*target)\n\t}\n\texistingPeriod := existing.ServicePeriod()\n\ttargetPeriod := target.GetServicePeriod()\n\tif patches.GetLineEngineType() == billing.LineEngineTypeInvoice {\n\t\tif decision, err := semanticProrateDecision(existing, *target); err != nil {\n\t\t\treturn err\n\t\t} else if decision.ShouldProrate {\n\t\t\treturn patches.AddProrate(existing, *target, existingPeriod, targetPeriod, decision.OriginalAmount, decision.TargetAmount)\n\t\t}\n\t}\n\tswitch {\n\tcase targetPeriod.To.Before(existingPeriod.To):\n\t\treturn patches.AddShrink(target.UniqueID, existing, *target)\n\tcase targetPeriod.To.After(existingPeriod.To):\n\t\treturn patches.AddExtend(existing, *target)\n\tdefault:\n\t\treturn nil\n\t}\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w26.json b/.archie/enrichments/w26.json new file mode 100644 index 0000000000..94f020b0cb --- /dev/null +++ b/.archie/enrichments/w26.json @@ -0,0 +1,96 @@ +{ + "openmeter/customer/service": { + "purpose": "Concrete implementation of customer.Service (package customerservice). Orchestrates the customer CRUD + lifecycle flow: request validation, transactional adapter calls, service hooks, and event publishing. The high-fan-in root service consumed by billing, subscription, ledger, and the v3 customers handlers.", + "patterns": [ + { + "name": "Service struct holds adapter + validators + publisher + hook registry", + "description": "Service has exactly four fields: adapter customer.Adapter, requestValidatorRegistry customer.RequestValidatorRegistry, publisher eventbus.Publisher, hooks models.ServiceHookRegistry[customer.Customer]. No other dependencies are injected.", + "example": "type Service struct { adapter customer.Adapter; requestValidatorRegistry customer.RequestValidatorRegistry; publisher eventbus.Publisher; hooks models.ServiceHookRegistry[customer.Customer] }" + }, + { + "name": "Config + Validate + New constructor", + "description": "Construct via New(Config) which calls config.Validate() (rejects nil Adapter/Publisher) before building Service. RequestValidatorRegistry and empty hook registry are created internally, not passed in.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{...}, nil }" + }, + { + "name": "Interface assertion per file", + "description": "Each file asserts the interface it satisfies at package level: customer.go and service.go both have `var _ customer.Service = (*Service)(nil)`; requestvalidator.go has `var _ customer.RequestValidatorService = (*Service)(nil)`.", + "example": "var _ customer.Service = (*Service)(nil)" + }, + { + "name": "Validate -> transaction.Run -> adapter -> hooks -> publish", + "description": "Every mutating method follows: requestValidatorRegistry.Validate*(ctx, input) wrapped in models.NewGenericValidationError, then transaction.Run/RunWithNoValue(ctx, s.adapter, ...), inside which the adapter mutates, hooks fire (PostCreate / Pre+PostUpdate / Pre+PostDelete), then publisher.Publish emits the domain event.", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (*customer.Customer, error) { c, err := s.adapter.CreateCustomer(ctx, input); ...; s.hooks.PostCreate(ctx, c); s.publisher.Publish(ctx, customer.NewCustomerCreateEvent(ctx, c)) })" + }, + { + "name": "Read methods pass straight through to adapter", + "description": "GetCustomer, ListCustomers, GetCustomerByUsageAttribution, ListCustomerUsageAttributions are one-line delegations to s.adapter with no validation, transaction, hook, or event. Only mutations get the full pipeline.", + "example": "func (s *Service) GetCustomer(ctx context.Context, input customer.GetCustomerInput) (*customer.Customer, error) { return s.adapter.GetCustomer(ctx, input) }" + }, + { + "name": "Deleted / precondition guards before mutate", + "description": "Delete refuses customers with active subscriptions (NewGenericPreConditionFailedError + NewErrDeletingCustomerWithActiveSubscriptions) and treats already-deleted/not-found as no-op; Update rejects soft-deleted customers (cus.IsDeleted() -> NewGenericPreConditionFailedError). Delete expands ExpandSubscriptions and errors if ActiveSubscriptionIDs.IsAbsent().", + "example": "if len(cus.ActiveSubscriptionIDs.OrEmpty()) > 0 { return models.NewGenericPreConditionFailedError(customer.NewErrDeletingCustomerWithActiveSubscriptions(cus.ActiveSubscriptionIDs.OrEmpty())) }" + }, + { + "name": "Hooks/validators registered post-construction", + "description": "RegisterHooks(...models.ServiceHook[customer.Customer]) and RegisterRequestValidator(customer.RequestValidator) mutate the registries after New. Cross-domain wiring (ledgerresolvers.NewCustomerLedgerHook, subjectcustomer/entitlementvalidator hooks) is attached this way, not via Config.", + "example": "env.CustomerService.RegisterHooks(hook)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines Service struct, Config, Validate, New, RegisterHooks. The DI surface of the package.", + "watch_for": "Adding a dependency means a new Config field + a nil check in Validate; do not reach for slog.Default() or context.Background() fallbacks." + }, + { + "file": "customer.go", + "role": "All customer.Service method implementations (List/Create/Delete/Get/GetByUsageAttribution/Update).", + "watch_for": "Keep each mutation's adapter write, hooks, and publish inside the SAME transaction.Run closure so a hook or publish failure rolls back the write (see TestCustomerService_CreateCustomerRollsBackWhenLedgerProvisioningFails). Reads must stay pass-through." + }, + { + "file": "requestvalidator.go", + "role": "Implements customer.RequestValidatorService.RegisterRequestValidator delegating to requestValidatorRegistry.Register.", + "watch_for": "Validation is invoked per-method via requestValidatorRegistry.ValidateCreate/Update/DeleteCustomer wrapped in models.NewGenericValidationError; do not validate outside that wrapper." + }, + { + "file": "service_test.go", + "role": "End-to-end CRUD test using customertestutils.NewTestEnv + DBSchemaMigrate, asserting create/get-by-id/key/idorkey/usage-attribution, update, soft-delete semantics.", + "watch_for": "Soft delete: GetCustomer by ID still returns the (DeletedAt-set) customer, but Get by key returns *models.GenericNotFoundError; list needs IncludeDeleted:true to see it." + }, + { + "file": "ledger_hook_test.go", + "role": "Proves hook + transaction integration: CreateCustomer provisions ledger accounts via a registered hook, and a failing provisioner rolls back the whole create.", + "watch_for": "Uses ledgertestutils.InitDeps + ledgerresolvers.NewCustomerLedgerHook; the failing-provisioner case asserts the customer is NOT persisted (GenericNotFoundError), validating transactional hook semantics." + } + ], + "anti_patterns": [ + "Calling s.adapter mutating methods outside transaction.Run/RunWithNoValue, or placing hooks/publish outside that closure so a later failure cannot roll back the write.", + "Adding validation, hooks, or event publishing to read methods (Get/List), or skipping requestValidatorRegistry validation on a new mutation.", + "Constructing Service via &Service{} literal instead of New(Config), bypassing config.Validate() nil checks.", + "Returning bare errors instead of models.NewGenericValidationError / NewGenericPreConditionFailedError / NewErrDeletingCustomerWithActiveSubscriptions for the established failure modes.", + "Mutating a soft-deleted customer (cus.IsDeleted()) or deleting one with active subscriptions instead of returning the precondition-failed guard." + ], + "decisions": [ + { + "decision": "Hooks and request validators are registered after construction (RegisterHooks/RegisterRequestValidator) rather than injected via Config.", + "rationale": "Cross-domain glue (ledger account provisioning, subject sync, entitlement-deletion guard) is wired at app/common DI time without creating import cycles back into the core customer service, and can be toggled (e.g. credits disabled -> noop ledger hook)." + }, + { + "decision": "Mutation, hooks, and event publishing all run inside one transaction.Run closure.", + "rationale": "Guarantees atomicity: a hook (e.g. ledger provisioning) or publish failure rolls back the customer write, as exercised by the rollback test." + }, + { + "decision": "Read methods delegate directly to the adapter with no service-layer logic.", + "rationale": "Validation, lifecycle, and eventing only matter for state changes; keeping reads thin avoids redundant overhead on the high-fan-in read path." + } + ], + "code_examples": [ + { + "scenario": "Mutating method: validate, transact, mutate, hook, publish", + "code": "func (s *Service) CreateCustomer(ctx context.Context, input customer.CreateCustomerInput) (*customer.Customer, error) {\n\tif err := s.requestValidatorRegistry.ValidateCreateCustomer(ctx, input); err != nil {\n\t\treturn nil, models.NewGenericValidationError(err)\n\t}\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (*customer.Customer, error) {\n\t\tcreated, err := s.adapter.CreateCustomer(ctx, input)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err = s.hooks.PostCreate(ctx, created); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif err := s.publisher.Publish(ctx, customer.NewCustomerCreateEvent(ctx, created)); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to publish customer created event: %w\", err)\n\t\t}\n\t\treturn created, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w27.json b/.archie/enrichments/w27.json new file mode 100644 index 0000000000..8f1cd1b1a9 --- /dev/null +++ b/.archie/enrichments/w27.json @@ -0,0 +1,239 @@ +{ + "openmeter/entitlement/balanceworker": { + "purpose": "Kafka/Watermill worker (package balanceworker, driven by cmd/balance-worker) that reacts to entitlement, grant, reset, and ingest events by recalculating an entitlement's value and emitting a snapshot.SnapshotEvent. Its primary constraint: every handler is idempotent and re-fetches live state, because rolled-back transactions also fire events and retries are expected.", + "patterns": [ + { + "name": "grouphandler event fan-in in eventHandler", + "description": "worker.eventHandler registers one grouphandler.NewGroupEventHandler per event type (EntitlementCreatedEventV2, grant.CreatedEvent/V2, grant.VoidedEvent/V2, meteredentitlement.EntitlementResetEvent/V3, ingestevents.EventBatchedIngest, events.RecalculateEvent) wired into a single grouphandler.NoPublishingHandler.", + "example": "grouphandler.NewGroupEventHandler(func(ctx, event *grant.CreatedEventV2) error { return w.opts.EventBus.Publish(ctx, events.RecalculateEvent{...}) })" + }, + { + "name": "Trigger events normalize to RecalculateEvent", + "description": "Most upstream handlers do not recalculate inline; they re-publish an events.RecalculateEvent carrying Entitlement NamespacedID, OriginalEventSource, AsOf, SourceOperation. The RecalculateEvent handler then maps SourceOperation to a snapshot.ValueOperation and calls handleEntitlementEvent.", + "example": "w.opts.EventBus.Publish(ctx, events.RecalculateEvent{Entitlement: ..., AsOf: event.ResetAt, SourceOperation: events.OperationTypeMeteredEntitlementReset})" + }, + { + "name": "Two-stage scope filtering before snapshotting", + "description": "handleEntitlementEvent first calls w.filters.IsNamespaceInScope, re-lists the entitlement via ListEntitlements(IncludeDeleted:true), then IsEntitlementInScope before producing a snapshot. Out-of-scope returns (nil,nil).", + "example": "inScope, err := w.filters.IsEntitlementInScope(ctx, filters.EntitlementFilterRequest{Entitlement: entitlementEntity, EventAt: opts.eventAt, Operation: ...})" + }, + { + "name": "PublishIfNoError for handler->snapshot publishing", + "description": "Newer handlers (reset v3, RecalculateEvent) return w.opts.EventBus.WithContext(ctx).PublishIfNoError(w.handleEntitlementEvent(...)) so a nil event from filtering does not get published.", + "example": "return w.opts.EventBus.WithContext(ctx).PublishIfNoError(w.handleEntitlementEvent(ctx, id, options...))" + }, + { + "name": "Snapshots built via snapshot.NewSnapshotEvent + marshaler.WithSource", + "description": "createSnapshotEvent/createDeletedSnapshotEvent resolve customer+subject (resolveCustomerAndSubject), feature (IncludeArchivedFeatureTrue), and entitlement value, then wrap with marshaler.WithSource(metadata.ComposeResourcePath(...)).", + "example": "marshaler.WithSource(metadata.ComposeResourcePath(namespace, metadata.EntityEntitlement, id), snap)" + }, + { + "name": "RecordLastCalculation after each snapshot", + "description": "processEntitlementEntity / ProcessEntitlements call w.filters.RecordLastCalculation; failures are logged at WARN and swallowed (non-critical, worst case is redundant recalculation).", + "example": "w.filters.RecordLastCalculation(ctx, filters.RecordLastCalculationRequest{Entitlement: *entitlementEntity, CalculatedAt: calculatedAt})" + }, + { + "name": "Reset operations snapshot at period start, not now", + "description": "When sourceOperation==ValueOperationReset, createSnapshotEvent is called with entitlementEntity.CurrentUsagePeriod.From (not calculatedAt) so the new period gets an initial-grant snapshot, and reset events skip RecordLastCalculation.", + "example": "snap, err := w.createSnapshotEvent(ctx, entitlementEntity, entitlementEntity.CurrentUsagePeriod.From, opts)" + } + ], + "key_file_guides": [ + { + "file": "worker.go", + "role": "Worker + WorkerOptions, New() router wiring (three AddConsumerHandler topics: system/ingest/balance-worker), eventHandler() event registration, AddHandler for extra batched-ingest handlers.", + "watch_for": "Adding an event type requires a new grouphandler.NewGroupEventHandler inside eventHandler(); WorkerOptions.Validate() must be extended for any new required dependency." + }, + { + "file": "entitlementhandler.go", + "role": "handleEntitlementEvent / processEntitlementEntity / createSnapshotEvent / createDeletedSnapshotEvent plus the functional-options (WithSource/WithEventAt/WithSourceOperation/WithRawIngestedEvents).", + "watch_for": "handleEntitlementEventOptions.Validate requires eventAt; entitlement-not-found returns router.NewWarningLogSeverityError to force a retry (not a hard fail)." + }, + { + "file": "filters.go", + "role": "EntitlementFilters facade composing filters.NotificationsFilter + filters.HighWatermarkCache, with OTel counters; EntitlementFiltersConfig.Validate guard.", + "watch_for": "RecordLastCalculation only forwards to filters implementing filters.CalculationTimeRecorder; executeFilters is fail-fast (first out-of-scope short-circuits)." + }, + { + "file": "recalculate.go", + "role": "Recalculator for full-namespace recalculation jobs (ListInScopeEntitlements paginates defaultPageSize=20k, ProcessEntitlements), with lrux TTL caches for feature and customer+subject.", + "watch_for": "DefaultIncludeDeletedDuration=24h governs which deleted entitlements get re-emitted; deleted/expired entitlements emit ValueOperationDelete with nil Value." + }, + { + "file": "ingesthandler.go", + "role": "handleBatchedIngestEvent: lists entitlements affected by meter slugs+subject via Repo, checks GetEntitlementActivityPeriod().Contains(eventTime), and publishes RecalculateEvent with OperationTypeIngest.", + "watch_for": "Empty MeterSlugs is a normal no-op; deleted entitlements are skipped (final delete event already sent)." + }, + { + "file": "repository.go", + "role": "BalanceWorkerRepository interface (ListEntitlementsAffectedByIngestEvents), IngestEventQueryFilter.Validate, ListAffectedEntitlementsResponse.GetEntitlementActivityPeriod (StartBoundedPeriod from ActiveFrom/CreatedAt to min(ActiveTo,DeletedAt)).", + "watch_for": "GetEntitlementActivityPeriod prefers ActiveFrom over CreatedAt and the earliest of ActiveTo/DeletedAt as the end bound." + }, + { + "file": "subject_customer.go", + "role": "resolveCustomerAndSubject helper: customer is required, subject is optional and may be nil; missing subject row falls back to a synthetic subject carrying only the usage-attribution key.", + "watch_for": "Subjects are no longer persisted, so GenericNotFoundError on GetByKey is expected and must not propagate." + } + ], + "anti_patterns": [ + "Recalculating inline in an upstream event handler instead of publishing events.RecalculateEvent and letting the RecalculateEvent handler converge to a snapshot.", + "Producing a snapshot without first passing both IsNamespaceInScope and IsEntitlementInScope filter checks.", + "Publishing a possibly-nil event directly instead of using EventBus.PublishIfNoError, which causes nil/filtered events to be emitted.", + "Treating RecordLastCalculation failures as fatal - they are intentionally logged at WARN and swallowed.", + "Snapshotting a reset at time.Now() instead of CurrentUsagePeriod.From, losing the initial-grant snapshot the notification pipeline needs." + ], + "decisions": [ + { + "decision": "Handlers re-fetch live state (entitlement, feature, value) on every event rather than trusting the event payload.", + "rationale": "Makes the worker resilient across event-schema versions and to rolled-back transactions that still fire events; retries converge." + }, + { + "decision": "A unified RecalculateEvent decouples the many trigger event types from the single recalculation/snapshot path.", + "rationale": "One idempotent recalculation routine serves grant, reset, create, delete, and ingest triggers, simplifying retries and dedup." + }, + { + "decision": "Scope filtering (notifications + high-watermark dedup) is a separate composable filters package injected into the worker.", + "rationale": "Lets the worker skip entitlements no notification rule cares about and dedup recently-calculated ones without bloating handler logic." + } + ], + "code_examples": [ + { + "scenario": "Re-publishing a trigger event as a RecalculateEvent inside eventHandler", + "code": "grouphandler.NewGroupEventHandler(func(ctx context.Context, event *grant.CreatedEventV2) error {\n return w.opts.EventBus.Publish(ctx, events.RecalculateEvent{\n Entitlement: pkgmodels.NamespacedID{Namespace: event.Namespace.ID, ID: event.Grant.OwnerID},\n OriginalEventSource: metadata.ComposeResourcePath(event.Namespace.ID, metadata.EntityEntitlement, event.Grant.OwnerID, metadata.EntityGrant, event.Grant.ID),\n AsOf: event.Grant.ManagedModel.CreatedAt,\n SourceOperation: events.OperationTypeGrantCreated,\n })\n})" + } + ] + }, + "openmeter/entitlement/driver": { + "purpose": "HTTP driver layer (package entitlementdriver) for the V1 subject-key-based entitlement and metered-grant API, mapping api.* request/response types onto entitlement.Service and meteredentitlement.Connector. Every handler resolves the namespace then a customer from the subject key before touching the connector.", + "patterns": [ + { + "name": "Per-handler interface + httptransport.HandlerWithArgs triple", + "description": "EntitlementHandler / MeteredEntitlementHandler expose one method per operation returning a typed HandlerWithArgs[Request, Response, Params], built with httptransport.NewHandlerWithArgs(decode, handle, encode, options...).", + "example": "type CreateGrantHandler httptransport.HandlerWithArgs[CreateGrantHandlerRequest, CreateGrantHandlerResponse, CreateGrantHandlerParams]" + }, + { + "name": "Namespace then subject->customer resolution", + "description": "Decoders call h.resolveNamespace(ctx) (from namespaceDecoder); business funcs call h.resolveCustomerFromSubject(ctx, ns, subjectIdOrKey) which goes subject.GetByIdOrKey then customer.GetCustomerByUsageAttribution. Nil customer -> NewGenericPreConditionFailedError.", + "example": "cust, err := h.resolveCustomerFromSubject(ctx, request.Namespace, request.SubjectKey)" + }, + { + "name": "Generic vs metered connector split", + "description": "entitlementHandler uses entitlement.Service (connector) for CRUD/value/list; meteredEntitlementHandler uses meteredentitlement.Connector (balanceConnector) for grants, reset, balance history.", + "example": "grant, err := h.balanceConnector.CreateGrant(ctx, request.Namespace, cust.ID, request.EntitlementIdOrFeatureKey, request.GrantInput)" + }, + { + "name": "Centralized mapping via Parser and free Map*/Parse* functions", + "description": "parser.go holds the stateless Parser (ToMetered/ToStatic/ToBoolean/ToAPIGeneric over EntitlementWithCustomer) plus MapEntitlementValueToAPI, ParseAPICreateInput, MapAPIPeriodIntervalToRecurrence, MapRecurrenceToAPI. Handlers never inline domain<->API translation.", + "example": "return Parser.ToAPIGeneric(&entitlement.EntitlementWithCustomer{Entitlement: lo.FromPtr(res), Customer: *cust})" + }, + { + "name": "Shared error encoder", + "description": "All handlers attach httptransport.WithErrorEncoder(GetErrorEncoder()); errors.go maps domain errors (FeatureNotFoundError, entitlement.NotFoundError/AlreadyExistsError/InvalidValueError/InvalidFeatureError/WrongTypeError, pagination.InvalidError) to HTTP status via commonhttp.HandleErrorIfTypeMatches.", + "example": "commonhttp.HandleErrorIfTypeMatches[*entitlement.AlreadyExistsError](ctx, http.StatusConflict, err, w, func(e *entitlement.AlreadyExistsError) map[string]interface{}{ return map[string]interface{}{\"conflictingEntityId\": e.EntitlementID} })" + }, + { + "name": "WithOperationName matches OpenAPI operationId", + "description": "Handlers append httptransport.WithOperationName(\"createEntitlement\"/\"overrideEntitlement\"/\"getEntitlementValue\"/...) so telemetry/routing align with the generated spec.", + "example": "httptransport.WithOperationName(\"getEntitlementsOfSubject\")" + }, + { + "name": "Type discriminator dispatch for create/value", + "description": "ParseAPICreateInput switches on inp.ValueByDiscriminator() across Metered/Static/Boolean create inputs; MapEntitlementValueToAPI switches on the concrete value type (MeteredEntitlementValue/StaticEntitlementValue/BooleanEntitlementValue/NoAccessValue).", + "example": "switch v := value.(type) { case api.EntitlementMeteredCreateInputs: ... }" + } + ], + "key_file_guides": [ + { + "file": "entitlement.go", + "role": "EntitlementHandler interface + entitlementHandler: Create/Override/Get/GetById/Delete/GetValue/GetEntitlementsOfSubject/ListEntitlements, OrderBy/EntitlementType validation in decoders.", + "watch_for": "UsageAttribution is populated in the business func from the resolved customer, not the decoder ('somewhat hacky'); GetEntitlementsOfSubject also rejects deleted customers via NewGenericPreConditionFailedError." + }, + { + "file": "metered.go", + "role": "MeteredEntitlementHandler: CreateGrant, ListEntitlementGrants, ResetEntitlementUsage, GetEntitlementBalanceHistory; resolveNamespace/resolveCustomerFromSubject; MapEntitlementGrantToAPI.", + "watch_for": "Grant recurrence anchor defaults to EffectiveAt; balance history window timezone parsed via time.LoadLocation and burndown segments built from BalanceConnector output; ListEntitlementGrants uses a hardcoded page size of 1000." + }, + { + "file": "parser.go", + "role": "Stateless Parser + mapping/parse helpers; ParseAPICreateInput prunes ActiveFrom/ActiveTo and builds timeutil.Recurrence from UsagePeriod; MapRecurrenceToAPI is best-effort ISO mapping.", + "watch_for": "MapRecurrenceToAPI is explicitly approximate (24h != 1d) and falls back to ISO string; ParseAPICreateInput requires a usage period when MeasureUsageFrom is an enum preset." + }, + { + "file": "errors.go", + "role": "GetErrorEncoder mapping domain error types to HTTP statuses.", + "watch_for": "New domain error types are invisible to clients unless added here; ordering uses short-circuit || so the first matching type wins." + } + ], + "anti_patterns": [ + "Treating an EntitlementIdOrFeatureKey path segment as a literal ID without resolving the customer first via resolveCustomerFromSubject.", + "Calling the generic entitlement.Service for grant/reset/balance-history operations instead of meteredentitlement.Connector (balanceConnector).", + "Putting domain<->API translation inside a handler closure instead of in parser.go (Parser/Map*/Parse*).", + "Returning a raw error from a handler instead of routing through httptransport.WithErrorEncoder(GetErrorEncoder()) so domain errors get correct HTTP status.", + "Passing a nil/unguarded customer to the connector instead of failing with models.NewGenericPreConditionFailedError when the subject has no customer." + ], + "decisions": [ + { + "decision": "V1 driver is subject-key-centric: every request resolves a customer from a subject key before hitting the connector.", + "rationale": "Preserves the legacy subject-based public API surface while the domain layer is customer-centric; v2 (entitlementdriverv2) is the customer-centric counterpart." + }, + { + "decision": "Generic and metered/grant operations are split across entitlement.Service and meteredentitlement.Connector.", + "rationale": "Keeps credit/grant/reset balance logic in the metered connector and CRUD/value in the generic service, matching the domain boundary." + }, + { + "decision": "All domain<->API mapping is concentrated in a stateless Parser plus free functions in parser.go.", + "rationale": "Handlers stay thin (decode/resolve/call/encode) and v2 reuses these helpers rather than duplicating them." + } + ], + "code_examples": [ + { + "scenario": "A typical V1 handler: decode + namespace, then resolve customer and map result", + "code": "func (h *entitlementHandler) GetEntitlementValue() GetEntitlementValueHandler {\n return httptransport.NewHandlerWithArgs(\n func(ctx context.Context, r *http.Request, params GetEntitlementValueHandlerParams) (GetEntitlementValueHandlerRequest, error) {\n ns, err := h.resolveNamespace(ctx)\n if err != nil { return GetEntitlementValueHandlerRequest{}, err }\n return GetEntitlementValueHandlerRequest{SubjectKey: params.SubjectKey, EntitlementIdOrFeatureKey: params.EntitlementIdOrFeatureKey, Namespace: ns, At: defaultx.WithDefault(params.Params.Time, clock.Now())}, nil\n },\n func(ctx context.Context, request GetEntitlementValueHandlerRequest) (api.EntitlementValue, error) {\n cust, err := h.resolveCustomerFromSubject(ctx, request.Namespace, request.SubjectKey)\n if err != nil { return api.EntitlementValue{}, err }\n v, err := h.connector.GetEntitlementValue(ctx, request.Namespace, cust.ID, request.EntitlementIdOrFeatureKey, request.At)\n if err != nil { return api.EntitlementValue{}, err }\n return MapEntitlementValueToAPI(v)\n },\n commonhttp.JSONResponseEncoder[api.EntitlementValue],\n httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getEntitlementValue\"), httptransport.WithErrorEncoder(GetErrorEncoder()))...,\n )\n}" + } + ] + }, + "openmeter/entitlement/hooks": { + "purpose": "Structural folder owning entitlement lifecycle hooks that enforce cross-domain invariants on entitlement.Service operations. It has no direct source; its single child subscription/ guards subscription-owned entitlements against out-of-band mutation/deletion.", + "patterns": [ + { + "name": "ServiceHook over service-internal checks", + "description": "Invariants are enforced as entitlement ServiceHook implementations (embedding a Noop base) injected at wiring time rather than baked into entitlement.Service.", + "example": "subscription child embeds NoopServiceHook and overrides PreUpdate/PreDelete" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Encoding entitlement lifecycle invariants directly inside entitlement.Service instead of as a ServiceHook in this folder.", + "Returning the concrete hook type from a constructor instead of the exported hook interface alias." + ], + "decisions": [ + { + "decision": "Cross-cutting entitlement ownership/lifecycle guards live as hooks under this folder, separate from the core service.", + "rationale": "Keeps entitlement.Service focused on CRUD while subscription-ownership enforcement is opt-in via DI and detectable from context, not a DB flag." + } + ], + "code_examples": [] + }, + "openmeter/entitlement/validators": { + "purpose": "Structural folder holding validators that hook the entitlement domain into other domains' request lifecycles. It has no direct source; its child customer/ implements customer.RequestValidator to block deletion of customers that still have active entitlements.", + "patterns": [ + { + "name": "Cross-domain RequestValidator implementation", + "description": "Validators implement another domain's RequestValidator contract (e.g. customer.RequestValidator), embed that domain's Noop base, and depend on entitlement.EntitlementRepo (not the full Service) for read-only checks.", + "example": "customer child embeds customer.NoopRequestValidator and queries EntitlementRepo.ListEntitlements at clock.Now()" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Placing entitlement-aware validation logic in the customer domain instead of here, inverting the dependency direction.", + "Injecting entitlement.Service when only EntitlementRepo (list access) is required." + ], + "decisions": [ + { + "decision": "Validators that depend on entitlement state live in the entitlement domain and implement the consuming domain's validator interface.", + "rationale": "The entitlement domain may import customer, but not vice versa; placing the validator here keeps the dependency acyclic while still letting customer deletes reject when active entitlements exist." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w28.json b/.archie/enrichments/w28.json new file mode 100644 index 0000000000..f2481ad9c0 --- /dev/null +++ b/.archie/enrichments/w28.json @@ -0,0 +1,77 @@ +{ + "openmeter/ingest/kafkaingest": { + "purpose": "Kafka-publishing side of the ingest pipeline: turns validated CloudEvents into Kafka messages via Collector.Ingest, and provisions/deprovisions per-namespace topics via NamespaceHandler. It is the producer boundary between the ingest HTTP service and the sink-worker that drains Kafka into ClickHouse.", + "patterns": [ + { + "name": "Validating constructor with required-dependency guards", + "description": "NewCollector returns (*Collector, error) and rejects any nil dependency (producer, serializer, resolver, provisioner, logger, tracer) before constructing. New collectors must validate every injected field.", + "example": "if producer == nil { return nil, fmt.Errorf(\"producer is required\") }" + }, + { + "name": "Resolve-then-provision before produce", + "description": "Ingest always resolves namespace->topic via TopicResolver.Resolve, then TopicProvisioner.Provision (with TopicPartitions), and only then serializes and produces. Never produce to an unresolved/unprovisioned topic.", + "example": "topicName, _ := s.TopicResolver.Resolve(ctx, namespace); s.TopicProvisioner.Provision(ctx, pkgkafka.TopicConfig{Name: topicName, Partitions: s.TopicPartitions})" + }, + { + "name": "Key from Serializer, never hand-built", + "description": "The Kafka message Key comes from Serializer.SerializeKey and MUST match the dedupe hash; the partitioner is assumed consistent-hash. Hand-constructing keys breaks dedupe partition routing.", + "example": "key, _ := s.Serializer.SerializeKey(topicName, namespace, ev); msg := &kafka.Message{Key: key, Value: value}" + }, + { + "name": "Standard ingest headers", + "description": "Every produced message carries namespace (HeaderKeyNamespace), specversion, ingested_at (HeaderKeyIngestedAt via ToIngestedAt/clock.Now), and the serialized OTel span context (otelx.OTelSpanContextKey). New headers must use the exported constants and clock.Now().", + "example": "Headers: []kafka.Header{{Key: HeaderKeyNamespace, Value: []byte(namespace)}, {Key: HeaderKeyIngestedAt, Value: []byte(ToIngestedAt(clock.Now()))}}" + }, + { + "name": "Span-wrapped Ingest with deferred error recording", + "description": "Ingest opens a tracer span (openmeter.ingest.process.event), assigns errors to a named err captured in defer, and records/sets status on span exit. New produce paths follow this named-err + deferred span.End pattern.", + "example": "ctx, span := s.Tracer.Start(ctx, \"openmeter.ingest.process.event\", ...); defer func(){ if err != nil { span.RecordError(err); span.SetStatus(otelcodes.Error, err.Error()) }; span.End() }()" + }, + { + "name": "ingested_at RFC3339Nano UTC round-trip", + "description": "ingested_at is encoded with ToIngestedAt (UTC RFC3339Nano) and decoded with FromIngestedAt; these are the only sanctioned converters for that header.", + "example": "func ToIngestedAt(t time.Time) string { return t.UTC().Format(time.RFC3339Nano) }" + }, + { + "name": "NamespaceHandler gated DeleteNamespace", + "description": "NamespaceHandler implements CreateNamespace/DeleteNamespace; DeleteNamespace is a no-op unless DeletionEnabled, and both nil-check TopicResolver before use.", + "example": "func (h NamespaceHandler) DeleteNamespace(ctx, namespace) error { if !h.DeletionEnabled { return nil } ... }" + } + ], + "key_file_guides": [ + { + "file": "collector.go", + "role": "Collector struct + NewCollector + Ingest (produce one event) + Close (Flush 30s then Close) + KafkaProducerGroup (run.Group execute/interrupt that drains producer.Events for delivery reports, kafka.Stats metrics, and kafka.Error logging). Defines ingest headers and ToIngestedAt/FromIngestedAt.", + "watch_for": "Ingest takes Collector by value (func (s Collector)); don't add mutable state expecting it to persist. KafkaProducerGroup logs librdkafka 'local' errors (code <= -100) at warn and broker errors at error \u2014 preserve that split. Stats are unmarshalled in a goroutine with a 5s timeout context." + }, + { + "file": "namespace.go", + "role": "NamespaceHandler implementing the namespace handler interface (CreateNamespace provisions, DeleteNamespace deprovisions) so Kafka topics track namespace lifecycle.", + "watch_for": "DeleteNamespace silently returns nil when DeletionEnabled is false \u2014 a missing deprovision is intentional, not a bug. Both methods must guard TopicResolver != nil before resolving." + } + ], + "anti_patterns": [ + "Hand-building the Kafka message Key instead of using Serializer.SerializeKey \u2014 diverges from the dedupe hash and causes deduplication race conditions across partitions.", + "Producing before TopicResolver.Resolve and TopicProvisioner.Provision \u2014 risks publishing to a non-existent or wrong topic.", + "Bypassing ToIngestedAt/clock.Now() (e.g. time.Now() directly) for the ingested_at header \u2014 breaks test-time freezing and the RFC3339Nano contract.", + "Constructing a Collector without NewCollector (skipping nil-dependency validation).", + "Adding new headers without the exported HeaderKey* constants or omitting the OTel span context header \u2014 loses trace propagation into the sink." + ], + "decisions": [ + { + "decision": "Topic provisioning happens inline on every Ingest call rather than once at startup.", + "rationale": "Namespaces (and their topics) are created dynamically; provisioning per-ingest guarantees the topic exists for newly seen namespaces without a separate bootstrap step." + }, + { + "decision": "Delivery reports, client stats, and client errors are handled in a separate KafkaProducerGroup loop, not synchronously in Ingest.", + "rationale": "librdkafka produce is async; the application already configures internal retries, so Ingest returns on enqueue and the events loop reports terminal delivery outcome and emits Kafka client metrics." + } + ], + "code_examples": [ + { + "scenario": "Resolve namespace, provision topic, serialize, and produce a CloudEvent to Kafka", + "code": "func (s Collector) Ingest(ctx context.Context, namespace string, ev event.Event) error {\n\ttopicName, err := s.TopicResolver.Resolve(ctx, namespace)\n\tif err != nil { return fmt.Errorf(\"failed to resolve namespace to topic name: %w\", err) }\n\tif err = s.TopicProvisioner.Provision(ctx, pkgkafka.TopicConfig{Name: topicName, Partitions: s.TopicPartitions}); err != nil {\n\t\treturn fmt.Errorf(\"failed to provision topic: %w\", err)\n\t}\n\tkey, err := s.Serializer.SerializeKey(topicName, namespace, ev)\n\tif err != nil { return fmt.Errorf(\"serialize event key: %w\", err) }\n\tvalue, err := s.Serializer.SerializeValue(topicName, ev)\n\tif err != nil { return fmt.Errorf(\"serialize event value: %w\", err) }\n\tmsg := &kafka.Message{\n\t\tTopicPartition: kafka.TopicPartition{Topic: &topicName, Partition: kafka.PartitionAny},\n\t\tTimestamp: ev.Time(),\n\t\tHeaders: []kafka.Header{\n\t\t\t{Key: HeaderKeyNamespace, Value: []byte(namespace)},\n\t\t\t{Key: HeaderKeyIngestedAt, Value: []byte(ToIngestedAt(clock.Now()))},\n\t\t},\n\t\tKey: key, Value: value,\n\t}\n\treturn s.Producer.Produce(msg, nil)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w29.json b/.archie/enrichments/w29.json new file mode 100644 index 0000000000..f0867e0381 --- /dev/null +++ b/.archie/enrichments/w29.json @@ -0,0 +1,466 @@ +{ + "openmeter/ledger/account": { + "purpose": "Domain layer for ledger accounts and sub-accounts: defines the Account/SubAccount/Address value objects, account-type behaviors (FBO, Receivable, Accrued, business), the Repo and Service interfaces, and the posting-address model. The hard constraint is that all rich domain objects are constructed from plain *Data DTOs via NewAccountFromData / NewSubAccountFromData \u2014 never by hand.", + "patterns": [ + { + "name": "Data DTO to domain construction", + "description": "Every domain value is built from a flat *Data struct through a NewXFromData constructor that validates and resolves embedded sub-objects (e.g. routing key, address).", + "example": "NewAccountFromData(AccountData{...}, services) switches on AccountType to return newCustomerFBOAccount / newBusinessAccount etc." + }, + { + "name": "Account-type polymorphism via embedding", + "description": "Concrete account types embed *Account (and CustomerAccount embeds it transitively) and implement GetSubAccountForRoute with a type-specific RouteParams.", + "example": "type CustomerFBOAccount struct { *CustomerAccount }; var _ ledger.CustomerFBOAccount = (*CustomerFBOAccount)(nil)" + }, + { + "name": "Compile-time interface assertions", + "description": "Each type asserts the ledger interface it satisfies with a var _ ledger.X = (*T)(nil) line so interface drift fails at build time.", + "example": "var _ ledger.SubAccount = (*SubAccount)(nil)" + }, + { + "name": "Validate params before EnsureSubAccount", + "description": "GetSubAccountForRoute always calls params.Validate() before delegating to services.SubAccountService.EnsureSubAccount.", + "example": "if err := params.Validate(); err != nil { return nil, err }" + }, + { + "name": "SubAccount creation is find-or-create", + "description": "Sub-accounts are obtained through EnsureSubAccount(CreateSubAccountInput{Namespace, AccountID, Route}); the route is the idempotency key.", + "example": "a.services.SubAccountService.EnsureSubAccount(ctx, ledger.CreateSubAccountInput{Route: params.Route()})" + }, + { + "name": "Address carries the SubAccountRoute", + "description": "Address is the ledger.PostingAddress impl built from AddressData; its Equal() compares SubAccountID, AccountType, route ID, routing-key version and value.", + "example": "NewAddressFromData(AddressData{SubAccountID, AccountType, Route, RouteID, RoutingKey})" + } + ], + "key_file_guides": [ + { + "file": "account.go", + "role": "Account value object + NewAccountFromData factory that dispatches on AccountType to the concrete type.", + "watch_for": "Adding a new AccountType requires a new case here AND a concrete type file; the default branch only validates and returns the base Account." + }, + { + "file": "account_customer.go", + "role": "Customer FBO / Receivable / Accrued account types, each with its own RouteParams.", + "watch_for": "Accrued accounts route by currency (+tax/cost-basis) only, not credit priority \u2014 do not copy FBO routing into accrued." + }, + { + "file": "account_business.go", + "role": "BusinessAccount (Wash/Earnings/Brokerage/Breakage) GetSubAccountForRoute via BusinessRouteParams.", + "watch_for": "Business routes should carry only dimensions relevant to that account's accounting, not customer credit-priority." + }, + { + "file": "address.go", + "role": "Address (ledger.PostingAddress) built from AddressData; defines structural Equal().", + "watch_for": "SubAccountID, AccountType and RouteID are all required; missing fields error in newSubAccountRouteFromAddressData." + }, + { + "file": "subaccount.go", + "role": "SubAccount + NewSubAccountFromData, hydrates Address from RouteMeta (routing key version/value).", + "watch_for": "RouteMeta.RoutingKeyVersion/RoutingKey must round-trip through ledger.NewRoutingKey or construction fails." + }, + { + "file": "repo.go", + "role": "Repo interface (embeds entutils.TxCreator) for account/sub-account create/get/list and EnsureSubAccount.", + "watch_for": "Repo only persists *Data structs; it never returns domain Account/SubAccount values." + }, + { + "file": "service.go", + "role": "Service interface = ledger.AccountCatalog + ledger.AccountLocker, plus Input type aliases re-exported from ledger.", + "watch_for": "Input types are aliases of ledger.* \u2014 do not redeclare them." + } + ], + "anti_patterns": [ + "Constructing Account/SubAccount/Address structs directly instead of via NewAccountFromData / NewSubAccountFromData / NewAddressFromData.", + "Returning repo *Data structs from a service method instead of mapping to domain values.", + "Skipping params.Validate() before EnsureSubAccount in a GetSubAccountForRoute implementation.", + "Adding an AccountType without a switch case in NewAccountFromData and a concrete type implementing GetSubAccountForRoute.", + "Dropping a var _ ledger.X = (*T)(nil) assertion, letting interface drift go undetected." + ], + "decisions": [ + { + "decision": "Account behavior is split into concrete types embedding *Account rather than a single struct with a type switch.", + "rationale": "Each account type exposes a strongly-typed RouteParams (CustomerFBORouteParams vs BusinessRouteParams), so the type system enforces correct routing per account kind." + }, + { + "decision": "Domain objects are reconstructed from flat *Data DTOs.", + "rationale": "Keeps persistence (adapter) decoupled from rich domain construction and lets a single factory enforce validation and address resolution." + } + ], + "code_examples": [ + { + "scenario": "Account type resolving a routed sub-account", + "code": "func (a *CustomerFBOAccount) GetSubAccountForRoute(ctx context.Context, params ledger.CustomerFBORouteParams) (ledger.SubAccount, error) {\n\tif err := params.Validate(); err != nil {\n\t\treturn nil, err\n\t}\n\treturn a.services.SubAccountService.EnsureSubAccount(ctx, ledger.CreateSubAccountInput{\n\t\tNamespace: a.data.ID.Namespace,\n\t\tAccountID: a.data.ID.ID,\n\t\tRoute: params.Route(),\n\t})\n}" + } + ] + }, + "openmeter/ledger/breakage": { + "purpose": "Credit-expiration breakage sub-domain: keeps future credit-expiration ledger entries aligned with actual usage via plan/release/reopen records, and projects customer-visible expired-credit impacts. The ledger is the source of truth; breakage records are an allocation/index layer whose correctness rests on the invariant 'FBO consumption order == breakage release order' (credit_priority asc, expires_at asc, stable cursor asc).", + "patterns": [ + { + "name": "Service returns ledger inputs, caller commits", + "description": "PlanIssuance/ReleasePlan/ReopenRelease return []ledger.TransactionInput + PendingRecord rather than committing; the caller owns the surrounding ledger transaction group so credit and breakage movement stay atomic.", + "example": "func (s *service) PlanIssuance(...) ([]ledger.TransactionInput, []PendingRecord, error)" + }, + { + "name": "Validate-first on every input", + "description": "Each Input type has a Validate() that joins errors with errors.Join and uses ledger.Validate* helpers; service methods call input.Validate() before any work.", + "example": "if err := input.Validate(); err != nil { return nil, nil, err }" + }, + { + "name": "Pending then persisted records", + "description": "Operations emit PendingRecord; durable rows are written only after the ledger commits via PersistCommittedRecords(pending, group).", + "example": "planRecord := PendingRecord{Record: Record{ID: planID, Kind: ledger.BreakageKindPlan, ...}}" + }, + { + "name": "Config-validated constructor", + "description": "NewService(Config) validates Adapter + Dependencies (AccountService, AccountCatalog) before returning the service.", + "example": "if c.Adapter == nil { errs = append(errs, errors.New(\"adapter is required\")) }" + }, + { + "name": "Explicit noop implementation", + "description": "NoopService implements every Service method as a no-op for deployments/tests without expiration support; wiring picks it when breakage is disabled.", + "example": "func NewNoopService() Service { return NoopService{} }" + }, + { + "name": "Net impact by (expiresAt, currency)", + "description": "ListExpiredBreakageImpacts groups records, computes plans - releases + reopens, hides zero groups, rejects negative totals, and exposes -(net) as the customer-visible amount.", + "example": "impact = -(plans - releases + reopens); group.amount.Neg()" + } + ], + "key_file_guides": [ + { + "file": "README.md", + "role": "Authoritative spec of plan/release/reopen semantics, ledger notation (FBO/BR/ACCRUED), and the consumption==release ordering invariant.", + "watch_for": "Read this before changing any breakage math \u2014 the correctness argument depends on collection order matching release order." + }, + { + "file": "service.go", + "role": "Service interface, Config + NewService, all *Input types and their Validate() methods, and the concrete service.", + "watch_for": "ReleasePlanInput requires SourceKind in {Usage,UsageCorrection,CreditPurchaseCorrection,AdvanceBackfill}; ReopenReleaseInput only allows correction kinds." + }, + { + "file": "breakage_impacts.go", + "role": "ListExpiredBreakageImpacts: nets records into BreakageImpact items, applies cursor window, sorts by descending cursor.", + "watch_for": "A negative netted group amount is a hard error (releases exceeded plans); a group with no plan record (empty cursorID) is also an error." + }, + { + "file": "noop.go", + "role": "NoopService \u2014 disabled breakage that returns empty results for every method.", + "watch_for": "Keep it in lockstep with the Service interface; a new interface method needs a noop here or wiring breaks." + }, + { + "file": "types.go", + "role": "Declares Adapter interface, Record/PendingRecord/Plan/Release and BreakageImpact types (referenced by service.go and the adapter).", + "watch_for": "Record.ValidateForReference requires ID, CustomerID, Currency, ExpiresAt, and both FBO + breakage sub-account IDs." + } + ], + "anti_patterns": [ + "Committing ledger entries inside a breakage service method instead of returning TransactionInputs for the caller's group.", + "Diverging release/reopen ordering from FBO collection ordering (credit_priority asc, expires_at asc, stable cursor asc) \u2014 breaks the core invariant.", + "Persisting record rows before the corresponding ledger transactions commit instead of going through PersistCommittedRecords.", + "Putting metadata (kind, source links) into route dimensions, or putting collection-eligibility fields (credit_priority) into annotations.", + "Returning a negative or plan-less netted impact group instead of erroring \u2014 it signals corrupted accounting." + ], + "decisions": [ + { + "decision": "Breakage records are an index layer, not the accounting source of truth.", + "rationale": "The ledger holds the signed entries; records only let later flows find open plans, reopen releases, and project expired credit without grant-level lineage." + }, + { + "decision": "Plan/release/reopen rely on consumption-order == release-order instead of explicit grant lineage.", + "rationale": "Sharing one deterministic ordering lets a release reduce exactly the right expiry without tracking which grant the usage came from." + } + ], + "code_examples": [ + { + "scenario": "Netting expired breakage records into a customer-visible impact", + "code": "switch record.Kind {\ncase ledger.BreakageKindPlan, ledger.BreakageKindReopen:\n\tgroup.amount = group.amount.Add(record.Amount)\n\tif record.Kind == ledger.BreakageKindPlan && (group.cursorID.ID == \"\" || record.ID.ID < group.cursorID.ID) {\n\t\tgroup.cursorID = record.ID\n\t}\ncase ledger.BreakageKindRelease:\n\tgroup.amount = group.amount.Sub(record.Amount)\n}\n// item.Amount = group.amount.Neg()" + } + ] + }, + "openmeter/ledger/historical": { + "purpose": "The append-only double-entry ledger implementation: Ledger commits transaction groups (validate -> lock accounts -> create group -> book transactions) and answers balance/list queries. Domain Transaction/TransactionGroup/Entry/Balance values are always reconstructed from *Data DTOs, and the adapter is the only place that touches the ledger_transaction(_group)/ledger_entry tables.", + "patterns": [ + { + "name": "CommitGroup is validate-lock-write", + "description": "CommitGroup validates each TransactionInput, then inside transaction.Run locks all affected accounts preemptively, validates balances, creates the group, and books each transaction.", + "example": "transaction.Run(ctx, l.repo, func(ctx){...}) wrapping lockAccountsForTransactionInputs + repo.CreateTransactionGroup + repo.BookTransaction" + }, + { + "name": "Preemptive account locking", + "description": "lockAccountsForTransactionInputs collects all sub-account IDs across entries, resolves their parent accounts, and calls accountLocker.LockAccountsForPosting once \u2014 not per sub-transaction.", + "example": "return l.accountLocker.LockAccountsForPosting(ctx, affectedAccounts)" + }, + { + "name": "Data-DTO reconstruction", + "description": "Transaction/TransactionGroup/Entry are built only via NewTransactionFromData / NewTransactionGroupFromData / newEntryFromData; Entry rebuilds its PostingAddress from EntryData using account.NewAddressFromData.", + "example": "account.NewAddressFromData(account.AddressData{SubAccountID, AccountType, Route, RouteID, RoutingKey})" + }, + { + "name": "Interface satisfaction asserted", + "description": "Ledger asserts ledger.Ledger, ledger.BalanceQuerier; Balance asserts ledger.Balance; Transaction asserts ledger.Transaction etc.", + "example": "var _ ledger.BalanceQuerier = (*Ledger)(nil)" + }, + { + "name": "Balance via sumEntries", + "description": "GetAccountBalance builds a ledger.Query (Namespace + Filters{After, AsOf, AccountID, Route}) and delegates to repo.SumEntries; settled and pending currently both equal the same total.", + "example": "res, _ := l.sumEntries(ctx, ledger.Query{Namespace: account.ID().Namespace, Filters: ledger.Filters{AccountID: lo.ToPtr(account.ID().ID), Route: route}})" + }, + { + "name": "Cursor pagination on transactions", + "description": "ListTransactions delegates to repo with ListTransactionsInput and returns Items + NextCursor; the adapter does keyset pagination over (BookedAt, CreatedAt, ID).", + "example": "return ledger.ListTransactionsResult{Items: res.Items, NextCursor: res.NextCursor}, nil" + } + ], + "key_file_guides": [ + { + "file": "ledger.go", + "role": "Ledger struct + NewLedger; implements CommitGroup, ListTransactions, GetTransactionGroup and the locking helper.", + "watch_for": "validateAccountBalancesForTransaction is a TODO no-op; do not assume over-draw is rejected here yet. CommitGroup rejects empty groups with ledger.ErrTransactionGroupEmpty." + }, + { + "file": "transaction.go", + "role": "Transaction/TransactionGroup value objects and their NewXFromData factories; Cursor() exposes (BookedAt, CreatedAt, ID).", + "watch_for": "Entries()/Transactions() widen []*T to []ledger.X via lo.Map \u2014 keep slices of pointers internally." + }, + { + "file": "entry.go", + "role": "Entry value object; newEntryFromData rebuilds PostingAddress from route key version/value.", + "watch_for": "EntryData must carry RouteKeyVer + RouteKey or NewRoutingKey fails; this is hydrated by the adapter from joined route rows." + }, + { + "file": "balance.go", + "role": "Balance value + GetAccountBalance/GetSubAccountBalance; sub-account balance resolves its parent account then routes through GetAccountBalance.", + "watch_for": "Settled and Pending are currently identical (no settled/pending separation yet)." + }, + { + "file": "repo.go", + "role": "Repo interface (embeds entutils.TxCreator) for group create/get, BookTransaction, SumEntries, ListTransactions, plus parameter/DTO types.", + "watch_for": "BookTransaction takes the group's NamespacedID; CreateTransactionGroupInput carries Annotations while CreateTransactionInput does not." + } + ], + "anti_patterns": [ + "Bypassing transaction.Run / preemptive locking and writing transactions directly, reintroducing posting races.", + "Constructing Transaction/TransactionGroup/Entry by hand instead of via NewTransactionFromData / NewTransactionGroupFromData / newEntryFromData.", + "Assuming GetAccountBalance enforces non-negative balances \u2014 validateAccountBalancesForTransaction is still a TODO.", + "Reading raw ent rows in this package instead of going through the Repo's *Data DTOs.", + "Committing a transaction group without first validating every TransactionInput via ledger.ValidateTransactionInputWith(routingValidator)." + ], + "decisions": [ + { + "decision": "Accounts are locked preemptively for the whole group, not per sub-transaction.", + "rationale": "Multi-transaction groups must be atomic; locking every affected account up front avoids deadlocks and partial posting within the transaction.Run scope." + }, + { + "decision": "Domain aggregates are reconstructed from a separate *Data DTO layer.", + "rationale": "Decouples ent row shape from rich ledger value objects and centralizes routing-key/address hydration in the From*Data constructors." + } + ], + "code_examples": [ + { + "scenario": "Committing a validated transaction group atomically", + "code": "for idx, txInput := range txInputs {\n\tif err := ledger.ValidateTransactionInputWith(ctx, txInput, l.routingValidator); err != nil {\n\t\treturn nil, fmt.Errorf(\"validate tx %d: %w\", idx, err)\n\t}\n}\nreturn transaction.Run(ctx, l.repo, func(ctx context.Context) (*TransactionGroup, error) {\n\tif err := l.lockAccountsForTransactionInputs(ctx, group.Namespace(), txInputs); err != nil {\n\t\treturn nil, err\n\t}\n\ttxG, _ := l.repo.CreateTransactionGroup(ctx, CreateTransactionGroupInput{Namespace: group.Namespace(), Annotations: group.Annotations()})\n\ttxGroup := &TransactionGroup{data: txG}\n\tfor _, txInput := range txInputs {\n\t\ttx, _ := l.repo.BookTransaction(ctx, models.NamespacedID{Namespace: group.Namespace(), ID: txG.ID}, txInput)\n\t\ttxGroup.transactions = append(txGroup.transactions, tx)\n\t}\n\treturn txGroup, nil\n})" + } + ] + }, + "openmeter/ledger/resolvers": { + "purpose": "Provisioning + resolution layer that maps customers and namespaces to their concrete ledger accounts. AccountResolver creates/fetches the per-customer FBO/Receivable/Accrued accounts and shared per-namespace business accounts (Wash/Earnings/Brokerage/Breakage), backed by the ledger_customer_account linking table. Wiring is feature-gated behind credits.enabled.", + "patterns": [ + { + "name": "Provision-inside-transaction with advisory lock", + "description": "CreateCustomerAccounts/EnsureBusinessAccounts run inside transaction.Run and acquire a bounded lockr lock (provisioningLockTimeout = 5s) before creating missing accounts.", + "example": "transaction.Run(ctx, s.Repo, func(ctx){ s.lockCustomerProvisioning(ctx, customerID); ... })" + }, + { + "name": "Idempotent create-or-reuse", + "description": "Provisioning skips account types already present, and on a duplicate-mapping error uses AsCustomerAccountAlreadyExistsError to reuse the existing AccountID instead of failing.", + "example": "if existingErr, ok := AsCustomerAccountAlreadyExistsError(err); ok { accountIDs[accountType] = existingErr.AccountID; continue }" + }, + { + "name": "Typed account-type assertion on read", + "description": "Get* fetch each account, assert it to the expected ledger.*Account interface, and error with type detail on mismatch; missing types return ledger.ErrCustomerAccountMissing / ErrBusinessAccountMissing with attrs.", + "example": "fboAccount, ok := fboAcc.(ledger.CustomerFBOAccount); if !ok { return ..., fmt.Errorf(\"...expected %s\", ledger.AccountTypeCustomerFBO) }" + }, + { + "name": "Lifecycle hooks drive provisioning", + "description": "customerLedgerHook.PostCreate provisions customer accounts on customer creation; namespaceHandler.CreateNamespace ensures business accounts on namespace creation.", + "example": "func (h *customerLedgerHook) PostCreate(ctx, cust) error { _, err := h.config.Service.CreateCustomerAccounts(ctx, customer.CustomerID{...}); return err }" + }, + { + "name": "Nil-locker tolerance", + "description": "lockCustomerProvisioning/lockBusinessProvisioning return nil when s.Locker == nil, so the resolver works in single-process tests without a real lock.", + "example": "if s.Locker == nil { return nil }" + }, + { + "name": "Conflict error carries ValidationIssues", + "description": "CustomerAccountAlreadyExistsError implements ValidationErrors() returning ErrCustomerAccountConflict (HTTP 409) with namespace/customer/account-type attrs.", + "example": "ErrCustomerAccountConflict.WithAttrs(models.Attributes{\"customer_id\": e.CustomerID.ID, ...})" + } + ], + "key_file_guides": [ + { + "file": "account.go", + "role": "AccountResolver: CreateCustomerAccounts, GetCustomerAccounts, EnsureBusinessAccounts, GetBusinessAccounts, and the lockr provisioning helpers.", + "watch_for": "Provisioning locks are a TODO guardrail with a 5s timeout (lockr.ErrLockTimeout on DeadlineExceeded); do not assume they replace upsert convergence. CustomerAccountTypes/BusinessAccountTypes drive which accounts get created." + }, + { + "file": "customeraccount.go", + "role": "CustomerAccountRepo interface (linking table) + CreateCustomerAccountInput.", + "watch_for": "The repo only manages the customer->account-id mapping by AccountType; account creation itself goes through AccountService." + }, + { + "file": "errors.go", + "role": "CustomerAccountAlreadyExistsError + AsCustomerAccountAlreadyExistsError + ErrCustomerAccountConflict validation issue.", + "watch_for": "Idempotency depends on the adapter wrapping its constraint error as this typed error; matching is via errors.As." + }, + { + "file": "hooks.go", + "role": "CustomerLedgerHook (ServiceHook[customer.Customer]) provisioning accounts on PostCreate, with OTel span.", + "watch_for": "These hooks must stay disabled when credits.enabled is false (see AGENTS.md); the hook only wires the create path, not updates." + }, + { + "file": "namespace.go", + "role": "namespaceHandler implementing namespace.Handler; CreateNamespace ensures business accounts, DeleteNamespace is a no-op.", + "watch_for": "Must be registered before initNamespace if business accounts are needed at startup." + }, + { + "file": "account_test.go", + "role": "Concurrency tests proving CreateCustomerAccounts/EnsureBusinessAccounts are idempotent under 6 concurrent callers.", + "watch_for": "Tests assert exactly 3 mapping rows and 3 accounts; provisioning regressions surface as count mismatches." + } + ], + "anti_patterns": [ + "Failing on a duplicate-mapping error instead of reusing the existing AccountID via AsCustomerAccountAlreadyExistsError.", + "Provisioning accounts outside transaction.Run or without the provisioning lock, allowing duplicate accounts under concurrency.", + "Returning raw account values from Get* without asserting them to the expected ledger.*Account interface.", + "Wiring the customer ledger hook / namespace handler when credits.enabled is false.", + "Blocking indefinitely on the provisioning lock instead of honoring provisioningLockTimeout." + ], + "decisions": [ + { + "decision": "Provisioning is guarded by a bounded advisory lock plus idempotent create-or-reuse rather than a single upsert.", + "rationale": "Simultaneous multi-service startups must converge to one set of accounts; the lock fails fast (5s) and the duplicate-error reuse path keeps creation safe even if the lock is skipped." + }, + { + "decision": "Account creation is delegated to AccountService while this package owns only the customer->account linking table.", + "rationale": "Keeps the resolver focused on mapping/resolution and lets account construction (types, validation) live in the account service." + } + ], + "code_examples": [ + { + "scenario": "Idempotent per-customer account provisioning", + "code": "return transaction.Run(ctx, s.Repo, func(ctx context.Context) (ledger.CustomerAccounts, error) {\n\tif err := s.lockCustomerProvisioning(ctx, customerID); err != nil {\n\t\treturn ledger.CustomerAccounts{}, err\n\t}\n\taccountIDs, _ := s.Repo.GetCustomerAccountIDs(ctx, customerID)\n\tfor _, accountType := range ledger.CustomerAccountTypes {\n\t\tif _, ok := accountIDs[accountType]; ok { continue }\n\t\tacc, _ := s.AccountService.CreateAccount(ctx, ledgeraccount.CreateAccountInput{Namespace: customerID.Namespace, Type: accountType})\n\t\tif err := s.Repo.CreateCustomerAccount(ctx, CreateCustomerAccountInput{CustomerID: customerID, AccountType: accountType, AccountID: acc.ID().ID}); err != nil {\n\t\t\tif existingErr, ok := AsCustomerAccountAlreadyExistsError(err); ok { accountIDs[accountType] = existingErr.AccountID; continue }\n\t\t\treturn ledger.CustomerAccounts{}, err\n\t\t}\n\t}\n\treturn s.GetCustomerAccounts(ctx, customerID)\n})" + } + ] + }, + "openmeter/ledger/transactions": { + "purpose": "The transaction-template intent layer: declarative templates (one per business movement, e.g. IssueCustomerReceivable, TransferCustomerFBOToAccrued, PlanCustomerFBOBreakage) that resolve into ledger.TransactionInput by looking up the right sub-accounts, and reverse into correction transactions. This package never commits \u2014 it produces inputs that the historical ledger commits.", + "patterns": [ + { + "name": "Template interface trio", + "description": "Every template implements TransactionTemplate (typeGuard()/code()/Validate()) plus either CustomerTransactionTemplate or OrgTransactionTemplate (resolve + correct). The private typeGuard() guard prevents foreign types satisfying the interface.", + "example": "var _ CustomerTransactionTemplate = (TransferCustomerFBOToAccruedTemplate{})" + }, + { + "name": "resolve builds EntryInputs via routed sub-accounts", + "description": "resolve() fetches customer/business accounts from ResolverDependencies, calls GetSubAccountForRoute with a typed RouteParams, and returns a *TransactionInput of balanced *EntryInput pairs (neg/pos).", + "example": "fbo.Address(), amount: t.Amount.Neg() paired with accrued.Address(), amount: t.Amount" + }, + { + "name": "Validate-before-resolve in the dispatcher", + "description": "ResolveTransactions validates scope, then per template calls template.Validate(), type-switches Customer vs Org, validates the matching scope half, resolves, and annotates with template code + direction.", + "example": "switch typ := any(template).(type) { case CustomerTransactionTemplate: ... case OrgTransactionTemplate: ... default: ErrResolutionTemplateUnknown }" + }, + { + "name": "Code-based template registry", + "description": "Each template has a stable TransactionTemplateCode (codes.go) and is registered in transactionTemplatesByCode and transactionTemplatesByLegacyName so persisted annotations can be reversed into a template for correction.", + "example": "TemplateCodeTransferCustomerFBOToAccrued TransactionTemplateCode = \"customer.fbo.collect\"" + }, + { + "name": "Correction reverses persisted templates", + "description": "CorrectTransaction reads the template code/direction from the original transaction's annotations, rejects correcting a correction, then calls template.correct(scope) and re-annotates outputs as direction=correction.", + "example": "direction, _ := ledger.TransactionDirectionFromAnnotations(scope.OriginalTransaction.Annotations())" + }, + { + "name": "Private input implementations", + "description": "EntryInput/TransactionInput/TransactionGroupInput are unexported-field structs implementing the ledger.*Input interfaces; helpers GroupInputs/WithAnnotations/AsGroupInput compose them.", + "example": "var _ ledger.TransactionInput = (*TransactionInput)(nil)" + }, + { + "name": "Deterministic correction ordering", + "description": "Correction legs are allocated against original entries sorted by a stable key (collection source order, then FBO credit priority, then sub-account id, then identity key) so corrections unwind in reverse collection order.", + "example": "slices.SortStableFunc(negativeFBOEntries, compareFBOAccrualCorrectionSourceEntries)" + } + ], + "key_file_guides": [ + { + "file": "template.go", + "role": "TransactionTemplate / CustomerTransactionTemplate / OrgTransactionTemplate interfaces with the private guard.", + "watch_for": "typeGuard() must return a value of the unexported guard type \u2014 that is what stops external packages from implementing the interface." + }, + { + "file": "resolve.go", + "role": "ResolverDependencies, ResolutionScope (+ its Validate variants), and the ResolveTransactions dispatcher.", + "watch_for": "ResolutionScope validates namespace match; customer templates require CustomerID.Namespace+ID, org templates require Namespace. resolve() returning a nil TransactionInput is dropped (appendResolvedTemplateTransaction)." + }, + { + "file": "codes.go", + "role": "TransactionTemplateCode constants + by-code and by-legacy-name registries + annotateTemplateTransaction.", + "watch_for": "Adding a template means adding its code AND both registry entries; TemplateCode() panics on an empty code, so always set code()." + }, + { + "file": "correction.go", + "role": "CorrectionInput/CorrectionScope + CorrectTransaction: annotation-driven template lookup and reversal.", + "watch_for": "Reads template from new code annotation or legacy name annotation; correcting a correction is rejected; templates without correct support return templateCorrectionNotImplemented." + }, + { + "file": "input.go", + "role": "EntryInput/TransactionInput/TransactionGroupInput impls and GroupInputs/WithAnnotations/AsGroupInput helpers.", + "watch_for": "Fields are unexported; construct only within this package. WithAnnotations wraps in annotatedTransactionInput, merging maps (template annotations win)." + }, + { + "file": "accrual.go", + "role": "FBO->Accrued / Receivable->Accrued / advance->Accrued transfer templates and their cost-basis-preserving accrual + correction logic.", + "watch_for": "Accrual preserves source cost basis via routePairingKey(currency, costBasis); accrued sub-account gets tax dimensions, FBO sources do not carry tax." + }, + { + "file": "legacy.go", + "role": "Archived templates (legacyFund/legacySettle...) kept only to interpret old persisted annotations.", + "watch_for": "Their code() returns \"\" so they are by-legacy-name only; do not use them in new flows \u2014 use the current Authorize/Settle templates." + }, + { + "file": "priority.go", + "role": "resolveCustomerFBOCreditPriority falls back to ledger.DefaultCustomerFBOPriority.", + "watch_for": "A nil CreditPriority means default priority, not 'no priority' \u2014 this drives FBO collection order." + } + ], + "anti_patterns": [ + "Committing ledger transactions from inside a template \u2014 templates only resolve into TransactionInputs; the historical ledger commits.", + "Adding a template without registering its code in both transactionTemplatesByCode and (if it has a legacy name) transactionTemplatesByLegacyName.", + "Implementing a template interface from another package by faking typeGuard()/guard \u2014 the guard type is intentionally unexported.", + "Constructing EntryInput/TransactionInput from outside the package, bypassing the balanced neg/pos entry convention.", + "Importing transactions/testutils (Any*Input fixtures) from production code instead of using the real templates." + ], + "decisions": [ + { + "decision": "Business intent is expressed as one template per movement that returns inputs, separate from the ledger that commits them.", + "rationale": "Templates own routing/cost-basis/tax decisions and reversibility, while the historical ledger owns atomic posting and locking \u2014 keeping intent and persistence decoupled." + }, + { + "decision": "Templates are identified by a stable TransactionTemplateCode persisted in annotations, with a legacy-name fallback registry.", + "rationale": "Corrections must reconstruct the original template from a committed transaction; codes give a stable contract while legacy names keep old data correctable." + }, + { + "decision": "Correction allocates legs in a fixed deterministic order matching FBO collection order.", + "rationale": "Reversing in reverse-collection order keeps breakage/cost-basis attribution consistent without storing grant lineage." + } + ], + "code_examples": [ + { + "scenario": "A customer transaction template resolving into a balanced TransactionInput", + "code": "func (t TransferCustomerReceivableToAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error) {\n\tcustomerAccounts, err := resolvers.AccountService.GetCustomerAccounts(ctx, customerID)\n\tif err != nil { return nil, err }\n\treceivable, _ := customerAccounts.ReceivableAccount.GetSubAccountForRoute(ctx, ledger.CustomerReceivableRouteParams{Currency: t.Currency, CostBasis: t.CostBasis, TransactionAuthorizationStatus: ledger.TransactionAuthorizationStatusOpen})\n\taccrued, _ := customerAccounts.AccruedAccount.GetSubAccountForRoute(ctx, ledger.CustomerAccruedRouteParams{Currency: t.Currency, TaxCode: t.TaxCode, TaxBehavior: t.TaxBehavior, CostBasis: t.CostBasis})\n\treturn &TransactionInput{bookedAt: t.At, entryInputs: []*EntryInput{\n\t\t{address: receivable.Address(), amount: t.Amount.Neg()},\n\t\t{address: accrued.Address(), amount: t.Amount},\n\t}}, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w3.json b/.archie/enrichments/w3.json new file mode 100644 index 0000000000..9734cae6a1 --- /dev/null +++ b/.archie/enrichments/w3.json @@ -0,0 +1,52 @@ +{ + "pkg/framework": { + "purpose": "Structural namespace owning the codebase's foundational framework primitives: the transaction abstraction (transaction, entutils) every adapter builds on, the bottom-up HTTP operation/handler stack (operation, transport/httptransport, commonhttp), distributed locking (lockr), the Postgres driver (pgdriver), and observability wrappers (tracex, clickhouseotel). The constraint that binds all children: these are domain-agnostic foundations \u2014 nothing here may import openmeter/* domain packages.", + "patterns": [ + { + "name": "Bottom-up operation then handler (README)", + "description": "Business logic is an operation.Operation[Request,Response] func; transport is wired separately via DecodeRequest/EncodeResponse/EncodeError and httptransport.NewHandler. Children operation/, transport/httptransport/, and commonhttp/ each own one stage of this chain.", + "example": "httptransport.NewHandler(op, DecodeReq, EncodeResp, EncodeErr, WithErrorHandler(eh), WithOperationName(\"op\"))" + }, + { + "name": "Transaction foundation flows up from transaction -> entutils -> adapters", + "description": "transaction/ defines Driver + Run/RunWithNoValue and context-carried Driver reuse; entutils/ wraps it in TransactingRepo + TxDriver (savepoints, HijackTx). Domain adapters consume the entutils layer, never Ent's native client.Tx hooks.", + "example": "entutils.TransactingRepo(ctx, repo.db, func(ctx, tx) (T, error) { ... })" + }, + { + "name": "Domain-agnostic, dependency-magnet foundations", + "description": "These packages are imported by nearly the entire tree (entutils 74 in-edges, transaction 70, httptransport 47) but import only stdlib, third-party, and sibling pkg/* utilities \u2014 never openmeter/* domains.", + "example": "lockr, pgdriver, tracex, operation all consume only pkg/* and external libs" + }, + { + "name": "Constructor + Validate config across children", + "description": "Stateful primitives (lockr Locker/SessionLocker, pgdriver Driver, clickhouseotel tracer/metrics) are built via New* constructors that validate a Config struct and reject missing deps \u2014 never construct the concrete types directly.", + "example": "NewLocker(cfg) / NewPostgresDriver(opts...) / clickhouseotel.New(cfg)" + } + ], + "key_file_guides": [ + { + "file": "README.md", + "role": "Canonical recipe for adding an operation: define Request/Response + operation func, then Decode/Encode/EncodeError functions, then a NewXHandler constructor calling httptransport.NewHandler.", + "watch_for": "EncodeOperationError must return true only when it fully handled the error; returning false passes the error to the outer ErrorHandler." + } + ], + "anti_patterns": [ + "Importing any openmeter/* domain package from this tree \u2014 the framework layer must stay domain-agnostic so every domain can depend on it.", + "Bypassing the operation->handler split by putting business logic directly in an http.Handler instead of an operation.Operation wired through httptransport.NewHandler.", + "Reaching past entutils to Ent's native client.Tx / onCommit hooks for shared transactions \u2014 the savepoint-based entutils/transaction layer is the only sanctioned path.", + "Constructing lockr/pgdriver/clickhouseotel primitives directly instead of via their validating New* constructors, skipping dependency and Config validation.", + "Using context.WithTimeout to bound PG lock or query waits where the children expose Postgres-side lock_timeout (lockr, pgdriver) instead." + ], + "decisions": [ + { + "decision": "framework is a structural folder with only README.md at top level; all real code lives in single-purpose child packages.", + "rationale": "Keeps each foundational concern (transaction, transport, locking, driver, tracing) independently importable and prevents a god-package that every domain would import wholesale." + }, + { + "decision": "The transport stack is split into operation (logic), httptransport (decode/operate/encode), and commonhttp (shared encoders/error mapping) rather than one HTTP package.", + "rationale": "Lets business operations stay transport-free and reusable while RFC-7807/ValidationIssue mapping lives in one shared place." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w30.json b/.archie/enrichments/w30.json new file mode 100644 index 0000000000..8260a317bb --- /dev/null +++ b/.archie/enrichments/w30.json @@ -0,0 +1,101 @@ +{ + "openmeter/notification/eventhandler": { + "purpose": "Implements notification.EventHandler: the asynchronous dispatch + reconciliation loop that drives notification events to delivery via the webhook (Svix) provider. It owns the delivery-status state machine (PENDING/SENDING/RESENDING -> SUCCESS/FAILED) and a pglock-leader-elected periodic reconciler; the noop/ child supplies the disabled-mode implementation.", + "patterns": [ + { + "name": "Compile-time interface assertion", + "description": "Handler must satisfy notification.EventHandler, asserted at package scope so a drifting method set fails to compile.", + "example": "var _ notification.EventHandler = (*Handler)(nil)" + }, + { + "name": "Config + Validate + New constructor", + "description": "New(config Config) calls config.Validate() (collecting errs into models.NewNillableGenericValidationError) and defaults zero-value durations/worker counts from notification.Default* constants. Never construct Handler directly.", + "example": "if err := config.Validate(); err != nil { return nil, err }; if config.ReconcileInterval == 0 { config.ReconcileInterval = notification.DefaultReconcileInterval }" + }, + { + "name": "Fire-and-forget Dispatch with detached context", + "description": "Dispatch returns nil immediately and runs reconcileEvent in a goroutine under context.WithTimeout(context.Background(), DefaultDispatchTimeout) with a recover() guard. The caller's ctx is captured only as a trace link (trace.LinkFromContext), not propagated, so the async work survives the originating request.", + "example": "go func(){ defer recover...; ctx, cancel := context.WithTimeout(context.Background(), notification.DefaultDispatchTimeout); defer cancel(); tracex.StartWithNoValue(ctx, h.tracer, \"event_handler.dispatch\", trace.WithNewRoot(), trace.WithLinks(spanLink)).Wrap(fn) }()" + }, + { + "name": "Leader-elected reconcile loop", + "description": "Start() loops while running.Load(), acquiring reconcilerLeaderLockKey via lockClient.Do; on pglock.ErrNotAcquired it just continues (another node is leader). A ticker fires Reconcile every reconcileInterval. Close() flips the atomic and closes stopCh via sync.OnceFunc.", + "example": "h.lockClient.Do(ctx, reconcilerLeaderLockKey, func(rCtx, _){ ticker := time.NewTicker(h.reconcileInterval); for { select { case <-ticker.C: h.Reconcile(rCtx) } } })" + }, + { + "name": "Bounded worker-pool pagination in Reconcile", + "description": "Reconcile pages repo.ListEvents (PageSize 50) filtering for PENDING/SENDING/RESENDING with NextAttemptBefore = now - nextAttemptDelay (10s jitter), and processes each event through a semaphore.Weighted(workerPoolSize) + wg.Go worker with per-worker recover().", + "example": "workerPool := semaphore.NewWeighted(h.workerPoolSize); workerPool.Acquire(ctx, 1); wg.Go(func(){ defer workerPool.Release(1); defer recover...; h.reconcileEvent(ctx, &event) })" + }, + { + "name": "Delivery-status state machine via UpdateEventDeliveryStatusInput", + "description": "reconcileWebhookEvent computes a single *notification.UpdateEventDeliveryStatusInput per active status in a switch on status.State, then persists via repo.UpdateEventDeliveryStatus only when input != nil. Active statuses are first filtered (filterActiveDeliveryStatusesByChannelType) and priority-sorted (sortDeliveryStatusStateByPriority); SUCCESS/FAILED are terminal and skipped.", + "example": "switch status.State { case EventDeliveryStatusStatePending: input = ¬ification.UpdateEventDeliveryStatusInput{...} }; if input != nil { h.repo.UpdateEventDeliveryStatus(ctx, *input) }" + }, + { + "name": "Typed webhook error classification", + "description": "Provider errors are classified with webhook.IsNotFoundError / IsMessageAlreadyExistsError / IsUnrecoverableError / IsValidationError and lo.ErrorsAs[webhook.RetryableError] to choose retry vs terminal-fail, recording the decision via package Err* sentinels (ErrSystemRecoverableError, ErrSystemUnrecoverableError, ErrUserSendAttemptsExhausted, etc.) as the status Reason.", + "example": "rErr, ok := lo.ErrorsAs[webhook.RetryableError](err); if ok { retryAfter = rErr.RetryAfter() }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler struct, Config/Validate, New constructor, Start/Close leader-loop lifecycle.", + "watch_for": "running is atomic.Bool; Start() refuses to run twice (CompareAndSwap). Close uses stopChClose (sync.OnceFunc) so closing twice is safe. LockClient (*pglock.Client) is required by Validate." + }, + { + "file": "dispatch.go", + "role": "Dispatch: async entry point invoked on event creation; spawns reconcileEvent in a detached goroutine.", + "watch_for": "Always returns nil even though work may fail later (logged only). Uses context.Background()+timeout intentionally; do not 'fix' this to propagate the request ctx or the dispatch dies when the HTTP request ends." + }, + { + "file": "reconcile.go", + "role": "Reconcile (periodic batch) and reconcileEvent (per-event channel fan-out by ChannelType).", + "watch_for": "nextAttemptDelay (10s) jitter is deliberate so downstream provider state settles before re-reconcile. Only ChannelTypeWebhook is handled; other types just log an error. Each worker has its own recover()." + }, + { + "file": "webhook.go", + "role": "reconcileWebhookEvent state machine plus getWebhookMessage/sendWebhookMessage/resendWebhookMessage helpers and eventAsPayload serializer.", + "watch_for": "Largest file (~600 lines). The per-state switch must always end up with input==nil (skip) or a fully-populated UpdateEventDeliveryStatusInput. pendingTimeout/sendingTimeout govern give-up. eventAsPayload must add a case for every new notification.EventType (delegates to httpdriver.FromEventAs*Payload) or it returns 'unknown event type'." + }, + { + "file": "deliverystatus.go", + "role": "Pure helpers: filterActiveDeliveryStatusesByChannelType and sortDeliveryStatusStateByPriority.", + "watch_for": "Filtering drops SUCCESS/FAILED and any status whose ChannelID isn't a webhook channel on event.Rule.Channels. Priority map ties FAILED and SUCCESS at 3; changing it reorders reconcile processing." + }, + { + "file": "noop/handler.go", + "role": "No-op notification.EventHandler for disabled/unwired mode.", + "watch_for": "Must stay side-effect free and never return a non-nil error; mirrors the real constructor signature only so DI can swap it in." + } + ], + "anti_patterns": [ + "Propagating the caller's request context into Dispatch's goroutine instead of the detached context.Background()+timeout - the async delivery would be cancelled when the originating request finishes.", + "Leaving a switch branch in reconcileWebhookEvent that neither sets input nor falls into the terminal SUCCESS/FAILED/no-op path - appends an 'unhandled reconciling state' error and silently stalls the delivery.", + "Adding a new notification.EventType without a matching case in eventAsPayload (webhook.go) - sending fails with 'unknown event type' at delivery time.", + "Constructing Handler directly or skipping config.Validate() - bypasses required-dependency checks (Repository, Webhook, Logger, Tracer, LockClient) and duration/worker defaulting.", + "Spawning goroutines (Dispatch, Reconcile workers) without a recover() guard - a single panic would crash the worker process; every async block here defers recover() + debug.Stack() logging." + ], + "decisions": [ + { + "decision": "Reconciliation is gated behind a single pglock leader lock (reconcilerLeaderLockKey) with ErrNotAcquired treated as a benign skip.", + "rationale": "Multiple notification-service replicas can run, but only one should drive the periodic delivery-status reconcile to avoid duplicate provider calls." + }, + { + "decision": "Dispatch is fire-and-forget and reconciliation re-derives state from the webhook provider rather than trusting the in-flight send.", + "rationale": "Svix delivery is asynchronous; the reconcile loop polls provider message/delivery state with jitter (nextAttemptDelay) so transient/late provider updates eventually converge the local delivery status." + }, + { + "decision": "All async work is wrapped in tracex.Start/StartWithNoValue spans with explicit span attributes and AddEvent calls.", + "rationale": "The pipeline is detached from the request, so trace links + span events are the primary observability for why a delivery succeeded, retried, or failed." + } + ], + "code_examples": [ + { + "scenario": "Per-event reconcile fans out by channel type, then the webhook handler drives the delivery-status state machine.", + "code": "func (h *Handler) reconcileEvent(ctx context.Context, event *notification.Event) error {\n\tfn := func(ctx context.Context) error {\n\t\tchannelTypes := lo.UniqMap(event.Rule.Channels, func(c notification.Channel, _ int) notification.ChannelType { return c.Type })\n\t\tvar errs []error\n\t\tfor _, channelType := range channelTypes {\n\t\t\tswitch channelType {\n\t\t\tcase notification.ChannelTypeWebhook:\n\t\t\t\tif err := h.reconcileWebhookEvent(ctx, event); err != nil {\n\t\t\t\t\terrs = append(errs, err)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\th.logger.ErrorContext(ctx, \"unsupported channel type\", \"type\", channelType)\n\t\t\t}\n\t\t}\n\t\treturn errors.Join(errs...)\n\t}\n\treturn tracex.StartWithNoValue(ctx, h.tracer, \"event_handler.reconcile_event\").Wrap(fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w31.json b/.archie/enrichments/w31.json new file mode 100644 index 0000000000..83efa1255a --- /dev/null +++ b/.archie/enrichments/w31.json @@ -0,0 +1,195 @@ +{ + "api/v3/handlers/meters/query": { + "purpose": "Pure-function helper package that translates a v3 `api.MeterQueryRequest` body into a `streaming.QueryParams` for meter querying: window-size/timezone/groupBy/dimension-filter parsing, customer-ID resolution, and ISO-8601 duration conversion. No HTTP handler lives here \u2014 it is the request-mapping layer consumed by the meters (and featurecost) handlers.", + "patterns": [ + { + "name": "Single orchestrating entrypoint BuildQueryParams", + "description": "All request mapping flows through `BuildQueryParams(ctx, meter.Meter, api.MeterQueryRequest, CustomerResolverFunc) (streaming.QueryParams, error)`. Each request field (Granularity, TimeZone, GroupByDimensions, Filters.Dimensions) is conditionally parsed only when non-nil; sub-converters are pure helpers it calls.", + "example": "if body.Granularity != nil { ws, err := ConvertISO8601DurationToWindowSize(string(*body.Granularity)); ... params.WindowSize = &ws }" + }, + { + "name": "Reserved dimensions are special-cased", + "description": "`DimensionSubject` (\"subject\") and `DimensionCustomerID` (\"customer_id\") are constants; `IsReservedDimension` / `IsSupportedGroupByDimension` gate them. In the filter switch they map to `params.FilterSubject` / `params.FilterCustomer`; everything else must exist in `m.GroupBy` and becomes a `params.FilterGroupBy` entry.", + "example": "switch k { case DimensionSubject: ...; case DimensionCustomerID: ...; default: if _, ok := m.GroupBy[k]; !ok { return params, NewInvalidDimensionFilterError(k) } }" + }, + { + "name": "Filtered dimensions auto-added to GroupBy (deduped)", + "description": "When a subject or customer_id filter has values, the dimension is appended to `params.GroupBy` but only via `slices.Contains` guard to avoid duplicates.", + "example": "if len(subjects) > 0 && !slices.Contains(params.GroupBy, DimensionSubject) { params.GroupBy = append(params.GroupBy, DimensionSubject) }" + }, + { + "name": "Restricted filter operators on reserved dims", + "description": "`ExtractStringsFromQueryFilter` / `ExtractStringsFromQueryFilterMapItem` accept ONLY `Eq` and `In`; any of Neq/Nin/Contains/Ncontains/And/Or (and Exists for the MapItem variant), or Eq+In together, returns `NewUnsupportedFilterOperatorError`. Non-reserved dims instead go through `request.ConvertQueryFilterStringMapItem` + `ValidateWithComplexity(maxGroupByFilterComplexityDepth)` (depth 2).", + "example": "if f.Neq != nil || f.Nin != nil || ... { return nil, NewUnsupportedFilterOperatorError(fieldPath...) }" + }, + { + "name": "Errors are models.ValidationIssue with HTTP status + field path", + "description": "Every error is a package-level `models.NewValidationIssue(ErrCode..., msg, models.WithFieldString(...), models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(...))` plus a `New...Error(...)` constructor that calls `.WithAttr` or `.WithPathString`. Never return bare `fmt.Errorf` for user-facing validation (the lone exception is `ConvertWindowSizeToISO8601Duration`'s internal unknown-WindowSize case).", + "example": "var ErrInvalidWindowSize = models.NewValidationIssue(ErrCodeInvalidWindowSize, \"...\", models.WithFieldString(\"granularity\"), models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))" + }, + { + "name": "CustomerResolverFunc injected, not imported service", + "description": "Customer lookup is a `CustomerResolverFunc` typedef passed into `BuildQueryParams`; `NewCustomerResolver(customer.Service)` builds the production one (lists with `IncludeDeleted: true`, KeyBy ID, joins `NewCustomerNotFoundError` for missing IDs). Tests pass a `noopCustomerResolver` instead of a real service.", + "example": "func NewCustomerResolver(customerService customer.Service) CustomerResolverFunc { return func(ctx, ns, ids) ... }" + } + ], + "key_file_guides": [ + { + "file": "params.go", + "role": "Core `BuildQueryParams` orchestration + `maxGroupByFilterComplexityDepth = 2` constant.", + "watch_for": "Field-by-field nil checks are load-bearing; subject/customer filters mutate GroupBy as a side effect, so adding new dimension kinds means updating both the switch and the dedup-append logic." + }, + { + "file": "convert.go", + "role": "ISO-8601<->WindowSize maps and the `ExtractStrings...` eq/in-only extractors.", + "watch_for": "The two extractor variants differ ONLY in that the MapItem version also rejects `Exists`; keep them in sync when adding operators." + }, + { + "file": "dimensions.go", + "role": "Reserved-dimension constants and `IsReserved`/`IsSupportedGroupByDimension` predicates.", + "watch_for": "`IsSupportedGroupByDimension` returns true for reserved dims OR keys present in `m.GroupBy`; a new reserved dimension must be added to both the const set and `IsReservedDimension`." + }, + { + "file": "customers.go", + "role": "`CustomerResolverFunc` type, `NewCustomerResolver`, and `CustomersToStreaming` (identity map since `customer.Customer` satisfies `streaming.Customer`).", + "watch_for": "Resolver lists with `IncludeDeleted: true` and returns a joined error per missing ID \u2014 do not silently drop unresolved customers." + }, + { + "file": "errors.go", + "role": "All `ErrCode*` constants, `ValidationIssue` vars, and `New*Error` constructors with field paths / HTTP statuses.", + "watch_for": "Customer-not-found is 404, all others are 400; new errors must follow the same ValidationIssue + constructor pairing." + } + ], + "anti_patterns": [ + "Returning plain `fmt.Errorf`/`errors.New` for request-validation failures instead of the package's `models.ValidationIssue`-backed `New*Error` constructors (loses HTTP status and field path).", + "Accepting filter operators beyond eq/in on reserved (subject, customer_id) dimensions by bypassing `ExtractStringsFromQueryFilter(MapItem)`.", + "Calling a customer service directly inside `BuildQueryParams` instead of going through the injected `CustomerResolverFunc`.", + "Appending a dimension to `params.GroupBy` without the `slices.Contains` dedup guard.", + "Treating an arbitrary dimension as valid without checking membership in `m.GroupBy` (must error via `NewInvalidDimensionFilterError`)." + ], + "decisions": [ + { + "decision": "Mapping logic lives in its own `query` sub-package separate from the meters HTTP handler.", + "rationale": "It is pure and table-testable (convert_test/params_test cover it without HTTP), and is reused by `api/v3/handlers/featurecost`." + }, + { + "decision": "Customer resolution is abstracted behind `CustomerResolverFunc` rather than importing `customer.Service`.", + "rationale": "Keeps `BuildQueryParams` unit-testable with a noop resolver and decouples param-building from service wiring." + }, + { + "decision": "Reserved dimensions and non-reserved meter groupBy dimensions take different validation paths (eq/in extractor vs. full FilterString with complexity limit).", + "rationale": "Subject/customer map to dedicated streaming filter fields, while groupBy dimensions support richer filter expressions bounded by `maxGroupByFilterComplexityDepth`." + } + ], + "code_examples": [ + { + "scenario": "Adding a new user-facing validation error", + "code": "const ErrCodeInvalidGroupBy models.ErrorCode = \"invalid_group_by\"\n\nvar ErrInvalidGroupBy = models.NewValidationIssue(\n\tErrCodeInvalidGroupBy,\n\t\"invalid group by dimension\",\n\tmodels.WithFieldString(\"group_by_dimensions\"),\n\tmodels.WithCriticalSeverity(),\n\tcommonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest),\n)\n\nfunc NewInvalidGroupByError(dimension string) error {\n\treturn ErrInvalidGroupBy.WithAttr(\"value\", dimension)\n}" + } + ] + }, + "openmeter/notification/webhook/svix": { + "purpose": "Svix-backed implementation of the notification webhook.Handler interface. Translates the domain's webhook operations (applications, endpoints, event types, messages, delivery status) into Svix SDK calls, with OTel tracing and idempotency on every mutating call.", + "patterns": [ + { + "name": "Handler methods wrap a closure in tracex", + "description": "Every webhook.Handler method on svixHandler defines an inner `fn := func(ctx) (...) {...}` and returns `tracex.Start[T](ctx, h.tracer, \"svix.\").Wrap(fn)` (or `tracex.StartWithNoValue` for error-only). Span names are `svix.`.", + "example": "return tracex.Start[*webhook.Webhook](ctx, h.tracer, \"svix.create_webhook\").Wrap(fn)" + }, + { + "name": "All Svix errors funnel through internal.WrapSvixError", + "description": "Immediately after any `h.client.*` call, reassign `if err = internal.WrapSvixError(err); err != nil`. Never return a raw *svix.Error \u2014 it must become a webhook-domain error first. `Error` is aliased as `internal.SvixError`.", + "example": "endpoint, err := h.client.Endpoint.Create(ctx, app.Id, input, opts)\nif err = internal.WrapSvixError(err); err != nil { return nil, fmt.Errorf(\"failed to create Svix endpoint: %w\", err) }" + }, + { + "name": "Idempotency key per mutating Svix call", + "description": "Create/Update/Resend/RotateSecret pass an IdempotencyKey from `idempotency.Key()` in the Svix *Options struct. Generate it, error-check, then expose it as the span attribute \"idempotency_key\".", + "example": "idempotencyKey, err := idempotency.Key()\n... h.client.Application.GetOrCreate(ctx, input, &svix.ApplicationCreateOptions{IdempotencyKey: &idempotencyKey})" + }, + { + "name": "Namespace IS the Svix application UID", + "description": "The notification namespace is used directly as the Svix application Name/Uid (CreateApplication) and passed as the appID arg to Message/Endpoint calls. Webhook objects get `wh.Namespace = params.Namespace` set after mapping.", + "example": "input := svix.ApplicationIn{Name: id, Uid: &id}" + }, + { + "name": "Validate inputs first", + "description": "Public methods taking a webhook.*Input call `params.Validate()` and wrap failures with fmt.Errorf before any Svix call.", + "example": "if err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid send message params: %w\", err) }" + }, + { + "name": "NullChannel guards against unfiltered fan-out", + "description": "When creating/updating an endpoint with no Channels (and no EventTypes), set Channels to []string{NullChannel} so a filterless Svix endpoint does not receive every message. Strip NullChannel back out in WebhookFromSvixEndpointOut.", + "example": "if len(params.Channels) == 0 { params.Channels = []string{NullChannel} }" + }, + { + "name": "Paginate Svix lists via Iterator/Done loop", + "description": "List operations (ListWebhooks, getDeliveryStatus) loop with Limit + Iterator, breaking on `out.Done`, sleeping `time.Sleep(100 * time.Millisecond)` between pages to avoid Svix rate limits.", + "example": "if !out.Done { opts.Iterator = out.Iterator; time.Sleep(100*time.Millisecond); continue }" + } + ], + "key_file_guides": [ + { + "file": "svix.go", + "role": "Config types (SvixConfig with Validate/IsEnabled, Config with SvixAPIClient/Logger/Tracer), constructors New + NewHandler, the svixHandler struct, NullChannel const, and `type Error = internal.SvixError` alias. `var _ webhook.Handler = (*svixHandler)(nil)` enforces the interface.", + "watch_for": "New() optionally registers event types on startup (RegisterEventTypes) honoring SkipRegistrationOnError, using context.Background() with RegistrationTimeout. Config.Validate requires non-nil client, logger, tracer." + }, + { + "file": "webhook.go", + "role": "Endpoint CRUD (Create/Update/Delete/Get/List Webhook), UpdateWebhookChannels, header/secret helpers (GetOrUpdateEndpointHeaders, GetOrUpdateEndpointSecret), and the WebhookFromSvixEndpointOut mapper.", + "watch_for": "CreateWebhook auto-ensures the Svix application, auto-generates a signing secret via webhooksecret.NewSigningSecretWithDefaultSize() and a ULID UID when absent. UpdateWebhookChannels re-reads, merges add/remove, enforces webhook.MaxChannelsPerWebhook. DeleteWebhook swallows webhook.IsNotFoundError as success." + }, + { + "file": "message.go", + "role": "SendMessage, GetMessage, ResendMessage, getDeliveryStatus, and deliveryStateFromSvixMessageStatus mapper. Bridges Svix message attempts to notification.EventDeliveryAttempt / webhook.MessageDeliveryStatus.", + "watch_for": "SendMessage maps http.StatusConflict to webhook.NewMessageAlreadyExistsError (EventID already published). getDeliveryStatus treats Svix FAIL with a non-nil NextAttempt as EventDeliveryStatusStateSending (transient). SendMessage sets WithContent:false so payload comes from the request, not Svix." + }, + { + "file": "application.go", + "role": "CreateApplication \u2014 GetOrCreate a Svix application keyed by namespace/id, used implicitly by webhook create/update flows.", + "watch_for": "Uses GetOrCreate (idempotent), not Create; both Name and Uid are set to the namespace id." + }, + { + "file": "event.go", + "role": "RegisterEventTypes \u2014 upserts Svix EventType schemas per webhook.EventType (loops, calls EventType.Update).", + "watch_for": "Uses Update (upsert) per event type; failure aborts the loop. Called from New() at handler init." + }, + { + "file": "annotations.go", + "role": "String constants for OTel span attribute keys (svix.message.id, svix.application.uid, svix.endpoint.url, etc.) used across all handler files.", + "watch_for": "Add new annotation keys here, not as inline string literals, to keep span attributes consistent." + }, + { + "file": "internal/error.go", + "role": "WrapSvixError / SvixError taxonomy \u2014 sole boundary decoding *svix.Error HTTP failures into webhook recoverable/retryable/validation/not-found errors.", + "watch_for": "Internal package \u2014 only importable from within svix/. All status-class decisions live here, not at call sites." + } + ], + "anti_patterns": [ + "Returning a raw *svix.Error / unwrapped err from a handler method instead of passing it through internal.WrapSvixError first.", + "Calling a Svix mutating endpoint (Create/Update/Resend/RotateSecret) without an idempotency.Key() in the *Options struct.", + "Skipping the tracex.Start/StartWithNoValue wrapper on a new handler method, losing the span and consistent error handling.", + "Creating or updating an endpoint with empty Channels and EventTypes without falling back to NullChannel \u2014 produces an endpoint that receives all messages.", + "Hardcoding span attribute key strings inline instead of using the Annotation* constants in annotations.go." + ], + "decisions": [ + { + "decision": "Use the notification namespace directly as the Svix application UID rather than a separate mapping table.", + "rationale": "Svix applications are 1:1 with OpenMeter namespaces, so the namespace is a natural idempotent key and avoids extra persistence." + }, + { + "decision": "Centralize Svix error classification in internal.WrapSvixError and re-export only `type Error = internal.SvixError`.", + "rationale": "Keeps retryable-vs-fatal decisions in one auditable place; delivery/consumer layers reason in webhook-domain errors, never Svix SDK shapes." + }, + { + "decision": "Treat a Svix FAIL status with a pending NextAttempt as still-sending.", + "rationale": "Svix reports FAIL during transient retries; mapping it to EventDeliveryStatusStateSending avoids surfacing premature failures to the notification domain." + } + ], + "code_examples": [ + { + "scenario": "Adding a new svixHandler method: validate, call Svix, wrap errors, trace.", + "code": "func (h svixHandler) DeleteWebhook(ctx context.Context, params webhook.DeleteWebhookInput) error {\n\tfn := func(ctx context.Context) error {\n\t\tif err := params.Validate(); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to validate DeleteWebhookInputs: %w\", err)\n\t\t}\n\t\terr := h.client.Endpoint.Delete(ctx, params.Namespace, params.ID)\n\t\tif err = internal.WrapSvixError(err); err != nil {\n\t\t\tif webhook.IsNotFoundError(err) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"failed to delete Svix endpoint: %w\", err)\n\t\t}\n\t\treturn nil\n\t}\n\treturn tracex.StartWithNoValue(ctx, h.tracer, \"svix.delete_webhook\").Wrap(fn)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w32.json b/.archie/enrichments/w32.json new file mode 100644 index 0000000000..246e1c3101 --- /dev/null +++ b/.archie/enrichments/w32.json @@ -0,0 +1,352 @@ +{ + "openmeter/productcatalog/addon": { + "purpose": "Root domain package for product-catalog add-ons: defines the Addon/RateCard/Plan value types, the Repository and Service interfaces, lifecycle events, validators, and not-found errors. Holds no DB or HTTP code itself \u2014 those live in adapter/, httpdriver/, and service/ children.", + "patterns": [ + { + "name": "Validate() collects errors then wraps", + "description": "Every domain type's Validate() appends into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on first failure.", + "example": "func (a Addon) Validate() error { var errs []error; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Embedded productcatalog meta + AsProductCatalog converter", + "description": "Domain Addon embeds productcatalog.AddonMeta and exposes AsProductCatalogAddon() to drop managed fields when delegating to shared productcatalog validation/logic.", + "example": "func (a Addon) AsProductCatalogAddon() productcatalog.Addon { return productcatalog.Addon{AddonMeta: a.AddonMeta, RateCards: a.RateCards.AsProductCatalogRateCards()} }" + }, + { + "name": "Managed RateCard wraps productcatalog.RateCard with custom JSON", + "description": "RateCard embeds productcatalog.RateCard + RateCardManagedFields and implements MarshalJSON/UnmarshalJSON via productcatalog.RateCardSerde, switching on Type (FlatFeeRateCardType/UsageBasedRateCardType) to pick the concrete struct.", + "example": "switch s.Type { case productcatalog.FlatFeeRateCardType: serde.RateCard = &productcatalog.FlatFeeRateCard{} ... }" + }, + { + "name": "Repository embeds entutils.TxCreator", + "description": "Repository interface embeds entutils.TxCreator so the service can drive transactions; Service mirrors Repository methods plus lifecycle ops (PublishAddon/ArchiveAddon/NextAddon).", + "example": "type Repository interface { entutils.TxCreator; ListAddons(...); CreateAddon(...); ... }" + }, + { + "name": "Input structs own their Validate + IgnoreNonCriticalIssues", + "description": "Create/Update inputs embed inputOptions and filter validation issues via issues.WithSeverityOrHigher(models.ErrorSeverityCritical) when IgnoreNonCriticalIssues is set.", + "example": "if i.IgnoreNonCriticalIssues { issues = issues.WithSeverityOrHigher(models.ErrorSeverityCritical) }" + }, + { + "name": "Typed NotFoundError over GenericNotFoundError", + "description": "NewNotFoundError builds a *NotFoundError wrapping models.NewGenericNotFoundError; IsNotFound(err) uses errors.As. Lifecycle validators (IsAddonDeleted, HasAddonStatus) are models.ValidatorFunc[Addon].", + "example": "func IsNotFound(err error) bool { var e *NotFoundError; return errors.As(err, &e) }" + }, + { + "name": "Events carry UserID from session + ComposeResourcePath", + "description": "Each lifecycle event (create/update/delete/publish/archive) pulls session.GetSessionUserID(ctx) and builds Source/Subject via metadata.ComposeResourcePath(ns, metadata.EntityAddon, id).", + "example": "resourcePath := metadata.ComposeResourcePath(e.Addon.Namespace, metadata.EntityAddon, e.Addon.ID)" + } + ], + "key_file_guides": [ + { + "file": "addon.go", + "role": "Addon domain type, Validate, AsProductCatalogAddon", + "watch_for": "RateCards must validate per-element; Plans is only populated when expanded" + }, + { + "file": "ratecard.go", + "role": "Managed RateCard, RateCards slice, custom JSON marshalling", + "watch_for": "UnmarshalJSON must dispatch on RateCardSerde.Type or it errors with 'invalid RateCard type'" + }, + { + "file": "repository.go", + "role": "Repository interface (persistence contract)", + "watch_for": "Must embed entutils.TxCreator; do not add business ops here (those go on Service)" + }, + { + "file": "service.go", + "role": "Service interface + all Input structs and their Validate", + "watch_for": "Publish/Archive inputs validate EffectiveFrom/To against clock.Now() with a 30s timeJitter" + }, + { + "file": "event.go", + "role": "AddonCreate/Update/Delete/Publish/Archive events", + "watch_for": "Delete event requires DeletedAt set; all events emit metadata.EventType{Version:\"v1\"}" + }, + { + "file": "validators.go", + "role": "IsAddonDeleted / HasAddonStatus ValidatorFunc[Addon]", + "watch_for": "Use via Addon.ValidateWith(...) before mutations rather than ad-hoc status checks" + }, + { + "file": "errors.go", + "role": "Typed NotFoundError + IsNotFound", + "watch_for": "Adapter/service must convert raw ent errors into this type" + } + ], + "anti_patterns": [ + "Returning on first validation failure instead of collecting errs and wrapping with NewNillableGenericValidationError", + "Adding DB queries or HTTP decode logic in this root package instead of the adapter/ or httpdriver/ child", + "Mutating a RateCard's concrete type without updating MarshalJSON/UnmarshalJSON dispatch on RateCardSerde.Type", + "Putting lifecycle/business operations (Publish/Archive/Next) on the Repository instead of Service", + "Hand-comparing addons in tests instead of using assert.go helpers (AssertAddonEqual / AssertRateCardEqual)" + ], + "decisions": [ + { + "decision": "Domain types wrap productcatalog.* meta plus managed fields", + "rationale": "Keeps shared catalog logic (pricing, entitlement templates, validation) in productcatalog while this package adds DB-managed identity and persistence-aware JSON." + }, + { + "decision": "Publish/Archive validate effective dates with a 30s timeJitter", + "rationale": "Tolerates clock skew between client request and server clock.Now() so near-now schedules are not rejected as 'in the past'." + } + ], + "code_examples": [ + { + "scenario": "Domain Validate aggregating sub-validations", + "code": "func (a Addon) Validate() error {\n\tvar errs []error\n\tif err := a.NamespacedID.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.ManagedModel.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.AddonMeta.Validate(); err != nil { errs = append(errs, err) }\n\tfor _, rc := range a.RateCards { if err := rc.Validate(); err != nil { errs = append(errs, err) } }\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "openmeter/productcatalog/plan": { + "purpose": "Root domain package for product-catalog Plans: defines Plan/Phase/RateCard/Addon value types, the Repository and Service interfaces, lifecycle events, validators, not-found errors, and custom Plan JSON (de)serialization. DB lives in adapter/, HTTP in httpdriver/, business rules in service/.", + "patterns": [ + { + "name": "ValidateWith + ValidatorFunc composition", + "description": "Plan and Phase implement models.CustomValidator and run Validate() via ValidateWith(ValidatePlanMeta(), ValidatePlanPhases()) \u2014 each rule is a models.ValidatorFunc[Plan].", + "example": "func (p Plan) Validate() error { return p.ValidateWith(ValidatePlanMeta(), ValidatePlanPhases()) }" + }, + { + "name": "Managed wrappers expose AsProductCatalog* + ManagedFields", + "description": "Phase embeds PhaseManagedFields (with PlanID) + productcatalog.Phase; RateCard embeds RateCardManagedFields (with PhaseID); both implement ManagedFields() and AsProductCatalogPhase()/converters.", + "example": "func (p Phase) AsProductCatalogPhase() productcatalog.Phase { return p.Phase }" + }, + { + "name": "Custom Plan JSON with raw-message rate cards", + "description": "serializer.go defines planAlias/phaseAlias/rateCardAlias and marshals each rate card's Price and EntitlementTemplate as json.RawMessage to control nested shape, avoiding recursive MarshalJSON.", + "example": "rateCard := rateCardAlias{Type: rc.Type(), Key: rc.Key(), Price: priceJSON, EntitlementTemplate: entitlementTemplateJSON}" + }, + { + "name": "Repository embeds entutils.TxCreator; Service adds lifecycle", + "description": "Repository is CRUD; Service mirrors it plus PublishPlan/ArchivePlan/NextPlan. OrderBy is a string enum with Values()+Validate().", + "example": "type Service interface { ...CreatePlan; PublishPlan; ArchivePlan; NextPlan }" + }, + { + "name": "Field-prefixed phase validation errors", + "description": "ValidatePlanPhases wraps each phase error with the phase Key so callers see which phase failed.", + "example": "errs = append(errs, fmt.Errorf(\"invalid plan phase %q: %s\", phase.Key, err))" + }, + { + "name": "Typed NotFoundError + lifecycle events", + "description": "NewNotFoundError builds messages from namespace/id/key/version; events (PlanCreate/Update/Delete/Publish/Archive) use metadata.EntityPlan and session.GetSessionUserID(ctx).", + "example": "metadata.ComposeResourcePath(e.Plan.Namespace, metadata.EntityPlan, e.Plan.ID)" + } + ], + "key_file_guides": [ + { + "file": "plan.go", + "role": "Plan type, ValidateWith, AsProductCatalogPlan, ValidatePlanMeta/Phases", + "watch_for": "Addons slice is only populated when expanded; phase validation is per-phase, error-prefixed" + }, + { + "file": "phase.go", + "role": "Phase + PhaseManagedFields + ManagedPhase interface", + "watch_for": "Managed phase Validate requires PlanID set; Equal handles both Phase and productcatalog.Phase variants" + }, + { + "file": "ratecard.go", + "role": "Managed RateCard with PhaseID + custom JSON", + "watch_for": "UnmarshalJSON dispatches on RateCardSerde.Type; missing type yields 'invalid RateCard type'" + }, + { + "file": "serializer.go", + "role": "Plan MarshalJSON/UnmarshalJSON via aliases + raw messages", + "watch_for": "Don't call json.Marshal(p) on Plan inside its own MarshalJSON \u2014 use planAlias to avoid recursion" + }, + { + "file": "service.go", + "role": "Service interface + Input structs/Validate", + "watch_for": "OrderBy enum must stay in sync with Values(); effective-date inputs use 30s timeJitter vs clock.Now()" + }, + { + "file": "repository.go", + "role": "Repository persistence contract (entutils.TxCreator)", + "watch_for": "No lifecycle methods here; keep them on Service" + }, + { + "file": "event.go", + "role": "Plan lifecycle events", + "watch_for": "Delete event requires Plan.DeletedAt; all events are v1" + }, + { + "file": "assert.go", + "role": "Test equality helpers (AssertPlanEqual, AssertPlanPhasesEqual)", + "watch_for": "Generic over productcatalog.Phase | Phase; key-based map comparison, not slice-order" + } + ], + "anti_patterns": [ + "Implementing Plan.MarshalJSON by calling json.Marshal on Plan directly (infinite recursion) instead of using planAlias", + "Adding DB or HTTP code in this root package rather than adapter/ or httpdriver/", + "Bypassing ValidateWith/ValidatorFunc composition with ad-hoc inline checks in Plan/Phase Validate", + "Constructing a managed Phase/RateCard without PlanID/PhaseID (Validate will reject as 'reference not set')", + "Putting PublishPlan/ArchivePlan/NextPlan on Repository instead of Service" + ], + "decisions": [ + { + "decision": "Rate-card Price and EntitlementTemplate serialize as json.RawMessage", + "rationale": "These are polymorphic (multiple price/template kinds); raw-message passthrough preserves the discriminated shape without the parent serializer needing to know every variant." + }, + { + "decision": "Managed wrappers (Phase/RateCard) separate identity from catalog value type", + "rationale": "productcatalog.* holds reusable plan-shape logic; this package adds DB-managed PlanID/PhaseID/timestamps and equality without polluting the shared types." + } + ], + "code_examples": [ + { + "scenario": "Composed validation via ValidatorFunc", + "code": "func (p Plan) Validate() error {\n\treturn p.ValidateWith(ValidatePlanMeta(), ValidatePlanPhases())\n}\n\nfunc ValidatePlanPhases() models.ValidatorFunc[Plan] {\n\treturn func(p Plan) error {\n\t\tvar errs []error\n\t\tfor _, phase := range p.Phases {\n\t\t\tif err := phase.Validate(); err != nil {\n\t\t\t\terrs = append(errs, fmt.Errorf(\"invalid plan phase %q: %s\", phase.Key, err))\n\t\t\t}\n\t\t}\n\t\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n\t}\n}" + } + ] + }, + "openmeter/productcatalog/planaddon": { + "purpose": "Root domain package for the PlanAddon join entity (a plan\u2194addon assignment): defines the PlanAddon type embedding full plan.Plan and addon.Addon, the Repository/Service interfaces, lifecycle events, not-found errors, and input structs. DB in adapter/, HTTP in httpdriver/, business rules in service/.", + "patterns": [ + { + "name": "PlanAddon embeds full plan.Plan and addon.Addon", + "description": "The assignment carries fully-loaded Plan and Addon domain objects (not just IDs); Validate() validates NamespacedID, ManagedModel, Plan, Addon, and AsProductCatalogPlanAddon() in turn.", + "example": "type PlanAddon struct { models.NamespacedID; models.ManagedModel; productcatalog.PlanAddonMeta; Plan plan.Plan; Addon addon.Addon }" + }, + { + "name": "AsProductCatalogPlanAddon converter", + "description": "Maps to productcatalog.PlanAddon by calling Plan.AsProductCatalogPlan() and Addon.AsProductCatalogAddon() so shared catalog validation can run.", + "example": "return productcatalog.PlanAddon{PlanAddonMeta: a.PlanAddonMeta, Plan: a.Plan.AsProductCatalogPlan(), Addon: a.Addon.AsProductCatalogAddon()}" + }, + { + "name": "ID-or-(plan,addon) dual identification on inputs", + "description": "Get/Update/Delete inputs accept either an assignment ID or a (PlanID/IDOrKey, AddonID/IDOrKey) pair; Validate requires both halves of the pair when ID is empty.", + "example": "if i.ID == \"\" { if i.PlanID == \"\" { errs = append(errs, errors.New(\"plan id must be provided if assignment id is not provided\")) } ... }" + }, + { + "name": "Repository embeds entutils.TxCreator; Service mirrors it", + "description": "Both interfaces expose List/Create/Delete/Get/Update; no extra lifecycle ops (publish/archive don't exist for assignments).", + "example": "type Repository interface { entutils.TxCreator; ListPlanAddons(...); CreatePlanAddon(...); ... }" + }, + { + "name": "Equaler with pointer-aware MaxQuantity comparison", + "description": "UpdatePlanAddonInput.Equal compares pointer fields (MaxQuantity, FromPlanPhase) carefully, treating nil/non-nil mismatches as not-equal.", + "example": "if i.MaxQuantity == nil && p.MaxQuantity != nil { return false }" + }, + { + "name": "Events use EntityAddon resource path", + "description": "Create/Update/Delete events compose Source/Subject via metadata.EntityAddon (not a dedicated planaddon entity) and pull session.GetSessionUserID(ctx).", + "example": "metadata.ComposeResourcePath(e.PlanAddon.Namespace, metadata.EntityAddon, e.PlanAddon.ID)" + } + ], + "key_file_guides": [ + { + "file": "planaddon.go", + "role": "PlanAddon type, Validate, AsProductCatalogPlanAddon", + "watch_for": "Validate cascades into embedded Plan and Addon \u2014 both must be fully loaded or validation fails" + }, + { + "file": "service.go", + "role": "Service interface + Input structs (Create/Update/Get/Delete/List)", + "watch_for": "ListPlanAddonsInput.Validate returns nil (no validation); Update/Get/Delete enforce ID-or-pair rule" + }, + { + "file": "repository.go", + "role": "Repository persistence contract", + "watch_for": "Embeds entutils.TxCreator; only CRUD, no lifecycle methods" + }, + { + "file": "event.go", + "role": "PlanAddonCreate/Update/Delete events (v1)", + "watch_for": "Delete event requires DeletedAt set; events use EntityAddon, not a planaddon entity" + }, + { + "file": "errors.go", + "role": "Typed NotFoundError keyed by ns/id/plan.idOrKey/addon.idOrKey", + "watch_for": "Adapter must wrap ent not-found into this type" + } + ], + "anti_patterns": [ + "Storing only Plan/Addon IDs on PlanAddon instead of the full embedded plan.Plan/addon.Addon the type expects", + "Adding DB or HTTP code in this root package rather than adapter/ or httpdriver/", + "Comparing MaxQuantity/FromPlanPhase without nil-vs-non-nil pointer checks in Equal", + "Requiring an assignment ID when callers may legitimately identify by (plan, addon) pair", + "Returning a raw ent not-found instead of planaddon.NewNotFoundError" + ], + "decisions": [ + { + "decision": "PlanAddon embeds the full Plan and Addon aggregates", + "rationale": "Compatibility validation (currency, phases, rate cards) needs both complete sides; the adapter eager-loads them so the service can validate the assignment as a whole." + }, + { + "decision": "Inputs support ID-or-(plan,addon) identification", + "rationale": "API callers reference assignments either by their own ID or by the natural (plan key, addon key) pair; both must resolve to the same row." + } + ], + "code_examples": [ + { + "scenario": "Validating an assignment by cascading into both sides", + "code": "func (a PlanAddon) Validate() error {\n\tvar errs []error\n\tif err := a.NamespacedID.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.ManagedModel.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.Plan.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.Addon.Validate(); err != nil { errs = append(errs, err) }\n\tif err := a.AsProductCatalogPlanAddon().Validate(); err != nil { errs = append(errs, err) }\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "openmeter/productcatalog/subscription": { + "purpose": "The plan-to-subscription bridge (package plansubscription): converts a plan \u2014 either an inline plan.CreatePlanInput or a published plan reference \u2014 into subscription domain inputs, and defines PlanSubscriptionService (Create/Change/Migrate). It owns plan\u2192subscription translation; persistence is delegated to the subscription workflow layer.", + "patterns": [ + { + "name": "PlanInput dispatch: ref vs inline", + "description": "PlanInput holds either *PlanRefInput or *plan.CreatePlanInput; consumers branch on AsRef()/AsInput(). Validate requires exactly one to be set.", + "example": "func (p *PlanInput) Validate() error { if p.ref == nil && p.plan == nil { return fmt.Errorf(\"plan or plan reference must be provided\") }; return nil }" + }, + { + "name": "Domain adapters implement subscription.* interfaces", + "description": "Plan/Phase/RateCard implement subscription.Plan / subscription.PlanPhase / subscription.PlanRateCard via compile assertions and expose ToCreateSubscription*Input converters.", + "example": "var _ subscription.Plan = &Plan{} ; func (p *Plan) ToCreateSubscriptionPlanInput() subscription.CreateSubscriptionPlanInput { ... }" + }, + { + "name": "Phases compute cumulative StartAfter", + "description": "GetPhases walks plan phases accumulating each phase Duration into startAfter, assigning Index for SortHint, rather than storing absolute times.", + "example": "ps = append(ps, &Phase{Phase: ph, StartAfter: startAfter, Index: idx}); startAfter, _ = startAfter.Add(lo.FromPtr(ph.Duration))" + }, + { + "name": "Ref only set when the plan exists", + "description": "ToCreateSubscriptionPlanInput attaches a subscription.PlanRef only when Plan.Ref != nil, so inline custom plans subscribe without a stored reference.", + "example": "if p.Ref != nil { ref = &subscription.PlanRef{Id: p.Ref.ID, Key: p.Key, Version: p.Version} }" + }, + { + "name": "Service orchestrates, never persists", + "description": "PlanSubscriptionService delegates to subscriptionworkflow (CreateFromPlan/ChangeToPlan) and plan.Service; Create/Change require active plans while Migrate accepts archived.", + "example": "type PlanSubscriptionService interface { Create(...); Migrate(...); Change(...) }" + } + ], + "key_file_guides": [ + { + "file": "plan.go", + "role": "PlanInput/PlanRefInput + Plan/Phase/RateCard adapters to subscription.*", + "watch_for": "RateCard.ToCreateSubscriptionItemPlanInput clones the rate card (RateCard.Clone()); Ref must stay nil for inline plans" + }, + { + "file": "service.go", + "role": "PlanSubscriptionService interface + request structs", + "watch_for": "Create/Change carry a WorkflowInput plus PlanInput and optional StartingPhase; Migrate takes TargetVersion" + } + ], + "anti_patterns": [ + "Persisting subscriptions directly here instead of delegating to the subscription workflow layer", + "Branching on whether AsRef()/AsInput() is nil without going through PlanInput.Validate first", + "Setting subscription.PlanRef for an inline custom plan (Ref must be nil unless the plan is stored)", + "Computing phase StartAfter as absolute timestamps instead of cumulative durations", + "Allowing archived plans in Create/Change (only Migrate accepts archived plans)" + ], + "decisions": [ + { + "decision": "One endpoint accepts both an inline custom plan and a plan reference via PlanInput", + "rationale": "Subscriptions can be created from a saved catalog plan or an ad-hoc inline plan; PlanInput's ref/plan dispatch unifies both code paths into the same workflow call." + }, + { + "decision": "Phases use cumulative StartAfter durations, not absolute times", + "rationale": "Subscription phases are anchored relative to subscription start; storing relative ISO durations keeps the plan independent of any specific subscription start date." + } + ], + "code_examples": [ + { + "scenario": "Converting plan phases into relative subscription phases", + "code": "func (p *Plan) GetPhases() []subscription.PlanPhase {\n\tps := make([]subscription.PlanPhase, 0, len(p.Phases))\n\tstartAfter := datetime.ISODuration{}\n\tfor idx, ph := range p.Phases {\n\t\tps = append(ps, &Phase{Phase: ph, StartAfter: startAfter, Index: idx})\n\t\tstartAfter, _ = startAfter.Add(lo.FromPtr(ph.Duration))\n\t}\n\treturn ps\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w33.json b/.archie/enrichments/w33.json new file mode 100644 index 0000000000..86f869326c --- /dev/null +++ b/.archie/enrichments/w33.json @@ -0,0 +1,72 @@ +{ + "openmeter/sink/flushhandler/ingestnotification": { + "purpose": "A sink flush-success hook that, after a batch of usage events is written to ClickHouse, fans out ingestevents.EventBatchedIngest notifications onto the eventbus so downstream consumers (notably entitlement/balanceworker) can recompute affected balances. Its constraint: it must be a fast, side-effect-only post-flush callback that never undoes the sink's already-completed ClickHouse write.", + "patterns": [ + { + "name": "FlushEventHandler constructor wrapping", + "description": "NewHandler validates HandlerConfig then returns a flushhandler.FlushEventHandler built via flushhandler.NewFlushEventHandler with a named callback (Name: \"ingest_notification\") bound to handler.OnFlushSuccess. New handlers must register through NewFlushEventHandler, not implement the interface ad hoc.", + "example": "flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{Name: \"ingest_notification\", Callback: handler.OnFlushSuccess, Logger: logger, MetricMeter: metricMeter})" + }, + { + "name": "Filter then map sink messages to events", + "description": "OnFlushSuccess first lo.Filter-s out messages where Serialized is nil, early-returns on empty, then slicesx.Map-s each sinkmodels.SinkMessage into an ingestevents.EventBatchedIngest carrying Namespace, SubjectKey, MeterSlugs, RawEvents and StoredAt.", + "example": "filtered := lo.Filter(events, func(e sinkmodels.SinkMessage, _ int) bool { return e.Serialized != nil })" + }, + { + "name": "Group-by-subject then chunk before publish", + "description": "Events are grouped by namespace+\"/\"+subject (lo.GroupBy), merged per subject, and lo.Chunk-ed by config.MaxEventsInBatch so a single published message never exceeds Kafka size limits. MeterSlugs are lo.Uniq+slices.Concat deduplicated and RawEvents concatenated per chunk.", + "example": "iEventsBySubject := lo.GroupBy(iEvents, func(e ingestevents.EventBatchedIngest) string { return e.Namespace.ID + \"/\" + e.SubjectKey })" + }, + { + "name": "Best-effort publish with joined errors", + "description": "Each merged event is published via h.publisher.Publish; failures accumulate with errors.Join into finalErr and are logged via ErrorContext rather than aborting the loop, so one failed publish does not drop the rest of the batch.", + "example": "finalErr = errors.Join(finalErr, err); h.logger.ErrorContext(ctx, \"failed to publish change notification\", \"error\", err)" + }, + { + "name": "StoredAt stamped once at flush time", + "description": "now := time.Now() is captured once and used as StoredAt for every emitted event, on the documented assumption that the ClickHouse write has already completed when this callback runs.", + "example": "now := time.Now(); res := ingestevents.EventBatchedIngest{..., StoredAt: now}" + }, + { + "name": "Meter identity via slug, not ID", + "description": "getMeterSlugsFromMeters maps []*meter.Meter to meter.Key strings; payloads carry MeterSlugs only, keeping events OSS-compatible (no IDs).", + "example": "slugs[i] = meter.Key" + }, + { + "name": "Config Validate gate", + "description": "HandlerConfig.Validate() rejects MaxEventsInBatch <= 0 and is invoked inside NewHandler before any handler is constructed.", + "example": "if c.MaxEventsInBatch <= 0 { return errors.New(\"max_events_in_batch must be greater than 0\") }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Producer side of the ingest-notification pipeline: defines handler, HandlerConfig (+Validate), NewHandler, OnFlushSuccess (filter/map/group/merge/chunk/publish), and getMeterSlugsFromMeters.", + "watch_for": "OnFlushSuccess runs after the ClickHouse write, so it must stay tolerant \u2014 join publish errors instead of failing fast, and never do work that could undo a successful flush. Keep MeterSlugs from meter.Key (never IDs) for OSS compatibility, and preserve MaxEventsInBatch chunking to stay under Kafka message-size limits." + } + ], + "anti_patterns": [ + "Implementing flushhandler.FlushEventHandler directly instead of going through flushhandler.NewFlushEventHandler in NewHandler.", + "Returning a hard error from OnFlushSuccess on a single publish failure instead of joining into finalErr and continuing \u2014 this would discard the rest of an already-flushed batch.", + "Dropping the group-by-subject + MaxEventsInBatch chunking, allowing oversized messages that exceed Kafka limits.", + "Putting meter IDs (or other OSS-absent identifiers) into emitted events instead of MeterSlugs from meter.Key.", + "Adding persistence, ClickHouse reads, or heavy synchronous work in this callback \u2014 it is a thin post-flush notification fan-out only." + ], + "decisions": [ + { + "decision": "Emit one EventBatchedIngest per subject (after merge + chunk) rather than one per raw sink message.", + "rationale": "Downstream balance recomputation is keyed by subject/meter; coalescing reduces event volume while chunking keeps individual messages under Kafka size limits." + }, + { + "decision": "Resolve meter slugs and subjects in the flush handler rather than during event consumption.", + "rationale": "The handler already holds the sink batch (message.Meters, message.Serialized.Subject) in memory; resolving here keeps consumers (balanceworker) simpler, at the cost of more producer-side work (noted in the OnFlushSuccess comment)." + } + ], + "code_examples": [ + { + "scenario": "Constructing the ingest-notification flush handler.", + "code": "func NewHandler(logger *slog.Logger, metricMeter metric.Meter, publisher eventbus.Publisher, config HandlerConfig) (flushhandler.FlushEventHandler, error) {\n\tif err := config.Validate(); err != nil {\n\t\treturn nil, err\n\t}\n\th := &handler{publisher: publisher, logger: logger, config: config}\n\treturn flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{\n\t\tName: \"ingest_notification\",\n\t\tCallback: h.OnFlushSuccess,\n\t\tLogger: logger,\n\t\tMetricMeter: metricMeter,\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w34.json b/.archie/enrichments/w34.json new file mode 100644 index 0000000000..7fc786b262 --- /dev/null +++ b/.archie/enrichments/w34.json @@ -0,0 +1,81 @@ +{ + "openmeter/subject/service": { + "purpose": "Implements subject.Service (the write/read service layer for Subjects) over a subject.Adapter, wrapping every mutation in a transaction and firing service hooks at lifecycle boundaries. Subjects are usage-attribution identities kept in sync with customers; this service is the only write path and enforces input validation plus hook ordering.", + "patterns": [ + { + "name": "Service wraps Adapter, never DB directly", + "description": "Service struct holds a single subjectAdapter subject.Adapter plus a models.ServiceHookRegistry[subject.Subject]; all persistence goes through the adapter, never Ent.", + "example": "type Service struct { subjectAdapter subject.Adapter; hooks models.ServiceHookRegistry[subject.Subject] }" + }, + { + "name": "Compile-time interface assertion", + "description": "var _ subject.Service = (*Service)(nil) at package top guarantees the struct satisfies the domain interface.", + "example": "var _ subject.Service = (*Service)(nil)" + }, + { + "name": "Constructor validates required deps", + "description": "New(subjectAdapter) returns (*Service, error), rejects a nil adapter with fmt.Errorf, and initializes an empty ServiceHookRegistry.", + "example": "if subjectAdapter == nil { return nil, fmt.Errorf(\"subject adapter is required\") }" + }, + { + "name": "Validate input then wrap as generic validation error", + "description": "Mutating methods call input.Validate() first and wrap the result in models.NewGenericValidationError; GetById/GetByKey/Delete validate the identifier (id.Validate()/key.Validate()) the same way.", + "example": "if err := input.Validate(); err != nil { return subject.Subject{}, fmt.Errorf(\"invalid input: %w\", models.NewGenericValidationError(err)) }" + }, + { + "name": "Mutations run inside transaction.Run with hooks", + "description": "Create/Update/Delete execute via transaction.Run / transaction.RunWithNoValue against s.subjectAdapter, firing PostCreate, Pre/PostUpdate, or Pre/PostDelete around the adapter call within the same tx.", + "example": "return transaction.Run(ctx, s.subjectAdapter, func(ctx context.Context) (subject.Subject, error) { sub, err := s.subjectAdapter.Create(ctx, input); ...; err = s.hooks.PostCreate(ctx, &sub); ... })" + }, + { + "name": "Update/Delete re-fetch before mutating", + "description": "Update and Delete first GetById the current subject so Pre-hooks observe existing state, then perform the adapter write, then fire Post-hooks.", + "example": "sub, err := s.subjectAdapter.GetById(ctx, models.NamespacedID{Namespace: input.Namespace, ID: input.ID})" + }, + { + "name": "Read paths bypass transaction and hooks", + "description": "GetByIdOrKey, GetById, GetByKey, List delegate straight to the adapter (with identifier validation where applicable) and do not open a transaction or fire hooks.", + "example": "func (s *Service) List(ctx, orgId, params) { return s.subjectAdapter.List(ctx, orgId, params) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "The subject.Service implementation: Service struct, New constructor, RegisterHooks, and all CRUD+List methods.", + "watch_for": "Keep mutating methods inside transaction.Run/RunWithNoValue and fire the matching hook (PostCreate / Pre+PostUpdate / Pre+PostDelete). Do not add a write path that skips the hook registry or the validate+wrap step." + }, + { + "file": "service_test.go", + "role": "Integration test Test_SubjectService driving Create/Get/Update/Delete through subjecttestutils.NewTestEnv with real DB migrations.", + "watch_for": "Delete must NOT cascade into entitlements (they belong to the customer, not the subject); deleting a subject soft-deletes it (byID.IsDeleted()) and the key can be re-created afterward. Build deps via subjecttestutils, not app/common, to avoid import cycles." + } + ], + "anti_patterns": [ + "Calling subjectAdapter directly for writes without transaction.Run / RunWithNoValue \u2014 breaks atomicity and skips hooks.", + "Adding a Create/Update/Delete path that does not fire the corresponding ServiceHookRegistry method (PostCreate, Pre/PostUpdate, Pre/PostDelete).", + "Skipping input.Validate() + models.NewGenericValidationError wrapping on a new mutating method.", + "Hard-deleting subjects or cascading deletes into entitlements \u2014 Delete is soft (IsDeleted) and entitlements outlive the subject.", + "Constructing Service via a struct literal instead of New, or passing a nil adapter." + ], + "decisions": [ + { + "decision": "Service depends only on subject.Adapter plus a hook registry, not on customer/entitlement services.", + "rationale": "Keeps the subject domain decoupled; cross-domain sync (subject<->customer) is handled by registered ServiceHooks (see the hooks child) rather than direct service calls, avoiding circular wiring." + }, + { + "decision": "All mutations are transactional and re-fetch current state before Pre-hooks.", + "rationale": "Ensures hooks observe a consistent snapshot and that the adapter write plus hook side effects commit or roll back together." + }, + { + "decision": "Subject deletion is soft and never touches entitlements.", + "rationale": "Entitlements are owned by the customer; a subject is only a usage-attribution key, so its lifecycle must not destroy customer-scoped balances (asserted in service_test.go)." + } + ], + "code_examples": [ + { + "scenario": "Transactional mutation firing a service hook", + "code": "import (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openmeterio/openmeter/openmeter/subject\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nfunc (s *Service) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn subject.Subject{}, fmt.Errorf(\"invalid input: %w\", models.NewGenericValidationError(err))\n\t}\n\treturn transaction.Run(ctx, s.subjectAdapter, func(ctx context.Context) (subject.Subject, error) {\n\t\tsub, err := s.subjectAdapter.Create(ctx, input)\n\t\tif err != nil {\n\t\t\treturn subject.Subject{}, err\n\t\t}\n\t\tif err = s.hooks.PostCreate(ctx, &sub); err != nil {\n\t\t\treturn subject.Subject{}, err\n\t\t}\n\t\treturn sub, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w35.json b/.archie/enrichments/w35.json new file mode 100644 index 0000000000..d439b79a3a --- /dev/null +++ b/.archie/enrichments/w35.json @@ -0,0 +1,582 @@ +{ + "cmd/balance-worker": { + "purpose": "main.go entrypoint for the balance-worker binary, which snapshots entitlement balances from Kafka usage events. Builds a Wire-generated Application and runs it after migrating the DB; constraint: business logic lives in app/common providers, this package only wires and runs.", + "patterns": [ + { + "name": "Standard config bootstrap", + "description": "main() uses viper.NewWithOptions(viper.WithDecodeHook(config.DecodeHook())) + pflag, calls config.SetViperDefaults, supports --config/--version/--validate, then v.Unmarshal into config.Configuration and conf.Validate() before building the app.", + "example": "v, flags := viper.NewWithOptions(viper.WithDecodeHook(config.DecodeHook())), pflag.NewFlagSet(...)" + }, + { + "name": "Wire Application struct embeds lifecycle mixins", + "description": "Application embeds common.GlobalInitializer, common.Migrator, common.Runner so SetGlobals(), Migrate(ctx), Run() come from app/common. wire.Build lists the balance-worker provider set and ends with wire.Struct(new(Application), \"*\").", + "example": "type Application struct { common.GlobalInitializer; common.Migrator; common.Runner; ... }" + }, + { + "name": "Panic funnel + ordered cleanup", + "description": "First statement is defer log.PanicLogger(log.WithExit); initializeApplication returns a cleanup func that is deferred and also invoked on init failure before os.Exit(1).", + "example": "defer log.PanicLogger(log.WithExit)" + }, + { + "name": "Migrate before Run", + "description": "app.Migrate(ctx) is called and error-checked before app.Run(); never start the worker on an unmigrated DB.", + "example": "if err := app.Migrate(ctx); err != nil { ... os.Exit(1) }" + }, + { + "name": "metadata() names the binary", + "description": "Local metadata(conf) calls common.NewMetadata(conf, version, \"balance-worker\") to tag telemetry with the service name; version comes from version.go ldflags.", + "example": "return common.NewMetadata(conf, version, \"balance-worker\")" + } + ], + "key_file_guides": [ + { + "file": "wire.go", + "role": "//go:build wireinject provider list passed to wire.Build (common.BalanceWorker, common.BalanceWorkerAdapter, common.Streaming, common.Notification, common.Lockr, etc.)", + "watch_for": "Edit this, not wire_gen.go; rerun make generate after changing the provider set or the Application struct." + }, + { + "file": "wire_gen.go", + "role": "Wire-generated injector; Code generated by Wire. DO NOT EDIT.", + "watch_for": "Never hand-edit; the nested cleanupN() unwinding order is generated and must not be touched manually." + }, + { + "file": "main.go", + "role": "Process entrypoint: load/validate config, initializeApplication, SetGlobals, Migrate, Run.", + "watch_for": "ctx is context.Background(); keep config-load boilerplate identical to other cmd/ binaries." + }, + { + "file": "version.go", + "role": "ldflags-provisioned version/revision/revisionDate read via runtime/debug in init().", + "watch_for": "Identical across all cmd/ binaries; do not diverge." + } + ], + "anti_patterns": [ + "Editing wire_gen.go directly instead of wire.go + make generate", + "Adding domain/business logic here instead of an app/common provider", + "Calling app.Run() before app.Migrate(ctx) succeeds", + "Dropping the defer log.PanicLogger / cleanup() funnel" + ], + "decisions": [ + { + "decision": "DI is centralized in app/common; cmd/ only assembles a worker-specific subset", + "rationale": "Keeps the five worker binaries thin and consistent while sharing one provider library." + }, + { + "decision": "Application embeds GlobalInitializer/Migrator/Runner mixins", + "rationale": "main() can drive any binary's lifecycle uniformly (SetGlobals/Migrate/Run) regardless of which providers were wired." + } + ], + "code_examples": [] + }, + "cmd/billing-worker": { + "purpose": "main.go entrypoint for the billing-worker binary (invoice advancement/collection + subscription->billing reconciliation). Beyond the shared bootstrap it also provisions ledger business accounts and the sandbox app on startup before Run().", + "patterns": [ + { + "name": "Extra startup provisioning steps", + "description": "After Migrate, main() calls app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace()) and app.AppRegistry.SandboxProvisioner(...) before app.Run(); each error -> os.Exit(1).", + "example": "_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace())" + }, + { + "name": "Richer Application struct", + "description": "Application exposes AppRegistry, LedgerAccountResolver, Meter, NamespaceManager, Streaming alongside the GlobalInitializer/Migrator/Runner mixins so startup steps can reach those services.", + "example": "AppRegistry common.AppRegistry; LedgerAccountResolver ledger.AccountResolver; NamespaceManager *namespace.Manager" + }, + { + "name": "Feature-gate noop in wire", + "description": "wire.Build includes common.FeatureGateNoopSet; the generated injector builds gate := featuregate.NewNoop() and threads it through NewBillingRegistry and NewBillingSubscriptionSyncService.", + "example": "common.FeatureGateNoopSet" + }, + { + "name": "Worker config via FieldsOf", + "description": "wire.FieldsOf(new(config.BillingConfiguration), \"Worker\") and FieldsOf(...BillingWorkerConfiguration, \"ConsumerConfiguration\") extract nested config sub-structs for providers.", + "example": "wire.FieldsOf(new(config.BillingConfiguration), \"Worker\")" + }, + { + "name": "metadata() names the binary", + "description": "metadata(conf) = common.NewMetadata(conf, version, \"billing-worker\").", + "example": "common.NewMetadata(conf, version, \"billing-worker\")" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "Bootstrap + Migrate + ledger/sandbox provisioning + Run.", + "watch_for": "EnsureBusinessAccounts and SandboxProvisioner must stay before Run(); they depend on Migrate having run first." + }, + { + "file": "wire.go", + "role": "billing-worker provider list (common.BillingWorker, common.Streaming, common.TaxCode, common.FeatureGateNoopSet, ...).", + "watch_for": "credits.enabled gating is handled inside the wired ledger providers; do not bypass them here." + }, + { + "file": "wire_gen.go", + "role": "Generated injector wiring the large billing/ledger/subscription graph; DO NOT EDIT.", + "watch_for": "The injector constructs LedgerHistorical/Account/Resolver chains and BillingRegistry; regenerate via make generate." + }, + { + "file": "version.go", + "role": "ldflags version metadata.", + "watch_for": "Identical to other binaries." + } + ], + "anti_patterns": [ + "Editing wire_gen.go instead of wire.go", + "Running app.Run() before EnsureBusinessAccounts/SandboxProvisioner provisioning", + "Hardcoding a real feature gate here instead of the wired FeatureGateNoopSet", + "Adding billing logic to main.go rather than app/common providers" + ], + "decisions": [ + { + "decision": "Startup eagerly provisions ledger business accounts and sandbox app for the default namespace", + "rationale": "The worker must have its accounts and sandbox integration ready before it begins reconciling/invoicing." + } + ], + "code_examples": [ + { + "scenario": "Post-migrate provisioning before Run()", + "code": "if err := app.Migrate(ctx); err != nil { os.Exit(1) }\n_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace())\nif err != nil { logger.Error(\"failed to provision ledger business accounts\", \"error\", err); os.Exit(1) }\nerr = app.AppRegistry.SandboxProvisioner(ctx, app.NamespaceManager.GetDefaultNamespace())\nif err != nil { os.Exit(1) }\napp.Run()" + } + ] + }, + "cmd/notification-service": { + "purpose": "main.go entrypoint for the notification-service binary, which consumes notification system events from Kafka and delivers them. Unlike the mixin-driven workers, main() builds the run.Group and notification consumer by hand from a partial Wire Application.", + "patterns": [ + { + "name": "Hand-built run.Group", + "description": "main() constructs a watermillkafka.Subscriber, builds consumer.Options with router.Options, calls consumer.New, then assembles run.Group (telemetry server, consumer, SignalHandler) and group.Run(run.WithReverseShutdownOrder()) directly rather than via common.Runner.", + "example": "notificationConsumer, err := consumer.New(consumerOptions)" + }, + { + "name": "Application provides building blocks not lifecycle", + "description": "Application exposes BrokerOptions, MessagePublisher, EventPublisher, Notification, Meter, Tracer, TelemetryServer for main() to wire the consumer manually; still embeds GlobalInitializer/Migrator.", + "example": "app.BrokerOptions, app.MessagePublisher, app.EventPublisher.Marshaler(), app.Notification" + }, + { + "name": "Consumer wired to system events topic", + "description": "consumer.Options.SystemEventsTopic = conf.Events.SystemEvents.Topic; ConsumerGroupName from conf.Notification.Consumer.ConsumerGroupName.", + "example": "SystemEventsTopic: conf.Events.SystemEvents.Topic" + }, + { + "name": "Shared config bootstrap + panic funnel", + "description": "Identical viper/pflag config load, conf.Validate(), defer log.PanicLogger(log.WithExit), and Migrate before running.", + "example": "defer log.PanicLogger(log.WithExit)" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "Bootstrap, build Kafka subscriber + notification consumer, run telemetry + consumer in a run.Group.", + "watch_for": "Subscriber/consumer are constructed in main, not Wire; group.Run uses run.WithReverseShutdownOrder() so add components in dependency order." + }, + { + "file": "wire.go", + "role": "Provider list producing the Application building blocks (notification, meter, streaming, eventbus, watermill kafka driver).", + "watch_for": "Application here is a provider container, not a Runner; lifecycle is owned by main.go." + }, + { + "file": "wire_gen.go", + "role": "Generated injector; DO NOT EDIT.", + "watch_for": "Regenerate via make generate after provider changes." + }, + { + "file": "version.go", + "role": "ldflags version metadata.", + "watch_for": "Identical to other binaries." + } + ], + "anti_patterns": [ + "Editing wire_gen.go instead of wire.go", + "Adding new run.Group members without preserving reverse-shutdown ordering", + "Putting delivery/consumer logic in main.go instead of openmeter/notification/consumer", + "Skipping app.Migrate(ctx) before starting the consumer" + ], + "decisions": [ + { + "decision": "The consumer and run.Group are assembled in main.go rather than via common.Runner", + "rationale": "Notification delivery needs explicit control over the Kafka subscriber, marshaler, and shutdown ordering of telemetry vs consumer." + } + ], + "code_examples": [] + }, + "cmd/server": { + "purpose": "main.go entrypoint and DI bootstrap for the primary API server binary. Builds the full Application via Wire, migrates the DB, registers namespace handlers, provisions defaults, then serves the HTTP API + telemetry + notification event handler via an oklog/run group.", + "patterns": [ + { + "name": "Migrate then register handlers then initNamespace", + "description": "Order is fixed: app.Migrate(ctx) -> RegisterHandler(LedgerNamespaceHandler, KafkaIngestNamespaceHandler, TaxCodeNamespaceHandler) -> initNamespace(manager) -> SandboxProvisioner -> ProvisionDefaultBillingProfile -> MeterConfigInitializer. New handlers that must provision the default namespace MUST be registered before initNamespace.", + "example": "app.NamespaceManager.RegisterHandler(app.LedgerNamespaceHandler)" + }, + { + "name": "Router config assembled from Application fields", + "description": "server.NewServer(&server.Config{RouterConfig: router.Config{...}}) maps ~40 app services (Billing, Customer, Plan, Subscription, Entitlement*, Charge via app.BillingRegistry.ChargesServiceOrNil(), FeatureGate, etc.) into the router.", + "example": "ChargeService: app.BillingRegistry.ChargesServiceOrNil()" + }, + { + "name": "Debug connector wraps streaming", + "description": "debugConnector := debug.NewDebugConnector(app.StreamingConnector) is created and passed as RouterConfig.DebugConnector.", + "example": "debugConnector := debug.NewDebugConnector(app.StreamingConnector)" + }, + { + "name": "Multi-actor run.Group", + "description": "group.Add for telemetry server, kafkaingest.KafkaProducerGroup, the API http.Server (timeouts from conf.Server), NotificationEventHandler, termination checker, and SignalHandler; group.Run(run.WithReverseShutdownOrder()).", + "example": "group.Add(kafkaingest.KafkaProducerGroup(ctx, app.KafkaProducer, logger, app.KafkaMetrics))" + }, + { + "name": "Shared config bootstrap + panic funnel", + "description": "Same viper/pflag/DecodeHook load, conf.Validate(), defer log.PanicLogger(log.WithExit) as the workers.", + "example": "defer log.PanicLogger(log.WithExit)" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "Full server lifecycle: config, build app, migrate, register namespace handlers, provision defaults, mount router + /version, run actors.", + "watch_for": "Namespace handlers must be registered BEFORE initNamespace; SandboxProvisioner/ProvisionDefaultBillingProfile/MeterConfigInitializer run after the namespace exists." + }, + { + "file": "wire.go", + "role": "Largest provider list (billing, ledger, customer, productcatalog, portal, ingest, notification, secret, registry, taxcode, feature gate, ...).", + "watch_for": "Adding a router dependency means wiring its provider here AND adding the field to router.Config in main.go." + }, + { + "file": "wire_gen.go", + "role": "Generated full-application injector; DO NOT EDIT.", + "watch_for": "Regenerate via make generate; do not reorder generated cleanup chains." + }, + { + "file": "version.go", + "role": "ldflags version metadata; also served by the /version endpoint with runtime.GOOS/GOARCH.", + "watch_for": "Identical init() to other binaries." + } + ], + "anti_patterns": [ + "Registering a namespace handler after initNamespace when it must provision the default namespace", + "Editing wire_gen.go instead of wire.go", + "Adding a router service without both a Wire provider and a router.Config field", + "Calling provisioning steps before app.Migrate(ctx)", + "Adding actors to the run.Group that break reverse-shutdown ordering" + ], + "decisions": [ + { + "decision": "DB migration runs before default-namespace provisioning", + "rationale": "Namespace handlers and default-account/sandbox/billing-profile provisioning write rows that require the migrated schema." + }, + { + "decision": "All HTTP/telemetry/Kafka/notification actors run under one oklog/run group with reverse shutdown", + "rationale": "Coordinated graceful shutdown: dependents stop before their dependencies (e.g. API before Kafka producer)." + } + ], + "code_examples": [ + { + "scenario": "Register namespace handlers before creating the default namespace", + "code": "if err := app.Migrate(ctx); err != nil { os.Exit(1) }\nif err = app.NamespaceManager.RegisterHandler(app.LedgerNamespaceHandler); err != nil { os.Exit(1) }\nif err = app.NamespaceManager.RegisterHandler(app.KafkaIngestNamespaceHandler); err != nil { os.Exit(1) }\nif err = initNamespace(app.NamespaceManager, logger); err != nil { os.Exit(1) }" + } + ] + }, + "cmd/sink-worker": { + "purpose": "main.go entrypoint for the sink-worker binary, which sinks Kafka usage events into ClickHouse. Builds a lean Wire Application (no Migrator/Runner mixins) and runs app.Sink plus the telemetry server in a hand-built run.Group.", + "patterns": [ + { + "name": "Cancelable root context", + "description": "Unlike the other binaries, main() uses ctx, cancel := context.WithCancel(context.Background()) with defer cancel(), passed into Sink.Run(ctx).", + "example": "ctx, cancel := context.WithCancel(context.Background()); defer cancel()" + }, + { + "name": "Minimal Application, no DB migration", + "description": "Application embeds only common.GlobalInitializer and exposes Sink, Streaming, TopicProvisioner, TopicResolver, FlushHandler, TelemetryServer; there is no Migrate step before running.", + "example": "Sink *sink.Sink; FlushHandler flushhandler.FlushEventHandler" + }, + { + "name": "Sink + telemetry run.Group", + "description": "group.Add(app.Sink.Run/Close), group.Add(TelemetryServer.ListenAndServe/Shutdown), SignalHandler; group.Run(run.WithReverseShutdownOrder()) with lo.ErrorsAs[*run.SignalError] for signal detection.", + "example": "group.Add(func() error { return app.Sink.Run(ctx) }, func(err error) { _ = app.Sink.Close() })" + }, + { + "name": "Wire provider subset for sinking", + "description": "wire.Build uses FieldsOf(...,\"Sink\"), common.Sink, common.SinkWorkerProvisionTopics, common.KafkaNamespaceResolver, common.WatermillNoPublisher (publisher-less), common.Streaming.", + "example": "common.WatermillNoPublisher" + }, + { + "name": "Local NewLogger helper", + "description": "A binary-local NewLogger builds a slogmulti pipe with otelslog middleware (marked TODO: use the primary logger).", + "example": "slogmulti.Pipe(otelslog.ResourceMiddleware(res), otelslog.NewHandler)" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "Bootstrap, run Sink + telemetry server in run.Group; exits non-zero on non-signal/non-ErrServerClosed errors.", + "watch_for": "No app.Migrate call here; ctx is cancelable and feeds Sink.Run, so propagate it rather than context.Background()." + }, + { + "file": "wire.go", + "role": "Sink provider subset + local metadata/NewLogger helpers.", + "watch_for": "common.WatermillNoPublisher is intentional (sink only consumes); do not swap in a publisher provider." + }, + { + "file": "wire_gen.go", + "role": "Generated injector; DO NOT EDIT.", + "watch_for": "Regenerate via make generate." + }, + { + "file": "version.go", + "role": "ldflags version metadata.", + "watch_for": "Identical to other binaries." + } + ], + "anti_patterns": [ + "Editing wire_gen.go instead of wire.go", + "Adding a Migrator/Runner mixin or DB migration step the sink does not need", + "Replacing context.WithCancel root ctx with context.Background()", + "Wiring a Watermill publisher into a consume-only sink" + ], + "decisions": [ + { + "decision": "sink-worker omits the Migrator and uses a cancelable context", + "rationale": "It only sinks events into ClickHouse and owns no Postgres schema; an explicit cancelable ctx drives clean Sink shutdown." + } + ], + "code_examples": [] + }, + "openmeter/subscription/addon": { + "purpose": "Subscription-addon sub-domain (package subscriptionaddon): models a 1:1 SubscriptionAddon (subscription + productcatalog Addon) plus its append-only quantity timeline, and the rate-card Apply/Restore math that folds addon prices/entitlements/discounts onto a target RateCard. Root holds domain types + events; diff/, repo/, service/, http/ provide the engine, persistence, service, and transport layers.", + "patterns": [ + { + "name": "Quantity as a timeutil.Timeline", + "description": "Quantities is a timeutil.Timeline[SubscriptionAddonQuantity]; GetInstances() derives SubscriptionAddonInstance segments from open periods, never from stored end times.", + "example": "periods := quantities.GetOpenPeriods(); periods = periods[1:]; cad, _ := models.NewCadencedModelFromPeriod(period)" + }, + { + "name": "Reversible Apply/Restore rate-card math", + "description": "SubscriptionAddonRateCard.Apply adds price/entitlement/discount onto a target RateCard; Restore subtracts the exact same amounts. They must stay inverse and validate compatibility first.", + "example": "productcatalog.NewRateCardWithOverlay(a.AddonRateCard.RateCard, target).ValidateWith(ValidateRateCardsShareSameKey, ...)" + }, + { + "name": "ChangeMeta-only mutation of rate cards", + "description": "All rate-card edits go through target.ChangeMeta(func(m RateCardMeta) (RateCardMeta, error){...}); target must be a non-nil pointer (checked via reflect) and annotations must be non-nil.", + "example": "return target.ChangeMeta(func(m productcatalog.RateCardMeta) (productcatalog.RateCardMeta, error) { ... })" + }, + { + "name": "Boolean-entitlement counting via AnnotationParser", + "description": "Stacked boolean entitlements are tracked by an annotation count (subscription.AnnotationParser Get/SetBooleanEntitlementCount); metered entitlements sum/subtract IssueAfterReset treating nil as 0.", + "example": "count := subscription.AnnotationParser.GetBooleanEntitlementCount(annotations); annotations, _ = subscription.AnnotationParser.SetBooleanEntitlementCount(annotations, count+1)" + }, + { + "name": "Validate() collecting errors.Join", + "description": "Input Validate() methods append to var errs []error and return errors.Join(errs...) (or models.NewNillableGenericValidationError), never first-error-return.", + "example": "if i.AddonID == \"\" { errs = append(errs, errors.New(\"addonID is required\")) }; return errors.Join(errs...)" + }, + { + "name": "Customer-scoped marshaler.Event pair", + "description": "CreatedEvent and ChangeQuantityEvent are aliases of a shared event struct; Source is the subscriptionAddon resource path, Subject is the customer path, UserID from session.GetSessionUserID(ctx).", + "example": "Source: metadata.ComposeResourcePath(ns, metadata.EntitySubscriptionAddon, id), Subject: metadata.ComposeResourcePath(ns, metadata.EntityCustomer, customer.ID)" + } + ], + "key_file_guides": [ + { + "file": "addon.go", + "role": "SubscriptionAddon aggregate + GetInstances/GetInstanceAt deriving instances from the quantity timeline; CreateSubscriptionAddonInput.Validate.", + "watch_for": "Deleted addons truncate quantities via .Before(*DeletedAt); the several 'this should never happen' guards return empty rather than panicking." + }, + { + "file": "extend.go", + "role": "SubscriptionAddonRateCard.Apply / Restore \u2014 the core price/entitlement/discount fold and unfold math.", + "watch_for": "Apply and Restore must remain exact inverses; Restore guards against negative flat amounts/IssueAfterReset; FeatureID validation intentionally disabled (FIXME OM-1337)." + }, + { + "file": "quantity.go", + "role": "SubscriptionAddonQuantity (ActiveFrom+Quantity) and AsTimed() adapter into timeutil.Timed.", + "watch_for": "Quantity may be 0 in a segment but CreateSubscriptionAddonInput rejects an initial quantity of 0." + }, + { + "file": "instance.go", + "role": "SubscriptionAddonInstance \u2014 virtual effective addon for a CadencedModel period, embeds CadencedModel.", + "watch_for": "Instances are computed, never persisted; merging quantity with Addon happens in GetInstances." + }, + { + "file": "events.go", + "role": "CreatedEvent / ChangeQuantityEvent definitions and constructors.", + "watch_for": "Event names are versioned (subscriptionaddon.created v1); changing them breaks the consumer contract." + }, + { + "file": "repository.go", + "role": "SubscriptionAddonRepository + SubscriptionAddonQuantityRepository interfaces and their input types.", + "watch_for": "Quantity repo only has Create \u2014 quantity is append-only, there is no Update/Delete." + }, + { + "file": "service.go", + "role": "Service interface (Create/Get/List/ChangeQuantity), OrderBy enum, list/get input validation.", + "watch_for": "ListSubscriptionAddonsInput requires SubscriptionID; GetSubscriptionAddonInput supports lookup by ID or by subscription+addon." + }, + { + "file": "ratecard.go", + "role": "Thin wrapper of addon.RateCard as SubscriptionAddonRateCard.", + "watch_for": "All rate-card behavior lives in extend.go, not here." + } + ], + "anti_patterns": [ + "Mutating a RateCard outside target.ChangeMeta or passing a non-pointer / nil annotations (Apply/Restore reject via reflect checks).", + "Making Apply and Restore non-inverse \u2014 restoring must subtract exactly what apply added and error on negative results.", + "Updating or deleting a quantity row instead of appending a new (ActiveFrom, Quantity) segment.", + "Deriving instance end times from stored fields instead of timeline open periods (GetInstances).", + "Indexing the boolean-entitlement count with raw annotation keys instead of subscription.AnnotationParser." + ], + "decisions": [ + { + "decision": "Quantity is an append-only timeline; effective instances are computed from open periods at read time.", + "rationale": "Preserves full history for billing/proration and avoids destructive in-place edits." + }, + { + "decision": "Addon effects on rate cards are expressed as a reversible Apply/Restore pair.", + "rationale": "Lets the workflow layer re-sync the full before/after addon set via diffs and cleanly undo an addon." + }, + { + "decision": "Stacked boolean entitlements counted via annotations rather than duplicate templates.", + "rationale": "A rate card can hold only one entitlement template, so count tracks how many addons contributed it." + } + ], + "code_examples": [ + { + "scenario": "Folding an addon's flat price onto a target rate card", + "code": "return target.ChangeMeta(func(m productcatalog.RateCardMeta) (productcatalog.RateCardMeta, error) {\n aMeta := a.AddonRateCard.AsMeta()\n tMeta := m.Clone()\n if aMeta.Price != nil && tMeta.Price.Type() == productcatalog.FlatPriceType {\n tFlat, _ := tMeta.Price.AsFlat()\n aFlat, _ := aMeta.Price.AsFlat()\n m.Price = productcatalog.NewPriceFrom(productcatalog.FlatPrice{Amount: tFlat.Amount.Add(aFlat.Amount), PaymentTerm: tFlat.PaymentTerm})\n }\n return m, nil\n})" + } + ] + }, + "openmeter/subscription/hooks": { + "purpose": "Structural folder for subscription command hooks \u2014 cross-cutting side effects that run around subscription mutations. Currently holds only annotations/, the hook that repairs the previous/superseding subscription cross-link annotations on delete.", + "patterns": [ + { + "name": "SubscriptionCommandHook via embedding", + "description": "Hooks embed subscription.NoOpSubscriptionCommandHook and override only the lifecycle method they need (e.g. BeforeDelete), keeping the full interface satisfied.", + "example": "type hook struct { subscription.NoOpSubscriptionCommandHook; ... }" + }, + { + "name": "Constructor dependency validation", + "description": "Each hook's constructor checks non-nil deps and an injected *slog.Logger and returns an error rather than using slog.Default().", + "example": "if logger == nil { return nil, errors.New(\"logger is required\") }" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Implementing a hook without embedding NoOpSubscriptionCommandHook, breaking the subscription.SubscriptionCommandHook contract.", + "Putting uniqueness/overlap validation here \u2014 that belongs in validators/, hooks are for side effects and link repair.", + "Falling back to slog.Default() instead of requiring an injected logger." + ], + "decisions": [ + { + "decision": "Annotation-link cleanup runs as a BeforeDelete hook rather than inline in the service.", + "rationale": "Keeps the doubly-linked-list repair out of the core mutation path and reusable across delete callers." + } + ], + "code_examples": [] + }, + "openmeter/subscription/validators": { + "purpose": "Structural folder for subscription-invariant validators injected into other services. customer/ gates customer mutations (subject-key change, delete) on active subscriptions; subscription/ enforces the per-feature vs per-subscription uniqueness/overlap rule as a command hook.", + "patterns": [ + { + "name": "Interface via Noop embedding", + "description": "customer validators embed customer.NoopRequestValidator; subscription validators embed subscription.NoOpSubscriptionCommandHook \u2014 override only the relevant methods so the contract stays satisfied.", + "example": "type validator struct { customer.NoopRequestValidator; ... }" + }, + { + "name": "clock.Now() for active-subscription checks", + "description": "Active-subscription presence is checked via List with ActiveAt=clock.Now() (never time.Now()) so frozen-time tests stay deterministic.", + "example": "svc.List(ctx, customer.ListSubscriptionsInput{ActiveAt: clock.Now()})" + }, + { + "name": "Feature-flag-driven uniqueness scope", + "description": "validateUniqueConstraint routes to ByFeatures or BySubscriptions based on the MultiSubscriptionEnabled feature flag; callers must never call the branch functions directly.", + "example": "if ff.MultiSubscriptionEnabled { ...BySubscriptions } else { ...ByFeatures }" + }, + { + "name": "Typed precondition/not-found errors", + "description": "State violations return models.NewGeneric*Error (precondition/not-found/conflict) so the HTTP layer maps them to status codes.", + "example": "return models.NewGenericPreConditionFailedError(...)" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Adding validation methods without embedding the relevant Noop base, breaking the validator/hook interface assertion.", + "Using time.Now() instead of clock.Now() for ActiveAt checks.", + "Loading candidate subscriptions with a fixed page instead of pagination.CollectAll.", + "Forgetting to exclude the current subscription on update/continue, falsely flagging a self-overlap.", + "Returning plain errors for deleted/not-found/conflict states instead of models.NewGeneric*Error." + ], + "decisions": [ + { + "decision": "Subject-key mutation and customer delete are gated on active subscriptions.", + "rationale": "Keeps usage attribution stable for billing while a subscription is live." + }, + { + "decision": "Uniqueness/overlap is enforced as a SubscriptionCommandHook with separate Before and After passes.", + "rationale": "Lets the invariant guard every mutation path uniformly instead of being duplicated inline in the service." + } + ], + "code_examples": [] + }, + "openmeter/subscription/workflow": { + "purpose": "Orchestration layer (package subscriptionworkflow) above the subscription/addon/customer services: defines the Service interface (CreateFromPlan, EditRunning, ChangeToPlan, Restore, AddAddon, ChangeAddonQuantity) and shared helpers. service/ holds the concrete spec-centric, single-transaction implementation; this root holds the interface, input types, error mapping, and edit annotations.", + "patterns": [ + { + "name": "Spec-centric workflow signatures", + "description": "All methods take/return subscription.SubscriptionView, Spec, Patch, Timing or Plan \u2014 never raw DB rows. Mutations flow view -> AsSpec -> patch -> Update -> re-read view.", + "example": "EditRunning(ctx, subscriptionID models.NamespacedID, customizations []subscription.Patch, timing subscription.Timing) (subscription.SubscriptionView, error)" + }, + { + "name": "Domain-error mapping at the boundary", + "description": "MapSubscriptionErrors translates SpecValidationError -> GenericValidationError and AlignmentError -> GenericConflictError before returning to callers.", + "example": "if sErr, ok := lo.ErrorsAs[*subscription.SpecValidationError](err); ok { return models.NewGenericValidationError(sErr) }" + }, + { + "name": "Validate() on workflow inputs", + "description": "Input structs (AddAddonWorkflowInput, ChangeAddonQuantityWorkflowInput) implement Validate(); AddAddon requires AddonID and InitialQuantity > 0.", + "example": "if i.InitialQuantity <= 0 { return errors.New(\"initialQuantity must be greater than 0\") }" + }, + { + "name": "Edit-patch unique annotation stamping", + "description": "AnnotationParser.SetUniquePatchID stamps a ulid under subscription.workflow.patchid so edits are idempotently identifiable.", + "example": "annotations[AnnotationEditUniqueKey] = ulid.Make().String()" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service interface and all workflow input structs (Create/Change/AddAddon/ChangeAddonQuantity).", + "watch_for": "ChangeToPlan returns both the cancelled current Subscription and the new SubscriptionView \u2014 plan change is cancel+create, not in-place." + }, + { + "file": "errors.go", + "role": "MapSubscriptionErrors translating spec/alignment errors into client-facing models errors.", + "watch_for": "Use this at the workflow boundary; don't leak raw SpecValidationError/AlignmentError to handlers." + }, + { + "file": "annotations.go", + "role": "AnnotationParser.SetUniquePatchID for edit idempotency.", + "watch_for": "Allocates the annotations map if nil; do not assume the input map is non-nil." + } + ], + "anti_patterns": [ + "Persisting or calling underlying services outside a single transaction.Run wrapper \u2014 breaks atomicity of multi-step workflows.", + "Mutating a SubscriptionView's items directly instead of view.AsSpec() -> spec mutation -> Service.Update.", + "Editing a subscription that has addons via EditRunning instead of rejecting with NewGenericForbiddenError.", + "Returning raw spec/alignment errors instead of routing through MapSubscriptionErrors.", + "Hand-patching addon items instead of building addondiff.Diffable and re-syncing the full before/after addon set." + ], + "decisions": [ + { + "decision": "Workflows are spec-centric and each wraps its steps in one transaction.Run.", + "rationale": "Multi-step composition of subscription/addon/customer services must be atomic and validated against the spec model." + }, + { + "decision": "Plan changes are cancel-current + create-new with linked annotations.", + "rationale": "Avoids fragile in-place mutation of a live subscription and preserves history/linkage." + } + ], + "code_examples": [ + { + "scenario": "Mapping subscription domain errors at the workflow boundary", + "code": "func MapSubscriptionErrors(err error) error {\n if err == nil { return nil }\n if sErr, ok := lo.ErrorsAs[*subscription.SpecValidationError](err); ok {\n return models.NewGenericValidationError(sErr)\n } else if sErr, ok := lo.ErrorsAs[*subscription.AlignmentError](err); ok {\n return models.NewGenericConflictError(sErr)\n }\n return err\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w36.json b/.archie/enrichments/w36.json new file mode 100644 index 0000000000..e5a35a0f3f --- /dev/null +++ b/.archie/enrichments/w36.json @@ -0,0 +1,106 @@ +{ + "openmeter/watermill/driver/kafka": { + "purpose": "Kafka transport driver for Watermill, building Sarama-backed publishers and subscribers from app config. Wraps watermill-kafka with OpenMeter-specific concerns: CloudEvent partition keys, SASL/SCRAM auth, Sarama logging redirection, topic provisioning, and OTel metrics via the metrics/ subpackage.", + "patterns": [ + { + "name": "Options struct with Validate() then constructor", + "description": "Each public constructor (NewPublisher, NewSubscriber) takes an Options struct embedding BrokerOptions and calls in.Validate() first thing, returning an error before building any Sarama/Watermill object.", + "example": "func NewSubscriber(in SubscriberOptions) (message.Subscriber, error) { if err := in.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Centralized Sarama config via createKafkaConfig(role)", + "description": "All Sarama config (SASL, TLS, metric registry, producer retries, logger) is built in BrokerOptions.createKafkaConfig(role) and handed to watermill via OverwriteSaramaConfig. role is 'publisher' or 'subscriber' and is required.", + "example": "saramaConfig, err := in.Broker.createKafkaConfig(\"publisher\")" + }, + { + "name": "Injected dependencies, no global fallbacks", + "description": "BrokerOptions requires a non-nil *slog.Logger and otelmetric.Meter; Validate() rejects nil. Logger is passed to watermill via watermill.NewSlogLogger and to the metrics registry via metrics.LoggingErrorHandler(o.Logger).", + "example": "if o.Logger == nil { return errors.New(\"logger is required\") }" + }, + { + "name": "CloudEvent subject becomes Kafka partition key", + "description": "AddPartitionKeyFromSubject copies cloudEvent.Subject() into message metadata under PartitionKeyMetadataKey; marshalerWithPartitionKey then promotes that metadata to kafkaMsg.Key and strips the header. Publisher uses marshalerWithPartitionKey{} as Marshaler.", + "example": "watermillIn.Metadata[PartitionKeyMetadataKey] = cloudEvent.Subject()" + }, + { + "name": "Sarama global logger redirected to slog adaptor", + "description": "createKafkaConfig sets sarama.Logger and sarama.DebugLogger to SaramaLoggerAdaptor wrapping o.Logger.Info / .Debug. DebugLogger must always be set or debug logs fall back onto the info Logger.", + "example": "sarama.DebugLogger = &SaramaLoggerAdaptor{loggerFunc: logger.Debug}" + }, + { + "name": "Metric name transform via SaramaMetricRenamer(role)", + "description": "Metrics are prefixed 'sarama.', tagged with a role attribute, and high-cardinality/low-value series (for-broker, for-topic, protocol-requests-rate, compression-) are dropped via TransformedMetric.Drop=true.", + "example": "ErrorHandler: metrics.LoggingErrorHandler(o.Logger), NameTransformFn: SaramaMetricRenamer(role)" + }, + { + "name": "Topic provisioning before publisher returns", + "description": "NewPublisher calls in.TopicProvisioner.Provision(ctx, in.ProvisionTopics...) before constructing the kafka.Publisher, so topics exist before the first publish.", + "example": "if err = in.TopicProvisioner.Provision(ctx, in.ProvisionTopics...); err != nil { return nil, err }" + } + ], + "key_file_guides": [ + { + "file": "broker.go", + "role": "BrokerOptions + createKafkaConfig(role): the single place all Sarama config is assembled (SASL/SCRAM, TLS, metric registry, producer settings, loggers).", + "watch_for": "ApiVersionsRequest is deliberately false (log-flood workaround); TLS Config left as &tls.Config{} because Sarama breaks on forced TLS 1.3; producer MaxMessageBytes is 2MB. Don't reintroduce these as defaults blindly." + }, + { + "file": "publisher.go", + "role": "NewPublisher: builds watermill kafka.Publisher with marshalerWithPartitionKey and the OTel Sarama tracer; provisions topics.", + "watch_for": "kafka.NewOTELSaramaTracer() relies on the GLOBAL trace provider, not an injected one." + }, + { + "file": "subscriber.go", + "role": "NewSubscriber: builds watermill kafka.Subscriber bound to a required ConsumerGroupName.", + "watch_for": "Consumer.MaxProcessingTime is hardcoded to 5m (defaultMaxProcessingTime) to avoid partition reassignment; uses DefaultMarshaler (no partition-key handling on the consume side)." + }, + { + "file": "marshaler.go", + "role": "marshalerWithPartitionKey + AddPartitionKeyFromSubject: maps a CloudEvent subject to the Kafka message key.", + "watch_for": "PartitionKeyMetadataKey header is filtered out of the outgoing message after being promoted to Key; changing the key derivation changes partition assignment / ordering guarantees." + }, + { + "file": "metrics.go", + "role": "SaramaMetricRenamer(role): returns the name-transform fn consumed by the metrics subpackage registry.", + "watch_for": "ingorePrefixes drops whole metric families; for-broker/for-topic are dropped to avoid high cardinality. New metrics must avoid matching these drop rules." + }, + { + "file": "saslscram.go", + "role": "XDGSCRAMClient (Begin/Step/Done) + SHA256/SHA512 hash generators, vendored from the Sarama example for SCRAM auth.", + "watch_for": "Wired only when SecurityProtocol == 'SASL_SSL' and SaslMechanisms is SCRAM-SHA-256/512 in createKafkaConfig." + }, + { + "file": "logger.go", + "role": "SaramaLoggerAdaptor: bridges Sarama's Print/Printf/Println logger interface to a single LoggerFunc.", + "watch_for": "Thin fmt.Sprint/Sprintf bridge; level (Info vs Debug) is chosen by which slog method is bound at construction in broker.go." + } + ], + "anti_patterns": [ + "Constructing Sarama config outside createKafkaConfig(role) \u2014 bypasses SASL/TLS/metrics/logger wiring and the role suffix on ClientID.", + "Using slog.Default() instead of the injected BrokerOptions.Logger; Validate() exists specifically to forbid nil loggers/meters.", + "Skipping in.Validate() in a new constructor before touching Sarama/Watermill objects.", + "Setting only sarama.Logger and not sarama.DebugLogger \u2014 debug output then floods the info logger.", + "Adding partition-key logic on the subscriber path; only the publisher uses marshalerWithPartitionKey, the subscriber uses DefaultMarshaler." + ], + "decisions": [ + { + "decision": "OverwriteSaramaConfig injects a fully custom Sarama config into watermill-kafka rather than relying on watermill defaults.", + "rationale": "OpenMeter needs control over SASL/SCRAM, TLS quirks, the OTel metric registry, producer message size, and Sarama's global loggers \u2014 none expressible through watermill's surface." + }, + { + "decision": "Partition key is derived from the CloudEvent subject and carried through message metadata.", + "rationale": "Guarantees per-subject (e.g. per-customer/meter) ordering and co-location across partitions for usage events." + }, + { + "decision": "ApiVersionsRequest disabled and TLS left at library defaults instead of forcing 1.3.", + "rationale": "Documented workarounds for known Sarama bugs (ApiVersionsRequest V3 log floods; TLS 1.3 'protocol version not supported')." + } + ], + "code_examples": [ + { + "scenario": "Build a Kafka publisher that partitions by CloudEvent subject", + "code": "import (\n\tpkgkafka \"github.com/openmeterio/openmeter/pkg/kafka\"\n\twmkafka \"github.com/openmeterio/openmeter/openmeter/watermill/driver/kafka\"\n)\n\npub, err := wmkafka.NewPublisher(ctx, wmkafka.PublisherOptions{\n\tBroker: wmkafka.BrokerOptions{\n\t\tKafkaConfig: cfg.Kafka,\n\t\tClientID: \"openmeter\",\n\t\tLogger: logger,\n\t\tMetricMeter: meter,\n\t},\n\tProvisionTopics: []pkgkafka.TopicConfig{ /* ... */ },\n\tTopicProvisioner: provisioner,\n})\nif err != nil { return err }\n\n// later, when emitting a CloudEvent:\nmsg, _ = wmkafka.AddPartitionKeyFromSubject(msg, cloudEvent)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w37.json b/.archie/enrichments/w37.json new file mode 100644 index 0000000000..30cf665814 --- /dev/null +++ b/.archie/enrichments/w37.json @@ -0,0 +1,190 @@ +{ + "pkg/models": { + "purpose": "The codebase's most-depended-on utility package (229 in-edges): shared domain primitives (ManagedModel/NamespacedModel/CadencedModel/Metadata/Annotations/Percentage), the canonical error taxonomy (Generic*Error + Validate() aggregation), and the ValidationIssue/FieldDescriptor system that maps Go error trees into RFC-7807 API problems. Almost every domain package embeds these types, so signatures here are effectively frozen public API.", + "patterns": [ + { + "name": "Generic error constructor + Is* checker pairs", + "description": "Each error class is a struct wrapping `err error` with `Error()`/`Unwrap()`, plus a `NewError` constructor and an `IsError(err) bool` using `errors.As`, asserting `var _ GenericError = (*X)(nil)`. New error categories must follow this triad.", + "example": "NewGenericValidationError(err) / IsGenericValidationError(err) in errors.go" + }, + { + "name": "Validate() aggregates with errors.Join then NewNillableGenericValidationError", + "description": "Validate() collects into `var errs []error`, wraps field context with `fmt.Errorf(\"field: %w\", err)`, and returns `models.NewNillableGenericValidationError(errors.Join(errs...))` (nil-safe). NamespacedIDOrKey.Validate is the in-package example.", + "example": "return NewNillableGenericValidationError(errors.Join(errs...))" + }, + { + "name": "ValidationIssue built only through options", + "description": "ValidationIssue has all-private fields; construct via NewValidationIssue/NewValidationError/NewValidationWarning and refine with immutable `.With*` methods (WithField, WithAttr, WithSeverity) which Clone first. Never set fields directly outside the package.", + "example": "NewValidationError(code, msg).WithField(NewFieldSelector(\"x\"))" + }, + { + "name": "Error-tree to ValidationIssues mapping", + "description": "AsValidationIssues walks an error tree: componentWrapper/fieldPrefixedWrapper add context, leaf ValidationIssues are collected, and unknown leaves under a wrapper become critical issues. Use ErrorWithFieldPrefix / ErrorWithComponent to attach path/component context that survives the walk.", + "example": "AsValidationIssues(errIn) in validationissue.go" + }, + { + "name": "Cadenced time-interval model (inclusive-from, exclusive-to)", + "description": "CadencedModel{ActiveFrom, *ActiveTo} is the standard active-period type; ActiveTo nil means open-ended, ActiveTo==ActiveFrom means never active. Implement CadenceComparable.GetCadence() to use CadenceList overlap/continuity helpers.", + "example": "CadencedModel.IsActiveAt(t) \u2014 from inclusive, to exclusive" + }, + { + "name": "Immutable map-types with Clone/Merge/Equal", + "description": "Metadata (map[string]string) and Annotations (map[string]interface{}) provide Clone (deep for Annotations via brunoga/deep, shallow maps.Clone for Metadata), Merge (right wins, returns new map), and Equal. Treat them as value types; mutate copies, not inputs.", + "example": "Annotations.Merge clones via deep.Copy so inputs are never mutated" + }, + { + "name": "Marker-interface sealing", + "description": "Cadenced and Metadatad use unexported marker methods (cadenced()/annotated() returning private marker types) so only in-package types can satisfy them. Don't implement these externally; embed CadencedModel/MetadataModel instead.", + "example": "type cadencedMarker bool; func (c CadencedModel) cadenced() cadencedMarker" + } + ], + "key_file_guides": [ + { + "file": "errors.go", + "role": "Generic error taxonomy (NotFound/Conflict/Forbidden/Validation/NotImplemented/...) + ErrorWithFieldPrefix/ErrorWithComponent + ErrorSeverity enum.", + "watch_for": "Severity is inverted: lower numeric value = MORE severe (Critical=0, Warning=1); WithSeverityOrHigher filters with `<=`." + }, + { + "file": "validationissue.go", + "role": "ValidationIssue value type, option functions, ValidationIssues slice, AsValidationIssues/EncodeValidationIssues error-tree mapping.", + "watch_for": "ValidationIssue is not comparable (map attributes) so it implements Is() in addition to Unwrap(); WithAttr panics on nil/non-comparable keys." + }, + { + "file": "model.go", + "role": "ManagedModel/NamespacedModel/ManagedResource/ManagedUniqueResource/VersionedModel base structs embedded across all domains; Address/CountryCode.", + "watch_for": "NewManagedResource forces all timestamps to .UTC(); IsDeleted uses clock.Now() (mockable in tests)." + }, + { + "file": "fielddescriptor.go", + "role": "Tree-backed field path builder producing both human String() and JSONPath() for ValidationIssue.field; uses pkg/treex.", + "watch_for": "With*/WithPrefix return clones (value receiver + ShallowClone); the original argument is never mutated \u2014 chain the return value." + }, + { + "file": "fieldexpression.go", + "role": "FieldExpression impls: FieldAttrValue, MultiFieldAttrValue, FieldArrIndex, WildCard \u2014 render as [key=value] / JSONPath [?(@.key=='value')].", + "watch_for": "valueString() emits \"!UNSUPPORTED\" for value types other than numbers/string/Stringer." + }, + { + "file": "cadence.go / cadencelist.go", + "role": "CadencedModel period type and CadenceList[T] for overlap/sort/continuity validation over CadenceComparable items.", + "watch_for": "GetOverlaps/IsContinuous assume a SORTED list (NewSortedCadenceList); TODOs flag intent to migrate to timeutil.OpenPeriod." + }, + { + "file": "annotation.go / metadata.go / attributes.go", + "role": "Map-backed value types: Annotations (deep clone), Metadata (string map), Attributes (any keys, AsStringMap for serialization).", + "watch_for": "Annotations.GetInt rejects non-whole floats; Metadata.Merge returns nil when both sides empty." + }, + { + "file": "servicehook.go", + "role": "Generic ServiceHookRegistry[T] / ServiceHook[T] lifecycle hooks (Pre/Post Create/Update/Delete) + NoopServiceHook.", + "watch_for": "Registry uses a per-instance context-value loop guard so re-entrant hook calls short-circuit silently; register via RegisterHooks, never mutate .hooks." + } + ], + "anti_patterns": [ + "Returning on the first validation failure instead of collecting into errs and returning NewNillableGenericValidationError(errors.Join(...)).", + "Setting ValidationIssue fields directly or building one without the option constructors \u2014 fields are private and With* must Clone.", + "Treating ErrorSeverity numerically backwards (Critical is the lowest value, not the highest).", + "Mutating an Annotations/Metadata/Attributes argument in place instead of using Clone/Merge which return fresh maps.", + "Implementing the Cadenced/Metadatad marker interfaces externally rather than embedding CadencedModel/MetadataModel." + ], + "decisions": [ + { + "decision": "Centralize the Generic*Error taxonomy + Is* helpers here", + "rationale": "Lets every layer map domain errors to HTTP status codes uniformly without per-package error types, keeping the v3 apierrors mapping table small." + }, + { + "decision": "Model field paths as a treex tree behind FieldDescriptor", + "rationale": "One builder yields both a readable string and a valid RFC-9535 JSONPath, so ValidationIssue.field is machine-queryable in API responses and prefixing nested errors composes cleanly." + }, + { + "decision": "ValidationIssue is immutable value-with-options", + "rationale": "Allows safe sharing, errors.Is comparison via Equal, and prefix/component enrichment while walking arbitrary error trees in AsValidationIssues." + } + ], + "code_examples": [ + { + "scenario": "Standard Validate() returning aggregated, field-prefixed validation issues", + "code": "func (x Input) Validate() error {\n\tvar errs []error\n\tif x.Namespace == \"\" {\n\t\terrs = append(errs, errors.New(\"namespace is required\"))\n\t}\n\tif err := x.Inner.Validate(); err != nil {\n\t\terrs = append(errs, fmt.Errorf(\"inner: %w\", err))\n\t}\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "pkg/pagination": { + "purpose": "Offset/limit (v1) pagination primitives used by ~119 packages: Page{PageSize,PageNumber}, Result[T] page wrapper with custom JSON flattening, a closure-backed Paginator[T] interface, and CollectAll to drain all pages. The newer cursor/keyset model lives in the pkg/pagination/v2 sub-package.", + "patterns": [ + { + "name": "Page is 1-based with derived Offset/Limit", + "description": "PageNumber starts at 1; Offset()=PageSize*(PageNumber-1), Limit()=PageSize. Validate() rejects negative size and PageNumber<1. Build via NewPage / NewPageFromRef (nil-pointer-safe for query params).", + "example": "page.Offset() / page.Limit() in page.go feed SQL OFFSET/LIMIT" + }, + { + "name": "Paginator via NewPaginator closure, not a custom struct", + "description": "Wrap a `func(ctx, Page) (Result[T], error)` in NewPaginator[T]; the unexported paginator struct satisfies Paginator[T]. Never define a new Paginator implementation struct.", + "example": "NewPaginator[int](func(ctx, page) (Result[int], error){...})" + }, + { + "name": "Result JSON flattens Page fields", + "description": "Result.MarshalJSON hoists PageSize/PageNumber to top-level and emits `{pageSize,page,totalCount,items}` in that exact order (field ordering is test-enforced). Result tags Page with json:\"-\".", + "example": "Result[int] marshals to {\"pageSize\":10,\"page\":1,\"totalCount\":3,\"items\":[...]}" + }, + { + "name": "Map results with MapResult / MapResultErr", + "description": "Transform Result[In] to Result[Out] preserving Page+TotalCount via MapResult (pure) or MapResultErr (fallible mapper). Use these in httpdriver layers rather than rebuilding Result manually.", + "example": "pagination.MapResult(domainResult, ToAPIThing)" + }, + { + "name": "CollectAll is bounded and not partial-tolerant", + "description": "CollectAll drains pages until a short page, capped at MAX_SAFE_ITER (10_000) pages, and returns nil items on ANY error (unlike v2.CollectAll). Pass the real page size used by the paginator.", + "example": "CollectAll(ctx, paginator, pageSize) \u2014 short page ends the loop" + } + ], + "key_file_guides": [ + { + "file": "page.go", + "role": "Page struct, NewPage/NewPageFromRef, Offset/Limit/Validate/IsZero, InvalidError.", + "watch_for": "PageNumber is 1-based; Offset underflows to negative if you pass PageNumber=0 \u2014 always Validate or use NewPageFromRef defaults." + }, + { + "file": "result.go", + "role": "Result[T] with custom MarshalJSON flattening + MapResult/MapResultErr converters.", + "watch_for": "JSON key order is asserted in pagination_test.go; changing MarshalJSON field order breaks the test and API contract." + }, + { + "file": "pagination.go", + "role": "Paginator[T] interface + NewPaginator closure factory.", + "watch_for": "Only the closure form is supported; the concrete paginator type is unexported." + }, + { + "file": "collect.go", + "role": "CollectAll drains a Paginator across pages with a 10_000-page safety cap.", + "watch_for": "Returns nil (not the partial slice) on error or when MAX_SAFE_ITER is exceeded; v2's CollectAll behaves differently." + } + ], + "anti_patterns": [ + "Treating PageNumber as 0-based \u2014 Offset() assumes 1-based and goes negative otherwise.", + "Reordering or adding fields in Result.MarshalJSON without updating the order-enforcing test and API consumers.", + "Defining a bespoke Paginator[T] implementation instead of NewPaginator.", + "Assuming CollectAll returns the items gathered so far on error \u2014 it returns nil.", + "Using this offset/limit model where keyset/cursor semantics are needed \u2014 that is pkg/pagination/v2." + ], + "decisions": [ + { + "decision": "Result flattens Page into the JSON envelope", + "rationale": "Keeps the wire shape a single flat object {pageSize,page,totalCount,items} matching the OpenAPI paginated response, while Result stays a typed struct internally." + }, + { + "decision": "Paginator is a closure-backed generic interface", + "rationale": "Lets any repo expose pagination by supplying one function, enabling generic helpers like CollectAll/MapResult without per-entity boilerplate." + }, + { + "decision": "Keep v1 offset pagination separate from v2 cursor pagination", + "rationale": "Offset/limit and keyset cursors have incompatible state and guarantees; splitting them avoids mixing Page-based and Cursor-based APIs in one package." + } + ], + "code_examples": [ + { + "scenario": "Expose a repo result as a Paginator and drain it", + "code": "p := pagination.NewPaginator[Item](func(ctx context.Context, page pagination.Page) (pagination.Result[Item], error) {\n\trows, total, err := repo.list(ctx, page.Offset(), page.Limit())\n\tif err != nil {\n\t\treturn pagination.Result[Item]{}, err\n\t}\n\treturn pagination.Result[Item]{Page: page, TotalCount: total, Items: rows}, nil\n})\nall, err := pagination.CollectAll(ctx, p, 100)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w38.json b/.archie/enrichments/w38.json new file mode 100644 index 0000000000..ba4b961b83 --- /dev/null +++ b/.archie/enrichments/w38.json @@ -0,0 +1,186 @@ +{ + "cmd/jobs/ledger/backfillaccounts": { + "purpose": "Cobra subcommand (`backfill-accounts`) of the `jobs` binary that provisions customer and business ledger accounts for the default namespace. It is the wiring/CLI shell that constructs a concrete ledger account-resolver stack and delegates all logic to `cmd/jobs/ledger/service.Service.Run`.", + "patterns": [ + { + "name": "Cobra command + RunE delegation", + "description": "Expose a package-level `var Cmd = &cobra.Command{...}` with flags bound in `init()` and a `RunE` that builds the service, reads `internal.App.NamespaceManager.GetDefaultNamespace()`, calls `service.Run`, prints a summary, and returns a non-nil error when `FailureCount > 0`.", + "example": "Cmd.RunE calls newService(), then service.Run(cmd.Context(), ledgerbackfillservice.RunInput{...})" + }, + { + "name": "Concrete resolver stack construction (bypass wired DI)", + "description": "Build the ledger account stack manually from adapters/services because the wired public account-resolver surface is narrowed and does not expose CreateCustomerAccounts: accountadapter.NewRepo -> accountservice.New(repo, locker) -> resolversadapter.NewRepo -> resolvers.NewAccountResolver(...).", + "example": "accountResolver := resolvers.NewAccountResolver(resolvers.AccountResolverConfig{AccountService: accountSvc, Repo: resolverRepo, Locker: locker})" + }, + { + "name": "Shared job runtime via internal.App", + "description": "Pull EntClient, Logger, and NamespaceManager from the shared `cmd/jobs/internal.App` rather than wiring a new application; construct a fresh `lockr.NewLocker` with `internal.App.Logger`.", + "example": "accountRepo := accountadapter.NewRepo(internal.App.EntClient)" + }, + { + "name": "RFC3339 flag parsing to UTC pointer", + "description": "Parse the `--created-before` string flag with `time.Parse(time.RFC3339, ...)`, normalize to UTC, and pass a `*time.Time` (nil when empty) into RunInput.CreatedBefore.", + "example": "parsed = parsed.UTC(); createdBeforeTime = &parsed" + } + ], + "key_file_guides": [ + { + "file": "backfillaccounts.go", + "role": "Defines `Cmd`, its flags (created-before, customer-page-size, dry-run, continue-on-error, include-deleted), `newService()` constructor, and `printSummary()`.", + "watch_for": "newService deliberately constructs the concrete resolver stack rather than using wired DI (the comment explains CreateCustomerAccounts is not on the public surface); do not replace it with the default wired resolver. printSummary is always called even on the error path before returning." + } + ], + "anti_patterns": [ + "Calling lower-level account adapters/services directly from the command instead of going through ledgerbackfillservice.Service.Run.", + "Using the wired/narrowed account resolver from DI (it lacks CreateCustomerAccounts) instead of the concrete resolvers.NewAccountResolver stack.", + "Defaulting customer-page-size to a literal here instead of ledgerbackfillservice.DefaultCustomerPageSize.", + "Swallowing FailureCount: RunE must return an error when output.Result.FailureCount > 0." + ], + "decisions": [ + { + "decision": "Build the concrete account+resolver stack in newService() instead of relying on Wire DI.", + "rationale": "The public wired account-resolver surface is intentionally narrowed and does not expose CreateCustomerAccounts, which the backfill requires." + } + ], + "code_examples": [] + }, + "cmd/jobs/ledger/service": { + "purpose": "Backend service for the ledger account backfill job. `Service.Run` paginates customers in a namespace and ensures business + per-customer ledger accounts exist, supporting dry-run, continue-on-error, created-before cutoff, and include-deleted modes; returns a `NamespaceResult` of counters.", + "patterns": [ + { + "name": "Config-validated service constructor", + "description": "`NewService(Config)` validates required dependencies (customerLister, accountProvisioner) via `Config.Validate()` and returns `(*Service, error)`; dependencies are unexported interfaces so tests can inject fakes.", + "example": "func NewService(cfg Config) (*Service, error) { if err := cfg.Validate(); err != nil {...} }" + }, + { + "name": "Interface-typed collaborators", + "description": "`customerLister` and `accountProvisioner` are local interfaces. accountProvisioner exposes Get/Create CustomerAccounts and Get/Ensure BusinessAccounts; the backfillaccounts command satisfies it with the concrete resolver.", + "example": "type accountProvisioner interface { CreateCustomerAccounts(ctx, customer.CustomerID) (ledger.CustomerAccounts, error); ... }" + }, + { + "name": "Validate + normalize input structs", + "description": "RunInput and ListCustomersInput both have `Validate() error`; RunInput also has `normalized()` that applies DefaultCustomerPageSize and forces CreatedBefore to UTC before use.", + "example": "input := in.normalized(); result, err := s.runNamespace(ctx, input, input.Namespace)" + }, + { + "name": "Cursor pagination with MAX_SAFE_ITER guard", + "description": "runNamespace loops up to paginationv2.MAX_SAFE_ITER, calling customerLister.ListCustomers with a *paginationv2.Cursor; breaks when items empty or NextCursor is nil, and records a paginate_customers failure if the loop never completes.", + "example": "for iter := 0; iter < paginationv2.MAX_SAFE_ITER; iter++ { ... cursor = res.NextCursor }" + }, + { + "name": "Missing-account detection via ValidationIssue codes", + "description": "ensureBusiness/CustomerAccounts call Get first; only ErrCodeBusinessAccountMissing / ErrCodeCustomerAccountMissing (matched by hasValidationIssueCode using models.AsValidationIssues) trigger provisioning. Any other error is a recorded failure.", + "example": "if !hasValidationIssueCode(err, ledger.ErrCodeCustomerAccountMissing) { return s.recordFailure(...) }" + }, + { + "name": "Counter accumulation + recordFailure", + "description": "All outcomes mutate a *NamespaceResult counter (BusinessProvisioned, CustomersWouldProvision, etc.). recordFailure increments FailureCount, logs a warn with namespace/stage/customer_id, and returns a stage-wrapped error.", + "example": "result.CustomersProvisioned++" + }, + { + "name": "DryRun short-circuits writes", + "description": "When input.DryRun is set, ensure* increments the *WouldProvision counter and returns before calling EnsureBusinessAccounts / CreateCustomerAccounts.", + "example": "if input.DryRun { result.CustomersWouldProvision++; return nil }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Core service: Config/RunInput/RunOutput/NamespaceResult types, NewService, Run -> runNamespace -> ensureBusinessAccounts/ensureCustomerAccounts, hasValidationIssueCode, recordFailure.", + "watch_for": "Get-before-provision relies on ledger missing-account validation codes; a non-validation error must NOT be treated as 'missing'. ContinueOnError returns (result, nil) at the Run level even on failures, so callers must inspect FailureCount." + }, + { + "file": "customer_lister_ent.go", + "role": "EntCustomerLister implementing customerLister via entClient.Customer.Query with namespace filter, optional deleted/created-before filters, and Cursor pagination.", + "watch_for": "Soft-delete filtering uses DeletedAtIsNil OR DeletedAtGTE(now) (clock.Now().UTC()); CreatedBefore uses CreatedAtLT with UTC. Nil items from paged.Items are skipped." + }, + { + "file": "service_test.go", + "role": "Table-style tests using fakeCustomerLister and fakeAccountProvisioner to cover dry-run, multi-page cursoring, created-before cutoff, and continue-on-error.", + "watch_for": "Fakes emit ledger.ErrCustomerAccountMissing/ErrBusinessAccountMissing.WithAttrs to drive the provisioning branch; tests use t.Context() and newCustomer() built from models.NewManagedResource." + } + ], + "anti_patterns": [ + "Treating any error from GetCustomerAccounts/GetBusinessAccounts as 'missing' instead of matching the specific validation issue code.", + "Writing accounts while DryRun is set, or incrementing provisioned counters in dry-run mode.", + "Removing the MAX_SAFE_ITER bound or breaking the cursor advance, risking an infinite pagination loop.", + "Returning early on the first customer failure when ContinueOnError is requested (Run/runNamespace must keep going and only accumulate FailureCount).", + "Using time without UTC normalization for CreatedBefore / cursor comparisons." + ], + "decisions": [ + { + "decision": "Detect missing accounts by inspecting validation issue codes on the Get error rather than a sentinel boolean.", + "rationale": "Reuses the ledger package's structured ErrCode* validation errors so provisioning only triggers on a genuine 'account missing' condition, not transient/db errors." + }, + { + "decision": "Counters are accumulated into NamespaceResult and surfaced via RunOutput even on error.", + "rationale": "Operational job needs a printable summary of scanned/provisioned/failed customers regardless of whether the run aborted or continued on error." + } + ], + "code_examples": [ + { + "scenario": "Ensure a single customer's ledger accounts (get-then-provision with dry-run + validation-code gating)", + "code": "func (s *Service) ensureCustomerAccounts(ctx context.Context, input RunInput, result *NamespaceResult, customerID customer.CustomerID) error {\n\t_, err := s.accountProvisioner.GetCustomerAccounts(ctx, customerID)\n\tif err == nil {\n\t\tresult.CustomersAlreadyProvisioned++\n\t\treturn nil\n\t}\n\tif !hasValidationIssueCode(err, ledger.ErrCodeCustomerAccountMissing) {\n\t\treturn s.recordFailure(result, \"get_customer_accounts\", customerID.ID, err)\n\t}\n\tif input.DryRun {\n\t\tresult.CustomersWouldProvision++\n\t\treturn nil\n\t}\n\tif _, err = s.accountProvisioner.CreateCustomerAccounts(ctx, customerID); err != nil {\n\t\treturn s.recordFailure(result, \"create_customer_accounts\", customerID.ID, err)\n\t}\n\tresult.CustomersProvisioned++\n\treturn nil\n}" + } + ] + }, + "pkg/framework/entutils/entmixinaccessor": { + "purpose": "An Ent codegen extension (entc.Extension) that injects a Go template generating Get() accessor methods for every field added to schemas via a mixin. It gives mixin-contributed fields (e.g. from ResourceMixin, AnnotationsMixin) uniform getters across all generated entities, so generic code can read shared fields without per-entity casts.", + "patterns": [ + { + "name": "entc.Extension via embedded template", + "description": "The extension is a struct embedding entc.DefaultExtension and overriding only Templates(), returning one gen.Template parsed from the embedded .tpl. New() returns *Extension. This matches the shape of sibling extensions (entcursor, entexpose, entpaginate, entsetorclear).", + "example": "type Extension struct { entc.DefaultExtension }; func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate(\"entmixinaccessor\").Parse(tmplfile))} }" + }, + { + "name": "Template embedded with //go:embed", + "description": "Template logic lives in mixinaccessor.tpl, pulled in via `//go:embed mixinaccessor.tpl` into `var tmplfile string` with a blank `_ \"embed\"` import. No template logic in Go string literals.", + "example": "//go:embed mixinaccessor.tpl\\nvar tmplfile string" + }, + { + "name": "MixedIn-gated generation", + "description": "The template emits a getter only when the field/ID position is MixedIn ({{- if and $f.Position $f.Position.MixedIn }}). Schema-native fields are skipped. ID is handled separately via $n.ID.Position.MixedIn because Ent exposes it as $n.ID, not in $n.Fields.", + "example": "{{- if and $f.Position $f.Position.MixedIn }}func (e *{{ $n.Name }}) Get{{ $f.StructField }}() ..." + }, + { + "name": "Nillable pointer-type fidelity", + "description": "Getters for Nillable fields return a pointer type (`{{ if $f.Nillable }}*{{ end }}{{ $f.Type }}`) to match the generated entity field, keeping the accessor signature identical to the struct field.", + "example": "func (e *X) GetDeletedAt() *time.Time { return e.DeletedAt }" + } + ], + "key_file_guides": [ + { + "file": "entmixinaccessor.go", + "role": "Extension definition: embeds the template, implements entc.Extension.Templates(), exposes New().", + "watch_for": "The gen.NewTemplate name (\"entmixinaccessor\") must match the {{ define \"entmixinaccessor\" }} block in the .tpl, or gen.MustParse panics at generate time." + }, + { + "file": "mixinaccessor.tpl", + "role": "Codegen template: ranges $.Nodes and $n.Fields, emits Get()/GetID() only for MixedIn positions, calls {{ template \"header\" $ }}.", + "watch_for": "Must invoke {{ template \"header\" $ }} for the standard ent header/package clause. Use $f.StructField (Go field name), not $f.Name (DB column)." + } + ], + "anti_patterns": [ + "Editing the generated Get*() methods in openmeter/ent/db/ directly \u2014 change this template and run `make generate`.", + "Inlining the template as a Go string literal instead of keeping it in mixinaccessor.tpl with //go:embed.", + "Generating getters for non-MixedIn (schema-native) fields, which would collide with other accessors.", + "Returning a value type for Nillable fields (or vice versa), breaking the signature contract with the entity field." + ], + "decisions": [ + { + "decision": "Implement accessor generation as a standalone entc extension wired in openmeter/ent/entc.go alongside entcursor/entexpose/entpaginate/entsetorclear.", + "rationale": "Mixin fields are shared across many entities; uniform Get() lets generic code read them without reflection, and an extension keeps it inside the single entc.Generate codegen pass." + }, + { + "decision": "Gate on Position.MixedIn rather than an explicit field-name list.", + "rationale": "Keeps the template self-maintaining: any new mixin field automatically gets a getter and schema-native fields are never accidentally shadowed." + } + ], + "code_examples": [ + { + "scenario": "Wiring the extension into the Ent codegen pass (openmeter/ent/entc.go)", + "code": "import \"github.com/openmeterio/openmeter/pkg/framework/entutils/entmixinaccessor\"\n\nentc.Generate(\"./schema\", &gen.Config{ /* ... */ },\n\tentc.Extensions(\n\t\tentcursor.New(),\n\t\tentexpose.New(),\n\t\tentmixinaccessor.New(),\n\t\tentpaginate.New(),\n\t\tentsetorclear.New(),\n\t),\n)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w39.json b/.archie/enrichments/w39.json new file mode 100644 index 0000000000..40dcdd334b --- /dev/null +++ b/.archie/enrichments/w39.json @@ -0,0 +1,89 @@ +{ + "pkg/framework/entutils/testutils/ent1": { + "purpose": "Self-contained Ent codegen package whose `schema/` fixture (Example1) generates a standalone `db/` client used to test entutils transaction/mixin helpers (TransactingRepo, TxDriver, TimeMixin) in isolation from the production openmeter schema set.", + "patterns": [ + { + "name": "Ignored-build codegen driver", + "description": "entc.go is a `//go:build ignore` main package invoked by `go generate`; it is never compiled into the package.", + "example": "//go:build ignore\npackage main\nfunc main() { entc.Generate(\"./schema\", &gen.Config{Target: \"./db\", ...}) }" + }, + { + "name": "Generate directive in package file", + "description": "generate.go carries the lone `//go:generate go run -mod=mod entc.go` directive; it is the only real source file in the package proper.", + "example": "package ent1\n//go:generate go run -mod=mod entc.go" + }, + { + "name": "Extension wiring stays in entc.go", + "description": "Cursor/expose/paginate extensions are registered here so the generated db client supports the same features the production client tests rely on.", + "example": "entc.Extensions(entcursor.New(), entexpose.New(), entpaginate.New())" + } + ], + "key_file_guides": [ + { + "file": "entc.go", + "role": "Ent codegen entrypoint: targets `./db`, enables FeatureVersionedMigration/Lock/Upsert/ExecQuery, registers entcursor/entexpose/entpaginate extensions.", + "watch_for": "Must keep the `//go:build ignore` tag and the full extension list \u2014 ent1 is the richer fixture (includes entpaginate, unlike ent2). Dropping an extension silently removes generated methods the entutils tests depend on." + }, + { + "file": "generate.go", + "role": "Holds the `package ent1` declaration and the `//go:generate` directive that runs entc.go.", + "watch_for": "Do not move the directive elsewhere or hand-edit the generated `db/`; regenerate via `make generate` / `go generate`." + } + ], + "anti_patterns": [ + "Hand-editing the generated db/ client instead of changing schema/ and regenerating.", + "Removing entpaginate/entcursor/entexpose from the extension list when the entutils tests need that generated surface \u2014 ent1 intentionally carries the full set.", + "Compiling entc.go into the package by removing its `//go:build ignore` tag." + ], + "decisions": [ + { + "decision": "Keep a tiny standalone Ent client separate from openmeter/ent.", + "rationale": "Lets entutils test its transaction and mixin helpers without importing the large production schema or risking import cycles." + }, + { + "decision": "ent1 is the feature-complete fixture (includes entpaginate).", + "rationale": "Provides a client exercising cursor + pagination + expose so those entutils sub-packages can be validated; ent2 is the leaner counterpart." + } + ], + "code_examples": [] + }, + "pkg/framework/entutils/testutils/ent2": { + "purpose": "Second standalone Ent codegen package (Example2 schema \u2192 `db/` client) used alongside ent1 so entutils transaction helpers can be tested across two independent generated clients; deliberately leaner than ent1 (only entexpose, no entcursor/entpaginate).", + "patterns": [ + { + "name": "Ignored-build codegen driver", + "description": "entc.go is a `//go:build ignore` main invoked by `go generate`, mirroring ent1 but with a reduced extension set.", + "example": "entc.Generate(\"./schema\", &gen.Config{Target: \"./db\", Package: \".../ent2/db\"}, entc.Extensions(entexpose.New()))" + }, + { + "name": "Generate directive in package file", + "description": "generate.go holds the sole `//go:generate go run -mod=mod entc.go` directive under `package ent2`.", + "example": "package ent2\n//go:generate go run -mod=mod entc.go" + } + ], + "key_file_guides": [ + { + "file": "entc.go", + "role": "Ent codegen entrypoint for the ent2 client: targets `./db`, enables FeatureVersionedMigration/Lock/Upsert/ExecQuery, registers only entexpose.New().", + "watch_for": "Intentionally omits entcursor/entpaginate (unlike ent1). Keep it minimal \u2014 this client exists to prove entutils works against a second, differently-configured generated client." + }, + { + "file": "generate.go", + "role": "`package ent2` declaration plus the `//go:generate` directive that runs entc.go.", + "watch_for": "Regenerate db/ via codegen; never hand-edit generated output." + } + ], + "anti_patterns": [ + "Hand-editing the generated ent2/db package instead of editing schema/ and regenerating.", + "Adding entcursor/entpaginate here to match ent1 \u2014 the divergence is intentional; ent2 is the lean fixture.", + "Removing the `//go:build ignore` tag from entc.go and pulling it into the package build." + ], + "decisions": [ + { + "decision": "Maintain ent2 as a deliberately smaller second client.", + "rationale": "Two distinct generated clients let entutils verify transaction/mixin behavior is not coupled to a single client's feature set or package path." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w4.json b/.archie/enrichments/w4.json new file mode 100644 index 0000000000..06b5f66948 --- /dev/null +++ b/.archie/enrichments/w4.json @@ -0,0 +1,279 @@ +{ + "openmeter/notification": { + "purpose": "Root of the notification domain: declares the notification.Service and notification.Repository contracts, the channel/rule/event/eventpayload/deliverystatus domain models, the EventType catalog, and the EventHandler dispatch contract. Children implement persistence (adapter), Kafka consumption (consumer), HTTP transport (httpdriver), async delivery (eventhandler), and Svix webhooks (webhook).", + "patterns": [ + { + "name": "Every input is a models.Validator + CustomValidator pair", + "description": "Each *Input struct declares both `_ models.Validator` and `_ models.CustomValidator[T]` assertions, implements ValidateWith(...) delegating to models.Validate(i, validators...), and a Validate() that collects into `var errs []error` then returns models.NewNillableGenericValidationError(errors.Join(errs...)).", + "example": "func (i CreateChannelInput) Validate() error { var errs []error; if i.Namespace == \"\" { errs = append(errs, errors.New(\"namespace is required\")) }; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Discriminated union types keyed by EventType/ChannelType", + "description": "ChannelConfig, RuleConfig, and EventPayload are union structs embedding a *Meta with a Type field; Validate() switches on Type and dispatches to the matching sub-config (BalanceThreshold/EntitlementReset/Invoice).", + "example": "switch c.Type { case EventTypeBalanceThreshold: if c.BalanceThreshold == nil { return models.NewGenericValidationError(...) }; return c.BalanceThreshold.Validate() ... }" + }, + { + "name": "EventType registered in the central eventTypes slice", + "description": "New event types must be appended to the `eventTypes` var in event.go; EventType.Validate()/Values() derive from it via lo.Contains/lo.Map, and every union Validate() switch must gain a matching case.", + "example": "var eventTypes = []EventType{EventTypeBalanceThreshold, EventTypeEntitlementReset, EventTypeInvoiceCreated, EventTypeInvoiceUpdated}" + }, + { + "name": "Repository composes entutils.TxCreator + sub-repos", + "description": "notification.Repository embeds entutils.TxCreator and the Channel/Rule/Event sub-repository interfaces; Service composes FeatureService + Channel/Rule/EventService. Keep CRUD method sets symmetric across Repository and Service.", + "example": "type Repository interface { entutils.TxCreator; ChannelRepository; RuleRepository; EventRepository }" + }, + { + "name": "Typed domain errors, not raw ent errors", + "description": "Surface NotFoundError{NamespacedID} and UpdateAfterDeleteError from errors.go; these are mapped to HTTP codes by httpdriver. Returning untyped errors degrades to 500.", + "example": "func (e NotFoundError) Error() string { return fmt.Sprintf(\"resource with id %s not found in %s namespace\", e.ID, e.Namespace) }" + }, + { + "name": "Annotations carry cross-cutting routing/dedupe metadata", + "description": "annotations.go defines string keys (AnnotationEventFeatureKey, AnnotationBalanceEventDedupeHash, AnnotationEventInvoiceID, etc.); consumer/adapter store these on Event.Annotations and query them via JSONB. Add new keys here, never inline string literals.", + "example": "AnnotationBalanceEventDedupeHash = \"event.balance.dedupe.hash\"" + }, + { + "name": "Channel-set diffing via NewChannelIDsDifference", + "description": "Rule channel-assignment changes are computed with NewChannelIDsDifference(new, old) (built on lo.Difference) exposing Additions()/Removals(); the service uses this to mirror changes to Svix.", + "example": "diff := NewChannelIDsDifference(newChannels, oldChannels); diff.Additions(); diff.Removals()" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Declares Service/ChannelService/RuleService/EventService/FeatureService interfaces and OrderBy constants. Source of truth for the service contract.", + "watch_for": "Adding a method here means updating the service/ implementation and (usually) httpdriver." + }, + { + "file": "repository.go", + "role": "Declares Repository = TxCreator + Channel/Rule/Event sub-repos.", + "watch_for": "Method sets must mirror the corresponding Service methods; adapter must implement all." + }, + { + "file": "event.go", + "role": "Event domain model, the eventTypes registry, ListEventsInput with dedup/delivery-status filters.", + "watch_for": "Forgetting to register a new EventType in `eventTypes` makes Validate() reject it everywhere." + }, + { + "file": "channel.go / rule.go", + "role": "Channel/Rule models + ChannelConfig/RuleConfig unions + CRUD inputs. MaxChannelsPerRule=5 lives in rule.go.", + "watch_for": "Adding a config variant requires a new union field plus a Validate() switch case in both the config and its payload." + }, + { + "file": "eventpayload.go", + "role": "EventPayload union + EventPayloadVersionCurrent versioning + AsRawPayload marshaling.", + "watch_for": "Bump/handle EventPayloadVersionCurrent when changing payload shape; every payload type needs a Validate() switch case." + }, + { + "file": "deliverystatus.go", + "role": "EventDeliveryStatus state machine enum (PENDING/SENDING/RESENDING/SUCCESS/FAILED) + attempt records + Update/List/Get inputs.", + "watch_for": "New states must be added to Validate()/Values() and handled by eventhandler's reconcile switch." + }, + { + "file": "entitlements.go / invoice.go", + "role": "Entitlement (balance threshold, reset) and invoice event types, payloads, rule configs, plus ValidateRuleConfigWithFeatures (resolves features via FeatureService).", + "watch_for": "Threshold value bounds differ per type (BalanceValue allows 0, others must be >0)." + }, + { + "file": "errors.go", + "role": "NotFoundError, UpdateAfterDeleteError domain errors consumed by httpdriver's error encoder.", + "watch_for": "Unregistered new error types fall through to HTTP 500." + } + ], + "anti_patterns": [ + "Returning on the first invalid field instead of collecting into errs and joining with errors.Join + NewNillableGenericValidationError.", + "Adding an EventType, ChannelType, or config variant without updating its registry/Values() and every discriminated-union Validate() switch.", + "Inlining annotation key string literals instead of adding a constant to annotations.go.", + "Returning raw ent/db errors instead of notification.NotFoundError / UpdateAfterDeleteError (breaks HTTP status mapping).", + "Letting Service and Repository method sets drift apart, or skipping the Validator/CustomValidator assertion pair on a new *Input type." + ], + "decisions": [ + { + "decision": "Channel/Rule configs and payloads are discriminated unions keyed by Type rather than separate interfaces.", + "rationale": "A single struct serializes cleanly to JSON and to the DB while a Type-switch keeps validation and mapping centralized." + }, + { + "decision": "EventPayload carries an explicit integer version (EventPayloadVersionCurrent).", + "rationale": "Stored events outlive code; versioning lets the delivery/reconcile path evolve payload shape without breaking historical events." + }, + { + "decision": "Annotation-driven dedup/routing keys live in the domain root (annotations.go).", + "rationale": "Consumer dedup logic and adapter JSONB queries share the same key constants, avoiding drift between producer and storage layers." + } + ], + "code_examples": [ + { + "scenario": "Discriminated-union Validate with collected errors (the dominant pattern across this package)", + "code": "func (c RuleConfig) Validate() error {\n switch c.Type {\n case EventTypeBalanceThreshold:\n if c.BalanceThreshold == nil {\n return models.NewGenericValidationError(errors.New(\"missing balance threshold rule config\"))\n }\n return c.BalanceThreshold.Validate()\n case EventTypeInvoiceCreated, EventTypeInvoiceUpdated:\n if c.Invoice == nil {\n return models.NewGenericValidationError(errors.New(\"missing invoice rule config\"))\n }\n return c.Invoice.Validate()\n default:\n return models.NewGenericValidationError(fmt.Errorf(\"unknown rule type: %s\", c.Type))\n }\n}" + } + ] + }, + "openmeter/sink": { + "purpose": "Sink-worker core (driven by cmd/sink-worker): consumes usage events from Kafka, buffers them per (topic,partition,offset), dedupes, validates against cached meters, batch-inserts to ClickHouse, then commits offsets and writes dedupe keys \u2014 preserving an at-least-once / exactly-once-on-storage guarantee. Children: models (DTOs), flushhandler (post-flush callbacks).", + "patterns": [ + { + "name": "Config struct with Validate() then New constructor", + "description": "Every component (SinkConfig, ClickHouseStorageConfig, NamespacedMeterCacheConfig) has a Validate() returning errors.New(...) per missing dep, and a New* that calls config.Validate() first and wraps failure with fmt.Errorf.", + "example": "func NewSink(config SinkConfig) (*Sink, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid sink configuration: %w\", err) } ... }" + }, + { + "name": "Ordered flush: storage -> store offset -> dedupe set", + "description": "Sink.flush() runs under s.mu.Lock with partitions paused: (1) persistToStorage, (2) StoreMessage offsets sorted ascending so the largest commits last, (3) dedupeSet to Redis. The ordering is the consistency contract.", + "example": "// 1. Persist to storage; 2. Store Offset (sort by Offset asc); 3. Sink to Redis" + }, + { + "name": "Buffer keyed by Kafka coordinate, mutex-guarded", + "description": "SinkBuffer.Add keys messages by KafkaMessage.String() (topic+partition+offset) so duplicates within a batch collapse; Dequeue applies MessageTransformerFunc transformers (e.g. withStoredAt) while draining under the lock.", + "example": "key := message.KafkaMessage.String(); b.data[key] = message" + }, + { + "name": "Pause/resume partitions around flush", + "description": "flush() calls s.pause() before draining and defers s.resume(), preventing new messages from being processed mid-flush to keep storage and offset state consistent.", + "example": "err := s.pause(); ...; defer func() { err = s.resume() ... }()" + }, + { + "name": "Periodic background cache refetch", + "description": "NamespacedMeterCache.Start guards with atomic.Bool, seeds the cache, then a goroutine ticks on periodicRefetchInterval calling fetchMeters; GetAffectedMeters reads under RWMutex and returns nil for dropped messages.", + "example": "if n.isRunning.Swap(true) { return errors.New(\"namespaced meter cache is already running\") }" + }, + { + "name": "FlushEventHandler invoked in a goroutine with timeout", + "description": "After a successful flush, if FlushEventHandler is set it runs OnFlushSuccess in a `go func()` under context.WithTimeout(ctx, FlushSuccessTimeout); errors are logged, never propagated to the flush path.", + "example": "go func() { ctx, cancel := context.WithTimeout(ctx, s.config.FlushSuccessTimeout); defer cancel(); err := s.config.FlushEventHandler.OnFlushSuccess(ctx, messages); ... }()" + }, + { + "name": "OTel metrics + tracing wrap every phase", + "description": "Sink holds Int64Counter/Int64Histogram instruments created in NewSink and starts tracer spans (flush-lock, flush, persist, storage-batch-insert); reportFlushMetrics records ingest delay from IngestedAt/StoredAt.", + "example": "ctx, flushSpan := s.config.Tracer.Start(ctx, \"flush\", trace.WithSpanKind(trace.SpanKindConsumer), ...)" + } + ], + "key_file_guides": [ + { + "file": "sink.go", + "role": "Sink struct, SinkConfig + Validate, NewSink, and the flush()/persistToStorage()/reportFlushMetrics() pipeline. The heart of the worker.", + "watch_for": "The storage->offset->dedupe ordering and the s.mu.Lock + pause/resume invariants protect the exactly-once-on-storage guarantee; do not reorder." + }, + { + "file": "buffer.go", + "role": "SinkBuffer (mutex map keyed by KafkaMessage.String()), Dequeue with transformers, RemoveByPartitions on revoke.", + "watch_for": "All access must hold b.mu; key collisions are intentional dedup, not a bug." + }, + { + "file": "storage.go", + "role": "Storage interface + ClickHouseStorage.BatchInsert mapping SinkMessage -> streaming.RawEvent with a fresh ulid StoreRowID and IngestedAt/StoredAt fallback to clock.Now().", + "watch_for": "An error from BatchInsert retries the whole batch; mapping reads message.Serialized.* which must be non-nil." + }, + { + "file": "meters.go", + "role": "NamespacedMeterCache (meter cache keyed by namespace->eventType) with periodic refetch and GetAffectedMeters.", + "watch_for": "GetAffectedMeters returns nil for messages with Status.DropError set or unknown namespace; reads guarded by RWMutex." + }, + { + "file": "partition.go", + "role": "prettyPartitions helper for logging topic-partitions.", + "watch_for": "Purely diagnostic; handles nil Topic pointer." + } + ], + "anti_patterns": [ + "Reordering the flush phases (storage, then offset store, then dedupe set) or removing the pause/resume + s.mu.Lock guard \u2014 breaks the at-least-once / exactly-once-on-storage guarantee.", + "Running OnFlushSuccess synchronously inside flush() or letting its error fail the flush, causing re-processing of already-committed ClickHouse writes.", + "Constructing Sink/Storage/MeterCache without calling config.Validate() first.", + "Reading SinkBuffer.data or NamespacedMeterCache.namespaces without the corresponding mutex.", + "Inserting into ClickHouse without a fresh StoreRowID (ulid.Make()) per RawEvent, or without falling back IngestedAt/StoredAt to clock.Now()." + ], + "decisions": [ + { + "decision": "Flush persists to ClickHouse before committing Kafka offsets and before writing Redis dedupe keys.", + "rationale": "If offset commit or dedupe write fails after storage, messages are reprocessed (at-least-once) rather than lost; the comments in flush() document this 'exactly once'-on-storage reasoning." + }, + { + "decision": "Meters are cached per-namespace in-process and refetched on an interval rather than queried per event.", + "rationale": "Event validation runs on the hot path; a cached MetersByType keyed by namespace/eventType avoids a DB round-trip per message." + }, + { + "decision": "Post-flush side effects go through an optional FlushEventHandler run on a detached, time-boxed goroutine.", + "rationale": "Keeps ingest-notification and other side effects off the latency-critical flush path and prevents them from failing committed writes." + } + ], + "code_examples": [ + { + "scenario": "Constructor validates config then wires OTel + cache (the standard New* shape in this package)", + "code": "func NewSink(config SinkConfig) (*Sink, error) {\n if err := config.Validate(); err != nil {\n return nil, fmt.Errorf(\"invalid sink configuration: %w\", err)\n }\n messageCounter, err := config.MetricMeter.Int64Counter(\"sink.kafka.messages\", metric.WithUnit(\"{message}\"))\n if err != nil {\n return nil, fmt.Errorf(\"failed to create messages counter: %w\", err)\n }\n meterCache, err := NewNamespaceStore(NamespacedMeterCacheConfig{\n PeriodicRefetchInterval: config.MeterRefetchInterval,\n Logger: config.Logger,\n MeterService: config.MeterService,\n })\n if err != nil {\n return nil, fmt.Errorf(\"failed to create namespace meter cache: %w\", err)\n }\n return &Sink{config: config, buffer: NewSinkBuffer(), meterCache: meterCache, ...}, nil\n}" + } + ] + }, + "openmeter/watermill": { + "purpose": "Structural folder owning OpenMeter's event-bus integration over the Watermill library. It is the seam between domain code and Kafka: children split by responsibility \u2014 eventbus (outbound publish facade), grouphandler (inbound fan-out dispatch), marshaler (CloudEvents codec), router (consumer middleware stack), driver (transport impls), and nopublisher (handler adapters).", + "patterns": [ + { + "name": "CloudEvents is the canonical wire format", + "description": "marshaler defines the Event interface (EventName/EventMetadata/Validate) that every published event implements; routing/identity travels in ce_* metadata headers, never in the JSON body. eventbus and router both key off ce_type.", + "example": "Marshal serializes domain events as JSON CloudEvents 1.0 with ce_type/ce_source headers mirrored into Watermill metadata." + }, + { + "name": "Topic routing by event-name prefix", + "description": "eventbus maps domain events to Kafka topics via a TopicMapping + a GeneratePublishTopic switch on the event-name prefix, rather than per-event topic config.", + "example": "New topic => extend TopicMapping (+Validate) and the GeneratePublishTopic switch together." + }, + { + "name": "Options/Config Validate() gates construction everywhere", + "description": "eventbus.New, router.NewDefaultRouter, and drivers all validate their Options/Config before building, and inject an explicit *slog.Logger rather than slog.Default().", + "example": "Calling cqrs.NewEventBusWithConfig or message.Router directly bypasses this validation and the standard middleware/marshaler wiring." + }, + { + "name": "Fixed, ordered consumer middleware stack", + "description": "router.NewDefaultRouter assembles a fixed stack (DLQ/poison-queue, OTel metrics+tracing, correlation, recover, retry, timeout) with a MaxRetries-1 correction and Timeout wrapped by RestoreContext; every Kafka consumer is built through it.", + "example": "Reordering middleware breaks the DLQ/timeout/retry/context-restore interplay (issue 467)." + }, + { + "name": "Transport selected above the driver folder", + "description": "driver/ holds interchangeable Watermill Publisher/Subscriber implementations (kafka real driver, noop null publisher); eventbus chooses between them. The disabled path is a real noop driver, not a nil publisher or per-call-site guards.", + "example": "Publishing disabled => wire driver/noop, not nil-check at each publish site." + } + ], + "key_file_guides": [ + { + "file": "eventbus/eventbus.go", + "role": "Publisher/ContextPublisher facade over Watermill CQRS EventBus; topic routing and nil-event no-op publish.", + "watch_for": "Adding a topic requires both TopicMapping.Validate and the GeneratePublishTopic switch." + }, + { + "file": "grouphandler/grouphandler.go", + "role": "Type-keyed fan-out from one Watermill handler to many GroupEventHandlers, errors.Join over results, OTel metrics per status.", + "watch_for": "Only NewEvent() of the first registered handler is unmarshaled per type; don't register conflicting concrete structs for one event type, and ack (don't error) unhandled types." + }, + { + "file": "marshaler/marshaler.go", + "role": "CloudEvents<->Watermill codec, Event interface contract, ID/Time defaulting, WithSource decorator.", + "watch_for": "Non-Event structs fail Marshal ('invalid event type'); empty Source is rejected by NewCloudEvent." + }, + { + "file": "router/router.go", + "role": "NewDefaultRouter assembling the standard middleware stack consumed by balance/billing/notification workers.", + "watch_for": "DLQ push is outermost but skipped when IsClosed(); preserve MaxRetries-1 and Timeout+RestoreContext pairing." + } + ], + "anti_patterns": [ + "Bypassing eventbus.New / router.NewDefaultRouter and constructing cqrs.NewEventBusWithConfig or message.Router directly, losing Options validation, marshaler wiring, DLQ/metrics/retry.", + "Adding a Kafka topic without extending both TopicMapping (+Validate) and GeneratePublishTopic.", + "Publishing a struct that does not implement the marshaler Event interface, or relying on the JSON body instead of ce_type metadata for routing.", + "Reordering/removing router middleware, dropping RestoreContext around Timeout, or forgetting the MaxRetries-1 correction.", + "Using NewMock or slog.Default() in production wiring instead of injecting a real *slog.Logger." + ], + "decisions": [ + { + "decision": "All inter-service events use CloudEvents 1.0 with metadata mirrored into Watermill headers.", + "rationale": "ce_* headers give every consumer/router a uniform, body-independent way to route and validate events." + }, + { + "decision": "A single NewDefaultRouter encodes the project's whole consumer middleware policy.", + "rationale": "Centralizing DLQ, retry, timeout, tracing and correlation guarantees every Kafka worker behaves identically; escape hatch is building your own router." + }, + { + "decision": "Drivers are split into kafka and noop sibling packages, with the disabled path as a real noop driver.", + "rationale": "Selection happens once in eventbus instead of nil-checks scattered across publish call sites." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w40.json b/.archie/enrichments/w40.json new file mode 100644 index 0000000000..e95ae1e604 --- /dev/null +++ b/.archie/enrichments/w40.json @@ -0,0 +1,86 @@ +{ + "pkg/framework/transport/httptransport": { + "purpose": "Generic, type-parameterized HTTP handler abstraction (Handler[Request,Response] and HandlerWithArgs) that wraps an operation.Operation in a fixed decode -> operate -> encode pipeline. This is the core handler primitive every v3 handler and most openmeter/*/httpdriver packages build on (47 in-edges); its primary constraint is that it stays decoupled from any concrete domain \u2014 it only knows operations, encoders, and error encoders.", + "patterns": [ + { + "name": "decode -> operate -> encode pipeline", + "description": "ServeHTTP runs exactly three stages: decodeRequest, operation, encodeResponse. A non-nil error from decode or operate is routed through encodeError; an encodeResponse error is treated as terminal and only passed to errorHandler.HandleContext.", + "example": "request, err := h.decodeRequest(ctx, r); response, err := h.operation(ctx, request); h.encodeResponse(ctx, w, r, response)" + }, + { + "name": "Constructors return interfaces, struct stays unexported", + "description": "NewHandler/NewHandlerWithArgs return the Handler/HandlerWithArgs interface; the implementing handler[Request,Response] and handlerWithArgs structs are unexported. newHandler (lowercase) is the shared internal builder used by both public constructors.", + "example": "func NewHandler[Request any, Response any](...) Handler[Request, Response] { return newHandler(...) }" + }, + { + "name": "Non-pointer receivers for cheap immutable clones", + "description": "handler and handlerWithArgs use value receivers so With() and Chain() copy the struct and mutate the copy. Comments explicitly warn: if the receiver becomes a pointer, an explicit clone is required in With/Chain.", + "example": "func (h handlerWithArgs[...]) With(arg ArgType) Handler[...] { res := h.handler; res.decodeRequest = func(...){...}; return res }" + }, + { + "name": "Functional options via HandlerOption", + "description": "Configuration is applied through HandlerOption (an interface implemented by optionFunc). WithErrorHandler, WithErrorEncoder, WithOperationName, WithOperationNameFunc are the only knobs. defaultHandlerOptions (commonhttp.GenericErrorEncoder) is appended after caller options in newHandler.", + "example": "options = append(options, defaultHandlerOptions...); h.apply(options)" + }, + { + "name": "Layered error encoding with bool-handled signaling", + "description": "encodeError iterates h.errorEncoders, then tries the SelfEncodingError interface on the error, falling back to a 500 StatusProblem. Each encoder returns bool; the first true wins. If nothing handles it, errorHandler.HandleContext is called for diagnostics.", + "example": "if errorEncoder(ctx, err, w, r) { return true } ... if encoder, ok := err.(SelfEncodingError); ok { ... }" + }, + { + "name": "Operation middleware via Chain", + "description": "Both Handler and HandlerWithArgs expose Chain(outer, others...) that wraps h.operation through operation.Chain(...). Middleware composes around the operation, not the HTTP layer.", + "example": "h.operation = operation.Chain(outer, others...)(h.operation)" + }, + { + "name": "Optional per-operation OTel span gated by global toggle", + "description": "operationNameFunc sets the route attr; when operationSpansEnabled (set once via EnableOperationSpans) is true, ServeHTTP starts a child span named after the operation. Off by default to avoid API-wide span volume.", + "example": "if operationSpansEnabled.Load() { ctx, span = tracer.Start(ctx, name); defer span.End() }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Defines Handler interface, NewHandler, the unexported handler struct, RequestDecoder, ErrorHandler, SelfEncodingError, the ServeHTTP pipeline, encodeError, and the EnableOperationSpans/tracer globals.", + "watch_for": "ServeHTTP uses a value receiver; do not switch handler to pointer methods without adding explicit clones in With/Chain. defaultHandlerOptions wires GenericErrorEncoder \u2014 removing it loses the fallback error encoder." + }, + { + "file": "argshandler.go", + "role": "HandlerWithArgs variant: With(ArgType) binds a route arg (e.g. path param) into the request decoder, returning a plain Handler. RequestDecoderWithArgs adds the ArgType parameter to the decoder signature.", + "watch_for": "With() relies on value-receiver copy semantics of handler; the inline comment warns this breaks if handler becomes a pointer. The bound closure captures arg per-With call." + }, + { + "file": "options.go", + "role": "HandlerOption/optionFunc functional-option machinery, the With* option constructors, handlerOptions aggregation, apply(), and resolveErrorHandler (returns dummyErrorHandler when none set).", + "watch_for": "errorEncoders is append-only across WithErrorEncoder calls (order matters in encodeError). resolveErrorHandler never returns nil \u2014 a missing handler silently swallows diagnostic errors via dummyErrorHandler." + } + ], + "anti_patterns": [ + "Importing domain/openmeter packages here \u2014 this is the foundational transport primitive; it may only depend on pkg/contextx, pkg/framework/operation, pkg/framework/commonhttp, pkg/models, and the encoder subpackage.", + "Changing handler/handlerWithArgs to pointer receivers without adding explicit struct clones in With()/Chain() \u2014 the immutable-copy contract that With relies on would silently share mutable decoders.", + "Writing to the ResponseWriter directly inside the operation \u2014 output must flow through encodeResponse or an ErrorEncoder/SelfEncodingError so error handling and content negotiation stay centralized.", + "Enabling operation spans unconditionally instead of via EnableOperationSpans \u2014 adds a child span to every request API-wide and inflates trace volume.", + "Returning concrete handler structs from constructors instead of the Handler/HandlerWithArgs interface \u2014 callers depend on the interface and on Chain composition." + ], + "decisions": [ + { + "decision": "Handlers are generic over Request/Response and wrap an operation.Operation rather than embedding business logic.", + "rationale": "Keeps the transport layer domain-agnostic so every v3 handler and httpdriver reuses one decode/operate/encode pipeline with consistent error encoding and tracing." + }, + { + "decision": "Error handling is a chain of ErrorEncoders plus a SelfEncodingError escape hatch, with a 500 fallback.", + "rationale": "Lets each error type decide its own wire representation while guaranteeing every unhandled error still produces a structured StatusProblem and a diagnostic callback." + }, + { + "decision": "Per-operation OTel spans are global-toggle gated, off by default.", + "rationale": "The operation child span is useful for handler-vs-middleware timing but multiplies span count across the whole API, so it is opted into once at startup via EnableOperationSpans." + } + ], + "code_examples": [ + { + "scenario": "Build a route-arg-bound HTTP handler from an operation and serve it", + "code": "import (\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport/encoder\"\n)\n\nh := httptransport.NewHandlerWithArgs[Request, Response, RouteArg](\n\tfunc(ctx context.Context, r *http.Request, arg RouteArg) (Request, error) { /* decode */ },\n\top, // operation.Operation[Request, Response]\n\tencoder.ResponseEncoder[Response](func(ctx context.Context, w http.ResponseWriter, r *http.Request, resp Response) error { /* encode */ }),\n\thttptransport.WithOperationName(\"my-operation\"),\n)\nh.With(routeArg).ServeHTTP(w, r)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w41.json b/.archie/enrichments/w41.json new file mode 100644 index 0000000000..e9bad6e8b5 --- /dev/null +++ b/.archie/enrichments/w41.json @@ -0,0 +1,72 @@ +{ + "pkg/kafka/metrics": { + "purpose": "Top-level OTel metrics facade for librdkafka client statistics: a single Metrics struct holds the top-level Int64Gauges plus broker/topic/consumer-group sub-metric structs from internal/, and Add() walks a parsed stats.Stats (from stats/) recording every gauge. New(meter, ...Option) is the only constructor; wired into app/common, cmd/server, ingest/kafkaingest, and sink.", + "patterns": [ + { + "name": "Single Metrics struct of Int64Gauges + sub-metric pointers", + "description": "Metrics embeds top-level metric.Int64Gauge fields plus *internal.BrokerMetrics/TopicMetrics/ConsumerGroupMetrics; New populates all of them and returns (*Metrics, error).", + "example": "type Metrics struct { brokerMetrics *internal.BrokerMetrics; Age metric.Int64Gauge; ... }" + }, + { + "name": "New is the only constructor; every gauge creation wraps the error", + "description": "Each meter.Int64Gauge(...) call is immediately followed by `if err != nil { return nil, fmt.Errorf(\"failed to create metric: : %w\", err) }`. Sub-metric constructors wrap with \"failed to create metrics: %w\".", + "example": "m.Age, err = meter.Int64Gauge(\"kafka.age_microseconds\", ...); if err != nil { return nil, fmt.Errorf(\"failed to create metric: kafka.age: %w\", err) }" + }, + { + "name": "Add is nil-safe and attribute-additive", + "description": "Add(ctx, stats, attrs...) returns early on `stats == nil`, appends name/client_id/type attributes, records every top-level gauge, then dispatches to non-nil sub-metric structs.", + "example": "func (m *Metrics) Add(ctx context.Context, stats *stats.Stats, attrs ...attribute.KeyValue) { if stats == nil { return } ... }" + }, + { + "name": "Functional Options gate sub-metrics", + "description": "Options{extendedMetrics, brokerMetricsDisabled, topicMetricsDisabled, consumerGroupMetricsDisabled} are set via Option funcs (WithExtendedMetrics, WithBrokerMetricsDisabled, WithTopicMetricsDisabled, WithConsumerGroupMetricsDisabled); disabled sub-metrics stay nil so Add skips them.", + "example": "func WithExtendedMetrics() Option { return func(o *Options) { o.extendedMetrics = true } }" + }, + { + "name": "Bootstrap broker filtering on the facade side", + "description": "When iterating stats.Brokers, brokers with NodeID < 0 (bootstrap nodes) are skipped before calling brokerMetrics.Add.", + "example": "for _, broker := range stats.Brokers { if broker.NodeID < 0 { continue }; m.brokerMetrics.Add(ctx, &broker, attrs...) }" + }, + { + "name": "kafka.* metric names with description + unit", + "description": "Every Int64Gauge uses a dotted name (kafka.message_count, kafka.message_size_bytes) plus metric.WithDescription and metric.WithUnit (\"{message}\", \"{byte}\", \"{microseconds}\", \"{topic}\").", + "example": "meter.Int64Gauge(\"kafka.message_size_bytes\", metric.WithDescription(...), metric.WithUnit(\"{byte}\"))" + } + ], + "key_file_guides": [ + { + "file": "metrics.go", + "role": "Defines Metrics, Options/Option (+With* funcs), New constructor, and Add recorder; the public surface of the package.", + "watch_for": "A gauge needs THREE coordinated edits: struct field, New() block with the error-wrap guard, and a m..Record(...) line in Add \u2014 missing any one silently drops the metric. Existing copy-paste artifact: kafka.requests_received_bytes wraps its error string as \"kafka.requests-sent\"; do not propagate that \u2014 use the real metric name in new code." + }, + { + "file": "metrics_test.go", + "role": "Table test TestWithMetrics exercising New with each Option combo against a noop meter, plus NewTestStats helper unmarshalling the embedded stats/testdata/stats.json fixture.", + "watch_for": "Uses noop.NewMeterProvider() so it only asserts construction/recording does not error, not metric values; uses t.Context(). New Options must be added to the test table or they go untested." + } + ], + "anti_patterns": [ + "Adding a gauge to New() without the immediate `if err != nil { return nil, fmt.Errorf(\"failed to create metric: : %w\", err) }` guard", + "Adding a struct field + New() block but forgetting the matching m..Record(...) call in Add (or vice versa)", + "Recording sub-metrics in Add without the `if m.Metrics != nil` guard \u2014 disabled sub-metrics are intentionally nil", + "Recording bootstrap brokers (NodeID < 0) instead of skipping them", + "Parsing/computing librdkafka stats here instead of consuming the typed structs from the stats/ sibling package" + ], + "decisions": [ + { + "decision": "Stats parsing (stats/), metric instrument wrappers (internal/), and the recording facade (this package) are split into three layers.", + "rationale": "Keeps pure-data parsing dependency-light, the internal instrument wrappers reusable per-entity, and this package the single wiring/Add entry point." + }, + { + "decision": "Sub-metrics and extended/percentile metrics are opt-in/opt-out via functional Options.", + "rationale": "Per-broker/per-topic/per-partition percentile metrics are high-cardinality; callers (sink, ingest) can disable them or enable extended metrics per deployment." + } + ], + "code_examples": [ + { + "scenario": "Add a new top-level gauge end-to-end (field + New guard + Record)", + "code": "// in metrics.go\n// 1) struct field\ntype Metrics struct { /* ... */ NewGauge metric.Int64Gauge }\n// 2) in New(...), after existing gauges\nm.NewGauge, err = meter.Int64Gauge(\n\t\"kafka.new_gauge_count\",\n\tmetric.WithDescription(\"...\"),\n\tmetric.WithUnit(\"{message}\"),\n)\nif err != nil {\n\treturn nil, fmt.Errorf(\"failed to create metric: kafka.new_gauge_count: %w\", err)\n}\n// 3) in Add(...)\nm.NewGauge.Record(ctx, stats.NewGauge, metric.WithAttributes(attrs...))" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w42.json b/.archie/enrichments/w42.json new file mode 100644 index 0000000000..6b38da6370 --- /dev/null +++ b/.archie/enrichments/w42.json @@ -0,0 +1,103 @@ +{ + "test/app": { + "purpose": "Integration tests for the openmeter/app domain: the app marketplace registry plus per-app-type test suites (Stripe, custom-invoicing). The root files test marketplace listing/lookup; the constraint is that all app services are assembled directly from package constructors against a real Postgres DB, never through app/common DI wiring.", + "patterns": [ + { + "name": "TestEnv interface + testEnv struct", + "description": "Each suite gets a TestEnv interface exposing Adapter()/App()/Close(); NewTestEnv wires a real Postgres driver, runs migrations, and constructs adapters+services, returning a closerFunc that closes the ent + postgres drivers.", + "example": "env, err := NewTestEnv(t, ctx); defer env.Close()" + }, + { + "name": "Direct constructor wiring", + "description": "Services are built from adapter.New + service.New (customer, secret, app, appstripe, billing) \u2014 not from app/common. Each New call returns (svc, err) checked with fmt.Errorf wrapping or require.NoError.", + "example": "appAdapter, err := appadapter.New(appadapter.Config{Client: entClient}); appService, err := appservice.New(appservice.Config{Adapter: appAdapter, Publisher: publisher})" + }, + { + "name": "Real Postgres via testutils.InitPostgresDB + migrate", + "description": "InitPostgresDB(t) yields an EntDriver; migrate.New(MigrateOptions{Migrations: migrate.OMMigrationsConfig}) then migrator.Up() creates the schema before adapters are built.", + "example": "driver := testutils.InitPostgresDB(t); migrator, _ := migrate.New(...); migrator.Up()" + }, + { + "name": "Validated Init input structs", + "description": "Helper assemblers like InitBillingService take an input struct (InitBillingServiceInput) with a Validate() error method checking required deps (DBClient, CustomerService, AppService) before construction.", + "example": "func (i InitBillingServiceInput) Validate() error { if i.DBClient == nil { return fmt.Errorf(\"db client is required\") } ... }" + }, + { + "name": "Per-suite namespace via ulid", + "description": "Suites generate an isolated namespace string with ulid.Make().String() in a setupNamespace(t) helper so tests do not collide.", + "example": "s.namespace = ulid.Make().String()" + }, + { + "name": "Mock streaming/eventbus injected", + "description": "eventbus.NewMock(t) supplies the Publisher and streamingtestutils.NewMockStreamingConnector(t) the streaming connector; meteradapter is the mockadapter bound to the ent client via SetDBClient.", + "example": "publisher := eventbus.NewMock(t); mockStreamingConnector := streamingtestutils.NewMockStreamingConnector(t)" + }, + { + "name": "Marketplace asserted against canonical listing", + "description": "Marketplace tests compare GetMarketplaceListing/ListMarketplaceListings output to appstripe.StripeMarketplaceListing and assert not-found via models.IsGenericNotFoundError for unknown AppType.", + "example": "require.Equal(t, expectedListing.Name, listing.Name); require.True(t, models.IsGenericNotFoundError(err))" + } + ], + "key_file_guides": [ + { + "file": "testenv.go", + "role": "Builds the shared TestEnv (Postgres + migrations + customer/secret/app/appstripe/billing services) and the InitBillingService helper. The appstripe service is constructed for side effects (registration) and its return value discarded.", + "watch_for": "appstripeservice.New is called with _ = (return discarded); needs WebhookURLGenerator (NewBaseURLWebhookURLGenerator) and a BillingService. Forgetting migrator.Up() leaves an empty schema." + }, + { + "file": "marketplace.go", + "role": "AppHandlerTestSuite with TestGetMarketplaceListing / TestListMarketplaceListings; setupNamespace seeds a ulid namespace. TestType = app.AppTypeStripe.", + "watch_for": "Expects exactly one marketplace listing (list.TotalCount == 1); adding marketplace apps breaks these counts." + }, + { + "file": "app_test.go", + "role": "Top-level TestApp entrypoint that builds env via NewTestEnv and runs the Marketplace subtests through AppHandlerTestSuite.", + "watch_for": "Uses context.WithCancel(context.Background()) at the test root and defers cancel + env.Close()." + } + ], + "anti_patterns": [ + "Importing app/common or production DI wiring instead of constructing adapters/services directly \u2014 creates test-only import cycles.", + "Skipping migrator.Up() or reusing a non-isolated namespace, causing cross-test data bleed.", + "Asserting marketplace results against hand-built listings instead of appstripe.StripeMarketplaceListing.", + "Matching errors by string instead of typed predicates like models.IsGenericNotFoundError.", + "Leaking the ent/postgres drivers by not deferring env.Close()/closerFunc()." + ], + "decisions": [ + { + "decision": "Assemble app/customer/secret/billing services from package constructors against a real Postgres DB rather than app/common wiring.", + "rationale": "Keeps test deps narrow and avoids import cycles while still exercising real adapter SQL and the marketplace registry." + }, + { + "decision": "Construct the appstripe service for its registration side effect and discard the handle.", + "rationale": "The marketplace listing is registered at service construction; the test only needs it present in the registry, not a direct reference." + } + ], + "code_examples": [ + { + "scenario": "Standing up the app TestEnv with real Postgres and constructor-wired services", + "code": "driver := testutils.InitPostgresDB(t)\nentClient := driver.EntDriver.Client()\nmigrator, _ := migrate.New(migrate.MigrateOptions{ConnectionString: driver.URL, Migrations: migrate.OMMigrationsConfig, Logger: testutils.NewLogger(t)})\n_ = migrator.Up()\nappAdapter, _ := appadapter.New(appadapter.Config{Client: entClient})\nappService, _ := appservice.New(appservice.Config{Adapter: appAdapter, Publisher: eventbus.NewMock(t)})" + } + ] + }, + "test/entitlement": { + "purpose": "Structural parent for entitlement integration/regression tests. It owns the cross-layer test surface where metered entitlements, credit grants, balance snapshots, resets, and voids are exercised end-to-end against a real Postgres DB; its sole child (regression) holds the actual code.", + "patterns": [ + { + "name": "Children own all source", + "description": "test/entitlement has no direct source files; navigate into regression for the entitlement+credit stack tests built via setupDependencies and driven by pkg/clock.", + "example": "test/entitlement/regression/{framework_test.go,scenario_test.go}" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Adding entitlement test source directly at this level instead of inside a typed child folder (e.g. regression)." + ], + "decisions": [ + { + "decision": "Group entitlement tests under a structural parent split by test kind (regression).", + "rationale": "Separates historically-reproduced balance regressions from other entitlement test concerns while sharing the import surface (credit, entitlement, streaming, clock)." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w43.json b/.archie/enrichments/w43.json new file mode 100644 index 0000000000..3e791f76a6 --- /dev/null +++ b/.archie/enrichments/w43.json @@ -0,0 +1,30 @@ +{ + "tools/migrate/cmd": { + "purpose": "Structural parent holding the standalone CLI generator binaries that support the migration toolchain. It currently owns a single child, viewgen, which fills a specific gap in the Ent/Atlas pipeline: emitting SQL DDL for Ent ent.View schemas that Atlas migrate diff omits from generated migration metadata.", + "patterns": [ + { + "name": "Thin main, logic in package", + "description": "Each cmd/* binary is a minimal main wrapper that parses flags and delegates all real work to a sibling package under tools/migrate/ (viewgen -> tools/migrate/viewgen). No view-collection or SQL-rendering logic lives in main.go.", + "example": "viewgen/main.go parses flags then delegates to the tools/migrate/viewgen package" + }, + { + "name": "Generators backstop Atlas gaps", + "description": "These binaries exist to cover concrete gaps the `make generate` / `atlas migrate diff` workflow cannot produce \u2014 notably ent.View DDL, which never appears in generated migrate.Tables metadata. A new generator here should target an identified, mechanical gap, not duplicate Atlas's diff output.", + "example": "viewgen emits views.sql because ent.View schemas are absent from generated migration metadata" + } + ], + "key_file_guides": [], + "anti_patterns": [ + "Putting SQL-rendering or schema-collection logic in a cmd/*/main.go instead of the corresponding tools/migrate/ package.", + "Adding a generator binary that overlaps Atlas's existing diff output rather than covering a real gap.", + "Hand-editing generated SQL output (e.g. views.sql) that carries a `Code generated by viewgen, DO NOT EDIT.` header instead of regenerating via `make generate-view-sql`." + ], + "decisions": [ + { + "decision": "Generator binaries live under tools/migrate/cmd, separate from the reusable logic packages they delegate to.", + "rationale": "Groups the migration toolchain's executables together and keeps thin mains decoupled from testable logic, matching the repo's thin-main convention." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w44.json b/.archie/enrichments/w44.json new file mode 100644 index 0000000000..206e1c5c0e --- /dev/null +++ b/.archie/enrichments/w44.json @@ -0,0 +1,76 @@ +{ + "collector/benthos/services/leaderelection": { + "purpose": "Kubernetes-based leader-election service for the standalone Benthos/Redpanda Connect collector binary. Exposes CLI flags and a Benthos CLIOpt that lets exactly one collector instance act as leader (e.g. so only the leader runs singleton inputs/jobs), tracking leadership via the Benthos Resources generic store.", + "patterns": [ + { + "name": "Wire leadership into Benthos via CLIOptFunc", + "description": "Leadership is integrated by returning []service.CLIOptFunc from GetLeaderElectionCLIOpts: CLIOptCustomRunFlags registers leaderElectionCLIFlags and parses them into a Config, then CLIOptOnConfigParse constructs NewService and starts it. Add new collector-wide leadership wiring here, not in input/output plugins.", + "example": "service.CLIOptCustomRunFlags(leaderElectionCLIFlags, func(ctx *cli.Context) error { leaderElectionConfig = Config{Enabled: ctx.Bool(leaderElectionEnabledFlag), ...}; return nil })" + }, + { + "name": "Leadership state lives in Resources generic store", + "description": "Leader status is published with res.SetGeneric(IsLeaderKey, true/false) in the LeaderCallbacks and read with res.GetGeneric(IsLeaderKey). IsLeaderKey is a typed genericKey constant. Consumers must call IsLeader(res) rather than reading the generic key directly.", + "example": "OnStartedLeading: func(ctx context.Context){ res.SetGeneric(IsLeaderKey, true) }" + }, + { + "name": "Fail-open IsLeader semantics", + "description": "IsLeader(res) returns true when IsLeaderKey is absent (leader election disabled => everyone is leader), and false when present-but-not-a-bool. Preserve this fail-open-when-unset / fail-closed-when-corrupt contract so disabling leader election doesn't silently stop all processing.", + "example": "leader, ok := res.GetGeneric(IsLeaderKey); if !ok { return true }" + }, + { + "name": "Flags carry env-var fallbacks and K8s downward-API defaults", + "description": "Every cli.Flag in leaderElectionCLIFlags sets EnvVars (e.g. LEASE_LOCK_NAMESPACE plus K8S_* downward-API names) and durations have sane defaults (LeaseDuration 15s, RenewDeadline 10s, RetryPeriod 2s). Identity defaults to os.Hostname(). New flags must follow the same EnvVars + Value convention.", + "example": "&cli.StringFlag{Name: leaseLockIdentityFlag, EnvVars: []string{\"K8S_POD_NAME\", \"LEASE_LOCK_IDENTITY\"}, Value: hostname}" + }, + { + "name": "Self-healing run loop with cancel guard", + "description": "Start() launches a goroutine that recreates a NewLeaderElector and calls le.Run(ctx) in a for-loop, retrying after LeaseRetryPeriod unless ctx is cancelled. mu + started guard against double-start; Stop() calls s.cancel(). ReleaseOnCancel is true so leadership is released on shutdown.", + "example": "for { le, _ := leaderelection.NewLeaderElector(*s.leaderElectionConfig); le.Run(ctx); if ctx.Err() != nil { return } ... }" + }, + { + "name": "Validate required lock fields only when enabled", + "description": "In CLIOptOnConfigParse the service short-circuits when !Enabled; when enabled it requires LeaseLockNamespace and LeaseLockName before constructing the service. Keep validation gated on Enabled so disabled deployments don't need K8s config.", + "example": "if !leaderElectionConfig.Enabled { return nil }; if leaderElectionConfig.LeaseLockNamespace == \"\" { return fmt.Errorf(...) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines Config, Service, NewService (builds K8s client + LeaseLock + LeaderElectionConfig), Start/Stop, the GetLeaderElectionCLIOpts entrypoint, and the IsLeader(res) helper.", + "watch_for": "NewService reads kubeconfig via controller-runtime config.GetConfig() and routes klog through logging.SetupKlog(logger) \u2014 it only works in-cluster or with a valid kubeconfig. LeaseHealthCheckTimeout==0 is auto-set to LeaseDuration*1.5. Don't read IsLeaderKey directly; use IsLeader." + }, + { + "file": "flags.go", + "role": "Declares the leaderElection* flag-name constants, the hostname default, and leaderElectionCLIFlags ([]cli.Flag) consumed by CLIOptCustomRunFlags.", + "watch_for": "Flag names are string constants used in both files \u2014 keep flags.go constants and service.go ctx.Bool/String/Duration lookups in sync. hostname is captured once at package init via os.Hostname()." + } + ], + "anti_patterns": [ + "Reading res.GetGeneric(IsLeaderKey) directly instead of calling IsLeader(res), losing the fail-open-when-unset semantics.", + "Calling le.Run / NewLeaderElector outside the guarded Start() goroutine, bypassing the mu/started double-start guard and retry loop.", + "Adding a flag without EnvVars and a default Value, breaking the K8s downward-API / env-driven deployment convention.", + "Setting ReleaseOnCancel=false or removing s.cancel() in Stop(), which leaves the lease held after shutdown and blocks failover.", + "Importing this package into root-module code \u2014 it belongs to the independent collector go.mod and pulls in k8s.io/client-go." + ], + "decisions": [ + { + "decision": "Leadership is exposed through the Benthos Resources generic store (SetGeneric/GetGeneric) rather than a shared Go variable.", + "rationale": "Lets Benthos plugins (input/output/bloblang) in other packages query leadership via *service.Resources without a direct import dependency on this service." + }, + { + "decision": "Integration is via service.CLIOptFunc (CLIOptCustomRunFlags + CLIOptOnConfigParse) instead of a Benthos processor/plugin.", + "rationale": "Leader election is a process-wide concern parsed once at CLI startup, so it hooks the Redpanda Connect CLI lifecycle rather than per-stream config." + }, + { + "decision": "IsLeader fails open (returns true) when the generic key is unset.", + "rationale": "When leader election is disabled the collector must still process events, so absence of leadership state means 'act as leader'." + } + ], + "code_examples": [ + { + "scenario": "Gating singleton work on leadership inside a Benthos plugin", + "code": "import \"github.com/openmeterio/openmeter/collector/benthos/services/leaderelection\"\n\nif !leaderelection.IsLeader(res) {\n // not the leader (and leader election is enabled): skip singleton work\n return nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w45.json b/.archie/enrichments/w45.json new file mode 100644 index 0000000000..5494dff3cf --- /dev/null +++ b/.archie/enrichments/w45.json @@ -0,0 +1,51 @@ +{ + "collector/quickstart/seeder": { + "purpose": "Benthos (Redpanda Connect) stream config that generates synthetic CloudEvents usage data and POSTs them into OpenMeter for the quickstart demo. It is data/config only \u2014 no Go code; the behavior is entirely driven by the `benthos-collector` image consuming this `config.yaml`.", + "patterns": [ + { + "name": "Env-var-parameterized Benthos config", + "description": "Every tunable knob uses the `${VAR:default}` interpolation form so the same config works across compose/CI without edits. Counts, intervals, target URL, token, and logging are all env-driven.", + "example": "count: ${SEEDER_COUNT:0}; url: ${OPENMETER_URL:http://127.0.0.1:8888}/api/v1/events" + }, + { + "name": "generate input + bloblang mapping emits CloudEvents", + "description": "The `generate` input's `mapping` Bloblang builds a CloudEvents 1.0 envelope into `root` with id/specversion/type/source/subject/time/data. New event shapes must keep the CloudEvents envelope fields intact.", + "example": "root = { \"id\": uuid_v4(), \"specversion\": \"1.0\", \"type\": $event_type, \"source\": $source, ... }" + }, + { + "name": "switch output with continue-through HTTP + optional stdout", + "description": "Output is a `switch` whose first case (`check: \"\"`, `continue: true`) always POSTs to the events endpoint as `application/cloudevents+json`; a second case logs to stdout only when `SEEDER_LOG=true`.", + "example": "check: '\"${SEEDER_LOG:false}\" == \"true\"' -> stdout: { codec: lines }" + }, + { + "name": "Backdated, bounded-random event fields", + "description": "`time` is randomized within the last 3 days (`ts_sub_iso8601(\"P3D\")` + random seconds); `subject` is `customer-%d` modulo `SEEDER_MAX_SUBJECTS`. Keep new randomized fields seeded with `timestamp_unix_nano()` to avoid identical batches.", + "example": "let subject = \"customer-%d\".format(random_int(seed: timestamp_unix_nano()) % $max_subjects)" + } + ], + "key_file_guides": [ + { + "file": "config.yaml", + "role": "Whole-folder Benthos stream definition: http server on :4196 (matches the compose healthcheck `/ready`), generate input, output switch to the OpenMeter events API.", + "watch_for": "The HTTP port 4196 and `OPENMETER_URL` must stay aligned with collector/quickstart/docker-compose.yaml (seeder healthcheck hits :4196, and compose points OPENMETER_URL at the collector's :8889 ingest, not 8888). `max_in_flight: 1` serializes posts \u2014 raising it changes ingest ordering/load." + } + ], + "anti_patterns": [ + "Hardcoding the OpenMeter URL, token, count, or interval instead of using `${VAR:default}` \u2014 breaks the env-driven compose/CI wiring.", + "Changing the HTTP `address` port without updating the compose seeder healthcheck/port mapping (4196).", + "Dropping required CloudEvents envelope fields (id/specversion/type/source/subject/time) \u2014 OpenMeter ingest expects valid CloudEvents.", + "Sending a non-`application/cloudevents+json` Content-Type to /api/v1/events." + ], + "decisions": [ + { + "decision": "Use a second copy of the benthos-collector image (not custom Go) as the seeder.", + "rationale": "The quickstart only needs synthetic load; reusing the published image with a generate input avoids shipping a separate seeding binary." + }, + { + "decision": "Backdate event times across a 3-day window.", + "rationale": "Gives the quickstart dashboards/meters non-trivial historical data immediately rather than only live events." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w46.json b/.archie/enrichments/w46.json new file mode 100644 index 0000000000..942a898489 --- /dev/null +++ b/.archie/enrichments/w46.json @@ -0,0 +1,109 @@ +{ + "collector/quickstart/collector/resources": { + "purpose": "Benthos/Redpanda Connect shared resource definitions for the quickstart collector \u2014 currently holds only the in-memory dedupe cache that the events ingestion stream references by label. Loaded by the Benthos CLI alongside the stream configs as part of the quickstart docker-compose stack.", + "patterns": [ + { + "name": "Resources declared, not inlined", + "description": "Reusable Benthos components live here as labeled top-level resources (cache_resources, rate_limit_resources, etc.) so streams can reference them by label rather than redefining them inline.", + "example": "cache_resources:\n - label: dedupe_cache\n memory:\n default_ttl: 1h" + }, + { + "name": "Label is the cross-file contract", + "description": "The `label` value is the only handle a stream has to a resource. The label `dedupe_cache` here must exactly match the `cache:` reference in streams/input.yaml's dedupe processor.", + "example": "label: dedupe_cache # referenced as cache: \"dedupe_cache\" in input.yaml" + } + ], + "key_file_guides": [ + { + "file": "dedupe-cache.yaml", + "role": "Defines the `dedupe_cache` memory cache (1h TTL) used by the input stream's dedupe processor to drop duplicate CloudEvents by xxhash64 content hash.", + "watch_for": "Memory cache is per-process and non-durable \u2014 restarts lose dedupe state, and it does not work across horizontally-scaled collector replicas. Renaming the label silently breaks the input stream's dedupe step. TTL bounds the dedupe window." + } + ], + "anti_patterns": [ + "Renaming the `dedupe_cache` label without updating the `cache:` reference in streams/input.yaml \u2014 the dedupe processor will fail to resolve the cache.", + "Assuming the memory cache provides durable or cluster-wide dedupe \u2014 it is process-local and cleared on restart." + ], + "decisions": [ + { + "decision": "Dedupe cache kept as a shared resource rather than inlined in the stream.", + "rationale": "Benthos resources are referenced by label across stream files, keeping cache config in one place and reusable by multiple processors." + } + ], + "code_examples": [] + }, + "collector/quickstart/collector/streams": { + "purpose": "Benthos/Redpanda Connect stream pipelines that form the quickstart collector's ingestion path: input.yaml exposes an HTTP CloudEvents endpoint that validates/dedupes events, output.yaml buffers them and ships to OpenMeter. The two streams are wired together via the `openmeter` inproc channel.", + "patterns": [ + { + "name": "Two streams bridged by inproc channel", + "description": "input.yaml's output writes to `inproc: openmeter`; output.yaml's input reads from `inproc: openmeter`. The named inproc channel is the contract between the ingestion and delivery streams \u2014 both names must match.", + "example": "# input.yaml output\n- inproc: openmeter\n# output.yaml input\ninput:\n inproc: openmeter" + }, + { + "name": "Content-Type switch for CloudEvents formats", + "description": "Incoming requests are routed by a `switch` processor on `meta(\"Content-Type\")`: `application/cloudevents-batch+json` is unarchived from a json_array, `application/cloudevents+json` passes through, anything else returns an RFC7807-style 400.", + "example": "- check: meta(\"Content-Type\").lowercase() == \"application/cloudevents-batch+json\"\n processors:\n - unarchive:\n format: json_array" + }, + { + "name": "RFC7807 error responses via mapping + sync_response", + "description": "Validation failures build an about:blank problem-details JSON root, set `meta http_response_status` to 400, emit a sync_response, then `root = deleted()` to drop the message from the pipeline.", + "example": "meta http_response_status = \"400\"\nroot = {\"type\":\"about:blank\",\"title\":\"Bad Request\",\"status\":400,\"detail\":...}" + }, + { + "name": "Schema validation with catch", + "description": "A json_schema processor validates against file://./cloudevents.spec.json; a following `catch` block converts any schema error into a 400 problem-details sync_response and deletes the message.", + "example": "- json_schema:\n schema_path: \"file://./cloudevents.spec.json\"\n- catch:\n - mapping: meta http_response_status = \"400\"" + }, + { + "name": "Durable SQLite buffer before delivery", + "description": "output.yaml inserts a `buffer: sqlite` at /var/lib/collector/buffer.sqlite (with a split post_processor) so accepted events survive collector restarts before reaching the openmeter output.", + "example": "buffer:\n sqlite:\n path: /var/lib/collector/buffer.sqlite" + }, + { + "name": "Env-driven output config", + "description": "The openmeter output URL/token/batching are parameterized via ${OPENMETER_URL:...}, ${OPENMETER_TOKEN:}, ${BATCH_SIZE:1}, ${BATCH_PERIOD:30s}; a DEBUG_INPUT switch case can tee events to stdout.", + "example": "output:\n openmeter:\n url: \"${OPENMETER_URL:https://openmeter.cloud}\"\n token: \"${OPENMETER_TOKEN:}\"" + } + ], + "key_file_guides": [ + { + "file": "input.yaml", + "role": "HTTP CloudEvents ingestion stream: http_server on :8889 path /api/v1/events, Content-Type routing, dedupe, json_schema validation, then fan-out to inproc `openmeter` with a null sync_response (204).", + "watch_for": "Relies on `dedupe_cache` resource (resources/dedupe-cache.yaml) and a `cloudevents.spec.json` file resolved relative to the working dir. The fan_out broker order matters: sync_response is sent before inproc delivery. http_response_status meta defaults to 204 on success." + }, + { + "file": "output.yaml", + "role": "Delivery stream: reads inproc `openmeter`, buffers to durable SQLite, batches, and posts to the OpenMeter ingest endpoint using the custom `openmeter` output plugin.", + "watch_for": "The `openmeter` output is a custom Benthos plugin registered by the collector binary, not a stock Benthos output \u2014 it only resolves when running the OpenMeter collector build. Buffer path must be a writable mounted volume in docker-compose. Empty OPENMETER_TOKEN default means auth must be supplied via env." + } + ], + "anti_patterns": [ + "Changing the inproc channel name in one stream but not the other \u2014 events silently stop flowing between input.yaml and output.yaml.", + "Removing the `cache:` dedupe reference or renaming the cache without updating resources/dedupe-cache.yaml.", + "Assuming `output: openmeter` is a stock Benthos output \u2014 it is a custom collector plugin and won't exist in a vanilla Benthos/Connect binary.", + "Pointing the SQLite buffer at a non-persistent path, defeating the at-least-once durability the buffer provides across restarts.", + "Returning bare error strings instead of the RFC7807 problem-details shape the existing error mappings produce." + ], + "decisions": [ + { + "decision": "Ingestion and delivery split into two streams joined by an inproc channel.", + "rationale": "Decouples synchronous HTTP request handling (validate + ack fast with 204) from durable, batched, retryable delivery to OpenMeter, so the HTTP caller is not blocked on upstream availability." + }, + { + "decision": "Durable SQLite buffer sits between the two streams.", + "rationale": "Provides at-least-once delivery: accepted events are persisted locally and survive collector restarts before being batched to the OpenMeter API." + }, + { + "decision": "Validation errors are returned as RFC7807 problem-details with explicit http_response_status meta.", + "rationale": "Matches OpenMeter's API error contract so clients posting CloudEvents get consistent, parseable Bad Request responses." + } + ], + "code_examples": [ + { + "scenario": "Add a new Content-Type branch or validation step to the ingestion pipeline", + "code": "pipeline:\n processors:\n - switch:\n - check: meta(\"Content-Type\").lowercase() == \"application/cloudevents+json\"\n processors:\n - noop: {}\n - check: \"\"\n processors:\n - mapping: |\n meta http_response_status = \"400\"\n root = {\"type\":\"about:blank\",\"title\":\"Bad Request\",\"status\":400,\n \"detail\":\"unexpected Content-Type %s\".format(meta(\"Content-Type\"))}\n - sync_response: {}\n - mapping: \"root = deleted()\"\n - dedupe:\n cache: \"dedupe_cache\"\n key: '${! content().hash(\"xxhash64\") }'\n - json_schema:\n schema_path: \"file://./cloudevents.spec.json\"" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w47.json b/.archie/enrichments/w47.json new file mode 100644 index 0000000000..e7301e5472 --- /dev/null +++ b/.archie/enrichments/w47.json @@ -0,0 +1,102 @@ +{ + "deploy/charts/benthos-collector/templates": { + "purpose": "Helm chart templates for the benthos-collector sidecar \u2014 a Benthos-based usage collector that ships events to OpenMeter. Renders the full Kubernetes object set (StatefulSet, Service, RBAC, Secrets, ServiceAccount, ConfigMap) from values.yaml.", + "patterns": [ + { + "name": "Named-template naming via _helpers.tpl", + "description": "All names/labels are produced by `benthos-collector.*` defines (name, fullname, chart, labels, selectorLabels, serviceAccountName, componentName, storageClass, args). Object templates must call these through `include`, never hardcode names.", + "example": "name: {{ include \"benthos-collector.fullname\" . }}" + }, + { + "name": "Standard label block on every metadata", + "description": "Every resource attaches `{{- include \"benthos-collector.labels\" . | nindent 4 }}` under metadata.labels; selectors use the narrower `benthos-collector.selectorLabels`. Adding a resource without the labels include breaks helm-managed-by/version conventions.", + "example": "labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}" + }, + { + "name": "Conditional resources gated on .Values toggles", + "description": "Resources guard their entire body with feature flags: `service.enabled`, `serviceAccount.create`, `rbac.create`, `len .Values.caRootCertificates`, `storage.enabled`. New optional resources must follow the same `{{- if ... -}} ... {{- end }}` wrapping.", + "example": "{{- if .Values.service.enabled }}\n...\n{{- end }}" + }, + { + "name": "Config delivered via mutually-exclusive args resolver", + "description": "`benthos-collector.args` requires exactly one of `config`, `configFile`, or `preset` and calls `fail` otherwise. Presets are an explicit allowlist (`http-server`, `kubernetes-pod-exec-time`). New presets must be added to this template's if/else chain.", + "example": "args: {{ include \"benthos-collector.args\" . }}" + }, + { + "name": "Checksum-triggered pod rollout", + "description": "statefulset.yaml stamps `checksum/config` and `checksum/secret` from `sha256sum` of the rendered values so config/secret changes force a pod restart. Preserve these annotations when editing the pod template.", + "example": "checksum/config: {{ .Values.config | toYaml | sha256sum }}" + }, + { + "name": "Component-scoped secondary names", + "description": "The config Secret and its volume mount use `benthos-collector.componentName` (list . \"config\") to derive a DNS-safe suffixed name truncated to fit 63 chars. Use this helper for any per-component object, not raw printf.", + "example": "name: {{ include \"benthos-collector.componentName\" (list . \"config\") }}" + }, + { + "name": "Secret-backed env and config volume", + "description": "OPENMETER_URL/OPENMETER_TOKEN are base64'd into the main Secret and injected via `envFrom.secretRef`; benthos config.yaml is base64'd into the config Secret and mounted read-only at /etc/benthos/config.yaml. Sensitive values flow through Secrets, never plain env.", + "example": "envFrom:\n - secretRef:\n name: {{ include \"benthos-collector.fullname\" . }}" + } + ], + "key_file_guides": [ + { + "file": "_helpers.tpl", + "role": "Defines all reusable named templates (naming, labels, serviceAccountName, componentName, storageClass, args). Single source of truth for names.", + "watch_for": "`componentName` truncates fullname to `62 - len(component)`; long release names silently lose characters. `args` and `storageClass` embed business logic (preset allowlist, storageClassName rendering) \u2014 edit here, not in object templates." + }, + { + "file": "statefulset.yaml", + "role": "Primary workload. Defines container command `/entrypoint.sh /usr/local/bin/benthos`, metrics port 4195, optional http port 8080, leader-election env, volumes, and optional volumeClaimTemplates.", + "watch_for": "livenessProbe/readinessProbe hit /ping and /ready on the `metrics` port (4195), not the http port. http port only exists when `service.enabled`. Removing checksum annotations disables auto-rollout on config change." + }, + { + "file": "secret.yaml", + "role": "Two Secrets: main (OPENMETER_URL required, OPENMETER_TOKEN optional) and a `config`-componentName Secret holding base64 benthos config.yaml.", + "watch_for": "OPENMETER_URL uses `required` and fails render if unset. config.yaml is `toYaml | b64enc`; do not double-encode. Not gated by any toggle \u2014 always rendered." + }, + { + "file": "rbac.yaml", + "role": "Gated on `rbac.create`. ClusterRole+Binding for pods/nodes/PVCs/PVs (watch/list/get) and namespaced Role+Binding for coordination.k8s.io leases (for leader election).", + "watch_for": "Contains a duplicated `subjects:` line in the ClusterRoleBinding block (cosmetic/redundant). Subjects bind to `benthos-collector.serviceAccountName` in `.Release.Namespace`." + }, + { + "file": "service.yaml", + "role": "Gated on `service.enabled`. Exposes the `http` targetPort (container 8080) on `service.port`.", + "watch_for": "Selector uses selectorLabels only. If enabled but the statefulset http port is absent (also gated on service.enabled) the service has no backend \u2014 keep both flags consistent." + }, + { + "file": "configmap.yaml", + "role": "Renders a `ca-certificates` ConfigMap only when `caRootCertificates` is non-empty; keys are `.crt` lowercased.", + "watch_for": "ConfigMap name is the literal `ca-certificates` (not fullname-scoped) \u2014 collides across releases in the same namespace. Mounted read-only at /usr/local/share/ca-certificates in the statefulset." + }, + { + "file": "serviceaccount.yaml", + "role": "Gated on `serviceAccount.create`. Sets automountServiceAccountToken from `serviceAccount.automount` and supports annotations.", + "watch_for": "When create is false, statefulset still references `serviceAccountName` (default fallback) \u2014 ensure the named SA exists externally." + } + ], + "anti_patterns": [ + "Hardcoding object names or label blocks instead of calling the `benthos-collector.*` helpers \u2014 breaks naming/truncation and managed-by conventions.", + "Adding a benthos config source without extending `benthos-collector.args`; the template `fail`s unless exactly one of config/configFile/preset is set.", + "Putting OPENMETER_TOKEN or config.yaml into plain env/ConfigMap instead of the existing Secrets.", + "Removing the `checksum/config` / `checksum/secret` annotations, which silently stops pods from rolling on config changes.", + "Probing the http port for liveness/readiness \u2014 health endpoints (/ping, /ready) live on the metrics port 4195." + ], + "decisions": [ + { + "decision": "Deployed as a StatefulSet (not Deployment) with optional volumeClaimTemplates.", + "rationale": "Benthos needs stable identity and optional persistent storage (e.g. buffer/state) gated on `storage.enabled`, plus leader election via coordination leases." + }, + { + "decision": "Config source is resolved by a single `args` helper enforcing exactly one of config/configFile/preset.", + "rationale": "Prevents ambiguous or empty config and provides a curated preset allowlist for common collection scenarios." + } + ], + "code_examples": [ + { + "scenario": "Adding a new optional Kubernetes resource to the chart", + "code": "{{- if .Values.myFeature.enabled }}\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\ndata:\n ...\n{{- end }}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w48.json b/.archie/enrichments/w48.json new file mode 100644 index 0000000000..767d96da0c --- /dev/null +++ b/.archie/enrichments/w48.json @@ -0,0 +1,111 @@ +{ + "deploy/charts/openmeter/templates": { + "purpose": "Helm chart templates that render every Kubernetes object for an OpenMeter install: the API Deployment, four worker Deployments (balance/notification/sink/billing), three billing CronJobs, Service, Ingress, ConfigMap, ServiceAccount, and optional self-hosted ClickHouse/Svix. All naming, labeling, and dependency-wait logic flows through shared `_helpers.tpl` definitions.", + "patterns": [ + { + "name": "Component naming via openmeter.componentName", + "description": "Every workload's metadata.name is built with `include \"openmeter.componentName\" (list . \"\")`, never hardcoded. This truncates the fullname to fit the 63-char DNS limit while keeping the component suffix.", + "example": "name: {{ include \"openmeter.componentName\" (list . \"billing-worker\") }}" + }, + { + "name": "Component labels & selector labels", + "description": "Resource labels use `openmeter.componentLabels (list . \"x\")` and selectors use `openmeter.componentSelectorLabels (list . \"x\")`. The component string passed to selector and metadata labels of a workload MUST match so Pods are selected correctly.", + "example": "{{- include \"openmeter.componentSelectorLabels\" (list . \"api\") | nindent 6 }}" + }, + { + "name": "Config-change rollout via checksum annotation", + "description": "Every Pod template adds `checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}` so config changes trigger a rolling restart. New Deployments/Jobs must replicate this annotation.", + "example": "checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}" + }, + { + "name": "Dependency-wait initContainers", + "description": "Workloads gate on Postgres/ClickHouse readiness via `openmeter.init.postgres`/`openmeter.init.clickhouse` (svix.yaml uses init.redis), each guarded by the corresponding `.Values.*.enabled` flag. These are only added when the self-hosted dependency is enabled.", + "example": "{{- include \"openmeter.init.postgres\" (list .) | nindent 8 }}" + }, + { + "name": "Shared container scaffolding", + "description": "All workload containers share the same image (`.Values.image.repository:tag|default .Chart.AppVersion`), `/entrypoint.sh` command, telemetry port 10000, /healthz/live & /healthz/ready probes, config volume at /etc/openmeter, and optional ca-certificates volume gated on `.Values.caRootCertificates`.", + "example": "command: [\"/entrypoint.sh\", \"openmeter-balance-worker\"]" + }, + { + "name": "Self-hosted dependency config injection", + "description": "configmap.yaml defines `openmeter.helmValuesConfig` which conditionally emits kafka/clickhouse/postgres/svix blocks per `.Values.*.enabled`, then `mergeOverwrite`s them onto `.Values.config`. New self-hosted dependency wiring goes here, not into static config.", + "example": "{{- $cfg := mergeOverwrite $config $valuesConfig -}}" + }, + { + "name": "Optional resources gated by enabled flags", + "description": "clickhouse.yaml, svix.yaml, ingress.yaml, and serviceaccount.yaml wrap their whole body in `{{- if .Values.X.enabled -}}` / `{{- if .Values.ingress.enabled -}}` so they render nothing when disabled.", + "example": "{{- if .Values.svix.enabled -}} ... {{- end }}" + } + ], + "key_file_guides": [ + { + "file": "_helpers.tpl", + "role": "Single source of named templates: name/fullname/chart, labels, selectorLabels, componentName/componentLabels/componentSelectorLabels, serviceAccountName, and the init.netcat/init.postgres/init.clickhouse/init.redis dependency waiters.", + "watch_for": "componentName truncates to `63 - 1 - len(component)`; a new long component name silently collides if it exceeds the budget. Add new named helpers here rather than inlining in templates." + }, + { + "file": "deployment.yaml", + "role": "Renders five Deployments (api, balance-worker, notification-service, sink-worker, billing-worker) separated by `---`, each differing mainly by component name, replicaCount value, and entrypoint subcommand.", + "watch_for": "Only the api Deployment exposes the http port 80 and serves traffic; workers expose only telemetry-http 10000. Copy an existing block wholesale when adding a worker; don't forget the checksum annotation and initContainers guards." + }, + { + "file": "jobs.yaml", + "role": "Three batch/v1 CronJobs (subscription-sync, billing-collect-invoices, billing-advance-invoices) running `openmeter-jobs` with args like `billing collect all`; all use concurrencyPolicy: Forbid and restartPolicy: Never.", + "watch_for": "Schedules come from `.Values.jobs..schedule`. The double-nested template metadata (jobTemplate.spec.template.metadata) both need labels/annotations; nindent levels differ (8 vs 12)." + }, + { + "file": "configmap.yaml", + "role": "Builds config.yaml from `.Values.config` merged with auto-generated self-hosted dependency overrides, plus an optional ca-certificates ConfigMap from `.Values.caRootCertificates`.", + "watch_for": "helmValuesConfig uses `include` then `fromYaml`; indentation inside the conditional blocks is YAML-significant. The CA cert keys are lower-cased and suffixed `.crt`." + }, + { + "file": "svix.yaml", + "role": "Optional self-hosted Svix Deployment + Service, gated on `.Values.svix.enabled`, wiring SVIX_REDIS_DSN / SVIX_DB_DSN with defaults pointing at the in-chart redis-master and postgres.", + "watch_for": "Uses `.Values.svix.image.*` (not the shared `.Values.image`) and init.redis/init.postgres only. Container port is 8071." + }, + { + "file": "ingress.yaml", + "role": "Version-aware Ingress (networking.k8s.io/v1 vs v1beta1 vs extensions) routing to the api component Service, gated on `.Values.ingress.enabled`.", + "watch_for": "Backend service name comes from `openmeter.componentName (list . \"api\")` and must match service.yaml; the apiVersion/backend shape branches on `.Capabilities.KubeVersion`." + }, + { + "file": "clickhouse.yaml", + "role": "Optional ClickHouseInstallation CR (clickhouse.altinity.com/v1) for self-hosted analytics storage, gated on `.Values.clickhouse.enabled`.", + "watch_for": "Requires the Altinity ClickHouse operator CRD installed; service address `clickhouse-:9000` is referenced by configmap.yaml and init.clickhouse." + }, + { + "file": "service.yaml", + "role": "ClusterIP/typed Service for the api component exposing `.Values.service.port` to targetPort http.", + "watch_for": "Only the api workload has a Service; selector must use componentSelectorLabels with \"api\"." + } + ], + "anti_patterns": [ + "Hardcoding a resource name instead of `openmeter.componentName` \u2014 breaks the 63-char DNS truncation and label/selector matching.", + "Adding a Deployment/CronJob without the `checksum/config` annotation \u2014 config changes won't trigger a rollout.", + "Adding self-hosted dependency settings as static `.Values.config` instead of conditional blocks in `helmValuesConfig` \u2014 they leak even when the dependency is disabled.", + "Emitting an optional resource (svix/clickhouse/ingress) without the `{{- if .Values.X.enabled -}}` guard.", + "Mismatching the component string between a workload's labels, selectorLabels, and metadata.name so Pods fail selection." + ], + "decisions": [ + { + "decision": "All naming and labeling are centralized in _helpers.tpl named templates rather than inlined.", + "rationale": "Keeps the 63-char DNS truncation logic and Kubernetes recommended labels consistent across the many Deployments/Jobs and avoids per-resource drift." + }, + { + "decision": "Self-hosted dependencies (postgres/clickhouse/kafka/redis/svix) are first-class but optional, gated by `.Values.*.enabled`, and NOTES.txt warns against using them in production.", + "rationale": "The chart doubles as an all-in-one demo install and a production deployment that points at managed external services." + }, + { + "decision": "Dependency readiness is enforced with netcat initContainers rather than relying on application retry.", + "rationale": "Ensures Postgres/ClickHouse/Redis are reachable before the OpenMeter process starts migrations or consumers, avoiding crash-loops at startup." + } + ], + "code_examples": [ + { + "scenario": "Standard worker Deployment block (name, labels, config checksum, dependency init, shared container)", + "code": "metadata:\n name: {{ include \"openmeter.componentName\" (list . \"sink-worker\") }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"sink-worker\") | nindent 4 }}\nspec:\n selector:\n matchLabels:\n {{- include \"openmeter.componentSelectorLabels\" (list . \"sink-worker\") | nindent 6 }}\n template:\n metadata:\n annotations:\n checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n spec:\n {{ if or .Values.postgresql.enabled .Values.clickhouse.enabled -}}\n initContainers:\n {{- if .Values.postgresql.enabled -}}\n {{- include \"openmeter.init.postgres\" (list .) | nindent 8 }}\n {{- end }}\n {{- end }}\n containers:\n - name: {{ .Chart.Name }}\n image: \"{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}\"\n command: [\"/entrypoint.sh\", \"openmeter-sink-worker\"]" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w49.json b/.archie/enrichments/w49.json new file mode 100644 index 0000000000..b68aaeaf64 --- /dev/null +++ b/.archie/enrichments/w49.json @@ -0,0 +1,119 @@ +{ + "docs/decisions": { + "purpose": "Architecture Decision Records (ADRs) capturing the foundational data-plane technology choices behind OpenMeter's usage-metering pipeline: event streaming, event format, idempotency, partitioning, and historical storage. Documentation only \u2014 no code; the records explain why the system is built the way it is.", + "patterns": [ + { + "name": "Sequential numbered ADR filenames", + "description": "Each file is `NNNN-kebab-title.md` with a zero-padded 4-digit prefix that monotonically increases; new decisions take the next free number.", + "example": "0005-clickhouse.md follows 0004-partitioning.md" + }, + { + "name": "Fixed MADR-style section structure", + "description": "Every ADR uses the headings `## Context and Problem Statement`, `## Considered Options`, `## Decision Outcome`, and a `### Consequences` subsection listing Pros:/Cons: bullets.", + "example": "0001-event-streaming-platform.md lists 3 considered options then a Decision Outcome of 'Kafka with ksqlDB' followed by Pros/Cons" + }, + { + "name": "Outcome stated as bullet list of concrete choices", + "description": "The Decision Outcome leads with the chosen option name, then itemizes the specific components/parameters adopted.", + "example": "0003-idempotency.md: 'Deduplication in ksqlDB via windowed tables', 'Events are unique by ID + Source', '32 days default deduplication window'" + } + ], + "key_file_guides": [ + { + "file": "0001-event-streaming-platform.md", + "role": "Records choice of Kafka for event streaming + ksqlDB for stream processing; notes interfaces are kept generic for swappability.", + "watch_for": "Partly superseded by 0005 (ClickHouse) which lists 'migrate from ksqlDB' as a consequence \u2014 ksqlDB is no longer the sole processing path." + }, + { + "file": "0002-event-format.md", + "role": "Records CloudEvents as the ingestion event format (ID + Source uniqueness, multi-language, batch support).", + "watch_for": "The ID+Source uniqueness contract here is the premise for the idempotency decision in 0003 \u2014 keep them consistent." + }, + { + "file": "0003-idempotency.md", + "role": "Records deduplication via ksqlDB windowed tables (32-day window) instead of Redis; events unique by ID + Source.", + "watch_for": "Depends on 0002's uniqueness definition; window length has Kafka storage/backup tradeoffs." + }, + { + "file": "0004-partitioning.md", + "role": "Records `subject` as the Kafka producer key, subject+group-by in ksqlDB meter keys, configurable partitions defaulting to 100.", + "watch_for": "Tables partitioned by PRIMARY KEY and cannot be repartitioned \u2014 co-partitioning constraints for joins follow from this." + }, + { + "file": "0005-clickhouse.md", + "role": "Records ClickHouse + Kafka Connect Sink for historical storage and AggregatingMergeTree/MaterializedView pre-aggregation; addresses ksqlDB scaling limits.", + "watch_for": "Implies a migration path off ksqlDB for pre-1.0.0 users; mentions future Arroyo-based streaming aggregation as not-yet-implemented direction." + } + ], + "anti_patterns": [ + "Renumbering or reusing an existing ADR number instead of appending the next sequential file", + "Editing a past decision's outcome in place rather than adding a new superseding ADR", + "Adding implementation code or config here \u2014 these are prose decision records only" + ], + "decisions": [ + { + "decision": "Keep streaming interfaces generic rather than hard-coupling to Kafka/ksqlDB", + "rationale": "0001 states this explicitly so OpenMeter can adapt to alternative streaming platforms (and indeed ClickHouse later supplements ksqlDB)." + }, + { + "decision": "Idempotency via ksqlDB windowed dedup instead of Redis", + "rationale": "0003 chose strong consistency and no extra system over Redis's simpler-but-inconsistent options, accepting increased Kafka storage." + } + ], + "code_examples": [] + }, + "docs/migration-guides": { + "purpose": "Dated, version-anchored migration guides for breaking or deprecating changes operators must act on when upgrading OpenMeter. Documentation only \u2014 gives manual steps, SQL, and SDK before/after diffs; no executable code lives here.", + "patterns": [ + { + "name": "Date-prefixed filenames", + "description": "Each guide is `YYYY-MM-DD-topic.md`, ordering guides chronologically by when the change was introduced.", + "example": "2025-11-04-entitlement-events-v1.md is the most recent" + }, + { + "name": "Version range header for upgrade-path guides", + "description": "Guides tied to a release pin source/target versions at the top so operators know exactly which upgrade triggers the steps.", + "example": "2025-06-26-subscription-alignment.md opens with 'From Version: v1.0.0-beta.214 / To Version: v1.0.0-beta.215'" + }, + { + "name": "Repo-relative source links to ground claims", + "description": "Behavioral assertions link to the exact Go file+line implementing them so the doc stays verifiable against code.", + "example": "subscription-alignment links to /openmeter/productcatalog/alignment.go#L22 and errors.go#L411" + }, + { + "name": "Before/After code diffs plus copy-paste SQL", + "description": "Guides show TS SDK before/after snippets for API changes and runnable Postgres SQL (SELECT-count-then-UPDATE) for data migrations.", + "example": "subject-customer-consolidation shows openmeter.subjects.createEntitlement \u2192 openmeter.customers.createEntitlement" + } + ], + "key_file_guides": [ + { + "file": "2025-06-26-subscription-alignment.md", + "role": "Migrates unaligned subscriptions/plans to aligned; gives SQL to find convertible rows (every RateCard cadence matching plan billing_cadence) and bulk-UPDATE billables_must_align=true, flagging the rest for manual resolution.", + "watch_for": "Operates directly on `plans`, `plan_phases`, `plan_rate_cards`, `subscriptions`, `subscription_phases`, `subscription_items` tables; BillablesMustAlign config is slated for removal in beta.216." + }, + { + "file": "2025-08-12-subject-customer-consolidation.md", + "role": "Documents subjects\u2192customers consolidation: customers become the primary entity, usage auto-attributed by customer ID/Key, /subjects APIs deprecated then removed, multiple subjects per customer via usageAttribution.", + "watch_for": "Subject values colliding with an existing customer.key/customer.id silently misattribute usage; deprecation timeline (deprecated Sep 1 2025, removed Nov 1 2025)." + }, + { + "file": "2025-11-04-entitlement-events-v1.md", + "role": "Announces removal of V1 Entitlement Events; V2 introduced in commit 85f7ec90 due to breaking schema changes.", + "watch_for": "Operators MUST drain all in-flight V1 events before upgrading, especially when coming from a version prior to 85f7ec90." + } + ], + "anti_patterns": [ + "Describing a breaking change in prose without the pinned version range / commit anchor an operator needs to act", + "Providing destructive SQL without a preceding SELECT/COUNT verification step (every guide here counts first)", + "Linking behavior claims to no code reference, making the guide impossible to validate against the implementation" + ], + "decisions": [ + { + "decision": "Limit alignment migration SQL to the common 'RateCard cadence == plan cadence' case", + "rationale": "subscription-alignment notes a fully exhaustive PLPGSQL check is possible but most unaligned plans share literal cadence values, so simpler SQL covers the bulk and flags the rest for manual review." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w5.json b/.archie/enrichments/w5.json new file mode 100644 index 0000000000..0ccec85566 --- /dev/null +++ b/.archie/enrichments/w5.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/usagebased": { + "purpose": "Domain-model and interface root for the usage-based charge type: defines the Charge aggregate (ChargeBase, Intent, State), RealizationRun history, DetailedLine, the Status state-machine vocabulary, and the Adapter/Handler/Service interfaces that the adapter/ and service/ children implement. This package owns the value types and contracts; it contains no DB or orchestration logic itself.", + "patterns": [ + { + "name": "Validate() aggregates errors via NewNillableGenericValidationError", + "description": "Every domain/input type has Validate() that collects into var errs []error, wraps each field with fmt.Errorf(\"field: %w\", err), and returns models.NewNillableGenericValidationError(errors.Join(errs...)) \u2014 never early-return on first failure.", + "example": "func (c ChargeBase) Validate() error { var errs []error; if err := c.Intent.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"intent: %w\", err)) }; return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Normalized() canonicalizes timestamps before persist/compare", + "description": "Types carrying time fields expose Normalized() calling meta.NormalizeTimestamp / meta.NormalizeOptionalTimestamp (Intent.InvoiceAt, State.AdvanceAfter, RealizationRunBase StoredAtLT/ServicePeriodTo). Persist and compare normalized values, never raw.", + "example": "func (i Intent) Normalized() Intent { i.Intent = i.Intent.Normalized(); i.InvoiceAt = meta.NormalizeTimestamp(i.InvoiceAt); return i }" + }, + { + "name": "Voided billing-history filtering", + "description": "RealizationRun.IsVoidedBillingHistory() is the single gate for excluding runs from future billing/balance math: true when DeletedAt != nil OR Type == RealizationRunTypeInvalidDueToUnsupportedCreditNote. Sum/Bisect/MapToBillingMeteredQuantity must skip these via WithoutVoidedBillingHistory().", + "example": "func (r RealizationRuns) WithoutVoidedBillingHistory() RealizationRuns { return lo.Filter(r, func(run RealizationRun, _ int) bool { return !run.IsVoidedBillingHistory() }) }" + }, + { + "name": "Cumulative-to-line quantity mapping", + "description": "RealizationRun.MeteredQuantity is cumulative from intent service-period start to ServicePeriodTo; convert to billing.StandardLine semantics only via RealizationRuns.MapToBillingMeteredQuantity, which derives PreLinePeriod from the latest non-voided prior run and errors if LinePeriod goes negative.", + "example": "linePeriod := currentRun.MeteredQuantity.Sub(preLinePeriod); if linePeriod.IsNegative() { return BillingMeteredQuantity{}, fmt.Errorf(\"line period metered quantity is negative...\") }" + }, + { + "name": "RateableIntent bridges charges into the billing rating engine", + "description": "Rating is performed through the billing.rating.StandardLineAccessor interface, implemented by RateableIntent. A charge is hardcoded as never progressively billed, zero previously-billed amount, and no user-defined line discounts \u2014 keep these invariants.", + "example": "var _ rating.StandardLineAccessor = (*RateableIntent)(nil); func (r RateableIntent) IsProgressivelyBilled() bool { return false }" + }, + { + "name": "Status enum mirrors meta.ChargeStatus with dotted substates", + "description": "Status is a string enum of dotted substates (e.g. active.final_realization.issuing). Status.Validate() checks membership in Values(); ToMetaChargeStatus() coarsens by splitting on the first '.'. Mutability is classified by membership lists, not string parsing.", + "example": "func IsMutableInvoiceBackedRealizationStatus(status Status) bool { return slices.Contains(mutableInvoiceBackedRealizationStatuses, status) }" + }, + { + "name": "Handler interface with UnimplementedHandler default", + "description": "Side-effecting credit/payment/invoice hooks are declared on the Handler interface; UnimplementedHandler provides not-implemented stubs and is conformance-asserted with var _ Handler = (*UnimplementedHandler)(nil). New hooks go on Handler plus the stub.", + "example": "var _ Handler = (*UnimplementedHandler)(nil); func (h UnimplementedHandler) OnInvoiceUsageAccrued(...) (ledgertransaction.GroupReference, error) { return ledgertransaction.GroupReference{}, errors.New(\"not implemented\") }" + } + ], + "key_file_guides": [ + { + "file": "charge.go", + "role": "Charge/ChargeBase/Intent/State/Expands aggregate; GetFeatureKeyOrID returns a state-aware feature ref (key when StatusCreated, ID otherwise, ID-then-key fallback when StatusDeleted).", + "watch_for": "GetFeatureKeyOrID branches on Status \u2014 adding a status without updating the switch silently falls into the default (ID-only) branch." + }, + { + "file": "realizationrun.go", + "role": "RealizationRun lifecycle types, RealizationRunType, BillingMeteredQuantity, BisectByTimestamp, MapToBillingMeteredQuantity, voided-history helpers.", + "watch_for": "Create input rejects RealizationRunTypeInvalidDueToUnsupportedCreditNote; run service-period start is derived from the prior non-voided run's ServicePeriodTo, not a stored field." + }, + { + "file": "statemachine.go", + "role": "Status enum constants and the mutableFinalRealization / mutableInvoiceBackedRealization membership lists used to decide where period changes are allowed.", + "watch_for": "Issuing/Completed states are intentionally absent from the mutable lists \u2014 adding them would let billing mutate immutable invoice/ledger records." + }, + { + "file": "adapter.go", + "role": "Adapter interface = composition of Charge/RealizationRun/CreditAllocation/InvoiceUsage/Payment sub-adapters plus entutils.TxCreator; implemented by adapter/.", + "watch_for": "The sub-interface split is load-bearing; add new persistence methods to the matching sub-interface, not a flat one." + }, + { + "file": "handler.go", + "role": "Handler hooks (OnInvoiceUsageAccrued, OnPaymentAuthorized/Settled, OnCreditsOnlyUsageAccrued[+Correction]) and their input structs with Validate / ValidateWith(currencyx.Calculator).", + "watch_for": "Correction inputs need ValidateWith(currencyCalculator) for amount-matching checks; plain Validate() is insufficient." + }, + { + "file": "rating.go", + "role": "RateableIntent implements billing.rating.StandardLineAccessor to feed a charge into the shared rating engine.", + "watch_for": "Discount CorrelationIDs are placeholders ('usagebased-ratecard-*') because charges do not use splitlinegroups; do not rely on them downstream." + }, + { + "file": "detailedline.go / detailedline_uniqueref.go", + "role": "DetailedLine over stddetailedline.Base; NewDetailedLinesFromBilling maps rating output; service-period suffix encode/decode for ChildUniqueReferenceID ('id@[from..to]').", + "watch_for": "Validate uses stddetailedline.IgnoreQuantityChecks(); PricerReferenceID must be non-empty; strip the '@[...]' suffix before re-keying." + }, + { + "file": "ratingengine.go / errors.go", + "role": "RatingEngine enum (delta vs period_preserving) controlling correction semantics; ValidationIssue constants (negative total, credit-allocation mismatch, active-run-exists).", + "watch_for": "RatingEngine drives whether prior periods are re-snapshotted; errors are models.ValidationIssue with critical severity + 400 status, not plain errors." + } + ], + "anti_patterns": [ + "Returning on the first validation failure instead of collecting into errs and returning models.NewNillableGenericValidationError(errors.Join(errs...)).", + "Counting deleted or unsupported-credit-note runs in billing/balance math instead of filtering through IsVoidedBillingHistory / WithoutVoidedBillingHistory.", + "Comparing or persisting timestamps without meta.NormalizeTimestamp / Normalized(), causing UTC/precision drift against stored rows.", + "Adding an issuing/completed Status to the mutable membership lists, letting period changes touch immutable invoice or ledger records.", + "Deriving billing.StandardLine quantity straight from RealizationRun.MeteredQuantity (cumulative) instead of MapToBillingMeteredQuantity, producing wrong line totals." + ], + "decisions": [ + { + "decision": "This package holds only domain types and interfaces (Adapter, Handler, Service); DB logic lives in adapter/ and orchestration/state machines in service/.", + "rationale": "Keeps the type/contract layer importable by both children and tests without pulling in Ent or orchestration dependencies, and lets the state machine and persistence evolve independently." + }, + { + "decision": "Voided runs (deleted or unsupported-credit-note) are retained but excluded from future billing via IsVoidedBillingHistory rather than physically removed.", + "rationale": "Unsupported-credit-note invoice lines cannot be deleted without prorating/credit-note support, so runs are kept for audit while being ignored by rating and balance calculations." + }, + { + "decision": "MeteredQuantity is stored as a cumulative value and converted to per-line quantity at read time.", + "rationale": "Standard invoice lines need pre-line + line-period quantities; storing cumulative lets later runs reconstruct prior billed quantity from the latest non-voided prior run." + } + ], + "code_examples": [ + { + "scenario": "Mapping a cumulative run quantity into billing line quantity, skipping voided history", + "code": "func (r RealizationRuns) MapToBillingMeteredQuantity(currentRun RealizationRun) (BillingMeteredQuantity, error) {\n preLinePeriod := alpacadecimal.Zero\n var latestPriorRun *RealizationRun\n for idx := range r {\n if r[idx].IsVoidedBillingHistory() { continue }\n if !r[idx].ServicePeriodTo.Before(currentRun.ServicePeriodTo) { continue }\n if latestPriorRun == nil || r[idx].ServicePeriodTo.After(latestPriorRun.ServicePeriodTo) {\n latestPriorRun = &r[idx]\n }\n }\n if latestPriorRun != nil { preLinePeriod = latestPriorRun.MeteredQuantity }\n linePeriod := currentRun.MeteredQuantity.Sub(preLinePeriod)\n if linePeriod.IsNegative() { return BillingMeteredQuantity{}, fmt.Errorf(\"line period metered quantity is negative\") }\n return BillingMeteredQuantity{PreLinePeriod: preLinePeriod, LinePeriod: linePeriod}, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w50.json b/.archie/enrichments/w50.json new file mode 100644 index 0000000000..9172f88ade --- /dev/null +++ b/.archie/enrichments/w50.json @@ -0,0 +1,41 @@ +{ + "etc/wiretap": { + "purpose": "Holds the Docker-targeted configuration for wiretap, a reverse-proxy / API contract-validation tool that fronts the OpenMeter API and checks live traffic against the OpenAPI spec. Its sole constraint: paths and hostnames are written for execution inside a container, not the host.", + "patterns": [ + { + "name": "Docker-host bridge for redirect target", + "description": "redirectURL points at host.docker.internal so wiretap running in a container can forward to a service listening on the developer's host machine.", + "example": "redirectURL: http://host.docker.internal:8888" + }, + { + "name": "Container-absolute contract path", + "description": "contract references the OpenAPI spec by an in-container absolute path (mounted volume), not a repo-relative path.", + "example": "contract: /usr/local/src/openmeter/api/openapi.yaml" + }, + { + "name": "Distinct ports per wiretap function", + "description": "Separate ports are assigned for the proxy (port), monitor UI (monitorPort), and websocket (webSocketPort) so they do not collide.", + "example": "port: 19090\nmonitorPort: 19091\nwebSocketPort: 19092" + } + ], + "key_file_guides": [ + { + "file": "config.docker.yaml", + "role": "wiretap runtime config for the dockerized variant: proxy redirect target, the three service ports, and the OpenAPI contract location used for request/response validation.", + "watch_for": "contract is an in-container path (/usr/local/src/openmeter/api/openapi.yaml) that must match the volume mount; if openapi.yaml moves or is unmounted, validation breaks. redirectURL uses host.docker.internal, which only resolves from inside a container." + } + ], + "anti_patterns": [ + "Changing contract to a repo-relative or host path \u2014 wiretap runs in-container and resolves it against the container filesystem / mount.", + "Pointing redirectURL at localhost instead of host.docker.internal, which would loop back into the container rather than reach the host service.", + "Reusing one port for proxy, monitor, and websocket \u2014 each wiretap function needs its own port." + ], + "decisions": [ + { + "decision": "Keep a docker-specific config file separate from any host config.", + "rationale": "The container needs host.docker.internal and absolute mounted paths that would not work when running wiretap directly on the host." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w51.json b/.archie/enrichments/w51.json new file mode 100644 index 0000000000..445bda4596 --- /dev/null +++ b/.archie/enrichments/w51.json @@ -0,0 +1,82 @@ +{ + "etc/seed/streams": { + "purpose": "Benthos/Redpanda Connect stream configs that generate synthetic CloudEvents and POST them to the OpenMeter ingest API for local demo/seeding. Each file models one usage-metering scenario (HTTP API requests, LLM prompt tokens, cloud workload runtime).", + "patterns": [ + { + "name": "Generate-input + Bloblang mapping", + "description": "Each file uses input.generate with count:0 (run forever), interval from ${SEEDER_INTERVAL:100ms}, and a Bloblang `mapping` block that builds the event root.", + "example": "input:\n generate:\n count: 0\n interval: \"${SEEDER_INTERVAL:100ms}\"" + }, + { + "name": "CloudEvents 1.0 envelope", + "description": "root must be a CloudEvent: id (uuid_v4()), specversion \"1.0\", type, source \"demo-org-seeder\", subject, time (now()), and a scenario-specific data object.", + "example": "root = { \"id\": uuid_v4(), \"specversion\": \"1.0\", \"type\": $event_type, \"source\": $source, ... }" + }, + { + "name": "Subject fan-out via SEEDER_SUBJECT_COUNT", + "description": "subject is `demo-subject-%d` modulo ${SEEDER_SUBJECT_COUNT:1000} so events spread across a configurable number of synthetic customers.", + "example": "let subject = \"demo-subject-%d\".format(random_int(seed: timestamp_unix_nano()) % $subject_count)" + }, + { + "name": "Random selection from literal lists", + "description": "Categorical fields (methods, routes, models, regions, instance_types) are chosen with `$list.index(random_int(seed: timestamp_unix_nano()) % $list.length())`.", + "example": "let model = $models.index(random_int(seed: timestamp_unix_nano()) % $models.length())" + }, + { + "name": "Switch output: ingest + optional log", + "description": "output.switch has two cases: an always-true case (check: \"\") with continue:true that POSTs to the events endpoint, then a gated stdout case enabled by SEEDER_LOG.", + "example": "- check: \"\"\n continue: true\n output:\n http_client: { ... }\n- check: '\"${SEEDER_LOG:false}\" == \"true\"'\n output:\n stdout: { codec: lines }" + }, + { + "name": "HTTP client to /api/v1/events", + "description": "POST to ${OPENMETER_BASE_URL:http://127.0.0.1:8888}/api/v1/events with Content-Type application/cloudevents+json, Bearer ${OPENMETER_TOKEN:}, max_in_flight 256.", + "example": "http_client:\n url: ${OPENMETER_BASE_URL:http://127.0.0.1:8888}/api/v1/events\n verb: POST\n headers: { Content-Type: application/cloudevents+json, Authorization: \"Bearer ${OPENMETER_TOKEN:}\" }" + }, + { + "name": "Env-var defaults for everything", + "description": "All tunables use ${VAR:default} syntax (SEEDER_INTERVAL, SEEDER_SUBJECT_COUNT, SEEDER_LOG, OPENMETER_BASE_URL, OPENMETER_TOKEN) so a stream runs with zero config.", + "example": "interval: \"${SEEDER_INTERVAL:100ms}\"" + } + ], + "key_file_guides": [ + { + "file": "api-requests.yaml", + "role": "Generates `request` events with data.method (GET/POST) and data.path (one of /, /about, /contact, /pricing, /docs).", + "watch_for": "type must stay \"request\" to match the corresponding meter/event-type definition consuming it." + }, + { + "file": "prompt-tokens.yaml", + "role": "Generates `prompt` events with data.tokens (random_int min:100 max:1000), data.model (OpenAI model list), data.type (input/output).", + "watch_for": "data.tokens is the numeric value meters aggregate; keep it under the `tokens` key and named model list aligned with demo meters." + }, + { + "file": "workload-runtime.yaml", + "role": "Generates `workload` events with data.duration_seconds (random_int max:1000), data.region, data.zone (region+suffix), data.instance_type.", + "watch_for": "zone is composed as region+suffix via %s%s.format; duration_seconds has no min so 0 is possible." + } + ], + "anti_patterns": [ + "Hardcoding the OpenMeter URL or token instead of using ${OPENMETER_BASE_URL}/${OPENMETER_TOKEN} env defaults.", + "Omitting required CloudEvents envelope fields (id, specversion, type, source, subject, time) \u2014 ingest rejects malformed events.", + "Sending Content-Type other than application/cloudevents+json for the JSON CloudEvent body.", + "Dropping the continue:true on the ingest case, which would short-circuit the optional SEEDER_LOG stdout output.", + "Setting generate.count to a non-zero value, which stops the stream after N events instead of seeding continuously." + ], + "decisions": [ + { + "decision": "Use Benthos/Redpanda Connect generate-input streams rather than a custom seeder binary.", + "rationale": "Declarative Bloblang config makes synthetic-event scenarios easy to author and tune via env vars without code." + }, + { + "decision": "One file per usage-metering scenario sharing an identical envelope + output structure.", + "rationale": "Each demonstrates a distinct meter type (requests, tokens, runtime) while keeping ingest wiring uniform and copy-pasteable for new scenarios." + } + ], + "code_examples": [ + { + "scenario": "Add a new seed stream: continuous CloudEvents generator POSTing to the ingest API", + "code": "input:\n generate:\n count: 0\n interval: \"${SEEDER_INTERVAL:100ms}\"\n mapping: |\n let subject_count = ${SEEDER_SUBJECT_COUNT:1000}\n let subject = \"demo-subject-%d\".format(random_int(seed: timestamp_unix_nano()) % $subject_count)\n root = {\n \"id\": uuid_v4(),\n \"specversion\": \"1.0\",\n \"type\": \"my_event\",\n \"source\": \"demo-org-seeder\",\n \"subject\": $subject,\n \"time\": now(),\n \"data\": { \"value\": random_int(seed: timestamp_unix_nano(), max: 1000) },\n }\noutput:\n switch:\n cases:\n - check: \"\"\n continue: true\n output:\n http_client:\n url: ${OPENMETER_BASE_URL:http://127.0.0.1:8888}/api/v1/events\n verb: POST\n headers:\n Content-Type: application/cloudevents+json\n Authorization: \"Bearer ${OPENMETER_TOKEN:}\"\n max_in_flight: 256\n - check: '\"${SEEDER_LOG:false}\" == \"true\"'\n output:\n stdout:\n codec: lines" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w52.json b/.archie/enrichments/w52.json new file mode 100644 index 0000000000..dd90acbd35 --- /dev/null +++ b/.archie/enrichments/w52.json @@ -0,0 +1,189 @@ +{ + "openmeter/apiconverter": { + "purpose": "Boundary converters that map v1 API filter/pagination types (api package) to internal pkg/filter and pkg/pagination types and back. Its primary constraint: the actual field-mapping logic is goverter-generated and must never be hand-edited.", + "patterns": [ + { + "name": "goverter variable converters", + "description": "Converter funcs are declared as package-level var func signatures in filter.go under a `// goverter:variables` block; the bodies are generated into filter.gen.go. Add a new conversion by declaring its signature here, not by writing the body.", + "example": "ConvertString func(api.FilterString) filter.FilterString" + }, + { + "name": "Ptr / Map variants per type", + "description": "Each base converter has paired Ptr and Map/MapPtr variants (e.g. ConvertString, ConvertStringPtr, ConvertStringMap, ConvertStringMapPtr) that nil-guard and delegate to the base converter.", + "example": "ConvertStringPtr returns nil when source is nil, else &ConvertString(*source)" + }, + { + "name": "goverter:ignore for API/internal field drift", + "description": "Fields present on internal filter types but absent from v1 api types are silenced with `// goverter:ignore ` directives above the var. When v1 grows the field, remove the ignore so it copies through instead of being silently dropped.", + "example": "// goverter:ignore Exists Contains Ncontains above ConvertString" + }, + { + "name": "Hand-written non-goverter converters", + "description": "Pagination cursor conversion (cursor.go) is hand-written and delegates to pagination.DecodeCursor; it is NOT under goverter generation.", + "example": "func ConvertCursor(s api.CursorPaginationCursor) (*pagination.Cursor, error) { return pagination.DecodeCursor(s) }" + } + ], + "key_file_guides": [ + { + "file": "filter.go", + "role": "Source of truth: goverter var declarations and ignore/skip directives; has `//go:generate ... goverter gen ./` and `// goverter:skipCopySameType`.", + "watch_for": "Editing converter bodies here does nothing \u2014 only signatures and goverter comments matter. Adding a field to internal filter without an ignore entry breaks generation." + }, + { + "file": "filter.gen.go", + "role": "Generated converter bodies wired in init(); also contains the private filterFilterStringToApiFilterString helper for the reverse direction.", + "watch_for": "Marked DO NOT EDIT and `//go:build !goverter`. Regenerate via go generate / make generate after changing filter.go." + }, + { + "file": "cursor.go", + "role": "Hand-written cursor converters wrapping pagination/v2 DecodeCursor.", + "watch_for": "Imports pkg/pagination/v2 (not v1). Keep nil-guarding in the Ptr variant." + } + ], + "anti_patterns": [ + "Hand-editing filter.gen.go instead of regenerating from filter.go.", + "Adding a filter operator to internal types without removing the matching goverter:ignore (silently dropped at the boundary).", + "Writing bespoke field-copy logic in filter.go function declarations \u2014 bodies belong to goverter." + ], + "decisions": [ + { + "decision": "Use goverter codegen for API<->internal filter mapping.", + "rationale": "Filter types have many operators (Eq/Ne/Gt/In/Like/And/Or...); generation avoids error-prone manual copies and makes drift between API and internal types explicit via ignore directives." + } + ], + "code_examples": [ + { + "scenario": "Declare a new generated converter with field-drift ignores", + "code": "// goverter:variables\n// goverter:skipCopySameType\nvar (\n\t// goverter:ignore Exists Contains Ncontains\n\tConvertString func(api.FilterString) filter.FilterString\n\tConvertStringPtr func(*api.FilterString) *filter.FilterString\n)" + } + ] + }, + "openmeter/session": { + "purpose": "Defines the request-scoped AuthenticationSession (org/user identity + permissions) and context helpers to store/retrieve it. It is the single source of authenticated identity consumed across app, customer, meter, subscription and productcatalog packages.", + "patterns": [ + { + "name": "Context-keyed session storage", + "description": "Session is stored/retrieved via a typed context key (AuthenticatorContextKey) using GetActiveSession with a type-asserted ctx.Value lookup that returns nil when absent.", + "example": "if c, ok := ctx.Value(AuthenticationSessionKey).(*AuthenticationSession); ok { return c }" + }, + { + "name": "Validated constructor", + "description": "NewAuthenticationSession builds the struct then calls Validate() and returns an error rather than an invalid session; OrgID and (OrgRole or OrgPermissions) are required.", + "example": "if err := session.Validate(); err != nil { return nil, fmt.Errorf(...) }" + }, + { + "name": "errors.Join validation", + "description": "Validate() collects into `var errs []error` and returns errors.Join(errs...), matching the repo-wide validation convention.", + "example": "errs = append(errs, errors.New(\"orgID is required\"))" + }, + { + "name": "Nil-safe accessors", + "description": "GetSessionUserID returns *string and yields nil for missing session or empty UserID, so callers can distinguish absence from empty.", + "example": "GetSessionUserID(ctx) returns nil when no active session" + } + ], + "key_file_guides": [ + { + "file": "session.go", + "role": "Entire package: AuthenticationSession struct, context key, GetActiveSession/GetSessionUserID accessors, NewAuthenticationSession constructor, Validate(), and WithLogger.", + "watch_for": "AuthenticationSessionKey is the constant string \"active_organization_id\" typed as AuthenticatorContextKey \u2014 use the typed key, never a raw string, or the type assertion in GetActiveSession will miss it." + } + ], + "anti_patterns": [ + "Constructing AuthenticationSession literals directly without Validate() (bypasses required-field checks).", + "Storing/reading the session under a plain string context key instead of AuthenticationSessionKey.", + "Assuming GetActiveSession never returns nil \u2014 callers must nil-check." + ], + "decisions": [ + { + "decision": "Identity is org-centric with permission list plus role.", + "rationale": "Validate accepts either OrgRole or OrgPermissions, supporting both role-based and explicit-permission auth models in a multi-tenant system." + } + ], + "code_examples": [ + { + "scenario": "Read the active org/user from context", + "code": "import \"github.com/openmeterio/openmeter/openmeter/session\"\n\nif s := session.GetActiveSession(ctx); s != nil {\n\tlog = s.WithLogger(log)\n\t_ = s.OrgID\n}" + } + ] + }, + "openmeter/testutils": { + "purpose": "Shared, framework-light test helpers used across nearly every domain package: Postgres test DB provisioning, loggers, deterministic name generation, time helpers, and async polling. Constraint: keep it dependency-light (only pkg/framework) so it never creates import cycles with app/common wiring.", + "patterns": [ + { + "name": "pgtestdb-backed isolated DBs", + "description": "InitPostgresDB provisions a per-test template-cloned Postgres DB via pgtestdb.Custom, wrapping it in pgdriver + entdriver, returned as TestDB with a Close(t) cleanup. Skips the test when POSTGRES_HOST is unset.", + "example": "db := testutils.InitPostgresDB(t); defer db.Close(t)" + }, + { + "name": "Functional options for DB setup", + "description": "InitPostgresDB takes Option values (WithPostgresConfig, WithMigrator, WithDriverOptions) implemented via the optionFunc/apply pattern.", + "example": "InitPostgresDB(t, WithMigrator(&NoopMigrator{}))" + }, + { + "name": "t.Helper + t.Context discipline", + "description": "Helpers call t.Helper() and use t.Context() (not context.Background) so failures attribute to the caller and lifecycle ties to the test.", + "example": "func NewLogger(t testing.TB) *slog.Logger { t.Helper(); ... }" + }, + { + "name": "Deterministic-ish name generation", + "description": "NameGenerator (package-level singleton) yields a GeneratedName{Key, Name} where Key is the lowercased, dash-joined slug of Name, via forscht/namegen adjective+animal dictionaries.", + "example": "n := testutils.NameGenerator.Generate(); n.Key, n.Name" + }, + { + "name": "Async assertion wrapper", + "description": "EventuallyWithTf wraps require.EventuallyWithTf, capturing the last saved error via a sync.Map so the eventual failure message carries it.", + "example": "EventuallyWithTf(t, fn, wait, interval)" + } + ], + "key_file_guides": [ + { + "file": "pg_driver.go", + "role": "TestDB type plus InitPostgresDB; NoopMigrator (currently a no-op, see `TODO: fix migrations`).", + "watch_for": "Default migrator is NoopMigrator \u2014 schema is NOT migrated by default; callers needing a schema must pass WithMigrator. Test SKIPS (not fails) when POSTGRES_HOST is empty." + }, + { + "file": "logger.go", + "role": "NewLogger (slog.Default) and NewDiscardLogger for quiet tests.", + "watch_for": "Contains a local discardHandler copy marked TODO-removable once min Go has slog.DiscardHandler." + }, + { + "file": "namegen.go", + "role": "Random unique Key/Name generator seeded by time for test fixtures.", + "watch_for": "Seeded with time.Now().UnixNano() \u2014 names are not reproducible across runs; do not assert on exact values." + }, + { + "file": "time.go", + "role": "GetRFC3339Time parse helper and TimeEqualsApproximately tolerance assertion.", + "watch_for": "Both t.Fatalf on mismatch; GetRFC3339Time expects strict RFC3339 input." + }, + { + "file": "async.go", + "role": "EventuallyWithTf polling helper around testify.", + "watch_for": "saveErr stores into a sync.Map under a fixed key; only the last error is surfaced." + } + ], + "anti_patterns": [ + "Importing app/common or domain wiring here \u2014 would create test-only import cycles; keep deps to pkg/framework.", + "Assuming InitPostgresDB ran migrations (default NoopMigrator does nothing).", + "Asserting exact generated names from NameGenerator (time-seeded, non-deterministic).", + "Using context.Background() in helpers instead of t.Context()." + ], + "decisions": [ + { + "decision": "Use pgtestdb template-cloning for per-test isolated databases.", + "rationale": "Gives each test a fresh, fast-cloned Postgres without cross-test contamination, while skipping cleanly when no Postgres host is configured." + }, + { + "decision": "Keep the package framework-only.", + "rationale": "It is imported by almost every domain package's tests; broad dependencies would risk import cycles and slow compilation." + } + ], + "code_examples": [ + { + "scenario": "Spin up an isolated Postgres-backed test DB", + "code": "import \"github.com/openmeterio/openmeter/openmeter/testutils\"\n\nfunc TestX(t *testing.T) {\n\tdb := testutils.InitPostgresDB(t)\n\tdefer db.Close(t)\n\tclient := db.EntDriver.Client()\n\t_ = client\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w53.json b/.archie/enrichments/w53.json new file mode 100644 index 0000000000..eb8c6e4ffd --- /dev/null +++ b/.archie/enrichments/w53.json @@ -0,0 +1,313 @@ +{ + "openmeter/app/adapter": { + "purpose": "Ent-backed persistence layer for the app/marketplace framework. Implements app.Adapter (app CRUD, app-customer links) plus the in-memory marketplace registry (app.AppType -> app.RegistryItem) that drives app installation via per-type factories.", + "patterns": [ + { + "name": "Transaction-aware repo via entutils", + "description": "Write methods wrap bodies in transaction.Run/RunWithNoValue + entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter)...) so they rebind to the tx client carried in ctx. The adapter implements Tx/WithTx/Self for entutils.TxCreator.", + "example": "func (a *adapter) CreateApp(...) { return transaction.Run(ctx, a, func(ctx) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter){ repo.db.App.Create()... }) }) }" + }, + { + "name": "Registry is an in-memory map, not a table", + "description": "Marketplace listings live in adapter.registry map[app.AppType]app.RegistryItem populated by RegisterMarketplaceListing at wiring time; List/GetMarketplaceListing read from it, they never hit the DB.", + "example": "a.registry[input.Listing.Type] = input" + }, + { + "name": "DB rows mapped through factory to live App", + "description": "GetApp/ListApps load *db.App, look up the RegistryItem by Type, then mapAppFromDB calls registryItem.Factory.NewApp(ctx, appBase) to produce the typed app.App. Never return raw db rows.", + "example": "mapAppFromDB(ctx, dbApp, registryItem) -> registryItem.Factory.NewApp(ctx, appBase)" + }, + { + "name": "Soft delete via DeletedAt", + "description": "Apps and app-customer links are soft-deleted with SetDeletedAt(time.Now()); queries filter DeletedAtIsNil() unless IncludeDeleted. UninstallApp also calls Factory.UninstallApp before marking deleted.", + "example": "query = query.Where(appdb.DeletedAtIsNil())" + }, + { + "name": "Upsert app-customer with conflict-on-not-deleted", + "description": "EnsureCustomer uses OnConflict over (namespace, app_id, customer_id) with ConflictWhere IsNull(deleted_at) to restore/upsert links; constraint errors are mapped to NewAppNotFoundError.", + "example": "OnConflict(sql.ConflictColumns(...), sql.ConflictWhere(sql.IsNull(appcustomerdb.FieldDeletedAt))).UpdateDeletedAt()" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client *entdb.Client} + New(); adapter struct holds db + registry; Tx/WithTx/Self implement entutils tx interface", + "watch_for": "WithTx must propagate the registry map to the new tx-bound adapter or marketplace lookups break inside transactions" + }, + { + "file": "app.go", + "role": "App CRUD (CreateApp/GetApp/ListApps/UpdateApp/UninstallApp) + mapAppBaseFromDB/mapAppFromDB", + "watch_for": "GetApp returns NewAppNotFoundError on db.IsNotFound; UninstallApp must call Factory.UninstallApp before soft delete" + }, + { + "file": "customer.go", + "role": "ListCustomerData/EnsureCustomer/DeleteCustomer for app-customer links", + "watch_for": "Ent issue #1821 workaround: treats 'sql: no rows in result set' from upsert DoNothing as success" + }, + { + "file": "marketplace.go", + "role": "Registry-backed listing + install (InstallMarketplaceListing[WithAPIKey]); RegisterMarketplaceListing validates + rejects duplicates", + "watch_for": "Install branches on Factory satisfying app.AppFactoryInstall / AppFactoryInstallWithAPIKey via type assertion; Oauth2 methods return 'not implemented'" + } + ], + "anti_patterns": [ + "Calling repo.db.* directly inside a write method without wrapping in entutils.TransactingRepo/transaction.Run", + "Persisting marketplace listings to the DB instead of the in-memory registry map", + "Returning raw *db.App instead of routing through Factory.NewApp", + "Hard-deleting apps/app-customer rows instead of setting DeletedAt" + ], + "decisions": [ + { + "decision": "Marketplace registry is process-local in-memory state on the adapter", + "rationale": "App types are compiled-in plugins registered at startup; their factories cannot be serialized, so listings live in memory not Postgres" + }, + { + "decision": "App identity split into db row + factory-built behavior", + "rationale": "DB stores generic app metadata; type-specific behavior (Stripe, sandbox, custom invoicing) is constructed lazily by the registered Factory" + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware create that maps a db row to a typed app via the registry", + "code": "func (a *adapter) CreateApp(ctx context.Context, input app.CreateAppInput) (app.AppBase, error) {\n\treturn transaction.Run(ctx, a, func(ctx context.Context) (app.AppBase, error) {\n\t\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (app.AppBase, error) {\n\t\t\tdbApp, err := repo.db.App.Create().SetNamespace(input.Namespace).SetType(input.Type).SetStatus(app.AppStatusReady).Save(ctx)\n\t\t\tif err != nil { return app.AppBase{}, err }\n\t\t\tregistryItem, err := repo.GetMarketplaceListing(ctx, app.MarketplaceGetInput{Type: dbApp.Type})\n\t\t\tif err != nil { return app.AppBase{}, err }\n\t\t\treturn mapAppBaseFromDB(dbApp, registryItem), nil\n\t\t})\n\t})\n}" + } + ] + }, + "openmeter/app/httpdriver": { + "purpose": "HTTP transport layer for the app/marketplace API: app CRUD, app-customer data upsert/list/delete, and marketplace listing/install endpoints. Each endpoint is a typed httptransport handler that decodes requests, calls app.Service, and maps domain apps to api.* discriminated unions.", + "patterns": [ + { + "name": "httptransport.NewHandlerWithArgs triple", + "description": "Every endpoint is built from (decode func, business func, encoder) plus AppendOptions(h.options, WithOperationName(...)). Request/Response types are aliased to api.* or app.* via type ( ... = ... ) blocks.", + "example": "httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listApps\"))...)" + }, + { + "name": "Namespace from request context", + "description": "Decode funcs call h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace(ctx); failure is a 500 HTTPError. Never trust a namespace from the body.", + "example": "namespace, err := h.resolveNamespace(ctx)" + }, + { + "name": "Discriminated-union dispatch on app type", + "description": "Update/customer-data handlers call body.Discriminator() then switch on app.AppTypeStripe/Sandbox/CustomInvoicing, parsing via body.AsStripeAppReplaceUpdate() etc.; unknown types return NewGenericValidationError.", + "example": "switch updateType { case string(app.AppTypeStripe): body.AsStripeAppReplaceUpdate() ... }" + }, + { + "name": "Typed map functions to/from api.App", + "description": "mapper.go centralizes MapAppToAPI / MapEventAppToAPI / ToAPIStripeCustomerAppData / fromAPIAppStripeCustomerData and per-type mapStripeAppToAPI/mapSandboxAppToAPI/mapCustomInvoicingAppToAPI, building api.App via FromStripeApp/FromSandboxApp/FromCustomInvoicingApp.", + "example": "app := api.App{}; app.FromStripeApp(mapStripeAppToAPI(stripeApp.Meta))" + }, + { + "name": "Cross-service orchestration in handler body", + "description": "Handlers reach into billingService and stripeAppService for side effects: UninstallApp checks billingService.IsAppUsed first; install handlers optionally createBillingProfile/makeStripeDefaultBillingApp.", + "example": "if err := h.billingService.IsAppUsed(ctx, request); err != nil { return nil, err }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/AppHandler interfaces, handler struct (service, stripeAppService, billingService, customerService, namespaceDecoder, options), New() constructor, resolveNamespace", + "watch_for": "New() positional args must match wiring order; resolveNamespace returns 500 not 400 when namespace missing" + }, + { + "file": "app.go", + "role": "ListApps/GetApp/UpdateApp/UninstallApp handlers; UpdateApp dispatches on Discriminator to build AppConfigUpdate per type", + "watch_for": "UpdateApp embeds the per-type Configuration (appstripe.Configuration etc.) in AppConfigUpdate; missing a new app type here silently rejects updates" + }, + { + "file": "customer.go", + "role": "ListCustomerData/UpsertCustomerData/DeleteCustomerData + toCustomerData/resolveCustomerApp/toAPICustomerAppData", + "watch_for": "All three first GetCustomer and reject deleted customers with NewGenericPreConditionFailedError; resolveCustomerApp falls back to billingService.GetCustomerApp when no appID given" + }, + { + "file": "marketplace.go", + "role": "ListMarketplaceListings/GetMarketplaceListing/MarketplaceAppInstall[APIKey] + createBillingProfile/makeStripeDefaultBillingApp/mapMarketplaceListing", + "watch_for": "createBillingProfile only implemented for Stripe (sandbox/custom-invoicing are TODO nil); makeStripeDefaultBillingApp only sets default when current default is the sandbox app" + }, + { + "file": "mapper.go", + "role": "Domain<->api.App conversions for all app types and stripe customer data", + "watch_for": "MapAppToAPI/MapEventAppToAPI use unchecked type assertions item.(appstripe.App); a new app type must be added in every switch or it returns 'unsupported app type'" + } + ], + "anti_patterns": [ + "Reading namespace from request body/params instead of resolveNamespace(ctx)", + "Adding a new app type without extending every Discriminator switch (UpdateApp, toCustomerData, toAPICustomerAppData, MapAppToAPI, createBillingProfile)", + "Putting business/persistence logic in handlers instead of delegating to app.Service", + "Returning raw errors without wrapping; handlers consistently wrap with fmt.Errorf context" + ], + "decisions": [ + { + "decision": "App types are surfaced as oapi-codegen discriminated unions (api.App, api.CustomerAppData)", + "rationale": "TypeSpec models each app variant separately; handlers must Discriminator()/As*()/From*() to bridge the union to typed domain apps" + }, + { + "decision": "Install endpoints optionally provision a billing profile", + "rationale": "Installing Stripe should make it the default billing app when only the sandbox is configured, removing a manual setup step" + } + ], + "code_examples": [ + { + "scenario": "Discriminated-union request decode for UpdateApp", + "code": "updateType, err := body.Discriminator()\nif err != nil { return UpdateAppRequest{}, models.NewGenericValidationError(err) }\nswitch updateType {\ncase string(app.AppTypeStripe):\n\tpayload, err := body.AsStripeAppReplaceUpdate()\n\tif err != nil { return UpdateAppRequest{}, err }\n\treturn UpdateAppRequest{AppID: app.AppID{ID: appId, Namespace: namespace}, Name: payload.Name, AppConfigUpdate: appstripe.Configuration{SecretAPIKey: payload.SecretAPIKey}}, nil\ndefault:\n\treturn UpdateAppRequest{}, models.NewGenericValidationError(fmt.Errorf(\"invalid app type: %s\", updateType))\n}" + } + ] + }, + "openmeter/app/sandbox": { + "purpose": "Reference/test app implementation of the app framework: a no-credentials Sandbox app that satisfies customerapp.App and billing.InvoicingApp (+PostAdvanceHook) to let OpenMeter run invoicing end-to-end without external integrations. Also provides AutoProvision and a mockable factory for tests.", + "patterns": [ + { + "name": "Compile-time interface assertions", + "description": "App and CustomerData are pinned to their contracts with var _ blocks: customerapp.App, billing.InvoicingApp, billing.InvoicingAppPostAdvanceHook, app.CustomerData, app.EventAppParser. Adding/removing methods must keep these satisfied.", + "example": "var _ billing.InvoicingApp = (*App)(nil)" + }, + { + "name": "Factory registers itself in the marketplace", + "description": "NewFactory(config) validates config then calls config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact}); the Factory implements NewApp/InstallAppWithAPIKey/UninstallApp.", + "example": "config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact})" + }, + { + "name": "Invoicing hooks delegate to billing.Service helpers", + "description": "FinalizeStandardInvoice generates a number via billingService.GenerateInvoiceSequenceNumber(...) with the package-level InvoiceSequenceNumber definition; results are built with billing.NewFinalize/UpsertStandardInvoiceResult fluent setters.", + "example": "billing.NewFinalizeStandardInvoiceResult().SetInvoiceNumber(invoiceNumber).SetSentToCustomerAt(clock.Now())" + }, + { + "name": "Simulated payment via metadata-driven triggers", + "description": "PostAdvanceStandardInvoiceHook only acts on PaymentProcessingPending, reads TargetPaymentStatusMetadataKey from invoice metadata, and returns out.InvokeTrigger(billing.InvoiceTriggerInput{...}) with TriggerPaid/Failed/Uncollectible/ActionRequired.", + "example": "out.InvokeTrigger(billing.InvoiceTriggerInput{Invoice: invoice.GetInvoiceID(), Trigger: billing.TriggerPaid})" + }, + { + "name": "Mockable factory wrapping the real one", + "description": "MockableFactory embeds *Factory and overrideFactory; EnableMock(t) swaps NewApp to return a recording mockAppInstance; MockApp uses mo.Option fields + AssertExpectations for call verification.", + "example": "fact.EnableMock(t) returns *MockApp; NewApp delegates to overrideFactory when set" + } + ], + "key_file_guides": [ + { + "file": "app.go", + "role": "Meta (embeds app.AppBase), App, CustomerData, Factory, Config; all invoicing/customer-data methods; PostAdvanceStandardInvoiceHook payment simulation", + "watch_for": "Most customer-data/invoice methods are intentional no-ops returning empty results; FinalizeStandardInvoice needs a non-nil billingService" + }, + { + "file": "marketplace.go", + "role": "MarketplaceListing + Collect/CalculateTax/InvoiceCustomer capabilities; InstallMethodNoCredentials", + "watch_for": "Capabilities listed here must match what ValidateCapabilities enforces in ValidateCustomer" + }, + { + "file": "helpers.go", + "role": "AutoProvision + AutoProvisionInput: installs a default Sandbox app on first run if none exists", + "watch_for": "AutoProvision returns the first existing sandbox app when one is present; do not assume it always creates" + }, + { + "file": "errors.go", + "role": "ErrSimulatedPaymentFailure as a billing.NewValidationError", + "watch_for": "Used as the validation error attached to TriggerFailed in the post-advance hook" + }, + { + "file": "mock.go", + "role": "MockApp, mockAppInstance, MockableFactory, NewMockableFactory, MockWithAppType", + "watch_for": "MockApp methods use mo.Option.MustGet() and panic if a response was not set via On*; Reset(t) asserts expectations and clears state" + }, + { + "file": "config.go", + "role": "Empty Configuration{} with no-op Validate (sandbox has no config)", + "watch_for": "Update flows still pass appsandbox.Configuration{} as AppConfigUpdate" + } + ], + "anti_patterns": [ + "Breaking a var _ interface assertion by changing a method signature without updating the contract", + "Adding real external calls to the sandbox app (it must run with InstallMethodNoCredentials and no credentials)", + "Forgetting to register the listing in NewFactory so the app type is unknown to the registry", + "Returning payment triggers from PostAdvanceStandardInvoiceHook when status is not PaymentProcessingPending" + ], + "decisions": [ + { + "decision": "Sandbox is auto-provisioned by default at namespace setup", + "rationale": "Lets users exercise billing/invoicing immediately without configuring Stripe or another external provider" + }, + { + "decision": "Payment outcome is controllable via invoice metadata", + "rationale": "Enables unit and customer tests to deterministically simulate paid/failed/uncollectible/action-required flows through the real advance machinery" + } + ], + "code_examples": [ + { + "scenario": "Self-registering factory implementing the app plugin contract", + "code": "func NewFactory(config Config) (*Factory, error) {\n\tif err := config.Validate(); err != nil { return nil, err }\n\tfact := &Factory{appService: config.AppService, billingService: config.BillingService}\n\tif err := config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact}); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to register marketplace listing: %w\", err)\n\t}\n\treturn fact, nil\n}" + } + ] + }, + "openmeter/app/service": { + "purpose": "Service layer for the app/marketplace framework: thin orchestration over app.Adapter that validates inputs, runs transactions, and publishes domain events. Implements app.Service (app CRUD, app-customer data, marketplace listing/install).", + "patterns": [ + { + "name": "Validate-then-delegate", + "description": "Every public method calls input.Validate() first and wraps the error in models.NewGenericValidationError before delegating to s.adapter. Read methods are pure pass-throughs after validation.", + "example": "if err := input.Validate(); err != nil { return ..., models.NewGenericValidationError(err) }; return s.adapter.GetApp(ctx, input)" + }, + { + "name": "Publish events after mutations", + "description": "Create/Update/Uninstall/UpdateAppStatus emit events via s.publisher.Publish: app.NewAppCreateEvent, NewAppUpdateEvent, NewAppDeleteEvent. UninstallApp captures existingApp.GetEventAppData() before delete.", + "example": "event := app.NewAppCreateEvent(ctx, appBase); s.publisher.Publish(ctx, event)" + }, + { + "name": "Transaction wraps multi-step updates", + "description": "UpdateApp runs inside transaction.Run(ctx, s.adapter, ...) so the adapter update, per-app UpdateAppConfig, re-fetch, and event publish are atomic.", + "example": "transaction.Run(ctx, s.adapter, func(ctx) { adapter.UpdateApp(...); updatedApp.UpdateAppConfig(...); publish(...) })" + }, + { + "name": "App-config update routed to the typed app", + "description": "When input.AppConfigUpdate != nil, the service calls updatedApp.UpdateAppConfig(ctx, ...) on the typed app then re-fetches via adapter.GetApp to return fresh state.", + "example": "if input.AppConfigUpdate != nil { updatedApp.UpdateAppConfig(ctx, input.AppConfigUpdate); updatedApp, _ = s.adapter.GetApp(ctx, input.AppID) }" + }, + { + "name": "Constructor with required deps", + "description": "Service{adapter, publisher}; Config.Validate rejects nil adapter or publisher; New(config) returns *Service. No slog.Default fallbacks.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{...}, nil }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct + Config + Validate + New; pins var _ app.Service = (*Service)(nil)", + "watch_for": "Both adapter and publisher are mandatory; do not introduce a default publisher" + }, + { + "file": "app.go", + "role": "CreateApp/GetApp/UpdateApp/ListApps/UninstallApp/UpdateAppStatus with validation + event publishing", + "watch_for": "UpdateApp must re-fetch after UpdateAppConfig so the published event/return reflect config changes; UninstallApp reads EventAppData from the existing app before deletion" + }, + { + "file": "customer.go", + "role": "ListCustomerData/EnsureCustomer/DeleteCustomer as direct adapter pass-throughs", + "watch_for": "These do not re-validate (validation happens in adapter/http layer); no events emitted here" + }, + { + "file": "marketplace.go", + "role": "RegisterMarketplaceListing + Get/List/Install[WithAPIKey] + Oauth2 install URL/authorize, all validate-then-delegate", + "watch_for": "Oauth2 methods delegate to adapter which returns 'not implemented'" + } + ], + "anti_patterns": [ + "Skipping input.Validate()/NewGenericValidationError before calling the adapter on mutating methods", + "Performing multi-step mutations (update + config + event) outside transaction.Run", + "Publishing events before the adapter mutation succeeds, or omitting events on create/update/delete", + "Putting Ent/SQL access in the service instead of delegating to app.Adapter" + ], + "decisions": [ + { + "decision": "Service is a validation + eventing wrapper, persistence lives in the adapter", + "rationale": "Standard OpenMeter service/adapter split keeps DB concerns isolated and makes events a service-layer responsibility" + }, + { + "decision": "UpdateApp re-fetches after applying typed AppConfigUpdate", + "rationale": "App config is stored in app-type-specific entities, so the generic app row must be reloaded to emit an accurate update event" + } + ], + "code_examples": [ + { + "scenario": "Transactional update applying typed config then publishing an event", + "code": "func (s *Service) UpdateApp(ctx context.Context, input app.UpdateAppInput) (app.App, error) {\n\tif err := input.Validate(); err != nil { return nil, models.NewGenericValidationError(err) }\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (app.App, error) {\n\t\tupdatedApp, err := s.adapter.UpdateApp(ctx, input)\n\t\tif err != nil { return nil, err }\n\t\tif input.AppConfigUpdate != nil {\n\t\t\tif err := updatedApp.UpdateAppConfig(ctx, input.AppConfigUpdate); err != nil { return nil, err }\n\t\t\tif updatedApp, err = s.adapter.GetApp(ctx, input.AppID); err != nil { return nil, err }\n\t\t}\n\t\tevent, err := app.NewAppUpdateEvent(ctx, updatedApp)\n\t\tif err != nil { return nil, err }\n\t\treturn updatedApp, s.publisher.Publish(ctx, event)\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w54.json b/.archie/enrichments/w54.json new file mode 100644 index 0000000000..a78f463468 --- /dev/null +++ b/.archie/enrichments/w54.json @@ -0,0 +1,246 @@ +{ + "openmeter/app/custominvoicing/adapter": { + "purpose": "Ent-backed persistence layer for the custom-invoicing app: stores per-app sync-hook configuration (AppCustomInvoicing) and per-customer external-system data (AppCustomInvoicingCustomer). Implements the appcustominvoicing.Adapter / AppConfigAdapter interfaces.", + "patterns": [ + { + "name": "Transaction-aware adapter with Tx/WithTx/Self", + "description": "adapter implements the entutils transacting contract: Tx hijacks an Ent tx, WithTx rebinds the client from raw config, Self returns itself. Every query method body is wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue so it joins any tx already in ctx.", + "example": "func (a *adapter) GetAppConfiguration(ctx, input) (Configuration, error) { return entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter) (...){ tx.db.AppCustomInvoicing.Query()... }) }" + }, + { + "name": "Config-validated constructor", + "description": "New(Config) validates Client and Logger are non-nil before returning the appcustominvoicing.Adapter interface; compile-time assert `var _ appcustominvoicing.Adapter = (*adapter)(nil)`.", + "example": "func New(config Config) (appcustominvoicing.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Soft delete via DeletedAt + IsNotFound returns empty", + "description": "Queries always filter DeletedAtIsNil(); deletes SetDeletedAt(time.Now()) instead of physical delete. Get-style methods translate db.IsNotFound into a zero-value struct + nil error rather than an error.", + "example": "if db.IsNotFound(err) { return custominvoicing.Configuration{}, nil }" + }, + { + "name": "Upsert via OnConflict + Update partial columns", + "description": "Writes use Create().OnConflict... .UpdateNewValues() (config) or sql.ConflictColumns/ConflictWhere with UpdateMetadata()/UpdateDeletedAt() (customer data) so re-installs and metadata refreshes are idempotent. Customer-data conflict target is scoped by a partial unique index ConflictWhere(IsNull(FieldDeletedAt)).", + "example": "Create().OnConflict(sql.ConflictColumns(FieldCustomerID, FieldNamespace, FieldAppID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt))).UpdateMetadata().UpdateDeletedAt().Exec(ctx)" + }, + { + "name": "Input validation at adapter boundary", + "description": "Customer-data methods call input.Validate() before touching the DB; appconfig methods do not (callers validate upstream).", + "example": "if err := input.Validate(); err != nil { return appcustominvoicing.CustomerData{}, err }" + }, + { + "name": "DB->domain mapping helpers", + "description": "Lowercase mapDBToAppConfiguration / mapDBToCustomerData translate the generated db.* row into the domain struct; never expose db.* types outward.", + "example": "func mapDBToAppConfiguration(appConfig *db.AppCustomInvoicing) custominvoicing.Configuration { return custominvoicing.Configuration{EnableDraftSyncHook: appConfig.EnableDraftSyncHook, ...} }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "adapter struct, Config/Validate, New constructor, Tx/WithTx/Self transaction plumbing", + "watch_for": "WithTx must rebuild via entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); don't reuse the outer a.db inside a tx" + }, + { + "file": "appconfig.go", + "role": "Get/Upsert/Delete AppConfiguration (sync-hook flags)", + "watch_for": "Upsert uses OnConflictColumns(FieldID, FieldNamespace).UpdateNewValues(); keyed by app ID+namespace, not customer" + }, + { + "file": "customerdata.go", + "role": "Get/Upsert/Delete CustomerData keyed by CustomerID+Namespace+AppID", + "watch_for": "input.Validate() required here; conflict target includes the partial-index ConflictWhere on DeletedAt" + } + ], + "anti_patterns": [ + "Running Ent queries outside entutils.TransactingRepo/TransactingRepoWithNoValue, breaking tx propagation from ctx", + "Returning an error instead of a zero value + nil on db.IsNotFound", + "Physical deletes instead of SetDeletedAt soft delete", + "Returning generated db.* types instead of mapping to domain structs", + "Forgetting DeletedAtIsNil() in query/update Where clauses" + ], + "decisions": [ + { + "decision": "Two separate Ent tables (AppCustomInvoicing for app config, AppCustomInvoicingCustomer for per-customer data)", + "rationale": "App-level sync-hook config and customer-to-external-ID mapping have different keys and lifecycles" + }, + { + "decision": "Get-on-missing returns empty struct, not NotFound error", + "rationale": "Sync-hook config and customer data are optional; callers treat absence as defaults" + } + ], + "code_examples": [ + { + "scenario": "Upsert app sync-hook configuration idempotently", + "code": "func (a *adapter) UpsertAppConfiguration(ctx context.Context, input custominvoicing.UpsertAppConfigurationInput) error {\n\treturn entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error {\n\t\treturn tx.db.AppCustomInvoicing.Create().\n\t\t\tSetID(input.AppID.ID).\n\t\t\tSetNamespace(input.AppID.Namespace).\n\t\t\tSetEnableDraftSyncHook(input.Configuration.EnableDraftSyncHook).\n\t\t\tSetEnableIssuingSyncHook(input.Configuration.EnableIssuingSyncHook).\n\t\t\tOnConflictColumns(appcustominvoicing.FieldID, appcustominvoicing.FieldNamespace).\n\t\t\tUpdateNewValues().\n\t\t\tExec(ctx)\n\t})\n}" + } + ] + }, + "openmeter/app/custominvoicing/httpdriver": { + "purpose": "HTTP transport layer exposing the custom-invoicing app's external sync webhooks (draft synchronized, issuing synchronized, update payment status). Decodes api.* request bodies into appcustominvoicing/billing domain inputs and re-encodes billing.StandardInvoice as api.Invoice.", + "patterns": [ + { + "name": "httptransport.NewHandlerWithArgs triple", + "description": "Each endpoint returns a typed Handler built from (decode req, business call, response encoder) plus AppendOptions with WithOperationName and WithErrorEncoder. Request/Response/Params are type aliases to the underlying appcustominvoicing/api types.", + "example": "DraftSyncronizedHandler httptransport.HandlerWithArgs[DraftSyncronizedRequest, DraftSyncronizedResponse, DraftSyncronizedParams]" + }, + { + "name": "Namespace resolution from decoder", + "description": "Every decode step calls h.resolveNamespace(ctx) which wraps namespaceDecoder.GetNamespace; a missing namespace yields a 500 commonhttp.NewHTTPError. InvoiceID is assembled from URL param + resolved namespace.", + "example": "namespace, err := h.resolveNamespace(ctx); ... InvoiceID: billing.InvoiceID{ID: params.InvoiceID, Namespace: namespace}" + }, + { + "name": "Validate after decode, before service", + "description": "The business step calls request.Validate() first and returns the validation error directly so the errorEncoder maps it to the right status.", + "example": "if err := request.Validate(); err != nil { return DraftSyncronizedResponse{}, err }" + }, + { + "name": "Centralized typed errorEncoder", + "description": "errors.go errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for billing.NotFoundError(404), ValidationError/ValidationIssue(400), UpdateAfterDeleteError(409), AppError(400), each using billing.EncodeValidationIssues.", + "example": "commonhttp.HandleErrorIfTypeMatches[billing.NotFoundError](ctx, http.StatusNotFound, err, w, billing.EncodeValidationIssues) || ..." + }, + { + "name": "FromAPI mapping helpers + reuse billing ToAPI", + "description": "mapper.go has mapUpsertStandardInvoiceResultFromAPI / mapFinalizeStandardInvoiceResultFromAPI / mapPaymentTriggerFromAPI converting api.* into billing builders (NewUpsertStandardInvoiceResult, NewFinalizeStandardInvoiceResult). Responses reuse billinghttpdriver.MapStandardInvoiceToAPI rather than hand-mapping.", + "example": "return billinghttpdriver.MapStandardInvoiceToAPI(invoice)" + }, + { + "name": "API->internal trigger name translation", + "description": "mapPaymentTriggerFromAPI explicitly switches API trigger enums to billing.Trigger* constants; note the API 'payment_failed' maps to internal billing.TriggerFailed. Empty/unknown returns models.NewGenericValidationError.", + "example": "case api.CustomInvoicingPaymentTriggerPaymentFailed: return billing.TriggerFailed, nil" + } + ], + "key_file_guides": [ + { + "file": "custominvoicing.go", + "role": "DraftSyncronized/IssuingSyncronized/UpdatePaymentStatus handler factories", + "watch_for": "service is appcustominvoicing.SyncService; each handler builds InvoiceID from params+namespace and delegates to h.service.Sync*/HandlePaymentTrigger" + }, + { + "file": "handler.go", + "role": "Handler/AppHandler interfaces, handler struct, New constructor, resolveNamespace", + "watch_for": "handler holds SyncService + NamespaceDecoder + options; New takes them positionally" + }, + { + "file": "errors.go", + "role": "errorEncoder mapping billing error types to HTTP status", + "watch_for": "ordering matters (first matching type wins); AppError is the apps-dependency fallthrough with no encoder" + }, + { + "file": "mapper.go", + "role": "FromAPI mappers + payment-trigger translation", + "watch_for": "API trigger name 'payment_failed' != internal 'failed'; required-trigger and unknown cases must return validation errors" + } + ], + "anti_patterns": [ + "Hand-encoding the StandardInvoice response instead of reusing billinghttpdriver.MapStandardInvoiceToAPI", + "Skipping request.Validate() before invoking the service", + "Reading the namespace from the request body instead of resolveNamespace(ctx)", + "Adding a new billing error type without registering it in errorEncoder()", + "Assuming API trigger enum names equal internal billing.Trigger* values" + ], + "decisions": [ + { + "decision": "Handlers depend only on appcustominvoicing.SyncService, not the full Service", + "rationale": "HTTP layer needs only the sync/payment surface; narrows coupling" + }, + { + "decision": "Reuse billing httpdriver encoder and error types", + "rationale": "Custom-invoicing returns billing.StandardInvoice, so it shares billing's API mapping and validation-issue encoding" + } + ], + "code_examples": [ + { + "scenario": "Define a sync webhook handler with decode, validate, delegate, encode", + "code": "func (h *handler) DraftSyncronized() DraftSyncronizedHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, params DraftSyncronizedParams) (DraftSyncronizedRequest, error) {\n\t\t\tnamespace, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return DraftSyncronizedRequest{}, fmt.Errorf(\"failed to resolve namespace: %w\", err) }\n\t\t\tvar body api.CustomInvoicingDraftSynchronizedRequest\n\t\t\tif err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return DraftSyncronizedRequest{}, err }\n\t\t\treturn DraftSyncronizedRequest{InvoiceID: billing.InvoiceID{ID: params.InvoiceID, Namespace: namespace}, UpsertInvoiceResults: mapUpsertStandardInvoiceResultFromAPI(body.Invoicing)}, nil\n\t\t},\n\t\tfunc(ctx context.Context, request DraftSyncronizedRequest) (DraftSyncronizedResponse, error) {\n\t\t\tif err := request.Validate(); err != nil { return DraftSyncronizedResponse{}, err }\n\t\t\tinvoice, err := h.service.SyncDraftInvoice(ctx, request)\n\t\t\tif err != nil { return DraftSyncronizedResponse{}, err }\n\t\t\treturn billinghttpdriver.MapStandardInvoiceToAPI(invoice)\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[DraftSyncronizedResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"DraftSyncronized\"), httptransport.WithErrorEncoder(errorEncoder()))...,\n\t)\n}" + } + ] + }, + "openmeter/app/custominvoicing/service": { + "purpose": "Service layer of the custom-invoicing app: creates/deletes the app and its sync-hook config (FactoryService), manages per-customer external data, and bridges external sync webhooks into billing (SyncService) by delegating to billing.Service while stamping metadata.", + "patterns": [ + { + "name": "Single Service implementing multiple domain interfaces", + "description": "One *Service satisfies appcustominvoicing.Service, FactoryService, and SyncService via compile-time asserts; behavior split across customerdata.go / factory.go / sync.go.", + "example": "var _ appcustominvoicing.SyncService = (*Service)(nil)" + }, + { + "name": "Config-validated constructor with injected dependencies", + "description": "New(Config) requires Adapter, Logger, AppService, BillingService all non-nil (Config.Validate); no slog.Default fallback. Service holds adapter + appService + billingService.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "transaction.Run wraps multi-step writes", + "description": "Methods that combine app creation + config upsert (CreateApp) or read-trigger-reread (HandlePaymentTrigger) wrap the body in transaction.Run / RunWithNoValue against s.adapter so partial failures roll back.", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (app.AppBase, error) { appBase, err := s.appService.CreateApp(...); ...; s.adapter.UpsertAppConfiguration(...) })" + }, + { + "name": "Sync delegates to billing with metadata + validator injection", + "description": "SyncDraftInvoice/SyncIssuingInvoice call billing.Service.Sync*StandardInvoice, attaching AdditionalMetadata (MetadataKeyDraftSyncedAt/FinalizedAt via clock.Now()) and InvoiceValidator: s.ValidateInvoiceApp.", + "example": "return s.billingService.SyncDraftInvoice(ctx, billing.SyncDraftStandardInvoiceInput{InvoiceID: input.InvoiceID, UpsertInvoiceResults: input.UpsertInvoiceResults, AdditionalMetadata: map[string]string{...}, InvoiceValidator: s.ValidateInvoiceApp})" + }, + { + "name": "Invoice ownership validation", + "description": "ValidateInvoiceApp asserts Workflow.Apps.Invoicing exists and GetType()==app.AppTypeCustomInvoicing before any sync/payment mutation, returning models.NewGenericValidationError otherwise.", + "example": "if invoice.Workflow.Apps.Invoicing.GetType() != app.AppTypeCustomInvoicing { return models.NewGenericValidationError(...) }" + }, + { + "name": "Critical-issue rollback after trigger", + "description": "HandlePaymentTrigger re-reads the invoice after TriggerInvoice and, if any ValidationIssueSeverityCritical issues exist, returns billing.ValidationError to force a transaction rollback.", + "example": "criticalIssues := lo.Filter(invoice.ValidationIssues, func(issue billing.ValidationIssue, _ int) bool { return issue.Severity == billing.ValidationIssueSeverityCritical }); if len(criticalIssues) > 0 { return ..., billing.ValidationError{Err: criticalIssues.AsError()} }" + }, + { + "name": "Validate inputs first", + "description": "Every public method starts with input.Validate() (CreateApp wraps as 'invalid input: %w') and returns before doing work.", + "example": "if err := input.Validate(); err != nil { return app.AppBase{}, fmt.Errorf(\"invalid input: %w\", err) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct, Config/Validate, New; compile-time assert for appcustominvoicing.Service", + "watch_for": "All four deps mandatory; logger injected, never slog.Default" + }, + { + "file": "factory.go", + "role": "CreateApp/DeleteApp/Upsert/GetAppConfiguration (FactoryService)", + "watch_for": "CreateApp must run app create + config upsert in one transaction.Run; uses app.AppTypeCustomInvoicing" + }, + { + "file": "sync.go", + "role": "SyncDraftInvoice/SyncIssuingInvoice/HandlePaymentTrigger + ValidateInvoiceApp (SyncService)", + "watch_for": "Always pass InvoiceValidator: s.ValidateInvoiceApp; HandlePaymentTrigger re-reads invoice and rolls back on critical issues; TriggerInvoice uses CapabilityTypeCollectPayments" + }, + { + "file": "customerdata.go", + "role": "Get/Upsert/Delete CustomerData delegating to adapter inside transaction.Run", + "watch_for": "Thin pass-throughs wrapped in transaction.Run/RunWithNoValue" + } + ], + "anti_patterns": [ + "Mutating an invoice via billing without first calling ValidateInvoiceApp", + "Performing CreateApp's two writes (app + config) outside a single transaction.Run", + "Swallowing critical ValidationIssues instead of returning billing.ValidationError to roll back", + "Using slog.Default() or time.Now() directly instead of injected logger / pkg/clock.Now()", + "Bypassing billing.Service and writing invoice state directly from this layer" + ], + "decisions": [ + { + "decision": "Sync methods are thin wrappers over billing.Service with injected validator + metadata", + "rationale": "Billing owns invoice state machine; the app only stamps custom-invoicing metadata and enforces app-ownership" + }, + { + "decision": "HandlePaymentTrigger re-reads and inspects ValidationIssues to decide rollback", + "rationale": "TriggerInvoice may produce critical issues without erroring; explicit re-read lets the service abort the tx" + }, + { + "decision": "clock.Now() for sync timestamps", + "rationale": "Test-controllable time for deterministic metadata assertions" + } + ], + "code_examples": [ + { + "scenario": "Drive a payment trigger through billing and roll back on critical validation issues", + "code": "func (s *Service) HandlePaymentTrigger(ctx context.Context, input appcustominvoicing.HandlePaymentTriggerInput) (billing.StandardInvoice, error) {\n\tif err := input.Validate(); err != nil { return billing.StandardInvoice{}, err }\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (billing.StandardInvoice, error) {\n\t\tinvoice, err := s.billingService.GetStandardInvoiceById(ctx, billing.GetStandardInvoiceByIdInput{Invoice: input.InvoiceID})\n\t\tif err != nil { return billing.StandardInvoice{}, err }\n\t\tif err := s.ValidateInvoiceApp(invoice); err != nil { return billing.StandardInvoice{}, err }\n\t\terr = s.billingService.TriggerInvoice(ctx, billing.InvoiceTriggerServiceInput{\n\t\t\tInvoiceTriggerInput: billing.InvoiceTriggerInput{Invoice: input.InvoiceID, Trigger: input.Trigger},\n\t\t\tAppType: app.AppTypeCustomInvoicing, Capability: app.CapabilityTypeCollectPayments,\n\t\t})\n\t\tif err != nil { return billing.StandardInvoice{}, err }\n\t\tinvoice, err = s.billingService.GetStandardInvoiceById(ctx, billing.GetStandardInvoiceByIdInput{Invoice: input.InvoiceID})\n\t\tif err != nil { return billing.StandardInvoice{}, err }\n\t\tif len(invoice.ValidationIssues) > 0 {\n\t\t\tcriticalIssues := lo.Filter(invoice.ValidationIssues, func(issue billing.ValidationIssue, _ int) bool { return issue.Severity == billing.ValidationIssueSeverityCritical })\n\t\t\tif len(criticalIssues) > 0 { return billing.StandardInvoice{}, billing.ValidationError{Err: criticalIssues.AsError()} }\n\t\t}\n\t\treturn invoice, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w55.json b/.archie/enrichments/w55.json new file mode 100644 index 0000000000..53cfa4baf0 --- /dev/null +++ b/.archie/enrichments/w55.json @@ -0,0 +1,351 @@ +{ + "openmeter/app/stripe/adapter": { + "purpose": "Ent-backed persistence layer for the Stripe app integration. Owns CRUD over the appstripe and appstripecustomer DB tables (app data, customer linkage, webhook secrets, default payment method) and orchestrates the live Stripe API via injected client factories. Implements appstripe.Adapter / appstripe.AppStripeAdapter.", + "patterns": [ + { + "name": "Transaction-aware repo via entutils.TransactingRepo", + "description": "Every write/read that must be atomic runs inside entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter)...) (or TransactingRepoWithNoValue); the closure uses repo.db, not a.db, so it rebinds to the tx carried in ctx.", + "example": "entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (appstripe.AppData, error) { ... repo.db.AppStripe.Query()... })" + }, + { + "name": "Tx/WithTx/Self triad", + "description": "adapter implements entutils.TxCreator: Tx() hijacks an ent tx, WithTx() returns a new adapter bound to the tx client via entdb.NewTxClientFromRawConfig, Self() returns the receiver.", + "example": "func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), ...} }" + }, + { + "name": "Validate input then wrap with models error constructors", + "description": "Each public method calls input.Validate() first and wraps the result in models.NewGenericValidationError; ent errors are mapped via entdb.IsNotFound / entdb.IsConstraintError into app.NewApp*Error or models.NewGenericConflictError.", + "example": "if entdb.IsNotFound(err) { return appstripe.CustomerData{}, app.NewAppCustomerPreConditionError(input.AppID, app.AppTypeStripe, &input.CustomerID, \"customer has no data for stripe app\") }" + }, + { + "name": "Config + New constructor with required-dependency validation", + "description": "New(Config) validates all injected deps (Client, AppService, CustomerService, SecretService, Logger) and supplies default Stripe client factories (stripeclient.NewStripeClient / NewStripeAppClient) when nil. asserts var _ appstripe.Adapter = (*adapter)(nil).", + "example": "func New(config Config) (appstripe.Adapter, error) { if err := config.Validate(); err != nil { ... } }" + }, + { + "name": "Upsert via OnConflict with soft-delete-aware conflict target", + "description": "AppStripeCustomer upserts use sql.ConflictColumns(namespace, app_id, customer_id) plus sql.ConflictWhere(sql.IsNull(FieldDeletedAt)) so soft-deleted rows do not collide.", + "example": "OnConflict(sql.ConflictColumns(...), sql.ConflictWhere(sql.IsNull(appstripecustomerdb.FieldDeletedAt)))" + }, + { + "name": "Webhook lookup intentionally ignores namespace", + "description": "GetWebhookSecret queries AppStripe by ID only (no namespace filter) because webhook callers have no namespace; trust derives from the signed payload secret.", + "example": "Where(appstripedb.ID(input.AppID)).Only(ctx) // no namespace filter, see comment" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "adapter struct, Config/New, Tx/WithTx/Self transaction plumbing", + "watch_for": "WithTx must copy ALL dependency fields (logger was omitted in the copy here \u2014 replicate the existing shape, do not drop fields silently)." + }, + { + "file": "customer.go", + "role": "stripe customer-data CRUD (Get/Upsert/Delete) and createStripeCustomer", + "watch_for": "UpsertStripeCustomerData validates the payment method belongs to the stripe customer and calls appService.EnsureCustomer inside the tx; createStripeCustomer reaches the live Stripe API via stripeAppClientFactory." + }, + { + "file": "stripe.go", + "role": "app-level CRUD: CreateStripeApp, UpdateAPIKey, GetStripeAppData, DeleteStripeAppData, GetWebhookSecret, SetCustomerDefaultPaymentMethod, CreateCheckoutSession", + "watch_for": "UpdateAPIKey validates live/test-mode and stripe account match before persisting; secret writes go through secretService outside the ent tx (mapAppStripeData maps db row -> appstripe.AppData)." + } + ], + "anti_patterns": [ + "Using a.db directly inside a TransactingRepo closure instead of repo.db (breaks transaction binding).", + "Returning raw ent errors instead of mapping IsNotFound/IsConstraintError to app.* / models.* typed errors.", + "Adding a namespace filter to GetWebhookSecret's AppStripe query (webhook requests have no namespace).", + "Skipping input.Validate() / models.NewGenericValidationError wrapping at the top of a public method.", + "Calling the live Stripe API outside a factory (always go through stripeClientFactory / stripeAppClientFactory so test fakes can be injected)." + ], + "decisions": [ + { + "decision": "Stripe client construction is injected via factories on Config rather than built inline", + "rationale": "Lets tests substitute fake Stripe clients and lets secret/livemode resolution happen per app instance." + }, + { + "decision": "Secret creation/webhook setup are NOT wrapped in the ent transaction", + "rationale": "They coordinate three remote systems (secret store, Stripe, DB); the code comments acknowledge this is intentionally non-transactional." + } + ], + "code_examples": [ + { + "scenario": "Adapter method: validate, transact, map ent errors", + "code": "func (a *adapter) GetStripeAppData(ctx context.Context, input appstripe.GetStripeAppDataInput) (appstripe.AppData, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn appstripe.AppData{}, models.NewGenericValidationError(err)\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (appstripe.AppData, error) {\n\t\tdbApp, err := repo.db.AppStripe.Query().\n\t\t\tWhere(appstripedb.Namespace(input.AppID.Namespace)).\n\t\t\tWhere(appstripedb.ID(input.AppID.ID)).Only(ctx)\n\t\tif err != nil {\n\t\t\tif entdb.IsNotFound(err) { return appstripe.AppData{}, app.NewAppNotFoundError(input.AppID) }\n\t\t\treturn appstripe.AppData{}, err\n\t\t}\n\t\treturn mapAppStripeData(input.AppID, dbApp), nil\n\t})\n}" + } + ] + }, + "openmeter/app/stripe/client": { + "purpose": "Thin, typed wrapper over the stripe-go/v80 SDK. Translates OpenMeter inputs into Stripe params and Stripe responses/errors into OpenMeter domain types. Defines StripeAppClient (installed-app operations) and StripeClient (pre-install), plus their factory function types.", + "patterns": [ + { + "name": "Interface + factory-type + struct triad", + "description": "Each client is an interface (StripeAppClient), a factory type alias (StripeAppClientFactory = func(config) (StripeAppClient, error)), and a concrete struct (stripeAppClient) constructed by NewStripeAppClient(config) after config.Validate().", + "example": "type StripeAppClientFactory = func(config StripeAppClientConfig) (StripeAppClient, error)" + }, + { + "name": "Central providerError translation", + "description": "All Stripe SDK errors funnel through c.providerError(err), which maps HTTP 400 -> models.NewGenericValidationError, 401 -> updates app status to Unauthorized + app.NewAppProviderAuthenticationError, else app.NewAppProviderError.", + "example": "if stripeErr, ok := err.(*stripe.Error); ok { switch stripeErr.HTTPStatusCode { case http.StatusBadRequest: return models.NewGenericValidationError(...) } }" + }, + { + "name": "Sentinel typed errors with New/Is pair", + "description": "errors.go declares typed errors (StripeCustomerNotFoundError, StripePaymentMethodNotFoundError, StripeInvoiceCustomerTaxLocationInvalidError) each with a New... constructor and an Is... helper using errors.As, asserting models.GenericError.", + "example": "func IsStripeCustomerNotFoundError(err error) bool { var e *StripeCustomerNotFoundError; return errors.As(err, &e) }" + }, + { + "name": "Reserved OpenMeter metadata keys on Stripe objects", + "description": "om_namespace / om_app_id / om_customer_id / om_invoice_id are injected into Stripe metadata and listed in SetupIntentReservedMetadataKeys; user-supplied metadata containing these keys must be rejected.", + "example": "metadata[StripeMetadataNamespace] = input.AppID.Namespace; metadata[StripeMetadataAppID] = input.AppID.ID" + }, + { + "name": "Webhook event type constants", + "description": "Stripe webhook event type strings are centralized as WebhookEventType* consts (setup_intent.* and invoice.*) and consumed by the httpdriver webhook switch.", + "example": "const WebhookEventTypeInvoicePaid = \"invoice.paid\"" + }, + { + "name": "Explicit toStripeX / FromStripeX mappers", + "description": "Conversions between Stripe SDK structs and OpenMeter domain types are dedicated functions (toStripePaymentMethod, FromStripeCurrency) rather than inline.", + "example": "func toStripePaymentMethod(stripePaymentMethod *stripe.PaymentMethod) StripePaymentMethod { ... }" + } + ], + "key_file_guides": [ + { + "file": "appclient.go", + "role": "StripeAppClient interface, factory, NewStripeAppClient, providerError, metadata + webhook-event consts", + "watch_for": "providerError mutates app status on 401 using context.Background(); all SDK calls must route through it. Adding an interface method requires updating the concrete struct and test fakes." + }, + { + "file": "checkout.go", + "role": "CreateCheckoutSession param building, StripeCheckoutSession type + Validate, CreateCheckoutSessionInput + Validate", + "watch_for": "Mode is always Setup (Validate enforces it); embedded vs hosted UI mode have different required URL fields; metadata is validated against reserved keys." + }, + { + "file": "errors.go", + "role": "typed sentinel errors with New/Is helpers", + "watch_for": "Constructors return pointers but the var _ models.GenericError assertion is on the value type \u2014 keep both consistent when adding a new error." + }, + { + "file": "invoice.go / invoice_line.go", + "role": "Stripe invoice + line-item CRUD mapping", + "watch_for": "These translate between billing line items and Stripe InvoiceItem IDs; preserve the StripeInvoiceItemWithLineID linkage." + }, + { + "file": "client.go", + "role": "pre-install StripeClient (GetAccount, SetupWebhook) used before an app row exists", + "watch_for": "Used by service.InstallAppWithAPIKey before persistence; do not assume an installed app context here." + }, + { + "file": "logger.go", + "role": "leveledLogger adapter bridging slog into stripe.LeveledLogger", + "watch_for": "Injected into stripe.BackendConfig in NewStripeAppClient." + } + ], + "anti_patterns": [ + "Returning a raw *stripe.Error to callers instead of routing through providerError.", + "Letting OpenMeter-reserved metadata keys (om_*) be set by user input without rejecting them.", + "Hard-coding webhook event type strings instead of the WebhookEventType* constants.", + "Using a Stripe checkout mode other than Setup (StripeCheckoutSession.Validate enforces Setup).", + "Building param/response conversions inline instead of a toStripeX/FromStripeX helper." + ], + "decisions": [ + { + "decision": "Two distinct clients (StripeClient pre-install, StripeAppClient post-install)", + "rationale": "Before installation there is no app row/status to mutate on auth errors; afterwards providerError can update app status." + }, + { + "decision": "Stripe HTTP errors mapped to OpenMeter typed errors at the client boundary", + "rationale": "Upstream layers (adapter/service/httpdriver) stay decoupled from stripe-go and can branch on app.*/models.* error categories." + } + ], + "code_examples": [ + { + "scenario": "Centralized Stripe error translation", + "code": "func (c *stripeAppClient) providerError(err error) error {\n\tif stripeErr, ok := err.(*stripe.Error); ok {\n\t\tswitch stripeErr.HTTPStatusCode {\n\t\tcase http.StatusBadRequest:\n\t\t\treturn models.NewGenericValidationError(fmt.Errorf(\"stripe error: %s\", stripeErr.Msg))\n\t\tcase http.StatusUnauthorized:\n\t\t\t_ = c.appService.UpdateAppStatus(context.Background(), app.UpdateAppStatusInput{ID: c.appID, Status: app.AppStatusUnauthorized})\n\t\t\treturn app.NewAppProviderAuthenticationError(&c.appID, c.appID.Namespace, errors.New(stripeErr.Msg))\n\t\tdefault:\n\t\t\treturn app.NewAppProviderError(&c.appID, c.appID.Namespace, errors.New(stripeErr.Msg))\n\t\t}\n\t}\n\treturn err\n}" + } + ] + }, + "openmeter/app/stripe/httpdriver": { + "purpose": "HTTP transport layer for the Stripe app: API-key replacement, checkout sessions, customer stripe-data, portal sessions, and the inbound Stripe webhook. Decodes requests, resolves namespace/customer/app, delegates to appstripe.Service / billing.Service, and encodes API responses.", + "patterns": [ + { + "name": "httptransport.NewHandler(WithArgs) triad", + "description": "Each endpoint is a method on *handler returning a typed Handler built from (decode func, business func, response encoder, options). Request/response types are package-level aliases to api.* and appstripe.* types.", + "example": "httptransport.NewHandlerWithArgs(decodeFn, businessFn, commonhttp.EmptyResponseEncoder[Resp](http.StatusNoContent), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"replaceStripeAPIKey\"))...)" + }, + { + "name": "Namespace resolution via resolveNamespace", + "description": "Non-webhook handlers call h.resolveNamespace(ctx) (backed by namespacedriver.NamespaceDecoder); webhook handler deliberately does NOT \u2014 it derives namespace from the signed webhook secret's SecretID.", + "example": "namespace, err := h.resolveNamespace(ctx)" + }, + { + "name": "Customer polymorphic resolution + deleted guard", + "description": "Handlers accept customer by id, key, or create-input; resolve to a customer.CustomerID and reject deleted customers with models.NewGenericPreConditionFailedError.", + "example": "if cus != nil && cus.IsDeleted() { return ..., models.NewGenericPreConditionFailedError(...) }" + }, + { + "name": "App resolution falls back to billing profile", + "description": "When no AppId is in the request, the handler resolves the Stripe app via billingService.ResolveStripeAppIDFromBillingProfile / GetCustomerApp(AppTypeStripe), then type-asserts to appstripe.App.", + "example": "stripeApp, ok := genericApp.(appstripe.App); if !ok { return ..., fmt.Errorf(\"customer app is not a stripe app\") }" + }, + { + "name": "Webhook event dispatch switch routing to service methods", + "description": "AppStripeWebhook validates the signature, then switches on stripeclient.WebhookEventType* and maps each invoice event to service.HandleInvoiceStateTransition with explicit Trigger / TargetStatuses / IgnoreInvoiceInStatus / ShouldTriggerOnEvent.", + "example": "case stripeclient.WebhookEventTypeInvoicePaid: ... HandleInvoiceStateTransition(ctx, appstripe.HandleInvoiceStateTransitionInput{Trigger: billing.TriggerPaid, TargetStatuses: []billing.StandardInvoiceStatus{billing.StandardInvoiceStatusPaid}, ...})" + }, + { + "name": "FromAPI / ToAPI mapping helpers", + "description": "Conversions live in mapping.go (toAPIStripePortalSession, fromAPIAppStripeCustomerDataBase); the Handler interface enumerates every endpoint and is asserted with var _ Handler = (*handler)(nil).", + "example": "func fromAPIAppStripeCustomerDataBase(d api.StripeCustomerAppDataBase) appstripe.CustomerData { ... }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/AppStripeHandler interfaces, handler struct, New constructor, resolveNamespace", + "watch_for": "New endpoints must be added to the AppStripeHandler interface (compile-checked by var _ Handler). Deps: appstripe.Service, billing.Service, customer.Service, namespacedriver.NamespaceDecoder." + }, + { + "file": "webhook.go", + "role": "signature verification (webhook.ConstructEventWithTolerance) + event-type switch", + "watch_for": "No namespace resolver here \u2014 trust comes from the secret. Setup-intent handler validates om_app_id / om_namespace metadata and silently ignores events from other apps. Each invoice case re-fetches the Stripe invoice via ShouldTriggerOnEvent to rule out late events." + }, + { + "file": "checkout_session.go", + "role": "create checkout session; parses customer as create/id/key", + "watch_for": "Exactly one of createCustomerInput/customerId/customerKey must resolve; AppID falls back to ResolveStripeAppIDFromBillingProfile when body.AppId is nil." + }, + { + "file": "customer.go", + "role": "GetCustomerStripeAppData, UpsertCustomerStripeAppData, CreateStripeCustomerPortalSession + getAPIStripeCustomerAppData helper", + "watch_for": "Resolves the concrete stripe app through billingService.GetCustomerApp then type-asserts to appstripe.App; rejects deleted customers." + }, + { + "file": "mapping.go", + "role": "API<->domain conversions for portal session and customer data", + "watch_for": "Follow toAPI.../fromAPI... naming; keep nil-checks for optional fields like Configuration." + }, + { + "file": "const.go", + "role": "context-key attribute names for structured logging (stripe_event_id, stripe_event_type, app_id)", + "watch_for": "Stored on ctx via context.WithValue in the webhook handler for downstream log enrichment." + } + ], + "anti_patterns": [ + "Calling resolveNamespace inside the webhook handler (namespace must come from the verified secret).", + "Skipping the cus.IsDeleted() pre-condition guard when resolving a customer.", + "Acting on a webhook setup-intent event without validating om_app_id/om_namespace metadata against the request app.", + "Putting business logic in the decode func instead of the dedicated business func of the handler triad.", + "Returning the generic app from GetCustomerApp without type-asserting to appstripe.App." + ], + "decisions": [ + { + "decision": "Webhook signature verification replaces namespace authentication", + "rationale": "Stripe cannot send a namespace; validating the payload with the app's stored webhook secret proves authenticity and yields the namespace from the secret's SecretID." + }, + { + "decision": "Invoice webhook handlers re-fetch the live Stripe invoice before transitioning state", + "rationale": "ShouldTriggerOnEvent guards against stale/out-of-order webhook deliveries by checking the current upstream invoice status." + } + ], + "code_examples": [ + { + "scenario": "Webhook event mapped to a billing state transition", + "code": "case stripeclient.WebhookEventTypeInvoiceVoided:\n\tinvoice, err := unmarshalInvoiceEvent(request.Event.Data.Raw)\n\tif err != nil { return AppStripeWebhookResponse{}, err }\n\terr = h.service.HandleInvoiceStateTransition(ctx, appstripe.HandleInvoiceStateTransitionInput{\n\t\tAppID: request.AppID, Invoice: invoice,\n\t\tTrigger: billing.TriggerVoid,\n\t\tTargetStatuses: []billing.StandardInvoiceStatus{billing.StandardInvoiceStatusVoided},\n\t\tIgnoreInvoiceInStatus: []billing.StandardInvoiceStatusMatcher{billing.StandardInvoiceStatusCategoryPaid},\n\t\tShouldTriggerOnEvent: func(si *stripe.Invoice) (bool, error) { return si.Status == stripe.InvoiceStatusVoid, nil },\n\t})" + } + ] + }, + "openmeter/app/stripe/service": { + "purpose": "Service layer for the Stripe app (package appservice). Wraps the adapter in transactions, emits eventbus events, implements the app.AppFactory (install/uninstall/NewApp) and the marketplace registration, and bridges Stripe webhooks into billing state transitions.", + "patterns": [ + { + "name": "transaction.Run / RunWithNoValue wrapping the adapter", + "description": "Most Service methods are thin transactional wrappers: transaction.Run(ctx, s.adapter, func(ctx)...) delegating to s.adapter. Post-commit side effects (event publish) happen inside the same closure.", + "example": "func (s *Service) GetStripeAppData(ctx, input) (appstripe.AppData, error) { return transaction.Run(ctx, s.adapter, func(ctx context.Context) (appstripe.AppData, error) { return s.adapter.GetStripeAppData(ctx, input) }) }" + }, + { + "name": "Event emission after adapter writes", + "description": "Successful operations publish domain events via s.publisher.Publish \u2014 appstripe.NewAppCheckoutSessionEvent on checkout, app.CustomerPaymentSetupSucceededEvent on setup-intent success (metadata stripped of reserved keys via lo.OmitByKeys).", + "example": "event := appstripe.NewAppCheckoutSessionEvent(ctx, input.Namespace, output.SessionID, output.AppID.ID, output.CustomerID.ID); s.publisher.Publish(ctx, event)" + }, + { + "name": "AppFactory implementation + marketplace self-registration", + "description": "Service implements app.AppFactory (var _ app.AppFactory = (*Service)(nil)) with NewApp/InstallAppWithAPIKey/UninstallApp; New() calls AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: appstripe.StripeMarketplaceListing, Factory: service}).", + "example": "config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: appstripe.StripeMarketplaceListing, Factory: service})" + }, + { + "name": "Config + New with full dependency validation", + "description": "Config.Validate() requires every dependency (Adapter, AppService, SecretService, BillingService, Logger, Publisher, WebhookURLGenerator) be non-nil; logger is injected, never slog.Default().", + "example": "if c.WebhookURLGenerator == nil { return errors.New(\"webhook url generator cannot be null\") }" + }, + { + "name": "Webhook->billing bridge via HandleInvoiceStateTransition", + "description": "billing.go resolves the local invoice by Stripe external ID, applies status/ignore guards, optionally re-fetches the Stripe invoice (ShouldTriggerOnEvent/GetValidationErrors), then calls billingService.TriggerInvoice with the mapped trigger and capability CollectPayments.", + "example": "s.billingService.TriggerInvoice(ctx, billing.InvoiceTriggerServiceInput{InvoiceTriggerInput: billing.InvoiceTriggerInput{Invoice: invoice.GetInvoiceID(), Trigger: input.Trigger, ValidationErrors: validationErrors}, AppType: app.AppTypeStripe, Capability: app.CapabilityTypeCollectPayments})" + }, + { + "name": "External-ID invoice lookup with cardinality guards", + "description": "getInvoiceByStripeID lists StandardInvoices filtered by InvoicingExternalIDType; returns nil (non-managed) when empty, errors on >1, and verifies AppReferences.Invoicing.ID matches the app.", + "example": "if len(invoices.Items) == 0 { return nil, nil } if len(invoices.Items) > 1 { return nil, fmt.Errorf(...) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service struct, Config/Validate, New + marketplace registration", + "watch_for": "New deps must be added to Config, Validate, and the struct; registration failure returns the service AND an error (caller decides). Publisher and WebhookURLGenerator are mandatory." + }, + { + "file": "app.go", + "role": "core app operations (checkout, customer data, setup-intent, portal, API key, masked key)", + "watch_for": "generateMaskedSecretAPIKey slices [:8] and [len-3:] \u2014 will panic on short keys; callers must pass real Stripe keys. Event publish is inside the tx closure." + }, + { + "file": "billing.go", + "role": "webhook->billing bridge: HandleInvoiceStateTransition, HandleInvoiceSentEvent, getInvoiceByStripeID, stripeErrorToValidationError", + "watch_for": "Returns nil (no-op) for non-managed invoices; relies on guard ordering (TargetStatuses already-set check, IgnoreInvoiceInStatus, ShouldTriggerOnEvent) before TriggerInvoice." + }, + { + "file": "factory.go", + "role": "app.AppFactory: NewApp, InstallAppWithAPIKey, UninstallApp, newApp", + "watch_for": "Install coordinates secret store + Stripe + DB and is explicitly NOT transactional (commented TODO). disableWebhookRegistration injects a fake secret for dev. Uninstall tolerates SecretNotFoundError and provider-auth errors." + }, + { + "file": "webhook.go", + "role": "app.WebhookURLGenerator implementations (baseURL and pattern variants)", + "watch_for": "patternWebhookURLGenerator requires the pattern to contain %s; baseURL variant joins /api/v1/apps/{id}/stripe/webhook \u2014 keep the path in sync with the router and Stripe webhook registration." + }, + { + "file": "const.go", + "role": "log attribute name constants for invoice/stripe IDs", + "watch_for": "Used in s.logger.With(...) for structured logging in billing.go." + } + ], + "anti_patterns": [ + "Calling adapter methods outside transaction.Run/RunWithNoValue when atomicity or event emission is required.", + "Triggering a billing state transition without first resolving the managed invoice via getInvoiceByStripeID (non-managed invoices must be skipped).", + "Using slog.Default() instead of the injected s.logger.", + "Adding a Service dependency without updating Config, Config.Validate, and the struct together.", + "Assuming InstallAppWithAPIKey is transactional \u2014 secret/webhook/db steps are independent remote calls." + ], + "decisions": [ + { + "decision": "Service self-registers in the marketplace inside New()", + "rationale": "Wires the Stripe AppFactory into the app registry at construction so app.Service can install Stripe apps; failure is surfaced to the caller." + }, + { + "decision": "Webhook events are translated to billing triggers with explicit guard sets per event", + "rationale": "Stripe delivers events at-least-once and out-of-order; status/ignore/ShouldTrigger guards make state transitions idempotent and ordering-safe." + }, + { + "decision": "InstallAppWithAPIKey is intentionally non-transactional", + "rationale": "Coordinating three remote services (secret store, Stripe API, DB) in one transaction is not feasible; the code documents this trade-off." + } + ], + "code_examples": [ + { + "scenario": "Transactional adapter wrap plus event emission", + "code": "func (s *Service) CreateCheckoutSession(ctx context.Context, input appstripe.CreateCheckoutSessionInput) (appstripe.CreateCheckoutSessionOutput, error) {\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (appstripe.CreateCheckoutSessionOutput, error) {\n\t\toutput, err := s.adapter.CreateCheckoutSession(ctx, input)\n\t\tif err != nil { return appstripe.CreateCheckoutSessionOutput{}, err }\n\t\tevent := appstripe.NewAppCheckoutSessionEvent(ctx, input.Namespace, output.SessionID, output.AppID.ID, output.CustomerID.ID)\n\t\tif err := s.publisher.Publish(ctx, event); err != nil {\n\t\t\treturn appstripe.CreateCheckoutSessionOutput{}, fmt.Errorf(\"failed to publish event: %w\", err)\n\t\t}\n\t\treturn output, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w56.json b/.archie/enrichments/w56.json new file mode 100644 index 0000000000..30d8032e83 --- /dev/null +++ b/.archie/enrichments/w56.json @@ -0,0 +1,310 @@ +{ + "openmeter/billing/adapter": { + "purpose": "Ent-backed persistence layer implementing billing.Adapter and its sub-interfaces (CustomerOverrideAdapter, GatheringInvoiceAdapter, SequenceAdapter, etc.) for invoices, lines, profiles, customer overrides, split-line groups, sequence numbers, schema-level tracking, and validation issues. All mutation flows are transaction-aware and namespace-scoped.", + "patterns": [ + { + "name": "Self-rebinding tx adapter", + "description": "adapter implements Tx/WithTx/Self; every read+write method body wraps in entutils.TransactingRepo or TransactingRepoWithNoValue so it rebinds to the ctx-carried transaction. New methods MUST do the same, never touch a.db directly inside multi-step mutations.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (T, error) { ... tx.db.BillingInvoice.Query()... })" + }, + { + "name": "Interface assertion per file", + "description": "Each file asserts the sub-interface it satisfies via a blank var, e.g. `var _ billing.GatheringInvoiceAdapter = (*adapter)(nil)`. Add the matching assertion when implementing a new adapter sub-interface.", + "example": "var _ billing.SequenceAdapter = (*adapter)(nil)" + }, + { + "name": "Diff-then-upsert for line sets", + "description": "Line collections are persisted via entitydiff.DiffByID producing create/update/delete buckets, then upsertWithOptions (upsert.go) drives a single CreateBulk + OnConflict. Deletes are modeled as soft-delete updates (MarkDeleted sets DeletedAt) and applied FIRST to satisfy constraints.", + "example": "upsertWithOptions(ctx, a.db, diff.Line, upsertInput[*billing.GatheringLine, *db.BillingInvoiceLineCreate]{Create: ..., UpsertItems: ..., MarkDeleted: ...})" + }, + { + "name": "mapXFromDB / mapXToDB conversions", + "description": "DB->domain mapping uses free funcs named mapCustomerOverrideFromDB, mapGatheringInvoiceFromDB, etc.; time fields are normalized to UTC via .In(time.UTC) and convert.TimePtrIn; ISO-duration strings parse via ParsePtrOrNil. Follow these names and UTC normalization.", + "example": "CreatedAt: invoice.CreatedAt.In(time.UTC), DeletedAt: convert.TimePtrIn(invoice.DeletedAt, time.UTC)" + }, + { + "name": "Pessimistic locking & sequencing", + "description": "Per-customer serialization uses BillingCustomerLock upsert (DoNothing) + ForUpdate row lock in LockCustomerForUpdate; sequence numbers use ForUpdate + create-on-missing in NextSequenceNumber. New cross-invoice mutations should take the customer lock first.", + "example": "tx.db.BillingCustomerLock.Query().Where(...).ForUpdate().First(ctx)" + }, + { + "name": "NotFound/Validation domain errors", + "description": "Map db.IsNotFound to billing.NotFoundError{Entity, Err} and reject illegal mutations with billing.ValidationError; immutable fields (currency, type, customerID) are re-checked against the existing row before update.", + "example": "return billing.NotFoundError{ID: input.CustomerID, Entity: billing.EntityCustomerOverride, Err: billing.ErrCustomerOverrideNotFound}" + }, + { + "name": "Bulk batching to dodge param limits", + "description": "Bulk inserts chunk by defaultBulkAssignCustomersToProfileBatchSize (derived from 65535 / column count) before CreateBulk+OnConflict, because PostgreSQL caps parameters at 64k.", + "example": "for _, chunk := range lo.Chunk(creates, defaultBulkAssignCustomersToProfileBatchSize) { ...CreateBulk(chunk...).OnConflict(...).Exec(ctx) }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor and Tx/WithTx/Self via db.HijackTx + entutils.NewTxDriver", + "watch_for": "Config.Validate requires non-nil Client and Logger; WithTx must rebuild via NewTxClientFromRawConfig, never reuse a.db" + }, + { + "file": "upsert.go", + "role": "Generic upsertWithOptions[T,CreateBulkType] diff applier", + "watch_for": "Delete bucket processed first as soft-delete; only runs UpsertItems when buckets non-empty" + }, + { + "file": "gatheringlines.go", + "role": "Gathering invoice line diff/upsert + DB<->domain mapping", + "watch_for": "Only InvoiceLineAdapterTypeUsageBased + ParentLineIDIsNil lines are gathering lines; ULID assigned when ID/UBPConfigID empty" + }, + { + "file": "invoicelinesplitgroup.go", + "role": "Split-line group create/get and SplitLineHierarchy resolution", + "watch_for": "Hierarchy expansion is a separate query path; keep namespace filters on every edge load" + }, + { + "file": "seq.go", + "role": "NextSequenceNumber with ForUpdate row lock", + "watch_for": "Create-on-missing uses OnConflict().DoNothing() then re-reads; returns alpacadecimal.Decimal" + }, + { + "file": "lock.go", + "role": "UpsertCustomerLock + LockCustomerForUpdate", + "watch_for": "Still triggers in-band invoice schema migration (shouldInvoicesBeMigrated/migrateCustomerInvoices) \u2014 temporary, do not remove blindly" + }, + { + "file": "validationissue.go", + "role": "persistValidationIssues via sha256 dedupe-hash upsert", + "watch_for": "Hash covers severity+code+message+component+path; IntrospectValidationIssues is test-only, not on the interface" + }, + { + "file": "stdinvoicelinemapper.go", + "role": "Standard-invoice line <-> DB mapping (detailed + UBP lines)", + "watch_for": "Companion to stdinvoicelinediff.go; keep mapper and diff in sync when adding line fields" + } + ], + "anti_patterns": [ + "Calling a.db.* directly for multi-step mutations instead of wrapping in entutils.TransactingRepo(WithNoValue) and using tx.db", + "Returning raw db errors for not-found/invalid states instead of billing.NotFoundError / billing.ValidationError", + "Persisting line collections with ad-hoc loops instead of entitydiff.DiffByID + upsertWithOptions", + "Storing/returning non-UTC times \u2014 every timestamp must be .In(time.UTC) on map-in and map-out", + "Single CreateBulk of unbounded customer/line slices without lo.Chunk batching (hits the 64k param ceiling)" + ], + "decisions": [ + { + "decision": "Transaction hijacking (HijackTx/WithTx) instead of passing tx clients", + "rationale": "Lets service-layer orchestration share one Ent transaction across many adapter calls via context, keeping invoice mutations atomic" + }, + { + "decision": "Validation issues deduplicated by content hash with soft-delete", + "rationale": "Re-running calculation re-asserts the same issues; hashing avoids duplicate rows while pruning issues no longer present" + }, + { + "decision": "Gathering invoices reuse the BillingInvoice table with UNSET supplier/customer hacks", + "rationale": "Tables not yet split; UpdateGatheringInvoice clears supplier/customer columns as an interim until a dedicated gathering table exists" + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware adapter method returning a domain value", + "code": "func (a *adapter) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideAdapterInput) (*billing.CustomerOverride, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (*billing.CustomerOverride, error) {\n\t\tdbCO, err := tx.db.BillingCustomerOverride.Query().\n\t\t\tWhere(billingcustomeroverride.Namespace(input.Customer.Namespace)).\n\t\t\tWhere(billingcustomeroverride.CustomerID(input.Customer.ID)).\n\t\t\tWithTaxCode().First(ctx)\n\t\tif err != nil {\n\t\t\tif db.IsNotFound(err) {\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\t\treturn mapCustomerOverrideFromDB(dbCO)\n\t})\n}" + } + ] + }, + "openmeter/billing/httpdriver": { + "purpose": "Legacy v1 HTTP transport for billing: translates api.* request/response types to/from billing domain inputs and delegates to billing.Service. Pure adapter layer \u2014 no business logic, only mapping, namespace resolution, and error encoding.", + "patterns": [ + { + "name": "httptransport handler triple", + "description": "Each endpoint is a method on *handler returning a typed httptransport.Handler[WithArgs] built from (request decoder, business call, response encoder) + AppendOptions(h.options, WithOperationName, WithErrorEncoder). Request/Response/Params are declared as type aliases at the top of each file.", + "example": "return httptransport.NewHandlerWithArgs(decode, func(ctx, in) (Resp,error){ return h.service.ListCustomerOverrides(ctx, in) }, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, ...))" + }, + { + "name": "Interface-segmented Handler", + "description": "The public Handler interface composes ProfileHandler, InvoiceLineHandler, InvoiceHandler, CustomerOverrideHandler; each method returns a typed handler constructor. New endpoints must be added to the matching sub-interface and implemented on *handler.", + "example": "type Handler interface { ProfileHandler; InvoiceLineHandler; InvoiceHandler; CustomerOverrideHandler }" + }, + { + "name": "Namespace from decoder", + "description": "Every decoder calls h.resolveNamespace(ctx) which reads namespacedriver.NamespaceDecoder; failure returns a 500 HTTPError. Inputs are always namespace-scoped.", + "example": "ns, err := h.resolveNamespace(ctx); if err != nil { return Req{}, fmt.Errorf(...) }" + }, + { + "name": "Centralized billing error encoder", + "description": "errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for billing.NotFoundError(404), ValidationError(400), UpdateAfterDeleteError(409), ValidationIssue(400), all rendered via billing.EncodeValidationIssues. Domain errors must be one of these types to map to the right status.", + "example": "commonhttp.HandleErrorIfTypeMatches[billing.ValidationError](ctx, http.StatusBadRequest, err, w, billing.EncodeValidationIssues)" + }, + { + "name": "API<->entity mapping via lo pointer helpers", + "description": "Decoders unwrap optional api fields with lo.FromPtr / lo.FromPtrOr and build billing input structs; per-item conversions use slicesx.MapWithErr and dedicated mapXToAPI / mapXToEntity funcs.", + "example": "OrderBy: billing.CustomerOverrideOrderBy(lo.FromPtrOr(input.OrderBy, ...)), CustomerIDs: lo.FromPtr(input.CustomerId)" + }, + { + "name": "ValidationIssues surfaced as errors", + "description": "When a returned invoice carries ValidationIssues, the handler converts them to a ValidationError via invoice.ValidationIssues.AsError() rather than returning a 200 with issues.", + "example": "if len(invoice.ValidationIssues) > 0 { return Resp{}, billing.ValidationError{Err: invoice.ValidationIssues.AsError()} }" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler interface composition, handler struct, New constructor, resolveNamespace", + "watch_for": "handler holds service, appService, namespaceDecoder, featureSwitches (config.BillingFeatureSwitchesConfiguration), options; New also takes stripeAppService" + }, + { + "file": "errors.go", + "role": "errorEncoder() mapping billing domain errors to HTTP statuses", + "watch_for": "Order matters \u2014 first matching type wins; all use billing.EncodeValidationIssues" + }, + { + "file": "invoice.go", + "role": "List/Get/Delete/Progress/Simulate invoice + InvoicePendingLinesAction handlers", + "watch_for": "ProgressInvoice is parameterized by ProgressAction; surfaces invoice ValidationIssues as ValidationError" + }, + { + "file": "invoiceline.go", + "role": "CreatePendingLine handler + mapCreateGatheringLineToEntity", + "watch_for": "Empty req.Lines returns billing.ValidationError; lines mapped per-item with slicesx.MapWithErr" + }, + { + "file": "profile.go", + "role": "Profile CRUD handlers + MapProfileToApi", + "watch_for": "MapProfileToApi resolves app references via appService; keep nil-profile guards" + }, + { + "file": "customeroverride.go", + "role": "Customer override list/get/upsert/delete + expand mapping", + "watch_for": "mapCustomerOverrideExpandToEntity translates api expand enums; reuses customerhttpdriver for nested customer mapping" + }, + { + "file": "deprecations.go", + "role": "Backward-compat shims for deprecated request shapes", + "watch_for": "Has deprecations_test.go \u2014 keep shim behavior covered when changing field handling" + } + ], + "anti_patterns": [ + "Putting business logic (state transitions, calculation) in handlers instead of delegating to billing.Service", + "Returning bare errors instead of billing.NotFoundError/ValidationError/ValidationIssue (breaks HTTP status mapping)", + "Reading the namespace manually instead of h.resolveNamespace(ctx)", + "Returning a 200 response while invoice.ValidationIssues is non-empty", + "Hand-writing pointer/optional unwrapping instead of lo.FromPtr/FromPtrOr and slicesx.MapWithErr" + ], + "decisions": [ + { + "decision": "All handlers built through httptransport with a shared errorEncoder", + "rationale": "Uniform error-to-status mapping and operation naming/telemetry across every billing endpoint without per-handler boilerplate" + }, + { + "decision": "Request/Response/Params declared as type aliases of api.* and billing.* inputs", + "rationale": "Keeps the transport layer a thin, statically-checked mapping between OpenAPI types and domain inputs" + } + ], + "code_examples": [ + { + "scenario": "A billing HTTP handler delegating to the service", + "code": "func (h *handler) ListCustomerOverrides() ListCustomerOverridesHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, input ListCustomerOverridesParams) (ListCustomerOverridesRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn ListCustomerOverridesRequest{}, fmt.Errorf(\"failed to resolve namespace: %w\", err)\n\t\t\t}\n\t\t\treturn ListCustomerOverridesRequest{Namespace: ns, CustomerIDs: lo.FromPtr(input.CustomerId)}, nil\n\t\t},\n\t\tfunc(ctx context.Context, input ListCustomerOverridesRequest) (ListCustomerOverridesResponse, error) {\n\t\t\treturn h.service.ListCustomerOverrides(ctx, input) // + map to API\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[ListCustomerOverridesResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"ListCustomerOverrides\"), httptransport.WithErrorEncoder(errorEncoder()))...,\n\t)\n}" + } + ] + }, + "openmeter/billing/lineengine": { + "purpose": "Concrete line Engine implementing billing.LineEngine + billing.LineCalculator: builds standard invoice lines from gathering lines, splits gathering lines at period boundaries, snapshots quantities, resolves split-line-group hierarchy, and generates/merges detailed rated lines. This is the lifecycle-hook engine the service registers for LineEngineTypeInvoice.", + "patterns": [ + { + "name": "Config+Validate+New constructor", + "description": "Engine is built via New(Config) where Config.Validate() requires non-nil SplitLineGroupAdapter, QuantitySnapshotter, and rating.Service; constructor returns error, never panics.", + "example": "func New(config Config) (*Engine, error) { if err := config.Validate(); err != nil { return nil, err }; return &Engine{...}, nil }" + }, + { + "name": "Engine satisfies both billing interfaces", + "description": "var _ billing.LineEngine and var _ billing.LineCalculator both assert *Engine. Lifecycle hooks (OnCollectionCompleted, OnStandardInvoiceCreated, OnInvoiceIssued, OnPayment*) must keep matching signatures; unused hooks return input.Lines / nil.", + "example": "var ( _ billing.LineEngine = (*Engine)(nil); _ billing.LineCalculator = (*Engine)(nil) )" + }, + { + "name": "Snapshot gating before quantity capture", + "description": "OnCollectionCompleted skips snapshotting when QuantitySnapshotedAt is already past the default collection time, or when collection time is still in the future; only then calls quantitySnapshotter.SnapshotLineQuantities.", + "example": "if input.Invoice.QuantitySnapshotedAt != nil && !input.Invoice.QuantitySnapshotedAt.Before(input.Invoice.DefaultCollectionAtForStandardInvoice()) { return input.Lines, nil }" + }, + { + "name": "Split-at into pre/post lines via CloneForCreate", + "description": "SplitGatheringLine creates a SplitLineGroup if absent, then derives postSplitAtLine via line.CloneForCreate, trims the original to [from, splitAt], and soft-deletes either side whose truncated period is empty (FlatPrice never empty; usage truncated to streaming.MinimumWindowSizeDuration).", + "example": "postSplitAtLine, err := line.CloneForCreate(func(l *billing.GatheringLine){ l.ServicePeriod.From = in.SplitAt; l.SplitLineGroupID = lo.ToPtr(splitLineGroupID); l.ChildUniqueReferenceID = nil })" + }, + { + "name": "Detailed-line generation then merge+validate", + "description": "CalculateLines loops standard lines, calls ratingService.GenerateDetailedLines, then invoicecalc.MergeGeneratedDetailedLines, then stdLine.Validate(); any per-line error is wrapped with the line ID.", + "example": "generated, _ := e.ratingService.GenerateDetailedLines(stdLine); invoicecalc.MergeGeneratedDetailedLines(stdLine, generated)" + } + ], + "key_file_guides": [ + { + "file": "engine.go", + "role": "Config/New, GetLineEngineType (LineEngineTypeInvoice), and lifecycle hooks", + "watch_for": "Snapshot failures of type *billing.ErrSnapshotInvalidDatabaseState are converted to a critical billing.ValidationIssue, not a raw error" + }, + { + "file": "splitlinegroup.go", + "role": "SplitLineGroupAdapter interface, SplitGatheringLine, ResolveSplitLineGroupHeaders", + "watch_for": "splitAt must lie within line.ServicePeriod; empty-after-truncation sides are soft-deleted; isPeriodEmptyConsideringTruncations special-cases FlatPriceType" + }, + { + "file": "stdinvoice.go", + "role": "QuantitySnapshotter interface + BuildStandardInvoiceLines/CalculateLines/IsLineBillableAsOf", + "watch_for": "Build path requires non-empty Invoice.ID and GatheringLines; ToStandardLines then ResolveSplitLineGroupHeaders then snapshot, in that order" + } + ], + "anti_patterns": [ + "panic on missing engine type or inputs in production paths \u2014 return errors (only the testutils Noop panics)", + "Skipping invoicecalc.MergeGeneratedDetailedLines / stdLine.Validate() after generating detailed lines", + "Splitting a line at a point outside its ServicePeriod, or reusing ChildUniqueReferenceID on the post-split clone", + "Returning a raw error for snapshot DB-state failures instead of a billing.ValidationIssue", + "Adding a LineEngine hook to the interface without updating *Engine (and testutils.NoopLineEngine)" + ], + "decisions": [ + { + "decision": "Engine carries a SplitLineGroupAdapter and QuantitySnapshotter as injected collaborators", + "rationale": "Keeps persistence (split groups) and metering (quantity snapshot) behind narrow interfaces so the engine stays a pure orchestration unit" + }, + { + "decision": "Snapshot DB-state errors become critical ValidationIssues", + "rationale": "Lets the invoice surface a recoverable metering problem to the user instead of failing the whole pipeline opaquely" + } + ], + "code_examples": [ + { + "scenario": "Building standard lines: snapshot then rate then validate", + "code": "func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error) {\n\tstdLines, err := e.buildStandardInvoiceLinesWithQuantitySnapshot(ctx, input)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn e.CalculateLines(billing.CalculateLinesInput{Invoice: input.Invoice, Lines: stdLines})\n}" + } + ] + }, + "openmeter/billing/testutils": { + "purpose": "Shared test doubles for the billing domain. Currently provides NoopLineEngine, a no-op billing.LineEngine for embedding in line-engine fakes; it deliberately does NOT implement billing.LineCalculator.", + "patterns": [ + { + "name": "Noop engine implementing every hook", + "description": "NoopLineEngine satisfies var _ billing.LineEngine and returns pass-through results (input.Lines, nil) for every lifecycle hook; Build* methods just call input.GatheringLines.ToStandardLines(input.Invoice.ID).", + "example": "func (NoopLineEngine) OnCollectionCompleted(_ context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error) { return input.Lines, nil }" + }, + { + "name": "Required EngineType via panic", + "description": "GetLineEngineType panics when EngineType is the empty string \u2014 tests must set NoopLineEngine{EngineType: ...}. Panic is acceptable here because it is test-only code.", + "example": "func (e NoopLineEngine) GetLineEngineType() billing.LineEngineType { if e.EngineType == \"\" { panic(\"engine type is required\") }; return e.EngineType }" + } + ], + "key_file_guides": [ + { + "file": "lineengine.go", + "role": "NoopLineEngine struct + all billing.LineEngine hook implementations", + "watch_for": "Intentionally omits LineCalculator (BuildStandardInvoiceLines exists but CalculateLines does not); embed it and add the calculator separately when a fake needs calculation" + } + ], + "anti_patterns": [ + "Importing application wiring (app/common) into test helpers here \u2014 keep testutils dependent only on openmeter/billing", + "Assuming NoopLineEngine implements billing.LineCalculator", + "Using NoopLineEngine without setting EngineType (panics on GetLineEngineType)" + ], + "decisions": [ + { + "decision": "Noop engine is a struct with an exported EngineType field rather than a constructor", + "rationale": "Lets tests pick the engine type inline and embed the noop in larger fakes that override only specific hooks" + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w57.json b/.archie/enrichments/w57.json new file mode 100644 index 0000000000..09f7b020a3 --- /dev/null +++ b/.archie/enrichments/w57.json @@ -0,0 +1,342 @@ +{ + "openmeter/billing/charges/adapter": { + "purpose": "Ent-backed persistence adapter for the root charges facade. Implements charges.Adapter (transaction plumbing) and charges.ChargesSearchAdapter (read-only queries over the chargessearchv1 view) \u2014 it never owns per-charge-type state; that lives in flatfee/usagebased/creditpurchase adapters.", + "patterns": [ + { + "name": "Validate-then-TransactingRepo wrapper", + "description": "Every adapter method calls input.Validate() then wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter)...) so it rebinds to the tx carried in ctx.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (...) { dbCharges, err := tx.db.ChargesSearchV1.Query()... })" + }, + { + "name": "Tx/WithTx/Self transaction trio", + "description": "adapter implements Tx (HijackTx), WithTx (rebuild from raw config via entdb.NewTxClientFromRawConfig), and Self so transaction.Run and TransactingRepo can drive it.", + "example": "func (a *adapter) Tx(ctx) (...) { txCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly:false}); return txCtx, entutils.NewTxDriver(eDriver, rawConfig), nil }" + }, + { + "name": "Reads target the chargessearchv1 view", + "description": "All search queries go through tx.db.ChargesSearchV1 with dbchargessearchv1 predicates (Namespace, IDIn, StatusIn, DeletedAtIsNil), never the concrete charge tables.", + "example": "tx.db.ChargesSearchV1.Query().Where(dbchargessearchv1.Namespace(input.Namespace)).Where(dbchargessearchv1.IDIn(input.IDs...))" + }, + { + "name": "Stable result ordering via entutils.InIDOrder", + "description": "GetByIDs reorders DB rows to match the requested ID slice using entutils.InIDOrder with an InIDOrderAccessor wrapper, enforcing namespace ownership.", + "example": "resultsInOrder, err := entutils.InIDOrder(input.Namespace, input.IDs, withIDAccessor(dbCharges))" + }, + { + "name": "Manual pagination after GroupBy", + "description": "ListCustomersToAdvance uses GroupBy(namespace, customer_id) which cannot Paginate, so it slices results by page.Offset()/page.Limit() manually after a Namespace+CustomerID ordered scan.", + "example": "query.Order(dbchargessearchv1.ByNamespace(), dbchargessearchv1.ByCustomerID()).GroupBy(FieldNamespace, FieldCustomerID).Scan(ctx, &results)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client,Logger}+Validate, New() returning charges.Adapter, and the Tx/WithTx/Self transaction trio.", + "watch_for": "Both Client and Logger are required in Validate(); WithTx must rebuild the ent client from raw tx config, not reuse a.db." + }, + { + "file": "search.go", + "role": "Implements ChargesSearchAdapter: GetByIDs, ListCharges, ListCustomersToAdvance, plus mapChargeSearchToChargeWithType and the searchResultIDAccessor.", + "watch_for": "ListCustomersToAdvance filters StatusNotIn(ChargeStatusFinal, ChargeStatusDeleted) and AdvanceAfterLTE; nil AdvanceAfter rows are excluded. OrderBy switch only supports id/service_period.from/billing_period.from/created_at." + }, + { + "file": "search_test.go", + "role": "Suite-based integration test (InitPostgresDB + migrate.OMMigrationsConfig) inserting ChargeFlatFee rows directly to exercise the search view.", + "watch_for": "Inserts via dbClient.ChargeFlatFee.Create (concrete table) but reads via the chargessearchv1 view, so the view must be migrated." + } + ], + "anti_patterns": [ + "Querying concrete charge tables (ChargeFlatFee, etc.) for reads instead of the ChargesSearchV1 view.", + "Accessing a.db directly inside a method instead of the tx-bound client from TransactingRepo.", + "Returning rows in DB order from GetByIDs instead of InIDOrder request order.", + "Adding per-charge-type lifecycle logic here \u2014 this adapter only does search/tx plumbing." + ], + "decisions": [ + { + "decision": "Search is served by a dedicated chargessearchv1 view rather than UNIONing concrete tables.", + "rationale": "Lets the root facade list/filter heterogeneous charge types (id, customer, status, advance_after) in one indexed query." + }, + { + "decision": "ListCustomersToAdvance returns deduped customer IDs via GroupBy, not charges.", + "rationale": "The advance worker iterates customers, so the adapter collapses many due charges per customer into one row." + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/invoiceupdater": { + "purpose": "Translates charge-engine line patches into concrete billing.Service mutations on gathering and standard invoices. It is the only place charge state is projected back onto invoice lines; it owns no charge state itself.", + "patterns": [ + { + "name": "Discriminated Patch value type", + "description": "Patch carries a PatchOperation op plus one populated sub-struct; construct only via NewCreateLinePatch/NewDeleteLinePatch/NewUpdateLinePatch/NewDeleteGatheringLineByChargeIDPatch/NewUpdateGatheringLineByChargeIDPatch and read via As*Patch() which error on op mismatch.", + "example": "func (p Patch) AsCreateLinePatch() (PatchLineCreate, error) { if p.op != PatchOpLineCreate { return PatchLineCreate{}, fmt.Errorf(...) }; return p.createLinePatch, nil }" + }, + { + "name": "Parse-then-route ApplyPatches pipeline", + "description": "ApplyPatches first parsePatches into patchesParsed, resolves by-charge-id deletes/updates against gathering invoices, provisions new lines, then routes per-invoice patches to gathering vs mutable-standard vs immutable handlers based on invoice.Type() and StatusDetails.Immutable.", + "example": "if invoice.Type()==billing.InvoiceTypeGathering { u.updateGatheringInvoice(...) } else if !standardInvoice.StatusDetails.Immutable { u.updateMutableStandardInvoice(...) } else { u.updateImmutableInvoice(...) }" + }, + { + "name": "EditFn-based invoice mutation", + "description": "Standard/gathering invoice edits go through billing.UpdateStandardInvoiceInput/UpdateGatheringInvoiceInput with an EditFn closure that mutates invoice.Lines (GetByID, ReplaceByID, set DeletedAt), never direct adapter writes.", + "example": "u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{Invoice: invoice.GetInvoiceID(), IncludeDeletedLines:true, EditFn: func(invoice *billing.StandardInvoice) error {...}})" + }, + { + "name": "Charge ownership guard before mutating lines", + "description": "ensureLineHasChargeID is called before deleting/updating a line so the updater only touches charge-backed lines.", + "example": "if err := ensureLineHasChargeID(line, deletePatch.op); err != nil { return err }" + }, + { + "name": "Dry-run patch log suppression", + "description": "LogPatches uses isDryRunLoggablePatch to suppress current-billing-period create-lines and immutable-invoice deletes/updates, focusing logs on actionable drift.", + "example": "return !isCurrentBillingPeriod(createPatch.Line)" + } + ], + "key_file_guides": [ + { + "file": "patch.go", + "role": "PatchOperation constants, the five Patch sub-structs, New* constructors, As* accessors, and Log().", + "watch_for": "Patch fields are unexported \u2014 always go through constructors and accessors; adding an op requires updating Op() dispatch in parsePatches, isDryRunLoggablePatch, and Log." + }, + { + "file": "invoiceupdate.go", + "role": "Updater (wraps billing.Service + logger), ApplyPatches pipeline, gathering/standard/immutable routing, provisionUpcomingLines, by-charge-id resolution.", + "watch_for": "Empty mutable standard invoices (NonDeletedLineCount()==0, non-gathering) are auto-deleted; DeleteFailed status only logs validation issues. Target state is intentionally NOT passed through billing's generic snapshotter \u2014 charge engines own quantity snapshots." + }, + { + "file": "feehelper.go", + "role": "IsFlatFee / GetFlatFeePerUnitAmount / SetFlatFeePerUnitAmount over billing.GenericInvoiceLine price (productcatalog flat price).", + "watch_for": "SetFlatFeePerUnitAmount rebuilds the price via productcatalog.NewPriceFrom(flatPrice) and SetPrice; mutating flatPrice.Amount alone does not persist." + } + ], + "anti_patterns": [ + "Constructing a Patch struct literal directly instead of via New* constructors.", + "Writing invoice lines through ent/adapters instead of billing.Service EditFn closures.", + "Mutating non-charge-backed lines \u2014 every delete/update must pass ensureLineHasChargeID.", + "Pushing charge target-state through billing's generic snapshotter (charge engines own snapshots)." + ], + "decisions": [ + { + "decision": "Invoice mutations are expressed as Patch values applied through billing.Service, not direct DB writes.", + "rationale": "Keeps charge engines decoupled from billing internals and lets billing enforce invoice state-machine rules (immutability, validation)." + }, + { + "decision": "By-charge-id delete/update patches are resolved by listing gathering invoice lines and matching line.ChargeID.", + "rationale": "Charge engines don't always know the gathering line ID, so the updater bridges charge ID -> line ID at apply time." + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/service": { + "purpose": "Root charges facade implementing charges.Service: orchestrates flatfee/usagebased/creditpurchase per-type services, the meta adapter, recognizer, and invoiceupdater into Create/AdvanceCharges/GetByID(s)/ListCharges/ApplyPatches/ListCustomersToAdvance plus subscription and standard-invoice hooks. Single entry point both production wiring and tests drive.", + "patterns": [ + { + "name": "Validate -> namespace lockdown -> transaction.Run", + "description": "Mutating methods run input.Validate(), then s.validateNamespaceLockdown(ns), then wrap the body in transaction.Run / RunWithNoValue over s.adapter.", + "example": "if err := s.validateNamespaceLockdown(input.Customer.Namespace); err != nil { return nil, err }; advancedCharges, err := transaction.Run(ctx, s.adapter, func(ctx) (...) {...})" + }, + { + "name": "Per-type fan-out via ByType / chargesByType", + "description": "Heterogeneous charge intents/charges are split into flatFee/usageBased/creditPurchase buckets (input.Intents.ByType, helpers.chargesByType) and dispatched to the matching sub-service, then re-merged by original index with charges.WithIndex / charges.NewCharge.", + "example": "intentsByType, err := input.Intents.ByType(); flatFees, err := s.flatFeeService.Create(ctx, flatfee.CreateInput{Intents: lo.Map(intentsByType.FlatFee,...)})" + }, + { + "name": "Constructor registers billing hooks", + "description": "New() builds invoiceupdater.New(billingService,logger) and calls BillingService.RegisterStandardInvoiceHooks(standardInvoiceEventHandler); Config.Validate requires all ten dependencies non-nil.", + "example": "config.BillingService.RegisterStandardInvoiceHooks(standardInvoiceEventHandler)" + }, + { + "name": "Earnings recognition after every state change", + "description": "Create/Advance/credit-purchase transitions/standard-invoice events call recognizeCustomerEarnings (deduped customer+currency via lo.Uniq) through the recognizer.Service.", + "example": "if err := s.recognizeCustomerEarnings(ctx, input.Customer, currencies...); err != nil { return nil, err }" + }, + { + "name": "Auto-advance after create in a separate transaction", + "description": "Create commits charge state, then autoAdvanceCreatedCharges advances credit-only charges whose AdvanceAfter is already due in a fresh call so creation persists even if advancing fails.", + "example": "return s.autoAdvanceCreatedCharges(ctx, result.charges)" + }, + { + "name": "Tax-code defaulting on create", + "description": "applyDefaultTaxCodes fills nil TaxCodeID per intent from taxCodeService.GetOrganizationDefaultTaxCodes \u2014 invoicing default for flat-fee/usage-based, credit-grant default for credit purchases.", + "example": "defaultID := defaults.InvoicingTaxCodeID; if intents[idx].Type()==meta.ChargeTypeCreditPurchase { defaultID = defaults.CreditGrantTaxCodeID }" + }, + { + "name": "InvocableCharge adapter for patches", + "description": "ApplyPatches wraps each searched charge in flatFeeInvocableCharge/usageBasedInvocableCharge, calls TriggerPatch to collect invoiceupdater.Patch, then s.invoiceUpdater.ApplyPatches; credit-purchase is not invocable.", + "example": "result, err := invocableCharge.TriggerPatch(ctx, patch); invoicePatches = append(invoicePatches, result.InvoicePatches...)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "service struct, Config + Validate (10 required deps), New() with hook registration, validateNamespaceLockdown.", + "watch_for": "metaAdapter is used directly (no meta service yet); New must register standard invoice hooks or invoice-driven credit purchase transitions won't fire." + }, + { + "file": "create.go", + "role": "Create pipeline: tax defaults, per-type bulk create, gathering-line collection, credit-purchase invoice-now, recognition, auto-advance.", + "watch_for": "Credit purchases bypass collection alignment when ServicePeriod.From <= now (billed immediately); invoice-now runs AFTER the tx commits, not inside it." + }, + { + "file": "advance.go", + "role": "AdvanceCharges: lists non-final charges, advances flat-fee then usage-based (with customer override + resolved feature meters), recognizes earnings.", + "watch_for": "Nil advancedCharge from a sub-service means no transition \u2014 skip it; usage-based needs ResolveFeatureMeters before advancing." + }, + { + "file": "get.go", + "role": "GetByID/GetByIDs and expandChargesWithTypes which groups search items by type, fetches each sub-service, and reorders via entutils.InIDOrder.", + "watch_for": "GetByIDs runs in a transaction; missing IDs surface as NewChargeNotFoundError only in GetByID." + }, + { + "file": "patch.go", + "role": "ApplyPatches: applies per-charge patches then runs Creates LAST (a patch may free a UniqueReferenceID a create reuses).", + "watch_for": "Validates every charge is owned by the input customer+namespace before triggering patches." + }, + { + "file": "invoice.go", + "role": "Standard-invoice hook: processorByType dispatch keyed on StandardInvoice.Status (DraftCreated/Issued/PaymentAuthorized/Paid) into credit-purchase Post* handlers.", + "watch_for": "flatFee/usageBased processors are mostly noop today; nil processor returns error, not skip. Always recognizeCustomerEarnings after handling." + }, + { + "file": "helpers.go", + "role": "chargesByType bucketing and the InvocableCharge interface + flatFee/usageBased wrappers.", + "watch_for": "newInvocableCharges errors on duplicate charge IDs and on credit-purchase type (unsupported for patches)." + }, + { + "file": "base_test.go", + "role": "BaseSuite wiring the full charges stack on top of billingtest.BaseSuite with test handlers; createMockChargeIntent builds flatfee/usagebased intents.", + "watch_for": "TearDownTest must reset handlers + MockStreamingConnector and clock.UnFreeze/ResetTime; line engines must be registered on BillingService before use." + } + ], + "anti_patterns": [ + "Calling per-type adapters directly instead of the flatFee/usageBased/creditPurchase sub-services.", + "Running Create's invoice-now or auto-advance inside the creation transaction.", + "Skipping validateNamespaceLockdown on a new mutating method.", + "Forgetting recognizeCustomerEarnings after a state transition.", + "Adding charge types without extending ByType/chargesByType/expandChargesWithTypes/newInvocableCharges dispatch." + ], + "decisions": [ + { + "decision": "A single root service multiplexes three per-type charge services rather than callers picking a type.", + "rationale": "Charges are heterogeneous within one customer/subscription; the facade preserves intent order and centralizes recognition, tax defaults, and invoice projection." + }, + { + "decision": "Auto-advance and invoice-now run outside the create transaction.", + "rationale": "Creation state must persist even if a downstream advance/invoice fails, since a worker will retry advancement." + }, + { + "decision": "ApplyPatches creates new charges last.", + "rationale": "Deleting a charge can free a UniqueReferenceID that a subsequent create reuses, so ordering avoids collisions." + } + ], + "code_examples": [ + { + "scenario": "Mutating method shape: validate, lockdown, transactional fan-out, recognize", + "code": "func (s *service) AdvanceCharges(ctx context.Context, input charges.AdvanceChargesInput) (charges.Charges, error) {\n\tif err := input.Validate(); err != nil { return nil, err }\n\tif err := s.validateNamespaceLockdown(input.Customer.Namespace); err != nil { return nil, err }\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (charges.Charges, error) {\n\t\tinScope, err := s.ListCharges(ctx, charges.ListChargesInput{Namespace: input.Customer.Namespace, StatusNotIn: []meta.ChargeStatus{meta.ChargeStatusFinal}, CustomerIDs: []string{input.Customer.ID}, Expands: meta.Expands{meta.ExpandRealizations}})\n\t\tif err != nil { return nil, err }\n\t\t// ... dispatch to flatFeeService / usageBasedService, then:\n\t\tif err := s.recognizeCustomerEarnings(ctx, input.Customer, currencies...); err != nil { return nil, err }\n\t\treturn advancedCharges, nil\n\t})\n}" + } + ] + }, + "openmeter/billing/charges/statemachine": { + "purpose": "Generic, type-parameterized charge lifecycle state machine built on qmuntal/stateless. Each per-charge-type service (flatfee/usagebased/creditpurchase) instantiates Machine[CHARGE,BASE,STATUS] to drive status transitions and accumulate invoiceupdater.Patch side effects; this package holds no domain rules itself.", + "patterns": [ + { + "name": "Generic ChargeLike contract", + "description": "CHARGE must satisfy ChargeLike[CHARGE,BASE,STATUS] (GetChargeID/GetStatus/WithStatus/GetBase/WithBase) and STATUS must be a Status (~string with Validate()); the machine mutates the charge through these accessors only.", + "example": "type Machine[CHARGE ChargeLike[CHARGE, BASE, STATUS], BASE any, STATUS Status] struct {...}" + }, + { + "name": "External-storage stateless machine", + "description": "New() builds stateless.NewStateMachineWithExternalStorage reading status from Charge.GetStatus() and writing back via Charge.WithStatus after newStatus.Validate(); uses FiringImmediate.", + "example": "stateless.NewStateMachineWithExternalStorage(accessor, mutator, stateless.FiringImmediate)" + }, + { + "name": "FireAndActivate guards + persists", + "description": "FireAndActivate checks CanFire (returns ErrUnsupportedOperation if not), fires + activates the trigger, then persists via config.Persistence.UpdateBase and folds the result back with WithBase.", + "example": "if !canFire { return fmt.Errorf(\"%w: %s [status=%s,id=%s]\", ErrUnsupportedOperation, trigger, ...) }" + }, + { + "name": "Drive to stable state with TriggerNext", + "description": "AdvanceUntilStateStable loops firing meta.TriggerNext until CanFire is false, returning nil when no transition happened or a pointer to the advanced charge otherwise.", + "example": "for { canFire, _ := m.CanFire(ctx, meta.TriggerNext); if !canFire { ... } m.FireAndActivate(ctx, meta.TriggerNext) }" + }, + { + "name": "Patch accumulation buffer", + "description": "Transitions append invoiceupdater.Patch via AddInvoicePatch; callers read InvoicePatches() (clone) or DrainInvoicePatches() (consume+clear).", + "example": "func (m *Machine...) DrainInvoicePatches() []invoiceupdater.Patch { patches := m.invoicePatches; m.invoicePatches = nil; return patches }" + } + ], + "key_file_guides": [ + { + "file": "machine.go", + "role": "Status/ChargeLike/Persistence/Config/StateMachine interfaces, Machine generic struct, New, Configure, CanFire, FireAndActivate, AdvanceUntilStateStable, RefetchCharge, patch buffer.", + "watch_for": "Config.Validate requires Persistence.UpdateBase and Refetch; status mutator re-validates every new status; ErrUnsupportedOperation is a models.NewGenericPreConditionFailedError wrapping CanFire=false." + }, + { + "file": "machine_test.go", + "role": "Unit tests over the generic machine using a fake meta-typed charge.", + "watch_for": "Tests don't touch Postgres; they exercise transition/guard logic in isolation." + } + ], + "anti_patterns": [ + "Mutating charge status/base directly instead of through WithStatus/WithBase accessors.", + "Firing triggers without CanFire guarding (bypassing ErrUnsupportedOperation).", + "Embedding charge-type-specific business rules here instead of in the per-type service's state configuration.", + "Reading invoicePatches without DrainInvoicePatches when the caller intends to consume them." + ], + "decisions": [ + { + "decision": "One generic Machine parameterized over CHARGE/BASE/STATUS instead of three hand-written machines.", + "rationale": "Flat-fee, usage-based, and credit-purchase share lifecycle plumbing (fire, activate, persist, accumulate patches); only the state graph differs, configured per type." + }, + { + "decision": "External-storage stateless with Persistence callbacks rather than in-memory state.", + "rationale": "Charge status lives in the DB; the machine reads/writes through caller-supplied UpdateBase/Refetch so persistence stays in the owning adapter." + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/testutils": { + "purpose": "Reusable test wiring for the full charges stack. NewServices assembles meta/lineage/flatfee/usagebased/creditpurchase adapters+services and the root charges service from external deps; MockHandlers supplies no-op ledger-transaction handlers. Consumed by subscriptionsync and cross-package billing/credit tests.", + "patterns": [ + { + "name": "One-call stack assembly", + "description": "NewServices(t, Config) constructs every adapter and service in dependency order (metaAdapter, lockr, lineage, flatfee, usagebased, creditpurchase, root charges) and registers each line engine on BillingService.", + "example": "if err := config.BillingService.RegisterLineEngine(flatFeeService.GetLineEngine()); err != nil { return nil, ... }" + }, + { + "name": "Mock handlers return synthetic ledger refs", + "description": "MockHandlers implements flatfee/creditpurchase/usagebased Handler interfaces, each On* method returning newMockLedgerTransactionGroupReference() (a fresh ULID) so charge lifecycle runs without real ledger writes.", + "example": "func newMockLedgerTransactionGroupReference() ledgertransaction.GroupReference { return ledgertransaction.GroupReference{TransactionGroupID: ulid.Make().String()} }" + }, + { + "name": "Config.Validate gates required deps", + "description": "Config.Validate collects errors for missing Client/BillingService/FeatureService/StreamingConnector/handlers/TaxCodeService via errors.Join; RecognizerService defaults to recognizer.NoopService and Logger defaults to slog.Default().", + "example": "if config.RecognizerService == nil { config.RecognizerService = recognizer.NoopService{} }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config + Validate, Services struct, NewServices full-stack builder over an *entdb.Client.", + "watch_for": "Line engines MUST be registered before charge operations; RatingService uses billingratingservice.New() per engine; logger/recognizer are the only optional fields." + }, + { + "file": "handlers.go", + "role": "MockHandlers and the three mock Handler implementations returning synthetic ledger group references.", + "watch_for": "mockFlatFeeHandler.OnAllocateCredits returns nil for zero PreTaxAmountToAllocate; these mocks do no real allocation accounting beyond echoing amounts." + } + ], + "anti_patterns": [ + "Hand-wiring charge services in tests instead of calling NewServices.", + "Skipping RegisterLineEngine, which leaves billing unable to project charge lines.", + "Using the mock handlers when a test needs real ledger/recognizer accounting." + ], + "decisions": [ + { + "decision": "A single NewServices builder mirrors production wiring (base_test.go) for cross-package consumers.", + "rationale": "subscriptionsync and stripe/credits tests need the whole charges stack without duplicating the multi-adapter construction sequence." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w58.json b/.archie/enrichments/w58.json new file mode 100644 index 0000000000..e87444011a --- /dev/null +++ b/.archie/enrichments/w58.json @@ -0,0 +1,269 @@ +{ + "openmeter/billing/charges/creditpurchase/adapter": { + "purpose": "Ent-backed persistence layer for credit-purchase charges, their credit grants, and external/invoiced payment settlements. Implements the creditpurchase.Adapter / CreditGrantAdapter interfaces over the ChargeCreditPurchase* Ent entities.", + "patterns": [ + { + "name": "Constructor returns interface, validates Config", + "description": "New(Config) returns creditpurchase.Adapter; Config.Validate() requires Client, Logger, MetaAdapter. Compile-time check via var _ creditpurchase.Adapter = (*adapter)(nil).", + "example": "func New(config Config) (creditpurchase.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Every method wraps body in entutils.TransactingRepo", + "description": "Read and write methods bind to the ctx-carried tx via entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter)...). tx.db is the tx-aware client; never use a.db directly inside a method body.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (creditpurchase.Charge, error) { query := tx.db.ChargeCreditPurchase.Query()... })" + }, + { + "name": "Validate input before any DB access", + "description": "Each method calls input.Validate() / chargeID.Validate() and returns the zero value + error before touching the DB.", + "example": "if err := input.Validate(); err != nil { return creditpurchase.Charge{}, err }" + }, + { + "name": "DB->domain mapping via Map*FromDB in mapper.go", + "description": "All Ent entities convert to domain through MapChargeBaseFromDB / MapCreditPurchaseChargeFromDB; expand-gated edges (CreditGrant, ExternalPayment, InvoicedPayment) error with lo.ErrorsAs[*entdb.NotLoadedError] if not eager-loaded.", + "example": "if expands.Has(meta.ExpandRealizations) { dbCreditGrant, err := dbEntity.Edges.CreditGrantOrErr(); ... }" + }, + { + "name": "Register charges with meta adapter on create", + "description": "CreateCharge persists the row then calls tx.metaAdapter.RegisterCharges with ChargeTypeCreditPurchase so the meta layer tracks the new charge by ID + UniqueReferenceID.", + "example": "err = tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{ Type: meta.ChargeTypeCreditPurchase, Charges: []meta.IDWithUniqueReferenceID{...} })" + }, + { + "name": "Keyset pagination via explicit cursor predicates", + "description": "ListFundedCreditActivities orders by (GrantedAt, CreditPurchase.CreatedAt, ChargeID) and builds tie-broken Or/And predicates (fundedCreditActivityAfterPredicate/BeforePredicate); fetches Limit+1 to compute hasMore and reverses items for Before.", + "example": "query.Order(dbchargecreditpurchasecreditgrant.ByGrantedAt(sql.OrderDesc()), ...ByCreditPurchaseField(...CreatedAt, sql.OrderDesc()), ...ByChargeID(sql.OrderDesc()))" + }, + { + "name": "Tx plumbing trio: Tx/WithTx/Self", + "description": "adapter implements the entutils transacting contract: Tx hijacks a tx, WithTx rebuilds the adapter from raw tx config, Self returns the receiver.", + "example": "func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txDb := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txDb.Client(), ...} }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config, New constructor, the adapter struct, and Tx/WithTx/Self transaction plumbing", + "watch_for": "WithTx must carry logger and metaAdapter forward; Tx uses ReadOnly:false" + }, + { + "file": "charge.go", + "role": "Charge CRUD: CreateCharge, UpdateCharge, GetByID, GetByIDs, ListCharges, and withExpands edge loader", + "watch_for": "CreateCharge must call metaAdapter.RegisterCharges; GetByIDs uses entutils.InIDOrder to preserve input order; ExpandRealizations loads three edges together" + }, + { + "file": "creditgrant.go", + "role": "CreateCreditGrant - persists a ChargeCreditPurchaseCreditGrant and returns a ledgertransaction.TimedGroupReference", + "watch_for": "GrantedAt is forced to time.UTC on both write and read" + }, + { + "file": "funded_credit_activity.go", + "role": "ListFundedCreditActivities keyset-paginated query plus after/before cursor predicates", + "watch_for": "package-level ListFundedCreditActivities takes a raw *db.Client; cursor tie-breaking spans three columns; Before path reverses results" + }, + { + "file": "mapper.go", + "role": "Map*FromDB converters from Ent entities to creditpurchase domain types", + "watch_for": "realization edges are only mapped when expands.Has(meta.ExpandRealizations); not-loaded edges surface as errors, not nil" + }, + { + "file": "payment.go", + "role": "Create/Update for External and Invoiced payment settlements via payment.CreateExternal/UpdateExternal/CreateInvoiced/UpdateInvoiced helpers", + "watch_for": "builder mutation is delegated to the payment models package; only ChargeID is set locally before handing off" + }, + { + "file": "funded_credit_activity_test.go", + "role": "Postgres-backed suite for cursor pagination, currency filter, and as-of filter", + "watch_for": "uses testutils.InitPostgresDB + migrate.OMMigrationsConfig; inserts raw Ent rows rather than going through the service" + } + ], + "anti_patterns": [ + "Using a.db directly inside a method instead of the tx-bound tx.db from entutils.TransactingRepo", + "Mapping realization edges without first checking expands.Has(meta.ExpandRealizations) / using *OrErr", + "Skipping input.Validate()/chargeID.Validate() before DB access", + "Creating a charge without calling metaAdapter.RegisterCharges", + "Dropping logger or metaAdapter when rebuilding the adapter in WithTx" + ], + "decisions": [ + { + "decision": "Every adapter method re-binds to the ambient transaction via entutils.TransactingRepo even helpers handed a raw *entdb.Client", + "rationale": "Keeps Ent access transaction-aware regardless of caller, per the charges adapter convention in AGENTS.md" + }, + { + "decision": "Realization data (credit grant, external/invoiced payment) is loaded only under ExpandRealizations", + "rationale": "Avoids three extra joins on list/get hot paths and forces callers to opt in to the heavier read" + } + ], + "code_examples": [ + { + "scenario": "Adapter create method: validate, transact, persist via Ent builder, register in meta layer, map to domain", + "code": "func (a *adapter) CreateCharge(ctx context.Context, in creditpurchase.CreateChargeInput) (creditpurchase.Charge, error) {\n\tif err := in.Validate(); err != nil {\n\t\treturn creditpurchase.Charge{}, err\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (creditpurchase.Charge, error) {\n\t\tcreate := tx.db.ChargeCreditPurchase.Create().SetNamespace(in.Namespace).SetCreditAmount(in.Intent.CreditAmount).SetSettlement(in.Intent.Settlement).SetStatusDetailed(creditpurchase.StatusCreated)\n\t\tcreate, err := chargemeta.Create(create, chargemeta.CreateInput{Namespace: in.Namespace, Intent: in.Intent.Intent, Status: meta.ChargeStatusCreated})\n\t\tif err != nil { return creditpurchase.Charge{}, err }\n\t\tdbCreditPurchase, err := create.Save(ctx)\n\t\tif err != nil { return creditpurchase.Charge{}, err }\n\t\tif err := tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{Namespace: in.Namespace, Type: meta.ChargeTypeCreditPurchase, Charges: []meta.IDWithUniqueReferenceID{{ID: dbCreditPurchase.ID, UniqueReferenceID: dbCreditPurchase.UniqueReferenceID}}}); err != nil { return creditpurchase.Charge{}, err }\n\t\treturn MapCreditPurchaseChargeFromDB(dbCreditPurchase, meta.ExpandNone)\n\t})\n}" + } + ] + }, + "openmeter/billing/charges/creditpurchase/lineengine": { + "purpose": "Billing LineEngine/LineCalculator implementation for credit-purchase invoice lines (LineEngineTypeChargeCreditPurchase). Turns gathering lines into rated standard invoice lines and supplies the lifecycle hook surface the billing invoice state machine calls.", + "patterns": [ + { + "name": "Engine satisfies both billing.LineEngine and billing.LineCalculator", + "description": "Compile-time asserted with var _ billing.LineEngine / _ billing.LineCalculator = (*Engine)(nil); GetLineEngineType returns billing.LineEngineTypeChargeCreditPurchase.", + "example": "var ( _ billing.LineEngine = (*Engine)(nil); _ billing.LineCalculator = (*Engine)(nil) )" + }, + { + "name": "Constructor validates RatingService dependency", + "description": "New(Config) returns *Engine; Config.Validate() requires a non-nil rating.Service which is the only dependency.", + "example": "func (c Config) Validate() error { if c.RatingService == nil { return fmt.Errorf(\"rating service is required\") } ... }" + }, + { + "name": "Credit purchases are never progressively billed", + "description": "IsLineBillableAsOf always returns true (no partial-period filtering) and SplitGatheringLine returns an error; encode this invariant rather than implementing splitting.", + "example": "func (e *Engine) SplitGatheringLine(...) (...) { return billing.SplitGatheringLineResult{}, fmt.Errorf(\"credit purchase line is not progressively billed\") }" + }, + { + "name": "Calculation delegates to rating + invoicecalc merge", + "description": "CalculateLines requires Invoice.ID and a non-nil ChargeID per line, calls ratingService.GenerateDetailedLines, then invoicecalc.MergeGeneratedDetailedLines, then stdLine.Validate().", + "example": "generatedDetailedLines, err := e.ratingService.GenerateDetailedLines(stdLine); invoicecalc.MergeGeneratedDetailedLines(stdLine, generatedDetailedLines)" + }, + { + "name": "Most lifecycle hooks are inert pass-throughs", + "description": "OnCollectionCompleted/OnStandardInvoiceCreated return input.Lines unchanged; OnMutableStandardLinesDeleted/OnInvoiceIssued/OnPaymentAuthorized/OnPaymentSettled/OnUnsupportedCreditNote return nil. Side effects live in the service, not the engine.", + "example": "func (e *Engine) OnPaymentSettled(_ context.Context, _ billing.OnPaymentSettledInput) error { return nil }" + } + ], + "key_file_guides": [ + { + "file": "engine.go", + "role": "Whole package: Config/New, the engine type tag, line building (BuildStandardInvoiceLines, BuildStandardLinesForGatheringPreview), CalculateLines, and the no-op lifecycle hooks", + "watch_for": "BuildStandardInvoiceLines converts each gathering line via AsNewStandardLine then routes through CalculateLines; CalculateLines hard-requires stdLine.ChargeID != nil" + } + ], + "anti_patterns": [ + "Implementing SplitGatheringLine or partial-period billing logic - credit purchases bill in full", + "Putting credit-grant/payment side effects into engine hooks instead of the creditpurchase service", + "Calculating a line whose ChargeID is nil or whose Invoice.ID is empty" + ], + "decisions": [ + { + "decision": "The engine is calculation-only; ledger/payment side effects stay in the service layer and its hooks are no-ops", + "rationale": "Keeps the billing invoice state machine's engine contract pure while credit/payment realization is driven by creditpurchase.Service" + }, + { + "decision": "Credit-purchase lines are modeled as a flat in-advance price computed at gathering time", + "rationale": "Credit purchases are one-shot, non-progressive charges, so there is no usage to meter or period to split" + } + ], + "code_examples": [ + { + "scenario": "Building and rating standard invoice lines for credit purchases", + "code": "func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error) {\n\tstdLines, err := slicesx.MapWithErr(input.GatheringLines, func(gl billing.GatheringLine) (*billing.StandardLine, error) {\n\t\treturn gl.AsNewStandardLine(input.Invoice.ID)\n\t})\n\tif err != nil { return nil, err }\n\treturn e.CalculateLines(billing.CalculateLinesInput{Invoice: input.Invoice, Lines: stdLines})\n}" + } + ] + }, + "openmeter/billing/charges/creditpurchase/service": { + "purpose": "Service layer that drives the credit-purchase charge lifecycle: creates the charge, runs settlement-type-specific state machines (promotional/invoice/external), grants ledger credit, backfills lineage, and records payment settlements. Implements creditpurchase.Service.", + "patterns": [ + { + "name": "Constructor validates four collaborators", + "description": "New(Config) returns creditpurchase.Service; Config.Validate() collects errors for nil Adapter, Handler, Lineage, MetaAdapter via errors.Join. The service struct holds exactly these.", + "example": "func (c Config) Validate() error { var errs []error; if c.Adapter == nil { errs = append(errs, errors.New(\"adapter cannot be null\")) } ...; return errors.Join(errs...) }" + }, + { + "name": "Public methods wrap work in transaction.Run", + "description": "Create/List/GetByIDs/ListFundedCreditActivities and the External/Invoice handlers run inside transaction.Run(ctx, s.adapter, ...) or RunWithNoValue; the adapter is the transaction driver.", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (creditpurchase.ChargeWithGatheringLine, error) { ... })" + }, + { + "name": "Settlement-type switch on Create dispatches lifecycle", + "description": "Create normalizes/validates input, persists via adapter.CreateCharge, then switches charge.Intent.Settlement.Type(): Promotional runs the state machine, Invoice is a noop (driven later by invoice hooks) and returns a GatheringLineToCreate, External calls onExternalCreditPurchase.", + "example": "switch charge.Intent.Settlement.Type() { case creditpurchase.SettlementTypePromotional: stateMachine, _ := NewPromotionalCreditPurchaseStateMachine(...); advancedCharge, _ := stateMachine.AdvanceUntilStateStable(ctx) ... }" + }, + { + "name": "Credit grant always pairs with lineage backfill", + "description": "After OnCreditPurchase* yields a ledger TransactionGroupID, code calls adapter.CreateCreditGrant then, if the group id is non-empty, lineage.BackfillAdvanceLineageSegments with namespace/customer/currency/amount/featureFilters.", + "example": "if ledgerTransactionGroupReference.TransactionGroupID != \"\" { s.lineage.BackfillAdvanceLineageSegments(ctx, lineage.BackfillAdvanceLineageSegmentsInput{...}) }" + }, + { + "name": "State machines composed from chargestatemachine.Machine", + "description": "newStateMachineBase wires chargestatemachine.New with Persistence{UpdateBase->adapter.UpdateCharge, Refetch->adapter.GetByID with ExpandRealizations}. Concrete machines (e.g. PromotionalCreditpurchaseStateMachine) call configureStates to Permit(meta.TriggerNext, ...) and OnEntry(statelessx.EntryFunc(...)).", + "example": "s.Configure(creditpurchase.StatusFinal).OnEntry(statelessx.EntryFunc(s.GrantPromotionalCredit))" + }, + { + "name": "Payment realization through ledger handler then adapter", + "description": "External/Invoice payment transitions call s.handler.OnCreditPurchasePaymentAuthorized/Settled to obtain a ledger group reference, then persist via adapter.Create/UpdateExternalPayment or Create/UpdateInvoicedPayment, with idempotency guards on existing settlements.", + "example": "ledgerRef, _ := s.handler.OnCreditPurchasePaymentAuthorized(ctx, creditpurchase.PaymentEventInput{Charge: charge, EventAt: eventAt}); s.adapter.CreateExternalPayment(ctx, charge.GetChargeID(), newPaymentSettlement)" + }, + { + "name": "Invoice-settled side effects are gathering-line + post-hooks", + "description": "Invoice settlement does not act during Create; buildInvoiceCreditPurchaseGatheringLine emits a non-taxable flat in-advance GatheringLine (annotated AnnotationKeyTaxable=false, AnnotationKeyReason=CreditPurchase), and PostInvoiceDraftCreated/PaymentAuthorized/PaymentSettled run from billing PostUpdate hooks.", + "example": "annotations[billing.AnnotationKeyTaxable] = lo.ToPtr(\"false\"); annotations[billing.AnnotationKeyReason] = lo.ToPtr(billing.AnnotationValueReasonCreditPurchase)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Config/Validate, New, and the service struct (adapter, metaAdapter, handler, lineage)", + "watch_for": "all four deps are mandatory; struct field set must mirror Config" + }, + { + "file": "create.go", + "role": "Create entrypoint with the settlement-type switch and buildInvoiceCreditPurchaseGatheringLine", + "watch_for": "Invoice case is intentionally a noop at create time and returns ChargeWithGatheringLine.GatheringLineToCreate; total cost = CreditAmount * CostBasis rounded by currency calculator" + }, + { + "file": "external.go", + "role": "onExternalCreditPurchase plus HandleExternalPaymentAuthorized/Settled - drives external settlement to Active/Final", + "watch_for": "InitialStatus determines whether authorized/settled transitions fire; guards ErrPaymentAlreadyAuthorized / ErrCannotSettleNotAuthorizedPayment / ErrPaymentAlreadySettled" + }, + { + "file": "invoice.go", + "role": "PostInvoiceDraftCreated/PostInvoicePaymentAuthorized/PostInvoicePaymentSettled invoked from billing PostUpdate hooks", + "watch_for": "these run already inside a billing transaction; they grant credit on draft, then create/settle the invoiced payment and flip status to Final" + }, + { + "file": "promotional.go", + "role": "grantPromotionalCredit and the PromotionalCreditpurchaseStateMachine (configureStates, GrantPromotionalCredit)", + "watch_for": "rejects an already-realized credit grant; Final state OnEntry grants credit; both Created and Active permit TriggerNext->Final" + }, + { + "file": "statemachine.go", + "role": "stateMachine base wrapping chargestatemachine.Machine with Persistence (UpdateBase, Refetch)", + "watch_for": "Refetch must expand meta.ExpandRealizations or downstream mapping fails; StateMachineConfig.Validate requires Charge.ID and Adapter" + }, + { + "file": "get.go / funded_credit_activity.go", + "role": "Read-side List/GetByIDs and ListFundedCreditActivities, each transaction.Run + adapter delegation", + "watch_for": "thin wrappers; only add validation, do not bypass transaction.Run" + }, + { + "file": "promotional_test.go", + "role": "Mock-driven unit tests for the promotional state machine using fake adapter/handler/lineage", + "watch_for": "lineage mock is matched on namespace/customer/currency/amount; tests assert single CreateCreditGrant call and Final status" + } + ], + "anti_patterns": [ + "Granting credit without immediately backfilling lineage via lineage.BackfillAdvanceLineageSegments when the ledger group id is non-empty", + "Acting on invoice-settlement charges during Create instead of deferring to PostInvoice* hooks", + "Bypassing the settlement-type state machine and mutating charge.Status directly outside the lifecycle methods", + "Building a Refetch in a state machine without meta.ExpandRealizations (realizations come back unmapped)", + "Re-authorizing/settling a payment without the existing-settlement idempotency guards" + ], + "decisions": [ + { + "decision": "Settlement type (Promotional/Invoice/External) selects a distinct lifecycle path, with promotional/external driven synchronously and invoice driven by billing invoice hooks", + "rationale": "Promotional/external grants happen at charge time, but invoiced credit purchases must follow the invoice state machine, so their grant/payment is deferred to PostInvoice* callbacks" + }, + { + "decision": "Lifecycle progression is expressed as a chargestatemachine.Machine with OnEntry side effects rather than imperative status writes", + "rationale": "Keeps grant/transition effects coupled to state entry and reuses the shared charges state-machine framework for persistence and refetch" + }, + { + "decision": "Ledger interaction is mediated by a Handler interface (OnCreditPurchaseInitiated/PaymentAuthorized/PaymentSettled/OnPromotionalCreditPurchase) injected into the service", + "rationale": "Decouples charge lifecycle from concrete ledger wiring and lets tests substitute a fake handler" + } + ], + "code_examples": [ + { + "scenario": "Create dispatches on settlement type and advances the promotional state machine", + "code": "func (s *service) Create(ctx context.Context, input creditpurchase.CreateInput) (creditpurchase.ChargeWithGatheringLine, error) {\n\tinput.Intent = input.Intent.Normalized()\n\tif err := input.Validate(); err != nil { return creditpurchase.ChargeWithGatheringLine{}, err }\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (creditpurchase.ChargeWithGatheringLine, error) {\n\t\tcharge, err := s.adapter.CreateCharge(ctx, creditpurchase.CreateChargeInput(input))\n\t\tif err != nil { return creditpurchase.ChargeWithGatheringLine{}, err }\n\t\tswitch charge.Intent.Settlement.Type() {\n\t\tcase creditpurchase.SettlementTypePromotional:\n\t\t\tsm, err := NewPromotionalCreditPurchaseStateMachine(StateMachineConfig{Charge: charge, Adapter: s.adapter, Service: s})\n\t\t\tif err != nil { return creditpurchase.ChargeWithGatheringLine{}, err }\n\t\t\tadvanced, err := sm.AdvanceUntilStateStable(ctx)\n\t\t\tif err != nil { return creditpurchase.ChargeWithGatheringLine{}, err }\n\t\t\tif advanced != nil { charge = *advanced }\n\t\tcase creditpurchase.SettlementTypeExternal:\n\t\t\tcharge, err = s.onExternalCreditPurchase(ctx, charge)\n\t\t}\n\t\treturn creditpurchase.ChargeWithGatheringLine{Charge: charge}, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w59.json b/.archie/enrichments/w59.json new file mode 100644 index 0000000000..f786669465 --- /dev/null +++ b/.archie/enrichments/w59.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/flatfee/adapter": { + "purpose": "Ent-backed persistence adapter for flat-fee charges and their realization runs. It implements the segmented flatfee.Adapter interfaces (ChargeAdapter, ChargeRunAdapter, ChargeDetailedLineAdapter, ChargeCreditAllocationAdapter, ChargePaymentAdapter, ChargeInvoicedUsageAdapter) over the ChargeFlatFee* Ent tables, and is the only place SQL-shaped operations for flat-fee charges live.", + "patterns": [ + { + "name": "Transaction-aware via entutils.TransactingRepo", + "description": "Every write/read method body is wrapped in entutils.TransactingRepo (value-returning) or entutils.TransactingRepoWithNoValue (no value), rebinding to the tx carried in ctx. The adapter implements Tx/WithTx/Self to participate in entutils transactions.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (flatfee.ChargeBase, error) { ... tx.db.ChargeFlatFee.UpdateOneID(...) ... })" + }, + { + "name": "Validate inputs before persisting", + "description": "Methods call input/charge Validate() (e.g. charge.ManagedModel.Validate(), in.Validate(), runID.Validate()) before touching the DB, returning early on error.", + "example": "if err := in.Validate(); err != nil { return nil, err }" + }, + { + "name": "Namespace-scoped queries always", + "description": "Every Ent query/update filters by namespace (dbchargeflatfee.NamespaceEQ / .Namespace) in addition to ID \u2014 multi-tenant isolation is mandatory.", + "example": "tx.db.ChargeFlatFee.UpdateOneID(charge.ID).Where(dbchargeflatfee.NamespaceEQ(charge.Namespace))" + }, + { + "name": "Map* functions for DB<->domain conversion", + "description": "All conversion lives in mapper.go as MapChargeFlatFeeFromDB / MapChargeBaseFromDB / mapRealizationRunFromDB. Edges are read via *OrErr() and a NotLoadedError is turned into an explicit 'not loaded' error rather than silently zero-valued.", + "example": "dbCreditsAllocated, err := dbRun.Edges.CreditAllocationsOrErr(); if _, ok := lo.ErrorsAs[*entdb.NotLoadedError](err); ok { return ..., fmt.Errorf(\"credits allocated not loaded ...\") }" + }, + { + "name": "Expands gate eager-loading", + "description": "Realization edges are loaded only when meta.Expands.Has(meta.ExpandRealizations) via expandRealizations(query); detailed lines are fetched separately when ExpandDetailedLines is set. Mapping respects the same flag so unloaded edges are never dereferenced.", + "example": "if input.Expands.Has(meta.ExpandRealizations) { query = expandRealizations(query) }" + }, + { + "name": "Soft-delete + upsert for detailed lines", + "description": "UpsertDetailedLines soft-deletes (SetDeletedAt) rows whose ChildUniqueReferenceID is not in the new set, then CreateBulk with OnConflict on (namespace, run_id, child_unique_reference_id) WHERE deleted_at IS NULL, ignoring created_at/id.", + "example": "OnConflict(sql.ConflictColumns(FieldNamespace, FieldRunID, FieldChildUniqueReferenceID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt)), sql.ResolveWithNewValues(), ...)" + }, + { + "name": "Register/Deregister charge IDs with the meta adapter", + "description": "CreateCharges calls tx.metaAdapter.RegisterCharges and DeleteCharge calls tx.metaAdapter.DeleteRegisteredCharge inside the same tx, keeping the shared charge-meta registry in sync with flat-fee rows.", + "example": "err = tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{Namespace: in.Namespace, Type: meta.ChargeTypeFlatFee, Charges: ...})" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{MetaAdapter, Client, Logger} + New() returning flatfee.Adapter; implements Tx/WithTx/Self for entutils transactions.", + "watch_for": "Config.Validate() requires all three fields non-nil. WithTx rebuilds the adapter from raw tx config \u2014 do not bypass it by holding the original db client across a tx." + }, + { + "file": "charge.go", + "role": "ChargeAdapter: CreateCharges (bulk), UpdateCharge, UpdateSubscriptionItemID, DeleteCharge, GetByID(s); plus expandRealizations and buildCreateFlatFeeCharge.", + "watch_for": "Status must be converted via charge.Status.ToMetaChargeStatus() and persisted through chargemeta.Create/Update \u2014 do not write status fields directly. InvoiceAt is normalized via meta.NormalizeTimestamp(...).In(time.UTC)." + }, + { + "file": "mapper.go", + "role": "DB->domain mappers and proRatingConfigFromDB/ToDB enum conversion; sortDetailedLines via stddetailedline.Compare.", + "watch_for": "Edge OrErr() NotLoadedError handling is load-bearing; CurrentRealizationRunID drives CurrentRun vs PriorRuns split \u2014 a current run id with no loaded run is an error." + }, + { + "file": "realizationrun.go", + "role": "ChargeRunAdapter: CreateCurrentRun (locks charge ForUpdate, rejects if a current run exists), UpdateRealizationRun (mo.Option-gated field sets), DetachCurrentRun.", + "watch_for": "CreateCurrentRun uses ForUpdate() to serialize; it errors with 'already has current run'. UpdateRealizationRun applies only Present() fields and calls input.Normalized() first." + }, + { + "file": "detailedline.go", + "role": "ChargeDetailedLineAdapter: FetchCurrentRunDetailedLines and UpsertDetailedLines (soft-delete + bulk upsert).", + "watch_for": "FetchCurrentRunDetailedLines requires charge.Realizations.CurrentRun != nil. UpsertDetailedLines clones each line, clears DeletedAt, and only deletes lines NOT in childRefsToKeep \u2014 an empty new set deletes all." + }, + { + "file": "credits.go", + "role": "ChargeCreditAllocationAdapter: CreateCreditAllocations bulk-inserts ChargeFlatFeeRunCreditAllocations after verifying the run exists.", + "watch_for": "Uses creditrealization.Create(create, namespace, idx, input) per row; run existence is checked with Only(ctx) before insert." + }, + { + "file": "payment.go", + "role": "ChargePaymentAdapter: CreatePayment / UpdatePayment over ChargeFlatFeeRunPayment using payment.CreateInvoiced/UpdateInvoiced builders.", + "watch_for": "Maps back via payment.MapInvoicedFromDB; update is namespace-scoped by UpdateOneID + Where(Namespace)." + }, + { + "file": "usage.go", + "role": "ChargeInvoicedUsageAdapter: CreateInvoicedUsage sets the run's LineID/InvoiceID then inserts ChargeFlatFeeRunInvoicedUsage.", + "watch_for": "Two writes in one tx (run refs update + invoiced-usage create) must stay atomic; uses invoicedusage.Create builder helper." + } + ], + "anti_patterns": [ + "Calling tx.db / a.db Ent builders outside an entutils.TransactingRepo(WithNoValue) wrapper, breaking transaction propagation carried in ctx.", + "Querying or updating ChargeFlatFee* tables without a namespace predicate (cross-tenant leakage).", + "Dereferencing realization/credit/usage/payment edges without checking *OrErr() NotLoadedError, or mapping realizations when ExpandRealizations was not requested.", + "Writing StatusDetailed or meta fields directly instead of going through chargemeta.Create/Update and ToMetaChargeStatus().", + "Creating a second current run without honoring the ForUpdate lock and CurrentRealizationRunID nil check in CreateCurrentRun." + ], + "decisions": [ + { + "decision": "Adapter split into many small interface implementations (Charge/Run/DetailedLine/CreditAllocation/Payment/InvoicedUsage) all backed by one *adapter struct.", + "rationale": "Lets the service layer depend on narrow capabilities while keeping a single transactional Ent client and meta-registry wiring." + }, + { + "decision": "Detailed lines are upserted by ChildUniqueReferenceID with soft-delete rather than delete-and-reinsert.", + "rationale": "Preserves row identity/created_at and external invoicing references across re-realizations while idempotently replacing the line set." + }, + { + "decision": "Charge IDs are reserved/released in the shared meta adapter inside the same transaction as the flat-fee row.", + "rationale": "Keeps the polymorphic charge registry consistent with the concrete flat-fee table so meta queries resolve correctly." + } + ], + "code_examples": [ + { + "scenario": "Standard transaction-aware, namespace-scoped, validate-first adapter method returning a mapped domain value.", + "code": "func (a *adapter) GetByID(ctx context.Context, input flatfee.GetByIDInput) (flatfee.Charge, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn flatfee.Charge{}, err\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (flatfee.Charge, error) {\n\t\tquery := tx.db.ChargeFlatFee.Query().\n\t\t\tWhere(dbchargeflatfee.Namespace(input.ChargeID.Namespace)).\n\t\t\tWhere(dbchargeflatfee.ID(input.ChargeID.ID))\n\t\tif input.Expands.Has(meta.ExpandRealizations) {\n\t\t\tquery = expandRealizations(query)\n\t\t}\n\t\tentity, err := query.First(ctx)\n\t\tif err != nil {\n\t\t\tif db.IsNotFound(err) {\n\t\t\t\treturn flatfee.Charge{}, models.NewGenericNotFoundError(fmt.Errorf(\"flat fee charge [id=%s] not found\", input.ChargeID))\n\t\t\t}\n\t\t\treturn flatfee.Charge{}, fmt.Errorf(\"querying flat fee charge [id=%s]: %w\", input.ChargeID, err)\n\t\t}\n\t\treturn MapChargeFlatFeeFromDB(entity, input.Expands)\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w6.json b/.archie/enrichments/w6.json new file mode 100644 index 0000000000..96b2d1dd77 --- /dev/null +++ b/.archie/enrichments/w6.json @@ -0,0 +1,142 @@ +{ + "cmd/jobs": { + "purpose": "Entrypoint package for the `jobs` CLI binary \u2014 a Cobra root command that runs one-off operational jobs (billing advancement/collection/subscriptionsync, ledger account backfill, entitlement snapshot recalculation, llmcost, quickstart, migrate) against a single Wire-built `internal.Application`. main.go owns process lifecycle and command registration only; all job logic lives in subcommand packages.", + "patterns": [ + { + "name": "Cobra root aggregates subcommand packages", + "description": "main.go's rootCmd registers each domain subcommand via rootCmd.AddCommand(...), pulling each from its own package (billing.Cmd, ledger.Cmd, llmcost.Cmd, quickstart.Cmd, entitlement.RootCommand(), migrate.RootCommand()). New jobs are added by creating a subpackage and registering it here \u2014 never by adding RunE logic in main.go.", + "example": "rootCmd.AddCommand(billing.Cmd); rootCmd.AddCommand(ledger.Cmd)" + }, + { + "name": "App initialized once in PersistentPreRunE", + "description": "The Wire application is built exactly once via internal.InitializeApplication(ctx, configFileName) inside rootCmd.PersistentPreRunE before any subcommand RunE runs. Subcommands read the shared internal.App / internal.Config globals instead of constructing their own DI graph.", + "example": "PersistentPreRunE: func(...) error { return internal.InitializeApplication(ctx, configFileName) }" + }, + { + "name": "Signal-aware root context", + "description": "main() builds ctx via signal.NotifyContext(context.Background(), SIGINT, SIGHUP, SIGTERM) and runs rootCmd.ExecuteContext(ctx); subcommands must propagate this context (cmd.Context()) for cancellation on shutdown.", + "example": "ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGHUP, syscall.SIGTERM)" + }, + { + "name": "Deferred shutdown + panic logging", + "description": "main() defers log.PanicLogger(log.WithExit) first, then a guarded internal.AppShutdown() call (nil-checked because init may fail before it is set). PersistentPreRunE also invokes AppShutdown on init failure.", + "example": "defer log.PanicLogger(log.WithExit); defer func(){ if internal.AppShutdown != nil { internal.AppShutdown() } }()" + }, + { + "name": "Config via Viper bound to --config flag", + "description": "A persistent --config flag (default config.yaml) is bound with viper.BindPFlag and consumed by internal.loadConfig (config.go), which unmarshals into internal.Config and calls Config.Validate(). Job logic never re-reads config files.", + "example": "viper.BindPFlag(\"config\", rootCmd.PersistentFlags().Lookup(\"config\"))" + } + ], + "key_file_guides": [ + { + "file": "main.go", + "role": "Process entrypoint: builds signal context, defines rootCmd, wires PersistentPreRunE -> internal.InitializeApplication, registers all subcommand trees, runs ExecuteContext.", + "watch_for": "No RunE/business logic here. SilenceUsage/SilenceErrors are true, so errors are logged manually and os.Exit(1) is called explicitly \u2014 keep that contract." + }, + { + "file": "version.go", + "role": "Defines `version` subcommand via versionCommand(); prints internal.Version() (version, revision, revisionDate).", + "watch_for": "Version data comes from internal.Version(), not ldflags read here directly." + }, + { + "file": "internal/", + "role": "Holds the Wire application graph (wire.go/wire_gen.go), package-level globals (App, AppShutdown, Config, ConfigFile in globals.go), config loading (config.go), and InitializeApplication (app.go).", + "watch_for": "App/AppShutdown/Config are nolint:gochecknoglobals mutable package globals; safe to read only after PersistentPreRunE has run. Subcommands must guard nil AppShutdown." + } + ], + "anti_patterns": [ + "Adding job business logic, flags, or service construction in main.go instead of a dedicated subcommand package.", + "Building a second Wire application or constructing services directly in a subcommand instead of reading internal.App.", + "Forgetting rootCmd.AddCommand(...) for a new subpackage \u2014 the command becomes unreachable from the CLI.", + "Introducing context.Background() in a subcommand instead of propagating the signal-aware ctx threaded from ExecuteContext.", + "Skipping the nil-check on internal.AppShutdown, which can be unset if initialization fails early." + ], + "decisions": [ + { + "decision": "Initialize the full application once in PersistentPreRunE rather than per-subcommand.", + "rationale": "All operational jobs share the same heavy DI graph (DB, billing, ledger, streaming); building it once at the root avoids duplicated wiring and config parsing across subcommands." + }, + { + "decision": "Keep main.go a thin Cobra aggregator with no RunE logic.", + "rationale": "Each operational concern (billing, ledger, entitlement, migrate) evolves independently in its own package; the root only owns lifecycle, signals, config flag, and registration." + } + ], + "code_examples": [ + { + "scenario": "Adding a new operational subcommand to the jobs binary", + "code": "import (\n\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"\n)\n\n// in your subpackage:\nvar Cmd = &cobra.Command{\n\tUse: \"myjob\",\n\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t// internal.App is already built by the root's PersistentPreRunE\n\t\treturn internal.App.SomeService.DoWork(cmd.Context())\n\t},\n}\n\n// in cmd/jobs/main.go:\nrootCmd.AddCommand(myjob.Cmd)" + } + ] + }, + "openmeter/billing/worker/subscriptionsync": { + "purpose": "The subscription\u2192billing sync bridge package: defines the contracts that reconcile a subscription's billable target state into billing artifacts (invoice lines + charges) and persist per-subscription sync bookkeeping. The root holds only the public interfaces (service.go, adapter.go); service/ orchestrates, adapter/ persists, and reconciler/ drives the periodic re-sync loop. Primary constraint: this is a thin interface-defining package \u2014 concrete behavior lives in the child packages, all of which must honor the per-customer billing lock and the Plan-is-pure / Apply-is-the-only-writer split.", + "patterns": [ + { + "name": "Composed Service interface from three role interfaces", + "description": "Service embeds EventHandler + SyncService + SyncStateService; new public capabilities go onto the matching sub-interface, not a flat method list. EventHandler holds the event entrypoints (HandleCancelledEvent, HandleDeletedEvent, HandleSubscriptionSyncEvent, HandleInvoiceCreation), SyncService the imperative Sync* calls, SyncStateService the read-only GetSyncStates.", + "example": "type Service interface { EventHandler; SyncService; SyncStateService }" + }, + { + "name": "Adapter = SyncStateAdapter + entutils.TxCreator", + "description": "The persistence contract is only the three sync-state ops (InvalidateSyncState, GetSyncStates, UpsertSyncState) plus the transaction-creator mixin; the adapter/ child implements it. Invoice/charge persistence never belongs on this Adapter \u2014 that flows through billing.Service.", + "example": "type Adapter interface { SyncStateAdapter; entutils.TxCreator }" + }, + { + "name": "Input type aliases over wrapper structs", + "description": "Inputs reuse existing types via aliases (InvalidateSyncStateInput = models.NamespacedID, GetSyncStatesInput = []models.NamespacedID, UpsertSyncStateInput = SyncState) instead of new structs; Validate() lives on the aliased target (SyncState).", + "example": "type UpsertSyncStateInput = SyncState" + }, + { + "name": "Validate() collects errors via errors.Join", + "description": "UpsertSyncStateInput.Validate appends each field issue to var errs []error and returns errors.Join(errs...) rather than returning on first failure \u2014 follow this when adding new input validators.", + "example": "var errs []error; if err := i.SubscriptionID.Validate(); err != nil { errs = append(errs, err) }; return errors.Join(errs...)" + }, + { + "name": "DryRun via functional option", + "description": "Sync entrypoints take ...SynchronizeSubscriptionOption; EnableDryRun() sets SynchronizeSubscriptionOptions.DryRun. New sync knobs follow the same option-func shape, not extra method params.", + "example": "func EnableDryRun() SynchronizeSubscriptionOption { return func(o *SynchronizeSubscriptionOptions) { o.DryRun = true } }" + }, + { + "name": "SyncState HasBillables\u21d2NextSyncAfter coupling invariant", + "description": "When HasBillables is true, NextSyncAfter must be non-nil; if set, NextSyncAfter must be non-zero. The reconciler relies on this pairing for cooldown gating \u2014 preserve it in any writer of SyncState.", + "example": "if i.HasBillables && i.NextSyncAfter == nil { errs = append(errs, errors.New(\"next sync after is required when the subscription has billables\")) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Declares the package-public Service interface (composed of EventHandler, SyncService, SyncStateService) and the SynchronizeSubscriptionOption/EnableDryRun option type. Pure contract \u2014 no implementation.", + "watch_for": "Both SyncByView/SyncByID (option-aware) and the *AndInvoiceCustomer variants exist; the invoice-customer variants intentionally take no options \u2014 don't collapse them. Add new capability to the correct sub-interface, not a flat dump on Service." + }, + { + "file": "adapter.go", + "role": "Declares Adapter (SyncStateAdapter + entutils.TxCreator), the SyncState struct, the three input aliases, and UpsertSyncStateInput.Validate.", + "watch_for": "Keep scoped to sync-state bookkeeping only; invoice/line/charge persistence goes through billing.Service/Adapter. The HasBillables\u21d2NextSyncAfter invariant in Validate is load-bearing for reconciler cooldown." + } + ], + "anti_patterns": [ + "Adding invoice-line or charge persistence methods to the Adapter interface \u2014 its only job is SubscriptionBillingSyncState bookkeeping; billing writes go through billing.Service.", + "Flattening the composed Service interface or dropping a sub-interface (EventHandler/SyncService/SyncStateService) \u2014 callers and the event consumer depend on these roles.", + "Writing SyncState with HasBillables=true but NextSyncAfter=nil (or zero) \u2014 violates Validate and silently breaks the reconciler's cooldown skip.", + "Returning on the first validation error instead of collecting into errs and errors.Join \u2014 diverges from repo convention and hides field issues.", + "Introducing a new input struct where a models.NamespacedID / SyncState alias already expresses the shape." + ], + "decisions": [ + { + "decision": "Keep the root package as interfaces + the SyncState DTO only; push orchestration to service/, persistence to adapter/, and the periodic loop to reconciler/.", + "rationale": "Lets the event-driven path and the reconciliation loop both depend on the same narrow contracts without import cycles, and keeps pure planning cleanly separable from writing." + }, + { + "decision": "Model sync bookkeeping as a dedicated SyncState (SubscriptionID, HasBillables, SyncedAt, NextSyncAfter) rather than deriving freshness from billing artifacts.", + "rationale": "The reconciler can cheaply skip up-to-date subscriptions via persisted HasBillables + NextSyncAfter cooldown instead of recomputing target state for every subscription each run." + } + ], + "code_examples": [ + { + "scenario": "Defining the persistence contract and its validated input", + "code": "type Adapter interface {\n\tSyncStateAdapter\n\tentutils.TxCreator\n}\n\ntype SyncState struct {\n\tSubscriptionID models.NamespacedID\n\tHasBillables bool\n\tSyncedAt time.Time\n\tNextSyncAfter *time.Time\n}\n\nfunc (i UpsertSyncStateInput) Validate() error {\n\tvar errs []error\n\tif err := i.SubscriptionID.Validate(); err != nil {\n\t\terrs = append(errs, err)\n\t}\n\tif i.HasBillables && i.NextSyncAfter == nil {\n\t\terrs = append(errs, errors.New(\"next sync after is required when the subscription has billables\"))\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w60.json b/.archie/enrichments/w60.json new file mode 100644 index 0000000000..f60d53b4d0 --- /dev/null +++ b/.archie/enrichments/w60.json @@ -0,0 +1,101 @@ +{ + "openmeter/billing/charges/flatfee/service/realizations": { + "purpose": "Owns flat-fee realization mechanics: credit allocation, credit correction, and detailed-line/run-totals persistence for the credit_then_invoice, credits-only, and invoice-accrued lifecycle modes. Strictly a mechanics layer \u2014 it must NOT make state-machine decisions (those live in the flatfee state machine that calls it).", + "patterns": [ + { + "name": "Input struct + Validate() per operation", + "description": "Every public Service method takes one named Input struct exposing a Validate() error that aggregates field errors via errors.Join and returns models.NewNillableGenericValidationError. The method calls in.Validate() first and returns the zero Result on failure.", + "example": "func (i ReconcileCreditRealizationsInput) Validate() error { var errs []error; if err := i.Charge.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"charge: %w\", err)) }; ... return models.NewNillableGenericValidationError(errors.Join(errs...)) }" + }, + { + "name": "Named Result structs", + "description": "Methods return a dedicated Result struct (e.g. ReconcileCreditRealizationsResult, AccrueInvoiceUsageResult) carrying the persisted run, delta, and creditrealization.Realizations \u2014 never bare tuples of domain values.", + "example": "type StartCreditThenInvoiceRunResult struct { Run flatfee.RealizationRun }" + }, + { + "name": "Wrap persistence in transaction.Run", + "description": "Any method that performs multiple adapter writes (create run, create credit allocations, upsert detailed lines, update run totals) wraps the body in transaction.Run(ctx, s.adapter, func(ctx)...). AllocateCreditsOnly, StartCreditThenInvoiceRun, ReconcileStandardLineToIntent, and AccrueInvoiceUsage all do this; pure-compute BuildCreditThenInvoiceGatheringPreviewRun does not (no ctx, no writes).", + "example": "return transaction.Run(ctx, s.adapter, func(ctx context.Context) (AccrueInvoiceUsageResult, error) { ... })" + }, + { + "name": "Round through CurrencyCalculator before compare/persist", + "description": "Amounts are passed through in.CurrencyCalculator.RoundToPrecision before delta computation, equality checks, and persistence. Deltas drive a delta.IsPositive/IsNegative/IsZero switch (positive=allocate, negative=correct lineage, zero=no-op).", + "example": "in.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount); delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount))" + }, + { + "name": "Delegate credit math to the flatfee Handler, persist via Adapter", + "description": "Credit allocation/correction decisions go through s.handler.OnAllocateCredits / OnCorrectCreditAllocations; persistence (CreateCurrentRun, CreateCreditAllocations, UpsertDetailedLines, UpdateRealizationRun, CreateInvoicedUsage) goes through s.adapter. The createCreditAllocations helper always pairs adapter.CreateCreditAllocations with lineage.CreateInitialLineages + PersistCorrectionLineageSegments.", + "example": "realizations, err := s.adapter.CreateCreditAllocations(ctx, runID, creditAllocations); ... s.lineage.CreateInitialLineages(ctx, ...)" + }, + { + "name": "Rate line, then apply credits to derive detailed lines/totals", + "description": "rateFlatFeeLine clones the line, clears CreditsApplied and split metadata, calls ratingService.GenerateDetailedLines(WithCreditsMutatorDisabled), merges via invoicecalc.MergeGeneratedDetailedLines. applyCreditsToFlatFeeLine then re-applies CreditsApplied and recomputes Totals. Both validate before returning.", + "example": "line, err := rateFlatFeeLine(in.Line, s.ratingService); mappedLine, err := applyCreditsToFlatFeeLine(*line, creditsApplied, currencyCalculator)" + }, + { + "name": "Tag credit allocations with LineID", + "description": "Allocation inputs from the handler are mapped to stamp allocation.LineID = run/line ID before persistence so credit realizations are linked to the originating invoice line.", + "example": "creditAllocationsWithLineID := creditrealization.CreateAllocationInputs(lo.Map(creditAllocations, func(a creditrealization.CreateAllocationInput, _ int) creditrealization.CreateAllocationInput { a.LineID = lo.ToPtr(in.Line.ID); return a }))" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines Service struct (adapter flatfee.Adapter, handler flatfee.Handler, lineage lineage.Service, ratingService rating.Service), Config+Validate, New constructor, and the shared createCreditAllocations helper.", + "watch_for": "Service must NOT make state-machine decisions (documented contract). createCreditAllocations always runs CreateInitialLineages AND PersistCorrectionLineageSegments \u2014 never skip the lineage calls when adding a new credit path." + }, + { + "file": "correct.go", + "role": "ReconcileCredits (delta-driven allocate/correct/no-op) and CorrectAllCredits \u2014 adjust a run's credit realizations to a target or fully reverse them, loading active lineage segments via lineage.LoadActiveSegmentsByRealizationID.", + "watch_for": "Negative delta must correct existing lineage (Run.CreditRealizations.Correct), not create unrelated negative rows. TargetAmount is rounded before Validate." + }, + { + "file": "creditsonly.go", + "role": "AllocateCreditsOnly \u2014 credit allocation with no invoice line; updates the current run totals (CreditsTotal=allocated, Total=Zero) inside a transaction.", + "watch_for": "Asserts allocated.Equal(in.Amount) and returns NewGenericValidationError on mismatch. Requires Charge.Realizations.CurrentRun != nil." + }, + { + "file": "credittheninvoice.go", + "role": "StartCreditThenInvoiceRun (create mutable CTI run + allocate credits) and ReconcileStandardLineToIntent (re-sync a mutable line+run after intent change). Hosts the shared rateFlatFeeLine/applyCreditsToFlatFeeLine helpers.", + "watch_for": "Reconcile uses the rebuilt LINE period for both credit allocation and the run update (run.ServicePeriod = in.Line.Period) so ledger and invoice describe the same window. rateFlatFeeLine clears SplitLineGroupID/SplitLineHierarchy so the flat pricer doesn't skip a billable run." + }, + { + "file": "invoiceaccrued.go", + "role": "AccrueInvoiceUsage \u2014 books invoice-accrued usage via handler.OnInvoiceUsageAccrued, persists invoicedusage.AccruedUsage, then marks the run Immutable.", + "watch_for": "Validate rejects when CurrentRun.AccruedUsage already set (no double-accrual) and enforces run/line/invoice ID matches. Skips ledger work when line Totals.Total IsZero but still sets the run Immutable." + }, + { + "file": "preview.go", + "role": "BuildCreditThenInvoiceGatheringPreviewRun \u2014 pure-compute preview run shape for gathering-invoice expansion; no ctx, no persistence, no credit allocation.", + "watch_for": "Must stay side-effect-free (get/list expansion). Uses a synthetic run ID 'preview-' and only supports CreditThenInvoiceSettlementMode." + } + ], + "anti_patterns": [ + "Making state-machine / lifecycle decisions here \u2014 this Service is mechanics only; decisions belong in the flatfee state machine that calls it.", + "Performing multiple adapter writes without wrapping them in transaction.Run(ctx, s.adapter, ...).", + "Creating raw negative credit rows for a shrinking amount instead of correcting existing lineage via CreditRealizations.Correct.", + "Adding side effects (credit allocation, persistence, ctx) to preview.go \u2014 preview must remain pure so get/list expansion stays read-only.", + "Skipping CurrencyCalculator.RoundToPrecision before comparing/persisting amounts, or skipping in.Validate() at method entry." + ], + "decisions": [ + { + "decision": "Mechanics-only Service with no state-machine logic.", + "rationale": "Keeps credit allocation/correction and lineage persistence reusable across credits-only, credit_then_invoice, and invoice-accrued modes without coupling to lifecycle transitions." + }, + { + "decision": "Reconciliation drives credits off a delta vs. target amount.", + "rationale": "When a mutable standard line changes amount, a single delta switch (allocate on growth, correct on shrink, no-op on equal) avoids re-deriving the whole credit ledger and preserves lineage." + }, + { + "decision": "Re-rate line with split metadata cleared and credits mutator disabled, then re-apply credits.", + "rationale": "Flat-fee charges materialize their own billable periods, so subscription split-line metadata must not make the flat pricer skip a billable run; credits are applied as a separate, explicit step." + } + ], + "code_examples": [ + { + "scenario": "Delta-driven credit reconciliation toward a target amount", + "code": "func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error) {\n\tin.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount)\n\tif err := in.Validate(); err != nil {\n\t\treturn ReconcileCreditRealizationsResult{}, err\n\t}\n\tcurrentAmount := in.CurrencyCalculator.RoundToPrecision(in.Run.CreditRealizations.Sum())\n\tdelta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount))\n\tresult := ReconcileCreditRealizationsResult{Delta: delta}\n\tswitch {\n\tcase delta.IsPositive():\n\t\tcreditAllocations, err := s.handler.OnAllocateCredits(ctx, flatfee.OnAllocateCreditsInput{Charge: in.Charge, ServicePeriod: in.Run.ServicePeriod, BookedAt: in.AllocateAt, PreTaxAmountToAllocate: delta})\n\t\tif err != nil {\n\t\t\treturn ReconcileCreditRealizationsResult{}, fmt.Errorf(\"allocate credits for flat fee: %w\", err)\n\t\t}\n\t\t// ... stamp LineID, s.createCreditAllocations(...)\n\tcase delta.IsNegative():\n\t\t// correct existing lineage via in.Run.CreditRealizations.Correct(...)\n\tcase delta.IsZero():\n\t}\n\treturn result, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w61.json b/.archie/enrichments/w61.json new file mode 100644 index 0000000000..30bc39796a --- /dev/null +++ b/.archie/enrichments/w61.json @@ -0,0 +1,147 @@ +{ + "openmeter/billing/charges/lineage/adapter": { + "purpose": "Ent-backed persistence adapter for credit-realization lineages and their segments \u2014 the audit trail that tracks how each charge's credit realizations are covered/corrected/backfilled over time. Implements the lineage.Adapter interface (defined in ../lineage/service.go).", + "patterns": [ + { + "name": "Implements lineage.Adapter + entutils.TxCreator", + "description": "New(Config) returns lineage.Adapter. The adapter struct must satisfy Tx/WithTx/Self (TxCreator) plus all CRUD methods declared in lineage.Adapter; missing a method breaks the interface assertion at the New return.", + "example": "func New(config Config) (lineage.Adapter, error) { ...; return &adapter{db: config.Client}, nil }" + }, + { + "name": "Every method body wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue", + "description": "All query/mutation methods rebind to the tx carried in ctx via entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter){...}). Use TransactingRepoWithNoValue for write-only methods (CreateLineages, CloseSegment, CreateSegment). This keeps a raw *entdb.Client honest inside an outer transaction.", + "example": "return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... })" + }, + { + "name": "Package-level helper rebuilds adapter from raw *entdb.Client", + "description": "LoadActiveSegmentsByRealizationID exists both as a standalone func taking *entdb.Client (constructing repo := &adapter{db: db} then TransactingRepo) and as a method delegating to it. Standalone helpers handed a raw client must still wrap with TransactingRepo so they join the ctx transaction.", + "example": "func LoadActiveSegmentsByRealizationID(ctx, db *entdb.Client, ...) { repo := &adapter{db: db}; return entutils.TransactingRepo(ctx, repo, ...) }" + }, + { + "name": "Lock methods assert in-transaction then use ForUpdate()", + "description": "LockCorrectionLineages and LockAdvanceLineagesForBackfill first call entutils.GetDriverFromContext(ctx) and error if not in a tx, then chain .ForUpdate() on the query. Row-locking methods must keep both guards.", + "example": "if _, err := entutils.GetDriverFromContext(ctx); err != nil { return nil, fmt.Errorf(\"must be called in a transaction: %w\", err) }; ...Query()....ForUpdate().All(ctx)" + }, + { + "name": "Active-segment queries filter ClosedAtIsNil + order ByCreatedAt", + "description": "Segments are append-only; 'active' means closed_at IS NULL. Every WithSegments / segment query uses creditrealizationlineagesegment.ClosedAtIsNil() and orders ByCreatedAt to keep FIFO consumption stable.", + "example": "WithSegments(func(q *entdb.CreditRealizationLineageSegmentQuery){ q.Where(creditrealizationlineagesegment.ClosedAtIsNil()).Order(creditrealizationlineagesegment.ByCreatedAt()) })" + }, + { + "name": "Ent rows mapped to domain via mapLineage / mapSegment", + "description": "DB rows (*entdb.CreditRealizationLineage / Segment) are translated to lineage.Lineage / lineage.Segment through mapLineage and mapSegment using lo.Map/lo.SliceToMap. AdvanceFeatures is stored as pq.StringArray and read back as []string(entry.AdvanceFeatures).", + "example": "return lo.Map(lineages, mapLineage), nil" + }, + { + "name": "Bulk creates for initial lineages", + "description": "CreateLineages builds parallel slices of CreditRealizationLineageCreate and ...SegmentCreate and saves them with CreateBulk(...).Save(ctx); each segment SetState(spec.InitialState).", + "example": "tx.db.CreditRealizationLineage.CreateBulk(rootCreates...).Save(ctx)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client *entdb.Client} + Validate, New constructor, adapter struct, and the entutils.TxCreator trio (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self).", + "watch_for": "Tx uses HijackTx with ReadOnly:false; do not flip to read-only \u2014 lock/correction flows mutate. WithTx must rebuild via entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig())." + }, + { + "file": "lineage.go", + "role": "All lineage.Adapter method implementations (Load/Create/Lock/List/Close/CreateSegment) plus mapLineage/mapSegment converters.", + "watch_for": "AdvanceFeatures must be written as pq.StringArray(spec.AdvanceFeatures) and CreateSegment uses ulid.Make().String() for the segment ID; CreateLineages does NOT set segment IDs (relies on schema default). CreateSegment calls input.Validate() before persisting; other writers do not." + } + ], + "anti_patterns": [ + "Accepting a raw *entdb.Client in a helper without wrapping the body in entutils.TransactingRepo \u2014 it will bypass the ctx transaction.", + "Calling a Lock* method outside a transaction \u2014 the GetDriverFromContext guard returns an error by design; do not remove it.", + "Querying segments without ClosedAtIsNil(), which would resurrect closed (consumed) segments.", + "Hard-deleting or UPDATEing segment amounts in place instead of closing + creating a remainder segment (the append-only model lives in the service layer).", + "Putting business orchestration (FIFO consumption, correction math) here \u2014 the adapter is persistence-only; that logic belongs in lineage/service." + ], + "decisions": [ + { + "decision": "Adapter exposes both a package-level LoadActiveSegmentsByRealizationID func and a method that delegates to it.", + "rationale": "Lets callers that already hold a raw *entdb.Client (e.g. other charge adapters) reuse the same tx-aware query without instantiating the full adapter." + }, + { + "decision": "Segments are append-only with closed_at instead of mutable rows.", + "rationale": "Preserves a complete audit trail of credit coverage state transitions for corrections and advance backfill reconciliation." + } + ], + "code_examples": [ + { + "scenario": "A tx-aware adapter read method with active-segment eager loading", + "code": "func (a *adapter) LoadLineagesByCustomer(ctx context.Context, input lineage.LoadLineagesByCustomerInput) ([]lineage.Lineage, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]lineage.Lineage, error) {\n\t\tlineages, err := tx.db.CreditRealizationLineage.Query().\n\t\t\tWhere(creditrealizationlineage.Namespace(input.Namespace), creditrealizationlineage.CustomerIDEQ(input.CustomerID), creditrealizationlineage.CurrencyEQ(input.Currency)).\n\t\t\tWithSegments(func(q *entdb.CreditRealizationLineageSegmentQuery) {\n\t\t\t\tq.Where(creditrealizationlineagesegment.ClosedAtIsNil()).Order(creditrealizationlineagesegment.ByCreatedAt())\n\t\t\t}).\n\t\t\tOrder(creditrealizationlineage.ByCreatedAt()).All(ctx)\n\t\tif err != nil { return nil, err }\n\t\treturn lo.Map(lineages, mapLineage), nil\n\t})\n}" + } + ] + }, + "openmeter/billing/charges/lineage/service": { + "purpose": "Service layer implementing lineage.Service \u2014 the business logic that builds initial credit-realization lineages, FIFO-consumes active segments for corrections, and backfills advance-uncovered segments. Pure orchestration over the lineage.Adapter; all persistence is delegated.", + "patterns": [ + { + "name": "Config{Adapter lineage.Adapter} + New returns lineage.Service", + "description": "Constructor validates Adapter != nil and returns the lineage.Service interface (from ../lineage/service.go). service struct holds only the adapter.", + "example": "func New(config Config) (lineage.Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &service{adapter: config.Adapter}, nil }" + }, + { + "name": "Multi-step methods wrapped in transaction.RunWithNoValue(ctx, s.adapter, ...)", + "description": "Any method that locks then mutates (CreateInitialLineages, PersistCorrectionLineageSegments, BackfillAdvanceLineageSegments) runs inside transaction.RunWithNoValue so the Lock*/Close/Create calls share one tx. Pass s.adapter as the TxCreator.", + "example": "return transaction.RunWithNoValue(ctx, s.adapter, func(ctx context.Context) error { ... })" + }, + { + "name": "Validate input at the top of every mutating method", + "description": "Each method calls input.Validate() (defined on the input structs in lineage/service.go) before doing work and returns early on error.", + "example": "if err := input.Validate(); err != nil { return err }" + }, + { + "name": "Append-only segment consumption: Close + Create remainder", + "description": "To consume part of a segment, compute consumedAmount := lineage.MinDecimal(segment.Amount, remaining), CloseSegment(segment.ID, now), and if a remainder is positive CreateSegment a new segment carrying the same state/backing IDs. Never mutate amounts in place.", + "example": "if err := s.adapter.CloseSegment(ctx, segment.ID, now); err != nil { ... }; remainder := segment.Amount.Sub(consumedAmount); if remainder.IsPositive() { s.adapter.CreateSegment(ctx, lineage.CreateSegmentInput{...}) }" + }, + { + "name": "Deterministic ordering via lineage helpers", + "description": "Correction consumption iterates lineage.SortCorrectionPersistSegments(entry.Segments) (state precedence: earnings_recognized < advance_backfilled < advance_uncovered < real_credit). Backfill filters via lineage.FilterAdvanceLineagesForBackfill(lineages, input.FeatureFilters).", + "example": "for _, segment := range lineage.SortCorrectionPersistSegments(entry.Segments) { ... }" + }, + { + "name": "Timestamps truncated to microsecond from clock.Now()", + "description": "now := clock.Now().Truncate(time.Microsecond) before closing segments, so closed_at aligns with Postgres microsecond precision and stays test-freezable via pkg/clock.", + "example": "now := clock.Now().Truncate(time.Microsecond)" + }, + { + "name": "Coverage shortfall is a hard error", + "description": "If correction remaining stays positive after walking all segments, the method returns an error ('correction amount %s exceeds active lineage coverage ...') \u2014 over-consumption is never silently allowed.", + "example": "if remaining.IsPositive() { return fmt.Errorf(\"correction amount %s exceeds active lineage coverage for realization %s\", remaining.String(), realizationID) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Whole lineage.Service implementation: CreateInitialLineages (builds specs via creditrealization.InitialLineageSpecs, tags Advance specs with input.Features), PersistCorrectionLineageSegments (FIFO close/split against correction amounts), BackfillAdvanceLineageSegments (covers advance_uncovered with a backing tx group), plus thin CloseSegment/CreateSegment pass-throughs.", + "watch_for": "Backfill splits a partially-covered segment into three writes: close original, create advance_uncovered remainder, create advance_backfilled covered piece with BackingTransactionGroupID. CreateInitialLineages only sets AdvanceFeatures on specs whose OriginKind == LineageOriginKindAdvance. CloseSegment/CreateSegment delegate directly without their own transaction wrapper \u2014 callers must supply one if atomicity across calls is needed." + } + ], + "anti_patterns": [ + "Mutating a segment's amount in place instead of Close + Create-remainder \u2014 breaks the append-only audit model.", + "Calling adapter Lock*/Close/Create across multiple statements without an enclosing transaction.RunWithNoValue \u2014 partial failures would corrupt coverage.", + "Using time.Now() instead of clock.Now().Truncate(time.Microsecond) \u2014 defeats test time-freezing and risks sub-microsecond drift vs Postgres.", + "Swallowing the positive-remaining coverage shortfall instead of returning the over-consumption error.", + "Adding Ent queries here \u2014 the service must go through lineage.Adapter, never touch *entdb.Client directly." + ], + "decisions": [ + { + "decision": "Correction segments are consumed in SortCorrectionPersistSegments precedence order, not raw creation order.", + "rationale": "Recognized earnings and backfilled advances must be unwound before uncovered advances and real credit, so corrections reverse value in the economically correct sequence." + }, + { + "decision": "All multi-write methods share a single transaction via transaction.RunWithNoValue.", + "rationale": "Lock-then-mutate flows (corrections, backfill) must be atomic so concurrent realization runs cannot double-consume the same segment." + } + ], + "code_examples": [ + { + "scenario": "FIFO-consuming active segments for a correction inside one transaction", + "code": "return transaction.RunWithNoValue(ctx, s.adapter, func(ctx context.Context) error {\n\tlineages, err := s.adapter.LockCorrectionLineages(ctx, input.Namespace, correctionOrder)\n\tif err != nil { return fmt.Errorf(\"lock lineages for correction persistence: %w\", err) }\n\tnow := clock.Now().Truncate(time.Microsecond)\n\tfor _, realizationID := range correctionOrder {\n\t\tentry := lineagesByRealizationID[realizationID]\n\t\tremaining := correctionAmountsByRealizationID[realizationID]\n\t\tfor _, segment := range lineage.SortCorrectionPersistSegments(entry.Segments) {\n\t\t\tif !remaining.IsPositive() { break }\n\t\t\tconsumed := lineage.MinDecimal(segment.Amount, remaining)\n\t\t\tif err := s.adapter.CloseSegment(ctx, segment.ID, now); err != nil { return err }\n\t\t\tif rem := segment.Amount.Sub(consumed); rem.IsPositive() {\n\t\t\t\t_ = s.adapter.CreateSegment(ctx, lineage.CreateSegmentInput{LineageID: segment.LineageID, Amount: rem, State: segment.State, BackingTransactionGroupID: segment.BackingTransactionGroupID})\n\t\t\t}\n\t\t\tremaining = remaining.Sub(consumed)\n\t\t}\n\t\tif remaining.IsPositive() { return fmt.Errorf(\"correction amount %s exceeds active lineage coverage for realization %s\", remaining.String(), realizationID) }\n\t}\n\treturn nil\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w62.json b/.archie/enrichments/w62.json new file mode 100644 index 0000000000..edd889c953 --- /dev/null +++ b/.archie/enrichments/w62.json @@ -0,0 +1,77 @@ +{ + "openmeter/billing/charges/meta/adapter": { + "purpose": "Ent-backed persistence adapter implementing the meta.Adapter interface for charge-meta rows: registering charges (flatfee/usagebased/creditpurchase) and soft-deleting them. Primary constraint: every write must run inside a transaction rebound from ctx, and the meta.Adapter contract (Tx/WithTx/Self) must stay intact for entutils transaction wiring.", + "patterns": [ + { + "name": "Transaction-aware repo wrapping", + "description": "Every mutating method wraps its body in entutils.TransactingRepoWithNoValue(ctx, a, func(ctx, tx *adapter)...) so the adapter rebinds to the tx carried in ctx instead of using the raw injected client.", + "example": "return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... tx.db.Charge.Create()... })" + }, + { + "name": "Input.Validate() before any DB access", + "description": "Each method calls in.Validate() and returns early before touching Ent. Validation lives on the meta input types, not the adapter.", + "example": "func (a *adapter) RegisterCharges(ctx, in meta.RegisterChargesInput) error { if err := in.Validate(); err != nil { return err } ... }" + }, + { + "name": "Standard Config/Validate/New constructor", + "description": "Construction goes through Config{Client, Logger} with a Validate() that requires both fields non-nil, then New(config) returns the meta.Adapter interface (not the concrete type).", + "example": "func New(config Config) (meta.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{...}, nil }" + }, + { + "name": "Interface assertion at package scope", + "description": "var _ meta.Adapter = (*adapter)(nil) guarantees the concrete adapter satisfies the meta.Adapter interface at compile time.", + "example": "var _ meta.Adapter = (*adapter)(nil)" + }, + { + "name": "Tx/WithTx/Self transaction plumbing trio", + "description": "The adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebinds via entdb.NewTxClientFromRawConfig), and Self \u2014 the exact trio entutils.TransactingRepo* expects.", + "example": "func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txDb := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txDb.Client(), logger: a.logger} }" + }, + { + "name": "clock.Now() for all timestamps", + "description": "Created/deleted timestamps use pkg/clock.Now() (freezable in tests), never time.Now().", + "example": "SetCreatedAt(clock.Now()) / SetDeletedAt(clock.Now())" + }, + { + "name": "Charge-type switch sets the FK column", + "description": "RegisterCharges switches on in.Type to set the matching foreign-key column (ChargeFlatFeeID / ChargeUsageBasedID / ChargeCreditPurchaseID); an unknown type returns an error rather than silently skipping.", + "example": "switch in.Type { case meta.ChargeTypeFlatFee: create = create.SetChargeFlatFeeID(charge.ID); ... default: return nil, fmt.Errorf(\"unknown charge type: %s\", in.Type) }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Defines Config, Validate, New, the adapter struct (db, logger), and the Tx/WithTx/Self transaction interface methods that satisfy meta.Adapter.", + "watch_for": "Tx uses HijackTx with ReadOnly:false; WithTx must rebuild the client from tx.GetConfig() via entdb.NewTxClientFromRawConfig \u2014 do not reuse the original a.db inside a tx scope." + }, + { + "file": "charges.go", + "role": "Implements the two write methods RegisterCharges (bulk create via slicesx.MapWithErr + Charge.CreateBulk) and DeleteRegisteredCharge (soft delete via UpdateOneID + SetDeletedAt).", + "watch_for": "DeleteRegisteredCharge filters with chargedb.DeletedAtIsNil() and chargedb.Namespace(in.Namespace) \u2014 always scope by namespace and exclude already-deleted rows; deletes are soft (SetDeletedAt), never hard." + } + ], + "anti_patterns": [ + "Calling tx.db / a.db directly without an entutils.TransactingRepo* wrapper, breaking ctx-bound transaction reuse", + "Using time.Now() instead of clock.Now() for created/deleted timestamps", + "Hard-deleting charge rows instead of setting DeletedAt (soft delete)", + "Omitting the namespace and DeletedAtIsNil filters on updates/deletes, allowing cross-tenant or double-delete writes", + "Returning the concrete *adapter from New or skipping the var _ meta.Adapter assertion, decoupling the impl from the meta contract" + ], + "decisions": [ + { + "decision": "Methods accept a single meta input struct and validate it before DB access.", + "rationale": "Keeps validation co-located with the domain contract in meta/ and ensures no malformed write reaches Ent." + }, + { + "decision": "Adapter implements its own Tx/WithTx/Self trio rather than embedding a shared base.", + "rationale": "entutils.TransactingRepo* requires these exact methods to rebind the adapter onto the ctx transaction; explicit implementation keeps the charge-meta adapter transaction-aware even when handed a raw *entdb.Client." + } + ], + "code_examples": [ + { + "scenario": "A transaction-aware mutating adapter method validating input and bulk-creating Ent rows", + "code": "func (a *adapter) RegisterCharges(ctx context.Context, in meta.RegisterChargesInput) error {\n\tif err := in.Validate(); err != nil {\n\t\treturn err\n\t}\n\treturn entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error {\n\t\tcreates, err := slicesx.MapWithErr(in.Charges, func(charge meta.IDWithUniqueReferenceID) (*db.ChargeCreate, error) {\n\t\t\tcreate := tx.db.Charge.Create().\n\t\t\t\tSetNamespace(in.Namespace).\n\t\t\t\tSetType(in.Type).\n\t\t\t\tSetID(charge.ID).\n\t\t\t\tSetNillableUniqueReferenceID(charge.UniqueReferenceID).\n\t\t\t\tSetCreatedAt(clock.Now())\n\t\t\tswitch in.Type {\n\t\t\tcase meta.ChargeTypeFlatFee:\n\t\t\t\tcreate = create.SetChargeFlatFeeID(charge.ID)\n\t\t\tcase meta.ChargeTypeUsageBased:\n\t\t\t\tcreate = create.SetChargeUsageBasedID(charge.ID)\n\t\t\tcase meta.ChargeTypeCreditPurchase:\n\t\t\t\tcreate = create.SetChargeCreditPurchaseID(charge.ID)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"unknown charge type: %s\", in.Type)\n\t\t\t}\n\t\t\treturn create, nil\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = tx.db.Charge.CreateBulk(creates...).Save(ctx)\n\t\treturn err\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w63.json b/.archie/enrichments/w63.json new file mode 100644 index 0000000000..56ea668809 --- /dev/null +++ b/.archie/enrichments/w63.json @@ -0,0 +1,332 @@ +{ + "openmeter/billing/charges/models/chargemeta": { + "purpose": "Value-type + Ent-schema-mixin package for the shared charge-meta of every charge type (service/billing/full-service periods, status, currency, managed-by, subscription refs, tax config). It is a leaf models package: it defines the reusable Ent mixin and generic Create/Update/Map helpers that each charge-type schema (flatfee, usagebased, creditpurchase) embeds.", + "patterns": [ + { + "name": "Reusable Ent mixin via RecursiveMixin", + "description": "The schema is exposed as `type Mixin = entutils.RecursiveMixin[metaMixin]` so charge-type schemas embed it rather than redefining fields. metaMixin.Mixin() pulls in entutils.AnnotationsMixin and entutils.ResourceMixin.", + "example": "type Mixin = entutils.RecursiveMixin[metaMixin]" + }, + { + "name": "Generic builder interfaces over concrete Ent types", + "description": "Create/Update/MapFromDB are written against typed-generic Creator[T]/Updater[T]/Getter[T] interfaces (Set*/Get* methods) instead of concrete *entdb.XCreate, so one helper serves every charge-type table.", + "example": "func Create[T Creator[T]](creator Creator[T], in CreateInput) (T, error)" + }, + { + "name": "Intent normalize+validate before persist", + "description": "Create normalizes the Intent (`in.Intent.Normalized()`) and AdvanceAfter (`meta.NormalizeOptionalTimestamp`) and calls `in.Intent.Validate()` before any Set* call, returning the zero T on error.", + "example": "if err := in.Intent.Validate(); err != nil { var empty T; return empty, err }" + }, + { + "name": "All timestamps coerced to UTC", + "description": "Every period boundary is stored via `.UTC()` and optional times via convert.SafeToUTC / convert.TimePtrIn(..., time.UTC); MapFromDB reads them back with `.UTC()`.", + "example": "SetServicePeriodFrom(in.Intent.ServicePeriod.From.UTC())" + }, + { + "name": "Subscription/tax fields are all-or-nothing pointers", + "description": "Subscription reference is reconstructed only when ID, PhaseID and ItemID are all non-nil; tax config only when TaxCodeID or Behavior is set. New nullable fields must follow this grouped-pointer reconstruction in MapFromDB.", + "example": "if entity.GetSubscriptionID() != nil && entity.GetSubscriptionPhaseID() != nil && entity.GetSubscriptionItemID() != nil { ... }" + }, + { + "name": "Unique reference scoped + partial index", + "description": "unique_reference_id is unique per (namespace, customer_id) only where it is non-null and not soft-deleted, via entsql.IndexWhere.", + "example": "index.Fields(\"namespace\",\"customer_id\",\"unique_reference_id\").Annotations(entsql.IndexWhere(\"unique_reference_id IS NOT NULL AND deleted_at IS NULL\")).Unique()" + } + ], + "key_file_guides": [ + { + "file": "mixin.go", + "role": "Sole file: Ent field/index definitions plus generic CreateInput/Create, UpdateInput/Update, Getter/MapFromDB helpers that translate between meta.Charge and any embedding charge table.", + "watch_for": "Adding a field requires updating the field list, Creator/Updater/Getter interfaces, AND Create/Update/MapFromDB together, or the per-charge-type adapters won't compile. Tax provider-specific fields (e.g. Stripe.Code) are intentionally NOT stored here \u2014 they are resolved at invoice snapshot time." + } + ], + "anti_patterns": [ + "Calling Set* on a concrete *entdb.XCreate directly instead of going through the generic Create/Update helpers \u2014 bypasses Intent normalization and validation.", + "Persisting non-UTC timestamps; every boundary must be coerced with .UTC()/convert.*ToUTC.", + "Reconstructing a SubscriptionReference or TaxCodeConfig from a partial set of its pointer fields.", + "Storing provider-specific tax fields here; only TaxCodeID (FK) and Behavior belong on charge tables." + ], + "decisions": [ + { + "decision": "Schema and mapping live in one generic package embedded by each charge type", + "rationale": "flatfee, usagebased and creditpurchase share identical meta columns; a single RecursiveMixin + generic helpers avoids per-table duplication and keeps the meta.Charge contract consistent." + }, + { + "decision": "Tax config stored as FK + behavior only", + "rationale": "Provider-specific codes change and are resolved at invoice snapshot time, so charge rows stay stable and provider-agnostic." + } + ], + "code_examples": [ + { + "scenario": "Mapping an Ent charge row back to the domain meta.Charge via the generic Getter", + "code": "func MapFromDB[T Getter[T]](entity T) meta.Charge {\n\tvar taxConfig *productcatalog.TaxCodeConfig\n\tif entity.GetTaxCodeID() != nil || entity.GetTaxBehavior() != nil {\n\t\ttaxConfig = &productcatalog.TaxCodeConfig{TaxCodeID: entity.GetTaxCodeID(), Behavior: entity.GetTaxBehavior()}\n\t}\n\treturn meta.Charge{ /* ManagedResource + Intent{... ServicePeriod: timeutil.ClosedPeriod{From: entity.GetServicePeriodFrom().UTC()}, TaxConfig: taxConfig} */ }\n}" + } + ] + }, + "openmeter/billing/charges/models/creditrealization": { + "purpose": "Domain models + Ent mixin for credit realizations: positive 'allocation' entries and non-positive 'correction' entries that record how credit/advance value was applied to charges and invoice lines. Holds the core correction-planning algorithm (reverse-order draining of remaining allocation amounts) and the lineage state machine that tracks value as it moves from real_credit/advance through backfill to earnings recognition.", + "patterns": [ + { + "name": "Allocation/correction polymorphism via Type enum", + "description": "A Realization is either TypeAllocation (positive Amount) or TypeCorrection (non-positive Amount, requires CorrectsRealizationID). CreateInput.Validate switches on Type to enforce sign and required fields.", + "example": "case TypeCorrection: if i.Amount.IsPositive() { errs = append(errs, ...) }" + }, + { + "name": "Currency-aware validation and rounding", + "description": "Correction inputs and requests validate/normalize against a currencyx.Calculator: amounts must be rounded to the smallest denomination (IsRoundedToPrecision) and normalized via RoundToPrecision before planning.", + "example": "func (i CorrectionRequestItem) ValidateWith(currency currencyx.Calculator) error" + }, + { + "name": "Reverse-order correction draining", + "description": "CreateCorrectionRequest reverses allocations (sorted by CreatedAt then SortHint), drains each allocation's RemainingAmount until the requested negative amount is satisfied, returning ErrInsufficientFunds if it cannot.", + "example": "mutable.Reverse(allocationsWithCorrections); ... return CorrectionRequest{}, ErrInsufficientFunds" + }, + { + "name": "Lineage state machine via annotations", + "description": "Lineage origin (real_credit/advance) is stored as a models.Annotations key (AnnotationLineageOriginKind); InitialLineageSegmentState maps origin to the starting LineageSegmentState which then transitions toward earnings_recognized.", + "example": "func InitialLineageSegmentState(originKind LineageOriginKind) LineageSegmentState" + }, + { + "name": "Collection-typed helpers with Validate/Sum", + "description": "Realizations, CreateInputs, CreateAllocationInputs, CreateCorrectionInputs are named slice types carrying Validate() (joining indexed errors) and Sum() (alpacadecimal aggregation) methods.", + "example": "func (i CreateInputs) Validate() error { ... fmt.Errorf(\"credit realization input[%d]: %w\", idx, err) }" + }, + { + "name": "Self-referencing Ent edge for corrections", + "description": "The Mixin optionally wires an edge.To(\"allocation\").Field(\"corrects_realization_id\").Unique().From(\"corrections\") only when SelfReferenceType is set, so a correction points back to its allocation in the same table.", + "example": "edge.To(\"allocation\", m.SelfReferenceType).Field(\"corrects_realization_id\").Unique().From(\"corrections\")" + } + ], + "key_file_guides": [ + { + "file": "realizations.go", + "role": "Core algorithm: Realizations slice with CreateCorrectionRequest, Correct/CorrectAll (callback-driven), AsCreditsApplied, and the private allocationsWithCorrections that computes remaining amounts.", + "watch_for": "allocationsWithCorrections sorts by CreatedAt then SortHint; corrections must reference a known allocation or it errors. RemainingAmount going negative is a corrupt-state error." + }, + { + "file": "models.go", + "role": "CreateInput, Type enum, Realization struct (embeds CreateInput + Namespaced/ManagedModel + SortHint), per-type validation.", + "watch_for": "SortHint encodes batch priority order; reverts depend on reverse iteration of it." + }, + { + "file": "correction.go", + "role": "CorrectionRequest/CreateCorrectionInputs validation against existing realizations and a total-to-correct amount, plus AsCreateInputs conversion.", + "watch_for": "ValidateWith re-derives remaining amounts and breaks early on first corrupt reference to avoid cascading false errors." + }, + { + "file": "allocation.go", + "role": "CreateAllocationInput(s) with Validate/Sum and AsCreateInputs (sets Type=TypeAllocation).", + "watch_for": "Amount must be strictly positive for allocations." + }, + { + "file": "lineage.go", + "role": "LineageOriginKind / LineageSegmentState enums, annotation read/write helpers, InitialLineageSegmentState mapping.", + "watch_for": "Segment states (real_credit, advance_uncovered, advance_backfilled, earnings_recognized) are a directed lifecycle; don't add states without updating Values()/Validate()." + }, + { + "file": "lineage_specs.go", + "role": "InitialLineageSpecs builds per-allocation lineage seeds (ulid LineageID, root realization, origin, initial state, amount).", + "watch_for": "Skips non-allocation realizations and silently skips allocations lacking the origin-kind annotation." + }, + { + "file": "mixin.go", + "role": "Ent schema mixin (amount numeric, ledger_transaction_group_id immutable, type enum, optional corrects_realization_id) + generic Create/MapFromDB.", + "watch_for": "ledger_transaction_group_id is Immutable; the self-edge only materializes when SelfReferenceType is supplied by the embedding schema." + }, + { + "file": "correction_test.go", + "role": "Table of subtests exercising correction planning, reverse-order draining, rounding, and ErrInsufficientFunds boundaries.", + "watch_for": "Uses InexactFloat64() float assertions and USD calculator helper; mirror this style for new cases." + } + ], + "anti_patterns": [ + "Creating a TypeCorrection without CorrectsRealizationID or with a positive amount.", + "Comparing/aggregating decimal amounts without rounding to currency precision first.", + "Iterating allocations in forward order when reverting \u2014 reverts must drain in reverse (CreatedAt then SortHint).", + "Adding a LineageSegmentState or LineageOriginKind value without updating its Values()/Validate().", + "Mutating ledger_transaction_group_id after creation \u2014 it is immutable in the schema." + ], + "decisions": [ + { + "decision": "Corrections are separate non-positive rows referencing their allocation, not in-place edits", + "rationale": "Preserves an auditable ledger-like history of how much of each allocation remains and allows reverse-order reversal across batches." + }, + { + "decision": "Lineage origin/state carried as annotations + explicit segment table state", + "rationale": "Lets advance-backed usage be backfilled by later credit purchases and tracked through to earnings recognition without losing provenance." + }, + { + "decision": "Validation/rounding always goes through currencyx.Calculator", + "rationale": "Money correctness requires consistent smallest-denomination rounding; passing the calculator in keeps the models currency-agnostic." + } + ], + "code_examples": [ + { + "scenario": "Planning a negative correction by draining allocations in reverse order", + "code": "func (r Realizations) CreateCorrectionRequest(amount alpacadecimal.Decimal, currency currencyx.Calculator) (CorrectionRequest, error) {\n\tif amount.IsPositive() { return CorrectionRequest{}, models.NewGenericValidationError(errors.New(\"amount must not be positive\")) }\n\tamount = currency.RoundToPrecision(amount)\n\tallocationsWithCorrections, err := r.allocationsWithCorrections()\n\tif err != nil { return CorrectionRequest{}, err }\n\tmutable.Reverse(allocationsWithCorrections)\n\t// drain RemainingAmount per allocation until amountToCorrect is satisfied, else ErrInsufficientFunds\n}" + } + ] + }, + "openmeter/billing/charges/models/invoicedusage": { + "purpose": "Value type + Ent mixin for AccruedUsage: the snapshot of usage totals over a service period that a usage-based charge run has accrued (optionally tied to a ledger transaction group). Bridges charge runs to invoice totals via the shared totals.Mixin.", + "patterns": [ + { + "name": "Totals composition via shared mixin", + "description": "The Ent mixin embeds totals.Mixin and the domain struct embeds totals.Totals; Create uses totals.Set and MapAccruedUsageFromDB uses totals.FromDB to round-trip the monetary totals.", + "example": "creator = totals.Set(creator, invoicedUsage.Totals)" + }, + { + "name": "Optional ledger linkage as nillable group ref", + "description": "ledger_transaction_group_id is optional/nillable; the domain LedgerTransaction is a *ledgertransaction.GroupReference reconstructed only when the DB value is non-nil.", + "example": "if dbEntity.GetLedgerTransactionGroupID() != nil { ledgerTransaction = &ledgertransaction.GroupReference{...} }" + }, + { + "name": "Generic Creator/Getter mapping", + "description": "Create[T Creator[T]] and MapAccruedUsageFromDB(Getter) compose entutils namespace/id/time/annotations mixin setters with totals setters, so embedding charge-run tables reuse them.", + "example": "func Create[T Creator[T]](creator T, ns string, invoicedUsage AccruedUsage) T" + } + ], + "key_file_guides": [ + { + "file": "stdinvoice.go", + "role": "AccruedUsage domain struct (NamespacedID + ManagedModel + ServicePeriod + optional LedgerTransaction + Totals) and its Validate.", + "watch_for": "Validate checks ServicePeriod, Totals, and the LedgerTransaction only when present." + }, + { + "file": "mixin.go", + "role": "Ent mixin (service period, optional ledger_transaction_group_id, totals.Mixin) plus generic Create/MapAccruedUsageFromDB.", + "watch_for": "Service period boundaries are stored and read In(time.UTC); keep totals round-tripping through totals.Set/totals.FromDB." + } + ], + "anti_patterns": [ + "Storing totals as ad-hoc fields instead of via the shared totals.Mixin/totals.Totals.", + "Reconstructing LedgerTransaction when the DB group id is nil.", + "Persisting non-UTC service period boundaries." + ], + "decisions": [ + { + "decision": "Usage accruals reuse the billing totals model", + "rationale": "Keeps charge-run usage snapshots consistent with invoice-line total semantics and avoids a parallel totals representation." + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/models/ledgertransaction": { + "purpose": "Tiny shared value-type package providing GroupReference and TimedGroupReference \u2014 references to a ledger transaction group (with optional timestamp) used across charges to track payment authorization/settlement and credit realization linkage.", + "patterns": [ + { + "name": "Nil-safe optional-reference accessors", + "description": "GetIDOrNull / GetTimeOrNull are pointer-receiver methods that tolerate a nil receiver and an empty TransactionGroupID, returning nil instead of panicking \u2014 designed for direct use in Ent SetNillable* calls.", + "example": "func (r *GroupReference) GetIDOrNull() *string { if r == nil || r.TransactionGroupID == \"\" { return nil }; return &r.TransactionGroupID }" + }, + { + "name": "Embedded timed variant", + "description": "TimedGroupReference embeds GroupReference and adds a required Time; its Validate delegates to the embedded Validate then requires a non-zero time.", + "example": "type TimedGroupReference struct { GroupReference; Time time.Time }" + } + ], + "key_file_guides": [ + { + "file": "ledger.go", + "role": "Sole file defining GroupReference, TimedGroupReference, their Validate and nil-safe Get*OrNull accessors.", + "watch_for": "Accessors must stay nil-safe \u2014 callers pass possibly-nil references straight into SetNillable* builders." + } + ], + "anti_patterns": [ + "Dereferencing a TransactionGroupID without the nil/empty guard the GetIDOrNull helpers provide.", + "Adding fields here that belong to a specific charge type \u2014 this package is intentionally minimal and broadly imported." + ], + "decisions": [ + { + "decision": "Keep ledger references as a dependency-light leaf package", + "rationale": "It is imported by nearly every charge sub-package and ledger adapter; minimal imports (only pkg/models) avoid import cycles." + } + ], + "code_examples": [] + }, + "openmeter/billing/charges/models/payment": { + "purpose": "Domain models, Ent mixins, and ValidationIssue errors for payment settlements on credit-purchase charges. Models a two-phase settlement (authorized -> settled) with two concrete variants: External (off-platform) and Invoiced (settled via an OpenMeter standard invoice line).", + "patterns": [ + { + "name": "Base + variant composition", + "description": "A shared Base (status, amount, service period, authorized/settled timed ledger refs) is embedded into Payment, which External and Invoiced embed; each variant adds only its extra fields (Invoiced adds LineID/InvoiceID).", + "example": "type Invoiced struct { Payment; LineID string; InvoiceID string }" + }, + { + "name": "Status-driven invariant validation", + "description": "Base.Validate switches on Status: StatusAuthorized requires Authorized data; StatusSettled requires both Settled and Authorized data. Amount must be positive.", + "example": "case StatusSettled: if r.Settled == nil { ... }; if r.Authorized == nil { ... }" + }, + { + "name": "ValidationIssue errors with HTTP attributes", + "description": "Lifecycle errors are package-level models.ValidationIssue values with an ErrorCode constant, critical severity, and a commonhttp HTTP status attribute (400).", + "example": "var ErrPaymentAlreadySettled = models.NewValidationIssue(ErrCodePaymentAlreadySettled, \"payment already settled\", models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))" + }, + { + "name": "Generic Create/Update/Map over variant creators", + "description": "Base Create/Update/Getter helpers operate on generic Creator[T]/Updater[T]/Getter; variant helpers (CreateExternal, CreateInvoiced) wrap them and add variant-only setters via extended interfaces (InvoicedCreator embeds Creator).", + "example": "func CreateInvoiced[T InvoicedCreator[T]](creator InvoicedCreator[T], in InvoicedCreate) T" + }, + { + "name": "Timed ledger ref round-trip", + "description": "Authorized/Settled are stored as separate *_transaction_group_id + *_at columns and reconstructed into a *ledgertransaction.TimedGroupReference only when both the id and the time are non-nil.", + "example": "func mapTimedLedgerTransactionGroupReferenceFromDB(reference *string, at *time.Time) *ledgertransaction.TimedGroupReference" + }, + { + "name": "ErrorAttributes for observability", + "description": "Each variant implements ErrorAttributes() returning settlement status/type/id attribute keys, distinguishing PaymentSettlementTypeExternal vs PaymentSettlementTypeStandardInvoice.", + "example": "func (r Invoiced) ErrorAttributes() models.Attributes" + } + ], + "key_file_guides": [ + { + "file": "models.go", + "role": "Status enum, Base struct + status-driven Validate, Payment struct (NamespacedID+ManagedModel+Base), and settlement-type/attribute-key constants.", + "watch_for": "Authorized/Settled invariants depend on Status; amount must be positive. A TODO notes settlement-type constants should be unified." + }, + { + "file": "mixin.go", + "role": "Ent mixin (service period, status enum, numeric amount, authorized/settled group-id + at columns) plus generic Create/Update/Getter and the timed-ref mapping helpers.", + "watch_for": "Edges to ledger are TODO (only group-id strings stored). Update/Create coerce all times to UTC via convert.TimePtrIn." + }, + { + "file": "external.go", + "role": "External variant (off-platform settlement): ExternalCreateInput/Validate, CreateExternal/MapExternalFromDB/UpdateExternal.", + "watch_for": "ExternalMixin is just an alias for Mixin \u2014 External adds no columns beyond Base." + }, + { + "file": "invoiced.go", + "role": "Invoiced variant: invoicedMixin adds immutable line_id/invoice_id columns; InvoicedCreate/Validate, CreateInvoiced, MapInvoicedFromDB.", + "watch_for": "LineID and InvoiceID are Immutable and required; InvoicedCreator extends Creator with SetLineID/SetInvoiceID." + }, + { + "file": "errors.go", + "role": "Package-level payment lifecycle ValidationIssues (already-authorized, already-settled, cannot-settle-unauthorized).", + "watch_for": "All carry HTTP 400 and critical severity; reuse these rather than constructing ad-hoc errors for the same conditions." + } + ], + "anti_patterns": [ + "Marking a payment StatusSettled without both Authorized and Settled ledger data populated.", + "Returning plain fmt.Errorf for payment lifecycle conflicts instead of the predefined ValidationIssues in errors.go.", + "Mutating line_id/invoice_id on an Invoiced payment \u2014 both are immutable in the schema.", + "Reconstructing a TimedGroupReference when either the group id or the timestamp is nil.", + "Allowing a non-positive settlement amount." + ], + "decisions": [ + { + "decision": "External and Invoiced share a Base via embedding rather than duplicating settlement fields", + "rationale": "Authorization/settlement lifecycle and amount/period semantics are identical across settlement types; only the linkage (invoice line vs none) differs." + }, + { + "decision": "Authorized/settled ledger linkage stored as id+timestamp column pairs, edges deferred", + "rationale": "Keeps the schema simple now (TODO to add real ledger edges) while still recording the transaction group and time for both phases." + } + ], + "code_examples": [ + { + "scenario": "Defining a reusable payment-lifecycle ValidationIssue with HTTP status", + "code": "const ErrCodeCannotSettleNotAuthorizedPayment models.ErrorCode = \"cannot_settle_not_authorized_payment\"\n\nvar ErrCannotSettleNotAuthorizedPayment = models.NewValidationIssue(\n\tErrCodeCannotSettleNotAuthorizedPayment,\n\t\"cannot settle an unauthorized payment\",\n\tmodels.WithCriticalSeverity(),\n\tcommonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest),\n)" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w64.json b/.archie/enrichments/w64.json new file mode 100644 index 0000000000..6e9cb08bfe --- /dev/null +++ b/.archie/enrichments/w64.json @@ -0,0 +1,106 @@ +{ + "openmeter/billing/charges/usagebased/adapter": { + "purpose": "Ent-backed persistence adapter for usage-based charges and their realization runs. Implements the usagebased.Adapter interface (and its sub-interfaces) over the ChargeUsageBased / ChargeUsageBasedRuns / detailed-line / credit-allocation / invoiced-usage / payment Ent tables; it is the only place that translates usagebased domain types to and from DB rows.", + "patterns": [ + { + "name": "Transaction-aware repo body", + "description": "Every mutating or reading adapter method wraps its body in entutils.TransactingRepo / TransactingRepoWithNoValue, using the passed tx *adapter (tx.db) rather than a.db, so the call rebinds to any transaction already carried in ctx.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (usagebased.Charge, error) { entities, err := tx.db.ChargeUsageBased.Query()... })" + }, + { + "name": "Validate inputs before DB work", + "description": "Each method first calls Validate() on its domain inputs (charge, runID, input, in) and returns early on error before opening the transaction.", + "example": "if err := charge.Validate(); err != nil { return usagebased.ChargeBase{}, err }" + }, + { + "name": "Interface conformance asserts per file", + "description": "Each file declares a compile-time assertion that *adapter satisfies the relevant sub-interface (ChargeAdapter, RealizationRunAdapter, RealizationRunPaymentAdapter, RealizationRunCreditAllocationAdapter, RealizationRunInvoiceUsageAdapter).", + "example": "var _ usagebased.RealizationRunPaymentAdapter = (*adapter)(nil)" + }, + { + "name": "Exported Map*FromDB mappers", + "description": "DB->domain translation lives in mapper.go as exported MapChargeFromDB / MapChargeBaseFromDB / MapRealizationRun(s|Base)FromDB; sub-model mapping delegates to chargemeta, creditrealization, invoicedusage, payment, totals, stddetailedline package helpers (MapFromDB / FromDB).", + "example": "chargeMeta := chargemeta.MapFromDB(entity); ... Totals: totals.FromDB(dbRun)" + }, + { + "name": "Timestamp normalization to UTC", + "description": "Times are passed through meta.NormalizeTimestamp / NormalizeOptionalTimestamp and .In(time.UTC) before persisting; mappers read DB times back with .UTC().", + "example": "SetInvoiceAt(meta.NormalizeTimestamp(intent.InvoiceAt).In(time.UTC))" + }, + { + "name": "Detailed-line soft-delete + upsert by ChildUniqueReferenceID", + "description": "UpsertRunDetailedLines soft-deletes existing rows (SetDeletedAt) for the run except ChildUniqueReferenceIDs being kept, sets the run's DetailedLinesPresent=true, then CreateBulk...OnConflict on (namespace, charge_id, run_id, child_unique_reference_id) preserving created_at/id.", + "example": "OnConflict(sql.ConflictColumns(FieldNamespace, FieldChargeID, FieldRunID, FieldChildUniqueReferenceID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt)), sql.ResolveWithNewValues())" + }, + { + "name": "Expand-gated edge loading", + "description": "Realization runs and their child edges (credit allocations, invoiced usage, payment) are only loaded when meta.Expands requests them; detailed lines are fetched in a second pass via FetchDetailedLines when ExpandDetailedLines is set.", + "example": "if input.Expands.Has(meta.ExpandRealizations) { query = expandRealizations(query, input.Expands) }" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor, adapter struct (db, logger, metaAdapter), and the entutils transaction plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self).", + "watch_for": "Config.Validate requires Client, Logger, and MetaAdapter all non-nil; New returns the usagebased.Adapter interface, not the concrete type." + }, + { + "file": "charge.go", + "role": "ChargeAdapter: CreateCharges, UpdateCharge, UpdateSubscriptionItemID, DeleteCharge (soft delete + StatusDeleted), GetByID(s); status is dual-written via SetStatus(metaStatus) and SetStatusDetailed(charge.Status).", + "watch_for": "GetByIDs intentionally skips a namespace EQ to allow multi-namespace expansion but relies on entutils.InIDOrder for namespace filtering/ordering; charge status must round-trip through ToMetaChargeStatus()." + }, + { + "file": "mapper.go", + "role": "All DB->domain mappers; MapRealizationRunFromDB requires CreditAllocations/InvoicedUsage/Payment edges loaded and errors (NotLoadedError) if not.", + "watch_for": "MapRealizationRunsFromDB forces empty runs to nil and sorts by ServicePeriodTo; calling it without WithRuns loaded returns a 'not loaded' error." + }, + { + "file": "detailedline.go", + "role": "FetchDetailedLines (gated by run.DetailedLinesPresent) and UpsertRunDetailedLines (soft-delete + bulk upsert); buildDetailedLineCreate and mapDetailedLineFromDB.", + "watch_for": "Detailed lines are only marked present (mo.Some) when the run's persisted DetailedLinesPresent flag is true; treating unknown lines as empty can overcharge late events. FetchDetailedLines never repairs the flag." + }, + { + "file": "realizationrun.go", + "role": "RealizationRunAdapter: CreateRealizationRun (sets Type and InitialType, DetailedLinesPresent=false) and UpdateRealizationRun (mo.Option-gated field updates, input.Normalized()).", + "watch_for": "Update only sets fields whose mo.Option IsPresent(); DeletedAt/LineID use SetOrClear semantics. Totals are written via totals.Set." + }, + { + "file": "creditallocation.go / invoicedusage.go / payment.go", + "role": "Per-edge create/update adapters for run credit allocations, invoiced (accrued) usage, and payments; each delegates field-setting to its model package (creditrealization.Create, invoicedusage.Create, payment.Create/UpdateInvoiced).", + "watch_for": "payment.go enforces runID.Namespace == in.Namespace; these write child rows keyed by RunID and must be created within the run's transaction." + }, + { + "file": "detailedline_test.go", + "role": "Suite-based integration test (DetailedLineAdapterSuite) over a real Postgres TestDB + migrations exercising upsert replace/soft-delete and the DetailedLinesPresent flag semantics.", + "watch_for": "Uses testutils.InitPostgresDB + migrate.OMMigrationsConfig; drives behavior through s.adapter (CreateCharges/CreateRealizationRun/UpsertRunDetailedLines), not raw Ent." + } + ], + "anti_patterns": [ + "Using a.db directly inside a method body instead of the tx *adapter from TransactingRepo \u2014 breaks transaction propagation.", + "Loading realization runs without their CreditAllocations/InvoicedUsage/Payment edges and passing to MapRealizationRunFromDB \u2014 returns 'not loaded' errors.", + "Marking detailed lines as present (mo.Some) without honoring the run's DetailedLinesPresent flag \u2014 can cause late-event overcharging.", + "Persisting timestamps without meta.NormalizeTimestamp + UTC, or reading them back without .UTC().", + "Skipping the Validate() guard on inputs before opening a transaction." + ], + "decisions": [ + { + "decision": "Status is stored in two columns: a coarse meta status (SetStatus) plus a detailed status (SetStatusDetailed).", + "rationale": "meta-layer queries operate on the normalized ChargeStatus while the usagebased lifecycle needs its richer Status enum; both must stay in sync via ToMetaChargeStatus()." + }, + { + "decision": "DetailedLinesPresent is a persisted boolean on the run rather than inferred from row count.", + "rationale": "An empty detailed-line set is meaningfully different from 'not yet materialized'; the flag prevents late-arriving usage from being treated as already-rated empty." + }, + { + "decision": "Detailed lines are replaced via soft-delete + conflict-resolving bulk upsert keyed by ChildUniqueReferenceID.", + "rationale": "Preserves stable row IDs/created_at across re-runs (corrections) while allowing rows to be retired without hard deletes." + } + ], + "code_examples": [ + { + "scenario": "A transaction-aware adapter method that validates, queries Ent gated by expands, and maps results back to domain.", + "code": "func (a *adapter) GetByID(ctx context.Context, input usagebased.GetByIDInput) (usagebased.Charge, error) {\n\tif err := input.Validate(); err != nil {\n\t\treturn usagebased.Charge{}, err\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (usagebased.Charge, error) {\n\t\tquery := tx.db.ChargeUsageBased.Query().\n\t\t\tWhere(dbchargeusagebased.Namespace(input.ChargeID.Namespace)).\n\t\t\tWhere(dbchargeusagebased.ID(input.ChargeID.ID))\n\t\tif input.Expands.Has(meta.ExpandRealizations) {\n\t\t\tquery = expandRealizations(query, input.Expands)\n\t\t}\n\t\tentity, err := query.First(ctx)\n\t\tif err != nil {\n\t\t\tif db.IsNotFound(err) {\n\t\t\t\treturn usagebased.Charge{}, models.NewGenericNotFoundError(fmt.Errorf(\"usage based charge [id=%s] not found\", input.ChargeID))\n\t\t\t}\n\t\t\treturn usagebased.Charge{}, fmt.Errorf(\"querying usage based charge [id=%s]: %w\", input.ChargeID, err)\n\t\t}\n\t\tcharge, err := MapChargeFromDB(entity, input.Expands)\n\t\tif err != nil {\n\t\t\treturn usagebased.Charge{}, err\n\t\t}\n\t\tif input.Expands.Has(meta.ExpandDetailedLines) {\n\t\t\tcharge, err = tx.FetchDetailedLines(ctx, charge)\n\t\t\tif err != nil {\n\t\t\t\treturn usagebased.Charge{}, err\n\t\t\t}\n\t\t}\n\t\treturn charge, nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w65.json b/.archie/enrichments/w65.json new file mode 100644 index 0000000000..1e396d6642 --- /dev/null +++ b/.archie/enrichments/w65.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/charges/usagebased/service/run": { + "purpose": "Owns the mechanics of usage-based realization runs: rating snapshots, run persistence, credit allocation/correction, credit-realization lineage, invoice-usage booking, and payment authorize/settle. It deliberately does NOT make state-machine decisions (which triggers to fire, which status to enter) \u2014 those belong to the caller in usagebased/service.", + "patterns": [ + { + "name": "Service struct with validated Config + New", + "description": "Service holds exactly four collaborators (adapter usagebased.Adapter, rater usagebasedrating.Service, handler usagebased.Handler, lineage lineage.Service). Config.Validate() returns errors.Join over nil-checks; New(config) validates before constructing. Never add unvalidated deps.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{adapter: config.Adapter, ...}, nil }" + }, + { + "name": "Input struct + Validate() per public method", + "description": "Every public method takes a single typed Input struct with a Validate() method called first thing in the method body. Inputs embed Charge/Run and call their .Validate(). Result is returned as a typed *Result struct, never bare values.", + "example": "func (s *Service) CreateRatedRun(ctx, in CreateRatedRunInput) (CreateRatedRunResult, error) { if err := in.Validate(); err != nil { return CreateRatedRunResult{}, err }; ... }" + }, + { + "name": "Decisions delegated to handler, persistence to adapter", + "description": "Side-effecting credit/ledger decisions go through s.handler (OnCreditsOnlyUsageAccrued, OnInvoiceUsageAccrued, OnPaymentAuthorized/Settled, OnCreditsOnlyUsageAccruedCorrection); DB writes go through s.adapter (CreateRealizationRun, UpdateRealizationRun, CreateRunCreditRealization, CreateRunInvoicedUsage, CreateRunPayment, UpsertRunDetailedLines). Run does not call ent or ledger directly.", + "example": "creditAllocations, err := s.handler.OnCreditsOnlyUsageAccrued(ctx, usagebased.CreditsOnlyUsageAccruedInput{...})" + }, + { + "name": "CurrencyCalculator.RoundToPrecision before decimal compares", + "description": "All target/current/delta amounts are rounded via in.CurrencyCalculator.RoundToPrecision(...) before IsZero/IsPositive/IsNegative/Equal branching. Skipping rounding causes spurious non-zero deltas.", + "example": "delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount)); switch { case delta.IsPositive(): ... }" + }, + { + "name": "Credit reconciliation as signed-delta switch", + "description": "ReconcileCredits computes delta = target - current and switches: positive -> allocate(), negative -> CreditsAllocated.Correct(...) producing corrections then createRunCreditRealizations, zero -> no-op. Corrections always preload lineage via lineage.LoadActiveSegmentsByRealizationID.", + "example": "case delta.IsNegative(): corrections, err := in.Run.CreditsAllocated.Correct(delta, calc, func(req) {...s.handler.OnCreditsOnlyUsageAccruedCorrection...})" + }, + { + "name": "NoFiatTransactionRequired short-circuits fiat paths", + "description": "When run.NoFiatTransactionRequired (credits_only or zero total) the payment authorize/settle paths return early without ledger calls, and invoice-usage booking creates AccruedUsage with no LedgerTransaction. Validate() enforces the zero-total <-> NoFiatTransactionRequired invariant.", + "example": "if in.Run.NoFiatTransactionRequired { return BookInvoicedPaymentAuthorizedResult{Run: in.Run}, nil }" + }, + { + "name": "Lineage created/persisted alongside every credit realization", + "description": "createRunCreditRealizations always follows adapter.CreateRunCreditRealization with lineage.CreateInitialLineages and lineage.PersistCorrectionLineageSegments. New credit-writing paths must funnel through this helper, not call the adapter directly.", + "example": "realizations, _ := s.adapter.CreateRunCreditRealization(ctx, runID, allocs); s.lineage.CreateInitialLineages(ctx, ...); s.lineage.PersistCorrectionLineageSegments(ctx, ...)" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service/Config/New plus CreditAllocationMode enum (None/Exact/Available). Docstring spells out the no-state-machine constraint.", + "watch_for": "Do not add state-machine logic here; keep the four-collaborator shape and Config.Validate nil-checks in sync." + }, + { + "file": "create.go", + "role": "CreateRatedRun: rates usage via rater, builds the realization run, optionally allocates credits, recomputes totals/NoFiatTransactionRequired, upserts detailed lines.", + "watch_for": "Guards against a pre-existing CurrentRealizationRunID in both Input.Validate and createNewRealizationRun; ServicePeriodTo must be within charge.Intent.ServicePeriod (after From, not after To). Negative total -> ErrChargeTotalIsNegative." + }, + { + "file": "credits.go", + "role": "allocate() (handler.OnCreditsOnlyUsageAccrued + lineage), createRunCreditRealizations() helper, featuresForLineage().", + "watch_for": "Allocated must not exceed AmountToAllocate (ErrCreditAllocationsDoNotMatchTotal); Exact mode requires exact equality. Always round AmountToAllocate first; zero amount short-circuits." + }, + { + "file": "correct.go", + "role": "ReconcileCredits (signed-delta allocate/correct) and CorrectAllCredits (reverse all realizations), both preloading lineage segments.", + "watch_for": "TargetAmount must be zero-or-positive after rounding; corrections drive handler.OnCreditsOnlyUsageAccruedCorrection per CorrectionRequest, not direct ledger writes." + }, + { + "file": "invoice.go", + "role": "BookAccruedInvoiceUsage: links a run to a billing.StandardLine and records invoicedusage.AccruedUsage (with ledger txn unless NoFiatTransactionRequired).", + "watch_for": "Validate enforces run.LineID matches line.ID, run has no existing InvoiceUsage, and the NoFiatTransactionRequired<->zero-total invariant. Non-fiat path requires a non-empty TransactionGroupID." + }, + { + "file": "payment.go", + "role": "BookInvoicedPaymentAuthorized and SettleInvoicedPayment: ledger handler calls + adapter Create/UpdateRunPayment, using payment.Status transitions Authorized->Settled.", + "watch_for": "Settle requires an existing Authorized payment with matching LineID unless NoFiatTransactionRequired. Uses clock.Now() for eventAt \u2014 freeze clock in tests." + }, + { + "file": "preview.go", + "role": "BuildCreditThenInvoiceGatheringPreviewRun: side-effect-free run shape for gathering-invoice previews; rates usage but persists nothing and allocates no credits.", + "watch_for": "Only supports CreditThenInvoiceSettlementMode; uses NewNillableGenericValidationError collecting all errs. Synthesizes a preview- run ID; do not call adapters here." + }, + { + "file": "payment_test.go", + "role": "Validate-focused unit tests with newBookPaymentAuthorizedInput/newSettlePaymentInput/newUsageBasedCharge/newUsageBasedRun fixtures.", + "watch_for": "Hand-assembled usagebased.Charge/RealizationRun fixtures \u2014 keep field names aligned with the domain structs when they change." + } + ], + "anti_patterns": [ + "Making state-machine decisions here (firing triggers, choosing Status, advancing invoice lifecycle) \u2014 that belongs to the caller in usagebased/service.", + "Calling ent/ledger/credit directly instead of going through s.adapter / s.handler / s.lineage.", + "Comparing alpacadecimal amounts (IsZero/Equal/IsPositive) without first RoundToPrecision via the CurrencyCalculator.", + "Writing credit realizations without the matching lineage.CreateInitialLineages + PersistCorrectionLineageSegments calls.", + "Creating a second realization run while charge.State.CurrentRealizationRunID is already set." + ], + "decisions": [ + { + "decision": "Run service is split from the state-machine service and restricted to run mechanics.", + "rationale": "Keeps rating/persistence/credit/lineage concerns reusable and testable independent of which lifecycle trigger fires; the docstring on Service codifies the boundary." + }, + { + "decision": "Credit reconciliation is modeled as a signed delta with allocate vs correct branches rather than recompute-and-replace.", + "rationale": "Allows incremental allocation on positive deltas and ledger-correct reversal on negative deltas while preserving lineage continuity." + }, + { + "decision": "NoFiatTransactionRequired is threaded through invoice/payment paths as an early-return guard with a Validate-enforced zero-total invariant.", + "rationale": "credits_only and zero-total runs must never touch the fiat ledger, and the invariant prevents booking a fiat payment for a zero line or skipping one for a non-zero line." + } + ], + "code_examples": [ + { + "scenario": "Reconcile a run's credits toward a target amount (positive=allocate, negative=correct).", + "code": "func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error) {\n\tin.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount)\n\tif err := in.Validate(); err != nil { return ReconcileCreditRealizationsResult{}, err }\n\tcurrent := in.CurrencyCalculator.RoundToPrecision(in.Run.CreditsAllocated.Sum())\n\tdelta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(current))\n\tswitch {\n\tcase delta.IsPositive():\n\t\tallocated, err := s.allocate(ctx, allocateCreditRealizationsInput{Charge: in.Charge, Run: in.Run, AllocateAt: in.AllocateAt, AmountToAllocate: delta, CurrencyCalculator: in.CurrencyCalculator, Exact: in.ExactAllocation})\n\t\tif err != nil { return ReconcileCreditRealizationsResult{}, err }\n\t\treturn ReconcileCreditRealizationsResult{Delta: delta, Realizations: allocated.Realizations}, nil\n\tcase delta.IsNegative():\n\t\t// CreditsAllocated.Correct -> handler.OnCreditsOnlyUsageAccruedCorrection -> createRunCreditRealizations\n\t}\n\treturn ReconcileCreditRealizationsResult{Delta: delta}, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w66.json b/.archie/enrichments/w66.json new file mode 100644 index 0000000000..9d71afb96b --- /dev/null +++ b/.archie/enrichments/w66.json @@ -0,0 +1,304 @@ +{ + "openmeter/billing/charges/usagebased/service/rating/delta": { + "purpose": "Delta rating engine for usage-based charges: it rates the latest cumulative meter snapshot, subtracts every detailed line already booked for the charge, and books the remaining delta on the current run's service period. It intentionally does NOT preserve the original service period of corrections \u2014 every delta lands on the current run period.", + "patterns": [ + { + "name": "Engine{ratingService} constructed via New", + "description": "The engine is a value type holding a billingrating.Service, constructed with New(ratingService). Rate(ctx, Input) is the only exported method.", + "example": "engine := New(billingratingservice.New()); out, err := engine.Rate(ctx, Input{Intent: intent, CurrentPeriod: CurrentPeriod{...}, AlreadyBilledDetailedLines: ...})" + }, + { + "name": "Validate before rating", + "description": "Rate calls in.Validate() first; Input.Validate collects errors into []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)). Current period service period must be ContainsPeriodInclusive of the intent service period.", + "example": "if err := in.Validate(); err != nil { return Result{}, err }" + }, + { + "name": "Disable credits mutator; ignore min commitment until final snapshot", + "description": "Always pass billingrating.WithCreditsMutatorDisabled(); add billingrating.WithMinimumCommitmentIgnored() only when CurrentPeriod.ServicePeriod.To.Before(Intent.ServicePeriod.To). Minimum commitment is charged solely on the final service-period snapshot.", + "example": "opts := []billingrating.GenerateDetailedLinesOption{billingrating.WithCreditsMutatorDisabled()}" + }, + { + "name": "Strip credits from already-billed lines before subtraction", + "description": "Clone each AlreadyBilledDetailedLine, set CreditsApplied=nil, Totals.CreditsTotal=Zero, recompute Totals.Total via CalculateTotal(). Credits are allocated post-rating, so they must not look like usage/pricing changes during subtraction.", + "example": "line = line.Clone(); line.CreditsApplied = nil; line.Totals.CreditsTotal = alpacadecimal.Zero; line.Totals.Total = line.Totals.CalculateTotal()" + }, + { + "name": "Stamp current period and clear CorrectsRunID on output", + "description": "After subtract.SubtractRatedRunDetails, every remaining line gets ServicePeriod = CurrentPeriod.ServicePeriod and CorrectsRunID = nil. The period-preserving engine owns correction metadata; delta never sets it.", + "example": "remainingDetailedLines[idx].ServicePeriod = in.CurrentPeriod.ServicePeriod; remainingDetailedLines[idx].CorrectsRunID = nil" + }, + { + "name": "Sort, assign dense indexes, validate unique child references", + "description": "Call remainingDetailedLines.Sort(), then assign Index = &idx densely. Finally group by ChildUniqueReferenceID and error on any duplicate \u2014 delta output (unlike periodpreserving intermediate steps) must be unique.", + "example": "remainingDetailedLines.Sort(); for idx := range ... { index := idx; remainingDetailedLines[idx].Index = &index }" + }, + { + "name": "uniqueReferenceIDGenerator{} for subtraction identities", + "description": "Rate passes a local uniqueReferenceIDGenerator{} (in uniquereferenceid.go) implementing subtract.UniqueReferenceIDGenerator to encode current/matched/reversal child reference identities.", + "example": "subtract.SubtractRatedRunDetails(currentDetailedLines, alreadyBilledDetailedLines, uniqueReferenceIDGenerator{})" + } + ], + "key_file_guides": [ + { + "file": "engine.go", + "role": "Engine, Input/CurrentPeriod/Result types, and Rate \u2014 the whole delta algorithm. Input.Validate enforces current period containment.", + "watch_for": "Do not preserve correction periods here; ServicePeriod is overwritten to the current run period and CorrectsRunID is cleared. Duplicate output child refs are a hard error." + }, + { + "file": "uniquereferenceid.go", + "role": "uniqueReferenceIDGenerator implementing subtract.UniqueReferenceIDGenerator (CurrentOnly/MatchedDelta/PreviousOnlyReversal).", + "watch_for": "PreviousOnlyReversal must produce a deterministic correction ID like \"#correction:detailed_line_id=\"; it errors when the already-billed detailed line ID is missing." + }, + { + "file": "engine_test.go", + "role": "Stub-driven unit tests using stubRatingService (records lastOpts, returns canned DetailedLines).", + "watch_for": "Tests assert lastOpts.DisableCreditsMutator and IgnoreMinimumCommitment flags \u2014 keep the option-passing logic intact when editing Rate." + }, + { + "file": "base_test.go", + "role": "runDeltaRatingTestCase harness driving multi-phase scenarios via a real billingratingservice.New(); deltaRatingTestPeriods() supplies period1..3.", + "watch_for": "Each phase feeds prior phases' booked lines as AlreadyBilledDetailedLines; detailedLinesBookedForDeltaTest stamps phase-N-line-M IDs used by correction refs." + }, + { + "file": "dynamic_test.go / unit_test.go / package_test.go / tieredgraduated_test.go / tieredvolume_test.go", + "role": "Price-shape-specific delta scenarios (dynamic, unit, package, graduated, volume) including repricing corrections.", + "watch_for": "Expected lines assert exact ChildUniqueReferenceID correction strings (e.g. \"usage#correction:detailed_line_id=phase-1-line-1\"); changing the generator format breaks many tests." + } + ], + "anti_patterns": [ + "Preserving the original service period of a correction \u2014 delta always restamps to the current run period.", + "Setting CorrectsRunID on delta output (it is always cleared to nil).", + "Calling billing rating without WithCreditsMutatorDisabled(), or leaving credits on already-billed lines before subtraction.", + "Returning on the first validation error instead of joining via models.NewNillableGenericValidationError.", + "Emitting duplicate ChildUniqueReferenceID values \u2014 delta validates uniqueness and errors out." + ], + "decisions": [ + { + "decision": "Roll every delta onto the current run period instead of preserving correction periods.", + "rationale": "Keeps downstream invoicing in the simpler 'current invoice period only' shape while period-preserving rating and invoice correction support mature (see README and periodpreserving sibling)." + }, + { + "decision": "Compare per-unit amount by decimal equality (delegated to subtract) so repricing emits a reversal + current line.", + "rationale": "Non-linear prices (volume tiers) can re-rate the whole quantity; treating it as a quantity delta would be wrong." + } + ], + "code_examples": [ + { + "scenario": "Rate the cumulative snapshot, strip credits, subtract already-billed, restamp to current period", + "code": "billingDetailedLines, err := e.ratingService.GenerateDetailedLines(usagebased.RateableIntent{Intent: in.Intent, ServicePeriod: in.CurrentPeriod.ServicePeriod, MeterValue: in.CurrentPeriod.MeteredQuantity}, billingrating.WithCreditsMutatorDisabled())\ncurrent := usagebased.NewDetailedLinesFromBilling(in.Intent, in.CurrentPeriod.ServicePeriod, billingDetailedLines.DetailedLines)\nremaining, err := subtract.SubtractRatedRunDetails(current, alreadyBilled, uniqueReferenceIDGenerator{})\nfor idx := range remaining { remaining[idx].ServicePeriod = in.CurrentPeriod.ServicePeriod; remaining[idx].CorrectsRunID = nil }" + } + ] + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving": { + "purpose": "Period-preserving rating engine for usage-based charges: computes detailed-line deltas while keeping corrections on the service period where the corrected usage belongs (late-arriving usage / repricing against prior periods). NOT yet invoice-safe \u2014 must not be used as the production invoice-facing engine until invoice-compatible correction handling lands.", + "patterns": [ + { + "name": "Engine{ratingService} via New; Rate(ctx, Input) entry point", + "description": "Same shape as delta: value Engine holding billingrating.Service, built with New. Input carries Intent, CurrentPeriod, and a slice of PriorPeriod (each with RunID, MeteredQuantity, ServicePeriod, DetailedLines).", + "example": "engine := New(billingratingservice.New()); out, err := engine.Rate(ctx, Input{Intent: intent, CurrentPeriod: ..., PriorPeriods: ...})" + }, + { + "name": "Strict period validation: containment, non-empty-at-window-precision, no overlap", + "description": "Input.Validate joins errors: every period must be ContainsPeriodInclusive of the intent period; prior periods must not be empty when Truncate(streaming.MinimumWindowSizeDuration); prior periods must not Overlaps the current period or each other.", + "example": "if priorPeriod.ServicePeriod.Truncate(streaming.MinimumWindowSizeDuration).IsEmpty() { errs = append(errs, ...) }" + }, + { + "name": "Epoch-based cumulative rating with second-precision epoch keys", + "description": "buildDetailsByEpoch sorts prior+current into epochs keyed by epochClosedPeriod{From,To int64} (Unix seconds; sub-second dropped intentionally). For each epoch it rates the cumulative quantity and subtracts previously-generated lines to isolate new lines, preserving each line's source period.", + "example": "result[servicePeriod] = append(result[servicePeriod], line) // grouped by epochClosedPeriod" + }, + { + "name": "Allow duplicate child refs in intermediate subtraction; period-stamp at the end", + "description": "Epoch subtraction passes subtract.WithUniqueReferenceIDValidationIgnored() because intermediate output is not persisted. flattenDetailedLinesByEpoch calls WithServicePeriodFromUniqueReferenceID() to stamp the period suffix, Sort()s, and assigns dense Index. The period suffix makes the same rating component distinct across periods.", + "example": "subtract.SubtractRatedRunDetails(cur, prev, generatedUniqueReferenceIDGenerator{}, subtract.WithUniqueReferenceIDValidationIgnored())" + }, + { + "name": "Set CorrectsRunID on prior-period outputs", + "description": "After subtracting already-billed lines per prior period, every output line for that period gets CorrectsRunID = lo.ToPtr(runID.ID). This is the key difference from delta, which clears CorrectsRunID.", + "example": "result[servicePeriod][idx].CorrectsRunID = lo.ToPtr(runID.ID)" + }, + { + "name": "Two distinct reference-ID generators", + "description": "generatedUniqueReferenceIDGenerator (intermediate, pass-through child refs) for epoch subtraction; bookedCorrectionUniqueReferenceIDGenerator (PreviousOnlyReversal encodes \"#correction:detailed_line_id=\", erroring on missing ID) for subtracting already-billed lines.", + "example": "subtract.SubtractRatedRunDetails(result[servicePeriod], alreadyBilled, bookedCorrectionUniqueReferenceIDGenerator{})" + } + ], + "key_file_guides": [ + { + "file": "engine.go", + "role": "Whole engine: Input/CurrentPeriod/PriorPeriod/Result, Validate, SortPriorPeriods, Rate, buildDetailsByEpoch, flattenDetailedLinesByEpoch, epochClosedPeriod helpers.", + "watch_for": "epochClosedPeriod uses Unix-second keys \u2014 sub-second period boundaries collapse; period validation rejects overlapping prior periods because overlaps leak duplicate period-stamped child refs to persistence. Credits are stripped from already-billed lines before subtraction (same as delta)." + }, + { + "file": "uniquereferenceid.go", + "role": "generatedUniqueReferenceIDGenerator and bookedCorrectionUniqueReferenceIDGenerator implementing subtract.UniqueReferenceIDGenerator.", + "watch_for": "bookedCorrectionUniqueReferenceIDGenerator.PreviousOnlyReversal requires line.ID; it errors 'detailed line id is required' otherwise. The generated generator is pure pass-through." + }, + { + "file": "engine_test.go", + "role": "Multi-phase late-event scenarios (runLateEventRatingTestCase) using a real billingratingservice.New(); covers unit price, max/min commitments, percentage and usage discounts kept on original periods.", + "watch_for": "Expected lines assert FormatDetailedLineChildUniqueReferenceID(...,period) suffixes and CorrectsRunID pointers; the README warns these mutation cases (negative discount/commitment deltas) are not yet invoice-safe." + }, + { + "file": "README.md", + "role": "Algorithm, period-stamping rules, examples, and an explicit Warning + TODO list of unfinished invoice-compatible correction cases.", + "watch_for": "Treat the Warning as binding: do not wire this engine as the production invoice rater yet." + } + ], + "anti_patterns": [ + "Using this engine as the production invoice-facing rater before invoice-compatible correction handling exists (README Warning).", + "Validating uniqueness on intermediate epoch subtraction \u2014 duplicate child refs are expected there and only resolved by period-stamping.", + "Allowing overlapping prior periods or empty-at-window-precision periods \u2014 both are rejected and would corrupt period-stamped identities.", + "Forgetting to set CorrectsRunID on prior-period corrections (this is what distinguishes period-preserving from delta).", + "Keying epochs at sub-second precision \u2014 epochClosedPeriod is deliberately Unix-second granularity." + ], + "decisions": [ + { + "decision": "Keep corrections on the original service period and mark the corrected run via CorrectsRunID instead of rolling into the current period.", + "rationale": "Invoices must show changes against the prior period for late-arriving usage and repricing; delta rating cannot express that." + }, + { + "decision": "Encode the service period into ChildUniqueReferenceID as a suffix and only validate uniqueness on final, period-stamped output.", + "rationale": "The same rating component appears across multiple periods; the period suffix gives each persisted identity a distinct, collision-free key within the run." + }, + { + "decision": "Use Unix-second epoch keys.", + "rationale": "Meter snapshots are evaluated at streaming minimum-window precision; sub-second boundaries carry no rating meaning and would fragment epoch grouping." + } + ], + "code_examples": [ + { + "scenario": "Per-epoch cumulative rating, isolate new lines, then subtract already-billed and stamp CorrectsRunID", + "code": "periodNew, err := subtract.SubtractRatedRunDetails(detailedLinesWithUsageFromPriorPeriods, previouslyGeneratedDetailedLines, generatedUniqueReferenceIDGenerator{}, subtract.WithUniqueReferenceIDValidationIgnored())\n// ...later, per prior period:\nremaining, err := subtract.SubtractRatedRunDetails(result[servicePeriod], alreadyBilled, bookedCorrectionUniqueReferenceIDGenerator{})\nfor idx := range result[servicePeriod] { result[servicePeriod][idx].CorrectsRunID = lo.ToPtr(runID.ID) }" + } + ] + }, + "openmeter/billing/charges/usagebased/service/rating/subtract": { + "purpose": "Low-level arithmetic primitive shared by the delta and periodpreserving rating engines: SubtractRatedRunDetails subtracts previously-rated detailed lines from currently-rated detailed lines and returns the remainder, preserving each output line's source service period. It does NOT query meters, call billing rating, allocate credits, or decide invoice periods.", + "patterns": [ + { + "name": "SubtractRatedRunDetails(current, previous, generator, opts...) is the only entry point", + "description": "Takes two usagebased.DetailedLines slices plus a required UniqueReferenceIDGenerator. Validates inputs, validates currency, groups by key, subtracts, then optionally validates output uniqueness. Returns an error if the generator is nil.", + "example": "out, err := subtract.SubtractRatedRunDetails(current, previous, generator)" + }, + { + "name": "Match by calculation key + decimal-equal PerUnitAmount, never by string", + "description": "detailedLineKey is {PricerReferenceID(ReferenceID), Category, PaymentTerm}. Within a key, lines are matched by PerUnitAmount.Equal(...) \u2014 deliberately not a string map key \u2014 so repricing (same component, different unit amount) emits a current line plus a reversal rather than a bogus quantity delta.", + "example": "if !existingLine.PerUnitAmount.Equal(line.PerUnitAmount) { continue }" + }, + { + "name": "ChildUniqueReferenceID is identity, not arithmetic key \u2014 generated via the 3-method interface", + "description": "Output child refs come from UniqueReferenceIDGenerator: CurrentOnly (unmatched current), MatchedDelta (matched current+previous), PreviousOnlyReversal (unmatched previous). PricerReferenceID \u2014 not ChildUniqueReferenceID \u2014 is the arithmetic key.", + "example": "childUniqueReferenceID, err := generator.PreviousOnlyReversal(previousLine)" + }, + { + "name": "Drop zero-total output lines", + "description": "isZeroDetailedLine checks Totals.IsZero(); current-only, matched-delta, and reversal outputs are only emitted when totals are non-zero.", + "example": "if !isZeroDetailedLine(line) { out = append(out, line) }" + }, + { + "name": "Strict currency validation before arithmetic", + "description": "validateCurrencyForSubtract: each side may contain at most one currency; if both sides have one, they must match. Otherwise it errors before any subtraction.", + "example": "if currentCurrencies[0] != previousCurrencies[0] { return fmt.Errorf(\"...currency mismatch...\") }" + }, + { + "name": "Accept negative quantities; uniqueness validation toggleable", + "description": "Negative quantities are valid correction inputs \u2014 validateDetailedLinesForSubtract clones and normalizes the sign only for validation. validateUniqueChildReferenceIDs runs by default but is skipped via WithUniqueReferenceIDValidationIgnored() for intermediate callers (periodpreserving epoch subtraction).", + "example": "subtract.WithUniqueReferenceIDValidationIgnored()" + } + ], + "key_file_guides": [ + { + "file": "subtract.go", + "role": "The full algorithm: detailedLineKey, options/Option, SubtractRatedRunDetails, currency/line validation, group-and-sum (sumDetailedLinesByKey, appendOrSumDetailedLineByPerUnitAmount), and per-key subtraction.", + "watch_for": "Matching is PerUnitAmount.Equal, never a stringified key. Output is sorted by PerUnitAmount ascending and zero-total lines are dropped. Do not move currency/period decisions here \u2014 this package is meter/credit/invoice agnostic." + }, + { + "file": "uniquereferenceid.go", + "role": "UniqueReferenceIDGenerator interface (CurrentOnly/MatchedDelta/PreviousOnlyReversal) plus NewMockUniqueReferenceIDGenerator for tests.", + "watch_for": "This is the contract delta and periodpreserving implement. The mock's PreviousOnlyReversal encodes '#reversal:category=...:payment_term=...:per_unit_amount=...' \u2014 test expectations depend on that exact format." + }, + { + "file": "subtract_test.go", + "role": "Table-driven scenarios (TestUnitPriceSubtract, TestMinimumCommitmentSubtract, TestGraduatedTieredSubtract) using real productcatalog prices via billingratingservice.New().", + "watch_for": "Tests assert exact reversal child-ref strings and rounding-driven zero/negative deltas (e.g. delta dropped when rounding makes it zero). Changing match or rounding semantics breaks these." + }, + { + "file": "README.md", + "role": "Matching model, algorithm, and Warning that this is a primitive, not a final invoice rater.", + "watch_for": "Honor the Warning \u2014 never expose this as a standalone production rating algorithm." + } + ], + "anti_patterns": [ + "Using ChildUniqueReferenceID as the arithmetic match key (it is persistence identity only; PricerReferenceID + price-shape fields are the key).", + "Stringifying PerUnitAmount for map matching instead of decimal equality \u2014 breaks repricing correctness.", + "Querying meters, calling billing rating, allocating credits, or deciding invoice periods here \u2014 this package is intentionally meter/credit/invoice agnostic.", + "Emitting zero-total output lines or rejecting negative input quantities (corrections are valid).", + "Skipping currency validation, or merging lines across mismatched currencies." + ], + "decisions": [ + { + "decision": "Compare PerUnitAmount with decimal equality rather than via a string map key.", + "rationale": "Avoids unsafe decimal-string comparisons and keeps repricing explicit: a re-rated component emits a reversal of the old price plus the new current line." + }, + { + "decision": "Generate output ChildUniqueReferenceID through a pluggable UniqueReferenceIDGenerator instead of computing it inline.", + "rationale": "Different engines need different persistence/correction identities (delta correction refs vs period-stamped refs) over the same arithmetic core." + }, + { + "decision": "Make output-uniqueness validation opt-out via WithUniqueReferenceIDValidationIgnored.", + "rationale": "Period-preserving rating runs intermediate subtractions whose duplicate child refs are resolved later by period-stamping, so uniqueness cannot be enforced there." + } + ], + "code_examples": [ + { + "scenario": "Subtract previous from current with a custom reference-ID generator", + "code": "out, err := subtract.SubtractRatedRunDetails(\n current, // usagebased.DetailedLines (e.g. 8 units @ $10)\n previous, // usagebased.DetailedLines (e.g. 5 units @ $10)\n generator, // implements subtract.UniqueReferenceIDGenerator\n)\n// matched same-price -> 3 units @ $10 = $30 via generator.MatchedDelta;\n// repriced -> +current line (CurrentOnly) and -reversal (PreviousOnlyReversal)" + } + ] + }, + "openmeter/billing/charges/usagebased/service/rating/testutils": { + "purpose": "Shared test fixtures and assertion adapters for the usage-based rating engines (delta, periodpreserving, subtract). Provides float64-projected expectation types and intent constructors so rating tests assert on simple values instead of alpacadecimal/Totals internals.", + "patterns": [ + { + "name": "Expectation types are float64 projections of domain values", + "description": "ExpectedDetailedLine and ExpectedTotals mirror usagebased.DetailedLine / totals.Totals but with float64 fields. ToExpectedDetailedLinesWithServicePeriod and ToExpectedTotals convert via InexactFloat64() so tests compare floats, not decimals.", + "example": "require.Equal(t, expected, ratingtestutils.ToExpectedDetailedLinesWithServicePeriod(out.DetailedLines))" + }, + { + "name": "Intent constructors validate and t.Helper", + "description": "NewIntentForTest builds a usagebased.Intent (chargesmeta.Intent + price/discounts), calls require.NoError(t, intent.Validate()), and is t.Helper(). NewUnitPriceIntentForTest wraps it for the common unit-price case.", + "example": "intent := ratingtestutils.NewIntentForTest(t, fullServicePeriod, tc.price, tc.discounts)" + }, + { + "name": "FormatDetailedLineChildUniqueReferenceID encodes the period suffix", + "description": "Produces '@[..]' \u2014 the canonical period-stamped child reference used by periodpreserving expectations. Tests must use this helper, not hand-built strings, to stay in sync with the engine's stamping.", + "example": "ratingtestutils.FormatDetailedLineChildUniqueReferenceID(billingrating.UnitPriceUsageChildUniqueReferenceID, periods.period1)" + } + ], + "key_file_guides": [ + { + "file": "testutils.go", + "role": "All exported helpers: ExpectedDetailedLine, ExpectedTotals, ToExpectedDetailedLinesWithServicePeriod, ToExpectedTotals, FormatDetailedLineChildUniqueReferenceID, NewIntentForTest, NewUnitPriceIntentForTest.", + "watch_for": "The default fixture currency is USD, SettlementMode is CreditThenInvoiceSettlementMode, ManagedBy is billing.SubscriptionManagedLine; FullServicePeriod/BillingPeriod default to the same servicePeriod. The package is imported as ratingtestutils by delta, periodpreserving, and subtract tests \u2014 keep it test-only and free of production dependencies." + } + ], + "anti_patterns": [ + "Hand-writing period-stamped child reference strings instead of FormatDetailedLineChildUniqueReferenceID.", + "Comparing alpacadecimal/Totals directly instead of projecting to float64 via the ToExpected* helpers.", + "Adding production (non-test) behavior or non-test imports to this testutils package." + ], + "decisions": [ + { + "decision": "Project decimals to float64 for assertions.", + "rationale": "Per AGENTS.md, prefer require.Equal on InexactFloat64() with plain float literals over decimal equality assertions where precision allows \u2014 keeps rating tests readable." + } + ], + "code_examples": [ + { + "scenario": "Build a validated intent and assert engine output as floats", + "code": "intent := ratingtestutils.NewUnitPriceIntentForTest(t, servicePeriod, alpacadecimal.NewFromInt(3))\nout, _ := New(billingratingservice.New()).Rate(t.Context(), Input{Intent: intent, CurrentPeriod: ...})\nrequire.Equal(t, expectedLines, ratingtestutils.ToExpectedDetailedLinesWithServicePeriod(out.DetailedLines))\nrequire.Equal(t, expectedTotals, ratingtestutils.ToExpectedTotals(out.DetailedLines.SumTotals()))" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w67.json b/.archie/enrichments/w67.json new file mode 100644 index 0000000000..f962c8b484 --- /dev/null +++ b/.archie/enrichments/w67.json @@ -0,0 +1,95 @@ +{ + "openmeter/billing/charges/worker/advance": { + "purpose": "Batch driver that auto-advances all eligible usage-based charges across customers. AutoAdvancer.All scans namespaces for customers with charges past their advance-after watermark and advances each, isolating per-customer failures. It is a thin orchestration layer over charges.ChargeService \u2014 it holds no business logic of its own.", + "patterns": [ + { + "name": "Config + validating constructor", + "description": "Dependencies arrive via a Config struct; NewAdvancer returns (*AutoAdvancer, error) and rejects nil ChargesService or Logger with fmt.Errorf instead of panicking.", + "example": "NewAdvancer(Config{ChargesService: svc, Logger: log})" + }, + { + "name": "Per-customer error isolation", + "description": "All() collects per-customer failures into var errs []error and returns errors.Join(errs...) so one customer's failure never aborts the batch; each failure is also logged at ErrorContext.", + "example": "errs = append(errs, fmt.Errorf(\"... [namespace=%s customer=%s]: %w\", ...)); return errors.Join(errs...)" + }, + { + "name": "Paginate via pagination.CollectAll", + "description": "ListCustomersToAdvance wraps chargesService.ListCustomersToAdvance in pagination.NewPaginator + CollectAll with defaultPageSize (10_000); never hand-roll page loops.", + "example": "pagination.CollectAll(ctx, pagination.NewPaginator(func(ctx, page) (...) { return a.chargesService.ListCustomersToAdvance(...) }), defaultPageSize)" + }, + { + "name": "Context-aware structured logging", + "description": "All logging uses *Context variants (InfoContext/DebugContext/WarnContext/ErrorContext) with slog.String attrs for namespace and customer_id.", + "example": "a.logger.ErrorContext(ctx, \"failed to auto-advance charges\", slog.String(\"namespace\", cust.Namespace), ...)" + } + ], + "key_file_guides": [ + { + "file": "advance.go", + "role": "Defines AutoAdvancer (All, ListCustomersToAdvance, AdvanceCharges), Config, and NewAdvancer.", + "watch_for": "AdvanceAfterLTE uses time.Now() captured once at the start of ListCustomersToAdvance \u2014 the watermark is the scan-start instant, not per-customer. AdvanceCharges discards the AdvanceCharges result value (only the error)." + } + ], + "anti_patterns": [ + "Returning early from All() on the first customer error instead of accumulating into errors.Join \u2014 this would skip remaining customers.", + "Adding charge advancement business logic here; this package only orchestrates charges.ChargeService.", + "Falling back to slog.Default() instead of requiring Logger via Config (constructor rejects nil)." + ], + "decisions": [ + { + "decision": "Best-effort batch with error aggregation rather than fail-fast.", + "rationale": "Auto-advance is a sweep across all customers; one bad customer must not block billing progress for the rest." + } + ], + "code_examples": [ + { + "scenario": "Run auto-advance across namespaces, isolating per-customer failures", + "code": "func (a *AutoAdvancer) All(ctx context.Context, namespaces []string) error {\n\tcustomers, err := a.ListCustomersToAdvance(ctx, namespaces)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to list customers to advance charges: %w\", err)\n\t}\n\tvar errs []error\n\tfor _, cust := range customers {\n\t\tif err := a.AdvanceCharges(ctx, cust); err != nil {\n\t\t\terrs = append(errs, fmt.Errorf(\"failed to auto-advance charges [namespace=%s customer=%s]: %w\", cust.Namespace, cust.ID, err))\n\t\t}\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + }, + "openmeter/billing/charges/worker/asyncadvance": { + "purpose": "Event-driven counterpart to advance/: a Watermill/Kafka-style Handler that advances charges for a single customer in response to one charges.AdvanceChargesEvent. It maps the event's Namespace/CustomerID into a charges.AdvanceChargesInput and delegates to charges.ChargeService.", + "patterns": [ + { + "name": "Config.Validate() + New constructor", + "description": "Config exposes a Validate() error method (returns errors.New on nil Logger / ChargesService); New(c) calls c.Validate() first and returns (*Handler, error). This is the validating-config idiom, distinct from advance/'s inline checks.", + "example": "func New(c Config) (*Handler, error) { if err := c.Validate(); err != nil { return nil, err }; ... }" + }, + { + "name": "Single-event Handle delegating to service", + "description": "Handle(ctx, *charges.AdvanceChargesEvent) builds customer.CustomerID{Namespace, ID} from the event and calls chargesService.AdvanceCharges, discarding the result value and returning the error to let the consumer drive retry.", + "example": "h.chargesService.AdvanceCharges(ctx, charges.AdvanceChargesInput{Customer: customer.CustomerID{Namespace: event.Namespace, ID: event.CustomerID}})" + }, + { + "name": "Return error for consumer-level retry", + "description": "On failure Handle logs WarnContext (not Error) with namespace/customer_id and returns the error so the message pipeline can retry; it does not swallow or aggregate.", + "example": "h.logger.WarnContext(ctx, \"failed to advance charges\", slog.String(\"namespace\", event.Namespace), ...); return err" + } + ], + "key_file_guides": [ + { + "file": "asyncadvance.go", + "role": "Defines Handler, Config (+Validate), New, and Handle(ctx, *charges.AdvanceChargesEvent).", + "watch_for": "Handle operates on exactly one customer per event \u2014 there is no batching here (that belongs in advance/). The error is returned (for retry), unlike a fire-and-forget consumer; keep it propagating." + } + ], + "anti_patterns": [ + "Swallowing the error in Handle \u2014 the returned error is the message-bus retry signal; returning nil on failure silently drops advancement.", + "Adding multi-customer/batch iteration here; per-customer batching lives in the sibling advance/ package.", + "Constructing Handler directly without New/Validate, bypassing the nil-dependency guards." + ], + "decisions": [ + { + "decision": "Split async (per-event) advancement into its own package separate from advance/ (batch sweep).", + "rationale": "The two have different triggers and error semantics: the batch sweep aggregates and continues, the event handler propagates a single error for bus-level retry." + } + ], + "code_examples": [ + { + "scenario": "Advance charges for one customer from an AdvanceChargesEvent", + "code": "func (h *Handler) Handle(ctx context.Context, event *charges.AdvanceChargesEvent) error {\n\t_, err := h.chargesService.AdvanceCharges(ctx, charges.AdvanceChargesInput{\n\t\tCustomer: customer.CustomerID{Namespace: event.Namespace, ID: event.CustomerID},\n\t})\n\tif err != nil {\n\t\th.logger.WarnContext(ctx, \"failed to advance charges\", slog.String(\"namespace\", event.Namespace), slog.String(\"customer_id\", event.CustomerID), slog.String(\"error\", err.Error()))\n\t\treturn err\n\t}\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w68.json b/.archie/enrichments/w68.json new file mode 100644 index 0000000000..62a0b9c3a2 --- /dev/null +++ b/.archie/enrichments/w68.json @@ -0,0 +1,67 @@ +{ + "openmeter/billing/creditgrant/service": { + "purpose": "Implements the creditgrant.Service interface as a thin orchestration facade that maps credit-grant operations onto the lower-level charges/creditpurchase layer. Its primary constraint: it owns no persistence \u2014 every read/write delegates to chargesService or creditPurchaseService, and it only adds customer-existence checks, intent construction, and credit-purchase-charge typing.", + "patterns": [ + { + "name": "Config-validated constructor returning interface", + "description": "New(config Config) calls config.Validate() (which requires CreditPurchaseService, ChargesService, CustomerService non-nil) before constructing the unexported *service, and returns the creditgrant.Service interface, not the concrete struct.", + "example": "func New(config Config) (creditgrant.Service, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid config: %w\", err) }; return &service{...}, nil }" + }, + { + "name": "Validate-then-delegate per method", + "description": "Every Service method begins with input.Validate() and wraps the error as 'invalid input: %w', then delegates to a charges/creditpurchase call. No method touches Ent or a transaction directly.", + "example": "if err := input.Validate(); err != nil { return creditpurchase.Charge{}, fmt.Errorf(\"invalid input: %w\", err) }" + }, + { + "name": "Charge-to-credit-purchase typing via AsCreditPurchaseCharge", + "description": "After fetching a generic charge with chargesService.GetByID, the result is narrowed with charge.AsCreditPurchaseCharge(); a non-credit-purchase charge is surfaced as an error rather than returned.", + "example": "cpCharge, err := charge.AsCreditPurchaseCharge(); if err != nil { return creditpurchase.Charge{}, fmt.Errorf(\"charge is not a credit purchase: %w\", err) }" + }, + { + "name": "Expand realizations on every read", + "description": "Get/Create reads pass Expands: meta.Expands{meta.ExpandRealizations} to GetByID, and List sets the same Expands on ListChargesInput, so returned credit-purchase charges always carry realization data.", + "example": "Expands: meta.Expands{meta.ExpandRealizations}" + }, + { + "name": "Input mapping via package-local to* helpers", + "description": "CreateInput is translated into a creditpurchase.Intent by toIntent, which itself calls toSettlement and calculateExpiresAt. FundingMethod selects the settlement variant (Invoice/External/Promotional) in a switch.", + "example": "intent := toIntent(input); result, err := s.chargesService.Create(ctx, charges.CreateInput{ Namespace: input.Namespace, Intents: charges.ChargeIntents{charges.NewChargeIntent(intent)} })" + }, + { + "name": "Customer-scoped not-found and ownership enforcement", + "description": "Create verifies the customer via customerService.GetCustomer; Get cross-checks cpCharge.Intent.CustomerID against input.CustomerID and returns models.NewGenericNotFoundError when mismatched, so charges are namespaced+customer-scoped.", + "example": "if cpCharge.Intent.CustomerID != input.CustomerID { return creditpurchase.Charge{}, fmt.Errorf(\"get charge: %w\", models.NewGenericNotFoundError(...)) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Whole service implementation: Config/Validate, New, the *service struct, the four Service methods (Create, Get, List, UpdateExternalSettlement), and the toIntent/toSettlement/calculateExpiresAt mapping helpers.", + "watch_for": "Create expects chargesService.Create to return exactly one charge (errors on len != 1). UpdateExternalSettlement rejects non-external settlements with a models.NewValidationIssue (code credit_grant_external_settlement_not_supported, 400) \u2014 only external-funded grants may transition payment state. toIntent currently sets ServicePeriod/BillingPeriod/FullServicePeriod to a zero-width [effectiveAt, effectiveAt] period (TODO marker)." + } + ], + "anti_patterns": [ + "Adding Ent queries, transactions, or a billing.Adapter dependency here \u2014 this layer must stay a pure orchestration facade over charges/creditpurchase.", + "Returning the concrete *service from New instead of the creditgrant.Service interface.", + "Skipping input.Validate() or the AsCreditPurchaseCharge() type narrowing and returning a raw generic charge.", + "Constructing creditpurchase.Settlement inline in a method instead of routing FundingMethod through toSettlement.", + "Bypassing the customer-existence / Intent.CustomerID ownership checks, which would leak charges across customers." + ], + "decisions": [ + { + "decision": "creditgrant.Service is a separate facade over the charges layer rather than methods on charges.Service.", + "rationale": "It exposes a credit-grant-centric vocabulary (FundingMethod, Amount, ExpiresAfter, customer scoping) and hides the generic charge/intent machinery from API handlers and app/common." + }, + { + "decision": "List delegates to creditPurchaseService.List while Get/Create use the generic chargesService.GetByID/Create.", + "rationale": "creditPurchaseService already provides a credit-purchase-typed list with status/currency/customer filters, avoiding manual narrowing of a heterogeneous charge list." + } + ], + "code_examples": [ + { + "scenario": "Create a credit grant by building an intent and delegating to the charges layer, then narrowing the result.", + "code": "intent := toIntent(input)\nresult, err := s.chargesService.Create(ctx, charges.CreateInput{\n\tNamespace: input.Namespace,\n\tIntents: charges.ChargeIntents{charges.NewChargeIntent(intent)},\n})\nif err != nil { return creditpurchase.Charge{}, fmt.Errorf(\"create credit grant charge: %w\", err) }\nif len(result) != 1 { return creditpurchase.Charge{}, fmt.Errorf(\"expected 1 created charge, got %d\", len(result)) }\ncreatedChargeID, err := result[0].GetChargeID()\ncharge, err := s.chargesService.GetByID(ctx, charges.GetByIDInput{ ChargeID: createdChargeID, Expands: meta.Expands{meta.ExpandRealizations} })\nreturn charge.AsCreditPurchaseCharge()" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w69.json b/.archie/enrichments/w69.json new file mode 100644 index 0000000000..5eb90accf6 --- /dev/null +++ b/.archie/enrichments/w69.json @@ -0,0 +1,255 @@ +{ + "openmeter/billing/models/creditsapplied": { + "purpose": "Tiny value-object package modeling credits applied to a billing line. Defines CreditApplied (Amount/Description/CreditRealizationID) and the CreditsApplied slice, persisted as JSONB on detailed-line schemas and pre-tax in the totals model.", + "patterns": [ + { + "name": "Validator + Clonable interface assertions", + "description": "Compile-time interface checks via var _ blank assignments enforce that the type satisfies models.Validator and models.Clonable.", + "example": "var _ models.Validator = (*CreditsApplied)(nil); var _ models.Clonable[CreditsApplied] = (*CreditsApplied)(nil)" + }, + { + "name": "Slice-level Validate delegates to element Validate", + "description": "CreditsApplied.Validate() ranges items and returns the first item.Validate() error; CreditApplied.Validate() rejects non-positive Amount.", + "example": "if !c.Amount.IsPositive() { return errors.New(\"amount must be positive\") }" + }, + { + "name": "Value-semantics clone helpers", + "description": "Clone() returns nil for empty slices and lo.Map copies elements; CloneWithAmount returns a copy with a new Amount (value receiver, no mutation of original).", + "example": "func (c CreditApplied) CloneWithAmount(amount alpacadecimal.Decimal) CreditApplied { c.Amount = amount; return c }" + }, + { + "name": "Currency-aware summation", + "description": "SumAmount rounds each item Amount with currencyx.Calculator.RoundToPrecision before adding, accumulating on alpacadecimal.Zero.", + "example": "sum = sum.Add(currency.RoundToPrecision(item.Amount))" + } + ], + "key_file_guides": [ + { + "file": "model.go", + "role": "Entire package: CreditApplied struct, CreditsApplied slice, Validate/Clone/SumAmount/CloneWithAmount.", + "watch_for": "Amount must be a positive alpacadecimal.Decimal \u2014 never compare decimals with ==; use alpaca methods. Clone returns nil (not empty slice) for len==0." + } + ], + "anti_patterns": [ + "Adding monetary fields without rounding through a currencyx.Calculator before summing.", + "Returning an empty non-nil slice from Clone() instead of nil \u2014 downstream goderive equality treats nil vs empty distinctly.", + "Mutating the receiver in CloneWithAmount/Clone (value receivers exist to keep these copy-only)." + ], + "decisions": [ + { + "decision": "Credits are stored as a standalone value-object slice rather than line fields.", + "rationale": "Lets the same CreditsApplied JSONB blob be reused across detailed-line schemas and summed independently for pre-tax totals." + } + ], + "code_examples": [] + }, + "openmeter/billing/models/externalid": { + "purpose": "Generic, reusable Ent mixins and value-objects for storing external invoicing/payment/tax app IDs (e.g. Stripe invoice/line IDs) on invoice and line entities. Pairs schema field definitions with typed generic Create/Update/Map helpers.", + "patterns": [ + { + "name": "Ent mixin + generic typed accessor pattern", + "description": "Each entity gets a Mixin (LineMixin/InvoiceMixin) declaring Optional().Nillable() String fields, plus generic Creator/Updater/Getter interfaces and Create/Update/Map functions parameterized over the Ent builder type T.", + "example": "func CreateLineExternalID[T LineExternalIDCreator[T]](creator LineExternalIDCreator[T], ids LineExternalIDs) T { ... }" + }, + { + "name": "EmptyableToPtr for optional persistence", + "description": "Create/Update helpers use lo.EmptyableToPtr to turn empty strings into nil before SetNillable.../SetOrClear..., and lo.FromPtr when mapping back from DB.", + "example": "creator.SetNillableInvoicingAppExternalID(lo.EmptyableToPtr(ids.Invoicing))" + }, + { + "name": "Create vs Update builder contracts differ", + "description": "Creators use SetNillable* (insert), updaters use SetOrClear* (update can null out an existing value); pick the matching interface for the Ent operation.", + "example": "SetOrClearInvoicingAppExternalID vs SetNillableInvoicingAppExternalID" + }, + { + "name": "Value-object Equal / nil-safe getter", + "description": "LineExternalIDs.Equal compares by Invoicing; InvoiceExternalIDs.GetInvoicingOrEmpty is nil-safe on a pointer receiver.", + "example": "func (i *InvoiceExternalIDs) GetInvoicingOrEmpty() string { if i == nil { return \"\" } ... }" + } + ], + "key_file_guides": [ + { + "file": "mixin.go", + "role": "Ent mixins (LineMixin, InvoiceMixin) and the generic Create/Update/Map helpers + Creator/Updater/Getter interfaces.", + "watch_for": "Invoice has 3 app IDs (invoicing/payment/tax) but the InvoiceExternalIDCreator/Updater only wire invoicing+payment; tax_app_external_id is schema-only here. Keep Create/Update helper field sets in sync with the struct in model.go." + }, + { + "file": "model.go", + "role": "InvoiceExternalIDs and LineExternalIDs value structs with omitempty JSON tags.", + "watch_for": "GetInvoicingOrEmpty is the only nil-safe accessor; InvoiceExternalIDs has no Equal (only Line does)." + } + ], + "anti_patterns": [ + "Persisting empty strings instead of nil \u2014 always route optional IDs through lo.EmptyableToPtr.", + "Using a Creator interface for an update path (loses SetOrClear null-out semantics) or vice versa.", + "Adding a new external ID field to the struct without updating both the mixin Fields() and the generic Create/Update helpers." + ], + "decisions": [ + { + "decision": "External IDs live in generic mixins reused across both invoice and line schemas.", + "rationale": "Multiple Ent entities (invoices, detailed lines) need identical external-app-ID columns; generics over the builder type avoid per-entity boilerplate." + } + ], + "code_examples": [] + }, + "openmeter/billing/models/stddetailedline": { + "purpose": "Domain model + Ent mixin for standard invoice detailed lines (the Base aggregate). Composes the totals, externalid, and creditsapplied value-objects with line metadata (currency, service period, quantity, per-unit amount, category, payment term) and provides generic DB Create/FromDB mapping plus goderive-generated equality.", + "patterns": [ + { + "name": "Composition over the shared value-object mixins", + "description": "Base embeds models.ManagedResource and totals.Totals/externalid.LineExternalIDs/creditsapplied.CreditsApplied; the Ent Mixin() composes ResourceMixin + AnnotationsMixin + totals.Mixin via entutils.RecursiveMixin.", + "example": "type Mixin struct { entutils.RecursiveMixin[mixinBase] }" + }, + { + "name": "Generic Creator/DBGetter mapping interfaces", + "description": "Create[T Creator[T]] writes Base into any Ent builder satisfying Creator (which embeds externalid.LineExternalIDCreator + totals.Setter); FromDB[T DBGetter] reads it back, normalizing all times to UTC.", + "example": "func Create[T Creator[T]](creator Creator[T], line Base) T" + }, + { + "name": "Aggregated Validate collecting errors with errors.Join", + "description": "Base.Validate appends per-field wrapped errors (fmt.Errorf(\"category: %w\", err)) into errs and returns errors.Join; supports functional ValidateOption (IgnoreQuantityChecks).", + "example": "errs = append(errs, fmt.Errorf(\"service period: %w\", err)); return errors.Join(errs...)" + }, + { + "name": "goderive equality, not reflect.DeepEqual", + "description": "Base.Equal delegates to deriveEqualBase in derived.gen.go (regenerated via go:generate goderive); decimal/period fields compared with their Equal methods, not ==.", + "example": "func (l Base) Equal(other Base) bool { return deriveEqualBase(&l, &other) }" + }, + { + "name": "Deprecated tax fields retained on the mixin", + "description": "tax_config/tax_code_id/tax_behavior are .Deprecated(...) because detailed lines now inherit tax from the parent standard line; kept until the rollout migration completes.", + "example": "field.JSON(\"tax_config\", productcatalog.TaxConfig{}).Deprecated(\"detailed lines inherit tax configuration from their parent standard line\")" + }, + { + "name": "UTC normalization at the DB boundary", + "description": "Create and FromDB call .In(time.UTC) on every time.Time (service period, created/updated/deleted); CategoryRegular and InAdvancePaymentTerm are schema defaults.", + "example": "SetServicePeriodStart(line.ServicePeriod.From.In(time.UTC))" + }, + { + "name": "Index-aware Compare ordering", + "description": "Compare[T Comparable] orders by Index (nil sorts last), then CreatedAt, then ID \u2014 used to deterministically sort detailed lines.", + "example": "if a.GetIndex() == nil && b.GetIndex() != nil { return 1 }" + } + ], + "key_file_guides": [ + { + "file": "model.go", + "role": "Base aggregate, Category enum + Values()/Validate, ValidateOption, Clone, Equal, Compare/Comparable.", + "watch_for": "Clone only deep-copies CreditsApplied (rest are value types); Quantity may legitimately be negative-checked unless IgnoreQuantityChecks is passed (UBB persists quantity only at issue time)." + }, + { + "file": "mixin.go", + "role": "Ent schema fields/indexes/checks (currency varchar(3) immutable, numeric decimals, credits_applied JSONB, child_unique_reference_id non-empty check).", + "watch_for": "Editing fields requires make generate then atlas migrate diff. Several tax fields are .Deprecated \u2014 do not reuse them for new tax logic." + }, + { + "file": "mapping.go", + "role": "DBGetter interface and FromDB[T] mapper; embeds externalid.LineExternalIDGetter + totals.TotalsGetter.", + "watch_for": "CreditsApplied comes from a *CreditsApplied pointer via lo.FromPtr; all times normalized to UTC." + }, + { + "file": "create.go", + "role": "Creator[T] interface and Create[T] builder writer.", + "watch_for": "Must stay in sync with mixin Fields() and the Base struct; chains externalid.CreateLineExternalID and billingtotals.Set at the end." + }, + { + "file": "derived.gen.go", + "role": "goderive-generated deriveEqualBase / element equality.", + "watch_for": "Generated \u2014 DO NOT EDIT. Add fields to Base then run go generate; equality omits any field not regenerated." + }, + { + "file": "generate.go", + "role": "go:generate directive invoking goderive.", + "watch_for": "Required for derived.gen.go regeneration." + } + ], + "anti_patterns": [ + "Editing derived.gen.go by hand instead of re-running goderive after changing Base.", + "Reaching for the deprecated tax_config/tax_code_id/tax_behavior fields \u2014 tax is inherited from the parent standard line.", + "Comparing Base or its decimal/period fields with == or reflect.DeepEqual instead of Equal/deriveEqualBase.", + "Returning on the first validation failure instead of collecting into errs and errors.Join.", + "Adding a Base field without updating mixin.go Fields(), create.go Creator, mapping.go DBGetter, and the goderive output together." + ], + "decisions": [ + { + "decision": "Detailed-line persistence is expressed via generic Creator/DBGetter interfaces over Ent builders rather than concrete types.", + "rationale": "Several Ent entities (billingstandardinvoicedetailedline, chargeflatfeerundetailedline, chargeusagebasedrundetailedline) share the same line shape; generics let one Create/FromDB serve all builders." + }, + { + "decision": "Equality is goderive-generated, not reflection-based.", + "rationale": "alpacadecimal and ClosedPeriod need semantic Equal comparison; reflect.DeepEqual would give wrong results on decimals." + } + ], + "code_examples": [ + { + "scenario": "Persist a detailed line into any Ent builder via the generic Create helper", + "code": "import (\n \"github.com/openmeterio/openmeter/openmeter/billing/models/externalid\"\n billingtotals \"github.com/openmeterio/openmeter/openmeter/billing/models/totals\"\n)\n\nfunc Create[T Creator[T]](creator Creator[T], line Base) T {\n create := creator.\n SetName(line.Name).\n SetCurrency(line.Currency).\n SetServicePeriodStart(line.ServicePeriod.From.In(time.UTC)).\n SetServicePeriodEnd(line.ServicePeriod.To.In(time.UTC)).\n SetQuantity(line.Quantity).\n SetPerUnitAmount(line.PerUnitAmount).\n SetCategory(line.Category).\n SetChildUniqueReferenceID(line.ChildUniqueReferenceID)\n create = externalid.CreateLineExternalID(create, line.ExternalIDs)\n create = billingtotals.Set(create, line.Totals)\n return create\n}" + } + ] + }, + "openmeter/billing/models/totals": { + "purpose": "Money value-object aggregating the per-line/invoice monetary breakdown (Amount, ChargesTotal, DiscountsTotal, three tax totals, CreditsTotal, Total) plus an Ent mixin persisting each as a Postgres numeric. Provides decimal-safe arithmetic, validation, rounding, and DB Set/FromDB helpers reused across billing, charges, and rating.", + "patterns": [ + { + "name": "Immutable value-semantics decimal arithmetic", + "description": "Add/Sub/Neg/Sum/RoundToPrecision/CalculateTotal operate field-by-field with alpacadecimal methods and return new Totals (value receivers); never mutate in place.", + "example": "res.Amount = res.Amount.Add(other.Amount)" + }, + { + "name": "Mixin Setter/Getter generic DB contract", + "description": "totals.Mixin declares 8 numeric fields; Set[T Setter[T]] writes them onto any Ent builder and FromDB reads them via TotalsGetter \u2014 the canonical reuse hook for line/invoice schemas.", + "example": "func Set[T Setter[T]](mut Setter[T], totals Totals) T { return mut.SetAmount(totals.Amount)... }" + }, + { + "name": "Sequential non-negative Validate", + "description": "Validate returns the first negative-field error; ValidateTotalNonNegative is a cheaper Total-only check used where intermediate negatives are allowed.", + "example": "if t.Amount.IsNegative() { return errors.New(\"amount is negative\") }" + }, + { + "name": "CalculateTotal as the derived-total formula", + "description": "Total = Amount + ChargesTotal + TaxesExclusiveTotal - DiscountsTotal - CreditsTotal (credits and discounts subtracted); use this rather than re-deriving inline.", + "example": "alpacadecimal.Sum(t.Amount, t.ChargesTotal, t.TaxesExclusiveTotal, t.DiscountsTotal.Neg(), t.CreditsTotal.Neg())" + }, + { + "name": "Currency-aware rounding", + "description": "RoundToPrecision rounds every field through a currencyx.Calculator before persistence/comparison.", + "example": "t.Amount = calc.RoundToPrecision(t.Amount)" + } + ], + "key_file_guides": [ + { + "file": "model.go", + "role": "Totals struct and all arithmetic/validation/rounding methods (Add, Sub, Neg, Sum, IsZero, Equal, RoundToPrecision, CalculateTotal, Validate, ValidateTotalNonNegative).", + "watch_for": "CreditsApplied/credits are pre-tax (CreditsTotal subtracted in CalculateTotal). Equal compares each decimal with .Equal \u2014 never ==. Any new field must be added to all 8-field methods consistently." + }, + { + "file": "mixin.go", + "role": "Ent mixin (8 numeric fields) + Setter/Getter interfaces + Set/FromDB generic helpers.", + "watch_for": "Field list here, the Totals struct, and Set/FromDB must stay in lockstep; all fields are dialect.Postgres numeric." + }, + { + "file": "model_test.go", + "role": "Round-trip rounding, Equal, and ValidateTotalNonNegative tests using USD calculator.", + "watch_for": "Asserts exact rounded strings (e.g. \"10.01\") \u2014 adding fields requires extending these assertions." + } + ], + "anti_patterns": [ + "Adding a Totals field without updating every method (Add/Sub/Neg/IsZero/Equal/RoundToPrecision) plus mixin Fields/Setter/Getter \u2014 silent drift loses the field.", + "Mutating a Totals receiver in place instead of returning a new value.", + "Comparing Totals or its decimal fields with == / reflect.DeepEqual instead of Equal.", + "Treating credits/discounts as additive in Total \u2014 CalculateTotal subtracts them.", + "Persisting or comparing un-rounded decimals; round via currencyx.Calculator first." + ], + "decisions": [ + { + "decision": "Totals is a self-contained value-object with generic Setter/Getter DB hooks.", + "rationale": "Both billing lines/invoices and the charges/rating subsystems persist identical monetary breakdowns; one mixin + generics avoids duplicating 8 numeric columns and arithmetic per entity." + }, + { + "decision": "Credits are modeled pre-tax and subtracted in CalculateTotal.", + "rationale": "Matches the invoice math where credits reduce the taxable base alongside discounts." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w7.json b/.archie/enrichments/w7.json new file mode 100644 index 0000000000..06a0753484 --- /dev/null +++ b/.archie/enrichments/w7.json @@ -0,0 +1,111 @@ +{ + "pkg/framework/entutils": { + "purpose": "Shared Ent ORM glue: schema mixins (ResourceMixin/IDMixin/NamespaceMixin/TimeMixin/AnnotationsMixin/CadencedMixin/CustomerAddressMixin), the cross-client savepoint-based transaction layer (TxDriver, TransactingRepo, TxUser/TxCreator), and Postgres-specific value scanners plus raw-SQL JSONB predicate builders. One of the codebase's biggest dependency magnets (74 in-edges); nearly every domain adapter depends on its mixins and transaction helpers.", + "patterns": [ + { + "name": "Transaction-aware repo bodies via TransactingRepo", + "description": "Adapter methods wrap their body in TransactingRepo/TransactingRepoWithNoValue so they reuse any tx already in ctx (via GetDriverFromContext) and otherwise run on repo.Self(). The adapter must implement TxUser[T] (WithTx/Self) + TxCreator (Tx).", + "example": "return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, rep Repo) error { return rep.doWork(ctx) })" + }, + { + "name": "Savepoint-based nested transactions", + "description": "TxDriver models nesting with Postgres savepoints (txSavepoint.Next/Prev/String -> 's1','s2'). The first SavePoint() is skipped via once.Do; Commit at savepoint level issues Release, at top level issues Commit. Inner rollback only undoes the child scope (transaction_test 'rollback of child scope while keeping contents of parent').", + "example": "t.driver.SavePoint(next.String()); t.currentSavepoint = next" + }, + { + "name": "Mixin composition over per-schema fields", + "description": "Schemas embed ResourceMixin (= IDMixin+NamespaceMixin+MetadataMixin+TimeMixin + name/description) rather than redeclaring id/namespace/timestamps. UniqueResourceMixin adds KeyMixin plus the (namespace,key,deleted_at) unique index for soft-delete-safe keys.", + "example": "func (ResourceMixin) Fields() []ent.Field { fields = append(fields, IDMixin{}.Fields()...); ... }" + }, + { + "name": "Getter/Creator/Setter interfaces per mixin", + "description": "Each mixin ships paired interfaces (IDMixinGetter/Creator, NamespaceMixinGetter/Creator, TimeMixinGetter/Creator/Updater, AnnotationsMixinGetter/Setter) so generic helpers constrain on capability not concrete entity. InIDOrder and MapTimeMixinFromDB are generic over these.", + "example": "func InIDOrder[T InIDOrderAccessor](...) // InIDOrderAccessor = IDMixinGetter + NamespaceMixinGetter" + }, + { + "name": "Namespace-isolated ordering with InIDOrder", + "description": "InIDOrder reorders query results to match a target id slice, keyed by NamespacedID{namespace,id}; cross-namespace ids never match (returns NewGenericNotFoundError), duplicate results error (ErrDuplicateID), extra results are tolerated.", + "example": "out, err := entutils.InIDOrder(namespace, idsInOrder, results)" + }, + { + "name": "Microsecond-truncated timestamps", + "description": "TimeMixin defaults created_at/updated_at to truncatedNow() = clock.Now().Truncate(time.Microsecond) because Postgres has microsecond precision; never bypass clock.Now() or timestamp-comparison tests fail on CI.", + "example": "field.Time(\"created_at\").Default(truncatedNow).Immutable()" + }, + { + "name": "Raw-SQL JSONB predicates with empty-set guard", + "description": "JSONBIn / JSONBKeyExistsInObject build sql.P selectors by hand (->> , -> '?'); JSONBIn short-circuits to WHERE false when values is empty so it never emits invalid `IN ()`. Postgres-only, JSONB-only, string values only.", + "example": "JSONBIn(\"metadata\", \"tier\", []string{\"gold\"}) // metadata->>'tier' IN ($1)" + } + ], + "key_file_guides": [ + { + "file": "transaction.go", + "role": "TxDriver (savepoint state machine), NewTxDriver, TransactingRepo/TransactingRepoWithNoValue, TxUser/TxCreator interfaces, GetDriverFromContext.", + "watch_for": "Commit/Rollback lock mu and short-circuit on prior t.err; once t.err is set the tx is dead. WithTx must rebuild the adapter via db.NewTxClientFromRawConfig(ctx, *tx.GetConfig())." + }, + { + "file": "mixins.go", + "role": "All shared schema mixins + getter/creator/setter interfaces, truncatedNow, MapTimeMixinFromDB, CustomerAddressMixin (prefixed PII address fields for invoice snapshots).", + "watch_for": "id is char(26) ULID; namespace/key are NotEmpty+Immutable; AnnotationsMixin adds a GIN index. Changing field shapes here forces an Atlas migration across many tables." + }, + { + "file": "idorder.go", + "role": "InIDOrder generic reorder/validate helper with ErrNamespaceRequired/ErrIDRequired/ErrDuplicateID/ErrNotFound.", + "watch_for": "Groups by NamespacedID, so namespace mismatch silently becomes not-found (security boundary); missing ids aggregate into a NewGenericNotFoundError." + }, + { + "file": "mixinhelper.go", + "role": "RecursiveMixin[T] for mixins that embed sub-mixins (MixinWithAdditionalMixins.Mixin()); concatenates Fields/Indexes/Edges/Hooks/Interceptors/Annotations.", + "watch_for": "Policy() only evaluates the base mixin (TODO), not nested mixins." + }, + { + "file": "valuescanner.go", + "role": "JSONStringValueScanner[T] \u2014 generic field.ValueScannerFunc storing T as JSON text in a NullString column.", + "watch_for": "Returns zero T on null/invalid; unmarshal errors propagate, so malformed stored JSON fails reads." + }, + { + "file": "pgjsonb.go", + "role": "JSONBIn and JSONBKeyExistsInObject raw-SQL selector builders.", + "watch_for": "Postgres+JSONB only; ->> coerces to string so non-string equality is unsupported; comment warns these may break with joins \u2014 unit-test them." + }, + { + "file": "pgulid.go", + "role": "ULID Valuer/Scanner storing string ULIDs (not binary) so Postgres treats them as UTF-8; Ptr/Wrap/ULIDPointer helpers.", + "watch_for": "Use this wrapper, not raw ulid.ULID, when a column should hold the textual ULID." + }, + { + "file": "mapping.go / sort.go", + "role": "MapPaged/MapPagedWithErr translate pagination.Result[I]->[O]; GetOrdering maps sortx.Order to []sql.OrderTermOption.", + "watch_for": "GetOrdering falls back to empty (no ordering) for unrecognized order strings rather than erroring." + } + ], + "anti_patterns": [ + "Hand-rolling SetID/SetNamespace/created_at/timestamps on a schema instead of embedding ResourceMixin/IDMixin/NamespaceMixin/TimeMixin.", + "Accepting a raw *entdb.Client in an adapter helper and querying it directly instead of going through TransactingRepo, bypassing the in-context transaction.", + "Relying on Ent's native client.Tx + onCommit/onRollback hooks for shared transactions \u2014 this layer uses HijackTx/savepoints and ignores those hooks.", + "Building JSONB predicates with fmt.Sprintf-interpolated values instead of JSONBIn's parameterized b.Args, or emitting `IN ()` for empty value sets.", + "Using time.Now() in schema defaults or test setup instead of clock.Now()/truncatedNow, breaking microsecond-precision timestamp comparisons on CI." + ], + "decisions": [ + { + "decision": "Cross-client transactions via a hand-written TxDriver + RawEntConfig + HijackTx rather than Ent's per-client Tx.", + "rationale": "Multiple generated Ent clients (db1/db2) must share one underlying transaction; HijackTx exposes the raw config so NewTxClientFromRawConfig can rehydrate any client onto the same tx, with savepoints providing nestable rollback scopes." + }, + { + "decision": "Store ULIDs as char(26) text and truncate timestamps to microseconds.", + "rationale": "Postgres interprets binary ULIDs as UTF-8 and has microsecond time precision; truncating in Go keeps in-memory results consistent with what Postgres round-trips so tests pass on both macOS and CI." + }, + { + "decision": "Soft-delete uniqueness approximated by a (namespace,key,deleted_at) unique index in UniqueResourceMixin.", + "rationale": "Ent cannot emit partial `WHERE deleted_at IS NULL` indexes without manual migrations, so deleted_at is folded into the unique key; documented caveat: two same-key deletes in the same microsecond collide." + } + ], + "code_examples": [ + { + "scenario": "A transaction-aware adapter participating in shared transactions", + "code": "func (a *adapter) Self() Repo { return a }\n\nfunc (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) Repo {\n\ttxClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig())\n\treturn &adapter{db: txClient.Client()}\n}\n\nfunc (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error) {\n\ttxCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false})\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to hijack transaction: %w\", err)\n\t}\n\treturn txCtx, entutils.NewTxDriver(eDriver, rawConfig), nil\n}\n\nfunc (a *adapter) Save(ctx context.Context, in *Thing) (*Thing, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep Repo) (*Thing, error) {\n\t\treturn rep.persist(ctx, in)\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w70.json b/.archie/enrichments/w70.json new file mode 100644 index 0000000000..c545da6df4 --- /dev/null +++ b/.archie/enrichments/w70.json @@ -0,0 +1,236 @@ +{ + "openmeter/billing/rating/service/rate": { + "purpose": "The pricing engine's per-price-type strategy layer: each price model (Flat, Unit, Package, Dynamic, VolumeTiered, GraduatedTiered) is a Pricer that turns a billed line + usage into rating.DetailedLines. Constraint: all monetary math goes through alpacadecimal + currencyx.Calculator.RoundToPrecision, never float arithmetic.", + "patterns": [ + { + "name": "Pricer interface contract", + "description": "Every price-type struct implements rate.Pricer (GenerateDetailedLines + ResolveBillablePeriod) and asserts it with a compile-time check.", + "example": "type Flat struct{}; var _ Pricer = (*Flat)(nil)" + }, + { + "name": "Embed a billable-period mixin", + "description": "Metered pricers embed ProgressiveBillingMeteredPricer; non-progressive ones embed NonProgressiveBillingPricer (from base.go) to inherit ResolveBillablePeriod instead of re-implementing it. Flat overrides it inline.", + "example": "type Dynamic struct { ProgressiveBillingMeteredPricer }" + }, + { + "name": "Convert price via As* before use", + "description": "Always extract the concrete price with l.GetPrice().AsFlat()/AsUnit()/AsTiered()/AsDynamic()/AsPackage() and wrap the error with fmt.Errorf; never type-assert the price union directly.", + "example": "flatPrice, err := l.GetPrice().AsFlat(); if err != nil { return nil, fmt.Errorf(\"converting price to flat price: %w\", err) }" + }, + { + "name": "Stable ChildUniqueReferenceID per line", + "description": "Every emitted DetailedLine sets a ChildUniqueReferenceID from rating constants (UsageChildUniqueReferenceID, FlatPriceChildUniqueReferenceID, GraduatedTieredPriceUsageChildUniqueReferenceID fmt'd with tier index) so re-calculation is idempotent and lines can be matched across runs.", + "example": "ChildUniqueReferenceID: fmt.Sprintf(rating.GraduatedTieredPriceUsageChildUniqueReferenceID, tierIndex)" + }, + { + "name": "Period position gates emission", + "description": "Use l.IsFirstInPeriod()/IsLastInPeriod() (from PricerCalculateInput in types.go) to decide whether to emit: in-advance flat bills only first-in-period, in-arrears only last; volume tiered returns nil unless IsLastInPeriod (no progressive support).", + "example": "case flatPrice.PaymentTerm == productcatalog.InArrearsPaymentTerm && l.IsLastInPeriod():" + }, + { + "name": "Truncate to streaming minimum window", + "description": "All period/asOf comparisons in ResolveBillablePeriod truncate to streaming.MinimumWindowSizeDuration so partial-window usage isn't billed prematurely.", + "example": "asOf := in.AsOf.Truncate(streaming.MinimumWindowSizeDuration)" + }, + { + "name": "Return nil for no-line outcome", + "description": "When nothing should be billed (no usage, wrong period position) return (nil, nil) rather than an empty slice; tests treat nil and empty DetailedLines as equivalent.", + "example": "if !toBeBilledPackages.IsZero() { return rating.DetailedLines{...}, nil }; return nil, nil" + } + ], + "key_file_guides": [ + { + "file": "types.go", + "role": "Defines Pricer interface, PricerCalculateInput (embeds rating.StandardLineAccessor + CurrencyCalculator + Usage + FullProgressivelyBilledServicePeriod) and its IsFirst/IsLastInPeriod/GetUsage helpers.", + "watch_for": "GetUsage errors if Usage is nil \u2014 callers must ensure usage is populated before calling pricers." + }, + { + "file": "base.go", + "role": "ProgressiveBillingMeteredPricer and NonProgressiveBillingPricer ResolveBillablePeriod implementations shared by embedding.", + "watch_for": "NonProgressiveBillingPricer rejects lines with a SplitLineGroupID via ErrInvoiceProgressiveBillingNotSupported \u2014 splitting a non-progressive price is invalid." + }, + { + "file": "tiered.go", + "role": "Tiered is a router that dispatches to volume vs graduated based on price.Mode; not a pricer itself beyond delegation.", + "watch_for": "Unknown price.Mode returns an error \u2014 keep the switch exhaustive when adding tier modes." + }, + { + "file": "tieredgraduated.go", + "role": "GraduatedTiered plus the TieredPriceCalculator range-splitting algorithm (TierRange, splitTierRangeAtBoundary) used to bill usage across tier boundaries.", + "watch_for": "The algorithm builds non-overlapping sorted qtyRanges; FromQty is exclusive, ToQty inclusive. Flat-per-tier only billed AtTierBoundary." + }, + { + "file": "tieredvolume.go", + "role": "VolumeTiered prices the whole quantity at the single tier it lands in; embeds NonProgressiveBillingPricer.", + "watch_for": "Returns nil unless IsLastInPeriod \u2014 volume tiers have no progressive-billing support." + }, + { + "file": "flat.go", + "role": "Flat price; the only pricer that overrides ResolveBillablePeriod inline using GetInvoiceAt vs AsOf.", + "watch_for": "Defaults empty PaymentTerm to DefaultPaymentTerm and validates it is InAdvance/InArrears, else ValidationError." + }, + { + "file": "package.go", + "role": "Package pricing; GetNumberOfPackages ceils qty/packageSize and diffs pre vs post-line package counts to bill only newly-crossed packages.", + "watch_for": "preLinePeriodPackages is zeroed when IsFirstInPeriod so the first line bills all packages." + }, + { + "file": "dynamic.go", + "role": "Dynamic price multiplies usage.Quantity by Multiplier; single usage line in arrears.", + "watch_for": "Only emits when usage.Quantity.IsPositive(); min-spend handling lives in the mutator layer, not here." + } + ], + "anti_patterns": [ + "Doing float64 or raw decimal arithmetic instead of routing through l.CurrencyCalculator.RoundToPrecision.", + "Type-asserting the price union directly instead of using GetPrice().As*() with a wrapped error.", + "Hardcoding ChildUniqueReferenceID strings instead of using rating package constants \u2014 breaks line re-matching/idempotency.", + "Applying commitments, max-spend, discounts or credits here \u2014 those belong to the mutator layer; pricers only produce raw priced lines.", + "Emitting lines without checking IsFirst/IsLastInPeriod, double-billing flat fees across split lines." + ], + "decisions": [ + { + "decision": "Period-resolution split into Progressive vs NonProgressive mixins embedded by each pricer.", + "rationale": "Billable-period semantics differ only by progressive-billing support, so shared behavior is composed via embedding rather than duplicated per price type." + }, + { + "decision": "Graduated tiering implemented as an explicit range-splitting algorithm with AtTierBoundary flags.", + "rationale": "Progressive (split) billing must bill flat-per-tier exactly once and unit prices only for the in-scope sub-range; the explicit ranges make this auditable even though it is not the most efficient algorithm (see code comment)." + } + ], + "code_examples": [ + { + "scenario": "Add a new price-type pricer", + "code": "package rate\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n)\n\ntype Unit struct{ ProgressiveBillingMeteredPricer }\n\nvar _ Pricer = (*Unit)(nil)\n\nfunc (p Unit) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error) {\n\tunitPrice, err := l.GetPrice().AsUnit()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"converting price to unit price: %w\", err)\n\t}\n\tusage, err := l.GetUsage()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif usage.Quantity.IsPositive() {\n\t\treturn rating.DetailedLines{{\n\t\t\tName: fmt.Sprintf(\"%s: usage in period\", l.GetName()),\n\t\t\tQuantity: usage.Quantity,\n\t\t\tPerUnitAmount: unitPrice.Amount,\n\t\t\tChildUniqueReferenceID: rating.UnitPriceUsageChildUniqueReferenceID,\n\t\t\tPaymentTerm: productcatalog.InArrearsPaymentTerm,\n\t\t}}, nil\n\t}\n\treturn nil, nil\n}" + } + ] + }, + "openmeter/billing/rating/service/mutator": { + "purpose": "Post- and pre-calculation mutators that adjust priced rating.DetailedLines for commitments (min/max spend), percentage/usage discounts, and credit application. Constraint: PostCalculationMutators must be idempotent over re-runs; the usage discount PreCalculationMutator explicitly cannot be (it mutates the usage-based line directly).", + "patterns": [ + { + "name": "Two mutator interfaces", + "description": "types.go defines PostCalculationMutator (Mutate(input, lines) -> lines) and PreCalculationMutator (Mutate(input) -> input). Each concrete mutator is an empty struct with a compile-time interface assertion.", + "example": "type MinAmountCommitment struct{}; var _ PostCalculationMutator = (*MinAmountCommitment)(nil)" + }, + { + "name": "Append to line discount/credit slices, don't overwrite", + "description": "Mutators append to l.AmountDiscounts / pricerResult[idx].CreditsApplied / StandardLineDiscounts.Usage with a stable ChildUniqueReferenceID, so re-running merges rather than duplicates.", + "example": "l.AmountDiscounts = append(l.AmountDiscounts, lineDiscount)" + }, + { + "name": "Commitment lines use FullProgressivelyBilledServicePeriod", + "description": "Min-spend is only emitted IsLastInPeriod and billed across the whole period: when IsProgressivelyBilled, the emitted line's Period is i.FullProgressivelyBilledServicePeriod, not the split period.", + "example": "period := i.GetServicePeriod(); if i.IsProgressivelyBilled() { period = i.FullProgressivelyBilledServicePeriod }" + }, + { + "name": "Credit allocation must fully consume", + "description": "Credits.Mutate walks positive-total lines applying credit; leftover positive credit returns billing.ErrInvoiceLineCreditsNotConsumedFully (over-allocation is a critical invariant violation).", + "example": "if creditValueRemaining.IsPositive() { return pricerResult, billing.ErrInvoiceLineCreditsNotConsumedFully }" + }, + { + "name": "Reason carries discount provenance", + "description": "Discount line items set Reason via billing.NewDiscountReasonFrom(...) and a rating.RateCardDiscountChildUniqueReferenceID keyed by CorrelationID; usage discounts are removed/re-added via removeRateCardUsageDiscounts to stay in sync.", + "example": "Reason: billing.NewDiscountReasonFrom(discount.PercentageDiscount)" + }, + { + "name": "Round every monetary mutation", + "description": "All amount adjustments pass through i.CurrencyCalculator.RoundToPrecision before being stored on a line.", + "example": "minimumSpendAmount := i.CurrencyCalculator.RoundToPrecision(commitments.MinimumAmount.Sub(totalBilledAmount))" + } + ], + "key_file_guides": [ + { + "file": "types.go", + "role": "The PostCalculationMutator and PreCalculationMutator interfaces both keyed off rate.PricerCalculateInput.", + "watch_for": "New mutators must pick the right interface \u2014 pre runs on input usage, post runs on already-priced lines." + }, + { + "file": "commitments.go", + "role": "MinAmountCommitment (emits a min-spend line when total < minimum, last-in-period only) and MaxAmountCommitment (adds overage discounts via AddDiscountForOverage across lines).", + "watch_for": "Min-spend is in-arrears, last-in-period only; max-spend accumulates totalBilled including previouslyBilledAmount across all lines in order." + }, + { + "file": "credits.go", + "role": "Credits PostCalculationMutator distributes each applied credit across positive-total lines, cloning with the consumed amount.", + "watch_for": "Skips non-positive total lines; under-consumption returns ErrInvoiceLineCreditsNotConsumedFully. TODO marks this for deprecation once charge line mappers own credit projection." + }, + { + "file": "discountpercentage.go", + "role": "DiscountPercentage applies a rate-card percentage to each line's TotalAmount; requires a non-empty CorrelationID.", + "watch_for": "Validates percentage in [0,100]; empty CorrelationID errors. Uses slicesx.MapWithErr." + }, + { + "file": "discountusage.go", + "role": "DiscountUsage PreCalculationMutator + exported ApplyUsageDiscount (shared by standard billing and charge line projection) that subtracts discounted quantity from usage and records UsageLineDiscountManaged.", + "watch_for": "Explicitly non-idempotent \u2014 it mutates the usage-based line; removeRateCardUsageDiscounts must clear prior rate-card usage discounts each run to avoid drift." + } + ], + "anti_patterns": [ + "Making the usage-discount mutator stateful/assuming idempotency \u2014 it rewrites the usage line and must re-sync discounts every run.", + "Computing discounts/credits with float math instead of CurrencyCalculator.RoundToPrecision.", + "Emitting a min-spend line on a non-last split line, or for the split period instead of FullProgressivelyBilledServicePeriod.", + "Silently dropping leftover credit instead of returning ErrInvoiceLineCreditsNotConsumedFully.", + "Overwriting AmountDiscounts/CreditsApplied/StandardLineDiscounts slices instead of appending with a stable ChildUniqueReferenceID." + ], + "decisions": [ + { + "decision": "Pre vs Post calculation mutator split.", + "rationale": "Usage discounts must alter the quantity fed into pricers (pre), while commitments, percentage discounts and credits act on already-priced detailed lines (post)." + }, + { + "decision": "ApplyUsageDiscount exported as a standalone function with explicit input/result structs.", + "rationale": "The usage-discount contract is shared between standard billing and charge line projection, so it lives outside the mutator method to be reused without the PricerCalculateInput wrapper." + } + ], + "code_examples": [ + { + "scenario": "Implement a post-calculation commitment mutator", + "code": "package mutator\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/alpacahq/alpacadecimal\"\n\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/stddetailedline\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating/service/rate\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n)\n\ntype MinAmountCommitment struct{}\n\nvar _ PostCalculationMutator = (*MinAmountCommitment)(nil)\n\nfunc (m *MinAmountCommitment) Mutate(i rate.PricerCalculateInput, pricerResult rating.DetailedLines) (rating.DetailedLines, error) {\n\tc := i.GetPrice().GetCommitments()\n\tif c.MinimumAmount == nil || !i.IsLastInPeriod() {\n\t\treturn pricerResult, nil\n\t}\n\tprev, err := i.GetPreviouslyBilledAmount()\n\tif err != nil {\n\t\treturn pricerResult, err\n\t}\n\ttotal := pricerResult.Sum(i.CurrencyCalculator).Add(prev)\n\tif total.LessThan(*c.MinimumAmount) {\n\t\tperiod := i.GetServicePeriod()\n\t\tif i.IsProgressivelyBilled() {\n\t\t\tperiod = i.FullProgressivelyBilledServicePeriod\n\t\t}\n\t\tpricerResult = append(pricerResult, rating.DetailedLine{\n\t\t\tName: fmt.Sprintf(\"%s: minimum spend\", i.GetName()),\n\t\t\tQuantity: alpacadecimal.NewFromFloat(1),\n\t\t\tPerUnitAmount: i.CurrencyCalculator.RoundToPrecision(c.MinimumAmount.Sub(total)),\n\t\t\tChildUniqueReferenceID: rating.MinSpendChildUniqueReferenceID,\n\t\t\tPaymentTerm: productcatalog.InArrearsPaymentTerm,\n\t\t\tCategory: stddetailedline.CategoryCommitment,\n\t\t\tPeriod: &period,\n\t\t})\n\t}\n\treturn pricerResult, nil\n}" + } + ] + }, + "openmeter/billing/rating/service/testutil": { + "purpose": "Shared table-driven test harness for the rating pricers and mutators. Constraint: tests assert through the real production path (service.New().GenerateDetailedLines) against a hand-built billing.StandardLine fixture, comparing expected vs actual via require.JSONEq.", + "patterns": [ + { + "name": "CalculationTestCase + RunCalculationTestCase", + "description": "Every rate/mutator test builds a CalculationTestCase (Price, Discounts, LineMode, Usage, Expect, ExpectErrorIs, PreviousBilledAmount, CreditsApplied, Options) and calls testutil.RunCalculationTestCase(t, tc).", + "example": "testutil.RunCalculationTestCase(t, testutil.CalculationTestCase{ Price: ..., LineMode: testutil.SinglePerPeriodLineMode, Usage: ..., Expect: rating.DetailedLines{...} })" + }, + { + "name": "LineMode selects split scenario", + "description": "TestLineMode (SinglePerPeriodLineMode / MidPeriodSplitLineMode / LastInPeriodSplitLineMode) configures line.Period and, for split modes, attaches a fake SplitLineGroup + SplitLineHierarchy so first/last-in-period logic is exercised.", + "example": "LineMode: testutil.LastInPeriodSplitLineMode" + }, + { + "name": "Usage set via both raw and metered fields", + "description": "Usage.LinePeriodQty/PreLinePeriodQty are assigned to both Quantity/MeteredQuantity and PreLinePeriodQuantity/MeteredPreLinePeriodQuantity on UsageBased to mirror real snapshots.", + "example": "line.UsageBased.Quantity = &tc.Usage.LinePeriodQty; line.UsageBased.MeteredQuantity = &tc.Usage.LinePeriodQty" + }, + { + "name": "JSON equality assertion", + "description": "Expected and actual DetailedLines are marshaled and compared with require.JSONEq; empty/nil results short-circuit to pass. PreviousBilledAmount is injected via a fake prior line in the SplitLineHierarchy.", + "example": "require.JSONEq(t, string(expectJSON), string(resJSON))" + } + ], + "key_file_guides": [ + { + "file": "ubptest.go", + "role": "Sole file: TestLineMode constants, TestFullPeriod (fixed 2021-01-01..02), FeatureUsageResponse, CalculationTestCase, and RunCalculationTestCase harness driving service.New().GenerateDetailedLines.", + "watch_for": "PreviousBilledAmount is modeled as a fake line in fakeHierarchy with no Period so it is always in scope for NetAmount; ExpectErrorIs uses require.ErrorIs and returns early." + } + ], + "anti_patterns": [ + "Calling individual pricers/mutators directly in tests instead of going through RunCalculationTestCase / service.New() \u2014 bypasses the real engine ordering.", + "Asserting on struct equality of decimals instead of relying on the JSONEq comparison the harness performs.", + "Setting only Quantity without MeteredQuantity (or only the non-metered field) \u2014 both must be set to match production snapshots." + ], + "decisions": [ + { + "decision": "Drive every pricer/mutator test through the assembled production service rather than unit-isolating each strategy.", + "rationale": "Pricing correctness depends on engine ordering (pricer then mutators) and split/period state, so the harness exercises the full GenerateDetailedLines path with a realistic StandardLine fixture." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w71.json b/.archie/enrichments/w71.json new file mode 100644 index 0000000000..f2ac0ba39d --- /dev/null +++ b/.archie/enrichments/w71.json @@ -0,0 +1,111 @@ +{ + "openmeter/billing/service/invoicecalc": { + "purpose": "Pure, stateless calculation pipeline for billing invoices. Each calculation is a free function that mutates a *billing.StandardInvoice or *billing.GatheringInvoice in place; the Calculator interface runs ordered lists of them to derive collection/draft/due dates, recalculate detailed lines and totals, stamp tax codes, and resolve service periods.", + "patterns": [ + { + "name": "Calculations are free functions, registered in an ordered list", + "description": "Every calculation is a package-level func that takes an invoice pointer (and optionally a deps struct) and returns error. New calculations must be added to the appropriate slice in the InvoiceCalculations var (Invoice, GatheringInvoice, or GatheringInvoiceWithLiveData) \u2014 order matters because later steps depend on earlier results (e.g. CalculateDueAt reads DraftUntil set by CalculateDraftUntil).", + "example": "func CalculateDueAt(i *billing.StandardInvoice) error { ... } registered via WithNoDependencies(CalculateDueAt) in InvoiceCalculations.Invoice" + }, + { + "name": "Dependency adapter wrappers", + "description": "Calculations that need no deps are wrapped with WithNoDependencies (standard) or WithNoGatheringDependencies (gathering) to adapt a func(inv) error into the StandardInvoiceCalculation / GatheringInvoiceCalculation signature. Calculations needing rating/tax/line-engine data take StandardInvoiceCalculatorDependencies directly.", + "example": "WithNoDependencies(CalculateDraftUntil)" + }, + { + "name": "In-place mutation, never construct new invoices", + "description": "Calculations mutate the passed invoice pointer's fields (i.CollectionAt, i.DueAt, invoice.Totals, invoice.Period, line.TaxConfig) rather than returning a new value. Lines are read via invoice.Lines.OrEmpty()/IsPresent()/IsAbsent() and must be expanded \u2014 most calculations return errors.New(\"lines must be expanded\") when they are not.", + "example": "i.CollectionAt = lo.ToPtr(collectionAt)" + }, + { + "name": "Errors are joined, not short-circuited; merged into ValidationIssues", + "description": "calculator.applyCalculations runs ALL standard calculations and errors.Join-s their errors, then folds the joined error into the invoice via invoice.MergeValidationIssues(billing.ValidationWithComponent(billing.ValidationComponentOpenMeter, outErr), ...). Gathering invoices have no ValidationIssues so CalculateGatheringInvoice just returns errors.Join(errs...).", + "example": "return invoice.MergeValidationIssues(billing.ValidationWithComponent(billing.ValidationComponentOpenMeter, outErr), billing.ValidationComponentOpenMeter)" + }, + { + "name": "Deleted lines are always skipped", + "description": "Every line-iterating calculation filters out lines where DeletedAt != nil (or line.IsDeleted()) before contributing to collection-at, totals, or period. Deleted lines contribute totals.Totals{} to the sum.", + "example": "if line.DeletedAt != nil { return totals.Totals{} }" + }, + { + "name": "Line-engine delegation for detailed-line recalculation", + "description": "RecalculateDetailedLinesAndTotals groups lines by line.Engine, resolves each via deps.LineEngines.Get(type), and only recalculates engines that implement billing.LineCalculator (type-assert, skip otherwise). It validates CalculateLinesInput, the output, and billing.ValidateStandardLineIDsMatchExactly before invoice.Lines.ReplaceLinesByID, then re-sums totals.", + "example": "lineCalculator, ok := lineEngine.(billing.LineCalculator); if !ok { continue }" + }, + { + "name": "Tax codes pre-resolved into a map, never queried here", + "description": "TaxCodes is a map[string]taxcode.TaxCode keyed by Stripe code, built by the caller before the calculator runs so SnapshotTaxConfigIntoLines stamps TaxCodeID + entity in one pass without DB access. The package does no I/O.", + "example": "tc, ok := deps.TaxCodes.Get(line.TaxConfig.Stripe.Code)" + } + ], + "key_file_guides": [ + { + "file": "calculator.go", + "role": "Defines the Calculator interface, the StandardInvoiceCalculation/GatheringInvoiceCalculation func types, the InvoiceCalculations registry of ordered pipelines, the deps structs, LineEngineResolver, TaxCodes map, and the WithNoDependencies/WithNoGatheringDependencies adapters. New(): Calculator returns the real impl.", + "watch_for": "Adding a calculation requires registering it in the correct InvoiceCalculations slice and in the right order; GatheringInvoiceWithLiveData runs against a *StandardInvoice but must be a gathering-status invoice (guarded by a status check)." + }, + { + "file": "collectionat.go", + "role": "GatheringInvoiceCollectionAt (earliest InvoiceAt, anchored vs subscription alignment via timeutil recurrence) and StandardInvoiceCollectionAt (latest InvoiceAt of non-deleted metered lines + collection interval, honoring per-line OverrideCollectionPeriodEnd).", + "watch_for": "StandardInvoiceCollectionAt only considers lines where line.DependsOnMeteredQuantity() \u2014 flat-fee lines are ignored. Returns nil CollectionAt when no metered lines." + }, + { + "file": "details.go", + "role": "RecalculateDetailedLinesAndTotals (line-engine delegation + totals.Sum), newDetailedLines (maps rating.DetailedLine -> billing.DetailedLine, defaulting Category to stddetailedline.CategoryRegular and PaymentTerm to InArrears), and MergeGeneratedDetailedLines (persists rating.GenerateDetailedLinesResult onto a parent line with ID reuse).", + "watch_for": "Each generated/mapped detailed line is Validate()-d; ReplaceLinesByID requires IDs to match exactly (ValidateStandardLineIDsMatchExactly). MergeGeneratedDetailedLines assigns sequential Index via DetailedLinesWithIDReuse." + }, + { + "file": "taxconfig.go", + "role": "SnapshotTaxConfigIntoLines merges invoice DefaultTaxConfig into each line (billing.MergeTaxConfigs(billing.FromProductCatalog(...), line.TaxConfig)) and stamps resolved TaxCodeID + TaxCode entity from deps.TaxCodes.", + "watch_for": "No-op for gathering invoices (StandardInvoiceStatusGathering). Line stripe code wins over DefaultTaxConfig. Existing TaxCodeID is preserved; only TaxCode entity is always (re)stamped. billing.TaxConfig.Equal is ID-only for TaxCode but DOES detect nil-vs-stamped so the adapter re-upserts." + }, + { + "file": "draftuntil.go", + "role": "CalculateDraftUntil \u2014 DraftUntil = max(CollectionAt, CreatedAt) + DraftPeriod, only when Invoicing.AutoAdvance is true (else nil).", + "watch_for": "Nils DraftUntil when AutoAdvance is off; CalculateDueAt depends on DraftUntil so ordering matters." + }, + { + "file": "dueat.go", + "role": "CalculateDueAt \u2014 auto-advance path adds DueAfter to DraftUntil; manual path adds DueAfter to IssuedAt. Result truncated to seconds (Stripe precision).", + "watch_for": "Returns early (leaves DueAt unset) when DraftUntil is nil (auto) or IssuedAt is nil (manual)." + }, + { + "file": "period.go", + "role": "CalculateStandardInvoiceServicePeriod / CalculateGatheringInvoiceServicePeriod \u2014 span min From / max To across non-deleted lines (StandardLine uses line.Period, GatheringLine uses line.ServicePeriod).", + "watch_for": "Standard sets invoice.Period to a *ClosedPeriod (nil when no lines); gathering sets invoice.ServicePeriod to a value ClosedPeriod." + }, + { + "file": "mock.go", + "role": "MockableInvoiceCalculator wraps an upstream Calculator; EnableMock/DisableMock inject errors via OnCalculate/OnCalculateGatheringInvoice(WithLiveData). Used in tests to simulate calculation failures merged as ValidationIssues.", + "watch_for": "Mock replays the same MergeValidationIssues wrapping as the real Calculate so injected errors surface as ValidationComponentOpenMeter issues; AssertExpectations fails if a set expectation was never called." + } + ], + "anti_patterns": [ + "Performing DB / network I/O inside a calculation \u2014 all data (rating, tax codes, line engines) must arrive via the deps struct; the package is pure and stateless.", + "Returning early on the first error in the standard pipeline \u2014 applyCalculations joins all errors and folds them into the invoice's ValidationIssues; do not short-circuit.", + "Including deleted lines (DeletedAt != nil) in collection-at, totals, or period computations.", + "Adding a calculation without registering it in the correct InvoiceCalculations slice, or registering in an order that breaks a downstream dependency (e.g. DueAt before DraftUntil).", + "Constructing a new invoice/line instead of mutating the passed pointer, or reading lines without checking IsPresent()/IsAbsent() (operating on unexpanded lines)." + ], + "decisions": [ + { + "decision": "Calculations are independent free functions registered in ordered slices rather than methods on a stateful service.", + "rationale": "Keeps each step unit-testable in isolation (see collectionat_test.go, taxconfig_test.go) and makes the full pipeline composition explicit and reorderable in calculator.go." + }, + { + "decision": "Tax codes and feature meters are pre-resolved into maps passed via StandardInvoiceCalculatorDependencies.", + "rationale": "Lets the calculator stay pure/side-effect-free and stamp all lines in a single in-memory pass without per-line DB lookups; the caller batches resolution upfront." + }, + { + "decision": "Three distinct pipelines (Invoice, GatheringInvoice, GatheringInvoiceWithLiveData) instead of one.", + "rationale": "Gathering invoices have no ValidationIssues and a different line model (GatheringLine), while live-data gathering reuses standard-invoice calculations to populate detailed line previews \u2014 each needs a tailored ordered set." + } + ], + "code_examples": [ + { + "scenario": "Adding a new standard-invoice calculation that mutates the invoice and registering it in the pipeline", + "code": "package invoicecalc\n\nimport (\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n)\n\n// CalculateDraftUntil mutates the invoice in place and returns an error only on real failure.\nfunc CalculateDraftUntil(i *billing.StandardInvoice) error {\n\tif !i.Workflow.Config.Invoicing.AutoAdvance {\n\t\ti.DraftUntil = nil\n\t\treturn nil\n\t}\n\tcollectionAt := lo.Latest(lo.FromPtrOr(i.CollectionAt, i.CreatedAt), i.CreatedAt)\n\tdraftUntil, _ := i.Workflow.Config.Invoicing.DraftPeriod.AddTo(collectionAt)\n\ti.DraftUntil = &draftUntil\n\treturn nil\n}\n\n// Register in calculator.go (order matters: runs before CalculateDueAt which reads DraftUntil):\n// InvoiceCalculations.Invoice = []StandardInvoiceCalculation{ ..., WithNoDependencies(CalculateDraftUntil), WithNoDependencies(CalculateDueAt), ... }" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w72.json b/.archie/enrichments/w72.json new file mode 100644 index 0000000000..abf879b93e --- /dev/null +++ b/.archie/enrichments/w72.json @@ -0,0 +1,107 @@ +{ + "openmeter/billing/validators/customer": { + "purpose": "Cross-domain guard that hooks into the customer domain's request-validation pipeline to block deletion of a customer while any of its invoices are still gathering or non-final. Implements customer.RequestValidator by embedding customer.NoopRequestValidator and overriding only ValidateDeleteCustomer.", + "patterns": [ + { + "name": "RequestValidator via Noop embedding", + "description": "Validator embeds customer.NoopRequestValidator and overrides only the hooks it cares about; a compile-time assertion enforces interface conformance.", + "example": "var _ customer.RequestValidator = (*Validator)(nil); type Validator struct { customer.NoopRequestValidator; ... }" + }, + { + "name": "Constructor nil-checks injected services", + "description": "NewValidator returns (*Validator, error) and fails fast with fmt.Errorf when billingService or syncService is nil instead of panicking.", + "example": "if billingService == nil { return nil, fmt.Errorf(\"billing service is required\") }" + }, + { + "name": "Sync-then-check invoice state", + "description": "Before listing invoices, recently-active subscriptions are force-synced via syncService.SyncByID so gathering invoices reflect current target state; only then are invoice states asserted.", + "example": "v.syncService.SyncByID(ctx, sub.NamespacedID, time.Now())" + }, + { + "name": "Aggregate validation errors with errors.Join", + "description": "Each blocking invoice appends to errs []error; the method returns errors.Join(errs...) rather than returning on the first offending invoice.", + "example": "errs = append(errs, fmt.Errorf(\"invoice %s is not in final state...\", stdInvoice.ID)); return errors.Join(errs...)" + }, + { + "name": "Invoice type discrimination via As* accessors", + "description": "Use inv.Type() against billing.InvoiceTypeGathering and the AsGatheringInvoice/AsStandardInvoice accessors rather than reading struct fields directly; gathering invoices with DeletedAt set are skipped.", + "example": "if inv.Type() == billing.InvoiceTypeGathering { g, _ := inv.AsGatheringInvoice() } else { s, _ := inv.AsStandardInvoice() }" + } + ], + "key_file_guides": [ + { + "file": "customer.go", + "role": "Sole file: defines Validator, NewValidator, and ValidateDeleteCustomer enforcing the all-invoices-final precondition for customer deletion.", + "watch_for": "The 24h watermark (time.Now().Add(-24*time.Hour)) gates which subscriptions get re-synced \u2014 subs that are inactive, deleted, or whose ActiveTo is older than the watermark are still synced via the ActiveTo==nil/DeletedAt!=nil/Before checks; changing this logic affects deletion correctness. Deleted gathering invoices (DeletedAt!=nil) are intentionally skipped, not blocking." + } + ], + "anti_patterns": [ + "Returning early on the first non-final invoice instead of collecting all into errs and returning errors.Join \u2014 callers expect the full list of blockers.", + "Skipping the subscriptionsync step before listing invoices \u2014 without it gathering invoices may be stale and deletion validation gives wrong results.", + "Reading invoice fields directly instead of going through inv.Type()/AsGatheringInvoice/AsStandardInvoice.", + "Constructing Validator literally instead of via NewValidator, bypassing the nil dependency guards." + ], + "decisions": [ + { + "decision": "Live in the billing module but implement a customer-domain interface (RequestValidator).", + "rationale": "The rule (no delete with open invoices) is a billing invariant but must fire inside the customer delete flow; placing it here keeps the billing dependency direction outward and wires in via customer's hook mechanism." + } + ], + "code_examples": [ + { + "scenario": "Blocking customer deletion when invoices are not final", + "code": "func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error {\n\tif err := input.Validate(); err != nil { return err }\n\tinvoices, err := v.billingService.ListInvoices(ctx, billing.ListInvoicesInput{Namespaces: []string{input.Namespace}, Customers: []string{input.ID}})\n\tif err != nil { return err }\n\terrs := make([]error, 0, len(invoices.Items))\n\tfor _, inv := range invoices.Items {\n\t\tif inv.Type() == billing.InvoiceTypeGathering { /* skip if deleted, else block */ }\n\t\tstdInvoice, err := inv.AsStandardInvoice()\n\t\tif err != nil { return err }\n\t\tif !stdInvoice.Status.IsFinal() { errs = append(errs, fmt.Errorf(\"invoice %s is not in final state\", stdInvoice.ID)) }\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + }, + "openmeter/billing/validators/subscription": { + "purpose": "Subscription command hook that, after a subscription is created or updated, validates the customer's billing setup is capable of invoicing whenever the subscription has billable (priced) ratecards. Implements subscription.SubscriptionCommandHook.", + "patterns": [ + { + "name": "SubscriptionCommandHook via NoOp embedding", + "description": "Validator embeds subscription.NoOpSubscriptionCommandHook and overrides only AfterCreate/AfterUpdate; NewValidator returns the interface type, not the concrete struct.", + "example": "type Validator struct { subscription.NoOpSubscriptionCommandHook; billingService billing.Service }; func NewValidator(...) (subscription.SubscriptionCommandHook, error)" + }, + { + "name": "Skip validation when no billable items", + "description": "validateBillingSetup short-circuits via hasBillableItems(view), which walks view.Phases -> ItemsByKey -> items and returns true only if a ratecard's AsMeta().Price is non-nil.", + "example": "if !v.hasBillableItems(view) { return nil }" + }, + { + "name": "Wrap validation failures as conflict errors", + "description": "AfterCreate/AfterUpdate wrap any billing-setup error in models.NewGenericConflictError so the API surfaces a 409-style conflict rather than a raw error.", + "example": "return models.NewGenericConflictError(fmt.Errorf(\"invalid billing setup: %w\", err))" + }, + { + "name": "Capability-based customer validation", + "description": "Resolves the customer's invoicing app via GetCustomerOverride (Expand Apps+Customer) and customerapp.AsCustomerApp, then calls ValidateCustomer requiring CalculateTax, InvoiceCustomers, and CollectPayments capabilities.", + "example": "customerApp.ValidateCustomer(ctx, customerProfile.Customer, []app.CapabilityType{app.CapabilityTypeCalculateTax, app.CapabilityTypeInvoiceCustomers, app.CapabilityTypeCollectPayments})" + } + ], + "key_file_guides": [ + { + "file": "validator.go", + "role": "Sole file: Validator, NewValidator, AfterCreate/AfterUpdate hooks, and the validateBillingSetup/hasBillableItems helpers.", + "watch_for": "The required capability set is hardcoded and commented as Stripe-only (CalculateTax + InvoiceCustomers + CollectPayments); adding payment providers means changing this list. AsCustomerApp failure is treated as should-not-happen but still propagated. Validator methods have value receivers (v Validator), so they must stay stateless." + } + ], + "anti_patterns": [ + "Running ValidateCustomer for subscriptions without priced ratecards \u2014 hasBillableItems must gate it to avoid rejecting free subscriptions.", + "Returning the raw billing error from AfterCreate/AfterUpdate instead of wrapping in models.NewGenericConflictError, losing the conflict semantics.", + "Adding mutable fields and using value receivers \u2014 the hook is invoked as a value and must remain stateless.", + "Bypassing GetCustomerOverride's Expand{Apps,Customer} when resolving the invoicing app, which would leave MergedProfile.Apps.Invoicing unpopulated." + ], + "decisions": [ + { + "decision": "Validate billing setup as a subscription AfterCreate/AfterUpdate hook rather than inside the subscription service.", + "rationale": "Keeps billing-specific capability checks out of the subscription core while still failing creation/update of subscriptions that cannot be billed for the customer's current provider setup." + } + ], + "code_examples": [ + { + "scenario": "Validating a customer can be billed when a subscription has priced ratecards", + "code": "func (v Validator) validateBillingSetup(ctx context.Context, view subscription.SubscriptionView) error {\n\tif !v.hasBillableItems(view) { return nil }\n\tcustomerProfile, err := v.billingService.GetCustomerOverride(ctx, billing.GetCustomerOverrideInput{\n\t\tCustomer: customer.CustomerID{Namespace: view.Subscription.Namespace, ID: view.Subscription.CustomerId},\n\t\tExpand: billing.CustomerOverrideExpand{Apps: true, Customer: true},\n\t})\n\tif err != nil { return err }\n\tcustomerApp, err := customerapp.AsCustomerApp(customerProfile.MergedProfile.Apps.Invoicing)\n\tif err != nil { return err }\n\treturn customerApp.ValidateCustomer(ctx, customerProfile.Customer, []app.CapabilityType{\n\t\tapp.CapabilityTypeCalculateTax, app.CapabilityTypeInvoiceCustomers, app.CapabilityTypeCollectPayments,\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w73.json b/.archie/enrichments/w73.json new file mode 100644 index 0000000000..6667f7be64 --- /dev/null +++ b/.archie/enrichments/w73.json @@ -0,0 +1,144 @@ +{ + "openmeter/billing/worker/advance": { + "purpose": "Batch/cron driver (package billingworkeradvance) that finds standard invoices eligible for auto-advancement or collection and advances them concurrently. It is a thin orchestration layer over billing.Service.AdvanceInvoice \u2014 it owns no persistence and no state machine.", + "patterns": [ + { + "name": "Service-only dependency via Config + NewAdvancer", + "description": "AutoAdvancer wraps a single billing.Service plus a *slog.Logger. Construct via NewAdvancer(Config{...}) which nil-checks BillingService and Logger and returns an error; never build the struct literal directly.", + "example": "a, err := NewAdvancer(Config{BillingService: svc, Logger: log})" + }, + { + "name": "Three-source candidate union", + "description": "ListInvoicesToAdvance composes ListInvoicesPendingAutoAdvance (DraftWaitingAutoApproval + DraftUntilLTE), ListInvoicesPendingCollection (DraftWaitingForCollection + CollectionAtLTE), and ListStuckInvoicesNeedingAdvance (HasAvailableAction=Advance, a fail-safe), then dedupes with lo.UniqBy on invoice.ID.", + "example": "lo.UniqBy(allInvoices, func(i billing.StandardInvoice) string { return i.ID })" + }, + { + "name": "Concurrent per-batch fan-out with buffered errChan", + "description": "All() chunks invoices via lo.Chunk(batchSize), spawns a goroutine per invoice inside a sync.WaitGroup per batch, pushes each result to a buffered errChan, and joins via errors.Join after a sync.OnceFunc close.", + "example": "errChan := make(chan error, len(invoices)); closeErrChan := sync.OnceFunc(func(){ close(errChan) })" + }, + { + "name": "ErrInvoiceCannotAdvance is swallowed, not failed", + "description": "AdvanceInvoice treats billing.ErrInvoiceCannotAdvance as benign: it re-fetches via GetStandardInvoiceById, logs a WarnContext with invoice id/namespace/status/draft_until, and returns nil error so the next run retries.", + "example": "if errors.Is(err, billing.ErrInvoiceCannotAdvance) { ... return invoice, nil }" + } + ], + "key_file_guides": [ + { + "file": "advance.go", + "role": "Entire package: AutoAdvancer struct, the four List* methods, AdvanceInvoice wrapper, All() batch runner, Config + NewAdvancer constructor.", + "watch_for": "All() reuses the loop variable `err` across goroutines (`_, err = a.AdvanceInvoice(...)`) \u2014 a known data-race shape; do not copy this pattern into new concurrent code, scope err inside the goroutine. Also the field is named `invoice` but holds a billing.Service, not an invoice." + } + ], + "anti_patterns": [ + "Adding persistence/state-machine logic here \u2014 advancement transitions belong in billing.Service; this package only lists and dispatches.", + "Treating ErrInvoiceCannotAdvance as a hard failure \u2014 it must remain a logged warning that returns nil so the cron retries.", + "Constructing AutoAdvancer without NewAdvancer, bypassing the nil checks on BillingService/Logger." + ], + "decisions": [ + { + "decision": "Union three candidate queries (auto-approve, collection, stuck) instead of one.", + "rationale": "The HasAvailableAction=Advance query is an explicit fail-safe to recover invoices that got stuck in an advanceable state outside the normal time-based triggers." + } + ], + "code_examples": [] + }, + "openmeter/billing/worker/asyncadvance": { + "purpose": "Watermill/event consumer (package asyncadvance) for billing.AdvanceStandardInvoiceEvent. It synchronously advances one invoice per event by calling billing.Service.AdvanceInvoice, serving as the async counterpart to the batch advancer.", + "patterns": [ + { + "name": "Config.Validate guards against advancement-strategy infinite loop", + "description": "Config.Validate() requires Logger and BillingService non-nil AND asserts BillingService.GetAdvancementStrategy() == billing.ForegroundAdvancementStrategy \u2014 a background strategy would re-emit the same event and loop forever.", + "example": "if c.BillingService.GetAdvancementStrategy() != billing.ForegroundAdvancementStrategy { return errors.New(\"... infinite loop\") }" + }, + { + "name": "New() runs Validate before constructing Handler", + "description": "New(Config) calls c.Validate() and returns its error before building the Handler; never instantiate Handler directly.", + "example": "func New(c Config) (*Handler, error) { if err := c.Validate(); err != nil { return nil, err }; ... }" + }, + { + "name": "Handle swallows ErrInvoiceCannotAdvance", + "description": "Handle returns nil (not an error) on billing.ErrInvoiceCannotAdvance, logging a WarnContext about a likely late/out-of-order message, so the consumer acks instead of redelivering forever.", + "example": "if errors.Is(err, billing.ErrInvoiceCannotAdvance) { h.logger.WarnContext(...); return nil }" + } + ], + "key_file_guides": [ + { + "file": "asyncadvance.go", + "role": "Entire package: Handler struct, Config + Validate + New constructor, and Handle(ctx, *billing.AdvanceStandardInvoiceEvent).", + "watch_for": "The ForegroundAdvancementStrategy invariant in Validate is load-bearing \u2014 removing it lets the handler re-emit the event it is consuming and spin an infinite loop. Handle ignores the returned invoice (`_, err := ...`); the event only carries event.Invoice (an InvoiceID)." + } + ], + "anti_patterns": [ + "Wiring this handler with a BillingService that uses a non-foreground advancement strategy \u2014 Validate exists specifically to reject this.", + "Returning an error on ErrInvoiceCannotAdvance \u2014 it would cause endless message redelivery for an invoice that legitimately cannot advance yet.", + "Bypassing New() and building Handler directly, skipping the strategy validation." + ], + "decisions": [ + { + "decision": "Enforce ForegroundAdvancementStrategy at construction time.", + "rationale": "AdvanceInvoice under a background strategy would publish another AdvanceStandardInvoiceEvent, which this same handler consumes \u2014 Validate makes the loop unconstructable rather than relying on runtime caution." + } + ], + "code_examples": [] + }, + "openmeter/billing/worker/collect": { + "purpose": "Batch/cron driver (package billingworkercollect) that finds gathering invoices due for collection and converts each customer's pending lines into standard invoices via billing.Service.InvoicePendingLines. Mirrors the advance package's structure for the collection phase.", + "patterns": [ + { + "name": "Dual-service dependency via Config + NewInvoiceCollector", + "description": "InvoiceCollector holds a billing.GatheringInvoiceService (for listing/recalculating gathering invoices) and a billing.Service (for InvoicePendingLines), plus lockedNamespaces and a logger. Build only via NewInvoiceCollector, which nil-checks both services and the logger.", + "example": "c, err := NewInvoiceCollector(Config{GatheringInvoiceService: g, BillingService: s, Logger: l, LockedNamespaces: ns})" + }, + { + "name": "Input structs with Validate()", + "description": "ListCollectableInvoicesInput and CollectCustomerInvoiceInput each have Validate() that collects into `var errs []error` and returns errors.Join(errs...); callers check it before doing work.", + "example": "if err := params.Validate(); err != nil { return nil, fmt.Errorf(\"invalid input: %w\", err) }" + }, + { + "name": "CollectionAt filter via pkg/filter Or(Lte || not-exists)", + "description": "ListCollectableInvoices builds billing.ListGatheringInvoicesInput.CollectionAt as a filter.FilterTime Or of {Lte: collectionAt} and {Exists: false}, so invoices with a nil NextCollectionAt are also picked up (and warn-logged).", + "example": "CollectionAt: filter.FilterTime{Or: &[]filter.FilterTime{{Lte: ...}, {Exists: lo.ToPtr(false)}}}" + }, + { + "name": "Collection disables progressive billing", + "description": "CollectCustomerInvoice calls InvoicePendingLines with billing.WithPartialInvoiceLinesDisabled() so system-driven collection never produces partial/progressive invoices.", + "example": "a.billingService.InvoicePendingLines(ctx, in, billing.WithPartialInvoiceLinesDisabled())" + }, + { + "name": "Sentinel-error recovery: locked namespace and no-lines", + "description": "ErrNamespaceLocked \u2192 warn and skip (return nil,nil); ErrInvoiceCreateNoLines \u2192 warn and call gatheringInvoices.RecalculateGatheringInvoices to repair inconsistent state, then return nil,nil. Other errors are wrapped and returned.", + "example": "if errors.Is(err, billing.ErrInvoiceCreateNoLines) { ...RecalculateGatheringInvoices(ctx, params.CustomerID)... }" + }, + { + "name": "Per-customer concurrent fan-out skipping locked namespaces", + "description": "All() maps gathering invoices to customer.CustomerID, dedupes with lo.Uniq, filters out lockedNamespaces via slices.Contains, lo.Chunk(batchSize), then runs a goroutine-per-customer WaitGroup with a buffered errChan joined by errors.Join (same shape as the advance package).", + "example": "lo.Filter(lo.Uniq(customerIDs), func(id customer.CustomerID, _ int) bool { return !slices.Contains(a.lockedNamespaces, id.Namespace) })" + } + ], + "key_file_guides": [ + { + "file": "collect.go", + "role": "Entire package: InvoiceCollector, ListCollectableInvoices, CollectCustomerInvoice (per-customer line-to-invoice conversion with sentinel handling), All() batch runner, the two input structs + Validate, and Config + NewInvoiceCollector.", + "watch_for": "All() reuses the loop var `err` inside goroutines (`_, err = a.CollectCustomerInvoice(...)`) \u2014 same race shape as advance.go; scope err locally in new code. Locked namespaces are filtered in All() but CollectCustomerInvoice still re-checks ErrNamespaceLocked, so don't assume one guard suffices. WithPartialInvoiceLinesDisabled is mandatory for system collection." + } + ], + "anti_patterns": [ + "Allowing progressive/partial invoice lines during system collection \u2014 omitting WithPartialInvoiceLinesDisabled changes billing semantics.", + "Treating ErrInvoiceCreateNoLines as fatal instead of triggering RecalculateGatheringInvoices to repair state.", + "Treating ErrNamespaceLocked as an error rather than a skip \u2014 locked namespaces must be quietly bypassed.", + "Constructing InvoiceCollector directly instead of via NewInvoiceCollector, skipping the required-dependency nil checks." + ], + "decisions": [ + { + "decision": "Disable partial invoice lines for collection runs.", + "rationale": "Background collection should produce complete invoices, not the progressive/partial lines used in interactive billing flows." + }, + { + "decision": "Recalculate gathering invoices on ErrInvoiceCreateNoLines instead of erroring.", + "rationale": "A gathering invoice flagged for collection but yielding no lines signals inconsistent state; recalculation self-heals rather than failing the batch." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w74.json b/.archie/enrichments/w74.json new file mode 100644 index 0000000000..e289aa4204 --- /dev/null +++ b/.archie/enrichments/w74.json @@ -0,0 +1,140 @@ +{ + "openmeter/billing/worker/subscriptionsync/adapter": { + "purpose": "Ent-backed persistence adapter for the subscription\u2192billing sync bridge; stores and reads per-subscription SubscriptionBillingSyncState (last sync time, billables flag, next-sync cooldown) used by the reconciler to skip up-to-date subscriptions. Implements subscriptionsync.Adapter and subscriptionsync.SyncStateAdapter.", + "patterns": [ + { + "name": "Config + Validate + New constructor", + "description": "Adapter is constructed via New(Config) returning the interface type; Config.Validate() collects errors into []error and returns errors.Join(errs...), requiring Client non-nil before constructing.", + "example": "func New(config Config) (subscriptionsync.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client}, nil }" + }, + { + "name": "Transaction hijacking via Tx/WithTx/Self", + "description": "adapter implements the transaction.Repo-style contract: Tx hijacks via db.HijackTx wrapping the eDriver in entutils.NewTxDriver; WithTx rebinds db with entdb.NewTxClientFromRawConfig; Self returns the receiver.", + "example": "txCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false})" + }, + { + "name": "TransactingRepo wrapping for all queries", + "description": "Every SyncStateAdapter method body is wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the tx in ctx; the closure receives a tx-scoped *adapter and uses tx.db, never a.db.", + "example": "return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... tx.db.SubscriptionBillingSyncState... })" + }, + { + "name": "Compile-time interface assertion", + "description": "syncstate.go asserts `var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)` so missing methods fail compilation.", + "example": "var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)" + }, + { + "name": "FromDB mapping normalizes to UTC", + "description": "mapSyncStateFromDB converts every *entdb.SubscriptionBillingSyncState timestamp to .UTC() (SyncedAt and nillable NextSyncAfter) before returning the domain SyncState.", + "example": "SyncedAt: state.SyncedAt.UTC(), NextSyncAfter: lo.ToPtr(nextSyncAfter.UTC())" + }, + { + "name": "Upsert via OnConflictColumns on (subscription_id, namespace)", + "description": "UpsertSyncState validates input, then Creates with OnConflictColumns(FieldSubscriptionID, FieldNamespace) + UpdateHasBillables/UpdateSyncedAt/UpdateNextSyncAfter, normalizing all times to UTC.", + "example": "OnConflictColumns(subscriptionbillingsyncstate.FieldSubscriptionID, subscriptionbillingsyncstate.FieldNamespace).UpdateHasBillables()..." + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor and the Tx/WithTx/Self transaction-hijacking plumbing over *entdb.Client.", + "watch_for": "Tx uses ReadOnly:false \u2014 do not assume read-only; WithTx must rebind db from the raw tx config, not reuse a.db." + }, + { + "file": "syncstate.go", + "role": "SyncStateAdapter implementation: InvalidateSyncState (delete), GetSyncStates (batch OR-filter by namespaced IDs), UpsertSyncState (conflict upsert), and mapSyncStateFromDB.", + "watch_for": "GetSyncStates builds an OR over per-ID (SubscriptionID AND Namespace) predicates via lo.Map \u2014 always scope by both fields; always normalize times to UTC on read and write." + } + ], + "anti_patterns": [ + "Querying with a.db directly inside a method instead of using the tx-scoped tx.db from TransactingRepo \u2014 breaks transaction correctness.", + "Filtering SubscriptionBillingSyncState by SubscriptionID without also constraining Namespace \u2014 leaks across tenants.", + "Returning non-UTC timestamps from FromDB mapping \u2014 downstream cooldown comparisons assume UTC.", + "Adding a new SyncStateAdapter method without preserving the `var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)` assertion." + ], + "decisions": [ + { + "decision": "Persist sync state in a dedicated SubscriptionBillingSyncState table keyed by (subscription_id, namespace) with HasBillables and NextSyncAfter.", + "rationale": "Lets the reconciler cheaply skip subscriptions with no billables or still in cooldown rather than re-running full sync for every active subscription." + }, + { + "decision": "Use HijackTx + TransactingRepo rather than passing a tx client through arguments.", + "rationale": "Matches the repo-wide billing adapter convention so the adapter rebinds to a tx already carried in ctx, keeping helpers transaction-aware." + } + ], + "code_examples": [ + { + "scenario": "Upsert sync state with conflict handling and UTC normalization", + "code": "return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error {\n nextSyncAfter := input.NextSyncAfter\n if nextSyncAfter != nil { nextSyncAfter = lo.ToPtr(nextSyncAfter.UTC()) }\n return tx.db.SubscriptionBillingSyncState.Create().\n SetHasBillables(input.HasBillables).\n SetSyncedAt(input.SyncedAt.UTC()).\n SetNillableNextSyncAfter(nextSyncAfter).\n SetSubscriptionID(input.SubscriptionID.ID).\n SetNamespace(input.SubscriptionID.Namespace).\n OnConflictColumns(subscriptionbillingsyncstate.FieldSubscriptionID, subscriptionbillingsyncstate.FieldNamespace).\n UpdateHasBillables().UpdateSyncedAt().UpdateNextSyncAfter().Exec(ctx)\n})" + } + ] + }, + "openmeter/billing/worker/subscriptionsync/reconciler": { + "purpose": "Periodic reconciliation component that re-syncs subscription state into billing, compensating for the event-driven invoice pipeline when a processing error caused a subscription to stop syncing. Drives subscriptionsync.Service.SyncByID across active and deleted subscriptions.", + "patterns": [ + { + "name": "ReconcilerConfig + Validate + NewReconciler constructor", + "description": "Reconciler is built from ReconcilerConfig via NewReconciler; Validate() requires SubscriptionSync, SubscriptionService, CustomerService, and Logger all non-nil (returns first error). Logger is injected, never slog.Default().", + "example": "func NewReconciler(config ReconcilerConfig) (*Reconciler, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Input struct with Validate per public method", + "description": "ReconcilerListSubscriptionsInput.Validate() enforces Lookback > 0; ListSubscriptions calls it before paging.", + "example": "if i.Lookback <= 0 { return errors.New(\"lookback must be greater than 0\") }" + }, + { + "name": "Two-pass paginated listing (active + deleted)", + "description": "ListSubscriptions pages with PageSize=defaultWindowSize(10_000) twice: first ActiveInPeriod over the lookback window, then a second pass with DeletedAt+IncludeDeleted to reconcile deleted subscriptions; each loop breaks when Items is empty.", + "example": "ActiveInPeriod: &timeutil.StartBoundedPeriod{From: clock.Now().Add(-in.Lookback), To: lo.ToPtr(clock.Now())}" + }, + { + "name": "Join subscriptions with sync state via SliceToMap", + "description": "mapToSubscriptionWithSyncState fetches sync states by namespaced IDs, indexes them with lo.SliceToMap keyed on NamespacedID, and embeds an optional *SyncState pointer in SubscriptionWithSyncState (nil when no state exists).", + "example": "syncStatesBySubscriptionID := lo.SliceToMap(syncStates, func(s subscriptionsync.SyncState) (models.NamespacedID, subscriptionsync.SyncState) {...})" + }, + { + "name": "Cooldown/skip gating in All, overridable by Force", + "description": "All() skips reconciliation when SyncState shows no billables, no NextSyncAfter, or NextSyncAfter in the future \u2014 unless ReconcilerAllInput.Force is set; per-subscription errors are accumulated with errors.Join and do not abort the loop.", + "example": "if subscription.SyncState.NextSyncAfter.After(clock.Now()) { ...skip... }" + }, + { + "name": "clock package for time, not time.Now in loops", + "description": "Window boundaries and cooldown comparisons use pkg/clock (clock.Now()) so tests can freeze time; note ReconcileSubscription passes time.Now() to SyncByID.", + "example": "From: clock.Now().Add(-in.Lookback)" + } + ], + "key_file_guides": [ + { + "file": "reconciler.go", + "role": "Defines Reconciler + ReconcilerConfig, SubscriptionWithSyncState, ListSubscriptions (two-pass paging), mapToSubscriptionWithSyncState, ReconcileSubscription (delegates to SyncByID), and All (gated batch reconcile).", + "watch_for": "The deleted-subscription second pass exists because of a delete bug (comment dated 2026-05-19) and currently reconciles ALL deleted subscriptions ignoring lookback; All accumulates errors with errors.Join rather than failing fast; Force bypasses every skip guard." + } + ], + "anti_patterns": [ + "Aborting the All() loop on the first per-subscription error instead of joining into outErr and continuing.", + "Using time.Now() for window/cooldown logic instead of clock.Now(), which breaks frozen-time tests.", + "Calling slog.Default() instead of the injected Logger.", + "Removing or ignoring the SyncState skip guards (HasBillables / NextSyncAfter) without honoring the Force flag \u2014 would re-sync everything every run.", + "Listing without paging to empty (PageSize defaultWindowSize loop) \u2014 would silently process only the first page." + ], + "decisions": [ + { + "decision": "Add a reconciliation loop on top of the event-driven invoice pipeline.", + "rationale": "Invoice creation is purely event driven; a processing error can leave a subscription stuck, so periodic reconciliation guarantees eventual convergence (see package doc comment on Reconciler)." + }, + { + "decision": "Gate reconciliation on persisted SyncState (HasBillables + NextSyncAfter) unless Force.", + "rationale": "Avoids re-running expensive SyncByID for subscriptions with no billables or still within their cooldown window, keeping batch runs cheap." + }, + { + "decision": "Reconcile deleted subscriptions in a separate full pass.", + "rationale": "A historical delete bug left deleted subscriptions un-synced, so they must all be reconciled rather than only those active in the lookback window." + } + ], + "code_examples": [ + { + "scenario": "Skip-gated batch reconciliation accumulating errors", + "code": "for _, subscription := range subscriptions {\n if !in.Force && subscription.SyncState != nil {\n if !subscription.SyncState.HasBillables { continue }\n if subscription.SyncState.NextSyncAfter == nil { continue }\n if subscription.SyncState.NextSyncAfter.After(clock.Now()) { continue }\n }\n if err := r.ReconcileSubscription(ctx, subscription.NamespacedID); err != nil {\n r.logger.ErrorContext(ctx, \"failed to reconcile subscription\", \"error\", err)\n outErr = errors.Join(outErr, fmt.Errorf(\"failed to reconcile subscription: %w\", err))\n }\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w75.json b/.archie/enrichments/w75.json new file mode 100644 index 0000000000..9bb49c9590 --- /dev/null +++ b/.archie/enrichments/w75.json @@ -0,0 +1,156 @@ +{ + "openmeter/billing/worker/subscriptionsync/service/persistedstate": { + "purpose": "Loads the current persisted billing state for a subscription (invoice lines, split-line hierarchies, and charges) and wraps each as a uniform Item keyed by ChildUniqueReferenceID, so the subscription-sync reconciler can diff persisted state against target state. Primary constraint: every persisted entity is normalized to meter (MinimumWindowSizeDuration) precision on read.", + "patterns": [ + { + "name": "Uniform Item interface over heterogeneous backing types", + "description": "Invoice lines, split-line hierarchies, usage-based charges, and flat-fee charges all implement the Item interface (ID, Type, ChildUniqueReferenceID, ServicePeriod, IsSubscriptionManaged, HasLastLineAnnotation). New persisted-state kinds must add an ItemType constant and a private struct implementing Item, asserted via a `var _ Item = ...` block.", + "example": "var (\\n\\t_ Item = persistedLine{}\\n\\t_ LineGetter = persistedLine{}\\n)" + }, + { + "name": "Private constructors validate, public Item accessors never error", + "description": "Construction funcs (newPersistedLine, newPersistedUsageBasedCharge, etc.) are private and perform nil/Validate() checks so the Item methods can expose non-erroring accessors. Never expose a constructor publicly or skip the validation it performs.", + "example": "func newPersistedUsageBasedCharge(charge usagebased.Charge) (persistedUsageBasedCharge, error) {\\n\\tif err := charge.Validate(); err != nil { return persistedUsageBasedCharge{}, fmt.Errorf(\"usage based charge is invalid: %w\", err) }\\n\\treturn persistedUsageBasedCharge{charge: charge}, nil\\n}" + }, + { + "name": "Typed downcast getters via ItemAs* helpers", + "description": "To recover a backing type from an Item, use the ItemAs* helpers (ItemAsLine, ItemAsSplitLineHierarchy, ItemAsUsageBasedCharge, ItemAsFlatFeeCharge), which type-assert against the matching *Getter interface and return a descriptive error from getErrorDetails(in). Never type-assert against the private structs directly.", + "example": "lineGetter, ok := in.(LineGetter)\\nif !ok { return nil, fmt.Errorf(\"persisted item does not implement line getter: %s\", getErrorDetails(in)) }" + }, + { + "name": "Read-time normalization to meter precision", + "description": "normalizePersistedLineOrHierarchy and normalizeSubscriptionReference Truncate service periods, invoice-at, and subscription BillingPeriod to streaming.MinimumWindowSizeDuration on load, so reconciliation does not propose no-op repairs against legacy sub-second timestamps. Any new persisted field carrying a time MUST be normalized here.", + "example": "cloned.UpdateServicePeriod(func(period *timeutil.ClosedPeriod) {\\n\\t*period = period.Truncate(streaming.MinimumWindowSizeDuration)\\n})" + }, + { + "name": "Charge-managed lines loaded as charges, not lines", + "description": "LoadForSubscription requests lines with IncludeChargeManaged: false and separately calls chargeService.ListCharges, because charge-managed invoice lines are edited via charge patches. The two maps are merged with a duplicate-unique-id guard across lines and charges.", + "example": "GetLinesForSubscriptionInput{... IncludeChargeManaged: false}" + }, + { + "name": "State keyed by ChildUniqueReferenceID with global uniqueness", + "description": "State.ByUniqueID maps the deterministic ChildUniqueReferenceID to its Item; items lacking a unique id are skipped, and duplicates (within lines, within charges, or across the two) are hard errors. State.Validate requires both ByUniqueID and Invoices to be non-nil.", + "example": "if _, ok := byUniqueID[*uniqueID]; ok { return State{}, fmt.Errorf(\"duplicate unique ids in the existing lines\") }" + } + ], + "key_file_guides": [ + { + "file": "item.go", + "role": "Defines ItemType constants, the Item interface plus per-kind getter interfaces (LineGetter, SplitLineHierarchyGetter, UsageBasedChargeGetter, FlatFeeChargeGetter), the four private backing structs, their private constructors, the ItemAs* downcasters, and the NewItemFromLineOrHierarchy / NewChargeItemFromChargeType factories.", + "watch_for": "SplitLineHierarchy delegates IsSubscriptionManaged/HasLastLineAnnotation to getLastLineForAnnotations (the child whose service-period end matches the group end and is not deleted); charge items read annotations directly off Intent.Annotations, not a child line." + }, + { + "file": "loader.go", + "role": "Loader struct over billingService (GetLinesForSubscription, ListInvoices) and chargeService (ListCharges) interfaces; LoadForSubscription assembles State, loadChargesForSubscription/loadInvoicesForSubscriptionLines fan out, normalizePersistedLineOrHierarchy normalizes precision on read.", + "watch_for": "chargeService may be nil (returns empty map). Credit-purchase charges tied to a subscription are an explicit hard error. Invoices are loaded with IncludeDeleted: true and every referenced invoice id must resolve or it errors." + }, + { + "file": "state.go", + "role": "State struct (ByUniqueID map[string]Item + Invoices) and Invoices map type with IsGatheringInvoice helper and Validate.", + "watch_for": "Invoices.IsGatheringInvoice errors when the invoice id is absent from state rather than returning false." + } + ], + "anti_patterns": [ + "Exposing a public constructor for an Item backing type or skipping the nil/Validate() check it performs", + "Type-asserting an Item directly to a private struct instead of using the ItemAs* getter helpers", + "Reading a persisted time field without Truncate(streaming.MinimumWindowSizeDuration) normalization, causing endless no-op reconciliation", + "Loading charge-managed lines as plain lines instead of via ListCharges (set IncludeChargeManaged: false)", + "Reusing a ChildUniqueReferenceID across lines and charges (collisions are hard errors by design)" + ], + "decisions": [ + { + "decision": "Wrap lines, hierarchies, and charges behind one Item interface keyed by unique reference id", + "rationale": "The reconciler diffs target vs persisted state purely by unique id and a small set of accessors, so it must not care whether the backing object is a line, a split-line group, or a charge." + }, + { + "decision": "Normalize timestamps to meter precision on read with a TODO to migrate the data", + "rationale": "Legacy rows persist ns precision the meter engine cannot query; normalizing on read prevents sync from perpetually proposing no-op timestamp repairs until a backfill migration lands." + } + ], + "code_examples": [] + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate": { + "purpose": "Computes the desired (target) billing state for a subscription as of a point in time: iterates each subscription phase to project the invoice lines/charges that SHOULD exist, then exposes each as a StateItem the reconciler compares against persistedstate. Primary constraint: everything is aligned-billing-period aware and truncated to meter (1s / MinimumWindowSizeDuration) resolution.", + "patterns": [ + { + "name": "Builder.Build orchestrates, PhaseIterator generates", + "description": "Builder.Build validates BuildInput, sorts phases by ActiveFrom, calls collectUpcomingLines (which constructs a NewPhaseIterator per phase and calls Generate up to a per-phase generationLimit), then corrects period starts and maps results to StateItem. New target-state logic hangs off Builder; per-phase line projection hangs off PhaseIterator.", + "example": "iterator, err := NewPhaseIterator(b.logger, b.tracer, subs, phase.SubscriptionPhase.Key)" + }, + { + "name": "Deterministic UniqueID composition", + "description": "Every generated item's UniqueID is strings.Join of subscriptionID/phaseKey/itemKey/v[version]/period[index] with '/'. This MUST exactly match the key persistedstate exposes via ChildUniqueReferenceID, or the reconciler treats it as create+delete instead of update. correctPeriodStartForUpcomingLines reconstructs the previous period's key the same way.", + "example": "UniqueID: strings.Join([]string{it.sub.Subscription.ID, it.phase.Spec.PhaseKey, item.Spec.ItemKey, fmt.Sprintf(\"v[%d]\", version), fmt.Sprintf(\"period[%d]\", periodIdx)}, \"/\")" + }, + { + "name": "Truncate to meter resolution everywhere", + "description": "iterationEnd, ServicePeriod, FullServicePeriod, and BillingPeriod are all Truncate(streaming.MinimumWindowSizeDuration). truncateItemsIfNeeded drops items whose truncated service period is empty UNLESS the price is flat. Any new period math must truncate before comparison to avoid ns rounding artifacts.", + "example": "iterationEnd = iterationEnd.Truncate(streaming.MinimumWindowSizeDuration).Add(streaming.MinimumWindowSizeDuration - time.Nanosecond)" + }, + { + "name": "Bounded phase iteration loop", + "description": "generateForAlignedItemVersion advances periodIdx until invoiceAt > iterationEnd, item deactivation, phase end, or maxSafeIter (1000) is hit; the last triggers an error log with a stack dump rather than a panic. Never write an unbounded period loop here.", + "example": "if periodIdx > maxSafeIter { logger.ErrorContext(ctx, \"max iterations reached\", ...); break }" + }, + { + "name": "tracex span wrapping on every method", + "description": "Build, collectUpcomingLines, Generate, generateAligned, generateForAlignedItemVersion(+Period) all open a tracex.Start[T] span and return span.Wrap(func(ctx)...). Match the naming scheme 'billing.worker.subscription.sync...' / 'billing.worker.subscription.phaseiterator...' for new spans.", + "example": "span := tracex.Start[State](ctx, b.tracer, \"billing.worker.subscription.sync.targetstate.Build\")\\nreturn span.Wrap(func(ctx context.Context) (State, error) { ... })" + }, + { + "name": "InvoiceAt depends on payment term", + "description": "SubscriptionItemWithPeriods.GetInvoiceAt returns BillingPeriod.From only for flat price with InAdvancePaymentTerm; everything else is lo.Latest(ServicePeriod.To, BillingPeriod.To). StateItem.GetExpectedLine returns (nil,nil) for in-arrears flat fees with a zero-length full service period and for prorated flat amounts that round to zero.", + "example": "if flatFee.PaymentTerm == productcatalog.InAdvancePaymentTerm { return r.BillingPeriod.From }" + } + ], + "key_file_guides": [ + { + "file": "targetstate.go", + "role": "State/BuildInput/Builder types; Build is the entry point. collectUpcomingLines drives phase iterators and computes generationLimit from GetAlignedBillingPeriodAt. correctPeriodStartForUpcomingLines stitches continuous service-period starts for sync-ignored, force-continuous prior lines.", + "watch_for": "A nil SubscriptionView returns an empty State (signals reconciler to delete everything). CustomerDeletedAt caps the subscription via withActiveTo. correctPeriodStart only fires when the previous persisted line is subscription-managed AND has both AnnotationSubscriptionSyncIgnore and AnnotationSubscriptionSyncForceContinuousLines." + }, + { + "file": "phaseiterator.go", + "role": "PhaseIterator + SubscriptionItemWithPeriods. Generate/generateAligned/generateForAlignedItemVersion(+Period) project per-period items using GetAlignedBillingPeriodAt and item.Spec.GetFullServicePeriodAt. PeriodPercentage drives proration; GetMinimumBillableTime / GetInvoiceAt / HasInvoicableItems gate generation.", + "watch_for": "TimeInfinity (9999-12-31) is the sentinel upper bound; maxSafeIter=1000 caps the loop. One-time items (nil BillingCadence) go through generateOneTimeAlignedItem and may be skipped (breaks=true) if not yet billable. Zero-length cadence periods are special-cased via AsPeriod().Closed() intersection handling." + }, + { + "file": "targetstateitem.go", + "role": "StateItem wraps SubscriptionItemWithPeriods with CurrencyCalculator and Subscription. IsBillable, GetServicePeriod, GetExpectedLine (builds billing.GatheringLine), shouldProrate, GetExpectedLineOrErr, and discountsToBillingDiscounts.", + "watch_for": "GetExpectedLine returns (nil,nil) for zero-amount/in-arrears-zero-period cases; use GetExpectedLineOrErr (returns ErrExpectedLineIsEmpty) when a non-nil line is required. shouldProrate only applies to flat prices with ProRatingModeProratePrices and a subscription that does not end exactly at the service period end." + }, + { + "file": "phaseiterator_test.go", + "role": "Table-driven suite (PhaseIteratorTestSuite) using subscriptionItemViewMock and expectedIterations to assert ServicePeriod/FullServicePeriod/BillingPeriod and the composed UniqueID Key across aligned cadences, phase ends, version splits, and 1s truncation.", + "watch_for": "billingAnchorRelativeToSubscriptionStart must be negative or the test fails; expected Key strings encode the exact UniqueID format and break if the join scheme changes." + } + ], + "anti_patterns": [ + "Changing the UniqueID join format without updating persistedstate's ChildUniqueReferenceID, turning updates into create+delete churn", + "Comparing or storing periods without Truncate(streaming.MinimumWindowSizeDuration), reintroducing ns rounding drift", + "Writing an unbounded period-generation loop instead of respecting maxSafeIter and the deactivation/phase-end exits", + "panicking on a bad period instead of returning an error up through span.Wrap", + "Treating GetExpectedLine's (nil,nil) result as an error rather than a legitimate not-billable signal" + ], + "decisions": [ + { + "decision": "Project target state per phase via a stateful PhaseIterator rather than a single query", + "rationale": "Billing periods are alignment- and cadence-dependent and must advance period-by-period until invoice-at crosses the generation horizon, which is inherently iterative." + }, + { + "decision": "Emit a deterministic composite UniqueID per (sub,phase,item,version,period)", + "rationale": "The reconciler diffs target against persisted state purely by unique id, so the key must be reproducible identically on both sides." + }, + { + "decision": "Return empty State for a nil SubscriptionView", + "rationale": "A deleted subscription's target state is 'nothing', which forces reconciliation to delete dependent invoice lines/charges." + } + ], + "code_examples": [ + { + "scenario": "Build target state for a subscription as of a time", + "code": "func (b Builder) Build(ctx context.Context, input BuildInput) (State, error) {\\n\\tspan := tracex.Start[State](ctx, b.tracer, \"billing.worker.subscription.sync.targetstate.Build\")\\n\\treturn span.Wrap(func(ctx context.Context) (State, error) {\\n\\t\\tif err := input.Validate(); err != nil { return State{}, fmt.Errorf(\"validating input: %w\", err) }\\n\\t\\tif input.SubscriptionView == nil { return State{MaxGenerationTimeLimit: input.AsOf}, nil }\\n\\t\\tsubs := *input.SubscriptionView\\n\\t\\tupcomingLinesResult, err := b.collectUpcomingLines(ctx, subs, input.AsOf)\\n\\t\\tif err != nil { return State{}, fmt.Errorf(\"collecting upcoming lines: %w\", err) }\\n\\t\\tinScopeLines, err := b.correctPeriodStartForUpcomingLines(ctx, subs.Subscription.ID, upcomingLinesResult.Lines, input.Persisted)\\n\\t\\tif err != nil { return State{}, err }\\n\\t\\tcurrencyCalculator, err := subs.Subscription.Currency.Calculator()\\n\\t\\tif err != nil { return State{}, err }\\n\\t\\treturn State{Items: lo.Map(inScopeLines, func(item SubscriptionItemWithPeriods, _ int) StateItem {\\n\\t\\t\\treturn StateItem{SubscriptionItemWithPeriods: item, CurrencyCalculator: currencyCalculator, Subscription: subs.Subscription}\\n\\t\\t}), MaxGenerationTimeLimit: upcomingLinesResult.SubscriptionMaxGenerationTimeLimit}, nil\\n\\t})\\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w76.json b/.archie/enrichments/w76.json new file mode 100644 index 0000000000..d3101b6f1c --- /dev/null +++ b/.archie/enrichments/w76.json @@ -0,0 +1,86 @@ +{ + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater": { + "purpose": "Applies the subscription-sync reconciler's computed drift (a slice of Patch) to billing artifacts: provisions new gathering lines, updates/deletes lines on gathering and mutable standard invoices, and records warning validation issues (rather than mutating) on immutable invoices. It is the write side of the subscription->billing sync bridge; the reconciler decides what should change, this package executes it via billing.Service.", + "patterns": [ + { + "name": "Tagged-union Patch with op-checked accessors", + "description": "Patch is a struct holding op PatchOperation plus one field per variant; never construct Patch literals directly outside this package. Build via NewCreateLinePatch/NewDeleteLinePatch/NewUpdateLinePatch/NewDeleteSplitLineGroupPatch/NewUpdateSplitLineGroupPatch, and read via AsXxxPatch() which errors unless p.op matches.", + "example": "patch := invoiceupdater.NewDeleteLinePatch(line.GetLineID(), line.GetInvoiceID()); create, err := patch.AsCreateLinePatch() // err unless op == PatchOpLineCreate" + }, + { + "name": "parsePatches bucketing before any write", + "description": "ApplyPatches first calls parsePatches to split patches into patchesParsed{newLines, updatedLinesByInvoiceID (keyed by invoice ID -> invoicePatches{updatedLines, deletedLines}), splitLineGroups}. New code that adds a PatchOperation MUST add a case in both parsePatches and Patch.Log (default branches error/log-unknown).", + "example": "case PatchOpLineDelete: lineUpdates := parsed.updatedLinesByInvoiceID[deletePatch.InvoiceID]; lineUpdates.deletedLines = append(...); parsed.updatedLinesByInvoiceID[deletePatch.InvoiceID] = lineUpdates" + }, + { + "name": "Invoice-mutability branching", + "description": "Per invoice, dispatch by Type()/StatusDetails.Immutable: gathering -> updateGatheringInvoice, mutable standard -> updateMutableStandardInvoice, immutable -> updateImmutableInvoice (no mutation, only validation issues). Reuse this exact three-way branch; never mutate an immutable invoice's lines.", + "example": "if invoice.Type() == billing.InvoiceTypeGathering { ... }; standardInvoice, _ := invoice.AsStandardInvoice(); if !standardInvoice.StatusDetails.Immutable { updateMutableStandardInvoice(...) } else { updateImmutableInvoice(...) }" + }, + { + "name": "Mutate inside billing.Service EditFn closures", + "description": "All line edits go through UpdateStandardInvoice/UpdateGatheringInvoice with an EditFn that mutates the passed *invoice in place (line.DeletedAt = lo.ToPtr(clock.Now()), invoice.Lines.ReplaceByID(...)). Set IncludeDeletedLines: true so deletes are visible. Re-snapshot quantity via billingService.SnapshotLineQuantity before replacing a line.", + "example": "u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{Invoice: invoice.GetInvoiceID(), IncludeDeletedLines: true, EditFn: func(invoice *billing.StandardInvoice) error { ... }})" + }, + { + "name": "Immutable invoice -> warning ValidationIssue, not error", + "description": "On immutable invoices, drift is reported via newValidationIssueOnLine (Severity Warning, Code ImmutableInvoiceHandlingNotSupportedErrorCode, Component subscriptionSyncComponentName) and merged idempotently with mergeValidationIssues (dedupes by Path+Component+Code+Message). Flat-fee per-unit amount and service-period changes, and usage-based quantity changes, are not applied \u2014 only flagged.", + "example": "validationIssues = append(validationIssues, newValidationIssueOnLine(existingLine, \"flat fee line's per unit amount cannot be changed on immutable invoice (new per unit amount: %s)\", targetPerUnitAmount.String()))" + }, + { + "name": "Group new lines by currency for provisioning", + "description": "provisionUpcomingLines groups GatheringLines by l.Currency with lo.GroupBy and issues one billingService.CreatePendingInvoiceLines call per currency code, since pending-line creation is currency-scoped.", + "example": "linesByCurrency := lo.GroupBy(lines, func(l billing.GatheringLine) currencyx.Code { return l.Currency })" + }, + { + "name": "Dry-run logging suppresses non-actionable patches", + "description": "LogPatches calls Patch.Log only when isDryRunLoggablePatch is true: current-period create-line patches and patches targeting immutable invoices are suppressed (isCurrentBillingPeriod / isMutableInvoice), keeping dry-run output focused on actionable drift on materialized resources.", + "example": "if !isDryRunLoggablePatch(patch, invoicesByID) { suppressedDryRunPatches++; continue }; patch.Log(u.logger)" + } + ], + "key_file_guides": [ + { + "file": "patch.go", + "role": "Defines PatchOperation constants, the Patch tagged-union and per-variant payload structs (PatchLineCreate/Delete/Update, PatchSplitLineGroup Delete/Update), constructors, AsXxxPatch accessors, Patch.Log, and GetDeletePatchesForLine.", + "watch_for": "GetDeletePatchesForLine skips lines annotated billing.AnnotationSubscriptionSyncIgnore and already-deleted lines; for a hierarchy it emits a group-delete plus per-line deletes but bails entirely if ANY line is sync-ignored. Adding a PatchOperation requires updating Patch.Log too." + }, + { + "file": "invoiceupdate.go", + "role": "Updater (New(billingService, logger)) with ApplyPatches as the single entry point; holds parsePatches, the three invoice-update paths, validation-issue helpers, and dry-run logging.", + "watch_for": "ApplyPatches order matters: provision new lines -> list affected invoices (IncludeDeleted: true) -> per-invoice line updates -> upsertSplitLineGroups last. updateMutableStandardInvoice deletes the invoice when NonDeletedLineCount()==0 (unless still gathering) and logs validation issues on StandardInvoiceStatusDeleteFailed. Service-period equality uses .Truncate(streaming.MinimumWindowSizeDuration)." + }, + { + "file": "feehelper.go", + "role": "Flat-fee price helpers over billing line readers/writers: IsFlatFee, GetFlatFeePerUnitAmount, SetFlatFeePerUnitAmount.", + "watch_for": "All three nil-guard the line and price; AsFlat() can error if the line lacks usage-based metadata. SetFlatFeePerUnitAmount mutates the flatPrice then re-wraps via productcatalog.NewPriceFrom + line.SetPrice \u2014 don't assume in-place mutation of the price persists without SetPrice." + } + ], + "anti_patterns": [ + "Constructing Patch{} literals or reading variant fields directly instead of using the NewXxxPatch constructors and AsXxxPatch accessors.", + "Mutating lines or amounts on an immutable standard invoice instead of appending a warning ValidationIssue via newValidationIssueOnLine/mergeValidationIssues.", + "Editing invoice lines outside an UpdateStandardInvoice/UpdateGatheringInvoice EditFn, or omitting IncludeDeletedLines: true so soft-deletes are not seen.", + "Replacing a line on a mutable invoice without first re-running billingService.SnapshotLineQuantity to refresh usage quantity.", + "Adding a new PatchOperation without extending parsePatches and Patch.Log (their default branches error / log 'unknown patch operation')." + ], + "decisions": [ + { + "decision": "Patch is a hand-rolled tagged union with op-guarded accessors rather than an interface.", + "rationale": "Lets parsePatches exhaustively switch on Op() and lets accessors fail loudly when the variant is wrong, keeping create/delete/update of lines and split-line groups in one comparable, loggable type." + }, + { + "decision": "Immutable invoices are never mutated; drift becomes deduplicated warning ValidationIssues.", + "rationale": "Finalized invoices must stay stable, but subscription sync still needs to surface that target state diverged, so it records actionable warnings (ImmutableInvoiceHandlingNotSupportedErrorCode) idempotently." + }, + { + "decision": "Updater holds only billing.Service plus a logger and performs all writes through service methods.", + "rationale": "Keeps this reconciler write-side at the service layer (transaction/state-machine semantics owned by billing.Service) instead of touching adapters/Ent directly." + } + ], + "code_examples": [ + { + "scenario": "Update a line on a mutable standard invoice via EditFn with quantity re-snapshot", + "code": "u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{\n Invoice: invoice.GetInvoiceID(),\n IncludeDeletedLines: true,\n EditFn: func(invoice *billing.StandardInvoice) error {\n targetStandardLine, err := targetState.AsInvoiceLine().AsStandardLine()\n if err != nil { return err }\n updatedQtyLine, err := u.billingService.SnapshotLineQuantity(ctx, billing.SnapshotLineQuantityInput{Invoice: invoice, Line: &targetStandardLine})\n if err != nil { return err }\n targetStandardLine = *updatedQtyLine\n if ok := invoice.Lines.ReplaceByID(targetStandardLine.ID, &targetStandardLine); !ok {\n return fmt.Errorf(\"line[%s] not found\", targetStandardLine.ID)\n }\n return nil\n },\n})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w77.json b/.archie/enrichments/w77.json new file mode 100644 index 0000000000..a2451ed8e9 --- /dev/null +++ b/.archie/enrichments/w77.json @@ -0,0 +1,115 @@ +{ + "openmeter/cost/adapter": { + "purpose": "Implements cost.Adapter: queries metered usage for a feature, resolves per-unit costs (manual or LLM provider/model/token-type pricing), and aggregates usage rows into priced CostQueryRows. It is the only place that translates feature unit-cost config + streaming meter rows into monetary cost.", + "patterns": [ + { + "name": "Adapter struct with constructor New and interface assertion", + "description": "New(...) returns cost.Adapter wrapping a private adapter struct; a compile-time `var _ cost.Adapter = (*adapter)(nil)` enforces the contract. New takes exactly its four collaborators (feature.FeatureConnector, meter.Service, streaming.Connector, llmcost.Service) as positional args.", + "example": "func New(featureConnector feature.FeatureConnector, meterService meterpkg.Service, streamingConnector streaming.Connector, llmcostService llmcost.Service) cost.Adapter" + }, + { + "name": "Feature filters take precedence over caller filters", + "description": "In QueryFeatureCost, feat.MeterGroupByFilters are merged on top of params.FilterGroupBy so callers cannot widen usage beyond the feature's filter scope. Always overlay feature filters last.", + "example": "for k, v := range feat.MeterGroupByFilters { merged[k] = v }" + }, + { + "name": "Internal group-by keys added for resolution, then aggregated away", + "description": "addLLMGroupByKeys appends provider/model/token_type properties to params.GroupBy only if missing, returning the internally-added keys. computeCostRows aggregates rows back across those internal keys (filterGroupBy strips them) so the user-visible grouping is preserved.", + "example": "internalGroupByKeys := addLLMGroupByKeys(feat, ¶ms)" + }, + { + "name": "Pre-resolve LLM prices into a cache keyed by (provider, model)", + "description": "getLLMPrices scans all rows once and resolves each unique llmPriceKey{provider, modelID} via llmcostService.ResolvePrice; resolveLLMUnitCost only reads the cache and must never call ResolvePrice itself. Missing provider/model caches a PriceNotFoundError instead of leaving the key absent.", + "example": "cache[key] = llmPriceResult{price: price, err: err}" + }, + { + "name": "Not-found pricing is a non-fatal detail, not an error", + "description": "makeCostResolver converts models.IsGenericNotFoundError into a (nil cost, detail string, nil err) result; only non-not-found errors are fatal. costResolverFunc's contract: non-nil error is fatal, nil cost + non-empty detail means pricing unavailable.", + "example": "if models.IsGenericNotFoundError(err) { return nil, err.Error(), nil }" + }, + { + "name": "Resolve dimensions from static value OR group-by property", + "description": "resolveDimension returns the static value if set, else looks up the configured ...Property key in groupByValues. resolveUnitCost switches on feat.UnitCost.Type (UnitCostTypeManual / UnitCostTypeLLM) and errors on unknown types. Always NormalizeModelID(provider, modelID) before lookups in both getLLMPrices and resolveLLMUnitCost.", + "example": "provider, modelID = llmcost.NormalizeModelID(provider, modelID)" + }, + { + "name": "Defensive copy of caller slices/maps before mutation", + "description": "QueryFeatureCost clones params.GroupBy via slices.Clone and builds a fresh merged FilterGroupBy map so it never mutates the caller's input.QueryParams.", + "example": "params.GroupBy = slices.Clone(params.GroupBy)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Adapter implementation: QueryFeatureCost orchestration, LLM price pre-resolution (getLLMPrices), group-by key injection (addLLMGroupByKeys), and unit-cost resolution (resolveUnitCost / resolveLLMUnitCost / resolveDimension).", + "watch_for": "resolveLLMUnitCost assumes the price is already in priceCache and errors hard if not \u2014 any new row source must also flow through getLLMPrices. Validation of feat.MeterID and feat.UnitCost happens here, not in the service." + }, + { + "file": "compute.go", + "role": "Pure aggregation/pricing math: computeCostRows, costRowAccumulator (addUsage/finalize), buildDirectCostRow, filterGroupBy, costPerTokenForType, buildCacheKey, and the costResolverFunc type.", + "watch_for": "Aggregation key is built from WindowStart/End + Subject + CustomerID + external group-by values; changing it changes grouping semantics. Cost uses alpacadecimal (usage.Mul(amount)); rows are sorted by cost descending with nil-cost rows last. buildCacheKey must stay deterministic (sorted keys, NUL separator)." + }, + { + "file": "compute_test.go", + "role": "Table-driven unit tests for computeCostRows covering no-aggregation, internal-key aggregation, per-subject/per-window grouping, external-key preservation, and price-not-found detail handling.", + "watch_for": "Tests drive computeCostRows directly with a hand-built costResolverFunc (makeResolver); they do not exercise the LLM cache path. Decimal assertions use .Equal, not float compare." + } + ], + "anti_patterns": [ + "Calling llmcostService.ResolvePrice from inside resolveLLMUnitCost or per-row \u2014 prices must be batch-resolved once in getLLMPrices and read from the cache.", + "Mutating input.QueryParams.GroupBy or FilterGroupBy in place instead of cloning/merging into fresh structures.", + "Returning a fatal error when a price/token-type is unavailable \u2014 surface it as a row Detail via the not-found path so partial results still return.", + "Skipping llmcost.NormalizeModelID before building llmPriceKey or calling ResolvePrice, causing cache misses against canonical DB forms.", + "Adding business validation (feature has no meter / no unit cost) anywhere other than the adapter's QueryFeatureCost entry." + ], + "decisions": [ + { + "decision": "Pre-resolve prices keyed only by (provider, model), not token_type.", + "rationale": "ResolvePrice depends only on provider+model; token-type cost is extracted later via costPerTokenForType, avoiding redundant service calls for input/output/cache token types of the same model." + }, + { + "decision": "Inject LLM dimension keys into GroupBy, then aggregate them away.", + "rationale": "Per-row unit cost differs by provider/model/token_type, but users may not request those dimensions; internal-then-aggregate keeps pricing correct while honoring the requested grouping." + } + ], + "code_examples": [ + { + "scenario": "Resolve a per-row LLM unit cost from the pre-resolved price cache", + "code": "key := llmPriceKey{provider, modelID}\ncached, ok := priceCache[key]\nif !ok {\n return nil, fmt.Errorf(\"resolving LLM price for provider=%s model=%s: price not in cache\", provider, modelID)\n}\nif cached.err != nil {\n return nil, cached.err\n}\namount, err := costPerTokenForType(cached.price.Pricing, feature.LLMTokenType(tokenTypeStr))\nif err != nil {\n return nil, models.NewGenericNotFoundError(err)\n}\nreturn &cost.ResolvedUnitCost{Amount: amount, Currency: currencyx.Code(cached.price.Currency)}, nil" + } + ] + }, + "openmeter/cost/service": { + "purpose": "Thin service layer (package costservice) that validates input and delegates to cost.Adapter. Holds no business logic beyond input.Validate() \u2014 all cost computation lives in the adapter.", + "patterns": [ + { + "name": "Config-validated constructor returning (*Service, error)", + "description": "New(config Config) validates Config (adapter must be non-nil) before constructing. Service satisfies cost.Service via `var _ cost.Service = (*Service)(nil)`.", + "example": "func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Validate input then delegate to adapter", + "description": "Each method calls input.Validate() and forwards to the wrapped cost.Adapter with no other logic.", + "example": "func (s *Service) QueryFeatureCost(ctx, input) { if err := input.Validate(); err != nil { return nil, err }; return s.adapter.QueryFeatureCost(ctx, input) }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Defines Service, Config, Config.Validate, New, and QueryFeatureCost delegation.", + "watch_for": "Do not add cost/pricing logic here \u2014 keep it a validation-and-delegation passthrough; the package is named costservice, not adapter or cost." + } + ], + "anti_patterns": [ + "Putting cost computation, meter querying, or LLM resolution in the service instead of the adapter.", + "Constructing Service without going through New / Config.Validate (skips the non-nil adapter check)." + ], + "decisions": [ + { + "decision": "Service is a validation passthrough over the adapter.", + "rationale": "Follows the repo's service/adapter split so the adapter owns I/O and computation while the service owns input validation and the public cost.Service contract." + } + ], + "code_examples": [] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w78.json b/.archie/enrichments/w78.json new file mode 100644 index 0000000000..77abb721e1 --- /dev/null +++ b/.archie/enrichments/w78.json @@ -0,0 +1,368 @@ +{ + "openmeter/credit/adapter": { + "purpose": "Ent/Postgres persistence layer for the credit domain: implements grant.Repo (grant CRUD/list/void) and balance.SnapshotRepo (balance snapshot save/invalidate/get-latest). All access is transaction-aware via entutils.", + "patterns": [ + { + "name": "Transacting repo wrapper", + "description": "Read/write methods wrap their body in entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to a tx already in ctx; the repo also implements Tx/WithTx/Self (TxCreator + TxUser).", + "example": "func (b *balanceSnapshotRepo) Save(ctx, owner, balances) error { return entutils.TransactingRepoWithNoValue(ctx, b, func(ctx, rep *balanceSnapshotRepo) error { ... }) }" + }, + { + "name": "Entity-to-domain mapping helper", + "description": "Each repo has a package-private mapXxxEntity(*db.X) domain.Y that converts ent rows to domain models, normalizing times to UTC via .In(time.UTC) and convert.SafeToUTC.", + "example": "func mapGrantEntity(entity *db.Grant) grant.Grant { ... CreatedAt: entity.CreatedAt.In(time.UTC) ... }" + }, + { + "name": "Not-found maps to domain error", + "description": "On db.IsNotFound(err) return a typed domain error (credit.GrantNotFoundError, balance.NoSavedBalanceForOwnerError), never the raw ent error.", + "example": "if db.IsNotFound(err) { return grant.Grant{}, &credit.GrantNotFoundError{GrantID: grantID.ID} }" + }, + { + "name": "Soft-delete via DeletedAt/VoidedAt", + "description": "Deletes and voids are updates that set DeletedAt/VoidedAt with clock.Now(); list queries filter with DeletedAtIsNil()/DeletedAtGT(now) rather than physical deletes.", + "example": "g.db.Grant.Update().SetDeletedAt(clock.Now()).Where(db_grant.OwnerID(...)).Exec(ctx)" + }, + { + "name": "Dual pagination (page vs limit/offset)", + "description": "ListGrants branches on params.Page.IsZero(): zero page uses Limit/Offset and returns Items only; otherwise query.Paginate(ctx, page) fills TotalCount.", + "example": "if params.Page.IsZero() { query = query.Limit(...).Offset(...) } else { paged, _ := query.Paginate(ctx, params.Page) }" + } + ], + "key_file_guides": [ + { + "file": "grant.go", + "role": "grantDBADapter implements grant.Repo: CreateGrant, VoidGrant, DeleteOwnerGrants, ListGrants, ListActiveGrantsBetween, GetGrant + mapGrantEntity.", + "watch_for": "CreateGrant/VoidGrant have TODO comments about missing tx+locking; negative-amount grants are silently filtered (AmountGTE(0)) in ListActiveGrantsBetween; VoidedAt is truncated to the minute on read for legacy consistency." + }, + { + "file": "balance_snapshot.go", + "role": "balanceSnapshotRepo implements balance.SnapshotRepo: InvalidateAfter, GetLatestValidAt, Save (CreateBulk) + mapBalanceSnapshotEntity.", + "watch_for": "GetLatestValidAt orders by At desc then UpdatedAt desc to pick newest snapshot for the same time; returned snapshot may have nil Usage which the balance service backfills." + }, + { + "file": "transaction.go", + "role": "Implements entutils.TxCreator/TxUser (Tx/WithTx/Self) for both repos via db.HijackTx and NewTxClientFromRawConfig.", + "watch_for": "Both repos use ReadOnly:false; WithTx rebuilds a fresh repo from the tx config \u2014 do not capture the non-tx *db.Client inside transacting closures." + } + ], + "anti_patterns": [ + "Accessing rep.db directly without wrapping in entutils.TransactingRepo(WithNoValue) \u2014 breaks tx propagation from ctx.", + "Returning raw ent errors instead of credit.GrantNotFoundError / balance.NoSavedBalanceForOwnerError.", + "Physically deleting rows instead of setting DeletedAt/VoidedAt.", + "Building domain times without .In(time.UTC) normalization in map* helpers." + ], + "decisions": [ + { + "decision": "Snapshots are append-only and invalidated (not updated) via InvalidateAfter setting DeletedAt.", + "rationale": "Balance is recomputed from the latest valid snapshot + streaming usage, so historical snapshots must remain immutable and orderable." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware read returning a typed not-found error", + "code": "func (g *grantDBADapter) GetGrant(ctx context.Context, grantID models.NamespacedID) (grant.Grant, error) {\n\tent, err := g.db.Grant.Query().Where(db_grant.ID(grantID.ID), db_grant.Namespace(grantID.Namespace)).Only(ctx)\n\tif err != nil {\n\t\tif db.IsNotFound(err) {\n\t\t\treturn grant.Grant{}, &credit.GrantNotFoundError{GrantID: grantID.ID}\n\t\t}\n\t\treturn grant.Grant{}, err\n\t}\n\treturn mapGrantEntity(ent), nil\n}" + } + ] + }, + "openmeter/credit/balance": { + "purpose": "Defines the credit balance model (balance.Map of grantID->float64, Snapshot, SnapshottedUsage) and the SnapshotService that loads snapshots and backfills usage from the streaming connector. Pure computation + repo interface; no ent imports.", + "patterns": [ + { + "name": "Service wraps Repo and seals itself", + "description": "SnapshotService has the same methods as SnapshotRepo plus an unexported service() method so a repo can never accidentally satisfy the service interface.", + "example": "type SnapshotService interface { ...; service() }" + }, + { + "name": "Usage backfill on read", + "description": "GetLatestValidAt: if the stored Snapshot.Usage.IsZero(), the service recomputes usage via OwnerConnector.GetUsagePeriodStartAt + UsageQuerier.QueryUsage and fills it in before returning.", + "example": "if res.Usage.IsZero() { usage, _ := s.UsageQuerier.QueryUsage(ctx, owner, timeutil.ClosedPeriod{From: periodStart, To: res.At}); res.Usage = SnapshottedUsage{Usage: usage, Since: periodStart} }" + }, + { + "name": "Aggregation-aware usage query", + "description": "UsageQuerier.QueryUsage switches on owner.Meter.Aggregation: UNIQUE_COUNT does two period-start-anchored queries and subtracts (using alpacadecimal); SUM/COUNT/LATEST query the period directly; unknown aggregation errors.", + "example": "switch owner.Meter.Aggregation { case meter.MeterAggregationUniqueCount: ...; case meter.MeterAggregationSum, ...: ...; default: return 0, fmt.Errorf(\"unsupported aggregation %s\", ...) }" + }, + { + "name": "balance.Map value-type helpers", + "description": "Map is a plain map[string]float64 with Clone/Burn/Set/Balance/ExactlyForGrants; ExactlyForGrants asserts the map's grant set exactly matches a grant slice (used as an engine invariant).", + "example": "if !startingBalances.ExactlyForGrants(grants) { return error }" + } + ], + "key_file_guides": [ + { + "file": "balance.go", + "role": "Map type + helpers, SnapshottedUsage, Snapshot (Balances/Overage/At/Usage), NewStartingMap.", + "watch_for": "Map.Burn does balance - amount with no zero floor \u2014 overage handling lives in the engine, not here; Snapshot.Balance() sums all entries including inactive grants." + }, + { + "file": "service.go", + "role": "SnapshotService interface + service struct; NewSnapshotService builds an internal UsageQuerier from OwnerConnector callbacks.", + "watch_for": "Service delegates Invalidate/Save straight to Repo; only GetLatestValidAt adds backfill logic." + }, + { + "file": "usage.go", + "role": "UsageQuerier interface + impl; translates owner meter aggregation into streaming.QueryParams windows.", + "watch_for": "UNIQUE_COUNT requires the two-query subtraction; getValueFromRows errors if >1 row and returns 0 for 0 rows." + }, + { + "file": "repository.go", + "role": "SnapshotRepo interface + NoSavedBalanceForOwnerError.", + "watch_for": "Repo.GetLatestValidAt may return a Snapshot without usage data \u2014 callers must use the service for backfill." + } + ], + "anti_patterns": [ + "Importing openmeter/ent here \u2014 this package is persistence-agnostic; the adapter implements SnapshotRepo.", + "Letting a Repo satisfy SnapshotService \u2014 the sealing service() method forbids it.", + "Querying UNIQUE_COUNT meters with a single window instead of the period-start subtraction.", + "Treating Snapshot.Balance() as 'active balance' \u2014 it includes inactive/expired grants still present in the Map." + ], + "decisions": [ + { + "decision": "Usage may be stored zero in a snapshot and recomputed lazily at read time.", + "rationale": "Older snapshots predate stored usage; backfilling from streaming keeps GetLatestValidAt correct without a data migration." + }, + { + "decision": "UNIQUE_COUNT usage is derived by subtracting two cumulative point-in-time queries.", + "rationale": "UNIQUE_COUNT is non-additive over arbitrary windows, so a period delta must be computed from period-start anchored counts." + } + ], + "code_examples": [ + { + "scenario": "Backfilling usage when a snapshot was stored without it", + "code": "func (s *service) GetLatestValidAt(ctx context.Context, owner models.NamespacedID, at time.Time) (Snapshot, error) {\n\tres, err := s.Repo.GetLatestValidAt(ctx, owner, at)\n\tif err != nil { return Snapshot{}, err }\n\tif res.Usage.IsZero() {\n\t\tperiodStart, err := s.OwnerConnector.GetUsagePeriodStartAt(ctx, owner, res.At)\n\t\tif err != nil { return Snapshot{}, err }\n\t\tusage, err := s.UsageQuerier.QueryUsage(ctx, owner, timeutil.ClosedPeriod{From: periodStart, To: res.At})\n\t\tif err != nil { return Snapshot{}, err }\n\t\tres.Usage = SnapshottedUsage{Usage: usage, Since: periodStart}\n\t}\n\treturn res, nil\n}" + } + ] + }, + "openmeter/credit/driver": { + "purpose": "HTTP transport layer (package creditdriver) for credit grants: builds httptransport handlers for ListGrants (v1, array-or-paginated union), VoidGrant, and ListGrantsV2. Maps credit/grant domain objects into entitlement-grant API shapes.", + "patterns": [ + { + "name": "Three-stage httptransport handler", + "description": "Every endpoint is httptransport.NewHandlerWithArgs[Req,Resp,Params] with a decode fn (resolve namespace, parse params into grant.ListParams), a business fn (call grantRepo/grantConnector), and a response encoder.", + "example": "httptransport.NewHandlerWithArgs[ListGrantsHandlerRequest, ListGrantsHandlerResponse, ListGrantsHandlerParams](decode, handle, commonhttp.JSONResponseEncoder, opts...)" + }, + { + "name": "Namespace resolution gate", + "description": "Each decode fn calls h.resolveNamespace(ctx) (wrapping namespaceDecoder.GetNamespace) and returns 500 if absent before constructing the request.", + "example": "ns, err := h.resolveNamespace(ctx); if err != nil { return Req{}, err }" + }, + { + "name": "Per-handler error encoder", + "description": "Handlers append httptransport.WithErrorEncoder to translate domain errors: models.IsGenericValidationError -> 400, *credit.GrantNotFoundError -> 404, *pagination.InvalidError -> 400.", + "example": "if _, ok := err.(*credit.GrantNotFoundError); ok { commonhttp.NewHTTPError(http.StatusNotFound, err).EncodeError(ctx, w); return true }" + }, + { + "name": "Domain grant mapped through entitlement grant", + "description": "credit grants are converted via meteredentitlement.GrantFromCreditGrant then entitlement_httpdriver.MapEntitlementGrantToAPI (v1) / ...v2.MapEntitlementGrantToAPIV2 \u2014 there is no direct credit-grant API mapper.", + "example": "eg, _ := meteredentitlement.GrantFromCreditGrant(grant, clock.Now()); apiGrant := entitlement_httpdriver.MapEntitlementGrantToAPI(eg)" + }, + { + "name": "Backward-compatible union response", + "description": "ListGrants returns commonhttp.Union[[]Grant, Result[Grant]]: when Page.IsZero() it emits a bare array (Option1), otherwise a paginated object (Option2).", + "example": "if request.params.Page.IsZero() { response.Option1 = &apiGrants } else { response.Option2 = &pagination.Result[...]{...} }" + } + ], + "key_file_guides": [ + { + "file": "grant.go", + "role": "GrantHandler interface + grantHandler with ListGrants/VoidGrant/ListGrantsV2; holds namespaceDecoder, grantConnector, grantRepo, customerService.", + "watch_for": "Listing goes through grantRepo.ListGrants but voiding goes through grantConnector.VoidGrant; OrderBy strings are CamelToSnake-converted and validated against grant.OrderBy().StrValues(); V2 resolves Customer IDs-or-keys via customerService and skips deleted customers." + } + ], + "anti_patterns": [ + "Reading the namespace from the request body/path instead of namespaceDecoder.GetNamespace via resolveNamespace.", + "Returning domain errors unmapped \u2014 every handler must register WithErrorEncoder for validation/not-found/pagination errors.", + "Building API grant DTOs directly instead of routing through GrantFromCreditGrant + entitlement MapEntitlementGrantToAPI(V2).", + "Dropping the v1 array-vs-paginated union behavior keyed on Page.IsZero() (breaks backward compatibility)." + ], + "decisions": [ + { + "decision": "Credit grants are exposed under the entitlement-grant API shape, not their own.", + "rationale": "Grants are always owned by metered entitlements; the comment in code notes 'entitlement grants are all we have', avoiding a duplicate public surface." + }, + { + "decision": "ListGrants keeps a polymorphic array-or-paginated response.", + "rationale": "Older clients depend on the bare-array form when no pagination params are supplied." + } + ], + "code_examples": [] + }, + "openmeter/credit/engine": { + "purpose": "Pure, stateless grant burn-down engine. Engine.Run takes a starting balance Snapshot, grants, a reset Timeline and a usage-query function, then produces the ending Snapshot plus a GrantBurnDownHistory of per-segment usage. No DB/IO except the injected QueryUsage callback.", + "patterns": [ + { + "name": "Reset-period then burn-phase decomposition", + "description": "Run splits [StartingSnapshot.At, Until] at reset times into closed periods (runBetweenResets per period, reset() between them), and within each period getPhases splits on grant recurrence and priority changes into burnPhases.", + "example": "for idx, period := range timeline.GetClosedPeriods() { runRes := e.runBetweenResets(...); if idx != last { snap := e.reset(...); segments[last].TerminationReasons.UsageReset = true } }" + }, + { + "name": "Decimal-exact burndown over float storage", + "description": "burnDownGrants converts usage/balances to alpacadecimal for subtraction to limit float error, returning float64 results and per-grant GrantUsage with TerminationReason (EXHAUSTED vs SEGMENT_TERMINATION).", + "example": "exactUsage := alpacadecimal.NewFromFloat(usage); if exactBalance.LessThanOrEqual(exactUsage) { exactUsage = exactUsage.Sub(exactBalance); ... }" + }, + { + "name": "Deterministic grant prioritization", + "description": "PrioritizeGrants stable-sorts by (1) priority asc, (2) earlier expiration first, (3) tie-break created_at then id \u2014 applied initially and re-applied whenever a phase has priorityChange.", + "example": "PrioritizeGrants(grants) // priority < then expiration < then created_at,id" + }, + { + "name": "Recurrence/activity drive balance resets, not the order", + "description": "Recurrence sets balance to grant.RecurrenceBalance (full Amount); grants newly active at phase.from get full Amount; grants becoming inactive get balance 0; LATEST-aggregation meters treat Amount as a per-point limit (reset each phase).", + "example": "if params.Meter.Aggregation == meter.MeterAggregationLatest { for _, g := range activeGrants { balancesAtPhaseStart[g.ID] = g.Amount } }" + }, + { + "name": "Balance/grant-set invariant", + "description": "runBetweenResets requires StartingSnapshot.Balances.ExactlyForGrants(Grants); filterRelevantGrants narrows grants to those overlapping the period or present in the balance map before each run.", + "example": "if !params.StartingSnapshot.Balances.ExactlyForGrants(params.Grants) { return error }" + }, + { + "name": "History chunked by resets", + "description": "GrantBurnDownHistory stores ordered non-overlapping segments + usageAtStart; ChunkByResets/GetUsageInPeriodUntilSegment recompute SnapshottedUsage relative to the last UsageReset segment.", + "example": "for _, seg := range g.segments { current.segments = append(...); if seg.TerminationReasons.UsageReset { chunks = append(chunks, current); current = ...usageAtReset(seg.To) } }" + } + ], + "key_file_guides": [ + { + "file": "engine.go", + "role": "Engine interface, RunParams/RunResult, NewEngine(EngineConfig{QueryUsage}).", + "watch_for": "Output balance includes inactive grants (documented); QueryUsageFn returns float64 (TODO to make decimal); RunParams.Clone deep-copies grants and resets." + }, + { + "file": "run.go", + "role": "Run (period loop + reset) and runBetweenResets (phase loop + burndown), burnDownGrants, inbetweenRunParams.", + "watch_for": "Reset times must occur strictly after StartingSnapshot.At and within [At, Until] or Run errors; PeriodEndRecurrenceBoundaryBehavior is Inclusive only for the final period; burndown has a documented float rounding FIXME." + }, + { + "file": "burnphase.go", + "role": "getPhases: merges activity changes and recurrence times into ordered burnPhases, handling grantsRecurredAtStart and terminal zero-length phases.", + "watch_for": "Empty/zero-length phases are dropped by appendPhase unless phase.to.After(phase.from); a terminal recurrence appends a 0-length phase at period.To." + }, + { + "file": "grant.go", + "role": "getGrantActivityChanges, getGrantRecurrenceTimes, filterRelevantGrants, PrioritizeGrants.", + "watch_for": "Activity changes are truncated to the minute and UTC-normalized (FIXME noted); recurrence iteration uses endBoundaryBehavior and grant.ActiveAt to bound times." + }, + { + "file": "history.go", + "role": "GrantBurnDownHistorySegment, GrantBurnDownHistory, NewGrantBurnDownHistory (validates no overlap), ChunkByResets, TotalGrantUsage.", + "watch_for": "MarshalJSON serializes only segments (usageAtStart is internal); GetUsageInPeriodUntilSegment resets the running usage at the last UsageReset segment." + }, + { + "file": "reset.go", + "role": "reset(): rolls over active grants via RolloverBalance, optionally preserves overage, re-prioritizes and burns down at the reset boundary.", + "watch_for": "Inactive-at-reset grants are skipped from rollover; missing grant in grantMap is an internal inconsistency error." + } + ], + "anti_patterns": [ + "Doing IO inside the engine \u2014 all usage comes through the injected QueryUsage callback.", + "Passing balances whose key set doesn't ExactlyForGrants the grants slice (runBetweenResets rejects it).", + "Subtracting usage from balances with raw float64 instead of alpacadecimal in burndown logic.", + "Assuming a grant absent from the period is excluded from the output Snapshot \u2014 inactive grants remain in the Map with 0/rolled-over balance.", + "Skipping re-prioritization after a phase.priorityChange or recurrence application." + ], + "decisions": [ + { + "decision": "The engine is split into reset-bounded periods, then recurrence/priority burn phases.", + "rationale": "Resets roll over balances and may preserve overage (different semantics than recurrence), while phases capture priority/recurrence changes that alter burn order \u2014 separating them keeps burndown deterministic and resumable across multiple Run calls." + }, + { + "decision": "Same period computed across multiple Run invocations yields identical results (fuzz-tested).", + "rationale": "Balance computation must be incrementally resumable from any snapshot, so the engine is required to be deterministic and split-invariant." + }, + { + "decision": "LATEST-aggregation meters reset grant balance to Amount each phase.", + "rationale": "For point-in-time meters grant Amounts are limits, not consumable budgets, so usage is deducted from the full amount per phase." + } + ], + "code_examples": [ + { + "scenario": "Splitting the run into reset periods and resetting between them", + "code": "for idx, period := range timeline.GetClosedPeriods() {\n\trelevantGrants := e.filterRelevantGrants(params.Grants, snapshot.Balances, period)\n\trunRes, err := e.runBetweenResets(ctx, inbetweenRunParams{\n\t\tGrants: relevantGrants, Until: period.To, StartingSnapshot: snapshot, Meter: params.Meter,\n\t\tPeriodEndRecurrenceBoundaryBehavior: lo.Ternary(idx == len(timeline.GetClosedPeriods())-1, timeutil.Inclusive, timeutil.Exclusive),\n\t})\n\tif err != nil { return RunResult{}, err }\n\tsnapshot = runRes.Snapshot\n\thistorySegments = append(historySegments, runRes.History.Segments()...)\n\tif idx != len(timeline.GetClosedPeriods())-1 {\n\t\tsnapshot, _ = e.reset(relevantGrants, runRes.Snapshot, params.ResetBehavior, period.To)\n\t\thistorySegments[len(historySegments)-1].TerminationReasons.UsageReset = true\n\t}\n}" + } + ] + }, + "openmeter/credit/grant": { + "purpose": "Core grant domain model: the immutable Grant aggregate (amount, priority, effective/expiration, recurrence, rollover), its Repo interface, the OwnerConnector abstraction over the grant owner (entitlement), and versioned grant.created/grant.voided Watermill events.", + "patterns": [ + { + "name": "Effective-period derivation", + "description": "Grant.GetEffectivePeriod folds EffectiveAt/ExpiresAt with DeletedAt and VoidedAt into a StartBoundedPeriod, clamping To to the earliest cutoff and collapsing to a zero-length period when a grant never activates; ActiveAt delegates to it.", + "example": "func (g Grant) ActiveAt(t time.Time) bool { return g.GetEffectivePeriod().Contains(t) }" + }, + { + "name": "Versioned events: v1 embeds, v2 uses literals", + "description": "Deprecated grantEventV1 embeds the Grant domain struct (CreatedEvent/VoidedEvent); v2 (CreatedEventV2/VoidedEventV2) uses grantEventV2GrantLiteral primitives with ToDomainGrant/mapGrantToV2Literal so domain changes don't break serialized events.", + "example": "func NewCreatedEventV2FromGrant(g Grant, c streaming.Customer) CreatedEventV2 { return CreatedEventV2{Namespace: ..., Grant: mapGrantToV2Literal(g), CustomerID: c.GetUsageAttribution().ID} }" + }, + { + "name": "Repo is transaction-capable", + "description": "Repo embeds entutils.TxCreator and entutils.TxUser[Repo] alongside CRUD methods, so the adapter must implement Tx/WithTx/Self.", + "example": "type Repo interface { CreateGrant(...); ...; entutils.TxCreator; entutils.TxUser[Repo] }" + }, + { + "name": "OwnerConnector resolves owner usage/reset semantics", + "description": "OwnerConnector abstracts the grant owner (a metered entitlement): DescribeOwner (Meter + DefaultQueryParams + StreamingCustomer), reset timeline/usage-period queries, EndCurrentUsagePeriod, and LockOwnerForTx.", + "example": "DescribeOwner(ctx, id) (Owner, error); GetResetTimelineInclusive(ctx, id, period) (timeutil.SimpleTimeline, error)" + }, + { + "name": "Rollover/recurrence balance math on the model", + "description": "RolloverBalance clamps to [ResetMinRollover, ResetMaxRollover]; RecurrenceBalance returns the full Amount (no rollover for recurring grants); GetExpiration computes ExpiresAt from EffectiveAt+ExpirationPeriod.", + "example": "func (g Grant) RolloverBalance(b float64) float64 { return math.Min(g.ResetMaxRollover, math.Max(g.ResetMinRollover, b)) }" + } + ], + "key_file_guides": [ + { + "file": "grant.go", + "role": "Grant aggregate (ManagedModel+NamespacedModel) and its methods: Validate, GetExpiration, GetEffectivePeriod, ActiveAt, RolloverBalance, RecurrenceBalance, GetNamespacedID/Owner.", + "watch_for": "Grant is documented as immutable; ExpiresAt is exclusive; Validate currently always returns nil; Priority is uint8 with lower = higher priority." + }, + { + "file": "owner_connector.go", + "role": "Owner struct, ResetBehavior, OwnerConnector interface, OwnerNotFoundError (+NewOwnerNotFoundError wrapping models.NewGenericNotFoundError).", + "watch_for": "GetResetTimelineInclusive's first returned time may precede the period start (documented semantics); both EndCurrentUsagePeriod and LockOwnerForTx mutate owner state." + }, + { + "file": "repo.go", + "role": "Repo interface, ListParams, RepoCreateInput, OrderBy enum + Values/StrValues.", + "watch_for": "Limit/Offset fields are marked deprecated in favor of Page; ListGrants returns a bare array for backward compat when pagination is absent." + }, + { + "file": "events.go", + "role": "Deprecated v1 events: grantEventV1 (embeds Grant), CreatedEvent, VoidedEvent, EventSubsystem='credit'.", + "watch_for": "Embedding the domain model means schema changes break old events \u2014 do not add new events here; use v2." + }, + { + "file": "events_2.go", + "role": "v2 events with primitive grantEventV2GrantLiteral, CreatedEventV2/VoidedEventV2, NewCreatedEventV2FromGrant/NewVoidedEventV2FromGrant.", + "watch_for": "v2 events carry CustomerID (from streaming.Customer usage attribution) and require it non-empty in Validate." + }, + { + "file": "expiration.go", + "role": "ExpirationPeriod (Count+Duration) and GetExpiration; ExpirationPeriodDuration enum HOUR/DAY/WEEK/MONTH/YEAR.", + "watch_for": "Unknown duration returns a zero time.Time; WEEK is implemented as Count*7 days." + } + ], + "anti_patterns": [ + "Adding new event types that embed the Grant domain struct (v1 pattern) \u2014 use primitive literals as in events_2.go.", + "Mutating a Grant in place \u2014 it is an immutable definition; balance changes live in the engine/balance.Map.", + "Computing active/expiry windows manually instead of GetEffectivePeriod (which clamps Deleted/Voided cutoffs).", + "Implementing Repo without the embedded entutils.TxCreator/TxUser[Repo] transaction methods." + ], + "decisions": [ + { + "decision": "Two event versions coexist; v2 serializes only primitives plus CustomerID.", + "rationale": "v1 embedded the domain model, so any field change broke replayed events; v2 decouples wire format from the domain and adds customer attribution for the streaming layer." + }, + { + "decision": "Grant is immutable and owner-agnostic via OwnerConnector.", + "rationale": "Grants belong to metered entitlements but the credit package stays decoupled from entitlement internals by depending only on the OwnerConnector interface and streaming.Customer." + } + ], + "code_examples": [ + { + "scenario": "Deriving a grant's effective period with deletion/void clamping", + "code": "func (g Grant) GetEffectivePeriod() timeutil.StartBoundedPeriod {\n\tp := timeutil.StartBoundedPeriod{From: g.EffectiveAt, To: g.ExpiresAt}\n\tif g.DeletedAt != nil {\n\t\tif p.To == nil || g.DeletedAt.Before(*p.To) { p.To = g.DeletedAt }\n\t}\n\tif g.VoidedAt != nil {\n\t\tif p.To == nil || g.VoidedAt.Before(*p.To) { p.To = g.VoidedAt }\n\t}\n\tif p.To != nil && p.To.Before(p.From) { p.To = &p.From }\n\treturn p\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w79.json b/.archie/enrichments/w79.json new file mode 100644 index 0000000000..2611dde577 --- /dev/null +++ b/.archie/enrichments/w79.json @@ -0,0 +1,56 @@ +{ + "openmeter/credit/hook": { + "purpose": "Lifecycle hook bridging the entitlement service to credit-grant cleanup: when a metered entitlement is deleted, its owner grants are removed. Wired into the entitlement service via the ServiceHook mechanism and feature-gated by credits.enabled.", + "patterns": [ + { + "name": "ServiceHook via type alias + NoopHook embed", + "description": "Hook types are aliases over the generic models.ServiceHook[entitlement.Entitlement]; the concrete struct embeds models.NoopServiceHook so only the relevant lifecycle method (PreDelete) is overridden and all other hook callbacks default to no-ops.", + "example": "type EntitlementHook = models.ServiceHook[entitlement.Entitlement]; type entitlementHook struct { NoopHook; grantRepo grant.Repo }" + }, + { + "name": "Constructor returns the alias interface, not the concrete type", + "description": "NewEntitlementHook returns EntitlementHook (the ServiceHook alias), keeping the concrete entitlementHook struct unexported. Dependencies are injected as constructor args, not pulled from globals.", + "example": "func NewEntitlementHook(grantRepo grant.Repo) EntitlementHook { return &entitlementHook{grantRepo: grantRepo} }" + }, + { + "name": "Tolerant PreDelete: nil and non-metered entitlements are skipped", + "description": "PreDelete returns nil (success, no-op) when the entitlement is nil or cannot be parsed as a metered entitlement via meteredentitlement.ParseFromGenericEntitlement. Only metered entitlements own grants, so a parse failure is treated as 'nothing to clean up', not an error.", + "example": "meteredEnt, err := meteredentitlement.ParseFromGenericEntitlement(ent); if err != nil { return nil }" + }, + { + "name": "Grant cleanup keyed by NamespacedID", + "description": "Owner-grant deletion is scoped by tenant: it calls grantRepo.DeleteOwnerGrants with models.NamespacedID{Namespace, ID} built from the metered entitlement, preserving multi-tenant isolation.", + "example": "return h.grantRepo.DeleteOwnerGrants(ctx, models.NamespacedID{Namespace: meteredEnt.Namespace, ID: meteredEnt.ID})" + } + ], + "key_file_guides": [ + { + "file": "entitlement_hook.go", + "role": "Defines EntitlementHook/NoopHook aliases, the entitlementHook struct, NewEntitlementHook constructor, and the PreDelete implementation that deletes owner grants for a deleted metered entitlement.", + "watch_for": "PreDelete must stay defensive: keep the nil-entitlement and ParseFromGenericEntitlement error guards returning nil, otherwise deleting non-metered entitlements would fail. Do not import the entitlement service/wiring layer here \u2014 depend only on grant.Repo and the entitlement domain types to avoid import cycles." + } + ], + "anti_patterns": [ + "Implementing the full ServiceHook surface manually instead of embedding NoopHook \u2014 drop NoopHook and you must implement every hook callback.", + "Returning an error from PreDelete when the entitlement is not metered; non-metered entitlements have no grants and must pass through cleanly.", + "Calling DeleteOwnerGrants without a namespace-scoped NamespacedID, which would cross tenant boundaries.", + "Injecting concrete services or the registry/wiring layer into the hook instead of the narrow grant.Repo dependency." + ], + "decisions": [ + { + "decision": "Grant cleanup lives in a hook rather than inline in the entitlement service.", + "rationale": "Keeps the entitlement service unaware of credits and lets the whole credit stack stay feature-gated by credits.enabled at the wiring layer \u2014 when credits are off, the hook is simply not registered." + }, + { + "decision": "Non-metered entitlements are silently ignored via ParseFromGenericEntitlement.", + "rationale": "Only metered entitlements own credit grants, so the hook is a no-op for other entitlement types and must not block their deletion." + } + ], + "code_examples": [ + { + "scenario": "Delete owner grants when a metered entitlement is removed", + "code": "import (\n\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n\tmeteredentitlement \"github.com/openmeterio/openmeter/openmeter/entitlement/metered\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)\n\nfunc (h *entitlementHook) PreDelete(ctx context.Context, ent *entitlement.Entitlement) error {\n\tif ent == nil {\n\t\treturn nil\n\t}\n\tmeteredEnt, err := meteredentitlement.ParseFromGenericEntitlement(ent)\n\tif err != nil {\n\t\treturn nil\n\t}\n\treturn h.grantRepo.DeleteOwnerGrants(ctx, models.NamespacedID{Namespace: meteredEnt.Namespace, ID: meteredEnt.ID})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w8.json b/.archie/enrichments/w8.json new file mode 100644 index 0000000000..cdadb2231d --- /dev/null +++ b/.archie/enrichments/w8.json @@ -0,0 +1,56 @@ +{ + "deploy/charts": { + "purpose": "Organisational root for OpenMeter's Helm distribution. Holds two independent charts \u2014 the full `openmeter` platform install and the lightweight `benthos-collector` sidecar \u2014 plus the shared helm-docs tooling (Makefile + template.md) that regenerates every chart README from its values.yaml comments.", + "patterns": [ + { + "name": "Generated READMEs via helm-docs", + "description": "Chart READMEs are never hand-written; `make docs` runs helm-docs with the shared `template.md` plus each chart's `README.tmpl.md`. Edit the template files and values.yaml `# --` comments, then regenerate.", + "example": "make docs # helm-docs -s file -c . -t $PWD/template.md -t README.tmpl.md" + }, + { + "name": "Shared badge/TL;DR template partials", + "description": "template.md defines reusable helm-docs partials (`chart.versionBadge`, `chart.artifactHubBadge`, `tldr`, `chart.base`) that every chart README inherits, so per-chart README.tmpl.md only supplies chart-specific prose.", + "example": "{{- define \"tldr\" -}} helm install --generate-name --wait oci://ghcr.io/openmeterio/helm-charts/{{ .Name }} {{- end -}}" + }, + { + "name": "Charts published as OCI artifacts", + "description": "Both charts are distributed via `oci://ghcr.io/openmeterio/helm-charts/` and indexed on artifacthub.io/packages/helm/openmeter/; install snippets and badge URLs derive from `.Name`.", + "example": "[![artifact hub](.../artifact%20hub-{{ .Name | replace \"-\" \"--\" }}-...)](https://artifacthub.io/packages/helm/openmeter/{{ .Name }})" + } + ], + "key_file_guides": [ + { + "file": "Makefile", + "role": "Single `docs` target that drives helm-docs across all charts using `-s file` (sort values by source order), `-c .` (this dir), the shared `template.md`, and each chart's `README.tmpl.md`.", + "watch_for": "Only sanctioned way to regenerate READMEs; running helm-docs without these flags reorders the values table and drops the shared badges." + }, + { + "file": "template.md", + "role": "helm-docs partial library: badge definitions (type/kube/appVersion/version/artifactHub), the `tldr` install block, and the `chart.base`/`chart.baseHead` composition that assembles each README.", + "watch_for": "Renaming a `define` here silently breaks every chart README referencing it; the OCI registry path `ghcr.io/openmeterio/helm-charts` is hardcoded in the `tldr` partial." + } + ], + "anti_patterns": [ + "Editing any chart's README.md by hand \u2014 it is overwritten on the next `make docs` from template.md + README.tmpl.md + values.yaml comments.", + "Adding a third chart without giving it a README.tmpl.md and re-running `make docs`, leaving it undocumented.", + "Forking the badge/TL;DR markup into a per-chart template instead of reusing the shared `template.md` partials.", + "Hardcoding a different OCI registry in a chart README instead of relying on the `tldr` partial's `ghcr.io/openmeterio/helm-charts/{{ .Name }}` path." + ], + "decisions": [ + { + "decision": "Two separate charts (openmeter, benthos-collector) rather than one umbrella chart with a toggle.", + "rationale": "The collector is an independently-deployed StatefulSet sidecar with its own lifecycle and a much smaller values contract; coupling it to the full platform chart would force unrelated upgrades." + }, + { + "decision": "Documentation is generated, with shared markup centralised in template.md.", + "rationale": "Keeps version/type/artifacthub badges and the install TL;DR identical across charts and keeps the values table in sync with the actual values.yaml `# --` comments." + } + ], + "code_examples": [ + { + "scenario": "Regenerate all chart READMEs after editing values.yaml documentation comments", + "code": "# from deploy/charts\nmake docs\n# == helm-docs --log-level trace -s file -c . -t $PWD/template.md -t README.tmpl.md\n# reads each chart's values.yaml `# --` comments + README.tmpl.md, applies template.md partials" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w80.json b/.archie/enrichments/w80.json new file mode 100644 index 0000000000..daab18eb8f --- /dev/null +++ b/.archie/enrichments/w80.json @@ -0,0 +1,143 @@ +{ + "openmeter/currencies/adapter": { + "purpose": "Ent/PostgreSQL persistence layer for the currencies domain, implementing the currencies.Adapter interface over the CustomCurrency and CurrencyCostBasis tables. It is the only place that touches entdb for custom currencies and FX cost-basis rates.", + "patterns": [ + { + "name": "Adapter satisfies currencies.Adapter", + "description": "The unexported adapter struct must implement currencies.Adapter; assert it at compile time in both files.", + "example": "var _ currencies.Adapter = (*adapter)(nil)" + }, + { + "name": "Constructor validates Config", + "description": "New(config Config) calls config.Validate() (Client must be non-nil) and returns (currencies.Adapter, error); never expose the concrete struct.", + "example": "func New(config Config) (currencies.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "Transaction-aware via entutils.TransactingRepo", + "description": "Every adapter method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, tx)...) so it rebinds to a tx carried in ctx. Implement Tx/WithTx/Self for entutils.TxCreator.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (...) { ... })" + }, + { + "name": "DB->domain mapping helpers", + "description": "Use mapCurrencyFromDB / mapCostBasisFromDB to translate entdb rows into currencies.Currency / currencies.CostBasis; never return entdb types. Normalize times with .In(time.UTC).", + "example": "func mapCostBasisFromDB(c *entdb.CurrencyCostBasis) currencies.CostBasis { ... EffectiveFrom: c.EffectiveFrom.In(time.UTC) }" + }, + { + "name": "Namespace-scoped queries", + "description": "Always filter by Namespace (e.g. customcurrency.Namespace, currencycostbasis.Namespace) from params; multi-tenancy is enforced here, not in the service.", + "example": "q := a.db.CustomCurrency.Query().Where(customcurrency.Namespace(params.Namespace))" + }, + { + "name": "Constraint errors map to conflict", + "description": "On Save, check entdb.IsConstraintError(err) and return models.NewGenericConflictError(...); wrap all other errors with fmt.Errorf(\"...: %w\", err).", + "example": "if entdb.IsConstraintError(err) { return currencies.Currency{}, models.NewGenericConflictError(...) }" + }, + { + "name": "pkg/filter + pagination helpers", + "description": "Apply field filters via filter.ApplyToQuery and prefer q.Paginate(ctx, params.Page) + pagination.MapResult for list results; manual Offset/Limit only when Page is non-zero.", + "example": "paged, err := q.Paginate(ctx, params.Page); return pagination.MapResult(paged, mapCostBasisFromDB), nil" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config/New constructor and the entutils.TxCreator plumbing (Tx, WithTx, Self) for transaction propagation.", + "watch_for": "WithTx must rebuild via entdb.NewTxClientFromRawConfig and carry logger forward; the logger field is currently never set by New." + }, + { + "file": "currencies.go", + "role": "Concrete CRUD/list implementations: ListCustomCurrencies, CreateCurrency, CreateCostBasis, ListCostBases, plus the FromDB mappers.", + "watch_for": "ListCustomCurrencies hand-rolls Offset/Limit (only when Page>0) while ListCostBases uses q.Paginate \u2014 keep ordering/default-order logic (entutils.GetOrdering) intact." + } + ], + "anti_patterns": [ + "Returning entdb.* types instead of mapping to currencies.Currency / currencies.CostBasis", + "Bypassing entutils.TransactingRepo or accessing a.db directly outside the tx wrapper", + "Querying without a Namespace predicate (breaks tenant isolation)", + "Returning a raw constraint error instead of models.NewGenericConflictError", + "Exposing the concrete adapter struct instead of the currencies.Adapter interface from New" + ], + "decisions": [ + { + "decision": "Adapter holds no business rules (no future-date checks, no fiat enumeration)", + "rationale": "All validation and fiat-vs-custom merging lives in the service; the adapter is a thin tenant-scoped persistence boundary." + } + ], + "code_examples": [ + { + "scenario": "Tenant-scoped create with conflict mapping", + "code": "func (a *adapter) CreateCurrency(ctx context.Context, params currencies.CreateCurrencyInput) (currencies.Currency, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (currencies.Currency, error) {\n\t\tcurr, err := a.db.CustomCurrency.Create().SetNamespace(params.Namespace).SetCode(params.Code).SetName(params.Name).SetSymbol(params.Symbol).Save(ctx)\n\t\tif err != nil {\n\t\t\tif entdb.IsConstraintError(err) {\n\t\t\t\treturn currencies.Currency{}, models.NewGenericConflictError(fmt.Errorf(\"currency with code %s already exists\", params.Code))\n\t\t\t}\n\t\t\treturn currencies.Currency{}, fmt.Errorf(\"failed to create currency: %w\", err)\n\t\t}\n\t\treturn mapCurrencyFromDB(curr), nil\n\t})\n}" + } + ] + }, + "openmeter/currencies/service": { + "purpose": "Business-logic layer for the currencies domain, implementing currencies.CurrencyService. It validates input, merges DB-backed custom currencies with ISO fiat currencies from gobl, and orchestrates transactions over the adapter.", + "patterns": [ + { + "name": "Service satisfies currencies.CurrencyService", + "description": "Service struct wraps a single currencies.Adapter; assert interface conformance and construct via New(adapter).", + "example": "var _ currencies.CurrencyService = (*Service)(nil); func New(adapter currencies.Adapter) *Service" + }, + { + "name": "Validate-then-Run guard", + "description": "Every public method first calls params.Validate() and returns models.NewGenericValidationError on failure, then wraps the work in transaction.Run(ctx, s.adapter, ...).", + "example": "if params.Validate() != nil { return ..., models.NewGenericValidationError(fmt.Errorf(\"invalid input parameters: %w\", params.Validate())) }" + }, + { + "name": "Fiat/custom merge with in-memory pagination", + "description": "ListCurrencies derives includeCustom/includeFiat from params.FilterType; custom-only delegates DB pagination to the adapter, otherwise it enumerates (fetching custom with Page{} cleared), sorts, and paginates slices in-memory.", + "example": "if includeCustom && !includeFiat { return s.adapter.ListCustomCurrencies(ctx, params) }" + }, + { + "name": "Fiat sourced from gobl currency.Definitions", + "description": "Fiat currencies come from currency.Definitions(); rows with empty ISONumeric (crypto/non-ISO) are filtered out, and the code filter is applied via params.Code.LoFilterPredicate().", + "example": "if def.ISONumeric == \"\" { return false, nil }; return matchCode(def.ISOCode.String(), 0)" + }, + { + "name": "Service-owned business rules", + "description": "Domain invariants live here, e.g. CreateCostBasis rejects a non-future EffectiveFrom and defaults a nil EffectiveFrom to time.Now() before calling the adapter.", + "example": "if params.EffectiveFrom != nil && !params.EffectiveFrom.After(now) { return ..., models.NewGenericValidationError(...) }" + }, + { + "name": "Sort honors OrderBy/Order", + "description": "In-memory results are sorted via slices.SortFunc comparing Name or Code per params.OrderBy, negating for sortx.OrderDesc, matching the adapter's DB ordering.", + "example": "slices.SortFunc(items, func(a, b currencies.Currency) int { ... if params.Order == sortx.OrderDesc { return -result } })" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Implements ListCurrencies (fiat/custom merge), CreateCurrency, CreateCostBasis (future-date rule + default), ListCostBases.", + "watch_for": "ListCurrencies clears allParams.Page before fetching custom for the combined path; forgetting that re-applies DB pagination and corrupts the in-memory merge. CreateCostBasis computes now=time.Now() inside transaction.Run." + }, + { + "file": "service_test.go", + "role": "Pure unit tests using a fakeAdapter + noopDriver (no DB) to exercise combined and custom-only paths.", + "watch_for": "fakeAdapter only implements ListCustomCurrencies; the other methods panic(\"not implemented\"). Tests rely on real gobl fiat data, so USD/EUR/GBP must remain valid ISO codes; use t.Context()." + } + ], + "anti_patterns": [ + "Calling the adapter without first validating params and wrapping in transaction.Run", + "Putting business rules (future-date checks, fiat filtering) in the adapter instead of the service", + "Paginating the custom fetch in the combined path instead of clearing Page for the in-memory merge", + "Returning raw validation errors instead of models.NewGenericValidationError", + "Including non-ISO/crypto currencies (empty ISONumeric) in fiat enumeration" + ], + "decisions": [ + { + "decision": "Custom-only listing delegates to DB-level pagination; mixed/fiat listing paginates in-memory", + "rationale": "Fiat currencies are a static gobl-sourced set not stored in Postgres, so merged results must be enumerated and sliced after sorting rather than via SQL OFFSET/LIMIT." + }, + { + "decision": "EffectiveFrom must be in the future and defaults to now", + "rationale": "Cost-basis FX rates represent forward-effective conversion rates; back-dating would silently rewrite historical billing math." + } + ], + "code_examples": [ + { + "scenario": "Validate, transaction.Run, branch on currency type", + "code": "func (s *Service) ListCurrencies(ctx context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error) {\n\tif params.Validate() != nil {\n\t\treturn pagination.Result[currencies.Currency]{}, models.NewGenericValidationError(fmt.Errorf(\"invalid input parameters: %w\", params.Validate()))\n\t}\n\treturn transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[currencies.Currency], error) {\n\t\tincludeCustom := params.FilterType == nil || *params.FilterType == currencies.CurrencyTypeCustom\n\t\tincludeFiat := params.FilterType == nil || *params.FilterType == currencies.CurrencyTypeFiat\n\t\tif includeCustom && !includeFiat {\n\t\t\treturn s.adapter.ListCustomCurrencies(ctx, params)\n\t\t}\n\t\t// ...enumerate custom (Page cleared) + fiat, sort, paginate in-memory...\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w81.json b/.archie/enrichments/w81.json new file mode 100644 index 0000000000..8b253b1715 --- /dev/null +++ b/.archie/enrichments/w81.json @@ -0,0 +1,243 @@ +{ + "openmeter/customer/adapter": { + "purpose": "Ent persistence layer for the customer domain. Implements customer.Adapter (CRUD, listing, usage-attribution, soft-delete cascades) against *entdb.Client, plus DB-entity-to-domain mapping.", + "patterns": [ + { + "name": "Transaction-wrapping repo helpers", + "description": "Every read/write method body runs inside entutils.TransactingRepo (value-returning) or entutils.TransactingRepoWithNoValue (void), so the body rebinds to the tx carried in ctx via the repo *adapter.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (*customer.Customer, error) { ... repo.db.Customer.Query()... })" + }, + { + "name": "TxCreator triplet on adapter", + "description": "The adapter implements Tx/WithTx/Self: Tx hijacks via a.db.HijackTx with &sql.TxOptions{ReadOnly:false}, WithTx rebuilds via entdb.NewTxClientFromRawConfig, Self returns the receiver. Required for entutils helpers to work.", + "example": "func (a *adapter) WithTx(ctx, tx) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }" + }, + { + "name": "Validate input then wrap as GenericValidationError", + "description": "Each method first calls input.Validate() and on failure returns models.NewGenericValidationError(...) before any DB access.", + "example": "if err := input.Validate(); err != nil { return ..., models.NewGenericValidationError(err) }" + }, + { + "name": "Soft-delete with deleted_at + namespace filters", + "description": "Deletes are UPDATEs setting deleted_at=clock.Now().UTC(), always scoped by namespace and DeletedAtIsNil(); reads default to excluding rows where DeletedAt < now via Or(DeletedAtIsNil, DeletedAtGTE(now)).", + "example": "repo.db.Customer.Update().Where(customerdb.ID(input.ID), customerdb.Namespace(input.Namespace), customerdb.DeletedAtIsNil()).SetDeletedAt(deletedAt)" + }, + { + "name": "Manual delete cascade across app tables", + "description": "DeleteCustomer soft-deletes the customer then each association (CustomerSubjects, AppCustomer, AppStripeCustomer, AppCustomInvoicingCustomer) in the same tx, each filtered by DeletedAtIsNil so already-deleted children keep their original timestamp.", + "example": "repo.db.AppStripeCustomer.Update().Where(appstripecustomerdb.CustomerID(input.ID), ...DeletedAtIsNil()).SetDeletedAt(deletedAt).Exec(ctx)" + }, + { + "name": "Edge-loaded mapping requires explicit loads", + "description": "CustomerFromDBEntity/subjectKeysFromDBEntity call Edges.SubjectsOrErr / SubscriptionOrErr and return an error if db.IsNotLoaded; callers must apply WithSubjects(now) and (for expands) WithActiveSubscriptions(now) on the query first.", + "example": "query := repo.db.Customer.Query(); query = WithSubjects(query, now); if slices.Contains(input.Expands, customer.ExpandSubscriptions) { query = WithActiveSubscriptions(query, now) }" + }, + { + "name": "filter.ApplyToQuery for string filters", + "description": "List filters apply through pkg/filter (filter.ApplyToQuery / filter.SelectPredicate) against ent field constants rather than hand-built predicates.", + "example": "query = filter.ApplyToQuery(query, input.Key, customerdb.FieldKey)" + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Config{Client,Logger}+Validate, New() returning customer.Adapter, and the Tx/WithTx/Self TxCreator triplet.", + "watch_for": "Both Client and Logger are required by Validate; Tx uses ReadOnly:false \u2014 do not pass nil logger." + }, + { + "file": "customer.go", + "role": "All adapter methods: ListCustomers, ListCustomerUsageAttributions, CreateCustomer, DeleteCustomer, GetCustomer, etc.", + "watch_for": "CreateCustomer pre-checks key-vs-id and key-vs-subject overlap and returns NewKeyConflictError/NewSubjectKeyConflictError on entdb.IsConstraintError; subjects are bulk-created separately (AddSubjects produces an invalid query)." + }, + { + "file": "entitymapping.go", + "role": "CustomerFromDBEntity, resolveActiveSubscriptionIDs, subjectKeysFromDBEntity \u2014 DB\u2192domain mapping.", + "watch_for": "Returns error when edges not loaded; UsageAttribution only set when subjectKeys non-empty; subject keys are slices.Sort-ed for stable order; ActiveSubscriptionIDs wrapped in mo.Some only when expand present." + }, + { + "file": "customer_test.go", + "role": "Adapter integration tests via testutils.InitPostgresDB; seed() builds the full cascade chain; freezeTime truncates to microsecond.", + "watch_for": "Postgres has microsecond precision \u2014 freeze/compare times via Truncate(time.Microsecond); tests assert namespace isolation and preservation of pre-deleted children." + } + ], + "anti_patterns": [ + "Accessing repo.db directly outside a TransactingRepo/TransactingRepoWithNoValue closure (breaks tx propagation)", + "Reading customers without WithSubjects(now) \u2014 mapping will fail with 'subjects must be loaded for customer'", + "Hard-deleting rows or forgetting the namespace + DeletedAtIsNil filters on cascade updates", + "Using customer.AddSubjects to attach subjects in Create (generates an invalid query); use CustomerSubjects.CreateBulk", + "Returning raw errors for invalid input instead of models.NewGenericValidationError / typed conflict errors" + ], + "decisions": [ + { + "decision": "Soft delete via deleted_at with explicit per-table cascade rather than DB cascades", + "rationale": "Preserves audit history and lets already-deleted children keep their original timestamp by filtering DeletedAtIsNil." + }, + { + "decision": "Subjects inserted with CustomerSubjects.CreateBulk instead of ent edge AddSubjects", + "rationale": "ent edge AddSubjects produces an invalid SQL query; the bulk path issues the same number/shape of queries \u2014 devex-only difference." + } + ], + "code_examples": [ + { + "scenario": "Adapter method wrapping its body in a transacting repo closure", + "code": "func (a *adapter) DeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error {\n\tif err := input.Validate(); err != nil {\n\t\treturn models.NewGenericValidationError(fmt.Errorf(\"error deleting customer: %w\", err))\n\t}\n\treturn entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, repo *adapter) error {\n\t\tdeletedAt := clock.Now().UTC()\n\t\trows, err := repo.db.Customer.Update().\n\t\t\tWhere(customerdb.ID(input.ID), customerdb.Namespace(input.Namespace), customerdb.DeletedAtIsNil()).\n\t\t\tSetDeletedAt(deletedAt).Save(ctx)\n\t\tif err != nil { return fmt.Errorf(\"failed to delete customer: %w\", err) }\n\t\tif rows == 0 { return models.NewGenericNotFoundError(fmt.Errorf(\"customer with id %s not found in %s namespace\", input.ID, input.Namespace)) }\n\t\treturn nil\n\t})\n}" + } + ] + }, + "openmeter/customer/app": { + "purpose": "Defines the customer.App integration contract \u2014 the seam through which app providers (Stripe, sandbox, custom-invoicing) validate that they can run for a given customer.", + "patterns": [ + { + "name": "Capability-aware App interface", + "description": "App declares a single ValidateCustomer(ctx, *customer.Customer, []app.CapabilityType) error; provider apps implement it to gate per-customer execution.", + "example": "type App interface { ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error }" + }, + { + "name": "Type-asserting adapter from app.App", + "description": "AsCustomerApp(app.App) narrows a generic app.App to the customer App via a type assertion and returns a GenericValidationError when the cast fails, including id/type for diagnostics.", + "example": "customerApp, ok := candidate.(App); if !ok { return nil, models.NewGenericValidationError(fmt.Errorf(\"is not a customer app [id=%s, type=%s]\", candidate.GetID(), candidate.GetType())) }" + } + ], + "key_file_guides": [ + { + "file": "app.go", + "role": "Declares the App interface and the AsCustomerApp narrowing helper (package customerapp).", + "watch_for": "Package name is customerapp, not app; failed assertion must return models.NewGenericValidationError, not a bare error." + } + ], + "anti_patterns": [ + "Putting persistence or HTTP logic in this package \u2014 it is purely an integration contract", + "Returning a plain error from AsCustomerApp instead of a GenericValidationError" + ], + "decisions": [ + { + "decision": "Keep customer app integration as a thin interface separate from openmeter/app", + "rationale": "Lets provider apps (stripe/sandbox/custominvoicing) depend on a minimal customer-validation contract without importing the full customer service." + } + ], + "code_examples": [ + { + "scenario": "Narrowing a generic app to a customer app", + "code": "func AsCustomerApp(customerAppCandidate app.App) (App, error) {\n\tcustomerApp, ok := customerAppCandidate.(App)\n\tif !ok {\n\t\treturn nil, models.NewGenericValidationError(\n\t\t\tfmt.Errorf(\"is not a customer app [id=%s, type=%s]\", customerAppCandidate.GetID(), customerAppCandidate.GetType()),\n\t\t)\n\t}\n\treturn customerApp, nil\n}" + } + ] + }, + "openmeter/customer/httpdriver": { + "purpose": "Legacy v1 HTTP layer for the customer API. Builds httptransport handlers (List/Create/Update/Delete/Get + entitlement value/access) and maps between api.* DTOs and customer domain types.", + "patterns": [ + { + "name": "httptransport three-function handler", + "description": "Each endpoint is a method on *handler returning a typed httptransport.Handler[...] built from a request-decoder, a business func, and a response encoder, plus AppendOptions with WithOperationName.", + "example": "return httptransport.NewHandler(decode, func(ctx, req)(Resp,error){...}, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusCreated), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"createCustomer\"))...)" + }, + { + "name": "Namespace resolved from decoder", + "description": "Every decoder calls h.resolveNamespace(ctx), which reads namespaceDecoder.GetNamespace and returns a 500 HTTPError if absent.", + "example": "ns, err := h.resolveNamespace(ctx); if err != nil { return Request{}, err }" + }, + { + "name": "Map* / *ToAPI / FromAPI conversion functions", + "description": "Conversions live in apimapping.go: MapCustomerCreate/MapCustomerReplaceUpdate (api\u2192domain CustomerMutate), CustomerToAPI/MapAccessToAPI(V2) (domain\u2192api), MapAddress, FromMetadata/FromAnnotations.", + "example": "func MapCustomerCreate(body api.CustomerCreate) customer.CustomerMutate { ... }" + }, + { + "name": "v1 filter semantics preserved via FilterString wrappers", + "description": "containsFilter wraps *string into &filter.FilterString{Contains} (partial match) and eqFilter into {Eq} (exact) so legacy query-param behavior is retained when delegating to the v3 filter-based service.", + "example": "Key: containsFilter(params.Key), PlanKey: eqFilter(params.PlanKey)" + }, + { + "name": "Mutations guard against deleted customers", + "description": "Update/Delete/entitlement handlers first GetCustomer, then return models.NewGenericPreConditionFailedError if cus.IsDeleted() before proceeding.", + "example": "if cus != nil && cus.IsDeleted() { return ..., models.NewGenericPreConditionFailedError(...) }" + }, + { + "name": "Subscriptions fetched and joined separately", + "description": "ListCustomers fetches subscriptions in a second subscriptionService.List call keyed by customer IDs, GroupBy CustomerId, then maps via CustomerToAPI; entitlement NotFound is mapped to NoAccessValue.", + "example": "customerSubscriptions = lo.GroupBy(subscriptions.Items, func(item subscription.Subscription) string { return item.CustomerId })" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Handler/CustomerHandler interfaces, *handler struct (service, entitlementService, subscriptionService, namespaceDecoder, options), New() constructor, resolveNamespace.", + "watch_for": "Constructor wires four services; missing namespace yields a 500, not a 400." + }, + { + "file": "customer.go", + "role": "All endpoint handlers and request/response type aliases; mapCustomerWithSubscriptionsToAPI joins customers with their subscriptions.", + "watch_for": "ListCustomers defaults Expand to [subscriptions] (TODO[v2] breaking change to remove); CurrentSubscriptionId assumes single subscription per customer (FIXME)." + }, + { + "file": "apimapping.go", + "role": "DTO mapping incl. EntitlementValueV2/CustomerAccessV2 and MapEntitlementValueToAPIV2 (adds GrantBalances for MeteredEntitlementValue).", + "watch_for": "V2 entitlement mapping type-asserts *meteredentitlement.MeteredEntitlementValue to copy GrantBalances; currency/country mapped via lo.ToPtr(currencyx.Code/models.CountryCode)." + } + ], + "anti_patterns": [ + "Allowing mutations on a deleted customer without the IsDeleted precondition check", + "Hand-decoding bodies instead of commonhttp.JSONRequestBodyDecoder, or returning bare errors instead of commonhttp/models typed errors", + "Adding business logic to handlers instead of delegating to customer.Service / entitlement.Service", + "Skipping resolveNamespace and trusting a namespace from the request body/path" + ], + "decisions": [ + { + "decision": "Keep v1 contains/eq query-param semantics by wrapping params in filter.FilterString", + "rationale": "Lets the legacy v1 surface delegate to the shared v3 filter-based service without breaking existing partial/exact-match behavior." + }, + { + "decision": "Fetch subscriptions in a separate service call and join in the handler", + "rationale": "Customer service stays subscription-agnostic; the HTTP layer composes the expanded API representation." + } + ], + "code_examples": [ + { + "scenario": "A typed httptransport handler with namespace resolution and operation name", + "code": "func (h *handler) CreateCustomer() CreateCustomerHandler {\n\treturn httptransport.NewHandler(\n\t\tfunc(ctx context.Context, r *http.Request) (CreateCustomerRequest, error) {\n\t\t\tbody := api.CustomerCreate{}\n\t\t\tif err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil {\n\t\t\t\treturn CreateCustomerRequest{}, fmt.Errorf(\"field to decode create customer request: %w\", err)\n\t\t\t}\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return CreateCustomerRequest{}, err }\n\t\t\treturn CreateCustomerRequest{Namespace: ns, CustomerMutate: MapCustomerCreate(body)}, nil\n\t\t},\n\t\tfunc(ctx context.Context, request CreateCustomerRequest) (CreateCustomerResponse, error) {\n\t\t\tcustomer, err := h.service.CreateCustomer(ctx, request)\n\t\t\tif err != nil { return CreateCustomerResponse{}, err }\n\t\t\treturn h.mapCustomerWithSubscriptionsToAPI(ctx, *customer, nil)\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[CreateCustomerResponse](http.StatusCreated),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"createCustomer\"))...,\n\t)\n}" + } + ] + }, + "openmeter/customer/testutils": { + "purpose": "Shared test harness for the customer domain. Provides a TestEnv that wires a real Postgres-backed customer + subject service stack for integration tests, plus ULID/namespace helpers.", + "patterns": [ + { + "name": "TestEnv built from concrete constructors", + "description": "NewTestEnv wires the stack directly: testutils.InitPostgresDB, eventbus.NewMock, meteradapter (mockadapter), subjectadapter/subjectservice, customeradapter/customerservice \u2014 never via app/common DI, avoiding test-only import cycles.", + "example": "customerAdapter, _ := customeradapter.New(customeradapter.Config{Client: client, Logger: logger}); customerService, _ := customerservice.New(customerservice.Config{Adapter: customerAdapter, Publisher: publisher})" + }, + { + "name": "Lazy schema migration + once-guarded close", + "description": "DBSchemaMigrate runs Schema.Create(t.Context()) on demand; Close uses sync.Once to close ent/pg drivers and the client exactly once.", + "example": "e.close.Do(func(){ e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })" + }, + { + "name": "Discard logger and noop tracer in tests", + "description": "Uses testutils.NewDiscardLogger(t) and noop.NewTracerProvider().Tracer for observability deps so tests stay silent and dependency-free.", + "example": "logger := testutils.NewDiscardLogger(t); tracer := noop.NewTracerProvider().Tracer(\"test_env\")" + } + ], + "key_file_guides": [ + { + "file": "env.go", + "role": "TestEnv struct + NewTestEnv/Close/DBSchemaMigrate, and NewTestULID (aliased as NewTestNamespace).", + "watch_for": "Meter uses meter/mockadapter.New(nil); event publisher is eventbus.NewMock(t); caller must invoke DBSchemaMigrate before using the DB." + } + ], + "anti_patterns": [ + "Importing app/common wiring here \u2014 build services from underlying constructors to avoid test-only import cycles", + "Sharing a TestEnv across tests instead of one per test (it owns a t-scoped Postgres DB)", + "Forgetting DBSchemaMigrate before exercising the adapter/service" + ], + "decisions": [ + { + "decision": "Construct the customer/subject stack from package constructors rather than DI wiring", + "rationale": "Keeps testutils independent of app/common so unrelated wiring additions can't introduce import cycles in domain tests." + } + ], + "code_examples": [ + { + "scenario": "Wiring the customer service stack for tests", + "code": "customerAdapter, err := customeradapter.New(customeradapter.Config{Client: client, Logger: logger})\nrequire.NoErrorf(t, err, \"initializing customer adapter must not fail\")\ncustomerService, err := customerservice.New(customerservice.Config{Adapter: customerAdapter, Publisher: publisher})\nrequire.NoErrorf(t, err, \"initializing customer service must not fail\")" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w82.json b/.archie/enrichments/w82.json new file mode 100644 index 0000000000..a0c2414e12 --- /dev/null +++ b/.archie/enrichments/w82.json @@ -0,0 +1,86 @@ +{ + "openmeter/customer/service/hooks": { + "purpose": "Lifecycle hooks that wire the customer domain into the entitlement, subject, and billing domains. Hosts the SubjectCustomerHook (provisions/syncs a Customer whenever a Subject is created/updated/deleted via CustomerProvisioner) and the EntitlementValidatorHook (blocks customer deletion while entitlements exist).", + "patterns": [ + { + "name": "ServiceHook over a domain aggregate", + "description": "Every hook is a typed models.ServiceHook[T] that embeds models.NoopServiceHook[T] so only the relevant Pre*/Post* methods are overridden. A compile-time assertion proves conformance.", + "example": "var _ models.ServiceHook[customer.Customer] = (*entitlementValidatorHook)(nil); type entitlementValidatorHook struct { NoopEntitlementValidatorHook; entitlementService entitlement.Service }" + }, + { + "name": "Public type aliases for the hook", + "description": "Each hook exposes an exported alias (e.g. EntitlementValidatorHook = models.ServiceHook[customer.Customer]) plus a Noop alias, while the concrete struct stays unexported and is only constructed via the New* function.", + "example": "type ( EntitlementValidatorHook = models.ServiceHook[customer.Customer]; NoopEntitlementValidatorHook = models.NoopServiceHook[customer.Customer] )" + }, + { + "name": "Config + Validate + New constructor", + "description": "Each hook has a *HookConfig struct with a Validate() error method that collects errs via errors.Join (or single fmt.Errorf), and a New* constructor that calls config.Validate() before building the struct. Never construct the struct directly outside this package (tests are the exception).", + "example": "func NewEntitlementValidatorHook(config EntitlementValidatorHookConfig) (EntitlementValidatorHook, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf(\"invalid entitlement validator hook config: %w\", err) } ... }" + }, + { + "name": "OTel span per hook method", + "description": "Post*/EnsureCustomer methods open a tracer span (s.tracer.Start), defer span.End(), set span status Ok/Error, record errors, and emit AddEvent for branch outcomes (customer found/created/updated/not-found).", + "example": "ctx, span := s.tracer.Start(ctx, \"subject_customer_hook.post_create\"); defer span.End()" + }, + { + "name": "Re-entrancy guard via skip context", + "description": "When the provisioner mutates the customer it wraps the call in subjectservicehooks.NewContextWithSkipSubjectCustomer(ctx) so the customer write does not re-trigger the subject->customer hook loop.", + "example": "cus, err = p.customer.CreateCustomer(subjectservicehooks.NewContextWithSkipSubjectCustomer(ctx), customer.CreateCustomerInput{...})" + }, + { + "name": "Idempotent provisioning via CmpSubjectCustomer", + "description": "EnsureCustomer is the convergence point: it locates a customer by usage-attribution then by key, short-circuits with CmpSubjectCustomer when already in sync, returns GenericConflictError on key conflicts, skips soft-deleted customers (DeletedAt), and tags created/updated records with annotations createdBy/subjectId/stripeCustomerId.", + "example": "if CmpSubjectCustomer(sub, cus) { return cus, nil }" + }, + { + "name": "Typed domain errors, never bare errors to callers", + "description": "Validation failures use models.NewGenericValidationError; not-found uses models.NewGenericNotFoundError and is detected with models.IsGenericNotFoundError; conflicts use models.NewGenericConflictError; deleted-customer preconditions use models.NewGenericPreConditionFailedError.", + "example": "return models.NewGenericValidationError(fmt.Errorf(\"customer has entitlements, please remove them before deleting the customer\"))" + } + ], + "key_file_guides": [ + { + "file": "subjectcustomer.go", + "role": "SubjectCustomerHook + CustomerProvisioner: PostCreate/PostUpdate call provision(); PostDelete strips the subject key from the customer's UsageAttribution.SubjectKeys; EnsureCustomer/getCustomerForSubject converge a Customer onto a Subject; EnsureStripeCustomer wires the billing CustomerOverride/payment app; MetadataFromMap/toString flatten subject metadata to models.Metadata.", + "watch_for": "PostDelete and EnsureCustomer must honour DeletedAt (skip soft-deleted customers). Key-vs-usage-attribution mismatch must yield ErrCustomerKeyConflict, not a silent overwrite. Mutations must go through NewContextWithSkipSubjectCustomer to avoid hook recursion." + }, + { + "file": "entitlementvalidator.go", + "role": "EntitlementValidatorHook.PreDelete blocks customer deletion when entitlement.Service.GetEntitlementsOfCustomer returns any active entitlement at clock.Now().", + "watch_for": "Only PreDelete is overridden; do not add Post* logic here. Uses clock.Now() (not time.Now) so tests can freeze time." + }, + { + "file": "subjectcustomer_test.go", + "role": "Integration tests + TestEnv harness (real Postgres via testutils.InitPostgresDB, real subject/customer adapters and services, mock meter adapter, eventbus.NewMock). Provides AssertSubjectCustomerEqual / AssertSubjectCustomerStrictEqual and TestMetadataFromMap table test.", + "watch_for": "TestEnv builds dependencies from package constructors (customeradapter.New, customerservice.New, subjectservice.New) \u2014 do not import app/common wiring here. Requires Postgres; uses t.Context() and a noop tracer." + } + ], + "anti_patterns": [ + "Constructing entitlementValidatorHook / subjectCustomerHook / CustomerProvisioner literally instead of via the New* constructor (skips config.Validate()).", + "Overriding a hook method without embedding the Noop*Hook, breaking the models.ServiceHook[T] contract for the methods you did not implement.", + "Calling customer.CreateCustomer/UpdateCustomer from within a subject hook without NewContextWithSkipSubjectCustomer, causing infinite hook recursion.", + "Treating a key match as a customer match without checking UsageAttribution.SubjectKeys (must return GenericConflictError on mismatch).", + "Mutating or deleting a soft-deleted customer (DeletedAt != nil) instead of skipping it." + ], + "decisions": [ + { + "decision": "Cross-domain glue lives in hooks rather than inside customer.Service or subject.Service.", + "rationale": "Keeps the core customer/subject services free of billing/entitlement imports; hooks are opt-in and wired at DI time, and IgnoreErrors lets provisioning failures degrade gracefully." + }, + { + "decision": "EnsureCustomer is idempotent and convergence-based (find-by-attribution, then find-by-key, compare, then create/update).", + "rationale": "Subject create/update/delete events can fire repeatedly and out of order; convergence + CmpSubjectCustomer makes re-delivery safe." + }, + { + "decision": "Subject metadata is flattened to string-valued models.Metadata via MetadataFromMap/toString.", + "rationale": "Customer metadata is a flat string map; the reflection-based toString deterministically serialises scalars/slices/maps (sorted) and drops unsupported values." + } + ], + "code_examples": [ + { + "scenario": "A new lifecycle hook on a domain aggregate (Config/Validate/New + Noop embedding + typed error).", + "code": "type EntitlementValidatorHook = models.ServiceHook[customer.Customer]\ntype NoopEntitlementValidatorHook = models.NoopServiceHook[customer.Customer]\n\nvar _ models.ServiceHook[customer.Customer] = (*entitlementValidatorHook)(nil)\n\ntype entitlementValidatorHook struct {\n\tNoopEntitlementValidatorHook\n\tentitlementService entitlement.Service\n}\n\nfunc NewEntitlementValidatorHook(config EntitlementValidatorHookConfig) (EntitlementValidatorHook, error) {\n\tif err := config.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid entitlement validator hook config: %w\", err)\n\t}\n\treturn &entitlementValidatorHook{entitlementService: config.EntitlementService}, nil\n}\n\nfunc (e *entitlementValidatorHook) PreDelete(ctx context.Context, c *customer.Customer) error {\n\tents, err := e.entitlementService.GetEntitlementsOfCustomer(ctx, c.Namespace, c.ID, clock.Now())\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get entitlements of customer: %w\", err)\n\t}\n\tif len(ents) > 0 {\n\t\treturn models.NewGenericValidationError(fmt.Errorf(\"customer has entitlements, please remove them before deleting the customer\"))\n\t}\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w83.json b/.archie/enrichments/w83.json new file mode 100644 index 0000000000..43dd61726b --- /dev/null +++ b/.archie/enrichments/w83.json @@ -0,0 +1,67 @@ +{ + "openmeter/debug/httpdriver": { + "purpose": "HTTP driver (transport layer) for the debug domain. Exposes a single read-only endpoint that returns per-subject ingested-event counts in OpenMetrics/Prometheus text format by delegating to debug.DebugConnector.GetDebugMetrics.", + "patterns": [ + { + "name": "Handler interface + private struct + constructor", + "description": "Expose a DebugHandler interface whose methods return typed httptransport handlers; back it with an unexported debugHandler struct holding decoder, connector, and []httptransport.HandlerOption; construct via NewDebugHandler.", + "example": "type DebugHandler interface { GetMetrics() GetMetricsHandler }; func NewDebugHandler(namespaceDecoder, debugConnector, options...) DebugHandler" + }, + { + "name": "Three-stage httptransport.NewHandlerWithArgs", + "description": "Each endpoint is built as decode (request -> typed Request) + business (Request -> Response, delegates to connector) + response encoder, wired through httptransport.NewHandlerWithArgs with type params making Request/Response/Params explicit.", + "example": "httptransport.NewHandlerWithArgs[GetMetricsHandlerRequest, string, GetMetricsHandlerParams](decode, exec, commonhttp.PlainTextResponseEncoder[string], opts...)" + }, + { + "name": "Per-endpoint Request/Params/Response type aliases", + "description": "Define GetMetricsHandlerRequest (wrapping a params struct), GetMetricsHandlerParams, GetMetricsHandlerResponse, and a GetMetricsHandler alias over httptransport.HandlerWithArgs[...] so the router gets a named handler type.", + "example": "type GetMetricsHandler httptransport.HandlerWithArgs[GetMetricsHandlerRequest, GetMetricsHandlerResponse, GetMetricsHandlerParams]" + }, + { + "name": "Namespace resolved from context decoder, not request body", + "description": "Multi-tenancy namespace comes from namespacedriver.NamespaceDecoder.GetNamespace(ctx); the decode stage calls h.resolveNamespace(ctx) and fails with a 500 HTTPError when absent.", + "example": "ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return commonhttp.NewHTTPError(http.StatusInternalServerError, ...) }" + }, + { + "name": "Custom error encoder maps validation errors to 400", + "description": "Attach a WithErrorEncoder via httptransport.AppendOptions that converts models.IsGenericValidationError(err) into a 400 commonhttp.NewHTTPError and returns true; return false to fall through to default handling.", + "example": "httptransport.WithErrorEncoder(func(...) bool { if models.IsGenericValidationError(err) { commonhttp.NewHTTPError(http.StatusBadRequest, err).EncodeError(ctx, w); return true }; return false })" + }, + { + "name": "Plain-text (OpenMetrics) response encoding", + "description": "Response is a raw string of OpenMetrics text, so it uses commonhttp.PlainTextResponseEncoder[string] rather than a JSON encoder.", + "example": "commonhttp.PlainTextResponseEncoder[string]" + } + ], + "key_file_guides": [ + { + "file": "metrics.go", + "role": "Sole file: defines DebugHandler interface, debugHandler struct, NewDebugHandler constructor, GetMetrics handler, and resolveNamespace helper.", + "watch_for": "Business stage must only delegate to h.debugConnector.GetDebugMetrics; no querying logic here. resolveNamespace returns 500 (not 400) when namespace missing because that signals a wiring/middleware failure, not bad user input." + } + ], + "anti_patterns": [ + "Putting metric-counting/streaming query logic in the handler instead of delegating to debug.DebugConnector.", + "Reading namespace from a query param or body instead of namespacedriver.NamespaceDecoder.GetNamespace(ctx).", + "Returning a JSON response encoder for this endpoint; output is OpenMetrics plain text via PlainTextResponseEncoder.", + "Bypassing httptransport.NewHandlerWithArgs and writing directly to http.ResponseWriter in the business stage.", + "Dropping the WithErrorEncoder validation-to-400 mapping, causing validation errors to surface as 500s." + ], + "decisions": [ + { + "decision": "Transport layer is split from domain (httpdriver vs parent debug package).", + "rationale": "Keeps HTTP concerns (decoding, namespace resolution, error encoding) separate from the OpenMetrics/streaming logic in debug.DebugConnector, matching OpenMeter's service/adapter/driver layering." + }, + { + "decision": "Response is emitted as OpenMetrics text, not the project's usual JSON.", + "rationale": "The debug endpoint is meant to be scraped/monitored Prometheus-style to observe ingested event counts per subject, so PlainTextResponseEncoder is used." + } + ], + "code_examples": [ + { + "scenario": "Adding a new debug endpoint following the existing handler pattern", + "code": "func (h *debugHandler) GetMetrics() GetMetricsHandler {\n\treturn httptransport.NewHandlerWithArgs[GetMetricsHandlerRequest, string, GetMetricsHandlerParams](\n\t\tfunc(ctx context.Context, r *http.Request, params GetMetricsHandlerParams) (GetMetricsHandlerRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn GetMetricsHandlerRequest{}, err\n\t\t\t}\n\t\t\treturn GetMetricsHandlerRequest{params: GetMetricsHandlerRequestParams{Namespace: ns}}, nil\n\t\t},\n\t\tfunc(ctx context.Context, request GetMetricsHandlerRequest) (string, error) {\n\t\t\treturn h.debugConnector.GetDebugMetrics(ctx, request.params.Namespace)\n\t\t},\n\t\tcommonhttp.PlainTextResponseEncoder[string],\n\t\thttptransport.AppendOptions(h.options, httptransport.WithErrorEncoder(func(ctx context.Context, err error, w http.ResponseWriter, _ *http.Request) bool {\n\t\t\tif models.IsGenericValidationError(err) {\n\t\t\t\tcommonhttp.NewHTTPError(http.StatusBadRequest, err).EncodeError(ctx, w)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}))...,\n\t)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w84.json b/.archie/enrichments/w84.json new file mode 100644 index 0000000000..80da647c03 --- /dev/null +++ b/.archie/enrichments/w84.json @@ -0,0 +1,127 @@ +{ + "openmeter/dedupe/memorydedupe": { + "purpose": "In-memory implementation of the openmeter/dedupe.Deduplicator interface, backed by a fixed-size hashicorp golang-lru cache. Used by openmeter/ingest for single-process event deduplication where no shared Redis is configured.", + "patterns": [ + { + "name": "Implement full dedupe.Deduplicator interface", + "description": "Deduplicator must implement every method of openmeter/dedupe.Deduplicator: IsUnique, CheckUnique, Set, CheckUniqueBatch, Close. Missing one breaks app/config wiring.", + "example": "func (d *Deduplicator) IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error)" + }, + { + "name": "Key derived only via dedupe.Item.Key()", + "description": "Build a dedupe.Item{Namespace, ID, Source} and call item.Key() for the cache key \u2014 never hand-format the namespace-source-id string.", + "example": "item := dedupe.Item{Namespace: namespace, ID: ev.ID(), Source: ev.Source()}; d.store.ContainsOrAdd(item.Key(), nil)" + }, + { + "name": "IsUnique mutates as it checks", + "description": "IsUnique both tests uniqueness AND inserts the key atomically via store.ContainsOrAdd, returning !isContained. CheckUnique is read-only (store.Contains).", + "example": "isContained, _ := d.store.ContainsOrAdd(item.Key(), nil); return !isContained, nil" + }, + { + "name": "Constructor clamps invalid size to defaultSize", + "description": "NewDeduplicator(size) replaces size<1 with defaultSize (1024) before calling lru.New, and returns the lru error unwrapped.", + "example": "if size < 1 { size = defaultSize }" + }, + { + "name": "Cache stores nil values, keys carry all signal", + "description": "Only presence of the key matters; values are always nil/struct{}{}. CheckUniqueBatch partitions items into UniqueItems / AlreadyProcessedItems ItemSets.", + "example": "result.AlreadyProcessedItems[item] = struct{}{}" + } + ], + "key_file_guides": [ + { + "file": "memorydedupe.go", + "role": "The entire implementation: Deduplicator struct wrapping *lru.Cache[string, any] plus NewDeduplicator constructor and all interface methods.", + "watch_for": "Set returns (nil, nil) \u2014 it never reports already-existing items unlike redisdedupe.Set; callers needing existing-item detection must use CheckUniqueBatch. Close is a no-op." + }, + { + "file": "memorydedupe_test.go", + "role": "Black-box tests (package memorydedupe_test) verifying IsUnique flips true->false on repeat and Set+CheckUnique interaction.", + "watch_for": "Tests construct dedupe.Item literals directly; keep field order Namespace/ID/Source consistent with the interface." + } + ], + "anti_patterns": [ + "Persisting or sharing state across processes \u2014 this is per-process only; use redisdedupe for distributed dedup.", + "Returning non-nil from Set's existing-items slice (the in-memory impl intentionally returns nil).", + "Constructing the cache key by string-formatting instead of dedupe.Item.Key().", + "Adding eviction-sensitive correctness assumptions \u2014 LRU silently evicts old keys, so dedup is best-effort within cache size." + ], + "decisions": [ + { + "decision": "Use hashicorp golang-lru with a bounded default size (1024).", + "rationale": "Bounds memory for an in-process cache while accepting that very old event IDs may be evicted; dedup is a best-effort safeguard, not a guarantee." + } + ], + "code_examples": [] + }, + "openmeter/dedupe/redisdedupe": { + "purpose": "Redis-backed implementation of openmeter/dedupe.Deduplicator for distributed, TTL-bounded event deduplication. Wired via app/config; supports three keying modes including a live migration from raw keys to hashed keys.", + "patterns": [ + { + "name": "Mode switch on every key operation", + "description": "Every method switches on d.Mode (DedupeModeRawKey / DedupeModeKeyHash / DedupeModeKeyHashMigration) to decide whether to use item.Key() raw or GetKeyHash(item.Key()). Migration mode checks both.", + "example": "case DedupeModeKeyHash: keyHash := GetKeyHash(item.Key()); return d.setKey(ctx, keyHash)" + }, + { + "name": "SET NX with TTL as the uniqueness primitive", + "description": "setKey uses Redis SetArgs{TTL: d.Expiration, Mode: \"nx\"}; status \"OK\" => unique, \"\" => duplicate. redis.Nil is treated as non-error.", + "example": "status, err := d.Redis.SetArgs(ctx, key, \"\", redis.SetArgs{TTL: d.Expiration, Mode: \"nx\"}).Result()" + }, + { + "name": "Hash keys via GetKeyHash (xxh3-128 + base64 RawURL)", + "description": "keyhash.go hashes item.Key() with xxh3 HashString128 and base64.RawURLEncoding to shrink Redis memory ~57% vs raw keys; non-cryptographic but collision-safe at expected volume.", + "example": "b64 := base64.RawURLEncoding.EncodeToString(hashBytes[:])" + }, + { + "name": "Migration mode double-checks the old raw key", + "description": "DedupeModeKeyHashMigration sets the hashed key, then if it appears unique also probes Redis.Exists(item.Key()) to detect pre-migration raw keys before declaring uniqueness.", + "example": "isSet, err := d.Redis.Exists(ctx, item.Key()).Result(); keyExists := isSet == 1; return !keyExists, nil" + }, + { + "name": "Batch ops use Pipelined / MGet and tolerate redis.Nil", + "description": "Set pipelines SetArgs NX and collects existing items from per-command redis.Nil errors; CheckUniqueBatch MGets all keys and partitions by nil result. Both guard with errors.Is(err, redis.Nil).", + "example": "cmds, err := d.Redis.Pipelined(ctx, func(pipe redis.Pipeliner) error {...})" + }, + { + "name": "Validate mode and guard nil client", + "description": "DedupeMode.Validate() rejects unknown modes; IsUnique returns an error if d.Redis is nil. CheckUniqueBatch returns ErrNoDedupItems on empty input.", + "example": "if d.Redis == nil { return false, errors.New(\"redis client not initialized\") }" + } + ], + "key_file_guides": [ + { + "file": "redisdedupe.go", + "role": "Deduplicator value type (Redis client, Expiration, Mode) implementing the dedupe interface, plus DedupeMode constants/Validate and ErrNoDedupItems.", + "watch_for": "Methods are value receivers, not pointer. Set's pipeline Mode is \"NX\" (uppercase) while setKey uses \"nx\" (lowercase) \u2014 Redis treats both the same, but keep the distinction intentional. Set returns existing (duplicate) items, opposite-sense from CheckUniqueBatch's UniqueItems." + }, + { + "file": "keyhash.go", + "role": "GetKeyHash: deterministic xxh3-128 + base64 RawURL encoding of an item key, with a long comment block justifying the hash choice and keyspace/collision math.", + "watch_for": "Changing the hash function or encoding silently invalidates all existing Redis keys \u2014 only safe behind DedupeModeKeyHashMigration. RawURLEncoding (no padding) is required to keep Lua-safe keys." + } + ], + "anti_patterns": [ + "Adding a new key-format without a corresponding migration mode \u2014 switching modes in place orphans existing keys and breaks dedup correctness.", + "Treating redis.Nil as a fatal error in batch/set paths; it signals NX-skip or missing key and must be tolerated.", + "Calling methods assuming pointer receivers or assuming Set returns unique items (it returns existing/duplicate items).", + "Hand-formatting keys instead of going through item.Key() then GetKeyHash.", + "Omitting TTL on SetArgs \u2014 keys must expire via d.Expiration to bound the dedup window and Redis memory." + ], + "decisions": [ + { + "decision": "Hash keys to base64(xxh3-128) instead of storing raw orgId-source-id strings.", + "rationale": "Raw keys average ~77 chars; xxh3-128 base64 is ~22 chars (~57% Redis memory saving) with ~1e-30 collision probability at 300M events, and base64 avoids binary-key handling in Lua." + }, + { + "decision": "Provide an explicit DedupeModeKeyHashMigration that checks both old and new key formats.", + "rationale": "Allows live cutover from raw to hashed keys without losing dedup coverage for already-recorded events during the TTL overlap window." + } + ], + "code_examples": [ + { + "scenario": "Unique-check that atomically records the event under the configured key mode", + "code": "import (\n\t\"github.com/redis/go-redis/v9\"\n\t\"github.com/openmeterio/openmeter/openmeter/dedupe\"\n)\n\nfunc (d Deduplicator) setKey(ctx context.Context, key string) (bool, error) {\n\tstatus, err := d.Redis.SetArgs(ctx, key, \"\", redis.SetArgs{TTL: d.Expiration, Mode: \"nx\"}).Result()\n\tif err != nil && err != redis.Nil {\n\t\treturn false, err\n\t}\n\tif status == \"\" { // existed -> duplicate\n\t\treturn false, nil\n\t}\n\tif status == \"OK\" { // newly set -> unique\n\t\treturn true, nil\n\t}\n\treturn false, fmt.Errorf(\"unknown status\")\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w85.json b/.archie/enrichments/w85.json new file mode 100644 index 0000000000..ea5ad75cae --- /dev/null +++ b/.archie/enrichments/w85.json @@ -0,0 +1,149 @@ +{ + "openmeter/ent/schema": { + "purpose": "Hand-written Ent entity definitions that are the single source of truth for the PostgreSQL schema. ~35 files (customer, billing, charges*, ledger_*, subscription, entitlement, grant, feature, meter, notification, productcatalog, taxcode, app*) compile via `make generate` into the read-only `openmeter/ent/db` and feed Atlas migration diffs.", + "patterns": [ + { + "name": "Standard ent.Schema quartet", + "description": "Each entity is a struct embedding `ent.Schema` with `Mixin()`, `Fields()`, `Edges()`, `Indexes()` methods. Compose shared columns via entutils mixins rather than redeclaring them.", + "example": "func (Customer) Mixin() []ent.Mixin { return []ent.Mixin{entutils.ResourceMixin{}, entutils.CustomerAddressMixin{FieldPrefix: \"billing\"}, entutils.AnnotationsMixin{}} }" + }, + { + "name": "entutils mixins for identity/namespace/time", + "description": "Use entutils.IDMixin / NamespaceMixin / TimeMixin / MetadataMixin / AnnotationsMixin / ResourceMixin (or UniqueResourceMixin). Never hand-roll id/namespace/created_at columns.", + "example": "Mixin: entutils.IDMixin{}, entutils.NamespaceMixin{}, entutils.TimeMixin{}" + }, + { + "name": "ULID FK columns as char(26)", + "description": "Every foreign-key string field that references another entity's ULID id sets SchemaType char(26) for Postgres.", + "example": "field.String(\"customer_id\").SchemaType(map[string]string{dialect.Postgres: \"char(26)\"})" + }, + { + "name": "Decimals via alpacadecimal numeric", + "description": "Monetary/quantity values use field.Other(name, alpacadecimal.Decimal{}) with Postgres SchemaType \"numeric\"; never field.Float for money.", + "example": "field.Other(\"per_unit_amount\", alpacadecimal.Decimal{}).SchemaType(map[string]string{dialect.Postgres: \"numeric\"})" + }, + { + "name": "JSON columns via ValueScanner + jsonb", + "description": "Complex domain types are persisted as jsonb either with field.JSON or field.String(...).GoType(...).ValueScanner(...). Package-level scanners are built with entutils.JSONStringValueScanner[T]() or a manual field.ValueScannerFunc (see notification ChannelConfig/RuleConfig, AnnotationsValueScanner).", + "example": "field.String(\"price\").GoType(&productcatalog.Price{}).ValueScanner(PriceValueScanner).SchemaType(map[string]string{dialect.Postgres: \"jsonb\"})" + }, + { + "name": "Soft-delete-aware partial unique indexes", + "description": "Uniqueness on namespaced business keys is enforced with index.Fields(...).Annotations(entsql.IndexWhere(\"deleted_at IS NULL\")).Unique() so deleted rows don't collide. GIN indexes are declared for jsonb annotation columns.", + "example": "index.Fields(\"namespace\", \"key\", \"version\").Annotations(entsql.IndexWhere(\"deleted_at IS NULL\")).Unique()" + }, + { + "name": "Edge ownership via From/Ref + Field", + "description": "FK ownership is declared with edge.From(name, T.Type).Ref(\"...\").Field(\"fk_col\").Unique().Required(); cascade behavior set with entsql.OnDelete(entsql.Cascade/SetNull). Same-ID 1:1 app subtables use StorageKey(edge.Column(\"id\")) instead of Field to avoid ent generation breaking.", + "example": "edge.From(\"customer\", Customer.Type).Ref(\"billing_customer_override\").Field(\"customer_id\").Unique().Required().Immutable()" + } + ], + "key_file_guides": [ + { + "file": "billing.go", + "role": "BillingProfile, BillingWorkflowConfig, BillingCustomerOverride, BillingInvoiceLine (+ flat-fee/usage-based line configs) \u2014 the largest schema file; defines package-level BillingDiscountsValueScanner etc.", + "watch_for": "BillingInvoiceLine carries deprecated fields (line_ids) and a wide edge set to charges; do not remove deprecated fields without a migration. Quantity is optional/nillable because UBP quantity is only known at issue time." + }, + { + "file": "charges.go", + "role": "Charge (typed parent) plus ChargesSearchV1 ent.View that UNION ALLs the three charge subtype tables.", + "watch_for": "ent.View (ChargesSearchV1) does NOT appear in generated migrate.Tables \u2014 Atlas diff reports no changes for view DDL; the view needs an explicit SQL migration. The view's Mixin() must stay empty (no edges/indexes) or ent generation panics." + }, + { + "file": "chargesflatfee.go / chargesusagebased.go / chargescreditpurchase.go", + "role": "Charge subtype tables and their realization-run/payment/credit-allocation children, composed from chargemeta/payment/creditrealization/invoicedusage/stddetailedline mixins.", + "watch_for": "ChargeUsageBased pins its table name via Annotations entsql.Annotation{Table: \"charge_usage_based\"}; renaming structs without the annotation changes the physical table." + }, + { + "file": "customer.go", + "role": "Customer + CustomerSubjects join table; central hub with edges to apps, subscriptions, entitlements, billing override, and all three charge subtypes.", + "watch_for": "Large in-code comment warns that v3 ILIKE filters need pg_trgm GIN indexes (a custom SQL migration) before the customers list handler is exposed \u2014 the btree indexes here cannot serve leading-wildcard search." + }, + { + "file": "feature.go", + "role": "Feature entity with LLM unit-cost columns and CHECK constraints.", + "watch_for": "Annotations() declares Postgres CHECK constraints (unit_cost_llm_*_mutual_exclusive); changing the mutually-exclusive column pairs requires updating these checks." + }, + { + "file": "ledger_account.go / ledger_entry.go / ledger_transaction*.go", + "role": "Double-entry ledger tables (account, sub-account, route, entry, transaction, transaction_group).", + "watch_for": "LedgerSubAccountRoute stores denormalized routing values (currency, tax_code as TaxCode.Key string, features text[]) that are NOT FKs. LedgerEntry/Transaction fields are Immutable() \u2014 append-only accounting source of truth." + }, + { + "file": "notification.go", + "role": "Notification channels/rules with manual field.ValueScannerFunc scanners (ChannelConfigValueScanner, RuleConfigValueScanner).", + "watch_for": "Uses the verbose field.ValueScannerFunc[T, *sql.NullString]{V:..., S:...} form (also AnnotationsValueScanner) rather than entutils.JSONStringValueScanner \u2014 keep nil/!Valid handling in the S func." + }, + { + "file": "ratecard.go / productcatalog.go / planaddon.go / addon.go", + "role": "Plan/addon/ratecard product-catalog schema; defines shared productcatalog scanners (PriceValueScanner, DiscountsValueScanner, EntitlementTemplateValueScanner, TaxConfigValueScanner, ProRatingConfigValueScanner).", + "watch_for": "AddonRateCard.Fields() borrows RateCard{}.Fields() via direct call (commented 'ent/runtime.go bug') and appends \u2014 keep that pattern when extending." + } + ], + "anti_patterns": [ + "Editing generated code under openmeter/ent/db/ \u2014 it is regenerated from these schemas (DO NOT EDIT header).", + "Adding/changing a field, index, or edge without running `make generate` then `atlas migrate --env local diff ` to produce up/down SQL + atlas.sum.", + "Using field.Float or default varchar for money/quantity instead of alpacadecimal.Decimal with numeric SchemaType.", + "Declaring a plain unique index on a business key without entsql.IndexWhere(\"deleted_at IS NULL\") \u2014 soft-deleted rows will collide.", + "Adding mixins, edges, or indexes to an ent.View (e.g. ChargesSearchV1) \u2014 ent generation panics; views also need hand-written SQL migrations." + ], + "decisions": [ + { + "decision": "Ent schema is the DB source of truth, Atlas diffs migrations from it", + "rationale": "Single Go definition drives generated query code (ent/db), migration metadata, and type-safe edges; migrations are reproducible diffs rather than hand-written DDL (except views)." + }, + { + "decision": "Soft delete (deleted_at) + partial indexes everywhere", + "rationale": "Resources are rarely hard-deleted; partial unique indexes let a key be reused after delete while preserving history and audit trails." + }, + { + "decision": "Same-ID 1:1 subtype tables (App\u2194AppStripe, Charge\u2194ChargeFlatFee) joined by StorageKey(id)", + "rationale": "Avoids ent generating conflicting SetAppID/SetXAppID setters; the subtype shares the parent's ULID so the join is trivial." + } + ], + "code_examples": [ + { + "scenario": "A namespaced, soft-deletable entity with a jsonb annotations column, ULID FK, decimal amount, and a partial-unique index", + "code": "package schema\n\nimport (\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"\n\t\"entgo.io/ent/schema/edge\"\n\t\"entgo.io/ent/schema/field\"\n\t\"entgo.io/ent/schema/index\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n)\n\ntype Widget struct{ ent.Schema }\n\nfunc (Widget) Mixin() []ent.Mixin {\n\treturn []ent.Mixin{entutils.IDMixin{}, entutils.NamespaceMixin{}, entutils.AnnotationsMixin{}, entutils.TimeMixin{}}\n}\n\nfunc (Widget) Fields() []ent.Field {\n\treturn []ent.Field{\n\t\tfield.String(\"owner_id\").Immutable().SchemaType(map[string]string{dialect.Postgres: \"char(26)\"}),\n\t\tfield.Other(\"amount\", alpacadecimal.Decimal{}).SchemaType(map[string]string{dialect.Postgres: \"numeric\"}),\n\t\tfield.String(\"key\").NotEmpty(),\n\t}\n}\n\nfunc (Widget) Indexes() []ent.Index {\n\treturn []ent.Index{index.Fields(\"namespace\", \"key\").Annotations(entsql.IndexWhere(\"deleted_at IS NULL\")).Unique()}\n}\n\nfunc (Widget) Edges() []ent.Edge {\n\treturn []ent.Edge{edge.From(\"owner\", Customer.Type).Ref(\"widgets\").Field(\"owner_id\").Required().Immutable().Unique()}\n}" + } + ] + }, + "openmeter/ent/tx": { + "purpose": "Single-file adapter that bridges the generated Ent client to the generic transaction.Creator abstraction in pkg/framework/transaction, so domain repos can open transactions without importing the concrete ent.Client.", + "patterns": [ + { + "name": "Ent-backed transaction.Creator", + "description": "NewCreator(db *db.Client) returns a transaction.Creator whose Tx(ctx) hijacks an ent tx and wraps it with entutils.NewTxDriver, returning a context that carries the tx.", + "example": "func NewCreator(db *db.Client) transaction.Creator { return &txCreator{db: db} }" + }, + { + "name": "HijackTx + NewTxDriver wrapping", + "description": "Tx() calls db.HijackTx(ctx, &sql.TxOptions{ReadOnly:false}) and returns entutils.NewTxDriver(eDriver, rawConfig) as the transaction.Driver; errors are wrapped with fmt.Errorf(...%w...).", + "example": "txCtx, rawConfig, eDriver, err := t.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false})" + } + ], + "key_file_guides": [ + { + "file": "enttx.go", + "role": "Defines unexported txCreator{db *db.Client} and exported NewCreator; the only public surface of package enttx.", + "watch_for": "Tx is hardcoded ReadOnly:false; the returned txCtx must be threaded down so repos rebind to the tx (entutils.TransactingRepo) \u2014 discarding it loses transaction propagation." + } + ], + "anti_patterns": [ + "Importing openmeter/ent/db directly in domain repos instead of depending on transaction.Creator from this adapter.", + "Swallowing the context returned by Tx() \u2014 downstream entutils.TransactingRepo relies on the tx carried in ctx." + ], + "decisions": [ + { + "decision": "Wrap ent transactions behind transaction.Creator", + "rationale": "Keeps the wide set of consumers (app/common, ledger/*, entitlement/metered, registry/builder, billing subscriptionsync) decoupled from the concrete ent client and uniform with pkg/framework/transaction semantics." + } + ], + "code_examples": [ + { + "scenario": "Wiring an ent client as a transaction.Creator", + "code": "import (\n\tenttx \"github.com/openmeterio/openmeter/openmeter/ent/tx\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"\n)\n\nvar creator transaction.Creator = enttx.NewCreator(entClient) // entClient *db.Client" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w86.json b/.archie/enrichments/w86.json new file mode 100644 index 0000000000..648216718f --- /dev/null +++ b/.archie/enrichments/w86.json @@ -0,0 +1,393 @@ +{ + "openmeter/entitlement/adapter": { + "purpose": "Postgres/Ent persistence layer for entitlements and usage resets. Implements entitlement.EntitlementRepo plus balanceworker.BalanceWorkerRepository over the Ent db.Client, and is the only place where entitlement DB rows are mapped to/from domain models.", + "patterns": [ + { + "name": "Wrap every method in TransactingRepo", + "description": "All repo methods enter entutils.TransactingRepo(ctx, a, func(ctx, repo){...}) so they rebind to the tx already carried in ctx instead of using the raw client directly.", + "example": "func (a *entitlementDBAdapter) GetEntitlement(ctx, id) (*entitlement.Entitlement, error) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *entitlementDBAdapter) (...) {...}) }" + }, + { + "name": "TxUser/Creator triple in transaction.go", + "description": "Each adapter implements Tx, WithTx and Self via HijackTx + NewTxClientFromRawConfig so it satisfies transaction.Creator and entutils.TxUser[*T].", + "example": "func (e *entitlementDBAdapter) WithTx(ctx, tx *entutils.TxDriver) *entitlementDBAdapter { txClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return NewPostgresEntitlementRepo(txClient.Client()) }" + }, + { + "name": "Interface compliance asserted with var _", + "description": "Compile-time assertions pin the concrete adapter to its interfaces, e.g. var _ repo = (*entitlementDBAdapter)(nil) where repo embeds EntitlementRepo and BalanceWorkerRepository.", + "example": "var _ repo = (*entitlementDBAdapter)(nil)" + }, + { + "name": "Map db.Entitlement to domain via mapEntitlementEntity", + "description": "Never return raw Ent rows; every read funnels through repo.mapEntitlementEntity(res) after loading usage-reset edges with withAllUsageResets(...).", + "example": "return repo.mapEntitlementEntity(res)" + }, + { + "name": "NotFound translated to domain errors", + "description": "db.IsNotFound(err) is converted to &entitlement.NotFoundError{...} or models.NewGenericNotFoundError(...) rather than leaking Ent errors.", + "example": "if db.IsNotFound(err) { return nil, &entitlement.NotFoundError{EntitlementID: entitlementID} }" + }, + { + "name": "Soft-delete and active-window predicates", + "description": "Queries always guard with DeletedAtGT(at)/DeletedAtIsNil, customerNotDeletedAt(at) and EntitlementActiveAt(at) helpers rather than returning deleted/inactive rows.", + "example": "db_entitlement.Or(db_entitlement.DeletedAtGT(at), db_entitlement.DeletedAtIsNil())" + }, + { + "name": "Raw SQL builder for cross-table fan-out", + "description": "Complex subject->customer / meter->feature resolution uses sql.Dialect(...).With(...) CTEs (EntitlementsByIngestedEventsQuery) executed via repo.db.QueryContext, with rows.Scan into balanceworker structs.", + "example": "query, args := EntitlementsByIngestedEventsQuery(dialect, ns, subject, meters...); rows, err := repo.db.QueryContext(ctx, query, args...)" + } + ], + "key_file_guides": [ + { + "file": "entitlement.go", + "role": "entitlementDBAdapter: all entitlement CRUD/list queries and the EntitlementsByIngestedEventsQuery CTE builder", + "watch_for": "GetActiveEntitlementOfCustomerAt uses .First() with a FIXME about not asserting single result; ListEntitlements splits FeatureIDsOrKeys into IDs vs keys via ulid.Parse" + }, + { + "file": "usage_reset.go", + "role": "usageResetDBAdapter implementing meteredentitlement.UsageResetRepo (Save creates UsageReset rows)", + "watch_for": "Validate() is called inside the tx before insert; keep anchor/interval fields in sync with UsageResetUpdate" + }, + { + "file": "transaction.go", + "role": "Tx/WithTx/Self plumbing for both adapters", + "watch_for": "Two structs share this file; adding a new adapter here means adding all three methods or TxUser compliance breaks" + }, + { + "file": "entitlement_test.go", + "role": "adapter_test integration tests with real Postgres via testutils.InitPostgresDB", + "watch_for": "Schema created under a package-level sync.Mutex m; tests build repos via NewPostgresEntitlementRepo/NewPostgresUsageResetRepo, not app wiring" + } + ], + "anti_patterns": [ + "Calling repo.db.* outside a TransactingRepo wrapper, breaking tx propagation carried in ctx", + "Returning raw *db.Entitlement rows instead of mapping through mapEntitlementEntity", + "Leaking db.IsNotFound errors instead of entitlement.NotFoundError / GenericNotFoundError", + "Querying entitlements without DeletedAt / active-window guards", + "Adding business logic (defaulting, validation) here instead of in the service/connector layer" + ], + "decisions": [ + { + "decision": "Adapter implements both EntitlementRepo and BalanceWorkerRepository via a private repo interface", + "rationale": "The balance worker reuses entitlement persistence, so one Ent-backed type serves both and stays consistent under a single tx." + }, + { + "decision": "Hand-written CTE SQL for ingest-event fan-out", + "rationale": "Resolving customer-by-subject and feature-by-meter in one round trip is impractical with the Ent fluent API." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware read returning a mapped domain entitlement", + "code": "func (a *entitlementDBAdapter) GetEntitlement(ctx context.Context, id models.NamespacedID) (*entitlement.Entitlement, error) {\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *entitlementDBAdapter) (*entitlement.Entitlement, error) {\n\t\tres, err := withAllUsageResets(repo.db.Entitlement.Query(), []string{id.Namespace}).\n\t\t\tWhere(db_entitlement.ID(id.ID), db_entitlement.Namespace(id.Namespace),\n\t\t\t\tdb_entitlement.Or(db_entitlement.DeletedAtGT(clock.Now()), db_entitlement.DeletedAtIsNil())).First(ctx)\n\t\tif err != nil {\n\t\t\tif db.IsNotFound(err) { return nil, &entitlement.NotFoundError{EntitlementID: id} }\n\t\t\treturn nil, err\n\t\t}\n\t\treturn repo.mapEntitlementEntity(res)\n\t})\n}" + } + ] + }, + "openmeter/entitlement/boolean": { + "purpose": "Boolean entitlement sub-type connector: a type whose access is always granted (HasAccess() returns true) once the entitlement is active. Implements entitlement.SubTypeConnector with no persistence of its own.", + "patterns": [ + { + "name": "SubTypeConnector implementation", + "description": "Connector embeds entitlement.SubTypeConnector and implements GetValue/BeforeCreate/AfterCreate; the service dispatches to it by EntitlementType.", + "example": "type Connector interface { entitlement.SubTypeConnector }" + }, + { + "name": "Reject metered-only fields in BeforeCreate", + "description": "BeforeCreate forces EntitlementType=Boolean and returns InvalidValueError if MeasureUsageFrom/IssueAfterReset/IsSoftLimit/Config are set.", + "example": "if model.MeasureUsageFrom != nil || model.Config != nil { return nil, &entitlement.InvalidValueError{Type: model.EntitlementType, Message: \"Invalid inputs for type\"} }" + }, + { + "name": "Parse-from-generic type guard", + "description": "ParseFromGenericEntitlement checks EntitlementType and returns WrongTypeError on mismatch before exposing the typed Entitlement.", + "example": "if model.EntitlementType != entitlement.EntitlementTypeBoolean { return nil, &entitlement.WrongTypeError{...} }" + }, + { + "name": "Compute currentUsagePeriod when a UsagePeriod is supplied", + "description": "If model.UsagePeriod is set, GetValue().Validate() then GetPeriodAt(clock.Now()) seeds CurrentUsagePeriod in the repo inputs.", + "example": "calculatedPeriod, err := usagePeriod.GetValue().GetPeriodAt(clock.Now())" + } + ], + "key_file_guides": [ + { + "file": "connector.go", + "role": "Stateless Connector (NewBooleanEntitlementConnector); BeforeCreate validation, GetValue returns &BooleanEntitlementValue{}", + "watch_for": "BooleanEntitlementValue.HasAccess() is hardcoded true \u2014 inactivity is handled by the service, not here" + }, + { + "file": "entitlement.go", + "role": "Typed Entitlement wrapper over entitlement.GenericProperties + ParseFromGenericEntitlement", + "watch_for": "No extra fields; do not add metered/static-only state to this type" + } + ], + "anti_patterns": [ + "Adding balance/usage logic to a boolean connector \u2014 booleans have no balance", + "Returning access decisions based on time here instead of letting the service gate on IsActive", + "Allowing Config/MeasureUsageFrom on boolean creation" + ], + "decisions": [ + { + "decision": "Connector is a stateless struct{} with no repo dependency", + "rationale": "Boolean entitlements carry no balance or grants, so all state lives in the generic entitlement row." + } + ], + "code_examples": [ + { + "scenario": "GetValue for a boolean entitlement", + "code": "func (c *connector) GetValue(ctx context.Context, e *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error) {\n\tif _, err := ParseFromGenericEntitlement(e); err != nil { return nil, err }\n\treturn &BooleanEntitlementValue{}, nil\n}" + } + ] + }, + "openmeter/entitlement/metered": { + "purpose": "Metered entitlement sub-system: the Connector that ties metered entitlements to credit grants, balance/overage calculation, usage resets, and the grant.OwnerConnector adapter. Bridges entitlements to openmeter/credit (balance/grant engine) and openmeter/streaming (usage).", + "patterns": [ + { + "name": "Connector aggregates credit + streaming + grant deps", + "description": "The connector struct holds streamingConnector, ownerConnector, balanceConnector, grantConnector, grantRepo, entitlementRepo, publisher, hooks, logger, tracer; built via NewMeteredEntitlementConnector(...).", + "example": "func NewMeteredEntitlementConnector(streamingConnector streaming.Connector, ownerConnector grant.OwnerConnector, balanceConnector credit.BalanceConnector, ...) Connector" + }, + { + "name": "ParseFromGenericEntitlement before any metered op", + "description": "Every method that needs metered fields first calls ParseFromGenericEntitlement to assert EntitlementTypeMetered and presence of MeasureUsageFrom/UsagePeriod/LastReset/CurrentUsagePeriod.", + "example": "metered, err := ParseFromGenericEntitlement(entRepoEntity)" + }, + { + "name": "Balance via credit engine + snapshots", + "description": "GetEntitlementBalance defers to balanceConnector.GetBalanceAt/GetBalanceForPeriod (credit engine), reading res.Snapshot.Balance()/Usage/Overage rather than computing from raw events.", + "example": "res, err := e.balanceConnector.GetBalanceAt(ctx, nsOwner, at)" + }, + { + "name": "OpenTelemetry span per operation", + "description": "Public methods open e.tracer.Start(ctx, \"meteredentitlement.X\", ...) with defer span.End(); trace.go provides mtrace.WithOwner/WithPeriod option helpers.", + "example": "ctx, span := e.tracer.Start(ctx, \"meteredentitlement.GetEntitlementBalance\", trace.WithAttributes(...)); defer span.End()" + }, + { + "name": "OwnerConnector adapter implements grant ownership", + "description": "entitlementGrantOwner (grant_owner_adapter.go) implements grant.OwnerConnector: DescribeOwner, GetUsagePeriodStartAt, GetResetTimelineInclusive, EndCurrentUsagePeriod, LockOwnerForTx so the credit engine can resolve entitlement owners.", + "example": "func (e *entitlementGrantOwner) GetUsagePeriodStartAt(ctx, owner, at) (time.Time, error)" + }, + { + "name": "Default grant on AfterCreate", + "description": "AfterCreate issues a default grant via grantConnector.CreateGrant with ResetMaxRollover=ResetMinRollover=amount and IssueAfterResetMetaTag annotation when HasDefaultGrant().", + "example": "Annotations: models.Annotations{IssueAfterResetMetaTag: true}" + }, + { + "name": "Hook adapter bridges generic and typed hooks", + "description": "hook.go ConvertHook wraps a models.ServiceHook[entitlement.Entitlement] into a ServiceHook[Entitlement] by re-parsing the typed entitlement in each Pre/Post method.", + "example": "func ConvertHook(h models.ServiceHook[entitlement.Entitlement]) models.ServiceHook[Entitlement]" + } + ], + "key_file_guides": [ + { + "file": "connector.go", + "role": "Connector interface + connector struct, BeforeCreate/AfterCreate, GetValue, MeteredEntitlementValue (HasAccess: soft-limit OR balance>0)", + "watch_for": "granularity is hardcoded time.Minute (FIXME); BeforeCreate truncates anchor and forces UsagePeriod.From to MeasureUsageFrom" + }, + { + "file": "balance.go", + "role": "GetEntitlementBalance and GetEntitlementBalanceHistory (window filling + segment merge)", + "watch_for": "Heavy minute-truncation/window-fill logic with FIXMEs; queryMeter shortcuts a zero-length period to 0; ClickHouse only returns non-empty windows so gaps are filled manually" + }, + { + "file": "reset.go", + "role": "ResetEntitlementUsage and ResetEntitlementsWithExpiredUsagePeriod", + "watch_for": "Reset must keep usage-period anchor/highwatermark logic consistent with grant rollover" + }, + { + "file": "entitlement_grant.go", + "role": "CreateGrant/ListEntitlementGrants and EntitlementGrant wrapper over grant.Grant", + "watch_for": "Entitlement resolved by ID then falls back to GetActiveEntitlementOfCustomerAt by feature key; PreUpdate hook fired before CreateGrant" + }, + { + "file": "grant_owner_adapter.go", + "role": "entitlementGrantOwner implementing grant.OwnerConnector for the credit engine", + "watch_for": "GetResetTimelineInclusive/EndCurrentUsagePeriod must stay aligned with usage-reset persistence" + }, + { + "file": "repository.go", + "role": "UsageResetRepo interface, UsageResetUpdate (with Validate) and UsageResetNotFoundError", + "watch_for": "Implemented by the adapter package; keep Validate in sync with adapter Save" + }, + { + "file": "events.go", + "role": "EntitlementResetEvent (v1 deprecated) / EntitlementResetEventV3 Watermill events", + "watch_for": "v1 keyed on Subject, v3 on CustomerID; pick V3 for new code and validate Namespace/Subject" + }, + { + "file": "entitlement.go", + "role": "Typed metered Entitlement, IssueAfterReset, HasDefaultGrant, ParseFromGenericEntitlement / ToGenericEntitlement", + "watch_for": "ParseFromGenericEntitlement requires many non-nil fields \u2014 missing any yields InvalidValueError" + } + ], + "anti_patterns": [ + "Computing balance/overage from raw meter rows instead of the credit balanceConnector/engine", + "Skipping ParseFromGenericEntitlement and reading metered fields off the generic entitlement", + "Emitting the deprecated EntitlementResetEvent (v1) for new flows instead of EntitlementResetEventV3", + "Calling grantConnector.CreateGrant without firing the PreUpdate hook on grant creation", + "Bypassing the tracer (e.tracer.Start) on public connector operations" + ], + "decisions": [ + { + "decision": "Metered balance delegates to the credit engine and snapshots", + "rationale": "Balance, overage and grant burn-down are credit-domain concerns; the entitlement connector only orchestrates and shapes EntitlementBalance." + }, + { + "decision": "An OwnerConnector adapter lives here rather than in credit", + "rationale": "Mapping a credit grant owner onto an entitlement (usage period, reset timeline, measurement start) needs entitlement knowledge, so it is implemented next to the connector." + }, + { + "decision": "Default grants are issued in AfterCreate", + "rationale": "IssueAfterReset semantics (rollover=amount) must run after the entitlement row exists so the grant has a valid owner." + } + ], + "code_examples": [ + { + "scenario": "Connector reads balance from the credit engine", + "code": "func (e *connector) GetEntitlementBalance(ctx context.Context, id models.NamespacedID, at time.Time) (*EntitlementBalance, error) {\n\tctx, span := e.tracer.Start(ctx, \"meteredentitlement.GetEntitlementBalance\")\n\tdefer span.End()\n\tnsOwner := models.NamespacedID{Namespace: id.Namespace, ID: id.ID}\n\tstartOfPeriod, err := e.ownerConnector.GetUsagePeriodStartAt(ctx, nsOwner, at)\n\tif err != nil { return nil, err }\n\tres, err := e.balanceConnector.GetBalanceAt(ctx, nsOwner, at)\n\tif err != nil { return nil, err }\n\treturn &EntitlementBalance{EntitlementID: id.ID, Balance: res.Snapshot.Balance(), Overage: res.Snapshot.Overage, StartOfPeriod: startOfPeriod}, nil\n}" + } + ] + }, + "openmeter/entitlement/service": { + "purpose": "The entitlement.Service facade: orchestrates CRUD, scheduling/superseding, access resolution and value computation across the metered/static/boolean sub-type connectors, the entitlement repo, customer/feature services and the event bus.", + "patterns": [ + { + "name": "Service built from ServiceConfig", + "description": "NewEntitlementService(ServiceConfig) wires the three sub-type connectors, EntitlementRepo, FeatureConnector, CustomerService, MeterService, Publisher and *lockr.Locker into the private service struct.", + "example": "func NewEntitlementService(config ServiceConfig) entitlement.Service" + }, + { + "name": "Mutations run inside transaction.Run", + "description": "Create/Override/Schedule/Supersede/Delete wrap their bodies in transaction.Run(ctx, c.entitlementRepo, func(ctx){...}) so repo writes and event publishing share one tx.", + "example": "return transaction.Run(ctx, c.entitlementRepo, func(ctx context.Context) (*entitlement.Entitlement, error) {...})" + }, + { + "name": "Dispatch to sub-type connector via getTypeConnector", + "description": "getTypeConnector(inp) switches on inp.GetType() to return metered/static/boolean SubTypeConnector; BeforeCreate/AfterCreate/GetValue always go through it.", + "example": "switch entitlementType { case entitlement.EntitlementTypeMetered: return c.meteredEntitlementConnector, nil ... }" + }, + { + "name": "Uniqueness enforced with advisory lock + constraint check", + "description": "ScheduleEntitlement takes lockUniqueScope(customerID, featureKey) (lockr key fk/cid) then runs entitlement.ValidateUniqueConstraint over scheduled entitlements + a dummy, translating UniquenessConstraintError into AlreadyExistsError.", + "example": "err = c.lockUniqueScope(ctx, input.UsageAttribution.ID, feat.Key)" + }, + { + "name": "Create/Override compose Schedule/Supersede", + "description": "CreateEntitlement forbids ActiveTo/ActiveFrom and calls ScheduleEntitlement then issues grants; OverrideEntitlement validates customer match then calls SupersedeEntitlement (DeactivateEntitlement + ScheduleEntitlement).", + "example": "ent, err := c.ScheduleEntitlement(ctx, input)" + }, + { + "name": "Publish lifecycle events with customer payload", + "description": "Mutations publish NewEntitlementCreatedEventPayloadV2 / NewEntitlementDeletedEventPayloadV2 after loading the customer, inside the tx.", + "example": "err = c.publisher.Publish(ctx, entitlement.NewEntitlementCreatedEventPayloadV2(*ent, cust))" + }, + { + "name": "Bounded-concurrency access fan-out", + "description": "GetAccess runs GetEntitlementValue per entitlement in an errgroup with a semaphore (maxConcurrency=10), collecting into sync.Map keyed by FeatureKey.", + "example": "sem := semaphore.NewWeighted(int64(maxConcurrency)); g.Go(func() error { ... })" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "service struct, NewEntitlementService, all CRUD/list/value/access methods and getTypeConnector dispatch", + "watch_for": "GetEntitlementOfCustomerAt uses ulid.Parse to skip a guaranteed-miss ID lookup for feature keys; GetEntitlementValue returns NoAccessValue when !ent.IsActive(at)" + }, + { + "file": "scheduling.go", + "role": "ScheduleEntitlement, SupersedeEntitlement, lockUniqueScope", + "watch_for": "Dummy entitlement with id \"new-entitlement-id\" is used for the constraint check; an inconsistency in scheduled entitlements (neither side is the dummy) is a hard error, not AlreadyExists" + }, + { + "file": "lock.go", + "role": "NewEntitlementUniqueScopeLock builds the lockr.Key(\"fk\", featureKey, \"cid\", customerID)", + "watch_for": "Key fields/order define the uniqueness scope \u2014 changing them changes the lock domain" + }, + { + "file": "service_test.go / access_test.go / scheduling_test.go", + "role": "service_test integration suites (setupDependecies, createCustomerAndSubject, createMeterInPG)", + "watch_for": "Tests freeze time via clock.SetTime/ResetTime and require a meter row in PG (createMeterInPG) for metered access" + }, + { + "file": "utils_test.go", + "role": "Shared test deps and mockTypeConnector/mockTypeValue", + "watch_for": "dependencies.Teardown closes db/drivers; reuse this harness instead of hand-rolling new setup" + } + ], + "anti_patterns": [ + "Performing entitlement writes without transaction.Run, so repo + event publish can diverge", + "Hardcoding type behavior in the service instead of dispatching via getTypeConnector", + "Scheduling without lockUniqueScope + ValidateUniqueConstraint, allowing overlapping entitlements", + "Accepting ActiveFrom/ActiveTo in CreateEntitlement/OverrideEntitlement (they are rejected)", + "Computing access serially or unbounded instead of the errgroup+semaphore fan-out" + ], + "decisions": [ + { + "decision": "Create/Override are thin compositions over Schedule/Supersede", + "rationale": "All creation funnels through scheduling so the uniqueness lock + constraint check is enforced exactly once." + }, + { + "decision": "Uniqueness uses an advisory lock plus an in-memory constraint check", + "rationale": "Overlap rules span multiple scheduled rows and can't be expressed as a simple DB unique index, so the lock serializes the check." + }, + { + "decision": "GetAccess limits concurrency to 10", + "rationale": "Per-entitlement value computation (esp. metered balance) is expensive; the semaphore caps load while still parallelizing." + } + ], + "code_examples": [ + { + "scenario": "Transactional schedule with uniqueness lock and event publish", + "code": "func (c *service) ScheduleEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error) {\n\treturn transaction.Run(ctx, c.entitlementRepo, func(ctx context.Context) (*entitlement.Entitlement, error) {\n\t\tif err := input.Validate(); err != nil { return nil, models.NewGenericValidationError(err) }\n\t\tfeat, err := c.featureConnector.GetFeature(ctx, input.Namespace, *input.FeatureKey, feature.IncludeArchivedFeatureFalse)\n\t\tif err != nil { return nil, &feature.FeatureNotFoundError{ID: *input.FeatureKey} }\n\t\tif err := c.lockUniqueScope(ctx, input.UsageAttribution.ID, feat.Key); err != nil { return nil, err }\n\t\tconnector, err := c.getTypeConnector(input)\n\t\tif err != nil { return nil, err }\n\t\trepoInputs, err := connector.BeforeCreate(input, *feat)\n\t\tif err != nil { return nil, err }\n\t\tent, err := c.entitlementRepo.CreateEntitlement(ctx, *repoInputs)\n\t\tif err != nil { return nil, err }\n\t\tif err := connector.AfterCreate(ctx, ent); err != nil { return nil, err }\n\t\treturn ent, c.publisher.Publish(ctx, entitlement.NewEntitlementCreatedEventPayloadV2(*ent, cust))\n\t})\n}" + } + ] + }, + "openmeter/entitlement/snapshot": { + "purpose": "Defines the entitlement balance SnapshotEvent (Watermill marshaler.Event, v2) emitted by the balance worker when an entitlement value changes \u2014 the payload notification/consumer and downstream workers consume.", + "patterns": [ + { + "name": "marshaler.Event with versioned name", + "description": "SnapshotEvent implements EventName/EventMetadata/Validate; the name is built once via metadata.GetEventName(EventType{Subsystem: entitlement.EventSubsystem, Name: \"entitlement.snapshot\", Version: \"v2\"}).", + "example": "snapshotEventName = metadata.GetEventName(metadata.EventType{Subsystem: entitlement.EventSubsystem, Name: \"entitlement.snapshot\", Version: \"v2\"})" + }, + { + "name": "Operation enum gates payload", + "description": "ValueOperationType (reset/update/delete) has Values()/Validate(); Validate() requires Value to be non-nil for update/reset, empty for delete.", + "example": "case ValueOperationUpdate, ValueOperationReset: if e.Value == nil { errs = append(errs, errors.New(\"balance is required ...\")) }" + }, + { + "name": "errors.Join validation", + "description": "Validate() accumulates into var errs []error and returns errors.Join(errs...) rather than failing on the first field.", + "example": "return errors.Join(errs...)" + }, + { + "name": "Constructor derives namespace", + "description": "NewSnapshotEvent derives Namespace from ent.Namespace and tolerates a nil deprecated *subject.Subject.", + "example": "Namespace: models.NamespaceID{ID: ent.Namespace}" + } + ], + "key_file_guides": [ + { + "file": "event.go", + "role": "ValueOperationType enum, EntitlementValue (balance/overage/usage pointers), SnapshotEvent and NewSnapshotEvent", + "watch_for": "Subject is deprecated and may be empty (validation intentionally skips it); EventMetadata branches on whether Customer.ID is set; bump the v2 version string if the shape changes" + } + ], + "anti_patterns": [ + "Re-validating/relying on Subject \u2014 it is deprecated and may be empty for customers without usage attribution", + "Mutating the event shape without bumping the v2 version in snapshotEventName", + "Returning on first validation error instead of joining all issues" + ], + "decisions": [ + { + "decision": "EntitlementValue uses pointer fields for metered-only data", + "rationale": "Balance/Overage/Usage/Config are nil for entitlement types that don't have them, distinguishing 'absent' from zero." + } + ], + "code_examples": [ + { + "scenario": "Validating a snapshot event", + "code": "func (e SnapshotEvent) Validate() error {\n\tvar errs []error\n\tif err := e.Operation.Validate(); err != nil { errs = append(errs, err) }\n\tif e.Entitlement.ID == \"\" { errs = append(errs, errors.New(\"entitlementId is required\")) }\n\tif err := e.Namespace.Validate(); err != nil { errs = append(errs, err) }\n\tswitch e.Operation {\n\tcase ValueOperationUpdate, ValueOperationReset:\n\t\tif e.Value == nil { errs = append(errs, errors.New(\"balance is required for balance update/reset\")) }\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w87.json b/.archie/enrichments/w87.json new file mode 100644 index 0000000000..0ed8c2f95a --- /dev/null +++ b/.archie/enrichments/w87.json @@ -0,0 +1,135 @@ +{ + "openmeter/entitlement/balanceworker/events": { + "purpose": "Defines the Watermill event contract for the balance worker's recalculation pipeline. The single file declares RecalculateEvent, which triggers an entitlement balance snapshot recomputation as-of a timestamp, plus the OperationType enum describing what caused the trigger.", + "patterns": [ + { + "name": "marshaler.Event compile-time assertion", + "description": "Every event type asserts interface conformance with a blank var so the compiler enforces EventName()/EventMetadata() at build time.", + "example": "var _ marshaler.Event = RecalculateEvent{}" + }, + { + "name": "Versioned EventType triple", + "description": "Event identity is a metadata.EventType{Subsystem, Name, Version}; EventSubsystem='balanceWorker', RecalculateEventName='triggerEntitlementRecalculation', Version='v2'. The wire name is derived via metadata.GetEventName, never hardcoded.", + "example": "recalculateEventName = metadata.GetEventName(recalculateEventType)" + }, + { + "name": "String enum with Values()+Validate()", + "description": "OperationType is a string type whose Values() lists every valid constant and Validate() checks membership via slices.Contains. New operations MUST be added to both the const block and Values().", + "example": "func (o OperationType) Validate() error { if !slices.Contains(o.Values(), o) {...} }" + }, + { + "name": "Error-collecting Validate()", + "description": "Validate() accumulates into var errs []error and returns errors.Join(errs...), wrapping nested validators with field context (fmt.Errorf(\"entitlement: %w\", err)).", + "example": "errs = append(errs, fmt.Errorf(\"sourceOperation: %w\", err)); return errors.Join(errs...)" + }, + { + "name": "Subject path via metadata.ComposeResourcePath", + "description": "EventMetadata().Subject is built with metadata.ComposeResourcePath(namespace, metadata.EntityEntitlement, id) rather than string concatenation.", + "example": "Subject: metadata.ComposeResourcePath(e.Entitlement.Namespace, metadata.EntityEntitlement, e.Entitlement.ID)" + } + ], + "key_file_guides": [ + { + "file": "recalculate.go", + "role": "Declares RecalculateEvent (Entitlement NamespacedID, AsOf, OriginalEventSource, SourceOperation, RawIngestedEvents) and the OperationType enum covering entitlement/grant lifecycle + ingest/recalculate triggers.", + "watch_for": "RawIngestedEvents carries serializer.CloudEventsKafkaPayload from kafkaingest; the event Source comes from OriginalEventSource so downstream consumers can trace the originating producer. Bumping the payload shape requires bumping recalculateEventType.Version (currently 'v2')." + } + ], + "anti_patterns": [ + "Adding an OperationType constant without also adding it to Values() (Validate would reject it).", + "Hardcoding the event name string instead of deriving it from metadata.GetEventName(recalculateEventType).", + "Returning on the first validation failure instead of collecting into errs and errors.Join.", + "Changing RecalculateEvent's JSON shape without incrementing the EventType Version, breaking deserialization of in-flight messages." + ], + "decisions": [ + { + "decision": "Event is at Version 'v2' and exposes EventVersionSubsystem.", + "rationale": "Schema has already evolved once; consumers route by version+subsystem so old and new payloads can coexist on the topic during rollout." + }, + { + "decision": "OriginalEventSource is carried on the event and surfaced as the metadata Source.", + "rationale": "Recalculation is triggered by many upstream operations (ingest, grant void, reset); preserving the original source keeps event provenance intact through the worker." + } + ], + "code_examples": [ + { + "scenario": "Declaring a versioned Watermill event with compile-time conformance and joined validation", + "code": "var _ marshaler.Event = RecalculateEvent{}\n\nvar recalculateEventType = metadata.EventType{\n\tSubsystem: EventSubsystem,\n\tName: RecalculateEventName,\n\tVersion: \"v2\",\n}\nvar recalculateEventName = metadata.GetEventName(recalculateEventType)\n\nfunc (e RecalculateEvent) EventName() string { return recalculateEventName }\n\nfunc (e RecalculateEvent) Validate() error {\n\tvar errs []error\n\tif e.AsOf.IsZero() {\n\t\terrs = append(errs, errors.New(\"asOf is required\"))\n\t}\n\tif err := e.Entitlement.Validate(); err != nil {\n\t\terrs = append(errs, fmt.Errorf(\"entitlement: %w\", err))\n\t}\n\treturn errors.Join(errs...)\n}" + } + ] + }, + "openmeter/entitlement/balanceworker/filters": { + "purpose": "Provides the scoping layer that decides whether a given entitlement/namespace should be recalculated and snapshot-emitted by the balance worker. Defines the Filter interface and two implementations: HighWatermarkCache (dedup by last-calculation time) and NotificationsFilter (only entitlements covered by a balance-threshold notification rule).", + "patterns": [ + { + "name": "Filter interface hierarchy", + "description": "Filter declares IsNamespaceInScope + IsEntitlementInScope. NamedFilter embeds Filter + Name(); CalculationTimeRecorder embeds Filter + RecordLastCalculation. Implementations pick the interface that matches their capability and assert it.", + "example": "var _ NamedFilter = (*HighWatermarkCache)(nil); var _ CalculationTimeRecorder = (*HighWatermarkCache)(nil)" + }, + { + "name": "Validate request before scoping", + "description": "Both IsEntitlementInScope implementations call req.Validate() first; EntitlementFilterRequest.Validate collects id/namespace/operation/eventAt errors via errors.Join.", + "example": "if err := req.Validate(); err != nil { return false, err }" + }, + { + "name": "Backend-abstracted cache", + "description": "HighWatermarkCache delegates to a HighWatermarkBackend interface (Get/Record); HighWatermarkInMemoryBackend wraps hashicorp golang-lru/v2. Swap the backend, not the cache logic.", + "example": "func NewHighWatermarkCache(size int) (*HighWatermarkCache, error) { backend, err := NewHighWatermarkInMemoryBackend(size); ... }" + }, + { + "name": "Config struct with Validate constructor guard", + "description": "NotificationsFilter is built from NotificationsFilterConfig (implements models.Validator); NewNotificationsFilter calls cfg.Validate() before constructing. Required deps (NotificationService) and positive TTL/size are enforced there.", + "example": "func NewNotificationsFilter(cfg NotificationsFilterConfig) (NamedFilter, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }" + }, + { + "name": "TTL'd rule cache keyed by namespace", + "description": "NotificationsFilter caches rules per namespace via lrux.CacheWithItemTTL with a loader (fetchRulesForNamespace) and lrux.WithTTL; it only fetches EventTypeBalanceThreshold rules.", + "example": "ruleCache, err := lrux.NewCacheWithItemTTL(cfg.CacheSize, filter.fetchRulesForNamespace, lrux.WithTTL(cfg.CacheTTL))" + } + ], + "key_file_guides": [ + { + "file": "filter.go", + "role": "Declares the Filter / NamedFilter / CalculationTimeRecorder interfaces and the EntitlementFilterRequest + RecordLastCalculationRequest input structs.", + "watch_for": "EntitlementFilterRequest.Operation is a snapshot.ValueOperationType; Validate requires Entitlement.ID, Namespace, a valid Operation, and a non-zero EventAt." + }, + { + "file": "highwatermark.go", + "role": "Dedup filter: keeps the last CalculatedAt per entitlement; an event is in-scope only if its EventAt is after (highWatermark - defaultClockDrift).", + "watch_for": "Reset operations (snapshot.ValueOperationReset) always return in-scope. Missing cache entries are treated as in-scope (fail-open); deleted entitlements are out-of-scope regardless of watermark. defaultClockDrift is 1ms to tolerate NTP skew between worker nodes." + }, + { + "file": "notifications.go", + "role": "Scope filter that limits recalculation to entitlements matching a balance-threshold notification rule's feature list (empty Features list => all features in scope).", + "watch_for": "Matches both FeatureKey and FeatureID against rule.Config.BalanceThreshold.Features; rules with a nil BalanceThreshold are skipped. IsNamespaceInScope returns true only if the namespace has >0 such rules." + } + ], + "anti_patterns": [ + "Querying NotificationService directly per event instead of going through the TTL'd ruleCache.", + "Skipping req.Validate() in a Filter implementation before making a scope decision.", + "Making HighWatermarkCache fail-closed on cache miss \u2014 current contract is fail-open (treat unknown entitlements as in-scope).", + "Hardcoding a new cache backend inside HighWatermarkCache instead of implementing HighWatermarkBackend.", + "Treating reset events as dedup-eligible \u2014 they must always pass so the new period gets a fresh snapshot for notifications." + ], + "decisions": [ + { + "decision": "High-watermark dedup compares against highWatermark minus a 1ms defaultClockDrift.", + "rationale": "Multiple worker nodes may have slightly different clocks; allowing 1ms of drift (guaranteed on AWS/GCP NTP) prevents valid events from being dropped at the boundary." + }, + { + "decision": "NotificationsFilter only loads EventTypeBalanceThreshold rules and matches feature key or id.", + "rationale": "The balance worker only needs to recompute snapshots that can fire a balance-threshold notification; filtering at the namespace/feature level avoids recomputing entitlements no rule cares about." + }, + { + "decision": "Cache logic and storage are split via HighWatermarkBackend.", + "rationale": "Lets the in-memory LRU be swapped for a distributed backend without changing the in-scope decision logic." + } + ], + "code_examples": [ + { + "scenario": "Building a NamedFilter from a validated config with a TTL'd per-namespace loader cache", + "code": "func NewNotificationsFilter(cfg NotificationsFilterConfig) (NamedFilter, error) {\n\tif err := cfg.Validate(); err != nil {\n\t\treturn nil, err\n\t}\n\tfilter := &NotificationsFilter{notificationService: cfg.NotificationService}\n\truleCache, err := lrux.NewCacheWithItemTTL(cfg.CacheSize, filter.fetchRulesForNamespace, lrux.WithTTL(cfg.CacheTTL))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfilter.ruleCache = ruleCache\n\treturn filter, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w88.json b/.archie/enrichments/w88.json new file mode 100644 index 0000000000..78f44e6c53 --- /dev/null +++ b/.archie/enrichments/w88.json @@ -0,0 +1,101 @@ +{ + "openmeter/entitlement/driver/v2": { + "purpose": "HTTP driver layer for the V2 customer-centric entitlement API (package entitlementdriverv2). Exposes customer-scoped entitlement and grant endpoints plus namespace-wide entitlement list/get, mapping api.* request/response types onto entitlement.Service and meteredentitlement.Connector. Unlike v1 (subject-key based), every handler resolves a customer via customerService before touching the connector.", + "patterns": [ + { + "name": "httptransport.NewHandlerWithArgs three-stage handlers", + "description": "Every endpoint is a method on *entitlementHandler returning a typed Handler built from (request-decoder, business-fn, response-encoder, options). Decoder resolves namespace + customer and builds a typed Request struct; business-fn calls the connector and maps to api types.", + "example": "func (h *entitlementHandler) GetEntitlement() GetEntitlementHandler { return httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoder[...], httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getEntitlementByIdV2\"), httptransport.WithErrorEncoder(getErrorEncoder()))...) }" + }, + { + "name": "Per-handler Request/Response/Params type triple", + "description": "Each endpoint declares a type block with HandlerRequest, HandlerResponse (usually an api.* alias), and HandlerParams (path/query args), then a named Handler alias of httptransport.HandlerWithArgs[Req,Resp,Params]. The EntitlementHandler interface in handler.go lists every endpoint constructor.", + "example": "type CreateCustomerEntitlementHandler httptransport.HandlerWithArgs[CreateCustomerEntitlementHandlerRequest, CreateCustomerEntitlementHandlerResponse, CreateCustomerEntitlementHandlerParams]" + }, + { + "name": "Namespace then customer resolution in decoder", + "description": "Decoders call h.resolveNamespace(ctx) first, then h.customerService.GetCustomer with a customer.CustomerIDOrKey, and reject deleted customers with models.NewGenericPreConditionFailedError before proceeding.", + "example": "ns, err := h.resolveNamespace(ctx); cus, err := h.customerService.GetCustomer(ctx, customer.GetCustomerInput{CustomerIDOrKey: &customer.CustomerIDOrKey{Namespace: ns, IDOrKey: params.CustomerIDOrKey}}); if cus.IsDeleted() { return models.NewGenericPreConditionFailedError(...) }" + }, + { + "name": "Feature-key-or-id resolution via GetEntitlementOfCustomerAt", + "description": "Endpoints taking an EntitlementIdOrFeatureKey resolve it to a concrete entitlement for the customer at clock.Now() before acting (get/delete/override/history/reset), never trusting the raw path segment as an ID.", + "example": "ent, err := h.connector.GetEntitlementOfCustomerAt(ctx, ns, cus.ID, params.EntitlementIdOrFeatureKey, clock.Now())" + }, + { + "name": "Stateless ParserV2 + Map* mapping functions", + "description": "All domain<->API translation lives in mapping.go: ParserV2 (empty struct, var ParserV2 = parserV2{}) does ToAPIGenericV2 type-switch dispatch to ToMeteredV2/ToStaticV2/ToBooleanV2; package funcs MapEntitlementGrantToAPIV2, ParseAPICreateInputV2, MapAPIGrantV2ToCreateGrantInput handle grants/inputs.", + "example": "v2, err := ParserV2.ToAPIGenericV2(ent, cus.ID, cus.Key); createInp, grantsInp, err := ParseAPICreateInputV2(request.APIInput, request.Namespace, cus.GetUsageAttribution())" + }, + { + "name": "Reuse v1 driver helpers, never duplicate them", + "description": "v2 imports entitlementdriver (v1) for shared logic: getErrorEncoder() chains entitlementdriver.GetErrorEncoder() before the generic encoder; interval/recurrence mapping uses entitlementdriver.MapRecurrenceToAPI and entitlementdriver.MapAPIPeriodIntervalToRecurrence.", + "example": "func getErrorEncoder() encoder.ErrorEncoder { v1 := entitlementdriver.GetErrorEncoder(); generic := commonhttp.GenericErrorEncoder(); return func(...) bool { if v1(...) { return true }; return generic(...) } }" + }, + { + "name": "WithOperationName matches the V2 OpenAPI operationId", + "description": "Each handler sets httptransport.WithOperationName to the camelCase V2 operation (e.g. createCustomerEntitlementV2, listEntitlementsV2). These must align with api/spec generated names.", + "example": "httptransport.WithOperationName(\"listCustomerEntitlementsV2\")" + } + ], + "key_file_guides": [ + { + "file": "handler.go", + "role": "Defines the EntitlementHandler interface (11 endpoint constructors), the entitlementHandler struct, and NewEntitlementHandler. Dependencies: connector entitlement.Service, balanceConnector meteredentitlement.Connector, customerService customer.Service, namespaceDecoder namespacedriver.NamespaceDecoder.", + "watch_for": "Adding an endpoint requires adding it to the interface AND wiring it in the router; resolveNamespace lives here implicitly via namespaceDecoder." + }, + { + "file": "customer.go", + "role": "Customer-scoped generic entitlement CRUD: Create/List/Get/Delete/OverrideCustomerEntitlement, plus the resolveNamespace helper. Uses ParseAPICreateInputV2 and ParserV2.ToAPIGenericV2.", + "watch_for": "Create reuses ParseAPICreateInputV2 with cus.GetUsageAttribution(); Override resolves the old entitlement first then calls connector.OverrideEntitlement(ctx, cus.ID, oldEnt.ID, ...); deleted-customer guard is repeated in every handler." + }, + { + "file": "customer_metered.go", + "role": "Metered-specific customer endpoints: List/CreateCustomerEntitlementGrant, GetCustomerEntitlementHistory, ResetCustomerEntitlementUsage. Routes through h.balanceConnector (meteredentitlement.Connector), not the generic connector.", + "watch_for": "History builds api.WindowedBalanceHistory/burndown manually from windowedHistory and burndownHistory.Segments(); WindowTimeZone parsed via time.LoadLocation (400 on error); reset defaults At to clock.Now()." + }, + { + "file": "entitlement.go", + "role": "Namespace-wide (non-customer-scoped) ListEntitlements and GetEntitlement (by id). ListEntitlements validates OrderBy/EntitlementType against StrValues() and builds entitlement.ListEntitlementsParams.", + "watch_for": "OrderBy is converted with strcase.CamelToSnake then validated; there is duplicated OrderBy logic (an inline closure plus a later switch on params.OrderBy) \u2014 the switch wins. Get returns 404 via connector error path." + }, + { + "file": "mapping.go", + "role": "All domain<->API conversion. ParserV2 type-switches EntitlementType to ParseFromGenericEntitlement + ToMeteredV2/ToStaticV2/ToBooleanV2; ParseAPICreateInputV2 dispatches on inp.ValueByDiscriminator(); MapAPIGrantV2ToCreateGrantInput wraps credit.CreateGrantInput.", + "watch_for": "ParseAPICreateInputV2 enforces 'issueAfterReset and grants cannot be used together' and prunes ActiveFrom/ActiveTo to nil at the end; usage period built via timeutil.AsTimed/timeutil.Recurrence with Anchor defaulting to clock.Now(); follow /go-types-conversion naming (ToAPI../FromAPI..)." + }, + { + "file": "errors.go", + "role": "getErrorEncoder() composes the v1 entitlement error encoder with commonhttp.GenericErrorEncoder so V2 error responses stay byte-compatible with V1.", + "watch_for": "Do not write a parallel error encoder; extend behavior in the v1 driver so both versions share it." + } + ], + "anti_patterns": [ + "Trusting the EntitlementIdOrFeatureKey path segment as a literal entitlement ID instead of resolving via GetEntitlementOfCustomerAt \u2014 feature keys must be resolved per customer first.", + "Skipping the customer-resolution + IsDeleted() precondition guard before calling the connector in customer-scoped handlers.", + "Putting domain<->API translation logic in handler files; all mapping must stay in mapping.go via ParserV2 / Map* / Parse* functions.", + "Calling the generic entitlement connector for grant/history/reset operations \u2014 those go through h.balanceConnector (meteredentitlement.Connector).", + "Duplicating v1 logic (error encoding, recurrence/interval mapping) instead of importing entitlementdriver helpers." + ], + "decisions": [ + { + "decision": "V2 is customer-centric while V1 is subject-key-centric.", + "rationale": "Handlers resolve a customer.Customer (via customerService) and use cus.GetUsageAttribution()/cus.ID, replacing V1's subject-key parsing while reusing V1 parsers and error encoders for behavioral parity." + }, + { + "decision": "Generic entitlement operations and metered/grant operations are split across two connectors.", + "rationale": "entitlement.Service handles CRUD and access; meteredentitlement.Connector owns grants, balance history, and resets, keeping credit/grant concerns out of the generic service." + }, + { + "decision": "Mapping is centralized in a stateless ParserV2 plus free functions.", + "rationale": "Keeps handlers thin (decode + call + encode) and makes domain/API translation independently testable; mirrors the V1 parser pattern for consistency." + } + ], + "code_examples": [ + { + "scenario": "Customer-scoped handler: resolve namespace + customer, guard deleted, resolve entitlement, act, map to api type", + "code": "func (h *entitlementHandler) GetCustomerEntitlement() GetCustomerEntitlementHandler {\n\treturn httptransport.NewHandlerWithArgs(\n\t\tfunc(ctx context.Context, r *http.Request, params GetCustomerEntitlementHandlerParams) (GetCustomerEntitlementHandlerRequest, error) {\n\t\t\tns, err := h.resolveNamespace(ctx)\n\t\t\tif err != nil { return GetCustomerEntitlementHandlerRequest{}, err }\n\t\t\treturn GetCustomerEntitlementHandlerRequest{CustomerIDOrKey: params.CustomerIDOrKey, EntitlementIdOrFeatureKey: params.EntitlementIdOrFeatureKey, Namespace: ns}, nil\n\t\t},\n\t\tfunc(ctx context.Context, request GetCustomerEntitlementHandlerRequest) (GetCustomerEntitlementHandlerResponse, error) {\n\t\t\tcus, err := h.customerService.GetCustomer(ctx, customer.GetCustomerInput{CustomerIDOrKey: &customer.CustomerIDOrKey{Namespace: request.Namespace, IDOrKey: request.CustomerIDOrKey}})\n\t\t\tif err != nil { return nil, err }\n\t\t\tif cus != nil && cus.IsDeleted() { return nil, models.NewGenericPreConditionFailedError(fmt.Errorf(\"customer is deleted [namespace=%s customer.id=%s]\", cus.Namespace, cus.ID)) }\n\t\t\tent, err := h.connector.GetEntitlementOfCustomerAt(ctx, request.Namespace, cus.ID, request.EntitlementIdOrFeatureKey, clock.Now())\n\t\t\tif err != nil { return nil, err }\n\t\t\treturn ParserV2.ToAPIGenericV2(ent, ent.CustomerID, cus.Key)\n\t\t},\n\t\tcommonhttp.JSONResponseEncoder[GetCustomerEntitlementHandlerResponse],\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"getCustomerEntitlementV2\"), httptransport.WithErrorEncoder(getErrorEncoder()))...,\n\t)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w89.json b/.archie/enrichments/w89.json new file mode 100644 index 0000000000..eb78ba3916 --- /dev/null +++ b/.archie/enrichments/w89.json @@ -0,0 +1,62 @@ +{ + "openmeter/entitlement/hooks/subscription": { + "purpose": "A single-file ServiceHook that guards entitlement.Service Update/Delete operations so that subscription-managed entitlements cannot be mutated or deleted outside of a subscription operation. Its sole responsibility is enforcing the invariant that subscription-owned entitlements are only changed via the subscription lifecycle.", + "patterns": [ + { + "name": "ServiceHook via embedded Noop base", + "description": "The hook struct embeds NoopEntitlementSubscriptionHook (alias of models.NoopServiceHook[entitlement.Entitlement]) and only overrides the lifecycle methods it cares about; unoverridden hook points default to no-op.", + "example": "type hook struct { NoopEntitlementSubscriptionHook }" + }, + { + "name": "Compile-time interface assertion", + "description": "A var _ assertion guarantees *hook satisfies models.ServiceHook[entitlement.Entitlement] so wiring breaks at compile time if the contract drifts.", + "example": "var _ models.ServiceHook[entitlement.Entitlement] = (*hook)(nil)" + }, + { + "name": "Subscription-operation bypass guard", + "description": "Every guarded method first calls subscription.IsSubscriptionOperation(ctx) and returns nil early when true, allowing the subscription engine itself to mutate the entitlement.", + "example": "if subscription.IsSubscriptionOperation(ctx) { return nil }" + }, + { + "name": "Annotation-based ownership check", + "description": "Ownership is detected via subscription.AnnotationParser.HasSubscription(ent.Annotations); when true and not a subscription operation, return a forbidden error rather than mutating state.", + "example": "if subscription.AnnotationParser.HasSubscription(ent.Annotations) { return models.NewGenericForbiddenError(...) }" + }, + { + "name": "Config-injected constructor returning the interface type", + "description": "NewEntitlementSubscriptionHook takes an EntitlementSubscriptionHookConfig (currently empty struct) and returns the EntitlementSubscriptionHook interface alias, not the concrete *hook.", + "example": "func NewEntitlementSubscriptionHook(_ EntitlementSubscriptionHookConfig) EntitlementSubscriptionHook" + } + ], + "key_file_guides": [ + { + "file": "hook.go", + "role": "Defines the package entitlementsubscriptionhook: the hook struct, the EntitlementSubscriptionHook/NoopEntitlementSubscriptionHook type aliases, the constructor, and the PreDelete/PreUpdate guard implementations.", + "watch_for": "PreDelete and PreUpdate share identical logic; keep them in sync if you change the guard. The leading comment warns that entitlement.Service methods are not conventionally named, so verify the actual call site before assuming when these hooks fire. EntitlementSubscriptionHookConfig is intentionally empty - do not add fields unless a real dependency is needed." + } + ], + "anti_patterns": [ + "Mutating or deleting a subscription-owned entitlement without first checking subscription.IsSubscriptionOperation(ctx) - it bypasses the ownership guard.", + "Returning the concrete *hook from the constructor instead of the EntitlementSubscriptionHook interface alias.", + "Replacing the embedded NoopServiceHook with a struct that implements all hook methods manually, defeating the no-op default for unhandled lifecycle points.", + "Using a non-forbidden error type for the ownership violation instead of models.NewGenericForbiddenError.", + "Diverging PreUpdate and PreDelete logic so that one path allows mutation the other blocks." + ], + "decisions": [ + { + "decision": "Enforce subscription ownership through a ServiceHook rather than inside entitlement.Service itself.", + "rationale": "Keeps the entitlement service unaware of subscription concerns; the cross-domain invariant is injected as a hook so the dependency points from subscription guard into entitlement, not the reverse." + }, + { + "decision": "Detect a subscription operation via context (IsSubscriptionOperation) plus annotation ownership rather than a DB flag.", + "rationale": "The subscription engine marks its own operations on the context, so the guard can distinguish legitimate subscription-driven mutations from external API calls without extra storage or lookups." + } + ], + "code_examples": [ + { + "scenario": "Blocking external mutation of a subscription-managed entitlement", + "code": "func (h *hook) PreUpdate(ctx context.Context, ent *entitlement.Entitlement) error {\n\tif subscription.IsSubscriptionOperation(ctx) {\n\t\treturn nil\n\t}\n\tif subscription.AnnotationParser.HasSubscription(ent.Annotations) {\n\t\treturn models.NewGenericForbiddenError(fmt.Errorf(\"entitlement is managed by subscription\"))\n\t}\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w9.json b/.archie/enrichments/w9.json new file mode 100644 index 0000000000..5117dd9a35 --- /dev/null +++ b/.archie/enrichments/w9.json @@ -0,0 +1,461 @@ +{ + "openmeter/app": { + "purpose": "Third-party app/marketplace framework. The root package declares the domain contracts (app.App, app.Service, app.Adapter, app.AppFactory/RegistryItem, AppBase, MarketplaceListing, Capability) and the app event/error vocabulary; concrete apps (stripe/, custominvoicing/, sandbox/) plug into billing via these interfaces and self-register in the marketplace registry.", + "patterns": [ + { + "name": "App identity = AppBase data + factory-built behavior", + "description": "AppBase (embeds models.ManagedResource + Type/Status/Listing/Metadata) is the persisted row; an AppFactory.NewApp(ctx, AppBase) turns a row into a live App implementing the full interface (UpdateAppConfig, customer-data methods, ValidateCapabilities).", + "example": "type App interface { GetAppBase() AppBase; ValidateCapabilities(...CapabilityType) error; UpsertCustomerData(...) error }" + }, + { + "name": "Every input/value type is self-validating", + "description": "All *Input and value types implement Validate() returning models.NewGenericValidationError or errors.Join(errs...); namespace-coherence checks (e.g. CustomerID.Namespace == AppID.Namespace) live in Validate, not the service.", + "example": "func (a EnsureCustomerInput) Validate() error { ...; if a.AppID.Namespace != a.CustomerID.Namespace { return fmt.Errorf(...) } }" + }, + { + "name": "Typed errors with IsX helpers", + "description": "Each error (AppNotFoundError, AppCustomerPreConditionError, AppProviderError) is built via NewX(...), wraps a models.Generic*Error, and exposes Error/Unwrap plus an IsX(err) helper backed by errors.As; a `var _ models.GenericError` assertion guards each.", + "example": "var _ models.GenericError = (*AppCustomerPreConditionError)(nil)" + }, + { + "name": "AppType is a closed enum gating the discriminated union", + "description": "AppType (stripe|sandbox|custom_invoicing) validates against a fixed switch; adding a type requires extending AppType.Validate plus every httpdriver Discriminator switch.", + "example": "AppTypeStripe AppType = \"stripe\"" + }, + { + "name": "Events versioned via metadata.EventType", + "description": "Lifecycle events (AppCreateEvent v1, AppUpdate/Delete v2) embed AppBase/EventApp, set EventName via metadata.GetEventName, build EventMetadata with metadata.ComposeResourcePath(namespace, EntityApp, id).", + "example": "metadata.GetEventName(metadata.EventType{Subsystem: AppEventSubsystem, Name: AppUpdateEventName, Version: \"v2\"})" + }, + { + "name": "App config carried as serializable EventAppData", + "description": "EventAppData is a map[string]any from a JSON round-trip (NewEventAppData) consumed via ParseInto(ptr); apps surface config through GetEventAppData rather than concrete structs.", + "example": "func NewEventApp(app App) (EventApp, error) { appData, err := app.GetEventAppData(); ... }" + } + ], + "key_file_guides": [ + { + "file": "app.go", + "role": "App interface + app-customer-data input types (Get/Upsert/Delete + Validate)", + "watch_for": "App is the live-behavior interface, not the row; no persistence here." + }, + { + "file": "appbase.go", + "role": "AppType/AppStatus/CapabilityType enums, AppBase + getters, AppID", + "watch_for": "AppType.Validate is a closed switch; new types must be added here AND in every consuming discriminator switch." + }, + { + "file": "adapter.go / service.go", + "role": "Adapter and Service interfaces (marketplace + installed-app + customer-data); adapter embeds entutils.TxCreator", + "watch_for": "Keep Service and Adapter method sets in lockstep; service is a thin validate-then-delegate wrapper." + }, + { + "file": "registry.go", + "role": "AppFactory contracts (NewApp, InstallApp, InstallAppWithAPIKey), RegistryItem (Listing+Factory)", + "watch_for": "RegistryItem.Validate requires a non-nil Factory; the marketplace is in-memory, not a DB table." + }, + { + "file": "errors.go", + "role": "Typed app errors wrapping models.Generic*Error with IsX helpers", + "watch_for": "Return these (esp. AppCustomerPreConditionError) instead of bare errors so HTTP mapping stays correct." + }, + { + "file": "event.go / events.go", + "role": "App lifecycle events and app_customer payment-setup event, versioned", + "watch_for": "Delete EventMetadata dereferences DeletedAt; ensure it is set." + }, + { + "file": "marketplace.go", + "role": "MarketplaceListing, Capability, InstallMethod enums, install input types", + "watch_for": "MarketplaceListing.Validate requires non-empty Type/Name/Description and validates each capability/install-method." + } + ], + "anti_patterns": [ + "Putting Ent/SQL or HTTP logic in the root app package (contracts + events only; persistence in adapter/, transport in httpdriver/).", + "Adding an AppType without extending AppType.Validate and every discriminator switch (UpdateApp, MapAppToAPI, toCustomerData).", + "Returning bare errors instead of the typed Generic*Error wrappers, breaking IsX detection and status mapping.", + "Constructing an App by hand instead of routing AppBase through an AppFactory.NewApp.", + "Skipping the namespace-coherence checks in *Input.Validate (AppID.Namespace must match CustomerID.Namespace)." + ], + "decisions": [ + { + "decision": "App is split into a persisted AppBase row plus a factory-built live App.", + "rationale": "Lets generic CRUD/marketplace logic stay app-agnostic while per-type behavior (Stripe/sandbox) is injected via factories registered in the in-memory marketplace." + }, + { + "decision": "App config is serialized through EventAppData (JSON map) rather than concrete union types.", + "rationale": "Apps are an interface, not a closed union; the map keeps events app-neutral until a proper union refactor (noted in TODOs)." + } + ], + "code_examples": [ + { + "scenario": "Declaring a versioned app event with resource-path metadata", + "code": "func (e AppUpdateEvent) EventName() string {\n\treturn metadata.GetEventName(metadata.EventType{Subsystem: AppEventSubsystem, Name: AppUpdateEventName, Version: \"v2\"})\n}\n\nfunc (e AppUpdateEvent) EventMetadata() metadata.EventMetadata {\n\tappBase := e.AppBase.GetAppBase()\n\tresourcePath := metadata.ComposeResourcePath(appBase.Namespace, metadata.EntityApp, appBase.ID)\n\treturn metadata.EventMetadata{ID: ulid.Make().String(), Source: resourcePath, Subject: resourcePath, Time: appBase.UpdatedAt}\n}" + } + ] + }, + "openmeter/customer": { + "purpose": "High-fan-in (103 in-edges) customer domain. The root declares customer.Service/Adapter, the Customer + CustomerMutate model, identity types (CustomerID/CustomerKey/CustomerIDOrKey), all *Input types, lifecycle events, typed conflict errors, and a pluggable RequestValidator registry. Consumed by billing, subscription, ledger and the v3 customers handlers.", + "patterns": [ + { + "name": "Customer satisfies streaming.Customer / usage-attribution", + "description": "Customer embeds models.ManagedResource and exposes GetUsageAttribution() returning streaming.NewCustomerUsageAttribution(ID, Key, subjectKeys); a `var _ streaming.Customer = &Customer{}` assertion enforces it.", + "example": "func (c Customer) GetUsageAttribution() streaming.CustomerUsageAttribution { return streaming.NewCustomerUsageAttribution(c.ID, c.Key, subjectKeys) }" + }, + { + "name": "Either key or subjectKeys required", + "description": "Both Customer.Validate and CustomerMutate.Validate enforce that at least one of Key or UsageAttribution.SubjectKeys is set, returning models.NewGenericValidationError.", + "example": "if !hasKey && !hasSubjectKeys { return models.NewGenericValidationError(errors.New(\"either key or usageAttribution.subjectKeys must be provided\")) }" + }, + { + "name": "Pluggable RequestValidator registry", + "description": "RequestValidatorRegistry fans validation to all registered RequestValidators (errors.Join over lo.Map) under an RWMutex; validators are Register'd after construction, not via Config. NoopRequestValidator is the default.", + "example": "return errors.Join(lo.Map(r.validators, func(v RequestValidator, _ int) error { return v.ValidateDeleteCustomer(ctx, input) })...)" + }, + { + "name": "Typed conflict / precondition errors with IsX helpers", + "description": "KeyConflictError, SubjectKeyConflictError, UpdateAfterDeleteError wrap models.NewGenericConflictError; deleting a customer with active subscriptions uses the ValidationIssue ErrDeletingCustomerWithActiveSubscriptions.WithAttr.", + "example": "var ErrDeletingCustomerWithActiveSubscriptions = models.NewValidationIssue(ErrCodeDeletingCustomerWithActiveSubscriptions, \"cannot delete customer with active subscriptions\")" + }, + { + "name": "Filter fields via pkg/filter wrappers", + "description": "ListCustomersInput exposes *filter.FilterString / *filter.FilterULID per filterable field, each Validate'd and collected with models.NewNillableGenericValidationError(errors.Join(...)).", + "example": "Key *filter.FilterString; BillingProfileID *filter.FilterULID" + }, + { + "name": "Service embeds models.ServiceHooks[Customer]", + "description": "customer.Service composes CustomerService + RequestValidatorService + models.ServiceHooks[Customer], so lifecycle hooks (e.g. ledger account provisioning) register post-construction.", + "example": "type Service interface { CustomerService; RequestValidatorService; models.ServiceHooks[Customer] }" + }, + { + "name": "Soft-delete-aware mutation guards", + "description": "Customer.IsDeleted() compares DeletedAt against clock.Now(); mutations on deleted customers must return a precondition-failed error rather than proceeding.", + "example": "func (c Customer) IsDeleted() bool { return c.DeletedAt != nil && c.DeletedAt.Before(clock.Now()) }" + } + ], + "key_file_guides": [ + { + "file": "customer.go", + "role": "Customer + CustomerMutate model, identity types, CustomerUsageAttribution, all *Input types and Validate", + "watch_for": "AsCustomerMutate drops some fields; GetFirstSubjectKey is deprecated; keep the key-or-subjectKeys invariant in BOTH Customer and CustomerMutate Validate." + }, + { + "file": "adapter.go", + "role": "Adapter interface (List/Create/Update/Delete/Get + usage-attribution lookups) embedding entutils.TxCreator", + "watch_for": "GetCustomerByUsageAttribution keys on customer key or subject key; reads must load subjects or mapping fails." + }, + { + "file": "service.go", + "role": "Service interface composing CustomerService + RequestValidatorService + ServiceHooks[Customer]", + "watch_for": "Read methods delegate straight to adapter; do not add validation/hooks/events to Get/List." + }, + { + "file": "requestvalidator.go", + "role": "RequestValidator interface, NoopRequestValidator, thread-safe registry", + "watch_for": "Validators run for all registered entries; any returned error aborts the mutation." + }, + { + "file": "errors.go", + "role": "KeyConflictError, SubjectKeyConflictError, UpdateAfterDeleteError, active-subscription deletion issue", + "watch_for": "Return these typed errors so v3 handlers surface correct conflict/precondition codes." + }, + { + "file": "event.go", + "role": "CustomerCreate/Update/Delete events (all v1), resource-path metadata", + "watch_for": "Delete event Validate requires DeletedAt != nil before EventMetadata dereferences it." + } + ], + "anti_patterns": [ + "Putting Ent/SQL access in the root package or service instead of delegating to customer.Adapter.", + "Mutating or deleting a soft-deleted customer (IsDeleted) without the precondition guard, or deleting one with active subscriptions.", + "Returning bare errors for invalid input instead of models.NewGenericValidationError / the typed conflict errors.", + "Bypassing the RequestValidator registry on a new mutation path.", + "Breaking the key-or-subjectKeys invariant, or constructing usage attribution directly instead of via GetUsageAttribution (it carries Key too)." + ], + "decisions": [ + { + "decision": "Request validators and lifecycle hooks register after construction, not via Config.", + "rationale": "Avoids import cycles with downstream domains (billing/subscription/ledger) that hook into customer mutations while still depending on customer." + }, + { + "decision": "Either a customer key or subject keys must identify a customer.", + "rationale": "Usage attribution must always resolve to a customer; the dual identity keeps backwards-compatible subject-key flows while supporting keyed customers." + } + ], + "code_examples": [ + { + "scenario": "Validating a list input by collecting all filter issues", + "code": "func (i ListCustomersInput) Validate() error {\n\tvar errs []error\n\tif i.Namespace == \"\" { errs = append(errs, models.NewGenericValidationError(errors.New(\"namespace is required\"))) }\n\tif i.Key != nil {\n\t\tif err := i.Key.Validate(); err != nil { errs = append(errs, models.NewGenericValidationError(fmt.Errorf(\"invalid key filter: %w\", err))) }\n\t}\n\treturn models.NewNillableGenericValidationError(errors.Join(errs...))\n}" + } + ] + }, + "openmeter/entitlement": { + "purpose": "Access-control domain. The root declares entitlement.Service, EntitlementRepo, the Access model, the Entitlement/GenericProperties domain type with its three subtypes (metered/static/boolean), scheduling semantics (ActiveFrom/ActiveTo), usage-period logic, and versioned v2 events. Subpackages implement the metered connector, balance worker, snapshots and HTTP drivers.", + "patterns": [ + { + "name": "Entitlement subtype via SubTypeConnector", + "description": "EntitlementType (metered|static|boolean) selects a SubTypeConnector whose BeforeCreate maps CreateEntitlementInputs + feature.Feature into CreateEntitlementRepoInputs and whose GetValue computes the EntitlementValue (HasAccess()).", + "example": "type SubTypeConnector interface { GetValue(ctx, *Entitlement, time.Time) (EntitlementValue, error); BeforeCreate(CreateEntitlementInputs, feature.Feature) (*CreateEntitlementRepoInputs, error); AfterCreate(...) error }" + }, + { + "name": "Scheduling via ActiveFrom/ActiveTo with cadence", + "description": "GenericProperties carries optional ActiveFrom/ActiveTo; ActiveFromTime() defaults to CreatedAt, ActiveToTime() falls back to DeletedAt; Entitlement implements models.CadenceComparable. IsActive(at) checks deletion, schedule window, and zero-length windows.", + "example": "var _ models.CadenceComparable = Entitlement{}\nfunc (e Entitlement) GetCadence() models.CadencedModel { ... }" + }, + { + "name": "MeasureUsageFrom dual source", + "description": "MeasureUsageFromInput resolves either FromTime(t) or FromEnum(CURRENT_PERIOD_START|NOW, currPeriod, now); the enum validates against its Values() set.", + "example": "m.FromEnum(MeasureUsageFromCurrentPeriodStart, currPer, now)" + }, + { + "name": "Versioned literal event payloads", + "description": "events.go types out entitlementEventV2EntitlementLiteral field-by-field (instead of versioning the domain model) with mapEntitlementToV2 / ToDomainEntitlement round-trips; events are EntitlementCreatedEventV2 / EntitlementDeletedEventV2 with metadata Subject = customer resource path.", + "example": "entitlementCreatedEventV2Name = metadata.GetEventName(metadata.EventType{Subsystem: EventSubsystem, Name: \"entitlement.created\", Version: \"v2\"})" + }, + { + "name": "Repository keys on customer + feature + time", + "description": "EntitlementRepo resolves active and scheduled entitlements by (namespace, customerID, featureKey, at); deactivation sets activeTo. Service.GetEntitlementOfCustomerAt disambiguates id-vs-featureKey by trying ID first.", + "example": "GetActiveEntitlementOfCustomerAt(ctx, namespace, customerID, featureKey, at) (*Entitlement, error)" + }, + { + "name": "Grants only on metered entitlements", + "description": "CreateEntitlementGrantInputs embeds credit.CreateGrantInput; ErrEntitlementGrantsOnlySupportedForMeteredEntitlements (a ValidationIssue) gates grant attachment.", + "example": "var ErrEntitlementGrantsOnlySupportedForMeteredEntitlements = models.NewValidationIssue(...)" + } + ], + "key_file_guides": [ + { + "file": "entitlement.go", + "role": "Entitlement/GenericProperties model, EntitlementType enum, CreateEntitlementInputs (+Equal/+Validate), IsActive/GetCadence, MeasureUsageFromInput", + "watch_for": "CreateEntitlementInputs.Equal is hand-written field-by-field; add new fields there too. Static type requires valid-JSON Config." + }, + { + "file": "connector.go", + "role": "Service interface (Create/Override/Schedule/Supersede/Get/List/GetAccess) and ListEntitlementsParams", + "watch_for": "GetEntitlementOfCustomerAt resolves ambiguous id-or-featureKey; features whose keys look like entitlement IDs are forbidden." + }, + { + "file": "entitlement_types.go", + "role": "EntitlementValue (HasAccess), NoAccessValue, SubTypeConnector seam", + "watch_for": "Each type routes through a SubTypeConnector; BeforeCreate errors must abort creation." + }, + { + "file": "repository.go", + "role": "EntitlementRepo interface (active/scheduled lookups, deactivate, usage-period upsert, namespace listing)", + "watch_for": "Time-windowed methods rely on ActiveFrom/ActiveTo + DeletedAt; respect Highwatermark/Cursor for expiry sweeps." + }, + { + "file": "events.go", + "role": "Versioned v2 entitlement event literals + domain round-trip", + "watch_for": "Event payload is a typed literal, NOT the domain struct; keep mapEntitlementToV2Literal and ToDomainEntitlement in sync." + }, + { + "file": "access.go", + "role": "Access = map of featureKey -> EntitlementValueWithId (Type/Value/ID)", + "watch_for": "GetAccess returns per-feature values keyed by featureKey." + }, + { + "file": "errors.go", + "role": "Typed errors (AlreadyExists/AlreadyDeleted/NotFound/WrongType/Forbidden) + grant/property-mismatch ValidationIssues", + "watch_for": "Use the ValidationIssue variants for API-surfaced create-mismatch / grant constraints." + } + ], + "anti_patterns": [ + "Adding a field to CreateEntitlementInputs without updating its hand-written Equal and Validate.", + "Bypassing the SubTypeConnector to compute an EntitlementValue or build repo inputs for a specific type.", + "Attaching grants to non-metered entitlements (use ErrEntitlementGrantsOnlySupportedForMeteredEntitlements).", + "Deriving active state from DeletedAt alone instead of IsActive(at)/GetCadence, which also account for ActiveFrom/ActiveTo and zero-length windows.", + "Editing the domain Entitlement struct expecting events to follow \u2014 events use a separate typed v2 literal that must be updated explicitly." + ], + "decisions": [ + { + "decision": "Entitlement events are versioned as hand-typed literals instead of versioning the domain model.", + "rationale": "Versioning the full domain model was too large a lift; literal events let payload shape evolve independently while ToDomainEntitlement reconstructs the domain type for validation." + }, + { + "decision": "Three entitlement types share one model and are differentiated by a SubTypeConnector.", + "rationale": "Keeps generic CRUD/scheduling uniform while letting metered (usage+credit), static (config), and boolean access compute values differently." + } + ], + "code_examples": [ + { + "scenario": "Computing active state across schedule and deletion", + "code": "func (e Entitlement) IsActive(at time.Time) bool {\n\tif e.DeletedAt != nil && !at.Before(*e.DeletedAt) { return false }\n\tif e.ActiveFromTime().After(at) { return false }\n\tif e.ActiveTo != nil && !at.Before(*e.ActiveTo) { return false }\n\tif e.ActiveToTime() != nil && e.ActiveFromTime().Equal(*e.ActiveToTime()) { return false }\n\treturn true\n}" + } + ] + }, + "openmeter/ingest": { + "purpose": "Usage-event intake side of the metering pipeline. The root defines ingest.Service and the Collector abstraction with two implementations/decorators (InMemoryCollector for tests, DeduplicatingCollector for production); subpackages publish to Kafka (kafkaingest), expose the v1 HTTP endpoint (httpdriver), and adapt collectors (ingestadapter).", + "patterns": [ + { + "name": "Collector is the swappable downstream sink", + "description": "Collector{ Ingest(ctx, namespace, event.Event) error; Close() } is the seam; implementations (in-memory, Kafka via ingestadapter) and decorators (DeduplicatingCollector) compose over it.", + "example": "type Collector interface { Ingest(ctx context.Context, namespace string, ev event.Event) error; Close() }" + }, + { + "name": "Deduplication as a wrapping decorator", + "description": "DeduplicatingCollector embeds a Collector + dedupe.Deduplicator and only forwards events IsUnique reports as new \u2014 dedup is layered, not baked into a concrete collector.", + "example": "if isUnique { return d.Collector.Ingest(ctx, namespace, ev) }\nreturn nil" + }, + { + "name": "Service validates config and normalizes event time", + "description": "ingest.Config{Collector, Logger} has Validate (both required, no slog.Default fallback); processEvent forces UTC and defaults a zero timestamp to time.Now().UTC() before forwarding, logging with structured event fields.", + "example": "func NewService(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; ... }" + }, + { + "name": "CloudEvents as the wire type", + "description": "Events are github.com/cloudevents/sdk-go/v2 event.Event end to end; the service operates on event.Event and sets Time on it directly.", + "example": "if event.Time().IsZero() { event.SetTime(time.Now().UTC()) }" + } + ], + "key_file_guides": [ + { + "file": "ingest.go", + "role": "Collector interface (the central abstraction)", + "watch_for": "All sinks and decorators must implement Ingest + Close; keep it minimal." + }, + { + "file": "service.go", + "role": "Service interface, Config (+Validate), service impl with per-event time normalization and structured logging", + "watch_for": "Logger is required (no slog.Default fallback); IngestEvents fails fast on the first event error." + }, + { + "file": "dedupe.go", + "role": "DeduplicatingCollector decorator over a Collector + dedupe.Deduplicator", + "watch_for": "Non-unique events are silently dropped (returns nil), not errored." + }, + { + "file": "inmemory.go", + "role": "InMemoryCollector test sink with lazy init + mutex, Events/Namespaces accessors", + "watch_for": "Test-only; events stored per-namespace map, not persisted or forwarded." + } + ], + "anti_patterns": [ + "Baking deduplication or Kafka publishing into a concrete Collector instead of composing a decorator/adapter over the Collector interface.", + "Constructing the service with a nil Logger or falling back to slog.Default() \u2014 Config.Validate forbids it.", + "Forwarding events without normalizing Time to UTC (downstream metering assumes UTC event time).", + "Using InMemoryCollector outside tests." + ], + "decisions": [ + { + "decision": "Ingestion is structured as a Collector interface with composable decorators.", + "rationale": "Lets the same service pipe events to in-memory (tests), Kafka (prod), and through deduplication without changing the ingest service." + } + ], + "code_examples": [ + { + "scenario": "Deduplicating before forwarding to the wrapped collector", + "code": "func (d DeduplicatingCollector) Ingest(ctx context.Context, namespace string, ev event.Event) error {\n\tisUnique, err := d.Deduplicator.IsUnique(ctx, namespace, ev)\n\tif err != nil { return fmt.Errorf(\"checking event uniqueness: %w\", err) }\n\tif isUnique { return d.Collector.Ingest(ctx, namespace, ev) }\n\treturn nil\n}" + } + ] + }, + "openmeter/ledger": { + "purpose": "Double-entry-style ledger for customer credit/business accounts, feature-gated by credits.enabled. The root declares the account taxonomy (customer FBO/receivable/accrued + business wash/earnings/brokerage/breakage), posting primitives (Account/SubAccount/PostingAddress/Entry/Transaction/Ledger), versioned routing (Route/RoutingKey), balance and impact queries, annotation vocabulary, and ValidationIssue error codes. Subpackages provide account, transactions, historical, resolvers, routingrules, recognizer, breakage and a noop/ used when credits are off.", + "patterns": [ + { + "name": "Accounts vs SubAccounts vs PostingAddress", + "description": "Account describes ownership/purpose (Type/ID); SubAccount is the concrete postable address derived from a Route via GetSubAccountForRoute; PostingAddress is the routing-only handle (SubAccountID/AccountType/Route) used in entries. Per-type route param structs (CustomerFBORouteParams, CustomerReceivableRouteParams, BusinessRouteParams) build a Route and Validate it.", + "example": "fboSub, err := customerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{Currency: \"USD\", CreditPriority: ledger.DefaultCustomerFBOPriority})" + }, + { + "name": "Versioned routing keys", + "description": "Route.Normalize() picks the minimum RoutingKeyVersion via selectRoutingKeyVersion (V2 when TaxBehavior set, else V1); BuildRoutingKey dispatches per version (BuildRoutingKeyV1/V2). A new identity-affecting field means a new version, not a mutated key format.", + "example": "normalized, _ := route.Normalize(); key, _ := ledger.BuildRoutingKey(normalized)" + }, + { + "name": "Atomic transaction groups balanced to zero", + "description": "TransactionInput/EntryInput build a TransactionGroupInput committed atomically via Ledger.CommitGroup; ValidateTransactionInput enforces entries sum to 0 (ErrInvalidTransactionTotal). Transactions order by TransactionCursor (BookedAt, then CreatedAt, then ID).", + "example": "l.CommitGroup(ctx, txInput.AsGroupInput(\"namespace\", nil))" + }, + { + "name": "RouteFilter with mo.Option tri-state matching", + "description": "RouteFilter uses mo.Option[*T] for TaxCode/TaxBehavior/Features/CostBasis so a filter can require 'this nil value' vs 'do not filter'; CreditPriority/TransactionAuthorizationStatus are plain pointers meaningful only for fbo/receivable queries. EntryMatchesImpactFilter / TransactionImpact apply this.", + "example": "ledger.RouteFilter{TaxCode: mo.Some[*string](nil)} // matches only entries with nil tax code" + }, + { + "name": "Annotations as cross-domain linkage vocabulary", + "description": "Charge/subscription/breakage/transaction linkage rides in models.Annotations under stable keys (AnnotationChargeID, AnnotationTransactionTemplateCode, AnnotationBreakageKind...) built by helper constructors (ChargeTransactionAnnotations, TransactionAnnotations, BreakageAnnotations) and read back via typed extractors.", + "example": "annotations := ledger.TransactionAnnotations(\"customer.receivable.issue\", ledger.TransactionDirectionForward)" + }, + { + "name": "Errors are ValidationIssues with attrs", + "description": "All ledger errors are models.NewValidationIssue(code, msg) constants; callers attach context via .WithAttrs(models.Attributes{...}) and tests assert by issue.Code() == ErrCode...", + "example": "var ErrInvalidTransactionTotal = models.NewValidationIssue(ErrCodeInvalidTransactionTotal, \"...credits and debits must sum to 0\")" + }, + { + "name": "Required route params enforced by the type system", + "description": "CreditPriority on CustomerFBORouteParams and TransactionAuthorizationStatus on CustomerReceivableRouteParams are non-pointer/required so the compiler forces an explicit choice; Validate adds value-range checks (ValidateCreditPriority).", + "example": "type CustomerFBORouteParams struct { Currency currencyx.Code; CreditPriority int; ... }" + } + ], + "key_file_guides": [ + { + "file": "account.go", + "role": "AccountType enum, Customer/Business account groupings, AccountResolver/Reader/Provisioner/Locker interfaces, Create*Input", + "watch_for": "CustomerAccountTypes vs BusinessAccountTypes drive provisioning; AccountType.Validate is a closed switch." + }, + { + "file": "accounts.go", + "role": "Per-type SubAccount interfaces + route param structs (FBO/Receivable/Accrued/Business) with Route()+Validate()", + "watch_for": "Each param struct maps to a Route; FBO requires CreditPriority, Receivable requires TransactionAuthorizationStatus." + }, + { + "file": "primitives.go", + "role": "PostingAddress/SubAccount/Account/Entry/Transaction/Ledger interfaces, RouteFilter, TransactionCursor.Compare", + "watch_for": "Cursor order is BookedAt then CreatedAt then ID; entries must reference a valid SubAccount address." + }, + { + "file": "routing.go", + "role": "RoutingKeyVersion, Route, Normalize, selectRoutingKeyVersion, BuildRoutingKey(V1/V2)", + "watch_for": "Never change an existing version's key format; add a new RoutingKeyVersion and extend BuildRoutingKey's switch." + }, + { + "file": "impact.go", + "role": "TransactionImpact / EntryMatchesImpactFilter \u2014 sum entry amounts matching an ImpactFilter (AccountType + RouteFilter)", + "watch_for": "Route matching uses the normalized route's Matches; mo.Option nil-required semantics matter." + }, + { + "file": "annotations.go", + "role": "Annotation key constants + builder/extractor helpers (charge/transaction/breakage linkage, direction, breakage kinds)", + "watch_for": "Use the helper constructors and *FromAnnotations extractors instead of literal keys; extractors error on missing/invalid." + }, + { + "file": "errors.go", + "role": "All ledger ValidationIssue error codes/constants", + "watch_for": "Return these issues (with .WithAttrs) rather than bare errors so API mapping and tests by Code() work." + }, + { + "file": "balance.go", + "role": "BalanceQuerier: GetAccountBalance/GetSubAccountBalance over a RouteFilter + BalanceQuery (After cursor / AsOf)", + "watch_for": "Balance distinguishes Settled() vs Pending()." + } + ], + "anti_patterns": [ + "Mutating an existing RoutingKey format instead of introducing a new RoutingKeyVersion (breaks historical routing-key matching).", + "Posting an unbalanced transaction (entries not summing to 0) \u2014 ValidateTransactionInput rejects with ErrInvalidTransactionTotal.", + "Writing literal annotation key strings instead of the AnnotationX constants and their builder/extractor helpers.", + "Building a SubAccount/posting address by hand instead of GetSubAccountForRoute on the typed account, skipping route Validate (e.g. omitting CreditPriority/TransactionAuthorizationStatus).", + "Returning bare errors instead of the ledger ValidationIssue constants with .WithAttrs context." + ], + "decisions": [ + { + "decision": "Routing keys are explicitly versioned and selected by the minimum version a route needs.", + "rationale": "Lets the route schema grow (e.g. adding tax_behavior in V2) without rewriting historical keys; balance/impact matching stays stable across versions." + }, + { + "decision": "Account ownership/purpose (Account) is separated from the concrete postable address (SubAccount/PostingAddress).", + "rationale": "A single account fans out to many sub-accounts parameterized by currency/priority/tax route, so postings can be filtered and balanced per route while accounts stay coarse." + }, + { + "decision": "Some route params (FBO CreditPriority, Receivable authorization status) are non-pointer required fields.", + "rationale": "Forces callers to make an explicit routing decision at the type level rather than defaulting silently." + } + ], + "code_examples": [ + { + "scenario": "Resolving a customer FBO sub-account and committing a balanced transaction group", + "code": "fboSub, err := customerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{\n\tCurrency: currencyx.Code(\"USD\"),\n\tCreditPriority: ledger.DefaultCustomerFBOPriority,\n})\nif err != nil { return err }\n\ninputs, err := transactions.ResolveTransactions(ctx, deps, scope, tx1, tx2, tx3)\nif err != nil { return err }\n_, err = histLedger.CommitGroup(ctx, transactions.GroupInputs(namespace, nil, inputs...))" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w90.json b/.archie/enrichments/w90.json new file mode 100644 index 0000000000..97b97ac262 --- /dev/null +++ b/.archie/enrichments/w90.json @@ -0,0 +1,62 @@ +{ + "openmeter/entitlement/validators/customer": { + "purpose": "A cross-domain validator that hooks the entitlement domain into the customer lifecycle, blocking deletion of any customer that still has active entitlements. It implements the customer.RequestValidator contract so the customer service can reject unsafe deletes before they happen.", + "patterns": [ + { + "name": "RequestValidator interface compliance", + "description": "The Validator must satisfy customer.RequestValidator; assert it with a compile-time check and embed customer.NoopRequestValidator so only the relevant hook method is overridden.", + "example": "var _ customer.RequestValidator = (*Validator)(nil); type Validator struct { customer.NoopRequestValidator; entitlementRepo entitlement.EntitlementRepo }" + }, + { + "name": "Constructor with nil-dependency guard", + "description": "NewValidator returns (*Validator, error) and fails fast with fmt.Errorf when a required dependency is nil, rather than constructing an unusable struct.", + "example": "if entitlementRepo == nil { return nil, fmt.Errorf(\"entitlement repository is required\") }" + }, + { + "name": "Validate input first", + "description": "Each hook calls input.Validate() before any repository work so malformed requests are rejected without a DB round-trip.", + "example": "if err := input.Validate(); err != nil { return err }" + }, + { + "name": "Typed domain errors for conflicts", + "description": "Business-rule rejections return models.NewGenericConflictError, not a bare error, so callers/HTTP layer map it to the right status.", + "example": "return models.NewGenericConflictError(fmt.Errorf(\"customer %s still has active entitlements...\", input.ID))" + }, + { + "name": "Active-snapshot query via clock.Now()", + "description": "Use clock.Now() (not time.Now) for the ActiveAt cutoff so tests can freeze time, and include soft-deleted-but-recent rows via IncludeDeleted + IncludeDeletedAfter.", + "example": "now := clock.Now(); ListEntitlementsParams{ ActiveAt: lo.ToPtr(now), IncludeDeleted: true, IncludeDeletedAfter: now }" + } + ], + "key_file_guides": [ + { + "file": "validator.go", + "role": "Sole file: defines Validator, NewValidator, and the ValidateDeleteCustomer hook that lists a customer's active entitlements and blocks deletion if any exist.", + "watch_for": "Depends only on entitlement.EntitlementRepo (the read/list port), not the full entitlement.Service. The query filters by both CustomerIDs and Namespaces and uses lo.ToPtr(now) for ActiveAt; dropping IncludeDeleted/IncludeDeletedAfter would let recently-deleted entitlements slip through." + } + ], + "anti_patterns": [ + "Calling time.Now() instead of clock.Now(), which breaks time-frozen tests.", + "Returning a plain error for the active-entitlements case instead of models.NewGenericConflictError.", + "Injecting the heavyweight entitlement.Service when only EntitlementRepo (list access) is needed.", + "Overriding RequestValidator methods without embedding customer.NoopRequestValidator, forcing implementation of every hook.", + "Skipping input.Validate() and issuing the ListEntitlements query on unvalidated input." + ], + "decisions": [ + { + "decision": "Live in the entitlement domain, not the customer domain.", + "rationale": "Keeps the customer service free of an entitlement dependency; the entitlement domain owns the rule that entitlements pin a customer, and registers itself as a customer.RequestValidator via DI (app/common)." + }, + { + "decision": "Depend on entitlement.EntitlementRepo rather than entitlement.Service.", + "rationale": "The validator only needs read/list access to entitlements, so it takes the narrowest port, easing testing and avoiding service-construction cycles." + } + ], + "code_examples": [ + { + "scenario": "Register a customer-deletion validator from the entitlement side and block on active entitlements", + "code": "var _ customer.RequestValidator = (*Validator)(nil)\n\nfunc (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error {\n\tif err := input.Validate(); err != nil {\n\t\treturn err\n\t}\n\tnow := clock.Now()\n\tents, err := v.entitlementRepo.ListEntitlements(ctx, entitlement.ListEntitlementsParams{\n\t\tCustomerIDs: []string{input.ID},\n\t\tNamespaces: []string{input.Namespace},\n\t\tActiveAt: lo.ToPtr(now),\n\t\tIncludeDeleted: true,\n\t\tIncludeDeletedAfter: now,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to list customer entitlements: %w\", err)\n\t}\n\tif len(ents.Items) > 0 {\n\t\treturn models.NewGenericConflictError(fmt.Errorf(\"customer %s still has active entitlements...\", input.ID))\n\t}\n\treturn nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w91.json b/.archie/enrichments/w91.json new file mode 100644 index 0000000000..d8f8674a41 --- /dev/null +++ b/.archie/enrichments/w91.json @@ -0,0 +1,95 @@ +{ + "openmeter/event/metadata": { + "purpose": "Defines the canonical CloudEvents-style identity for every domain event in OpenMeter: the structured EventType (subsystem/version/name) that produces wire event names like `io.openmeter...`, plus the resource-path scheme used to build CloudEvents `source`/`subject` URIs. It is the shared vocabulary imported by nearly every event-emitting domain package, so its conventions are load-bearing across the whole event bus.", + "patterns": [ + { + "name": "EventType identity triple", + "description": "Every event declares an EventType with Subsystem, Name, and Version; the wire name is derived, never hand-written. Compute names via EventName()/GetEventName(spec) rather than string-formatting elsewhere.", + "example": "var grantCreatedType = metadata.EventType{Subsystem: \"credit\", Name: \"grant.created\", Version: \"v1\"}; name := metadata.GetEventName(grantCreatedType)" + }, + { + "name": "Resource paths via Compose helpers", + "description": "CloudEvents source/subject URIs are always built with ComposeResourcePath(namespace, items...) (which prepends `namespace/`) or ComposeResourcePathRaw. Never concatenate `//openmeter.io/...` by hand.", + "example": "source := metadata.ComposeResourcePath(ns, metadata.EntityEntitlement, entitlementID, metadata.EntityGrant, grantID)" + }, + { + "name": "Entity-segment constants", + "description": "Path segments use the exported Entity* constants (EntityEntitlement, EntityInvoice, EntitySubscription, EntityGrant, EntityEvent, ...). Add a new constant here rather than inlining a literal segment string at a call site.", + "example": "metadata.ComposeResourcePath(ns, metadata.EntityCustomer, customerID)" + } + ], + "key_file_guides": [ + { + "file": "event_type.go", + "role": "EventType struct + EventName()/VersionSubsystem()/GetEventName() name builders, and the EventMetadata envelope (ID, Time, Subject, Source). String type aliases EventSubsystem/EventName/EventVersion enforce intent at field level.", + "watch_for": "EventName format `io.openmeter...` is the consumed contract \u2014 changing it renames every event and breaks Kafka topic routing/consumers. The doc comment on EventMetadata.Subject/Source is the authoritative example of correct path shapes; keep source/subject consistent with it." + }, + { + "file": "resourcepath.go", + "role": "Entity type constants and ComposeResourcePath/ComposeResourcePathRaw builders for `//openmeter.io/...` URIs.", + "watch_for": "ComposeResourcePath auto-injects the `namespace/` prefix; passing your own `namespace` segment double-prefixes. Use the Raw variant only when you intentionally need a non-namespace-rooted path (e.g. EntityEvent ingestion source)." + } + ], + "anti_patterns": [ + "Hand-formatting `io.openmeter.*` event names or `//openmeter.io/*` resource paths instead of using EventName()/ComposeResourcePath.", + "Adding a new path segment as an inline string literal instead of an Entity* constant.", + "Changing the EventName/VersionSubsystem format strings \u2014 they are wire contracts consumed by event subscribers.", + "Adding dependencies or business logic here; this package must stay a leaf with only fmt/time/strings imports." + ], + "decisions": [ + { + "decision": "Event identity is a structured triple (Subsystem/Version/Name) with a derived name rather than free-form strings.", + "rationale": "Versioning is first-class (VersionSubsystem()) so payload schemas can evolve per subsystem, and a single derivation point keeps all emitters/consumers in sync." + }, + { + "decision": "Keep metadata as a tiny dependency-free leaf package.", + "rationale": "It is imported by ~20 domain packages; any heavier dependency here would create wide coupling and import cycles." + } + ], + "code_examples": [ + { + "scenario": "Build an event name and its CloudEvents source/subject for a grant event", + "code": "import \"github.com/openmeterio/openmeter/openmeter/event/metadata\"\n\net := metadata.EventType{Subsystem: \"credit\", Name: \"grant.created\", Version: \"v1\"}\nname := metadata.GetEventName(et) // io.openmeter.credit.v1.grant.created\nmeta := metadata.EventMetadata{\n Source: metadata.ComposeResourcePath(ns, metadata.EntityEntitlement, entID, metadata.EntityGrant, grantID),\n Subject: metadata.ComposeResourcePath(ns, \"subject\", subjectID),\n}" + } + ] + }, + "openmeter/event/models": { + "purpose": "Shared, dependency-free value types embedded inside event payloads across credit, entitlement, notification, and sink consumers \u2014 currently FeatureKeyAndID and NamespaceID, each carrying a Validate() error method. It exists so multiple event packages reference the same serialized shapes instead of redefining them.", + "patterns": [ + { + "name": "Validatable value type", + "description": "Each type is a small JSON-tagged struct with a value-receiver Validate() error that returns errors.New on the first missing required field. New types here follow the same shape.", + "example": "func (i NamespaceID) Validate() error { if i.ID == \"\" { return errors.New(\"namespace-id is required\") }; return nil }" + }, + { + "name": "JSON-stable field tags", + "description": "Every field has an explicit json tag (`key`, `id`) because these structs are serialized into the event bus; the tags are part of the wire format.", + "example": "type FeatureKeyAndID struct { Key string `json:\"key\"`; ID string `json:\"id\"` }" + } + ], + "key_file_guides": [ + { + "file": "models.go", + "role": "Holds all shared event payload value types: FeatureKeyAndID (feature key+id pair) and NamespaceID (namespace id wrapper), each with Validate().", + "watch_for": "Validate() uses plain errors.New and stops at the first invalid field \u2014 it is not a NewNillableGenericValidationError aggregate like domain Validate() methods elsewhere; keep that lightweight style here. Renaming json tags breaks deserialization of already-published events." + } + ], + "anti_patterns": [ + "Importing domain/service packages here \u2014 this must remain a zero-dependency leaf (only `errors`) to avoid import cycles with its many event-consumer importers.", + "Changing existing json tags or field semantics, which silently breaks decoding of in-flight events.", + "Adding behavior beyond plain data + Validate(); business logic belongs in the owning domain package." + ], + "decisions": [ + { + "decision": "Co-locate cross-cutting event payload structs in one dependency-free package.", + "rationale": "Avoids each event producer/consumer redefining incompatible copies and prevents import cycles given the wide importer set (credit/grant, entitlement, notification/consumer, sink ingestnotification)." + } + ], + "code_examples": [ + { + "scenario": "Embed and validate a shared payload type in an event", + "code": "import \"github.com/openmeterio/openmeter/openmeter/event/models\"\n\ntype FeatureCreatedEvent struct {\n Namespace models.NamespaceID `json:\"namespace\"`\n Feature models.FeatureKeyAndID `json:\"feature\"`\n}\n\nfunc (e FeatureCreatedEvent) Validate() error {\n if err := e.Namespace.Validate(); err != nil { return err }\n return e.Feature.Validate()\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w92.json b/.archie/enrichments/w92.json new file mode 100644 index 0000000000..b99516b8b8 --- /dev/null +++ b/.archie/enrichments/w92.json @@ -0,0 +1,63 @@ +{ + "openmeter/info/httpdriver": { + "purpose": "HTTP driver for the 'info' domain \u2014 exposes static reference/metadata endpoints (currently only the currency list) to the server router. Stateless: it has no service/adapter layer behind it and derives data directly from the gobl `currency` library.", + "patterns": [ + { + "name": "Handler interface + private struct + New constructor", + "description": "driver.go declares a public `Handler` interface listing one method per endpoint, an unexported `handler` struct holding shared `[]httptransport.HandlerOption`, and a `New(options ...httptransport.HandlerOption) Handler` constructor returning the interface. New endpoints add a method to the interface and a method on `*handler`.", + "example": "type Handler interface { ListCurrencies() ListCurrenciesHandler }" + }, + { + "name": "Request/Response/Handler type triple per endpoint", + "description": "Each endpoint defines three named types in a `type (...)` block: a `XxxRequest` struct (input, may be empty), a `XxxResponse` (output, here an `[]api.Currency` alias), and `XxxHandler = httptransport.Handler[XxxRequest, XxxResponse]`.", + "example": "ListCurrenciesRequest struct{}; ListCurrenciesResponse []api.Currency; ListCurrenciesHandler httptransport.Handler[ListCurrenciesRequest, ListCurrenciesResponse]" + }, + { + "name": "httptransport.NewHandler with decode/business/encode closures", + "description": "Methods return `httptransport.NewHandler(decode, handle, encode, opts...)`. The decode func builds the Request from `*http.Request`, the handle func produces the Response, encode is `commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK)`, and options come from `httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"...\"))`.", + "example": "httptransport.NewHandler(func(ctx, r){...}, func(ctx, req){...}, commonhttp.JSONResponseEncoderWithStatus[ListCurrenciesResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listCurrencies\"))...)" + }, + { + "name": "Operation name matches OpenAPI operationId", + "description": "`WithOperationName` must use the camelCase operationId from the generated API spec (e.g. \"listCurrencies\") so telemetry/routing line up with `api/`.", + "example": "httptransport.WithOperationName(\"listCurrencies\")" + }, + { + "name": "Map domain data to api.* types with samber/lo", + "description": "Business closures translate library types into generated `api.*` structs using `lo.Map`/`lo.Filter`; ISO-only currencies are kept by filtering `def.ISONumeric != \"\"` to exclude crypto.", + "example": "lo.Map(lo.Filter(currency.Definitions(), func(d *currency.Def, _ int) bool { return d.ISONumeric != \"\" }), func(d *currency.Def, _ int) api.Currency { ... })" + } + ], + "key_file_guides": [ + { + "file": "driver.go", + "role": "Declares the `Handler` interface, the `handler` struct, and `New(...)`. The single place to register a new endpoint method on the interface.", + "watch_for": "Keep `handler` unexported and return the interface from `New`; the router depends on `Handler`, not the concrete struct." + }, + { + "file": "currencies.go", + "role": "Implements `ListCurrencies()` \u2014 returns ISO currency definitions from gobl as `[]api.Currency`.", + "watch_for": "Preserve the `def.ISONumeric != \"\"` filter (drops crypto/non-ISO entries); changing it leaks non-ISO currencies into the API response." + } + ], + "anti_patterns": [ + "Putting business/data-access logic in handlers that warrants a service+adapter layer \u2014 this folder is intentionally driver-only and stateless; if state or DB access is needed, introduce a service package instead.", + "Returning the concrete `*handler` instead of the `Handler` interface from `New`.", + "Hand-writing response structs instead of mapping into generated `api.*` types.", + "Hardcoding HTTP status or bypassing `commonhttp.JSONResponseEncoderWithStatus` for encoding.", + "Omitting `WithOperationName` or using a name that doesn't match the OpenAPI operationId." + ], + "decisions": [ + { + "decision": "No service/adapter layer for the info domain.", + "rationale": "Data is static reference metadata sourced from the gobl `currency` library, so the handler computes it inline with no persistence or tenancy concerns." + } + ], + "code_examples": [ + { + "scenario": "Adding a new info endpoint following the existing pattern", + "code": "type (\n\tListCurrenciesRequest struct{}\n\tListCurrenciesResponse []api.Currency\n\tListCurrenciesHandler httptransport.Handler[ListCurrenciesRequest, ListCurrenciesResponse]\n)\n\nfunc (h *handler) ListCurrencies() ListCurrenciesHandler {\n\treturn httptransport.NewHandler(\n\t\tfunc(ctx context.Context, r *http.Request) (ListCurrenciesRequest, error) {\n\t\t\treturn ListCurrenciesRequest{}, nil\n\t\t},\n\t\tfunc(ctx context.Context, request ListCurrenciesRequest) (ListCurrenciesResponse, error) {\n\t\t\treturn lo.Map(lo.Filter(currency.Definitions(),\n\t\t\t\tfunc(def *currency.Def, _ int) bool { return def.ISONumeric != \"\" }),\n\t\t\t\tfunc(def *currency.Def, _ int) api.Currency {\n\t\t\t\t\treturn api.Currency{Code: api.CurrencyCode(def.ISOCode), Name: def.Name, Symbol: def.Symbol, Subunits: def.Subunits}\n\t\t\t\t}), nil\n\t\t},\n\t\tcommonhttp.JSONResponseEncoderWithStatus[ListCurrenciesResponse](http.StatusOK),\n\t\thttptransport.AppendOptions(h.options, httptransport.WithOperationName(\"listCurrencies\"))...,\n\t)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w93.json b/.archie/enrichments/w93.json new file mode 100644 index 0000000000..c0358e7ef4 --- /dev/null +++ b/.archie/enrichments/w93.json @@ -0,0 +1,127 @@ +{ + "openmeter/ingest/httpdriver": { + "purpose": "The v1 HTTP transport adapter for the ingest service: it parses the IngestEvents request body (single JSON event, JSON batch, single CloudEvent, or CloudEvent batch) and hands it to ingest.Service. It owns only HTTP concerns \u2014 content-type negotiation, namespace resolution, and error encoding \u2014 never business logic.", + "patterns": [ + { + "name": "httptransport.NewHandler decode/exec/encode triple", + "description": "Each endpoint method returns a typed handler built from a request decoder, a business-call closure, and a response encoder, plus options. No logic lives outside these three closures.", + "example": "func (h *handler) IngestEvents() IngestEventsHandler { return httptransport.NewHandler(decodeFn, func(ctx, params){ h.service.IngestEvents(ctx, params) }, commonhttp.EmptyResponseEncoder[...](http.StatusNoContent), ...) }" + }, + { + "name": "Request type aliases to the service input", + "description": "Driver request type is a type alias of the service-layer request, not a separate struct, so the decoder fills the same type the service consumes.", + "example": "type IngestEventsRequest = ingest.IngestEventsRequest" + }, + { + "name": "Content-Type switch over the API body unions", + "description": "The decoder switches on the Content-Type header and decodes into the matching generated api.* body type (api.IngestEventsBody, api.IngestEventsApplicationCloudeventsPlusJSONRequestBody, api.IngestEventsApplicationCloudeventsBatchPlusJSONBody), falling through to ErrorInvalidContentType on default.", + "example": "switch contentType { case \"application/json\": ...; case \"application/cloudevents+json\": ...; default: return req, ErrorInvalidContentType{ContentType: contentType} }" + }, + { + "name": "Namespace from decoder, not request body", + "description": "Namespace is resolved from the context via h.namespaceDecoder.GetNamespace and assigned to req.Namespace; a missing namespace is a 500 internal error, never trusted from the client payload.", + "example": "ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return \"\", commonhttp.NewHTTPError(http.StatusInternalServerError, ...) }" + }, + { + "name": "Typed driver errors with errorEncoder", + "description": "Validation failures return ErrorInvalidEvent / ErrorInvalidContentType structs implementing Error()/Message()/Details(); errorEncoder() maps them to 400 via commonhttp.HandleErrorIfTypeMatches and is wired with httptransport.WithErrorEncoder.", + "example": "return commonhttp.HandleErrorIfTypeMatches[ErrorInvalidContentType](ctx, http.StatusBadRequest, err, w) || commonhttp.HandleErrorIfTypeMatches[ErrorInvalidEvent](...)" + }, + { + "name": "Constructor injects collaborators, returns interface", + "description": "New(namespaceDecoder, service, options...) returns the Handler interface backed by the unexported handler struct; options are appended via httptransport.AppendOptions(h.options, ...).", + "example": "func New(namespaceDecoder namespacedriver.NamespaceDecoder, service ingest.Service, options ...httptransport.HandlerOption) Handler" + } + ], + "key_file_guides": [ + { + "file": "ingest.go", + "role": "IngestEvents() handler: decodes the four supported content types into ingest.IngestEventsRequest and calls service.IngestEvents.", + "watch_for": "Single-vs-batch JSON parsing relies on AsEvent() then falling back to AsIngestEventsBody1(); if both yield zero events it must return ErrorInvalidEvent. Success returns 204 No Content via EmptyResponseEncoder." + }, + { + "file": "handler.go", + "role": "Handler/IngestHandler interfaces, handler struct, resolveNamespace, and the New constructor.", + "watch_for": "Do not read namespace from the request body \u2014 only resolveNamespace via namespaceDecoder is trusted; a missing namespace yields 500, not 400." + }, + { + "file": "errors.go", + "role": "Typed transport errors (ErrorInvalidContentType, ErrorInvalidEvent) and errorEncoder() mapping them to HTTP 400.", + "watch_for": "New error types must implement Message() (and optionally Details()) and be registered in errorEncoder() or they fall through to a generic 500." + }, + { + "file": "ingest_test.go", + "role": "httptest-based tests for single, invalid, and batch CloudEvent flows using ingest.NewInMemoryCollector and namespacedriver.StaticNamespaceDecoder.", + "watch_for": "Tests assert exact status codes (204 success, 400 invalid) and verify events landed in the in-memory collector keyed by namespace." + } + ], + "anti_patterns": [ + "Putting dedupe/validation/persistence business logic in the handler instead of delegating to ingest.Service.", + "Trusting a namespace value from the request payload instead of namespacedriver.GetNamespace.", + "Returning raw errors from the decoder instead of ErrorInvalidEvent/ErrorInvalidContentType, which breaks the 400 mapping in errorEncoder.", + "Decoding into hand-written structs instead of the generated api.* body union types.", + "Writing a non-empty success body \u2014 ingest responds 204 No Content via EmptyResponseEncoder." + ], + "decisions": [ + { + "decision": "Driver request types are aliases of ingest.IngestEventsRequest rather than separate DTOs.", + "rationale": "Keeps the transport layer thin and avoids an extra mapping step between HTTP and the service input." + }, + { + "decision": "Content negotiation is explicit per CloudEvents media type.", + "rationale": "OpenMeter ingest accepts plain JSON, JSON batch, and the two CloudEvents content types; each maps to a distinct generated body type so the decoder stays unambiguous." + } + ], + "code_examples": [ + { + "scenario": "Adding/decoding an ingest content type and delegating to the service", + "code": "func (h *handler) IngestEvents() IngestEventsHandler {\n return httptransport.NewHandler(\n func(ctx context.Context, r *http.Request) (IngestEventsRequest, error) {\n var req ingest.IngestEventsRequest\n ns, err := h.resolveNamespace(ctx)\n if err != nil { return req, err }\n req.Namespace = ns\n switch r.Header.Get(\"Content-Type\") {\n case \"application/cloudevents+json\":\n var body api.IngestEventsApplicationCloudeventsPlusJSONRequestBody\n if err := json.NewDecoder(r.Body).Decode(&body); err != nil { return req, ErrorInvalidEvent{Err: err} }\n req.Events = []event.Event{body}\n default:\n return req, ErrorInvalidContentType{ContentType: r.Header.Get(\"Content-Type\")}\n }\n return req, nil\n },\n func(ctx context.Context, params IngestEventsRequest) (IngestEventsResponse, error) {\n _, err := h.service.IngestEvents(ctx, params)\n return IngestEventsResponse{}, err\n },\n commonhttp.EmptyResponseEncoder[IngestEventsResponse](http.StatusNoContent),\n httptransport.AppendOptions(h.options, httptransport.WithOperationName(\"IngestEvents\"), httptransport.WithErrorEncoder(errorEncoder()))...,\n )\n}" + } + ] + }, + "openmeter/ingest/ingestadapter": { + "purpose": "Adapter layer for the ingest pipeline that decorates an ingest.Collector with OpenTelemetry instrumentation. Its single export, WithTelemetry, wraps a collector to emit event/error counters and spans without altering ingest behavior.", + "patterns": [ + { + "name": "Decorator over ingest.Collector", + "description": "collectorTelemetry embeds a wrapped ingest.Collector and re-implements Ingest/Close, delegating to the inner collector and adding telemetry around the call.", + "example": "func WithTelemetry(collector ingest.Collector, metricMeter metric.Meter, tracer trace.Tracer) (ingest.Collector, error)" + }, + { + "name": "Counters created in the constructor, returning error", + "description": "Int64Counters (openmeter.ingest.events, openmeter.ingest.errors) are created up front in WithTelemetry; any creation failure is wrapped with fmt.Errorf and returned rather than panicking.", + "example": "ingestEventsCounter, err := metricMeter.Int64Counter(\"openmeter.ingest.events\", metric.WithDescription(...), metric.WithUnit(\"{event}\")); if err != nil { return nil, fmt.Errorf(\"failed to create events counter: %w\", err) }" + }, + { + "name": "Span-and-count around each Ingest", + "description": "Ingest starts a span with namespace + event-id attributes, records error + increments the errors counter on failure, and increments the events counter on success, always tagging with the namespace attribute.", + "example": "ctx, span := c.tracer.Start(ctx, \"openmeter.ingest.events\", trace.WithAttributes(namespaceAttr, attribute.String(\"openmeter.event.id\", ev.ID()))); defer span.End()" + } + ], + "key_file_guides": [ + { + "file": "telemetry.go", + "role": "Defines collectorTelemetry and WithTelemetry; the only adapter in this folder, instrumenting the Collector interface.", + "watch_for": "Preserve the Collector contract exactly \u2014 delegate to c.collector for both Ingest and Close. On error, record the span error AND increment ingestErrorsCounter before returning; on success increment ingestEventsCounter. Use the namespace attribute consistently on all metrics." + } + ], + "anti_patterns": [ + "Mutating or dropping events in the decorator \u2014 telemetry must be transparent and only observe the inner Collector.", + "Panicking on counter-creation failure instead of returning the wrapped error from WithTelemetry.", + "Forgetting to call c.collector.Close() in Close(), leaking the wrapped collector.", + "Adding business logic here; this adapter exists solely to attach OTel metrics/spans." + ], + "decisions": [ + { + "decision": "Telemetry is a separate adapter wrapping ingest.Collector rather than baked into the collector implementations.", + "rationale": "Keeps in-memory/dedupe/kafka collectors free of observability concerns and lets DI (app/common) opt into instrumentation by composition." + } + ], + "code_examples": [ + { + "scenario": "Wrapping a collector with OTel telemetry", + "code": "func WithTelemetry(collector ingest.Collector, metricMeter metric.Meter, tracer trace.Tracer) (ingest.Collector, error) {\n ingestEventsCounter, err := metricMeter.Int64Counter(\"openmeter.ingest.events\", metric.WithDescription(\"Number of events ingested\"), metric.WithUnit(\"{event}\"))\n if err != nil { return nil, fmt.Errorf(\"failed to create events counter: %w\", err) }\n ingestErrorsCounter, err := metricMeter.Int64Counter(\"openmeter.ingest.errors\", metric.WithDescription(\"Number of failed event ingests\"), metric.WithUnit(\"{error}\"))\n if err != nil { return nil, fmt.Errorf(\"failed to create errors counter: %w\", err) }\n return &collectorTelemetry{collector: collector, tracer: tracer, ingestEventsCounter: ingestEventsCounter, ingestErrorsCounter: ingestErrorsCounter}, nil\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w94.json b/.archie/enrichments/w94.json new file mode 100644 index 0000000000..c57c2e24a1 --- /dev/null +++ b/.archie/enrichments/w94.json @@ -0,0 +1,125 @@ +{ + "openmeter/ingest/kafkaingest/serializer": { + "purpose": "Defines the Serializer interface and its JSON implementation that translate CloudEvents into the Kafka wire format (CloudEventsKafkaPayload) for the ingest pipeline. It is the single boundary where event-time usage events become Kafka key/value bytes and back.", + "patterns": [ + { + "name": "Serializer interface contract", + "description": "Every serializer implements Serializer (SerializeKey, SerializeValue, GetFormat, GetKeySchemaId, GetValueSchemaId). Schema-less formats return -1 from the GetKeySchemaId/GetValueSchemaId methods.", + "example": "type Serializer interface { SerializeKey(topic, namespace string, ev event.Event) ([]byte, error); ... }" + }, + { + "name": "Dedupe-derived Kafka key", + "description": "SerializeKey builds the Kafka partition key from dedupe.Item{Namespace, ID, Source}.Key() so that duplicate events route to the same partition. Do not hand-format keys.", + "example": "dedupe.Item{Namespace: namespace, ID: ev.ID(), Source: ev.Source()}.Key()" + }, + { + "name": "Flat CloudEventsKafkaPayload struct", + "description": "The wire value is the flat CloudEventsKafkaPayload (Id, Type, Source, Subject, Time int64, Data string). Time is a unix int64 (timezone is intentionally lost); Data is the event payload re-marshalled to a JSON string.", + "example": "payload.Time = ev.Time().Unix(); payload.Data = string(payloadData)" + }, + { + "name": "Symmetric encode/decode helpers", + "description": "toCloudEventsKafkaPayload (encode) and FromKafkaPayloadToCloudEvents (decode) are inverse functions; sink-side consumers call the exported From... helper to reconstruct event.Event. Keep them in lockstep when adding fields.", + "example": "ev, err := FromKafkaPayloadToCloudEvents(payload)" + }, + { + "name": "Optional-data guard", + "description": "CloudEvents data is optional: encode only marshals when len(ev.Data()) > 0, decode only sets data when payload.Data != \"\". Preserve this so empty-data events round-trip cleanly.", + "example": "if len(ev.Data()) > 0 { ... }" + } + ], + "key_file_guides": [ + { + "file": "serializer.go", + "role": "Defines the Serializer interface, the CloudEventsKafkaPayload wire struct, the encode/decode helpers, and ValidateKafkaPayloadToCloudEvent.", + "watch_for": "Time is stored as Unix seconds \u2014 sub-second precision and timezone are dropped. Validation requires Id/Type/Source/Subject non-empty and Time > 0; relaxing these affects all consumers." + }, + { + "file": "json.go", + "role": "JSONSerializer: the default schema-less implementation. NewJSONSerializer returns a value (not pointer); GetFormat returns \"JSON\"; schema id getters return -1.", + "watch_for": "Only JSON-serializable CloudEvents data is supported (toCloudEventsKafkaPayload errors otherwise). A new format (e.g. Avro/Protobuf) needs its own Serializer impl returning real schema ids." + }, + { + "file": "serializer_test.go", + "role": "Table-driven tests for round-tripping payloads and the dedupe key format (e.g. SerializeKey yields \"namespace-source-id\").", + "watch_for": "Tests assert exact key string \"test-namespace-test-source-test-id\" \u2014 changing dedupe.Item.Key() format breaks them and downstream partition routing." + } + ], + "anti_patterns": [ + "Constructing Kafka keys manually instead of via dedupe.Item.Key() \u2014 breaks dedupe partition routing.", + "Adding a field to encode (toCloudEventsKafkaPayload) without updating decode (FromKafkaPayloadToCloudEvents) \u2014 breaks round-trip symmetry.", + "Storing Time as anything other than Unix seconds int64 \u2014 diverges from the established wire contract.", + "Returning a real schema id (not -1) from JSONSerializer \u2014 implies a schema registry that does not exist for JSON." + ], + "decisions": [ + { + "decision": "Kafka value is a flat CloudEventsKafkaPayload with Data as a JSON string rather than the raw CloudEvents envelope.", + "rationale": "Gives a stable, ClickHouse-friendly columnar shape and avoids nested/binary CloudEvents encoding on the wire." + }, + { + "decision": "Event time is serialized as Unix seconds, explicitly dropping timezone.", + "rationale": "Metering operates on instants; a single int64 is compact and unambiguous for downstream aggregation." + } + ], + "code_examples": [ + { + "scenario": "Serialize a CloudEvent to a Kafka key and value", + "code": "import (\n\t\"github.com/cloudevents/sdk-go/v2/event\"\n\t\"github.com/openmeterio/openmeter/openmeter/ingest/kafkaingest/serializer\"\n)\n\ns := serializer.NewJSONSerializer()\nkey, err := s.SerializeKey(topic, namespace, ev) // \"namespace-source-id\"\nval, err := s.SerializeValue(topic, ev) // JSON CloudEventsKafkaPayload" + } + ] + }, + "openmeter/ingest/kafkaingest/topicresolver": { + "purpose": "Maps a namespace to its Kafka topic name. Defines the Resolver interface and NamespacedTopicResolver, the indirection that lets the ingest/sink pipeline derive per-namespace topics from a single template.", + "patterns": [ + { + "name": "Resolver interface", + "description": "All topic resolution goes through Resolver.Resolve(ctx, namespace) (string, error). Inject the interface, not the concrete type, into ingest/sink wiring.", + "example": "type Resolver interface { Resolve(ctx context.Context, namespace string) (string, error) }" + }, + { + "name": "Compile-time interface assertion", + "description": "Implementations declare a static assertion so the build fails if the interface drifts.", + "example": "var _ Resolver = (*NamespacedTopicResolver)(nil)" + }, + { + "name": "Template-driven topic naming", + "description": "NamespacedTopicResolver formats namespace into a single-parameter template via fmt.Sprintf (e.g. \"om_%s_events\"). The constructor rejects an empty template.", + "example": "fmt.Sprintf(r.template, namespace)" + }, + { + "name": "Validating constructor returning pointer + error", + "description": "NewNamespacedTopicResolver validates input and returns (*NamespacedTopicResolver, error); the resolver itself never errors on a configured template.", + "example": "func NewNamespacedTopicResolver(template string) (*NamespacedTopicResolver, error)" + } + ], + "key_file_guides": [ + { + "file": "resolver.go", + "role": "Declares the Resolver interface \u2014 the abstraction consumed by ingest publishers and the sink worker.", + "watch_for": "Resolve takes ctx but the namespaced impl ignores it; any DB/config-backed resolver must honor ctx for cancellation." + }, + { + "file": "namespacedtopic.go", + "role": "NamespacedTopicResolver + its constructor; the default template-based implementation.", + "watch_for": "template must contain exactly one %s for fmt.Sprintf; a template with no/multiple verbs produces malformed topic names. Empty template is rejected at construction, not at Resolve time." + } + ], + "anti_patterns": [ + "Hard-coding topic names in publishers/consumers instead of resolving through a Resolver.", + "Depending on the concrete *NamespacedTopicResolver in wiring rather than the Resolver interface.", + "Ignoring ctx in a new resolver that performs I/O (e.g. config or DB lookups)." + ], + "decisions": [ + { + "decision": "Topic resolution is an interface with a trivial template-based default.", + "rationale": "Keeps namespace\u2192topic mapping swappable (template, lookup table, or dynamic) without touching ingest/sink call sites." + } + ], + "code_examples": [ + { + "scenario": "Build a namespaced topic resolver and resolve a topic", + "code": "import \"github.com/openmeterio/openmeter/openmeter/ingest/kafkaingest/topicresolver\"\n\nr, err := topicresolver.NewNamespacedTopicResolver(\"om_%s_events\")\nif err != nil { return err }\ntopic, err := r.Resolve(ctx, namespace) // \"om__events\"" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w95.json b/.archie/enrichments/w95.json new file mode 100644 index 0000000000..bcfb7d4f99 --- /dev/null +++ b/.archie/enrichments/w95.json @@ -0,0 +1,414 @@ +{ + "openmeter/ledger/chargeadapter": { + "purpose": "Adapter layer that implements the billing/charges Handler interfaces (creditpurchase.Handler, flatfee.Handler, usagebased.Handler) by mapping charge lifecycle events onto ledger transaction templates. It is the bridge between the billing charge state machines and the double-entry ledger; it acknowledges/books value but does NOT recognize revenue.", + "patterns": [ + { + "name": "Implement charge Handler interfaces", + "description": "Each file defines an unexported handler struct with a compile-time interface assertion and a NewXHandler constructor. Methods follow the OnX naming of the upstream Handler interface.", + "example": "var _ chargecreditpurchase.Handler = (*creditPurchaseHandler)(nil); func NewCreditPurchaseHandler(...) (chargecreditpurchase.Handler, error)" + }, + { + "name": "Resolve templates then CommitGroup", + "description": "Build transactions.TransactionTemplate values, call transactions.ResolveTransactions(ctx, deps, ResolutionScope{...}, templates...) to get inputs, then ledger.CommitGroup(ctx, transactions.GroupInputs(namespace, annotations, inputs...)). Return ledgertransaction.GroupReference{TransactionGroupID: group.ID().ID}.", + "example": "inputs, _ := transactions.ResolveTransactions(ctx, h.deps, scope, transactions.TransferCustomerReceivableToAccruedTemplate{...}); group, _ := h.ledger.CommitGroup(ctx, transactions.GroupInputs(ns, annotations, inputs...))" + }, + { + "name": "Stamp charge annotations on every input and the group", + "description": "Compute annotations via chargeAnnotationsForFlatFeeCharge / ...UsageBasedCharge / ...CreditPurchaseCharge (which delegate to ledger.ChargeTransactionAnnotations), then wrap each non-nil input with transactions.WithAnnotations and pass the same annotations to GroupInputs.", + "example": "for i, txInput := range inputs { if txInput != nil { inputs[i] = transactions.WithAnnotations(txInput, annotations) } }" + }, + { + "name": "Validate input and short-circuit zero amounts", + "description": "Every On* method calls input.Validate() first and returns an empty GroupReference (no ledger write) when the relevant amount IsZero()/!IsPositive().", + "example": "if err := input.Validate(); err != nil { return ledgertransaction.GroupReference{}, err }; if amount.IsZero() { return ledgertransaction.GroupReference{}, nil }" + }, + { + "name": "Gate on settlement mode", + "description": "Credit-vs-invoice flows assert allowed productcatalog.SettlementMode via validateSettlementMode(actual, allowed...) before booking; wrong mode is an error, not a no-op.", + "example": "if err := validateSettlementMode(charge.Intent.SettlementMode, productcatalog.CreditThenInvoiceSettlementMode); err != nil { return ..., fmt.Errorf(\"invoice usage accrued: %w\", err) }" + }, + { + "name": "Delegate accrual collection to collector.Service", + "description": "OnAllocateCredits / OnCreditsOnlyUsageAccrued and their corrections delegate to h.collector.CollectToAccrued / CorrectCollectedAccrued; do not re-implement FBO source selection here.", + "example": "realizations, err := h.collector.CollectToAccrued(ctx, collector.CollectToAccruedInput{...})" + }, + { + "name": "Wrap multi-step flows in transaction.Run", + "description": "Credit purchase issuance spanning attribution + breakage planning + commit is wrapped in transaction.Run(ctx, h.transactionManager, ...) so ledger group + breakage records persist atomically.", + "example": "return transaction.Run(ctx, h.transactionManager, func(ctx context.Context) (ledgertransaction.GroupReference, error) { return h.issueCreditPurchaseGroup(ctx, charge) })" + } + ], + "key_file_guides": [ + { + "file": "creditpurchase.go", + "role": "creditPurchaseHandler: promotional/initiated/payment-authorized/settled events; advance attribution + breakage planning via breakage.Service.PlanIssuance/PersistCommittedRecords.", + "watch_for": "Promotional grants emit Authorize+Settle wash templates; deferred (External/Invoice) settlement is left for later events; unsupported settlement Type() returns an error. Breakage records must be persisted in the same tx as the group." + }, + { + "file": "flatfee.go", + "role": "flatFeeHandler: FBO credit allocation, invoice-usage accrual (TransferCustomerReceivableToAccruedTemplate), correction, payment authorize/settle.", + "watch_for": "OnAllocateCredits/OnInvoiceUsageAccrued acknowledge usage, NOT revenue. invoiceCostBasis is fixed at 1. OnPaymentUncollectible is intentionally unimplemented and returns an error." + }, + { + "file": "usagebased.go", + "role": "usageBasedHandler: invoice-usage accrual, credits-only accrual + correction, payment authorize/settle; receivable replenishment derived from Run.InvoiceUsage.Totals.", + "watch_for": "OnCreditsOnlyUsageAccrued uses clock.Now() for SourceBalanceAsOf while flat-fee uses Intent.InvoiceAt \u2014 booked-at vs source-as-of are deliberately distinct." + }, + { + "file": "annotations.go", + "role": "chargeAnnotationsForX helpers feeding ledger.ChargeTransactionAnnotations with subscription/feature references from charge.Intent.", + "watch_for": "FeatureID extraction differs per charge type (flatfee uses State.FeatureID, usagebased uses lo.EmptyableToPtr(State.FeatureID)); keep subscription nil-handling intact." + }, + { + "file": "helpers.go", + "role": "settledBalanceForSubAccount and taxCodeIDFromIntent/taxBehaviorFromIntent mapping productcatalog.TaxCodeConfig to ledger fields.", + "watch_for": "taxBehaviorFromIntent returns nil unless both TaxCodeID and Behavior are set." + } + ], + "anti_patterns": [ + "Booking ledger entries without stamping charge annotations on both each input and the group \u2014 breaks downstream charge/transaction correlation.", + "Treating accrual/acknowledgement transactions as revenue recognition \u2014 recognition lives in openmeter/ledger/recognizer.", + "Calling CommitGroup without first validating the input and short-circuiting zero amounts, producing empty/noise ledger groups.", + "Re-implementing FBO source selection or breakage release ordering here instead of delegating to collector.Service / breakage.Service.", + "Skipping validateSettlementMode so a credit-only charge books invoice-mode receivables (or vice versa)." + ], + "decisions": [ + { + "decision": "Charge handlers are thin mappers from charge events to transaction templates", + "rationale": "Keeps double-entry correctness centralized in the transactions/ledger/collector packages; the adapter only owns the charge-event-to-template mapping and annotation stamping." + }, + { + "decision": "Acknowledgement (accrual) is separated from revenue recognition", + "rationale": "Booking usage against accrued must not prematurely recognize earnings; recognition is a distinct deferred flow keyed off lineage segment state." + } + ], + "code_examples": [ + { + "scenario": "Mapping an invoice-usage event to a ledger transfer with annotations", + "code": "annotations := chargeAnnotationsForFlatFeeCharge(input.Charge)\ninputs, err := transactions.ResolveTransactions(ctx, h.deps, transactions.ResolutionScope{CustomerID: customerID, Namespace: input.Charge.Namespace}, transactions.TransferCustomerReceivableToAccruedTemplate{At: input.BookedAt, Amount: amount, Currency: input.Charge.Intent.Currency, CostBasis: invoiceCostBasis})\nfor i, txInput := range inputs { if txInput != nil { inputs[i] = transactions.WithAnnotations(txInput, annotations) } }\ngroup, err := h.ledger.CommitGroup(ctx, transactions.GroupInputs(input.Charge.Namespace, annotations, inputs...))\nreturn ledgertransaction.GroupReference{TransactionGroupID: group.ID().ID}, nil" + } + ] + }, + "openmeter/ledger/collector": { + "purpose": "Turns customer FBO credit (and advance) into accrued value, and unwinds it on correction, while preserving the exact order in which credit slices were collected so later breakage release/correction undo the same economic slices. The hard invariant is collection-order fidelity, not the FBO->accrued posting itself.", + "patterns": [ + { + "name": "Service splits into collector + corrector", + "description": "Service is implemented by struct{collector *accrualCollector; corrector *accrualCorrector}; CollectToAccrued routes to collector.collect, CorrectCollectedAccrued to corrector.correct. Build via NewService(Config) after Config.Validate().", + "example": "return &service{collector: &accrualCollector{...}, corrector: &accrualCorrector{...}}, nil" + }, + { + "name": "One DB transaction per flow", + "description": "collect and correct wrap their whole body in transaction.Run(ctx, c.transactionManager, run); source selection, ledger CommitGroup, breakage PersistCommittedRecords, and realization creation must share the transaction.", + "example": "return transaction.Run(ctx, c.transactionManager, run)" + }, + { + "name": "Deterministic FBO collection order", + "description": "Sources sort by fboCollectionSource.Compare: creditPriority asc, featureRestricted first, expires_at asc (nil last via compareOptionalTime), then stable cursor asc. This ordering is a frozen contract.", + "example": "slices.SortStableFunc(sources, cmpx.Compare[fboCollectionSource])" + }, + { + "name": "Lock FBO account before listing sources", + "description": "listCustomerFBOSources calls c.accountLocker.LockAccountsForPosting([]ledger.Account{customerAccounts.FBOAccount}) before ListSubAccounts to serialize concurrent collection.", + "example": "if err := c.accountLocker.LockAccountsForPosting(ctx, []ledger.Account{customerAccounts.FBOAccount}); err != nil { ... }" + }, + { + "name": "Release breakage for consumed expiring sources", + "description": "For each selected source with a breakagePlan, call breakage.ReleasePlan with a NewCollectionSourceIdentityKey(idx) so release order matches collection order; append the release input and PendingRecord.", + "example": "releaseInput, releaseRecord, _ := c.breakage.ReleasePlan(ctx, breakage.ReleasePlanInput{Plan: *selection.source.breakagePlan, Amount: selection.amount, SourceKind: breakage.SourceKindUsage, SourceEntryIdentityKey: transactions.NewCollectionSourceIdentityKey(idx)})" + }, + { + "name": "Credit-only shortfall becomes advance", + "description": "When SettlementMode==CreditOnly and FBO did not cover the amount, resolveAdvanceInputs issues a receivable then transfers FBO advance to accrued (IssueCustomerReceivableTemplate + TransferCustomerFBOAdvanceToAccruedTemplate).", + "example": "if shortfall := input.Amount.Sub(collectedInputs(inputs).collectedFBOAmount()); c.shouldAdvanceShortfall(input, shortfall) { ... }" + }, + { + "name": "Coarse billing realizations from fine ledger entries", + "description": "toCreditRealizations buckets negative FBO entry amounts by SubAccountID (preserving order) into creditrealization.CreateAllocationInput; entry-level identity splits must not leak as separate realizations.", + "example": "amountsBySubAccountID[subAccountID] = amountsBySubAccountID[subAccountID].Add(entry.Amount().Abs())" + } + ], + "key_file_guides": [ + { + "file": "README.md", + "role": "Authoritative spec of collection order, source-entry identity, credit-only advance, advance backfill, correction unwind order, and the transaction-boundary invariant.", + "watch_for": "Read this before changing any ordering; correction uses reverse original collection order and must net with breakage plan/release/reopen exactly." + }, + { + "file": "collect.go", + "role": "accrualCollector.collect: resolves collected inputs, optionally issues advance, commits the group, persists breakage, returns CreateAllocationInputs.", + "watch_for": "Group annotations default to ledger.ChargeAnnotations when input.Annotations is nil; breakage persistence is skipped only when c.breakage is nil." + }, + { + "file": "collection_fbo.go", + "role": "FBO source listing, sorting (fboCollectionSource.Compare), and selection into fboCollectionSelection.", + "watch_for": "The TODO notes the Compare contract must be versioned before changing \u2014 existing entries/corrections/breakage assume it. compareOptionalTime treats nil expiry as sorting last." + }, + { + "file": "correct.go", + "role": "accrualCorrector.correct: plan-then-execute correction merging overlapping corrections, reissuing advance, reopening breakage.", + "watch_for": "plannedDirectInputs skip the merge/CorrectTransaction path; plannedTransactionCorrection.mergeKey dedupes by transaction namespaced ID." + }, + { + "file": "service.go", + "role": "Service interface, Config + Validate, input structs (CollectToAccruedInput, CorrectCollectedAccruedInput), constructor.", + "watch_for": "CollectToAccrued requires non-zero BookedAt and SourceBalanceAsOf \u2014 these are deliberately separate timestamps (booked time vs source-visibility time)." + } + ], + "anti_patterns": [ + "Changing fboCollectionSource.Compare ordering without versioning the contract \u2014 corrupts correction and breakage-release alignment for existing ledger data.", + "Committing the ledger group, breakage records, or billing allocations outside the single transaction.Run boundary, leaving observable impossible intermediate states.", + "Listing FBO sources without first LockAccountsForPosting, allowing concurrent double-collection of the same credit.", + "Emitting per-entry credit realizations instead of bucketing by FBO sub-account, leaking ledger internals into billing.", + "Selecting expiring sources without issuing the matching breakage ReleasePlan keyed by NewCollectionSourceIdentityKey(idx)." + ], + "decisions": [ + { + "decision": "BookedAt and SourceBalanceAsOf are separate inputs", + "rationale": "A transaction booked at T1 may need to see credit/expiry state visible as of a later T5; conflating them would misselect sources." + }, + { + "decision": "Source entry identity records order, not amounts", + "rationale": "Billing allocations are coarser than ledger collection; amounts come from ledger entries, identity only preserves selection order so corrections/breakage can unwind the same slices." + }, + { + "decision": "Collection order is a frozen, versioned contract", + "rationale": "Corrections unwind in reverse and breakage releases attach to concrete source entries; any reorder would desync persisted ledger/breakage rows." + } + ], + "code_examples": [ + { + "scenario": "Collecting FBO into accrued and releasing breakage for consumed expiring sources", + "code": "selections, _ := c.collectCustomerFBOSelections(ctx, c.customerID(input), input.Currency, input.FeatureKey, amount, input.SourceBalanceAsOf)\ninputs, _ := transactions.ResolveTransactions(ctx, c.deps, c.resolutionScope(input), transactions.TransferCustomerFBOToAccruedTemplate{At: input.BookedAt, Currency: input.Currency, Sources: fboCollectionSelections(selections).postingAmounts()})\nfor idx, selection := range selections {\n if selection.source.breakagePlan == nil { continue }\n releaseInput, releaseRecord, _ := c.breakage.ReleasePlan(ctx, breakage.ReleasePlanInput{Plan: *selection.source.breakagePlan, Amount: selection.amount, SourceKind: breakage.SourceKindUsage, SourceEntryIdentityKey: transactions.NewCollectionSourceIdentityKey(idx)})\n inputs = append(inputs, releaseInput); pending = append(pending, releaseRecord)\n}" + } + ] + }, + "openmeter/ledger/customerbalance": { + "purpose": "Customer-facing read model over ledger + billing activity: exposes credit balance at a point in time and a merged credit-transaction listing (funded/consumed/expired). It is a temporary bridge until the Real-Time-Engine (RTE) lands; it must keep API semantics stable while the implementation may stop querying the ledger directly.", + "patterns": [ + { + "name": "Facade validates and delegates to Service", + "description": "Facade wraps a Service; every method validates a typed input (GetBalancesInput/GetBalanceInput/ListCreditTransactionsInput Validate via models.NewNillableGenericValidationError) then calls the service. Build with NewFacade(service) (non-nil required).", + "example": "func (f *Facade) GetBalance(ctx, input GetBalanceInput) (alpacadecimal.Decimal, error) { if err := input.Validate(); err != nil { return ..., err }; ... return balance.Settled(), nil }" + }, + { + "name": "Service depends on narrow local interfaces", + "description": "service depends on small interfaces (chargesService, creditPurchaseActivityService, subAccountLister, usageBasedTotalsService) plus ledger.AccountResolver/Ledger/BalanceQuerier/breakage.Service, all validated in Config.Validate and assembled in New.", + "example": "type chargesService interface { GetByIDs(...); ListCharges(...) }" + }, + { + "name": "Default to current as-of when unfiltered", + "description": "GetBalance applies currentBalanceQuery, which sets AsOf=clock.Now() unless After or AsOf is already provided; balance = booked FBO settled + advance receivable settled, minus pending charge impacts.", + "example": "query = currentBalanceQuery(query) // sets AsOf = clock.Now() when neither After nor AsOf set" + }, + { + "name": "Pluggable per-type transaction loaders", + "description": "creditTransactionLoaderFactories maps funded/consumed/expired to loader factories; creditTransactionLoaders returns all (in creditTransactionLoaderOrder) or one when a type filter is set. Each loader implements Load(ctx, creditTransactionLoaderInput).", + "example": "factory, ok := creditTransactionLoaderFactories[*txType]" + }, + { + "name": "K-way merge by ledger cursor", + "description": "Per-type loader results are merged via mergeSortedLists with a max-heap keyed by ledger.TransactionCursor{BookedAt, CreatedAt, ID}; descending order is enforced by Less returning cmp(...) > 0.", + "example": "merged, hasMore := mergeSortedLists(lists, limit, compareCreditTransactionsByCursor)" + }, + { + "name": "Expired rows come from breakage net impacts", + "description": "expiredCreditTransactionLoader reads service.Breakage.ListExpiredBreakageImpacts (plans - releases + reopens), not raw breakage transactions; zero-net groups are hidden; cursor is the newest contributing breakage transaction.", + "example": "result, _ := l.service.Breakage.ListExpiredBreakageImpacts(ctx, breakage.ListExpiredBreakageImpactsInput{...})" + }, + { + "name": "NoopService when credits disabled", + "description": "NoopService implements Service returning zero balances/empty listings; New supplies a breakage Noop when Config.Breakage is nil.", + "example": "var _ Service = NoopService{}" + } + ], + "key_file_guides": [ + { + "file": "README.md", + "role": "Spec of balance/asOf semantics, transaction listing types, expired projection (plan/release/reopen netting), cursor semantics, and the presentation boundary.", + "watch_for": "This package must NOT decide how plan/release/reopen net, FBO collection order, or correction unwind order \u2014 those belong to breakage and collector." + }, + { + "file": "service.go", + "role": "Service interface, dependency interfaces, Config/Validate, struct, GetBalance/GetFBOCurrencies; explicitly documented as not the RTE.", + "watch_for": "Pending balance is a current projection from open charges via balanceCalculator even when AsOf/cursor filters the booked side; chargeListPageSize=100." + }, + { + "file": "calculation.go", + "role": "Impact wrapper over charges.Charge and chargePendingBalanceCalculator; bounded (credit_then_invoice) vs unbounded (credit_only) amounts.", + "watch_for": "RealizedCredits skips IsVoidedBillingHistory runs; applyBoundedAmount clamps at zero (can't go negative) while unbounded credit_only can drive balance negative." + }, + { + "file": "facade.go", + "role": "Public entry: GetBalances/GetBalance/ListCreditTransactions with input validation and currency dedup.", + "watch_for": "GetBalanceInput rejects After+AsOf together; GetBalances falls back to GetFBOCurrencies when no currency filter is given." + }, + { + "file": "loaders.go", + "role": "creditTransactionLoader interface, ordering, and factory map per CreditTransactionType.", + "watch_for": "consumed reuses newLedgerCreditTransactionLoader with ListTransactionsCreditMovementNegative; adding a type requires updating both order slice and factory map." + }, + { + "file": "merge.go", + "role": "container/heap-based descending k-way merge and cursor extraction.", + "watch_for": "Less inverts cmp (>0) to produce descending order; limit<=0 returns empty with HasMore=false." + }, + { + "file": "transactions.go", + "role": "CreditTransactionType enum, ListCreditTransactions input/result/validation, CreditTransaction view model.", + "watch_for": "AsOf boundary must be applied before projection so future breakage entries don't leak; After/Before are mutually exclusive." + } + ], + "anti_patterns": [ + "Computing expired amounts from raw breakage ledger transactions instead of ListExpiredBreakageImpacts net (plan - release + reopen) \u2014 duplicates or miscounts expiry.", + "Letting RealizedCredits count IsVoidedBillingHistory runs, double-counting reversed billing against the customer balance.", + "Leaking future-dated breakage/FBO entries past AsOf into balance or listing.", + "Encoding FBO collection order or correction unwind order here \u2014 that logic belongs to collector/breakage.", + "Constructing the service without validating its dependency interfaces (Config.Validate) or bypassing the NoopService when credits are disabled." + ], + "decisions": [ + { + "decision": "Implemented as a temporary balance bridge, not the RTE", + "rationale": "Balance currently queries the ledger per view; the package is structured so API semantics stay stable when the RTE replaces the implementation." + }, + { + "decision": "Listing is a merged read model with per-type loaders + heap merge", + "rationale": "Funded/consumed/expired come from different sources (charges, ledger movements, breakage impacts) but must page as one cursor-ordered stream." + }, + { + "decision": "Expired rows project net breakage impact with the newest contributing cursor", + "rationale": "Gives one stable customer-facing expiry row per bucket while preserving cursor pagination and hiding zero-net (immediately-backfilled) groups." + } + ], + "code_examples": [ + { + "scenario": "Computing settled balance from booked FBO + advance receivable minus pending charge impacts", + "code": "bookedBalance, _ := s.BalanceQuerier.GetAccountBalance(ctx, customerAccounts.FBOAccount, ledger.RouteFilter{Currency: currency}, query)\nadvanceBalance, _ := s.BalanceQuerier.GetAccountBalance(ctx, customerAccounts.ReceivableAccount, ledger.RouteFilter{Currency: currency, CostBasis: mo.Some[*alpacadecimal.Decimal](nil)}, query)\nimpacts, _ := s.getChargePendingBalanceImpacts(ctx, customerID, currency)\nsettled := bookedBalance.Settled().Add(advanceBalance.Settled())\nreturn balance{settled: settled, pending: s.balanceCalculator.CalculatePendingBalance(settled, impacts)}, nil" + } + ] + }, + "openmeter/ledger/noop": { + "purpose": "No-op implementations of the ledger surface (Ledger, BalanceQuerier, AccountResolver, account.Service, namespace.Handler) used when credits.enabled is false, so callers can be wired without a real ledger backend. Every operation returns zero balances/empty results or trivially-constructed account stubs.", + "patterns": [ + { + "name": "Compile-time interface assertions for every type", + "description": "Each noop struct declares var _ Interface = T{} to guarantee it satisfies the corresponding ledger/account/namespace interface.", + "example": "var ( _ ledger.Ledger = Ledger{}; _ ledger.BalanceQuerier = Ledger{} )" + }, + { + "name": "Zero-value returns", + "description": "Balance methods return balance{} whose Settled()/Pending() are alpacadecimal.Zero; list/get methods return empty slices/structs and nil errors.", + "example": "func (Ledger) ListTransactions(...) (ledger.ListTransactionsResult, error) { return ledger.ListTransactionsResult{}, nil }" + }, + { + "name": "Construct real account types from data, not bespoke fakes", + "description": "newAccount/newSubAccount build via ledgeraccount.NewAccountFromData / NewSubAccountFromData with AccountLiveServices{SubAccountService: AccountService{}} so returned accounts are real ledger account types backed by noop services.", + "example": "account, err := ledgeraccount.NewAccountFromData(ledgeraccount.AccountData{...}, ledgeraccount.AccountLiveServices{SubAccountService: AccountService{}})" + }, + { + "name": "Stable account-type defaults", + "description": "Resolvers return CustomerAccounts/BusinessAccounts populated with the canonical AccountTypeCustomerFBO/Receivable/Accrued/Wash/Earnings/Brokerage/Breakage stubs; normalizeID/normalizeNamespace substitute 'noop' fallbacks for empty IDs.", + "example": "return ledger.CustomerAccounts{FBOAccount: customerFBOAccount{...AccountTypeCustomerFBO}, ReceivableAccount: ..., AccruedAccount: ...}, nil" + } + ], + "key_file_guides": [ + { + "file": "noop.go", + "role": "Single file implementing Ledger, AccountResolver, AccountService, NamespaceHandler, and the account/subAccount/postingAddress/balance/businessAccount stubs.", + "watch_for": "accountTypeForRoute infers type from route fields (TransactionAuthorizationStatus -> Receivable, CreditPriority -> FBO, else Accrued); noopCurrency defaults to USD; error branches in newAccount/newSubAccount fall back to zero-value stubs rather than panicking." + } + ], + "anti_patterns": [ + "Adding behavior or side effects to a noop method \u2014 it must stay a pure zero/empty implementation usable when credits are disabled.", + "Returning non-nil errors from noop methods, which would break callers that expect the disabled path to succeed silently.", + "Hand-rolling fake account structs instead of going through ledgeraccount.NewAccountFromData/NewSubAccountFromData, diverging from real account semantics.", + "Dropping a compile-time interface assertion when adding a new noop type, allowing it to silently fall out of sync with the ledger interface." + ], + "decisions": [ + { + "decision": "Noop is the wired implementation when credits.enabled is false", + "rationale": "app/common injects these so the rest of the system compiles and runs unchanged; real backfill must construct concrete adapters directly rather than relying on these." + }, + { + "decision": "Build real account types via NewAccountFromData rather than minimal fakes", + "rationale": "Keeps returned accounts behaving like real ledger accounts (routing keys, sub-account services) so callers don't special-case the noop path." + } + ], + "code_examples": [ + { + "scenario": "Returning canonical zero customer accounts", + "code": "func (AccountResolver) GetCustomerAccounts(context.Context, customer.CustomerID) (ledger.CustomerAccounts, error) {\n return ledger.CustomerAccounts{\n FBOAccount: customerFBOAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerFBO}},\n ReceivableAccount: customerReceivableAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerReceivable}},\n AccruedAccount: customerAccruedAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerAccrued}},\n }, nil\n}" + } + ] + }, + "openmeter/ledger/recognizer": { + "purpose": "Revenue-recognition service: moves attributable accrued balance into earnings and advances lineage segments to earnings_recognized. It is the distinct recognition step (separate from accrual/acknowledgement) that books earnings against the ledger and transitions lineage state atomically.", + "patterns": [ + { + "name": "Single-method Service with Config/Validate constructor", + "description": "Service exposes only RecognizeEarnings; NewService(Config) validates required deps (Ledger, ResolverDependencies AccountService/AccountCatalog/BalanceQuerier, Lineage, TransactionManager) before building the struct.", + "example": "func NewService(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &service{...}, nil }" + }, + { + "name": "Atomic recognition in transaction.Run", + "description": "RecognizeEarnings wraps load-lineages, resolve-template, CommitGroup, and lineage segment transitions in one transaction.Run so ledger and lineage state commit together.", + "example": "return transaction.Run(ctx, s.transactionManager, func(ctx context.Context) (RecognizeEarningsResult, error) { ... })" + }, + { + "name": "Eligibility from lineage segment state", + "description": "collectEligibleLineages selects positive segments whose State is in recognizableSegmentStates (RealCredit, AdvanceBackfilled), sorted by lineage.ID for deterministic allocation.", + "example": "if recognizableSegmentStates[seg.State] && seg.Amount.IsPositive() { segments = append(segments, seg); amount = amount.Add(seg.Amount) }" + }, + { + "name": "Resolve against actual accrued, recognize the real output", + "description": "Template RecognizeEarningsFromAttributableAccruedTemplate is resolved against ledger balance; the recognized amount is sumPositiveEntries(resolved), which may be less than eligible; zero output short-circuits.", + "example": "actualAmount := sumPositiveEntries(resolved); if !actualAmount.IsPositive() { return RecognizeEarningsResult{}, nil }" + }, + { + "name": "Close-then-recreate segment transitions", + "description": "allocateRecognition closes each consumed source segment, recreates a remainder segment in the original state if partial, and creates an earnings_recognized segment carrying SourceState/SourceBackingTransactionGroupID for correction unwind. Keeps the active segment set non-overlapping.", + "example": "s.lnge.CloseSegment(ctx, seg.ID, now); s.lnge.CreateSegment(ctx, lineage.CreateSegmentInput{State: creditrealization.LineageSegmentStateEarningsRecognized, SourceState: &sourceState, ...})" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Service interface, Config/Validate, constructor, RecognizeEarningsInput/Result.", + "watch_for": "Recognition needs the full ResolverDependencies trio plus Lineage and TransactionManager; input requires non-zero At and a valid Currency." + }, + { + "file": "recognize.go", + "role": "RecognizeEarnings flow plus collectEligibleLineages and allocateRecognition.", + "watch_for": "Allocation order is deterministic by lineage.ID; segment time is At.Truncate(time.Microsecond); recognized amount allocated may be capped by actual ledger output, not eligible total. minDecimal/sumPositiveEntries are local helpers." + }, + { + "file": "noop.go", + "role": "NoopService returning empty RecognizeEarningsResult for tests not exercising recognition.", + "watch_for": "Keep it side-effect-free; var _ Service = NoopService{} must hold." + } + ], + "anti_patterns": [ + "Committing the ledger recognition group without the lineage segment transitions in the same transaction.Run, desyncing earnings and lineage state.", + "Recognizing the eligible total instead of the actual sumPositiveEntries(resolved) amount produced by the template against accrued balance.", + "Mutating a lineage segment in place instead of close-then-recreate, producing overlapping active segments that break correction unwind.", + "Dropping SourceState/SourceBackingTransactionGroupID on the earnings_recognized segment, making recognition non-reversible.", + "Recognizing segments whose State is not in recognizableSegmentStates (only RealCredit / AdvanceBackfilled are eligible)." + ], + "decisions": [ + { + "decision": "Recognition is gated on lineage segment state and resolved against actual accrued balance", + "rationale": "Only real or advance-backfilled credit may be recognized, and the ledger template (not the eligible total) determines how much accrued can actually be moved to earnings." + }, + { + "decision": "Segment transitions use close + recreate with source metadata", + "rationale": "Keeps the active segment set non-overlapping and records prior state so a later correction can unwind recognition back to the original segment state." + } + ], + "code_examples": [ + { + "scenario": "Recognizing earnings for eligible accrued and transitioning a segment", + "code": "resolved, _ := transactions.ResolveTransactions(ctx, s.deps, transactions.ResolutionScope{CustomerID: in.CustomerID, Namespace: in.CustomerID.Namespace}, transactions.RecognizeEarningsFromAttributableAccruedTemplate{At: in.At, Amount: totalEligible, Currency: in.Currency})\nactualAmount := sumPositiveEntries(resolved)\ngroup, _ := s.ledger.CommitGroup(ctx, transactions.GroupInputs(in.CustomerID.Namespace, nil, resolved...))\nsourceState := seg.State\ns.lnge.CloseSegment(ctx, seg.ID, now)\ns.lnge.CreateSegment(ctx, lineage.CreateSegmentInput{LineageID: seg.LineageID, Amount: consumed, State: creditrealization.LineageSegmentStateEarningsRecognized, BackingTransactionGroupID: &groupID, SourceState: &sourceState, SourceBackingTransactionGroupID: seg.BackingTransactionGroupID})" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w96.json b/.archie/enrichments/w96.json new file mode 100644 index 0000000000..d145c9a003 --- /dev/null +++ b/.archie/enrichments/w96.json @@ -0,0 +1,152 @@ +{ + "openmeter/ledger/routingrules": { + "purpose": "Declarative routing-rule validator for ledger transactions: given a set of ledger.EntryInput postings, verify the combination of account types, signs, and route dimensions forms a legal double-entry flow. The package's single constraint is that it is pure validation logic over decoded entries \u2014 no DB, no service, no context.", + "patterns": [ + { + "name": "RoutingRule interface + struct rules", + "description": "Every rule is a struct implementing `RoutingRule` with one method `Validate(tx TxView) error`. New rules are added as struct types (e.g. RequireFlowDirectionRule) and registered in DefaultValidator.Rules, not as ad-hoc functions.", + "example": "type RequireFlowDirectionRule struct { From, To ledger.AccountType }; func (r RequireFlowDirectionRule) Validate(tx TxView) error {...}" + }, + { + "name": "Validator implements ledger.RoutingValidator", + "description": "Validator{Rules []RoutingRule} satisfies `var _ ledger.RoutingValidator = (*Validator)(nil)` via ValidateEntries, which builds a TxView once then runs every rule in order, short-circuiting on first error.", + "example": "func (v Validator) ValidateEntries(entries []ledger.EntryInput) error { view, _ := NewTxView(entries); for _, r := range v.Rules { if err := r.Validate(view); err != nil { return err } } }" + }, + { + "name": "Gate-then-check rule shape", + "description": "Rules first gate on relevance (e.g. `if !tx.HasAccountTypes(r.From, r.To) { return nil }` or `len(accountTypes) != 1`) and return nil when not applicable, only validating when the targeted account-type shape is present.", + "example": "if !tx.HasAccountTypes(r.Left, r.Right) { return nil }" + }, + { + "name": "Violations via ledger.ErrRoutingRuleViolated.WithAttrs", + "description": "Every failure returns ledger.ErrRoutingRuleViolated decorated with models.Attributes carrying a snake_case `reason` plus account/field context. Never return raw errors.New for rule violations.", + "example": "return ledger.ErrRoutingRuleViolated.WithAttrs(models.Attributes{\"reason\": \"invalid_flow_direction\", \"account_type\": r.From})" + }, + { + "name": "Route comparison via RouteField enum", + "description": "Cross-entry field matching goes through the RouteField string enum and sameRouteField switch; add a new comparable dimension by extending RouteField and the switch, then reference it in RequireSameRouteRule.Fields. Unknown fields return an error.", + "example": "case RouteFieldCurrency: return left.Currency == right.Currency, nil" + }, + { + "name": "Optional-field equality helpers", + "description": "Pointer route fields are compared with optional*Equal helpers (optionalStringEqual, optionalDecimalEqual, etc.) that treat both-nil as equal and one-nil as unequal; reuse these instead of inlining nil checks.", + "example": "func optionalDecimalEqual(l, r *alpacadecimal.Decimal) bool { if l==nil||r==nil { return l==nil&&r==nil }; return l.Equal(*r) }" + }, + { + "name": "Immutable TxView accessors", + "description": "TxView/EntryView are read-only projections; Entries() returns slices.Clone, EntriesOf filters by account type, AccountTypes() dedups+sorts. Rules query these accessors and never mutate entries.", + "example": "func (t TxView) Entries() []EntryView { return slices.Clone(t.entries) }" + } + ], + "key_file_guides": [ + { + "file": "routingrules.go", + "role": "All RoutingRule struct types, the Validator, RouteField enum, and the sign/route helper functions (entriesBySign, requireMatchingRouteFields, requireKnownToUnknownCostBasisTranslationEitherDirection).", + "watch_for": "Cost-basis translation rules use requireKnownToUnknownCostBasisTranslationEitherDirection (tries both directions) \u2014 preserve the either-direction semantics so both attribute and correction flows validate. Argument order to that helper matters per rule (FBO passes positiveEntries, negativeEntries)." + }, + { + "file": "defaults.go", + "role": "DefaultValidator instance wiring the full production rule chain: allowed account-type sets, flow directions, auth-status, cost-basis translations, and per-pair RequireSameRouteRule field requirements.", + "watch_for": "This is the live ruleset used everywhere (testutils, historical ledger). Adding/removing an account-type combination requires editing AllowedAccountSetsRule.Sets AND likely the matching RequireFlowDirectionRule/RequireSameRouteRule, or otherwise-valid flows get rejected." + }, + { + "file": "view.go", + "role": "EntryView/TxView projections (decode PostingAddress into accountType + ledger.Route) plus all optional*Equal / stringSliceEqual comparison helpers.", + "watch_for": "newEntryView decodes the route eagerly via entry.PostingAddress().Route().Route(); a malformed route surfaces here. AccountTypes() sorts \u2014 don't rely on insertion order." + }, + { + "file": "routingrules_test.go", + "role": "Table of TestDefaultValidator_* cases asserting allowed/rejected flows; the canonical spec of what each rule permits.", + "watch_for": "Uses transactionstestutils.AnyEntryInput + addressForRoute helper. New rules MUST add both an Allows* and a Rejects* case; rejection assertions match on `require.ErrorContains(t, err, \"ledger routing rule violated\")`." + } + ], + "anti_patterns": [ + "Returning raw errors (errors.New/fmt.Errorf) for rule violations instead of ledger.ErrRoutingRuleViolated.WithAttrs \u2014 callers and tests rely on that error identity/message.", + "Adding DB access, context.Context, or service calls into a rule \u2014 this package is pure validation over already-decoded entries.", + "Comparing pointer route fields with == or direct deref instead of the optional*Equal helpers, breaking nil-vs-nil semantics.", + "Mutating the slice returned by TxView.Entries()/EntriesOf() expecting it to affect the view \u2014 they are clones/copies.", + "Adding a new account-type combination to one rule (e.g. a flow direction) without updating AllowedAccountSetsRule.Sets, so the combination is rejected before the new rule runs." + ], + "decisions": [ + { + "decision": "Rules are structs satisfying RoutingRule and composed in a Validator list rather than one monolithic validate function.", + "rationale": "Each accounting invariant (flow direction, cost-basis translation, tax-dimension scope) is independently testable and reorderable, and the production ruleset is declared as data in DefaultValidator." + }, + { + "decision": "Validation operates on a decoded TxView/EntryView projection built once by ValidateEntries.", + "rationale": "Decoding PostingAddress\u2192accountType+Route once and exposing query accessors (EntriesOf, HasAccountTypes, AccountTypes) keeps every rule simple and avoids repeated decoding per rule." + } + ], + "code_examples": [ + { + "scenario": "Add a new account-flow invariant as a rule and register it", + "code": "type RequireFlowDirectionRule struct {\n\tFrom ledger.AccountType\n\tTo ledger.AccountType\n}\n\nfunc (r RequireFlowDirectionRule) Validate(tx TxView) error {\n\tif !tx.HasAccountTypes(r.From, r.To) {\n\t\treturn nil\n\t}\n\tfromEntries := tx.EntriesOf(r.From)\n\ttoEntries := tx.EntriesOf(r.To)\n\tif allEntriesPositive(fromEntries) && allEntriesNegative(toEntries) {\n\t\treturn nil\n\t}\n\treturn ledger.ErrRoutingRuleViolated.WithAttrs(models.Attributes{\n\t\t\"reason\": \"invalid_flow_direction\",\n\t\t\"account_type\": r.From,\n\t\t\"target_type\": r.To,\n\t})\n}\n\n// register in defaults.go DefaultValidator.Rules" + } + ] + }, + "openmeter/ledger/testutils": { + "purpose": "Shared test-harness package for the ledger domain: constructs concrete account/historical/resolver services from real adapters and spins up a fully migrated Postgres IntegrationEnv with provisioned customer and business sub-accounts. Its constraint is to build dependencies from underlying constructors (no app/common DI) to avoid import cycles.", + "patterns": [ + { + "name": "Deps built from concrete adapters", + "description": "InitDeps wires real adapters and services directly \u2014 accountadapter.NewRepo, accountservice.New, historicaladapter.NewRepo, historical.NewLedger, resolversadapter.NewRepo, resolvers.NewAccountResolver \u2014 never importing app/common wiring.", + "example": "accountService := accountservice.New(accountadapter.NewRepo(db), locker)" + }, + { + "name": "Historical ledger uses DefaultValidator", + "description": "historical.NewLedger is constructed with routingrules.DefaultValidator as its RoutingValidator, so integration tests exercise the production routing rules.", + "example": "historical.NewLedger(historicalRepo, accountService, accountService, routingrules.DefaultValidator)" + }, + { + "name": "IntegrationEnv full DB lifecycle", + "description": "NewIntegrationEnv freezes clock, inits a Postgres DB via omtestutils.InitPostgresDB, runs migrate.New(...).Up() with OMMigrationsConfig, creates a Customer row, then provisions customer + business accounts via the resolver. All cleanup is registered with t.Cleanup.", + "example": "clock.FreezeTime(now); t.Cleanup(clock.UnFreeze); migrator.Up()" + }, + { + "name": "Sub-account accessor helpers per account type", + "description": "Env exposes typed helpers (FBOSubAccount, ReceivableSubAccount*, AccruedSubAccount*, WashSubAccount, EarningsSubAccount, BrokerageSubAccount, BreakageSubAccountWithCostBasis) that call GetSubAccountForRoute with the correct *RouteParams; tests resolve sub-accounts through these rather than constructing routes by hand.", + "example": "e.CustomerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{Currency: e.Currency, CreditPriority: priority})" + }, + { + "name": "Optional-param helper laddering", + "description": "Helper variants delegate to the most general form with defaults (ReceivableSubAccount \u2192 ReceivableSubAccountWithCostBasisAndStatus(t, nil, Open)); add new knobs at the base helper, not by duplicating the full chain.", + "example": "func (e *IntegrationEnv) ReceivableSubAccount(t *testing.T) ledger.SubAccount { return e.ReceivableSubAccountWithCostBasisAndStatus(t, nil, ledger.TransactionAuthorizationStatusOpen) }" + } + ], + "key_file_guides": [ + { + "file": "deps.go", + "role": "InitDeps(db, logger) \u2192 Deps{AccountService, ResolversService, HistoricalLedger}; the canonical example of building ledger services from raw adapters + lockr without DI.", + "watch_for": "Requires an injected *slog.Logger (no slog.Default fallback) and a lockr.NewLocker. Reuse this rather than re-wiring ledger services elsewhere in tests, and keep it independent of app/common to avoid import cycles." + }, + { + "file": "integration.go", + "role": "IntegrationEnv struct + NewIntegrationEnv constructor and all typed sub-account accessor helpers plus SumBalance.", + "watch_for": "Freezes clock to 2026-01-01 and registers UnFreeze cleanup \u2014 assertions inheriting frozen time. SumBalance returns sum.Settled() (settled balance, not pending). Namespace is uniquified with UnixNano; customer row is created before resolver provisioning." + } + ], + "anti_patterns": [ + "Importing app/common (the DI/wiring layer) to build ledger test dependencies \u2014 creates test-only import cycles; build from accountservice.New / resolvers.NewAccountResolver instead.", + "Constructing sub-accounts by hand-building ledger.Route/*RouteParams instead of using the env's typed accessor helpers.", + "Passing slog.Default() instead of omtestutils.NewDiscardLogger(t) into InitDeps.", + "Calling clock.FreezeTime in a test that also uses NewIntegrationEnv without expecting the env's own freeze/UnFreeze cleanup.", + "Skipping migrator.Up() / using a non-migrated DB \u2014 the resolver provisioning (CreateCustomerAccounts, EnsureBusinessAccounts) needs the full schema." + ], + "decisions": [ + { + "decision": "Test deps are assembled from concrete package constructors rather than the application wiring layer.", + "rationale": "Per AGENTS.md, building from repos/adapters/services/lockr keeps ledger testutils independent of app/common and prevents test-only import cycles." + }, + { + "decision": "IntegrationEnv provisions both customer and business accounts up front via the resolver.", + "rationale": "Most ledger lifecycle tests need FBO/Receivable/Accrued (customer) and Wash/Earnings/Brokerage/Breakage (business) sub-accounts available, so they are created once and exposed via typed helpers." + } + ], + "code_examples": [ + { + "scenario": "Stand up a ledger integration environment and resolve a sub-account balance", + "code": "env := testutils.NewIntegrationEnv(t, \"ledger-test\")\n\nfbo := env.FBOSubAccount(t, ledger.DefaultCustomerFBOPriority)\n// ... post entries via env.Deps.HistoricalLedger ...\nbalance := env.SumBalance(t, fbo) // returns settled balance\nrequire.Equal(t, float64(0), balance.InexactFloat64())" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w97.json b/.archie/enrichments/w97.json new file mode 100644 index 0000000000..46880dcd92 --- /dev/null +++ b/.archie/enrichments/w97.json @@ -0,0 +1,147 @@ +{ + "openmeter/ledger/account/adapter": { + "purpose": "Ent-backed persistence layer for ledger accounts, sub-accounts, and their routing rows. Implements the ledgeraccount.Repo interface; all reads/writes must stay transaction-aware via entutils so they rebind to a tx already carried in ctx.", + "patterns": [ + { + "name": "TransactingRepo wrapping", + "description": "Every public repo method body is wrapped in entutils.TransactingRepo so it rebinds to the ctx-carried tx instead of r.db directly.", + "example": "func (r *repo) CreateAccount(ctx, input) (...) { return entutils.TransactingRepo(ctx, r, func(ctx, tx *repo) (...) { entity, err := tx.db.LedgerAccount.Create()... }) }" + }, + { + "name": "TxUser implementation", + "description": "repo satisfies entutils.TxUser[*repo] via Tx/WithTx/Self; WithTx rebuilds db from raw tx config with entdb.NewTxClientFromRawConfig.", + "example": "var _ entutils.TxUser[*repo] = (*repo)(nil); func (r *repo) WithTx(ctx, tx) *repo { return &repo{db: entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()).Client()} }" + }, + { + "name": "Map* projector functions", + "description": "DB entities are converted to domain Data structs via exported MapAccountData / MapSubAccountData; never return raw db.* entities.", + "example": "func MapAccountData(entity *db.LedgerAccount) (*ledgeraccount.AccountData, error)" + }, + { + "name": "Idempotent ensure via OnConflict ResolveWithIgnore", + "description": "EnsureSubAccount and resolveOrCreateRoute upsert by unique constraint columns then re-query, so duplicate routes/sub-accounts resolve to the existing row.", + "example": "OnConflict(sql.ConflictColumns(FieldNamespace, FieldAccountID, FieldRouteID), sql.ResolveWithIgnore()).Exec(ctx)" + }, + { + "name": "Route normalization before persistence/query", + "description": "Routes are normalized (input.Route.Normalize()) and keyed via ledger.BuildRoutingKey before insert and in list-filter predicate building, so cost-basis canonicalization (0.70 == 0.7) is enforced.", + "example": "normalizedRoute, _ := input.Route.Normalize(); routeKey, _ := ledger.BuildRoutingKey(normalizedRoute)" + }, + { + "name": "Eager-load required edges then validate", + "description": "Sub-account queries use WithRoute().WithAccount(); MapSubAccountData errors if either edge is nil.", + "example": "if entity.Edges.Account == nil { return ..., fmt.Errorf(\"account edge is required\") }" + } + ], + "key_file_guides": [ + { + "file": "repo.go", + "role": "repo struct, NewRepo constructor, and the TxUser plumbing (Tx/WithTx/Self) plus Repo interface assertion.", + "watch_for": "WithTx must rebuild db from the raw tx config; do not return r unchanged or transactions leak across the original client." + }, + { + "file": "account.go", + "role": "Account CRUD: CreateAccount, GetAccountByID, ListAccounts, and MapAccountData projector.", + "watch_for": "Wrap all bodies in TransactingRepo; ListAccounts only filters AccountTypeIn when input.AccountTypes is non-empty." + }, + { + "file": "subaccount.go", + "role": "Sub-account ensure/get/list, the private resolveOrCreateRoute upsert, and MapSubAccountData.", + "watch_for": "resolveOrCreateRoute is the only place routes are created; route filtering in ListSubAccounts uses mo.Option presence semantics (IsPresent + nil-inner => *IsNil predicate)." + }, + { + "file": "repo_test.go", + "role": "Integration tests against a real Postgres (testutils.InitPostgresDB + migrate.OMMigrationsConfig); exercises route uniqueness and cost-basis canonicalization.", + "watch_for": "Requires Postgres; tests assert entdb.IsConstraintError on duplicate routing keys and that canonicalized cost basis collides." + } + ], + "anti_patterns": [ + "Accessing r.db directly inside a method body instead of the tx-bound client from TransactingRepo.", + "Returning raw db.LedgerAccount / db.LedgerSubAccount entities instead of mapped Data structs.", + "Building route rows without Normalize() + BuildRoutingKey, breaking cost-basis canonical uniqueness.", + "Mapping a sub-account without WithRoute()/WithAccount() loaded, hitting the nil-edge error.", + "Implementing ensure as plain Create instead of OnConflict+ResolveWithIgnore, losing idempotency." + ], + "decisions": [ + { + "decision": "Routes are upserted independently of sub-accounts rather than being a dependent edge.", + "rationale": "Per subaccount.go comment: routes are shared/hidden internal rows; a standalone routes table reveals which currencies are held without sub-account grouping detail." + }, + { + "decision": "Cost basis is canonicalized through the routing key, not stored verbatim for uniqueness.", + "rationale": "Ensures 0.70 and 0.7 map to one sub-account/route, enforced both in BuildRoutingKey and the unique constraint (tested in TestRepo_SubAccountRouteUniquenessConstraints)." + } + ], + "code_examples": [ + { + "scenario": "Tx-aware ensure with upsert and re-query", + "code": "func (r *repo) EnsureSubAccount(ctx context.Context, input ledgeraccount.CreateSubAccountInput) (*ledgeraccount.SubAccountData, error) {\n\treturn entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgeraccount.SubAccountData, error) {\n\t\troute, err := tx.resolveOrCreateRoute(ctx, input)\n\t\tif err != nil { return nil, fmt.Errorf(\"failed to resolve route: %w\", err) }\n\t\terr = tx.db.LedgerSubAccount.Create().\n\t\t\tSetNamespace(input.Namespace).SetAccountID(input.AccountID).SetRouteID(route.ID).\n\t\t\tOnConflict(sql.ConflictColumns(dbledgersubaccount.FieldNamespace, dbledgersubaccount.FieldAccountID, dbledgersubaccount.FieldRouteID), sql.ResolveWithIgnore()).Exec(ctx)\n\t\tif err != nil { return nil, fmt.Errorf(\"failed to ensure ledger sub-account: %w\", err) }\n\t\treturn tx.GetSubAccountByID(ctx, models.NamespacedID{Namespace: input.Namespace, ID: route.ID})\n\t})\n}" + } + ] + }, + "openmeter/ledger/account/service": { + "purpose": "Service layer implementing ledger.account.Service over a ledgeraccount.Repo: validates inputs, maps Data structs into rich domain Account/SubAccount values, and provides advisory locking for posting. Single file service.go.", + "patterns": [ + { + "name": "Validate-then-delegate", + "description": "Mutating methods call input.Validate() first and return early on error before touching the repo.", + "example": "func (s *service) CreateAccount(ctx, input) { if err := input.Validate(); err != nil { return nil, err }; accData, err := s.repo.CreateAccount(ctx, input)... }" + }, + { + "name": "Data-to-domain mapping", + "description": "Repo returns *Data; service wraps each into a domain value via account.NewAccountFromData(data, s.live) or account.NewSubAccountFromData(data).", + "example": "return account.NewAccountFromData(*accData, s.live)" + }, + { + "name": "Self-wired live services", + "description": "New() sets svc.live = account.AccountLiveServices{SubAccountService: svc} so accounts can resolve sub-account posting addresses through the same service.", + "example": "svc.live = account.AccountLiveServices{SubAccountService: svc}; return svc" + }, + { + "name": "transaction.Run for multi-step writes", + "description": "EnsureSubAccount wraps repo call in transaction.Run(ctx, s.repo, ...) so the create-and-map sequence shares one tx.", + "example": "return transaction.Run(ctx, s.repo, func(ctx) (ledger.SubAccount, error) { ... })" + }, + { + "name": "Deterministic lock ordering", + "description": "LockAccountsForPosting dedupes by ID, sorts by (namespace, id), then LockForTX each, to avoid deadlocks; only customer FBO/Receivable/Accrued account types are locked.", + "example": "sort.Slice(ids, ...); key, _ := lockr.NewKey(\"namespace\", id.Namespace, \"account\", id.ID); s.locker.LockForTX(ctx, key)" + }, + { + "name": "Nil-locker tolerance", + "description": "LockAccountsForPosting returns nil immediately when s.locker is nil, so locking is optional dependency.", + "example": "if s.locker == nil { return nil }" + } + ], + "key_file_guides": [ + { + "file": "service.go", + "role": "Whole service: struct {repo, locker, live}, New constructor, account/sub-account CRUD, and LockAccountsForPosting.", + "watch_for": "Always pass s.live into NewAccountFromData; locking only covers customer FBO/Receivable/Accrued types and must keep the sorted-by-namespace-then-id order to stay deadlock-free." + } + ], + "anti_patterns": [ + "Skipping input.Validate() before delegating mutations to the repo.", + "Returning repo *Data structs directly instead of NewAccountFromData / NewSubAccountFromData domain values.", + "Forgetting to pass s.live to NewAccountFromData, breaking sub-account address resolution.", + "Locking accounts in arbitrary order, reintroducing deadlock risk.", + "Using slog.Default() or context.Background() instead of injected dependencies / propagated ctx." + ], + "decisions": [ + { + "decision": "SubAccountService is self-wired into AccountLiveServices inside New rather than injected.", + "rationale": "Account-specific route helpers need a concrete sub-account service to create posting addresses; the service is its own provider so no external wiring is required." + }, + { + "decision": "Posting locks are scoped to customer account types and ordered deterministically.", + "rationale": "Only customer FBO/Receivable/Accrued accounts participate in concurrent posting; sorted lock acquisition prevents deadlocks across concurrent transactions." + } + ], + "code_examples": [ + { + "scenario": "Constructor self-wiring live services and validate-then-delegate create", + "code": "func New(repo account.Repo, locker *lockr.Locker) account.Service {\n\tsvc := &service{repo: repo, locker: locker}\n\tsvc.live = account.AccountLiveServices{SubAccountService: svc}\n\treturn svc\n}\n\nfunc (s *service) CreateAccount(ctx context.Context, input ledger.CreateAccountInput) (ledger.Account, error) {\n\tif err := input.Validate(); err != nil { return nil, err }\n\taccData, err := s.repo.CreateAccount(ctx, input)\n\tif err != nil { return nil, fmt.Errorf(\"failed to create account: %w\", err) }\n\treturn account.NewAccountFromData(*accData, s.live)\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w98.json b/.archie/enrichments/w98.json new file mode 100644 index 0000000000..e6ef17b8c8 --- /dev/null +++ b/.archie/enrichments/w98.json @@ -0,0 +1,77 @@ +{ + "openmeter/ledger/breakage/adapter": { + "purpose": "Ent-backed persistence adapter for the ledger breakage sub-domain: it stores and queries durable `ledger_breakage_record` rows (plan/release/reopen/expired) that back the breakage service's open-amount accounting. It implements the `breakage.Adapter` interface declared in the parent package's types.go.", + "patterns": [ + { + "name": "Constructor returns the parent interface, not the concrete type", + "description": "New(Config) returns breakage.Adapter; Config carries only *entdb.Client and Config.Validate() rejects a nil client before constructing the unexported adapter struct.", + "example": "func New(config Config) (breakage.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client}, nil }" + }, + { + "name": "Transaction-aware repo wrapping on every method", + "description": "Each adapter method wraps its body in entutils.TransactingRepo (read/return) or TransactingRepoWithNoValue (CreateRecords), so the Ent client rebinds to any tx already carried in ctx. Tx/WithTx/Self implement the entutils transacting-repo contract via HijackTx and NewTxClientFromRawConfig.", + "example": "return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]breakage.Record, error) { ... tx.db.LedgerBreakageRecord.Query()... })" + }, + { + "name": "Validate inputs before touching the DB", + "description": "Methods call input.Validate()/input.CustomerID.Validate()/input.Currency.Validate() and guard required fields (AsOf.IsZero(), empty source-id slices) up front, returning early (nil,nil for no-op selectors) before opening a transaction.", + "example": "if input.AsOf.IsZero() { return nil, fmt.Errorf(\"as of is required\") }" + }, + { + "name": "Always filter DeletedAtIsNil and Namespace + CustomerID", + "description": "Every query scopes by NamespaceEQ + CustomerIDEQ + DeletedAtIsNil; breakage rows are soft-deleted and multi-tenant, so omitting any of these leaks cross-tenant or stale rows.", + "example": "dbledgerbreakagerecord.NamespaceEQ(...), dbledgerbreakagerecord.CustomerIDEQ(...), dbledgerbreakagerecord.DeletedAtIsNil()" + }, + { + "name": "ForUpdate() locking on contended selectors", + "description": "ListCandidateRecords, ListReleaseRecords (and its reopen follow-up query) call .ForUpdate() so concurrent collectors/corrections cannot double-release the same open amount; ListExpiredRecords intentionally does NOT lock.", + "example": "tx.db.LedgerBreakageRecord.Query().Where(...).Order(...).ForUpdate().All(ctx)" + }, + { + "name": "Centralized DB->domain mapping via mapRecordFromDB", + "description": "All rows are converted through mapRecordFromDB (and the mapRecords slice helper); new persisted columns must be added there AND in the CreateRecords builder chain or fields silently drop.", + "example": "out = append(out, mapRecordFromDB(row))" + }, + { + "name": "Bulk insert with SetNillable for optional FKs", + "description": "CreateRecords builds *LedgerBreakageRecordCreate per record and CreateBulk(...).Exec; optional source/plan/release pointers use SetNillable* setters, and empty input short-circuits to nil before Exec.", + "example": "create := tx.db.LedgerBreakageRecord.Create().SetID(...).SetNillableSourceEntryID(record.SourceEntryID)..." + } + ], + "key_file_guides": [ + { + "file": "adapter.go", + "role": "Defines Config (just *entdb.Client), New constructor, the unexported adapter struct, and the entutils transacting-repo plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self).", + "watch_for": "Tx hijacks a read-write tx (ReadOnly:false); WithTx rebuilds the client from the raw tx config \u2014 don't bypass these or TransactingRepo can't rebind to the caller's transaction." + }, + { + "file": "record.go", + "role": "All breakage.Adapter methods: CreateRecords (bulk insert), ListReleaseRecords (release+reopen rows, locked), ListExpiredRecords (expiry <= AsOf, unlocked), ListCandidateRecords (Plan/Release/Reopen kinds, expiry > AsOf, ordered by CreditPriority). Plus mapRecordFromDB/mapRecords.", + "watch_for": "Ordering matters: candidates order by CreditPriority asc then ExpiresAt asc; expired order DESC. ListReleaseRecords needs at least one of SourceEntryID/SourceTransactionGroupID or it returns (nil,nil). Reopen rows are fetched in a second query keyed by ReleaseIDIn(releaseIDs)." + } + ], + "anti_patterns": [ + "Returning the concrete *adapter from New instead of breakage.Adapter, or skipping Config.Validate().", + "Running Ent queries directly on a.db instead of through entutils.TransactingRepo(WithNoValue) \u2014 breaks transaction propagation from ctx.", + "Omitting DeletedAtIsNil / Namespace / CustomerID predicates, leaking soft-deleted or cross-tenant rows.", + "Dropping .ForUpdate() on candidate/release queries, allowing concurrent collectors to release the same open amount twice.", + "Adding a Record field without updating both the CreateRecords builder chain and mapRecordFromDB, silently losing the column." + ], + "decisions": [ + { + "decision": "Adapter persists only durable record rows; the ledger entries themselves live elsewhere.", + "rationale": "Per the parent service.go comment, breakage records are an accounting projection layered over the real ledger entries, so this adapter owns row CRUD/locking, not entry posting." + }, + { + "decision": "Locking is selective \u2014 write/contended selectors use ForUpdate, expiry read does not.", + "rationale": "Candidate and release computations must be serialized to avoid double-release, but expired-row reads are netted by the caller and don't need row locks." + } + ], + "code_examples": [ + { + "scenario": "A new Adapter list method scoped to a customer, transaction-aware and tenant-safe", + "code": "func (a *adapter) ListExpiredRecords(ctx context.Context, input breakage.ListExpiredRecordsInput) ([]breakage.Record, error) {\n\tif err := input.CustomerID.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"customer id: %w\", err)\n\t}\n\tif input.AsOf.IsZero() {\n\t\treturn nil, fmt.Errorf(\"as of is required\")\n\t}\n\treturn entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]breakage.Record, error) {\n\t\trows, err := tx.db.LedgerBreakageRecord.Query().\n\t\t\tWhere(\n\t\t\t\tdbledgerbreakagerecord.NamespaceEQ(input.CustomerID.Namespace),\n\t\t\t\tdbledgerbreakagerecord.CustomerIDEQ(input.CustomerID.ID),\n\t\t\t\tdbledgerbreakagerecord.DeletedAtIsNil(),\n\t\t\t\tdbledgerbreakagerecord.ExpiresAtLTE(input.AsOf),\n\t\t\t).All(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"list expired breakage records: %w\", err)\n\t\t}\n\t\treturn mapRecords(rows), nil\n\t})\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/enrichments/w99.json b/.archie/enrichments/w99.json new file mode 100644 index 0000000000..e7587b7c9b --- /dev/null +++ b/.archie/enrichments/w99.json @@ -0,0 +1,91 @@ +{ + "openmeter/ledger/historical/adapter": { + "purpose": "Ent/Postgres repository for the ledger's historical (append-only) double-entry model: books transactions and entries, reconstructs domain Transaction/TransactionGroup aggregates from rows, and runs sum/list queries over ledger entries. Implements ledgerhistorical.Repo and is the only place that reads/writes the ledger_transaction(_group), ledger_entry, ledger_sub_account(_route) tables for this domain.", + "patterns": [ + { + "name": "Implement ledgerhistorical.Repo on a private repo struct", + "description": "All persistence methods hang off `type repo struct { db *db.Client }` with a compile-time assertion `var _ ledgerhistorical.Repo = (*repo)(nil)`. Construct only via NewRepo(dbClient) which returns the interface, not the struct.", + "example": "func NewRepo(dbClient *db.Client) ledgerhistorical.Repo { return &repo{db: dbClient} }" + }, + { + "name": "Wrap every method body in entutils.TransactingRepo", + "description": "BookTransaction, CreateTransactionGroup, GetTransactionGroup, SumEntries, ListTransactions all execute inside entutils.TransactingRepo(ctx, r, func(ctx, tx *repo)...) so they rebind to any tx already in ctx. Use tx.db (not r.db) inside the closure.", + "example": "return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgerhistorical.Transaction, error) { entity, err := tx.db.LedgerTransaction.Create()... })" + }, + { + "name": "Reconstruct aggregates only via NewTransactionFromData / NewTransactionGroupFromData", + "description": "DB rows are never exposed as domain objects directly. Map ent edges into ledgerhistorical.EntryData/TransactionData and call the domain constructors (hydrateHistoricalTransaction does this for reads). Never hand-build a Transaction struct.", + "example": "ledgerhistorical.NewTransactionFromData(ledgerhistorical.TransactionData{ID: tx.ID, ...}, entryData)" + }, + { + "name": "Eager-load the full edge chain and assert presence with *OrErr", + "description": "Reads must WithEntries -> WithSubAccount -> WithAccount + WithRoute, ordered ByCreatedAt then ByID. Hydration accesses edges through SubAccountOrErr/AccountOrErr/RouteOrErr and returns a wrapped error if any edge is missing rather than nil-panicking.", + "example": "subAccount, err := entry.Edges.SubAccountOrErr(); if err != nil { return EntryData{}, fmt.Errorf(\"entry %s missing sub-account edge: %w\", entry.ID, err) }" + }, + { + "name": "Keyset (cursor) pagination via raw sql.Selector predicates", + "description": "ListTransactions orders by (BookedAt, CreatedAt, ID) and builds after/before cursor predicates as predicate.LedgerTransaction closures over *sql.Selector. Fetch Limit+1 to detect hasMore; Before pages are reversed with slices.Reverse and NextCursor is taken from the last returned item to avoid overlap on resume.", + "example": "query = query.Limit(input.Limit + 1); hasMore := len(dbItems) > input.Limit; if hasMore { dbItems = dbItems[:input.Limit] }" + }, + { + "name": "Build sum/filter predicates through sumEntriesQuery, normalizing Route first", + "description": "SumEntries delegates to sumEntriesQuery{query}.Build/entryPredicates/subAccountPredicates. Route filters call Filters.Route.Normalize() (returning ErrLedgerQueryInvalid on failure) and translate each optional field to Eq vs IsNil predicates (TaxCode, Features, CostBasis, TaxBehavior). Features arrays use pq.StringArray.", + "example": "normalizedRoute, err := b.query.Filters.Route.Normalize(); if err != nil { return nil, ledger.ErrLedgerQueryInvalid.WithAttrs(...) }" + }, + { + "name": "Sum aggregation via NullString scan, not Decimal directly", + "description": "SumEntries aggregates db.Sum(FieldAmount) AS sum_amount into a stdsql.NullString, returns alpacadecimal.NewFromInt(0) when no/invalid rows, otherwise alpacadecimal.NewFromString. Do not Scan a sum straight into a Decimal.", + "example": "var rows []struct{ SumAmount stdsql.NullString `json:\"sum_amount,omitempty\"` }; ...Aggregate(db.As(db.Sum(ledgerentrydb.FieldAmount), \"sum_amount\")).Scan(ctx, &rows)" + } + ], + "key_file_guides": [ + { + "file": "repo.go", + "role": "Defines the repo struct, NewRepo constructor, and the entutils.TxUser plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self).", + "watch_for": "Tx uses TxOptions{ReadOnly: false}; WithTx must rebuild db from the raw tx config or transactions silently won't propagate. Keep the `var _ entutils.TxUser[*repo]` and `var _ ledgerhistorical.Repo` assertions intact." + }, + { + "file": "ledger.go", + "role": "All Repo methods (BookTransaction, CreateTransactionGroup, GetTransactionGroup, SumEntries, ListTransactions) plus hydrateHistoricalTransaction and the cursor predicate helpers.", + "watch_for": "BookTransaction precomputes route/account-type maps keyed by SubAccountID because CreateBulk-returned entries lack edges; if you add entry fields, populate them in BOTH the post-insert mapping and hydrateHistoricalTransaction. nil input must return ledger.ErrTransactionInputRequired." + }, + { + "file": "sumentries_query.go", + "role": "sumEntriesQuery builder translating ledger.Query.Filters into LedgerEntry predicates (Build for ent query, SQL for raw shape).", + "watch_for": "BookedAtPeriod uses GTE/LT (half-open), AsOf uses BookedAtLTE, and the After cursor predicate uses LTE on ID (inclusive tail) \u2014 different from ListTransactions' strict-LT cursor. Optional Route fields must emit *IsNil predicates when the option is present-but-empty." + }, + { + "file": "ledger_test.go", + "role": "Integration tests (NewTestEnv/DBSchemaMigrate against real Postgres) covering booking, group hydration, tax-behavior preservation, and forward/Before cursor pagination without overlap.", + "watch_for": "Tests use transactionstestutils.AnyEntryInput and env.createSubAccount/createSubAccountOfType helpers; sleeps separate transactions so CreatedAt ordering is deterministic. Requires POSTGRES_HOST set or the suite skips." + } + ], + "anti_patterns": [ + "Using r.db inside a method body instead of the tx-bound tx.db from the TransactingRepo closure \u2014 bypasses the active transaction.", + "Returning ent rows or constructing ledgerhistorical.Transaction by hand instead of going through NewTransactionFromData / NewTransactionGroupFromData.", + "Accessing entry/sub-account/account/route edges without eager-loading them or without the *OrErr presence checks, causing nil-pointer panics.", + "Adding a new persisted entry/route field without updating both BookTransaction's per-SubAccountID maps and hydrateHistoricalTransaction.", + "Skipping Route.Normalize() (and its ErrLedgerQueryInvalid path) or omitting *IsNil predicates when filtering optional route fields, silently widening result sets." + ], + "decisions": [ + { + "decision": "Reconstruct domain aggregates from a separate *Data DTO layer rather than mapping ent rows directly.", + "rationale": "Keeps the historical/append-only invariants (entry balancing, route identity) enforced by the domain constructors in one place, independent of how rows were loaded or just-inserted." + }, + { + "decision": "BookTransaction caches AccountType/Route/RouteKey by SubAccountID before CreateBulk.", + "rationale": "CreateBulk returns entries without their sub-account/account/route edges, so the view must be assembled from inputs to avoid an extra eager-load round trip." + }, + { + "decision": "Cursor pagination over (BookedAt, CreatedAt, ID) with Limit+1 and Before-page reversal.", + "rationale": "Gives stable keyset ordering across booking-time ties and lets NextCursor from a Before page resume forward paging without re-emitting the page tail (verified by TestRepo_ListTransactions_BeforeNextCursorResumesWithoutOverlap)." + } + ], + "code_examples": [ + { + "scenario": "Transaction-aware read that eager-loads the edge chain and rebuilds the domain aggregate", + "code": "func (r *repo) GetTransactionGroup(ctx context.Context, id models.NamespacedID) (*ledgerhistorical.TransactionGroup, error) {\n return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgerhistorical.TransactionGroup, error) {\n entity, err := tx.db.LedgerTransactionGroup.Query().\n Where(ledgertransactiongroupdb.Namespace(id.Namespace), ledgertransactiongroupdb.ID(id.ID)).\n WithTransactions(func(q *db.LedgerTransactionQuery) {\n q.Order(ledgertransactiondb.ByCreatedAt(), ledgertransactiondb.ByID())\n q.WithEntries(func(eq *db.LedgerEntryQuery) {\n eq.Order(ledgerentrydb.ByCreatedAt(), ledgerentrydb.ByID())\n eq.WithSubAccount(func(sq *db.LedgerSubAccountQuery) { sq.WithAccount(); sq.WithRoute() })\n })\n }).Only(ctx)\n if err != nil {\n return nil, fmt.Errorf(\"failed to query transaction group: %w\", err)\n }\n transactions, err := slicesx.MapWithErr(entity.Edges.Transactions, hydrateHistoricalTransaction)\n if err != nil {\n return nil, fmt.Errorf(\"failed to hydrate transaction group transactions: %w\", err)\n }\n return ledgerhistorical.NewTransactionGroupFromData(ledgerhistorical.TransactionGroupData{ID: entity.ID, Namespace: entity.Namespace, CreatedAt: entity.CreatedAt, Annotations: entity.Annotations}, transactions), nil\n })\n}" + } + ] + } +} \ No newline at end of file diff --git a/.archie/findings.json b/.archie/findings.json new file mode 100644 index 0000000000..6fe80cc89f --- /dev/null +++ b/.archie/findings.json @@ -0,0 +1,564 @@ +{ + "findings": [ + { + "id": "f_0001", + "problem_statement": "Charges adapter helpers that accept a raw *entdb.Client can silently bypass the transaction already carried in ctx, producing partial writes during charge advancement.", + "evidence": [ + "AGENTS.md mandates: 'In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware even in shared helper functions.'", + "openmeter/billing/charges/adapter/adapter.go:47 - the adapter struct holds a raw `db *entdb.Client`; adapter.go:52 a.db.HijackTx(ctx, ...) confirms the raw client.", + "openmeter/billing/charges/service.go exposes Create / AdvanceCharges / ApplyPatches that drive multi-step writes mixed with reads and lockr advisory locks.", + "pkg/framework/entutils/transaction.go: TransactingRepo reads *TxDriver from ctx via GetDriverFromContext; absence yields repo.Self() (non-tx client) with no error.", + "openmeter/billing/charges/adapter/CLAUDE.md: 'Never pass a.db directly to a helper - always go through a tx *adapter inside TransactingRepo.'" + ], + "triggering_call_site": "openmeter/billing/charges/adapter/adapter.go:52\n\ttxCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{", + "root_cause": "Stems from the 'entutils.TransactingRepo context-propagated Ent transactions' pattern: Ent transactions propagate implicitly through ctx, and TransactingRepo gracefully degrades to repo.Self() (non-tx client) when no *TxDriver is in ctx, returning no error - so a helper that touches a.db. without the wrapper falls off the outer transaction undetectably at compile time. Charges advancement (charges.Service.AdvanceCharges/ApplyPatches) orchestrates many helpers across multi-step writes, so a single missing wrapper yields partially-applied state under concurrency. This is the structural class captured by pf_0001.", + "fix_direction": [ + "Audit every helper under openmeter/billing/charges/**/adapter that accepts *entdb.Client or that touches a.db directly without going through tx *adapter inside a TransactingRepo callback.", + "Wrap each helper body with entutils.TransactingRepo or TransactingRepoWithNoValue so it rebinds to any ctx-bound tx.", + "Add a custom golangci-lint analyzer or grep CI check that flags adapter methods using a.db. without TransactingRepo on the call stack.", + "Add an integration test that opens a transaction, calls each public charges.Service method, and asserts atomic commit/rollback.", + "Codify the rule as a checklist item in the /charges skill and PR review template." + ], + "severity": "error", + "confidence": 0.9, + "applies_to": [ + "openmeter/billing/charges/adapter", + "openmeter/billing/charges", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/creditpurchase/adapter" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0001", + "first_seen": "2026-04-24", + "confirmed_in_scan": 5, + "status": "demoted", + "verdict_history": [ + "demote", + "demote" + ], + "last_verdict_reason": "Line 52 is the correct Tx() method implementing the TxCreator interface; it properly hijacks transactions and is not a helper bypassing the pattern. The risk class (helpers accepting *entdb.Client without TransactingRepo wrapping) is real and documented in enforcement rules, but the triggering call site cited is the transaction creation mechanism itself, not an instance of the violation.", + "last_verdict_confidence": 0.85, + "demoted_at": "2026-06-02T1934" + }, + { + "id": "f_0002", + "problem_statement": "Credits-disabled deployments can still perform real ledger writes if any of the four independent wiring layers forgets to guard on credits.enabled.", + "evidence": [ + "AGENTS.md: 'credits.enabled needs explicit guarding at multiple layers: ledger-backed customer credit handlers in api/v3/server, customer ledger hooks, and namespace/default-account provisioning are wired separately.'", + "app/common/ledger.go NewLedgerAccountService returns ledgernoop.AccountService{} when !creditsConfig.Enabled; NewLedgerHistoricalLedger, NewLedgerResolversService, NewLedgerNamespaceHandler each independently check creditsConfig.Enabled.", + "app/common/customer.go NewCustomerLedgerServiceHook returns ledgerresolvers.NoopCustomerLedgerHook{} - a separate guard.", + "app/common/billing.go NewBillingRegistry skips newChargesRegistry entirely when !creditsConfig.Enabled.", + "api/v3/server/routes.go:372-435 - every credits handler (GetCustomerCreditBalance, ListCreditGrants, CreateCreditGrant, ...) short-circuits to unimplemented when !s.Credits.Enabled, a fifth independent guard layer at the HTTP surface.", + "openmeter/ledger/account and openmeter/ledger historical writers expose write paths that any unguarded provider could invoke." + ], + "triggering_call_site": "app/common/billing.go (NewBillingRegistry)\n\tif !creditsConfig.Enabled {\n\t\t// ChargesRegistry is skipped entirely - any new ledger-touching provider added outside this branch re-enables writes", + "root_cause": "Stems from the 'credits.enabled feature flag enforced at four independent wiring layers via noop implementations' decision: the credits feature cross-cuts unrelated call graphs (HTTP handlers in api/v3/server/routes.go, customer hooks, namespace provisioning, charge creation) and no single Wire injection point dominates all paths reaching ledger writes, so the architecture uses fan-out noop guards (each provider independently checks creditsConfig.Enabled). Because Wire models types not policy, a new ledger-touching provider added without an explicit creditsConfig.Enabled branch compiles and silently re-enables ledger writes for credits-disabled tenants. This is the class captured by pf_0002; all current guards exist, so it is a decay risk rather than a present bug.", + "fix_direction": [ + "Enumerate every Wire provider that injects ledger.Ledger, ledger.AccountResolver, ledgeraccount.Service, or any historical ledger writer; verify each has a creditsConfig.Enabled branch returning a noop type.", + "Map every call site that writes to ledger_accounts or ledger_customer_accounts; verify the call path traces back to a guarded provider.", + "Add an integration test that boots with credits.enabled=false, drives representative customer/subscription/invoice/charge flows, and asserts SELECT count(*) FROM ledger_accounts and ledger_customer_accounts both equal zero.", + "Add a Wire provider unit test that constructs all noop layers when credits.enabled=false and asserts each interface satisfies the corresponding noop type.", + "Treat the credits guard as a P0 review item for any new provider that writes to ledger; codify in PR template." + ], + "severity": "error", + "confidence": 0.9, + "applies_to": [ + "app/common/ledger.go", + "app/common/customer.go", + "app/common/billing.go", + "api/v3/server", + "openmeter/customer", + "openmeter/namespace", + "openmeter/ledger" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0002", + "first_seen": "2026-04-24", + "confirmed_in_scan": 5, + "status": "demoted", + "verdict_history": [ + "demote" + ], + "last_verdict_reason": "The finding accurately describes a real architectural fragility (fan-out noop guards without central compile-time enforcement), and this pattern is documented in enforcement rules as a pitfall. However, the CURRENT codebase has all guards properly implemented across app/common/ledger.go, app/common/customer.go, app/common/billing.go and api/v3/server/routes.go. The finding describes a future risk (if a NEW ledger-touching provider forgets the guard) rather than a current bug.", + "last_verdict_confidence": 0.7, + "demoted_at": "2026-05-14T1947" + }, + { + "id": "f_0003", + "problem_statement": "Notification event payload versioning is implicit; payload version constants live alongside producing event packages while the consumer dispatches by ce_type prefix only, creating silent compatibility risk.", + "evidence": [ + "openmeter/watermill/eventbus/eventbus.go GeneratePublishTopic routes only by EventVersionSubsystem prefix.", + "openmeter/watermill/grouphandler/grouphandler.go:54 silently returns nil for an unknown ce_type - a producer that bumps an event version while the consumer is not yet updated will look like 'no events received'.", + "AGENTS.md references a /notification skill that explicitly covers 'payload versioning' as a concern.", + "openmeter/notification/consumer subscribes to system events and dispatches to Svix; producers in openmeter/billing/worker and openmeter/entitlement/balanceworker emit independently." + ], + "triggering_call_site": "openmeter/watermill/grouphandler/grouphandler.go:54\n\t\treturn nil", + "root_cause": "Stems from the 'NoPublishingHandler silent-drop dispatch by CloudEvents ce_type' pattern: payload schema version is encoded as constants inside emitter packages rather than derived from the TypeSpec/OpenAPI contract, and grouphandler.go returns nil for any ce_type not in typeHandlerMap - the same code path used for forward-compatible ignoring during rolling deploys. So a known-event/unknown-version mismatch is indistinguishable from an intentionally-ignored event and surfaces only as an absence of deliveries, not an error or DLQ entry. This is the class captured by pf_0007.", + "fix_direction": [ + "Catalog every payload version constant in openmeter/notification and its producer packages.", + "Pin webhook payload versions to TypeSpec models where possible so SDK consumers receive a stable shape.", + "Add a contract test per event family that round-trips through the marshaler and asserts the Svix payload schema matches the TypeSpec-generated webhook model.", + "Distinguish 'unknown event type' (silent drop) from 'known event type, unknown version' (DLQ) inside grouphandler so a version mismatch is observable.", + "Document the recognised EventVersionSubsystem prefixes and payload version pinning policy in openmeter/watermill/eventbus/CLAUDE.md." + ], + "severity": "warn", + "confidence": 0.75, + "applies_to": [ + "openmeter/notification", + "openmeter/notification/consumer", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0007", + "first_seen": "2026-04-24", + "confirmed_in_scan": 7, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The triggering call site exists: grouphandler.go:54 returns nil (ACK + discard) when eventName has no registered handler; the codebase does use EventVersionSubsystem prefixes for versioning and independent producers (billing/worker, entitlement/balanceworker) emit events asynchronously; AGENTS.md confirms a /notification skill addresses payload versioning, indicating this is a known concern. The pattern enables silent message loss on version mismatch during rolling deploys or concurrent version increments, but without seeing actual event type definitions and version schemes, confidence is medium-high rather than absolute.", + "last_verdict_confidence": 0.75 + }, + { + "id": "f_0004", + "problem_statement": "Sequential timestamped Atlas migrations plus atlas.sum chain hashing produces predictable merge conflicts on long-running feature branches.", + "evidence": [ + "AGENTS.md documents the migration flow: 'atlas migrate --env local diff ' writes to tools/migrate/migrations/ and updates atlas.sum.", + "AGENTS.md references a /rebase skill that handles 'sequential migrations, atlas.sum conflicts, Ent regeneration'.", + "atlas.hcl pins schema source to ent://openmeter/ent/schema and migrations dir to file://tools/migrate/migrations.", + "The atlas.sum file is a linear hash chain over migration files; two branches both appending migrations cannot merge cleanly by construction." + ], + "triggering_call_site": "tools/migrate/migrations/atlas.sum:1\nh1: // linear hash chain - any two branches appending migrations diverge here", + "root_cause": "Stems from the 'Ent ORM + Atlas migrations' decision: atlas.sum chain hashing enforces deterministic linear migration order, so concurrent branch development that adds migrations collides at the chain hash by design. The trade-off (deterministic, reviewable order) is intentional but creates merge friction proportional to branch lifetime; this is the class captured by pf_0004.", + "fix_direction": [ + "On rebase, delete the branch's migration files and its atlas.sum lines.", + "Re-run `make generate` (Ent) then `atlas migrate --env local diff ` to regenerate the migration against the rebased schema.", + "Follow the /rebase skill checklist documented in AGENTS.md to keep atlas.sum integrity.", + "Document a 'merge later, regenerate first' policy for any branch with schema changes that takes more than one day to land.", + "For long-lived branches with schema changes, rebase daily to minimise the cost of regeneration." + ], + "severity": "warn", + "confidence": 0.95, + "applies_to": [ + "tools/migrate/migrations", + "openmeter/ent/schema" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0004", + "first_seen": "2026-04-24", + "confirmed_in_scan": 5, + "status": "demoted", + "verdict_history": [ + "demote", + "keep" + ], + "last_verdict_reason": "The cited atlas.sum linear hash chain and sequential timestamped migration mechanism are real and correctly described, but this is an intentional architectural trade-off documented in AGENTS.md (decision chain), pitfalls.md (pf_0004), and enforcement/misc.md (migration-001), with explicit mitigation via the /rebase skill - not a bug to fix but a managed characteristic requiring procedural mitigation on long-running branches.", + "last_verdict_confidence": 0.92, + "demoted_at": "2026-06-02T1934" + }, + { + "id": "f_0005", + "problem_statement": "context.Background() inside the v1 OapiRequestValidatorWithOptions ErrorHandler severs request-scoped context (request-id, OTel span) from every v1 validation-failure RFC 7807 response, violating the project context-propagation rule.", + "evidence": [ + "AGENTS.md: 'Do not introduce context.Background() or context.TODO() to sidestep missing context propagation in application code.'", + "openmeter/server/server.go:222-223 ErrorHandler closure substitutes context.Background() inside the v1 OapiRequestValidatorWithOptions ErrorHandler, severing request-scoped context from the RFC 7807 problem response.", + "models.NewStatusProblem reads request-id from Chi middleware context via middleware.GetReqID, so a background context drops the request-id from every v1 validation error.", + "The kin-openapi ErrorHandler signature is func(w http.ResponseWriter, message string, statusCode int) - it omits *http.Request, leaving no caller ctx in scope." + ], + "triggering_call_site": "openmeter/server/server.go:222\n\t\t\t\tErrorHandler: func(w http.ResponseWriter, message string, statusCode int) {\n\t\t\t\t\tmodels.NewStatusProblem(context.Background(), errors.New(message), statusCode).Respond(w)", + "root_cause": "Stems from the 'httptransport decode/operate/encode pipeline' pattern colliding with the dual-API-surface decision (separate v1 kin-openapi vs v3 oasmiddleware validation): the kin-openapi ErrorHandler callback signature carries no *http.Request, so the engineer reaches for context.Background() rather than the request ctx, and models.NewStatusProblem then cannot read the Chi request-id or trace span - every v1 validation-failure response loses correlation. This is the response-path instance of the context.Background() anti-pattern class pf_0008.", + "fix_direction": [ + "Grep for context.Background() and context.TODO() in openmeter/, app/common/, and api/v3/handlers/ excluding main() and Shutdown handlers.", + "For openmeter/server/server.go:222, capture *http.Request in the validation middleware closure (the OapiRequestValidatorWithOptions middleware does have access to r) and thread r.Context() into NewStatusProblem.", + "Plumb the caller's ctx through every other call site; if ctx is truly unused, remove the parameter.", + "In tests, replace context.Background() with t.Context() where a *testing.T is available.", + "Add a golangci-lint rule that flags new context.Background()/context.TODO() outside main() and Shutdown handlers." + ], + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "openmeter/server/server.go", + "openmeter/", + "app/common/", + "api/v3/handlers/" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0008", + "first_seen": "2026-04-24", + "confirmed_in_scan": 7, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The quoted code at openmeter/server/server.go:222 exists and truly uses context.Background() in the oapimiddleware ErrorHandler callback, severing request-scoped context (request-id, OTel span) from OpenAPI validation-failure RFC 7807 responses; the library's ErrorHandler signature precludes passing the request, making this a real violation of the context-propagation rule, though fixing it would require either wrapping the middleware or switching validation error handling.", + "last_verdict_confidence": 0.95 + }, + { + "id": "f_0006", + "problem_statement": "cmd/server is the only binary that registers namespace.Handler implementations (Ledger, KafkaIngest); other binaries that perform namespace-scoped provisioning assume the default namespace already exists and crash on startup if cmd/server has not provisioned it first.", + "evidence": [ + "cmd/server/main.go registers app.LedgerNamespaceHandler then app.KafkaIngestNamespaceHandler before initNamespace; this order is documented as load-bearing in cmd/server/CLAUDE.md.", + "cmd/server/CLAUDE.md: 'cmd/server is the only binary that registers namespace handlers; other workers don't register Kafka ingest or ledger namespace handlers.'", + "cmd/billing-worker/main.go:86 calls app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace()) but assumes the namespace itself already exists.", + "openmeter/namespace/namespace.go createNamespace fans out to handlers and joins with errors.Join (no short-circuit); RegisterHandler must run before CreateDefaultNamespace but this is enforced nowhere." + ], + "triggering_call_site": "cmd/billing-worker/main.go:86\n\t_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace())", + "root_cause": "Stems from the 'Namespace Manager fan-out provisioning with cmd/server as the sole handler registrant' decision combined with the multi-binary architecture that each binary self-provisions only what it owns. There is no cross-binary contract preventing billing-worker/balance-worker from deploying before cmd/server; namespace.Manager.createNamespace uses errors.Join with no short-circuit, so partial provisioning in cmd/server does not necessarily block its startup either. The shared cross-binary class is captured by pf_0006a.", + "fix_direction": [ + "Document the deploy ordering invariant explicitly in deploy/charts/openmeter (init container or hook-weight ordering ensuring cmd/server runs first).", + "Add a startup check in cmd/billing-worker / cmd/balance-worker that verifies the default namespace exists; if not, fail fast with an actionable error.", + "Consider hoisting namespace.Handler registration into a shared post-Migrate provisioning function that all binaries with the matching role can call with idempotent semantics.", + "Add a smoke integration test that boots all four worker binaries against an empty database and asserts the default namespace materialises before any worker accepts events." + ], + "severity": "warn", + "confidence": 0.7, + "applies_to": [ + "cmd/server", + "cmd/billing-worker", + "cmd/balance-worker", + "openmeter/namespace", + "deploy/charts/openmeter" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0006a", + "first_seen": "2026-04-28", + "confirmed_in_scan": 6, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The quoted call site exists at cmd/billing-worker/main.go:81-87; billing-worker calls EnsureBusinessAccounts without registering any namespace handlers (unlike cmd/server which registers LedgerNamespaceHandler/KafkaIngestNamespaceHandler before initNamespace), creating an unguarded startup dependency: if billing-worker starts before cmd/server has provisioned the default namespace via handlers, the call will fail trying to access uninitialized namespace-specific ledger state.", + "last_verdict_confidence": 0.88 + }, + { + "id": "f_0007", + "problem_statement": "Wire-generated provider sets concentrate cross-domain hook registration as side-effects inside provider functions, making the runtime hook graph invisible at compile time and easy to break by omitting a hook provider from a binary's wire.Build.", + "evidence": [ + "app/common/billing.go NewBillingRegistry registers customerService.RegisterRequestValidator(validator) and subscriptionServices.Service.RegisterHook(subscriptionValidator) as side-effects of construction.", + "app/common/customer.go:73 NewCustomerLedgerServiceHook calls customerService.RegisterHooks(h) inside the provider; same pattern in NewCustomerSubjectServiceHook and NewCustomerEntitlementValidatorServiceHook.", + "If Wire's composition for a binary builds customer.Service without also including these hook providers, the side-effect registration silently never runs and no compile error fires.", + "cmd/billing-worker uses common.BillingWorker as a composite set; the actual hook list each binary registers depends entirely on which composite set is included." + ], + "triggering_call_site": "app/common/customer.go:73\n\tcustomerService.RegisterHooks(h)", + "root_cause": "Stems from the 'Google Wire DI with app/common provider sets and cross-domain hooks registered as construction side-effects' decision and the 'ServiceHook Registry for cross-domain lifecycle callbacks' pattern: hooks are registered as a construction side-effect inside provider functions (RegisterHooks/RegisterRequestValidator) specifically to break circular imports between billing/customer/subscription/ledger. Wire models type satisfaction only, not side-effects, so a binary whose wire.Build omits a hook provider builds cleanly and ships with the hook silently absent - and the provider runs only if some other dependency transitively needs its output type. This is the class captured by pf_0006.", + "fix_direction": [ + "Audit each binary's wire.go to confirm every relevant Customer hook (subject, ledger, entitlement) and Subscription hook (billing validator) is included.", + "Add an integration smoke test per binary that asserts the registered hook count matches the expected set.", + "Promote hook bundles into named registries (CustomerHookRegistry) so a missing registry is a compile error rather than a silent omission.", + "Document the expected hook list per binary in cmd//CLAUDE.md.", + "Consider migrating to an explicit-registration pattern where main.go calls customerService.RegisterHooks(app.CustomerHooks...)." + ], + "severity": "warn", + "confidence": 0.7, + "applies_to": [ + "app/common/billing.go", + "app/common/customer.go", + "app/common/openmeter_server.go", + "app/common/openmeter_billingworker.go", + "app/common/openmeter_balanceworker.go" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0006", + "first_seen": "2026-04-28", + "confirmed_in_scan": 6, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "Hook providers (NewCustomerLedgerServiceHook, NewCustomerSubjectServiceHook, NewCustomerEntitlementValidatorServiceHook) call RegisterHooks as side-effects within their construction, but are not included in the Customer wire.NewSet and have no other transitive dependents visible; Wire will not instantiate them unless explicitly required by another provider, silently skipping hook registration with no compile error if they are omitted from a binary's wire.Build.", + "last_verdict_confidence": 0.85 + }, + { + "id": "f_0008", + "problem_statement": "openmeter/watermill/eventbus uses a string-prefix switch on EventName() to route events to one of three Kafka topics; a new event family that forgets to declare a unique EventVersionSubsystem prefix silently routes to SystemEventsTopic instead of failing fast.", + "evidence": [ + "openmeter/watermill/eventbus/eventbus.go:142 GeneratePublishTopic switch defaults to opts.TopicMapping.SystemEventsTopic for any event whose EventName does not start with ingestVersionSubsystemPrefix or balanceWorkerVersionSubsystemPrefix.", + "openmeter/watermill/eventbus/CLAUDE.md: 'Defining event names without an EventVersionSubsystem constant - the prefix match in GeneratePublishTopic will default to SystemEventsTopic silently.'", + "openmeter/watermill/CLAUDE.md: 'New events must have EventName() starting with a recognised subsystem prefix; otherwise they silently route to SystemEventsTopic.'" + ], + "triggering_call_site": "openmeter/watermill/eventbus/eventbus.go:142\n\t\t\tdefault:\n\t\t\t\treturn opts.TopicMapping.SystemEventsTopic, nil", + "root_cause": "Stems from the 'Kafka + Watermill async backbone with three name-prefix-routed topics' decision: GeneratePublishTopic routes by EventName() prefix and the default case (eventbus.go:142) returns SystemEventsTopic as the catch-all for genuine system events. This makes a misnamed event family or a missing EventVersionSubsystem constant indistinguishable from an intentional system event, so misrouted events bypass the topic isolation that ingest and balance-worker scaling depend on - structurally fragile against typos. This is the class captured by pf_0005.", + "fix_direction": [ + "Replace the default-case fallback with an explicit registry of recognised EventVersionSubsystem prefixes; an unknown prefix should return an error from GeneratePublishTopic.", + "Add a unit test that scans all marshaler.Event implementations in the codebase and asserts each EventName starts with a registered prefix.", + "Promote the SystemEvents subsystem to an explicit constant so the default-case is only hit when the event explicitly declares 'system' subsystem.", + "Document the recognised subsystem prefixes in openmeter/watermill/eventbus as public constants." + ], + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "openmeter/watermill/eventbus", + "openmeter/watermill" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0005", + "first_seen": "2026-04-28", + "confirmed_in_scan": 5, + "status": "demoted", + "verdict_history": [ + "demote", + "demote", + "keep" + ], + "last_verdict_reason": "The quoted code exists and the default case is present, but the failure mode is latent, not current: only two known subsystems (ingest, balance-worker) are checked and both route correctly; the default routing to SystemEventsTopic appears intentional for true system events. The finding describes a future risk ('a new event family that forgets'), not a current misrouting of existing events. This is an architectural pitfall for future extensions, not an active finding.", + "last_verdict_confidence": 0.85, + "demoted_at": "2026-06-05T1341" + }, + { + "id": "f_0009", + "problem_statement": "openmeter/app/stripe/client/appclient.go performs a ledger-relevant write (UpdateAppStatus) with context.Background() from inside providerError, a code path reached on every Stripe 401, severing cancellation, OTel spans, and the ctx-bound Ent transaction from a request-triggered mutation.", + "evidence": [ + "openmeter/app/stripe/client/appclient.go:240 calls c.appService.UpdateAppStatus(context.Background(), app.UpdateAppStatusInput{...}) inside the http.StatusUnauthorized branch of providerError.", + "providerError(err error) at appclient.go:227 takes no context.Context parameter, so there is no caller ctx available to thread through.", + "AGENTS.md: 'Do not introduce context.Background() or context.TODO() to sidestep missing context propagation in application code.'", + "providerError is invoked from Stripe API call wrappers that run inside request-scoped and Watermill-handler-scoped contexts, all of which carry trace spans and may carry an Ent transaction." + ], + "triggering_call_site": "openmeter/app/stripe/client/appclient.go:240\n\t\t\terr = c.appService.UpdateAppStatus(context.Background(), app.UpdateAppStatusInput{\n\t\t\t\tID: c.appID,\n\t\t\t\tStatus: status,\n\t\t\t})", + "root_cause": "Stems from the context-propagation rule (AGENTS.md) interacting with the 'Ent ORM + Atlas migrations with context-propagated transactions' decision: stripeAppClient.providerError carries no context.Context parameter, so when it persists an app-status change it falls back to context.Background(); because UpdateAppStatus runs through the app service's Ent adapter, the write executes outside the caller's transaction and trace, and a write triggered by an already-cancelled request still proceeds. This is the write-path instance of the context.Background() anti-pattern class pf_0008 (sibling to f_0005's response-path instance).", + "fix_direction": [ + "Add a context.Context parameter to stripeAppClient.providerError and thread the caller's ctx from every Stripe API call wrapper that invokes it.", + "Pass that ctx into c.appService.UpdateAppStatus so the write participates in the caller's transaction and trace.", + "Audit other openmeter/app/stripe/client helpers for the same no-ctx-parameter shape and add ctx parameters where a service call is made.", + "Add a golangci-lint rule flagging context.Background() in openmeter/app/** outside constructors and main()." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/app/stripe/client", + "openmeter/app/stripe" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0008", + "first_seen": "2026-05-14T1935", + "confirmed_in_scan": 4, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The quoted code at line 240 exists exactly as cited. providerError() receives no context parameter, so UpdateAppStatus gets context.Background() on every Stripe 401, severing cancellation and trace propagation from the caller's request context. All callers (DeleteWebhook, GetAccount, GetPaymentMethod) receive ctx but cannot pass it through because providerError() takes no context parameter. This is a real violation of the AGENTS.md rule against context.Background() sidesteps, and the failure mode (writes executing outside the caller's transaction/trace/cancellation) is genuine.", + "last_verdict_confidence": 0.95 + }, + { + "id": "f_0010", + "problem_statement": "cmd/billing-worker calls EnsureBusinessAccounts and SandboxProvisioner directly in main.go after Migrate, but unlike cmd/server it never registers any namespace.Handler, so the ledger and Kafka-ingest subsystems are not provisioned for any namespace this worker might be the first to observe.", + "evidence": [ + "cmd/billing-worker/main.go:81 calls app.Migrate(ctx), then main.go:86 calls app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace()), then main.go:93 calls app.AppRegistry.SandboxProvisioner(ctx, ...), then main.go:99 app.Run().", + "cmd/server/CLAUDE.md: 'cmd/server is the only binary that registers namespace handlers; other workers don't register Kafka ingest or ledger namespace handlers.'", + "openmeter/namespace/namespace.go documents that Handlers must be registered before CreateDefaultNamespace; cmd/billing-worker/main.go never calls RegisterHandler.", + "EnsureBusinessAccounts at main.go:86 assumes GetDefaultNamespace() already returns a provisioned namespace - it provisions ledger business accounts but not the namespace's per-subsystem resources." + ], + "triggering_call_site": "cmd/billing-worker/main.go:86\n\t_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace())", + "root_cause": "Stems from the 'Namespace Manager fan-out provisioning with cmd/server as the sole handler registrant' decision: cmd/billing-worker still performs namespace-scoped provisioning (EnsureBusinessAccounts, SandboxProvisioner) inline in main.go without ever calling NamespaceManager.RegisterHandler, creating an implicit cross-binary ordering contract (cmd/server must fully provision the default namespace first) enforced nowhere in code or the Helm chart. If billing-worker boots first against a fresh database, EnsureBusinessAccounts runs against a namespace whose ledger/ingest handlers never ran. Shared cross-binary class pf_0006a.", + "fix_direction": [ + "Add an explicit precondition check at the top of cmd/billing-worker startup that the default namespace exists and its subsystems are provisioned; fail fast with an actionable error if not.", + "Encode the cmd/server-before-workers ordering in deploy/charts/openmeter via init containers or Helm hook weights.", + "Extract the post-Migrate provisioning sequence into a shared idempotent function so any binary that needs it runs the same handler-registration + provisioning path.", + "Add a boot-order integration test covering billing-worker starting against an empty database." + ], + "severity": "warn", + "confidence": 0.7, + "applies_to": [ + "cmd/billing-worker", + "cmd/server", + "openmeter/namespace", + "openmeter/ledger", + "deploy/charts/openmeter" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0006a", + "first_seen": "2026-05-14T1935", + "confirmed_in_scan": 4, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The quoted code exists exactly as cited; cmd/billing-worker calls EnsureBusinessAccounts and SandboxProvisioner in main.go:86 and main.go:93 without registering namespace handlers, creating an undocumented implicit ordering dependency on cmd/server running first, which is not enforced in code or validated at deployment time.", + "last_verdict_confidence": 0.88 + }, + { + "id": "f_0011", + "problem_statement": "The wired v3 customers list endpoint exposes case-insensitive contains filters on name/primary_email/key that compile to leading-wildcard ILIKE, but the customers table carries only plain btree indexes on those columns, so every filtered list request runs a full sequential scan plus a second COUNT(*) sequential scan.", + "evidence": [ + "openmeter/ent/schema/customer.go:42-55 TODO(DoS hardening) documents the issue verbatim: the v3 filter API exposes contains/ocontains on name, primary_email, key; these compile to ILIKE '%value%' (leading wildcard) which cannot use the btree indexes below; every request runs a full seq scan plus the COUNT(*) from query.Paginate, and pg_trgm GIN indexes are needed before exposing the v3 list handler.", + "openmeter/ent/schema/customer.go declares only index.Fields(\"name\") and index.Fields(\"primary_email\") - plain btree, no pg_trgm GIN.", + "pkg/filter/filter.go ContainsPattern builds the leading-wildcard pattern fmt.Sprintf(\"%%%s%%\", ...) and maps $contains to sql.FieldContainsFold (ILIKE).", + "openmeter/customer/adapter/customer.go:59 applies the name filter to the query: query = filter.ApplyToQuery(query, input.Name, customerdb.FieldName) - so the ILIKE hits the indexed-but-unusable name column.", + "api/v3/handlers/customers/list.go decodes params.Filter.Name and params.Filter.PrimaryEmail into the request, and api/v3/server/server.go wires customershandler.New(...) into the live server - the handler is exposed, not gated." + ], + "triggering_call_site": "openmeter/customer/adapter/customer.go:59\n\t\tquery = filter.ApplyToQuery(query, input.Name, customerdb.FieldName)", + "root_cause": "Stems from the 'TypeSpec as the single source of truth for both v1 and v3 HTTP APIs' decision combined with the Ent-schema-as-source-of-truth persistence pattern: the v3 list contract exposes AIP-style contains/ocontains operators that pkg/filter compiles to leading-wildcard ILIKE (ContainsPattern -> %value%), but Ent schema indexes for these columns are plain btree (no pg_trgm GIN extension), which Postgres cannot use for a leading wildcard. The handler is wired into the live server while the index that would make it scalable is only a documented TODO, so the seq-scan fires on every filtered customers list call today. This is the unbounded-scan instance of pf_0009.", + "fix_direction": [ + "Add a custom SQL migration creating CREATE EXTENSION IF NOT EXISTS pg_trgm and GIN indexes on lower(name), lower(primary_email), lower(key) WHERE deleted_at IS NULL, per the TODO at customer.go:42.", + "Confirm pkg/filter emits a query form the GIN index can serve (lower(col) gin_trgm_ops) or adjust the predicate to use lower() consistently.", + "Add a query-plan test asserting the customers list with a name filter uses the GIN index rather than a seq scan.", + "Until indexes land, keep the parser-side caps in api/v3/filters/parse.go (maxCommaSeparatedItems, maxFilterValueLength) and consider rate-limiting the v3 customers list endpoint.", + "Track the same pattern for any other v3 list endpoint exposing contains/ocontains on a btree-only column." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/customer.go", + "openmeter/customer/adapter/customer.go", + "api/v3/handlers/customers", + "pkg/filter", + "tools/migrate/migrations" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0009", + "first_seen": "2026-06-02T2125", + "confirmed_in_scan": 3, + "status": "active", + "verdict_history": [ + "keep", + "keep", + "keep" + ], + "last_verdict_reason": "The quoted code exists at customer.go:58-60; the v3 list handler applies filter.ApplyToQuery to input.Name/PrimaryEmail/Key fields, which per AGENTS.md compile to leading-wildcard ILIKE that cannot use plain btree indexes, causing sequential scans; the handler is wired into the live server and the issue is explicitly documented as a pg_trgm GIN index TODO in the codebase.", + "last_verdict_confidence": 0.85 + }, + { + "id": "f_0012", + "problem_statement": "The BillingInvoice adapter actively dual-writes invoice data under a schema_level discriminator (written from a temporary BillingInvoiceWriteSchemaLevel single-row table) while deprecated columns remain live, so the in-flight invoice-line migration creates coupled cleanup debt that must be removed in lockstep across the Ent schema and the billing adapter.", + "evidence": [ + "openmeter/ent/schema/billing.go:1171 field.Int(\"schema_level\").Default(1) on BillingInvoice; billing.go:1363 declares a temporary single-row BillingInvoiceWriteSchemaLevel table that tracks the active write schema level.", + "openmeter/billing/adapter/gatheringinvoice.go:43 reads tx.GetInvoiceDefaultSchemaLevel(ctx) and gatheringinvoice.go:58 calls .SetSchemaLevel(currentSchemaLevel) on each created invoice - the adapter writes the discriminator on every gathering-invoice create.", + "openmeter/billing/adapter/gatheringinvoice.go:424 and invoicelinesplitgroup.go:254 branch the read mapping on invoice.SchemaLevel via mapGatheringInvoiceLinesFromDB(invoice.SchemaLevel, ...) / mapGatheringInvoiceLineFromDB(...SchemaLevel...), so old and new line shapes are both decodable.", + "openmeter/ent/schema/billing.go:417,631,793 still declare Deprecated() columns (line_ids; split-line-group tax_config/tax_code_id/tax_behavior; discount type/quantity/pre_line_period_quantity) that coexist with the new line_discounts shape.", + "openmeter/billing/adapter/lock.go:55 calls tx.migrateCustomerInvoices(ctx, input, migrationStatus.minSchemaLevel) - a per-customer in-place migration step driven by the same discriminator." + ], + "triggering_call_site": "openmeter/billing/adapter/gatheringinvoice.go:58\n\t\t\tSetSchemaLevel(currentSchemaLevel).", + "root_cause": "Stems from the Ent-schema-as-source-of-truth persistence decision under an incremental invoice-line migration (rather than a single breaking cutover): the schema carries deprecated columns plus a schema_level discriminator encoded in two places (the per-row BillingInvoice.schema_level column and the standalone BillingInvoiceWriteSchemaLevel table), and the adapter reads GetInvoiceDefaultSchemaLevel then SetSchemaLevel and branches mapGatheringInvoiceLinesFromDB on the level to write/read both shapes during the transition. Because the discriminator lives in two artifacts and the dual-write branches live in the adapter, the cleanup is a multi-artifact schema-plus-adapter operation that can be left half-done if the migration stalls - the in-flight instance of the schema-migration cleanup-debt class pf_0011.", + "fix_direction": [ + "Track the invoice-line migration to completion with an explicit checklist enumerating the deprecated columns (line_ids, split-line-group tax_config/tax_code_id/tax_behavior, discount type/quantity/pre_line_period_quantity) and the schema_level artifacts (BillingInvoice.schema_level field + BillingInvoiceWriteSchemaLevel table).", + "When GetInvoiceDefaultSchemaLevel reports a single level everywhere (minSchemaLevel == max), remove the schema_level field, drop the BillingInvoiceWriteSchemaLevel table, and delete the mapGatheringInvoiceLinesFromDB / mapGatheringInvoiceLineFromDB dual-shape branches and lock.go migrateCustomerInvoices in one migration.", + "Generate the Atlas down-migration for the column drops and verify it before landing, given the atlas.sum linear-chain constraint (see pf_0004).", + "Add a test asserting no live billing_invoice row references a deprecated column and no row has schema_level < the target after cutover." + ], + "severity": "info", + "confidence": 0.8, + "applies_to": [ + "openmeter/ent/schema/billing.go", + "openmeter/billing/adapter", + "openmeter/billing/adapter/gatheringinvoice.go", + "openmeter/billing/adapter/schemalevel.go", + "openmeter/billing/adapter/lock.go" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0011", + "first_seen": "2026-06-04T1200", + "confirmed_in_scan": 2, + "status": "active", + "verdict_history": [ + "demote", + "keep" + ], + "last_verdict_reason": "The code and pattern are real: SetSchemaLevel is called at line 58 of gatheringinvoice.go, and the discriminator-based dual-write logic across schema level and deprecated columns does exist. However, this is already explicitly documented in .claude/rules/pitfalls.md as an acknowledged in-flight schema-migration technical debt with a documented fix direction, not a newly discovered architectural problem.", + "last_verdict_confidence": 0.95, + "pending_demotion": true + }, + { + "id": "f_0013", + "problem_statement": "The shared ClickHouse events table is created with CREATE TABLE IF NOT EXISTS at connector startup outside the Atlas/golang-migrate pipeline, and its column list is maintained by hand in three places, so adding a ch:-tagged field to streaming.RawEvent does not propagate to already-provisioned tables and silently drifts the struct from the live DDL/INSERT column list.", + "evidence": [ + "openmeter/streaming/clickhouse/event_query.go:25 createEventsTable.toSQL() calls sb.IfNotExists() - on an existing deployment the table is never altered, so a new column never materialises.", + "openmeter/streaming/clickhouse/connector.go:78-79 only calls createTable when !config.SkipCreateTables, and createTable is the sole DDL path - there is no migration/ALTER reconcile step.", + "openmeter/streaming/connector.go:24-35 RawEvent has ch:-tagged columns (namespace,id,type,source,subject,time,data,ingested_at,stored_at,store_row_id,customer_id) that must be kept in sync by hand with the DDL builder and the INSERT list.", + "openmeter/streaming/clickhouse/event_query.go:26-36 createEventsTable.toSQL() Define(...) list and event_query.go:207 InsertEventsQuery.ToSQL() query.Cols(...) are two independent hand-maintained column lists; a struct change that misses either, or runs against a pre-existing table, drifts silently.", + "data model RawEvent lifecycle: 'createEventsTable uses CREATE TABLE IF NOT EXISTS so new columns on existing deployments need an explicit ALTER TABLE migration path.'" + ], + "triggering_call_site": "openmeter/streaming/clickhouse/event_query.go:25\n\tsb.IfNotExists()", + "root_cause": "Stems from the multi-store decision (Postgres via Ent+Atlas for domain state; ClickHouse via connector create-if-not-exists for usage) that leaves ClickHouse outside the migration pipeline: createEventsTable.toSQL() (event_query.go:25) emits CREATE TABLE IF NOT EXISTS with no diff/ALTER path, and the RawEvent struct, the DDL Define() list, and the INSERT query.Cols() list are three hand-synchronised sources of truth. So a new ch: field added to RawEvent (connector.go:24-35) compiles, but neither alters an already-provisioned events table nor is guarded by any schema-diff check, surfacing only as a runtime insert/read mismatch. This is the ClickHouse instance of the FK-less/migration-less integrity class pf_0010.", + "fix_direction": [ + "Introduce a ClickHouse migration or ALTER-on-startup reconcile that compares the live events-table columns against the RawEvent struct and applies ADD COLUMN for any new ch: field on existing deployments.", + "Add a contract test asserting the set of RawEvent ch:-tagged fields equals the createEventsTable Define() column set AND the InsertEventsQuery query.Cols() column list, in matching order.", + "Centralise the column list in one Go slice consumed by the struct mapper, the DDL builder, and the INSERT builder so the three lists cannot diverge.", + "Document the migration-less invariant in openmeter/streaming/clickhouse/CLAUDE.md so future ch: field additions trigger the ALTER path." + ], + "severity": "warn", + "confidence": 0.8, + "applies_to": [ + "openmeter/streaming/connector.go", + "openmeter/streaming/clickhouse/event_query.go", + "openmeter/streaming/clickhouse/connector.go" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0010", + "first_seen": "2026-06-04T1200", + "confirmed_in_scan": 2, + "status": "active", + "verdict_history": [ + "keep", + "keep" + ], + "last_verdict_reason": "RawEvent struct has ch:\"customer_id\" field but InsertEventsQuery.ToSQL() omits it from Cols() and Values(), and createEventsTable.toSQL() does not Define() it; the IfNotExists() path means this drift is undetected and customer_id values are silently lost at runtime.", + "last_verdict_confidence": 0.95 + }, + { + "id": "f_0014", + "problem_statement": "Two v3 operations advertised by the TypeSpec/OpenAPI contract - CreateCreditAdjustment and QueryGovernanceAccess - are wired into the live server but unconditionally return HTTP 501 Not Implemented (no credits.enabled gate, no feature flag), so a spec-compliant SDK client that calls either generated method always fails despite the operation existing in the published API surface.", + "evidence": [ + "api/v3/server/routes.go:418-420 func (s *Server) CreateCreditAdjustment(...) { unimplemented.CreateCreditAdjustment(w, r, customerId) } - no Enabled guard, calls Unimplemented unconditionally.", + "api/v3/server/routes.go:472-474 func (s *Server) QueryGovernanceAccess(...) { unimplemented.QueryGovernanceAccess(w, r, params) } - same unconditional stub.", + "api/v3/api.gen.go:7186-7191 type Unimplemented struct{}; each method body calls w.WriteHeader(http.StatusNotImplemented) - so both operations always respond 501.", + "By contrast the sibling credits handlers at routes.go:372-435 (GetCustomerCreditBalance, ListCreditGrants, CreateCreditGrant, ...) DO delegate to a real handler when s.Credits.Enabled - establishing that these two are permanently stubbed, not feature-gated.", + "The operations are generated from the TypeSpec 'aip' package into api/v3/api.gen.go and the three SDKs, so they are part of the advertised public contract." + ], + "triggering_call_site": "api/v3/server/routes.go:419\n\tunimplemented.CreateCreditAdjustment(w, r, customerId)", + "root_cause": "Stems from the 'TypeSpec as the single source of truth for both v1 and v3 HTTP APIs and all three SDKs' decision combined with the two-parallel-API-surfaces reality (legacy v1 + AIP-style v3 with partially-unimplemented operations): TypeSpec generates the operation, its server interface method, and the SDK client methods from the contract before the server implementation exists, and the v3 Server satisfies the generated interface by delegating to api.Unimplemented{} (api.gen.go:7186) which always writes 501. Because Go's interface satisfaction is the only compile-time check, a permanently-stubbed operation is indistinguishable at build time from a finished one - the contract advertises capability the runtime never provides. This is the spec-vs-implementation-gap instance of pf_0015.", + "fix_direction": [ + "Decide per operation: either implement CreateCreditAdjustment / QueryGovernanceAccess behind their real handlers, or remove/mark them @added(unstable) in the TypeSpec 'aip' package so they are not advertised as stable in the generated SDKs.", + "If they must remain stubs, gate them behind the same s.Credits.Enabled / feature-flag pattern the sibling credit handlers use and document them as not-yet-available in the OpenAPI description.", + "Add a generated-vs-implemented audit test that fails CI when a v3 Server method body is only a call to api.Unimplemented for an operation marked stable in the spec.", + "Document the set of intentionally-stubbed v3 operations in api/v3/server/CLAUDE.md so reviewers can tell permanent stubs from in-progress work." + ], + "severity": "warn", + "confidence": 0.85, + "applies_to": [ + "api/v3/server/routes.go", + "api/v3/api.gen.go", + "api/spec", + "api/client" + ], + "source": "deep:synthesis", + "depth": "canonical", + "pitfall_id": "pf_0015", + "first_seen": "2026-06-05T1530", + "confirmed_in_scan": 1, + "status": "active", + "verdict_history": [ + "keep" + ], + "last_verdict_reason": "The quoted code exists at the exact cited locations (routes.go:418-420 and 472-474) and unconditionally delegates to api.Unimplemented without any credits.enabled or feature gate check, in stark contrast to sibling operations like GetCustomerCreditBalance (line 372-378) which explicitly guard with `if !s.Credits.Enabled`, making these two operations permanently unavailable to SDK clients despite being in the published TypeSpec/OpenAPI contract.", + "last_verdict_confidence": 0.95 + } + ], + "scanned_at": "2026-06-05T1340", + "verdicts_applied_at": "2026-06-05T1341" +} \ No newline at end of file diff --git a/.archie/health.json b/.archie/health.json new file mode 100644 index 0000000000..26b336fd1f --- /dev/null +++ b/.archie/health.json @@ -0,0 +1,35431 @@ +{ + "erosion": 0.5408, + "gini": 0.7709, + "top20_share": 0.8275, + "verbosity": 0.1125, + "total_functions": 51789, + "high_cc_functions": 1490, + "total_loc": 834052, + "duplicate_lines": 93800, + "cc_distribution": { + "1-2": 42769, + "3-5": 4913, + "6-10": 2617, + "11-20": 1068, + "21-50": 335, + "51-100": 72, + "101+": 15 + }, + "mass": { + "total": 697913.0, + "heavy": 377441.55, + "heavy_ratio": 0.5408 + }, + "waste": { + "single_method_classes": [], + "single_method_class_count": 0, + "tiny_functions": [ + { + "path": "api/client/go/client.go", + "name": "IngestEventBatchWithResponse", + "line": 46, + "sloc": 2 + }, + { + "path": "api/client/javascript/scripts/generate.ts", + "name": "STRING", + "line": 7, + "sloc": 1 + }, + { + "path": "api/client/javascript/scripts/generate.ts", + "name": "schema", + "line": 9, + "sloc": 1 + }, + { + "path": "api/client/javascript/scripts/generate.ts", + "name": "contents", + "line": 49, + "sloc": 2 + }, + { + "path": "api/client/javascript/src/client/common.ts", + "name": "isHTTPError", + "line": 64, + "sloc": 2 + }, + { + "path": "api/client/javascript/src/client/utils.ts", + "name": "ISODateFormat", + "line": 35, + "sloc": 2 + }, + { + "path": "api/client/javascript/src/react/context.tsx", + "name": "OpenMeterContext", + "line": 8, + "sloc": 1 + }, + { + "path": "api/client/python/openmeter/_client.py", + "name": "__enter__", + "line": 26, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_client.py", + "name": "__exit__", + "line": 29, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_client.py", + "name": "close", + "line": 245, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_client.py", + "name": "__exit__", + "line": 252, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__init__", + "line": 361, + "sloc": 1 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__contains__", + "line": 363, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__delitem__", + "line": 402, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__iter__", + "line": 405, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__len__", + "line": 408, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__ne__", + "line": 411, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "pop", + "line": 450, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "pop", + "line": 453, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "setdefault", + "line": 494, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__repr__", + "line": 519, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "copy", + "line": 680, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/aio/_client.py", + "name": "close", + "line": 247, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/_generated/aio/_client.py", + "name": "__aexit__", + "line": 254, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/aio/_client.py", + "name": "__enter__", + "line": 26, + "sloc": 2 + }, + { + "path": "api/client/python/openmeter/aio/_client.py", + "name": "__exit__", + "line": 29, + "sloc": 2 + }, + { + "path": "api/spec/packages/aip/scripts/apply-doc-fixes.mjs", + "name": "RULE_NAME", + "line": 9, + "sloc": 1 + }, + { + "path": "api/v3/handlers/billingprofiles/convert.gen.go", + "name": "timeTimeToTimeTime", + "line": 241, + "sloc": 2 + }, + { + "path": "api/v3/handlers/customers/billing/convert.go", + "name": "ResolveIDFromCustomerId", + "line": 62, + "sloc": 2 + }, + { + "path": "api/v3/handlers/customers/convert.gen.go", + "name": "timeTimeToTimeTime", + "line": 165, + "sloc": 2 + }, + { + "path": "api/v3/handlers/customers/convert.go", + "name": "ConvertMetadataAnnotationsToLabels", + "line": 61, + "sloc": 2 + }, + { + "path": "api/v3/handlers/meters/convert.gen.go", + "name": "timeTimeToTimeTime", + "line": 77, + "sloc": 2 + }, + { + "path": "api/v3/handlers/meters/errors.go", + "name": "NewReservedDimensionError", + "line": 20, + "sloc": 2 + }, + { + "path": "api/v3/handlers/meters/query/errors.go", + "name": "NewCustomerNotFoundError", + "line": 89, + "sloc": 2 + }, + { + "path": "api/v3/handlers/taxcodes/convert.gen.go", + "name": "timeTimeToTimeTime", + "line": 78, + "sloc": 2 + }, + { + "path": "api/v3/labels/convert_test.go", + "name": "String", + "line": 16, + "sloc": 2 + }, + { + "path": "api/v3/labels/convert_test.go", + "name": "MarshalText", + "line": 21, + "sloc": 2 + }, + { + "path": "api/v3/oasmiddleware/response.go", + "name": "Unwrap", + "line": 54, + "sloc": 2 + }, + { + "path": "api/v3/server/routes.go", + "name": "QueryGovernanceAccess", + "line": 472, + "sloc": 2 + }, + { + "path": "app/common/customerbalance.go", + "name": "NewCustomerBalanceFacade", + "line": 43, + "sloc": 2 + }, + { + "path": "app/common/database.go", + "name": "NewEntClient", + "line": 129, + "sloc": 2 + }, + { + "path": "app/common/telemetry.go", + "name": "Handle", + "line": 457, + "sloc": 2 + }, + { + "path": "app/common/telemetry_test.go", + "name": "Handle", + "line": 118, + "sloc": 2 + }, + { + "path": "app/common/watermill.go", + "name": "NewEmptyProvisionTopics", + "line": 96, + "sloc": 2 + }, + { + "path": "app/config/productcatalog.go", + "name": "ConfigureProductCatalog", + "line": 13, + "sloc": 2 + }, + { + "path": "cmd/balance-worker/wire.go", + "name": "metadata", + "line": 59, + "sloc": 2 + }, + { + "path": "cmd/balance-worker/wire_gen.go", + "name": "metadata", + "line": 354, + "sloc": 2 + }, + { + "path": "cmd/billing-worker/wire.go", + "name": "metadata", + "line": 62, + "sloc": 2 + }, + { + "path": "cmd/billing-worker/wire_gen.go", + "name": "metadata", + "line": 520, + "sloc": 2 + }, + { + "path": "cmd/jobs/internal/version.go", + "name": "Version", + "line": 36, + "sloc": 2 + }, + { + "path": "cmd/jobs/internal/wire.go", + "name": "metadata", + "line": 116, + "sloc": 2 + }, + { + "path": "cmd/jobs/internal/wire_gen.go", + "name": "metadata", + "line": 649, + "sloc": 2 + }, + { + "path": "cmd/jobs/ledger/ledger.go", + "name": "init", + "line": 14, + "sloc": 2 + }, + { + "path": "cmd/jobs/quickstart/cronjobs.go", + "name": "init", + "line": 114, + "sloc": 2 + }, + { + "path": "cmd/jobs/quickstart/quickstart.go", + "name": "init", + "line": 15, + "sloc": 2 + }, + { + "path": "cmd/notification-service/wire.go", + "name": "metadata", + "line": 71, + "sloc": 2 + }, + { + "path": "cmd/notification-service/wire_gen.go", + "name": "metadata", + "line": 284, + "sloc": 2 + }, + { + "path": "cmd/server/wire.go", + "name": "metadata", + "line": 165, + "sloc": 2 + }, + { + "path": "cmd/server/wire_gen.go", + "name": "metadata", + "line": 910, + "sloc": 2 + }, + { + "path": "cmd/sink-worker/wire_gen.go", + "name": "NewLogger", + "line": 326, + "sloc": 2 + }, + { + "path": "collector/benthos/input/run_ai.go", + "name": "Close", + "line": 435, + "sloc": 2 + }, + { + "path": "collector/benthos/internal/logging/logging.go", + "name": "Init", + "line": 15, + "sloc": 2 + }, + { + "path": "collector/benthos/internal/logging/logging.go", + "name": "SetupKlog", + "line": 52, + "sloc": 2 + }, + { + "path": "e2e/v3helpers_test.go", + "name": "withPageSize", + "line": 294, + "sloc": 2 + }, + { + "path": "e2e/v3helpers_test.go", + "name": "withPageNumber", + "line": 297, + "sloc": 1 + }, + { + "path": "openmeter/app/adapter/adapter.go", + "name": "Self", + "line": 66, + "sloc": 2 + }, + { + "path": "openmeter/app/custominvoicing/adapter/adapter.go", + "name": "Self", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/app/custominvoicing/service/factory.go", + "name": "GetAppConfiguration", + "line": 55, + "sloc": 2 + }, + { + "path": "openmeter/app/sandbox/app.go", + "name": "UninstallApp", + "line": 235, + "sloc": 2 + }, + { + "path": "openmeter/app/sandbox/config.go", + "name": "Validate", + "line": 5, + "sloc": 2 + }, + { + "path": "openmeter/app/sandbox/mock.go", + "name": "DisableMock", + "line": 282, + "sloc": 2 + }, + { + "path": "openmeter/app/service/customer.go", + "name": "DeleteCustomer", + "line": 20, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/adapter/adapter.go", + "name": "Self", + "line": 122, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/app.go", + "name": "GetEventAppData", + "line": 88, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/calculator.go", + "name": "IsInteger", + "line": 62, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/client/client.go", + "name": "FromStripeCurrency", + "line": 183, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/client/errors.go", + "name": "Unwrap", + "line": 99, + "sloc": 2 + }, + { + "path": "openmeter/app/stripe/service/app.go", + "name": "generateMaskedSecretAPIKey", + "line": 109, + "sloc": 2 + }, + { + "path": "openmeter/billing/adapter/adapter.go", + "name": "Self", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/adapter/adapter.go", + "name": "Self", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/adapter.go", + "name": "Self", + "line": 79, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/creditpurchase/featurefilters.go", + "name": "Normalize", + "line": 29, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/adapter.go", + "name": "Self", + "line": 79, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/flatfee/service.go", + "name": "Validate", + "line": 82, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/lineage/adapter/adapter.go", + "name": "Self", + "line": 60, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/lineage/service/service.go", + "name": "CreateSegment", + "line": 254, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/meta/adapter/adapter.go", + "name": "Self", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/patch.go", + "name": "IsEmpty", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/service/helpers.go", + "name": "GetChargeID", + "line": 142, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/adapter.go", + "name": "Self", + "line": 79, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/usagebased/handler.go", + "name": "OnCreditsOnlyUsageAccruedCorrection", + "line": 189, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/usagebased/rating.go", + "name": "GetCreditsApplied", + "line": 92, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine_test.go", + "name": "billingtestFeatureMeters", + "line": 89, + "sloc": 2 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "name": "isZeroDetailedLine", + "line": 304, + "sloc": 2 + }, + { + "path": "openmeter/billing/errors.go", + "name": "Unwrap", + "line": 171, + "sloc": 2 + }, + { + "path": "openmeter/billing/lineengine/engine.go", + "name": "OnPaymentSettled", + "line": 115, + "sloc": 2 + }, + { + "path": "openmeter/billing/models/externalid/model.go", + "name": "Equal", + "line": 20, + "sloc": 2 + }, + { + "path": "openmeter/billing/rating/service/pricer.go", + "name": "ResolveBillablePeriod", + "line": 121, + "sloc": 2 + }, + { + "path": "openmeter/billing/rating/service/service.go", + "name": "New", + "line": 7, + "sloc": 2 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "resolveDefaultTaxCode", + "line": 635, + "sloc": 2 + }, + { + "path": "openmeter/billing/service/service.go", + "name": "RegisterStandardInvoiceHooks", + "line": 216, + "sloc": 2 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/adapter/adapter.go", + "name": "Self", + "line": 61, + "sloc": 2 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go", + "name": "getErrorDetails", + "line": 371, + "sloc": 2 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go", + "name": "GetInvoicePatches", + "line": 72, + "sloc": 2 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go", + "name": "AddProrate", + "line": 198, + "sloc": 2 + }, + { + "path": "openmeter/billing/worker/worker.go", + "name": "Close", + "line": 232, + "sloc": 2 + }, + { + "path": "openmeter/cost/adapter/compute_test.go", + "name": "strPtr", + "line": 22, + "sloc": 1 + }, + { + "path": "openmeter/credit/adapter/transaction.go", + "name": "Self", + "line": 51, + "sloc": 2 + }, + { + "path": "openmeter/credit/balance/balance.go", + "name": "Balance", + "line": 87, + "sloc": 2 + }, + { + "path": "openmeter/credit/balance/repository.go", + "name": "Error", + "line": 24, + "sloc": 2 + }, + { + "path": "openmeter/credit/balance/service.go", + "name": "service", + "line": 51, + "sloc": 1 + }, + { + "path": "openmeter/credit/balance/service.go", + "name": "Save", + "line": 87, + "sloc": 2 + }, + { + "path": "openmeter/credit/grant.go", + "name": "Error", + "line": 198, + "sloc": 2 + }, + { + "path": "openmeter/credit/grant/events.go", + "name": "Validate", + "line": 98, + "sloc": 2 + }, + { + "path": "openmeter/credit/grant/events_2.go", + "name": "EventMetadata", + "line": 125, + "sloc": 2 + }, + { + "path": "openmeter/credit/grant/events_2.go", + "name": "Validate", + "line": 144, + "sloc": 1 + }, + { + "path": "openmeter/currencies/adapter/adapter.go", + "name": "Self", + "line": 64, + "sloc": 2 + }, + { + "path": "openmeter/customer/adapter/adapter.go", + "name": "Self", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/customer/errors.go", + "name": "NewErrDeletingCustomerWithActiveSubscriptions", + "line": 105, + "sloc": 2 + }, + { + "path": "openmeter/customer/service/ledger_hook_test.go", + "name": "CreateCustomerAccounts", + "line": 104, + "sloc": 2 + }, + { + "path": "openmeter/customer/service/requestvalidator.go", + "name": "RegisterRequestValidator", + "line": 7, + "sloc": 2 + }, + { + "path": "openmeter/dedupe/dedupe.go", + "name": "Key", + "line": 39, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/addon/where.go", + "name": "Not", + "line": 859, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/addonratecard/where.go", + "name": "Not", + "line": 1115, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/app/where.go", + "name": "Not", + "line": 796, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/appcustomer/where.go", + "name": "Not", + "line": 470, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/appcustominvoicing/where.go", + "name": "Not", + "line": 370, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer/where.go", + "name": "Not", + "line": 480, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/appstripe/where.go", + "name": "Not", + "line": 705, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/appstripecustomer/where.go", + "name": "Not", + "line": 620, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/balancesnapshot/where.go", + "name": "Not", + "line": 522, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go", + "name": "ByCustomerID", + "line": 60, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingcustomerlock/where.go", + "name": "Not", + "line": 216, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride/where.go", + "name": "Not", + "line": 1086, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoice/where.go", + "name": "Not", + "line": 3956, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "name": "ByIndex", + "line": 112, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go", + "name": "Not", + "line": 309, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoiceline/where.go", + "name": "Not", + "line": 2770, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount/where.go", + "name": "Not", + "line": 959, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount/where.go", + "name": "Not", + "line": 769, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup/where.go", + "name": "Not", + "line": 1504, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go", + "name": "ByMeteredQuantity", + "line": 118, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go", + "name": "Not", + "line": 423, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue/where.go", + "name": "Not", + "line": 763, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go", + "name": "BySchemaLevel", + "line": 50, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel/where.go", + "name": "Not", + "line": 121, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingprofile/where.go", + "name": "Not", + "line": 1618, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go", + "name": "ByLast", + "line": 66, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers/where.go", + "name": "Not", + "line": 252, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline/where.go", + "name": "Not", + "line": 1735, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go", + "name": "Not", + "line": 769, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig/where.go", + "name": "Not", + "line": 896, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/charge/where.go", + "name": "Not", + "line": 798, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase/where.go", + "name": "Not", + "line": 1958, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go", + "name": "Not", + "line": 502, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go", + "name": "Not", + "line": 834, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go", + "name": "Not", + "line": 997, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfee/where.go", + "name": "Not", + "line": 2227, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun/where.go", + "name": "Not", + "line": 1272, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go", + "name": "Not", + "line": 908, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline/where.go", + "name": "Not", + "line": 1689, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go", + "name": "Not", + "line": 928, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment/where.go", + "name": "Not", + "line": 997, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "name": "ByDescription", + "line": 288, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargessearchv1/where.go", + "name": "Not", + "line": 1542, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebased/where.go", + "name": "Not", + "line": 2049, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go", + "name": "Not", + "line": 885, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline/where.go", + "name": "Not", + "line": 1885, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go", + "name": "Not", + "line": 928, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment/where.go", + "name": "Not", + "line": 974, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns/where.go", + "name": "Not", + "line": 1388, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage/where.go", + "name": "Not", + "line": 628, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment/where.go", + "name": "Not", + "line": 549, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/currencycostbasis/where.go", + "name": "Not", + "line": 569, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/customcurrency/where.go", + "name": "Not", + "line": 527, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/customer/where.go", + "name": "Not", + "line": 1513, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/customersubjects/where.go", + "name": "Not", + "line": 402, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/entitlement/where.go", + "name": "Not", + "line": 1353, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/entmixinaccessor.go", + "name": "GetDeletedAt", + "line": 2976, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/feature/where.go", + "name": "Not", + "line": 1536, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/grant/where.go", + "name": "Not", + "line": 908, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/hook/hook.go", + "name": "Extend", + "line": 1133, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgeraccount/where.go", + "name": "Not", + "line": 441, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go", + "name": "ByReleaseID", + "line": 249, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord/where.go", + "name": "Not", + "line": 1341, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go", + "name": "ByAccountID", + "line": 108, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount/where.go", + "name": "Not", + "line": 524, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgerentry/where.go", + "name": "Not", + "line": 606, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgersubaccount/where.go", + "name": "Not", + "line": 513, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute/where.go", + "name": "Not", + "line": 1088, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgertransaction/where.go", + "name": "Not", + "line": 465, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup/where.go", + "name": "Not", + "line": 327, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/llmcostprice/llmcostprice.go", + "name": "ByEffectiveTo", + "line": 214, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/llmcostprice/where.go", + "name": "Not", + "line": 999, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/meter/where.go", + "name": "Not", + "line": 803, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/migrate/migrate.go", + "name": "NewSchema", + "line": 41, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/migrate/migrate.go", + "name": "WriteTo", + "line": 94, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/notificationchannel/where.go", + "name": "Not", + "line": 463, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/notificationevent/where.go", + "name": "Not", + "line": 421, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus/where.go", + "name": "Not", + "line": 588, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/notificationrule/where.go", + "name": "Not", + "line": 486, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes/where.go", + "name": "Not", + "line": 480, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/plan/where.go", + "name": "Not", + "line": 940, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/planaddon/where.go", + "name": "Not", + "line": 625, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/planphase/where.go", + "name": "Not", + "line": 786, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/planratecard/where.go", + "name": "Not", + "line": 1115, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subject/subject.go", + "name": "ByStripeCustomerID", + "line": 113, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subject/where.go", + "name": "Not", + "line": 533, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscription/where.go", + "name": "Not", + "line": 1202, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscriptionaddon/where.go", + "name": "Not", + "line": 513, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity/where.go", + "name": "Not", + "line": 477, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate/where.go", + "name": "Not", + "line": 357, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscriptionitem/where.go", + "name": "Not", + "line": 1535, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/subscriptionphase/where.go", + "name": "Not", + "line": 855, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/taxcode/where.go", + "name": "Not", + "line": 889, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/tx.go", + "name": "Tx", + "line": 423, + "sloc": 2 + }, + { + "path": "openmeter/ent/db/usagereset/where.go", + "name": "Not", + "line": 578, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/adapter/transaction.go", + "name": "Self", + "line": 50, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/boolean/connector.go", + "name": "HasAccess", + "line": 82, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/events.go", + "name": "NewEntitlementDeletedEventPayloadV2", + "line": 204, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/metered/hook.go", + "name": "PostDelete", + "line": 38, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/metered/owner_customer.go", + "name": "GetUsageAttribution", + "line": 15, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/service/lock.go", + "name": "NewEntitlementUniqueScopeLock", + "line": 5, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/static/connector.go", + "name": "HasAccess", + "line": 101, + "sloc": 2 + }, + { + "path": "openmeter/entitlement/uniqueness.go", + "name": "Error", + "line": 68, + "sloc": 2 + }, + { + "path": "openmeter/event/metadata/resourcepath.go", + "name": "ComposeResourcePathRaw", + "line": 34, + "sloc": 2 + }, + { + "path": "openmeter/ingest/ingestadapter/telemetry.go", + "name": "Close", + "line": 82, + "sloc": 2 + }, + { + "path": "openmeter/ingest/inmemory.go", + "name": "Close", + "line": 43, + "sloc": 2 + }, + { + "path": "openmeter/ingest/kafkaingest/serializer/json.go", + "name": "GetValueSchemaId", + "line": 44, + "sloc": 2 + }, + { + "path": "openmeter/ledger/account/account.go", + "name": "ID", + "line": 67, + "sloc": 2 + }, + { + "path": "openmeter/ledger/account/adapter/repo.go", + "name": "Self", + "line": 43, + "sloc": 2 + }, + { + "path": "openmeter/ledger/account/adapter/repo_test.go", + "name": "testNamespace", + "line": 366, + "sloc": 2 + }, + { + "path": "openmeter/ledger/breakage/adapter/adapter.go", + "name": "Self", + "line": 60, + "sloc": 2 + }, + { + "path": "openmeter/ledger/breakage/noop.go", + "name": "NewNoopService", + "line": 50, + "sloc": 2 + }, + { + "path": "openmeter/ledger/collector/service.go", + "name": "CorrectCollectedAccrued", + "line": 127, + "sloc": 2 + }, + { + "path": "openmeter/ledger/customerbalance/noop.go", + "name": "NewNoopService", + "line": 39, + "sloc": 2 + }, + { + "path": "openmeter/ledger/customerbalance/service.go", + "name": "Pending", + "line": 352, + "sloc": 2 + }, + { + "path": "openmeter/ledger/customerbalance/testenv_test.go", + "name": "ListCustomerOverrides", + "line": 639, + "sloc": 2 + }, + { + "path": "openmeter/ledger/customerbalance/transactions_test.go", + "name": "ListCharges", + "line": 217, + "sloc": 2 + }, + { + "path": "openmeter/ledger/historical/adapter/repo.go", + "name": "Self", + "line": 43, + "sloc": 2 + }, + { + "path": "openmeter/ledger/historical/entry.go", + "name": "TransactionID", + "line": 83, + "sloc": 2 + }, + { + "path": "openmeter/ledger/historical/transaction.go", + "name": "Annotations", + "line": 101, + "sloc": 2 + }, + { + "path": "openmeter/ledger/resolvers/namespace.go", + "name": "DeleteNamespace", + "line": 31, + "sloc": 2 + }, + { + "path": "openmeter/ledger/routingrules/view.go", + "name": "stringSliceEqual", + "line": 155, + "sloc": 2 + }, + { + "path": "openmeter/ledger/transactions/breakage.go", + "name": "base", + "line": 164, + "sloc": 2 + }, + { + "path": "openmeter/ledger/transactions/correction.go", + "name": "templateCorrectionNotImplemented", + "line": 126, + "sloc": 2 + }, + { + "path": "openmeter/ledger/transactions/entry_identity.go", + "name": "NewCorrectionSourceIdentityKey", + "line": 9, + "sloc": 2 + }, + { + "path": "openmeter/ledger/transactions/input.go", + "name": "Namespace", + "line": 132, + "sloc": 2 + }, + { + "path": "openmeter/ledger/transactions/testutils/anytransaction.go", + "name": "Annotations", + "line": 82, + "sloc": 2 + }, + { + "path": "openmeter/llmcost/adapter/adapter.go", + "name": "Self", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/llmcost/sync/normalizer.go", + "name": "Normalize", + "line": 20, + "sloc": 2 + }, + { + "path": "openmeter/llmcost/sync/reconciler_test.go", + "name": "fp", + "line": 89, + "sloc": 1 + }, + { + "path": "openmeter/meter/adapter/adapter.go", + "name": "Self", + "line": 72, + "sloc": 2 + }, + { + "path": "openmeter/meter/httphandler/query_csv.go", + "name": "FileName", + "line": 287, + "sloc": 2 + }, + { + "path": "openmeter/meter/service/service.go", + "name": "GetMeterByIDOrSlug", + "line": 31, + "sloc": 2 + }, + { + "path": "openmeter/namespace/namespacedriver/decoder.go", + "name": "GetNamespace", + "line": 12, + "sloc": 2 + }, + { + "path": "openmeter/notification/adapter/adapter.go", + "name": "Self", + "line": 71, + "sloc": 2 + }, + { + "path": "openmeter/notification/consumer/consumer.go", + "name": "Close", + "line": 126, + "sloc": 2 + }, + { + "path": "openmeter/notification/errors.go", + "name": "Unwrap", + "line": 31, + "sloc": 2 + }, + { + "path": "openmeter/notification/eventhandler/noop/handler.go", + "name": "New", + "line": 29, + "sloc": 2 + }, + { + "path": "openmeter/notification/invoice.go", + "name": "Validate", + "line": 41, + "sloc": 2 + }, + { + "path": "openmeter/notification/webhook/errors.go", + "name": "IsMaxChannelsPerWebhookExceededError", + "line": 166, + "sloc": 2 + }, + { + "path": "openmeter/portal/adapter/noop.go", + "name": "InvalidateToken", + "line": 30, + "sloc": 2 + }, + { + "path": "openmeter/portal/adapter/token.go", + "name": "InvalidateToken", + "line": 120, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/adapter/transaction.go", + "name": "Self", + "line": 32, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/addon/adapter/adapter.go", + "name": "Self", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/discount.go", + "name": "IsEmpty", + "line": 237, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Validate", + "line": 420, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/feature/featuremeter.go", + "name": "getLastFeatures", + "line": 222, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/plan/adapter/adapter.go", + "name": "Self", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/adapter.go", + "name": "Self", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/pro_rating.go", + "name": "Equal", + "line": 50, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/subscription/plan.go", + "name": "GetKey", + "line": 150, + "sloc": 2 + }, + { + "path": "openmeter/productcatalog/subscription/testutils/adapter.go", + "name": "FromInput", + "line": 75, + "sloc": 2 + }, + { + "path": "openmeter/progressmanager/adapter/noop.go", + "name": "UpsertProgress", + "line": 17, + "sloc": 2 + }, + { + "path": "openmeter/secret/adapter/secret.go", + "name": "DeleteAppSecret", + "line": 37, + "sloc": 2 + }, + { + "path": "openmeter/server/router/addon.go", + "name": "PublishAddon", + "line": 53, + "sloc": 2 + }, + { + "path": "openmeter/server/router/app.go", + "name": "UninstallApp", + "line": 29, + "sloc": 2 + }, + { + "path": "openmeter/server/router/appstripe.go", + "name": "CreateStripeCheckoutSession", + "line": 40, + "sloc": 2 + }, + { + "path": "openmeter/server/router/billing.go", + "name": "UpdateBillingProfile", + "line": 173, + "sloc": 2 + }, + { + "path": "openmeter/server/router/debug.go", + "name": "GetDebugMetrics", + "line": 11, + "sloc": 2 + }, + { + "path": "openmeter/server/router/event.go", + "name": "ListEventsV2", + "line": 20, + "sloc": 2 + }, + { + "path": "openmeter/server/router/info.go", + "name": "GetProgress", + "line": 13, + "sloc": 2 + }, + { + "path": "openmeter/server/router/marketplace.go", + "name": "MarketplaceAppInstall", + "line": 43, + "sloc": 2 + }, + { + "path": "openmeter/server/router/notification.go", + "name": "TestNotificationRule", + "line": 89, + "sloc": 2 + }, + { + "path": "openmeter/server/router/plan.go", + "name": "ArchivePlan", + "line": 60, + "sloc": 2 + }, + { + "path": "openmeter/server/router/product_catalog.go", + "name": "GetFeature", + "line": 29, + "sloc": 2 + }, + { + "path": "openmeter/server/router/subject.go", + "name": "DeleteSubject", + "line": 23, + "sloc": 2 + }, + { + "path": "openmeter/server/server_test.go", + "name": "RegisterHooks", + "line": 1054, + "sloc": 2 + }, + { + "path": "openmeter/server/server_test.go", + "name": "RegisterHooks", + "line": 1115, + "sloc": 2 + }, + { + "path": "openmeter/server/server_test.go", + "name": "RegisterHooks", + "line": 1407, + "sloc": 1 + }, + { + "path": "openmeter/server/server_test.go", + "name": "RegisterRequestValidator", + "line": 1464, + "sloc": 2 + }, + { + "path": "openmeter/server/server_test.go", + "name": "RegisterHooks", + "line": 2039, + "sloc": 1 + }, + { + "path": "openmeter/server/server_test.go", + "name": "ListOverrides", + "line": 2127, + "sloc": 2 + }, + { + "path": "openmeter/sink/buffer.go", + "name": "partitionKey", + "line": 87, + "sloc": 2 + }, + { + "path": "openmeter/streaming/clickhouse/connector_query_test.go", + "name": "TestConnector", + "line": 383, + "sloc": 2 + }, + { + "path": "openmeter/streaming/clickhouse/event_query.go", + "name": "getTableName", + "line": 238, + "sloc": 2 + }, + { + "path": "openmeter/streaming/testutils/streaming.go", + "name": "ListGroupByValues", + "line": 287, + "sloc": 2 + }, + { + "path": "openmeter/subject/adapter/adapter.go", + "name": "Self", + "line": 53, + "sloc": 2 + }, + { + "path": "openmeter/subscription/addon/diff/addon.go", + "name": "GetRestores", + "line": 70, + "sloc": 2 + }, + { + "path": "openmeter/subscription/addon/diff/diff.go", + "name": "GetRestores", + "line": 26, + "sloc": 2 + }, + { + "path": "openmeter/subscription/addon/events.go", + "name": "Validate", + "line": 95, + "sloc": 2 + }, + { + "path": "openmeter/subscription/locks.go", + "name": "GetCustomerLock", + "line": 5, + "sloc": 2 + }, + { + "path": "openmeter/subscription/patch.go", + "name": "ToApplies", + "line": 66, + "sloc": 2 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "Unwrap", + "line": 1183, + "sloc": 2 + }, + { + "path": "openmeter/subscription/testutils/billing.go", + "name": "ListCustomerOverrides", + "line": 30, + "sloc": 2 + }, + { + "path": "openmeter/subscription/testutils/mock.go", + "name": "ChangeToPlan", + "line": 98, + "sloc": 2 + }, + { + "path": "openmeter/subscription/testutils/patch.go", + "name": "ValueAsAny", + "line": 53, + "sloc": 2 + }, + { + "path": "openmeter/subscription/validators/subscription/components.go", + "name": "filterSubViews", + "line": 47, + "sloc": 2 + }, + { + "path": "openmeter/subscription/workflow/service.go", + "name": "Validate", + "line": 71, + "sloc": 2 + }, + { + "path": "openmeter/taxcode/adapter/adapter.go", + "name": "Self", + "line": 81, + "sloc": 2 + }, + { + "path": "openmeter/taxcode/errors.go", + "name": "IsTaxCodeOrphanedKeyError", + "line": 156, + "sloc": 2 + }, + { + "path": "openmeter/watermill/driver/kafka/logger.go", + "name": "Println", + "line": 21, + "sloc": 2 + }, + { + "path": "openmeter/watermill/driver/kafka/saslscram.go", + "name": "Done", + "line": 38, + "sloc": 2 + }, + { + "path": "openmeter/watermill/marshaler/marshaler.go", + "name": "NameFromMessage", + "line": 152, + "sloc": 2 + }, + { + "path": "openmeter/watermill/marshaler/source.go", + "name": "MarshalJSON", + "line": 49, + "sloc": 2 + }, + { + "path": "openmeter/watermill/router/errors.go", + "name": "Unwrap", + "line": 17, + "sloc": 2 + }, + { + "path": "pkg/clock/clock.go", + "name": "UnFreeze", + "line": 38, + "sloc": 2 + }, + { + "path": "pkg/contextx/log.go", + "name": "WithGroup", + "line": 37, + "sloc": 2 + }, + { + "path": "pkg/currencyx/allocation.go", + "name": "currencyUnit", + "line": 314, + "sloc": 2 + }, + { + "path": "pkg/currencyx/allocation_test.go", + "name": "dec", + "line": 398, + "sloc": 2 + }, + { + "path": "pkg/currencyx/currency.go", + "name": "IsRoundedToPrecision", + "line": 58, + "sloc": 2 + }, + { + "path": "pkg/datetime/durationstring.go", + "name": "String", + "line": 32, + "sloc": 2 + }, + { + "path": "pkg/datetime/errors.go", + "name": "NewDurationArithmeticError", + "line": 22, + "sloc": 2 + }, + { + "path": "pkg/errorsx/handler.go", + "name": "Handle", + "line": 86, + "sloc": 2 + }, + { + "path": "pkg/errorsx/handler.go", + "name": "HandleContext", + "line": 89, + "sloc": 1 + }, + { + "path": "pkg/featuregate/featuregate.go", + "name": "EvaluateBool", + "line": 13, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/entcursor/cursor.go", + "name": "New", + "line": 24, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/entexpose/entexpose.go", + "name": "New", + "line": 24, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/entmixinaccessor/entmixinaccessor.go", + "name": "New", + "line": 24, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/entpaginate/paginate.go", + "name": "New", + "line": 24, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/entsetorclear/setorclear.go", + "name": "New", + "line": 24, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/idorder_test.go", + "name": "GetNamespace", + "line": 21, + "sloc": 1 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1/example1.go", + "name": "ByExampleValue1", + "line": 80, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1/where.go", + "name": "Not", + "line": 293, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/hook/hook.go", + "name": "Extend", + "line": 197, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "name": "NewSchema", + "line": 41, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "name": "WriteTo", + "line": 94, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go", + "name": "init", + "line": 31, + "sloc": 1 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "name": "ResetEdge", + "line": 542, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/tx.go", + "name": "Tx", + "line": 186, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2/example2.go", + "name": "ByExampleValue2", + "line": 80, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2/where.go", + "name": "Not", + "line": 293, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/hook/hook.go", + "name": "Extend", + "line": 197, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "name": "NewSchema", + "line": 41, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "name": "WriteTo", + "line": 94, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go", + "name": "init", + "line": 31, + "sloc": 1 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "name": "ResetEdge", + "line": 542, + "sloc": 2 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/tx.go", + "name": "Tx", + "line": 186, + "sloc": 2 + }, + { + "path": "pkg/framework/lockr/locker.go", + "name": "Tx", + "line": 145, + "sloc": 2 + }, + { + "path": "pkg/framework/operation/middleware_test.go", + "name": "ExampleMiddleware", + "line": 21, + "sloc": 2 + }, + { + "path": "pkg/framework/transaction/context.go", + "name": "Error", + "line": 34, + "sloc": 2 + }, + { + "path": "pkg/framework/transport/httptransport/options.go", + "name": "AppendOptions", + "line": 81, + "sloc": 2 + }, + { + "path": "pkg/hasher/xxhash.go", + "name": "NewHash", + "line": 5, + "sloc": 2 + }, + { + "path": "pkg/log/mock.go", + "name": "WithGroup", + "line": 32, + "sloc": 2 + }, + { + "path": "pkg/models/cadence.go", + "name": "IsZero", + "line": 90, + "sloc": 2 + }, + { + "path": "pkg/models/fieldexpression.go", + "name": "JSONPathExpression", + "line": 140, + "sloc": 2 + }, + { + "path": "pkg/models/metadata.go", + "name": "annotated", + "line": 58, + "sloc": 2 + }, + { + "path": "pkg/models/percentage.go", + "name": "Add", + "line": 56, + "sloc": 2 + }, + { + "path": "pkg/pagination/page.go", + "name": "IsZero", + "line": 64, + "sloc": 2 + }, + { + "path": "pkg/sortx/order.go", + "name": "IsDefaultValue", + "line": 17, + "sloc": 2 + }, + { + "path": "pkg/timeutil/closedperiod.go", + "name": "IsEmpty", + "line": 118, + "sloc": 2 + }, + { + "path": "pkg/timeutil/compare.go", + "name": "Compare", + "line": 5, + "sloc": 2 + }, + { + "path": "pkg/timeutil/recurrence_test.go", + "name": "addDateNoOverflow", + "line": 430, + "sloc": 2 + }, + { + "path": "tools/migrate/fs.go", + "name": "ReadFile", + "line": 78, + "sloc": 2 + } + ], + "tiny_function_count": 365 + }, + "functions": [ + { + "path": "openmeter/ent/db/runtime.go", + "name": "init", + "cc": 1016, + "sloc": 2727, + "line": 105, + "mass": 53056.22 + }, + { + "path": "openmeter/ent/db/billinginvoice.go", + "name": "assignValues", + "cc": 187, + "sloc": 405, + "line": 315, + "mass": 3763.3 + }, + { + "path": "openmeter/ent/db/billinginvoiceline.go", + "name": "assignValues", + "cc": 146, + "sloc": 315, + "line": 412, + "mass": 2591.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_update.go", + "name": "sqlSave", + "cc": 133, + "sloc": 820, + "line": 3157, + "mass": 3808.54 + }, + { + "path": "openmeter/ent/db/billinginvoice_update.go", + "name": "sqlSave", + "cc": 130, + "sloc": 549, + "line": 2957, + "mass": 3046.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_update.go", + "name": "sqlSave", + "cc": 128, + "sloc": 801, + "line": 1194, + "mass": 3622.65 + }, + { + "path": "openmeter/ent/db/billinginvoice_update.go", + "name": "sqlSave", + "cc": 125, + "sloc": 530, + "line": 1223, + "mass": 2877.72 + }, + { + "path": "openmeter/ent/db/chargeflatfee.go", + "name": "assignValues", + "cc": 118, + "sloc": 252, + "line": 260, + "mass": 1873.19 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "name": "assignValues", + "cc": 117, + "sloc": 239, + "line": 193, + "mass": 1808.78 + }, + { + "path": "openmeter/ent/db/taxcode_update.go", + "name": "sqlSave", + "cc": 115, + "sloc": 755, + "line": 2158, + "mass": 3159.89 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "name": "assignValues", + "cc": 111, + "sloc": 226, + "line": 187, + "mass": 1668.7 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "name": "assignValues", + "cc": 111, + "sloc": 226, + "line": 162, + "mass": 1668.7 + }, + { + "path": "openmeter/ent/db/chargeusagebased.go", + "name": "assignValues", + "cc": 111, + "sloc": 238, + "line": 266, + "mass": 1712.42 + }, + { + "path": "openmeter/ent/db/taxcode_update.go", + "name": "sqlSave", + "cc": 110, + "sloc": 736, + "line": 724, + "mass": 2984.23 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase.go", + "name": "assignValues", + "cc": 106, + "sloc": 228, + "line": 260, + "mass": 1600.56 + }, + { + "path": "openmeter/ent/db/customer_update.go", + "name": "sqlSave", + "cc": 94, + "sloc": 522, + "line": 1872, + "mass": 2147.65 + }, + { + "path": "openmeter/ent/db/chargessearchv1.go", + "name": "assignValues", + "cc": 89, + "sloc": 189, + "line": 101, + "mass": 1223.55 + }, + { + "path": "openmeter/ent/db/customer_update.go", + "name": "sqlSave", + "cc": 89, + "sloc": 503, + "line": 695, + "mass": 1996.06 + }, + { + "path": "openmeter/ent/db/subscriptionitem_update.go", + "name": "sqlSave", + "cc": 87, + "sloc": 445, + "line": 1702, + "mass": 1835.27 + }, + { + "path": "openmeter/ent/db/subscriptionitem_update.go", + "name": "sqlSave", + "cc": 82, + "sloc": 426, + "line": 648, + "mass": 1692.46 + }, + { + "path": "openmeter/ent/db/feature_update.go", + "name": "sqlSave", + "cc": 80, + "sloc": 406, + "line": 1543, + "mass": 1611.96 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "createSpec", + "cc": 78, + "sloc": 490, + "line": 919, + "mass": 1726.6 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "name": "assignValues", + "cc": 78, + "sloc": 174, + "line": 194, + "mass": 1028.89 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "createSpec", + "cc": 77, + "sloc": 418, + "line": 1024, + "mass": 1574.27 + }, + { + "path": "openmeter/ent/db/subscription_update.go", + "name": "sqlSave", + "cc": 77, + "sloc": 465, + "line": 1536, + "mass": 1660.42 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns.go", + "name": "assignValues", + "cc": 76, + "sloc": 161, + "line": 220, + "mass": 964.33 + }, + { + "path": "openmeter/ent/db/feature.go", + "name": "assignValues", + "cc": 76, + "sloc": 165, + "line": 180, + "mass": 976.24 + }, + { + "path": "openmeter/ent/db/subscriptionitem.go", + "name": "assignValues", + "cc": 76, + "sloc": 177, + "line": 214, + "mass": 1011.11 + }, + { + "path": "openmeter/ent/db/feature_update.go", + "name": "sqlSave", + "cc": 75, + "sloc": 387, + "line": 587, + "mass": 1475.42 + }, + { + "path": "openmeter/ent/db/entitlement.go", + "name": "assignValues", + "cc": 74, + "sloc": 167, + "line": 180, + "mass": 956.29 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun.go", + "name": "assignValues", + "cc": 73, + "sloc": 155, + "line": 193, + "mass": 908.84 + }, + { + "path": "openmeter/ent/db/billingprofile.go", + "name": "assignValues", + "cc": 72, + "sloc": 158, + "line": 175, + "mass": 905.03 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord.go", + "name": "assignValues", + "cc": 72, + "sloc": 154, + "line": 94, + "mass": 893.5 + }, + { + "path": "openmeter/ent/db/subscription_update.go", + "name": "sqlSave", + "cc": 72, + "sloc": 446, + "line": 556, + "mass": 1520.55 + }, + { + "path": "openmeter/ent/db/chargeusagebased_update.go", + "name": "sqlSave", + "cc": 66, + "sloc": 337, + "line": 1542, + "mass": 1211.6 + }, + { + "path": "openmeter/ent/db/chargeflatfee_update.go", + "name": "sqlSave", + "cc": 65, + "sloc": 307, + "line": 1580, + "mass": 1138.89 + }, + { + "path": "openmeter/ent/db/customer.go", + "name": "assignValues", + "cc": 65, + "sloc": 143, + "line": 194, + "mass": 777.29 + }, + { + "path": "openmeter/subscription/service/sync.go", + "name": "sync", + "cc": 65, + "sloc": 270, + "line": 28, + "mass": 1068.06 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "check", + "cc": 64, + "sloc": 148, + "line": 852, + "mass": 778.59 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "name": "sqlSave", + "cc": 64, + "sloc": 283, + "line": 1533, + "mass": 1076.65 + }, + { + "path": "openmeter/ent/db/grant.go", + "name": "assignValues", + "cc": 64, + "sloc": 133, + "line": 109, + "mass": 738.08 + }, + { + "path": "openmeter/ent/db/app_update.go", + "name": "sqlSave", + "cc": 63, + "sloc": 382, + "line": 1177, + "mass": 1231.32 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "check", + "cc": 63, + "sloc": 137, + "line": 503, + "mass": 737.4 + }, + { + "path": "openmeter/ent/db/addonratecard.go", + "name": "assignValues", + "cc": 62, + "sloc": 143, + "line": 144, + "mass": 741.41 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride.go", + "name": "assignValues", + "cc": 62, + "sloc": 137, + "line": 135, + "mass": 725.69 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig.go", + "name": "assignValues", + "cc": 62, + "sloc": 129, + "line": 135, + "mass": 704.18 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "name": "sqlSave", + "cc": 62, + "sloc": 270, + "line": 1533, + "mass": 1018.76 + }, + { + "path": "openmeter/ent/db/entitlement_update.go", + "name": "sqlSave", + "cc": 62, + "sloc": 299, + "line": 1029, + "mass": 1072.08 + }, + { + "path": "openmeter/ent/db/llmcostprice.go", + "name": "assignValues", + "cc": 62, + "sloc": 133, + "line": 86, + "mass": 715.02 + }, + { + "path": "openmeter/ent/db/planratecard.go", + "name": "assignValues", + "cc": 62, + "sloc": 143, + "line": 144, + "mass": 741.41 + }, + { + "path": "cmd/server/wire_gen.go", + "name": "initializeApplication", + "cc": 61, + "sloc": 797, + "line": 54, + "mass": 1722.1 + }, + { + "path": "openmeter/ent/db/chargeusagebased_update.go", + "name": "sqlSave", + "cc": 61, + "sloc": 318, + "line": 622, + "mass": 1087.79 + }, + { + "path": "openmeter/ent/db/subscription.go", + "name": "assignValues", + "cc": 61, + "sloc": 130, + "line": 213, + "mass": 695.51 + }, + { + "path": "openmeter/notification/eventhandler/webhook.go", + "name": "reconcileWebhookEvent", + "cc": 61, + "sloc": 344, + "line": 30, + "mass": 1131.38 + }, + { + "path": "openmeter/ent/db/chargeflatfee_update.go", + "name": "sqlSave", + "cc": 60, + "sloc": 288, + "line": 656, + "mass": 1018.23 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "name": "assignValues", + "cc": 60, + "sloc": 126, + "line": 106, + "mass": 673.5 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "name": "assignValues", + "cc": 60, + "sloc": 126, + "line": 106, + "mass": 673.5 + }, + { + "path": "openmeter/ent/db/subscriptionphase_update.go", + "name": "sqlSave", + "cc": 60, + "sloc": 346, + "line": 1123, + "mass": 1116.06 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "name": "sqlSave", + "cc": 59, + "sloc": 264, + "line": 644, + "mass": 958.64 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_update.go", + "name": "sqlSave", + "cc": 59, + "sloc": 282, + "line": 1304, + "mass": 990.78 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "check", + "cc": 59, + "sloc": 129, + "line": 516, + "mass": 670.11 + }, + { + "path": "openmeter/streaming/clickhouse/meter_query.go", + "name": "toSQL", + "cc": 59, + "sloc": 215, + "line": 108, + "mass": 865.11 + }, + { + "path": "openmeter/app/stripe/httpdriver/webhook.go", + "name": "AppStripeWebhook", + "cc": 58, + "sloc": 354, + "line": 40, + "mass": 1091.26 + }, + { + "path": "openmeter/ent/db/app_update.go", + "name": "sqlSave", + "cc": 58, + "sloc": 363, + "line": 414, + "mass": 1105.05 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "name": "assignValues", + "cc": 57, + "sloc": 123, + "line": 119, + "mass": 632.16 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment.go", + "name": "assignValues", + "cc": 57, + "sloc": 123, + "line": 119, + "mass": 632.16 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "name": "sqlSave", + "cc": 57, + "sloc": 251, + "line": 650, + "mass": 903.05 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "name": "assignValues", + "cc": 57, + "sloc": 123, + "line": 105, + "mass": 632.16 + }, + { + "path": "openmeter/ent/db/entitlement_update.go", + "name": "sqlSave", + "cc": 57, + "sloc": 280, + "line": 382, + "mass": 953.79 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "check", + "cc": 56, + "sloc": 128, + "line": 427, + "mass": 633.57 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_update.go", + "name": "sqlSave", + "cc": 56, + "sloc": 313, + "line": 1299, + "mass": 990.74 + }, + { + "path": "openmeter/ent/db/meter.go", + "name": "assignValues", + "cc": 55, + "sloc": 114, + "line": 95, + "mass": 587.24 + }, + { + "path": "openmeter/ent/db/subscriptionphase_update.go", + "name": "sqlSave", + "cc": 55, + "sloc": 327, + "line": 406, + "mass": 994.57 + }, + { + "path": "openmeter/ent/db/billingprofile_update.go", + "name": "sqlSave", + "cc": 54, + "sloc": 240, + "line": 1137, + "mass": 836.56 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_update.go", + "name": "sqlSave", + "cc": 54, + "sloc": 263, + "line": 531, + "mass": 875.73 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_update.go", + "name": "sqlSave", + "cc": 54, + "sloc": 300, + "line": 1337, + "mass": 935.31 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "name": "sqlSave", + "cc": 53, + "sloc": 183, + "line": 1266, + "mass": 716.97 + }, + { + "path": "openmeter/ent/db/plan.go", + "name": "assignValues", + "cc": 53, + "sloc": 116, + "line": 123, + "mass": 570.83 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "createSpec", + "cc": 52, + "sloc": 311, + "line": 667, + "mass": 917.03 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount.go", + "name": "assignValues", + "cc": 51, + "sloc": 118, + "line": 109, + "mass": 554.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "name": "assignValues", + "cc": 51, + "sloc": 111, + "line": 101, + "mass": 537.32 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "createSpec", + "cc": 51, + "sloc": 299, + "line": 672, + "mass": 881.87 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "name": "assignValues", + "cc": 51, + "sloc": 109, + "line": 141, + "mass": 532.46 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "check", + "cc": 51, + "sloc": 117, + "line": 396, + "mass": 551.65 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "name": "assignValues", + "cc": 51, + "sloc": 109, + "line": 127, + "mass": 532.46 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_update.go", + "name": "sqlSave", + "cc": 51, + "sloc": 294, + "line": 511, + "mass": 874.47 + }, + { + "path": "pkg/timeutil/openperiod_test.go", + "name": "TestOpenPeriod", + "cc": 51, + "sloc": 852, + "line": 8, + "mass": 1488.64 + }, + { + "path": "openmeter/ent/db/addon.go", + "name": "assignValues", + "cc": 50, + "sloc": 110, + "line": 121, + "mass": 524.4 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "check", + "cc": 50, + "sloc": 114, + "line": 778, + "mass": 533.85 + }, + { + "path": "openmeter/ent/db/addon_update.go", + "name": "sqlSave", + "cc": 49, + "sloc": 233, + "line": 917, + "mass": 747.95 + }, + { + "path": "openmeter/ent/db/billingprofile_update.go", + "name": "sqlSave", + "cc": 49, + "sloc": 221, + "line": 465, + "mass": 728.44 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "check", + "cc": 49, + "sloc": 115, + "line": 430, + "mass": 525.47 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "createSpec", + "cc": 49, + "sloc": 289, + "line": 636, + "mass": 833.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_update.go", + "name": "sqlSave", + "cc": 49, + "sloc": 281, + "line": 537, + "mass": 821.39 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute.go", + "name": "assignValues", + "cc": 49, + "sloc": 110, + "line": 113, + "mass": 513.92 + }, + { + "path": "openmeter/ent/db/plan_update.go", + "name": "sqlSave", + "cc": 49, + "sloc": 233, + "line": 959, + "mass": 747.95 + }, + { + "path": "openmeter/ent/db/addonratecard_update.go", + "name": "sqlSave", + "cc": 48, + "sloc": 212, + "line": 970, + "mass": 698.89 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "name": "sqlSave", + "cc": 48, + "sloc": 216, + "line": 946, + "mass": 705.45 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "name": "sqlSave", + "cc": 48, + "sloc": 164, + "line": 559, + "mass": 614.7 + }, + { + "path": "openmeter/ent/db/planratecard_update.go", + "name": "sqlSave", + "cc": 48, + "sloc": 212, + "line": 970, + "mass": 698.89 + }, + { + "path": "openmeter/app/stripe/client/checkout.go", + "name": "CreateCheckoutSession", + "cc": 47, + "sloc": 169, + "line": 21, + "mass": 611.0 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Validate", + "cc": 47, + "sloc": 148, + "line": 694, + "mass": 571.78 + }, + { + "path": "cmd/jobs/internal/wire_gen.go", + "name": "initializeApplication", + "cc": 46, + "sloc": 571, + "line": 44, + "mass": 1099.2 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "sqlAll", + "cc": 46, + "sloc": 189, + "line": 1019, + "mass": 632.4 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "createSpec", + "cc": 45, + "sloc": 263, + "line": 538, + "mass": 729.78 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualLineBase", + "cc": 44, + "sloc": 25, + "line": 79, + "mass": 220.0 + }, + { + "path": "openmeter/ent/db/addon_update.go", + "name": "sqlSave", + "cc": 44, + "sloc": 214, + "line": 359, + "mass": 643.66 + }, + { + "path": "openmeter/ent/db/plan_update.go", + "name": "sqlSave", + "cc": 44, + "sloc": 214, + "line": 380, + "mass": 643.66 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "createSpec", + "cc": 44, + "sloc": 312, + "line": 483, + "mass": 777.19 + }, + { + "path": "openmeter/ent/db/addonratecard_update.go", + "name": "sqlSave", + "cc": 43, + "sloc": 193, + "line": 396, + "mass": 597.38 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "name": "sqlSave", + "cc": 43, + "sloc": 197, + "line": 382, + "mass": 603.53 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "check", + "cc": 43, + "sloc": 97, + "line": 512, + "mass": 423.5 + }, + { + "path": "openmeter/ent/db/planratecard_update.go", + "name": "sqlSave", + "cc": 43, + "sloc": 193, + "line": 396, + "mass": 597.38 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsPrice", + "cc": 43, + "sloc": 156, + "line": 565, + "mass": 537.07 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_update.go", + "name": "sqlSave", + "cc": 42, + "sloc": 170, + "line": 916, + "mass": 547.61 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "name": "assignValues", + "cc": 42, + "sloc": 97, + "line": 97, + "mass": 413.65 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "name": "assignValues", + "cc": 42, + "sloc": 97, + "line": 97, + "mass": 413.65 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "check", + "cc": 42, + "sloc": 90, + "line": 284, + "mass": 398.45 + }, + { + "path": "openmeter/ent/db/planphase.go", + "name": "assignValues", + "cc": 42, + "sloc": 91, + "line": 104, + "mass": 400.65 + }, + { + "path": "openmeter/ent/db/subscriptionphase.go", + "name": "assignValues", + "cc": 42, + "sloc": 91, + "line": 158, + "mass": 400.65 + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "name": "ListInvoices", + "cc": 41, + "sloc": 153, + "line": 119, + "mass": 507.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "createSpec", + "cc": 41, + "sloc": 216, + "line": 579, + "mass": 602.57 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "check", + "cc": 41, + "sloc": 99, + "line": 415, + "mass": 407.94 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus.go", + "name": "assignValues", + "cc": 41, + "sloc": 85, + "line": 87, + "mass": 378.0 + }, + { + "path": "openmeter/ent/db/planaddon.go", + "name": "assignValues", + "cc": 41, + "sloc": 86, + "line": 105, + "mass": 380.22 + }, + { + "path": "openmeter/entitlement/metered/balance.go", + "name": "GetEntitlementBalanceHistory", + "cc": 41, + "sloc": 212, + "line": 109, + "mass": 596.97 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFiltersValue", + "cc": 40, + "sloc": 109, + "line": 93, + "mass": 417.61 + }, + { + "path": "openmeter/ent/db/balancesnapshot.go", + "name": "assignValues", + "cc": 40, + "sloc": 85, + "line": 93, + "mass": 368.78 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue.go", + "name": "assignValues", + "cc": 40, + "sloc": 89, + "line": 90, + "mass": 377.36 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "createSpec", + "cc": 40, + "sloc": 211, + "line": 569, + "mass": 581.03 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_update.go", + "name": "sqlSave", + "cc": 40, + "sloc": 184, + "line": 935, + "mass": 542.59 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "createSpec", + "cc": 40, + "sloc": 252, + "line": 538, + "mass": 634.98 + }, + { + "path": "openmeter/ent/db/notificationchannel.go", + "name": "assignValues", + "cc": 40, + "sloc": 85, + "line": 91, + "mass": 368.78 + }, + { + "path": "openmeter/ent/db/notificationrule.go", + "name": "assignValues", + "cc": 40, + "sloc": 85, + "line": 102, + "mass": 368.78 + }, + { + "path": "openmeter/ent/db/taxcode.go", + "name": "assignValues", + "cc": 40, + "sloc": 86, + "line": 243, + "mass": 370.94 + }, + { + "path": "api/v3/handlers/customers/billing/convert.gen.go", + "name": "init", + "cc": 39, + "sloc": 195, + "line": 13, + "mass": 544.61 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "createSpec", + "cc": 39, + "sloc": 244, + "line": 514, + "mass": 609.2 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "createSpec", + "cc": 39, + "sloc": 254, + "line": 520, + "mass": 621.56 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "name": "sqlSave", + "cc": 38, + "sloc": 139, + "line": 767, + "mass": 448.01 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "ListEntitlements", + "cc": 38, + "sloc": 149, + "line": 378, + "mass": 463.85 + }, + { + "path": "openmeter/ledger/routing.go", + "name": "Matches", + "cc": 38, + "sloc": 54, + "line": 223, + "mass": 279.24 + }, + { + "path": "cmd/billing-worker/wire_gen.go", + "name": "initializeApplication", + "cc": 37, + "sloc": 477, + "line": 27, + "mass": 808.09 + }, + { + "path": "openmeter/apiconverter/filter.gen.go", + "name": "init", + "cc": 37, + "sloc": 220, + "line": 11, + "mass": 548.8 + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "name": "updateInvoice", + "cc": 37, + "sloc": 162, + "line": 272, + "mass": 470.93 + }, + { + "path": "openmeter/ent/db/appstripe.go", + "name": "assignValues", + "cc": 37, + "sloc": 81, + "line": 98, + "mass": 333.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_update.go", + "name": "sqlSave", + "cc": 37, + "sloc": 151, + "line": 390, + "mass": 454.66 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "createSpec", + "cc": 37, + "sloc": 182, + "line": 537, + "mass": 499.16 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "createSpec", + "cc": 37, + "sloc": 221, + "line": 502, + "mass": 550.04 + }, + { + "path": "openmeter/ent/db/notificationrule_update.go", + "name": "sqlSave", + "cc": 37, + "sloc": 170, + "line": 659, + "mass": 482.42 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "check", + "cc": 36, + "sloc": 72, + "line": 310, + "mass": 305.47 + }, + { + "path": "openmeter/ent/db/app.go", + "name": "assignValues", + "cc": 36, + "sloc": 78, + "line": 150, + "mass": 317.94 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "check", + "cc": 36, + "sloc": 88, + "line": 388, + "mass": 337.71 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "createSpec", + "cc": 36, + "sloc": 219, + "line": 500, + "mass": 532.75 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "createSpec", + "cc": 36, + "sloc": 210, + "line": 492, + "mass": 521.69 + }, + { + "path": "openmeter/ent/db/ledgerentry.go", + "name": "assignValues", + "cc": 36, + "sloc": 77, + "line": 104, + "mass": 315.9 + }, + { + "path": "openmeter/ent/db/llmcostprice_update.go", + "name": "sqlSave", + "cc": 36, + "sloc": 113, + "line": 768, + "mass": 382.69 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "check", + "cc": 36, + "sloc": 72, + "line": 310, + "mass": 305.47 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "check", + "cc": 36, + "sloc": 72, + "line": 439, + "mass": 305.47 + }, + { + "path": "openmeter/ent/db/usagereset.go", + "name": "assignValues", + "cc": 36, + "sloc": 77, + "line": 88, + "mass": 315.9 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "createSpec", + "cc": 35, + "sloc": 209, + "line": 476, + "mass": 505.99 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_update.go", + "name": "sqlSave", + "cc": 35, + "sloc": 165, + "line": 393, + "mass": 449.58 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "name": "sqlSave", + "cc": 35, + "sloc": 176, + "line": 784, + "mass": 464.33 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "sqlAll", + "cc": 35, + "sloc": 174, + "line": 875, + "mass": 461.68 + }, + { + "path": "openmeter/app/stripe/appcustomer.go", + "name": "ValidateCustomerByID", + "cc": 34, + "sloc": 134, + "line": 24, + "mass": 393.58 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualGatheringLineBase", + "cc": 34, + "sloc": 23, + "line": 11, + "mass": 163.06 + }, + { + "path": "openmeter/ent/db/billinginvoice_update.go", + "name": "check", + "cc": 34, + "sloc": 56, + "line": 1166, + "mass": 254.43 + }, + { + "path": "openmeter/ent/db/billinginvoice_update.go", + "name": "check", + "cc": 34, + "sloc": 56, + "line": 2900, + "mass": 254.43 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "name": "sqlSave", + "cc": 34, + "sloc": 153, + "line": 710, + "mass": 420.56 + }, + { + "path": "openmeter/ent/db/meter_update.go", + "name": "sqlSave", + "cc": 34, + "sloc": 133, + "line": 594, + "mass": 392.11 + }, + { + "path": "openmeter/ent/db/planphase_update.go", + "name": "sqlSave", + "cc": 34, + "sloc": 153, + "line": 645, + "mass": 420.56 + }, + { + "path": "test/app/stripe/invoice_test.go", + "name": "TestComplexInvoice", + "cc": 34, + "sloc": 844, + "line": 170, + "mass": 987.76 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "CreateStandardInvoiceFromGatheringLines", + "cc": 33, + "sloc": 180, + "line": 621, + "mass": 442.74 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "name": "sqlSave", + "cc": 33, + "sloc": 120, + "line": 330, + "mass": 361.5 + }, + { + "path": "openmeter/ent/db/charge_update.go", + "name": "sqlSave", + "cc": 33, + "sloc": 184, + "line": 540, + "mass": 447.63 + }, + { + "path": "openmeter/ent/db/subject.go", + "name": "assignValues", + "cc": 33, + "sloc": 73, + "line": 60, + "mass": 281.95 + }, + { + "path": "openmeter/subscription/addon/diff/restore.go", + "name": "restore", + "cc": 33, + "sloc": 113, + "line": 15, + "mass": 350.79 + }, + { + "path": "pkg/framework/entutils/transaction_test.go", + "name": "TestTransaction", + "cc": 33, + "sloc": 310, + "line": 109, + "mass": 581.02 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync.go", + "name": "synchronizeSubscription", + "cc": 32, + "sloc": 140, + "line": 88, + "mass": 378.63 + }, + { + "path": "openmeter/ent/db/billinginvoice.go", + "name": "String", + "cc": 32, + "sloc": 244, + "line": 799, + "mass": 499.86 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "name": "sqlSave", + "cc": 32, + "sloc": 121, + "line": 629, + "mass": 352.0 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "createSpec", + "cc": 32, + "sloc": 196, + "line": 468, + "mass": 448.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "name": "sqlSave", + "cc": 32, + "sloc": 121, + "line": 629, + "mass": 352.0 + }, + { + "path": "openmeter/ent/db/notificationrule_update.go", + "name": "sqlSave", + "cc": 32, + "sloc": 151, + "line": 261, + "mass": 393.22 + }, + { + "path": "openmeter/sink/sink.go", + "name": "flush", + "cc": 32, + "sloc": 126, + "line": 259, + "mass": 359.2 + }, + { + "path": "e2e/entitlement_parity_test.go", + "name": "TestEntitlementParitySuite", + "cc": 31, + "sloc": 347, + "line": 23, + "mass": 577.47 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "check", + "cc": 31, + "sloc": 69, + "line": 313, + "mass": 257.51 + }, + { + "path": "openmeter/ent/db/charge.go", + "name": "assignValues", + "cc": 31, + "sloc": 73, + "line": 143, + "mass": 264.86 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage.go", + "name": "assignValues", + "cc": 31, + "sloc": 68, + "line": 97, + "mass": 255.63 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment.go", + "name": "assignValues", + "cc": 31, + "sloc": 72, + "line": 85, + "mass": 263.04 + }, + { + "path": "openmeter/ent/db/currencycostbasis.go", + "name": "assignValues", + "cc": 31, + "sloc": 69, + "line": 85, + "mass": 257.51 + }, + { + "path": "openmeter/ent/db/llmcostprice_update.go", + "name": "sqlSave", + "cc": 31, + "sloc": 94, + "line": 343, + "mass": 300.56 + }, + { + "path": "openmeter/ent/db/notificationchannel_update.go", + "name": "sqlSave", + "cc": 31, + "sloc": 125, + "line": 541, + "mass": 346.59 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "check", + "cc": 31, + "sloc": 69, + "line": 424, + "mass": 257.51 + }, + { + "path": "openmeter/entitlement/driver/v2/mapping.go", + "name": "ParseAPICreateInputV2", + "cc": 31, + "sloc": 152, + "line": 245, + "mass": 382.19 + }, + { + "path": "openmeter/streaming/clickhouse/event_query_test.go", + "name": "TestInsertEventsQuery", + "cc": 31, + "sloc": 52, + "line": 175, + "mass": 223.54 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "ExpandViews", + "cc": 31, + "sloc": 173, + "line": 477, + "mass": 407.74 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_get_deserialize_callable_from_annotation", + "cc": 30, + "sloc": 88, + "line": 877, + "mass": 281.42 + }, + { + "path": "collector/benthos/input/kubernetes.go", + "name": "ReadBatch", + "cc": 30, + "sloc": 107, + "line": 181, + "mass": 310.32 + }, + { + "path": "openmeter/ent/db/appstripecustomer.go", + "name": "assignValues", + "cc": 30, + "sloc": 70, + "line": 97, + "mass": 251.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 606, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 612, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 157, + "line": 320, + "mass": 375.9 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 633, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 612, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 633, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 94, + "line": 606, + "mass": 290.86 + }, + { + "path": "openmeter/ent/db/ledgersubaccount.go", + "name": "assignValues", + "cc": 30, + "sloc": 65, + "line": 108, + "mass": 241.87 + }, + { + "path": "openmeter/ent/db/ledgertransaction.go", + "name": "assignValues", + "cc": 30, + "sloc": 65, + "line": 94, + "mass": 241.87 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "name": "sqlSave", + "cc": 30, + "sloc": 123, + "line": 514, + "mass": 332.72 + }, + { + "path": "openmeter/ent/db/subscriptionaddon.go", + "name": "assignValues", + "cc": 30, + "sloc": 65, + "line": 107, + "mass": 241.87 + }, + { + "path": "openmeter/entitlement/entitlement.go", + "name": "Equal", + "cc": 30, + "sloc": 66, + "line": 105, + "mass": 243.72 + }, + { + "path": "test/billing/invoice_test.go", + "name": "TestUBPProgressiveInvoicing", + "cc": 30, + "sloc": 793, + "line": 1426, + "mass": 844.81 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "FromAPIBillingRateCard", + "cc": 29, + "sloc": 113, + "line": 503, + "mass": 308.27 + }, + { + "path": "api/v3/server/server.go", + "name": "Validate", + "cc": 29, + "sloc": 87, + "line": 111, + "mass": 270.49 + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditheninvoice.go", + "name": "generateInvoicePatches", + "cc": 29, + "sloc": 152, + "line": 310, + "mass": 357.54 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "prepareBillableLines", + "cc": 29, + "sloc": 130, + "line": 98, + "mass": 330.65 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "calculateGatheringInvoiceAsStandardInvoice", + "cc": 29, + "sloc": 137, + "line": 163, + "mass": 339.44 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "toString", + "cc": 29, + "sloc": 72, + "line": 653, + "mass": 246.07 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "createSpec", + "cc": 29, + "sloc": 159, + "line": 409, + "mass": 365.68 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer.go", + "name": "assignValues", + "cc": 29, + "sloc": 65, + "line": 98, + "mass": 233.81 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "name": "sqlSave", + "cc": 29, + "sloc": 134, + "line": 294, + "mass": 335.7 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "name": "check", + "cc": 29, + "sloc": 49, + "line": 600, + "mass": 203.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "name": "check", + "cc": 29, + "sloc": 49, + "line": 1483, + "mass": 203.0 + }, + { + "path": "openmeter/ent/db/ledgeraccount_update.go", + "name": "sqlSave", + "cc": 29, + "sloc": 145, + "line": 483, + "mass": 349.21 + }, + { + "path": "openmeter/ent/db/meter_update.go", + "name": "sqlSave", + "cc": 29, + "sloc": 114, + "line": 246, + "mass": 309.64 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "check", + "cc": 29, + "sloc": 63, + "line": 314, + "mass": 230.18 + }, + { + "path": "openmeter/ent/db/planphase_update.go", + "name": "sqlSave", + "cc": 29, + "sloc": 134, + "line": 262, + "mass": 335.7 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "createSpec", + "cc": 29, + "sloc": 159, + "line": 409, + "mass": 365.68 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "PublishPlan", + "cc": 29, + "sloc": 135, + "line": 364, + "mass": 336.95 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "_serialize", + "cc": 28, + "sloc": 99, + "line": 526, + "mass": 278.6 + }, + { + "path": "app/config/config.go", + "name": "Validate", + "cc": 28, + "sloc": 98, + "line": 58, + "mass": 277.19 + }, + { + "path": "cmd/server/main.go", + "name": "main", + "cc": 28, + "sloc": 249, + "line": 30, + "mass": 441.83 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "CreateCheckoutSession", + "cc": 28, + "sloc": 134, + "line": 346, + "mass": 324.12 + }, + { + "path": "openmeter/billing/charges/service/create.go", + "name": "Create", + "cc": 28, + "sloc": 157, + "line": 79, + "mass": 350.84 + }, + { + "path": "openmeter/credit/engine/engine_test.go", + "name": "Test_Fuzzing", + "cc": 28, + "sloc": 323, + "line": 25, + "mass": 503.22 + }, + { + "path": "openmeter/credit/engine/run.go", + "name": "runBetweenResets", + "cc": 28, + "sloc": 127, + "line": 122, + "mass": 315.54 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "UpdateCustomer", + "cc": 28, + "sloc": 173, + "line": 556, + "mass": 368.28 + }, + { + "path": "openmeter/ent/db/charge_update.go", + "name": "sqlSave", + "cc": 28, + "sloc": 165, + "line": 194, + "mass": 359.67 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant.go", + "name": "assignValues", + "cc": 28, + "sloc": 63, + "line": 79, + "mass": 222.24 + }, + { + "path": "openmeter/ent/db/customcurrency.go", + "name": "assignValues", + "cc": 28, + "sloc": 63, + "line": 76, + "mass": 222.24 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount.go", + "name": "assignValues", + "cc": 28, + "sloc": 63, + "line": 56, + "mass": 222.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_update.go", + "name": "sqlSave", + "cc": 28, + "sloc": 115, + "line": 371, + "mass": 300.27 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity.go", + "name": "assignValues", + "cc": 28, + "sloc": 63, + "line": 81, + "mass": 222.24 + }, + { + "path": "openmeter/meterevent/service.go", + "name": "Validate", + "cc": 28, + "sloc": 65, + "line": 173, + "mass": 225.74 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Equal", + "cc": 28, + "sloc": 42, + "line": 275, + "mass": 181.46 + }, + { + "path": "openmeter/server/router/router.go", + "name": "Validate", + "cc": 28, + "sloc": 85, + "line": 144, + "mass": 258.15 + }, + { + "path": "openmeter/subscription/addon/diff/apply.go", + "name": "getApplyForRateCard", + "cc": 28, + "sloc": 150, + "line": 15, + "mass": 342.93 + }, + { + "path": "openmeter/subscription/subscriptionview.go", + "name": "Validate", + "cc": 28, + "sloc": 95, + "line": 119, + "mass": 272.91 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "Intersection", + "cc": 28, + "sloc": 65, + "line": 82, + "mass": 225.74 + }, + { + "path": "api/v3/handlers/billingprofiles/convert.go", + "name": "FromAPIBillingWorkflow", + "cc": 27, + "sloc": 101, + "line": 260, + "mass": 271.35 + }, + { + "path": "openmeter/billing/adapter/customeroverride.go", + "name": "ListCustomerOverrides", + "cc": 27, + "sloc": 115, + "line": 172, + "mass": 289.54 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualUsageBasedLine", + "cc": 27, + "sloc": 12, + "line": 105, + "mass": 93.53 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go", + "name": "TestPhaseIterator", + "cc": 27, + "sloc": 1190, + "line": 60, + "mass": 931.4 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "sqlAll", + "cc": 27, + "sloc": 122, + "line": 730, + "mass": 298.22 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "name": "sqlSave", + "cc": 27, + "sloc": 102, + "line": 270, + "mass": 272.69 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go", + "name": "assignValues", + "cc": 27, + "sloc": 66, + "line": 58, + "mass": 219.35 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "name": "sqlSave", + "cc": 27, + "sloc": 105, + "line": 568, + "mass": 276.67 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "check", + "cc": 27, + "sloc": 65, + "line": 379, + "mass": 217.68 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "name": "sqlSave", + "cc": 27, + "sloc": 102, + "line": 270, + "mass": 272.69 + }, + { + "path": "openmeter/ent/db/chargeflatfee_update.go", + "name": "check", + "cc": 27, + "sloc": 46, + "line": 609, + "mass": 183.12 + }, + { + "path": "openmeter/ent/db/chargeflatfee_update.go", + "name": "check", + "cc": 27, + "sloc": 46, + "line": 1533, + "mass": 183.12 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "check", + "cc": 27, + "sloc": 61, + "line": 277, + "mass": 210.88 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "check", + "cc": 27, + "sloc": 61, + "line": 257, + "mass": 210.88 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "check", + "cc": 27, + "sloc": 57, + "line": 167, + "mass": 203.85 + }, + { + "path": "openmeter/ent/db/ledgeraccount.go", + "name": "assignValues", + "cc": 27, + "sloc": 59, + "line": 90, + "mass": 207.39 + }, + { + "path": "openmeter/ent/db/notificationevent.go", + "name": "assignValues", + "cc": 27, + "sloc": 58, + "line": 93, + "mass": 205.63 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "createSpec", + "cc": 27, + "sloc": 181, + "line": 369, + "mass": 363.25 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "name": "ListPlanAddons", + "cc": 27, + "sloc": 108, + "line": 21, + "mass": 280.59 + }, + { + "path": "openmeter/streaming/clickhouse/event_query_v2.go", + "name": "toSQL", + "cc": 27, + "sloc": 98, + "line": 21, + "mass": 267.29 + }, + { + "path": "openmeter/subscription/addon/extend.go", + "name": "Restore", + "cc": 27, + "sloc": 94, + "line": 105, + "mass": 261.77 + }, + { + "path": "openmeter/subscription/patch/additem.go", + "name": "ApplyTo", + "cc": 27, + "sloc": 88, + "line": 64, + "mass": 253.28 + }, + { + "path": "openmeter/subscription/service/service_test.go", + "name": "TestCancellation", + "cc": 27, + "sloc": 96, + "line": 244, + "mass": 264.54 + }, + { + "path": "openmeter/subscription/subscriptionview.go", + "name": "NewSubscriptionView", + "cc": 27, + "sloc": 191, + "line": 235, + "mass": 373.15 + }, + { + "path": "pkg/kafka/config.go", + "name": "AsConfigMap", + "cc": 27, + "sloc": 71, + "line": 62, + "mass": 227.51 + }, + { + "path": "api/v3/handlers/customers/billing/update_billing.go", + "name": "UpdateCustomerBilling", + "cc": 26, + "sloc": 154, + "line": 34, + "mass": 322.65 + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "name": "createInvoice", + "cc": 26, + "sloc": 102, + "line": 148, + "mass": 262.59 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "createSpec", + "cc": 26, + "sloc": 176, + "line": 340, + "mass": 344.93 + }, + { + "path": "openmeter/ent/db/appstripe_update.go", + "name": "sqlSave", + "cc": 26, + "sloc": 109, + "line": 511, + "mass": 271.45 + }, + { + "path": "openmeter/ent/db/chargeusagebased_update.go", + "name": "check", + "cc": 26, + "sloc": 44, + "line": 577, + "mass": 172.46 + }, + { + "path": "openmeter/ent/db/chargeusagebased_update.go", + "name": "check", + "cc": 26, + "sloc": 44, + "line": 1497, + "mass": 172.46 + }, + { + "path": "openmeter/ent/db/grant_update.go", + "name": "sqlSave", + "cc": 26, + "sloc": 82, + "line": 354, + "mass": 235.44 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "check", + "cc": 26, + "sloc": 62, + "line": 300, + "mass": 204.72 + }, + { + "path": "openmeter/ent/db/notificationchannel_update.go", + "name": "sqlSave", + "cc": 26, + "sloc": 106, + "line": 224, + "mass": 267.69 + }, + { + "path": "openmeter/meter/meter.go", + "name": "Equal", + "cc": 26, + "sloc": 54, + "line": 179, + "mass": 191.06 + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "name": "ListPlans", + "cc": 26, + "sloc": 116, + "line": 26, + "mass": 280.03 + }, + { + "path": "openmeter/streaming/testutils/streaming.go", + "name": "aggregateEvents", + "cc": 26, + "sloc": 79, + "line": 188, + "mass": 231.09 + }, + { + "path": "openmeter/subscription/timing.go", + "name": "ValidateForAction", + "cc": 26, + "sloc": 65, + "line": 89, + "mass": 209.62 + }, + { + "path": "pkg/filter/filter.go", + "name": "matches", + "cc": 26, + "sloc": 56, + "line": 290, + "mass": 194.57 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 25, + "sloc": 56, + "line": 1043, + "mass": 187.08 + }, + { + "path": "api/v3/handlers/meters/query/params.go", + "name": "BuildQueryParams", + "cc": 25, + "sloc": 75, + "line": 21, + "mass": 216.51 + }, + { + "path": "cmd/balance-worker/wire_gen.go", + "name": "initializeApplication", + "cc": 25, + "sloc": 323, + "line": 20, + "mass": 449.31 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelines.go", + "name": "UpsertInvoiceLines", + "cc": 25, + "sloc": 201, + "line": 36, + "mass": 354.44 + }, + { + "path": "openmeter/billing/charges/service/usagebased_test.go", + "name": "TestUsageBasedCreditThenInvoicePartialInvoiceLifecycle", + "cc": 25, + "sloc": 386, + "line": 39, + "mass": 491.17 + }, + { + "path": "openmeter/billing/service/stdinvoiceline.go", + "name": "CreatePendingInvoiceLines", + "cc": 25, + "sloc": 119, + "line": 26, + "mass": 272.72 + }, + { + "path": "openmeter/ent/db/appcustominvoicing.go", + "name": "assignValues", + "cc": 25, + "sloc": 57, + "line": 90, + "mass": 188.75 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "check", + "cc": 25, + "sloc": 55, + "line": 210, + "mass": 185.4 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "check", + "cc": 25, + "sloc": 55, + "line": 209, + "mass": 185.4 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "createSpec", + "cc": 25, + "sloc": 141, + "line": 406, + "mass": 296.86 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 272, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "check", + "cc": 25, + "sloc": 59, + "line": 269, + "mass": 192.03 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 275, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 285, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "check", + "cc": 25, + "sloc": 59, + "line": 263, + "mass": 192.03 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 275, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "sqlAll", + "cc": 25, + "sloc": 104, + "line": 695, + "mass": 254.95 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 285, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 75, + "line": 272, + "mass": 216.51 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "name": "sqlSave", + "cc": 25, + "sloc": 104, + "line": 212, + "mass": 254.95 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes.go", + "name": "assignValues", + "cc": 25, + "sloc": 57, + "line": 90, + "mass": 188.75 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "createSpec", + "cc": 25, + "sloc": 140, + "line": 404, + "mass": 295.8 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "sqlAll", + "cc": 25, + "sloc": 113, + "line": 696, + "mass": 265.75 + }, + { + "path": "openmeter/meter/httphandler/mapping.go", + "name": "toQueryParamsFromRequest", + "cc": 25, + "sloc": 77, + "line": 110, + "mass": 219.37 + }, + { + "path": "openmeter/sink/sink.go", + "name": "Run", + "cc": 25, + "sloc": 113, + "line": 634, + "mass": 265.75 + }, + { + "path": "openmeter/subject/httphandler/subject.go", + "name": "UpsertSubject", + "cc": 25, + "sloc": 124, + "line": 124, + "mass": 278.39 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "_deserialize", + "cc": 24, + "sloc": 65, + "line": 1410, + "mass": 193.49 + }, + { + "path": "api/v3/handlers/billingprofiles/convert.gen.go", + "name": "init", + "cc": 24, + "sloc": 189, + "line": 16, + "mass": 329.95 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "updateImmutableInvoice", + "cc": 24, + "sloc": 94, + "line": 525, + "mass": 232.69 + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated.go", + "name": "TieredPriceCalculator", + "cc": 24, + "sloc": 87, + "line": 193, + "mass": 223.86 + }, + { + "path": "openmeter/credit/engine/burnphase.go", + "name": "getPhases", + "cc": 24, + "sloc": 114, + "line": 34, + "mass": 256.25 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "check", + "cc": 24, + "sloc": 52, + "line": 296, + "mass": 173.07 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "createSpec", + "cc": 24, + "sloc": 136, + "line": 375, + "mass": 279.89 + }, + { + "path": "openmeter/ent/db/appcustomer.go", + "name": "assignValues", + "cc": 24, + "sloc": 57, + "line": 93, + "mass": 181.2 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "check", + "cc": 24, + "sloc": 48, + "line": 325, + "mass": 166.28 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "check", + "cc": 24, + "sloc": 52, + "line": 397, + "mass": 173.07 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "name": "check", + "cc": 24, + "sloc": 41, + "line": 517, + "mass": 153.67 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "name": "check", + "cc": 24, + "sloc": 41, + "line": 1224, + "mass": 153.67 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "check", + "cc": 24, + "sloc": 56, + "line": 251, + "mass": 179.6 + }, + { + "path": "openmeter/ent/db/customcurrency_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 103, + "line": 429, + "mass": 243.57 + }, + { + "path": "openmeter/ent/db/ledgeraccount_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 126, + "line": 185, + "mass": 269.4 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "createSpec", + "cc": 24, + "sloc": 112, + "line": 398, + "mass": 253.99 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 103, + "line": 390, + "mass": 243.57 + }, + { + "path": "openmeter/ent/db/ledgertransaction_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 103, + "line": 384, + "mass": 243.57 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup.go", + "name": "assignValues", + "cc": 24, + "sloc": 53, + "line": 76, + "mass": 174.72 + }, + { + "path": "openmeter/ent/db/planaddon_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 76, + "line": 396, + "mass": 209.23 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_update.go", + "name": "sqlSave", + "cc": 24, + "sloc": 103, + "line": 389, + "mass": 243.57 + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "name": "ParseAPICreateInput", + "cc": 24, + "sloc": 125, + "line": 242, + "mass": 268.33 + }, + { + "path": "openmeter/entitlement/metered/balance_test.go", + "name": "TestGetEntitlementBalance", + "cc": 24, + "sloc": 681, + "line": 34, + "mass": 626.3 + }, + { + "path": "openmeter/notification/webhook/svix/message.go", + "name": "getDeliveryStatus", + "cc": 24, + "sloc": 117, + "line": 105, + "mass": 259.6 + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "name": "ListAddons", + "cc": 24, + "sloc": 102, + "line": 28, + "mass": 242.39 + }, + { + "path": "openmeter/productcatalog/feature/unitcost.go", + "name": "Validate", + "cc": 24, + "sloc": 62, + "line": 69, + "mass": 188.98 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "NextPlan", + "cc": 24, + "sloc": 115, + "line": 599, + "mass": 257.37 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_get_element", + "cc": 23, + "sloc": 88, + "line": 1268, + "mass": 215.76 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "executeTriggerOnInvoice", + "cc": 23, + "sloc": 90, + "line": 658, + "mass": 218.2 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "assertCharge", + "cc": 23, + "sloc": 116, + "line": 480, + "mass": 247.72 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "name": "Plan", + "cc": 23, + "sloc": 95, + "line": 217, + "mass": 224.18 + }, + { + "path": "openmeter/credit/adapter/grant.go", + "name": "ListGrants", + "cc": 23, + "sloc": 111, + "line": 83, + "mass": 242.32 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 100, + "line": 396, + "mass": 230.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "createSpec", + "cc": 23, + "sloc": 135, + "line": 397, + "mass": 267.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 74, + "line": 362, + "mass": 197.85 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "name": "check", + "cc": 23, + "sloc": 39, + "line": 604, + "mass": 143.63 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "name": "check", + "cc": 23, + "sloc": 39, + "line": 1493, + "mass": 143.63 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "sqlAll", + "cc": 23, + "sloc": 93, + "line": 660, + "mass": 221.8 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "sqlAll", + "cc": 23, + "sloc": 94, + "line": 659, + "mass": 222.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "sqlAll", + "cc": 23, + "sloc": 102, + "line": 659, + "mass": 232.29 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "sqlAll", + "cc": 23, + "sloc": 105, + "line": 660, + "mass": 235.68 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 73, + "line": 294, + "mass": 196.51 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 96, + "line": 143, + "mass": 225.35 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 100, + "line": 365, + "mass": 230.0 + }, + { + "path": "openmeter/ent/db/subject_update.go", + "name": "sqlSave", + "cc": 23, + "sloc": 73, + "line": 392, + "mass": 196.51 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "ListWebhooks", + "cc": 23, + "sloc": 78, + "line": 455, + "mass": 203.13 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "NextAddon", + "cc": 23, + "sloc": 95, + "line": 561, + "mass": 224.18 + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "name": "MapAPISubscriptionEditOperationToPatch", + "cc": 23, + "sloc": 121, + "line": 26, + "mass": 253.0 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 23, + "sloc": 76, + "line": 199, + "mass": 200.51 + }, + { + "path": "pkg/kafka/metrics/internal/broker.go", + "name": "NewBrokerMetrics", + "cc": 23, + "sloc": 165, + "line": 384, + "mass": 295.44 + }, + { + "path": "pkg/kafka/metrics/internal/topic.go", + "name": "NewTopicBatchMetrics", + "cc": 23, + "sloc": 161, + "line": 99, + "mass": 291.84 + }, + { + "path": "api/client/javascript/src/client/utils.ts", + "name": "isIsoDateString", + "cc": 22, + "sloc": 43, + "line": 38, + "mass": 144.26 + }, + { + "path": "openmeter/app/stripe/httpdriver/checkout_session.go", + "name": "CreateAppStripeCheckoutSession", + "cc": 22, + "sloc": 118, + "line": 27, + "mass": 238.98 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go", + "name": "buildDetailsByEpoch", + "cc": 22, + "sloc": 115, + "line": 185, + "mass": 235.92 + }, + { + "path": "openmeter/billing/creditgrant/service.go", + "name": "Validate", + "cc": 22, + "sloc": 53, + "line": 74, + "mass": 160.16 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "EnsureCustomer", + "cc": 22, + "sloc": 125, + "line": 369, + "mass": 245.97 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "name": "assignValues", + "cc": 22, + "sloc": 51, + "line": 55, + "mass": 157.11 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "name": "sqlSave", + "cc": 22, + "sloc": 86, + "line": 247, + "mass": 204.02 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "check", + "cc": 22, + "sloc": 50, + "line": 245, + "mass": 155.56 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "createSpec", + "cc": 22, + "sloc": 139, + "line": 362, + "mass": 259.38 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "check", + "cc": 22, + "sloc": 58, + "line": 232, + "mass": 167.55 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "check", + "cc": 22, + "sloc": 58, + "line": 232, + "mass": 167.55 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "name": "sqlSave", + "cc": 22, + "sloc": 70, + "line": 403, + "mass": 184.07 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "createSpec", + "cc": 22, + "sloc": 104, + "line": 389, + "mass": 224.36 + }, + { + "path": "openmeter/ent/db/notificationevent_update.go", + "name": "sqlSave", + "cc": 22, + "sloc": 97, + "line": 335, + "mass": 216.67 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_update.go", + "name": "sqlSave", + "cc": 22, + "sloc": 110, + "line": 400, + "mass": 230.74 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate.go", + "name": "assignValues", + "cc": 22, + "sloc": 51, + "line": 77, + "mass": 157.11 + }, + { + "path": "openmeter/subscription/addon/service/service.go", + "name": "Create", + "cc": 22, + "sloc": 98, + "line": 86, + "mass": 217.79 + }, + { + "path": "pkg/kafka/config.go", + "name": "UnmarshalText", + "cc": 22, + "sloc": 47, + "line": 565, + "mass": 150.82 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "xml_key_extractor", + "cc": 21, + "sloc": 62, + "line": 1281, + "mass": 165.35 + }, + { + "path": "cmd/sink-worker/wire_gen.go", + "name": "initializeApplication", + "cc": 21, + "sloc": 271, + "line": 31, + "mass": 345.7 + }, + { + "path": "openmeter/app/stripe/types.go", + "name": "Validate", + "cc": 21, + "sloc": 51, + "line": 295, + "mass": 149.97 + }, + { + "path": "openmeter/billing/charges/lineage/service.go", + "name": "Validate", + "cc": 21, + "sloc": 48, + "line": 170, + "mass": 145.49 + }, + { + "path": "openmeter/billing/worker/worker.go", + "name": "eventHandler", + "cc": 21, + "sloc": 67, + "line": 148, + "mass": 171.89 + }, + { + "path": "openmeter/credit/engine/grant.go", + "name": "getGrantRecurrenceTimes", + "cc": 21, + "sloc": 82, + "line": 66, + "mass": 190.16 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "ListCustomers", + "cc": 21, + "sloc": 102, + "line": 34, + "mass": 212.09 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "CreateCustomer", + "cc": 21, + "sloc": 115, + "line": 227, + "mass": 225.2 + }, + { + "path": "openmeter/ent/db/addonratecard_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 359, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/addonratecard_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 933, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/appstripe_update.go", + "name": "sqlSave", + "cc": 21, + "sloc": 90, + "line": 216, + "mass": 199.22 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "check", + "cc": 21, + "sloc": 47, + "line": 169, + "mass": 143.97 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 1157, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 3120, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 118, + "line": 352, + "mass": 228.12 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 109, + "line": 314, + "mass": 219.25 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 118, + "line": 346, + "mass": 228.12 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 126, + "line": 342, + "mass": 235.72 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 109, + "line": 314, + "mass": 219.25 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "check", + "cc": 21, + "sloc": 43, + "line": 182, + "mass": 137.71 + }, + { + "path": "openmeter/ent/db/customersubjects.go", + "name": "assignValues", + "cc": 21, + "sloc": 51, + "line": 77, + "mass": 149.97 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "createSpec", + "cc": 21, + "sloc": 109, + "line": 337, + "mass": 219.25 + }, + { + "path": "openmeter/ent/db/grant_update.go", + "name": "sqlSave", + "cc": 21, + "sloc": 63, + "line": 151, + "mass": 166.68 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "UpdateNewValues", + "cc": 21, + "sloc": 68, + "line": 949, + "mass": 173.17 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "check", + "cc": 21, + "sloc": 47, + "line": 263, + "mass": 143.97 + }, + { + "path": "openmeter/ent/db/planratecard_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 359, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/planratecard_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 933, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "sqlAll", + "cc": 21, + "sloc": 101, + "line": 624, + "mass": 211.05 + }, + { + "path": "openmeter/ent/db/subscriptionitem_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 611, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_update.go", + "name": "check", + "cc": 21, + "sloc": 36, + "line": 1665, + "mass": 126.0 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "check", + "cc": 21, + "sloc": 47, + "line": 298, + "mass": 143.97 + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "name": "issueCreditPurchaseGroup", + "cc": 21, + "sloc": 139, + "line": 193, + "mass": 247.59 + }, + { + "path": "openmeter/productcatalog/featureresolver/ratecard.go", + "name": "ResolveFeaturesForRateCards", + "cc": 21, + "sloc": 79, + "line": 15, + "mass": 186.65 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "FromRateCardUsageBasedPrice", + "cc": 21, + "sloc": 107, + "line": 119, + "mass": 217.23 + }, + { + "path": "openmeter/productcatalog/subscription/http/create.go", + "name": "CreateSubscription", + "cc": 21, + "sloc": 132, + "line": 30, + "mass": 241.27 + }, + { + "path": "openmeter/streaming/eventparams.go", + "name": "Validate", + "cc": 21, + "sloc": 53, + "line": 132, + "mass": 152.88 + }, + { + "path": "openmeter/subscription/service/service_test.go", + "name": "TestTaxCodeResolution", + "cc": 21, + "sloc": 244, + "line": 1113, + "mass": 328.03 + }, + { + "path": "pkg/kafka/metrics/metrics.go", + "name": "New", + "cc": 21, + "sloc": 131, + "line": 128, + "mass": 240.36 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "Difference", + "cc": 21, + "sloc": 35, + "line": 153, + "mass": 124.24 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_deserialize_with_callable", + "cc": 20, + "sloc": 35, + "line": 996, + "mass": 118.32 + }, + { + "path": "openmeter/billing/charges/service/create.go", + "name": "autoAdvanceCreatedCharges", + "cc": 20, + "sloc": 67, + "line": 260, + "mass": 163.71 + }, + { + "path": "openmeter/billing/charges/testutils/service.go", + "name": "NewServices", + "cc": 20, + "sloc": 139, + "line": 96, + "mass": 235.8 + }, + { + "path": "openmeter/billing/models/stddetailedline/derived.gen.go", + "name": "deriveEqualBase", + "cc": 20, + "sloc": 17, + "line": 11, + "mass": 82.46 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "gatherInScopeLines", + "cc": 20, + "sloc": 99, + "line": 305, + "mass": 199.0 + }, + { + "path": "openmeter/credit/balance.go", + "name": "ResetUsageForOwner", + "cc": 20, + "sloc": 111, + "line": 214, + "mass": 210.71 + }, + { + "path": "openmeter/ent/db/billinginvoiceline.go", + "name": "String", + "cc": 20, + "sloc": 175, + "line": 846, + "mass": 264.58 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "querySpec", + "cc": 20, + "sloc": 63, + "line": 1810, + "mass": 158.75 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "createSpec", + "cc": 20, + "sloc": 105, + "line": 340, + "mass": 204.94 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "createSpec", + "cc": 20, + "sloc": 147, + "line": 342, + "mass": 242.49 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "createSpec", + "cc": 20, + "sloc": 105, + "line": 331, + "mass": 204.94 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_update.go", + "name": "sqlSave", + "cc": 20, + "sloc": 91, + "line": 276, + "mass": 190.79 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "UpdateNewValues", + "cc": 20, + "sloc": 66, + "line": 615, + "mass": 162.48 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "createSpec", + "cc": 20, + "sloc": 113, + "line": 334, + "mass": 212.6 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "check", + "cc": 20, + "sloc": 44, + "line": 240, + "mass": 132.66 + }, + { + "path": "openmeter/entitlement/service/scheduling.go", + "name": "ScheduleEntitlement", + "cc": 20, + "sloc": 100, + "line": 20, + "mass": 200.0 + }, + { + "path": "openmeter/ledger/historical/adapter/ledger.go", + "name": "ListTransactions", + "cc": 20, + "sloc": 113, + "line": 273, + "mass": 212.6 + }, + { + "path": "openmeter/notification/adapter/event.go", + "name": "ListEvents", + "cc": 20, + "sloc": 93, + "line": 37, + "mass": 192.87 + }, + { + "path": "openmeter/notification/httpdriver/mapping.go", + "name": "FromEvent", + "cc": 20, + "sloc": 89, + "line": 444, + "mass": 188.68 + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "name": "Equal", + "cc": 20, + "sloc": 40, + "line": 220, + "mass": 126.49 + }, + { + "path": "openmeter/streaming/query_params.go", + "name": "Validate", + "cc": 20, + "sloc": 49, + "line": 29, + "mass": 140.0 + }, + { + "path": "openmeter/subscription/addon/service/service.go", + "name": "ChangeQuantity", + "cc": 20, + "sloc": 85, + "line": 221, + "mass": 184.39 + }, + { + "path": "openmeter/subscription/repo/subscriptionrepo.go", + "name": "List", + "cc": 20, + "sloc": 81, + "line": 154, + "mass": 180.0 + }, + { + "path": "pkg/filter/filter.go", + "name": "SelectWhereExpr", + "cc": 20, + "sloc": 48, + "line": 150, + "mass": 138.56 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "IsSupersetOf", + "cc": 20, + "sloc": 40, + "line": 234, + "mass": 126.49 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_serialize", + "cc": 19, + "sloc": 33, + "line": 526, + "mass": 109.15 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "ToAPIBillingPrice", + "cc": 19, + "sloc": 66, + "line": 169, + "mass": 154.36 + }, + { + "path": "app/common/charges.go", + "name": "newChargesRegistry", + "cc": 19, + "sloc": 137, + "line": 379, + "mass": 222.39 + }, + { + "path": "collector/benthos/input/run_ai.go", + "name": "newRunAIInput", + "cc": 19, + "sloc": 102, + "line": 161, + "mass": 191.89 + }, + { + "path": "openmeter/billing/charges/flatfee/realizationrun.go", + "name": "Validate", + "cc": 19, + "sloc": 43, + "line": 75, + "mass": 124.59 + }, + { + "path": "openmeter/billing/charges/service/advance.go", + "name": "AdvanceCharges", + "cc": 19, + "sloc": 81, + "line": 18, + "mass": 171.0 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "Validate", + "cc": 19, + "sloc": 49, + "line": 422, + "mass": 133.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "name": "diffItem", + "cc": 19, + "sloc": 50, + "line": 130, + "mass": 134.35 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "name": "generateForAlignedItemVersion", + "cc": 19, + "sloc": 79, + "line": 226, + "mass": 168.88 + }, + { + "path": "openmeter/currencies/service/service.go", + "name": "ListCurrencies", + "cc": 19, + "sloc": 80, + "line": 32, + "mass": 169.94 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "sqlAll", + "cc": 19, + "sloc": 98, + "line": 584, + "mass": 188.09 + }, + { + "path": "openmeter/ent/db/appstripecustomer_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 61, + "line": 328, + "mass": 148.39 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 61, + "line": 328, + "mass": 148.39 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "querySpec", + "cc": 19, + "sloc": 60, + "line": 1048, + "mass": 147.17 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "sqlAll", + "cc": 19, + "sloc": 85, + "line": 588, + "mass": 175.17 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "querySpec", + "cc": 19, + "sloc": 60, + "line": 1121, + "mass": 147.17 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "check", + "cc": 19, + "sloc": 41, + "line": 172, + "mass": 121.66 + }, + { + "path": "openmeter/ent/db/customcurrency_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 84, + "line": 178, + "mass": 174.14 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "check", + "cc": 19, + "sloc": 45, + "line": 420, + "mass": 127.46 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "sqlAll", + "cc": 19, + "sloc": 87, + "line": 588, + "mass": 177.22 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 84, + "line": 159, + "mass": 174.14 + }, + { + "path": "openmeter/ent/db/ledgertransaction_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 84, + "line": 156, + "mass": 174.14 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "createSpec", + "cc": 19, + "sloc": 100, + "line": 308, + "mass": 190.0 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "check", + "cc": 19, + "sloc": 41, + "line": 204, + "mass": 121.66 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "check", + "cc": 19, + "sloc": 41, + "line": 212, + "mass": 121.66 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "check", + "cc": 19, + "sloc": 41, + "line": 220, + "mass": 121.66 + }, + { + "path": "openmeter/ent/db/planaddon_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 57, + "line": 175, + "mass": 143.45 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_update.go", + "name": "sqlSave", + "cc": 19, + "sloc": 84, + "line": 158, + "mass": 174.14 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "sqlAll", + "cc": 19, + "sloc": 95, + "line": 588, + "mass": 185.19 + }, + { + "path": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "name": "processEntitlementEntity", + "cc": 19, + "sloc": 55, + "line": 138, + "mass": 140.91 + }, + { + "path": "openmeter/entitlement/usageperiod.go", + "name": "GetResetTimelineInclusive", + "cc": 19, + "sloc": 50, + "line": 186, + "mass": 134.35 + }, + { + "path": "openmeter/llmcost/sync/fetcher_modelsdev.go", + "name": "Fetch", + "cc": 19, + "sloc": 72, + "line": 53, + "mass": 161.22 + }, + { + "path": "openmeter/meter/httphandler/query_csv.go", + "name": "Records", + "cc": 19, + "sloc": 58, + "line": 214, + "mass": 144.7 + }, + { + "path": "openmeter/meter/service/manage.go", + "name": "UpdateMeter", + "cc": 19, + "sloc": 66, + "line": 158, + "mass": 154.36 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "handleRule", + "cc": 19, + "sloc": 79, + "line": 75, + "mass": 168.88 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "getActiveThresholdsWithHighestPriority", + "cc": 19, + "sloc": 55, + "line": 464, + "mass": 140.91 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "CreateWebhook", + "cc": 19, + "sloc": 86, + "line": 126, + "mass": 176.2 + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "name": "ListFeatures", + "cc": 19, + "sloc": 73, + "line": 285, + "mass": 162.34 + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "name": "UpdateAddon", + "cc": 19, + "sloc": 98, + "line": 436, + "mass": 188.09 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "PublishAddon", + "cc": 19, + "sloc": 97, + "line": 377, + "mass": 187.13 + }, + { + "path": "openmeter/productcatalog/feature/connector.go", + "name": "CreateFeature", + "cc": 19, + "sloc": 74, + "line": 188, + "mass": 163.44 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "CreatePlan", + "cc": 19, + "sloc": 74, + "line": 78, + "mass": 163.44 + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "name": "MapSubscriptionPhaseToAPI", + "cc": 19, + "sloc": 88, + "line": 294, + "mass": 178.24 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "Create", + "cc": 19, + "sloc": 77, + "line": 101, + "mass": 166.72 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetAlignedBillingPeriodAt", + "cc": 19, + "sloc": 66, + "line": 208, + "mass": 154.36 + }, + { + "path": "pkg/datetime/duration.go", + "name": "convertPeriodToSeconds", + "cc": 19, + "sloc": 85, + "line": 182, + "mass": 175.17 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1.go", + "name": "assignValues", + "cc": 19, + "sloc": 45, + "line": 49, + "mass": 127.46 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2.go", + "name": "assignValues", + "cc": 19, + "sloc": 45, + "line": 49, + "mass": 127.46 + }, + { + "path": "pkg/framework/lockr/locker_test.go", + "name": "TestLockerLockForTx", + "cc": 19, + "sloc": 224, + "line": 42, + "mass": 284.37 + }, + { + "path": "cmd/notification-service/wire_gen.go", + "name": "initializeApplication", + "cc": 18, + "sloc": 234, + "line": 28, + "mass": 275.35 + }, + { + "path": "e2e/e2e_test.go", + "name": "TestCredit", + "cc": 18, + "sloc": 454, + "line": 1223, + "mass": 383.53 + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "name": "ListGatheringInvoices", + "cc": 18, + "sloc": 64, + "line": 200, + "mass": 144.0 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinediff.go", + "name": "diffInvoiceLines", + "cc": 18, + "sloc": 97, + "line": 42, + "mass": 177.28 + }, + { + "path": "openmeter/billing/charges/lineage/service/service.go", + "name": "PersistCorrectionLineageSegments", + "cc": 18, + "sloc": 68, + "line": 93, + "mass": 148.43 + }, + { + "path": "openmeter/billing/invoice.go", + "name": "Validate", + "cc": 18, + "sloc": 34, + "line": 383, + "mass": 104.96 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "Validate", + "cc": 18, + "sloc": 48, + "line": 73, + "mass": 124.71 + }, + { + "path": "openmeter/cost/adapter/compute.go", + "name": "computeCostRows", + "cc": 18, + "sloc": 84, + "line": 66, + "mass": 164.97 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "getCustomerForSubject", + "cc": 18, + "sloc": 45, + "line": 316, + "mass": 120.75 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 81, + "line": 163, + "mass": 162.0 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 58, + "line": 271, + "mass": 137.08 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_update.go", + "name": "check", + "cc": 18, + "sloc": 31, + "line": 358, + "mass": 100.22 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_update.go", + "name": "check", + "cc": 18, + "sloc": 31, + "line": 884, + "mass": 100.22 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "querySpec", + "cc": 18, + "sloc": 57, + "line": 1197, + "mass": 135.9 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 55, + "line": 159, + "mass": 133.49 + }, + { + "path": "openmeter/ent/db/billingprofile_update.go", + "name": "check", + "cc": 18, + "sloc": 30, + "line": 434, + "mass": 98.59 + }, + { + "path": "openmeter/ent/db/billingprofile_update.go", + "name": "check", + "cc": 18, + "sloc": 30, + "line": 1106, + "mass": 98.59 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_update.go", + "name": "check", + "cc": 18, + "sloc": 31, + "line": 499, + "mass": 100.22 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_update.go", + "name": "check", + "cc": 18, + "sloc": 31, + "line": 1272, + "mass": 100.22 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 58, + "line": 307, + "mass": 137.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "createSpec", + "cc": 18, + "sloc": 97, + "line": 319, + "mass": 177.28 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "setContextOp", + "cc": 18, + "sloc": 78, + "line": 689, + "mass": 158.97 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "check", + "cc": 18, + "sloc": 38, + "line": 440, + "mass": 110.96 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 54, + "line": 126, + "mass": 132.27 + }, + { + "path": "openmeter/ent/db/ledgerentry_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 58, + "line": 272, + "mass": 137.08 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 81, + "line": 148, + "mass": 162.0 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "createSpec", + "cc": 18, + "sloc": 104, + "line": 288, + "mass": 183.56 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "check", + "cc": 18, + "sloc": 42, + "line": 195, + "mass": 116.65 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "check", + "cc": 18, + "sloc": 42, + "line": 219, + "mass": 116.65 + }, + { + "path": "openmeter/ent/db/subject_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 54, + "line": 174, + "mass": 132.27 + }, + { + "path": "openmeter/ent/db/usagereset_update.go", + "name": "sqlSave", + "cc": 18, + "sloc": 58, + "line": 266, + "mass": 137.08 + }, + { + "path": "openmeter/entitlement/driver/entitlement.go", + "name": "ListEntitlements", + "cc": 18, + "sloc": 98, + "line": 348, + "mass": 178.19 + }, + { + "path": "openmeter/ledger/breakage/breakage_impacts.go", + "name": "ListExpiredBreakageImpacts", + "cc": 18, + "sloc": 82, + "line": 57, + "mass": 163.0 + }, + { + "path": "openmeter/ledger/breakage/types.go", + "name": "Validate", + "cc": 18, + "sloc": 47, + "line": 182, + "mass": 123.4 + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "name": "advanceAttributions", + "cc": 18, + "sloc": 92, + "line": 380, + "mass": 172.65 + }, + { + "path": "openmeter/ledger/collector/collection_fbo.go", + "name": "listCustomerFBOSources", + "cc": 18, + "sloc": 98, + "line": 115, + "mass": 178.19 + }, + { + "path": "openmeter/llmcost/normalize.go", + "name": "NormalizeProvider", + "cc": 18, + "sloc": 41, + "line": 64, + "mass": 115.26 + }, + { + "path": "openmeter/llmcost/service.go", + "name": "Validate", + "cc": 18, + "sloc": 41, + "line": 80, + "mass": 115.26 + }, + { + "path": "openmeter/meter/service.go", + "name": "Validate", + "cc": 18, + "sloc": 37, + "line": 91, + "mass": 109.49 + }, + { + "path": "openmeter/meterexport/service/syntheticdata_iter.go", + "name": "ExportSyntheticMeterDataIter", + "cc": 18, + "sloc": 62, + "line": 13, + "mass": 141.73 + }, + { + "path": "openmeter/notification/service/rule.go", + "name": "UpdateRule", + "cc": 18, + "sloc": 105, + "line": 183, + "mass": 184.45 + }, + { + "path": "openmeter/sink/sink.go", + "name": "Validate", + "cc": 18, + "sloc": 51, + "line": 105, + "mass": 128.55 + }, + { + "path": "openmeter/streaming/clickhouse/meter_query.go", + "name": "scanRows", + "cc": 18, + "sloc": 71, + "line": 397, + "mass": 151.67 + }, + { + "path": "openmeter/subscription/addon/extend.go", + "name": "Apply", + "cc": 18, + "sloc": 78, + "line": 16, + "mass": 158.97 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "NewSpecFromPlan", + "cc": 18, + "sloc": 75, + "line": 1046, + "mass": 155.88 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "setContextOp", + "cc": 18, + "sloc": 78, + "line": 526, + "mass": 158.97 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "setContextOp", + "cc": 18, + "sloc": 78, + "line": 526, + "mass": 158.97 + }, + { + "path": "pkg/kafka/config.go", + "name": "AsConfigMap", + "cc": 18, + "sloc": 53, + "line": 252, + "mass": 131.04 + }, + { + "path": "test/customer/testenv.go", + "name": "NewTestEnv", + "cc": 18, + "sloc": 261, + "line": 149, + "mass": 290.8 + }, + { + "path": "api/v3/oasmiddleware/error.go", + "name": "aipMapper", + "cc": 17, + "sloc": 54, + "line": 25, + "mass": 124.92 + }, + { + "path": "collector/benthos/output/openmeter.go", + "name": "WriteBatch", + "cc": 17, + "sloc": 75, + "line": 144, + "mass": 147.22 + }, + { + "path": "e2e/productcatalog_test.go", + "name": "TestPlan", + "cc": 17, + "sloc": 968, + "line": 25, + "mass": 528.92 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "UpdateAPIKey", + "cc": 17, + "sloc": 85, + "line": 84, + "mass": 156.73 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/create.go", + "name": "Create", + "cc": 17, + "sloc": 57, + "line": 16, + "mass": 128.35 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnMutableStandardLinesDeleted", + "cc": 17, + "sloc": 58, + "line": 183, + "mass": 129.47 + }, + { + "path": "openmeter/billing/httpdriver/deprecations.go", + "name": "ValidateRateCard", + "cc": 17, + "sloc": 37, + "line": 47, + "mass": 103.41 + }, + { + "path": "openmeter/billing/service/gatheringinvoice.go", + "name": "UpdateGatheringInvoice", + "cc": 17, + "sloc": 74, + "line": 30, + "mass": 146.24 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "prepareLinesToBill", + "cc": 17, + "sloc": 85, + "line": 517, + "mass": 156.73 + }, + { + "path": "openmeter/billing/validators/customer/customer.go", + "name": "ValidateDeleteCustomer", + "cc": 17, + "sloc": 52, + "line": 41, + "mass": 122.59 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go", + "name": "loadChargesForSubscription", + "cc": 17, + "sloc": 59, + "line": 101, + "mass": 130.58 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go", + "name": "AddProrate", + "cc": 17, + "sloc": 63, + "line": 137, + "mass": 134.93 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/repair.go", + "name": "repairChargeSubscriptionReferences", + "cc": 17, + "sloc": 72, + "line": 33, + "mass": 144.25 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 143, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 155, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "createSpec", + "cc": 17, + "sloc": 101, + "line": 289, + "mass": 170.85 + }, + { + "path": "openmeter/ent/db/balancesnapshot_update.go", + "name": "sqlSave", + "cc": 17, + "sloc": 55, + "line": 238, + "mass": 126.08 + }, + { + "path": "openmeter/ent/db/billinginvoice/billinginvoice.go", + "name": "ValidColumn", + "cc": 17, + "sloc": 37, + "line": 302, + "mass": 103.41 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 274, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 232, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "createSpec", + "cc": 17, + "sloc": 93, + "line": 298, + "mass": 163.94 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "sqlAll", + "cc": 17, + "sloc": 75, + "line": 552, + "mass": 147.22 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "querySpec", + "cc": 17, + "sloc": 54, + "line": 835, + "mass": 124.92 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "sqlAll", + "cc": 17, + "sloc": 78, + "line": 550, + "mass": 150.14 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 232, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "createSpec", + "cc": 17, + "sloc": 93, + "line": 298, + "mass": 163.94 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "sqlAll", + "cc": 17, + "sloc": 81, + "line": 552, + "mass": 153.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "querySpec", + "cc": 17, + "sloc": 54, + "line": 1035, + "mass": 124.92 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "name": "sqlSave", + "cc": 17, + "sloc": 51, + "line": 182, + "mass": 121.4 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "UpdateNewValues", + "cc": 17, + "sloc": 56, + "line": 1340, + "mass": 127.22 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "sqlAll", + "cc": 17, + "sloc": 78, + "line": 552, + "mass": 150.14 + }, + { + "path": "openmeter/ent/db/llmcostprice/llmcostprice.go", + "name": "ValidColumn", + "cc": 17, + "sloc": 43, + "line": 83, + "mass": 111.48 + }, + { + "path": "openmeter/ent/db/notificationevent_update.go", + "name": "sqlSave", + "cc": 17, + "sloc": 78, + "line": 134, + "mass": 150.14 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_update.go", + "name": "sqlSave", + "cc": 17, + "sloc": 91, + "line": 160, + "mass": 162.17 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "createSpec", + "cc": 17, + "sloc": 101, + "line": 285, + "mass": 170.85 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 184, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "check", + "cc": 17, + "sloc": 39, + "line": 186, + "mass": 106.16 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_update.go", + "name": "sqlSave", + "cc": 17, + "sloc": 55, + "line": 264, + "mass": 126.08 + }, + { + "path": "openmeter/ledger/account/adapter/subaccount.go", + "name": "ListSubAccounts", + "cc": 17, + "sloc": 76, + "line": 146, + "mass": 148.2 + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "name": "ListCreditTransactions", + "cc": 17, + "sloc": 73, + "line": 119, + "mass": 145.25 + }, + { + "path": "openmeter/ledger/query.go", + "name": "Validate", + "cc": 17, + "sloc": 67, + "line": 22, + "mass": 139.15 + }, + { + "path": "openmeter/meter/mockadapter/meter.go", + "name": "ListMeters", + "cc": 17, + "sloc": 43, + "line": 16, + "mass": 111.48 + }, + { + "path": "openmeter/meter/parse.go", + "name": "ParseEvent", + "cc": 17, + "sloc": 73, + "line": 73, + "mass": 145.25 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "UpdatePlan", + "cc": 17, + "sloc": 80, + "line": 266, + "mass": 152.05 + }, + { + "path": "openmeter/productcatalog/subscription/http/change.go", + "name": "ChangeSubscription", + "cc": 17, + "sloc": 110, + "line": 30, + "mass": 178.3 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "Equal", + "cc": 17, + "sloc": 21, + "line": 44, + "mass": 77.9 + }, + { + "path": "openmeter/sink/sink.go", + "name": "parseMessage", + "cc": 17, + "sloc": 80, + "line": 876, + "mass": 152.05 + }, + { + "path": "openmeter/subscription/list.go", + "name": "Validate", + "cc": 17, + "sloc": 45, + "line": 49, + "mass": 114.04 + }, + { + "path": "openmeter/subscription/subscriptionview.go", + "name": "Validate", + "cc": 17, + "sloc": 33, + "line": 42, + "mass": 97.66 + }, + { + "path": "openmeter/taxcode/taxcode.go", + "name": "Equal", + "cc": 17, + "sloc": 34, + "line": 92, + "mass": 99.13 + }, + { + "path": "pkg/framework/lockr/session.go", + "name": "lock", + "cc": 17, + "sloc": 55, + "line": 120, + "mass": 126.08 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_init_from_xml", + "cc": 16, + "sloc": 54, + "line": 617, + "mass": 117.58 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "serialize_iter", + "cc": 16, + "sloc": 55, + "line": 855, + "mass": 118.66 + }, + { + "path": "api/spec/packages/aip/lib/rules/docs.js", + "name": "docDecoratorRule", + "cc": 16, + "sloc": 64, + "line": 16, + "mass": 128.0 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterString", + "cc": 16, + "sloc": 46, + "line": 291, + "mass": 108.52 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "ToAPIBillingRateCard", + "cc": 16, + "sloc": 81, + "line": 222, + "mass": 144.0 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "ToAPIBillingPrice", + "cc": 16, + "sloc": 62, + "line": 317, + "mass": 125.98 + }, + { + "path": "api/v3/handlers/customers/billing/update_billing_app_data.go", + "name": "UpdateCustomerBillingAppData", + "cc": 16, + "sloc": 109, + "line": 33, + "mass": 167.04 + }, + { + "path": "api/v3/handlers/customers/charges/list.go", + "name": "ListCustomerCharges", + "cc": 16, + "sloc": 103, + "line": 34, + "mass": 162.38 + }, + { + "path": "api/v3/handlers/customers/credits/list_transactions.go", + "name": "ListCreditTransactions", + "cc": 16, + "sloc": 107, + "line": 30, + "mass": 165.51 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPIBillingRateCard", + "cc": 16, + "sloc": 67, + "line": 487, + "mass": 130.97 + }, + { + "path": "app/config/taxcode.go", + "name": "Validate", + "cc": 16, + "sloc": 50, + "line": 34, + "mass": 113.14 + }, + { + "path": "cmd/jobs/ledger/service/service_test.go", + "name": "ListCustomers", + "cc": 16, + "sloc": 65, + "line": 170, + "mass": 129.0 + }, + { + "path": "openmeter/app/stripe/adapter/customer.go", + "name": "UpsertStripeCustomerData", + "cc": 16, + "sloc": 101, + "line": 58, + "mass": 160.8 + }, + { + "path": "openmeter/app/stripe/client/checkout.go", + "name": "Validate", + "cc": 16, + "sloc": 36, + "line": 283, + "mass": 96.0 + }, + { + "path": "openmeter/app/stripe/service/billing.go", + "name": "HandleInvoiceStateTransition", + "cc": 16, + "sloc": 80, + "line": 27, + "mass": 143.11 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelines.go", + "name": "GetLinesForSubscription", + "cc": 16, + "sloc": 141, + "line": 744, + "mass": 189.99 + }, + { + "path": "openmeter/billing/charges/creditpurchase/charge.go", + "name": "Validate", + "cc": 16, + "sloc": 40, + "line": 152, + "mass": 101.19 + }, + { + "path": "openmeter/billing/charges/lineage/lineage.go", + "name": "Validate", + "cc": 16, + "sloc": 30, + "line": 71, + "mass": 87.64 + }, + { + "path": "openmeter/billing/charges/service/invoice.go", + "name": "handleChargeEvent", + "cc": 16, + "sloc": 52, + "line": 93, + "mass": 115.38 + }, + { + "path": "openmeter/billing/charges/service/usagebased_test.go", + "name": "TestUsageBasedCreditThenInvoicePendingPartialInvoiceBlocksFinalRealizationUntilApproval", + "cc": 16, + "sloc": 171, + "line": 497, + "mass": 209.23 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "Validate", + "cc": 16, + "sloc": 35, + "line": 153, + "mass": 94.66 + }, + { + "path": "openmeter/billing/charges/usagebased/service/get.go", + "name": "expandChargesUsage", + "cc": 16, + "sloc": 96, + "line": 77, + "mass": 156.77 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/create.go", + "name": "Validate", + "cc": 16, + "sloc": 43, + "line": 35, + "mass": 104.92 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualLineDiscountBase", + "cc": 16, + "sloc": 9, + "line": 35, + "mass": 48.0 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mergeGatheringLineFromInvoiceLineReplaceUpdate", + "cc": 16, + "sloc": 73, + "line": 819, + "mass": 136.7 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "UpdateProfile", + "cc": 16, + "sloc": 72, + "line": 248, + "mass": 135.76 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "Validate", + "cc": 16, + "sloc": 54, + "line": 598, + "mass": 117.58 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go", + "name": "normalizePersistedLineOrHierarchy", + "cc": 16, + "sloc": 66, + "line": 239, + "mass": 129.98 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "updateImmutableInvoice", + "cc": 16, + "sloc": 74, + "line": 403, + "mass": 137.64 + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "name": "getLLMPrices", + "cc": 16, + "sloc": 52, + "line": 138, + "mass": 115.38 + }, + { + "path": "openmeter/credit/balance/usage.go", + "name": "QueryUsage", + "cc": 16, + "sloc": 70, + "line": 41, + "mass": 133.87 + }, + { + "path": "openmeter/credit/engine/run.go", + "name": "Run", + "cc": 16, + "sloc": 68, + "line": 17, + "mass": 131.94 + }, + { + "path": "openmeter/customer/adapter/entitymapping.go", + "name": "CustomerFromDBEntity", + "cc": 16, + "sloc": 57, + "line": 15, + "mass": 120.8 + }, + { + "path": "openmeter/customer/customer.go", + "name": "Validate", + "cc": 16, + "sloc": 41, + "line": 319, + "mass": 102.45 + }, + { + "path": "openmeter/ent/db/appcustomer_update.go", + "name": "sqlSave", + "cc": 16, + "sloc": 52, + "line": 241, + "mass": 115.38 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "querySpec", + "cc": 16, + "sloc": 51, + "line": 821, + "mass": 114.26 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_update.go", + "name": "check", + "cc": 16, + "sloc": 28, + "line": 364, + "mass": 84.66 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_update.go", + "name": "check", + "cc": 16, + "sloc": 28, + "line": 906, + "mass": 84.66 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "querySpec", + "cc": 16, + "sloc": 51, + "line": 672, + "mass": 114.26 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "querySpec", + "cc": 16, + "sloc": 51, + "line": 1044, + "mass": 114.26 + }, + { + "path": "openmeter/ent/db/currencycostbasis_update.go", + "name": "sqlSave", + "cc": 16, + "sloc": 52, + "line": 235, + "mass": 115.38 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "UpdateNewValues", + "cc": 16, + "sloc": 54, + "line": 903, + "mass": 117.58 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "UpdateNewValues", + "cc": 16, + "sloc": 53, + "line": 922, + "mass": 116.48 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "UpdateNewValues", + "cc": 16, + "sloc": 53, + "line": 806, + "mass": 116.48 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "createSpec", + "cc": 16, + "sloc": 88, + "line": 272, + "mass": 150.09 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "ChargeUsageBasedOrErr", + "cc": 16, + "sloc": 36, + "line": 231, + "mass": 96.0 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_update.go", + "name": "sqlSave", + "cc": 16, + "sloc": 52, + "line": 235, + "mass": 115.38 + }, + { + "path": "openmeter/ent/db/subscriptionitem.go", + "name": "String", + "cc": 16, + "sloc": 110, + "line": 455, + "mass": 167.81 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "mapEntitlementEntity", + "cc": 16, + "sloc": 90, + "line": 558, + "mass": 151.79 + }, + { + "path": "openmeter/entitlement/service/scheduling.go", + "name": "SupersedeEntitlement", + "cc": 16, + "sloc": 63, + "line": 139, + "mass": 127.0 + }, + { + "path": "openmeter/ledger/primitives.go", + "name": "Validate", + "cc": 16, + "sloc": 70, + "line": 212, + "mass": 133.87 + }, + { + "path": "openmeter/meter/adapter/meter.go", + "name": "ListMeters", + "cc": 16, + "sloc": 57, + "line": 19, + "mass": 120.8 + }, + { + "path": "openmeter/meter/mockadapter/meter.go", + "name": "ReplaceMeters", + "cc": 16, + "sloc": 56, + "line": 89, + "mass": 119.73 + }, + { + "path": "openmeter/meterevent/service.go", + "name": "Validate", + "cc": 16, + "sloc": 33, + "line": 96, + "mass": 91.91 + }, + { + "path": "openmeter/meterexport/service/syntheticdata.go", + "name": "ExportSyntheticMeterData", + "cc": 16, + "sloc": 72, + "line": 57, + "mass": 135.76 + }, + { + "path": "openmeter/productcatalog/featureresolver/resolver.go", + "name": "Resolve", + "cc": 16, + "sloc": 43, + "line": 60, + "mass": 104.92 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "FromRateCard", + "cc": 16, + "sloc": 87, + "line": 18, + "mass": 149.24 + }, + { + "path": "openmeter/productcatalog/plan.go", + "name": "StatusAt", + "cc": 16, + "sloc": 23, + "line": 319, + "mass": 76.73 + }, + { + "path": "openmeter/productcatalog/plan/serializer.go", + "name": "UnmarshalJSON", + "cc": 16, + "sloc": 98, + "line": 112, + "mass": 158.39 + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "name": "Validate", + "cc": 16, + "sloc": 39, + "line": 272, + "mass": 99.92 + }, + { + "path": "openmeter/productcatalog/planaddon.go", + "name": "Validate", + "cc": 16, + "sloc": 54, + "line": 58, + "mass": 117.58 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Validate", + "cc": 16, + "sloc": 49, + "line": 212, + "mass": 112.0 + }, + { + "path": "openmeter/productcatalog/subscription/http/errors.go", + "name": "errorEncoder", + "cc": 16, + "sloc": 35, + "line": 17, + "mass": 94.66 + }, + { + "path": "openmeter/sink/sink.go", + "name": "rebalance", + "cc": 16, + "sloc": 64, + "line": 799, + "mass": 128.0 + }, + { + "path": "openmeter/subscription/workflow/service/addon.go", + "name": "AddAddon", + "cc": 16, + "sloc": 74, + "line": 21, + "mass": 137.64 + }, + { + "path": "openmeter/subscription/workflow/service/subscription.go", + "name": "EditRunning", + "cc": 16, + "sloc": 70, + "line": 94, + "mass": 133.87 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_update.go", + "name": "sqlSave", + "cc": 16, + "sloc": 52, + "line": 247, + "mass": 115.38 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_update.go", + "name": "sqlSave", + "cc": 16, + "sloc": 52, + "line": 247, + "mass": 115.38 + }, + { + "path": "pkg/pgxpoolobserver/observer.go", + "name": "ObservePoolMetrics", + "cc": 16, + "sloc": 134, + "line": 13, + "mass": 185.21 + }, + { + "path": "test/notification/testenv.go", + "name": "NewTestEnv", + "cc": 16, + "sloc": 114, + "line": 123, + "mass": 170.83 + }, + { + "path": "api/client/python/examples/async/entitlement.py", + "name": "main", + "cc": 15, + "sloc": 63, + "line": 12, + "mass": 119.06 + }, + { + "path": "api/client/python/examples/sync/entitlement.py", + "name": "main", + "cc": 15, + "sloc": 57, + "line": 16, + "mass": 113.25 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterString", + "cc": 15, + "sloc": 49, + "line": 16, + "mass": 105.0 + }, + { + "path": "api/v3/handlers/addons/list.go", + "name": "ListAddons", + "cc": 15, + "sloc": 99, + "line": 29, + "mass": 149.25 + }, + { + "path": "api/v3/handlers/apps/convert.go", + "name": "ToAPIBillingApp", + "cc": 15, + "sloc": 51, + "line": 44, + "mass": 107.12 + }, + { + "path": "api/v3/handlers/customers/charges/convert.go", + "name": "toAPIBillingPrice", + "cc": 15, + "sloc": 55, + "line": 189, + "mass": 111.24 + }, + { + "path": "api/v3/handlers/plans/list.go", + "name": "ListPlans", + "cc": 15, + "sloc": 100, + "line": 28, + "mass": 150.0 + }, + { + "path": "collector/benthos/input/otel_log.go", + "name": "Export", + "cc": 15, + "sloc": 47, + "line": 124, + "mass": 102.83 + }, + { + "path": "openmeter/app/stripe/client/invoice.go", + "name": "Validate", + "cc": 15, + "sloc": 35, + "line": 154, + "mass": 88.74 + }, + { + "path": "openmeter/billing/charges/flatfee/realizationrun.go", + "name": "Validate", + "cc": 15, + "sloc": 40, + "line": 153, + "mass": 94.87 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/correct.go", + "name": "ReconcileCredits", + "cc": 15, + "sloc": 74, + "line": 66, + "mass": 129.03 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "name": "StartCreditThenInvoiceRun", + "cc": 15, + "sloc": 96, + "line": 64, + "mass": 146.97 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "updateMutableStandardInvoice", + "cc": 15, + "sloc": 66, + "line": 406, + "mass": 121.86 + }, + { + "path": "openmeter/billing/charges/service.go", + "name": "Validate", + "cc": 15, + "sloc": 38, + "line": 161, + "mass": 92.47 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "Validate", + "cc": 15, + "sloc": 40, + "line": 223, + "mass": 94.87 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "OnMutableStandardLinesDeleted", + "cc": 15, + "sloc": 55, + "line": 315, + "mass": 111.24 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual_2", + "cc": 15, + "sloc": 8, + "line": 147, + "mass": 42.43 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mergeStandardLineFromInvoiceLineReplaceUpdate", + "cc": 15, + "sloc": 67, + "line": 739, + "mass": 122.78 + }, + { + "path": "openmeter/billing/rating/service/pricer.go", + "name": "getPricerFor", + "cc": 15, + "sloc": 57, + "line": 14, + "mass": 113.25 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "CreateProfile", + "cc": 15, + "sloc": 80, + "line": 22, + "mass": 134.16 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "FireAndActivate", + "cc": 15, + "sloc": 55, + "line": 558, + "mass": 111.24 + }, + { + "path": "openmeter/billing/validationissue.go", + "name": "toValidationIssue", + "cc": 15, + "sloc": 57, + "line": 226, + "mass": 113.25 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go", + "name": "collectUpcomingLines", + "cc": 15, + "sloc": 51, + "line": 136, + "mass": 107.12 + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "name": "QueryFeatureCost", + "cc": 15, + "sloc": 70, + "line": 56, + "mass": 125.5 + }, + { + "path": "openmeter/credit/engine/grant.go", + "name": "PrioritizeGrants", + "cc": 15, + "sloc": 48, + "line": 176, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 601, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 601, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/billinginvoiceline.go", + "name": "TaxCodeOrErr", + "cc": 15, + "sloc": 39, + "line": 371, + "mass": 93.67 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "createSpec", + "cc": 15, + "sloc": 85, + "line": 288, + "mass": 138.29 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "name": "check", + "cc": 15, + "sloc": 26, + "line": 220, + "mass": 76.49 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "name": "check", + "cc": 15, + "sloc": 26, + "line": 541, + "mass": 76.49 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers.go", + "name": "assignValues", + "cc": 15, + "sloc": 38, + "line": 49, + "mass": 92.47 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 677, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 840, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "UpdateNewValues", + "cc": 15, + "sloc": 50, + "line": 1869, + "mass": 106.07 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 894, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 683, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "name": "ValidColumn", + "cc": 15, + "sloc": 34, + "line": 165, + "mass": 87.46 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_update.go", + "name": "sqlSave", + "cc": 15, + "sloc": 72, + "line": 107, + "mass": 127.28 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "check", + "cc": 15, + "sloc": 37, + "line": 176, + "mass": 91.24 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "check", + "cc": 15, + "sloc": 33, + "line": 119, + "mass": 86.17 + }, + { + "path": "openmeter/ent/db/customersubjects_update.go", + "name": "sqlSave", + "cc": 15, + "sloc": 49, + "line": 202, + "mass": 105.0 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "UpdateNewValues", + "cc": 15, + "sloc": 51, + "line": 575, + "mass": 107.12 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go", + "name": "ValidColumn", + "cc": 15, + "sloc": 33, + "line": 91, + "mass": 86.17 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_update.go", + "name": "sqlSave", + "cc": 15, + "sloc": 49, + "line": 216, + "mass": 105.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "UpdateNewValues", + "cc": 15, + "sloc": 51, + "line": 522, + "mass": 107.12 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "createSpec", + "cc": 15, + "sloc": 84, + "line": 277, + "mass": 137.48 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "createSpec", + "cc": 15, + "sloc": 94, + "line": 261, + "mass": 145.43 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 601, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "AddonRateCardOrErr", + "cc": 15, + "sloc": 34, + "line": 27, + "mass": 87.46 + }, + { + "path": "openmeter/ent/db/subscriptionitem.go", + "name": "TaxCodeOrErr", + "cc": 15, + "sloc": 39, + "line": 173, + "mass": 93.67 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "querySpec", + "cc": 15, + "sloc": 48, + "line": 998, + "mass": 103.92 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "check", + "cc": 15, + "sloc": 33, + "line": 423, + "mass": 86.17 + }, + { + "path": "openmeter/entitlement/driver/v2/entitlement.go", + "name": "ListEntitlements", + "cc": 15, + "sloc": 83, + "line": 32, + "mass": 136.66 + }, + { + "path": "openmeter/entitlement/service/service.go", + "name": "GetAccess", + "cc": 15, + "sloc": 67, + "line": 337, + "mass": 122.78 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "ListPlans", + "cc": 15, + "sloc": 46, + "line": 424, + "mass": 101.73 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "resolveBreakageReopenInputs", + "cc": 15, + "sloc": 60, + "line": 502, + "mass": 116.19 + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "name": "Validate", + "cc": 15, + "sloc": 36, + "line": 49, + "mass": 90.0 + }, + { + "path": "openmeter/ledger/historical/adapter/sumentries_query.go", + "name": "subAccountPredicates", + "cc": 15, + "sloc": 62, + "line": 107, + "mass": 118.11 + }, + { + "path": "openmeter/ledger/transactions/correction_leg.go", + "name": "allocateCorrectionLegs", + "cc": 15, + "sloc": 78, + "line": 39, + "mass": 132.48 + }, + { + "path": "openmeter/meter/service/manage.go", + "name": "DeleteMeter", + "cc": 15, + "sloc": 63, + "line": 84, + "mass": 119.06 + }, + { + "path": "openmeter/meterexport/service/service_test.go", + "name": "TestExportSyntheticMeterData_ContextCancellation", + "cc": 15, + "sloc": 139, + "line": 292, + "mass": 176.85 + }, + { + "path": "openmeter/notification/adapter/rule.go", + "name": "ListRules", + "cc": 15, + "sloc": 61, + "line": 31, + "mass": 117.15 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "UpdateWebhook", + "cc": 15, + "sloc": 63, + "line": 232, + "mass": 119.06 + }, + { + "path": "openmeter/productcatalog/adapter/feature_test.go", + "name": "TestCreateFeature", + "cc": 15, + "sloc": 345, + "line": 26, + "mass": 278.61 + }, + { + "path": "openmeter/productcatalog/planaddon/service/planaddon.go", + "name": "CreatePlanAddon", + "cc": 15, + "sloc": 104, + "line": 30, + "mass": 152.97 + }, + { + "path": "openmeter/productcatalog/subscription/service/migrate.go", + "name": "Migrate", + "cc": 15, + "sloc": 82, + "line": 17, + "mass": 135.83 + }, + { + "path": "openmeter/streaming/testutils/streaming.go", + "name": "filterStoredAt", + "cc": 15, + "sloc": 33, + "line": 152, + "mass": 86.17 + }, + { + "path": "openmeter/subscription/addon/diff/zeroratecard.go", + "name": "isZeroByContents", + "cc": 15, + "sloc": 36, + "line": 27, + "mass": 90.0 + }, + { + "path": "openmeter/subscription/patch/removephase.go", + "name": "ApplyTo", + "cc": 15, + "sloc": 54, + "line": 45, + "mass": 110.23 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "Validate", + "cc": 15, + "sloc": 100, + "line": 507, + "mass": 150.0 + }, + { + "path": "openmeter/subscription/testutils/compare.go", + "name": "ValidateSpecAndView", + "cc": 15, + "sloc": 114, + "line": 21, + "mass": 160.16 + }, + { + "path": "openmeter/subscription/validators/customer/validator.go", + "name": "ValidateUpdateCustomer", + "cc": 15, + "sloc": 53, + "line": 38, + "mass": 109.2 + }, + { + "path": "pkg/models/validationissue.go", + "name": "asValidationIssues", + "cc": 15, + "sloc": 47, + "line": 402, + "mass": 102.83 + }, + { + "path": "pkg/timeutil/timeline.go", + "name": "NewSimpleTimeline", + "cc": 15, + "sloc": 132, + "line": 11, + "mass": 172.34 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "_instantiate_model", + "cc": 14, + "sloc": 40, + "line": 1585, + "mass": 88.54 + }, + { + "path": "api/spec/packages/legacy/lib/rules/docs.js", + "name": "docDecoratorRule", + "cc": 14, + "sloc": 58, + "line": 3, + "mass": 106.62 + }, + { + "path": "api/v3/handlers/customers/list.go", + "name": "ListCustomers", + "cc": 14, + "sloc": 114, + "line": 29, + "mass": 149.48 + }, + { + "path": "api/v3/handlers/events/ingest.go", + "name": "IngestEvents", + "cc": 14, + "sloc": 69, + "line": 25, + "mass": 116.29 + }, + { + "path": "api/v3/handlers/events/list.go", + "name": "ListMeteringEvents", + "cc": 14, + "sloc": 85, + "line": 31, + "mass": 129.07 + }, + { + "path": "api/v3/handlers/llmcost/list_prices.go", + "name": "ListPrices", + "cc": 14, + "sloc": 101, + "line": 28, + "mass": 140.7 + }, + { + "path": "api/v3/handlers/meters/query_csv.go", + "name": "Records", + "cc": 14, + "sloc": 59, + "line": 155, + "mass": 107.54 + }, + { + "path": "app/common/telemetry.go", + "name": "NewTelemetryRouterHook", + "cc": 14, + "sloc": 73, + "line": 279, + "mass": 119.62 + }, + { + "path": "app/config/ingest.go", + "name": "CreateKafkaConfig", + "cc": 14, + "sloc": 45, + "line": 106, + "mass": 93.91 + }, + { + "path": "cmd/notification-service/main.go", + "name": "main", + "cc": 14, + "sloc": 103, + "line": 23, + "mass": 142.08 + }, + { + "path": "collector/benthos/input/prometheus.go", + "name": "newPrometheusInput", + "cc": 14, + "sloc": 93, + "line": 111, + "mass": 135.01 + }, + { + "path": "openmeter/app/stripe/service/factory.go", + "name": "InstallAppWithAPIKey", + "cc": 14, + "sloc": 95, + "line": 35, + "mass": 136.46 + }, + { + "path": "openmeter/app/stripe/service/factory.go", + "name": "UninstallApp", + "cc": 14, + "sloc": 61, + "line": 146, + "mass": 109.34 + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "name": "UpdateStandardInvoice", + "cc": 14, + "sloc": 140, + "line": 455, + "mass": 165.65 + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go", + "name": "ListFundedCreditActivities", + "cc": 14, + "sloc": 97, + "line": 22, + "mass": 137.88 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/external.go", + "name": "onExternalCreditPurchase", + "cc": 14, + "sloc": 61, + "line": 14, + "mass": 109.34 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "ApplyPatches", + "cc": 14, + "sloc": 50, + "line": 33, + "mass": 98.99 + }, + { + "path": "openmeter/billing/charges/models/payment/models.go", + "name": "Validate", + "cc": 14, + "sloc": 36, + "line": 58, + "mass": 84.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "handleFinalRunOnExtend", + "cc": 14, + "sloc": 63, + "line": 472, + "mass": 111.12 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/create.go", + "name": "CreateRatedRun", + "cc": 14, + "sloc": 83, + "line": 128, + "mass": 127.55 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual_", + "cc": 14, + "sloc": 7, + "line": 129, + "mass": 37.04 + }, + { + "path": "openmeter/billing/lineengine/splitlinegroup.go", + "name": "SplitGatheringLine", + "cc": 14, + "sloc": 80, + "line": 21, + "mass": 125.22 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "GetInvoiceById", + "cc": 14, + "sloc": 57, + "line": 375, + "mass": 105.7 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "SimulateInvoice", + "cc": 14, + "sloc": 109, + "line": 852, + "mass": 146.16 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "UpdateInvoice", + "cc": 14, + "sloc": 76, + "line": 1074, + "mass": 122.05 + }, + { + "path": "openmeter/billing/service/invoicecalc/details.go", + "name": "RecalculateDetailedLinesAndTotals", + "cc": 14, + "sloc": 58, + "line": 19, + "mass": 106.62 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "ResolveStripeAppIDFromBillingProfile", + "cc": 14, + "sloc": 68, + "line": 554, + "mass": 115.45 + }, + { + "path": "openmeter/billing/service/taxcode.go", + "name": "resolveTaxCodes", + "cc": 14, + "sloc": 48, + "line": 24, + "mass": 96.99 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go", + "name": "GetDeletePatchesForLine", + "cc": 14, + "sloc": 44, + "line": 160, + "mass": 92.87 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go", + "name": "AddShrink", + "cc": 14, + "sloc": 54, + "line": 68, + "mass": 102.88 + }, + { + "path": "openmeter/credit/driver/grant.go", + "name": "ListGrantsV2", + "cc": 14, + "sloc": 80, + "line": 238, + "mass": 125.22 + }, + { + "path": "openmeter/credit/engine/grant.go", + "name": "getGrantActivityChanges", + "cc": 14, + "sloc": 43, + "line": 17, + "mass": 91.8 + }, + { + "path": "openmeter/credit/helper.go", + "name": "buildEngineForOwner", + "cc": 14, + "sloc": 64, + "line": 90, + "mass": 112.0 + }, + { + "path": "openmeter/customer/customer.go", + "name": "Validate", + "cc": 14, + "sloc": 31, + "line": 437, + "mass": 77.95 + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "name": "Set", + "cc": 14, + "sloc": 39, + "line": 127, + "mass": 87.43 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1003, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1255, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "Save", + "cc": 14, + "sloc": 59, + "line": 470, + "mass": 107.54 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "Save", + "cc": 14, + "sloc": 59, + "line": 525, + "mass": 107.54 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "Save", + "cc": 14, + "sloc": 59, + "line": 577, + "mass": 107.54 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/appstripecustomer_update.go", + "name": "sqlSave", + "cc": 14, + "sloc": 42, + "line": 148, + "mass": 90.73 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "Save", + "cc": 14, + "sloc": 59, + "line": 506, + "mass": 107.54 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "name": "check", + "cc": 14, + "sloc": 30, + "line": 146, + "mass": 76.68 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "name": "sqlSave", + "cc": 14, + "sloc": 42, + "line": 149, + "mass": 90.73 + }, + { + "path": "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "name": "ValidColumn", + "cc": 14, + "sloc": 38, + "line": 332, + "mass": 86.3 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 2850, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1035, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 864, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "name": "String", + "cc": 14, + "sloc": 103, + "line": 422, + "mass": 142.08 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1335, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 575, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_update.go", + "name": "sqlSave", + "cc": 14, + "sloc": 46, + "line": 184, + "mass": 94.95 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 321, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_update.go", + "name": "sqlSave", + "cc": 14, + "sloc": 46, + "line": 199, + "mass": 94.95 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 864, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "UpdateNewValues", + "cc": 14, + "sloc": 48, + "line": 1270, + "mass": 96.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1737, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "check", + "cc": 14, + "sloc": 34, + "line": 168, + "mass": 81.63 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "name": "check", + "cc": 14, + "sloc": 24, + "line": 250, + "mass": 68.59 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "name": "check", + "cc": 14, + "sloc": 24, + "line": 587, + "mass": 68.59 + }, + { + "path": "openmeter/ent/db/chargeflatfee.go", + "name": "String", + "cc": 14, + "sloc": 142, + "line": 581, + "mass": 166.83 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 2008, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "name": "ValidColumn", + "cc": 14, + "sloc": 32, + "line": 141, + "mass": 79.2 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 526, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "name": "check", + "cc": 14, + "sloc": 24, + "line": 250, + "mass": 68.59 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "name": "check", + "cc": 14, + "sloc": 24, + "line": 587, + "mass": 68.59 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1891, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "UpdateNewValues", + "cc": 14, + "sloc": 47, + "line": 2023, + "mass": 95.98 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 608, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "createSpec", + "cc": 14, + "sloc": 89, + "line": 248, + "mass": 132.08 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "check", + "cc": 14, + "sloc": 30, + "line": 460, + "mass": 76.68 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "Save", + "cc": 14, + "sloc": 59, + "line": 397, + "mass": 107.54 + }, + { + "path": "openmeter/ent/db/entitlement.go", + "name": "String", + "cc": 14, + "sloc": 100, + "line": 401, + "mass": 140.0 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1208, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 825, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/feature.go", + "name": "String", + "cc": 14, + "sloc": 97, + "line": 404, + "mass": 137.88 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "check", + "cc": 14, + "sloc": 38, + "line": 275, + "mass": 86.3 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "createSpec", + "cc": 14, + "sloc": 90, + "line": 253, + "mass": 132.82 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "createSpec", + "cc": 14, + "sloc": 98, + "line": 238, + "mass": 138.59 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 598, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1132, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 732, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 764, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 522, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/plan/plan.go", + "name": "ValidColumn", + "cc": 14, + "sloc": 36, + "line": 102, + "mass": 84.0 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1049, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 523, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1255, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/subscription/subscription.go", + "name": "ValidColumn", + "cc": 14, + "sloc": 36, + "line": 171, + "mass": 84.0 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1285, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 1137, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "createSpec", + "cc": 14, + "sloc": 98, + "line": 247, + "mass": 138.59 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "querySpec", + "cc": 14, + "sloc": 45, + "line": 600, + "mass": 93.91 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1683, + "mass": 106.62 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "Save", + "cc": 14, + "sloc": 58, + "line": 1180, + "mass": 106.62 + }, + { + "path": "openmeter/entitlement/entitlement.go", + "name": "Validate", + "cc": 14, + "sloc": 32, + "line": 193, + "mass": 79.2 + }, + { + "path": "openmeter/ledger/breakage/adapter/record.go", + "name": "ListReleaseRecords", + "cc": 14, + "sloc": 78, + "line": 63, + "mass": 123.64 + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "name": "ListEventsV2", + "cc": 14, + "sloc": 58, + "line": 71, + "mass": 106.62 + }, + { + "path": "openmeter/notification/adapter/event.go", + "name": "CreateEvent", + "cc": 14, + "sloc": 77, + "line": 189, + "mass": 122.85 + }, + { + "path": "openmeter/notification/service/event.go", + "name": "ResendEvent", + "cc": 14, + "sloc": 67, + "line": 73, + "mass": 114.59 + }, + { + "path": "openmeter/productcatalog/addon/service.go", + "name": "Equal", + "cc": 14, + "sloc": 27, + "line": 214, + "mass": 72.75 + }, + { + "path": "openmeter/productcatalog/addon/service.go", + "name": "Validate", + "cc": 14, + "sloc": 35, + "line": 250, + "mass": 82.83 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsFlatFeeRateCard", + "cc": 14, + "sloc": 60, + "line": 397, + "mass": 108.44 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsEntitlementTemplate", + "cc": 14, + "sloc": 60, + "line": 802, + "mass": 108.44 + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "name": "UpdatePlan", + "cc": 14, + "sloc": 78, + "line": 410, + "mass": 123.64 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "QueryMeter", + "cc": 14, + "sloc": 60, + "line": 132, + "mass": 108.44 + }, + { + "path": "openmeter/subscription/repo/mapping.go", + "name": "MapDBSubscriptionItem", + "cc": 14, + "sloc": 98, + "line": 101, + "mass": 138.59 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "ToScheduleSubscriptionEntitlementInput", + "cc": 14, + "sloc": 75, + "line": 898, + "mass": 121.24 + }, + { + "path": "openmeter/watermill/driver/kafka/metrics/adapter.go", + "name": "getWrappedMeter", + "cc": 14, + "sloc": 49, + "line": 110, + "mass": 98.0 + }, + { + "path": "pkg/framework/commonhttp/errors.go", + "name": "HandleIssueIfHTTPStatusKnown", + "cc": 14, + "sloc": 64, + "line": 113, + "mass": 112.0 + }, + { + "path": "pkg/kafka/topicprovisioner.go", + "name": "Provision", + "cc": 14, + "sloc": 55, + "line": 186, + "mass": 103.83 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "Union", + "cc": 14, + "sloc": 35, + "line": 195, + "mass": 82.83 + }, + { + "path": "test/app/testenv.go", + "name": "NewTestEnv", + "cc": 14, + "sloc": 106, + "line": 76, + "mass": 144.14 + }, + { + "path": "api/client/javascript/scripts/generate.ts", + "name": "ast", + "cc": 13, + "sloc": 35, + "line": 11, + "mass": 76.91 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__new__", + "cc": 13, + "sloc": 27, + "line": 683, + "mass": 67.55 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "deserialize_data", + "cc": 13, + "sloc": 40, + "line": 1627, + "mass": 82.22 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterNumeric", + "cc": 13, + "sloc": 39, + "line": 391, + "mass": 81.18 + }, + { + "path": "api/v3/handlers/billingprofiles/convert.go", + "name": "ToAPIBillingWorkflow", + "cc": 13, + "sloc": 74, + "line": 179, + "mass": 111.83 + }, + { + "path": "api/v3/handlers/features/list.go", + "name": "ListFeatures", + "cc": 13, + "sloc": 90, + "line": 27, + "mass": 123.33 + }, + { + "path": "api/v3/handlers/meters/query/convert.go", + "name": "ExtractStringsFromQueryFilter", + "cc": 13, + "sloc": 23, + "line": 41, + "mass": 62.35 + }, + { + "path": "api/v3/handlers/meters/query/convert.go", + "name": "ExtractStringsFromQueryFilterMapItem", + "cc": 13, + "sloc": 21, + "line": 67, + "mass": 59.57 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPIBillingPriceWithCommitments", + "cc": 13, + "sloc": 55, + "line": 609, + "mass": 96.41 + }, + { + "path": "api/v3/handlers/subscriptions/list.go", + "name": "ListSubscriptions", + "cc": 13, + "sloc": 104, + "line": 27, + "mass": 132.57 + }, + { + "path": "app/config/sink.go", + "name": "Validate", + "cc": 13, + "sloc": 37, + "line": 43, + "mass": 79.08 + }, + { + "path": "cmd/billing-worker/main.go", + "name": "main", + "cc": 13, + "sloc": 64, + "line": 17, + "mass": 104.0 + }, + { + "path": "cmd/jobs/ledger/service/service.go", + "name": "runNamespace", + "cc": 13, + "sloc": 51, + "line": 172, + "mass": 92.84 + }, + { + "path": "cmd/sink-worker/main.go", + "name": "main", + "cc": 13, + "sloc": 81, + "line": 21, + "mass": 117.0 + }, + { + "path": "collector/benthos/input/prometheus.go", + "name": "Connect", + "cc": 13, + "sloc": 50, + "line": 274, + "mass": 91.92 + }, + { + "path": "collector/benthos/input/run_ai.go", + "name": "Connect", + "cc": 13, + "sloc": 51, + "line": 326, + "mass": 92.84 + }, + { + "path": "collector/benthos/input/runai/service.go", + "name": "NewService", + "cc": 13, + "sloc": 50, + "line": 35, + "mass": 91.92 + }, + { + "path": "e2e/e2e_test.go", + "name": "TestQueryDSTTransition", + "cc": 13, + "sloc": 212, + "line": 980, + "mass": 189.28 + }, + { + "path": "openmeter/app/stripe/types.go", + "name": "Validate", + "cc": 13, + "sloc": 33, + "line": 34, + "mass": 74.68 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelines.go", + "name": "refetchInvoiceLines", + "cc": 13, + "sloc": 52, + "line": 678, + "mass": 93.74 + }, + { + "path": "openmeter/billing/charges/adapter/search.go", + "name": "ListCharges", + "cc": 13, + "sloc": 50, + "line": 46, + "mass": 91.92 + }, + { + "path": "openmeter/billing/charges/creditpurchase/funded_credit_activity.go", + "name": "Validate", + "cc": 13, + "sloc": 31, + "line": 60, + "mass": 72.38 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go", + "name": "Validate", + "cc": 13, + "sloc": 31, + "line": 22, + "mass": 72.38 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "parsePatches", + "cc": 13, + "sloc": 53, + "line": 229, + "mass": 94.64 + }, + { + "path": "openmeter/billing/charges/lineage/service/service.go", + "name": "BackfillAdvanceLineageSegments", + "cc": 13, + "sloc": 61, + "line": 178, + "mass": 101.53 + }, + { + "path": "openmeter/billing/charges/meta/intent.go", + "name": "Validate", + "cc": 13, + "sloc": 36, + "line": 36, + "mass": 78.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "SplitGatheringLine", + "cc": 13, + "sloc": 52, + "line": 39, + "mass": 93.74 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go", + "name": "Validate", + "cc": 13, + "sloc": 61, + "line": 39, + "mass": 101.53 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual", + "cc": 13, + "sloc": 10, + "line": 118, + "mass": 41.11 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mergeStandardInvoiceLinesFromAPI", + "cc": 13, + "sloc": 53, + "line": 905, + "mass": 94.64 + }, + { + "path": "openmeter/billing/models/stddetailedline/derived.gen.go", + "name": "deriveEqual", + "cc": 13, + "sloc": 10, + "line": 29, + "mass": 41.11 + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated.go", + "name": "GenerateDetailedLines", + "cc": 13, + "sloc": 51, + "line": 19, + "mass": 92.84 + }, + { + "path": "openmeter/billing/rating/service/rate/tieredvolume.go", + "name": "GenerateDetailedLines", + "cc": 13, + "sloc": 49, + "line": 19, + "mass": 91.0 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "ListInvoices", + "cc": 13, + "sloc": 67, + "line": 24, + "mass": 106.41 + }, + { + "path": "openmeter/billing/service/service.go", + "name": "Validate", + "cc": 13, + "sloc": 39, + "line": 64, + "mass": 81.18 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "AdvanceUntilStateStable", + "cc": 13, + "sloc": 43, + "line": 484, + "mass": 85.25 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "finalizeInvoice", + "cc": 13, + "sloc": 44, + "line": 801, + "mass": 86.23 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "chargeRealizations", + "cc": 13, + "sloc": 49, + "line": 820, + "mass": 91.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "ApplyPatches", + "cc": 13, + "sloc": 48, + "line": 33, + "mass": 90.07 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "parsePatches", + "cc": 13, + "sloc": 46, + "line": 220, + "mass": 88.17 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "updateMutableStandardInvoice", + "cc": 13, + "sloc": 60, + "line": 297, + "mass": 100.7 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go", + "name": "correctPeriodStartForUpcomingLines", + "cc": 13, + "sloc": 55, + "line": 206, + "mass": 96.41 + }, + { + "path": "openmeter/customer/service/customer.go", + "name": "DeleteCustomer", + "cc": 13, + "sloc": 63, + "line": 55, + "mass": 103.18 + }, + { + "path": "openmeter/ent/db/addon/addon.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 34, + "line": 100, + "mass": 75.8 + }, + { + "path": "openmeter/ent/db/addonratecard.go", + "name": "TaxCodeOrErr", + "cc": 13, + "sloc": 35, + "line": 107, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "check", + "cc": 13, + "sloc": 31, + "line": 285, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 849, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "createSpec", + "cc": 13, + "sloc": 85, + "line": 257, + "mass": 119.85 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 594, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_update.go", + "name": "sqlSave", + "cc": 13, + "sloc": 39, + "line": 121, + "mass": 81.18 + }, + { + "path": "openmeter/ent/db/appstripe/appstripe.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 31, + "line": 75, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 700, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/appstripe_update.go", + "name": "check", + "cc": 13, + "sloc": 23, + "line": 192, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/appstripe_update.go", + "name": "check", + "cc": 13, + "sloc": 23, + "line": 487, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "check", + "cc": 13, + "sloc": 35, + "line": 168, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "createSpec", + "cc": 13, + "sloc": 77, + "line": 222, + "mass": 114.07 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/billingcustomerlock.go", + "name": "assignValues", + "cc": 13, + "sloc": 32, + "line": 42, + "mass": 73.54 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 325, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_update.go", + "name": "sqlSave", + "cc": 13, + "sloc": 43, + "line": 167, + "mass": 85.25 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1203, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 3350, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 510, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "UpdateNewValues", + "cc": 13, + "sloc": 44, + "line": 1467, + "mass": 86.23 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "check", + "cc": 13, + "sloc": 27, + "line": 157, + "mass": 67.55 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 781, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_create.go", + "name": "Save", + "cc": 13, + "sloc": 54, + "line": 305, + "mass": 95.53 + }, + { + "path": "openmeter/ent/db/billingprofile/billingprofile.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 31, + "line": 144, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1367, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 30, + "line": 159, + "mass": 71.2 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1815, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "sqlAll", + "cc": 13, + "sloc": 63, + "line": 480, + "mass": 103.18 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 453, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1137, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 595, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "check", + "cc": 13, + "sloc": 27, + "line": 291, + "mass": 67.55 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 678, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase.go", + "name": "TaxCodeOrErr", + "cc": 13, + "sloc": 35, + "line": 223, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase.go", + "name": "String", + "cc": 13, + "sloc": 128, + "line": 557, + "mass": 147.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 550, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "name": "sqlSave", + "cc": 13, + "sloc": 39, + "line": 139, + "mass": 81.18 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 918, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 978, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 33, + "line": 222, + "mass": 74.68 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1367, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 944, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "sqlAll", + "cc": 13, + "sloc": 65, + "line": 478, + "mass": 104.81 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1731, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 964, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 972, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 34, + "line": 225, + "mass": 75.8 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "UpdateNewValues", + "cc": 13, + "sloc": 45, + "line": 1371, + "mass": 87.21 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 911, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1895, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "sqlAll", + "cc": 13, + "sloc": 58, + "line": 478, + "mass": 99.01 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 964, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 944, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1382, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 490, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 528, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 642, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 522, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 564, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1491, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/entitlement.go", + "name": "CustomerOrErr", + "cc": 13, + "sloc": 35, + "line": 143, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 1465, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 910, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 793, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "createSpec", + "cc": 13, + "sloc": 84, + "line": 233, + "mass": 119.15 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 559, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 820, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "check", + "cc": 13, + "sloc": 31, + "line": 157, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 477, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "check", + "cc": 13, + "sloc": 35, + "line": 194, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 594, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgerentry_update.go", + "name": "sqlSave", + "cc": 13, + "sloc": 39, + "line": 122, + "mass": 81.18 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 581, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 677, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 528, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "createSpec", + "cc": 13, + "sloc": 85, + "line": 229, + "mass": 119.85 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 559, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 526, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 505, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/llmcostprice_update.go", + "name": "check", + "cc": 13, + "sloc": 23, + "line": 319, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/llmcostprice_update.go", + "name": "check", + "cc": 13, + "sloc": 23, + "line": 744, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 877, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "check", + "cc": 13, + "sloc": 31, + "line": 160, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 502, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 559, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 710, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 544, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 717, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 797, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 526, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/planratecard.go", + "name": "TaxCodeOrErr", + "cc": 13, + "sloc": 35, + "line": 107, + "mass": 76.91 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "LLMCostPriceOrErr", + "cc": 13, + "sloc": 30, + "line": 301, + "mass": 71.2 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 630, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 590, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go", + "name": "ValidColumn", + "cc": 13, + "sloc": 31, + "line": 57, + "mass": 72.38 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 527, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 465, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 915, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 922, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "createSpec", + "cc": 13, + "sloc": 77, + "line": 232, + "mass": 114.07 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 560, + "mass": 96.41 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "querySpec", + "cc": 13, + "sloc": 42, + "line": 451, + "mass": 84.25 + }, + { + "path": "openmeter/ent/db/usagereset_update.go", + "name": "sqlSave", + "cc": 13, + "sloc": 39, + "line": 119, + "mass": 81.18 + }, + { + "path": "openmeter/entitlement/balanceworker/worker.go", + "name": "Validate", + "cc": 13, + "sloc": 39, + "line": 60, + "mass": 81.18 + }, + { + "path": "openmeter/entitlement/driver/v2/customer_metered.go", + "name": "GetCustomerEntitlementHistory", + "cc": 13, + "sloc": 108, + "line": 202, + "mass": 135.1 + }, + { + "path": "openmeter/ingest/httpdriver/ingest.go", + "name": "IngestEvents", + "cc": 13, + "sloc": 74, + "line": 23, + "mass": 111.83 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "Validate", + "cc": 13, + "sloc": 39, + "line": 114, + "mass": 81.18 + }, + { + "path": "openmeter/ledger/collector/collect.go", + "name": "collect", + "cc": 13, + "sloc": 54, + "line": 36, + "mass": 95.53 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "correct", + "cc": 13, + "sloc": 62, + "line": 75, + "mass": 102.36 + }, + { + "path": "openmeter/ledger/recognizer/recognize.go", + "name": "RecognizeEarnings", + "cc": 13, + "sloc": 72, + "line": 31, + "mass": 110.31 + }, + { + "path": "openmeter/ledger/routing.go", + "name": "Normalize", + "cc": 13, + "sloc": 50, + "line": 292, + "mass": 91.92 + }, + { + "path": "openmeter/ledger/transactions/resolve.go", + "name": "ResolveTransactions", + "cc": 13, + "sloc": 47, + "line": 64, + "mass": 89.12 + }, + { + "path": "openmeter/meter/service.go", + "name": "Validate", + "cc": 13, + "sloc": 34, + "line": 168, + "mass": 75.8 + }, + { + "path": "openmeter/notification/adapter/channel.go", + "name": "ListChannels", + "cc": 13, + "sloc": 53, + "line": 17, + "mass": 94.64 + }, + { + "path": "openmeter/productcatalog/addon/service.go", + "name": "Validate", + "cc": 13, + "sloc": 28, + "line": 355, + "mass": 68.79 + }, + { + "path": "openmeter/productcatalog/feature/connector.go", + "name": "UpdateFeature", + "cc": 13, + "sloc": 48, + "line": 278, + "mass": 90.07 + }, + { + "path": "openmeter/productcatalog/feature/unitcost.go", + "name": "ValidateWithMeter", + "cc": 13, + "sloc": 35, + "line": 145, + "mass": 76.91 + }, + { + "path": "openmeter/productcatalog/plan/serializer.go", + "name": "MarshalJSON", + "cc": 13, + "sloc": 71, + "line": 30, + "mass": 109.54 + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "name": "Validate", + "cc": 13, + "sloc": 28, + "line": 425, + "mass": 68.79 + }, + { + "path": "openmeter/productcatalog/planaddon/service.go", + "name": "Equal", + "cc": 13, + "sloc": 30, + "line": 158, + "mass": 71.2 + }, + { + "path": "openmeter/productcatalog/planaddon/service/planaddon.go", + "name": "UpdatePlanAddon", + "cc": 13, + "sloc": 105, + "line": 273, + "mass": 133.21 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "UnmarshalJSON", + "cc": 13, + "sloc": 48, + "line": 182, + "mass": 90.07 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Equal", + "cc": 13, + "sloc": 31, + "line": 167, + "mass": 72.38 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "BackfillTaxConfig", + "cc": 13, + "sloc": 26, + "line": 299, + "mass": 66.29 + }, + { + "path": "openmeter/subscription/addon/diff/apply_test.go", + "name": "TestApply", + "cc": 13, + "sloc": 608, + "line": 29, + "mass": 320.55 + }, + { + "path": "openmeter/subscription/hooks/annotations/hook.go", + "name": "updatePreviousSubscriptionAnnotations", + "cc": 13, + "sloc": 59, + "line": 119, + "mass": 99.85 + }, + { + "path": "openmeter/subscription/patch/addphase.go", + "name": "ApplyTo", + "cc": 13, + "sloc": 51, + "line": 49, + "mass": 92.84 + }, + { + "path": "openmeter/subscription/patch/stretchphase.go", + "name": "ApplyTo", + "cc": 13, + "sloc": 51, + "line": 50, + "mass": 92.84 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 13, + "sloc": 36, + "line": 666, + "mass": 78.0 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 13, + "sloc": 35, + "line": 740, + "mass": 76.91 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 429, + "mass": 96.41 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "name": "Save", + "cc": 13, + "sloc": 55, + "line": 429, + "mass": 96.41 + }, + { + "path": "pkg/kafka/topicprovisioner.go", + "name": "NewTopicProvisioner", + "cc": 13, + "sloc": 65, + "line": 75, + "mass": 104.81 + }, + { + "path": "pkg/lrux/lruitemttl.go", + "name": "WithTTL", + "cc": 13, + "sloc": 62, + "line": 35, + "mass": 102.36 + }, + { + "path": "pkg/models/annotation.go", + "name": "GetInt", + "cc": 13, + "sloc": 26, + "line": 48, + "mass": 66.29 + }, + { + "path": "pkg/models/fielddescriptor_test.go", + "name": "TestFieldSelectors", + "cc": 13, + "sloc": 156, + "line": 68, + "mass": 162.37 + }, + { + "path": "test/app/stripe/testenv.go", + "name": "NewTestEnv", + "cc": 13, + "sloc": 109, + "line": 97, + "mass": 135.72 + }, + { + "path": "tools/migrate/migrate_test.go", + "name": "Test", + "cc": 13, + "sloc": 52, + "line": 89, + "mass": 93.74 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__init__", + "cc": 12, + "sloc": 29, + "line": 587, + "mass": 64.62 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "deserialize_object", + "cc": 12, + "sloc": 38, + "line": 1707, + "mass": 73.97 + }, + { + "path": "api/spec/packages/aip/lib/rules/field-prefix.js", + "name": "repeatedPrefixGroupingRule", + "cc": 12, + "sloc": 49, + "line": 18, + "mass": 84.0 + }, + { + "path": "api/spec/packages/aip/lib/rules/friendly-name.js", + "name": "friendlyNameRule", + "cc": 12, + "sloc": 73, + "line": 3, + "mass": 102.53 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterNumeric", + "cc": 12, + "sloc": 40, + "line": 172, + "mass": 75.89 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterLabels", + "cc": 12, + "sloc": 51, + "line": 515, + "mass": 85.7 + }, + { + "path": "api/v3/handlers/currencies/list.go", + "name": "ListCurrencies", + "cc": 12, + "sloc": 86, + "line": 29, + "mass": 111.28 + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "name": "toAPICreditGrantPurchase", + "cc": 12, + "sloc": 56, + "line": 85, + "mass": 89.8 + }, + { + "path": "api/v3/handlers/customers/credits/get_balance.go", + "name": "GetCustomerCreditBalance", + "cc": 12, + "sloc": 76, + "line": 33, + "mass": 104.61 + }, + { + "path": "api/v3/handlers/features/convert.go", + "name": "convertUnitCostToAPI", + "cc": 12, + "sloc": 37, + "line": 108, + "mass": 72.99 + }, + { + "path": "api/v3/test/filters_test.go", + "name": "TestFieldFilterParse", + "cc": 12, + "sloc": 330, + "line": 312, + "mass": 217.99 + }, + { + "path": "e2e/e2e_test.go", + "name": "TestQuery", + "cc": 12, + "sloc": 432, + "line": 478, + "mass": 249.42 + }, + { + "path": "openmeter/app/httpdriver/app.go", + "name": "UpdateApp", + "cc": 12, + "sloc": 92, + "line": 124, + "mass": 115.1 + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "name": "toCustomerData", + "cc": 12, + "sloc": 57, + "line": 264, + "mass": 90.6 + }, + { + "path": "openmeter/app/stripe/types.go", + "name": "Validate", + "cc": 12, + "sloc": 26, + "line": 203, + "mass": 61.19 + }, + { + "path": "openmeter/billing/adapter/gatheringlines.go", + "name": "HardDeleteGatheringInvoiceLines", + "cc": 12, + "sloc": 64, + "line": 28, + "mass": 96.0 + }, + { + "path": "openmeter/billing/adapter/profile.go", + "name": "ListProfiles", + "cc": 12, + "sloc": 46, + "line": 154, + "mass": 81.39 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelines.go", + "name": "ListInvoiceLines", + "cc": 12, + "sloc": 56, + "line": 536, + "mass": 89.8 + }, + { + "path": "openmeter/billing/app.go", + "name": "MergeIntoInvoice", + "cc": 12, + "sloc": 44, + "line": 217, + "mass": 79.6 + }, + { + "path": "openmeter/billing/charges/creditpurchase/settlement.go", + "name": "UnmarshalJSON", + "cc": 12, + "sloc": 51, + "line": 178, + "mass": 85.7 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/realizationrun.go", + "name": "UpdateRealizationRun", + "cc": 12, + "sloc": 45, + "line": 69, + "mass": 80.5 + }, + { + "path": "openmeter/billing/charges/flatfee/service/create.go", + "name": "Create", + "cc": 12, + "sloc": 71, + "line": 20, + "mass": 101.11 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "isDryRunLoggablePatch", + "cc": 12, + "sloc": 30, + "line": 141, + "mass": 65.73 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/models.go", + "name": "Validate", + "cc": 12, + "sloc": 30, + "line": 55, + "mass": 65.73 + }, + { + "path": "openmeter/billing/charges/service/subscription.go", + "name": "UpdateSubscriptionItemID", + "cc": 12, + "sloc": 38, + "line": 13, + "mass": 73.97 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "Validate", + "cc": 12, + "sloc": 31, + "line": 90, + "mass": 66.81 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "handleRunsOnShrink", + "cc": 12, + "sloc": 63, + "line": 347, + "mass": 95.25 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "updateStateAfterShrink", + "cc": 12, + "sloc": 44, + "line": 422, + "mass": 79.6 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "OnStandardInvoiceCreated", + "cc": 12, + "sloc": 56, + "line": 201, + "mass": 89.8 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/details.go", + "name": "ensureDetailedLinesLoadedForRating", + "cc": 12, + "sloc": 33, + "line": 155, + "mass": 68.93 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/preview.go", + "name": "Validate", + "cc": 12, + "sloc": 37, + "line": 34, + "mass": 72.99 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "MapStandardInvoiceToAPI", + "cc": 12, + "sloc": 92, + "line": 577, + "mass": 115.1 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "Validate", + "cc": 12, + "sloc": 34, + "line": 712, + "mass": 69.97 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "Validate", + "cc": 12, + "sloc": 28, + "line": 829, + "mass": 63.5 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go", + "name": "ListSubscriptions", + "cc": 12, + "sloc": 67, + "line": 95, + "mass": 98.22 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go", + "name": "loadInvoicesForSubscriptionLines", + "cc": 12, + "sloc": 34, + "line": 174, + "mass": 69.97 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "isDryRunLoggablePatch", + "cc": 12, + "sloc": 30, + "line": 138, + "mass": 65.73 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go", + "name": "getPatchesForUpdateUsageBasedLine", + "cc": 12, + "sloc": 43, + "line": 45, + "mass": 78.69 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go", + "name": "semanticProrateDecision", + "cc": 12, + "sloc": 38, + "line": 20, + "mass": 73.97 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "name": "GetMinimumBillableTime", + "cc": 12, + "sloc": 40, + "line": 144, + "mass": 75.89 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go", + "name": "GetExpectedLine", + "cc": 12, + "sloc": 62, + "line": 51, + "mass": 94.49 + }, + { + "path": "openmeter/credit/balance.go", + "name": "getBalanceSinceSnapshot", + "cc": 12, + "sloc": 68, + "line": 44, + "mass": 98.95 + }, + { + "path": "openmeter/credit/grant.go", + "name": "CreateGrant", + "cc": 12, + "sloc": 66, + "line": 47, + "mass": 97.49 + }, + { + "path": "openmeter/credit/grant.go", + "name": "VoidGrant", + "cc": 12, + "sloc": 56, + "line": 125, + "mass": 89.8 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "GetCustomer", + "cc": 12, + "sloc": 61, + "line": 435, + "mass": 93.72 + }, + { + "path": "openmeter/customer/customer.go", + "name": "Validate", + "cc": 12, + "sloc": 25, + "line": 104, + "mass": 60.0 + }, + { + "path": "openmeter/customer/customer.go", + "name": "Validate", + "cc": 12, + "sloc": 27, + "line": 148, + "mass": 62.35 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "CmpSubjectCustomer", + "cc": 12, + "sloc": 30, + "line": 226, + "mass": 65.73 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 604, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 644, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/addonratecard.go", + "name": "String", + "cc": 12, + "sloc": 87, + "line": 326, + "mass": 111.93 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 650, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 906, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 946, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 528, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 568, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 526, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 566, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "createSpec", + "cc": 12, + "sloc": 82, + "line": 235, + "mass": 108.66 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/balancesnapshot_update.go", + "name": "sqlSave", + "cc": 12, + "sloc": 36, + "line": 106, + "mass": 72.0 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride.go", + "name": "String", + "cc": 12, + "sloc": 81, + "line": 311, + "mass": 108.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 650, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "UpdateNewValues", + "cc": 12, + "sloc": 41, + "line": 3479, + "mass": 76.84 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1255, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1874, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 33, + "line": 151, + "mass": 68.93 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "UpdateNewValues", + "cc": 12, + "sloc": 42, + "line": 958, + "mass": 77.77 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 890, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 27, + "line": 71, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 873, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 726, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 496, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 638, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 889, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1090, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 250, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 584, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "UpdateNewValues", + "cc": 12, + "sloc": 41, + "line": 2140, + "mass": 76.84 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1109, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 943, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 515, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 1315, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 27, + "line": 101, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 732, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 572, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 339, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebased.go", + "name": "String", + "cc": 12, + "sloc": 132, + "line": 578, + "mass": 137.87 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1182, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 27, + "line": 92, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 654, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 724, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 250, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 584, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 27, + "line": 179, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1096, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "UpdateNewValues", + "cc": 12, + "sloc": 41, + "line": 619, + "mass": 76.84 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 571, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "createSpec", + "cc": 12, + "sloc": 73, + "line": 249, + "mass": 102.53 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 160, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "name": "check", + "cc": 12, + "sloc": 21, + "line": 381, + "mass": 54.99 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "createSpec", + "cc": 12, + "sloc": 73, + "line": 237, + "mass": 102.53 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/customcurrency/customcurrency.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 29, + "line": 57, + "mass": 64.62 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "createSpec", + "cc": 12, + "sloc": 72, + "line": 237, + "mass": 101.82 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 456, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 496, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/customer.go", + "name": "String", + "cc": 12, + "sloc": 84, + "line": 406, + "mass": 109.98 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 1046, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1086, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 871, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/feature/feature.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 29, + "line": 153, + "mass": 64.62 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 953, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 530, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 570, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 644, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 571, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 456, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 496, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 457, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 497, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 485, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 525, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "createSpec", + "cc": 12, + "sloc": 81, + "line": 215, + "mass": 108.0 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 602, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 487, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 527, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 559, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 599, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 568, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 605, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 645, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 569, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/planratecard.go", + "name": "String", + "cc": 12, + "sloc": 87, + "line": 326, + "mass": 111.93 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 650, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1183, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 646, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "check", + "cc": 12, + "sloc": 28, + "line": 126, + "mass": 63.5 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_update.go", + "name": "sqlSave", + "cc": 12, + "sloc": 36, + "line": 119, + "mass": 72.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem/subscriptionitem.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 35, + "line": 175, + "mass": 70.99 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1047, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/subscriptionphase/subscriptionphase.go", + "name": "ValidColumn", + "cc": 12, + "sloc": 29, + "line": 123, + "mass": 64.62 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 965, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 1553, + "mass": 74.94 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 1593, + "mass": 72.99 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "check", + "cc": 12, + "sloc": 32, + "line": 176, + "mass": 67.88 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 494, + "mass": 72.99 + }, + { + "path": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "name": "handleEntitlementEvent", + "cc": 12, + "sloc": 44, + "line": 85, + "mass": 79.6 + }, + { + "path": "openmeter/entitlement/metered/balance_test.go", + "name": "TestGetEntitlementHistory", + "cc": 12, + "sloc": 523, + "line": 850, + "mass": 274.43 + }, + { + "path": "openmeter/entitlement/metered/grant_owner_adapter.go", + "name": "EndCurrentUsagePeriod", + "cc": 12, + "sloc": 64, + "line": 210, + "mass": 96.0 + }, + { + "path": "openmeter/entitlement/service/service.go", + "name": "OverrideEntitlement", + "cc": 12, + "sloc": 36, + "line": 104, + "mass": 72.0 + }, + { + "path": "openmeter/entitlement/snapshot/event.go", + "name": "Validate", + "cc": 12, + "sloc": 34, + "line": 111, + "mass": 69.97 + }, + { + "path": "openmeter/ingest/kafkaingest/collector.go", + "name": "KafkaProducerGroup", + "cc": 12, + "sloc": 63, + "line": 176, + "mass": 95.25 + }, + { + "path": "openmeter/ledger/breakage/breakage_impacts.go", + "name": "Validate", + "cc": 12, + "sloc": 31, + "line": 17, + "mass": 66.81 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "ListReleases", + "cc": 12, + "sloc": 41, + "line": 481, + "mass": 76.84 + }, + { + "path": "openmeter/ledger/customerbalance/testenv_test.go", + "name": "GetByIDs", + "cc": 12, + "sloc": 48, + "line": 501, + "mass": 83.14 + }, + { + "path": "openmeter/ledger/customerbalance/testenv_test.go", + "name": "ListCharges", + "cc": 12, + "sloc": 52, + "line": 557, + "mass": 86.53 + }, + { + "path": "openmeter/ledger/routing.go", + "name": "Validate", + "cc": 12, + "sloc": 31, + "line": 173, + "mass": 66.81 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "Validate", + "cc": 12, + "sloc": 37, + "line": 98, + "mass": 72.99 + }, + { + "path": "openmeter/llmcost/service.go", + "name": "Validate", + "cc": 12, + "sloc": 32, + "line": 243, + "mass": 67.88 + }, + { + "path": "openmeter/llmcost/service/service.go", + "name": "ListPrices", + "cc": 12, + "sloc": 47, + "line": 26, + "mass": 82.27 + }, + { + "path": "openmeter/meter/meter.go", + "name": "NewEventTypeValidator", + "cc": 12, + "sloc": 72, + "line": 17, + "mass": 101.82 + }, + { + "path": "openmeter/notification/entitlements.go", + "name": "ValidateRuleConfigWithFeatures", + "cc": 12, + "sloc": 49, + "line": 124, + "mass": 84.0 + }, + { + "path": "openmeter/notification/service/channel.go", + "name": "UpdateChannel", + "cc": 12, + "sloc": 77, + "line": 157, + "mass": 105.3 + }, + { + "path": "openmeter/portal/httphandler/portal.go", + "name": "CreateToken", + "cc": 12, + "sloc": 69, + "line": 80, + "mass": 99.68 + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "name": "CreateFeature", + "cc": 12, + "sloc": 51, + "line": 43, + "mass": 85.7 + }, + { + "path": "openmeter/productcatalog/addon.go", + "name": "StatusAt", + "cc": 12, + "sloc": 23, + "line": 147, + "mass": 57.55 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "FromAddonRateCardRow", + "cc": 12, + "sloc": 73, + "line": 87, + "mass": 102.53 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "DeleteAddon", + "cc": 12, + "sloc": 68, + "line": 199, + "mass": 98.95 + }, + { + "path": "openmeter/productcatalog/driver/parser.go", + "name": "domainUnitCostToAPI", + "cc": 12, + "sloc": 37, + "line": 74, + "mass": 72.99 + }, + { + "path": "openmeter/productcatalog/feature/connector.go", + "name": "Validate", + "cc": 12, + "sloc": 32, + "line": 125, + "mass": 67.88 + }, + { + "path": "openmeter/productcatalog/feature/featuremeter.go", + "name": "ResolveFeatureMeters", + "cc": 12, + "sloc": 69, + "line": 56, + "mass": 99.68 + }, + { + "path": "openmeter/productcatalog/plan/adapter/mapping.go", + "name": "fromPlanRateCardRow", + "cc": 12, + "sloc": 73, + "line": 288, + "mass": 102.53 + }, + { + "path": "openmeter/productcatalog/plan/assert.go", + "name": "AssertPlanEqual", + "cc": 12, + "sloc": 68, + "line": 53, + "mass": 98.95 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 12, + "sloc": 25, + "line": 260, + "mass": 60.0 + }, + { + "path": "openmeter/productcatalog/subscription/http/get.go", + "name": "ListCustomerSubscriptions", + "cc": 12, + "sloc": 86, + "line": 89, + "mass": 111.28 + }, + { + "path": "openmeter/productcatalog/subscription/service/change.go", + "name": "Change", + "cc": 12, + "sloc": 47, + "line": 14, + "mass": 82.27 + }, + { + "path": "openmeter/productcatalog/subscription/service/create.go", + "name": "Create", + "cc": 12, + "sloc": 45, + "line": 14, + "mass": 80.5 + }, + { + "path": "openmeter/server/server.go", + "name": "NewServer", + "cc": 12, + "sloc": 166, + "line": 74, + "mass": 154.61 + }, + { + "path": "openmeter/sink/sink.go", + "name": "NewSink", + "cc": 12, + "sloc": 67, + "line": 173, + "mass": 98.22 + }, + { + "path": "openmeter/subscription/hooks/annotations/hook.go", + "name": "updateSupersedingSubscriptionAnnotations", + "cc": 12, + "sloc": 58, + "line": 53, + "mass": 91.39 + }, + { + "path": "openmeter/subscription/patch/removeitem.go", + "name": "ApplyTo", + "cc": 12, + "sloc": 41, + "line": 38, + "mass": 76.84 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "Validate", + "cc": 12, + "sloc": 25, + "line": 1014, + "mass": 60.0 + }, + { + "path": "openmeter/subscription/workflow/service/addon.go", + "name": "ChangeAddonQuantity", + "cc": 12, + "sloc": 59, + "line": 118, + "mass": 92.17 + }, + { + "path": "pkg/datetime/duration.go", + "name": "DivisibleBy", + "cc": 12, + "sloc": 39, + "line": 119, + "mass": 74.94 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 12, + "sloc": 32, + "line": 430, + "mass": 67.88 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 12, + "sloc": 32, + "line": 546, + "mass": 67.88 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateWithComplexity", + "cc": 12, + "sloc": 29, + "line": 916, + "mass": 64.62 + }, + { + "path": "pkg/framework/entutils/entpaginate/paginate_test.go", + "name": "TestPaginate", + "cc": 12, + "sloc": 100, + "line": 17, + "mass": 120.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "querySpec", + "cc": 12, + "sloc": 39, + "line": 375, + "mass": 74.94 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "sqlQuery", + "cc": 12, + "sloc": 37, + "line": 415, + "mass": 72.99 + }, + { + "path": "pkg/framework/transaction/transaction.go", + "name": "getTx", + "cc": 12, + "sloc": 47, + "line": 53, + "mass": 82.27 + }, + { + "path": "pkg/kafka/config.go", + "name": "Validate", + "cc": 12, + "sloc": 31, + "line": 147, + "mass": 66.81 + }, + { + "path": "pkg/kafka/metrics/internal/broker.go", + "name": "NewBrokerLatencyMetrics", + "cc": 12, + "sloc": 83, + "line": 61, + "mass": 109.33 + }, + { + "path": "pkg/kafka/metrics/internal/broker.go", + "name": "NewBrokerThrottleMetrics", + "cc": 12, + "sloc": 83, + "line": 205, + "mass": 109.33 + }, + { + "path": "pkg/kafka/metrics/internal/partition.go", + "name": "NewPartitionMetrics", + "cc": 12, + "sloc": 77, + "line": 300, + "mass": 105.3 + }, + { + "path": "pkg/kafka/metrics/stats/consumergroup.go", + "name": "UnmarshalJSON", + "cc": 12, + "sloc": 29, + "line": 124, + "mass": 64.62 + }, + { + "path": "pkg/timeutil/recurrence.go", + "name": "iterateFromNextAfterInclusive", + "cc": 12, + "sloc": 55, + "line": 102, + "mass": 88.99 + }, + { + "path": "tools/migrate/dedupe_tax_codes_by_app_mapping_test.go", + "name": "TestDedupeTaxCodesByAppMappingMigration", + "cc": 12, + "sloc": 474, + "line": 13, + "mass": 261.26 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_timedelta_as_isostr", + "cc": 11, + "sloc": 44, + "line": 35, + "mass": 72.97 + }, + { + "path": "api/v3/handlers/customers/billing/get_billing.go", + "name": "GetCustomerBilling", + "cc": 11, + "sloc": 72, + "line": 30, + "mass": 93.34 + }, + { + "path": "api/v3/handlers/customers/charges/convert.go", + "name": "convertChargeToAPI", + "cc": 11, + "sloc": 37, + "line": 118, + "mass": 66.91 + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "name": "fromAPICreateCreditGrantRequest", + "cc": 11, + "sloc": 53, + "line": 326, + "mass": 80.08 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "ToAPIBillingRateCard", + "cc": 11, + "sloc": 45, + "line": 111, + "mass": 73.79 + }, + { + "path": "api/v3/handlers/subscriptions/change.go", + "name": "ChangeSubscription", + "cc": 11, + "sloc": 98, + "line": 29, + "mass": 108.89 + }, + { + "path": "api/v3/handlers/subscriptions/create.go", + "name": "CreateSubscription", + "cc": 11, + "sloc": 107, + "line": 27, + "mass": 113.78 + }, + { + "path": "api/v3/labels/convert.go", + "name": "FromMetadataAnnotations", + "cc": 11, + "sloc": 35, + "line": 56, + "mass": 65.08 + }, + { + "path": "api/v3/oasmiddleware/hook.go", + "name": "SanitizeSensitiveFieldValues", + "cc": 11, + "sloc": 25, + "line": 68, + "mass": 55.0 + }, + { + "path": "api/v3/test/filters_test.go", + "name": "TestFieldFilterValidation", + "cc": 11, + "sloc": 195, + "line": 100, + "mass": 153.61 + }, + { + "path": "cmd/balance-worker/main.go", + "name": "main", + "cc": 11, + "sloc": 53, + "line": 17, + "mass": 80.08 + }, + { + "path": "collector/benthos/input/kubernetes.go", + "name": "newKubernetesResourcesInput", + "cc": 11, + "sloc": 69, + "line": 72, + "mass": 91.37 + }, + { + "path": "collector/benthos/output/openmeter.go", + "name": "toAttrs", + "cc": 11, + "sloc": 26, + "line": 304, + "mass": 56.09 + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "name": "toAPICustomerAppData", + "cc": 11, + "sloc": 51, + "line": 359, + "mass": 78.56 + }, + { + "path": "openmeter/app/httpdriver/mapper.go", + "name": "MapEventAppToAPI", + "cc": 11, + "sloc": 37, + "line": 112, + "mass": 66.91 + }, + { + "path": "openmeter/app/sandbox/mock.go", + "name": "AssertExpectations", + "cc": 11, + "sloc": 18, + "line": 132, + "mass": 46.67 + }, + { + "path": "openmeter/app/stripe/app.go", + "name": "Validate", + "cc": 11, + "sloc": 33, + "line": 44, + "mass": 63.19 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "WithTaxCodeID", + "cc": 11, + "sloc": 45, + "line": 416, + "mass": 73.79 + }, + { + "path": "openmeter/billing/charges/creditpurchase/settlement.go", + "name": "Validate", + "cc": 11, + "sloc": 28, + "line": 240, + "mass": 58.21 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnUnsupportedCreditNote", + "cc": 11, + "sloc": 37, + "line": 255, + "mass": 66.91 + }, + { + "path": "openmeter/billing/charges/flatfee/service/payment.go", + "name": "postInvoicePaymentSettled", + "cc": 11, + "sloc": 52, + "line": 82, + "mass": 79.32 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go", + "name": "AllocateCreditsOnly", + "cc": 11, + "sloc": 59, + "line": 45, + "mass": 84.49 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "name": "ReconcileStandardLineToIntent", + "cc": 11, + "sloc": 68, + "line": 250, + "mass": 90.71 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/correction.go", + "name": "ValidateWith", + "cc": 11, + "sloc": 43, + "line": 112, + "mass": 72.13 + }, + { + "path": "openmeter/billing/charges/service/patch.go", + "name": "applyPatches", + "cc": 11, + "sloc": 40, + "line": 40, + "mass": 69.57 + }, + { + "path": "openmeter/billing/charges/service/service.go", + "name": "Validate", + "cc": 11, + "sloc": 34, + "line": 57, + "mass": 64.14 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/detailedline.go", + "name": "FetchDetailedLines", + "cc": 11, + "sloc": 62, + "line": 23, + "mass": 86.61 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/detailedline.go", + "name": "UpsertRunDetailedLines", + "cc": 11, + "sloc": 86, + "line": 96, + "mass": 102.01 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "OnCollectionCompleted", + "cc": 11, + "sloc": 36, + "line": 269, + "mass": 66.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "OnUnsupportedCreditNote", + "cc": 11, + "sloc": 38, + "line": 382, + "mass": 67.81 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/details.go", + "name": "GetDetailedRatingForUsage", + "cc": 11, + "sloc": 64, + "line": 82, + "mass": 88.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/details.go", + "name": "ratePeriodPreservingDetails", + "cc": 11, + "sloc": 71, + "line": 214, + "mass": 92.69 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "name": "subtractDetailedLinesWithSameKey", + "cc": 11, + "sloc": 53, + "line": 204, + "mass": 80.08 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/correct.go", + "name": "ReconcileCredits", + "cc": 11, + "sloc": 59, + "line": 66, + "mass": 84.49 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/invoice.go", + "name": "Validate", + "cc": 11, + "sloc": 27, + "line": 18, + "mass": 57.16 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment.go", + "name": "Validate", + "cc": 11, + "sloc": 33, + "line": 119, + "mass": 63.19 + }, + { + "path": "openmeter/billing/customeroverride.go", + "name": "Validate", + "cc": 11, + "sloc": 24, + "line": 75, + "mass": 53.89 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualUsageLineDiscount", + "cc": 11, + "sloc": 8, + "line": 62, + "mass": 31.11 + }, + { + "path": "openmeter/billing/invoice.go", + "name": "Validate", + "cc": 11, + "sloc": 16, + "line": 319, + "mass": 44.0 + }, + { + "path": "openmeter/billing/invoicelinesplitgroup.go", + "name": "MarshalJSON", + "cc": 11, + "sloc": 45, + "line": 263, + "mass": 73.79 + }, + { + "path": "openmeter/billing/models/stddetailedline/model.go", + "name": "Validate", + "cc": 11, + "sloc": 32, + "line": 77, + "mass": 62.23 + }, + { + "path": "openmeter/billing/rating/service/billableperiod.go", + "name": "ResolveBillablePeriod", + "cc": 11, + "sloc": 37, + "line": 12, + "mass": 66.91 + }, + { + "path": "openmeter/billing/rating/service/testutil/ubptest.go", + "name": "RunCalculationTestCase", + "cc": 11, + "sloc": 85, + "line": 55, + "mass": 101.41 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "GetCustomerApp", + "cc": 11, + "sloc": 46, + "line": 109, + "mass": 74.61 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "ListCustomerOverrides", + "cc": 11, + "sloc": 55, + "line": 202, + "mass": 81.58 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "collectNewlyDeletedStandardLines", + "cc": 11, + "sloc": 31, + "line": 618, + "mass": 61.25 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "onCollectionCompleted", + "cc": 11, + "sloc": 39, + "line": 906, + "mass": 68.69 + }, + { + "path": "openmeter/billing/taxconfig.go", + "name": "Equal", + "cc": 11, + "sloc": 15, + "line": 44, + "mass": 42.6 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "expectLines", + "cc": 11, + "sloc": 54, + "line": 303, + "mass": 80.83 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go", + "name": "LoadForSubscription", + "cc": 11, + "sloc": 50, + "line": 40, + "mass": 77.78 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go", + "name": "AddExtend", + "cc": 11, + "sloc": 48, + "line": 136, + "mass": 76.21 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "name": "Apply", + "cc": 11, + "sloc": 38, + "line": 329, + "mass": 67.81 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go", + "name": "Build", + "cc": 11, + "sloc": 55, + "line": 65, + "mass": 81.58 + }, + { + "path": "openmeter/cost/adapter/compute.go", + "name": "costPerTokenForType", + "cc": 11, + "sloc": 26, + "line": 215, + "mass": 56.09 + }, + { + "path": "openmeter/credit/driver/grant.go", + "name": "ListGrants", + "cc": 11, + "sloc": 80, + "line": 69, + "mass": 98.39 + }, + { + "path": "openmeter/credit/engine/reset.go", + "name": "reset", + "cc": 11, + "sloc": 36, + "line": 14, + "mass": 66.0 + }, + { + "path": "openmeter/credit/engine/run_test.go", + "name": "TestEngine", + "cc": 11, + "sloc": 985, + "line": 24, + "mass": 345.23 + }, + { + "path": "openmeter/credit/grant/grant.go", + "name": "GetEffectivePeriod", + "cc": 11, + "sloc": 27, + "line": 76, + "mass": 57.16 + }, + { + "path": "openmeter/credit/helper.go", + "name": "snapshotEngineResult", + "cc": 11, + "sloc": 33, + "line": 176, + "mass": 63.19 + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "name": "CheckUniqueBatch", + "cc": 11, + "sloc": 33, + "line": 181, + "mass": 63.19 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 56, + "line": 444, + "mass": 82.32 + }, + { + "path": "openmeter/ent/db/addonratecard/addonratecard.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 32, + "line": 114, + "mass": 62.23 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 51, + "line": 443, + "mass": 78.56 + }, + { + "path": "openmeter/ent/db/appcustomer_update.go", + "name": "sqlSave", + "cc": 11, + "sloc": 33, + "line": 109, + "mass": 63.19 + }, + { + "path": "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 63, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 78, + "line": 213, + "mass": 97.15 + }, + { + "path": "openmeter/ent/db/appstripecustomer/appstripecustomer.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 69, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/balancesnapshot.go", + "name": "EntitlementOrErr", + "cc": 11, + "sloc": 31, + "line": 60, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 38, + "line": 636, + "mass": 67.81 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 51, + "line": 443, + "mass": 78.56 + }, + { + "path": "openmeter/ent/db/billinginvoice.go", + "name": "PaymentAppOrErr", + "cc": 11, + "sloc": 31, + "line": 282, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 39, + "line": 2297, + "mass": 68.69 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount.go", + "name": "BillingInvoiceLineOrErr", + "cc": 11, + "sloc": 31, + "line": 76, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 30, + "line": 81, + "mass": 60.25 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "name": "BillingInvoiceLineOrErr", + "cc": 11, + "sloc": 31, + "line": 64, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "name": "TaxCodeOrErr", + "cc": 11, + "sloc": 31, + "line": 161, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 60, + "line": 211, + "mass": 85.21 + }, + { + "path": "openmeter/ent/db/billingprofile.go", + "name": "String", + "cc": 11, + "sloc": 91, + "line": 387, + "mass": 104.93 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "name": "DetailedLineOrErr", + "cc": 11, + "sloc": 31, + "line": 64, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 108, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 51, + "line": 444, + "mass": 78.56 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 38, + "line": 807, + "mass": 67.81 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 29, + "line": 210, + "mass": 59.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 69, + "line": 226, + "mass": 91.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 80, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 95, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargeflatfee.go", + "name": "TaxCodeOrErr", + "cc": 11, + "sloc": 31, + "line": 227, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 39, + "line": 1424, + "mass": 68.69 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 158, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "name": "BillingInvoiceLineOrErr", + "cc": 11, + "sloc": 31, + "line": 108, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "name": "TaxCodeOrErr", + "cc": 11, + "sloc": 31, + "line": 129, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 95, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 108, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "querySpec", + "cc": 11, + "sloc": 36, + "line": 302, + "mass": 66.0 + }, + { + "path": "openmeter/ent/db/chargeusagebased.go", + "name": "TaxCodeOrErr", + "cc": 11, + "sloc": 31, + "line": 233, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "name": "RunOrErr", + "cc": 11, + "sloc": 31, + "line": 94, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 58, + "line": 442, + "mass": 83.77 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "name": "TaxCodeOrErr", + "cc": 11, + "sloc": 31, + "line": 160, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 86, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 38, + "line": 1511, + "mass": 67.81 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_update.go", + "name": "check", + "cc": 11, + "sloc": 19, + "line": 491, + "mass": 47.95 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_update.go", + "name": "check", + "cc": 11, + "sloc": 19, + "line": 1279, + "mass": 47.95 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 71, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "UpdateNewValues", + "cc": 11, + "sloc": 39, + "line": 382, + "mass": 68.69 + }, + { + "path": "openmeter/ent/db/currencycostbasis_update.go", + "name": "sqlSave", + "cc": 11, + "sloc": 33, + "line": 106, + "mass": 63.19 + }, + { + "path": "openmeter/ent/db/customer/customer.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 162, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/grant.go", + "name": "EntitlementOrErr", + "cc": 11, + "sloc": 31, + "line": 76, + "mass": 61.25 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "check", + "cc": 11, + "sloc": 25, + "line": 184, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "check", + "cc": 11, + "sloc": 29, + "line": 185, + "mass": 59.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 52, + "line": 444, + "mass": 79.32 + }, + { + "path": "openmeter/ent/db/meter/meter.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 25, + "line": 80, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/notificationchannel/notificationchannel.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 29, + "line": 73, + "mass": 59.24 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 26, + "line": 72, + "mass": 56.09 + }, + { + "path": "openmeter/ent/db/notificationrule/notificationrule.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 29, + "line": 82, + "mass": 59.24 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "check", + "cc": 11, + "sloc": 29, + "line": 161, + "mass": 59.24 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 78, + "line": 214, + "mass": 97.15 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 54, + "line": 444, + "mass": 80.83 + }, + { + "path": "openmeter/ent/db/planaddon/planaddon.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 75, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/planphase/planphase.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 78, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/planratecard/planratecard.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 32, + "line": 114, + "mass": 62.23 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 51, + "line": 443, + "mass": 78.56 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "check", + "cc": 11, + "sloc": 25, + "line": 178, + "mass": 55.0 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 60, + "line": 227, + "mass": 85.21 + }, + { + "path": "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go", + "name": "ValidColumn", + "cc": 11, + "sloc": 27, + "line": 75, + "mass": 57.16 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "sqlAll", + "cc": 11, + "sloc": 54, + "line": 444, + "mass": 80.83 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "createSpec", + "cc": 11, + "sloc": 69, + "line": 249, + "mass": 91.37 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_update.go", + "name": "sqlSave", + "cc": 11, + "sloc": 33, + "line": 106, + "mass": 63.19 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "UpsertEntitlementCurrentPeriods", + "cc": 11, + "sloc": 75, + "line": 680, + "mass": 95.26 + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "name": "Validate", + "cc": 11, + "sloc": 34, + "line": 61, + "mass": 64.14 + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "name": "ToAPIGeneric", + "cc": 11, + "sloc": 37, + "line": 147, + "mass": 66.91 + }, + { + "path": "openmeter/entitlement/metered/connector.go", + "name": "BeforeCreate", + "cc": 11, + "sloc": 65, + "line": 143, + "mass": 88.68 + }, + { + "path": "openmeter/entitlement/metered/entitlement.go", + "name": "ParseFromGenericEntitlement", + "cc": 11, + "sloc": 43, + "line": 73, + "mass": 72.13 + }, + { + "path": "openmeter/entitlement/metered/grant_owner_adapter.go", + "name": "DescribeOwner", + "cc": 11, + "sloc": 67, + "line": 55, + "mass": 90.04 + }, + { + "path": "openmeter/entitlement/metered/reset_test.go", + "name": "TestResetEntitlementUsage", + "cc": 11, + "sloc": 800, + "line": 26, + "mass": 311.13 + }, + { + "path": "openmeter/ledger/account/service/service.go", + "name": "LockAccountsForPosting", + "cc": 11, + "sloc": 35, + "line": 116, + "mass": 65.08 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "Validate", + "cc": 11, + "sloc": 30, + "line": 215, + "mass": 60.25 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "PersistCommittedRecords", + "cc": 11, + "sloc": 48, + "line": 551, + "mass": 76.21 + }, + { + "path": "openmeter/ledger/resolvers/account.go", + "name": "GetCustomerAccounts", + "cc": 11, + "sloc": 60, + "line": 96, + "mass": 85.21 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "correct", + "cc": 11, + "sloc": 37, + "line": 298, + "mass": 66.91 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "Validate", + "cc": 11, + "sloc": 31, + "line": 490, + "mass": 61.25 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "correct", + "cc": 11, + "sloc": 37, + "line": 69, + "mass": 66.91 + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "name": "Reconcile", + "cc": 11, + "sloc": 68, + "line": 58, + "mass": 90.71 + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "name": "validateEvents", + "cc": 11, + "sloc": 39, + "line": 227, + "mass": 68.69 + }, + { + "path": "openmeter/notification/eventhandler/handler.go", + "name": "Start", + "cc": 11, + "sloc": 43, + "line": 86, + "mass": 72.13 + }, + { + "path": "openmeter/notification/eventhandler/webhook.go", + "name": "eventAsPayload", + "cc": 11, + "sloc": 36, + "line": 566, + "mass": 66.0 + }, + { + "path": "openmeter/notification/httpdriver/rule.go", + "name": "CreateRule", + "cc": 11, + "sloc": 51, + "line": 90, + "mass": 78.56 + }, + { + "path": "openmeter/notification/httpdriver/rule.go", + "name": "UpdateRule", + "cc": 11, + "sloc": 51, + "line": 150, + "mass": 78.56 + }, + { + "path": "openmeter/portal/authenticator/authenticator.go", + "name": "verifyPortalToken", + "cc": 11, + "sloc": 30, + "line": 83, + "mass": 60.25 + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "name": "UpdateFeature", + "cc": 11, + "sloc": 64, + "line": 100, + "mass": 88.0 + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "name": "MapFeatureEntity", + "cc": 11, + "sloc": 52, + "line": 374, + "mass": 79.32 + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "name": "GetAddon", + "cc": 11, + "sloc": 118, + "line": 306, + "mass": 119.49 + }, + { + "path": "openmeter/productcatalog/addon/service.go", + "name": "Validate", + "cc": 11, + "sloc": 29, + "line": 100, + "mass": 59.24 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "resolveTaxCodes", + "cc": 11, + "sloc": 39, + "line": 36, + "mass": 68.69 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "CreateAddon", + "cc": 11, + "sloc": 47, + "line": 139, + "mass": 75.41 + }, + { + "path": "openmeter/productcatalog/feature/feature.go", + "name": "Validate", + "cc": 11, + "sloc": 32, + "line": 158, + "mass": 62.23 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "FromEntitlementTemplate", + "cc": 11, + "sloc": 50, + "line": 265, + "mass": 77.78 + }, + { + "path": "openmeter/productcatalog/plan.go", + "name": "Equal", + "cc": 11, + "sloc": 34, + "line": 269, + "mass": 64.14 + }, + { + "path": "openmeter/productcatalog/plan/adapter/mapping.go", + "name": "FromPlanRow", + "cc": 11, + "sloc": 68, + "line": 17, + "mass": 90.71 + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "name": "GetPlan", + "cc": 11, + "sloc": 97, + "line": 302, + "mass": 108.34 + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "name": "ValidateWithPlan", + "cc": 11, + "sloc": 33, + "line": 321, + "mass": 63.19 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "resolveTaxCodes", + "cc": 11, + "sloc": 37, + "line": 33, + "mass": 66.91 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "name": "UpdatePlanAddon", + "cc": 11, + "sloc": 61, + "line": 341, + "mass": 85.91 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "ResolveTaxConfig", + "cc": 11, + "sloc": 38, + "line": 257, + "mass": 67.81 + }, + { + "path": "openmeter/server/server_test.go", + "name": "TestRoutes", + "cc": 11, + "sloc": 540, + "line": 145, + "mass": 255.62 + }, + { + "path": "openmeter/sink/flushhandler/handler.go", + "name": "start", + "cc": 11, + "sloc": 33, + "line": 147, + "mass": 63.19 + }, + { + "path": "openmeter/sink/sink.go", + "name": "dedupeSet", + "cc": 11, + "sloc": 69, + "line": 478, + "mass": 91.37 + }, + { + "path": "openmeter/streaming/clickhouse/meter_query.go", + "name": "from", + "cc": 11, + "sloc": 25, + "line": 62, + "mass": 55.0 + }, + { + "path": "openmeter/streaming/connector.go", + "name": "Validate", + "cc": 11, + "sloc": 29, + "line": 100, + "mass": 59.24 + }, + { + "path": "openmeter/streaming/eventparams.go", + "name": "Validate", + "cc": 11, + "sloc": 20, + "line": 73, + "mass": 49.19 + }, + { + "path": "openmeter/subject/adapter/subject.go", + "name": "Update", + "cc": 11, + "sloc": 47, + "line": 52, + "mass": 75.41 + }, + { + "path": "openmeter/subscription/addon/diff/affected.go", + "name": "GetAffectedItemIDs", + "cc": 11, + "sloc": 38, + "line": 12, + "mass": 67.81 + }, + { + "path": "openmeter/subscription/addon/repo/subscriptionaddon.go", + "name": "List", + "cc": 11, + "sloc": 44, + "line": 87, + "mass": 72.97 + }, + { + "path": "openmeter/subscription/service/service_test.go", + "name": "TestContinuing", + "cc": 11, + "sloc": 117, + "line": 361, + "mass": 118.98 + }, + { + "path": "openmeter/subscription/specpath.go", + "name": "Validate", + "cc": 11, + "sloc": 27, + "line": 66, + "mass": 57.16 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetPhaseCadence", + "cc": 11, + "sloc": 40, + "line": 88, + "mass": 69.57 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "Validate", + "cc": 11, + "sloc": 24, + "line": 796, + "mass": 53.89 + }, + { + "path": "openmeter/subscription/validators/subscription/validator.go", + "name": "BeforeUpdate", + "cc": 11, + "sloc": 42, + "line": 88, + "mass": 71.29 + }, + { + "path": "openmeter/subscription/workflow/service/subscription.go", + "name": "CreateFromPlan", + "cc": 11, + "sloc": 58, + "line": 23, + "mass": 83.77 + }, + { + "path": "openmeter/taxcode/namespacehandler.go", + "name": "CreateNamespace", + "cc": 11, + "sloc": 47, + "line": 95, + "mass": 75.41 + }, + { + "path": "openmeter/watermill/driver/kafka/broker.go", + "name": "createKafkaConfig", + "cc": 11, + "sloc": 64, + "line": 48, + "mass": 88.0 + }, + { + "path": "openmeter/watermill/router/router.go", + "name": "NewDefaultRouter", + "cc": 11, + "sloc": 79, + "line": 56, + "mass": 97.77 + }, + { + "path": "pkg/datetime/parse.go", + "name": "Parse", + "cc": 11, + "sloc": 56, + "line": 10, + "mass": 82.32 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateWithComplexity", + "cc": 11, + "sloc": 26, + "line": 114, + "mass": 56.09 + }, + { + "path": "pkg/filter/filter.go", + "name": "SelectWhereExpr", + "cc": 11, + "sloc": 30, + "line": 635, + "mass": 60.25 + }, + { + "path": "pkg/filter/filter.go", + "name": "SelectWhereExpr", + "cc": 11, + "sloc": 30, + "line": 709, + "mass": 60.25 + }, + { + "path": "pkg/framework/commonhttp/encoder.go", + "name": "GenericErrorEncoder", + "cc": 11, + "sloc": 26, + "line": 137, + "mass": 56.09 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_update.go", + "name": "sqlSave", + "cc": 11, + "sloc": 33, + "line": 112, + "mass": 63.19 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_update.go", + "name": "sqlSave", + "cc": 11, + "sloc": 33, + "line": 112, + "mass": 63.19 + }, + { + "path": "pkg/kafka/metrics/stats/broker.go", + "name": "UnmarshalJSON", + "cc": 11, + "sloc": 27, + "line": 74, + "mass": 57.16 + }, + { + "path": "pkg/kafka/metrics/stats/broker.go", + "name": "Int64", + "cc": 11, + "sloc": 26, + "line": 105, + "mass": 56.09 + }, + { + "path": "pkg/kafka/metrics/stats/consumergroup.go", + "name": "Int64", + "cc": 11, + "sloc": 44, + "line": 75, + "mass": 72.97 + }, + { + "path": "pkg/kafka/metrics/stats/consumergroup.go", + "name": "Int64", + "cc": 11, + "sloc": 26, + "line": 157, + "mass": 56.09 + }, + { + "path": "test/credits/sanity_test.go", + "name": "assertBreakageRowsByExpiry", + "cc": 11, + "sloc": 57, + "line": 1149, + "mass": 83.05 + }, + { + "path": "tools/migrate/productcatalog_test.go", + "name": "TestSubscriptionBillingCadenceProRatingMigration", + "cc": 11, + "sloc": 512, + "line": 618, + "mass": 248.9 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_deserialize_sequence", + "cc": 10, + "sloc": 20, + "line": 845, + "mass": 44.72 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 10, + "sloc": 25, + "line": 533, + "mass": 50.0 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 10, + "sloc": 46, + "line": 995, + "mass": 67.82 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 10, + "sloc": 28, + "line": 1124, + "mass": 52.92 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterLabel", + "cc": 10, + "sloc": 34, + "line": 97, + "mass": 58.31 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterDateTime", + "cc": 10, + "sloc": 30, + "line": 216, + "mass": 54.77 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterBoolean", + "cc": 10, + "sloc": 41, + "line": 250, + "mass": 64.03 + }, + { + "path": "api/v3/handlers/customers/convert.gen.go", + "name": "init", + "cc": 10, + "sloc": 82, + "line": 15, + "mass": 90.55 + }, + { + "path": "api/v3/handlers/customers/credits/list_grants.go", + "name": "ListCreditGrants", + "cc": 10, + "sloc": 74, + "line": 32, + "mass": 86.02 + }, + { + "path": "api/v3/handlers/features/convert.go", + "name": "enrichFeatureResponseWithPricing", + "cc": 10, + "sloc": 32, + "line": 194, + "mass": 56.57 + }, + { + "path": "api/v3/handlers/features/update.go", + "name": "UpdateFeature", + "cc": 10, + "sloc": 40, + "line": 22, + "mass": 63.25 + }, + { + "path": "api/v3/handlers/llmcost/list_overrides.go", + "name": "ListOverrides", + "cc": 10, + "sloc": 78, + "line": 27, + "mass": 88.32 + }, + { + "path": "api/v3/handlers/meters/list.go", + "name": "ListMeters", + "cc": 10, + "sloc": 78, + "line": 27, + "mass": 88.32 + }, + { + "path": "api/v3/handlers/subscriptions/subscriptionaddons/list.go", + "name": "ListSubscriptionAddons", + "cc": 10, + "sloc": 70, + "line": 37, + "mass": 83.67 + }, + { + "path": "api/v3/oasmiddleware/hook.go", + "name": "OasValidationErrorHook", + "cc": 10, + "sloc": 36, + "line": 31, + "mass": 60.0 + }, + { + "path": "api/v3/server/server.go", + "name": "NewServer", + "cc": 10, + "sloc": 88, + "line": 257, + "mass": 93.81 + }, + { + "path": "app/common/clickhouse.go", + "name": "NewClickHouse", + "cc": 10, + "sloc": 46, + "line": 21, + "mass": 67.82 + }, + { + "path": "app/common/database.go", + "name": "Migrate", + "cc": 10, + "sloc": 34, + "line": 37, + "mass": 58.31 + }, + { + "path": "app/config/dedupe.go", + "name": "DecodeMap", + "cc": 10, + "sloc": 44, + "line": 59, + "mass": 66.33 + }, + { + "path": "app/config/telemetry.go", + "name": "kongReplaceAttr", + "cc": 10, + "sloc": 24, + "line": 386, + "mass": 48.99 + }, + { + "path": "collector/benthos/input/otel_log.go", + "name": "anyFrom", + "cc": 10, + "sloc": 26, + "line": 203, + "mass": 50.99 + }, + { + "path": "collector/benthos/output/openmeter.go", + "name": "UpdateMessageSpan", + "cc": 10, + "sloc": 40, + "line": 250, + "mass": 63.25 + }, + { + "path": "e2e/productcatalog_smoke_v3_test.go", + "name": "TestV3ProductCatalogSmoke", + "cc": 10, + "sloc": 209, + "line": 30, + "mass": 144.57 + }, + { + "path": "openmeter/app/adapter/app.go", + "name": "ListApps", + "cc": 10, + "sloc": 57, + "line": 75, + "mass": 75.5 + }, + { + "path": "openmeter/app/app.go", + "name": "Validate", + "cc": 10, + "sloc": 26, + "line": 95, + "mass": 50.99 + }, + { + "path": "openmeter/app/app.go", + "name": "Validate", + "cc": 10, + "sloc": 36, + "line": 160, + "mass": 60.0 + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "name": "UpsertCustomerData", + "cc": 10, + "sloc": 56, + "line": 124, + "mass": 74.83 + }, + { + "path": "openmeter/app/httpdriver/marketplace.go", + "name": "MarketplaceAppInstall", + "cc": 10, + "sloc": 55, + "line": 182, + "mass": 74.16 + }, + { + "path": "openmeter/app/httpdriver/marketplace.go", + "name": "makeStripeDefaultBillingApp", + "cc": 10, + "sloc": 48, + "line": 263, + "mass": 69.28 + }, + { + "path": "openmeter/app/input.go", + "name": "Validate", + "cc": 10, + "sloc": 19, + "line": 69, + "mass": 43.59 + }, + { + "path": "openmeter/app/sandbox/app.go", + "name": "PostAdvanceStandardInvoiceHook", + "cc": 10, + "sloc": 41, + "line": 109, + "mass": 64.03 + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "name": "FinalizeStandardInvoice", + "cc": 10, + "sloc": 49, + "line": 89, + "mass": 70.0 + }, + { + "path": "openmeter/app/stripe/httpdriver/customer.go", + "name": "CreateStripeCustomerPortalSession", + "cc": 10, + "sloc": 71, + "line": 175, + "mass": 84.26 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "CollectFeatureKeys", + "cc": 10, + "sloc": 28, + "line": 482, + "mass": 52.92 + }, + { + "path": "openmeter/billing/charges/flatfee/charge.go", + "name": "Validate", + "cc": 10, + "sloc": 30, + "line": 141, + "mass": 54.77 + }, + { + "path": "openmeter/billing/charges/flatfee/realizationrun.go", + "name": "Validate", + "cc": 10, + "sloc": 29, + "line": 216, + "mass": 53.85 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnStandardInvoiceCreated", + "cc": 10, + "sloc": 38, + "line": 103, + "mass": 61.64 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "resolveGatheringLineUpdatesByChargeID", + "cc": 10, + "sloc": 42, + "line": 356, + "mass": 64.81 + }, + { + "path": "openmeter/billing/charges/service/create.go", + "name": "applyDefaultTaxCodes", + "cc": 10, + "sloc": 35, + "line": 36, + "mass": 59.16 + }, + { + "path": "openmeter/billing/charges/service/invoice.go", + "name": "handleStandardInvoiceUpdate", + "cc": 10, + "sloc": 46, + "line": 38, + "mass": 67.82 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/realizationrun.go", + "name": "UpdateRealizationRun", + "cc": 10, + "sloc": 36, + "line": 50, + "mass": 60.0 + }, + { + "path": "openmeter/billing/charges/usagebased/detailedline.go", + "name": "compareDetailedLineForOutput", + "cc": 10, + "sloc": 20, + "line": 103, + "mass": 44.72 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "Validate", + "cc": 10, + "sloc": 29, + "line": 287, + "mass": 53.85 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditsonly.go", + "name": "FinalizeRealizationRun", + "cc": 10, + "sloc": 60, + "line": 171, + "mass": 77.46 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/engine.go", + "name": "Rate", + "cc": 10, + "sloc": 66, + "line": 73, + "mass": 81.24 + }, + { + "path": "openmeter/billing/charges/usagebased/service/service.go", + "name": "Validate", + "cc": 10, + "sloc": 31, + "line": 31, + "mass": 55.68 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "UpdateInvoice", + "cc": 10, + "sloc": 68, + "line": 463, + "mass": 82.46 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "MapEventInvoiceToAPI", + "cc": 10, + "sloc": 33, + "line": 697, + "mass": 57.45 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "CreatePendingLine", + "cc": 10, + "sloc": 74, + "line": 47, + "mass": 86.02 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mapDiscountReasonToAPI", + "cc": 10, + "sloc": 38, + "line": 507, + "mass": 61.64 + }, + { + "path": "openmeter/billing/invoicelinesplitgroup.go", + "name": "Validate", + "cc": 10, + "sloc": 28, + "line": 66, + "mass": 52.92 + }, + { + "path": "openmeter/billing/invoicelinesplitgroup.go", + "name": "ForEachChild", + "cc": 10, + "sloc": 44, + "line": 395, + "mass": 66.33 + }, + { + "path": "openmeter/billing/rating/service/detailedline.go", + "name": "GenerateDetailedLines", + "cc": 10, + "sloc": 48, + "line": 41, + "mass": 69.28 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "resolveCustomerOverrideWithDetails", + "cc": 10, + "sloc": 33, + "line": 304, + "mass": 57.45 + }, + { + "path": "openmeter/billing/service/stdinvoiceline.go", + "name": "upsertGatheringInvoiceForCurrency", + "cc": 10, + "sloc": 79, + "line": 175, + "mass": 88.88 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "name": "TestSubscriptionHappyPath", + "cc": 10, + "sloc": 425, + "line": 158, + "mass": 206.16 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "ListCustomerUsageAttributions", + "cc": 10, + "sloc": 59, + "line": 154, + "mass": 76.81 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "ListCustomers", + "cc": 10, + "sloc": 86, + "line": 52, + "mass": 92.74 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "UpdateCustomer", + "cc": 10, + "sloc": 64, + "line": 207, + "mass": 80.0 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "PostDelete", + "cc": 10, + "sloc": 64, + "line": 62, + "mass": 80.0 + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "name": "IsUnique", + "cc": 10, + "sloc": 35, + "line": 40, + "mass": 59.16 + }, + { + "path": "openmeter/ent/db/addon.go", + "name": "SubscriptionAddonsOrErr", + "cc": 10, + "sloc": 29, + "line": 90, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/appcustomer/appcustomer.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 63, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "createSpec", + "cc": 10, + "sloc": 74, + "line": 201, + "mass": 86.02 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer.go", + "name": "CustomerOrErr", + "cc": 10, + "sloc": 29, + "line": 67, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 66, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 36, + "line": 371, + "mass": 60.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride.go", + "name": "TaxCodeOrErr", + "cc": 10, + "sloc": 29, + "line": 104, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadChargeFlatFeeRuns", + "cc": 10, + "sloc": 33, + "line": 1002, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadChargeUsageBasedRuns", + "cc": 10, + "sloc": 33, + "line": 1035, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadDetailedLines", + "cc": 10, + "sloc": 34, + "line": 1366, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadChargeFlatFeeRunCreditAllocations", + "cc": 10, + "sloc": 33, + "line": 1645, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount.go", + "name": "String", + "cc": 10, + "sloc": 71, + "line": 256, + "mass": 84.26 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadBillingInvoiceLines", + "cc": 10, + "sloc": 34, + "line": 628, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel.go", + "name": "assignValues", + "cc": 10, + "sloc": 26, + "line": 42, + "mass": 50.99 + }, + { + "path": "openmeter/ent/db/billingprofile.go", + "name": "PaymentAppOrErr", + "cc": 10, + "sloc": 29, + "line": 144, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadBillingCustomerOverride", + "cc": 10, + "sloc": 33, + "line": 659, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "name": "AmountDiscountsOrErr", + "cc": 10, + "sloc": 29, + "line": 156, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig.go", + "name": "TaxCodeOrErr", + "cc": 10, + "sloc": 29, + "line": 104, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 36, + "line": 552, + "mass": 60.0 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadBillingInvoiceLines", + "cc": 10, + "sloc": 34, + "line": 730, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadBillingSplitLineGroups", + "cc": 10, + "sloc": 33, + "line": 764, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 57, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "name": "CreditPurchaseOrErr", + "cc": 10, + "sloc": 29, + "line": 70, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "name": "CreditPurchaseOrErr", + "cc": 10, + "sloc": 29, + "line": 88, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun.go", + "name": "PaymentOrErr", + "cc": 10, + "sloc": 29, + "line": 162, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "loadCorrections", + "cc": 10, + "sloc": 33, + "line": 544, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "name": "RunOrErr", + "cc": 10, + "sloc": 29, + "line": 75, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 87, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment.go", + "name": "RunOrErr", + "cc": 10, + "sloc": 29, + "line": 88, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargessearchv1.go", + "name": "String", + "cc": 10, + "sloc": 106, + "line": 307, + "mass": 102.96 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "loadCorrections", + "cc": 10, + "sloc": 33, + "line": 501, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "name": "RunOrErr", + "cc": 10, + "sloc": 29, + "line": 75, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 87, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "name": "RunOrErr", + "cc": 10, + "sloc": 29, + "line": 74, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns.go", + "name": "PaymentOrErr", + "cc": 10, + "sloc": 29, + "line": 189, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 36, + "line": 1039, + "mass": 60.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadCorrectedDetailedLines", + "cc": 10, + "sloc": 33, + "line": 944, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/currencycostbasis/currencycostbasis.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 60, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 35, + "line": 651, + "mass": 59.16 + }, + { + "path": "openmeter/ent/db/customersubjects_update.go", + "name": "sqlSave", + "cc": 10, + "sloc": 30, + "line": 91, + "mass": 54.77 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "BoolX", + "cc": 10, + "sloc": 41, + "line": 646, + "mass": 64.03 + }, + { + "path": "openmeter/ent/db/entitlement/entitlement.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 34, + "line": 150, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadSubscriptionItem", + "cc": 10, + "sloc": 33, + "line": 721, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/feature.go", + "name": "MeterOrErr", + "cc": 10, + "sloc": 29, + "line": 149, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadRatecard", + "cc": 10, + "sloc": 33, + "line": 706, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadAddonRatecard", + "cc": 10, + "sloc": 33, + "line": 739, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadFlatFeeCharges", + "cc": 10, + "sloc": 33, + "line": 832, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/grant/grant.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 87, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "createSpec", + "cc": 10, + "sloc": 56, + "line": 212, + "mass": 74.83 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_update.go", + "name": "sqlSave", + "cc": 10, + "sloc": 30, + "line": 98, + "mass": 54.77 + }, + { + "path": "openmeter/ent/db/ledgerentry.go", + "name": "SubAccountOrErr", + "cc": 10, + "sloc": 29, + "line": 73, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/ledgerentry/ledgerentry.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 72, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 35, + "line": 723, + "mass": 59.16 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute.go", + "name": "SubAccountsOrErr", + "cc": 10, + "sloc": 29, + "line": 82, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "check", + "cc": 10, + "sloc": 26, + "line": 179, + "mass": 50.99 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "createSpec", + "cc": 10, + "sloc": 64, + "line": 202, + "mass": 80.0 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "loadFeature", + "cc": 10, + "sloc": 33, + "line": 411, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/notificationchannel.go", + "name": "RulesOrErr", + "cc": 10, + "sloc": 29, + "line": 60, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "loadRules", + "cc": 10, + "sloc": 61, + "line": 411, + "mass": 78.1 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "loadDeliveryStatuses", + "cc": 10, + "sloc": 61, + "line": 456, + "mass": 78.1 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "loadEvents", + "cc": 10, + "sloc": 61, + "line": 413, + "mass": 78.1 + }, + { + "path": "openmeter/ent/db/notificationrule.go", + "name": "EventsOrErr", + "cc": 10, + "sloc": 29, + "line": 71, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "loadChannels", + "cc": 10, + "sloc": 61, + "line": 455, + "mass": 78.1 + }, + { + "path": "openmeter/ent/db/plan.go", + "name": "SubscriptionsOrErr", + "cc": 10, + "sloc": 29, + "line": 92, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "loadSubscriptions", + "cc": 10, + "sloc": 33, + "line": 559, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/plan_update.go", + "name": "check", + "cc": 10, + "sloc": 18, + "line": 361, + "mass": 42.43 + }, + { + "path": "openmeter/ent/db/plan_update.go", + "name": "check", + "cc": 10, + "sloc": 18, + "line": 940, + "mass": 42.43 + }, + { + "path": "openmeter/ent/db/planaddon.go", + "name": "AddonOrErr", + "cc": 10, + "sloc": 29, + "line": 74, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/subject/subject.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 25, + "line": 50, + "mass": 50.0 + }, + { + "path": "openmeter/ent/db/subscription.go", + "name": "BillingSyncStateOrErr", + "cc": 10, + "sloc": 29, + "line": 182, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 35, + "line": 1417, + "mass": 59.16 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadBillingLines", + "cc": 10, + "sloc": 34, + "line": 901, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadBillingSplitLineGroups", + "cc": 10, + "sloc": 33, + "line": 935, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadChargesUsageBased", + "cc": 10, + "sloc": 33, + "line": 968, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadChargesCreditPurchase", + "cc": 10, + "sloc": 33, + "line": 1001, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadChargesFlatFee", + "cc": 10, + "sloc": 33, + "line": 1034, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadBillingLines", + "cc": 10, + "sloc": 34, + "line": 787, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadBillingSplitLineGroups", + "cc": 10, + "sloc": 33, + "line": 821, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadChargesUsageBased", + "cc": 10, + "sloc": 33, + "line": 854, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadChargesCreditPurchase", + "cc": 10, + "sloc": 33, + "line": 887, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadChargesFlatFee", + "cc": 10, + "sloc": 33, + "line": 920, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadBillingLines", + "cc": 10, + "sloc": 34, + "line": 743, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadBillingSplitLineGroups", + "cc": 10, + "sloc": 33, + "line": 777, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadChargesUsageBased", + "cc": 10, + "sloc": 33, + "line": 810, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadChargesCreditPurchase", + "cc": 10, + "sloc": 33, + "line": 843, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadChargesFlatFee", + "cc": 10, + "sloc": 33, + "line": 876, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode/taxcode.go", + "name": "ValidColumn", + "cc": 10, + "sloc": 29, + "line": 194, + "mass": 53.85 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadBillingWorkflowConfigs", + "cc": 10, + "sloc": 33, + "line": 1050, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadBillingCustomerOverrides", + "cc": 10, + "sloc": 33, + "line": 1083, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadBillingInvoiceLines", + "cc": 10, + "sloc": 34, + "line": 1116, + "mass": 58.31 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadBillingInvoiceSplitLineGroups", + "cc": 10, + "sloc": 33, + "line": 1150, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadBillingStandardInvoiceDetailedLines", + "cc": 10, + "sloc": 33, + "line": 1183, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadChargeUsageBasedRunDetailedLines", + "cc": 10, + "sloc": 33, + "line": 1216, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadChargeFlatFeeRunDetailedLines", + "cc": 10, + "sloc": 33, + "line": 1249, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadSubscriptionItems", + "cc": 10, + "sloc": 33, + "line": 1282, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadPlanRateCards", + "cc": 10, + "sloc": 33, + "line": 1315, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadAddonRateCards", + "cc": 10, + "sloc": 33, + "line": 1348, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadChargeFlatFees", + "cc": 10, + "sloc": 33, + "line": 1381, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadChargeUsageBased", + "cc": 10, + "sloc": 33, + "line": 1414, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadChargeCreditPurchases", + "cc": 10, + "sloc": 33, + "line": 1447, + "mass": 57.45 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "UpdateNewValues", + "cc": 10, + "sloc": 35, + "line": 689, + "mass": 59.16 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "CreateEntitlement", + "cc": 10, + "sloc": 70, + "line": 115, + "mass": 83.67 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "ListActiveEntitlementsWithExpiredUsagePeriod", + "cc": 10, + "sloc": 65, + "line": 766, + "mass": 80.62 + }, + { + "path": "openmeter/entitlement/driver/v2/mapping.go", + "name": "MapAPIGrantV2ToCreateGrantInput", + "cc": 10, + "sloc": 40, + "line": 416, + "mass": 63.25 + }, + { + "path": "openmeter/ingest/kafkaingest/collector.go", + "name": "Ingest", + "cc": 10, + "sloc": 68, + "line": 92, + "mass": 82.46 + }, + { + "path": "openmeter/ledger/collector/collect.go", + "name": "resolveCollectedInputs", + "cc": 10, + "sloc": 54, + "line": 101, + "mass": 73.48 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "collectedSourcesForGroup", + "cc": 10, + "sloc": 34, + "line": 638, + "mass": 58.31 + }, + { + "path": "openmeter/ledger/historical/adapter/sumentries_query.go", + "name": "entryPredicates", + "cc": 10, + "sloc": 50, + "line": 50, + "mass": 70.71 + }, + { + "path": "openmeter/ledger/historical/ledger.go", + "name": "CommitGroup", + "cc": 10, + "sloc": 43, + "line": 62, + "mass": 65.57 + }, + { + "path": "openmeter/ledger/recognizer/recognize.go", + "name": "allocateRecognition", + "cc": 10, + "sloc": 52, + "line": 145, + "mass": 72.11 + }, + { + "path": "openmeter/ledger/resolvers/account.go", + "name": "CreateCustomerAccounts", + "cc": 10, + "sloc": 38, + "line": 50, + "mass": 61.64 + }, + { + "path": "openmeter/ledger/resolvers/account.go", + "name": "GetBusinessAccounts", + "cc": 10, + "sloc": 56, + "line": 200, + "mass": 74.83 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "Validate", + "cc": 10, + "sloc": 50, + "line": 285, + "mass": 70.71 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "Validate", + "cc": 10, + "sloc": 28, + "line": 27, + "mass": 52.92 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "Validate", + "cc": 10, + "sloc": 27, + "line": 254, + "mass": 51.96 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "correct", + "cc": 10, + "sloc": 39, + "line": 540, + "mass": 62.45 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "correct", + "cc": 10, + "sloc": 39, + "line": 379, + "mass": 62.45 + }, + { + "path": "openmeter/llmcost/adapter/price.go", + "name": "ListPrices", + "cc": 10, + "sloc": 41, + "line": 21, + "mass": 64.03 + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "name": "enrichEventsWithCustomerID", + "cc": 10, + "sloc": 39, + "line": 275, + "mass": 62.45 + }, + { + "path": "openmeter/notification/adapter/deliverystatus.go", + "name": "ListEventsDeliveryStatus", + "cc": 10, + "sloc": 42, + "line": 19, + "mass": 64.81 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "getNumericThreshold", + "cc": 10, + "sloc": 45, + "line": 395, + "mass": 67.08 + }, + { + "path": "openmeter/notification/consumer/invoice.go", + "name": "Handle", + "cc": 10, + "sloc": 71, + "line": 20, + "mass": 84.26 + }, + { + "path": "openmeter/notification/entitlements.go", + "name": "Validate", + "cc": 10, + "sloc": 28, + "line": 91, + "mass": 52.92 + }, + { + "path": "openmeter/notification/eventhandler/reconcile.go", + "name": "Reconcile", + "cc": 10, + "sloc": 65, + "line": 66, + "mass": 80.62 + }, + { + "path": "openmeter/notification/httpdriver/mapping.go", + "name": "FromRule", + "cc": 10, + "sloc": 31, + "line": 285, + "mass": 55.68 + }, + { + "path": "openmeter/notification/service/rule.go", + "name": "ListRules", + "cc": 10, + "sloc": 52, + "line": 18, + "mass": 72.11 + }, + { + "path": "openmeter/notification/service/rule.go", + "name": "CreateRule", + "cc": 10, + "sloc": 49, + "line": 81, + "mass": 70.0 + }, + { + "path": "openmeter/notification/utils.go", + "name": "interfaceMapToStringMap", + "cc": 10, + "sloc": 27, + "line": 58, + "mass": 51.96 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "UpdateWebhookChannels", + "cc": 10, + "sloc": 56, + "line": 313, + "mass": 74.83 + }, + { + "path": "openmeter/portal/service.go", + "name": "Validate", + "cc": 10, + "sloc": 24, + "line": 67, + "mass": 48.99 + }, + { + "path": "openmeter/productcatalog/addon.go", + "name": "Equal", + "cc": 10, + "sloc": 31, + "line": 101, + "mass": 55.68 + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "name": "CreateAddon", + "cc": 10, + "sloc": 55, + "line": 154, + "mass": 74.16 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "UpdateAddon", + "cc": 10, + "sloc": 52, + "line": 312, + "mass": 72.11 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Equal", + "cc": 10, + "sloc": 21, + "line": 41, + "mass": 45.83 + }, + { + "path": "openmeter/productcatalog/featureresolver/resolver_test.go", + "name": "Test_NamespacedFeatureResolver", + "cc": 10, + "sloc": 149, + "line": 19, + "mass": 122.07 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/plan.go", + "name": "UpdatePlan", + "cc": 10, + "sloc": 50, + "line": 164, + "mass": 70.71 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "ArchivePlan", + "cc": 10, + "sloc": 57, + "line": 531, + "mass": 75.5 + }, + { + "path": "openmeter/productcatalog/plan/service/service_test.go", + "name": "TestPlanService", + "cc": 10, + "sloc": 695, + "line": 28, + "mass": 263.63 + }, + { + "path": "openmeter/productcatalog/planaddon/service/planaddon.go", + "name": "DeletePlanAddon", + "cc": 10, + "sloc": 69, + "line": 155, + "mass": 83.07 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 10, + "sloc": 23, + "line": 608, + "mass": 47.96 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Validate", + "cc": 10, + "sloc": 34, + "line": 638, + "mass": 58.31 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "ValidateRateCardsWithFeatures", + "cc": 10, + "sloc": 33, + "line": 889, + "mass": 57.45 + }, + { + "path": "openmeter/productcatalog/subscription/http/create.go", + "name": "getCustomer", + "cc": 10, + "sloc": 36, + "line": 182, + "mass": 60.0 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "TaxCodeConfigFrom", + "cc": 10, + "sloc": 30, + "line": 223, + "mass": 54.77 + }, + { + "path": "openmeter/sink/flushhandler/ingestnotification/handler.go", + "name": "OnFlushSuccess", + "cc": 10, + "sloc": 71, + "line": 64, + "mass": 84.26 + }, + { + "path": "openmeter/streaming/clickhouse/event_query_v2.go", + "name": "toCountRowSQL", + "cc": 10, + "sloc": 32, + "line": 137, + "mass": 56.57 + }, + { + "path": "openmeter/subject/adapter/subject.go", + "name": "List", + "cc": 10, + "sloc": 57, + "line": 207, + "mass": 75.5 + }, + { + "path": "openmeter/subject/service/hooks/customersubject.go", + "name": "EnsureSubject", + "cc": 10, + "sloc": 52, + "line": 199, + "mass": 72.11 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "Cancel", + "cc": 10, + "sloc": 47, + "line": 300, + "mass": 68.56 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "Continue", + "cc": 10, + "sloc": 45, + "line": 360, + "mass": 67.08 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "updateCustomerCurrencyIfNotSet", + "cc": 10, + "sloc": 39, + "line": 692, + "mass": 62.45 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "Validate", + "cc": 10, + "sloc": 30, + "line": 300, + "mass": 54.77 + }, + { + "path": "openmeter/subscription/workflow/service/addon.go", + "name": "syncWithAddons", + "cc": 10, + "sloc": 64, + "line": 191, + "mass": 80.0 + }, + { + "path": "openmeter/subscription/workflow/service/subscription_test.go", + "name": "TestEditCombinations", + "cc": 10, + "sloc": 312, + "line": 1017, + "mass": 176.64 + }, + { + "path": "openmeter/taxcode/adapter/taxcode.go", + "name": "GetTaxCodeByAppMapping", + "cc": 10, + "sloc": 48, + "line": 132, + "mass": 69.28 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateWithComplexity", + "cc": 10, + "sloc": 23, + "line": 370, + "mass": 47.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "SelectWhereExpr", + "cc": 10, + "sloc": 27, + "line": 402, + "mass": 51.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateWithComplexity", + "cc": 10, + "sloc": 23, + "line": 486, + "mass": 47.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "SelectWhereExpr", + "cc": 10, + "sloc": 27, + "line": 518, + "mass": 51.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateWithComplexity", + "cc": 10, + "sloc": 23, + "line": 603, + "mass": 47.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "collectStringValues", + "cc": 10, + "sloc": 25, + "line": 990, + "mass": 50.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "BoolX", + "cc": 10, + "sloc": 41, + "line": 483, + "mass": 64.03 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "name": "SetField", + "cc": 10, + "sloc": 35, + "line": 394, + "mass": 59.16 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "BoolX", + "cc": 10, + "sloc": 41, + "line": 483, + "mass": 64.03 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "name": "SetField", + "cc": 10, + "sloc": 35, + "line": 394, + "mass": 59.16 + }, + { + "path": "pkg/kafka/metrics/internal/partition.go", + "name": "NewPartitionOffsetMetrics", + "cc": 10, + "sloc": 68, + "line": 171, + "mass": 82.46 + }, + { + "path": "pkg/kafka/metrics/stats/consumergroup.go", + "name": "UnmarshalJSON", + "cc": 10, + "sloc": 25, + "line": 46, + "mass": 50.0 + }, + { + "path": "pkg/kafka/topicprovisioner.go", + "name": "DeProvision", + "cc": 10, + "sloc": 39, + "line": 259, + "mass": 62.45 + }, + { + "path": "pkg/models/fielddescriptor.go", + "name": "JSONPath", + "cc": 10, + "sloc": 44, + "line": 124, + "mass": 66.33 + }, + { + "path": "pkg/pagination/v2/collect_test.go", + "name": "TestCollectAllV2_MultiplePages", + "cc": 10, + "sloc": 44, + "line": 11, + "mass": 66.33 + }, + { + "path": "pkg/pagination/v2/collect_test.go", + "name": "TestCollectAllV2_RespectsInitialCursor", + "cc": 10, + "sloc": 43, + "line": 63, + "mass": 65.57 + }, + { + "path": "pkg/timeutil/recurrence.go", + "name": "iterateFromPrevBeforeInclusive", + "cc": 10, + "sloc": 49, + "line": 207, + "mass": 70.0 + }, + { + "path": "test/app/stripe/invoice_credits_test.go", + "name": "expectStripeInvoiceAddLines", + "cc": 10, + "sloc": 35, + "line": 267, + "mass": 59.16 + }, + { + "path": "test/billing/invoice_test.go", + "name": "TestUpdateInvoice", + "cc": 10, + "sloc": 215, + "line": 4388, + "mass": 146.63 + }, + { + "path": "test/subscription/scenario_firstofmonth_test.go", + "name": "TestBillingOnFirstOfMonth", + "cc": 10, + "sloc": 246, + "line": 27, + "mass": 156.84 + }, + { + "path": "tools/migrate/migrate_test.go", + "name": "purgeDB", + "cc": 10, + "sloc": 57, + "line": 153, + "mass": 75.5 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_deserialize_datetime", + "cc": 9, + "sloc": 28, + "line": 183, + "mass": 47.62 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "get_deserializer", + "cc": 9, + "sloc": 8, + "line": 323, + "mass": 25.46 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_convert_element", + "cc": 9, + "sloc": 22, + "line": 1430, + "mass": 42.21 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "_build_additional_properties", + "cc": 9, + "sloc": 16, + "line": 1483, + "mass": 36.0 + }, + { + "path": "api/spec/packages/aip/lib/rules/casing.js", + "name": "casingRule", + "cc": 9, + "sloc": 64, + "line": 8, + "mass": 72.0 + }, + { + "path": "api/spec/packages/aip/lib/rules/utils.js", + "name": "extractMarkdownFromDocComment", + "cc": 9, + "sloc": 21, + "line": 86, + "mass": 41.24 + }, + { + "path": "api/v3/apierrors/handler.go", + "name": "invalidParametersFromGeneratedRouterError", + "cc": 9, + "sloc": 75, + "line": 60, + "mass": 77.94 + }, + { + "path": "api/v3/apierrors/handler.go", + "name": "apiErrorFromHTTPStatus", + "cc": 9, + "sloc": 20, + "line": 203, + "mass": 40.25 + }, + { + "path": "api/v3/filters/parse.go", + "name": "applyLabelOp", + "cc": 9, + "sloc": 30, + "line": 484, + "mass": 49.3 + }, + { + "path": "api/v3/handlers/apps/convert.gen.go", + "name": "init", + "cc": 9, + "sloc": 47, + "line": 13, + "mass": 61.7 + }, + { + "path": "api/v3/handlers/customers/entitlementaccess/list.go", + "name": "ListCustomerEntitlementAccess", + "cc": 9, + "sloc": 63, + "line": 26, + "mass": 71.44 + }, + { + "path": "api/v3/handlers/customers/upsert.go", + "name": "UpsertCustomer", + "cc": 9, + "sloc": 70, + "line": 28, + "mass": 75.3 + }, + { + "path": "api/v3/handlers/events/list.go", + "name": "applyFilters", + "cc": 9, + "sloc": 85, + "line": 128, + "mass": 82.98 + }, + { + "path": "api/v3/handlers/featurecost/convert.go", + "name": "toAPIFeatureCostQueryRow", + "cc": 9, + "sloc": 33, + "line": 30, + "mass": 51.7 + }, + { + "path": "api/v3/handlers/featurecost/query.go", + "name": "QueryFeatureCost", + "cc": 9, + "sloc": 60, + "line": 31, + "mass": 69.71 + }, + { + "path": "api/v3/handlers/features/create.go", + "name": "CreateFeature", + "cc": 9, + "sloc": 55, + "line": 24, + "mass": 66.75 + }, + { + "path": "api/v3/handlers/features/get.go", + "name": "GetFeature", + "cc": 9, + "sloc": 39, + "line": 24, + "mass": 56.2 + }, + { + "path": "api/v3/handlers/llmcost/convert.go", + "name": "apiPricingToDomain", + "cc": 9, + "sloc": 46, + "line": 112, + "mass": 61.04 + }, + { + "path": "api/v3/handlers/meters/convert.go", + "name": "ToAPIMeterAggregation", + "cc": 9, + "sloc": 19, + "line": 60, + "mass": 39.23 + }, + { + "path": "api/v3/handlers/meters/convert.go", + "name": "FromAPIMeterAggregation", + "cc": 9, + "sloc": 19, + "line": 81, + "mass": 39.23 + }, + { + "path": "api/v3/handlers/meters/query_csv.go", + "name": "QueryMeterCSV", + "cc": 9, + "sloc": 61, + "line": 40, + "mass": 70.29 + }, + { + "path": "app/common/billing.go", + "name": "NewBillingRegistry", + "cc": 9, + "sloc": 97, + "line": 130, + "mass": 88.64 + }, + { + "path": "app/common/meter.go", + "name": "createConfigMetersInDatabase", + "cc": 9, + "sloc": 51, + "line": 114, + "mass": 64.27 + }, + { + "path": "app/config/aggregation.go", + "name": "Validate", + "cc": 9, + "sloc": 28, + "line": 85, + "mass": 47.62 + }, + { + "path": "cmd/jobs/billing/advancecharges/advancecharges.go", + "name": "init", + "cc": 9, + "sloc": 67, + "line": 19, + "mass": 73.67 + }, + { + "path": "e2e/v3helpers_test.go", + "name": "do", + "cc": 9, + "sloc": 42, + "line": 115, + "mass": 58.33 + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/mapper.go", + "name": "mapPaymentTriggerFromAPI", + "cc": 9, + "sloc": 23, + "line": 62, + "mass": 43.16 + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "name": "ListCustomerData", + "cc": 9, + "sloc": 63, + "line": 35, + "mass": 71.44 + }, + { + "path": "openmeter/app/httpdriver/mapper.go", + "name": "MapAppToAPI", + "cc": 9, + "sloc": 30, + "line": 17, + "mass": 49.3 + }, + { + "path": "openmeter/app/stripe/adapter/customer.go", + "name": "DeleteStripeCustomerData", + "cc": 9, + "sloc": 50, + "line": 172, + "mass": 63.64 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "GetSupplierContact", + "cc": 9, + "sloc": 52, + "line": 501, + "mass": 64.9 + }, + { + "path": "openmeter/app/stripe/client/customer.go", + "name": "GetCustomer", + "cc": 9, + "sloc": 37, + "line": 11, + "mass": 54.74 + }, + { + "path": "openmeter/app/stripe/client/invoice_line.go", + "name": "AddInvoiceLines", + "cc": 9, + "sloc": 40, + "line": 43, + "mass": 56.92 + }, + { + "path": "openmeter/app/stripe/client/stripe.go", + "name": "Validate", + "cc": 9, + "sloc": 19, + "line": 105, + "mass": 39.23 + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "name": "UpdateGatheringInvoice", + "cc": 9, + "sloc": 91, + "line": 97, + "mass": 85.85 + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "name": "mapGatheringInvoiceFromDB", + "cc": 9, + "sloc": 60, + "line": 381, + "mass": 69.71 + }, + { + "path": "openmeter/billing/adapter/gatheringlines.go", + "name": "updateGatheringLines", + "cc": 9, + "sloc": 107, + "line": 145, + "mass": 93.1 + }, + { + "path": "openmeter/billing/adapter/gatheringlines.go", + "name": "mapGatheringInvoiceLineFromDB", + "cc": 9, + "sloc": 65, + "line": 271, + "mass": 72.56 + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "name": "CreateInvoice", + "cc": 9, + "sloc": 74, + "line": 302, + "mass": 77.42 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinemapper.go", + "name": "mapStandardInvoiceLineWithoutReferences", + "cc": 9, + "sloc": 79, + "line": 61, + "mass": 79.99 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinemapper.go", + "name": "backfillTaxConfigReferences", + "cc": 9, + "sloc": 21, + "line": 321, + "mass": 41.24 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "ByType", + "cc": 9, + "sloc": 32, + "line": 519, + "mass": 50.91 + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter.go", + "name": "Validate", + "cc": 9, + "sloc": 25, + "line": 127, + "mass": 45.0 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter.go", + "name": "Validate", + "cc": 9, + "sloc": 22, + "line": 75, + "mass": 42.21 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "BuildStandardLinesForGatheringPreview", + "cc": 9, + "sloc": 38, + "line": 57, + "mass": 55.48 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnPaymentSettled", + "cc": 9, + "sloc": 31, + "line": 433, + "mass": 50.11 + }, + { + "path": "openmeter/billing/charges/flatfee/service/payment.go", + "name": "postInvoicePaymentAuthorized", + "cc": 9, + "sloc": 55, + "line": 17, + "mass": 66.75 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "resolveGatheringLineDeletesByChargeID", + "cc": 9, + "sloc": 36, + "line": 313, + "mass": 54.0 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "updateGatheringInvoice", + "cc": 9, + "sloc": 36, + "line": 483, + "mass": 54.0 + }, + { + "path": "openmeter/billing/charges/service/creditpurchase.go", + "name": "HandleCreditPurchaseExternalPaymentStateTransition", + "cc": 9, + "sloc": 39, + "line": 17, + "mass": 56.2 + }, + { + "path": "openmeter/billing/charges/service/helpers.go", + "name": "chargesByType", + "cc": 9, + "sloc": 32, + "line": 22, + "mass": 50.91 + }, + { + "path": "openmeter/billing/charges/testutils/service.go", + "name": "Validate", + "cc": 9, + "sloc": 28, + "line": 50, + "mass": 47.62 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/charge.go", + "name": "GetByIDs", + "cc": 9, + "sloc": 37, + "line": 159, + "mass": 54.74 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "MapToBillingMeteredQuantity", + "cc": 9, + "sloc": 38, + "line": 379, + "mass": 55.48 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "BuildStandardLinesForGatheringPreview", + "cc": 9, + "sloc": 36, + "line": 120, + "mass": 54.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "fireLineTrigger", + "cc": 9, + "sloc": 33, + "line": 563, + "mass": 51.7 + }, + { + "path": "openmeter/billing/charges/usagebased/service/payments.go", + "name": "recordPaymentSettled", + "cc": 9, + "sloc": 37, + "line": 76, + "mass": 54.74 + }, + { + "path": "openmeter/billing/charges/usagebased/service/payments.go", + "name": "areAllInvoicedRunsSettled", + "cc": 9, + "sloc": 21, + "line": 123, + "mass": 41.24 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "name": "SubtractRatedRunDetails", + "cc": 9, + "sloc": 39, + "line": 48, + "mass": 56.2 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/credits.go", + "name": "allocate", + "cc": 9, + "sloc": 44, + "line": 90, + "mass": 59.7 + }, + { + "path": "openmeter/billing/charges/usagebased/service/statemachine.go", + "name": "Validate", + "cc": 9, + "sloc": 28, + "line": 50, + "mass": 47.62 + }, + { + "path": "openmeter/billing/customeroverride.go", + "name": "Validate", + "cc": 9, + "sloc": 26, + "line": 35, + "mass": 45.89 + }, + { + "path": "openmeter/billing/customeroverride.go", + "name": "Validate", + "cc": 9, + "sloc": 17, + "line": 113, + "mass": 37.11 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "InvoicePendingLinesAction", + "cc": 9, + "sloc": 70, + "line": 132, + "mass": 75.3 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "ProgressInvoice", + "cc": 9, + "sloc": 53, + "line": 289, + "mass": 65.52 + }, + { + "path": "openmeter/billing/lineengine/engine.go", + "name": "OnCollectionCompleted", + "cc": 9, + "sloc": 26, + "line": 63, + "mass": 45.89 + }, + { + "path": "openmeter/billing/models/totals/model.go", + "name": "Validate", + "cc": 9, + "sloc": 27, + "line": 33, + "mass": 46.77 + }, + { + "path": "openmeter/billing/rating/service/rate/flat.go", + "name": "GenerateDetailedLines", + "cc": 9, + "sloc": 39, + "line": 21, + "mass": 56.2 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "resolveProfileWorkflow", + "cc": 9, + "sloc": 48, + "line": 345, + "mass": 62.35 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "allocateStateMachine", + "cc": 9, + "sloc": 258, + "line": 42, + "mass": 144.56 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "StatusDetails", + "cc": 9, + "sloc": 35, + "line": 385, + "mass": 53.24 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "HandleInvoiceTrigger", + "cc": 9, + "sloc": 30, + "line": 692, + "mass": 49.3 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go", + "name": "All", + "cc": 9, + "sloc": 28, + "line": 220, + "mass": 47.62 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "populateChildIDsFromParents", + "cc": 9, + "sloc": 35, + "line": 1153, + "mass": 53.24 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go", + "name": "ResolveDefaultCollection", + "cc": 9, + "sloc": 24, + "line": 145, + "mass": 44.09 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/repair.go", + "name": "WithSubscriptionItemID", + "cc": 9, + "sloc": 31, + "line": 129, + "mass": 50.11 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "name": "TestManualIgnoringOfSyncedLines", + "cc": 9, + "sloc": 152, + "line": 3263, + "mass": 110.96 + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "name": "resolveLLMUnitCost", + "cc": 9, + "sloc": 50, + "line": 272, + "mass": 63.64 + }, + { + "path": "openmeter/cost/adapter/compute.go", + "name": "filterGroupBy", + "cc": 9, + "sloc": 20, + "line": 191, + "mass": 40.25 + }, + { + "path": "openmeter/credit/balance.go", + "name": "GetBalanceForPeriod", + "cc": 9, + "sloc": 54, + "line": 147, + "mass": 66.14 + }, + { + "path": "openmeter/credit/grant/expiration.go", + "name": "GetExpiration", + "cc": 9, + "sloc": 37, + "line": 14, + "mass": 54.74 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "GetCustomerEntitlementValueV2", + "cc": 9, + "sloc": 63, + "line": 456, + "mass": 71.44 + }, + { + "path": "openmeter/customer/service/customer.go", + "name": "UpdateCustomer", + "cc": 9, + "sloc": 40, + "line": 140, + "mass": 56.92 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 418, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 417, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "loadFeatures", + "cc": 9, + "sloc": 32, + "line": 524, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 556, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/app/app.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 117, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 558, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appcustomer.go", + "name": "CustomerOrErr", + "cc": 9, + "sloc": 27, + "line": 64, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/appcustominvoicing.go", + "name": "AppOrErr", + "cc": 9, + "sloc": 27, + "line": 61, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "check", + "cc": 9, + "sloc": 23, + "line": 210, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 47, + "line": 408, + "mass": 61.7 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/appstripe.go", + "name": "AppOrErr", + "cc": 9, + "sloc": 27, + "line": 69, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 45, + "line": 408, + "mass": 60.37 + }, + { + "path": "openmeter/ent/db/appstripecustomer.go", + "name": "CustomerOrErr", + "cc": 9, + "sloc": 27, + "line": 68, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 21, + "line": 108, + "mass": 41.24 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 417, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "loadBillingProfile", + "cc": 9, + "sloc": 32, + "line": 524, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 556, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 704, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 993, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadSplitLineGroup", + "cc": 9, + "sloc": 32, + "line": 1238, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadFlatFeeLine", + "cc": 9, + "sloc": 32, + "line": 1270, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadUsageBasedLine", + "cc": 9, + "sloc": 32, + "line": 1302, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadParentLine", + "cc": 9, + "sloc": 32, + "line": 1334, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadSubscription", + "cc": 9, + "sloc": 32, + "line": 1490, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadSubscriptionPhase", + "cc": 9, + "sloc": 32, + "line": 1522, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadSubscriptionItem", + "cc": 9, + "sloc": 32, + "line": 1554, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadCharge", + "cc": 9, + "sloc": 32, + "line": 1586, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadChargeFlatFeeRuns", + "cc": 9, + "sloc": 30, + "line": 1678, + "mass": 49.3 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadChargeUsageBasedRun", + "cc": 9, + "sloc": 30, + "line": 1708, + "mass": 49.3 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 1765, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 313, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 750, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 25, + "line": 75, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 253, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 612, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 526, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadSubscription", + "cc": 9, + "sloc": 32, + "line": 662, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadSubscriptionPhase", + "cc": 9, + "sloc": 32, + "line": 694, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadSubscriptionItem", + "cc": 9, + "sloc": 32, + "line": 726, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadCharge", + "cc": 9, + "sloc": 32, + "line": 758, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 790, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue.go", + "name": "BillingInvoiceOrErr", + "cc": 9, + "sloc": 27, + "line": 61, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_update.go", + "name": "sqlSave", + "cc": 9, + "sloc": 27, + "line": 83, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1496, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 524, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_update.go", + "name": "sqlSave", + "cc": 9, + "sloc": 27, + "line": 91, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 454, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 602, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 25, + "line": 75, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 253, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 612, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 418, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 550, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 526, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadFlatFee", + "cc": 9, + "sloc": 32, + "line": 634, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadCreditPurchase", + "cc": 9, + "sloc": 32, + "line": 666, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadUsageBased", + "cc": 9, + "sloc": 32, + "line": 698, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 634, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadCharge", + "cc": 9, + "sloc": 30, + "line": 835, + "mass": 49.3 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadSubscription", + "cc": 9, + "sloc": 32, + "line": 865, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadSubscriptionPhase", + "cc": 9, + "sloc": 32, + "line": 897, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadSubscriptionItem", + "cc": 9, + "sloc": 32, + "line": 929, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 990, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1107, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 633, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadCurrentRun", + "cc": 9, + "sloc": 32, + "line": 784, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadCharge", + "cc": 9, + "sloc": 30, + "line": 816, + "mass": 49.3 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadSubscription", + "cc": 9, + "sloc": 32, + "line": 846, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadSubscriptionPhase", + "cc": 9, + "sloc": 32, + "line": 878, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadSubscriptionItem", + "cc": 9, + "sloc": 32, + "line": 910, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadFeature", + "cc": 9, + "sloc": 32, + "line": 971, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 1003, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 562, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadBillingInvoiceLine", + "cc": 9, + "sloc": 32, + "line": 703, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadBillingInvoice", + "cc": 9, + "sloc": 32, + "line": 735, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1073, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 452, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "loadAllocation", + "cc": 9, + "sloc": 32, + "line": 577, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "loadBillingInvoiceLine", + "cc": 9, + "sloc": 32, + "line": 638, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 303, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 767, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 481, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1101, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 236, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 669, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadCurrentRun", + "cc": 9, + "sloc": 32, + "line": 860, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadCharge", + "cc": 9, + "sloc": 30, + "line": 892, + "mass": 49.3 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadSubscription", + "cc": 9, + "sloc": 32, + "line": 922, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadSubscriptionPhase", + "cc": 9, + "sloc": 32, + "line": 954, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadSubscriptionItem", + "cc": 9, + "sloc": 32, + "line": 986, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 1076, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1040, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 416, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "loadAllocation", + "cc": 9, + "sloc": 32, + "line": 534, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 277, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 693, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 452, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "loadCorrectsRun", + "cc": 9, + "sloc": 32, + "line": 595, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 627, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1073, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 633, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadBillingInvoiceLine", + "cc": 9, + "sloc": 32, + "line": 820, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadBillingInvoice", + "cc": 9, + "sloc": 32, + "line": 852, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 47, + "line": 408, + "mass": 61.7 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment.go", + "name": "LineageOrErr", + "cc": 9, + "sloc": 27, + "line": 56, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 21, + "line": 62, + "mass": 41.24 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/currencycostbasis.go", + "name": "CurrencyOrErr", + "cc": 9, + "sloc": 27, + "line": 56, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 33, + "line": 385, + "mass": 51.7 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 346, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 634, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/customersubjects.go", + "name": "CustomerOrErr", + "cc": 9, + "sloc": 27, + "line": 48, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 526, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1594, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 562, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadMeter", + "cc": 9, + "sloc": 32, + "line": 865, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgeraccount/ledgeraccount.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 63, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 48, + "line": 408, + "mass": 62.35 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 47, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 606, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 33, + "line": 436, + "mass": 51.7 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 75, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 418, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 87, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 47, + "line": 408, + "mass": 61.7 + }, + { + "path": "openmeter/ent/db/ledgertransaction/ledgertransaction.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 66, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 45, + "line": 408, + "mass": 60.37 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 51, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 346, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "defaults", + "cc": 9, + "sloc": 35, + "line": 264, + "mass": 53.24 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1006, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 346, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 346, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/notificationevent.go", + "name": "RulesOrErr", + "cc": 9, + "sloc": 27, + "line": 64, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 47, + "line": 408, + "mass": 61.7 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 346, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 46, + "line": 408, + "mass": 61.04 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 63, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 380, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 406, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 418, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 381, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 44, + "line": 407, + "mass": 59.7 + }, + { + "path": "openmeter/ent/db/planphase.go", + "name": "RatecardsOrErr", + "cc": 9, + "sloc": 27, + "line": 75, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 382, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "sqlAll", + "cc": 9, + "sloc": 45, + "line": 408, + "mass": 60.37 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 417, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "loadFeatures", + "cc": 9, + "sloc": 32, + "line": 524, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 556, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "BillingInvoiceUsageBasedLineConfigOrErr", + "cc": 9, + "sloc": 22, + "line": 130, + "mass": 42.21 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "ChargeFlatFeeOrErr", + "cc": 9, + "sloc": 22, + "line": 202, + "mass": 42.21 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 33, + "line": 987, + "mass": 51.7 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 670, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadPlan", + "cc": 9, + "sloc": 32, + "line": 810, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/subscription_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 539, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/subscription_update.go", + "name": "check", + "cc": 9, + "sloc": 16, + "line": 1519, + "mass": 36.0 + }, + { + "path": "openmeter/ent/db/subscriptionaddon.go", + "name": "AddonOrErr", + "cc": 9, + "sloc": 27, + "line": 78, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 418, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity.go", + "name": "SubscriptionAddonOrErr", + "cc": 9, + "sloc": 27, + "line": 52, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 656, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate.go", + "name": "SubscriptionOrErr", + "cc": 9, + "sloc": 27, + "line": 48, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "createSpec", + "cc": 9, + "sloc": 61, + "line": 178, + "mass": 70.29 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 598, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadEntitlement", + "cc": 9, + "sloc": 32, + "line": 755, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadTaxCode", + "cc": 9, + "sloc": 32, + "line": 953, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/subscriptionphase.go", + "name": "ChargesFlatFeeOrErr", + "cc": 9, + "sloc": 27, + "line": 129, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 32, + "line": 1044, + "mass": 50.91 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 562, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/taxcode.go", + "name": "OrganizationDefaultCreditGrantOrErr", + "cc": 9, + "sloc": 27, + "line": 214, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 849, + "mass": 45.0 + }, + { + "path": "openmeter/ent/db/usagereset.go", + "name": "EntitlementOrErr", + "cc": 9, + "sloc": 27, + "line": 59, + "mass": 46.77 + }, + { + "path": "openmeter/ent/db/usagereset/usagereset.go", + "name": "ValidColumn", + "cc": 9, + "sloc": 23, + "line": 63, + "mass": 43.16 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "UpdateNewValues", + "cc": 9, + "sloc": 33, + "line": 402, + "mass": 51.7 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 345, + "mass": 45.0 + }, + { + "path": "openmeter/entitlement/balanceworker/filters/notifications.go", + "name": "IsEntitlementInScope", + "cc": 9, + "sloc": 25, + "line": 79, + "mass": 45.0 + }, + { + "path": "openmeter/entitlement/balanceworker/ingesthandler.go", + "name": "handleBatchedIngestEvent", + "cc": 9, + "sloc": 49, + "line": 20, + "mass": 63.0 + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "name": "MapRecurrenceToAPI", + "cc": 9, + "sloc": 22, + "line": 404, + "mass": 42.21 + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "name": "CreateCustomerEntitlement", + "cc": 9, + "sloc": 75, + "line": 35, + "mass": 77.94 + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "name": "ListCustomerEntitlements", + "cc": 9, + "sloc": 88, + "line": 119, + "mass": 84.43 + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "name": "OverrideCustomerEntitlement", + "cc": 9, + "sloc": 56, + "line": 349, + "mass": 67.35 + }, + { + "path": "openmeter/entitlement/metered/grant_owner_adapter_test.go", + "name": "TestEntitlementGrantOwnerAdapter", + "cc": 9, + "sloc": 574, + "line": 27, + "mass": 215.62 + }, + { + "path": "openmeter/entitlement/static/connector.go", + "name": "BeforeCreate", + "cc": 9, + "sloc": 42, + "line": 39, + "mass": 58.33 + }, + { + "path": "openmeter/ledger/annotations.go", + "name": "ChargeTransactionAnnotations", + "cc": 9, + "sloc": 16, + "line": 87, + "mass": 36.0 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "Validate", + "cc": 9, + "sloc": 29, + "line": 171, + "mass": 48.47 + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "name": "OnCreditPurchasePaymentSettled", + "cc": 9, + "sloc": 53, + "line": 127, + "mass": 65.52 + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased.go", + "name": "OnPaymentAuthorized", + "cc": 9, + "sloc": 56, + "line": 97, + "mass": 67.35 + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased.go", + "name": "OnPaymentSettled", + "cc": 9, + "sloc": 52, + "line": 162, + "mass": 64.9 + }, + { + "path": "openmeter/ledger/collector/collect.go", + "name": "toCreditRealizations", + "cc": 9, + "sloc": 38, + "line": 214, + "mass": 55.48 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "planCorrection", + "cc": 9, + "sloc": 38, + "line": 147, + "mass": 55.48 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "resolvePlannedInputs", + "cc": 9, + "sloc": 52, + "line": 392, + "mass": 64.9 + }, + { + "path": "openmeter/ledger/customerbalance/facade.go", + "name": "Validate", + "cc": 9, + "sloc": 21, + "line": 62, + "mass": 41.24 + }, + { + "path": "openmeter/ledger/customerbalance/facade.go", + "name": "GetBalances", + "cc": 9, + "sloc": 37, + "line": 109, + "mass": 54.74 + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "name": "applyChargeMetadataToCreditTransactions", + "cc": 9, + "sloc": 40, + "line": 316, + "mass": 56.92 + }, + { + "path": "openmeter/ledger/historical/ledger.go", + "name": "lockAccountsForTransactionInputs", + "cc": 9, + "sloc": 35, + "line": 115, + "mass": 53.24 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "sameRouteField", + "cc": 9, + "sloc": 20, + "line": 262, + "mass": 40.25 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "Validate", + "cc": 9, + "sloc": 25, + "line": 27, + "mass": 45.0 + }, + { + "path": "openmeter/llmcost/service/service.go", + "name": "GetPrice", + "cc": 9, + "sloc": 29, + "line": 81, + "mass": 48.47 + }, + { + "path": "openmeter/meter/httphandler/query_csv.go", + "name": "QueryMeterCSV", + "cc": 9, + "sloc": 62, + "line": 36, + "mass": 70.87 + }, + { + "path": "openmeter/meter/httphandler/query_csv.go", + "name": "QueryMeterPostCSV", + "cc": 9, + "sloc": 61, + "line": 108, + "mass": 70.29 + }, + { + "path": "openmeter/meter/meter.go", + "name": "Validate", + "cc": 9, + "sloc": 28, + "line": 249, + "mass": 47.62 + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "name": "ListEvents", + "cc": 9, + "sloc": 44, + "line": 19, + "mass": 59.7 + }, + { + "path": "openmeter/meterexport/service/funnel.go", + "name": "funnel", + "cc": 9, + "sloc": 47, + "line": 63, + "mass": 61.7 + }, + { + "path": "openmeter/notification/eventhandler/deliverystatus.go", + "name": "filterActiveDeliveryStatusesByChannelType", + "cc": 9, + "sloc": 33, + "line": 11, + "mass": 51.7 + }, + { + "path": "openmeter/portal/service.go", + "name": "Validate", + "cc": 9, + "sloc": 19, + "line": 128, + "mass": 39.23 + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "name": "ArchiveFeature", + "cc": 9, + "sloc": 62, + "line": 201, + "mass": 70.87 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "FromAddonRow", + "cc": 9, + "sloc": 59, + "line": 17, + "mass": 69.13 + }, + { + "path": "openmeter/productcatalog/addon/httpdriver/addon.go", + "name": "ListAddons", + "cc": 9, + "sloc": 70, + "line": 33, + "mass": 75.3 + }, + { + "path": "openmeter/productcatalog/driver/feature.go", + "name": "GetFeature", + "cc": 9, + "sloc": 43, + "line": 66, + "mass": 59.02 + }, + { + "path": "openmeter/productcatalog/driver/parser.go", + "name": "apiUnitCostToDomain", + "cc": 9, + "sloc": 44, + "line": 114, + "mass": 59.7 + }, + { + "path": "openmeter/productcatalog/driver/parser.go", + "name": "resolveLLMPricing", + "cc": 9, + "sloc": 32, + "line": 163, + "mass": 50.91 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "UnmarshalJSON", + "cc": 9, + "sloc": 34, + "line": 108, + "mass": 52.48 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsRateCard", + "cc": 9, + "sloc": 30, + "line": 361, + "mass": 49.3 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsUsageBasedRateCard", + "cc": 9, + "sloc": 42, + "line": 470, + "mass": 58.33 + }, + { + "path": "openmeter/productcatalog/plan.go", + "name": "ValidatePlanPhases", + "cc": 9, + "sloc": 44, + "line": 72, + "mass": 59.7 + }, + { + "path": "openmeter/productcatalog/plan/adapter/phase.go", + "name": "createPhase", + "cc": 9, + "sloc": 45, + "line": 51, + "mass": 60.37 + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "name": "CreatePlan", + "cc": 9, + "sloc": 60, + "line": 171, + "mass": 69.71 + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "name": "Validate", + "cc": 9, + "sloc": 24, + "line": 111, + "mass": 44.09 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Clone", + "cc": 9, + "sloc": 41, + "line": 115, + "mass": 57.63 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Validate", + "cc": 9, + "sloc": 22, + "line": 363, + "mass": 42.21 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Validate", + "cc": 9, + "sloc": 17, + "line": 517, + "mass": 37.11 + }, + { + "path": "openmeter/productcatalog/subscription/http/edit.go", + "name": "EditSubscription", + "cc": 9, + "sloc": 54, + "line": 30, + "mass": 66.14 + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "name": "MapSubscriptionItemToAPI", + "cc": 9, + "sloc": 50, + "line": 212, + "mass": 63.64 + }, + { + "path": "openmeter/streaming/clickhouse/event_query.go", + "name": "toSQL", + "cc": 9, + "sloc": 53, + "line": 105, + "mass": 65.52 + }, + { + "path": "openmeter/streaming/connector.go", + "name": "Validate", + "cc": 9, + "sloc": 21, + "line": 63, + "mass": 41.24 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "Update", + "cc": 9, + "sloc": 42, + "line": 196, + "mass": 58.33 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "Delete", + "cc": 9, + "sloc": 41, + "line": 249, + "mass": 57.63 + }, + { + "path": "openmeter/subscription/service/servicevalidation.go", + "name": "validateUpdate", + "cc": 9, + "sloc": 34, + "line": 43, + "mass": 52.48 + }, + { + "path": "openmeter/subscription/uniqueness_test.go", + "name": "TestValidateUniqueConstraintByFeatures", + "cc": 9, + "sloc": 309, + "line": 110, + "mass": 158.21 + }, + { + "path": "openmeter/subscription/workflow/service/subscription.go", + "name": "ChangeToPlan", + "cc": 9, + "sloc": 56, + "line": 182, + "mass": 67.35 + }, + { + "path": "openmeter/subscription/workflow/service/subscription_test.go", + "name": "TestEditingWithTiming", + "cc": 9, + "sloc": 205, + "line": 577, + "mass": 128.86 + }, + { + "path": "openmeter/taxcode/service/taxcode.go", + "name": "GetOrCreateByAppMapping", + "cc": 9, + "sloc": 42, + "line": 74, + "mass": 58.33 + }, + { + "path": "openmeter/taxcode/taxcode.go", + "name": "Validate", + "cc": 9, + "sloc": 26, + "line": 196, + "mass": 45.89 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/client.go", + "name": "mutate", + "cc": 9, + "sloc": 25, + "line": 319, + "mass": 45.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/client.go", + "name": "mutate", + "cc": 9, + "sloc": 25, + "line": 319, + "mass": 45.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "prepareQuery", + "cc": 9, + "sloc": 25, + "line": 309, + "mass": 45.0 + }, + { + "path": "pkg/framework/lockr/locker.go", + "name": "getTxClient", + "cc": 9, + "sloc": 33, + "line": 100, + "mass": 51.7 + }, + { + "path": "pkg/framework/lockr/session.go", + "name": "release", + "cc": 9, + "sloc": 38, + "line": 227, + "mass": 55.48 + }, + { + "path": "pkg/kafka/config.go", + "name": "Validate", + "cc": 9, + "sloc": 18, + "line": 229, + "mass": 38.18 + }, + { + "path": "pkg/kafka/config.go", + "name": "UnmarshalText", + "cc": 9, + "sloc": 21, + "line": 731, + "mass": 41.24 + }, + { + "path": "pkg/kafka/config.go", + "name": "UnmarshalText", + "cc": 9, + "sloc": 21, + "line": 794, + "mass": 41.24 + }, + { + "path": "pkg/kafka/metrics/internal/partition.go", + "name": "NewPartitionMessageMetrics", + "cc": 9, + "sloc": 69, + "line": 51, + "mass": 74.76 + }, + { + "path": "pkg/redis/client.go", + "name": "NewClient", + "cc": 9, + "sloc": 51, + "line": 42, + "mass": 64.27 + }, + { + "path": "test/app/stripe/invoice_test.go", + "name": "TestSendInvoice", + "cc": 9, + "sloc": 134, + "line": 1330, + "mass": 104.18 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceShrinkPatchDuringAwaitingPaymentSettlementCreatesReplacementFinalRun", + "cc": 9, + "sloc": 230, + "line": 4015, + "mass": 136.49 + }, + { + "path": "tools/migrate/fs.go", + "name": "ReadDir", + "cc": 9, + "sloc": 35, + "line": 32, + "mass": 53.24 + }, + { + "path": "tools/migrate/viewgen/viewgen.go", + "name": "CollectViews", + "cc": 9, + "sloc": 37, + "line": 58, + "mass": 54.74 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__getitem__", + "cc": 8, + "sloc": 26, + "line": 366, + "mass": 40.79 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "body", + "cc": 8, + "sloc": 39, + "line": 638, + "mass": 49.96 + }, + { + "path": "api/spec/packages/legacy/lib/rules/friendly-name.js", + "name": "friendlyNameRule", + "cc": 8, + "sloc": 70, + "line": 3, + "mass": 66.93 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 8, + "sloc": 22, + "line": 897, + "mass": 37.52 + }, + { + "path": "api/v3/api.gen.go", + "name": "ValueByDiscriminator", + "cc": 8, + "sloc": 20, + "line": 6517, + "mass": 35.78 + }, + { + "path": "api/v3/apierrors/handler.go", + "name": "NewV3ErrorHandlerFunc", + "cc": 8, + "sloc": 33, + "line": 21, + "mass": 45.96 + }, + { + "path": "api/v3/apierrors/handler.go", + "name": "singularHTTPStatusFromValidationIssues", + "cc": 8, + "sloc": 27, + "line": 172, + "mass": 41.57 + }, + { + "path": "api/v3/filters/convert.go", + "name": "FromAPIFilterULID", + "cc": 8, + "sloc": 24, + "line": 69, + "mass": 39.19 + }, + { + "path": "api/v3/filters/parse.go", + "name": "Parse", + "cc": 8, + "sloc": 24, + "line": 47, + "mass": 39.19 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterDateTime", + "cc": 8, + "sloc": 24, + "line": 434, + "mass": 39.19 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "FromAPIBillingPriceTiers", + "cc": 8, + "sloc": 29, + "line": 718, + "mass": 43.08 + }, + { + "path": "api/v3/handlers/currencies/convert.go", + "name": "FromAPIBillingCurrencyType", + "cc": 8, + "sloc": 24, + "line": 10, + "mass": 39.19 + }, + { + "path": "api/v3/handlers/customers/billing/convert.gen.go", + "name": "pV3BillingAppStripeCreateCheckoutSessionCustomerUpdateToPApiCreateStripeCheckoutSessionCustomerUpdate", + "cc": 8, + "sloc": 29, + "line": 262, + "mass": 43.08 + }, + { + "path": "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go", + "name": "CreateCustomerStripeCheckoutSession", + "cc": 8, + "sloc": 63, + "line": 25, + "mass": 63.5 + }, + { + "path": "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go", + "name": "CreateCustomerStripePortalSession", + "cc": 8, + "sloc": 74, + "line": 29, + "mass": 68.82 + }, + { + "path": "api/v3/handlers/events/convert.go", + "name": "fromAPIEventSort", + "cc": 8, + "sloc": 41, + "line": 119, + "mass": 51.22 + }, + { + "path": "api/v3/handlers/features/convert.go", + "name": "convertUnitCostFromAPI", + "cc": 8, + "sloc": 41, + "line": 148, + "mass": 51.22 + }, + { + "path": "api/v3/handlers/features/convert.go", + "name": "resolveLLMPricing", + "cc": 8, + "sloc": 29, + "line": 234, + "mass": 43.08 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "ToAPIBillingPlan", + "cc": 8, + "sloc": 42, + "line": 41, + "mass": 51.85 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPIBillingPrice", + "cc": 8, + "sloc": 29, + "line": 573, + "mass": 43.08 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPIBillingPriceTiers", + "cc": 8, + "sloc": 29, + "line": 704, + "mass": 43.08 + }, + { + "path": "api/v3/labels/convert.go", + "name": "ToMetadataAnnotations", + "cc": 8, + "sloc": 28, + "line": 20, + "mass": 42.33 + }, + { + "path": "api/v3/oasmiddleware/validator.go", + "name": "ValidateResponse", + "cc": 8, + "sloc": 44, + "line": 78, + "mass": 53.07 + }, + { + "path": "app/config/telemetry.go", + "name": "NewLoggerProvider", + "cc": 8, + "sloc": 29, + "line": 625, + "mass": 43.08 + }, + { + "path": "cmd/jobs/billing/advance/advance.go", + "name": "init", + "cc": 8, + "sloc": 66, + "line": 19, + "mass": 64.99 + }, + { + "path": "collector/benthos/input/runai/metrics.go", + "name": "GetWorkloadMetrics", + "cc": 8, + "sloc": 41, + "line": 72, + "mass": 51.22 + }, + { + "path": "collector/benthos/input/runai/metrics.go", + "name": "GetAllWorkloadWithMetrics", + "cc": 8, + "sloc": 59, + "line": 146, + "mass": 61.45 + }, + { + "path": "collector/benthos/input/runai/metrics.go", + "name": "GetPodMetrics", + "cc": 8, + "sloc": 41, + "line": 212, + "mass": 51.22 + }, + { + "path": "collector/benthos/input/runai/metrics.go", + "name": "GetAllPodWithMetrics", + "cc": 8, + "sloc": 36, + "line": 286, + "mass": 48.0 + }, + { + "path": "collector/benthos/output/openmeter.go", + "name": "newOpenMeterOutput", + "cc": 8, + "sloc": 35, + "line": 96, + "mass": 47.33 + }, + { + "path": "collector/benthos/services/leaderelection/service.go", + "name": "Start", + "cc": 8, + "sloc": 38, + "line": 115, + "mass": 49.32 + }, + { + "path": "e2e/entitlement_test.go", + "name": "TestEntitlementWithUniqueCountAggregation", + "cc": 8, + "sloc": 188, + "line": 140, + "mass": 109.69 + }, + { + "path": "e2e/multisubject_test.go", + "name": "TestMultiSubject", + "cc": 8, + "sloc": 208, + "line": 25, + "mass": 115.38 + }, + { + "path": "openmeter/app/adapter/customer.go", + "name": "EnsureCustomer", + "cc": 8, + "sloc": 49, + "line": 72, + "mass": 56.0 + }, + { + "path": "openmeter/app/adapter/customer.go", + "name": "DeleteCustomer", + "cc": 8, + "sloc": 43, + "line": 127, + "mass": 52.46 + }, + { + "path": "openmeter/app/appbase.go", + "name": "Validate", + "cc": 8, + "sloc": 22, + "line": 117, + "mass": 37.52 + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/mapper.go", + "name": "mapUpsertStandardInvoiceResultFromAPI", + "cc": 8, + "sloc": 23, + "line": 11, + "mass": 38.37 + }, + { + "path": "openmeter/app/custominvoicing/service/sync.go", + "name": "HandlePaymentTrigger", + "cc": 8, + "sloc": 45, + "line": 66, + "mass": 53.67 + }, + { + "path": "openmeter/app/httpdriver/marketplace.go", + "name": "MarketplaceAppAPIKeyInstall", + "cc": 8, + "sloc": 61, + "line": 103, + "mass": 62.48 + }, + { + "path": "openmeter/app/marketplace.go", + "name": "Validate", + "cc": 8, + "sloc": 22, + "line": 44, + "mass": 37.52 + }, + { + "path": "openmeter/app/service/app.go", + "name": "UpdateApp", + "cc": 8, + "sloc": 33, + "line": 43, + "mass": 45.96 + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "name": "ValidateStandardInvoice", + "cc": 8, + "sloc": 28, + "line": 32, + "mass": 42.33 + }, + { + "path": "openmeter/app/stripe/httpdriver/customer.go", + "name": "UpsertCustomerStripeAppData", + "cc": 8, + "sloc": 64, + "line": 93, + "mass": 64.0 + }, + { + "path": "openmeter/app/stripe/portal.go", + "name": "Validate", + "cc": 8, + "sloc": 17, + "line": 25, + "mass": 32.98 + }, + { + "path": "openmeter/app/stripe/service/service.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 39, + "mass": 39.19 + }, + { + "path": "openmeter/app/stripe/types.go", + "name": "Validate", + "cc": 8, + "sloc": 18, + "line": 131, + "mass": 33.94 + }, + { + "path": "openmeter/billing/adapter/customeroverride.go", + "name": "mapCustomerOverrideFromDB", + "cc": 8, + "sloc": 55, + "line": 390, + "mass": 59.33 + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "name": "CreateGatheringInvoice", + "cc": 8, + "sloc": 60, + "line": 28, + "mass": 61.97 + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinemapper.go", + "name": "mapStandardInvoiceLinesFromDB", + "cc": 8, + "sloc": 30, + "line": 24, + "mass": 43.82 + }, + { + "path": "openmeter/billing/charges/adapter/search.go", + "name": "ListCustomersToAdvance", + "cc": 8, + "sloc": 57, + "line": 107, + "mass": 60.4 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "Validate", + "cc": 8, + "sloc": 20, + "line": 54, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "GetChargeID", + "cc": 8, + "sloc": 20, + "line": 115, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "GetUniqueReferenceID", + "cc": 8, + "sloc": 20, + "line": 140, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "GetCustomerID", + "cc": 8, + "sloc": 20, + "line": 165, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "GetCurrency", + "cc": 8, + "sloc": 20, + "line": 190, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "Validate", + "cc": 8, + "sloc": 20, + "line": 302, + "mass": 35.78 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "GetUniqueReferenceID", + "cc": 8, + "sloc": 21, + "line": 363, + "mass": 36.66 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "Meta", + "cc": 8, + "sloc": 22, + "line": 389, + "mass": 37.52 + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/charge.go", + "name": "ListCharges", + "cc": 8, + "sloc": 37, + "line": 155, + "mass": 48.66 + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/mapper.go", + "name": "MapCreditPurchaseChargeFromDB", + "cc": 8, + "sloc": 42, + "line": 36, + "mass": 51.85 + }, + { + "path": "openmeter/billing/charges/creditpurchase/lineengine/engine.go", + "name": "CalculateLines", + "cc": 8, + "sloc": 24, + "line": 113, + "mass": 39.19 + }, + { + "path": "openmeter/billing/charges/creditpurchase/settlement.go", + "name": "MarshalJSON", + "cc": 8, + "sloc": 40, + "line": 132, + "mass": 50.6 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "UpdateCharge", + "cc": 8, + "sloc": 47, + "line": 25, + "mass": 54.85 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/detailedline.go", + "name": "UpsertDetailedLines", + "cc": 8, + "sloc": 67, + "line": 57, + "mass": 65.48 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/mapper.go", + "name": "mapRealizationsFromDB", + "cc": 8, + "sloc": 22, + "line": 42, + "mass": 37.52 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnCollectionCompleted", + "cc": 8, + "sloc": 25, + "line": 151, + "mass": 40.0 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "newStateMachineForStandardLine", + "cc": 8, + "sloc": 42, + "line": 301, + "mass": 51.85 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 29, + "mass": 38.37 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "name": "Validate", + "cc": 8, + "sloc": 30, + "line": 194, + "mass": 43.82 + }, + { + "path": "openmeter/billing/charges/meta/patchshrink.go", + "name": "ValidateWith", + "cc": 8, + "sloc": 25, + "line": 129, + "mass": 40.0 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/realizations.go", + "name": "CreateCorrectionRequest", + "cc": 8, + "sloc": 38, + "line": 74, + "mass": 49.32 + }, + { + "path": "openmeter/billing/charges/patch.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 27, + "mass": 39.19 + }, + { + "path": "openmeter/billing/charges/service/invoice.go", + "name": "getLinesWithChargesForStandardInvoice", + "cc": 8, + "sloc": 60, + "line": 174, + "mass": 61.97 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/charge.go", + "name": "GetByID", + "cc": 8, + "sloc": 31, + "line": 204, + "mass": 44.54 + }, + { + "path": "openmeter/billing/charges/usagebased/service/create.go", + "name": "Create", + "cc": 8, + "sloc": 55, + "line": 20, + "mass": 59.33 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "DeleteCharge", + "cc": 8, + "sloc": 30, + "line": 237, + "mass": 43.82 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "SnapshotInvoiceUsage", + "cc": 8, + "sloc": 54, + "line": 631, + "mass": 58.79 + }, + { + "path": "openmeter/billing/charges/usagebased/service/linemapper.go", + "name": "populateUsageBasedStandardLineFromRun", + "cc": 8, + "sloc": 50, + "line": 16, + "mass": 56.57 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/details.go", + "name": "Validate", + "cc": 8, + "sloc": 25, + "line": 41, + "mass": 40.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go", + "name": "Validate", + "cc": 8, + "sloc": 25, + "line": 27, + "mass": 40.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/invoice.go", + "name": "BookAccruedInvoiceUsage", + "cc": 8, + "sloc": 49, + "line": 59, + "mass": 56.0 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 21, + "mass": 39.19 + }, + { + "path": "openmeter/billing/creditgrant/service/service.go", + "name": "Create", + "cc": 8, + "sloc": 43, + "line": 71, + "mass": 52.46 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual_1", + "cc": 8, + "sloc": 9, + "line": 137, + "mass": 24.0 + }, + { + "path": "openmeter/billing/discount.go", + "name": "UnmarshalJSON", + "cc": 8, + "sloc": 29, + "line": 231, + "mass": 43.08 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 780, + "mass": 38.37 + }, + { + "path": "openmeter/billing/httpdriver/deprecations.go", + "name": "mapAndValidateInvoiceLineRateCardDeprecatedFields", + "cc": 8, + "sloc": 48, + "line": 102, + "mass": 55.43 + }, + { + "path": "openmeter/billing/httpdriver/invoice_test.go", + "name": "TestGatheringInvoiceSerialization", + "cc": 8, + "sloc": 174, + "line": 74, + "mass": 105.53 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mergeGatheringInvoiceLinesFromAPI", + "cc": 8, + "sloc": 35, + "line": 972, + "mass": 47.33 + }, + { + "path": "openmeter/billing/httpdriver/profile.go", + "name": "fromAPIBillingWorkflow", + "cc": 8, + "sloc": 47, + "line": 349, + "mass": 54.85 + }, + { + "path": "openmeter/billing/httpdriver/profile.go", + "name": "MapProfileToApi", + "cc": 8, + "sloc": 39, + "line": 420, + "mass": 49.96 + }, + { + "path": "openmeter/billing/httpdriver/profile.go", + "name": "mapAlignmentToAPI", + "cc": 8, + "sloc": 35, + "line": 567, + "mass": 47.33 + }, + { + "path": "openmeter/billing/invoice.go", + "name": "AsGenericInvoice", + "cc": 8, + "sloc": 24, + "line": 142, + "mass": 39.19 + }, + { + "path": "openmeter/billing/models/totals/model.go", + "name": "IsZero", + "cc": 8, + "sloc": 10, + "line": 124, + "mass": 25.3 + }, + { + "path": "openmeter/billing/models/totals/model.go", + "name": "Equal", + "cc": 8, + "sloc": 10, + "line": 135, + "mass": 25.3 + }, + { + "path": "openmeter/billing/rating/service/mutator/commitments.go", + "name": "Mutate", + "cc": 8, + "sloc": 33, + "line": 18, + "mass": 45.96 + }, + { + "path": "openmeter/billing/rating/service/mutator/credits.go", + "name": "Mutate", + "cc": 8, + "sloc": 29, + "line": 17, + "mass": 43.08 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "UpsertCustomerOverride", + "cc": 8, + "sloc": 47, + "line": 19, + "mass": 54.85 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "invokeOnStandardInvoiceCreated", + "cc": 8, + "sloc": 29, + "line": 836, + "mass": 43.08 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "removeLinesFromGatheringInvoice", + "cc": 8, + "sloc": 43, + "line": 930, + "mass": 52.46 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "RecalculateGatheringInvoices", + "cc": 8, + "sloc": 38, + "line": 1029, + "mass": 49.32 + }, + { + "path": "openmeter/billing/service/invoiceapp.go", + "name": "syncEditInvoice", + "cc": 8, + "sloc": 41, + "line": 68, + "mass": 51.22 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "demoteDefaultProfile", + "cc": 8, + "sloc": 37, + "line": 439, + "mass": 48.66 + }, + { + "path": "openmeter/billing/service/quantitysnapshot.go", + "name": "snapshotLineQuantitiesInParallel", + "cc": 8, + "sloc": 41, + "line": 95, + "mass": 51.22 + }, + { + "path": "openmeter/billing/service/quantitysnapshot.go", + "name": "Validate", + "cc": 8, + "sloc": 22, + "line": 157, + "mass": 37.52 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "calculateAvailableActionDetails", + "cc": 8, + "sloc": 38, + "line": 430, + "mass": 49.32 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 257, + "mass": 39.19 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "Validate", + "cc": 8, + "sloc": 28, + "line": 1062, + "mass": 42.33 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "Clone", + "cc": 8, + "sloc": 28, + "line": 135, + "mass": 42.33 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "SortDetailedLines", + "cc": 8, + "sloc": 23, + "line": 725, + "mass": 38.37 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 1039, + "mass": 38.37 + }, + { + "path": "openmeter/billing/worker/collect/collect.go", + "name": "All", + "cc": 8, + "sloc": 61, + "line": 137, + "mass": 62.48 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go", + "name": "NewItemFromLineOrHierarchy", + "cc": 8, + "sloc": 24, + "line": 193, + "mass": 39.19 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go", + "name": "AddShrink", + "cc": 8, + "sloc": 27, + "line": 67, + "mass": 41.57 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go", + "name": "AddExtend", + "cc": 8, + "sloc": 27, + "line": 102, + "mass": 41.57 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go", + "name": "AddDelete", + "cc": 8, + "sloc": 25, + "line": 36, + "mass": 40.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "name": "generateForAlignedItemVersionPeriod", + "cc": 8, + "sloc": 69, + "line": 332, + "mass": 66.45 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "name": "truncateItemsIfNeeded", + "cc": 8, + "sloc": 20, + "line": 413, + "mass": 35.78 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "name": "generateOneTimeAlignedItem", + "cc": 8, + "sloc": 61, + "line": 439, + "mass": 62.48 + }, + { + "path": "openmeter/billing/worker/worker.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 41, + "mass": 39.19 + }, + { + "path": "openmeter/billing/worker/worker.go", + "name": "New", + "cc": 8, + "sloc": 50, + "line": 84, + "mass": 56.57 + }, + { + "path": "openmeter/billing/workflow.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 43, + "mass": 38.37 + }, + { + "path": "openmeter/credit/engine/history.go", + "name": "GetUsageInPeriodUntilSegment", + "cc": 8, + "sloc": 27, + "line": 129, + "mass": 41.57 + }, + { + "path": "openmeter/currencies/adapter/currencies.go", + "name": "ListCustomCurrencies", + "cc": 8, + "sloc": 35, + "line": 46, + "mass": 47.33 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "DeleteCustomer", + "cc": 8, + "sloc": 68, + "line": 358, + "mass": 65.97 + }, + { + "path": "openmeter/customer/httpdriver/apimapping.go", + "name": "CustomerToAPI", + "cc": 8, + "sloc": 48, + "line": 143, + "mass": 55.43 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "GetCustomerEntitlementValue", + "cc": 8, + "sloc": 51, + "line": 399, + "mass": 57.13 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1135, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "loadRatecards", + "cc": 8, + "sloc": 30, + "line": 501, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "loadPlans", + "cc": 8, + "sloc": 30, + "line": 531, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "loadSubscriptionAddons", + "cc": 8, + "sloc": 30, + "line": 561, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 774, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1387, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "loadAddon", + "cc": 8, + "sloc": 29, + "line": 495, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 780, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/app.go", + "name": "BillingInvoicePaymentAppOrErr", + "cc": 8, + "sloc": 25, + "line": 123, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadCustomerApps", + "cc": 8, + "sloc": 30, + "line": 683, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingProfileTaxApp", + "cc": 8, + "sloc": 30, + "line": 713, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingProfileInvoicingApp", + "cc": 8, + "sloc": 30, + "line": 743, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingProfilePaymentApp", + "cc": 8, + "sloc": 30, + "line": 773, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingInvoiceTaxApp", + "cc": 8, + "sloc": 30, + "line": 803, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingInvoiceInvoicingApp", + "cc": 8, + "sloc": 30, + "line": 833, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "loadBillingInvoicePaymentApp", + "cc": 8, + "sloc": 30, + "line": 863, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1076, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "loadApp", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "loadCustomerApps", + "cc": 8, + "sloc": 30, + "line": 456, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "loadApp", + "cc": 8, + "sloc": 29, + "line": 486, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 698, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "loadCustomInvoicingApp", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 829, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "loadCustomerApps", + "cc": 8, + "sloc": 30, + "line": 454, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "loadApp", + "cc": 8, + "sloc": 29, + "line": 484, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 696, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "loadStripeApp", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/appstripecustomer_update.go", + "name": "check", + "cc": 8, + "sloc": 14, + "line": 133, + "mass": 29.93 + }, + { + "path": "openmeter/ent/db/appstripecustomer_update.go", + "name": "check", + "cc": 8, + "sloc": 14, + "line": 313, + "mass": 29.93 + }, + { + "path": "openmeter/ent/db/balancesnapshot/balancesnapshot.go", + "name": "ValidColumn", + "cc": 8, + "sloc": 21, + "line": 66, + "mass": 36.66 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "loadEntitlement", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_update.go", + "name": "sqlSave", + "cc": 8, + "sloc": 24, + "line": 76, + "mass": 39.19 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 495, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 780, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadSourceBillingProfile", + "cc": 8, + "sloc": 29, + "line": 853, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadBillingWorkflowConfig", + "cc": 8, + "sloc": 29, + "line": 882, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadBillingInvoiceLines", + "cc": 8, + "sloc": 31, + "line": 911, + "mass": 44.54 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadBillingInvoiceDetailedLines", + "cc": 8, + "sloc": 30, + "line": 942, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadBillingInvoiceValidationIssues", + "cc": 8, + "sloc": 30, + "line": 972, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadBillingInvoiceCustomer", + "cc": 8, + "sloc": 29, + "line": 1068, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadTaxApp", + "cc": 8, + "sloc": 29, + "line": 1097, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadInvoicingApp", + "cc": 8, + "sloc": 29, + "line": 1126, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "loadPaymentApp", + "cc": 8, + "sloc": 29, + "line": 1155, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1385, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "name": "createSpec", + "cc": 8, + "sloc": 48, + "line": 200, + "mass": 55.43 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 2982, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadBillingInvoice", + "cc": 8, + "sloc": 29, + "line": 1209, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadDetailedLinesV2", + "cc": 8, + "sloc": 30, + "line": 1400, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadLineUsageDiscounts", + "cc": 8, + "sloc": 30, + "line": 1430, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadLineAmountDiscounts", + "cc": 8, + "sloc": 30, + "line": 1460, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 2004, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "loadBillingInvoiceLine", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "loadBillingInvoiceLine", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1020, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "loadBillingInvoice", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 967, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadBillingInvoices", + "cc": 8, + "sloc": 30, + "line": 629, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadWorkflowConfig", + "cc": 8, + "sloc": 29, + "line": 692, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadTaxApp", + "cc": 8, + "sloc": 29, + "line": 721, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadInvoicingApp", + "cc": 8, + "sloc": 29, + "line": 750, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "loadPaymentApp", + "cc": 8, + "sloc": 29, + "line": 779, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1003, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "loadBillingInvoice", + "cc": 8, + "sloc": 29, + "line": 544, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "loadBillingInvoiceLine", + "cc": 8, + "sloc": 29, + "line": 573, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "loadAmountDiscounts", + "cc": 8, + "sloc": 30, + "line": 634, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 856, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "loadDetailedLine", + "cc": 8, + "sloc": 29, + "line": 411, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 626, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 768, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/charge/charge.go", + "name": "ValidColumn", + "cc": 8, + "sloc": 21, + "line": 105, + "mass": 36.66 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "loadCreditRealizationLineages", + "cc": 8, + "sloc": 30, + "line": 797, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1019, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 961, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1220, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant.go", + "name": "CreditPurchaseOrErr", + "cc": 8, + "sloc": 25, + "line": 52, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "loadCreditPurchase", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "loadCreditPurchase", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 683, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "loadBillingInvoiceLine", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "loadCreditPurchase", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadRuns", + "cc": 8, + "sloc": 30, + "line": 754, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 942, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1239, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1496, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadFlatFee", + "cc": 8, + "sloc": 29, + "line": 674, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadCreditAllocations", + "cc": 8, + "sloc": 30, + "line": 767, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadDetailedLines", + "cc": 8, + "sloc": 30, + "line": 797, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1073, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 684, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 609, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 862, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1860, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 702, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 677, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "loadBillingInvoiceLine", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 469, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadRuns", + "cc": 8, + "sloc": 30, + "line": 800, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadDetailedLines", + "cc": 8, + "sloc": 30, + "line": 830, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 1018, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "loadFeature", + "cc": 8, + "sloc": 29, + "line": 1047, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1312, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 651, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 566, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 784, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "name": "String", + "cc": 8, + "sloc": 124, + "line": 476, + "mass": 89.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "loadCharge", + "cc": 8, + "sloc": 29, + "line": 537, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 566, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 854, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 649, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "loadRun", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadUsageBased", + "cc": 8, + "sloc": 29, + "line": 762, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadFeature", + "cc": 8, + "sloc": 29, + "line": 791, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadCreditAllocations", + "cc": 8, + "sloc": 30, + "line": 884, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadDetailedLines", + "cc": 8, + "sloc": 30, + "line": 914, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1226, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage.go", + "name": "SegmentsOrErr", + "cc": 8, + "sloc": 25, + "line": 70, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "loadCharge", + "cc": 8, + "sloc": 29, + "line": 456, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "loadSegments", + "cc": 8, + "sloc": 30, + "line": 485, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 701, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "loadLineage", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "loadCurrency", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "loadCostBasisHistory", + "cc": 8, + "sloc": 30, + "line": 413, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 626, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/customer.go", + "name": "ChargesUsageBasedOrErr", + "cc": 8, + "sloc": 25, + "line": 167, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadApps", + "cc": 8, + "sloc": 30, + "line": 766, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadSubjects", + "cc": 8, + "sloc": 30, + "line": 796, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadBillingInvoice", + "cc": 8, + "sloc": 30, + "line": 853, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadSubscription", + "cc": 8, + "sloc": 30, + "line": 883, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadEntitlements", + "cc": 8, + "sloc": 30, + "line": 913, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadChargesCreditPurchase", + "cc": 8, + "sloc": 30, + "line": 943, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadChargesFlatFee", + "cc": 8, + "sloc": 30, + "line": 973, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadChargesUsageBased", + "cc": 8, + "sloc": 30, + "line": 1003, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1216, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/customersubjects/customersubjects.go", + "name": "ValidColumn", + "cc": 8, + "sloc": 21, + "line": 51, + "mass": 36.66 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "createSpec", + "cc": 8, + "sloc": 57, + "line": 171, + "mass": 60.4 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadUsageReset", + "cc": 8, + "sloc": 30, + "line": 631, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadGrant", + "cc": 8, + "sloc": 30, + "line": 661, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadBalanceSnapshot", + "cc": 8, + "sloc": 30, + "line": 691, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadFeature", + "cc": 8, + "sloc": 29, + "line": 754, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 783, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1001, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 1044, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadEntitlement", + "cc": 8, + "sloc": 30, + "line": 676, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadUsageBasedCharges", + "cc": 8, + "sloc": 30, + "line": 772, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "loadUsageBasedRuns", + "cc": 8, + "sloc": 30, + "line": 802, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1083, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "loadEntitlement", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgeraccount.go", + "name": "SubAccountRoutesOrErr", + "cc": 8, + "sloc": 25, + "line": 63, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "loadSubAccounts", + "cc": 8, + "sloc": 30, + "line": 457, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "loadSubAccountRoutes", + "cc": 8, + "sloc": 30, + "line": 487, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 700, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 343, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "loadTransaction", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "loadSubAccount", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgersubaccount.go", + "name": "EntriesOrErr", + "cc": 8, + "sloc": 25, + "line": 81, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 710, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "loadAccount", + "cc": 8, + "sloc": 29, + "line": 497, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "loadRoute", + "cc": 8, + "sloc": 29, + "line": 526, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "loadEntries", + "cc": 8, + "sloc": 30, + "line": 555, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 774, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "loadAccount", + "cc": 8, + "sloc": 29, + "line": 456, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "loadSubAccounts", + "cc": 8, + "sloc": 30, + "line": 485, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 701, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgertransaction.go", + "name": "EntriesOrErr", + "cc": 8, + "sloc": 25, + "line": 67, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 688, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "loadGroup", + "cc": 8, + "sloc": 29, + "line": 454, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "loadEntries", + "cc": 8, + "sloc": 30, + "line": 483, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup.go", + "name": "TransactionsOrErr", + "cc": 8, + "sloc": 25, + "line": 49, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "loadTransactions", + "cc": 8, + "sloc": 30, + "line": 413, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 626, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/meter.go", + "name": "FeatureOrErr", + "cc": 8, + "sloc": 25, + "line": 68, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 603, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 627, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 655, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 631, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "loadRules", + "cc": 8, + "sloc": 29, + "line": 517, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 732, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus.go", + "name": "EventsOrErr", + "cc": 8, + "sloc": 25, + "line": 60, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 839, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 657, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "loadEvents", + "cc": 8, + "sloc": 30, + "line": 516, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 729, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes.go", + "name": "CreditGrantTaxCodeOrErr", + "cc": 8, + "sloc": 25, + "line": 63, + "mass": 40.0 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "loadInvoicingTaxCode", + "cc": 8, + "sloc": 29, + "line": 451, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "loadCreditGrantTaxCode", + "cc": 8, + "sloc": 29, + "line": 480, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 698, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1181, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "loadPhases", + "cc": 8, + "sloc": 30, + "line": 499, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "loadAddons", + "cc": 8, + "sloc": 30, + "line": 529, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 775, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 846, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "loadPlan", + "cc": 8, + "sloc": 29, + "line": 452, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "loadAddon", + "cc": 8, + "sloc": 29, + "line": 481, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "loadPlan", + "cc": 8, + "sloc": 29, + "line": 454, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "loadRatecards", + "cc": 8, + "sloc": 30, + "line": 483, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 699, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1387, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "loadPhase", + "cc": 8, + "sloc": 29, + "line": 495, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 780, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadCustomer", + "cc": 8, + "sloc": 29, + "line": 842, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadPhases", + "cc": 8, + "sloc": 30, + "line": 871, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadAddons", + "cc": 8, + "sloc": 30, + "line": 1067, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1313, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 719, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "loadSubscription", + "cc": 8, + "sloc": 29, + "line": 499, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "loadQuantities", + "cc": 8, + "sloc": 30, + "line": 528, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "loadAddon", + "cc": 8, + "sloc": 29, + "line": 558, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 776, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 393, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "loadSubscriptionAddon", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "loadSubscription", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 29, + "line": 1815, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "loadPhase", + "cc": 8, + "sloc": 29, + "line": 726, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1177, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "UpdateNewValues", + "cc": 8, + "sloc": 30, + "line": 697, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadSubscription", + "cc": 8, + "sloc": 29, + "line": 684, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "loadItems", + "cc": 8, + "sloc": 30, + "line": 713, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1095, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadOrganizationDefaultInvoicing", + "cc": 8, + "sloc": 30, + "line": 1480, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "loadOrganizationDefaultCreditGrant", + "cc": 8, + "sloc": 30, + "line": 1510, + "mass": 43.82 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 1723, + "mass": 35.78 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "loadEntitlement", + "cc": 8, + "sloc": 29, + "line": 409, + "mass": 43.08 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 624, + "mass": 35.78 + }, + { + "path": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 215, + "mass": 39.19 + }, + { + "path": "openmeter/entitlement/balanceworker/filters/highwatermark.go", + "name": "IsEntitlementInScope", + "cc": 8, + "sloc": 27, + "line": 49, + "mass": 41.57 + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "name": "ListInScopeEntitlements", + "cc": 8, + "sloc": 42, + "line": 184, + "mass": 51.85 + }, + { + "path": "openmeter/entitlement/balanceworker/worker.go", + "name": "eventHandler", + "cc": 8, + "sloc": 122, + "line": 205, + "mass": 88.36 + }, + { + "path": "openmeter/entitlement/boolean/connector.go", + "name": "BeforeCreate", + "cc": 8, + "sloc": 35, + "line": 32, + "mass": 47.33 + }, + { + "path": "openmeter/entitlement/driver/entitlement.go", + "name": "GetEntitlementsOfSubjectHandler", + "cc": 8, + "sloc": 62, + "line": 275, + "mass": 62.99 + }, + { + "path": "openmeter/entitlement/driver/metered.go", + "name": "CreateGrant", + "cc": 8, + "sloc": 64, + "line": 80, + "mass": 64.0 + }, + { + "path": "openmeter/entitlement/driver/v2/customer_metered.go", + "name": "CreateCustomerEntitlementGrant", + "cc": 8, + "sloc": 71, + "line": 123, + "mass": 67.41 + }, + { + "path": "openmeter/entitlement/entitlement.go", + "name": "IsActive", + "cc": 8, + "sloc": 15, + "line": 287, + "mass": 30.98 + }, + { + "path": "openmeter/entitlement/metered/entitlement_grant.go", + "name": "CreateGrant", + "cc": 8, + "sloc": 40, + "line": 50, + "mass": 50.6 + }, + { + "path": "openmeter/entitlement/metered/reset.go", + "name": "ResetEntitlementUsage", + "cc": 8, + "sloc": 57, + "line": 21, + "mass": 60.4 + }, + { + "path": "openmeter/entitlement/service/service.go", + "name": "CreateEntitlement", + "cc": 8, + "sloc": 22, + "line": 77, + "mass": 37.52 + }, + { + "path": "openmeter/entitlement/service/utils_test.go", + "name": "setupDependecies", + "cc": 8, + "sloc": 74, + "line": 90, + "mass": 68.82 + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee.go", + "name": "OnInvoiceUsageAccrued", + "cc": 8, + "sloc": 55, + "line": 88, + "mass": 59.33 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "planRecognizedEarningsSegment", + "cc": 8, + "sloc": 40, + "line": 222, + "mass": 50.6 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "planBackfilledAdvanceSegment", + "cc": 8, + "sloc": 49, + "line": 269, + "mass": 56.0 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "backfilledCreditReissueRoute", + "cc": 8, + "sloc": 30, + "line": 696, + "mass": 43.82 + }, + { + "path": "openmeter/ledger/customerbalance/calculation.go", + "name": "RealizedCredits", + "cc": 8, + "sloc": 28, + "line": 37, + "mass": 42.33 + }, + { + "path": "openmeter/ledger/customerbalance/service.go", + "name": "Validate", + "cc": 8, + "sloc": 25, + "line": 85, + "mass": 40.0 + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "name": "chargeDisplayMetadataFromCharge", + "cc": 8, + "sloc": 33, + "line": 365, + "mass": 45.96 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "Validate", + "cc": 8, + "sloc": 21, + "line": 203, + "mass": 36.66 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "correct", + "cc": 8, + "sloc": 31, + "line": 73, + "mass": 44.54 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 394, + "mass": 38.37 + }, + { + "path": "openmeter/ledger/transactions/breakage.go", + "name": "validate", + "cc": 8, + "sloc": 24, + "line": 21, + "mass": 39.19 + }, + { + "path": "openmeter/ledger/transactions/collection.go", + "name": "collectFromAttributableCustomerAccrued", + "cc": 8, + "sloc": 47, + "line": 38, + "mass": 54.85 + }, + { + "path": "openmeter/ledger/transactions/correction.go", + "name": "CorrectTransaction", + "cc": 8, + "sloc": 33, + "line": 42, + "mass": 45.96 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "Validate", + "cc": 8, + "sloc": 22, + "line": 474, + "mass": 37.52 + }, + { + "path": "openmeter/ledger/transactions/earnings.go", + "name": "correct", + "cc": 8, + "sloc": 36, + "line": 51, + "mass": 48.0 + }, + { + "path": "openmeter/ledger/transactions/fx.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 26, + "mass": 39.19 + }, + { + "path": "openmeter/ledger/transactions/fx.go", + "name": "resolve", + "cc": 8, + "sloc": 69, + "line": 70, + "mass": 66.45 + }, + { + "path": "openmeter/llmcost/sync/sync.go", + "name": "Run", + "cc": 8, + "sloc": 47, + "line": 129, + "mass": 54.85 + }, + { + "path": "openmeter/meter/meter.go", + "name": "Truncate", + "cc": 8, + "sloc": 25, + "line": 118, + "mass": 40.0 + }, + { + "path": "openmeter/meter/meter.go", + "name": "validateMeterAggregation", + "cc": 8, + "sloc": 20, + "line": 286, + "mass": 35.78 + }, + { + "path": "openmeter/meter/meter.go", + "name": "validateMeterGroupBy", + "cc": 8, + "sloc": 24, + "line": 310, + "mass": 39.19 + }, + { + "path": "openmeter/meterexport/service/service_test.go", + "name": "TestExportSyntheticMeterData", + "cc": 8, + "sloc": 226, + "line": 50, + "mass": 120.27 + }, + { + "path": "openmeter/meterexport/service/service_test.go", + "name": "TestExportSyntheticMeterDataIter", + "cc": 8, + "sloc": 188, + "line": 494, + "mass": 109.69 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "handleAsSnapshotEvent", + "cc": 8, + "sloc": 30, + "line": 38, + "mass": 43.82 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "createEvent", + "cc": 8, + "sloc": 58, + "line": 181, + "mass": 60.93 + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "name": "isBalanceThresholdEvent", + "cc": 8, + "sloc": 23, + "line": 250, + "mass": 38.37 + }, + { + "path": "openmeter/notification/consumer/entitlementreset.go", + "name": "createResetEvent", + "cc": 8, + "sloc": 53, + "line": 96, + "mass": 58.24 + }, + { + "path": "openmeter/notification/eventhandler/reconcile.go", + "name": "reconcileEvent", + "cc": 8, + "sloc": 34, + "line": 22, + "mass": 46.65 + }, + { + "path": "openmeter/notification/eventpayload.go", + "name": "Validate", + "cc": 8, + "sloc": 21, + "line": 53, + "mass": 36.66 + }, + { + "path": "openmeter/notification/rule.go", + "name": "Validate", + "cc": 8, + "sloc": 25, + "line": 100, + "mass": 40.0 + }, + { + "path": "openmeter/notification/rule.go", + "name": "Validate", + "cc": 8, + "sloc": 30, + "line": 241, + "mass": 43.82 + }, + { + "path": "openmeter/notification/webhook/svix/message.go", + "name": "SendMessage", + "cc": 8, + "sloc": 67, + "line": 23, + "mass": 65.48 + }, + { + "path": "openmeter/notification/webhook/svix/svix.go", + "name": "New", + "cc": 8, + "sloc": 31, + "line": 85, + "mass": 44.54 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "GetOrUpdateEndpointHeaders", + "cc": 8, + "sloc": 38, + "line": 24, + "mass": 49.32 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "GetWebhook", + "cc": 8, + "sloc": 31, + "line": 412, + "mass": 44.54 + }, + { + "path": "openmeter/productcatalog/addon.go", + "name": "ValidateAddonHasCompatiblePrices", + "cc": 8, + "sloc": 24, + "line": 298, + "mass": 39.19 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "FromPlanRateCardRow", + "cc": 8, + "sloc": 46, + "line": 298, + "mass": 54.26 + }, + { + "path": "openmeter/productcatalog/addon/ratecard.go", + "name": "Equal", + "cc": 8, + "sloc": 28, + "line": 172, + "mass": 42.33 + }, + { + "path": "openmeter/productcatalog/addon/service/taxcode_test.go", + "name": "TestAddonTaxCodeBackfill", + "cc": 8, + "sloc": 161, + "line": 578, + "mass": 101.51 + }, + { + "path": "openmeter/productcatalog/discount.go", + "name": "ValidateForPrice", + "cc": 8, + "sloc": 29, + "line": 202, + "mass": 43.08 + }, + { + "path": "openmeter/productcatalog/driver/feature.go", + "name": "ListFeatures", + "cc": 8, + "sloc": 78, + "line": 169, + "mass": 70.65 + }, + { + "path": "openmeter/productcatalog/feature/featuremeter.go", + "name": "ensureFeatureIDsResolved", + "cc": 8, + "sloc": 42, + "line": 159, + "mass": 51.85 + }, + { + "path": "openmeter/productcatalog/plan.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 238, + "mass": 38.37 + }, + { + "path": "openmeter/productcatalog/plan/adapter/mapping.go", + "name": "FromAddonRateCardRow", + "cc": 8, + "sloc": 46, + "line": 174, + "mass": 54.26 + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "name": "DeletePlan", + "cc": 8, + "sloc": 53, + "line": 240, + "mass": 58.24 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/mapping.go", + "name": "FromPlan", + "cc": 8, + "sloc": 44, + "line": 17, + "mass": 53.07 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/plan.go", + "name": "CreatePlan", + "cc": 8, + "sloc": 48, + "line": 106, + "mass": 55.43 + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "name": "DeletePlan", + "cc": 8, + "sloc": 58, + "line": 167, + "mass": 60.93 + }, + { + "path": "openmeter/productcatalog/plan/service/taxcode_test.go", + "name": "TestPlanTaxCodeBackfill", + "cc": 8, + "sloc": 166, + "line": 698, + "mass": 103.07 + }, + { + "path": "openmeter/productcatalog/planaddon/assert.go", + "name": "AssertPlanAddonUpdateInputEqual", + "cc": 8, + "sloc": 25, + "line": 24, + "mass": 40.0 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "MarshalJSON", + "cc": 8, + "sloc": 54, + "line": 124, + "mass": 58.79 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Validate", + "cc": 8, + "sloc": 19, + "line": 239, + "mass": 34.87 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Validate", + "cc": 8, + "sloc": 21, + "line": 741, + "mass": 36.66 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 8, + "sloc": 18, + "line": 989, + "mass": 33.94 + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "name": "Equal", + "cc": 8, + "sloc": 28, + "line": 604, + "mass": 42.33 + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "name": "MapAPITimingToTiming", + "cc": 8, + "sloc": 18, + "line": 272, + "mass": 33.94 + }, + { + "path": "openmeter/progressmanager/entity/progressmanager.go", + "name": "Validate", + "cc": 8, + "sloc": 17, + "line": 45, + "mass": 32.98 + }, + { + "path": "openmeter/server/router/router.go", + "name": "NewRouter", + "cc": 8, + "sloc": 197, + "line": 290, + "mass": 112.29 + }, + { + "path": "openmeter/server/server.go", + "name": "errorHandlerReply", + "cc": 8, + "sloc": 25, + "line": 280, + "mass": 40.0 + }, + { + "path": "openmeter/sink/flushhandler/handler.go", + "name": "NewFlushEventHandler", + "cc": 8, + "sloc": 52, + "line": 61, + "mass": 57.69 + }, + { + "path": "openmeter/sink/flushhandler/handler.go", + "name": "OnFlushSuccess", + "cc": 8, + "sloc": 29, + "line": 214, + "mass": 43.08 + }, + { + "path": "openmeter/sink/sink.go", + "name": "persistToStorage", + "cc": 8, + "sloc": 42, + "line": 430, + "mass": 51.85 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "queryEventsTable", + "cc": 8, + "sloc": 48, + "line": 326, + "mass": 55.43 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "withProgressContext", + "cc": 8, + "sloc": 49, + "line": 612, + "mass": 56.0 + }, + { + "path": "openmeter/streaming/clickhouse/queryhelper.go", + "name": "selectCustomerIdColumn", + "cc": 8, + "sloc": 39, + "line": 15, + "mass": 49.96 + }, + { + "path": "openmeter/streaming/retry/retry.go", + "name": "DeleteNamespace", + "cc": 8, + "sloc": 42, + "line": 126, + "mass": 51.85 + }, + { + "path": "openmeter/streaming/testutils/streaming_test.go", + "name": "TestMockStreamingConnector", + "cc": 8, + "sloc": 493, + "line": 19, + "mass": 177.63 + }, + { + "path": "openmeter/subject/service/hooks/customersubject.go", + "name": "EnsureSubjects", + "cc": 8, + "sloc": 43, + "line": 145, + "mass": 52.46 + }, + { + "path": "openmeter/subscription/addon/service/service.go", + "name": "Validate", + "cc": 8, + "sloc": 24, + "line": 35, + "mass": 39.19 + }, + { + "path": "openmeter/subscription/fielddescriptormapper.go", + "name": "MapSubscriptionSpecValidationIssueField", + "cc": 8, + "sloc": 29, + "line": 19, + "mass": 43.08 + }, + { + "path": "openmeter/subscription/patch/stretchphase_test.go", + "name": "TestStretchPhase", + "cc": 8, + "sloc": 161, + "line": 15, + "mass": 101.51 + }, + { + "path": "openmeter/subscription/repo/subscriptionitemrepo.go", + "name": "Create", + "cc": 8, + "sloc": 44, + "line": 122, + "mass": 53.07 + }, + { + "path": "openmeter/subscription/repo/subscriptionrepo.go", + "name": "Create", + "cc": 8, + "sloc": 41, + "line": 90, + "mass": 51.22 + }, + { + "path": "openmeter/subscription/service/synchelpers.go", + "name": "createItem", + "cc": 8, + "sloc": 57, + "line": 72, + "mass": 60.4 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetCadence", + "cc": 8, + "sloc": 29, + "line": 748, + "mass": 43.08 + }, + { + "path": "openmeter/subscription/timing.go", + "name": "ResolveForSpec", + "cc": 8, + "sloc": 24, + "line": 58, + "mass": 39.19 + }, + { + "path": "openmeter/subscription/validators/subscription/validator.go", + "name": "BeforeContinue", + "cc": 8, + "sloc": 36, + "line": 140, + "mass": 48.0 + }, + { + "path": "openmeter/subscription/workflow/service/subscription.go", + "name": "Restore", + "cc": 8, + "sloc": 41, + "line": 247, + "mass": 51.22 + }, + { + "path": "openmeter/taxcode/namespacehandler.go", + "name": "validate", + "cc": 8, + "sloc": 26, + "line": 34, + "mass": 40.79 + }, + { + "path": "openmeter/taxcode/service/taxcode.go", + "name": "DeleteTaxCode", + "cc": 8, + "sloc": 22, + "line": 123, + "mass": 37.52 + }, + { + "path": "openmeter/taxcode/testutils/env.go", + "name": "Close", + "cc": 8, + "sloc": 20, + "line": 37, + "mass": 35.78 + }, + { + "path": "openmeter/watermill/router/metrics.go", + "name": "NewDLQTelemetryMiddleware", + "cc": 8, + "sloc": 72, + "line": 121, + "mass": 67.88 + }, + { + "path": "openmeter/watermill/router/router.go", + "name": "Validate", + "cc": 8, + "sloc": 23, + "line": 26, + "mass": 38.37 + }, + { + "path": "pkg/framework/clickhouseotel/connpool.go", + "name": "NewConnPoolMetrics", + "cc": 8, + "sloc": 69, + "line": 67, + "mass": 66.45 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "name": "OldField", + "cc": 8, + "sloc": 16, + "line": 377, + "mass": 32.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "sqlScan", + "cc": 8, + "sloc": 20, + "line": 545, + "mass": 35.78 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "name": "OldField", + "cc": 8, + "sloc": 16, + "line": 377, + "mass": 32.0 + }, + { + "path": "pkg/framework/entutils/transaction.go", + "name": "SavePoint", + "cc": 8, + "sloc": 77, + "line": 148, + "mass": 70.2 + }, + { + "path": "pkg/kafka/metrics/metrics.go", + "name": "Add", + "cc": 8, + "sloc": 40, + "line": 49, + "mass": 50.6 + }, + { + "path": "pkg/models/annotation.go", + "name": "Equal", + "cc": 8, + "sloc": 18, + "line": 120, + "mass": 33.94 + }, + { + "path": "pkg/models/problem.go", + "name": "NewStatusProblem", + "cc": 8, + "sloc": 30, + "line": 104, + "mass": 43.82 + }, + { + "path": "pkg/timeutil/closedperiod.go", + "name": "Overlaps", + "cc": 8, + "sloc": 12, + "line": 40, + "mass": 27.71 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "OverlapsInclusive", + "cc": 8, + "sloc": 13, + "line": 280, + "mass": 28.84 + }, + { + "path": "pkg/timeutil/recurrence.go", + "name": "IterateFromNextAfter", + "cc": 8, + "sloc": 21, + "line": 67, + "mass": 36.66 + }, + { + "path": "pkg/timeutil/recurrence.go", + "name": "IterateFromPrevBefore", + "cc": 8, + "sloc": 21, + "line": 169, + "mass": 36.66 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoiceShrinkToZeroThenExtendToNonZero", + "cc": 8, + "sloc": 236, + "line": 1888, + "mass": 122.9 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchDuringFinalRunCollectionKeepsAdvanceNoop", + "cc": 8, + "sloc": 194, + "line": 4275, + "mass": 111.43 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceShrinkExtendShrinkPreservesImmutableRunsAndLedger", + "cc": 8, + "sloc": 344, + "line": 4692, + "mass": 148.38 + }, + { + "path": "tools/migrate/view_parity_test.go", + "name": "buildMigrationsWithoutViews", + "cc": 8, + "sloc": 37, + "line": 105, + "mass": 48.66 + }, + { + "path": "api/client/python/examples/async/query.py", + "name": "main", + "cc": 7, + "sloc": 32, + "line": 11, + "mass": 39.6 + }, + { + "path": "api/client/python/examples/sync/query.py", + "name": "main", + "cc": 7, + "sloc": 28, + "line": 15, + "mass": 37.04 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_get_model", + "cc": 7, + "sloc": 10, + "line": 344, + "mass": 22.14 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_as_dict_value", + "cc": 7, + "sloc": 8, + "line": 786, + "mass": 19.8 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "_unpack_content", + "cc": 7, + "sloc": 29, + "line": 1549, + "mass": 37.7 + }, + { + "path": "api/spec/packages/aip/lib/rules/composition-over-inheritance.js", + "name": "compositionOverInheritanceRule", + "cc": 7, + "sloc": 35, + "line": 10, + "mass": 41.41 + }, + { + "path": "api/spec/packages/aip/lib/rules/operation-id.js", + "name": "operationIdKebabCaseRule", + "cc": 7, + "sloc": 31, + "line": 4, + "mass": 38.97 + }, + { + "path": "api/spec/packages/aip/lib/rules/utils.js", + "name": "isPascalCaseNoAcronyms", + "cc": 7, + "sloc": 13, + "line": 11, + "mass": 25.24 + }, + { + "path": "api/spec/packages/aip/lib/rules/utils.js", + "name": "isCamelCaseNoAcronyms", + "cc": 7, + "sloc": 11, + "line": 26, + "mass": 23.22 + }, + { + "path": "api/spec/packages/aip/lib/rules/utils.js", + "name": "isSnakeCase", + "cc": 7, + "sloc": 11, + "line": 39, + "mass": 23.22 + }, + { + "path": "api/spec/packages/legacy/lib/rules/composition-over-inheritance.js", + "name": "compositionOverInheritanceRule", + "cc": 7, + "sloc": 35, + "line": 10, + "mass": 41.41 + }, + { + "path": "api/spec/packages/legacy/lib/rules/utils.js", + "name": "isPascalCaseNoAcronyms", + "cc": 7, + "sloc": 13, + "line": 11, + "mass": 25.24 + }, + { + "path": "api/spec/packages/legacy/lib/rules/utils.js", + "name": "isCamelCaseNoAcronyms", + "cc": 7, + "sloc": 11, + "line": 26, + "mass": 23.22 + }, + { + "path": "api/spec/packages/legacy/lib/rules/utils.js", + "name": "isSnakeCase", + "cc": 7, + "sloc": 11, + "line": 39, + "mass": 23.22 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 7, + "sloc": 19, + "line": 320, + "mass": 30.51 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 7, + "sloc": 21, + "line": 395, + "mass": 32.08 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 7, + "sloc": 19, + "line": 608, + "mass": 30.51 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 7, + "sloc": 20, + "line": 779, + "mass": 31.3 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 7, + "sloc": 19, + "line": 1154, + "mass": 30.51 + }, + { + "path": "api/v3/api.gen.go", + "name": "ListCustomerCharges", + "cc": 7, + "sloc": 44, + "line": 8319, + "mass": 46.43 + }, + { + "path": "api/v3/apierrors/errors.go", + "name": "Error", + "cc": 7, + "sloc": 15, + "line": 153, + "mass": 27.11 + }, + { + "path": "api/v3/apierrors/handler.go", + "name": "enrichFieldFromBindError", + "cc": 7, + "sloc": 29, + "line": 142, + "mass": 37.7 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseTextUnmarshalerPtr", + "cc": 7, + "sloc": 27, + "line": 260, + "mass": 36.37 + }, + { + "path": "api/v3/filters/parse.go", + "name": "forEachFieldParam", + "cc": 7, + "sloc": 26, + "line": 610, + "mass": 35.69 + }, + { + "path": "api/v3/filters/parse.go", + "name": "checkUnknownFilterKeys", + "cc": 7, + "sloc": 29, + "line": 674, + "mass": 37.7 + }, + { + "path": "api/v3/handlers/currencies/get_cost_bases.go", + "name": "ListCostBases", + "cc": 7, + "sloc": 60, + "line": 31, + "mass": 54.22 + }, + { + "path": "api/v3/handlers/customers/billing/convert.gen.go", + "name": "pV3BillingAppStripeCreateCheckoutSessionConsentCollectionToPApiCreateStripeCheckoutSessionConsentCollection", + "cc": 7, + "sloc": 27, + "line": 235, + "mass": 36.37 + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "name": "toAPIBillingCreditGrantStatus", + "cc": 7, + "sloc": 14, + "line": 70, + "mass": 26.19 + }, + { + "path": "api/v3/handlers/customers/entitlementaccess/mapping.go", + "name": "mapEntitlementValueToAPI", + "cc": 7, + "sloc": 31, + "line": 14, + "mass": 38.97 + }, + { + "path": "api/v3/handlers/meters/convert.go", + "name": "ToAPIMeterQueryRow", + "cc": 7, + "sloc": 23, + "line": 146, + "mass": 33.57 + }, + { + "path": "api/v3/handlers/plans/planaddons/lists.go", + "name": "ListPlanAddons", + "cc": 7, + "sloc": 56, + "line": 28, + "mass": 52.38 + }, + { + "path": "api/v3/handlers/plans/planaddons/update.go", + "name": "UpdatePlanAddon", + "cc": 7, + "sloc": 47, + "line": 28, + "mass": 47.99 + }, + { + "path": "api/v3/handlers/taxcodes/list.go", + "name": "ListTaxCodes", + "cc": 7, + "sloc": 58, + "line": 25, + "mass": 53.31 + }, + { + "path": "api/v3/oasmiddleware/error.go", + "name": "unwrapOriginError", + "cc": 7, + "sloc": 24, + "line": 94, + "mass": 34.29 + }, + { + "path": "api/v3/oasmiddleware/router.go", + "name": "NewValidationRouter", + "cc": 7, + "sloc": 29, + "line": 26, + "mass": 37.7 + }, + { + "path": "api/v3/render/render.go", + "name": "WithContentType", + "cc": 7, + "sloc": 40, + "line": 35, + "mass": 44.27 + }, + { + "path": "app/common/termination.go", + "name": "WaitForPropagation", + "cc": 7, + "sloc": 23, + "line": 90, + "mass": 33.57 + }, + { + "path": "app/config/events.go", + "name": "Validate", + "cc": 7, + "sloc": 19, + "line": 187, + "mass": 30.51 + }, + { + "path": "app/config/server.go", + "name": "Validate", + "cc": 7, + "sloc": 20, + "line": 49, + "mass": 31.3 + }, + { + "path": "app/config/telemetry.go", + "name": "Export", + "cc": 7, + "sloc": 31, + "line": 560, + "mass": 38.97 + }, + { + "path": "cmd/jobs/ledger/service/customer_lister_ent.go", + "name": "ListCustomers", + "cc": 7, + "sloc": 36, + "line": 22, + "mass": 42.0 + }, + { + "path": "collector/benthos/input/prometheus.go", + "name": "ReadBatch", + "cc": 7, + "sloc": 40, + "line": 328, + "mass": 44.27 + }, + { + "path": "collector/benthos/input/run_ai.go", + "name": "ReadBatch", + "cc": 7, + "sloc": 41, + "line": 381, + "mass": 44.82 + }, + { + "path": "collector/benthos/services/leaderelection/service.go", + "name": "GetLeaderElectionCLIOpts", + "cc": 7, + "sloc": 45, + "line": 178, + "mass": 46.96 + }, + { + "path": "e2e/helpers.go", + "name": "QueryMeterV3", + "cc": 7, + "sloc": 35, + "line": 67, + "mass": 41.41 + }, + { + "path": "e2e/v3helpers_test.go", + "name": "ValidationErrors", + "cc": 7, + "sloc": 19, + "line": 95, + "mass": 30.51 + }, + { + "path": "openmeter/apiconverter/filter.gen.go", + "name": "filterFilterStringToApiFilterString", + "cc": 7, + "sloc": 36, + "line": 231, + "mass": 42.0 + }, + { + "path": "openmeter/app/appbase.go", + "name": "ValidateCapabilities", + "cc": 7, + "sloc": 20, + "line": 92, + "mass": 31.3 + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "name": "DeleteCustomerData", + "cc": 7, + "sloc": 54, + "line": 204, + "mass": 51.44 + }, + { + "path": "openmeter/app/stripe/adapter/customer.go", + "name": "createStripeCustomer", + "cc": 7, + "sloc": 51, + "line": 233, + "mass": 49.99 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "GetWebhookSecret", + "cc": 7, + "sloc": 36, + "line": 241, + "mass": 42.0 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "SetCustomerDefaultPaymentMethod", + "cc": 7, + "sloc": 57, + "line": 283, + "mass": 52.85 + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "name": "addResultExternalIDs", + "cc": 7, + "sloc": 31, + "line": 699, + "mass": 38.97 + }, + { + "path": "openmeter/app/stripe/client/appclient.go", + "name": "DeleteWebhook", + "cc": 7, + "sloc": 18, + "line": 147, + "mass": 29.7 + }, + { + "path": "openmeter/app/stripe/client/invoice.go", + "name": "CreateInvoice", + "cc": 7, + "sloc": 45, + "line": 19, + "mass": 46.96 + }, + { + "path": "openmeter/app/stripe/client/invoice_line.go", + "name": "ListInvoiceLineItems", + "cc": 7, + "sloc": 22, + "line": 15, + "mass": 32.83 + }, + { + "path": "openmeter/app/stripe/client/portal.go", + "name": "Validate", + "cc": 7, + "sloc": 14, + "line": 23, + "mass": 26.19 + }, + { + "path": "openmeter/app/stripe/types.go", + "name": "Validate", + "cc": 7, + "sloc": 18, + "line": 174, + "mass": 29.7 + }, + { + "path": "openmeter/billing/adapter/customeroverride.go", + "name": "GetCustomerOverride", + "cc": 7, + "sloc": 37, + "line": 128, + "mass": 42.58 + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "name": "mapStandardInvoiceFromDB", + "cc": 7, + "sloc": 61, + "line": 719, + "mass": 54.67 + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "name": "IsAppUsed", + "cc": 7, + "sloc": 57, + "line": 834, + "mass": 52.85 + }, + { + "path": "openmeter/billing/adapter/invoicelinesplitgroup.go", + "name": "expandSplitLineHierarchy", + "cc": 7, + "sloc": 24, + "line": 275, + "mass": 34.29 + }, + { + "path": "openmeter/billing/adapter/profile.go", + "name": "createWorkflowConfig", + "cc": 7, + "sloc": 35, + "line": 91, + "mass": 41.41 + }, + { + "path": "openmeter/billing/adapter/seq.go", + "name": "NextSequenceNumber", + "cc": 7, + "sloc": 50, + "line": 16, + "mass": 49.5 + }, + { + "path": "openmeter/billing/charges/creditpurchase/charge.go", + "name": "Validate", + "cc": 7, + "sloc": 19, + "line": 214, + "mass": 30.51 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/invoice.go", + "name": "PostInvoicePaymentSettled", + "cc": 7, + "sloc": 32, + "line": 91, + "mass": 39.6 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/promotional.go", + "name": "grantPromotionalCredit", + "cc": 7, + "sloc": 30, + "line": 14, + "mass": 38.34 + }, + { + "path": "openmeter/billing/charges/creditpurchase/settlement.go", + "name": "GetCostBasis", + "cc": 7, + "sloc": 18, + "line": 310, + "mass": 29.7 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "CreateCharges", + "cc": 7, + "sloc": 40, + "line": 152, + "mass": 44.27 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "GetByIDs", + "cc": 7, + "sloc": 33, + "line": 198, + "mass": 40.21 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "GetByID", + "cc": 7, + "sloc": 28, + "line": 239, + "mass": 37.04 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/mapper.go", + "name": "mapRealizationRunFromDB", + "cc": 7, + "sloc": 29, + "line": 90, + "mass": 37.7 + }, + { + "path": "openmeter/billing/charges/flatfee/charge.go", + "name": "CalculateAmountAfterProration", + "cc": 7, + "sloc": 22, + "line": 180, + "mass": 32.83 + }, + { + "path": "openmeter/billing/charges/flatfee/charge.go", + "name": "GetByLineID", + "cc": 7, + "sloc": 13, + "line": 242, + "mass": 25.24 + }, + { + "path": "openmeter/billing/charges/flatfee/service/create.go", + "name": "buildFlatFeeGatheringLine", + "cc": 7, + "sloc": 69, + "line": 128, + "mass": 58.15 + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditheninvoice.go", + "name": "DeleteCharge", + "cc": 7, + "sloc": 28, + "line": 147, + "mass": 37.04 + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditsonly.go", + "name": "DeleteCharge", + "cc": 7, + "sloc": 23, + "line": 121, + "mass": 33.57 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "getChargesForStandardLineEvent", + "cc": 7, + "sloc": 28, + "line": 350, + "mass": 37.04 + }, + { + "path": "openmeter/billing/charges/flatfee/service/payment.go", + "name": "validatePaymentRunForLine", + "cc": 7, + "sloc": 12, + "line": 165, + "mass": 24.25 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "name": "rateFlatFeeLine", + "cc": 7, + "sloc": 30, + "line": 334, + "mass": 38.34 + }, + { + "path": "openmeter/billing/charges/flatfee/service/service.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 27, + "mass": 32.83 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/patch.go", + "name": "Log", + "cc": 7, + "sloc": 16, + "line": 146, + "mass": 28.0 + }, + { + "path": "openmeter/billing/charges/meta/adapter/charges.go", + "name": "RegisterCharges", + "cc": 7, + "sloc": 31, + "line": 15, + "mass": 38.97 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/correction_test.go", + "name": "TestCorrectionEndToEnd", + "cc": 7, + "sloc": 131, + "line": 775, + "mass": 80.12 + }, + { + "path": "openmeter/billing/charges/service/recognition.go", + "name": "recognizeCreatedCreditPurchaseEarnings", + "cc": 7, + "sloc": 28, + "line": 31, + "mass": 37.04 + }, + { + "path": "openmeter/billing/charges/service/taxcode_test.go", + "name": "TestTaxConfigInListCharges", + "cc": 7, + "sloc": 122, + "line": 793, + "mass": 77.32 + }, + { + "path": "openmeter/billing/charges/usagebased/charge.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 205, + "mass": 32.83 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "FinalizeInvoiceRun", + "cc": 7, + "sloc": 32, + "line": 697, + "mass": 39.6 + }, + { + "path": "openmeter/billing/charges/usagebased/service/currenttotals.go", + "name": "GetCurrentTotals", + "cc": 7, + "sloc": 47, + "line": 15, + "mass": 47.99 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "getChargesForStandardLineEvent", + "cc": 7, + "sloc": 28, + "line": 463, + "mass": 37.04 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/totals.go", + "name": "Validate", + "cc": 7, + "sloc": 17, + "line": 23, + "mass": 28.86 + }, + { + "path": "openmeter/billing/charges/usagebased/service/triggers.go", + "name": "TriggerPatch", + "cc": 7, + "sloc": 30, + "line": 50, + "mass": 38.34 + }, + { + "path": "openmeter/billing/charges/usagebased/service/triggers.go", + "name": "newStateMachine", + "cc": 7, + "sloc": 23, + "line": 90, + "mass": 33.57 + }, + { + "path": "openmeter/billing/creditgrant/service.go", + "name": "Validate", + "cc": 7, + "sloc": 20, + "line": 177, + "mass": 31.3 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualAmountLineDiscount", + "cc": 7, + "sloc": 8, + "line": 45, + "mass": 19.8 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual_3", + "cc": 7, + "sloc": 15, + "line": 156, + "mass": 27.11 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqual_4", + "cc": 7, + "sloc": 7, + "line": 172, + "mass": 18.52 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "AsNewStandardLine", + "cc": 7, + "sloc": 51, + "line": 710, + "mass": 49.99 + }, + { + "path": "openmeter/billing/httpdriver/customeroverride.go", + "name": "mapCustomerOverrideToAPI", + "cc": 7, + "sloc": 30, + "line": 256, + "mass": 38.34 + }, + { + "path": "openmeter/billing/httpdriver/gatheringinvoice.go", + "name": "MapGatheringInvoiceToAPI", + "cc": 7, + "sloc": 59, + "line": 17, + "mass": 53.77 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "DeleteInvoice", + "cc": 7, + "sloc": 49, + "line": 349, + "mass": 49.0 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "MapInvoiceToAPI", + "cc": 7, + "sloc": 29, + "line": 544, + "mass": 37.7 + }, + { + "path": "openmeter/billing/invoicedetailedline.go", + "name": "WithCreditsApplied", + "cc": 7, + "sloc": 34, + "line": 134, + "mass": 40.82 + }, + { + "path": "openmeter/billing/invoicelinediscount.go", + "name": "ReuseIDsFrom", + "cc": 7, + "sloc": 47, + "line": 359, + "mass": 47.99 + }, + { + "path": "openmeter/billing/invoicelinesplitgroup.go", + "name": "UnmarshalJSON", + "cc": 7, + "sloc": 28, + "line": 228, + "mass": 37.04 + }, + { + "path": "openmeter/billing/lineengine/stdinvoice.go", + "name": "CalculateLines", + "cc": 7, + "sloc": 21, + "line": 58, + "mass": 32.08 + }, + { + "path": "openmeter/billing/models/stddetailedline/derived.gen.go", + "name": "deriveEqual_", + "cc": 7, + "sloc": 15, + "line": 40, + "mass": 27.11 + }, + { + "path": "openmeter/billing/models/stddetailedline/derived.gen.go", + "name": "deriveEqual_1", + "cc": 7, + "sloc": 7, + "line": 56, + "mass": 18.52 + }, + { + "path": "openmeter/billing/profile.go", + "name": "Validate", + "cc": 7, + "sloc": 21, + "line": 86, + "mass": 32.08 + }, + { + "path": "openmeter/billing/rating/service/billableperiod.go", + "name": "isDependingOnIncreaseOnlyMeters", + "cc": 7, + "sloc": 23, + "line": 57, + "mass": 33.57 + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated.go", + "name": "Validate", + "cc": 7, + "sloc": 21, + "line": 112, + "mass": 32.08 + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated.go", + "name": "splitTierRangeAtBoundary", + "cc": 7, + "sloc": 41, + "line": 140, + "mass": 44.82 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "InvoicePendingLines", + "cc": 7, + "sloc": 40, + "line": 49, + "mass": 44.27 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "invokePostCreationHooks", + "cc": 7, + "sloc": 21, + "line": 905, + "mass": 32.08 + }, + { + "path": "openmeter/billing/service/invoicecalc/collectionat.go", + "name": "calculateGatheringInvoiceNextCollectionAt", + "cc": 7, + "sloc": 24, + "line": 42, + "mass": 34.29 + }, + { + "path": "openmeter/billing/service/invoicecalc/collectionat.go", + "name": "StandardInvoiceCollectionAt", + "cc": 7, + "sloc": 21, + "line": 73, + "mass": 32.08 + }, + { + "path": "openmeter/billing/service/invoicecalc/dueat.go", + "name": "CalculateDueAt", + "cc": 7, + "sloc": 22, + "line": 11, + "mass": 32.83 + }, + { + "path": "openmeter/billing/service/invoicecalc/mock.go", + "name": "AssertExpectations", + "cc": 7, + "sloc": 12, + "line": 79, + "mass": 24.25 + }, + { + "path": "openmeter/billing/service/invoicecalc/taxconfig.go", + "name": "SnapshotTaxConfigIntoLines", + "cc": 7, + "sloc": 20, + "line": 12, + "mass": 31.3 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "DeleteProfile", + "cc": 7, + "sloc": 44, + "line": 161, + "mass": 46.43 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "Validate", + "cc": 7, + "sloc": 12, + "line": 489, + "mass": 24.25 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "handleDefaultProfileChange", + "cc": 7, + "sloc": 43, + "line": 505, + "mass": 45.9 + }, + { + "path": "openmeter/billing/service/quantitysnapshot.go", + "name": "getFeatureUsage", + "cc": 7, + "sloc": 60, + "line": 192, + "mass": 54.22 + }, + { + "path": "openmeter/billing/service/stdinvoice.go", + "name": "GetStandardInvoiceById", + "cc": 7, + "sloc": 29, + "line": 42, + "mass": 37.7 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "triggerPostAdvanceHooks", + "cc": 7, + "sloc": 26, + "line": 659, + "mass": 35.69 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "DetailedLinesWithIDReuse", + "cc": 7, + "sloc": 34, + "line": 837, + "mass": 40.82 + }, + { + "path": "openmeter/billing/taxconfig.go", + "name": "MergeTaxConfigs", + "cc": 7, + "sloc": 24, + "line": 111, + "mass": 34.29 + }, + { + "path": "openmeter/billing/worker/advance/advance.go", + "name": "All", + "cc": 7, + "sloc": 43, + "line": 23, + "mass": 45.9 + }, + { + "path": "openmeter/billing/worker/collect/collect.go", + "name": "CollectCustomerInvoice", + "cc": 7, + "sloc": 30, + "line": 98, + "mass": 38.34 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/adapter.go", + "name": "Validate", + "cc": 7, + "sloc": 16, + "line": 37, + "mass": 28.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "assertCharges", + "cc": 7, + "sloc": 51, + "line": 417, + "mass": 49.99 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "assertChargePaymentLedgerTransactions", + "cc": 7, + "sloc": 23, + "line": 637, + "mass": 33.57 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/handlers.go", + "name": "HandleInvoiceCreation", + "cc": 7, + "sloc": 30, + "line": 45, + "mass": 38.34 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "updateGatheringInvoice", + "cc": 7, + "sloc": 28, + "line": 369, + "mass": 37.04 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "upsertSplitLineGroups", + "cc": 7, + "sloc": 16, + "line": 533, + "mass": 28.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go", + "name": "Log", + "cc": 7, + "sloc": 16, + "line": 143, + "mass": 28.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "name": "filterInScopeLines", + "cc": 7, + "sloc": 25, + "line": 184, + "mass": 35.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/service.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 41, + "mass": 32.83 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "name": "TestDiscountSynchronizationWithPartialDiscount", + "cc": 7, + "sloc": 251, + "line": 5788, + "mass": 110.9 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go", + "name": "shouldProrate", + "cc": 7, + "sloc": 18, + "line": 136, + "mass": 29.7 + }, + { + "path": "openmeter/credit/engine/run.go", + "name": "burnDownGrants", + "cc": 7, + "sloc": 36, + "line": 273, + "mass": 42.0 + }, + { + "path": "openmeter/currencies/models.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 56, + "mass": 32.83 + }, + { + "path": "openmeter/currencies/service/service_test.go", + "name": "TestListCurrencies_CombinedPath", + "cc": 7, + "sloc": 127, + "line": 66, + "mass": 78.89 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "DeleteCustomer", + "cc": 7, + "sloc": 48, + "line": 280, + "mass": 48.5 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "GetCustomerAccess", + "cc": 7, + "sloc": 44, + "line": 527, + "mass": 46.43 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "GetCustomerAccessV2", + "cc": 7, + "sloc": 45, + "line": 577, + "mass": 46.96 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 349, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 718, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 726, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/addon_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 345, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/addon_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 903, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 383, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 865, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 732, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 978, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1028, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 600, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 650, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 655, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 513, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 648, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 707, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1332, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 732, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1337, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 135, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 314, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 893, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 2054, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadChargeFlatFeeRunPayment", + "cc": 7, + "sloc": 27, + "line": 1618, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "loadChargeCreditPurchaseInvoicedPayment", + "cc": 7, + "sloc": 27, + "line": 1738, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1956, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 314, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "name": "String", + "cc": 7, + "sloc": 56, + "line": 223, + "mass": 52.38 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 272, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 450, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 972, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 368, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 932, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 185, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 145, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 348, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 955, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_create.go", + "name": "check", + "cc": 7, + "sloc": 17, + "line": 76, + "mass": 28.86 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "name": "String", + "cc": 7, + "sloc": 116, + "line": 457, + "mass": 75.39 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1944, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 808, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "name": "String", + "cc": 7, + "sloc": 56, + "line": 223, + "mass": 52.38 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 272, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 39, + "line": 371, + "mass": 43.71 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 578, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "loadBillingInvoices", + "cc": 7, + "sloc": 27, + "line": 496, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "loadBillingProfile", + "cc": 7, + "sloc": 27, + "line": 523, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 720, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/charge.go", + "name": "CreditRealizationLineagesOrErr", + "cc": 7, + "sloc": 23, + "line": 118, + "mass": 33.57 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 971, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 610, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadExternalPayment", + "cc": 7, + "sloc": 27, + "line": 754, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadInvoicedPayment", + "cc": 7, + "sloc": 27, + "line": 781, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "loadCreditGrant", + "cc": 7, + "sloc": 27, + "line": 808, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1172, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 679, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1047, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 646, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1191, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 998, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadInvoicedUsage", + "cc": 7, + "sloc": 27, + "line": 827, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "loadPayment", + "cc": 7, + "sloc": 27, + "line": 854, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1025, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 814, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "name": "String", + "cc": 7, + "sloc": 116, + "line": 422, + "mass": 75.39 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 1166, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 654, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1093, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 421, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 641, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1264, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 736, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 2024, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 806, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1093, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadInvoicedUsage", + "cc": 7, + "sloc": 27, + "line": 977, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "loadPayment", + "cc": 7, + "sloc": 27, + "line": 1004, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1178, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 653, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 771, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/customcurrency.go", + "name": "CostBasisHistoryOrErr", + "cc": 7, + "sloc": 23, + "line": 51, + "mass": 33.57 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 693, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 40, + "line": 372, + "mass": 44.27 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 578, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/customcurrency_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 164, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/customcurrency_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 415, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "loadBillingCustomerOverride", + "cc": 7, + "sloc": 27, + "line": 826, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1168, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/customer_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 681, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/customer_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 1858, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 527, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 466, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 953, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1035, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/feature_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 573, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/feature_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 1529, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 688, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 652, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord.go", + "name": "String", + "cc": 7, + "sloc": 83, + "line": 272, + "mass": 63.77 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 429, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 726, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute.go", + "name": "String", + "cc": 7, + "sloc": 62, + "line": 257, + "mass": 55.12 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 653, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 407, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "check", + "cc": 7, + "sloc": 17, + "line": 161, + "mass": 28.86 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 40, + "line": 372, + "mass": 44.27 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 578, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 363, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 38, + "line": 372, + "mass": 43.15 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 579, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 246, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 864, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 38, + "line": 372, + "mass": 43.15 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 607, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationchannel_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 210, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/notificationchannel_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 527, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/notificationevent/notificationevent.go", + "name": "ValidColumn", + "cc": 7, + "sloc": 17, + "line": 69, + "mass": 28.86 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 371, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 684, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 502, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 40, + "line": 372, + "mass": 44.27 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 609, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 262, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 896, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 681, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/notificationrule_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 247, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/notificationrule_update.go", + "name": "check", + "cc": 7, + "sloc": 13, + "line": 645, + "mass": 25.24 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 650, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 14, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 72, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 130, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 188, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 246, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 304, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 362, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 420, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 478, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 536, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 594, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 652, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 710, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 768, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 826, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 884, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 942, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1000, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1058, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1116, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1174, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1232, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1290, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1348, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1406, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1464, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1522, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1580, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1638, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1696, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1754, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1812, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1870, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1928, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 1986, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2044, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2102, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2160, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2218, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2276, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2334, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2392, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2450, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2508, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2566, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2624, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2682, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2740, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2798, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2856, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2914, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 2972, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3030, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3088, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3146, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3204, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3262, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3320, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3378, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3436, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3494, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3552, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3610, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3668, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3726, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3784, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3842, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3900, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 3958, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4016, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4074, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4132, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4190, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4248, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4306, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4364, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4422, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4480, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 46, + "line": 4538, + "mass": 47.48 + }, + { + "path": "openmeter/ent/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 44, + "line": 4596, + "mass": 46.43 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "defaults", + "cc": 7, + "sloc": 27, + "line": 286, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 378, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 757, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 727, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 502, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 926, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 651, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 383, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 865, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 732, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "ChargeCreditPurchaseOrErr", + "cc": 7, + "sloc": 18, + "line": 179, + "mass": 29.7 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "SubscriptionOrErr", + "cc": 7, + "sloc": 18, + "line": 416, + "mass": 29.7 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "defaults", + "cc": 7, + "sloc": 27, + "line": 396, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 494, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "loadBillingSyncState", + "cc": 7, + "sloc": 27, + "line": 1097, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1265, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 438, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 728, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go", + "name": "ValidColumn", + "cc": 7, + "sloc": 19, + "line": 49, + "mass": 30.51 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 512, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 27, + "line": 1188, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1129, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1047, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "sqlSave", + "cc": 7, + "sloc": 25, + "line": 457, + "mass": 35.0 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "UpdateNewValues", + "cc": 7, + "sloc": 26, + "line": 1312, + "mass": 35.69 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 1675, + "mass": 36.37 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "sqlAll", + "cc": 7, + "sloc": 37, + "line": 371, + "mass": 42.58 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 576, + "mass": 36.37 + }, + { + "path": "openmeter/entitlement/adapter/entitlement_test.go", + "name": "setup", + "cc": 7, + "sloc": 49, + "line": 48, + "mass": 49.0 + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "name": "NewRecalculator", + "cc": 7, + "sloc": 43, + "line": 119, + "mass": 45.9 + }, + { + "path": "openmeter/entitlement/balanceworker/subject_customer.go", + "name": "resolveCustomerAndSubject", + "cc": 7, + "sloc": 43, + "line": 14, + "mass": 45.9 + }, + { + "path": "openmeter/entitlement/balanceworker/worker.go", + "name": "New", + "cc": 7, + "sloc": 52, + "line": 138, + "mass": 50.48 + }, + { + "path": "openmeter/entitlement/driver/entitlement.go", + "name": "CreateEntitlement", + "cc": 7, + "sloc": 60, + "line": 77, + "mass": 54.22 + }, + { + "path": "openmeter/entitlement/driver/entitlement.go", + "name": "OverrideEntitlement", + "cc": 7, + "sloc": 47, + "line": 147, + "mass": 47.99 + }, + { + "path": "openmeter/entitlement/driver/errors.go", + "name": "GetErrorEncoder", + "cc": 7, + "sloc": 18, + "line": 14, + "mass": 29.7 + }, + { + "path": "openmeter/entitlement/driver/metered.go", + "name": "GetEntitlementBalanceHistory", + "cc": 7, + "sloc": 78, + "line": 290, + "mass": 61.82 + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "name": "MapEntitlementValueToAPI", + "cc": 7, + "sloc": 31, + "line": 185, + "mass": 38.97 + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "name": "MapAPIPeriodIntervalToRecurrence", + "cc": 7, + "sloc": 19, + "line": 382, + "mass": 30.51 + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "name": "DeleteCustomerEntitlement", + "cc": 7, + "sloc": 62, + "line": 279, + "mass": 55.12 + }, + { + "path": "openmeter/entitlement/driver/v2/customer_metered.go", + "name": "ListCustomerEntitlementGrants", + "cc": 7, + "sloc": 76, + "line": 40, + "mass": 61.02 + }, + { + "path": "openmeter/entitlement/driver/v2/customer_metered.go", + "name": "ResetCustomerEntitlementUsage", + "cc": 7, + "sloc": 56, + "line": 321, + "mass": 52.38 + }, + { + "path": "openmeter/entitlement/metered/lateevents_test.go", + "name": "TestGetEntitlementBalanceConsistency", + "cc": 7, + "sloc": 202, + "line": 70, + "mass": 99.49 + }, + { + "path": "openmeter/entitlement/usageperiod.go", + "name": "GetCurrentPeriodAt", + "cc": 7, + "sloc": 26, + "line": 154, + "mass": 35.69 + }, + { + "path": "openmeter/ingest/kafkaingest/collector.go", + "name": "NewCollector", + "cc": 7, + "sloc": 38, + "line": 51, + "mass": 43.15 + }, + { + "path": "openmeter/ledger/account/account.go", + "name": "NewAccountFromData", + "cc": 7, + "sloc": 22, + "line": 29, + "mass": 32.83 + }, + { + "path": "openmeter/ledger/account/adapter/subaccount.go", + "name": "EnsureSubAccount", + "cc": 7, + "sloc": 45, + "line": 21, + "mass": 46.96 + }, + { + "path": "openmeter/ledger/breakage/adapter/record.go", + "name": "ListExpiredRecords", + "cc": 7, + "sloc": 36, + "line": 149, + "mass": 42.0 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "ValidateForReference", + "cc": 7, + "sloc": 25, + "line": 255, + "mass": 35.0 + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "name": "OnCreditPurchasePaymentAuthorized", + "cc": 7, + "sloc": 50, + "line": 70, + "mass": 49.5 + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee.go", + "name": "OnPaymentAuthorized", + "cc": 7, + "sloc": 46, + "line": 174, + "mass": 47.48 + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee.go", + "name": "OnPaymentSettled", + "cc": 7, + "sloc": 48, + "line": 227, + "mass": 48.5 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "resolveAdvanceBackfillBreakageReopenInputs", + "cc": 7, + "sloc": 40, + "line": 450, + "mass": 44.27 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "correctedFBOEntriesForAmount", + "cc": 7, + "sloc": 26, + "line": 574, + "mass": 35.69 + }, + { + "path": "openmeter/ledger/collector/service.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 38, + "mass": 32.83 + }, + { + "path": "openmeter/ledger/customerbalance/merge.go", + "name": "mergeSortedLists", + "cc": 7, + "sloc": 39, + "line": 52, + "mass": 43.71 + }, + { + "path": "openmeter/ledger/historical/adapter/ledger.go", + "name": "BookTransaction", + "cc": 7, + "sloc": 76, + "line": 91, + "mass": 61.02 + }, + { + "path": "openmeter/ledger/primitives.go", + "name": "Compare", + "cc": 7, + "sloc": 15, + "line": 119, + "mass": 27.11 + }, + { + "path": "openmeter/ledger/recognizer/service.go", + "name": "Validate", + "cc": 7, + "sloc": 22, + "line": 30, + "mass": 32.83 + }, + { + "path": "openmeter/ledger/resolvers/account.go", + "name": "EnsureBusinessAccounts", + "cc": 7, + "sloc": 26, + "line": 168, + "mass": 35.69 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "requireMatchingRouteFields", + "cc": 7, + "sloc": 31, + "line": 468, + "mass": 38.97 + }, + { + "path": "openmeter/ledger/validations.go", + "name": "ValidateTransactionInputWith", + "cc": 7, + "sloc": 23, + "line": 93, + "mass": 33.57 + }, + { + "path": "openmeter/llmcost/llmcost.go", + "name": "Validate", + "cc": 7, + "sloc": 20, + "line": 109, + "mass": 31.3 + }, + { + "path": "openmeter/llmcost/service.go", + "name": "Validate", + "cc": 7, + "sloc": 20, + "line": 186, + "mass": 31.3 + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "name": "findAgreement", + "cc": 7, + "sloc": 20, + "line": 141, + "mass": 31.3 + }, + { + "path": "openmeter/llmcost/sync/sync.go", + "name": "deduplicateSourcePrices", + "cc": 7, + "sloc": 23, + "line": 99, + "mass": 33.57 + }, + { + "path": "openmeter/meter/httphandler/mapping.go", + "name": "getFilterCustomer", + "cc": 7, + "sloc": 28, + "line": 201, + "mass": 37.04 + }, + { + "path": "openmeter/meter/meter.go", + "name": "AddTo", + "cc": 7, + "sloc": 16, + "line": 101, + "mass": 28.0 + }, + { + "path": "openmeter/meter/service.go", + "name": "Validate", + "cc": 7, + "sloc": 18, + "line": 225, + "mass": 29.7 + }, + { + "path": "openmeter/meter/service/manage.go", + "name": "CreateMeter", + "cc": 7, + "sloc": 29, + "line": 49, + "mass": 37.7 + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "name": "listCustomers", + "cc": 7, + "sloc": 32, + "line": 140, + "mass": 39.6 + }, + { + "path": "openmeter/notification/rule.go", + "name": "Validate", + "cc": 7, + "sloc": 26, + "line": 183, + "mass": 35.69 + }, + { + "path": "openmeter/notification/service/channel.go", + "name": "CreateChannel", + "cc": 7, + "sloc": 60, + "line": 24, + "mass": 54.22 + }, + { + "path": "openmeter/notification/service/rule.go", + "name": "DeleteRule", + "cc": 7, + "sloc": 30, + "line": 140, + "mass": 38.34 + }, + { + "path": "openmeter/notification/webhook/svix/internal/error.go", + "name": "WrapSvixError", + "cc": 7, + "sloc": 36, + "line": 68, + "mass": 42.0 + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "name": "GetOrUpdateEndpointSecret", + "cc": 7, + "sloc": 38, + "line": 75, + "mass": 43.15 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "FromPlanRow", + "cc": 7, + "sloc": 40, + "line": 211, + "mass": 44.27 + }, + { + "path": "openmeter/productcatalog/addon/httpdriver/mapping.go", + "name": "FromAddon", + "cc": 7, + "sloc": 39, + "line": 16, + "mass": 43.71 + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "name": "ArchiveAddon", + "cc": 7, + "sloc": 54, + "line": 496, + "mass": 51.44 + }, + { + "path": "openmeter/productcatalog/discount.go", + "name": "Validate", + "cc": 7, + "sloc": 29, + "line": 167, + "mass": 37.7 + }, + { + "path": "openmeter/productcatalog/driver/errors.go", + "name": "getErrorEncoder", + "cc": 7, + "sloc": 11, + "line": 14, + "mass": 23.22 + }, + { + "path": "openmeter/productcatalog/driver/parser.go", + "name": "enrichFeatureResponseWithPricing", + "cc": 7, + "sloc": 27, + "line": 215, + "mass": 36.37 + }, + { + "path": "openmeter/productcatalog/effectiveperiod.go", + "name": "ValidateEffectivePeriod", + "cc": 7, + "sloc": 23, + "line": 43, + "mass": 33.57 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Validate", + "cc": 7, + "sloc": 25, + "line": 330, + "mass": 35.0 + }, + { + "path": "openmeter/productcatalog/featureresolver/resolver.go", + "name": "BatchResolve", + "cc": 7, + "sloc": 32, + "line": 118, + "mass": 39.6 + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "name": "AsPriceTier", + "cc": 7, + "sloc": 33, + "line": 761, + "mass": 40.21 + }, + { + "path": "openmeter/productcatalog/phase.go", + "name": "Validate", + "cc": 7, + "sloc": 24, + "line": 60, + "mass": 34.29 + }, + { + "path": "openmeter/productcatalog/plan/adapter/mapping.go", + "name": "fromPlanPhaseRow", + "cc": 7, + "sloc": 49, + "line": 229, + "mass": 49.0 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/mapping.go", + "name": "FromPlanAddonRow", + "cc": 7, + "sloc": 56, + "line": 17, + "mass": 52.38 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "name": "GetPlanAddon", + "cc": 7, + "sloc": 48, + "line": 283, + "mass": 48.5 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Clone", + "cc": 7, + "sloc": 18, + "line": 103, + "mass": 29.7 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "FromPackage", + "cc": 7, + "sloc": 25, + "line": 372, + "mass": 35.0 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "GetCommitments", + "cc": 7, + "sloc": 16, + "line": 401, + "mass": 28.0 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 7, + "sloc": 15, + "line": 444, + "mass": 27.11 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 7, + "sloc": 15, + "line": 503, + "mass": 27.11 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Equal", + "cc": 7, + "sloc": 16, + "line": 919, + "mass": 28.0 + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "name": "CustomPlanToCreatePlanRequest", + "cc": 7, + "sloc": 42, + "line": 458, + "mass": 45.37 + }, + { + "path": "openmeter/productcatalog/subscription/service/plan.go", + "name": "getPlanByVersion", + "cc": 7, + "sloc": 21, + "line": 18, + "mass": 32.08 + }, + { + "path": "openmeter/productcatalog/subscription/service/plan.go", + "name": "PlanFromPlanInput", + "cc": 7, + "sloc": 30, + "line": 44, + "mass": 38.34 + }, + { + "path": "openmeter/productcatalog/subscription/testutils/adapter.go", + "name": "GetVersion", + "cc": 7, + "sloc": 26, + "line": 43, + "mass": 35.69 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "MergeTaxConfigs", + "cc": 7, + "sloc": 22, + "line": 117, + "mass": 32.83 + }, + { + "path": "openmeter/productcatalog/tax_test.go", + "name": "TestMergeTaxConfigs", + "cc": 7, + "sloc": 185, + "line": 304, + "mass": 95.21 + }, + { + "path": "openmeter/sink/sink.go", + "name": "dedupeSinkMessages", + "cc": 7, + "sloc": 24, + "line": 1008, + "mass": 34.29 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "queryEventsTableV2", + "cc": 7, + "sloc": 38, + "line": 387, + "mass": 43.15 + }, + { + "path": "openmeter/streaming/clickhouse/meter_query.go", + "name": "escapeJSONPathLiteral", + "cc": 7, + "sloc": 21, + "line": 488, + "mass": 32.08 + }, + { + "path": "openmeter/subject/adapter/subject.go", + "name": "Delete", + "cc": 7, + "sloc": 33, + "line": 271, + "mass": 40.21 + }, + { + "path": "openmeter/subscription/addon/diff/restore_test.go", + "name": "TestRestore", + "cc": 7, + "sloc": 539, + "line": 26, + "mass": 162.51 + }, + { + "path": "openmeter/subscription/addon/http/create.go", + "name": "CreateSubscriptionAddon", + "cc": 7, + "sloc": 58, + "line": 31, + "mass": 53.31 + }, + { + "path": "openmeter/subscription/addon/http/update.go", + "name": "UpdateSubscriptionAddon", + "cc": 7, + "sloc": 50, + "line": 29, + "mass": 49.5 + }, + { + "path": "openmeter/subscription/entitlement.go", + "name": "Validate", + "cc": 7, + "sloc": 21, + "line": 17, + "mass": 32.08 + }, + { + "path": "openmeter/subscription/entitlement/adapter.go", + "name": "ScheduleEntitlement", + "cc": 7, + "sloc": 33, + "line": 39, + "mass": 40.21 + }, + { + "path": "openmeter/subscription/entitlement/adapter.go", + "name": "GetForSubscriptionsAt", + "cc": 7, + "sloc": 37, + "line": 79, + "mass": 42.58 + }, + { + "path": "openmeter/subscription/item.go", + "name": "UnmarshalJSON", + "cc": 7, + "sloc": 57, + "line": 46, + "mass": 52.85 + }, + { + "path": "openmeter/subscription/service/servicevalidation.go", + "name": "validateCreate", + "cc": 7, + "sloc": 22, + "line": 15, + "mass": 32.83 + }, + { + "path": "openmeter/subscription/subscription.go", + "name": "GetStatusAt", + "cc": 7, + "sloc": 25, + "line": 56, + "mass": 35.0 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetSortedPhases", + "cc": 7, + "sloc": 25, + "line": 134, + "mass": 35.0 + }, + { + "path": "openmeter/subscription/validators/subscription/validator.go", + "name": "BeforeCreate", + "cc": 7, + "sloc": 27, + "line": 54, + "mass": 36.37 + }, + { + "path": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "name": "mapOrganizationDefaultTaxCodesFromEntity", + "cc": 7, + "sloc": 38, + "line": 78, + "mass": 43.15 + }, + { + "path": "openmeter/watermill/marshaler/marshaler.go", + "name": "Marshal", + "cc": 7, + "sloc": 30, + "line": 48, + "mass": 38.34 + }, + { + "path": "pkg/datetime/duration_test.go", + "name": "TestISODurationOperations", + "cc": 7, + "sloc": 53, + "line": 458, + "mass": 50.96 + }, + { + "path": "pkg/filter/filter.go", + "name": "Select", + "cc": 7, + "sloc": 24, + "line": 808, + "mass": 34.29 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1/example1.go", + "name": "ValidColumn", + "cc": 7, + "sloc": 19, + "line": 38, + "mass": 30.51 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "name": "createSpec", + "cc": 7, + "sloc": 44, + "line": 162, + "mass": 46.43 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "name": "Field", + "cc": 7, + "sloc": 16, + "line": 360, + "mass": 28.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/paginate.go", + "name": "Paginate", + "cc": 7, + "sloc": 44, + "line": 14, + "mass": 46.43 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2/example2.go", + "name": "ValidColumn", + "cc": 7, + "sloc": 19, + "line": 38, + "mass": 30.51 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "name": "createSpec", + "cc": 7, + "sloc": 44, + "line": 162, + "mass": 46.43 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "sqlScan", + "cc": 7, + "sloc": 27, + "line": 497, + "mass": 36.37 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "name": "Field", + "cc": 7, + "sloc": 16, + "line": 360, + "mass": 28.0 + }, + { + "path": "pkg/framework/lockr/session_test.go", + "name": "Test_SessionLocker", + "cc": 7, + "sloc": 281, + "line": 39, + "mass": 117.34 + }, + { + "path": "pkg/kafka/metrics/internal/consumergroup.go", + "name": "NewConsumerGroupMetrics", + "cc": 7, + "sloc": 51, + "line": 41, + "mass": 49.99 + }, + { + "path": "pkg/kafka/metrics/stats/broker.go", + "name": "UnmarshalJSON", + "cc": 7, + "sloc": 19, + "line": 19, + "mass": 30.51 + }, + { + "path": "pkg/log/panic.go", + "name": "PanicLogger", + "cc": 7, + "sloc": 20, + "line": 51, + "mass": 31.3 + }, + { + "path": "pkg/models/fielddescriptor.go", + "name": "String", + "cc": 7, + "sloc": 32, + "line": 82, + "mass": 39.6 + }, + { + "path": "pkg/models/validationissue.go", + "name": "Equal", + "cc": 7, + "sloc": 10, + "line": 170, + "mass": 22.14 + }, + { + "path": "pkg/models/validationissue.go", + "name": "AsErrorExtension", + "cc": 7, + "sloc": 26, + "line": 209, + "mass": 35.69 + }, + { + "path": "pkg/pagination/collect_test.go", + "name": "TestCollectAll_MultiplePages", + "cc": 7, + "sloc": 32, + "line": 10, + "mass": 39.6 + }, + { + "path": "pkg/pagination/collect_test.go", + "name": "TestCollectAll_ErrorMidway", + "cc": 7, + "sloc": 28, + "line": 68, + "mass": 37.04 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "Equals", + "cc": 7, + "sloc": 18, + "line": 23, + "mass": 29.7 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "ContainsExclusive", + "cc": 7, + "sloc": 10, + "line": 57, + "mass": 22.14 + }, + { + "path": "pkg/timeutil/recurrence.go", + "name": "GetPeriodAt", + "cc": 7, + "sloc": 26, + "line": 35, + "mass": 35.69 + }, + { + "path": "test/billing/invoice_test.go", + "name": "TestUBPNonProgressiveInvoicing", + "cc": 7, + "sloc": 387, + "line": 2605, + "mass": 137.71 + }, + { + "path": "test/billing/subscription_suite.go", + "name": "Validate", + "cc": 7, + "sloc": 21, + "line": 75, + "mass": 32.08 + }, + { + "path": "test/credits/sanity_lifecycle_test.go", + "name": "TestUsageBasedCreditOnlyLifecycleTwoChargesTwoPurchasesSanity", + "cc": 7, + "sloc": 242, + "line": 113, + "mass": 108.89 + }, + { + "path": "tools/migrate/llmcost_normalize_providers_test.go", + "name": "TestLLMCostNormalizeProvidersMigration", + "cc": 7, + "sloc": 181, + "line": 11, + "mass": 94.18 + }, + { + "path": "tools/migrate/migrate.go", + "name": "WaitForMigrationJob", + "cc": 7, + "sloc": 31, + "line": 197, + "mass": 38.97 + }, + { + "path": "tools/migrate/productcatalog_test.go", + "name": "TestPlanBillingCadenceProRatingMigration", + "cc": 7, + "sloc": 523, + "line": 63, + "mass": 160.08 + }, + { + "path": "api/client/javascript/src/client/events.ts", + "name": "setDefaultsForEvent", + "cc": 6, + "sloc": 11, + "line": 78, + "mass": 19.9 + }, + { + "path": "api/client/javascript/src/client/utils.ts", + "name": "ISODateFormat", + "cc": 6, + "sloc": 2, + "line": 35, + "mass": 8.49 + }, + { + "path": "api/client/python/openmeter/_generated/_configuration.py", + "name": "_configure", + "cc": 6, + "sloc": 7, + "line": 26, + "mass": 15.87 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_serialize_datetime", + "cc": 6, + "sloc": 15, + "line": 99, + "mass": 23.24 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "_deserialize", + "cc": 6, + "sloc": 22, + "line": 736, + "mass": 28.14 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "name": "__set__", + "cc": 6, + "sloc": 18, + "line": 1149, + "mass": 25.46 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "serialize_dict", + "cc": 6, + "sloc": 25, + "line": 919, + "mass": 30.0 + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "name": "deserialize_dict", + "cc": 6, + "sloc": 14, + "line": 1690, + "mass": 22.45 + }, + { + "path": "api/client/python/openmeter/_generated/aio/_configuration.py", + "name": "_configure", + "cc": 6, + "sloc": 7, + "line": 26, + "mass": 15.87 + }, + { + "path": "api/spec/packages/aip/lib/rules/docs.js", + "name": "processDoc", + "cc": 6, + "sloc": 28, + "line": 172, + "mass": 31.75 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 17, + "line": 52, + "mass": 24.74 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 18, + "line": 259, + "mass": 25.46 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 20, + "line": 298, + "mass": 26.83 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 20, + "line": 373, + "mass": 26.83 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 19, + "line": 418, + "mass": 26.15 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 17, + "line": 439, + "mass": 24.74 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 23, + "line": 508, + "mass": 28.77 + }, + { + "path": "api/v3/api.gen.go", + "name": "Valid", + "cc": 6, + "sloc": 23, + "line": 970, + "mass": 28.77 + }, + { + "path": "api/v3/api.gen.go", + "name": "ValueByDiscriminator", + "cc": 6, + "sloc": 16, + "line": 6075, + "mass": 24.0 + }, + { + "path": "api/v3/apierrors/errors.go", + "name": "String", + "cc": 6, + "sloc": 13, + "line": 65, + "mass": 21.63 + }, + { + "path": "api/v3/apierrors/errors.go", + "name": "ToInvalid", + "cc": 6, + "sloc": 13, + "line": 79, + "mass": 21.63 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseStringPtr", + "cc": 6, + "sloc": 18, + "line": 219, + "mass": 25.46 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseStringPtrTyped", + "cc": 6, + "sloc": 21, + "line": 238, + "mass": 27.5 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterStringExact", + "cc": 6, + "sloc": 22, + "line": 341, + "mass": 28.14 + }, + { + "path": "api/v3/filters/parse.go", + "name": "parseFilterULID", + "cc": 6, + "sloc": 22, + "line": 366, + "mass": 28.14 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "FromAPIBillingPriceFlat", + "cc": 6, + "sloc": 18, + "line": 634, + "mass": 25.46 + }, + { + "path": "api/v3/handlers/addons/convert.go", + "name": "FromAPIBillingSpendCommitments", + "cc": 6, + "sloc": 21, + "line": 752, + "mass": 27.5 + }, + { + "path": "api/v3/handlers/addons/create.go", + "name": "CreateAddon", + "cc": 6, + "sloc": 36, + "line": 22, + "mass": 36.0 + }, + { + "path": "api/v3/handlers/addons/update.go", + "name": "UpdateAddon", + "cc": 6, + "sloc": 36, + "line": 23, + "mass": 36.0 + }, + { + "path": "api/v3/handlers/apps/list_app.go", + "name": "ListApps", + "cc": 6, + "sloc": 54, + "line": 28, + "mass": 44.09 + }, + { + "path": "api/v3/handlers/billingprofiles/list.go", + "name": "ListBillingProfiles", + "cc": 6, + "sloc": 57, + "line": 26, + "mass": 45.3 + }, + { + "path": "api/v3/handlers/billingprofiles/update.go", + "name": "UpdateBillingProfile", + "cc": 6, + "sloc": 44, + "line": 28, + "mass": 39.8 + }, + { + "path": "api/v3/handlers/customers/charges/convert.go", + "name": "convertTaxCodeConfigToAPI", + "cc": 6, + "sloc": 18, + "line": 365, + "mass": 25.46 + }, + { + "path": "api/v3/handlers/customers/charges/convert.go", + "name": "convertAPIChargeStatus", + "cc": 6, + "sloc": 14, + "line": 384, + "mass": 22.45 + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "name": "fromAPIBillingCreditGrantStatus", + "cc": 6, + "sloc": 15, + "line": 262, + "mass": 23.24 + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "name": "fromAPIBillingCreditTransactionType", + "cc": 6, + "sloc": 17, + "line": 431, + "mass": 24.74 + }, + { + "path": "api/v3/handlers/events/convert.go", + "name": "fromAPICustomerIDFilter", + "cc": 6, + "sloc": 27, + "line": 87, + "mass": 31.18 + }, + { + "path": "api/v3/handlers/features/convert.go", + "name": "convertCreateRequestToDomain", + "cc": 6, + "sloc": 27, + "line": 53, + "mass": 31.18 + }, + { + "path": "api/v3/handlers/llmcost/convert.go", + "name": "formatProviderName", + "cc": 6, + "sloc": 18, + "line": 37, + "mass": 25.46 + }, + { + "path": "api/v3/handlers/meters/create.go", + "name": "CreateMeter", + "cc": 6, + "sloc": 33, + "line": 22, + "mass": 34.47 + }, + { + "path": "api/v3/handlers/meters/query.go", + "name": "QueryMeter", + "cc": 6, + "sloc": 45, + "line": 27, + "mass": 40.25 + }, + { + "path": "api/v3/handlers/meters/update.go", + "name": "UpdateMeter", + "cc": 6, + "sloc": 33, + "line": 23, + "mass": 34.47 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPICreatePlanRequest", + "cc": 6, + "sloc": 37, + "line": 389, + "mass": 36.5 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "FromAPIBillingPlanPhase", + "cc": 6, + "sloc": 30, + "line": 448, + "mass": 32.86 + }, + { + "path": "api/v3/handlers/plans/convert.go", + "name": "ParseCommitments", + "cc": 6, + "sloc": 21, + "line": 676, + "mass": 27.5 + }, + { + "path": "api/v3/handlers/plans/create.go", + "name": "CreatePlan", + "cc": 6, + "sloc": 36, + "line": 22, + "mass": 36.0 + }, + { + "path": "api/v3/handlers/plans/planaddons/create.go", + "name": "CreatePlanAddon", + "cc": 6, + "sloc": 44, + "line": 25, + "mass": 39.8 + }, + { + "path": "api/v3/handlers/plans/update.go", + "name": "UpdatePlan", + "cc": 6, + "sloc": 36, + "line": 23, + "mass": 36.0 + }, + { + "path": "api/v3/handlers/subscriptions/cancel.go", + "name": "CancelSubscription", + "cc": 6, + "sloc": 46, + "line": 28, + "mass": 40.69 + }, + { + "path": "api/v3/oasmiddleware/validator.go", + "name": "ValidateRequest", + "cc": 6, + "sloc": 32, + "line": 33, + "mass": 33.94 + }, + { + "path": "app/common/openmeter_server.go", + "name": "NewIngestCollector", + "cc": 6, + "sloc": 32, + "line": 47, + "mass": 33.94 + }, + { + "path": "app/common/openmeter_sinkworker.go", + "name": "NewFlushHandlerManager", + "cc": 6, + "sloc": 32, + "line": 73, + "mass": 33.94 + }, + { + "path": "app/common/subscription.go", + "name": "NewSubscriptionServices", + "cc": 6, + "sloc": 88, + "line": 46, + "mass": 56.28 + }, + { + "path": "app/common/termination.go", + "name": "NewTerminationCheckerActor", + "cc": 6, + "sloc": 26, + "line": 139, + "mass": 30.59 + }, + { + "path": "app/config/aggregation.go", + "name": "Validate", + "cc": 6, + "sloc": 13, + "line": 47, + "mass": 21.63 + }, + { + "path": "app/config/config_test.go", + "name": "TestComplete", + "cc": 6, + "sloc": 437, + "line": 27, + "mass": 125.43 + }, + { + "path": "app/config/ingest.go", + "name": "Validate", + "cc": 6, + "sloc": 14, + "line": 87, + "mass": 22.45 + }, + { + "path": "app/config/postgres.go", + "name": "Validate", + "cc": 6, + "sloc": 13, + "line": 29, + "mass": 21.63 + }, + { + "path": "app/config/postgres.go", + "name": "AsURL", + "cc": 6, + "sloc": 27, + "line": 125, + "mass": 31.18 + }, + { + "path": "app/config/telemetry.go", + "name": "NewHandler", + "cc": 6, + "sloc": 20, + "line": 420, + "mass": 26.83 + }, + { + "path": "collector/benthos/input/kubernetes.go", + "name": "Close", + "cc": 6, + "sloc": 15, + "line": 305, + "mass": 23.24 + }, + { + "path": "collector/benthos/input/prometheus.go", + "name": "scrape", + "cc": 6, + "sloc": 41, + "line": 222, + "mass": 38.42 + }, + { + "path": "collector/benthos/input/run_ai.go", + "name": "scrape", + "cc": 6, + "sloc": 36, + "line": 284, + "mass": 36.0 + }, + { + "path": "collector/benthos/input/runai/pods.go", + "name": "ListPods", + "cc": 6, + "sloc": 32, + "line": 72, + "mass": 33.94 + }, + { + "path": "collector/benthos/input/runai/token.go", + "name": "RefreshToken", + "cc": 6, + "sloc": 21, + "line": 25, + "mass": 27.5 + }, + { + "path": "collector/benthos/input/runai/token.go", + "name": "verifyToken", + "cc": 6, + "sloc": 18, + "line": 86, + "mass": 25.46 + }, + { + "path": "collector/benthos/input/runai/workloads.go", + "name": "ListWorkloads", + "cc": 6, + "sloc": 55, + "line": 76, + "mass": 44.5 + }, + { + "path": "e2e/ledger_backfill_test.go", + "name": "TestLedgerBackfillAccountsJob", + "cc": 6, + "sloc": 37, + "line": 17, + "mass": 36.5 + }, + { + "path": "e2e/planaddons_v3_test.go", + "name": "TestV3PlanAddonInstanceTypeMaxQuantityMatrix", + "cc": 6, + "sloc": 69, + "line": 213, + "mass": 49.84 + }, + { + "path": "e2e/v3helpers_test.go", + "name": "assertValidationCode", + "cc": 6, + "sloc": 21, + "line": 468, + "mass": 27.5 + }, + { + "path": "openmeter/app/adapter/customer.go", + "name": "ListCustomerData", + "cc": 6, + "sloc": 42, + "line": 22, + "mass": 38.88 + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "name": "UpdatePaymentStatus", + "cc": 6, + "sloc": 41, + "line": 127, + "mass": 38.42 + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/mapper.go", + "name": "mapFinalizeStandardInvoiceResultFromAPI", + "cc": 6, + "sloc": 17, + "line": 41, + "mass": 24.74 + }, + { + "path": "openmeter/app/httpdriver/marketplace.go", + "name": "createBillingProfile", + "cc": 6, + "sloc": 15, + "line": 247, + "mass": 23.24 + }, + { + "path": "openmeter/app/input.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 19, + "mass": 26.15 + }, + { + "path": "openmeter/app/service/app.go", + "name": "UninstallApp", + "cc": 6, + "sloc": 26, + "line": 91, + "mass": 30.59 + }, + { + "path": "openmeter/app/service/app.go", + "name": "UpdateAppStatus", + "cc": 6, + "sloc": 24, + "line": 123, + "mass": 29.39 + }, + { + "path": "openmeter/app/stripe/adapter/adapter.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 30, + "mass": 25.46 + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "name": "CreatePortalSession", + "cc": 6, + "sloc": 49, + "line": 583, + "mass": 42.0 + }, + { + "path": "openmeter/app/stripe/client/appclient.go", + "name": "providerError", + "cc": 6, + "sloc": 34, + "line": 227, + "mass": 34.99 + }, + { + "path": "openmeter/app/stripe/client/client.go", + "name": "providerError", + "cc": 6, + "sloc": 27, + "line": 144, + "mass": 31.18 + }, + { + "path": "openmeter/app/stripe/service/billing.go", + "name": "getInvoiceByStripeID", + "cc": 6, + "sloc": 34, + "line": 150, + "mass": 34.99 + }, + { + "path": "openmeter/billing/adapter/customeroverride.go", + "name": "UpdateCustomerOverride", + "cc": 6, + "sloc": 51, + "line": 70, + "mass": 42.85 + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "name": "DeleteGatheringInvoice", + "cc": 6, + "sloc": 31, + "line": 301, + "mass": 33.41 + }, + { + "path": "openmeter/billing/adapter/invoicelinesplitgroup.go", + "name": "mapSplitLineGroupFromDB", + "cc": 6, + "sloc": 46, + "line": 149, + "mass": 40.69 + }, + { + "path": "openmeter/billing/adapter/lock.go", + "name": "LockCustomerForUpdate", + "cc": 6, + "sloc": 27, + "line": 33, + "mass": 31.18 + }, + { + "path": "openmeter/billing/adapter/profile.go", + "name": "mapWorkflowConfigFromDB", + "cc": 6, + "sloc": 43, + "line": 484, + "mass": 39.34 + }, + { + "path": "openmeter/billing/adapter/schemamigration.go", + "name": "shouldInvoicesBeMigrated", + "cc": 6, + "sloc": 32, + "line": 19, + "mass": 33.94 + }, + { + "path": "openmeter/billing/charges/charge.go", + "name": "SettlementMode", + "cc": 6, + "sloc": 17, + "line": 215, + "mass": 24.74 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/external.go", + "name": "HandleExternalPaymentSettled", + "cc": 6, + "sloc": 40, + "line": 129, + "mass": 37.95 + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/invoice.go", + "name": "PostInvoiceDraftCreated", + "cc": 6, + "sloc": 31, + "line": 16, + "mass": 33.41 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 143, + "mass": 24.0 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter.go", + "name": "validateExpands", + "cc": 6, + "sloc": 12, + "line": 230, + "mass": 20.78 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "UpdateSubscriptionItemID", + "cc": 6, + "sloc": 24, + "line": 82, + "mass": 29.39 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "DeleteCharge", + "cc": 6, + "sloc": 31, + "line": 112, + "mass": 33.41 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "name": "buildCreateFlatFeeCharge", + "cc": 6, + "sloc": 38, + "line": 288, + "mass": 36.99 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/credits.go", + "name": "CreateCreditAllocations", + "cc": 6, + "sloc": 36, + "line": 19, + "mass": 36.0 + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/realizationrun.go", + "name": "CreateCurrentRun", + "cc": 6, + "sloc": 44, + "line": 17, + "mass": 39.8 + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditsonly.go", + "name": "AllocateCredits", + "cc": 6, + "sloc": 34, + "line": 80, + "mass": 34.99 + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "name": "OnInvoiceIssued", + "cc": 6, + "sloc": 21, + "line": 385, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/flatfee/service/linemapper.go", + "name": "populateFlatFeeStandardLineFromRun", + "cc": 6, + "sloc": 27, + "line": 13, + "mass": 31.18 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/correct.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 29, + "mass": 26.15 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/correct.go", + "name": "CorrectAllCredits", + "cc": 6, + "sloc": 32, + "line": 184, + "mass": 33.94 + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go", + "name": "AccrueInvoiceUsage", + "cc": 6, + "sloc": 48, + "line": 67, + "mass": 41.57 + }, + { + "path": "openmeter/billing/charges/flatfee/service/triggers.go", + "name": "TriggerPatch", + "cc": 6, + "sloc": 33, + "line": 36, + "mass": 34.47 + }, + { + "path": "openmeter/billing/charges/flatfee/service/triggers.go", + "name": "newStateMachine", + "cc": 6, + "sloc": 20, + "line": 78, + "mass": 26.83 + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "name": "mergeValidationIssues", + "cc": 6, + "sloc": 15, + "line": 690, + "mass": 23.24 + }, + { + "path": "openmeter/billing/charges/lineage/lineage.go", + "name": "SortCorrectionPersistSegments", + "cc": 6, + "sloc": 21, + "line": 14, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/lineage/service.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 48, + "mass": 26.15 + }, + { + "path": "openmeter/billing/charges/lineage/service.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 75, + "mass": 23.24 + }, + { + "path": "openmeter/billing/charges/lineage/service.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 104, + "mass": 26.15 + }, + { + "path": "openmeter/billing/charges/lineage/service/service.go", + "name": "CreateInitialLineages", + "cc": 6, + "sloc": 26, + "line": 43, + "mass": 30.59 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/allocation.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 31, + "mass": 24.74 + }, + { + "path": "openmeter/billing/charges/models/creditrealization/realizations.go", + "name": "Correct", + "cc": 6, + "sloc": 21, + "line": 123, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/service/base_test.go", + "name": "createMockChargeIntent", + "cc": 6, + "sloc": 51, + "line": 214, + "mass": 42.85 + }, + { + "path": "openmeter/billing/charges/service/create.go", + "name": "createGatheringLines", + "cc": 6, + "sloc": 34, + "line": 388, + "mass": 34.99 + }, + { + "path": "openmeter/billing/charges/service/creditpurchase_test.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 166, + "mass": 25.46 + }, + { + "path": "openmeter/billing/charges/service/get.go", + "name": "expandChargesWithTypes", + "cc": 6, + "sloc": 55, + "line": 58, + "mass": 44.5 + }, + { + "path": "openmeter/billing/charges/service/helpers.go", + "name": "newInvocableCharges", + "cc": 6, + "sloc": 24, + "line": 67, + "mass": 29.39 + }, + { + "path": "openmeter/billing/charges/service/invoicable_test.go", + "name": "activeGatheringLinesForCharge", + "cc": 6, + "sloc": 21, + "line": 2967, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/charge.go", + "name": "UpdateSubscriptionItemID", + "cc": 6, + "sloc": 24, + "line": 64, + "mass": 29.39 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/charge.go", + "name": "DeleteCharge", + "cc": 6, + "sloc": 33, + "line": 94, + "mass": 34.47 + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/mapper.go", + "name": "MapRealizationRunFromDB", + "cc": 6, + "sloc": 27, + "line": 112, + "mass": 31.18 + }, + { + "path": "openmeter/billing/charges/usagebased/handler.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 97, + "mass": 26.15 + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "name": "BisectByTimestamp", + "cc": 6, + "sloc": 23, + "line": 348, + "mass": 28.77 + }, + { + "path": "openmeter/billing/charges/usagebased/service.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 35, + "mass": 23.24 + }, + { + "path": "openmeter/billing/charges/usagebased/service.go", + "name": "validateExpands", + "cc": 6, + "sloc": 12, + "line": 186, + "mass": 20.78 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "name": "ExtendCharge", + "cc": 6, + "sloc": 33, + "line": 275, + "mass": 34.47 + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditsonly.go", + "name": "DeleteCharge", + "cc": 6, + "sloc": 21, + "line": 121, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "name": "markMutableStandardLineRunDeleted", + "cc": 6, + "sloc": 28, + "line": 429, + "mass": 31.75 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go", + "name": "flattenDetailedLinesByEpoch", + "cc": 6, + "sloc": 21, + "line": 318, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go", + "name": "runLateEventRatingTestCase", + "cc": 6, + "sloc": 54, + "line": 1233, + "mass": 44.09 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "name": "validateCurrencyForSubtract", + "cc": 6, + "sloc": 21, + "line": 110, + "mass": 27.5 + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "name": "subtractDetailedLinesByKey", + "cc": 6, + "sloc": 28, + "line": 168, + "mass": 31.75 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/correct.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 34, + "mass": 25.46 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/correct.go", + "name": "CorrectAllCredits", + "cc": 6, + "sloc": 33, + "line": 166, + "mass": 34.47 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/credits.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 61, + "mass": 25.46 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment.go", + "name": "BookInvoicedPaymentAuthorized", + "cc": 6, + "sloc": 47, + "line": 58, + "mass": 41.13 + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment.go", + "name": "SettleInvoicedPayment", + "cc": 6, + "sloc": 40, + "line": 168, + "mass": 37.95 + }, + { + "path": "openmeter/billing/customeroverride.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 162, + "mass": 25.46 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualAmountLineDiscountManaged", + "cc": 6, + "sloc": 7, + "line": 54, + "mass": 15.87 + }, + { + "path": "openmeter/billing/derived.gen.go", + "name": "deriveEqualUsageLineDiscountManaged", + "cc": 6, + "sloc": 7, + "line": 71, + "mass": 15.87 + }, + { + "path": "openmeter/billing/discount.go", + "name": "MarshalJSON", + "cc": 6, + "sloc": 34, + "line": 193, + "mass": 34.99 + }, + { + "path": "openmeter/billing/events.go", + "name": "NewEventStandardInvoice", + "cc": 6, + "sloc": 32, + "line": 58, + "mass": 33.94 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "Validate", + "cc": 6, + "sloc": 20, + "line": 41, + "mass": 26.83 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "Validate", + "cc": 6, + "sloc": 21, + "line": 831, + "mass": 27.5 + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 875, + "mass": 24.74 + }, + { + "path": "openmeter/billing/httpdriver/customeroverride.go", + "name": "ListCustomerOverrides", + "cc": 6, + "sloc": 66, + "line": 28, + "mass": 48.74 + }, + { + "path": "openmeter/billing/httpdriver/customeroverride.go", + "name": "mapCustomerOverrideExpandToEntity", + "cc": 6, + "sloc": 17, + "line": 235, + "mass": 24.74 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "ListInvoices", + "cc": 6, + "sloc": 79, + "line": 40, + "mass": 53.33 + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "name": "mergeInvoiceWorkflowFromAPI", + "cc": 6, + "sloc": 33, + "line": 859, + "mass": 34.47 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mapInvoiceLineToAPI", + "cc": 6, + "sloc": 62, + "line": 313, + "mass": 47.24 + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "name": "mapSimulationLineToEntity", + "cc": 6, + "sloc": 57, + "line": 586, + "mass": 45.3 + }, + { + "path": "openmeter/billing/httpdriver/profile.go", + "name": "mapProfileAppsToAPI", + "cc": 6, + "sloc": 27, + "line": 468, + "mass": 31.18 + }, + { + "path": "openmeter/billing/invoice.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 171, + "mass": 24.0 + }, + { + "path": "openmeter/billing/invoice.go", + "name": "Validate", + "cc": 6, + "sloc": 14, + "line": 436, + "mass": 22.45 + }, + { + "path": "openmeter/billing/invoiceline.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 132, + "mass": 24.0 + }, + { + "path": "openmeter/billing/invoiceline.go", + "name": "GetChargeID", + "cc": 6, + "sloc": 16, + "line": 155, + "mass": 24.0 + }, + { + "path": "openmeter/billing/invoiceline.go", + "name": "AsGenericLine", + "cc": 6, + "sloc": 15, + "line": 198, + "mass": 23.24 + }, + { + "path": "openmeter/billing/lineengine/splitlinegroup.go", + "name": "ResolveSplitLineGroupHeaders", + "cc": 6, + "sloc": 34, + "line": 116, + "mass": 34.99 + }, + { + "path": "openmeter/billing/lineengine/stdinvoice.go", + "name": "buildStandardInvoiceLinesWithQuantitySnapshot", + "cc": 6, + "sloc": 19, + "line": 33, + "mass": 26.15 + }, + { + "path": "openmeter/billing/profile.go", + "name": "Validate", + "cc": 6, + "sloc": 20, + "line": 341, + "mass": 26.83 + }, + { + "path": "openmeter/billing/rating/service/detailedline.go", + "name": "validateStandardLine", + "cc": 6, + "sloc": 18, + "line": 18, + "mass": 25.46 + }, + { + "path": "openmeter/billing/rating/service/pricer.go", + "name": "GenerateDetailedLines", + "cc": 6, + "sloc": 27, + "line": 89, + "mass": 31.18 + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "name": "GetCustomerOverride", + "cc": 6, + "sloc": 29, + "line": 74, + "mass": 32.31 + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 486, + "mass": 25.46 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "AdvanceInvoice", + "cc": 6, + "sloc": 35, + "line": 504, + "mass": 35.5 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "updateInvoice", + "cc": 6, + "sloc": 20, + "line": 792, + "mass": 26.83 + }, + { + "path": "openmeter/billing/service/invoice.go", + "name": "checkIfLinesAreInvoicable", + "cc": 6, + "sloc": 30, + "line": 817, + "mass": 32.86 + }, + { + "path": "openmeter/billing/service/invoicecalc/period.go", + "name": "CalculateStandardInvoiceServicePeriod", + "cc": 6, + "sloc": 23, + "line": 11, + "mass": 28.77 + }, + { + "path": "openmeter/billing/service/invoicecalc/period.go", + "name": "CalculateGatheringInvoiceServicePeriod", + "cc": 6, + "sloc": 20, + "line": 41, + "mass": 26.83 + }, + { + "path": "openmeter/billing/service/invoicelinesplitgroup.go", + "name": "DeleteSplitLineGroup", + "cc": 6, + "sloc": 26, + "line": 11, + "mass": 30.59 + }, + { + "path": "openmeter/billing/service/lineengine.go", + "name": "OnMutableStandardLinesDeleted", + "cc": 6, + "sloc": 22, + "line": 171, + "mass": 28.14 + }, + { + "path": "openmeter/billing/service/lineengine.go", + "name": "OnUnsupportedCreditNote", + "cc": 6, + "sloc": 22, + "line": 199, + "mass": 28.14 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "ListProfiles", + "cc": 6, + "sloc": 30, + "line": 212, + "mass": 32.86 + }, + { + "path": "openmeter/billing/service/profile.go", + "name": "ProvisionDefaultBillingProfile", + "cc": 6, + "sloc": 46, + "line": 334, + "mass": 40.69 + }, + { + "path": "openmeter/billing/service/seq.go", + "name": "GenerateInvoiceSequenceNumber", + "cc": 6, + "sloc": 29, + "line": 22, + "mass": 32.31 + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "name": "syncDraftInvoice", + "cc": 6, + "sloc": 21, + "line": 775, + "mass": 27.5 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 334, + "mass": 24.74 + }, + { + "path": "openmeter/billing/stdinvoice.go", + "name": "ReplaceLinesByID", + "cc": 6, + "sloc": 16, + "line": 595, + "mass": 24.0 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "clone", + "cc": 6, + "sloc": 23, + "line": 552, + "mass": 28.77 + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "name": "WithNormalizedValues", + "cc": 6, + "sloc": 21, + "line": 665, + "mass": 27.5 + }, + { + "path": "openmeter/billing/taxconfig.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 64, + "mass": 24.74 + }, + { + "path": "openmeter/billing/validators/subscription/validator.go", + "name": "validateBillingSetup", + "cc": 6, + "sloc": 33, + "line": 48, + "mass": 34.47 + }, + { + "path": "openmeter/billing/worker/advance/advance.go", + "name": "AdvanceInvoice", + "cc": 6, + "sloc": 28, + "line": 145, + "mass": 31.75 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "assertPaymentLedgerTransactions", + "cc": 6, + "sloc": 12, + "line": 666, + "mass": 20.78 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "assertChargeGatheringLines", + "cc": 6, + "sloc": 33, + "line": 723, + "mass": 34.47 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "usageBasedRunLedgerTransactionGroups", + "cc": 6, + "sloc": 20, + "line": 881, + "mass": 26.83 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "name": "flatFeeRunLedgerTransactionGroups", + "cc": 6, + "sloc": 20, + "line": 905, + "mass": 26.83 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go", + "name": "NewChargeItemFromChargeType", + "cc": 6, + "sloc": 16, + "line": 352, + "mass": 24.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "name": "mergeValidationIssues", + "cc": 6, + "sloc": 15, + "line": 513, + "mass": 23.24 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go", + "name": "GetCollectionFor", + "cc": 6, + "sloc": 14, + "line": 117, + "mass": 22.45 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 39, + "mass": 23.24 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/ref.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 59, + "mass": 24.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/ref.go", + "name": "GetID", + "cc": 6, + "sloc": 16, + "line": 106, + "mass": 24.0 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/repair.go", + "name": "persistedChargeSubscriptionReferenceFromItem", + "cc": 6, + "sloc": 28, + "line": 179, + "mass": 31.75 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/repair.go", + "name": "persistedItemFromCharge", + "cc": 6, + "sloc": 18, + "line": 210, + "mass": 25.46 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync.go", + "name": "updateSyncState", + "cc": 6, + "sloc": 35, + "line": 283, + "mass": 35.5 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "name": "TestInAdvanceGatheringSyncIssuedInvoiceProrated", + "cc": 6, + "sloc": 369, + "line": 2071, + "mass": 115.26 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "name": "TestUsageBasedUpdateWithLineSplits", + "cc": 6, + "sloc": 482, + "line": 4442, + "mass": 131.73 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "name": "TestDiscountSynchronization", + "cc": 6, + "sloc": 219, + "line": 5554, + "mass": 88.79 + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "name": "TestUsageBasedUpdateWithLineSplits", + "cc": 6, + "sloc": 238, + "line": 2732, + "mass": 92.56 + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "name": "addLLMGroupByKeys", + "cc": 6, + "sloc": 19, + "line": 203, + "mass": 26.15 + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "name": "resolveUnitCost", + "cc": 6, + "sloc": 25, + "line": 242, + "mass": 30.0 + }, + { + "path": "openmeter/credit/balance/service.go", + "name": "GetLatestValidAt", + "cc": 6, + "sloc": 25, + "line": 57, + "mass": 30.0 + }, + { + "path": "openmeter/credit/helper.go", + "name": "GetLastValidSnapshotAt", + "cc": 6, + "sloc": 27, + "line": 26, + "mass": 31.18 + }, + { + "path": "openmeter/customer/adapter/customer.go", + "name": "GetCustomerByUsageAttribution", + "cc": 6, + "sloc": 45, + "line": 504, + "mass": 40.25 + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "name": "CreateCustomer", + "cc": 6, + "sloc": 44, + "line": 156, + "mass": 39.8 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "EnsureStripeCustomer", + "cc": 6, + "sloc": 57, + "line": 528, + "mass": 45.3 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "name": "Provision", + "cc": 6, + "sloc": 28, + "line": 597, + "mass": 31.75 + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 288, + "mass": 25.46 + }, + { + "path": "openmeter/customer/testutils/env.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 55, + "mass": 25.46 + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "name": "setKey", + "cc": 6, + "sloc": 21, + "line": 82, + "mass": 27.5 + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "name": "CheckUnique", + "cc": 6, + "sloc": 17, + "line": 107, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 272, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/addon_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1376, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/addon_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 184, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/addon_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 211, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1733, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/addonratecard_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 183, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 210, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 317, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 651, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/app_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1132, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/app_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 43, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 276, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/app_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 303, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 347, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 684, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustomer_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 186, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 234, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 723, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 832, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 381, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 760, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 266, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 972, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appstripe_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 419, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 826, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appstripecustomer_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 732, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/balancesnapshot_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go", + "name": "ValidColumn", + "cc": 6, + "sloc": 17, + "line": 30, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_create.go", + "name": "check", + "cc": 6, + "sloc": 14, + "line": 93, + "mass": 22.45 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 108, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 511, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 374, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 823, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1668, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 183, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 210, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 1001, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 4488, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoice_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 374, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 401, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "name": "ValidColumn", + "cc": 6, + "sloc": 16, + "line": 43, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 177, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 752, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 3734, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 567, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 594, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 1167, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1458, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 996, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1224, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1800, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 256, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 283, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go", + "name": "ValidColumn", + "cc": 6, + "sloc": 19, + "line": 49, + "mass": 26.15 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 707, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 844, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 265, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 910, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1103, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 82, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 494, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 445, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1852, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingprofile_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 254, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 281, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 518, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 406, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 546, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 1239, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2476, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 208, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 235, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 996, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1224, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 289, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 383, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 1266, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1557, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 184, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 211, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/charge.go", + "name": "String", + "cc": 6, + "sloc": 42, + "line": 270, + "mass": 38.88 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 319, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/charge_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 889, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/charge_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 256, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/charge_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 283, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2292, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 328, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 355, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 203, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 394, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 791, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 127, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 295, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "name": "String", + "cc": 6, + "sloc": 60, + "line": 241, + "mass": 46.48 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 296, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 629, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1292, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "name": "String", + "cc": 6, + "sloc": 66, + "line": 276, + "mass": 48.74 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 329, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1358, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2680, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfee_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 327, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 354, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 477, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1821, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 280, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 307, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 339, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1289, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 206, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 233, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 372, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 514, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2381, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 291, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 654, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1359, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 273, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 621, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment.go", + "name": "String", + "cc": 6, + "sloc": 66, + "line": 276, + "mass": 48.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 323, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1352, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 87, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2499, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebased_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 351, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 378, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 319, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1256, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 182, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 209, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 403, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 556, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 1284, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2591, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 206, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 233, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 291, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 654, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1359, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 273, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 621, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "name": "String", + "cc": 6, + "sloc": 66, + "line": 257, + "mass": 48.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 308, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1324, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 515, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1810, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 327, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 354, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 225, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 683, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 226, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 451, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 918, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 214, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 744, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/currencycostbasis_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 16, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 67, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 118, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 169, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 220, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 271, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 322, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 373, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 424, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 475, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 526, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 577, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 628, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 679, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 730, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 781, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 832, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 883, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 934, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 985, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1036, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1087, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1138, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1189, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1240, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1291, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1342, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1393, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1444, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1495, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1546, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1597, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1648, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1699, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1750, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1801, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1852, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1903, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 1954, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2005, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2056, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2107, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2158, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2209, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2260, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2311, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2362, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2413, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2464, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2515, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2566, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2617, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2668, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2719, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2770, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2821, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2872, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2923, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 2974, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3025, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3076, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3127, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3178, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3229, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3280, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3331, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3382, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3433, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3484, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3535, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3586, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3637, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 43, + "line": 3688, + "mass": 39.34 + }, + { + "path": "openmeter/ent/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 41, + "line": 3739, + "mass": 38.42 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 214, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 408, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 805, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customcurrency_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 136, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 163, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 491, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 1620, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/customer_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1988, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customer_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 328, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customer_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 355, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 288, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 597, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customersubjects_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "String", + "cc": 6, + "sloc": 16, + "line": 488, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "Int", + "cc": 6, + "sloc": 16, + "line": 535, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "Float64", + "cc": 6, + "sloc": 16, + "line": 582, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ent.go", + "name": "Bool", + "cc": 6, + "sloc": 16, + "line": 629, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1601, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/entitlement_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 256, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 283, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 479, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/feature_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1971, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/feature_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 43, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 280, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/feature_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 307, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/grant.go", + "name": "String", + "cc": 6, + "sloc": 69, + "line": 271, + "mass": 49.84 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 314, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/grant_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1096, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/grant_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 43, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/grant_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 210, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 410, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 793, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgeraccount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 375, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1110, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 189, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 696, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 230, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 837, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgerentry_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 215, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 818, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 184, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 211, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 311, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 917, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 206, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 796, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgertransaction_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 179, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 634, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 736, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 136, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 163, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1580, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/llmcostprice_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 285, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/meter_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1236, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/meter_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 43, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 136, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/meter_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 163, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 513, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1039, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationchannel_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 136, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 163, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 192, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 718, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationevent_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 254, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1003, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 136, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 163, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 545, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1071, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationrule_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 191, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 673, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 782, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 158, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 185, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/plan_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1429, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/plan_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 184, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/plan_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 211, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 238, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1017, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planaddon_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 159, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 186, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 262, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 557, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1122, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planphase_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 160, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 187, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/planphase_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 250, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/planphase_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 633, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1733, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planratecard_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 183, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 210, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountOrErr", + "cc": 6, + "sloc": 16, + "line": 159, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "EntitlementOrErr", + "cc": 6, + "sloc": 16, + "line": 281, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "NotificationChannelOrErr", + "cc": 6, + "sloc": 16, + "line": 342, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "name": "PlanOrErr", + "cc": 6, + "sloc": 16, + "line": 379, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 204, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 759, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/subject_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 917, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subject_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subject_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1671, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscription_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 352, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 379, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 224, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 827, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 184, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 211, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "defaults", + "cc": 6, + "sloc": 23, + "line": 162, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 226, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 746, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 155, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 23, + "line": 594, + "mass": 28.77 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 689, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 2266, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionitem_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 304, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 331, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 346, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1218, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionphase_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 280, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 307, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/subscriptionphase_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 394, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/subscriptionphase_update.go", + "name": "check", + "cc": 6, + "sloc": 11, + "line": 1111, + "mass": 19.9 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "UpdateNewValues", + "cc": 6, + "sloc": 24, + "line": 954, + "mass": 29.39 + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 1494, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/taxcode_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 43, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 471, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 498, + "mass": 24.0 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 209, + "mass": 28.14 + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 803, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/usagereset_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 135, + "mass": 23.24 + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 162, + "mass": 24.0 + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "name": "ListEntitlementsAffectedByIngestEvents", + "cc": 6, + "sloc": 48, + "line": 319, + "mass": 41.57 + }, + { + "path": "openmeter/entitlement/adapter/entitlement_test.go", + "name": "TestEntitlementLoadsSubjectAndCustomerAndPreservesAcrossTypedMapping", + "cc": 6, + "sloc": 73, + "line": 545, + "mass": 51.26 + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "name": "ProcessEntitlements", + "cc": 6, + "sloc": 36, + "line": 236, + "mass": 36.0 + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "name": "sendEntitlementUpdatedEvent", + "cc": 6, + "sloc": 50, + "line": 335, + "mass": 42.43 + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "name": "GetCustomerEntitlement", + "cc": 6, + "sloc": 57, + "line": 215, + "mass": 45.3 + }, + { + "path": "openmeter/entitlement/metered/entitlement_grant.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 31, + "mass": 23.24 + }, + { + "path": "openmeter/entitlement/metered/entitlement_grant.go", + "name": "ListEntitlementGrants", + "cc": 6, + "sloc": 32, + "line": 95, + "mass": 33.94 + }, + { + "path": "openmeter/entitlement/metered/events.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 48, + "mass": 25.46 + }, + { + "path": "openmeter/entitlement/metered/events.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 102, + "mass": 25.46 + }, + { + "path": "openmeter/entitlement/service/service.go", + "name": "DeleteEntitlement", + "cc": 6, + "sloc": 31, + "line": 173, + "mass": 33.41 + }, + { + "path": "openmeter/entitlement/uniqueness.go", + "name": "ValidateUniqueConstraint", + "cc": 6, + "sloc": 29, + "line": 30, + "mass": 32.31 + }, + { + "path": "openmeter/entitlement/usageperiod.go", + "name": "Validate", + "cc": 6, + "sloc": 20, + "line": 98, + "mass": 26.83 + }, + { + "path": "openmeter/entitlement/validators/customer/validator.go", + "name": "ValidateDeleteCustomer", + "cc": 6, + "sloc": 21, + "line": 32, + "mass": 27.5 + }, + { + "path": "openmeter/ingest/kafkaingest/serializer/serializer.go", + "name": "ValidateKafkaPayloadToCloudEvent", + "cc": 6, + "sloc": 19, + "line": 90, + "mass": 26.15 + }, + { + "path": "openmeter/ledger/account/address.go", + "name": "Equal", + "cc": 6, + "sloc": 18, + "line": 72, + "mass": 25.46 + }, + { + "path": "openmeter/ledger/annotations.go", + "name": "TransactionDirectionFromAnnotations", + "cc": 6, + "sloc": 17, + "line": 144, + "mass": 24.74 + }, + { + "path": "openmeter/ledger/breakage/adapter/record.go", + "name": "ListCandidateRecords", + "cc": 6, + "sloc": 37, + "line": 192, + "mass": 36.5 + }, + { + "path": "openmeter/ledger/breakage/service.go", + "name": "PlanIssuance", + "cc": 6, + "sloc": 52, + "line": 288, + "mass": 43.27 + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "name": "unattributedAccruedBalances", + "cc": 6, + "sloc": 41, + "line": 486, + "mass": 38.42 + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee.go", + "name": "OnAllocateCredits", + "cc": 6, + "sloc": 40, + "line": 43, + "mass": 37.95 + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased.go", + "name": "OnInvoiceUsageAccrued", + "cc": 6, + "sloc": 49, + "line": 41, + "mass": 42.0 + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased.go", + "name": "OnCreditsOnlyUsageAccrued", + "cc": 6, + "sloc": 37, + "line": 222, + "mass": 36.5 + }, + { + "path": "openmeter/ledger/collector/collect.go", + "name": "collectedFBOAmount", + "cc": 6, + "sloc": 14, + "line": 257, + "mass": 22.45 + }, + { + "path": "openmeter/ledger/collector/collect.go", + "name": "creditRealizationAnnotationsForCollectedInput", + "cc": 6, + "sloc": 20, + "line": 273, + "mass": 26.83 + }, + { + "path": "openmeter/ledger/collector/collection_fbo.go", + "name": "compareOptionalTime", + "cc": 6, + "sloc": 12, + "line": 102, + "mass": 20.78 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "planSegmentCorrection", + "cc": 6, + "sloc": 15, + "line": 206, + "mass": 23.24 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "compareCollectedFBOCorrectionSourceEntries", + "cc": 6, + "sloc": 16, + "line": 605, + "mass": 24.0 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "forwardTransactionByTemplate", + "cc": 6, + "sloc": 16, + "line": 676, + "mass": 24.0 + }, + { + "path": "openmeter/ledger/collector/correct.go", + "name": "sortCorrectionSegments", + "cc": 6, + "sloc": 22, + "line": 732, + "mass": 28.14 + }, + { + "path": "openmeter/ledger/customerbalance/expired_loader_test.go", + "name": "bookExpiredListingState", + "cc": 6, + "sloc": 67, + "line": 213, + "mass": 49.11 + }, + { + "path": "openmeter/ledger/customerbalance/service.go", + "name": "GetBalance", + "cc": 6, + "sloc": 31, + "line": 142, + "mass": 33.41 + }, + { + "path": "openmeter/ledger/customerbalance/service.go", + "name": "chargeHasStarted", + "cc": 6, + "sloc": 19, + "line": 307, + "mass": 26.15 + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "name": "creditTransactionFBOImpact", + "cc": 6, + "sloc": 22, + "line": 266, + "mass": 28.14 + }, + { + "path": "openmeter/ledger/historical/adapter/ledger.go", + "name": "hydrateHistoricalTransaction", + "cc": 6, + "sloc": 56, + "line": 30, + "mass": 44.9 + }, + { + "path": "openmeter/ledger/historical/adapter/ledger.go", + "name": "SumEntries", + "cc": 6, + "sloc": 28, + "line": 238, + "mass": 31.75 + }, + { + "path": "openmeter/ledger/recognizer/recognize.go", + "name": "collectEligibleLineages", + "cc": 6, + "sloc": 26, + "line": 113, + "mass": 30.59 + }, + { + "path": "openmeter/ledger/routing.go", + "name": "BuildRoutingKey", + "cc": 6, + "sloc": 19, + "line": 375, + "mass": 26.15 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "hasMixedSigns", + "cc": 6, + "sloc": 12, + "line": 140, + "mass": 20.78 + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "name": "hasMatchingRouteFields", + "cc": 6, + "sloc": 19, + "line": 502, + "mass": 26.15 + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "name": "compareFBOAccrualCorrectionSourceEntries", + "cc": 6, + "sloc": 16, + "line": 117, + "mass": 24.0 + }, + { + "path": "openmeter/ledger/transactions/collection.go", + "name": "decimalPointersEqual", + "cc": 6, + "sloc": 10, + "line": 121, + "mass": 18.97 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 165, + "mass": 25.46 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 256, + "mass": 24.74 + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 345, + "mass": 25.46 + }, + { + "path": "openmeter/ledger/transactions/earnings_test.go", + "name": "findForwardTransaction", + "cc": 6, + "sloc": 19, + "line": 222, + "mass": 26.15 + }, + { + "path": "openmeter/ledger/transactions/legacy.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 27, + "mass": 25.46 + }, + { + "path": "openmeter/ledger/transactions/legacy.go", + "name": "resolve", + "cc": 6, + "sloc": 44, + "line": 63, + "mass": 39.8 + }, + { + "path": "openmeter/ledger/transactions/legacy.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 119, + "mass": 24.74 + }, + { + "path": "openmeter/llmcost/adapter/mapping.go", + "name": "mapPriceFromEntity", + "cc": 6, + "sloc": 39, + "line": 14, + "mass": 37.47 + }, + { + "path": "openmeter/llmcost/adapter/price.go", + "name": "CreateOverride", + "cc": 6, + "sloc": 42, + "line": 141, + "mass": 38.88 + }, + { + "path": "openmeter/llmcost/adapter/price.go", + "name": "DeleteOverride", + "cc": 6, + "sloc": 29, + "line": 188, + "mass": 32.31 + }, + { + "path": "openmeter/llmcost/adapter/price.go", + "name": "UpsertGlobalPrice", + "cc": 6, + "sloc": 52, + "line": 253, + "mass": 43.27 + }, + { + "path": "openmeter/llmcost/service/service.go", + "name": "sourceFilterExcludesManual", + "cc": 6, + "sloc": 13, + "line": 141, + "mass": 21.63 + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "name": "pricesAgree", + "cc": 6, + "sloc": 9, + "line": 167, + "mass": 18.0 + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "name": "optionalDecimalsAgree", + "cc": 6, + "sloc": 10, + "line": 177, + "mass": 18.97 + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "name": "decimalsAgree", + "cc": 6, + "sloc": 16, + "line": 188, + "mass": 24.0 + }, + { + "path": "openmeter/meter/adapter/adapter_test.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 145, + "mass": 25.46 + }, + { + "path": "openmeter/meter/httphandler/meter.go", + "name": "CreateMeter", + "cc": 6, + "sloc": 58, + "line": 138, + "mass": 45.69 + }, + { + "path": "openmeter/meter/httphandler/meter.go", + "name": "UpdateMeter", + "cc": 6, + "sloc": 61, + "line": 204, + "mass": 46.86 + }, + { + "path": "openmeter/meter/httphandler/query.go", + "name": "QueryMeterPost", + "cc": 6, + "sloc": 47, + "line": 161, + "mass": 41.13 + }, + { + "path": "openmeter/meter/httphandler/query.go", + "name": "ListGroupByValues", + "cc": 6, + "sloc": 48, + "line": 234, + "mass": 41.57 + }, + { + "path": "openmeter/meter/meter_test.go", + "name": "TestMeterValidation", + "cc": 6, + "sloc": 320, + "line": 17, + "mass": 107.33 + }, + { + "path": "openmeter/meter/mockadapter/manage.go", + "name": "UpdateMeter", + "cc": 6, + "sloc": 42, + "line": 51, + "mass": 38.88 + }, + { + "path": "openmeter/meter/mockadapter/meter.go", + "name": "GetMeterByIDOrSlug", + "cc": 6, + "sloc": 15, + "line": 70, + "mass": 23.24 + }, + { + "path": "openmeter/namespace/namespace.go", + "name": "NewManager", + "cc": 6, + "sloc": 21, + "line": 23, + "mass": 27.5 + }, + { + "path": "openmeter/notification/adapter/entitymapping.go", + "name": "EventFromDBEntity", + "cc": 6, + "sloc": 33, + "line": 85, + "mass": 34.47 + }, + { + "path": "openmeter/notification/adapter/entitymapping.go", + "name": "eventPayloadFromJSON", + "cc": 6, + "sloc": 17, + "line": 123, + "mass": 24.74 + }, + { + "path": "openmeter/notification/channel.go", + "name": "Validate", + "cc": 6, + "sloc": 24, + "line": 213, + "mass": 29.39 + }, + { + "path": "openmeter/notification/consumer/consumer.go", + "name": "New", + "cc": 6, + "sloc": 50, + "line": 57, + "mass": 42.43 + }, + { + "path": "openmeter/notification/consumer/entitlementreset.go", + "name": "handleAsEntitlementResetEvent", + "cc": 6, + "sloc": 23, + "line": 33, + "mass": 28.77 + }, + { + "path": "openmeter/notification/eventhandler/handler.go", + "name": "Validate", + "cc": 6, + "sloc": 20, + "line": 33, + "mass": 26.83 + }, + { + "path": "openmeter/notification/eventhandler/handler.go", + "name": "New", + "cc": 6, + "sloc": 34, + "line": 148, + "mass": 34.99 + }, + { + "path": "openmeter/notification/httpdriver/errors.go", + "name": "errorEncoder", + "cc": 6, + "sloc": 10, + "line": 15, + "mass": 18.97 + }, + { + "path": "openmeter/notification/httpdriver/mapping.go", + "name": "FromEventType", + "cc": 6, + "sloc": 14, + "line": 567, + "mass": 22.45 + }, + { + "path": "openmeter/notification/httpdriver/rule.go", + "name": "TestRule", + "cc": 6, + "sloc": 55, + "line": 292, + "mass": 44.5 + }, + { + "path": "openmeter/notification/internal/rule.go", + "name": "Generate", + "cc": 6, + "sloc": 15, + "line": 53, + "mass": 23.24 + }, + { + "path": "openmeter/notification/service/channel.go", + "name": "DeleteChannel", + "cc": 6, + "sloc": 42, + "line": 96, + "mass": 38.88 + }, + { + "path": "openmeter/notification/webhook/handler.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 67, + "mass": 24.0 + }, + { + "path": "openmeter/notification/webhook/handler.go", + "name": "Validate", + "cc": 6, + "sloc": 21, + "line": 104, + "mass": 27.5 + }, + { + "path": "openmeter/notification/webhook/svix/internal/error.go", + "name": "Wrap", + "cc": 6, + "sloc": 14, + "line": 38, + "mass": 22.45 + }, + { + "path": "openmeter/productcatalog/addon.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 75, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "name": "DeleteAddon", + "cc": 6, + "sloc": 39, + "line": 259, + "mass": 37.47 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "FromPlanPhaseRow", + "cc": 6, + "sloc": 31, + "line": 258, + "mass": 33.41 + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "name": "asAddonRateCardRow", + "cc": 6, + "sloc": 34, + "line": 353, + "mass": 34.99 + }, + { + "path": "openmeter/productcatalog/addon/addon.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 33, + "mass": 25.46 + }, + { + "path": "openmeter/productcatalog/addon/assert.go", + "name": "AssertAddonUpdateInputEqual", + "cc": 6, + "sloc": 19, + "line": 27, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/addon/errors.go", + "name": "NewNotFoundError", + "cc": 6, + "sloc": 26, + "line": 19, + "mass": 30.59 + }, + { + "path": "openmeter/productcatalog/addon/ratecard.go", + "name": "UnmarshalJSON", + "cc": 6, + "sloc": 30, + "line": 117, + "mass": 32.86 + }, + { + "path": "openmeter/productcatalog/addon/service/service.go", + "name": "New", + "cc": 6, + "sloc": 25, + "line": 22, + "mass": 30.0 + }, + { + "path": "openmeter/productcatalog/alignment.go", + "name": "ValidateBillingCadencesAlign", + "cc": 6, + "sloc": 19, + "line": 12, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/driver/feature.go", + "name": "CreateFeature", + "cc": 6, + "sloc": 47, + "line": 116, + "mass": 41.13 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "MarshalJSON", + "cc": 6, + "sloc": 38, + "line": 66, + "mass": 36.99 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 149, + "mass": 23.24 + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "name": "Equal", + "cc": 6, + "sloc": 12, + "line": 372, + "mass": 20.78 + }, + { + "path": "openmeter/productcatalog/featureresolver/ratecard_test.go", + "name": "Test_ResolveFeaturesForRateCards", + "cc": 6, + "sloc": 249, + "line": 21, + "mass": 94.68 + }, + { + "path": "openmeter/productcatalog/phase.go", + "name": "Equal", + "cc": 6, + "sloc": 19, + "line": 35, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/plan/adapter/phase.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 29, + "mass": 24.0 + }, + { + "path": "openmeter/productcatalog/plan/assert.go", + "name": "AssertPlanUpdateInputEqual", + "cc": 6, + "sloc": 19, + "line": 27, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/plan/errors.go", + "name": "NewNotFoundError", + "cc": 6, + "sloc": 26, + "line": 19, + "mass": 30.59 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/mapping.go", + "name": "AsCreatePlanRequest", + "cc": 6, + "sloc": 39, + "line": 90, + "mass": 37.47 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/mapping.go", + "name": "AsUpdatePlanRequest", + "cc": 6, + "sloc": 32, + "line": 185, + "mass": 33.94 + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/plan.go", + "name": "ListPlans", + "cc": 6, + "sloc": 64, + "line": 32, + "mass": 48.0 + }, + { + "path": "openmeter/productcatalog/plan/phase.go", + "name": "Equal", + "cc": 6, + "sloc": 18, + "line": 68, + "mass": 25.46 + }, + { + "path": "openmeter/productcatalog/plan/ratecard.go", + "name": "UnmarshalJSON", + "cc": 6, + "sloc": 29, + "line": 117, + "mass": 32.31 + }, + { + "path": "openmeter/productcatalog/plan/service/service.go", + "name": "New", + "cc": 6, + "sloc": 25, + "line": 22, + "mass": 30.0 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "name": "CreatePlanAddon", + "cc": 6, + "sloc": 56, + "line": 164, + "mass": 44.9 + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "name": "DeletePlanAddon", + "cc": 6, + "sloc": 46, + "line": 229, + "mass": 40.69 + }, + { + "path": "openmeter/productcatalog/planaddon/errors.go", + "name": "NewNotFoundError", + "cc": 6, + "sloc": 26, + "line": 19, + "mass": 30.59 + }, + { + "path": "openmeter/productcatalog/planaddon/planaddon.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 27, + "mass": 26.15 + }, + { + "path": "openmeter/productcatalog/planaddon/service.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 198, + "mass": 24.74 + }, + { + "path": "openmeter/productcatalog/planaddon/service/service.go", + "name": "New", + "cc": 6, + "sloc": 25, + "line": 21, + "mass": 30.0 + }, + { + "path": "openmeter/productcatalog/price.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 842, + "mass": 24.74 + }, + { + "path": "openmeter/productcatalog/subscription/http/cancel.go", + "name": "CancelSubscription", + "cc": 6, + "sloc": 50, + "line": 28, + "mass": 42.43 + }, + { + "path": "openmeter/productcatalog/subscription/http/migrate.go", + "name": "MigrateSubscription", + "cc": 6, + "sloc": 49, + "line": 24, + "mass": 42.0 + }, + { + "path": "openmeter/productcatalog/subscription/service/service.go", + "name": "zeroPhasesBeforeStartingPhase", + "cc": 6, + "sloc": 21, + "line": 38, + "mass": 27.5 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "Validate", + "cc": 6, + "sloc": 17, + "line": 72, + "mass": 24.74 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "Validate", + "cc": 6, + "sloc": 16, + "line": 183, + "mass": 24.0 + }, + { + "path": "openmeter/productcatalog/tax.go", + "name": "ToTaxConfig", + "cc": 6, + "sloc": 17, + "line": 204, + "mass": 24.74 + }, + { + "path": "openmeter/productcatalog/testutils/env.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 59, + "mass": 25.46 + }, + { + "path": "openmeter/sink/flushhandler/meters.go", + "name": "newMetrics", + "cc": 6, + "sloc": 20, + "line": 17, + "mass": 26.83 + }, + { + "path": "openmeter/sink/sink.go", + "name": "reportFlushMetrics", + "cc": 6, + "sloc": 16, + "line": 408, + "mass": 24.0 + }, + { + "path": "openmeter/sink/sink.go", + "name": "updateTopicSubscription", + "cc": 6, + "sloc": 27, + "line": 555, + "mass": 31.18 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 43, + "mass": 25.46 + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "name": "queryCountEvents", + "cc": 6, + "sloc": 31, + "line": 438, + "mass": 33.41 + }, + { + "path": "openmeter/streaming/clickhouse/subject_query.go", + "name": "toSQL", + "cc": 6, + "sloc": 23, + "line": 22, + "mass": 28.77 + }, + { + "path": "openmeter/streaming/query_params_test.go", + "name": "TestQueryParamsValidate", + "cc": 6, + "sloc": 71, + "line": 24, + "mass": 50.56 + }, + { + "path": "openmeter/streaming/retry/retry.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 27, + "mass": 26.15 + }, + { + "path": "openmeter/streaming/testutils/streaming.go", + "name": "QueryMeter", + "cc": 6, + "sloc": 18, + "line": 107, + "mass": 25.46 + }, + { + "path": "openmeter/streaming/usageattribution.go", + "name": "Validate", + "cc": 6, + "sloc": 15, + "line": 41, + "mass": 23.24 + }, + { + "path": "openmeter/subject/service/hooks/customersubject_test.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 240, + "mass": 25.46 + }, + { + "path": "openmeter/subject/service/service.go", + "name": "Update", + "cc": 6, + "sloc": 26, + "line": 57, + "mass": 30.59 + }, + { + "path": "openmeter/subject/service/service.go", + "name": "Delete", + "cc": 6, + "sloc": 21, + "line": 117, + "mass": 27.5 + }, + { + "path": "openmeter/subject/testutils/env.go", + "name": "Close", + "cc": 6, + "sloc": 18, + "line": 61, + "mass": 25.46 + }, + { + "path": "openmeter/subscription/addon/addon.go", + "name": "GetInstances", + "cc": 6, + "sloc": 42, + "line": 49, + "mass": 38.88 + }, + { + "path": "openmeter/subscription/addon/diff/apply.go", + "name": "setItemRelativeCadence", + "cc": 6, + "sloc": 14, + "line": 203, + "mass": 22.45 + }, + { + "path": "openmeter/subscription/addon/repo/mapping.go", + "name": "MapSubscriptionAddon", + "cc": 6, + "sloc": 44, + "line": 17, + "mass": 39.8 + }, + { + "path": "openmeter/subscription/annotations.go", + "name": "ListOwnerSubSystems", + "cc": 6, + "sloc": 22, + "line": 37, + "mass": 28.14 + }, + { + "path": "openmeter/subscription/patch/unscheduleedit.go", + "name": "ApplyTo", + "cc": 6, + "sloc": 22, + "line": 40, + "mass": 28.14 + }, + { + "path": "openmeter/subscription/service/service.go", + "name": "GetView", + "cc": 6, + "sloc": 28, + "line": 431, + "mass": 31.75 + }, + { + "path": "openmeter/subscription/service/servicevalidation.go", + "name": "validateCancel", + "cc": 6, + "sloc": 24, + "line": 83, + "mass": 29.39 + }, + { + "path": "openmeter/subscription/service/sync_test.go", + "name": "TestDeleteScheduledDowngradeCanExpandDeletedSubscriptionForSync", + "cc": 6, + "sloc": 78, + "line": 383, + "mass": 52.99 + }, + { + "path": "openmeter/subscription/service/synchelpers.go", + "name": "createPhase", + "cc": 6, + "sloc": 42, + "line": 15, + "mass": 38.88 + }, + { + "path": "openmeter/subscription/state.go", + "name": "CanTransitionOrErr", + "cc": 6, + "sloc": 24, + "line": 59, + "mass": 29.39 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetCurrentPhaseAt", + "cc": 6, + "sloc": 18, + "line": 167, + "mass": 25.46 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "ValidateAlignment", + "cc": 6, + "sloc": 23, + "line": 336, + "mass": 28.77 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "UnmarshalJSON", + "cc": 6, + "sloc": 32, + "line": 629, + "mass": 33.94 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "UnmarshalJSON", + "cc": 6, + "sloc": 28, + "line": 674, + "mass": 31.75 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "GetFullServicePeriodAt", + "cc": 6, + "sloc": 26, + "line": 828, + "mass": 30.59 + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "name": "SyncAnnotations", + "cc": 6, + "sloc": 15, + "line": 995, + "mass": 23.24 + }, + { + "path": "openmeter/subscription/testutils/builder.go", + "name": "AddPhase", + "cc": 6, + "sloc": 45, + "line": 82, + "mass": 40.25 + }, + { + "path": "openmeter/subscription/testutils/db.go", + "name": "SetupDBDeps", + "cc": 6, + "sloc": 33, + "line": 41, + "mass": 34.47 + }, + { + "path": "openmeter/subscription/testutils/ratecard.go", + "name": "GetEntitlementTemplateUsagePeriod", + "cc": 6, + "sloc": 14, + "line": 129, + "mass": 22.45 + }, + { + "path": "openmeter/subscription/timing.go", + "name": "Validate", + "cc": 6, + "sloc": 12, + "line": 19, + "mass": 20.78 + }, + { + "path": "openmeter/subscription/timing.go", + "name": "Resolve", + "cc": 6, + "sloc": 18, + "line": 35, + "mass": 25.46 + }, + { + "path": "openmeter/subscription/timing.go", + "name": "isDateAlignedWithBillingCadence", + "cc": 6, + "sloc": 22, + "line": 172, + "mass": 28.14 + }, + { + "path": "openmeter/subscription/uniqueness.go", + "name": "Validate", + "cc": 6, + "sloc": 24, + "line": 80, + "mass": 29.39 + }, + { + "path": "openmeter/subscription/uniqueness.go", + "name": "collectRelevantItems", + "cc": 6, + "sloc": 23, + "line": 135, + "mass": 28.77 + }, + { + "path": "openmeter/subscription/validators/subscription/validator.go", + "name": "pipelineAfter", + "cc": 6, + "sloc": 23, + "line": 205, + "mass": 28.77 + }, + { + "path": "openmeter/subscription/workflow/service/subscription_test.go", + "name": "TestEditRunning", + "cc": 6, + "sloc": 181, + "line": 163, + "mass": 80.72 + }, + { + "path": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "name": "GetOrganizationDefaultTaxCodes", + "cc": 6, + "sloc": 24, + "line": 16, + "mass": 29.39 + }, + { + "path": "openmeter/taxcode/adapter/taxcode.go", + "name": "DeleteTaxCode", + "cc": 6, + "sloc": 27, + "line": 191, + "mass": 31.18 + }, + { + "path": "openmeter/taxcode/namespacehandler.go", + "name": "ensureTaxCode", + "cc": 6, + "sloc": 36, + "line": 159, + "mass": 36.0 + }, + { + "path": "openmeter/taxcode/taxcode.go", + "name": "Validate", + "cc": 6, + "sloc": 19, + "line": 21, + "mass": 26.15 + }, + { + "path": "openmeter/testutils/pg_driver.go", + "name": "InitPostgresDB", + "cc": 6, + "sloc": 42, + "line": 104, + "mass": 38.88 + }, + { + "path": "openmeter/watermill/eventbus/eventbus.go", + "name": "New", + "cc": 6, + "sloc": 29, + "line": 124, + "mass": 32.31 + }, + { + "path": "openmeter/watermill/marshaler/marshaler.go", + "name": "NewCloudEvent", + "cc": 6, + "sloc": 29, + "line": 85, + "mass": 32.31 + }, + { + "path": "pkg/datetime/datetime_test.go", + "name": "TestDuration_Add_Fuzz", + "cc": 6, + "sloc": 39, + "line": 203, + "mass": 37.47 + }, + { + "path": "pkg/datetime/format.go", + "name": "fallbackRFC9557FormatLayout", + "cc": 6, + "sloc": 14, + "line": 19, + "mass": 22.45 + }, + { + "path": "pkg/filter/filter.go", + "name": "validateSingleOperator", + "cc": 6, + "sloc": 18, + "line": 861, + "mass": 25.46 + }, + { + "path": "pkg/filter/filter.go", + "name": "isEmptyFilter", + "cc": 6, + "sloc": 14, + "line": 883, + "mass": 22.45 + }, + { + "path": "pkg/filter/filter_test.go", + "name": "TestFilterString_Match", + "cc": 6, + "sloc": 117, + "line": 2584, + "mass": 64.9 + }, + { + "path": "pkg/framework/commonhttp/encoder.go", + "name": "GetMediaType", + "cc": 6, + "sloc": 56, + "line": 19, + "mass": 44.9 + }, + { + "path": "pkg/framework/entutils/pgjsonb.go", + "name": "JSONBIn", + "cc": 6, + "sloc": 39, + "line": 15, + "mass": 37.47 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/cursor.go", + "name": "Cursor", + "cc": 6, + "sloc": 41, + "line": 16, + "mass": 38.42 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "String", + "cc": 6, + "sloc": 16, + "line": 325, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "Int", + "cc": 6, + "sloc": 16, + "line": 372, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "Float64", + "cc": 6, + "sloc": 16, + "line": 419, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "name": "Bool", + "cc": 6, + "sloc": 16, + "line": 466, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 139, + "mass": 28.14 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 650, + "mass": 23.24 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "name": "ResetField", + "cc": 6, + "sloc": 18, + "line": 480, + "mass": 25.46 + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/runtime.go", + "name": "init", + "cc": 6, + "sloc": 17, + "line": 15, + "mass": 24.74 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "String", + "cc": 6, + "sloc": 16, + "line": 325, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "Int", + "cc": 6, + "sloc": 16, + "line": 372, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "Float64", + "cc": 6, + "sloc": 16, + "line": 419, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "name": "Bool", + "cc": 6, + "sloc": 16, + "line": 466, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "name": "sqlSave", + "cc": 6, + "sloc": 22, + "line": 139, + "mass": 28.14 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "name": "Exec", + "cc": 6, + "sloc": 15, + "line": 650, + "mass": 23.24 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_delete.go", + "name": "sqlExec", + "cc": 6, + "sloc": 17, + "line": 42, + "mass": 24.74 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "Only", + "cc": 6, + "sloc": 15, + "line": 111, + "mass": 23.24 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "name": "OnlyID", + "cc": 6, + "sloc": 16, + "line": 138, + "mass": 24.0 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "name": "ResetField", + "cc": 6, + "sloc": 18, + "line": 480, + "mass": 25.46 + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/runtime.go", + "name": "init", + "cc": 6, + "sloc": 17, + "line": 15, + "mass": 24.74 + }, + { + "path": "pkg/framework/lockr/locker.go", + "name": "lock", + "cc": 6, + "sloc": 23, + "line": 65, + "mass": 28.77 + }, + { + "path": "pkg/framework/pgdriver/driver.go", + "name": "NewPostgresDriver", + "cc": 6, + "sloc": 34, + "line": 80, + "mass": 34.99 + }, + { + "path": "pkg/kafka/config.go", + "name": "mergeConfigsToMap", + "cc": 6, + "sloc": 24, + "line": 430, + "mass": 29.39 + }, + { + "path": "pkg/kafka/config.go", + "name": "String", + "cc": 6, + "sloc": 38, + "line": 686, + "mass": 36.99 + }, + { + "path": "pkg/kafka/config_test.go", + "name": "TestTimeDurationMilliSeconds", + "cc": 6, + "sloc": 55, + "line": 215, + "mass": 44.5 + }, + { + "path": "pkg/kafka/metrics/internal/topic.go", + "name": "Add", + "cc": 6, + "sloc": 22, + "line": 294, + "mass": 28.14 + }, + { + "path": "pkg/kafka/metrics/internal/topic.go", + "name": "NewTopicMetrics", + "cc": 6, + "sloc": 31, + "line": 322, + "mass": 33.41 + }, + { + "path": "pkg/kafka/metrics/stats/broker.go", + "name": "Int64", + "cc": 6, + "sloc": 28, + "line": 42, + "mass": 31.75 + }, + { + "path": "pkg/models/annotation.go", + "name": "Merge", + "cc": 6, + "sloc": 20, + "line": 94, + "mass": 26.83 + }, + { + "path": "pkg/models/attributes.go", + "name": "AsStringMap", + "cc": 6, + "sloc": 21, + "line": 18, + "mass": 27.5 + }, + { + "path": "pkg/models/cadence.go", + "name": "Equal", + "cc": 6, + "sloc": 14, + "line": 26, + "mass": 22.45 + }, + { + "path": "pkg/models/validationissue.go", + "name": "WithAttrs", + "cc": 6, + "sloc": 16, + "line": 121, + "mass": 24.0 + }, + { + "path": "pkg/models/validationissue.go", + "name": "equalValidationIssueAttributeValue", + "cc": 6, + "sloc": 10, + "line": 181, + "mass": 18.97 + }, + { + "path": "pkg/pagination/v2/collect_test.go", + "name": "TestCollectAllV2_ErrorMidway", + "cc": 6, + "sloc": 28, + "line": 128, + "mass": 31.75 + }, + { + "path": "pkg/statelessx/actions.go", + "name": "AllOf", + "cc": 6, + "sloc": 26, + "line": 22, + "mass": 30.59 + }, + { + "path": "pkg/timeutil/boundedperiod.go", + "name": "ContainsExclusive", + "cc": 6, + "sloc": 10, + "line": 41, + "mass": 18.97 + }, + { + "path": "pkg/timeutil/openperiod.go", + "name": "Contains", + "cc": 6, + "sloc": 9, + "line": 70, + "mass": 18.0 + }, + { + "path": "test/billing/customeroverride_test.go", + "name": "TestListCustomerOverrides", + "cc": 6, + "sloc": 148, + "line": 489, + "mass": 72.99 + }, + { + "path": "test/billing/invoice_test.go", + "name": "TestUBPGraduatingFlatFeeTier1", + "cc": 6, + "sloc": 200, + "line": 2363, + "mass": 84.85 + }, + { + "path": "test/credits/base.go", + "name": "CreateMockChargeIntent", + "cc": 6, + "sloc": 51, + "line": 211, + "mass": 42.85 + }, + { + "path": "test/credits/base.go", + "name": "Validate", + "cc": 6, + "sloc": 18, + "line": 593, + "mass": 25.46 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceDeletePatchDeletesPendingGatheringLine", + "cc": 6, + "sloc": 89, + "line": 41, + "mass": 56.6 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoiceDeletePatchDeletesPendingGatheringLine", + "cc": 6, + "sloc": 88, + "line": 649, + "mass": 56.28 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoicePartialCreditPaymentLifecyclePersistsRunState", + "cc": 6, + "sloc": 214, + "line": 1281, + "mass": 87.77 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoiceInArrearsActivatesAtServiceStartAndInvoicesAtInvoiceAt", + "cc": 6, + "sloc": 131, + "line": 2494, + "mass": 68.67 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoiceShrinkExtendPatchReplacesPendingGatheringLineWithProratedAmount", + "cc": 6, + "sloc": 132, + "line": 2734, + "mass": 68.93 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestFlatFeeCreditThenInvoiceImmutableShrinkExtendShrinkSkipsReplacementGatheringLines", + "cc": 6, + "sloc": 194, + "line": 3199, + "mass": 83.57 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchUpdatesPendingGatheringLine", + "cc": 6, + "sloc": 100, + "line": 3412, + "mass": 60.0 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceShrinkPatchUpdatesPendingGatheringLine", + "cc": 6, + "sloc": 98, + "line": 3528, + "mass": 59.4 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchDuringAwaitingPaymentSettlementReclassifiesFinalRunAndKeepsLedgerBookings", + "cc": 6, + "sloc": 170, + "line": 4497, + "mass": 78.23 + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "name": "mustGatheringLinesForCharge", + "cc": 6, + "sloc": 25, + "line": 5236, + "mass": 30.0 + }, + { + "path": "test/credits/sanity_test.go", + "name": "assertAdvanceBackfillBreakageReopenedRows", + "cc": 6, + "sloc": 40, + "line": 1061, + "mass": 37.95 + }, + { + "path": "test/credits/sanity_test.go", + "name": "assertBreakagePlanReleaseAndReopen", + "cc": 6, + "sloc": 37, + "line": 1107, + "mass": 36.5 + } + ], + "duplicates": [ + { + "file_a": "openmeter/ent/db/ent.go", + "line_a": 242, + "file_b": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "line_b": 79, + "lines": 530 + }, + { + "file_a": "openmeter/ent/db/ent.go", + "line_a": 242, + "file_b": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "line_b": 79, + "lines": 530 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "line_a": 79, + "file_b": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "line_b": 79, + "lines": 530 + }, + { + "file_a": "openmeter/productcatalog/planaddon/adapter/adapter_test.go", + "line_a": 28, + "file_b": "openmeter/productcatalog/planaddon/service/service_test.go", + "line_b": 28, + "lines": 208 + }, + { + "file_a": "openmeter/ent/db/hook/hook.go", + "line_a": 961, + "file_b": "pkg/framework/entutils/testutils/ent1/db/hook/hook.go", + "line_b": 25, + "lines": 175 + }, + { + "file_a": "openmeter/ent/db/hook/hook.go", + "line_a": 961, + "file_b": "pkg/framework/entutils/testutils/ent2/db/hook/hook.go", + "line_b": 25, + "lines": 175 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/hook/hook.go", + "line_a": 25, + "file_b": "pkg/framework/entutils/testutils/ent2/db/hook/hook.go", + "line_b": 25, + "lines": 175 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go", + "line_a": 61, + "file_b": "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go", + "line_b": 61, + "lines": 151 + }, + { + "file_a": "cmd/billing-worker/wire_gen.go", + "line_a": 226, + "file_b": "cmd/jobs/internal/wire_gen.go", + "line_b": 235, + "lines": 138 + }, + { + "file_a": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "line_a": 225, + "file_b": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "line_b": 209, + "lines": 138 + }, + { + "file_a": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "line_a": 225, + "file_b": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "line_b": 235, + "lines": 138 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "line_a": 209, + "file_b": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "line_b": 235, + "lines": 138 + }, + { + "file_a": "openmeter/ent/db/tx.go", + "line_a": 179, + "file_b": "pkg/framework/entutils/testutils/ent1/db/tx.go", + "line_b": 21, + "lines": 129 + }, + { + "file_a": "openmeter/ent/db/tx.go", + "line_a": 179, + "file_b": "pkg/framework/entutils/testutils/ent2/db/tx.go", + "line_b": 21, + "lines": 129 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/tx.go", + "line_a": 21, + "file_b": "pkg/framework/entutils/testutils/ent2/db/tx.go", + "line_b": 21, + "lines": 129 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "line_a": 281, + "file_b": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "line_b": 317, + "lines": 123 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "line_a": 281, + "file_b": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "line_b": 321, + "lines": 123 + }, + { + "file_a": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "line_a": 317, + "file_b": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "line_b": 321, + "lines": 123 + }, + { + "file_a": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "line_a": 260, + "file_b": "openmeter/subject/service/hooks/customersubject_test.go", + "line_b": 212, + "lines": 104 + }, + { + "file_a": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "line_a": 460, + "file_b": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "line_b": 425, + "lines": 103 + }, + { + "file_a": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "line_a": 460, + "file_b": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "line_b": 479, + "lines": 103 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "line_a": 425, + "file_b": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "line_b": 479, + "lines": 103 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go", + "line_a": 140, + "file_b": "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go", + "line_b": 131, + "lines": 99 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchase.go", + "line_a": 560, + "file_b": "openmeter/ent/db/chargeflatfee.go", + "line_b": 584, + "lines": 94 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchase.go", + "line_a": 560, + "file_b": "openmeter/ent/db/chargeusagebased.go", + "line_b": 581, + "lines": 94 + }, + { + "file_a": "openmeter/ent/db/chargeflatfee.go", + "line_a": 584, + "file_b": "openmeter/ent/db/chargeusagebased.go", + "line_b": 581, + "lines": 94 + }, + { + "file_a": "openmeter/ent/db/migrate/migrate.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "line_b": 3, + "lines": 94 + }, + { + "file_a": "openmeter/ent/db/migrate/migrate.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "line_b": 3, + "lines": 94 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "line_b": 3, + "lines": 94 + }, + { + "file_a": "api/client/python/openmeter/_generated/aio/operations/__init__.py", + "line_a": 4, + "file_b": "api/client/python/openmeter/_generated/operations/__init__.py", + "line_b": 4, + "lines": 90 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/client.go", + "line_a": 43, + "file_b": "pkg/framework/entutils/testutils/ent2/db/client.go", + "line_b": 43, + "lines": 90 + }, + { + "file_a": "openmeter/ent/db/expose.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent1/db/expose.go", + "line_b": 3, + "lines": 89 + }, + { + "file_a": "openmeter/ent/db/expose.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent2/db/expose.go", + "line_b": 3, + "lines": 89 + }, + { + "file_a": "pkg/framework/entutils/testutils/ent1/db/expose.go", + "line_a": 3, + "file_b": "pkg/framework/entutils/testutils/ent2/db/expose.go", + "line_b": 3, + "lines": 89 + }, + { + "file_a": "openmeter/ent/db/addonratecard/addonratecard.go", + "line_a": 168, + "file_b": "openmeter/ent/db/planratecard/planratecard.go", + "line_b": 168, + "lines": 88 + }, + { + "file_a": "api/client/python/openmeter/_generated/_types.py", + "line_a": 3, + "file_b": "api/client/python/openmeter/_types.py", + "line_b": 3, + "lines": 87 + }, + { + "file_a": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "line_a": 6955, + "file_b": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "line_b": 4769, + "lines": 87 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "line_a": 289, + "file_b": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "line_b": 173, + "lines": 85 + }, + { + "file_a": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "line_a": 325, + "file_b": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "line_b": 173, + "lines": 85 + }, + { + "file_a": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "line_a": 173, + "file_b": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "line_b": 329, + "lines": 85 + }, + { + "file_a": "openmeter/productcatalog/addon/ratecard_test.go", + "line_a": 85, + "file_b": "openmeter/productcatalog/plan/ratecard_test.go", + "line_b": 85, + "lines": 85 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "line_a": 132, + "file_b": "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "line_b": 123, + "lines": 83 + }, + { + "file_a": "cmd/balance-worker/main.go", + "line_a": 1, + "file_b": "cmd/billing-worker/main.go", + "line_b": 1, + "lines": 80 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "line_a": 132, + "file_b": "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "line_b": 132, + "lines": 78 + }, + { + "file_a": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "line_a": 132, + "file_b": "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "line_b": 123, + "lines": 78 + }, + { + "file_a": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "line_a": 260, + "file_b": "openmeter/customer/testutils/env.go", + "line_b": 27, + "lines": 77 + }, + { + "file_a": "openmeter/customer/testutils/env.go", + "line_a": 27, + "file_b": "openmeter/subject/service/hooks/customersubject_test.go", + "line_b": 212, + "lines": 77 + }, + { + "file_a": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "line_a": 6726, + "file_b": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "line_b": 4562, + "lines": 75 + }, + { + "file_a": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "line_a": 6057, + "file_b": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "line_b": 4057, + "lines": 73 + }, + { + "file_a": "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go", + "line_a": 205, + "file_b": "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go", + "line_b": 228, + "lines": 73 + } + ] +} diff --git a/.archie/health_history.json b/.archie/health_history.json new file mode 100644 index 0000000000..d5bcb84e5f --- /dev/null +++ b/.archie/health_history.json @@ -0,0 +1,20 @@ +[ + { + "timestamp": "2026-06-05T14:59:32.278349+00:00", + "erosion": 0.5408, + "gini": 0.7709, + "top20_share": 0.8275, + "verbosity": 0.1125, + "total_loc": 834052, + "scan_type": "deep" + }, + { + "timestamp": "2026-06-05T17:18:30.467565+00:00", + "erosion": 0.5408, + "gini": 0.7709, + "top20_share": 0.8275, + "verbosity": 0.1125, + "total_loc": 834052, + "scan_type": "deep" + } +] diff --git a/.archie/hooks/blueprint-nudge.sh b/.archie/hooks/blueprint-nudge.sh new file mode 100755 index 0000000000..0056cde2e1 --- /dev/null +++ b/.archie/hooks/blueprint-nudge.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Archie blueprint nudge — reminds the AI about project architecture before searching. +# Fires on Glob|Grep so the agent reads architecture context before exploring the +# codebase. Inspired by Graphify's always-on hook pattern. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +BLUEPRINT="$PROJECT_ROOT/.archie/blueprint.json" +[ ! -f "$BLUEPRINT" ] && exit 0 +MARKER="/tmp/.archie_nudge_$$" +[ -f "$MARKER" ] && exit 0 +touch "$MARKER" +python3 -c " +import json, os +bp_path = os.path.join('$PROJECT_ROOT', '.archie', 'blueprint.json') +try: + with open(bp_path) as f: + bp = json.load(f) + comps = bp.get('components', {}).get('components', []) + names = [c.get('name', '') for c in comps[:5] if c.get('name')] + style = bp.get('decisions', {}).get('architectural_style', {}) + ptype = style.get('style', '') if isinstance(style, dict) else str(style) + parts = [] + if ptype: + parts.append(ptype) + if names: + parts.append('Components: ' + ', '.join(names)) + if parts: + print('[Archie] ' + ' | '.join(parts)) + print('[Archie] Read .archie/blueprint.json for architecture context before searching.') +except Exception: + pass +" 2>/dev/null +exit 0 diff --git a/.archie/hooks/post-lint.sh b/.archie/hooks/post-lint.sh new file mode 100755 index 0000000000..b9b01f4a4a --- /dev/null +++ b/.archie/hooks/post-lint.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Archie lint gate — opt-in via .archie/enforcement.json. +# Runs the project's native linter on a single changed file after Write/Edit/MultiEdit. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +CFG="$PROJECT_ROOT/.archie/enforcement.json" +GATE="$PROJECT_ROOT/.archie/lint_gate.py" +[ ! -f "$CFG" ] && exit 0 +[ ! -f "$GATE" ] && exit 0 +export _ARCHIE_ROOT="$PROJECT_ROOT" +python3 "$GATE" diff --git a/.archie/hooks/post-plan-review.sh b/.archie/hooks/post-plan-review.sh new file mode 100755 index 0000000000..8b2925f35f --- /dev/null +++ b/.archie/hooks/post-plan-review.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Archie post-plan review — Phase 3 semantic comparison. +# Pipes the PostToolUse ExitPlanMode envelope to align_check.py, which +# pulls the plan text, runs the architectural-rule classifier (Haiku +# via claude CLI), and exits 2 if any decision_violation or +# pitfall_triggered fires. Falls back to advisory mode if classifier unavailable. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +[ ! -f "$PROJECT_ROOT/.archie/blueprint.json" ] && exit 0 +TOOL_INPUT=$(cat || true) +[ -z "$TOOL_INPUT" ] && exit 0 +ALIGN="$PROJECT_ROOT/.archie/align_check.py" +if [ -f "$ALIGN" ]; then + printf '%s' "$TOOL_INPUT" | python3 "$ALIGN" plan "$PROJECT_ROOT" + rc=$? + if [ $rc -ne 0 ]; then + exit $rc + fi +fi +python3 "$PROJECT_ROOT/.archie/arch_review.py" plan "$PROJECT_ROOT" diff --git a/.archie/hooks/pre-commit-review.sh b/.archie/hooks/pre-commit-review.sh new file mode 100755 index 0000000000..2af4fa54ca --- /dev/null +++ b/.archie/hooks/pre-commit-review.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Archie pre-commit review — Phase 3 semantic comparison on the staged diff. +# Same flow as post-plan-review: align_check.py classifier first (blocks +# on decision_violation / pitfall_triggered), then arch_review prose context. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +[ ! -f "$PROJECT_ROOT/.archie/blueprint.json" ] && exit 0 +TOOL_INPUT=$(cat || true) +COMMAND=$(echo "$TOOL_INPUT" | python3 -c " +import sys, json +try: print(json.load(sys.stdin).get('tool_input',{}).get('command','')) +except: print('') +" 2>/dev/null || echo "") +case "$COMMAND" in *git\ commit*|*git\ -C*commit*) ;; *) exit 0 ;; esac +ALIGN="$PROJECT_ROOT/.archie/align_check.py" +if [ -f "$ALIGN" ]; then + python3 "$ALIGN" commit "$PROJECT_ROOT" + rc=$? + if [ $rc -ne 0 ]; then + exit $rc + fi +fi +python3 "$PROJECT_ROOT/.archie/arch_review.py" diff "$PROJECT_ROOT" diff --git a/.archie/hooks/pre-turn.sh b/.archie/hooks/pre-turn.sh new file mode 100755 index 0000000000..035dda39df --- /dev/null +++ b/.archie/hooks/pre-turn.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Archie pre-turn reset — clears the per-turn rule-injection marker so the +# next Write/Edit surfaces applicable rules again. Runs on UserPromptSubmit. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +TURN_HASH=$(printf '%s' "$PROJECT_ROOT" | cksum | awk '{print $1}') +rm -f "/tmp/.archie_turn_$TURN_HASH" +exit 0 diff --git a/.archie/hooks/pre-validate.sh b/.archie/hooks/pre-validate.sh new file mode 100755 index 0000000000..fe447bf076 --- /dev/null +++ b/.archie/hooks/pre-validate.sh @@ -0,0 +1,323 @@ +#!/usr/bin/env bash +# Archie pre-validate hook (canonical, source of truth). +# Reads rules.json + platform_rules.json, matches against the tool_input, +# emits agent-facing rule context, and exits 2 if any blocking rule fires. +# +# This script is invoked by: +# - Claude Code's .claude/settings.json PreToolUse[Edit|Write|MultiEdit] hook +# - Codex's .codex/hooks.json PreToolUse[apply_patch] hook (Stage 3) +# - Pi's .pi/extensions/archie-hooks.ts (shells out to this; Stage 5) +# Each CLI normalizes its tool_call envelope to the same JSON shape that this +# script expects on stdin: { tool_name, tool_input, ... }. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +RULES_FILE="$PROJECT_ROOT/.archie/rules.json" +PLATFORM_RULES_FILE="$PROJECT_ROOT/.archie/platform_rules.json" +# Fail open if no rules at all. +if [ ! -f "$RULES_FILE" ] && [ ! -f "$PLATFORM_RULES_FILE" ]; then + exit 0 +fi +TOOL_INPUT=$(cat || true) +[ -z "$TOOL_INPUT" ] && exit 0 + +# Stable-named turn marker (cleared by pre-turn.sh on UserPromptSubmit). +# Holds rule IDs already injected this turn so we don't re-surface the same +# rule on every subsequent Write/Edit in the chain. +TURN_HASH=$(printf '%s' "$PROJECT_ROOT" | cksum | awk '{print $1}') +TURN_FILE="/tmp/.archie_turn_$TURN_HASH" + +# Stash the whole tool-call JSON in a temp file so Python can parse it +# without shell quoting corrupting backslashes, newlines, or quotes in content. +TOOL_JSON=$(mktemp) +printf '%s' "$TOOL_INPUT" > "$TOOL_JSON" +export _ARCHIE_TOOL_JSON="$TOOL_JSON" +export _ARCHIE_ROOT="$PROJECT_ROOT" +export _ARCHIE_RULES="$RULES_FILE" +export _ARCHIE_PLATFORM_RULES="$PLATFORM_RULES_FILE" +export _ARCHIE_TURN_FILE="$TURN_FILE" +trap 'rm -f "$TOOL_JSON"' EXIT + +python3 << 'PYEOF' +import json, sys, os, re, fnmatch + +tool_json_file = os.environ.get("_ARCHIE_TOOL_JSON", "") +project_root = os.environ.get("_ARCHIE_ROOT", ".") +rules_file = os.environ.get("_ARCHIE_RULES", "") +platform_rules_file = os.environ.get("_ARCHIE_PLATFORM_RULES", "") +turn_file = os.environ.get("_ARCHIE_TURN_FILE", "") + +try: + with open(tool_json_file) as f: + data = json.load(f) +except Exception: + sys.exit(0) + +tool_name = data.get("tool_name", "") +# Accept Claude's Write|Edit|MultiEdit and Codex's apply_patch. +if tool_name not in ("Write", "Edit", "MultiEdit", "apply_patch"): + sys.exit(0) + +ti = data.get("tool_input", {}) +fp = ti.get("file_path", "") or ti.get("path", "") +if not fp: + sys.exit(0) + +def _real(p): + try: + return os.path.realpath(p) + except Exception: + return p +fp_real = _real(fp) if fp.startswith("/") else fp +project_root_real = _real(project_root) +if fp_real.startswith("/") and not fp_real.startswith(project_root_real): + sys.exit(0) + +content = ti.get("content", "") or ti.get("new_string", "") +if not content and ti.get("edits"): + content = "\n".join(e.get("new_string", "") for e in ti["edits"]) + +rules = [] +for rpath in (rules_file, platform_rules_file): + if not rpath or not os.path.isfile(rpath): + continue + try: + loaded = json.load(open(rpath)) + rules.extend(loaded.get("rules", []) if isinstance(loaded, dict) else loaded) + except Exception: + pass + +rel_path = fp +if fp_real.startswith(project_root_real): + rel_path = fp_real[len(project_root_real):].lstrip("/") +filename = os.path.basename(fp) + +SEVERITY_BLOCKING = {"decision_violation", "pitfall_triggered", "mechanical_violation"} +SEVERITY_WARN = {"tradeoff_undermined"} +SEVERITY_INFO = {"pattern_divergence"} + +def severity_label(rule): + sc = rule.get("severity_class", "") + if sc: + return sc + return "mechanical_violation" if rule.get("severity") == "error" else "tradeoff_undermined" + +def is_blocking(rule): + sc = rule.get("severity_class", "") + if sc: + return sc in SEVERITY_BLOCKING + return rule.get("severity") == "error" + +def _emit_labeled_block(label, value, prefix, sink): + if not value: + return + pad = " " * len(label + ": ") + first = True + for ln in value.splitlines() or [value]: + sink(f"{prefix} {label + ': ' if first else pad}{ln}") + first = False + +already_injected = set() +if turn_file and os.path.isfile(turn_file): + try: + already_injected = {line.strip() for line in open(turn_file) if line.strip()} + except Exception: + pass + +to_inject = [] +newly_injected = [] +for r in rules: + rid = r.get("id", "") + if not rid or rid in already_injected: + continue + applies_to = r.get("applies_to", "") + always = bool(r.get("always_inject")) + path_match = bool(applies_to) and rel_path.startswith(applies_to) + if always or path_match: + to_inject.append((r, "always" if (always and not path_match) else "path")) + already_injected.add(rid) + newly_injected.append(rid) + +if to_inject: + print(f"[Archie] Rules applying to {rel_path}:") + for r, how in to_inject: + tag = " (global)" if how == "always" else "" + rid = r.get("id", "unknown") + sev = severity_label(r) + desc = r.get("description", "") + print(f" RULE {rid}{tag} [{sev}]: {desc}") + _emit_labeled_block("WHY", r.get("why", "") or r.get("rationale", ""), " ", print) + _emit_labeled_block("FORCED BY", r.get("forced_by", ""), " ", print) + _emit_labeled_block("ENABLES", r.get("enables", ""), " ", print) + _emit_labeled_block("DO INSTEAD", r.get("alternative", ""), " ", print) + _emit_labeled_block("EXAMPLE", r.get("example", ""), " ", print) + +if newly_injected and turn_file: + try: + with open(turn_file, "a") as f: + for rid in newly_injected: + f.write(rid + "\n") + except Exception: + pass + +def any_match(patterns, text): + for p in patterns: + try: + if re.search(p, text): + return True + except re.error: + continue + return False + +def _coerce_list(v): + if v is None: + return [] + if isinstance(v, str): + return [v] + if isinstance(v, list): + return [str(x) for x in v if x] + return [] + +def _path_glob_match(rel_path, pattern): + if not pattern: + return False + if pattern.endswith("/") and "*" not in pattern: + return rel_path.startswith(pattern) or rel_path == pattern.rstrip("/") + out = ["^"] + i = 0; n = len(pattern) + while i < n: + c = pattern[i] + if c == "*": + if i + 1 < n and pattern[i + 1] == "*": + left_slash = i > 0 and pattern[i - 1] == "/" + right_slash = i + 2 < n and pattern[i + 2] == "/" + if left_slash and right_slash: + out[-1] = "(?:/.*)?/" + i += 3; continue + if right_slash: + out.append("(?:.*/)?"); i += 3; continue + if left_slash: + out[-1] = "(?:/.*)?"; i += 2; continue + out.append(".*"); i += 2; continue + out.append("[^/]*"); i += 1; continue + if c in r".+?^$()[]{}|\\": + out.append("\\" + c) + else: + out.append(c) + i += 1 + out.append("$") + try: + return bool(re.match("".join(out), rel_path)) + except re.error: + return False + +def _code_shape_match(content, shape): + if not isinstance(shape, dict) or shape.get("kind", "regex_in_content") != "regex_in_content": + return False + must_match = _coerce_list(shape.get("must_match")) + must_not = _coerce_list(shape.get("must_not_match")) + if not must_match: + return False + if not any_match(must_match, content): + return False + if must_not and any_match(must_not, content): + return False + return True + +def _trigger_fires(rule, rel_path, content): + triggers = rule.get("triggers") + if not isinstance(triggers, dict): + return False, True + globs = _coerce_list(triggers.get("path_glob")) + shapes = triggers.get("code_shape") or [] + if not isinstance(shapes, list): + shapes = [] + if not globs and not shapes: + return True, False + if globs and not any(_path_glob_match(rel_path, g) for g in globs): + return True, False + if shapes and not any(_code_shape_match(content, s) for s in shapes): + return True, False + return True, True + +errors = [] +warns = [] +infos = [] + +for r in rules: + check = r.get("check", "") + conf = r.get("confidence", 1.0) + matched = False + + has_triggers, trigger_fires = _trigger_fires(r, rel_path, content) + if has_triggers and not trigger_fires: + continue + + if check == "file_placement": + dirs = r.get("allowed_dirs", []) + if dirs and not any(fp.startswith(d) or rel_path.startswith(d) for d in dirs): + matched = True + elif check == "naming": + pat = r.get("pattern", "") + if pat and not re.search(pat, filename): + matched = True + elif check == "forbidden_import": + applies_to = r.get("applies_to", "") + if applies_to and rel_path.startswith(applies_to) and content: + matched = any_match(r.get("forbidden_patterns", []), content) + elif check == "required_pattern": + file_pat = r.get("file_pattern", "") + if file_pat and fnmatch.fnmatch(filename, file_pat) and content: + required = r.get("required_in_content", []) + if required and not any(req in content for req in required): + matched = True + elif check == "forbidden_content": + applies_to = r.get("applies_to", "") + if (not applies_to or rel_path.startswith(applies_to)) and content: + matched = any_match(r.get("forbidden_patterns", []), content) + elif check == "architectural_constraint": + file_pat = r.get("file_pattern", "") + if file_pat and fnmatch.fnmatch(filename, file_pat) and content: + matched = any_match(r.get("forbidden_patterns", []), content) + elif check == "file_naming": + applies_to = r.get("applies_to", "") + file_pat = r.get("file_pattern", "") + if applies_to and fnmatch.fnmatch(rel_path, applies_to) and file_pat: + try: + if not re.match(file_pat, filename): + matched = True + except re.error: + pass + elif not check and has_triggers and trigger_fires: + matched = True + + if not matched: + continue + + sc = r.get("severity_class", "") + if sc in SEVERITY_BLOCKING or (not sc and r.get("severity") == "error"): + errors.append((r, conf)) + elif sc in SEVERITY_INFO: + infos.append((r, conf)) + else: + warns.append((r, conf)) + +def render_fired(rule, conf, prefix_label): + rid = rule.get("id", "unknown") + sev = severity_label(rule) + desc = rule.get("description", "") + confidence_tag = f" (confidence {int(conf * 100)}%)" if conf < 1.0 else "" + print(f"[Archie] {prefix_label}{confidence_tag} {rid} [{sev}]: {desc}") + _emit_labeled_block("WHY", rule.get("why", "") or rule.get("rationale", ""), "", print) + _emit_labeled_block("FORCED BY", rule.get("forced_by", ""), "", print) + _emit_labeled_block("ENABLES", rule.get("enables", ""), "", print) + _emit_labeled_block("DO INSTEAD", rule.get("alternative", ""), "", print) + _emit_labeled_block("EXAMPLE", rule.get("example", ""), "", print) + +for r, c in infos[:5]: + render_fired(r, c, "INFO") +for r, c in warns[:5]: + render_fired(r, c, "WARN") +for r, c in errors: + render_fired(r, c, "BLOCKED") +if errors: + sys.exit(2) +PYEOF diff --git a/.archie/hooks/stop.sh b/.archie/hooks/stop.sh new file mode 100755 index 0000000000..19a9b3991f --- /dev/null +++ b/.archie/hooks/stop.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Archie Stop hook (canonical, source of truth). +# Runs when the agent finishes a turn/session depending on CLI semantics. +# Currently used as a parity extension point and light cleanup hook. +PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo ".")" +TURN_HASH=$(printf '%s' "$PROJECT_ROOT" | cksum | awk '{print $1}') +# Avoid leaking per-turn rule injection state if a session ends without the +# next UserPromptSubmit event clearing it. +rm -f "/tmp/.archie_turn_$TURN_HASH" +exit 0 diff --git a/.archie/last_deep_scan.json b/.archie/last_deep_scan.json new file mode 100644 index 0000000000..dc8d240ff8 --- /dev/null +++ b/.archie/last_deep_scan.json @@ -0,0 +1,5 @@ +{ + "timestamp": "2026-06-05T17:29:09.886480+00:00", + "commit_sha": "5d82896414d6ebf166944eb31c3b0de7f05ac389", + "mode": "full" +} \ No newline at end of file diff --git a/.archie/lint_gate.py b/.archie/lint_gate.py new file mode 100755 index 0000000000..0085694ee1 --- /dev/null +++ b/.archie/lint_gate.py @@ -0,0 +1,301 @@ +#!/usr/bin/env python3 +"""Archie lint gate — run project-native linters on files the agent writes. + +Opt-in via ``.archie/enforcement.json``. Invoked as a PostToolUse hook after +Write/Edit/MultiEdit. Detects the right linter for the file type based on +project config (pyproject.toml, package.json, .semgrep.yml), runs it on the +single changed file, and exits 2 when severity=error so Claude Code blocks. + +Zero dependencies beyond Python 3.9+ stdlib. Fails open on every error path — +missing config, missing linter, ambiguous file type — so a misconfigured gate +never breaks the agent's flow. + +Config schema (``.archie/enforcement.json``):: + + { + "enabled": true, + "severity": "error", # error → exit 2 (block), warn → exit 0 with message + "linters": { # optional overrides; omit to auto-detect + "python": {"command": "ruff check --quiet"}, + "js": {"command": "eslint --quiet"} + } + } +""" + +from __future__ import annotations + +import json +import os +import shlex +import shutil +import subprocess +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from _common import safe_read_text # noqa: E402 + + +# File extension → logical linter kind. +EXT_TO_KIND = { + ".py": "python", + ".js": "js", + ".jsx": "js", + ".ts": "js", + ".tsx": "js", + ".mjs": "js", + ".cjs": "js", + ".go": "go", +} + + +def load_config(project_root: Path) -> dict | None: + """Return config dict if enabled, else None (fail open).""" + cfg_path = project_root / ".archie" / "enforcement.json" + if not cfg_path.is_file(): + return None + try: + cfg = json.loads(safe_read_text(cfg_path, project_root)) + except (json.JSONDecodeError, OSError, ValueError): + return None + if not cfg.get("enabled"): + return None + return cfg + + +def detect_linter(file_path: Path, project_root: Path, config: dict) -> dict | None: + """Pick the linter for this file. Returns a dict with ``command`` and + ``kind``, or None if nothing applies (fail open). + + Resolution: + 1. Extension maps to a kind ("python", "js", ...) + 2. Explicit config override wins + 3. Otherwise auto-detect based on project config files + executable on PATH + 4. Always check for ``.semgrep.yml`` / ``.semgrep.yaml`` / ``semgrep.yml`` + as a universal fallback when the kind linter is absent + """ + ext = file_path.suffix.lower() + kind = EXT_TO_KIND.get(ext) + + linters_cfg = config.get("linters", {}) + + if kind: + # Explicit override from config. + override = linters_cfg.get(kind) + if isinstance(override, dict) and override.get("command"): + target = override.get("target", _default_target(kind)) + return {"kind": kind, "command": override["command"], "target": target} + + # Auto-detect per kind. + if kind == "python": + auto = _detect_python_linter(project_root) + if auto: + return {"kind": kind, "command": auto, "target": "file"} + elif kind == "js": + auto = _detect_js_linter(project_root) + if auto: + return {"kind": kind, "command": auto, "target": "file"} + elif kind == "go": + auto = _detect_go_linter(project_root) + if auto: + # golangci-lint is package-aware — pass the containing + # directory, not the single file, or it errors with "no go + # files found". + return {"kind": kind, "command": auto, "target": "parent"} + + # Semgrep fallback — applies to any file type when the user has a semgrep + # config checked in. + if _has_semgrep_config(project_root) and shutil.which("semgrep"): + return {"kind": "semgrep", "command": "semgrep --error --quiet", "target": "file"} + + return None + + +def _default_target(kind: str) -> str: + """File-oriented vs package-oriented linters.""" + return "parent" if kind == "go" else "file" + + +def _detect_python_linter(project_root: Path) -> str | None: + """Return a ruff command when the project is configured for ruff.""" + if not shutil.which("ruff"): + return None + pyproject = project_root / "pyproject.toml" + if pyproject.is_file(): + try: + text = safe_read_text(pyproject, project_root) + if "[tool.ruff]" in text or "[tool.ruff." in text: + return "ruff check --quiet" + except (OSError, ValueError): + pass + if (project_root / "ruff.toml").is_file(): + return "ruff check --quiet" + if (project_root / ".ruff.toml").is_file(): + return "ruff check --quiet" + return None + + +def _detect_js_linter(project_root: Path) -> str | None: + """Return an eslint command when the project is configured for eslint.""" + # Local eslint binary is preferred so version matches the repo's config. + local = project_root / "node_modules" / ".bin" / "eslint" + for cfg_name in ( + ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.cjs", + ".eslintrc.yaml", ".eslintrc.yml", "eslint.config.js", "eslint.config.mjs", + ): + if (project_root / cfg_name).is_file(): + if local.is_file(): + return f"{local} --quiet" + if shutil.which("eslint"): + return "eslint --quiet" + # package.json with eslint dep is also a signal. + pkg = project_root / "package.json" + if pkg.is_file(): + try: + data = json.loads(safe_read_text(pkg, project_root)) + deps = {**data.get("dependencies", {}), **data.get("devDependencies", {})} + if "eslint" in deps: + if local.is_file(): + return f"{local} --quiet" + if shutil.which("eslint"): + return "eslint --quiet" + except (json.JSONDecodeError, OSError, ValueError): + pass + return None + + +def _detect_go_linter(project_root: Path) -> str | None: + """Return a golangci-lint command when the project is configured for it.""" + if not shutil.which("golangci-lint"): + return None + for cfg_name in ( + ".golangci.yaml", + ".golangci.yml", + ".golangci.toml", + ".golangci.json", + ): + if (project_root / cfg_name).is_file(): + return "golangci-lint run --fast" + return None + + +def _has_semgrep_config(project_root: Path) -> bool: + for name in (".semgrep.yml", ".semgrep.yaml", "semgrep.yml", "semgrep.yaml"): + if (project_root / name).is_file(): + return True + return False + + +def run_linter( + command: str, + file_path: Path, + cwd: Path, + timeout: int = 30, +) -> tuple[int, str]: + """Run the linter on a single file. Returns (exit_code, combined_output). + + Runs without a shell (``shell=False``): the command string is split into + argv with ``shlex`` and the file path is appended as its own argument, so a + path or filename can never be interpreted as shell syntax. Wraps any spawn + error as exit 0 (fail open — we will not pretend a missing linter is a lint + failure). + """ + try: + proc = subprocess.run( + shlex.split(command) + [str(file_path)], + cwd=str(cwd), + capture_output=True, + text=True, + timeout=timeout, + ) + except (FileNotFoundError, subprocess.TimeoutExpired, OSError, ValueError): + return 0, "" + output = (proc.stdout or "") + (proc.stderr or "") + return proc.returncode, output.strip() + + +def gate( + project_root: Path, + file_path: Path, +) -> tuple[int, str]: + """Top-level entrypoint used by the hook. Returns (exit_code, message). + + - exit_code 0 with empty message: all clear, nothing to report + - exit_code 0 with message: warn-mode finding, surfaced to the agent + - exit_code 2: block — severity=error and linter found issues + """ + cfg = load_config(project_root) + if cfg is None: + return 0, "" + + linter = detect_linter(file_path, project_root, cfg) + if linter is None: + return 0, "" + + # Some linters are package-aware (golangci-lint) and must be pointed at + # the containing directory, not the single file. + target_path = file_path.parent if linter.get("target") == "parent" else file_path + + code, output = run_linter(linter["command"], target_path, project_root) + if code == 0: + return 0, "" + + severity = cfg.get("severity", "error") + prefix = "[Archie lint-gate BLOCKED]" if severity == "error" else "[Archie lint-gate WARNING]" + rel = _relative(file_path, project_root) + msg = f"{prefix} {linter['kind']} reported issues in {rel}:\n{output}" + return (2 if severity == "error" else 0), msg + + +def _relative(p: Path, root: Path) -> str: + try: + return str(p.relative_to(root)) + except ValueError: + return str(p) + + +def _main(argv: list[str]) -> int: + """CLI entrypoint used by post-lint.sh. + + Reads the Claude Code tool-call JSON from stdin, resolves the project root + and file path, and calls ``gate()``. Exits 0 on fail-open paths and on + non-Write/Edit/MultiEdit tools. + """ + try: + data = json.load(sys.stdin) + except Exception: + return 0 + if data.get("tool_name") not in ("Write", "Edit", "MultiEdit"): + return 0 + ti = data.get("tool_input") or {} + fp = ti.get("file_path") or ti.get("path") + if not fp: + return 0 + + # Resolve project root. Prefer env, fallback to git, fallback to cwd. + root_env = os.environ.get("_ARCHIE_ROOT") + if root_env: + root = Path(root_env) + else: + try: + out = subprocess.check_output( + ["git", "rev-parse", "--show-toplevel"], + stderr=subprocess.DEVNULL, + text=True, + ).strip() + root = Path(out) if out else Path.cwd() + except (subprocess.CalledProcessError, FileNotFoundError): + root = Path.cwd() + + file_path = Path(fp) + if not file_path.is_file(): + return 0 + + code, msg = gate(root, file_path) + if msg: + print(msg) + return code + + +if __name__ == "__main__": + sys.exit(_main(sys.argv[1:])) diff --git a/.archie/maintainer_guardrails.json b/.archie/maintainer_guardrails.json new file mode 100644 index 0000000000..c899e317c0 --- /dev/null +++ b/.archie/maintainer_guardrails.json @@ -0,0 +1,4 @@ +{ + "version": 1, + "guardrails": [] +} \ No newline at end of file diff --git a/.archie/rule_index.json b/.archie/rule_index.json new file mode 100644 index 0000000000..4d5cc067cc --- /dev/null +++ b/.archie/rule_index.json @@ -0,0 +1,253 @@ +{ + "by_path_glob": { + "openmeter/**/adapter/**": [ + "dec-tx-001" + ], + "openmeter/billing/charges/**/adapter/**": [ + "dec-tx-002" + ], + "openmeter/**": [ + "tr-lock-002", + "tr-lock-003", + "dec-validate-001", + "pf-ledger-panic-001", + "pf-context-001", + "prac-slog-001" + ], + "**/*.gen.go": [ + "mech-gen-001" + ], + "**/wire_gen.go": [ + "mech-gen-001" + ], + "openmeter/ent/db/**": [ + "mech-gen-001" + ], + "api/api.gen.go": [ + "mech-gen-001" + ], + "api/v3/api.gen.go": [ + "mech-gen-001" + ], + "api/client/go/client.gen.go": [ + "mech-gen-001" + ], + "openmeter/**/service/**": [ + "tr-flag-001" + ], + "api/v3/handlers/**": [ + "tr-flag-001" + ], + "api/**": [ + "dec-validate-001", + "pf-context-001" + ], + "pkg/**": [ + "dec-validate-001", + "pf-ledger-panic-001", + "pf-context-001", + "prac-slog-001" + ], + "app/**": [ + "pf-ledger-panic-001", + "pf-context-001", + "prac-slog-001" + ], + "cmd/**": [ + "pf-ledger-panic-001" + ] + }, + "by_code_shape": [ + { + "rule_id": "dec-tx-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "\\.db\\.\\w+\\.(Create|Update|Delete|Query)\\(" + ], + "must_not_match": [ + "entutils\\.TransactingRepo", + "entutils\\.TransactingRepoWithNoValue" + ] + } + }, + { + "rule_id": "dec-tx-002", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "func \\w+\\([^)]*\\*entdb\\.Client[^)]*\\)" + ], + "must_not_match": [ + "entutils\\.TransactingRepo" + ] + } + }, + { + "rule_id": "tr-lock-002", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "lockr\\.NewKey\\([^)]*\\.Key", + "lockr\\.NewKey\\([^)]*\"key\"" + ] + } + }, + { + "rule_id": "tr-lock-003", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "pg_advisory_lock\\(" + ] + } + }, + { + "rule_id": "tr-flag-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "if\\s+\\w*\\.?[Cc]redits\\w*\\.Enabled", + "if\\s+\\w*[Ww]ebhook\\w*\\.Enabled" + ], + "must_not_match": [ + "_test\\.go" + ] + } + }, + { + "rule_id": "dec-validate-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "func \\([^)]*\\) Validate\\(\\) error" + ], + "must_not_match": [ + "NewNillableGenericValidationError", + "NewGenericValidationError", + "_test\\.go" + ] + } + }, + { + "rule_id": "pf-ledger-panic-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "\\bpanic\\(" + ], + "must_not_match": [ + "_test\\.go", + "testutils", + "testutil" + ] + } + }, + { + "rule_id": "pf-context-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "context\\.Background\\(\\)", + "context\\.TODO\\(\\)" + ], + "must_not_match": [ + "_test\\.go", + "main\\.go" + ] + } + }, + { + "rule_id": "prac-slog-001", + "shape": { + "kind": "regex_in_content", + "must_match": [ + "slog\\.Default\\(\\)" + ], + "must_not_match": [ + "_test\\.go" + ] + } + } + ], + "for_classifier": [ + "dec-tx-001", + "dec-tx-002", + "dec-lock-001", + "tr-lock-002", + "tr-lock-003", + "dec-fsm-001", + "tr-fsm-002", + "dec-codegen-001", + "dec-wire-001", + "tr-flag-001", + "dec-ledger-backfill-001", + "dec-hook-001", + "dec-eventbus-001", + "dec-charge-idempotency-001", + "dec-entitlement-subtype-001", + "dec-app-registry-001", + "dec-validate-001", + "dec-api-surface-001", + "dec-mixins-001", + "tr-mixins-002", + "data-soft-delete-001", + "data-namespace-001", + "data-ledger-fk-001", + "data-clickhouse-sync-001", + "data-billing-schemalevel-001", + "pf-ledger-panic-001", + "pf-context-001", + "pf-test-cycle-001", + "pf-v3-unimplemented-001", + "place-domain-iface-001", + "place-service-001", + "place-adapter-001", + "place-v3-handler-001", + "place-legacy-httpdriver-001", + "place-ent-schema-001", + "place-wire-001", + "place-migrations-001", + "place-test-001", + "name-pkg-alias-001", + "name-iface-assert-001", + "name-config-001", + "name-convert-001", + "prac-slog-001", + "prac-lo-001", + "prac-helper-001", + "prac-test-decimal-001", + "prac-test-ctx-001", + "prac-test-helpers-001", + "infra-nix-001", + "infra-pgtest-001", + "infra-gendrift-001", + "infra-atlas-sum-001", + "infra-config-001", + "infra-nvmrc-001", + "infra-modtidy-001", + "infra-release-001", + "infra-secrets-001", + "infra-cgo-001", + "data-namespace-handler-001", + "data-clickhouse-store-001", + "data-redis-001", + "tr-monolith-001", + "sem-httptransport-001", + "sem-webhook-001", + "sem-grouphandler-001", + "sem-ent-view-001", + "data-customer-fk-001", + "data-customer-ilike-001", + "dec-style-001", + "sem-entitymapping-001", + "android-layer-viewmodel-context", + "android-layer-fragment-network", + "android-layer-fragment-db", + "android-layer-activity-db", + "swift-layer-view-network", + "swift-layer-view-userdefaults", + "typescript-layer-component-fetch", + "typescript-react-dom-manipulation" + ] +} \ No newline at end of file diff --git a/.archie/rules.json b/.archie/rules.json new file mode 100644 index 0000000000..39b5244580 --- /dev/null +++ b/.archie/rules.json @@ -0,0 +1,1613 @@ +{ + "rules": [ + { + "id": "dec-tx-001", + "kind": "decision", + "topic": "data-access", + "severity_class": "decision_violation", + "description": "Ent adapter methods must wrap their body in entutils.TransactingRepo so they join the caller's transaction", + "why": "This is the seam that lets one domain's service participate in another domain's transaction over the single shared Ent client. Without it, subscription\u2192billing\u2192charges\u2192ledger composition could not be atomic. Every domain adapter holds a *entdb.Client and implements entutils.TxCreator (Tx() hijacks an Ent tx onto the context) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self() returns the non-tx instance); TransactingRepo rebinds to the *TxDriver already on the context if one exists and otherwise falls back to repo.Self() (pkg/framework/entutils/transaction.go:199).", + "forced_by": "Single shared Ent client plus the requirement that subscription, billing, charges, and ledger mutations be atomic across domains.", + "enables": "Composable service-in-service transactions, the lockr advisory-lock pattern, and the subscription\u2192billing sync writing invoice lines, split-line groups, and charges in one commit.", + "alternative": "Wrap the method body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}) (or TransactingRepoWithNoValue for no-return writes) and run queries on rep, never on a directly captured *entdb.Client.", + "example": "func (a *adapter) GetCustomer(ctx context.Context, id models.NamespacedID) (*customer.Customer, error) {\n return entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep *adapter) (*customer.Customer, error) {\n row, err := rep.db.Customer.Query().Where(customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)).Only(ctx)\n if err != nil { return nil, err }\n return mapCustomerFromDB(row), nil\n })\n}", + "source": "deep_scan", + "keywords": [ + "adapter", + "transaction", + "ent", + "TransactingRepo", + "tx" + ], + "triggers": { + "path_glob": [ + "openmeter/**/adapter/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "\\.db\\.\\w+\\.(Create|Update|Delete|Query)\\(" + ], + "must_not_match": [ + "entutils\\.TransactingRepo", + "entutils\\.TransactingRepoWithNoValue" + ] + } + ] + } + }, + { + "id": "dec-tx-002", + "kind": "coding_practice", + "topic": "data-access", + "severity_class": "pattern_divergence", + "description": "Charges adapter helpers taking a raw *entdb.Client must still wrap their body with entutils.TransactingRepo", + "why": "In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware: even helpers that accept a raw *entdb.Client argument must wrap their body with entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to the tx already in ctx. Passing a non-tx client silently writes outside the caller's transaction, breaking the cross-domain atomicity the architecture depends on.", + "forced_by": "Shared helpers that accept a raw client rather than reading the tx from ctx would otherwise bypass the caller's transaction.", + "enables": "Charge advancement, realization runs, and subscription\u2192billing sync commit together with the rest of billing in one Postgres transaction.", + "alternative": "Inside the helper, call entutils.TransactingRepo(ctx, repo, func(ctx, rep){...}) so it rebinds to the ctx tx instead of trusting the passed client to be tx-bound.", + "example": "", + "source": "deep_scan", + "keywords": [ + "charges", + "adapter", + "entdb.Client", + "transaction", + "helper" + ], + "triggers": { + "path_glob": [ + "openmeter/billing/charges/**/adapter/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "func \\w+\\([^)]*\\*entdb\\.Client[^)]*\\)" + ], + "must_not_match": [ + "entutils\\.TransactingRepo" + ] + } + ] + } + }, + { + "id": "dec-lock-001", + "kind": "decision", + "topic": "concurrency", + "severity_class": "decision_violation", + "description": "Serialize per-entity multi-row operations with a lockr advisory lock keyed on a globally-unique id inside transaction.Run", + "why": "Subscription mutations, billing mutations, and charge advances each touch many rows/tables for one customer and must be serialized per logical entity without serializing the whole table. lockr.NewKey(scopes...) xxh3-hashes the scope to a 64-bit int and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-releasing on commit/rollback. getTxClient hard-asserts the caller is inside a real Postgres transaction (transaction_timestamp() != statement_timestamp()) and errors otherwise (pkg/framework/lockr/locker.go:134). The key id component must be PK-unique (subscription.GetCustomerLock keys on customer id).", + "forced_by": "Multi-replica workers mutating multi-row per-customer aggregates that need a serialization point.", + "enables": "Safe concurrent subscription edits, billing finalization, and charge advancement for different customers in parallel while serializing operations on the same customer.", + "alternative": "Build the key with a typed helper like subscription.GetCustomerLock(customerID) using a PK-unique id, call lockr.LockForTX inside transaction.Run, and never use an in-process mutex or a session-scoped pg_advisory_lock.", + "example": "err := transaction.Run(ctx, svc.adapter, func(ctx context.Context) error {\n if err := svc.locker.LockForTX(ctx, subscription.GetCustomerLock(customerID)); err != nil { return err }\n return svc.mutate(ctx, ...)\n})", + "source": "deep_scan", + "keywords": [ + "lock", + "advisory", + "lockr", + "serialization", + "concurrency" + ] + }, + { + "id": "tr-lock-002", + "kind": "tradeoff", + "topic": "concurrency", + "severity_class": "tradeoff_undermined", + "description": "Never key a lockr advisory lock on a non-unique column such as customer.key", + "why": "Advisory locks must key on a globally-unique id; misuse is only caught at runtime. customer.key is only unique under namespace + deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62), so a key-based lock could serialize unrelated customers across namespaces or collide a live row with a soft-deleted one. Key on the PK-unique id instead.", + "forced_by": "", + "enables": "", + "alternative": "Key the lock on the entity's PK-unique id (customer id), not on a namespace-scoped or soft-delete-scoped column like key.", + "example": "", + "source": "deep_scan", + "keywords": [ + "lockr", + "NewKey", + "customer key", + "unique" + ], + "triggers": { + "path_glob": [ + "openmeter/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "lockr\\.NewKey\\([^)]*\\.Key", + "lockr\\.NewKey\\([^)]*\"key\"" + ] + } + ] + } + }, + { + "id": "tr-lock-003", + "kind": "tradeoff", + "topic": "concurrency", + "severity_class": "tradeoff_undermined", + "description": "Do not use sync.Mutex or session-scoped pg_advisory_lock for cross-replica serialization", + "why": "The worker binaries are horizontally scaled, so an in-process sync.Mutex would not serialize across replicas. Session-scoped pg_advisory_lock (not pg_advisory_xact_lock) ties lock lifetime to the connection, not the transaction, re-introducing lock-then-die orphan windows that the transaction-scoped lockr design eliminates.", + "forced_by": "", + "enables": "", + "alternative": "Use lockr.LockForTX (pg_advisory_xact_lock) inside transaction.Run so the lock auto-releases on commit/rollback across all replicas.", + "example": "", + "source": "deep_scan", + "keywords": [ + "sync.Mutex", + "pg_advisory_lock", + "replica", + "serialization" + ], + "triggers": { + "path_glob": [ + "openmeter/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "pg_advisory_lock\\(" + ] + } + ] + } + }, + { + "id": "dec-fsm-001", + "kind": "decision", + "topic": "billing-lifecycle", + "severity_class": "decision_violation", + "description": "Model invoice and charge lifecycle transitions through the qmuntal/stateless FSM, not ad-hoc status mutation", + "why": "Invoice and usage-based-charge lifecycles have guarded transitions with side effects (calculation, finalization, voiding) that must be auditable and persisted across requests. stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (invoice.status / charge.status), and states are Configure'd with Permit / PermitDynamic(guard) edges and OnActive side-effect callbacks. Mutating status directly or branching with if/switch scatters guards and makes illegal transitions possible; the FSM centralizes the legal edge set as a single source of truth.", + "forced_by": "Guarded, side-effecting, auditable invoice and charge lifecycles that span multiple requests.", + "enables": "A single legal-transition source of truth per aggregate, reusable across flat-fee/usage-based/credit-purchase charge subtypes via the generic ChargeLike constraint.", + "alternative": "Add a Permit/PermitDynamic edge (with a guard if needed) and an OnActive side-effect to the existing state machine in stdinvoicestate.go or charges/statemachine/machine.go rather than writing status = ... or a status switch.", + "example": "", + "source": "deep_scan", + "keywords": [ + "invoice", + "charge", + "state machine", + "status", + "lifecycle" + ] + }, + { + "id": "tr-fsm-002", + "kind": "tradeoff", + "topic": "billing-lifecycle", + "severity_class": "tradeoff_undermined", + "description": "Do not mutate invoice.status directly or add a status without a corresponding Permit edge", + "why": "External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge. Directly assigning invoice.status, branching with if/switch on status instead of Permit edges, or using an in-memory NewStateMachine for a persisted aggregate undermines durability and auditability of transitions.", + "forced_by": "", + "enables": "", + "alternative": "Declare a Permit (or PermitDynamic guarded) edge for the new transition and let the state machine apply it; add new statuses only together with their edges.", + "example": "", + "source": "deep_scan", + "keywords": [ + "invoice.status", + "Permit", + "state machine", + "transition" + ] + }, + { + "id": "dec-codegen-001", + "kind": "decision", + "topic": "codegen", + "severity_class": "decision_violation", + "description": "Author API changes in TypeSpec and regenerate; never hand-edit generated OpenAPI, server stubs, or SDKs", + "why": "The API is authored once in TypeSpec under api/spec (legacy + aip packages); make gen-api compiles it to OpenAPI, then oapi-codegen generates api/api.gen.go and api/v3/api.gen.go, orval the JS SDK, poetry the Python SDK, and goverter/goderive the converters. Two server surfaces and three published SDKs cannot be kept consistent by hand. Editing api/openapi.yaml, api.gen.go, convert.gen.go, or SDK client methods directly breaks the single source of truth and is overwritten on the next generate.", + "forced_by": "Two coexisting API surfaces (v1 + AIP v3) plus three published SDKs that must not diverge from one contract.", + "enables": "Adding an endpoint by editing .tsp and re-running make gen-api / make generate; compile-time detection of contract drift.", + "alternative": "Edit the .tsp files under api/spec/, run make gen-api (OpenAPI + SDKs) then make generate (Go server/client). To add @query in a .tsp without HTTP decorators, import @typespec/http and add `using TypeSpec.Http;`.", + "example": "", + "source": "deep_scan", + "keywords": [ + "typespec", + "openapi", + "codegen", + "sdk", + "api" + ] + }, + { + "id": "mech-gen-001", + "kind": "decision", + "topic": "codegen", + "severity_class": "mechanical_violation", + "description": "Never hand-edit files carrying a `// Code generated ... DO NOT EDIT.` header", + "why": "openmeter/ent/db/, **/wire_gen.go, **/convert.gen.go, billing/derived.gen.go, api/api.gen.go, api/v3/api.gen.go, and api/client/go/client.gen.go are all generated and carry the canonical DO-NOT-EDIT header. Hand-edits are silently overwritten by make generate / make gen-api, and CI fails if generated artifacts drift from source.", + "forced_by": "", + "enables": "", + "alternative": "Edit the source (ent schema, wire.go provider sets, goverter convert.go interfaces, TypeSpec) and regenerate via make generate / make gen-api.", + "example": "", + "source": "deep_scan", + "keywords": [ + "generated", + "DO NOT EDIT", + "gen.go", + "wire_gen", + "ent/db" + ], + "check": "forbidden_content", + "forbidden_patterns": [ + "Code generated.*DO NOT EDIT" + ], + "triggers": { + "path_glob": [ + "**/*.gen.go", + "**/wire_gen.go", + "openmeter/ent/db/**", + "api/api.gen.go", + "api/v3/api.gen.go", + "api/client/go/client.gen.go" + ] + } + }, + { + "id": "dec-wire-001", + "kind": "decision", + "topic": "services", + "severity_class": "decision_violation", + "description": "Wire new services, hooks, and workers through Google Wire provider sets in app/common, not manual or runtime DI", + "why": "Each binary has a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets; constructors are plain functions grouped per concern in app/common/*.go. make generate runs wire to emit wire_gen.go. Compile-time DI means a missing provider fails the build, and each binary only links the providers it declares. Runtime/reflection DI and manual wiring in main() are rejected because the graph (billing\u2192charges\u2192ledger\u2192customer\u2192productcatalog) is too large to wire by hand without divergence.", + "forced_by": "Six binaries over one module, each needing a distinct subset of the domain graph, plus feature flags that must disable whole subsystems.", + "enables": "Per-binary minimal object graphs, build-time wiring validation, and clean feature-flag disablement via noop provider swaps.", + "alternative": "Add a wire.NewSet provider in the relevant app/common/*.go file, reference it from the binary's wire.go, then run make generate.", + "example": "var Customer = wire.NewSet(NewCustomerService)", + "source": "deep_scan", + "keywords": [ + "wire", + "dependency injection", + "provider", + "app/common", + "wiring" + ] + }, + { + "id": "tr-flag-001", + "kind": "tradeoff", + "topic": "services", + "severity_class": "tradeoff_undermined", + "description": "Gate features at the DI wiring seam with concrete-or-noop providers, not with if feature.enabled inside service logic", + "why": "Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning). Putting `if credits.enabled` inside a service method, constructing ledger adapters when credits are disabled, or building a Svix client when webhooks are off scatters runtime conditionals through service logic and leaves gated subsystems half-disabled.", + "forced_by": "", + "enables": "", + "alternative": "In app/common, return a Noop implementation from the provider when the flag is off (e.g. NewCustomerLedgerServiceHook returns NoopCustomerLedgerHook{} when credits.Enabled is false); keep service method bodies flag-free.", + "example": "", + "source": "deep_scan", + "keywords": [ + "credits.enabled", + "feature flag", + "noop", + "wiring", + "webhooks" + ], + "triggers": { + "path_glob": [ + "openmeter/**/service/**", + "api/v3/handlers/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "if\\s+\\w*\\.?[Cc]redits\\w*\\.Enabled", + "if\\s+\\w*[Ww]ebhook\\w*\\.Enabled" + ], + "must_not_match": [ + "_test\\.go" + ] + } + ] + } + }, + { + "id": "dec-ledger-backfill-001", + "kind": "coding_practice", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Ledger backfills that must write real ledger_accounts rows must construct concrete ledger adapters, not rely on default DI", + "why": "When credits.enabled is false, app/common wires ledger account services/resolvers to noop implementations. Any ledger account backfill that must write real ledger_accounts / ledger_customer_accounts rows needs to construct concrete ledger account + resolver adapters directly instead of relying on the default DI outputs, which would silently no-op the writes.", + "forced_by": "Default DI returns noop ledger services when credits are disabled.", + "enables": "Backfill jobs can write real ledger rows regardless of the credits feature flag state.", + "alternative": "Build the concrete ledger account + resolver adapters explicitly in the backfill/job code rather than injecting the wired ledger service.", + "example": "", + "source": "deep_scan", + "keywords": [ + "ledger", + "backfill", + "credits", + "noop", + "adapter" + ] + }, + { + "id": "dec-hook-001", + "kind": "decision", + "topic": "services", + "severity_class": "decision_violation", + "description": "Use the ServiceHookRegistry for synchronous in-process cross-domain reactions, not Kafka or a static cross-domain call", + "why": "Some cross-domain effects must be synchronous and in-process (provisioning a ledger account when a customer is created), unlike the asynchronous Kafka event bus used for billing/notification. A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]); Wire providers construct the hook and call targetService.RegisterHooks(h) at startup, registering a Noop hook when the feature is off. Routing a transactional side effect through Kafka loses same-transaction commit guarantees; hard-coding the dependent call would create a static dependency edge and prevent the noop-when-disabled swap.", + "forced_by": "Cross-domain effects that must be synchronous/transactional and feature-gatable, alongside the async event bus for the rest.", + "enables": "Provisioning ledger/customer state on lifecycle events without a static dependency edge, switchable to Noop when the feature is disabled.", + "alternative": "Implement a ServiceHook[T], register it via targetService.RegisterHooks in an app/common provider, and return a Noop hook when the feature is disabled.", + "example": "", + "source": "deep_scan", + "keywords": [ + "hook", + "ServiceHookRegistry", + "cross-domain", + "lifecycle", + "transactional" + ] + }, + { + "id": "dec-eventbus-001", + "kind": "decision", + "topic": "messaging", + "severity_class": "decision_violation", + "description": "Publish domain events through eventbus.Publisher and consume via grouphandler, not direct confluent-kafka calls", + "why": "Outbound: eventbus.New wraps a watermill cqrs.EventBus and routes each event to one of three Kafka topics by event-name prefix (ingest \u2192 IngestEventsTopic, balance-worker \u2192 BalanceWorkerEventsTopic, everything else \u2192 SystemEventsTopic). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once, runs matching handlers, and counts unknown types as ignored. Direct confluent-kafka-go produce/consume in a worker bypasses the centralized marshaling, topic routing, and type dispatch, and a single topic for all events breaks the throughput/retention separation.", + "forced_by": "Decoupled worker binaries consuming high-volume usage events and lower-volume domain events with different topic/retention needs.", + "enables": "Adding a new event handler by registering it in the grouphandler map; routing a new event type by prefix; independent worker scaling and a DLQ for poison notification messages.", + "alternative": "Emit via publisher.WithContext(ctx).PublishIfNoError(event, err) and register inbound handlers in the grouphandler map; let prefix routing pick the topic.", + "example": "", + "source": "deep_scan", + "keywords": [ + "eventbus", + "kafka", + "watermill", + "grouphandler", + "events" + ] + }, + { + "id": "dec-charge-idempotency-001", + "kind": "decision", + "topic": "billing-lifecycle", + "severity_class": "decision_violation", + "description": "Create charges with a unique_reference_id for idempotency and read across subtypes via the ChargesSearchV1 view", + "why": "Charge is a polymorphic parent row where exactly one of three subtype FK columns (flat_fee / credit_purchase / usage_based) points to the subtype table, with UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL for idempotent creation (openmeter/ent/schema/charges.go:167). Reads go through the ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables). Creating a charge without unique_reference_id loses retry-safety; a single wide charges table or separate tables without a parent loses the idempotency key and unified search surface.", + "forced_by": "Three charge subtypes with distinct run/lineage child tables that still need one idempotency key and one read surface.", + "enables": "Idempotent charge creation under retries and unified cross-subtype charge search, while keeping subtype lifecycles isolated.", + "alternative": "Set unique_reference_id on charge creation and query cross-subtype reads through ChargesSearchV1 rather than the individual subtype tables.", + "example": "", + "source": "deep_scan", + "keywords": [ + "charge", + "unique_reference_id", + "idempotency", + "ChargesSearchV1", + "polymorphic" + ] + }, + { + "id": "dec-entitlement-subtype-001", + "kind": "decision", + "topic": "services", + "severity_class": "decision_violation", + "description": "Add entitlement subtype behavior via a SubTypeConnector and a getTypeConnector switch arm, not inline branching", + "why": "entitlement.SubTypeConnector is implemented three times (metered/static/boolean, each in its own connector.go). The aggregate service holds all three and getTypeConnector(typed) switches over the closed EntitlementType set with a default-error arm (openmeter/entitlement/service/service.go:424). A new EntitlementType value MUST get a SubTypeConnector field plus a switch arm or it falls through to the default error. Inline switching over entitlement type everywhere, or open/registry-based dispatch, breaks the sealed-enum contract.", + "forced_by": "A fixed enum of entitlement subtypes each needing distinct create/value logic.", + "enables": "Adding a subtype by implementing SubTypeConnector and adding one switch arm; the default-error arm flags any unhandled subtype.", + "alternative": "Implement entitlement.SubTypeConnector for the new subtype, add it as a field on the aggregate service, and add one arm to getTypeConnector.", + "example": "", + "source": "deep_scan", + "keywords": [ + "entitlement", + "subtype", + "SubTypeConnector", + "getTypeConnector", + "connector" + ] + }, + { + "id": "dec-app-registry-001", + "kind": "decision", + "topic": "services", + "severity_class": "decision_violation", + "description": "Register marketplace app integrations once at wiring time via RegisterMarketplaceListing, not via a central switch or late registration", + "why": "The app adapter holds registry map[AppType]RegistryItem. Each integration's constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) exactly once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing (openmeter/app/adapter/marketplace.go:121). The map has no late-registration locking, so all listings must register during DI before the HTTP/worker surface is live. Capability support is discovered by type-asserting the Factory to the requested install interface.", + "forced_by": "Pluggable Stripe / custom-invoicing / sandbox integrations that must be addable without editing a central dispatch.", + "enables": "Adding a marketplace app by registering a RegistryItem at wiring time and implementing the capability interfaces it advertises.", + "alternative": "Call AppService.RegisterMarketplaceListing from the integration's constructor during DI wiring; discover capabilities with Factory.(app.AppFactoryInstallWithAPIKey) type assertions.", + "example": "", + "source": "deep_scan", + "keywords": [ + "app", + "marketplace", + "RegisterMarketplaceListing", + "registry", + "stripe" + ] + }, + { + "id": "dec-validate-001", + "kind": "decision", + "topic": "error-handling", + "severity_class": "decision_violation", + "description": "Validate() must collect all issues and return models.NewNillableGenericValidationError(errors.Join(...)), not fail on the first field", + "why": "Validation must report all problems at once (not fail-fast) and surface as a single 400/ValidationIssue at the HTTP boundary. Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf(\"field: %w\", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil; single-field checks use models.NewGenericValidationError(...) directly. Returning on the first invalid field, or a bespoke per-domain validation error, breaks the uniform contract the error encoders map to 400.", + "forced_by": "Multiple API surfaces and many domains all needing a consistent multi-issue validation contract that maps to one HTTP status.", + "enables": "Aggregated 400 ValidationIssue responses, fail-at-construction config validation, and one error type for the encoders to match.", + "alternative": "Accumulate var errs []error, wrap each with fmt.Errorf(\"field: %w\", err), and return models.NewNillableGenericValidationError(errors.Join(errs...)).", + "example": "func (i Input) Validate() error {\n var errs []error\n if i.Name == \"\" { errs = append(errs, errors.New(\"name: required\")) }\n if err := i.Address.Validate(); err != nil { errs = append(errs, fmt.Errorf(\"address: %w\", err)) }\n return models.NewNillableGenericValidationError(errors.Join(errs...))\n}", + "source": "deep_scan", + "keywords": [ + "validate", + "validation", + "NillableGenericValidationError", + "errors.Join", + "input" + ], + "triggers": { + "path_glob": [ + "openmeter/**", + "api/**", + "pkg/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "func \\([^)]*\\) Validate\\(\\) error" + ], + "must_not_match": [ + "NewNillableGenericValidationError", + "NewGenericValidationError", + "_test\\.go" + ] + } + ] + } + }, + { + "id": "dec-api-surface-001", + "kind": "decision", + "topic": "layering", + "severity_class": "decision_violation", + "description": "v3 handlers must be thin delegators to shared domain services, never carry their own domain logic", + "why": "v3 is the forward AIP-style surface; v1 cannot be dropped without breaking clients, so both surfaces front the identical domain services and share error rendering (commonhttp.HandleErrorIfTypeMatches, api/v3/apierrors). A v3 handler with its own domain logic, or a service call duplicated across both surfaces with diverging behavior, makes the two transport layers drift. Both v1 httpdriver packages and v3 handlers must delegate to the same openmeter/ service.", + "forced_by": "An installed v1 client base plus a new AIP-style API direction, both needing the same domain behavior.", + "enables": "Migrating endpoints to v3 incrementally while v1 keeps working, with one set of domain services and one error-mapping convention behind both.", + "alternative": "Put business logic in the openmeter/ service and have both the v1 httpdriver and the v3 handler call it; keep handlers limited to decode/encode/error-map.", + "example": "", + "source": "deep_scan", + "keywords": [ + "v3", + "handler", + "domain service", + "delegate", + "api surface" + ] + }, + { + "id": "dec-mixins-001", + "kind": "decision", + "topic": "data-modeling", + "severity_class": "decision_violation", + "description": "Compose entutils mixins on new Ent entities instead of repeating id/namespace/audit columns", + "why": "~70 tables share the same multi-tenant, soft-delete, ULID-id, audit, metadata-jsonb shape; mixins enforce it once instead of per-table. ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index. Repeating id/namespace/timestamp columns per schema, using UUID v4 PKs, or hard-deleting instead of deleted_at breaks the uniform multi-tenant contract.", + "forced_by": "A ~70-table multi-tenant schema needing uniform id/namespace/audit/soft-delete columns across every domain.", + "enables": "Adding an entity by composing mixins and running make generate + atlas diff; consistent namespace scoping and soft-delete semantics everywhere.", + "alternative": "In the schema's Mixin() method, compose entutils.ResourceMixin (or UniqueResourceMixin for key-unique entities) instead of declaring id/namespace/timestamp fields by hand.", + "example": "func (Customer) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.ResourceMixin{}, CustomerAddressMixin{} } }", + "source": "deep_scan", + "keywords": [ + "ent", + "schema", + "mixin", + "ResourceMixin", + "namespace", + "ulid" + ] + }, + { + "id": "tr-mixins-002", + "kind": "tradeoff", + "topic": "data-modeling", + "severity_class": "tradeoff_undermined", + "description": "Do not rely on UniqueResourceMixin for strict partial uniqueness; ship a custom IndexWhere SQL migration", + "why": "The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness because Ent cannot emit WHERE deleted_at IS NULL without a manual migration, so same-microsecond create/delete/create can collide. Entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration (as Customer does at openmeter/ent/schema/customer.go:58-62). Deleting that custom migration or trusting the mixin's deleted_at-in-key index for correctness re-opens the resurrect-collision bug.", + "forced_by": "", + "enables": "", + "alternative": "Add a custom partial-unique SQL migration using IndexWhere(`deleted_at IS NULL`) for entities where key-uniqueness on live rows must be strict.", + "example": "", + "source": "deep_scan", + "keywords": [ + "UniqueResourceMixin", + "partial unique", + "deleted_at", + "IndexWhere", + "migration" + ] + }, + { + "id": "data-soft-delete-001", + "kind": "data_contract", + "topic": "data-modeling", + "severity_class": "decision_violation", + "description": "Control-plane rows must be soft-deleted via deleted_at, never hard-deleted", + "why": "Entities soft-delete via deleted_at so historical billing/usage references survive; hard deletes are explicitly out of scope. Almost every Postgres table is namespace-scoped, ULID-id'd, and deleted_at soft-deleted. Customer DeleteCustomer is a SetDeletedAt soft-delete that cascade-deletes only edge-linked children; a hard purge would leave dangling FK-less rows (e.g. LedgerCustomerAccount) undetected.", + "forced_by": "Historical billing/usage references must survive entity deletion.", + "enables": "Stable historical references for invoices, usage, and ledger projections across the lifetime of the platform.", + "alternative": "Implement deletion as SetDeletedAt(clock.Now()) through the adapter; never issue a DELETE on a control-plane table.", + "example": "", + "source": "deep_scan", + "keywords": [ + "soft delete", + "deleted_at", + "hard delete", + "customer", + "delete" + ] + }, + { + "id": "data-namespace-001", + "kind": "data_contract", + "topic": "data-modeling", + "severity_class": "decision_violation", + "description": "Every Ent query against a namespace-scoped table must filter by namespace", + "why": "OpenMeter is multi-tenant: almost every Postgres table is namespace-scoped with ULID char(26) ids and deleted_at soft-deletes. Queries that omit the namespace predicate leak or mutate data across tenants. Adapter queries pair the namespace and id predicates (e.g. customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)).", + "forced_by": "Multi-tenant single-database architecture where one Postgres holds every namespace's control-plane state.", + "enables": "Tenant isolation over a shared schema without per-tenant databases.", + "alternative": "Always include a Namespace(...) predicate in adapter Query/Update/Delete builders alongside the id predicate.", + "example": "", + "source": "deep_scan", + "keywords": [ + "namespace", + "multi-tenant", + "query", + "adapter", + "isolation" + ] + }, + { + "id": "data-ledger-fk-001", + "kind": "data_contract", + "topic": "data-modeling", + "severity_class": "pattern_divergence", + "description": "Ledger cross-aggregate references are FK-less by design; enforce referential integrity in application code", + "why": "Cross-aggregate references in the Postgres ledger (LedgerCustomerAccount.account_id/customer_id, LedgerSubAccountRoute routing dimensions, LedgerBreakageRecord) are deliberately FK-less and stored as plain char(26)/text columns to avoid import cycles between ledger and customer/account. tax_code stores TaxCode.Key (not a FK). Referential integrity and column alignment are enforced only by application code with no database-level guard, so a hard-deleted account or a renamed TaxCode.Key drifts undetected until a runtime read fails.", + "forced_by": "Import-cycle avoidance between ledger and customer/account/tax aggregates means Edges() returns nil so Ent emits no foreign key.", + "enables": "Decoupled ledger schema that does not statically depend on customer/tax/catalog aggregates.", + "alternative": "Add application-level validation/tests asserting every ledger reference resolves to a live row, and document the FK-less invariant before editing these schemas.", + "example": "", + "source": "deep_scan", + "keywords": [ + "ledger", + "foreign key", + "LedgerCustomerAccount", + "referential integrity", + "tax_code" + ] + }, + { + "id": "data-clickhouse-sync-001", + "kind": "data_contract", + "topic": "schema-evolution", + "severity_class": "pattern_divergence", + "description": "Keep the RawEvent struct, ClickHouse DDL, and INSERT column list in sync by hand when changing usage-event columns", + "why": "ClickHouse usage-event tables have no in-repo migration tooling: schema evolves only through the idempotent CREATE TABLE IF NOT EXISTS path. A column added to the RawEvent Go struct (openmeter/streaming/connector.go) without a matching Define() in createEventsTable (event_query.go) and the INSERT column list will silently diverge from existing per-namespace om__events tables. There is no Atlas/diff guard for ClickHouse.", + "forced_by": "Usage events live in ClickHouse MergeTree outside the Atlas/Ent migration pipeline.", + "enables": "High-volume append-only usage ingest that scales independently of OLTP Postgres.", + "alternative": "When changing RawEvent columns, update the createEventsTable Define() set and the INSERT column list in lockstep, and add a reconcile/ALTER path for already-provisioned tables.", + "example": "", + "source": "deep_scan", + "keywords": [ + "clickhouse", + "RawEvent", + "events table", + "DDL", + "migration" + ] + }, + { + "id": "data-billing-schemalevel-001", + "kind": "data_contract", + "topic": "schema-evolution", + "severity_class": "pattern_divergence", + "description": "Drop billing-invoice deprecated columns and the two schema_level artifacts together, not piecemeal", + "why": "An in-progress billing-invoice schema migration keeps deprecated columns (line_ids, discount type/quantity, split-line-group tax fields) and a two-place schema_level discriminator (BillingInvoice.schema_level column plus the temporary BillingInvoiceWriteSchemaLevel table) live. The dual-write/dual-read logic spans multiple adapter files (schemalevel.go, gatheringinvoice.go, invoicelinesplitgroup.go, lock.go). Cleanup must remove the field, the table, the adapter dual-shape branches, and lock.go migrateCustomerInvoices in lockstep, or the migration is left half-done.", + "forced_by": "Incremental (non-cutover) invoice-line migration under the Ent-schema-as-source-of-truth model.", + "enables": "Online migration of invoice line shapes without a breaking cutover.", + "alternative": "Maintain an explicit checklist of the deprecated columns and both schema_level artifacts; only when GetInvoiceDefaultSchemaLevel reports a single level everywhere, drop them and the dual-read branches in one migration.", + "example": "", + "source": "deep_scan", + "keywords": [ + "billing", + "schema_level", + "deprecated", + "invoice", + "migration" + ] + }, + { + "id": "pf-ledger-panic-001", + "kind": "pitfall", + "topic": "error-handling", + "severity_class": "pitfall_triggered", + "description": "Never panic in production code; ledger TemplateCode and every new TransactionTemplate must declare a non-empty code()", + "why": "Pitfall pf_0013: TemplateCode(template) panics when a TransactionTemplate's code() returns an empty string (openmeter/ledger/transactions/codes.go:113), so a newly added template that forgets to declare its code() crashes the ledger collector at runtime instead of failing the build or returning an error. AGENTS.md: never use panic in non-test code paths; if a new failure mode is possible, change the function signature to return an error and propagate it explicitly.", + "forced_by": "TemplateCode was given a string return (not (string, error)) so call sites can use it inline in switch/case, and swallows the underlying error by panicking.", + "enables": "Ergonomic inline use of template codes as map keys and switch cases.", + "alternative": "Change panicking helpers to return (value, error) and propagate; ensure every new TransactionTemplate declares a non-empty code() and is covered by a registry test.", + "example": "", + "source": "deep_scan", + "keywords": [ + "panic", + "ledger", + "TemplateCode", + "TransactionTemplate", + "error" + ], + "triggers": { + "path_glob": [ + "openmeter/**", + "pkg/**", + "app/**", + "cmd/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "\\bpanic\\(" + ], + "must_not_match": [ + "_test\\.go", + "testutils", + "testutil" + ] + } + ] + } + }, + { + "id": "pf-context-001", + "kind": "pitfall", + "topic": "concurrency", + "severity_class": "pitfall_triggered", + "description": "Never introduce context.Background() or context.TODO() to sidestep missing context propagation in app code", + "why": "Context-ambient transactions carry the active tx on context.Context, rebound by entutils.TransactingRepo and not visible in method signatures. Introducing context.Background()/context.TODO() in application code detaches the call from the caller's transaction, cancellation, deadlines, and tracing \u2014 and a write that loses the ctx tx silently commits outside the caller's transaction. AGENTS.md forbids this; either propagate the caller's ctx through the full path, or drop the unused context.Context parameter.", + "forced_by": "Caller-driven transaction and cancellation contract carried ambiently on ctx.", + "enables": "Composable transactions, correct cancellation, and OpenTelemetry trace stitching across domain calls.", + "alternative": "Thread the caller's ctx through the full call path; if the operation is purely local and needs no ctx, remove the parameter instead of passing Background().", + "example": "", + "source": "deep_scan", + "keywords": [ + "context.Background", + "context.TODO", + "context", + "propagation", + "transaction" + ], + "triggers": { + "path_glob": [ + "openmeter/**", + "pkg/**", + "app/**", + "api/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "context\\.Background\\(\\)", + "context\\.TODO\\(\\)" + ], + "must_not_match": [ + "_test\\.go", + "main\\.go" + ] + } + ] + } + }, + { + "id": "pf-test-cycle-001", + "kind": "pitfall", + "topic": "testing", + "severity_class": "pitfall_triggered", + "description": "Keep test/billing non-test files free of imports into charges/service and subscriptionsync/service", + "why": "Pitfall pf_0014: internal test packages (package service) in openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service import the shared test/billing fixtures, which in turn imports those same service packages from its own _test files \u2014 a test-only import cycle. Go tolerates it only because the back-edges live in _test files. Moving a back-edge import into a non-test file of test/billing (e.g. a fixture helper constructing a real subscriptionsync service) would promote it into a hard production import cycle that breaks the build.", + "forced_by": "Heavyweight shared test/billing fixtures (BaseSuite/SubscriptionMixin) reused by multiple service trees that reach back into those services.", + "enables": "One shared billing integration harness across charges and subscriptionsync tests.", + "alternative": "Restrict test/billing back-edge imports to _test files only; build lighter test dependencies from underlying package constructors (repos, adapters, services, lockr) rather than the shared harness.", + "example": "", + "source": "deep_scan", + "keywords": [ + "test", + "import cycle", + "test/billing", + "fixtures", + "testutils" + ] + }, + { + "id": "pf-v3-unimplemented-001", + "kind": "pitfall", + "topic": "layering", + "severity_class": "pitfall_triggered", + "description": "Do not leave v3 operations advertised as stable while their Server method only delegates to api.Unimplemented", + "why": "Pitfall pf_0015: TypeSpec generates each v3 operation's server-interface method and SDK client method from the contract independently of whether the server implements it, and the v3 Server can satisfy the interface by delegating to api.Unimplemented{} (api.gen.go:7186), which always returns 501. Because Go only checks interface satisfaction, a permanently-stubbed operation compiles identically to a finished one, so the advertised contract and the three SDKs diverge from runtime capability with no compile-time signal.", + "forced_by": "TypeSpec-single-source codegen under an in-progress v1\u2192v3 migration plus the api.Unimplemented escape hatch.", + "enables": "Incremental implementation of the v3 surface without breaking the generated interface.", + "alternative": "For each Unimplemented-only operation, decide implement / feature-gate-and-document / mark-unstable-in-TypeSpec, and add a generated-vs-implemented audit test that fails CI when a spec-stable operation delegates only to api.Unimplemented.", + "example": "", + "source": "deep_scan", + "keywords": [ + "v3", + "Unimplemented", + "api.gen.go", + "501", + "contract" + ] + }, + { + "id": "place-domain-iface-001", + "kind": "file_placement", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Declare Service/Adapter/Connector interfaces and value models in the domain root package, implementations in nested subpackages", + "why": "Domain root packages (openmeter//.go, service.go, connector.go) declare interfaces (Service/Adapter/Connector/Repository) and value models; implementations live in nested service/ and adapter/ subpackages. openmeter/billing/invoice.go declares billing.Service; openmeter/streaming/connector.go declares streaming.Connector. Confirmed across billing, customer, streaming, notification, entitlement.", + "forced_by": "", + "enables": "", + "alternative": "Put the interface + models in openmeter//, and the concrete struct under openmeter//service/ or /adapter/.", + "example": "", + "source": "deep_scan", + "keywords": [ + "domain", + "interface", + "service", + "adapter", + "placement" + ] + }, + { + "id": "place-service-001", + "kind": "file_placement", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Concrete services live in a service/ subpackage with a Service struct, Config, Config.Validate(), and New(Config)", + "why": "Concrete services live in a service/ subpackage, take a Config struct of injected dependencies, validate each is non-nil in Config.Validate(), and assert interface satisfaction via `var _ billing.Service = (*Service)(nil)`. Loggers are injected, never slog.Default(). openmeter/billing/service/service.go and openmeter/notification/service/service.go follow this shape.", + "forced_by": "", + "enables": "", + "alternative": "Create openmeter//service/service.go with a Service struct, a Config of dependencies, a Config.Validate(), and a New(Config) constructor that validates first.", + "example": "var _ billing.Service = (*Service)(nil)\nfunc New(c Config) (*Service, error) { if err := c.Validate(); err != nil { return nil, err }; return &Service{...}, nil }", + "source": "deep_scan", + "keywords": [ + "service", + "Config", + "Validate", + "New", + "constructor" + ] + }, + { + "id": "place-adapter-001", + "kind": "file_placement", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Ent persistence lives in an adapter/ subpackage holding *entdb.Client with Tx/WithTx/Self", + "why": "Ent persistence is isolated in adapter/ packages that hold *entdb.Client and implement transaction hijacking (Tx returns a transaction.Driver; WithTx rebuilds the adapter from the tx config; Self returns the non-tx instance). Confirmed in billing/adapter/adapter.go and customer/adapter.", + "forced_by": "", + "enables": "", + "alternative": "Place persistence in openmeter//adapter/adapter.go with a struct holding *entdb.Client implementing TxCreator/TxUser.", + "example": "", + "source": "deep_scan", + "keywords": [ + "adapter", + "ent", + "entdb.Client", + "WithTx", + "persistence" + ] + }, + { + "id": "place-v3-handler-001", + "kind": "file_placement", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "v3 HTTP handlers live under api/v3/handlers// with a Handler interface and per-operation files", + "why": "The v3 API centralizes handlers under api/v3/handlers/, one package per resource (nested for sub-resources e.g. customers/charges, customers/credits). Each exposes a Handler interface returning httptransport handlers via New(resolveNamespace, service, options...); routes in api/v3/server/routes.go delegate via .With(params).ServeHTTP. Per-operation files are create.go/get.go/list.go/delete.go/upsert.go. Confirmed in customers/handler.go + routes.go.", + "forced_by": "", + "enables": "", + "alternative": "Add api/v3/handlers//handler.go (Handler interface + New) plus one file per operation, and wire it in api/v3/server/routes.go.", + "example": "", + "source": "deep_scan", + "keywords": [ + "v3", + "handler", + "api/v3/handlers", + "resource", + "routes" + ] + }, + { + "id": "place-legacy-httpdriver-001", + "kind": "file_placement", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Legacy v1 HTTP handlers are co-located per domain as httpdriver/ or httphandler/ packages", + "why": "The legacy v1 API keeps HTTP handlers co-located with each domain as httpdriver/httphandler packages (openmeter/customer/httpdriver, openmeter/meter/httphandler, openmeter/notification/httpdriver), assembled in openmeter/server/router/router.go. Confirmed by router.go imports.", + "forced_by": "", + "enables": "", + "alternative": "Add the v1 handler under openmeter//httpdriver/ (or httphandler/) and wire it in openmeter/server/router/router.go.", + "example": "", + "source": "deep_scan", + "keywords": [ + "v1", + "httpdriver", + "httphandler", + "router", + "legacy" + ] + }, + { + "id": "place-ent-schema-001", + "kind": "file_placement", + "topic": "data-modeling", + "severity_class": "pattern_divergence", + "description": "Ent schemas (the DB source of truth) live in openmeter/ent/schema/ as structs embedding ent.Schema with Mixin/Fields/Edges", + "why": "Hand-written Ent schemas are the DB source of truth (.go embedding ent.Schema with Mixin()/Fields()/Edges()); generated client goes to openmeter/ent/db (DO NOT EDIT). Schemas reuse mixins from pkg/framework/entutils. Confirmed by customer.go.", + "forced_by": "", + "enables": "", + "alternative": "Add the schema struct under openmeter/ent/schema/.go, run make generate, then atlas migrate --env local diff .", + "example": "", + "source": "deep_scan", + "keywords": [ + "ent", + "schema", + "openmeter/ent/schema", + "entity", + "source of truth" + ] + }, + { + "id": "place-wire-001", + "kind": "file_placement", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Google Wire provider sets live in app/common, one wire.NewSet file per subsystem", + "why": "Google Wire provider sets live in app/common, one file per subsystem (app/common/billing.go declares var Billing = wire.NewSet(...)); per-binary Application structs are assembled in openmeter_.go files. Wire-generated output is wire_gen.go (DO NOT EDIT). Confirmed by billing.go.", + "forced_by": "", + "enables": "", + "alternative": "Add the provider set to the relevant app/common/.go file and reference it from the binary's wire.go.", + "example": "", + "source": "deep_scan", + "keywords": [ + "wire", + "provider", + "app/common", + "wire.NewSet", + "subsystem" + ] + }, + { + "id": "place-migrations-001", + "kind": "file_placement", + "topic": "schema-evolution", + "severity_class": "pattern_divergence", + "description": "SQL migrations are timestamped .up.sql/.down.sql pairs in tools/migrate/migrations generated by Atlas", + "why": "Migrations are golang-migrate-format timestamped pairs (_.up.sql / .down.sql) plus atlas.sum, generated from Ent schema diffs via `atlas migrate --env local diff `. Schema source is ent://openmeter/ent/schema, migrations dir is file://tools/migrate/migrations.", + "forced_by": "", + "enables": "", + "alternative": "Change the ent schema, run make generate, then atlas migrate --env local diff to emit the pair into tools/migrate/migrations; never write migration SQL by hand.", + "example": "", + "source": "deep_scan", + "keywords": [ + "migration", + "atlas", + "tools/migrate/migrations", + "up.sql", + "atlas.sum" + ] + }, + { + "id": "place-test-001", + "kind": "file_placement", + "topic": "testing", + "severity_class": "pattern_divergence", + "description": "Co-locate unit tests as _test.go; put cross-domain integration harnesses under top-level test// and e2e under e2e/", + "why": "Most tests are co-located *_test.go files. Heavier cross-cutting integration suites and shared harnesses live under a top-level test/ tree organized by domain (test/billing, test/customer, test/subscription, ...); e.g. test/billing is imported by openmeter/billing/charges/service/*_test.go. End-to-end HTTP-over-the-wire tests live separately in e2e/ with docker-compose files.", + "forced_by": "", + "enables": "", + "alternative": "Put unit tests next to the source as _test.go; place shared integration fixtures under test// and HTTP e2e tests under e2e/.", + "example": "", + "source": "deep_scan", + "keywords": [ + "test", + "_test.go", + "test/billing", + "e2e", + "integration" + ] + }, + { + "id": "name-pkg-alias-001", + "kind": "naming_convention", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Implementation subpackages physically named service/adapter declare a domain-prefixed package name", + "why": "Implementation subpackages are physically named service/adapter but declare a domain-prefixed package name (package billingservice in service/service.go, package billingadapter in adapter/adapter.go) so call sites read unambiguously. Confirmed in billing service.go and adapter.go.", + "forced_by": "", + "enables": "", + "alternative": "Name the package billing (e.g. package customerservice) inside the service/ or adapter/ directory.", + "example": "", + "source": "deep_scan", + "keywords": [ + "package", + "billingservice", + "billingadapter", + "naming", + "alias" + ] + }, + { + "id": "name-iface-assert-001", + "kind": "naming_convention", + "topic": "layering", + "severity_class": "pattern_divergence", + "description": "Assert compile-time interface conformance with var _ = (*)(nil)", + "why": "Compile-time interface conformance is asserted with the blank-identifier pattern at the top of each implementation file (var _ billing.Service = (*Service)(nil), var _ billing.Adapter = (*adapter)(nil)). Confirmed in billing service.go, adapter.go, notification service.go.", + "forced_by": "", + "enables": "", + "alternative": "Add `var _ . = (*)(nil)` near the top of the implementation file.", + "example": "var _ notification.Service = (*Service)(nil)", + "source": "deep_scan", + "keywords": [ + "interface", + "var _", + "assertion", + "conformance" + ] + }, + { + "id": "name-config-001", + "kind": "naming_convention", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Services/adapters take a Config struct, validate it in Config.Validate(), and construct via New(config)", + "why": "Services/adapters take a Config struct, validate each dependency non-nil in Config.Validate(), and return via New(config) (billingadapter.New(Config), notification service New(Config)). Constructors reject invalid config rather than panicking. Confirmed in billing adapter.go and service.go and notification service.go.", + "forced_by": "", + "enables": "", + "alternative": "Define type Config struct {...}; func (c Config) Validate() error; func New(config Config) (Iface, error) that validates first.", + "example": "", + "source": "deep_scan", + "keywords": [ + "Config", + "Validate", + "New", + "constructor", + "naming" + ] + }, + { + "id": "name-gen-file-001", + "kind": "naming_convention", + "topic": "codegen", + "severity_class": "mechanical_violation", + "description": "Generated Go files use *.gen.go / wire_gen.go names and carry the DO-NOT-EDIT header", + "why": "All generated Go carries the canonical `// Code generated ... DO NOT EDIT` header and a *.gen.go (or wire_gen.go / ent/db/) name (api/api.gen.go, openmeter/billing/derived.gen.go, openmeter/billing/service/convert.gen.go). Confirmed across api/ and billing/.", + "forced_by": "", + "enables": "", + "alternative": "Name generated outputs .gen.go (or wire_gen.go) and never hand-edit them; regenerate from source.", + "example": "", + "source": "deep_scan", + "keywords": [ + "gen.go", + "wire_gen", + "generated", + "naming", + "DO NOT EDIT" + ] + }, + { + "id": "name-convert-001", + "kind": "naming_convention", + "topic": "mapping", + "severity_class": "pattern_divergence", + "description": "Type-translation functions use FromAPI.../ToAPI.../FromDB.../ToDB... names and map/mapped terminology", + "why": "Domain\u2194API\u2194DB conversions use goverter (convert.go \u2192 convert.gen.go) and goderive (derived.gen.go). Hand-written conversion files/functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the /go-types-conversion skill) and use map/mapped terminology, never project/projected. Generated *.gen.go files carry DO-NOT-EDIT headers.", + "forced_by": "", + "enables": "", + "alternative": "Name conversion helpers FromAPI/ToAPI/FromDB/ToDB and describe them as mapping, per the /go-types-conversion skill.", + "example": "", + "source": "deep_scan", + "keywords": [ + "convert", + "FromAPI", + "ToDB", + "mapping", + "goverter" + ] + }, + { + "id": "prac-slog-001", + "kind": "coding_practice", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Require and inject *slog.Logger via Config; never fall back to slog.Default() in production code", + "why": "In production constructors/initialization, always require and inject a *slog.Logger explicitly via Config; never fall back to slog.Default(). AGENTS.md mandates this; the service/adapter Config.Validate() requires a non-nil logger. slog.Default() hides the dependency and yields uncontrolled logging configuration.", + "forced_by": "Explicit dependency injection contract for all production constructors.", + "enables": "Controlled, testable logging configuration per binary.", + "alternative": "Add a Logger *slog.Logger field to the Config struct, validate it non-nil in Validate(), and inject it from the wire provider.", + "example": "", + "source": "deep_scan", + "keywords": [ + "slog", + "logger", + "slog.Default", + "Config", + "injection" + ], + "triggers": { + "path_glob": [ + "openmeter/**", + "app/**", + "pkg/**" + ], + "code_shape": [ + { + "kind": "regex_in_content", + "must_match": [ + "slog\\.Default\\(\\)" + ], + "must_not_match": [ + "_test\\.go" + ] + } + ] + } + }, + { + "id": "prac-lo-001", + "kind": "coding_practice", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Use samber/lo and stdlib helpers instead of local ptr/must wrappers", + "why": "Use samber/lo helpers instead of local wrappers: slices.Clone for defensive copies, lo.ToPtr for pointer literals, lo.Must only for (value,err) panic-on-failure test setup. Never add local ptr/must/loPtr/loMust helpers when github.com/samber/lo already covers the need.", + "forced_by": "", + "enables": "", + "alternative": "Replace local pointer/clone/must helpers with lo.ToPtr, slices.Clone, and lo.Must.", + "example": "", + "source": "deep_scan", + "keywords": [ + "samber/lo", + "lo.ToPtr", + "slices.Clone", + "lo.Must", + "helper" + ] + }, + { + "id": "prac-helper-001", + "kind": "coding_practice", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Do not extract helpers that only wrap 2-4 trivial lines or pass through to another function", + "why": "Do not extract helpers that only wrap 2-4 trivial lines/guards without adding domain intent, and remove leftover pass-through wrappers that only call another function \u2014 call the underlying function directly. Prefer function names that explain the domain reason for the call over names that restate the implementation steps.", + "forced_by": "", + "enables": "", + "alternative": "Inline the few lines at the call site, or give the helper a name that carries genuine domain/business meaning.", + "example": "", + "source": "deep_scan", + "keywords": [ + "helper", + "wrapper", + "inline", + "pass-through", + "refactor" + ] + }, + { + "id": "prac-test-decimal-001", + "kind": "coding_practice", + "topic": "testing", + "severity_class": "pattern_divergence", + "description": "Assert decimal equality in tests via require.Equal on InexactFloat64(), not boolean Equal()", + "why": "When asserting alpacadecimal.Decimal equality in tests, prefer require.Equal(t, expectedFloat64, actual.InexactFloat64()) over boolean assertions like require.True(t, expected.Equal(actual)) when precision allows. Prefer simple float64(5)-style literals over verbose decimal construction for expected values.", + "forced_by": "", + "enables": "", + "alternative": "Use require.Equal(t, float64(5), actual.InexactFloat64()) with plain float literals.", + "example": "", + "source": "deep_scan", + "keywords": [ + "decimal", + "InexactFloat64", + "require.Equal", + "test", + "alpacadecimal" + ] + }, + { + "id": "prac-test-ctx-001", + "kind": "coding_practice", + "topic": "testing", + "severity_class": "pattern_divergence", + "description": "In tests use t.Context() and pair clock.FreezeTime with defer clock.UnFreeze in the same scope", + "why": "In tests, prefer t.Context() over context.Background() so cancellation and lifecycle tie to the test harness. When using clock.FreezeTime(...), immediately pair it with defer clock.UnFreeze() in the same scope so later assertions or subtests do not inherit frozen time accidentally.", + "forced_by": "", + "enables": "", + "alternative": "Call t.Context() for test contexts and place defer clock.UnFreeze() directly after each clock.FreezeTime(...).", + "example": "clock.FreezeTime(now); defer clock.UnFreeze()", + "source": "deep_scan", + "keywords": [ + "t.Context", + "clock.FreezeTime", + "UnFreeze", + "test", + "frozen time" + ] + }, + { + "id": "prac-test-helpers-001", + "kind": "coding_practice", + "topic": "testing", + "severity_class": "pattern_divergence", + "description": "Build domain test deps from underlying constructors under testutils, independent of app/common", + "why": "Keep domain test helpers under openmeter/.../testutils independent of app/common; build test dependencies from underlying constructors (repos, adapters, services, lockr), not the wiring layer, or unrelated wiring additions can create test-only import cycles. Prefer driving UBP billing lifecycle tests through charges.Service.Create/AdvanceCharges/ApplyPatches rather than lower-level charge adapters.", + "forced_by": "", + "enables": "", + "alternative": "Construct test fixtures from package-level constructors (New on repos/adapters/services and lockr) in testutils, not from app/common wiring.", + "example": "", + "source": "deep_scan", + "keywords": [ + "testutils", + "app/common", + "fixtures", + "import cycle", + "constructors" + ] + }, + { + "id": "infra-nix-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Run toolchain commands through the Nix CI shell when go/gofmt/golangci-lint/atlas are missing", + "why": "Always run toolchain commands through the Nix CI shell `nix develop --impure .#ci -c ` when go/gofmt/golangci-lint/atlas are missing from the ambient shell; CI itself runs build/lint/test/migrate-check/generators this way. Load the repo environment with direnv (or direnv exec . ) so project-specific tools are applied consistently.", + "forced_by": "", + "enables": "", + "alternative": "Prefix commands with `nix develop --impure .#ci -c` (or use direnv exec .) when the ambient shell lacks the toolchain.", + "example": "nix develop --impure .#ci -c make lint-go", + "source": "deep_scan", + "keywords": [ + "nix", + "ci", + "toolchain", + "direnv", + "golangci-lint" + ] + }, + { + "id": "infra-pgtest-001", + "kind": "infrastructure", + "topic": "testing", + "severity_class": "pattern_divergence", + "description": "Set POSTGRES_HOST=127.0.0.1 and -tags=dynamic for DB-touching Go tests, or suites silently skip", + "why": "Always set POSTGRES_HOST=127.0.0.1 for DB-touching Go tests (and ensure Postgres is up via docker compose up -d postgres), or suites silently skip during setup. Run tests with -tags=dynamic (required for confluent-kafka-go) and the Make parallelism flags -p 128 -parallel 16.", + "forced_by": "", + "enables": "", + "alternative": "Run `POSTGRES_HOST=127.0.0.1 go test -tags=dynamic ./...` with Postgres running.", + "example": "POSTGRES_HOST=127.0.0.1 go test -tags=dynamic -v ./openmeter/billing/...", + "source": "deep_scan", + "keywords": [ + "POSTGRES_HOST", + "tags=dynamic", + "test", + "postgres", + "skip" + ] + }, + { + "id": "infra-gendrift-001", + "kind": "infrastructure", + "topic": "codegen", + "severity_class": "pattern_divergence", + "description": "Run make generate-all and commit before pushing so generated artifacts do not drift", + "why": "CI fails if `make update-openapi`, `make generate-javascript-sdk`, or `go generate ./...` produce any git diff or untracked files. The chi-middleware oapi-codegen template is patched via make patch-oapi-templates (run automatically by make generate). Run make generate-all and commit before pushing.", + "forced_by": "", + "enables": "", + "alternative": "Run make generate-all (and make gen-api for API changes) and commit the regenerated files before pushing.", + "example": "", + "source": "deep_scan", + "keywords": [ + "generate", + "drift", + "ci", + "make generate-all", + "openapi" + ] + }, + { + "id": "infra-atlas-sum-001", + "kind": "infrastructure", + "topic": "schema-evolution", + "severity_class": "pattern_divergence", + "description": "tools/migrate/migrations/atlas.sum is append-only; never rewrite earlier migrations", + "why": "tools/migrate/migrations/atlas.sum is append-only; pr-checks.yaml runs check_atlas_sum_append_only.py against the PR base SHA, and migrate-check enforces non-linear=error, data_depend=error, incompatible=error (destructive allowed). New migrations must append to the linear chain; editing historical migrations breaks the sum and the lint.", + "forced_by": "", + "enables": "", + "alternative": "Generate a new migration with atlas migrate --env local diff and let it append to atlas.sum; never edit committed migrations or reorder the chain.", + "example": "", + "source": "deep_scan", + "keywords": [ + "atlas.sum", + "append-only", + "migration", + "migrate-check", + "linear" + ] + }, + { + "id": "infra-config-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Touch config.yaml whenever config.example.yaml changes or make server/worker targets abort", + "why": "Copy config.example.yaml to config.yaml (Make targets do this automatically) and touch it whenever config.example.yaml changes, or make server / worker targets abort with a diff warning. Local Postgres DSN is postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable; start dependencies with make up and stop with make down.", + "forced_by": "", + "enables": "", + "alternative": "Run `touch config.yaml` after editing config.example.yaml, or re-run the Make target which refreshes it.", + "example": "", + "source": "deep_scan", + "keywords": [ + "config.yaml", + "config.example.yaml", + "make server", + "freshness", + "make up" + ] + }, + { + "id": "infra-nvmrc-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Keep .nvmrc byte-identical to the Nix CI shell's node -v", + "why": "Always keep .nvmrc byte-identical to `nix develop --impure .#ci -c node -v`; CI fails the build job on mismatch and flake.nix enterShell rewrites .nvmrc from node -v. The committed .nvmrc is the GitHub Actions source of truth for Node-based jobs.", + "forced_by": "", + "enables": "", + "alternative": "Let flake.nix enterShell regenerate .nvmrc, or align it manually to the Nix shell's node -v before committing.", + "example": "", + "source": "deep_scan", + "keywords": [ + ".nvmrc", + "node", + "nix", + "ci", + "version" + ] + }, + { + "id": "infra-modtidy-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Tidy both Go modules together and drop incidental go.sum additions from generate/diff", + "why": "Keep both Go modules tidy together: go mod tidy for the root and go mod tidy -C collector for the collector module (which replaces the parent via local replace ../). Drop incidental go.sum additions (e.g. tablewriter) introduced by make generate or atlas migrate diff unless the task explicitly requires a dependency change.", + "forced_by": "", + "enables": "", + "alternative": "Run make mod (root + collector tidy) and revert unrelated go.sum churn before committing.", + "example": "", + "source": "deep_scan", + "keywords": [ + "go mod tidy", + "collector", + "go.sum", + "tablewriter", + "dependency" + ] + }, + { + "id": "infra-release-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Releases are tag-only; PRs need a release-note label and Conventional Commit messages", + "why": "Container images and Helm charts are tag-only releases to ghcr.io, with release.yaml jobs gating on github.ref_type == 'tag' and tags matching v[0-9]+.[0-9]+.[0-9]+ (optionally -dev.N/-beta.N). Every PR must carry a release-note label (release-note/ignore, kind/feature, release-note/feature, kind/bug, release-note/bug-fix, release-note/breaking-change), and commit messages must follow Conventional Commits enforced by commitizen/prek. End commit messages with the Co-Authored-By: Claude trailer.", + "forced_by": "", + "enables": "", + "alternative": "Add a release-note label to the PR, write Conventional-Commit messages (prek run -a), and tag with v to release.", + "example": "", + "source": "deep_scan", + "keywords": [ + "release", + "tag", + "release-note label", + "conventional commits", + "ghcr" + ] + }, + { + "id": "infra-secrets-001", + "kind": "infrastructure", + "topic": "security", + "severity_class": "pattern_divergence", + "description": "Never commit real secrets; Trufflehog secret scanning fails the build on findings", + "why": "Trufflehog secret scanning runs on PRs/pushes to main and fails on findings. Release secrets are provided via GitHub Actions (GITHUB_TOKEN, POETRY_PYPI_TOKEN_PYPI, vars.DEPOT_PROJECT, vars.TEST_CLICKHOUSE_DSN); SVIX_JWT_SECRET=DUMMY_JWT_SECRET is a non-sensitive dev value only. npm publishing uses OIDC Trusted Publishing (no token).", + "forced_by": "", + "enables": "", + "alternative": "Keep secrets in GitHub Actions secrets/vars; use the documented dummy dev values locally and never hardcode credentials.", + "example": "", + "source": "deep_scan", + "keywords": [ + "secrets", + "trufflehog", + "GITHUB_TOKEN", + "OIDC", + "security" + ] + }, + { + "id": "infra-cgo-001", + "kind": "infrastructure", + "topic": "dependencies", + "severity_class": "pattern_divergence", + "description": "Builds use CGO + musl static linking against librdkafka v2.14.1; use -tags=dynamic locally", + "why": "The Go build/test in Docker and Depot CI uses CGO + musl static linking against librdkafka pinned to v2.14.1, with GO_BUILD_FLAGS=-tags=dynamic for local builds (confluent-kafka-go requires it). Redirect GOTMPDIR/TMPDIR to the workspace on Depot runners to avoid ENOSPC in /run.", + "forced_by": "", + "enables": "", + "alternative": "Build/test locally with -tags=dynamic; keep librdkafka pinned to v2.14.1 in flake.nix when touching the Kafka build.", + "example": "", + "source": "deep_scan", + "keywords": [ + "cgo", + "musl", + "librdkafka", + "tags=dynamic", + "kafka" + ] + }, + { + "id": "data-namespace-handler-001", + "kind": "coding_practice", + "topic": "services", + "severity_class": "pattern_divergence", + "description": "Register namespace handlers before initNamespace if they must provision the default namespace at startup", + "why": "cmd/server/main.go migrates the DB before creating the default namespace; register namespace handlers (app.LedgerNamespaceHandler, app.KafkaIngestNamespaceHandler) before initNamespace(...) if they must provision the default namespace during startup. Registering after initNamespace means the default namespace is created without that handler's provisioning.", + "forced_by": "Default-namespace provisioning runs once at startup after migration.", + "enables": "Ledger and kafka-ingest resources are provisioned for the default namespace at boot.", + "alternative": "Call namespaceManager.RegisterHandler(...) before initNamespace(...) in main.go for any handler that must run for the default namespace.", + "example": "", + "source": "deep_scan", + "keywords": [ + "namespace", + "handler", + "initNamespace", + "main.go", + "provisioning" + ] + }, + { + "id": "data-clickhouse-store-001", + "kind": "data_contract", + "topic": "data-access", + "severity_class": "pattern_divergence", + "description": "Store usage events only in ClickHouse; never persist or join RawEvent against Postgres", + "why": "A separate ClickHouse store and Kafka pipeline carry usage events: per-namespace om__events MergeTree tables, written by the sink-worker. Storing usage events in Postgres, joining RawEvent against Postgres tables, or removing the sink-worker collapses the read-heavy append-only data plane into the OLTP control plane it was deliberately split from.", + "forced_by": "High-volume append-only usage ingest has opposing scaling/failure profiles from OLTP billing.", + "enables": "Usage ingest and aggregation scale independently of Postgres; meters and usage-based billing read aggregated quantities efficiently.", + "alternative": "Keep usage events in ClickHouse via the streaming connector and read aggregated quantities through the streaming query API; do not add them to the Ent schema.", + "example": "", + "source": "deep_scan", + "keywords": [ + "clickhouse", + "usage events", + "RawEvent", + "postgres", + "sink-worker" + ] + }, + { + "id": "data-redis-001", + "kind": "data_contract", + "topic": "data-access", + "severity_class": "pattern_divergence", + "description": "Use Redis only for dedupe and async-query progress, with TTL keys, not as a source of truth", + "why": "Redis is a cache/coordination store: ingest event deduplication via SET NX keys with TTL (openmeter/dedupe/redisdedupe) and async query progress under progress:: keys with TTL (openmeter/progressmanager/adapter). It is role=cache, not a primary store; durable control-plane state belongs in Postgres.", + "forced_by": "Dedupe and progress tracking are ephemeral coordination concerns, not source-of-truth data.", + "enables": "Idempotent ingest and resumable async queries without loading the control-plane database.", + "alternative": "Keep Redis writes as TTL'd dedupe/progress keys; persist anything durable in Postgres via an Ent adapter.", + "example": "", + "source": "deep_scan", + "keywords": [ + "redis", + "dedupe", + "progress", + "TTL", + "cache" + ] + }, + { + "id": "tr-monolith-001", + "kind": "tradeoff", + "topic": "layering", + "severity_class": "tradeoff_undermined", + "description": "Keep one Go module and one Ent client; do not split go.mod per binary or give a domain its own database", + "why": "Six binaries over one module: a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, but the payoff is one codebase, one Ent client, one transaction boundary for cross-domain atomicity. Splitting go.mod per binary, duplicating pkg/models types per service, using a separate database per domain, or introducing a distributed transaction/saga between binaries breaks the shared-transaction guarantee that subscription\u2192billing\u2192charges\u2192ledger relies on.", + "forced_by": "", + "enables": "", + "alternative": "Keep shared types in pkg/models and the single openmeter/ent/db client; achieve cross-domain consistency with one Postgres transaction plus lockr, not sagas.", + "example": "", + "source": "deep_scan", + "keywords": [ + "module", + "ent client", + "saga", + "distributed transaction", + "pkg/models" + ] + }, + { + "id": "sem-httptransport-001", + "kind": "semantic_pattern", + "topic": "error-handling", + "severity_class": "pattern_divergence", + "description": "Build v1 endpoints with httptransport.Handler[Req,Resp] and map domain errors via typed errorEncoders", + "why": "v1 endpoints use httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts) with an errorEncoder that maps domain error types to status codes. Error mapping uses an ordered HandleErrorIfTypeMatches[T] chain (errors.As short-circuit: NotFoundError\u2192404, GenericValidationError\u2192400, UpdateAfterDeleteError\u2192409) plus the ValidationIssue openmeter.http.status_code attribute (singular mapping). The v3 surface mirrors the same logic in apierrors.NewV3ErrorHandlerFunc.", + "forced_by": "", + "enables": "", + "alternative": "Compose httptransport.NewHandler with decode/service/encode and an errorEncoder built from HandleErrorIfTypeMatches; do not invent per-handler ad-hoc status codes.", + "example": "", + "source": "deep_scan", + "keywords": [ + "httptransport", + "errorEncoder", + "HandleErrorIfTypeMatches", + "RFC7807", + "status code" + ] + }, + { + "id": "sem-webhook-001", + "kind": "semantic_pattern", + "topic": "messaging", + "severity_class": "pattern_divergence", + "description": "Deliver notification webhooks behind the webhook.Handler interface with Svix and noop implementations", + "why": "notification/webhook defines a Handler interface (CreateWebhook, UpdateWebhook, endpoint secret/header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans; the event pipeline reconciles delivery state via eventhandler/reconcile.go. New delivery behavior must go behind the Handler interface so the noop swap keeps working when webhooks are off.", + "forced_by": "", + "enables": "", + "alternative": "Add the method to the webhook.Handler interface and implement it in both webhook/svix and webhook/noop.", + "example": "", + "source": "deep_scan", + "keywords": [ + "webhook", + "svix", + "notification", + "noop", + "Handler" + ] + }, + { + "id": "sem-grouphandler-001", + "kind": "semantic_pattern", + "topic": "messaging", + "severity_class": "pattern_divergence", + "description": "Build Kafka consumers with grouphandler type-routed dispatch; ack unknown event types as ignored", + "why": "grouphandler.NewNoPublishingHandler builds a map[eventName][]GroupEventHandler. On each message it derives the CloudEvent type, looks up handlers, unmarshals once into handler[0].NewEvent(), and runs all matching handlers joining their errors. Unknown event types are counted as 'ignored' and ack'd (return nil), not failed; per-message processing time and status counters are emitted to OpenTelemetry. New worker consumers should register handlers into this map rather than hand-rolling consume loops.", + "forced_by": "", + "enables": "", + "alternative": "Register the event handler into the grouphandler map keyed by event name; let unknown types ack as ignored.", + "example": "", + "source": "deep_scan", + "keywords": [ + "grouphandler", + "consumer", + "kafka", + "cloudevent", + "dispatch" + ] + }, + { + "id": "sem-ent-view-001", + "kind": "data_contract", + "topic": "schema-evolution", + "severity_class": "pattern_divergence", + "description": "ent.View schemas need an explicit SQL migration; atlas diff will not emit their DDL", + "why": "ent.View schemas (e.g. ChargesSearchV1) generate query code but do NOT appear in openmeter/ent/db/migrate/schema.go or migrate.Tables, so atlas migrate --env local diff reports no changes for a new view. Their DDL needs an explicit SQL migration (use make generate-view-sql / tools/migrate/cmd/viewgen). Assuming atlas diff emits the view causes silent drift between the Go view definition and the actual database view.", + "forced_by": "Ent/Atlas in this repo do not include ent.View schemas in generated migration metadata.", + "enables": "UNION-ALL cross-subtype read views (ChargesSearchV1) backed by hand-shipped DDL.", + "alternative": "Generate the view DDL via make generate-view-sql and commit it as an explicit SQL migration; do not rely on atlas diff for views.", + "example": "", + "source": "deep_scan", + "keywords": [ + "ent.View", + "ChargesSearchV1", + "migration", + "atlas diff", + "view" + ] + }, + { + "id": "data-customer-fk-001", + "kind": "data_contract", + "topic": "data-modeling", + "severity_class": "pattern_divergence", + "description": "CustomerSubjects.subject_key has no FK to Subject; enforce subject existence in application code", + "why": "CustomerSubjects.subject_key has no foreign key to Subject.key because Ent cannot FK non-ID fields (openmeter/ent/schema/customer.go:147), so a customer can be linked to a subject key that does not exist as a Subject row \u2014 referential integrity is unenforced at the DB level. Validate the subject's existence in the customer service before linking.", + "forced_by": "Ent does not support foreign keys on non-ID columns (ent issue #2549).", + "enables": "Subject linkage by metering key without a synthetic FK column.", + "alternative": "Check Subject existence in the customer service/adapter before writing a CustomerSubjects row, since the DB will not.", + "example": "", + "source": "deep_scan", + "keywords": [ + "CustomerSubjects", + "subject_key", + "foreign key", + "Subject", + "referential integrity" + ] + }, + { + "id": "data-customer-ilike-001", + "kind": "data_contract", + "topic": "data-modeling", + "severity_class": "pattern_divergence", + "description": "Add pg_trgm GIN indexes before exposing case-insensitive contains filters on customer name/email/key", + "why": "The v3 customers list API exposes case-insensitive contains/ocontains filters on name, primary_email and key that compile to leading-wildcard ILIKE and cannot use the plain btree indexes on the customers table, forcing full sequential scans (plus a second seq-scan from Paginate's COUNT(*)). The committed TODO in customer.go warns to add pg_trgm GIN indexes via a custom SQL migration before exposing these ILIKE contains filters.", + "forced_by": "Leading-wildcard ILIKE cannot use a btree index, so contains filters seq-scan without trigram indexes.", + "enables": "Filterable customer list endpoints without DoS-amplifying sequential scans.", + "alternative": "Add pg_trgm GIN indexes on the filtered columns via a custom SQL migration before exposing new contains/ocontains filters on a large table.", + "example": "", + "source": "deep_scan", + "keywords": [ + "customer", + "ILIKE", + "pg_trgm", + "GIN index", + "contains filter" + ] + }, + { + "id": "dec-style-001", + "kind": "decision", + "topic": "layering", + "severity_class": "decision_violation", + "description": "Keep usage metering in ClickHouse/Kafka and control-plane state in Postgres; do not collapse them", + "why": "OpenMeter splits high-volume append-only usage metering (ClickHouse MergeTree + Kafka + sink-worker) from ACID control-plane billing (PostgreSQL + Ent + lockr) because read-heavy ingest/aggregation and transaction-heavy billing have opposing scaling and failure profiles. Putting usage events in Postgres, using a single monolith binary, or a microservice-per-domain-with-own-DB layout all break the root constraint of providing event-time metering AND ACID usage-based billing over one shared codebase.", + "forced_by": "Provide event-time usage metering AND ACID usage-based billing on the same multi-tenant platform over one shared codebase.", + "enables": "Independently scalable ingest/sink and billing/notification/balance workers sharing one module, one Ent client, and one transaction boundary.", + "alternative": "Route usage events through Kafka into ClickHouse and keep transactional state in Postgres via Ent; add new binaries to cmd/ rather than splitting the module or the database.", + "example": "", + "source": "deep_scan", + "keywords": [ + "clickhouse", + "postgres", + "kafka", + "architecture", + "data plane" + ] + }, + { + "id": "sem-entitymapping-001", + "kind": "semantic_pattern", + "topic": "mapping", + "severity_class": "pattern_divergence", + "description": "Use generated goverter/goderive converters for domain\u2194API\u2194DB mapping rather than hand-writing boilerplate", + "why": "convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations. Translating between domain, API, and DB representations should use these generated converters, with hand-written helpers only following the FromAPI/ToAPI/FromDB/ToDB naming convention. Never edit *.gen.go (DO-NOT-EDIT header).", + "forced_by": "", + "enables": "", + "alternative": "Declare a goverter converter interface in convert.go and run make generate; for goderive equality/clone helpers add the annotation and regenerate derived.gen.go.", + "example": "", + "source": "deep_scan", + "keywords": [ + "goverter", + "goderive", + "convert.gen.go", + "mapping", + "converter" + ] + } + ] +} \ No newline at end of file diff --git a/.archie/scan.json b/.archie/scan.json new file mode 100644 index 0000000000..3590cccd48 --- /dev/null +++ b/.archie/scan.json @@ -0,0 +1,50588 @@ +{ + "file_tree": [ + { + "path": ".codex/agents/archie-analysis.toml", + "size": 484, + "extension": ".toml" + }, + { + "path": ".codex/rules/archie.rules", + "size": 12351, + "extension": ".rules" + }, + { + "path": ".dockerignore", + "size": 105, + "extension": "" + }, + { + "path": ".editorconfig", + "size": 355, + "extension": "" + }, + { + "path": ".gitignore", + "size": 744, + "extension": "" + }, + { + "path": "AGENTS.md", + "size": 22559, + "extension": ".md" + }, + { + "path": "CLAUDE.md", + "size": 82, + "extension": ".md" + }, + { + "path": "CODE_OF_CONDUCT.md", + "size": 3426, + "extension": ".md" + }, + { + "path": "CONTRIBUTING.md", + "size": 3567, + "extension": ".md" + }, + { + "path": "Dockerfile", + "size": 3722, + "extension": "" + }, + { + "path": "LICENSE", + "size": 11358, + "extension": "" + }, + { + "path": "Makefile", + "size": 13091, + "extension": "" + }, + { + "path": "README.md", + "size": 6224, + "extension": ".md" + }, + { + "path": "SECURITY.md", + "size": 1577, + "extension": ".md" + }, + { + "path": "api/api.gen.go", + "size": 970442, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/api.go", + "size": 128, + "extension": ".go" + }, + { + "path": "api/client/go/README.md", + "size": 1191, + "extension": ".md" + }, + { + "path": "api/client/go/client.gen.go", + "size": 1729219, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/client/go/client.go", + "size": 2339, + "extension": ".go" + }, + { + "path": "api/client/go/client_test.go", + "size": 9132, + "extension": ".go" + }, + { + "path": "api/client/go/codegen.yaml", + "size": 387, + "extension": ".yaml" + }, + { + "path": "api/client/go/error.go", + "size": 717, + "extension": ".go" + }, + { + "path": "api/client/javascript/.gitignore", + "size": 377, + "extension": "" + }, + { + "path": "api/client/javascript/Makefile", + "size": 1458, + "extension": "" + }, + { + "path": "api/client/javascript/README.md", + "size": 23045, + "extension": ".md" + }, + { + "path": "api/client/javascript/biome.json", + "size": 1461, + "extension": ".json" + }, + { + "path": "api/client/javascript/index.ts", + "size": 38, + "extension": ".ts" + }, + { + "path": "api/client/javascript/orval.config.ts", + "size": 817, + "extension": ".ts" + }, + { + "path": "api/client/javascript/package.json", + "size": 3331, + "extension": ".json" + }, + { + "path": "api/client/javascript/patches/openapi-typescript.patch", + "size": 592118, + "extension": ".patch" + }, + { + "path": "api/client/javascript/pnpm-lock.yaml", + "size": 106231, + "extension": ".yaml" + }, + { + "path": "api/client/javascript/pnpm-workspace.yaml", + "size": 75, + "extension": ".yaml" + }, + { + "path": "api/client/javascript/scripts/add-as-const.ts", + "size": 651, + "extension": ".ts" + }, + { + "path": "api/client/javascript/scripts/generate.ts", + "size": 1620, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/addons.ts", + "size": 3344, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/apps.ts", + "size": 8673, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/billing.ts", + "size": 14692, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/common.ts", + "size": 1597, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/customers.ts", + "size": 20279, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/debug.ts", + "size": 734, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/entitlements.ts", + "size": 15446, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/events.spec.ts", + "size": 2642, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/events.ts", + "size": 3458, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/features.ts", + "size": 2371, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/index.ts", + "size": 3108, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/info.ts", + "size": 1151, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/meters.ts", + "size": 5599, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/notifications.ts", + "size": 9047, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/plans.ts", + "size": 7470, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/portal.ts", + "size": 1650, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/schemas.ts", + "size": 1009816, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/subjects.ts", + "size": 2561, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/subscription-addons.ts", + "size": 2954, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/subscriptions.ts", + "size": 5403, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/client/utils.ts", + "size": 2361, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/portal/index.ts", + "size": 2854, + "extension": ".ts" + }, + { + "path": "api/client/javascript/src/react/context.tsx", + "size": 736, + "extension": ".tsx" + }, + { + "path": "api/client/javascript/src/zod/index.ts", + "size": 936934, + "extension": ".ts" + }, + { + "path": "api/client/javascript/tsconfig.json", + "size": 684, + "extension": ".json" + }, + { + "path": "api/client/javascript/vitest.config.ts", + "size": 91, + "extension": ".ts" + }, + { + "path": "api/client/node/README.md", + "size": 85, + "extension": ".md" + }, + { + "path": "api/client/python/.gitignore", + "size": 165, + "extension": "" + }, + { + "path": "api/client/python/MANIFEST.in", + "size": 121, + "extension": ".in" + }, + { + "path": "api/client/python/Makefile", + "size": 557, + "extension": "" + }, + { + "path": "api/client/python/README.md", + "size": 43384, + "extension": ".md" + }, + { + "path": "api/client/python/examples/README.md", + "size": 518, + "extension": ".md" + }, + { + "path": "api/client/python/examples/async/customer.py", + "size": 2824, + "extension": ".py" + }, + { + "path": "api/client/python/examples/async/entitlement.py", + "size": 4027, + "extension": ".py" + }, + { + "path": "api/client/python/examples/async/ingest.py", + "size": 1196, + "extension": ".py" + }, + { + "path": "api/client/python/examples/async/query.py", + "size": 1695, + "extension": ".py" + }, + { + "path": "api/client/python/examples/async/subscription.py", + "size": 2988, + "extension": ".py" + }, + { + "path": "api/client/python/examples/pyproject.toml", + "size": 355, + "extension": ".toml" + }, + { + "path": "api/client/python/examples/pyrightconfig.json", + "size": 66, + "extension": ".json" + }, + { + "path": "api/client/python/examples/sync/customer.py", + "size": 2560, + "extension": ".py" + }, + { + "path": "api/client/python/examples/sync/entitlement.py", + "size": 3693, + "extension": ".py" + }, + { + "path": "api/client/python/examples/sync/ingest.py", + "size": 1045, + "extension": ".py" + }, + { + "path": "api/client/python/examples/sync/query.py", + "size": 1507, + "extension": ".py" + }, + { + "path": "api/client/python/examples/sync/subscription.py", + "size": 2736, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/__init__.py", + "size": 81, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_client.py", + "size": 912, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_commit.py", + "size": 40, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/__init__.py", + "size": 576, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_client.py", + "size": 13687, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_configuration.py", + "size": 1291, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_patch.py", + "size": 515, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_types.py", + "size": 4371, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_utils/__init__.py", + "size": 0, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_utils/model_base.py", + "size": 54896, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_utils/serialization.py", + "size": 81932, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/_version.py", + "size": 34, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/__init__.py", + "size": 523, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/_client.py", + "size": 13957, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/_configuration.py", + "size": 1297, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/_patch.py", + "size": 515, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/operations/__init__.py", + "size": 3911, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/operations/_operations.py", + "size": 900981, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/aio/operations/_patch.py", + "size": 515, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/models/__init__.py", + "size": 22937, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/models/_enums.py", + "size": 27022, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/models/_models.py", + "size": 671756, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/models/_patch.py", + "size": 515, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/operations/__init__.py", + "size": 3911, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/operations/_operations.py", + "size": 1059885, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_generated/operations/_patch.py", + "size": 515, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_types.py", + "size": 4371, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/_version.py", + "size": 34, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/aio/__init__.py", + "size": 569, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/aio/_client.py", + "size": 917, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/aio/operations/__init__.py", + "size": 892, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/models/__init__.py", + "size": 879, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/operations/__init__.py", + "size": 858, + "extension": ".py" + }, + { + "path": "api/client/python/openmeter/py.typed", + "size": 26, + "extension": ".typed" + }, + { + "path": "api/client/python/pyproject.toml", + "size": 880, + "extension": ".toml" + }, + { + "path": "api/client/python/scripts/release.sh", + "size": 1699, + "extension": ".sh" + }, + { + "path": "api/client/web/README.md", + "size": 84, + "extension": ".md" + }, + { + "path": "api/codegen.yaml", + "size": 523, + "extension": ".yaml" + }, + { + "path": "api/convert.gen.go", + "size": 570, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/convert.go", + "size": 598, + "extension": ".go" + }, + { + "path": "api/openapi.cloud.yaml", + "size": 994462, + "extension": ".yaml" + }, + { + "path": "api/openapi.yaml", + "size": 1031830, + "extension": ".yaml" + }, + { + "path": "api/spec/.gitignore", + "size": 84, + "extension": "" + }, + { + "path": "api/spec/Makefile", + "size": 1847, + "extension": "" + }, + { + "path": "api/spec/README.md", + "size": 1405, + "extension": ".md" + }, + { + "path": "api/spec/package.json", + "size": 1720, + "extension": ".json" + }, + { + "path": "api/spec/packages/aip/common/definitions/aip_filters.yaml", + "size": 10758, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/common/definitions/errors.yaml", + "size": 19521, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/common/definitions/konnect_properties.yaml", + "size": 3311, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/common/definitions/metadatas.yaml", + "size": 6816, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/common/definitions/properties.yaml", + "size": 2544, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/common/definitions/security.yaml", + "size": 2052, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/aip/lib/index.js", + "size": 996, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/casing.js", + "size": 2799, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/composition-over-inheritance.js", + "size": 1604, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/docs.js", + "size": 5568, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/field-prefix.js", + "size": 1823, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/friendly-name.js", + "size": 2094, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/no-nullable.js", + "size": 738, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/operation-id.js", + "size": 994, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/operation-summary.js", + "size": 692, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/lib/rules/utils.js", + "size": 3505, + "extension": ".js" + }, + { + "path": "api/spec/packages/aip/package.json", + "size": 1508, + "extension": ".json" + }, + { + "path": "api/spec/packages/aip/scripts/apply-doc-fixes.mjs", + "size": 1788, + "extension": ".mjs" + }, + { + "path": "api/spec/packages/aip/scripts/flatten-allof.mjs", + "size": 3140, + "extension": ".mjs" + }, + { + "path": "api/spec/packages/aip/scripts/seal-object-schemas.mjs", + "size": 3758, + "extension": ".mjs" + }, + { + "path": "api/spec/packages/aip/src/apps/app.tsp", + "size": 2092, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/catalog.tsp", + "size": 817, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/customer.tsp", + "size": 1496, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/external_invoicing.tsp", + "size": 2080, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/index.tsp", + "size": 178, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/operations.tsp", + "size": 816, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/sandbox.tsp", + "size": 190, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/apps/stripe.tsp", + "size": 16577, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/billing/index.tsp", + "size": 94, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/billing/operations.tsp", + "size": 2175, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/billing/profile.tsp", + "size": 9573, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/billing/tax.tsp", + "size": 2351, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/billing/totals.tsp", + "size": 1674, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/common/error.tsp", + "size": 2874, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/common/pagination.tsp", + "size": 2591, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/common/parameters.tsp", + "size": 6800, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/common/properties.tsp", + "size": 746, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/currencies/cost-bases/cost-basis.tsp", + "size": 989, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/currencies/cost-bases/operations.tsp", + "size": 1759, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/currencies/currency.tsp", + "size": 2959, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/currencies/index.tsp", + "size": 90, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/currencies/operations.tsp", + "size": 2078, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/billing.tsp", + "size": 626, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/charges/charges.tsp", + "size": 6754, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/charges/index.tsp", + "size": 51, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/charges/operations.tsp", + "size": 2014, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/adjustment.tsp", + "size": 622, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/balance.tsp", + "size": 1181, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/grant.tsp", + "size": 8944, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/index.tsp", + "size": 72, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/ledger.tsp", + "size": 3296, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/credits/operations.tsp", + "size": 6721, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/customer.tsp", + "size": 3483, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/index.tsp", + "size": 112, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/customers/operations.tsp", + "size": 6910, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/defaults/index.tsp", + "size": 52, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/defaults/operations.tsp", + "size": 996, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/defaults/taxcodes.tsp", + "size": 883, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/entitlements/access.tsp", + "size": 1016, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/entitlements/entitlements.tsp", + "size": 194, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/entitlements/index.tsp", + "size": 79, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/entitlements/operations.tsp", + "size": 1087, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/events/event.tsp", + "size": 3604, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/events/index.tsp", + "size": 49, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/events/operations.tsp", + "size": 3221, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/features/cost.tsp", + "size": 1462, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/features/feature.tsp", + "size": 1861, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/features/index.tsp", + "size": 118, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/features/operations.tsp", + "size": 3366, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/features/unitcost.tsp", + "size": 4374, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/governance/governance.tsp", + "size": 6169, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/governance/index.tsp", + "size": 77, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/governance/operations.tsp", + "size": 1038, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/invoices/index.tsp", + "size": 46, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/invoices/invoice.tsp", + "size": 487, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/invoices/party.tsp", + "size": 2517, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/konnect.tsp", + "size": 8223, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/llmcost/index.tsp", + "size": 50, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/llmcost/operations.tsp", + "size": 3526, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/llmcost/prices.tsp", + "size": 3791, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/main.tsp", + "size": 71, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/meters/index.tsp", + "size": 49, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/meters/meter.tsp", + "size": 2223, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/meters/operations.tsp", + "size": 4858, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/meters/query.tsp", + "size": 3872, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/openmeter.tsp", + "size": 6754, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/addon.tsp", + "size": 3187, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/index.tsp", + "size": 170, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/operations.tsp", + "size": 8764, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/plan.tsp", + "size": 4451, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/planaddon.tsp", + "size": 1215, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/price.tsp", + "size": 6043, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/ratecard.tsp", + "size": 3863, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/productcatalog/unitconfig.tsp", + "size": 4984, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/address.tsp", + "size": 1203, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/consts.tsp", + "size": 3205, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/enums.tsp", + "size": 456, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/errors.tsp", + "size": 1427, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/filters.tsp", + "size": 5674, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/index.tsp", + "size": 245, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/parameters.tsp", + "size": 815, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/properties.tsp", + "size": 5011, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/request.tsp", + "size": 985, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/resource.tsp", + "size": 1954, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/shared/responses.tsp", + "size": 1266, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/subscriptions/index.tsp", + "size": 150, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/subscriptions/operations.tsp", + "size": 5585, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/subscriptions/reference.tsp", + "size": 871, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/subscriptions/subscription.tsp", + "size": 4559, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/subscriptions/subscriptionaddon.tsp", + "size": 1189, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/tax/codes.tsp", + "size": 724, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/tax/index.tsp", + "size": 49, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/tax/operations.tsp", + "size": 1948, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/src/test.tsp", + "size": 1374, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/aip/tspconfig.yaml", + "size": 334, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/legacy/README.md", + "size": 2991, + "extension": ".md" + }, + { + "path": "api/spec/packages/legacy/lib/index.js", + "size": 658, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/casing.js", + "size": 1080, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/composition-over-inheritance.js", + "size": 1604, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/docs.js", + "size": 1491, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/friendly-name.js", + "size": 1766, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/operation-summary.js", + "size": 692, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/lib/rules/utils.js", + "size": 1482, + "extension": ".js" + }, + { + "path": "api/spec/packages/legacy/package.json", + "size": 1452, + "extension": ".json" + }, + { + "path": "api/spec/packages/legacy/src/app/app.tsp", + "size": 3265, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/capability.tsp", + "size": 1173, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/customer.tsp", + "size": 2171, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/custominvoicing.tsp", + "size": 5732, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/main.tsp", + "size": 230, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/marketplace.tsp", + "size": 5726, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/oauth.tsp", + "size": 4061, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/sandbox.tsp", + "size": 342, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/app/stripe.tsp", + "size": 21376, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/auth.tsp", + "size": 126, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/customeroverride.tsp", + "size": 8143, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices.tsp", + "size": 18875, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/README.md", + "size": 1006, + "extension": ".md" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/credits.tsp", + "size": 571, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/discounts.tsp", + "size": 4758, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/docref.tsp", + "size": 2154, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/invoice.tsp", + "size": 28651, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/main.tsp", + "size": 482, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/party.tsp", + "size": 2981, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/pay.tsp", + "size": 2523, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/invoices/tax.tsp", + "size": 1406, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/main.tsp", + "size": 401, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/billing/profile.tsp", + "size": 14162, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/cloud/auth.tsp", + "size": 383, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/cloud/main.tsp", + "size": 10912, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/customer/app.tsp", + "size": 1575, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/customer/customer.tsp", + "size": 6423, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/customer/main.tsp", + "size": 90, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/customer/stripe.tsp", + "size": 4465, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/debug.tsp", + "size": 872, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/customer.tsp", + "size": 1659, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/entitlements.tsp", + "size": 12306, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/grant.tsp", + "size": 7130, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/main.tsp", + "size": 337, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/subjects.tsp", + "size": 18255, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/v2/customer.tsp", + "size": 11549, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/v2/entitlements.tsp", + "size": 6406, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/v2/grant.tsp", + "size": 1942, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/v2/grants.tsp", + "size": 1332, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/entitlements/v2/main.tsp", + "size": 501, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/errors.tsp", + "size": 6089, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/events.tsp", + "size": 7215, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/filter.tsp", + "size": 6593, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/info/currencies.tsp", + "size": 367, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/info/main.tsp", + "size": 214, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/info/progress.tsp", + "size": 775, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/info/routes.tsp", + "size": 389, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/main.tsp", + "size": 4190, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/meters.tsp", + "size": 16073, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/channel.tsp", + "size": 6302, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/entitlements.tsp", + "size": 7869, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/event.tsp", + "size": 9023, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/invoice.tsp", + "size": 3053, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/main.tsp", + "size": 409, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/notification/rule.tsp", + "size": 6061, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/portal.tsp", + "size": 3389, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/addon.tsp", + "size": 2697, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/alignment.tsp", + "size": 533, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/discounts.tsp", + "size": 1362, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/errors.tsp", + "size": 1634, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/features.tsp", + "size": 6288, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/main.tsp", + "size": 381, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/plan.tsp", + "size": 5945, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/planaddon.tsp", + "size": 1974, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/prices.tsp", + "size": 7256, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/prorating.tsp", + "size": 657, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/ratecards.tsp", + "size": 5534, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/routes.tsp", + "size": 17316, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/subscription.tsp", + "size": 16045, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/subscriptionaddon.tsp", + "size": 3901, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/productcatalog/tax.tsp", + "size": 2016, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/query.tsp", + "size": 2666, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/rest.tsp", + "size": 1251, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/subjects.tsp", + "size": 5245, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/src/types.tsp", + "size": 10796, + "extension": ".tsp" + }, + { + "path": "api/spec/packages/legacy/tspconfig.client.yaml", + "size": 497, + "extension": ".yaml" + }, + { + "path": "api/spec/packages/legacy/tspconfig.yaml", + "size": 283, + "extension": ".yaml" + }, + { + "path": "api/spec/patches/@typespec__compiler.patch", + "size": 1013186, + "extension": ".patch" + }, + { + "path": "api/spec/patches/@typespec__http-client-python.patch", + "size": 949802, + "extension": ".patch" + }, + { + "path": "api/spec/patches/@typespec__http.patch", + "size": 58202, + "extension": ".patch" + }, + { + "path": "api/spec/patches/@typespec__openapi.patch", + "size": 15251, + "extension": ".patch" + }, + { + "path": "api/spec/patches/@typespec__openapi3.patch", + "size": 251377, + "extension": ".patch" + }, + { + "path": "api/spec/pnpm-lock.yaml", + "size": 128374, + "extension": ".yaml" + }, + { + "path": "api/spec/pnpm-workspace.yaml", + "size": 100, + "extension": ".yaml" + }, + { + "path": "api/types/doc.go", + "size": 267, + "extension": ".go" + }, + { + "path": "api/v3/api.gen.go", + "size": 438289, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/api.go", + "size": 127, + "extension": ".go" + }, + { + "path": "api/v3/apierrors/encoder.go", + "size": 951, + "extension": ".go" + }, + { + "path": "api/v3/apierrors/encoder_test.go", + "size": 1347, + "extension": ".go" + }, + { + "path": "api/v3/apierrors/errors.go", + "size": 5427, + "extension": ".go" + }, + { + "path": "api/v3/apierrors/errors_ctors.go", + "size": 8933, + "extension": ".go" + }, + { + "path": "api/v3/apierrors/handler.go", + "size": 6240, + "extension": ".go" + }, + { + "path": "api/v3/codegen.yaml", + "size": 623, + "extension": ".yaml" + }, + { + "path": "api/v3/filters/convert.go", + "size": 6828, + "extension": ".go" + }, + { + "path": "api/v3/filters/convert_test.go", + "size": 12896, + "extension": ".go" + }, + { + "path": "api/v3/filters/filter.go", + "size": 4783, + "extension": ".go" + }, + { + "path": "api/v3/filters/parse.go", + "size": 19703, + "extension": ".go" + }, + { + "path": "api/v3/filters/parse_test.go", + "size": 29752, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/archive.go", + "size": 1720, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/convert.go", + "size": 22697, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/create.go", + "size": 1750, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/delete.go", + "size": 1417, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/get.go", + "size": 1641, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/handler.go", + "size": 875, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/list.go", + "size": 4787, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/publish.go", + "size": 1878, + "extension": ".go" + }, + { + "path": "api/v3/handlers/addons/update.go", + "size": 1835, + "extension": ".go" + }, + { + "path": "api/v3/handlers/apps/convert.gen.go", + "size": 2572, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/apps/convert.go", + "size": 5900, + "extension": ".go" + }, + { + "path": "api/v3/handlers/apps/get_app.go", + "size": 1497, + "extension": ".go" + }, + { + "path": "api/v3/handlers/apps/handler.go", + "size": 726, + "extension": ".go" + }, + { + "path": "api/v3/handlers/apps/list_app.go", + "size": 2628, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/convert.gen.go", + "size": 10926, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/billingprofiles/convert.go", + "size": 13548, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/create.go", + "size": 1880, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/delete.go", + "size": 1774, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/error_encoder.go", + "size": 1038, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/get.go", + "size": 1985, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/handler.go", + "size": 893, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/list.go", + "size": 2834, + "extension": ".go" + }, + { + "path": "api/v3/handlers/billingprofiles/update.go", + "size": 2415, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/convert.go", + "size": 1740, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/create.go", + "size": 1583, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/create_cost_basis.go", + "size": 1678, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/get_cost_bases.go", + "size": 2924, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/handler.go", + "size": 873, + "extension": ".go" + }, + { + "path": "api/v3/handlers/currencies/list.go", + "size": 3850, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/convert.gen.go", + "size": 21808, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/customers/billing/convert.go", + "size": 5597, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go", + "size": 3289, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go", + "size": 3891, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/error_encoder.go", + "size": 1039, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/get_billing.go", + "size": 3530, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/handler.go", + "size": 1400, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/update_billing.go", + "size": 6701, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/billing/update_billing_app_data.go", + "size": 5279, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/charges/convert.go", + "size": 15934, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/charges/convert_test.go", + "size": 1971, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/charges/handler.go", + "size": 732, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/charges/list.go", + "size": 6028, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/convert.gen.go", + "size": 7489, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/customers/convert.go", + "size": 2443, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/create.go", + "size": 1800, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/convert.go", + "size": 16747, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/convert_test.go", + "size": 1437, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/create_grant.go", + "size": 1950, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/errors.go", + "size": 708, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/externalsettlement.go", + "size": 2371, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/externalsettlement_test.go", + "size": 1626, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/get_balance.go", + "size": 3684, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/get_grant.go", + "size": 1651, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/handler.go", + "size": 2091, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/list_grants.go", + "size": 3613, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/list_transactions.go", + "size": 4840, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/credits/list_transactions_test.go", + "size": 3776, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/delete.go", + "size": 1627, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/entitlementaccess/handler.go", + "size": 928, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/entitlementaccess/list.go", + "size": 3038, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/entitlementaccess/mapping.go", + "size": 1809, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/get.go", + "size": 1612, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/handler.go", + "size": 830, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/list.go", + "size": 5394, + "extension": ".go" + }, + { + "path": "api/v3/handlers/customers/upsert.go", + "size": 3512, + "extension": ".go" + }, + { + "path": "api/v3/handlers/events/convert.go", + "size": 4636, + "extension": ".go" + }, + { + "path": "api/v3/handlers/events/handler.go", + "size": 893, + "extension": ".go" + }, + { + "path": "api/v3/handlers/events/ingest.go", + "size": 3008, + "extension": ".go" + }, + { + "path": "api/v3/handlers/events/list.go", + "size": 6369, + "extension": ".go" + }, + { + "path": "api/v3/handlers/events/list_test.go", + "size": 3492, + "extension": ".go" + }, + { + "path": "api/v3/handlers/featurecost/convert.go", + "size": 1739, + "extension": ".go" + }, + { + "path": "api/v3/handlers/featurecost/handler.go", + "size": 1183, + "extension": ".go" + }, + { + "path": "api/v3/handlers/featurecost/query.go", + "size": 3175, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/convert.go", + "size": 9219, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/convert_test.go", + "size": 17997, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/create.go", + "size": 2930, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/create_test.go", + "size": 1563, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/delete.go", + "size": 1447, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/error_encoder.go", + "size": 870, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/get.go", + "size": 1976, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/handler.go", + "size": 1157, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/list.go", + "size": 4128, + "extension": ".go" + }, + { + "path": "api/v3/handlers/features/update.go", + "size": 2134, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/convert.go", + "size": 5295, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/convert_test.go", + "size": 535, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/create_override.go", + "size": 1649, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/delete_override.go", + "size": 1428, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/get_price.go", + "size": 1383, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/handler.go", + "size": 811, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/list_overrides.go", + "size": 3947, + "extension": ".go" + }, + { + "path": "api/v3/handlers/llmcost/list_prices.go", + "size": 5010, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/convert.gen.go", + "size": 3162, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/meters/convert.go", + "size": 5406, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/create.go", + "size": 1740, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/delete.go", + "size": 1610, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/dimensions.go", + "size": 317, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/errors.go", + "size": 628, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/get.go", + "size": 1466, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/handler.go", + "size": 1189, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/list.go", + "size": 3542, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query.go", + "size": 2248, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/convert.go", + "size": 2488, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/convert_test.go", + "size": 3406, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/customers.go", + "size": 1561, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/dimensions.go", + "size": 488, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/dimensions_test.go", + "size": 1303, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/errors.go", + "size": 2973, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/params.go", + "size": 3126, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query/params_test.go", + "size": 7760, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/query_csv.go", + "size": 5898, + "extension": ".go" + }, + { + "path": "api/v3/handlers/meters/update.go", + "size": 1836, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/archive.go", + "size": 1735, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/convert.go", + "size": 19832, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/convert_test.go", + "size": 38003, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/create.go", + "size": 1730, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/delete.go", + "size": 1443, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/get.go", + "size": 1478, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/handler.go", + "size": 857, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/list.go", + "size": 4632, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/convert.go", + "size": 1282, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/create.go", + "size": 2270, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/delete.go", + "size": 1643, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/get.go", + "size": 1648, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/handler.go", + "size": 1018, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/lists.go", + "size": 2716, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/planaddons/update.go", + "size": 2366, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/publish.go", + "size": 1894, + "extension": ".go" + }, + { + "path": "api/v3/handlers/plans/update.go", + "size": 1821, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/cancel.go", + "size": 2380, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/change.go", + "size": 4369, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/convert.go", + "size": 3393, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/create.go", + "size": 6486, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/get.go", + "size": 1661, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/handler.go", + "size": 1629, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/list.go", + "size": 4984, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/subscriptionaddons/convert.go", + "size": 1637, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/subscriptionaddons/get.go", + "size": 1938, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/subscriptionaddons/handler.go", + "size": 811, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/subscriptionaddons/list.go", + "size": 4083, + "extension": ".go" + }, + { + "path": "api/v3/handlers/subscriptions/unschedule_cancelation.go", + "size": 1678, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/convert.gen.go", + "size": 4921, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "api/v3/handlers/taxcodes/convert.go", + "size": 5015, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/create.go", + "size": 1729, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/delete.go", + "size": 1713, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/get.go", + "size": 1640, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/get_organization_default_tax_codes.go", + "size": 1694, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/handler.go", + "size": 967, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/list.go", + "size": 2689, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/update.go", + "size": 1924, + "extension": ".go" + }, + { + "path": "api/v3/handlers/taxcodes/upsert_organization_default_tax_codes.go", + "size": 1980, + "extension": ".go" + }, + { + "path": "api/v3/labels/convert.go", + "size": 2080, + "extension": ".go" + }, + { + "path": "api/v3/labels/convert_test.go", + "size": 5341, + "extension": ".go" + }, + { + "path": "api/v3/labels/validate.go", + "size": 2432, + "extension": ".go" + }, + { + "path": "api/v3/labels/validate_test.go", + "size": 3964, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/decoder.go", + "size": 809, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/error.go", + "size": 4006, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/hook.go", + "size": 2695, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/response.go", + "size": 1470, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/router.go", + "size": 1847, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/validator.go", + "size": 4300, + "extension": ".go" + }, + { + "path": "api/v3/oasmiddleware/validator_test.go", + "size": 4515, + "extension": ".go" + }, + { + "path": "api/v3/openapi.yaml", + "size": 337313, + "extension": ".yaml" + }, + { + "path": "api/v3/render/render.go", + "size": 1565, + "extension": ".go" + }, + { + "path": "api/v3/request/body.go", + "size": 1120, + "extension": ".go" + }, + { + "path": "api/v3/request/filter.go", + "size": 1915, + "extension": ".go" + }, + { + "path": "api/v3/request/filter_test.go", + "size": 2880, + "extension": ".go" + }, + { + "path": "api/v3/request/sort.go", + "size": 1402, + "extension": ".go" + }, + { + "path": "api/v3/response/cursorpagination.go", + "size": 1881, + "extension": ".go" + }, + { + "path": "api/v3/response/pagepagination.go", + "size": 495, + "extension": ".go" + }, + { + "path": "api/v3/server/routes.go", + "size": 17953, + "extension": ".go" + }, + { + "path": "api/v3/server/server.go", + "size": 18912, + "extension": ".go" + }, + { + "path": "api/v3/templates/chi-middleware.tmpl.patch", + "size": 1021, + "extension": ".patch" + }, + { + "path": "api/v3/test/embed.go", + "size": 88, + "extension": ".go" + }, + { + "path": "api/v3/test/filters_test.go", + "size": 26201, + "extension": ".go" + }, + { + "path": "api/v3/test/openapi.test.yaml", + "size": 10253, + "extension": ".yaml" + }, + { + "path": "app/common/app.go", + "size": 6144, + "extension": ".go" + }, + { + "path": "app/common/billing.go", + "size": 10872, + "extension": ".go" + }, + { + "path": "app/common/charges.go", + "size": 16728, + "extension": ".go" + }, + { + "path": "app/common/clickhouse.go", + "size": 1952, + "extension": ".go" + }, + { + "path": "app/common/config.go", + "size": 2347, + "extension": ".go" + }, + { + "path": "app/common/creditgrant.go", + "size": 878, + "extension": ".go" + }, + { + "path": "app/common/currency.go", + "size": 696, + "extension": ".go" + }, + { + "path": "app/common/customer.go", + "size": 3700, + "extension": ".go" + }, + { + "path": "app/common/customerbalance.go", + "size": 1466, + "extension": ".go" + }, + { + "path": "app/common/database.go", + "size": 3185, + "extension": ".go" + }, + { + "path": "app/common/entitlement.go", + "size": 1916, + "extension": ".go" + }, + { + "path": "app/common/featuregate.go", + "size": 169, + "extension": ".go" + }, + { + "path": "app/common/ffx.go", + "size": 1716, + "extension": ".go" + }, + { + "path": "app/common/framework.go", + "size": 155, + "extension": ".go" + }, + { + "path": "app/common/globals.go", + "size": 836, + "extension": ".go" + }, + { + "path": "app/common/kafka.go", + "size": 5190, + "extension": ".go" + }, + { + "path": "app/common/ledger.go", + "size": 4174, + "extension": ".go" + }, + { + "path": "app/common/ledger_test.go", + "size": 1745, + "extension": ".go" + }, + { + "path": "app/common/llmcost.go", + "size": 1385, + "extension": ".go" + }, + { + "path": "app/common/locker.go", + "size": 298, + "extension": ".go" + }, + { + "path": "app/common/metadata.go", + "size": 805, + "extension": ".go" + }, + { + "path": "app/common/meter.go", + "size": 4534, + "extension": ".go" + }, + { + "path": "app/common/meterevent.go", + "size": 624, + "extension": ".go" + }, + { + "path": "app/common/namespace.go", + "size": 876, + "extension": ".go" + }, + { + "path": "app/common/notification.go", + "size": 4791, + "extension": ".go" + }, + { + "path": "app/common/openmeter_balanceworker.go", + "size": 4734, + "extension": ".go" + }, + { + "path": "app/common/openmeter_billingworker.go", + "size": 3590, + "extension": ".go" + }, + { + "path": "app/common/openmeter_notification.go", + "size": 627, + "extension": ".go" + }, + { + "path": "app/common/openmeter_server.go", + "size": 3125, + "extension": ".go" + }, + { + "path": "app/common/openmeter_sinkworker.go", + "size": 6608, + "extension": ".go" + }, + { + "path": "app/common/portal.go", + "size": 651, + "extension": ".go" + }, + { + "path": "app/common/productcatalog.go", + "size": 4708, + "extension": ".go" + }, + { + "path": "app/common/progressmanager.go", + "size": 933, + "extension": ".go" + }, + { + "path": "app/common/runner.go", + "size": 563, + "extension": ".go" + }, + { + "path": "app/common/secret.go", + "size": 667, + "extension": ".go" + }, + { + "path": "app/common/server.go", + "size": 641, + "extension": ".go" + }, + { + "path": "app/common/streaming.go", + "size": 2160, + "extension": ".go" + }, + { + "path": "app/common/subject.go", + "size": 1226, + "extension": ".go" + }, + { + "path": "app/common/subscription.go", + "size": 5904, + "extension": ".go" + }, + { + "path": "app/common/svix.go", + "size": 1404, + "extension": ".go" + }, + { + "path": "app/common/taxcode.go", + "size": 2133, + "extension": ".go" + }, + { + "path": "app/common/telemetry.go", + "size": 14952, + "extension": ".go" + }, + { + "path": "app/common/telemetry_test.go", + "size": 3104, + "extension": ".go" + }, + { + "path": "app/common/termination.go", + "size": 4171, + "extension": ".go" + }, + { + "path": "app/common/watermill.go", + "size": 2696, + "extension": ".go" + }, + { + "path": "app/config/aggregation.go", + "size": 6769, + "extension": ".go" + }, + { + "path": "app/config/apps.go", + "size": 1360, + "extension": ".go" + }, + { + "path": "app/config/balanceworker.go", + "size": 1900, + "extension": ".go" + }, + { + "path": "app/config/billing.go", + "size": 1490, + "extension": ".go" + }, + { + "path": "app/config/billingworker.go", + "size": 666, + "extension": ".go" + }, + { + "path": "app/config/config.go", + "size": 6496, + "extension": ".go" + }, + { + "path": "app/config/config_test.go", + "size": 13336, + "extension": ".go" + }, + { + "path": "app/config/credits.go", + "size": 693, + "extension": ".go" + }, + { + "path": "app/config/customer.go", + "size": 588, + "extension": ".go" + }, + { + "path": "app/config/dedupe.go", + "size": 5120, + "extension": ".go" + }, + { + "path": "app/config/entitlements.go", + "size": 1344, + "extension": ".go" + }, + { + "path": "app/config/events.go", + "size": 6688, + "extension": ".go" + }, + { + "path": "app/config/helpers.go", + "size": 329, + "extension": ".go" + }, + { + "path": "app/config/ingest.go", + "size": 5914, + "extension": ".go" + }, + { + "path": "app/config/ingest_test.go", + "size": 2333, + "extension": ".go" + }, + { + "path": "app/config/kafka.go", + "size": 2815, + "extension": ".go" + }, + { + "path": "app/config/namespace.go", + "size": 589, + "extension": ".go" + }, + { + "path": "app/config/notification.go", + "size": 2064, + "extension": ".go" + }, + { + "path": "app/config/portal.go", + "size": 1112, + "extension": ".go" + }, + { + "path": "app/config/postgres.go", + "size": 4465, + "extension": ".go" + }, + { + "path": "app/config/productcatalog.go", + "size": 335, + "extension": ".go" + }, + { + "path": "app/config/progressmanager.go", + "size": 1071, + "extension": ".go" + }, + { + "path": "app/config/server.go", + "size": 2426, + "extension": ".go" + }, + { + "path": "app/config/sink.go", + "size": 6088, + "extension": ".go" + }, + { + "path": "app/config/svix.go", + "size": 153, + "extension": ".go" + }, + { + "path": "app/config/taxcode.go", + "size": 3425, + "extension": ".go" + }, + { + "path": "app/config/taxcode_test.go", + "size": 2804, + "extension": ".go" + }, + { + "path": "app/config/telemetry.go", + "size": 18978, + "extension": ".go" + }, + { + "path": "app/config/termination.go", + "size": 1625, + "extension": ".go" + }, + { + "path": "app/config/testdata/complete.yaml", + "size": 3444, + "extension": ".yaml", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "app/config/topicprovisioner.go", + "size": 1344, + "extension": ".go" + }, + { + "path": "app/config/viper.go", + "size": 1166, + "extension": ".go" + }, + { + "path": "atlas.hcl", + "size": 1714, + "extension": ".hcl" + }, + { + "path": "benthos-collector.Dockerfile", + "size": 1417, + "extension": ".dockerfile" + }, + { + "path": "cloudevents.spec.json", + "size": 3300, + "extension": ".json" + }, + { + "path": "cmd/balance-worker/main.go", + "size": 1743, + "extension": ".go" + }, + { + "path": "cmd/balance-worker/version.go", + "size": 533, + "extension": ".go" + }, + { + "path": "cmd/balance-worker/wire.go", + "size": 1393, + "extension": ".go" + }, + { + "path": "cmd/balance-worker/wire_gen.go", + "size": 9592, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "cmd/billing-worker/main.go", + "size": 2162, + "extension": ".go" + }, + { + "path": "cmd/billing-worker/version.go", + "size": 533, + "extension": ".go" + }, + { + "path": "cmd/billing-worker/wire.go", + "size": 1724, + "extension": ".go" + }, + { + "path": "cmd/billing-worker/wire_gen.go", + "size": 15170, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "cmd/jobs/billing/advance/advance.go", + "size": 2201, + "extension": ".go" + }, + { + "path": "cmd/jobs/billing/advancecharges/advancecharges.go", + "size": 2191, + "extension": ".go" + }, + { + "path": "cmd/jobs/billing/billing.go", + "size": 542, + "extension": ".go" + }, + { + "path": "cmd/jobs/billing/collect/collect.go", + "size": 2766, + "extension": ".go" + }, + { + "path": "cmd/jobs/billing/subscriptionsync/sync.go", + "size": 2526, + "extension": ".go" + }, + { + "path": "cmd/jobs/entitlement/recalculatesnapshots.go", + "size": 1103, + "extension": ".go" + }, + { + "path": "cmd/jobs/entitlement/root.go", + "size": 251, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/app.go", + "size": 299, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/config.go", + "size": 606, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/globals.go", + "size": 205, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/version.go", + "size": 601, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/wire.go", + "size": 4378, + "extension": ".go" + }, + { + "path": "cmd/jobs/internal/wire_gen.go", + "size": 19208, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "cmd/jobs/ledger/backfillaccounts/backfillaccounts.go", + "size": 4173, + "extension": ".go" + }, + { + "path": "cmd/jobs/ledger/ledger.go", + "size": 254, + "extension": ".go" + }, + { + "path": "cmd/jobs/ledger/service/customer_lister_ent.go", + "size": 1524, + "extension": ".go" + }, + { + "path": "cmd/jobs/ledger/service/service.go", + "size": 7724, + "extension": ".go" + }, + { + "path": "cmd/jobs/ledger/service/service_test.go", + "size": 9259, + "extension": ".go" + }, + { + "path": "cmd/jobs/llmcost/llmcost.go", + "size": 494, + "extension": ".go" + }, + { + "path": "cmd/jobs/main.go", + "size": 2097, + "extension": ".go" + }, + { + "path": "cmd/jobs/migrate/migrate.go", + "size": 1089, + "extension": ".go" + }, + { + "path": "cmd/jobs/quickstart/cronjobs.go", + "size": 2609, + "extension": ".go" + }, + { + "path": "cmd/jobs/quickstart/quickstart.go", + "size": 371, + "extension": ".go" + }, + { + "path": "cmd/jobs/version.go", + "size": 433, + "extension": ".go" + }, + { + "path": "cmd/notification-service/main.go", + "size": 3706, + "extension": ".go" + }, + { + "path": "cmd/notification-service/version.go", + "size": 533, + "extension": ".go" + }, + { + "path": "cmd/notification-service/wire.go", + "size": 2179, + "extension": ".go" + }, + { + "path": "cmd/notification-service/wire_gen.go", + "size": 8515, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "cmd/server/main.go", + "size": 10817, + "extension": ".go" + }, + { + "path": "cmd/server/version.go", + "size": 533, + "extension": ".go" + }, + { + "path": "cmd/server/wire.go", + "size": 6597, + "extension": ".go" + }, + { + "path": "cmd/server/wire_gen.go", + "size": 28014, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "cmd/sink-worker/main.go", + "size": 2870, + "extension": ".go" + }, + { + "path": "cmd/sink-worker/version.go", + "size": 533, + "extension": ".go" + }, + { + "path": "cmd/sink-worker/wire.go", + "size": 2351, + "extension": ".go" + }, + { + "path": "cmd/sink-worker/wire_gen.go", + "size": 9363, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "wire" + } + }, + { + "path": "collector/README.md", + "size": 4775, + "extension": ".md" + }, + { + "path": "collector/benthos/bloblang/parse_resource.go", + "size": 1039, + "extension": ".go" + }, + { + "path": "collector/benthos/input/kubernetes.go", + "size": 9393, + "extension": ".go" + }, + { + "path": "collector/benthos/input/otel_log.go", + "size": 9272, + "extension": ".go" + }, + { + "path": "collector/benthos/input/prometheus.go", + "size": 10265, + "extension": ".go" + }, + { + "path": "collector/benthos/input/run_ai.go", + "size": 12081, + "extension": ".go" + }, + { + "path": "collector/benthos/input/runai/metrics.go", + "size": 10777, + "extension": ".go" + }, + { + "path": "collector/benthos/input/runai/pods.go", + "size": 3462, + "extension": ".go" + }, + { + "path": "collector/benthos/input/runai/service.go", + "size": 2546, + "extension": ".go" + }, + { + "path": "collector/benthos/input/runai/token.go", + "size": 2511, + "extension": ".go" + }, + { + "path": "collector/benthos/input/runai/workloads.go", + "size": 4411, + "extension": ".go" + }, + { + "path": "collector/benthos/input/schedule.go", + "size": 2148, + "extension": ".go" + }, + { + "path": "collector/benthos/internal/LICENSE", + "size": 1056, + "extension": "" + }, + { + "path": "collector/benthos/internal/logging/logging.go", + "size": 1421, + "extension": ".go" + }, + { + "path": "collector/benthos/internal/message/batch.go", + "size": 112, + "extension": ".go" + }, + { + "path": "collector/benthos/internal/message/transaction.go", + "size": 3712, + "extension": ".go" + }, + { + "path": "collector/benthos/internal/shutdown/signaler.go", + "size": 4844, + "extension": ".go" + }, + { + "path": "collector/benthos/output/openmeter.go", + "size": 7767, + "extension": ".go" + }, + { + "path": "collector/benthos/output/otel_log.go", + "size": 2682, + "extension": ".go" + }, + { + "path": "collector/benthos/presets/http-server/config.yaml", + "size": 3372, + "extension": ".yaml" + }, + { + "path": "collector/benthos/presets/kubernetes-pod-exec-time/config.yaml", + "size": 3621, + "extension": ".yaml" + }, + { + "path": "collector/benthos/services/leaderelection/flags.go", + "size": 1951, + "extension": ".go" + }, + { + "path": "collector/benthos/services/leaderelection/service.go", + "size": 6230, + "extension": ".go" + }, + { + "path": "collector/cmd/main.go", + "size": 863, + "extension": ".go" + }, + { + "path": "collector/cmd/version.go", + "size": 146, + "extension": ".go" + }, + { + "path": "collector/go.mod", + "size": 27301, + "extension": ".mod" + }, + { + "path": "collector/quickstart/collector/config.yaml", + "size": 266, + "extension": ".yaml" + }, + { + "path": "collector/quickstart/collector/resources/dedupe-cache.yaml", + "size": 75, + "extension": ".yaml" + }, + { + "path": "collector/quickstart/collector/streams/input.yaml", + "size": 2300, + "extension": ".yaml" + }, + { + "path": "collector/quickstart/collector/streams/output.yaml", + "size": 312, + "extension": ".yaml" + }, + { + "path": "collector/quickstart/docker-compose.yaml", + "size": 1501, + "extension": ".yaml" + }, + { + "path": "collector/quickstart/seeder/config.yaml", + "size": 2064, + "extension": ".yaml" + }, + { + "path": "config.example.yaml", + "size": 9505, + "extension": ".yaml" + }, + { + "path": "deploy/README.md", + "size": 727, + "extension": ".md" + }, + { + "path": "deploy/charts/Makefile", + "size": 100, + "extension": "" + }, + { + "path": "deploy/charts/benthos-collector/Chart.yaml", + "size": 329, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/README.md", + "size": 7332, + "extension": ".md" + }, + { + "path": "deploy/charts/benthos-collector/README.tmpl.md", + "size": 30, + "extension": ".md" + }, + { + "path": "deploy/charts/benthos-collector/templates/_helpers.tpl", + "size": 3812, + "extension": ".tpl" + }, + { + "path": "deploy/charts/benthos-collector/templates/configmap.yaml", + "size": 356, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/templates/rbac.yaml", + "size": 1570, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/templates/secret.yaml", + "size": 643, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/templates/service.yaml", + "size": 539, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/templates/serviceaccount.yaml", + "size": 409, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/templates/statefulset.yaml", + "size": 6016, + "extension": ".yaml" + }, + { + "path": "deploy/charts/benthos-collector/values.yaml", + "size": 6699, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/.gitignore", + "size": 9, + "extension": "" + }, + { + "path": "deploy/charts/openmeter/Chart.yaml", + "size": 993, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/README.md", + "size": 11727, + "extension": ".md" + }, + { + "path": "deploy/charts/openmeter/README.tmpl.md", + "size": 1700, + "extension": ".md" + }, + { + "path": "deploy/charts/openmeter/templates/NOTES.txt", + "size": 770, + "extension": ".txt" + }, + { + "path": "deploy/charts/openmeter/templates/_helpers.tpl", + "size": 5047, + "extension": ".tpl" + }, + { + "path": "deploy/charts/openmeter/templates/clickhouse.yaml", + "size": 1506, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/configmap.yaml", + "size": 1919, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/deployment.yaml", + "size": 16582, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/ingress.yaml", + "size": 2150, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/jobs.yaml", + "size": 11425, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/service.yaml", + "size": 429, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/serviceaccount.yaml", + "size": 393, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/templates/svix.yaml", + "size": 3044, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/values.example.yaml", + "size": 857, + "extension": ".yaml" + }, + { + "path": "deploy/charts/openmeter/values.yaml", + "size": 12541, + "extension": ".yaml" + }, + { + "path": "deploy/charts/template.md", + "size": 1890, + "extension": ".md" + }, + { + "path": "deploy/kind.yaml", + "size": 411, + "extension": ".yaml" + }, + { + "path": "docker-compose.base.yaml", + "size": 5173, + "extension": ".yaml" + }, + { + "path": "docker-compose.yaml", + "size": 1424, + "extension": ".yaml" + }, + { + "path": "docs/database-migration.md", + "size": 2052, + "extension": ".md" + }, + { + "path": "docs/decisions/0001-event-streaming-platform.md", + "size": 1424, + "extension": ".md" + }, + { + "path": "docs/decisions/0002-event-format.md", + "size": 963, + "extension": ".md" + }, + { + "path": "docs/decisions/0003-idempotency.md", + "size": 2123, + "extension": ".md" + }, + { + "path": "docs/decisions/0004-partitioning.md", + "size": 1585, + "extension": ".md" + }, + { + "path": "docs/decisions/0005-clickhouse.md", + "size": 2285, + "extension": ".md" + }, + { + "path": "docs/event-ingestion.md", + "size": 4610, + "extension": ".md" + }, + { + "path": "docs/migration-guides/2025-06-26-subscription-alignment.md", + "size": 5184, + "extension": ".md" + }, + { + "path": "docs/migration-guides/2025-08-12-subject-customer-consolidation.md", + "size": 6212, + "extension": ".md" + }, + { + "path": "docs/migration-guides/2025-11-04-entitlement-events-v1.md", + "size": 635, + "extension": ".md" + }, + { + "path": "docs/seeder.md", + "size": 1158, + "extension": ".md" + }, + { + "path": "docs/stripe-dev.md", + "size": 3615, + "extension": ".md" + }, + { + "path": "e2e/.gitignore", + "size": 34, + "extension": "" + }, + { + "path": "e2e/Makefile", + "size": 1306, + "extension": "" + }, + { + "path": "e2e/addons_v3_test.go", + "size": 12776, + "extension": ".go" + }, + { + "path": "e2e/config.yaml", + "size": 3088, + "extension": ".yaml" + }, + { + "path": "e2e/customer_credits_v3_test.go", + "size": 1067, + "extension": ".go" + }, + { + "path": "e2e/docker-compose.debug-ports.yaml", + "size": 349, + "extension": ".yaml" + }, + { + "path": "e2e/docker-compose.infra.yaml", + "size": 710, + "extension": ".yaml" + }, + { + "path": "e2e/docker-compose.openmeter-latest.yaml", + "size": 183, + "extension": ".yaml" + }, + { + "path": "e2e/docker-compose.openmeter-local.yaml", + "size": 279, + "extension": ".yaml" + }, + { + "path": "e2e/docker-compose.openmeter.yaml", + "size": 1335, + "extension": ".yaml" + }, + { + "path": "e2e/e2e_test.go", + "size": 59363, + "extension": ".go" + }, + { + "path": "e2e/entitlement_parity_test.go", + "size": 20556, + "extension": ".go" + }, + { + "path": "e2e/entitlement_test.go", + "size": 26622, + "extension": ".go" + }, + { + "path": "e2e/helpers.go", + "size": 3053, + "extension": ".go" + }, + { + "path": "e2e/ledger_backfill_test.go", + "size": 7544, + "extension": ".go" + }, + { + "path": "e2e/multisubject_test.go", + "size": 8817, + "extension": ".go" + }, + { + "path": "e2e/planaddons_v3_test.go", + "size": 17827, + "extension": ".go" + }, + { + "path": "e2e/plans_v3_test.go", + "size": 15590, + "extension": ".go" + }, + { + "path": "e2e/productcatalog_smoke_v3_test.go", + "size": 9692, + "extension": ".go" + }, + { + "path": "e2e/productcatalog_test.go", + "size": 47280, + "extension": ".go" + }, + { + "path": "e2e/setup_test.go", + "size": 510, + "extension": ".go" + }, + { + "path": "e2e/v3helpers_test.go", + "size": 18131, + "extension": ".go" + }, + { + "path": "entrypoint.sh", + "size": 225, + "extension": ".sh" + }, + { + "path": "etc/seed/observability.yaml", + "size": 159, + "extension": ".yaml" + }, + { + "path": "etc/seed/seed.yaml", + "size": 2012, + "extension": ".yaml" + }, + { + "path": "etc/seed/streams/api-requests.yaml", + "size": 1386, + "extension": ".yaml" + }, + { + "path": "etc/seed/streams/prompt-tokens.yaml", + "size": 1677, + "extension": ".yaml" + }, + { + "path": "etc/seed/streams/workload-runtime.yaml", + "size": 1832, + "extension": ".yaml" + }, + { + "path": "etc/wiretap/config.docker.yaml", + "size": 150, + "extension": ".yaml" + }, + { + "path": "flake.nix", + "size": 7719, + "extension": ".nix" + }, + { + "path": "go.mod", + "size": 12939, + "extension": ".mod" + }, + { + "path": "justfile", + "size": 776, + "extension": "" + }, + { + "path": "openmeter/apiconverter/cursor.go", + "size": 393, + "extension": ".go" + }, + { + "path": "openmeter/apiconverter/filter.gen.go", + "size": 9407, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "openmeter/apiconverter/filter.go", + "size": 2215, + "extension": ".go" + }, + { + "path": "openmeter/app/adapter.go", + "size": 1667, + "extension": ".go" + }, + { + "path": "openmeter/app/adapter/adapter.go", + "size": 1497, + "extension": ".go" + }, + { + "path": "openmeter/app/adapter/app.go", + "size": 8086, + "extension": ".go" + }, + { + "path": "openmeter/app/adapter/customer.go", + "size": 5075, + "extension": ".go" + }, + { + "path": "openmeter/app/adapter/marketplace.go", + "size": 4514, + "extension": ".go" + }, + { + "path": "openmeter/app/app.go", + "size": 4950, + "extension": ".go" + }, + { + "path": "openmeter/app/appbase.go", + "size": 3499, + "extension": ".go" + }, + { + "path": "openmeter/app/customer.go", + "size": 137, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/adapter.go", + "size": 811, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/adapter/adapter.go", + "size": 1531, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/adapter/appconfig.go", + "size": 2369, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/adapter/customerdata.go", + "size": 2864, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/app.go", + "size": 4431, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/customerdata.go", + "size": 2163, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/factory.go", + "size": 3896, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/custominvoicing.go", + "size": 6112, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/errors.go", + "size": 1056, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/handler.go", + "size": 1305, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/httpdriver/mapper.go", + "size": 2442, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/service.go", + "size": 1216, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/service/customerdata.go", + "size": 1017, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/service/factory.go", + "size": 1959, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/service/service.go", + "size": 1237, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/service/sync.go", + "size": 3888, + "extension": ".go" + }, + { + "path": "openmeter/app/custominvoicing/sync.go", + "size": 1531, + "extension": ".go" + }, + { + "path": "openmeter/app/defaults.go", + "size": 71, + "extension": ".go" + }, + { + "path": "openmeter/app/errors.go", + "size": 5066, + "extension": ".go" + }, + { + "path": "openmeter/app/event.go", + "size": 5289, + "extension": ".go" + }, + { + "path": "openmeter/app/events.go", + "size": 2063, + "extension": ".go" + }, + { + "path": "openmeter/app/httpdriver/app.go", + "size": 8186, + "extension": ".go" + }, + { + "path": "openmeter/app/httpdriver/customer.go", + "size": 13194, + "extension": ".go" + }, + { + "path": "openmeter/app/httpdriver/handler.go", + "size": 2189, + "extension": ".go" + }, + { + "path": "openmeter/app/httpdriver/mapper.go", + "size": 5291, + "extension": ".go" + }, + { + "path": "openmeter/app/httpdriver/marketplace.go", + "size": 12316, + "extension": ".go" + }, + { + "path": "openmeter/app/input.go", + "size": 1822, + "extension": ".go" + }, + { + "path": "openmeter/app/marketplace.go", + "size": 4060, + "extension": ".go" + }, + { + "path": "openmeter/app/registry.go", + "size": 1483, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/app.go", + "size": 6510, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/config.go", + "size": 105, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/errors.go", + "size": 199, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/helpers.go", + "size": 1814, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/marketplace.go", + "size": 1117, + "extension": ".go" + }, + { + "path": "openmeter/app/sandbox/mock.go", + "size": 8044, + "extension": ".go" + }, + { + "path": "openmeter/app/service.go", + "size": 1576, + "extension": ".go" + }, + { + "path": "openmeter/app/service/app.go", + "size": 3624, + "extension": ".go" + }, + { + "path": "openmeter/app/service/customer.go", + "size": 647, + "extension": ".go" + }, + { + "path": "openmeter/app/service/marketplace.go", + "size": 2305, + "extension": ".go" + }, + { + "path": "openmeter/app/service/service.go", + "size": 747, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/adapter.go", + "size": 1784, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/adapter/adapter.go", + "size": 3495, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/adapter/customer.go", + "size": 9457, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/adapter/stripe.go", + "size": 23863, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/app.go", + "size": 2128, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/appcustomer.go", + "size": 8582, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/appinvoice.go", + "size": 26568, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/calculator.go", + "size": 2036, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/appclient.go", + "size": 9316, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/checkout.go", + "size": 9542, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/client.go", + "size": 5308, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/customer.go", + "size": 2142, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/errors.go", + "size": 2352, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/invoice.go", + "size": 8064, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/invoice_line.go", + "size": 5463, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/logger.go", + "size": 943, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/portal.go", + "size": 3303, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/client/stripe.go", + "size": 3800, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/clientapp.go", + "size": 1294, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/config.go", + "size": 763, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/customerdata.go", + "size": 561, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/event.go", + "size": 2101, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/apikey.go", + "size": 1938, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/checkout_session.go", + "size": 5817, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/const.go", + "size": 278, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/customer.go", + "size": 10139, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/handler.go", + "size": 1898, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/mapping.go", + "size": 1251, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/httpdriver/webhook.go", + "size": 17232, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/marketplace.go", + "size": 1129, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/portal.go", + "size": 2379, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service.go", + "size": 2134, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/app.go", + "size": 4541, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/billing.go", + "size": 5980, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/const.go", + "size": 184, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/factory.go", + "size": 7648, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/service.go", + "size": 2621, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/service/webhook.go", + "size": 1457, + "extension": ".go" + }, + { + "path": "openmeter/app/stripe/types.go", + "size": 14092, + "extension": ".go" + }, + { + "path": "openmeter/app/webhook.go", + "size": 140, + "extension": ".go" + }, + { + "path": "openmeter/billing/README.md", + "size": 9080, + "extension": ".md" + }, + { + "path": "openmeter/billing/adapter.go", + "size": 5658, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/adapter.go", + "size": 1485, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/customeroverride.go", + "size": 16514, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/gatheringinvoice.go", + "size": 14887, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/gatheringlines.go", + "size": 11784, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/invoice.go", + "size": 32005, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/invoiceapp.go", + "size": 1081, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/invoicelinesplitgroup.go", + "size": 13057, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/lock.go", + "size": 1608, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/profile.go", + "size": 18161, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/schemalevel.go", + "size": 2129, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/schemamigration.go", + "size": 2657, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/seq.go", + "size": 1886, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinediff.go", + "size": 7637, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinediff_test.go", + "size": 11774, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/stdinvoicelinemapper.go", + "size": 14630, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/stdinvoicelines.go", + "size": 32994, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/upsert.go", + "size": 2350, + "extension": ".go" + }, + { + "path": "openmeter/billing/adapter/validationissue.go", + "size": 4028, + "extension": ".go" + }, + { + "path": "openmeter/billing/annotations.go", + "size": 911, + "extension": ".go" + }, + { + "path": "openmeter/billing/app.go", + "size": 11761, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/adapter.go", + "size": 1603, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/adapter/adapter.go", + "size": 1486, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/adapter/search.go", + "size": 6478, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/adapter/search_test.go", + "size": 8920, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/charge.go", + "size": 14519, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter.go", + "size": 4662, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/adapter.go", + "size": 1818, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/charge.go", + "size": 6833, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/creditgrant.go", + "size": 1519, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go", + "size": 6030, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity_test.go", + "size": 9327, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/mapper.go", + "size": 3267, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/adapter/payment.go", + "size": 3080, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/charge.go", + "size": 6947, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/charge_test.go", + "size": 681, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/errors.go", + "size": 538, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/featurefilters.go", + "size": 644, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/funded_credit_activity.go", + "size": 2510, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/handler.go", + "size": 2634, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/lineengine/engine.go", + "size": 4270, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service.go", + "size": 2054, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/create.go", + "size": 4891, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/external.go", + "size": 6056, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/funded_credit_activity.go", + "size": 658, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/get.go", + "size": 967, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/invoice.go", + "size": 4584, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/promotional.go", + "size": 3379, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/promotional_test.go", + "size": 11212, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/service.go", + "size": 1303, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/service/statemachine.go", + "size": 2145, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/settlement.go", + "size": 8386, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/creditpurchase/statemachine.go", + "size": 940, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/errors.go", + "size": 1536, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/events.go", + "size": 1091, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/features.go", + "size": 343, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter.go", + "size": 7057, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/adapter.go", + "size": 1797, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/charge.go", + "size": 9966, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/credits.go", + "size": 2152, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/detailedline.go", + "size": 4671, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/detailedline_test.go", + "size": 9486, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/mapper.go", + "size": 6659, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/payment.go", + "size": 1849, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/realizationrun.go", + "size": 4993, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/realizationrun_test.go", + "size": 4262, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/adapter/usage.go", + "size": 1440, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/bookedat.go", + "size": 456, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/charge.go", + "size": 7261, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/charge_test.go", + "size": 5679, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/detailedline.go", + "size": 678, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/handler.go", + "size": 5391, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/prorating.go", + "size": 495, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/realizationrun.go", + "size": 8452, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service.go", + "size": 2204, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/create.go", + "size": 6493, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditheninvoice.go", + "size": 18876, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/creditsonly.go", + "size": 4645, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/get.go", + "size": 798, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/lineengine.go", + "size": 16420, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/linemapper.go", + "size": 2095, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/payment.go", + "size": 5302, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/payment_test.go", + "size": 3220, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/correct.go", + "size": 7708, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go", + "size": 3519, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go", + "size": 14507, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go", + "size": 3817, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/preview.go", + "size": 3668, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/realizations/service.go", + "size": 2725, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/service.go", + "size": 2885, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/statemachine.go", + "size": 3581, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/subscription.go", + "size": 956, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/service/triggers.go", + "size": 4091, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/flatfee/statemachine.go", + "size": 2045, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/helpers.go", + "size": 70, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/invoiceupdater/feehelper.go", + "size": 1311, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/invoiceupdater/invoiceupdate.go", + "size": 22219, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/invoiceupdater/patch.go", + "size": 5288, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/adapter/adapter.go", + "size": 1275, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/adapter/lineage.go", + "size": 9682, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/lineage.go", + "size": 2958, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/lineage_test.go", + "size": 1392, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/service.go", + "size": 8099, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lineage/service/service.go", + "size": 8049, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/lock.go", + "size": 405, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/adapter.go", + "size": 1079, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/adapter/adapter.go", + "size": 1485, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/adapter/charges.go", + "size": 1898, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/charge.go", + "size": 4035, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/errors.go", + "size": 398, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/intent.go", + "size": 2434, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patch.go", + "size": 626, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patchdelete.go", + "size": 3584, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patchextend.go", + "size": 3918, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patchextend_test.go", + "size": 2938, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patchshrink.go", + "size": 4463, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/patchshrink_test.go", + "size": 4924, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/resource.go", + "size": 756, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/service.go", + "size": 194, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/subscription.go", + "size": 662, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/timestamps.go", + "size": 883, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/meta/triggers.go", + "size": 455, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/chargemeta/mixin.go", + "size": 10691, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/allocation.go", + "size": 2516, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/correction.go", + "size": 6628, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/correction_test.go", + "size": 32092, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/lineage.go", + "size": 2998, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/lineage_specs.go", + "size": 1169, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/mixin.go", + "size": 4338, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/models.go", + "size": 3471, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/creditrealization/realizations.go", + "size": 6244, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/invoicedusage/mixin.go", + "size": 2956, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/invoicedusage/stdinvoice.go", + "size": 1162, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/ledgertransaction/ledger.go", + "size": 1432, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/payment/errors.go", + "size": 1115, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/payment/external.go", + "size": 1296, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/payment/invoiced.go", + "size": 3112, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/payment/mixin.go", + "size": 5162, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/models/payment/models.go", + "size": 3322, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/patch.go", + "size": 2476, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service.go", + "size": 6131, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/advance.go", + "size": 3831, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/advance_test.go", + "size": 8390, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/base_test.go", + "size": 9707, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/create.go", + "size": 13474, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/creditpurchase.go", + "size": 2039, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/creditpurchase_test.go", + "size": 30258, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/featureid_test.go", + "size": 9641, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/gathering_preview_test.go", + "size": 1465, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/get.go", + "size": 3469, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/handlers_test.go", + "size": 11125, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/helpers.go", + "size": 3979, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/invoicable_test.go", + "size": 121628, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/invoice.go", + "size": 7933, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/lineage_test.go", + "size": 19075, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/list.go", + "size": 1533, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/patch.go", + "size": 2421, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/recognition.go", + "size": 1744, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/service.go", + "size": 3951, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/subscription.go", + "size": 1713, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/taxcode_test.go", + "size": 59633, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/truncation_test.go", + "size": 7340, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/service/usagebased_test.go", + "size": 25339, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/statemachine/machine.go", + "size": 5096, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/statemachine/machine_test.go", + "size": 10996, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/testutils/handlers.go", + "size": 5466, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/testutils/service.go", + "size": 8349, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter.go", + "size": 2236, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/adapter.go", + "size": 1806, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/charge.go", + "size": 8880, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/creditallocation.go", + "size": 1668, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/detailedline.go", + "size": 7185, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/detailedline_test.go", + "size": 20368, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/invoicedusage.go", + "size": 1105, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/mapper.go", + "size": 5139, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/payment.go", + "size": 1859, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/adapter/realizationrun.go", + "size": 3147, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/charge.go", + "size": 6784, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/const.go", + "size": 99, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/detailedline.go", + "size": 3597, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/detailedline_uniqueref.go", + "size": 1909, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/errors.go", + "size": 1248, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/handler.go", + "size": 6523, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/rating.go", + "size": 2562, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/ratingengine.go", + "size": 891, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun.go", + "size": 16095, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/realizationrun_test.go", + "size": 8558, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service.go", + "size": 5173, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/create.go", + "size": 4806, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice.go", + "size": 26996, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditheninvoice_test.go", + "size": 14885, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/creditsonly.go", + "size": 7583, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/currenttotals.go", + "size": 2245, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/get.go", + "size": 5386, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine.go", + "size": 22030, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/lineengine_test.go", + "size": 3028, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/linemapper.go", + "size": 3844, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/linemapper_test.go", + "size": 9450, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/payments.go", + "size": 3907, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/README.md", + "size": 3676, + "extension": ".md" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/base_test.go", + "size": 3036, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/dynamic_test.go", + "size": 12525, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/engine.go", + "size": 5114, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/engine_test.go", + "size": 12112, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/package_test.go", + "size": 12036, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/tieredgraduated_test.go", + "size": 20062, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/tieredvolume_test.go", + "size": 21889, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/uniquereferenceid.go", + "size": 716, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/delta/unit_test.go", + "size": 10920, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/details.go", + "size": 10734, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/README.md", + "size": 6041, + "extension": ".md" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go", + "size": 13993, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go", + "size": 46942, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/periodpreserving/uniquereferenceid.go", + "size": 1302, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go", + "size": 3541, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/service.go", + "size": 2813, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/service_test.go", + "size": 21198, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/README.md", + "size": 3979, + "extension": ".md" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go", + "size": 8658, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/subtract_test.go", + "size": 48277, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/subtract/uniquereferenceid.go", + "size": 1695, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/testutils/testutils.go", + "size": 3721, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/rating/totals.go", + "size": 2444, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/correct.go", + "size": 7021, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/create.go", + "size": 7432, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/credits.go", + "size": 4331, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/invoice.go", + "size": 3464, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment.go", + "size": 5873, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/payment_test.go", + "size": 7601, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/preview.go", + "size": 4854, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/run/service.go", + "size": 2421, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/service.go", + "size": 3530, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/statemachine.go", + "size": 5954, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/subscription.go", + "size": 977, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service/triggers.go", + "size": 5889, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/service_test.go", + "size": 927, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/usagebased/statemachine.go", + "size": 4016, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/worker/advance/advance.go", + "size": 2852, + "extension": ".go" + }, + { + "path": "openmeter/billing/charges/worker/asyncadvance/asyncadvance.go", + "size": 1285, + "extension": ".go" + }, + { + "path": "openmeter/billing/consts.go", + "size": 600, + "extension": ".go" + }, + { + "path": "openmeter/billing/creditgrant/errors.go", + "size": 688, + "extension": ".go" + }, + { + "path": "openmeter/billing/creditgrant/noop.go", + "size": 867, + "extension": ".go" + }, + { + "path": "openmeter/billing/creditgrant/service.go", + "size": 5987, + "extension": ".go" + }, + { + "path": "openmeter/billing/creditgrant/service/service.go", + "size": 8986, + "extension": ".go" + }, + { + "path": "openmeter/billing/customer.go", + "size": 2513, + "extension": ".go" + }, + { + "path": "openmeter/billing/customeroverride.go", + "size": 10706, + "extension": ".go" + }, + { + "path": "openmeter/billing/defaults.go", + "size": 933, + "extension": ".go" + }, + { + "path": "openmeter/billing/derived.gen.go", + "size": 9618, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "openmeter/billing/discount.go", + "size": 7371, + "extension": ".go" + }, + { + "path": "openmeter/billing/errors.go", + "size": 8861, + "extension": ".go" + }, + { + "path": "openmeter/billing/events.go", + "size": 5201, + "extension": ".go" + }, + { + "path": "openmeter/billing/eventsgathering.go", + "size": 964, + "extension": ".go" + }, + { + "path": "openmeter/billing/gatheringinvoice.go", + "size": 25112, + "extension": ".go" + }, + { + "path": "openmeter/billing/gatheringinvoice_test.go", + "size": 956, + "extension": ".go" + }, + { + "path": "openmeter/billing/generate.go", + "size": 73, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/customeroverride.go", + "size": 10534, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/defaults.go", + "size": 152, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/deprecations.go", + "size": 4277, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/deprecations_test.go", + "size": 2686, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/discounts.go", + "size": 1894, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/errors.go", + "size": 1056, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/gatheringinvoice.go", + "size": 4116, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/handler.go", + "size": 2493, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/invoice.go", + "size": 29498, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/invoice_test.go", + "size": 7500, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/invoiceline.go", + "size": 33971, + "extension": ".go" + }, + { + "path": "openmeter/billing/httpdriver/profile.go", + "size": 20009, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoice.go", + "size": 12506, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicedetailedline.go", + "size": 5482, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicedetailedline_test.go", + "size": 7460, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoiceline.go", + "size": 5205, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoiceline_test.go", + "size": 1442, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicelinediscount.go", + "size": 11701, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicelinesplitgroup.go", + "size": 14057, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicelinesplitgroup_test.go", + "size": 2107, + "extension": ".go" + }, + { + "path": "openmeter/billing/invoicelinetypes.go", + "size": 1021, + "extension": ".go" + }, + { + "path": "openmeter/billing/lineengine.go", + "size": 8819, + "extension": ".go" + }, + { + "path": "openmeter/billing/lineengine/engine.go", + "size": 3228, + "extension": ".go" + }, + { + "path": "openmeter/billing/lineengine/splitlinegroup.go", + "size": 5098, + "extension": ".go" + }, + { + "path": "openmeter/billing/lineengine/stdinvoice.go", + "size": 2898, + "extension": ".go" + }, + { + "path": "openmeter/billing/lock.go", + "size": 216, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/creditsapplied/model.go", + "size": 1389, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/externalid/mixin.go", + "size": 2820, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/externalid/model.go", + "size": 444, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/stddetailedline/create.go", + "size": 1557, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/stddetailedline/derived.gen.go", + "size": 2267, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go" + } + }, + { + "path": "openmeter/billing/models/stddetailedline/generate.go", + "size": 81, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/stddetailedline/mapping.go", + "size": 2321, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/stddetailedline/mixin.go", + "size": 3463, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/stddetailedline/model.go", + "size": 4178, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/totals/mixin.go", + "size": 2945, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/totals/model.go", + "size": 5318, + "extension": ".go" + }, + { + "path": "openmeter/billing/models/totals/model_test.go", + "size": 2766, + "extension": ".go" + }, + { + "path": "openmeter/billing/profile.go", + "size": 12563, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/const.go", + "size": 926, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/detailedline.go", + "size": 4659, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/detailedline_test.go", + "size": 5946, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/line.go", + "size": 1978, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service.go", + "size": 2290, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/billableperiod.go", + "size": 2488, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/detailedline.go", + "size": 5243, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/commitments.go", + "size": 2964, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/credits.go", + "size": 1801, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/credits_test.go", + "size": 15922, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/discountpercentage.go", + "size": 2626, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/discountusage.go", + "size": 4547, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/discountusage_test.go", + "size": 2111, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/mutator/types.go", + "size": 405, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/options_test.go", + "size": 6676, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/pricer.go", + "size": 3599, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/base.go", + "size": 2342, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/dynamic.go", + "size": 1112, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/dynamic_test.go", + "size": 8810, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/flat.go", + "size": 2586, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/flat_test.go", + "size": 5071, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/package.go", + "size": 1699, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/package_test.go", + "size": 12246, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/tiered.go", + "size": 1471, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated.go", + "size": 8939, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/tieredgraduated_test.go", + "size": 23585, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/tieredvolume.go", + "size": 2918, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/tieredvolume_test.go", + "size": 19034, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/types.go", + "size": 2022, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/unit.go", + "size": 942, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/rate/unit_test.go", + "size": 11443, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/service.go", + "size": 157, + "extension": ".go" + }, + { + "path": "openmeter/billing/rating/service/testutil/ubptest.go", + "size": 4408, + "extension": ".go" + }, + { + "path": "openmeter/billing/seq.go", + "size": 1664, + "extension": ".go" + }, + { + "path": "openmeter/billing/service.go", + "size": 8702, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/customeroverride.go", + "size": 11853, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/featuremeter.go", + "size": 1575, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/gatheringinvoice.go", + "size": 5239, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines.go", + "size": 36021, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/gatheringinvoicependinglines_test.go", + "size": 4614, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoice.go", + "size": 38942, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoice_test.go", + "size": 2448, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoiceapp.go", + "size": 3718, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/calculator.go", + "size": 5036, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/collectionat.go", + "size": 3300, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/collectionat_test.go", + "size": 13204, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/details.go", + "size": 5093, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/details_test.go", + "size": 1676, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/discounts.go", + "size": 1763, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/draftuntil.go", + "size": 547, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/dueat.go", + "size": 1039, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/gatheringrealtime.go", + "size": 923, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/mock.go", + "size": 4719, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/period.go", + "size": 1333, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/taxconfig.go", + "size": 1050, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicecalc/taxconfig_test.go", + "size": 9199, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/invoicelinesplitgroup.go", + "size": 2102, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/lineengine.go", + "size": 5869, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/lineengine_test.go", + "size": 5838, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/lock.go", + "size": 747, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/profile.go", + "size": 17636, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/quantitysnapshot.go", + "size": 7744, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/seq.go", + "size": 1762, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/seq_test.go", + "size": 576, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/service.go", + "size": 6776, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/stdinvoice.go", + "size": 3849, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/stdinvoiceline.go", + "size": 9153, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/stdinvoicestate.go", + "size": 38320, + "extension": ".go" + }, + { + "path": "openmeter/billing/service/taxcode.go", + "size": 2368, + "extension": ".go" + }, + { + "path": "openmeter/billing/serviceconfig.go", + "size": 964, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoice.go", + "size": 32282, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoice_test.go", + "size": 1836, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoicecredits.go", + "size": 204, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoiceline.go", + "size": 28703, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoiceline_test.go", + "size": 2758, + "extension": ".go" + }, + { + "path": "openmeter/billing/stdinvoicestate.go", + "size": 3206, + "extension": ".go" + }, + { + "path": "openmeter/billing/taxconfig.go", + "size": 3334, + "extension": ".go" + }, + { + "path": "openmeter/billing/testutils/lineengine.go", + "size": 2230, + "extension": ".go" + }, + { + "path": "openmeter/billing/validationissue.go", + "size": 6885, + "extension": ".go" + }, + { + "path": "openmeter/billing/validationissue_test.go", + "size": 2285, + "extension": ".go" + }, + { + "path": "openmeter/billing/validators/customer/customer.go", + "size": 2830, + "extension": ".go" + }, + { + "path": "openmeter/billing/validators/subscription/validator.go", + "size": 2848, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/advance/advance.go", + "size": 5815, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/asyncadvance/asyncadvance.go", + "size": 1272, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/collect/collect.go", + "size": 6399, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/adapter.go", + "size": 1346, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/adapter/adapter.go", + "size": 1337, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/adapter/syncstate.go", + "size": 3150, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go", + "size": 7159, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service.go", + "size": 1569, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/base_test.go", + "size": 44158, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go", + "size": 54454, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/handlers.go", + "size": 2860, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go", + "size": 11094, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go", + "size": 11123, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/persistedstate/state.go", + "size": 670, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconcile.go", + "size": 1913, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/feehelper.go", + "size": 1315, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go", + "size": 17314, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go", + "size": 6268, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go", + "size": 5978, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go", + "size": 5712, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge.go", + "size": 5792, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge_test.go", + "size": 14782, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeflatfee.go", + "size": 4141, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeusagebased.go", + "size": 3901, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go", + "size": 2944, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go", + "size": 1980, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go", + "size": 6458, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go", + "size": 7066, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go", + "size": 2236, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go", + "size": 12140, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/ref.go", + "size": 3039, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/repair.go", + "size": 8800, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/service.go", + "size": 4476, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync.go", + "size": 10259, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go", + "size": 257754, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/sync_test.go", + "size": 166531, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go", + "size": 15092, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go", + "size": 17593, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go", + "size": 43834, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go", + "size": 9401, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go", + "size": 5161, + "extension": ".go" + }, + { + "path": "openmeter/billing/worker/worker.go", + "size": 7170, + "extension": ".go" + }, + { + "path": "openmeter/billing/workflow.go", + "size": 2677, + "extension": ".go" + }, + { + "path": "openmeter/cost/adapter.go", + "size": 217, + "extension": ".go" + }, + { + "path": "openmeter/cost/adapter/adapter.go", + "size": 11944, + "extension": ".go" + }, + { + "path": "openmeter/cost/adapter/compute.go", + "size": 7604, + "extension": ".go" + }, + { + "path": "openmeter/cost/adapter/compute_test.go", + "size": 34577, + "extension": ".go" + }, + { + "path": "openmeter/cost/service.go", + "size": 1672, + "extension": ".go" + }, + { + "path": "openmeter/cost/service/service.go", + "size": 760, + "extension": ".go" + }, + { + "path": "openmeter/credit/adapter/balance_snapshot.go", + "size": 3028, + "extension": ".go" + }, + { + "path": "openmeter/credit/adapter/grant.go", + "size": 8561, + "extension": ".go" + }, + { + "path": "openmeter/credit/adapter/transaction.go", + "size": 1653, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance.go", + "size": 12662, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/balance.go", + "size": 1674, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/balance_test.go", + "size": 1177, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/repository.go", + "size": 786, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/service.go", + "size": 2602, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/service_test.go", + "size": 7062, + "extension": ".go" + }, + { + "path": "openmeter/credit/balance/usage.go", + "size": 4040, + "extension": ".go" + }, + { + "path": "openmeter/credit/connector.go", + "size": 1528, + "extension": ".go" + }, + { + "path": "openmeter/credit/driver/grant.go", + "size": 11215, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/burnphase.go", + "size": 4335, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/engine.go", + "size": 2910, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/engine_test.go", + "size": 10931, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/grant.go", + "size": 6434, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/history.go", + "size": 6789, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/history_test.go", + "size": 3488, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/reset.go", + "size": 1652, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/reset_test.go", + "size": 9970, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/run.go", + "size": 10880, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/run_test.go", + "size": 31090, + "extension": ".go" + }, + { + "path": "openmeter/credit/engine/runresult_test.go", + "size": 11693, + "extension": ".go" + }, + { + "path": "openmeter/credit/errors.go", + "size": 781, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant.go", + "size": 5984, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/events.go", + "size": 2471, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/events_2.go", + "size": 5033, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/expiration.go", + "size": 1576, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/grant.go", + "size": 4266, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/grant_test.go", + "size": 6249, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/owner_connector.go", + "size": 2191, + "extension": ".go" + }, + { + "path": "openmeter/credit/grant/repo.go", + "size": 2452, + "extension": ".go" + }, + { + "path": "openmeter/credit/helper.go", + "size": 11828, + "extension": ".go" + }, + { + "path": "openmeter/credit/hook/entitlement_hook.go", + "size": 970, + "extension": ".go" + }, + { + "path": "openmeter/credit/trace.go", + "size": 1249, + "extension": ".go" + }, + { + "path": "openmeter/currencies/adapter.go", + "size": 636, + "extension": ".go" + }, + { + "path": "openmeter/currencies/adapter/adapter.go", + "size": 1427, + "extension": ".go" + }, + { + "path": "openmeter/currencies/adapter/currencies.go", + "size": 5402, + "extension": ".go" + }, + { + "path": "openmeter/currencies/models.go", + "size": 4401, + "extension": ".go" + }, + { + "path": "openmeter/currencies/service.go", + "size": 502, + "extension": ".go" + }, + { + "path": "openmeter/currencies/service/service.go", + "size": 5317, + "extension": ".go" + }, + { + "path": "openmeter/currencies/service/service_test.go", + "size": 7623, + "extension": ".go" + }, + { + "path": "openmeter/customer/adapter.go", + "size": 1000, + "extension": ".go" + }, + { + "path": "openmeter/customer/adapter/adapter.go", + "size": 1543, + "extension": ".go" + }, + { + "path": "openmeter/customer/adapter/customer.go", + "size": 28286, + "extension": ".go" + }, + { + "path": "openmeter/customer/adapter/customer_test.go", + "size": 16696, + "extension": ".go" + }, + { + "path": "openmeter/customer/adapter/entitymapping.go", + "size": 3181, + "extension": ".go" + }, + { + "path": "openmeter/customer/app/app.go", + "size": 786, + "extension": ".go" + }, + { + "path": "openmeter/customer/customer.go", + "size": 13571, + "extension": ".go" + }, + { + "path": "openmeter/customer/defaults.go", + "size": 103, + "extension": ".go" + }, + { + "path": "openmeter/customer/errors.go", + "size": 2802, + "extension": ".go" + }, + { + "path": "openmeter/customer/event.go", + "size": 4424, + "extension": ".go" + }, + { + "path": "openmeter/customer/httpdriver/apimapping.go", + "size": 7240, + "extension": ".go" + }, + { + "path": "openmeter/customer/httpdriver/customer.go", + "size": 21170, + "extension": ".go" + }, + { + "path": "openmeter/customer/httpdriver/handler.go", + "size": 1936, + "extension": ".go" + }, + { + "path": "openmeter/customer/requestvalidator.go", + "size": 2319, + "extension": ".go" + }, + { + "path": "openmeter/customer/service.go", + "size": 1112, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/customer.go", + "size": 6022, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/hooks/entitlementvalidator.go", + "size": 1676, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer.go", + "size": 19386, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/hooks/subjectcustomer_test.go", + "size": 12426, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/ledger_hook_test.go", + "size": 3088, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/requestvalidator.go", + "size": 261, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/service.go", + "size": 1256, + "extension": ".go" + }, + { + "path": "openmeter/customer/service/service_test.go", + "size": 8428, + "extension": ".go" + }, + { + "path": "openmeter/customer/testutils/env.go", + "size": 3710, + "extension": ".go" + }, + { + "path": "openmeter/debug/debug.go", + "size": 2246, + "extension": ".go" + }, + { + "path": "openmeter/debug/httpdriver/metrics.go", + "size": 2606, + "extension": ".go" + }, + { + "path": "openmeter/dedupe/dedupe.go", + "size": 1127, + "extension": ".go" + }, + { + "path": "openmeter/dedupe/memorydedupe/memorydedupe.go", + "size": 1848, + "extension": ".go" + }, + { + "path": "openmeter/dedupe/memorydedupe/memorydedupe_test.go", + "size": 1337, + "extension": ".go" + }, + { + "path": "openmeter/dedupe/redisdedupe/keyhash.go", + "size": 1080, + "extension": ".go" + }, + { + "path": "openmeter/dedupe/redisdedupe/redisdedupe.go", + "size": 5677, + "extension": ".go" + }, + { + "path": "openmeter/ent/db/addon.go", + "size": 11832, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon/addon.go", + "size": 10844, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon/where.go", + "size": 30202, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon_create.go", + "size": 40753, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon_delete.go", + "size": 2236, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon_query.go", + "size": 23645, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addon_update.go", + "size": 34949, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard.go", + "size": 15614, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard/addonratecard.go", + "size": 11673, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard/where.go", + "size": 42817, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard_create.go", + "size": 56309, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard_delete.go", + "size": 2436, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard_query.go", + "size": 24139, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/addonratecard_update.go", + "size": 37911, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app.go", + "size": 12491, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app/app.go", + "size": 15206, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app/where.go", + "size": 27032, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app_create.go", + "size": 33640, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app_delete.go", + "size": 2199, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app_query.go", + "size": 35114, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/app_update.go", + "size": 52484, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer.go", + "size": 7429, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer/appcustomer.go", + "size": 5536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer/where.go", + "size": 17364, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer_create.go", + "size": 21538, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer_delete.go", + "size": 2383, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer_query.go", + "size": 21218, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustomer_update.go", + "size": 8912, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing.go", + "size": 8047, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go", + "size": 6321, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing/where.go", + "size": 14854, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing_create.go", + "size": 28565, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing_delete.go", + "size": 2561, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing_query.go", + "size": 22777, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicing_update.go", + "size": 17011, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer.go", + "size": 9148, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go", + "size": 6159, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer/where.go", + "size": 20613, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "size": 27585, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_delete.go", + "size": 2758, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "size": 24126, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appcustominvoicingcustomer_update.go", + "size": 11562, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe.go", + "size": 9270, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe/appstripe.go", + "size": 7778, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe/where.go", + "size": 27399, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe_create.go", + "size": 30895, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe_delete.go", + "size": 2336, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe_query.go", + "size": 21231, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripe_update.go", + "size": 19779, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer.go", + "size": 9146, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer/appstripecustomer.go", + "size": 6776, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer/where.go", + "size": 26495, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer_create.go", + "size": 28894, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer_delete.go", + "size": 2533, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer_query.go", + "size": 22333, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/appstripecustomer_update.go", + "size": 13534, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot.go", + "size": 9293, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot/balancesnapshot.go", + "size": 5254, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot/where.go", + "size": 19920, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot_create.go", + "size": 23972, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot_delete.go", + "size": 2483, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot_query.go", + "size": 19631, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/balancesnapshot_update.go", + "size": 9168, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock.go", + "size": 3883, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go", + "size": 1898, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock/where.go", + "size": 8839, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock_create.go", + "size": 16984, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock_delete.go", + "size": 2586, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock_query.go", + "size": 17493, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomerlock_update.go", + "size": 6812, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride.go", + "size": 17361, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go", + "size": 12051, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride/where.go", + "size": 48856, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_create.go", + "size": 65240, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_delete.go", + "size": 2686, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_query.go", + "size": 26233, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingcustomeroverride_update.go", + "size": 42055, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice.go", + "size": 46675, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice/billinginvoice.go", + "size": 40219, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice/where.go", + "size": 177312, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice_create.go", + "size": 163554, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice_delete.go", + "size": 2461, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice_query.go", + "size": 48704, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoice_update.go", + "size": 129614, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "size": 6269, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "size": 3921, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go", + "size": 13684, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "size": 28439, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "size": 19041, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "size": 14446, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline.go", + "size": 46443, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "size": 42965, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline/where.go", + "size": 120267, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline_create.go", + "size": 138058, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline_delete.go", + "size": 2561, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline_query.go", + "size": 74360, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceline_update.go", + "size": 147430, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount.go", + "size": 13800, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go", + "size": 8664, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount/where.go", + "size": 44786, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_create.go", + "size": 55371, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_delete.go", + "size": 2761, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_query.go", + "size": 21512, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelinediscount_update.go", + "size": 33769, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount.go", + "size": 12128, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go", + "size": 7733, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount/where.go", + "size": 37753, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "size": 48845, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "size": 22227, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "size": 29331, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "size": 23238, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go", + "size": 17403, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup/where.go", + "size": 71131, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "size": 70259, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go", + "size": 2811, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "size": 36419, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "size": 43704, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go", + "size": 8054, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go", + "size": 4506, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go", + "size": 21830, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "size": 34397, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go", + "size": 2961, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "size": 19428, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "size": 17737, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue.go", + "size": 10394, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go", + "size": 6887, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue/where.go", + "size": 33733, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "size": 41253, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_delete.go", + "size": 2836, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "size": 21788, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "size": 24574, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel.go", + "size": 3799, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go", + "size": 1563, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel/where.go", + "size": 5241, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_create.go", + "size": 18011, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go", + "size": 2861, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "size": 18920, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billinginvoicewriteschemalevel_update.go", + "size": 8282, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile.go", + "size": 19822, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile/billingprofile.go", + "size": 16952, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile/where.go", + "size": 71289, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile_create.go", + "size": 65414, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile_delete.go", + "size": 2461, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile_query.go", + "size": 33244, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingprofile_update.go", + "size": 49699, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers.go", + "size": 4497, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go", + "size": 2039, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers/where.go", + "size": 10255, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_create.go", + "size": 17542, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_delete.go", + "size": 2658, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_query.go", + "size": 17857, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingsequencenumbers_update.go", + "size": 8001, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "size": 26968, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "size": 18481, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline/where.go", + "size": 85376, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "size": 104379, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go", + "size": 2961, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "size": 32014, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "size": 72755, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "size": 13063, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go", + "size": 7757, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go", + "size": 42376, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "size": 55605, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go", + "size": 3311, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "size": 24687, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "size": 32673, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig.go", + "size": 16666, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go", + "size": 12369, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig/where.go", + "size": 38922, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_create.go", + "size": 60015, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_delete.go", + "size": 2636, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_query.go", + "size": 26088, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/billingworkflowconfig_update.go", + "size": 41971, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge.go", + "size": 12169, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge/charge.go", + "size": 12444, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge/where.go", + "size": 30847, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge_create.go", + "size": 28033, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge_delete.go", + "size": 2261, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge_query.go", + "size": 33034, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/charge_update.go", + "size": 25216, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase.go", + "size": 30007, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "size": 24528, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase/where.go", + "size": 84936, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_create.go", + "size": 84395, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_delete.go", + "size": 2611, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_query.go", + "size": 43075, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchase_update.go", + "size": 57523, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant.go", + "size": 8495, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go", + "size": 5385, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go", + "size": 23466, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "size": 30266, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "size": 22143, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "size": 13564, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "size": 13475, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go", + "size": 8416, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go", + "size": 42464, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "size": 54084, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go", + "size": 2986, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "size": 22773, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "size": 28633, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "size": 15485, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "size": 10276, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go", + "size": 50136, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "size": 56951, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go", + "size": 2986, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "size": 25788, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "size": 29063, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee.go", + "size": 30654, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "size": 26768, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee/where.go", + "size": 92020, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee_create.go", + "size": 92707, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee_delete.go", + "size": 2436, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee_query.go", + "size": 40364, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfee_update.go", + "size": 63188, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun.go", + "size": 21055, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go", + "size": 18784, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun/where.go", + "size": 53153, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_create.go", + "size": 64980, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_delete.go", + "size": 2511, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_query.go", + "size": 37055, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerun_update.go", + "size": 57902, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "size": 15530, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go", + "size": 11336, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go", + "size": 43452, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "size": 51849, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go", + "size": 2936, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "size": 31763, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "size": 37474, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline.go", + "size": 24325, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "size": 15543, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline/where.go", + "size": 79618, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "size": 95002, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_delete.go", + "size": 2811, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "size": 24092, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "size": 55091, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "size": 14340, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go", + "size": 8486, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go", + "size": 45203, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "size": 54432, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go", + "size": 2836, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "size": 21584, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "size": 27792, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment.go", + "size": 14425, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "size": 9890, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment/where.go", + "size": 45252, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "size": 50917, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_delete.go", + "size": 2686, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "size": 23669, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "size": 26451, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargessearchv1.go", + "size": 17186, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "size": 11595, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargessearchv1/where.go", + "size": 64981, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargessearchv1_query.go", + "size": 14712, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased.go", + "size": 30312, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "size": 27706, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased/where.go", + "size": 85950, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased_create.go", + "size": 88876, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased_delete.go", + "size": 2511, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased_query.go", + "size": 44239, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebased_update.go", + "size": 64801, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "size": 14768, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go", + "size": 10119, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go", + "size": 43543, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "size": 51728, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go", + "size": 3011, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "size": 29227, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "size": 34212, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "size": 27418, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "size": 18533, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline/where.go", + "size": 90566, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "size": 106114, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "size": 30307, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "size": 69291, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "size": 14567, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go", + "size": 8521, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go", + "size": 46305, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "size": 55888, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go", + "size": 2911, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "size": 22061, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "size": 28434, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment.go", + "size": 13670, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "size": 8677, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment/where.go", + "size": 45515, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "size": 51087, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_delete.go", + "size": 2761, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "size": 21129, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "size": 26675, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns.go", + "size": 23749, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go", + "size": 22099, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns/where.go", + "size": 59485, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_create.go", + "size": 67434, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_delete.go", + "size": 2611, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_query.go", + "size": 44180, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/chargeusagebasedruns_update.go", + "size": 59805, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/client.go", + "size": 701180, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage.go", + "size": 9421, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go", + "size": 7437, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage/where.go", + "size": 27165, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_create.go", + "size": 24884, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_delete.go", + "size": 2711, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_query.go", + "size": 23852, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineage_update.go", + "size": 12980, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment.go", + "size": 9772, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go", + "size": 6709, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment/where.go", + "size": 27191, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "size": 36989, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "size": 21998, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "size": 19439, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis.go", + "size": 8342, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis/currencycostbasis.go", + "size": 5382, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis/where.go", + "size": 23024, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis_create.go", + "size": 24985, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis_delete.go", + "size": 2536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis_query.go", + "size": 19923, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/currencycostbasis_update.go", + "size": 9122, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/cursor.go", + "size": 95354, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency.go", + "size": 7241, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency/customcurrency.go", + "size": 5570, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency/where.go", + "size": 19965, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency_create.go", + "size": 25883, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency_delete.go", + "size": 2461, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency_query.go", + "size": 19950, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customcurrency_update.go", + "size": 17315, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer.go", + "size": 19486, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer/customer.go", + "size": 20157, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer/where.go", + "size": 60843, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer_create.go", + "size": 64338, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer_delete.go", + "size": 2311, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer_query.go", + "size": 40753, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customer_update.go", + "size": 79695, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects.go", + "size": 6591, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects/customersubjects.go", + "size": 4192, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects/where.go", + "size": 16001, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects_create.go", + "size": 19700, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects_delete.go", + "size": 2508, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects_query.go", + "size": 19667, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/customersubjects_update.go", + "size": 7921, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ent.go", + "size": 29278, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement.go", + "size": 20075, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement/entitlement.go", + "size": 17554, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement/where.go", + "size": 55069, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement_create.go", + "size": 52770, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement_delete.go", + "size": 2386, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement_query.go", + "size": 32292, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entitlement_update.go", + "size": 43749, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/entmixinaccessor.go", + "size": 64255, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/enttest/enttest.go", + "size": 1907, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/expose.go", + "size": 7431, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature.go", + "size": 20052, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature/feature.go", + "size": 18100, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature/where.go", + "size": 62512, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature_create.go", + "size": 64953, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature_delete.go", + "size": 2303, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature_query.go", + "size": 34933, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/feature_update.go", + "size": 65357, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant.go", + "size": 13069, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant/grant.go", + "size": 7715, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant/where.go", + "size": 33465, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant_create.go", + "size": 33080, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant_delete.go", + "size": 2251, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant_query.go", + "size": 18290, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/grant_update.go", + "size": 12741, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/hook/hook.go", + "size": 46736, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount.go", + "size": 7899, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount/ledgeraccount.go", + "size": 6166, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount/where.go", + "size": 16730, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount_create.go", + "size": 25593, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount_delete.go", + "size": 2436, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount_query.go", + "size": 22586, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgeraccount_update.go", + "size": 20861, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord.go", + "size": 14945, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go", + "size": 10514, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord/where.go", + "size": 60818, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_create.go", + "size": 40517, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_delete.go", + "size": 2611, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_query.go", + "size": 17622, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerbreakagerecord_update.go", + "size": 12357, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount.go", + "size": 6636, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go", + "size": 3869, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount/where.go", + "size": 22050, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_create.go", + "size": 23991, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_delete.go", + "size": 2636, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_query.go", + "size": 17751, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgercustomeraccount_update.go", + "size": 8713, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry.go", + "size": 9518, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry/ledgerentry.go", + "size": 6592, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry/where.go", + "size": 23526, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry_create.go", + "size": 26713, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry_delete.go", + "size": 2386, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry_query.go", + "size": 21733, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgerentry_update.go", + "size": 10217, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount.go", + "size": 9110, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go", + "size": 6849, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount/where.go", + "size": 19918, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount_create.go", + "size": 26985, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount_delete.go", + "size": 2511, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount_query.go", + "size": 24962, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccount_update.go", + "size": 15914, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute.go", + "size": 13078, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go", + "size": 8697, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute/where.go", + "size": 47588, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_create.go", + "size": 32428, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_delete.go", + "size": 2636, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_query.go", + "size": 23363, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgersubaccountroute_update.go", + "size": 16718, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction.go", + "size": 8415, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction/ledgertransaction.go", + "size": 5848, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction/where.go", + "size": 18227, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction_create.go", + "size": 26426, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction_delete.go", + "size": 2536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction_query.go", + "size": 22612, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransaction_update.go", + "size": 15718, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup.go", + "size": 7009, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go", + "size": 4439, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup/where.go", + "size": 13509, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_create.go", + "size": 25426, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_delete.go", + "size": 2661, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_query.go", + "size": 20949, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/ledgertransactiongroup_update.go", + "size": 16067, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice.go", + "size": 12314, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice/llmcostprice.go", + "size": 8702, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice/where.go", + "size": 40694, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice_create.go", + "size": 52018, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice_delete.go", + "size": 2411, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice_query.go", + "size": 16606, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/llmcostprice_update.go", + "size": 28365, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter.go", + "size": 10776, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter/meter.go", + "size": 7254, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter/where.go", + "size": 28491, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter_create.go", + "size": 36438, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter_delete.go", + "size": 2251, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter_query.go", + "size": 18377, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/meter_update.go", + "size": 21183, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/migrate/migrate.go", + "size": 3783, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "openmeter/ent/db/migrate/schema.go", + "size": 255340, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "openmeter/ent/db/mutation.go", + "size": 3885750, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel.go", + "size": 9382, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel/notificationchannel.go", + "size": 6421, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel/where.go", + "size": 18213, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel_create.go", + "size": 34969, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel_delete.go", + "size": 2586, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel_query.go", + "size": 21438, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationchannel_update.go", + "size": 21748, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent.go", + "size": 8014, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent/notificationevent.go", + "size": 6146, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent/where.go", + "size": 16165, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent_create.go", + "size": 24022, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent_delete.go", + "size": 2536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent_query.go", + "size": 24270, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationevent_update.go", + "size": 14869, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus.go", + "size": 10088, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go", + "size": 6683, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus/where.go", + "size": 26582, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "size": 38209, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_delete.go", + "size": 2886, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "size": 23273, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "size": 23247, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule.go", + "size": 9796, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule/notificationrule.go", + "size": 7769, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule/where.go", + "size": 18447, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule_create.go", + "size": 35030, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule_delete.go", + "size": 2511, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule_query.go", + "size": 23811, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/notificationrule_update.go", + "size": 26788, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes.go", + "size": 8794, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go", + "size": 6243, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes/where.go", + "size": 22280, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "size": 29166, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_delete.go", + "size": 2786, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "size": 24346, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/organizationdefaulttaxcodes_update.go", + "size": 18593, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/paginate.go", + "size": 126041, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan.go", + "size": 12280, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan/plan.go", + "size": 11197, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan/where.go", + "size": 33027, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan_create.go", + "size": 42488, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan_delete.go", + "size": 2211, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan_query.go", + "size": 23215, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/plan_update.go", + "size": 35728, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon.go", + "size": 9664, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon/planaddon.go", + "size": 6483, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon/where.go", + "size": 23091, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon_create.go", + "size": 31463, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon_delete.go", + "size": 2336, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon_query.go", + "size": 20829, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planaddon_update.go", + "size": 14361, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase.go", + "size": 9774, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase/planphase.go", + "size": 7111, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase/where.go", + "size": 28289, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase_create.go", + "size": 33923, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase_delete.go", + "size": 2336, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase_query.go", + "size": 21173, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planphase_update.go", + "size": 23847, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard.go", + "size": 15544, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard/planratecard.go", + "size": 11673, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard/where.go", + "size": 42407, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard_create.go", + "size": 55711, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard_delete.go", + "size": 2411, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard_query.go", + "size": 24016, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/planratecard_update.go", + "size": 37627, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/predicate/predicate.go", + "size": 15666, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/runtime.go", + "size": 238018, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/runtime/runtime.go", + "size": 347, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/setorclear.go", + "size": 169379, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject.go", + "size": 6728, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject/subject.go", + "size": 4019, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject/where.go", + "size": 19779, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject_create.go", + "size": 27430, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject_delete.go", + "size": 2286, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject_query.go", + "size": 15945, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subject_update.go", + "size": 13648, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription.go", + "size": 19445, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription/subscription.go", + "size": 21171, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription/where.go", + "size": 45411, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription_create.go", + "size": 55093, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription_delete.go", + "size": 2411, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription_query.go", + "size": 45034, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscription_update.go", + "size": 67918, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon.go", + "size": 9202, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go", + "size": 7374, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon/where.go", + "size": 20438, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon_create.go", + "size": 27712, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon_delete.go", + "size": 2536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon_query.go", + "size": 25383, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddon_update.go", + "size": 16425, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity.go", + "size": 8306, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go", + "size": 5779, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity/where.go", + "size": 21189, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_create.go", + "size": 26846, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_delete.go", + "size": 2736, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_query.go", + "size": 21368, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionaddonquantity_update.go", + "size": 9834, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate.go", + "size": 7339, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go", + "size": 4304, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate/where.go", + "size": 16171, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "size": 25549, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_delete.go", + "size": 2811, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "size": 21578, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionbillingsyncstate_update.go", + "size": 11349, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem.go", + "size": 23504, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem/subscriptionitem.go", + "size": 21577, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem/where.go", + "size": 65102, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem_create.go", + "size": 80212, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem_delete.go", + "size": 2511, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem_query.go", + "size": 40669, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionitem_update.go", + "size": 76926, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase.go", + "size": 14188, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase/subscriptionphase.go", + "size": 15114, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase/where.go", + "size": 33865, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase_create.go", + "size": 41194, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase_delete.go", + "size": 2536, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase_query.go", + "size": 38476, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/subscriptionphase_update.go", + "size": 51755, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode.go", + "size": 20124, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode/taxcode.go", + "size": 29429, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode/where.go", + "size": 32424, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode_create.go", + "size": 48581, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode_delete.go", + "size": 2303, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode_query.go", + "size": 62818, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/taxcode_update.go", + "size": 107244, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/tx.go", + "size": 23928, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset.go", + "size": 8711, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset/usagereset.go", + "size": 5419, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset/where.go", + "size": 22338, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset_create.go", + "size": 25382, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset_delete.go", + "size": 2361, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset_query.go", + "size": 18961, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/db/usagereset_update.go", + "size": 9791, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "openmeter/ent/entc.go", + "size": 1188, + "extension": ".go" + }, + { + "path": "openmeter/ent/generate.go", + "size": 58, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/addon.go", + "size": 3181, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/app.go", + "size": 2352, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/app_stripe.go", + "size": 3156, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/appcustominvoicing.go", + "size": 2818, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/balance_snapshot.go", + "size": 1554, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/billing.go", + "size": 35891, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/charges.go", + "size": 4174, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/chargescreditpurchase.go", + "size": 5812, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/chargesflatfee.go", + "size": 9479, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/chargesusagebased.go", + "size": 10622, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/creditrealizationlineage.go", + "size": 3858, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/custom_currencies.go", + "size": 2359, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/customer.go", + "size": 4835, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/entitlement.go", + "size": 3825, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/feature.go", + "size": 3280, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/grant.go", + "size": 2029, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_account.go", + "size": 3903, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_breakage_record.go", + "size": 3312, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_customer_account.go", + "size": 1140, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_entry.go", + "size": 1719, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_transaction.go", + "size": 1118, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ledger_transaction_group.go", + "size": 650, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/llmcostprice.go", + "size": 2721, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/meter.go", + "size": 1346, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/notification.go", + "size": 10249, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/organizationdefaulttaxcodes.go", + "size": 1624, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/planaddon.go", + "size": 1525, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/productcatalog.go", + "size": 4963, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/ratecard.go", + "size": 1612, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/subject.go", + "size": 1810, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/subscription.go", + "size": 7847, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/subscription_addon.go", + "size": 2048, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/subscriptionbillingsync.go", + "size": 1137, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/taxcode.go", + "size": 2919, + "extension": ".go" + }, + { + "path": "openmeter/ent/schema/usage_reset.go", + "size": 1208, + "extension": ".go" + }, + { + "path": "openmeter/ent/tx/enttx.go", + "size": 741, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/access.go", + "size": 241, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/adapter/entitlement.go", + "size": 31568, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/adapter/entitlement_test.go", + "size": 36758, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/adapter/transaction.go", + "size": 1635, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/adapter/usage_reset.go", + "size": 1349, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/entitlementhandler.go", + "size": 11709, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/events/recalculate.go", + "size": 3053, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/filters.go", + "size": 5977, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/filters/filter.go", + "size": 1319, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/filters/highwatermark.go", + "size": 3606, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/filters/notifications.go", + "size": 2841, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/ingesthandler.go", + "size": 3743, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/recalculate.go", + "size": 12919, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/repository.go", + "size": 1796, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/repository_test.go", + "size": 3327, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/subject_customer.go", + "size": 1972, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/balanceworker/worker.go", + "size": 11720, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/boolean/connector.go", + "size": 2440, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/boolean/entitlement.go", + "size": 509, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/connector.go", + "size": 3991, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/entitlement.go", + "size": 21850, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/errors.go", + "size": 1490, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/metered.go", + "size": 15994, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/parser.go", + "size": 14158, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/customer.go", + "size": 15053, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/customer_metered.go", + "size": 15359, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/entitlement.go", + "size": 6382, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/errors.go", + "size": 685, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/handler.go", + "size": 1881, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/driver/v2/mapping.go", + "size": 15573, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/entitlement.go", + "size": 11554, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/entitlement_grant.go", + "size": 151, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/entitlement_test.go", + "size": 2009, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/entitlement_types.go", + "size": 919, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/errors.go", + "size": 2158, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/events.go", + "size": 7355, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/hooks/subscription/hook.go", + "size": 1621, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/balance.go", + "size": 13412, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/balance_test.go", + "size": 59122, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/connector.go", + "size": 9709, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/entitlement.go", + "size": 4703, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/entitlement_grant.go", + "size": 5259, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/events.go", + "size": 3315, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/grant_owner_adapter.go", + "size": 9888, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/grant_owner_adapter_test.go", + "size": 23374, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/hook.go", + "size": 1160, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/lateevents_test.go", + "size": 11515, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/owner_customer.go", + "size": 530, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/repository.go", + "size": 994, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/reset.go", + "size": 3747, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/reset_test.go", + "size": 37094, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/trace.go", + "size": 702, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/metered/utils_test.go", + "size": 8646, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/repository.go", + "size": 5156, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/access_test.go", + "size": 10802, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/lock.go", + "size": 234, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/scheduling.go", + "size": 7680, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/scheduling_test.go", + "size": 30188, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/service.go", + "size": 14429, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/service_test.go", + "size": 2548, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/service/utils_test.go", + "size": 6928, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/snapshot/event.go", + "size": 5920, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/static/connector.go", + "size": 2920, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/static/entitlement.go", + "size": 750, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/uniqueness.go", + "size": 2443, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/uniqueness_test.go", + "size": 6634, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/usageperiod.go", + "size": 7171, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/usageperiod_test.go", + "size": 14761, + "extension": ".go" + }, + { + "path": "openmeter/entitlement/validators/customer/validator.go", + "size": 1511, + "extension": ".go" + }, + { + "path": "openmeter/event/metadata/event_type.go", + "size": 1418, + "extension": ".go" + }, + { + "path": "openmeter/event/metadata/resourcepath.go", + "size": 910, + "extension": ".go" + }, + { + "path": "openmeter/event/models/models.go", + "size": 469, + "extension": ".go" + }, + { + "path": "openmeter/info/httpdriver/currencies.go", + "size": 1416, + "extension": ".go" + }, + { + "path": "openmeter/info/httpdriver/driver.go", + "size": 335, + "extension": ".go" + }, + { + "path": "openmeter/ingest/dedupe.go", + "size": 736, + "extension": ".go" + }, + { + "path": "openmeter/ingest/dedupe_test.go", + "size": 1049, + "extension": ".go" + }, + { + "path": "openmeter/ingest/httpdriver/errors.go", + "size": 1220, + "extension": ".go" + }, + { + "path": "openmeter/ingest/httpdriver/handler.go", + "size": 1116, + "extension": ".go" + }, + { + "path": "openmeter/ingest/httpdriver/ingest.go", + "size": 2792, + "extension": ".go" + }, + { + "path": "openmeter/ingest/httpdriver/ingest_test.go", + "size": 3629, + "extension": ".go" + }, + { + "path": "openmeter/ingest/ingest.go", + "size": 333, + "extension": ".go" + }, + { + "path": "openmeter/ingest/ingestadapter/telemetry.go", + "size": 2294, + "extension": ".go" + }, + { + "path": "openmeter/ingest/inmemory.go", + "size": 1298, + "extension": ".go" + }, + { + "path": "openmeter/ingest/inmemory_test.go", + "size": 624, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/collector.go", + "size": 7390, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/namespace.go", + "size": 1748, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/serializer/json.go", + "size": 882, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/serializer/serializer.go", + "size": 2756, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/serializer/serializer_test.go", + "size": 4886, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/topicresolver/namespacedtopic.go", + "size": 672, + "extension": ".go" + }, + { + "path": "openmeter/ingest/kafkaingest/topicresolver/resolver.go", + "size": 218, + "extension": ".go" + }, + { + "path": "openmeter/ingest/service.go", + "size": 2036, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account.go", + "size": 3664, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/account.go", + "size": 1865, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/account_business.go", + "size": 982, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/account_customer.go", + "size": 3337, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/adapter/account.go", + "size": 2700, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/adapter/repo.go", + "size": 1063, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/adapter/repo_test.go", + "size": 10603, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/adapter/subaccount.go", + "size": 9404, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/address.go", + "size": 2142, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/ledger.go", + "size": 16, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/repo.go", + "size": 1111, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/service.go", + "size": 372, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/service/service.go", + "size": 4527, + "extension": ".go" + }, + { + "path": "openmeter/ledger/account/subaccount.go", + "size": 1508, + "extension": ".go" + }, + { + "path": "openmeter/ledger/accounts.go", + "size": 4351, + "extension": ".go" + }, + { + "path": "openmeter/ledger/annotations.go", + "size": 4964, + "extension": ".go" + }, + { + "path": "openmeter/ledger/annotations_test.go", + "size": 398, + "extension": ".go" + }, + { + "path": "openmeter/ledger/balance.go", + "size": 371, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/README.md", + "size": 8871, + "extension": ".md" + }, + { + "path": "openmeter/ledger/breakage/adapter/adapter.go", + "size": 1268, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/adapter/record.go", + "size": 9317, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/breakage_impacts.go", + "size": 4450, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/noop.go", + "size": 1575, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/service.go", + "size": 23294, + "extension": ".go" + }, + { + "path": "openmeter/ledger/breakage/types.go", + "size": 8493, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/annotations.go", + "size": 2034, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/bookedat_test.go", + "size": 596, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase.go", + "size": 19077, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/creditpurchase_test.go", + "size": 31843, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee.go", + "size": 9612, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/flatfee_test.go", + "size": 49358, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/helpers.go", + "size": 1039, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased.go", + "size": 9299, + "extension": ".go" + }, + { + "path": "openmeter/ledger/chargeadapter/usagebased_test.go", + "size": 38063, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/README.md", + "size": 6078, + "extension": ".md" + }, + { + "path": "openmeter/ledger/collector/collect.go", + "size": 9453, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/collection_fbo.go", + "size": 8109, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/collection_fbo_test.go", + "size": 14745, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/correct.go", + "size": 27711, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/correct_test.go", + "size": 7907, + "extension": ".go" + }, + { + "path": "openmeter/ledger/collector/service.go", + "size": 4150, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/README.md", + "size": 3783, + "extension": ".md" + }, + { + "path": "openmeter/ledger/customerbalance/calculation.go", + "size": 3235, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/expired_loader.go", + "size": 1377, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/expired_loader_test.go", + "size": 15079, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/facade.go", + "size": 4512, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/facade_test.go", + "size": 8870, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/funded_loader.go", + "size": 2227, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/ledger_loader.go", + "size": 1362, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/loaders.go", + "size": 1938, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/merge.go", + "size": 2122, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/noop.go", + "size": 1010, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/service.go", + "size": 10745, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/service_test.go", + "size": 8972, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/testenv_test.go", + "size": 21113, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/transactions.go", + "size": 11166, + "extension": ".go" + }, + { + "path": "openmeter/ledger/customerbalance/transactions_test.go", + "size": 6652, + "extension": ".go" + }, + { + "path": "openmeter/ledger/errors.go", + "size": 4584, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/adapter/ledger.go", + "size": 18203, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/adapter/ledger_test.go", + "size": 38052, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/adapter/repo.go", + "size": 1082, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/adapter/sumentries_query.go", + "size": 6099, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/balance.go", + "size": 2240, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/entry.go", + "size": 2021, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/ledger.go", + "size": 5269, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/repo.go", + "size": 2127, + "extension": ".go" + }, + { + "path": "openmeter/ledger/historical/transaction.go", + "size": 2323, + "extension": ".go" + }, + { + "path": "openmeter/ledger/impact.go", + "size": 610, + "extension": ".go" + }, + { + "path": "openmeter/ledger/impact_test.go", + "size": 11823, + "extension": ".go" + }, + { + "path": "openmeter/ledger/ledger_fx_test.go", + "size": 4549, + "extension": ".go" + }, + { + "path": "openmeter/ledger/ledger_test.go", + "size": 2945, + "extension": ".go" + }, + { + "path": "openmeter/ledger/noop/noop.go", + "size": 9947, + "extension": ".go" + }, + { + "path": "openmeter/ledger/primitives.go", + "size": 8313, + "extension": ".go" + }, + { + "path": "openmeter/ledger/query.go", + "size": 2967, + "extension": ".go" + }, + { + "path": "openmeter/ledger/recognizer/noop.go", + "size": 367, + "extension": ".go" + }, + { + "path": "openmeter/ledger/recognizer/recognize.go", + "size": 7187, + "extension": ".go" + }, + { + "path": "openmeter/ledger/recognizer/service.go", + "size": 2727, + "extension": ".go" + }, + { + "path": "openmeter/ledger/recognizer/service_test.go", + "size": 7711, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/account.go", + "size": 11331, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/account_test.go", + "size": 4604, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/adapter/repo.go", + "size": 3178, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/customeraccount.go", + "size": 693, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/errors.go", + "size": 1759, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/hooks.go", + "size": 1656, + "extension": ".go" + }, + { + "path": "openmeter/ledger/resolvers/namespace.go", + "size": 822, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routing.go", + "size": 16205, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routing_test.go", + "size": 16271, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routing_validator.go", + "size": 97, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routingrules/defaults.go", + "size": 3171, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routingrules/routingrules.go", + "size": 15117, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routingrules/routingrules_test.go", + "size": 24024, + "extension": ".go" + }, + { + "path": "openmeter/ledger/routingrules/view.go", + "size": 3259, + "extension": ".go" + }, + { + "path": "openmeter/ledger/testutils/deps.go", + "size": 1735, + "extension": ".go" + }, + { + "path": "openmeter/ledger/testutils/integration.go", + "size": 6751, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/accrual.go", + "size": 18653, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/accrual_test.go", + "size": 9450, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/breakage.go", + "size": 4704, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/codes.go", + "size": 8428, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/collection.go", + "size": 3755, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/correction.go", + "size": 3421, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/correction_leg.go", + "size": 4410, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/correction_leg_test.go", + "size": 2036, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/correction_test.go", + "size": 4954, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/customer.go", + "size": 17329, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/customer_test.go", + "size": 4789, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/earnings.go", + "size": 6395, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/earnings_test.go", + "size": 9056, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/entry_identity.go", + "size": 274, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/fx.go", + "size": 4108, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/input.go", + "size": 3509, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/legacy.go", + "size": 5924, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/priority.go", + "size": 240, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/resolve.go", + "size": 3029, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/resolve_test.go", + "size": 1841, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/template.go", + "size": 1118, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/testenv_test.go", + "size": 2710, + "extension": ".go" + }, + { + "path": "openmeter/ledger/transactions/testutils/anytransaction.go", + "size": 2170, + "extension": ".go" + }, + { + "path": "openmeter/ledger/validations.go", + "size": 2962, + "extension": ".go" + }, + { + "path": "openmeter/ledger/validations_test.go", + "size": 3008, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/adapter.go", + "size": 889, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/adapter/adapter.go", + "size": 1674, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/adapter/mapping.go", + "size": 1754, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/adapter/price.go", + "size": 10928, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/errors.go", + "size": 2797, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/llmcost.go", + "size": 4479, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/llmcost_test.go", + "size": 5222, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/normalize.go", + "size": 3682, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/normalize_test.go", + "size": 6098, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/service.go", + "size": 7719, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/service/service.go", + "size": 4647, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/service/service_test.go", + "size": 7939, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/fetcher.go", + "size": 382, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/fetcher_modelsdev.go", + "size": 3804, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/normalizer.go", + "size": 676, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/normalizer_test.go", + "size": 2496, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/reconciler.go", + "size": 7264, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/reconciler_test.go", + "size": 19307, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/sync.go", + "size": 5727, + "extension": ".go" + }, + { + "path": "openmeter/llmcost/sync/sync_test.go", + "size": 14665, + "extension": ".go" + }, + { + "path": "openmeter/meter/adapter/adapter.go", + "size": 1516, + "extension": ".go" + }, + { + "path": "openmeter/meter/adapter/adapter_test.go", + "size": 5205, + "extension": ".go" + }, + { + "path": "openmeter/meter/adapter/manage.go", + "size": 6188, + "extension": ".go" + }, + { + "path": "openmeter/meter/adapter/meter.go", + "size": 4128, + "extension": ".go" + }, + { + "path": "openmeter/meter/errors.go", + "size": 918, + "extension": ".go" + }, + { + "path": "openmeter/meter/event.go", + "size": 3871, + "extension": ".go" + }, + { + "path": "openmeter/meter/httphandler/handler.go", + "size": 2006, + "extension": ".go" + }, + { + "path": "openmeter/meter/httphandler/mapping.go", + "size": 7515, + "extension": ".go" + }, + { + "path": "openmeter/meter/httphandler/meter.go", + "size": 11148, + "extension": ".go" + }, + { + "path": "openmeter/meter/httphandler/query.go", + "size": 8281, + "extension": ".go" + }, + { + "path": "openmeter/meter/httphandler/query_csv.go", + "size": 8198, + "extension": ".go" + }, + { + "path": "openmeter/meter/meter.go", + "size": 8883, + "extension": ".go" + }, + { + "path": "openmeter/meter/meter_test.go", + "size": 10501, + "extension": ".go" + }, + { + "path": "openmeter/meter/mockadapter/adapter.go", + "size": 1773, + "extension": ".go" + }, + { + "path": "openmeter/meter/mockadapter/manage.go", + "size": 2957, + "extension": ".go" + }, + { + "path": "openmeter/meter/mockadapter/meter.go", + "size": 4353, + "extension": ".go" + }, + { + "path": "openmeter/meter/parse.go", + "size": 4847, + "extension": ".go" + }, + { + "path": "openmeter/meter/parse_test.go", + "size": 7155, + "extension": ".go" + }, + { + "path": "openmeter/meter/service.go", + "size": 6995, + "extension": ".go" + }, + { + "path": "openmeter/meter/service/manage.go", + "size": 6958, + "extension": ".go" + }, + { + "path": "openmeter/meter/service/service.go", + "size": 775, + "extension": ".go" + }, + { + "path": "openmeter/meter/service_test.go", + "size": 2356, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/adapter/adapter.go", + "size": 707, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/adapter/event.go", + "size": 9965, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/httphandler/event.go", + "size": 2224, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/httphandler/event_v2.go", + "size": 1610, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/httphandler/handler.go", + "size": 1218, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/httphandler/mapping.go", + "size": 2608, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/service.go", + "size": 6958, + "extension": ".go" + }, + { + "path": "openmeter/meterevent/service_test.go", + "size": 2844, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service.go", + "size": 5375, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service/funnel.go", + "size": 3372, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service/service.go", + "size": 1000, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service/service_test.go", + "size": 20496, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service/syntheticdata.go", + "size": 5245, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service/syntheticdata_iter.go", + "size": 2299, + "extension": ".go" + }, + { + "path": "openmeter/meterexport/service_test.go", + "size": 3930, + "extension": ".go" + }, + { + "path": "openmeter/namespace/namespace.go", + "size": 3474, + "extension": ".go" + }, + { + "path": "openmeter/namespace/namespace_test.go", + "size": 2644, + "extension": ".go" + }, + { + "path": "openmeter/namespace/namespacedriver/decoder.go", + "size": 332, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/adapter.go", + "size": 1513, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/channel.go", + "size": 5760, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/deliverystatus.go", + "size": 4189, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/entitymapping.go", + "size": 4058, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/entitymapping_test.go", + "size": 3378, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/event.go", + "size": 8473, + "extension": ".go" + }, + { + "path": "openmeter/notification/adapter/rule.go", + "size": 7139, + "extension": ".go" + }, + { + "path": "openmeter/notification/annotations.go", + "size": 783, + "extension": ".go" + }, + { + "path": "openmeter/notification/channel.go", + "size": 7100, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/consumer.go", + "size": 3229, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold.go", + "size": 16916, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/entitlementbalancethreshold_test.go", + "size": 29143, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/entitlementreset.go", + "size": 5221, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/entitlementsnapshot.go", + "size": 781, + "extension": ".go" + }, + { + "path": "openmeter/notification/consumer/invoice.go", + "size": 3113, + "extension": ".go" + }, + { + "path": "openmeter/notification/defaults.go", + "size": 107, + "extension": ".go" + }, + { + "path": "openmeter/notification/deliverystatus.go", + "size": 6477, + "extension": ".go" + }, + { + "path": "openmeter/notification/entitlements.go", + "size": 7118, + "extension": ".go" + }, + { + "path": "openmeter/notification/errors.go", + "size": 577, + "extension": ".go" + }, + { + "path": "openmeter/notification/event.go", + "size": 5572, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler.go", + "size": 602, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/deliverystatus.go", + "size": 1821, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/dispatch.go", + "size": 1070, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/handler.go", + "size": 4344, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/noop/handler.go", + "size": 484, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/reconcile.go", + "size": 4098, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventhandler/webhook.go", + "size": 23035, + "extension": ".go" + }, + { + "path": "openmeter/notification/eventpayload.go", + "size": 1803, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/channel.go", + "size": 8147, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/errors.go", + "size": 1242, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/event.go", + "size": 5451, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/handler.go", + "size": 1967, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/mapping.go", + "size": 21043, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/mapping_test.go", + "size": 2275, + "extension": ".go" + }, + { + "path": "openmeter/notification/httpdriver/rule.go", + "size": 11286, + "extension": ".go" + }, + { + "path": "openmeter/notification/internal/rule.go", + "size": 7672, + "extension": ".go" + }, + { + "path": "openmeter/notification/invoice.go", + "size": 1029, + "extension": ".go" + }, + { + "path": "openmeter/notification/repository.go", + "size": 1728, + "extension": ".go" + }, + { + "path": "openmeter/notification/rule.go", + "size": 8028, + "extension": ".go" + }, + { + "path": "openmeter/notification/service.go", + "size": 2009, + "extension": ".go" + }, + { + "path": "openmeter/notification/service/channel.go", + "size": 7405, + "extension": ".go" + }, + { + "path": "openmeter/notification/service/deliverystatus.go", + "size": 1295, + "extension": ".go" + }, + { + "path": "openmeter/notification/service/event.go", + "size": 4238, + "extension": ".go" + }, + { + "path": "openmeter/notification/service/rule.go", + "size": 9281, + "extension": ".go" + }, + { + "path": "openmeter/notification/service/service.go", + "size": 1554, + "extension": ".go" + }, + { + "path": "openmeter/notification/utils.go", + "size": 4049, + "extension": ".go" + }, + { + "path": "openmeter/notification/utils_test.go", + "size": 1370, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/errors.go", + "size": 2884, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/events.go", + "size": 1632, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/handler.go", + "size": 7859, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/noop/noop.go", + "size": 2645, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/secret/secret.go", + "size": 996, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/annotations.go", + "size": 640, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/application.go", + "size": 1473, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/event.go", + "size": 1380, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/internal/error.go", + "size": 2485, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/message.go", + "size": 11931, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/svix.go", + "size": 3408, + "extension": ".go" + }, + { + "path": "openmeter/notification/webhook/svix/webhook.go", + "size": 16862, + "extension": ".go" + }, + { + "path": "openmeter/portal/adapter/adapter.go", + "size": 656, + "extension": ".go" + }, + { + "path": "openmeter/portal/adapter/noop.go", + "size": 1101, + "extension": ".go" + }, + { + "path": "openmeter/portal/adapter/token.go", + "size": 3295, + "extension": ".go" + }, + { + "path": "openmeter/portal/authenticator/authenticator.go", + "size": 5221, + "extension": ".go" + }, + { + "path": "openmeter/portal/httphandler/handler.go", + "size": 1378, + "extension": ".go" + }, + { + "path": "openmeter/portal/httphandler/mapping.go", + "size": 748, + "extension": ".go" + }, + { + "path": "openmeter/portal/httphandler/portal.go", + "size": 5911, + "extension": ".go" + }, + { + "path": "openmeter/portal/service.go", + "size": 3560, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/adapter/feature.go", + "size": 13881, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/adapter/feature_test.go", + "size": 29347, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/adapter/transaction.go", + "size": 1049, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon.go", + "size": 8267, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/adapter/adapter.go", + "size": 1689, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/adapter/adapter_test.go", + "size": 13827, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/adapter/addon.go", + "size": 16181, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/adapter/mapping.go", + "size": 10152, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/addon.go", + "size": 1371, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/assert.go", + "size": 4150, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/errors.go", + "size": 1106, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/errors_test.go", + "size": 1984, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/event.go", + "size": 6211, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/httpdriver/addon.go", + "size": 13236, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/httpdriver/driver.go", + "size": 1357, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/httpdriver/mapping.go", + "size": 3124, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/plan.go", + "size": 656, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/ratecard.go", + "size": 4384, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/ratecard_test.go", + "size": 12323, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/repository.go", + "size": 598, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/service.go", + "size": 10403, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/service/addon.go", + "size": 19400, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/service/service.go", + "size": 1376, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/service/service_test.go", + "size": 20801, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/service/taxcode_test.go", + "size": 31816, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/addon/validators.go", + "size": 659, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/alignment.go", + "size": 1240, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/discount.go", + "size": 5596, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/discount_test.go", + "size": 3030, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/driver/errors.go", + "size": 1303, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/driver/feature.go", + "size": 9113, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/driver/parser.go", + "size": 7431, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/effectiveperiod.go", + "size": 2077, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/effectiveperiod_test.go", + "size": 3272, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/entitlement.go", + "size": 12198, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/entitlement_test.go", + "size": 4274, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/errors.go", + "size": 22767, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/connector.go", + "size": 11329, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/connector_test.go", + "size": 1575, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/event.go", + "size": 4283, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/feature.go", + "size": 5314, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/featuremeter.go", + "size": 5975, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/featuremeter_test.go", + "size": 2942, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/meter_group_by_filters_test.go", + "size": 1045, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/repository.go", + "size": 1325, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/feature/unitcost.go", + "size": 6199, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/featureresolver.go", + "size": 643, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/featureresolver/ratecard.go", + "size": 2757, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/featureresolver/ratecard_test.go", + "size": 9345, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/featureresolver/resolver.go", + "size": 3861, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/featureresolver/resolver_test.go", + "size": 5408, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/http/errors.go", + "size": 1237, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/http/mapping.go", + "size": 27262, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/http/resource.go", + "size": 134, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/phase.go", + "size": 3167, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan.go", + "size": 8987, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/adapter/adapter.go", + "size": 1686, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/adapter/adapter_test.go", + "size": 16463, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/adapter/mapping.go", + "size": 10522, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/adapter/phase.go", + "size": 4303, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/adapter/plan.go", + "size": 15183, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/addon.go", + "size": 731, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/assert.go", + "size": 6042, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/errors.go", + "size": 1101, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/errors_test.go", + "size": 1975, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/event.go", + "size": 6077, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/driver.go", + "size": 1693, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/featuregate.go", + "size": 307, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/mapping.go", + "size": 6230, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/httpdriver/plan.go", + "size": 14722, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/phase.go", + "size": 2248, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/plan.go", + "size": 1533, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/ratecard.go", + "size": 3193, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/ratecard_test.go", + "size": 12354, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/repository.go", + "size": 593, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/serializer.go", + "size": 7117, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/serializer_test.go", + "size": 6111, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/service.go", + "size": 12453, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/service/plan.go", + "size": 22286, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/service/service.go", + "size": 1369, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/service/service_test.go", + "size": 37538, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/service/taxcode_test.go", + "size": 34152, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan/validators.go", + "size": 904, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/plan_test.go", + "size": 10470, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon.go", + "size": 4413, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/adapter.go", + "size": 1701, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/adapter_test.go", + "size": 14299, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/mapping.go", + "size": 2012, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/adapter/planaddon.go", + "size": 13090, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/assert.go", + "size": 1948, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/errors.go", + "size": 1198, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/errors_test.go", + "size": 1842, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/event.go", + "size": 4297, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/httpdriver/driver.go", + "size": 1345, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/httpdriver/mapping.go", + "size": 2419, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/httpdriver/planaddon.go", + "size": 10144, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/planaddon.go", + "size": 1299, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/repository.go", + "size": 635, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/service.go", + "size": 6327, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/service/planaddon.go", + "size": 12735, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/service/service.go", + "size": 1332, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon/service/service_test.go", + "size": 15004, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/planaddon_test.go", + "size": 19684, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/price.go", + "size": 21820, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/price_test.go", + "size": 9108, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/pro_rating.go", + "size": 1107, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/ratecard.go", + "size": 23149, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/ratecard_test.go", + "size": 33114, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/settlementmode.go", + "size": 536, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/cancel.go", + "size": 4814, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/change.go", + "size": 5387, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/create.go", + "size": 7578, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/delete.go", + "size": 1493, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/edit.go", + "size": 2939, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/errors.go", + "size": 2904, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/featuregate.go", + "size": 307, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/get.go", + "size": 5998, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/handler.go", + "size": 2175, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/mapping.go", + "size": 16111, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/http/migrate.go", + "size": 2435, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/plan.go", + "size": 3241, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service.go", + "size": 1423, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/change.go", + "size": 2105, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/change_test.go", + "size": 14083, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/create.go", + "size": 1990, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/migrate.go", + "size": 3383, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/migrate_test.go", + "size": 12972, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/plan.go", + "size": 2564, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/plan_test.go", + "size": 3190, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/service/service.go", + "size": 1693, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/subscription/testutils/adapter.go", + "size": 2437, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/tax.go", + "size": 8108, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/tax_test.go", + "size": 23382, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/addon.go", + "size": 935, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/env.go", + "size": 6494, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/feature.go", + "size": 821, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/meters.go", + "size": 1922, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/namespace.go", + "size": 262, + "extension": ".go" + }, + { + "path": "openmeter/productcatalog/testutils/plan.go", + "size": 2818, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/adapter.go", + "size": 380, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/adapter/adapter.go", + "size": 1748, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/adapter/mock.go", + "size": 1143, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/adapter/noop.go", + "size": 511, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/adapter/progress.go", + "size": 1932, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/entity/progressmanager.go", + "size": 2162, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/httpdriver/handler.go", + "size": 1178, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/httpdriver/progress.go", + "size": 2004, + "extension": ".go" + }, + { + "path": "openmeter/progressmanager/service.go", + "size": 380, + "extension": ".go" + }, + { + "path": "openmeter/registry/builder/entitlement.go", + "size": 5619, + "extension": ".go" + }, + { + "path": "openmeter/registry/entitlement.go", + "size": 762, + "extension": ".go" + }, + { + "path": "openmeter/secret/adapter.go", + "size": 596, + "extension": ".go" + }, + { + "path": "openmeter/secret/adapter/adapter.go", + "size": 194, + "extension": ".go" + }, + { + "path": "openmeter/secret/adapter/secret.go", + "size": 1656, + "extension": ".go" + }, + { + "path": "openmeter/secret/entity/errors.go", + "size": 780, + "extension": ".go" + }, + { + "path": "openmeter/secret/entity/input.go", + "size": 1212, + "extension": ".go" + }, + { + "path": "openmeter/secret/entity/secret.go", + "size": 1316, + "extension": ".go" + }, + { + "path": "openmeter/secret/service.go", + "size": 596, + "extension": ".go" + }, + { + "path": "openmeter/secret/service/secret.go", + "size": 1585, + "extension": ".go" + }, + { + "path": "openmeter/secret/service/service.go", + "size": 523, + "extension": ".go" + }, + { + "path": "openmeter/server/cors.go", + "size": 831, + "extension": ".go" + }, + { + "path": "openmeter/server/framework_test.go", + "size": 3821, + "extension": ".go" + }, + { + "path": "openmeter/server/router/addon.go", + "size": 1736, + "extension": ".go" + }, + { + "path": "openmeter/server/router/app.go", + "size": 867, + "extension": ".go" + }, + { + "path": "openmeter/server/router/appcustominvoicing.go", + "size": 1276, + "extension": ".go" + }, + { + "path": "openmeter/server/router/appstripe.go", + "size": 1340, + "extension": ".go" + }, + { + "path": "openmeter/server/router/billing.go", + "size": 6785, + "extension": ".go" + }, + { + "path": "openmeter/server/router/credit.go", + "size": 1104, + "extension": ".go" + }, + { + "path": "openmeter/server/router/customer.go", + "size": 3157, + "extension": ".go" + }, + { + "path": "openmeter/server/router/customerstripe.go", + "size": 1249, + "extension": ".go" + }, + { + "path": "openmeter/server/router/debug.go", + "size": 321, + "extension": ".go" + }, + { + "path": "openmeter/server/router/entitlement.go", + "size": 12106, + "extension": ".go" + }, + { + "path": "openmeter/server/router/event.go", + "size": 606, + "extension": ".go" + }, + { + "path": "openmeter/server/router/info.go", + "size": 441, + "extension": ".go" + }, + { + "path": "openmeter/server/router/marketplace.go", + "size": 1773, + "extension": ".go" + }, + { + "path": "openmeter/server/router/meter.go", + "size": 3125, + "extension": ".go" + }, + { + "path": "openmeter/server/router/noop.go", + "size": 234, + "extension": ".go" + }, + { + "path": "openmeter/server/router/notification.go", + "size": 3484, + "extension": ".go" + }, + { + "path": "openmeter/server/router/plan.go", + "size": 1930, + "extension": ".go" + }, + { + "path": "openmeter/server/router/planaddon.go", + "size": 1795, + "extension": ".go" + }, + { + "path": "openmeter/server/router/portal.go", + "size": 1731, + "extension": ".go" + }, + { + "path": "openmeter/server/router/product_catalog.go", + "size": 888, + "extension": ".go" + }, + { + "path": "openmeter/server/router/router.go", + "size": 18055, + "extension": ".go" + }, + { + "path": "openmeter/server/router/subject.go", + "size": 757, + "extension": ".go" + }, + { + "path": "openmeter/server/router/subscription.go", + "size": 2750, + "extension": ".go" + }, + { + "path": "openmeter/server/router/subscriptionaddon.go", + "size": 1702, + "extension": ".go" + }, + { + "path": "openmeter/server/server.go", + "size": 11677, + "extension": ".go" + }, + { + "path": "openmeter/server/server_test.go", + "size": 76219, + "extension": ".go" + }, + { + "path": "openmeter/session/session.go", + "size": 2177, + "extension": ".go" + }, + { + "path": "openmeter/sink/buffer.go", + "size": 1966, + "extension": ".go" + }, + { + "path": "openmeter/sink/buffer_test.go", + "size": 1781, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/handler.go", + "size": 6324, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/ingestnotification/events/events.go", + "size": 1954, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/ingestnotification/handler.go", + "size": 4545, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/meters.go", + "size": 1205, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/mux.go", + "size": 1563, + "extension": ".go" + }, + { + "path": "openmeter/sink/flushhandler/types.go", + "size": 370, + "extension": ".go" + }, + { + "path": "openmeter/sink/meters.go", + "size": 3812, + "extension": ".go" + }, + { + "path": "openmeter/sink/models/models.go", + "size": 1185, + "extension": ".go" + }, + { + "path": "openmeter/sink/partition.go", + "size": 452, + "extension": ".go" + }, + { + "path": "openmeter/sink/sink.go", + "size": 32398, + "extension": ".go" + }, + { + "path": "openmeter/sink/storage.go", + "size": 1861, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/connector.go", + "size": 18181, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/connector_query_test.go", + "size": 10913, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/connector_test.go", + "size": 6038, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/event_query.go", + "size": 6326, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/event_query_test.go", + "size": 7560, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/event_query_v2.go", + "size": 4507, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/event_query_v2_test.go", + "size": 11418, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/group_by_values_query.go", + "size": 1296, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/group_by_values_query_test.go", + "size": 4106, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/meter_query.go", + "size": 16038, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/meter_query_test.go", + "size": 37184, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/mock.go", + "size": 3188, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/queryhelper.go", + "size": 3689, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/subject_query.go", + "size": 1099, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/subject_query_test.go", + "size": 2964, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/suite_test.go", + "size": 1783, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/utils_query.go", + "size": 362, + "extension": ".go" + }, + { + "path": "openmeter/streaming/clickhouse/utils_query_test.go", + "size": 319, + "extension": ".go" + }, + { + "path": "openmeter/streaming/connector.go", + "size": 4129, + "extension": ".go" + }, + { + "path": "openmeter/streaming/defaults.go", + "size": 355, + "extension": ".go" + }, + { + "path": "openmeter/streaming/eventparams.go", + "size": 5040, + "extension": ".go" + }, + { + "path": "openmeter/streaming/query_params.go", + "size": 2558, + "extension": ".go" + }, + { + "path": "openmeter/streaming/query_params_test.go", + "size": 2572, + "extension": ".go" + }, + { + "path": "openmeter/streaming/retry/retry.go", + "size": 5196, + "extension": ".go" + }, + { + "path": "openmeter/streaming/retry/retry_test.go", + "size": 6718, + "extension": ".go" + }, + { + "path": "openmeter/streaming/testutils/streaming.go", + "size": 8734, + "extension": ".go" + }, + { + "path": "openmeter/streaming/testutils/streaming_test.go", + "size": 23741, + "extension": ".go" + }, + { + "path": "openmeter/streaming/usageattribution.go", + "size": 2384, + "extension": ".go" + }, + { + "path": "openmeter/streaming/usageattribution_test.go", + "size": 8882, + "extension": ".go" + }, + { + "path": "openmeter/subject/adapter.go", + "size": 1090, + "extension": ".go" + }, + { + "path": "openmeter/subject/adapter/adapter.go", + "size": 1196, + "extension": ".go" + }, + { + "path": "openmeter/subject/adapter/subject.go", + "size": 9498, + "extension": ".go" + }, + { + "path": "openmeter/subject/httphandler/handler.go", + "size": 1590, + "extension": ".go" + }, + { + "path": "openmeter/subject/httphandler/mapping.go", + "size": 625, + "extension": ".go" + }, + { + "path": "openmeter/subject/httphandler/subject.go", + "size": 9715, + "extension": ".go" + }, + { + "path": "openmeter/subject/service.go", + "size": 2535, + "extension": ".go" + }, + { + "path": "openmeter/subject/service/hooks/customersubject.go", + "size": 6888, + "extension": ".go" + }, + { + "path": "openmeter/subject/service/hooks/customersubject_test.go", + "size": 10253, + "extension": ".go" + }, + { + "path": "openmeter/subject/service/service.go", + "size": 4041, + "extension": ".go" + }, + { + "path": "openmeter/subject/service/service_test.go", + "size": 9472, + "extension": ".go" + }, + { + "path": "openmeter/subject/subject.go", + "size": 1001, + "extension": ".go" + }, + { + "path": "openmeter/subject/testutils/env.go", + "size": 4604, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/README.md", + "size": 1080, + "extension": ".md" + }, + { + "path": "openmeter/subscription/addon/addon.go", + "size": 3191, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/addon_test.go", + "size": 6738, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/README.md", + "size": 1840, + "extension": ".md" + }, + { + "path": "openmeter/subscription/addon/diff/addon.go", + "size": 2027, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/affected.go", + "size": 1627, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/apply.go", + "size": 6361, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/apply_test.go", + "size": 35409, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/diff.go", + "size": 903, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/restore.go", + "size": 4604, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/restore_test.go", + "size": 26697, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/diff/zeroratecard.go", + "size": 1953, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/events.go", + "size": 2659, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/events_test.go", + "size": 4480, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/extend.go", + "size": 8510, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/extend_test.go", + "size": 29706, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/create.go", + "size": 3414, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/get.go", + "size": 2157, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/handler.go", + "size": 1568, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/list.go", + "size": 2192, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/mapping.go", + "size": 3843, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/http/update.go", + "size": 2867, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/instance.go", + "size": 843, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/quantity.go", + "size": 949, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/ratecard.go", + "size": 201, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/repo/mapping.go", + "size": 4510, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/repo/subscriptionaddon.go", + "size": 4973, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/repo/subscriptionaddonquantity.go", + "size": 1421, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/repo/transaction.go", + "size": 1717, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/repository.go", + "size": 1421, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/service.go", + "size": 2182, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/service/change_test.go", + "size": 8184, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/service/create_test.go", + "size": 21034, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/service/list_test.go", + "size": 8500, + "extension": ".go" + }, + { + "path": "openmeter/subscription/addon/service/service.go", + "size": 10882, + "extension": ".go" + }, + { + "path": "openmeter/subscription/annotations.go", + "size": 4092, + "extension": ".go" + }, + { + "path": "openmeter/subscription/apply.go", + "size": 2481, + "extension": ".go" + }, + { + "path": "openmeter/subscription/billing.go", + "size": 433, + "extension": ".go" + }, + { + "path": "openmeter/subscription/context.go", + "size": 422, + "extension": ".go" + }, + { + "path": "openmeter/subscription/entitlement.go", + "size": 2442, + "extension": ".go" + }, + { + "path": "openmeter/subscription/entitlement/adapter.go", + "size": 4528, + "extension": ".go" + }, + { + "path": "openmeter/subscription/entitlement/errors.go", + "size": 537, + "extension": ".go" + }, + { + "path": "openmeter/subscription/errors.go", + "size": 9345, + "extension": ".go" + }, + { + "path": "openmeter/subscription/errors_test.go", + "size": 15282, + "extension": ".go" + }, + { + "path": "openmeter/subscription/events.go", + "size": 6151, + "extension": ".go" + }, + { + "path": "openmeter/subscription/featureflag.go", + "size": 150, + "extension": ".go" + }, + { + "path": "openmeter/subscription/fielddescriptormapper.go", + "size": 2534, + "extension": ".go" + }, + { + "path": "openmeter/subscription/hook.go", + "size": 1660, + "extension": ".go" + }, + { + "path": "openmeter/subscription/hooks/annotations/hook.go", + "size": 6686, + "extension": ".go" + }, + { + "path": "openmeter/subscription/item.go", + "size": 6040, + "extension": ".go" + }, + { + "path": "openmeter/subscription/list.go", + "size": 2550, + "extension": ".go" + }, + { + "path": "openmeter/subscription/locks.go", + "size": 209, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch.go", + "size": 1268, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/additem.go", + "size": 6454, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/additem_test.go", + "size": 9466, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/addphase.go", + "size": 3485, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/patch_test.go", + "size": 7444, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/removeitem.go", + "size": 2885, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/removeitem_test.go", + "size": 7351, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/removephase.go", + "size": 3123, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/stretchphase.go", + "size": 2884, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/stretchphase_test.go", + "size": 5868, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/unscheduleedit.go", + "size": 2079, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch/unscheduleedit_test.go", + "size": 6358, + "extension": ".go" + }, + { + "path": "openmeter/subscription/patch_test.go", + "size": 1273, + "extension": ".go" + }, + { + "path": "openmeter/subscription/phase.go", + "size": 632, + "extension": ".go" + }, + { + "path": "openmeter/subscription/plan.go", + "size": 2232, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/mapping.go", + "size": 6600, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/subscriptionitemrepo.go", + "size": 6349, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/subscriptionphaserepo.go", + "size": 4049, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/subscriptionrepo.go", + "size": 8156, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/transaction.go", + "size": 2160, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repo/utils.go", + "size": 1235, + "extension": ".go" + }, + { + "path": "openmeter/subscription/repository.go", + "size": 4927, + "extension": ".go" + }, + { + "path": "openmeter/subscription/serialize_test.go", + "size": 4342, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service.go", + "size": 1844, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/service.go", + "size": 21053, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/service_test.go", + "size": 52493, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/servicevalidation.go", + "size": 4238, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/sync.go", + "size": 15480, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/sync_test.go", + "size": 16223, + "extension": ".go" + }, + { + "path": "openmeter/subscription/service/synchelpers.go", + "size": 6697, + "extension": ".go" + }, + { + "path": "openmeter/subscription/specpath.go", + "size": 3675, + "extension": ".go" + }, + { + "path": "openmeter/subscription/state.go", + "size": 3364, + "extension": ".go" + }, + { + "path": "openmeter/subscription/subscription.go", + "size": 2610, + "extension": ".go" + }, + { + "path": "openmeter/subscription/subscription_test.go", + "size": 3622, + "extension": ".go" + }, + { + "path": "openmeter/subscription/subscriptionspec.go", + "size": 37916, + "extension": ".go" + }, + { + "path": "openmeter/subscription/subscriptionspec_test.go", + "size": 4198, + "extension": ".go" + }, + { + "path": "openmeter/subscription/subscriptionview.go", + "size": 16119, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/addon.go", + "size": 4832, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/billing.go", + "size": 1239, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/builder.go", + "size": 5269, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/compare.go", + "size": 13925, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/customer.go", + "size": 3356, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/db.go", + "size": 1755, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/feature.go", + "size": 1895, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/global.go", + "size": 188, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/helpers.go", + "size": 4231, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/mock.go", + "size": 5519, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/patch.go", + "size": 1159, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/plan.go", + "size": 1928, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/ratecard.go", + "size": 4944, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/repository.go", + "size": 1986, + "extension": ".go" + }, + { + "path": "openmeter/subscription/testutils/service.go", + "size": 11359, + "extension": ".go" + }, + { + "path": "openmeter/subscription/timing.go", + "size": 5343, + "extension": ".go" + }, + { + "path": "openmeter/subscription/uniqueness.go", + "size": 9739, + "extension": ".go" + }, + { + "path": "openmeter/subscription/uniqueness_test.go", + "size": 19591, + "extension": ".go" + }, + { + "path": "openmeter/subscription/validators/customer/validator.go", + "size": 3784, + "extension": ".go" + }, + { + "path": "openmeter/subscription/validators/subscription/components.go", + "size": 2125, + "extension": ".go" + }, + { + "path": "openmeter/subscription/validators/subscription/validator.go", + "size": 6766, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/annotations.go", + "size": 520, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/errors.go", + "size": 515, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service.go", + "size": 2356, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service/addon.go", + "size": 10070, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service/addon_test.go", + "size": 28255, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service/service.go", + "size": 1398, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service/subscription.go", + "size": 11547, + "extension": ".go" + }, + { + "path": "openmeter/subscription/workflow/service/subscription_test.go", + "size": 79747, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/adapter/adapter.go", + "size": 1680, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/adapter/mapping.go", + "size": 873, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go", + "size": 4178, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/adapter/taxcode.go", + "size": 6705, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/annotations.go", + "size": 311, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/errors.go", + "size": 5279, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/namespacehandler.go", + "size": 6468, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/namespacehandler_test.go", + "size": 8837, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/repository.go", + "size": 967, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service.go", + "size": 6070, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service/organizationdefaulttaxcodes.go", + "size": 1627, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go", + "size": 11063, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service/service.go", + "size": 738, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service/taxcode.go", + "size": 5182, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/service/taxcode_test.go", + "size": 7871, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/taxcode.go", + "size": 5567, + "extension": ".go" + }, + { + "path": "openmeter/taxcode/testutils/env.go", + "size": 3474, + "extension": ".go" + }, + { + "path": "openmeter/testutils/async.go", + "size": 543, + "extension": ".go" + }, + { + "path": "openmeter/testutils/logger.go", + "size": 889, + "extension": ".go" + }, + { + "path": "openmeter/testutils/namegen.go", + "size": 735, + "extension": ".go" + }, + { + "path": "openmeter/testutils/namegen_test.go", + "size": 369, + "extension": ".go" + }, + { + "path": "openmeter/testutils/pg_driver.go", + "size": 3106, + "extension": ".go" + }, + { + "path": "openmeter/testutils/time.go", + "size": 565, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/broker.go", + "size": 3694, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/logger.go", + "size": 440, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/marshaler.go", + "size": 1225, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/metrics.go", + "size": 892, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/metrics/README.md", + "size": 648, + "extension": ".md" + }, + { + "path": "openmeter/watermill/driver/kafka/metrics/adapter.go", + "size": 5734, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/publisher.go", + "size": 1307, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/saslscram.go", + "size": 919, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/kafka/subscriber.go", + "size": 1670, + "extension": ".go" + }, + { + "path": "openmeter/watermill/driver/noop/publisher.go", + "size": 338, + "extension": ".go" + }, + { + "path": "openmeter/watermill/eventbus/eventbus.go", + "size": 4537, + "extension": ".go" + }, + { + "path": "openmeter/watermill/grouphandler/grouphandler.go", + "size": 3954, + "extension": ".go" + }, + { + "path": "openmeter/watermill/marshaler/marshaler.go", + "size": 3427, + "extension": ".go" + }, + { + "path": "openmeter/watermill/marshaler/source.go", + "size": 1099, + "extension": ".go" + }, + { + "path": "openmeter/watermill/marshaler/source_test.go", + "size": 910, + "extension": ".go" + }, + { + "path": "openmeter/watermill/nopublisher/nopublisher.go", + "size": 615, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/context.go", + "size": 493, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/errors.go", + "size": 350, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/logger.go", + "size": 1107, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/metrics.go", + "size": 6683, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/router.go", + "size": 3833, + "extension": ".go" + }, + { + "path": "openmeter/watermill/router/router_test.go", + "size": 6903, + "extension": ".go" + }, + { + "path": "pkg/clock/clock.go", + "size": 775, + "extension": ".go" + }, + { + "path": "pkg/clock/clock_test.go", + "size": 479, + "extension": ".go" + }, + { + "path": "pkg/cmpx/compare.go", + "size": 260, + "extension": ".go" + }, + { + "path": "pkg/contextx/attr.go", + "size": 597, + "extension": ".go" + }, + { + "path": "pkg/contextx/log.go", + "size": 819, + "extension": ".go" + }, + { + "path": "pkg/convert/ptr.go", + "size": 1738, + "extension": ".go" + }, + { + "path": "pkg/convert/time.go", + "size": 156, + "extension": ".go" + }, + { + "path": "pkg/currencyx/allocation.go", + "size": 8567, + "extension": ".go" + }, + { + "path": "pkg/currencyx/allocation_test.go", + "size": 11731, + "extension": ".go" + }, + { + "path": "pkg/currencyx/currency.go", + "size": 1593, + "extension": ".go" + }, + { + "path": "pkg/currencyx/currency_test.go", + "size": 810, + "extension": ".go" + }, + { + "path": "pkg/datetime/constants.go", + "size": 1165, + "extension": ".go" + }, + { + "path": "pkg/datetime/datetime.go", + "size": 3949, + "extension": ".go" + }, + { + "path": "pkg/datetime/datetime_test.go", + "size": 7243, + "extension": ".go" + }, + { + "path": "pkg/datetime/duration.go", + "size": 6810, + "extension": ".go" + }, + { + "path": "pkg/datetime/duration_test.go", + "size": 20437, + "extension": ".go" + }, + { + "path": "pkg/datetime/durationstring.go", + "size": 709, + "extension": ".go" + }, + { + "path": "pkg/datetime/errors.go", + "size": 800, + "extension": ".go" + }, + { + "path": "pkg/datetime/format.go", + "size": 902, + "extension": ".go" + }, + { + "path": "pkg/datetime/interval.go", + "size": 488, + "extension": ".go" + }, + { + "path": "pkg/datetime/parse.go", + "size": 1721, + "extension": ".go" + }, + { + "path": "pkg/datetime/parse_test.go", + "size": 5018, + "extension": ".go" + }, + { + "path": "pkg/datetime/testutils.go", + "size": 1296, + "extension": ".go" + }, + { + "path": "pkg/defaultx/default.go", + "size": 222, + "extension": ".go" + }, + { + "path": "pkg/entitydiff/diff.go", + "size": 6474, + "extension": ".go" + }, + { + "path": "pkg/entitydiff/parent.go", + "size": 909, + "extension": ".go" + }, + { + "path": "pkg/equal/equal.go", + "size": 642, + "extension": ".go" + }, + { + "path": "pkg/errorsx/errorsx.go", + "size": 929, + "extension": ".go" + }, + { + "path": "pkg/errorsx/errorsx_test.go", + "size": 1189, + "extension": ".go" + }, + { + "path": "pkg/errorsx/handler.go", + "size": 1915, + "extension": ".go" + }, + { + "path": "pkg/errorsx/helpers.go", + "size": 1255, + "extension": ".go" + }, + { + "path": "pkg/errorsx/helpers_test.go", + "size": 1239, + "extension": ".go" + }, + { + "path": "pkg/expand/expand.go", + "size": 1164, + "extension": ".go" + }, + { + "path": "pkg/featuregate/featuregate.go", + "size": 262, + "extension": ".go" + }, + { + "path": "pkg/ffx/context.go", + "size": 1513, + "extension": ".go" + }, + { + "path": "pkg/ffx/featureflag.go", + "size": 378, + "extension": ".go" + }, + { + "path": "pkg/ffx/static.go", + "size": 448, + "extension": ".go" + }, + { + "path": "pkg/filter/filter.go", + "size": 28569, + "extension": ".go" + }, + { + "path": "pkg/filter/filter_test.go", + "size": 75282, + "extension": ".go" + }, + { + "path": "pkg/framework/README.md", + "size": 2254, + "extension": ".md" + }, + { + "path": "pkg/framework/clickhouseotel/connpool.go", + "size": 5718, + "extension": ".go" + }, + { + "path": "pkg/framework/clickhouseotel/otel.go", + "size": 2979, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/decoder.go", + "size": 296, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/encoder.go", + "size": 5534, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/errors.go", + "size": 6184, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/errors_test.go", + "size": 1453, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/pagination.go", + "size": 267, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/sort.go", + "size": 515, + "extension": ".go" + }, + { + "path": "pkg/framework/commonhttp/union.go", + "size": 446, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entcursor/cursor.go", + "size": 410, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entcursor/cursor.tpl", + "size": 2281, + "extension": ".tpl" + }, + { + "path": "pkg/framework/entutils/entcursor/cursor_test.go", + "size": 2754, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entdriver/driver.go", + "size": 1356, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entexpose/entexpose.go", + "size": 410, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entexpose/expose.tpl", + "size": 3210, + "extension": ".tpl" + }, + { + "path": "pkg/framework/entutils/entmixinaccessor/entmixinaccessor.go", + "size": 431, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entmixinaccessor/mixinaccessor.tpl", + "size": 909, + "extension": ".tpl" + }, + { + "path": "pkg/framework/entutils/entpaginate/paginate.go", + "size": 416, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entpaginate/paginate.tpl", + "size": 2341, + "extension": ".tpl" + }, + { + "path": "pkg/framework/entutils/entpaginate/paginate_test.go", + "size": 3621, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entsetorclear/setorclear.go", + "size": 422, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/entsetorclear/setorclear.tpl", + "size": 1119, + "extension": ".tpl" + }, + { + "path": "pkg/framework/entutils/idorder.go", + "size": 2036, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/idorder_test.go", + "size": 4319, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/mapping.go", + "size": 767, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/mixinhelper.go", + "size": 1949, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/mixins.go", + "size": 7600, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/pgjsonb.go", + "size": 2101, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/pgulid.go", + "size": 616, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/sort.go", + "size": 626, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/client.go", + "size": 11352, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/cursor.go", + "size": 1409, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/ent.go", + "size": 16072, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go", + "size": 1979, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1.go", + "size": 4677, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1/example1.go", + "size": 2612, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1/where.go", + "size": 10849, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "size": 19674, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_delete.go", + "size": 2359, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "size": 16130, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/example1_update.go", + "size": 8813, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/expose.go", + "size": 2435, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/hook/hook.go", + "size": 5127, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "size": 3783, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go", + "size": 844, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "size": 16802, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/paginate.go", + "size": 1638, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/predicate/predicate.go", + "size": 194, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/runtime.go", + "size": 1408, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/runtime/runtime.go", + "size": 371, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/db/tx.go", + "size": 7284, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent1/entc.go", + "size": 803, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent1/generate.go", + "size": 52, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent1/schema/example1.go", + "size": 537, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/client.go", + "size": 11352, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/ent.go", + "size": 16072, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go", + "size": 1979, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2.go", + "size": 4677, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2/example2.go", + "size": 2612, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2/where.go", + "size": 10849, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "size": 19674, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_delete.go", + "size": 2359, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "size": 16130, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/example2_update.go", + "size": 8813, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/expose.go", + "size": 2435, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/hook/hook.go", + "size": 5127, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "size": 3783, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go", + "size": 844, + "extension": ".go", + "bulk": { + "category": "migration", + "framework": "rails" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "size": 16802, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/predicate/predicate.go", + "size": 194, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/runtime.go", + "size": 1408, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/runtime/runtime.go", + "size": 371, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/db/tx.go", + "size": 7284, + "extension": ".go", + "bulk": { + "category": "generated", + "framework": "go-ent" + } + }, + { + "path": "pkg/framework/entutils/testutils/ent2/entc.go", + "size": 627, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent2/generate.go", + "size": 52, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/testutils/ent2/schema/example2.go", + "size": 537, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/transaction.go", + "size": 5829, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/transaction_test.go", + "size": 12829, + "extension": ".go" + }, + { + "path": "pkg/framework/entutils/valuescanner.go", + "size": 573, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/key.go", + "size": 1096, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/locker.go", + "size": 3883, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/locker_test.go", + "size": 9056, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/session.go", + "size": 6697, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/session_test.go", + "size": 10699, + "extension": ".go" + }, + { + "path": "pkg/framework/lockr/var.go", + "size": 57, + "extension": ".go" + }, + { + "path": "pkg/framework/operation/middleware.go", + "size": 720, + "extension": ".go" + }, + { + "path": "pkg/framework/operation/middleware_test.go", + "size": 587, + "extension": ".go" + }, + { + "path": "pkg/framework/operation/operation.go", + "size": 1559, + "extension": ".go" + }, + { + "path": "pkg/framework/operation/operation_test.go", + "size": 1647, + "extension": ".go" + }, + { + "path": "pkg/framework/pgdriver/driver.go", + "size": 2587, + "extension": ".go" + }, + { + "path": "pkg/framework/tracex/tracex.go", + "size": 2032, + "extension": ".go" + }, + { + "path": "pkg/framework/transaction/context.go", + "size": 818, + "extension": ".go" + }, + { + "path": "pkg/framework/transaction/transaction.go", + "size": 2639, + "extension": ".go" + }, + { + "path": "pkg/framework/transport/httptransport/argshandler.go", + "size": 2072, + "extension": ".go" + }, + { + "path": "pkg/framework/transport/httptransport/encoder/encoder.go", + "size": 562, + "extension": ".go" + }, + { + "path": "pkg/framework/transport/httptransport/handler.go", + "size": 5620, + "extension": ".go" + }, + { + "path": "pkg/framework/transport/httptransport/options.go", + "size": 1905, + "extension": ".go" + }, + { + "path": "pkg/gosundheit/logger.go", + "size": 960, + "extension": ".go" + }, + { + "path": "pkg/hasher/hasher.go", + "size": 75, + "extension": ".go" + }, + { + "path": "pkg/hasher/xxhash.go", + "size": 117, + "extension": ".go" + }, + { + "path": "pkg/idempotency/key.go", + "size": 462, + "extension": ".go" + }, + { + "path": "pkg/kafka/config.go", + "size": 27087, + "extension": ".go" + }, + { + "path": "pkg/kafka/config_test.go", + "size": 12046, + "extension": ".go" + }, + { + "path": "pkg/kafka/kafka.go", + "size": 92, + "extension": ".go" + }, + { + "path": "pkg/kafka/log.go", + "size": 2152, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/internal/broker.go", + "size": 19350, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/internal/consumergroup.go", + "size": 3598, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/internal/partition.go", + "size": 14434, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/internal/topic.go", + "size": 10669, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/metrics.go", + "size": 9348, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/metrics_test.go", + "size": 1393, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/stats/broker.go", + "size": 5154, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/stats/consumergroup.go", + "size": 6300, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/stats/stats.go", + "size": 2853, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/stats/stats_test.go", + "size": 2895, + "extension": ".go" + }, + { + "path": "pkg/kafka/metrics/stats/testdata/stats.json", + "size": 8617, + "extension": ".json", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "pkg/kafka/metrics/stats/topic.go", + "size": 3488, + "extension": ".go" + }, + { + "path": "pkg/kafka/topicprovisioner.go", + "size": 9096, + "extension": ".go" + }, + { + "path": "pkg/kafka/topicprovisioner_test.go", + "size": 3487, + "extension": ".go" + }, + { + "path": "pkg/log/mock.go", + "size": 683, + "extension": ".go" + }, + { + "path": "pkg/log/panic.go", + "size": 2128, + "extension": ".go" + }, + { + "path": "pkg/lrux/lruitemttl.go", + "size": 2565, + "extension": ".go" + }, + { + "path": "pkg/lrux/lruitemttl_test.go", + "size": 1858, + "extension": ".go" + }, + { + "path": "pkg/models/annotation.go", + "size": 1964, + "extension": ".go" + }, + { + "path": "pkg/models/annotation_test.go", + "size": 3091, + "extension": ".go" + }, + { + "path": "pkg/models/attributes.go", + "size": 892, + "extension": ".go" + }, + { + "path": "pkg/models/cadence.go", + "size": 1909, + "extension": ".go" + }, + { + "path": "pkg/models/cadence_test.go", + "size": 6531, + "extension": ".go" + }, + { + "path": "pkg/models/cadencelist.go", + "size": 2517, + "extension": ".go" + }, + { + "path": "pkg/models/clonable.go", + "size": 62, + "extension": ".go" + }, + { + "path": "pkg/models/equaler.go", + "size": 136, + "extension": ".go" + }, + { + "path": "pkg/models/errors.go", + "size": 8358, + "extension": ".go" + }, + { + "path": "pkg/models/errors_test.go", + "size": 1640, + "extension": ".go" + }, + { + "path": "pkg/models/fielddescriptor.go", + "size": 4799, + "extension": ".go" + }, + { + "path": "pkg/models/fielddescriptor_test.go", + "size": 9618, + "extension": ".go" + }, + { + "path": "pkg/models/fieldexpression.go", + "size": 2450, + "extension": ".go" + }, + { + "path": "pkg/models/http/annotation.go", + "size": 419, + "extension": ".go" + }, + { + "path": "pkg/models/http/metadata.go", + "size": 380, + "extension": ".go" + }, + { + "path": "pkg/models/id.go", + "size": 319, + "extension": ".go" + }, + { + "path": "pkg/models/idorkey.go", + "size": 648, + "extension": ".go" + }, + { + "path": "pkg/models/key.go", + "size": 319, + "extension": ".go" + }, + { + "path": "pkg/models/metadata.go", + "size": 931, + "extension": ".go" + }, + { + "path": "pkg/models/metadata_test.go", + "size": 1374, + "extension": ".go" + }, + { + "path": "pkg/models/model.go", + "size": 5354, + "extension": ".go" + }, + { + "path": "pkg/models/percentage.go", + "size": 1667, + "extension": ".go" + }, + { + "path": "pkg/models/percentage_test.go", + "size": 489, + "extension": ".go" + }, + { + "path": "pkg/models/problem.go", + "size": 4024, + "extension": ".go" + }, + { + "path": "pkg/models/repository.go", + "size": 181, + "extension": ".go" + }, + { + "path": "pkg/models/servicehook.go", + "size": 3310, + "extension": ".go" + }, + { + "path": "pkg/models/testutils.go", + "size": 1044, + "extension": ".go" + }, + { + "path": "pkg/models/validationissue.go", + "size": 11738, + "extension": ".go" + }, + { + "path": "pkg/models/validationissue_test.go", + "size": 11311, + "extension": ".go" + }, + { + "path": "pkg/models/validator.go", + "size": 547, + "extension": ".go" + }, + { + "path": "pkg/otelx/spancontext.go", + "size": 676, + "extension": ".go" + }, + { + "path": "pkg/pagination/collect.go", + "size": 660, + "extension": ".go" + }, + { + "path": "pkg/pagination/collect_test.go", + "size": 3016, + "extension": ".go" + }, + { + "path": "pkg/pagination/page.go", + "size": 1187, + "extension": ".go" + }, + { + "path": "pkg/pagination/pagination.go", + "size": 526, + "extension": ".go" + }, + { + "path": "pkg/pagination/pagination_test.go", + "size": 766, + "extension": ".go" + }, + { + "path": "pkg/pagination/result.go", + "size": 1399, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/collect.go", + "size": 639, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/collect_test.go", + "size": 4261, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/cursor.go", + "size": 2269, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/cursor_test.go", + "size": 6491, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/pagination.go", + "size": 810, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/pagination_test.go", + "size": 1230, + "extension": ".go" + }, + { + "path": "pkg/pagination/v2/result.go", + "size": 692, + "extension": ".go" + }, + { + "path": "pkg/pglockx/pglock.go", + "size": 1170, + "extension": ".go" + }, + { + "path": "pkg/pgxpoolobserver/observer.go", + "size": 6014, + "extension": ".go" + }, + { + "path": "pkg/redis/client.go", + "size": 2542, + "extension": ".go" + }, + { + "path": "pkg/redis/config.go", + "size": 1605, + "extension": ".go" + }, + { + "path": "pkg/ref/ref.go", + "size": 617, + "extension": ".go" + }, + { + "path": "pkg/server/attributes.go", + "size": 924, + "extension": ".go" + }, + { + "path": "pkg/server/logger.go", + "size": 1480, + "extension": ".go" + }, + { + "path": "pkg/server/middleware.go", + "size": 159, + "extension": ".go" + }, + { + "path": "pkg/server/poweredby.go", + "size": 502, + "extension": ".go" + }, + { + "path": "pkg/server/poweredby_test.go", + "size": 599, + "extension": ".go" + }, + { + "path": "pkg/set/set.go", + "size": 1693, + "extension": ".go" + }, + { + "path": "pkg/set/set_test.go", + "size": 2182, + "extension": ".go" + }, + { + "path": "pkg/slicesx/diff.go", + "size": 1258, + "extension": ".go" + }, + { + "path": "pkg/slicesx/diff_test.go", + "size": 1271, + "extension": ".go" + }, + { + "path": "pkg/slicesx/each.go", + "size": 235, + "extension": ".go" + }, + { + "path": "pkg/slicesx/each_test.go", + "size": 1456, + "extension": ".go" + }, + { + "path": "pkg/slicesx/empty.go", + "size": 315, + "extension": ".go" + }, + { + "path": "pkg/slicesx/groupby.go", + "size": 344, + "extension": ".go" + }, + { + "path": "pkg/slicesx/iteratee.go", + "size": 133, + "extension": ".go" + }, + { + "path": "pkg/slicesx/last.go", + "size": 300, + "extension": ".go" + }, + { + "path": "pkg/slicesx/map.go", + "size": 887, + "extension": ".go" + }, + { + "path": "pkg/slicesx/map_test.go", + "size": 292, + "extension": ".go" + }, + { + "path": "pkg/slicesx/normalize.go", + "size": 166, + "extension": ".go" + }, + { + "path": "pkg/slicesx/normalize_test.go", + "size": 331, + "extension": ".go" + }, + { + "path": "pkg/slicesx/slice.go", + "size": 151, + "extension": ".go" + }, + { + "path": "pkg/sortx/order.go", + "size": 388, + "extension": ".go" + }, + { + "path": "pkg/statelessx/actions.go", + "size": 1225, + "extension": ".go" + }, + { + "path": "pkg/statelessx/conditions.go", + "size": 249, + "extension": ".go" + }, + { + "path": "pkg/strcase/strcase.go", + "size": 633, + "extension": ".go" + }, + { + "path": "pkg/strcase/strcase_test.go", + "size": 1934, + "extension": ".go" + }, + { + "path": "pkg/timeutil/boundary.go", + "size": 776, + "extension": ".go" + }, + { + "path": "pkg/timeutil/boundedperiod.go", + "size": 1211, + "extension": ".go" + }, + { + "path": "pkg/timeutil/closedperiod.go", + "size": 2999, + "extension": ".go" + }, + { + "path": "pkg/timeutil/closedperiod_test.go", + "size": 7785, + "extension": ".go" + }, + { + "path": "pkg/timeutil/compare.go", + "size": 92, + "extension": ".go" + }, + { + "path": "pkg/timeutil/openperiod.go", + "size": 6939, + "extension": ".go" + }, + { + "path": "pkg/timeutil/openperiod_test.go", + "size": 25338, + "extension": ".go" + }, + { + "path": "pkg/timeutil/period.go", + "size": 274, + "extension": ".go" + }, + { + "path": "pkg/timeutil/recurrence.go", + "size": 9099, + "extension": ".go" + }, + { + "path": "pkg/timeutil/recurrence_test.go", + "size": 12456, + "extension": ".go" + }, + { + "path": "pkg/timeutil/timeline.go", + "size": 3652, + "extension": ".go" + }, + { + "path": "pkg/timeutil/timeline_test.go", + "size": 4957, + "extension": ".go" + }, + { + "path": "pkg/treex/errors.go", + "size": 388, + "extension": ".go" + }, + { + "path": "pkg/treex/node.go", + "size": 2772, + "extension": ".go" + }, + { + "path": "pkg/treex/node_test.go", + "size": 4029, + "extension": ".go" + }, + { + "path": "pkg/treex/tree.go", + "size": 2339, + "extension": ".go" + }, + { + "path": "pkg/treex/tree_test.go", + "size": 4910, + "extension": ".go" + }, + { + "path": "pkg/treex/usage_example_test.go", + "size": 4248, + "extension": ".go" + }, + { + "path": "quickstart/.gitignore", + "size": 29, + "extension": "" + }, + { + "path": "quickstart/Makefile", + "size": 1117, + "extension": "" + }, + { + "path": "quickstart/README.md", + "size": 3407, + "extension": ".md" + }, + { + "path": "quickstart/config.yaml", + "size": 2299, + "extension": ".yaml" + }, + { + "path": "quickstart/docker-compose.debug-ports.yaml", + "size": 461, + "extension": ".yaml" + }, + { + "path": "quickstart/docker-compose.yaml", + "size": 3778, + "extension": ".yaml" + }, + { + "path": "quickstart/quickstart_test.go", + "size": 6627, + "extension": ".go" + }, + { + "path": "test/app/app_test.go", + "size": 827, + "extension": ".go" + }, + { + "path": "test/app/custominvoicing/event_test.go", + "size": 2048, + "extension": ".go" + }, + { + "path": "test/app/custominvoicing/invocing_test.go", + "size": 13014, + "extension": ".go" + }, + { + "path": "test/app/marketplace.go", + "size": 2734, + "extension": ".go" + }, + { + "path": "test/app/stripe/app_test.go", + "size": 1527, + "extension": ".go" + }, + { + "path": "test/app/stripe/appstripe.go", + "size": 30766, + "extension": ".go" + }, + { + "path": "test/app/stripe/fixture.go", + "size": 3910, + "extension": ".go" + }, + { + "path": "test/app/stripe/invoice_credits_test.go", + "size": 14585, + "extension": ".go" + }, + { + "path": "test/app/stripe/invoice_test.go", + "size": 51679, + "extension": ".go" + }, + { + "path": "test/app/stripe/secret_mock.go", + "size": 2815, + "extension": ".go" + }, + { + "path": "test/app/stripe/stripe_mock.go", + "size": 5928, + "extension": ".go" + }, + { + "path": "test/app/stripe/testenv.go", + "size": 6134, + "extension": ".go" + }, + { + "path": "test/app/testenv.go", + "size": 8531, + "extension": ".go" + }, + { + "path": "test/billing/adapter_test.go", + "size": 28770, + "extension": ".go" + }, + { + "path": "test/billing/collection_config_test.go", + "size": 1024, + "extension": ".go" + }, + { + "path": "test/billing/collection_test.go", + "size": 31838, + "extension": ".go" + }, + { + "path": "test/billing/customeroverride_test.go", + "size": 20977, + "extension": ".go" + }, + { + "path": "test/billing/discount_test.go", + "size": 15951, + "extension": ".go" + }, + { + "path": "test/billing/event_test.go", + "size": 1513, + "extension": ".go" + }, + { + "path": "test/billing/invoice_test.go", + "size": 158096, + "extension": ".go" + }, + { + "path": "test/billing/lineengine_test.go", + "size": 50322, + "extension": ".go" + }, + { + "path": "test/billing/profile.go", + "size": 1455, + "extension": ".go" + }, + { + "path": "test/billing/profile_test.go", + "size": 15990, + "extension": ".go" + }, + { + "path": "test/billing/schemamigration_test.go", + "size": 11163, + "extension": ".go" + }, + { + "path": "test/billing/subscription_suite.go", + "size": 11705, + "extension": ".go" + }, + { + "path": "test/billing/subscription_test.go", + "size": 12112, + "extension": ".go" + }, + { + "path": "test/billing/suite.go", + "size": 24593, + "extension": ".go" + }, + { + "path": "test/billing/tax_test.go", + "size": 11611, + "extension": ".go" + }, + { + "path": "test/billing/taxcode_dual_write_test.go", + "size": 35206, + "extension": ".go" + }, + { + "path": "test/billing/ubpflatfee_test.go", + "size": 7939, + "extension": ".go" + }, + { + "path": "test/credits/base.go", + "size": 26992, + "extension": ".go" + }, + { + "path": "test/credits/credit_then_invoice_test.go", + "size": 226970, + "extension": ".go" + }, + { + "path": "test/credits/creditgrant_test.go", + "size": 21263, + "extension": ".go" + }, + { + "path": "test/credits/rating_test.go", + "size": 4662, + "extension": ".go" + }, + { + "path": "test/credits/sanity_lifecycle_test.go", + "size": 32322, + "extension": ".go" + }, + { + "path": "test/credits/sanity_test.go", + "size": 187209, + "extension": ".go" + }, + { + "path": "test/customer/customer.go", + "size": 45459, + "extension": ".go" + }, + { + "path": "test/customer/customer_test.go", + "size": 1779, + "extension": ".go" + }, + { + "path": "test/customer/subject.go", + "size": 14944, + "extension": ".go" + }, + { + "path": "test/customer/testenv.go", + "size": 16952, + "extension": ".go" + }, + { + "path": "test/entitlement/regression/framework_test.go", + "size": 9106, + "extension": ".go" + }, + { + "path": "test/entitlement/regression/scenario_test.go", + "size": 23189, + "extension": ".go" + }, + { + "path": "test/notification/channel.go", + "size": 7065, + "extension": ".go" + }, + { + "path": "test/notification/consumer_balance.go", + "size": 21328, + "extension": ".go" + }, + { + "path": "test/notification/event.go", + "size": 12624, + "extension": ".go" + }, + { + "path": "test/notification/helpers.go", + "size": 1138, + "extension": ".go" + }, + { + "path": "test/notification/notification_test.go", + "size": 3651, + "extension": ".go" + }, + { + "path": "test/notification/repository.go", + "size": 6478, + "extension": ".go" + }, + { + "path": "test/notification/rule.go", + "size": 9961, + "extension": ".go" + }, + { + "path": "test/notification/testenv.go", + "size": 7572, + "extension": ".go" + }, + { + "path": "test/notification/webhook.go", + "size": 8748, + "extension": ".go" + }, + { + "path": "test/subscription/framework_test.go", + "size": 7727, + "extension": ".go" + }, + { + "path": "test/subscription/scenario_editaligned_test.go", + "size": 7179, + "extension": ".go" + }, + { + "path": "test/subscription/scenario_editcancel_test.go", + "size": 7317, + "extension": ".go" + }, + { + "path": "test/subscription/scenario_entinnextphase_test.go", + "size": 5701, + "extension": ".go" + }, + { + "path": "test/subscription/scenario_firstofmonth_test.go", + "size": 15503, + "extension": ".go" + }, + { + "path": "tools/migrate/README.md", + "size": 281, + "extension": ".md" + }, + { + "path": "tools/migrate/cmd/viewgen/main.go", + "size": 522, + "extension": ".go" + }, + { + "path": "tools/migrate/dedupe_tax_codes_by_app_mapping_test.go", + "size": 21742, + "extension": ".go" + }, + { + "path": "tools/migrate/feature_advanced_meter_group_by_filters_test.go", + "size": 7124, + "extension": ".go" + }, + { + "path": "tools/migrate/feature_meter_id_test.go", + "size": 5827, + "extension": ".go" + }, + { + "path": "tools/migrate/flatfee_runs_test.go", + "size": 6540, + "extension": ".go" + }, + { + "path": "tools/migrate/fs.go", + "size": 1336, + "extension": ".go" + }, + { + "path": "tools/migrate/fs_test.go", + "size": 1545, + "extension": ".go" + }, + { + "path": "tools/migrate/generate-sqlc-testdata.sh", + "size": 3295, + "extension": ".sh" + }, + { + "path": "tools/migrate/ledger_tax_behavior_test.go", + "size": 3024, + "extension": ".go" + }, + { + "path": "tools/migrate/llmcost_normalize_providers_test.go", + "size": 10063, + "extension": ".go" + }, + { + "path": "tools/migrate/migrate.go", + "size": 5735, + "extension": ".go" + }, + { + "path": "tools/migrate/migrate_test.go", + "size": 4867, + "extension": ".go" + }, + { + "path": "tools/migrate/migrations/20240826120919_init.down.sql", + "size": 5027, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240826120919_init.up.sql", + "size": 11921, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql", + "size": 162, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql", + "size": 216, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240917172257_billing-entities.down.sql", + "size": 2188, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240917172257_billing-entities.up.sql", + "size": 6038, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240918204720_customer.down.sql", + "size": 2205, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240918204720_customer.up.sql", + "size": 4015, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240919144910_customer-timezone.down.sql", + "size": 85, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240919144910_customer-timezone.up.sql", + "size": 98, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql", + "size": 3777, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql", + "size": 3928, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql", + "size": 243, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql", + "size": 146, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql", + "size": 903, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql", + "size": 918, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240924164504_billing-profile.down.sql", + "size": 2608, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240924164504_billing-profile.up.sql", + "size": 3142, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql", + "size": 869, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql", + "size": 2129, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql", + "size": 369, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql", + "size": 450, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241013151355_apps.down.sql", + "size": 1782, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241013151355_apps.up.sql", + "size": 4464, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql", + "size": 302, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql", + "size": 368, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql", + "size": 119, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql", + "size": 142, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241021124045_billing-profile.down.sql", + "size": 1780, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241021124045_billing-profile.up.sql", + "size": 2042, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql", + "size": 5426, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql", + "size": 6512, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql", + "size": 102, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql", + "size": 109, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241102151321_customer_filters.down.sql", + "size": 406, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241102151321_customer_filters.up.sql", + "size": 495, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql", + "size": 642, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql", + "size": 1458, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241105171821_plan.down.sql", + "size": 2086, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241105171821_plan.up.sql", + "size": 4675, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108055754_plan.down.sql", + "size": 300, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108055754_plan.up.sql", + "size": 312, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql", + "size": 2073, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql", + "size": 2779, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql", + "size": 3253, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql", + "size": 3022, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119131528_plan.down.sql", + "size": 668, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119131528_plan.up.sql", + "size": 692, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119154436_plan.down.sql", + "size": 285, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119154436_plan.up.sql", + "size": 297, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql", + "size": 941, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql", + "size": 966, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241120145625_billing-discounts.down.sql", + "size": 1545, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241120145625_billing-discounts.up.sql", + "size": 2620, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241121145549_billing-totals.down.sql", + "size": 709, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241121145549_billing-totals.up.sql", + "size": 994, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql", + "size": 163, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql", + "size": 166, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241204162012_subscriptions.down.sql", + "size": 2684, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241204162012_subscriptions.up.sql", + "size": 5353, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql", + "size": 281, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql", + "size": 329, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241209085334_subscription_fields.down.sql", + "size": 799, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241209085334_subscription_fields.up.sql", + "size": 586, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql", + "size": 238, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql", + "size": 295, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql", + "size": 610, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql", + "size": 1094, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql", + "size": 144, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql", + "size": 157, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql", + "size": 173, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql", + "size": 266, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql", + "size": 479, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql", + "size": 561, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql", + "size": 272, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql", + "size": 392, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql", + "size": 1179, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql", + "size": 853, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql", + "size": 237, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql", + "size": 219, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql", + "size": 339, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql", + "size": 348, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql", + "size": 869, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql", + "size": 1777, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql", + "size": 145, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql", + "size": 183, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql", + "size": 111, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql", + "size": 553, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql", + "size": 503, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql", + "size": 1157, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql", + "size": 258, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql", + "size": 284, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql", + "size": 388, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql", + "size": 390, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql", + "size": 440, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250130034713_customer_key.down.sql", + "size": 475, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250130034713_customer_key.up.sql", + "size": 665, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql", + "size": 104, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql", + "size": 111, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql", + "size": 110, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql", + "size": 117, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql", + "size": 1299, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql", + "size": 1299, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203131553_plan-alignment.down.sql", + "size": 89, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203131553_plan-alignment.up.sql", + "size": 110, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql", + "size": 110, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql", + "size": 123, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql", + "size": 105, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql", + "size": 126, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql", + "size": 118, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql", + "size": 121, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql", + "size": 387, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql", + "size": 477, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql", + "size": 2514, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql", + "size": 2732, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql", + "size": 355, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql", + "size": 375, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql", + "size": 89, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql", + "size": 1337, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql", + "size": 505, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql", + "size": 763, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql", + "size": 1265, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql", + "size": 1066, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250305025807_add_meter_table.down.sql", + "size": 123, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250305025807_add_meter_table.up.sql", + "size": 738, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250306040407_resource_meter.down.sql", + "size": 960, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250306040407_resource_meter.up.sql", + "size": 1629, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql", + "size": 98, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql", + "size": 99, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql", + "size": 711, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql", + "size": 608, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql", + "size": 95, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql", + "size": 199, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325114848_annotations.down.sql", + "size": 94, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325114848_annotations.up.sql", + "size": 95, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql", + "size": 329, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql", + "size": 691, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql", + "size": 115, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql", + "size": 94, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql", + "size": 118, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql", + "size": 173, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql", + "size": 98, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql", + "size": 99, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql", + "size": 100, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql", + "size": 81, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql", + "size": 104, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql", + "size": 105, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql", + "size": 544, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql", + "size": 313, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250404105832_addon.down.sql", + "size": 1490, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250404105832_addon.up.sql", + "size": 3465, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql", + "size": 119, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql", + "size": 120, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql", + "size": 84, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql", + "size": 118, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql", + "size": 125, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql", + "size": 247, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql", + "size": 285, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql", + "size": 546, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql", + "size": 234, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql", + "size": 155, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql", + "size": 158, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql", + "size": 2571, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql", + "size": 5802, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql", + "size": 2241, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql", + "size": 2817, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql", + "size": 171, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql", + "size": 1096, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql", + "size": 100, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql", + "size": 182, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250415105134_plan_addons.down.sql", + "size": 509, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250415105134_plan_addons.up.sql", + "size": 1336, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250415143130_subs-annotations.down.sql", + "size": 106, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250415143130_subs-annotations.up.sql", + "size": 107, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql", + "size": 2684, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql", + "size": 200, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql", + "size": 794, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql", + "size": 2092, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql", + "size": 139, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql", + "size": 208, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql", + "size": 561, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql", + "size": 594, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql", + "size": 868, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql", + "size": 989, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql", + "size": 9, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql", + "size": 671, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql", + "size": 146, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql", + "size": 196, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql", + "size": 113, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql", + "size": 441, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250522155754_billing-line-index.down.sql", + "size": 138, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250522155754_billing-line-index.up.sql", + "size": 140, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql", + "size": 164, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql", + "size": 156, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql", + "size": 599, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql", + "size": 106, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql", + "size": 110, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql", + "size": 1451, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql", + "size": 2028, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql", + "size": 84, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql", + "size": 8736, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250606115858_subject_create.down.sql", + "size": 379, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250606115858_subject_create.up.sql", + "size": 960, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250606115859_subject_namespace.down.sql", + "size": 654, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250606115859_subject_namespace.up.sql", + "size": 688, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql", + "size": 1004, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql", + "size": 2755, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql", + "size": 1462, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql", + "size": 250, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql", + "size": 4142, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql", + "size": 99, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql", + "size": 378, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250618194112_remove_app_default.down.sql", + "size": 329, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250618194112_remove_app_default.up.sql", + "size": 217, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql", + "size": 119, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql", + "size": 80, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql", + "size": 135, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql", + "size": 96, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql", + "size": 104, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql", + "size": 489, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql", + "size": 249, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql", + "size": 296, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250711121333_customer_annotations.down.sql", + "size": 193, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250711121333_customer_annotations.up.sql", + "size": 228, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql", + "size": 8927, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql", + "size": 914, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql", + "size": 206, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql", + "size": 19654, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql", + "size": 103, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql", + "size": 116, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql", + "size": 278, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250818081817_subscription-period.down.sql", + "size": 382, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250818081817_subscription-period.up.sql", + "size": 938, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql", + "size": 147, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql", + "size": 1641, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql", + "size": 750, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql", + "size": 1420, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql", + "size": 106, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql", + "size": 134, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250908130504_customer-indexes.down.sql", + "size": 536, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250908130504_customer-indexes.up.sql", + "size": 677, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql", + "size": 341, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql", + "size": 357, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250924131607_subject-index.down.sql", + "size": 232, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250924131607_subject-index.up.sql", + "size": 386, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250925160650_grant-annotations.down.sql", + "size": 178, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250925160650_grant-annotations.up.sql", + "size": 491, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql", + "size": 135, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql", + "size": 128, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250926145502_grant-annotations.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250926145502_grant-annotations.up.sql", + "size": 159, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql", + "size": 264, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql", + "size": 106, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql", + "size": 696, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql", + "size": 570, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql", + "size": 743, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql", + "size": 849, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql", + "size": 1020, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql", + "size": 483, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql", + "size": 366, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql", + "size": 268, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql", + "size": 270, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql", + "size": 213, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql", + "size": 252, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql", + "size": 382, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql", + "size": 474, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql", + "size": 644, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql", + "size": 111, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251121083843_meter_annotations.down.sql", + "size": 178, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251121083843_meter_annotations.up.sql", + "size": 210, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql", + "size": 120, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql", + "size": 127, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql", + "size": 131, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql", + "size": 123, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251211145809_meter_event_type.down.sql", + "size": 114, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251211145809_meter_event_type.up.sql", + "size": 147, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql", + "size": 809, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql", + "size": 1457, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql", + "size": 198, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql", + "size": 288, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql", + "size": 251, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql", + "size": 357, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260112160815_detailed-lines.down.sql", + "size": 2876, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260112160815_detailed-lines.up.sql", + "size": 6328, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql", + "size": 162, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql", + "size": 317, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql", + "size": 84, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql", + "size": 4313, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260220092326_tax-code.down.sql", + "size": 586, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260220092326_tax-code.up.sql", + "size": 1146, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260224121149_charges.down.sql", + "size": 4277, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260224121149_charges.up.sql", + "size": 8866, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260225160541_billing-credits.down.sql", + "size": 558, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260225160541_billing-credits.up.sql", + "size": 5929, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql", + "size": 1089, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql", + "size": 2297, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql", + "size": 5133, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql", + "size": 7075, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303233513_llmcost_add.down.sql", + "size": 637, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260303233513_llmcost_add.up.sql", + "size": 1701, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql", + "size": 2766, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql", + "size": 3460, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql", + "size": 557, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql", + "size": 1012, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql", + "size": 11595, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql", + "size": 9185, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165258_ledger.down.sql", + "size": 4407, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165258_ledger.up.sql", + "size": 9338, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql", + "size": 701, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql", + "size": 1230, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql", + "size": 1496, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql", + "size": 3275, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql", + "size": 1447, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql", + "size": 578, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql", + "size": 3221, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql", + "size": 7361, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql", + "size": 1529, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql", + "size": 3008, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql", + "size": 2922, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql", + "size": 5266, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260320084936_charges-state-details.down.sql", + "size": 911, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260320084936_charges-state-details.up.sql", + "size": 1297, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql", + "size": 487, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql", + "size": 988, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql", + "size": 119, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql", + "size": 122, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260323141807_add-feature-description.down.sql", + "size": 86, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260323141807_add-feature-description.up.sql", + "size": 99, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql", + "size": 119, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql", + "size": 152, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql", + "size": 8238, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql", + "size": 11694, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql", + "size": 184, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql", + "size": 278, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql", + "size": 217, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql", + "size": 5520, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql", + "size": 141, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql", + "size": 154, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql", + "size": 1228, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql", + "size": 1641, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql", + "size": 141, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql", + "size": 159, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql", + "size": 519, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql", + "size": 882, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql", + "size": 191, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql", + "size": 226, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql", + "size": 107, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql", + "size": 144, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql", + "size": 1564, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql", + "size": 2969, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql", + "size": 106, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql", + "size": 277, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql", + "size": 1071, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql", + "size": 1977, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql", + "size": 344, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql", + "size": 498, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql", + "size": 2759, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql", + "size": 7229, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql", + "size": 700, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql", + "size": 1353, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql", + "size": 1599, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql", + "size": 1407, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql", + "size": 131, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql", + "size": 138, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql", + "size": 522, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql", + "size": 1350, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql", + "size": 2417, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql", + "size": 3044, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql", + "size": 127, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql", + "size": 831, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql", + "size": 192, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql", + "size": 223, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260502093117_distributed_locks.down.sql", + "size": 40, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260502093117_distributed_locks.up.sql", + "size": 345, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql", + "size": 409, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql", + "size": 1144, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql", + "size": 610, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql", + "size": 1693, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql", + "size": 198, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql", + "size": 309, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql", + "size": 1167, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql", + "size": 1194, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql", + "size": 105, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql", + "size": 333, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql", + "size": 18838, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql", + "size": 20548, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql", + "size": 1394, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql", + "size": 1361, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql", + "size": 1290, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql", + "size": 1290, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql", + "size": 108, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql", + "size": 268, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql", + "size": 476, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql", + "size": 485, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql", + "size": 277, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql", + "size": 400, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql", + "size": 1528, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql", + "size": 2903, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql", + "size": 0, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql", + "size": 80, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql", + "size": 325, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql", + "size": 7333, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql", + "size": 551, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql", + "size": 134, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql", + "size": 557, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql", + "size": 8440, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql", + "size": 151, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql", + "size": 143, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql", + "size": 250, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql", + "size": 254, + "extension": ".sql", + "bulk": { + "category": "migration", + "framework": "sql" + } + }, + { + "path": "tools/migrate/productcatalog_test.go", + "size": 30088, + "extension": ".go" + }, + { + "path": "tools/migrate/testdata/ignore/20240826120919_init.down.sql", + "size": 247, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/ignore/20240826120919_init.up.sql", + "size": 696, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.down.sql", + "size": 182, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.up.sql", + "size": 236, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/ignore/20240917172257_billing-entities.down.sql", + "size": 2188, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/ignore/20240917172257_billing-entities.up.sql", + "size": 6038, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240826120919_init.down.sql", + "size": 5027, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240826120919_init.up.sql", + "size": 11921, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.down.sql", + "size": 162, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.up.sql", + "size": 216, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240917172257_billing-entities.down.sql", + "size": 2188, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/noignore/20240917172257_billing-entities.up.sql", + "size": 6038, + "extension": ".sql", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/testdata/sqlcgen/README.md", + "size": 4344, + "extension": ".md", + "bulk": { + "category": "fixture", + "framework": "-" + } + }, + { + "path": "tools/migrate/view_parity_test.go", + "size": 7124, + "extension": ".go" + }, + { + "path": "tools/migrate/viewgen/viewgen.go", + "size": 2648, + "extension": ".go" + }, + { + "path": "tools/migrate/views.sql", + "size": 1647, + "extension": ".sql" + }, + { + "path": "tools/wait-for-compose.sh", + "size": 1937, + "extension": ".sh" + } + ], + "token_counts": { + ".codex/agents/archie-analysis.toml": 121, + ".codex/rules/archie.rules": 3085, + ".dockerignore": 26, + ".editorconfig": 88, + ".gitignore": 185, + "AGENTS.md": 5636, + "CLAUDE.md": 20, + "CODE_OF_CONDUCT.md": 856, + "CONTRIBUTING.md": 891, + "Dockerfile": 930, + "LICENSE": 2839, + "Makefile": 3271, + "README.md": 1549, + "SECURITY.md": 394, + "api/api.gen.go": 242600, + "api/api.go": 32, + "api/client/go/README.md": 297, + "api/client/go/client.go": 584, + "api/client/go/client_test.go": 2283, + "api/client/go/codegen.yaml": 96, + "api/client/go/error.go": 179, + "api/client/javascript/.gitignore": 94, + "api/client/javascript/Makefile": 364, + "api/client/javascript/README.md": 5761, + "api/client/javascript/biome.json": 365, + "api/client/javascript/index.ts": 9, + "api/client/javascript/orval.config.ts": 204, + "api/client/javascript/package.json": 832, + "api/client/javascript/patches/openapi-typescript.patch": 148019, + "api/client/javascript/pnpm-lock.yaml": 26557, + "api/client/javascript/pnpm-workspace.yaml": 18, + "api/client/javascript/scripts/add-as-const.ts": 162, + "api/client/javascript/scripts/generate.ts": 405, + "api/client/javascript/src/client/addons.ts": 836, + "api/client/javascript/src/client/apps.ts": 2168, + "api/client/javascript/src/client/billing.ts": 3673, + "api/client/javascript/src/client/common.ts": 399, + "api/client/javascript/src/client/customers.ts": 5069, + "api/client/javascript/src/client/debug.ts": 183, + "api/client/javascript/src/client/entitlements.ts": 3861, + "api/client/javascript/src/client/events.spec.ts": 660, + "api/client/javascript/src/client/events.ts": 864, + "api/client/javascript/src/client/features.ts": 592, + "api/client/javascript/src/client/index.ts": 777, + "api/client/javascript/src/client/info.ts": 287, + "api/client/javascript/src/client/meters.ts": 1399, + "api/client/javascript/src/client/notifications.ts": 2261, + "api/client/javascript/src/client/plans.ts": 1867, + "api/client/javascript/src/client/portal.ts": 412, + "api/client/javascript/src/client/subjects.ts": 640, + "api/client/javascript/src/client/subscription-addons.ts": 738, + "api/client/javascript/src/client/subscriptions.ts": 1350, + "api/client/javascript/src/client/utils.ts": 590, + "api/client/javascript/src/portal/index.ts": 713, + "api/client/javascript/src/react/context.tsx": 184, + "api/client/javascript/src/zod/index.ts": 234207, + "api/client/javascript/tsconfig.json": 171, + "api/client/javascript/vitest.config.ts": 22, + "api/client/node/README.md": 21, + "api/client/python/.gitignore": 41, + "api/client/python/MANIFEST.in": 30, + "api/client/python/Makefile": 139, + "api/client/python/README.md": 10846, + "api/client/python/examples/README.md": 129, + "api/client/python/examples/async/customer.py": 706, + "api/client/python/examples/async/entitlement.py": 1005, + "api/client/python/examples/async/ingest.py": 299, + "api/client/python/examples/async/query.py": 423, + "api/client/python/examples/async/subscription.py": 747, + "api/client/python/examples/pyproject.toml": 88, + "api/client/python/examples/pyrightconfig.json": 16, + "api/client/python/examples/sync/customer.py": 640, + "api/client/python/examples/sync/entitlement.py": 922, + "api/client/python/examples/sync/ingest.py": 261, + "api/client/python/examples/sync/query.py": 376, + "api/client/python/examples/sync/subscription.py": 684, + "api/client/python/openmeter/__init__.py": 20, + "api/client/python/openmeter/_client.py": 228, + "api/client/python/openmeter/_commit.py": 10, + "api/client/python/openmeter/_generated/__init__.py": 144, + "api/client/python/openmeter/_generated/_client.py": 3421, + "api/client/python/openmeter/_generated/_configuration.py": 322, + "api/client/python/openmeter/_generated/_patch.py": 128, + "api/client/python/openmeter/_generated/_types.py": 1092, + "api/client/python/openmeter/_generated/_utils/__init__.py": 0, + "api/client/python/openmeter/_generated/_utils/model_base.py": 13724, + "api/client/python/openmeter/_generated/_utils/serialization.py": 20483, + "api/client/python/openmeter/_generated/_version.py": 8, + "api/client/python/openmeter/_generated/aio/__init__.py": 130, + "api/client/python/openmeter/_generated/aio/_client.py": 3489, + "api/client/python/openmeter/_generated/aio/_configuration.py": 324, + "api/client/python/openmeter/_generated/aio/_patch.py": 128, + "api/client/python/openmeter/_generated/aio/operations/__init__.py": 977, + "api/client/python/openmeter/_generated/aio/operations/_operations.py": 225205, + "api/client/python/openmeter/_generated/aio/operations/_patch.py": 128, + "api/client/python/openmeter/_generated/models/__init__.py": 5734, + "api/client/python/openmeter/_generated/models/_enums.py": 6754, + "api/client/python/openmeter/_generated/models/_models.py": 167932, + "api/client/python/openmeter/_generated/models/_patch.py": 128, + "api/client/python/openmeter/_generated/operations/__init__.py": 977, + "api/client/python/openmeter/_generated/operations/_patch.py": 128, + "api/client/python/openmeter/_types.py": 1092, + "api/client/python/openmeter/_version.py": 8, + "api/client/python/openmeter/aio/__init__.py": 142, + "api/client/python/openmeter/aio/_client.py": 229, + "api/client/python/openmeter/aio/operations/__init__.py": 223, + "api/client/python/openmeter/models/__init__.py": 219, + "api/client/python/openmeter/operations/__init__.py": 214, + "api/client/python/openmeter/py.typed": 6, + "api/client/python/pyproject.toml": 220, + "api/client/python/scripts/release.sh": 424, + "api/client/web/README.md": 21, + "api/codegen.yaml": 130, + "api/convert.gen.go": 142, + "api/convert.go": 149, + "api/openapi.cloud.yaml": 248587, + "api/spec/.gitignore": 21, + "api/spec/Makefile": 461, + "api/spec/README.md": 350, + "api/spec/package.json": 430, + "api/spec/packages/aip/common/definitions/aip_filters.yaml": 2689, + "api/spec/packages/aip/common/definitions/errors.yaml": 4880, + "api/spec/packages/aip/common/definitions/konnect_properties.yaml": 827, + "api/spec/packages/aip/common/definitions/metadatas.yaml": 1704, + "api/spec/packages/aip/common/definitions/properties.yaml": 636, + "api/spec/packages/aip/common/definitions/security.yaml": 513, + "api/spec/packages/aip/lib/index.js": 249, + "api/spec/packages/aip/lib/rules/casing.js": 699, + "api/spec/packages/aip/lib/rules/composition-over-inheritance.js": 401, + "api/spec/packages/aip/lib/rules/docs.js": 1392, + "api/spec/packages/aip/lib/rules/field-prefix.js": 455, + "api/spec/packages/aip/lib/rules/friendly-name.js": 523, + "api/spec/packages/aip/lib/rules/no-nullable.js": 184, + "api/spec/packages/aip/lib/rules/operation-id.js": 248, + "api/spec/packages/aip/lib/rules/operation-summary.js": 173, + "api/spec/packages/aip/lib/rules/utils.js": 876, + "api/spec/packages/aip/package.json": 377, + "api/spec/packages/aip/scripts/apply-doc-fixes.mjs": 447, + "api/spec/packages/aip/scripts/flatten-allof.mjs": 785, + "api/spec/packages/aip/scripts/seal-object-schemas.mjs": 939, + "api/spec/packages/aip/src/apps/app.tsp": 523, + "api/spec/packages/aip/src/apps/catalog.tsp": 204, + "api/spec/packages/aip/src/apps/customer.tsp": 374, + "api/spec/packages/aip/src/apps/external_invoicing.tsp": 519, + "api/spec/packages/aip/src/apps/index.tsp": 44, + "api/spec/packages/aip/src/apps/operations.tsp": 204, + "api/spec/packages/aip/src/apps/sandbox.tsp": 47, + "api/spec/packages/aip/src/apps/stripe.tsp": 4144, + "api/spec/packages/aip/src/billing/index.tsp": 23, + "api/spec/packages/aip/src/billing/operations.tsp": 543, + "api/spec/packages/aip/src/billing/profile.tsp": 2393, + "api/spec/packages/aip/src/billing/tax.tsp": 587, + "api/spec/packages/aip/src/billing/totals.tsp": 418, + "api/spec/packages/aip/src/common/error.tsp": 718, + "api/spec/packages/aip/src/common/pagination.tsp": 647, + "api/spec/packages/aip/src/common/parameters.tsp": 1700, + "api/spec/packages/aip/src/common/properties.tsp": 186, + "api/spec/packages/aip/src/currencies/cost-bases/cost-basis.tsp": 247, + "api/spec/packages/aip/src/currencies/cost-bases/operations.tsp": 439, + "api/spec/packages/aip/src/currencies/currency.tsp": 739, + "api/spec/packages/aip/src/currencies/index.tsp": 22, + "api/spec/packages/aip/src/currencies/operations.tsp": 519, + "api/spec/packages/aip/src/customers/billing.tsp": 156, + "api/spec/packages/aip/src/customers/charges/charges.tsp": 1688, + "api/spec/packages/aip/src/customers/charges/index.tsp": 12, + "api/spec/packages/aip/src/customers/charges/operations.tsp": 503, + "api/spec/packages/aip/src/customers/credits/adjustment.tsp": 155, + "api/spec/packages/aip/src/customers/credits/balance.tsp": 295, + "api/spec/packages/aip/src/customers/credits/grant.tsp": 2236, + "api/spec/packages/aip/src/customers/credits/index.tsp": 18, + "api/spec/packages/aip/src/customers/credits/ledger.tsp": 824, + "api/spec/packages/aip/src/customers/credits/operations.tsp": 1679, + "api/spec/packages/aip/src/customers/customer.tsp": 870, + "api/spec/packages/aip/src/customers/index.tsp": 28, + "api/spec/packages/aip/src/customers/operations.tsp": 1727, + "api/spec/packages/aip/src/defaults/index.tsp": 13, + "api/spec/packages/aip/src/defaults/operations.tsp": 249, + "api/spec/packages/aip/src/defaults/taxcodes.tsp": 220, + "api/spec/packages/aip/src/entitlements/access.tsp": 254, + "api/spec/packages/aip/src/entitlements/entitlements.tsp": 48, + "api/spec/packages/aip/src/entitlements/index.tsp": 19, + "api/spec/packages/aip/src/entitlements/operations.tsp": 271, + "api/spec/packages/aip/src/events/event.tsp": 901, + "api/spec/packages/aip/src/events/index.tsp": 12, + "api/spec/packages/aip/src/events/operations.tsp": 805, + "api/spec/packages/aip/src/features/cost.tsp": 365, + "api/spec/packages/aip/src/features/feature.tsp": 465, + "api/spec/packages/aip/src/features/index.tsp": 29, + "api/spec/packages/aip/src/features/operations.tsp": 841, + "api/spec/packages/aip/src/features/unitcost.tsp": 1093, + "api/spec/packages/aip/src/governance/governance.tsp": 1542, + "api/spec/packages/aip/src/governance/index.tsp": 19, + "api/spec/packages/aip/src/governance/operations.tsp": 259, + "api/spec/packages/aip/src/invoices/index.tsp": 11, + "api/spec/packages/aip/src/invoices/invoice.tsp": 121, + "api/spec/packages/aip/src/invoices/party.tsp": 629, + "api/spec/packages/aip/src/konnect.tsp": 2055, + "api/spec/packages/aip/src/llmcost/index.tsp": 12, + "api/spec/packages/aip/src/llmcost/operations.tsp": 881, + "api/spec/packages/aip/src/llmcost/prices.tsp": 947, + "api/spec/packages/aip/src/main.tsp": 17, + "api/spec/packages/aip/src/meters/index.tsp": 12, + "api/spec/packages/aip/src/meters/meter.tsp": 555, + "api/spec/packages/aip/src/meters/operations.tsp": 1214, + "api/spec/packages/aip/src/meters/query.tsp": 968, + "api/spec/packages/aip/src/openmeter.tsp": 1688, + "api/spec/packages/aip/src/productcatalog/addon.tsp": 796, + "api/spec/packages/aip/src/productcatalog/index.tsp": 42, + "api/spec/packages/aip/src/productcatalog/operations.tsp": 2191, + "api/spec/packages/aip/src/productcatalog/plan.tsp": 1112, + "api/spec/packages/aip/src/productcatalog/planaddon.tsp": 303, + "api/spec/packages/aip/src/productcatalog/price.tsp": 1510, + "api/spec/packages/aip/src/productcatalog/ratecard.tsp": 965, + "api/spec/packages/aip/src/productcatalog/unitconfig.tsp": 1245, + "api/spec/packages/aip/src/shared/address.tsp": 300, + "api/spec/packages/aip/src/shared/consts.tsp": 801, + "api/spec/packages/aip/src/shared/enums.tsp": 114, + "api/spec/packages/aip/src/shared/errors.tsp": 356, + "api/spec/packages/aip/src/shared/filters.tsp": 1418, + "api/spec/packages/aip/src/shared/index.tsp": 61, + "api/spec/packages/aip/src/shared/parameters.tsp": 203, + "api/spec/packages/aip/src/shared/properties.tsp": 1252, + "api/spec/packages/aip/src/shared/request.tsp": 246, + "api/spec/packages/aip/src/shared/resource.tsp": 488, + "api/spec/packages/aip/src/shared/responses.tsp": 316, + "api/spec/packages/aip/src/subscriptions/index.tsp": 37, + "api/spec/packages/aip/src/subscriptions/operations.tsp": 1396, + "api/spec/packages/aip/src/subscriptions/reference.tsp": 217, + "api/spec/packages/aip/src/subscriptions/subscription.tsp": 1139, + "api/spec/packages/aip/src/subscriptions/subscriptionaddon.tsp": 297, + "api/spec/packages/aip/src/tax/codes.tsp": 181, + "api/spec/packages/aip/src/tax/index.tsp": 12, + "api/spec/packages/aip/src/tax/operations.tsp": 487, + "api/spec/packages/aip/src/test.tsp": 343, + "api/spec/packages/aip/tspconfig.yaml": 83, + "api/spec/packages/legacy/README.md": 746, + "api/spec/packages/legacy/lib/index.js": 164, + "api/spec/packages/legacy/lib/rules/casing.js": 270, + "api/spec/packages/legacy/lib/rules/composition-over-inheritance.js": 401, + "api/spec/packages/legacy/lib/rules/docs.js": 372, + "api/spec/packages/legacy/lib/rules/friendly-name.js": 441, + "api/spec/packages/legacy/lib/rules/operation-summary.js": 173, + "api/spec/packages/legacy/lib/rules/utils.js": 370, + "api/spec/packages/legacy/package.json": 363, + "api/spec/packages/legacy/src/app/app.tsp": 816, + "api/spec/packages/legacy/src/app/capability.tsp": 293, + "api/spec/packages/legacy/src/app/customer.tsp": 542, + "api/spec/packages/legacy/src/app/custominvoicing.tsp": 1433, + "api/spec/packages/legacy/src/app/main.tsp": 57, + "api/spec/packages/legacy/src/app/marketplace.tsp": 1431, + "api/spec/packages/legacy/src/app/oauth.tsp": 1015, + "api/spec/packages/legacy/src/app/sandbox.tsp": 85, + "api/spec/packages/legacy/src/app/stripe.tsp": 5339, + "api/spec/packages/legacy/src/auth.tsp": 31, + "api/spec/packages/legacy/src/billing/customeroverride.tsp": 2035, + "api/spec/packages/legacy/src/billing/invoices.tsp": 4718, + "api/spec/packages/legacy/src/billing/invoices/README.md": 251, + "api/spec/packages/legacy/src/billing/invoices/credits.tsp": 142, + "api/spec/packages/legacy/src/billing/invoices/discounts.tsp": 1189, + "api/spec/packages/legacy/src/billing/invoices/docref.tsp": 538, + "api/spec/packages/legacy/src/billing/invoices/invoice.tsp": 7162, + "api/spec/packages/legacy/src/billing/invoices/main.tsp": 120, + "api/spec/packages/legacy/src/billing/invoices/party.tsp": 745, + "api/spec/packages/legacy/src/billing/invoices/pay.tsp": 630, + "api/spec/packages/legacy/src/billing/invoices/tax.tsp": 351, + "api/spec/packages/legacy/src/billing/main.tsp": 100, + "api/spec/packages/legacy/src/billing/profile.tsp": 3540, + "api/spec/packages/legacy/src/cloud/auth.tsp": 95, + "api/spec/packages/legacy/src/cloud/main.tsp": 2727, + "api/spec/packages/legacy/src/customer/app.tsp": 393, + "api/spec/packages/legacy/src/customer/customer.tsp": 1605, + "api/spec/packages/legacy/src/customer/main.tsp": 22, + "api/spec/packages/legacy/src/customer/stripe.tsp": 1115, + "api/spec/packages/legacy/src/debug.tsp": 218, + "api/spec/packages/legacy/src/entitlements/customer.tsp": 414, + "api/spec/packages/legacy/src/entitlements/entitlements.tsp": 3074, + "api/spec/packages/legacy/src/entitlements/grant.tsp": 1781, + "api/spec/packages/legacy/src/entitlements/main.tsp": 84, + "api/spec/packages/legacy/src/entitlements/subjects.tsp": 4553, + "api/spec/packages/legacy/src/entitlements/v2/customer.tsp": 2887, + "api/spec/packages/legacy/src/entitlements/v2/entitlements.tsp": 1601, + "api/spec/packages/legacy/src/entitlements/v2/grant.tsp": 485, + "api/spec/packages/legacy/src/entitlements/v2/grants.tsp": 333, + "api/spec/packages/legacy/src/entitlements/v2/main.tsp": 125, + "api/spec/packages/legacy/src/errors.tsp": 1522, + "api/spec/packages/legacy/src/events.tsp": 1803, + "api/spec/packages/legacy/src/filter.tsp": 1648, + "api/spec/packages/legacy/src/info/currencies.tsp": 91, + "api/spec/packages/legacy/src/info/main.tsp": 53, + "api/spec/packages/legacy/src/info/progress.tsp": 193, + "api/spec/packages/legacy/src/info/routes.tsp": 97, + "api/spec/packages/legacy/src/main.tsp": 1046, + "api/spec/packages/legacy/src/meters.tsp": 4017, + "api/spec/packages/legacy/src/notification/channel.tsp": 1575, + "api/spec/packages/legacy/src/notification/entitlements.tsp": 1967, + "api/spec/packages/legacy/src/notification/event.tsp": 2255, + "api/spec/packages/legacy/src/notification/invoice.tsp": 763, + "api/spec/packages/legacy/src/notification/main.tsp": 102, + "api/spec/packages/legacy/src/notification/rule.tsp": 1515, + "api/spec/packages/legacy/src/portal.tsp": 847, + "api/spec/packages/legacy/src/productcatalog/addon.tsp": 674, + "api/spec/packages/legacy/src/productcatalog/alignment.tsp": 133, + "api/spec/packages/legacy/src/productcatalog/discounts.tsp": 340, + "api/spec/packages/legacy/src/productcatalog/errors.tsp": 408, + "api/spec/packages/legacy/src/productcatalog/features.tsp": 1571, + "api/spec/packages/legacy/src/productcatalog/main.tsp": 95, + "api/spec/packages/legacy/src/productcatalog/plan.tsp": 1486, + "api/spec/packages/legacy/src/productcatalog/planaddon.tsp": 493, + "api/spec/packages/legacy/src/productcatalog/prices.tsp": 1814, + "api/spec/packages/legacy/src/productcatalog/prorating.tsp": 164, + "api/spec/packages/legacy/src/productcatalog/ratecards.tsp": 1383, + "api/spec/packages/legacy/src/productcatalog/routes.tsp": 4329, + "api/spec/packages/legacy/src/productcatalog/subscription.tsp": 4011, + "api/spec/packages/legacy/src/productcatalog/subscriptionaddon.tsp": 975, + "api/spec/packages/legacy/src/productcatalog/tax.tsp": 504, + "api/spec/packages/legacy/src/query.tsp": 666, + "api/spec/packages/legacy/src/rest.tsp": 312, + "api/spec/packages/legacy/src/subjects.tsp": 1305, + "api/spec/packages/legacy/src/types.tsp": 2699, + "api/spec/packages/legacy/tspconfig.client.yaml": 124, + "api/spec/packages/legacy/tspconfig.yaml": 70, + "api/spec/patches/@typespec__http-client-python.patch": 187606, + "api/spec/patches/@typespec__http.patch": 14550, + "api/spec/patches/@typespec__openapi.patch": 3812, + "api/spec/patches/@typespec__openapi3.patch": 62844, + "api/spec/pnpm-lock.yaml": 32093, + "api/spec/pnpm-workspace.yaml": 25, + "api/types/doc.go": 66, + "api/v3/api.gen.go": 109568, + "api/v3/api.go": 31, + "api/v3/apierrors/encoder.go": 237, + "api/v3/apierrors/encoder_test.go": 336, + "api/v3/apierrors/errors.go": 1356, + "api/v3/apierrors/errors_ctors.go": 2233, + "api/v3/apierrors/handler.go": 1560, + "api/v3/codegen.yaml": 155, + "api/v3/filters/convert.go": 1707, + "api/v3/filters/convert_test.go": 3224, + "api/v3/filters/filter.go": 1195, + "api/v3/filters/parse.go": 4925, + "api/v3/filters/parse_test.go": 7437, + "api/v3/handlers/addons/archive.go": 430, + "api/v3/handlers/addons/convert.go": 5674, + "api/v3/handlers/addons/create.go": 437, + "api/v3/handlers/addons/delete.go": 354, + "api/v3/handlers/addons/get.go": 410, + "api/v3/handlers/addons/handler.go": 218, + "api/v3/handlers/addons/list.go": 1196, + "api/v3/handlers/addons/publish.go": 469, + "api/v3/handlers/addons/update.go": 458, + "api/v3/handlers/apps/convert.gen.go": 643, + "api/v3/handlers/apps/convert.go": 1475, + "api/v3/handlers/apps/get_app.go": 374, + "api/v3/handlers/apps/handler.go": 181, + "api/v3/handlers/apps/list_app.go": 657, + "api/v3/handlers/billingprofiles/convert.gen.go": 2731, + "api/v3/handlers/billingprofiles/convert.go": 3387, + "api/v3/handlers/billingprofiles/create.go": 470, + "api/v3/handlers/billingprofiles/delete.go": 443, + "api/v3/handlers/billingprofiles/error_encoder.go": 259, + "api/v3/handlers/billingprofiles/get.go": 496, + "api/v3/handlers/billingprofiles/handler.go": 223, + "api/v3/handlers/billingprofiles/list.go": 708, + "api/v3/handlers/billingprofiles/update.go": 603, + "api/v3/handlers/currencies/convert.go": 435, + "api/v3/handlers/currencies/create.go": 395, + "api/v3/handlers/currencies/create_cost_basis.go": 419, + "api/v3/handlers/currencies/get_cost_bases.go": 731, + "api/v3/handlers/currencies/handler.go": 218, + "api/v3/handlers/currencies/list.go": 962, + "api/v3/handlers/customers/billing/convert.gen.go": 5452, + "api/v3/handlers/customers/billing/convert.go": 1399, + "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go": 822, + "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go": 972, + "api/v3/handlers/customers/billing/error_encoder.go": 259, + "api/v3/handlers/customers/billing/get_billing.go": 882, + "api/v3/handlers/customers/billing/handler.go": 350, + "api/v3/handlers/customers/billing/update_billing.go": 1675, + "api/v3/handlers/customers/billing/update_billing_app_data.go": 1319, + "api/v3/handlers/customers/charges/convert.go": 3983, + "api/v3/handlers/customers/charges/convert_test.go": 492, + "api/v3/handlers/customers/charges/handler.go": 183, + "api/v3/handlers/customers/charges/list.go": 1507, + "api/v3/handlers/customers/convert.gen.go": 1872, + "api/v3/handlers/customers/convert.go": 610, + "api/v3/handlers/customers/create.go": 450, + "api/v3/handlers/customers/credits/convert.go": 4186, + "api/v3/handlers/customers/credits/convert_test.go": 359, + "api/v3/handlers/customers/credits/create_grant.go": 487, + "api/v3/handlers/customers/credits/errors.go": 177, + "api/v3/handlers/customers/credits/externalsettlement.go": 592, + "api/v3/handlers/customers/credits/externalsettlement_test.go": 406, + "api/v3/handlers/customers/credits/get_balance.go": 921, + "api/v3/handlers/customers/credits/get_grant.go": 412, + "api/v3/handlers/customers/credits/handler.go": 522, + "api/v3/handlers/customers/credits/list_grants.go": 903, + "api/v3/handlers/customers/credits/list_transactions.go": 1210, + "api/v3/handlers/customers/credits/list_transactions_test.go": 944, + "api/v3/handlers/customers/delete.go": 406, + "api/v3/handlers/customers/entitlementaccess/handler.go": 232, + "api/v3/handlers/customers/entitlementaccess/list.go": 759, + "api/v3/handlers/customers/entitlementaccess/mapping.go": 452, + "api/v3/handlers/customers/get.go": 403, + "api/v3/handlers/customers/handler.go": 207, + "api/v3/handlers/customers/list.go": 1348, + "api/v3/handlers/customers/upsert.go": 878, + "api/v3/handlers/events/convert.go": 1159, + "api/v3/handlers/events/handler.go": 223, + "api/v3/handlers/events/ingest.go": 752, + "api/v3/handlers/events/list.go": 1592, + "api/v3/handlers/events/list_test.go": 873, + "api/v3/handlers/featurecost/convert.go": 434, + "api/v3/handlers/featurecost/handler.go": 295, + "api/v3/handlers/featurecost/query.go": 793, + "api/v3/handlers/features/convert.go": 2304, + "api/v3/handlers/features/convert_test.go": 4499, + "api/v3/handlers/features/create.go": 732, + "api/v3/handlers/features/create_test.go": 390, + "api/v3/handlers/features/delete.go": 361, + "api/v3/handlers/features/error_encoder.go": 217, + "api/v3/handlers/features/get.go": 494, + "api/v3/handlers/features/handler.go": 289, + "api/v3/handlers/features/list.go": 1032, + "api/v3/handlers/features/update.go": 533, + "api/v3/handlers/llmcost/convert.go": 1323, + "api/v3/handlers/llmcost/convert_test.go": 133, + "api/v3/handlers/llmcost/create_override.go": 412, + "api/v3/handlers/llmcost/delete_override.go": 357, + "api/v3/handlers/llmcost/get_price.go": 345, + "api/v3/handlers/llmcost/handler.go": 202, + "api/v3/handlers/llmcost/list_overrides.go": 986, + "api/v3/handlers/llmcost/list_prices.go": 1252, + "api/v3/handlers/meters/convert.gen.go": 790, + "api/v3/handlers/meters/convert.go": 1351, + "api/v3/handlers/meters/create.go": 435, + "api/v3/handlers/meters/delete.go": 402, + "api/v3/handlers/meters/dimensions.go": 79, + "api/v3/handlers/meters/errors.go": 157, + "api/v3/handlers/meters/get.go": 366, + "api/v3/handlers/meters/handler.go": 297, + "api/v3/handlers/meters/list.go": 885, + "api/v3/handlers/meters/query.go": 562, + "api/v3/handlers/meters/query/convert.go": 622, + "api/v3/handlers/meters/query/convert_test.go": 851, + "api/v3/handlers/meters/query/customers.go": 390, + "api/v3/handlers/meters/query/dimensions.go": 122, + "api/v3/handlers/meters/query/dimensions_test.go": 325, + "api/v3/handlers/meters/query/errors.go": 743, + "api/v3/handlers/meters/query/params.go": 781, + "api/v3/handlers/meters/query/params_test.go": 1940, + "api/v3/handlers/meters/query_csv.go": 1474, + "api/v3/handlers/meters/update.go": 459, + "api/v3/handlers/plans/archive.go": 433, + "api/v3/handlers/plans/convert.go": 4958, + "api/v3/handlers/plans/convert_test.go": 9495, + "api/v3/handlers/plans/create.go": 432, + "api/v3/handlers/plans/delete.go": 360, + "api/v3/handlers/plans/get.go": 369, + "api/v3/handlers/plans/handler.go": 214, + "api/v3/handlers/plans/list.go": 1158, + "api/v3/handlers/plans/planaddons/convert.go": 320, + "api/v3/handlers/plans/planaddons/create.go": 567, + "api/v3/handlers/plans/planaddons/delete.go": 410, + "api/v3/handlers/plans/planaddons/get.go": 412, + "api/v3/handlers/plans/planaddons/handler.go": 254, + "api/v3/handlers/plans/planaddons/lists.go": 679, + "api/v3/handlers/plans/planaddons/update.go": 591, + "api/v3/handlers/plans/publish.go": 473, + "api/v3/handlers/plans/update.go": 455, + "api/v3/handlers/subscriptions/cancel.go": 595, + "api/v3/handlers/subscriptions/change.go": 1092, + "api/v3/handlers/subscriptions/convert.go": 848, + "api/v3/handlers/subscriptions/create.go": 1621, + "api/v3/handlers/subscriptions/get.go": 415, + "api/v3/handlers/subscriptions/handler.go": 407, + "api/v3/handlers/subscriptions/list.go": 1246, + "api/v3/handlers/subscriptions/subscriptionaddons/convert.go": 409, + "api/v3/handlers/subscriptions/subscriptionaddons/get.go": 484, + "api/v3/handlers/subscriptions/subscriptionaddons/handler.go": 202, + "api/v3/handlers/subscriptions/subscriptionaddons/list.go": 1020, + "api/v3/handlers/subscriptions/unschedule_cancelation.go": 419, + "api/v3/handlers/taxcodes/convert.gen.go": 1230, + "api/v3/handlers/taxcodes/convert.go": 1253, + "api/v3/handlers/taxcodes/create.go": 432, + "api/v3/handlers/taxcodes/delete.go": 428, + "api/v3/handlers/taxcodes/get.go": 410, + "api/v3/handlers/taxcodes/get_organization_default_tax_codes.go": 423, + "api/v3/handlers/taxcodes/handler.go": 241, + "api/v3/handlers/taxcodes/list.go": 672, + "api/v3/handlers/taxcodes/update.go": 481, + "api/v3/handlers/taxcodes/upsert_organization_default_tax_codes.go": 495, + "api/v3/labels/convert.go": 520, + "api/v3/labels/convert_test.go": 1335, + "api/v3/labels/validate.go": 608, + "api/v3/labels/validate_test.go": 991, + "api/v3/oasmiddleware/decoder.go": 202, + "api/v3/oasmiddleware/error.go": 1001, + "api/v3/oasmiddleware/hook.go": 673, + "api/v3/oasmiddleware/response.go": 367, + "api/v3/oasmiddleware/router.go": 461, + "api/v3/oasmiddleware/validator.go": 1075, + "api/v3/oasmiddleware/validator_test.go": 1128, + "api/v3/openapi.yaml": 84324, + "api/v3/render/render.go": 391, + "api/v3/request/body.go": 280, + "api/v3/request/filter.go": 478, + "api/v3/request/filter_test.go": 720, + "api/v3/request/sort.go": 350, + "api/v3/response/cursorpagination.go": 470, + "api/v3/response/pagepagination.go": 123, + "api/v3/server/routes.go": 4488, + "api/v3/server/server.go": 4728, + "api/v3/templates/chi-middleware.tmpl.patch": 255, + "api/v3/test/embed.go": 22, + "api/v3/test/filters_test.go": 6543, + "api/v3/test/openapi.test.yaml": 2563, + "app/common/app.go": 1536, + "app/common/billing.go": 2718, + "app/common/charges.go": 4182, + "app/common/clickhouse.go": 488, + "app/common/config.go": 586, + "app/common/creditgrant.go": 219, + "app/common/currency.go": 174, + "app/common/customer.go": 925, + "app/common/customerbalance.go": 366, + "app/common/database.go": 796, + "app/common/entitlement.go": 479, + "app/common/featuregate.go": 42, + "app/common/ffx.go": 429, + "app/common/framework.go": 38, + "app/common/globals.go": 209, + "app/common/kafka.go": 1297, + "app/common/ledger.go": 1043, + "app/common/ledger_test.go": 436, + "app/common/llmcost.go": 346, + "app/common/locker.go": 74, + "app/common/metadata.go": 201, + "app/common/meter.go": 1133, + "app/common/meterevent.go": 156, + "app/common/namespace.go": 219, + "app/common/notification.go": 1197, + "app/common/openmeter_balanceworker.go": 1183, + "app/common/openmeter_billingworker.go": 897, + "app/common/openmeter_notification.go": 156, + "app/common/openmeter_server.go": 781, + "app/common/openmeter_sinkworker.go": 1652, + "app/common/portal.go": 162, + "app/common/productcatalog.go": 1177, + "app/common/progressmanager.go": 233, + "app/common/runner.go": 140, + "app/common/secret.go": 166, + "app/common/server.go": 160, + "app/common/streaming.go": 540, + "app/common/subject.go": 306, + "app/common/subscription.go": 1476, + "app/common/svix.go": 351, + "app/common/taxcode.go": 533, + "app/common/telemetry.go": 3735, + "app/common/telemetry_test.go": 776, + "app/common/termination.go": 1042, + "app/common/watermill.go": 674, + "app/config/aggregation.go": 1692, + "app/config/apps.go": 340, + "app/config/balanceworker.go": 475, + "app/config/billing.go": 372, + "app/config/billingworker.go": 166, + "app/config/config.go": 1624, + "app/config/config_test.go": 3334, + "app/config/credits.go": 173, + "app/config/customer.go": 147, + "app/config/dedupe.go": 1280, + "app/config/entitlements.go": 336, + "app/config/events.go": 1672, + "app/config/helpers.go": 82, + "app/config/ingest.go": 1478, + "app/config/ingest_test.go": 583, + "app/config/kafka.go": 703, + "app/config/namespace.go": 147, + "app/config/notification.go": 516, + "app/config/portal.go": 278, + "app/config/postgres.go": 1116, + "app/config/productcatalog.go": 83, + "app/config/progressmanager.go": 267, + "app/config/server.go": 606, + "app/config/sink.go": 1522, + "app/config/svix.go": 38, + "app/config/taxcode.go": 856, + "app/config/taxcode_test.go": 701, + "app/config/telemetry.go": 4743, + "app/config/termination.go": 406, + "app/config/testdata/complete.yaml": 861, + "app/config/topicprovisioner.go": 336, + "app/config/viper.go": 291, + "atlas.hcl": 428, + "benthos-collector.Dockerfile": 354, + "cloudevents.spec.json": 825, + "cmd/balance-worker/main.go": 435, + "cmd/balance-worker/version.go": 133, + "cmd/balance-worker/wire.go": 348, + "cmd/balance-worker/wire_gen.go": 2398, + "cmd/billing-worker/main.go": 540, + "cmd/billing-worker/version.go": 133, + "cmd/billing-worker/wire.go": 431, + "cmd/billing-worker/wire_gen.go": 3792, + "cmd/jobs/billing/advance/advance.go": 550, + "cmd/jobs/billing/advancecharges/advancecharges.go": 547, + "cmd/jobs/billing/billing.go": 135, + "cmd/jobs/billing/collect/collect.go": 691, + "cmd/jobs/billing/subscriptionsync/sync.go": 631, + "cmd/jobs/entitlement/recalculatesnapshots.go": 275, + "cmd/jobs/entitlement/root.go": 62, + "cmd/jobs/internal/app.go": 74, + "cmd/jobs/internal/config.go": 151, + "cmd/jobs/internal/globals.go": 51, + "cmd/jobs/internal/version.go": 150, + "cmd/jobs/internal/wire.go": 1094, + "cmd/jobs/internal/wire_gen.go": 4802, + "cmd/jobs/ledger/backfillaccounts/backfillaccounts.go": 1043, + "cmd/jobs/ledger/ledger.go": 63, + "cmd/jobs/ledger/service/customer_lister_ent.go": 381, + "cmd/jobs/ledger/service/service.go": 1931, + "cmd/jobs/ledger/service/service_test.go": 2314, + "cmd/jobs/llmcost/llmcost.go": 123, + "cmd/jobs/main.go": 524, + "cmd/jobs/migrate/migrate.go": 272, + "cmd/jobs/quickstart/cronjobs.go": 652, + "cmd/jobs/quickstart/quickstart.go": 92, + "cmd/jobs/version.go": 108, + "cmd/notification-service/main.go": 926, + "cmd/notification-service/version.go": 133, + "cmd/notification-service/wire.go": 544, + "cmd/notification-service/wire_gen.go": 2128, + "cmd/server/main.go": 2704, + "cmd/server/version.go": 133, + "cmd/server/wire.go": 1649, + "cmd/server/wire_gen.go": 7003, + "cmd/sink-worker/main.go": 717, + "cmd/sink-worker/version.go": 133, + "cmd/sink-worker/wire.go": 587, + "cmd/sink-worker/wire_gen.go": 2340, + "collector/README.md": 1192, + "collector/benthos/bloblang/parse_resource.go": 259, + "collector/benthos/input/kubernetes.go": 2348, + "collector/benthos/input/otel_log.go": 2318, + "collector/benthos/input/prometheus.go": 2566, + "collector/benthos/input/run_ai.go": 3020, + "collector/benthos/input/runai/metrics.go": 2694, + "collector/benthos/input/runai/pods.go": 865, + "collector/benthos/input/runai/service.go": 636, + "collector/benthos/input/runai/token.go": 627, + "collector/benthos/input/runai/workloads.go": 1102, + "collector/benthos/input/schedule.go": 537, + "collector/benthos/internal/LICENSE": 264, + "collector/benthos/internal/logging/logging.go": 355, + "collector/benthos/internal/message/batch.go": 28, + "collector/benthos/internal/message/transaction.go": 928, + "collector/benthos/internal/shutdown/signaler.go": 1211, + "collector/benthos/output/openmeter.go": 1941, + "collector/benthos/output/otel_log.go": 670, + "collector/benthos/presets/http-server/config.yaml": 843, + "collector/benthos/presets/kubernetes-pod-exec-time/config.yaml": 905, + "collector/benthos/services/leaderelection/flags.go": 487, + "collector/benthos/services/leaderelection/service.go": 1557, + "collector/cmd/main.go": 215, + "collector/cmd/version.go": 36, + "collector/go.mod": 6825, + "collector/quickstart/collector/config.yaml": 66, + "collector/quickstart/collector/resources/dedupe-cache.yaml": 18, + "collector/quickstart/collector/streams/input.yaml": 575, + "collector/quickstart/collector/streams/output.yaml": 78, + "collector/quickstart/docker-compose.yaml": 375, + "collector/quickstart/seeder/config.yaml": 516, + "config.example.yaml": 2374, + "deploy/README.md": 181, + "deploy/charts/Makefile": 25, + "deploy/charts/benthos-collector/Chart.yaml": 82, + "deploy/charts/benthos-collector/README.md": 1833, + "deploy/charts/benthos-collector/README.tmpl.md": 7, + "deploy/charts/benthos-collector/templates/_helpers.tpl": 953, + "deploy/charts/benthos-collector/templates/configmap.yaml": 89, + "deploy/charts/benthos-collector/templates/rbac.yaml": 392, + "deploy/charts/benthos-collector/templates/secret.yaml": 160, + "deploy/charts/benthos-collector/templates/service.yaml": 134, + "deploy/charts/benthos-collector/templates/serviceaccount.yaml": 102, + "deploy/charts/benthos-collector/templates/statefulset.yaml": 1504, + "deploy/charts/benthos-collector/values.yaml": 1674, + "deploy/charts/openmeter/.gitignore": 2, + "deploy/charts/openmeter/Chart.yaml": 248, + "deploy/charts/openmeter/README.md": 2931, + "deploy/charts/openmeter/README.tmpl.md": 425, + "deploy/charts/openmeter/templates/NOTES.txt": 192, + "deploy/charts/openmeter/templates/_helpers.tpl": 1261, + "deploy/charts/openmeter/templates/clickhouse.yaml": 376, + "deploy/charts/openmeter/templates/configmap.yaml": 479, + "deploy/charts/openmeter/templates/deployment.yaml": 4145, + "deploy/charts/openmeter/templates/ingress.yaml": 537, + "deploy/charts/openmeter/templates/jobs.yaml": 2856, + "deploy/charts/openmeter/templates/service.yaml": 107, + "deploy/charts/openmeter/templates/serviceaccount.yaml": 98, + "deploy/charts/openmeter/templates/svix.yaml": 761, + "deploy/charts/openmeter/values.example.yaml": 214, + "deploy/charts/openmeter/values.yaml": 3135, + "deploy/charts/template.md": 472, + "deploy/kind.yaml": 102, + "docker-compose.base.yaml": 1293, + "docker-compose.yaml": 356, + "docs/database-migration.md": 513, + "docs/decisions/0001-event-streaming-platform.md": 356, + "docs/decisions/0002-event-format.md": 240, + "docs/decisions/0003-idempotency.md": 530, + "docs/decisions/0004-partitioning.md": 396, + "docs/decisions/0005-clickhouse.md": 571, + "docs/event-ingestion.md": 1151, + "docs/migration-guides/2025-06-26-subscription-alignment.md": 1296, + "docs/migration-guides/2025-08-12-subject-customer-consolidation.md": 1544, + "docs/migration-guides/2025-11-04-entitlement-events-v1.md": 158, + "docs/seeder.md": 289, + "docs/stripe-dev.md": 903, + "e2e/.gitignore": 8, + "e2e/Makefile": 326, + "e2e/addons_v3_test.go": 3190, + "e2e/config.yaml": 772, + "e2e/customer_credits_v3_test.go": 266, + "e2e/docker-compose.debug-ports.yaml": 87, + "e2e/docker-compose.infra.yaml": 177, + "e2e/docker-compose.openmeter-latest.yaml": 45, + "e2e/docker-compose.openmeter-local.yaml": 69, + "e2e/docker-compose.openmeter.yaml": 333, + "e2e/e2e_test.go": 14840, + "e2e/entitlement_parity_test.go": 5139, + "e2e/entitlement_test.go": 6655, + "e2e/helpers.go": 763, + "e2e/ledger_backfill_test.go": 1886, + "e2e/multisubject_test.go": 2204, + "e2e/planaddons_v3_test.go": 4447, + "e2e/plans_v3_test.go": 3889, + "e2e/productcatalog_smoke_v3_test.go": 2421, + "e2e/productcatalog_test.go": 11820, + "e2e/setup_test.go": 127, + "e2e/v3helpers_test.go": 4530, + "entrypoint.sh": 56, + "etc/seed/observability.yaml": 39, + "etc/seed/seed.yaml": 503, + "etc/seed/streams/api-requests.yaml": 346, + "etc/seed/streams/prompt-tokens.yaml": 419, + "etc/seed/streams/workload-runtime.yaml": 458, + "etc/wiretap/config.docker.yaml": 37, + "flake.nix": 1929, + "go.mod": 3234, + "justfile": 194, + "openmeter/apiconverter/cursor.go": 98, + "openmeter/apiconverter/filter.gen.go": 2351, + "openmeter/apiconverter/filter.go": 553, + "openmeter/app/adapter.go": 416, + "openmeter/app/adapter/adapter.go": 374, + "openmeter/app/adapter/app.go": 2021, + "openmeter/app/adapter/customer.go": 1268, + "openmeter/app/adapter/marketplace.go": 1128, + "openmeter/app/app.go": 1237, + "openmeter/app/appbase.go": 874, + "openmeter/app/customer.go": 34, + "openmeter/app/custominvoicing/adapter.go": 202, + "openmeter/app/custominvoicing/adapter/adapter.go": 382, + "openmeter/app/custominvoicing/adapter/appconfig.go": 592, + "openmeter/app/custominvoicing/adapter/customerdata.go": 716, + "openmeter/app/custominvoicing/app.go": 1107, + "openmeter/app/custominvoicing/customerdata.go": 540, + "openmeter/app/custominvoicing/factory.go": 974, + "openmeter/app/custominvoicing/httpdriver/custominvoicing.go": 1528, + "openmeter/app/custominvoicing/httpdriver/errors.go": 264, + "openmeter/app/custominvoicing/httpdriver/handler.go": 326, + "openmeter/app/custominvoicing/httpdriver/mapper.go": 610, + "openmeter/app/custominvoicing/service.go": 304, + "openmeter/app/custominvoicing/service/customerdata.go": 254, + "openmeter/app/custominvoicing/service/factory.go": 489, + "openmeter/app/custominvoicing/service/service.go": 309, + "openmeter/app/custominvoicing/service/sync.go": 972, + "openmeter/app/custominvoicing/sync.go": 382, + "openmeter/app/defaults.go": 17, + "openmeter/app/errors.go": 1266, + "openmeter/app/event.go": 1322, + "openmeter/app/events.go": 515, + "openmeter/app/httpdriver/app.go": 2046, + "openmeter/app/httpdriver/customer.go": 3298, + "openmeter/app/httpdriver/handler.go": 547, + "openmeter/app/httpdriver/mapper.go": 1322, + "openmeter/app/httpdriver/marketplace.go": 3079, + "openmeter/app/input.go": 455, + "openmeter/app/marketplace.go": 1015, + "openmeter/app/registry.go": 370, + "openmeter/app/sandbox/app.go": 1627, + "openmeter/app/sandbox/config.go": 26, + "openmeter/app/sandbox/errors.go": 49, + "openmeter/app/sandbox/helpers.go": 453, + "openmeter/app/sandbox/marketplace.go": 279, + "openmeter/app/sandbox/mock.go": 2011, + "openmeter/app/service.go": 394, + "openmeter/app/service/app.go": 906, + "openmeter/app/service/customer.go": 161, + "openmeter/app/service/marketplace.go": 576, + "openmeter/app/service/service.go": 186, + "openmeter/app/stripe/adapter.go": 446, + "openmeter/app/stripe/adapter/adapter.go": 873, + "openmeter/app/stripe/adapter/customer.go": 2364, + "openmeter/app/stripe/adapter/stripe.go": 5965, + "openmeter/app/stripe/app.go": 532, + "openmeter/app/stripe/appcustomer.go": 2145, + "openmeter/app/stripe/appinvoice.go": 6641, + "openmeter/app/stripe/calculator.go": 509, + "openmeter/app/stripe/client/appclient.go": 2328, + "openmeter/app/stripe/client/checkout.go": 2385, + "openmeter/app/stripe/client/client.go": 1327, + "openmeter/app/stripe/client/customer.go": 535, + "openmeter/app/stripe/client/errors.go": 588, + "openmeter/app/stripe/client/invoice.go": 2015, + "openmeter/app/stripe/client/invoice_line.go": 1365, + "openmeter/app/stripe/client/logger.go": 235, + "openmeter/app/stripe/client/portal.go": 825, + "openmeter/app/stripe/client/stripe.go": 945, + "openmeter/app/stripe/clientapp.go": 323, + "openmeter/app/stripe/config.go": 190, + "openmeter/app/stripe/customerdata.go": 140, + "openmeter/app/stripe/event.go": 525, + "openmeter/app/stripe/httpdriver/apikey.go": 484, + "openmeter/app/stripe/httpdriver/checkout_session.go": 1454, + "openmeter/app/stripe/httpdriver/const.go": 69, + "openmeter/app/stripe/httpdriver/customer.go": 2534, + "openmeter/app/stripe/httpdriver/handler.go": 474, + "openmeter/app/stripe/httpdriver/mapping.go": 312, + "openmeter/app/stripe/httpdriver/webhook.go": 4307, + "openmeter/app/stripe/marketplace.go": 282, + "openmeter/app/stripe/portal.go": 594, + "openmeter/app/stripe/service.go": 533, + "openmeter/app/stripe/service/app.go": 1135, + "openmeter/app/stripe/service/billing.go": 1495, + "openmeter/app/stripe/service/const.go": 46, + "openmeter/app/stripe/service/factory.go": 1912, + "openmeter/app/stripe/service/service.go": 655, + "openmeter/app/stripe/service/webhook.go": 364, + "openmeter/app/stripe/types.go": 3523, + "openmeter/app/webhook.go": 35, + "openmeter/billing/README.md": 2270, + "openmeter/billing/adapter.go": 1414, + "openmeter/billing/adapter/adapter.go": 371, + "openmeter/billing/adapter/customeroverride.go": 4128, + "openmeter/billing/adapter/gatheringinvoice.go": 3721, + "openmeter/billing/adapter/gatheringlines.go": 2946, + "openmeter/billing/adapter/invoice.go": 8001, + "openmeter/billing/adapter/invoiceapp.go": 270, + "openmeter/billing/adapter/invoicelinesplitgroup.go": 3264, + "openmeter/billing/adapter/lock.go": 402, + "openmeter/billing/adapter/profile.go": 4540, + "openmeter/billing/adapter/schemalevel.go": 532, + "openmeter/billing/adapter/schemamigration.go": 664, + "openmeter/billing/adapter/seq.go": 471, + "openmeter/billing/adapter/stdinvoicelinediff.go": 1909, + "openmeter/billing/adapter/stdinvoicelinediff_test.go": 2943, + "openmeter/billing/adapter/stdinvoicelinemapper.go": 3657, + "openmeter/billing/adapter/stdinvoicelines.go": 8248, + "openmeter/billing/adapter/upsert.go": 587, + "openmeter/billing/adapter/validationissue.go": 1007, + "openmeter/billing/annotations.go": 227, + "openmeter/billing/app.go": 2940, + "openmeter/billing/charges/adapter.go": 400, + "openmeter/billing/charges/adapter/adapter.go": 371, + "openmeter/billing/charges/adapter/search.go": 1619, + "openmeter/billing/charges/adapter/search_test.go": 2230, + "openmeter/billing/charges/charge.go": 3629, + "openmeter/billing/charges/creditpurchase/adapter.go": 1165, + "openmeter/billing/charges/creditpurchase/adapter/adapter.go": 454, + "openmeter/billing/charges/creditpurchase/adapter/charge.go": 1708, + "openmeter/billing/charges/creditpurchase/adapter/creditgrant.go": 379, + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go": 1507, + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity_test.go": 2331, + "openmeter/billing/charges/creditpurchase/adapter/mapper.go": 816, + "openmeter/billing/charges/creditpurchase/adapter/payment.go": 770, + "openmeter/billing/charges/creditpurchase/charge.go": 1736, + "openmeter/billing/charges/creditpurchase/charge_test.go": 170, + "openmeter/billing/charges/creditpurchase/errors.go": 134, + "openmeter/billing/charges/creditpurchase/featurefilters.go": 161, + "openmeter/billing/charges/creditpurchase/funded_credit_activity.go": 627, + "openmeter/billing/charges/creditpurchase/handler.go": 658, + "openmeter/billing/charges/creditpurchase/lineengine/engine.go": 1067, + "openmeter/billing/charges/creditpurchase/service.go": 513, + "openmeter/billing/charges/creditpurchase/service/create.go": 1222, + "openmeter/billing/charges/creditpurchase/service/external.go": 1514, + "openmeter/billing/charges/creditpurchase/service/funded_credit_activity.go": 164, + "openmeter/billing/charges/creditpurchase/service/get.go": 241, + "openmeter/billing/charges/creditpurchase/service/invoice.go": 1146, + "openmeter/billing/charges/creditpurchase/service/promotional.go": 844, + "openmeter/billing/charges/creditpurchase/service/promotional_test.go": 2803, + "openmeter/billing/charges/creditpurchase/service/service.go": 325, + "openmeter/billing/charges/creditpurchase/service/statemachine.go": 536, + "openmeter/billing/charges/creditpurchase/settlement.go": 2096, + "openmeter/billing/charges/creditpurchase/statemachine.go": 235, + "openmeter/billing/charges/errors.go": 384, + "openmeter/billing/charges/events.go": 272, + "openmeter/billing/charges/features.go": 85, + "openmeter/billing/charges/flatfee/adapter.go": 1764, + "openmeter/billing/charges/flatfee/adapter/adapter.go": 449, + "openmeter/billing/charges/flatfee/adapter/charge.go": 2491, + "openmeter/billing/charges/flatfee/adapter/credits.go": 538, + "openmeter/billing/charges/flatfee/adapter/detailedline.go": 1167, + "openmeter/billing/charges/flatfee/adapter/detailedline_test.go": 2371, + "openmeter/billing/charges/flatfee/adapter/mapper.go": 1664, + "openmeter/billing/charges/flatfee/adapter/payment.go": 462, + "openmeter/billing/charges/flatfee/adapter/realizationrun.go": 1248, + "openmeter/billing/charges/flatfee/adapter/realizationrun_test.go": 1065, + "openmeter/billing/charges/flatfee/adapter/usage.go": 360, + "openmeter/billing/charges/flatfee/bookedat.go": 114, + "openmeter/billing/charges/flatfee/charge.go": 1815, + "openmeter/billing/charges/flatfee/charge_test.go": 1419, + "openmeter/billing/charges/flatfee/detailedline.go": 169, + "openmeter/billing/charges/flatfee/handler.go": 1347, + "openmeter/billing/charges/flatfee/prorating.go": 123, + "openmeter/billing/charges/flatfee/realizationrun.go": 2113, + "openmeter/billing/charges/flatfee/service.go": 551, + "openmeter/billing/charges/flatfee/service/create.go": 1623, + "openmeter/billing/charges/flatfee/service/creditheninvoice.go": 4719, + "openmeter/billing/charges/flatfee/service/creditsonly.go": 1161, + "openmeter/billing/charges/flatfee/service/get.go": 199, + "openmeter/billing/charges/flatfee/service/lineengine.go": 4105, + "openmeter/billing/charges/flatfee/service/linemapper.go": 523, + "openmeter/billing/charges/flatfee/service/payment.go": 1325, + "openmeter/billing/charges/flatfee/service/payment_test.go": 805, + "openmeter/billing/charges/flatfee/service/realizations/correct.go": 1927, + "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go": 879, + "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go": 3626, + "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go": 954, + "openmeter/billing/charges/flatfee/service/realizations/preview.go": 917, + "openmeter/billing/charges/flatfee/service/realizations/service.go": 681, + "openmeter/billing/charges/flatfee/service/service.go": 721, + "openmeter/billing/charges/flatfee/service/statemachine.go": 895, + "openmeter/billing/charges/flatfee/service/subscription.go": 239, + "openmeter/billing/charges/flatfee/service/triggers.go": 1022, + "openmeter/billing/charges/flatfee/statemachine.go": 511, + "openmeter/billing/charges/helpers.go": 17, + "openmeter/billing/charges/invoiceupdater/feehelper.go": 327, + "openmeter/billing/charges/invoiceupdater/invoiceupdate.go": 5554, + "openmeter/billing/charges/invoiceupdater/patch.go": 1322, + "openmeter/billing/charges/lineage/adapter/adapter.go": 318, + "openmeter/billing/charges/lineage/adapter/lineage.go": 2420, + "openmeter/billing/charges/lineage/lineage.go": 739, + "openmeter/billing/charges/lineage/lineage_test.go": 348, + "openmeter/billing/charges/lineage/service.go": 2024, + "openmeter/billing/charges/lineage/service/service.go": 2012, + "openmeter/billing/charges/lock.go": 101, + "openmeter/billing/charges/meta/adapter.go": 269, + "openmeter/billing/charges/meta/adapter/adapter.go": 371, + "openmeter/billing/charges/meta/adapter/charges.go": 474, + "openmeter/billing/charges/meta/charge.go": 1008, + "openmeter/billing/charges/meta/errors.go": 99, + "openmeter/billing/charges/meta/intent.go": 608, + "openmeter/billing/charges/meta/patch.go": 156, + "openmeter/billing/charges/meta/patchdelete.go": 896, + "openmeter/billing/charges/meta/patchextend.go": 979, + "openmeter/billing/charges/meta/patchextend_test.go": 734, + "openmeter/billing/charges/meta/patchshrink.go": 1115, + "openmeter/billing/charges/meta/patchshrink_test.go": 1231, + "openmeter/billing/charges/meta/resource.go": 189, + "openmeter/billing/charges/meta/service.go": 48, + "openmeter/billing/charges/meta/subscription.go": 165, + "openmeter/billing/charges/meta/timestamps.go": 220, + "openmeter/billing/charges/meta/triggers.go": 113, + "openmeter/billing/charges/models/chargemeta/mixin.go": 2672, + "openmeter/billing/charges/models/creditrealization/allocation.go": 629, + "openmeter/billing/charges/models/creditrealization/correction.go": 1657, + "openmeter/billing/charges/models/creditrealization/correction_test.go": 8023, + "openmeter/billing/charges/models/creditrealization/lineage.go": 749, + "openmeter/billing/charges/models/creditrealization/lineage_specs.go": 292, + "openmeter/billing/charges/models/creditrealization/mixin.go": 1084, + "openmeter/billing/charges/models/creditrealization/models.go": 867, + "openmeter/billing/charges/models/creditrealization/realizations.go": 1561, + "openmeter/billing/charges/models/invoicedusage/mixin.go": 739, + "openmeter/billing/charges/models/invoicedusage/stdinvoice.go": 290, + "openmeter/billing/charges/models/ledgertransaction/ledger.go": 358, + "openmeter/billing/charges/models/payment/errors.go": 278, + "openmeter/billing/charges/models/payment/external.go": 324, + "openmeter/billing/charges/models/payment/invoiced.go": 778, + "openmeter/billing/charges/models/payment/mixin.go": 1290, + "openmeter/billing/charges/models/payment/models.go": 830, + "openmeter/billing/charges/patch.go": 619, + "openmeter/billing/charges/service.go": 1532, + "openmeter/billing/charges/service/advance.go": 957, + "openmeter/billing/charges/service/advance_test.go": 2097, + "openmeter/billing/charges/service/base_test.go": 2426, + "openmeter/billing/charges/service/create.go": 3368, + "openmeter/billing/charges/service/creditpurchase.go": 509, + "openmeter/billing/charges/service/creditpurchase_test.go": 7564, + "openmeter/billing/charges/service/featureid_test.go": 2410, + "openmeter/billing/charges/service/gathering_preview_test.go": 366, + "openmeter/billing/charges/service/get.go": 867, + "openmeter/billing/charges/service/handlers_test.go": 2781, + "openmeter/billing/charges/service/helpers.go": 994, + "openmeter/billing/charges/service/invoicable_test.go": 30406, + "openmeter/billing/charges/service/invoice.go": 1983, + "openmeter/billing/charges/service/lineage_test.go": 4768, + "openmeter/billing/charges/service/list.go": 383, + "openmeter/billing/charges/service/patch.go": 605, + "openmeter/billing/charges/service/recognition.go": 436, + "openmeter/billing/charges/service/service.go": 987, + "openmeter/billing/charges/service/subscription.go": 428, + "openmeter/billing/charges/service/taxcode_test.go": 14901, + "openmeter/billing/charges/service/truncation_test.go": 1835, + "openmeter/billing/charges/service/usagebased_test.go": 6334, + "openmeter/billing/charges/statemachine/machine.go": 1274, + "openmeter/billing/charges/statemachine/machine_test.go": 2749, + "openmeter/billing/charges/testutils/handlers.go": 1366, + "openmeter/billing/charges/testutils/service.go": 2087, + "openmeter/billing/charges/usagebased/adapter.go": 559, + "openmeter/billing/charges/usagebased/adapter/adapter.go": 451, + "openmeter/billing/charges/usagebased/adapter/charge.go": 2220, + "openmeter/billing/charges/usagebased/adapter/creditallocation.go": 417, + "openmeter/billing/charges/usagebased/adapter/detailedline.go": 1796, + "openmeter/billing/charges/usagebased/adapter/detailedline_test.go": 5092, + "openmeter/billing/charges/usagebased/adapter/invoicedusage.go": 276, + "openmeter/billing/charges/usagebased/adapter/mapper.go": 1284, + "openmeter/billing/charges/usagebased/adapter/payment.go": 464, + "openmeter/billing/charges/usagebased/adapter/realizationrun.go": 786, + "openmeter/billing/charges/usagebased/charge.go": 1696, + "openmeter/billing/charges/usagebased/const.go": 24, + "openmeter/billing/charges/usagebased/detailedline.go": 899, + "openmeter/billing/charges/usagebased/detailedline_uniqueref.go": 477, + "openmeter/billing/charges/usagebased/errors.go": 312, + "openmeter/billing/charges/usagebased/handler.go": 1630, + "openmeter/billing/charges/usagebased/rating.go": 640, + "openmeter/billing/charges/usagebased/ratingengine.go": 222, + "openmeter/billing/charges/usagebased/realizationrun.go": 4023, + "openmeter/billing/charges/usagebased/realizationrun_test.go": 2139, + "openmeter/billing/charges/usagebased/service.go": 1293, + "openmeter/billing/charges/usagebased/service/create.go": 1201, + "openmeter/billing/charges/usagebased/service/creditheninvoice.go": 6749, + "openmeter/billing/charges/usagebased/service/creditheninvoice_test.go": 3721, + "openmeter/billing/charges/usagebased/service/creditsonly.go": 1895, + "openmeter/billing/charges/usagebased/service/currenttotals.go": 561, + "openmeter/billing/charges/usagebased/service/get.go": 1346, + "openmeter/billing/charges/usagebased/service/lineengine.go": 5507, + "openmeter/billing/charges/usagebased/service/lineengine_test.go": 757, + "openmeter/billing/charges/usagebased/service/linemapper.go": 961, + "openmeter/billing/charges/usagebased/service/linemapper_test.go": 2362, + "openmeter/billing/charges/usagebased/service/payments.go": 976, + "openmeter/billing/charges/usagebased/service/rating/delta/README.md": 919, + "openmeter/billing/charges/usagebased/service/rating/delta/base_test.go": 759, + "openmeter/billing/charges/usagebased/service/rating/delta/dynamic_test.go": 3131, + "openmeter/billing/charges/usagebased/service/rating/delta/engine.go": 1278, + "openmeter/billing/charges/usagebased/service/rating/delta/engine_test.go": 3028, + "openmeter/billing/charges/usagebased/service/rating/delta/package_test.go": 3009, + "openmeter/billing/charges/usagebased/service/rating/delta/tieredgraduated_test.go": 5015, + "openmeter/billing/charges/usagebased/service/rating/delta/tieredvolume_test.go": 5472, + "openmeter/billing/charges/usagebased/service/rating/delta/uniquereferenceid.go": 179, + "openmeter/billing/charges/usagebased/service/rating/delta/unit_test.go": 2730, + "openmeter/billing/charges/usagebased/service/rating/details.go": 2683, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/README.md": 1510, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go": 3498, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go": 11735, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/uniquereferenceid.go": 325, + "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go": 885, + "openmeter/billing/charges/usagebased/service/rating/service.go": 703, + "openmeter/billing/charges/usagebased/service/rating/service_test.go": 5299, + "openmeter/billing/charges/usagebased/service/rating/subtract/README.md": 994, + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go": 2164, + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract_test.go": 12069, + "openmeter/billing/charges/usagebased/service/rating/subtract/uniquereferenceid.go": 423, + "openmeter/billing/charges/usagebased/service/rating/testutils/testutils.go": 930, + "openmeter/billing/charges/usagebased/service/rating/totals.go": 611, + "openmeter/billing/charges/usagebased/service/run/correct.go": 1755, + "openmeter/billing/charges/usagebased/service/run/create.go": 1858, + "openmeter/billing/charges/usagebased/service/run/credits.go": 1082, + "openmeter/billing/charges/usagebased/service/run/invoice.go": 866, + "openmeter/billing/charges/usagebased/service/run/payment.go": 1468, + "openmeter/billing/charges/usagebased/service/run/payment_test.go": 1900, + "openmeter/billing/charges/usagebased/service/run/preview.go": 1213, + "openmeter/billing/charges/usagebased/service/run/service.go": 605, + "openmeter/billing/charges/usagebased/service/service.go": 882, + "openmeter/billing/charges/usagebased/service/statemachine.go": 1488, + "openmeter/billing/charges/usagebased/service/subscription.go": 244, + "openmeter/billing/charges/usagebased/service/triggers.go": 1472, + "openmeter/billing/charges/usagebased/service_test.go": 231, + "openmeter/billing/charges/usagebased/statemachine.go": 1004, + "openmeter/billing/charges/worker/advance/advance.go": 713, + "openmeter/billing/charges/worker/asyncadvance/asyncadvance.go": 321, + "openmeter/billing/consts.go": 150, + "openmeter/billing/creditgrant/errors.go": 172, + "openmeter/billing/creditgrant/noop.go": 216, + "openmeter/billing/creditgrant/service.go": 1496, + "openmeter/billing/creditgrant/service/service.go": 2246, + "openmeter/billing/customer.go": 628, + "openmeter/billing/customeroverride.go": 2676, + "openmeter/billing/defaults.go": 233, + "openmeter/billing/derived.gen.go": 2404, + "openmeter/billing/discount.go": 1842, + "openmeter/billing/errors.go": 2215, + "openmeter/billing/events.go": 1300, + "openmeter/billing/eventsgathering.go": 241, + "openmeter/billing/gatheringinvoice.go": 6278, + "openmeter/billing/gatheringinvoice_test.go": 239, + "openmeter/billing/generate.go": 18, + "openmeter/billing/httpdriver/customeroverride.go": 2633, + "openmeter/billing/httpdriver/defaults.go": 38, + "openmeter/billing/httpdriver/deprecations.go": 1069, + "openmeter/billing/httpdriver/deprecations_test.go": 671, + "openmeter/billing/httpdriver/discounts.go": 473, + "openmeter/billing/httpdriver/errors.go": 264, + "openmeter/billing/httpdriver/gatheringinvoice.go": 1029, + "openmeter/billing/httpdriver/handler.go": 623, + "openmeter/billing/httpdriver/invoice.go": 7374, + "openmeter/billing/httpdriver/invoice_test.go": 1875, + "openmeter/billing/httpdriver/invoiceline.go": 8492, + "openmeter/billing/httpdriver/profile.go": 5002, + "openmeter/billing/invoice.go": 3126, + "openmeter/billing/invoicedetailedline.go": 1370, + "openmeter/billing/invoicedetailedline_test.go": 1865, + "openmeter/billing/invoiceline.go": 1301, + "openmeter/billing/invoiceline_test.go": 360, + "openmeter/billing/invoicelinediscount.go": 2925, + "openmeter/billing/invoicelinesplitgroup.go": 3514, + "openmeter/billing/invoicelinesplitgroup_test.go": 526, + "openmeter/billing/invoicelinetypes.go": 255, + "openmeter/billing/lineengine.go": 2204, + "openmeter/billing/lineengine/engine.go": 807, + "openmeter/billing/lineengine/splitlinegroup.go": 1274, + "openmeter/billing/lineengine/stdinvoice.go": 724, + "openmeter/billing/lock.go": 54, + "openmeter/billing/models/creditsapplied/model.go": 347, + "openmeter/billing/models/externalid/mixin.go": 705, + "openmeter/billing/models/externalid/model.go": 111, + "openmeter/billing/models/stddetailedline/create.go": 389, + "openmeter/billing/models/stddetailedline/derived.gen.go": 566, + "openmeter/billing/models/stddetailedline/generate.go": 20, + "openmeter/billing/models/stddetailedline/mapping.go": 580, + "openmeter/billing/models/stddetailedline/mixin.go": 865, + "openmeter/billing/models/stddetailedline/model.go": 1044, + "openmeter/billing/models/totals/mixin.go": 736, + "openmeter/billing/models/totals/model.go": 1329, + "openmeter/billing/models/totals/model_test.go": 691, + "openmeter/billing/profile.go": 3140, + "openmeter/billing/rating/const.go": 231, + "openmeter/billing/rating/detailedline.go": 1164, + "openmeter/billing/rating/detailedline_test.go": 1486, + "openmeter/billing/rating/line.go": 494, + "openmeter/billing/rating/service.go": 572, + "openmeter/billing/rating/service/billableperiod.go": 622, + "openmeter/billing/rating/service/detailedline.go": 1310, + "openmeter/billing/rating/service/mutator/commitments.go": 741, + "openmeter/billing/rating/service/mutator/credits.go": 450, + "openmeter/billing/rating/service/mutator/credits_test.go": 3980, + "openmeter/billing/rating/service/mutator/discountpercentage.go": 656, + "openmeter/billing/rating/service/mutator/discountusage.go": 1136, + "openmeter/billing/rating/service/mutator/discountusage_test.go": 527, + "openmeter/billing/rating/service/mutator/types.go": 101, + "openmeter/billing/rating/service/options_test.go": 1669, + "openmeter/billing/rating/service/pricer.go": 899, + "openmeter/billing/rating/service/rate/base.go": 585, + "openmeter/billing/rating/service/rate/dynamic.go": 278, + "openmeter/billing/rating/service/rate/dynamic_test.go": 2202, + "openmeter/billing/rating/service/rate/flat.go": 646, + "openmeter/billing/rating/service/rate/flat_test.go": 1267, + "openmeter/billing/rating/service/rate/package.go": 424, + "openmeter/billing/rating/service/rate/package_test.go": 3061, + "openmeter/billing/rating/service/rate/tiered.go": 367, + "openmeter/billing/rating/service/rate/tieredgraduated.go": 2234, + "openmeter/billing/rating/service/rate/tieredgraduated_test.go": 5896, + "openmeter/billing/rating/service/rate/tieredvolume.go": 729, + "openmeter/billing/rating/service/rate/tieredvolume_test.go": 4758, + "openmeter/billing/rating/service/rate/types.go": 505, + "openmeter/billing/rating/service/rate/unit.go": 235, + "openmeter/billing/rating/service/rate/unit_test.go": 2860, + "openmeter/billing/rating/service/service.go": 39, + "openmeter/billing/rating/service/testutil/ubptest.go": 1102, + "openmeter/billing/seq.go": 416, + "openmeter/billing/service.go": 2175, + "openmeter/billing/service/customeroverride.go": 2963, + "openmeter/billing/service/featuremeter.go": 393, + "openmeter/billing/service/gatheringinvoice.go": 1309, + "openmeter/billing/service/gatheringinvoicependinglines.go": 9005, + "openmeter/billing/service/gatheringinvoicependinglines_test.go": 1153, + "openmeter/billing/service/invoice.go": 9735, + "openmeter/billing/service/invoice_test.go": 612, + "openmeter/billing/service/invoiceapp.go": 929, + "openmeter/billing/service/invoicecalc/calculator.go": 1259, + "openmeter/billing/service/invoicecalc/collectionat.go": 825, + "openmeter/billing/service/invoicecalc/collectionat_test.go": 3301, + "openmeter/billing/service/invoicecalc/details.go": 1273, + "openmeter/billing/service/invoicecalc/details_test.go": 419, + "openmeter/billing/service/invoicecalc/discounts.go": 440, + "openmeter/billing/service/invoicecalc/draftuntil.go": 136, + "openmeter/billing/service/invoicecalc/dueat.go": 259, + "openmeter/billing/service/invoicecalc/gatheringrealtime.go": 230, + "openmeter/billing/service/invoicecalc/mock.go": 1179, + "openmeter/billing/service/invoicecalc/period.go": 333, + "openmeter/billing/service/invoicecalc/taxconfig.go": 262, + "openmeter/billing/service/invoicecalc/taxconfig_test.go": 2299, + "openmeter/billing/service/invoicelinesplitgroup.go": 525, + "openmeter/billing/service/lineengine.go": 1467, + "openmeter/billing/service/lineengine_test.go": 1459, + "openmeter/billing/service/lock.go": 186, + "openmeter/billing/service/profile.go": 4409, + "openmeter/billing/service/quantitysnapshot.go": 1936, + "openmeter/billing/service/seq.go": 440, + "openmeter/billing/service/seq_test.go": 142, + "openmeter/billing/service/service.go": 1694, + "openmeter/billing/service/stdinvoice.go": 962, + "openmeter/billing/service/stdinvoiceline.go": 2288, + "openmeter/billing/service/stdinvoicestate.go": 9580, + "openmeter/billing/service/taxcode.go": 592, + "openmeter/billing/serviceconfig.go": 241, + "openmeter/billing/stdinvoice.go": 8070, + "openmeter/billing/stdinvoice_test.go": 459, + "openmeter/billing/stdinvoicecredits.go": 51, + "openmeter/billing/stdinvoiceline.go": 7175, + "openmeter/billing/stdinvoiceline_test.go": 689, + "openmeter/billing/stdinvoicestate.go": 801, + "openmeter/billing/taxconfig.go": 833, + "openmeter/billing/testutils/lineengine.go": 557, + "openmeter/billing/validationissue.go": 1721, + "openmeter/billing/validationissue_test.go": 571, + "openmeter/billing/validators/customer/customer.go": 707, + "openmeter/billing/validators/subscription/validator.go": 712, + "openmeter/billing/worker/advance/advance.go": 1453, + "openmeter/billing/worker/asyncadvance/asyncadvance.go": 318, + "openmeter/billing/worker/collect/collect.go": 1599, + "openmeter/billing/worker/subscriptionsync/adapter.go": 336, + "openmeter/billing/worker/subscriptionsync/adapter/adapter.go": 334, + "openmeter/billing/worker/subscriptionsync/adapter/syncstate.go": 787, + "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go": 1789, + "openmeter/billing/worker/subscriptionsync/service.go": 392, + "openmeter/billing/worker/subscriptionsync/service/base_test.go": 11039, + "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go": 13612, + "openmeter/billing/worker/subscriptionsync/service/handlers.go": 715, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go": 2773, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go": 2780, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/state.go": 167, + "openmeter/billing/worker/subscriptionsync/service/reconcile.go": 478, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/feehelper.go": 328, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go": 4328, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go": 1567, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go": 1494, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go": 1428, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge.go": 1448, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge_test.go": 3695, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeflatfee.go": 1035, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeusagebased.go": 975, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go": 736, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go": 495, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go": 1614, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go": 1766, + "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go": 559, + "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go": 3035, + "openmeter/billing/worker/subscriptionsync/service/ref.go": 759, + "openmeter/billing/worker/subscriptionsync/service/repair.go": 2200, + "openmeter/billing/worker/subscriptionsync/service/service.go": 1119, + "openmeter/billing/worker/subscriptionsync/service/sync.go": 2564, + "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go": 64438, + "openmeter/billing/worker/subscriptionsync/service/sync_test.go": 41632, + "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go": 3773, + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go": 4398, + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go": 10958, + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go": 2350, + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go": 1290, + "openmeter/billing/worker/worker.go": 1792, + "openmeter/billing/workflow.go": 669, + "openmeter/cost/adapter.go": 54, + "openmeter/cost/adapter/adapter.go": 2986, + "openmeter/cost/adapter/compute.go": 1901, + "openmeter/cost/adapter/compute_test.go": 8643, + "openmeter/cost/service.go": 418, + "openmeter/cost/service/service.go": 190, + "openmeter/credit/adapter/balance_snapshot.go": 757, + "openmeter/credit/adapter/grant.go": 2140, + "openmeter/credit/adapter/transaction.go": 413, + "openmeter/credit/balance.go": 3165, + "openmeter/credit/balance/balance.go": 418, + "openmeter/credit/balance/balance_test.go": 294, + "openmeter/credit/balance/repository.go": 196, + "openmeter/credit/balance/service.go": 650, + "openmeter/credit/balance/service_test.go": 1765, + "openmeter/credit/balance/usage.go": 1010, + "openmeter/credit/connector.go": 382, + "openmeter/credit/driver/grant.go": 2803, + "openmeter/credit/engine/burnphase.go": 1083, + "openmeter/credit/engine/engine.go": 727, + "openmeter/credit/engine/engine_test.go": 2732, + "openmeter/credit/engine/grant.go": 1608, + "openmeter/credit/engine/history.go": 1697, + "openmeter/credit/engine/history_test.go": 872, + "openmeter/credit/engine/reset.go": 413, + "openmeter/credit/engine/reset_test.go": 2492, + "openmeter/credit/engine/run.go": 2720, + "openmeter/credit/engine/run_test.go": 7772, + "openmeter/credit/engine/runresult_test.go": 2923, + "openmeter/credit/errors.go": 195, + "openmeter/credit/grant.go": 1496, + "openmeter/credit/grant/events.go": 617, + "openmeter/credit/grant/events_2.go": 1258, + "openmeter/credit/grant/expiration.go": 394, + "openmeter/credit/grant/grant.go": 1066, + "openmeter/credit/grant/grant_test.go": 1562, + "openmeter/credit/grant/owner_connector.go": 547, + "openmeter/credit/grant/repo.go": 613, + "openmeter/credit/helper.go": 2957, + "openmeter/credit/hook/entitlement_hook.go": 242, + "openmeter/credit/trace.go": 312, + "openmeter/currencies/adapter.go": 159, + "openmeter/currencies/adapter/adapter.go": 356, + "openmeter/currencies/adapter/currencies.go": 1350, + "openmeter/currencies/models.go": 1100, + "openmeter/currencies/service.go": 125, + "openmeter/currencies/service/service.go": 1329, + "openmeter/currencies/service/service_test.go": 1905, + "openmeter/customer/adapter.go": 250, + "openmeter/customer/adapter/adapter.go": 385, + "openmeter/customer/adapter/customer.go": 7071, + "openmeter/customer/adapter/customer_test.go": 4173, + "openmeter/customer/adapter/entitymapping.go": 795, + "openmeter/customer/app/app.go": 196, + "openmeter/customer/customer.go": 3392, + "openmeter/customer/defaults.go": 25, + "openmeter/customer/errors.go": 700, + "openmeter/customer/event.go": 1106, + "openmeter/customer/httpdriver/apimapping.go": 1810, + "openmeter/customer/httpdriver/customer.go": 5292, + "openmeter/customer/httpdriver/handler.go": 484, + "openmeter/customer/requestvalidator.go": 579, + "openmeter/customer/service.go": 278, + "openmeter/customer/service/customer.go": 1505, + "openmeter/customer/service/hooks/entitlementvalidator.go": 419, + "openmeter/customer/service/hooks/subjectcustomer.go": 4846, + "openmeter/customer/service/hooks/subjectcustomer_test.go": 3106, + "openmeter/customer/service/ledger_hook_test.go": 772, + "openmeter/customer/service/requestvalidator.go": 65, + "openmeter/customer/service/service.go": 314, + "openmeter/customer/service/service_test.go": 2107, + "openmeter/customer/testutils/env.go": 927, + "openmeter/debug/debug.go": 561, + "openmeter/debug/httpdriver/metrics.go": 651, + "openmeter/dedupe/dedupe.go": 281, + "openmeter/dedupe/memorydedupe/memorydedupe.go": 462, + "openmeter/dedupe/memorydedupe/memorydedupe_test.go": 334, + "openmeter/dedupe/redisdedupe/keyhash.go": 270, + "openmeter/dedupe/redisdedupe/redisdedupe.go": 1419, + "openmeter/ent/db/addon.go": 2958, + "openmeter/ent/db/addon/addon.go": 2711, + "openmeter/ent/db/addon/where.go": 7550, + "openmeter/ent/db/addon_create.go": 10188, + "openmeter/ent/db/addon_delete.go": 559, + "openmeter/ent/db/addon_query.go": 5911, + "openmeter/ent/db/addon_update.go": 8737, + "openmeter/ent/db/addonratecard.go": 3903, + "openmeter/ent/db/addonratecard/addonratecard.go": 2918, + "openmeter/ent/db/addonratecard/where.go": 10704, + "openmeter/ent/db/addonratecard_create.go": 14077, + "openmeter/ent/db/addonratecard_delete.go": 609, + "openmeter/ent/db/addonratecard_query.go": 6034, + "openmeter/ent/db/addonratecard_update.go": 9477, + "openmeter/ent/db/app.go": 3122, + "openmeter/ent/db/app/app.go": 3801, + "openmeter/ent/db/app/where.go": 6758, + "openmeter/ent/db/app_create.go": 8410, + "openmeter/ent/db/app_delete.go": 549, + "openmeter/ent/db/app_query.go": 8778, + "openmeter/ent/db/app_update.go": 13121, + "openmeter/ent/db/appcustomer.go": 1857, + "openmeter/ent/db/appcustomer/appcustomer.go": 1384, + "openmeter/ent/db/appcustomer/where.go": 4341, + "openmeter/ent/db/appcustomer_create.go": 5384, + "openmeter/ent/db/appcustomer_delete.go": 595, + "openmeter/ent/db/appcustomer_query.go": 5304, + "openmeter/ent/db/appcustomer_update.go": 2228, + "openmeter/ent/db/appcustominvoicing.go": 2011, + "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go": 1580, + "openmeter/ent/db/appcustominvoicing/where.go": 3713, + "openmeter/ent/db/appcustominvoicing_create.go": 7141, + "openmeter/ent/db/appcustominvoicing_delete.go": 640, + "openmeter/ent/db/appcustominvoicing_query.go": 5694, + "openmeter/ent/db/appcustominvoicing_update.go": 4252, + "openmeter/ent/db/appcustominvoicingcustomer.go": 2287, + "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go": 1539, + "openmeter/ent/db/appcustominvoicingcustomer/where.go": 5153, + "openmeter/ent/db/appcustominvoicingcustomer_create.go": 6896, + "openmeter/ent/db/appcustominvoicingcustomer_delete.go": 689, + "openmeter/ent/db/appcustominvoicingcustomer_query.go": 6031, + "openmeter/ent/db/appcustominvoicingcustomer_update.go": 2890, + "openmeter/ent/db/appstripe.go": 2317, + "openmeter/ent/db/appstripe/appstripe.go": 1944, + "openmeter/ent/db/appstripe/where.go": 6849, + "openmeter/ent/db/appstripe_create.go": 7723, + "openmeter/ent/db/appstripe_delete.go": 584, + "openmeter/ent/db/appstripe_query.go": 5307, + "openmeter/ent/db/appstripe_update.go": 4944, + "openmeter/ent/db/appstripecustomer.go": 2286, + "openmeter/ent/db/appstripecustomer/appstripecustomer.go": 1694, + "openmeter/ent/db/appstripecustomer/where.go": 6623, + "openmeter/ent/db/appstripecustomer_create.go": 7223, + "openmeter/ent/db/appstripecustomer_delete.go": 633, + "openmeter/ent/db/appstripecustomer_query.go": 5583, + "openmeter/ent/db/appstripecustomer_update.go": 3383, + "openmeter/ent/db/balancesnapshot.go": 2323, + "openmeter/ent/db/balancesnapshot/balancesnapshot.go": 1313, + "openmeter/ent/db/balancesnapshot/where.go": 4980, + "openmeter/ent/db/balancesnapshot_create.go": 5993, + "openmeter/ent/db/balancesnapshot_delete.go": 620, + "openmeter/ent/db/balancesnapshot_query.go": 4907, + "openmeter/ent/db/balancesnapshot_update.go": 2292, + "openmeter/ent/db/billingcustomerlock.go": 970, + "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go": 474, + "openmeter/ent/db/billingcustomerlock/where.go": 2209, + "openmeter/ent/db/billingcustomerlock_create.go": 4246, + "openmeter/ent/db/billingcustomerlock_delete.go": 646, + "openmeter/ent/db/billingcustomerlock_query.go": 4373, + "openmeter/ent/db/billingcustomerlock_update.go": 1703, + "openmeter/ent/db/billingcustomeroverride.go": 4340, + "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go": 3012, + "openmeter/ent/db/billingcustomeroverride/where.go": 12214, + "openmeter/ent/db/billingcustomeroverride_create.go": 16310, + "openmeter/ent/db/billingcustomeroverride_delete.go": 671, + "openmeter/ent/db/billingcustomeroverride_query.go": 6558, + "openmeter/ent/db/billingcustomeroverride_update.go": 10513, + "openmeter/ent/db/billinginvoice.go": 11668, + "openmeter/ent/db/billinginvoice/billinginvoice.go": 10054, + "openmeter/ent/db/billinginvoice/where.go": 44328, + "openmeter/ent/db/billinginvoice_create.go": 40888, + "openmeter/ent/db/billinginvoice_delete.go": 615, + "openmeter/ent/db/billinginvoice_query.go": 12176, + "openmeter/ent/db/billinginvoice_update.go": 32403, + "openmeter/ent/db/billinginvoiceflatfeelineconfig.go": 1567, + "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go": 980, + "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go": 3421, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go": 7109, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go": 721, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go": 4760, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go": 3611, + "openmeter/ent/db/billinginvoiceline.go": 11610, + "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go": 10741, + "openmeter/ent/db/billinginvoiceline/where.go": 30066, + "openmeter/ent/db/billinginvoiceline_create.go": 34514, + "openmeter/ent/db/billinginvoiceline_delete.go": 640, + "openmeter/ent/db/billinginvoiceline_query.go": 18590, + "openmeter/ent/db/billinginvoiceline_update.go": 36857, + "openmeter/ent/db/billinginvoicelinediscount.go": 3450, + "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go": 2166, + "openmeter/ent/db/billinginvoicelinediscount/where.go": 11196, + "openmeter/ent/db/billinginvoicelinediscount_create.go": 13842, + "openmeter/ent/db/billinginvoicelinediscount_delete.go": 690, + "openmeter/ent/db/billinginvoicelinediscount_query.go": 5378, + "openmeter/ent/db/billinginvoicelinediscount_update.go": 8442, + "openmeter/ent/db/billinginvoicelineusagediscount.go": 3032, + "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go": 1933, + "openmeter/ent/db/billinginvoicelineusagediscount/where.go": 9438, + "openmeter/ent/db/billinginvoicelineusagediscount_create.go": 12211, + "openmeter/ent/db/billinginvoicelineusagediscount_delete.go": 721, + "openmeter/ent/db/billinginvoicelineusagediscount_query.go": 5556, + "openmeter/ent/db/billinginvoicelineusagediscount_update.go": 7332, + "openmeter/ent/db/billinginvoicesplitlinegroup.go": 5809, + "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go": 4350, + "openmeter/ent/db/billinginvoicesplitlinegroup/where.go": 17782, + "openmeter/ent/db/billinginvoicesplitlinegroup_create.go": 17564, + "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go": 702, + "openmeter/ent/db/billinginvoicesplitlinegroup_query.go": 9104, + "openmeter/ent/db/billinginvoicesplitlinegroup_update.go": 10926, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go": 2013, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go": 1126, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go": 5457, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go": 8599, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go": 740, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go": 4857, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go": 4434, + "openmeter/ent/db/billinginvoicevalidationissue.go": 2598, + "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go": 1721, + "openmeter/ent/db/billinginvoicevalidationissue/where.go": 8433, + "openmeter/ent/db/billinginvoicevalidationissue_create.go": 10313, + "openmeter/ent/db/billinginvoicevalidationissue_delete.go": 709, + "openmeter/ent/db/billinginvoicevalidationissue_query.go": 5447, + "openmeter/ent/db/billinginvoicevalidationissue_update.go": 6143, + "openmeter/ent/db/billinginvoicewriteschemalevel.go": 949, + "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go": 390, + "openmeter/ent/db/billinginvoicewriteschemalevel/where.go": 1310, + "openmeter/ent/db/billinginvoicewriteschemalevel_create.go": 4502, + "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go": 715, + "openmeter/ent/db/billinginvoicewriteschemalevel_query.go": 4730, + "openmeter/ent/db/billinginvoicewriteschemalevel_update.go": 2070, + "openmeter/ent/db/billingprofile.go": 4955, + "openmeter/ent/db/billingprofile/billingprofile.go": 4238, + "openmeter/ent/db/billingprofile/where.go": 17822, + "openmeter/ent/db/billingprofile_create.go": 16353, + "openmeter/ent/db/billingprofile_delete.go": 615, + "openmeter/ent/db/billingprofile_query.go": 8311, + "openmeter/ent/db/billingprofile_update.go": 12424, + "openmeter/ent/db/billingsequencenumbers.go": 1124, + "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go": 509, + "openmeter/ent/db/billingsequencenumbers/where.go": 2563, + "openmeter/ent/db/billingsequencenumbers_create.go": 4385, + "openmeter/ent/db/billingsequencenumbers_delete.go": 664, + "openmeter/ent/db/billingsequencenumbers_query.go": 4464, + "openmeter/ent/db/billingsequencenumbers_update.go": 2000, + "openmeter/ent/db/billingstandardinvoicedetailedline.go": 6742, + "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go": 4620, + "openmeter/ent/db/billingstandardinvoicedetailedline/where.go": 21344, + "openmeter/ent/db/billingstandardinvoicedetailedline_create.go": 26094, + "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go": 740, + "openmeter/ent/db/billingstandardinvoicedetailedline_query.go": 8003, + "openmeter/ent/db/billingstandardinvoicedetailedline_update.go": 18188, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go": 3265, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go": 1939, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go": 10594, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go": 13901, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go": 827, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go": 6171, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go": 8168, + "openmeter/ent/db/billingworkflowconfig.go": 4166, + "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go": 3092, + "openmeter/ent/db/billingworkflowconfig/where.go": 9730, + "openmeter/ent/db/billingworkflowconfig_create.go": 15003, + "openmeter/ent/db/billingworkflowconfig_delete.go": 659, + "openmeter/ent/db/billingworkflowconfig_query.go": 6522, + "openmeter/ent/db/billingworkflowconfig_update.go": 10492, + "openmeter/ent/db/charge.go": 3042, + "openmeter/ent/db/charge/charge.go": 3111, + "openmeter/ent/db/charge/where.go": 7711, + "openmeter/ent/db/charge_create.go": 7008, + "openmeter/ent/db/charge_delete.go": 565, + "openmeter/ent/db/charge_query.go": 8258, + "openmeter/ent/db/charge_update.go": 6304, + "openmeter/ent/db/chargecreditpurchase.go": 7501, + "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go": 6132, + "openmeter/ent/db/chargecreditpurchase/where.go": 21234, + "openmeter/ent/db/chargecreditpurchase_create.go": 21098, + "openmeter/ent/db/chargecreditpurchase_delete.go": 652, + "openmeter/ent/db/chargecreditpurchase_query.go": 10768, + "openmeter/ent/db/chargecreditpurchase_update.go": 14380, + "openmeter/ent/db/chargecreditpurchasecreditgrant.go": 2123, + "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go": 1346, + "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go": 5866, + "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go": 7566, + "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go": 721, + "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go": 5535, + "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go": 3391, + "openmeter/ent/db/chargecreditpurchaseexternalpayment.go": 3368, + "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go": 2104, + "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go": 10616, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go": 13521, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go": 746, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go": 5693, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go": 7158, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go": 3871, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go": 2569, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go": 12534, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go": 14237, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go": 746, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go": 6447, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go": 7265, + "openmeter/ent/db/chargeflatfee.go": 7663, + "openmeter/ent/db/chargeflatfee/chargeflatfee.go": 6692, + "openmeter/ent/db/chargeflatfee/where.go": 23005, + "openmeter/ent/db/chargeflatfee_create.go": 23176, + "openmeter/ent/db/chargeflatfee_delete.go": 609, + "openmeter/ent/db/chargeflatfee_query.go": 10091, + "openmeter/ent/db/chargeflatfee_update.go": 15797, + "openmeter/ent/db/chargeflatfeerun.go": 5263, + "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go": 4696, + "openmeter/ent/db/chargeflatfeerun/where.go": 13288, + "openmeter/ent/db/chargeflatfeerun_create.go": 16245, + "openmeter/ent/db/chargeflatfeerun_delete.go": 627, + "openmeter/ent/db/chargeflatfeerun_query.go": 9263, + "openmeter/ent/db/chargeflatfeerun_update.go": 14475, + "openmeter/ent/db/chargeflatfeeruncreditallocations.go": 3882, + "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go": 2834, + "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go": 10863, + "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go": 12962, + "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go": 734, + "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go": 7940, + "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go": 9368, + "openmeter/ent/db/chargeflatfeerundetailedline.go": 6081, + "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go": 3885, + "openmeter/ent/db/chargeflatfeerundetailedline/where.go": 19904, + "openmeter/ent/db/chargeflatfeerundetailedline_create.go": 23750, + "openmeter/ent/db/chargeflatfeerundetailedline_delete.go": 702, + "openmeter/ent/db/chargeflatfeerundetailedline_query.go": 6023, + "openmeter/ent/db/chargeflatfeerundetailedline_update.go": 13772, + "openmeter/ent/db/chargeflatfeeruninvoicedusage.go": 3585, + "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go": 2121, + "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go": 11300, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go": 13608, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go": 709, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go": 5396, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go": 6948, + "openmeter/ent/db/chargeflatfeerunpayment.go": 3606, + "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go": 2472, + "openmeter/ent/db/chargeflatfeerunpayment/where.go": 11313, + "openmeter/ent/db/chargeflatfeerunpayment_create.go": 12729, + "openmeter/ent/db/chargeflatfeerunpayment_delete.go": 671, + "openmeter/ent/db/chargeflatfeerunpayment_query.go": 5917, + "openmeter/ent/db/chargeflatfeerunpayment_update.go": 6612, + "openmeter/ent/db/chargessearchv1.go": 4296, + "openmeter/ent/db/chargessearchv1/chargessearchv1.go": 2898, + "openmeter/ent/db/chargessearchv1/where.go": 16245, + "openmeter/ent/db/chargessearchv1_query.go": 3678, + "openmeter/ent/db/chargeusagebased.go": 7578, + "openmeter/ent/db/chargeusagebased/chargeusagebased.go": 6926, + "openmeter/ent/db/chargeusagebased/where.go": 21487, + "openmeter/ent/db/chargeusagebased_create.go": 22219, + "openmeter/ent/db/chargeusagebased_delete.go": 627, + "openmeter/ent/db/chargeusagebased_query.go": 11059, + "openmeter/ent/db/chargeusagebased_update.go": 16200, + "openmeter/ent/db/chargeusagebasedruncreditallocations.go": 3692, + "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go": 2529, + "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go": 10885, + "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go": 12932, + "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go": 752, + "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go": 7306, + "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go": 8553, + "openmeter/ent/db/chargeusagebasedrundetailedline.go": 6854, + "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go": 4633, + "openmeter/ent/db/chargeusagebasedrundetailedline/where.go": 22641, + "openmeter/ent/db/chargeusagebasedrundetailedline_create.go": 26528, + "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go": 721, + "openmeter/ent/db/chargeusagebasedrundetailedline_query.go": 7576, + "openmeter/ent/db/chargeusagebasedrundetailedline_update.go": 17322, + "openmeter/ent/db/chargeusagebasedruninvoicedusage.go": 3641, + "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go": 2130, + "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go": 11576, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go": 13972, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go": 727, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go": 5515, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go": 7108, + "openmeter/ent/db/chargeusagebasedrunpayment.go": 3417, + "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go": 2169, + "openmeter/ent/db/chargeusagebasedrunpayment/where.go": 11378, + "openmeter/ent/db/chargeusagebasedrunpayment_create.go": 12771, + "openmeter/ent/db/chargeusagebasedrunpayment_delete.go": 690, + "openmeter/ent/db/chargeusagebasedrunpayment_query.go": 5282, + "openmeter/ent/db/chargeusagebasedrunpayment_update.go": 6668, + "openmeter/ent/db/chargeusagebasedruns.go": 5937, + "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go": 5524, + "openmeter/ent/db/chargeusagebasedruns/where.go": 14871, + "openmeter/ent/db/chargeusagebasedruns_create.go": 16858, + "openmeter/ent/db/chargeusagebasedruns_delete.go": 652, + "openmeter/ent/db/chargeusagebasedruns_query.go": 11045, + "openmeter/ent/db/chargeusagebasedruns_update.go": 14951, + "openmeter/ent/db/client.go": 175295, + "openmeter/ent/db/creditrealizationlineage.go": 2355, + "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go": 1859, + "openmeter/ent/db/creditrealizationlineage/where.go": 6791, + "openmeter/ent/db/creditrealizationlineage_create.go": 6221, + "openmeter/ent/db/creditrealizationlineage_delete.go": 677, + "openmeter/ent/db/creditrealizationlineage_query.go": 5963, + "openmeter/ent/db/creditrealizationlineage_update.go": 3245, + "openmeter/ent/db/creditrealizationlineagesegment.go": 2443, + "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go": 1677, + "openmeter/ent/db/creditrealizationlineagesegment/where.go": 6797, + "openmeter/ent/db/creditrealizationlineagesegment_create.go": 9247, + "openmeter/ent/db/creditrealizationlineagesegment_delete.go": 721, + "openmeter/ent/db/creditrealizationlineagesegment_query.go": 5499, + "openmeter/ent/db/creditrealizationlineagesegment_update.go": 4859, + "openmeter/ent/db/currencycostbasis.go": 2085, + "openmeter/ent/db/currencycostbasis/currencycostbasis.go": 1345, + "openmeter/ent/db/currencycostbasis/where.go": 5756, + "openmeter/ent/db/currencycostbasis_create.go": 6246, + "openmeter/ent/db/currencycostbasis_delete.go": 634, + "openmeter/ent/db/currencycostbasis_query.go": 4980, + "openmeter/ent/db/currencycostbasis_update.go": 2280, + "openmeter/ent/db/cursor.go": 23838, + "openmeter/ent/db/customcurrency.go": 1810, + "openmeter/ent/db/customcurrency/customcurrency.go": 1392, + "openmeter/ent/db/customcurrency/where.go": 4991, + "openmeter/ent/db/customcurrency_create.go": 6470, + "openmeter/ent/db/customcurrency_delete.go": 615, + "openmeter/ent/db/customcurrency_query.go": 4987, + "openmeter/ent/db/customcurrency_update.go": 4328, + "openmeter/ent/db/customer.go": 4871, + "openmeter/ent/db/customer/customer.go": 5039, + "openmeter/ent/db/customer/where.go": 15210, + "openmeter/ent/db/customer_create.go": 16084, + "openmeter/ent/db/customer_delete.go": 577, + "openmeter/ent/db/customer_query.go": 10188, + "openmeter/ent/db/customer_update.go": 19923, + "openmeter/ent/db/customersubjects.go": 1647, + "openmeter/ent/db/customersubjects/customersubjects.go": 1048, + "openmeter/ent/db/customersubjects/where.go": 4000, + "openmeter/ent/db/customersubjects_create.go": 4925, + "openmeter/ent/db/customersubjects_delete.go": 627, + "openmeter/ent/db/customersubjects_query.go": 4916, + "openmeter/ent/db/customersubjects_update.go": 1980, + "openmeter/ent/db/ent.go": 7319, + "openmeter/ent/db/entitlement.go": 5018, + "openmeter/ent/db/entitlement/entitlement.go": 4388, + "openmeter/ent/db/entitlement/where.go": 13767, + "openmeter/ent/db/entitlement_create.go": 13192, + "openmeter/ent/db/entitlement_delete.go": 596, + "openmeter/ent/db/entitlement_query.go": 8073, + "openmeter/ent/db/entitlement_update.go": 10937, + "openmeter/ent/db/entmixinaccessor.go": 16063, + "openmeter/ent/db/enttest/enttest.go": 476, + "openmeter/ent/db/expose.go": 1857, + "openmeter/ent/db/feature.go": 5013, + "openmeter/ent/db/feature/feature.go": 4525, + "openmeter/ent/db/feature/where.go": 15628, + "openmeter/ent/db/feature_create.go": 16238, + "openmeter/ent/db/feature_delete.go": 575, + "openmeter/ent/db/feature_query.go": 8733, + "openmeter/ent/db/feature_update.go": 16339, + "openmeter/ent/db/grant.go": 3267, + "openmeter/ent/db/grant/grant.go": 1928, + "openmeter/ent/db/grant/where.go": 8366, + "openmeter/ent/db/grant_create.go": 8270, + "openmeter/ent/db/grant_delete.go": 562, + "openmeter/ent/db/grant_query.go": 4572, + "openmeter/ent/db/grant_update.go": 3185, + "openmeter/ent/db/hook/hook.go": 11684, + "openmeter/ent/db/ledgeraccount.go": 1974, + "openmeter/ent/db/ledgeraccount/ledgeraccount.go": 1541, + "openmeter/ent/db/ledgeraccount/where.go": 4182, + "openmeter/ent/db/ledgeraccount_create.go": 6398, + "openmeter/ent/db/ledgeraccount_delete.go": 609, + "openmeter/ent/db/ledgeraccount_query.go": 5646, + "openmeter/ent/db/ledgeraccount_update.go": 5215, + "openmeter/ent/db/ledgerbreakagerecord.go": 3736, + "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go": 2628, + "openmeter/ent/db/ledgerbreakagerecord/where.go": 15204, + "openmeter/ent/db/ledgerbreakagerecord_create.go": 10129, + "openmeter/ent/db/ledgerbreakagerecord_delete.go": 652, + "openmeter/ent/db/ledgerbreakagerecord_query.go": 4405, + "openmeter/ent/db/ledgerbreakagerecord_update.go": 3089, + "openmeter/ent/db/ledgercustomeraccount.go": 1659, + "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go": 967, + "openmeter/ent/db/ledgercustomeraccount/where.go": 5512, + "openmeter/ent/db/ledgercustomeraccount_create.go": 5997, + "openmeter/ent/db/ledgercustomeraccount_delete.go": 659, + "openmeter/ent/db/ledgercustomeraccount_query.go": 4437, + "openmeter/ent/db/ledgercustomeraccount_update.go": 2178, + "openmeter/ent/db/ledgerentry.go": 2379, + "openmeter/ent/db/ledgerentry/ledgerentry.go": 1648, + "openmeter/ent/db/ledgerentry/where.go": 5881, + "openmeter/ent/db/ledgerentry_create.go": 6678, + "openmeter/ent/db/ledgerentry_delete.go": 596, + "openmeter/ent/db/ledgerentry_query.go": 5433, + "openmeter/ent/db/ledgerentry_update.go": 2554, + "openmeter/ent/db/ledgersubaccount.go": 2277, + "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go": 1712, + "openmeter/ent/db/ledgersubaccount/where.go": 4979, + "openmeter/ent/db/ledgersubaccount_create.go": 6746, + "openmeter/ent/db/ledgersubaccount_delete.go": 627, + "openmeter/ent/db/ledgersubaccount_query.go": 6240, + "openmeter/ent/db/ledgersubaccount_update.go": 3978, + "openmeter/ent/db/ledgersubaccountroute.go": 3269, + "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go": 2174, + "openmeter/ent/db/ledgersubaccountroute/where.go": 11897, + "openmeter/ent/db/ledgersubaccountroute_create.go": 8107, + "openmeter/ent/db/ledgersubaccountroute_delete.go": 659, + "openmeter/ent/db/ledgersubaccountroute_query.go": 5840, + "openmeter/ent/db/ledgersubaccountroute_update.go": 4179, + "openmeter/ent/db/ledgertransaction.go": 2103, + "openmeter/ent/db/ledgertransaction/ledgertransaction.go": 1462, + "openmeter/ent/db/ledgertransaction/where.go": 4556, + "openmeter/ent/db/ledgertransaction_create.go": 6606, + "openmeter/ent/db/ledgertransaction_delete.go": 634, + "openmeter/ent/db/ledgertransaction_query.go": 5653, + "openmeter/ent/db/ledgertransaction_update.go": 3929, + "openmeter/ent/db/ledgertransactiongroup.go": 1752, + "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go": 1109, + "openmeter/ent/db/ledgertransactiongroup/where.go": 3377, + "openmeter/ent/db/ledgertransactiongroup_create.go": 6356, + "openmeter/ent/db/ledgertransactiongroup_delete.go": 665, + "openmeter/ent/db/ledgertransactiongroup_query.go": 5237, + "openmeter/ent/db/ledgertransactiongroup_update.go": 4016, + "openmeter/ent/db/llmcostprice.go": 3078, + "openmeter/ent/db/llmcostprice/llmcostprice.go": 2175, + "openmeter/ent/db/llmcostprice/where.go": 10173, + "openmeter/ent/db/llmcostprice_create.go": 13004, + "openmeter/ent/db/llmcostprice_delete.go": 602, + "openmeter/ent/db/llmcostprice_query.go": 4151, + "openmeter/ent/db/llmcostprice_update.go": 7091, + "openmeter/ent/db/meter.go": 2694, + "openmeter/ent/db/meter/meter.go": 1813, + "openmeter/ent/db/meter/where.go": 7122, + "openmeter/ent/db/meter_create.go": 9109, + "openmeter/ent/db/meter_delete.go": 562, + "openmeter/ent/db/meter_query.go": 4594, + "openmeter/ent/db/meter_update.go": 5295, + "openmeter/ent/db/migrate/migrate.go": 945, + "openmeter/ent/db/migrate/schema.go": 63835, + "openmeter/ent/db/notificationchannel.go": 2345, + "openmeter/ent/db/notificationchannel/notificationchannel.go": 1605, + "openmeter/ent/db/notificationchannel/where.go": 4553, + "openmeter/ent/db/notificationchannel_create.go": 8742, + "openmeter/ent/db/notificationchannel_delete.go": 646, + "openmeter/ent/db/notificationchannel_query.go": 5359, + "openmeter/ent/db/notificationchannel_update.go": 5437, + "openmeter/ent/db/notificationevent.go": 2003, + "openmeter/ent/db/notificationevent/notificationevent.go": 1536, + "openmeter/ent/db/notificationevent/where.go": 4041, + "openmeter/ent/db/notificationevent_create.go": 6005, + "openmeter/ent/db/notificationevent_delete.go": 634, + "openmeter/ent/db/notificationevent_query.go": 6067, + "openmeter/ent/db/notificationevent_update.go": 3717, + "openmeter/ent/db/notificationeventdeliverystatus.go": 2522, + "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go": 1670, + "openmeter/ent/db/notificationeventdeliverystatus/where.go": 6645, + "openmeter/ent/db/notificationeventdeliverystatus_create.go": 9552, + "openmeter/ent/db/notificationeventdeliverystatus_delete.go": 721, + "openmeter/ent/db/notificationeventdeliverystatus_query.go": 5818, + "openmeter/ent/db/notificationeventdeliverystatus_update.go": 5811, + "openmeter/ent/db/notificationrule.go": 2449, + "openmeter/ent/db/notificationrule/notificationrule.go": 1942, + "openmeter/ent/db/notificationrule/where.go": 4611, + "openmeter/ent/db/notificationrule_create.go": 8757, + "openmeter/ent/db/notificationrule_delete.go": 627, + "openmeter/ent/db/notificationrule_query.go": 5952, + "openmeter/ent/db/notificationrule_update.go": 6697, + "openmeter/ent/db/organizationdefaulttaxcodes.go": 2198, + "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go": 1560, + "openmeter/ent/db/organizationdefaulttaxcodes/where.go": 5570, + "openmeter/ent/db/organizationdefaulttaxcodes_create.go": 7291, + "openmeter/ent/db/organizationdefaulttaxcodes_delete.go": 696, + "openmeter/ent/db/organizationdefaulttaxcodes_query.go": 6086, + "openmeter/ent/db/organizationdefaulttaxcodes_update.go": 4648, + "openmeter/ent/db/paginate.go": 31510, + "openmeter/ent/db/plan.go": 3070, + "openmeter/ent/db/plan/plan.go": 2799, + "openmeter/ent/db/plan/where.go": 8256, + "openmeter/ent/db/plan_create.go": 10622, + "openmeter/ent/db/plan_delete.go": 552, + "openmeter/ent/db/plan_query.go": 5803, + "openmeter/ent/db/plan_update.go": 8932, + "openmeter/ent/db/planaddon.go": 2416, + "openmeter/ent/db/planaddon/planaddon.go": 1620, + "openmeter/ent/db/planaddon/where.go": 5772, + "openmeter/ent/db/planaddon_create.go": 7865, + "openmeter/ent/db/planaddon_delete.go": 584, + "openmeter/ent/db/planaddon_query.go": 5207, + "openmeter/ent/db/planaddon_update.go": 3590, + "openmeter/ent/db/planphase.go": 2443, + "openmeter/ent/db/planphase/planphase.go": 1777, + "openmeter/ent/db/planphase/where.go": 7072, + "openmeter/ent/db/planphase_create.go": 8480, + "openmeter/ent/db/planphase_delete.go": 584, + "openmeter/ent/db/planphase_query.go": 5293, + "openmeter/ent/db/planphase_update.go": 5961, + "openmeter/ent/db/planratecard.go": 3886, + "openmeter/ent/db/planratecard/planratecard.go": 2918, + "openmeter/ent/db/planratecard/where.go": 10601, + "openmeter/ent/db/planratecard_create.go": 13927, + "openmeter/ent/db/planratecard_delete.go": 602, + "openmeter/ent/db/planratecard_query.go": 6004, + "openmeter/ent/db/planratecard_update.go": 9406, + "openmeter/ent/db/predicate/predicate.go": 3916, + "openmeter/ent/db/runtime.go": 59504, + "openmeter/ent/db/runtime/runtime.go": 86, + "openmeter/ent/db/setorclear.go": 42344, + "openmeter/ent/db/subject.go": 1682, + "openmeter/ent/db/subject/subject.go": 1004, + "openmeter/ent/db/subject/where.go": 4944, + "openmeter/ent/db/subject_create.go": 6857, + "openmeter/ent/db/subject_delete.go": 571, + "openmeter/ent/db/subject_query.go": 3986, + "openmeter/ent/db/subject_update.go": 3412, + "openmeter/ent/db/subscription.go": 4861, + "openmeter/ent/db/subscription/subscription.go": 5292, + "openmeter/ent/db/subscription/where.go": 11352, + "openmeter/ent/db/subscription_create.go": 13773, + "openmeter/ent/db/subscription_delete.go": 602, + "openmeter/ent/db/subscription_query.go": 11258, + "openmeter/ent/db/subscription_update.go": 16979, + "openmeter/ent/db/subscriptionaddon.go": 2300, + "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go": 1843, + "openmeter/ent/db/subscriptionaddon/where.go": 5109, + "openmeter/ent/db/subscriptionaddon_create.go": 6928, + "openmeter/ent/db/subscriptionaddon_delete.go": 634, + "openmeter/ent/db/subscriptionaddon_query.go": 6345, + "openmeter/ent/db/subscriptionaddon_update.go": 4106, + "openmeter/ent/db/subscriptionaddonquantity.go": 2076, + "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go": 1444, + "openmeter/ent/db/subscriptionaddonquantity/where.go": 5297, + "openmeter/ent/db/subscriptionaddonquantity_create.go": 6711, + "openmeter/ent/db/subscriptionaddonquantity_delete.go": 684, + "openmeter/ent/db/subscriptionaddonquantity_query.go": 5342, + "openmeter/ent/db/subscriptionaddonquantity_update.go": 2458, + "openmeter/ent/db/subscriptionbillingsyncstate.go": 1834, + "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go": 1076, + "openmeter/ent/db/subscriptionbillingsyncstate/where.go": 4042, + "openmeter/ent/db/subscriptionbillingsyncstate_create.go": 6387, + "openmeter/ent/db/subscriptionbillingsyncstate_delete.go": 702, + "openmeter/ent/db/subscriptionbillingsyncstate_query.go": 5394, + "openmeter/ent/db/subscriptionbillingsyncstate_update.go": 2837, + "openmeter/ent/db/subscriptionitem.go": 5876, + "openmeter/ent/db/subscriptionitem/subscriptionitem.go": 5394, + "openmeter/ent/db/subscriptionitem/where.go": 16275, + "openmeter/ent/db/subscriptionitem_create.go": 20053, + "openmeter/ent/db/subscriptionitem_delete.go": 627, + "openmeter/ent/db/subscriptionitem_query.go": 10167, + "openmeter/ent/db/subscriptionitem_update.go": 19231, + "openmeter/ent/db/subscriptionphase.go": 3547, + "openmeter/ent/db/subscriptionphase/subscriptionphase.go": 3778, + "openmeter/ent/db/subscriptionphase/where.go": 8466, + "openmeter/ent/db/subscriptionphase_create.go": 10298, + "openmeter/ent/db/subscriptionphase_delete.go": 634, + "openmeter/ent/db/subscriptionphase_query.go": 9619, + "openmeter/ent/db/subscriptionphase_update.go": 12938, + "openmeter/ent/db/taxcode.go": 5031, + "openmeter/ent/db/taxcode/taxcode.go": 7357, + "openmeter/ent/db/taxcode/where.go": 8106, + "openmeter/ent/db/taxcode_create.go": 12145, + "openmeter/ent/db/taxcode_delete.go": 575, + "openmeter/ent/db/taxcode_query.go": 15704, + "openmeter/ent/db/taxcode_update.go": 26811, + "openmeter/ent/db/tx.go": 5982, + "openmeter/ent/db/usagereset.go": 2177, + "openmeter/ent/db/usagereset/usagereset.go": 1354, + "openmeter/ent/db/usagereset/where.go": 5584, + "openmeter/ent/db/usagereset_create.go": 6345, + "openmeter/ent/db/usagereset_delete.go": 590, + "openmeter/ent/db/usagereset_query.go": 4740, + "openmeter/ent/db/usagereset_update.go": 2447, + "openmeter/ent/entc.go": 297, + "openmeter/ent/generate.go": 14, + "openmeter/ent/schema/addon.go": 795, + "openmeter/ent/schema/app.go": 588, + "openmeter/ent/schema/app_stripe.go": 789, + "openmeter/ent/schema/appcustominvoicing.go": 704, + "openmeter/ent/schema/balance_snapshot.go": 388, + "openmeter/ent/schema/billing.go": 8972, + "openmeter/ent/schema/charges.go": 1043, + "openmeter/ent/schema/chargescreditpurchase.go": 1453, + "openmeter/ent/schema/chargesflatfee.go": 2369, + "openmeter/ent/schema/chargesusagebased.go": 2655, + "openmeter/ent/schema/creditrealizationlineage.go": 964, + "openmeter/ent/schema/custom_currencies.go": 589, + "openmeter/ent/schema/customer.go": 1208, + "openmeter/ent/schema/entitlement.go": 956, + "openmeter/ent/schema/feature.go": 820, + "openmeter/ent/schema/grant.go": 507, + "openmeter/ent/schema/ledger_account.go": 975, + "openmeter/ent/schema/ledger_breakage_record.go": 828, + "openmeter/ent/schema/ledger_customer_account.go": 285, + "openmeter/ent/schema/ledger_entry.go": 429, + "openmeter/ent/schema/ledger_transaction.go": 279, + "openmeter/ent/schema/ledger_transaction_group.go": 162, + "openmeter/ent/schema/llmcostprice.go": 680, + "openmeter/ent/schema/meter.go": 336, + "openmeter/ent/schema/notification.go": 2562, + "openmeter/ent/schema/organizationdefaulttaxcodes.go": 406, + "openmeter/ent/schema/planaddon.go": 381, + "openmeter/ent/schema/productcatalog.go": 1240, + "openmeter/ent/schema/ratecard.go": 403, + "openmeter/ent/schema/subject.go": 452, + "openmeter/ent/schema/subscription.go": 1961, + "openmeter/ent/schema/subscription_addon.go": 512, + "openmeter/ent/schema/subscriptionbillingsync.go": 284, + "openmeter/ent/schema/taxcode.go": 729, + "openmeter/ent/schema/usage_reset.go": 302, + "openmeter/ent/tx/enttx.go": 185, + "openmeter/entitlement/access.go": 60, + "openmeter/entitlement/adapter/entitlement.go": 7892, + "openmeter/entitlement/adapter/entitlement_test.go": 9189, + "openmeter/entitlement/adapter/transaction.go": 408, + "openmeter/entitlement/adapter/usage_reset.go": 337, + "openmeter/entitlement/balanceworker/entitlementhandler.go": 2927, + "openmeter/entitlement/balanceworker/events/recalculate.go": 763, + "openmeter/entitlement/balanceworker/filters.go": 1494, + "openmeter/entitlement/balanceworker/filters/filter.go": 329, + "openmeter/entitlement/balanceworker/filters/highwatermark.go": 901, + "openmeter/entitlement/balanceworker/filters/notifications.go": 710, + "openmeter/entitlement/balanceworker/ingesthandler.go": 935, + "openmeter/entitlement/balanceworker/recalculate.go": 3229, + "openmeter/entitlement/balanceworker/repository.go": 449, + "openmeter/entitlement/balanceworker/repository_test.go": 831, + "openmeter/entitlement/balanceworker/subject_customer.go": 493, + "openmeter/entitlement/balanceworker/worker.go": 2930, + "openmeter/entitlement/boolean/connector.go": 610, + "openmeter/entitlement/boolean/entitlement.go": 127, + "openmeter/entitlement/connector.go": 997, + "openmeter/entitlement/driver/entitlement.go": 5462, + "openmeter/entitlement/driver/errors.go": 372, + "openmeter/entitlement/driver/metered.go": 3998, + "openmeter/entitlement/driver/parser.go": 3539, + "openmeter/entitlement/driver/v2/customer.go": 3763, + "openmeter/entitlement/driver/v2/customer_metered.go": 3839, + "openmeter/entitlement/driver/v2/entitlement.go": 1595, + "openmeter/entitlement/driver/v2/errors.go": 171, + "openmeter/entitlement/driver/v2/handler.go": 470, + "openmeter/entitlement/driver/v2/mapping.go": 3893, + "openmeter/entitlement/entitlement.go": 2888, + "openmeter/entitlement/entitlement_grant.go": 37, + "openmeter/entitlement/entitlement_test.go": 502, + "openmeter/entitlement/entitlement_types.go": 229, + "openmeter/entitlement/errors.go": 539, + "openmeter/entitlement/events.go": 1838, + "openmeter/entitlement/hooks/subscription/hook.go": 405, + "openmeter/entitlement/metered/balance.go": 3353, + "openmeter/entitlement/metered/balance_test.go": 14780, + "openmeter/entitlement/metered/connector.go": 2427, + "openmeter/entitlement/metered/entitlement.go": 1175, + "openmeter/entitlement/metered/entitlement_grant.go": 1314, + "openmeter/entitlement/metered/events.go": 828, + "openmeter/entitlement/metered/grant_owner_adapter.go": 2472, + "openmeter/entitlement/metered/grant_owner_adapter_test.go": 5843, + "openmeter/entitlement/metered/hook.go": 290, + "openmeter/entitlement/metered/lateevents_test.go": 2878, + "openmeter/entitlement/metered/owner_customer.go": 132, + "openmeter/entitlement/metered/repository.go": 248, + "openmeter/entitlement/metered/reset.go": 936, + "openmeter/entitlement/metered/reset_test.go": 9273, + "openmeter/entitlement/metered/trace.go": 175, + "openmeter/entitlement/metered/utils_test.go": 2161, + "openmeter/entitlement/repository.go": 1289, + "openmeter/entitlement/service/access_test.go": 2700, + "openmeter/entitlement/service/lock.go": 58, + "openmeter/entitlement/service/scheduling.go": 1920, + "openmeter/entitlement/service/scheduling_test.go": 7547, + "openmeter/entitlement/service/service.go": 3607, + "openmeter/entitlement/service/service_test.go": 637, + "openmeter/entitlement/service/utils_test.go": 1732, + "openmeter/entitlement/snapshot/event.go": 1480, + "openmeter/entitlement/static/connector.go": 730, + "openmeter/entitlement/static/entitlement.go": 187, + "openmeter/entitlement/uniqueness.go": 610, + "openmeter/entitlement/uniqueness_test.go": 1658, + "openmeter/entitlement/usageperiod.go": 1792, + "openmeter/entitlement/usageperiod_test.go": 3690, + "openmeter/entitlement/validators/customer/validator.go": 377, + "openmeter/event/metadata/event_type.go": 354, + "openmeter/event/metadata/resourcepath.go": 227, + "openmeter/event/models/models.go": 117, + "openmeter/info/httpdriver/currencies.go": 354, + "openmeter/info/httpdriver/driver.go": 83, + "openmeter/ingest/dedupe.go": 184, + "openmeter/ingest/dedupe_test.go": 262, + "openmeter/ingest/httpdriver/errors.go": 305, + "openmeter/ingest/httpdriver/handler.go": 279, + "openmeter/ingest/httpdriver/ingest.go": 698, + "openmeter/ingest/httpdriver/ingest_test.go": 907, + "openmeter/ingest/ingest.go": 83, + "openmeter/ingest/ingestadapter/telemetry.go": 573, + "openmeter/ingest/inmemory.go": 324, + "openmeter/ingest/inmemory_test.go": 156, + "openmeter/ingest/kafkaingest/collector.go": 1847, + "openmeter/ingest/kafkaingest/namespace.go": 437, + "openmeter/ingest/kafkaingest/serializer/json.go": 220, + "openmeter/ingest/kafkaingest/serializer/serializer.go": 689, + "openmeter/ingest/kafkaingest/serializer/serializer_test.go": 1221, + "openmeter/ingest/kafkaingest/topicresolver/namespacedtopic.go": 168, + "openmeter/ingest/kafkaingest/topicresolver/resolver.go": 54, + "openmeter/ingest/service.go": 509, + "openmeter/ledger/account.go": 916, + "openmeter/ledger/account/account.go": 466, + "openmeter/ledger/account/account_business.go": 245, + "openmeter/ledger/account/account_customer.go": 834, + "openmeter/ledger/account/adapter/account.go": 675, + "openmeter/ledger/account/adapter/repo.go": 265, + "openmeter/ledger/account/adapter/repo_test.go": 2650, + "openmeter/ledger/account/adapter/subaccount.go": 2351, + "openmeter/ledger/account/address.go": 535, + "openmeter/ledger/account/ledger.go": 4, + "openmeter/ledger/account/repo.go": 277, + "openmeter/ledger/account/service.go": 93, + "openmeter/ledger/account/service/service.go": 1131, + "openmeter/ledger/account/subaccount.go": 377, + "openmeter/ledger/accounts.go": 1087, + "openmeter/ledger/annotations.go": 1241, + "openmeter/ledger/annotations_test.go": 99, + "openmeter/ledger/balance.go": 92, + "openmeter/ledger/breakage/README.md": 2217, + "openmeter/ledger/breakage/adapter/adapter.go": 317, + "openmeter/ledger/breakage/adapter/record.go": 2329, + "openmeter/ledger/breakage/breakage_impacts.go": 1112, + "openmeter/ledger/breakage/noop.go": 393, + "openmeter/ledger/breakage/service.go": 5823, + "openmeter/ledger/breakage/types.go": 2123, + "openmeter/ledger/chargeadapter/annotations.go": 508, + "openmeter/ledger/chargeadapter/bookedat_test.go": 149, + "openmeter/ledger/chargeadapter/creditpurchase.go": 4769, + "openmeter/ledger/chargeadapter/creditpurchase_test.go": 7960, + "openmeter/ledger/chargeadapter/flatfee.go": 2403, + "openmeter/ledger/chargeadapter/flatfee_test.go": 12338, + "openmeter/ledger/chargeadapter/helpers.go": 259, + "openmeter/ledger/chargeadapter/usagebased.go": 2324, + "openmeter/ledger/chargeadapter/usagebased_test.go": 9515, + "openmeter/ledger/collector/README.md": 1519, + "openmeter/ledger/collector/collect.go": 2363, + "openmeter/ledger/collector/collection_fbo.go": 2027, + "openmeter/ledger/collector/collection_fbo_test.go": 3686, + "openmeter/ledger/collector/correct.go": 6926, + "openmeter/ledger/collector/correct_test.go": 1976, + "openmeter/ledger/collector/service.go": 1037, + "openmeter/ledger/customerbalance/README.md": 945, + "openmeter/ledger/customerbalance/calculation.go": 808, + "openmeter/ledger/customerbalance/expired_loader.go": 344, + "openmeter/ledger/customerbalance/expired_loader_test.go": 3769, + "openmeter/ledger/customerbalance/facade.go": 1128, + "openmeter/ledger/customerbalance/facade_test.go": 2217, + "openmeter/ledger/customerbalance/funded_loader.go": 556, + "openmeter/ledger/customerbalance/ledger_loader.go": 340, + "openmeter/ledger/customerbalance/loaders.go": 484, + "openmeter/ledger/customerbalance/merge.go": 530, + "openmeter/ledger/customerbalance/noop.go": 252, + "openmeter/ledger/customerbalance/service.go": 2686, + "openmeter/ledger/customerbalance/service_test.go": 2243, + "openmeter/ledger/customerbalance/testenv_test.go": 5278, + "openmeter/ledger/customerbalance/transactions.go": 2791, + "openmeter/ledger/customerbalance/transactions_test.go": 1663, + "openmeter/ledger/errors.go": 1146, + "openmeter/ledger/historical/adapter/ledger.go": 4550, + "openmeter/ledger/historical/adapter/ledger_test.go": 9513, + "openmeter/ledger/historical/adapter/repo.go": 270, + "openmeter/ledger/historical/adapter/sumentries_query.go": 1524, + "openmeter/ledger/historical/balance.go": 560, + "openmeter/ledger/historical/entry.go": 505, + "openmeter/ledger/historical/ledger.go": 1317, + "openmeter/ledger/historical/repo.go": 531, + "openmeter/ledger/historical/transaction.go": 580, + "openmeter/ledger/impact.go": 152, + "openmeter/ledger/impact_test.go": 2955, + "openmeter/ledger/ledger_fx_test.go": 1137, + "openmeter/ledger/ledger_test.go": 736, + "openmeter/ledger/noop/noop.go": 2486, + "openmeter/ledger/primitives.go": 2078, + "openmeter/ledger/query.go": 741, + "openmeter/ledger/recognizer/noop.go": 91, + "openmeter/ledger/recognizer/recognize.go": 1796, + "openmeter/ledger/recognizer/service.go": 681, + "openmeter/ledger/recognizer/service_test.go": 1927, + "openmeter/ledger/resolvers/account.go": 2832, + "openmeter/ledger/resolvers/account_test.go": 1151, + "openmeter/ledger/resolvers/adapter/repo.go": 794, + "openmeter/ledger/resolvers/customeraccount.go": 173, + "openmeter/ledger/resolvers/errors.go": 439, + "openmeter/ledger/resolvers/hooks.go": 414, + "openmeter/ledger/resolvers/namespace.go": 205, + "openmeter/ledger/routing.go": 4050, + "openmeter/ledger/routing_test.go": 4067, + "openmeter/ledger/routing_validator.go": 24, + "openmeter/ledger/routingrules/defaults.go": 792, + "openmeter/ledger/routingrules/routingrules.go": 3779, + "openmeter/ledger/routingrules/routingrules_test.go": 6006, + "openmeter/ledger/routingrules/view.go": 814, + "openmeter/ledger/testutils/deps.go": 433, + "openmeter/ledger/testutils/integration.go": 1687, + "openmeter/ledger/transactions/accrual.go": 4663, + "openmeter/ledger/transactions/accrual_test.go": 2362, + "openmeter/ledger/transactions/breakage.go": 1176, + "openmeter/ledger/transactions/codes.go": 2107, + "openmeter/ledger/transactions/collection.go": 938, + "openmeter/ledger/transactions/correction.go": 855, + "openmeter/ledger/transactions/correction_leg.go": 1102, + "openmeter/ledger/transactions/correction_leg_test.go": 509, + "openmeter/ledger/transactions/correction_test.go": 1238, + "openmeter/ledger/transactions/customer.go": 4332, + "openmeter/ledger/transactions/customer_test.go": 1197, + "openmeter/ledger/transactions/earnings.go": 1598, + "openmeter/ledger/transactions/earnings_test.go": 2263, + "openmeter/ledger/transactions/entry_identity.go": 68, + "openmeter/ledger/transactions/fx.go": 1027, + "openmeter/ledger/transactions/input.go": 877, + "openmeter/ledger/transactions/legacy.go": 1481, + "openmeter/ledger/transactions/priority.go": 60, + "openmeter/ledger/transactions/resolve.go": 757, + "openmeter/ledger/transactions/resolve_test.go": 460, + "openmeter/ledger/transactions/template.go": 279, + "openmeter/ledger/transactions/testenv_test.go": 677, + "openmeter/ledger/transactions/testutils/anytransaction.go": 542, + "openmeter/ledger/validations.go": 740, + "openmeter/ledger/validations_test.go": 752, + "openmeter/llmcost/adapter.go": 222, + "openmeter/llmcost/adapter/adapter.go": 418, + "openmeter/llmcost/adapter/mapping.go": 438, + "openmeter/llmcost/adapter/price.go": 2732, + "openmeter/llmcost/errors.go": 699, + "openmeter/llmcost/llmcost.go": 1119, + "openmeter/llmcost/llmcost_test.go": 1305, + "openmeter/llmcost/normalize.go": 919, + "openmeter/llmcost/normalize_test.go": 1524, + "openmeter/llmcost/service.go": 1929, + "openmeter/llmcost/service/service.go": 1161, + "openmeter/llmcost/service/service_test.go": 1983, + "openmeter/llmcost/sync/fetcher.go": 95, + "openmeter/llmcost/sync/fetcher_modelsdev.go": 950, + "openmeter/llmcost/sync/normalizer.go": 169, + "openmeter/llmcost/sync/normalizer_test.go": 624, + "openmeter/llmcost/sync/reconciler.go": 1816, + "openmeter/llmcost/sync/reconciler_test.go": 4826, + "openmeter/llmcost/sync/sync.go": 1429, + "openmeter/llmcost/sync/sync_test.go": 3662, + "openmeter/meter/adapter/adapter.go": 379, + "openmeter/meter/adapter/adapter_test.go": 1301, + "openmeter/meter/adapter/manage.go": 1547, + "openmeter/meter/adapter/meter.go": 1032, + "openmeter/meter/errors.go": 229, + "openmeter/meter/event.go": 967, + "openmeter/meter/httphandler/handler.go": 501, + "openmeter/meter/httphandler/mapping.go": 1878, + "openmeter/meter/httphandler/meter.go": 2787, + "openmeter/meter/httphandler/query.go": 2070, + "openmeter/meter/httphandler/query_csv.go": 2049, + "openmeter/meter/meter.go": 2220, + "openmeter/meter/meter_test.go": 2625, + "openmeter/meter/mockadapter/adapter.go": 443, + "openmeter/meter/mockadapter/manage.go": 739, + "openmeter/meter/mockadapter/meter.go": 1088, + "openmeter/meter/parse.go": 1211, + "openmeter/meter/parse_test.go": 1788, + "openmeter/meter/service.go": 1748, + "openmeter/meter/service/manage.go": 1739, + "openmeter/meter/service/service.go": 193, + "openmeter/meter/service_test.go": 589, + "openmeter/meterevent/adapter/adapter.go": 176, + "openmeter/meterevent/adapter/event.go": 2491, + "openmeter/meterevent/httphandler/event.go": 556, + "openmeter/meterevent/httphandler/event_v2.go": 402, + "openmeter/meterevent/httphandler/handler.go": 304, + "openmeter/meterevent/httphandler/mapping.go": 652, + "openmeter/meterevent/service.go": 1739, + "openmeter/meterevent/service_test.go": 711, + "openmeter/meterexport/service.go": 1343, + "openmeter/meterexport/service/funnel.go": 843, + "openmeter/meterexport/service/service.go": 250, + "openmeter/meterexport/service/service_test.go": 5124, + "openmeter/meterexport/service/syntheticdata.go": 1311, + "openmeter/meterexport/service/syntheticdata_iter.go": 574, + "openmeter/meterexport/service_test.go": 982, + "openmeter/namespace/namespace.go": 868, + "openmeter/namespace/namespace_test.go": 661, + "openmeter/namespace/namespacedriver/decoder.go": 83, + "openmeter/notification/adapter/adapter.go": 378, + "openmeter/notification/adapter/channel.go": 1440, + "openmeter/notification/adapter/deliverystatus.go": 1047, + "openmeter/notification/adapter/entitymapping.go": 1014, + "openmeter/notification/adapter/entitymapping_test.go": 843, + "openmeter/notification/adapter/event.go": 2118, + "openmeter/notification/adapter/rule.go": 1784, + "openmeter/notification/annotations.go": 195, + "openmeter/notification/channel.go": 1775, + "openmeter/notification/consumer/consumer.go": 807, + "openmeter/notification/consumer/entitlementbalancethreshold.go": 4229, + "openmeter/notification/consumer/entitlementbalancethreshold_test.go": 7285, + "openmeter/notification/consumer/entitlementreset.go": 1305, + "openmeter/notification/consumer/entitlementsnapshot.go": 195, + "openmeter/notification/consumer/invoice.go": 778, + "openmeter/notification/defaults.go": 26, + "openmeter/notification/deliverystatus.go": 1619, + "openmeter/notification/entitlements.go": 1779, + "openmeter/notification/errors.go": 144, + "openmeter/notification/event.go": 1393, + "openmeter/notification/eventhandler.go": 150, + "openmeter/notification/eventhandler/deliverystatus.go": 455, + "openmeter/notification/eventhandler/dispatch.go": 267, + "openmeter/notification/eventhandler/handler.go": 1086, + "openmeter/notification/eventhandler/noop/handler.go": 121, + "openmeter/notification/eventhandler/reconcile.go": 1024, + "openmeter/notification/eventhandler/webhook.go": 5758, + "openmeter/notification/eventpayload.go": 450, + "openmeter/notification/httpdriver/channel.go": 2036, + "openmeter/notification/httpdriver/errors.go": 310, + "openmeter/notification/httpdriver/event.go": 1362, + "openmeter/notification/httpdriver/handler.go": 491, + "openmeter/notification/httpdriver/mapping.go": 5260, + "openmeter/notification/httpdriver/mapping_test.go": 568, + "openmeter/notification/httpdriver/rule.go": 2821, + "openmeter/notification/internal/rule.go": 1918, + "openmeter/notification/invoice.go": 257, + "openmeter/notification/repository.go": 432, + "openmeter/notification/rule.go": 2007, + "openmeter/notification/service.go": 502, + "openmeter/notification/service/channel.go": 1851, + "openmeter/notification/service/deliverystatus.go": 323, + "openmeter/notification/service/event.go": 1059, + "openmeter/notification/service/rule.go": 2320, + "openmeter/notification/service/service.go": 388, + "openmeter/notification/utils.go": 1012, + "openmeter/notification/utils_test.go": 342, + "openmeter/notification/webhook/errors.go": 721, + "openmeter/notification/webhook/events.go": 408, + "openmeter/notification/webhook/handler.go": 1964, + "openmeter/notification/webhook/noop/noop.go": 661, + "openmeter/notification/webhook/secret/secret.go": 249, + "openmeter/notification/webhook/svix/annotations.go": 160, + "openmeter/notification/webhook/svix/application.go": 368, + "openmeter/notification/webhook/svix/event.go": 345, + "openmeter/notification/webhook/svix/internal/error.go": 621, + "openmeter/notification/webhook/svix/message.go": 2982, + "openmeter/notification/webhook/svix/svix.go": 852, + "openmeter/notification/webhook/svix/webhook.go": 4215, + "openmeter/portal/adapter/adapter.go": 164, + "openmeter/portal/adapter/noop.go": 275, + "openmeter/portal/adapter/token.go": 823, + "openmeter/portal/authenticator/authenticator.go": 1305, + "openmeter/portal/httphandler/handler.go": 344, + "openmeter/portal/httphandler/mapping.go": 187, + "openmeter/portal/httphandler/portal.go": 1477, + "openmeter/portal/service.go": 890, + "openmeter/productcatalog/adapter/feature.go": 3470, + "openmeter/productcatalog/adapter/feature_test.go": 7336, + "openmeter/productcatalog/adapter/transaction.go": 262, + "openmeter/productcatalog/addon.go": 2066, + "openmeter/productcatalog/addon/adapter/adapter.go": 422, + "openmeter/productcatalog/addon/adapter/adapter_test.go": 3456, + "openmeter/productcatalog/addon/adapter/addon.go": 4045, + "openmeter/productcatalog/addon/adapter/mapping.go": 2538, + "openmeter/productcatalog/addon/addon.go": 342, + "openmeter/productcatalog/addon/assert.go": 1037, + "openmeter/productcatalog/addon/errors.go": 276, + "openmeter/productcatalog/addon/errors_test.go": 496, + "openmeter/productcatalog/addon/event.go": 1552, + "openmeter/productcatalog/addon/httpdriver/addon.go": 3309, + "openmeter/productcatalog/addon/httpdriver/driver.go": 339, + "openmeter/productcatalog/addon/httpdriver/mapping.go": 781, + "openmeter/productcatalog/addon/plan.go": 164, + "openmeter/productcatalog/addon/ratecard.go": 1096, + "openmeter/productcatalog/addon/ratecard_test.go": 3080, + "openmeter/productcatalog/addon/repository.go": 149, + "openmeter/productcatalog/addon/service.go": 2600, + "openmeter/productcatalog/addon/service/addon.go": 4850, + "openmeter/productcatalog/addon/service/service.go": 344, + "openmeter/productcatalog/addon/service/service_test.go": 5200, + "openmeter/productcatalog/addon/service/taxcode_test.go": 7952, + "openmeter/productcatalog/addon/validators.go": 164, + "openmeter/productcatalog/alignment.go": 310, + "openmeter/productcatalog/discount.go": 1399, + "openmeter/productcatalog/discount_test.go": 757, + "openmeter/productcatalog/driver/errors.go": 325, + "openmeter/productcatalog/driver/feature.go": 2278, + "openmeter/productcatalog/driver/parser.go": 1857, + "openmeter/productcatalog/effectiveperiod.go": 519, + "openmeter/productcatalog/effectiveperiod_test.go": 818, + "openmeter/productcatalog/entitlement.go": 3049, + "openmeter/productcatalog/entitlement_test.go": 1068, + "openmeter/productcatalog/errors.go": 5691, + "openmeter/productcatalog/feature/connector.go": 2832, + "openmeter/productcatalog/feature/connector_test.go": 393, + "openmeter/productcatalog/feature/event.go": 1070, + "openmeter/productcatalog/feature/feature.go": 1328, + "openmeter/productcatalog/feature/featuremeter.go": 1493, + "openmeter/productcatalog/feature/featuremeter_test.go": 735, + "openmeter/productcatalog/feature/meter_group_by_filters_test.go": 261, + "openmeter/productcatalog/feature/repository.go": 331, + "openmeter/productcatalog/feature/unitcost.go": 1549, + "openmeter/productcatalog/featureresolver.go": 160, + "openmeter/productcatalog/featureresolver/ratecard.go": 689, + "openmeter/productcatalog/featureresolver/ratecard_test.go": 2336, + "openmeter/productcatalog/featureresolver/resolver.go": 965, + "openmeter/productcatalog/featureresolver/resolver_test.go": 1352, + "openmeter/productcatalog/http/errors.go": 309, + "openmeter/productcatalog/http/mapping.go": 6815, + "openmeter/productcatalog/http/resource.go": 33, + "openmeter/productcatalog/phase.go": 791, + "openmeter/productcatalog/plan.go": 2246, + "openmeter/productcatalog/plan/adapter/adapter.go": 421, + "openmeter/productcatalog/plan/adapter/adapter_test.go": 4115, + "openmeter/productcatalog/plan/adapter/mapping.go": 2630, + "openmeter/productcatalog/plan/adapter/phase.go": 1075, + "openmeter/productcatalog/plan/adapter/plan.go": 3795, + "openmeter/productcatalog/plan/addon.go": 182, + "openmeter/productcatalog/plan/assert.go": 1510, + "openmeter/productcatalog/plan/errors.go": 275, + "openmeter/productcatalog/plan/errors_test.go": 493, + "openmeter/productcatalog/plan/event.go": 1519, + "openmeter/productcatalog/plan/httpdriver/driver.go": 423, + "openmeter/productcatalog/plan/httpdriver/featuregate.go": 76, + "openmeter/productcatalog/plan/httpdriver/mapping.go": 1557, + "openmeter/productcatalog/plan/httpdriver/plan.go": 3680, + "openmeter/productcatalog/plan/phase.go": 562, + "openmeter/productcatalog/plan/plan.go": 383, + "openmeter/productcatalog/plan/ratecard.go": 798, + "openmeter/productcatalog/plan/ratecard_test.go": 3088, + "openmeter/productcatalog/plan/repository.go": 148, + "openmeter/productcatalog/plan/serializer.go": 1779, + "openmeter/productcatalog/plan/serializer_test.go": 1527, + "openmeter/productcatalog/plan/service.go": 3113, + "openmeter/productcatalog/plan/service/plan.go": 5571, + "openmeter/productcatalog/plan/service/service.go": 342, + "openmeter/productcatalog/plan/service/service_test.go": 9278, + "openmeter/productcatalog/plan/service/taxcode_test.go": 8537, + "openmeter/productcatalog/plan/validators.go": 226, + "openmeter/productcatalog/plan_test.go": 2617, + "openmeter/productcatalog/planaddon.go": 1103, + "openmeter/productcatalog/planaddon/adapter/adapter.go": 425, + "openmeter/productcatalog/planaddon/adapter/adapter_test.go": 3574, + "openmeter/productcatalog/planaddon/adapter/mapping.go": 503, + "openmeter/productcatalog/planaddon/adapter/planaddon.go": 3272, + "openmeter/productcatalog/planaddon/assert.go": 487, + "openmeter/productcatalog/planaddon/errors.go": 299, + "openmeter/productcatalog/planaddon/errors_test.go": 460, + "openmeter/productcatalog/planaddon/event.go": 1074, + "openmeter/productcatalog/planaddon/httpdriver/driver.go": 336, + "openmeter/productcatalog/planaddon/httpdriver/mapping.go": 604, + "openmeter/productcatalog/planaddon/httpdriver/planaddon.go": 2536, + "openmeter/productcatalog/planaddon/planaddon.go": 324, + "openmeter/productcatalog/planaddon/repository.go": 158, + "openmeter/productcatalog/planaddon/service.go": 1581, + "openmeter/productcatalog/planaddon/service/planaddon.go": 3183, + "openmeter/productcatalog/planaddon/service/service.go": 333, + "openmeter/productcatalog/planaddon/service/service_test.go": 3751, + "openmeter/productcatalog/planaddon_test.go": 4921, + "openmeter/productcatalog/price.go": 5455, + "openmeter/productcatalog/price_test.go": 2277, + "openmeter/productcatalog/pro_rating.go": 276, + "openmeter/productcatalog/ratecard.go": 5787, + "openmeter/productcatalog/ratecard_test.go": 8278, + "openmeter/productcatalog/settlementmode.go": 134, + "openmeter/productcatalog/subscription/http/cancel.go": 1203, + "openmeter/productcatalog/subscription/http/change.go": 1346, + "openmeter/productcatalog/subscription/http/create.go": 1894, + "openmeter/productcatalog/subscription/http/delete.go": 373, + "openmeter/productcatalog/subscription/http/edit.go": 734, + "openmeter/productcatalog/subscription/http/errors.go": 726, + "openmeter/productcatalog/subscription/http/featuregate.go": 76, + "openmeter/productcatalog/subscription/http/get.go": 1499, + "openmeter/productcatalog/subscription/http/handler.go": 543, + "openmeter/productcatalog/subscription/http/mapping.go": 4027, + "openmeter/productcatalog/subscription/http/migrate.go": 608, + "openmeter/productcatalog/subscription/plan.go": 810, + "openmeter/productcatalog/subscription/service.go": 355, + "openmeter/productcatalog/subscription/service/change.go": 526, + "openmeter/productcatalog/subscription/service/change_test.go": 3520, + "openmeter/productcatalog/subscription/service/create.go": 497, + "openmeter/productcatalog/subscription/service/migrate.go": 845, + "openmeter/productcatalog/subscription/service/migrate_test.go": 3243, + "openmeter/productcatalog/subscription/service/plan.go": 641, + "openmeter/productcatalog/subscription/service/plan_test.go": 797, + "openmeter/productcatalog/subscription/service/service.go": 423, + "openmeter/productcatalog/subscription/testutils/adapter.go": 609, + "openmeter/productcatalog/tax.go": 2026, + "openmeter/productcatalog/tax_test.go": 5840, + "openmeter/productcatalog/testutils/addon.go": 233, + "openmeter/productcatalog/testutils/env.go": 1623, + "openmeter/productcatalog/testutils/feature.go": 205, + "openmeter/productcatalog/testutils/meters.go": 480, + "openmeter/productcatalog/testutils/namespace.go": 65, + "openmeter/productcatalog/testutils/plan.go": 704, + "openmeter/progressmanager/adapter.go": 95, + "openmeter/progressmanager/adapter/adapter.go": 437, + "openmeter/progressmanager/adapter/mock.go": 285, + "openmeter/progressmanager/adapter/noop.go": 127, + "openmeter/progressmanager/adapter/progress.go": 483, + "openmeter/progressmanager/entity/progressmanager.go": 540, + "openmeter/progressmanager/httpdriver/handler.go": 294, + "openmeter/progressmanager/httpdriver/progress.go": 501, + "openmeter/progressmanager/service.go": 95, + "openmeter/registry/builder/entitlement.go": 1404, + "openmeter/registry/entitlement.go": 190, + "openmeter/secret/adapter.go": 149, + "openmeter/secret/adapter/adapter.go": 48, + "openmeter/secret/adapter/secret.go": 414, + "openmeter/secret/entity/errors.go": 195, + "openmeter/secret/entity/input.go": 303, + "openmeter/secret/entity/secret.go": 329, + "openmeter/secret/service.go": 149, + "openmeter/secret/service/secret.go": 396, + "openmeter/secret/service/service.go": 130, + "openmeter/server/cors.go": 207, + "openmeter/server/framework_test.go": 955, + "openmeter/server/router/addon.go": 434, + "openmeter/server/router/app.go": 216, + "openmeter/server/router/appcustominvoicing.go": 319, + "openmeter/server/router/appstripe.go": 335, + "openmeter/server/router/billing.go": 1696, + "openmeter/server/router/credit.go": 276, + "openmeter/server/router/customer.go": 789, + "openmeter/server/router/customerstripe.go": 312, + "openmeter/server/router/debug.go": 80, + "openmeter/server/router/entitlement.go": 3026, + "openmeter/server/router/event.go": 151, + "openmeter/server/router/info.go": 110, + "openmeter/server/router/marketplace.go": 443, + "openmeter/server/router/meter.go": 781, + "openmeter/server/router/noop.go": 58, + "openmeter/server/router/notification.go": 871, + "openmeter/server/router/plan.go": 482, + "openmeter/server/router/planaddon.go": 448, + "openmeter/server/router/portal.go": 432, + "openmeter/server/router/product_catalog.go": 222, + "openmeter/server/router/router.go": 4513, + "openmeter/server/router/subject.go": 189, + "openmeter/server/router/subscription.go": 687, + "openmeter/server/router/subscriptionaddon.go": 425, + "openmeter/server/server.go": 2918, + "openmeter/server/server_test.go": 19054, + "openmeter/session/session.go": 544, + "openmeter/sink/buffer.go": 491, + "openmeter/sink/buffer_test.go": 445, + "openmeter/sink/flushhandler/handler.go": 1581, + "openmeter/sink/flushhandler/ingestnotification/events/events.go": 488, + "openmeter/sink/flushhandler/ingestnotification/handler.go": 1136, + "openmeter/sink/flushhandler/meters.go": 301, + "openmeter/sink/flushhandler/mux.go": 390, + "openmeter/sink/flushhandler/types.go": 92, + "openmeter/sink/meters.go": 953, + "openmeter/sink/models/models.go": 296, + "openmeter/sink/partition.go": 113, + "openmeter/sink/sink.go": 8099, + "openmeter/sink/storage.go": 465, + "openmeter/streaming/clickhouse/connector.go": 4545, + "openmeter/streaming/clickhouse/connector_query_test.go": 2728, + "openmeter/streaming/clickhouse/connector_test.go": 1509, + "openmeter/streaming/clickhouse/event_query.go": 1581, + "openmeter/streaming/clickhouse/event_query_test.go": 1890, + "openmeter/streaming/clickhouse/event_query_v2.go": 1126, + "openmeter/streaming/clickhouse/event_query_v2_test.go": 2854, + "openmeter/streaming/clickhouse/group_by_values_query.go": 324, + "openmeter/streaming/clickhouse/group_by_values_query_test.go": 1026, + "openmeter/streaming/clickhouse/meter_query.go": 4009, + "openmeter/streaming/clickhouse/meter_query_test.go": 9296, + "openmeter/streaming/clickhouse/mock.go": 797, + "openmeter/streaming/clickhouse/queryhelper.go": 922, + "openmeter/streaming/clickhouse/subject_query.go": 274, + "openmeter/streaming/clickhouse/subject_query_test.go": 741, + "openmeter/streaming/clickhouse/suite_test.go": 445, + "openmeter/streaming/clickhouse/utils_query.go": 90, + "openmeter/streaming/clickhouse/utils_query_test.go": 79, + "openmeter/streaming/connector.go": 1032, + "openmeter/streaming/defaults.go": 88, + "openmeter/streaming/eventparams.go": 1260, + "openmeter/streaming/query_params.go": 639, + "openmeter/streaming/query_params_test.go": 643, + "openmeter/streaming/retry/retry.go": 1299, + "openmeter/streaming/retry/retry_test.go": 1679, + "openmeter/streaming/testutils/streaming.go": 2183, + "openmeter/streaming/testutils/streaming_test.go": 5928, + "openmeter/streaming/usageattribution.go": 596, + "openmeter/streaming/usageattribution_test.go": 2220, + "openmeter/subject/adapter.go": 272, + "openmeter/subject/adapter/adapter.go": 299, + "openmeter/subject/adapter/subject.go": 2374, + "openmeter/subject/httphandler/handler.go": 397, + "openmeter/subject/httphandler/mapping.go": 156, + "openmeter/subject/httphandler/subject.go": 2428, + "openmeter/subject/service.go": 633, + "openmeter/subject/service/hooks/customersubject.go": 1722, + "openmeter/subject/service/hooks/customersubject_test.go": 2563, + "openmeter/subject/service/service.go": 1010, + "openmeter/subject/service/service_test.go": 2368, + "openmeter/subject/subject.go": 250, + "openmeter/subject/testutils/env.go": 1151, + "openmeter/subscription/addon/README.md": 270, + "openmeter/subscription/addon/addon.go": 797, + "openmeter/subscription/addon/addon_test.go": 1684, + "openmeter/subscription/addon/diff/README.md": 460, + "openmeter/subscription/addon/diff/addon.go": 506, + "openmeter/subscription/addon/diff/affected.go": 406, + "openmeter/subscription/addon/diff/apply.go": 1590, + "openmeter/subscription/addon/diff/apply_test.go": 8852, + "openmeter/subscription/addon/diff/diff.go": 225, + "openmeter/subscription/addon/diff/restore.go": 1151, + "openmeter/subscription/addon/diff/restore_test.go": 6674, + "openmeter/subscription/addon/diff/zeroratecard.go": 488, + "openmeter/subscription/addon/events.go": 664, + "openmeter/subscription/addon/events_test.go": 1120, + "openmeter/subscription/addon/extend.go": 2127, + "openmeter/subscription/addon/extend_test.go": 7426, + "openmeter/subscription/addon/http/create.go": 853, + "openmeter/subscription/addon/http/get.go": 539, + "openmeter/subscription/addon/http/handler.go": 392, + "openmeter/subscription/addon/http/list.go": 548, + "openmeter/subscription/addon/http/mapping.go": 960, + "openmeter/subscription/addon/http/update.go": 716, + "openmeter/subscription/addon/instance.go": 210, + "openmeter/subscription/addon/quantity.go": 237, + "openmeter/subscription/addon/ratecard.go": 50, + "openmeter/subscription/addon/repo/mapping.go": 1127, + "openmeter/subscription/addon/repo/subscriptionaddon.go": 1243, + "openmeter/subscription/addon/repo/subscriptionaddonquantity.go": 355, + "openmeter/subscription/addon/repo/transaction.go": 429, + "openmeter/subscription/addon/repository.go": 355, + "openmeter/subscription/addon/service.go": 545, + "openmeter/subscription/addon/service/change_test.go": 2046, + "openmeter/subscription/addon/service/create_test.go": 5258, + "openmeter/subscription/addon/service/list_test.go": 2125, + "openmeter/subscription/addon/service/service.go": 2720, + "openmeter/subscription/annotations.go": 1023, + "openmeter/subscription/apply.go": 620, + "openmeter/subscription/billing.go": 108, + "openmeter/subscription/context.go": 105, + "openmeter/subscription/entitlement.go": 610, + "openmeter/subscription/entitlement/adapter.go": 1132, + "openmeter/subscription/entitlement/errors.go": 134, + "openmeter/subscription/errors.go": 2336, + "openmeter/subscription/errors_test.go": 3820, + "openmeter/subscription/events.go": 1537, + "openmeter/subscription/featureflag.go": 37, + "openmeter/subscription/fielddescriptormapper.go": 633, + "openmeter/subscription/hook.go": 415, + "openmeter/subscription/hooks/annotations/hook.go": 1671, + "openmeter/subscription/item.go": 1510, + "openmeter/subscription/list.go": 637, + "openmeter/subscription/locks.go": 52, + "openmeter/subscription/patch.go": 317, + "openmeter/subscription/patch/additem.go": 1613, + "openmeter/subscription/patch/additem_test.go": 2366, + "openmeter/subscription/patch/addphase.go": 871, + "openmeter/subscription/patch/patch_test.go": 1861, + "openmeter/subscription/patch/removeitem.go": 721, + "openmeter/subscription/patch/removeitem_test.go": 1837, + "openmeter/subscription/patch/removephase.go": 780, + "openmeter/subscription/patch/stretchphase.go": 721, + "openmeter/subscription/patch/stretchphase_test.go": 1467, + "openmeter/subscription/patch/unscheduleedit.go": 519, + "openmeter/subscription/patch/unscheduleedit_test.go": 1589, + "openmeter/subscription/patch_test.go": 318, + "openmeter/subscription/phase.go": 158, + "openmeter/subscription/plan.go": 558, + "openmeter/subscription/repo/mapping.go": 1650, + "openmeter/subscription/repo/subscriptionitemrepo.go": 1587, + "openmeter/subscription/repo/subscriptionphaserepo.go": 1012, + "openmeter/subscription/repo/subscriptionrepo.go": 2039, + "openmeter/subscription/repo/transaction.go": 540, + "openmeter/subscription/repo/utils.go": 308, + "openmeter/subscription/repository.go": 1231, + "openmeter/subscription/serialize_test.go": 1085, + "openmeter/subscription/service.go": 461, + "openmeter/subscription/service/service.go": 5263, + "openmeter/subscription/service/service_test.go": 13122, + "openmeter/subscription/service/servicevalidation.go": 1059, + "openmeter/subscription/service/sync.go": 3870, + "openmeter/subscription/service/sync_test.go": 4055, + "openmeter/subscription/service/synchelpers.go": 1674, + "openmeter/subscription/specpath.go": 918, + "openmeter/subscription/state.go": 841, + "openmeter/subscription/subscription.go": 652, + "openmeter/subscription/subscription_test.go": 905, + "openmeter/subscription/subscriptionspec.go": 9479, + "openmeter/subscription/subscriptionspec_test.go": 1049, + "openmeter/subscription/subscriptionview.go": 4029, + "openmeter/subscription/testutils/addon.go": 1208, + "openmeter/subscription/testutils/billing.go": 309, + "openmeter/subscription/testutils/builder.go": 1317, + "openmeter/subscription/testutils/compare.go": 3481, + "openmeter/subscription/testutils/customer.go": 839, + "openmeter/subscription/testutils/db.go": 438, + "openmeter/subscription/testutils/feature.go": 473, + "openmeter/subscription/testutils/global.go": 47, + "openmeter/subscription/testutils/helpers.go": 1057, + "openmeter/subscription/testutils/mock.go": 1379, + "openmeter/subscription/testutils/patch.go": 289, + "openmeter/subscription/testutils/plan.go": 482, + "openmeter/subscription/testutils/ratecard.go": 1236, + "openmeter/subscription/testutils/repository.go": 496, + "openmeter/subscription/testutils/service.go": 2839, + "openmeter/subscription/timing.go": 1335, + "openmeter/subscription/uniqueness.go": 2434, + "openmeter/subscription/uniqueness_test.go": 4897, + "openmeter/subscription/validators/customer/validator.go": 946, + "openmeter/subscription/validators/subscription/components.go": 531, + "openmeter/subscription/validators/subscription/validator.go": 1691, + "openmeter/subscription/workflow/annotations.go": 130, + "openmeter/subscription/workflow/errors.go": 128, + "openmeter/subscription/workflow/service.go": 589, + "openmeter/subscription/workflow/service/addon.go": 2517, + "openmeter/subscription/workflow/service/addon_test.go": 7063, + "openmeter/subscription/workflow/service/service.go": 349, + "openmeter/subscription/workflow/service/subscription.go": 2886, + "openmeter/subscription/workflow/service/subscription_test.go": 19936, + "openmeter/taxcode/adapter/adapter.go": 420, + "openmeter/taxcode/adapter/mapping.go": 218, + "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go": 1044, + "openmeter/taxcode/adapter/taxcode.go": 1676, + "openmeter/taxcode/annotations.go": 77, + "openmeter/taxcode/errors.go": 1319, + "openmeter/taxcode/namespacehandler.go": 1616, + "openmeter/taxcode/namespacehandler_test.go": 2209, + "openmeter/taxcode/repository.go": 241, + "openmeter/taxcode/service.go": 1517, + "openmeter/taxcode/service/organizationdefaulttaxcodes.go": 406, + "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go": 2765, + "openmeter/taxcode/service/service.go": 184, + "openmeter/taxcode/service/taxcode.go": 1295, + "openmeter/taxcode/service/taxcode_test.go": 1967, + "openmeter/taxcode/taxcode.go": 1391, + "openmeter/taxcode/testutils/env.go": 868, + "openmeter/testutils/async.go": 135, + "openmeter/testutils/logger.go": 222, + "openmeter/testutils/namegen.go": 183, + "openmeter/testutils/namegen_test.go": 92, + "openmeter/testutils/pg_driver.go": 776, + "openmeter/testutils/time.go": 141, + "openmeter/watermill/driver/kafka/broker.go": 923, + "openmeter/watermill/driver/kafka/logger.go": 110, + "openmeter/watermill/driver/kafka/marshaler.go": 306, + "openmeter/watermill/driver/kafka/metrics.go": 223, + "openmeter/watermill/driver/kafka/metrics/README.md": 162, + "openmeter/watermill/driver/kafka/metrics/adapter.go": 1433, + "openmeter/watermill/driver/kafka/publisher.go": 326, + "openmeter/watermill/driver/kafka/saslscram.go": 229, + "openmeter/watermill/driver/kafka/subscriber.go": 417, + "openmeter/watermill/driver/noop/publisher.go": 84, + "openmeter/watermill/eventbus/eventbus.go": 1134, + "openmeter/watermill/grouphandler/grouphandler.go": 988, + "openmeter/watermill/marshaler/marshaler.go": 856, + "openmeter/watermill/marshaler/source.go": 274, + "openmeter/watermill/marshaler/source_test.go": 227, + "openmeter/watermill/nopublisher/nopublisher.go": 153, + "openmeter/watermill/router/context.go": 123, + "openmeter/watermill/router/errors.go": 87, + "openmeter/watermill/router/logger.go": 276, + "openmeter/watermill/router/metrics.go": 1670, + "openmeter/watermill/router/router.go": 958, + "openmeter/watermill/router/router_test.go": 1725, + "pkg/clock/clock.go": 193, + "pkg/clock/clock_test.go": 119, + "pkg/cmpx/compare.go": 65, + "pkg/contextx/attr.go": 149, + "pkg/contextx/log.go": 204, + "pkg/convert/ptr.go": 434, + "pkg/convert/time.go": 39, + "pkg/currencyx/allocation.go": 2141, + "pkg/currencyx/allocation_test.go": 2932, + "pkg/currencyx/currency.go": 398, + "pkg/currencyx/currency_test.go": 202, + "pkg/datetime/constants.go": 291, + "pkg/datetime/datetime.go": 987, + "pkg/datetime/datetime_test.go": 1810, + "pkg/datetime/duration.go": 1702, + "pkg/datetime/duration_test.go": 5109, + "pkg/datetime/durationstring.go": 177, + "pkg/datetime/errors.go": 200, + "pkg/datetime/format.go": 225, + "pkg/datetime/interval.go": 122, + "pkg/datetime/parse.go": 430, + "pkg/datetime/parse_test.go": 1254, + "pkg/datetime/testutils.go": 324, + "pkg/defaultx/default.go": 55, + "pkg/entitydiff/diff.go": 1618, + "pkg/entitydiff/parent.go": 227, + "pkg/equal/equal.go": 160, + "pkg/errorsx/errorsx.go": 232, + "pkg/errorsx/errorsx_test.go": 297, + "pkg/errorsx/handler.go": 478, + "pkg/errorsx/helpers.go": 313, + "pkg/errorsx/helpers_test.go": 309, + "pkg/expand/expand.go": 291, + "pkg/featuregate/featuregate.go": 65, + "pkg/ffx/context.go": 378, + "pkg/ffx/featureflag.go": 94, + "pkg/ffx/static.go": 112, + "pkg/filter/filter.go": 7141, + "pkg/filter/filter_test.go": 18820, + "pkg/framework/README.md": 563, + "pkg/framework/clickhouseotel/connpool.go": 1429, + "pkg/framework/clickhouseotel/otel.go": 744, + "pkg/framework/commonhttp/decoder.go": 74, + "pkg/framework/commonhttp/encoder.go": 1383, + "pkg/framework/commonhttp/errors.go": 1546, + "pkg/framework/commonhttp/errors_test.go": 363, + "pkg/framework/commonhttp/pagination.go": 66, + "pkg/framework/commonhttp/sort.go": 128, + "pkg/framework/commonhttp/union.go": 111, + "pkg/framework/entutils/entcursor/cursor.go": 102, + "pkg/framework/entutils/entcursor/cursor.tpl": 570, + "pkg/framework/entutils/entcursor/cursor_test.go": 688, + "pkg/framework/entutils/entdriver/driver.go": 339, + "pkg/framework/entutils/entexpose/entexpose.go": 102, + "pkg/framework/entutils/entexpose/expose.tpl": 802, + "pkg/framework/entutils/entmixinaccessor/entmixinaccessor.go": 107, + "pkg/framework/entutils/entmixinaccessor/mixinaccessor.tpl": 227, + "pkg/framework/entutils/entpaginate/paginate.go": 104, + "pkg/framework/entutils/entpaginate/paginate.tpl": 585, + "pkg/framework/entutils/entpaginate/paginate_test.go": 905, + "pkg/framework/entutils/entsetorclear/setorclear.go": 105, + "pkg/framework/entutils/entsetorclear/setorclear.tpl": 279, + "pkg/framework/entutils/idorder.go": 509, + "pkg/framework/entutils/idorder_test.go": 1079, + "pkg/framework/entutils/mapping.go": 191, + "pkg/framework/entutils/mixinhelper.go": 487, + "pkg/framework/entutils/mixins.go": 1900, + "pkg/framework/entutils/pgjsonb.go": 525, + "pkg/framework/entutils/pgulid.go": 154, + "pkg/framework/entutils/sort.go": 156, + "pkg/framework/entutils/testutils/ent1/db/client.go": 2838, + "pkg/framework/entutils/testutils/ent1/db/cursor.go": 352, + "pkg/framework/entutils/testutils/ent1/db/ent.go": 4018, + "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go": 494, + "pkg/framework/entutils/testutils/ent1/db/example1.go": 1169, + "pkg/framework/entutils/testutils/ent1/db/example1/example1.go": 653, + "pkg/framework/entutils/testutils/ent1/db/example1/where.go": 2712, + "pkg/framework/entutils/testutils/ent1/db/example1_create.go": 4918, + "pkg/framework/entutils/testutils/ent1/db/example1_delete.go": 589, + "pkg/framework/entutils/testutils/ent1/db/example1_query.go": 4032, + "pkg/framework/entutils/testutils/ent1/db/example1_update.go": 2203, + "pkg/framework/entutils/testutils/ent1/db/expose.go": 608, + "pkg/framework/entutils/testutils/ent1/db/hook/hook.go": 1281, + "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go": 945, + "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go": 211, + "pkg/framework/entutils/testutils/ent1/db/mutation.go": 4200, + "pkg/framework/entutils/testutils/ent1/db/paginate.go": 409, + "pkg/framework/entutils/testutils/ent1/db/predicate/predicate.go": 48, + "pkg/framework/entutils/testutils/ent1/db/runtime.go": 352, + "pkg/framework/entutils/testutils/ent1/db/runtime/runtime.go": 92, + "pkg/framework/entutils/testutils/ent1/db/tx.go": 1821, + "pkg/framework/entutils/testutils/ent1/entc.go": 200, + "pkg/framework/entutils/testutils/ent1/generate.go": 13, + "pkg/framework/entutils/testutils/ent1/schema/example1.go": 134, + "pkg/framework/entutils/testutils/ent2/db/client.go": 2838, + "pkg/framework/entutils/testutils/ent2/db/ent.go": 4018, + "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go": 494, + "pkg/framework/entutils/testutils/ent2/db/example2.go": 1169, + "pkg/framework/entutils/testutils/ent2/db/example2/example2.go": 653, + "pkg/framework/entutils/testutils/ent2/db/example2/where.go": 2712, + "pkg/framework/entutils/testutils/ent2/db/example2_create.go": 4918, + "pkg/framework/entutils/testutils/ent2/db/example2_delete.go": 589, + "pkg/framework/entutils/testutils/ent2/db/example2_query.go": 4032, + "pkg/framework/entutils/testutils/ent2/db/example2_update.go": 2203, + "pkg/framework/entutils/testutils/ent2/db/expose.go": 608, + "pkg/framework/entutils/testutils/ent2/db/hook/hook.go": 1281, + "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go": 945, + "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go": 211, + "pkg/framework/entutils/testutils/ent2/db/mutation.go": 4200, + "pkg/framework/entutils/testutils/ent2/db/predicate/predicate.go": 48, + "pkg/framework/entutils/testutils/ent2/db/runtime.go": 352, + "pkg/framework/entutils/testutils/ent2/db/runtime/runtime.go": 92, + "pkg/framework/entutils/testutils/ent2/db/tx.go": 1821, + "pkg/framework/entutils/testutils/ent2/entc.go": 156, + "pkg/framework/entutils/testutils/ent2/generate.go": 13, + "pkg/framework/entutils/testutils/ent2/schema/example2.go": 134, + "pkg/framework/entutils/transaction.go": 1457, + "pkg/framework/entutils/transaction_test.go": 3207, + "pkg/framework/entutils/valuescanner.go": 143, + "pkg/framework/lockr/key.go": 274, + "pkg/framework/lockr/locker.go": 970, + "pkg/framework/lockr/locker_test.go": 2264, + "pkg/framework/lockr/session.go": 1674, + "pkg/framework/lockr/session_test.go": 2674, + "pkg/framework/lockr/var.go": 14, + "pkg/framework/operation/middleware.go": 180, + "pkg/framework/operation/middleware_test.go": 146, + "pkg/framework/operation/operation.go": 389, + "pkg/framework/operation/operation_test.go": 411, + "pkg/framework/pgdriver/driver.go": 646, + "pkg/framework/tracex/tracex.go": 508, + "pkg/framework/transaction/context.go": 204, + "pkg/framework/transaction/transaction.go": 659, + "pkg/framework/transport/httptransport/argshandler.go": 518, + "pkg/framework/transport/httptransport/encoder/encoder.go": 140, + "pkg/framework/transport/httptransport/handler.go": 1404, + "pkg/framework/transport/httptransport/options.go": 476, + "pkg/gosundheit/logger.go": 240, + "pkg/hasher/hasher.go": 18, + "pkg/hasher/xxhash.go": 29, + "pkg/idempotency/key.go": 115, + "pkg/kafka/config.go": 6771, + "pkg/kafka/config_test.go": 3011, + "pkg/kafka/kafka.go": 23, + "pkg/kafka/log.go": 538, + "pkg/kafka/metrics/internal/broker.go": 4837, + "pkg/kafka/metrics/internal/consumergroup.go": 899, + "pkg/kafka/metrics/internal/partition.go": 3608, + "pkg/kafka/metrics/internal/topic.go": 2667, + "pkg/kafka/metrics/metrics.go": 2337, + "pkg/kafka/metrics/metrics_test.go": 348, + "pkg/kafka/metrics/stats/broker.go": 1288, + "pkg/kafka/metrics/stats/consumergroup.go": 1575, + "pkg/kafka/metrics/stats/stats.go": 713, + "pkg/kafka/metrics/stats/stats_test.go": 723, + "pkg/kafka/metrics/stats/testdata/stats.json": 2154, + "pkg/kafka/metrics/stats/topic.go": 872, + "pkg/kafka/topicprovisioner.go": 2274, + "pkg/kafka/topicprovisioner_test.go": 871, + "pkg/log/mock.go": 170, + "pkg/log/panic.go": 532, + "pkg/lrux/lruitemttl.go": 641, + "pkg/lrux/lruitemttl_test.go": 464, + "pkg/models/annotation.go": 491, + "pkg/models/annotation_test.go": 772, + "pkg/models/attributes.go": 223, + "pkg/models/cadence.go": 477, + "pkg/models/cadence_test.go": 1632, + "pkg/models/cadencelist.go": 629, + "pkg/models/clonable.go": 15, + "pkg/models/equaler.go": 34, + "pkg/models/errors.go": 2089, + "pkg/models/errors_test.go": 410, + "pkg/models/fielddescriptor.go": 1199, + "pkg/models/fielddescriptor_test.go": 2404, + "pkg/models/fieldexpression.go": 612, + "pkg/models/http/annotation.go": 104, + "pkg/models/http/metadata.go": 95, + "pkg/models/id.go": 79, + "pkg/models/idorkey.go": 162, + "pkg/models/key.go": 79, + "pkg/models/metadata.go": 232, + "pkg/models/metadata_test.go": 343, + "pkg/models/model.go": 1338, + "pkg/models/percentage.go": 416, + "pkg/models/percentage_test.go": 122, + "pkg/models/problem.go": 1006, + "pkg/models/repository.go": 45, + "pkg/models/servicehook.go": 827, + "pkg/models/testutils.go": 261, + "pkg/models/validationissue.go": 2934, + "pkg/models/validationissue_test.go": 2827, + "pkg/models/validator.go": 136, + "pkg/otelx/spancontext.go": 169, + "pkg/pagination/collect.go": 165, + "pkg/pagination/collect_test.go": 754, + "pkg/pagination/page.go": 296, + "pkg/pagination/pagination.go": 131, + "pkg/pagination/pagination_test.go": 191, + "pkg/pagination/result.go": 349, + "pkg/pagination/v2/collect.go": 159, + "pkg/pagination/v2/collect_test.go": 1065, + "pkg/pagination/v2/cursor.go": 567, + "pkg/pagination/v2/cursor_test.go": 1622, + "pkg/pagination/v2/pagination.go": 202, + "pkg/pagination/v2/pagination_test.go": 307, + "pkg/pagination/v2/result.go": 173, + "pkg/pglockx/pglock.go": 292, + "pkg/pgxpoolobserver/observer.go": 1503, + "pkg/redis/client.go": 635, + "pkg/redis/config.go": 401, + "pkg/ref/ref.go": 154, + "pkg/server/attributes.go": 231, + "pkg/server/logger.go": 370, + "pkg/server/middleware.go": 39, + "pkg/server/poweredby.go": 125, + "pkg/server/poweredby_test.go": 149, + "pkg/set/set.go": 423, + "pkg/set/set_test.go": 545, + "pkg/slicesx/diff.go": 314, + "pkg/slicesx/diff_test.go": 317, + "pkg/slicesx/each.go": 58, + "pkg/slicesx/each_test.go": 364, + "pkg/slicesx/empty.go": 78, + "pkg/slicesx/groupby.go": 86, + "pkg/slicesx/iteratee.go": 33, + "pkg/slicesx/last.go": 75, + "pkg/slicesx/map.go": 221, + "pkg/slicesx/map_test.go": 73, + "pkg/slicesx/normalize.go": 41, + "pkg/slicesx/normalize_test.go": 82, + "pkg/slicesx/slice.go": 37, + "pkg/sortx/order.go": 97, + "pkg/statelessx/actions.go": 306, + "pkg/statelessx/conditions.go": 62, + "pkg/strcase/strcase.go": 158, + "pkg/strcase/strcase_test.go": 483, + "pkg/timeutil/boundary.go": 194, + "pkg/timeutil/boundedperiod.go": 302, + "pkg/timeutil/closedperiod.go": 749, + "pkg/timeutil/closedperiod_test.go": 1946, + "pkg/timeutil/compare.go": 23, + "pkg/timeutil/openperiod.go": 1734, + "pkg/timeutil/openperiod_test.go": 6334, + "pkg/timeutil/period.go": 68, + "pkg/timeutil/recurrence.go": 2274, + "pkg/timeutil/recurrence_test.go": 3114, + "pkg/timeutil/timeline.go": 913, + "pkg/timeutil/timeline_test.go": 1239, + "pkg/treex/errors.go": 97, + "pkg/treex/node.go": 693, + "pkg/treex/node_test.go": 1007, + "pkg/treex/tree.go": 584, + "pkg/treex/tree_test.go": 1202, + "pkg/treex/usage_example_test.go": 1052, + "quickstart/.gitignore": 7, + "quickstart/Makefile": 279, + "quickstart/README.md": 851, + "quickstart/config.yaml": 574, + "quickstart/docker-compose.debug-ports.yaml": 115, + "quickstart/docker-compose.yaml": 944, + "quickstart/quickstart_test.go": 1656, + "test/app/app_test.go": 206, + "test/app/custominvoicing/event_test.go": 512, + "test/app/custominvoicing/invocing_test.go": 3253, + "test/app/marketplace.go": 683, + "test/app/stripe/app_test.go": 381, + "test/app/stripe/appstripe.go": 7691, + "test/app/stripe/fixture.go": 977, + "test/app/stripe/invoice_credits_test.go": 3646, + "test/app/stripe/invoice_test.go": 12919, + "test/app/stripe/secret_mock.go": 703, + "test/app/stripe/stripe_mock.go": 1482, + "test/app/stripe/testenv.go": 1533, + "test/app/testenv.go": 2132, + "test/billing/adapter_test.go": 7192, + "test/billing/collection_config_test.go": 256, + "test/billing/collection_test.go": 7959, + "test/billing/customeroverride_test.go": 5244, + "test/billing/discount_test.go": 3987, + "test/billing/event_test.go": 378, + "test/billing/invoice_test.go": 39523, + "test/billing/lineengine_test.go": 12580, + "test/billing/profile.go": 363, + "test/billing/profile_test.go": 3997, + "test/billing/schemamigration_test.go": 2790, + "test/billing/subscription_suite.go": 2926, + "test/billing/subscription_test.go": 3028, + "test/billing/suite.go": 6148, + "test/billing/tax_test.go": 2902, + "test/billing/taxcode_dual_write_test.go": 8715, + "test/billing/ubpflatfee_test.go": 1984, + "test/credits/base.go": 6748, + "test/credits/credit_then_invoice_test.go": 56742, + "test/credits/creditgrant_test.go": 5313, + "test/credits/rating_test.go": 1165, + "test/credits/sanity_lifecycle_test.go": 8080, + "test/credits/sanity_test.go": 46801, + "test/customer/customer.go": 11363, + "test/customer/customer_test.go": 444, + "test/customer/subject.go": 3736, + "test/customer/testenv.go": 4238, + "test/entitlement/regression/framework_test.go": 2276, + "test/entitlement/regression/scenario_test.go": 5797, + "test/notification/channel.go": 1766, + "test/notification/consumer_balance.go": 5332, + "test/notification/event.go": 3156, + "test/notification/helpers.go": 284, + "test/notification/notification_test.go": 912, + "test/notification/repository.go": 1619, + "test/notification/rule.go": 2490, + "test/notification/testenv.go": 1893, + "test/notification/webhook.go": 2187, + "test/subscription/framework_test.go": 1931, + "test/subscription/scenario_editaligned_test.go": 1794, + "test/subscription/scenario_editcancel_test.go": 1829, + "test/subscription/scenario_entinnextphase_test.go": 1425, + "test/subscription/scenario_firstofmonth_test.go": 3875, + "tools/migrate/README.md": 70, + "tools/migrate/cmd/viewgen/main.go": 130, + "tools/migrate/dedupe_tax_codes_by_app_mapping_test.go": 5427, + "tools/migrate/feature_advanced_meter_group_by_filters_test.go": 1781, + "tools/migrate/feature_meter_id_test.go": 1456, + "tools/migrate/flatfee_runs_test.go": 1635, + "tools/migrate/fs.go": 334, + "tools/migrate/fs_test.go": 386, + "tools/migrate/generate-sqlc-testdata.sh": 823, + "tools/migrate/ledger_tax_behavior_test.go": 756, + "tools/migrate/llmcost_normalize_providers_test.go": 2505, + "tools/migrate/migrate.go": 1433, + "tools/migrate/migrate_test.go": 1216, + "tools/migrate/migrations/20240826120919_init.down.sql": 1256, + "tools/migrate/migrations/20240826120919_init.up.sql": 2980, + "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql": 40, + "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql": 54, + "tools/migrate/migrations/20240917172257_billing-entities.down.sql": 547, + "tools/migrate/migrations/20240917172257_billing-entities.up.sql": 1509, + "tools/migrate/migrations/20240918204720_customer.down.sql": 551, + "tools/migrate/migrations/20240918204720_customer.up.sql": 1003, + "tools/migrate/migrations/20240919144910_customer-timezone.down.sql": 21, + "tools/migrate/migrations/20240919144910_customer-timezone.up.sql": 24, + "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql": 944, + "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql": 982, + "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql": 60, + "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql": 36, + "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql": 225, + "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql": 229, + "tools/migrate/migrations/20240924164504_billing-profile.down.sql": 652, + "tools/migrate/migrations/20240924164504_billing-profile.up.sql": 785, + "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql": 217, + "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql": 532, + "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql": 92, + "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql": 112, + "tools/migrate/migrations/20241013151355_apps.down.sql": 445, + "tools/migrate/migrations/20241013151355_apps.up.sql": 1116, + "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql": 75, + "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql": 92, + "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql": 29, + "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql": 35, + "tools/migrate/migrations/20241021124045_billing-profile.down.sql": 445, + "tools/migrate/migrations/20241021124045_billing-profile.up.sql": 510, + "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql": 1356, + "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql": 1628, + "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql": 25, + "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql": 27, + "tools/migrate/migrations/20241102151321_customer_filters.down.sql": 101, + "tools/migrate/migrations/20241102151321_customer_filters.up.sql": 123, + "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql": 160, + "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql": 364, + "tools/migrate/migrations/20241105171821_plan.down.sql": 521, + "tools/migrate/migrations/20241105171821_plan.up.sql": 1168, + "tools/migrate/migrations/20241108055754_plan.down.sql": 75, + "tools/migrate/migrations/20241108055754_plan.up.sql": 78, + "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql": 518, + "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql": 694, + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql": 813, + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql": 755, + "tools/migrate/migrations/20241119131528_plan.down.sql": 167, + "tools/migrate/migrations/20241119131528_plan.up.sql": 173, + "tools/migrate/migrations/20241119154436_plan.down.sql": 71, + "tools/migrate/migrations/20241119154436_plan.up.sql": 74, + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql": 235, + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql": 241, + "tools/migrate/migrations/20241120145625_billing-discounts.down.sql": 386, + "tools/migrate/migrations/20241120145625_billing-discounts.up.sql": 655, + "tools/migrate/migrations/20241121145549_billing-totals.down.sql": 177, + "tools/migrate/migrations/20241121145549_billing-totals.up.sql": 248, + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql": 40, + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql": 41, + "tools/migrate/migrations/20241204162012_subscriptions.down.sql": 671, + "tools/migrate/migrations/20241204162012_subscriptions.up.sql": 1338, + "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql": 70, + "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql": 82, + "tools/migrate/migrations/20241209085334_subscription_fields.down.sql": 199, + "tools/migrate/migrations/20241209085334_subscription_fields.up.sql": 146, + "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql": 59, + "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql": 73, + "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql": 152, + "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql": 273, + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql": 36, + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql": 39, + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql": 43, + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql": 66, + "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql": 119, + "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql": 140, + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql": 68, + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql": 98, + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql": 294, + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql": 213, + "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql": 59, + "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql": 54, + "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql": 84, + "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql": 87, + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql": 217, + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql": 444, + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql": 36, + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql": 45, + "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql": 27, + "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql": 138, + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql": 125, + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql": 289, + "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql": 64, + "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql": 71, + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql": 97, + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql": 97, + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql": 0, + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql": 110, + "tools/migrate/migrations/20250130034713_customer_key.down.sql": 118, + "tools/migrate/migrations/20250130034713_customer_key.up.sql": 166, + "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql": 26, + "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql": 27, + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql": 27, + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql": 29, + "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql": 324, + "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql": 324, + "tools/migrate/migrations/20250203131553_plan-alignment.down.sql": 22, + "tools/migrate/migrations/20250203131553_plan-alignment.up.sql": 27, + "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql": 27, + "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql": 30, + "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql": 26, + "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql": 31, + "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql": 29, + "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql": 30, + "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql": 96, + "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql": 119, + "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql": 628, + "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql": 683, + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql": 88, + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql": 93, + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql": 22, + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql": 334, + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql": 126, + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql": 190, + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql": 316, + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql": 266, + "tools/migrate/migrations/20250305025807_add_meter_table.down.sql": 30, + "tools/migrate/migrations/20250305025807_add_meter_table.up.sql": 184, + "tools/migrate/migrations/20250306040407_resource_meter.down.sql": 240, + "tools/migrate/migrations/20250306040407_resource_meter.up.sql": 407, + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql": 24, + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql": 24, + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql": 177, + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql": 152, + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql": 23, + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql": 49, + "tools/migrate/migrations/20250325114848_annotations.down.sql": 23, + "tools/migrate/migrations/20250325114848_annotations.up.sql": 23, + "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql": 82, + "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql": 172, + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql": 28, + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql": 23, + "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql": 29, + "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql": 43, + "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql": 24, + "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql": 24, + "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql": 25, + "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql": 20, + "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql": 26, + "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql": 26, + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql": 136, + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql": 78, + "tools/migrate/migrations/20250404105832_addon.down.sql": 372, + "tools/migrate/migrations/20250404105832_addon.up.sql": 866, + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql": 29, + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql": 30, + "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql": 21, + "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql": 29, + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql": 31, + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql": 61, + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql": 71, + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql": 136, + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql": 0, + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql": 58, + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql": 38, + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql": 39, + "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql": 642, + "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql": 1450, + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql": 560, + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql": 704, + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql": 42, + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql": 274, + "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql": 25, + "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql": 45, + "tools/migrate/migrations/20250415105134_plan_addons.down.sql": 127, + "tools/migrate/migrations/20250415105134_plan_addons.up.sql": 334, + "tools/migrate/migrations/20250415143130_subs-annotations.down.sql": 26, + "tools/migrate/migrations/20250415143130_subs-annotations.up.sql": 26, + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql": 671, + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql": 50, + "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql": 198, + "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql": 523, + "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql": 34, + "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql": 52, + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql": 140, + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql": 148, + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql": 217, + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql": 247, + "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql": 2, + "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql": 167, + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql": 36, + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql": 49, + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql": 28, + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql": 110, + "tools/migrate/migrations/20250522155754_billing-line-index.down.sql": 34, + "tools/migrate/migrations/20250522155754_billing-line-index.up.sql": 35, + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql": 41, + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql": 39, + "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql": 0, + "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql": 149, + "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql": 26, + "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql": 27, + "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql": 362, + "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql": 507, + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql": 21, + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql": 2184, + "tools/migrate/migrations/20250606115858_subject_create.down.sql": 94, + "tools/migrate/migrations/20250606115858_subject_create.up.sql": 240, + "tools/migrate/migrations/20250606115859_subject_namespace.down.sql": 163, + "tools/migrate/migrations/20250606115859_subject_namespace.up.sql": 172, + "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql": 251, + "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql": 688, + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql": 0, + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql": 365, + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql": 62, + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql": 1035, + "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql": 24, + "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql": 94, + "tools/migrate/migrations/20250618194112_remove_app_default.down.sql": 82, + "tools/migrate/migrations/20250618194112_remove_app_default.up.sql": 54, + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql": 29, + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql": 20, + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql": 33, + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql": 24, + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql": 26, + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql": 122, + "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql": 62, + "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql": 74, + "tools/migrate/migrations/20250711121333_customer_annotations.down.sql": 48, + "tools/migrate/migrations/20250711121333_customer_annotations.up.sql": 57, + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql": 0, + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql": 2231, + "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql": 0, + "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql": 228, + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql": 51, + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql": 4913, + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql": 25, + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql": 29, + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql": 0, + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql": 69, + "tools/migrate/migrations/20250818081817_subscription-period.down.sql": 95, + "tools/migrate/migrations/20250818081817_subscription-period.up.sql": 234, + "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql": 36, + "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql": 410, + "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql": 187, + "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql": 355, + "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql": 26, + "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql": 33, + "tools/migrate/migrations/20250908130504_customer-indexes.down.sql": 134, + "tools/migrate/migrations/20250908130504_customer-indexes.up.sql": 169, + "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql": 85, + "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql": 89, + "tools/migrate/migrations/20250924131607_subject-index.down.sql": 58, + "tools/migrate/migrations/20250924131607_subject-index.up.sql": 96, + "tools/migrate/migrations/20250925160650_grant-annotations.down.sql": 44, + "tools/migrate/migrations/20250925160650_grant-annotations.up.sql": 122, + "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql": 33, + "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql": 32, + "tools/migrate/migrations/20250926145502_grant-annotations.down.sql": 0, + "tools/migrate/migrations/20250926145502_grant-annotations.up.sql": 39, + "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql": 0, + "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql": 66, + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql": 26, + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql": 174, + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql": 142, + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql": 185, + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql": 212, + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql": 255, + "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql": 120, + "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql": 91, + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql": 67, + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql": 67, + "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql": 53, + "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql": 63, + "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql": 95, + "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql": 118, + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql": 161, + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql": 27, + "tools/migrate/migrations/20251121083843_meter_annotations.down.sql": 44, + "tools/migrate/migrations/20251121083843_meter_annotations.up.sql": 52, + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql": 30, + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql": 31, + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql": 32, + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql": 30, + "tools/migrate/migrations/20251211145809_meter_event_type.down.sql": 28, + "tools/migrate/migrations/20251211145809_meter_event_type.up.sql": 36, + "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql": 202, + "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql": 364, + "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql": 49, + "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql": 72, + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql": 62, + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql": 89, + "tools/migrate/migrations/20260112160815_detailed-lines.down.sql": 719, + "tools/migrate/migrations/20260112160815_detailed-lines.up.sql": 1582, + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql": 40, + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql": 79, + "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql": 21, + "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql": 1078, + "tools/migrate/migrations/20260220092326_tax-code.down.sql": 146, + "tools/migrate/migrations/20260220092326_tax-code.up.sql": 286, + "tools/migrate/migrations/20260224121149_charges.down.sql": 1069, + "tools/migrate/migrations/20260224121149_charges.up.sql": 2216, + "tools/migrate/migrations/20260225160541_billing-credits.down.sql": 139, + "tools/migrate/migrations/20260225160541_billing-credits.up.sql": 1482, + "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql": 272, + "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql": 574, + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql": 1283, + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql": 1768, + "tools/migrate/migrations/20260303233513_llmcost_add.down.sql": 159, + "tools/migrate/migrations/20260303233513_llmcost_add.up.sql": 425, + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql": 691, + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql": 865, + "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql": 139, + "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql": 253, + "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql": 2898, + "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql": 2296, + "tools/migrate/migrations/20260316165258_ledger.down.sql": 1101, + "tools/migrate/migrations/20260316165258_ledger.up.sql": 2334, + "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql": 175, + "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql": 307, + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql": 374, + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql": 818, + "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql": 361, + "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql": 144, + "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql": 805, + "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql": 1840, + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql": 382, + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql": 752, + "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql": 730, + "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql": 1316, + "tools/migrate/migrations/20260320084936_charges-state-details.down.sql": 227, + "tools/migrate/migrations/20260320084936_charges-state-details.up.sql": 324, + "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql": 121, + "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql": 247, + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql": 29, + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql": 30, + "tools/migrate/migrations/20260323141807_add-feature-description.down.sql": 21, + "tools/migrate/migrations/20260323141807_add-feature-description.up.sql": 24, + "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql": 29, + "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql": 38, + "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql": 2059, + "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql": 2923, + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql": 46, + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql": 69, + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql": 54, + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql": 1379, + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql": 35, + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql": 38, + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql": 307, + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql": 410, + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql": 35, + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql": 39, + "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql": 129, + "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql": 220, + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql": 47, + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql": 56, + "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql": 26, + "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql": 36, + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql": 391, + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql": 742, + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql": 26, + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql": 69, + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql": 267, + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql": 494, + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql": 86, + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql": 124, + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql": 689, + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql": 1807, + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql": 175, + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql": 338, + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql": 399, + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql": 351, + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql": 32, + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql": 34, + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql": 130, + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql": 337, + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql": 604, + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql": 761, + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql": 31, + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql": 207, + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql": 48, + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql": 55, + "tools/migrate/migrations/20260502093117_distributed_locks.down.sql": 10, + "tools/migrate/migrations/20260502093117_distributed_locks.up.sql": 86, + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql": 102, + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql": 286, + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql": 152, + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql": 423, + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql": 49, + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql": 77, + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql": 291, + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql": 298, + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql": 26, + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql": 83, + "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql": 4709, + "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql": 5137, + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql": 348, + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql": 340, + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql": 322, + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql": 322, + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql": 27, + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql": 67, + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql": 119, + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql": 121, + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql": 69, + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql": 100, + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql": 382, + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql": 725, + "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql": 0, + "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql": 20, + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql": 81, + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql": 1833, + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql": 137, + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql": 33, + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql": 138, + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql": 2109, + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql": 37, + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql": 35, + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql": 62, + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql": 63, + "tools/migrate/productcatalog_test.go": 7522, + "tools/migrate/testdata/ignore/20240826120919_init.down.sql": 61, + "tools/migrate/testdata/ignore/20240826120919_init.up.sql": 174, + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.down.sql": 45, + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.up.sql": 59, + "tools/migrate/testdata/ignore/20240917172257_billing-entities.down.sql": 547, + "tools/migrate/testdata/ignore/20240917172257_billing-entities.up.sql": 1509, + "tools/migrate/testdata/noignore/20240826120919_init.down.sql": 1256, + "tools/migrate/testdata/noignore/20240826120919_init.up.sql": 2980, + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.down.sql": 40, + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.up.sql": 54, + "tools/migrate/testdata/noignore/20240917172257_billing-entities.down.sql": 547, + "tools/migrate/testdata/noignore/20240917172257_billing-entities.up.sql": 1509, + "tools/migrate/testdata/sqlcgen/README.md": 1086, + "tools/migrate/view_parity_test.go": 1781, + "tools/migrate/viewgen/viewgen.go": 662, + "tools/migrate/views.sql": 411, + "tools/wait-for-compose.sh": 480 + }, + "tokens_by_directory": { + ".codex/agents": 121, + ".codex/rules": 3085, + ".": 27728, + "api": 491640, + "api/client/go": 3439, + "api/client/javascript": 34397, + "api/client/javascript/patches": 148019, + "api/client/javascript/scripts": 567, + "api/client/javascript/src/client": 28626, + "api/client/javascript/src/portal": 713, + "api/client/javascript/src/react": 184, + "api/client/javascript/src/zod": 234207, + "api/client/node": 21, + "api/client/python": 11276, + "api/client/python/examples": 233, + "api/client/python/examples/async": 3180, + "api/client/python/examples/sync": 2883, + "api/client/python/openmeter": 1364, + "api/client/python/openmeter/_generated": 5115, + "api/client/python/openmeter/_generated/_utils": 34207, + "api/client/python/openmeter/_generated/aio": 4071, + "api/client/python/openmeter/_generated/aio/operations": 226310, + "api/client/python/openmeter/_generated/models": 180548, + "api/client/python/openmeter/_generated/operations": 1105, + "api/client/python/openmeter/aio": 371, + "api/client/python/openmeter/aio/operations": 223, + "api/client/python/openmeter/models": 219, + "api/client/python/openmeter/operations": 214, + "api/client/python/scripts": 424, + "api/client/web": 21, + "api/spec": 33380, + "api/spec/packages/aip/common/definitions": 11249, + "api/spec/packages/aip/lib": 249, + "api/spec/packages/aip/lib/rules": 4951, + "api/spec/packages/aip": 460, + "api/spec/packages/aip/scripts": 2171, + "api/spec/packages/aip/src/apps": 6059, + "api/spec/packages/aip/src/billing": 3964, + "api/spec/packages/aip/src/common": 3251, + "api/spec/packages/aip/src/currencies/cost-bases": 686, + "api/spec/packages/aip/src/currencies": 1280, + "api/spec/packages/aip/src/customers": 2781, + "api/spec/packages/aip/src/customers/charges": 2203, + "api/spec/packages/aip/src/customers/credits": 5207, + "api/spec/packages/aip/src/defaults": 482, + "api/spec/packages/aip/src/entitlements": 592, + "api/spec/packages/aip/src/events": 1718, + "api/spec/packages/aip/src/features": 2793, + "api/spec/packages/aip/src/governance": 1820, + "api/spec/packages/aip/src/invoices": 761, + "api/spec/packages/aip/src": 4103, + "api/spec/packages/aip/src/llmcost": 1840, + "api/spec/packages/aip/src/meters": 2749, + "api/spec/packages/aip/src/productcatalog": 8164, + "api/spec/packages/aip/src/shared": 5555, + "api/spec/packages/aip/src/subscriptions": 3086, + "api/spec/packages/aip/src/tax": 680, + "api/spec/packages/legacy": 1303, + "api/spec/packages/legacy/lib": 164, + "api/spec/packages/legacy/lib/rules": 2027, + "api/spec/packages/legacy/src/app": 11011, + "api/spec/packages/legacy/src": 16114, + "api/spec/packages/legacy/src/billing": 10393, + "api/spec/packages/legacy/src/billing/invoices": 11128, + "api/spec/packages/legacy/src/cloud": 2822, + "api/spec/packages/legacy/src/customer": 3135, + "api/spec/packages/legacy/src/entitlements": 9906, + "api/spec/packages/legacy/src/entitlements/v2": 5431, + "api/spec/packages/legacy/src/info": 434, + "api/spec/packages/legacy/src/notification": 8177, + "api/spec/packages/legacy/src/productcatalog": 18380, + "api/spec/patches": 268812, + "api/types": 66, + "api/v3": 194078, + "api/v3/apierrors": 5722, + "api/v3/filters": 18488, + "api/v3/handlers/addons": 9646, + "api/v3/handlers/apps": 3330, + "api/v3/handlers/billingprofiles": 9320, + "api/v3/handlers/currencies": 3160, + "api/v3/handlers/customers/billing": 13130, + "api/v3/handlers/customers/charges": 6165, + "api/v3/handlers/customers": 6174, + "api/v3/handlers/customers/credits": 11119, + "api/v3/handlers/customers/entitlementaccess": 1443, + "api/v3/handlers/events": 4599, + "api/v3/handlers/featurecost": 1522, + "api/v3/handlers/features": 10851, + "api/v3/handlers/llmcost": 5010, + "api/v3/handlers/meters": 7257, + "api/v3/handlers/meters/query": 5774, + "api/v3/handlers/plans": 18347, + "api/v3/handlers/plans/planaddons": 3233, + "api/v3/handlers/subscriptions": 6643, + "api/v3/handlers/subscriptions/subscriptionaddons": 2115, + "api/v3/handlers/taxcodes": 6065, + "api/v3/labels": 3454, + "api/v3/oasmiddleware": 4907, + "api/v3/render": 391, + "api/v3/request": 1828, + "api/v3/response": 593, + "api/v3/server": 9216, + "api/v3/templates": 255, + "api/v3/test": 9128, + "app/common": 35429, + "app/config": 26363, + "app/config/testdata": 861, + "cmd/balance-worker": 3314, + "cmd/billing-worker": 4896, + "cmd/jobs/billing/advance": 550, + "cmd/jobs/billing/advancecharges": 547, + "cmd/jobs/billing": 135, + "cmd/jobs/billing/collect": 691, + "cmd/jobs/billing/subscriptionsync": 631, + "cmd/jobs/entitlement": 337, + "cmd/jobs/internal": 6322, + "cmd/jobs/ledger/backfillaccounts": 1043, + "cmd/jobs/ledger": 63, + "cmd/jobs/ledger/service": 4626, + "cmd/jobs/llmcost": 123, + "cmd/jobs": 632, + "cmd/jobs/migrate": 272, + "cmd/jobs/quickstart": 744, + "cmd/notification-service": 3731, + "cmd/server": 11489, + "cmd/sink-worker": 3777, + "collector": 8017, + "collector/benthos/bloblang": 259, + "collector/benthos/input": 10789, + "collector/benthos/input/runai": 5924, + "collector/benthos/internal": 264, + "collector/benthos/internal/logging": 355, + "collector/benthos/internal/message": 956, + "collector/benthos/internal/shutdown": 1211, + "collector/benthos/output": 2611, + "collector/benthos/presets/http-server": 843, + "collector/benthos/presets/kubernetes-pod-exec-time": 905, + "collector/benthos/services/leaderelection": 2044, + "collector/cmd": 251, + "collector/quickstart/collector": 66, + "collector/quickstart/collector/resources": 18, + "collector/quickstart/collector/streams": 653, + "collector/quickstart": 375, + "collector/quickstart/seeder": 516, + "deploy": 283, + "deploy/charts": 497, + "deploy/charts/benthos-collector": 3596, + "deploy/charts/benthos-collector/templates": 3334, + "deploy/charts/openmeter": 6955, + "deploy/charts/openmeter/templates": 10812, + "docs": 2856, + "docs/decisions": 2093, + "docs/migration-guides": 2998, + "e2e": 63994, + "etc/seed": 542, + "etc/seed/streams": 1223, + "etc/wiretap": 37, + "openmeter/apiconverter": 3002, + "openmeter/app": 7950, + "openmeter/app/adapter": 4791, + "openmeter/app/custominvoicing": 3509, + "openmeter/app/custominvoicing/adapter": 1690, + "openmeter/app/custominvoicing/httpdriver": 2728, + "openmeter/app/custominvoicing/service": 2024, + "openmeter/app/httpdriver": 10292, + "openmeter/app/sandbox": 4445, + "openmeter/app/service": 1829, + "openmeter/app/stripe": 16383, + "openmeter/app/stripe/adapter": 9202, + "openmeter/app/stripe/client": 12548, + "openmeter/app/stripe/httpdriver": 9634, + "openmeter/app/stripe/service": 5607, + "openmeter/billing": 69586, + "openmeter/billing/adapter": 47661, + "openmeter/billing/charges": 7039, + "openmeter/billing/charges/adapter": 4220, + "openmeter/billing/charges/creditpurchase": 7495, + "openmeter/billing/charges/creditpurchase/adapter": 7965, + "openmeter/billing/charges/creditpurchase/lineengine": 1067, + "openmeter/billing/charges/creditpurchase/service": 8795, + "openmeter/billing/charges/flatfee": 9926, + "openmeter/billing/charges/flatfee/adapter": 11815, + "openmeter/billing/charges/flatfee/service": 17337, + "openmeter/billing/charges/flatfee/service/realizations": 8984, + "openmeter/billing/charges/invoiceupdater": 7203, + "openmeter/billing/charges/lineage/adapter": 2738, + "openmeter/billing/charges/lineage": 3111, + "openmeter/billing/charges/lineage/service": 2012, + "openmeter/billing/charges/meta": 7830, + "openmeter/billing/charges/meta/adapter": 845, + "openmeter/billing/charges/models/chargemeta": 2672, + "openmeter/billing/charges/models/creditrealization": 14862, + "openmeter/billing/charges/models/invoicedusage": 1029, + "openmeter/billing/charges/models/ledgertransaction": 358, + "openmeter/billing/charges/models/payment": 3500, + "openmeter/billing/charges/service": 87405, + "openmeter/billing/charges/statemachine": 4023, + "openmeter/billing/charges/testutils": 3453, + "openmeter/billing/charges/usagebased": 15149, + "openmeter/billing/charges/usagebased/adapter": 12786, + "openmeter/billing/charges/usagebased/service": 30122, + "openmeter/billing/charges/usagebased/service/rating/delta": 25520, + "openmeter/billing/charges/usagebased/service/rating": 10181, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving": 17068, + "openmeter/billing/charges/usagebased/service/rating/subtract": 15650, + "openmeter/billing/charges/usagebased/service/rating/testutils": 930, + "openmeter/billing/charges/usagebased/service/run": 10747, + "openmeter/billing/charges/worker/advance": 713, + "openmeter/billing/charges/worker/asyncadvance": 321, + "openmeter/billing/creditgrant": 1884, + "openmeter/billing/creditgrant/service": 2246, + "openmeter/billing/httpdriver": 29543, + "openmeter/billing/lineengine": 2805, + "openmeter/billing/models/creditsapplied": 347, + "openmeter/billing/models/externalid": 816, + "openmeter/billing/models/stddetailedline": 3464, + "openmeter/billing/models/totals": 2756, + "openmeter/billing/rating": 3947, + "openmeter/billing/rating/service": 4539, + "openmeter/billing/rating/service/mutator": 7591, + "openmeter/billing/rating/service/rate": 26047, + "openmeter/billing/rating/service/testutil": 1102, + "openmeter/billing/service": 51779, + "openmeter/billing/service/invoicecalc": 12215, + "openmeter/billing/testutils": 557, + "openmeter/billing/validators/customer": 707, + "openmeter/billing/validators/subscription": 712, + "openmeter/billing/worker/advance": 1453, + "openmeter/billing/worker/asyncadvance": 318, + "openmeter/billing/worker/collect": 1599, + "openmeter/billing/worker/subscriptionsync": 728, + "openmeter/billing/worker/subscriptionsync/adapter": 1121, + "openmeter/billing/worker/subscriptionsync/reconciler": 1789, + "openmeter/billing/worker/subscriptionsync/service": 142329, + "openmeter/billing/worker/subscriptionsync/service/persistedstate": 5720, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater": 6223, + "openmeter/billing/worker/subscriptionsync/service/reconciler": 18280, + "openmeter/billing/worker/subscriptionsync/service/targetstate": 18996, + "openmeter/billing/worker": 1792, + "openmeter/cost": 472, + "openmeter/cost/adapter": 13530, + "openmeter/cost/service": 190, + "openmeter/credit/adapter": 3310, + "openmeter/credit": 8507, + "openmeter/credit/balance": 4333, + "openmeter/credit/driver": 2803, + "openmeter/credit/engine": 25039, + "openmeter/credit/grant": 6057, + "openmeter/credit/hook": 242, + "openmeter/currencies": 1384, + "openmeter/currencies/adapter": 1706, + "openmeter/currencies/service": 3234, + "openmeter/customer": 6330, + "openmeter/customer/adapter": 12424, + "openmeter/customer/app": 196, + "openmeter/customer/httpdriver": 7586, + "openmeter/customer/service": 4763, + "openmeter/customer/service/hooks": 8371, + "openmeter/customer/testutils": 927, + "openmeter/debug": 561, + "openmeter/debug/httpdriver": 651, + "openmeter/dedupe": 281, + "openmeter/dedupe/memorydedupe": 796, + "openmeter/dedupe/redisdedupe": 1689, + "openmeter/ent/db": 2817060, + "openmeter/ent/db/addon": 10261, + "openmeter/ent/db/addonratecard": 13622, + "openmeter/ent/db/app": 10559, + "openmeter/ent/db/appcustomer": 5725, + "openmeter/ent/db/appcustominvoicing": 5293, + "openmeter/ent/db/appcustominvoicingcustomer": 6692, + "openmeter/ent/db/appstripe": 8793, + "openmeter/ent/db/appstripecustomer": 8317, + "openmeter/ent/db/balancesnapshot": 6293, + "openmeter/ent/db/billingcustomerlock": 2683, + "openmeter/ent/db/billingcustomeroverride": 15226, + "openmeter/ent/db/billinginvoice": 54382, + "openmeter/ent/db/billinginvoiceflatfeelineconfig": 4401, + "openmeter/ent/db/billinginvoiceline": 40807, + "openmeter/ent/db/billinginvoicelinediscount": 13362, + "openmeter/ent/db/billinginvoicelineusagediscount": 11371, + "openmeter/ent/db/billinginvoicesplitlinegroup": 22132, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig": 6583, + "openmeter/ent/db/billinginvoicevalidationissue": 10154, + "openmeter/ent/db/billinginvoicewriteschemalevel": 1700, + "openmeter/ent/db/billingprofile": 22060, + "openmeter/ent/db/billingsequencenumbers": 3072, + "openmeter/ent/db/billingstandardinvoicedetailedline": 25964, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount": 12533, + "openmeter/ent/db/billingworkflowconfig": 12822, + "openmeter/ent/db/charge": 10822, + "openmeter/ent/db/chargecreditpurchase": 27366, + "openmeter/ent/db/chargecreditpurchasecreditgrant": 7212, + "openmeter/ent/db/chargecreditpurchaseexternalpayment": 12720, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment": 15103, + "openmeter/ent/db/chargeflatfee": 29697, + "openmeter/ent/db/chargeflatfeerun": 17984, + "openmeter/ent/db/chargeflatfeeruncreditallocations": 13697, + "openmeter/ent/db/chargeflatfeerundetailedline": 23789, + "openmeter/ent/db/chargeflatfeeruninvoicedusage": 13421, + "openmeter/ent/db/chargeflatfeerunpayment": 13785, + "openmeter/ent/db/chargessearchv1": 19143, + "openmeter/ent/db/chargeusagebased": 28413, + "openmeter/ent/db/chargeusagebasedruncreditallocations": 13414, + "openmeter/ent/db/chargeusagebasedrundetailedline": 27274, + "openmeter/ent/db/chargeusagebasedruninvoicedusage": 13706, + "openmeter/ent/db/chargeusagebasedrunpayment": 13547, + "openmeter/ent/db/chargeusagebasedruns": 20395, + "openmeter/ent/db/creditrealizationlineage": 8650, + "openmeter/ent/db/creditrealizationlineagesegment": 8474, + "openmeter/ent/db/currencycostbasis": 7101, + "openmeter/ent/db/customcurrency": 6383, + "openmeter/ent/db/customer": 20249, + "openmeter/ent/db/customersubjects": 5048, + "openmeter/ent/db/entitlement": 18155, + "openmeter/ent/db/enttest": 476, + "openmeter/ent/db/feature": 20153, + "openmeter/ent/db/grant": 10294, + "openmeter/ent/db/hook": 11684, + "openmeter/ent/db/ledgeraccount": 5723, + "openmeter/ent/db/ledgerbreakagerecord": 17832, + "openmeter/ent/db/ledgercustomeraccount": 6479, + "openmeter/ent/db/ledgerentry": 7529, + "openmeter/ent/db/ledgersubaccount": 6691, + "openmeter/ent/db/ledgersubaccountroute": 14071, + "openmeter/ent/db/ledgertransaction": 6018, + "openmeter/ent/db/ledgertransactiongroup": 4486, + "openmeter/ent/db/llmcostprice": 12348, + "openmeter/ent/db/meter": 8935, + "openmeter/ent/db/migrate": 64780, + "openmeter/ent/db/notificationchannel": 6158, + "openmeter/ent/db/notificationevent": 5577, + "openmeter/ent/db/notificationeventdeliverystatus": 8315, + "openmeter/ent/db/notificationrule": 6553, + "openmeter/ent/db/organizationdefaulttaxcodes": 7130, + "openmeter/ent/db/plan": 11055, + "openmeter/ent/db/planaddon": 7392, + "openmeter/ent/db/planphase": 8849, + "openmeter/ent/db/planratecard": 13519, + "openmeter/ent/db/predicate": 3916, + "openmeter/ent/db/runtime": 86, + "openmeter/ent/db/subject": 5948, + "openmeter/ent/db/subscription": 16644, + "openmeter/ent/db/subscriptionaddon": 6952, + "openmeter/ent/db/subscriptionaddonquantity": 6741, + "openmeter/ent/db/subscriptionbillingsyncstate": 5118, + "openmeter/ent/db/subscriptionitem": 21669, + "openmeter/ent/db/subscriptionphase": 12244, + "openmeter/ent/db/taxcode": 15463, + "openmeter/ent/db/usagereset": 6938, + "openmeter/ent": 311, + "openmeter/ent/schema": 38006, + "openmeter/ent/tx": 185, + "openmeter/entitlement": 16129, + "openmeter/entitlement/adapter": 17826, + "openmeter/entitlement/balanceworker": 13288, + "openmeter/entitlement/balanceworker/events": 763, + "openmeter/entitlement/balanceworker/filters": 1940, + "openmeter/entitlement/boolean": 737, + "openmeter/entitlement/driver": 13371, + "openmeter/entitlement/driver/v2": 13731, + "openmeter/entitlement/hooks/subscription": 405, + "openmeter/entitlement/metered": 48285, + "openmeter/entitlement/service": 18201, + "openmeter/entitlement/snapshot": 1480, + "openmeter/entitlement/static": 917, + "openmeter/entitlement/validators/customer": 377, + "openmeter/event/metadata": 581, + "openmeter/event/models": 117, + "openmeter/info/httpdriver": 437, + "openmeter/ingest": 1518, + "openmeter/ingest/httpdriver": 2189, + "openmeter/ingest/ingestadapter": 573, + "openmeter/ingest/kafkaingest": 2284, + "openmeter/ingest/kafkaingest/serializer": 2130, + "openmeter/ingest/kafkaingest/topicresolver": 222, + "openmeter/ledger": 22013, + "openmeter/ledger/account": 2831, + "openmeter/ledger/account/adapter": 5941, + "openmeter/ledger/account/service": 1131, + "openmeter/ledger/breakage": 11668, + "openmeter/ledger/breakage/adapter": 2646, + "openmeter/ledger/chargeadapter": 40225, + "openmeter/ledger/collector": 19534, + "openmeter/ledger/customerbalance": 26034, + "openmeter/ledger/historical/adapter": 15857, + "openmeter/ledger/historical": 3493, + "openmeter/ledger/noop": 2486, + "openmeter/ledger/recognizer": 4495, + "openmeter/ledger/resolvers": 5214, + "openmeter/ledger/resolvers/adapter": 794, + "openmeter/ledger/routingrules": 11391, + "openmeter/ledger/testutils": 2120, + "openmeter/ledger/transactions": 30026, + "openmeter/ledger/transactions/testutils": 542, + "openmeter/llmcost": 7717, + "openmeter/llmcost/adapter": 3588, + "openmeter/llmcost/service": 3144, + "openmeter/llmcost/sync": 13571, + "openmeter/meter/adapter": 4259, + "openmeter/meter": 11377, + "openmeter/meter/httphandler": 9285, + "openmeter/meter/mockadapter": 2270, + "openmeter/meter/service": 1932, + "openmeter/meterevent/adapter": 2667, + "openmeter/meterevent/httphandler": 1914, + "openmeter/meterevent": 2450, + "openmeter/meterexport": 2325, + "openmeter/meterexport/service": 8102, + "openmeter/namespace": 1529, + "openmeter/namespace/namespacedriver": 83, + "openmeter/notification/adapter": 8624, + "openmeter/notification": 12083, + "openmeter/notification/consumer": 14599, + "openmeter/notification/eventhandler": 8590, + "openmeter/notification/eventhandler/noop": 121, + "openmeter/notification/httpdriver": 12848, + "openmeter/notification/internal": 1918, + "openmeter/notification/service": 5941, + "openmeter/notification/webhook": 3093, + "openmeter/notification/webhook/noop": 661, + "openmeter/notification/webhook/secret": 249, + "openmeter/notification/webhook/svix": 8922, + "openmeter/notification/webhook/svix/internal": 621, + "openmeter/portal/adapter": 1262, + "openmeter/portal/authenticator": 1305, + "openmeter/portal/httphandler": 2008, + "openmeter/portal": 890, + "openmeter/productcatalog/adapter": 11068, + "openmeter/productcatalog": 57588, + "openmeter/productcatalog/addon/adapter": 10461, + "openmeter/productcatalog/addon": 10956, + "openmeter/productcatalog/addon/httpdriver": 4429, + "openmeter/productcatalog/addon/service": 18346, + "openmeter/productcatalog/driver": 4460, + "openmeter/productcatalog/feature": 9992, + "openmeter/productcatalog/featureresolver": 5342, + "openmeter/productcatalog/http": 7157, + "openmeter/productcatalog/plan/adapter": 12036, + "openmeter/productcatalog/plan": 15603, + "openmeter/productcatalog/plan/httpdriver": 5736, + "openmeter/productcatalog/plan/service": 23728, + "openmeter/productcatalog/planaddon/adapter": 7774, + "openmeter/productcatalog/planaddon": 4383, + "openmeter/productcatalog/planaddon/httpdriver": 3476, + "openmeter/productcatalog/planaddon/service": 7267, + "openmeter/productcatalog/subscription/http": 13029, + "openmeter/productcatalog/subscription": 1165, + "openmeter/productcatalog/subscription/service": 10492, + "openmeter/productcatalog/subscription/testutils": 609, + "openmeter/productcatalog/testutils": 3310, + "openmeter/progressmanager": 190, + "openmeter/progressmanager/adapter": 1332, + "openmeter/progressmanager/entity": 540, + "openmeter/progressmanager/httpdriver": 795, + "openmeter/registry/builder": 1404, + "openmeter/registry": 190, + "openmeter/secret": 298, + "openmeter/secret/adapter": 462, + "openmeter/secret/entity": 827, + "openmeter/secret/service": 526, + "openmeter/server": 23134, + "openmeter/server/router": 17295, + "openmeter/session": 544, + "openmeter/sink": 10566, + "openmeter/sink/flushhandler": 2364, + "openmeter/sink/flushhandler/ingestnotification/events": 488, + "openmeter/sink/flushhandler/ingestnotification": 1136, + "openmeter/sink/models": 296, + "openmeter/streaming/clickhouse": 34236, + "openmeter/streaming": 6478, + "openmeter/streaming/retry": 2978, + "openmeter/streaming/testutils": 8111, + "openmeter/subject": 1155, + "openmeter/subject/adapter": 2673, + "openmeter/subject/httphandler": 2981, + "openmeter/subject/service/hooks": 4285, + "openmeter/subject/service": 3378, + "openmeter/subject/testutils": 1151, + "openmeter/subscription/addon": 15485, + "openmeter/subscription/addon/diff": 20352, + "openmeter/subscription/addon/http": 4008, + "openmeter/subscription/addon/repo": 3154, + "openmeter/subscription/addon/service": 12149, + "openmeter/subscription": 44110, + "openmeter/subscription/entitlement": 1266, + "openmeter/subscription/hooks/annotations": 1671, + "openmeter/subscription/patch": 14345, + "openmeter/subscription/repo": 7136, + "openmeter/subscription/service": 29043, + "openmeter/subscription/testutils": 15890, + "openmeter/subscription/validators/customer": 946, + "openmeter/subscription/validators/subscription": 2222, + "openmeter/subscription/workflow": 847, + "openmeter/subscription/workflow/service": 32751, + "openmeter/taxcode/adapter": 3358, + "openmeter/taxcode": 8370, + "openmeter/taxcode/service": 6617, + "openmeter/taxcode/testutils": 868, + "openmeter/testutils": 1549, + "openmeter/watermill/driver/kafka": 2534, + "openmeter/watermill/driver/kafka/metrics": 1595, + "openmeter/watermill/driver/noop": 84, + "openmeter/watermill/eventbus": 1134, + "openmeter/watermill/grouphandler": 988, + "openmeter/watermill/marshaler": 1357, + "openmeter/watermill/nopublisher": 153, + "openmeter/watermill/router": 4839, + "pkg/clock": 312, + "pkg/cmpx": 65, + "pkg/contextx": 353, + "pkg/convert": 473, + "pkg/currencyx": 5673, + "pkg/datetime": 12631, + "pkg/defaultx": 55, + "pkg/entitydiff": 1845, + "pkg/equal": 160, + "pkg/errorsx": 1629, + "pkg/expand": 291, + "pkg/featuregate": 65, + "pkg/ffx": 584, + "pkg/filter": 25961, + "pkg/framework": 563, + "pkg/framework/clickhouseotel": 2173, + "pkg/framework/commonhttp": 3671, + "pkg/framework/entutils/entcursor": 1360, + "pkg/framework/entutils/entdriver": 339, + "pkg/framework/entutils/entexpose": 904, + "pkg/framework/entutils/entmixinaccessor": 334, + "pkg/framework/entutils/entpaginate": 1594, + "pkg/framework/entutils/entsetorclear": 384, + "pkg/framework/entutils": 9808, + "pkg/framework/entutils/testutils/ent1/db": 27509, + "pkg/framework/entutils/testutils/ent1/db/enttest": 494, + "pkg/framework/entutils/testutils/ent1/db/example1": 3365, + "pkg/framework/entutils/testutils/ent1/db/hook": 1281, + "pkg/framework/entutils/testutils/ent1/db/migrate": 1156, + "pkg/framework/entutils/testutils/ent1/db/predicate": 48, + "pkg/framework/entutils/testutils/ent1/db/runtime": 92, + "pkg/framework/entutils/testutils/ent1": 213, + "pkg/framework/entutils/testutils/ent1/schema": 134, + "pkg/framework/entutils/testutils/ent2/db": 26748, + "pkg/framework/entutils/testutils/ent2/db/enttest": 494, + "pkg/framework/entutils/testutils/ent2/db/example2": 3365, + "pkg/framework/entutils/testutils/ent2/db/hook": 1281, + "pkg/framework/entutils/testutils/ent2/db/migrate": 1156, + "pkg/framework/entutils/testutils/ent2/db/predicate": 48, + "pkg/framework/entutils/testutils/ent2/db/runtime": 92, + "pkg/framework/entutils/testutils/ent2": 169, + "pkg/framework/entutils/testutils/ent2/schema": 134, + "pkg/framework/lockr": 7870, + "pkg/framework/operation": 1126, + "pkg/framework/pgdriver": 646, + "pkg/framework/tracex": 508, + "pkg/framework/transaction": 863, + "pkg/framework/transport/httptransport": 2398, + "pkg/framework/transport/httptransport/encoder": 140, + "pkg/gosundheit": 240, + "pkg/hasher": 47, + "pkg/idempotency": 115, + "pkg/kafka": 13488, + "pkg/kafka/metrics/internal": 12011, + "pkg/kafka/metrics": 2685, + "pkg/kafka/metrics/stats": 5171, + "pkg/kafka/metrics/stats/testdata": 2154, + "pkg/log": 702, + "pkg/lrux": 1105, + "pkg/models": 21794, + "pkg/models/http": 199, + "pkg/otelx": 169, + "pkg/pagination": 1886, + "pkg/pagination/v2": 4095, + "pkg/pglockx": 292, + "pkg/pgxpoolobserver": 1503, + "pkg/redis": 1036, + "pkg/ref": 154, + "pkg/server": 914, + "pkg/set": 968, + "pkg/slicesx": 1779, + "pkg/sortx": 97, + "pkg/statelessx": 368, + "pkg/strcase": 641, + "pkg/timeutil": 18890, + "pkg/treex": 4635, + "quickstart": 4426, + "test/app": 3021, + "test/app/custominvoicing": 3765, + "test/app/stripe": 29332, + "test/billing": 109972, + "test/credits": 124849, + "test/customer": 19781, + "test/entitlement/regression": 8073, + "test/notification": 19639, + "test/subscription": 10854, + "tools/migrate": 27536, + "tools/migrate/cmd/viewgen": 130, + "tools/migrate/migrations": 136202, + "tools/migrate/testdata/ignore": 2395, + "tools/migrate/testdata/noignore": 6386, + "tools/migrate/testdata/sqlcgen": 1086, + "tools/migrate/viewgen": 662, + "tools": 480 + }, + "dependencies": [ + { + "name": "cirello.io/pglock", + "version": "v1.16.1", + "source": "go.mod" + }, + { + "name": "entgo.io/ent", + "version": "v0.14.6", + "source": "go.mod" + }, + { + "name": "github.com/AppsFlyer/go-sundheit", + "version": "v0.6.0", + "source": "go.mod" + }, + { + "name": "github.com/ClickHouse/clickhouse-go/v2", + "version": "v2.46.0", + "source": "go.mod" + }, + { + "name": "github.com/IBM/sarama", + "version": "v1.49.0", + "source": "go.mod" + }, + { + "name": "github.com/ThreeDotsLabs/watermill", + "version": "v1.5.2", + "source": "go.mod" + }, + { + "name": "github.com/ThreeDotsLabs/watermill-kafka/v3", + "version": "v3.1.2", + "source": "go.mod" + }, + { + "name": "github.com/XSAM/otelsql", + "version": "v0.42.0", + "source": "go.mod" + }, + { + "name": "github.com/alpacahq/alpacadecimal", + "version": "v0.0.9", + "source": "go.mod" + }, + { + "name": "github.com/avast/retry-go/v4", + "version": "v4.7.0", + "source": "go.mod" + }, + { + "name": "github.com/bhmj/jsonslice", + "version": "v1.1.3", + "source": "go.mod" + }, + { + "name": "github.com/brianvoe/gofakeit/v6", + "version": "v6.28.0", + "source": "go.mod" + }, + { + "name": "github.com/brunoga/deep", + "version": "v1.3.1", + "source": "go.mod" + }, + { + "name": "github.com/cloudevents/sdk-go/v2", + "version": "v2.16.2", + "source": "go.mod" + }, + { + "name": "github.com/confluentinc/confluent-kafka-go/v2", + "version": "v2.14.1", + "source": "go.mod" + }, + { + "name": "github.com/forscht/namegen", + "version": "v1.0.1", + "source": "go.mod" + }, + { + "name": "github.com/getkin/kin-openapi", + "version": "v0.139.0", + "source": "go.mod" + }, + { + "name": "github.com/go-chi/chi/v5", + "version": "v5.2.5", + "source": "go.mod" + }, + { + "name": "github.com/go-chi/cors", + "version": "v1.2.2", + "source": "go.mod" + }, + { + "name": "github.com/go-chi/render", + "version": "v1.0.3", + "source": "go.mod" + }, + { + "name": "github.com/go-co-op/gocron/v2", + "version": "v2.21.2", + "source": "go.mod" + }, + { + "name": "github.com/go-slog/otelslog", + "version": "v0.3.0", + "source": "go.mod" + }, + { + "name": "github.com/go-viper/mapstructure/v2", + "version": "v2.5.0", + "source": "go.mod" + }, + { + "name": "github.com/golang-cz/devslog", + "version": "v0.0.15", + "source": "go.mod" + }, + { + "name": "github.com/golang-jwt/jwt/v5", + "version": "v5.3.1", + "source": "go.mod" + }, + { + "name": "github.com/golang-migrate/migrate/v4", + "version": "v4.19.1", + "source": "go.mod" + }, + { + "name": "github.com/google/uuid", + "version": "v1.6.0", + "source": "go.mod" + }, + { + "name": "github.com/google/wire", + "version": "v0.7.0", + "source": "go.mod" + }, + { + "name": "github.com/hashicorp/golang-lru/v2", + "version": "v2.0.7", + "source": "go.mod" + }, + { + "name": "github.com/huandu/go-sqlbuilder", + "version": "v1.41.0", + "source": "go.mod" + }, + { + "name": "github.com/invopop/gobl", + "version": "v0.403.0", + "source": "go.mod" + }, + { + "name": "github.com/jackc/pgx/v5", + "version": "v5.9.2", + "source": "go.mod" + }, + { + "name": "github.com/lmittmann/tint", + "version": "v1.1.3", + "source": "go.mod" + }, + { + "name": "github.com/mitchellh/mapstructure", + "version": "v1.5.0", + "source": "go.mod" + }, + { + "name": "github.com/oapi-codegen/nethttp-middleware", + "version": "v1.1.2", + "source": "go.mod" + }, + { + "name": "github.com/oapi-codegen/nullable", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "github.com/oapi-codegen/runtime", + "version": "v1.4.1", + "source": "go.mod" + }, + { + "name": "github.com/oklog/run", + "version": "v1.1.1-0.20240127200640-eee6e044b77c", + "source": "go.mod" + }, + { + "name": "github.com/oklog/ulid/v2", + "version": "v2.1.1", + "source": "go.mod" + }, + { + "name": "github.com/oliveagle/jsonpath", + "version": "v0.1.4", + "source": "go.mod" + }, + { + "name": "github.com/peterbourgon/ctxdata/v4", + "version": "v4.0.0", + "source": "go.mod" + }, + { + "name": "github.com/peterldowns/pgtestdb", + "version": "v0.1.1", + "source": "go.mod" + }, + { + "name": "github.com/prometheus/client_golang", + "version": "v1.23.2", + "source": "go.mod" + }, + { + "name": "github.com/prometheus/client_model", + "version": "v0.6.2", + "source": "go.mod" + }, + { + "name": "github.com/prometheus/common", + "version": "v0.68.0", + "source": "go.mod" + }, + { + "name": "github.com/qmuntal/stateless", + "version": "v1.8.0", + "source": "go.mod" + }, + { + "name": "github.com/rcrowley/go-metrics", + "version": "v0.0.0-20250401214520-65e299d6c5c9", + "source": "go.mod" + }, + { + "name": "github.com/redis/go-redis/extra/redisotel/v9", + "version": "v9.20.0", + "source": "go.mod" + }, + { + "name": "github.com/redis/go-redis/v9", + "version": "v9.20.0", + "source": "go.mod" + }, + { + "name": "github.com/rickb777/period", + "version": "v1.0.27", + "source": "go.mod" + }, + { + "name": "github.com/sagikazarmark/mapstructurex", + "version": "v0.1.0", + "source": "go.mod" + }, + { + "name": "github.com/samber/lo", + "version": "v1.53.0", + "source": "go.mod" + }, + { + "name": "github.com/samber/mo", + "version": "v1.16.0", + "source": "go.mod" + }, + { + "name": "github.com/samber/slog-multi", + "version": "v1.8.0", + "source": "go.mod" + }, + { + "name": "github.com/spf13/cobra", + "version": "v1.10.2", + "source": "go.mod" + }, + { + "name": "github.com/spf13/pflag", + "version": "v1.0.10", + "source": "go.mod" + }, + { + "name": "github.com/spf13/viper", + "version": "v1.21.0", + "source": "go.mod" + }, + { + "name": "github.com/stretchr/testify", + "version": "v1.11.1", + "source": "go.mod" + }, + { + "name": "github.com/stripe/stripe-go/v80", + "version": "v80.2.1", + "source": "go.mod" + }, + { + "name": "github.com/svix/svix-webhooks", + "version": "v1.95.1", + "source": "go.mod" + }, + { + "name": "github.com/wI2L/jsondiff", + "version": "v0.7.1", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/bridges/otelslog", + "version": "v0.19.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp", + "version": "v0.69.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/instrumentation/runtime", + "version": "v0.69.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc", + "version": "v0.20.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/prometheus", + "version": "v0.66.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/log", + "version": "v0.20.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/metric", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk/log", + "version": "v0.20.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk/metric", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/trace", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/proto/otlp", + "version": "v1.10.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/exp", + "version": "v0.0.0-20260410095643-746e56fc9e2f", + "source": "go.mod" + }, + { + "name": "google.golang.org/grpc", + "version": "v1.81.1", + "source": "go.mod" + }, + { + "name": "google.golang.org/protobuf", + "version": "v1.36.11", + "source": "go.mod" + }, + { + "name": "github.com/apparentlymart/go-textseg/v15", + "version": "v15.0.0", + "source": "go.mod" + }, + { + "name": "github.com/awalterschulze/goderive", + "version": "v0.5.1", + "source": "go.mod" + }, + { + "name": "github.com/bhmj/xpression", + "version": "v0.9.4", + "source": "go.mod" + }, + { + "name": "github.com/bitfield/gotestdox", + "version": "v0.2.2", + "source": "go.mod" + }, + { + "name": "github.com/bmatcuk/doublestar", + "version": "v1.3.4", + "source": "go.mod" + }, + { + "name": "github.com/cenkalti/backoff/v5", + "version": "v5.0.3", + "source": "go.mod" + }, + { + "name": "github.com/containerd/console", + "version": "v1.0.5", + "source": "go.mod" + }, + { + "name": "github.com/containerd/containerd", + "version": "v1.7.32", + "source": "go.mod" + }, + { + "name": "github.com/containerd/containerd/api", + "version": "v1.9.0", + "source": "go.mod" + }, + { + "name": "github.com/containerd/continuity", + "version": "v0.4.5", + "source": "go.mod" + }, + { + "name": "github.com/containerd/platforms", + "version": "v1.0.0-rc.1", + "source": "go.mod" + }, + { + "name": "github.com/dave/jennifer", + "version": "v1.7.1", + "source": "go.mod" + }, + { + "name": "github.com/dnephin/pflag", + "version": "v1.0.7", + "source": "go.mod" + }, + { + "name": "github.com/docker/cli", + "version": "v29.2.0+incompatible", + "source": "go.mod" + }, + { + "name": "github.com/docker/go-connections", + "version": "v0.7.0", + "source": "go.mod" + }, + { + "name": "github.com/expr-lang/expr", + "version": "v1.17.8", + "source": "go.mod" + }, + { + "name": "github.com/go-ole/go-ole", + "version": "v1.3.0", + "source": "go.mod" + }, + { + "name": "github.com/go-openapi/swag/jsonname", + "version": "v0.25.4", + "source": "go.mod" + }, + { + "name": "github.com/gofrs/flock", + "version": "v0.12.1", + "source": "go.mod" + }, + { + "name": "github.com/google/shlex", + "version": "v0.0.0-20191202100458-e7afc7fbc510", + "source": "go.mod" + }, + { + "name": "github.com/huandu/go-clone", + "version": "v1.7.3", + "source": "go.mod" + }, + { + "name": "github.com/jmattheis/goverter", + "version": "v1.9.3", + "source": "go.mod" + }, + { + "name": "github.com/jonboulle/clockwork", + "version": "v0.5.0", + "source": "go.mod" + }, + { + "name": "github.com/kisielk/gotool", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/lufia/plan9stats", + "version": "v0.0.0-20250317134145-8bc96cf8fc35", + "source": "go.mod" + }, + { + "name": "github.com/moby/moby/api", + "version": "v1.54.2", + "source": "go.mod" + }, + { + "name": "github.com/moby/moby/client", + "version": "v0.4.1", + "source": "go.mod" + }, + { + "name": "github.com/moby/sys/atomicwriter", + "version": "v0.1.0", + "source": "go.mod" + }, + { + "name": "github.com/moby/sys/capability", + "version": "v0.4.0", + "source": "go.mod" + }, + { + "name": "github.com/moby/term", + "version": "v0.5.2", + "source": "go.mod" + }, + { + "name": "github.com/oapi-codegen/oapi-codegen/v2", + "version": "v2.6.1-0.20260403235458-a76544bd16ff", + "source": "go.mod" + }, + { + "name": "github.com/oasdiff/yaml", + "version": "v0.1.0", + "source": "go.mod" + }, + { + "name": "github.com/oasdiff/yaml3", + "version": "v0.0.13", + "source": "go.mod" + }, + { + "name": "github.com/onsi/ginkgo", + "version": "v1.16.5", + "source": "go.mod" + }, + { + "name": "github.com/onsi/gomega", + "version": "v1.38.2", + "source": "go.mod" + }, + { + "name": "github.com/pb33f/ordered-map/v2", + "version": "v2.3.1", + "source": "go.mod" + }, + { + "name": "github.com/power-devops/perfstat", + "version": "v0.0.0-20240221224432-82ca36839d55", + "source": "go.mod" + }, + { + "name": "github.com/prometheus/otlptranslator", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/samber/slog-common", + "version": "v0.21.0", + "source": "go.mod" + }, + { + "name": "github.com/santhosh-tekuri/jsonschema/v6", + "version": "v6.0.2", + "source": "go.mod" + }, + { + "name": "github.com/shirou/gopsutil/v4", + "version": "v4.25.7", + "source": "go.mod" + }, + { + "name": "github.com/speakeasy-api/jsonpath", + "version": "v0.6.0", + "source": "go.mod" + }, + { + "name": "github.com/tidwall/gjson", + "version": "v1.18.0", + "source": "go.mod" + }, + { + "name": "github.com/tidwall/match", + "version": "v1.1.1", + "source": "go.mod" + }, + { + "name": "github.com/tidwall/pretty", + "version": "v1.2.1", + "source": "go.mod" + }, + { + "name": "github.com/tidwall/sjson", + "version": "v1.2.5", + "source": "go.mod" + }, + { + "name": "github.com/woodsbury/decimal128", + "version": "v1.4.0", + "source": "go.mod" + }, + { + "name": "github.com/zclconf/go-cty-yaml", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/auto/sdk", + "version": "v1.2.1", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp", + "version": "v1.43.0", + "source": "go.mod" + }, + { + "name": "go.yaml.in/yaml/v3", + "version": "v3.0.4", + "source": "go.mod" + }, + { + "name": "go.yaml.in/yaml/v4", + "version": "v4.0.0-rc.2", + "source": "go.mod" + }, + { + "name": "golang.org/x/net", + "version": "v0.55.0", + "source": "go.mod" + }, + { + "name": "gotest.tools/gotestsum", + "version": "v1.13.0", + "source": "go.mod" + }, + { + "name": "k8s.io/api", + "version": "v0.35.3", + "source": "go.mod" + }, + { + "name": "k8s.io/apimachinery", + "version": "v0.35.3", + "source": "go.mod" + }, + { + "name": "k8s.io/client-go", + "version": "v0.35.3", + "source": "go.mod" + }, + { + "name": "sigs.k8s.io/structured-merge-diff/v6", + "version": "v6.3.2-0.20260122202528-d9cc6641c482", + "source": "go.mod" + }, + { + "name": "ariga.io/atlas", + "version": "v0.36.2-0.20250730182955-2c6300d0a3e1", + "source": "go.mod" + }, + { + "name": "cloud.google.com/go", + "version": "v0.123.0", + "source": "go.mod" + }, + { + "name": "github.com/ClickHouse/ch-go", + "version": "v0.72.0", + "source": "go.mod" + }, + { + "name": "github.com/agext/levenshtein", + "version": "v1.2.3", + "source": "go.mod" + }, + { + "name": "github.com/ajg/form", + "version": "v1.5.1", + "source": "go.mod" + }, + { + "name": "github.com/andybalholm/brotli", + "version": "v1.2.0", + "source": "go.mod" + }, + { + "name": "github.com/apapsch/go-jsonmerge/v2", + "version": "v2.0.0", + "source": "go.mod" + }, + { + "name": "github.com/asaskevich/govalidator", + "version": "v0.0.0-20230301143203-a9d515a09cc2", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2", + "version": "v1.41.5", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/config", + "version": "v1.31.12", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/internal/configsources", + "version": "v1.4.21", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2", + "version": "v2.7.21", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding", + "version": "v1.13.7", + "source": "go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url", + "version": "v1.13.21", + "source": "go.mod" + }, + { + "name": "github.com/aws/smithy-go", + "version": "v1.24.2", + "source": "go.mod" + }, + { + "name": "github.com/bahlo/generic-list-go", + "version": "v0.2.0", + "source": "go.mod" + }, + { + "name": "github.com/beorn7/perks", + "version": "v1.0.1", + "source": "go.mod" + }, + { + "name": "github.com/buger/jsonparser", + "version": "v1.1.2", + "source": "go.mod" + }, + { + "name": "github.com/cespare/xxhash/v2", + "version": "v2.3.0", + "source": "go.mod" + }, + { + "name": "github.com/davecgh/go-spew", + "version": "v1.1.2-0.20180830191138-d8f796af33cc", + "source": "go.mod" + }, + { + "name": "github.com/dlclark/regexp2", + "version": "v1.11.5", + "source": "go.mod" + }, + { + "name": "github.com/dnwe/otelsarama", + "version": "v0.0.0-20240308230250-9388d9d40bc0", + "source": "go.mod" + }, + { + "name": "github.com/dprotaso/go-yit", + "version": "v0.0.0-20220510233725-9ba8df137936", + "source": "go.mod" + }, + { + "name": "github.com/eapache/go-resiliency", + "version": "v1.7.0", + "source": "go.mod" + }, + { + "name": "github.com/eapache/queue", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "github.com/fatih/color", + "version": "v1.18.0", + "source": "go.mod" + }, + { + "name": "github.com/felixge/httpsnoop", + "version": "v1.0.4", + "source": "go.mod" + }, + { + "name": "github.com/fsnotify/fsnotify", + "version": "v1.9.0", + "source": "go.mod" + }, + { + "name": "github.com/go-faster/city", + "version": "v1.0.1", + "source": "go.mod" + }, + { + "name": "github.com/go-faster/errors", + "version": "v0.7.1", + "source": "go.mod" + }, + { + "name": "github.com/go-logr/logr", + "version": "v1.4.3", + "source": "go.mod" + }, + { + "name": "github.com/go-logr/stdr", + "version": "v1.2.2", + "source": "go.mod" + }, + { + "name": "github.com/go-openapi/inflect", + "version": "v0.21.5", + "source": "go.mod" + }, + { + "name": "github.com/go-openapi/jsonpointer", + "version": "v0.22.4", + "source": "go.mod" + }, + { + "name": "github.com/gogo/protobuf", + "version": "v1.3.2", + "source": "go.mod" + }, + { + "name": "github.com/google/go-cmp", + "version": "v0.7.0", + "source": "go.mod" + }, + { + "name": "github.com/google/subcommands", + "version": "v1.2.0", + "source": "go.mod" + }, + { + "name": "github.com/gorilla/mux", + "version": "v1.8.1", + "source": "go.mod" + }, + { + "name": "github.com/gosimple/unidecode", + "version": "v1.0.1", + "source": "go.mod" + }, + { + "name": "github.com/govalues/decimal", + "version": "v0.1.36", + "source": "go.mod" + }, + { + "name": "github.com/grpc-ecosystem/grpc-gateway/v2", + "version": "v2.29.0", + "source": "go.mod" + }, + { + "name": "github.com/hashicorp/errwrap", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "github.com/hashicorp/go-multierror", + "version": "v1.1.1", + "source": "go.mod" + }, + { + "name": "github.com/hashicorp/go-uuid", + "version": "v1.0.3", + "source": "go.mod" + }, + { + "name": "github.com/hashicorp/hcl/v2", + "version": "v2.23.0", + "source": "go.mod" + }, + { + "name": "github.com/huandu/xstrings", + "version": "v1.4.0", + "source": "go.mod" + }, + { + "name": "github.com/inconshreveable/mousetrap", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "github.com/invopop/jsonschema", + "version": "v0.14.0", + "source": "go.mod" + }, + { + "name": "github.com/invopop/yaml", + "version": "v0.3.1", + "source": "go.mod" + }, + { + "name": "github.com/jackc/pgpassfile", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/jackc/pgservicefile", + "version": "v0.0.0-20240606120523-5a60cdf6a761", + "source": "go.mod" + }, + { + "name": "github.com/jackc/puddle/v2", + "version": "v2.2.2", + "source": "go.mod" + }, + { + "name": "github.com/jcmturner/aescts/v2", + "version": "v2.0.0", + "source": "go.mod" + }, + { + "name": "github.com/jcmturner/dnsutils/v2", + "version": "v2.0.0", + "source": "go.mod" + }, + { + "name": "github.com/jcmturner/gofork", + "version": "v1.7.6", + "source": "go.mod" + }, + { + "name": "github.com/jcmturner/gokrb5/v8", + "version": "v8.4.4", + "source": "go.mod" + }, + { + "name": "github.com/jcmturner/rpc/v2", + "version": "v2.0.3", + "source": "go.mod" + }, + { + "name": "github.com/josharian/intern", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/json-iterator/go", + "version": "v1.1.12", + "source": "go.mod" + }, + { + "name": "github.com/klauspost/compress", + "version": "v1.18.6", + "source": "go.mod" + }, + { + "name": "github.com/klauspost/cpuid/v2", + "version": "v2.3.0", + "source": "go.mod" + }, + { + "name": "github.com/lib/pq", + "version": "v1.12.3", + "source": "go.mod" + }, + { + "name": "github.com/lithammer/shortuuid/v3", + "version": "v3.0.7", + "source": "go.mod" + }, + { + "name": "github.com/mailru/easyjson", + "version": "v0.9.1", + "source": "go.mod" + }, + { + "name": "github.com/mattn/go-colorable", + "version": "v0.1.14", + "source": "go.mod" + }, + { + "name": "github.com/mattn/go-isatty", + "version": "v0.0.20", + "source": "go.mod" + }, + { + "name": "github.com/mitchellh/go-wordwrap", + "version": "v1.0.1", + "source": "go.mod" + }, + { + "name": "github.com/modern-go/concurrent", + "version": "v0.0.0-20180306012644-bacd9c7ef1dd", + "source": "go.mod" + }, + { + "name": "github.com/modern-go/reflect2", + "version": "v1.0.3-0.20250322232337-35a7c28c31ee", + "source": "go.mod" + }, + { + "name": "github.com/mohae/deepcopy", + "version": "v0.0.0-20170929034955-c48cc78d4826", + "source": "go.mod" + }, + { + "name": "github.com/munnerz/goautoneg", + "version": "v0.0.0-20191010083416-a7dc8b61c822", + "source": "go.mod" + }, + { + "name": "github.com/oklog/ulid", + "version": "v1.3.1", + "source": "go.mod" + }, + { + "name": "github.com/paulmach/orb", + "version": "v0.12.0", + "source": "go.mod" + }, + { + "name": "github.com/pelletier/go-toml/v2", + "version": "v2.2.4", + "source": "go.mod" + }, + { + "name": "github.com/perimeterx/marshmallow", + "version": "v1.1.5", + "source": "go.mod" + }, + { + "name": "github.com/pierrec/lz4/v4", + "version": "v4.1.26", + "source": "go.mod" + }, + { + "name": "github.com/pkg/errors", + "version": "v0.9.1", + "source": "go.mod" + }, + { + "name": "github.com/pmezard/go-difflib", + "version": "v1.0.1-0.20181226105442-5d4384ee4fb2", + "source": "go.mod" + }, + { + "name": "github.com/prometheus/procfs", + "version": "v0.20.1", + "source": "go.mod" + }, + { + "name": "github.com/redis/go-redis/extra/rediscmd/v9", + "version": "v9.20.0", + "source": "go.mod" + }, + { + "name": "github.com/rickb777/plural", + "version": "v1.4.10", + "source": "go.mod" + }, + { + "name": "github.com/robfig/cron/v3", + "version": "v3.0.1", + "source": "go.mod" + }, + { + "name": "github.com/sagikazarmark/locafero", + "version": "v0.11.0", + "source": "go.mod" + }, + { + "name": "github.com/segmentio/asm", + "version": "v1.2.1", + "source": "go.mod" + }, + { + "name": "github.com/sergi/go-diff", + "version": "v1.4.0", + "source": "go.mod" + }, + { + "name": "github.com/shopspring/decimal", + "version": "v1.4.0", + "source": "go.mod" + }, + { + "name": "github.com/sirupsen/logrus", + "version": "v1.9.4", + "source": "go.mod" + }, + { + "name": "github.com/sony/gobreaker", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/sourcegraph/conc", + "version": "v0.3.1-0.20240121214520-5f936abd7ae8", + "source": "go.mod" + }, + { + "name": "github.com/speakeasy-api/openapi-overlay", + "version": "v0.10.2", + "source": "go.mod" + }, + { + "name": "github.com/spf13/afero", + "version": "v1.15.0", + "source": "go.mod" + }, + { + "name": "github.com/spf13/cast", + "version": "v1.10.0", + "source": "go.mod" + }, + { + "name": "github.com/stretchr/objx", + "version": "v0.5.2", + "source": "go.mod" + }, + { + "name": "github.com/subosito/gotenv", + "version": "v1.6.0", + "source": "go.mod" + }, + { + "name": "github.com/vmware-labs/yaml-jsonpath", + "version": "v0.3.2", + "source": "go.mod" + }, + { + "name": "github.com/xdg-go/pbkdf2", + "version": "v1.0.0", + "source": "go.mod" + }, + { + "name": "github.com/xdg-go/scram", + "version": "v1.2.0", + "source": "go.mod" + }, + { + "name": "github.com/xdg-go/stringprep", + "version": "v1.0.4", + "source": "go.mod" + }, + { + "name": "github.com/zclconf/go-cty", + "version": "v1.16.2", + "source": "go.mod" + }, + { + "name": "github.com/zeebo/xxh3", + "version": "v1.1.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc", + "version": "v0.67.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace", + "version": "v1.44.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp", + "version": "v1.43.0", + "source": "go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/stdout/stdoutlog", + "version": "v0.20.0", + "source": "go.mod" + }, + { + "name": "go.uber.org/atomic", + "version": "v1.11.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/crypto", + "version": "v0.51.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/mod", + "version": "v0.35.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/sync", + "version": "v0.20.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/sys", + "version": "v0.45.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/term", + "version": "v0.43.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/text", + "version": "v0.37.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/time", + "version": "v0.15.0", + "source": "go.mod" + }, + { + "name": "golang.org/x/tools", + "version": "v0.44.0", + "source": "go.mod" + }, + { + "name": "google.golang.org/genproto", + "version": "v0.0.0-20260217215200-42d3e9bedb6d", + "source": "go.mod" + }, + { + "name": "google.golang.org/genproto/googleapis/api", + "version": "v0.0.0-20260526163538-3dc84a4a5aaa", + "source": "go.mod" + }, + { + "name": "google.golang.org/genproto/googleapis/rpc", + "version": "v0.0.0-20260526163538-3dc84a4a5aaa", + "source": "go.mod" + }, + { + "name": "gopkg.in/yaml.v2", + "version": "v2.4.0", + "source": "go.mod" + }, + { + "name": "gopkg.in/yaml.v3", + "version": "v3.0.1", + "source": "go.mod" + }, + { + "name": "k8s.io/klog/v2", + "version": "v2.140.0", + "source": "go.mod" + }, + { + "name": "class-variance-authority", + "version": "^0.7.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "clsx", + "version": "^2.1.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "highlight.js", + "version": "^11.11.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "lucide-react", + "version": "^0.469.0", + "source": ".archie/viewer/package.json" + }, + { + "name": "mermaid", + "version": "^11.4.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "react", + "version": "^18.3.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "react-dom", + "version": "^18.3.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "react-markdown", + "version": "^9.0.1", + "source": ".archie/viewer/package.json" + }, + { + "name": "react-router-dom", + "version": "^6.28.0", + "source": ".archie/viewer/package.json" + }, + { + "name": "rehype-highlight", + "version": "^7.0.2", + "source": ".archie/viewer/package.json" + }, + { + "name": "remark-gfm", + "version": "^4.0.0", + "source": ".archie/viewer/package.json" + }, + { + "name": "tailwind-merge", + "version": "^2.5.5", + "source": ".archie/viewer/package.json" + }, + { + "name": "@tailwindcss/typography", + "version": "^0.5.15", + "source": ".archie/viewer/package.json" + }, + { + "name": "@types/react", + "version": "^18.3.17", + "source": ".archie/viewer/package.json" + }, + { + "name": "@types/react-dom", + "version": "^18.3.5", + "source": ".archie/viewer/package.json" + }, + { + "name": "@vitejs/plugin-react", + "version": "^4.3.4", + "source": ".archie/viewer/package.json" + }, + { + "name": "autoprefixer", + "version": "^10.4.20", + "source": ".archie/viewer/package.json" + }, + { + "name": "postcss", + "version": "^8.4.49", + "source": ".archie/viewer/package.json" + }, + { + "name": "tailwindcss", + "version": "^3.4.17", + "source": ".archie/viewer/package.json" + }, + { + "name": "tailwindcss-animate", + "version": "^1.0.7", + "source": ".archie/viewer/package.json" + }, + { + "name": "typescript", + "version": "^5.7.2", + "source": ".archie/viewer/package.json" + }, + { + "name": "vite", + "version": "^6.0.3", + "source": ".archie/viewer/package.json" + }, + { + "name": "github.com/go-co-op/gocron/v2", + "version": "v2.21.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-logr/logr", + "version": "v1.4.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-resty/resty/v2", + "version": "v2.17.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang-jwt/jwt/v5", + "version": "v5.3.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/openmeterio/openmeter", + "version": "v0.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/prometheus/client_golang", + "version": "v1.23.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/prometheus/common", + "version": "v0.68.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/benthos/v4", + "version": "v4.73.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/connect/public/bundle/free/v4", + "version": "v4.93.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/robfig/cron/v3", + "version": "v3.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/samber/lo", + "version": "v1.53.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/urfave/cli/v2", + "version": "v2.27.7", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/trace", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/proto/otlp", + "version": "v1.10.0", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/grpc", + "version": "v1.81.1", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/protobuf", + "version": "v1.36.12-0.20260120151049-f2248ac996af", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/api", + "version": "v0.36.1", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/apimachinery", + "version": "v0.36.1", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/client-go", + "version": "v0.36.1", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/klog/v2", + "version": "v2.140.0", + "source": "collector/go.mod" + }, + { + "name": "sigs.k8s.io/controller-runtime", + "version": "v0.24.1", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go", + "version": "v1.36.11-20260209202127-80ab13bee0bf.1", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/bufbuild/reflect/connectrpc/go", + "version": "v1.19.1-20240117202343-bf8f65e8876c.2", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/bufbuild/reflect/protocolbuffers/go", + "version": "v1.36.11-20240117202343-bf8f65e8876c.1", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/redpandadata/common/connectrpc/go", + "version": "v1.19.1-20260323171043-6e06f84ad823.2", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/redpandadata/common/protocolbuffers/go", + "version": "v1.36.11-20260323171043-6e06f84ad823.1", + "source": "collector/go.mod" + }, + { + "name": "buf.build/gen/go/redpandadata/otel/protocolbuffers/go", + "version": "v1.36.11-20260323171043-3635d3966b23.1", + "source": "collector/go.mod" + }, + { + "name": "buf.build/go/hyperpb", + "version": "v0.1.3", + "source": "collector/go.mod" + }, + { + "name": "cel.dev/expr", + "version": "v0.25.1", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go", + "version": "v0.123.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/aiplatform", + "version": "v1.121.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/auth", + "version": "v0.20.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/auth/oauth2adapt", + "version": "v0.2.8", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/bigquery", + "version": "v1.75.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/compute/metadata", + "version": "v0.9.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/iam", + "version": "v1.7.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/longrunning", + "version": "v0.9.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/monitoring", + "version": "v1.24.3", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/pubsub", + "version": "v1.50.1", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/pubsub/v2", + "version": "v2.4.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/spanner", + "version": "v1.88.0", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/storage", + "version": "v1.62.1", + "source": "collector/go.mod" + }, + { + "name": "cloud.google.com/go/trace", + "version": "v1.11.7", + "source": "collector/go.mod" + }, + { + "name": "connectrpc.com/connect", + "version": "v1.19.1", + "source": "collector/go.mod" + }, + { + "name": "cuelang.org/go", + "version": "v0.16.1", + "source": "collector/go.mod" + }, + { + "name": "dario.cat/mergo", + "version": "v1.0.2", + "source": "collector/go.mod" + }, + { + "name": "filippo.io/edwards25519", + "version": "v1.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/99designs/go-keychain", + "version": "v0.0.0-20191008050251-8e49817e8af4", + "source": "collector/go.mod" + }, + { + "name": "github.com/99designs/keyring", + "version": "v1.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/AthenZ/athenz", + "version": "v1.12.36", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go", + "version": "v68.0.0+incompatible", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/azcore", + "version": "v1.21.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/azidentity", + "version": "v1.13.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos", + "version": "v1.4.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/data/aztables", + "version": "v1.4.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/internal", + "version": "v1.11.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob", + "version": "v1.6.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake", + "version": "v1.4.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/Azure/go-amqp", + "version": "v1.5.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/AzureAD/microsoft-authentication-library-for-go", + "version": "v1.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/BurntSushi/toml", + "version": "v1.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/ClickHouse/ch-go", + "version": "v0.72.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/ClickHouse/clickhouse-go/v2", + "version": "v2.46.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/DataDog/zstd", + "version": "v1.5.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp", + "version": "v1.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp", + "version": "v1.31.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric", + "version": "v0.55.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace", + "version": "v1.31.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping", + "version": "v0.55.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/IBM/sarama", + "version": "v1.49.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Jeffail/checkpoint", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Jeffail/gabs/v2", + "version": "v2.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Jeffail/grok", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Jeffail/shutdown", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/Masterminds/squirrel", + "version": "v1.5.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/Microsoft/go-winio", + "version": "v0.6.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/OneOfOne/xxhash", + "version": "v1.2.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/PaesslerAG/gval", + "version": "v1.2.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/PaesslerAG/jsonpath", + "version": "v0.1.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/ProtonMail/go-crypto", + "version": "v1.4.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/RoaringBitmap/roaring/v2", + "version": "v2.15.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/alpacahq/alpacadecimal", + "version": "v0.0.9", + "source": "collector/go.mod" + }, + { + "name": "github.com/andybalholm/brotli", + "version": "v1.2.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/arrow-go/v18", + "version": "v18.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/arrow/go/arrow", + "version": "v0.0.0-20211112161151-bc219186db40", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/arrow/go/v12", + "version": "v12.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/arrow/go/v15", + "version": "v15.0.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/pulsar-client-go", + "version": "v0.18.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/apache/thrift", + "version": "v0.23.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/apapsch/go-jsonmerge/v2", + "version": "v2.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/ardielle/ardielle-go", + "version": "v1.5.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/auth0/go-jwt-middleware/v2", + "version": "v2.3.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/authzed/authzed-go", + "version": "v1.8.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/authzed/grpcutil", + "version": "v0.0.0-20260105210157-e237581949c2", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-lambda-go", + "version": "v1.54.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2", + "version": "v1.41.6", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream", + "version": "v1.7.9", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/config", + "version": "v1.32.16", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/credentials", + "version": "v1.19.15", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue", + "version": "v1.20.36", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression", + "version": "v1.8.36", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/ec2/imds", + "version": "v1.18.22", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/rds/auth", + "version": "v1.6.20", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/s3/manager", + "version": "v1.22.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager", + "version": "v0.1.11", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/internal/configsources", + "version": "v1.4.22", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2", + "version": "v2.7.22", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/internal/v4a", + "version": "v1.4.23", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/bedrockruntime", + "version": "v1.50.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/cloudwatch", + "version": "v1.55.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs", + "version": "v1.65.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/dynamodb", + "version": "v1.57.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/dynamodbstreams", + "version": "v1.32.13", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/firehose", + "version": "v1.42.12", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding", + "version": "v1.13.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/checksum", + "version": "v1.9.14", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery", + "version": "v1.11.20", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url", + "version": "v1.13.22", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/internal/s3shared", + "version": "v1.19.22", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/kinesis", + "version": "v1.43.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/lambda", + "version": "v1.88.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/s3", + "version": "v1.99.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/signin", + "version": "v1.0.10", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/sns", + "version": "v1.39.14", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/sqs", + "version": "v1.42.24", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/sso", + "version": "v1.30.16", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/ssooidc", + "version": "v1.35.20", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/aws-sdk-go-v2/service/sts", + "version": "v1.42.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/aws/smithy-go", + "version": "v1.25.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/aymerick/douceur", + "version": "v0.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/beanstalkd/go-beanstalk", + "version": "v0.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/benhoyt/goawk", + "version": "v1.31.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/beorn7/perks", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/bitfield/gotestdox", + "version": "v0.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/bits-and-blooms/bitset", + "version": "v1.24.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/bmatcuk/doublestar/v4", + "version": "v4.10.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/bradfitz/gomemcache", + "version": "v0.0.0-20250403215159-8d39553ac7cf", + "source": "collector/go.mod" + }, + { + "name": "github.com/brunoga/deep", + "version": "v1.3.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/checksum", + "version": "v1.1.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/g18", + "version": "v0.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/gjrc", + "version": "v0.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/olaf", + "version": "v0.1.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/reddo", + "version": "v0.1.9", + "source": "collector/go.mod" + }, + { + "name": "github.com/btnguyen2k/consu/semita", + "version": "v0.1.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/bufbuild/prototransform", + "version": "v0.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/bwmarrin/discordgo", + "version": "v0.29.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/bwmarrin/snowflake", + "version": "v0.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/cenkalti/backoff/v4", + "version": "v4.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/cenkalti/backoff/v5", + "version": "v5.0.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/certifi/gocertifi", + "version": "v0.0.0-20210507211836-431795d63e8d", + "source": "collector/go.mod" + }, + { + "name": "github.com/cespare/xxhash/v2", + "version": "v2.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/clbanning/mxj/v2", + "version": "v2.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/cloudevents/sdk-go/v2", + "version": "v2.16.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/cloudflare/circl", + "version": "v1.6.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/cncf/xds/go", + "version": "v0.0.0-20260202195803-dba9d589def2", + "source": "collector/go.mod" + }, + { + "name": "github.com/cockroachdb/apd/v3", + "version": "v3.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/cohere-ai/cohere-go/v2", + "version": "v2.16.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/colinmarc/hdfs", + "version": "v1.1.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/coreos/go-oidc/v3", + "version": "v3.17.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/couchbase/gocb/v2", + "version": "v2.12.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/couchbase/gocbcore/v10", + "version": "v10.9.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/couchbase/gocbcoreps", + "version": "v0.1.5-0.20260107140814-1c3a03f888f8", + "source": "collector/go.mod" + }, + { + "name": "github.com/couchbase/goprotostellar", + "version": "v1.0.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/couchbaselabs/gocbconnstr/v2", + "version": "v2.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/cpuguy83/go-md2man/v2", + "version": "v2.0.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/cyborginc/cyborgdb-go", + "version": "v0.15.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/cyphar/filepath-securejoin", + "version": "v0.6.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/danieljoos/wincred", + "version": "v1.2.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/databricks/databricks-sql-go", + "version": "v1.10.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/davecgh/go-spew", + "version": "v1.1.2-0.20180830191138-d8f796af33cc", + "source": "collector/go.mod" + }, + { + "name": "github.com/dgraph-io/ristretto/v2", + "version": "v2.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/dlclark/regexp2", + "version": "v1.11.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/dnephin/pflag", + "version": "v1.0.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/dop251/goja", + "version": "v0.0.0-20260311135729-065cd970411c", + "source": "collector/go.mod" + }, + { + "name": "github.com/dop251/goja_nodejs", + "version": "v0.0.0-20260212111938-1f56ff5bcf14", + "source": "collector/go.mod" + }, + { + "name": "github.com/dustin/go-humanize", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/dvsekhvalnov/jose2go", + "version": "v1.8.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/eapache/go-resiliency", + "version": "v1.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/eapache/queue", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/ebitengine/purego", + "version": "v0.10.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/eclipse/paho.mqtt.golang", + "version": "v1.5.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/elastic/elastic-transport-go/v8", + "version": "v8.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/elastic/go-elasticsearch/v8", + "version": "v8.19.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/elastic/go-elasticsearch/v9", + "version": "v9.3.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/emicklei/go-restful/v3", + "version": "v3.13.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/emirpasic/gods", + "version": "v1.18.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/envoyproxy/go-control-plane/envoy", + "version": "v1.37.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/envoyproxy/protoc-gen-validate", + "version": "v1.3.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/evanphx/json-patch/v5", + "version": "v5.9.11", + "source": "collector/go.mod" + }, + { + "name": "github.com/fatih/color", + "version": "v1.19.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/felixge/httpsnoop", + "version": "v1.0.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/fsnotify/fsnotify", + "version": "v1.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/fxamacker/cbor/v2", + "version": "v2.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/gabriel-vasile/mimetype", + "version": "v1.4.13", + "source": "collector/go.mod" + }, + { + "name": "github.com/generikvault/gvalstrings", + "version": "v0.0.0-20180926130504-471f38f0112a", + "source": "collector/go.mod" + }, + { + "name": "github.com/getkin/kin-openapi", + "version": "v0.139.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/getsentry/sentry-go", + "version": "v0.44.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-chi/chi/v5", + "version": "v5.2.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-faker/faker/v4", + "version": "v4.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-faster/city", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-faster/errors", + "version": "v0.7.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-git/gcfg", + "version": "v1.5.1-0.20230307220236-3a3c6141e376", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-git/go-billy/v5", + "version": "v5.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-git/go-git/v5", + "version": "v5.19.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-jose/go-jose/v3", + "version": "v3.0.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-jose/go-jose/v4", + "version": "v4.1.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-logr/stdr", + "version": "v1.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-mysql-org/go-mysql", + "version": "v1.14.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-openapi/jsonpointer", + "version": "v0.22.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-openapi/jsonreference", + "version": "v0.21.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-openapi/swag", + "version": "v0.23.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-openapi/swag/jsonname", + "version": "v0.25.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-sourcemap/sourcemap", + "version": "v2.1.4+incompatible", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-sql-driver/mysql", + "version": "v1.9.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/go-viper/mapstructure/v2", + "version": "v2.5.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/goccy/go-json", + "version": "v0.10.6", + "source": "collector/go.mod" + }, + { + "name": "github.com/gocql/gocql", + "version": "v1.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/godbus/dbus", + "version": "v0.0.0-20190726142602-4481cbc300e2", + "source": "collector/go.mod" + }, + { + "name": "github.com/gofrs/uuid/v5", + "version": "v5.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/gogo/protobuf", + "version": "v1.3.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang-sql/civil", + "version": "v0.0.0-20220223132316-b832511892a9", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang-sql/sqlexp", + "version": "v0.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang/groupcache", + "version": "v0.0.0-20241129210726-2c02b8208cf8", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang/protobuf", + "version": "v1.5.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/golang/snappy", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/flatbuffers", + "version": "v25.12.19+incompatible", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/gnostic-models", + "version": "v0.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/go-cmp", + "version": "v0.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/pprof", + "version": "v0.0.0-20260302011040-a15ffb7f9dcc", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/s2a-go", + "version": "v0.1.9", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/shlex", + "version": "v0.0.0-20191202100458-e7afc7fbc510", + "source": "collector/go.mod" + }, + { + "name": "github.com/google/uuid", + "version": "v1.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/googleapis/enterprise-certificate-proxy", + "version": "v0.3.14", + "source": "collector/go.mod" + }, + { + "name": "github.com/googleapis/gax-go/v2", + "version": "v2.21.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/googleapis/go-sql-spanner", + "version": "v1.24.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/gorilla/css", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/gorilla/handlers", + "version": "v1.5.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/gorilla/mux", + "version": "v1.8.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/gorilla/websocket", + "version": "v1.5.4-0.20250319132907-e064f32e3674", + "source": "collector/go.mod" + }, + { + "name": "github.com/gosimple/slug", + "version": "v1.15.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/gosimple/unidecode", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/govalues/decimal", + "version": "v0.1.36", + "source": "collector/go.mod" + }, + { + "name": "github.com/grpc-ecosystem/go-grpc-middleware", + "version": "v1.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/grpc-ecosystem/grpc-gateway/v2", + "version": "v2.29.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/gsterjov/go-libsecret", + "version": "v0.0.0-20161001094733-a6f4afe4910c", + "source": "collector/go.mod" + }, + { + "name": "github.com/hailocab/go-hostpool", + "version": "v0.0.0-20160125115350-e80d13ce29ed", + "source": "collector/go.mod" + }, + { + "name": "github.com/hamba/avro/v2", + "version": "v2.31.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/go-cleanhttp", + "version": "v0.5.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/go-retryablehttp", + "version": "v0.7.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/go-uuid", + "version": "v1.0.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/go-version", + "version": "v1.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/golang-lru/arc/v2", + "version": "v2.0.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/hashicorp/golang-lru/v2", + "version": "v2.0.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/influxdata/go-syslog/v3", + "version": "v3.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/influxdata/influxdb1-client", + "version": "v0.0.0-20220302092344-a9ab5670611c", + "source": "collector/go.mod" + }, + { + "name": "github.com/itchyny/gojq", + "version": "v0.12.19", + "source": "collector/go.mod" + }, + { + "name": "github.com/itchyny/timefmt-go", + "version": "v0.1.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/jackc/pgio", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jackc/pgpassfile", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jackc/pgservicefile", + "version": "v0.0.0-20240606120523-5a60cdf6a761", + "source": "collector/go.mod" + }, + { + "name": "github.com/jackc/pgx/v5", + "version": "v5.9.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/jackc/puddle/v2", + "version": "v2.2.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/jbenet/go-context", + "version": "v0.0.0-20150711004518-d14ea06fba99", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/aescts/v2", + "version": "v2.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/dnsutils/v2", + "version": "v2.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/gofork", + "version": "v1.7.6", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/goidentity/v6", + "version": "v6.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/gokrb5/v8", + "version": "v8.4.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/jcmturner/rpc/v2", + "version": "v2.0.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/jhump/protoreflect", + "version": "v1.18.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jhump/protoreflect/v2", + "version": "v2.0.0-beta.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/jmespath/go-jmespath", + "version": "v0.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/jonboulle/clockwork", + "version": "v0.5.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/josharian/intern", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/json-iterator/go", + "version": "v1.1.12", + "source": "collector/go.mod" + }, + { + "name": "github.com/jzelinskie/stringz", + "version": "v0.0.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/kevinburke/ssh_config", + "version": "v1.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/klauspost/asmfmt", + "version": "v1.3.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/klauspost/compress", + "version": "v1.18.6", + "source": "collector/go.mod" + }, + { + "name": "github.com/klauspost/cpuid/v2", + "version": "v2.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/klauspost/pgzip", + "version": "v1.2.6", + "source": "collector/go.mod" + }, + { + "name": "github.com/knadh/koanf/maps", + "version": "v0.1.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/knadh/koanf/parsers/yaml", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/knadh/koanf/providers/file", + "version": "v1.2.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/knadh/koanf/providers/rawbytes", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/knadh/koanf/v2", + "version": "v2.3.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/kr/fs", + "version": "v0.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/kylelemons/godebug", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/lann/builder", + "version": "v0.0.0-20180802200727-47ae307949d0", + "source": "collector/go.mod" + }, + { + "name": "github.com/lann/ps", + "version": "v0.0.0-20150810152359-62de8c46ede0", + "source": "collector/go.mod" + }, + { + "name": "github.com/lib/pq", + "version": "v1.12.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/linkedin/goavro/v2", + "version": "v2.15.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/mailru/easyjson", + "version": "v0.9.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/matoous/go-nanoid/v2", + "version": "v2.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/mattn/go-colorable", + "version": "v0.1.14", + "source": "collector/go.mod" + }, + { + "name": "github.com/mattn/go-isatty", + "version": "v0.0.20", + "source": "collector/go.mod" + }, + { + "name": "github.com/microcosm-cc/bluemonday", + "version": "v1.0.27", + "source": "collector/go.mod" + }, + { + "name": "github.com/microsoft/go-mssqldb", + "version": "v1.9.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/microsoft/gocosmos", + "version": "v1.1.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/minio/asm2plan9s", + "version": "v0.0.0-20200509001527-cdd76441f9d8", + "source": "collector/go.mod" + }, + { + "name": "github.com/minio/c2goasm", + "version": "v0.0.0-20190812172519-36a3d3bbc4f3", + "source": "collector/go.mod" + }, + { + "name": "github.com/mitchellh/copystructure", + "version": "v1.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/mitchellh/reflectwalk", + "version": "v1.0.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/modern-go/concurrent", + "version": "v0.0.0-20180306012644-bacd9c7ef1dd", + "source": "collector/go.mod" + }, + { + "name": "github.com/modern-go/reflect2", + "version": "v1.0.3-0.20250322232337-35a7c28c31ee", + "source": "collector/go.mod" + }, + { + "name": "github.com/mohae/deepcopy", + "version": "v0.0.0-20170929034955-c48cc78d4826", + "source": "collector/go.mod" + }, + { + "name": "github.com/mschoch/smat", + "version": "v0.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/mtibben/percent", + "version": "v0.2.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/munnerz/goautoneg", + "version": "v0.0.0-20191010083416-a7dc8b61c822", + "source": "collector/go.mod" + }, + { + "name": "github.com/nats-io/nats.go", + "version": "v1.50.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/nats-io/nkeys", + "version": "v0.4.15", + "source": "collector/go.mod" + }, + { + "name": "github.com/nats-io/nuid", + "version": "v1.0.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/nats-io/stan.go", + "version": "v0.10.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/ncruces/go-strftime", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/neo4j/neo4j-go-driver/v5", + "version": "v5.28.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/nsf/jsondiff", + "version": "v0.0.0-20260207060731-8e8d90c4c0ac", + "source": "collector/go.mod" + }, + { + "name": "github.com/nsqio/go-nsq", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/oapi-codegen/runtime", + "version": "v1.4.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/oasdiff/yaml", + "version": "v0.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/oasdiff/yaml3", + "version": "v0.0.13", + "source": "collector/go.mod" + }, + { + "name": "github.com/oklog/ulid/v2", + "version": "v2.1.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/opensearch-project/opensearch-go/v3", + "version": "v3.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/oschwald/geoip2-golang", + "version": "v1.13.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/oschwald/maxminddb-golang", + "version": "v1.13.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/parquet-go/bitpack", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/parquet-go/jsonlite", + "version": "v1.5.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/parquet-go/parquet-go", + "version": "v0.29.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/paulmach/orb", + "version": "v0.12.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/pebbe/zmq4", + "version": "v1.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/perimeterx/marshmallow", + "version": "v1.1.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/petermattis/goid", + "version": "v0.0.0-20260226131333-17d1149c6ac6", + "source": "collector/go.mod" + }, + { + "name": "github.com/pgvector/pgvector-go", + "version": "v0.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/pierrec/lz4", + "version": "v2.6.1+incompatible", + "source": "collector/go.mod" + }, + { + "name": "github.com/pierrec/lz4/v4", + "version": "v4.1.26", + "source": "collector/go.mod" + }, + { + "name": "github.com/pinecone-io/go-pinecone", + "version": "v1.1.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/pingcap/errors", + "version": "v0.11.5-0.20250523034308-74f78ae071ee", + "source": "collector/go.mod" + }, + { + "name": "github.com/pingcap/failpoint", + "version": "v0.0.0-20251231045439-91d91e123837", + "source": "collector/go.mod" + }, + { + "name": "github.com/pingcap/log", + "version": "v1.1.1-0.20241212030209-7e3ff8601a2a", + "source": "collector/go.mod" + }, + { + "name": "github.com/pingcap/tidb/pkg/parser", + "version": "v0.0.0-20260318222514-bab4993b6fd6", + "source": "collector/go.mod" + }, + { + "name": "github.com/pjbgf/sha1cd", + "version": "v0.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/pkg/browser", + "version": "v0.0.0-20240102092130-5ac0b6a4141c", + "source": "collector/go.mod" + }, + { + "name": "github.com/pkg/errors", + "version": "v0.9.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/pkg/sftp", + "version": "v1.13.10", + "source": "collector/go.mod" + }, + { + "name": "github.com/pkoukk/tiktoken-go", + "version": "v0.1.8", + "source": "collector/go.mod" + }, + { + "name": "github.com/planetscale/vtprotobuf", + "version": "v0.6.1-0.20240319094008-0393e58bdf10", + "source": "collector/go.mod" + }, + { + "name": "github.com/pmezard/go-difflib", + "version": "v1.0.1-0.20181226105442-5d4384ee4fb2", + "source": "collector/go.mod" + }, + { + "name": "github.com/prometheus/client_model", + "version": "v0.6.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/prometheus/procfs", + "version": "v0.20.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/pusher/pusher-http-go", + "version": "v4.0.1+incompatible", + "source": "collector/go.mod" + }, + { + "name": "github.com/qdrant/go-client", + "version": "v1.17.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/questdb/go-questdb-client/v4", + "version": "v4.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/quipo/dependencysolver", + "version": "v0.0.0-20170801134659-2b009cb4ddcc", + "source": "collector/go.mod" + }, + { + "name": "github.com/r3labs/diff/v3", + "version": "v3.0.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/rabbitmq/amqp091-go", + "version": "v1.10.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/rcrowley/go-metrics", + "version": "v0.0.0-20250401214520-65e299d6c5c9", + "source": "collector/go.mod" + }, + { + "name": "github.com/redis/go-redis/v9", + "version": "v9.20.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/common-go/authz", + "version": "v0.2.1-0.20260319205134-242ab3c168b8", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/common-go/license", + "version": "v0.0.0-20260318014216-2bbd72bde0a0", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/common-go/redpanda-otel-exporter", + "version": "v0.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/redpanda-data/connect/v4", + "version": "v4.93.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/remyoudompheng/bigfft", + "version": "v0.0.0-20230129092748-24d4a6f8daec", + "source": "collector/go.mod" + }, + { + "name": "github.com/rickb777/period", + "version": "v1.0.27", + "source": "collector/go.mod" + }, + { + "name": "github.com/rickb777/plural", + "version": "v1.4.10", + "source": "collector/go.mod" + }, + { + "name": "github.com/rivo/uniseg", + "version": "v0.4.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/rs/zerolog", + "version": "v1.34.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/russross/blackfriday/v2", + "version": "v2.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/santhosh-tekuri/jsonschema/v6", + "version": "v6.0.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/sashabaranov/go-openai", + "version": "v1.41.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/segmentio/asm", + "version": "v1.2.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/segmentio/ksuid", + "version": "v1.0.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/sergi/go-diff", + "version": "v1.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/shopspring/decimal", + "version": "v1.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/sijms/go-ora/v2", + "version": "v2.9.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/sirupsen/logrus", + "version": "v1.9.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/skeema/knownhosts", + "version": "v1.3.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/smira/go-statsd", + "version": "v1.3.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/snowflakedb/gosnowflake", + "version": "v1.19.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/sourcegraph/conc", + "version": "v0.3.1-0.20240121214520-5f936abd7ae8", + "source": "collector/go.mod" + }, + { + "name": "github.com/spaolacci/murmur3", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/spf13/pflag", + "version": "v1.0.10", + "source": "collector/go.mod" + }, + { + "name": "github.com/spiffe/go-spiffe/v2", + "version": "v2.6.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/stretchr/testify", + "version": "v1.11.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/tetratelabs/wazero", + "version": "v1.11.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/theparanoids/crypki", + "version": "v1.21.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/tilinna/z85", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/timandy/routine", + "version": "v1.1.5", + "source": "collector/go.mod" + }, + { + "name": "github.com/timeplus-io/proton-go-driver/v2", + "version": "v2.1.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/tmc/langchaingo", + "version": "v0.1.14", + "source": "collector/go.mod" + }, + { + "name": "github.com/trinodb/trino-go-client", + "version": "v0.333.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/avro", + "version": "v1.7.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/franz-go", + "version": "v1.20.7", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/franz-go/pkg/kadm", + "version": "v1.17.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/franz-go/pkg/kmsg", + "version": "v1.12.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/franz-go/pkg/sr", + "version": "v1.7.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/twmb/go-cache", + "version": "v1.3.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/twpayne/go-geom", + "version": "v1.6.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/vmihailenco/msgpack/v5", + "version": "v5.4.1", + "source": "collector/go.mod" + }, + { + "name": "github.com/vmihailenco/tagparser/v2", + "version": "v2.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/woodsbury/decimal128", + "version": "v1.4.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/x448/float16", + "version": "v0.8.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/xanzy/ssh-agent", + "version": "v0.3.3", + "source": "collector/go.mod" + }, + { + "name": "github.com/xdg-go/pbkdf2", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/xdg-go/scram", + "version": "v1.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/xdg-go/stringprep", + "version": "v1.0.4", + "source": "collector/go.mod" + }, + { + "name": "github.com/xeipuuv/gojsonpointer", + "version": "v0.0.0-20190905194746-02993c407bfb", + "source": "collector/go.mod" + }, + { + "name": "github.com/xeipuuv/gojsonreference", + "version": "v0.0.0-20180127040603-bd5ef7bd5415", + "source": "collector/go.mod" + }, + { + "name": "github.com/xeipuuv/gojsonschema", + "version": "v1.2.0", + "source": "collector/go.mod" + }, + { + "name": "github.com/xitongsys/parquet-go", + "version": "v1.6.2", + "source": "collector/go.mod" + }, + { + "name": "github.com/xitongsys/parquet-go-source", + "version": "v0.0.0-20241021075129-b732d2ac9c9b", + "source": "collector/go.mod" + }, + { + "name": "github.com/xrash/smetrics", + "version": "v0.0.0-20250705151800-55b8f293f342", + "source": "collector/go.mod" + }, + { + "name": "github.com/youmark/pkcs8", + "version": "v0.0.0-20240726163527-a2c0da244d78", + "source": "collector/go.mod" + }, + { + "name": "github.com/zeebo/xxh3", + "version": "v1.1.0", + "source": "collector/go.mod" + }, + { + "name": "gitlab.com/golang-commonmark/html", + "version": "v0.0.0-20191124015941-a22733972181", + "source": "collector/go.mod" + }, + { + "name": "gitlab.com/golang-commonmark/linkify", + "version": "v0.0.0-20200225224916-64bca66f6ad3", + "source": "collector/go.mod" + }, + { + "name": "gitlab.com/golang-commonmark/markdown", + "version": "v0.0.0-20211110145824-bf3e522c626a", + "source": "collector/go.mod" + }, + { + "name": "gitlab.com/golang-commonmark/mdurl", + "version": "v0.0.0-20191124015652-932350d1cb84", + "source": "collector/go.mod" + }, + { + "name": "gitlab.com/golang-commonmark/puny", + "version": "v0.0.0-20191124015043-9f83538fa04f", + "source": "collector/go.mod" + }, + { + "name": "go.mongodb.org/mongo-driver/v2", + "version": "v2.5.0", + "source": "collector/go.mod" + }, + { + "name": "go.nanomsg.org/mangos/v3", + "version": "v3.4.2", + "source": "collector/go.mod" + }, + { + "name": "go.opencensus.io", + "version": "v0.24.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/auto/sdk", + "version": "v1.2.1", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/collector/featuregate", + "version": "v1.54.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/collector/pdata", + "version": "v1.54.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/detectors/gcp", + "version": "v1.42.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc", + "version": "v0.67.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp", + "version": "v0.69.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/jaeger", + "version": "v1.17.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp", + "version": "v1.43.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp", + "version": "v1.43.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/log", + "version": "v0.20.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/metric", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk/log", + "version": "v0.20.0", + "source": "collector/go.mod" + }, + { + "name": "go.opentelemetry.io/otel/sdk/metric", + "version": "v1.44.0", + "source": "collector/go.mod" + }, + { + "name": "go.uber.org/atomic", + "version": "v1.11.0", + "source": "collector/go.mod" + }, + { + "name": "go.uber.org/multierr", + "version": "v1.11.0", + "source": "collector/go.mod" + }, + { + "name": "go.uber.org/zap", + "version": "v1.27.1", + "source": "collector/go.mod" + }, + { + "name": "go.yaml.in/yaml/v2", + "version": "v2.4.4", + "source": "collector/go.mod" + }, + { + "name": "go.yaml.in/yaml/v3", + "version": "v3.0.4", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/crypto", + "version": "v0.51.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/exp", + "version": "v0.0.0-20260410095643-746e56fc9e2f", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/mod", + "version": "v0.35.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/net", + "version": "v0.55.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/oauth2", + "version": "v0.36.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/sync", + "version": "v0.20.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/sys", + "version": "v0.45.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/telemetry", + "version": "v0.0.0-20260409153401-be6f6cb8b1fa", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/term", + "version": "v0.43.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/text", + "version": "v0.37.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/time", + "version": "v0.15.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/tools", + "version": "v0.44.0", + "source": "collector/go.mod" + }, + { + "name": "golang.org/x/xerrors", + "version": "v0.0.0-20240903120638-7835f813f4da", + "source": "collector/go.mod" + }, + { + "name": "gomodules.xyz/jsonpatch/v2", + "version": "v2.4.0", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/api", + "version": "v0.276.0", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/genai", + "version": "v1.51.0", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/genproto", + "version": "v0.0.0-20260319201613-d00831a3d3e7", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/genproto/googleapis/api", + "version": "v0.0.0-20260526163538-3dc84a4a5aaa", + "source": "collector/go.mod" + }, + { + "name": "google.golang.org/genproto/googleapis/rpc", + "version": "v0.0.0-20260526163538-3dc84a4a5aaa", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/evanphx/json-patch.v4", + "version": "v4.13.0", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/go-jose/go-jose.v2", + "version": "v2.6.3", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/inf.v0", + "version": "v0.9.1", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/natefinch/lumberjack.v2", + "version": "v2.2.1", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/warnings.v0", + "version": "v0.1.2", + "source": "collector/go.mod" + }, + { + "name": "gopkg.in/yaml.v3", + "version": "v3.0.1", + "source": "collector/go.mod" + }, + { + "name": "gotest.tools/gotestsum", + "version": "v1.13.0", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/apiextensions-apiserver", + "version": "v0.36.0", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/kube-openapi", + "version": "v0.0.0-20260317180543-43fb72c5454a", + "source": "collector/go.mod" + }, + { + "name": "k8s.io/utils", + "version": "v0.0.0-20260210185600-b8788abfbbc2", + "source": "collector/go.mod" + }, + { + "name": "modernc.org/libc", + "version": "v1.72.0", + "source": "collector/go.mod" + }, + { + "name": "modernc.org/mathutil", + "version": "v1.7.1", + "source": "collector/go.mod" + }, + { + "name": "modernc.org/memory", + "version": "v1.11.0", + "source": "collector/go.mod" + }, + { + "name": "modernc.org/sqlite", + "version": "v1.49.1", + "source": "collector/go.mod" + }, + { + "name": "sigs.k8s.io/json", + "version": "v0.0.0-20250730193827-2d320260d730", + "source": "collector/go.mod" + }, + { + "name": "sigs.k8s.io/randfill", + "version": "v1.0.0", + "source": "collector/go.mod" + }, + { + "name": "sigs.k8s.io/structured-merge-diff/v6", + "version": "v6.3.2", + "source": "collector/go.mod" + }, + { + "name": "sigs.k8s.io/yaml", + "version": "v1.6.0", + "source": "collector/go.mod" + }, + { + "name": "@typespec/prettier-plugin-typespec", + "version": "1.11.0", + "source": "api/spec/package.json" + }, + { + "name": "prettier", + "version": "3.8.3", + "source": "api/spec/package.json" + }, + { + "name": "@azure-tools/typespec-client-generator-core", + "version": "0.67.2", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@types/node", + "version": "25.6.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/compiler", + "version": "1.11.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/http", + "version": "1.11.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/http-client-python", + "version": "0.28.3", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/openapi", + "version": "1.11.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/openapi3", + "version": "1.11.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/prettier-plugin-typespec", + "version": "1.11.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/rest", + "version": "0.81.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@typespec/versioning", + "version": "0.81.0", + "source": "api/spec/packages/legacy/package.json" + }, + { + "name": "@redocly/cli", + "version": "2.29.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@types/node", + "version": "25.6.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/compiler", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/http", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/json-schema", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/openapi", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/openapi3", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/prettier-plugin-typespec", + "version": "1.11.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "@typespec/rest", + "version": "0.81.0", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "prettier", + "version": "3.8.3", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "yaml", + "version": "2.8.3", + "source": "api/spec/packages/aip/package.json" + }, + { + "name": "openapi-fetch", + "version": "0.17.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "openapi-typescript-helpers", + "version": "0.1.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "@biomejs/biome", + "version": "2.4.11", + "source": "api/client/javascript/package.json" + }, + { + "name": "@fetch-mock/vitest", + "version": "0.2.18", + "source": "api/client/javascript/package.json" + }, + { + "name": "@knighted/duel", + "version": "4.0.2", + "source": "api/client/javascript/package.json" + }, + { + "name": "@types/node", + "version": "25.6.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "@types/node-fetch", + "version": "2.6.13", + "source": "api/client/javascript/package.json" + }, + { + "name": "@types/react", + "version": "19.2.14", + "source": "api/client/javascript/package.json" + }, + { + "name": "fetch-mock", + "version": "12.6.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "openapi-typescript", + "version": "7.13.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "orval", + "version": "8.7.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "prettier", + "version": "3.8.2", + "source": "api/client/javascript/package.json" + }, + { + "name": "react", + "version": "19.2.5", + "source": "api/client/javascript/package.json" + }, + { + "name": "rollup", + "version": "4.60.1", + "source": "api/client/javascript/package.json" + }, + { + "name": "tslib", + "version": "2.8.1", + "source": "api/client/javascript/package.json" + }, + { + "name": "tsx", + "version": "4.21.0", + "source": "api/client/javascript/package.json" + }, + { + "name": "typescript", + "version": "5.9.3", + "source": "api/client/javascript/package.json" + }, + { + "name": "vitest", + "version": "4.1.4", + "source": "api/client/javascript/package.json" + }, + { + "name": "zod", + "version": "4.3.6", + "source": "api/client/javascript/package.json" + }, + { + "name": "react", + "version": ">=18.0.0", + "source": "api/client/javascript/package.json" + } + ], + "framework_signals": [ + { + "name": "Docker", + "version": "", + "evidence": [ + "file:Dockerfile", + "file:collector/quickstart/docker-compose.yaml", + "file:docker-compose.yaml", + "file:quickstart/docker-compose.yaml" + ] + }, + { + "name": "Go", + "version": "", + "evidence": [ + "file:collector/go.mod", + "file:go.mod" + ] + }, + { + "name": "React", + "version": "^18.3.1", + "evidence": [ + "dep:react", + "dep:react", + "dep:react" + ] + } + ], + "config_patterns": { + "docker-compose.yaml": "services:\n kafka:\n extends:\n file: docker-compose.base.yaml\n service: kafka\n ports:\n - \"127.0.0.1:29092:29092\"\n\n clickhouse:\n extends:\n file: docker-compose.base.yaml\n service: clickhouse\n ports:\n - \"127.0.0.1:8123:8123\"\n - \"127.0.0.1:9000:9000\"\n - \"127.0.0.1:9009:9009\"\n\n ch-ui:\n extends:\n file: docker-compose.base.yaml\n service: ch-ui\n profiles:\n - dev\n ports:\n - \"${CH_UI_PORT:-5521}:5521\"\n\n # Deduplication\n #", + "Dockerfile": "FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0@sha256:c64defb9ed5a91eacb37f96ccc3d4cd72521c4bd18d5442905b95e2226b0e707 AS xx\n\nFROM --platform=$BUILDPLATFORM golang:1.26.3-alpine3.23@sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d AS builder\n\nCOPY --link --from=xx / /\n\nRUN xx-apk add --update --no-cache ca-certificates make git curl clang lld\n\nARG TARGETPLATFORM\n\nRUN xx-apk --update --no-cache add musl-dev gcc\n\nWORKDIR /src\n\nARG GOPROXY\n\nENV CGO_ENABLED=1\n\nENV GOCACHE=", + "Makefile": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\nROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))\n\n# Docker-local svix secret, only used for testing\nSVIX_JWT_SECRET = DUMMY_JWT_SECRET\n\n# dynamic forces confluent-kafka-go to build against local librdkafka\nGO_BUILD_FLAGS = -tags=dynamic\nGO_TEST_PACKAGE_PARALLELISM ?= 128\nGO_TEST_FLAGS = -p ${GO_TEST_PACKAGE_PARALLELISM} -parallel 16 ${GO_BUILD_FLAGS}\nGO_LINT_PATH ?= ./...\n\n.PHONY: up\nup: #" + }, + "import_graph": { + "api/api.gen.go": [ + "pkg/models" + ], + "api/client/go/client.gen.go": [ + "pkg/models" + ], + "api/client/go/client_test.go": [ + "openmeter/meter" + ], + "api/client/javascript/src/client/addons.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/apps.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/billing.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/common.ts": [ + "./schemas.js" + ], + "api/client/javascript/src/client/customers.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/debug.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/entitlements.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/events.spec.ts": [ + "./index.js", + "./index.js" + ], + "api/client/javascript/src/client/events.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/features.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/index.ts": [ + "./addons.js", + "./apps.js", + "./billing.js", + "./customers.js", + "./debug.js", + "./entitlements.js", + "./events.js", + "./features.js", + "./info.js", + "./meters.js", + "./notifications.js", + "./plans.js", + "./portal.js", + "./schemas.js", + "./subjects.js", + "./subscription-addons.js", + "./subscriptions.js", + "./utils.js" + ], + "api/client/javascript/src/client/info.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/meters.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/notifications.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/plans.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/portal.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/subjects.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/subscription-addons.ts": [ + "./common.js", + "./schemas.js", + "./utils.js" + ], + "api/client/javascript/src/client/subscriptions.ts": [ + "./common.js", + "./utils.js" + ], + "api/client/javascript/src/client/utils.ts": [ + "./common.js" + ], + "api/client/javascript/src/portal/index.ts": [ + "../client/common.js", + "../client/schemas.js", + "../client/utils.js" + ], + "api/client/javascript/src/react/context.tsx": [ + "../portal/index.js" + ], + "api/client/python/examples/async/customer.py": [ + "openmeter.aio", + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/async/entitlement.py": [ + "openmeter.aio", + "corehttp.exceptions" + ], + "api/client/python/examples/async/ingest.py": [ + "openmeter.aio", + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/async/query.py": [ + "openmeter.aio", + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/async/subscription.py": [ + "openmeter.aio", + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/sync/customer.py": [ + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/sync/entitlement.py": [ + "corehttp.exceptions" + ], + "api/client/python/examples/sync/ingest.py": [ + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/sync/query.py": [ + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/examples/sync/subscription.py": [ + "openmeter.models", + "corehttp.exceptions" + ], + "api/client/python/openmeter/_client.py": [ + "corehttp.credentials", + "corehttp.runtime", + "_generated._client" + ], + "api/client/python/openmeter/_generated/_client.py": [ + "corehttp.rest", + "corehttp.runtime", + "_utils.serialization" + ], + "api/client/python/openmeter/_generated/_configuration.py": [ + "corehttp.runtime" + ], + "api/client/python/openmeter/_generated/_utils/model_base.py": [ + "corehttp.exceptions", + "corehttp.utils", + "corehttp.runtime.pipeline", + "corehttp.serialization", + "corehttp.rest" + ], + "api/client/python/openmeter/_generated/_utils/serialization.py": [ + "corehttp.exceptions", + "corehttp.serialization" + ], + "api/client/python/openmeter/_generated/aio/_client.py": [ + "corehttp.rest", + "corehttp.runtime", + "_utils.serialization" + ], + "api/client/python/openmeter/_generated/aio/_configuration.py": [ + "corehttp.runtime" + ], + "api/client/python/openmeter/_generated/aio/operations/_operations.py": [ + "corehttp.exceptions", + "corehttp.paging", + "corehttp.rest", + "corehttp.runtime", + "corehttp.runtime.pipeline", + "corehttp.utils", + "_utils.model_base", + "_utils.serialization", + "operations._operations" + ], + "api/client/python/openmeter/_generated/models/_enums.py": [ + "corehttp.utils" + ], + "api/client/python/openmeter/_generated/models/_models.py": [ + "_utils.model_base" + ], + "api/client/python/openmeter/_generated/operations/_operations.py": [ + "corehttp.exceptions", + "corehttp.paging", + "corehttp.rest", + "corehttp.runtime", + "corehttp.runtime.pipeline", + "corehttp.utils", + "_utils.model_base", + "_utils.serialization" + ], + "api/client/python/openmeter/aio/__init__.py": [ + "_generated.aio._patch", + "_generated.aio._patch", + "_generated.aio._patch", + "_generated.aio._patch" + ], + "api/client/python/openmeter/aio/_client.py": [ + "corehttp.credentials", + "corehttp.runtime", + "_generated.aio._client" + ], + "api/client/python/openmeter/aio/operations/__init__.py": [ + "_generated.aio.operations._operations", + "_generated.aio.operations._patch", + "_generated.aio.operations", + "_generated.aio.operations._patch", + "_generated.aio.operations._patch", + "_generated.aio.operations._patch" + ], + "api/client/python/openmeter/models/__init__.py": [ + "_generated.models._models", + "_generated.models._enums", + "_generated.models._patch", + "_generated.models", + "_generated.models._patch", + "_generated.models._patch", + "_generated.models._patch" + ], + "api/client/python/openmeter/operations/__init__.py": [ + "_generated.operations._operations", + "_generated.operations._patch", + "_generated.operations", + "_generated.operations._patch", + "_generated.operations._patch", + "_generated.operations._patch" + ], + "api/spec/packages/aip/lib/index.js": [ + "./rules/casing.js", + "./rules/docs.js", + "./rules/friendly-name.js", + "./rules/operation-summary.js", + "./rules/operation-id.js", + "./rules/no-nullable.js", + "./rules/composition-over-inheritance.js", + "./rules/field-prefix.js" + ], + "api/spec/packages/aip/lib/rules/operation-id.js": [ + "./utils.js" + ], + "api/spec/packages/legacy/lib/index.js": [ + "./rules/casing.js", + "./rules/docs.js", + "./rules/friendly-name.js", + "./rules/operation-summary.js", + "./rules/composition-over-inheritance.js" + ], + "api/spec/packages/legacy/lib/rules/casing.js": [ + "./utils.js" + ], + "api/v3/api.gen.go": [ + "api/v3/filters" + ], + "api/v3/apierrors/encoder.go": [ + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "api/v3/apierrors/encoder_test.go": [ + "openmeter/meter", + "openmeter/productcatalog/feature" + ], + "api/v3/apierrors/errors.go": [ + "api/v3/render" + ], + "api/v3/apierrors/handler.go": [ + "api/v3", + "pkg/errorsx", + "pkg/models" + ], + "api/v3/filters/convert.go": [ + "pkg/convert", + "pkg/expand", + "pkg/filter", + "pkg/models" + ], + "api/v3/filters/convert_test.go": [ + "pkg/filter" + ], + "api/v3/handlers/addons/archive.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/addon", + "pkg/clock", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/addons/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/datetime", + "pkg/models" + ], + "api/v3/handlers/addons/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/addons/delete.go": [ + "api/v3/apierrors", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/addons/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/addons/handler.go": [ + "openmeter/productcatalog/addon", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/addons/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/addons/publish.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/clock", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/addons/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/apps/convert.gen.go": [ + "api/v3", + "api/v3/response", + "openmeter/app" + ], + "api/v3/handlers/apps/convert.go": [ + "api/v3", + "api/v3/labels", + "api/v3/response", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe" + ], + "api/v3/handlers/apps/get_app.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/app", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/apps/handler.go": [ + "openmeter/app", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/apps/list_app.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/app", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/billingprofiles/convert.gen.go": [ + "api/v3", + "openmeter/app", + "openmeter/billing", + "openmeter/productcatalog", + "pkg/models" + ], + "api/v3/handlers/billingprofiles/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/app", + "openmeter/billing", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "api/v3/handlers/billingprofiles/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/billingprofiles/delete.go": [ + "api/v3/apierrors", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/billingprofiles/error_encoder.go": [ + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "api/v3/handlers/billingprofiles/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/billingprofiles/handler.go": [ + "openmeter/billing", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/billingprofiles/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/billingprofiles/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/currencies/convert.go": [ + "api/v3", + "openmeter/currencies" + ], + "api/v3/handlers/currencies/create.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/currencies", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/currencies/create_cost_basis.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/currencies", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/currencies/get_cost_bases.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/currencies", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/currencies/handler.go": [ + "openmeter/currencies", + "openmeter/namespace/namespacedriver", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/currencies/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/currencies", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination", + "pkg/sortx" + ], + "api/v3/handlers/customers/billing/convert.gen.go": [ + "api", + "api/v3", + "openmeter/app/stripe" + ], + "api/v3/handlers/customers/billing/convert.go": [ + "api", + "api/v3", + "openmeter/app/stripe", + "openmeter/customer" + ], + "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/app/stripe", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/billing/error_encoder.go": [ + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "api/v3/handlers/customers/billing/get_billing.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/billing/handler.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/billing/update_billing.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/customers/billing/update_billing_app_data.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/customers/charges/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "api/v3/handlers/customers/charges/convert_test.go": [ + "api/v3", + "openmeter/productcatalog" + ], + "api/v3/handlers/customers/charges/handler.go": [ + "openmeter/billing/charges", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/charges/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "api/v3/response", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination", + "pkg/slicesx" + ], + "api/v3/handlers/customers/convert.gen.go": [ + "api/v3", + "api/v3/response", + "openmeter/customer", + "pkg/currencyx", + "pkg/models" + ], + "api/v3/handlers/customers/convert.go": [ + "api/v3", + "api/v3/labels", + "api/v3/response", + "openmeter/customer", + "pkg/models" + ], + "api/v3/handlers/customers/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/creditgrant", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "api/v3/handlers/customers/credits/convert_test.go": [ + "api/v3", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "pkg/currencyx", + "pkg/models" + ], + "api/v3/handlers/customers/credits/create_grant.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/billing/creditgrant", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "api/v3/handlers/customers/credits/externalsettlement.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/billing/creditgrant", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/externalsettlement_test.go": [ + "api/v3", + "api/v3/apierrors", + "pkg/models" + ], + "api/v3/handlers/customers/credits/get_balance.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/customer", + "openmeter/ledger/customerbalance", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/get_grant.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/billing/creditgrant", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/handler.go": [ + "openmeter/billing/creditgrant", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/list_grants.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/creditgrant", + "pkg/currencyx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination", + "pkg/slicesx" + ], + "api/v3/handlers/customers/credits/list_transactions.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/customer", + "openmeter/ledger/customerbalance", + "pkg/currencyx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/credits/list_transactions_test.go": [ + "api/v3", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "pkg/currencyx", + "pkg/models" + ], + "api/v3/handlers/customers/delete.go": [ + "api/v3/apierrors", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/entitlementaccess/handler.go": [ + "openmeter/customer", + "openmeter/entitlement", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/entitlementaccess/list.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/entitlementaccess/mapping.go": [ + "api/v3", + "openmeter/entitlement", + "openmeter/entitlement/boolean", + "openmeter/entitlement/metered", + "openmeter/entitlement/static" + ], + "api/v3/handlers/customers/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/handler.go": [ + "openmeter/customer", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/customers/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination", + "pkg/sortx" + ], + "api/v3/handlers/customers/upsert.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/events/convert.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/meterevent", + "openmeter/streaming", + "pkg/filter", + "pkg/sortx" + ], + "api/v3/handlers/events/handler.go": [ + "openmeter/ingest", + "openmeter/meterevent", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/events/ingest.go": [ + "api", + "api/v3/apierrors", + "openmeter/ingest", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/events/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/response", + "openmeter/meterevent", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination/v2", + "pkg/slicesx" + ], + "api/v3/handlers/events/list_test.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/streaming", + "pkg/sortx" + ], + "api/v3/handlers/featurecost/convert.go": [ + "api/v3", + "api/v3/handlers/meters/query", + "openmeter/cost" + ], + "api/v3/handlers/featurecost/handler.go": [ + "openmeter/cost", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/featurecost/query.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/handlers/meters/query", + "api/v3/request", + "openmeter/cost", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/features/convert.go": [ + "api/v3", + "api/v3/labels", + "api/v3/request", + "openmeter/llmcost", + "openmeter/productcatalog/feature", + "pkg/filter" + ], + "api/v3/handlers/features/convert_test.go": [ + "api/v3", + "api/v3/labels", + "openmeter/llmcost", + "openmeter/productcatalog/feature", + "pkg/filter" + ], + "api/v3/handlers/features/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/features/create_test.go": [ + "api/v3", + "openmeter/meter" + ], + "api/v3/handlers/features/delete.go": [ + "api/v3/apierrors", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/features/error_encoder.go": [ + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "api/v3/handlers/features/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/features/handler.go": [ + "openmeter/llmcost", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/features/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/features/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/llmcost/convert.go": [ + "api/v3", + "openmeter/llmcost", + "pkg/models" + ], + "api/v3/handlers/llmcost/convert_test.go": [ + "api/v3" + ], + "api/v3/handlers/llmcost/create_override.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/llmcost", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/llmcost/delete_override.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/llmcost", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/llmcost/get_price.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/llmcost", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/llmcost/handler.go": [ + "openmeter/llmcost", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/llmcost/list_overrides.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/response", + "openmeter/llmcost", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/llmcost/list_prices.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/llmcost", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/meters/convert.gen.go": [ + "api/v3", + "api/v3/response", + "openmeter/meter" + ], + "api/v3/handlers/meters/convert.go": [ + "api/v3", + "api/v3/handlers/meters/query", + "api/v3/labels", + "api/v3/response", + "openmeter/meter", + "pkg/models" + ], + "api/v3/handlers/meters/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/meters/delete.go": [ + "api/v3/apierrors", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/meters/dimensions.go": [ + "api/v3/handlers/meters/query" + ], + "api/v3/handlers/meters/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "api/v3/handlers/meters/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/meters/handler.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/streaming", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/meters/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/meters/query.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/handlers/meters/query", + "api/v3/request", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/meters/query/convert.go": [ + "api/v3", + "openmeter/meter" + ], + "api/v3/handlers/meters/query/convert_test.go": [ + "api/v3", + "openmeter/meter" + ], + "api/v3/handlers/meters/query/customers.go": [ + "openmeter/customer", + "openmeter/streaming" + ], + "api/v3/handlers/meters/query/dimensions.go": [ + "openmeter/meter" + ], + "api/v3/handlers/meters/query/dimensions_test.go": [ + "openmeter/meter", + "pkg/models" + ], + "api/v3/handlers/meters/query/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "api/v3/handlers/meters/query/params.go": [ + "api/v3", + "api/v3/request", + "openmeter/meter", + "openmeter/streaming", + "pkg/filter", + "pkg/models" + ], + "api/v3/handlers/meters/query/params_test.go": [ + "api/v3", + "openmeter/customer", + "openmeter/meter", + "pkg/models" + ], + "api/v3/handlers/meters/query_csv.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/handlers/meters/query", + "api/v3/request", + "openmeter/customer", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/meters/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/meter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/plans/archive.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/plan", + "pkg/clock", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/taxcode", + "pkg/datetime", + "pkg/models" + ], + "api/v3/handlers/plans/convert_test.go": [ + "api/v3", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/taxcode", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "api/v3/handlers/plans/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/plan", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/plans/delete.go": [ + "api/v3/apierrors", + "openmeter/productcatalog/plan", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/plan", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/handler.go": [ + "openmeter/productcatalog/plan", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/plans/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/plans/planaddons/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/productcatalog/planaddon", + "pkg/models" + ], + "api/v3/handlers/plans/planaddons/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/labels", + "api/v3/request", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/planaddons/delete.go": [ + "api/v3/apierrors", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/planaddons/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/planaddons/handler.go": [ + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/plans/planaddons/lists.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/plans/planaddons/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/labels", + "api/v3/request", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/publish.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "pkg/clock", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/plans/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/plan", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/subscriptions/cancel.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/subscriptions/change.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/productcatalog/subscription", + "openmeter/subscription/workflow", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/subscriptions/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/customer", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/models" + ], + "api/v3/handlers/subscriptions/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/customer", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/subscriptions/get.go": [ + "api/v3", + "api/v3/apierrors", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/subscriptions/handler.go": [ + "openmeter/customer", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/subscriptions/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/filters", + "api/v3/request", + "api/v3/response", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/subscriptions/subscriptionaddons/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/subscription/addon", + "pkg/clock", + "pkg/models", + "pkg/timeutil" + ], + "api/v3/handlers/subscriptions/subscriptionaddons/get.go": [ + "api/v3", + "openmeter/subscription/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/subscriptions/subscriptionaddons/handler.go": [ + "openmeter/subscription/addon", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/subscriptions/subscriptionaddons/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "api/v3/response", + "openmeter/subscription/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination" + ], + "api/v3/handlers/subscriptions/unschedule_cancelation.go": [ + "api/v3", + "api/v3/apierrors", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/taxcodes/convert.gen.go": [ + "api/v3", + "openmeter/taxcode", + "pkg/models" + ], + "api/v3/handlers/taxcodes/convert.go": [ + "api/v3", + "api/v3/labels", + "openmeter/app", + "openmeter/taxcode", + "pkg/models" + ], + "api/v3/handlers/taxcodes/create.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/taxcodes/delete.go": [ + "api/v3/apierrors", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/taxcodes/get.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/taxcodes/get_organization_default_tax_codes.go": [ + "api/v3", + "api/v3/apierrors", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/taxcodes/handler.go": [ + "openmeter/taxcode", + "pkg/framework/transport/httptransport" + ], + "api/v3/handlers/taxcodes/list.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/response", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "api/v3/handlers/taxcodes/update.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "api/v3/handlers/taxcodes/upsert_organization_default_tax_codes.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/request", + "openmeter/taxcode", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "api/v3/labels/convert.go": [ + "api/v3", + "pkg/models" + ], + "api/v3/labels/convert_test.go": [ + "api/v3", + "pkg/models" + ], + "api/v3/labels/validate.go": [ + "api/v3", + "pkg/framework/commonhttp", + "pkg/models" + ], + "api/v3/labels/validate_test.go": [ + "api/v3" + ], + "api/v3/oasmiddleware/error.go": [ + "api/v3/apierrors" + ], + "api/v3/oasmiddleware/hook.go": [ + "api/v3/apierrors" + ], + "api/v3/oasmiddleware/validator_test.go": [ + "api/v3", + "api/v3/oasmiddleware" + ], + "api/v3/request/body.go": [ + "api/v3/apierrors" + ], + "api/v3/request/filter.go": [ + "api/v3", + "pkg/filter" + ], + "api/v3/request/filter_test.go": [ + "api/v3", + "api/v3/request", + "pkg/filter" + ], + "api/v3/request/sort.go": [ + "pkg/sortx" + ], + "api/v3/response/cursorpagination.go": [ + "pkg/pagination/v2" + ], + "api/v3/server/routes.go": [ + "api/v3", + "api/v3/handlers/currencies", + "api/v3/handlers/customers/charges", + "api/v3/handlers/customers/credits", + "api/v3/handlers/plans/planaddons", + "api/v3/handlers/subscriptions/subscriptionaddons", + "pkg/framework/commonhttp" + ], + "api/v3/server/server.go": [ + "api/v3", + "api/v3/apierrors", + "api/v3/handlers/addons", + "api/v3/handlers/apps", + "api/v3/handlers/billingprofiles", + "api/v3/handlers/currencies", + "api/v3/handlers/customers", + "api/v3/handlers/customers/billing", + "api/v3/handlers/customers/charges", + "api/v3/handlers/customers/credits", + "api/v3/handlers/customers/entitlementaccess", + "api/v3/handlers/events", + "api/v3/handlers/featurecost", + "api/v3/handlers/features", + "api/v3/handlers/llmcost", + "api/v3/handlers/meters", + "api/v3/handlers/plans", + "api/v3/handlers/plans/planaddons", + "api/v3/handlers/subscriptions", + "api/v3/handlers/subscriptions/subscriptionaddons", + "api/v3/handlers/taxcodes", + "api/v3/oasmiddleware", + "api/v3/render", + "app/config", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/creditgrant", + "openmeter/cost", + "openmeter/currencies", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/ingest", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "openmeter/ledger/noop", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/streaming", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/taxcode", + "pkg/errorsx", + "pkg/featuregate", + "pkg/framework/transport/httptransport", + "pkg/server" + ], + "api/v3/test/filters_test.go": [ + "api/v3/filters", + "api/v3/oasmiddleware", + "api/v3/test" + ], + "app/common/app.go": [ + "app/config", + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/custominvoicing", + "openmeter/app/custominvoicing/adapter", + "openmeter/app/custominvoicing/service", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/app/stripe", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/service", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/namespace", + "openmeter/secret", + "openmeter/watermill/eventbus" + ], + "app/common/billing.go": [ + "app/config", + "openmeter/app", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/worker/advance", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/billing/service", + "openmeter/billing/validators/customer", + "openmeter/billing/validators/subscription", + "openmeter/billing/worker/advance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/billing/worker/subscriptionsync/service", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/breakage", + "openmeter/ledger/recognizer", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/featuregate", + "pkg/framework/lockr" + ], + "app/common/charges.go": [ + "app/config", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/service", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service", + "openmeter/billing/rating", + "openmeter/ent/db", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/recognizer", + "openmeter/ledger/transactions", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "pkg/framework/lockr", + "pkg/framework/transaction" + ], + "app/common/clickhouse.go": [ + "app/config", + "pkg/framework/clickhouseotel" + ], + "app/common/config.go": [ + "app/config" + ], + "app/common/creditgrant.go": [ + "openmeter/billing/creditgrant", + "openmeter/billing/creditgrant/service", + "openmeter/customer" + ], + "app/common/currency.go": [ + "openmeter/currencies", + "openmeter/currencies/adapter", + "openmeter/currencies/service", + "openmeter/ent/db" + ], + "app/common/customer.go": [ + "app/config", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/ent/db", + "openmeter/ledger/resolvers", + "openmeter/registry", + "openmeter/subject", + "openmeter/watermill/eventbus" + ], + "app/common/customerbalance.go": [ + "app/config", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/breakage", + "openmeter/ledger/customerbalance" + ], + "app/common/database.go": [ + "app/config", + "openmeter/ent/db", + "pkg/framework/entutils/entdriver", + "pkg/framework/pgdriver", + "tools/migrate" + ], + "app/common/entitlement.go": [ + "app/config", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/entitlement/validators/customer", + "openmeter/meter", + "openmeter/registry", + "openmeter/registry/builder", + "openmeter/streaming", + "openmeter/watermill/eventbus", + "pkg/framework/lockr" + ], + "app/common/featuregate.go": [ + "pkg/featuregate" + ], + "app/common/ffx.go": [ + "api", + "app/config", + "openmeter/namespace/namespacedriver", + "openmeter/subscription", + "pkg/ffx" + ], + "app/common/kafka.go": [ + "app/config", + "openmeter/ingest/kafkaingest", + "openmeter/ingest/kafkaingest/topicresolver", + "pkg/kafka", + "pkg/kafka/metrics" + ], + "app/common/ledger.go": [ + "app/config", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/historical", + "openmeter/ledger/historical/adapter", + "openmeter/ledger/noop", + "openmeter/ledger/resolvers", + "openmeter/ledger/resolvers/adapter", + "openmeter/ledger/routingrules", + "openmeter/namespace", + "pkg/framework/lockr" + ], + "app/common/ledger_test.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ledger", + "openmeter/ledger/testutils", + "openmeter/testutils", + "tools/migrate" + ], + "app/common/llmcost.go": [ + "openmeter/ent/db", + "openmeter/llmcost", + "openmeter/llmcost/adapter", + "openmeter/llmcost/service", + "openmeter/llmcost/sync" + ], + "app/common/locker.go": [ + "pkg/framework/lockr" + ], + "app/common/metadata.go": [ + "app/config" + ], + "app/common/meter.go": [ + "app/config", + "openmeter/ent/db", + "openmeter/meter", + "openmeter/meter/adapter", + "openmeter/meter/service", + "openmeter/namespace", + "openmeter/watermill/eventbus", + "pkg/filter" + ], + "app/common/meterevent.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/meterevent/adapter", + "openmeter/streaming" + ], + "app/common/namespace.go": [ + "app/config", + "openmeter/namespace", + "openmeter/namespace/namespacedriver" + ], + "app/common/notification.go": [ + "app/config", + "openmeter/ent/db", + "openmeter/notification", + "openmeter/notification/adapter", + "openmeter/notification/eventhandler", + "openmeter/notification/service", + "openmeter/notification/webhook", + "openmeter/notification/webhook/noop", + "openmeter/notification/webhook/svix", + "openmeter/productcatalog/feature", + "pkg/framework/pgdriver", + "pkg/pglockx" + ], + "app/common/openmeter_balanceworker.go": [ + "app/config", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker", + "openmeter/notification", + "openmeter/registry", + "openmeter/subject", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "openmeter/watermill/router", + "pkg/kafka" + ], + "app/common/openmeter_billingworker.go": [ + "app/config", + "openmeter/billing/worker", + "openmeter/billing/worker/subscriptionsync", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "openmeter/watermill/router", + "pkg/kafka" + ], + "app/common/openmeter_notification.go": [ + "app/config", + "pkg/kafka" + ], + "app/common/openmeter_server.go": [ + "app/config", + "openmeter/ingest", + "openmeter/ingest/ingestadapter", + "openmeter/ingest/kafkaingest", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/watermill/driver/kafka", + "pkg/kafka" + ], + "app/common/openmeter_sinkworker.go": [ + "app/config", + "openmeter/dedupe", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/meter", + "openmeter/sink", + "openmeter/sink/flushhandler", + "openmeter/sink/flushhandler/ingestnotification", + "openmeter/streaming", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "pkg/kafka" + ], + "app/common/portal.go": [ + "app/config", + "openmeter/portal", + "openmeter/portal/adapter" + ], + "app/common/productcatalog.go": [ + "openmeter/cost", + "openmeter/cost/adapter", + "openmeter/cost/service", + "openmeter/ent/db", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus" + ], + "app/common/progressmanager.go": [ + "app/config", + "openmeter/progressmanager", + "openmeter/progressmanager/adapter" + ], + "app/common/secret.go": [ + "openmeter/ent/db", + "openmeter/secret", + "openmeter/secret/adapter", + "openmeter/secret/service" + ], + "app/common/server.go": [ + "openmeter/server" + ], + "app/common/streaming.go": [ + "app/config", + "openmeter/namespace", + "openmeter/progressmanager", + "openmeter/streaming", + "openmeter/streaming/clickhouse", + "openmeter/streaming/retry" + ], + "app/common/subject.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/subject/service/hooks" + ], + "app/common/subscription.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/registry", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/validators/customer", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/ffx", + "pkg/framework/lockr" + ], + "app/common/svix.go": [ + "app/config" + ], + "app/common/taxcode.go": [ + "app/config", + "openmeter/app", + "openmeter/ent/db", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service" + ], + "app/common/telemetry.go": [ + "app/config", + "openmeter/server", + "pkg/contextx", + "pkg/framework/transport/httptransport", + "pkg/gosundheit" + ], + "app/common/termination.go": [ + "app/config" + ], + "app/common/watermill.go": [ + "app/config", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "openmeter/watermill/router", + "pkg/kafka" + ], + "app/config/balanceworker.go": [ + "pkg/errorsx" + ], + "app/config/billing.go": [ + "openmeter/billing" + ], + "app/config/billingworker.go": [ + "pkg/errorsx" + ], + "app/config/config.go": [ + "openmeter/meter", + "pkg/errorsx", + "pkg/models" + ], + "app/config/config_test.go": [ + "openmeter/billing", + "openmeter/dedupe/redisdedupe", + "openmeter/meter", + "openmeter/notification/webhook", + "openmeter/notification/webhook/svix", + "pkg/datetime", + "pkg/kafka", + "pkg/models", + "pkg/pglockx", + "pkg/redis" + ], + "app/config/customer.go": [ + "pkg/models" + ], + "app/config/dedupe.go": [ + "openmeter/dedupe", + "openmeter/dedupe/memorydedupe", + "openmeter/dedupe/redisdedupe", + "pkg/errorsx", + "pkg/redis" + ], + "app/config/entitlements.go": [ + "pkg/datetime" + ], + "app/config/events.go": [ + "openmeter/watermill/eventbus", + "pkg/errorsx" + ], + "app/config/ingest.go": [ + "pkg/errorsx", + "pkg/kafka" + ], + "app/config/ingest_test.go": [ + "pkg/kafka" + ], + "app/config/kafka.go": [ + "pkg/kafka" + ], + "app/config/notification.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "pkg/errorsx", + "pkg/pglockx" + ], + "app/config/progressmanager.go": [ + "pkg/errorsx", + "pkg/redis" + ], + "app/config/sink.go": [ + "pkg/errorsx" + ], + "app/config/svix.go": [ + "openmeter/notification/webhook/svix" + ], + "app/config/taxcode.go": [ + "openmeter/taxcode" + ], + "app/config/telemetry.go": [ + "pkg/errorsx" + ], + "cmd/balance-worker/main.go": [ + "app/config", + "pkg/log" + ], + "cmd/balance-worker/wire.go": [ + "app/common", + "app/config" + ], + "cmd/balance-worker/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/router" + ], + "cmd/billing-worker/main.go": [ + "app/config", + "pkg/log" + ], + "cmd/billing-worker/wire.go": [ + "app/common", + "app/config", + "openmeter/ledger", + "openmeter/meter", + "openmeter/namespace", + "openmeter/streaming" + ], + "cmd/billing-worker/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/ledger", + "openmeter/meter", + "openmeter/namespace", + "openmeter/productcatalog/featureresolver", + "openmeter/streaming", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/router", + "pkg/featuregate", + "pkg/ffx" + ], + "cmd/jobs/billing/advance/advance.go": [ + "cmd/jobs/internal", + "openmeter/billing" + ], + "cmd/jobs/billing/advancecharges/advancecharges.go": [ + "cmd/jobs/internal", + "openmeter/customer" + ], + "cmd/jobs/billing/billing.go": [ + "cmd/jobs/billing/advance", + "cmd/jobs/billing/advancecharges", + "cmd/jobs/billing/collect", + "cmd/jobs/billing/subscriptionsync" + ], + "cmd/jobs/billing/collect/collect.go": [ + "cmd/jobs/internal", + "openmeter/billing/worker/collect", + "openmeter/customer" + ], + "cmd/jobs/billing/subscriptionsync/sync.go": [ + "cmd/jobs/internal", + "openmeter/billing/worker/subscriptionsync/reconciler" + ], + "cmd/jobs/entitlement/recalculatesnapshots.go": [ + "cmd/jobs/internal", + "openmeter/entitlement/balanceworker" + ], + "cmd/jobs/internal/config.go": [ + "app/config" + ], + "cmd/jobs/internal/globals.go": [ + "app/config" + ], + "cmd/jobs/internal/wire.go": [ + "app/common", + "app/config", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing/charges/worker/advance", + "openmeter/billing/worker/advance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/llmcost/sync", + "openmeter/meter", + "openmeter/namespace", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/registry", + "openmeter/secret", + "openmeter/streaming", + "openmeter/subject", + "openmeter/watermill/eventbus", + "pkg/kafka/metrics" + ], + "cmd/jobs/internal/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing/charges/worker/advance", + "openmeter/billing/worker/advance", + "openmeter/billing/worker/collect", + "openmeter/billing/worker/subscriptionsync/reconciler", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/llmcost/sync", + "openmeter/meter", + "openmeter/namespace", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/registry", + "openmeter/secret", + "openmeter/streaming", + "openmeter/subject", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "pkg/featuregate", + "pkg/ffx", + "pkg/kafka/metrics" + ], + "cmd/jobs/ledger/backfillaccounts/backfillaccounts.go": [ + "cmd/jobs/internal", + "cmd/jobs/ledger/service", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/resolvers", + "openmeter/ledger/resolvers/adapter", + "pkg/framework/lockr" + ], + "cmd/jobs/ledger/ledger.go": [ + "cmd/jobs/ledger/backfillaccounts" + ], + "cmd/jobs/ledger/service/customer_lister_ent.go": [ + "openmeter/ent/db", + "openmeter/ent/db/customer", + "pkg/clock" + ], + "cmd/jobs/ledger/service/service.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/models", + "pkg/pagination/v2" + ], + "cmd/jobs/ledger/service/service_test.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/models", + "pkg/pagination/v2" + ], + "cmd/jobs/llmcost/llmcost.go": [ + "cmd/jobs/internal" + ], + "cmd/jobs/main.go": [ + "cmd/jobs/billing", + "cmd/jobs/entitlement", + "cmd/jobs/internal", + "cmd/jobs/ledger", + "cmd/jobs/llmcost", + "cmd/jobs/migrate", + "cmd/jobs/quickstart", + "pkg/log" + ], + "cmd/jobs/migrate/migrate.go": [ + "app/config", + "cmd/jobs/internal" + ], + "cmd/jobs/quickstart/cronjobs.go": [ + "cmd/jobs/internal", + "openmeter/billing/worker/subscriptionsync/reconciler" + ], + "cmd/jobs/quickstart/quickstart.go": [ + "cmd/jobs/billing/subscriptionsync" + ], + "cmd/jobs/version.go": [ + "cmd/jobs/internal" + ], + "cmd/notification-service/main.go": [ + "app/config", + "openmeter/notification/consumer", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/router", + "pkg/log" + ], + "cmd/notification-service/wire.go": [ + "app/common", + "app/config", + "openmeter/ent/db", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus" + ], + "cmd/notification-service/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/ent/db", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus" + ], + "cmd/server/main.go": [ + "app/common", + "app/config", + "openmeter/debug", + "openmeter/ingest/kafkaingest", + "openmeter/namespace", + "openmeter/server", + "openmeter/server/router", + "pkg/errorsx", + "pkg/log" + ], + "cmd/server/wire.go": [ + "app/common", + "app/config", + "openmeter/billing/creditgrant", + "openmeter/cost", + "openmeter/currencies", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ingest", + "openmeter/ingest/kafkaingest", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/namespace", + "openmeter/notification", + "openmeter/portal", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/progressmanager", + "openmeter/registry", + "openmeter/secret", + "openmeter/server", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subject/service/hooks", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/featuregate", + "pkg/ffx", + "pkg/kafka/metrics" + ], + "cmd/server/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/billing/creditgrant", + "openmeter/cost", + "openmeter/currencies", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ingest", + "openmeter/ingest/kafkaingest", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/namespace", + "openmeter/notification", + "openmeter/portal", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/progressmanager", + "openmeter/registry", + "openmeter/secret", + "openmeter/server", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subject/service/hooks", + "openmeter/taxcode", + "openmeter/watermill/driver/kafka", + "openmeter/watermill/eventbus", + "pkg/featuregate", + "pkg/ffx", + "pkg/kafka/metrics" + ], + "cmd/sink-worker/main.go": [ + "app/config", + "pkg/log" + ], + "cmd/sink-worker/wire.go": [ + "app/common", + "app/config", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/meter", + "openmeter/sink", + "openmeter/sink/flushhandler", + "openmeter/streaming", + "pkg/kafka" + ], + "cmd/sink-worker/wire_gen.go": [ + "app/common", + "app/config", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/meter", + "openmeter/sink", + "openmeter/sink/flushhandler", + "openmeter/streaming", + "openmeter/watermill/driver/kafka", + "pkg/kafka" + ], + "collector/benthos/input/kubernetes.go": [ + "collector/benthos/internal/logging", + "collector/benthos/services/leaderelection" + ], + "collector/benthos/input/otel_log.go": [ + "collector/benthos/internal/message", + "collector/benthos/internal/shutdown" + ], + "collector/benthos/input/prometheus.go": [ + "collector/benthos/services/leaderelection" + ], + "collector/benthos/input/run_ai.go": [ + "collector/benthos/input/runai", + "collector/benthos/services/leaderelection" + ], + "collector/benthos/output/openmeter.go": [ + "api/client/go" + ], + "collector/benthos/services/leaderelection/service.go": [ + "collector/benthos/internal/logging" + ], + "collector/cmd/main.go": [ + "collector/benthos/bloblang", + "collector/benthos/input", + "collector/benthos/output", + "collector/benthos/services/leaderelection" + ], + "e2e/addons_v3_test.go": [ + "api/v3" + ], + "e2e/e2e_test.go": [ + "api/client/go", + "api/v3", + "openmeter/meter", + "openmeter/testutils", + "pkg/convert" + ], + "e2e/entitlement_parity_test.go": [ + "api/client/go", + "pkg/convert" + ], + "e2e/entitlement_test.go": [ + "api/client/go", + "pkg/convert" + ], + "e2e/helpers.go": [ + "api/client/go", + "api/v3" + ], + "e2e/ledger_backfill_test.go": [ + "openmeter/ledger" + ], + "e2e/multisubject_test.go": [ + "api/client/go" + ], + "e2e/planaddons_v3_test.go": [ + "api/v3" + ], + "e2e/plans_v3_test.go": [ + "api/v3" + ], + "e2e/productcatalog_smoke_v3_test.go": [ + "api/v3" + ], + "e2e/productcatalog_test.go": [ + "api/client/go", + "pkg/models" + ], + "e2e/setup_test.go": [ + "api/client/go" + ], + "e2e/v3helpers_test.go": [ + "api/v3" + ], + "openmeter/apiconverter/cursor.go": [ + "api", + "pkg/pagination/v2" + ], + "openmeter/apiconverter/filter.gen.go": [ + "api", + "pkg/filter" + ], + "openmeter/apiconverter/filter.go": [ + "api", + "pkg/filter" + ], + "openmeter/app/adapter.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/app/adapter/adapter.go": [ + "openmeter/app", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/app/adapter/app.go": [ + "openmeter/app", + "openmeter/ent/db", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/adapter/customer.go": [ + "openmeter/app", + "openmeter/ent/db", + "openmeter/ent/db/appcustomer", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/adapter/marketplace.go": [ + "openmeter/app", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/app.go": [ + "openmeter/customer", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/appbase.go": [ + "pkg/models" + ], + "openmeter/app/custominvoicing/adapter.go": [ + "openmeter/app", + "pkg/framework/entutils" + ], + "openmeter/app/custominvoicing/adapter/adapter.go": [ + "openmeter/app/custominvoicing", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/app/custominvoicing/adapter/appconfig.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/ent/db", + "openmeter/ent/db/appcustominvoicing", + "pkg/framework/entutils" + ], + "openmeter/app/custominvoicing/adapter/customerdata.go": [ + "openmeter/app/custominvoicing", + "openmeter/ent/db", + "openmeter/ent/db/appcustominvoicingcustomer", + "pkg/framework/entutils" + ], + "openmeter/app/custominvoicing/app.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app" + ], + "openmeter/app/custominvoicing/customerdata.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/app/custominvoicing/factory.go": [ + "openmeter/app", + "openmeter/billing" + ], + "openmeter/app/custominvoicing/httpdriver/custominvoicing.go": [ + "api", + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/httpdriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/app/custominvoicing/httpdriver/errors.go": [ + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "openmeter/app/custominvoicing/httpdriver/handler.go": [ + "openmeter/app/custominvoicing", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/app/custominvoicing/httpdriver/mapper.go": [ + "api", + "openmeter/billing", + "pkg/models" + ], + "openmeter/app/custominvoicing/service.go": [ + "openmeter/app", + "openmeter/billing" + ], + "openmeter/app/custominvoicing/service/customerdata.go": [ + "openmeter/app/custominvoicing", + "pkg/framework/transaction" + ], + "openmeter/app/custominvoicing/service/factory.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "pkg/framework/transaction" + ], + "openmeter/app/custominvoicing/service/service.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/billing" + ], + "openmeter/app/custominvoicing/service/sync.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/billing", + "pkg/clock", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/app/custominvoicing/sync.go": [ + "openmeter/billing", + "pkg/models" + ], + "openmeter/app/errors.go": [ + "openmeter/customer", + "pkg/models" + ], + "openmeter/app/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/app/events.go": [ + "openmeter/customer", + "openmeter/event/metadata", + "openmeter/watermill/marshaler" + ], + "openmeter/app/httpdriver/app.go": [ + "api", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/httpdriver/customer.go": [ + "api", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/httpdriver/handler.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/app/httpdriver/mapper.go": [ + "api", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/sandbox", + "openmeter/app/stripe" + ], + "openmeter/app/httpdriver/marketplace.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination" + ], + "openmeter/app/input.go": [ + "openmeter/customer", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/marketplace.go": [ + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/sandbox/app.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app", + "pkg/clock" + ], + "openmeter/app/sandbox/errors.go": [ + "openmeter/billing" + ], + "openmeter/app/sandbox/helpers.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/app/sandbox/marketplace.go": [ + "openmeter/app" + ], + "openmeter/app/sandbox/mock.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app" + ], + "openmeter/app/service.go": [ + "pkg/pagination" + ], + "openmeter/app/service/app.go": [ + "openmeter/app", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/service/customer.go": [ + "openmeter/app", + "pkg/pagination" + ], + "openmeter/app/service/marketplace.go": [ + "openmeter/app", + "pkg/models", + "pkg/pagination" + ], + "openmeter/app/service/service.go": [ + "openmeter/app", + "openmeter/watermill/eventbus" + ], + "openmeter/app/stripe/adapter.go": [ + "openmeter/app/stripe/client", + "openmeter/billing", + "pkg/framework/entutils" + ], + "openmeter/app/stripe/adapter/adapter.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/secret", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/app/stripe/adapter/customer.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/ent/db", + "openmeter/ent/db/appstripecustomer", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/app/stripe/adapter/stripe.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/secret/entity", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/app/stripe/app.go": [ + "openmeter/app", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/secret" + ], + "openmeter/app/stripe/appcustomer.go": [ + "openmeter/app", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app", + "pkg/models" + ], + "openmeter/app/stripe/appinvoice.go": [ + "openmeter/app", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/customer", + "openmeter/productcatalog" + ], + "openmeter/app/stripe/calculator.go": [ + "pkg/currencyx" + ], + "openmeter/app/stripe/client/appclient.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/app/stripe/client/checkout.go": [ + "api", + "openmeter/app", + "openmeter/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/app/stripe/client/client.go": [ + "openmeter/app", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/app/stripe/client/errors.go": [ + "pkg/models" + ], + "openmeter/app/stripe/client/invoice.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/app/stripe/client/invoice_line.go": [ + "pkg/slicesx" + ], + "openmeter/app/stripe/client/portal.go": [ + "pkg/models" + ], + "openmeter/app/stripe/client/stripe.go": [ + "openmeter/app", + "openmeter/customer", + "pkg/models" + ], + "openmeter/app/stripe/clientapp.go": [ + "openmeter/app/stripe/client", + "openmeter/secret/entity" + ], + "openmeter/app/stripe/config.go": [ + "openmeter/app" + ], + "openmeter/app/stripe/customerdata.go": [ + "openmeter/app" + ], + "openmeter/app/stripe/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/app/stripe/httpdriver/apikey.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/app/stripe/httpdriver/checkout_session.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/customer", + "openmeter/customer/httpdriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/app/stripe/httpdriver/customer.go": [ + "api", + "openmeter/app", + "openmeter/app/httpdriver", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/app/stripe/httpdriver/handler.go": [ + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/app/stripe/httpdriver/mapping.go": [ + "api", + "openmeter/app/stripe" + ], + "openmeter/app/stripe/httpdriver/webhook.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/app/stripe/marketplace.go": [ + "openmeter/app" + ], + "openmeter/app/stripe/portal.go": [ + "openmeter/app", + "openmeter/customer", + "pkg/models" + ], + "openmeter/app/stripe/service.go": [ + "openmeter/app", + "openmeter/billing" + ], + "openmeter/app/stripe/service/app.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "pkg/framework/transaction" + ], + "openmeter/app/stripe/service/billing.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "pkg/pagination" + ], + "openmeter/app/stripe/service/factory.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/secret/entity" + ], + "openmeter/app/stripe/service/service.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/secret", + "openmeter/watermill/eventbus" + ], + "openmeter/app/stripe/service/webhook.go": [ + "openmeter/app" + ], + "openmeter/app/stripe/types.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/customer", + "openmeter/secret/entity" + ], + "openmeter/billing/adapter.go": [ + "openmeter/app", + "openmeter/customer", + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/billing/adapter/adapter.go": [ + "openmeter/billing", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/adapter/customeroverride.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "openmeter/taxcode/adapter", + "pkg/clock", + "pkg/framework/entutils", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/adapter/gatheringinvoice.go": [ + "api", + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "pkg/clock", + "pkg/convert", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/billing/adapter/gatheringlines.go": [ + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/productcatalog", + "pkg/clock", + "pkg/convert", + "pkg/entitydiff", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/adapter/invoice.go": [ + "api", + "openmeter/app", + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/predicate", + "openmeter/streaming", + "pkg/clock", + "pkg/convert", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/billing/adapter/invoiceapp.go": [ + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "pkg/framework/entutils" + ], + "openmeter/billing/adapter/invoicelinesplitgroup.go": [ + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/adapter/lock.go": [ + "openmeter/billing", + "openmeter/ent/db/billingcustomerlock", + "pkg/framework/entutils" + ], + "openmeter/billing/adapter/profile.go": [ + "api", + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/customer", + "openmeter/productcatalog", + "openmeter/taxcode/adapter", + "pkg/clock", + "pkg/convert", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/adapter/schemalevel.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoicewriteschemalevel", + "pkg/framework/entutils" + ], + "openmeter/billing/adapter/schemamigration.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "pkg/framework/entutils" + ], + "openmeter/billing/adapter/seq.go": [ + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billingsequencenumbers", + "pkg/framework/entutils" + ], + "openmeter/billing/adapter/stdinvoicelinediff.go": [ + "openmeter/billing", + "pkg/entitydiff", + "pkg/set", + "pkg/slicesx" + ], + "openmeter/billing/adapter/stdinvoicelinediff_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "pkg/clock", + "pkg/entitydiff", + "pkg/models" + ], + "openmeter/billing/adapter/stdinvoicelinemapper.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "pkg/convert", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/adapter/stdinvoicelines.go": [ + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "pkg/clock", + "pkg/entitydiff", + "pkg/framework/entutils", + "pkg/slicesx" + ], + "openmeter/billing/adapter/upsert.go": [ + "openmeter/ent/db", + "pkg/entitydiff", + "pkg/slicesx" + ], + "openmeter/billing/adapter/validationissue.go": [ + "openmeter/billing", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoicevalidationissue", + "pkg/clock" + ], + "openmeter/billing/app.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/billing/charges/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/customer", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/charges/adapter/adapter.go": [ + "openmeter/billing/charges", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/adapter/search.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/chargessearchv1", + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/billing/charges/adapter/search_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/testutils", + "pkg/currencyx", + "pkg/pagination", + "tools/migrate" + ], + "openmeter/billing/charges/charge.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "pkg/currencyx", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/charges/creditpurchase/adapter/adapter.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/creditpurchase/adapter/charge.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/ent/db", + "openmeter/ent/db/chargecreditpurchase", + "pkg/framework/entutils", + "pkg/pagination", + "pkg/slicesx" + ], + "openmeter/billing/charges/creditpurchase/adapter/creditgrant.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/ledgertransaction", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/predicate" + ], + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/testutils", + "pkg/currencyx", + "tools/migrate" + ], + "openmeter/billing/charges/creditpurchase/adapter/mapper.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/ent/db", + "pkg/convert" + ], + "openmeter/billing/charges/creditpurchase/adapter/payment.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/creditpurchase/charge.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/customer", + "pkg/clock", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/featurefilters.go": [ + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/creditpurchase/funded_credit_activity.go": [ + "openmeter/billing/charges/meta", + "openmeter/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/handler.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/lineengine/engine.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "pkg/slicesx" + ], + "openmeter/billing/charges/creditpurchase/service.go": [ + "openmeter/billing", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/charges/creditpurchase/service/create.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/service/external.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "pkg/clock", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/creditpurchase/service/funded_credit_activity.go": [ + "openmeter/billing/charges/creditpurchase", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/creditpurchase/service/get.go": [ + "openmeter/billing/charges/creditpurchase", + "pkg/framework/transaction", + "pkg/pagination" + ], + "openmeter/billing/charges/creditpurchase/service/invoice.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "pkg/clock", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/creditpurchase/service/promotional.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "pkg/clock", + "pkg/statelessx" + ], + "openmeter/billing/charges/creditpurchase/service/promotional_test.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/ledgertransaction", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/creditpurchase/service/service.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta" + ], + "openmeter/billing/charges/creditpurchase/service/statemachine.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/statemachine" + ], + "openmeter/billing/charges/creditpurchase/settlement.go": [ + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/creditpurchase/statemachine.go": [ + "openmeter/billing/charges/meta", + "pkg/models" + ], + "openmeter/billing/charges/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/charges/events.go": [ + "openmeter/event/metadata", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "pkg/framework/entutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/adapter/adapter.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/flatfee/adapter/charge.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/ent/db", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/productcatalog", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/flatfee/adapter/credits.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db", + "openmeter/ent/db/chargeflatfeerun", + "pkg/framework/entutils", + "pkg/slicesx" + ], + "openmeter/billing/charges/flatfee/adapter/detailedline.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db", + "openmeter/ent/db/chargeflatfeerundetailedline", + "pkg/clock", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/flatfee/adapter/detailedline_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/ent/db", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/productcatalog", + "openmeter/testutils", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil", + "tools/migrate" + ], + "openmeter/billing/charges/flatfee/adapter/mapper.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/ent/db", + "openmeter/productcatalog", + "pkg/framework/entutils", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/adapter/payment.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargeflatfeerunpayment", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/flatfee/adapter/realizationrun.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/models/totals", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/flatfee/adapter/realizationrun_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/testutils", + "pkg/currencyx", + "pkg/timeutil", + "tools/migrate" + ], + "openmeter/billing/charges/flatfee/adapter/usage.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/ent/db/chargeflatfeerun", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/flatfee/bookedat.go": [ + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/charge.go": [ + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/charge_test.go": [ + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/detailedline.go": [ + "openmeter/billing/models/stddetailedline", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/handler.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/models/totals", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/prorating.go": [ + "openmeter/productcatalog" + ], + "openmeter/billing/charges/flatfee/realizationrun.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/models/totals", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/service.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/productcatalog/feature", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/create.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/service/creditheninvoice.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/productcatalog", + "pkg/models", + "pkg/statelessx", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/service/creditsonly.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/clock", + "pkg/statelessx" + ], + "openmeter/billing/charges/flatfee/service/get.go": [ + "openmeter/billing/charges/flatfee", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/flatfee/service/lineengine.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/clock", + "pkg/slicesx" + ], + "openmeter/billing/charges/flatfee/service/linemapper.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee" + ], + "openmeter/billing/charges/flatfee/service/payment.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "pkg/clock", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/flatfee/service/payment_test.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/models/totals", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/flatfee/service/realizations/correct.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/models/totals", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/invoicedusage", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/realizations/preview.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/invoiceupdater", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/realizations/service.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/rating" + ], + "openmeter/billing/charges/flatfee/service/service.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "openmeter/billing/rating", + "pkg/framework/lockr" + ], + "openmeter/billing/charges/flatfee/service/statemachine.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/service/realizations", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/statemachine", + "pkg/clock" + ], + "openmeter/billing/charges/flatfee/service/subscription.go": [ + "openmeter/billing/charges/flatfee", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/service/triggers.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/flatfee/statemachine.go": [ + "openmeter/billing/charges/meta", + "pkg/models" + ], + "openmeter/billing/charges/invoiceupdater/feehelper.go": [ + "openmeter/billing", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/invoiceupdater/invoiceupdate.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/streaming", + "pkg/clock", + "pkg/currencyx" + ], + "openmeter/billing/charges/invoiceupdater/patch.go": [ + "openmeter/billing" + ], + "openmeter/billing/charges/lineage/adapter/adapter.go": [ + "openmeter/billing/charges/lineage", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/lineage/adapter/lineage.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/lineage/lineage.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/billing/charges/lineage/lineage_test.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/billing/charges/lineage/service.go": [ + "openmeter/billing/charges/models/creditrealization", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/lineage/service/service.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "pkg/clock", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/lock.go": [ + "openmeter/billing/charges/meta", + "pkg/framework/lockr" + ], + "openmeter/billing/charges/meta/adapter.go": [ + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/billing/charges/meta/adapter/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/meta/adapter/charges.go": [ + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "openmeter/ent/db/charge", + "pkg/clock", + "pkg/framework/entutils", + "pkg/slicesx" + ], + "openmeter/billing/charges/meta/charge.go": [ + "openmeter/customer", + "pkg/currencyx", + "pkg/expand", + "pkg/models" + ], + "openmeter/billing/charges/meta/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/charges/meta/intent.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/meta/patch.go": [ + "openmeter/billing/charges/invoiceupdater", + "pkg/models" + ], + "openmeter/billing/charges/meta/patchdelete.go": [ + "pkg/models" + ], + "openmeter/billing/charges/meta/patchextend.go": [ + "pkg/models" + ], + "openmeter/billing/charges/meta/patchextend_test.go": [ + "pkg/timeutil" + ], + "openmeter/billing/charges/meta/patchshrink.go": [ + "pkg/models" + ], + "openmeter/billing/charges/meta/patchshrink_test.go": [ + "pkg/timeutil" + ], + "openmeter/billing/charges/meta/resource.go": [ + "pkg/models" + ], + "openmeter/billing/charges/meta/subscription.go": [ + "pkg/models" + ], + "openmeter/billing/charges/meta/timestamps.go": [ + "openmeter/streaming", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/chargemeta/mixin.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/convert", + "pkg/currencyx", + "pkg/framework/entutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/creditrealization/allocation.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/creditrealization/correction.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/currencyx", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/models/creditrealization/correction_test.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/creditrealization/lineage.go": [ + "pkg/models" + ], + "openmeter/billing/charges/models/creditrealization/mixin.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/framework/entutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/creditrealization/models.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/creditrealization/realizations.go": [ + "openmeter/billing", + "pkg/currencyx", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/models/invoicedusage/mixin.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/models/totals", + "pkg/framework/entutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/invoicedusage/stdinvoice.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/models/totals", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/ledgertransaction/ledger.go": [ + "pkg/models" + ], + "openmeter/billing/charges/models/payment/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/charges/models/payment/external.go": [ + "pkg/models" + ], + "openmeter/billing/charges/models/payment/invoiced.go": [ + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/billing/charges/models/payment/mixin.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/convert", + "pkg/framework/entutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/models/payment/models.go": [ + "openmeter/billing/charges/models/ledgertransaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/patch.go": [ + "openmeter/billing/charges/meta", + "openmeter/customer", + "pkg/models" + ], + "openmeter/billing/charges/service.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/customer", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/charges/service/advance.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "pkg/currencyx", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/service/advance_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/clock", + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/billing/charges/service/base_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service", + "openmeter/billing/rating/service", + "openmeter/customer", + "openmeter/ledger/recognizer", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/lockr", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/create.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/ref" + ], + "openmeter/billing/charges/service/creditpurchase.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/customer", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/service/creditpurchase_test.go": [ + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/customer", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/featureid_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/gathering_preview_test.go": [ + "openmeter/billing", + "test/billing" + ], + "openmeter/billing/charges/service/get.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/service/handlers_test.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/service/helpers.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/service/invoicable_test.go": [ + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/streaming/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/invoice.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/service/lineage_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/list.go": [ + "openmeter/billing/charges", + "openmeter/customer", + "pkg/framework/transaction", + "pkg/pagination" + ], + "openmeter/billing/charges/service/patch.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/invoiceupdater", + "openmeter/customer", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/service/recognition.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/ledger/recognizer", + "pkg/clock", + "pkg/currencyx" + ], + "openmeter/billing/charges/service/service.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ledger/recognizer", + "openmeter/productcatalog/feature", + "openmeter/taxcode" + ], + "openmeter/billing/charges/service/subscription.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "pkg/models" + ], + "openmeter/billing/charges/service/taxcode_test.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/pagination", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/service/truncation_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/billing/charges/service/usagebased_test.go": [ + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog", + "pkg/clock", + "pkg/datetime", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/charges/statemachine/machine.go": [ + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/meta", + "pkg/models" + ], + "openmeter/billing/charges/statemachine/machine_test.go": [ + "openmeter/billing/charges/meta" + ], + "openmeter/billing/charges/testutils/handlers.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/testutils/service.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/lineengine", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/service", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service", + "openmeter/billing/rating/service", + "openmeter/ent/db", + "openmeter/ledger/recognizer", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "pkg/framework/lockr" + ], + "openmeter/billing/charges/usagebased/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/adapter/adapter.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/charges/usagebased/adapter/charge.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/charges/usagebased/adapter/creditallocation.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/adapter/detailedline.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/clock", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/adapter/detailedline_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/ent/db", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/productcatalog", + "openmeter/testutils", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil", + "tools/migrate" + ], + "openmeter/billing/charges/usagebased/adapter/invoicedusage.go": [ + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/usagebased", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/adapter/mapper.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/slicesx" + ], + "openmeter/billing/charges/usagebased/adapter/payment.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/chargeusagebasedrunpayment", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/adapter/realizationrun.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/framework/entutils" + ], + "openmeter/billing/charges/usagebased/charge.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models", + "pkg/ref" + ], + "openmeter/billing/charges/usagebased/detailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/detailedline_uniqueref.go": [ + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/handler.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/rating.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/ratingengine.go": [ + "pkg/models" + ], + "openmeter/billing/charges/usagebased/realizationrun.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/models/totals", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/realizationrun_test.go": [ + "openmeter/billing/models/totals", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/models/totals", + "openmeter/productcatalog/feature", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/create.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/creditheninvoice.go": [ + "openmeter/billing", + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/models", + "pkg/statelessx", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/creditheninvoice_test.go": [ + "openmeter/billing/charges/invoiceupdater", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/statemachine", + "openmeter/billing/charges/usagebased", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/creditsonly.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/productcatalog", + "pkg/statelessx" + ], + "openmeter/billing/charges/usagebased/service/currenttotals.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/customer", + "pkg/clock" + ], + "openmeter/billing/charges/usagebased/service/get.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/models/totals", + "openmeter/customer", + "pkg/clock", + "pkg/framework/transaction", + "pkg/ref", + "pkg/slicesx" + ], + "openmeter/billing/charges/usagebased/service/lineengine.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/clock", + "pkg/slicesx" + ], + "openmeter/billing/charges/usagebased/service/lineengine_test.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/linemapper.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/rating", + "openmeter/billing/rating/service/mutator", + "pkg/currencyx" + ], + "openmeter/billing/charges/usagebased/service/linemapper_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/payments.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/run" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/base_test.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/rating/service", + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/dynamic_test.go": [ + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/engine.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/subtract", + "openmeter/billing/rating", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/engine_test.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/package_test.go": [ + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/tieredgraduated_test.go": [ + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/tieredvolume_test.go": [ + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/uniquereferenceid.go": [ + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/usagebased/service/rating/delta/unit_test.go": [ + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/details.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/delta", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "openmeter/billing/models/totals", + "openmeter/productcatalog/feature", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/subtract", + "openmeter/billing/rating", + "openmeter/streaming", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/productcatalog", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/uniquereferenceid.go": [ + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "pkg/filter", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/service.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/delta", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/streaming" + ], + "openmeter/billing/charges/usagebased/service/rating/service_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating/testutils", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/streaming/testutils", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract_test.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/subtract/uniquereferenceid.go": [ + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/usagebased/service/rating/testutils/testutils.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/rating/totals.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/productcatalog/feature" + ], + "openmeter/billing/charges/usagebased/service/run/correct.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/usagebased", + "pkg/currencyx" + ], + "openmeter/billing/charges/usagebased/service/run/create.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/run/credits.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/usagebased", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/run/invoice.go": [ + "openmeter/billing", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/usagebased" + ], + "openmeter/billing/charges/usagebased/service/run/payment.go": [ + "openmeter/billing", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "pkg/clock" + ], + "openmeter/billing/charges/usagebased/service/run/payment_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/charges/usagebased/service/run/preview.go": [ + "openmeter/billing", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/run/service.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/service.go": [ + "openmeter/billing", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/billing/rating", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "pkg/framework/lockr" + ], + "openmeter/billing/charges/usagebased/service/statemachine.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/statemachine", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/service/rating", + "openmeter/billing/charges/usagebased/service/run", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/currencyx" + ], + "openmeter/billing/charges/usagebased/service/subscription.go": [ + "openmeter/billing/charges/usagebased", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service/triggers.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/charges/usagebased/service_test.go": [ + "openmeter/billing/charges/meta" + ], + "openmeter/billing/charges/usagebased/statemachine.go": [ + "openmeter/billing/charges/meta", + "pkg/models" + ], + "openmeter/billing/charges/worker/advance/advance.go": [ + "openmeter/billing/charges", + "openmeter/customer", + "pkg/pagination" + ], + "openmeter/billing/charges/worker/asyncadvance/asyncadvance.go": [ + "openmeter/billing/charges", + "openmeter/customer" + ], + "openmeter/billing/creditgrant/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/billing/creditgrant/noop.go": [ + "openmeter/billing/charges/creditpurchase", + "pkg/pagination" + ], + "openmeter/billing/creditgrant/service.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/creditgrant/service/service.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/creditgrant", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/commonhttp", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/billing/customer.go": [ + "openmeter/customer", + "openmeter/streaming", + "pkg/models" + ], + "openmeter/billing/customeroverride.go": [ + "openmeter/app", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/defaults.go": [ + "pkg/datetime" + ], + "openmeter/billing/derived.gen.go": [ + "openmeter/billing/models/creditsapplied", + "pkg/models" + ], + "openmeter/billing/discount.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/billing/errors.go": [ + "openmeter/app" + ], + "openmeter/billing/events.go": [ + "openmeter/app", + "openmeter/event/metadata" + ], + "openmeter/billing/eventsgathering.go": [ + "openmeter/event/metadata" + ], + "openmeter/billing/gatheringinvoice.go": [ + "api", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/currencyx", + "pkg/expand", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/billing/httpdriver/customeroverride.go": [ + "api", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/httpdriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/httpdriver/deprecations.go": [ + "api", + "openmeter/billing", + "openmeter/productcatalog", + "openmeter/productcatalog/http" + ], + "openmeter/billing/httpdriver/deprecations_test.go": [ + "api", + "openmeter/productcatalog/http" + ], + "openmeter/billing/httpdriver/discounts.go": [ + "api", + "openmeter/billing", + "openmeter/productcatalog/http" + ], + "openmeter/billing/httpdriver/errors.go": [ + "openmeter/billing", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "openmeter/billing/httpdriver/gatheringinvoice.go": [ + "api", + "openmeter/billing", + "openmeter/customer", + "openmeter/productcatalog/http", + "pkg/convert", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/httpdriver/handler.go": [ + "app/config", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/billing/httpdriver/invoice.go": [ + "api", + "openmeter/app/httpdriver", + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/customer/httpdriver", + "pkg/convert", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/billing/httpdriver/invoice_test.go": [ + "openmeter/billing", + "openmeter/billing/models/totals", + "openmeter/customer", + "pkg/clock", + "pkg/currencyx", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/httpdriver/invoiceline.go": [ + "api", + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/http", + "openmeter/streaming", + "pkg/clock", + "pkg/convert", + "pkg/currencyx", + "pkg/equal", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/set", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/httpdriver/profile.go": [ + "api", + "openmeter/app", + "openmeter/app/httpdriver", + "openmeter/billing", + "pkg/convert", + "pkg/datetime", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/invoice.go": [ + "api", + "openmeter/customer", + "pkg/clock", + "pkg/expand", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/invoicedetailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/invoicedetailedline_test.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/invoiceline.go": [ + "openmeter/productcatalog", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/invoicelinediscount.go": [ + "openmeter/billing/models/externalid", + "pkg/currencyx", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/billing/invoicelinesplitgroup.go": [ + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/invoicelinesplitgroup_test.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/billing/lineengine.go": [ + "openmeter/productcatalog/feature", + "pkg/timeutil" + ], + "openmeter/billing/lineengine/engine.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "pkg/clock" + ], + "openmeter/billing/lineengine/splitlinegroup.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/billing/lineengine/stdinvoice.go": [ + "openmeter/billing", + "openmeter/billing/service/invoicecalc" + ], + "openmeter/billing/lock.go": [ + "openmeter/customer" + ], + "openmeter/billing/models/creditsapplied/model.go": [ + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/models/stddetailedline/create.go": [ + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/billing/models/stddetailedline/derived.gen.go": [ + "openmeter/billing/models/creditsapplied", + "pkg/models" + ], + "openmeter/billing/models/stddetailedline/mapping.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/convert", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/models/stddetailedline/mixin.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/billing/models/stddetailedline/model.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/models/totals/model.go": [ + "pkg/currencyx" + ], + "openmeter/billing/models/totals/model_test.go": [ + "pkg/currencyx" + ], + "openmeter/billing/profile.go": [ + "api", + "openmeter/app", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/billing/rating/detailedline.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/rating/detailedline_test.go": [ + "openmeter/billing", + "pkg/currencyx" + ], + "openmeter/billing/rating/line.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/rating/service.go": [ + "openmeter/billing", + "openmeter/billing/models/totals", + "openmeter/productcatalog/feature", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/billableperiod.go": [ + "openmeter/billing/rating", + "openmeter/meter", + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/detailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/billing/rating/service/mutator/commitments.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/mutator/credits.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate" + ], + "openmeter/billing/rating/service/mutator/credits_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/billing/rating/service/mutator/discountpercentage.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "pkg/currencyx", + "pkg/slicesx" + ], + "openmeter/billing/rating/service/mutator/discountusage.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate" + ], + "openmeter/billing/rating/service/mutator/discountusage_test.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/mutator/types.go": [ + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate" + ], + "openmeter/billing/rating/service/options_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/pricer.go": [ + "openmeter/billing/rating", + "openmeter/billing/rating/service/mutator", + "openmeter/billing/rating/service/rate", + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/rate/base.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/streaming", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/rate/dynamic.go": [ + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/dynamic_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/flat.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/rate/flat_test.go": [ + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/package.go": [ + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/package_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/tiered.go": [ + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/rate/tieredgraduated.go": [ + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/billing/rating/service/rate/tieredgraduated_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/billing/rating/service/rate/tieredvolume.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/tieredvolume_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/rate", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/types.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "pkg/currencyx", + "pkg/timeutil" + ], + "openmeter/billing/rating/service/rate/unit.go": [ + "openmeter/billing/rating", + "openmeter/productcatalog" + ], + "openmeter/billing/rating/service/rate/unit_test.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service/testutil", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/billing/rating/service/service.go": [ + "openmeter/billing/rating" + ], + "openmeter/billing/rating/service/testutil/ubptest.go": [ + "openmeter/billing", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/rating/service", + "openmeter/productcatalog", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/seq.go": [ + "pkg/currencyx" + ], + "openmeter/billing/service.go": [ + "openmeter/app", + "openmeter/customer", + "pkg/pagination" + ], + "openmeter/billing/service/customeroverride.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/service/featuremeter.go": [ + "openmeter/billing", + "openmeter/productcatalog/feature", + "pkg/ref" + ], + "openmeter/billing/service/gatheringinvoice.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "openmeter/productcatalog/feature", + "pkg/framework/transaction", + "pkg/pagination" + ], + "openmeter/billing/service/gatheringinvoicependinglines.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "pkg/clock", + "pkg/currencyx", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/service/gatheringinvoicependinglines_test.go": [ + "openmeter/billing", + "pkg/datetime" + ], + "openmeter/billing/service/invoice.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "openmeter/customer", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/framework/transaction", + "pkg/timeutil" + ], + "openmeter/billing/service/invoice_test.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/service/invoiceapp.go": [ + "openmeter/billing", + "pkg/framework/transaction" + ], + "openmeter/billing/service/invoicecalc/calculator.go": [ + "openmeter/billing", + "openmeter/billing/rating", + "openmeter/productcatalog/feature", + "openmeter/taxcode" + ], + "openmeter/billing/service/invoicecalc/collectionat.go": [ + "openmeter/billing", + "pkg/timeutil" + ], + "openmeter/billing/service/invoicecalc/collectionat_test.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/billing/service/invoicecalc/details.go": [ + "openmeter/billing", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/productcatalog", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/service/invoicecalc/details_test.go": [ + "openmeter/billing", + "openmeter/billing/models/totals", + "openmeter/billing/testutils" + ], + "openmeter/billing/service/invoicecalc/discounts.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/draftuntil.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/dueat.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/gatheringrealtime.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/mock.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/period.go": [ + "openmeter/billing", + "pkg/timeutil" + ], + "openmeter/billing/service/invoicecalc/taxconfig.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/invoicecalc/taxconfig_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/billing/service/invoicelinesplitgroup.go": [ + "openmeter/billing", + "pkg/framework/transaction" + ], + "openmeter/billing/service/lineengine.go": [ + "openmeter/billing" + ], + "openmeter/billing/service/lineengine_test.go": [ + "openmeter/billing", + "openmeter/billing/testutils" + ], + "openmeter/billing/service/lock.go": [ + "openmeter/billing", + "openmeter/customer", + "pkg/framework/transaction" + ], + "openmeter/billing/service/profile.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/service/quantitysnapshot.go": [ + "openmeter/billing", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming" + ], + "openmeter/billing/service/seq.go": [ + "openmeter/billing", + "pkg/currencyx" + ], + "openmeter/billing/service/service.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/lineengine", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/service/stdinvoice.go": [ + "openmeter/billing", + "pkg/slicesx" + ], + "openmeter/billing/service/stdinvoiceline.go": [ + "api", + "openmeter/billing", + "openmeter/billing/service/invoicecalc", + "openmeter/customer", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/pagination", + "pkg/slicesx", + "pkg/sortx" + ], + "openmeter/billing/service/stdinvoicestate.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/service/invoicecalc", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/framework/transaction", + "pkg/statelessx" + ], + "openmeter/billing/service/taxcode.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/service/invoicecalc", + "openmeter/taxcode" + ], + "openmeter/billing/stdinvoice.go": [ + "openmeter/app", + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/customer", + "openmeter/streaming", + "pkg/currencyx", + "pkg/expand", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/stdinvoice_test.go": [ + "openmeter/billing/models/stddetailedline", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/stdinvoicecredits.go": [ + "openmeter/billing/models/creditsapplied" + ], + "openmeter/billing/stdinvoiceline.go": [ + "openmeter/billing/models/externalid", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "openmeter/streaming", + "pkg/currencyx", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/stdinvoiceline_test.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/taxconfig.go": [ + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/billing/testutils/lineengine.go": [ + "openmeter/billing" + ], + "openmeter/billing/validationissue.go": [ + "openmeter/app" + ], + "openmeter/billing/validators/customer/customer.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync", + "openmeter/customer", + "openmeter/subscription", + "pkg/filter" + ], + "openmeter/billing/validators/subscription/validator.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app", + "openmeter/subscription", + "pkg/models" + ], + "openmeter/billing/worker/advance/advance.go": [ + "openmeter/billing" + ], + "openmeter/billing/worker/asyncadvance/asyncadvance.go": [ + "openmeter/billing" + ], + "openmeter/billing/worker/collect/collect.go": [ + "openmeter/billing", + "openmeter/customer", + "pkg/filter" + ], + "openmeter/billing/worker/subscriptionsync/adapter.go": [ + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/adapter/adapter.go": [ + "openmeter/billing/worker/subscriptionsync", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/billing/worker/subscriptionsync/adapter/syncstate.go": [ + "openmeter/billing/worker/subscriptionsync", + "openmeter/ent/db", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionbillingsyncstate", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go": [ + "openmeter/billing/worker/subscriptionsync", + "openmeter/customer", + "openmeter/subscription", + "pkg/clock", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service.go": [ + "openmeter/billing", + "openmeter/subscription", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/base_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/customer", + "openmeter/ledger", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/featuregate", + "pkg/models", + "pkg/pagination", + "pkg/timeutil", + "test/billing" + ], + "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/subscription", + "openmeter/taxcode", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/handlers.go": [ + "openmeter/billing", + "openmeter/subscription", + "pkg/clock", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/streaming", + "openmeter/subscription", + "pkg/pagination", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/persistedstate/state.go": [ + "openmeter/billing" + ], + "openmeter/billing/worker/subscriptionsync/service/reconcile.go": [ + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/subscription", + "pkg/currencyx", + "pkg/framework/tracex" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/feehelper.go": [ + "openmeter/billing", + "openmeter/productcatalog" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/streaming", + "pkg/clock", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go": [ + "openmeter/billing", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog", + "pkg/featuregate", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go": [ + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/featuregate" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeflatfee.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeusagebased.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/productcatalog" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/streaming", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/streaming", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go": [ + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate" + ], + "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater", + "openmeter/billing/worker/subscriptionsync/service/targetstate", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/featuregate", + "pkg/slicesx" + ], + "openmeter/billing/worker/subscriptionsync/service/ref.go": [ + "openmeter/subscription", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/repair.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/billing/worker/subscriptionsync/service/targetstate" + ], + "openmeter/billing/worker/subscriptionsync/service/service.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/service/reconciler", + "openmeter/subscription", + "pkg/featuregate", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/billing/worker/subscriptionsync/service/sync.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/service/reconciler", + "openmeter/customer", + "openmeter/subscription", + "pkg/clock", + "pkg/convert", + "pkg/filter", + "pkg/framework/tracex", + "pkg/models", + "pkg/pagination" + ], + "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/billing/worker/subscriptionsync", + "openmeter/customer", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/resolvers", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/streaming", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "openmeter/taxcode", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/featuregate", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/sync_test.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/streaming", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go": [ + "openmeter/billing", + "openmeter/entitlement", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go": [ + "openmeter/productcatalog", + "openmeter/streaming", + "openmeter/subscription", + "pkg/framework/tracex", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go": [ + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync/service/persistedstate", + "openmeter/streaming", + "openmeter/subscription", + "pkg/framework/tracex", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/billing/worker/worker.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/worker/asyncadvance", + "openmeter/billing/worker/asyncadvance", + "openmeter/billing/worker/subscriptionsync", + "openmeter/subscription", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler", + "openmeter/watermill/router" + ], + "openmeter/billing/workflow.go": [ + "pkg/datetime" + ], + "openmeter/cost/adapter/adapter.go": [ + "openmeter/cost", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "pkg/currencyx", + "pkg/filter", + "pkg/models" + ], + "openmeter/cost/adapter/compute.go": [ + "openmeter/cost", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/currencyx" + ], + "openmeter/cost/adapter/compute_test.go": [ + "openmeter/cost", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/cost/service.go": [ + "openmeter/streaming", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/cost/service/service.go": [ + "openmeter/cost" + ], + "openmeter/credit/adapter/balance_snapshot.go": [ + "openmeter/credit/balance", + "openmeter/ent/db", + "openmeter/ent/db/balancesnapshot", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/credit/adapter/grant.go": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/ent/db", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "openmeter/ent/db/predicate", + "pkg/clock", + "pkg/convert", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/credit/adapter/transaction.go": [ + "openmeter/credit/grant", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/credit/balance.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "pkg/clock", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/balance/balance.go": [ + "openmeter/credit/grant" + ], + "openmeter/credit/balance/balance_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant" + ], + "openmeter/credit/balance/repository.go": [ + "pkg/models" + ], + "openmeter/credit/balance/service.go": [ + "openmeter/credit/grant", + "openmeter/streaming", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/balance/service_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "openmeter/streaming/testutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/balance/usage.go": [ + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/connector.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/streaming", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/framework/transaction" + ], + "openmeter/credit/driver/grant.go": [ + "api", + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement/driver", + "openmeter/entitlement/driver/v2", + "openmeter/entitlement/metered", + "openmeter/namespace/namespacedriver", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/strcase" + ], + "openmeter/credit/engine/burnphase.go": [ + "openmeter/credit/grant", + "pkg/timeutil" + ], + "openmeter/credit/engine/engine.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/meter", + "pkg/timeutil" + ], + "openmeter/credit/engine/engine_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "openmeter/streaming/testutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/engine/grant.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "pkg/timeutil" + ], + "openmeter/credit/engine/history.go": [ + "openmeter/credit/balance", + "pkg/timeutil" + ], + "openmeter/credit/engine/history_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "pkg/timeutil" + ], + "openmeter/credit/engine/reset.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant" + ], + "openmeter/credit/engine/reset_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "openmeter/streaming/testutils", + "openmeter/testutils", + "pkg/timeutil" + ], + "openmeter/credit/engine/run.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/meter", + "pkg/timeutil" + ], + "openmeter/credit/engine/run_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "openmeter/streaming/testutils", + "pkg/timeutil" + ], + "openmeter/credit/engine/runresult_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "openmeter/streaming/testutils", + "pkg/timeutil" + ], + "openmeter/credit/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/credit/grant.go": [ + "openmeter/credit/grant", + "pkg/clock", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/grant/events.go": [ + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/subject", + "openmeter/watermill/marshaler" + ], + "openmeter/credit/grant/events_2.go": [ + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/streaming", + "openmeter/watermill/marshaler", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/grant/grant.go": [ + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/grant/grant_test.go": [ + "openmeter/credit/grant", + "pkg/clock", + "pkg/models" + ], + "openmeter/credit/grant/owner_connector.go": [ + "openmeter/meter", + "openmeter/streaming", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/grant/repo.go": [ + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/credit/helper.go": [ + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/meter", + "openmeter/streaming", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/credit/hook/entitlement_hook.go": [ + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "pkg/models" + ], + "openmeter/credit/trace.go": [ + "openmeter/credit/engine", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/currencies/adapter.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/currencies/adapter/adapter.go": [ + "openmeter/currencies", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/currencies/adapter/currencies.go": [ + "openmeter/currencies", + "openmeter/ent/db", + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "pkg/currencyx", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/currencies/models.go": [ + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/currencies/service.go": [ + "pkg/pagination" + ], + "openmeter/currencies/service/service.go": [ + "openmeter/currencies", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/currencies/service/service_test.go": [ + "openmeter/currencies", + "pkg/filter", + "pkg/framework/transaction", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/customer/adapter.go": [ + "openmeter/streaming", + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/customer/adapter/adapter.go": [ + "openmeter/customer", + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/customer/adapter/customer.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/plan", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/streaming", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/customer/adapter/customer_test.go": [ + "openmeter/app", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/ent/db", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/testutils", + "pkg/clock", + "pkg/models" + ], + "openmeter/customer/adapter/entitymapping.go": [ + "openmeter/customer", + "openmeter/ent/db", + "pkg/models" + ], + "openmeter/customer/app/app.go": [ + "openmeter/app", + "openmeter/customer", + "pkg/models" + ], + "openmeter/customer/customer.go": [ + "openmeter/streaming", + "pkg/clock", + "pkg/currencyx", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/customer/errors.go": [ + "pkg/models" + ], + "openmeter/customer/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/customer/httpdriver/apimapping.go": [ + "api", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/driver", + "openmeter/entitlement/metered", + "openmeter/productcatalog/subscription/http", + "openmeter/subscription", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/customer/httpdriver/customer.go": [ + "api", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/driver", + "openmeter/subscription", + "pkg/clock", + "pkg/defaultx", + "pkg/filter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/customer/httpdriver/handler.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/namespace/namespacedriver", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/customer/service.go": [ + "openmeter/streaming", + "pkg/models", + "pkg/pagination" + ], + "openmeter/customer/service/customer.go": [ + "openmeter/customer", + "openmeter/streaming", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/customer/service/hooks/entitlementvalidator.go": [ + "openmeter/customer", + "openmeter/entitlement", + "pkg/clock", + "pkg/models" + ], + "openmeter/customer/service/hooks/subjectcustomer.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/customer", + "openmeter/subject", + "openmeter/subject/service/hooks", + "pkg/clock", + "pkg/models" + ], + "openmeter/customer/service/hooks/subjectcustomer_test.go": [ + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/meter/mockadapter", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "openmeter/customer/service/ledger_hook_test.go": [ + "openmeter/customer", + "openmeter/customer/testutils", + "openmeter/ledger", + "openmeter/ledger/resolvers", + "openmeter/ledger/testutils", + "pkg/models" + ], + "openmeter/customer/service/requestvalidator.go": [ + "openmeter/customer" + ], + "openmeter/customer/service/service.go": [ + "openmeter/customer", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "openmeter/customer/service/service_test.go": [ + "openmeter/customer", + "openmeter/customer/testutils", + "pkg/models" + ], + "openmeter/customer/testutils/env.go": [ + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/meter/mockadapter", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus" + ], + "openmeter/debug/debug.go": [ + "openmeter/streaming" + ], + "openmeter/debug/httpdriver/metrics.go": [ + "openmeter/debug", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/dedupe/memorydedupe/memorydedupe.go": [ + "openmeter/dedupe" + ], + "openmeter/dedupe/memorydedupe/memorydedupe_test.go": [ + "openmeter/dedupe", + "openmeter/dedupe/memorydedupe" + ], + "openmeter/dedupe/redisdedupe/redisdedupe.go": [ + "openmeter/dedupe" + ], + "openmeter/ent/db/addon.go": [ + "openmeter/ent/db/addon", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/addon/addon.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/addon/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog" + ], + "openmeter/ent/db/addon_create.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/subscriptionaddon", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/addon_delete.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/addon_query.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddon" + ], + "openmeter/ent/db/addon_update.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddon", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/addonratecard.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/feature", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/addonratecard/addonratecard.go": [ + "openmeter/productcatalog" + ], + "openmeter/ent/db/addonratecard/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/addonratecard_create.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/feature", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/addonratecard_delete.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/addonratecard_query.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/addonratecard_update.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/app.go": [ + "openmeter/app", + "openmeter/ent/db/app" + ], + "openmeter/ent/db/app/where.go": [ + "openmeter/app", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/app_create.go": [ + "openmeter/app", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile" + ], + "openmeter/ent/db/app_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/app" + ], + "openmeter/ent/db/app_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/app_update.go": [ + "openmeter/app", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustomer.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appcustomer/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustomer_create.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appcustomer_delete.go": [ + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustomer_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustomer_update.go": [ + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicing.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustominvoicing" + ], + "openmeter/ent/db/appcustominvoicing/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicing_create.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer" + ], + "openmeter/ent/db/appcustominvoicing_delete.go": [ + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicing_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicing_update.go": [ + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicingcustomer.go": [ + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appcustominvoicingcustomer/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicingcustomer_create.go": [ + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appcustominvoicingcustomer_delete.go": [ + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicingcustomer_query.go": [ + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appcustominvoicingcustomer_update.go": [ + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripe.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appstripe" + ], + "openmeter/ent/db/appstripe/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripe_create.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer" + ], + "openmeter/ent/db/appstripe_delete.go": [ + "openmeter/ent/db/appstripe", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripe_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripe_update.go": [ + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripecustomer.go": [ + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appstripecustomer/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripecustomer_create.go": [ + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/customer" + ], + "openmeter/ent/db/appstripecustomer_delete.go": [ + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripecustomer_query.go": [ + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/appstripecustomer_update.go": [ + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/balancesnapshot.go": [ + "openmeter/credit/balance", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/entitlement" + ], + "openmeter/ent/db/balancesnapshot/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/balancesnapshot_create.go": [ + "openmeter/credit/balance", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/entitlement" + ], + "openmeter/ent/db/balancesnapshot_delete.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/balancesnapshot_query.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/balancesnapshot_update.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomerlock.go": [ + "openmeter/ent/db/billingcustomerlock" + ], + "openmeter/ent/db/billingcustomerlock/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomerlock_create.go": [ + "openmeter/ent/db/billingcustomerlock" + ], + "openmeter/ent/db/billingcustomerlock_delete.go": [ + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomerlock_query.go": [ + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomerlock_update.go": [ + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomeroverride.go": [ + "openmeter/billing", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/customer", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go": [ + "openmeter/billing", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billingcustomeroverride/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingcustomeroverride_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/customer", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingcustomeroverride_delete.go": [ + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingcustomeroverride_query.go": [ + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/billingcustomeroverride_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billinginvoice.go": [ + "openmeter/billing", + "openmeter/ent/db/app", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billinginvoice/billinginvoice.go": [ + "openmeter/billing" + ], + "openmeter/ent/db/billinginvoice/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billinginvoice_create.go": [ + "openmeter/billing", + "openmeter/ent/db/app", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billinginvoice_delete.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoice_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoice_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/predicate", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go": [ + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go": [ + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/predicate", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceline.go": [ + "openmeter/billing", + "openmeter/billing/models/creditsapplied", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go": [ + "openmeter/billing", + "openmeter/billing/models/creditsapplied", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceline/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/billinginvoiceline_create.go": [ + "openmeter/billing", + "openmeter/billing/models/creditsapplied", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billinginvoiceline_delete.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoiceline_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/billinginvoiceline_update.go": [ + "openmeter/billing", + "openmeter/billing/models/creditsapplied", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/billinginvoicelinediscount.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount" + ], + "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go": [ + "openmeter/billing" + ], + "openmeter/ent/db/billinginvoicelinediscount/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelinediscount_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount" + ], + "openmeter/ent/db/billinginvoicelinediscount_delete.go": [ + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelinediscount_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelinediscount_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelineusagediscount.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelineusagediscount" + ], + "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go": [ + "openmeter/billing" + ], + "openmeter/ent/db/billinginvoicelineusagediscount/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelineusagediscount_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelineusagediscount" + ], + "openmeter/ent/db/billinginvoicelineusagediscount_delete.go": [ + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelineusagediscount_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicelineusagediscount_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go": [ + "openmeter/billing", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go": [ + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/billinginvoicesplitlinegroup_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go": [ + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go": [ + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go": [ + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go": [ + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go": [ + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go": [ + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/predicate", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billinginvoicevalidationissue.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoicevalidationissue" + ], + "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go": [ + "openmeter/billing" + ], + "openmeter/ent/db/billinginvoicevalidationissue/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicevalidationissue_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoicevalidationissue" + ], + "openmeter/ent/db/billinginvoicevalidationissue_delete.go": [ + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicevalidationissue_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicevalidationissue_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel.go": [ + "openmeter/ent/db/billinginvoicewriteschemalevel" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel_create.go": [ + "openmeter/ent/db/billinginvoicewriteschemalevel" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go": [ + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel_query.go": [ + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billinginvoicewriteschemalevel_update.go": [ + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingprofile.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "pkg/models" + ], + "openmeter/ent/db/billingprofile/where.go": [ + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/billingprofile_create.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "pkg/models" + ], + "openmeter/ent/db/billingprofile_delete.go": [ + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingprofile_query.go": [ + "openmeter/ent/db/app", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingprofile_update.go": [ + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/billingsequencenumbers.go": [ + "openmeter/ent/db/billingsequencenumbers" + ], + "openmeter/ent/db/billingsequencenumbers/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingsequencenumbers_create.go": [ + "openmeter/ent/db/billingsequencenumbers" + ], + "openmeter/ent/db/billingsequencenumbers_delete.go": [ + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingsequencenumbers_query.go": [ + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingsequencenumbers_update.go": [ + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline/where.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline_create.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go": [ + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/billingstandardinvoicedetailedline_update.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go": [ + "openmeter/billing", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go": [ + "openmeter/billing" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go": [ + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go": [ + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingworkflowconfig.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go": [ + "openmeter/billing", + "openmeter/productcatalog" + ], + "openmeter/ent/db/billingworkflowconfig/where.go": [ + "openmeter/billing", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingworkflowconfig_create.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/billingworkflowconfig_delete.go": [ + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/billingworkflowconfig_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/billingworkflowconfig_update.go": [ + "openmeter/billing", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/charge.go": [ + "openmeter/billing/charges/meta", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased" + ], + "openmeter/ent/db/charge/where.go": [ + "openmeter/billing/charges/meta", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/charge_create.go": [ + "openmeter/billing/charges/meta", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/creditrealizationlineage" + ], + "openmeter/ent/db/charge_delete.go": [ + "openmeter/ent/db/charge", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/charge_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/charge_update.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/charge", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchase.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/customer", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargecreditpurchase/where.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargecreditpurchase_create.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/customer", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchase_delete.go": [ + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchase_query.go": [ + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/chargecreditpurchase_update.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant.go": [ + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go": [ + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go": [ + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go": [ + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go": [ + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go": [ + "openmeter/billing/charges/models/payment" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go": [ + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go": [ + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go": [ + "openmeter/billing/charges/models/payment" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "pkg/models" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go": [ + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfee.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfee/chargeflatfee.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargeflatfee/where.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargeflatfee_create.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfee_delete.go": [ + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfee_query.go": [ + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/chargeflatfee_update.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerun.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment" + ], + "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go": [ + "openmeter/billing/charges/flatfee" + ], + "openmeter/ent/db/chargeflatfeerun/where.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerun_create.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment" + ], + "openmeter/ent/db/chargeflatfeerun_delete.go": [ + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerun_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerun_update.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go": [ + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerundetailedline.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargeflatfeerundetailedline/where.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargeflatfeerundetailedline_create.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerundetailedline_delete.go": [ + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerundetailedline_query.go": [ + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/chargeflatfeerundetailedline_update.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage.go": [ + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go": [ + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go": [ + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go": [ + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go": [ + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerunpayment.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerunpayment", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go": [ + "openmeter/billing/charges/models/payment" + ], + "openmeter/ent/db/chargeflatfeerunpayment/where.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerunpayment_create.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerunpayment", + "pkg/models" + ], + "openmeter/ent/db/chargeflatfeerunpayment_delete.go": [ + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerunpayment_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeflatfeerunpayment_update.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargessearchv1.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/ent/db/chargessearchv1", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargessearchv1/chargessearchv1.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargessearchv1/where.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargessearchv1_query.go": [ + "openmeter/ent/db/chargessearchv1", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebased.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebased/chargeusagebased.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargeusagebased/where.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargeusagebased_create.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebased_delete.go": [ + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebased_query.go": [ + "openmeter/ent/db/charge", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/customer", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/chargeusagebased_update.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go": [ + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go": [ + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go": [ + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline/where.go": [ + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline_create.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go": [ + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline_query.go": [ + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/chargeusagebasedrundetailedline_update.go": [ + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage.go": [ + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go": [ + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go": [ + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go": [ + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go": [ + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrunpayment.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go": [ + "openmeter/billing/charges/models/payment" + ], + "openmeter/ent/db/chargeusagebasedrunpayment/where.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedrunpayment_create.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedrunpayment_delete.go": [ + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedrunpayment_query.go": [ + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedrunpayment_update.go": [ + "openmeter/billing/charges/models/payment", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/chargeusagebasedruns.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/feature" + ], + "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go": [ + "openmeter/billing/charges/usagebased" + ], + "openmeter/ent/db/chargeusagebasedruns/where.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruns_create.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/feature" + ], + "openmeter/ent/db/chargeusagebasedruns_delete.go": [ + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruns_query.go": [ + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/feature", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/chargeusagebasedruns_update.go": [ + "openmeter/billing/charges/usagebased", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/client.go": [ + "openmeter/ent/db/migrate", + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/meter", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subject", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/ent/db/usagereset" + ], + "openmeter/ent/db/creditrealizationlineage.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/charge", + "openmeter/ent/db/creditrealizationlineage", + "pkg/currencyx" + ], + "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/ent/db/creditrealizationlineage/where.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/predicate", + "pkg/currencyx" + ], + "openmeter/ent/db/creditrealizationlineage_create.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/charge", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "pkg/currencyx" + ], + "openmeter/ent/db/creditrealizationlineage_delete.go": [ + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineage_query.go": [ + "openmeter/ent/db/charge", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineage_update.go": [ + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineagesegment.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment" + ], + "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go": [ + "openmeter/billing/charges/models/creditrealization" + ], + "openmeter/ent/db/creditrealizationlineagesegment/where.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineagesegment_create.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment" + ], + "openmeter/ent/db/creditrealizationlineagesegment_delete.go": [ + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineagesegment_query.go": [ + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/creditrealizationlineagesegment_update.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/currencycostbasis.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "pkg/currencyx" + ], + "openmeter/ent/db/currencycostbasis/where.go": [ + "openmeter/ent/db/predicate", + "pkg/currencyx" + ], + "openmeter/ent/db/currencycostbasis_create.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "pkg/currencyx" + ], + "openmeter/ent/db/currencycostbasis_delete.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/currencycostbasis_query.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/currencycostbasis_update.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/cursor.go": [ + "pkg/pagination/v2" + ], + "openmeter/ent/db/customcurrency.go": [ + "openmeter/ent/db/customcurrency" + ], + "openmeter/ent/db/customcurrency/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customcurrency_create.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency" + ], + "openmeter/ent/db/customcurrency_delete.go": [ + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customcurrency_query.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customcurrency_update.go": [ + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customer.go": [ + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/customer", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/customer/where.go": [ + "openmeter/ent/db/predicate", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/customer_create.go": [ + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/subscription", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/customer_delete.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customer_query.go": [ + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription" + ], + "openmeter/ent/db/customer_update.go": [ + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/customersubjects.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects" + ], + "openmeter/ent/db/customersubjects/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customersubjects_create.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects" + ], + "openmeter/ent/db/customersubjects_delete.go": [ + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customersubjects_query.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/customersubjects_update.go": [ + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ent.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargessearchv1", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/meter", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subject", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/ent/db/usagereset" + ], + "openmeter/ent/db/entitlement.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/entitlement/entitlement.go": [ + "pkg/models" + ], + "openmeter/ent/db/entitlement/where.go": [ + "openmeter/ent/db/predicate", + "pkg/datetime" + ], + "openmeter/ent/db/entitlement_create.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/customer", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/usagereset", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/entitlement_delete.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/entitlement_query.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/customer", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/usagereset" + ], + "openmeter/ent/db/entitlement_update.go": [ + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/usagereset", + "pkg/models" + ], + "openmeter/ent/db/entmixinaccessor.go": [ + "openmeter/billing", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/payment", + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/enttest/enttest.go": [ + "openmeter/ent/db", + "openmeter/ent/db/runtime", + "openmeter/ent/db/migrate" + ], + "openmeter/ent/db/expose.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/db/feature.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/productcatalog/feature" + ], + "openmeter/ent/db/feature/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/feature_create.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/planratecard", + "openmeter/productcatalog/feature" + ], + "openmeter/ent/db/feature_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/feature" + ], + "openmeter/ent/db/feature_query.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/feature_update.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/productcatalog/feature" + ], + "openmeter/ent/db/grant.go": [ + "openmeter/credit/grant", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/grant/where.go": [ + "openmeter/ent/db/predicate", + "pkg/datetime" + ], + "openmeter/ent/db/grant_create.go": [ + "openmeter/credit/grant", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/grant_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/grant" + ], + "openmeter/ent/db/grant_query.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/grant", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/grant_update.go": [ + "openmeter/ent/db/grant", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/hook/hook.go": [ + "openmeter/ent/db" + ], + "openmeter/ent/db/ledgeraccount.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ent/db/ledgeraccount/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgeraccount_create.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ent/db/ledgeraccount_delete.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgeraccount_query.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgeraccount_update.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/ledgerbreakagerecord.go": [ + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go": [ + "openmeter/ledger" + ], + "openmeter/ent/db/ledgerbreakagerecord/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ent/db/ledgerbreakagerecord_create.go": [ + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ent/db/ledgerbreakagerecord_delete.go": [ + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerbreakagerecord_query.go": [ + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerbreakagerecord_update.go": [ + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/ledgercustomeraccount.go": [ + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgercustomeraccount/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgercustomeraccount_create.go": [ + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgercustomeraccount_delete.go": [ + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgercustomeraccount_query.go": [ + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgercustomeraccount_update.go": [ + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerentry.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgertransaction", + "pkg/models" + ], + "openmeter/ent/db/ledgerentry/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerentry_create.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgertransaction", + "pkg/models" + ], + "openmeter/ent/db/ledgerentry_delete.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerentry_query.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgerentry_update.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/ledgersubaccount.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "pkg/models" + ], + "openmeter/ent/db/ledgersubaccount/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgersubaccount_create.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "pkg/models" + ], + "openmeter/ent/db/ledgersubaccount_delete.go": [ + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgersubaccount_query.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgersubaccount_update.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/ledgersubaccountroute.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgersubaccountroute/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgersubaccountroute_create.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ledger" + ], + "openmeter/ent/db/ledgersubaccountroute_delete.go": [ + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgersubaccountroute_query.go": [ + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgersubaccountroute_update.go": [ + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransaction.go": [ + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "pkg/models" + ], + "openmeter/ent/db/ledgertransaction/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransaction_create.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "pkg/models" + ], + "openmeter/ent/db/ledgertransaction_delete.go": [ + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransaction_query.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransaction_update.go": [ + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/ledgertransactiongroup.go": [ + "openmeter/ent/db/ledgertransactiongroup", + "pkg/models" + ], + "openmeter/ent/db/ledgertransactiongroup/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransactiongroup_create.go": [ + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "pkg/models" + ], + "openmeter/ent/db/ledgertransactiongroup_delete.go": [ + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransactiongroup_query.go": [ + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/ledgertransactiongroup_update.go": [ + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/llmcostprice.go": [ + "openmeter/ent/db/llmcostprice", + "openmeter/llmcost" + ], + "openmeter/ent/db/llmcostprice/llmcostprice.go": [ + "openmeter/llmcost" + ], + "openmeter/ent/db/llmcostprice/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/llmcostprice_create.go": [ + "openmeter/ent/db/llmcostprice", + "openmeter/llmcost" + ], + "openmeter/ent/db/llmcostprice_delete.go": [ + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/llmcostprice_query.go": [ + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/llmcostprice_update.go": [ + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/predicate", + "openmeter/llmcost" + ], + "openmeter/ent/db/meter.go": [ + "openmeter/ent/db/meter", + "openmeter/meter", + "pkg/models" + ], + "openmeter/ent/db/meter/meter.go": [ + "openmeter/meter" + ], + "openmeter/ent/db/meter/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/meter" + ], + "openmeter/ent/db/meter_create.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/meter", + "pkg/models" + ], + "openmeter/ent/db/meter_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/meter" + ], + "openmeter/ent/db/meter_query.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/meter_update.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/mutation.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/creditsapplied", + "openmeter/billing/models/stddetailedline", + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/meter", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subject", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/ent/db/usagereset", + "openmeter/ledger", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/taxcode", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/notificationchannel.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationchannel/notificationchannel.go": [ + "openmeter/notification" + ], + "openmeter/ent/db/notificationchannel/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/notification" + ], + "openmeter/ent/db/notificationchannel_create.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationchannel_delete.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationchannel_query.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationchannel_update.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationevent.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationevent/notificationevent.go": [ + "openmeter/notification" + ], + "openmeter/ent/db/notificationevent/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/notification" + ], + "openmeter/ent/db/notificationevent_create.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationevent_delete.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationevent_query.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationevent_update.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/notificationeventdeliverystatus.go": [ + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go": [ + "openmeter/notification" + ], + "openmeter/ent/db/notificationeventdeliverystatus/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/notification" + ], + "openmeter/ent/db/notificationeventdeliverystatus_create.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationeventdeliverystatus_delete.go": [ + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationeventdeliverystatus_query.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationeventdeliverystatus_update.go": [ + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/predicate", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationrule.go": [ + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationrule/notificationrule.go": [ + "openmeter/notification" + ], + "openmeter/ent/db/notificationrule/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/notification" + ], + "openmeter/ent/db/notificationrule_create.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/notificationrule_delete.go": [ + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationrule_query.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/notificationrule_update.go": [ + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/predicate", + "openmeter/notification", + "pkg/models" + ], + "openmeter/ent/db/organizationdefaulttaxcodes.go": [ + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/organizationdefaulttaxcodes/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/organizationdefaulttaxcodes_create.go": [ + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/organizationdefaulttaxcodes_delete.go": [ + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/organizationdefaulttaxcodes_query.go": [ + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/organizationdefaulttaxcodes_update.go": [ + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/paginate.go": [ + "pkg/pagination" + ], + "openmeter/ent/db/plan.go": [ + "openmeter/ent/db/plan", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/plan/plan.go": [ + "openmeter/productcatalog" + ], + "openmeter/ent/db/plan/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/plan_create.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/subscription", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/plan_delete.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/plan_query.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription" + ], + "openmeter/ent/db/plan_update.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/planaddon.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "pkg/models" + ], + "openmeter/ent/db/planaddon/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planaddon_create.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "pkg/models" + ], + "openmeter/ent/db/planaddon_delete.go": [ + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planaddon_query.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planaddon_update.go": [ + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate", + "pkg/models" + ], + "openmeter/ent/db/planphase.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "pkg/datetime" + ], + "openmeter/ent/db/planphase/where.go": [ + "openmeter/ent/db/predicate", + "pkg/datetime" + ], + "openmeter/ent/db/planphase_create.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "pkg/datetime" + ], + "openmeter/ent/db/planphase_delete.go": [ + "openmeter/ent/db/planphase", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planphase_query.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planphase_update.go": [ + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "pkg/datetime" + ], + "openmeter/ent/db/planratecard.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/planratecard/planratecard.go": [ + "openmeter/productcatalog" + ], + "openmeter/ent/db/planratecard/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/planratecard_create.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/planratecard_delete.go": [ + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/planratecard_query.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/planratecard_update.go": [ + "openmeter/ent/db/feature", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/runtime.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/models/creditsapplied", + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/app", + "openmeter/ent/db/appcustomer", + "openmeter/ent/db/appcustominvoicing", + "openmeter/ent/db/appcustominvoicingcustomer", + "openmeter/ent/db/appstripe", + "openmeter/ent/db/appstripecustomer", + "openmeter/ent/db/balancesnapshot", + "openmeter/ent/db/billingcustomerlock", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoice", + "openmeter/ent/db/billinginvoiceflatfeelineconfig", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicelinediscount", + "openmeter/ent/db/billinginvoicelineusagediscount", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/ent/db/billinginvoicevalidationissue", + "openmeter/ent/db/billinginvoicewriteschemalevel", + "openmeter/ent/db/billingprofile", + "openmeter/ent/db/billingsequencenumbers", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/charge", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargecreditpurchasecreditgrant", + "openmeter/ent/db/chargecreditpurchaseexternalpayment", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerun", + "openmeter/ent/db/chargeflatfeeruncreditallocations", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeflatfeeruninvoicedusage", + "openmeter/ent/db/chargeflatfeerunpayment", + "openmeter/ent/db/chargessearchv1", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedruncreditallocations", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/chargeusagebasedruninvoicedusage", + "openmeter/ent/db/chargeusagebasedrunpayment", + "openmeter/ent/db/chargeusagebasedruns", + "openmeter/ent/db/creditrealizationlineage", + "openmeter/ent/db/creditrealizationlineagesegment", + "openmeter/ent/db/currencycostbasis", + "openmeter/ent/db/customcurrency", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/grant", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/llmcostprice", + "openmeter/ent/db/meter", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subject", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/ent/db/usagereset", + "openmeter/ent/schema", + "openmeter/llmcost", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/ent/db/setorclear.go": [ + "openmeter/billing", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/models/creditsapplied", + "openmeter/llmcost", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/taxcode", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subject.go": [ + "openmeter/ent/db/subject" + ], + "openmeter/ent/db/subject/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/subject_create.go": [ + "openmeter/ent/db/subject" + ], + "openmeter/ent/db/subject_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subject" + ], + "openmeter/ent/db/subject_query.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subject" + ], + "openmeter/ent/db/subject_update.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subject" + ], + "openmeter/ent/db/subscription.go": [ + "openmeter/ent/db/customer", + "openmeter/ent/db/plan", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscription/subscription.go": [ + "openmeter/productcatalog" + ], + "openmeter/ent/db/subscription/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime" + ], + "openmeter/ent/db/subscription_create.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/customer", + "openmeter/ent/db/plan", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionphase", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscription_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription" + ], + "openmeter/ent/db/subscription_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/customer", + "openmeter/ent/db/plan", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/subscription_update.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/plan", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionbillingsyncstate", + "openmeter/ent/db/subscriptionphase", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscriptionaddon.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon" + ], + "openmeter/ent/db/subscriptionaddon/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/subscriptionaddon_create.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddon_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddon" + ], + "openmeter/ent/db/subscriptionaddon_query.go": [ + "openmeter/ent/db/addon", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddon_update.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddonquantity.go": [ + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddonquantity/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/subscriptionaddonquantity_create.go": [ + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddonquantity_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddonquantity_query.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionaddonquantity_update.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionaddonquantity" + ], + "openmeter/ent/db/subscriptionbillingsyncstate.go": [ + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionbillingsyncstate" + ], + "openmeter/ent/db/subscriptionbillingsyncstate/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/subscriptionbillingsyncstate_create.go": [ + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionbillingsyncstate" + ], + "openmeter/ent/db/subscriptionbillingsyncstate_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionbillingsyncstate" + ], + "openmeter/ent/db/subscriptionbillingsyncstate_query.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionbillingsyncstate" + ], + "openmeter/ent/db/subscriptionbillingsyncstate_update.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionbillingsyncstate" + ], + "openmeter/ent/db/subscriptionitem.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscriptionitem/subscriptionitem.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/ent/db/subscriptionitem/where.go": [ + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/db/subscriptionitem_create.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscriptionitem_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem" + ], + "openmeter/ent/db/subscriptionitem_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/subscriptionitem_update.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/subscriptionphase.go": [ + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/subscriptionphase/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/subscriptionphase_create.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/subscriptionphase_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/subscriptionphase_query.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/subscriptionphase_update.go": [ + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase" + ], + "openmeter/ent/db/taxcode.go": [ + "openmeter/ent/db/taxcode", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/ent/db/taxcode/taxcode.go": [ + "openmeter/taxcode" + ], + "openmeter/ent/db/taxcode/where.go": [ + "openmeter/ent/db/predicate" + ], + "openmeter/ent/db/taxcode_create.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/ent/db/taxcode_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/taxcode_query.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode" + ], + "openmeter/ent/db/taxcode_update.go": [ + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/billingcustomeroverride", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billinginvoicesplitlinegroup", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/ent/db/billingworkflowconfig", + "openmeter/ent/db/chargecreditpurchase", + "openmeter/ent/db/chargeflatfee", + "openmeter/ent/db/chargeflatfeerundetailedline", + "openmeter/ent/db/chargeusagebased", + "openmeter/ent/db/chargeusagebasedrundetailedline", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/taxcode", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/ent/db/usagereset.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/usagereset", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/usagereset/where.go": [ + "openmeter/ent/db/predicate", + "pkg/datetime" + ], + "openmeter/ent/db/usagereset_create.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/usagereset", + "pkg/datetime", + "pkg/models" + ], + "openmeter/ent/db/usagereset_delete.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/usagereset" + ], + "openmeter/ent/db/usagereset_query.go": [ + "openmeter/ent/db/entitlement", + "openmeter/ent/db/predicate", + "openmeter/ent/db/usagereset" + ], + "openmeter/ent/db/usagereset_update.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/usagereset", + "pkg/models" + ], + "openmeter/ent/entc.go": [ + "pkg/framework/entutils/entcursor", + "pkg/framework/entutils/entexpose", + "pkg/framework/entutils/entmixinaccessor", + "pkg/framework/entutils/entpaginate", + "pkg/framework/entutils/entsetorclear", + "tools/migrate/viewgen" + ], + "openmeter/ent/schema/addon.go": [ + "openmeter/productcatalog", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ent/schema/app.go": [ + "openmeter/app", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/app_stripe.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/appcustominvoicing.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/balance_snapshot.go": [ + "openmeter/credit/balance", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/billing.go": [ + "openmeter/billing", + "openmeter/billing/models/externalid", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/charges.go": [ + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/chargemeta", + "pkg/clock", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/chargescreditpurchase.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/payment", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/chargesflatfee.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/chargesusagebased.go": [ + "openmeter/billing/charges/models/chargemeta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/productcatalog", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/creditrealizationlineage.go": [ + "openmeter/billing/charges/models/creditrealization", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/custom_currencies.go": [ + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/customer.go": [ + "pkg/clock", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/entitlement.go": [ + "openmeter/entitlement", + "pkg/datetime", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ent/schema/feature.go": [ + "openmeter/productcatalog/feature", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/grant.go": [ + "openmeter/credit/grant", + "pkg/datetime", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_account.go": [ + "openmeter/ledger", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_breakage_record.go": [ + "openmeter/ledger", + "pkg/currencyx", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_customer_account.go": [ + "openmeter/ledger", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_entry.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_transaction.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ledger_transaction_group.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/llmcostprice.go": [ + "openmeter/llmcost", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/meter.go": [ + "openmeter/meter", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/notification.go": [ + "openmeter/notification", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ent/schema/organizationdefaulttaxcodes.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/planaddon.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/productcatalog.go": [ + "openmeter/productcatalog", + "pkg/datetime", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/ratecard.go": [ + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/ent/schema/subject.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/subscription.go": [ + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ent/schema/subscription_addon.go": [ + "pkg/clock", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/subscriptionbillingsync.go": [ + "pkg/framework/entutils" + ], + "openmeter/ent/schema/taxcode.go": [ + "openmeter/productcatalog", + "openmeter/taxcode", + "pkg/framework/entutils" + ], + "openmeter/ent/schema/usage_reset.go": [ + "pkg/datetime", + "pkg/framework/entutils" + ], + "openmeter/ent/tx/enttx.go": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/entitlement/adapter/entitlement.go": [ + "openmeter/customer/adapter", + "openmeter/ent/db", + "openmeter/ent/db/customer", + "openmeter/ent/db/customersubjects", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/predicate", + "openmeter/ent/db/usagereset", + "openmeter/entitlement", + "openmeter/entitlement/balanceworker", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/entitlement/adapter/entitlement_test.go": [ + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/balanceworker", + "openmeter/entitlement/boolean", + "openmeter/entitlement/metered", + "openmeter/entitlement/static", + "openmeter/meter", + "openmeter/meter/adapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "pkg/clock", + "pkg/models", + "pkg/pagination/v2", + "pkg/timeutil" + ], + "openmeter/entitlement/adapter/transaction.go": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/entitlement/adapter/usage_reset.go": [ + "openmeter/ent/db", + "openmeter/entitlement/metered", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/entitlement/balanceworker/entitlementhandler.go": [ + "openmeter/entitlement", + "openmeter/entitlement/balanceworker/filters", + "openmeter/entitlement/driver", + "openmeter/entitlement/snapshot", + "openmeter/event/metadata", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/productcatalog/feature", + "openmeter/watermill/marshaler", + "openmeter/watermill/router", + "pkg/convert", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/events/recalculate.go": [ + "openmeter/event/metadata", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/watermill/marshaler", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/filters.go": [ + "openmeter/entitlement/balanceworker/filters", + "openmeter/notification", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/filters/filter.go": [ + "openmeter/entitlement", + "openmeter/entitlement/snapshot" + ], + "openmeter/entitlement/balanceworker/filters/highwatermark.go": [ + "openmeter/entitlement/snapshot" + ], + "openmeter/entitlement/balanceworker/filters/notifications.go": [ + "openmeter/notification", + "pkg/lrux", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/ingesthandler.go": [ + "openmeter/entitlement", + "openmeter/entitlement/balanceworker/events", + "openmeter/event/metadata", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/productcatalog/feature", + "openmeter/sink/flushhandler/ingestnotification/events", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/recalculate.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/balanceworker/filters", + "openmeter/entitlement/driver", + "openmeter/entitlement/snapshot", + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/registry", + "openmeter/subject", + "openmeter/watermill/eventbus", + "openmeter/watermill/marshaler", + "pkg/convert", + "pkg/lrux", + "pkg/models", + "pkg/pagination" + ], + "openmeter/entitlement/balanceworker/repository.go": [ + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/balanceworker/repository_test.go": [ + "openmeter/testutils", + "pkg/timeutil" + ], + "openmeter/entitlement/balanceworker/subject_customer.go": [ + "openmeter/customer", + "openmeter/subject", + "pkg/models" + ], + "openmeter/entitlement/balanceworker/worker.go": [ + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/balanceworker/events", + "openmeter/entitlement/metered", + "openmeter/entitlement/snapshot", + "openmeter/event/metadata", + "openmeter/notification", + "openmeter/registry", + "openmeter/sink/flushhandler/ingestnotification/events", + "openmeter/subject", + "openmeter/watermill/eventbus", + "openmeter/watermill/grouphandler", + "openmeter/watermill/router", + "pkg/models" + ], + "openmeter/entitlement/boolean/connector.go": [ + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/entitlement/boolean/entitlement.go": [ + "openmeter/entitlement" + ], + "openmeter/entitlement/connector.go": [ + "openmeter/customer", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/sortx" + ], + "openmeter/entitlement/driver/entitlement.go": [ + "api", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/namespace/namespacedriver", + "openmeter/streaming", + "openmeter/subject", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/strcase" + ], + "openmeter/entitlement/driver/errors.go": [ + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder", + "pkg/pagination" + ], + "openmeter/entitlement/driver/metered.go": [ + "api", + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/namespace/namespacedriver", + "openmeter/subject", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/entitlement/driver/parser.go": [ + "api", + "openmeter/entitlement", + "openmeter/entitlement/boolean", + "openmeter/entitlement/metered", + "openmeter/entitlement/static", + "openmeter/streaming", + "pkg/clock", + "pkg/convert", + "pkg/datetime", + "pkg/defaultx", + "pkg/timeutil" + ], + "openmeter/entitlement/driver/v2/customer.go": [ + "api", + "openmeter/customer", + "openmeter/entitlement", + "pkg/clock", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/strcase" + ], + "openmeter/entitlement/driver/v2/customer_metered.go": [ + "api", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement/metered", + "pkg/clock", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/entitlement/driver/v2/entitlement.go": [ + "api", + "openmeter/entitlement", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/slicesx", + "pkg/strcase" + ], + "openmeter/entitlement/driver/v2/errors.go": [ + "openmeter/entitlement/driver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "openmeter/entitlement/driver/v2/handler.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/namespace/namespacedriver", + "pkg/framework/transport/httptransport" + ], + "openmeter/entitlement/driver/v2/mapping.go": [ + "api", + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/boolean", + "openmeter/entitlement/driver", + "openmeter/entitlement/metered", + "openmeter/entitlement/static", + "openmeter/streaming", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/entitlement/entitlement.go": [ + "openmeter/customer", + "openmeter/streaming", + "pkg/clock", + "pkg/datetime", + "pkg/defaultx", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/entitlement/entitlement_grant.go": [ + "openmeter/credit" + ], + "openmeter/entitlement/entitlement_test.go": [ + "openmeter/entitlement", + "pkg/timeutil" + ], + "openmeter/entitlement/entitlement_types.go": [ + "openmeter/productcatalog/feature" + ], + "openmeter/entitlement/errors.go": [ + "pkg/models" + ], + "openmeter/entitlement/events.go": [ + "openmeter/customer", + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/subject", + "openmeter/watermill/marshaler", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/hooks/subscription/hook.go": [ + "openmeter/entitlement", + "openmeter/subscription", + "pkg/models" + ], + "openmeter/entitlement/metered/balance.go": [ + "openmeter/credit/engine", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/streaming", + "pkg/clock", + "pkg/convert", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/balance_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/ent/db/balancesnapshot", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/testutils", + "pkg/clock", + "pkg/convert", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/connector.go": [ + "openmeter/credit", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/convert", + "pkg/defaultx", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/entitlement.go": [ + "openmeter/entitlement", + "pkg/defaultx", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/entitlement_grant.go": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "pkg/clock", + "pkg/convert", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/events.go": [ + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/subject", + "openmeter/watermill/marshaler" + ], + "openmeter/entitlement/metered/grant_owner_adapter.go": [ + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/grant_owner_adapter_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/hook.go": [ + "openmeter/entitlement", + "pkg/models" + ], + "openmeter/entitlement/metered/lateevents_test.go": [ + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/tx", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/streaming/testutils", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/convert", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/owner_customer.go": [ + "openmeter/streaming" + ], + "openmeter/entitlement/metered/repository.go": [ + "pkg/datetime", + "pkg/models" + ], + "openmeter/entitlement/metered/reset.go": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/event/models", + "pkg/clock", + "pkg/defaultx", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/entitlement/metered/reset_test.go": [ + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/testutils", + "pkg/clock", + "pkg/convert", + "pkg/filter", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/trace.go": [ + "pkg/models", + "pkg/timeutil" + ], + "openmeter/entitlement/metered/utils_test.go": [ + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/ent/tx", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/framework/entutils/entdriver", + "pkg/framework/pgdriver", + "pkg/models" + ], + "openmeter/entitlement/repository.go": [ + "openmeter/streaming", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/pagination/v2", + "pkg/timeutil" + ], + "openmeter/entitlement/service/access_test.go": [ + "openmeter/entitlement", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/entitlement/service/lock.go": [ + "pkg/framework/lockr" + ], + "openmeter/entitlement/service/scheduling.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/defaultx", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/entitlement/service/scheduling_test.go": [ + "openmeter/credit", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/testutils", + "pkg/clock", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/entitlement/service/service.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/framework/lockr", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/entitlement/service/service_test.go": [ + "openmeter/entitlement", + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "pkg/clock" + ], + "openmeter/entitlement/service/utils_test.go": [ + "app/config", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/feature", + "openmeter/registry", + "openmeter/registry/builder", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/framework/entutils/entdriver", + "pkg/framework/lockr", + "pkg/framework/pgdriver" + ], + "openmeter/entitlement/snapshot/event.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/productcatalog/feature", + "openmeter/subject", + "openmeter/watermill/marshaler", + "pkg/timeutil" + ], + "openmeter/entitlement/static/connector.go": [ + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/entitlement/static/entitlement.go": [ + "openmeter/entitlement" + ], + "openmeter/entitlement/uniqueness.go": [ + "pkg/models" + ], + "openmeter/entitlement/uniqueness_test.go": [ + "openmeter/entitlement", + "openmeter/testutils", + "pkg/models" + ], + "openmeter/entitlement/usageperiod.go": [ + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/entitlement/usageperiod_test.go": [ + "openmeter/entitlement", + "pkg/clock", + "pkg/datetime", + "pkg/timeutil" + ], + "openmeter/entitlement/validators/customer/validator.go": [ + "openmeter/customer", + "openmeter/entitlement", + "pkg/clock", + "pkg/models" + ], + "openmeter/info/httpdriver/currencies.go": [ + "api", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/info/httpdriver/driver.go": [ + "pkg/framework/transport/httptransport" + ], + "openmeter/ingest/dedupe.go": [ + "openmeter/dedupe" + ], + "openmeter/ingest/dedupe_test.go": [ + "openmeter/dedupe/memorydedupe", + "openmeter/ingest" + ], + "openmeter/ingest/httpdriver/errors.go": [ + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder" + ], + "openmeter/ingest/httpdriver/handler.go": [ + "openmeter/ingest", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/ingest/httpdriver/ingest.go": [ + "api", + "openmeter/ingest", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/ingest/httpdriver/ingest_test.go": [ + "openmeter/ingest", + "openmeter/ingest/httpdriver", + "openmeter/namespace/namespacedriver" + ], + "openmeter/ingest/ingestadapter/telemetry.go": [ + "openmeter/ingest" + ], + "openmeter/ingest/inmemory_test.go": [ + "openmeter/ingest" + ], + "openmeter/ingest/kafkaingest/collector.go": [ + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver", + "pkg/clock", + "pkg/kafka", + "pkg/kafka/metrics", + "pkg/kafka/metrics/stats", + "pkg/otelx" + ], + "openmeter/ingest/kafkaingest/namespace.go": [ + "openmeter/ingest/kafkaingest/topicresolver", + "pkg/kafka" + ], + "openmeter/ingest/kafkaingest/serializer/json.go": [ + "openmeter/dedupe" + ], + "openmeter/ledger/account.go": [ + "openmeter/customer", + "pkg/models" + ], + "openmeter/ledger/account/account.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/account/account_business.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/account/account_customer.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/account/adapter/account.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgeraccount", + "openmeter/ledger/account", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ledger/account/adapter/repo.go": [ + "openmeter/ent/db", + "openmeter/ledger/account", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/ledger/account/adapter/repo_test.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/testutils", + "pkg/currencyx", + "pkg/models", + "tools/migrate" + ], + "openmeter/ledger/account/adapter/subaccount.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/predicate", + "openmeter/ledger", + "openmeter/ledger/account", + "pkg/currencyx", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ledger/account/address.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/account/repo.go": [ + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ledger/account/service.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/account/service/service.go": [ + "openmeter/ledger", + "openmeter/ledger/account", + "pkg/framework/lockr", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/ledger/account/subaccount.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/accounts.go": [ + "pkg/currencyx" + ], + "openmeter/ledger/annotations.go": [ + "pkg/models" + ], + "openmeter/ledger/breakage/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/ledger/breakage", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/ledger/breakage/adapter/record.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/predicate", + "openmeter/ledger", + "openmeter/ledger/breakage", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/ledger/breakage/breakage_impacts.go": [ + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/breakage/noop.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/breakage/service.go": [ + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/transactions", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/breakage/types.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/chargeadapter/annotations.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/chargeadapter/creditpurchase.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "pkg/currencyx", + "pkg/framework/transaction" + ], + "openmeter/ledger/chargeadapter/creditpurchase_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ent/db", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/chargeadapter/flatfee.go": [ + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/collector", + "openmeter/ledger/transactions", + "openmeter/productcatalog" + ], + "openmeter/ledger/chargeadapter/flatfee_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/models/totals", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/recognizer", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/chargeadapter/helpers.go": [ + "openmeter/ledger", + "openmeter/productcatalog" + ], + "openmeter/ledger/chargeadapter/usagebased.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/collector", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/clock" + ], + "openmeter/ledger/chargeadapter/usagebased_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/invoicedusage", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/billing/models/totals", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/recognizer", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/collector/collect.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/collector/collection_fbo.go": [ + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "pkg/cmpx", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/collector/collection_fbo_test.go": [ + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/framework/transaction", + "pkg/timeutil" + ], + "openmeter/ledger/collector/correct.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/ledger/collector/correct_test.go": [ + "openmeter/billing/charges/models/creditrealization", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/collector/service.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/framework/transaction", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/customerbalance/calculation.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/productcatalog" + ], + "openmeter/ledger/customerbalance/expired_loader.go": [ + "openmeter/ledger/breakage" + ], + "openmeter/ledger/customerbalance/expired_loader_test.go": [ + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ledger", + "openmeter/ledger/breakage", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/ledger/customerbalance/facade.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/customerbalance/facade_test.go": [ + "openmeter/ledger", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx" + ], + "openmeter/ledger/customerbalance/funded_loader.go": [ + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/customerbalance/ledger_loader.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/customerbalance/loaders.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/customerbalance/merge.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/customerbalance/noop.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/customerbalance/service.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/breakage", + "pkg/clock", + "pkg/currencyx", + "pkg/pagination" + ], + "openmeter/ledger/customerbalance/service_test.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/usagebased", + "openmeter/ledger", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/ledger/customerbalance/testenv_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/adapter", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/flatfee/adapter", + "openmeter/billing/charges/flatfee/service", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/usagebased", + "openmeter/billing/charges/usagebased/adapter", + "openmeter/billing/charges/usagebased/service", + "openmeter/billing/rating/service", + "openmeter/customer", + "openmeter/ent/tx", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/meter", + "openmeter/meter/adapter", + "openmeter/meter/service", + "openmeter/namespace", + "openmeter/productcatalog", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/streaming/testutils", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/currencyx", + "pkg/framework/lockr", + "pkg/models", + "pkg/pagination", + "pkg/ref", + "pkg/timeutil" + ], + "openmeter/ledger/customerbalance/transactions.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/customer", + "openmeter/ledger", + "pkg/clock", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/customerbalance/transactions_test.go": [ + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/ledger", + "openmeter/ledger/historical", + "pkg/currencyx", + "pkg/models", + "pkg/pagination" + ], + "openmeter/ledger/errors.go": [ + "pkg/models" + ], + "openmeter/ledger/historical/adapter/ledger.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ent/db/predicate", + "openmeter/ledger", + "openmeter/ledger/historical", + "pkg/currencyx", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/ledger/historical/adapter/ledger_test.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/ledgertransactiongroup", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/ledger/historical", + "openmeter/ledger/transactions/testutils", + "openmeter/testutils", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil", + "tools/migrate" + ], + "openmeter/ledger/historical/adapter/repo.go": [ + "openmeter/ent/db", + "openmeter/ledger/historical", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/ledger/historical/adapter/sumentries_query.go": [ + "openmeter/ent/db", + "openmeter/ent/db/ledgerentry", + "openmeter/ent/db/ledgersubaccount", + "openmeter/ent/db/ledgersubaccountroute", + "openmeter/ent/db/ledgertransaction", + "openmeter/ent/db/predicate", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/historical/balance.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/historical/entry.go": [ + "openmeter/ledger", + "openmeter/ledger/account", + "pkg/models" + ], + "openmeter/ledger/historical/ledger.go": [ + "openmeter/ledger", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/ledger/historical/repo.go": [ + "openmeter/ledger", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination/v2" + ], + "openmeter/ledger/historical/transaction.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/impact_test.go": [ + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/ledger_fx_test.go": [ + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/testutils", + "pkg/currencyx", + "pkg/models", + "tools/migrate" + ], + "openmeter/ledger/ledger_test.go": [ + "openmeter/ledger", + "openmeter/ledger/transactions/testutils", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/noop/noop.go": [ + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/namespace", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/primitives.go": [ + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/query.go": [ + "pkg/models", + "pkg/pagination/v2", + "pkg/timeutil" + ], + "openmeter/ledger/recognizer/recognize.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/models/creditrealization", + "openmeter/ledger", + "openmeter/ledger/transactions", + "pkg/framework/transaction" + ], + "openmeter/ledger/recognizer/service.go": [ + "openmeter/billing/charges/lineage", + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/transactions", + "pkg/currencyx", + "pkg/framework/transaction" + ], + "openmeter/ledger/recognizer/service_test.go": [ + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/ledgertransaction", + "openmeter/ent/tx", + "openmeter/ledger/recognizer", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "pkg/clock", + "pkg/timeutil" + ], + "openmeter/ledger/resolvers/account.go": [ + "openmeter/customer", + "openmeter/ledger", + "openmeter/ledger/account", + "pkg/framework/lockr", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/ledger/resolvers/account_test.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/ledgeraccount", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ledger", + "openmeter/ledger/testutils", + "openmeter/testutils", + "pkg/models", + "tools/migrate" + ], + "openmeter/ledger/resolvers/adapter/repo.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/ledgercustomeraccount", + "openmeter/ledger", + "openmeter/ledger/resolvers", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/ledger/resolvers/customeraccount.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/framework/entutils" + ], + "openmeter/ledger/resolvers/errors.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/ledger/resolvers/hooks.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/resolvers/namespace.go": [ + "openmeter/ledger", + "openmeter/namespace" + ], + "openmeter/ledger/routing.go": [ + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/routing_test.go": [ + "pkg/currencyx" + ], + "openmeter/ledger/routingrules/defaults.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/routingrules/routingrules.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/routingrules/routingrules_test.go": [ + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/routingrules", + "openmeter/ledger/transactions/testutils", + "pkg/currencyx" + ], + "openmeter/ledger/routingrules/view.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/testutils/deps.go": [ + "openmeter/ent/db", + "openmeter/ledger/account", + "openmeter/ledger/account/adapter", + "openmeter/ledger/account/service", + "openmeter/ledger/historical", + "openmeter/ledger/historical/adapter", + "openmeter/ledger/resolvers", + "openmeter/ledger/resolvers/adapter", + "openmeter/ledger/routingrules", + "pkg/framework/lockr" + ], + "openmeter/ledger/testutils/integration.go": [ + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ledger", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "tools/migrate" + ], + "openmeter/ledger/transactions/accrual.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/accrual_test.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/transactions/breakage.go": [ + "openmeter/customer", + "openmeter/ledger" + ], + "openmeter/ledger/transactions/codes.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/transactions/collection.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/ledger/transactions/correction.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/transactions/correction_leg.go": [ + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/correction_leg_test.go": [ + "pkg/currencyx" + ], + "openmeter/ledger/transactions/correction_test.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/transactions/customer.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/customer_test.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/transactions/earnings.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/earnings_test.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/transactions/fx.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/input.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/transactions/legacy.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/currencyx" + ], + "openmeter/ledger/transactions/priority.go": [ + "openmeter/ledger" + ], + "openmeter/ledger/transactions/resolve.go": [ + "openmeter/customer", + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/transactions/resolve_test.go": [ + "openmeter/customer", + "openmeter/ledger" + ], + "openmeter/ledger/transactions/template.go": [ + "openmeter/customer", + "openmeter/ledger" + ], + "openmeter/ledger/transactions/testenv_test.go": [ + "openmeter/ledger", + "openmeter/ledger/testutils" + ], + "openmeter/ledger/transactions/testutils/anytransaction.go": [ + "openmeter/ledger", + "pkg/models" + ], + "openmeter/ledger/validations.go": [ + "pkg/models" + ], + "openmeter/ledger/validations_test.go": [ + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/transactions/testutils", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/llmcost/adapter.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/llmcost/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/llmcost", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/llmcost/adapter/mapping.go": [ + "openmeter/ent/db", + "openmeter/llmcost", + "pkg/models" + ], + "openmeter/llmcost/adapter/price.go": [ + "openmeter/ent/db", + "openmeter/ent/db/llmcostprice", + "openmeter/llmcost", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/llmcost/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/llmcost/llmcost.go": [ + "pkg/models" + ], + "openmeter/llmcost/service.go": [ + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/llmcost/service/service.go": [ + "openmeter/llmcost", + "pkg/filter", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/llmcost/service/service_test.go": [ + "openmeter/llmcost", + "pkg/filter", + "pkg/framework/transaction", + "pkg/pagination" + ], + "openmeter/llmcost/sync/fetcher.go": [ + "openmeter/llmcost" + ], + "openmeter/llmcost/sync/fetcher_modelsdev.go": [ + "openmeter/llmcost" + ], + "openmeter/llmcost/sync/normalizer.go": [ + "openmeter/llmcost" + ], + "openmeter/llmcost/sync/reconciler.go": [ + "openmeter/llmcost" + ], + "openmeter/llmcost/sync/reconciler_test.go": [ + "openmeter/llmcost", + "pkg/framework/transaction", + "pkg/pagination" + ], + "openmeter/llmcost/sync/sync.go": [ + "openmeter/llmcost" + ], + "openmeter/llmcost/sync/sync_test.go": [ + "openmeter/llmcost" + ], + "openmeter/meter/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/meter", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/meter/adapter/adapter_test.go": [ + "openmeter/ent/db", + "openmeter/meter", + "openmeter/testutils", + "pkg/pagination" + ], + "openmeter/meter/adapter/manage.go": [ + "openmeter/ent/db", + "openmeter/ent/db/entitlement", + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/meter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/meter/adapter/meter.go": [ + "openmeter/ent/db", + "openmeter/ent/db/meter", + "openmeter/meter", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/meter/errors.go": [ + "pkg/models" + ], + "openmeter/meter/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/meter/httphandler/handler.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/namespace/namespacedriver", + "openmeter/streaming", + "openmeter/subject", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/meter/httphandler/mapping.go": [ + "api", + "openmeter/apiconverter", + "openmeter/customer", + "openmeter/meter", + "openmeter/streaming", + "pkg/filter", + "pkg/models", + "pkg/models/http" + ], + "openmeter/meter/httphandler/meter.go": [ + "api", + "openmeter/meter", + "openmeter/streaming", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/models/http", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/meter/httphandler/query.go": [ + "api", + "openmeter/meter", + "openmeter/streaming", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/meter/httphandler/query_csv.go": [ + "api", + "openmeter/meter", + "openmeter/subject", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/meter/meter.go": [ + "pkg/models" + ], + "openmeter/meter/meter_test.go": [ + "pkg/models" + ], + "openmeter/meter/mockadapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/meter", + "pkg/models" + ], + "openmeter/meter/mockadapter/manage.go": [ + "openmeter/meter", + "pkg/models" + ], + "openmeter/meter/mockadapter/meter.go": [ + "openmeter/ent/db", + "openmeter/ent/db/meter", + "openmeter/meter", + "pkg/models", + "pkg/pagination" + ], + "openmeter/meter/parse.go": [ + "pkg/models" + ], + "openmeter/meter/parse_test.go": [ + "openmeter/meter", + "pkg/models" + ], + "openmeter/meter/service.go": [ + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/meter/service/manage.go": [ + "openmeter/meter", + "openmeter/meter/adapter", + "openmeter/namespace", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "openmeter/meter/service/service.go": [ + "openmeter/meter", + "openmeter/meter/adapter", + "pkg/pagination" + ], + "openmeter/meter/service_test.go": [ + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/meterevent/adapter/adapter.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/streaming" + ], + "openmeter/meterevent/adapter/event.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/meterevent", + "openmeter/streaming", + "pkg/models", + "pkg/pagination/v2" + ], + "openmeter/meterevent/httphandler/event.go": [ + "api", + "openmeter/meterevent", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/meterevent/httphandler/event_v2.go": [ + "api", + "openmeter/meterevent", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/meterevent/httphandler/handler.go": [ + "openmeter/meterevent", + "openmeter/namespace/namespacedriver", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/meterevent/httphandler/mapping.go": [ + "api", + "openmeter/apiconverter", + "openmeter/meterevent", + "pkg/pagination/v2" + ], + "openmeter/meterevent/service.go": [ + "openmeter/streaming", + "pkg/filter", + "pkg/pagination/v2", + "pkg/sortx" + ], + "openmeter/meterevent/service_test.go": [ + "openmeter/meterevent", + "openmeter/streaming", + "pkg/filter" + ], + "openmeter/meterexport/service.go": [ + "openmeter/meter", + "openmeter/streaming", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/meterexport/service/funnel.go": [ + "openmeter/meter", + "openmeter/streaming" + ], + "openmeter/meterexport/service/service.go": [ + "openmeter/meter", + "openmeter/meterexport", + "openmeter/streaming" + ], + "openmeter/meterexport/service/service_test.go": [ + "openmeter/meter", + "openmeter/meterexport", + "openmeter/streaming", + "openmeter/streaming/testutils", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/meterexport/service/syntheticdata.go": [ + "openmeter/meter", + "openmeter/meterexport", + "openmeter/streaming", + "pkg/clock" + ], + "openmeter/meterexport/service/syntheticdata_iter.go": [ + "openmeter/meterexport", + "openmeter/streaming" + ], + "openmeter/meterexport/service_test.go": [ + "openmeter/meter", + "pkg/models" + ], + "openmeter/notification/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/notification", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/notification/adapter/channel.go": [ + "openmeter/ent/db", + "openmeter/ent/db/notificationchannel", + "openmeter/notification", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/adapter/deliverystatus.go": [ + "openmeter/ent/db", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/notification", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/notification/adapter/entitymapping.go": [ + "openmeter/ent/db", + "openmeter/notification", + "pkg/models" + ], + "openmeter/notification/adapter/entitymapping_test.go": [ + "api", + "openmeter/notification" + ], + "openmeter/notification/adapter/event.go": [ + "openmeter/ent/db", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationevent", + "openmeter/ent/db/notificationeventdeliverystatus", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/adapter/rule.go": [ + "openmeter/ent/db", + "openmeter/ent/db/notificationchannel", + "openmeter/ent/db/notificationrule", + "openmeter/notification", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/channel.go": [ + "openmeter/notification/webhook/secret", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/consumer/consumer.go": [ + "openmeter/billing", + "openmeter/entitlement/snapshot", + "openmeter/notification", + "openmeter/watermill/grouphandler", + "openmeter/watermill/marshaler", + "openmeter/watermill/router" + ], + "openmeter/notification/consumer/entitlementbalancethreshold.go": [ + "api", + "openmeter/customer/httpdriver", + "openmeter/entitlement", + "openmeter/entitlement/driver", + "openmeter/entitlement/snapshot", + "openmeter/notification", + "openmeter/productcatalog/driver", + "openmeter/subject/httphandler", + "pkg/clock", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/notification/consumer/entitlementbalancethreshold_test.go": [ + "api", + "openmeter/entitlement", + "openmeter/entitlement/snapshot", + "openmeter/event/models", + "openmeter/notification", + "openmeter/productcatalog/feature", + "openmeter/subject", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/notification/consumer/entitlementreset.go": [ + "api", + "openmeter/customer/httpdriver", + "openmeter/entitlement", + "openmeter/entitlement/driver", + "openmeter/entitlement/snapshot", + "openmeter/notification", + "openmeter/productcatalog/driver", + "openmeter/subject/httphandler", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/consumer/entitlementsnapshot.go": [ + "openmeter/entitlement/snapshot", + "openmeter/notification" + ], + "openmeter/notification/consumer/invoice.go": [ + "openmeter/billing", + "openmeter/billing/httpdriver", + "openmeter/notification", + "pkg/models", + "pkg/sortx" + ], + "openmeter/notification/deliverystatus.go": [ + "pkg/models", + "pkg/pagination" + ], + "openmeter/notification/entitlements.go": [ + "api", + "pkg/models" + ], + "openmeter/notification/errors.go": [ + "pkg/models" + ], + "openmeter/notification/event.go": [ + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/eventhandler/deliverystatus.go": [ + "openmeter/notification" + ], + "openmeter/notification/eventhandler/dispatch.go": [ + "openmeter/notification", + "pkg/framework/tracex" + ], + "openmeter/notification/eventhandler/handler.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "pkg/models" + ], + "openmeter/notification/eventhandler/noop/handler.go": [ + "openmeter/notification" + ], + "openmeter/notification/eventhandler/reconcile.go": [ + "openmeter/notification", + "pkg/clock", + "pkg/framework/tracex", + "pkg/pagination" + ], + "openmeter/notification/eventhandler/webhook.go": [ + "openmeter/notification", + "openmeter/notification/httpdriver", + "openmeter/notification/webhook", + "pkg/clock", + "pkg/framework/tracex" + ], + "openmeter/notification/eventpayload.go": [ + "pkg/models" + ], + "openmeter/notification/httpdriver/channel.go": [ + "api", + "openmeter/notification", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/httpdriver/errors.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder", + "pkg/models" + ], + "openmeter/notification/httpdriver/event.go": [ + "api", + "openmeter/notification", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/httpdriver/handler.go": [ + "openmeter/billing", + "openmeter/namespace/namespacedriver", + "openmeter/notification", + "openmeter/notification/internal", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/notification/httpdriver/mapping.go": [ + "api", + "openmeter/notification", + "pkg/convert", + "pkg/models" + ], + "openmeter/notification/httpdriver/mapping_test.go": [ + "api", + "openmeter/notification", + "pkg/models" + ], + "openmeter/notification/httpdriver/rule.go": [ + "api", + "openmeter/notification", + "openmeter/notification/internal", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/internal/rule.go": [ + "api", + "openmeter/billing", + "openmeter/billing/httpdriver", + "openmeter/customer", + "openmeter/notification", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/notification/invoice.go": [ + "api", + "pkg/models" + ], + "openmeter/notification/repository.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/notification/rule.go": [ + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/service.go": [ + "openmeter/productcatalog/feature" + ], + "openmeter/notification/service/channel.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/notification/service/deliverystatus.go": [ + "openmeter/notification", + "pkg/framework/transaction" + ], + "openmeter/notification/service/event.go": [ + "openmeter/notification", + "pkg/clock", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/notification/service/rule.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/notification/service/service.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "openmeter/productcatalog/feature" + ], + "openmeter/notification/webhook/handler.go": [ + "openmeter/notification", + "openmeter/notification/webhook/secret", + "pkg/models" + ], + "openmeter/notification/webhook/noop/noop.go": [ + "openmeter/notification/webhook" + ], + "openmeter/notification/webhook/secret/secret.go": [ + "pkg/models" + ], + "openmeter/notification/webhook/svix/application.go": [ + "openmeter/notification/webhook/svix/internal", + "pkg/framework/tracex", + "pkg/idempotency" + ], + "openmeter/notification/webhook/svix/event.go": [ + "openmeter/notification/webhook", + "openmeter/notification/webhook/svix/internal", + "pkg/framework/tracex" + ], + "openmeter/notification/webhook/svix/internal/error.go": [ + "openmeter/notification/webhook" + ], + "openmeter/notification/webhook/svix/message.go": [ + "openmeter/notification", + "openmeter/notification/webhook", + "openmeter/notification/webhook/svix/internal", + "pkg/framework/tracex", + "pkg/idempotency", + "pkg/models" + ], + "openmeter/notification/webhook/svix/svix.go": [ + "openmeter/notification/webhook", + "openmeter/notification/webhook/svix/internal" + ], + "openmeter/notification/webhook/svix/webhook.go": [ + "openmeter/notification/webhook", + "openmeter/notification/webhook/secret", + "openmeter/notification/webhook/svix/internal", + "pkg/framework/tracex", + "pkg/idempotency" + ], + "openmeter/portal/adapter/adapter.go": [ + "openmeter/portal" + ], + "openmeter/portal/adapter/noop.go": [ + "openmeter/portal", + "pkg/models", + "pkg/pagination" + ], + "openmeter/portal/adapter/token.go": [ + "openmeter/portal", + "pkg/models", + "pkg/pagination" + ], + "openmeter/portal/authenticator/authenticator.go": [ + "api", + "openmeter/portal", + "pkg/errorsx", + "pkg/models" + ], + "openmeter/portal/httphandler/handler.go": [ + "openmeter/meter", + "openmeter/namespace/namespacedriver", + "openmeter/portal", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/portal/httphandler/mapping.go": [ + "api", + "openmeter/portal" + ], + "openmeter/portal/httphandler/portal.go": [ + "api", + "openmeter/meter", + "openmeter/portal", + "pkg/filter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination" + ], + "openmeter/portal/service.go": [ + "pkg/pagination" + ], + "openmeter/productcatalog/adapter/feature.go": [ + "openmeter/ent/db", + "openmeter/ent/db/feature", + "openmeter/ent/db/meter", + "openmeter/ent/db/plan", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/subscription", + "openmeter/ent/db/subscriptionitem", + "openmeter/ent/db/subscriptionphase", + "openmeter/productcatalog/feature", + "openmeter/subscription/repo", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/productcatalog/adapter/feature_test.go": [ + "openmeter/ent/db/feature", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "pkg/filter", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/adapter/transaction.go": [ + "openmeter/ent/db", + "openmeter/productcatalog/feature", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/productcatalog/addon.go": [ + "pkg/clock", + "pkg/models" + ], + "openmeter/productcatalog/addon/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/productcatalog/addon", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/productcatalog/addon/adapter/adapter_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/addon/adapter/addon.go": [ + "openmeter/ent/db", + "openmeter/ent/db/addon", + "openmeter/ent/db/addonratecard", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/addon/adapter/mapping.go": [ + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/taxcode/adapter", + "pkg/models" + ], + "openmeter/productcatalog/addon/addon.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/addon/assert.go": [ + "openmeter/productcatalog" + ], + "openmeter/productcatalog/addon/errors.go": [ + "pkg/models" + ], + "openmeter/productcatalog/addon/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/productcatalog/addon/httpdriver/addon.go": [ + "api", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/http", + "pkg/clock", + "pkg/defaultx", + "pkg/filter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/ref", + "pkg/sortx" + ], + "openmeter/productcatalog/addon/httpdriver/driver.go": [ + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/productcatalog/addon/httpdriver/mapping.go": [ + "api", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/http", + "pkg/models" + ], + "openmeter/productcatalog/addon/plan.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/addon/ratecard.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/addon/ratecard_test.go": [ + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/addon/repository.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/productcatalog/addon/service.go": [ + "openmeter/productcatalog", + "pkg/clock", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/addon/service/addon.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/featureresolver", + "pkg/clock", + "pkg/filter", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/addon/service/service.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/taxcode", + "openmeter/watermill/eventbus" + ], + "openmeter/productcatalog/addon/service/service_test.go": [ + "openmeter/app", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/testutils", + "openmeter/taxcode", + "pkg/convert", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/addon/service/taxcode_test.go": [ + "openmeter/app", + "openmeter/ent/db/addonratecard", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/testutils", + "openmeter/taxcode", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/addon/validators.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/alignment.go": [ + "pkg/datetime" + ], + "openmeter/productcatalog/discount.go": [ + "pkg/equal", + "pkg/hasher", + "pkg/models" + ], + "openmeter/productcatalog/discount_test.go": [ + "pkg/models" + ], + "openmeter/productcatalog/driver/errors.go": [ + "openmeter/meter", + "openmeter/productcatalog/feature", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder", + "pkg/pagination" + ], + "openmeter/productcatalog/driver/feature.go": [ + "api", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/feature", + "pkg/convert", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/operation", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/strcase" + ], + "openmeter/productcatalog/driver/parser.go": [ + "api", + "openmeter/apiconverter", + "openmeter/llmcost", + "openmeter/productcatalog/feature", + "pkg/convert", + "pkg/filter" + ], + "openmeter/productcatalog/effectiveperiod.go": [ + "pkg/models", + "pkg/timeutil" + ], + "openmeter/productcatalog/effectiveperiod_test.go": [ + "pkg/models" + ], + "openmeter/productcatalog/entitlement.go": [ + "openmeter/entitlement", + "pkg/datetime", + "pkg/hasher", + "pkg/models" + ], + "openmeter/productcatalog/entitlement_test.go": [ + "pkg/datetime" + ], + "openmeter/productcatalog/errors.go": [ + "pkg/datetime", + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/productcatalog/feature/connector.go": [ + "openmeter/meter", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/ref", + "pkg/sortx" + ], + "openmeter/productcatalog/feature/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/productcatalog/feature/feature.go": [ + "openmeter/meter", + "pkg/filter" + ], + "openmeter/productcatalog/feature/featuremeter.go": [ + "openmeter/meter", + "pkg/models", + "pkg/ref" + ], + "openmeter/productcatalog/feature/featuremeter_test.go": [ + "pkg/models", + "pkg/ref" + ], + "openmeter/productcatalog/feature/meter_group_by_filters_test.go": [ + "openmeter/meter", + "pkg/filter" + ], + "openmeter/productcatalog/feature/repository.go": [ + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/feature/unitcost.go": [ + "openmeter/meter" + ], + "openmeter/productcatalog/featureresolver.go": [ + "openmeter/productcatalog/feature" + ], + "openmeter/productcatalog/featureresolver/ratecard.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/models" + ], + "openmeter/productcatalog/featureresolver/ratecard_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/testutils", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/featureresolver/resolver.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/featureresolver/resolver_test.go": [ + "openmeter/meter", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/testutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/http/errors.go": [ + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder", + "pkg/models" + ], + "openmeter/productcatalog/http/mapping.go": [ + "api", + "openmeter/entitlement", + "openmeter/productcatalog", + "pkg/convert", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/phase.go": [ + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/plan.go": [ + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/plan/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/productcatalog/plan", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/productcatalog/plan/adapter/adapter_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/plan/adapter/mapping.go": [ + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/taxcode/adapter", + "pkg/models" + ], + "openmeter/productcatalog/plan/adapter/phase.go": [ + "openmeter/ent/db", + "openmeter/ent/db/planphase", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/productcatalog/plan/adapter/plan.go": [ + "openmeter/ent/db", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/planphase", + "openmeter/ent/db/planratecard", + "openmeter/ent/db/predicate", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/plan/addon.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/plan/assert.go": [ + "openmeter/productcatalog" + ], + "openmeter/productcatalog/plan/errors.go": [ + "pkg/models" + ], + "openmeter/productcatalog/plan/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/productcatalog/plan/httpdriver/driver.go": [ + "app/config", + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/plan", + "pkg/featuregate", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/productcatalog/plan/httpdriver/mapping.go": [ + "api", + "openmeter/productcatalog", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/plan/httpdriver/plan.go": [ + "api", + "openmeter/notification", + "openmeter/productcatalog", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan", + "pkg/clock", + "pkg/defaultx", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/ref", + "pkg/sortx" + ], + "openmeter/productcatalog/plan/phase.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/plan/plan.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/plan/ratecard.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/plan/ratecard_test.go": [ + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/plan/repository.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/productcatalog/plan/serializer.go": [ + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/productcatalog/plan/serializer_test.go": [ + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/plan/service.go": [ + "openmeter/productcatalog", + "pkg/clock", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/plan/service/plan.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/plan/service/service.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/taxcode", + "openmeter/watermill/eventbus" + ], + "openmeter/productcatalog/plan/service/service_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/testutils", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/plan/service/taxcode_test.go": [ + "openmeter/app", + "openmeter/ent/db/planratecard", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/testutils", + "openmeter/taxcode", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/plan/validators.go": [ + "openmeter/productcatalog", + "pkg/models" + ], + "openmeter/productcatalog/plan_test.go": [ + "openmeter/productcatalog", + "pkg/datetime" + ], + "openmeter/productcatalog/planaddon.go": [ + "pkg/models" + ], + "openmeter/productcatalog/planaddon/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/productcatalog/planaddon", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/productcatalog/planaddon/adapter/adapter_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/testutils", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/planaddon/adapter/mapping.go": [ + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/planaddon", + "pkg/models" + ], + "openmeter/productcatalog/planaddon/adapter/planaddon.go": [ + "openmeter/ent/db", + "openmeter/ent/db/addon", + "openmeter/ent/db/plan", + "openmeter/ent/db/planaddon", + "openmeter/ent/db/predicate", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/planaddon", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/planaddon/errors.go": [ + "pkg/models" + ], + "openmeter/productcatalog/planaddon/event.go": [ + "openmeter/event/metadata", + "openmeter/session" + ], + "openmeter/productcatalog/planaddon/httpdriver/driver.go": [ + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/productcatalog/planaddon/httpdriver/mapping.go": [ + "api", + "openmeter/productcatalog/addon/httpdriver", + "openmeter/productcatalog/http", + "openmeter/productcatalog/planaddon", + "pkg/models" + ], + "openmeter/productcatalog/planaddon/httpdriver/planaddon.go": [ + "api", + "openmeter/productcatalog/http", + "openmeter/productcatalog/planaddon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/planaddon/planaddon.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "pkg/models" + ], + "openmeter/productcatalog/planaddon/repository.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/productcatalog/planaddon/service.go": [ + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/planaddon/service/planaddon.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "pkg/clock", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/planaddon/service/service.go": [ + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/watermill/eventbus" + ], + "openmeter/productcatalog/planaddon/service/service_test.go": [ + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/testutils", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/planaddon_test.go": [ + "pkg/clock", + "pkg/datetime", + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/productcatalog/price.go": [ + "pkg/equal", + "pkg/models" + ], + "openmeter/productcatalog/pro_rating.go": [ + "pkg/models" + ], + "openmeter/productcatalog/ratecard.go": [ + "openmeter/entitlement", + "openmeter/taxcode", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/ratecard_test.go": [ + "openmeter/productcatalog/feature", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/cancel.go": [ + "api", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/change.go": [ + "api", + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription/workflow", + "pkg/convert", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/create.go": [ + "api", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/convert", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/delete.go": [ + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/edit.go": [ + "api", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/http/errors.go": [ + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "openmeter/subscription", + "openmeter/subscription/entitlement", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport/encoder", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/subscription/http/get.go": [ + "api", + "openmeter/customer", + "openmeter/subscription", + "pkg/filter", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/productcatalog/subscription/http/handler.go": [ + "app/config", + "openmeter/customer", + "openmeter/namespace/namespacedriver", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/featuregate", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/productcatalog/subscription/http/mapping.go": [ + "api", + "openmeter/entitlement/driver", + "openmeter/productcatalog", + "openmeter/productcatalog/driver", + "openmeter/productcatalog/http", + "openmeter/productcatalog/plan/httpdriver", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/patch", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/productcatalog/subscription/http/migrate.go": [ + "api", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/productcatalog/subscription/plan.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/subscription", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service.go": [ + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/change.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "pkg/clock", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/change_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/create.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "pkg/clock", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/migrate.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/migrate_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/plan.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "pkg/defaultx", + "pkg/models" + ], + "openmeter/productcatalog/subscription/service/plan_test.go": [ + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/testutils" + ], + "openmeter/productcatalog/subscription/service/service.go": [ + "openmeter/customer", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/datetime", + "pkg/models" + ], + "openmeter/productcatalog/subscription/testutils/adapter.go": [ + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "pkg/clock", + "pkg/defaultx", + "pkg/models" + ], + "openmeter/productcatalog/tax.go": [ + "openmeter/app", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/productcatalog/tax_test.go": [ + "openmeter/app", + "openmeter/taxcode", + "pkg/models", + "pkg/pagination" + ], + "openmeter/productcatalog/testutils/addon.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/models" + ], + "openmeter/productcatalog/testutils/env.go": [ + "openmeter/ent/db", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils", + "openmeter/watermill/eventbus" + ], + "openmeter/productcatalog/testutils/feature.go": [ + "openmeter/meter", + "openmeter/productcatalog/feature" + ], + "openmeter/productcatalog/testutils/meters.go": [ + "openmeter/meter", + "pkg/models" + ], + "openmeter/productcatalog/testutils/plan.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "pkg/datetime", + "pkg/models" + ], + "openmeter/progressmanager/adapter.go": [ + "openmeter/progressmanager/entity" + ], + "openmeter/progressmanager/adapter/adapter.go": [ + "openmeter/progressmanager" + ], + "openmeter/progressmanager/adapter/mock.go": [ + "openmeter/progressmanager", + "openmeter/progressmanager/entity" + ], + "openmeter/progressmanager/adapter/noop.go": [ + "openmeter/progressmanager/entity", + "pkg/models" + ], + "openmeter/progressmanager/adapter/progress.go": [ + "openmeter/progressmanager/entity", + "pkg/models" + ], + "openmeter/progressmanager/entity/progressmanager.go": [ + "pkg/models" + ], + "openmeter/progressmanager/httpdriver/handler.go": [ + "openmeter/namespace/namespacedriver", + "openmeter/progressmanager", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/progressmanager/httpdriver/progress.go": [ + "api", + "openmeter/progressmanager/entity", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/progressmanager/service.go": [ + "openmeter/progressmanager/entity" + ], + "openmeter/registry/builder/entitlement.go": [ + "app/config", + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/hook", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/tx", + "openmeter/entitlement/adapter", + "openmeter/entitlement/boolean", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/static", + "openmeter/meter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/registry", + "openmeter/streaming", + "openmeter/watermill/eventbus", + "pkg/framework/lockr" + ], + "openmeter/registry/entitlement.go": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature" + ], + "openmeter/secret/adapter.go": [ + "openmeter/secret/entity" + ], + "openmeter/secret/adapter/adapter.go": [ + "openmeter/secret" + ], + "openmeter/secret/adapter/secret.go": [ + "openmeter/secret/entity" + ], + "openmeter/secret/entity/errors.go": [ + "pkg/models" + ], + "openmeter/secret/entity/input.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/secret/entity/secret.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/secret/service.go": [ + "openmeter/secret/entity" + ], + "openmeter/secret/service/secret.go": [ + "openmeter/secret", + "openmeter/secret/entity", + "pkg/models" + ], + "openmeter/secret/service/service.go": [ + "openmeter/secret" + ], + "openmeter/server/framework_test.go": [ + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/server/router/addon.go": [ + "api", + "openmeter/productcatalog/addon/httpdriver" + ], + "openmeter/server/router/app.go": [ + "api" + ], + "openmeter/server/router/appcustominvoicing.go": [ + "openmeter/app/custominvoicing/httpdriver" + ], + "openmeter/server/router/appstripe.go": [ + "openmeter/app/stripe/httpdriver", + "pkg/models" + ], + "openmeter/server/router/billing.go": [ + "api", + "openmeter/billing/httpdriver" + ], + "openmeter/server/router/credit.go": [ + "api", + "openmeter/credit/driver" + ], + "openmeter/server/router/customer.go": [ + "api", + "openmeter/app/httpdriver", + "openmeter/customer/httpdriver", + "openmeter/productcatalog/subscription/http" + ], + "openmeter/server/router/customerstripe.go": [ + "openmeter/app/stripe/httpdriver" + ], + "openmeter/server/router/debug.go": [ + "openmeter/debug/httpdriver" + ], + "openmeter/server/router/entitlement.go": [ + "api", + "openmeter/customer/httpdriver", + "openmeter/entitlement/driver", + "openmeter/entitlement/driver/v2" + ], + "openmeter/server/router/event.go": [ + "api" + ], + "openmeter/server/router/marketplace.go": [ + "api" + ], + "openmeter/server/router/meter.go": [ + "api", + "openmeter/meter/httphandler", + "pkg/framework/commonhttp" + ], + "openmeter/server/router/noop.go": [ + "api" + ], + "openmeter/server/router/notification.go": [ + "api" + ], + "openmeter/server/router/plan.go": [ + "api", + "openmeter/productcatalog/plan/httpdriver" + ], + "openmeter/server/router/planaddon.go": [ + "api", + "openmeter/productcatalog/planaddon/httpdriver" + ], + "openmeter/server/router/portal.go": [ + "api", + "openmeter/portal/authenticator", + "pkg/contextx", + "pkg/models" + ], + "openmeter/server/router/product_catalog.go": [ + "api" + ], + "openmeter/server/router/router.go": [ + "api", + "api/v3/handlers/currencies", + "app/config", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/custominvoicing/httpdriver", + "openmeter/app/httpdriver", + "openmeter/app/stripe", + "openmeter/app/stripe/httpdriver", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/creditgrant", + "openmeter/billing/httpdriver", + "openmeter/cost", + "openmeter/credit", + "openmeter/credit/driver", + "openmeter/credit/grant", + "openmeter/currencies", + "openmeter/customer", + "openmeter/customer/httpdriver", + "openmeter/debug", + "openmeter/debug/httpdriver", + "openmeter/entitlement", + "openmeter/entitlement/driver", + "openmeter/entitlement/driver/v2", + "openmeter/entitlement/metered", + "openmeter/info/httpdriver", + "openmeter/ingest", + "openmeter/ingest/httpdriver", + "openmeter/ledger", + "openmeter/ledger/customerbalance", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meter/httphandler", + "openmeter/meterevent", + "openmeter/meterevent/httphandler", + "openmeter/namespace", + "openmeter/namespace/namespacedriver", + "openmeter/notification", + "openmeter/notification/httpdriver", + "openmeter/portal", + "openmeter/portal/httphandler", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/addon/httpdriver", + "openmeter/productcatalog/driver", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/httpdriver", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/planaddon/httpdriver", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/http", + "openmeter/progressmanager", + "openmeter/progressmanager/httpdriver", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subject/httphandler", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/http", + "openmeter/subscription/workflow", + "openmeter/taxcode", + "pkg/errorsx", + "pkg/featuregate", + "pkg/framework/transport/httptransport" + ], + "openmeter/server/router/subscription.go": [ + "api", + "openmeter/productcatalog/subscription/http" + ], + "openmeter/server/router/subscriptionaddon.go": [ + "openmeter/subscription/addon/http" + ], + "openmeter/server/server.go": [ + "api", + "api/v3/server", + "app/config", + "openmeter/namespace/namespacedriver", + "openmeter/portal/authenticator", + "openmeter/server/router", + "pkg/contextx", + "pkg/models", + "pkg/server" + ], + "openmeter/server/server_test.go": [ + "api", + "api/v3", + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/stripe", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/usagebased", + "openmeter/cost", + "openmeter/credit", + "openmeter/credit/engine", + "openmeter/credit/grant", + "openmeter/currencies", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/ingest", + "openmeter/llmcost", + "openmeter/meter", + "openmeter/meter/httphandler", + "openmeter/meter/mockadapter", + "openmeter/meterevent/adapter", + "openmeter/namespace", + "openmeter/notification", + "openmeter/portal/adapter", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/progressmanager/adapter", + "openmeter/secret/entity", + "openmeter/server/router", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/workflow", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "openmeter/watermill/marshaler", + "pkg/errorsx", + "pkg/featuregate", + "pkg/filter", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/log", + "pkg/models", + "pkg/pagination", + "pkg/ref", + "pkg/timeutil" + ], + "openmeter/sink/buffer.go": [ + "openmeter/sink/models" + ], + "openmeter/sink/buffer_test.go": [ + "openmeter/sink", + "openmeter/sink/models" + ], + "openmeter/sink/flushhandler/handler.go": [ + "openmeter/sink/models" + ], + "openmeter/sink/flushhandler/ingestnotification/events/events.go": [ + "openmeter/event/metadata", + "openmeter/event/models", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/watermill/marshaler" + ], + "openmeter/sink/flushhandler/ingestnotification/handler.go": [ + "openmeter/event/models", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/meter", + "openmeter/sink/flushhandler", + "openmeter/sink/flushhandler/ingestnotification/events", + "openmeter/sink/models", + "openmeter/watermill/eventbus", + "pkg/slicesx" + ], + "openmeter/sink/flushhandler/mux.go": [ + "openmeter/sink/models" + ], + "openmeter/sink/flushhandler/types.go": [ + "openmeter/sink/models" + ], + "openmeter/sink/meters.go": [ + "openmeter/meter", + "openmeter/sink/models" + ], + "openmeter/sink/models/models.go": [ + "openmeter/dedupe", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/meter" + ], + "openmeter/sink/sink.go": [ + "openmeter/dedupe", + "openmeter/ingest/kafkaingest", + "openmeter/ingest/kafkaingest/serializer", + "openmeter/ingest/kafkaingest/topicresolver", + "openmeter/meter", + "openmeter/sink/flushhandler", + "openmeter/sink/models", + "pkg/clock", + "pkg/kafka/metrics", + "pkg/kafka/metrics/stats" + ], + "openmeter/sink/storage.go": [ + "openmeter/sink/models", + "openmeter/streaming", + "pkg/clock" + ], + "openmeter/streaming/clickhouse/connector.go": [ + "openmeter/meter", + "openmeter/progressmanager", + "openmeter/progressmanager/entity", + "openmeter/streaming", + "pkg/models" + ], + "openmeter/streaming/clickhouse/connector_query_test.go": [ + "openmeter/meter", + "openmeter/progressmanager/adapter", + "openmeter/streaming", + "pkg/models" + ], + "openmeter/streaming/clickhouse/connector_test.go": [ + "openmeter/meter", + "openmeter/progressmanager/adapter", + "openmeter/streaming" + ], + "openmeter/streaming/clickhouse/event_query.go": [ + "openmeter/streaming" + ], + "openmeter/streaming/clickhouse/event_query_test.go": [ + "openmeter/customer", + "openmeter/streaming", + "pkg/models" + ], + "openmeter/streaming/clickhouse/event_query_v2.go": [ + "openmeter/streaming", + "pkg/sortx" + ], + "openmeter/streaming/clickhouse/event_query_v2_test.go": [ + "openmeter/customer", + "openmeter/streaming", + "pkg/filter", + "pkg/models", + "pkg/pagination/v2", + "pkg/sortx" + ], + "openmeter/streaming/clickhouse/group_by_values_query.go": [ + "openmeter/meter" + ], + "openmeter/streaming/clickhouse/group_by_values_query_test.go": [ + "openmeter/meter" + ], + "openmeter/streaming/clickhouse/meter_query.go": [ + "openmeter/meter", + "openmeter/streaming", + "pkg/filter", + "pkg/models" + ], + "openmeter/streaming/clickhouse/meter_query_test.go": [ + "openmeter/customer", + "openmeter/meter", + "openmeter/streaming", + "pkg/filter", + "pkg/models" + ], + "openmeter/streaming/clickhouse/queryhelper.go": [ + "openmeter/streaming" + ], + "openmeter/streaming/clickhouse/subject_query.go": [ + "openmeter/meter" + ], + "openmeter/streaming/clickhouse/subject_query_test.go": [ + "openmeter/meter" + ], + "openmeter/streaming/connector.go": [ + "openmeter/meter", + "openmeter/namespace", + "pkg/models" + ], + "openmeter/streaming/defaults.go": [ + "openmeter/meter" + ], + "openmeter/streaming/eventparams.go": [ + "pkg/filter", + "pkg/models", + "pkg/pagination/v2", + "pkg/sortx" + ], + "openmeter/streaming/query_params.go": [ + "openmeter/meter", + "pkg/filter", + "pkg/models" + ], + "openmeter/streaming/query_params_test.go": [ + "openmeter/meter", + "pkg/models" + ], + "openmeter/streaming/retry/retry.go": [ + "openmeter/meter", + "openmeter/streaming" + ], + "openmeter/streaming/retry/retry_test.go": [ + "openmeter/streaming" + ], + "openmeter/streaming/testutils/streaming.go": [ + "openmeter/meter", + "openmeter/streaming", + "pkg/filter" + ], + "openmeter/streaming/testutils/streaming_test.go": [ + "openmeter/meter", + "openmeter/streaming", + "openmeter/testutils", + "pkg/convert", + "pkg/filter" + ], + "openmeter/streaming/usageattribution.go": [ + "pkg/models" + ], + "openmeter/streaming/usageattribution_test.go": [ + "pkg/models" + ], + "openmeter/subject/adapter.go": [ + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/subject", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/subject/adapter/subject.go": [ + "openmeter/ent/db", + "openmeter/ent/db/subject", + "openmeter/subject", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/httphandler/handler.go": [ + "openmeter/entitlement", + "openmeter/namespace/namespacedriver", + "openmeter/subject", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/subject/httphandler/mapping.go": [ + "api", + "openmeter/subject" + ], + "openmeter/subject/httphandler/subject.go": [ + "api", + "openmeter/subject", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/service.go": [ + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/service/hooks/customersubject.go": [ + "openmeter/customer", + "openmeter/subject", + "pkg/models" + ], + "openmeter/subject/service/hooks/customersubject_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/ent/db", + "openmeter/meter/mockadapter", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/subject/service/hooks", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/models" + ], + "openmeter/subject/service/service.go": [ + "openmeter/subject", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/service/service_test.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/subject", + "openmeter/subject/testutils", + "pkg/clock", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subject/subject.go": [ + "pkg/models" + ], + "openmeter/subject/testutils/env.go": [ + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus" + ], + "openmeter/subscription/addon/addon.go": [ + "openmeter/productcatalog/addon", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/addon/addon_test.go": [ + "openmeter/productcatalog/addon", + "openmeter/subscription/addon", + "openmeter/testutils", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/addon/diff/addon.go": [ + "openmeter/subscription", + "openmeter/subscription/addon" + ], + "openmeter/subscription/addon/diff/affected.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/addon" + ], + "openmeter/subscription/addon/diff/apply.go": [ + "openmeter/subscription", + "openmeter/subscription/addon", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/addon/diff/apply_test.go": [ + "openmeter/app", + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/testutils", + "openmeter/taxcode", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/addon/diff/diff.go": [ + "openmeter/subscription" + ], + "openmeter/subscription/addon/diff/restore.go": [ + "openmeter/subscription", + "openmeter/subscription/addon", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/addon/diff/restore_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/addon/diff/zeroratecard.go": [ + "openmeter/entitlement", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/models" + ], + "openmeter/subscription/addon/events.go": [ + "openmeter/customer", + "openmeter/event/metadata", + "openmeter/session", + "openmeter/watermill/marshaler" + ], + "openmeter/subscription/addon/events_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/session", + "openmeter/subscription/addon", + "pkg/models" + ], + "openmeter/subscription/addon/extend.go": [ + "openmeter/entitlement", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/models" + ], + "openmeter/subscription/addon/extend_test.go": [ + "openmeter/ent/db/entitlement", + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/testutils", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/addon/http/create.go": [ + "api", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/workflow", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/subscription/addon/http/get.go": [ + "api", + "openmeter/subscription/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/subscription/addon/http/handler.go": [ + "openmeter/namespace/namespacedriver", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/workflow", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport" + ], + "openmeter/subscription/addon/http/list.go": [ + "api", + "openmeter/subscription/addon", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/addon/http/mapping.go": [ + "api", + "openmeter/productcatalog/http", + "openmeter/productcatalog/subscription/http", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/subscription/addon/http/update.go": [ + "api", + "openmeter/productcatalog/subscription/http", + "openmeter/subscription/workflow", + "pkg/framework/commonhttp", + "pkg/framework/transport/httptransport", + "pkg/models" + ], + "openmeter/subscription/addon/instance.go": [ + "openmeter/productcatalog/addon", + "pkg/models" + ], + "openmeter/subscription/addon/quantity.go": [ + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/addon/ratecard.go": [ + "openmeter/productcatalog/addon" + ], + "openmeter/subscription/addon/repo/mapping.go": [ + "openmeter/ent/db", + "openmeter/productcatalog/addon/adapter", + "openmeter/subscription/addon", + "pkg/models", + "pkg/slicesx", + "pkg/timeutil" + ], + "openmeter/subscription/addon/repo/subscriptionaddon.go": [ + "openmeter/ent/db", + "openmeter/ent/db/subscriptionaddon", + "openmeter/ent/db/subscriptionaddonquantity", + "openmeter/subscription/addon", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/subscription/addon/repo/subscriptionaddonquantity.go": [ + "openmeter/ent/db", + "openmeter/subscription/addon", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/subscription/addon/repo/transaction.go": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/subscription/addon/repository.go": [ + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/subscription/addon/service.go": [ + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/subscription/addon/service/change_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/addon/service/create_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/addon/service/list_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subscription/addon/service/service.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/planaddon", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/watermill/eventbus", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/subscription/annotations.go": [ + "pkg/models" + ], + "openmeter/subscription/apply.go": [ + "pkg/models" + ], + "openmeter/subscription/entitlement.go": [ + "openmeter/customer", + "openmeter/entitlement", + "pkg/models" + ], + "openmeter/subscription/entitlement/adapter.go": [ + "openmeter/entitlement", + "openmeter/subscription", + "pkg/clock", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/slicesx" + ], + "openmeter/subscription/entitlement/errors.go": [ + "pkg/models" + ], + "openmeter/subscription/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/subscription/errors_test.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/commonhttp", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/events.go": [ + "openmeter/event/metadata", + "openmeter/session", + "openmeter/watermill/marshaler" + ], + "openmeter/subscription/featureflag.go": [ + "pkg/ffx" + ], + "openmeter/subscription/fielddescriptormapper.go": [ + "pkg/models", + "pkg/treex" + ], + "openmeter/subscription/hook.go": [ + "pkg/models" + ], + "openmeter/subscription/hooks/annotations/hook.go": [ + "openmeter/subscription", + "pkg/models" + ], + "openmeter/subscription/item.go": [ + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/list.go": [ + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx", + "pkg/timeutil" + ], + "openmeter/subscription/locks.go": [ + "pkg/framework/lockr" + ], + "openmeter/subscription/patch/additem.go": [ + "openmeter/subscription", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/patch/additem_test.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime" + ], + "openmeter/subscription/patch/addphase.go": [ + "openmeter/subscription", + "pkg/datetime" + ], + "openmeter/subscription/patch/patch_test.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/patch/removeitem.go": [ + "openmeter/subscription", + "pkg/datetime" + ], + "openmeter/subscription/patch/removeitem_test.go": [ + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime" + ], + "openmeter/subscription/patch/removephase.go": [ + "openmeter/subscription", + "pkg/datetime" + ], + "openmeter/subscription/patch/stretchphase.go": [ + "openmeter/subscription", + "pkg/datetime" + ], + "openmeter/subscription/patch/stretchphase_test.go": [ + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime" + ], + "openmeter/subscription/patch/unscheduleedit.go": [ + "openmeter/subscription" + ], + "openmeter/subscription/patch/unscheduleedit_test.go": [ + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime" + ], + "openmeter/subscription/patch_test.go": [ + "openmeter/subscription" + ], + "openmeter/subscription/phase.go": [ + "pkg/models" + ], + "openmeter/subscription/plan.go": [ + "pkg/currencyx", + "pkg/models" + ], + "openmeter/subscription/repo/mapping.go": [ + "openmeter/ent/db", + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/taxcode/adapter", + "pkg/convert", + "pkg/models" + ], + "openmeter/subscription/repo/subscriptionitemrepo.go": [ + "openmeter/ent/db", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionitem", + "openmeter/subscription", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/repo/subscriptionphaserepo.go": [ + "openmeter/ent/db", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscriptionphase", + "openmeter/subscription", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/repo/subscriptionrepo.go": [ + "openmeter/ent/db", + "openmeter/ent/db/plan", + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "openmeter/subscription", + "pkg/clock", + "pkg/filter", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "openmeter/subscription/repo/transaction.go": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "openmeter/subscription/repo/utils.go": [ + "openmeter/ent/db/predicate", + "openmeter/ent/db/subscription", + "pkg/timeutil" + ], + "openmeter/subscription/repository.go": [ + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/subscription/serialize_test.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/service.go": [ + "pkg/models" + ], + "openmeter/subscription/service/service.go": [ + "openmeter/customer", + "openmeter/productcatalog/feature", + "openmeter/subscription", + "openmeter/subscription/validators/subscription", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/ffx", + "pkg/framework/lockr", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/slicesx" + ], + "openmeter/subscription/service/service_test.go": [ + "openmeter/app", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/taxcode", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/filter", + "pkg/models" + ], + "openmeter/subscription/service/servicevalidation.go": [ + "openmeter/customer", + "openmeter/subscription", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/service/sync.go": [ + "openmeter/entitlement", + "openmeter/subscription", + "pkg/convert", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/subscription/service/sync_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/filter", + "pkg/models" + ], + "openmeter/subscription/service/synchelpers.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/productcatalog", + "openmeter/subscription", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/subscription/state.go": [ + "pkg/models" + ], + "openmeter/subscription/subscription.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/subscription_test.go": [ + "openmeter/subscription", + "openmeter/testutils", + "pkg/models" + ], + "openmeter/subscription/subscriptionspec.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/productcatalog", + "pkg/convert", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/subscriptionspec_test.go": [ + "openmeter/subscription", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/subscriptionview.go": [ + "openmeter/customer", + "openmeter/entitlement", + "openmeter/entitlement/metered", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/convert", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/testutils/addon.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "pkg/models" + ], + "openmeter/subscription/testutils/billing.go": [ + "openmeter/app", + "openmeter/billing" + ], + "openmeter/subscription/testutils/builder.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/subscription", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/testutils/compare.go": [ + "openmeter/entitlement", + "openmeter/subscription", + "openmeter/subscription/addon", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/testutils/customer.go": [ + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/currencyx", + "pkg/models" + ], + "openmeter/subscription/testutils/db.go": [ + "openmeter/ent/db", + "openmeter/testutils", + "pkg/framework/entutils/entdriver", + "pkg/framework/pgdriver", + "tools/migrate" + ], + "openmeter/subscription/testutils/feature.go": [ + "openmeter/productcatalog/feature" + ], + "openmeter/subscription/testutils/global.go": [ + "pkg/datetime" + ], + "openmeter/subscription/testutils/helpers.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/addon", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/testutils/mock.go": [ + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/models", + "pkg/timeutil" + ], + "openmeter/subscription/testutils/patch.go": [ + "openmeter/subscription" + ], + "openmeter/subscription/testutils/plan.go": [ + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime" + ], + "openmeter/subscription/testutils/ratecard.go": [ + "openmeter/entitlement", + "openmeter/productcatalog", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/testutils/repository.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/repo", + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/testutils/service.go": [ + "app/config", + "openmeter/customer", + "openmeter/customer/service/hooks", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/registry", + "openmeter/registry/builder", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/service/hooks", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/service", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/ffx", + "pkg/framework/lockr", + "pkg/models" + ], + "openmeter/subscription/timing.go": [ + "pkg/clock", + "pkg/models" + ], + "openmeter/subscription/uniqueness.go": [ + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/uniqueness_test.go": [ + "openmeter/productcatalog", + "openmeter/subscription", + "openmeter/subscription/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/validators/customer/validator.go": [ + "openmeter/customer", + "openmeter/subscription", + "pkg/clock", + "pkg/filter", + "pkg/models" + ], + "openmeter/subscription/validators/subscription/components.go": [ + "openmeter/subscription", + "pkg/slicesx" + ], + "openmeter/subscription/validators/subscription/validator.go": [ + "openmeter/customer", + "openmeter/subscription", + "pkg/ffx", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/subscription/workflow/annotations.go": [ + "pkg/models" + ], + "openmeter/subscription/workflow/errors.go": [ + "openmeter/subscription", + "pkg/models" + ], + "openmeter/subscription/workflow/service.go": [ + "openmeter/subscription", + "openmeter/subscription/addon", + "pkg/models" + ], + "openmeter/subscription/workflow/service/addon.go": [ + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/workflow", + "pkg/framework/transaction", + "pkg/models", + "pkg/slicesx" + ], + "openmeter/subscription/workflow/service/addon_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/planaddon", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/diff", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models" + ], + "openmeter/subscription/workflow/service/service.go": [ + "openmeter/customer", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/workflow", + "pkg/ffx", + "pkg/framework/lockr", + "pkg/framework/transaction" + ], + "openmeter/subscription/workflow/service/subscription.go": [ + "openmeter/customer", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/filter", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "openmeter/subscription/workflow/service/subscription_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/registry", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/ffx", + "pkg/framework/lockr", + "pkg/models" + ], + "openmeter/taxcode/adapter/adapter.go": [ + "openmeter/ent/db", + "openmeter/taxcode", + "pkg/framework/entutils", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/taxcode/adapter/mapping.go": [ + "openmeter/ent/db", + "openmeter/taxcode", + "pkg/models" + ], + "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go": [ + "openmeter/ent/db", + "openmeter/ent/db/organizationdefaulttaxcodes", + "openmeter/taxcode", + "pkg/framework/entutils", + "pkg/models" + ], + "openmeter/taxcode/adapter/taxcode.go": [ + "openmeter/ent/db", + "openmeter/ent/db/taxcode", + "openmeter/taxcode", + "pkg/clock", + "pkg/framework/entutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/taxcode/errors.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "openmeter/taxcode/namespacehandler.go": [ + "openmeter/namespace", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/taxcode/namespacehandler_test.go": [ + "openmeter/taxcode", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "pkg/models", + "pkg/pagination" + ], + "openmeter/taxcode/repository.go": [ + "pkg/framework/entutils", + "pkg/pagination" + ], + "openmeter/taxcode/service.go": [ + "openmeter/app", + "pkg/models", + "pkg/pagination" + ], + "openmeter/taxcode/service/organizationdefaulttaxcodes.go": [ + "openmeter/taxcode", + "pkg/framework/transaction", + "pkg/models" + ], + "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go": [ + "openmeter/taxcode", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "pkg/models" + ], + "openmeter/taxcode/service/service.go": [ + "openmeter/taxcode" + ], + "openmeter/taxcode/service/taxcode.go": [ + "openmeter/taxcode", + "pkg/framework/transaction", + "pkg/models", + "pkg/pagination" + ], + "openmeter/taxcode/service/taxcode_test.go": [ + "openmeter/app", + "openmeter/taxcode", + "openmeter/taxcode/testutils", + "openmeter/testutils", + "pkg/models" + ], + "openmeter/taxcode/taxcode.go": [ + "openmeter/app", + "pkg/models" + ], + "openmeter/taxcode/testutils/env.go": [ + "openmeter/app", + "openmeter/ent/db", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils" + ], + "openmeter/testutils/pg_driver.go": [ + "pkg/framework/entutils/entdriver", + "pkg/framework/pgdriver" + ], + "openmeter/watermill/driver/kafka/broker.go": [ + "app/config", + "openmeter/watermill/driver/kafka/metrics" + ], + "openmeter/watermill/driver/kafka/metrics.go": [ + "openmeter/watermill/driver/kafka/metrics" + ], + "openmeter/watermill/driver/kafka/publisher.go": [ + "pkg/kafka" + ], + "openmeter/watermill/eventbus/eventbus.go": [ + "openmeter/entitlement/balanceworker/events", + "openmeter/sink/flushhandler/ingestnotification/events", + "openmeter/watermill/driver/noop", + "openmeter/watermill/marshaler" + ], + "openmeter/watermill/marshaler/marshaler.go": [ + "openmeter/event/metadata" + ], + "openmeter/watermill/marshaler/source.go": [ + "openmeter/event/metadata" + ], + "openmeter/watermill/marshaler/source_test.go": [ + "openmeter/event/metadata" + ], + "openmeter/watermill/router/metrics.go": [ + "openmeter/watermill/marshaler", + "pkg/framework/tracex" + ], + "openmeter/watermill/router/router.go": [ + "app/config" + ], + "openmeter/watermill/router/router_test.go": [ + "app/config" + ], + "pkg/clock/clock_test.go": [ + "openmeter/testutils", + "pkg/clock" + ], + "pkg/currencyx/allocation_test.go": [ + "pkg/currencyx" + ], + "pkg/currencyx/currency_test.go": [ + "pkg/currencyx" + ], + "pkg/datetime/duration_test.go": [ + "pkg/clock" + ], + "pkg/entitydiff/diff.go": [ + "pkg/equal" + ], + "pkg/equal/equal.go": [ + "pkg/hasher" + ], + "pkg/errorsx/handler.go": [ + "pkg/framework/transport/httptransport" + ], + "pkg/errorsx/helpers.go": [ + "api", + "api/v3" + ], + "pkg/errorsx/helpers_test.go": [ + "api", + "api/v3" + ], + "pkg/filter/filter.go": [ + "pkg/models" + ], + "pkg/filter/filter_test.go": [ + "pkg/filter", + "pkg/models" + ], + "pkg/framework/commonhttp/encoder.go": [ + "pkg/framework/transport/httptransport/encoder", + "pkg/models" + ], + "pkg/framework/commonhttp/errors.go": [ + "pkg/models" + ], + "pkg/framework/commonhttp/errors_test.go": [ + "pkg/framework/commonhttp", + "pkg/models" + ], + "pkg/framework/commonhttp/sort.go": [ + "pkg/convert", + "pkg/defaultx", + "pkg/sortx" + ], + "pkg/framework/entutils/entcursor/cursor_test.go": [ + "openmeter/testutils", + "pkg/framework/entutils/testutils/ent1/db", + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/pagination/v2" + ], + "pkg/framework/entutils/entdriver/driver.go": [ + "openmeter/ent/db" + ], + "pkg/framework/entutils/entpaginate/paginate_test.go": [ + "openmeter/testutils", + "pkg/framework/entutils/testutils/ent1/db", + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/pagination" + ], + "pkg/framework/entutils/idorder.go": [ + "pkg/models" + ], + "pkg/framework/entutils/idorder_test.go": [ + "pkg/framework/entutils", + "pkg/models" + ], + "pkg/framework/entutils/mapping.go": [ + "pkg/pagination", + "pkg/slicesx" + ], + "pkg/framework/entutils/mixins.go": [ + "pkg/clock", + "pkg/convert", + "pkg/models" + ], + "pkg/framework/entutils/pgjsonb.go": [ + "pkg/slicesx" + ], + "pkg/framework/entutils/sort.go": [ + "pkg/sortx" + ], + "pkg/framework/entutils/testutils/ent1/db/client.go": [ + "pkg/framework/entutils/testutils/ent1/db/migrate", + "pkg/framework/entutils/testutils/ent1/db/example1" + ], + "pkg/framework/entutils/testutils/ent1/db/cursor.go": [ + "pkg/pagination/v2" + ], + "pkg/framework/entutils/testutils/ent1/db/ent.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1" + ], + "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go": [ + "pkg/framework/entutils/testutils/ent1/db", + "pkg/framework/entutils/testutils/ent1/db/runtime", + "pkg/framework/entutils/testutils/ent1/db/migrate" + ], + "pkg/framework/entutils/testutils/ent1/db/example1.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1" + ], + "pkg/framework/entutils/testutils/ent1/db/example1/where.go": [ + "pkg/framework/entutils/testutils/ent1/db/predicate" + ], + "pkg/framework/entutils/testutils/ent1/db/example1_create.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1" + ], + "pkg/framework/entutils/testutils/ent1/db/example1_delete.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/framework/entutils/testutils/ent1/db/predicate" + ], + "pkg/framework/entutils/testutils/ent1/db/example1_query.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/framework/entutils/testutils/ent1/db/predicate" + ], + "pkg/framework/entutils/testutils/ent1/db/example1_update.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/framework/entutils/testutils/ent1/db/predicate" + ], + "pkg/framework/entutils/testutils/ent1/db/expose.go": [ + "pkg/framework/entutils" + ], + "pkg/framework/entutils/testutils/ent1/db/hook/hook.go": [ + "pkg/framework/entutils/testutils/ent1/db" + ], + "pkg/framework/entutils/testutils/ent1/db/mutation.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/framework/entutils/testutils/ent1/db/predicate" + ], + "pkg/framework/entutils/testutils/ent1/db/paginate.go": [ + "pkg/pagination" + ], + "pkg/framework/entutils/testutils/ent1/db/runtime.go": [ + "pkg/framework/entutils/testutils/ent1/db/example1", + "pkg/framework/entutils/testutils/ent1/schema" + ], + "pkg/framework/entutils/testutils/ent1/entc.go": [ + "pkg/framework/entutils/entcursor", + "pkg/framework/entutils/entexpose", + "pkg/framework/entutils/entpaginate" + ], + "pkg/framework/entutils/testutils/ent1/schema/example1.go": [ + "pkg/framework/entutils" + ], + "pkg/framework/entutils/testutils/ent2/db/client.go": [ + "pkg/framework/entutils/testutils/ent2/db/migrate", + "pkg/framework/entutils/testutils/ent2/db/example2" + ], + "pkg/framework/entutils/testutils/ent2/db/ent.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2" + ], + "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go": [ + "pkg/framework/entutils/testutils/ent2/db", + "pkg/framework/entutils/testutils/ent2/db/runtime", + "pkg/framework/entutils/testutils/ent2/db/migrate" + ], + "pkg/framework/entutils/testutils/ent2/db/example2.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2" + ], + "pkg/framework/entutils/testutils/ent2/db/example2/where.go": [ + "pkg/framework/entutils/testutils/ent2/db/predicate" + ], + "pkg/framework/entutils/testutils/ent2/db/example2_create.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2" + ], + "pkg/framework/entutils/testutils/ent2/db/example2_delete.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2", + "pkg/framework/entutils/testutils/ent2/db/predicate" + ], + "pkg/framework/entutils/testutils/ent2/db/example2_query.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2", + "pkg/framework/entutils/testutils/ent2/db/predicate" + ], + "pkg/framework/entutils/testutils/ent2/db/example2_update.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2", + "pkg/framework/entutils/testutils/ent2/db/predicate" + ], + "pkg/framework/entutils/testutils/ent2/db/expose.go": [ + "pkg/framework/entutils" + ], + "pkg/framework/entutils/testutils/ent2/db/hook/hook.go": [ + "pkg/framework/entutils/testutils/ent2/db" + ], + "pkg/framework/entutils/testutils/ent2/db/mutation.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2", + "pkg/framework/entutils/testutils/ent2/db/predicate" + ], + "pkg/framework/entutils/testutils/ent2/db/runtime.go": [ + "pkg/framework/entutils/testutils/ent2/db/example2", + "pkg/framework/entutils/testutils/ent2/schema" + ], + "pkg/framework/entutils/testutils/ent2/entc.go": [ + "pkg/framework/entutils/entexpose" + ], + "pkg/framework/entutils/testutils/ent2/schema/example2.go": [ + "pkg/framework/entutils" + ], + "pkg/framework/entutils/transaction.go": [ + "pkg/framework/transaction" + ], + "pkg/framework/entutils/transaction_test.go": [ + "openmeter/testutils", + "pkg/framework/entutils", + "pkg/framework/entutils/testutils/ent1/db", + "pkg/framework/entutils/testutils/ent2/db", + "pkg/framework/transaction" + ], + "pkg/framework/lockr/locker.go": [ + "openmeter/ent/db", + "pkg/framework/entutils", + "pkg/framework/transaction" + ], + "pkg/framework/lockr/locker_test.go": [ + "openmeter/ent/db", + "openmeter/testutils", + "pkg/framework/entutils", + "pkg/framework/entutils/entdriver", + "pkg/framework/lockr", + "pkg/framework/pgdriver", + "pkg/framework/transaction" + ], + "pkg/framework/lockr/session.go": [ + "pkg/clock", + "pkg/framework/pgdriver" + ], + "pkg/framework/lockr/session_test.go": [ + "openmeter/testutils", + "pkg/framework/pgdriver" + ], + "pkg/framework/operation/middleware_test.go": [ + "pkg/framework/operation" + ], + "pkg/framework/operation/operation_test.go": [ + "pkg/framework/operation" + ], + "pkg/framework/pgdriver/driver.go": [ + "pkg/pgxpoolobserver" + ], + "pkg/framework/transport/httptransport/argshandler.go": [ + "pkg/framework/operation", + "pkg/framework/transport/httptransport/encoder" + ], + "pkg/framework/transport/httptransport/handler.go": [ + "pkg/contextx", + "pkg/framework/commonhttp", + "pkg/framework/operation", + "pkg/framework/transport/httptransport/encoder", + "pkg/models" + ], + "pkg/framework/transport/httptransport/options.go": [ + "pkg/framework/transport/httptransport/encoder" + ], + "pkg/kafka/metrics/internal/broker.go": [ + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/metrics/internal/consumergroup.go": [ + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/metrics/internal/partition.go": [ + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/metrics/internal/topic.go": [ + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/metrics/metrics.go": [ + "pkg/kafka/metrics/internal", + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/metrics/metrics_test.go": [ + "pkg/kafka/metrics/stats" + ], + "pkg/kafka/topicprovisioner_test.go": [ + "openmeter/testutils" + ], + "pkg/lrux/lruitemttl.go": [ + "pkg/clock" + ], + "pkg/lrux/lruitemttl_test.go": [ + "pkg/clock" + ], + "pkg/models/cadence.go": [ + "pkg/timeutil" + ], + "pkg/models/fielddescriptor.go": [ + "pkg/treex" + ], + "pkg/models/fielddescriptor_test.go": [ + "pkg/treex" + ], + "pkg/models/http/annotation.go": [ + "api", + "pkg/models" + ], + "pkg/models/http/metadata.go": [ + "api", + "pkg/models" + ], + "pkg/models/model.go": [ + "pkg/clock", + "pkg/equal" + ], + "pkg/pagination/pagination_test.go": [ + "pkg/pagination" + ], + "pkg/server/poweredby_test.go": [ + "pkg/server" + ], + "pkg/statelessx/actions.go": [ + "pkg/models" + ], + "pkg/strcase/strcase_test.go": [ + "pkg/strcase" + ], + "pkg/timeutil/closedperiod_test.go": [ + "openmeter/testutils", + "pkg/timeutil" + ], + "pkg/timeutil/recurrence.go": [ + "pkg/datetime" + ], + "pkg/timeutil/recurrence_test.go": [ + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/timeutil" + ], + "pkg/timeutil/timeline_test.go": [ + "openmeter/testutils", + "pkg/timeutil" + ], + "quickstart/quickstart_test.go": [ + "api/client/go", + "api/v3", + "openmeter/meter" + ], + "test/app/custominvoicing/event_test.go": [ + "openmeter/app/custominvoicing", + "openmeter/billing", + "test/billing" + ], + "test/app/custominvoicing/invocing_test.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil", + "test/billing" + ], + "test/app/marketplace.go": [ + "openmeter/app", + "openmeter/app/stripe", + "pkg/models", + "pkg/pagination" + ], + "test/app/stripe/appstripe.go": [ + "api", + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/app", + "openmeter/secret/entity", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/pagination" + ], + "test/app/stripe/fixture.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/client", + "openmeter/customer" + ], + "test/app/stripe/invoice_credits_test.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/app/stripe/client", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/timeutil", + "test/billing" + ], + "test/app/stripe/invoice_test.go": [ + "openmeter/app", + "openmeter/app/stripe", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/client", + "openmeter/app/stripe/service", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/testutils", + "openmeter/customer", + "openmeter/ent/tx", + "openmeter/ledger/breakage", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/resolvers", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/secret", + "openmeter/secret/adapter", + "openmeter/secret/service", + "openmeter/streaming", + "openmeter/taxcode", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil", + "test/billing" + ], + "test/app/stripe/secret_mock.go": [ + "openmeter/secret", + "openmeter/secret/adapter", + "openmeter/secret/entity", + "openmeter/secret/service", + "pkg/models" + ], + "test/app/stripe/stripe_mock.go": [ + "openmeter/app/stripe/client" + ], + "test/app/stripe/testenv.go": [ + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/service", + "openmeter/app/stripe", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/client", + "openmeter/app/stripe/service", + "openmeter/billing", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "test/app" + ], + "test/app/testenv.go": [ + "app/config", + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/service", + "openmeter/app/stripe/adapter", + "openmeter/app/stripe/service", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/rating/service", + "openmeter/billing/service", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/meter/mockadapter", + "openmeter/registry/builder", + "openmeter/secret/adapter", + "openmeter/secret/service", + "openmeter/streaming/testutils", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/framework/lockr", + "tools/migrate" + ], + "test/billing/adapter_test.go": [ + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/models/stddetailedline", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/collection_config_test.go": [ + "openmeter/billing", + "pkg/datetime" + ], + "test/billing/collection_test.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/customeroverride_test.go": [ + "openmeter/billing", + "openmeter/customer", + "pkg/datetime", + "pkg/models" + ], + "test/billing/discount_test.go": [ + "openmeter/billing", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/event_test.go": [ + "openmeter/billing" + ], + "test/billing/invoice_test.go": [ + "openmeter/app/sandbox", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/models/stddetailedline", + "openmeter/billing/models/totals", + "openmeter/billing/rating", + "openmeter/billing/service/invoicecalc", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/streaming", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "test/billing/lineengine_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/profile.go": [ + "openmeter/app", + "openmeter/billing", + "pkg/datetime", + "pkg/models" + ], + "test/billing/profile_test.go": [ + "openmeter/app", + "openmeter/billing", + "pkg/datetime", + "pkg/models" + ], + "test/billing/schemamigration_test.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db/billinginvoiceline", + "openmeter/ent/db/billingstandardinvoicedetailedline", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/subscription_suite.go": [ + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/hook", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/tx", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/boolean", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/static", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/productcatalog/subscription/testutils", + "openmeter/streaming/testutils", + "openmeter/subscription", + "openmeter/subscription/addon", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/ffx", + "pkg/framework/lockr" + ], + "test/billing/subscription_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/service", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/datetime", + "pkg/featuregate", + "pkg/models" + ], + "test/billing/suite.go": [ + "app/config", + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/custominvoicing", + "openmeter/app/custominvoicing/adapter", + "openmeter/app/custominvoicing/service", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/models/totals", + "openmeter/billing/rating/service", + "openmeter/billing/service", + "openmeter/billing/service/invoicecalc", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/ent/db", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/registry/builder", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/subject/service/hooks", + "openmeter/taxcode", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/framework/lockr", + "pkg/models", + "pkg/timeutil", + "tools/migrate" + ], + "test/billing/tax_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db/billinginvoiceline", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/taxcode", + "pkg/clock", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/taxcode_dual_write_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/customer", + "openmeter/ent/db/taxcode", + "openmeter/productcatalog", + "pkg/currencyx", + "pkg/models", + "pkg/timeutil" + ], + "test/billing/ubpflatfee_test.go": [ + "openmeter/billing", + "openmeter/productcatalog", + "pkg/clock", + "pkg/models", + "pkg/timeutil" + ], + "test/credits/base.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/lineage", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/testutils", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ent/tx", + "openmeter/ledger", + "openmeter/ledger/account", + "openmeter/ledger/breakage", + "openmeter/ledger/breakage/adapter", + "openmeter/ledger/chargeadapter", + "openmeter/ledger/collector", + "openmeter/ledger/customerbalance", + "openmeter/ledger/recognizer", + "openmeter/ledger/resolvers", + "openmeter/ledger/testutils", + "openmeter/ledger/transactions", + "openmeter/productcatalog", + "openmeter/testutils", + "pkg/clock", + "pkg/currencyx", + "pkg/timeutil", + "test/billing" + ], + "test/credits/credit_then_invoice_test.go": [ + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ledger", + "openmeter/productcatalog", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/pagination", + "pkg/timeutil", + "test/billing" + ], + "test/credits/creditgrant_test.go": [ + "openmeter/app", + "openmeter/billing", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/creditpurchase/adapter", + "openmeter/billing/charges/creditpurchase/service", + "openmeter/billing/charges/lineage/adapter", + "openmeter/billing/charges/lineage/service", + "openmeter/billing/charges/meta/adapter", + "openmeter/billing/charges/models/payment", + "openmeter/billing/creditgrant", + "openmeter/billing/creditgrant/service", + "openmeter/customer", + "openmeter/ent/tx", + "openmeter/ledger/breakage", + "openmeter/ledger/chargeadapter", + "openmeter/productcatalog", + "openmeter/taxcode", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models", + "test/billing" + ], + "test/credits/rating_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/meta", + "openmeter/productcatalog", + "pkg/clock", + "pkg/datetime", + "pkg/pagination", + "pkg/timeutil" + ], + "test/credits/sanity_lifecycle_test.go": [ + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ledger", + "openmeter/productcatalog", + "openmeter/streaming/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/timeutil", + "test/billing" + ], + "test/credits/sanity_test.go": [ + "openmeter/app", + "openmeter/app/custominvoicing", + "openmeter/billing", + "openmeter/billing/charges", + "openmeter/billing/charges/creditpurchase", + "openmeter/billing/charges/flatfee", + "openmeter/billing/charges/meta", + "openmeter/billing/charges/models/creditrealization", + "openmeter/billing/charges/models/payment", + "openmeter/billing/charges/usagebased", + "openmeter/customer", + "openmeter/ent/db", + "openmeter/ent/db/ledgerbreakagerecord", + "openmeter/ledger", + "openmeter/ledger/transactions", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/streaming/testutils", + "openmeter/taxcode", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil", + "test/billing" + ], + "test/customer/customer.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription/service", + "openmeter/streaming", + "openmeter/subscription", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/filter", + "pkg/models", + "pkg/pagination", + "pkg/sortx" + ], + "test/customer/subject.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/entitlement", + "openmeter/meter", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "openmeter/subscription/workflow", + "pkg/clock", + "pkg/currencyx", + "pkg/datetime", + "pkg/models", + "pkg/timeutil" + ], + "test/customer/testenv.go": [ + "app/config", + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/rating/service", + "openmeter/billing/service", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/customer/service/hooks", + "openmeter/entitlement", + "openmeter/entitlement/validators/customer", + "openmeter/meter/adapter", + "openmeter/meter/service", + "openmeter/productcatalog/addon/adapter", + "openmeter/productcatalog/addon/service", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/featureresolver", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/plan/adapter", + "openmeter/productcatalog/plan/service", + "openmeter/productcatalog/planaddon/adapter", + "openmeter/productcatalog/planaddon/service", + "openmeter/registry/builder", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/subject/service/hooks", + "openmeter/subscription", + "openmeter/subscription/addon/repo", + "openmeter/subscription/addon/service", + "openmeter/subscription/entitlement", + "openmeter/subscription/hooks/annotations", + "openmeter/subscription/repo", + "openmeter/subscription/service", + "openmeter/subscription/testutils", + "openmeter/subscription/validators/customer", + "openmeter/subscription/workflow", + "openmeter/subscription/workflow/service", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/ffx", + "pkg/framework/lockr", + "pkg/models" + ], + "test/entitlement/regression/framework_test.go": [ + "openmeter/credit", + "openmeter/credit/adapter", + "openmeter/credit/balance", + "openmeter/credit/grant", + "openmeter/credit/hook", + "openmeter/customer", + "openmeter/customer/adapter", + "openmeter/customer/service", + "openmeter/ent/db", + "openmeter/ent/tx", + "openmeter/entitlement", + "openmeter/entitlement/adapter", + "openmeter/entitlement/boolean", + "openmeter/entitlement/hooks/subscription", + "openmeter/entitlement/metered", + "openmeter/entitlement/service", + "openmeter/entitlement/static", + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/streaming/testutils", + "openmeter/subject", + "openmeter/subject/adapter", + "openmeter/subject/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/framework/entutils/entdriver", + "pkg/framework/lockr", + "pkg/framework/pgdriver", + "pkg/models" + ], + "test/entitlement/regression/scenario_test.go": [ + "openmeter/credit", + "openmeter/credit/grant", + "openmeter/entitlement", + "openmeter/entitlement/balanceworker", + "openmeter/entitlement/driver", + "openmeter/entitlement/metered", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "pkg/clock", + "pkg/convert", + "pkg/models", + "pkg/pagination", + "pkg/timeutil" + ], + "test/notification/channel.go": [ + "openmeter/notification", + "openmeter/notification/webhook/secret", + "pkg/models" + ], + "test/notification/consumer_balance.go": [ + "api", + "openmeter/entitlement", + "openmeter/entitlement/snapshot", + "openmeter/event/models", + "openmeter/meter", + "openmeter/notification", + "openmeter/notification/consumer", + "openmeter/productcatalog/feature", + "openmeter/subject", + "pkg/convert", + "pkg/models", + "pkg/sortx", + "pkg/timeutil" + ], + "test/notification/event.go": [ + "api", + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog/feature", + "pkg/convert", + "pkg/models" + ], + "test/notification/repository.go": [ + "openmeter/notification", + "pkg/models", + "pkg/pagination" + ], + "test/notification/rule.go": [ + "openmeter/meter", + "openmeter/notification", + "openmeter/productcatalog/feature", + "pkg/convert", + "pkg/models" + ], + "test/notification/testenv.go": [ + "openmeter/meter", + "openmeter/meter/mockadapter", + "openmeter/notification", + "openmeter/notification/adapter", + "openmeter/notification/eventhandler", + "openmeter/notification/service", + "openmeter/notification/webhook", + "openmeter/notification/webhook/svix", + "openmeter/productcatalog/adapter", + "openmeter/productcatalog/feature", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/defaultx", + "pkg/pglockx" + ], + "test/notification/webhook.go": [ + "openmeter/notification/webhook", + "pkg/convert", + "pkg/defaultx" + ], + "test/subscription/framework_test.go": [ + "openmeter/app", + "openmeter/app/adapter", + "openmeter/app/sandbox", + "openmeter/app/service", + "openmeter/billing", + "openmeter/billing/adapter", + "openmeter/billing/rating/service", + "openmeter/billing/service", + "openmeter/billing/service/invoicecalc", + "openmeter/billing/worker/subscriptionsync", + "openmeter/billing/worker/subscriptionsync/adapter", + "openmeter/billing/worker/subscriptionsync/service", + "openmeter/productcatalog/subscription", + "openmeter/productcatalog/subscription/service", + "openmeter/subscription", + "openmeter/subscription/testutils", + "openmeter/subscription/workflow", + "openmeter/taxcode/adapter", + "openmeter/taxcode/service", + "openmeter/testutils", + "openmeter/watermill/eventbus", + "pkg/datetime", + "pkg/featuregate", + "pkg/models" + ], + "test/subscription/scenario_editaligned_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "test/subscription/scenario_editcancel_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/feature", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/patch", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "test/subscription/scenario_entinnextphase_test.go": [ + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "test/subscription/scenario_firstofmonth_test.go": [ + "openmeter/billing", + "openmeter/customer", + "openmeter/productcatalog", + "openmeter/productcatalog/plan", + "openmeter/productcatalog/subscription", + "openmeter/subscription", + "openmeter/subscription/workflow", + "openmeter/testutils", + "pkg/clock", + "pkg/datetime", + "pkg/models" + ], + "tools/migrate/cmd/viewgen/main.go": [ + "tools/migrate/viewgen" + ], + "tools/migrate/ledger_tax_behavior_test.go": [ + "openmeter/testutils", + "tools/migrate" + ], + "tools/migrate/migrate_test.go": [ + "openmeter/testutils", + "tools/migrate" + ], + "tools/migrate/productcatalog_test.go": [ + "openmeter/productcatalog" + ], + "tools/migrate/view_parity_test.go": [ + "openmeter/testutils", + "tools/migrate", + "tools/migrate/viewgen" + ], + "tools/migrate/viewgen/viewgen.go": [ + "pkg/strcase" + ] + }, + "file_hashes": { + ".codex/agents/archie-analysis.toml": "08a103ee2d156865990f0219839bd3971cc0ec1c120d2a08dc2c76d639fbb888", + ".codex/rules/archie.rules": "f2644dc8272fbba6fe38c6798960c040d8c9d87ad4da53c9d9b8ec483f9f264b", + ".dockerignore": "4a8088ac10b83573f4c51206131ea5ff83da8e05866b208731c176a38bc289d6", + ".editorconfig": "19ed1daaadeee01d415e39a3b853c284950392dc260d7ba9b6ca433709668804", + ".gitignore": "d8687fbcf1eb873536b0bf2853d6f3c41faec0d937410a5998f548aba6e2cd8f", + "AGENTS.md": "24a9093bb24af09dbb17521b0d33e3cb73074449018a08275bdfc669e7174f35", + "CLAUDE.md": "cc888cb5ea1c7f3e06e9e5d1c1695af324e78964a369ab224d8f441c346f9597", + "CODE_OF_CONDUCT.md": "69efb449446060e0f6fca4b519b7e986102c3b1f233229d3f4005bede05ace5c", + "CONTRIBUTING.md": "c45f7f77a19113dcea8fcd8bb3ba37a911df9951c96b7154862afca96e82b765", + "Dockerfile": "0baca3a3b01582514f241748819e2ed768514e4687e7c7c64f57d80c6486c319", + "LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "Makefile": "c52af28d18b3f7fae80ffe5116d81430a49157b6c14c7273d31b980cd2fafd74", + "README.md": "70efe6ff9b776bdea7265a3a6301205cc8e506f37ff471a6ca3524da46b200fb", + "SECURITY.md": "170604536568bb1be0883f940305daddc8e887586d9a5a6c996ecb67c7130afe", + "api/api.gen.go": "06cd35bea33bd2edfbef768d84d98028ce72acd1e1529934135f8cd2a48e1387", + "api/api.go": "6e04475f0b33273b0b113a92acc79408e455e7698f03c865c5f598b405416228", + "api/client/go/README.md": "d9f2fad1e315e64d49af9e3b5f58b4717e2cb15d80dd65f217b8961dc737f9d7", + "api/client/go/client.gen.go": "e01e87623a903028e7c7aa77cb0f7ca60f99ac630e83fda2fa5333d1c827a06a", + "api/client/go/client.go": "91e26614de354e5b2ecd8af075b6bf4bc1b932300451ae8885109a60065d00cc", + "api/client/go/client_test.go": "9830b11e4a6228f376fe98409871d416693c18820e234aaf00e6ead77f25c60b", + "api/client/go/codegen.yaml": "c5c27aeaca236f1078417786637575a04b7c549f8d1753889755b09cb5398aad", + "api/client/go/error.go": "49e58a59d048ca2e011d83c6363f1da79937c375edb6d581fdf97d606968d9bb", + "api/client/javascript/.gitignore": "898599d921a2b9ff31ed966034ddf5407372b17f5b70801c2989c12700de4a4d", + "api/client/javascript/Makefile": "d8b9080d2ee3af28f17d361042353376554f95bb6953314c9b865ccc3c5f595d", + "api/client/javascript/README.md": "2448c6cab008669df0a67524f863d93d4a3587077ff50250cb8b425cbfcec368", + "api/client/javascript/biome.json": "4c34451d782a6ef009addb1e200d0b6d2ce5ed618959ec3a09d83392546fbd65", + "api/client/javascript/index.ts": "3f883ed52357d439cb20ee31401eee1f21237363047f387c25ffe8b8106978d3", + "api/client/javascript/orval.config.ts": "802392511cc51962672bb4e5f45a20cd42880ed122df015b826b7a900d5d70a7", + "api/client/javascript/package.json": "8d0da9579b9bcbb5651c424787775c99569cf5d823659387d2a3608ead509869", + "api/client/javascript/patches/openapi-typescript.patch": "0e016926efaca4cd6909b2bf6c9b2f03eb66a5084b7bdbf10313eeee90793e01", + "api/client/javascript/pnpm-lock.yaml": "9abc7adbc717f136d9e86fc061c36d6111d7e848878747cf59f40c56629be0cb", + "api/client/javascript/pnpm-workspace.yaml": "2b25ddbf331b0ff51be117915cd2227449a009569b33c2d211f65d3af64c7d9a", + "api/client/javascript/scripts/add-as-const.ts": "1c2d80edab8a0124a0cf3d95b0da44e4b98105d5eeabcd3cc16ba3cbff7a83a8", + "api/client/javascript/scripts/generate.ts": "b97f1e960ffb7d45ebfe4c58a78c2f4b3bec7f4531585994a65dc2a6a632c8f3", + "api/client/javascript/src/client/addons.ts": "cf7eef9bc8043ba244437abdb4e5eacf54efa7ef48dede51d7231d662f3427e7", + "api/client/javascript/src/client/apps.ts": "224110b8a1f94352eb1113559d92aef6a307deb7be746b04365bac5db5c0b78c", + "api/client/javascript/src/client/billing.ts": "8b69f5f66e00aa96b242b68501bef5e6ded428e0562e621b42389b7601f9ab66", + "api/client/javascript/src/client/common.ts": "ca2ce34df376ca937650c586dff6f657c338f994e5e686f2ca538619a36d3be6", + "api/client/javascript/src/client/customers.ts": "3a42a39ba3f825d4a2c4bf170438ca4f20675c1f861a400424f5e706dbb4bad6", + "api/client/javascript/src/client/debug.ts": "0e6b23ba5addfe816b3925fd20dd77392bccb30a7c70adf8c8d9be0bce884bc5", + "api/client/javascript/src/client/entitlements.ts": "49be8543a1f835488bd1fc7cbebcd8690cde62c13a87826fe54aba224d8f78ed", + "api/client/javascript/src/client/events.spec.ts": "e9435d406de6c7320990954eb859faab95abaffdb1a88f0ecd19cd1a1450876b", + "api/client/javascript/src/client/events.ts": "10b11dfd16755786bea720adb30100b8cba1fa26de91417be593b6f1084b0d27", + "api/client/javascript/src/client/features.ts": "323b0d637bdaaacb22a4e0809e61e051f543077f96400857437e02749c9dda3d", + "api/client/javascript/src/client/index.ts": "30c8c16314a8f380a939fca6239ccfca4a114426ad0333da6707ae8a99e51cb2", + "api/client/javascript/src/client/info.ts": "9293fad05ab315ad039547dbd42820addbf941c4eae57678a609a8c1240e6d50", + "api/client/javascript/src/client/meters.ts": "a5e3674b795cc576b4d07bbff5f1a8df4f31da25df002064ae586860af80e460", + "api/client/javascript/src/client/notifications.ts": "2233e951d805e59b33f7caf9ec3e8fe65efdabb016618e8dc2a7c341ab23c812", + "api/client/javascript/src/client/plans.ts": "2b835647fa42fb5777165fe3a23e88251a005bfc23fb72fbd31888229520a64e", + "api/client/javascript/src/client/portal.ts": "4de8761466086ba670562d1227c0b40ff1d2d9612a5c1a6537c18f5583771fef", + "api/client/javascript/src/client/schemas.ts": "116b6da28324a0bb36a0a9443e09c2a068edb0b84d95378e1afe31feaa1a831f", + "api/client/javascript/src/client/subjects.ts": "a10b90dfb96382722bdabb9f0c72c5f53750ffc7e27c15c8a7915e5a7b82e10e", + "api/client/javascript/src/client/subscription-addons.ts": "6916ea18f0a7be7a27a996d832561e845e7de12ed5d3d0ded218a44dadef5b71", + "api/client/javascript/src/client/subscriptions.ts": "3ef61fa4980e0818e6014f112d1bd1959b93203496adeb41fd597b88c64ef018", + "api/client/javascript/src/client/utils.ts": "98ac6b4ee0f31c321402656bca2d99a46df434ec9b9f4e859f2c513ccf88f003", + "api/client/javascript/src/portal/index.ts": "20357492c3ec79590a2407ee4534c1216e47a49a4583a0c485b65e822085d308", + "api/client/javascript/src/react/context.tsx": "b86536b1b88afb252cc133f922a5a56e4d0f41a6cd3221ef2755e77b5308c574", + "api/client/javascript/src/zod/index.ts": "25de28f847ea3f7500e239f42fdec48fe1a04f05d1cb1e0f9d576928a828ca71", + "api/client/javascript/tsconfig.json": "e49afa3ec23c997e83f4740493d16ac4339b1c9a387c6573e12d1dd5bf1db708", + "api/client/javascript/vitest.config.ts": "7bfc0ce5f9b5c9cfc1fa48156a401e6e08f1a78730fdc9418af60bac0d194fde", + "api/client/node/README.md": "f38bf53dca0b9c2111f21ceae86212e4791df34a695e4d8f992c7411d495bb2d", + "api/client/python/.gitignore": "a79e2a536d6cc6bcb2bc4c1b38c4bc551632b78184f71aa5fb13dab2de39597e", + "api/client/python/MANIFEST.in": "e521ffa372c4ca6f5139f946c3913e9cdede12d79238d245dbf83d7433f220ef", + "api/client/python/Makefile": "bc2ad54b915348d0be18ea3aa429dfd6730debb876521ba3141981d852711718", + "api/client/python/README.md": "f2c39b5bd5d30d6424dcecc2d2e3e2cc670dcdc31a140cb0d1164d6abdcb3f0d", + "api/client/python/examples/README.md": "b28fbe734cbaa096177decb7f4d8b48f2eab88be1d4488ea2ad94c10d31bcbdf", + "api/client/python/examples/async/customer.py": "8dc4f5281a021b2bb5d2dcc58481f7366c8648e185e80f5f7468f8b8c1dcc85f", + "api/client/python/examples/async/entitlement.py": "ffa123cc8fd42189e8185eb153dac940f32d1f81b40769ae5ae5d618b3cd023c", + "api/client/python/examples/async/ingest.py": "db72bcb4b24ff96346975729600a108f7c79e47e01899ea8941dc098ed649a23", + "api/client/python/examples/async/query.py": "2011a42af01205af27a33525a7270639f9f068054e334216195891e904026bd5", + "api/client/python/examples/async/subscription.py": "88ffb990c9fa855ffff833a3d762aee3c839b1d289697c35c47086c207cdfe59", + "api/client/python/examples/pyproject.toml": "efa08cc0ef434aaeb31f00d379553464b9c5b06e0f25c11a24fb13f31d7a4a9e", + "api/client/python/examples/pyrightconfig.json": "3d49a6a2ae8a3c0ba630dc170c6bdcfc8a0b182bd0bec05c301df042144005e5", + "api/client/python/examples/sync/customer.py": "5670029bc578365e10f4f41911a106b7bea3f2875d953bc3f918ae15fdca4884", + "api/client/python/examples/sync/entitlement.py": "17db6791724a9adaa46698b80ebc2cccff02f0bd46db95f3ceb09763b7b4d472", + "api/client/python/examples/sync/ingest.py": "637bc420eb44ce1eab023b4f0a721dcaf9118e69cefa5730a375a369a66bbe5b", + "api/client/python/examples/sync/query.py": "95d138ff67f20c595ed24f0a494b51347e20e02161fe2f1bf954462ecca49e39", + "api/client/python/examples/sync/subscription.py": "0cb905745d2e6251322f4cd18196d74514635094a6a84604463b1d108c46188b", + "api/client/python/openmeter/__init__.py": "6e94fbdd41bb9992ff26312a3306d8c7aabaf6303c27925ca2e9752dc0e89210", + "api/client/python/openmeter/_client.py": "6e12aba718aa8d78c3ff31362f41014339d719b73065355161782ebe38b74893", + "api/client/python/openmeter/_commit.py": "270929f669c34b4dffb9b1ae06c4a9b49489edd6253a0095bbfb47d1f33d1af0", + "api/client/python/openmeter/_generated/__init__.py": "2f97d3aa8a59180f670168efc694fe23c87504ae8ff397ba3d20f61b36364f87", + "api/client/python/openmeter/_generated/_client.py": "8c587e9a6cbe412834c5bb5a8018ec41f3abdf6e6cb13cf0475d3978a8984f01", + "api/client/python/openmeter/_generated/_configuration.py": "25191019810c62f5567c8b9537f7c6d98109b3d98b1fdffec84eabf1732e82f5", + "api/client/python/openmeter/_generated/_patch.py": "f2e3c859234d8a565eee78c0bb91b3d2d077302a7268e98f7a88f6846adc0a58", + "api/client/python/openmeter/_generated/_types.py": "6d0a8246af84f898fe055c09f0dfa6d1df75212f5cf5181020ee83f1fb53fae7", + "api/client/python/openmeter/_generated/_utils/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "api/client/python/openmeter/_generated/_utils/model_base.py": "37234370219692ba24934831f5cef5a553ee3fb66da0e532bce75a62844db1e2", + "api/client/python/openmeter/_generated/_utils/serialization.py": "8dcfbef69b281ca90ba12223eb0b208c75b1aab590848ee83e8de20696236b87", + "api/client/python/openmeter/_generated/_version.py": "3319df3a5f32014885dc9fc80007d56e186915a06c3ae3c94997b2dc116bb1b1", + "api/client/python/openmeter/_generated/aio/__init__.py": "e447796d776d34def48c1aeb382fcd378116e196dc3f6829c70b29596ccd0292", + "api/client/python/openmeter/_generated/aio/_client.py": "f5905551a75182af0e0354bfc80bb56596f8a168d7fbc37f7b14f4f18e1b93b6", + "api/client/python/openmeter/_generated/aio/_configuration.py": "4b46368af640c8b943e492776fb8001d6e9ad8d24091637190279ee792e5f6bd", + "api/client/python/openmeter/_generated/aio/_patch.py": "f2e3c859234d8a565eee78c0bb91b3d2d077302a7268e98f7a88f6846adc0a58", + "api/client/python/openmeter/_generated/aio/operations/__init__.py": "b9ce97b61fe555a8d16c3345ea6e441eadb8a61bab0c55f1024446c144c468d8", + "api/client/python/openmeter/_generated/aio/operations/_operations.py": "d97813e1098c1a7797114d9521b2a26c4931caf5b62768c8e08529b6e3233844", + "api/client/python/openmeter/_generated/aio/operations/_patch.py": "f2e3c859234d8a565eee78c0bb91b3d2d077302a7268e98f7a88f6846adc0a58", + "api/client/python/openmeter/_generated/models/__init__.py": "ad2b7309a2cae729c96ef4072189e983b54de3db93d6cd0c5a2ed5f5f52eaa9e", + "api/client/python/openmeter/_generated/models/_enums.py": "7723163b6d79cb43f5a1abf3e7cfdf5aef88743ed23ea71c15768d807d5233f0", + "api/client/python/openmeter/_generated/models/_models.py": "39f37794976b78a06308e8b355f89fc9334a64064ae9f73338c72304a16cb7c6", + "api/client/python/openmeter/_generated/models/_patch.py": "f2e3c859234d8a565eee78c0bb91b3d2d077302a7268e98f7a88f6846adc0a58", + "api/client/python/openmeter/_generated/operations/__init__.py": "b9ce97b61fe555a8d16c3345ea6e441eadb8a61bab0c55f1024446c144c468d8", + "api/client/python/openmeter/_generated/operations/_operations.py": "607aef9332eba6bc9f9aec518021235a907a6cbefd6a9725719ca6aeda05717b", + "api/client/python/openmeter/_generated/operations/_patch.py": "f2e3c859234d8a565eee78c0bb91b3d2d077302a7268e98f7a88f6846adc0a58", + "api/client/python/openmeter/_types.py": "6d0a8246af84f898fe055c09f0dfa6d1df75212f5cf5181020ee83f1fb53fae7", + "api/client/python/openmeter/_version.py": "3319df3a5f32014885dc9fc80007d56e186915a06c3ae3c94997b2dc116bb1b1", + "api/client/python/openmeter/aio/__init__.py": "29c5ffb64845d8df8dae09397d769f7f119012bc8f82215c20e270ca678277d6", + "api/client/python/openmeter/aio/_client.py": "cdb1a66c49d5fc8cdc6e1088634e912502d1a81cb2ca9f649e79ab90532e0109", + "api/client/python/openmeter/aio/operations/__init__.py": "9da3ed3e905c8fd02094523caf34231a8160c458e7ac90e56fa3884a4c2dd55e", + "api/client/python/openmeter/models/__init__.py": "c05c293c9ea98c8706f2a8c4977131da6cffb2413b257ca96a657901ffb5cb94", + "api/client/python/openmeter/operations/__init__.py": "88cfe162892e7477a59cdc15b8e01c1455ba272cc2d12c620ddb0b91c0593f12", + "api/client/python/openmeter/py.typed": "75caeca89adc61f4d7f9c90b1493136a3ea60fc6837b6bb4b64406f996319c48", + "api/client/python/pyproject.toml": "cc4ce43db2dd01436473fb9d63c05fe5f595a58c135195f192dacd9aefb86f2b", + "api/client/python/scripts/release.sh": "8ff1b517450c1f6b96c8068f3b5c1367de5c4f2ef8257bd95a49da666795a802", + "api/client/web/README.md": "789eed6b75ebc5424f516f4462154fda9add4f56b030079e5609001925407243", + "api/codegen.yaml": "07a4d518eae063276969fd38c9982d4cfddbc7d5f819c33e0aec201e5b5bd028", + "api/convert.gen.go": "1cb4c1ee2909b074ede556b7bf3b28a069e897fa7f61f51a8c87192ca4dace9c", + "api/convert.go": "ed7835a37c9c005aef44112cc47cd5a5c4e9c8860958f1abbee3a9f49d1b5148", + "api/openapi.cloud.yaml": "bb39603ed915cc6dd4276db13a19a9b78dc90af6a55f8db294bb3bd269827f2c", + "api/openapi.yaml": "24acd8b61b7589c2d62dcfeaa8d24408181b456da2752add8ce5321f5827a620", + "api/spec/.gitignore": "546e6b021f3bd2964b70a844d7bf88de112b83d62d14898a14ec7bfea891dfbc", + "api/spec/Makefile": "a1541f4acd4be069910b820ce18036c2597d2f0756a337844e7adbad079c6c39", + "api/spec/README.md": "54ea92ae55e2ce0d77c1e21848a132586ea71fb1799fd2cd0730bd28f497b5b8", + "api/spec/package.json": "f8be040431350599d7fb7c436e2275b57c9148f6c80886157d0a30076f8bbdf0", + "api/spec/packages/aip/common/definitions/aip_filters.yaml": "f1267ae71e19dcc8294089d7750f5df32b029e5699e6d73389f2e2ad94899af2", + "api/spec/packages/aip/common/definitions/errors.yaml": "66c0c5988f91bd1f0406ffcd410524993681e60190b73f2699253bd612a3b287", + "api/spec/packages/aip/common/definitions/konnect_properties.yaml": "01a33fa9ec1c88d85d62c31b477db2634dbe0a81d579035b3980258ce40eb73d", + "api/spec/packages/aip/common/definitions/metadatas.yaml": "63c12195dfd584c3f0771c4a39c345c6dd6c98075e8331e1ee99e63a377c0030", + "api/spec/packages/aip/common/definitions/properties.yaml": "ab6f3346f42ae4ff17d1b5367554f1b625ed7bbcae37ab88697b5bbea39e3851", + "api/spec/packages/aip/common/definitions/security.yaml": "70902187ea983eee2f95e54047101fe4733a5c2b28423cf9f802281e0d3e5126", + "api/spec/packages/aip/lib/index.js": "4f1c7fa394480fd4abf5c9a47bdebc46597a48512278d56629a7447aad3aa388", + "api/spec/packages/aip/lib/rules/casing.js": "f01ec5ab4281e1d485d156a1f45689e063936fde434069af0677ee21a8c64c14", + "api/spec/packages/aip/lib/rules/composition-over-inheritance.js": "c4d0461af403c8339fb83b893e7fe338bb187eaf6a112477911d195dac18587d", + "api/spec/packages/aip/lib/rules/docs.js": "0ecd0da0ca406c7fd99f9b947c1b6efaef982e36033b8974796a4acf2cbb360b", + "api/spec/packages/aip/lib/rules/field-prefix.js": "e92f8029eb008ffe5d0f0e3b31bfe524a313edf4b9d27b39feb0c788caff2498", + "api/spec/packages/aip/lib/rules/friendly-name.js": "cf4b77f8bd9aa493775f78dbc779675668bdc466fa63db472ac4b01076ec788d", + "api/spec/packages/aip/lib/rules/no-nullable.js": "3429bb49f907d9c3d8de153a5ebe8d2991076dd2711ca855c53845fe9339ba5d", + "api/spec/packages/aip/lib/rules/operation-id.js": "8a31847409a368e4ae3bfb3ba506c5557a3fa8e731ffd6118f32fa1f275ab516", + "api/spec/packages/aip/lib/rules/operation-summary.js": "922ee6d414dac83b81fabee626f1dd534491d2d9af9734c0e412c3e2c276050c", + "api/spec/packages/aip/lib/rules/utils.js": "9be50891add9ab9bf891a708dcbfb2d7fea20820dc5c96a6f2eda7ac7390dcfd", + "api/spec/packages/aip/package.json": "12697f7eeacde848deff5e03a0d79e4cc304925e45eb5800e699133410d31494", + "api/spec/packages/aip/scripts/apply-doc-fixes.mjs": "654357c6d669fe733d0c10345b1958ea9159d324f2e3f8b1708e9cf62014612b", + "api/spec/packages/aip/scripts/flatten-allof.mjs": "1d06d17f38fc5959175c699b73ece113318a65247f74abe85f789de1a2240122", + "api/spec/packages/aip/scripts/seal-object-schemas.mjs": "af1a1143e27ef675e4f566a8ff0a2b1216504f25cf53b4bc758179a1fa921d6a", + "api/spec/packages/aip/src/apps/app.tsp": "953ca6bdf648128983eb8f401543d0a9c9791d96c979ea80f9071e91b3118b8a", + "api/spec/packages/aip/src/apps/catalog.tsp": "5499ef57ebf6ade8a69f12796ef72b97f20dd95f0bcc8751c111697088d0f4ac", + "api/spec/packages/aip/src/apps/customer.tsp": "2d14e969bf5ef104bf0507e25e6a9378d78e0338dab75ed11926e15377a5ac05", + "api/spec/packages/aip/src/apps/external_invoicing.tsp": "17a163a30d70299ef40ca7af2d76b86ee8b8615b102c9d7240b665664873b3a1", + "api/spec/packages/aip/src/apps/index.tsp": "10a86eb7c11b19a31adaa61c92b8f071568feaeabbe9147957f347f12da07b49", + "api/spec/packages/aip/src/apps/operations.tsp": "387b4d581a2326254aa3ebbde792605ca524ff31efb26e1ab02e26b83155d731", + "api/spec/packages/aip/src/apps/sandbox.tsp": "1b0aeb16327ab302b89e9aa38220935143234ed2925d690fa3ebebbb3b2a505f", + "api/spec/packages/aip/src/apps/stripe.tsp": "767b97a76aeb052d02e7d7d565cfa53c909223f5ab65545a3afb888c41e9e075", + "api/spec/packages/aip/src/billing/index.tsp": "5169f1e8dbf96ca11e18887c2835421364dc72e8956a28ebf5ad3651a662f69f", + "api/spec/packages/aip/src/billing/operations.tsp": "098ca3e7329738c42179c032ed432366f34ecdd9942da99ba17606e07ebef2a9", + "api/spec/packages/aip/src/billing/profile.tsp": "08132fe668fc6c2733ac942fb89fa86fd697384331cf156f8ca62650d877e506", + "api/spec/packages/aip/src/billing/tax.tsp": "6e70453fbbf2f6c4c05abca31046e59d863622c0d74905d669c4cdd3d1d4e197", + "api/spec/packages/aip/src/billing/totals.tsp": "10237eaeeacaf6afcba1f317fcf5649cb3e0977515940d8db35cb1bfc5928b31", + "api/spec/packages/aip/src/common/error.tsp": "a8794fa409af52ea2f9018a3f60401c9726a9f752a8681eedc2a52ac62db78c2", + "api/spec/packages/aip/src/common/pagination.tsp": "1a5404f229058f8ca6dab00ea5701c6a5dfd5f253d9a76b248542ea40a862507", + "api/spec/packages/aip/src/common/parameters.tsp": "f12f370312136da316ad1dafddd8896eefabb994b3cd1daecc15cccdbe3e13c0", + "api/spec/packages/aip/src/common/properties.tsp": "8ec33fa81fbe8407b5f1cec163ba67af325655987d2fd4aa14b6a8e2a747e924", + "api/spec/packages/aip/src/currencies/cost-bases/cost-basis.tsp": "cde0e2e16e278270970c6620fb97fcfc1f554026711478979937d358f828ebb8", + "api/spec/packages/aip/src/currencies/cost-bases/operations.tsp": "e24eddb661199dbca84e736b099d39192dd195f60e37cecb2e3ca2aa1e7da24d", + "api/spec/packages/aip/src/currencies/currency.tsp": "be3f21b840023b72de71d48b486c61a48d97c121a3b7c67f88d8ecfc74e67230", + "api/spec/packages/aip/src/currencies/index.tsp": "a26b983684e9b9e53fa9e5e318562ab55a05295669a7e13a6f07b9d2eb94be63", + "api/spec/packages/aip/src/currencies/operations.tsp": "cbfd069438bef18827f4a37f76e01c6cc05896358e04b6b06d8aef1ae058096b", + "api/spec/packages/aip/src/customers/billing.tsp": "f5f5c017f1747578d5f46273357ef690b7facfbf48a3885beb725b951fdc6f79", + "api/spec/packages/aip/src/customers/charges/charges.tsp": "cf90b6001cafe8d39fdc287445906688161f80dccfd62cb4362f246f1b17f164", + "api/spec/packages/aip/src/customers/charges/index.tsp": "2548d639a66525f4cba11d690943b8ac04258aa566af5f8766bc7b9a77f9d67e", + "api/spec/packages/aip/src/customers/charges/operations.tsp": "9f5a5f3fc2bd7c07f7b301ea19ef9d121824a805f8a5161f4cd809fb13bff838", + "api/spec/packages/aip/src/customers/credits/adjustment.tsp": "1f02afe6cfa945bdf79b5d8fd3ee3a0e7f2aa72ce1f0224e943bed6d4fbd8690", + "api/spec/packages/aip/src/customers/credits/balance.tsp": "8e34773a2cb53f8a25a4e7c76555a1030e75373ab861a5834ef2debd7a1938ec", + "api/spec/packages/aip/src/customers/credits/grant.tsp": "c17110f5f14e822abb03690a83e7843d22c5e0e6e648b5cd58dfad99afc2b8b4", + "api/spec/packages/aip/src/customers/credits/index.tsp": "3ba1981f93f8263dc33f66306526bf8a53cbf7909130ecec77baf8f2932c31d0", + "api/spec/packages/aip/src/customers/credits/ledger.tsp": "07d42e637581c40c2f781de38434b571e0aea87a4958937cfd9ddc0d9353da48", + "api/spec/packages/aip/src/customers/credits/operations.tsp": "2136bce9d632bb0faddb0d810533c4ccb45f4880fba7b8a418d969102ff92c1f", + "api/spec/packages/aip/src/customers/customer.tsp": "20d5a76ef0f145c9afedd4bac068a2a6d09302d36ce09dac6cd78fee2b844c95", + "api/spec/packages/aip/src/customers/index.tsp": "cae6724c0e65dc0372dc7ce71c0442b867858799db356ade28daa33521edd257", + "api/spec/packages/aip/src/customers/operations.tsp": "98dcabe42482d2ec576995de4bb7e1ff2654d75aa493a9105c679598714b74f5", + "api/spec/packages/aip/src/defaults/index.tsp": "f5a056ff64fd64c1c21b1340cb9657f2eb86549796b042e7624ae08bb8945bab", + "api/spec/packages/aip/src/defaults/operations.tsp": "0f93d7c17bcbb316ff49a4a40ca7b04abf717eb3de46294692d52ac4594176bc", + "api/spec/packages/aip/src/defaults/taxcodes.tsp": "dbfd98a4b814175aca5cacd3a6a0825b7ba16bb9a9cd3d32d7d2253a340ef587", + "api/spec/packages/aip/src/entitlements/access.tsp": "6d536e76487f1d84fd27410ab0d80f2309e68f0e7a6bcf59057b9679feea6401", + "api/spec/packages/aip/src/entitlements/entitlements.tsp": "c55b702b08a21a349291374240417c99b66cc4b68a42df9d6396224fcca81a23", + "api/spec/packages/aip/src/entitlements/index.tsp": "9a7d74bf13c398fccc4cea4ccf31831aacfccc7312528b24337edf62900c27ce", + "api/spec/packages/aip/src/entitlements/operations.tsp": "089494566fc7a4912d8a3f9d9c7103d19a156074796be4232876574137046be7", + "api/spec/packages/aip/src/events/event.tsp": "119df41877701bea90f83fb01e8f3d8a1d569be70c48f65a73e9fb95745a1752", + "api/spec/packages/aip/src/events/index.tsp": "bd7ee4b13206b5ed7ce9a0a9f32582b9a6c2490cb8fc35b23367aade18b08f91", + "api/spec/packages/aip/src/events/operations.tsp": "bbc5f2059e7e05cf265343a90f3b88899c15a620b13dbd16f838db8d6450a33e", + "api/spec/packages/aip/src/features/cost.tsp": "d9e3444bcde5bbec491d1b2e372f3eb3830f4e87af4235854e32a724be804bae", + "api/spec/packages/aip/src/features/feature.tsp": "4b280228904692c39632edb69d8cd8561bad7c62a2e92bb08557ddf31458041f", + "api/spec/packages/aip/src/features/index.tsp": "4dea15d972725d7a5f3acef455ad4c5f36840f96de8054cfeaa2f503a43a7026", + "api/spec/packages/aip/src/features/operations.tsp": "6a32eb1c3bd38008b277211126c7cc81c8924ad4723f85e1f43229e17d6ff032", + "api/spec/packages/aip/src/features/unitcost.tsp": "af2eb2641049b12ba2f77962b06818390f02649896624f380bb9ce9cd310e16e", + "api/spec/packages/aip/src/governance/governance.tsp": "7dec214d3b94076706d47dfd3da3004328f96425e8f45cb530ab7205f53ec700", + "api/spec/packages/aip/src/governance/index.tsp": "a8af9a519137b0a3c0e144e7aa3f200f0b9dee23d7e133d10d1af9326f038a5f", + "api/spec/packages/aip/src/governance/operations.tsp": "0280a316ce8146ae656c66c99c8bfd8c26351d244b016f4566b56464a6b2c7f2", + "api/spec/packages/aip/src/invoices/index.tsp": "e4e1bb09f0a95980c2f95ff7896b626ab42d43b15a1e40067c4dd8ee6808f6d2", + "api/spec/packages/aip/src/invoices/invoice.tsp": "52019e0e18c51122e347c70806a63aef8be5e96658a210a71b0635ec3b9684d6", + "api/spec/packages/aip/src/invoices/party.tsp": "05fc36f29b048e2dd2c173313219c0903d6add910a249eaf41aec599796c54de", + "api/spec/packages/aip/src/konnect.tsp": "a7245461fc4945a64183cca8746f185e9a5815b87e2a283c53b5529c81d7dbe2", + "api/spec/packages/aip/src/llmcost/index.tsp": "459a5d361ff9034073b952e662b7064f654fd98b82ed591996b8c2a090becbb2", + "api/spec/packages/aip/src/llmcost/operations.tsp": "07fd4b20d722073073989fd99c58a7750869dc6123d78be22ddddc1c8d0c301d", + "api/spec/packages/aip/src/llmcost/prices.tsp": "ee59bfa49e2a00353f8a9bd1d7a1e3b944cad5909a09cad7f1e672adc64e9001", + "api/spec/packages/aip/src/main.tsp": "2b9b494d19a8156158e532233b1ee433ad34a9c1176080abb78a748f0afea203", + "api/spec/packages/aip/src/meters/index.tsp": "3c32edd3aa1a7dac91397b1456dec865394d9175558c75cb25eef0020f918159", + "api/spec/packages/aip/src/meters/meter.tsp": "fa295e2dbb172d1be459054fd33e876734b90073a27ec8a4e2743bdf43569afa", + "api/spec/packages/aip/src/meters/operations.tsp": "0ba10871adb5fc2b126487eec77d2881c30d60896c254b36e37c09c64760c99e", + "api/spec/packages/aip/src/meters/query.tsp": "d4dde872aa7cbe1cc7f110482f90e8cbe82ba862d1959e36d253ca8517d6d37e", + "api/spec/packages/aip/src/openmeter.tsp": "45e45aca6c591fc0739d916a4019a6438d92541431fa4797089837235bbc4f9d", + "api/spec/packages/aip/src/productcatalog/addon.tsp": "363dd91d7aeba1bf7322d8a82f4752675dfc214bdad2e2974f8e79ff6a830a35", + "api/spec/packages/aip/src/productcatalog/index.tsp": "cc6724267315b84618d27afdf7686ba626b5c5772200a5d0df5c3984024ff990", + "api/spec/packages/aip/src/productcatalog/operations.tsp": "181f3b0f23adee79aae157c1f23be7fe0afbec799e66522d1d982068e02e1ae6", + "api/spec/packages/aip/src/productcatalog/plan.tsp": "451737546401c11ea1e71bd67b677e9d39b0c437d3d1ca591e3dbb267f378f3d", + "api/spec/packages/aip/src/productcatalog/planaddon.tsp": "90cb2d796790ad8747b50c264f79d500d614f84f54d02c3bceea82975a7df4d1", + "api/spec/packages/aip/src/productcatalog/price.tsp": "b27ea2f3ca8b8a3914586cc1d94ec021720de28cb93937f478926eb9cf4a8bb8", + "api/spec/packages/aip/src/productcatalog/ratecard.tsp": "d67cc9fcbd4843948e9287977529ea7bcf4d2593f3ba882993f8244797c1e45f", + "api/spec/packages/aip/src/productcatalog/unitconfig.tsp": "cb177027918ea5bc31c28eab0132243eec6af54fc853a0afedc091ccfc118f57", + "api/spec/packages/aip/src/shared/address.tsp": "ff3401594dbcaba385e095703182b6f679db761fec9ae5a98c15ac2cf70c492e", + "api/spec/packages/aip/src/shared/consts.tsp": "3e90b37425813a28f9a4973de93ad6bef51fe3e20833bd4e71d1fecda5b727dd", + "api/spec/packages/aip/src/shared/enums.tsp": "1bc207538dd17099d719b3aa615f10c98acf2e4f4622aa9e12563eed29f8ef38", + "api/spec/packages/aip/src/shared/errors.tsp": "e291cf35513b3108c5bd01604f8ce1fa8821eaf389ba0e5a9ade4224581442a7", + "api/spec/packages/aip/src/shared/filters.tsp": "e0f8561c5f4f96e1084c91a731c0b61cc4109b7d1a54d40b5f14a553e6dac0c3", + "api/spec/packages/aip/src/shared/index.tsp": "c6be287203c10e5c2565c383d8ff4097f8f7e60c18017d4c683dea141618c134", + "api/spec/packages/aip/src/shared/parameters.tsp": "7e452500a33e85de7653f5c20678446c0abcaf93c44ec01200c5bfd2150baa48", + "api/spec/packages/aip/src/shared/properties.tsp": "f89be66a1db88af49c513bb0def1672746d795cdfec1ecfc32b65171646fa1c5", + "api/spec/packages/aip/src/shared/request.tsp": "c697d662bc60a068820770fe9222e46102dbec5d62ae48a20d763897cbf0985e", + "api/spec/packages/aip/src/shared/resource.tsp": "d9eff971bd288d167d81f09f2c5a2fe24ca60d738c9983f30c25ed62dbbc61e6", + "api/spec/packages/aip/src/shared/responses.tsp": "9503290ad6680502ac9f23d6b047173276ba71f122da744a0723f979c82e9e9e", + "api/spec/packages/aip/src/subscriptions/index.tsp": "cca93e8c749e57edb6cada6e3bd7455f54d6a03ac349b9ff881437fcc90490e6", + "api/spec/packages/aip/src/subscriptions/operations.tsp": "f34e4200fcd57e853f7e6f2dd6ff8349461d2f2da979133d2fe286c559ce7c58", + "api/spec/packages/aip/src/subscriptions/reference.tsp": "8e35b9a27b4be6afd933d2794d5072dfc50b23cbedf3ffc0bbf778a1ea7468b4", + "api/spec/packages/aip/src/subscriptions/subscription.tsp": "dceef08f612faf578e24639a197950cf41d48f1b95a5e44f67d4c8dc562f3d35", + "api/spec/packages/aip/src/subscriptions/subscriptionaddon.tsp": "e36762f3703535340c55c93fc5c15de4777ba0c348b6a7e8c545e3c8b9f3c84d", + "api/spec/packages/aip/src/tax/codes.tsp": "bec85bd1f56bc577abe357d4c66d8879128acb13c3abad534af1931a7a943d99", + "api/spec/packages/aip/src/tax/index.tsp": "a7436e65cb688f1bb30bbb08db8a43f418af07b9b4505c91a43577f699125c75", + "api/spec/packages/aip/src/tax/operations.tsp": "02f021732213732548cd8ec4a8603171dd56742d0a95c63ae6359df714ed9b52", + "api/spec/packages/aip/src/test.tsp": "3efcd5434caf088b25938c468f80bd90819ece68114710c8af9f3075b05268da", + "api/spec/packages/aip/tspconfig.yaml": "5f9d4998aeabb20700feef9b03629fc357c969ac52bb45bfaf3bbff89dc23628", + "api/spec/packages/legacy/README.md": "213dbfb960b259e37a02e36ab551e8238fc813a243ad3db38c07be86c31eae76", + "api/spec/packages/legacy/lib/index.js": "532c301ceeec138e18a56104408b32530539f6df31eb510b34d84d061ad472d9", + "api/spec/packages/legacy/lib/rules/casing.js": "a73cc4bb0bcf2864c4eabcf3521895bf537dc50980e227b67fdd5fdda106e761", + "api/spec/packages/legacy/lib/rules/composition-over-inheritance.js": "c4d0461af403c8339fb83b893e7fe338bb187eaf6a112477911d195dac18587d", + "api/spec/packages/legacy/lib/rules/docs.js": "bc25d0c0eab4633136a7bfd7c9935f6027990d48489756d6ac8d5ab7083d7608", + "api/spec/packages/legacy/lib/rules/friendly-name.js": "85913290026ee1f08a1b3f33daeff8f67df4e2918527f7d505db3216992b0bd8", + "api/spec/packages/legacy/lib/rules/operation-summary.js": "922ee6d414dac83b81fabee626f1dd534491d2d9af9734c0e412c3e2c276050c", + "api/spec/packages/legacy/lib/rules/utils.js": "2832c79eebc504550262ab9dee4568235cb73dda2ecab138093c625965acb5ab", + "api/spec/packages/legacy/package.json": "bae9864bbf092fdfc1ff50f1575210825cba91bed00e1b0a47936c8c384e8634", + "api/spec/packages/legacy/src/app/app.tsp": "5147782109f5fe9a2ed78fdc554e9f4d64517e705d2b066c51a24c0caf666ccf", + "api/spec/packages/legacy/src/app/capability.tsp": "522c6f886e97bba39f9b30a0b5128c59301b24c94333f5a3e54121aef8c0eaab", + "api/spec/packages/legacy/src/app/customer.tsp": "c85bd2a7606d81c261154c1fd1fbdb0c6d425cb2812b51f6c9d63620214869fe", + "api/spec/packages/legacy/src/app/custominvoicing.tsp": "4ff425ec11b3467bba8ce48c6c3945cde095d8e163831f11ee07e211982a0278", + "api/spec/packages/legacy/src/app/main.tsp": "b967b7440095ec7b6caf7dabab099ce0e9b57d16f00ec5c3d0b87b676862f5cc", + "api/spec/packages/legacy/src/app/marketplace.tsp": "e6d911c0194d5a1ac5f43bc4383b824ac2ae966cab606124e5e576b772dcfe54", + "api/spec/packages/legacy/src/app/oauth.tsp": "c314ff8c8d0cb9762bd2378f948de44a22d685ed166716bd2ed32a777c2b79c0", + "api/spec/packages/legacy/src/app/sandbox.tsp": "8096e68c66d007429dfbf5b8123410e3d71873fbb8b413df35c319a828c0010c", + "api/spec/packages/legacy/src/app/stripe.tsp": "4bc7d5b2100ada8e73e43cd617b76698a29f21ca9f708c15b63c9f7b2fa029ca", + "api/spec/packages/legacy/src/auth.tsp": "27aeb6d891354bc93e64989eac20077cc10254f2675336bad06f3e4df60d34a7", + "api/spec/packages/legacy/src/billing/customeroverride.tsp": "87994332c6c5d327a986e2fd6dae76ef9c53b74414f43b050fbb0326cc2d4693", + "api/spec/packages/legacy/src/billing/invoices.tsp": "63c0b20ef6703fa1a7ea98b57abf28e939eb466e6a5f568a295cb440f866a963", + "api/spec/packages/legacy/src/billing/invoices/README.md": "6376df9e5bfa0d39beffc0d3d5b4076e11dec08532a68a6c74bf416f3a3787e8", + "api/spec/packages/legacy/src/billing/invoices/credits.tsp": "5e60b002451b35684fc1cf5818fa441433f4fa8cb46de0037b732d160d798094", + "api/spec/packages/legacy/src/billing/invoices/discounts.tsp": "2d9bca914a537fd38cf01ad9881e80166ee162f425b7163ad97338acff5a2dfa", + "api/spec/packages/legacy/src/billing/invoices/docref.tsp": "cb5aedf7775d0ed991aedb14e24ab8003659234d894bf93300370205c258c499", + "api/spec/packages/legacy/src/billing/invoices/invoice.tsp": "9be7adce2977742c5dd5b43febba5ed7c7d0dab91686c36434f6680f757db476", + "api/spec/packages/legacy/src/billing/invoices/main.tsp": "845a4d5dea99ea64705b52e350b88140f7876d11060f2749b4afe5d17a833141", + "api/spec/packages/legacy/src/billing/invoices/party.tsp": "ca1d65ca89537903f4a25ea59d5aaf207d375656ca492188928a35d4922f50d3", + "api/spec/packages/legacy/src/billing/invoices/pay.tsp": "3eac94b9fad21eb8456143da0023543623b069e07c7a8d706d9ef685d20d48e6", + "api/spec/packages/legacy/src/billing/invoices/tax.tsp": "561678212f96f30a68bc9c60f6e97aae2c2d3fb97081cc8e9279d5104584cfdd", + "api/spec/packages/legacy/src/billing/main.tsp": "e84ea9c85ff45ba5e7a6e99596e86ea3dc2bf3710c250622b9cb054597a5a1d4", + "api/spec/packages/legacy/src/billing/profile.tsp": "ff75d29cf82cd4a35dedc94c98499450278cda56a317b9ea199c6eeb22afd1bb", + "api/spec/packages/legacy/src/cloud/auth.tsp": "e956d8e4cff269dd6cb473df8707c6aa8910d5550f34c26e853ec9e761af93b6", + "api/spec/packages/legacy/src/cloud/main.tsp": "c557beae6481124322ee90df4991f8cc8def4414fb3ce036d53ffd1ec3941661", + "api/spec/packages/legacy/src/customer/app.tsp": "bd0631f20a624478ce0c58e988bf00d094882972f65d3a06170de93d73411fe3", + "api/spec/packages/legacy/src/customer/customer.tsp": "5c9b39c7eff605642a64c0475677fc2e505de691b3b7ab73f8e749c3dcf8e632", + "api/spec/packages/legacy/src/customer/main.tsp": "fd58e34eb2c6b76bbcd05af0873c01a9055b89b2115d8c332332bd7c539f9fe1", + "api/spec/packages/legacy/src/customer/stripe.tsp": "2c63401236ae8852f6a7cf99a007fba71fec6dfce489c87c319b212ec1493231", + "api/spec/packages/legacy/src/debug.tsp": "d30e4a3b006688c5608da38d7928fb1462a8a7956382dabb0e273206d65e6c1d", + "api/spec/packages/legacy/src/entitlements/customer.tsp": "2e90f631136fbffa0acbbf0bd0474dbec22f221ae7c28b58a97d1c429cd78295", + "api/spec/packages/legacy/src/entitlements/entitlements.tsp": "8f439474199304372437fb076819a0da74b4f3baf12960fe69e9daa501339f9e", + "api/spec/packages/legacy/src/entitlements/grant.tsp": "8604fa4bf5f48fe2a13ed5353ccba96347e0b88e84820fc348f51cd99022e876", + "api/spec/packages/legacy/src/entitlements/main.tsp": "28085635383a63f0c7c5b12ef48397a4b005164e3f006d2fe5ecdc8d22732656", + "api/spec/packages/legacy/src/entitlements/subjects.tsp": "561cd11153ed9664dde9d32e72471418bbaf38dfdd7ac5d67199577f1ece485e", + "api/spec/packages/legacy/src/entitlements/v2/customer.tsp": "04f4df815bb1649e26b104ad34354450fa098e5d99b43d506aa143d39d4454f2", + "api/spec/packages/legacy/src/entitlements/v2/entitlements.tsp": "6cd65ea54733d2bc1811575717eff2ffe8a43256ee023757029ae51a873f3fc0", + "api/spec/packages/legacy/src/entitlements/v2/grant.tsp": "dfc60334d4bb8b8ad4e61d9ef8f92e3b0cdc50e1f7e6d62bdeed01cf60875ec8", + "api/spec/packages/legacy/src/entitlements/v2/grants.tsp": "c59c82189bfe7d36388f9cf8599cfb1974fb4000a000333c84b9baf0aaa8c282", + "api/spec/packages/legacy/src/entitlements/v2/main.tsp": "8065f6c6b9d94861c93a7b69f9bbbf43ab522a284367f666a0826874f36a8300", + "api/spec/packages/legacy/src/errors.tsp": "cf9ec2afc817c62ab73eb7a7ec8a61e52e332c6d782ba2fda3b5c421edfdea16", + "api/spec/packages/legacy/src/events.tsp": "8c7f746300c2a7643680e230e825f27103507747b9e894f84b6c86d665b790c1", + "api/spec/packages/legacy/src/filter.tsp": "4a1475ac76d4f7106e6ff49a0c2452d20097c6273d6c8f5cdea561fa892db0f5", + "api/spec/packages/legacy/src/info/currencies.tsp": "08daf976908f5b0377c12be4f2bdb4660ccfaf843b2149f819dacfd98e5d5034", + "api/spec/packages/legacy/src/info/main.tsp": "c0e296ce8c2abefc0aae9a0a96a7917d6c93f7d6a4f154e7345c58dde5a93c48", + "api/spec/packages/legacy/src/info/progress.tsp": "4d3562623af662f10392dc94b5005ce02404df9b7bde845a5805161dc63ce819", + "api/spec/packages/legacy/src/info/routes.tsp": "fd3c0193af2851fe51d30399ff1e3b46e892a16035de32e8397182b1461552d2", + "api/spec/packages/legacy/src/main.tsp": "277206e6a6089fc3947738ac3647fdbb6a3b2a65ca326d381e782781b4d87bc5", + "api/spec/packages/legacy/src/meters.tsp": "78bf10d4129f3af8af076bb1417ebeb7fa778bf9c97da0d3890408be45960066", + "api/spec/packages/legacy/src/notification/channel.tsp": "a44dff056609a3cb525891670c5be751cad034a6f43172027e286943461a8c54", + "api/spec/packages/legacy/src/notification/entitlements.tsp": "65139ebf539fd6c42379c218f8f830f897f487f5e0ee9eb2da2bbcd4c68603ca", + "api/spec/packages/legacy/src/notification/event.tsp": "b6f889c1daa889cd5f5e836a45eb40b96e12e93b5563f5de07c44d62dea6931f", + "api/spec/packages/legacy/src/notification/invoice.tsp": "a3da5d249fa37978d1e0b5af93e6ba01f14c51bfb734a28623f3538d6ee0456f", + "api/spec/packages/legacy/src/notification/main.tsp": "82a2855ad284cf1cfbbb96a827170af41b0e715f1ac0b3a48fd042f432cce801", + "api/spec/packages/legacy/src/notification/rule.tsp": "45eaf5dc1d56927f23270bb47189b8ac56644dc22f0c3c640b2ebf79c241b5e5", + "api/spec/packages/legacy/src/portal.tsp": "4e06bc89e54d5962ab6e1e81bbcc99916ab6f71e5575b3a23b26c27de27ed274", + "api/spec/packages/legacy/src/productcatalog/addon.tsp": "dc0d779878b0ca9eb44831be780d4fe9f5d453a9e0f8a3f068680a7f7927d064", + "api/spec/packages/legacy/src/productcatalog/alignment.tsp": "af0b96beacfdb958632840a394435332e4296a2ff457955dd29a22465d0b7ef0", + "api/spec/packages/legacy/src/productcatalog/discounts.tsp": "34013076e6aba6c94462371feae93f523e2a82f557c60d994a170929c90acbc9", + "api/spec/packages/legacy/src/productcatalog/errors.tsp": "bc87088465592197f376c7f49277f752fd0e9c248481213c850eadafa375196b", + "api/spec/packages/legacy/src/productcatalog/features.tsp": "062585f4063e0c5381c192f0aa314fee7abd9c036669f2a15f410428d04ccee7", + "api/spec/packages/legacy/src/productcatalog/main.tsp": "e009cd9f36a0c90540e5a6ceed4ec149f558f7e9a9c6f80cc678f4c391c9f9ba", + "api/spec/packages/legacy/src/productcatalog/plan.tsp": "2c970037ea69a0fdc2a932e8814bbaefef8b2d9c729372c8be8a570c8863e95d", + "api/spec/packages/legacy/src/productcatalog/planaddon.tsp": "9583264028f412337ff8e7f98ba2336f2341ee2505b8aecac6a986869b970128", + "api/spec/packages/legacy/src/productcatalog/prices.tsp": "a5889933616694d14d9c52580c614dddf458f94df3c6a11b9142a8561037651b", + "api/spec/packages/legacy/src/productcatalog/prorating.tsp": "892bae90f0796df79e7eb76a7daefa67c77097c75df7633c6ffff4dcdaf8bfa7", + "api/spec/packages/legacy/src/productcatalog/ratecards.tsp": "71c53261c0e3575883c2d2c9486acdd46eadf2740e4f8e3be59867b80d212d4e", + "api/spec/packages/legacy/src/productcatalog/routes.tsp": "f556f09f89ebd7225ce3343b424b380b9b410b9e30350e68f2fe0809a843d691", + "api/spec/packages/legacy/src/productcatalog/subscription.tsp": "3607eed35132f13b8150a2bd80ad10fd8d4d74b675e2ce814c090351624bcc84", + "api/spec/packages/legacy/src/productcatalog/subscriptionaddon.tsp": "e06c778ad391bc4d296e6cc852333ee10b1c0f80384ec9fc7d808e3b99f8e3ee", + "api/spec/packages/legacy/src/productcatalog/tax.tsp": "b77f3fbea6489b4062e3014f1c841281b3bdac6929fb634545bf6c53539e2d93", + "api/spec/packages/legacy/src/query.tsp": "dbdafccb66aa79a9fc98a38a1cea59295a101e4691d1ad88d7be2ab6ad84ecb3", + "api/spec/packages/legacy/src/rest.tsp": "e6c1efde668299f96f879e2a6de1b00df4c42d911d63aa55bc1dc8a211a32bc8", + "api/spec/packages/legacy/src/subjects.tsp": "831224e28cd5b7f8c1f8916f5a0a09adf5ee0ed4d30545f0a14c59da28d9b167", + "api/spec/packages/legacy/src/types.tsp": "c8953ea2d34f811fac4cf6e1f1dbe58775b2f1fa6f530ad7de825a4f10ed5968", + "api/spec/packages/legacy/tspconfig.client.yaml": "10f7a1932ae7a2c75aecafeb273ecff0e148332ce3a704d8e193315024b79098", + "api/spec/packages/legacy/tspconfig.yaml": "5cbe10839c01448ebc6ea53ba72907bc68938ace75821433079e032ba9f332ce", + "api/spec/patches/@typespec__compiler.patch": "3c2b359a3f53dc45d1cb921d164fdd02b562613bbd72527208ac5c1f1631b6a7", + "api/spec/patches/@typespec__http-client-python.patch": "0dcdb1211a8c56068c7826f9c13f1f2b74f77e034791879c05b454626f8b45cc", + "api/spec/patches/@typespec__http.patch": "e5eb7d65296bdaff8a23f7b13f46c819ab5f5f0f14d1efd4e4a5694b13be1410", + "api/spec/patches/@typespec__openapi.patch": "f3c538331cfd9a1478f99a7a039f3b067fc2e47edd1870495dc30459c37ec827", + "api/spec/patches/@typespec__openapi3.patch": "cef18a91d29848030707929c70aa810dbb5d532466155d211d4f49e1ac7a7d95", + "api/spec/pnpm-lock.yaml": "9d4af6dc1dbc142652705bd4c62238af859e1573fb8afb4d3f435322d4b01f0c", + "api/spec/pnpm-workspace.yaml": "e64cfa9b1ebe762e7723c4a278f61350876fa01532f9e79854147e6e6b8e871a", + "api/types/doc.go": "e81e6e2471cf1855568f5eaa24f65e031787e041bbaa46f9ff441a5fb9f8f2c1", + "api/v3/api.gen.go": "6cb62acf8c3645c2d6cfe2a5a606f0e430188741fc9dcdd2ff3a5d23afc53a1d", + "api/v3/api.go": "00d8962ed66691b50b9fcfdd843cd4d257c71b92934faefcdb86d7913497c0fd", + "api/v3/apierrors/encoder.go": "09c7f8024bfe64fb35b4a8bb5f616519c5acdebb2d756c48ea84e968babfbd0c", + "api/v3/apierrors/encoder_test.go": "7303dfd901b23ea7b972e11097082c21a64b0973e5a45dab511013c0a4417a5d", + "api/v3/apierrors/errors.go": "d7e9883508ad3461cab826e8a2b45af7e14ac341c2cec90aade0402ec715a128", + "api/v3/apierrors/errors_ctors.go": "8d4c3fb602e1818053a9335fef54e2030b31ee959fe93d9c1218482620384da2", + "api/v3/apierrors/handler.go": "c9c75a5b6acc183ac58eb545de9dc69eddf02697e5c78e7d1882098cde91dc8e", + "api/v3/codegen.yaml": "0f43b6e4053a667001c3b342139bbf8533781b6c61dda5eaf14efe8ef8e42887", + "api/v3/filters/convert.go": "8a57be5da0bd6b301d6e3cfb712b98e3877473ab6165d586a19828af6655ef01", + "api/v3/filters/convert_test.go": "e74dc342f9a1e869dd21b2456cdd309474f44c3ae06729722788e4248f6fc9b9", + "api/v3/filters/filter.go": "3f723e4f7dba489ad6a1f822bd934caed8fca8f73fd9a05dfe956fda44587ea5", + "api/v3/filters/parse.go": "ba3cf4c456661fbb0a71d0141e3c648c27cb16e59e713be96417c60598f23f74", + "api/v3/filters/parse_test.go": "3d171127c67a286403f06c3c969eee85abf5398c4d4f43293fe9fb2ea045c87a", + "api/v3/handlers/addons/archive.go": "e14b4aeecdab06af031669c64b10d8562edeb7b00a3fced5cc2534b222783e73", + "api/v3/handlers/addons/convert.go": "6175c9d3c3041181acc3d78100e68cdb337651d12c4531037121afff0535755f", + "api/v3/handlers/addons/create.go": "2f9d3eca3a7eba404dafab2ae4485975d00b4b68904078daa994e7ff37917b19", + "api/v3/handlers/addons/delete.go": "ff684ec0457ad058414e0a448c41928c847980df5e455664503d38ebf717c784", + "api/v3/handlers/addons/get.go": "31ce85cdba26eff3bd88315e5704ca2ba71159ad802fc033c7f3f5acaa1c9a6c", + "api/v3/handlers/addons/handler.go": "b28da2c4639c1b57eff57a06ad5d46f5911a9b53e6e5a3f7e25d9f6201683e51", + "api/v3/handlers/addons/list.go": "fd85ef782262ef33eb1c785fa7a9830a7a4775707f7fb472fa63a10ddfadbeb8", + "api/v3/handlers/addons/publish.go": "a7308666fa6d60dd006459575b04645cb1d02b9d956d61513378e8e6438e231f", + "api/v3/handlers/addons/update.go": "0fd2670d8f2f6c442cf266b447cd66a45d7de6652046885f8da0038fe9f4a024", + "api/v3/handlers/apps/convert.gen.go": "54d304a3f8ba91305c7525339bc8fcf282e296d50eeddc8390e78c4b5b00d395", + "api/v3/handlers/apps/convert.go": "72f19e341b1aaeb7840331349aa7aa1dc16955ad2b9751351c3b05ed7fa1e63a", + "api/v3/handlers/apps/get_app.go": "4f110be5c63e0f7fc859c00306ea00c22f76b367f91e656e960baf74d3981c26", + "api/v3/handlers/apps/handler.go": "34ac0f8a72c9495fc69a34f560a57bbb3e596cd4528f3186094e0c03dfa64b91", + "api/v3/handlers/apps/list_app.go": "df44796c7e4c1c59a4cf0766e8513d2a1b140f36a5ce5af48af211225e3fa4d8", + "api/v3/handlers/billingprofiles/convert.gen.go": "ef26faac4339f2218fb0de1282384630e13a6492e99253d9d0b576f26951749c", + "api/v3/handlers/billingprofiles/convert.go": "2d5f7d1cd9713bebadba33bb2140d7bfde93defcb0f2c6f0e44a92c2715d6832", + "api/v3/handlers/billingprofiles/create.go": "f80f85926c42a8f4ff68516fa3629fafe4f74bf62e345db687bcca8fdc1c533d", + "api/v3/handlers/billingprofiles/delete.go": "08f3986beb26c1f5c52e0840347727896ef771982070a76e6601d55d8f9003d5", + "api/v3/handlers/billingprofiles/error_encoder.go": "31a007bd465a655388ad97ccef43a0863c4ae6631775dfa6f33358bbba7f9509", + "api/v3/handlers/billingprofiles/get.go": "8eccb27e76ca845983e4b06e8ea6fb13be8fd32e7d03e24dd6284e267145d032", + "api/v3/handlers/billingprofiles/handler.go": "e51bddeeb78a38e293343c660116fcec5a9faeac5ae58e50e1cb98dc9d951a8d", + "api/v3/handlers/billingprofiles/list.go": "a945481eb9e9b57b784eedba647174c13c2217abe5c044ea7e9d484cf3f9c7c2", + "api/v3/handlers/billingprofiles/update.go": "050beef0aba2695ce9e6381f601120f1b1cc0ee01f194621f430eb03ee2bf3a3", + "api/v3/handlers/currencies/convert.go": "ff2b1890a09e6f6abf121bcab3797d759a8e2b98556511c9a44dd5d02848ee93", + "api/v3/handlers/currencies/create.go": "1d48a54fcf8a122492901a4eec926a9e8beaa55e4bdbe2af190b1af269e3bace", + "api/v3/handlers/currencies/create_cost_basis.go": "b1a41911733d86367cb078e55a1acc7d37c4dc1e99afe90da8e2af09c3a9d4e9", + "api/v3/handlers/currencies/get_cost_bases.go": "a034216c49178fa085b4a6a9e02b306e55c2a8649d83bb822d6bb1a9fdcf1bfa", + "api/v3/handlers/currencies/handler.go": "81ef3fae3b8b1ae3e45b52c852fd3d0ad78996a422aab685c041cbb252d78e8a", + "api/v3/handlers/currencies/list.go": "5cc8a739cb49aec9066be394a95d27d9cee8fb7f8236f8d7e8e1e942c5027541", + "api/v3/handlers/customers/billing/convert.gen.go": "dcd9110ef0d7d29ca34a6362fcd7e374f85574e0bf25c08c4c89dee0e790b9b3", + "api/v3/handlers/customers/billing/convert.go": "ca81a3b87933e9bfc778ee11f6ddc1049a96c61130cafb56b9752e3073914cf9", + "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go": "d6243645b98f285831b95293452c946a7d8a834449f970e4ed41aad5c4e13dfd", + "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go": "4eba9a8f3415dbd0878069de8b5d6d3e169027fd95c4182c809a75d3704c89d8", + "api/v3/handlers/customers/billing/error_encoder.go": "93b9ea7a57e04446f11989e0d543a6c08b6f1a0a725ccfaec815ce680cca9301", + "api/v3/handlers/customers/billing/get_billing.go": "137d6d22dd311d5dd7f3bed6e8d887f23d00ad10594e555f4675fb745bc15c9b", + "api/v3/handlers/customers/billing/handler.go": "6a3e6e8730eda76401d08db556fe18fc9c11ff85313333d43f6788b605b2a7b5", + "api/v3/handlers/customers/billing/update_billing.go": "821d49c7de4783960c9c5d3b51b7f16fd1b18a1d084fbaee80d2400be25dcfb6", + "api/v3/handlers/customers/billing/update_billing_app_data.go": "030856534717c22b7efbc38f2e3c240bfea9999328c27e304dc8ed6eeb97f72b", + "api/v3/handlers/customers/charges/convert.go": "56059c6eafb97fc0687fb51ea09455ab74995554c37f1bbdce20cdf798d8cecc", + "api/v3/handlers/customers/charges/convert_test.go": "ddb81bd9dcd818a4ddb58db886bf3ca633bea9e6bc44636a9a27425163b49177", + "api/v3/handlers/customers/charges/handler.go": "35bc25b8f604abb00594fce2c9549b58f06d21c9b1cdae426d9b5d711b3d81ab", + "api/v3/handlers/customers/charges/list.go": "d6d19a17fc87f93a96afd954b7efe6f58561cffd1fd8d3e47ff4f099b6c407d3", + "api/v3/handlers/customers/convert.gen.go": "5e226e87c05b466486e2c7c6d2919e916e5490d29936b81e40c7f1e180063c13", + "api/v3/handlers/customers/convert.go": "aa673ef85b058d01cadddb789e4e28425d86426f9db3ed9ef3a99eafd0abf574", + "api/v3/handlers/customers/create.go": "da6fa44a7f60f06b53c145ca5f248610b121cd3a27302b31d4b1e1a0ffd5a4a5", + "api/v3/handlers/customers/credits/convert.go": "75717d16abc2feb392844a10f5e4ad37578d2315324cc3b0ed379ede82f79503", + "api/v3/handlers/customers/credits/convert_test.go": "08507b494f78d825ba8cafcea4cfcc756be6e1e2f113ae379e78dbebfa4d2cd4", + "api/v3/handlers/customers/credits/create_grant.go": "9fbe014e9cc41fb03cb4c9f138f654175cc1038c38820f37af2061330eec9ad1", + "api/v3/handlers/customers/credits/errors.go": "4bc4647649975d1ce10481286c52794f6bc9fcf08d051c1fcd8420bfd7adc846", + "api/v3/handlers/customers/credits/externalsettlement.go": "e66f10faf523f87984b29146375597f73b92d8c66c23fa32bae876b643863a2f", + "api/v3/handlers/customers/credits/externalsettlement_test.go": "87d368caf12056d511e8616a3678f43b01d18f6af501321437be97d2d23e41e4", + "api/v3/handlers/customers/credits/get_balance.go": "ac702dfe2bcb8b3076145057c93405a168f6952613015967f8506f14fd34b515", + "api/v3/handlers/customers/credits/get_grant.go": "aaaec25cacfb415b26bbfed39cc93d4b4cc2c6ea593ac05e5f4146d36d8bc630", + "api/v3/handlers/customers/credits/handler.go": "06ae797282738d1c8ed33deea63bf30a0e8a72f91d33d5f630c9342777a8afc4", + "api/v3/handlers/customers/credits/list_grants.go": "10f48c3feaa6e917b551d44fae901b4384a6fa9a7c7e775c37bbe5af7809189b", + "api/v3/handlers/customers/credits/list_transactions.go": "d5941acadecbc4d2f2d8518e1b056e90a564a6f6da92b1b5c643d2908f9e22eb", + "api/v3/handlers/customers/credits/list_transactions_test.go": "c111bbd1af1d35b6d4baec56b2069f9cf00c28f29c01d5b21c209fd132fe987f", + "api/v3/handlers/customers/delete.go": "b6334e6b417aa5252c0ddbabe77c23e4179d5b344f3ceb28db9152cbc6a31f24", + "api/v3/handlers/customers/entitlementaccess/handler.go": "6c1f6884f2f30fc61de61dcf515574a250b56df2d42548bd094d24565dd82d05", + "api/v3/handlers/customers/entitlementaccess/list.go": "6ec23cbcc1ace6afcaa6b1567af08ba9335c53a16fec6175393f177eb68e2cc7", + "api/v3/handlers/customers/entitlementaccess/mapping.go": "b5a05ab89916f38b1e3525e0865431f5d694b2991af4bdde2860d081bd81e659", + "api/v3/handlers/customers/get.go": "5f0ea0f4e2be070a40894cf0c7aa5b05903c23f461eae54d718c73e2b4d9d474", + "api/v3/handlers/customers/handler.go": "96579f9e7bcf561d0110f70b9419d8deae7b2e907ec56a4155a3c2578ac7274d", + "api/v3/handlers/customers/list.go": "b0eea37a009725eca3119b8947c281ea53fd8f00867e700d4abd2bb6e4f70bab", + "api/v3/handlers/customers/upsert.go": "b76118c8651ba555bf46d4e5e0863bb2e445b27e1a35a4b7dab12ef52401af6b", + "api/v3/handlers/events/convert.go": "506d45724634accf71162ccc2661a4aaf34ffdd751d60b21ab436ccf0684faf8", + "api/v3/handlers/events/handler.go": "63f84560a88b094e14d4e2243002fc00d6d9d3e4cedce251b89f392eb356e92d", + "api/v3/handlers/events/ingest.go": "6c4e9ed350570120a4a72639c480fd9ae98caf21a7c5003c78ae5adc676cfe3a", + "api/v3/handlers/events/list.go": "be10f90675287891bf4f2870ad1dbc869eb941fe359d7e50c132f733afd4e340", + "api/v3/handlers/events/list_test.go": "a3da1028d0ee90a5436d6bb78b6154a1af3ed88ba493bd6eeea2b86e28483be1", + "api/v3/handlers/featurecost/convert.go": "f8c4ab44c7ad4fb96e7f925d3d79fa47f831ccab1dd731fea9ad2dc337b54c39", + "api/v3/handlers/featurecost/handler.go": "820c4933b0bbb3594f2ca08acb82d6151c1378b930ac27d8a29d265c75b30f6b", + "api/v3/handlers/featurecost/query.go": "0fd9314428fe0993fee31e9e92ebb71cfebfe8a401604e978a6e76ddc8455e0d", + "api/v3/handlers/features/convert.go": "3c328eb6ccd87119298ee9f8275bdd6aaf7e17dd9db712d6a7461994fef8069d", + "api/v3/handlers/features/convert_test.go": "6136fb410847ad9c76cd8297882c359305b9deaecf4ad8af1ca0073f31284b7e", + "api/v3/handlers/features/create.go": "0dc6a1903b65e875f87411c98076b5cff9ecd9281f2c5ee30d9c7a4a2034e614", + "api/v3/handlers/features/create_test.go": "bb10c7d787ade253faf385cb4a3534063ca14f265668d1da7a551a8b1a353731", + "api/v3/handlers/features/delete.go": "f0ec1a93b50bdb7cc509c7a45b80137f10553271876f42535f4a3d3410b95db6", + "api/v3/handlers/features/error_encoder.go": "cea3f41699be471001b53496161cfe6898c171a563ac792cf38edf55f275f1ac", + "api/v3/handlers/features/get.go": "194faa65f1b1b849962b1bdb1d79c78d7050e067d4152aaec9a35bd6d53a8393", + "api/v3/handlers/features/handler.go": "45b451cb37ec339ac2d553721fd3c34b58bcb3b322e9c2fd38ebf700fd70c4ee", + "api/v3/handlers/features/list.go": "47769ff5a7f1997096d4f63ec9cdc88b3c83e92dfd35ed41e10d41a22381577b", + "api/v3/handlers/features/update.go": "1c0d8f44650d97b410c6a26d5abad2c06e5c0801325a67ea59b9827c01873ce7", + "api/v3/handlers/llmcost/convert.go": "43d57e9bc982fea50473841e04fdf539e12a1c10075263c9fc0adce27c1dd330", + "api/v3/handlers/llmcost/convert_test.go": "26c10e601a3a4426ec275ff565c602ea2266092ab928d83e808405abf9671020", + "api/v3/handlers/llmcost/create_override.go": "b678db2cafe135ec47e4d1ff47e37b22410333906faa8f7ef5f90f0793ffe862", + "api/v3/handlers/llmcost/delete_override.go": "50a0daa92b1dea9bc609b611fb6f17910f6a36405ee9bb047afe5daefa98ec8d", + "api/v3/handlers/llmcost/get_price.go": "abb89694ecbe3357fca5766b799358a82994f215a1dd469c279cb5cc45993492", + "api/v3/handlers/llmcost/handler.go": "d74f46ef247d0b1babf31d58f25c4c4915ceec21027c7975fba6e4c90cfcfb5a", + "api/v3/handlers/llmcost/list_overrides.go": "5d40ca8356161d420fd4a0903113d6227e60679385138de2850cf8e29c1dcbdd", + "api/v3/handlers/llmcost/list_prices.go": "6e1b007361283ce42d9f163f148344ffcfcf53f4914cc88e88b4d2e727ad2663", + "api/v3/handlers/meters/convert.gen.go": "175c64394b43d794cbe60aa1e9bf3062f6934c3d300f7db164eaad55b8a65bd6", + "api/v3/handlers/meters/convert.go": "b1f8ea014503b5a7f17b7e74fda3c94ee085a84935c284af490bf426b8e8c942", + "api/v3/handlers/meters/create.go": "6d469fbd70e2a2a75a173965854b655e09ae4d3289dc1cc632d12559e4a421e2", + "api/v3/handlers/meters/delete.go": "e2e9999bcc402917aae32d37f8f2c712c2730f0ef828fae1a7590221b6aca4ac", + "api/v3/handlers/meters/dimensions.go": "c92023ebac9b93cc4ce843a13c4c837985b29baad788477d0d1c8ac5da278586", + "api/v3/handlers/meters/errors.go": "5d8f9dd4f7016cc10f5f21bfa8216366202689db69f8c1c905d760f5f513a33c", + "api/v3/handlers/meters/get.go": "7a7542cf8201290029b09b8fe7709088db456b2d381c77abc6faa3da4dbc3c54", + "api/v3/handlers/meters/handler.go": "31bab12ae4c64d12b5fb3b10e026fa6da7c986d3481c3118030aa2f5d232d065", + "api/v3/handlers/meters/list.go": "c00536e740babf058a427e1e51062d6436afdf0fbd3d96f6499caba2c4c9f98d", + "api/v3/handlers/meters/query.go": "dc6760372eb717fca8c6dbb6ad86c19d214ee3ec9158d18c3a889b5181010968", + "api/v3/handlers/meters/query/convert.go": "b09b2e2ccd0c5dd6ace8ab07d1314a95dbc881048c68b798a65e65eafb84bd9c", + "api/v3/handlers/meters/query/convert_test.go": "3a3087ccf8e8316b5dee43f86251873b1307faf7a7a301c435a43ce9adf23e3a", + "api/v3/handlers/meters/query/customers.go": "e83298d182288205057d3bf2b20c3a0ee3224896d193bef437f7eecd2843ef0d", + "api/v3/handlers/meters/query/dimensions.go": "811cdc87f97a72f8b21e30b7a1a5662d21a1694efaa0463131098873e4050eb8", + "api/v3/handlers/meters/query/dimensions_test.go": "6f32308160268513089d579c9e8bce3bf2083ba0a8990bc0ad56098e28cb9ab3", + "api/v3/handlers/meters/query/errors.go": "33b16ce6a60d8af2a235f41525454e59419192a1690519c9bac7848c1d7aadb7", + "api/v3/handlers/meters/query/params.go": "7c43e72ec79254c538f4f8c20300f882af00fe197c9549e3df1d44ef1de4cf98", + "api/v3/handlers/meters/query/params_test.go": "5f204bcc1e943c9fdd9370ff7935b007542e3ea46d8961f4d14fde0f7f65fb70", + "api/v3/handlers/meters/query_csv.go": "3db2d81db153d2f561434b8004f3bd52c1a7fac7fdd880c318949d31520a4d23", + "api/v3/handlers/meters/update.go": "bead56bef4ad299ccc0d190ccdd96b8bacbb391b0da31076d805ea7eceb7eaec", + "api/v3/handlers/plans/archive.go": "d9c7b283eacb437b6c7f08bd97b6d152dd79c56fe753c6567fd4b386b01a33ab", + "api/v3/handlers/plans/convert.go": "1b92b5ad3c8a5a8ac626b072897328bb289d8c04f5b65c8b8abad7631464f49a", + "api/v3/handlers/plans/convert_test.go": "61d22a72e9ecc97a5757e273e06ca298e15a821719421948235e2ea7dc97757b", + "api/v3/handlers/plans/create.go": "b954f4f05eb41eef0d3fc13245605d24782fd3257c2ce5262588e1bba101a782", + "api/v3/handlers/plans/delete.go": "d1fc2d498372ea27caa2a7e1b269cbedbaf73715d140825aaceeb41f55daf2f0", + "api/v3/handlers/plans/get.go": "daf45aa881ea8815914d67ef3035aa6a430b55f7cab8d52ce9a47f829a49edda", + "api/v3/handlers/plans/handler.go": "4715d2834fe7716f32d0e15d3e0c067a2b59a3abb6bc48d389a8ee6f94f754a4", + "api/v3/handlers/plans/list.go": "4f5e73431f1f8e1c5b5d0cda87cdefed6aad9dce23c985e96cd3e4d79a1d1635", + "api/v3/handlers/plans/planaddons/convert.go": "60e56cfdddb0341b023674f88c4eb9c72eb5ecb608fd0aef8b17d94cce892674", + "api/v3/handlers/plans/planaddons/create.go": "f3b6a4dfd65d0f0af350162783c5025369cac1f34cbd8125e5e953030b689840", + "api/v3/handlers/plans/planaddons/delete.go": "8fdf7d13e7a17efeb565be59c8172330a643ee59abbe1330b5fe8a33ff87d2e5", + "api/v3/handlers/plans/planaddons/get.go": "bd29a1168a101462ac6e55e3308fa099b66d50fd76c5d15fcc193ffc1e576610", + "api/v3/handlers/plans/planaddons/handler.go": "059215d222c466b02d51a3a6035fcd4386db23c730400753f6123649fe5bec17", + "api/v3/handlers/plans/planaddons/lists.go": "102bab41a1eb3c39835a2645248e69a501f6d457aa308d4d43066ede222508c1", + "api/v3/handlers/plans/planaddons/update.go": "6f6c5cd5f94a3ddcb097e0d17f7c724549a2324f63fe8e91ee324b2745545ba3", + "api/v3/handlers/plans/publish.go": "18ba3ed862e1480fff14f107ce03fb29a87242a0b239197d23ab3e3796c20668", + "api/v3/handlers/plans/update.go": "9f91b24be7f8b6e3075245a144ccab5ebd509de7b5cba9ec98fb4043819bedd8", + "api/v3/handlers/subscriptions/cancel.go": "99bfe641e7500a99595f47f3da950a709ec6415d8d81829981f036ce91bda2d5", + "api/v3/handlers/subscriptions/change.go": "6749dd6eaee1a175dac61548c756bef57ca059923e04abd86afd96830c930b59", + "api/v3/handlers/subscriptions/convert.go": "6348f2f82519760f2a74057e17c44eac2455176ef415e49dd7c3ec4667205b38", + "api/v3/handlers/subscriptions/create.go": "400d95fd2fa1c6e8e54f9eb34dec09675286c5dd1589de3307125b29e823066c", + "api/v3/handlers/subscriptions/get.go": "d788ba2935ccc107f5cd4cb4908063f3880886f753ea06ace5e10bc4feb07ca8", + "api/v3/handlers/subscriptions/handler.go": "de470cfc15d53a49f52f2277c48ba46ad968a74a3412bb892b3a8553ba400d53", + "api/v3/handlers/subscriptions/list.go": "014c5497afdcbb2a9a69c1de6cc7c965db6ddc13a7a70a0d3274c9cd4208954d", + "api/v3/handlers/subscriptions/subscriptionaddons/convert.go": "30334dd95e8e9483493c2ea703d0a5a59bb4cf3ceaa68fa92a434964eb165227", + "api/v3/handlers/subscriptions/subscriptionaddons/get.go": "3a556fe7861045a7ce30456e586530ffe4a4139bbe614f5ed3d34d237e835f2c", + "api/v3/handlers/subscriptions/subscriptionaddons/handler.go": "86da5f51d496117909a3f823d082cd5e151c3e704602cfc6bebcc99bb6a4ed22", + "api/v3/handlers/subscriptions/subscriptionaddons/list.go": "833c4772dddb7537c1016509395a9f4a8e41a5769057f190912ffdb7a26219ad", + "api/v3/handlers/subscriptions/unschedule_cancelation.go": "5101f3de50af9c0bc5810fc5aed0b937f1cbbd73ab7cb8826f88affd483f0d5e", + "api/v3/handlers/taxcodes/convert.gen.go": "466981f41a682205b7c44a6067791b07718c78b04505ee2b8e2d249d39b56acc", + "api/v3/handlers/taxcodes/convert.go": "7b3b244bd6f5a2e6509a4fd94ab2f658564f0b3f5ec7de50a4dfb3da566ca07a", + "api/v3/handlers/taxcodes/create.go": "c420a63d9051e1953c0b9614a23305803a4fba93b627bcbc897ea1ec4f96fd52", + "api/v3/handlers/taxcodes/delete.go": "ef516fd1cd58586dc153ed8ac80251fbcbd9826dff0ca1e4f8b26e1bff54a75e", + "api/v3/handlers/taxcodes/get.go": "492fb863c0ca680978433c0dab65dc11214b6d05eae53f85d3b896bd40bda5ac", + "api/v3/handlers/taxcodes/get_organization_default_tax_codes.go": "3feb9291e274970246d2f04791195169e698fa31ea3424d33b0f23955b2a9603", + "api/v3/handlers/taxcodes/handler.go": "11a2c9e7a28199f029328adb869a1c0e9e96c8f7bd253cf2dee10e5720450d95", + "api/v3/handlers/taxcodes/list.go": "bc79d56e074729a37db8d42fc59955b956867648696e2077ec8ccc3ade99aa33", + "api/v3/handlers/taxcodes/update.go": "686e1283f511634d73bf95f38741e22c334da166092bc9c3875f871bc575fbbe", + "api/v3/handlers/taxcodes/upsert_organization_default_tax_codes.go": "214190922a76360fcf9b8f7b735532f953309e2bb345125b4a0b38535fa3bc56", + "api/v3/labels/convert.go": "2e36d882337fdcbfc9510d44aec2b0f06c2c684e288f784684c3f6736637f281", + "api/v3/labels/convert_test.go": "fc7f5d1df8c0b00e08d09454ea93a42915acb25641c75b13b5bd5cbd4c338c84", + "api/v3/labels/validate.go": "4e90bfdb1ad67410a10d1d3fba02cd94e04123a0ac0d695873d2576051e2287d", + "api/v3/labels/validate_test.go": "3cbe1073172b0a89b8b11401573b5453ec1fac1903a5d1a3bc74adfc7d219904", + "api/v3/oasmiddleware/decoder.go": "e15021c24aa50b039cb37d7d24228141099878fb964c94478ba8d9237ed98265", + "api/v3/oasmiddleware/error.go": "819152ec089ae965ea8d3c9a4908d4c7d23cb7e63a8be88a5e216d7fc9e8ff1b", + "api/v3/oasmiddleware/hook.go": "b6412f54b52b22fd58971cade1ee549af619a758177932b168c7946dc98db069", + "api/v3/oasmiddleware/response.go": "9703b1275f51633915c3228ab4de1f4e4a8420ed2008ece753eca5e457fd2e68", + "api/v3/oasmiddleware/router.go": "0e3f45c1daf27b3b850be92bebdb9ff7011df72e9f8a8a9c6287d7ca29cfb82b", + "api/v3/oasmiddleware/validator.go": "1314115b86f6b5a8b113d647a7cda576517bace8a36ac678ea05703e6b7b3337", + "api/v3/oasmiddleware/validator_test.go": "df2db8099dfac447e7512d85c22ceb5bb3dd1eddc1c6fe9ef47c90d469641b3e", + "api/v3/openapi.yaml": "66c58f249315f265669a5036d9083d643691e00434c5005d096a8a0f9fe51eaf", + "api/v3/render/render.go": "152f30770362056fe9df172b6c389df3d4f5ec1ea207f1f5774b21fda9609e5a", + "api/v3/request/body.go": "6a08b4283315b5f4aaee0848eac10d8bb5ae7836ff996ee856ade36b0ca35326", + "api/v3/request/filter.go": "91b1b3196340acb850c47263b86ec9bf74c3e44d74afc3bc9d2a1251a328c194", + "api/v3/request/filter_test.go": "31dc30eec4bbbe5841fe50f438c92813edce184ff3514d4dcf8e3900c79be793", + "api/v3/request/sort.go": "ac1dac0a9cf5dbc71938dcb17704276d531608f9d7580becba77a4cf23dcb56b", + "api/v3/response/cursorpagination.go": "ef08052559109abb35becd08f427f187ab5560d5c5b535555a78e844af45409a", + "api/v3/response/pagepagination.go": "5be6c8b216193bcfe6acd9f536ddb4f07bd621842be094e6cd46ff879a032634", + "api/v3/server/routes.go": "06731942926cfaf948a704b7c31fac952e488a1988f014c187c9d1f8bdb7f84c", + "api/v3/server/server.go": "23d59d41e9ad52cca25c0059a462c5f20ec705c0544de4946dff57660db8d0bc", + "api/v3/templates/chi-middleware.tmpl.patch": "ccbe170914ba7631b4c2056290d8a79785e5a2cd254dd70547b33cd273201931", + "api/v3/test/embed.go": "6fc43fee2f6b345b73d74ed77005018e22a3b2b53b4540a10f4784a378dd9ec4", + "api/v3/test/filters_test.go": "50b2112bc1e93cc6bdeb2279cd0dce307ceb91c8e4a15f69461c61349ec60563", + "api/v3/test/openapi.test.yaml": "0032f7ea6bc7f901cceca9fe48abdef62266c8106b34b16c09559d448a6e4278", + "app/common/app.go": "ab768ab9eca3530e50c067ebbade2f9d72ba6b2384024cd36dd87e1dbc5a4dec", + "app/common/billing.go": "3cb11aed5354c7c3c772fe60dec6aefe9c4459e5991a51b388cb4b9ebb382ccd", + "app/common/charges.go": "f1d397bc3adbff31f1158c5cdc243b251d07c5693cb234413a7f9f6f287d7fa1", + "app/common/clickhouse.go": "9ca6794b0a1ec363b30f7cfffe0f29e5a156dafba0a52b6dbdd0458c0c22ce07", + "app/common/config.go": "b0278fd74de193ef8c44fd3d8ff599c37155f7dca8fd0b1af6e51fe2f63cb57e", + "app/common/creditgrant.go": "49ea02865b479e52eb05482806d5faaf8cb1a0a6ea50f86f1ce94ce302421454", + "app/common/currency.go": "78161d2bfcf5f291f0697244564abfadf974aa4b0a3c854b9411557eb5839524", + "app/common/customer.go": "61b8e501bf0ec585b7b0fdbcc44996b8d92da40acf443ec5badb4b1ae28005cd", + "app/common/customerbalance.go": "e94015ea418a2a76ac20727c4174113ce81af3e97a36012aa189c4bb09dd43d1", + "app/common/database.go": "dd8d8b601a3ddcf64e226929e8b575f82a9a5e6871311bf8d8454dc52fee8a83", + "app/common/entitlement.go": "b23d12331e52635852f1a8b41190f367c5bd27b2cfc77c69c5b199581286bde1", + "app/common/featuregate.go": "36a38c3c53d94b22cdd7982c00bc22811fa1b4e640a9a0b2b9800ed4ac1b8144", + "app/common/ffx.go": "f8a95f93cf50613ba08c94ecdd130b1e8efa38df4707592e000fac9e5a1ed5ce", + "app/common/framework.go": "da3b33a19993b60adc6df03d5e2a4a924ac3a9b8acd60fcd39c0509eb3c96704", + "app/common/globals.go": "7ff505e16da11f1f0a0ca6b84389305dade1959c47d4207ffbf747d6e5d61e24", + "app/common/kafka.go": "3a3018dcc1e099994a8df893c50312a59e00bb2e8220b3c6695f10ef7bf1adf9", + "app/common/ledger.go": "609b67d8bf6a5143ed9de7f6097d50dfc958260a7c580bf58e9bd416d0f24905", + "app/common/ledger_test.go": "99830b854153b5fe997fe0143ba983e425cb183f64f1f0493c3214d695243175", + "app/common/llmcost.go": "5edc5775fe30272701f20f3828a8b8c9a6e5bbb54cd26d5f5754f93ab9fff54e", + "app/common/locker.go": "121343e4de9080816a9c06f4086326719025e719984866aed572f4395e577bfd", + "app/common/metadata.go": "108d533dc14a274ab6beb91174b96b6a772ba8444caf1dd17e07098ae869f953", + "app/common/meter.go": "6b387a2206a99c1f46e1a1e16d2303680a0adebd49c12cffd448ef59371099f6", + "app/common/meterevent.go": "fc97556074ddae0e1356d901a7e8f566cf11415644f4020a93147261ea3f6eef", + "app/common/namespace.go": "3d585287140b8c82ef3c7357d2742e069ef1cbd956d860c16213f21cfebf8bf4", + "app/common/notification.go": "59f0ebd38c01741ccefd6f2614a9fdbbd86a9adc4c09bd57152dd7b0e34b0b10", + "app/common/openmeter_balanceworker.go": "970883aaa88d17379b1511c8957446a70e7d452206bbf507d4631547e340115e", + "app/common/openmeter_billingworker.go": "0f817c1bacf170a003f6a78e599e9623482e35339e957587426533a899a86d49", + "app/common/openmeter_notification.go": "75115237189df4d94895de7285861687408e98f5a8f22aa50048610df41fa0d3", + "app/common/openmeter_server.go": "47fbc8a2fe8ed06d2088243416d67fd1fd7fb9a9610ace31b5a5d2c39da61787", + "app/common/openmeter_sinkworker.go": "f60cc7f14885a28834377b6f20e115224c50b00ae1e7c7280592ddbab8ab0f46", + "app/common/portal.go": "77993e07372972299d61f34018e335c1028257389fb83b0e6011a82455ae8272", + "app/common/productcatalog.go": "c38db26da99f90e7bbf1390f88ede5903f7aa026b268e8fe775ea5ab5ab18998", + "app/common/progressmanager.go": "79ac6278f4aff39fc23b51ec56a9075459285f8ae9b27ec42961e37a70f90f49", + "app/common/runner.go": "82da2709381bcf751a172799babf6b4df797b4ab64d695e2eb4199f01f68409d", + "app/common/secret.go": "a5c714e37857169dde3b74edd500304ffcfcf7992e873b64f855759a262cc31c", + "app/common/server.go": "71574ec7f81347a287f3201259c3c83b8a41eb0bd85bcf667adadad8ebd12524", + "app/common/streaming.go": "c638743abbb7b80a6d3945b83fa95f8f93270ad9ccc383e86761a14fecf96281", + "app/common/subject.go": "0d8ae96b7a9ac3fa1bd4d5268746dda93359746f10631c46df22b928d1d47e63", + "app/common/subscription.go": "133764bd5c1efe644ff46102de0a696b38f6c9c6c572e7982f9c1d30f4d16429", + "app/common/svix.go": "9e80be37a0b7a550518b03b923ece4b6431b63466a8f19f0796440159d887259", + "app/common/taxcode.go": "eafd3ca88b7ac181d495ea32ff7ce4fa2953a2ffa63837c5e36834420ac677f9", + "app/common/telemetry.go": "ef440ef4b98f64b29d405392fa3c078e1d17a10790dd2eea8af7b3649a708580", + "app/common/telemetry_test.go": "7ffd25a92a0e6fd79bb62ad356919b3feba14da3b918973352f46a4452c9765d", + "app/common/termination.go": "722403121be03e32feca979ad65ba3339c35804055abb1658a8764e7fd7e5cb5", + "app/common/watermill.go": "75ad68ba165e7fab7b93dd97a35d0582e1dcfc5a6b0a881ac901303e063a2b27", + "app/config/aggregation.go": "c148c2886d692455db0adc46eece3f73d24d3c0171bbcec58362e3e164166b2b", + "app/config/apps.go": "47c8d1b83b82e8e6623b2cfd8062d289efd1a58022f74f85976364bd3c82a728", + "app/config/balanceworker.go": "c97351aeb8ba895e6dc82b52ab6abc3224ddae3abc8789d95354dc1b0838daab", + "app/config/billing.go": "ce19a6294b31642dd9be1f86d8b0036c7e7391f38bfa1ee4bbc9bee955993819", + "app/config/billingworker.go": "6cfa04764a96000934ad96f7d580c3ed84142cdd5348fbd439ad32ce530d4d79", + "app/config/config.go": "e4d9cc214a1b505824be969a73edcbf549ee13438f4574d98fe4b627d9cb2aa8", + "app/config/config_test.go": "729729903d743054d8b96da7a589e19fd248935a245357db7f5d9f58b960300d", + "app/config/credits.go": "380719e7614eaf73fd49c0903198a3cfd6305b842ee670993a74fd3e63bbe061", + "app/config/customer.go": "eb765dcccab123b301b0cffc78fa087125422dee92e43357cd0491461950e60b", + "app/config/dedupe.go": "ffe17f9e444301ec122018dcf2835bc7097377cc06eb88183708c061b410a548", + "app/config/entitlements.go": "9de14aafa28fc7251ec1eba88edc1a38dda3df206018d54bdfc59f3aad0e6aa3", + "app/config/events.go": "904c83f691d23e9401041a8d5f913a3ccef8953281eca2d703b599381a7c1cb4", + "app/config/helpers.go": "127e81d91f7cae3c92cbab6175d9d24cfe4c9f8ec5ed19150170a16f923ccc0b", + "app/config/ingest.go": "cd8ca0c39c2e141f8885e5f9272d4dc16ad4124602b6e0ee2741f3f9fca7c369", + "app/config/ingest_test.go": "edd885d31748ca227e06ec304305a1051aa4df383634d30ee677b2f902ced820", + "app/config/kafka.go": "4dc6333056390dee72478233d290d35acd395537d9bb6abed8d25bcc6fa02b52", + "app/config/namespace.go": "05e68d45224f7f11ec5fa994657b838b8c1a3625e76ca9ae3ff9033a6cbb08c6", + "app/config/notification.go": "f71dcbe3eac7d54a2231cabdacd52c9fd6e7fb8c20c2ceaf4a55672f889cd026", + "app/config/portal.go": "185a9ea93a66529651d04c62b5e9d6d85d81d1714de945b30e48777f912a3ff5", + "app/config/postgres.go": "996ce7ad3e02752e89420e2d4fb17193c895d8896fe01beff6f51accf5c8f6fd", + "app/config/productcatalog.go": "78e35ef299248817a06182448bd5c4a1d8430bc363ea2c6b9ff5a0b097519b31", + "app/config/progressmanager.go": "f513418c2fbb5d61d3326c6b15fd5ed492c0ffe34b42de411761da7a9e16ca69", + "app/config/server.go": "5981a7d22d556f0441ed5232fa7d0a569ec2715c6c124507a6cace20f7193743", + "app/config/sink.go": "954c67c2625d2276610d0a031e63766c003516c9b4f71ebbf193e804f08aa96b", + "app/config/svix.go": "a5f75627975946b9d0f6463d2a26ac101adaad5334bd04308e95b8b0b22e090c", + "app/config/taxcode.go": "0b3d7dea66f54a0909d87ca57d85e83c84131fe308056bb0dda66dc9f67619cb", + "app/config/taxcode_test.go": "8a208d18f6ad4017344280f6681c6f4e0735a435f90ed9afc29a0be583c61bd0", + "app/config/telemetry.go": "54951ad379e2045e54bfea9aae5ea4d919a3ff7ee8e278d8bc0f80e15b82f3d6", + "app/config/termination.go": "db2dc4eb60a72160506e887f7f3eb32a7c740a6981fb9f94f57157aa00f804e9", + "app/config/testdata/complete.yaml": "31dc81875327d556b7870876d49a8e60337fdd3d15d73f0ed5c1bf24aae6612b", + "app/config/topicprovisioner.go": "d25350baae58022ba52d5f9293667f419a268dbf1d1376d9c487b30d280849b4", + "app/config/viper.go": "edab6e4de1780a8579f90843576bcb342477dde2d310bc3f13a801d4840fcc11", + "atlas.hcl": "308c3a2ff1993eb5c027b7f83a3ef1eb90cc945f76b256e73b4cbccf48b37f9f", + "benthos-collector.Dockerfile": "3372aa34208de0372932966abae859345024bc480cc5fd25fdddc7301c5e5bc8", + "cloudevents.spec.json": "d4b305c905205a4bedae7ddaaceee862a84fe62c946862c1d234189aa76b26f1", + "cmd/balance-worker/main.go": "57546f67023ac3f5d0a3cd2574056a60d58a0c2a90dbb4133f988c88636e6dc0", + "cmd/balance-worker/version.go": "6711b730d65109aa0886c4771ece3299ea0bfec9e1a68fb2efa1ce7705e14d39", + "cmd/balance-worker/wire.go": "d45a60ba37f658bbb66bc5c0d0a14560250c11e8850a77f5e032f9b521eae7ba", + "cmd/balance-worker/wire_gen.go": "1f11d4e584659d451e48e5104bc90c76ac654a9d4b917ef599e871ab5b1cfaa3", + "cmd/billing-worker/main.go": "81b985e7d70e1f41b657cf2b431ea12a4b71104897333dc68377934bf045adbf", + "cmd/billing-worker/version.go": "6711b730d65109aa0886c4771ece3299ea0bfec9e1a68fb2efa1ce7705e14d39", + "cmd/billing-worker/wire.go": "7625d388971bf9054d518ac28b990c3ce879d506ff56b9a5123287ca6332e8d1", + "cmd/billing-worker/wire_gen.go": "806b13d26bdfb77449e9f574ae1148c121ba1f70afdde1aa57cb285d55f8fe5e", + "cmd/jobs/billing/advance/advance.go": "4ae849b27c876622f2627216323bfe6659d6ebc9655f20ee30641d07567ba3c1", + "cmd/jobs/billing/advancecharges/advancecharges.go": "e2bfb5461c23bd8124f3736793b6974e2a008bfda8af92c80b8165da0a75485d", + "cmd/jobs/billing/billing.go": "e506c8aea090dd8fee6e4843a087423039aca62fd7319d8f4adca1180ba64141", + "cmd/jobs/billing/collect/collect.go": "74999aa1302fcf0a90c37b3de67c861c2c3234b57d5a71649950db2c0ac33033", + "cmd/jobs/billing/subscriptionsync/sync.go": "14f75810edc7ec9929d5797f54c5cb243b78d8d334638effb44206b66f21f604", + "cmd/jobs/entitlement/recalculatesnapshots.go": "55d50730af8e0a972dcd0fab1c001ad50344b919b5d9fdd7388e3b780d9cefa7", + "cmd/jobs/entitlement/root.go": "b4f3c15f609c297bde8a422b908675cc474d0dd656730c5bb74549459a349924", + "cmd/jobs/internal/app.go": "26b9264796b5ebe0ee95a47e3c4ffc8f7bfd490498d2d709df338150478842c5", + "cmd/jobs/internal/config.go": "9b07f1c90e1a055fec3a3b505fd15a89c73346f1669cc6c408fc158484920b8b", + "cmd/jobs/internal/globals.go": "76726159eb85d4fcf21ce1d2bf1d200a21191c7cb62e7afce7e16f1394a6cb74", + "cmd/jobs/internal/version.go": "b83266dcf436d16bcd14c397e9b7bf282f17bee28e0a5e99941571bb6a6f9625", + "cmd/jobs/internal/wire.go": "a2475ea75999ff555141a2f6ccaf1fee0aa4b7c0458492ad5f9b0fb658ecf5d9", + "cmd/jobs/internal/wire_gen.go": "a0eae52528659d5fd0fb0221b808c906f9d326263d629a72d4ed66e4579d5e87", + "cmd/jobs/ledger/backfillaccounts/backfillaccounts.go": "63ba1b1038c8b086fac7164cc9b7785501c94b2e4bd8ea22355b83d554263162", + "cmd/jobs/ledger/ledger.go": "8037e3438f632a21ff15bcc04a980133d8a7c8eeaac8186b79b66b300622a646", + "cmd/jobs/ledger/service/customer_lister_ent.go": "8e1c46954698f5e38126bc3760920bb2c968409154cae345053cc676fdd820de", + "cmd/jobs/ledger/service/service.go": "edef69d47cecc786adefcfe45d97334de62655de6101185f731c97e1a396a671", + "cmd/jobs/ledger/service/service_test.go": "a4479f2766492d791abca339f05d804193f77e5addb9ffb953898b7831cf3fab", + "cmd/jobs/llmcost/llmcost.go": "320769d223d9f9daa2b6a2e20f58dadd36a340d77fdc238c86df1eb626b39b74", + "cmd/jobs/main.go": "b96d7b4e2ca0ecdfcf068d1fe62a8a249ef5f981330a4488ce84efcdec665fca", + "cmd/jobs/migrate/migrate.go": "148092bfd817eda072199ade5ca6e4bdf00899afb53372aed6fc2b65b06bc9d3", + "cmd/jobs/quickstart/cronjobs.go": "c278e7928bf3f7594a9540e6be68898c6b3c158859bdb9951636d874c0218966", + "cmd/jobs/quickstart/quickstart.go": "daacec0f3f9644e96b7683838f7b642998048424c6fb3cfed845d8d16884a008", + "cmd/jobs/version.go": "dbe29e77c40df8f219ceaec2a02315ba52ca6a76858e3c4c0dca379506f2fded", + "cmd/notification-service/main.go": "d186c493e85580a569b1bbb04902283f1578106e9f5cd18c8b2a05f3ce5da85f", + "cmd/notification-service/version.go": "6711b730d65109aa0886c4771ece3299ea0bfec9e1a68fb2efa1ce7705e14d39", + "cmd/notification-service/wire.go": "555d806b631dbd136cf90e308f0cd701206b98e9ed8131d84ea544d9c46d05cd", + "cmd/notification-service/wire_gen.go": "d777c0bb2e6fe3bb0ffbd8104af5ad9431caf751a70db83873ee94477dd189b5", + "cmd/server/main.go": "4012a3eed52cd76ddde111d5aeaee461d6204f385f6fa34cc4b31780a6e8a8c4", + "cmd/server/version.go": "6711b730d65109aa0886c4771ece3299ea0bfec9e1a68fb2efa1ce7705e14d39", + "cmd/server/wire.go": "d4c7943dc78038cddd2c242ddba3699b920246e98868273fa03bc2d363443ec7", + "cmd/server/wire_gen.go": "7dda21c0dc2337c66d880faba564c3df72aae76dbb9026cf207e8942c029ee51", + "cmd/sink-worker/main.go": "d59adeda8d096840e3b36041619b013f9087e8487c8645b8ec972741ceb3e17c", + "cmd/sink-worker/version.go": "6711b730d65109aa0886c4771ece3299ea0bfec9e1a68fb2efa1ce7705e14d39", + "cmd/sink-worker/wire.go": "acd8968f6fca385bc7b69b035abfaa8a4dec8f884aa843f20bf36d8f9250fd3d", + "cmd/sink-worker/wire_gen.go": "822222788d107f08ff207b5d997b4e49093ef0e157120884de0f52a7a99d147f", + "collector/README.md": "311b7e540ac39061b26d494f940466989b7c1523b828c1d1296be51b183d2477", + "collector/benthos/bloblang/parse_resource.go": "b9088168abe942d841794fd2833c8de79e465e54c28c22946511c56bc176cc6b", + "collector/benthos/input/kubernetes.go": "4cb3ecce674dbd9a1003471055b62e6a3618ce1c0747c13da25469409db65e5c", + "collector/benthos/input/otel_log.go": "cfb5d41ff74dbd06e68fc4cb078d7c98d123a9b61761def212f73c9b4267117c", + "collector/benthos/input/prometheus.go": "b046150cd79e3a0f3873547f59bd9485a5d4eddb76bcdb916e9f6b406e0883db", + "collector/benthos/input/run_ai.go": "26dfc4899cc07aecaf2630a86050a39b9df7a9bcae2cbe77b26e7176ac57e7c7", + "collector/benthos/input/runai/metrics.go": "f2c2c64fb93abff857c903c2201db7ce5d6389b34df950fe3fb66f3b19ea3617", + "collector/benthos/input/runai/pods.go": "8c6b73e440a1608fa0f1fdf0bf610b0a17c71abb9d214d0d0817d7932394378f", + "collector/benthos/input/runai/service.go": "54284d43c8d9e3567084b602663f458665416dc70b90573a00a8610cdbd5e35f", + "collector/benthos/input/runai/token.go": "a4e6e82f5f206ac63f4bab3d813b8d4dfea13230bf38b6330ad5349205cc3c72", + "collector/benthos/input/runai/workloads.go": "6fdeaa71861f949ee428c29223630c7277e72787188d291e06b281c2e9f04c92", + "collector/benthos/input/schedule.go": "34b6190b1767036cb6582854752b99f1d50c6063c506313e5c7fed8d37dd9555", + "collector/benthos/internal/LICENSE": "3e445ed2753508bc20af37c0444a7e031a91796b7e8d17cb028e87cc238932ae", + "collector/benthos/internal/logging/logging.go": "fbe7a5e930c9c73bfbf107a998e6cfdbfb32bcf6da463de6af0153c9a46166df", + "collector/benthos/internal/message/batch.go": "33d6cf9d33f809c588c984ec77e7033972b03cbbde8136e592a2a2c80d237f1d", + "collector/benthos/internal/message/transaction.go": "927aef3ac4acc70debd4c1e8ce985665283f8a2d91f5ab4dbab542cf0b4ae07a", + "collector/benthos/internal/shutdown/signaler.go": "9da82b8ca362795483c06501bfc95dcea9de1d6f03e4c990e43499b1917f9a6a", + "collector/benthos/output/openmeter.go": "fd891079ae1ab4b1821823951f061f124a055d5eb96fe182e51d3d6e02a7328c", + "collector/benthos/output/otel_log.go": "26141bd3e2033c1eb9af8e0b2e5d2fcd0070ed70ff43cb4007543a0c436f7f69", + "collector/benthos/presets/http-server/config.yaml": "8033ff349fafd0b6a64330a4a1da86d8c9d87b179e0738db5be6e1ea261f1173", + "collector/benthos/presets/kubernetes-pod-exec-time/config.yaml": "532cbef8f1214bff5e01f6c2af117c97cbf1cb0416f22b7ca6d019a98cd29899", + "collector/benthos/services/leaderelection/flags.go": "23d731f5409d702feb4ed4dda50bf6d1061c21c06e39286834df86161b04f402", + "collector/benthos/services/leaderelection/service.go": "659f3ce5fa5bda385248eda3dff75e53f3fe9f9d6d9c9c5a7a471d256ae42951", + "collector/cmd/main.go": "be8f84c60e9703a93571e82a0e0b64ee619e6a3a9b64247019714698aa92c956", + "collector/cmd/version.go": "e32f79f9c3ea730afddc5a04443699570a2726dd2f33048cfc8a5ff1b2c0c9f0", + "collector/go.mod": "9388ea9863f5e16771edb218f4d9126d83e0440c1dbe6aa55528efa9957c69ed", + "collector/quickstart/collector/config.yaml": "8a7c0b70ecfb4adf11c0d8ddb2a24cd66defbbe5af62cb6dcc2bb401e1d2b745", + "collector/quickstart/collector/resources/dedupe-cache.yaml": "a465a32973a86725449d6ce79f4dcd49112254e9c23c181b749dfe2a9e40bdec", + "collector/quickstart/collector/streams/input.yaml": "65e52b9e633de112e6613f125550f2b3f07136a978bd6650bcecd01941be4311", + "collector/quickstart/collector/streams/output.yaml": "72200f4334788e9d1d6acc155c01b97e4aa6f6d3cfcebe7b0df8751e35a02dfd", + "collector/quickstart/docker-compose.yaml": "fb85377b55e498a45b43846fd6f507014123cb62a7748652ee8349aed30fb847", + "collector/quickstart/seeder/config.yaml": "d23b80d7279118f59374d89468dc3800413d1f6a0863ba2a43bf2e452a37184e", + "config.example.yaml": "0e48e795378267794460393033364cc7ff56e7dede9be398c9d094b5732c423a", + "deploy/README.md": "a4f359d9f1b8a6af26376e9a2a4085a6c4f2d1d5c6d908e31884482607e2121e", + "deploy/charts/Makefile": "fdf4b08f90adc56c2f36b987e63422189cfc6b2a9687eb010b1a4e51d517dca9", + "deploy/charts/benthos-collector/Chart.yaml": "6967570ed19ef75e238dca038a4d05abaa11bcb4f34395bba1aede52768ffa20", + "deploy/charts/benthos-collector/README.md": "6febf5eaab8dcd2bb336facfdb25e01e565c94750066613d71e57a49d5b0b3d3", + "deploy/charts/benthos-collector/README.tmpl.md": "4909e4e13dd3cfefb45fee9969b7f6682ccac11abaac55e93c2b70e1228bb13e", + "deploy/charts/benthos-collector/templates/_helpers.tpl": "fd27fba488f68d53d16bc45e5dffbd8b38ee99231fdc3234dbcf62e1a28382b7", + "deploy/charts/benthos-collector/templates/configmap.yaml": "d00e6df19f35e3eb775037feb0ea8c702c52ae02b63b952370504e74227aa7fe", + "deploy/charts/benthos-collector/templates/rbac.yaml": "0df8910968b18ac3051c327ef1591d2d312012814aef8227104ca8dc25911c41", + "deploy/charts/benthos-collector/templates/secret.yaml": "31e91a8d111182891037dda1fd86312d05cc3400db398a18051fc7ff28a9e635", + "deploy/charts/benthos-collector/templates/service.yaml": "dde9328db9d342a6f465d71c19f0b83b4d72636dbba11a7a28678ffee56fc5b1", + "deploy/charts/benthos-collector/templates/serviceaccount.yaml": "e74f42a824fa2af445fdd4bab46be1cfeba2358e8bb7b7ef15abc9c936f69fee", + "deploy/charts/benthos-collector/templates/statefulset.yaml": "b98d6bdd4aad1fb07f1251fa0f8c41c204a7c81ef67e481d91094a10ae98d339", + "deploy/charts/benthos-collector/values.yaml": "2c0d898ff845da85c788c61ae16ce618744f6b23942a7f879230faf6fc8ad2ce", + "deploy/charts/openmeter/.gitignore": "2546c6842bf2d11f364d02cf0ac332082a1d04be37ea1d37c743b05678000168", + "deploy/charts/openmeter/Chart.yaml": "30ba9eb5ca8e14000de42f89a249372ee7f565215ebe33752bedce78d22e6399", + "deploy/charts/openmeter/README.md": "064ddf5b919c649f4c2683d53e411f69c8cceccc8cda030009c96493521732c0", + "deploy/charts/openmeter/README.tmpl.md": "1e42f9537442838be3b37da3d7a326677ba6a75a5b1326235a1f3c690100711c", + "deploy/charts/openmeter/templates/NOTES.txt": "7480d299a81bcdb1e83066bd491241fb554da0793478daa2e834041cfed4655d", + "deploy/charts/openmeter/templates/_helpers.tpl": "a4cd55b558ce5f06beec7dd1f10193a362c9bd6ed1645b3f8d8d64cb356fc743", + "deploy/charts/openmeter/templates/clickhouse.yaml": "1cb3ad3604c2b4587e906ebc867d04b903f33613813c9b775c5f2b982b8a8ddf", + "deploy/charts/openmeter/templates/configmap.yaml": "bd98a09717227c3a2e553375ee7c043123e121810b870439f41dab0826d291cb", + "deploy/charts/openmeter/templates/deployment.yaml": "38cceaf9d171ec02808ca6405fa4339e73670522c39fcee263a2db5ca48a3821", + "deploy/charts/openmeter/templates/ingress.yaml": "be63bfb698d930a893b752fc0ccdd30a21efaaa7422c6fe9e337e866d6061041", + "deploy/charts/openmeter/templates/jobs.yaml": "c8102d20877f2839eb73b816dfe608b9fff6422cee0b738776c4e478ee9a4f00", + "deploy/charts/openmeter/templates/service.yaml": "13b97a3c45acaf4e374e05c9970a1b911158aefa5db15b78806d759c307946e9", + "deploy/charts/openmeter/templates/serviceaccount.yaml": "da8b03385ea1b247070b631e019f489767f112e697752632c34ac162fbeff6b7", + "deploy/charts/openmeter/templates/svix.yaml": "871ba6efddce75175f952d6d02b016216d3c97e2e41b6f7c1becc1e85ae0e47a", + "deploy/charts/openmeter/values.example.yaml": "adf0c76682d6f10df08a11c4de3676f87fbcc07cdd988dad6e8e85a78ad58692", + "deploy/charts/openmeter/values.yaml": "eb2b4a830c1508dc607620356d46a383c59784c7afff0d06bbdd47b428f49f6c", + "deploy/charts/template.md": "043ca251fb524896e76bfc926fdb42fd01a96a6cf96926c97d7dcd4b933544b3", + "deploy/kind.yaml": "c1c04d1ee10809d9799c6a7293d9da2c6d04f3d42ecd3ddde2b23e5011f0af2b", + "docker-compose.base.yaml": "d9ff0056d258a5f5ec470f5c2ff02daaa66aa50a77af31f8b1188137f8eb9f00", + "docker-compose.yaml": "57ed73ef795528c6e7f9ef8eb47dec0083ab64391e4f1bd25e44d2649f4dcd24", + "docs/database-migration.md": "7b9c641247b814a4336d5fa07ea97eca8e778addc3f389de4e4c96df388e00c6", + "docs/decisions/0001-event-streaming-platform.md": "fe7faf31fce1a3ef275b0b7352797f2b4028fd73e0f735cdca856f30e1f05407", + "docs/decisions/0002-event-format.md": "0cba4557215cb4ccfbbc093c79a7ba71ffaafbaa237812c33a7d17670e5f1dc4", + "docs/decisions/0003-idempotency.md": "4d21c057616e17b788fa9151f22fa90747ed4b14389c9ad6049e7e5ff3f38637", + "docs/decisions/0004-partitioning.md": "c082ab14473dd768487475a3b6b47d3e1d65639405c0f08d156bba8872158a25", + "docs/decisions/0005-clickhouse.md": "3d260ac460f653847f7251f5f7c20ed65d16c8bee972de9fc04e5a4e4ed73fe9", + "docs/event-ingestion.md": "4e0b39207a0cf051bee98d37d7d3188357ff19533d43421dd90225950e30dff4", + "docs/migration-guides/2025-06-26-subscription-alignment.md": "6c6eeb4208ae519e4ef4b964d6cce42008cf5e0b4a0598569b55082403dab7cf", + "docs/migration-guides/2025-08-12-subject-customer-consolidation.md": "2a16bbb3a64f7f5ac19f86401fac4b81b677011db02becabf6efd74dffcdd16a", + "docs/migration-guides/2025-11-04-entitlement-events-v1.md": "46a132d10af7f9b5c36d591c320d8c9d295effdb425654e0b32fb7f6c09c0f42", + "docs/seeder.md": "1ba8ee0a3716c73be90a9227ed677ed3afe768d6ab267084fed111771cb55c7f", + "docs/stripe-dev.md": "7c5b5cfc3a62b87ba9e22b8bc3336029028237167e87464ebf91c52a270d4094", + "e2e/.gitignore": "82571c00415e010d2eb256eb76b76124635fa54d0666e7d6b49dbae72e442678", + "e2e/Makefile": "a7b6d6c10ddf2ff1450439d9ab952d38f7b33c91fba5824fb2519ed544fb8ed2", + "e2e/addons_v3_test.go": "68ca88ab3f314449aaf06c62d27db7c38be8ae87db7b4f310c60e931fa41d67c", + "e2e/config.yaml": "5dad9eb198e92842f81f59d384aba9ddb27140457204cc84cdb225f61c3495b9", + "e2e/customer_credits_v3_test.go": "e7183b91c3c214bc89333e38bf5bbe066a0323cc3a350dbdd9fefb613a21af98", + "e2e/docker-compose.debug-ports.yaml": "16141496e7330636108ba30e9a4553c365c53ea0b58ca106f15cb32f48ab52d3", + "e2e/docker-compose.infra.yaml": "27cc8746a28826d61e1b863e24a340907ae99a3d35dffc55d73c2f5b04e0b276", + "e2e/docker-compose.openmeter-latest.yaml": "14574ebfb38e01282dbc817a87db13339fe171cef3de994502b6b71bb20cadfd", + "e2e/docker-compose.openmeter-local.yaml": "89d97a2b5c866aac025481be18e0331feb34aa3a70f2935c58f9b202e1a90bd0", + "e2e/docker-compose.openmeter.yaml": "283a5e20eed605f9860bd37b25cc8235878f34595267596030d8f9a4323e9e7b", + "e2e/e2e_test.go": "d027b2a93cf71072b58309f81fe6d47dd966ed308524494852e4bc41b03bf5c0", + "e2e/entitlement_parity_test.go": "e4bff7c1abe6c24ae5508cb172914c2b95f67618b166dad5421a0106c18c44b5", + "e2e/entitlement_test.go": "cc2cb216a246b30bc16e28fb62993749930b53378cab16e873bab9a67a35071c", + "e2e/helpers.go": "6b00473d93eed0bf7d210db596ec50a2a6f8aa2336a28073e04f5f489796e2c3", + "e2e/ledger_backfill_test.go": "9446a15c37395a5979c67332d6843d36b36dc666f697f2f852be435614b090bc", + "e2e/multisubject_test.go": "b27bcb2c5719e0b2ee6b8d2603cee0f3c013bfdcc0d00d1a281f4ac225b1e5b7", + "e2e/planaddons_v3_test.go": "6874e5bd42a7a3715ebbbac5fd38481c70805845a9d62af76a347eb264892d39", + "e2e/plans_v3_test.go": "2ca70182fea80c85e5b67337e8e9baa7e90842434b2f15980db706fa8941232a", + "e2e/productcatalog_smoke_v3_test.go": "072eb4862153494dd4de1b2d943fb4cdeb52cc876901414840c9896334a739df", + "e2e/productcatalog_test.go": "e2b6aa39c125d9eb3f2894f301ca238395d8d248d0c4c5d21b9bb98d2a75ca70", + "e2e/setup_test.go": "bcc6cd915a0c69a9cd299e19dee84add658cf9b7064dd52688735fcfd745fe80", + "e2e/v3helpers_test.go": "528018b097fc6864a75c880bf197768c18c257c29a6ffd6d37c84bd51907d3f4", + "entrypoint.sh": "8b6f992acf57709a51669106c794bb7e54a57e2225710d124e343152df5bc4ed", + "etc/seed/observability.yaml": "6c515a45dd0f195b3cd6a1d26239b572cf4aafab95dcc373bafa2943afe47d3b", + "etc/seed/seed.yaml": "321d4c02626447e057549d52c5c6dccba25745a50ab6f9ae59cf71de5c791209", + "etc/seed/streams/api-requests.yaml": "ec5d4d7d0c05f348184d9556243b122bc73126e983eb268b58dc7b2d614c2b1a", + "etc/seed/streams/prompt-tokens.yaml": "8a9255b837cceeb0b679311f7f34965d119bf297b4017564351ae25ead1d4f78", + "etc/seed/streams/workload-runtime.yaml": "0c7d180fdbb0330e288b5bbff8a98fe3db5c6fb518654ff8ac98e847a9cb6fa7", + "etc/wiretap/config.docker.yaml": "0a9639330366719153c05cf254da0309bf9e5898044b6585dbe6af4254e80011", + "flake.nix": "1dbaeb1675fd12b8308fb2537babcba191ea863a93318ecefc7d3f9858a273f7", + "go.mod": "a89e31d918203a7d9ebfab41e83fe3806abd2d5bb04c7d602276c954dbc5eada", + "justfile": "806096e05770f033014726327649f5e413eb99daf5f36d5f44230ad5b90a9469", + "openmeter/apiconverter/cursor.go": "c9c4bea97967263729b0df14ec82d1924b372bc8a1a7a35b0aab7a387b9fda36", + "openmeter/apiconverter/filter.gen.go": "9c306193a3532a94969febcc56012cd2f75c33681c20b2ffb2de4053bd7c9c08", + "openmeter/apiconverter/filter.go": "b16bccf62f74763bd475af80746f74b05c7e4d147efb5d592415b70c2e661ebd", + "openmeter/app/adapter.go": "ba5ebb8af505401dfb3b34fe82c4ca9cf7d446803102049f6d090fcdbecc1ac6", + "openmeter/app/adapter/adapter.go": "c3e0f13403d290efe083b280897d81cc8ca03eb7ddcea0e10f4bca948d3fb933", + "openmeter/app/adapter/app.go": "1d27757c1f09c47e5a9ff6c5dfe1173ca3b20afd83f37fcd296c79eae8474abd", + "openmeter/app/adapter/customer.go": "793d1df7a87f878baf2da3ab8183f687dc6a2b4210f63859af028ec05580a0d1", + "openmeter/app/adapter/marketplace.go": "47b35f4b4b1054b3d72db0b5b81c8b8759711079784d0c71cf9c7d819f8dccc1", + "openmeter/app/app.go": "0d4779052f3372fe99da3f8cedd9d9bade4f988fd61cc959c867b07c07b2257e", + "openmeter/app/appbase.go": "8138070665eb4e481608cf6f30b3c7a8a802efe8fd50281dce74e78eadbd322d", + "openmeter/app/customer.go": "ec70c93e0cb6c33a7e1dc7f7e6a8286a728ae531ca5b854f7753725743bad31e", + "openmeter/app/custominvoicing/adapter.go": "0485f355298e5c58a22defecf88b0010bcb72209dba3f07f76438bbbaae36fd1", + "openmeter/app/custominvoicing/adapter/adapter.go": "569136c863e9153da7aeaeb04f7ff636a5d9512f1d8d51040778b354c8e28902", + "openmeter/app/custominvoicing/adapter/appconfig.go": "2c317314732435c14cfde54315ebdf9208a982a269f122e82ca254ca3ecc9a65", + "openmeter/app/custominvoicing/adapter/customerdata.go": "7320695989dce933bfdb3d69d30b83176ee09d4ac09898017f80e1fbdf22f287", + "openmeter/app/custominvoicing/app.go": "0364aa7144bfcfce70ce81150b005e6ae7b797457c230ba6664f6485eb377d0a", + "openmeter/app/custominvoicing/customerdata.go": "303b3b8bef096242302c375688a39e941404e945c9830fca0c107ec4ed2f8198", + "openmeter/app/custominvoicing/factory.go": "d27063c35769f8c79f6004214a1613d442be89fc37c87ca31c63d56b3d314e8b", + "openmeter/app/custominvoicing/httpdriver/custominvoicing.go": "55dee3dda7a1ceeb8241fa4f18caaf652ca42f24c013a4f2559cbe9927d68671", + "openmeter/app/custominvoicing/httpdriver/errors.go": "dfbc8412a7a574bfe9931b1446bdefe741ff0f3772b85b5070c1db44d94bab79", + "openmeter/app/custominvoicing/httpdriver/handler.go": "4e0e996cf0ad6349a02c1036986d853cbce9fd365a3558739fc687fbef8dc02a", + "openmeter/app/custominvoicing/httpdriver/mapper.go": "a77619bbd13fc9c06b8c0d03c71a117a7c6f0fea7ab203e0513b5617648b4abc", + "openmeter/app/custominvoicing/service.go": "229f08efc2d47d87e2d8ab560a67d3154ed499e9c4965197e6811416dbed9fa4", + "openmeter/app/custominvoicing/service/customerdata.go": "fac31e936168a3def23cb452c6d3e68adc904cd28a856da31594596e12267ce0", + "openmeter/app/custominvoicing/service/factory.go": "957745c29e04602b34134e9aab219dfbaf48c4b64e04e6782d41aeba563cf1ac", + "openmeter/app/custominvoicing/service/service.go": "36a7c4af3f6432bf92025911879959382c985070229ec6c004f2b1c03934de79", + "openmeter/app/custominvoicing/service/sync.go": "4256140c231ac997f9932cb4c6e2658ed6a3d8c3a247c0826c6a0e85050ecee1", + "openmeter/app/custominvoicing/sync.go": "51b6b0a2afeaecfa6587a35e64464677caa138d84f9eea7a4d07aa4d4b570627", + "openmeter/app/defaults.go": "a42025f1b4853672da6b6f40c90e01d369254ffc164e6a9574beecb6d0246763", + "openmeter/app/errors.go": "bf8e6d198130517cb60ee1bd0947f4c6620619d7d384a02bd9c4e439bd3779d6", + "openmeter/app/event.go": "5924003ba7cf8122b2359d9d897205fddf2f77d102836b75fa16e039c27d0934", + "openmeter/app/events.go": "1c9b84c6a0d47b6b1537e340f545720a3d6141a3135fc5b59a6025c65255f53d", + "openmeter/app/httpdriver/app.go": "d5b082e0e33f8f40e53b1f727458db5508e088e35709193bcf244cecbebf1ad3", + "openmeter/app/httpdriver/customer.go": "0d6770c811d156b816ca2fc7fcb01e80ea74445486597207749db3c8f1782841", + "openmeter/app/httpdriver/handler.go": "45b93627bdd350a0150e7f0e6915a456c7b8c9b12c1004ae15d3038b191967cc", + "openmeter/app/httpdriver/mapper.go": "e5a2f3c0b63a0f149347ab27c836ee0d4bbb6fa6c9ce76490d8af0cc3f44cad1", + "openmeter/app/httpdriver/marketplace.go": "ce2217942afb6c4e73144bcb7d984183c9f592658df6d667f58415cdd668ea08", + "openmeter/app/input.go": "784ac14ae9d39c31cf06570fdd226e964f1f485518ae6904ebe3eebf014498bd", + "openmeter/app/marketplace.go": "0b9a344d495e803982a0e06fcba82bd5c641363e04cc53c2dde750edccc0c50f", + "openmeter/app/registry.go": "9841e9a695502dbb1c57170d9a5630b6d9b10bcf119beb6b69f8bf4ed235b86c", + "openmeter/app/sandbox/app.go": "93be91a2663e3a4bf7b745c1b367fd3ae3fc7c3d4c71313ffa33f44c66348306", + "openmeter/app/sandbox/config.go": "5bd255a8f6774d8614790dde3ba44ea8c7f277ec7fea810b1c99664c56f01e80", + "openmeter/app/sandbox/errors.go": "e6b436282a1dacb14d2a44eafad93777f0f16a6673094fbf98386d328f94a351", + "openmeter/app/sandbox/helpers.go": "5ee67e54e239294e94f894ca19695a99d9077c62b09cad024418c825e1bbe533", + "openmeter/app/sandbox/marketplace.go": "6e5505eb8308a7c2af33f4040bf985f94932ebb1e9b409fd638142993544d415", + "openmeter/app/sandbox/mock.go": "16cce71d258c84da24aa36bfa2c6fdacf3f80286d300c4eb01b0042f3fed2cae", + "openmeter/app/service.go": "9dd52cf9e2dd0a96a9a3831d2fae5782fc47eda056d661fa678cfcaf27e86bab", + "openmeter/app/service/app.go": "b115719ce84bf575429937a4df8c50fe9847fa7245643ae89a31ac7f55bd7aea", + "openmeter/app/service/customer.go": "a53812a4497cae20644b1bc9083fd36fdcd6644fbf9fbe5f169a932e3f190ffe", + "openmeter/app/service/marketplace.go": "064aa700d5c8ca30bc1b8646174df6395b288b6ebbe5818a3b01b757a2e525ad", + "openmeter/app/service/service.go": "79957f383673ae1abc35a2ae5f905d82713851d0aca76431eb88f69ed7760c71", + "openmeter/app/stripe/adapter.go": "db2a12c00422c987a96ee5f589258179b53d04db40d26adeedc1dd08d38446f2", + "openmeter/app/stripe/adapter/adapter.go": "9e948f18dd954262277a378102f60ae22357a4fcf93d53ad87a2bcba928b5e7b", + "openmeter/app/stripe/adapter/customer.go": "d44eae1b3789283db4bf30f061c223742ee9641a72241a135839baf97eeab34f", + "openmeter/app/stripe/adapter/stripe.go": "ebba646ef87cf94b4b0ca4b7846b92b6cdc83e367699742e809eadfe7a2ba813", + "openmeter/app/stripe/app.go": "03455e1128f0ce5f2296590d4d095d293a37e04df10f95cca458c0f06f0fd9e6", + "openmeter/app/stripe/appcustomer.go": "bfbbf4afb4b8e217eb1675708bbbaed460f52372392bc3ae76a46ed2bf850ebf", + "openmeter/app/stripe/appinvoice.go": "36d53026f64fd5f6b07add2615f75b2bf21e2a1ab982e9ea65378b9dd2897c30", + "openmeter/app/stripe/calculator.go": "490de8b3efbddd1072fc27ab1b3861e61a94c9d5f56caca37fd4b4e655b43c75", + "openmeter/app/stripe/client/appclient.go": "a7170826b43ad111c4a9e58fdaa8d900682ec94978b29c3528f156484242ac77", + "openmeter/app/stripe/client/checkout.go": "aea19f5f6ac6f10d8d0d2a613c0c2d1577b6e20cd9e77bf4f9f662e25118bc31", + "openmeter/app/stripe/client/client.go": "6b302ad498eb5f3bacbc3d97b5909351290f1b65d80883d998c3a759bb055dac", + "openmeter/app/stripe/client/customer.go": "8634310ceb3bbe26a8c8f74d9a92c1f7b4c96a37b88f493107bdd151cdaef421", + "openmeter/app/stripe/client/errors.go": "78c448397ed65447ffd30c7adf9987e366a6cb86434dbe06bbdb5423fa67802e", + "openmeter/app/stripe/client/invoice.go": "eecbb63dc9d7d182bed8a16d6ba0c589b602f669989e2f92e7a0cf15d0dc5edb", + "openmeter/app/stripe/client/invoice_line.go": "db1b70feaf2321eff37e3f7ba2e3c25be644528c29f8f07cbdc9f178f739ca78", + "openmeter/app/stripe/client/logger.go": "922e8f343c7d25f19a9dddae8c856621448f6ee5d8736f80e730c9830a06c561", + "openmeter/app/stripe/client/portal.go": "627f934a32b1b02123edce458908e0efcc03a9931d475c6a36bfc6a4db757f7a", + "openmeter/app/stripe/client/stripe.go": "21bab4b7ef7fdbf143445912cbe9134af58a5c07e4760b2cb1dacaafe8ddaf7d", + "openmeter/app/stripe/clientapp.go": "c4cc06ed7be85f8daf71aa4ea3db1a4b69b324d5341bb69529a71ce3228fafb8", + "openmeter/app/stripe/config.go": "dc2a2fcb815427a35610341d1de5db97b68a9dd1cff04dec776f139167c30188", + "openmeter/app/stripe/customerdata.go": "716a709fcb36b46caa5d3b7ea2306fb1767c347302e8826267e97b0429a522f9", + "openmeter/app/stripe/event.go": "e2c3bbfa6511cc0983dc84d41c06e2d76be8a71b42daed40c91dd4314524daea", + "openmeter/app/stripe/httpdriver/apikey.go": "0aa03bf121050f2379bdfdbcab162f10989df2351326a9ddb9d896bbb49b3970", + "openmeter/app/stripe/httpdriver/checkout_session.go": "99fc73285b324c84810a040351d00c6665a62c6f5b52a824a80109c29984f54d", + "openmeter/app/stripe/httpdriver/const.go": "946b780a8b67a3135c633dfa06b63e2f2adfdb22747488b5595a6c2acffb9130", + "openmeter/app/stripe/httpdriver/customer.go": "2963b74e7243ae94c5e74defc03a895565f9c9c7eb693076001ef10e01c41f4e", + "openmeter/app/stripe/httpdriver/handler.go": "97ce42ce68a02932ef226d81caf584a629dbcf8f1ae5aac40a35b59df1d82732", + "openmeter/app/stripe/httpdriver/mapping.go": "29d6326a02b11cd46a4d44994fa2e2892c867a7c1d38b0a75ed63cf2b175d27e", + "openmeter/app/stripe/httpdriver/webhook.go": "104e744971641efcb7d24dc2af4d792d105c95743c5a0512e0d4114ca45a7b3a", + "openmeter/app/stripe/marketplace.go": "69eff795449b796d0c4fe265739c3e7e494169da5c461ab08a46f2dc0527a78a", + "openmeter/app/stripe/portal.go": "3b1af435d2c1dd659df74c3f3017d06c21af6afdd566e2082fd07b02567fa3c4", + "openmeter/app/stripe/service.go": "733eb4246abb59c1d78e06bc68ab48556e4cebb7f42391fae92da82623097b06", + "openmeter/app/stripe/service/app.go": "87dd9291a9540b5ca958a9954c3de4358ccb5113a8d02d04e230b7455494806f", + "openmeter/app/stripe/service/billing.go": "9aaa3f613e86165a19414bd2fecc5521e65e45be46c261ba1a5758b8895c9572", + "openmeter/app/stripe/service/const.go": "53cda9fb9abd8abd50469a96d1c93cb16cc72f04a40d9c9e881e5257d4442905", + "openmeter/app/stripe/service/factory.go": "3b87c58a63f901eada6d1f34bfe2326966f0373eaf6fd22895d4eef187428715", + "openmeter/app/stripe/service/service.go": "370369434af487cd343b656473ecf5bbce05037f7b4f8cbe4679e8f1e17ec582", + "openmeter/app/stripe/service/webhook.go": "6c5473d346853145826cd4555aaec90c5660cc3b1a59755c789dab21473d4645", + "openmeter/app/stripe/types.go": "e7ff457d88c3ee70378d145a4c25f22a9fed80248eccc8128742e0f2b04b0609", + "openmeter/app/webhook.go": "4d32d1cbce70385003bafa1e0d3dc24ea738cbc2b2805464b84597b6551ac915", + "openmeter/billing/README.md": "ffd9278bcefe09eb7db80c5e5b4c422dd0c37bd8a32a069f25fa9a4002944cff", + "openmeter/billing/adapter.go": "586ae824eda6555c8c43a7519aa8c8a56d6ca926a359aab0ceb5783341174ac9", + "openmeter/billing/adapter/adapter.go": "de453216ff7fd5db710e5f16f8933cc7b9fad2f7e162550b43494a6ead9bf872", + "openmeter/billing/adapter/customeroverride.go": "21be294691061b7221e063bb6e0d8d4b6d34421badffb7823c568c842a4d12f6", + "openmeter/billing/adapter/gatheringinvoice.go": "12eff5b0b92f55a3fc60838a96222509e8897547bf0f0eda00ce39e9692d3365", + "openmeter/billing/adapter/gatheringlines.go": "3fd04d5b1df7fe8dbf0a95b07b3fe2dd8299c0e6538324c08da9330a14621075", + "openmeter/billing/adapter/invoice.go": "df3976f139dec8597b48dc47a3420b3252cf5c14832040a979693a44c4c51b13", + "openmeter/billing/adapter/invoiceapp.go": "635657f71c518b090249e0050977a2e25c34699ef3e0a1452a41186e268aee51", + "openmeter/billing/adapter/invoicelinesplitgroup.go": "2b6467fe9dbcec7952bb484ee214581f89c53f4a012a80db4846a039a677971a", + "openmeter/billing/adapter/lock.go": "ed4926aea5542722049e63c0238501673b9eb04559a41a2908211c424237c81e", + "openmeter/billing/adapter/profile.go": "61833c447b67c7dcb82e590ab426eb4d7fcb2de81d15a2632b269d9549929489", + "openmeter/billing/adapter/schemalevel.go": "5d63cb19e7ac4c8ca0955a099abf5e99b492d7ab3103286d54be631a6547dee0", + "openmeter/billing/adapter/schemamigration.go": "a162a9f379cb9bc203c078566f429db2e62213f0d4a2a4fc36aa289236e14683", + "openmeter/billing/adapter/seq.go": "82bba40cd1ee4505fd5ae212884dbc01511eb790e3ec259bc421ad81444097b2", + "openmeter/billing/adapter/stdinvoicelinediff.go": "1f58ff224fe02ead0e6bdc9bf5ad1badbf470910ff81fc6f2888b607382731b1", + "openmeter/billing/adapter/stdinvoicelinediff_test.go": "cc332ef4f3305270bb0a4cee51edcfd7f6630e75e14124a02d464530293cd41d", + "openmeter/billing/adapter/stdinvoicelinemapper.go": "90f170ac70a501704ad6eb237700115c13746957148de1c6402c10cc4adbf2e8", + "openmeter/billing/adapter/stdinvoicelines.go": "94765bb601549da0ff15370180c60918eada17a5e6cec469ef248912da2edc9a", + "openmeter/billing/adapter/upsert.go": "fe34c6c5e8d4825e4927f1d24965ef5b253a5529a0b4013737385175dbb376dc", + "openmeter/billing/adapter/validationissue.go": "9c928633a7541d86108e9753e68d8dad0d61463989f93c66a454733edd3f451a", + "openmeter/billing/annotations.go": "e60babe30a4cc808e038328d761b2a0f48fa6c44ada4a1d9be385522916020cc", + "openmeter/billing/app.go": "b2f1b617911788b18a21a5088480f27f6af9e39afea5231c2c3a11b45ffca12c", + "openmeter/billing/charges/adapter.go": "f8846ec22eadd769451b9345749278175f4df87127b1978ec51f40cedea2666e", + "openmeter/billing/charges/adapter/adapter.go": "ced1ffd7bd438c46d5f3c0a995b697a636592fdb36dd42ce0b4cf0a29ca06455", + "openmeter/billing/charges/adapter/search.go": "2a5d3e720027d30afd7cf71a8e7688af22120f77c8340a73a3a6ca4990b6f788", + "openmeter/billing/charges/adapter/search_test.go": "5b3509be4f688370e1949120c75c15645d51ddb37e6e4fc27164d9b8e91553d7", + "openmeter/billing/charges/charge.go": "f9d3309b5925aa7ff57d646749d27d4a00a3de281b623b081137e93bda3e2d15", + "openmeter/billing/charges/creditpurchase/adapter.go": "10c1cfe5fd3f9404ca9505f818bc629529364da68dd21eb9bf3befbb2b399b16", + "openmeter/billing/charges/creditpurchase/adapter/adapter.go": "db50c47ae19e5669abe41b288de103b6bc64e8250be7baf2da90b79f6be092f0", + "openmeter/billing/charges/creditpurchase/adapter/charge.go": "d731ad019ccddb6802f2476194bb814b66d24c479d4b275b0ef0453bd6742f6c", + "openmeter/billing/charges/creditpurchase/adapter/creditgrant.go": "c7bb3628b5a662d5d9668f0f3d8f1392c9d4e4d16bc1f0be15005c8010c1dfe5", + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go": "3a08371db5e6b952b53cfe0ebdace11e25e852763de77d8106f3ac75685cdf7d", + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity_test.go": "69a8ee5e3c2ffbb9b65a14a5516efcff11e66508cc11f2c4277b1f3550923b5b", + "openmeter/billing/charges/creditpurchase/adapter/mapper.go": "a56b7bfe1946ce577196cc835a70cc06233bf4f32b6f659d1de2930a7fb1a0a6", + "openmeter/billing/charges/creditpurchase/adapter/payment.go": "6e27b2d57241e894b979cab017d0b2931ba02ee9566727882f3dd1d693cbe8c4", + "openmeter/billing/charges/creditpurchase/charge.go": "2010b81036d36304a623805dae271276bd94d1a153966cbdbee049f2cecc9531", + "openmeter/billing/charges/creditpurchase/charge_test.go": "4453ab02a549cdd3afe53eb8a5f7962030db8333f43e1fea513f99fccfbe033f", + "openmeter/billing/charges/creditpurchase/errors.go": "ccc9a49a9c198e17e040f6881516dde4ab0f804d9cf47326f98d2d24fe9fb99a", + "openmeter/billing/charges/creditpurchase/featurefilters.go": "b4d2188abe5aa583134a08a3e49126d3d69456e0f2f039b5434ffd50984e93e3", + "openmeter/billing/charges/creditpurchase/funded_credit_activity.go": "5ca9dccf7840ad4ceeae8d64099930d244f1471316a2821518d9401d8d13f5ba", + "openmeter/billing/charges/creditpurchase/handler.go": "1d150f67ba9ff2ce362ce11a41d63ede91c06f2cbc21417e376361db875c64cb", + "openmeter/billing/charges/creditpurchase/lineengine/engine.go": "7569915f09b1457182e5a8c836112e401ec80a86daf061cf8e1dda2fb8565c49", + "openmeter/billing/charges/creditpurchase/service.go": "bf1350937ed60cdd8583a9f1e439604ae91da9eb6c4cca566633bcf8df12ea76", + "openmeter/billing/charges/creditpurchase/service/create.go": "c4c92f2a3d6a328d30883df48c251a20918a8a20376f141440da04efe6e78bb8", + "openmeter/billing/charges/creditpurchase/service/external.go": "39ccbf87c0d0ca4e2409cb6ec730467c7bed32e2e3923d29de679b582a39313e", + "openmeter/billing/charges/creditpurchase/service/funded_credit_activity.go": "fabfb44eda49a977ac97a99dde0edba57968c58fe6f36ba62708113627e29408", + "openmeter/billing/charges/creditpurchase/service/get.go": "a130b2b526a3d66521bd8b7367fd21332c28eb86f1f394b356d00e54fe76fec8", + "openmeter/billing/charges/creditpurchase/service/invoice.go": "57a16ac61f195d7acd3ffce5936830a0446836e57a6950806c6a966e417a4533", + "openmeter/billing/charges/creditpurchase/service/promotional.go": "5ed252be4d38191082ab128d31b2ce97b0e6c34bea6a8e956aa58ee51461a8bd", + "openmeter/billing/charges/creditpurchase/service/promotional_test.go": "32ea55246ebb1fbae75fc2616742a6cf83048e8682357fe087a7bc92d1088389", + "openmeter/billing/charges/creditpurchase/service/service.go": "4fa85273e0fecaa75a443bfae915961a7768c584861e60610bc9b4c6f011d714", + "openmeter/billing/charges/creditpurchase/service/statemachine.go": "374bf226deb5e5fd4e559ea9070f1e26bcc330c70dc45d64cbfa2c745f1816ea", + "openmeter/billing/charges/creditpurchase/settlement.go": "431931358481de543d80549a33d8ded56d1e280f965e29f7f7127668f26de597", + "openmeter/billing/charges/creditpurchase/statemachine.go": "d050105ea9cf498d350fb7b0ec41be5e45083c91e82bca5c14d6b7b38624dec9", + "openmeter/billing/charges/errors.go": "ca4f59f7e48455a21f0282c31b1fc1e84772601d87c3091c24b98294090539bc", + "openmeter/billing/charges/events.go": "83241af6ad8959bf028267eda8ce4a82f45b7961bf31f6b842b3db7e48986ddd", + "openmeter/billing/charges/features.go": "ad47d7a9aa44b9869ed5786a6c4a7a0c3be22859d766227e8c6c8951c8c1cb1f", + "openmeter/billing/charges/flatfee/adapter.go": "316cde25a3bbcd870c8e8f797638e5c0c5e4fb74f29e3e73596249a2297a9003", + "openmeter/billing/charges/flatfee/adapter/adapter.go": "da2b69c3bdf4d32cdbe4f1ca8cd9427995992e7bf01a3cc83b60d7a7ad6829ab", + "openmeter/billing/charges/flatfee/adapter/charge.go": "c16cab3745f665731e4533b19d3dff04aad440f2fbb38ea077b4850a9e73fadf", + "openmeter/billing/charges/flatfee/adapter/credits.go": "3d4713187dd5c0737879011a617dfc541d1714011379565792eeb3a98435c636", + "openmeter/billing/charges/flatfee/adapter/detailedline.go": "a57dcb776ae5e24059f110e563975607982351140bf0de2115a852ffef171ac3", + "openmeter/billing/charges/flatfee/adapter/detailedline_test.go": "0443f640b60df62c754af9349e59cf113f9474f1b17b48c9135098ccd31036a8", + "openmeter/billing/charges/flatfee/adapter/mapper.go": "013a21eb8b13dd3643f52a1813f9db798c0ad4e19f25361b7fa1410cfa88e5a3", + "openmeter/billing/charges/flatfee/adapter/payment.go": "8751e410e15a31c2f9b985c0041ce7724f063c2be2af8dceea74ed9f3e41ac03", + "openmeter/billing/charges/flatfee/adapter/realizationrun.go": "054f1c76cca38379fab00624b5167a0469a06c547677a4dce3dd242b4e2662ff", + "openmeter/billing/charges/flatfee/adapter/realizationrun_test.go": "7cd337841b7a3c958c809fa45933055b8a24f4fe3aec32f7822328bef416fcb7", + "openmeter/billing/charges/flatfee/adapter/usage.go": "c4aceb408ac84d07a1cb1d199c2d8fed6e4712f0f7892433ebb64cff05a7087e", + "openmeter/billing/charges/flatfee/bookedat.go": "27babcddb4d535e8502dbe32cac31549d09a8550928737594924cb3aaf342092", + "openmeter/billing/charges/flatfee/charge.go": "1e84a3d5f87b734880fce13c87e54c48a4b7bfa75bb54cd81a90002ce1c21ffe", + "openmeter/billing/charges/flatfee/charge_test.go": "a330da19e98a9580cd621b8f1ecaa958961a5940053032c3c5c6b5e2ba2babdd", + "openmeter/billing/charges/flatfee/detailedline.go": "af3f822bd3ae26c9ac8a405260bc8b6c6356aa4ec9ed428766edeeaa4ea096af", + "openmeter/billing/charges/flatfee/handler.go": "508d3e83eaa34968ef2c4593b2173fd2515b9231b812b8ece33ea8d03327e86f", + "openmeter/billing/charges/flatfee/prorating.go": "1fda2e895682270813b9b2ced976fd9f5880d7d5df699ead62bb08debf605d62", + "openmeter/billing/charges/flatfee/realizationrun.go": "6330c064ab950e545b6fc893d9fa95955ca2f0d7d005659e052bf067f4f385e1", + "openmeter/billing/charges/flatfee/service.go": "a0a67fed05b147dec19792bebd36aa2d5145d5f889c9190fed38bd1f80915560", + "openmeter/billing/charges/flatfee/service/create.go": "5956c9b48c1474531092daf299e614443ec05359e64b04339821f19d527f2cf7", + "openmeter/billing/charges/flatfee/service/creditheninvoice.go": "3abddf4e8b4e41f1d7ed0c1320ce567268eb6822e4233124bd7198f7f4a03083", + "openmeter/billing/charges/flatfee/service/creditsonly.go": "dc02a4d98185bb9fc6c3949e88fa711e9764c43d6dea1e98fdb75b80ac2fcb54", + "openmeter/billing/charges/flatfee/service/get.go": "a981d91eb4b02db04bc8d008757e11d420995bc8ed54652127a214c49ebb1473", + "openmeter/billing/charges/flatfee/service/lineengine.go": "1089ad8dc5daaed43a8ce32f3df8b9527bbdf0bdfc4c0d805692e9dc6cb1a532", + "openmeter/billing/charges/flatfee/service/linemapper.go": "df6df63b1ca729b8d9ef890f857fe3f9df8247e7596fd8f7b56c8fe404f2d227", + "openmeter/billing/charges/flatfee/service/payment.go": "91704638e5072275f28ca94c1106ec81b4a92b2a3aae8883d99e65c0098b24ec", + "openmeter/billing/charges/flatfee/service/payment_test.go": "acd9d8710c1411d18fd292de95b4ab5d409c05c941973c14abd88aac9b581714", + "openmeter/billing/charges/flatfee/service/realizations/correct.go": "a64caf48a8f8f3e4639344c41d02d4ae687257b43f06894bba619af21f753a15", + "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go": "72d6ab4bc2960e8688f0db41689658bd42b282b473bb6d25e1c6786799c9d867", + "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go": "008728ce52fc00b2cec34778a6c44b464e3949932ddacb2d6092de927ffcc73f", + "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go": "1dc282841cce74dccfeb2fad8238f40d590021dfdfa540d9b0d26c61357fb924", + "openmeter/billing/charges/flatfee/service/realizations/preview.go": "1e01cdc5f08cff054877de442c0e3cef170aa9b8edbd1f18a38f07398cc9098d", + "openmeter/billing/charges/flatfee/service/realizations/service.go": "e3782d2974d4af1305a6f76c3869cbaad4bb0d93c260965c47ee0bb97c8c46a4", + "openmeter/billing/charges/flatfee/service/service.go": "743aa52eb861bd1acc5faa359cbe2d075166ebc874e24982199e2a7af2e3cbb5", + "openmeter/billing/charges/flatfee/service/statemachine.go": "2c0dc39c89d57a0f70eb24989b13d73588afe2eec1eba9ba9b20578555b307f1", + "openmeter/billing/charges/flatfee/service/subscription.go": "84c6f9ac03271e610b89c3c8fdb5bb26ee0b695749500562c9fb8d13d6e57f83", + "openmeter/billing/charges/flatfee/service/triggers.go": "e76bc64f5729e84f0507ce51d8b3f3c4bb82f65f40c876899c859bb1e57cbec4", + "openmeter/billing/charges/flatfee/statemachine.go": "3fc410a78a78fc3764f7c1ed38aa105d7b4ccccc556745ca801f54f80eee61e5", + "openmeter/billing/charges/helpers.go": "51645ee34873f91a2ecf3e4c5753d7a6e056c41f5ead1d810638fab526e989a9", + "openmeter/billing/charges/invoiceupdater/feehelper.go": "6e4183affa9a46969bf138d41a619ac31f52ae96e13e193da61250a0cc7a3355", + "openmeter/billing/charges/invoiceupdater/invoiceupdate.go": "28e721224d787a7e491f59c35542b439699ceb653aa83fa86f1ebd8707f79f2b", + "openmeter/billing/charges/invoiceupdater/patch.go": "25d622df87216956e0f6990da7a682f2350c111c70d59570b05d2543162b6d46", + "openmeter/billing/charges/lineage/adapter/adapter.go": "840e69d29bbee570a37319612e15660f1aa277896dec8322c7df8202d77e1fb3", + "openmeter/billing/charges/lineage/adapter/lineage.go": "0f0cea9d8a9305b4648f7a90d9d94642ef3399b1f8144748aa8a1b8bb2e1c1bd", + "openmeter/billing/charges/lineage/lineage.go": "b5aa3ff4a95c6d27cc8539874d3b5ca7e75361bf8ab41b56128d2bcb0853ab09", + "openmeter/billing/charges/lineage/lineage_test.go": "bf9401deb9722f23eeb363aef19fd3790ff8d1a55ee7816cc2ed7f13c70d9b24", + "openmeter/billing/charges/lineage/service.go": "12ae6a7eecf3cb3ab9d3718e0a7bf1fc5b51e07cdc6adf7ca8f2b85fa99eac7b", + "openmeter/billing/charges/lineage/service/service.go": "774fe10830ca3641676f9fd5ee4ed3674e28cd4dfd1f714ff761d313186ee018", + "openmeter/billing/charges/lock.go": "5b5511f1fa0dc011733499f89769e5692de7ec1e20d14422fae385841c807c04", + "openmeter/billing/charges/meta/adapter.go": "eab0e37b081912e12eefb4e566022e8cc4d820dbd36af3e97b9859ba1c7e25b8", + "openmeter/billing/charges/meta/adapter/adapter.go": "9d4e27c646fc902212fede9e4b311453377ca685690554dafb36b9351e09f5f0", + "openmeter/billing/charges/meta/adapter/charges.go": "45fe1f70d852bf50cc684561e11d40880cc2568d0066b1d94f1adb0c48335d78", + "openmeter/billing/charges/meta/charge.go": "e481b2ea7e2a2c0cde2859e68371e92df5dd2ab310eb403e1e59d529f830d29b", + "openmeter/billing/charges/meta/errors.go": "cee4c7907986f0dcace506f95495d7f9b1bf6e2b7e47be71b667bb8eda5376b2", + "openmeter/billing/charges/meta/intent.go": "eda4897ce3db0670163579c924b7948d2afd5cb91d62f38fcc7dd4d6f101bc41", + "openmeter/billing/charges/meta/patch.go": "00babd836c75f7ad26842504a6935fbe32ea4ba414af83c168698467b47f98c7", + "openmeter/billing/charges/meta/patchdelete.go": "7717f150f00d5d065206e3d8596eca74a45cbb092be2692866dddd74fad97646", + "openmeter/billing/charges/meta/patchextend.go": "c63c599ad2887caa62576c11043b67faac518d2a946e759625fcb59449306bd5", + "openmeter/billing/charges/meta/patchextend_test.go": "c7371d4e533b37847e96cef85273c6e2981501564d5f270176d005e16eb814be", + "openmeter/billing/charges/meta/patchshrink.go": "85b244b819d754c57c33cd9bbc9fee24448caff7ec341cc74323155c558654ec", + "openmeter/billing/charges/meta/patchshrink_test.go": "05c10be3209d7eed8eff67bf1e3397d2d9b76add9ded14c8a6d630635c99b288", + "openmeter/billing/charges/meta/resource.go": "3f7b1e1ade121a6a936301229650932b1e983acc090122366fef7da484217174", + "openmeter/billing/charges/meta/service.go": "df8ab002a257dcbc5f02d01a25abc68a82b5fccd74afa39502b57cd8c92cdfcc", + "openmeter/billing/charges/meta/subscription.go": "46da017a0a525928e08f19df8c8180f4cd7d7f918e30914d6efdc58e9e9ec1a5", + "openmeter/billing/charges/meta/timestamps.go": "659231d389aed26f91f4ca02e11b62a56ba5cef2c879acec5b1a4198858dc00b", + "openmeter/billing/charges/meta/triggers.go": "63621761af45507009406e62ea3b08131a9fd193ee92e1b5b662969eb843c06f", + "openmeter/billing/charges/models/chargemeta/mixin.go": "809b9be7850ed3b9e6e1464d68fc7cb80197c871e97482fc16ec6a1b610a20f4", + "openmeter/billing/charges/models/creditrealization/allocation.go": "6c1468e1bf4393520b256aefb5da1c43c30ad9644ddea1b2f2f1e66df17dc9e6", + "openmeter/billing/charges/models/creditrealization/correction.go": "159b678928392db7061695a6516fd80fa936ba1d6a2cc22552c62350a67b34bb", + "openmeter/billing/charges/models/creditrealization/correction_test.go": "984b736bea856bb54e1c91d387455039294f71522ac0f28eb98de35123a1102e", + "openmeter/billing/charges/models/creditrealization/lineage.go": "ef1aa8d377e08dd33ac421cd512ca9297e90ee445d6fa5b767d1b90be460cddb", + "openmeter/billing/charges/models/creditrealization/lineage_specs.go": "68c28cd14f13bd906ab285478a98440a3d607f4c8fb695c7968a21b19aec3488", + "openmeter/billing/charges/models/creditrealization/mixin.go": "1186988e8d5972b28ca9bf7c0d0b6b8cc68b1801522574c19b5da71516d42d30", + "openmeter/billing/charges/models/creditrealization/models.go": "8ea9528a8d966abdbbd6e34b4fbf6287afebb44fb852bf0e6fb944dd009cf123", + "openmeter/billing/charges/models/creditrealization/realizations.go": "e38f42c505872a1ea8fad9812c69e069728da7ab1a50274d85abe5d32e2ccfe9", + "openmeter/billing/charges/models/invoicedusage/mixin.go": "6be7954b9ced8c7e56fc0dd220c37d7f782c6f9fdb7d2ef6e7c33624d7769b6b", + "openmeter/billing/charges/models/invoicedusage/stdinvoice.go": "574bd00ef307985eddaa622f5aff2a211a834f0d97196641703bc3fdb73d45f4", + "openmeter/billing/charges/models/ledgertransaction/ledger.go": "54520cd1355569b3dfec5cdf78f896cddc85aa7c6b55b10fd52dabfe9ebdbb7a", + "openmeter/billing/charges/models/payment/errors.go": "03c8b3c3a333bef03437065996aa408bfbf26bf8e67d4ef636e7ac02bb6c3fea", + "openmeter/billing/charges/models/payment/external.go": "c2503306e50e97144616345aead67a23f305e544fc9d1576e2a3d318d4fc59c8", + "openmeter/billing/charges/models/payment/invoiced.go": "7b46d2fe7669dc0d5fd7c2419601f554d0838e50dc2ed718654ed53df4ac7111", + "openmeter/billing/charges/models/payment/mixin.go": "c2d08aca87764b56f6e6320dff06d485dd916057218131a36a658b236d358f5b", + "openmeter/billing/charges/models/payment/models.go": "13a05848b910f1f6625323a547d27439add8f1eca2ccec3166bf30fcead051c8", + "openmeter/billing/charges/patch.go": "f99698033c521feec50d76111760f2b146c1f967789a8169fad40a292397ab80", + "openmeter/billing/charges/service.go": "5830651052c4ee9c627701b39fde0fbc4156281d6d8f514a598fe1c5a1b7787e", + "openmeter/billing/charges/service/advance.go": "7a6959916310d0d45f97746f9f03e8d6979d62171659ccc42146e482cc76af60", + "openmeter/billing/charges/service/advance_test.go": "5f28f9b1c2b710d199fa9eb5ca2eb39657d7a3e99398faa2d9614ea678b2a23f", + "openmeter/billing/charges/service/base_test.go": "9c47b0871952105bd6a1ae9ba99d55ec675e302b14bca07a0ae3e7d3c1f25946", + "openmeter/billing/charges/service/create.go": "c0e31bc1d550b7d9cf6b2a6cc721b5cb21d3b12c51c846f5e559a7441a5a5c4c", + "openmeter/billing/charges/service/creditpurchase.go": "e42c1739b1379a3a11fc79342d518b0534be22ed2b36592f26389d243f00853c", + "openmeter/billing/charges/service/creditpurchase_test.go": "df6e37b3c3030a02e3f413b503fac9354f49d2276bc214b94dd8a00a76457ea4", + "openmeter/billing/charges/service/featureid_test.go": "624c247072293063c3dcc1ec9578a3fd5a8d7d3bc4c61b0b1427668cbc86ae09", + "openmeter/billing/charges/service/gathering_preview_test.go": "005110e33c71f3a82c8bb68eabbf75b4f9d6c10ccab057fba5c46d6b976676cb", + "openmeter/billing/charges/service/get.go": "35a6c132c59bdd2e0c9944b1a1fc01a984a8940b9f1be4b63a9d819aee6dd6a7", + "openmeter/billing/charges/service/handlers_test.go": "bffdeb1b5cc6eb58eefa19ddb0d7a3790faefc4370375fc852b65fb1aaac598b", + "openmeter/billing/charges/service/helpers.go": "bb453cfa9209974df08592c607d8341db9bc9858566e05a8d17ec7c2ab4fea33", + "openmeter/billing/charges/service/invoicable_test.go": "aaeb6f0cb8beab04576230c61f310a5a5103728cfea8cb23650329df25299631", + "openmeter/billing/charges/service/invoice.go": "338c181ce84b5529960f973bef72ab3189ad82fea40e116d45993f886ebf9093", + "openmeter/billing/charges/service/lineage_test.go": "c98451e4b2013f49dfcd13448821a4dc41e722a8e60bd0b6c42a5fe9b69c2e92", + "openmeter/billing/charges/service/list.go": "abc1ed82123c78a3769a7a032cbee95b4e9e21721e0643e30905129d5e93ec5f", + "openmeter/billing/charges/service/patch.go": "0f323cc924b60e06c964a5b7e83e9aee92a62c51f1db21da81fe461c3f39bf64", + "openmeter/billing/charges/service/recognition.go": "3c4dd80dd574f0f4b8996cef24d9ff4e70cf49007012ff24048e6af47c5a5a8c", + "openmeter/billing/charges/service/service.go": "462a0088170fc0b7a178c9a1ea0c81fdb61da5b051f33e1c1715b932ad7d7bda", + "openmeter/billing/charges/service/subscription.go": "2900c6673a6b5f2e4cb2b275fe294fdcc7ecf3a106990a44cb1ed01e5e6cc30c", + "openmeter/billing/charges/service/taxcode_test.go": "627a49756398edcdfbbb609b2508543dbd754ecf2508c2f3a2aca3ebda2dacf5", + "openmeter/billing/charges/service/truncation_test.go": "f8adfcb3021a5ab718e539882078b4a1bf44dc1e145e8c4575e2b007f5084e5f", + "openmeter/billing/charges/service/usagebased_test.go": "ebf9fbc014842cb1a64d2577ea9b1a3d0e92349869a5e65b28d919ee0ab8a8c2", + "openmeter/billing/charges/statemachine/machine.go": "5fafda9bed7ba2477071dba1007d3fe9ccc63ab04538e628924e7d30ac6db1bb", + "openmeter/billing/charges/statemachine/machine_test.go": "b19879b91df66b4584c63fea631bbea248366fc47d1234c9678e8db071394cf5", + "openmeter/billing/charges/testutils/handlers.go": "91b2c97af572dd4ea44e1881154191b36aa498e60dfc6364b02aa87d8ffebb05", + "openmeter/billing/charges/testutils/service.go": "b1c75b42334f70a39ef99b09092dd967d81b7de02baac5fdf9f9242935072214", + "openmeter/billing/charges/usagebased/adapter.go": "e866129621485cbcf50b17207b7bde6261912843f133db69081a7404c4d309db", + "openmeter/billing/charges/usagebased/adapter/adapter.go": "665fc844b47dacc637d92e5a3acbf9a518c376cba1329f1b413a8368d2567ccd", + "openmeter/billing/charges/usagebased/adapter/charge.go": "da9e57876d6e3caeed2fddba1fd655da4c6dd1fa8826eb6d01bfee23806cbd9f", + "openmeter/billing/charges/usagebased/adapter/creditallocation.go": "8837123d243577974451bd6fb8caf69f478b46f632d4fe1b9c3329ec7dd3e84e", + "openmeter/billing/charges/usagebased/adapter/detailedline.go": "ebc390301894cda8398e3021e7c85a4e8153670c8b952197bc89a2e1a3b4a1aa", + "openmeter/billing/charges/usagebased/adapter/detailedline_test.go": "064663add2cba667f0bb2ef592ceca07b8569526f44b4c5072260d84e6f17bf6", + "openmeter/billing/charges/usagebased/adapter/invoicedusage.go": "3e033663d01bc14bf11cbc57bc4d99bd7ce0eb442815f881f359769ffc034260", + "openmeter/billing/charges/usagebased/adapter/mapper.go": "82555ae5c6d9bd21749777e583b9dceddd41f1fa27a72eb1248a7418110cd3db", + "openmeter/billing/charges/usagebased/adapter/payment.go": "f2139c016aeae95668c0f5956b468e2c1056b3a93abaff7ec027463542e5c0a7", + "openmeter/billing/charges/usagebased/adapter/realizationrun.go": "fc8d3120a3eecb0f748d31711081a48fdc719a67d892733312eb9ae2b4836b72", + "openmeter/billing/charges/usagebased/charge.go": "ccf4d883eecdcba196086dd851be043160e7648abdf5b4d73c27464eda0846ae", + "openmeter/billing/charges/usagebased/const.go": "379d3e9eb22e9ec1f94380aae8c89803332b9e4f040544cbdf6d57bc947fff14", + "openmeter/billing/charges/usagebased/detailedline.go": "8bbcec5ec408c5b10518abe9c809e5f24674d453ac01b9fffb4033adc81af6e2", + "openmeter/billing/charges/usagebased/detailedline_uniqueref.go": "48699346713a8cca27d5c3e496bf3b8d1e8e0c570575cec5c5daead04b96c014", + "openmeter/billing/charges/usagebased/errors.go": "409b659fedae14afc32391960a9e9e2c999c9b2462a6338cb0657db21956aa19", + "openmeter/billing/charges/usagebased/handler.go": "d6b789a90028869a7fa0cc83807f1d7e61ac41531d6e5522ee71bde0e1608c81", + "openmeter/billing/charges/usagebased/rating.go": "67bc1506df9304524e9a912b21ee3cdc12281b487ad60d3a30f44dfcc580339d", + "openmeter/billing/charges/usagebased/ratingengine.go": "9dc900b10e834707d7c9d8380ea75d83bc7f5bce572573d5d323a72a3a46d82b", + "openmeter/billing/charges/usagebased/realizationrun.go": "d09bee91d472c73d968b7a8812d4cc0be9a72e2fbc9d4e436f6e500ebb4828fa", + "openmeter/billing/charges/usagebased/realizationrun_test.go": "19abc25917e6ef5b9aab240204bc6ee27a91e7adace35cdd7127f557135ffdc6", + "openmeter/billing/charges/usagebased/service.go": "334ce7479f545d317569de791d80925cb4b4fcff1c75b034af655b4da970ac08", + "openmeter/billing/charges/usagebased/service/create.go": "b2bab8d4d02efa24ee31479b75c981842ef0324baa7076eeb1b63c5d367cdeee", + "openmeter/billing/charges/usagebased/service/creditheninvoice.go": "77e37e4dc490060e769a8574e1f6474425673eaa507d018e2e309c97981b7d45", + "openmeter/billing/charges/usagebased/service/creditheninvoice_test.go": "94444573f8db1397b56463d100bb933462d8c69972c7a7ea0b59578373e026f5", + "openmeter/billing/charges/usagebased/service/creditsonly.go": "19c1fad6de9e5f56e3a36e548d0aaab9ba03c94f0d57ac3c2b7bc13ded6e9c69", + "openmeter/billing/charges/usagebased/service/currenttotals.go": "2ea2d18d20877dd6c228e854b08619ecf44a732d2e7d27905dd312b85904bc82", + "openmeter/billing/charges/usagebased/service/get.go": "ffd0b797bdc5e11572ef5955afd4d55e62d0756144605bcfa3cf21813e479318", + "openmeter/billing/charges/usagebased/service/lineengine.go": "a04eaa4fe90015952b10aa753d543fbe93cae9edbd5cc26241e5485b31285ae4", + "openmeter/billing/charges/usagebased/service/lineengine_test.go": "512896efc73c84e0a20c806549413772a0b82f9982781b0381c043631272e424", + "openmeter/billing/charges/usagebased/service/linemapper.go": "3975663f43879c937ca4b77fe1aab4f2b2c39a35df7c50aaae46a41cfd4b1b05", + "openmeter/billing/charges/usagebased/service/linemapper_test.go": "ef8f634d9e7b554ba18610d42114ab1681895f1089e57661fde0f6ac3c74a396", + "openmeter/billing/charges/usagebased/service/payments.go": "cec48afc672dc151ec9d24362bc3b79d1376f236e5df47c2afdd39a98a3e8ad0", + "openmeter/billing/charges/usagebased/service/rating/delta/README.md": "0687158f98c8364eee0545d2b73615c0a4770519b56d71f3b4af93cc82068b6d", + "openmeter/billing/charges/usagebased/service/rating/delta/base_test.go": "e406c8e286ced47f9030ae534a669d280eba4337418daa21e33f5384ac1f0fb2", + "openmeter/billing/charges/usagebased/service/rating/delta/dynamic_test.go": "95856e973e66ac717b7ed65c50218a6b420be2ca07a33a44b30d7288ca50728b", + "openmeter/billing/charges/usagebased/service/rating/delta/engine.go": "ba7126d0b09d0e8f00f1b8a8b2b28946a62d8df5c50391f9915aefda2836ea22", + "openmeter/billing/charges/usagebased/service/rating/delta/engine_test.go": "115128f78950b83dd9d03e4fa49213343f2e63f725a94e1a23b3213780239fc7", + "openmeter/billing/charges/usagebased/service/rating/delta/package_test.go": "41750e7a1d8dbc5506fc52b77bb99494020f4304bdf7ac7f72e1df7d9566f1be", + "openmeter/billing/charges/usagebased/service/rating/delta/tieredgraduated_test.go": "04b6e29715c7df7e552fb131f0528c91a3870fbd37e80e5a1e78f4e2486515df", + "openmeter/billing/charges/usagebased/service/rating/delta/tieredvolume_test.go": "3f8944ac0d0bd7a2cc3422834edda1512590dcf22655afdbfbf0e43caf3705e8", + "openmeter/billing/charges/usagebased/service/rating/delta/uniquereferenceid.go": "3ddad114e53022e424ecc83de6cabc53321df96dcf3b982a9ad32ccd5b64315d", + "openmeter/billing/charges/usagebased/service/rating/delta/unit_test.go": "08329f8413cd980efee10942d06a4d54f0f4dc1fb8b70e212560e7d7dccb1cdd", + "openmeter/billing/charges/usagebased/service/rating/details.go": "b5af08de56885ff6c7140775d02c9799e03d1d4e817a4f9f1b435d929dc5863e", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/README.md": "3d09f0925c892dddaa7d77ad41da5ad1a9946b157e2fc3f73d1a2ddc0315974a", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go": "69300e6157b2cf1b43d8319df30dc7d07734567db65b69b1e8a287222ed52a6d", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go": "be7dc5e470ef95ff4b20aeaf3f13b7b47c2e04ffbf87cadfee1ccc4a60c27861", + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/uniquereferenceid.go": "32bc83dbb9d9ad9f199bc72ec29e6ddcb03fbfd9dd3120d43d7c3a83f73e32c5", + "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go": "6a6baa7640345f419e9d59d8da2140eac8f4aab90f418846f89597902a0eec3a", + "openmeter/billing/charges/usagebased/service/rating/service.go": "a1e257753b22a834a7720a2aaf4e747b77a8a68ed76eba30e3056f7493b4deeb", + "openmeter/billing/charges/usagebased/service/rating/service_test.go": "df79575227d0fc61c3cbb294426b3be3cdbba68621128581b0b9059261ef985b", + "openmeter/billing/charges/usagebased/service/rating/subtract/README.md": "3d510e96b2ac69c90c27db77a64fac51a22e13555ecb005e57140b68b1a41fb2", + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go": "51eb2576459101d92ae601bef13a16188bcdffad1a588e7747d22dae27ae69c6", + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract_test.go": "bca25e06c317fe23dcc47994392e7eaaba6700ea74524742ff2c9510c8eb7a58", + "openmeter/billing/charges/usagebased/service/rating/subtract/uniquereferenceid.go": "358032dda2b9ddf76074059a6ef3926f9cb62bf6420a61de9f23a69726cd56e1", + "openmeter/billing/charges/usagebased/service/rating/testutils/testutils.go": "23a504d3af7a4b0db4fdce8ebb2927f33dd5313485a3b30ea626acafa0fca2af", + "openmeter/billing/charges/usagebased/service/rating/totals.go": "356d099a74bb30b5639adc0d43f3ed363bc4f71fe7f715716581d44f983cd14e", + "openmeter/billing/charges/usagebased/service/run/correct.go": "d4b1efce0583a96050004e32280c71ed9ba9693fae957a148562c70546100e4e", + "openmeter/billing/charges/usagebased/service/run/create.go": "d41de874bede2d07d90d496581349704ad42d63a883ad4299569c2bc97aee0ae", + "openmeter/billing/charges/usagebased/service/run/credits.go": "d14348e393ae0bfc08dadbfbff1eccf33d7ed8c688df229d90ce663a0006b70e", + "openmeter/billing/charges/usagebased/service/run/invoice.go": "2e27e4b857aaf5e0d8498836231242d0f1c3455fa99da68983c6db520b2cff08", + "openmeter/billing/charges/usagebased/service/run/payment.go": "f42562dbfd3e9205d79e836d4052263d61834e3ba7cb246222661ed2cddcd27d", + "openmeter/billing/charges/usagebased/service/run/payment_test.go": "12ae28ff0d8ce01c07f457d239f49067ffa21fc84662661c51685804f79fa260", + "openmeter/billing/charges/usagebased/service/run/preview.go": "26f6e126bc30aee27e2c5306da820894279430159ad27b37f114dcb78ef55aff", + "openmeter/billing/charges/usagebased/service/run/service.go": "b05a16a9e5c143b26188e006c89b77c254a8a3db1f91f3b1525debde30c8e5db", + "openmeter/billing/charges/usagebased/service/service.go": "a39f4269f51c67c701606f9e5bb5cb2ca35f2b0835dab95c7d151e0d4333ab35", + "openmeter/billing/charges/usagebased/service/statemachine.go": "027eace6b3598017d1be205d4bb21ff97a4ec5e76bc84607a0942d59a7fef58d", + "openmeter/billing/charges/usagebased/service/subscription.go": "6a16a76732f9d1ab1975691cdc302fa29de0f6c2c7463e1200e735f7c630f737", + "openmeter/billing/charges/usagebased/service/triggers.go": "fca0b046a8ce0db51d0fc70c7dc383fadf5eea469be48dfe10ff895c1043246f", + "openmeter/billing/charges/usagebased/service_test.go": "96bcc41f2d99a21f2a4a8861e8b0c22a3e1be622ab80b26aaa52d551cb689c64", + "openmeter/billing/charges/usagebased/statemachine.go": "7e393a55691da0d825a17ba0e42d197ddde4da48c564e02427be3572c0d5a049", + "openmeter/billing/charges/worker/advance/advance.go": "08bfdb9eb9d02b26c5016ccbdb222f4f9f7e6ca198b299353e5b085e9ec6cb6f", + "openmeter/billing/charges/worker/asyncadvance/asyncadvance.go": "b604b9cde087b2ce05646084e6f8a91d207409da1e60d6b91d396b063f78509e", + "openmeter/billing/consts.go": "d16ff378b7133746917f470d361d9f6d08d8fb327be261200357d577a12670ff", + "openmeter/billing/creditgrant/errors.go": "7dd787c4fbcd8cf9ecbba9ed98ddf40df95fa29f017c7f99d5126f84434520f9", + "openmeter/billing/creditgrant/noop.go": "d9d9d29d3ecd6cd45d850f9e2ea6012f3add2da4b41a32dc581115f438cf54c0", + "openmeter/billing/creditgrant/service.go": "a88d27a27909dc188e72753cecaeeefed1730dc265f715e2ade413495fa25a64", + "openmeter/billing/creditgrant/service/service.go": "1ceb64197315cb32c0eacaf115904ebe0d0f78462b613c52b340a635907d7e96", + "openmeter/billing/customer.go": "2323c51c4da4fb1344ae9d80c6866426ba73b5e29ec4f6564e73060d4ef977ab", + "openmeter/billing/customeroverride.go": "00a6131f1188d1a182bf4cb3c6498c6e91a9a217afe381048cb3fb427a714e76", + "openmeter/billing/defaults.go": "d25cee268b2d72698aaf876758203f9e47c3d5bbcf2588f925bf12f65794de3f", + "openmeter/billing/derived.gen.go": "7f2b7d1071d8cde79e2c870922d6bfee7b3be6d314f08817022b41f5622a8600", + "openmeter/billing/discount.go": "0cc9bed442b723fcb3a7abe497037dab2718a0d5904d6a106fbb2f06793ab413", + "openmeter/billing/errors.go": "241a5b79c8a47c576795e99c6b74e5bfc78b59f3265f088d6927ff358505212b", + "openmeter/billing/events.go": "c362c048479edca3af9b3ac005eaeba76f161b370c212f0a43eb18610c00b97c", + "openmeter/billing/eventsgathering.go": "9354e17fb1b4638524ccda1209c1541a94b58036864d7fce9db46a609ad28b5a", + "openmeter/billing/gatheringinvoice.go": "af5ecb27cfc7528c25eab411a6791ceea1e3a07798aa44cd9a3a8e46e6d53036", + "openmeter/billing/gatheringinvoice_test.go": "1415774c2818327afa638600d225b3e0a5e950405625f06e8d100398d9d53234", + "openmeter/billing/generate.go": "92ef51316fb575d8223a631b5d105368e98b02f284445c5bba8fa1ae820950da", + "openmeter/billing/httpdriver/customeroverride.go": "011302491b4cd7ead93bdd70c9e61c86cb05f13b72480f23d7fd6d20272830f2", + "openmeter/billing/httpdriver/defaults.go": "c1ddcacf57997537197d90e3ea6eb5a2f5ab61ad6bc6aa1a93eef67c1bd372ab", + "openmeter/billing/httpdriver/deprecations.go": "c8d2f9b941ce912e1dab6d6fbbcb4972a208b5c782ff1666480440a237a960f2", + "openmeter/billing/httpdriver/deprecations_test.go": "c31cf8698c34c3d0fc5ee2439047049e2aebb7fef3bf0fca7c34e2bd31469c52", + "openmeter/billing/httpdriver/discounts.go": "541a8e1b9a3afb5227378a79f9e06b66e5f0f65307317f9bfd9eba10e52d979d", + "openmeter/billing/httpdriver/errors.go": "dfbc8412a7a574bfe9931b1446bdefe741ff0f3772b85b5070c1db44d94bab79", + "openmeter/billing/httpdriver/gatheringinvoice.go": "d29c92e3db5da826e2480415b05665d07b7d9f183912ed619addf7f714893374", + "openmeter/billing/httpdriver/handler.go": "9a934e1df4930c2470e3e1c6c978375d3d53bd69b0432ee6c8b71845b1d30daf", + "openmeter/billing/httpdriver/invoice.go": "485706c0c2996ee25c9f2c165cabd488a4d8be3c1b66b7fde8d99a4ee665b727", + "openmeter/billing/httpdriver/invoice_test.go": "86f93ceb41e38ab2d0981b67fb9fc132e6cb6545971c7e7bbba310c08f19f06a", + "openmeter/billing/httpdriver/invoiceline.go": "387080267bd7ec4c843dcf99b49a0eb204bfe64c4aebef23f65c4d8f7a6bbfa9", + "openmeter/billing/httpdriver/profile.go": "3f4e6bc4a0af0efc3c205bb40e98657fe948a37a7bd91ca1c9592faa059201a8", + "openmeter/billing/invoice.go": "19a1539bbc2f691a0b55399221439885882b021534fff6c89a900ddf2793a041", + "openmeter/billing/invoicedetailedline.go": "8d825d2644c6d97968d6d12466693bd796a5fff32cad719d7800de5cb59be2c1", + "openmeter/billing/invoicedetailedline_test.go": "902dcce872427e918d6e622590962bb86fda5f42c39428b2a794528a7ea75328", + "openmeter/billing/invoiceline.go": "cd0731e671c460a7509e1dd305e34eb2a6dd7edc9b2247755b09245e39bcb8c8", + "openmeter/billing/invoiceline_test.go": "f89c914560f5ef4fadb87e7968ce7bcf45195155ce72f1c6695b64f48d4e0874", + "openmeter/billing/invoicelinediscount.go": "0f113384e0c644fc0e293495a2739c2c106b77fafb706005b9acacc2a9dc91eb", + "openmeter/billing/invoicelinesplitgroup.go": "585caef14c4db35443aac0b7aeac28dbdee549733a976c85fa52756f4fa377a8", + "openmeter/billing/invoicelinesplitgroup_test.go": "2caeed2991b007f6d9b7cbeb85b6a751fcd7986c510598d2a6ec369bf92a8978", + "openmeter/billing/invoicelinetypes.go": "55ed6cde215653af04da18eade507a0bd3d850c15c59b4d1c5c92630ef1d4868", + "openmeter/billing/lineengine.go": "7482b0c5850152b0aa603f47927ea7ef62b12e0deacf5f120615ec491841953c", + "openmeter/billing/lineengine/engine.go": "0aba9bf8fd59b387f02990eff9565d48ea01d70ca508cf62abe3ab9a91f3ebb7", + "openmeter/billing/lineengine/splitlinegroup.go": "dd5d0d5cb06b7c3e93487b9772876b54d85fb0b94e2fe35354feaea3b4f3e6fe", + "openmeter/billing/lineengine/stdinvoice.go": "6545a9b465678b225e3813b45640bc2849e8fa1996b1a0af17f1a918f29cae1b", + "openmeter/billing/lock.go": "22f47599c2c39c361793ae03a399802d97e2829d020dfe200737b40baf3a5227", + "openmeter/billing/models/creditsapplied/model.go": "949e0643a822379e13cd5b34c293899f80e0ba460c5244068bf862f8bd715dc5", + "openmeter/billing/models/externalid/mixin.go": "93f536e659a9c654c9f5ee9be13ce6e1ab3137b7858975a999c0311ae18bb914", + "openmeter/billing/models/externalid/model.go": "dbe39eb7c602759d0db6eb29345c3db5879fe6bc4c43029d650ac4db905a1a89", + "openmeter/billing/models/stddetailedline/create.go": "59e13e17758fa3cb53aaa151be75a69fd98465f6f7b71c4dae1ba46eb5342af9", + "openmeter/billing/models/stddetailedline/derived.gen.go": "5b357c72db902b48a51e26c02e2da7bfe49dff20ea12037f8e2eadb892aed982", + "openmeter/billing/models/stddetailedline/generate.go": "fceb1a20c421bbaac27ae590b73fdb00dc33e16a434ac56753b884fdde0270c7", + "openmeter/billing/models/stddetailedline/mapping.go": "a799ce63e82933c5be4bcc414a15ada5e073afe17837f2625999fd9a4a22ae1f", + "openmeter/billing/models/stddetailedline/mixin.go": "138b829e50e4f02a862e47a223f370847994b130fe84eb13740fd8f17ec997fd", + "openmeter/billing/models/stddetailedline/model.go": "ad3272928ffd7d8365d122707d9098299a48d3a0de38f5d69cde9647cc408c06", + "openmeter/billing/models/totals/mixin.go": "091e0e78f00404c022d0c8455cd3461bc5ec2c5446096f4bc42bfec6add61345", + "openmeter/billing/models/totals/model.go": "b3b084092f311326de5a86e34880c08a6c31586a9ecca98105b13f53512538f9", + "openmeter/billing/models/totals/model_test.go": "7f766520f22c79a1e915d294b0ebe4efac3d31064acae6a58726f24eddce3ecd", + "openmeter/billing/profile.go": "2b9952a9661f452a969c490b4188a59609852da21130fb9c79758ccbf7c63b8a", + "openmeter/billing/rating/const.go": "7cdba3eb2a93d2748b265d1c1508c75a4e53cde27dfb7b6fe5852c4e524ed05d", + "openmeter/billing/rating/detailedline.go": "c7b63366ea802374ff1c81f24355ad4bc2eae7edd741f28f6c26f819165bc445", + "openmeter/billing/rating/detailedline_test.go": "6a6ca5d101a8392ac185c5aaf4bb011d8b2de297af501a36f7fac24c146f70fa", + "openmeter/billing/rating/line.go": "12485850e4f8c26ccfbcba4c8599e5351cdaedc18a342e7f129d973d86f38289", + "openmeter/billing/rating/service.go": "6fc255a55bc4c4083af5007b1e989b63354929d429fd49c2b25f355ffb5559a8", + "openmeter/billing/rating/service/billableperiod.go": "d85007c0e418e5d5a33abf3c7a8288ff1714b4238afa4e9618c47e42f886fca9", + "openmeter/billing/rating/service/detailedline.go": "884ccf2c3abc836efaedade56a257ac6b4d09e445c4eab2a319e5d75adba5278", + "openmeter/billing/rating/service/mutator/commitments.go": "056ec46437b0acaf6cd2afee7350469eba97f41f21824071539be93d2175b1db", + "openmeter/billing/rating/service/mutator/credits.go": "68ffbbe11fd72e6a5b0afe9b8fd0313bcef133c3c6bf5bc5eb8099f017eb2a78", + "openmeter/billing/rating/service/mutator/credits_test.go": "7d9cba684d30b4f5bf1863b6d00cd59f37b07531a1eedda49b17cc74ce9d0f3c", + "openmeter/billing/rating/service/mutator/discountpercentage.go": "3987e033b47074843099f10d10365ed5bf615d1e9640ea236e4d431143dbc175", + "openmeter/billing/rating/service/mutator/discountusage.go": "2b9fd9d5bcc3114efc8043885a679a11c4f88a06c2f4730362ec4ac55a3f023c", + "openmeter/billing/rating/service/mutator/discountusage_test.go": "4f9f1a646c91e5abaa39d81f5121b7daa9f279df01f12218b1e76a858725fdfa", + "openmeter/billing/rating/service/mutator/types.go": "859baf600c98d5ad6e95ef2d3974180dd66db2d7d6371dcc28f73ca67d655ace", + "openmeter/billing/rating/service/options_test.go": "71d727be256ba09237cf7247b0c08ed5054f6bdcd0ee530153f4a70dcb0d6a6c", + "openmeter/billing/rating/service/pricer.go": "0eb3c25ab833799f8dbd253cb17149d96a0cf120f6f75e0eeb58422a4ac7c082", + "openmeter/billing/rating/service/rate/base.go": "a2cfa053e66771f88e9db14ccd02c67d5ce00194e68acfc58c819714be9a86b2", + "openmeter/billing/rating/service/rate/dynamic.go": "2ff1bc101ca3d26d537a14f04d7514137218175db23df72bffeb07081a1c9e6c", + "openmeter/billing/rating/service/rate/dynamic_test.go": "eff6b8be774859257796edbc83cd6ba78568f8c0bbddd2e8ed55b22cf56b26ad", + "openmeter/billing/rating/service/rate/flat.go": "8eca3f6ab9e906660306aaa5cf1fa4d0f2522665c9ff7c88a542a256bbf6a19d", + "openmeter/billing/rating/service/rate/flat_test.go": "25ac7d302924dd984a16b895e6357325bec4c04257c7d9938b3a08c612408f37", + "openmeter/billing/rating/service/rate/package.go": "6d2c6a7aec928116e3a4298f34fda161587f460cf61ce5bafe920d5628699045", + "openmeter/billing/rating/service/rate/package_test.go": "95c5c39274af4b1bc9aadc11b049ed39876741bbc3d10d38bcacf01815004f7e", + "openmeter/billing/rating/service/rate/tiered.go": "7f9b8e35fcc64cd742ef0d33fefbc7b661587e95dda23d33e59fa781b895de8a", + "openmeter/billing/rating/service/rate/tieredgraduated.go": "171dee1b89397b0394fbe894c00df8330cc1dc4dd470741b7ceabb63bf0140d8", + "openmeter/billing/rating/service/rate/tieredgraduated_test.go": "7a3934d28302262c85dcd94f3781ee293a9d992c1cd39883002fbd3033cd0bbe", + "openmeter/billing/rating/service/rate/tieredvolume.go": "2c4a75a3223bf05d2880108e0c2ea03e975d41410bf3cb451ecfe34e6fd9f76b", + "openmeter/billing/rating/service/rate/tieredvolume_test.go": "922bcf1f076739e2e9ae772e3de2d0980436d709c76116b06fd631ac5fcecb49", + "openmeter/billing/rating/service/rate/types.go": "e8df683d14f65e50ffd75da2c72e12573f606330d8212e618464aecf0bea5735", + "openmeter/billing/rating/service/rate/unit.go": "4dc734b915065799e04250a51742394ea036291e01e71d110c07876f7eec939d", + "openmeter/billing/rating/service/rate/unit_test.go": "4e8ce5d345d807d788f65133585b20559e806bcfb52f91b34ea7af7cb4252ca3", + "openmeter/billing/rating/service/service.go": "39cc9444d1a021b935cf698f377af5aeed48848abe207b44d4060e33503e4653", + "openmeter/billing/rating/service/testutil/ubptest.go": "0b89ce465de1ae108112ecc82a8f08e36b4488704b1900a9c7c5eb34ed989fa0", + "openmeter/billing/seq.go": "4aa6cd90a5c2ab6599ce65358f76478acb2fc211c5221e5aec0801e0c0bc5c9d", + "openmeter/billing/service.go": "7209757460ab66677a10b77edeb00a802576f747e79e1d169e335d3804823970", + "openmeter/billing/service/customeroverride.go": "1728f098574279c4d88b706ac56bb1c41ed4f289a6532d2961e54c5370ca2892", + "openmeter/billing/service/featuremeter.go": "5715f89d0bd6c59056206e5fd055703ec3b4b789a162d64bd9cb131191a4cd27", + "openmeter/billing/service/gatheringinvoice.go": "abf20fcb9f6ee4f64248a77c9c71517c37912c1c45c1a768bcd27da9b62bbd5b", + "openmeter/billing/service/gatheringinvoicependinglines.go": "a9e2240a2d1a22d7b7e4925851c04fa67f795caf4c213d8075d66da86c720476", + "openmeter/billing/service/gatheringinvoicependinglines_test.go": "930ce1397a5ab4e21224d7c3728e06f0ae38dd8b9f051f21ce8e5258db34dbea", + "openmeter/billing/service/invoice.go": "bfa684dd1779ed77081a5b5de4c38a057c55010d302e5a6dbca3654e7bd71412", + "openmeter/billing/service/invoice_test.go": "5f26262f2c96a5df4529206fb9d3c636847476ffaa221d60f3a2755097ba9140", + "openmeter/billing/service/invoiceapp.go": "87cd3d61580a858a0ad8e8174c74b057e03c23b82ca8f21bc13f9b60fbda8bff", + "openmeter/billing/service/invoicecalc/calculator.go": "bc42b4e632bf355f986e1b238064e64c7f930eb54ee4ebafafaf9167914da7e8", + "openmeter/billing/service/invoicecalc/collectionat.go": "32ff37c51cfa3c5637f26405ed974acc1020cebb5c2dbab7acb8f5139c8c9c0b", + "openmeter/billing/service/invoicecalc/collectionat_test.go": "d7f480fdae05236d4d23c96ab881fe9063dc86bb72a473a367f186180eb390fa", + "openmeter/billing/service/invoicecalc/details.go": "1f38211d9e0d4275a07bbdf23c6c66ebc9bddb150becd77c4012c8efb451cd50", + "openmeter/billing/service/invoicecalc/details_test.go": "3b122d0e27cf0df30eed523ea567d85cd61b07b2cd26201629df6046f65ee03a", + "openmeter/billing/service/invoicecalc/discounts.go": "aeff25220cb50cd95f6043bb654d4ddc16be5a982eae6c5e4a220e63a21ae8c3", + "openmeter/billing/service/invoicecalc/draftuntil.go": "ab4037c83f1f88a11f6cdde56fd18c0dce98b9a82aa80193f39bdde26fe9e10d", + "openmeter/billing/service/invoicecalc/dueat.go": "2b5babaae7a2c452412b9ec76925af3e6be5b63039b29e1ee21020cad46c2653", + "openmeter/billing/service/invoicecalc/gatheringrealtime.go": "7cd1aea421d6e734accb6da52fd01dc78ba7ec05bfdaa37ecf71b5b33f475dc4", + "openmeter/billing/service/invoicecalc/mock.go": "8018c6f3170f442a975cef871b857ce12bf56ba234b054bf82fcd17d25dade9d", + "openmeter/billing/service/invoicecalc/period.go": "63a772d4a24f0b9e200170ab80930f5abf697df71c965773bd6891c8345e7ab1", + "openmeter/billing/service/invoicecalc/taxconfig.go": "31f65bbd4d3525b0201ae6318a3b03b076a2172b3166b8951f6721de7c7d0d7f", + "openmeter/billing/service/invoicecalc/taxconfig_test.go": "e12b28b6a8ff542d7cebecdd102583f53e7ccf096b3e8c867cd5ad5dfb6de758", + "openmeter/billing/service/invoicelinesplitgroup.go": "dd674d1d7309bd9e37e595e45a7de6b591db8f9fd0727091c9c2d9240d2aca23", + "openmeter/billing/service/lineengine.go": "52a2a24fe4841d2cabcb038bfc5488d6011bf2fef12c411c46ca06a26107f90c", + "openmeter/billing/service/lineengine_test.go": "fa8e44fa7b36acfa7079ee8914843930788f3c2fe280b451596e82f64fef378d", + "openmeter/billing/service/lock.go": "5a3174f856b433841136282d82833795ed78aff40d9b2eb74be0090aea778cc4", + "openmeter/billing/service/profile.go": "98072e57a30b38f5ab3c8605c3d4bd4120010f354918f9be190092044d42132f", + "openmeter/billing/service/quantitysnapshot.go": "112571ea748b7f25a6d34b867ab71f44e757ac02c9fb771e798a40b89a71002e", + "openmeter/billing/service/seq.go": "f692e62e36953264ba5a91e5989ac87303ad973c5c355d1dd3468aadf1ede69d", + "openmeter/billing/service/seq_test.go": "8998990f493bf01949453675fe80b6eebd9e562917be63c56e2dc11d0b118097", + "openmeter/billing/service/service.go": "d7ca5b55b45a2d397b2e436c27988392877bfb350a7ceee4d0d65624df50f368", + "openmeter/billing/service/stdinvoice.go": "613a3b21479f7fb2751c68a6947278cd60314e3cec8f7ac092e6f3cc2e20e32b", + "openmeter/billing/service/stdinvoiceline.go": "ce35cd3b6ebc3496866cc8de45e4c2e9ff3f9533c0e729b344ef435fc7570815", + "openmeter/billing/service/stdinvoicestate.go": "ae2370586a7b363ae2dd442f04ee1c58e66d0a24c7016cfeb3bb2b3f35d2637c", + "openmeter/billing/service/taxcode.go": "3e93d0b021584c6fd5717a62d396aaadcde2cf2a155678caf6ede68905e961d8", + "openmeter/billing/serviceconfig.go": "175d6811d85aab35170e49fffc65f9a3db37cfa4fb6118610d19d870c7676fb5", + "openmeter/billing/stdinvoice.go": "e6841333c03f55d878f6957dbf1769b8a50624e34db5635b4c364df43abd197a", + "openmeter/billing/stdinvoice_test.go": "34cb3b030153204a98b2f5ae4ca44cf7382cd31ba5e19a5c9ef20685ab52dd9b", + "openmeter/billing/stdinvoicecredits.go": "e85ef89ab9bcbb0524607284080efabc12b74862d5a35ead034d9b177b029378", + "openmeter/billing/stdinvoiceline.go": "23ea7ac0033a538bc137de6bf40893ba05146e6f89792276862bfbceeac705ce", + "openmeter/billing/stdinvoiceline_test.go": "6d765aa25f7d40dc74eb4a391a20338c0cce5d60dbbead94d7578201401cdccd", + "openmeter/billing/stdinvoicestate.go": "332a056c348186701ddcbcf71b9d2c7c99f92329a2fc4dcf9b81d5535b0e9ae3", + "openmeter/billing/taxconfig.go": "1a60a3e4b4ee07c612eb6e3c82fa67183ba13fac91776623a5aa048948e98219", + "openmeter/billing/testutils/lineengine.go": "ae67b03eac1578053bcf99e34288d36ed4a967c02d459e7d5d9a2204d8bce988", + "openmeter/billing/validationissue.go": "5c0b0856df87b61ce886d18b16e749decbefbc0d053cce5417a36895fcea7e83", + "openmeter/billing/validationissue_test.go": "f8b7bb1990279a4b9948ac784f6fd3bbff23695cc2d2c0fd27fdaaf87104197e", + "openmeter/billing/validators/customer/customer.go": "4feab557aea2035733b6d113dc4d8f08a72a4a898a91207b79b6bccee5dbd96f", + "openmeter/billing/validators/subscription/validator.go": "facac442f8ccc36acbec2fffb0566dd66e65ba469aec1c0b037eb9f740a084ad", + "openmeter/billing/worker/advance/advance.go": "a1a6c31040643ba5a3aa7b40a820f71ae065d00c118c378e51bca94084b010a7", + "openmeter/billing/worker/asyncadvance/asyncadvance.go": "b51ef21528ec46043ea2453d55df9d670e7536e989e0f71ac51a50274db47936", + "openmeter/billing/worker/collect/collect.go": "f2ed337f090e9f1759f6dac0ab9687b6d3bbfab33f5130a8704f3834af87d95f", + "openmeter/billing/worker/subscriptionsync/adapter.go": "70688118e1ff44c84b84d635e735252d25e62af4cefa86a45bd723d42b52ee5d", + "openmeter/billing/worker/subscriptionsync/adapter/adapter.go": "5b0595542db0ae8902cbca1f2c8434e27bcf164f2a21c7c26728f9eb5b8d96ab", + "openmeter/billing/worker/subscriptionsync/adapter/syncstate.go": "8762805791412bdbce094ef36e4c26737b723544f4cbc5b05bd9c97baf8291e5", + "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go": "01f2d3446e8a2edbd4b8085da8a6bf00a3cfa6a2948bf30b96709bdf5e9cf321", + "openmeter/billing/worker/subscriptionsync/service.go": "c9d638732fa4a573f30d8e70fea3caeb523f8276da3d54ed3316a2438e283e78", + "openmeter/billing/worker/subscriptionsync/service/base_test.go": "5eb6bb6a7881361dde987884612d7d0c95c215b5ffd990e70f4cdc51aabad512", + "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go": "0e9e4911c4badaeb2c7ea4a3a6af07c8ddfdf0c6890aa1517c8deaced195ff7d", + "openmeter/billing/worker/subscriptionsync/service/handlers.go": "30d3379a5502cda0e3324d13843851ffa28222e7c4e6f63c508b4511fca21642", + "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go": "0d47c641216771c56e5b6c13e6baa7ba19564f6ad27778386562d7ed4d6320c5", + "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go": "eb79cf782a52364a1725cd3e2eda8667520c874aed437d9b9537af40c4a64ec3", + "openmeter/billing/worker/subscriptionsync/service/persistedstate/state.go": "9b8dd9fb5ffc2398e36221151a85264a13ea55701e2968866a691f7f56ec2a58", + "openmeter/billing/worker/subscriptionsync/service/reconcile.go": "bc266e4209c9c65e74953a3e4ab6ddd22719b6898723d30f08130f9b39a299a4", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/feehelper.go": "f5615e1fcf2b7d3c3d5f0c3700d7aa135b83b292f2b71117ebdaa8e01cd7a7ac", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go": "5df41dc1bea109460df75bff2d9c3523339b93dbe3b388817400f39c19051c7d", + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go": "b8c47df01c0aefbc33a6443e1860c44eeebde67e85de2e1eee46602188bce23d", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go": "bf4ad59346be035ee9aaaea358f311e02f92f6e6df339c5b6dc9e8846fda087d", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go": "e69262d21fdda6aa5f8f7e2bc2ba6ba2d6c84d888983008231b32dc5e6d50570", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge.go": "28f3ecf5a806f970be14d210b66bf0dc198d277c2f65be57cb5d2d84fadca312", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge_test.go": "ec862c615750811b4ff7e6b667170481ca46625a19487eefb31ca75e244ebee9", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeflatfee.go": "6cecce2c6505620a7a84221cde1a4b3c7b04cae056f65f074954046b85cfec2c", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeusagebased.go": "56d8069e05159dc35f5eb87234f8373ec25863118d358f0644fec12e75336871", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go": "9cc3a15bd96a4ea9421bfa26db6eb777dca7ae97af7ba845d46eb85d386d180d", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go": "12d7153b8d9c28c69e8e49661a286b21d3353bdb2b9665c20036a9a932f825bc", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go": "e46518c9d82109ca2648f3776cab2d7060b224e3a1c5e8f076c6ebec8ff432e0", + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go": "6c59e8a46b3d6c428e298d47bbfcc449ef843fc9783a1c578ac28f15090d760d", + "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go": "7a33e4fdb768b10b3bba8a1119e677b3069c8c291c096c5e395542f6415683d6", + "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go": "67457fccf51c44d07b626da02088609a87989f221c154008a487560733df22d7", + "openmeter/billing/worker/subscriptionsync/service/ref.go": "90d3c5fe82a48b16fa3eecaf646bfa35cd4c40b49eefa3fb83388368ddd1996e", + "openmeter/billing/worker/subscriptionsync/service/repair.go": "702f775eedfd9d95abe5006877ea0fda4c8f8d90588a3c367d8654f1e52451cb", + "openmeter/billing/worker/subscriptionsync/service/service.go": "ea90f97c0bee02b251f0662b2ca29a474f5d83aec829ed621c9e4e30e2a0962e", + "openmeter/billing/worker/subscriptionsync/service/sync.go": "0e9e8d7661cfa143fc9584763b0f95b1cb8b75642a59cefc19e23a33f5414e91", + "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go": "7c4a34bd778a2ab74cb65a9a050b94ea8e2916ee7a6716ab1518014212a1d91c", + "openmeter/billing/worker/subscriptionsync/service/sync_test.go": "c6c13d60815439ee5d86c1c781fb2e4c069f6c88b8dab58e8fe7e6fc41f36d85", + "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go": "6361e34ab6f5c6fcf418bd688f83fcadb110c152b436b0110c585cf37c174d71", + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go": "1bfc342e750f6042c88b92e8ea6baafdf844fb89f50a724fdb9f325860d735f2", + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go": "a7f7b08649fbc37129bd54f90b68f05879f5e3d930dd056fde7e33b02bd89582", + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go": "7b38a491370df30fda37c88d74428445323a1eb7ec62bec6ae788e58e49d2f13", + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go": "df30cc0b14fa2f57d4252d82591d29a89b9f8eedeb8974091a54c5018e5a0b76", + "openmeter/billing/worker/worker.go": "10d2985bfe86fd0f045bf05de637490957bfd93e470f937f4c480a6763fb921d", + "openmeter/billing/workflow.go": "cb747223f1239dc8e9398c3029e67ef3d8936f6ecc24b5025e4bdc907658dcd5", + "openmeter/cost/adapter.go": "88efd6bb71d41f5baccb29526e1266ff0974b35c6304e46a9ca55a94fc9a193a", + "openmeter/cost/adapter/adapter.go": "dd963f68ed70cc16711594d39b6edcfd8ced3a04f7dccde2dc333f44e0056448", + "openmeter/cost/adapter/compute.go": "eee02942e2fe140cd0f4c72a068165ab4faeb11d399a72b51e8e7fe8a774f9d3", + "openmeter/cost/adapter/compute_test.go": "b386d63689b601179570b64c2719e0bd73be0fc2edbe10ad31ae58437041fc57", + "openmeter/cost/service.go": "c3cbe30eea41589e430d5dd0faad804cfde51cc88d6502c1d008a5a0653be39e", + "openmeter/cost/service/service.go": "7190f5ebf60a0a014f795c65a5894aee925e5000be85e0b33e2e58f0ad674f2b", + "openmeter/credit/adapter/balance_snapshot.go": "5853d90e75b1c66efd07bc6dfc66ec51d89fcc8a8e71dbab702656a8160fae76", + "openmeter/credit/adapter/grant.go": "a026a4929094fd2859a0bb117148b54975c8d1af8498da2a037deb671d24c73d", + "openmeter/credit/adapter/transaction.go": "fe1362968e6ead49a75fb0da849c3eb7395ce7450f33e86cb54fd82a2e2eeb86", + "openmeter/credit/balance.go": "fdaca764c15cc700305fcd3f130b69507be156b9da9c4ca4160a9278690e7e3f", + "openmeter/credit/balance/balance.go": "9bcfdf83878c7c6ba0871e66010755172285c2ae070b135ef4fe6af1fdceddbd", + "openmeter/credit/balance/balance_test.go": "cd0a3a00b32ce65d857a2a3eaca4c800fb9dc6d0930e0505b619bb92985185f8", + "openmeter/credit/balance/repository.go": "40b34831d1a15089f1fa23cdc7228ff9d1209037752535b85e7bf2a55fbe8af3", + "openmeter/credit/balance/service.go": "893d62c315a4ee7373e4da6acaaa4475d0ef34458f3020b8192670a87097999b", + "openmeter/credit/balance/service_test.go": "302fb1700c93ecddb1fba5ec8093081b6d4a34b525fbab6bb4ac657d79e6b512", + "openmeter/credit/balance/usage.go": "abffb2f999ab27dbb2b7c724721b806b1eef38a79ebd1e99de5cb6df3d7ced0c", + "openmeter/credit/connector.go": "5b4f1912f054f073d1b5796ac8cf66c3811c65d70eed79170710df36d3b114f2", + "openmeter/credit/driver/grant.go": "65592b4aa715569bcddee4dd08c755af4c38ca6ee15696f39ca38d9f11018368", + "openmeter/credit/engine/burnphase.go": "ff01b7e30584995a7f591b5c0a2349f17dbe33a4d790e4dd7674eaf9d5c3cf27", + "openmeter/credit/engine/engine.go": "9451e17752c3025af8f86e3a8245e69d156378ccad8bae84aeeb948e515b6662", + "openmeter/credit/engine/engine_test.go": "22114a92c72fb41b9d1dfbc784bff8684f02650d765184060ba6785601639873", + "openmeter/credit/engine/grant.go": "2f78a28db99661b7d10758b0ae697dd1578885636fff807e862b8d8a76fe247f", + "openmeter/credit/engine/history.go": "01550f5d50bcf0f8b5c3fb38a120c60e96ed31a3104eea0ef76ec4a8f346beaf", + "openmeter/credit/engine/history_test.go": "822098885fc8ced72a57653ac706d675e70ef3513194c782d2b32f78207b8100", + "openmeter/credit/engine/reset.go": "2f52d905c88be2ca8e6d03a9c662d4cfdb1d08462614163b22ce6f8fd0c3518b", + "openmeter/credit/engine/reset_test.go": "5879b8b2c3241805027d661983994d54446538b2663a6d59d2c906b8284af6d1", + "openmeter/credit/engine/run.go": "86ab13a441e5d1463102300eb992eee9ad12ff65d8f1626a1d201bb23c90576f", + "openmeter/credit/engine/run_test.go": "c9054836f3a91f06708b2025a98d97d3b259eb5c9909d10da33342623a13fcf3", + "openmeter/credit/engine/runresult_test.go": "a9a1c4302fee8998504ef99ffae31eb9fc25204dab9847c9a7b5b3b302a0247d", + "openmeter/credit/errors.go": "7a0977a688d799645087af7c7c934e94140db783529877b3e385c6e74e8d40d0", + "openmeter/credit/grant.go": "bd50e0b7b3033fbf11936e10fb42e2be216145201689bdde1b0a6d93274a3f14", + "openmeter/credit/grant/events.go": "c7ee351eb0c1cfb8fffcd35658c3d2e388f2928e491f8725cae06b1f214d1797", + "openmeter/credit/grant/events_2.go": "fe5ee60789a4879e0752872a854ebb8a8a5d89770822cd1bc9507506a050e262", + "openmeter/credit/grant/expiration.go": "2cc42c3109a5b5f5ede36841e14d452f7e80e8ce9fed59cc9da66fbf38fbc4fe", + "openmeter/credit/grant/grant.go": "6d47504117c598a9b19fd532c392e4b5e0d945c34509c691ac0f23cd9929c562", + "openmeter/credit/grant/grant_test.go": "e57ffd1359f55b151ef48617cc156c81b6a8ebe6edf726de15d59daffe7e933f", + "openmeter/credit/grant/owner_connector.go": "71c687ec0d0b124626cd57419b16027700a7d99975e1813f625af09c14e28fbf", + "openmeter/credit/grant/repo.go": "046e96906afd30a7ad1ccad412df4c24aa6f80f42954c102802015f86fef6400", + "openmeter/credit/helper.go": "3d349024c9a1f2bad8ae0cb143089c73235250a12729a6468a694843b0c38e16", + "openmeter/credit/hook/entitlement_hook.go": "1866418a1eb3c5e0e90d5b16d610563ae4cf3eed1490a0c4da1c596d113277b9", + "openmeter/credit/trace.go": "cb18070943567753d59bb567a5f5a3aeba7a1f00365271b02bf639d3b0584d71", + "openmeter/currencies/adapter.go": "4813bdad32df2d6c8fb4bb0013afb102446485ecd109b10b7790d581296bdc31", + "openmeter/currencies/adapter/adapter.go": "2c794a3fdab9b244a5e750494fb31a2c30d94e506857c749f02d07c3d6b67303", + "openmeter/currencies/adapter/currencies.go": "1a158c18bb28ff50d3598daae36dbc6b57550ac5849988f87cf573884ed9e8b9", + "openmeter/currencies/models.go": "02bf02ca60abb8ebfd23c073a4f513cb8788ede7263e22c2cb2b1eaa16b91caa", + "openmeter/currencies/service.go": "b46eac8879033e7828b36277b7ad8eca830f3c642f8a3b89845a90494a58c45a", + "openmeter/currencies/service/service.go": "dad15c2ba4cc8839a7091df8deb0574ea69c987b0cc7926c2c938885058c917b", + "openmeter/currencies/service/service_test.go": "9a2c0429e1da8db55ec38fa6fc96f93277fb8afd172d2c5d042c8dd388d331dc", + "openmeter/customer/adapter.go": "ce453aebe79c0854fff470600079e44fb8f243dcc3dfbfe6b015e0d55b61da38", + "openmeter/customer/adapter/adapter.go": "04a9e39ed488280959845515a518b01d6d2472ce108fa37f1c387c31da013d0b", + "openmeter/customer/adapter/customer.go": "40e86e19d02fadfab6e5272557a7751f26777cd2f6aeecc7bf705f2a50b5e211", + "openmeter/customer/adapter/customer_test.go": "e7cbc48ca793ca987ca1f834e1541159cc0b48b2b11d7320c6dca1dfaec66fe9", + "openmeter/customer/adapter/entitymapping.go": "09c3c6cd7c74b7ad5ff6a92cb1a59d25c835158e94c6c85a2e5ee961657b7a45", + "openmeter/customer/app/app.go": "375978c2423e58c1595517075aee5c04e8ea0727931b6b2ca62a151c1d6916bb", + "openmeter/customer/customer.go": "fac5b9968dfbbe18e66402328c5db77aeda91485c716518baf44ff8e126e24de", + "openmeter/customer/defaults.go": "6895702090be905f59d04d336f72c6886991ba34b55441b6f041f2bd854207fa", + "openmeter/customer/errors.go": "09b03d9b46896c0396c64e141aaee43a61b5c43cc03df50cb0420f6f9fc88336", + "openmeter/customer/event.go": "c68f6e5075afa0bf5353581e26941620b72c920e7cdfff2bfdcbf27d74e55783", + "openmeter/customer/httpdriver/apimapping.go": "205d6fdaf807380cf079a05d0e30d4541e155679e4f61ae096fefad1fca085c0", + "openmeter/customer/httpdriver/customer.go": "3325c6741ef6c5662878f3f130189667ee8d4992d45d818116f65e4e9c124b81", + "openmeter/customer/httpdriver/handler.go": "e1c3691e75f683906a1557a9f0624c2d0a8bcfbdf73541be2025087fcd5e44d3", + "openmeter/customer/requestvalidator.go": "44acb2524ada51471639d85f303f03963e9c94e4c8023cc90f9bc1f17cee94d6", + "openmeter/customer/service.go": "f1752f5f4e66a07c3911300403ba05707eeb80cf5f3807c20cb0a75481a13bf7", + "openmeter/customer/service/customer.go": "7c4b39c253e3678f7ab6a01979cc81894eedb7448a2c271d3afdf1c7c868e5b4", + "openmeter/customer/service/hooks/entitlementvalidator.go": "fe407cd4422ff93fb1fbc196aa4f616a257efbe930c1ad8038a422100f93a48c", + "openmeter/customer/service/hooks/subjectcustomer.go": "3eccdc3b9d5881c1e857c0f3acebc449a86c2f8da816b6aa1024f93d457b4716", + "openmeter/customer/service/hooks/subjectcustomer_test.go": "2f6250907572c2219be6cd7dc2e050ea701c945a10c1fb9b2e4d91b155f129bc", + "openmeter/customer/service/ledger_hook_test.go": "29aaed826c0103f069fe7025309b2f4017ebe6482e26465fe5227b47abf3ed10", + "openmeter/customer/service/requestvalidator.go": "e5d5efc4ba9fb20ba5b3813aef7259a7b4618fdf367556ee9ad2b72f85f2e11b", + "openmeter/customer/service/service.go": "fd05880fad502241b14e7c1308ec4f7d92636b0123e559f41cd25375ec245011", + "openmeter/customer/service/service_test.go": "f22dc87fce72e95b0784d3887726e825342ed4452471d74d0cbe2b5936f260d3", + "openmeter/customer/testutils/env.go": "8d677db789b1379f5cdf0387ae162cda22ffdd2c0219ee3a2e8cf1ba896d173d", + "openmeter/debug/debug.go": "fa2e676c6e60864da539087b9b19576bb66ec7d0ab2a13d50cae26bc83b470f1", + "openmeter/debug/httpdriver/metrics.go": "91a51e67d09152028783a70da6da9bd984bb6ba7420a9d78ce16a05d4298ac63", + "openmeter/dedupe/dedupe.go": "746920e6e9f1cbaa493e279587a8aeafe610613a3a4e02594f0374f4a1685c92", + "openmeter/dedupe/memorydedupe/memorydedupe.go": "29c7856de7c693e53966ee5c52346f25dea6b9a639a2b649c236c67c208f5f72", + "openmeter/dedupe/memorydedupe/memorydedupe_test.go": "6ce5fbceb0b23ceac96517437b64389f89cf9cf8f63f80118e5f278ce32b2a86", + "openmeter/dedupe/redisdedupe/keyhash.go": "0ee8dc0184524d57ffbc41105cdfb85d2ad6ee82b601580b9a8b1c613237ed4e", + "openmeter/dedupe/redisdedupe/redisdedupe.go": "5d055f5f773f6d6717bc447141056ad8333e537ab68135dbe1a079c260a35177", + "openmeter/ent/db/addon.go": "32c20efa2d1cafe8236ac61808cd28cfd65cc4fdc670780dc38447a7609a823b", + "openmeter/ent/db/addon/addon.go": "4cd09d35c5dce79e43609dc1e38be1fa3bc0a2bb1bae5604d4f2784499431b6d", + "openmeter/ent/db/addon/where.go": "b2ce4c2d190ecc1dfc7aeffb9617e47260f1fd480c57bb83e882a401546b6322", + "openmeter/ent/db/addon_create.go": "ad38bb3793f1f708e5cb112f3077d7933637cdae1022b3ef280d6070b657fe5b", + "openmeter/ent/db/addon_delete.go": "01b293f08021121b7db4752a9978602a528c94ad56fc4c2b9356902163bf18ec", + "openmeter/ent/db/addon_query.go": "4ff7220a6be7296c5abb3845efd53bd0ff76bbcb54d0ebfa1f3dad1ea70ed35d", + "openmeter/ent/db/addon_update.go": "ea1172fd08f00b3476b4e1a7ad99714d89b48073fc1445d9a165172273987823", + "openmeter/ent/db/addonratecard.go": "7621a14d955b7b488acecb22412ea9acd7af2bda6f204c3ce7780266cae1e187", + "openmeter/ent/db/addonratecard/addonratecard.go": "e8e84da6b7dc2678236283cfcc221876e42fb5e58a9709e95168389bd9c48b72", + "openmeter/ent/db/addonratecard/where.go": "c7dcd75c65e531b9a43070b046541e88bc449077e0fc2a3a47c7fac79c3afe00", + "openmeter/ent/db/addonratecard_create.go": "2864647f557aa577ee27aac3c5a47fd30dfbd248058dcef1a09be8cff2ad3297", + "openmeter/ent/db/addonratecard_delete.go": "a3d67a190311ca5c93da270d0e438c875c1606c623b7a979294e8e47b7890382", + "openmeter/ent/db/addonratecard_query.go": "d66c6c6750bb8001918cb2aee9f3347e660b742a07fa641c7144f9f5c9a5b9fe", + "openmeter/ent/db/addonratecard_update.go": "e4fd2a8ac92b289c4000798fd08eb215f15e58073d642bc9a17cb30831675cc3", + "openmeter/ent/db/app.go": "0cd266c3befeca110678c12e05dff2f63a676cf960aa8a39068aa6ed51ceefbd", + "openmeter/ent/db/app/app.go": "6f571a376c01d54e0a3232d55af52df4b4062889ba693c695487cfa5e7dbd445", + "openmeter/ent/db/app/where.go": "7e40d7d2a04ca7eeea98358c7bfb939004f0cc32d34d92b0035e710ef32d1352", + "openmeter/ent/db/app_create.go": "cc2bd5eed76107b1887a802a9375add5a4379bb1ae265b5518b8e65d8898f03c", + "openmeter/ent/db/app_delete.go": "6956d97e705c11fe384440055a33c6da97fd5f50da588dd572f204c17f24a144", + "openmeter/ent/db/app_query.go": "090d07fd9633dee819875fbe3dcf4b925716deb0e71de8aa828f08c2ad8171f0", + "openmeter/ent/db/app_update.go": "8ef3db5591c303a31f77606640c1db6c610620e0c0c99c0a77a61873388feecb", + "openmeter/ent/db/appcustomer.go": "139824ce60dfb2977dfdb07f1a7a84671c97904cc8796b08d8ae659d7051aeaf", + "openmeter/ent/db/appcustomer/appcustomer.go": "247847bd0934644661cc915e1b5f39997a479c94bec48894b664e22295cecea4", + "openmeter/ent/db/appcustomer/where.go": "66e5116f0e67b80b544068c37bdc93889bbb3bacb591e2fce0a4e4c16b082034", + "openmeter/ent/db/appcustomer_create.go": "1321fa44777177cacec30ad451f0a86d3f80e82ae7d8857693cef47b174ee42c", + "openmeter/ent/db/appcustomer_delete.go": "cec8db2a5c518c3049b8267df7c464ea976b40480efb128c8313d4a6e3aad969", + "openmeter/ent/db/appcustomer_query.go": "1575e411bbd9591b41546a3f81af3102e056712f15a7d9acfa21f2eb53e00e3d", + "openmeter/ent/db/appcustomer_update.go": "a54b214bbdf3a179d3bbf9dfef2c1071bdd381b194adf9671a6bf5541694f936", + "openmeter/ent/db/appcustominvoicing.go": "c033bbcb22a119584bf76c37917bfe21adea1d72e2dfa62beb4690f2100dbe12", + "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go": "4171dc165670315ad86d86d9a98af28242f47819be5001412aa89c085c6e3f0d", + "openmeter/ent/db/appcustominvoicing/where.go": "001b6776e9262df5d8ee968a16b62a1b98059c756daeb683c35e894aa3a73e35", + "openmeter/ent/db/appcustominvoicing_create.go": "b590c21412019b1b27222dfe915979a9ba0ec4e98f25018bcbf7deef9110c14c", + "openmeter/ent/db/appcustominvoicing_delete.go": "4519017a1c5ed26f626ceebf6fd0e9f7b6bf70997eaad46c54a9e4fdb450e84f", + "openmeter/ent/db/appcustominvoicing_query.go": "eae82c0c63e8a7234490f4c40d517069dffd858abcd596200ffc119c11087cba", + "openmeter/ent/db/appcustominvoicing_update.go": "6b8a79d7748851aa29373e1bb7dbcbd3ca31eff023a837f9f4e5ffd1f0a73710", + "openmeter/ent/db/appcustominvoicingcustomer.go": "18bf8d6a373f29543858d346e45099ddbea94f6e9db5d5f722168165aac462c9", + "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go": "c7e9a2dc1d6e55f9a9ba05b8b0f86115dd129764958c8255a296926ba1b0a10a", + "openmeter/ent/db/appcustominvoicingcustomer/where.go": "8e1f6383e3d267b39aed2611f0fa0a0cec111f0db8990e069fefab119ee090c0", + "openmeter/ent/db/appcustominvoicingcustomer_create.go": "127c82fed800f710a9412247b418da913febe2f266871c55b88d8ea9fde1fad3", + "openmeter/ent/db/appcustominvoicingcustomer_delete.go": "1724caa74e68e003e985b98334d6e5ecb6ee5950dc4289b32f54796fa34e6ec0", + "openmeter/ent/db/appcustominvoicingcustomer_query.go": "c7cbdd8bd7b7e0abeec382f58531d517a3afa4a164662bc9ed13d4d5778f63bc", + "openmeter/ent/db/appcustominvoicingcustomer_update.go": "d92f094c7ef50a0b0b791d45485f791088fd6941e82b02686195dd3d201d476a", + "openmeter/ent/db/appstripe.go": "e7a2fd668110bb5f20b814727b7fc0751b67cdaad87dbeeb523d32ace582f740", + "openmeter/ent/db/appstripe/appstripe.go": "7b4993998db9cd4a25853fe7fd5374b684ddefb590f6d640e059471c2f680d62", + "openmeter/ent/db/appstripe/where.go": "be50c882071b2fb1d9dd3a42605bd8ecfac89aa5b73fcf80ab82a37e3686fc71", + "openmeter/ent/db/appstripe_create.go": "c71ef3233b57c2ac62d6593b111664bfc92e66d2927e80d98bf668c61aa231f6", + "openmeter/ent/db/appstripe_delete.go": "52dbfa2eb2b53324a9e9705d437118207c48b02812f632d44b274027f99b911b", + "openmeter/ent/db/appstripe_query.go": "7d56f06d1868da11656758dc9c1abc7619246a0df7285963a4d6424408d5090c", + "openmeter/ent/db/appstripe_update.go": "bf8d1caf5f9983c7b56e739f2038812b608cac9bfb0fb8492cf39ef2b8ad1913", + "openmeter/ent/db/appstripecustomer.go": "00cff795d97963db8ba118c76fde7009c3b9766b5bd1d172f4b524df4c69c005", + "openmeter/ent/db/appstripecustomer/appstripecustomer.go": "a5ac5bfa58e77c469d5061d0a4a3a80b065dcf0b4e004e50addd0bf86e636edc", + "openmeter/ent/db/appstripecustomer/where.go": "0161eec33c76c609009d572124396b4ef143815b21db18e0f49510e3e76ab317", + "openmeter/ent/db/appstripecustomer_create.go": "7a5877a3ee6b7309050e8ef9146178ba9293475a208596d3fc9d3b03a3e5b120", + "openmeter/ent/db/appstripecustomer_delete.go": "7b91569a058e713a8e41ff4614d8aeb8be51f18e28409694335554923a8caa7a", + "openmeter/ent/db/appstripecustomer_query.go": "6adb5a0c8367d5837282268111b1163c1cb9db6c895e4cb4720828e0de243bb9", + "openmeter/ent/db/appstripecustomer_update.go": "195684a4408a0519660225095b39a2c5b2397469a7d5043fda462ac53de27534", + "openmeter/ent/db/balancesnapshot.go": "65af44cb68f35c884dc9d231b82748bdad4370395725b4f4f9103c7587ea1d1c", + "openmeter/ent/db/balancesnapshot/balancesnapshot.go": "b8a752d2e8a4f487ff69af7c3414f08a5134cb41fa88357cc1e5acdca330e3b7", + "openmeter/ent/db/balancesnapshot/where.go": "d5d016fef8dc37f6e86819606e082f589b6956b01dcbebebdb8ee07e0e184b94", + "openmeter/ent/db/balancesnapshot_create.go": "bf6856f4d7741d8916bbab474d01b309c655aa59bd7340c365b1c9033e368585", + "openmeter/ent/db/balancesnapshot_delete.go": "0c077b2cf68f20c0b06412d78965e20d21d6f4eda2376bef6548dc6770803fe1", + "openmeter/ent/db/balancesnapshot_query.go": "12e5c1fb579f5cfabf9780bce5a826a4042a3cf6ceddeca51f8a4252a8100b31", + "openmeter/ent/db/balancesnapshot_update.go": "bd49c658b46ab4e30c81014808de343dfc4730ff3a4cc1096da360915973fc5c", + "openmeter/ent/db/billingcustomerlock.go": "d8fd9cfaf001e8dcdbc9c1c6a948905f5b6d268d159494a6f592299a56c33ba8", + "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go": "766b15adc0048f163b7895bb153f3865c2b2b7bcb5688cfdb266721a1f3db767", + "openmeter/ent/db/billingcustomerlock/where.go": "272e7ef5317b88f6449643e5fdfdb822e9d0579cfbaa475213713b565375ef54", + "openmeter/ent/db/billingcustomerlock_create.go": "7dedb5f90dc1a222f18a12a44d842778490a3415d1d48e1467cfa5384bb67b7e", + "openmeter/ent/db/billingcustomerlock_delete.go": "1ceef073d079a53e7b285934248433d90b98d9ba296eabcf8249340c18d3f102", + "openmeter/ent/db/billingcustomerlock_query.go": "ac1d7fbc8dc775ce7327e59efe6914c89a25b8e223120a06b5e9519b5a834bfb", + "openmeter/ent/db/billingcustomerlock_update.go": "3a881d955cd2da89bbb0abb66266dcd9be0fe4d7715e8e0f016542afd604ddd8", + "openmeter/ent/db/billingcustomeroverride.go": "4dd9ed6aa504a8d82e0eca171ae1ef7bb48ad59805a137e4eb9efc04f0276248", + "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go": "8dee95725a3af9a367d91b4e4776f44ee7a54e18ab72c2e99bb8db90d78cf54f", + "openmeter/ent/db/billingcustomeroverride/where.go": "37f2f90a00bf4a8f89304eeefcf6e9ffe3ea8003abc2923c9042f8b7f3cc3059", + "openmeter/ent/db/billingcustomeroverride_create.go": "efad66f6278412ed197c8db74b8684eb7c7b480ecad963738fa67e9ad74267fc", + "openmeter/ent/db/billingcustomeroverride_delete.go": "b3fc8d93a3706dd9a138c006b1617d2a7868b76f94d1e6fb206087f39c4f4014", + "openmeter/ent/db/billingcustomeroverride_query.go": "76ecf8656f1faf2deb5287246a6b9898f41a17dd4eb2a4d7ee14f9f200d313f6", + "openmeter/ent/db/billingcustomeroverride_update.go": "a82f9693eb4e51a9df04ff080215ea97f2fc8efbfca119dc34e5477cbf3367de", + "openmeter/ent/db/billinginvoice.go": "ff75d2d2adb1a6765c203245885d309b7c99f6d91682f393902d680fdb829a4d", + "openmeter/ent/db/billinginvoice/billinginvoice.go": "a215bc7862a1899446174f496dcb069e88f51d8cac75fff42fc5958d019509de", + "openmeter/ent/db/billinginvoice/where.go": "d911f217698be9c63071eed31f5fe5fc206d2a8af81ec6caa5fefb303d66db66", + "openmeter/ent/db/billinginvoice_create.go": "bc0e06ad9ce8952dd14ce043a16c301911888b84330b2f89bccdde03451d069b", + "openmeter/ent/db/billinginvoice_delete.go": "db84e281519e653566d249f2c8388f6787f530d73f51fc7267051d4cf855e864", + "openmeter/ent/db/billinginvoice_query.go": "d44c032208cad7bb52bc62ac15a24e75a2c759d6b17ec0ec82c0d97a26d08cd6", + "openmeter/ent/db/billinginvoice_update.go": "76cd3d892d32473ee8fe36409bcb0634fbfb70750adde968dc55d906ce76a9ef", + "openmeter/ent/db/billinginvoiceflatfeelineconfig.go": "f4e2960dcef8349d19cbbc2bee7b8b9136c0982966065eed12381625788393bf", + "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go": "13239421307fa6e2522e1b3419dddcbb5a3356f437c7c54aa8a993aadc3563b9", + "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go": "3fd108656a27a7cfb5a4bf784b2163d2d6e2e95e687a3a377b1395186ded6c11", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go": "26ac9c1439cac4d1ceab97572be141062e2a2970e724985d1fc4dedec7dfa967", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go": "ca6136e079c92c190831dde9cead8a1ec28ad745c80e4130c8742781886c425e", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go": "950c5e4a580a9e9225466d79f3f00f063a88f6f7eb95fd5696a98ad5217e557c", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go": "b043fd7dd8fcbcdccdfb96a0ee2a5ebc0295cfacb5fb1d2af53f4f56007c9a97", + "openmeter/ent/db/billinginvoiceline.go": "4f81aa998725adf9786f7b9c5a250cb01452ad9d037c4f24cd1b34178967774f", + "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go": "ca1e636ae8f1af5656d311d65b5dbe8eceb6f50a9287eaba9440433e8a62d0dd", + "openmeter/ent/db/billinginvoiceline/where.go": "ef450a5059232fb39faa48fd15d1d04c55689aa0f46e2f8164cb17e4f213133b", + "openmeter/ent/db/billinginvoiceline_create.go": "6a3f40f168f6c6926fa344cffa2a8c71987e4e6a670d88bd32e079fdd4fd0ee2", + "openmeter/ent/db/billinginvoiceline_delete.go": "041c619c91b5115f4d6b4b78033772a11e364ed14fb7fd7dee1f57846a4214b1", + "openmeter/ent/db/billinginvoiceline_query.go": "d4d5ed8a5ff52500ef76d9d4ae77f5abaa4ae969626258e862bb4e166dd33463", + "openmeter/ent/db/billinginvoiceline_update.go": "8802ebd3a08d69bd52b0f6cbadc996a8bd39446e8095f22322cdfd0c3578bd51", + "openmeter/ent/db/billinginvoicelinediscount.go": "c7b6a18347bb20e74cb8f9972a63b18b2c506bfefb577618435fe92a8a54af75", + "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go": "6262a5587ac47ca68db01ee1729592762a61658539567854ae181cc4e56f806a", + "openmeter/ent/db/billinginvoicelinediscount/where.go": "832a8db7132f68d25067f63440bbe6f45a8e6ccb3a3fd2833661d6e71e8991cf", + "openmeter/ent/db/billinginvoicelinediscount_create.go": "c6d36c436e032569a8b9c21a2afea11c0924b007b28bf7acd7ad63ccdf7629d8", + "openmeter/ent/db/billinginvoicelinediscount_delete.go": "2e87e43bd436dcf46cdb3ac5b00a28c4b142d8a0f5113d03ae386ae97fd7365d", + "openmeter/ent/db/billinginvoicelinediscount_query.go": "b84e8658ede15847713e030f0a8cc2acd833e491dbbdbc4bf6483fd69ecfa73c", + "openmeter/ent/db/billinginvoicelinediscount_update.go": "c42aea94d37c26272d59fe199a16001e24b514790ec57d629028313ef3211745", + "openmeter/ent/db/billinginvoicelineusagediscount.go": "6b51aec37708d5b2aea936a003780af87b0ca6e2f9799a6193695e15aa195c30", + "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go": "8fe13c9486671bc5db4351f59a271ca896614433c4f510d141455a955ab83cee", + "openmeter/ent/db/billinginvoicelineusagediscount/where.go": "042d2998a04da45545165ecc1f0fffa57036eb888cec3120a1a34c3b4166a31f", + "openmeter/ent/db/billinginvoicelineusagediscount_create.go": "dc07fb6f6307c2c8c9c364f31ec36bc57e7a745b866ab6f2c998351bc5e7614c", + "openmeter/ent/db/billinginvoicelineusagediscount_delete.go": "96f025846f836444dc292dcaf854e5c6197bbb5a4ea2db08ccc7a42ce20a22ba", + "openmeter/ent/db/billinginvoicelineusagediscount_query.go": "be29d8eed89d5830d30f3d6a4af23ad36a4b8370a3fc2af300ac6aac7f92a5a0", + "openmeter/ent/db/billinginvoicelineusagediscount_update.go": "b7651108d32a20d0d295c4f7a30c161093574965fd0c58d0bc47e584bf9a99bd", + "openmeter/ent/db/billinginvoicesplitlinegroup.go": "657298647b65ee20cf64e8b13804657f61fd8cd4730d38fd18d2e543ba84b5d9", + "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go": "53c201b0b8b359295f5f26f5ef3e18f270fc21549a1ead9c69fdaf9d948be3bf", + "openmeter/ent/db/billinginvoicesplitlinegroup/where.go": "3e1c6a4ca5328e0539dfc8d4fb454c58ae9384106d2deddd4e5be35bb97bd38a", + "openmeter/ent/db/billinginvoicesplitlinegroup_create.go": "9c1e46bae56f32500c1fc99fec6c0c02684b1c44f224a7b854477edea48f439a", + "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go": "8ba24e94d07a4312c8965c7a682b42874b4ff676013f6ae5382e9db32cba89e7", + "openmeter/ent/db/billinginvoicesplitlinegroup_query.go": "9efac0bde4b3749a8fbaa9917ae1c8d0e7048d8c9f6a6cf5b714637c93378ad1", + "openmeter/ent/db/billinginvoicesplitlinegroup_update.go": "c3f6175f539ef6ef02a710caa4b686dcc3cf3c2ba323618c9847b0d0162952c8", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go": "cc8739dc6f340d6168d0b930e81d81651a99bd7a598bf67c6d86f3741e9b3963", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go": "e60b6fb27d1d5297321d078dfa14a9519e76d2a17b2e2d4305814e36c4d1aa9f", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go": "4475bf923b2460dd4ed32c9e1a734f28ba8045fae91224cc01cbb2c79b6c03ca", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go": "10e4412b5b815ddbca6f0dc6ccacec7e0868c5d419983e0cadf96b487d9aa903", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go": "e3ac6b3f65fe7abaa8705ae47ab3f824804974e977d6a7e4b787bdfbafb61b20", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go": "b29b678cf8356579836faeced1abbf1d265f88980ff849ce5fd243d8408457ed", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go": "d1bac8621d53668ba27da28b07ff87e4536c42471fdd38a215070e7de870fe84", + "openmeter/ent/db/billinginvoicevalidationissue.go": "21feba2e7f1adc1f8a0d98283f06f3179489cde588a10d66a9aec02b39fcd185", + "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go": "a62ed9f8d8c4fa0c14236873a1c0fe995dbc6b813059c63bdcc5db48da59eddf", + "openmeter/ent/db/billinginvoicevalidationissue/where.go": "1c248fe15622f24276edd11c24eeb3360d1c12534121c4498dba4ff1e1cc17a0", + "openmeter/ent/db/billinginvoicevalidationissue_create.go": "c81d9e33b7ae40fc48ce7597b882d3bd212976c43e1122a1000a250a708f3769", + "openmeter/ent/db/billinginvoicevalidationissue_delete.go": "f66e62b4c105c91a1b51866727d1c95f3d7d4e58bac0c4b4af0479b673939eef", + "openmeter/ent/db/billinginvoicevalidationissue_query.go": "144c68446e9c755cddf9366723c82c6abb7424c82b5667c22bd6b0a8ecfeb6f9", + "openmeter/ent/db/billinginvoicevalidationissue_update.go": "97465e94fa8fc69361bf9e78b69098f7893134aec08c4e2642ba6b6e05b2756a", + "openmeter/ent/db/billinginvoicewriteschemalevel.go": "b302897b43c8149f33b34da92f5f597b9b6cfa4ac16f2dc8f67c667534f4c4f7", + "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go": "bc616bcdd4043c7bae62902d14370272462942b8fd609de34e877777fe3229a0", + "openmeter/ent/db/billinginvoicewriteschemalevel/where.go": "d498f9b1442e6e53c0dd632dbd05724f0a4ef02902a230f3e7c8d82372008648", + "openmeter/ent/db/billinginvoicewriteschemalevel_create.go": "f104ff9b97092c1c85b03e0edf7ff00d79774cd05b8ec2601dc0961b0d96470c", + "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go": "2fcbe2b24827966da586ef26cc7d24b57e6730546949adcea6ad709a005157a1", + "openmeter/ent/db/billinginvoicewriteschemalevel_query.go": "45cde4b487fa60ec1453411e7570f1d8b6dbd756646304c3e387a42c96e9ba3a", + "openmeter/ent/db/billinginvoicewriteschemalevel_update.go": "abf75b901c1ec40d9d96cc1ed00ecc2ac287f9075695819826f26708e9d11769", + "openmeter/ent/db/billingprofile.go": "15d2b4cb19987eb8ce589ac4dfbdb50ebd91c6bf55b547796515aec8369ce914", + "openmeter/ent/db/billingprofile/billingprofile.go": "173c39dd66bdb302e87faed9ee5abd17859909c4c8bf235752cefaacb64f22f7", + "openmeter/ent/db/billingprofile/where.go": "4240aaf5953405d7305d3ae573e6e0e41d5464ba8180dacca8e6ad49983ad3f2", + "openmeter/ent/db/billingprofile_create.go": "2d549de15f75b7b56bd54eb8556b9315de58f121967e39c08ea34df4a8e8aa6a", + "openmeter/ent/db/billingprofile_delete.go": "31d72b9d7e3398eaac2578078b6696afa46b1bddabef046705cc6a313af4a9d5", + "openmeter/ent/db/billingprofile_query.go": "10ffb1ffe93f42055c0338cc4801f24ebb8c59282fb3af2d3250b2e0461a4f2a", + "openmeter/ent/db/billingprofile_update.go": "8d0ca974f71037c4bf59b08beccacf336e85718d6869d017dc5f464be565eb01", + "openmeter/ent/db/billingsequencenumbers.go": "6e5487a320da309640e26b172ab63cf055891cc97c6ada4be05839864b1ea262", + "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go": "51d4da87b8e5d255449e2a98085856b5970e1e5ea458c40bc384652567064aa7", + "openmeter/ent/db/billingsequencenumbers/where.go": "80f0407aad5c4f20d6e1fffd56d3abccac3b294881dda1833e5a20ac98f236a4", + "openmeter/ent/db/billingsequencenumbers_create.go": "5acae1b7d2228aeaff06d18d2ea1f73328078bd7368151be322c11e8fe381213", + "openmeter/ent/db/billingsequencenumbers_delete.go": "35512eb4037836b3f531c5aeb1bc53e7d0c4b169f7eebfc81f9784e25e183880", + "openmeter/ent/db/billingsequencenumbers_query.go": "62279ed33acfe7220dc8bfce567bf34639bedb5310eeb24535684a27bca77716", + "openmeter/ent/db/billingsequencenumbers_update.go": "85dcebf7a9af133ae2c01d5f1824dc361ae9f1c5e4f927666a6c341f4c6aeba8", + "openmeter/ent/db/billingstandardinvoicedetailedline.go": "762afcb0ce64fe2ad5f0446a42f94260d9b943a36d3ae0f8bef0b617e8d78ba3", + "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go": "2632683a3b615aaf791caa20266cfaff0bcf29ba7d016520cda1e2cbe530f110", + "openmeter/ent/db/billingstandardinvoicedetailedline/where.go": "cad4b53b95a7393d358a2ee44b9e652ec8df7e78ae61157e681808af4cd21689", + "openmeter/ent/db/billingstandardinvoicedetailedline_create.go": "c38c97c23a30a0fb7e10df5229c709e9ed8de36087846f1b6e6ebea86403bf67", + "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go": "42eb75d15524c12a27b602afef0ca71a1fa4c16a281075a0010835109dc44173", + "openmeter/ent/db/billingstandardinvoicedetailedline_query.go": "4e4fe492a315cad264b041f44b720734b04d6a2e1198a2e081206d0f830a5987", + "openmeter/ent/db/billingstandardinvoicedetailedline_update.go": "c6693abd6fe9213d52e92923e1f058e1680b07a6b0e50138f49b1ca0b922cc87", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go": "229557ed7c70c684b358ab6c68a73f1dc52182bfea453c7f9db9acef37c34b95", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go": "135eb18e7105d2ebb55c1737a91a794017f147dba325d2f34f72bc2d355f6920", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go": "9c0a7198610ea5ade777ea1d5fa4818d8df64756f2230cda0c4ecca33d7d6a47", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go": "d532a8f702e734c7b2b1fe5b7f78c6b8a18ce979522e5da3ccf5a1b7dd6fb77c", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go": "87f485fb7783db14e5be056732dfb2e48f4a05c71cbd60553527883fce72815b", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go": "73d35a8cad27bb78b4fc58a8d3693509af894dee579ea1527fc28e2a8b73aed8", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go": "a76909e8d0aecbf1350fb10b3dd8bc2a7698f4702d652508407de128ad194a97", + "openmeter/ent/db/billingworkflowconfig.go": "1c7ad6b2eae4b4590304524f7e5601387015709b7eab8720099bd24ce9fe4968", + "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go": "0012e5e0c9d4c8546395dfcf2192296f8b111223dddff6b1895afbdd54aed3ed", + "openmeter/ent/db/billingworkflowconfig/where.go": "14ff1d2fd26c74e94283b89f38a1e961d5b8cf8db9b18c31658a67a1b1245b61", + "openmeter/ent/db/billingworkflowconfig_create.go": "28e9c34aa46a94c494e336e6fb0c34f0d0c3083a535ddc84ac02e054ae3aae87", + "openmeter/ent/db/billingworkflowconfig_delete.go": "9a73084d0a56cd5c2299e6f8a44cd9894a8edebe47f34a582900908bfd1b8d50", + "openmeter/ent/db/billingworkflowconfig_query.go": "e5453e6127428fd072cbcec5b4fba5aa48105a776a617611778f1074a99e137d", + "openmeter/ent/db/billingworkflowconfig_update.go": "81f0d3349fc5c87c4fd7cf4b1336f1cc566c3871972103b17fa32354fba3c133", + "openmeter/ent/db/charge.go": "2c65aefbd6641fbf2467133a0dd66ff547c380eba3152c5c127d2d8a0a157592", + "openmeter/ent/db/charge/charge.go": "50dfd882adc76c4d9bcb31e5747b05d168f673a03fccdf2dcf61f63ce29b782d", + "openmeter/ent/db/charge/where.go": "ce6ede3da505809675eab2288c540ba04e0db2ea80d9efec7f11f360416e954f", + "openmeter/ent/db/charge_create.go": "01eef710b493418058b5eb51d22151825d087f0e2c20e4ff9cf77b9ddcdd50c3", + "openmeter/ent/db/charge_delete.go": "b1bb70aabd05643a0bbb09839b15483dbab198527d8226d27161e43f4ae81b89", + "openmeter/ent/db/charge_query.go": "89801be557e4e361dc900d140c29ffa1b2f2159dd73e57b931c7cdccfb00b806", + "openmeter/ent/db/charge_update.go": "46b8c53c48b7ed24415f453bc5bedf5e184a68d2d7a368524b449b6475e5e81b", + "openmeter/ent/db/chargecreditpurchase.go": "a34e2ff0c07816c2abc71b751525e403047e04cbbfb54af3c30370a084c7be8b", + "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go": "467b433281ffde4df5b1f40191e063687a156aa58bf0b825164b8ffeb059038a", + "openmeter/ent/db/chargecreditpurchase/where.go": "e0b8ac7634e0c95bb7641a4c1cea68150b6d196f91b7235a3e0aa4d0c992ea0e", + "openmeter/ent/db/chargecreditpurchase_create.go": "0b61fff680f8c5ae35f64b9ad16ba97cec0de7eb10185482a07399b48d082eee", + "openmeter/ent/db/chargecreditpurchase_delete.go": "b323e453875d29dda9a7d9c42a8f7885731f8d0002f00b1a20dc9298b0a52e3a", + "openmeter/ent/db/chargecreditpurchase_query.go": "d6d04a140564231c298cea67c135b75f83b355f0906c4abe85104fa80fab4283", + "openmeter/ent/db/chargecreditpurchase_update.go": "ea9a31cac8b38fa29a68a28481443084415ede3722eb22d46dc0ac1bb7b1b225", + "openmeter/ent/db/chargecreditpurchasecreditgrant.go": "398b87db688f23307b5622d6673319e3a130f0ef2b0c7cd38a349b68a757433b", + "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go": "97921a4460691251fc289bcbddb97acfd020f0d2fb3902c2e17cc70af732da9e", + "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go": "fc3b4847ae89bc92488defc855f8da0280b0096775b437c4e92a9773570dab03", + "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go": "11ffa55ad86249639aecee95fa8f3ff240687bc4c8a7efd10843a7f903574a66", + "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go": "a49085a28d461881090385b8f12d6cda7c241d9fb9976f4812d88d42eb209175", + "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go": "6f2ea29b96e63e20d98fb6146e005754c4a3ae76b9faf81a730030223334abe4", + "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go": "44ed530b40c03aa7eb78709cad5aa19d4b5936047299f7103f4daf370362efe6", + "openmeter/ent/db/chargecreditpurchaseexternalpayment.go": "97b54923f0399aca3dcfd1a7089055270deb03bd456af4f07417c5405388cca1", + "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go": "5523902f6b5e6ba312e33b0fd567c1035ff6807557e6815aba00481edaccfda6", + "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go": "97b31048a9c9f5b7286ce72a446e09c55be04ac0bdf839ccb9677b9aa1c6518d", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go": "02e875a2cf277b198bbdf2dbc3765c532bf8da209458949c72eebfaaee1ff79b", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go": "5901881768680d18c109817a2b07284b729bd13a9563775d0f2588c4f9901126", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go": "6461a19215c6b3b30cec5a59f9da083bf28f95b928889b8e3d8de6afb22f5a7d", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go": "ddd0b26b58c6c29cdea8cdc1faf0c1b747534522f595eb86c4efcc7c83fb0fe1", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go": "f70fbd6c4fc51421eef2a2996bc8ccd312daf1a53679a57f49f52a7cd8793cd8", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go": "379044a4c31d23d082b35c72e680f10ead7c90c2922aa3798ee280543cae0e26", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go": "23259d2df8876351e74702406eeb0be7af48abccea7c3d28c5ffb4a1499e1f41", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go": "84367eb7c3af6e58f4fb8bdc3c71ddb8a3f0c3144d05474ea8114e9f6deed2fb", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go": "30b1eab93ec8c5189f17047fa974b9efbc0cba13b63ab7f40271ffbf606242b7", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go": "31ae1f4ca2c4d0acb7e389b197ff79e6659ad5b4ce692bfe0725cf5e555b1b16", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go": "ac6116f0c625db3775835422ebaffec8691ba5360ccdec990ecbcd5a4c3f8f1b", + "openmeter/ent/db/chargeflatfee.go": "9a617bc343bb5fbe82e7a7f9e58a1b3eda48e8da1d0120dd2e23c56b5c0e3283", + "openmeter/ent/db/chargeflatfee/chargeflatfee.go": "44af8be92bcb789c4d409572f7d4307f114b0afb48662c3bd2482c84005eff33", + "openmeter/ent/db/chargeflatfee/where.go": "8bccfab8056045f36dae01c0c1f297d16f6ba1f680f09c8064edd7e80a69f6df", + "openmeter/ent/db/chargeflatfee_create.go": "ee740dad4516fdb799cee556cf87f377f6258d22351f54bf593da0ea33fd4a7b", + "openmeter/ent/db/chargeflatfee_delete.go": "585f3591e86f24b20f317afa5357a9ae3d05ad1e6b8f8dd9ab3b376d260da18f", + "openmeter/ent/db/chargeflatfee_query.go": "7a8655e02a6df351e9dc31d997305bb0c9e2cdb815485d7c24288029a6642236", + "openmeter/ent/db/chargeflatfee_update.go": "125dd6738595c0b0abcc65936b97b07e4d7b2054e1740d42d5e82b76869427b5", + "openmeter/ent/db/chargeflatfeerun.go": "d5847ebebc40917568066a1b0128163138dc849bbc4dd88dcb33e7e2a4abc002", + "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go": "7f055cc15c1e489eaad3fb06485327129abf120e1b23945af3ecdd3e60a46095", + "openmeter/ent/db/chargeflatfeerun/where.go": "256848ee5485f5b2410e4f3e59f9c2748db44fc30d4e6c104fac81362be594c1", + "openmeter/ent/db/chargeflatfeerun_create.go": "7c548a53602e3c9d4d19e388ad01d0057f7ee2f256afc6110005a13ec04e7937", + "openmeter/ent/db/chargeflatfeerun_delete.go": "af57490b2e2ceb194ec4a5e64f8103d61d8592e74ed536a38fc5453b700c2825", + "openmeter/ent/db/chargeflatfeerun_query.go": "418cb036461d8acfb1a6d3061061efb54eddb677c5bef545e2ef0157ecb2237c", + "openmeter/ent/db/chargeflatfeerun_update.go": "ed2df803b401e1fa8dc809b152c23a4010081a900e5590536cbf64ce4598c17f", + "openmeter/ent/db/chargeflatfeeruncreditallocations.go": "7a0dd2600af3febdea571780e543dc09a5b5841dbc622f3aba33cce874beb242", + "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go": "21385d7fa60ad6572dd3163531540c6c2ae1d06dd45f20df882786d43c75cc02", + "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go": "985116a9bf9f094f4feabacd20cd0911b0aacee3d4156fcbdf8982f073849200", + "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go": "bb9b704ab237836940981d49d6821ed4ec3909499d216d6c9afd48b895913202", + "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go": "b2fdc00fdb6c6d6dd05236c848f67588cf0c13302a57f0b0687b8c085c1e30d9", + "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go": "32af23ea5f21912ddc40c5d456f1b3254962d2d5083a5ddea437fad822c90dc9", + "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go": "406f0a1dafbe758ff07529bd50bbcfa81371aaf9a3ba0fd649fea5ae0cfef3ed", + "openmeter/ent/db/chargeflatfeerundetailedline.go": "c5311f79fd634060a89aa75e556824832bf6c4d563ed32acdf19d361e7242c48", + "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go": "12c4027faf053e8d6486050dfc07556816e283ef12c15ceb92e574624bd3b09c", + "openmeter/ent/db/chargeflatfeerundetailedline/where.go": "fb6a1d52fcd8c69344ad7f92e1f53d7f5494f845645d06cc7f862e07da891715", + "openmeter/ent/db/chargeflatfeerundetailedline_create.go": "738a12c930f27e9daf0ffd71554eed5082a73c354146657275df7b795b251b92", + "openmeter/ent/db/chargeflatfeerundetailedline_delete.go": "7c1c8a69eb87a057442a4ad3b8611c517970d80a8c6434e7ef83def1d4ee91b4", + "openmeter/ent/db/chargeflatfeerundetailedline_query.go": "e012204ae5eae5a257ed61725df86a9759f7c1d0242f35d68621917bd74deef4", + "openmeter/ent/db/chargeflatfeerundetailedline_update.go": "51ded484e02c21e6c3a1bdeec493e4a5ae857aa136f028b1619f3c9b11d48ba0", + "openmeter/ent/db/chargeflatfeeruninvoicedusage.go": "90baacb600845d3ac09220396a57448c6005f895939656eab8d463f55c3a7309", + "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go": "c05404ca8d2ef346950601d9e006b5c3e45524a834fb0f4e7e6e5d6656969626", + "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go": "2aa17facc12fe94d01b61caf7aa89a074c679b673c55f1c9ecfd8e45d8f8b232", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go": "0010b29343248ef70fa1951a252035aef7f019a5ecc4144d58408f2b9a424473", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go": "5effd46c2e673c5fee96a95aa52924000e7c42bd524a361ee63e56d1da055f99", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go": "ef31c12337e8a651b9acff40cd21d8899309a9553c86dbdac3df8337b9ca61c7", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go": "ced32d35354dcc193fc4f4358ee053c0a610618e4cdefd99da47a6d4f6f72778", + "openmeter/ent/db/chargeflatfeerunpayment.go": "707991b454ff74c0a5f7501710bb62549f03538e4d47b10f52fd225639536e08", + "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go": "dbfa22ee9f4056f4db63924d1e94f683fc05367fec366196882f36e4456f8f46", + "openmeter/ent/db/chargeflatfeerunpayment/where.go": "a420e30913d40a5e09dbdf4f87f5eabc7ddb6d1c724727fd50820890a6c30027", + "openmeter/ent/db/chargeflatfeerunpayment_create.go": "6aa2ff350a1a90a75be3ec731361dc11fb3fbf9a92f92910cf0e8ab60ca9927b", + "openmeter/ent/db/chargeflatfeerunpayment_delete.go": "561abb38aee1419d0b9824cd62c662e85e73a40489b98529aad7ffd5d9cea518", + "openmeter/ent/db/chargeflatfeerunpayment_query.go": "b7afb9d455a3cc20c60aa1e881224254830ef0ff07803a248dcaefff09351d65", + "openmeter/ent/db/chargeflatfeerunpayment_update.go": "3eb2669a7adae1c478972f2ab094203e449388ef0dc027c37e7dcebee2876384", + "openmeter/ent/db/chargessearchv1.go": "58bcf98f731786b4625abd4b622baf08c1a11817ad59e0d291fd2ac8b3e35676", + "openmeter/ent/db/chargessearchv1/chargessearchv1.go": "cb8f77de0427fef13146ef89cc8f79b7ce0a66dab0f7dc87e24ea53e868aa6a0", + "openmeter/ent/db/chargessearchv1/where.go": "4bb8ea8e65a3d8b4dbdf066a3c95330546fcf266fb350b76181ef66ea6576618", + "openmeter/ent/db/chargessearchv1_query.go": "3bb724f3bd2fb16abdf37e7275a3e378d79b69b014a47538e6cfb364d75cac8c", + "openmeter/ent/db/chargeusagebased.go": "adf24bce0da2f3e6ac62329d347a46806034b898424699871716e5d6f0415fdb", + "openmeter/ent/db/chargeusagebased/chargeusagebased.go": "615d1201ae764ecdd9bee9575233865b814688f07b78a627f31be0492ba4143d", + "openmeter/ent/db/chargeusagebased/where.go": "9c1a88351e0e4587a725e0784d72a873bcdd8cab6031b1c76a4799dc47afbfea", + "openmeter/ent/db/chargeusagebased_create.go": "aa648ba3b524dad873d3a0b0f8b9e922d6906ae519016ec8d0ca91c490599a8f", + "openmeter/ent/db/chargeusagebased_delete.go": "5a3371c5cb863a5dfb09e1b5aa9177f6d96e27fdc89d404fdd66720490920c54", + "openmeter/ent/db/chargeusagebased_query.go": "4b50dcf411cb66dc47a7e1fe006b54f4b566883e43848d809fbfff9f4b2c4c2e", + "openmeter/ent/db/chargeusagebased_update.go": "84e4b51d56cd457629db7fb299c66ecf411553e36f2b250ee969206fda331652", + "openmeter/ent/db/chargeusagebasedruncreditallocations.go": "7aa02ab1efd72b6908482dbdc43b2321d872adb2a46434b7df5a956de7d427c9", + "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go": "b0a86d91180ed725a1e2f0e8ee0fa235b77d31c7120d30caadf4dcdb0d3f2be4", + "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go": "4f357c2875755f42ee9d635b752aef1553336a24b351d73528720dbee3b0c684", + "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go": "620e102c123c6d4524fee5213e69fbbedd6dd8d830176ec70ad4a81c78a29587", + "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go": "466a6ffea6a3b57c04921651eb9f7580815444c0a77b72c9f75f21f73d90dbcf", + "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go": "1219f2799ace18c1498f4e91f78f19c4b9925bd831f5bc3d712429cb731a6271", + "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go": "7cf66bcc8dc1ab5fd71051475c91b3f94d502b06107da6df875551a25a1a2c3a", + "openmeter/ent/db/chargeusagebasedrundetailedline.go": "157c4801fa810bf7bb057d03ee3d609f9e536503a1c4fae0c56c10ff461e9064", + "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go": "260d6f3c09f4d08a6abebe408a02410e06c06800ba0cf2bd74b78e0e9d8c451e", + "openmeter/ent/db/chargeusagebasedrundetailedline/where.go": "9242285b6d61547a541a5b1395d4c8ff589dd2182d478e158b47c897f7a84c4b", + "openmeter/ent/db/chargeusagebasedrundetailedline_create.go": "572e70f6260d2ffd781a4d9e42803cc56c9734ea13a27740e65babfa3720c0f9", + "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go": "864663a58c96612d1d1156441b0d5d1c2547d57cf923f9fcece023ddde515c36", + "openmeter/ent/db/chargeusagebasedrundetailedline_query.go": "06407e16c515ff9a7637775911ad24b5a44932e1791f9e13a72447b2573d9b51", + "openmeter/ent/db/chargeusagebasedrundetailedline_update.go": "b3c8e744a67ce40ad0163b41ec0e7eeb7697ff79994cd63086a9b16913e933e5", + "openmeter/ent/db/chargeusagebasedruninvoicedusage.go": "b42260e2b52f5fe2b39876c30b0ec71d00e96813e42a0b830571bf0e0a00d148", + "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go": "00ce030a3f8e25daf805a4295a4fbd5e33342f3ada13b8caf91845bcf561536e", + "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go": "1a7fc82f80e7c960a88bfed2b0fbe14a15645963dc9391d13696297c61659587", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go": "2614e1e13d580478b8a49ef1c158cf221bed61009e36809c35bbb46450b6d83d", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go": "b02c2b0aea99f38d2e866e6c0a72c716229f08a620a9d2649e9eacebfca9fb4a", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go": "a407f856338e6cb8fe739c824ade5f14353691f1c49f3e27eed35781791a0e36", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go": "0f162d8149e853574d2bfae034643e74249db912ce988f0659ea475e1c19d827", + "openmeter/ent/db/chargeusagebasedrunpayment.go": "6d5517eb4f1dee0f7aeb339d6f083c7e55a77b46b2741d8358aa4e0b0eb340d0", + "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go": "8c503b772fade85556f08a853b0ae840694172d9c5cef34c017adbba3ddddeaa", + "openmeter/ent/db/chargeusagebasedrunpayment/where.go": "28bd6e135177c43b0bc6a24272d0baf751e49e22435dbede252fb5abc82f9365", + "openmeter/ent/db/chargeusagebasedrunpayment_create.go": "417b215010f6fd9d0442fd8fd56662a2d52ba8560ca426c14df231df3f4eddd7", + "openmeter/ent/db/chargeusagebasedrunpayment_delete.go": "cdaae84a2fa6fdbcb3fc241abcb7a22c55dc3c9ffd217f4527ce3e03fd3a5463", + "openmeter/ent/db/chargeusagebasedrunpayment_query.go": "a797211e5cad37f2eee0ef94d7e35fe87f28f5bae0dd9496ab8ff6fe6f85bc60", + "openmeter/ent/db/chargeusagebasedrunpayment_update.go": "5a531cdabea9888661545695a0d44839cd097ac63e33c77e62f42391dc177374", + "openmeter/ent/db/chargeusagebasedruns.go": "8607f403c66246a66be33d28a717c66e3e737a7ac10d093f7e9177d40f2b0a3e", + "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go": "1218397bc2fdf0f17a38b78cce94f2f3161df96f3f0a8218de8dac14693f68a1", + "openmeter/ent/db/chargeusagebasedruns/where.go": "707bfa20dce04c8b15110ff1f18cbd0486db21c0ae1b3025fac73fc0de462eae", + "openmeter/ent/db/chargeusagebasedruns_create.go": "4cd0cf4537aeb96ac3f999e66b573fd0d5e89448c85e97d5312c8fe9eef6c193", + "openmeter/ent/db/chargeusagebasedruns_delete.go": "3d47182e8c7c79bd7bdf34014843e43255776f1977b558d8f7a5d60a10791811", + "openmeter/ent/db/chargeusagebasedruns_query.go": "a2de0a774fa27fc6a9a9d33fa0da4f7903b56a35614b77ece1a98e35419cb6bd", + "openmeter/ent/db/chargeusagebasedruns_update.go": "65339c4eccd3514265df599c8aa0668578e96237b14eda1af23a7f29034a69a3", + "openmeter/ent/db/client.go": "82a29c2dce7a53e836246542e50ca1ea1aa2fe50e58486e6104f1ae84cecd31e", + "openmeter/ent/db/creditrealizationlineage.go": "507cb936c64b0f80b8b0a22ede9f8192928aeb3bab37e4352c1041d142276def", + "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go": "79969cd22472ff20736d7ca7810800a88ccf56ca7fc7d96de4d31ece61d249bc", + "openmeter/ent/db/creditrealizationlineage/where.go": "8ee327875e5158d1c1621f06945c51f2e2ffda26e17a4872ace422186a74feea", + "openmeter/ent/db/creditrealizationlineage_create.go": "6ceb0ab56a3b9a2408ae935ac558f1e3f4dea93686a962d385681aeeef27b04d", + "openmeter/ent/db/creditrealizationlineage_delete.go": "a2cdf561c1c1aa22e65e183677573f0f30081605d8c766bc3797d23230b51bb4", + "openmeter/ent/db/creditrealizationlineage_query.go": "591459b52e835093642e211bef7dd46e9d3fee58f88b64669183affb6ee3bff0", + "openmeter/ent/db/creditrealizationlineage_update.go": "b4317e7deabca10d9dd239c4c901fef0de291954e67a0b5ca0909a7f92771078", + "openmeter/ent/db/creditrealizationlineagesegment.go": "82b3e40549d065f527926950d1a4aee8a48c1a88cbf1a28162944c7c90ad2817", + "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go": "619d1e514032989cfe4dde4b7a77d6d5ac10d51de96d5160cfd534567dd377b3", + "openmeter/ent/db/creditrealizationlineagesegment/where.go": "97e2e7a04fca3a4d5723921b85fbf92e2299bf4cbd5a420b5b6da987485c80de", + "openmeter/ent/db/creditrealizationlineagesegment_create.go": "dbf4e52bb20e20bd54694dfebf7652a42a1fd9a33742324faa9dc586589cfb22", + "openmeter/ent/db/creditrealizationlineagesegment_delete.go": "2b1b8d60c377a58ea508ce12e1fb16d6dece03434bfa812dbd8abca327b5a4d9", + "openmeter/ent/db/creditrealizationlineagesegment_query.go": "bab2e227636202fc10e891f6305a1d3a8db67c0ee64849aa8d32a7a0915039b0", + "openmeter/ent/db/creditrealizationlineagesegment_update.go": "9647318ff8adbd190a8751dc1f57cfb53d0221b4f761eca9dcfaec3201c2b473", + "openmeter/ent/db/currencycostbasis.go": "5f6741e6fc39d62183a4213c65f9cc8d3added445bf1018908c87856c1902838", + "openmeter/ent/db/currencycostbasis/currencycostbasis.go": "2a4c159a0cf48a5a54e94dd720e57b9e262dd386758822624e74a2d77fe37f95", + "openmeter/ent/db/currencycostbasis/where.go": "42e9d85f6b2f8f80a4a8ad11556c0a3b6f66641dc3b571d16fe81faa35805c09", + "openmeter/ent/db/currencycostbasis_create.go": "9d8e1ebba80b1a6dafcab096c0c09fae797456347675a775021e7a82d3c64cbc", + "openmeter/ent/db/currencycostbasis_delete.go": "466f97fd418e473de1001561b3a4dc1b83c1114dae4357958c5f748b6cd68fba", + "openmeter/ent/db/currencycostbasis_query.go": "93071a8718805c197f17dae00780469a715b90871c55370c2298d86654ad353d", + "openmeter/ent/db/currencycostbasis_update.go": "9f18ae1aaf6bebc803ff439e547f6a5f424e0d7e9bd4975fadf8917a09654061", + "openmeter/ent/db/cursor.go": "95049ff1401fd49cbee9d21c1b8317b3f6fc48a7e2cef64910e578e7bc9de163", + "openmeter/ent/db/customcurrency.go": "5c9d67d4463e9f969f224690ad96584da7f0c7795558f372af1628c59f1622eb", + "openmeter/ent/db/customcurrency/customcurrency.go": "3ef12a409abffaa02abc476d53711892e325cf30c6162d8594138d68e3aaa504", + "openmeter/ent/db/customcurrency/where.go": "110ebe6c41ff1a0b168e186085d42637db1a6d3caba4ab28ff2db5c73e704865", + "openmeter/ent/db/customcurrency_create.go": "3da499ef06753263990f98ad14ffeb3d2252a85af50b323aae6417fbc42fc752", + "openmeter/ent/db/customcurrency_delete.go": "8351a56bd788b4d930b6cfa32fdd2134f1c524a06c832c27107e0f94f42a0b34", + "openmeter/ent/db/customcurrency_query.go": "90e5d8d63a9bcb7d3820c63cf8511a1b52431e110172c42f832cb691983170b3", + "openmeter/ent/db/customcurrency_update.go": "1357fe0726cd9669cd3c2e6b220468eab8df35489865d88ef4679dbb4877f386", + "openmeter/ent/db/customer.go": "218711b60fa0cc7b9fb4b388f3b59157e2b00ef91a8a556a9cc08c110cde9138", + "openmeter/ent/db/customer/customer.go": "0ca84424450dfee9facdc1b7b2fe931a2db821c940be6b1f0775baa56f6e26aa", + "openmeter/ent/db/customer/where.go": "27f47098b73c7b0ccbef0351c7a0d5cb6a388a797be2825a6c73a1171a2388cb", + "openmeter/ent/db/customer_create.go": "39aee07142fae825e8775ee1c94082f636ab8b5803d699a54575962f654f7963", + "openmeter/ent/db/customer_delete.go": "ff44c2a760f9da76e593e7f740af9ac3a12e8d9b9c3d03972d4669c892ae3efe", + "openmeter/ent/db/customer_query.go": "c4d2480c1df413667b7bd95798a73c718eb5f61431f986ce8b5c34b1f3090da5", + "openmeter/ent/db/customer_update.go": "440d7fd07af4822ab640edf63006e436a57decb07423ed40942cf481e3a5fcd1", + "openmeter/ent/db/customersubjects.go": "246fa10d5cd1a053c6f5985ed0c2d6b73982d9282af4a9411283922fff08e555", + "openmeter/ent/db/customersubjects/customersubjects.go": "a1123ab031f7ed50dbbddec6136c7c2ecb2ee9780da33889246718a350ee5192", + "openmeter/ent/db/customersubjects/where.go": "826cccd54efde6f6269a30e77757f4591c2d5739c2c9b5d4c489a88418473aae", + "openmeter/ent/db/customersubjects_create.go": "2ae1c4bc8a0819d761a5904f6888decd192f81fb6211e8512a36195400f4080e", + "openmeter/ent/db/customersubjects_delete.go": "f11cb45e3d625296a6bfc28f7a008b6082427e129a1658fe24f36fc020553593", + "openmeter/ent/db/customersubjects_query.go": "475d24d3365931ca448a87a227dc9419a7f16c339be7f6d33274a514b4a4f3b1", + "openmeter/ent/db/customersubjects_update.go": "0b3a827aec1d6dcc196fdc126f49b2482f804abca0634d1258e39de86153ba3d", + "openmeter/ent/db/ent.go": "890c83909557a98d4b06d6dcc8b9987f6f3294c57b0ec3895f49e8527e464054", + "openmeter/ent/db/entitlement.go": "0def3a592a48a66982b9887d8cd792a665576f715452b02f45c62ed3bba42122", + "openmeter/ent/db/entitlement/entitlement.go": "0918711b33764f3a2079c76922d240d3b24fda8275f00b3f03aa31b0d5bf809f", + "openmeter/ent/db/entitlement/where.go": "59fbc2ddec855fb4e9555d7d9f4a2ec68c6949cbe98d0c883c4675714e3c7b1d", + "openmeter/ent/db/entitlement_create.go": "356df1a1abeb7eb8414a21a79568fe7b658d8e6f752d9f67cb5c69956b2b495b", + "openmeter/ent/db/entitlement_delete.go": "90345114a8d93cd91abfe8be48f43f5301b4dd653467cd369973634a45c1f216", + "openmeter/ent/db/entitlement_query.go": "9c543d4b686ce397b42a013d939cddb0761fcd30d6cacc5af55597c3c254a30e", + "openmeter/ent/db/entitlement_update.go": "98e59939950983533e1b9b71919a940529624f61f5cb1aff65bd0f17129ed13b", + "openmeter/ent/db/entmixinaccessor.go": "ca6a7f094224a38d132fb8a05390b692640f0a91840b6277b6512ec18041dd50", + "openmeter/ent/db/enttest/enttest.go": "aafc937c6e64662e6d6e96bf2e48cfbd89d06c61281fa05f97d21d39fb76ce08", + "openmeter/ent/db/expose.go": "4594bba2741706c3b7a44ff5c9bcb5aef5f0d97d4e50e1227b6723ed7cebd998", + "openmeter/ent/db/feature.go": "5841296c47213736aaa5846416d4ee24b1ce938c88578af44ab63bcf51b7b069", + "openmeter/ent/db/feature/feature.go": "6d6b5314f983a488de5b063eed33483155d9380c75d4762785f665a1af8a35a8", + "openmeter/ent/db/feature/where.go": "7187e71d81d682c17df71ee05738104e9addb55597f419bb643fdd5f14819322", + "openmeter/ent/db/feature_create.go": "4cfebd152001b2329d0612fc9bcdab37a86847509381815e4fa9d75c85f51ee2", + "openmeter/ent/db/feature_delete.go": "2d229e2e9a6565e05feebb0854d0dc4a1af1d0132a5f1d0af953b4f2edf042b2", + "openmeter/ent/db/feature_query.go": "50bead7f5cbbbf202f77c0296ad8cb13477ff3453284761ba7ea9899b3f09677", + "openmeter/ent/db/feature_update.go": "6699b4b9997fa7e8dec231bc0dc0cb759b437ad317791a22cd7267befd01fcce", + "openmeter/ent/db/grant.go": "a07fa1ef0e073e0fd1f1f6e1564e8251450f5f8c56f2201401da0faad3cb9dd3", + "openmeter/ent/db/grant/grant.go": "616a5feb028d70e7fea64182ff19ef434ee6ca97686753af633e66bf59f5fc80", + "openmeter/ent/db/grant/where.go": "c0a718c672fd41a27fd3561f07509f2216a52aaf47a68a02082a319297d2ae0e", + "openmeter/ent/db/grant_create.go": "eb437ed70c597b9f680243e7aacb3026982bafcef344c389c40ae4442724858f", + "openmeter/ent/db/grant_delete.go": "ff14dea13d2c7c70d384d9e24d18cde6c5b3c4920a335ebb020fac1db26e1356", + "openmeter/ent/db/grant_query.go": "d87794f85d02ac3d332fd216e436e68fb691f507b710e5fc96922740efe1b37f", + "openmeter/ent/db/grant_update.go": "d98bbbc26543430ea768277f98472f28c7a48f21ceea4a0f0699b27d4e044399", + "openmeter/ent/db/hook/hook.go": "bab7ecab2406e4222aa21ff9b543e8ed7d04ac11a8c477613dab0681db180a60", + "openmeter/ent/db/ledgeraccount.go": "dd643571bfe442a3ab37b5dd6aea30780792129e608af0ec0fae83dab9dc76db", + "openmeter/ent/db/ledgeraccount/ledgeraccount.go": "cdcd695547aebb8aca6e821012ad9b1d2dc8249df9850a2f81a2cef52175e1c6", + "openmeter/ent/db/ledgeraccount/where.go": "b0dc784f7b2f09281f5da05832726693333f96e45a6eb77a0cca1b4a6a15f99f", + "openmeter/ent/db/ledgeraccount_create.go": "8425f9dc4e95b71cdf77f44954e1aded3316a806e6b4cf6c031f6a89ddcfcea0", + "openmeter/ent/db/ledgeraccount_delete.go": "21f05ce931d4c7638c2430dbeeb852ad55ed13040d6521512085d39dfae3f249", + "openmeter/ent/db/ledgeraccount_query.go": "46c82b89ef10a00ef1823b61777f3cdfd6de6d8ad19e9070d32769b304219fec", + "openmeter/ent/db/ledgeraccount_update.go": "8fa520fd0341c6c1f813910d8147df20c20634cfcc1872c496fd6c0f953742c0", + "openmeter/ent/db/ledgerbreakagerecord.go": "8cfcc42bed54a7fa0dcac699d1641d9930a0a137f56a1cd159a35b9fd48ffec2", + "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go": "4111242e73e1617ec5fd3e2c476bad228135af47809fbd06311348b82a1597c0", + "openmeter/ent/db/ledgerbreakagerecord/where.go": "8c94f58ddd0ef3bae55ce3e0484d6ce1d01023964c32b99279f713ef28c2ec42", + "openmeter/ent/db/ledgerbreakagerecord_create.go": "442732127447ade95c750c053b17ce51ff1eeeaae2a66da9a3a6986727ce5e75", + "openmeter/ent/db/ledgerbreakagerecord_delete.go": "8038a77deb9319c57c71143026f54024a6d676fcd65c6c70c13e15b4b98597af", + "openmeter/ent/db/ledgerbreakagerecord_query.go": "a87741ae1846bc6357d2d80874ea147d19b1efbecf44bfe7df558a924c31bd31", + "openmeter/ent/db/ledgerbreakagerecord_update.go": "fbaac950a7ac32136a0fa1318cba969b2dd263e0600176a08832dd2f8e46d1ad", + "openmeter/ent/db/ledgercustomeraccount.go": "d538dce4071f3ebdee8b8e256b16e3efd7834a3de819687b9b5806ba7b761e70", + "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go": "de599706d0b537a8891d6a7b3f8c1cabd9e15e0a865f06b89c1949eae3bdc82a", + "openmeter/ent/db/ledgercustomeraccount/where.go": "ef03af9f67264540f4b04414415dbec63158f6fd5a04c325b0f9683b84c49073", + "openmeter/ent/db/ledgercustomeraccount_create.go": "4e6fab44c1941f0668e2ab94f5db9a377a194f385123a5a053521a4c76fec59f", + "openmeter/ent/db/ledgercustomeraccount_delete.go": "e3719aba048c530dc79e153ff4de60d73b12f7d7273d748e22d52a8b1c2dacc4", + "openmeter/ent/db/ledgercustomeraccount_query.go": "30c30e1d1235df9f9db1e9075f2a107c2ba512908661b895d9bd86339a17c241", + "openmeter/ent/db/ledgercustomeraccount_update.go": "af9d07edda95cc5804d225f012299db3adc0e5d7db1c8028b73764b64a0e130a", + "openmeter/ent/db/ledgerentry.go": "5936cc47fe3bda175710d6d3167e3ee959b5dd2c48a9ea246fc747be2782bbfe", + "openmeter/ent/db/ledgerentry/ledgerentry.go": "e31dbf1c9e041c89675de473240f32b737274e33261a7251b5cee6f0ecd719be", + "openmeter/ent/db/ledgerentry/where.go": "0693072779150e7709df58a192115ba3918b5fa7faf59593b4afe7d45ab028eb", + "openmeter/ent/db/ledgerentry_create.go": "858ce373019ed324ae6d14a6daa49c83cba38e4290478b0ee41d906d06145f90", + "openmeter/ent/db/ledgerentry_delete.go": "0ab52041e4c6f97f45507cb57ddadf385b5504198bb60fa621b525dc9263eb16", + "openmeter/ent/db/ledgerentry_query.go": "099167cb2ba63079dce920dfd16ddbd13768a738c45eac348cfa3686182fecc0", + "openmeter/ent/db/ledgerentry_update.go": "51bd3b6625d0a989df978003d01d8d5c835b6ade781c3f914ae84502dd08ca72", + "openmeter/ent/db/ledgersubaccount.go": "79a21059d50f8efb0d6a6b6d07de4a5c8e8595f6773a64c882afeb32ad63e3c3", + "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go": "45ccd7a29418068d8f78b1438f8f8bd5727f0ee8335d382b23cb30e177c941e3", + "openmeter/ent/db/ledgersubaccount/where.go": "b30fc44004cc4e0b0caeabe08da34e8a545df9a5ac68e50934b029a0cc9e9917", + "openmeter/ent/db/ledgersubaccount_create.go": "367c1856a36027a9647dea136c5ff3ee997c68e8957d4ed1ecddcfd49304e1f6", + "openmeter/ent/db/ledgersubaccount_delete.go": "bd434e7e9a6dc096b786f0e97ba0f3951e9fb85a79fc2d2ff5655e378eff8451", + "openmeter/ent/db/ledgersubaccount_query.go": "5cd3f21761c8a66400d9e9424f34c028a5d9e79218d57877fbadb3eafa27ad2b", + "openmeter/ent/db/ledgersubaccount_update.go": "6df6cd58fd75efe88cb25618f6722cb8df7e7995122feebd26b03d62ea741e83", + "openmeter/ent/db/ledgersubaccountroute.go": "fc636cb26ed26bd9bb08cae3a6fc764f1653cf3cb89ec48f53c2883e16bc1c9e", + "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go": "3de0c271a391cffcebbdf2cb94871361f756a9b1a2990d2563cb70946376aea9", + "openmeter/ent/db/ledgersubaccountroute/where.go": "ca60b77087f7893e9df06284c65f852324a271594d60e7b390cd48990f6c2a75", + "openmeter/ent/db/ledgersubaccountroute_create.go": "a1d645f48125e52baa1c2ac0dcc62240117180057ca5334ca6848388030b525e", + "openmeter/ent/db/ledgersubaccountroute_delete.go": "8668cb30bf157b1457eeaa80dbc98df31f58b9973f5f1b5e31911d94daffa91c", + "openmeter/ent/db/ledgersubaccountroute_query.go": "b1c424e24e8a75754300bcb0aae499e0cb624b96e13b3049f3acf9d890d14b71", + "openmeter/ent/db/ledgersubaccountroute_update.go": "9e48cbc7012642eca3504d5d52df6d5ae84a4f6ae2d93734eb8e7b5de960146f", + "openmeter/ent/db/ledgertransaction.go": "90d59344ba278a952a7230c4b5bbe8e2bd22277f1620ced03eecf37e2201b0df", + "openmeter/ent/db/ledgertransaction/ledgertransaction.go": "d9aeabf6527f8587b4221d32a242ca6e3b83a0034b677f0565ca365dc741134a", + "openmeter/ent/db/ledgertransaction/where.go": "69f198d25614f987be960dd18d20db18fb89561423fb435780a47f235cc3dcb1", + "openmeter/ent/db/ledgertransaction_create.go": "2f7226f416ff2adeb66f88a01989a173d463ed164a0c03f40231beacdf70ac38", + "openmeter/ent/db/ledgertransaction_delete.go": "3ee7f821c32b6ddaeaf890ec4c03f804cea85ef440c192fdf89ff103d5f2b4c1", + "openmeter/ent/db/ledgertransaction_query.go": "936d24cd14c315ef391c75cb33fba680d8619c22281de7d0c18e939eb9345302", + "openmeter/ent/db/ledgertransaction_update.go": "fdf4ac9fbf6dd99743bb91f7d0ad72b5e4bd96ce00b2d2882f89885e5de580c3", + "openmeter/ent/db/ledgertransactiongroup.go": "8df43e6bb9c93bf41deb74b37bf0be4b9a979f5ec688d09a5882a79b3a041497", + "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go": "eb868da5b6542f94bec3c22a379b371ee2291920c8d892c368e458136a22a183", + "openmeter/ent/db/ledgertransactiongroup/where.go": "5ad1a56274a940e4cf4a064eb5a21a212c960bc18c30669c618ac6ed38594538", + "openmeter/ent/db/ledgertransactiongroup_create.go": "d9eafc61c329aaa087782dbb09ab8bd0b6a20f65cece9b1e8c21d49fda99cf9d", + "openmeter/ent/db/ledgertransactiongroup_delete.go": "203c482b25b36260660314c2c56a77d65502476711e60baa18527df99b9019a9", + "openmeter/ent/db/ledgertransactiongroup_query.go": "9c51638a7a25419e949af1d9b2fa84a33796bbd5cbc090b178ebc903cf8f1767", + "openmeter/ent/db/ledgertransactiongroup_update.go": "1dbf937e996290bc1b3cf74f621a0e84a323b03cbeca239cdda712f07634082d", + "openmeter/ent/db/llmcostprice.go": "7acf99bac320bb5318886e817bd8642bbde809e9c31e6ccde4b06fd209530897", + "openmeter/ent/db/llmcostprice/llmcostprice.go": "0f0a55095ade73d3ee5f8210954ac44c919c34369405085daf07451e0d126c1b", + "openmeter/ent/db/llmcostprice/where.go": "505cd1e53c705120bf0737d358cd3b4edf587e3801ae04863e30d7e0b77a0cd3", + "openmeter/ent/db/llmcostprice_create.go": "06ab4b43443a3ae1e03a8da71932a47464d215a30de13e830007e22d122b9092", + "openmeter/ent/db/llmcostprice_delete.go": "a73bfb6049de6de5777cfbff72c751ef27b5d1d122001817ea5e7c61e2e63858", + "openmeter/ent/db/llmcostprice_query.go": "95152c71bd7f3e0658454a11e34df26c1e7b3bc3356ad4b1ee9939a82aa86c9a", + "openmeter/ent/db/llmcostprice_update.go": "589852877a7ebf2f256fa43999aa913fbb7ffa5470259fd421ae013495fad9b3", + "openmeter/ent/db/meter.go": "68392f4327edf8ff93403eb45070a624357e877d20ac2ed48e94db3e9e63d6ff", + "openmeter/ent/db/meter/meter.go": "1d2dd836c57f94b6a1648f32b540d34ef7d8e0b8e73ee570e8e688d7c7e13964", + "openmeter/ent/db/meter/where.go": "20495a6020732ac022fba228bf9ea7db87f47662112c462543a9e53f6cb83254", + "openmeter/ent/db/meter_create.go": "559897cb86513cca55c873de7845b0f9f4fe61537ca6a5a0659f1b107200d06c", + "openmeter/ent/db/meter_delete.go": "a2c4c58cbeb44914b3e7e1f22f450505eaa0d6abed117f01a0d435c29581c736", + "openmeter/ent/db/meter_query.go": "9c37e8896dd1202415676026b277dc7a8bca5b0d4981f7d511516dac39687d25", + "openmeter/ent/db/meter_update.go": "3483c9b6e89e505789653a748fa101319ffea930cbdf316582fb0efd4cf2ba40", + "openmeter/ent/db/migrate/migrate.go": "b30a5f652b6317573f27afb75337d7424aa84d1226bd31cb1d565372cbef9249", + "openmeter/ent/db/migrate/schema.go": "c83581ee7f7c7aca7aeda4ef0e16eef009833c98cf60812c252bbdc90245054b", + "openmeter/ent/db/mutation.go": "7fb825a416ddc014dc68d0f219079187fb25f97b99e8bdb9e7999d7b1946c928", + "openmeter/ent/db/notificationchannel.go": "b972de99034396f012d5901d464a55e9727d8e7a37236045f6335f761a066057", + "openmeter/ent/db/notificationchannel/notificationchannel.go": "3baa39d39245a3d7a2afe3345ccce4e49609aad0952969e43847dd668d5c72de", + "openmeter/ent/db/notificationchannel/where.go": "ee3be36ec85c82508ae3101dff7e5a0af250c44eed3e733b83cc1978461471fe", + "openmeter/ent/db/notificationchannel_create.go": "e37a7967740fbc1cd579cfe58746f9a2bc50e3bce2c56af3fe0de9cb704b9948", + "openmeter/ent/db/notificationchannel_delete.go": "8a237bc9c6c9b0d69fcbc9c9b05d20f0ec0651c55e9b8a35827155a11355abf2", + "openmeter/ent/db/notificationchannel_query.go": "43912ba6a91eec9ec70e133dbb43a08b3f78f88309cd2fc9b97fd96c9f21bd5a", + "openmeter/ent/db/notificationchannel_update.go": "65f3746fc9321c6056af3827772c300bd3f70691d67604aea641dd95cccea733", + "openmeter/ent/db/notificationevent.go": "2083c95568e3a95d3b52ccbd42cb3bdfc84bd7d0a971390ec89d44a56ad5f029", + "openmeter/ent/db/notificationevent/notificationevent.go": "6e929446757462c326fdef3377ef079b2108bcad9b1baacc4ecd201af0ee45dd", + "openmeter/ent/db/notificationevent/where.go": "8cdfe79302f17c827c30ef518d2446865b5f0ce1f625932bb30e759de41e56e4", + "openmeter/ent/db/notificationevent_create.go": "7a2af7f640f2d3728f856f69fc6ed2f7dbf574ab2af222262187df09db78db08", + "openmeter/ent/db/notificationevent_delete.go": "b6cc4a8a3332b66d440990a04d2557f99e7008a94dfda7e9ed80882a4d636e33", + "openmeter/ent/db/notificationevent_query.go": "8bf3df9ab0785fa28c168038253dfc5b484dd49f436b7d56a2edb9d5d0abf735", + "openmeter/ent/db/notificationevent_update.go": "22b201a6718bafa4dfe6f011b9c2a201c244d47866178795057de8df5d0dae3a", + "openmeter/ent/db/notificationeventdeliverystatus.go": "2a91c9266d5db06fd1fe02dba05bad24a622905e46a8647b62238bbbb4f0f1eb", + "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go": "72448f33c2116b6e3a7d08b85d9075079fe1ba8edba6099e160e47cdb786dea1", + "openmeter/ent/db/notificationeventdeliverystatus/where.go": "7ddff96dafc2d117de587ae8128acdf7cdf5b739888f223a83ad0737011bebcc", + "openmeter/ent/db/notificationeventdeliverystatus_create.go": "c231826de5f71741a3335899a404f8b62a9ae424e7a79db7c5939936c9d98c5e", + "openmeter/ent/db/notificationeventdeliverystatus_delete.go": "681835bd4e4d7800f997575517561fbda57cbe3e26a3aa1f5e7a79e017234d5d", + "openmeter/ent/db/notificationeventdeliverystatus_query.go": "e4a92475b7eb53eda8604e22c25f7f35ba19db67e1b6e61a44cce1d09bdbec50", + "openmeter/ent/db/notificationeventdeliverystatus_update.go": "a3d7ad95ade00244d61f625a932db7642d935610285bd3057b895e6fcf07984f", + "openmeter/ent/db/notificationrule.go": "4ae0fc804564569f64eb9fd632eb66ac3c36a3cfdb62d28b80487728a26b4d70", + "openmeter/ent/db/notificationrule/notificationrule.go": "8f52450c2f57ba6b2777ec262bd450d083de2f746c8bc30516c83a2c069fe04c", + "openmeter/ent/db/notificationrule/where.go": "50979b463a61e9c3f8f37d0306f8ebb4a447ef9e67d85b6f12da061e5ea333ae", + "openmeter/ent/db/notificationrule_create.go": "005b5b4736a6a1f96170f934f57fd4bb162f8035a4a60b1650e89fe19212099f", + "openmeter/ent/db/notificationrule_delete.go": "2333a8a85a8bdd684e26fe24f39df533ffb3d8385a0e470e04e7cec61ca72a90", + "openmeter/ent/db/notificationrule_query.go": "65d1029ebe101dd1e9bb70e6fc08a1de1fab5e7ebacb5d64020085a235f712e4", + "openmeter/ent/db/notificationrule_update.go": "dd3419dd3378ff8c0309904003a2cb102f60af21866e294cee7af3c7a3391437", + "openmeter/ent/db/organizationdefaulttaxcodes.go": "6d1401ac7b084f892be65421b45c0698f362c0749360b61ddb86b324f9c1cd40", + "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go": "92d2b337e0ebb821e5bab59965da745c302429573a0baa7ff0d415d2a7a417da", + "openmeter/ent/db/organizationdefaulttaxcodes/where.go": "9fb1e854f0552c67446d5b300ec35bfdbf1f68072599761b004b45af1ad47aa1", + "openmeter/ent/db/organizationdefaulttaxcodes_create.go": "3910dddee2032a2cb9b0c11b9f3bba44cc66fe8acf4575dbbe5682b505ad78ce", + "openmeter/ent/db/organizationdefaulttaxcodes_delete.go": "16eae52d8d4aafb498e7d1a031a5967daee5e86554e95efe57cd1a491fe907ae", + "openmeter/ent/db/organizationdefaulttaxcodes_query.go": "dfcb8232a19c631ec045ac6238d1c2a549fb80344dcc273d135cc1752cc6fe9e", + "openmeter/ent/db/organizationdefaulttaxcodes_update.go": "2943daadff90049c55ba9e953b77ba4f17893d57f8853b07b1a4720ae0c3a80d", + "openmeter/ent/db/paginate.go": "88f9cdc1b67dbc29671ae0023815aba23d967fff94b9a3064f25dcc0dec07e63", + "openmeter/ent/db/plan.go": "563d8b993c36c6e468ee003785cbbace7bb2265d3886f7e5a8c644a56b884dc4", + "openmeter/ent/db/plan/plan.go": "db98183d3681c760bb811a09c71c956949298cdf61a1b622c57787685dd3f963", + "openmeter/ent/db/plan/where.go": "b4650954b896d23faf33e216a9549d8f6fb2e87a6a7b825fd4c9d5f1846f7b4d", + "openmeter/ent/db/plan_create.go": "b87c2b570eec6733303eecab4ba2b7145a04a76f7e9ca7715cb59fb9fd800ab5", + "openmeter/ent/db/plan_delete.go": "5639106554fae8c004e5b34171901b1fd3fa63a5e5bc2b784cb09281c55afa95", + "openmeter/ent/db/plan_query.go": "45ebcee0ad7823be5989723f8f7996da122b5d6f63e96352aecd80ceccded4d2", + "openmeter/ent/db/plan_update.go": "7352fe3bf4711eb19f6d9ebc3e4466b4e8460f1beee1f4a1922a6b0f21bb8bac", + "openmeter/ent/db/planaddon.go": "4e976a0b68c7089c9427502b8cb0ef8a2ca17a92903203995def498e3fdb31a4", + "openmeter/ent/db/planaddon/planaddon.go": "fa14dc79f151209db0a86623f57c25703d8e796e92e70e51297523c6d3ffde21", + "openmeter/ent/db/planaddon/where.go": "26d08b28797be4fe2bf8135525c605b877f00313d00eaf24320e77c73db952c2", + "openmeter/ent/db/planaddon_create.go": "42c40445739d71a2740e6e423b4aa3ab9f7597e7a58d1a78e4341830f95c6226", + "openmeter/ent/db/planaddon_delete.go": "314baa212f8d99514f0d40e8787d7e6bcbf03db3e78313d052b2bc7670dfe1d4", + "openmeter/ent/db/planaddon_query.go": "85223d81befeccd7fb6b0b81ed344175ba631fda4efdbd60ed72899f24041daa", + "openmeter/ent/db/planaddon_update.go": "3372d231f037b37cc81d20e0c70c9e4d2c127db9e21d294d3c55fe9a6383659f", + "openmeter/ent/db/planphase.go": "89263292045cc14b1a31c80de36a6e14a269186b9b21b70db8d961190aae88a6", + "openmeter/ent/db/planphase/planphase.go": "b55a43e408e47cd4d05b0e42c1d8868592211faf402a06fe35419c2f9381ba18", + "openmeter/ent/db/planphase/where.go": "85da4ecbfbe34500bed85cc797b9b0fc2feee6d59f3f78a782a335f3fb05a441", + "openmeter/ent/db/planphase_create.go": "8ec92e2624cc6ac2505e30bdaebd463f019555af07ecb8baa71dc6432fe6c3cf", + "openmeter/ent/db/planphase_delete.go": "702036f565c585c5e46443545119613cb739b8a79568c68666496af9065c0f3f", + "openmeter/ent/db/planphase_query.go": "341366b26d951a562da8d3c598b572bf237d2b53858257aa4506f98e78af8328", + "openmeter/ent/db/planphase_update.go": "18f252acb2d2f737e2689b1ed97f2dff463203d44b626b42c133294b32cd7f6f", + "openmeter/ent/db/planratecard.go": "90328e6d8ed64d5e92393c67ab1dd87c30f86137e9bb02bce23a18527f1e339e", + "openmeter/ent/db/planratecard/planratecard.go": "a841c2eb40567584d191cfbee931acc5487df0cf2c3c1f0ca88775b0e8234f06", + "openmeter/ent/db/planratecard/where.go": "40b1d0b65609c5703f454e9fc5a6985c9ef1003c282418f019f10bedb260ccb5", + "openmeter/ent/db/planratecard_create.go": "8c4e125bfaaf7d600ffacd9de47ec8e0c80646e6cfc9e4916546ae515d2c5f51", + "openmeter/ent/db/planratecard_delete.go": "ddb81a724074394717264a310f52b62f5d0b40062754ec28c11d00c65bcb663b", + "openmeter/ent/db/planratecard_query.go": "57d0cad088da42043c35a620f456b952700f8b837e90125ad5a308bcc751328b", + "openmeter/ent/db/planratecard_update.go": "734395b83e40e203f67b4719586d8e5eef0e1bed518a303b74ef600baafa551a", + "openmeter/ent/db/predicate/predicate.go": "1d9a2920cf22cf6352c1efb1489b8cfc89a380487cac95e4ae82d7290b667ef8", + "openmeter/ent/db/runtime.go": "fddf20088fe41b6459b495aeea01cc6249b99f59575804137778d22c785d7f19", + "openmeter/ent/db/runtime/runtime.go": "292e07733ca05e934429d4efec4098be77ce30b3f465827dae4c788489c9df41", + "openmeter/ent/db/setorclear.go": "e5813097b8fa1688ac5fb65e006ac6961d9c9323fdd294cc8cecc5e7f7209e14", + "openmeter/ent/db/subject.go": "1af841c787352443e82d938264f45b4dacec58a0162a256dba84fbb96e35c32a", + "openmeter/ent/db/subject/subject.go": "27e9ebcb1d2cf894083931bc77107aac24078d763169f21519332bf2c00b22fa", + "openmeter/ent/db/subject/where.go": "ac018b5ece19f9fe19cf25a42b9979572f9c06ccc9cc0acb0cb204be45768507", + "openmeter/ent/db/subject_create.go": "0bc3f3c369e10fd43e60b900e4b2ddc26ff51625d77f2a4152fe52923d3a5da5", + "openmeter/ent/db/subject_delete.go": "7f0a9eb76a1da36a9759f46650b6a7ed61855daa71212e7ea75201e34d57d4c4", + "openmeter/ent/db/subject_query.go": "1c632d98359c298f3eac38ee5ff25f8baeb04feeef7a5c1199e6cc19d7dc13af", + "openmeter/ent/db/subject_update.go": "7744dcbb483006e666b38ca51832bbf5ce07a2d081b4f8e23aa353d704457f8d", + "openmeter/ent/db/subscription.go": "449e159a6f6f182a7d095602de2ac395e76c77a09dd8379921e2220146aba05d", + "openmeter/ent/db/subscription/subscription.go": "b4de95808e5ad0e022da1d6133023f8f3b6addfc09fd527639daf3c99887d3ef", + "openmeter/ent/db/subscription/where.go": "007a886f8772adba487e0c7edc4816cc722fc82b16e6660d19ea7a9a1385bc67", + "openmeter/ent/db/subscription_create.go": "ae55b8c49e4d169022a19a11bfd7c79924532104846d4f1b12cbd6a2dfece0ae", + "openmeter/ent/db/subscription_delete.go": "99cc8936f8e551875336deddfeca5c0768371cef066af5bb6b1558cc44a1ce4b", + "openmeter/ent/db/subscription_query.go": "b44ce86f71c9984b527133111e8d5ed3844d71cd7daa3758e78f9b4506240eba", + "openmeter/ent/db/subscription_update.go": "0f94dc9a2e9f2809a0e5028acea4978285f04e9e77d88f95de3737e7d6bb8538", + "openmeter/ent/db/subscriptionaddon.go": "ce22a50e7e4ae5f84fbed99b36beb89bbd1eee8e54f8fde6a5cf30e851984f15", + "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go": "79d2b3caf30b182eb10c14f5365ed19d37f10f3744f25e4f3daeeab50b219d4b", + "openmeter/ent/db/subscriptionaddon/where.go": "8c281bfee491ef75fbc4b38147cfe61e2ef025e25870497d04441dd79a160cb3", + "openmeter/ent/db/subscriptionaddon_create.go": "ae0478340ba2b3d234642b990fa465c545a930f6ad2e84a325954ed9dce5fe2f", + "openmeter/ent/db/subscriptionaddon_delete.go": "6df1986da16a3ffec6b2118441a5c587e8dab78a0a7f72367b443d24d29e114a", + "openmeter/ent/db/subscriptionaddon_query.go": "ada300a1f19a1de977b2e74cb15bbf600f641936e59d1c5b94cc9ac5ef333ecc", + "openmeter/ent/db/subscriptionaddon_update.go": "d33b6d55585c79fc070c7e36d93a708fe8ded39e8e5a89849e5873bcd437e4ed", + "openmeter/ent/db/subscriptionaddonquantity.go": "2fa42ea4aeb24eb269267a7aa131571b5d29f6c6b1bd81ea3cd1f7e40c74c467", + "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go": "de68d2a0bc7ca3b011277f5e6ae363457a5a0b0bb826c5f6f1aa8482ee4f434c", + "openmeter/ent/db/subscriptionaddonquantity/where.go": "7ae2443e5e82016f65ea357cec777c17ab8b8ed07ddd300ddfd6590a3d769032", + "openmeter/ent/db/subscriptionaddonquantity_create.go": "cd775f2bc68c1dceaf3c4a3f8b4b700de0e5dcd75d7d11bd3ba51e235709359d", + "openmeter/ent/db/subscriptionaddonquantity_delete.go": "44480f14a57fe483c27fdb0a2dfa31a4f638cb3b159948f9ab8f39f9ec4815d5", + "openmeter/ent/db/subscriptionaddonquantity_query.go": "185c87aa871d7437b0e8da8b9c69da028d5c0138865ab69fd498a7d68ef21258", + "openmeter/ent/db/subscriptionaddonquantity_update.go": "934a20eaca5209cefc1e2a54b678700d06772a45cdce7221e6307cbe6fc0c7fe", + "openmeter/ent/db/subscriptionbillingsyncstate.go": "3dd3249f1a616303110f470b2e1edda09a5ef586f2b7aaad8bd6f6a7a9ad169d", + "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go": "b47699869aaba610c7ed6b3b6a785d1807699f83e4fd01a2664b3a310775322a", + "openmeter/ent/db/subscriptionbillingsyncstate/where.go": "af5b9a3b5cb82dfc5093477c340391772f0015c7f6fe2aee0ab3880e5ee67111", + "openmeter/ent/db/subscriptionbillingsyncstate_create.go": "da9a793262729d0a6097f65828a6ddd86c03dc462616391f9e4b3432fe97a398", + "openmeter/ent/db/subscriptionbillingsyncstate_delete.go": "53079f0b6258cd24171b201657badfef2da002f9d9666765b61cdaff4981302c", + "openmeter/ent/db/subscriptionbillingsyncstate_query.go": "efb29a48d1e6087a74d5c4f477da20e278a06f0af06485663344749b1e3c1b2e", + "openmeter/ent/db/subscriptionbillingsyncstate_update.go": "fef7c5a16e5fdc68c8847ddb2078acc3d47f3f697e364b1ef6a7c5c3aba98a7d", + "openmeter/ent/db/subscriptionitem.go": "88c999bcd2e448512e303cdbd483a1449954fa42443adf17b9dc2123595c48ba", + "openmeter/ent/db/subscriptionitem/subscriptionitem.go": "fb7d303a9b489951edc6e3bf6a691dc1268c7371b3c3b2ff316b3eeb0678478a", + "openmeter/ent/db/subscriptionitem/where.go": "a50deb9b01df70709b187332933c86f01e78df9f159116404fa6beacd2c489a5", + "openmeter/ent/db/subscriptionitem_create.go": "e9fc15ad140ef23734e88f463eb2e31ae89ef226372cdcea967e9ee64189e6c9", + "openmeter/ent/db/subscriptionitem_delete.go": "9e622cabc25c3b1fc25c8851f493b81430938f6e67dc18b96834751c04d5ace2", + "openmeter/ent/db/subscriptionitem_query.go": "8b333575f909e2df5744366ef1c229bb67d74c5ba97443d0df2b44f8ddbee7ba", + "openmeter/ent/db/subscriptionitem_update.go": "7d43538fc678503cba9baf18cca3e6ad1d4ab5b65e8e95888fda8e8941e4fbff", + "openmeter/ent/db/subscriptionphase.go": "ae5806be15afcd59f5524104792e27c97645018c43211e34ab22d4cec1ebdc10", + "openmeter/ent/db/subscriptionphase/subscriptionphase.go": "b95c94561d9982e6f148abf5ae3af8e88bbc3c6c738a62c0e15c525d087b126f", + "openmeter/ent/db/subscriptionphase/where.go": "858e996c46f7ca272adb960e879d4094bad07256f6be56d73fe7fc28dd9aec52", + "openmeter/ent/db/subscriptionphase_create.go": "bee7ae370200ebe8a2c6f9c97a0ee3a982f26dfec79150551c621abfdfa1ecf5", + "openmeter/ent/db/subscriptionphase_delete.go": "5ff29d1a1042273c87d19bf12e620baa7c0ed06298c8c5e7b59bfc7c8665a841", + "openmeter/ent/db/subscriptionphase_query.go": "0d31e31a43b59f464eea7a040a7404739bcbcdb14815978b5b58c6938b171548", + "openmeter/ent/db/subscriptionphase_update.go": "e9dff29f4f30d96eec39c387ba445ae34e8da0eeff8af71ee66b4ace0a17c3d6", + "openmeter/ent/db/taxcode.go": "b1a3725d95c23378e7f655156a25ab62d5c56ba99eb5d8d901ccfe3939f178de", + "openmeter/ent/db/taxcode/taxcode.go": "55872d01e172eadcfa5f555853a5347a552c93d5723bb50b827519dcc5783ddb", + "openmeter/ent/db/taxcode/where.go": "0b6c5058223c7995fc6fcbdc99d668b35e3879b73cbdcbdf5747b673689b4fe0", + "openmeter/ent/db/taxcode_create.go": "97738e77c5a4595b0463b3a4b7f9d046772d8b4dd6c7b768a600655b92b2562c", + "openmeter/ent/db/taxcode_delete.go": "954bfab64867755d0a5adbc68c37d41e78b63478c39533be88f443cea47f7c5a", + "openmeter/ent/db/taxcode_query.go": "d7569f9a1eef412891adfdebd7c91502b8575e14b1fc98e8874fbcb351812bae", + "openmeter/ent/db/taxcode_update.go": "c3705ee711a2198fcfd2d78db8f9e39d67eb7e080855c17217c7df4848ddf102", + "openmeter/ent/db/tx.go": "f8518db6ace571e787d05ca84435a72bbb310448120fa5af9b4c36d099a5941a", + "openmeter/ent/db/usagereset.go": "6b4216f59896a7fc7eefd91b643f6e54c47421b1597eac958c3df5fdf1a795ba", + "openmeter/ent/db/usagereset/usagereset.go": "8e33564f0e02647a5a0606e00a5d2bbd6aa937810ae049dce962d0ad55bcb00d", + "openmeter/ent/db/usagereset/where.go": "3d89cd96cef8ca525b9278006d7abe0579c72e85d3cb4c749bf58bce6d6caa57", + "openmeter/ent/db/usagereset_create.go": "ea90609b0be5611563741b447a2727ae52b3764c826b0722d250980dc4f75298", + "openmeter/ent/db/usagereset_delete.go": "c159fcd00f856e79612c8f8af8c246f9ceef3ce09aab240f4934639697779417", + "openmeter/ent/db/usagereset_query.go": "9bd3176e5a8cdc4b862528a548e315a4e0726628ed98c2368a6af23fe7482752", + "openmeter/ent/db/usagereset_update.go": "e70895f1ec00a5d20c6fdede2749000b25806270b8590177d071e88ace9ca655", + "openmeter/ent/entc.go": "6f3e075b24dfac0db54a187002c0c782b6256e5e985a6fb201bafe25e2b75f13", + "openmeter/ent/generate.go": "20cb376835c1fb82a934ac4728e1daf9c709c8efceb86ff94a008b9aadfb8b1a", + "openmeter/ent/schema/addon.go": "3d3e306594493a0fe710739809a0295749f918b305e61573f1fbfcdd69dd4f16", + "openmeter/ent/schema/app.go": "127b21b3f5de8a22bd8ab3a1b700510352da5e603944f66524d0b95d221f86ca", + "openmeter/ent/schema/app_stripe.go": "fad9bc4df8153ff99752f42ecedef65b863406da0279faebe85a37758ea1cde8", + "openmeter/ent/schema/appcustominvoicing.go": "261b2890e7656f11160317aa61fe43f27597e8fd8ec5455fa9f817c3a5aa4cad", + "openmeter/ent/schema/balance_snapshot.go": "c9eed13076fe15a2f04bd07ae0e82afb5cd17f74729fc501812c57839c2f8ac8", + "openmeter/ent/schema/billing.go": "be05e77fb390f8434866522caeb9751fe6437018deb88f6dd51508593fe173b4", + "openmeter/ent/schema/charges.go": "c9b6da8ae29e7bd165c6758fa7ac3071bb32895d60fb1c931186ce8f15b1a94c", + "openmeter/ent/schema/chargescreditpurchase.go": "722da90e0a4aa143482ce87176ee868b2fe8b64eb9b583e62d7db485d23432cd", + "openmeter/ent/schema/chargesflatfee.go": "1a9fe63449db50a79847d3d06ad974ca1f699963cb4881ab27ecb8c29f4cdaf3", + "openmeter/ent/schema/chargesusagebased.go": "0e15e91d46b89b5f7cb0c3258334bdfe690b5b6935a2556362fea75dc863f800", + "openmeter/ent/schema/creditrealizationlineage.go": "cf9303c6e59d2271cd3078533c4fb3d34f13d0ae039e0e691c274e769fb24043", + "openmeter/ent/schema/custom_currencies.go": "b5952bcc76f6bfc7dc2ee8f94a836f2070125840145a668893d9b48ff86d9313", + "openmeter/ent/schema/customer.go": "1e7bc811f7c338e9bbd2339d568dad52da7c767061caaf606a4b4310e38c3fa1", + "openmeter/ent/schema/entitlement.go": "fc447e1ae45d31d7537351d1710346f6f079a6f59fa50e5e2269d4b427c3ba0d", + "openmeter/ent/schema/feature.go": "d10e7c24064e8ddbd08376fe982d48fd960141a91f03cd0c7dc4bac4fed5749a", + "openmeter/ent/schema/grant.go": "9c32d647409e30c32473eaf19b66b53dd05ae8d3bc7f24a02a27c0fdcaf79892", + "openmeter/ent/schema/ledger_account.go": "6e75c68f0d7fd86073684b844a50abc9afe3674364515dce703ad30a49305bc4", + "openmeter/ent/schema/ledger_breakage_record.go": "24190ceb11c79442d5981e129836ba10bcce94609350f90773a05ef192781fe2", + "openmeter/ent/schema/ledger_customer_account.go": "9ebce53a47480bcecb438186957e10650b699a9f6109912d62e7910c6ef78531", + "openmeter/ent/schema/ledger_entry.go": "b9129d373b3141cd6dfd33a850b6dd962e7936e22431502a7f9dd8eeb98cf56e", + "openmeter/ent/schema/ledger_transaction.go": "419e2495ffdd1063014bcd530a3bf39656b965cbc24604433cd1e3d4ddbf8db3", + "openmeter/ent/schema/ledger_transaction_group.go": "c6f3c9fb00172268ac7e94193988607e27904d6797bfcacb6962a879150fadfd", + "openmeter/ent/schema/llmcostprice.go": "0332892ff97d4fd07dcde865691dd9894cf40c7773186011e91fdc2227152368", + "openmeter/ent/schema/meter.go": "f0c45e49f60908f4abb06e27d107b92e7d816ef70ae1039edd53320c0460a9b6", + "openmeter/ent/schema/notification.go": "ef0ae32413198e9363e27ffcc529b323a7b7e3483c75359705c359370ccdbdb7", + "openmeter/ent/schema/organizationdefaulttaxcodes.go": "69a84d3303324b268b9e3513ce13edf162726479b62fb2400de144c96f15b628", + "openmeter/ent/schema/planaddon.go": "20eaa39e4ee0c82da48f262893fc0781df49e581bef8d2786facbdf472a81b2e", + "openmeter/ent/schema/productcatalog.go": "5b4e2377ba3d9f84237f63e02623c73f92e789109870534fdaecf619c412917f", + "openmeter/ent/schema/ratecard.go": "ceea0b1d8ac389860c2ded65823abcda813dc13b76e29309979dca404b1ca859", + "openmeter/ent/schema/subject.go": "5acd4f5c6b1ee5d6b1cf7534ef4a817a8af4889ee527eabc77c999fc1b9de74f", + "openmeter/ent/schema/subscription.go": "eb84410e22c8911023c972cc590facdaf10be0062519f4888ee6564944017088", + "openmeter/ent/schema/subscription_addon.go": "cd9d37ffe620204892d1cb70dbd9cb155b7172edabd2bbe4efc4c201362d9cde", + "openmeter/ent/schema/subscriptionbillingsync.go": "ad43d6aa0183590f85a84b9e9bf92767b649b5a736f35dbc67c504f6e6b87de0", + "openmeter/ent/schema/taxcode.go": "cddcb000bc23ed16f3329a32932b14adf3f4cfaf08ffb082e5a3d365a93bd8b3", + "openmeter/ent/schema/usage_reset.go": "d29ac6576af80af36121f9cd61d9c9d08f7de54e5173b0bfa1bcb7a7d3548355", + "openmeter/ent/tx/enttx.go": "8bfb6268cdc5d650e95e358cf86836084db87b25eb279bf73a24d853ee85feb9", + "openmeter/entitlement/access.go": "41ea46913c072bbb76b98e79ed1e5a82dfecd5b0bd282dd38ed7eb42ec67f29c", + "openmeter/entitlement/adapter/entitlement.go": "cc1ba786d60db68cbadb1ed9eeaed160d9706fb201a9b63feb500e05de09037f", + "openmeter/entitlement/adapter/entitlement_test.go": "5007376e81a6bfe820084f8d30e81cd2de746e3c4f1dc994a8910b8d6b57922f", + "openmeter/entitlement/adapter/transaction.go": "7847e13c214a812f83db296ef9ac683b5444d0ce8b588827681c68178bdaa895", + "openmeter/entitlement/adapter/usage_reset.go": "9f708b200c4a5edca3e006e8b6e388ef9d9095b38c29f1546236a23ab9fe9c39", + "openmeter/entitlement/balanceworker/entitlementhandler.go": "77b81bbf55e517c61fbaa81c3bcb512d48c85158173492f2a2e13af2b0272f33", + "openmeter/entitlement/balanceworker/events/recalculate.go": "230c478eb6d6a06947349ec7bd1ded533522656b4f7455b68d37854a2d3c1378", + "openmeter/entitlement/balanceworker/filters.go": "f7a8e8feda85cfc5bbb9462e64bff6758e9a6e327541305610f6ddcd768af446", + "openmeter/entitlement/balanceworker/filters/filter.go": "06b1fe053234caecb154a4b7541f19353fd9c50a33e41e1de3f8d01c58ea6068", + "openmeter/entitlement/balanceworker/filters/highwatermark.go": "8cd87e80ced5f8180d868c80943dd7f9e9f8fad3b3da5b63ce8f3d9aaa027cf7", + "openmeter/entitlement/balanceworker/filters/notifications.go": "835f8919dd9d1ae786ce55477d696324bad28f82b15b31bf5b57ac0e0d9f0ad6", + "openmeter/entitlement/balanceworker/ingesthandler.go": "c318be0cf49a8eac7d9027d2a52011d2774f6b33ac7207d9b8a820418d8ba53e", + "openmeter/entitlement/balanceworker/recalculate.go": "f988183de60e332b8b05fd65e5ca4cbb34ea397edd6b17d079a8b0103e2f6da0", + "openmeter/entitlement/balanceworker/repository.go": "424eeab039fd0e6be049d098d398a30eb3199d86f84486844bedc67bf066a9b2", + "openmeter/entitlement/balanceworker/repository_test.go": "a7222a54deba77fb0a410b04af24995ef98d0d41a5edc924905ca7a9cf705104", + "openmeter/entitlement/balanceworker/subject_customer.go": "2c129f5ea1e9e71081af0bc030156984a7ac2c896b46b3c7179035c06990fd00", + "openmeter/entitlement/balanceworker/worker.go": "e83480c69ba1e049e798993b180d5c41ae1a7f6fe9e15478394dcf3eb7ed7125", + "openmeter/entitlement/boolean/connector.go": "edcc430587ce5ccceb3a79c4a259e4cb42cf9a4c73f5285ee7a7ec62cf767e79", + "openmeter/entitlement/boolean/entitlement.go": "4932b9453f18a47e25d717fe77ea297da389959a768fd99533e921c9e84ecfa0", + "openmeter/entitlement/connector.go": "5e9f7bee523ff9ee512f280518f70813d8d1f9cc4dc0eb838aadc4b59c7cdc2c", + "openmeter/entitlement/driver/entitlement.go": "5f310d7550e188dd2f9f77cf2b571f2cb313afd0a47b51d923379a0bcb1c00ba", + "openmeter/entitlement/driver/errors.go": "ae2a375c19a22244a09dfc7eb09610c57406bd3db3b02941a43f2a4ba4f257c8", + "openmeter/entitlement/driver/metered.go": "fee0aabb8695c25dd7b9bfe29a133e6f9763b85344460c2c566f7c5fa07e7055", + "openmeter/entitlement/driver/parser.go": "8f2b1172d5ae6107a6f561e2eb38d7f0ea457efdce79cd26c34b6ca1b1e790be", + "openmeter/entitlement/driver/v2/customer.go": "4099dc00c7e0c3d11de11dc5de5db13931bd131412500061dd784671e85438aa", + "openmeter/entitlement/driver/v2/customer_metered.go": "08e2521ffe8bffb125359d6cdb0261a6d88ff4b279b9ac23152dff866d34fd93", + "openmeter/entitlement/driver/v2/entitlement.go": "b024bc8183d8c781d69a1300749b68990594ced4958be34b44428d62cc6b9410", + "openmeter/entitlement/driver/v2/errors.go": "076f0c98a4f0b1c6d1029d21d82a0a9c4cfe025f91237768c62bd76540285fae", + "openmeter/entitlement/driver/v2/handler.go": "328560f894ebfe6ad3ac9231223e802a1ed71124238b578cb65af1ed2fa9042b", + "openmeter/entitlement/driver/v2/mapping.go": "d9fdced8e7b8f1673ebce9ee031586f652b79b6e0e3dfb503044b7335759de45", + "openmeter/entitlement/entitlement.go": "42a11d0de119fdbd7ec13e2ca39d338ad57c8b379bc73258159ac71f13be0960", + "openmeter/entitlement/entitlement_grant.go": "1bb6206ab7e877e8f3e6812ac68474c5ff7fbb37b91c92270897b32ab80873e7", + "openmeter/entitlement/entitlement_test.go": "77e1d3c51a982ddf718886aa0522ca88d273576ed68ead230dd8d3fde9a14312", + "openmeter/entitlement/entitlement_types.go": "0af29d06447321eeec2cb25be6aaf56d4e10db6cdd84f1fb7864802cb0bf208a", + "openmeter/entitlement/errors.go": "0cf32636bb3800fad41956f78a92995e5db677514bc8ebe8516a6c9f40667e8b", + "openmeter/entitlement/events.go": "e62542e635bc99dca43a2be0f4a6a6a142285f206167c58a2a553c90b9b13bb7", + "openmeter/entitlement/hooks/subscription/hook.go": "c0a790474c6b7585d92ee974a86570104fd44598df0cdd5bce957fc9508608c7", + "openmeter/entitlement/metered/balance.go": "90f203fd24d2f3b7e7e443178ec20479409b87f5ec75ae99192fba28b2fca181", + "openmeter/entitlement/metered/balance_test.go": "84defa6d1061c679147318ad9d0a1fa0701c1d16442c9ae8d36b983fe3d5c61b", + "openmeter/entitlement/metered/connector.go": "bdd232da92176757c17d14be32c683f7232af254ecd729de135c220c03e4d33c", + "openmeter/entitlement/metered/entitlement.go": "eaff80cd72b8c6e955807510a8f713899b81fdf1ce8e37aa321ff45fcdeb66e0", + "openmeter/entitlement/metered/entitlement_grant.go": "3e84f9bd6cf08044086044193cb66509e7b0d9db400c7bd0aa91b94b4f9abddf", + "openmeter/entitlement/metered/events.go": "6783ecc20c4c2877005839542b4c3743ad3da18f37269a928d9ee477d388f651", + "openmeter/entitlement/metered/grant_owner_adapter.go": "2c8eac6e0d553086ce0331727ee5038681e98900ad091cb8ef9b5b96107a6ea5", + "openmeter/entitlement/metered/grant_owner_adapter_test.go": "f695a26f1d958bcdad9434c14672d701c6c6a17f62726779a5974940e13897a9", + "openmeter/entitlement/metered/hook.go": "304b2250c4dc36add29c98a9aaa3766d44b059f57af0c755f86538a5e9ff608b", + "openmeter/entitlement/metered/lateevents_test.go": "9ef8406e4d34b77c5826fae936cc92901fabe9634cd9cf84b66b9e2d7c33ff01", + "openmeter/entitlement/metered/owner_customer.go": "958dc5350957b173e645953a95bd06a2572843a9da772ac0f9be7d6d379476aa", + "openmeter/entitlement/metered/repository.go": "cd88c94c71af1b5ae49e8bf07abb3505248f0ec8d0d38592af150b4854d1e77b", + "openmeter/entitlement/metered/reset.go": "2e15dfd233c69750797f37b2e6c90508494f03c42c7283329e8df63c10ec3115", + "openmeter/entitlement/metered/reset_test.go": "7504eb1573a8213d21e9d3b0b74411fae6638507727addc490910f79e5af242f", + "openmeter/entitlement/metered/trace.go": "5695d0d10c472efa1014e4a12dd3b15dbb3523d1ca717e506a45f37cde0632b7", + "openmeter/entitlement/metered/utils_test.go": "519472960a22db1b16e26bf914f2560d8ec086ee287a9cc190b14b2ad7cf1265", + "openmeter/entitlement/repository.go": "5b561da7f7e0df948b644b8f2f70012e70ec8f773a66b541f4eeb94f6ee8db58", + "openmeter/entitlement/service/access_test.go": "43a9cf54760e9d3677fe6c48b06cd79a843b1f56b0019dd5c376eb1b9f3c62c7", + "openmeter/entitlement/service/lock.go": "29648625a76f9ba14482123ba193e30a8638db95aecf8084a8e22332ab551255", + "openmeter/entitlement/service/scheduling.go": "c0e556fbe42f54a57941b84b4a3c8a8524ff3546653748c5499291ad315eb23a", + "openmeter/entitlement/service/scheduling_test.go": "848bcffcb631013f9ad4d9b2b38cbeabd235feadc1918ef6fcabec6e9d3eb5f5", + "openmeter/entitlement/service/service.go": "4d106c0a085a11bfc5d4d6485b219af0d743e632c399463fb8ce6596f05ec3be", + "openmeter/entitlement/service/service_test.go": "dd3581c5cee04d590558c6a4d5a071fb6bb097762d5a41bb5afb3dabd7ca68af", + "openmeter/entitlement/service/utils_test.go": "ae503f479aa87a3e0d8b751baf144186c6d8942ca7d4baa05c77c9a35a14aee1", + "openmeter/entitlement/snapshot/event.go": "97064e65274eabfcac20665b85514a0a325ccbbcc8445f1906d5d615ca644e61", + "openmeter/entitlement/static/connector.go": "a8117267b59297648863ac8901f68aeb680c4dbc7e09f2775579f4b55cb4ebfd", + "openmeter/entitlement/static/entitlement.go": "2cb9a86a0311aa1109f4415df5e068cd8d1051cb9ee33c837074d78e6b68729b", + "openmeter/entitlement/uniqueness.go": "9dd27faad92faa8037b3f796068d2b932451fe521c734a918764d767c22e65c0", + "openmeter/entitlement/uniqueness_test.go": "54fedd84f8fc92933622dd458e2ad1887b4293f13552d70574d8c4aa3cac7c98", + "openmeter/entitlement/usageperiod.go": "f3408c04e1226cb7970273f46fe2e528466d563ada780d20acde0daf5bb45dee", + "openmeter/entitlement/usageperiod_test.go": "e2c47bfd25c81d4044626ba0249ec241665212f908e43a76904964ba360da85f", + "openmeter/entitlement/validators/customer/validator.go": "71031a6eff2ff4ebce0a5be676282ab28060e614b36a0a63f05577eff0f9590b", + "openmeter/event/metadata/event_type.go": "24f16bb6181f7e575c3da73cec6f61d3e6d34fe6e479092a8a52489af0f9e5aa", + "openmeter/event/metadata/resourcepath.go": "1929422002c2e26fb72746c52185ee9c78b3fc46aa7710048ca923e7f9f2812d", + "openmeter/event/models/models.go": "4bcb84a8559021efe865edfb5496536396ae49d21bd8fc106eb30910eadc33e8", + "openmeter/info/httpdriver/currencies.go": "7f163f4176efe300a41e2413f839ce9fb0699fdb59366df1cd34e4ba055cc0ce", + "openmeter/info/httpdriver/driver.go": "05662a9062e47ae7736f78596dcb0ab64745f65b8d0c909cdfd0e64c8e1dcf8f", + "openmeter/ingest/dedupe.go": "9e65b2938ee7733bea5983b5ccc90635fe519932688f2498fa5500a931f82ffd", + "openmeter/ingest/dedupe_test.go": "47247d2b7d3bbe7c3166419338e738ac3ae159f8db4a65f2965f4cdc146558ac", + "openmeter/ingest/httpdriver/errors.go": "e1a2843e78e680c50e3fc3cca682421657806edcfdee58a0174c696bf2408562", + "openmeter/ingest/httpdriver/handler.go": "163ffe447ad4de228d6aa931d5e21fa7edfb4ea1b31950200e183ca3e5d00383", + "openmeter/ingest/httpdriver/ingest.go": "f8dc8702e474c8a6c489a486e8014d6a7ada33310593de8dcfaf090fb2e7ffce", + "openmeter/ingest/httpdriver/ingest_test.go": "617f4486b1d91cdc067b89563b36685b2a7390e7bee7ab72c15ac74c7193dc5a", + "openmeter/ingest/ingest.go": "563a2718c9ed04633ffe9cba0f4988ff8198422d036c015824bda4ad422e0d59", + "openmeter/ingest/ingestadapter/telemetry.go": "443eea46814fdf14ea79bd9b526822af845bd5a214961066ad4e97c42e2b23e5", + "openmeter/ingest/inmemory.go": "a94b3b5fe9e56c8d028f7099440f6dc06f7b72bf3b16d319c8450020c09cdb28", + "openmeter/ingest/inmemory_test.go": "01b772306c0ebbf52c62097e16d7086121fe4b3b3d2ccac87b06bfa18fda97cf", + "openmeter/ingest/kafkaingest/collector.go": "95f0a193fd186af7e40b8cf4a47569153862377417a6d5d502cf27a380a5c464", + "openmeter/ingest/kafkaingest/namespace.go": "3522f647c1f1835531d4deb08bf4508edbc4a3e234421b6fe3ed19a92ec7b416", + "openmeter/ingest/kafkaingest/serializer/json.go": "13ef59628ce6d283aba77382ad83d68f9bcb4661a9db5067bdb986dc4cfa59f8", + "openmeter/ingest/kafkaingest/serializer/serializer.go": "ea33e5b29dce999d36400ecae92dfaad4da7e9d315a88ae0896ca415ff88eb6b", + "openmeter/ingest/kafkaingest/serializer/serializer_test.go": "94932f8602f7f109c89ed5fb743186f8bc6fdd7daa1cb5eaceb7bb13562292fb", + "openmeter/ingest/kafkaingest/topicresolver/namespacedtopic.go": "e28d1fc3061de8e188566c0fbee02ee73dedb9aae8a06620367d2a390f35d030", + "openmeter/ingest/kafkaingest/topicresolver/resolver.go": "15b9162f35ae82fdc0a8064ad22c8daa786c2ec4302ef1fa5f76c474a254b5c3", + "openmeter/ingest/service.go": "ebcc79daeddcac103660146ca4c6f8bb28c175229a94e787593c0aaf0a7e0b45", + "openmeter/ledger/account.go": "016c023c79fb057245be8b8fa5e7544a4f60e8772d8f53242055374197107e9d", + "openmeter/ledger/account/account.go": "4ff2faf3bdb60f7c4ec6e6ffddb39361c9be4f7f39026b2d52eaf86234aa1c5d", + "openmeter/ledger/account/account_business.go": "3bb6811846c1113c448b67e1d80f1ed3810313e9062224efbb5bf55c60c5868c", + "openmeter/ledger/account/account_customer.go": "d2efc9e0d84efef1b6cd5eaf5681d34d30ea476828928b031da7b89c7a09fe98", + "openmeter/ledger/account/adapter/account.go": "ed9663b46bd86b2a38ad3d1a8f2fb2486f474ad0bb9eafc39c843c39fd7d593b", + "openmeter/ledger/account/adapter/repo.go": "8bf8c6739b0a8a3e85043818749d1f8a5e14313fb7fdbcc18bd3be4d4ef5842c", + "openmeter/ledger/account/adapter/repo_test.go": "8b770ccf2fc45b1959202b65b4e9cb22d5c7c2373aa6773154536f8e223645bb", + "openmeter/ledger/account/adapter/subaccount.go": "b49eb4ce848d563c5f133bcabbe9ef0601f42c86e6db5d8e81a7112bb6b37f27", + "openmeter/ledger/account/address.go": "0fd157234e28cf8d1cb08fdaf746087654d4d55b977d516dc1acb5dbab227f2e", + "openmeter/ledger/account/ledger.go": "c7fc3fda7b082bf72329b2505fd9fea781aad43964783c147311b2f327a9df13", + "openmeter/ledger/account/repo.go": "0e2dad1d5944dba075770282cc855456ffff826c82d20eae88ed35ffef3ccac5", + "openmeter/ledger/account/service.go": "1def6d4851a15f87a77561b17ca3b4651b8383d4c30cda1a96bc5191d657843e", + "openmeter/ledger/account/service/service.go": "2555cad3b460947052616bf3ae5337badee77d7c8e63dc131a62dd7477434e42", + "openmeter/ledger/account/subaccount.go": "5268bcde9eca8ecae2d43ee20266e9eb1a40a88d2442c4057d167a074e054862", + "openmeter/ledger/accounts.go": "78f4fb825677e3deb112ab5768ab098977e4e9e415915808ba5bba7bbbd90645", + "openmeter/ledger/annotations.go": "32d0b74da482bc5570789fafe4155d4574ab31954ec1b3b02c62a860efe7282a", + "openmeter/ledger/annotations_test.go": "89097b09e830a29f6058a038b40fe597c52298a53ffa2eb209692cfbd5b17737", + "openmeter/ledger/balance.go": "ac9b2574853095d6dfa264f2eb5b420711680aa599a57756188163c911c31984", + "openmeter/ledger/breakage/README.md": "a28da3ca5ea21f5bbc8120f5753bc5652d5dd5c6363643048914cf1a19aac415", + "openmeter/ledger/breakage/adapter/adapter.go": "ea37f3e1f5ebb21a385ec7411be640ef1b0f08ff69defaa13fc6c927b08777b3", + "openmeter/ledger/breakage/adapter/record.go": "496307686f23758812a8ad9b09ac86a64509652c08eacb2c2ff67844f7b84fb4", + "openmeter/ledger/breakage/breakage_impacts.go": "ccb8f5f0d9e66fe4911d4dfee385efb0f907c4dc44c20e52b659173ce69f6064", + "openmeter/ledger/breakage/noop.go": "0f0379366e55648131647cc2782962d49910154ca760902ca9e0ab921ff6b7f0", + "openmeter/ledger/breakage/service.go": "2f7979e268272b1f25dac0781b2212b7900b0a97f4b479503a18d421416d2dee", + "openmeter/ledger/breakage/types.go": "975656f54fa471199174a06d62260414286553fded0faa17a019ca6c86c3733c", + "openmeter/ledger/chargeadapter/annotations.go": "eedb4cdcdc56244d84b71e4d6c358cd419a3897c81b6ed74943983ecd4c1ef65", + "openmeter/ledger/chargeadapter/bookedat_test.go": "06d9ab86d38bcf3c09e156307f29226711ea639206ab381825d7be259e34b80d", + "openmeter/ledger/chargeadapter/creditpurchase.go": "b0bb266b03db784ff6ba223626263d14e9774f713ee53223ceb8804944a5a1c0", + "openmeter/ledger/chargeadapter/creditpurchase_test.go": "fb76903eca010a49371f08a422718e7ae44bda0924d704779a5bf9b8177fd3e5", + "openmeter/ledger/chargeadapter/flatfee.go": "9080e901cb9d6f353b7c732edc91ea931e7750cfe07a3ba3992530d6d8aaca6b", + "openmeter/ledger/chargeadapter/flatfee_test.go": "364c78474b56c711704726f050072db2cfa2fcd9996953175104bfd1226e5543", + "openmeter/ledger/chargeadapter/helpers.go": "70a6776d2306399de323abc7eca3c31f0ed2288510bfab694b50348f103448ff", + "openmeter/ledger/chargeadapter/usagebased.go": "4bced148420c0ac751b9720db78fb977d383dda3d8064789a40a8dc1038db1b2", + "openmeter/ledger/chargeadapter/usagebased_test.go": "9318a062d5839072d9336cc007849686eb5273652677720332e02560f6e4c903", + "openmeter/ledger/collector/README.md": "c953262cf63a18ad4c1f7584f3b782826c08c473971eaaa48be4a9bc0047a624", + "openmeter/ledger/collector/collect.go": "9eec4da51a219d6f949bda840a4c277f6e5d4d476476fafd32d9296ad1c45107", + "openmeter/ledger/collector/collection_fbo.go": "0a1ca6b23e8f6927eb64bbce08aa3007b403aebbd5e82ade5499e84e6b39ce7a", + "openmeter/ledger/collector/collection_fbo_test.go": "1de7c984a5602d02d46d98c35e65cdbacf50bdf9d39bf1f67a870f8fbff1daaf", + "openmeter/ledger/collector/correct.go": "eb06f733dee19dda34f9dfd951a5de58d5b01f92c10388aa7d3f029739ee3cc2", + "openmeter/ledger/collector/correct_test.go": "601c168e365056b9643f5e63e2d92c42660e56941048808e3394518c8c0a5843", + "openmeter/ledger/collector/service.go": "01de877a07ae41ca84780aee12d903c0114bfd82feaa4c98672d57198588c8c9", + "openmeter/ledger/customerbalance/README.md": "e761190ef12c953f642a0665b57a08b246f7cbd86f204d9595d9a1444c7f15e5", + "openmeter/ledger/customerbalance/calculation.go": "74a20422bda1763abc9c7f0c83a895019c4ca8f0f171d6965ec85adcd59ba06b", + "openmeter/ledger/customerbalance/expired_loader.go": "526d3f3cd568453f12488c101b4c4ec0870bf6d16e96f3cec6392f16c6ec8318", + "openmeter/ledger/customerbalance/expired_loader_test.go": "3abd225c1936beeb80821491c6f031191af8264db906adaf03d1728a48213c33", + "openmeter/ledger/customerbalance/facade.go": "77b012640e414eb9fe851be272583933e4f51ecce6398d71cc0554857f3f5e59", + "openmeter/ledger/customerbalance/facade_test.go": "b9599b9a3d064f0634e142db1b1c2c33535d4a0ef276e93ddd416f0e4c0f718c", + "openmeter/ledger/customerbalance/funded_loader.go": "74657645697e7ea2cc1827dda78a5c3bba69ae75f7bb98c99048132a3f502728", + "openmeter/ledger/customerbalance/ledger_loader.go": "619a82efbca0cd6b614703a80d482b3ec1bfb9b4610368084bc21e64d6ecd511", + "openmeter/ledger/customerbalance/loaders.go": "51484872bd70bf9c7315c37fb6b78df06fb9473b64f63d366d668e2a65f0bf3c", + "openmeter/ledger/customerbalance/merge.go": "6136de88bb0a6d2212afa8b3b3194f9c83af3fb908a0ab94fb9c2687dac79379", + "openmeter/ledger/customerbalance/noop.go": "6bbe547694887e0794ced20e1b66a135ae0206e55149899b1a0025018b673f7b", + "openmeter/ledger/customerbalance/service.go": "93fac5630bbba2120c37c28c54ea4a02febe48fae8690390e59f63ca77c56a51", + "openmeter/ledger/customerbalance/service_test.go": "86e0aaf163aaa4f9eb42cdc4adf1afd51f071960d7c5a542b8d4d240a37a47ae", + "openmeter/ledger/customerbalance/testenv_test.go": "137ca27c1099c14943613d8f29fa66a862af59e5c56b23f92fcf224143a941a2", + "openmeter/ledger/customerbalance/transactions.go": "2454a4d41535a2c8e46fe6467dd7a5b8abcf9659134825d485878831d6ca3d2b", + "openmeter/ledger/customerbalance/transactions_test.go": "66ac830f4996da9ce44a14a6924b43b459274ecb1cd3398a84290a65fc0a5edf", + "openmeter/ledger/errors.go": "76f56ce2342e175d9de5784200c4c5001754516cbd9f25b64b56f4fde905edf4", + "openmeter/ledger/historical/adapter/ledger.go": "af756eac7f861e5feb0e291d0ee6b08447bf616d9d2c8e358015229ee5b4a6c6", + "openmeter/ledger/historical/adapter/ledger_test.go": "97235313024e5c3fc966d92f735e1bb6a68dac9826866a47032bc09cb030cb47", + "openmeter/ledger/historical/adapter/repo.go": "0bff394437f927c875359cfcedf83774d3d62c8ca569ca76ff4b0b140948d3be", + "openmeter/ledger/historical/adapter/sumentries_query.go": "fea360baec11f6de5d006b9babbc16a8bfaae6f9f092ff931d986f6d01e152e4", + "openmeter/ledger/historical/balance.go": "9305aff2d5b1005a5d3d16a23957d2f9af488379195af4a47202bec5217db5a0", + "openmeter/ledger/historical/entry.go": "0564a3dfedb93ced4183bfbccbda946f1b04013c9b723de3fe0d95eb4f42af02", + "openmeter/ledger/historical/ledger.go": "2b6a82744b8380af6ae259933b3d8671fd7d146d8c8a9182afd2cd703fe80e45", + "openmeter/ledger/historical/repo.go": "34e4cb7db3419387960c93e69ca458c919eccb98933797e7d2353d07eb01b0fc", + "openmeter/ledger/historical/transaction.go": "b4d1293bf1d4b864e9c3f81d9d1d115bb9bdea1c34a6548acf480f03c04fec5a", + "openmeter/ledger/impact.go": "1fc03df87fec716e91c792db3aca4fbf9d7a6b1719e4e1caf28a667bcaebe0c1", + "openmeter/ledger/impact_test.go": "b88c091e4b7a4d3e53ada39d6e32c4183b085855782607ece304fe6530a55f03", + "openmeter/ledger/ledger_fx_test.go": "5f196752a32ce6ef02b5b0b04a49b43e0ac6643752dac8c52a639ec9f8d3ed19", + "openmeter/ledger/ledger_test.go": "a697e3200a4f1eeb14e3df690d58e103a46a3ec2bfb65a8dc23d1c4e82e286e9", + "openmeter/ledger/noop/noop.go": "69c754a0178997fe010433ec37e013942c6c3ca94879670ffb2f3133e3583282", + "openmeter/ledger/primitives.go": "c3d3c05df4f80a80d47f4f283047687f26f787cdc2aefd07635c31763ad10ee3", + "openmeter/ledger/query.go": "d5018309339ebb0edc9c8ac163fcf074e78557b8941d7b41a1d7f3434795efaf", + "openmeter/ledger/recognizer/noop.go": "f8cb40cea5deb73463428bccc1f23cdbcf7f69d8bfc43ad3f3647f584b12955a", + "openmeter/ledger/recognizer/recognize.go": "dda7cbb8dc2a6ec6dafa1fd13616f96d11b81044cfcb50bbe9b8267be5b6ed80", + "openmeter/ledger/recognizer/service.go": "bd3e060a45173203adc6dd6e174e222b1119711f559a2670e71672a3dbae39d3", + "openmeter/ledger/recognizer/service_test.go": "24ed6d3e5d75bc9fd14e303169e4b6d8337546b7fd98ea79ae20c3db5d647f83", + "openmeter/ledger/resolvers/account.go": "a91cea24572dd2e70030896873ad2a81ecf880cbbe70789462afff26757f9eaa", + "openmeter/ledger/resolvers/account_test.go": "e9f8cea9ef339ddaaba4f34537b21dd80c42d17817b28e44b6e75718a3920bf6", + "openmeter/ledger/resolvers/adapter/repo.go": "6db79edd872a575888a0c0d8c89d4a9390ef9a9b2688c2174e4586e0df3d2858", + "openmeter/ledger/resolvers/customeraccount.go": "01794b70623605e4cea049ce01fc00b2ee3cc5c11cb6c9d76511c398b91b502f", + "openmeter/ledger/resolvers/errors.go": "8ebb8b36244c1add533d02387b1a9098373dbd75075d8e69379c6469cf7d69fa", + "openmeter/ledger/resolvers/hooks.go": "4e527815f8e15b0e3fc6287d8711d57c7aa8b94715e7b7b801e5725b7437e0f3", + "openmeter/ledger/resolvers/namespace.go": "f5c5907bd9c2df23fd0b7bc82cea2cdb11814d0f11e55c5a92afc498299d7d3c", + "openmeter/ledger/routing.go": "011370d1d57e17fba1b99eb3607914bef5b0d509a7e41fcb6e90a1da96c63480", + "openmeter/ledger/routing_test.go": "0b3e669ead8a89415077cd86c23d1e20e06bf6ba6cd9eb97403524cb1b25ce70", + "openmeter/ledger/routing_validator.go": "876d3fd9e31af059c9ca38e069d950ce162586966ae1b6014e43c0f9a59788df", + "openmeter/ledger/routingrules/defaults.go": "25ec1a04b9362c6903f2f8872a972b30183f928216cafb8b5bc9c4462c70d54a", + "openmeter/ledger/routingrules/routingrules.go": "b0c635ebc5f639880a4ceb23fb15b20ff729a605ef16e84367ba9b39233b1503", + "openmeter/ledger/routingrules/routingrules_test.go": "042eea1f0a36d786f5282d0f650b842868edcf2e4bf84bab523270317f1bf32b", + "openmeter/ledger/routingrules/view.go": "31dd2e5b70b4e9c4e84ee4e9ad2a3026370470d2fb9e254d9839ae7349b9aec4", + "openmeter/ledger/testutils/deps.go": "4cbe4135f84830d3dba0c1f943bb34e89409c68228058134528e0824d35f2fef", + "openmeter/ledger/testutils/integration.go": "089684bce3d916cf4a6bf8a169bbfdc7467d3714a28e62b38d515efb7d6ece39", + "openmeter/ledger/transactions/accrual.go": "534a45be780459608d09b76d7c7230efeaa3f750d9ce03ab6cfa0dea206ef955", + "openmeter/ledger/transactions/accrual_test.go": "fbd9bb7114feeb8bcfadcf51b5b07d82473851869d88f2ba6017ceed29e6345c", + "openmeter/ledger/transactions/breakage.go": "647618a01ad8dd31fccaf967987e384ad3aad52f127ae9072703ae5fa20fbcd7", + "openmeter/ledger/transactions/codes.go": "8c657c8ee0278239e9ea4b72f59aee0154f55d37058907753409238e8d9dcc60", + "openmeter/ledger/transactions/collection.go": "4b1c83da89fac9d73ab0215f86c035b2c4e6ff391b8f420e2d551fbbae6117e4", + "openmeter/ledger/transactions/correction.go": "24fa3c669752202a315b65115e9e629168ac861d443fd6e0f8aa073498a23b10", + "openmeter/ledger/transactions/correction_leg.go": "5cab2fa97f3e9111c28232495a4fa017582c770fc56e60e4de42a70bcc42a57f", + "openmeter/ledger/transactions/correction_leg_test.go": "4f256ed1ad53ecdb15d4e259115cc2321804b5db4549e0358aa1f6b2420179de", + "openmeter/ledger/transactions/correction_test.go": "c1c621a65d5dd04183c81d58a874f3843a5568b5ed47281b8a5fdd25c4d6d0e4", + "openmeter/ledger/transactions/customer.go": "00b18e805865df2bb95e8403e587e2cec3b4cf9df8909e0be58bb37b3c54575e", + "openmeter/ledger/transactions/customer_test.go": "cdd5c7518bb8f24cb071615c73e73743d1b30345396ddb03b5978fdd666b0ea3", + "openmeter/ledger/transactions/earnings.go": "9b57c332d16d20ff605db8e8944feb93745039f86da8476072d46968549662ea", + "openmeter/ledger/transactions/earnings_test.go": "37f634777982641a72e1c33668c21608e04d30585204d7c68e6d4afb569f21c6", + "openmeter/ledger/transactions/entry_identity.go": "63e8edfbe616e1e2579905611690f71729d50926050fe1fb1f71f25b81b7ac5d", + "openmeter/ledger/transactions/fx.go": "462b340bb58367bfb550d1f43769c377df6da76d37430d2d87f50cbbffdfe716", + "openmeter/ledger/transactions/input.go": "5a35f48bcc17be2024956300ed44c8bed18b27b03c7d71e7e6d736b1e2e579ff", + "openmeter/ledger/transactions/legacy.go": "149fe17c55c364bdfb2c9a117fe2fa61dc53ee17c9d1b8553e463866ab249ce4", + "openmeter/ledger/transactions/priority.go": "22b95960edc044869a391985ca3916d5063d25af00d5f32695dc180a9f82310d", + "openmeter/ledger/transactions/resolve.go": "d6653eb3ec9f6291c37c8d9f44025d32b0bfbb8b84ddf7447c09ecb0e0952921", + "openmeter/ledger/transactions/resolve_test.go": "eafaebf9270f9fa8e366f7188634b208af5c9b777f95cc01aaaeecb5c7a3dca2", + "openmeter/ledger/transactions/template.go": "cd481aa0f608d39b95e6df6477e02c61ef38ed92690f98be3c0d5f1775072d2d", + "openmeter/ledger/transactions/testenv_test.go": "cc0210b6edde2d4a7ff2963a56df0ea374c55b0a9710ad6f38bfd87d146b2863", + "openmeter/ledger/transactions/testutils/anytransaction.go": "8ee7ef3acb9e74680e4245e132a564dc17f3b753add1fd33499e1cfc37db17ad", + "openmeter/ledger/validations.go": "03bd02849e21add200df46a8dfcb3d82e47d11192876caac16950df1882c4eec", + "openmeter/ledger/validations_test.go": "7c4a47e03b394191ce0a8064abf8d411fbbb3315ec2b9fbc3ee9c4e99b947e0b", + "openmeter/llmcost/adapter.go": "9aba6aa400ff71335904ff8eb249a8f16cfc2f30e6410b7d8e41c4d3112a98dd", + "openmeter/llmcost/adapter/adapter.go": "6bf72220ec72bc0e0cdc09f36584ccb3cea1c146541eb4e686ab739741ec2c18", + "openmeter/llmcost/adapter/mapping.go": "3a6aa92e90f01b3d8291e01c7f9f3cf083e671791e8fb8ff115dc20c1868780e", + "openmeter/llmcost/adapter/price.go": "d303d9f907c4e78975d0af4e3ec23ffba32b6f31f5b6184ca7e2d499adfecc04", + "openmeter/llmcost/errors.go": "815f16ff01d17fc20c6e91b504fc6f7f7f7efea3f503028656972cf46d40f546", + "openmeter/llmcost/llmcost.go": "d287cd80fabbaa71e5ccf7d977b97164605c8993ce7429ab48d68bb9b35c00ed", + "openmeter/llmcost/llmcost_test.go": "f79afba3b3077d76936488a6b6901ed43aab9366adb8b535d1031509b618152f", + "openmeter/llmcost/normalize.go": "80056570c00ad148188cf9a2daec37c114c288de02cd2fa13e8daded27ae7f15", + "openmeter/llmcost/normalize_test.go": "e1116ac3fdf07a79ea5949f879eaa545d8c2ebab1c4d1208b5034fd49d7cec58", + "openmeter/llmcost/service.go": "90e988e31f3423eb63d1367e41c7aa245145362a8f6dfe58024fca1f7f15ee09", + "openmeter/llmcost/service/service.go": "c0d42fd85017e2fc26fd73a1a596e0e1003c29e9aff2491892831047aacd7ca7", + "openmeter/llmcost/service/service_test.go": "66102f54356b52062943b0479dd43d1f6ce60ca7c4f8ee1a2cfcd6b4d5e345a2", + "openmeter/llmcost/sync/fetcher.go": "f2e2b752574972b03f7dd74cc15dccc13ef59e40df01f2e74070a1535251fdff", + "openmeter/llmcost/sync/fetcher_modelsdev.go": "48ca95143e10d92c14469528f32bc38325f5a1724f7e4b68d2d1c9e7914d5e0f", + "openmeter/llmcost/sync/normalizer.go": "c5a45d1a439b74b021ae5988268edeef845c7a3a02c976fd61c1d0ad4b2b77c8", + "openmeter/llmcost/sync/normalizer_test.go": "2db7dc296ad77e43d5fa12d795016b3b8ead319c619f9053c7dffda86f974823", + "openmeter/llmcost/sync/reconciler.go": "e35a52d8ccc0d4cc669d3f705bd0afa2570f10c7b09e9526096867e12422335a", + "openmeter/llmcost/sync/reconciler_test.go": "d495f3da1b9b6cc769c9bdd6cf56f2faf73988fb5f0ba9bb285d03bdf81a60ef", + "openmeter/llmcost/sync/sync.go": "5344ce8ab0a6d393f3effc6cb5660847bc8b437e051f17cfd3a23cb3243adea4", + "openmeter/llmcost/sync/sync_test.go": "c90e9cbe9554200a4d80be9ff646a7956d2087415a2fd6f4758587db350a9772", + "openmeter/meter/adapter/adapter.go": "fae0e18b7a2f38613d6fd6ef47c1000cd245d5dc99f1947c24b9c603e68e6595", + "openmeter/meter/adapter/adapter_test.go": "4fb9f16e76f7df818cc553c30b68407a889071a8f66b9f6729b08e8caf5799ab", + "openmeter/meter/adapter/manage.go": "f5db72766d07eae86dac5b77c3db878a7189e00b4c1459f039f87a7240168bfb", + "openmeter/meter/adapter/meter.go": "ded5e88e37274a62ce44a7da95a8afbc519005be44528d1d7228689a003aa0ac", + "openmeter/meter/errors.go": "eab001b5e042c4d8ad6ba6851ac58ca590081132645677316e73eb719742b6cc", + "openmeter/meter/event.go": "e948718c381012a658f03586742fb41af8f17848accf0684eb9b3c878199bd7d", + "openmeter/meter/httphandler/handler.go": "4ab36c6bc30c38ba8b4a5f9567c31ce17499ca68d91274dddfd61ed5740aeebf", + "openmeter/meter/httphandler/mapping.go": "d42bf462602aad605fe1e178af16989ed0c453e425e8043f1e1f66e846591ff6", + "openmeter/meter/httphandler/meter.go": "8317dcc8db4cb5732fc1084e8aee23a05c7d473ee711943018d70eb3b7972cf2", + "openmeter/meter/httphandler/query.go": "717a25eaf55d7b1abe8f79e29990b55e219e7b65b2f66e4e103c891aa44de0eb", + "openmeter/meter/httphandler/query_csv.go": "fac60989f93fd02aa888a2584fa474d4701497baeaf1865774d462a59d5c0890", + "openmeter/meter/meter.go": "52cca423bcb845556a10fdcc4b81e83e73f3ca8b3b5b56fbeb2250d1353c06bd", + "openmeter/meter/meter_test.go": "3954a821f2090f108c1e21db1f4c6fb16c1abda562e4fdfb20f5f65b81d2a6ac", + "openmeter/meter/mockadapter/adapter.go": "5427edb7200d4b5ca9c52dfa4e21b7414a562a742bdcda45553251a3d22ab570", + "openmeter/meter/mockadapter/manage.go": "e1e7f15c92bea5dbd74a4c325b6ab5d579fb3d91b1d087c5c3d4564a7b656839", + "openmeter/meter/mockadapter/meter.go": "d17dbdd837ca713e5f94f029ffbb42cec371f316173e9de1bdc50be12f64ff8b", + "openmeter/meter/parse.go": "480baa70ef2af15aead5c574b76c6bf924e75ca5850b39b0439a1f6438d8ade2", + "openmeter/meter/parse_test.go": "bf7ba7eb4934ef67c5a3a5809815abd1c1818c76d1405c086bbe7f7480993caa", + "openmeter/meter/service.go": "d1688c099699cf816c742973afa92a604dac792ea74fc20e5cff84b4d50fe3e0", + "openmeter/meter/service/manage.go": "56ea62d419a0da198b70427a09898b426fb3a4c75baa4c2fd003d16a410e7e39", + "openmeter/meter/service/service.go": "cf8c975eef3a6d908f7c4bc89e1cada796f573599c94018d6fcbc866278ab2e2", + "openmeter/meter/service_test.go": "96de8451ada025ddc70d4ea4a47bfb49756cd10c038529eeb28d2e5343beddde", + "openmeter/meterevent/adapter/adapter.go": "44db41a3d0622a641cfcfe832b7b9970a30caac9a1af09e0da3a856bbd3bfa58", + "openmeter/meterevent/adapter/event.go": "55fefa89451f407ce1e8fdea281fb1d231ffb8101e90f24e18561b4ade72ec1d", + "openmeter/meterevent/httphandler/event.go": "137b4acf628f4c53b424260829145b055d3a5bf1634711c76b13c1802a9d26e6", + "openmeter/meterevent/httphandler/event_v2.go": "7a742df73765659eafe3abcb011756a80eef2edca6a6b6b4f075c570f312d050", + "openmeter/meterevent/httphandler/handler.go": "c87b9a04bde539ebf9e7d2770430d06086ccb0d2095b1cc1432c8b43b6b5cda4", + "openmeter/meterevent/httphandler/mapping.go": "3b57cf23c0d65b57155c8a070a5b4ab7660cf0478065bbc9b11464d48021cffe", + "openmeter/meterevent/service.go": "bdf87ef75e1f112fa94ad256447a018561595c8704ddd2932fcf402564b10bf9", + "openmeter/meterevent/service_test.go": "fa207725c756300b5bda7c014f06b92fcd16e558d83c85a0c28c8ea2e488397b", + "openmeter/meterexport/service.go": "66f06b5196573033cbc107593a5415b08aefe8d8115675b9b9f8f7f027518a83", + "openmeter/meterexport/service/funnel.go": "2971d8bb0f604c5bce3f5eb5840115a31407d9b5a942a6d2df17ec33c2f5e5ef", + "openmeter/meterexport/service/service.go": "e1922a5aee23c6544cdc179fb5722daf22c20f82b799a87351584aa7b9b01c1e", + "openmeter/meterexport/service/service_test.go": "3ccae6bb832db9b6f0369ad7e6c9966bb005807e87ab7ac42256f8233988e0e6", + "openmeter/meterexport/service/syntheticdata.go": "712eb2ce055ef88e61e02a135e73492680f18af3da8186a515a84f1fb357a6d1", + "openmeter/meterexport/service/syntheticdata_iter.go": "83157ba9519c6db721be937532705fe4e9b2cc3642a26563def07dc5a5ca3ba9", + "openmeter/meterexport/service_test.go": "3a587d503f5bc43b3bec7e54cd00797083b6c87139bac93931c40f65f0fae798", + "openmeter/namespace/namespace.go": "32be311a8cf69ce8f157b47e317fb47aed69606604ed4ae53e0f44b673f44270", + "openmeter/namespace/namespace_test.go": "53146999261a55125bc4e8c6e4e2273a6ebf580bcb141cd6dc0e003be7fc37fd", + "openmeter/namespace/namespacedriver/decoder.go": "8c78e849b2ec3b11f9d63eaea7e09d613d0354f1171bbfac16b44da1fae3ebeb", + "openmeter/notification/adapter/adapter.go": "cb74b2d4b67ac4d589d407b34f6c54890c4bfc895d743a05cd3137f897351684", + "openmeter/notification/adapter/channel.go": "23253cff7e0a0a66266a9cc03ee73ec916680da4cf05505deae944b04e957278", + "openmeter/notification/adapter/deliverystatus.go": "45e4c6740f8917db655bcda95f048a7512b6427724bce1091e26423244cbcb32", + "openmeter/notification/adapter/entitymapping.go": "f747d1ef53157ba821020e591477ab101e4485db1964c00e06a5632f942cdab7", + "openmeter/notification/adapter/entitymapping_test.go": "23b6082feb919dadc099c4f98bde979ad216d451bd5353cb92b5af19ebcd8814", + "openmeter/notification/adapter/event.go": "c0fd3eff4d42e00a5a699613def07ee5b1e2b3baae256a7f652b61594332d809", + "openmeter/notification/adapter/rule.go": "d41c1ad6a41359434595ccf7d1afb03f316686227d6909f55a2ac5216a1e626a", + "openmeter/notification/annotations.go": "ed0ce11fddef99bfedaaa809b66b5c2e1dbb4e86e0443651d3f2ab100efe6dc5", + "openmeter/notification/channel.go": "1097d37ce4cc15cdaa093f0fcc02824693b97d10a6fe3ed9ceb1c0bef83ed17c", + "openmeter/notification/consumer/consumer.go": "fd54d79e6252e860b9a78996574901eda9a9bbdcb305e2ad245551eca43849e7", + "openmeter/notification/consumer/entitlementbalancethreshold.go": "56cd8034fb24da1e9465b12d4bea69166936d9410380a29c3cf655889e2e1e61", + "openmeter/notification/consumer/entitlementbalancethreshold_test.go": "ea83111143362903cce2c80521c2cc4f7063a7de25b8b13af8d845dd47d663aa", + "openmeter/notification/consumer/entitlementreset.go": "4acf59d883562ff860c74ccb3e0ddff4835f620eb297745d3f4d54b1dd3f3c26", + "openmeter/notification/consumer/entitlementsnapshot.go": "8af11d850aaf678f015e07286b6649755bfda4e596e63a0b54f69e92075cdfe6", + "openmeter/notification/consumer/invoice.go": "ebe928f8686eec657c97fd9f28afb0eac880c993268bcfd226f7a5ddc241d06c", + "openmeter/notification/defaults.go": "2897cad8c3257c0892808beca03dfa62c12a3a1fa06ac5def9fc473abb651d79", + "openmeter/notification/deliverystatus.go": "449fe549b98dbdb510ba95045acb0080d2e1b792809bab67268cc4936cc6309f", + "openmeter/notification/entitlements.go": "e8aa1b0b4a9eb666af8b16512a35838ac80e082792845df979900bf75602b866", + "openmeter/notification/errors.go": "7076e5b747867f24853d911c33538fe9cca640701ed2a10660d53fe12129910a", + "openmeter/notification/event.go": "0f1d161692cc52e27185d1b2ac1f3a0d00bf54f19b41f10fb226238514ac052d", + "openmeter/notification/eventhandler.go": "42c0e33f65e595bdaa3d271aae9cb5661b314a5a12afcc9b2cac35a398fadb7e", + "openmeter/notification/eventhandler/deliverystatus.go": "ff4507769343742f7669d930899f07265d6134e7fc4db7147ceeb8709c8f8c58", + "openmeter/notification/eventhandler/dispatch.go": "47d396c67267accde80a5d5bb340e3630e1e45e2db7181a788662c90e0583c99", + "openmeter/notification/eventhandler/handler.go": "d4c6f8c8944b508adba0bc8598b448f60929f046b4e22be6164e0526156dfce2", + "openmeter/notification/eventhandler/noop/handler.go": "297888f6e4eec3ee01c30bf12347f9e2331b73b44dde067c455d6e94e0cc61b7", + "openmeter/notification/eventhandler/reconcile.go": "c3e93997ae40ce14c86f16fce95cfea0f54756afd96045639c125276b0491007", + "openmeter/notification/eventhandler/webhook.go": "f3ba7120d7a0b3f0889e2fe3ae3006642a456c438a02db0966a674b868f3701c", + "openmeter/notification/eventpayload.go": "28f3ef84cd9073d36d058d25fa1eca6ba309294e511483741783307c21f3c8fc", + "openmeter/notification/httpdriver/channel.go": "461e750c245689424713d1e667acf18cf23939ffb3f559f5cb60ca403bfa8850", + "openmeter/notification/httpdriver/errors.go": "5bb6c3ffce71ea973156f0095f92dcc942ce2fc382db97bf8cda055249e86fb0", + "openmeter/notification/httpdriver/event.go": "28b73bed22be50685b4862548377f2317fbfc8ec2ae55198bb36ccd5195300b9", + "openmeter/notification/httpdriver/handler.go": "c68fd8e0afb9b1a0569438252551bc7b8adfb425d3b936c9837229c4b8f1f365", + "openmeter/notification/httpdriver/mapping.go": "4c757c51c559533e1f3d1a79cceb295c45e2b361c6c91261955e67d093b56a63", + "openmeter/notification/httpdriver/mapping_test.go": "285e4d325b280f2f46a3e0b3dd998ce6fe67d894443919d9e3e5efa46043a2c3", + "openmeter/notification/httpdriver/rule.go": "c7771313fd095496104af133fd06cc9e5bd3316c3a5de1d60333ebd1135a71dc", + "openmeter/notification/internal/rule.go": "6fc151554cb3e46aac6b8dc30f8f5c068a540c84b3dcd9817c88e91f6c576217", + "openmeter/notification/invoice.go": "8a1794cdd4de0c1d582375be3066f836ffde3a1a36616623e54a9f64ebe4d18d", + "openmeter/notification/repository.go": "5cca0084a7cee73c4083682f901d8a67944a9218d389edc7f984707a83517199", + "openmeter/notification/rule.go": "f5a30e3504aa3492021425758f75ca446e4d668c7e320e42b274688444e088f6", + "openmeter/notification/service.go": "bbd046e18f125491f91b45d75ac090fb8cb1acf8e33a39302f16e0bdc08a63bf", + "openmeter/notification/service/channel.go": "8e8219b579e33ee1b7affafdc006df84df59d06223441074ebe060ca867d4343", + "openmeter/notification/service/deliverystatus.go": "c6d3be65a72c3530833143dbc97fabcffd379316dcafe38ed0396f5c5afcc8cb", + "openmeter/notification/service/event.go": "270801f41b0bea1ab0a32820277a3c43964041ddf5fdea8cf265700fa50f65ae", + "openmeter/notification/service/rule.go": "c4e0c4dd259f0af8c92b44db6ce9bf84af517f56f34ca48abd8f8bf3a7539553", + "openmeter/notification/service/service.go": "ada0778818318e236b88d1a3d63005475d5d40c34da5b5c6f7491d640f0a56a1", + "openmeter/notification/utils.go": "7a4e5df1cc7ca91ba5e28b61ec4f13fd2ba946ecf4378dc4c93106ab3f8d5f2b", + "openmeter/notification/utils_test.go": "096a881c01e89b123537c5f1768feaada35543c044960b3dc0ef80f49b3193fd", + "openmeter/notification/webhook/errors.go": "9b9ed9de87ade559fc77ae75c1e66bc4ef94f7c00e85ee26e5694016e4afd4ff", + "openmeter/notification/webhook/events.go": "521d61126f884917470cb069371296ec2a1cdc720b153f1fa0f8034e9e67229b", + "openmeter/notification/webhook/handler.go": "e60f355176612a4ba75253e3649d5390b9c2c599e1dee024243db55c6f6a8bfb", + "openmeter/notification/webhook/noop/noop.go": "aad91131fea5de2d690aa348bbbb050e8336f1d973a0179156d4389e4e6ad653", + "openmeter/notification/webhook/secret/secret.go": "118a829596cb8910ca0c98cbe058f5dcaaf9e192e853c2b1018f4f1f35e8af5b", + "openmeter/notification/webhook/svix/annotations.go": "f44b375821add82cbd113c3b12036c63a3d8bd7ab297b2a0cc9a7e0de3e63bf0", + "openmeter/notification/webhook/svix/application.go": "330dc421d85328dcc32e24b02df047f80888df03b7de17588d3d5b7cb707fe16", + "openmeter/notification/webhook/svix/event.go": "1d38841f1f071468bd9519d9fdf97127cf714eb9bff9a485e250a8ff0e180001", + "openmeter/notification/webhook/svix/internal/error.go": "c0c7cefc622201379f07b601ef0ededc75fb20a4d1b22292e1d5e5533bed8ba7", + "openmeter/notification/webhook/svix/message.go": "185f9abe1959fb23c88a3f714a378c4176fed84f64fe8b935caa83cd89e77d67", + "openmeter/notification/webhook/svix/svix.go": "2f73a02c9dff09f1160202f9e86c5e8fd64d600d32c39f97e630325fc5fb954e", + "openmeter/notification/webhook/svix/webhook.go": "cac1004290e78621e681d96f94f7ae66c3e54124105c469b4005a695fbfed15d", + "openmeter/portal/adapter/adapter.go": "6dc4f0d6680ddafb9e579e777ad42e41ebc505f38b978d34627c5c35438f0042", + "openmeter/portal/adapter/noop.go": "85ca63805c116f416c70a3234a4e8fae547527055a6d0d2662293b56ae35eadd", + "openmeter/portal/adapter/token.go": "c2ab774c32fc43eb87b6349aeea7d798e0d162fd4fce66250d62e23ccb5942db", + "openmeter/portal/authenticator/authenticator.go": "9279f49b44db66fdcf6c52d80b22b1c053e79c98a04a571073748f380675f34e", + "openmeter/portal/httphandler/handler.go": "99cb006c9c216b5e67aae3d1b0437d96b06887173731eaa636eeefcfbb9aac76", + "openmeter/portal/httphandler/mapping.go": "ef2c389235ef651da802934c140ea536d020e458791b36d9017abb649b4c1204", + "openmeter/portal/httphandler/portal.go": "33156ea7ccbb4b6f229307a165b52bccb84eed5a8d3acf3feba2a489b0af15c8", + "openmeter/portal/service.go": "6a398c13f6e5df3b79a6a10ba7fbf58c3476780be4ca4a77e46ce85e401a24ab", + "openmeter/productcatalog/adapter/feature.go": "af2d672303e2755c3cc3f5c44a57010bccd2d0a7087308437d4cc0fbcc70b16c", + "openmeter/productcatalog/adapter/feature_test.go": "d2e16bbc469810e1c8303313f913904fd558485bc337385b46afe0fdb8ece7d7", + "openmeter/productcatalog/adapter/transaction.go": "b9e5d32e30cb50f5ceeaa6a45006d6b318d1e2838f7e152ef5b0a88f26f575f2", + "openmeter/productcatalog/addon.go": "566d52711d0b2a2b777386540f69e4369fb5a1b904c4e8f3b161cd61a36a42c2", + "openmeter/productcatalog/addon/adapter/adapter.go": "b09b7a9d2d3f16b8cca41361bdcf9cd29260704bbc74dee6f164360cec7ec974", + "openmeter/productcatalog/addon/adapter/adapter_test.go": "47b6964c9b8c31bd42f736aadf964b597dbca5f572eeee564a20213a6b91626e", + "openmeter/productcatalog/addon/adapter/addon.go": "424af7247788082cbf743bfaa653da64d0d612a0b41b4f12a6db29b984085f79", + "openmeter/productcatalog/addon/adapter/mapping.go": "7ea51889165c5db93917b81642286df78ab63b3bd5e78c28dbc65a2cc8801cc9", + "openmeter/productcatalog/addon/addon.go": "bce0eadf618110b26e10ef5dd1cb68862a7630061bf21f1451ac7fd51d0e1365", + "openmeter/productcatalog/addon/assert.go": "4ec5f5bd1309a9001ec48c2ebd3e8cd7f6c7503deaeaab738612e983d9237791", + "openmeter/productcatalog/addon/errors.go": "8ca24b4ad3abb03dfab2937914d21c1dccb693b57f6fd3c029ca07b2dc2f3507", + "openmeter/productcatalog/addon/errors_test.go": "855f09ff98978347534b789068a6af8d2d605101d0a98d83a40019a8e897437d", + "openmeter/productcatalog/addon/event.go": "66544b466bb9c902cee1081f644bd1b3653a96251d7a4c5633f1f8cdde7a021b", + "openmeter/productcatalog/addon/httpdriver/addon.go": "58e28f27845389e1c7d9603f1ac16706aaa3194de8137d47d81908c0d4f5937a", + "openmeter/productcatalog/addon/httpdriver/driver.go": "48f370ae17f8f31092fc6aa712b32669dd15496e3698092d89cf652219694a35", + "openmeter/productcatalog/addon/httpdriver/mapping.go": "797ec41219ceea758e55fde8c8d0fd64c245a6a5ce9be45bc7bce167fe03c8b2", + "openmeter/productcatalog/addon/plan.go": "5df1b55b606f5870245e5637909fba88139627d905644d9b2c2fb6955a1f9c77", + "openmeter/productcatalog/addon/ratecard.go": "95e4b9a6e78f1148a3d05649b557f1a45f6362c4e5572ab1f71b921e1c6ae218", + "openmeter/productcatalog/addon/ratecard_test.go": "1918cab1a998c5508f0a6e5a88b96494d32ae12a93524dc28937e332c99ece26", + "openmeter/productcatalog/addon/repository.go": "b903ce504212353b0eae667c2dad1ea99fef806d5cf8bc99220ab243d4eacf4a", + "openmeter/productcatalog/addon/service.go": "e8341421e150d6a46739e3a2504dfa1a35d79c96c90345718c2e6a1061d8c5a8", + "openmeter/productcatalog/addon/service/addon.go": "6089173aeb6fb4ace8790c8f617310a64894aed9c7e7dd4927e3c59c1f79bece", + "openmeter/productcatalog/addon/service/service.go": "c25375dbacbaac41abbb05ec17c586d19c8161a7e0a301e9f2473d6e32641205", + "openmeter/productcatalog/addon/service/service_test.go": "bbdf06dbf7d6f2038fac3c6769df972fdaeb6f31bd4fa55eba209f33e7beca51", + "openmeter/productcatalog/addon/service/taxcode_test.go": "763fbebdf97837e0bf8429a2f68d9442814404fe95c1bc80c2429db7f532f3b8", + "openmeter/productcatalog/addon/validators.go": "bfc4df87a9b34eab30a023d52ebb33b8697867c322b23460b9dce34d7b92272c", + "openmeter/productcatalog/alignment.go": "ca7a621ff35c989dc5401ad52813d0c8606566ac5c23aafe3f9f8aec3c17a28a", + "openmeter/productcatalog/discount.go": "529678e4fdb39a36670da1fdd01c73425492b35bc907cde6e536a7dc4abb5b0e", + "openmeter/productcatalog/discount_test.go": "200efbf579b70e7f2dc8d342b656ded462012fc2ef90f9f5d0c3ca65ccb96551", + "openmeter/productcatalog/driver/errors.go": "69137010dd9b17b72fcdb6a420809446034ee99a267b22f937ea5f189cce27d3", + "openmeter/productcatalog/driver/feature.go": "f80ed8054a5571628ba7ba52d63bcb0ff74703b79580dd326301ef81ea6e5e5e", + "openmeter/productcatalog/driver/parser.go": "2a933939681d8c3619003d8ea66278e830a39e3c7eb387a5dde8683e1095365d", + "openmeter/productcatalog/effectiveperiod.go": "2c3e8691df3c5c65ed7fbd839c6b21eb959d9b3796265d709066b5f90d4acdce", + "openmeter/productcatalog/effectiveperiod_test.go": "f1199d58f0ad8f1b21528d26a5e992dff8112610b1ba3b8d44efb22913850bac", + "openmeter/productcatalog/entitlement.go": "def4f87419ba985d752b0c02e8ebf358d01480cf60419eabe569fdb546f7a8dd", + "openmeter/productcatalog/entitlement_test.go": "35c15a4427445e67829bbf9e0ac5b81e26fd9873d701762b279b376b0fdbec06", + "openmeter/productcatalog/errors.go": "8daaceebb30275ca2d21f54b2ab66c48bc3017355841d8b0c25ecff452bc1131", + "openmeter/productcatalog/feature/connector.go": "339acb1092eb9d5abe3fe627e4234e3cc33b7d0e32f27ca7e2a0b27a63ad19ec", + "openmeter/productcatalog/feature/connector_test.go": "5eca9b46885725fee638cc854016681cc5ba85086157b5ce39af58516fe33aa5", + "openmeter/productcatalog/feature/event.go": "58ead446578460c5615274ecb503cc1314db7f839103d6b50ec568943ebe5e14", + "openmeter/productcatalog/feature/feature.go": "b020e5793a74b5fc309107f1eb46d6cfa297b29ae2d7f33b8a2d62429d55a270", + "openmeter/productcatalog/feature/featuremeter.go": "d019a99676bbf227a48f8558139fe127579f41a684be31c3504f227d39d5659c", + "openmeter/productcatalog/feature/featuremeter_test.go": "7d46022c24aa4da88b8c313b3cd7fad4cddcf286f6382c8554b55672ed9be821", + "openmeter/productcatalog/feature/meter_group_by_filters_test.go": "8a0808ee90799129a5c6e43ec90a8b45912f1071b64bf375b8d1cb2d71ce064c", + "openmeter/productcatalog/feature/repository.go": "fa36292558f79b47c0b9de3946b2f1f71b31faa2743245c0ac1094db1c50e458", + "openmeter/productcatalog/feature/unitcost.go": "028d04e7f339ff3f01c0eaebdd77c384d01fe763e54d4bafc832e480510646d1", + "openmeter/productcatalog/featureresolver.go": "ff414eedcb45a1274854cd943a82184c470a538b5d38e3167d11e50b43691157", + "openmeter/productcatalog/featureresolver/ratecard.go": "5bbd6fbcd4ade85ce06033788ffd84d8520168aec978af1c00ee22158b6e47a1", + "openmeter/productcatalog/featureresolver/ratecard_test.go": "8c979ba646720e90d2e1487d05754dab28e02a391765011203f1dae6f58982bf", + "openmeter/productcatalog/featureresolver/resolver.go": "5f5308ab6daebbb649b50858435173eff01ba642e8a61d9882cdd350dae40de4", + "openmeter/productcatalog/featureresolver/resolver_test.go": "24ca3acef85bb8d96c65d0b827e4233ab8de80eed9c173fee440ad7a9bdf059d", + "openmeter/productcatalog/http/errors.go": "258741803472f2eec55ef029e616fee643b04c643b50714c0c34ae7f6af7df54", + "openmeter/productcatalog/http/mapping.go": "8320496d10f892dfe39ebc842a121dace19ff51dfe9ce4c4ff92c7d3eb0872a8", + "openmeter/productcatalog/http/resource.go": "ef8ec808f058b19e80ca2c2542b59b3ea3de4281c5a51c67f00ce48eb9fd586b", + "openmeter/productcatalog/phase.go": "ec290669ae9db6245ee24dc8c19802e1fe2f37b52827b3796d7eb7456d14bcdf", + "openmeter/productcatalog/plan.go": "f0db48f4ac455b988014939c3898125795b07114662822357c5e852caed62eb1", + "openmeter/productcatalog/plan/adapter/adapter.go": "3d28d9150710bb512cbe5e4b19a9ad2cbfa31b344e2e0e7aa92427794a4302f3", + "openmeter/productcatalog/plan/adapter/adapter_test.go": "ff600593bd660b9db5feff3b7c813b5a68c9c09586bb162b360633cdc53c4d07", + "openmeter/productcatalog/plan/adapter/mapping.go": "147263b6bfb1f03044a61a4f3e79f967d859a428f48d7e56d25037e69d211bbc", + "openmeter/productcatalog/plan/adapter/phase.go": "84acbedf5ca2d1e12ad41058888c2391c41db5ddf3af8490b274235d244f6efb", + "openmeter/productcatalog/plan/adapter/plan.go": "0c3a1c9c06a63ee7453b267ae578cb49c209c3a5813c0c22002d98a8bf2a2a71", + "openmeter/productcatalog/plan/addon.go": "445dca14b13a2adcc7493ddd4f71a564d8969f221dcb3c21652d61784c708ce4", + "openmeter/productcatalog/plan/assert.go": "ce930e01ced285c8bf566a62785040590d2f02fec9038b4efb4548760f5fcd8f", + "openmeter/productcatalog/plan/errors.go": "ffc6d4e0c7aef5f5d3b5844dd09d6679caf9588dbe28fe815a7cef42af03095e", + "openmeter/productcatalog/plan/errors_test.go": "9a5dee0aa6ea363ad670d71de7074400418b8701fd1f5064e79e417f87782a71", + "openmeter/productcatalog/plan/event.go": "c23b03d78399af3b37929ec21bd2859cf753e4322f7102e41721f05cc977dbb9", + "openmeter/productcatalog/plan/httpdriver/driver.go": "bc1c5ad749f2af7057840a44ea7f628426b6c623807bbe3054dcebebc4491184", + "openmeter/productcatalog/plan/httpdriver/featuregate.go": "84634524e6e110a64df991129d5394f2d75ba1e72b46308cf6e9a047996849b6", + "openmeter/productcatalog/plan/httpdriver/mapping.go": "843fa2aefc78ca6f3d3ebf57214125a396e273993c6956d3f45d8f639ed14107", + "openmeter/productcatalog/plan/httpdriver/plan.go": "4c5eda73827bc64e2ef602d7ecd7846b6656611d72d4210ff836d6309d59e089", + "openmeter/productcatalog/plan/phase.go": "34be3cebfa1ab06e93ef41af40a5617d81240f23f18fa6a0cfec08bd97acda5d", + "openmeter/productcatalog/plan/plan.go": "97560679d48be2373a7f7e2e7e2649578b2009c4d4c5b0e802c25f5b3dbd9e9a", + "openmeter/productcatalog/plan/ratecard.go": "616bab076eeee1c693035fb68a5245fa22aad917129861f47360de02e41fee10", + "openmeter/productcatalog/plan/ratecard_test.go": "9b3558cec5a3682ff6bc67bd6b29ce1edf2b2ad01703ffb5390c4a1457b5d119", + "openmeter/productcatalog/plan/repository.go": "8fc41a385d8333af9dcd0f71373623f1463a63ec2546e281243afbb80d81f6e5", + "openmeter/productcatalog/plan/serializer.go": "8910b4f79ed30211d40255354b7c81aac5f26247192a66b9fef4808bb874cc04", + "openmeter/productcatalog/plan/serializer_test.go": "0879db4c3760c2ae2137ea1def8ae56474fee7d2e33a0adc971829e15db8e397", + "openmeter/productcatalog/plan/service.go": "da1d09794b022801aa50c2de4b0d1f9d05a7a1853095fb9fed2d0913d8174836", + "openmeter/productcatalog/plan/service/plan.go": "7b28dbab72b9eb837dc404fd4f17c78404e5ec884aee9418fd5f9f6f6532811c", + "openmeter/productcatalog/plan/service/service.go": "cac427880c26710a9e086a2fce24d16e1e3764c0b1c5599723626d1593f7edd2", + "openmeter/productcatalog/plan/service/service_test.go": "2d593c2a85df5e5cbc83a2c42544b4d59bdc24135ab6a6983f961794272bcb2c", + "openmeter/productcatalog/plan/service/taxcode_test.go": "eb75c470187cfa52fbf627edcfffe730f7a4b60a9be0df4ca34d328dda506256", + "openmeter/productcatalog/plan/validators.go": "d3db0091486fd8c86aa49677be3d23972b2c8d9286c45e67e03be48daca186b3", + "openmeter/productcatalog/plan_test.go": "046700e69456745bc4b23b345b68ffe2397cac1280cac934c61527a25dcf9558", + "openmeter/productcatalog/planaddon.go": "2224d028d14261907b230ec2038d634292820a69b51906e052c3698e7b3faf4f", + "openmeter/productcatalog/planaddon/adapter/adapter.go": "f8d668b8ef08cd5404fe89c4d9f799707d6e7f3f519986ac1ac2208c24828a44", + "openmeter/productcatalog/planaddon/adapter/adapter_test.go": "ff19216247246fbf9b46fe1c8c0a129dbb31d377be10321c2121d59fd96940d6", + "openmeter/productcatalog/planaddon/adapter/mapping.go": "41b841092471d0b80a8928ae94f5443543420ba2cca434128ebe4cdc986d9334", + "openmeter/productcatalog/planaddon/adapter/planaddon.go": "4e752d2f8cd7c2424709741eb30baa7bca1c31c1a988c3a78c2ac5c97fbe85bc", + "openmeter/productcatalog/planaddon/assert.go": "7389d13e5645d7cf75aaea74930414e6f64e13fb98bfd5988752957d255d3189", + "openmeter/productcatalog/planaddon/errors.go": "32c04d7cda45724cc1ed32334d416162490656f0e8f26a404a2ee1c74eb785f2", + "openmeter/productcatalog/planaddon/errors_test.go": "790d5cc8d427b4577d94f39fd29883e2f3c26c6a6c64e1f4920c059e4e619a68", + "openmeter/productcatalog/planaddon/event.go": "f11ccb18a02a98834083d6bd86a8f1c22c9245ae53e092ff2c5e8b080ee9adce", + "openmeter/productcatalog/planaddon/httpdriver/driver.go": "b664e609ada0a75e2e9f99fdef15e321a8622d5a0e4d416235b8afdcd1992b95", + "openmeter/productcatalog/planaddon/httpdriver/mapping.go": "4c09a765bd6ed4e340d74d25bf916b6e2fc0a8c081dcd74face77ee1488faf5a", + "openmeter/productcatalog/planaddon/httpdriver/planaddon.go": "150bf100d762f81e10af8bea9f2e463ce2cca0024ed636493b7db69d00da1821", + "openmeter/productcatalog/planaddon/planaddon.go": "0be50106172f42029a19f3c1774a1497799939372511348d2e95d9319239ef84", + "openmeter/productcatalog/planaddon/repository.go": "c15c37f75a6661f96770645ae2b8cfa5e75fb83c6aca93bfd707d9c8ce09ef8b", + "openmeter/productcatalog/planaddon/service.go": "42baefe6d4afdb82c2b98d8465c9e8a0ab06600388705255f4379480eba06694", + "openmeter/productcatalog/planaddon/service/planaddon.go": "ae04cb47313aa2b02de3a9c387a90fda04e29f11381a3c8bef6974223c830d38", + "openmeter/productcatalog/planaddon/service/service.go": "89427053b6064418a3e715988366480c712a8eb897bfa8f841be9e2b524fc051", + "openmeter/productcatalog/planaddon/service/service_test.go": "9a06c79b8f497697437c6a08bf834506f4da7de102875f27d0c92992b88cc0b8", + "openmeter/productcatalog/planaddon_test.go": "69733ab808993c6cb222c649400565df2a4cf0c5aad6e3c3cbf1ffceed97fab6", + "openmeter/productcatalog/price.go": "0f625719803194b878336ca92ad94e59760f762ff0b6f7221c65789996aa87ac", + "openmeter/productcatalog/price_test.go": "ff318896ae90faf2c6e309444c1dbaabbccb4eddc3e8265eba2fd29c917cce01", + "openmeter/productcatalog/pro_rating.go": "6bd69b90a67bca128cf7e346e9c39e5d3d130db051c2a574120c1e65521b0474", + "openmeter/productcatalog/ratecard.go": "c57a3e9f4bde233df088ac690d8e60b91549025f44dd9918be8b5583e2cbb997", + "openmeter/productcatalog/ratecard_test.go": "242dd4afc78861bf07c9ec44433191a7952210611a9a9e6f89129c71026f6e4d", + "openmeter/productcatalog/settlementmode.go": "75a1028f2eb2468d99b51750fa448d7e8500a7f157c4ba51f3f1e8d5b41a404b", + "openmeter/productcatalog/subscription/http/cancel.go": "b0b666ba4925e2b7af14acf741093e1d735fd3c44f5d2b5e36ab4fd01070e833", + "openmeter/productcatalog/subscription/http/change.go": "231a89a51fddc940f717e64ce6c2b56697e2cb17158ada1ef36ecfd6846c7e6a", + "openmeter/productcatalog/subscription/http/create.go": "a36aab39328e27df37b661e43b77c7b1c947fc832e033690a8cfa9fee8f194d4", + "openmeter/productcatalog/subscription/http/delete.go": "456ae6d273e2dc590fb1530a40f552950d12543f625ec346aeb84cce89e51b36", + "openmeter/productcatalog/subscription/http/edit.go": "c78b07225981d6a6135072e3e64b8aa7f0e38bb30b3f5526d6d58b6d4661611c", + "openmeter/productcatalog/subscription/http/errors.go": "8cf85480d7eff776671b208d8501ba47874ee390408c28ba21ea6409f616ca2c", + "openmeter/productcatalog/subscription/http/featuregate.go": "a6f21f84ccf51155bd932a79de56f357b2979a98097bcb7eec57e8da04f81a4f", + "openmeter/productcatalog/subscription/http/get.go": "774279e2b1ae20ed498a2e77900967bb9d66b5f782181843861064162cd80e8b", + "openmeter/productcatalog/subscription/http/handler.go": "8e3dcde8d9559469fb240c5988a063fa54e3e2bf947f57b56de8b7de9230bfe7", + "openmeter/productcatalog/subscription/http/mapping.go": "57c3ea3f43218471781db8c11baec7fc5c4a4eac37ddd913044eb0fd3dc75821", + "openmeter/productcatalog/subscription/http/migrate.go": "b1c16ad9497c41acd912236d3af4ae183117000d90f1524dcdc172cdaf002630", + "openmeter/productcatalog/subscription/plan.go": "e366356ce38108055101e853481e9d4d2dc650d2be36e7d35b24ea2c5a0ff94c", + "openmeter/productcatalog/subscription/service.go": "b5258a28654da2ca3b29fab26306da4aee6b5fcbd28ad93bada88a00e4c151f2", + "openmeter/productcatalog/subscription/service/change.go": "2fb832e9a30260d7bc0221ca6db1fc1b96b45d05714f032a9889951c1ebb0f0d", + "openmeter/productcatalog/subscription/service/change_test.go": "733ec8a4be7f67853beb39594672ff621b61b20737a58e097197c3e67d41f909", + "openmeter/productcatalog/subscription/service/create.go": "5e5a146c786093fd7648777781a56cb5534f16f088904276a6b0aaef7c395e00", + "openmeter/productcatalog/subscription/service/migrate.go": "d7685c50f5a342aaa29c99a08d29e9ea5514a9493c1adb5ecb2806b8062efe30", + "openmeter/productcatalog/subscription/service/migrate_test.go": "711e7f7bf7b05eee510c0b8f8b5a08da651139598e362bc81525075968ab1cb6", + "openmeter/productcatalog/subscription/service/plan.go": "5617dd01d8d88abb8b34ff1b5c058474e7ee891dba80ca891170dc6bedd9135c", + "openmeter/productcatalog/subscription/service/plan_test.go": "0715103c83df4dbfea1516506d9c109544c4d504bc9a5af2a277f9c565af6598", + "openmeter/productcatalog/subscription/service/service.go": "444a48601339807aacf03b366d9b008392083169ba4bdb80d51815ff8cffc2c7", + "openmeter/productcatalog/subscription/testutils/adapter.go": "c59123e7c26c5ec93b869bdc65f805bf3a6bcd49a116290e543d85bf163e5237", + "openmeter/productcatalog/tax.go": "82a98ff115fd36581a79b0724afff709355970f69d3747a173719a7487efe1ef", + "openmeter/productcatalog/tax_test.go": "6217f39b7be7101f8ec20a7532cdad6c97969bbf84ff1955e9abfc736249812c", + "openmeter/productcatalog/testutils/addon.go": "4759de8c66b444bec5aada3738f8bfa6512ad836e286616dcc4a3920f610fcac", + "openmeter/productcatalog/testutils/env.go": "1ac68a0abca107e168f55c3b4a764b9c31795918ee0eaaff253b23c93246b2f6", + "openmeter/productcatalog/testutils/feature.go": "6182b4eaba98ea2dc8ccb8937bcdff98d4e084c58b1f567f4e789ef856c1eee6", + "openmeter/productcatalog/testutils/meters.go": "77c7df190edd37354d1e61c90f321251b0af1a99ab0e265f318a741ddac30819", + "openmeter/productcatalog/testutils/namespace.go": "3ef7a5c69b871cf4e68b113bdf8f313ddab962ac367c30fe97f03c8acb88b538", + "openmeter/productcatalog/testutils/plan.go": "2a79af64f2ace20744cec4dcb66622b4bd76b9bbe4702dfbcdd6ee059784dcb0", + "openmeter/progressmanager/adapter.go": "3c0b52751ce6a0bc80a5b69c13e96b6e849e9c941a7e3492deb0724ca147da18", + "openmeter/progressmanager/adapter/adapter.go": "900a150d3faf2d8ed5bd9af4ac4d29142eb5a787a41398544507d96324436289", + "openmeter/progressmanager/adapter/mock.go": "8ea9c7eff643cba57d2da96c69a019ab3ae35bc0523476b51be84ae6f8f3e658", + "openmeter/progressmanager/adapter/noop.go": "4c67a1384dbcce9f695b1bccff1ffe9ef61335485e4a77d951b011cca335693c", + "openmeter/progressmanager/adapter/progress.go": "d92a1f2f9ea5622626a2a6945d47b9098549655b11d1cc0f3beae657b285323b", + "openmeter/progressmanager/entity/progressmanager.go": "7074223dc28c2924f395a7398889485c4f3f9439556eb5fbcf05e90a23f2921c", + "openmeter/progressmanager/httpdriver/handler.go": "74c0d49f76a41e0b1671a13b68a43674e9cfa9e66f9f91d2d8015cf1171ec0be", + "openmeter/progressmanager/httpdriver/progress.go": "572df82de17126fdf60c998ffaf97ce18a7a676fc7e48810acc7307dca90763d", + "openmeter/progressmanager/service.go": "4935dae8e611669541209e6a6e096ef1d6d71deff9d71d732e42918a6806d7df", + "openmeter/registry/builder/entitlement.go": "de7de2f07799e9b6ca5e2b20aeb9bb98b66c93f46211004bccc5508986c74576", + "openmeter/registry/entitlement.go": "51d9bb5cb247ce43f10ab176a500564ad3f5518b141edea4d9beb4e3ae871834", + "openmeter/secret/adapter.go": "f39c31a44bbb8b6f5fe23f338222ebf84631a478a61e5a0718333277fac6ec19", + "openmeter/secret/adapter/adapter.go": "b7567a775f91ae01ac8783285bcf691cf1c3dfd14609d45ffe4064899ff6ff5f", + "openmeter/secret/adapter/secret.go": "3f0de3a53039db22bf8f646b6b0897427de849d3b2ee6451729423a920bd49dc", + "openmeter/secret/entity/errors.go": "e8888048f6f9b793e9764f05471b144cac0e36d901fabb27c597991b8cab3411", + "openmeter/secret/entity/input.go": "d3d9b61e6398f3b38da6c297d4de7b295b14a6d178c77dce1bf92726289e2998", + "openmeter/secret/entity/secret.go": "49c485b7032cff4077941aad3dd0355f0c8383c536d14d0dbe07e29ec01469eb", + "openmeter/secret/service.go": "b45d3678ac7ee1280c8425d36a32f9fd4a2b06ae53600f3100010fe54afce318", + "openmeter/secret/service/secret.go": "f5dc81c66e989fb2ad5aff62d0db11504f8669bcd5bbd20fae05bace2afe5002", + "openmeter/secret/service/service.go": "8b6afef84f8fea1673255248284bbc2c91f8c501ab217fe1f25f20a67e778507", + "openmeter/server/cors.go": "9ee44b99f740b35a284ead9ca383b50d9b0ecc98980c41bc1cd8f079fd8369ab", + "openmeter/server/framework_test.go": "bca8d6b558bf53b7bf33e34f9644febd80b45f4da35ff2e0b8abbb4e561650e6", + "openmeter/server/router/addon.go": "b7702d52597478db2a2b3378b20db4a6cb15fda0ed45c18b3e212258c48861de", + "openmeter/server/router/app.go": "96f9b2cf229da33052c788119323a56d2fce9a36ef5393b0e9d1b9bbb031501f", + "openmeter/server/router/appcustominvoicing.go": "1dabacfcf17c230760b1370a36434c6c2ed93108c448c784e4cc82b4b49897bc", + "openmeter/server/router/appstripe.go": "8892fc24c5f01ec0d3d16f51ebfb94f00498bfdc21a1fe31a1a6b780a7ee58c7", + "openmeter/server/router/billing.go": "bfbe6363996b154de092ff36f12bfaf79398af352987fa4a8957c419dc187cfa", + "openmeter/server/router/credit.go": "64a2e7726c6e5b5285e4e36505842384b95e94af3936d8bc4a10754f53092c68", + "openmeter/server/router/customer.go": "534a35123265f3f9a38c178e25fa8e5c88a7014cb624f4c3d1bf70131207a9d5", + "openmeter/server/router/customerstripe.go": "83aa6293a933ceb954f6efa5b01ffd420b00d3376ae3853995a3b1cb128c9c8d", + "openmeter/server/router/debug.go": "efde20413edbde871c3a5dfaf616bc8d1144265d2c937410c31a4e59db811bac", + "openmeter/server/router/entitlement.go": "6213533453389380ed294c9acb52ea2c6c0e1d1d535f0dc15b9877342df84d0f", + "openmeter/server/router/event.go": "56699c99337028765d1442932473a7a919a0ec4046d25d8b1f104d626a5639be", + "openmeter/server/router/info.go": "563c443d127beb6fe233c1ffe41cf72ac48f2ce138824e69ccded4722e6f6174", + "openmeter/server/router/marketplace.go": "aeb2429e4d02dd58ff45716dd7886cd271a589d6c12585115f43c7639b814b90", + "openmeter/server/router/meter.go": "47c8a8ac1d0524578305ba3b7b02062b004be2d72415e33e64f6a3e65261b037", + "openmeter/server/router/noop.go": "0a3228e5df8b50cdb616fbf0c1c28b160f94bd2351e9452a512497ca5a08aeae", + "openmeter/server/router/notification.go": "4e32db3d9f8ded39e16f49020c123155da3390484164f3222dc7972a80ae12fb", + "openmeter/server/router/plan.go": "c16dd091a8f0b7a8e221a113a8fe8d5d048dd61fe9022f88b70fb62b8a615678", + "openmeter/server/router/planaddon.go": "b9796b8e81cde7c855fde83a6e50045fdcbbb41b43a6bd551966dc14b3f3e8f3", + "openmeter/server/router/portal.go": "181df75188a39fee5db65b9dab7dba3060a0cd8bf6a6de5d79194d03754cac39", + "openmeter/server/router/product_catalog.go": "0ab11e0eb08edcef59c8bad7650f25948126ca0c3980c45b8cdbc954a975a8ee", + "openmeter/server/router/router.go": "f6c2640fdb8a34b3c8c49c165244763ac82ac756c1f09659f9f9d3e8eb4acd3a", + "openmeter/server/router/subject.go": "32ff8ce00ea49ec7c410db282ce65a06aa74324334a39f460154b4c49cbef6f5", + "openmeter/server/router/subscription.go": "0fd92c5d83c48fa0e20fe1e76efc3d081f2461c15b015434711eb147c3838600", + "openmeter/server/router/subscriptionaddon.go": "23fcbf83485058dafa326528cf32b40f6501a56cd4406816b09fde393055d599", + "openmeter/server/server.go": "32333f6380ca775c475e8ace292ff3e7a6412c8d55a7c8a34a1982904b91fc61", + "openmeter/server/server_test.go": "0cd9a9f7fe6503d4e04f66718b23f0a34e270194efeda05f3ee21501221c5297", + "openmeter/session/session.go": "6d3aece1256c82e8bf3c39e3dc2898c6846a88028e483dcd5f75e1a7031f6a7a", + "openmeter/sink/buffer.go": "0950d1b27df3ad51d5e834daf0845788e155e3cf3e4dd85b55b14a3bb50dd04f", + "openmeter/sink/buffer_test.go": "52bb46caeee70b4ae7f351f2bfacdab7d4ac51e51a415282e772670ba92b44fc", + "openmeter/sink/flushhandler/handler.go": "70bd9dcd4ba076a5a1f97669808e87663304e326a5346313405b667a110b0af1", + "openmeter/sink/flushhandler/ingestnotification/events/events.go": "be2794ce2489f24a02a445151cccf19c7f68d8d8745f5d424341ef4f41ec63a7", + "openmeter/sink/flushhandler/ingestnotification/handler.go": "5e90a947c5e15346a70d33eedc0e19092d1e8ae2cf379b652e4f11e627ca0e2f", + "openmeter/sink/flushhandler/meters.go": "8b46059563c64d04b40137bedfab98ce56eb5e9e62235002b9a6539df666d8da", + "openmeter/sink/flushhandler/mux.go": "e114844b6931fe83ac394994879707b339598705b8c62d2eba118bcb54065c91", + "openmeter/sink/flushhandler/types.go": "0cdb7a23aa337e7be590e6e5670ad79364d37aa9e5c3d87e59c0747983b3bffb", + "openmeter/sink/meters.go": "b2d82f51e1ca09b7de4f200e21e2c5a2ab8064279474af2ec5bf1e91ed309256", + "openmeter/sink/models/models.go": "4b954544918f9b73535f97f7566036e7843002284c095a788e50f06b65a04c01", + "openmeter/sink/partition.go": "f324340d14071be9b7d3c01db186304b236851d023010eff93ee0180ac022777", + "openmeter/sink/sink.go": "725817405e0d2813dd54ea4b4854de0354d354c657545a5c9e65a48941d65ddf", + "openmeter/sink/storage.go": "3ddcc3cf0138f5f9dd73cf51cc7743b0da4fcdf8945c101c71e36d2074530fbd", + "openmeter/streaming/clickhouse/connector.go": "6c6f1c42a45252f8bd021ada25646d9c43e3873ffe1b85568986973962a67fa0", + "openmeter/streaming/clickhouse/connector_query_test.go": "86cee25b01cb75b8b3cb00e15b6e201be03d6ed41cc532ce2296a60c503b0a01", + "openmeter/streaming/clickhouse/connector_test.go": "629392adaa0b7ba3db65759c6694098a049a27b92de01b8707c67826c56f9829", + "openmeter/streaming/clickhouse/event_query.go": "739ef5fa910d217539e0a5347b7f7d6e56034b10d27c1cb9f51f69b5783a5792", + "openmeter/streaming/clickhouse/event_query_test.go": "c874d0d11161ecee6c06208de26234bee740c2788c8899fbc1210f482b9bbc56", + "openmeter/streaming/clickhouse/event_query_v2.go": "6f7da6a93b2731a1ec07a771996f2ff1687a7934fe3abb3b37d8840b7e58eba9", + "openmeter/streaming/clickhouse/event_query_v2_test.go": "1d7907dce394da63afd54b7593be471f125204cd11e420daa2ceea8244d80502", + "openmeter/streaming/clickhouse/group_by_values_query.go": "5de523559eaecad6b11d7f59812d5d3774a6c7daf59fc678dfdf2fba2b9ad17d", + "openmeter/streaming/clickhouse/group_by_values_query_test.go": "825608d149847a3f155c3c0bbf4babbbd0473cdc1a568e7651f7fd37eb78ab3e", + "openmeter/streaming/clickhouse/meter_query.go": "700b63edf85f5be4821f9940d5fb569e130bdb88a43e55b4779283018149dcf8", + "openmeter/streaming/clickhouse/meter_query_test.go": "fd8ad38934d74ec4004a9b8c26c2854f9c918aa0a0c96c1c484d8936def04b95", + "openmeter/streaming/clickhouse/mock.go": "8d6caaf2c6e7436d628b6f2cbbee4ec7622f653f21e2a4f698ec219bdae03f3c", + "openmeter/streaming/clickhouse/queryhelper.go": "f622e5765fc1ea9b73662b3669fc44667c522cce77fc8595f33387e2f6b875e0", + "openmeter/streaming/clickhouse/subject_query.go": "638c4256d88838d2a8acc2f52c38afae0dbdda7b2ee02bc78638d256bafd7c69", + "openmeter/streaming/clickhouse/subject_query_test.go": "0c3505dca22dfa4b084bff84a0d86ceac96a0d927ebb6db323f781b4d229b78d", + "openmeter/streaming/clickhouse/suite_test.go": "96e7a33d15a7afc813a96607687aa512a093f417cdbf3cad2f8ebffaaee9c894", + "openmeter/streaming/clickhouse/utils_query.go": "2706b582e2fa50d903749c02c1d07189df610c44474a204316b5f3b6dc2c59f8", + "openmeter/streaming/clickhouse/utils_query_test.go": "1b9c495609e5eb14fd65a684c7e51dead659a371acc9245ae978c960c88a6835", + "openmeter/streaming/connector.go": "b90a56874a6f5f3516b22672b84db74947b39285fd0e9d226c7f3b145fc238c5", + "openmeter/streaming/defaults.go": "de1e78a57190b3ac6e678b24613f6c92b18834444b75967ccb568ea913a53f8a", + "openmeter/streaming/eventparams.go": "533f9295fb9b3cbb9d07aacb81d5fd79d2382bb453932307d9c49bc23a432b0f", + "openmeter/streaming/query_params.go": "0e5a337980d75a575ffd7c8e428dbb5a6a4d828551c444484b64e7cabecea11b", + "openmeter/streaming/query_params_test.go": "b1b4bf0f07b6526987a54073087eceb9faccfd1b0e9db314d5c7f7a016da6389", + "openmeter/streaming/retry/retry.go": "cb4a88757679c2d244efd74df8508a9e9d69097732171495f688995dfa7679a4", + "openmeter/streaming/retry/retry_test.go": "e3ca7fafdecd229286bcf9b56ea583afb4ce082474c8db70dc5b696001957a1c", + "openmeter/streaming/testutils/streaming.go": "e61aa28e289a3f3078d95c3a876f7bdd8b448853e9d8c2c7b585779fb76c8898", + "openmeter/streaming/testutils/streaming_test.go": "ce11b260ca4de23d5f21f73ecf5b24323b6dff0f5857a7a4933de42143fd32ec", + "openmeter/streaming/usageattribution.go": "4c4a0beed8bb43187ca07f707aad037901de469f215da8d61379c543cb167f57", + "openmeter/streaming/usageattribution_test.go": "0923b7be81343b9f1a6adceb7c7a55e53dd8eccb13bbae9b94dbe4be0f6c85cb", + "openmeter/subject/adapter.go": "71fdaffdb24323aa04f5c7c31d417ec6c1c630fa3c00aeca99a19f27bc636268", + "openmeter/subject/adapter/adapter.go": "b3c9dc190386bd41bee503154d7d818c307c48052cf9844278b5c78615f59240", + "openmeter/subject/adapter/subject.go": "0fa630bb32e9eda907b1974f3d9902a9ddb0dcae35ec13a9376504f94a857177", + "openmeter/subject/httphandler/handler.go": "306e17f3c6d718716da9158c420d04122c8f1cf44a6c6a7b6d69cd9161c5560f", + "openmeter/subject/httphandler/mapping.go": "32421015db0c720cd8108babe702c321637775d1fbcd74d73383fdedfc1c0b76", + "openmeter/subject/httphandler/subject.go": "6baf4320d75619be79e6f0459715c814ed7bb445ecdda8f3cc479f6d6a257798", + "openmeter/subject/service.go": "518238cef9e15407ad70d60e66528e8f83729b0a727655e499647a0c98e4a3b2", + "openmeter/subject/service/hooks/customersubject.go": "5b96ef38eb7c6709ed02ada3038444d56d60178ef5b62a5e43572caa46c56337", + "openmeter/subject/service/hooks/customersubject_test.go": "b288f736cd375213c2bec0084af0df69f5d695b7c5d7b9e898c395598b52df8f", + "openmeter/subject/service/service.go": "30a6bfe0d4087182ccd6d0935f7de9e897395008157a998ae2f769702202c8b0", + "openmeter/subject/service/service_test.go": "0084e8a220dad987a5b63844b3d0a83db5008f594f02b52eab0c1c6fef82be4b", + "openmeter/subject/subject.go": "8722d55df9230ae0a4bab22119ff0a45a072b3febace08fb22f2f34bec8aadc6", + "openmeter/subject/testutils/env.go": "28c1ddcb23edc03cf635742c47e813f555e5345dd14f010055655cfa64950ba3", + "openmeter/subscription/addon/README.md": "aded2647a06754de63dda26e2e5396c7c256b6a9102b0665ed28a3472d1bdd4e", + "openmeter/subscription/addon/addon.go": "da8243fe6b14d18c46aa446de6814dbd8242184171539077b417484d05b353c4", + "openmeter/subscription/addon/addon_test.go": "583ea457871258af38f4a567fd6999e3b9c8867d4ee6bbc74b786586861ec9fd", + "openmeter/subscription/addon/diff/README.md": "9c0919ce52087aaa96684bb9a153558d3c8b7bf517c70bee27bdce7f415a9028", + "openmeter/subscription/addon/diff/addon.go": "d4001ed0950e55f437a2e2b992b6220f4a2c3ff0128af8449dc1a844b635d390", + "openmeter/subscription/addon/diff/affected.go": "844d394716bf370d483e1e8550f48da87df321fc01f205fb95345adf290c009b", + "openmeter/subscription/addon/diff/apply.go": "0207c25fbf78087dfdd53ed3cd17359b99528b3e0b3bbd4667563fc366403ee8", + "openmeter/subscription/addon/diff/apply_test.go": "e14a716f26c1f3756d6899746302e8abb0d34c01ad53b2a30dc82e2a32f195e8", + "openmeter/subscription/addon/diff/diff.go": "76a299596ba8d1c4e89aefd6a3d82639f6f451c90894b01e2aa492519ef91a31", + "openmeter/subscription/addon/diff/restore.go": "5546825898e4e6a0c4839c94f05a84e5ee6a74a696f2a7c3d3c91fe12bfa92ac", + "openmeter/subscription/addon/diff/restore_test.go": "8d5e3d96c6cc7bccab9664ec9a30bb5f4f65cc1336444dbd201b869ed1ad5321", + "openmeter/subscription/addon/diff/zeroratecard.go": "7f31f6b045483c26f570593611eece4fd056255bccc4d7e0ea757892bfd8ae5b", + "openmeter/subscription/addon/events.go": "580306d40b35676c07996d4f91806e5d04f6558d62dfacd49d508fc5af41598b", + "openmeter/subscription/addon/events_test.go": "c318919e38dcf0e71fc694b9abdec5f9ce5c8c45d6ab3e47f702962da19836b6", + "openmeter/subscription/addon/extend.go": "39d1399cdd8e6af855e1f8dbb13f669aa630fa4e6a6f1dbfd0c44d95073e8415", + "openmeter/subscription/addon/extend_test.go": "8fa1846042afdfa0a2248cf15893f48d77a3aacf2b788c89564dc1a53e60476c", + "openmeter/subscription/addon/http/create.go": "857a451391cf3bbed30e9c4430819decc7c46053a5b3c89f4aa89f6092c7e75f", + "openmeter/subscription/addon/http/get.go": "c7a01129cc008d0bd6c4f02e1505c7a8c25d044b45152848526fce4c0d6d37c8", + "openmeter/subscription/addon/http/handler.go": "2752300958adf98bb61c53f93ad91383375175369e850badd975975335d17d3d", + "openmeter/subscription/addon/http/list.go": "e29bff099a30c0ae10f1cc72b671c397af9a14fd6278cf2c7c496ae0e249cd3d", + "openmeter/subscription/addon/http/mapping.go": "e59a4876d878b3a790a38a09fd39b912580582a3a2ed60b3096564ab0ac82b57", + "openmeter/subscription/addon/http/update.go": "0981f3bea80c8538e49193a8977c4d845191e58f37ae0d0db76dd02bd8536a2d", + "openmeter/subscription/addon/instance.go": "445d638f1fa3169d2146cb6e678f05462c85928835a5fbea1e31110c397ff995", + "openmeter/subscription/addon/quantity.go": "f4bb64c37299fddafd7e1c7c567a82a0137bd2046a5ccd43a079407c03baea43", + "openmeter/subscription/addon/ratecard.go": "bc04f09e39a05affa323d6b30c3e419de95bd44e5d6716458d5a60bc6940088b", + "openmeter/subscription/addon/repo/mapping.go": "1aa81766059145f3c516b330b08091df2042095bfac81bc0407c3cc106ef3f2c", + "openmeter/subscription/addon/repo/subscriptionaddon.go": "458f29f6c4b6f776833fd4f69180c113d873d3741ab89d3fbb3cd1f6cd513357", + "openmeter/subscription/addon/repo/subscriptionaddonquantity.go": "da25c7115ca3775e17fdc4f9a6b465972408b6530976e41a3c736b95d3eaa7ff", + "openmeter/subscription/addon/repo/transaction.go": "63e555cef43cb604b28891adb387d2c456bf2594e1462ee6914609960b95f9ce", + "openmeter/subscription/addon/repository.go": "d82edc959e87109ab77ffbe4dfb9f85cb4130814d5f1c669644c1a5d738bbd32", + "openmeter/subscription/addon/service.go": "90b986ecde15f6d3490574c4ac0c88c0f56c4edcccf9999937b6f47d4e1bcb7c", + "openmeter/subscription/addon/service/change_test.go": "eb045840a5525188cc3620f0477102aa51d9a46747cb2b8fc87f185d7cc8cccc", + "openmeter/subscription/addon/service/create_test.go": "b0bb16aefa0c70b7e992058acb1e60d4524919f0a826767b6ce39cd28f981e80", + "openmeter/subscription/addon/service/list_test.go": "ddcbeccc3008e22717d9a78c78ce927dd91008ff4d5bd7fad3b55d77a4b82818", + "openmeter/subscription/addon/service/service.go": "310d05329ab340ecf862a1aa69af2f6da54309c6dcd0d7001b47faf49ee998ce", + "openmeter/subscription/annotations.go": "5017ead80123c5ff4c9dac9e6c7d17397204fc66cf1c8a9e68ec1e2cf31628f8", + "openmeter/subscription/apply.go": "ba2ba8d940f44ed69a5cc8f3fdd0175256d9767200c090ba09c35ee9e9689a5c", + "openmeter/subscription/billing.go": "a0356a9d16c39d3cceca69d0e63ed5038e3e524bbeecafaa9b5249722aad1d56", + "openmeter/subscription/context.go": "3ffccca133438ced129898e7f3c516c3b3dd98d02279fd66649dd18e4776a1f5", + "openmeter/subscription/entitlement.go": "0a36657aafad82a809e599e5f5caa43595477f93abce3c937f12912ca0c2c157", + "openmeter/subscription/entitlement/adapter.go": "613f3a0a6fc1bbc7cce691d0e9c6429382f0cfaf0f106d04c67a7af5b32d0bce", + "openmeter/subscription/entitlement/errors.go": "f8399f54cab1764edf58c26755fab9f2aac764f918f9e6bc98718c267f1dfec8", + "openmeter/subscription/errors.go": "1b39b7c5dcb275178797d486eee534f1dd60c873e3c060d2df027f64ae85115d", + "openmeter/subscription/errors_test.go": "d19a61d57fea728c3f122fa6c70226a0391df97dc8e49e01c41db00ee330fb03", + "openmeter/subscription/events.go": "1502592d915a87ac7f8fdebf91095b706e828643c5d925af6ea3ae700e360c16", + "openmeter/subscription/featureflag.go": "5563391711f0162ef655a2eedd076e346e6c464029ba662beb57fab6df6da68d", + "openmeter/subscription/fielddescriptormapper.go": "c1e90ff468169c716a9e4b29128ce0618dd44bc2daee67cbe1ade6d2ab339807", + "openmeter/subscription/hook.go": "b93c6ccc6ba189c894a82d598189dd2e3023c9e87e31f5e2cccc0645e733342f", + "openmeter/subscription/hooks/annotations/hook.go": "97a0295a628ccda20bbca1d17084c98a056591e6dd4b40b321eaec37609e4e42", + "openmeter/subscription/item.go": "0276f813025d31a4876f022afc1cf2c9d98e21255e4b76984f7ff9b9e9eddf81", + "openmeter/subscription/list.go": "0ddce6280b914e54f148b5c492e2143b1b4c8a972ad5dc829a5054d2326a2f86", + "openmeter/subscription/locks.go": "bb1ac820a802dab4e903291d085c4e9fb245d1dfd0b5a849c9f24f3191baaefd", + "openmeter/subscription/patch.go": "960e186df702244153e2bfbff712d3d709bf1a78a34f8d9d40daff1b2d6dc4f7", + "openmeter/subscription/patch/additem.go": "0c145163808648c661a844930a6d22fc423d21ee042a375c645ebad3b3976a6a", + "openmeter/subscription/patch/additem_test.go": "ecf8eb8b3d0460db55b16ec138d1076c9626061ff241a14235d24f1d9abf039f", + "openmeter/subscription/patch/addphase.go": "61d8069831a187ec9c9fef97f0c71c9c688e7e76a9a5920bdb191c79fffe3c73", + "openmeter/subscription/patch/patch_test.go": "d780ef00699911900513f3dd026b57f75f199e4c331c3eb332c5a6364bdcc982", + "openmeter/subscription/patch/removeitem.go": "a2c9e53e5acf151b9965c79dba9716e2a969804e18b8f72486e7610ba998a0f9", + "openmeter/subscription/patch/removeitem_test.go": "1eb54fdbf7ad274688adbe0dec18cfa4f3927105cc4c66e7a54a361970271c48", + "openmeter/subscription/patch/removephase.go": "5087dcf2b3a528fb96d0221e3e3928a6aa061e35b78753fe909fe365859f4457", + "openmeter/subscription/patch/stretchphase.go": "7e7f72a674feecae5696a4cbb04e6070d49697b7334efdceca3e0d4767bec095", + "openmeter/subscription/patch/stretchphase_test.go": "d0fa45b05c2512d0c65f71465234aae889e8c38576e005fdd97ef8c363a8a41a", + "openmeter/subscription/patch/unscheduleedit.go": "eba6aa43a99b6b82cdaa11450e0f0ed2892e3f76e22b5b050b5abd3630abebbb", + "openmeter/subscription/patch/unscheduleedit_test.go": "5b4a3529ce6ec975fe925c7f7a102c1adbbd865c5b99b1650b78cac4a0989f82", + "openmeter/subscription/patch_test.go": "b7b9dcd100ebc09a5a5b0add7ed0ccfd883e532df2c9e2b4eb6555f188255993", + "openmeter/subscription/phase.go": "46eb289168d72720f95df7e7c8bf33177881dfcfa49cf61220d9d317ec2bf4cb", + "openmeter/subscription/plan.go": "14b05f44d4680359dc92d3689ac9bd97743a43bee41b7c4f2d3a4b0f1f611833", + "openmeter/subscription/repo/mapping.go": "c4e3fcbafd6f1d4a211149b2b31fb13fd32c5cf11a9c67ea3facd68a303adf39", + "openmeter/subscription/repo/subscriptionitemrepo.go": "d62742d4cb1562b468a981b3a95b09c3ab2573530fee5c5d898fbee45e7c34bb", + "openmeter/subscription/repo/subscriptionphaserepo.go": "0637b898d9619b4b09d58791899b75ad06363b19584e12c162198caac13038e9", + "openmeter/subscription/repo/subscriptionrepo.go": "3f120bd94bf7eaa6c64f688d36c3870b0e93fd919e93f63e5f47147eda0d118b", + "openmeter/subscription/repo/transaction.go": "a95a7f984cfc5f9aef992ab839be6763b0f24ab8ffc5995d880025f432a0ef6a", + "openmeter/subscription/repo/utils.go": "0bfff0514b1382a32a455e5d38125e249387bc47c6a65293ee949098660f9163", + "openmeter/subscription/repository.go": "e684917ea9576c95c5a4935b09b66bed2cc438c41a7b5040e60f241c89ac35f5", + "openmeter/subscription/serialize_test.go": "e18627383880f0c0bceffac2077af976d476fb107526a783301ff1701f0177de", + "openmeter/subscription/service.go": "167975c3601a91e2ba1169dde8a498956c22a2c084a1999eec3fb42054398582", + "openmeter/subscription/service/service.go": "f6eec693d36d108000310d48bdc692b222e53feaff8103fba3396d6ca1677445", + "openmeter/subscription/service/service_test.go": "a6154a3d804eaf2ecb0e0a6f9edfa022b8112d9034db2d7012e394eda02e25e1", + "openmeter/subscription/service/servicevalidation.go": "f7ea248e1d0cc9fcf59402bf8e5c9d75fb6a50e5c003819fd62a475369828db9", + "openmeter/subscription/service/sync.go": "02ed565875d6bc9e212753861d87ab74e8f253a160df46867982d29b720e752e", + "openmeter/subscription/service/sync_test.go": "a5ddc05ab2b0de1049aa14ff3db07679f3512783e3d47466f0d96bfd8d84191f", + "openmeter/subscription/service/synchelpers.go": "2b812b79075b3494a1c539b1007c7de14ee27a7132e1242d3701893389e2a382", + "openmeter/subscription/specpath.go": "08697ed537bd579c18dade08643a39b44724fca418563764bc83c9634dc9f23e", + "openmeter/subscription/state.go": "92ed870e3c07698a22af8895c649478256bbaddef65b7ea537a9d807207040f6", + "openmeter/subscription/subscription.go": "25838930416950278c8d2e824784fb5cec550258d985fb25fa3bf37202a2bb5b", + "openmeter/subscription/subscription_test.go": "77714a2fddd8ba1308724e20f28e950e5d09422457b1dd99dd9b8e891bb938dd", + "openmeter/subscription/subscriptionspec.go": "92f912b2a2d9f791217b464becbf043ef6ca6de46784629716686b5b9814e3d0", + "openmeter/subscription/subscriptionspec_test.go": "5ebf38dcebe08a6c542c0c61e151be3393d6d8f053fb830d39d06dfb9297f148", + "openmeter/subscription/subscriptionview.go": "d5cdd5b061313240ac44efa8260bf145563650e36245f31d0067a9ee2f6cc2e0", + "openmeter/subscription/testutils/addon.go": "f3e35ce0cda85095f918758a028c06cc16b133c75b30f53400840ac56a992ccd", + "openmeter/subscription/testutils/billing.go": "dd03e0e47d71dbdd8e2e6784b95e0f5fca95bf1adc5d030f376fb30cb0d74e9b", + "openmeter/subscription/testutils/builder.go": "ad5b16155a024e7bdea0be8c84792ee5c4ce5a4d11729165966c747c338517aa", + "openmeter/subscription/testutils/compare.go": "b5e8bf431c1bc851e6e9e25a13cc651eaf6d6f582d35d820f65d942e5944d5e7", + "openmeter/subscription/testutils/customer.go": "243a93375f6f713d93d25c4436990b990298f724a342a995559df421a057262e", + "openmeter/subscription/testutils/db.go": "8ee44e15fe8cea41144be3d18c3039d18f6831527b9b27636deb64eed64ea7a7", + "openmeter/subscription/testutils/feature.go": "f02e14aa733e3a2bdfb9eeb403adb9c5d0298c052d8f4f0e0f7ef48d72624482", + "openmeter/subscription/testutils/global.go": "562dbb3456ac7e4b08fc3c94bb1bd7d50893248d905a6c6c105042e5e8f8e0c8", + "openmeter/subscription/testutils/helpers.go": "a73a99d651fa8b2237524698a9d0eb278dc82f2ddb2816067af0bf94390acab3", + "openmeter/subscription/testutils/mock.go": "f965addca0ba4ca080d36f9c56a4d79ca5cf08409a3357c44a86c786529c779d", + "openmeter/subscription/testutils/patch.go": "56eab8bb9abbaf16d8c4787088b4d5759dc0d83c94af1b349359b68c54ef7f33", + "openmeter/subscription/testutils/plan.go": "e19944ebec61e22e685166ff23821d37e781db57419b8ccdb7b6722cb2480f19", + "openmeter/subscription/testutils/ratecard.go": "e6a8daa488e8f077cf23e14c2d390122b13b7c9d5b00cfef122aed7c9418135c", + "openmeter/subscription/testutils/repository.go": "30ee5d7f9ea21ec315fc6022b470937da91d2670a6439ec76c49e71f04532983", + "openmeter/subscription/testutils/service.go": "c4b277faf08023bb4e52afdc92d2b3be6ac4005e897bbe5feeff9374d3bd0f27", + "openmeter/subscription/timing.go": "bbb27d4746ddffd56717cf2850938ea6de2930e05701b35b76a4c65bdfe613bd", + "openmeter/subscription/uniqueness.go": "8f5ad203cb9d94ff99ca8c4401c9139634e317b0a8ba44bc58600c41b4e81578", + "openmeter/subscription/uniqueness_test.go": "0d263366fd9ee980d15ba7d956bf6b06738ec7dee89580526b7430e1132e7f24", + "openmeter/subscription/validators/customer/validator.go": "3df8dc437517f004406199c09f29c651a395be109ac243cc66660a3fbf3c042a", + "openmeter/subscription/validators/subscription/components.go": "b2000237a011dba917e0d8711c551dd5cbe696086fab83e866b83527d44a62cd", + "openmeter/subscription/validators/subscription/validator.go": "5dec5c9fd257326a63ee72983139cd1e760f92cf610d92f47458875d62c495bb", + "openmeter/subscription/workflow/annotations.go": "4a37618ae15b68b22c24ae6ba7e68c1973f36c9e69aba61091e02c0d3cafeea0", + "openmeter/subscription/workflow/errors.go": "cba196e276077bd64eebb650dc5703b7b2dd9ae9be776c658b6a1ba46592847e", + "openmeter/subscription/workflow/service.go": "6cb0629cc846e9de8d123a668e5898cd11dcbaaa2871ee1886ca374a87f85112", + "openmeter/subscription/workflow/service/addon.go": "a717e2e269c7a4ae7a11cda583054743e626e2037ac253a02aa41826b33626d4", + "openmeter/subscription/workflow/service/addon_test.go": "3b53e982c21fabfec386d0b2fff53ff7fad5dfc43ef95d02784ba2f8ef02e334", + "openmeter/subscription/workflow/service/service.go": "ea1e0ec96d6149cd4b68b4b583e1860c9d5adeff09a00875be72e11eaffb5928", + "openmeter/subscription/workflow/service/subscription.go": "dcdab136525606bb3b3553909af5291c6fa8ce5490fa323397f9f0a0edd378e6", + "openmeter/subscription/workflow/service/subscription_test.go": "0e1a5fb394d1e872a17d3773feae41946b37f7cb6dfe094b6825b7d4726bccf0", + "openmeter/taxcode/adapter/adapter.go": "3a74d52742ea4ecd01882aac6de5a925f7c4f7f0dc4b8d8cbe6bb516ff64966d", + "openmeter/taxcode/adapter/mapping.go": "0abccf2ff578776549cb3e70f4cc165c4232e785e979f905e9f49bf507c4f6e4", + "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go": "09c7b99fb8c723c2243eb49bfd559fceb8d3f77ef6cdf97340da9f8fb69c795b", + "openmeter/taxcode/adapter/taxcode.go": "6e8602d72bdb8c006be37aa328ac081be17042bf76a3b1f13209498b6ef79f21", + "openmeter/taxcode/annotations.go": "a829f825a82b8a5af4c3606841af48e5961e258fb0cfba183a99c4572c37a53e", + "openmeter/taxcode/errors.go": "8de6ae640a398ba88a5b57ffd91c0cf565b33a16e8d62f5b43e85e145c4124b2", + "openmeter/taxcode/namespacehandler.go": "a665cb1f77e22c76fea5f6128a77dbec55dbd3888e6e307716ba5970a56a912a", + "openmeter/taxcode/namespacehandler_test.go": "3c2dc3bd45a8f2dd3364ce1310a891a7d50f9e3654d42137ce146d6a86c07909", + "openmeter/taxcode/repository.go": "f9bb39b14ec2c39d93dca510b339ae1b47525a18ce280de5df13a7d19f6c252a", + "openmeter/taxcode/service.go": "72f55476b2ac500432f679ec99729afa50e26590d7a8462fbc457c28b4f8074b", + "openmeter/taxcode/service/organizationdefaulttaxcodes.go": "f716a1630d0ee02f33f053ecf11a1f8fc8f83b28b0095860ef56fe075f75480c", + "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go": "7e5ea2ebf6bf4b70e3ee10e13736872a0174aa15ed062647c597b161b53a606a", + "openmeter/taxcode/service/service.go": "3342b2a1f614210a98298c6bf017b5242007f9a8428f9f42f7abba20a9df9703", + "openmeter/taxcode/service/taxcode.go": "d184f86fc3b24ad5c7150b73c73a7030046563d5c9fedaa4db8b52078ced0938", + "openmeter/taxcode/service/taxcode_test.go": "39484f81fa452ef177965e587ebe1192a81c63c94fa817fd625f2230c460d125", + "openmeter/taxcode/taxcode.go": "5bd3ef792234c0ac4fdf3738e19512305b9f58a5469394d3bbf097a533f8b3ad", + "openmeter/taxcode/testutils/env.go": "90558e7a2ac31f9ed90f57a6fc34703670f129bcafadbfbf59451863e210bb00", + "openmeter/testutils/async.go": "d35be4ed1812291233ddde93080bb6e06cb90e26c24bb31605939c148858477e", + "openmeter/testutils/logger.go": "a7a4269845b0b1e6226334150674b28aeda89a589c1b1d0eaed0a944fd908778", + "openmeter/testutils/namegen.go": "40218e8d12e475adeca9fba65515c73b2944d7981eff3ef374ba1bfafbad1be1", + "openmeter/testutils/namegen_test.go": "eb08a24a80ae233192350d525d5e09feef5214aaef1d7cefe0c3eec82a8576ff", + "openmeter/testutils/pg_driver.go": "feabd11497b64dd8a6d238dc35ee9292766539c530381a415211cd0f7b35c614", + "openmeter/testutils/time.go": "58f2095eada674559fd30f9fbe48655a0f446f7d081044a2f7a29b6d34a4c73a", + "openmeter/watermill/driver/kafka/broker.go": "0cb05b61c0d44ce5dad2345d28b16e645954ba742fcf58a29e38b38cbd234614", + "openmeter/watermill/driver/kafka/logger.go": "d8466195ac208908cab67a46eb0769683748e8a5319e2197d1651fc2c30866d2", + "openmeter/watermill/driver/kafka/marshaler.go": "50d94f00505d6c4cb656aa3e50ff1921d0323a33ee5294f484f26236eb42e138", + "openmeter/watermill/driver/kafka/metrics.go": "d636ac075ea3ac9a99309ff4583e8eaf550e6034b36c500ec2a7d5800dfd67d3", + "openmeter/watermill/driver/kafka/metrics/README.md": "07fd8948dca93257367616debdc98a2119078c783c95f17826c456e8781fa5b4", + "openmeter/watermill/driver/kafka/metrics/adapter.go": "b4cfe22a1d6f2882954f24de0333e2c2b5df7e36895f8784649e8470b8484353", + "openmeter/watermill/driver/kafka/publisher.go": "cd5ca2043e19a7d1fc69f660e191af56a68788ebb89413b4cbdcd0e5cc0847c3", + "openmeter/watermill/driver/kafka/saslscram.go": "af5a207b1a3f10654c6a39ab20ef7233388b2e4923abd393ee9d760d28ccf932", + "openmeter/watermill/driver/kafka/subscriber.go": "c666642ae435197aaef2e95428936332166494c527670132a7b9754136221f98", + "openmeter/watermill/driver/noop/publisher.go": "f21221f2e96deb022e3a904519bc7129eed770f194973b5aaa2d7e58a4fad0aa", + "openmeter/watermill/eventbus/eventbus.go": "3bbcbc3bec65dfab4fd87c1934e3d2e48a935d4ab4083124cb5183a6f65e4c72", + "openmeter/watermill/grouphandler/grouphandler.go": "14c0d15f1ba77b91b8071411064205e7ca3349477188275e8d440c8013c06fd6", + "openmeter/watermill/marshaler/marshaler.go": "59280b0abaaed5100aa61425a90bbf3ac4ff356ae347ea733db3e7a634f035bf", + "openmeter/watermill/marshaler/source.go": "fe97d38a2e29ff4c935480da085d78362eb53dbfc7649e66fc4c5bcc329d00fc", + "openmeter/watermill/marshaler/source_test.go": "8875c15cba77667e7f69e5d02eac19b4821a9ea4d82e9ccb2727623b938f3641", + "openmeter/watermill/nopublisher/nopublisher.go": "ad70e6633695b3489ecfdd57a7941ebf2fae2e78337ef59d88b4cad675f31551", + "openmeter/watermill/router/context.go": "a88f7047d83921850d2e9d263eea3e5ff1c6203650431b9ef7379346582912cf", + "openmeter/watermill/router/errors.go": "0ed2aefd8b8b5b0fce22fea83a0e795cfd1bc0d59701ab267bd83b5522f98c02", + "openmeter/watermill/router/logger.go": "6527d51734624543603b1e29a1fc3afb6e0b56fa2e4393ed4ab55bf76de554e4", + "openmeter/watermill/router/metrics.go": "ad8132bd413de1559d9f21451b13af435dad3dbb4d0d251e4140c0d1d9e8082b", + "openmeter/watermill/router/router.go": "d14137a74afe267bc04deba49428c708865fc6ce3946146cbc7c12067222806f", + "openmeter/watermill/router/router_test.go": "4513567c0ba47340b0bb0c06fe86359da1582071e1c88b857a4bdb39d9254085", + "pkg/clock/clock.go": "778226445e02c98d96fd6ecfdf3b9d7886d2c8001f576a6ab8701deabfaacb31", + "pkg/clock/clock_test.go": "a4f7eb55d4d06b65583489473481a5905f15b7697acce8cc2080077a7de0075f", + "pkg/cmpx/compare.go": "b6e612d62e159ce3e352b2cf7fd01360e55be64125264840bc460cb2c30caea0", + "pkg/contextx/attr.go": "5a34e5a92e3bfaa13b3c083e1c15f148f1c73e11561112f6b9c25a78ecbbe604", + "pkg/contextx/log.go": "e579b5d96dfdc4f2846dddfc23e2fde87de401ac9b866c71ac5e3418316fd730", + "pkg/convert/ptr.go": "8de04e6632323a5807d7026a274a83e48d98b1f535eac7f9b3e1db74cd0fd7bf", + "pkg/convert/time.go": "3d890c57bb46c88639f6ff05b8f1534b109f63d59c6ade81512cdb19e48f3108", + "pkg/currencyx/allocation.go": "a95bbcdbc124b63702433555c8d0648d9489d0223557c5b83c30aa99df77f718", + "pkg/currencyx/allocation_test.go": "47bac9b1b6a4fd2af1a80f6781dfa3443b11c59f8488773b4b3ef76d85c2b21f", + "pkg/currencyx/currency.go": "7088b47ed1c87601c9f7142bbd92454bcdfe0cc9a43145515c1621fc6333dd04", + "pkg/currencyx/currency_test.go": "5cfabe23231a24bdd519e8c47f6849eeb652e4442a8bf75b91310e1fb1d0fde8", + "pkg/datetime/constants.go": "0875d63200938a268dfd86ec3e4fbec4f57a59cf43e5d1dabbad7e9e8e705bea", + "pkg/datetime/datetime.go": "38a1c82dc65ab3fc17c82cf263f02b242ba4226d4c312d0d51317cf92459f1d9", + "pkg/datetime/datetime_test.go": "172eb6ca69042cc6e6dc9c5b23b4062c9267536abfce943f3db60a1897c23e85", + "pkg/datetime/duration.go": "a6c81817b5d7f2f60443f7fd4bcaa886de4b9534da119997bc4ccb2d887dcdb4", + "pkg/datetime/duration_test.go": "659d5c4559c5533c5613d5b71935281c4224c1b96176961bb1e75fd0003c4c64", + "pkg/datetime/durationstring.go": "4dfecabf061c0a469909c66c15b06b82e593d78cc6fd0ea5ad1741731a25c557", + "pkg/datetime/errors.go": "f4af59c41c8178f1e021df65714cbe2e3ee3692d8d68062bea4b693a57ce96ae", + "pkg/datetime/format.go": "d7c43c59acabae5e30d77430acef40a4c2ffa8c839886ecddb1cea5fdaf1dafc", + "pkg/datetime/interval.go": "e515447cf569528663e955fd9edff664eec356a24d601b71a5d9ea469af8fe6c", + "pkg/datetime/parse.go": "ec379499ee67c2d1c81ad4e8381195960be31e5fb4eebcae770928f6ee496b36", + "pkg/datetime/parse_test.go": "4556781f4a8cd9f35d0f9845da09b3095c8e233127c8851ae39f4118950f0082", + "pkg/datetime/testutils.go": "2ecd7cc8bf22b284c84a5d53ac30f588f68ca72f704f7310c6d07a54bff24056", + "pkg/defaultx/default.go": "6e840054617e201329623625503cc462e10e8312536d2296ade66dcd4c87c19a", + "pkg/entitydiff/diff.go": "aedbfa3e123677c3c16fb4288f3e5ff470ea99fc03239ad8e08e3ae3131c806e", + "pkg/entitydiff/parent.go": "1b1f626087136d9ce14e10d7594f7cc9fa86da6fdec75f9b60c055297e8742a0", + "pkg/equal/equal.go": "bb15aed74ee31d8c028d94553e8d8e6d8d4e9e037b09ea3cd1689f3552c3b6d4", + "pkg/errorsx/errorsx.go": "eb05bd6f3b4a8684165af9a9c10da441bc7c0da36005b9c4371cdfcb5684fb04", + "pkg/errorsx/errorsx_test.go": "29fd21746abcc8d1f3a38587a9594936d5b127bac7b35215111835945f053ed1", + "pkg/errorsx/handler.go": "bdc7e93d6dee5cdcf57833db3e20c570e2daab6a0a73142b50f013884709d78a", + "pkg/errorsx/helpers.go": "1e4315825aeecb6313272c41a01852611b2f469d43b9d1ababae7a0170a211ab", + "pkg/errorsx/helpers_test.go": "5f4d9771f8f042c67640919649adf44ff98c155d3970628493253b480d5bf0bb", + "pkg/expand/expand.go": "71620dfcd4e07d7852b38d04afcb63935e8a1732c0cc7844512c23edbcb3a6c8", + "pkg/featuregate/featuregate.go": "1ea9bb60bc7588232db2a22bbf4c6aafc47153a1763bf8d02bf611567c119f5b", + "pkg/ffx/context.go": "479fb9751f9d18ce649af60ea372899e96fabd1be18ea343b3462b9e375647fd", + "pkg/ffx/featureflag.go": "cadc1a8585b9e12db7e2589bd1a09eb063960ebe3c1d1440f19da165949a6d3f", + "pkg/ffx/static.go": "0c49f251852411f7fbefbfe8050cb1d334c803d1f15a0a4ddbcdf17f9d7ab120", + "pkg/filter/filter.go": "94ee2f412c52919f68cb8054e0ab5decc7ab0880f85051773a3eb3b497d98414", + "pkg/filter/filter_test.go": "9a8c46ae05ff5f6e61a5d0a96145a1383a744affad9d79234e638f5758193095", + "pkg/framework/README.md": "c04b07786df76e74715ad44783c000126faec5502434f8f842a0f4228acb6db3", + "pkg/framework/clickhouseotel/connpool.go": "b2ed5d565150ed32c67d808ad07dbe7d7e49ea74d17906bb8c7883a0649e45f7", + "pkg/framework/clickhouseotel/otel.go": "84e944a94ba0fa7c6cc24e1cdd68467692e70c03a6929f890998655ece3a0c66", + "pkg/framework/commonhttp/decoder.go": "30e2d8a44f943c24943fa0aab53e2ff537b7934f5132c51e0b4e76d004aa03a0", + "pkg/framework/commonhttp/encoder.go": "88a311dacee76adeb8c80cd5a0721ee25c459e00ea17dcef8958aeddf334affd", + "pkg/framework/commonhttp/errors.go": "419be05b2cb75236d2d31a8ea2e409cff636d7efaf0b2dc570b6a01ab4017f0e", + "pkg/framework/commonhttp/errors_test.go": "928e587f50e31cf7add1d7e70c29531f0238350b156e35513b4cebdfd6568320", + "pkg/framework/commonhttp/pagination.go": "46a69f69c7f6256ab7cdae14ed5244d1a6bebde55f9a16b42dfa9c1f9fe7d6ad", + "pkg/framework/commonhttp/sort.go": "8e77926ec3d107dcd1b9605083c16750eab0277f35433a24719c2b18e85c2ba6", + "pkg/framework/commonhttp/union.go": "c8ff73b5334202d8292d5dd7951009bd613895ae0e2aad9a6c5dff1c8f291e1d", + "pkg/framework/entutils/entcursor/cursor.go": "6ab631d87f45be13363923559fdd98fb9269b9ba67052ecf4e722c7117647a3c", + "pkg/framework/entutils/entcursor/cursor.tpl": "58a1993059ed19fbf5f103b4d8cebd6432183f3c6758fcb013abda2db0c78958", + "pkg/framework/entutils/entcursor/cursor_test.go": "8a847b94f077b90a056f54d06851584c7c05c1e42cd83cfc8e7065661beb4e1c", + "pkg/framework/entutils/entdriver/driver.go": "19936192071e6480be81fc907b18b93929201080e14011ea129468df9df799a3", + "pkg/framework/entutils/entexpose/entexpose.go": "122ccfb53029b5b50a9b29e64bd2da0919246d2b67109633da1b233c8e1561e2", + "pkg/framework/entutils/entexpose/expose.tpl": "ceb9b3ddb8a3276c0a2a5906f5a7f5d58dd62f9cb75499bd24b59fa94d888d5f", + "pkg/framework/entutils/entmixinaccessor/entmixinaccessor.go": "7e03f1bd6b00c0c3ebc3f65dfda717c6183cac93fce2f86fccaf7ebff8101c0a", + "pkg/framework/entutils/entmixinaccessor/mixinaccessor.tpl": "491f454fe44c1536ca71d7b641bcf8eb8ffb105934492f1a3712dfc81d55c8e6", + "pkg/framework/entutils/entpaginate/paginate.go": "cc75ae737abcae566c6db7483a28a9d95528ebefec7fab44c17dcba7d3471798", + "pkg/framework/entutils/entpaginate/paginate.tpl": "c4d17e80d39d0dc44adad177623b8431be0619a06d0c07275bb59c81f244216a", + "pkg/framework/entutils/entpaginate/paginate_test.go": "c26312fe80498803d95f7ecde93a81df5b59c6048d0cbee8c1ec0a01d62b46e4", + "pkg/framework/entutils/entsetorclear/setorclear.go": "8b516c4731d9f4c89fdbf631ff449f4970ee138374a5dfe0543b8cc6db14c9ca", + "pkg/framework/entutils/entsetorclear/setorclear.tpl": "bed8d651a534f9e183fd45b2279b096700482aa32cdbdbed90bf9d7bb0adec52", + "pkg/framework/entutils/idorder.go": "f7617a319492af3eed4a6fbfd289a388a95eadff27dc7932d0d2b1f578ac3176", + "pkg/framework/entutils/idorder_test.go": "7fce90e702dacd4a37d93a8ac4772e04dedb90b0cd199b1040a276fc2c8f5c8b", + "pkg/framework/entutils/mapping.go": "9384bf6a9d596248a9eae5acf6a9925bc0a0d2a8de5bc507ca841c3e4416e100", + "pkg/framework/entutils/mixinhelper.go": "6b0bcd2b96476912513d686907c3a63e5845b053336744bd106c3d50d093a8ff", + "pkg/framework/entutils/mixins.go": "5497d713342b44d0fe8c5a19418426a62b737c5949ea0c3823d632ded47fcf20", + "pkg/framework/entutils/pgjsonb.go": "fa9ed3fd1e9dc962e9f71e125a675bfde0ad3e9475f30e11fcdd43f18fdfa64c", + "pkg/framework/entutils/pgulid.go": "558b8314c466220c602fdc2ebd455dfd5ade2f9c93f102188c4a55a58c2cf741", + "pkg/framework/entutils/sort.go": "1c44a934b17860c52ab8161b58f85497203c07f445aa4f1e1bdbb08997a29e88", + "pkg/framework/entutils/testutils/ent1/db/client.go": "b2d5993c919e803386994a24c4a5468fb77fe4f299e6efedc367dbaea693d8bf", + "pkg/framework/entutils/testutils/ent1/db/cursor.go": "33c87b35332b47da9026ee1d86f5ccaf91543d452e6d9fa7c289a1d3db06e5d6", + "pkg/framework/entutils/testutils/ent1/db/ent.go": "f3a562b5c92d9b0d2b5a1dd754aa2b22d5eb57f070215498a085f2c4712d14d2", + "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go": "3f65c954bf80a0d314d5a05b8ab42ddeeb64292a5075b2bbd053d68571e05064", + "pkg/framework/entutils/testutils/ent1/db/example1.go": "ae38c493d6d283e7b7889238317a912b3a280965bcbf7610368819480a193e9b", + "pkg/framework/entutils/testutils/ent1/db/example1/example1.go": "e813cc283ae0f48b5bdfe27c967434ff0cdc0c99cca0f919ecd6cd886ee38460", + "pkg/framework/entutils/testutils/ent1/db/example1/where.go": "bcd89d2b24a48d96edaa3d76d05237b7ffe3317ea0ba3e8e2bf60d79b2bbf73c", + "pkg/framework/entutils/testutils/ent1/db/example1_create.go": "df225775150714445ba23a91f97f16c0215ae35b3c9808a5217348028bfc2d6e", + "pkg/framework/entutils/testutils/ent1/db/example1_delete.go": "777e8354b575efd14817077967c0d93e84c34d5fec1e374c3bdba1d1ffb5ca11", + "pkg/framework/entutils/testutils/ent1/db/example1_query.go": "6413ac647eaf3b4769621e3bb5a8f374a0bc80a9be78e4f80e95d6c33d11234e", + "pkg/framework/entutils/testutils/ent1/db/example1_update.go": "b565b086229909330717286f47b2f2dc0f434080a80357a8d7031e5135e4445c", + "pkg/framework/entutils/testutils/ent1/db/expose.go": "19db0288975d932059473bc1ef72ceefb09ba206e1c3fdad2bcbe4453cfe0fd9", + "pkg/framework/entutils/testutils/ent1/db/hook/hook.go": "c07bd6eaecb07b37798288e096fc80bcce5c309343e6884a8259a1a5907b3815", + "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go": "b30a5f652b6317573f27afb75337d7424aa84d1226bd31cb1d565372cbef9249", + "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go": "fe4405369c47e32718439dc4cfae67ff437bbe8a17095cd0380fc0b765bad182", + "pkg/framework/entutils/testutils/ent1/db/mutation.go": "7b6da6a765b66f5afa23d95d0bbfdec1a7dd2129978d06b6d02d6b1de929153e", + "pkg/framework/entutils/testutils/ent1/db/paginate.go": "ae62f2e4fe36e37197de75c9633b1261eaeae9becad50bb0284f61645fc2fdac", + "pkg/framework/entutils/testutils/ent1/db/predicate/predicate.go": "e78159251b1eda33b38c8d70c3273efe71449a7aed8e492074e012fabbf62c79", + "pkg/framework/entutils/testutils/ent1/db/runtime.go": "abc5774dcfc3d5449a3319bd36c4818fde3782d47f5060e17d3e25d598aacd8e", + "pkg/framework/entutils/testutils/ent1/db/runtime/runtime.go": "9aa5ceee698de72abb0c951014b2c7d804ec666fac2f7d8ae17b81941921d85e", + "pkg/framework/entutils/testutils/ent1/db/tx.go": "1dab53a900001cf7cb889aee69c8a7f5a021298d5422e7f5f13e5b9f5089f319", + "pkg/framework/entutils/testutils/ent1/entc.go": "bf38b71b6b331fb6901de9c6d2e9828caeb4b14fde271ed8894e7d53627ed7e4", + "pkg/framework/entutils/testutils/ent1/generate.go": "ac1e36669f8deadddce2f8ea10844d566ff7e7e7768aa8623dab3bbda4f1a96c", + "pkg/framework/entutils/testutils/ent1/schema/example1.go": "69e36e2cb9c35510eb677ca790cda51a3a9c5e869f1d52c9f7a8eabbabecf9cd", + "pkg/framework/entutils/testutils/ent2/db/client.go": "4e9e22b4b3ec87a2acb6b6830df8ca5f16b33389029def8189458a44ea6665b4", + "pkg/framework/entutils/testutils/ent2/db/ent.go": "c1d35301076ad62f6fc16a216ff1b58f65344081960841d22f69869dd8d4aeaa", + "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go": "0ad7ca6917267847f7f4e65416e781d4337a3e2643dd207d6d87917dd3797277", + "pkg/framework/entutils/testutils/ent2/db/example2.go": "7a886c6b6b5069c4f4b4341c9ae01d4968e520da2417879eb1925c38d1828c73", + "pkg/framework/entutils/testutils/ent2/db/example2/example2.go": "1a27a6c8a6c7c6e8c1ace4a315714bef2aa6f3038e2d3284abb299de69dad69e", + "pkg/framework/entutils/testutils/ent2/db/example2/where.go": "57b3c6844db08ac99677935a6b112a0d8f70cbde69825e75fcac4ac4a4c2e9cc", + "pkg/framework/entutils/testutils/ent2/db/example2_create.go": "1afca28be66a86c6ec532d9e2017e0a69876aeeabbe2ca41cc59bf92266fe3f5", + "pkg/framework/entutils/testutils/ent2/db/example2_delete.go": "8447c8b6de3f1b5ce6c73151a9d9b87fe3b478423c88a6e5ad19ebd9bb00cfae", + "pkg/framework/entutils/testutils/ent2/db/example2_query.go": "52627233e81f7a8128a8b8cf285653f73ac5652c8e3fe80f9e0d7839d9ff51bd", + "pkg/framework/entutils/testutils/ent2/db/example2_update.go": "0a9551fa37ec36ea50efebb527ef0b6698d22a0063d49bad837bc6e1e78d6cb7", + "pkg/framework/entutils/testutils/ent2/db/expose.go": "0127aecace6e25248f072330a88fc27809d04c1d691b852bcad55086c75f3616", + "pkg/framework/entutils/testutils/ent2/db/hook/hook.go": "d291fcce1d682f13d5e550a401abe80994d46a98b35a4d85607847d377970256", + "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go": "b30a5f652b6317573f27afb75337d7424aa84d1226bd31cb1d565372cbef9249", + "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go": "8e3f6fd411dbb97f28bd24a10cb55ec5b63602f2efcd5441afca9e20b09e47d4", + "pkg/framework/entutils/testutils/ent2/db/mutation.go": "9c3e8755e55192cbcf778bdf07c16de11f506afafcb43372abc8b7a9c55f8273", + "pkg/framework/entutils/testutils/ent2/db/predicate/predicate.go": "aad15902b999e0ddd901fa45aee463c612a697a6d9a0f62eb89d29b30d8fd11a", + "pkg/framework/entutils/testutils/ent2/db/runtime.go": "1d33eaf7c1118610d9f490c3e2f8926ef580ceafc133d0cd3644defeacb6ce27", + "pkg/framework/entutils/testutils/ent2/db/runtime/runtime.go": "c960704564b9c46befb8fb7a1ebaf8cc147e854bd827988065373239b5819177", + "pkg/framework/entutils/testutils/ent2/db/tx.go": "3b7cc1d1be109a8a35f808d64559dcea786e4e24b788f06fd7b7034934a069bc", + "pkg/framework/entutils/testutils/ent2/entc.go": "e704d8a623ef320b4e7e501199265d1b488d7364aba0548be33ac7b0a08d6b86", + "pkg/framework/entutils/testutils/ent2/generate.go": "e7fc31d32197f941f788ebd5ebfb56e1eb3f0c9d3b5791b505d38a7823c44c22", + "pkg/framework/entutils/testutils/ent2/schema/example2.go": "ab2dc03f5e06abd406652725c96ab91ecea0d319082aeaa1d17907a0dfdc0d8e", + "pkg/framework/entutils/transaction.go": "a04d291b4be55ae48a4fe95395acb10d42f363dc69aba97fa9e34a94f5096e37", + "pkg/framework/entutils/transaction_test.go": "7dfdbdfd15358df6bdb0498ae64af6687f8ab29b46ab19f0447548c712dbafef", + "pkg/framework/entutils/valuescanner.go": "b876973271872030daafcded03336a969da54779cdbe2e6f35e0ad04f1e69a60", + "pkg/framework/lockr/key.go": "0ae7ecf0069e0258363ad74079254952a0f7db9ef7894e1dcbc2ac754c4ae288", + "pkg/framework/lockr/locker.go": "590448b5ed851326aab05529fbadf65bf7a39787617a640d6256bc0a0b9c000c", + "pkg/framework/lockr/locker_test.go": "081d82b7db5d9a8b6f5b7ebf69edf9129bf0498bbb92cfb15de1d6b094823b53", + "pkg/framework/lockr/session.go": "7aad13a58e1bb0bb2bea1c719ee1d676392098cd54f571d4b956eea26a621982", + "pkg/framework/lockr/session_test.go": "29e7e7d935405391462d48a29cb7dc5a94e5f8f28538c5f304411845c5ae036e", + "pkg/framework/lockr/var.go": "c25823e949e431c340abba309c90cb624dca18cc896f2a5a9f6cc70d1e252494", + "pkg/framework/operation/middleware.go": "52dfdfeee1dcf2ecd174193df3dfe68af057775290f205e50125e68298f8e68d", + "pkg/framework/operation/middleware_test.go": "10c680c34705d41b6ce5d39f718fbfbf66c6f1c9022f8d79a254d151d0a0b8a6", + "pkg/framework/operation/operation.go": "082fc01dad8c201c80c8f8c967d0452cf535be53898b79b7146053e4f4ef2c42", + "pkg/framework/operation/operation_test.go": "5a64fee8e9a0e98b4f10f16ab7495bf9fb92c56fd823fd08147f20fd7b81b301", + "pkg/framework/pgdriver/driver.go": "06e389844adde25f4c7625c0247db6aa167873e33cb100b65234e77e61b475a0", + "pkg/framework/tracex/tracex.go": "2a18d407fc2add577c1ea8f66e560cf233562b46b58c64986c827a5dc7911ca6", + "pkg/framework/transaction/context.go": "9e5d40244e6951cf14dff44ef1d44db137e9b5e6c490909bd04a23f6c66c850c", + "pkg/framework/transaction/transaction.go": "8169991a93c950fe8ac6572dc29f3a717ab5c367d005b4aa9a7a472597a482ff", + "pkg/framework/transport/httptransport/argshandler.go": "0556065a7b93b70ce47ee69f7549b92c25bd76b1539ca3842162760db99fdd5b", + "pkg/framework/transport/httptransport/encoder/encoder.go": "038cb7294967304ee04927864014efcb92b06118f4f5bacac94966b8deda8a58", + "pkg/framework/transport/httptransport/handler.go": "8be65dfea7eb6ad5538d68c9c6b4ef0ba535615984e544d3c35ef7a679fefd1e", + "pkg/framework/transport/httptransport/options.go": "70f742bf3e86c07d277cab9ef860e4f8d00f014b6e0e2982958e2522f69e6fc6", + "pkg/gosundheit/logger.go": "256d7e31468231a8cc975033934fff53576a1ad3074ebf94daeac96a1d5e70b4", + "pkg/hasher/hasher.go": "bf09c877cfc16ed1bb9b6e7a43cd8ffd5e852248a7856053c32c899c262a00b9", + "pkg/hasher/xxhash.go": "a3889f1e5d6ac8b851efad7977e03eed756357b6ce652e1fc36993be1a7f7a41", + "pkg/idempotency/key.go": "8c1465ea6a17d24bbbbc25e60e2072e2ba8af26f09d018a61a10561f0690b2bc", + "pkg/kafka/config.go": "98d28382916ca09a53db572750946f42b78261b05aa330610f28b4db8a8065e3", + "pkg/kafka/config_test.go": "b2618a3e798d64a4f31cf69853ef34d115370019a6361d3f2836473de9e51acc", + "pkg/kafka/kafka.go": "8cccf07eb039ef07f58a6211af352292d790e4c4f3bc7d442cdde64d38f865cf", + "pkg/kafka/log.go": "35a0358266a0f9b0d84440c24342b5c0cd08c72dacc91f01b7bcea17fc1d2938", + "pkg/kafka/metrics/internal/broker.go": "f45e443252cf9995578e61338a6c671ec071a745550b61e1a6bd3c401f6a1744", + "pkg/kafka/metrics/internal/consumergroup.go": "030909d8cda75aee5163ce232ec705ec00071329c3bf7fea1449f7111930331d", + "pkg/kafka/metrics/internal/partition.go": "97c743ab91134bcc2fd3c27e112638aafa9bf5e67d0c21072c77c2c4f80b43c4", + "pkg/kafka/metrics/internal/topic.go": "7fc20dc2a08535f405aaa4b855959320e10fdd3ef4e0496d3049b77d47c6f45e", + "pkg/kafka/metrics/metrics.go": "e3246265e1cc039e59404c2b2771f969e8de87c87eb2c6daa98bcf9e646716e9", + "pkg/kafka/metrics/metrics_test.go": "844dc7aa038c7bdf49b50b836faf036d6879ee384ce9060cfea9c9ef0cd06be6", + "pkg/kafka/metrics/stats/broker.go": "d399870456aa874e390d25183477765f81ccabd5d40f8ae88e9f31b2193d1677", + "pkg/kafka/metrics/stats/consumergroup.go": "7bb6ea2c6aa52a801b1c66b010b0407a50988e08e7c42aeb3882865e22bc5da2", + "pkg/kafka/metrics/stats/stats.go": "942634d537fe981a19425a9927946c8500378f1169a62b924e706a66554b1e19", + "pkg/kafka/metrics/stats/stats_test.go": "f6c66bcf6f075ff452db63156652cce936d8f0b10d2b5f666c1ba64e324904c4", + "pkg/kafka/metrics/stats/testdata/stats.json": "9332488e2295b567da00fcd800b68a5f5e011995964aeaa800a777757cb49567", + "pkg/kafka/metrics/stats/topic.go": "71a6f1dccbc3667792ecc3eac86243c9941baf34d9f6e8cda91ef5d10049790f", + "pkg/kafka/topicprovisioner.go": "907a84fea2e34ee6765126302fb6f96764632f36ed11b153a26bdcaaa5df2c80", + "pkg/kafka/topicprovisioner_test.go": "5009fae2b7ee972e88e4d8c6b9990734671f73827cdfc60ea2c3d77981ad6ca9", + "pkg/log/mock.go": "eff3a6dfe0d407cfdb7024f710b8b424a682a28f43c4790aa313390c73a747d0", + "pkg/log/panic.go": "81dca3fad030b4f94f5c3e1246d5d9f3581ef01ee08456b6463a8c710c29893d", + "pkg/lrux/lruitemttl.go": "53403d1e3b8cae4ee9d82da63f6e4597f696b1542c698d4784e30ff5ea27d7bd", + "pkg/lrux/lruitemttl_test.go": "330a3d9085426ab1b617bdeab8aef7a0e57b2371391d6b49e4adf82c2f97f835", + "pkg/models/annotation.go": "98632f6b3cb6b3bbd3b94ebaba2a6e11a269edfc8a7aeee67a192d3617df00f3", + "pkg/models/annotation_test.go": "98b026f64b1033dab263dd983779836a4b32f6f5bd552b9748232c6d7ed6334d", + "pkg/models/attributes.go": "f465d658d8ad6055fa6fd7bcae4f4e037f2ac3af4fe0debc66fc6cba84bed82e", + "pkg/models/cadence.go": "c2580f1c6bc1fd713f492c1b0c3f941c56135b9eb1aa2de25265d669e80bf5d0", + "pkg/models/cadence_test.go": "5d7004817767537df04e519308c21289d82c65535563bcec6097b78a2191f61e", + "pkg/models/cadencelist.go": "7d31755f069d1e41e07c723f6496b429ad61718231732429c4261466448be1e1", + "pkg/models/clonable.go": "a710e93cd15980c66e650dc0cdfbf78b1a92997789fdb6d597bef6adbe8fcf9d", + "pkg/models/equaler.go": "416c15a1f7b4bbb49e6464682c07e2b6f056a82960cd137ed1485e33833a2a5f", + "pkg/models/errors.go": "9060f4a773cfb8ed44a9208039d197e3830920bcc16e868d2269a94fdfb313bf", + "pkg/models/errors_test.go": "c3682eb8843cb04455e5d72c021ea730fac91e6f6b9b388cc5859f60bc8b080a", + "pkg/models/fielddescriptor.go": "9ada50a1ee0af809d4135488bd5bae9f9da4afaa5b3f29beb93c7d5603c3ad66", + "pkg/models/fielddescriptor_test.go": "f3e8d0913cf1abea877eace65051da9ebab287ebeeb8fc0cc43e29753ccb1bae", + "pkg/models/fieldexpression.go": "d112966a44c6e2340b23e1bcec5102aa4361f041689213c2d4ec9d095243bf2a", + "pkg/models/http/annotation.go": "2dd425f10b6d91b54f76568d6b63462acda9caf4de980e69b47e739a53297b99", + "pkg/models/http/metadata.go": "9d9a961193c5ab0b40373ec09ab61d154e1099acbb223b2155844b9ab24ad500", + "pkg/models/id.go": "3df4359bd2ded31560689928505a971891db26f0e121d412895be36f5f03f8cb", + "pkg/models/idorkey.go": "54e313813e243306b2be973d3d59091f9c46a72906e8a48e6edb0467b6e7b64f", + "pkg/models/key.go": "7a8dfa53b1cecbcc57c7390194ba84da256bb6b5dc4d3908eb573e57c5d19def", + "pkg/models/metadata.go": "0b1b20b0d8cc647e0bc46970109389dce87a4a03e831764894bb25375776672f", + "pkg/models/metadata_test.go": "783fad23cbfc113011201323d7fd69c5249f0342b80cf0a9f0c05ed47fb7dc81", + "pkg/models/model.go": "df39ee3da62592a94e1099bcda0a8884c35a7d4feb9fef269504070b3f0aab76", + "pkg/models/percentage.go": "42429b04f07609873e18717a11d0e2af29316b9c2620a37bfcd55b55c4bad1ea", + "pkg/models/percentage_test.go": "fa97d7ed6986c80911aaaeb6cfa933182e3f8d0143b4d1ab41da7083a1f0ced4", + "pkg/models/problem.go": "85a83dcbda584c76d734032b6146a988d8519dadcff0ac6d9c357d0a3e3bfe47", + "pkg/models/repository.go": "24a00b99e27246864632311a92f1b78a4dab3fb9115db0e52a6b4505d04f686b", + "pkg/models/servicehook.go": "f6f7e4b3f32f998237608a4120b8dfaa564b0d4109677344366e858eed99aa0f", + "pkg/models/testutils.go": "d11999bb1d97cd721c6d873a3f34ae7c1803ce489e782e8c21f31b3f5978d6a9", + "pkg/models/validationissue.go": "17862d621aeea90b60dcdd152cb45d240daefdbb0b1c0f6fc4bfe9a148d50b33", + "pkg/models/validationissue_test.go": "7c380f9cf14da4d2c0fa913150de8caa5e0dfa386257d4bf14e8f69be830ec54", + "pkg/models/validator.go": "20965a917a928f83ebf54148893de65b06998dfceac9f868b7f92a493dc9ec62", + "pkg/otelx/spancontext.go": "4091e4770fd4ca963ac453f9380035b98500d1a033c3607a0a2d87decad434c7", + "pkg/pagination/collect.go": "11d0a1ce4a6b63a5f4cd3248b67d61b18925088b59edab8a785336e7202b1043", + "pkg/pagination/collect_test.go": "afb362a25713baa2f2c7464080149cadb83f51ce16389eb33c369b47ea8c39d6", + "pkg/pagination/page.go": "4aa1f5851ff9723362ece0eb7e5d573432cf5f69d3f93ad140075ae292213d30", + "pkg/pagination/pagination.go": "7cf618e1de1792208b81021e5a2923ca8fff378c09e582dc2560f49a287839ff", + "pkg/pagination/pagination_test.go": "b0092640b4b79fedde8cbed9f30e02658b2174607314c120b48e453dff076ec2", + "pkg/pagination/result.go": "bece7243283f0f6cd429f5af1b5188a9b9c7c8b3741b94aca58cbcaf8c273eb1", + "pkg/pagination/v2/collect.go": "db20065eb4494ad2283196444cf37115baae35c9b24c2cd5eeb1d9268c222a4c", + "pkg/pagination/v2/collect_test.go": "e5ecf6bdd288327313a1b8b19645be81132cf73c4a45533944d2249e2de34583", + "pkg/pagination/v2/cursor.go": "fc2910f3caad292bc0813aeb9eda839145e20f3fece08e1eaec3b89d3effe286", + "pkg/pagination/v2/cursor_test.go": "f8b9edd72c7ae6e877fc156c871d5c5c73c2cfe27ed47379722293051a4c5b98", + "pkg/pagination/v2/pagination.go": "1ded253dece7592c26d90906136bea53e35b9d57ea9d912e5e3b657f9a211074", + "pkg/pagination/v2/pagination_test.go": "15faa517758e87d1166baa395e6d056f587d80d274c3da405c6f1952bd7f1a90", + "pkg/pagination/v2/result.go": "df24db46d088da933301ccdb0e007c32e933ad088e26564e5eabd4895b5db592", + "pkg/pglockx/pglock.go": "235f8a06ee09426eb60cc2638d5edf77899d6a94527997c50e5e747be9462a43", + "pkg/pgxpoolobserver/observer.go": "f4f5feeccd04ffb3f83e71c6d2a2e7d91c1edde766c8c324676cf185dba861c0", + "pkg/redis/client.go": "eab79bd2f13e4c37c4db555852f6e70c7f6c715f8316070f190512910b7223f5", + "pkg/redis/config.go": "d6d4bc6a551626f4de11a5dee244948797e127bf53f4f8aec1676e362e4b0c6c", + "pkg/ref/ref.go": "5eea911f4ee813ecbaf415ee35a704dd6bdc8c2b78214d909f9a1e82b1e2f5a6", + "pkg/server/attributes.go": "003f0f18d80ba25902d65dddacf6236c18330a3baa589f56d0a32ccc203d4213", + "pkg/server/logger.go": "b71f5ad0ca6d2a62fa6d05661f00501755e540e6714fe35bcd8f8c5c534f2928", + "pkg/server/middleware.go": "9c986d27ed9e17e787188bc443cb9f2fee5a153cf6d5f41e0dedebbec668fa9b", + "pkg/server/poweredby.go": "f14957dd9e2b5894cccac0356316af6da193c6a7816a4cd892a827a982d52e28", + "pkg/server/poweredby_test.go": "9fb5a1eec8d4e703f88c988ffac0db8ed129a7c6a392681b01ff7b4faaa74800", + "pkg/set/set.go": "98f64d246264365c8a8ef1d9289dcfb34597420377e3c0b74cccb1c16c42afbf", + "pkg/set/set_test.go": "6cebaa750cab728d82532b8ec1e30a755a2c7950db23b589f1cbf2bed6c6a62e", + "pkg/slicesx/diff.go": "207f83439b5e91c147398b78711ca8e57ee1989d43e1ab83ed93f9e4947b6c72", + "pkg/slicesx/diff_test.go": "a65e993a76b5bec8805bf95405807c546dc250f09305156cf2a76df80beb6873", + "pkg/slicesx/each.go": "2fe412cebdbdc84f5337435a833861797c48688b0bf4a895eb254cecb748c1ff", + "pkg/slicesx/each_test.go": "2ec56b479a4868f847481cab8325e2c5f7b25b239022cdba1631bc2d488ea8b1", + "pkg/slicesx/empty.go": "afe7a5be7f067b27dfb1fd1bc8d7bc6999cfe6cb55570978631de1485e81cb24", + "pkg/slicesx/groupby.go": "285190ee11944ef2d52b9aedcac7e3bb2b127d92ef0b8f73d67fe6d96f3c540f", + "pkg/slicesx/iteratee.go": "4cccfc3d8f9442e6454a23732b81ae22bc095c62c1798d3e03dac22bcb3ef4bf", + "pkg/slicesx/last.go": "a57f0f1eaf44f208b7f31f754d4e7044cb8366a6464cc6779cb7ed521a16c342", + "pkg/slicesx/map.go": "c9280ae5afe7efde0f7540ab98859f61e70c80b8f209e873ec4c3a36dae37adb", + "pkg/slicesx/map_test.go": "5284393fcc8853cf79836828f235e17427055bd1b7f8f1d8ac889fa877030708", + "pkg/slicesx/normalize.go": "5f0d706ca75d7ca86840d4d6d0389e19f6e91173e7240fa86c05dd19d3f8fd14", + "pkg/slicesx/normalize_test.go": "be99dec67ad1b03c84f8eb33fb75b1823cd8bfdaac278998a08ea25ca0cd7156", + "pkg/slicesx/slice.go": "e70fd4b700d74ec5938fe87fd459e36b6e8024cdb95adb5922d86b500b5c126b", + "pkg/sortx/order.go": "27f3bc0aeea670f9610601ab1114742a5145e4552d3f8e4faa4a9017f99c4093", + "pkg/statelessx/actions.go": "eead6dd1c47ff955ffa4385ea2e5ce662dd35a7ce80c44bfd344ad7e189e97bc", + "pkg/statelessx/conditions.go": "92f87bd2be902efcffae325024668bb00873f7abfcdda08a604f62454fe33d09", + "pkg/strcase/strcase.go": "a54c8706a88f766550e76416be0b2a87cd64015752c03c1be6f0e34d846c8c88", + "pkg/strcase/strcase_test.go": "789676c4403b37ddc29f2639687b21ea443849ae489af26862ea3a9ce6acd830", + "pkg/timeutil/boundary.go": "259d39c768dca852b4314097901be5164dcc6bee8c4274585ac5c88abaada91a", + "pkg/timeutil/boundedperiod.go": "01b5b3bf2cef312ab1278eb52aee3f17cf41e3a837834501f8f2f4191f0ec951", + "pkg/timeutil/closedperiod.go": "8c582718bcaf02e3f4314ccf280f4e87de465cdfef9358693c733ee111527c38", + "pkg/timeutil/closedperiod_test.go": "589935e0c652ab048e3d567af308b36584aefcce99f043b1c518bd50b2d52b62", + "pkg/timeutil/compare.go": "1bef78c68b115575aaa66c64a3e3eb230373f4cd2431ab41b2ffcb5b410809de", + "pkg/timeutil/openperiod.go": "31fa6291e723871664dedfefbe47c97b762efb51b772a90314a263e095b339a4", + "pkg/timeutil/openperiod_test.go": "59aba078c52fccde7df8ff5ab6f7bb8f7a829c06d66b4c6d4a17c5ef91867bd4", + "pkg/timeutil/period.go": "9ca2000668dd8bc0712e5ba92b5c1eb9c8e42ef59a27a8425cc4a6a05af1925a", + "pkg/timeutil/recurrence.go": "b2ace41b33d92d6570151d63d2552058deef143bc16e705d01b392c4641bd0e8", + "pkg/timeutil/recurrence_test.go": "ffecda2d0fcae0b32367ac51581bf3ae7367f9040b0fd61d7a3372a2b2dec2bb", + "pkg/timeutil/timeline.go": "ac0c1ac73e531715dc4f40214e94ebb31257cdf7f345b8ad91150f2a1d7e9c3d", + "pkg/timeutil/timeline_test.go": "adb129a6a125ed890807b40a0bfe54afa7c2ffec73d3995e13c7629ce5c8471b", + "pkg/treex/errors.go": "f619beb3639b255325a249391edb73bce26fff19944dad454be10eec8cf47426", + "pkg/treex/node.go": "5e857e2c14873230b3ba40a12fadef2b33c82240d0717fa25b1eabbf04bc46b4", + "pkg/treex/node_test.go": "ca2e12c8cb46386cc4c34a1fa3c94320c335608af142817fe0e1ff35c7ff200b", + "pkg/treex/tree.go": "3772cd3ed78fca5fc8c4a0fb5d5936dc00a4fb4f040c5732c57e95636a5026d7", + "pkg/treex/tree_test.go": "a86645459943c8e57013ca38110caf10f0b373215f7654ff40a6689bb6a29c3f", + "pkg/treex/usage_example_test.go": "ba04173d225182993effdb6808cc52f3b9e6e34a9f111d6d1f38258d5e069dbe", + "quickstart/.gitignore": "96c3c73604833f53c2e783d77f1f0bda2e353ed037b91e6f11d0a344eebda343", + "quickstart/Makefile": "ef6218ff3223a5a20f063821b14e45c37b0dc60defb9bc4e851e35288e2adb6d", + "quickstart/README.md": "d36e431b0397fe30bb5d5a4c013244c42506c419c330d2fad08285a90909711c", + "quickstart/config.yaml": "12bab47460cf2d88a4ccbac112ef68af8b734e5ab34987974c1b413c17212333", + "quickstart/docker-compose.debug-ports.yaml": "0a01dbd9c22d2567554bac44d5b697ab1bc54dc6738369dc35db3a4b4e31136b", + "quickstart/docker-compose.yaml": "7162824aa5a29ce91ba92b6c0334e8f7aef0a8912c820c952b67edee08089939", + "quickstart/quickstart_test.go": "70dc65eb6e942f3d18325bab6ba78a41175e11ad93d7d35b89ba34186bba17f7", + "test/app/app_test.go": "a989742d71ebb6e32ad29735a8f71d4ae5b2c19bc89f76ff46b44729da7ad1ba", + "test/app/custominvoicing/event_test.go": "28c58ebb08a8841c2c91471357abd0df33a9d0afac53c5232696f85b21636a73", + "test/app/custominvoicing/invocing_test.go": "cdb2a0cf239a3d88c4a155ceef4959273e1235ac630df36ec5365ffd8a257cb8", + "test/app/marketplace.go": "80f73d69afcddf57a8c21e1521eec133fa991cbc0686c4aab8f00c54f61b02aa", + "test/app/stripe/app_test.go": "1c0c2d504f780422816e360db1bd53756f2a18c159980b81527cb82eab438caa", + "test/app/stripe/appstripe.go": "9d7c93cd367270b12ec53311db4a3326a9c5678387ccbe7d263b7f8f4d02706d", + "test/app/stripe/fixture.go": "3ced6c871fbb565a373ec20482153eb96489f68c3b2e0c3e3df366bc7fae5d3a", + "test/app/stripe/invoice_credits_test.go": "547a1141f86ee7b2b3adece3ad343107150f8fc2db8b7ec22a4db491d83e6cb0", + "test/app/stripe/invoice_test.go": "645ff6a8cc31901c0c422087e420c706156dbb883e740cd31c060f661a3f0b47", + "test/app/stripe/secret_mock.go": "2bbdfd1c5abc03d77d9ce8ff6046b667c5f9ab48abc803d4cbf115245491771e", + "test/app/stripe/stripe_mock.go": "c291d80d3ed75f4ad37b28ea448fe872fc3b45fd997b49bb391b434a791a512e", + "test/app/stripe/testenv.go": "6fbd2ce0b4c1e8fc2e889688a6ec6f96fa0fb01f56ea94395100755693af3cbc", + "test/app/testenv.go": "81812aaa4547e067a81c1169654a2212921189087644e3ab07009fc681f640fa", + "test/billing/adapter_test.go": "63bd69aa21192ef9e8d4e7c924d2344b93b931a77c6ef9d5700fae23447f369a", + "test/billing/collection_config_test.go": "ac46b1e46b054b4a8cfc46aac0cd3b6504021098b7187936acfead7a90a44aa9", + "test/billing/collection_test.go": "9989154823dbfb878c76fa1d9620f15bc943332859b7084d801c7acb78c58e5b", + "test/billing/customeroverride_test.go": "9f771fbfa49f20244ecccfdd44846ea7f6348e56136d0f7ad0e97a2d2cfe77d8", + "test/billing/discount_test.go": "11d8a2b959241666878378c53410d15393bb07cf08f0e8fe3fd818742f27ad97", + "test/billing/event_test.go": "b0c5f035e747f540ff44851a7b4cf5992f4d1e968b3d996dcfb69753689873a2", + "test/billing/invoice_test.go": "8e35816f01f04641d7dfcedfa8bc40b822d7c4ae4152a6e65bea7918498f7d8a", + "test/billing/lineengine_test.go": "2126680fcef2e1f4acd77cbf54742254a1762ee9b901b57861d4331e83ad654b", + "test/billing/profile.go": "6c6a6bd782ff16dc6ef3d7e038d5bb6de2a780b39d4e1da23efd6eb859eaa7cf", + "test/billing/profile_test.go": "728f2bee5c3ca85796553f4598a8ff5ba8262dd2865d485306f5941d51b39148", + "test/billing/schemamigration_test.go": "e26da5d80749496b84750c987a8f47c72e74a1ba0ac53028c6e16b104178c9b6", + "test/billing/subscription_suite.go": "e476a1f494f9aad7c5a10a220335434f7b3e65db88b75bac4d7816737c75b86f", + "test/billing/subscription_test.go": "f183eadce2c7f4fe64b5c5bbc60c4961bea056030009be2c12a1eb43768aa14a", + "test/billing/suite.go": "ac64b557b6e04adcb00f4b0574191ca5a2314ff000c81ac4e18d18660d07ad93", + "test/billing/tax_test.go": "58c0878cfbc1ae427192a217ab74313be650c2c9701089af29fa4773a111cec3", + "test/billing/taxcode_dual_write_test.go": "97018c73f8f6a1ea19adea7f67e3ea607688f1b850c6bc8975a01aedffde486e", + "test/billing/ubpflatfee_test.go": "2d77b81fc3f28a49acbd1261413a9b2f1b2514d651c1a203df76499a9ec171c1", + "test/credits/base.go": "5747feb5bbdce0d449db5d2e7f25104c8d1cacad13cf2e5b988ec1514f64dcc0", + "test/credits/credit_then_invoice_test.go": "31d82e30e29aec3049c40b62aa497b587de3c1eedc7ba908f882a75a967104c1", + "test/credits/creditgrant_test.go": "1cf35ec4ec568fec9c35d116a6dae18eb25969f57c46f4c05b54346fe1c67387", + "test/credits/rating_test.go": "33106d78fd10a6cbdb688fa38807bce60b54995ba26b7e416c513eda14eb1260", + "test/credits/sanity_lifecycle_test.go": "30200bcee86a1ef713e5caa42f59745cfcd1e2f953e412df2c992bb6db736e51", + "test/credits/sanity_test.go": "d131ec0e5f62821b510adc3a9ea337564a2a817d282cf9c61b43b7e73b513747", + "test/customer/customer.go": "f599401bf9b159e41a07f0652c585d495a23ec3d2d2e91281fbcf6d2d3fa806a", + "test/customer/customer_test.go": "0f2c58f2e5dcf50326231fd6da7caf9eb7197e3f640acff81badb1eb2ee1bc33", + "test/customer/subject.go": "9f65930fc6a0be467966bf300411fea4e402fac9034b4ffc4de8f75f3828e33a", + "test/customer/testenv.go": "de0430ff0ebea08b7e42f54e81b332cd4dca328aa2e66f26c1b450266cf341bf", + "test/entitlement/regression/framework_test.go": "0e1bd29c053229ec0bf4fde21804b6bc0d57b277e322b9e3154feb91d36af7d3", + "test/entitlement/regression/scenario_test.go": "98477655247f6b2ffff22d91664ace97f2a16759ed1dc8b90e19879c7966c889", + "test/notification/channel.go": "4f83786f43af002a48682166f72a0c360ad95c057a63049f9eb606f2a26dc4f1", + "test/notification/consumer_balance.go": "2b275e4244aa3be0c6b73a99ab2942f6b950fb365b00cddae4fc3a987deea0b8", + "test/notification/event.go": "e2987e312e176e39ee8dfe22371d6a4d86f4dd9aea72589292c78fa9320c9637", + "test/notification/helpers.go": "058d9e5a5715f3689b730b45438436c0b19b71d892dab9840d6e26677441982e", + "test/notification/notification_test.go": "7572f21d3809a88e799a62a626a00262aee79c3250d12f02bd3ad184d5dabc6f", + "test/notification/repository.go": "4c4f2d096738b0d1f981b4c1a0de839edc1cbe3b374442c6f859ed699a8193d0", + "test/notification/rule.go": "d06ca7c3f79e9a8f2df904697cc74d1bf399e4163033fae1d7a4fbbf49a4f77b", + "test/notification/testenv.go": "c5a694497f03941a707812c091bc696db850effe0260f6ca433d6e22e5d5cd9d", + "test/notification/webhook.go": "bbe20ede6654deb8b9b4848073fc94ab986245b6e3dad5ec458d5516cb318341", + "test/subscription/framework_test.go": "e4cf05153b9a540a98fc1c58604111c333ed794ef978412b171d0417c2058977", + "test/subscription/scenario_editaligned_test.go": "0252316a7d03e52fd4d25b92b99445963f62cff0cb47678056d193afe6dd71bd", + "test/subscription/scenario_editcancel_test.go": "2291c3daab8b966dffcfd149cfb65a7ebecc934b3830465e28231dfb8a6a1c72", + "test/subscription/scenario_entinnextphase_test.go": "78c2161e1a953b07c8a339d9e0de731b993679eb395d032018f1328d61c33454", + "test/subscription/scenario_firstofmonth_test.go": "d296ab64d5fa1cd14c800ca1bdc43350887329fa8387db568a9f1b4c760a79fb", + "tools/migrate/README.md": "335c3f9e09fe01dda2d34c9d9c93a0407ac6393f2303e0c3b5073f152e8686fb", + "tools/migrate/cmd/viewgen/main.go": "2a37e39d66f29fff1c927ddabe6116466f7b792d8ea865bb84a607c4bf26d526", + "tools/migrate/dedupe_tax_codes_by_app_mapping_test.go": "0842517fb0a8794c811b58f39cea7b519194873f81149d7143f9cf1b4e1841e2", + "tools/migrate/feature_advanced_meter_group_by_filters_test.go": "70efe0cb6b5ac1053798fde6ae003e7bbd5f44b472a01c6542e2eb2545b58e09", + "tools/migrate/feature_meter_id_test.go": "c9f33ff91a7b1e1df47d57f6b771e2544d830fa8367df0dee0d63a74f4f6d300", + "tools/migrate/flatfee_runs_test.go": "edaa4d621e97fbe917d42a7eadffdb24d518da5e0c200eaebdc3979db66981cf", + "tools/migrate/fs.go": "2639cebad0cb5b016953ef76222ddd25c56bbebd79a875e009f653fc49567534", + "tools/migrate/fs_test.go": "d94f81da443a9599e894ed3a0a6efb8666155a95cc6cb00117eaefe20c139e33", + "tools/migrate/generate-sqlc-testdata.sh": "e78135a505b913d21390e0bd6be47c76929c26034b39175570dceda13f415022", + "tools/migrate/ledger_tax_behavior_test.go": "ec1774cec03ecf8c94b965ff5892ca2bcc4cb1149fb81946ec6832894edc2c70", + "tools/migrate/llmcost_normalize_providers_test.go": "f11995cf88eb9453310ef74c56a2c7569eb010845bbdbd1fe235d346bc5dcee5", + "tools/migrate/migrate.go": "946b1f88b2037122e53d99e71602368a2c98ea8360c19ac0d0d209638e5efa41", + "tools/migrate/migrate_test.go": "8621fbbb18510f4fc92081cf91a191db3fcf13a06c16ef7d7c16dcd0ddbc7955", + "tools/migrate/migrations/20240826120919_init.down.sql": "f2de8b7fd14fbfb02607b36443f65ebadbe1a39a97fea75980acee75cb7b3e0a", + "tools/migrate/migrations/20240826120919_init.up.sql": "5ba7055af21cfeb414757ba50596c2082c123efe26bfc0209c6017d544cf5919", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql": "fee1d560210942f7588309c8cfadec4d781bdda5293b9ab28ca581faedddcd64", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql": "c687ee865256681707962b45f234306c5652ba9cb0a6cd1b25a2346798f4784e", + "tools/migrate/migrations/20240917172257_billing-entities.down.sql": "8fadc2b7073f4c57e25d1453003710d9d3d8ddb08b04dbdd5fa5fedb25c3bac7", + "tools/migrate/migrations/20240917172257_billing-entities.up.sql": "f551def2214b2bf0d272846d1ea5c5f13667601d3deb4f56c4b0f30751c323b6", + "tools/migrate/migrations/20240918204720_customer.down.sql": "16df61893355b31ec446eb85f9463fbeb45e8a5af19202ae4b80aa6d8ebbc945", + "tools/migrate/migrations/20240918204720_customer.up.sql": "175cdf43d01c9ba310840acd34d2b17d814771bd22e466755875abdc4f19b50e", + "tools/migrate/migrations/20240919144910_customer-timezone.down.sql": "b551dceafe137ac33642b2861da350bd53faef6bd18a2d6d64bf13b7d7af9e89", + "tools/migrate/migrations/20240919144910_customer-timezone.up.sql": "68a7ff599599a254355be141a0637d59d42aecb5c5ef68febe67c083a7800106", + "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql": "5b788985ccfb424c321e15aa70f6c0156853b7d0334b5c6e4f4db95c0c782a6b", + "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql": "cde61e7f496a2548c13351b403fbc8f4f1ed60542c050dc2bf08259889ffe805", + "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql": "04f0bc7da4981c1859035fb425f044b1117d93475b75089f2006d3d16c066eda", + "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql": "054fb3fa92a049d2c1984dfe2bfedd0f652c9a339b102cb666262589deb50b38", + "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql": "d842925c50eb2c708533a00be75ef46a4faa222a51bbc4ab63bee1f571bc596d", + "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql": "81fc1b96ad20e4d07e89381bebbbe7063f72e8d72f6b6e534e2cf07bac04c595", + "tools/migrate/migrations/20240924164504_billing-profile.down.sql": "935894bbfcd532278d42c1891f2c4dc21d06cb86a712ccefc6d7822885f7eceb", + "tools/migrate/migrations/20240924164504_billing-profile.up.sql": "e3412907b0057ebfe67f1ecb94dbf6adda96eac5d3570c21e19725551383e162", + "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql": "3bf0c72aff1a435a54c731d942f9f03975c7668cece13d6b409a78886d7c7cbc", + "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql": "fb31652482e0f37f9efd50425f66a3abb3c0d275b6c117ee475cf9a3abd0ada1", + "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql": "bc0bcb57738f449a9bbb03a9a7f72efbefda31eab0abe70ae429b431a901b1e7", + "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql": "8c2c6f747e08e2c8a8a901e8eac479448ce83671068e260af50e866903890402", + "tools/migrate/migrations/20241013151355_apps.down.sql": "c3c09af9018c5708fce422bbc5928d211589901e099079cfc38b1de3c56b750b", + "tools/migrate/migrations/20241013151355_apps.up.sql": "28b19bff11c67b72e46012d949374c11c0df0f2251aff9a077e671fdd38d959e", + "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql": "4ec9686d85eceba3b6bf5e7882042ed0edea27afddc962cf73a8d562ab5dae21", + "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql": "90e35ef61861602fbdc826af6db1959825a09fb68afffdcbb4cdc83806e80ec0", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql": "ca5980a00289775167bbbae420db2ef0c05e122046780862c4d944b5e6283f5f", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql": "b41418fefdb8b7fe810bdf15207d3922fe5d95804402c573932d603eedf4b837", + "tools/migrate/migrations/20241021124045_billing-profile.down.sql": "151df8cc4437ab9d30e4e39cedfbe49d3ac3f117e79bb708d17ca3a3e6476f22", + "tools/migrate/migrations/20241021124045_billing-profile.up.sql": "ad8e3d3586b3bd6f71101388cad52471aa30d1e9e6fd0b8bfd2593b2b7f4b1ad", + "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql": "13821c2d4e5b08f65095d99b1fea3a7ca4e4fcfc6d92269e34dedb0852b49631", + "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql": "f8765e390522f7ff7727c5eca50b8db54b11ba652c2e05131aa74e0926bb5160", + "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql": "a1935ce010bfefd20106903ac6ee337a5fc23e16d299328cd1c7e98af76b3149", + "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql": "2ae955adc46e9e6f16df85280c2dd860bd7df4c83fbdd01d4babfee03b1fe7f5", + "tools/migrate/migrations/20241102151321_customer_filters.down.sql": "290d32d4f612d911e3e3bbcf74e86d7fff22bbb2a6867f866ad483c2ca7df45d", + "tools/migrate/migrations/20241102151321_customer_filters.up.sql": "b20c1bc95f5dee7488be75234258060c14bc72e4072b17286602345563abefb7", + "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql": "3005270785b91a8effea99bf8ff55bffa83102d49b7296527d0f99e934c1f58c", + "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql": "298522cdcaf42e007cebdb394b2dd8264332a7ea9b57c98d70772108d58a6829", + "tools/migrate/migrations/20241105171821_plan.down.sql": "d370576e59c7b538b66472e61f5fb74068d355ee8b47c81b70a6bc056bba842b", + "tools/migrate/migrations/20241105171821_plan.up.sql": "95385f511671ee3827d607e3d104acbc5b17ac77fb10bf82f6ccf28c18b1cb44", + "tools/migrate/migrations/20241108055754_plan.down.sql": "d2cf1a85b88ce20e0cc9ca35c43d934dc921e986c6cc4aced63d5f2352bd4053", + "tools/migrate/migrations/20241108055754_plan.up.sql": "c7b34e9d96256003692af9d6024372a6395a0a4149736a1070bcdafef4a4932e", + "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql": "93f270ce5d6f45ba2b266e0522b23cd2d591df0558dc7df73e1ba9295d410cfc", + "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql": "ac0f057bd54305e1ffb8b0edb046f18ec974d76bafc62c5045f918583612a592", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql": "f9164bedd7d36f075c5a3cf052ea3b97e05c99f690dce570d63ec3024dd2c0cb", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql": "e47d9afd8ac52669a49b1be2aab5ca357031b82a96629d2c0b11fd42abd9b6c9", + "tools/migrate/migrations/20241119131528_plan.down.sql": "c10c3f445fbd497b6498f2c3fa62f6736ecd3d85af444259f8c3f106dec8668f", + "tools/migrate/migrations/20241119131528_plan.up.sql": "4c023860db8cf3e8a9fb2cf59022699dcd8cf8765b319a1185aa14bcd5e0cb6f", + "tools/migrate/migrations/20241119154436_plan.down.sql": "4848010a3b529cd08bd69ee20d1a03acdbc4e605d8ea8bb5f2dc2c2ffdbde124", + "tools/migrate/migrations/20241119154436_plan.up.sql": "19bce083ffd22f59db8dc4b2584d081677127041e6dc03fa27d28da178de902d", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql": "32c19b614cc006827965ce569d411b6ea597e31f4e3e1fcfe75623f484939857", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql": "e941786c6f29a756fcd9e68444a63faa954b5bd8ddb45b322d504cecfc85d5d3", + "tools/migrate/migrations/20241120145625_billing-discounts.down.sql": "7806a59c4a5e1129a63bc230c5256d45c8d46f0ff734236894900cfd44b9d5ec", + "tools/migrate/migrations/20241120145625_billing-discounts.up.sql": "86078c01745b5ad2b4980e7cbdc0765ff2543d2beaf4c8da9be49c1783cdb478", + "tools/migrate/migrations/20241121145549_billing-totals.down.sql": "3488de794cd4aa18ff34553d2b70e9ace466b378e8ee11a8c7ff7aae1e10144c", + "tools/migrate/migrations/20241121145549_billing-totals.up.sql": "7d5d0cc3c3dc77117311465435b36757f99e077fd46ea15285fef6c3e92bd7d6", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql": "79376ed00b992aa8c4567df4a6996553c793fbeaa30547788b09f9beb1039492", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql": "08db5f5704d715273828082c81e9c01e47b3c4d6871032e53c1a84e3a89340de", + "tools/migrate/migrations/20241204162012_subscriptions.down.sql": "ab21c05fcd1414432d1fd5e39835d669d97ea4016ee0464e734eb2a12a1e150d", + "tools/migrate/migrations/20241204162012_subscriptions.up.sql": "ee1d604981de89b8d78c083eae83359e4379953805f1f7f9d305f1e93a9a0015", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql": "9eae237561395a4d6e52185841edecc28193ed72b750b2248bf2fd99d2499a9a", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql": "bd055cd4daed1b650f30f98ef7898f84523550ae96fcce6be2d5b6133794632a", + "tools/migrate/migrations/20241209085334_subscription_fields.down.sql": "b2431ffeb37f99fc75e05e9ca987779a91761db388ffbec5ad35d28f7e4e9a96", + "tools/migrate/migrations/20241209085334_subscription_fields.up.sql": "e7c82d7b639a9abc68cfc27788220e2ff5bccd8b385c816dafb8592fc53cdfe5", + "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql": "34891d932404d52d0c127dc597e48c12becbb8199acd1513a98110e22187e9b9", + "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql": "e201df39cb4937ad6173149880ee82c8aa60493cbb37430d245a9bfccc78735c", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql": "8b547a0cdf4710a4d4bc3f9219be9d945460df716741ee64ea90dc3b07409bca", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql": "ba3a198cb32013831b0ffa05796fb8261ca21444cc9ff7701ff2965fe5c623a5", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql": "a49a49d8f4b08e2b6d09f3d709a351fe992b58bb88cb6b68ca7cf618077c6f73", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql": "6ea5bd5b3b53812ef739f49e91e51e1512ef1afc943fd26b63d0ab947f217148", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql": "89835958b9e13e8996fbeb6c1fa3483d31f4f8aafe4e7b53bbf08b7ec3e1ee4d", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql": "e633b572f81ac427e3ffd10009406a5e9222f7be774f9fe90a315b5b4e6bec25", + "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql": "2766885d641b1237dc6ceca829c4c70aaac86660bc859502456f972729cd6d9b", + "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql": "969d89eb4b90d84843145e39d56a89a4c51c4e45dbf5aae6f35a48fccec9d9f9", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql": "2fbeb2234313a391096cfd35d8565c3457e01e9a02edd2038e8ead83cc7eac94", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql": "e656a42fbc6307794d55898a8ea2bad22e95d51a732cb662000ef24708c4c5d4", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql": "facbc9bebcf1f73bd896440a0840e1610eefd361ad39032865190976b147e27f", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql": "a41c1135302666607869dd44f08516de7e259cab03994e30787a466f0c6e8194", + "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql": "06817612eca52cca261857ac622f293752dd28d91c4c7754291db1892e040aaf", + "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql": "0f0a470127be19d9d7efc2113769fc26f1203af03b7b22927f542e6461357fea", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql": "c10a7778a73b824c8423b80c07ab79abc0629271fcd499d4ec39b50c59722653", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql": "63e38f5a3074ae259f8440f4ada8c956035bf961e73dd499077571b6c22107f2", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql": "0fb0f08db27d268444ab6a2ed6f16f33d90fd488bf42ef2b14731d1b0531fdd4", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql": "edfd88473bd62785e420127826aa8c13b1f30817b5fd0de7795c6cf5216060a9", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql": "496f328d1b31382279d2a9084c2dfaea2158c7ba0dbc8235b0ab21412f46feef", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql": "73054037ba8a1f08234bc5d1d7e4d008a06dbdfc1cd5ca28ec1c26096ef237b8", + "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql": "1f1a06ca109248af3b9ca02e80cc731b76898746411abb2f339fff9fdd0d2b2c", + "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql": "d26fc75c2cebcc7d70d75f1b3ee72ef7566ab82d768535ce7fbff517f84d7871", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql": "c9bf56ef017a428c81a417d51a9877f0c2d7d9ae8f5a91f1f6cf96f2b771b89c", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql": "aa0303f08ea044f9e29c4ae90ced0c01d8c0ce46d3ad1dcc92e81f5888150100", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql": "112ea974b0beae68a706a673c3afb23e0556035678c2dcfc880ae2480c8bc29e", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql": "fb1f549780777d23855c1573ba5fa723d524eef7f5c8b44424cd108dca1a8318", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql": "0425b3f0c73d29d3c27b3bad6f528d85bf05b7b67de0fcda072d647241fbd289", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql": "c603b987ca18c6c0374571ac7f681013cee8fb0ac9edcf16e8ebe0c74189ac38", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql": "f9c9b82ef64d5784081189546998db4dfb55d4e8a84907dea9c273c86bb18bb5", + "tools/migrate/migrations/20250130034713_customer_key.down.sql": "a073adfc1fbb5a92a301c8cf5ffb87f501dff3729ba039dd2e8550ab126f0619", + "tools/migrate/migrations/20250130034713_customer_key.up.sql": "6bd0b92680872d2284ca74a5aa360409d40c5da00eca439423dcada97def9150", + "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql": "31466df9ac64185632c3b1f70ed6251f0a2b021c756464cf412317d6563f66b3", + "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql": "4d50249208f09496e5831e624e1f6bbf8c1096e080a7822109b64108c853a3ec", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql": "f8485dd8cade89b4331db520097eb6036b67639dd7020bf443692c2fe2a4d8c3", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql": "aef07c59db96a0abb1b1cb4e09f63f32f1e3e76bedcfdbee2b58df81b98007ce", + "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql": "4d2bf0adcd955034fcd7bf52b809f095bc5131cd2aa426d5eeadb9d00233eaa0", + "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql": "042f400e0881bf89ddab58abad6022cd2bbbc7dc682569b21d81bdfcd96494ff", + "tools/migrate/migrations/20250203131553_plan-alignment.down.sql": "9d62f0cdf582c6fc728213db3b42cf97e1279324ae32c1ab6384545265815aa1", + "tools/migrate/migrations/20250203131553_plan-alignment.up.sql": "3e6bbd3f50b1199b612bd16850079f93b3cc59e4cc9a7a542fecb51daa1859a5", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql": "9aeec8dd89532a3c5742fafa868970eed496a28942335cf28b3e9c03d5b0238e", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql": "5701aac7920c1db450fc8a08864a10031b8ab423fab06a3fe5c032499c0bf9d8", + "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql": "c196bc578f7b28c9f76b2b5587b1cb4678885d7bdad547976846f3b412e1327e", + "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql": "dda57a25826249a359a766026c24cc48ce8e8fd571ab60ab2518834cf6f8e53e", + "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql": "26aa046980c78fce0a45e700c73c57c4d46e56c814741c231310e98859907c10", + "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql": "82a6d7baf8d114983f5d71161c40053babce8207d5c4969c74f605eb35b8d5e2", + "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql": "f0dc6449b36af56d572229df18022e852c76e9e98a086a2d60f5e4a61d16618b", + "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql": "b15532be386059abf3b10373ae20ee0a3d17f1cd5c74eb01e95df7b1d852b235", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql": "26525bd9d7876f6dcebf2d606ac220f9e8b1b9a6ac4c47bc1df91caee978bf78", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql": "fde975d6b9e2ada7b1c4b36422f48a92c25f78af6a6c52be7cadce9964b3735c", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql": "7732c25d331d713fa7d6354fcead0a53a3829f83920689ef73402979ec0234da", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql": "26ef9a7eef09a7654cf2ac2cb9c4cf2f3810a5f79655af4e57f0d38214609058", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql": "2d1c7386db513e5a0b74b5952ea767a3b59d5a555f88295019ad2ffb7e3df584", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql": "c9088612798069638f667d272e9729d0531832ee1d6889c5aabbe6bcf5393514", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql": "dc635badfd4c48197998b06b83feb61706d354c994c2c59991a0419a946cbfcd", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql": "62ec9de7d577da01bdef3b6ff4424077838193d69fdca4fe30f93176a29c549b", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql": "e07855c488de2d031010fee96361474c22068f1e63a18132c0d7da3f1481bca1", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql": "10af50221a4d2bcdca64b9faaa5023b18df7095089dd1cd33a0a2b989353c97b", + "tools/migrate/migrations/20250305025807_add_meter_table.down.sql": "8491b8357b7e335c3a8dd83dc386c729287ac43802c352eec7ec5887e30cd521", + "tools/migrate/migrations/20250305025807_add_meter_table.up.sql": "53de564159428991788fad8c7158af2e6b9dc56e0d04149a039ee4e75ba53fe8", + "tools/migrate/migrations/20250306040407_resource_meter.down.sql": "c429f4527dae1e95ed86137b159eb947622898872fb5338437d09d96afcb98df", + "tools/migrate/migrations/20250306040407_resource_meter.up.sql": "520e07ddff2a10e2267c4322f2e05315e4139e0b219b3412d66ae4b07f442013", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql": "ff01c37b1f0d6728fe398aa73db8a8df3b187260bebcc61b467276242ed2160f", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql": "b618a5f3e43c466866ff86f9b3d85c787f4a654cb31f1bf57eab9473a9b09d8d", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql": "2b1a832f7cbfff278b0b98e04c01979c31ef0c1710bc167561e36954efba2146", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql": "aba9b78133966ff4cbdc2d02c1c323a3e1c13c6a8025b6f88d6043af0d83be0f", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql": "1fbba57ebab86c0e53e0f1ceb4b6f8a0f76065229c8f1ed904a6de777fb76c7d", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql": "6878b6a2775ae54530bd3ed24bc129da9c0382cd8104b5692e2be869d6473405", + "tools/migrate/migrations/20250325114848_annotations.down.sql": "295e17d64297a5ec2375723ec967623c0e305072f49a02bbc5f262d4e7a4b9d7", + "tools/migrate/migrations/20250325114848_annotations.up.sql": "d36f989290463045b28758885fe8df2b867b241d7d7d4c24e580276992cc8a5d", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql": "70950620ae84d88780754926198ecb4e81c07a1d3d796a628258e3f9a9b9e226", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql": "3306cc6daed16e0343132065b79d34e1fabdac992917718b052bdc78f6345427", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql": "73aca511207f83d2c6bf69999211048be3793d7bd06cd7a34c5e57b641014d7a", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql": "d702e1da40169455628a6cdb163ba70f09991ebc2ca9b4b7c345fddfe18212b9", + "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql": "044a4a7f9f052e19fb2d3df60f7ac6eb12fd41445d3bbf9b7baaa1effcbd1128", + "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql": "cf842c647c2dc67f776b8d550ea584625cee5c56ada174661b99f798a40331b3", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql": "82a52937893bd1c9c22ad5985a566447629f7bec719385dd70606fc6a533c22c", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql": "0168e857614c8ac588e0c33f87b4d7b8100bbd42cae68becb55f3d205aae25cf", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql": "be8e1224fd3e4e9a0d8bd16e757a69b94624a7f249856f4714920787d96f34e9", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql": "d6e29e80fac0bdd4ac8aee9d553c3206335aecb44cd7ec1f98bacfdef212472c", + "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql": "dcd55cb5d53b2c912282ad1b0d5607e1429c98f7a21b5b3ea727eb679f744d1b", + "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql": "8eaaf97150bf3f1e38302d1c8e57e2f8f8fce6a568c939fabecaca4ea014ad4d", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql": "02dbe1c2f74e8915a3b7353eaba64b7cda7b4ed30a3e9ffdf5f42e5eb1ebab83", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql": "b9dd60e8043ab37dbee25eae03f145485c9d462c023ef2e4b0562ed49c70554c", + "tools/migrate/migrations/20250404105832_addon.down.sql": "572928bc6ef6577b340cae3fd4dc76e4b35191cad36d3929144a9334d1837f2c", + "tools/migrate/migrations/20250404105832_addon.up.sql": "7aa32dde81615dd832b1dd410f3414e964431470617815c920f48bc3c584a85d", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql": "786075a5723415dd82a260e543f1ae53247f10c3db2186b7f219ba0f15040700", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql": "4ccdbbfd309051702697c2289aef58fe8546c31acac6f7b18aa36bfd09355db1", + "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql": "3458b73b7216cb2a37e017f2f8611971c24002766429456404f7cb9a07becd75", + "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql": "abe4cddd4ab9f153d11d492e201d2c4ba10ae0d70722fc3fbd6bd849ad485351", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql": "fbb3fd759a8c6515054512ff36350fb0fe18b02d3811639cc9e313ed0903577c", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql": "fff8f7d33386a4e087cef684cb34cac146a6a27edc189646f7a209972a0541b0", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql": "d00e59348ec1505d0dcf27da31d1e00e2038e3bfeebbdd7683c6901cf45b27d4", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql": "f3b49f80f4a9d8df4efd8a793b54d19c0921611af8ee9cb36c07d28202a0b409", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql": "019748ad1d1dccf01f40ac6c901539cceb42d77fbc9308f43f111103ed1451c9", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql": "1133d5c30a712b96aee8f99e2074c04b73dcf028622ae565e0c34cfb55de992b", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql": "a20b87afa84bf8929045f798aa64e35c11a90bd34e3367433eeb7243dddbcf27", + "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql": "2377c978af37738edca307aef5d92f3e2263c5118f9db231bf9e684de782be7c", + "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql": "a2055b87397f0f9a884523273b2b05d01c25eb1b54c007bd16bd6e93b648a041", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql": "ac33f4341809169e2af1e32dc6a44e6a36f976787cd6345607c9db17f45b662c", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql": "3f015b61cc8e3ce09bf9a5c67557df7c8f7ad3e66e5dcc5298f126b8d9319833", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql": "5a43e0fef7552b5b0d2c61f3bda3fef3e8d6192eba891a41d4dd8612ac7afc2b", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql": "c21837787bd2337c6783eeaaafcecdd008d3a031ad58babccde2708f44a8f6cf", + "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql": "d6a67e0c3ebd3649cffcee11f563fd07f3192da1ec69e90106a5b698e70b4127", + "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql": "712316c9496aff3f471d91763f870f4db62913a7e953b16b9a23f50d2842504f", + "tools/migrate/migrations/20250415105134_plan_addons.down.sql": "96615bd57d3fdbd44c98c435a336cba070e5bd29a5beccba26031c7dbf823705", + "tools/migrate/migrations/20250415105134_plan_addons.up.sql": "530eccb13e6683056d373ec9bf766c10a44ec109e628dbcec474494026cd20d2", + "tools/migrate/migrations/20250415143130_subs-annotations.down.sql": "4985c6764c1ea876dcf4940c0083400abeee69374f882bed5b4fe5b8e1ca7353", + "tools/migrate/migrations/20250415143130_subs-annotations.up.sql": "33a0fe9b173a7912ec7463ce95a39b3b8c034e67edc086256fadef179e7489cf", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql": "aa2f8435040cf241589653c2a0fc595ac616d56cc24ca7eacc0a53ed33e8befb", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql": "aa28ecf578021fa24564c9a39a8e65a96fbafbae3408b5f074cfb5839c711085", + "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql": "91e44e58676fbebc193fb8aa25abf3803695b360a34907b072b16a27fc17da1a", + "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql": "b90c1ec23b612cefe3b6b9a092aed1be54311fb48678dc12eaf9c59d79719233", + "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql": "6e4b826c3de66886e90344637a449665315c71f538fd9d7a73e434b385a8f611", + "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql": "916a11d9f12d5ff4939e703e8a5e9cefbb2143618e3495a7a1ad82accd638d10", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql": "661c473d9ee26171d0dbdcf55ae4dd373d6716d1c8ca07ff86150cb40bbb8fd9", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql": "942a0fca6728183558a512f2646e0fe8f7af401a705cc54575cafaf33a881843", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql": "aea8f315b729dd88ff7bdb9a6026089e8cde975df439cf8fbd6aa9aab41afe7e", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql": "b645b99d09b4cfbd1d866a59a2694cf39a6428e2c727cbbfc97fc365b77980ea", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql": "76622c512a0fde7dc79cfbb9a6265364e4633438cfc2d8ffa410c61526c195e6", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql": "e1de3adc833559df6d994ad516550f970203b71066939542ac84a57bd2f3a6df", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql": "fc1c57c26e192d5c205cde873b0d83f36a5381dd4b369270e085c18c62f45f03", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql": "8351181dd9caf680bff66934ac6ffecf13c30830d4b78642ba7a4f0d655d707e", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql": "58953992f01a1918d172d8e308913fc0623c42254e7fa2d487d68e03be0e0c41", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql": "1585af188ac07c901067d103c588112704f12636b21b049ac4c5f7ddb9712ef2", + "tools/migrate/migrations/20250522155754_billing-line-index.down.sql": "1cd53ce443d8944de6a48ca257e90263244e93afeaa3d45981ff51c3181d6055", + "tools/migrate/migrations/20250522155754_billing-line-index.up.sql": "e17a9ae25d173a88e95c4359369a4c4d9dc7bdef068e31d0af5a486e0cbe69bd", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql": "55d5c4ef19aa098a261edaaa0ba3c8da62e49415659e7a52a96a070eafe3ab57", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql": "00ea23b140cbd721352c80ffc106a89a40a89d0ec0e91b01fff86729c138803a", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql": "69ab41821419efd9f2092cc100defad77927296bc5825afc092fdb7323bc1c8a", + "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql": "51eb646a2b165d4d0c65750718afdd8088417658baf25354f0074b6087bce9b3", + "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql": "52f9de8aa21084521750ccd0832e6e1db8bfa81ee30dc14603344e8a346beac0", + "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql": "514d4e0de5f5407494a69822ff1449f2c1cce7378c7dbc5bfac0e5f50883000e", + "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql": "0ce455777e82e0b038d4c21a4688632cdfc712e0a2b4873e4e4f7709e756ca4a", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql": "60d9c7667e4b05185b08944facb548173cb1c5f50d06453b9655cb908c7e3b4b", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql": "6046f024d169ed36995145b3daf790eb1ce77d3e432ae1591d8a899f10b82943", + "tools/migrate/migrations/20250606115858_subject_create.down.sql": "3b0958204cf446c9908f0142fd37cde13eead3267c807fa42e119b88e8b4f2f1", + "tools/migrate/migrations/20250606115858_subject_create.up.sql": "577283fff38988e0a8e104c38b40f6b08a71c843813dfb4f5af62d99fca2d304", + "tools/migrate/migrations/20250606115859_subject_namespace.down.sql": "c94f53b7b5e2c25ffc7876ed25c98198159b169a13dd584fc491d5749c090fa1", + "tools/migrate/migrations/20250606115859_subject_namespace.up.sql": "afe8bbd48a152cede0784e6fca8e5cb8f0f4fbab1f4dbb541e1fe9f3e2f21fc7", + "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql": "4c16b257eab908677f42d672b6c239b0d8971c907b2818b8fdc8ca259008928e", + "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql": "8a42513ea35ab6b452faaec10e7bf429303d985145af8f0716804a2f64e7dd24", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql": "e66c2f9e4306859a53702ed40138367fb351f0ee85a9035ce0d0a65ab2837f9c", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql": "e6e365162b302f3835a17b73990dddd0668b80611c17d1bf55947335b7d48cd8", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql": "9ced6a4dce10690a85a301a651f0d11f55e5d9851f9db6818b69c3198a8e7115", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql": "213e25adf55a2278f19b26002d3d8c5ca4f672874e22e01380c3bf8f6beed7e3", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql": "c36f7bb6c5f5b22232cbfe8b3fd4364e282e0997a211fb0945fca9129f73336b", + "tools/migrate/migrations/20250618194112_remove_app_default.down.sql": "035293e7ffb7145e528f28739ccca128bfa7914eccac946710235ce0c4c1aad8", + "tools/migrate/migrations/20250618194112_remove_app_default.up.sql": "0ccbfe5930d64edfd039c8078ce7bdfe0cb8cea253d1d89ec6766b0cb35f24b1", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql": "3ff290818c4709871a3c2a188649f6f51396a9b03e2b330e2910ad5d4015d25f", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql": "b074ca5e0b0d9890b09646fff1d8ce2ff3aa93581e462a3c6efd97a31329a993", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql": "6a518346ec7817f8d1d2c6bd9dff26861cfe05ee58d0d49bf0cb915631c62e92", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql": "ee22c3d3f8dc1f5f0d13cbcf99380bf70f5f1da5604a482a57b47993df644717", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql": "ba91a4c39f2568b301dfed5dc6e398b2dc1136a5285d5488692e9e4705fb7e69", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql": "a493f703ca87242a47a8edf9840bfb8ff3ff8aa560c908727db9d9ccb356dd22", + "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql": "42fc9b7220c0a5909fd98efdde0d1518a3289fb79cf0f24308b88e7df45178c2", + "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql": "5fd27899a118a1296ed4ee633ecb0018da3dc9f96c151cc11256bd187f9b5fa2", + "tools/migrate/migrations/20250711121333_customer_annotations.down.sql": "b961a3faba31cf802ed25c501dc4639caf866e4c9a89e3674366ba391ec927b7", + "tools/migrate/migrations/20250711121333_customer_annotations.up.sql": "0fafa9fbcbe5cd2bf0090b6543eedbccfc4baf124775d113e31d85fbfffe8dd7", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql": "e3bdd38f94340c9a8bc5fced02eb3886d37648eba402f6e5e5c33acb01ec165c", + "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql": "d20df9f608a17f50f4558c62bc4f38aaecfd8ea9d5de0e94ab37ac922b972664", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql": "7f64a45b50ee45198136b749b3e4ed0a380767ee43d16f308df333e55c6681c6", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql": "bbb6be0853279a79564d3965029090b6c2bebf2d3a9b4ddefbcba683c8505895", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql": "d8da93d54b8e63edad7c268667b7b161807b3f658ac1edf046f0ba7e321ad93c", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql": "03726681a2d6af332b9bd7f8d40e86dd6618d75d833e37ed3fddae66f1324e33", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql": "c64312dd6653961c90c224f3602fc0825976d0d4cf60c2e9f7d62e7a021002a7", + "tools/migrate/migrations/20250818081817_subscription-period.down.sql": "2378e2c6cf03bbbb332442547f7ef84156a572f88ef265e61a68927eb4ad91b3", + "tools/migrate/migrations/20250818081817_subscription-period.up.sql": "804a5c217abc978c5bd1d0e4232a823cb3fd89f885a2045138e627696fe277c2", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql": "0270964f98125e4d8406829263044fd1296bf6918c38be74ec980bfae2f921d6", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql": "b6ab7efbb23b56a7a0f720c9a6c6d76a153b9f457512d46dc8f3802ad042b579", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql": "216923ac9658186139f82f499c398c78aba57d13c158f151b1498e3542e15684", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql": "ea6dfecaf75c884d6898400a226943aea94b4cc88cec82d67d0fb3d9fe5478e1", + "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql": "abf5c7efe37de566fdfc0536edc67d8e23b2a50da1e1633b9788cd4f038b8b34", + "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql": "8c0a01d4ed2df2714c3139c8b9820f713853d6acb7e6b51b48ff4844774ad35b", + "tools/migrate/migrations/20250908130504_customer-indexes.down.sql": "7932ab67e4b8613dc04b1dc4b1179bbaa75190dc95505d9f20c2178324fba50f", + "tools/migrate/migrations/20250908130504_customer-indexes.up.sql": "9f1745ea2c20300fc0844d92122af8980abbb5ac2a1c54fe8d8d5d141882c04a", + "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql": "cb87ca892e17d7363e370163e2bc298b7edfc834c46b6da94e22822204e47769", + "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql": "a9d4a253a73a3d57b18379f77ab07a9c20f85d35c2ad2fcdcb49094b4fb34b3f", + "tools/migrate/migrations/20250924131607_subject-index.down.sql": "929b92bf468f43919b02a842896f0c136d7a1ac29d334de1343c359cc03bd3d1", + "tools/migrate/migrations/20250924131607_subject-index.up.sql": "9e775ea258455ba5a19c985d8d11f1dc3b54bd728d9420db947420f6c57f6dab", + "tools/migrate/migrations/20250925160650_grant-annotations.down.sql": "e6628cde021064fc395769a7a817fcc5b539f25bd576721fa157fe633cf9a3ef", + "tools/migrate/migrations/20250925160650_grant-annotations.up.sql": "0d7735cfe0e354ad71d98217b21fe3db5bb64f9572c87782d836cef47ad0d29d", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql": "e49255f93704756fe62a4d3c6065c2852d1dc8872b5d941e9c522122e969b6dd", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql": "204cd24446fb69bd1be1baeb69394c3838c9dc2c7d3260b03fbd84966ec2c2b8", + "tools/migrate/migrations/20250926145502_grant-annotations.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250926145502_grant-annotations.up.sql": "b7edf09ca3de098fd119dc6839436d19d6ea095d0c187ae480c82da2726e9e32", + "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql": "9d53fb7543546ed522c0c9db44a64aae38e0b8e63e9689f741db78caa0800eff", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql": "401d47ee936e490b10bc351940ac3db93d1cc016bec91b86ae5b97296f97f0e8", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql": "27ea291f794b1f6d1fbd479cfe8029df513dbfeae5186131df77f17b5365a270", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql": "4fbf6f5641127c608ce530de633482464d18a80c245925dbf89895bf82962f9d", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql": "9e637929c5f0d57bcf25c1d6d77d74d1425a9fb3814252d85237ecef977880ed", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql": "1922b354cc7afc5b59434958076dc2048a70c2aaab835a47e53f4632e307eed5", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql": "6837272e09ddd357e07c30881e18f015739376503b88b9310a9fed372124d01a", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql": "f266a0edaef2f29eee32258cba01968d8310129f2251f457bf10157ec5d5e384", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql": "3610344e25e19028f5b62e32d2fdd13d397282847c2feceae251ca97f7ce5f8c", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql": "dd8f14da2a771006b4a7b6ad6a354dfca2044a5d561576e72376bf492e104fa9", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql": "40dbc9ad865b0aeeddc74fea2f8ce37bb8e544b2b9eb3a623b34e6bbc9e76ee8", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql": "05f5d64830b05474bb440803187e3066d9b1b5414069ab6875468553d53aa9ca", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql": "83c5f27b37a96515855ec2fa672cc6eba775ba03cb29fa333103671e30889fc9", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql": "b42b3cbc573ba55ad16cad4c92f2d3416c9a7bca50246b36679db0dfed3b7272", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql": "9869d2091aaeb0e9ce1b28c8c449486e6ab842de959f323cc890259c3d6bbade", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql": "edc0be6350755db711f68429084b6032066dd681a3a4ea62e21f748bb355ed7b", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql": "ccc46f2a5cbaf71980089bda6544b2d31f9dd08adea05e11bf77d906503ce5c3", + "tools/migrate/migrations/20251121083843_meter_annotations.down.sql": "8c6a083bcc85edd7ece1c854a9632d8abcea455748be452d95139c283cce375d", + "tools/migrate/migrations/20251121083843_meter_annotations.up.sql": "8ba3d2f9144efd7bf9a2b34d86a7e3c3efaac92e43b2d2afe0430c9e97c3de23", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql": "f1e1c2e21b11ff27ef485b76ddded1fc94637f32d791315ca6a42eddedb9f103", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql": "9ae8d0dd8a3d41b985a68f8705f8570b78243ad3f577bc7064d5d885518c5b85", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql": "1cad73d10be718236ec3deaee7a23a0e010166a1c36378a0dc1c583761ddb125", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql": "e516d902b09059a989bf9010a098bb13ddcade321d547541b03f39c2b64bc0aa", + "tools/migrate/migrations/20251211145809_meter_event_type.down.sql": "2e33835f31d51db1dd8aedaefb595e383e5b56bd90641d8471a59261e757facc", + "tools/migrate/migrations/20251211145809_meter_event_type.up.sql": "1328b88a1277915c1784bd98739f41cde975fd5e77df8e90e18d3435f50fe6e5", + "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql": "917fc1f2804efa049a93c7b1175e9f7d46e9a5f799a92b2a35bdac30a3dd1159", + "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql": "e410915053eab7d9e7342e11689c64499a1e3cd2e3e83c408e90919168378b01", + "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql": "7145a3e58f237c6e1e698e6caf0e5bc6aa67507062f02b44953bfe9eac9e05cf", + "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql": "238e5f0de7417ce871d8f6d8f6e0746e198121c0ba90efed47d9f5fcd6c0708a", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql": "672ae100e34e81e3dd237ff86b82892329cd2d9917251c3d8152a623d89b17ed", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql": "67331c92fffa0ac7dac099f172ccdcc1f3bce8bffc56944adde56c0f01e6eade", + "tools/migrate/migrations/20260112160815_detailed-lines.down.sql": "d34eb5d3783c47f7934dfc0796206ad1cef09c77dfc26668ed17c8e23d8b1049", + "tools/migrate/migrations/20260112160815_detailed-lines.up.sql": "485af2e77f23dddc7cab84626907c8d08b5b7ecc2dc3851bd325ad61945a15c2", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql": "8298b014f003427efe8083d2f627a7ada04c74548d648ccadbd74ccde6bae4ca", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql": "9e04805f4cd76201df3932f7c4bd5d6ae9f690a32a2799ae8e07bed47c111f64", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql": "42cc56d070189d4f29f016d05033abfcbec2c533e8113cf17901f57a96f24aa0", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql": "3367e53c722488e005dd03b406c987660cde741f0866e098723f86727395844e", + "tools/migrate/migrations/20260220092326_tax-code.down.sql": "ceddea59eb7e24fb16c963ad6eac9790f5ef392b74971de64f9dd094f7add1a2", + "tools/migrate/migrations/20260220092326_tax-code.up.sql": "a4ab3970c44eda2b1ef2649b239b72287a94d27258a138906b2afa8fc5769f58", + "tools/migrate/migrations/20260224121149_charges.down.sql": "51ced4653d0a9a2a94fb06b73f3d370ddce091db0465216c124817507c02ad73", + "tools/migrate/migrations/20260224121149_charges.up.sql": "3861b05916d07199c40255464f44142752a4e9a7b4e717a4eedf95d04cdee6d6", + "tools/migrate/migrations/20260225160541_billing-credits.down.sql": "311c392ccb346588ce2c0bef8ebd1392895c13131f6bad392b749039fd32b681", + "tools/migrate/migrations/20260225160541_billing-credits.up.sql": "eef406a66bffce84fcada6211747c39ddfc3b68359bd0fa53c50c41e0f245886", + "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql": "bb87c77f9488c5de2888a3f78e70dd62d73dcef8ebac3697a656aa6c70064dc2", + "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql": "c23c82a7547dbea5c490e6c345b877ee7a50b3f765c04524a139383de273c6f7", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql": "2a1ca1daeba69384e591aa35c968ef6a2c99494ec98cccd050abcf4bf7282639", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql": "5651d6ceae20defc15708897065e09fa42dd1b48c7079fba172df4ad27bb5c49", + "tools/migrate/migrations/20260303233513_llmcost_add.down.sql": "a12189280bceb95d6b084c3e822eb6289368caaf36153466c163c958047644cc", + "tools/migrate/migrations/20260303233513_llmcost_add.up.sql": "24de0b10c40fcad4cf4dec6197bfe6021f9e8ea48ecb26142e550cf8b8f908f1", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql": "355aa6e6be14587f6aa821f97388515c7f3cd8b58f8f1f44b5ccb915fd303ebd", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql": "c4d9ffbbcca2b667d0fe4191557cb89ff14e94296f37bea9b6e1cb2643a47e50", + "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql": "959df7c9f8b97e8869d902b303e4449698ce0d35491160a7acbd3803064c82ed", + "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql": "343c829001fb13961e098fe071be2acd430e4e8fe0820fd89341b91dada2f637", + "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql": "d02b157db2eedda515420b6d9b05f77736acac2bb084541c1a49fd890806b2d9", + "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql": "737fe79f1b11ca4ac7653ac8f89f49fa9fa2590b4b9846f7245ff51dc5352c3d", + "tools/migrate/migrations/20260316165258_ledger.down.sql": "2b548e1b6a117d857ac2f7daa8404ef6d96578de46e5a8826f47dea50c154afe", + "tools/migrate/migrations/20260316165258_ledger.up.sql": "58b2c04c41048fb44cb6b49d2be9108a4354364d3ab0b46a8f485713951a7090", + "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql": "ff8a8f2269a3f472ee170f07fa2b038c3aab430400deab824dbdda0d311eee64", + "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql": "bf9436ec4de807ad759c6add73d5fa7df96f2da680d641baa07e7bcd025facc4", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql": "5ec4f9b46eb1c09035ee362974f2493133228bd6d3609287d9ed64135b3a4dea", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql": "782a55f43883a6291368910c948419566bf0199440682ef8eb40eeded0f3bb4f", + "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql": "84a649daa844029a1a31467fbe84e32257d8023d5d9275b30aa111640fcbef96", + "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql": "96fb24cdbd40aad214a15aa136eb5744a6dcf98c1144d4769aa975c4a68cb35a", + "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql": "bf23a8ccb61fdcb1bcebb9500bc6af6cbdc3d75e3a585eaffc874b41b771f975", + "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql": "909bf352b38d4d04523a08fa373f6072cd9496812a7bc8c2ad38e5144483c3f1", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql": "421a06bf9ef477aa2cd3361c685a87a4d89d29fdcc4c17efa74175af8b3ebe0a", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql": "46624fd5cb1a3c6872b14ab89c39805e0f9bea2796f843ce7f72d74ef40aa02c", + "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql": "85dc9c61d681eee1041f23e79b62b434174882300ff7a4d54589ed277b0c2a0c", + "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql": "56a3c0f6d4b407b0210ff7846db9c5835442320653e0d857863638aa4c1e3f43", + "tools/migrate/migrations/20260320084936_charges-state-details.down.sql": "9f1b1f5e3ae83c349cf2ead7216a08f3415d0c50b2c5b585fec15eb5b777516e", + "tools/migrate/migrations/20260320084936_charges-state-details.up.sql": "1a747255eea8756184dceff2348decef0e94999a64457896eee06e72d1789d18", + "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql": "0e06197ccda3fab46facde850304bf5e9b8b9af6c822d64e6e6e7f755044f4c6", + "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql": "343abb08d2fbeb7bc8938c2dda9357ea25f155c466a3019423884fb430bc4caa", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql": "9a2bfe9259940b4387ac4a813d0c57c48bcde2b527b25c6ea806ee55241d0468", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql": "47d3ef4f63fea3e69a50d20341d6b8314d15b7e3aa7070f23663ef667df13141", + "tools/migrate/migrations/20260323141807_add-feature-description.down.sql": "e94a5703044d584eb66c3157c4f2db696f3c76c640a6a834a4e95930ba06a94b", + "tools/migrate/migrations/20260323141807_add-feature-description.up.sql": "96817d19b56c51bf08cc7e684be177f7e25df4cc91181d81967934b4affe095c", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql": "5f767b1878d38aef94bc647bf07bf24e0376696986c63ee69e0960565581affb", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql": "2ce07a3f104cc1a2bd6b6f7d15e0e4f8d2cb1a79683b584c1d10d2ac5787b09f", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql": "41b0c3cbfe0bc7d40741787abeb33836f52a8efa50c35e7b0ee2fef37da4b2a1", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql": "209ce8bb0c6ff32c8701264e1902b20b1601a1aedff57439a1c0d9e757baffa4", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql": "e28c4b4867326f6642283c2513e950eea4101e52e3cafd778f4f03d570015238", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql": "11abc456702928874023dbccbe4dfc3b6a06eeff38ba835f96cf39d8525d1a44", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql": "4aa00f1fb0e8300ecdbe8b16ffe6169eac3dc8aad13f37ba1e0f261b995c2144", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql": "d3871fbb17d3a682445d5088f095b33854b75a6c68a067d977491620c7e6de08", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql": "3f7014dd893dc2a51ea7288b4a23af69328d7cd4625f404c03b8c6ad96abcd13", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql": "f7cdb03dd88f39167296ab3df26e02295df889d37c377820bd20de575e313b3e", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql": "7a6d6741747ccc58b2720aa7f80ee0146579322d7f66eea3e9c1ad379ff90b29", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql": "5bc8382bfe0295956538af385f4f55d14c37fd6a8e72009056893bffef0258c5", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql": "20e8a9333a5408583c07ce82ae446f57053cb811583ecb4990ba8f33150853fe", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql": "27a2ef9ee66cc9c3642fd658dc6c6d12f6fc5e7430e3c3db4a87fab3a630759c", + "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql": "08784169c44ffa97835fb22463887458d149b92fa4520085a8261c8c3861505d", + "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql": "7ab9a313a40740a5a54871457049e93a496f8f0437e0486dafe41f724d01253f", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql": "212f8759d89be9b398454265d3d9a8cb23e8dfb4743df2d75a831e735ff76c5a", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql": "55f968ca1ce1691dad7192ae4de0373deec2e196cdb3038d4a2146defa2ed549", + "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql": "a23196423892e9429986718b5e45cfd307403c55fe447cb8e0e117973ab599dc", + "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql": "487da2c172e53096c165a030263a5c9548095a41ee302ca06d84741902571598", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql": "22bfdd6b02716bcac6638aa789cff10b95ec235bc39caa77ebad48e3c5676868", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql": "f05bbf4638de6fc91419a96ab82c304af612e06a1cb22e7b90e6721614b4d425", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql": "187bc5144b3457fdff38932dd681dbd18e7c265c6944ecd912fef5395f712668", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql": "98f13c4fe9859710d0ca6b6b55f0383d0391756801f060f2be916ed4e29e5868", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql": "e6aef038142f208363fe9e8a37993387bab452543eb8ff021a7fcdfc6c31402b", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql": "94874c088b80bda7cb3e78ade4f9160465ccf9dfa8dc1a9a9173528facd9b7da", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql": "f0af599581b90c63357da242ce344ee2bee634eeab4a9261eff553fc16ae09d6", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql": "4f123f6ea8b156c4edcc959f754c10be83a03379f87bf849232d1c002997bb0d", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql": "ab3951a3e0c303b0f2ef2ec09b232cd9eab6989ed5128a8986cbdd76846491c8", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql": "3daa1028f3450cae160ac12f5ae182f8201cf470b940e18dda50849a7b121571", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql": "859aa1af9692300c27dc24dd284782b7f1336612c50875e890958da91d2459ff", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql": "a391ece0edb3b203ff20c380d86b8b26c56736f4cacabae4459885b62923ded1", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql": "f6fe1273cdc1298e4a8c14e370ef12f94edfb423dfce48118f3814aca905c679", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql": "4963425117428cc39525c4c2443a2e23984d706886d71faa057c0a2097e19dfe", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql": "90c1331d41eaac2b3de90bf24393249fada6f75310ce62868d12879e5752438b", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql": "a9a06690a683a454d49fad16d433f1625072b742016ed0bd27947360e1b908ba", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql": "787213a75154f6edb9d5e6bd14e27a4f7c1b07bcc850fdc3e1fb706b65d24f4f", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql": "e4f28bbaa946fc4cd72d19016a2b2942aecc60eac9346b6c6dc129521f620e99", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql": "2a0b2f2c9eea38765d0e9a7cb0850eedd2f9eec1e5627ac993bf0bcc52887443", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql": "7a1f90730a3a8f228c48012bd6e942e44e69a9d96078a8316105e4f8d0c96c65", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql": "b908e5fbcb72c366365c16d2fe728ab89280ad4d757246994d9f46f6d135187c", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql": "2887b8769d4b093a787c48e689ccfb976beb5c195960246e150ea1907452214f", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql": "b2fe285e7967f6757b4fd56c031b6e508d9a059d811b693b51e0d2b0b833fd41", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql": "c738cfc94f81a9669b8797ad58d58d414cb06b0da86f7b2157d97538cb1d212f", + "tools/migrate/migrations/20260502093117_distributed_locks.down.sql": "98c0c8d1f5f61a943e0a2d5540fa86c0e1a516beca45c07218ee4cf9d51915d9", + "tools/migrate/migrations/20260502093117_distributed_locks.up.sql": "bf6f3359423a79c1261d988180a3beac165f9786bbe655ddad3491eb26b189c9", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql": "8e6444926adb43032057c232a2c933537685a8c1532e5265466a1b3e88a01e6b", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql": "7e8094cafe76c65432011d5adf2b92df46525c09cf6ce01a83e69e7199f1ac4a", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql": "af3dda071f87a025aff5ada9b3c00fe5bc60019d25cda92d34eac3ebf7f9360b", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql": "29dfffe6d2c06872d987eed2615c907dfc9bc790316dfc16bfb52062ca4d6081", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql": "7cc782a6c3b2f55d1640cc25679f097448e9a1d8b09a20ebf5077de3e13191fd", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql": "1bc8a40b36fec254f1d4d6f5fc2630e60f76af76d120c049f026ba3a5f38ba24", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql": "5b4ef43b14e816756fb40edcb4a29d02c8badddaa95af4bc455152166afb0496", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql": "3d3b7d318a49bc54bcb9517f86ec2fb3785ea160c6f12975436636557efe63d1", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql": "132e5db87ee549a72b48cb295d7431f5502e3d8a63c53b5db9dab273a1100514", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql": "6979ec3f5bd164a16b30d3facb6b3dd19e9459882d38550fcaa057969a27133b", + "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql": "e20f07d995b9d4f8fb570349a56b6228f1fecaeb4d6b5e527e34b07d87d4ff89", + "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql": "4b983135b1bba2c0ed069fce21cda4980869d329b983007e63a96441e1176b73", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql": "3c956b93f81039116af18e25d3b5fb92337eef0c22c3ebcb3be3dc2279083831", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql": "82aa9c8a8eb425af1c0d76afbcdc780320de0d2022ced809624165f37ba49bad", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql": "e6bd6033171129284784a76158d2963b0dcb8ab8e5cae0c36ef4100eebd29f88", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql": "4bff8579babd114c62af577659b071a787c2a4d07f965abd4996aa26b65280ea", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql": "20ae9531983303e065fd5abd291fadaff65da179030e902c5505f9823db5145f", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql": "2aec7af95b444643ab12b9e0de0f146e0b126b0e543a66fa9aaa2f51c0daa434", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql": "769b44fa34d287880ac3b7dc521254d4ac827a21c8aaceabf766f83a50daa16d", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql": "b5afe6c839f513b4857208d947ccf46d2a79e6edb4c5ebdb33e77624202094c3", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql": "52d04827c0b846bf8920de3824fd8cfb4d917ee7d863d601436b0b3b7b00a7d3", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql": "0de894fd315138a96e6f9eb21bf030938968a66f114aaab164e24480e13f5705", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql": "f942917aa3843208292bda1a476a4f8ba5cd3e7cdd3d50a59324f5de0178ccfd", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql": "2e96d517c6dcf8954c7a139f5687d689087ad3230c847a46e18069d846a098fc", + "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql": "2cd5f54e0172a557d3a466bd2c2b5b4792b3552770a2ccd2860559be9f56580e", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql": "cfa74491577700143a6b6c705e35fae68988192896cf81b95f3ee8c2a2a4c757", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql": "6330906e6778a95a2bc3d9d643311886c0226af520149f6f7b4ee42dc8175c74", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql": "0c389e2b888882133f5bc603810ffb231ebad7c349619fef0bda3c772bec1aac", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql": "6c5e638dc5c67f2e0e5553cc7817057586b9bd32928b7dbfd7fd042f0ce88d16", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql": "e63216c5b4bc26b2d9f22c9c97318aba237804ae45b2d9a3a069b30002df5714", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql": "81a7099e6d458a4128d790d17ef8248a173864ea0369cf41cf6442ac00363c34", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql": "5b83b36dd384a6ee22050a87d4b50486c1608ed828d1b129130ef1dad431228e", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql": "7c6cae2e6ab6249888f62d73273498c3fe20fb2b0d7f3db10438d4b9a96ad5f7", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql": "2c603f3e5c7fc0f20408b808054a17b10d7b50d43274e53489938aeffcfc141c", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql": "710c095d66e14a221bafee4c4a3bce3abad36737811b8d0195c1832f594bebb5", + "tools/migrate/productcatalog_test.go": "be3fff2d8ec1440de634eb1e6ca4da91f137635f54e82a7b602028f1aa5ad5cf", + "tools/migrate/testdata/ignore/20240826120919_init.down.sql": "8b2c2bfc141cd181ac8608f474bfbf234dc2760f604b9d3926dfa3d308e4c076", + "tools/migrate/testdata/ignore/20240826120919_init.up.sql": "d6d7d3795011414a000dc69d5696df90583fef4643c78cf40fae64fc073ee37e", + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.down.sql": "5c4fc7acd224d8b57482decbe7ad8bab088e93ab2aa0886485841bb6db38c440", + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.up.sql": "94ab92891b91df0672f99c4dae84a79eb34090985d203606e9d94d2cc0ec4780", + "tools/migrate/testdata/ignore/20240917172257_billing-entities.down.sql": "8fadc2b7073f4c57e25d1453003710d9d3d8ddb08b04dbdd5fa5fedb25c3bac7", + "tools/migrate/testdata/ignore/20240917172257_billing-entities.up.sql": "f551def2214b2bf0d272846d1ea5c5f13667601d3deb4f56c4b0f30751c323b6", + "tools/migrate/testdata/noignore/20240826120919_init.down.sql": "f2de8b7fd14fbfb02607b36443f65ebadbe1a39a97fea75980acee75cb7b3e0a", + "tools/migrate/testdata/noignore/20240826120919_init.up.sql": "5ba7055af21cfeb414757ba50596c2082c123efe26bfc0209c6017d544cf5919", + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.down.sql": "fee1d560210942f7588309c8cfadec4d781bdda5293b9ab28ca581faedddcd64", + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.up.sql": "c687ee865256681707962b45f234306c5652ba9cb0a6cd1b25a2346798f4784e", + "tools/migrate/testdata/noignore/20240917172257_billing-entities.down.sql": "8fadc2b7073f4c57e25d1453003710d9d3d8ddb08b04dbdd5fa5fedb25c3bac7", + "tools/migrate/testdata/noignore/20240917172257_billing-entities.up.sql": "f551def2214b2bf0d272846d1ea5c5f13667601d3deb4f56c4b0f30751c323b6", + "tools/migrate/testdata/sqlcgen/README.md": "369ccca1f69715c1e2227809b9817afc10066c9cc4f443ec7a16ed4d12b45581", + "tools/migrate/view_parity_test.go": "cfabd97ec7102c26757ad6bd59279ed9b601c409ce563abbd035a0ffa64fab24", + "tools/migrate/viewgen/viewgen.go": "b30e7df23d31f93238156eb9614c2e50fc512dac9e58fd8ce825702facc8bc97", + "tools/migrate/views.sql": "f50a28709de6f89e896785375c91b1e949727044fd02307bf5476bbcff7a31eb", + "tools/wait-for-compose.sh": "0d8e4e00725cd64fcc012c92db91782b3e9ebacaf3cf1c34f1c9f96db15c8b4c" + }, + "entry_points": [ + "api/client/javascript/index.ts", + "api/client/javascript/src/client/index.ts", + "api/client/javascript/src/portal/index.ts", + "api/client/javascript/src/zod/index.ts", + "api/spec/packages/aip/lib/index.js", + "api/spec/packages/legacy/lib/index.js", + "cmd/balance-worker/main.go", + "cmd/billing-worker/main.go", + "cmd/jobs/main.go", + "cmd/notification-service/main.go", + "cmd/server/main.go", + "cmd/sink-worker/main.go", + "collector/cmd/main.go", + "tools/migrate/cmd/viewgen/main.go" + ], + "entrypoints": [ + { + "path": "cmd/balance-worker/main.go", + "kind": "worker", + "name": "balance-worker" + }, + { + "path": "cmd/billing-worker/main.go", + "kind": "worker", + "name": "billing-worker" + }, + { + "path": "cmd/jobs/main.go", + "kind": "cli", + "name": "jobs" + }, + { + "path": "cmd/notification-service/main.go", + "kind": "service", + "name": "notification-service" + }, + { + "path": "cmd/server/main.go", + "kind": "service", + "name": "server" + }, + { + "path": "cmd/sink-worker/main.go", + "kind": "worker", + "name": "sink-worker" + }, + { + "path": "collector/cmd/main.go", + "kind": "app", + "name": "cmd" + }, + { + "path": "tools/migrate/cmd/viewgen/main.go", + "kind": "app", + "name": "viewgen" + } + ], + "frontend_ratio": 0.0, + "has_persistence_signal": true, + "persistence_signals": { + "deps": [ + "entgo.io/ent", + "github.com/lib/pq", + "github.com/go-sql-driver/mysql", + "github.com/lib/pq" + ], + "schema_files": [ + "tools/migrate/migrations/20240826120919_init.down.sql", + "tools/migrate/migrations/20240826120919_init.up.sql", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql", + "tools/migrate/migrations/20240917172257_billing-entities.down.sql", + "tools/migrate/migrations/20240917172257_billing-entities.up.sql", + "tools/migrate/migrations/20240918204720_customer.down.sql", + "tools/migrate/migrations/20240918204720_customer.up.sql", + "tools/migrate/migrations/20240919144910_customer-timezone.down.sql", + "tools/migrate/migrations/20240919144910_customer-timezone.up.sql", + "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql", + "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql", + "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql", + "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql", + "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql", + "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql", + "tools/migrate/migrations/20240924164504_billing-profile.down.sql", + "tools/migrate/migrations/20240924164504_billing-profile.up.sql", + "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql", + "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql", + "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql", + "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql", + "tools/migrate/migrations/20241013151355_apps.down.sql", + "tools/migrate/migrations/20241013151355_apps.up.sql", + "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql", + "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql", + "tools/migrate/migrations/20241021124045_billing-profile.down.sql", + "tools/migrate/migrations/20241021124045_billing-profile.up.sql", + "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql", + "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql", + "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql", + "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql", + "tools/migrate/migrations/20241102151321_customer_filters.down.sql", + "tools/migrate/migrations/20241102151321_customer_filters.up.sql", + "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql", + "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql", + "tools/migrate/migrations/20241105171821_plan.down.sql", + "tools/migrate/migrations/20241105171821_plan.up.sql", + "tools/migrate/migrations/20241108055754_plan.down.sql", + "tools/migrate/migrations/20241108055754_plan.up.sql", + "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql", + "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql", + "tools/migrate/migrations/20241119131528_plan.down.sql", + "tools/migrate/migrations/20241119131528_plan.up.sql", + "tools/migrate/migrations/20241119154436_plan.down.sql", + "tools/migrate/migrations/20241119154436_plan.up.sql", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql", + "tools/migrate/migrations/20241120145625_billing-discounts.down.sql", + "tools/migrate/migrations/20241120145625_billing-discounts.up.sql", + "tools/migrate/migrations/20241121145549_billing-totals.down.sql", + "tools/migrate/migrations/20241121145549_billing-totals.up.sql", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql", + "tools/migrate/migrations/20241204162012_subscriptions.down.sql", + "tools/migrate/migrations/20241204162012_subscriptions.up.sql", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql", + "tools/migrate/migrations/20241209085334_subscription_fields.down.sql", + "tools/migrate/migrations/20241209085334_subscription_fields.up.sql", + "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql", + "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql", + "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql", + "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql", + "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql", + "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql", + "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql", + "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql", + "tools/migrate/migrations/20250130034713_customer_key.down.sql", + "tools/migrate/migrations/20250130034713_customer_key.up.sql", + "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql", + "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql", + "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql", + "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql", + "tools/migrate/migrations/20250203131553_plan-alignment.down.sql", + "tools/migrate/migrations/20250203131553_plan-alignment.up.sql", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql", + "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql", + "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql", + "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql", + "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql", + "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql", + "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql", + "tools/migrate/migrations/20250305025807_add_meter_table.down.sql", + "tools/migrate/migrations/20250305025807_add_meter_table.up.sql", + "tools/migrate/migrations/20250306040407_resource_meter.down.sql", + "tools/migrate/migrations/20250306040407_resource_meter.up.sql", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql", + "tools/migrate/migrations/20250325114848_annotations.down.sql", + "tools/migrate/migrations/20250325114848_annotations.up.sql", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql", + "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql", + "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql", + "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql", + "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql", + "tools/migrate/migrations/20250404105832_addon.down.sql", + "tools/migrate/migrations/20250404105832_addon.up.sql", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql", + "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql", + "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql", + "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql", + "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql", + "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql", + "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql", + "tools/migrate/migrations/20250415105134_plan_addons.down.sql", + "tools/migrate/migrations/20250415105134_plan_addons.up.sql", + "tools/migrate/migrations/20250415143130_subs-annotations.down.sql", + "tools/migrate/migrations/20250415143130_subs-annotations.up.sql", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql", + "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql", + "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql", + "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql", + "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql", + "tools/migrate/migrations/20250522155754_billing-line-index.down.sql", + "tools/migrate/migrations/20250522155754_billing-line-index.up.sql", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql", + "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql", + "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql", + "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql", + "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql", + "tools/migrate/migrations/20250606115858_subject_create.down.sql", + "tools/migrate/migrations/20250606115858_subject_create.up.sql", + "tools/migrate/migrations/20250606115859_subject_namespace.down.sql", + "tools/migrate/migrations/20250606115859_subject_namespace.up.sql", + "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql", + "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql", + "tools/migrate/migrations/20250618194112_remove_app_default.down.sql", + "tools/migrate/migrations/20250618194112_remove_app_default.up.sql", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql", + "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql", + "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql", + "tools/migrate/migrations/20250711121333_customer_annotations.down.sql", + "tools/migrate/migrations/20250711121333_customer_annotations.up.sql", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql", + "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql", + "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql", + "tools/migrate/migrations/20250818081817_subscription-period.down.sql", + "tools/migrate/migrations/20250818081817_subscription-period.up.sql", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql", + "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql", + "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql", + "tools/migrate/migrations/20250908130504_customer-indexes.down.sql", + "tools/migrate/migrations/20250908130504_customer-indexes.up.sql", + "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql", + "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql", + "tools/migrate/migrations/20250924131607_subject-index.down.sql", + "tools/migrate/migrations/20250924131607_subject-index.up.sql", + "tools/migrate/migrations/20250925160650_grant-annotations.down.sql", + "tools/migrate/migrations/20250925160650_grant-annotations.up.sql", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql", + "tools/migrate/migrations/20250926145502_grant-annotations.down.sql", + "tools/migrate/migrations/20250926145502_grant-annotations.up.sql", + "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql", + "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql", + "tools/migrate/migrations/20251121083843_meter_annotations.down.sql", + "tools/migrate/migrations/20251121083843_meter_annotations.up.sql", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql", + "tools/migrate/migrations/20251211145809_meter_event_type.down.sql", + "tools/migrate/migrations/20251211145809_meter_event_type.up.sql", + "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql", + "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql", + "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql", + "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql", + "tools/migrate/migrations/20260112160815_detailed-lines.down.sql", + "tools/migrate/migrations/20260112160815_detailed-lines.up.sql", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql", + "tools/migrate/migrations/20260220092326_tax-code.down.sql", + "tools/migrate/migrations/20260220092326_tax-code.up.sql", + "tools/migrate/migrations/20260224121149_charges.down.sql", + "tools/migrate/migrations/20260224121149_charges.up.sql", + "tools/migrate/migrations/20260225160541_billing-credits.down.sql", + "tools/migrate/migrations/20260225160541_billing-credits.up.sql", + "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql", + "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql", + "tools/migrate/migrations/20260303233513_llmcost_add.down.sql", + "tools/migrate/migrations/20260303233513_llmcost_add.up.sql", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql", + "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql", + "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql", + "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql", + "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql", + "tools/migrate/migrations/20260316165258_ledger.down.sql", + "tools/migrate/migrations/20260316165258_ledger.up.sql", + "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql", + "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql", + "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql", + "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql", + "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql", + "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql", + "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql", + "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql", + "tools/migrate/migrations/20260320084936_charges-state-details.down.sql", + "tools/migrate/migrations/20260320084936_charges-state-details.up.sql", + "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql", + "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql", + "tools/migrate/migrations/20260323141807_add-feature-description.down.sql", + "tools/migrate/migrations/20260323141807_add-feature-description.up.sql", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql", + "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql", + "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql", + "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql", + "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql", + "tools/migrate/migrations/20260502093117_distributed_locks.down.sql", + "tools/migrate/migrations/20260502093117_distributed_locks.up.sql", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql", + "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql", + "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql", + "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql", + "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql" + ], + "migrations_dirs": [ + "docs/migration", + "openmeter/ent/db/migrate", + "pkg/framework/entutils/testutils/ent1/db/migrate", + "pkg/framework/entutils/testutils/ent2/db/migrate", + "tools/migrate/migrations" + ], + "frameworks": [], + "local_persistence": [] + }, + "bulk_content_manifest": { + "generated": { + "count": 626, + "frameworks": { + "go": 13, + "wire": 6, + "go-ent": 607 + }, + "files": [ + "api/api.gen.go", + "api/client/go/client.gen.go", + "api/convert.gen.go", + "api/v3/api.gen.go", + "api/v3/handlers/apps/convert.gen.go", + "api/v3/handlers/billingprofiles/convert.gen.go", + "api/v3/handlers/customers/billing/convert.gen.go", + "api/v3/handlers/customers/convert.gen.go", + "api/v3/handlers/meters/convert.gen.go", + "api/v3/handlers/taxcodes/convert.gen.go", + "cmd/balance-worker/wire_gen.go", + "cmd/billing-worker/wire_gen.go", + "cmd/jobs/internal/wire_gen.go", + "cmd/notification-service/wire_gen.go", + "cmd/server/wire_gen.go", + "cmd/sink-worker/wire_gen.go", + "openmeter/apiconverter/filter.gen.go", + "openmeter/billing/derived.gen.go", + "openmeter/billing/models/stddetailedline/derived.gen.go", + "openmeter/ent/db/addon.go", + "openmeter/ent/db/addon/addon.go", + "openmeter/ent/db/addon/where.go", + "openmeter/ent/db/addon_create.go", + "openmeter/ent/db/addon_delete.go", + "openmeter/ent/db/addon_query.go", + "openmeter/ent/db/addon_update.go", + "openmeter/ent/db/addonratecard.go", + "openmeter/ent/db/addonratecard/addonratecard.go", + "openmeter/ent/db/addonratecard/where.go", + "openmeter/ent/db/addonratecard_create.go", + "openmeter/ent/db/addonratecard_delete.go", + "openmeter/ent/db/addonratecard_query.go", + "openmeter/ent/db/addonratecard_update.go", + "openmeter/ent/db/app.go", + "openmeter/ent/db/app/app.go", + "openmeter/ent/db/app/where.go", + "openmeter/ent/db/app_create.go", + "openmeter/ent/db/app_delete.go", + "openmeter/ent/db/app_query.go", + "openmeter/ent/db/app_update.go", + "openmeter/ent/db/appcustomer.go", + "openmeter/ent/db/appcustomer/appcustomer.go", + "openmeter/ent/db/appcustomer/where.go", + "openmeter/ent/db/appcustomer_create.go", + "openmeter/ent/db/appcustomer_delete.go", + "openmeter/ent/db/appcustomer_query.go", + "openmeter/ent/db/appcustomer_update.go", + "openmeter/ent/db/appcustominvoicing.go", + "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go", + "openmeter/ent/db/appcustominvoicing/where.go", + "openmeter/ent/db/appcustominvoicing_create.go", + "openmeter/ent/db/appcustominvoicing_delete.go", + "openmeter/ent/db/appcustominvoicing_query.go", + "openmeter/ent/db/appcustominvoicing_update.go", + "openmeter/ent/db/appcustominvoicingcustomer.go", + "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go", + "openmeter/ent/db/appcustominvoicingcustomer/where.go", + "openmeter/ent/db/appcustominvoicingcustomer_create.go", + "openmeter/ent/db/appcustominvoicingcustomer_delete.go", + "openmeter/ent/db/appcustominvoicingcustomer_query.go", + "openmeter/ent/db/appcustominvoicingcustomer_update.go", + "openmeter/ent/db/appstripe.go", + "openmeter/ent/db/appstripe/appstripe.go", + "openmeter/ent/db/appstripe/where.go", + "openmeter/ent/db/appstripe_create.go", + "openmeter/ent/db/appstripe_delete.go", + "openmeter/ent/db/appstripe_query.go", + "openmeter/ent/db/appstripe_update.go", + "openmeter/ent/db/appstripecustomer.go", + "openmeter/ent/db/appstripecustomer/appstripecustomer.go", + "openmeter/ent/db/appstripecustomer/where.go", + "openmeter/ent/db/appstripecustomer_create.go", + "openmeter/ent/db/appstripecustomer_delete.go", + "openmeter/ent/db/appstripecustomer_query.go", + "openmeter/ent/db/appstripecustomer_update.go", + "openmeter/ent/db/balancesnapshot.go", + "openmeter/ent/db/balancesnapshot/balancesnapshot.go", + "openmeter/ent/db/balancesnapshot/where.go", + "openmeter/ent/db/balancesnapshot_create.go", + "openmeter/ent/db/balancesnapshot_delete.go", + "openmeter/ent/db/balancesnapshot_query.go", + "openmeter/ent/db/balancesnapshot_update.go", + "openmeter/ent/db/billingcustomerlock.go", + "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go", + "openmeter/ent/db/billingcustomerlock/where.go", + "openmeter/ent/db/billingcustomerlock_create.go", + "openmeter/ent/db/billingcustomerlock_delete.go", + "openmeter/ent/db/billingcustomerlock_query.go", + "openmeter/ent/db/billingcustomerlock_update.go", + "openmeter/ent/db/billingcustomeroverride.go", + "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go", + "openmeter/ent/db/billingcustomeroverride/where.go", + "openmeter/ent/db/billingcustomeroverride_create.go", + "openmeter/ent/db/billingcustomeroverride_delete.go", + "openmeter/ent/db/billingcustomeroverride_query.go", + "openmeter/ent/db/billingcustomeroverride_update.go", + "openmeter/ent/db/billinginvoice.go", + "openmeter/ent/db/billinginvoice/billinginvoice.go", + "openmeter/ent/db/billinginvoice/where.go", + "openmeter/ent/db/billinginvoice_create.go", + "openmeter/ent/db/billinginvoice_delete.go", + "openmeter/ent/db/billinginvoice_query.go", + "openmeter/ent/db/billinginvoice_update.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go", + "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go", + "openmeter/ent/db/billinginvoiceline.go", + "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go", + "openmeter/ent/db/billinginvoiceline/where.go", + "openmeter/ent/db/billinginvoiceline_create.go", + "openmeter/ent/db/billinginvoiceline_delete.go", + "openmeter/ent/db/billinginvoiceline_query.go", + "openmeter/ent/db/billinginvoiceline_update.go", + "openmeter/ent/db/billinginvoicelinediscount.go", + "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go", + "openmeter/ent/db/billinginvoicelinediscount/where.go", + "openmeter/ent/db/billinginvoicelinediscount_create.go", + "openmeter/ent/db/billinginvoicelinediscount_delete.go", + "openmeter/ent/db/billinginvoicelinediscount_query.go", + "openmeter/ent/db/billinginvoicelinediscount_update.go", + "openmeter/ent/db/billinginvoicelineusagediscount.go", + "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go", + "openmeter/ent/db/billinginvoicelineusagediscount/where.go", + "openmeter/ent/db/billinginvoicelineusagediscount_create.go", + "openmeter/ent/db/billinginvoicelineusagediscount_delete.go", + "openmeter/ent/db/billinginvoicelineusagediscount_query.go", + "openmeter/ent/db/billinginvoicelineusagediscount_update.go", + "openmeter/ent/db/billinginvoicesplitlinegroup.go", + "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go", + "openmeter/ent/db/billinginvoicesplitlinegroup/where.go", + "openmeter/ent/db/billinginvoicesplitlinegroup_create.go", + "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go", + "openmeter/ent/db/billinginvoicesplitlinegroup_query.go", + "openmeter/ent/db/billinginvoicesplitlinegroup_update.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go", + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go", + "openmeter/ent/db/billinginvoicevalidationissue.go", + "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go", + "openmeter/ent/db/billinginvoicevalidationissue/where.go", + "openmeter/ent/db/billinginvoicevalidationissue_create.go", + "openmeter/ent/db/billinginvoicevalidationissue_delete.go", + "openmeter/ent/db/billinginvoicevalidationissue_query.go", + "openmeter/ent/db/billinginvoicevalidationissue_update.go", + "openmeter/ent/db/billinginvoicewriteschemalevel.go", + "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go", + "openmeter/ent/db/billinginvoicewriteschemalevel/where.go", + "openmeter/ent/db/billinginvoicewriteschemalevel_create.go", + "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go", + "openmeter/ent/db/billinginvoicewriteschemalevel_query.go", + "openmeter/ent/db/billinginvoicewriteschemalevel_update.go", + "openmeter/ent/db/billingprofile.go", + "openmeter/ent/db/billingprofile/billingprofile.go", + "openmeter/ent/db/billingprofile/where.go", + "openmeter/ent/db/billingprofile_create.go", + "openmeter/ent/db/billingprofile_delete.go", + "openmeter/ent/db/billingprofile_query.go", + "openmeter/ent/db/billingprofile_update.go", + "openmeter/ent/db/billingsequencenumbers.go", + "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go", + "openmeter/ent/db/billingsequencenumbers/where.go", + "openmeter/ent/db/billingsequencenumbers_create.go", + "openmeter/ent/db/billingsequencenumbers_delete.go", + "openmeter/ent/db/billingsequencenumbers_query.go", + "openmeter/ent/db/billingsequencenumbers_update.go", + "openmeter/ent/db/billingstandardinvoicedetailedline.go", + "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go", + "openmeter/ent/db/billingstandardinvoicedetailedline/where.go", + "openmeter/ent/db/billingstandardinvoicedetailedline_create.go", + "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go", + "openmeter/ent/db/billingstandardinvoicedetailedline_query.go", + "openmeter/ent/db/billingstandardinvoicedetailedline_update.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go", + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go", + "openmeter/ent/db/billingworkflowconfig.go", + "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go", + "openmeter/ent/db/billingworkflowconfig/where.go", + "openmeter/ent/db/billingworkflowconfig_create.go", + "openmeter/ent/db/billingworkflowconfig_delete.go", + "openmeter/ent/db/billingworkflowconfig_query.go", + "openmeter/ent/db/billingworkflowconfig_update.go", + "openmeter/ent/db/charge.go", + "openmeter/ent/db/charge/charge.go", + "openmeter/ent/db/charge/where.go", + "openmeter/ent/db/charge_create.go", + "openmeter/ent/db/charge_delete.go", + "openmeter/ent/db/charge_query.go", + "openmeter/ent/db/charge_update.go", + "openmeter/ent/db/chargecreditpurchase.go", + "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go", + "openmeter/ent/db/chargecreditpurchase/where.go", + "openmeter/ent/db/chargecreditpurchase_create.go", + "openmeter/ent/db/chargecreditpurchase_delete.go", + "openmeter/ent/db/chargecreditpurchase_query.go", + "openmeter/ent/db/chargecreditpurchase_update.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go", + "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go", + "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go", + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go", + "openmeter/ent/db/chargeflatfee.go", + "openmeter/ent/db/chargeflatfee/chargeflatfee.go", + "openmeter/ent/db/chargeflatfee/where.go", + "openmeter/ent/db/chargeflatfee_create.go", + "openmeter/ent/db/chargeflatfee_delete.go", + "openmeter/ent/db/chargeflatfee_query.go", + "openmeter/ent/db/chargeflatfee_update.go", + "openmeter/ent/db/chargeflatfeerun.go", + "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go", + "openmeter/ent/db/chargeflatfeerun/where.go", + "openmeter/ent/db/chargeflatfeerun_create.go", + "openmeter/ent/db/chargeflatfeerun_delete.go", + "openmeter/ent/db/chargeflatfeerun_query.go", + "openmeter/ent/db/chargeflatfeerun_update.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go", + "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go", + "openmeter/ent/db/chargeflatfeerundetailedline.go", + "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go", + "openmeter/ent/db/chargeflatfeerundetailedline/where.go", + "openmeter/ent/db/chargeflatfeerundetailedline_create.go", + "openmeter/ent/db/chargeflatfeerundetailedline_delete.go", + "openmeter/ent/db/chargeflatfeerundetailedline_query.go", + "openmeter/ent/db/chargeflatfeerundetailedline_update.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go", + "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go", + "openmeter/ent/db/chargeflatfeerunpayment.go", + "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go", + "openmeter/ent/db/chargeflatfeerunpayment/where.go", + "openmeter/ent/db/chargeflatfeerunpayment_create.go", + "openmeter/ent/db/chargeflatfeerunpayment_delete.go", + "openmeter/ent/db/chargeflatfeerunpayment_query.go", + "openmeter/ent/db/chargeflatfeerunpayment_update.go", + "openmeter/ent/db/chargessearchv1.go", + "openmeter/ent/db/chargessearchv1/chargessearchv1.go", + "openmeter/ent/db/chargessearchv1/where.go", + "openmeter/ent/db/chargessearchv1_query.go", + "openmeter/ent/db/chargeusagebased.go", + "openmeter/ent/db/chargeusagebased/chargeusagebased.go", + "openmeter/ent/db/chargeusagebased/where.go", + "openmeter/ent/db/chargeusagebased_create.go", + "openmeter/ent/db/chargeusagebased_delete.go", + "openmeter/ent/db/chargeusagebased_query.go", + "openmeter/ent/db/chargeusagebased_update.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go", + "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go", + "openmeter/ent/db/chargeusagebasedrundetailedline.go", + "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go", + "openmeter/ent/db/chargeusagebasedrundetailedline/where.go", + "openmeter/ent/db/chargeusagebasedrundetailedline_create.go", + "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go", + "openmeter/ent/db/chargeusagebasedrundetailedline_query.go", + "openmeter/ent/db/chargeusagebasedrundetailedline_update.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go", + "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go", + "openmeter/ent/db/chargeusagebasedrunpayment.go", + "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go", + "openmeter/ent/db/chargeusagebasedrunpayment/where.go", + "openmeter/ent/db/chargeusagebasedrunpayment_create.go", + "openmeter/ent/db/chargeusagebasedrunpayment_delete.go", + "openmeter/ent/db/chargeusagebasedrunpayment_query.go", + "openmeter/ent/db/chargeusagebasedrunpayment_update.go", + "openmeter/ent/db/chargeusagebasedruns.go", + "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go", + "openmeter/ent/db/chargeusagebasedruns/where.go", + "openmeter/ent/db/chargeusagebasedruns_create.go", + "openmeter/ent/db/chargeusagebasedruns_delete.go", + "openmeter/ent/db/chargeusagebasedruns_query.go", + "openmeter/ent/db/chargeusagebasedruns_update.go", + "openmeter/ent/db/client.go", + "openmeter/ent/db/creditrealizationlineage.go", + "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go", + "openmeter/ent/db/creditrealizationlineage/where.go", + "openmeter/ent/db/creditrealizationlineage_create.go", + "openmeter/ent/db/creditrealizationlineage_delete.go", + "openmeter/ent/db/creditrealizationlineage_query.go", + "openmeter/ent/db/creditrealizationlineage_update.go", + "openmeter/ent/db/creditrealizationlineagesegment.go", + "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go", + "openmeter/ent/db/creditrealizationlineagesegment/where.go", + "openmeter/ent/db/creditrealizationlineagesegment_create.go", + "openmeter/ent/db/creditrealizationlineagesegment_delete.go", + "openmeter/ent/db/creditrealizationlineagesegment_query.go", + "openmeter/ent/db/creditrealizationlineagesegment_update.go", + "openmeter/ent/db/currencycostbasis.go", + "openmeter/ent/db/currencycostbasis/currencycostbasis.go", + "openmeter/ent/db/currencycostbasis/where.go", + "openmeter/ent/db/currencycostbasis_create.go", + "openmeter/ent/db/currencycostbasis_delete.go", + "openmeter/ent/db/currencycostbasis_query.go", + "openmeter/ent/db/currencycostbasis_update.go", + "openmeter/ent/db/cursor.go", + "openmeter/ent/db/customcurrency.go", + "openmeter/ent/db/customcurrency/customcurrency.go", + "openmeter/ent/db/customcurrency/where.go", + "openmeter/ent/db/customcurrency_create.go", + "openmeter/ent/db/customcurrency_delete.go", + "openmeter/ent/db/customcurrency_query.go", + "openmeter/ent/db/customcurrency_update.go", + "openmeter/ent/db/customer.go", + "openmeter/ent/db/customer/customer.go", + "openmeter/ent/db/customer/where.go", + "openmeter/ent/db/customer_create.go", + "openmeter/ent/db/customer_delete.go", + "openmeter/ent/db/customer_query.go", + "openmeter/ent/db/customer_update.go", + "openmeter/ent/db/customersubjects.go", + "openmeter/ent/db/customersubjects/customersubjects.go", + "openmeter/ent/db/customersubjects/where.go", + "openmeter/ent/db/customersubjects_create.go", + "openmeter/ent/db/customersubjects_delete.go", + "openmeter/ent/db/customersubjects_query.go", + "openmeter/ent/db/customersubjects_update.go", + "openmeter/ent/db/ent.go", + "openmeter/ent/db/entitlement.go", + "openmeter/ent/db/entitlement/entitlement.go", + "openmeter/ent/db/entitlement/where.go", + "openmeter/ent/db/entitlement_create.go", + "openmeter/ent/db/entitlement_delete.go", + "openmeter/ent/db/entitlement_query.go", + "openmeter/ent/db/entitlement_update.go", + "openmeter/ent/db/entmixinaccessor.go", + "openmeter/ent/db/enttest/enttest.go", + "openmeter/ent/db/expose.go", + "openmeter/ent/db/feature.go", + "openmeter/ent/db/feature/feature.go", + "openmeter/ent/db/feature/where.go", + "openmeter/ent/db/feature_create.go", + "openmeter/ent/db/feature_delete.go", + "openmeter/ent/db/feature_query.go", + "openmeter/ent/db/feature_update.go", + "openmeter/ent/db/grant.go", + "openmeter/ent/db/grant/grant.go", + "openmeter/ent/db/grant/where.go", + "openmeter/ent/db/grant_create.go", + "openmeter/ent/db/grant_delete.go", + "openmeter/ent/db/grant_query.go", + "openmeter/ent/db/grant_update.go", + "openmeter/ent/db/hook/hook.go", + "openmeter/ent/db/ledgeraccount.go", + "openmeter/ent/db/ledgeraccount/ledgeraccount.go", + "openmeter/ent/db/ledgeraccount/where.go", + "openmeter/ent/db/ledgeraccount_create.go", + "openmeter/ent/db/ledgeraccount_delete.go", + "openmeter/ent/db/ledgeraccount_query.go", + "openmeter/ent/db/ledgeraccount_update.go", + "openmeter/ent/db/ledgerbreakagerecord.go", + "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go", + "openmeter/ent/db/ledgerbreakagerecord/where.go", + "openmeter/ent/db/ledgerbreakagerecord_create.go", + "openmeter/ent/db/ledgerbreakagerecord_delete.go", + "openmeter/ent/db/ledgerbreakagerecord_query.go", + "openmeter/ent/db/ledgerbreakagerecord_update.go", + "openmeter/ent/db/ledgercustomeraccount.go", + "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go", + "openmeter/ent/db/ledgercustomeraccount/where.go", + "openmeter/ent/db/ledgercustomeraccount_create.go", + "openmeter/ent/db/ledgercustomeraccount_delete.go", + "openmeter/ent/db/ledgercustomeraccount_query.go", + "openmeter/ent/db/ledgercustomeraccount_update.go", + "openmeter/ent/db/ledgerentry.go", + "openmeter/ent/db/ledgerentry/ledgerentry.go", + "openmeter/ent/db/ledgerentry/where.go", + "openmeter/ent/db/ledgerentry_create.go", + "openmeter/ent/db/ledgerentry_delete.go", + "openmeter/ent/db/ledgerentry_query.go", + "openmeter/ent/db/ledgerentry_update.go", + "openmeter/ent/db/ledgersubaccount.go", + "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go", + "openmeter/ent/db/ledgersubaccount/where.go", + "openmeter/ent/db/ledgersubaccount_create.go", + "openmeter/ent/db/ledgersubaccount_delete.go", + "openmeter/ent/db/ledgersubaccount_query.go", + "openmeter/ent/db/ledgersubaccount_update.go", + "openmeter/ent/db/ledgersubaccountroute.go", + "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go", + "openmeter/ent/db/ledgersubaccountroute/where.go", + "openmeter/ent/db/ledgersubaccountroute_create.go", + "openmeter/ent/db/ledgersubaccountroute_delete.go", + "openmeter/ent/db/ledgersubaccountroute_query.go", + "openmeter/ent/db/ledgersubaccountroute_update.go", + "openmeter/ent/db/ledgertransaction.go", + "openmeter/ent/db/ledgertransaction/ledgertransaction.go", + "openmeter/ent/db/ledgertransaction/where.go", + "openmeter/ent/db/ledgertransaction_create.go", + "openmeter/ent/db/ledgertransaction_delete.go", + "openmeter/ent/db/ledgertransaction_query.go", + "openmeter/ent/db/ledgertransaction_update.go", + "openmeter/ent/db/ledgertransactiongroup.go", + "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go", + "openmeter/ent/db/ledgertransactiongroup/where.go", + "openmeter/ent/db/ledgertransactiongroup_create.go", + "openmeter/ent/db/ledgertransactiongroup_delete.go", + "openmeter/ent/db/ledgertransactiongroup_query.go", + "openmeter/ent/db/ledgertransactiongroup_update.go", + "openmeter/ent/db/llmcostprice.go", + "openmeter/ent/db/llmcostprice/llmcostprice.go", + "openmeter/ent/db/llmcostprice/where.go", + "openmeter/ent/db/llmcostprice_create.go", + "openmeter/ent/db/llmcostprice_delete.go", + "openmeter/ent/db/llmcostprice_query.go", + "openmeter/ent/db/llmcostprice_update.go", + "openmeter/ent/db/meter.go", + "openmeter/ent/db/meter/meter.go", + "openmeter/ent/db/meter/where.go", + "openmeter/ent/db/meter_create.go", + "openmeter/ent/db/meter_delete.go", + "openmeter/ent/db/meter_query.go", + "openmeter/ent/db/meter_update.go", + "openmeter/ent/db/mutation.go", + "openmeter/ent/db/notificationchannel.go", + "openmeter/ent/db/notificationchannel/notificationchannel.go", + "openmeter/ent/db/notificationchannel/where.go", + "openmeter/ent/db/notificationchannel_create.go", + "openmeter/ent/db/notificationchannel_delete.go", + "openmeter/ent/db/notificationchannel_query.go", + "openmeter/ent/db/notificationchannel_update.go", + "openmeter/ent/db/notificationevent.go", + "openmeter/ent/db/notificationevent/notificationevent.go", + "openmeter/ent/db/notificationevent/where.go", + "openmeter/ent/db/notificationevent_create.go", + "openmeter/ent/db/notificationevent_delete.go", + "openmeter/ent/db/notificationevent_query.go", + "openmeter/ent/db/notificationevent_update.go", + "openmeter/ent/db/notificationeventdeliverystatus.go", + "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go", + "openmeter/ent/db/notificationeventdeliverystatus/where.go", + "openmeter/ent/db/notificationeventdeliverystatus_create.go", + "openmeter/ent/db/notificationeventdeliverystatus_delete.go", + "openmeter/ent/db/notificationeventdeliverystatus_query.go", + "openmeter/ent/db/notificationeventdeliverystatus_update.go", + "openmeter/ent/db/notificationrule.go", + "openmeter/ent/db/notificationrule/notificationrule.go", + "openmeter/ent/db/notificationrule/where.go", + "openmeter/ent/db/notificationrule_create.go", + "openmeter/ent/db/notificationrule_delete.go", + "openmeter/ent/db/notificationrule_query.go", + "openmeter/ent/db/notificationrule_update.go", + "openmeter/ent/db/organizationdefaulttaxcodes.go", + "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go", + "openmeter/ent/db/organizationdefaulttaxcodes/where.go", + "openmeter/ent/db/organizationdefaulttaxcodes_create.go", + "openmeter/ent/db/organizationdefaulttaxcodes_delete.go", + "openmeter/ent/db/organizationdefaulttaxcodes_query.go", + "openmeter/ent/db/organizationdefaulttaxcodes_update.go", + "openmeter/ent/db/paginate.go", + "openmeter/ent/db/plan.go", + "openmeter/ent/db/plan/plan.go", + "openmeter/ent/db/plan/where.go", + "openmeter/ent/db/plan_create.go", + "openmeter/ent/db/plan_delete.go", + "openmeter/ent/db/plan_query.go", + "openmeter/ent/db/plan_update.go", + "openmeter/ent/db/planaddon.go", + "openmeter/ent/db/planaddon/planaddon.go", + "openmeter/ent/db/planaddon/where.go", + "openmeter/ent/db/planaddon_create.go", + "openmeter/ent/db/planaddon_delete.go", + "openmeter/ent/db/planaddon_query.go", + "openmeter/ent/db/planaddon_update.go", + "openmeter/ent/db/planphase.go", + "openmeter/ent/db/planphase/planphase.go", + "openmeter/ent/db/planphase/where.go", + "openmeter/ent/db/planphase_create.go", + "openmeter/ent/db/planphase_delete.go", + "openmeter/ent/db/planphase_query.go", + "openmeter/ent/db/planphase_update.go", + "openmeter/ent/db/planratecard.go", + "openmeter/ent/db/planratecard/planratecard.go", + "openmeter/ent/db/planratecard/where.go", + "openmeter/ent/db/planratecard_create.go", + "openmeter/ent/db/planratecard_delete.go", + "openmeter/ent/db/planratecard_query.go", + "openmeter/ent/db/planratecard_update.go", + "openmeter/ent/db/predicate/predicate.go", + "openmeter/ent/db/runtime.go", + "openmeter/ent/db/runtime/runtime.go", + "openmeter/ent/db/setorclear.go", + "openmeter/ent/db/subject.go", + "openmeter/ent/db/subject/subject.go", + "openmeter/ent/db/subject/where.go", + "openmeter/ent/db/subject_create.go", + "openmeter/ent/db/subject_delete.go", + "openmeter/ent/db/subject_query.go", + "openmeter/ent/db/subject_update.go", + "openmeter/ent/db/subscription.go", + "openmeter/ent/db/subscription/subscription.go", + "openmeter/ent/db/subscription/where.go", + "openmeter/ent/db/subscription_create.go", + "openmeter/ent/db/subscription_delete.go", + "openmeter/ent/db/subscription_query.go", + "openmeter/ent/db/subscription_update.go", + "openmeter/ent/db/subscriptionaddon.go", + "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go", + "openmeter/ent/db/subscriptionaddon/where.go", + "openmeter/ent/db/subscriptionaddon_create.go", + "openmeter/ent/db/subscriptionaddon_delete.go", + "openmeter/ent/db/subscriptionaddon_query.go", + "openmeter/ent/db/subscriptionaddon_update.go", + "openmeter/ent/db/subscriptionaddonquantity.go", + "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go", + "openmeter/ent/db/subscriptionaddonquantity/where.go", + "openmeter/ent/db/subscriptionaddonquantity_create.go", + "openmeter/ent/db/subscriptionaddonquantity_delete.go", + "openmeter/ent/db/subscriptionaddonquantity_query.go", + "openmeter/ent/db/subscriptionaddonquantity_update.go", + "openmeter/ent/db/subscriptionbillingsyncstate.go", + "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go", + "openmeter/ent/db/subscriptionbillingsyncstate/where.go", + "openmeter/ent/db/subscriptionbillingsyncstate_create.go", + "openmeter/ent/db/subscriptionbillingsyncstate_delete.go", + "openmeter/ent/db/subscriptionbillingsyncstate_query.go", + "openmeter/ent/db/subscriptionbillingsyncstate_update.go", + "openmeter/ent/db/subscriptionitem.go", + "openmeter/ent/db/subscriptionitem/subscriptionitem.go", + "openmeter/ent/db/subscriptionitem/where.go", + "openmeter/ent/db/subscriptionitem_create.go", + "openmeter/ent/db/subscriptionitem_delete.go", + "openmeter/ent/db/subscriptionitem_query.go", + "openmeter/ent/db/subscriptionitem_update.go", + "openmeter/ent/db/subscriptionphase.go", + "openmeter/ent/db/subscriptionphase/subscriptionphase.go", + "openmeter/ent/db/subscriptionphase/where.go", + "openmeter/ent/db/subscriptionphase_create.go", + "openmeter/ent/db/subscriptionphase_delete.go", + "openmeter/ent/db/subscriptionphase_query.go", + "openmeter/ent/db/subscriptionphase_update.go", + "openmeter/ent/db/taxcode.go", + "openmeter/ent/db/taxcode/taxcode.go", + "openmeter/ent/db/taxcode/where.go", + "openmeter/ent/db/taxcode_create.go", + "openmeter/ent/db/taxcode_delete.go", + "openmeter/ent/db/taxcode_query.go", + "openmeter/ent/db/taxcode_update.go", + "openmeter/ent/db/tx.go", + "openmeter/ent/db/usagereset.go", + "openmeter/ent/db/usagereset/usagereset.go", + "openmeter/ent/db/usagereset/where.go", + "openmeter/ent/db/usagereset_create.go", + "openmeter/ent/db/usagereset_delete.go", + "openmeter/ent/db/usagereset_query.go", + "openmeter/ent/db/usagereset_update.go", + "pkg/framework/entutils/testutils/ent1/db/client.go", + "pkg/framework/entutils/testutils/ent1/db/cursor.go", + "pkg/framework/entutils/testutils/ent1/db/ent.go", + "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go", + "pkg/framework/entutils/testutils/ent1/db/example1.go", + "pkg/framework/entutils/testutils/ent1/db/example1/example1.go", + "pkg/framework/entutils/testutils/ent1/db/example1/where.go", + "pkg/framework/entutils/testutils/ent1/db/example1_create.go", + "pkg/framework/entutils/testutils/ent1/db/example1_delete.go", + "pkg/framework/entutils/testutils/ent1/db/example1_query.go", + "pkg/framework/entutils/testutils/ent1/db/example1_update.go", + "pkg/framework/entutils/testutils/ent1/db/expose.go", + "pkg/framework/entutils/testutils/ent1/db/hook/hook.go", + "pkg/framework/entutils/testutils/ent1/db/mutation.go", + "pkg/framework/entutils/testutils/ent1/db/paginate.go", + "pkg/framework/entutils/testutils/ent1/db/predicate/predicate.go", + "pkg/framework/entutils/testutils/ent1/db/runtime.go", + "pkg/framework/entutils/testutils/ent1/db/runtime/runtime.go", + "pkg/framework/entutils/testutils/ent1/db/tx.go", + "pkg/framework/entutils/testutils/ent2/db/client.go", + "pkg/framework/entutils/testutils/ent2/db/ent.go", + "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go", + "pkg/framework/entutils/testutils/ent2/db/example2.go", + "pkg/framework/entutils/testutils/ent2/db/example2/example2.go", + "pkg/framework/entutils/testutils/ent2/db/example2/where.go", + "pkg/framework/entutils/testutils/ent2/db/example2_create.go", + "pkg/framework/entutils/testutils/ent2/db/example2_delete.go", + "pkg/framework/entutils/testutils/ent2/db/example2_query.go", + "pkg/framework/entutils/testutils/ent2/db/example2_update.go", + "pkg/framework/entutils/testutils/ent2/db/expose.go", + "pkg/framework/entutils/testutils/ent2/db/hook/hook.go", + "pkg/framework/entutils/testutils/ent2/db/mutation.go", + "pkg/framework/entutils/testutils/ent2/db/predicate/predicate.go", + "pkg/framework/entutils/testutils/ent2/db/runtime.go", + "pkg/framework/entutils/testutils/ent2/db/runtime/runtime.go", + "pkg/framework/entutils/testutils/ent2/db/tx.go" + ] + }, + "fixture": { + "count": 15, + "frameworks": { + "-": 15 + }, + "files": [ + "app/config/testdata/complete.yaml", + "pkg/kafka/metrics/stats/testdata/stats.json", + "tools/migrate/testdata/ignore/20240826120919_init.down.sql", + "tools/migrate/testdata/ignore/20240826120919_init.up.sql", + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.down.sql", + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.up.sql", + "tools/migrate/testdata/ignore/20240917172257_billing-entities.down.sql", + "tools/migrate/testdata/ignore/20240917172257_billing-entities.up.sql", + "tools/migrate/testdata/noignore/20240826120919_init.down.sql", + "tools/migrate/testdata/noignore/20240826120919_init.up.sql", + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.down.sql", + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.up.sql", + "tools/migrate/testdata/noignore/20240917172257_billing-entities.down.sql", + "tools/migrate/testdata/noignore/20240917172257_billing-entities.up.sql", + "tools/migrate/testdata/sqlcgen/README.md" + ] + }, + "migration": { + "count": 424, + "frameworks": { + "rails": 6, + "sql": 418 + }, + "files": [ + "openmeter/ent/db/migrate/migrate.go", + "openmeter/ent/db/migrate/schema.go", + "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go", + "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go", + "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go", + "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go", + "tools/migrate/migrations/20240826120919_init.down.sql", + "tools/migrate/migrations/20240826120919_init.up.sql", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql", + "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql", + "tools/migrate/migrations/20240917172257_billing-entities.down.sql", + "tools/migrate/migrations/20240917172257_billing-entities.up.sql", + "tools/migrate/migrations/20240918204720_customer.down.sql", + "tools/migrate/migrations/20240918204720_customer.up.sql", + "tools/migrate/migrations/20240919144910_customer-timezone.down.sql", + "tools/migrate/migrations/20240919144910_customer-timezone.up.sql", + "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql", + "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql", + "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql", + "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql", + "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql", + "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql", + "tools/migrate/migrations/20240924164504_billing-profile.down.sql", + "tools/migrate/migrations/20240924164504_billing-profile.up.sql", + "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql", + "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql", + "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql", + "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql", + "tools/migrate/migrations/20241013151355_apps.down.sql", + "tools/migrate/migrations/20241013151355_apps.up.sql", + "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql", + "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql", + "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql", + "tools/migrate/migrations/20241021124045_billing-profile.down.sql", + "tools/migrate/migrations/20241021124045_billing-profile.up.sql", + "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql", + "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql", + "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql", + "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql", + "tools/migrate/migrations/20241102151321_customer_filters.down.sql", + "tools/migrate/migrations/20241102151321_customer_filters.up.sql", + "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql", + "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql", + "tools/migrate/migrations/20241105171821_plan.down.sql", + "tools/migrate/migrations/20241105171821_plan.up.sql", + "tools/migrate/migrations/20241108055754_plan.down.sql", + "tools/migrate/migrations/20241108055754_plan.up.sql", + "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql", + "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql", + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql", + "tools/migrate/migrations/20241119131528_plan.down.sql", + "tools/migrate/migrations/20241119131528_plan.up.sql", + "tools/migrate/migrations/20241119154436_plan.down.sql", + "tools/migrate/migrations/20241119154436_plan.up.sql", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql", + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql", + "tools/migrate/migrations/20241120145625_billing-discounts.down.sql", + "tools/migrate/migrations/20241120145625_billing-discounts.up.sql", + "tools/migrate/migrations/20241121145549_billing-totals.down.sql", + "tools/migrate/migrations/20241121145549_billing-totals.up.sql", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql", + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql", + "tools/migrate/migrations/20241204162012_subscriptions.down.sql", + "tools/migrate/migrations/20241204162012_subscriptions.up.sql", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql", + "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql", + "tools/migrate/migrations/20241209085334_subscription_fields.down.sql", + "tools/migrate/migrations/20241209085334_subscription_fields.up.sql", + "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql", + "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql", + "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql", + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql", + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql", + "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql", + "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql", + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql", + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql", + "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql", + "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql", + "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql", + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql", + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql", + "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql", + "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql", + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql", + "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql", + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql", + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql", + "tools/migrate/migrations/20250130034713_customer_key.down.sql", + "tools/migrate/migrations/20250130034713_customer_key.up.sql", + "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql", + "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql", + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql", + "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql", + "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql", + "tools/migrate/migrations/20250203131553_plan-alignment.down.sql", + "tools/migrate/migrations/20250203131553_plan-alignment.up.sql", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql", + "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql", + "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql", + "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql", + "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql", + "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql", + "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql", + "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql", + "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql", + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql", + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql", + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql", + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql", + "tools/migrate/migrations/20250305025807_add_meter_table.down.sql", + "tools/migrate/migrations/20250305025807_add_meter_table.up.sql", + "tools/migrate/migrations/20250306040407_resource_meter.down.sql", + "tools/migrate/migrations/20250306040407_resource_meter.up.sql", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql", + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql", + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql", + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql", + "tools/migrate/migrations/20250325114848_annotations.down.sql", + "tools/migrate/migrations/20250325114848_annotations.up.sql", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql", + "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql", + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql", + "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql", + "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql", + "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql", + "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql", + "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql", + "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql", + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql", + "tools/migrate/migrations/20250404105832_addon.down.sql", + "tools/migrate/migrations/20250404105832_addon.up.sql", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql", + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql", + "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql", + "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql", + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql", + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql", + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql", + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql", + "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql", + "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql", + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql", + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql", + "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql", + "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql", + "tools/migrate/migrations/20250415105134_plan_addons.down.sql", + "tools/migrate/migrations/20250415105134_plan_addons.up.sql", + "tools/migrate/migrations/20250415143130_subs-annotations.down.sql", + "tools/migrate/migrations/20250415143130_subs-annotations.up.sql", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql", + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql", + "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql", + "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql", + "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql", + "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql", + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql", + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql", + "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql", + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql", + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql", + "tools/migrate/migrations/20250522155754_billing-line-index.down.sql", + "tools/migrate/migrations/20250522155754_billing-line-index.up.sql", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql", + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql", + "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql", + "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql", + "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql", + "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql", + "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql", + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql", + "tools/migrate/migrations/20250606115858_subject_create.down.sql", + "tools/migrate/migrations/20250606115858_subject_create.up.sql", + "tools/migrate/migrations/20250606115859_subject_namespace.down.sql", + "tools/migrate/migrations/20250606115859_subject_namespace.up.sql", + "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql", + "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql", + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql", + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql", + "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql", + "tools/migrate/migrations/20250618194112_remove_app_default.down.sql", + "tools/migrate/migrations/20250618194112_remove_app_default.up.sql", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql", + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql", + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql", + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql", + "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql", + "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql", + "tools/migrate/migrations/20250711121333_customer_annotations.down.sql", + "tools/migrate/migrations/20250711121333_customer_annotations.up.sql", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql", + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql", + "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql", + "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql", + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql", + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql", + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql", + "tools/migrate/migrations/20250818081817_subscription-period.down.sql", + "tools/migrate/migrations/20250818081817_subscription-period.up.sql", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql", + "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql", + "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql", + "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql", + "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql", + "tools/migrate/migrations/20250908130504_customer-indexes.down.sql", + "tools/migrate/migrations/20250908130504_customer-indexes.up.sql", + "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql", + "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql", + "tools/migrate/migrations/20250924131607_subject-index.down.sql", + "tools/migrate/migrations/20250924131607_subject-index.up.sql", + "tools/migrate/migrations/20250925160650_grant-annotations.down.sql", + "tools/migrate/migrations/20250925160650_grant-annotations.up.sql", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql", + "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql", + "tools/migrate/migrations/20250926145502_grant-annotations.down.sql", + "tools/migrate/migrations/20250926145502_grant-annotations.up.sql", + "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql", + "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql", + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql", + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql", + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql", + "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql", + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql", + "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql", + "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql", + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql", + "tools/migrate/migrations/20251121083843_meter_annotations.down.sql", + "tools/migrate/migrations/20251121083843_meter_annotations.up.sql", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql", + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql", + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql", + "tools/migrate/migrations/20251211145809_meter_event_type.down.sql", + "tools/migrate/migrations/20251211145809_meter_event_type.up.sql", + "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql", + "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql", + "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql", + "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql", + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql", + "tools/migrate/migrations/20260112160815_detailed-lines.down.sql", + "tools/migrate/migrations/20260112160815_detailed-lines.up.sql", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql", + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql", + "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql", + "tools/migrate/migrations/20260220092326_tax-code.down.sql", + "tools/migrate/migrations/20260220092326_tax-code.up.sql", + "tools/migrate/migrations/20260224121149_charges.down.sql", + "tools/migrate/migrations/20260224121149_charges.up.sql", + "tools/migrate/migrations/20260225160541_billing-credits.down.sql", + "tools/migrate/migrations/20260225160541_billing-credits.up.sql", + "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql", + "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql", + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql", + "tools/migrate/migrations/20260303233513_llmcost_add.down.sql", + "tools/migrate/migrations/20260303233513_llmcost_add.up.sql", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql", + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql", + "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql", + "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql", + "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql", + "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql", + "tools/migrate/migrations/20260316165258_ledger.down.sql", + "tools/migrate/migrations/20260316165258_ledger.up.sql", + "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql", + "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql", + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql", + "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql", + "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql", + "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql", + "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql", + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql", + "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql", + "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql", + "tools/migrate/migrations/20260320084936_charges-state-details.down.sql", + "tools/migrate/migrations/20260320084936_charges-state-details.up.sql", + "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql", + "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql", + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql", + "tools/migrate/migrations/20260323141807_add-feature-description.down.sql", + "tools/migrate/migrations/20260323141807_add-feature-description.up.sql", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql", + "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql", + "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql", + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql", + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql", + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql", + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql", + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql", + "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql", + "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql", + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql", + "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql", + "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql", + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql", + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql", + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql", + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql", + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql", + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql", + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql", + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql", + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql", + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql", + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql", + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql", + "tools/migrate/migrations/20260502093117_distributed_locks.down.sql", + "tools/migrate/migrations/20260502093117_distributed_locks.up.sql", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql", + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql", + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql", + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql", + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql", + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql", + "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql", + "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql", + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql", + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql", + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql", + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql", + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql", + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql", + "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql", + "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql", + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql", + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql", + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql", + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql", + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql" + ] + } + }, + "subprojects": [ + { + "path": ".", + "name": "openmeter", + "type": "go", + "signals": [ + "go.mod" + ], + "is_root_wrapper": true + }, + { + "path": "collector", + "name": "collector", + "type": "go", + "signals": [ + "go.mod" + ], + "is_root_wrapper": false + }, + { + "path": "api/spec", + "name": "spec", + "type": "node", + "signals": [ + "package.json" + ], + "is_root_wrapper": false + }, + { + "path": "api/client/python", + "name": "python", + "type": "python", + "signals": [ + "pyproject.toml" + ], + "is_root_wrapper": false + }, + { + "path": "api/client/javascript", + "name": "javascript", + "type": "node", + "signals": [ + "package.json" + ], + "is_root_wrapper": false + } + ] +} \ No newline at end of file diff --git a/.archie/scan_report.md b/.archie/scan_report.md new file mode 100644 index 0000000000..bd1c6e3492 --- /dev/null +++ b/.archie/scan_report.md @@ -0,0 +1,97 @@ +# Archie Scan Report +> Deep scan baseline | 2026-06-05 17:18 UTC | 51,789 functions / 834,052 LOC analyzed | baseline run (comprehensive depth) + +## Architecture Overview + +OpenMeter is a multi-binary Go backend organized as domain packages under `openmeter/`, each following a hand-rolled **service / adapter / connector** pattern: interfaces and value models are declared in the domain root package, concrete struct constructors live in nested `service/` and `adapter/` subpackages, and everything is wired together by Google Wire in `app/common`. Persistence is Ent ORM over a single shared generated PostgreSQL client (`openmeter/ent/db`), with cross-domain atomicity achieved through a context-ambient transaction seam (`entutils.TransactingRepo` / `WithTx` / `Self`) and per-customer serialization via transaction-scoped advisory locks (`lockr`). Event-time usage metering flows through Kafka into ClickHouse via streaming connectors, while an async Watermill-over-Kafka event bus drives the billing, notification, and balance workers. + +Two HTTP API surfaces coexist by design: a legacy v1 surface assembled in `openmeter/server/router` from per-domain `httpdriver`/`httphandler` packages, and a newer AIP-style v3 surface in `api/v3` whose centralized handlers delegate to the same domain services. The entire API contract is authored once in TypeSpec (`api/spec`, legacy + aip packages) and code-generated to OpenAPI, Go server stubs (oapi-codegen), and JS/Python/Go SDKs — so the two surfaces and three SDKs cannot drift from the contract by hand. + +The most load-bearing decisions are: the transaction-aware Ent repository (the seam enabling subscription→billing→charges→ledger to commit atomically over one client); explicit `qmuntal/stateless` finite state machines with external storage for the invoice and per-charge lifecycles; Wire compile-time DI with feature-gated concrete-or-noop provider swaps (credits, webhooks); the `ServiceHookRegistry` for synchronous in-process cross-domain reactions; and a polymorphic `Charge` parent row with idempotent `unique_reference_id`. The only import cycles detected are test-harness-induced (production/`_test` packages reaching the shared `test/billing` fixtures), not production cycles. + +## Health Scores + +| Metric | Current | Previous | Trend | What it means | +|--------|--------:|---------:|------:|---------------| +| Erosion | 0.5408 | — | flat (baseline) | 54% of code mass sits in heavy/complex functions — high, but dominated by generated `ent/db` ORM code | +| Gini | 0.7709 | — | flat (baseline) | Complexity is very unevenly distributed; a small set of files carries most of the weight | +| Top-20% | 0.8275 | — | flat (baseline) | The top 20% of files hold 83% of complexity mass — concentration is high | +| Verbosity | 0.1125 | — | flat (baseline) | Exact line-clone duplication is low (~11%); 93.8k duplicate lines, much in generated/SDK code | +| LOC | 834,052 | — | flat (baseline) | Large monorepo across six binaries + three SDKs + collector module | + +Read together, the numbers describe a large, healthy-but-heavy codebase whose raw erosion/gini/top-20 figures are inflated by the generated Ent client (`openmeter/ent/db`, ~407 files) and the generated SDKs — not by hand-written domain code. Hand-written complexity is concentrated in a few well-known orchestrators (subscription sync, invoice listing, balance history, webhook reconciliation) rather than spread as pervasive rot. Verbosity is genuinely low for a project this size. The signal to watch is concentration: the billing/charges/ledger cluster is both the heaviest and the most actively changed area, so that is where erosion will show up first. + +### Complexity Trajectory +Generated code dominates the raw top of the CC distribution (`ent/db/runtime.go:105 init` CC=1016, plus `assignValues`/`sqlSave` on billing invoice tables CC=118–187) and is **not actionable** — it is regenerated from the Ent schema. The top hand-written offenders are: + +- `openmeter/subscription/service/sync.go:28 sync` — **CC=65** (the subscription→target-state reconciliation core) +- `openmeter/notification/eventhandler/webhook.go:30 reconcileWebhookEvent` — **CC=61** +- `openmeter/streaming/clickhouse/meter_query.go:108 toSQL` — **CC=59** (ClickHouse query builder) +- `openmeter/app/stripe/httpdriver/webhook.go:40 AppStripeWebhook` — **CC=58** (inbound Stripe webhook dispatch) +- `openmeter/app/stripe/client/checkout.go:21 CreateCheckoutSession` — **CC=47** +- `openmeter/productcatalog/ratecard.go:694 Validate` — **CC=47** (accumulating ratecard validation) +- `openmeter/billing/adapter/invoice.go:119 ListInvoices` — **CC=41** (filter-rich list query) +- `openmeter/entitlement/metered/balance.go:109 GetEntitlementBalanceHistory` — **CC=41** + +These are inherent-complexity hotspots (state reconciliation, query building, webhook routing) rather than accidental sprawl, but each is a single-point-of-failure worth guarding with tests and resisting further branching. + +## Findings + +Ranked by severity, grouped by novelty. 268 total drift findings this scan: 33 deep architectural (AI) + 235 mechanical (8 deep errors, 25 deep warns; 230 mechanical warns mostly DI-graph annotation noise). + +### NEW (first observed this scan) + +**Errors (decision/contract violations):** + +1. **[error] currencies adapter silently writes outside the caller's transaction.** `openmeter/currencies/adapter/currencies.go` — all four methods (incl. `CreateCurrency`, `CreateCostBasis`) run against the outer non-tx `a.db` instead of the rebound `tx.db` inside the `TransactingRepo` closure, breaking the cross-domain atomicity guarantee `dec-tx-001` exists to provide. Rename the closure param to `repo` and use `repo.db`. Confidence 0.9. +2. **[error] Credit-purchase settlement bypasses the charge state machine (two of three settlement types).** `openmeter/billing/charges/creditpurchase/service/invoice.go` and `.../external.go` — status transitions mutate `charge.Status` directly + `adapter.UpdateCharge` instead of driving the `chargestatemachine` FSM, the exact anti-pattern the folder's CLAUDE.md calls out; illegal transitions and missed side-effects (patch accumulation) become possible. Confidence 0.85. +3. **[error] Data race on shared `err` in the billing collect fan-out.** `openmeter/billing/worker/collect/collect.go` `InvoiceCollector.All()` — goroutine-per-customer closures write a package/function-scoped `err` and send it over `errChan` while the drain loop also assigns it; under `-race` a real Write/Write race, and functionally an error can be lost or misattributed to the wrong customer. Declare `localErr` inside the closure. Duplicated verbatim in the advance package — fix both. Confidence 0.85. +4. **[error] Billing customer-lock upsert swallows DB errors.** `openmeter/billing/adapter/lock.go` `UpsertCustomerLock` returns `nil` for every non-`ErrNoRows` error. This row is the load-bearing primitive for per-customer billing serialization (`FOR UPDATE` is taken after it); a swallowed error means the caller proceeds on a false premise in a financial path. Return the error (prefer `errors.Is`). Trips the universal `decay-empty-catch` rule. Confidence 0.9. +5. **[error] `WithLockedNamespaces` mutates the shared Service in place.** `openmeter/billing/service/service.go` — violates the `ConfigService` wither contract (sibling `WithAdvancementStrategy` returns a clone): a pointer receiver mutates `fsNamespaceLockdown` and returns the same shared `*Service`, so namespace lockdown leaks globally and persists. Switch to a value receiver. Confidence 0.85. +6. **[error] v3 customer-billing handler orchestrates across domains instead of delegating.** `api/v3/handlers/customers/billing/update_billing.go` — the handler resolves the payment app, switches on app type (Stripe/CustomInvoicing/Sandbox), does Stripe field validation, builds per-app `CustomerData`, and upserts app data + billing override directly. v3 handlers must be thin delegators (`dec-api-surface-001`); this belongs in a billing/customer service. Confidence 0.85. +7. **[error] Duplicated app-type orchestration across two v3 billing endpoints.** `api/v3/handlers/customers/billing/update_billing_app_data.go` duplicates the same app-type switch, Stripe validation, per-app `CustomerData` construction, and `UpsertCustomerData` call as `update_billing.go`. Extract one shared service method; the duplication guarantees the endpoints drift. Confidence 0.85. + +**Warnings (pattern erosion, pitfalls manifesting, trade-offs undermined):** + +8. **[warn] Adapter helpers read/write via `a.db` outside `TransactingRepo`.** `openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go`, `openmeter/ledger/account/adapter/subaccount.go` (`resolveOrCreateRoute`) — reads use the base client, so inside a caller's tx they read a stale/uncommitted-missing snapshot, contradicting each folder's own transaction-aware-adapter rule. +9. **[warn] `slog.Default()` instead of the injected logger.** `openmeter/billing/charges/usagebased/service/statemachine.go`, `openmeter/server/server.go` (request-logger middleware + construction errors) — violates the project's no-`slog.Default()` rule; thread the injected `*slog.Logger`. +10. **[warn] `time.Now()` instead of `clock.Now()` breaks frozen-time determinism.** `openmeter/billing/worker/subscriptionsync/service/sync.go` (`HandleSubscriptionSyncEvent`, while siblings use `clock.Now()`), `openmeter/billing/service/invoicecalc/gatheringrealtime.go` (detailed-line timestamps in the otherwise-pure calc pipeline). +11. **[warn] `panic()` on recoverable config error.** `app/config/telemetry.go` `GetSampler()` panics on an invalid trace sampler ratio — violates the no-panic-in-non-test rule; validate in `Validate()` or return `(Sampler, error)`. +12. **[warn] `SimulateInvoice` hand-derives failed status outside the FSM.** `openmeter/billing/service/invoice.go` — read-only so it never corrupts durable state, but duplicates the FSM's failed-transition semantics outside the single Permit-edge source of truth; will silently drift if failed-state derivation changes. +13. **[warn] Currencies & llmcost services skip the standard Config+Validate()+New constructor.** `openmeter/currencies/service/service.go`, `openmeter/llmcost/service/service.go` — positional args, no dependency validation, no injected logger, return concrete struct not interface; a nil dep surfaces as a later nil-pointer panic. +14. **[warn] v3 handlers omit the per-handler `apierrors.GenericErrorEncoder()`.** `api/v3/handlers/currencies/create.go`, `.../create_cost_basis.go`, `api/v3/handlers/subscriptions/subscriptionaddons/get.go` — domain errors fall to the default path instead of the uniform v3 RFC7807/status mapping the rest of the surface uses. +15. **[warn] v3 read/resolve logic leaks domain rules into handlers.** `api/v3/handlers/customers/billing/get_billing.go` (per-app-type mapping), `api/v3/handlers/customers/upsert.go` (key-preservation workaround with explicit FIXME), `api/v3/handlers/subscriptions/create.go` (customer/plan ID-or-key resolution with TODOs) — each admits the logic belongs in a service. +16. **[warn] Ledger annotation propagation gap.** `openmeter/ledger/chargeadapter/usagebased.go` `OnInvoiceUsageAccrued` commits the group without stamping charge annotations on each transaction input (folder anti-pattern requires both input AND group). +17. **[warn] Test decimal/clock conventions eroded in high-leverage credits/subscription fixtures.** `test/credits/base.go`, `test/credits/sanity_test.go`, `test/credits/rating_test.go` use boolean `decimal.Equal()` instead of `require.Equal` on `InexactFloat64()` (no diff on failure, in shared `BaseSuite` helpers); `test/subscription/scenario_firstofmonth_test.go` calls `clock.SetTime` with no `defer clock.ResetTime()`, leaking frozen time to later tests. + +### Data Architecture + +`blueprint.data_models` carries 74 documented models — schema drift warrants elevated attention. Four schema-shaped findings emerged this scan: + +1. **[warn] FK-less denormalized routing columns lack application-level existence validation.** `openmeter/ent/schema/ledger_account.go` — `LedgerSubAccountRoute` stores `currency`, `tax_code` (as `TaxCode.Key`), `tax_behavior`, `features`, `cost_basis`, `credit_priority` as immutable literal columns with no FK and no resolver-side check that `tax_code`/`currency` resolve to live canonical rows. This is the documented FK-less-denormalized-routing pitfall manifesting; add a resolver existence check + reconciliation test. (problem: integrity enforced only by app code; evidence: `ledger_account.go:116-130` immutable literals, no edge; root_cause: import-cycle avoidance between ledger and tax/catalog aggregates; fix: validate at route-create, add reconciliation test.) +2. **[warn] Destructive column-type migration on a populated routing column.** `LedgerSubAccountRoute.features` jsonb→text[] produced a DROP+ADD migration that destroys existing feature data (down-migration loses it again). `atlas lint` permits destructive changes so it passed migrate-check; prefer a `USING`-cast/data-preserving conversion. Confirm no production routes carried features. +3. **[warn] Ledger entry/transaction tables carry soft-delete against the append-only invariant.** `openmeter/ent/schema/ledger_entry.go` mixes in `TimeMixin` (mutable `deleted_at`) and even indexes `deleted_at IS NULL`, contradicting the documented append-only accounting-source-of-truth invariant. Either drop soft-delete from these double-entry rows or update the documented invariant. +4. **[warn] Customer ILIKE filter prerequisite (pg_trgm GIN) still unmet.** `openmeter/ent/schema/customer.go` ships only btree indexes while the v3 customers list contains-filters compile to leading-wildcard `ILIKE`; if the v3 list handler is live, each contains request runs a full seq scan (+ a COUNT(*) seq scan). Land the pg_trgm GIN custom SQL migration per the standing TODO before exposing the filters. + +### Mechanical Findings (summary) + +- **Dependency annotations (178, warn):** Almost entirely `cmd/*` entrypoints "import X but do not declare it as a dependency" — an artifact of Wire pulling the full graph into each binary's `main`. Largely benign graph-annotation noise, not real inverted dependencies. +- **Pattern divergences (52, warn):** Per-folder convention deviations (e.g. a `watermill/driver` sibling lacking the options-struct-with-`Validate()` shape, `pkg/kafka/metrics` outliers, `test/app` harness-style splits). Mostly informational; worth a glance when touching those folders. +- **Structural outliers (5, info):** `openmeter/billing` (41 files) and `pkg/models` (28 files) flagged as god-folders vs sibling averages; the three `api/client/*` SDK dirs flagged for non-`.md` file mix (expected — generated SDKs). +- **Anti-pattern clusters: 0.** + +### Semantic Duplication + +The mechanical verbosity score (0.1125) only catches exact line clones. The AI pass surfaced confirmed near-duplicates the metric misses: +- **`update_billing.go` ↔ `update_billing_app_data.go`** (v3 customer billing) — same app-type switch + Stripe validation + per-app `CustomerData` build + upsert, reimplemented per endpoint. Canonical fix: one shared billing/customer service method both endpoints delegate to. (Finding #7.) +- **`collect.go` ↔ advance package fan-out** — the `InvoiceCollector.All()` goroutine error-handling block is duplicated verbatim into the advance worker, propagating the same `err`-race bug. Canonical fix: a shared per-customer fan-out helper. (Finding #3.) + +No other broad semantic-duplication clusters were confirmed across the reviewed frontier (879 recently-changed source files). + +## Proposed Rules + +No new rules were synthesized in this resumed run (Step 6 rule synthesis completed in the original run before interruption; `.claude/rules/` already carries 25 enforcement/topic files, and per-folder CLAUDE.md guidance covers the FSM, transaction-aware adapter, logger-injection, and clock conventions that the deep findings above key against). The deep findings map cleanly onto existing rules — they are erosion against documented decisions, not gaps in the rule set. Candidate rule tightening to consider: (a) a grep-guard for `\bslog\.Default\(\)` outside `_test.go`/`main.go`; (b) a guard for adapter methods using `a.db` directly inside a `TransactingRepo`-wrapped struct; (c) a guard for v3 handlers omitting `apierrors.GenericErrorEncoder()`. + +--- + +*Archie is now active. Architecture rules will be enforced on every code change. Run `$archie-deep-scan --incremental` after code changes to update the architecture analysis.* diff --git a/.archie/skeletons.json b/.archie/skeletons.json new file mode 100644 index 0000000000..288a0989a2 --- /dev/null +++ b/.archie/skeletons.json @@ -0,0 +1,356409 @@ +{ + ".codex/agents/archie-analysis.toml": { + "header": "name = \"archie_analysis\"\ndescription = \"Archie analysis worker for scan, deep-scan, and intent-layer subagent tasks.\"\nmodel_reasoning_effort = \"medium\"\nsandbox_mode = \"workspace-write\"\ndeveloper_instructions = \"\"\"\nYou are an Archie workflow worker. Follow the parent prompt exactly, stay within your assigned task, and write the requested artifact to the requested path. Do not modify unrelated source files. Do not paste large artifacts into the conversation after writing them.\n\"\"\"", + "symbols": [], + "line_count": 7 + }, + ".codex/rules/archie.rules": { + "header": "# Archie execpolicy Rules \u2014 auto-approve every shell command the\n# deep-scan / intent-layer / share / viewer workflows invoke,\n# so the user is not prompted mid-run. Generated by\n# CodexConnector.finalize() at install time from\n# archie/manifest_data.py COMMAND_RULES + install._STANDALONE_SCRIPTS.\n# Format: developers.openai.com/codex/rules\n#\n# Most-restrictive-wins (forbidden > prompt > allow), so any\n# stricter user rule in this project still takes precedence over\n# the entries below.\n\nprefix_rule(\n pattern = [\"python3\", \".archie/scanner.py\"],\n decision = \"allow\",\n justification = \"Run Archie's scanner.py\",\n match = [\n \"python3 .archie/scanner.py\",\n \"python3 .archie/scanner.py \\\"$PROJECT_ROOT\\\"\",\n ],\n)", + "symbols": [], + "line_count": 472 + }, + ".dockerignore": { + "header": ".direnv/\n.devenv/\n.github/\nbin/\nbuild/\nci/\ndeploy/\nDockerfile\ndocs/\ne2e/\netc/\nexamples/\nquickstart/\ntmp/", + "symbols": [], + "line_count": 14 + }, + ".editorconfig": { + "header": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.nix]\nindent_size = 2\n\n[{Makefile,*.mk}]\nindent_style = tab\n\n[*{.js,.jsx,.ts,.tsx,.json,.yaml,.yml,.html,.css,.md,.tsp,.hcl}]\nindent_size = 2\n\n[{*.go,go.mod,go.sum,go.work,go.work.sum}]", + "symbols": [], + "line_count": 21 + }, + ".gitignore": { + "header": "/.devenv/\n/.direnv/\n/.env.local\n/.pre-commit-config.yaml\n/build/\n/config.yaml\n/tmp/\n\n.tmp.*\n\n.DS_Store\n\n# Go workspace file\ngo.work\ngo.work.sum\n\n__debug_bin*\n\nopenmeter.log\n", + "symbols": [], + "line_count": 47 + }, + "AGENTS.md": { + "header": "# OpenMeter\n\nOpenMeter is a usage metering and billing platform for AI and DevTool companies, built in Go.\n\n## Quick Reference\n\nUse the `Makefile` for all common tasks. A `justfile` also exists but is seldom used.\nOpenMeter is a metering and billing platform with usage based pricing and access control.\n\n## Tips for working with the codebase\n\nIf during your work anything confuses you or something isn't trivial for you, please augment AGENTS.md with your findings so next time it will be easier for you. AGENTS.md files are for you to edit and update as you go so you can interact with the codebase the most effectively.\n\nDevelopment commands are run via `Makefile`, it contains all commonly used commands during development. A `justfile` is also present but seldom used. Use the Makefile commands for common tasks like running tests, generating code, linting, etc.\nThe committed `.nvmrc` is the GitHub Actions source of truth for Node-based jobs on GitHub-hosted runners. Keep it aligned with the Nix `.#ci` shell's `node -v`; `flake.nix` refreshes it in `enterShell`, and CI validates the file against the Nix shell before running builds.\n\n## AGENTS.md maintenance\n\n- Treat this file as long-lived project guidance for all agents and contributors.\n- Prefer durable wording over time-based wording (avoid labels like \"recent\", \"latest\", \"today\").", + "symbols": [], + "line_count": 312 + }, + "CLAUDE.md": { + "header": "# OpenMeter Development Guide\n\nSee consolidated agents instructions in @AGENTS.md", + "symbols": [], + "line_count": 3 + }, + "CODE_OF_CONDUCT.md": { + "header": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment,\nwe as contributors and maintainers pledge to make participation in our project\nand our community a harassment-free experience for everyone, regardless of age,\nbody size, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal appearance,\nrace, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n- Using welcoming and inclusive language\n- Being respectful of differing viewpoints and experiences\n- Gracefully accepting constructive criticism\n- Focusing on what is best for the community\n- Showing empathy towards other community members", + "symbols": [], + "line_count": 68 + }, + "CONTRIBUTING.md": { + "header": "# Contributing\n\nThanks for your interest in contributing to OpenMeter!\n\nHere are a few general guidelines on contributing and reporting bugs that we ask you to review.\nFollowing these guidelines helps to communicate that you respect the time of the contributors managing and developing this open source project.\nIn return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.\nIn that spirit of mutual respect, we endeavor to review incoming issues and pull requests within 10 days,\nand will close any lingering issues or pull requests after 60 days of inactivity.\n\nPlease note that all of your interactions in the project are subject to our [Code of Conduct](/CODE_OF_CONDUCT.md).\nThis includes creation of issues or pull requests, commenting on issues or pull requests,\nand extends to all interactions in any real-time space e.g., Slack, Discord, etc.\n\n## Reporting issues\n\nBefore reporting a new issue, please ensure that the issue was not already reported or fixed by searching through our issue tracker.\n\nWhen creating a new issue, please be sure to include a **title and clear description**, as much relevant information as possible, and, if possible, a test case.\n", + "symbols": [], + "line_count": 53 + }, + "Dockerfile": { + "header": "FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0@sha256:c64defb9ed5a91eacb37f96ccc3d4cd72521c4bd18d5442905b95e2226b0e707 AS xx\n\nFROM --platform=$BUILDPLATFORM golang:1.26.3-alpine3.23@sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d AS builder\n\nCOPY --link --from=xx / /\n\nRUN xx-apk add --update --no-cache ca-certificates make git curl clang lld\n\nARG TARGETPLATFORM\n\nRUN xx-apk --update --no-cache add musl-dev gcc\n\nWORKDIR /src\n\nARG GOPROXY\n\nENV CGO_ENABLED=1\n\nENV GOCACHE=/go/cache\nENV GOMODCACHE=/go/pkg/mod", + "symbols": [], + "line_count": 95 + }, + "LICENSE": { + "header": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or", + "symbols": [], + "line_count": 202 + }, + "Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\nROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))\n\n# Docker-local svix secret, only used for testing\nSVIX_JWT_SECRET = DUMMY_JWT_SECRET\n\n# dynamic forces confluent-kafka-go to build against local librdkafka\nGO_BUILD_FLAGS = -tags=dynamic\nGO_TEST_PACKAGE_PARALLELISM ?= 128\nGO_TEST_FLAGS = -p ${GO_TEST_PACKAGE_PARALLELISM} -parallel 16 ${GO_BUILD_FLAGS}\nGO_LINT_PATH ?= ./...\n\n.PHONY: up\nup: ## Start the dependencies via docker compose. `export COMPOSE_PROFILES=dev,redis,...`\n\t$(call print-target)\n\tdocker compose up -d\n\n.PHONY: down\ndown: ## Stop the dependencies via docker compose", + "symbols": [], + "line_count": 340 + }, + "README.md": { + "header": "
\n\n![OpenMeter logo](assets/logo.png)\n\n# OpenMeter\n\nThe open-source metering and billing platform\nfor AI, agentic and DevTool monetization.\n\n[Docs](https://openmeter.io/docs) |\n[Hosted](https://cloud.konghq.com/register?utm_campaign=metering_and_billing) |\n[Blog](https://openmeter.io/blog) |\n[Contributing](CONTRIBUTING.md)\n\n[![GitHub Release](https://img.shields.io/github/v/release/openmeterio/openmeter?style=flat-square)](https://github.com/openmeterio/openmeter/releases/latest)\n[![CI Status](https://img.shields.io/github/actions/workflow/status/openmeterio/openmeter/ci.yaml?style=flat-square)](https://github.com/openmeterio/openmeter/actions/workflows/ci.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/openmeterio/openmeter?style=flat-square)](https://goreportcard.com/report/github.com/openmeterio/openmeter)\n![GitHub Stars](https://img.shields.io/github/stars/openmeterio/openmeter?style=flat-square)\n\n
", + "symbols": [], + "line_count": 157 + }, + "SECURITY.md": { + "header": "# Security Policies and Procedures\n\nThis document outlines security procedures and general policies for OpenMeter.\n\n- [Reporting a vulnerability](#reporting-a-vulnerability)\n- [Disclosure policy](#disclosure-policy)\n\n## Reporting a vulnerability\n\nThe OpenMeter team and community take all security issues seriously. Thank you for improving the security of our projects.\nWe appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.\n\n**Report security issues using GitHub's [vulnerability reporting feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability).**\n\n_Alternatively, you can send an email to `security@openmeter.io`._\n\nSomebody from the OpenMeter team will acknowledge your report within 48 hours,\nand will follow up with a more detailed response after that indicating the next steps in handling your report.\nAfter the initial reply to your report, the team will endeavor to keep you informed of the progress towards a fix and full announcement,\nand may ask for additional information or guidance.", + "symbols": [], + "line_count": 29 + }, + "api/api.go": { + "header": "", + "symbols": [], + "line_count": 2 + }, + "api/client/go/README.md": { + "header": "# OpenMeter Go SDK\n\n## Install\n\n```sh\ngo get github.com/openmeterio/openmeter/api/client/go@v1.0.0-beta.53\n```\n\n## Usage\n\nInitialize client.\n\n```go\nimport (\n cloudevents \"github.com/cloudevents/sdk-go/v2/event\"\n om \"github.com/openmeterio/openmeter/api/client/go\"\n)\n\nfunc main() {\n // Initialize OpenMeter client", + "symbols": [], + "line_count": 65 + }, + "api/client/go/client.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewAuthClientWithResponses", + "signature": "func NewAuthClientWithResponses(server string, apiSecret string, opts ...ClientOption) (*ClientWithResponses, error)", + "line": 10 + }, + { + "kind": "func", + "name": "NewAuthClient", + "signature": "func NewAuthClient(server string, apiSecret string, opts ...ClientOption) (*Client, error)", + "line": 20 + }, + { + "kind": "func", + "name": "IngestEvent", + "signature": "func (c *Client) IngestEvent(ctx context.Context, event Event, reqEditors ...RequestEditorFn) (*http.Response, error)", + "line": 31 + }, + { + "kind": "func", + "name": "IngestEventBatch", + "signature": "func (c *Client) IngestEventBatch(ctx context.Context, events []Event, reqEditors ...RequestEditorFn) (*http.Response, error)", + "line": 36 + }, + { + "kind": "func", + "name": "IngestEventWithResponse", + "signature": "func (c *ClientWithResponses) IngestEventWithResponse(ctx context.Context, event Event, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)", + "line": 41 + }, + { + "kind": "func", + "name": "IngestEventBatchWithResponse", + "signature": "func (c *ClientWithResponses) IngestEventBatchWithResponse(ctx context.Context, events []Event, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)", + "line": 46 + } + ], + "line_count": 48 + }, + "api/client/go/client_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "TestIngest", + "signature": "func TestIngest(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestIngestBatch", + "signature": "func TestIngestBatch(t *testing.T)", + "line": 41 + }, + { + "kind": "func", + "name": "TetsListEvents", + "signature": "func TetsListEvents(t *testing.T)", + "line": 64 + }, + { + "kind": "func", + "name": "TestAuth", + "signature": "func TestAuth(t *testing.T)", + "line": 93 + }, + { + "kind": "func", + "name": "TestGetMeter", + "signature": "func TestGetMeter(t *testing.T)", + "line": 117 + }, + { + "kind": "func", + "name": "TestListMeters", + "signature": "func TestListMeters(t *testing.T)", + "line": 152 + }, + { + "kind": "func", + "name": "TestMeterQuery", + "signature": "func TestMeterQuery(t *testing.T)", + "line": 196 + }, + { + "kind": "func", + "name": "TestListSubjects", + "signature": "func TestListSubjects(t *testing.T)", + "line": 238 + }, + { + "kind": "func", + "name": "TestUpsertSubject", + "signature": "func TestUpsertSubject(t *testing.T)", + "line": 276 + }, + { + "kind": "func", + "name": "mockEvent", + "signature": "func mockEvent() cloudevents.Event", + "line": 314 + } + ], + "line_count": 327 + }, + "api/client/go/codegen.yaml": { + "header": "# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json\npackage: openmeter\ngenerate:\n client: true\n models: true\n embedded-spec: true\ncompatibility:\n # See: https://github.com/oapi-codegen/oapi-codegen/issues/778\n disable-required-readonly-as-pointer: true\n always-prefix-enum-values: true\noutput: ./client.gen.go", + "symbols": [], + "line_count": 11 + }, + "api/client/go/error.go": { + "header": "type ErrResponse struct {\n\tErr error `json:\"-\"` // low-level runtime error\n\tStatusCode int `json:\"statusCode\"` // http response status code", + "symbols": [ + { + "kind": "struct", + "name": "ErrResponse", + "signature": "type ErrResponse struct", + "line": 7 + } + ], + "line_count": 14 + }, + "api/client/javascript/.gitignore": { + "header": "# dot-files (.env, .git, ...)\n\n# logs\nlogs\n*.log\nnpm-debug.log*\n\n# dependency directory\n# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git\nnode_modules\n\n# editor\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json\n!.vscode/*.code-snippets\n\n# build", + "symbols": [], + "line_count": 23 + }, + "api/client/javascript/Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\n.PHONY: generate\ngenerate: ## Generate JavaScript SDK\n\t$(call print-target)\n\tpnpm --frozen-lockfile install\n\tpnpm run generate\n\tpnpm build\n\tpnpm test\n\n.PHONY: publish-javascript-sdk\npublish-javascript-sdk: ## Publish JavaScript SDK\n\t$(call print-target)\n\t@if [ -z \"$$JS_SDK_RELEASE_VERSION\" ]; then \\\n\t\techo \"ERROR: JS_SDK_RELEASE_VERSION is required\"; \\\n\t\techo \"Usage: JS_SDK_RELEASE_VERSION=1.2.3 make publish-javascript-sdk [JS_SDK_RELEASE_TAG=beta]\"; \\\n\t\texit 1; \\\n\tfi\n\n\t@if [ -z \"$$JS_SDK_RELEASE_TAG\" ]; then \\", + "symbols": [], + "line_count": 42 + }, + "api/client/javascript/README.md": { + "header": "# OpenMeter JavaScript SDK\n\n## Install\n\n```sh\nnpm install --save @openmeter/sdk\n```\n\n## Configuration for accessing the OpenMeter API\n\nTo use the OpenMeter SDK on your backend, you need to configure `baseUrl` and `apiKey` for OpenMeter Cloud:\n\n```ts\nimport { OpenMeter } from '@openmeter/sdk'\n\nconst openmeter = new OpenMeter({\n baseUrl: 'https://openmeter.cloud',\n apiKey: 'om_...',\n})\n```", + "symbols": [], + "line_count": 267 + }, + "api/client/javascript/biome.json": { + "header": "{\n \"$schema\": \"./node_modules/@biomejs/biome/configuration_schema.json\",\n \"assist\": {\n \"actions\": {\n \"source\": {\n \"organizeImports\": \"on\",\n \"useSortedKeys\": \"on\"\n }\n }\n },\n \"files\": {\n \"ignoreUnknown\": false,\n \"includes\": [\"**\"],\n \"maxSize\": 20000000\n },\n \"formatter\": {\n \"enabled\": true,\n \"indentStyle\": \"space\",\n \"useEditorconfig\": true\n },", + "symbols": [], + "line_count": 67 + }, + "api/client/javascript/index.ts": { + "header": "export * from './src/client/index.js'", + "symbols": [], + "line_count": 1 + }, + "api/client/javascript/orval.config.ts": { + "header": "export default defineConfig({\n openmeter: {\n input: {", + "symbols": [], + "line_count": 38 + }, + "api/client/javascript/package.json": { + "header": "{\n \"name\": \"@openmeter/sdk\",\n \"version\": \"0.0.0\",\n \"description\": \"Client for OpenMeter: Real-Time and Scalable Usage Metering\",\n \"license\": \"Apache 2.0\",\n \"homepage\": \"https://openmeter.io\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/openmeterio/openmeter.git\",\n \"directory\": \"api/client/javascript\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },", + "symbols": [], + "line_count": 112 + }, + "api/client/javascript/pnpm-lock.yaml": { + "header": "lockfileVersion: '9.0'\n\nsettings:\n autoInstallPeers: true\n excludeLinksFromLockfile: false\n\noverrides:\n vite@>=7.0.0 <=7.3.1: '>=7.3.2'\n vite@>=7.1.0 <=7.3.1: '>=7.3.2'\n\npatchedDependencies:\n openapi-typescript:\n hash: 0e016926efaca4cd6909b2bf6c9b2f03eb66a5084b7bdbf10313eeee90793e01\n path: patches/openapi-typescript.patch\n\nimporters:\n\n .:\n dependencies:\n openapi-fetch:", + "symbols": [], + "line_count": 3308 + }, + "api/client/javascript/pnpm-workspace.yaml": { + "header": "blockExoticSubdeps: true\nminimumReleaseAge: 4320\ntrustPolicy: no-downgrade", + "symbols": [], + "line_count": 3 + }, + "api/client/javascript/scripts/add-as-const.ts": { + "header": "const file = new URL('../src/zod/index.ts', import.meta.url)\nconst src = readFileSync(file, 'utf8')\nconst fixed = src.replace(", + "symbols": [ + { + "kind": "func", + "name": "file", + "signature": "const file =", + "line": 10 + }, + { + "kind": "func", + "name": "src", + "signature": "const src =", + "line": 11 + }, + { + "kind": "func", + "name": "fixed", + "signature": "const fixed =", + "line": 12 + } + ], + "line_count": 16 + }, + "api/client/javascript/scripts/generate.ts": { + "header": "const DATE = factory.createTypeReferenceNode(factory.createIdentifier('Date')) // `Date`\nconst NULL = factory.createLiteralTypeNode(factory.createNull()) // `null`\nconst STRING = factory.createKeywordTypeNode(SyntaxKind.StringKeyword) // `string`", + "symbols": [ + { + "kind": "func", + "name": "DATE", + "signature": "const DATE =", + "line": 5 + }, + { + "kind": "func", + "name": "NULL", + "signature": "const NULL =", + "line": 6 + }, + { + "kind": "func", + "name": "STRING", + "signature": "const STRING =", + "line": 7 + }, + { + "kind": "func", + "name": "schema", + "signature": "const schema =", + "line": 9 + }, + { + "kind": "func", + "name": "ast", + "signature": "const ast =", + "line": 11 + }, + { + "kind": "func", + "name": "contents", + "signature": "const contents =", + "line": 49 + } + ], + "line_count": 51 + }, + "api/client/javascript/src/client/addons.ts": { + "header": "export class Addons {\n constructor(private client: Client) {}\n public async create(addon: AddonCreate, options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Addons", + "signature": "export class Addons", + "line": 6 + } + ], + "line_count": 122 + }, + "api/client/javascript/src/client/apps.ts": { + "header": " AppReplaceUpdate,\n CreateStripeCheckoutSessionRequest,\n operations,", + "symbols": [ + { + "kind": "class", + "name": "Apps", + "signature": "export class Apps", + "line": 15 + }, + { + "kind": "class", + "name": "AppMarketplace", + "signature": "export class AppMarketplace", + "line": 106 + }, + { + "kind": "class", + "name": "AppStripe", + "signature": "export class AppStripe", + "line": 214 + }, + { + "kind": "class", + "name": "AppCustomInvoicing", + "signature": "export class AppCustomInvoicing", + "line": 261 + } + ], + "line_count": 335 + }, + "api/client/javascript/src/client/billing.ts": { + "header": " BillingProfileCreate,\n BillingProfileCustomerOverrideCreate,\n BillingProfileReplaceUpdateWithWorkflow,", + "symbols": [ + { + "kind": "class", + "name": "Billing", + "signature": "export class Billing", + "line": 18 + }, + { + "kind": "class", + "name": "BillingProfiles", + "signature": "export class BillingProfiles", + "line": 33 + }, + { + "kind": "class", + "name": "BillingInvoices", + "signature": "export class BillingInvoices", + "line": 141 + }, + { + "kind": "class", + "name": "BillingCustomers", + "signature": "export class BillingCustomers", + "line": 439 + } + ], + "line_count": 525 + }, + "api/client/javascript/src/client/common.ts": { + "header": "export type RequestOptions = Pick\nexport class HTTPError extends Error {\n public name = 'HTTPError'", + "symbols": [ + { + "kind": "type", + "name": "RequestOptions", + "signature": "export type RequestOptions =", + "line": 6 + }, + { + "kind": "class", + "name": "HTTPError", + "signature": "export class HTTPError extends Error", + "line": 11 + }, + { + "kind": "func", + "name": "isHTTPError", + "signature": "export function isHTTPError(error: unknown)", + "line": 64 + } + ], + "line_count": 66 + }, + "api/client/javascript/src/client/customers.ts": { + "header": " CreateStripeCustomerPortalSessionParams,\n CustomerAppData,\n CustomerCreate,", + "symbols": [ + { + "kind": "class", + "name": "Customers", + "signature": "export class Customers", + "line": 18 + }, + { + "kind": "class", + "name": "CustomerApps", + "signature": "export class CustomerApps", + "line": 190 + }, + { + "kind": "class", + "name": "CustomerStripe", + "signature": "export class CustomerStripe", + "line": 275 + }, + { + "kind": "class", + "name": "CustomerEntitlements", + "signature": "export class CustomerEntitlements", + "line": 362 + }, + { + "kind": "class", + "name": "CustomerEntitlementsV2", + "signature": "export class CustomerEntitlementsV2", + "line": 392 + } + ], + "line_count": 672 + }, + "api/client/javascript/src/client/debug.ts": { + "header": "export class Debug {\n constructor(private client: Client) {}\n public async getMetrics(options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Debug", + "signature": "export class Debug", + "line": 9 + } + ], + "line_count": 25 + }, + "api/client/javascript/src/client/entitlements.ts": { + "header": " Entitlement,\n EntitlementCreateInputs,\n EntitlementGrantCreateInput,", + "symbols": [ + { + "kind": "class", + "name": "Entitlements", + "signature": "export class Entitlements", + "line": 17 + }, + { + "kind": "class", + "name": "Grants", + "signature": "export class Grants", + "line": 271 + }, + { + "kind": "class", + "name": "EntitlementsV2", + "signature": "export class EntitlementsV2", + "line": 390 + }, + { + "kind": "class", + "name": "GrantsV2", + "signature": "export class GrantsV2", + "line": 443 + } + ], + "line_count": 493 + }, + "api/client/javascript/src/client/events.spec.ts": { + "header": "interface Context {\n baseUrl: string\n client: OpenMeter", + "symbols": [ + { + "kind": "interface", + "name": "Context", + "signature": "interface Context", + "line": 6 + } + ], + "line_count": 110 + }, + "api/client/javascript/src/client/events.ts": { + "header": "export class Events {\n constructor(private client: Client) {}\n public async ingest(events: Event | Event[], options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Events", + "signature": "export class Events", + "line": 10 + }, + { + "kind": "func", + "name": "setDefaultsForEvent", + "signature": "export async function setDefaultsForEvent(ev: Event)", + "line": 78 + }, + { + "kind": "func", + "name": "loadUUIDProvider", + "signature": "async function loadUUIDProvider()", + "line": 91 + }, + { + "kind": "func", + "name": "generateId", + "signature": "async function generateId()", + "line": 114 + } + ], + "line_count": 131 + }, + "api/client/javascript/src/client/features.ts": { + "header": " Feature,\n FeatureCreateInputs,\n operations,", + "symbols": [ + { + "kind": "class", + "name": "Features", + "signature": "export class Features", + "line": 15 + } + ], + "line_count": 99 + }, + "api/client/javascript/src/client/index.ts": { + "header": " type Client,\n type ClientOptions,\n createQuerySerializer,", + "symbols": [ + { + "kind": "type", + "name": "Config", + "signature": "export type Config =", + "line": 31 + }, + { + "kind": "class", + "name": "OpenMeter", + "signature": "export class OpenMeter", + "line": 48 + } + ], + "line_count": 107 + }, + "api/client/javascript/src/client/info.ts": { + "header": "export class Info {\n constructor(private client: Client) {}\n public async listCurrencies(options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Info", + "signature": "export class Info", + "line": 9 + } + ], + "line_count": 45 + }, + "api/client/javascript/src/client/meters.ts": { + "header": "export class Meters {\n constructor(private client: Client) {}\n public async create(meter: MeterCreate, options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Meters", + "signature": "export class Meters", + "line": 10 + } + ], + "line_count": 203 + }, + "api/client/javascript/src/client/notifications.ts": { + "header": " NotificationChannel,\n NotificationRuleCreateRequest,\n operations,", + "symbols": [ + { + "kind": "class", + "name": "Notifications", + "signature": "export class Notifications", + "line": 15 + }, + { + "kind": "class", + "name": "NotificationChannels", + "signature": "export class NotificationChannels", + "line": 31 + }, + { + "kind": "class", + "name": "NotificationRules", + "signature": "export class NotificationRules", + "line": 155 + }, + { + "kind": "class", + "name": "NotificationEvents", + "signature": "export class NotificationEvents", + "line": 273 + } + ], + "line_count": 349 + }, + "api/client/javascript/src/client/plans.ts": { + "header": " operations,\n PlanCreate,\n PlanReplaceUpdate,", + "symbols": [ + { + "kind": "class", + "name": "Plans", + "signature": "export class Plans", + "line": 15 + }, + { + "kind": "class", + "name": "PlanAddons", + "signature": "export class PlanAddons", + "line": 158 + } + ], + "line_count": 278 + }, + "api/client/javascript/src/client/portal.ts": { + "header": "export class Portal {\n constructor(private client: Client) {}\n public async create(body: PortalToken, options?: RequestOptions) {", + "symbols": [ + { + "kind": "class", + "name": "Portal", + "signature": "export class Portal", + "line": 10 + } + ], + "line_count": 63 + }, + "api/client/javascript/src/client/subjects.ts": { + "header": "export class Subjects {\n constructor(private client: Client) {}\n public async upsert(", + "symbols": [ + { + "kind": "class", + "name": "Subjects", + "signature": "export class Subjects", + "line": 10 + } + ], + "line_count": 89 + }, + "api/client/javascript/src/client/subscription-addons.ts": { + "header": "export class SubscriptionAddons {\n constructor(private client: Client) {}\n public async create(", + "symbols": [ + { + "kind": "class", + "name": "SubscriptionAddons", + "signature": "export class SubscriptionAddons", + "line": 6 + } + ], + "line_count": 99 + }, + "api/client/javascript/src/client/subscriptions.ts": { + "header": " operations,\n paths,\n SubscriptionChange,", + "symbols": [ + { + "kind": "class", + "name": "Subscriptions", + "signature": "export class Subscriptions", + "line": 15 + } + ], + "line_count": 196 + }, + "api/client/javascript/src/client/utils.ts": { + "header": " MediaType,\n ResponseObjectMap,\n SuccessResponse,", + "symbols": [ + { + "kind": "func", + "name": "ISODateFormat", + "signature": "const ISODateFormat =", + "line": 35 + }, + { + "kind": "func", + "name": "isIsoDateString", + "signature": "export function isIsoDateString(value: unknown)", + "line": 38 + } + ], + "line_count": 90 + }, + "api/client/javascript/src/portal/index.ts": { + "header": "export type Config = Pick<\n ClientOptions,\n 'baseUrl' | 'headers' | 'fetch' | 'Request' | 'requestInitExt'", + "symbols": [ + { + "kind": "type", + "name": "Config", + "signature": "export type Config =", + "line": 10 + }, + { + "kind": "class", + "name": "OpenMeter", + "signature": "export class OpenMeter", + "line": 21 + } + ], + "line_count": 91 + }, + "api/client/javascript/src/react/context.tsx": { + "header": "'use client'\nexport * from '../portal/index.js'\nexport const OpenMeterContext = createContext(null)", + "symbols": [ + { + "kind": "func", + "name": "OpenMeterContext", + "signature": "export const OpenMeterContext =", + "line": 8 + }, + { + "kind": "type", + "name": "OpenMeterProviderProps", + "signature": "export type OpenMeterProviderProps =", + "line": 10 + }, + { + "kind": "func", + "name": "OpenMeterProvider", + "signature": "export function OpenMeterProvider({ children, value }: OpenMeterProviderProps)", + "line": 15 + }, + { + "kind": "func", + "name": "useOpenMeter", + "signature": "export function useOpenMeter()", + "line": 23 + } + ], + "line_count": 30 + }, + "api/client/javascript/tsconfig.json": { + "header": "{\n \"compilerOptions\": {\n \"allowJs\": true,\n \"allowSyntheticDefaultImports\": true,\n \"declaration\": true,\n \"emitDecoratorMetadata\": true,\n \"esModuleInterop\": true,\n \"experimentalDecorators\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"incremental\": true,\n \"jsx\": \"react-jsx\",\n \"lib\": [\"esnext\"],\n \"module\": \"NodeNext\",\n \"moduleResolution\": \"nodenext\",\n \"outDir\": \"./dist\",\n \"skipLibCheck\": true,\n \"sourceMap\": true,\n \"strict\": true,\n \"target\": \"ESNext\"\n },", + "symbols": [], + "line_count": 29 + }, + "api/client/javascript/vitest.config.ts": { + "header": "export default defineConfig({\n test: {},\n})", + "symbols": [], + "line_count": 5 + }, + "api/client/node/README.md": { + "header": "# OpenMeter Node SDK\n\nMoved to fetch based client in [JavaScript SDK](../javascript)", + "symbols": [], + "line_count": 3 + }, + "api/client/python/.gitignore": { + "header": "# python\n# Packaging\n*.egg-info/\n*.egg\n*.eggs/\ndist/\nbuild/\nCHANGELOG.md\n\n# Python cache\n__pycache__/\n*.pyc\n*.pyo\n*.pyd\n\n# Virtual envs\n.python-version\n.venv/\nvenv/", + "symbols": [], + "line_count": 19 + }, + "api/client/python/MANIFEST.in": { + "header": "include *.md\ninclude LICENSE\ninclude openmeter/py.typed\nrecursive-include tests *.py\nrecursive-include samples *.py *.md", + "symbols": [], + "line_count": 5 + }, + "api/client/python/Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\n.PHONY: publish-python-sdk\npublish-python-sdk: ## Publish Python SDK\n\t$(call print-target)\n\t./scripts/release.sh\n\n.PHONY: help\n.DEFAULT_GOAL := help\nhelp:\n\t@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-30s\\033[0m %s\\n\", $$1, $$2}'\n\n# Variable outputting/exporting rules\nvar-%: ; @echo $($*)\nvarexport-%: ; @echo $*=$($*)\n\ndefine print-target\n @printf \"Executing target: \\033[36m$@\\033[0m\\n\"\nendef", + "symbols": [], + "line_count": 19 + }, + "api/client/python/README.md": { + "header": "# OpenMeter Python SDK\n\n[On PyPI](https://pypi.org/project/openmeter)\n\nThis package is generated by `@typespec/http-client-python` with Typespec.\n\n## Prerequisites\n\n- Python 3.9 or later is required to use this package.\n\n## Install\n\n> The Python SDK is in preview mode.\n\n```sh\npip install --pre openmeter\n# or using an exact version\npip install openmeter==1.0.0bXXX\n```\n", + "symbols": [], + "line_count": 329 + }, + "api/client/python/examples/README.md": { + "header": "# Examples\n\n## Setup\n\nInstall dependencies\n\n```sh\npoetry install\n```\n\n## Running Examples\n\nRun any example with environment variables:\n\n```sh\nOPENMETER_ENDPOINT=https://openmeter.cloud \\\nOPENMETER_TOKEN=om_xxx \\\npoetry run python ./sync/ingest.py\n```\n", + "symbols": [], + "line_count": 29 + }, + "api/client/python/examples/async/customer.py": { + "header": " CustomerCreate,\n CustomerReplaceUpdate,\n CustomerUsageAttribution,", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "async def main() -> None", + "line": 18 + } + ], + "line_count": 77 + }, + "api/client/python/examples/async/entitlement.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\ncustomer_key: str = environ.get(\"OPENMETER_CUSTOMER_KEY\") or \"acme-corp-1\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "async def main() -> None", + "line": 12 + } + ], + "line_count": 88 + }, + "api/client/python/examples/async/ingest.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\nasync def main() -> None:", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "async def main() -> None", + "line": 13 + } + ], + "line_count": 43 + }, + "api/client/python/examples/async/query.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\nasync def main() -> None:", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "async def main() -> None", + "line": 11 + } + ], + "line_count": 48 + }, + "api/client/python/examples/async/subscription.py": { + "header": " Metadata,\n PlanSubscriptionCreate,\n PlanReferenceInput,", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "async def main() -> None", + "line": 18 + } + ], + "line_count": 74 + }, + "api/client/python/examples/pyproject.toml": { + "header": "[tool.poetry]\nname = \"openmeter-examples\"\nversion = \"0.0.0\"\ndescription = \"OpenMeter examples\"\npackage-mode = false\n\n[tool.poetry.dependencies]\npython = \"^3.9\"\nopenmeter = { path = \"..\", develop = true }\n\n[tool.poetry.group.dev.dependencies]\npyright = \"^1.1.407\"\n\n[build-system]\nrequires = [\"poetry-core>=1.0.0\"]\nbuild-backend = \"poetry.core.masonry.api\"", + "symbols": [], + "line_count": 16 + }, + "api/client/python/examples/pyrightconfig.json": { + "header": "{\n \"include\": [\"async\", \"sync\"],\n \"typeCheckingMode\": \"basic\"\n}", + "symbols": [], + "line_count": 4 + }, + "api/client/python/examples/sync/customer.py": { + "header": " CustomerCreate,\n CustomerReplaceUpdate,\n CustomerUsageAttribution,", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "def main() -> None", + "line": 22 + } + ], + "line_count": 77 + }, + "api/client/python/examples/sync/entitlement.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\ncustomer_key: str = environ.get(\"OPENMETER_CUSTOMER_KEY\") or \"acme-corp-1\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "def main() -> None", + "line": 16 + } + ], + "line_count": 86 + }, + "api/client/python/examples/sync/ingest.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\nclient = Client(", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "def main() -> None", + "line": 18 + } + ], + "line_count": 44 + }, + "api/client/python/examples/sync/query.py": { + "header": "ENDPOINT: str = environ.get(\"OPENMETER_ENDPOINT\") or \"https://openmeter.cloud\"\ntoken: Optional[str] = environ.get(\"OPENMETER_TOKEN\")\nclient = Client(", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "def main() -> None", + "line": 15 + } + ], + "line_count": 48 + }, + "api/client/python/examples/sync/subscription.py": { + "header": " Metadata,\n PlanSubscriptionCreate,\n PlanReferenceInput,", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "def main() -> None", + "line": 22 + } + ], + "line_count": 74 + }, + "api/client/python/openmeter/__init__.py": { + "header": "__path__ = __import__(\"pkgutil\").extend_path(__path__, __name__) # type: ignore", + "symbols": [], + "line_count": 1 + }, + "api/client/python/openmeter/_client.py": { + "header": "class Client(OpenMeterClient):\n def __init__(\n self,", + "symbols": [ + { + "kind": "class", + "name": "Client", + "signature": "class Client(OpenMeterClient)", + "line": 10 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(\n self,\n endpoint: str = \"https://openmeter.cloud\",\n token: Optional[str] = None,\n **kwargs: Any,\n ) -> None", + "line": 13 + }, + { + "kind": "func", + "name": "__enter__", + "signature": "def __enter__(self) -> Self", + "line": 26 + }, + { + "kind": "func", + "name": "__exit__", + "signature": "def __exit__(self, *exc_details: Any) -> None", + "line": 29 + } + ], + "line_count": 31 + }, + "api/client/python/openmeter/_commit.py": { + "header": "COMMIT = \"000000000000\"", + "symbols": [], + "line_count": 3 + }, + "api/client/python/openmeter/_generated/__init__.py": { + "header": "if TYPE_CHECKING:\n from ._patch import * # pylint: disable=unused-wildcard-import\n__version__ = VERSION", + "symbols": [], + "line_count": 26 + }, + "api/client/python/openmeter/_generated/_client.py": { + "header": " AddonsOperations,\n AppCustomInvoicingOperations,\n AppStripeOperations,", + "symbols": [ + { + "kind": "class", + "name": "OpenMeterClient", + "signature": "class OpenMeterClient", + "line": 51 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__( # pylint: disable=missing-client-constructor-parameter-credential\n self, *, endpoint: str = \"https://127.0.0.1\", **kwargs: Any\n ) -> None", + "line": 136 + }, + { + "kind": "func", + "name": "send_request", + "signature": "def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse", + "line": 219 + }, + { + "kind": "func", + "name": "close", + "signature": "def close(self) -> None", + "line": 245 + }, + { + "kind": "func", + "name": "__enter__", + "signature": "def __enter__(self) -> Self", + "line": 248 + }, + { + "kind": "func", + "name": "__exit__", + "signature": "def __exit__(self, *exc_details: Any) -> None", + "line": 252 + } + ], + "line_count": 254 + }, + "api/client/python/openmeter/_generated/_configuration.py": { + "header": "class OpenMeterClientConfiguration:\n \"\"\"Configuration for OpenMeterClient.\n Note that all parameters used to create this instance are saved as instance", + "symbols": [ + { + "kind": "class", + "name": "OpenMeterClientConfiguration", + "signature": "class OpenMeterClientConfiguration", + "line": 8 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, endpoint: str = \"https://127.0.0.1\", **kwargs: Any) -> None", + "line": 19 + }, + { + "kind": "func", + "name": "_configure", + "signature": "def _configure(self, **kwargs: Any) -> None", + "line": 26 + } + ], + "line_count": 33 + }, + "api/client/python/openmeter/_generated/_patch.py": { + "header": "\"\"\"Customize generated code here.\nFollow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize\n\"\"\"", + "symbols": [ + { + "kind": "func", + "name": "patch_sdk", + "signature": "def patch_sdk()", + "line": 9 + } + ], + "line_count": 17 + }, + "api/client/python/openmeter/_generated/_types.py": { + "header": "if TYPE_CHECKING:\n from . import models as _models\nApp = Union[\"_models.StripeApp\", \"_models.SandboxApp\", \"_models.CustomInvoicingApp\"]", + "symbols": [], + "line_count": 89 + }, + "api/client/python/openmeter/_generated/_utils/__init__.py": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "api/client/python/openmeter/_generated/_utils/model_base.py": { + "header": "_LOGGER = logging.getLogger(__name__)\n__all__ = [\"SdkJSONEncoder\", \"Model\", \"rest_field\", \"rest_discriminator\"]\nTZ_UTC = timezone.utc", + "symbols": [ + { + "kind": "func", + "name": "_timedelta_as_isostr", + "signature": "def _timedelta_as_isostr(td: timedelta) -> str", + "line": 35 + }, + { + "kind": "func", + "name": "_serialize_bytes", + "signature": "def _serialize_bytes(o, format: typing.Optional[str] = None) -> str", + "line": 92 + }, + { + "kind": "func", + "name": "_serialize_datetime", + "signature": "def _serialize_datetime(o, format: typing.Optional[str] = None)", + "line": 99 + }, + { + "kind": "func", + "name": "_is_readonly", + "signature": "def _is_readonly(p)", + "line": 117 + }, + { + "kind": "class", + "name": "SdkJSONEncoder", + "signature": "class SdkJSONEncoder(JSONEncoder)", + "line": 124 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs)", + "line": 128 + }, + { + "kind": "func", + "name": "default", + "signature": "def default(self, o)", + "line": 133 + }, + { + "kind": "func", + "name": "_deserialize_array_encoded", + "signature": "def _deserialize_array_encoded(delimit: str, attr)", + "line": 175 + }, + { + "kind": "func", + "name": "_deserialize_datetime", + "signature": "def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime", + "line": 183 + }, + { + "kind": "func", + "name": "_deserialize_datetime_rfc7231", + "signature": "def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime", + "line": 216 + }, + { + "kind": "func", + "name": "_deserialize_datetime_unix_timestamp", + "signature": "def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime", + "line": 233 + }, + { + "kind": "func", + "name": "_deserialize_date", + "signature": "def _deserialize_date(attr: typing.Union[str, date]) -> date", + "line": 246 + }, + { + "kind": "func", + "name": "_deserialize_time", + "signature": "def _deserialize_time(attr: typing.Union[str, time]) -> time", + "line": 258 + }, + { + "kind": "func", + "name": "_deserialize_bytes", + "signature": "def _deserialize_bytes(attr)", + "line": 270 + }, + { + "kind": "func", + "name": "_deserialize_bytes_base64", + "signature": "def _deserialize_bytes_base64(attr)", + "line": 276 + }, + { + "kind": "func", + "name": "_deserialize_duration", + "signature": "def _deserialize_duration(attr)", + "line": 285 + }, + { + "kind": "func", + "name": "_deserialize_decimal", + "signature": "def _deserialize_decimal(attr)", + "line": 291 + }, + { + "kind": "func", + "name": "_deserialize_int_as_str", + "signature": "def _deserialize_int_as_str(attr)", + "line": 297 + }, + { + "kind": "func", + "name": "get_deserializer", + "signature": "def get_deserializer(annotation: typing.Any, rf: typing.Optional[\"_RestField\"] = None)", + "line": 323 + }, + { + "kind": "func", + "name": "_get_type_alias_type", + "signature": "def _get_type_alias_type(module_name: str, alias_name: str)", + "line": 333 + }, + { + "kind": "func", + "name": "_get_model", + "signature": "def _get_model(module_name: str, model_name: str)", + "line": 344 + }, + { + "kind": "class", + "name": "_MyMutableMapping", + "signature": "class _MyMutableMapping(MutableMapping[str, typing.Any])", + "line": 358 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, data: dict[str, typing.Any]) -> None", + "line": 361 + }, + { + "kind": "func", + "name": "__contains__", + "signature": "def __contains__(self, key: typing.Any) -> bool", + "line": 363 + }, + { + "kind": "func", + "name": "__getitem__", + "signature": "def __getitem__(self, key: str) -> typing.Any", + "line": 366 + }, + { + "kind": "func", + "name": "__setitem__", + "signature": "def __setitem__(self, key: str, value: typing.Any) -> None", + "line": 393 + }, + { + "kind": "func", + "name": "__delitem__", + "signature": "def __delitem__(self, key: str) -> None", + "line": 402 + }, + { + "kind": "func", + "name": "__iter__", + "signature": "def __iter__(self) -> typing.Iterator[typing.Any]", + "line": 405 + }, + { + "kind": "func", + "name": "__len__", + "signature": "def __len__(self) -> int", + "line": 408 + }, + { + "kind": "func", + "name": "__ne__", + "signature": "def __ne__(self, other: typing.Any) -> bool", + "line": 411 + }, + { + "kind": "func", + "name": "keys", + "signature": "def keys(self) -> typing.KeysView[str]", + "line": 414 + }, + { + "kind": "func", + "name": "values", + "signature": "def values(self) -> typing.ValuesView[typing.Any]", + "line": 421 + }, + { + "kind": "func", + "name": "items", + "signature": "def items(self) -> typing.ItemsView[str, typing.Any]", + "line": 428 + }, + { + "kind": "func", + "name": "get", + "signature": "def get(self, key: str, default: typing.Any = None) -> typing.Any", + "line": 435 + }, + { + "kind": "func", + "name": "pop", + "signature": "def pop(self, key: str) -> typing.Any", + "line": 450 + }, + { + "kind": "func", + "name": "pop", + "signature": "def pop(self, key: str, default: _T) -> _T", + "line": 453 + }, + { + "kind": "func", + "name": "pop", + "signature": "def pop(self, key: str, default: typing.Any) -> typing.Any", + "line": 456 + }, + { + "kind": "func", + "name": "pop", + "signature": "def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any", + "line": 457 + }, + { + "kind": "func", + "name": "popitem", + "signature": "def popitem(self) -> tuple[str, typing.Any]", + "line": 470 + }, + { + "kind": "func", + "name": "clear", + "signature": "def clear(self) -> None", + "line": 479 + }, + { + "kind": "func", + "name": "update", + "signature": "def update(self, *args: typing.Any, **kwargs: typing.Any) -> None", + "line": 485 + }, + { + "kind": "func", + "name": "setdefault", + "signature": "def setdefault(self, key: str, default: None = None) -> None", + "line": 494 + }, + { + "kind": "func", + "name": "setdefault", + "signature": "def setdefault(self, key: str, default: typing.Any) -> typing.Any", + "line": 497 + }, + { + "kind": "func", + "name": "setdefault", + "signature": "def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any", + "line": 498 + }, + { + "kind": "func", + "name": "__eq__", + "signature": "def __eq__(self, other: typing.Any) -> bool", + "line": 510 + }, + { + "kind": "func", + "name": "__repr__", + "signature": "def __repr__(self) -> str", + "line": 519 + }, + { + "kind": "func", + "name": "_is_model", + "signature": "def _is_model(obj: typing.Any) -> bool", + "line": 522 + }, + { + "kind": "func", + "name": "_serialize", + "signature": "def _serialize(o, format: typing.Optional[str] = None)", + "line": 526 + }, + { + "kind": "func", + "name": "_get_rest_field", + "signature": "def _get_rest_field(attr_to_rest_field: dict[str, \"_RestField\"], rest_name: str) -> typing.Optional[\"_RestField\"]", + "line": 561 + }, + { + "kind": "func", + "name": "_create_value", + "signature": "def _create_value(rf: typing.Optional[\"_RestField\"], value: typing.Any) -> typing.Any", + "line": 568 + }, + { + "kind": "class", + "name": "Model", + "signature": "class Model(_MyMutableMapping)", + "line": 580 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None", + "line": 587 + }, + { + "kind": "func", + "name": "_init_from_xml", + "signature": "def _init_from_xml(self, element: ET.Element) -> dict[str, typing.Any]", + "line": 617 + }, + { + "kind": "func", + "name": "copy", + "signature": "def copy(self) -> \"Model\"", + "line": 680 + }, + { + "kind": "func", + "name": "__new__", + "signature": "def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self", + "line": 683 + }, + { + "kind": "func", + "name": "__init_subclass__", + "signature": "def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None", + "line": 712 + }, + { + "kind": "func", + "name": "_get_backcompat_attribute_name", + "signature": "def _get_backcompat_attribute_name(cls, attr_to_rest_field: dict[str, \"_RestField\"], attr_name: str) -> str", + "line": 719 + }, + { + "kind": "func", + "name": "_get_discriminator", + "signature": "def _get_discriminator(cls, exist_discriminators) -> typing.Optional[\"_RestField\"]", + "line": 729 + }, + { + "kind": "func", + "name": "_deserialize", + "signature": "def _deserialize(cls, data, exist_discriminators)", + "line": 736 + }, + { + "kind": "func", + "name": "as_dict", + "signature": "def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]", + "line": 759 + }, + { + "kind": "func", + "name": "_as_dict_value", + "signature": "def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any", + "line": 786 + }, + { + "kind": "func", + "name": "_deserialize_model", + "signature": "def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj)", + "line": 794 + }, + { + "kind": "func", + "name": "_deserialize_with_optional", + "signature": "def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj)", + "line": 800 + }, + { + "kind": "func", + "name": "_deserialize_with_union", + "signature": "def _deserialize_with_union(deserializers, obj)", + "line": 806 + }, + { + "kind": "func", + "name": "_deserialize_dict", + "signature": "def _deserialize_dict(\n value_deserializer: typing.Optional[typing.Callable],\n module: typing.Optional[str],\n obj: dict[typing.Any, typing.Any],\n)", + "line": 815 + }, + { + "kind": "func", + "name": "_deserialize_multiple_sequence", + "signature": "def _deserialize_multiple_sequence(\n entry_deserializers: list[typing.Optional[typing.Callable]],\n module: typing.Optional[str],\n obj,\n)", + "line": 827 + }, + { + "kind": "func", + "name": "_is_array_encoded_deserializer", + "signature": "def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool", + "line": 837 + }, + { + "kind": "func", + "name": "_deserialize_sequence", + "signature": "def _deserialize_sequence(\n deserializer: typing.Optional[typing.Callable],\n module: typing.Optional[str],\n obj,\n)", + "line": 845 + }, + { + "kind": "func", + "name": "_sorted_annotations", + "signature": "def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]", + "line": 870 + }, + { + "kind": "func", + "name": "_get_deserialize_callable_from_annotation", + "signature": "def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches\n annotation: typing.Any,\n module: typing.Optional[str],\n rf: typing.Optional[\"_RestField\"] = None,\n) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]", + "line": 877 + }, + { + "kind": "func", + "name": "_deserialize_default", + "signature": "def _deserialize_default(\n deserializer,\n obj,\n )", + "line": 979 + }, + { + "kind": "func", + "name": "_deserialize_with_callable", + "signature": "def _deserialize_with_callable(\n deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]],\n value: typing.Any,\n)", + "line": 996 + }, + { + "kind": "func", + "name": "_deserialize", + "signature": "def _deserialize(\n deserializer: typing.Any,\n value: typing.Any,\n module: typing.Optional[str] = None,\n rf: typing.Optional[\"_RestField\"] = None,\n format: typing.Optional[str] = None,\n) -> typing.Any", + "line": 1033 + }, + { + "kind": "func", + "name": "_failsafe_deserialize", + "signature": "def _failsafe_deserialize(\n deserializer: typing.Any,\n response: HttpResponse,\n module: typing.Optional[str] = None,\n rf: typing.Optional[\"_RestField\"] = None,\n format: typing.Optional[str] = None,\n) -> typing.Any", + "line": 1049 + }, + { + "kind": "func", + "name": "_failsafe_deserialize_xml", + "signature": "def _failsafe_deserialize_xml(\n deserializer: typing.Any,\n response: HttpResponse,\n) -> typing.Any", + "line": 1065 + }, + { + "kind": "class", + "name": "_RestField", + "signature": "class _RestField", + "line": 1081 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(\n self,\n *,\n name: typing.Optional[str] = None,\n type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin\n is_discriminator: bool = False,\n visibility: typing.Optional[list[str]] = None,\n default: typing.Any = _UNSET,\n format: typing.Optional[str] = None,\n is_multipart_file_input: bool = False,\n xml: typing.Optional[dict[str, typing.Any]] = None,\n original_tsp_name: typing.Optional[str] = None,\n )", + "line": 1082 + }, + { + "kind": "func", + "name": "_class_type", + "signature": "def _class_type(self) -> typing.Any", + "line": 1109 + }, + { + "kind": "func", + "name": "_rest_name", + "signature": "def _rest_name(self) -> str", + "line": 1117 + }, + { + "kind": "func", + "name": "__get__", + "signature": "def __get__(self, obj: Model, type=None)", + "line": 1121 + }, + { + "kind": "func", + "name": "__set__", + "signature": "def __set__(self, obj: Model, value) -> None", + "line": 1149 + }, + { + "kind": "func", + "name": "_get_deserialize_callable_from_annotation", + "signature": "def _get_deserialize_callable_from_annotation(\n self, annotation: typing.Any\n ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]", + "line": 1169 + }, + { + "kind": "func", + "name": "rest_field", + "signature": "def rest_field(\n *,\n name: typing.Optional[str] = None,\n type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin\n visibility: typing.Optional[list[str]] = None,\n default: typing.Any = _UNSET,\n format: typing.Optional[str] = None,\n is_multipart_file_input: bool = False,\n xml: typing.Optional[dict[str, typing.Any]] = None,\n original_tsp_name: typing.Optional[str] = None,\n) -> typing.Any", + "line": 1174 + }, + { + "kind": "func", + "name": "rest_discriminator", + "signature": "def rest_discriminator(\n *,\n name: typing.Optional[str] = None,\n type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin\n visibility: typing.Optional[list[str]] = None,\n xml: typing.Optional[dict[str, typing.Any]] = None,\n) -> typing.Any", + "line": 1197 + }, + { + "kind": "func", + "name": "serialize_xml", + "signature": "def serialize_xml(model: Model, exclude_readonly: bool = False) -> str", + "line": 1207 + }, + { + "kind": "func", + "name": "_get_xml_ns", + "signature": "def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]", + "line": 1218 + }, + { + "kind": "func", + "name": "_resolve_xml_ns", + "signature": "def _resolve_xml_ns(\n prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None\n) -> typing.Optional[str]", + "line": 1231 + }, + { + "kind": "func", + "name": "_set_xml_attribute", + "signature": "def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None", + "line": 1250 + }, + { + "kind": "func", + "name": "_get_element", + "signature": "def _get_element(\n o: typing.Any,\n exclude_readonly: bool = False,\n parent_meta: typing.Optional[dict[str, typing.Any]] = None,\n wrapped_element: typing.Optional[ET.Element] = None,\n) -> typing.Union[ET.Element, list[ET.Element]]", + "line": 1268 + }, + { + "kind": "func", + "name": "_get_wrapped_element", + "signature": "def _get_wrapped_element(\n v: typing.Any,\n exclude_readonly: bool,\n meta: typing.Optional[dict[str, typing.Any]],\n) -> ET.Element", + "line": 1366 + }, + { + "kind": "func", + "name": "_get_primitive_type_value", + "signature": "def _get_primitive_type_value(v) -> str", + "line": 1384 + }, + { + "kind": "func", + "name": "_safe_register_namespace", + "signature": "def _safe_register_namespace(prefix: str, ns: str) -> None", + "line": 1394 + }, + { + "kind": "func", + "name": "_create_xml_element", + "signature": "def _create_xml_element(\n tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None\n) -> ET.Element", + "line": 1412 + }, + { + "kind": "func", + "name": "_deserialize_xml", + "signature": "def _deserialize_xml(\n deserializer: typing.Any,\n value: str,\n) -> typing.Any", + "line": 1422 + }, + { + "kind": "func", + "name": "_convert_element", + "signature": "def _convert_element(e: ET.Element)", + "line": 1430 + } + ], + "line_count": 1453 + }, + "api/client/python/openmeter/_generated/_utils/serialization.py": { + "header": " Any,\n cast,\n Optional,", + "symbols": [ + { + "kind": "class", + "name": "RawDeserializer", + "signature": "class RawDeserializer", + "line": 44 + }, + { + "kind": "func", + "name": "deserialize_from_text", + "signature": "def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any", + "line": 55 + }, + { + "kind": "func", + "name": "_json_attemp", + "signature": "def _json_attemp(data)", + "line": 105 + }, + { + "kind": "func", + "name": "deserialize_from_http_generics", + "signature": "def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any", + "line": 125 + }, + { + "kind": "func", + "name": "attribute_transformer", + "signature": "def attribute_transformer(key, attr_desc, value)", + "line": 163 + }, + { + "kind": "func", + "name": "full_restapi_key_transformer", + "signature": "def full_restapi_key_transformer(key, attr_desc, value)", + "line": 175 + }, + { + "kind": "func", + "name": "last_restapi_key_transformer", + "signature": "def last_restapi_key_transformer(key, attr_desc, value)", + "line": 188 + }, + { + "kind": "func", + "name": "_create_xml_node", + "signature": "def _create_xml_node(tag, prefix=None, ns=None)", + "line": 201 + }, + { + "kind": "class", + "name": "Model", + "signature": "class Model", + "line": 217 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, **kwargs: Any) -> None", + "line": 227 + }, + { + "kind": "func", + "name": "__eq__", + "signature": "def __eq__(self, other: Any) -> bool", + "line": 237 + }, + { + "kind": "func", + "name": "__ne__", + "signature": "def __ne__(self, other: Any) -> bool", + "line": 248 + }, + { + "kind": "func", + "name": "__str__", + "signature": "def __str__(self) -> str", + "line": 257 + }, + { + "kind": "func", + "name": "enable_additional_properties_sending", + "signature": "def enable_additional_properties_sending(cls) -> None", + "line": 262 + }, + { + "kind": "func", + "name": "is_xml_model", + "signature": "def is_xml_model(cls) -> bool", + "line": 266 + }, + { + "kind": "func", + "name": "_create_xml_node", + "signature": "def _create_xml_node(cls)", + "line": 274 + }, + { + "kind": "func", + "name": "serialize", + "signature": "def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON", + "line": 286 + }, + { + "kind": "func", + "name": "as_dict", + "signature": "def as_dict(\n self,\n keep_readonly: bool = True,\n key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,\n **kwargs: Any\n ) -> JSON", + "line": 302 + }, + { + "kind": "func", + "name": "my_key_transformer", + "signature": "def my_key_transformer(key, attr_desc, value)", + "line": 314 + }, + { + "kind": "func", + "name": "_infer_class_models", + "signature": "def _infer_class_models(cls)", + "line": 346 + }, + { + "kind": "func", + "name": "deserialize", + "signature": "def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self", + "line": 359 + }, + { + "kind": "func", + "name": "from_dict", + "signature": "def from_dict(\n cls,\n data: Any,\n key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,\n content_type: Optional[str] = None,\n ) -> Self", + "line": 372 + }, + { + "kind": "func", + "name": "_flatten_subtype", + "signature": "def _flatten_subtype(cls, key, objects)", + "line": 404 + }, + { + "kind": "func", + "name": "_classify", + "signature": "def _classify(cls, response, objects)", + "line": 413 + }, + { + "kind": "func", + "name": "_get_rest_key_parts", + "signature": "def _get_rest_key_parts(cls, attr_key)", + "line": 451 + }, + { + "kind": "func", + "name": "_decode_attribute_map_key", + "signature": "def _decode_attribute_map_key(key)", + "line": 459 + }, + { + "kind": "class", + "name": "Serializer", + "signature": "class Serializer", + "line": 470 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None", + "line": 506 + }, + { + "kind": "func", + "name": "_serialize", + "signature": "def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals\n self, target_obj, data_type=None, **kwargs\n )", + "line": 526 + }, + { + "kind": "func", + "name": "body", + "signature": "def body(self, data, data_type, **kwargs)", + "line": 638 + }, + { + "kind": "func", + "name": "url", + "signature": "def url(self, name, data, data_type, **kwargs)", + "line": 681 + }, + { + "kind": "func", + "name": "query", + "signature": "def query(self, name, data, data_type, **kwargs)", + "line": 706 + }, + { + "kind": "func", + "name": "header", + "signature": "def header(self, name, data, data_type, **kwargs)", + "line": 736 + }, + { + "kind": "func", + "name": "serialize_data", + "signature": "def serialize_data(self, data, data_type, **kwargs)", + "line": 758 + }, + { + "kind": "func", + "name": "_get_custom_serializers", + "signature": "def _get_custom_serializers(cls, data_type, **kwargs)", + "line": 798 + }, + { + "kind": "func", + "name": "serialize_basic", + "signature": "def serialize_basic(cls, data, data_type, **kwargs)", + "line": 806 + }, + { + "kind": "func", + "name": "serialize_unicode", + "signature": "def serialize_unicode(cls, data)", + "line": 834 + }, + { + "kind": "func", + "name": "serialize_iter", + "signature": "def serialize_iter(self, data, iter_type, div=None, **kwargs)", + "line": 855 + }, + { + "kind": "func", + "name": "serialize_dict", + "signature": "def serialize_dict(self, attr, dict_type, **kwargs)", + "line": 919 + }, + { + "kind": "func", + "name": "serialize_object", + "signature": "def serialize_object(self, attr, **kwargs)", + "line": 949 + }, + { + "kind": "func", + "name": "serialize_enum", + "signature": "def serialize_enum(attr, enum_obj=None)", + "line": 1006 + }, + { + "kind": "func", + "name": "serialize_bytearray", + "signature": "def serialize_bytearray(attr, **kwargs)", + "line": 1022 + }, + { + "kind": "func", + "name": "serialize_base64", + "signature": "def serialize_base64(attr, **kwargs)", + "line": 1032 + }, + { + "kind": "func", + "name": "serialize_decimal", + "signature": "def serialize_decimal(attr, **kwargs)", + "line": 1043 + }, + { + "kind": "func", + "name": "serialize_long", + "signature": "def serialize_long(attr, **kwargs)", + "line": 1053 + }, + { + "kind": "func", + "name": "serialize_date", + "signature": "def serialize_date(attr, **kwargs)", + "line": 1063 + }, + { + "kind": "func", + "name": "serialize_time", + "signature": "def serialize_time(attr, **kwargs)", + "line": 1076 + }, + { + "kind": "func", + "name": "serialize_duration", + "signature": "def serialize_duration(attr, **kwargs)", + "line": 1091 + }, + { + "kind": "func", + "name": "serialize_rfc", + "signature": "def serialize_rfc(attr, **kwargs)", + "line": 1103 + }, + { + "kind": "func", + "name": "serialize_iso", + "signature": "def serialize_iso(attr, **kwargs)", + "line": 1129 + }, + { + "kind": "func", + "name": "serialize_unix", + "signature": "def serialize_unix(attr, **kwargs)", + "line": 1161 + }, + { + "kind": "func", + "name": "rest_key_extractor", + "signature": "def rest_key_extractor(attr, attr_desc, data)", + "line": 1178 + }, + { + "kind": "func", + "name": "rest_key_case_insensitive_extractor", + "signature": "def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements\n attr, attr_desc, data\n)", + "line": 1199 + }, + { + "kind": "func", + "name": "last_rest_key_extractor", + "signature": "def last_rest_key_extractor(attr, attr_desc, data)", + "line": 1222 + }, + { + "kind": "func", + "name": "last_rest_key_case_insensitive_extractor", + "signature": "def last_rest_key_case_insensitive_extractor(attr, attr_desc, data)", + "line": 1236 + }, + { + "kind": "func", + "name": "attribute_key_extractor", + "signature": "def attribute_key_extractor(attr, _, data)", + "line": 1251 + }, + { + "kind": "func", + "name": "attribute_key_case_insensitive_extractor", + "signature": "def attribute_key_case_insensitive_extractor(attr, _, data)", + "line": 1255 + }, + { + "kind": "func", + "name": "_extract_name_from_internal_type", + "signature": "def _extract_name_from_internal_type(internal_type)", + "line": 1266 + }, + { + "kind": "func", + "name": "xml_key_extractor", + "signature": "def xml_key_extractor(attr, attr_desc, data)", + "line": 1281 + }, + { + "kind": "class", + "name": "Deserializer", + "signature": "class Deserializer", + "line": 1355 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None", + "line": 1367 + }, + { + "kind": "func", + "name": "__call__", + "signature": "def __call__(self, target_obj, response_data, content_type=None)", + "line": 1397 + }, + { + "kind": "func", + "name": "_deserialize", + "signature": "def _deserialize(self, target_obj, data)", + "line": 1410 + }, + { + "kind": "func", + "name": "_build_additional_properties", + "signature": "def _build_additional_properties(self, attribute_map, data)", + "line": 1483 + }, + { + "kind": "func", + "name": "_classify_target", + "signature": "def _classify_target(self, target, data)", + "line": 1501 + }, + { + "kind": "func", + "name": "failsafe_deserialize", + "signature": "def failsafe_deserialize(self, target_obj, data, content_type=None)", + "line": 1526 + }, + { + "kind": "func", + "name": "_unpack_content", + "signature": "def _unpack_content(raw_data, content_type=None)", + "line": 1549 + }, + { + "kind": "func", + "name": "_instantiate_model", + "signature": "def _instantiate_model(self, response, attrs, additional_properties=None)", + "line": 1585 + }, + { + "kind": "func", + "name": "deserialize_data", + "signature": "def deserialize_data(self, data, data_type)", + "line": 1627 + }, + { + "kind": "func", + "name": "deserialize_iter", + "signature": "def deserialize_iter(self, attr, iter_type)", + "line": 1674 + }, + { + "kind": "func", + "name": "deserialize_dict", + "signature": "def deserialize_dict(self, attr, dict_type)", + "line": 1690 + }, + { + "kind": "func", + "name": "deserialize_object", + "signature": "def deserialize_object(self, attr, **kwargs)", + "line": 1707 + }, + { + "kind": "func", + "name": "deserialize_basic", + "signature": "def deserialize_basic(self, attr, data_type)", + "line": 1750 + }, + { + "kind": "func", + "name": "deserialize_unicode", + "signature": "def deserialize_unicode(data)", + "line": 1794 + }, + { + "kind": "func", + "name": "deserialize_enum", + "signature": "def deserialize_enum(data, enum_obj)", + "line": 1816 + }, + { + "kind": "func", + "name": "deserialize_bytearray", + "signature": "def deserialize_bytearray(attr)", + "line": 1850 + }, + { + "kind": "func", + "name": "deserialize_base64", + "signature": "def deserialize_base64(attr)", + "line": 1863 + }, + { + "kind": "func", + "name": "deserialize_decimal", + "signature": "def deserialize_decimal(attr)", + "line": 1879 + }, + { + "kind": "func", + "name": "deserialize_long", + "signature": "def deserialize_long(attr)", + "line": 1896 + }, + { + "kind": "func", + "name": "deserialize_duration", + "signature": "def deserialize_duration(attr)", + "line": 1909 + }, + { + "kind": "func", + "name": "deserialize_date", + "signature": "def deserialize_date(attr)", + "line": 1927 + }, + { + "kind": "func", + "name": "deserialize_time", + "signature": "def deserialize_time(attr)", + "line": 1943 + }, + { + "kind": "func", + "name": "deserialize_rfc", + "signature": "def deserialize_rfc(attr)", + "line": 1958 + }, + { + "kind": "func", + "name": "deserialize_iso", + "signature": "def deserialize_iso(attr)", + "line": 1981 + }, + { + "kind": "func", + "name": "deserialize_unix", + "signature": "def deserialize_unix(attr)", + "line": 2018 + } + ], + "line_count": 2035 + }, + "api/client/python/openmeter/_generated/_version.py": { + "header": "VERSION = \"0.0.0\"", + "symbols": [], + "line_count": 3 + }, + "api/client/python/openmeter/_generated/aio/__init__.py": { + "header": "if TYPE_CHECKING:\n from ._patch import * # pylint: disable=unused-wildcard-import\ntry:", + "symbols": [], + "line_count": 23 + }, + "api/client/python/openmeter/_generated/aio/_client.py": { + "header": " AddonsOperations,\n AppCustomInvoicingOperations,\n AppStripeOperations,", + "symbols": [ + { + "kind": "class", + "name": "OpenMeterClient", + "signature": "class OpenMeterClient", + "line": 51 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__( # pylint: disable=missing-client-constructor-parameter-credential\n self, *, endpoint: str = \"https://127.0.0.1\", **kwargs: Any\n ) -> None", + "line": 136 + }, + { + "kind": "func", + "name": "send_request", + "signature": "def send_request(\n self, request: HttpRequest, *, stream: bool = False, **kwargs: Any\n ) -> Awaitable[AsyncHttpResponse]", + "line": 219 + }, + { + "kind": "func", + "name": "close", + "signature": "async def close(self) -> None", + "line": 247 + }, + { + "kind": "func", + "name": "__aenter__", + "signature": "async def __aenter__(self) -> Self", + "line": 250 + }, + { + "kind": "func", + "name": "__aexit__", + "signature": "async def __aexit__(self, *exc_details: Any) -> None", + "line": 254 + } + ], + "line_count": 256 + }, + "api/client/python/openmeter/_generated/aio/_configuration.py": { + "header": "class OpenMeterClientConfiguration:\n \"\"\"Configuration for OpenMeterClient.\n Note that all parameters used to create this instance are saved as instance", + "symbols": [ + { + "kind": "class", + "name": "OpenMeterClientConfiguration", + "signature": "class OpenMeterClientConfiguration", + "line": 8 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(self, endpoint: str = \"https://127.0.0.1\", **kwargs: Any) -> None", + "line": 19 + }, + { + "kind": "func", + "name": "_configure", + "signature": "def _configure(self, **kwargs: Any) -> None", + "line": 26 + } + ], + "line_count": 33 + }, + "api/client/python/openmeter/_generated/aio/_patch.py": { + "header": "\"\"\"Customize generated code here.\nFollow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize\n\"\"\"", + "symbols": [ + { + "kind": "func", + "name": "patch_sdk", + "signature": "def patch_sdk()", + "line": 9 + } + ], + "line_count": 17 + }, + "api/client/python/openmeter/_generated/aio/operations/__init__.py": { + "header": "if TYPE_CHECKING:\n from ._patch import * # pylint: disable=unused-wildcard-import\n__all__ = [", + "symbols": [], + "line_count": 93 + }, + "api/client/python/openmeter/_generated/aio/operations/_patch.py": { + "header": "\"\"\"Customize generated code here.\nFollow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize\n\"\"\"", + "symbols": [ + { + "kind": "func", + "name": "patch_sdk", + "signature": "def patch_sdk()", + "line": 9 + } + ], + "line_count": 17 + }, + "api/client/python/openmeter/_generated/models/__init__.py": { + "header": "if TYPE_CHECKING:\n from ._patch import * # pylint: disable=unused-wildcard-import\n Addon,", + "symbols": [], + "line_count": 756 + }, + "api/client/python/openmeter/_generated/models/_enums.py": { + "header": "class AddonInstanceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):\n \"\"\"The instanceType of the add-on. Single instance add-ons can be added to subscription only once\n while add-ons with multiple type can be added more then once.", + "symbols": [ + { + "kind": "class", + "name": "AddonInstanceType", + "signature": "class AddonInstanceType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 5 + }, + { + "kind": "class", + "name": "AddonOrderBy", + "signature": "class AddonOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 16 + }, + { + "kind": "class", + "name": "AddonStatus", + "signature": "class AddonStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 31 + }, + { + "kind": "class", + "name": "AppCapabilityType", + "signature": "class AppCapabilityType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 42 + }, + { + "kind": "class", + "name": "AppStatus", + "signature": "class AppStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 57 + }, + { + "kind": "class", + "name": "AppType", + "signature": "class AppType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 67 + }, + { + "kind": "class", + "name": "BillingCollectionAlignment", + "signature": "class BillingCollectionAlignment(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 78 + }, + { + "kind": "class", + "name": "BillingProfileCustomerOverrideExpand", + "signature": "class BillingProfileCustomerOverrideExpand(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 87 + }, + { + "kind": "class", + "name": "BillingProfileCustomerOverrideOrderBy", + "signature": "class BillingProfileCustomerOverrideOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 96 + }, + { + "kind": "class", + "name": "BillingProfileExpand", + "signature": "class BillingProfileExpand(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 111 + }, + { + "kind": "class", + "name": "BillingProfileOrderBy", + "signature": "class BillingProfileOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 118 + }, + { + "kind": "class", + "name": "BillingSettlementMode", + "signature": "class BillingSettlementMode(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 131 + }, + { + "kind": "class", + "name": "CheckoutSessionUIMode", + "signature": "class CheckoutSessionUIMode(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 148 + }, + { + "kind": "class", + "name": "CollectionMethod", + "signature": "class CollectionMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 157 + }, + { + "kind": "class", + "name": "CreateCheckoutSessionTaxIdCollectionRequired", + "signature": "class CreateCheckoutSessionTaxIdCollectionRequired( # pylint", + "line": 166 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionBillingAddressCollection", + "signature": "class CreateStripeCheckoutSessionBillingAddressCollection( # pylint", + "line": 179 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition", + "signature": "class CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition( # pylint", + "line": 191 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionConsentCollectionPromotions", + "signature": "class CreateStripeCheckoutSessionConsentCollectionPromotions( # pylint", + "line": 203 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionConsentCollectionTermsOfService", + "signature": "class CreateStripeCheckoutSessionConsentCollectionTermsOfService( # pylint", + "line": 217 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionCustomerUpdateBehavior", + "signature": "class CreateStripeCheckoutSessionCustomerUpdateBehavior( # pylint", + "line": 229 + }, + { + "kind": "class", + "name": "CreateStripeCheckoutSessionRedirectOnCompletion", + "signature": "class CreateStripeCheckoutSessionRedirectOnCompletion( # pylint", + "line": 241 + }, + { + "kind": "class", + "name": "CustomerExpand", + "signature": "class CustomerExpand(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 255 + }, + { + "kind": "class", + "name": "CustomerOrderBy", + "signature": "class CustomerOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 262 + }, + { + "kind": "class", + "name": "CustomerSubscriptionOrderBy", + "signature": "class CustomerSubscriptionOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 273 + }, + { + "kind": "class", + "name": "CustomInvoicingPaymentTrigger", + "signature": "class CustomInvoicingPaymentTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 282 + }, + { + "kind": "class", + "name": "DiscountReasonType", + "signature": "class DiscountReasonType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 299 + }, + { + "kind": "class", + "name": "EditOp", + "signature": "class EditOp(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 310 + }, + { + "kind": "class", + "name": "EntitlementOrderBy", + "signature": "class EntitlementOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 327 + }, + { + "kind": "class", + "name": "EntitlementType", + "signature": "class EntitlementType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 336 + }, + { + "kind": "class", + "name": "ExpirationDuration", + "signature": "class ExpirationDuration(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 347 + }, + { + "kind": "class", + "name": "FeatureOrderBy", + "signature": "class FeatureOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 362 + }, + { + "kind": "class", + "name": "FeatureUnitCostType", + "signature": "class FeatureUnitCostType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 377 + }, + { + "kind": "class", + "name": "GrantOrderBy", + "signature": "class GrantOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 386 + }, + { + "kind": "class", + "name": "InstallMethod", + "signature": "class InstallMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 397 + }, + { + "kind": "class", + "name": "InvoiceDetailedLineCostCategory", + "signature": "class InvoiceDetailedLineCostCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 408 + }, + { + "kind": "class", + "name": "InvoiceDocumentRefType", + "signature": "class InvoiceDocumentRefType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 419 + }, + { + "kind": "class", + "name": "InvoiceExpand", + "signature": "class InvoiceExpand(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 426 + }, + { + "kind": "class", + "name": "InvoiceLineManagedBy", + "signature": "class InvoiceLineManagedBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 437 + }, + { + "kind": "class", + "name": "InvoiceLineStatus", + "signature": "class InvoiceLineStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 460 + }, + { + "kind": "class", + "name": "InvoiceLineTaxBehavior", + "signature": "class InvoiceLineTaxBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 472 + }, + { + "kind": "class", + "name": "InvoiceLineTypes", + "signature": "class InvoiceLineTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 485 + }, + { + "kind": "class", + "name": "InvoiceOrderBy", + "signature": "class InvoiceOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 494 + }, + { + "kind": "class", + "name": "InvoiceStatus", + "signature": "class InvoiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 511 + }, + { + "kind": "class", + "name": "InvoiceType", + "signature": "class InvoiceType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 534 + }, + { + "kind": "class", + "name": "MeasureUsageFromPreset", + "signature": "class MeasureUsageFromPreset(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 547 + }, + { + "kind": "class", + "name": "MeterAggregation", + "signature": "class MeterAggregation(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 556 + }, + { + "kind": "class", + "name": "MeterOrderBy", + "signature": "class MeterOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 575 + }, + { + "kind": "class", + "name": "NotificationChannelOrderBy", + "signature": "class NotificationChannelOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 590 + }, + { + "kind": "class", + "name": "NotificationChannelType", + "signature": "class NotificationChannelType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 603 + }, + { + "kind": "class", + "name": "NotificationEventDeliveryStatusState", + "signature": "class NotificationEventDeliveryStatusState(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 610 + }, + { + "kind": "class", + "name": "NotificationEventOrderBy", + "signature": "class NotificationEventOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 625 + }, + { + "kind": "class", + "name": "NotificationEventType", + "signature": "class NotificationEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 634 + }, + { + "kind": "class", + "name": "NotificationRuleBalanceThresholdValueType", + "signature": "class NotificationRuleBalanceThresholdValueType( # pylint", + "line": 647 + }, + { + "kind": "class", + "name": "NotificationRuleOrderBy", + "signature": "class NotificationRuleOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 664 + }, + { + "kind": "class", + "name": "OAuth2AuthorizationCodeGrantErrorType", + "signature": "class OAuth2AuthorizationCodeGrantErrorType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 677 + }, + { + "kind": "class", + "name": "PaymentTermType", + "signature": "class PaymentTermType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 699 + }, + { + "kind": "class", + "name": "PlanAddonOrderBy", + "signature": "class PlanAddonOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 708 + }, + { + "kind": "class", + "name": "PlanOrderBy", + "signature": "class PlanOrderBy(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 723 + }, + { + "kind": "class", + "name": "PlanStatus", + "signature": "class PlanStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 738 + }, + { + "kind": "class", + "name": "PricePaymentTerm", + "signature": "class PricePaymentTerm(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 751 + }, + { + "kind": "class", + "name": "PriceType", + "signature": "class PriceType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 760 + }, + { + "kind": "class", + "name": "ProRatingMode", + "signature": "class ProRatingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 775 + }, + { + "kind": "class", + "name": "RateCardType", + "signature": "class RateCardType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 782 + }, + { + "kind": "class", + "name": "RecurringPeriodIntervalEnum", + "signature": "class RecurringPeriodIntervalEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 791 + }, + { + "kind": "class", + "name": "RemovePhaseShifting", + "signature": "class RemovePhaseShifting(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 804 + }, + { + "kind": "class", + "name": "SortOrder", + "signature": "class SortOrder(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 813 + }, + { + "kind": "class", + "name": "StripeCheckoutSessionMode", + "signature": "class StripeCheckoutSessionMode(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 822 + }, + { + "kind": "class", + "name": "SubscriptionStatus", + "signature": "class SubscriptionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 829 + }, + { + "kind": "class", + "name": "SubscriptionTimingEnum", + "signature": "class SubscriptionTimingEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 842 + }, + { + "kind": "class", + "name": "TaxBehavior", + "signature": "class TaxBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 853 + }, + { + "kind": "class", + "name": "TieredPriceMode", + "signature": "class TieredPriceMode(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 865 + }, + { + "kind": "class", + "name": "ValidationIssueSeverity", + "signature": "class ValidationIssueSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 874 + }, + { + "kind": "class", + "name": "VoidInvoiceLineActionType", + "signature": "class VoidInvoiceLineActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 886 + }, + { + "kind": "class", + "name": "WindowSize", + "signature": "class WindowSize(str, Enum, metaclass=CaseInsensitiveEnumMeta)", + "line": 896 + } + ], + "line_count": 908 + }, + "api/client/python/openmeter/_generated/models/_patch.py": { + "header": "\"\"\"Customize generated code here.\nFollow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize\n\"\"\"", + "symbols": [ + { + "kind": "func", + "name": "patch_sdk", + "signature": "def patch_sdk()", + "line": 9 + } + ], + "line_count": 17 + }, + "api/client/python/openmeter/_generated/operations/__init__.py": { + "header": "if TYPE_CHECKING:\n from ._patch import * # pylint: disable=unused-wildcard-import\n__all__ = [", + "symbols": [], + "line_count": 93 + }, + "api/client/python/openmeter/_generated/operations/_patch.py": { + "header": "\"\"\"Customize generated code here.\nFollow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize\n\"\"\"", + "symbols": [ + { + "kind": "func", + "name": "patch_sdk", + "signature": "def patch_sdk()", + "line": 9 + } + ], + "line_count": 17 + }, + "api/client/python/openmeter/_types.py": { + "header": "if TYPE_CHECKING:\n from . import models as _models\nApp = Union[\"_models.StripeApp\", \"_models.SandboxApp\", \"_models.CustomInvoicingApp\"]", + "symbols": [], + "line_count": 89 + }, + "api/client/python/openmeter/_version.py": { + "header": "VERSION = \"0.0.0\"", + "symbols": [], + "line_count": 3 + }, + "api/client/python/openmeter/aio/__init__.py": { + "header": "if TYPE_CHECKING:\n from .._generated.aio._patch import * # pylint: disable=unused-wildcard-import\ntry:", + "symbols": [], + "line_count": 23 + }, + "api/client/python/openmeter/aio/_client.py": { + "header": "class Client(OpenMeterClient):\n def __init__(\n self,", + "symbols": [ + { + "kind": "class", + "name": "Client", + "signature": "class Client(OpenMeterClient)", + "line": 10 + }, + { + "kind": "func", + "name": "__init__", + "signature": "def __init__(\n self,\n endpoint: str = \"https://openmeter.cloud\",\n token: Optional[str] = None,\n **kwargs: Any,\n ) -> None", + "line": 13 + }, + { + "kind": "func", + "name": "__enter__", + "signature": "def __enter__(self) -> Self", + "line": 26 + }, + { + "kind": "func", + "name": "__exit__", + "signature": "def __exit__(self, *exc_details: Any) -> None", + "line": 29 + } + ], + "line_count": 31 + }, + "api/client/python/openmeter/aio/operations/__init__.py": { + "header": "\"\"\"\nRe-exports all operations from the generated code for a cleaner API surface.\n\"\"\"", + "symbols": [], + "line_count": 29 + }, + "api/client/python/openmeter/models/__init__.py": { + "header": "\"\"\"\nRe-exports all models from the generated code for a cleaner API surface.\n\"\"\"", + "symbols": [], + "line_count": 30 + }, + "api/client/python/openmeter/operations/__init__.py": { + "header": "\"\"\"\nRe-exports all operations from the generated code for a cleaner API surface.\n\"\"\"", + "symbols": [], + "line_count": 29 + }, + "api/client/python/openmeter/py.typed": { + "header": "# Marker file for PEP 561.", + "symbols": [], + "line_count": 1 + }, + "api/client/python/pyproject.toml": { + "header": "[tool.poetry]\nname = \"openmeter\"\nversion = \"0.0.0\"\ndescription = \"Client for OpenMeter: Real-Time and Scalable Usage Metering\"\nauthors = [\"Andras Toth <4157749+tothandras@users.noreply.github.com>\"]\nlicense = \"Apache-2.0\"\nreadme = \"README.md\"\nrepository = \"https://github.com/openmeter/openmeter\"\nhomepage = \"https://openmeter.io\"\nkeywords = [\n \"openmeter\",\n \"api\",\n \"client\",\n \"usage\",\n \"usage-based\",\n \"metering\",\n \"ai\",\n \"aggregation\",\n \"real-time\",\n \"billing\",", + "symbols": [], + "line_count": 37 + }, + "api/client/python/scripts/release.sh": { + "header": "#!/usr/bin/env sh\n\nset -euo pipefail\n\n# Determine PY_SDK_RELEASE_VERSION if not provided\nif [ -z \"${PY_SDK_RELEASE_VERSION:-}\" ]; then\n # Validate PY_SDK_RELEASE_TAG\n if [ -z \"${PY_SDK_RELEASE_TAG:-}\" ]; then\n echo \"ERROR: PY_SDK_RELEASE_VERSION or PY_SDK_RELEASE_TAG is required\"\n exit 1\n fi\n\n if [ \"$PY_SDK_RELEASE_TAG\" != \"alpha\" ]; then\n echo \"ERROR: PY_SDK_RELEASE_TAG must be 'alpha'\"\n exit 1\n fi\n\n\tLATEST_VERSION=$(curl -s https://pypi.org/pypi/openmeter/json | jq -r '.releases | keys[] | select(test(\"a[0-9]+\"))' | sort -V | tail -1)\n\tif [ -z \"$LATEST_VERSION\" ]; then\n\t\tPY_SDK_RELEASE_VERSION=\"1.0.0a0\"", + "symbols": [], + "line_count": 52 + }, + "api/client/web/README.md": { + "header": "# OpenMeter Web SDK\n\nMoved to fetch based client in [JavaScript SDK](../javascript)", + "symbols": [], + "line_count": 3 + }, + "api/codegen.yaml": { + "header": "# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json\npackage: api\ngenerate:\n chi-server: true\n models: true\n embedded-spec: true\ncompatibility:\n apply-chi-middleware-first-to-last: true\n # See: https://github.com/oapi-codegen/oapi-codegen/issues/778\n disable-required-readonly-as-pointer: true\n always-prefix-enum-values: true\n preserve-original-operation-id-casing-in-embedded-spec: true\noutput: ./api.gen.go\noutput-options:\n skip-prune: true", + "symbols": [], + "line_count": 15 + }, + "api/convert.gen.go": { + "header": "func init() {\n\tFromBillingDiscountPercentageToDiscountPercentage = func(source BillingDiscountPercentage) DiscountPercentage {\n\t\tvar apiDiscountPercentage DiscountPercentage", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 6 + } + ], + "line_count": 17 + }, + "api/convert.go": { + "header": "var (\n\tFromBillingDiscountPercentageToDiscountPercentage func(BillingDiscountPercentage) DiscountPercentage\n\tFromBillingDiscountUsageToDiscountUsage func(BillingDiscountUsage) DiscountUsage", + "symbols": [], + "line_count": 16 + }, + "api/spec/.gitignore": { + "header": "# TypeSpec output (all packages)\n**/output/\n\n# Dependency directories\nnode_modules/", + "symbols": [], + "line_count": 5 + }, + "api/spec/Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\n.PHONY: generate\ngenerate: format ## Generate OpenAPI spec\n\t$(call print-target)\n\tpnpm --frozen-lockfile install\n\tpnpm generate\n\t# Replace inline filter definitions with $ref to common/definitions/aip_filters.yaml\n\t@AIP_REF=\"../../../../common/definitions/aip_filters.yaml#/components/schemas\"; \\\n\tFILE=\"packages/aip/output/definitions/metering-and-billing/v3/openapi.MeteringAndBilling.yaml\"; \\\n\tfor schema in SortQuery BooleanFieldFilter NumericFieldFilter StringFieldFilter StringFieldFilterExact DateTimeFieldFilter LabelsFieldFilter; do \\\n\t\tif yq -e \".components.schemas | has(\\\"$$schema\\\")\" \"$$FILE\" > /dev/null 2>&1; then \\\n\t\t\tREF_VAL=\"$$AIP_REF/$$schema\" SCHEMA=\"$$schema\" yq -i '.components.schemas[strenv(SCHEMA)] = {\"$$ref\": strenv(REF_VAL)}' \"$$FILE\"; \\\n\t\tfi; \\\n\tdone\n\tpnpm --filter @openmeter/api-spec-aip exec openapi bundle output/definitions/metering-and-billing/v3/openapi.OpenMeter.yaml -o ../../../v3/openapi.yaml\n\tcp packages/legacy/output/openapi.OpenMeter.yaml ../openapi.yaml\n\tcp packages/legacy/output/openapi.OpenMeterCloud.yaml ../openapi.cloud.yaml\n\tcp packages/aip/output/definitions/metering-and-billing/v3/openapi.Test.yaml ../v3/test/openapi.test.yaml\n", + "symbols": [], + "line_count": 44 + }, + "api/spec/README.md": { + "header": "# OpenMeter API specs\n\nThis workspace contains two TypeSpec packages that generate OpenAPI specs:\n\n| Package | Description | Output |\n| ------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------- |\n| **Legacy** (`packages/legacy`) | OpenMeter API (v1-v2) and OpenMeter Cloud API | `openapi.OpenMeter.yaml`, `openapi.OpenMeterCloud.yaml` |\n| **AIP** (`packages/aip`) | OpenMeter and Konnect metering & billing APIs (v3), AIP-style | `openapi.MeteringAndBilling.yaml` (OpenMeter + Konnect) |\n\nFrom the repo root, run `make gen-api` (or `make -C api/spec generate`) to build both packages and copy/bundle artifacts into `api/`.\n\n---\n\n## Legacy API (`packages/legacy`)\n\nLegacy specs follow OpenMeter\u2019s existing TypeSpec conventions. See [`packages/legacy/README.md`](packages/legacy/README.md) for patterns and guidelines.\n\n---\n\n## AIP (`packages/aip`)", + "symbols": [], + "line_count": 25 + }, + "api/spec/package.json": { + "header": "{\n \"name\": \"@openmeter/api-spec\",\n \"version\": \"0.1.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"generate\": \"pnpm --filter @openmeter/api-spec-legacy run generate && pnpm --filter @openmeter/api-spec-aip run generate\",\n \"format\": \"prettier --list-different --find-config-path --write . && pnpm --filter @openmeter/api-spec-aip run format\",\n \"lint\": \"prettier --check . && pnpm --filter @openmeter/api-spec-legacy run lint && pnpm --filter @openmeter/api-spec-aip run lint\",\n \"lint:fix\": \"prettier --write .\"\n },\n \"devDependencies\": {\n \"@typespec/prettier-plugin-typespec\": \"1.11.0\",\n \"prettier\": \"3.8.3\"\n },\n \"exports\": {\n \"./openapi.yaml\": \"./packages/legacy/output/openapi.OpenMeterCloud.yaml\",\n \"./openapi.cloud.yaml\": \"./packages/legacy/output/openapi.OpenMeterCloud.yaml\",\n \"./openapi.legacy.yaml\": \"./packages/legacy/output/openapi.OpenMeter.yaml\",\n \"./v3/openapi.yaml\": \"./packages/aip/output/definitions/metering-and-billing/v3/openapi.MeteringAndBilling.yaml\"\n },", + "symbols": [], + "line_count": 38 + }, + "api/spec/packages/aip/common/definitions/aip_filters.yaml": { + "header": "components:\n schemas:\n BooleanFieldFilter:\n title: BooleanFieldFilter\n description: Filter by a boolean value (true/false).\n type: boolean\n x-examples:\n example-1: true\n NumericFieldFilter:\n description: Filter by a numeric value.\n oneOf:\n - type: number\n description: Value strictly equals the given numeric value.\n example: 21\n - type: object\n title: NumericFieldEqualsFilter\n additionalProperties: false\n properties:\n eq:\n type: number", + "symbols": [], + "line_count": 300 + }, + "api/spec/packages/aip/common/definitions/errors.yaml": { + "header": "components:\n responses:\n ErrorResponse:\n description: api error response\n content:\n application/problem+json:\n schema:\n oneOf:\n - $ref: '#/components/responses/BadRequest'\n - $ref: '#/components/responses/Unauthorized'\n - $ref: '#/components/responses/Forbidden'\n - $ref: '#/components/responses/NotFound'\n - $ref: '#/components/responses/Conflict'\n - $ref: '#/components/responses/Gone'\n - $ref: '#/components/responses/Internal'\n - $ref: '#/components/responses/NotAvailable'\n discriminator:\n propertyName: status\n mapping:\n '400': '#/components/responses/BadRequest'", + "symbols": [], + "line_count": 670 + }, + "api/spec/packages/aip/common/definitions/konnect_properties.yaml": { + "header": "components:\n schemas:\n NullableUUID:\n type: string\n format: uuid\n example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7\n description: Contains a unique identifier for a resource.\n nullable: true\n Labels:\n title: Labels\n type: object\n example:\n env: test\n maxProperties: 50\n description: |\n Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. \n\n Keys must be of length 1-63 characters, and cannot start with \"kong\", \"konnect\", \"mesh\", \"kic\", or \"_\".\n additionalProperties:\n type: string", + "symbols": [], + "line_count": 105 + }, + "api/spec/packages/aip/common/definitions/metadatas.yaml": { + "header": "components:\n schemas:\n PaginationNextResponse:\n description: URI to the next page (may be null)\n type: string\n PaginationOffsetResponse:\n description: Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page\n type: string\n PaginatedMeta:\n type: object\n title: PaginatedMeta\n x-speakeasy-terraform-ignore: true\n description: returns the pagination information\n properties:\n page:\n $ref: '#/components/schemas/PageMeta'\n required:\n - page\n PageMeta:\n type: object", + "symbols": [], + "line_count": 224 + }, + "api/spec/packages/aip/common/definitions/properties.yaml": { + "header": "components:\n parameters:\n OrganizationIdParameter:\n name: organizationId\n in: path\n description: UUID representing an organization.\n required: true\n schema:\n $ref: '#/components/schemas/OrganizationId'\n schemas:\n UUID:\n type: string\n format: uuid\n example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7\n description: Contains a unique identifier used for this resource.\n readOnly: true\n # UUID_RW defines a ReadWrite UUID, as UUID defines a UUID readonly\n UUID_RW:\n type: string\n format: uuid", + "symbols": [], + "line_count": 73 + }, + "api/spec/packages/aip/common/definitions/security.yaml": { + "header": "components:\n securitySchemes:\n personalAccessToken:\n type: http\n scheme: bearer\n bearerFormat: Token\n description: |\n The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs.\n You can generate a Personal Access Token (PAT) from the [personal access token page](https://cloud.konghq.com/global/account/tokens/) in the Konnect dashboard.\n The PAT token must be passed in the header of a request, for example:\n `curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer kpat_xgfT...'`\n systemAccountAccessToken:\n type: http\n scheme: bearer\n bearerFormat: Token\n description: |\n The system account access token is meant for automations and integrations that are not directly associated with a human identity.\n You can generate a system account Access Token by creating a system account and then obtaining a system account access token for that account.\n The access token must be passed in the header of a request, for example:\n `curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer spat_i2Ej...'`", + "symbols": [], + "line_count": 45 + }, + "api/spec/packages/aip/lib/index.js": { + "header": "const rules = [\n casingRule,\n casingErrorsRule,", + "symbols": [ + { + "kind": "func", + "name": "rules", + "signature": "const rules =", + "line": 12 + } + ], + "line_count": 27 + }, + "api/spec/packages/aip/lib/rules/casing.js": { + "header": " isCamelCaseNoAcronyms,\n isPascalCaseNoAcronyms,\n isSnakeCase,", + "symbols": [ + { + "kind": "func", + "name": "casingRule", + "signature": "export const casingRule =", + "line": 8 + }, + { + "kind": "func", + "name": "casingErrorsRule", + "signature": "export const casingErrorsRule =", + "line": 77 + } + ], + "line_count": 100 + }, + "api/spec/packages/aip/lib/rules/composition-over-inheritance.js": { + "header": " createRule,\n getDiscriminator,\n getTypeName,", + "symbols": [ + { + "kind": "func", + "name": "compositionOverInheritanceRule", + "signature": "export const compositionOverInheritanceRule =", + "line": 10 + } + ], + "line_count": 44 + }, + "api/spec/packages/aip/lib/rules/docs.js": { + "header": " createRule,\n defineCodeFix,\n getDoc,", + "symbols": [ + { + "kind": "func", + "name": "docDecoratorRule", + "signature": "export const docDecoratorRule =", + "line": 16 + }, + { + "kind": "func", + "name": "formatDocMarkdown", + "signature": "async function formatDocMarkdown(markdown, options = {})", + "line": 83 + }, + { + "kind": "func", + "name": "createFormatDocCommentCodeFix", + "signature": "function createFormatDocCommentCodeFix(location, newText)", + "line": 101 + }, + { + "kind": "func", + "name": "collectDocNodes", + "signature": "function collectDocNodes(target, sink)", + "line": 116 + }, + { + "kind": "func", + "name": "docFormatRule", + "signature": "export const docFormatRule =", + "line": 122 + }, + { + "kind": "func", + "name": "processDoc", + "signature": "async function processDoc(doc, context)", + "line": 172 + } + ], + "line_count": 205 + }, + "api/spec/packages/aip/lib/rules/field-prefix.js": { + "header": "const EXCLUDED_PREFIXES = [\n 'allow',\n 'custom',", + "symbols": [ + { + "kind": "func", + "name": "EXCLUDED_PREFIXES", + "signature": "const EXCLUDED_PREFIXES =", + "line": 5 + }, + { + "kind": "func", + "name": "repeatedPrefixGroupingRule", + "signature": "export const repeatedPrefixGroupingRule =", + "line": 18 + } + ], + "line_count": 73 + }, + "api/spec/packages/aip/lib/rules/friendly-name.js": { + "header": "export const friendlyNameRule = createRule({\n name: 'friendly-name',\n severity: 'error',", + "symbols": [ + { + "kind": "func", + "name": "friendlyNameRule", + "signature": "export const friendlyNameRule =", + "line": 3 + } + ], + "line_count": 77 + }, + "api/spec/packages/aip/lib/rules/no-nullable.js": { + "header": "export const noNullableRule = createRule({\n name: 'no-nullable',\n description: 'Use `?` for optional properties.',", + "symbols": [ + { + "kind": "func", + "name": "noNullableRule", + "signature": "export const noNullableRule =", + "line": 3 + } + ], + "line_count": 29 + }, + "api/spec/packages/aip/lib/rules/operation-id.js": { + "header": "export const operationIdKebabCaseRule = createRule({\n name: 'operation-id-kebab-case',\n severity: 'error',", + "symbols": [ + { + "kind": "func", + "name": "operationIdKebabCaseRule", + "signature": "export const operationIdKebabCaseRule =", + "line": 4 + } + ], + "line_count": 35 + }, + "api/spec/packages/aip/lib/rules/operation-summary.js": { + "header": "export const operationSummaryRule = createRule({\n name: 'operation-summary',\n severity: 'warning',", + "symbols": [ + { + "kind": "func", + "name": "operationSummaryRule", + "signature": "export const operationSummaryRule =", + "line": 3 + } + ], + "line_count": 27 + }, + "api/spec/packages/aip/lib/rules/utils.js": { + "header": "const pascalCaseExceptions = ['OAuth2', 'URL', 'API', 'UI', 'ID']\nexport function isPascalCaseNoAcronyms(value) {\n if (value === undefined || value === null || value === '') {", + "symbols": [ + { + "kind": "func", + "name": "pascalCaseExceptions", + "signature": "const pascalCaseExceptions =", + "line": 4 + }, + { + "kind": "func", + "name": "isPascalCaseNoAcronyms", + "signature": "export function isPascalCaseNoAcronyms(value)", + "line": 11 + }, + { + "kind": "func", + "name": "isCamelCaseNoAcronyms", + "signature": "export function isCamelCaseNoAcronyms(value)", + "line": 26 + }, + { + "kind": "func", + "name": "isSnakeCase", + "signature": "export function isSnakeCase(value)", + "line": 39 + }, + { + "kind": "func", + "name": "isKebabCase", + "signature": "export function isKebabCase(value)", + "line": 52 + }, + { + "kind": "func", + "name": "detectNewline", + "signature": "export function detectNewline(source)", + "line": 65 + }, + { + "kind": "func", + "name": "getIndentBefore", + "signature": "export function getIndentBefore(source, position)", + "line": 74 + }, + { + "kind": "func", + "name": "extractMarkdownFromDocComment", + "signature": "export function extractMarkdownFromDocComment(raw)", + "line": 86 + }, + { + "kind": "func", + "name": "wrapMarkdownAsDocComment", + "signature": "export function wrapMarkdownAsDocComment(markdown, indent, newline)", + "line": 110 + } + ], + "line_count": 124 + }, + "api/spec/packages/aip/package.json": { + "header": "{\n \"name\": \"@openmeter/api-spec-aip\",\n \"version\": \"0.1.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"generate\": \"tsp compile --config tspconfig.yaml ./src && node ./scripts/flatten-allof.mjs ./output/definitions/metering-and-billing/v3/openapi.MeteringAndBilling.yaml && node ./scripts/seal-object-schemas.mjs ./output/definitions/metering-and-billing/v3/*.yaml\",\n \"bundle\": \"openapi bundle output/definitions/metering-and-billing/v3/openapi.OpenMeter.yaml\",\n \"watch\": \"tsp compile --watch --config tspconfig.yaml ./src\",\n \"format\": \"node ./scripts/apply-doc-fixes.mjs && prettier --ignore-path ../../.prettierignore --list-different --find-config-path --write .\",\n \"lint\": \"prettier --ignore-path ../../.prettierignore --check .\",\n \"lint:fix\": \"prettier --ignore-path ../../.prettierignore --write .\"\n },\n \"main\": \"./lib/index.js\",\n \"exports\": {\n \".\": {\n \"typespec\": \"./src/main.tsp\"\n }\n },\n \"devDependencies\": {\n \"@redocly/cli\": \"2.29.0\",", + "symbols": [], + "line_count": 34 + }, + "api/spec/packages/aip/scripts/apply-doc-fixes.mjs": { + "header": "const CODEFIX_ID = 'format-doc-comment'\nconst RULE_NAME = 'doc-format'\nconst cwd = process.cwd()", + "symbols": [ + { + "kind": "func", + "name": "CODEFIX_ID", + "signature": "const CODEFIX_ID =", + "line": 8 + }, + { + "kind": "func", + "name": "RULE_NAME", + "signature": "const RULE_NAME =", + "line": 9 + }, + { + "kind": "func", + "name": "cwd", + "signature": "const cwd =", + "line": 11 + }, + { + "kind": "func", + "name": "pkg", + "signature": "const pkg =", + "line": 12 + }, + { + "kind": "func", + "name": "RULE_ID", + "signature": "const RULE_ID =", + "line": 18 + }, + { + "kind": "func", + "name": "RULESET", + "signature": "const RULESET =", + "line": 19 + }, + { + "kind": "func", + "name": "entryRel", + "signature": "const entryRel =", + "line": 23 + }, + { + "kind": "func", + "name": "entry", + "signature": "const entry =", + "line": 30 + }, + { + "kind": "func", + "name": "program", + "signature": "const program =", + "line": 34 + }, + { + "kind": "func", + "name": "matching", + "signature": "const matching =", + "line": 41 + }, + { + "kind": "func", + "name": "fixes", + "signature": "const fixes =", + "line": 42 + } + ], + "line_count": 55 + }, + "api/spec/packages/aip/scripts/flatten-allof.mjs": { + "header": "const FLATTEN_MARKER = 'x-flatten-allOf'\nconst YAML_OPTIONS = {\n indent: 2,", + "symbols": [ + { + "kind": "func", + "name": "FLATTEN_MARKER", + "signature": "const FLATTEN_MARKER =", + "line": 7 + }, + { + "kind": "func", + "name": "YAML_OPTIONS", + "signature": "const YAML_OPTIONS =", + "line": 8 + }, + { + "kind": "func", + "name": "isPlainObject", + "signature": "function isPlainObject(value)", + "line": 13 + }, + { + "kind": "func", + "name": "isRefObject", + "signature": "function isRefObject(value)", + "line": 17 + }, + { + "kind": "func", + "name": "getMovableKeys", + "signature": "function getMovableKeys(node)", + "line": 21 + }, + { + "kind": "func", + "name": "moveSiblingPropertiesIntoAllOf", + "signature": "function moveSiblingPropertiesIntoAllOf(node)", + "line": 27 + }, + { + "kind": "func", + "name": "flattenAllOf", + "signature": "function flattenAllOf(node)", + "line": 55 + }, + { + "kind": "func", + "name": "pathExists", + "signature": "async function pathExists(path)", + "line": 87 + }, + { + "kind": "func", + "name": "validateInputFile", + "signature": "async function validateInputFile(filePath)", + "line": 96 + }, + { + "kind": "func", + "name": "readYamlFile", + "signature": "async function readYamlFile(filePath)", + "line": 107 + }, + { + "kind": "func", + "name": "writeYamlFile", + "signature": "async function writeYamlFile(filePath, document)", + "line": 117 + }, + { + "kind": "func", + "name": "printUsage", + "signature": "function printUsage()", + "line": 124 + }, + { + "kind": "func", + "name": "main", + "signature": "async function main()", + "line": 128 + } + ], + "line_count": 152 + }, + "api/spec/packages/aip/scripts/seal-object-schemas.mjs": { + "header": "const YAML_OPTIONS = {\n indent: 2,\n lineWidth: 0,", + "symbols": [ + { + "kind": "func", + "name": "YAML_OPTIONS", + "signature": "const YAML_OPTIONS =", + "line": 7 + }, + { + "kind": "func", + "name": "isPlainObject", + "signature": "function isPlainObject(value)", + "line": 12 + }, + { + "kind": "func", + "name": "isNotEmptyObject", + "signature": "function isNotEmptyObject(value)", + "line": 23 + }, + { + "kind": "func", + "name": "rewriteAdditionalProperties", + "signature": "function rewriteAdditionalProperties(node)", + "line": 36 + }, + { + "kind": "func", + "name": "pathExists", + "signature": "async function pathExists(path)", + "line": 65 + }, + { + "kind": "func", + "name": "validateInputFile", + "signature": "async function validateInputFile(filePath)", + "line": 74 + }, + { + "kind": "func", + "name": "readYamlFile", + "signature": "async function readYamlFile(filePath)", + "line": 85 + }, + { + "kind": "func", + "name": "writeYamlFile", + "signature": "async function writeYamlFile(filePath, document)", + "line": 95 + }, + { + "kind": "func", + "name": "printUsage", + "signature": "function printUsage()", + "line": 102 + }, + { + "kind": "func", + "name": "processFile", + "signature": "async function processFile(filePath)", + "line": 108 + }, + { + "kind": "func", + "name": "looksLikeGlob", + "signature": "function looksLikeGlob(pattern)", + "line": 119 + }, + { + "kind": "func", + "name": "expandPattern", + "signature": "async function expandPattern(pattern)", + "line": 123 + }, + { + "kind": "func", + "name": "main", + "signature": "async function main()", + "line": 141 + } + ], + "line_count": 168 + }, + "api/spec/packages/aip/src/apps/app.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./catalog.tsp\";\nimport \"./sandbox.tsp\";\nimport \"./stripe.tsp\";\nimport \"./external_invoicing.tsp\";\n\nnamespace Apps;\n\n/**\n * The type of the app.\n */\n@friendlyName(\"BillingAppType\")\nenum AppType {\n /**\n * Built-in sandbox integration for testing and development.\n */\n Sandbox: \"sandbox\",\n\n /**\n * The Stripe app synchronizes invoices to Stripe Invoicing, enabling automated revenue collection with Stripe Payments and Stripe Tax.", + "symbols": [], + "line_count": 99 + }, + "api/spec/packages/aip/src/apps/catalog.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./app.tsp\";\n\nnamespace Apps;\n\n/**\n * Available apps for billing integrations to connect with third-party services.\n * Apps can have various capabilities like syncing data from or to external\n * systems, integrating with third-party services for tax calculation, delivery of\n * invoices, collection of payments, etc.\n */\n@friendlyName(\"BillingAppCatalogItem\")\n@example(#{\n type: AppType.Stripe,\n name: \"Stripe\",\n description: \"Stripe integration allows you to collect payments with Stripe.\",\n})\nmodel AppCatalogItem {\n /**\n * Type of the app.", + "symbols": [], + "line_count": 36 + }, + "api/spec/packages/aip/src/apps/customer.tsp": { + "header": "import \"./app.tsp\";\n\nnamespace Apps;\n\n/**\n * App customer data.\n */\n@friendlyName(\"BillingAppCustomerData\")\nmodel AppCustomerData {\n /**\n * Used if the customer has a linked Stripe app.\n */\n @summary(\"Stripe\")\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n stripe?: Apps.AppCustomerDataStripe;\n\n /**\n * Used if the customer has a linked external invoicing app.\n */\n @summary(\"External invoicing\")", + "symbols": [], + "line_count": 63 + }, + "api/spec/packages/aip/src/apps/external_invoicing.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./app.tsp\";\nimport \"../invoices/index.tsp\";\n\nnamespace Apps;\n\n/**\n * External Invoicing app enables integration with third-party invoicing or payment\n * system.\n *\n * The app supports a bi-directional synchronization pattern where OpenMeter\n * Billing manages the invoice lifecycle while the external system handles invoice\n * presentation and payment collection.\n *\n * Integration workflow:\n *\n * 1. The billing system creates invoices and transitions them through lifecycle\n * states (draft \u2192 issuing \u2192 issued)\n * 2. The integration receives webhook notifications about invoice state changes\n * 3. The integration calls back to provide external system IDs and metadata", + "symbols": [], + "line_count": 55 + }, + "api/spec/packages/aip/src/apps/index.tsp": { + "header": "import \"./app.tsp\";\nimport \"./catalog.tsp\";\nimport \"./customer.tsp\";\nimport \"./external_invoicing.tsp\";\nimport \"./sandbox.tsp\";\nimport \"./stripe.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 7 + }, + "api/spec/packages/aip/src/apps/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./app.tsp\";\nimport \"./external_invoicing.tsp\";\nimport \"./stripe.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Apps;\n\ninterface AppsOperations {\n /**\n * List installed apps.", + "symbols": [], + "line_count": 38 + }, + "api/spec/packages/aip/src/apps/sandbox.tsp": { + "header": "import \"./app.tsp\";\n\nnamespace Apps;\n\n/**\n * Sandbox app can be used for testing billing features.\n */\n@friendlyName(\"BillingAppSandbox\")\nmodel AppSandbox {\n ...AppBase;\n}", + "symbols": [], + "line_count": 11 + }, + "api/spec/packages/aip/src/apps/stripe.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./app.tsp\";\nimport \"../customers/customer.tsp\";\n\nnamespace Apps;\n\n/**\n * Stripe app.\n */\n@friendlyName(\"BillingAppStripe\")\nmodel AppStripe {\n ...AppBase;\n\n /**\n * The Stripe account ID associated with the connected Stripe account.\n */\n @visibility(Lifecycle.Read)\n account_id: string;\n\n /**", + "symbols": [], + "line_count": 643 + }, + "api/spec/packages/aip/src/billing/index.tsp": { + "header": "import \"./profile.tsp\";\nimport \"./tax.tsp\";\nimport \"./operations.tsp\";\nimport \"./totals.tsp\";", + "symbols": [], + "line_count": 4 + }, + "api/spec/packages/aip/src/billing/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./profile.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Billing;\n\ninterface BillingProfilesOperations {\n /**\n * List billing profiles.\n */\n @get", + "symbols": [], + "line_count": 77 + }, + "api/spec/packages/aip/src/billing/profile.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../invoices/index.tsp\";\nimport \"../apps/index.tsp\";\nimport \"./tax.tsp\";\n\nnamespace Billing;\n\n/**\n * Billing profiles contain the settings for billing and controls invoice\n * generation.\n */\n@friendlyName(\"BillingProfile\")\nmodel BillingProfile {\n ...Shared.Resource;\n\n /**\n * The name and contact information for the supplier this billing profile\n * represents\n */\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)", + "symbols": [], + "line_count": 341 + }, + "api/spec/packages/aip/src/billing/tax.tsp": { + "header": "namespace Billing;\n\n/**\n * Set of provider specific tax configs.\n */\n#suppress \"@openmeter/api-spec-aip/repeated-prefix-grouping\" \"tax_code_id is deprecated\"\n@friendlyName(\"BillingTaxConfig\")\nmodel TaxConfig {\n /**\n * Tax behavior.\n *\n * If not specified the billing profile is used to determine the tax behavior. If\n * not specified in the billing profile, the provider's default behavior is used.\n */\n @summary(\"Tax behavior\")\n behavior?: TaxBehavior;\n\n /**\n * Stripe tax config.\n *", + "symbols": [], + "line_count": 101 + }, + "api/spec/packages/aip/src/billing/totals.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Billing;\n\n/**\n * Totals contains the summaries of all calculations for a billing resource.\n */\n#suppress \"@openmeter/api-spec-aip/repeated-prefix-grouping\" \"taxes_* totals are intentionally kept flat for API compatibility\"\n@friendlyName(\"BillingTotals\")\nmodel BillingTotals {\n /**\n * The total value of the resource before taxes, discounts and commitments.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Amount\")\n amount: Shared.Numeric;\n\n /**\n * The total tax amount applied to the resource.\n */", + "symbols": [], + "line_count": 66 + }, + "api/spec/packages/aip/src/common/error.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\nusing TypeSpec.Http;\n\nnamespace Common;\n\n/**\n * Bad Request.\n */\n@useRef(\"../../../../common/definitions/errors.yaml#/components/responses/BadRequest\")\n@friendlyName(\"BadRequest\")\nmodel BadRequest {\n @statusCode _: 400;\n}\n\n/**\n * Unauthorized.", + "symbols": [], + "line_count": 132 + }, + "api/spec/packages/aip/src/common/pagination.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Common;\n\n/**\n * Determines which page of the collection to retrieve.\n */\n@friendlyName(\"CursorPaginationQueryPage\")\nmodel CursorPaginationQueryPage {\n /**\n * The number of items to include per page.\n */\n size?: integer;\n\n /**", + "symbols": [], + "line_count": 143 + }, + "api/spec/packages/aip/src/common/parameters.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace Common;\n\n/**\n * Sort query.\n *\n * The `asc` suffix is optional as the default sort order is ascending. The `desc`\n * suffix is used to specify a descending order.\n */\n@useRef(\"../../../../common/definitions/aip_filters.yaml#/components/schemas/SortQuery\")\n@friendlyName(\"SortQuery\")\nmodel SortQuery {}\n\n/**\n * Filter by a boolean value (true/false).", + "symbols": [], + "line_count": 284 + }, + "api/spec/packages/aip/src/common/properties.tsp": { + "header": "import \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace Common;\n\n/**\n * Labels store metadata of an entity that can be used for filtering an entity list\n * or for searching across entity types.\n *\n * Keys must be of length 1-63 characters, and cannot start with \"kong\", \"konnect\",\n * \"mesh\", \"kic\", or \"\\_\".\n */\n@useRef(\"../../../../common/definitions/konnect_properties.yaml#/components/schemas/Labels\")\n@friendlyName(\"Labels\")\nmodel Labels {}\n\n/**\n * Public labels store information about an entity that can be used for filtering a", + "symbols": [], + "line_count": 25 + }, + "api/spec/packages/aip/src/currencies/cost-bases/cost-basis.tsp": { + "header": "import \"../../shared/index.tsp\";\n\nnamespace Currencies;\n\n/**\n * Describes currency basis supported by billing system.\n */\n@friendlyName(\"BillingCostBasis\")\nmodel CostBasis {\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n @visibility(Lifecycle.Read)\n id: Shared.ULID;\n\n /**\n * The fiat currency code for the cost basis.\n */\n @visibility(Lifecycle.Create, Lifecycle.Read)\n fiat_code: Shared.CurrencyCode;\n\n /**", + "symbols": [], + "line_count": 39 + }, + "api/spec/packages/aip/src/currencies/cost-bases/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../../common/error.tsp\";\nimport \"../../common/parameters.tsp\";\nimport \"../../shared/index.tsp\";\nimport \"../currency.tsp\";\nimport \"./cost-basis.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Currencies;\n\n/**\n * Filter options for listing cost bases.\n */\n@friendlyName(\"ListCostBasesParamsFilter\")\nmodel ListCostBasesParamsFilter {", + "symbols": [], + "line_count": 64 + }, + "api/spec/packages/aip/src/currencies/currency.tsp": { + "header": "import \"@typespec/openapi3\";\nimport \"../shared/index.tsp\";\n\nnamespace Currencies;\n\nusing TypeSpec.OpenAPI;\n\n/**\n * Currency type for custom currencies. It should be a unique code but not\n * conflicting with any existing standard currency codes.\n */\n@friendlyName(\"BillingCurrencyType\")\nenum CurrencyType {\n Fiat: \"fiat\",\n Custom: \"custom\",\n}\n\n/**\n * Fiat or custom currency.\n */", + "symbols": [], + "line_count": 120 + }, + "api/spec/packages/aip/src/currencies/index.tsp": { + "header": "import \"./currency.tsp\";\nimport \"./operations.tsp\";\nimport \"./cost-bases/operations.tsp\";", + "symbols": [], + "line_count": 3 + }, + "api/spec/packages/aip/src/currencies/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./currency.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Currencies;\n\n/**\n * Filter options for listing currencies.\n */\n@friendlyName(\"ListCurrenciesParamsFilter\")\nmodel ListCurrenciesParamsFilter {\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"filter field\"", + "symbols": [], + "line_count": 73 + }, + "api/spec/packages/aip/src/customers/billing.tsp": { + "header": "import \"../apps/index.tsp\";\nimport \"../billing/index.tsp\";\n\nnamespace Customers;\n\n/**\n * Billing customer data.\n */\n@friendlyName(\"BillingCustomerData\")\nmodel CustomerBillingData {\n /**\n * The billing profile for the customer.\n *\n * If not provided, the default billing profile will be used.\n */\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n @summary(\"Billing profile\")\n billing_profile?: Billing.BillingProfileReference;\n\n /**", + "symbols": [], + "line_count": 26 + }, + "api/spec/packages/aip/src/customers/charges/charges.tsp": { + "header": "import \"../../shared/index.tsp\";\nimport \"../../productcatalog/index.tsp\";\nimport \"../../subscriptions/index.tsp\";\nimport \"../customer.tsp\";\n\nnamespace Customers;\n\n/**\n * Type of a charge.\n *\n * Values:\n *\n * - `flat_fee`: A fixed-amount charge.\n * - `usage_based`: A usage-priced charge.\n */\n@friendlyName(\"BillingChargeType\")\n@summary(\"Charge type\")\nenum ChargeType {\n FlatFee: \"flat_fee\",\n UsageBased: \"usage_based\",", + "symbols": [], + "line_count": 301 + }, + "api/spec/packages/aip/src/customers/charges/index.tsp": { + "header": "import \"./charges.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/customers/charges/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../../common/error.tsp\";\nimport \"../../common/pagination.tsp\";\nimport \"../../shared/index.tsp\";\nimport \"../../common/parameters.tsp\";\nimport \"./charges.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Customers;\n\n/**\n * Filter options for listing charges.\n */\n@friendlyName(\"ListChargesParamsFilter\")\nmodel ListCustomerChargesParamsFilter {\n /**", + "symbols": [], + "line_count": 83 + }, + "api/spec/packages/aip/src/customers/credits/adjustment.tsp": { + "header": "import \"../../shared/index.tsp\";\nimport \"../../currencies/index.tsp\";\n\n/**\n * A credit adjustment can be used to make manual adjustments to a customer's\n * credit balance.\n *\n * Supported use-cases:\n *\n * - Usage correction\n */\n@friendlyName(\"BillingCreditAdjustment\")\n@summary(\"Credit adjustment\")\nmodel CreditAdjustment {\n ...PickProperties;\n\n /**\n * The currency of the granted credits.\n */\n @visibility(Lifecycle.Create)", + "symbols": [], + "line_count": 28 + }, + "api/spec/packages/aip/src/customers/credits/balance.tsp": { + "header": "import \"../../shared/index.tsp\";\nimport \"../../currencies/index.tsp\";\n\nnamespace Customers;\n\n/**\n * The balances of the credits of a customer.\n */\n@friendlyName(\"BillingCreditBalances\")\n@summary(\"Credit balances\")\nmodel CreditBalances {\n /**\n * The timestamp of the balance retrieval.\n */\n @visibility(Lifecycle.Read)\n retrieved_at: Shared.DateTime;\n\n /**\n * The balances by currencies.\n */", + "symbols": [], + "line_count": 50 + }, + "api/spec/packages/aip/src/customers/credits/grant.tsp": { + "header": "import \"../../shared/index.tsp\";\nimport \"../../currencies/index.tsp\";\n\nnamespace Customers;\n\n/**\n * The funding method describes how the grant is funded.\n *\n * - `none`: No funding workflow applies, for example promotional grants\n * - `invoice`: The grant is funded by an in-system invoice flow\n * - `external`: The grant is funded outside the system (e.g., wire transfer,\n * external invoice, or manual reconciliation)\n */\n@friendlyName(\"BillingCreditFundingMethod\")\n@summary(\"Credit funding method\")\nenum CreditFundingMethod {\n // No funding workflow applies\n None: \"none\",\n\n // The grant is funded by an in-system invoice flow", + "symbols": [], + "line_count": 306 + }, + "api/spec/packages/aip/src/customers/credits/index.tsp": { + "header": "import \"./grant.tsp\";\nimport \"./ledger.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 3 + }, + "api/spec/packages/aip/src/customers/credits/ledger.tsp": { + "header": "import \"../../shared/index.tsp\";\nimport \"../../currencies/index.tsp\";\n\nnamespace Customers;\n\n/**\n * The type of the credit transaction.\n *\n * - `funded`: Credit granted and available for consumption.\n * - `consumed`: Credit consumed by usage or fees.\n * - `expired`: Credit removed because it expired before being used.\n */\n@friendlyName(\"BillingCreditTransactionType\")\nenum CreditTransactionType {\n // Credit granted and available for consumption.\n Funded: \"funded\",\n\n // Credit consumed by usage or fees.\n Consumed: \"consumed\",\n", + "symbols": [], + "line_count": 126 + }, + "api/spec/packages/aip/src/customers/credits/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../../common/error.tsp\";\nimport \"../../common/parameters.tsp\";\nimport \"../../shared/index.tsp\";\nimport \"./grant.tsp\";\nimport \"./balance.tsp\";\nimport \"./ledger.tsp\";\nimport \"./adjustment.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Customers;\n\n/**\n * Filter options for listing credit grants.\n */", + "symbols": [], + "line_count": 229 + }, + "api/spec/packages/aip/src/customers/customer.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../common/properties.tsp\";\n\nnamespace Customers;\n\n/**\n * Customers can be individuals or organizations that can subscribe to plans and\n * have access to features.\n */\n@friendlyName(\"BillingCustomer\")\nmodel Customer {\n ...Shared.Resource;\n\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n @visibility(Lifecycle.Create, Lifecycle.Read)\n key: Shared.ExternalResourceKey;\n\n /**\n * Mapping to attribute metered usage to the customer by the event subject.\n */", + "symbols": [], + "line_count": 146 + }, + "api/spec/packages/aip/src/customers/index.tsp": { + "header": "import \"./customer.tsp\";\nimport \"./operations.tsp\";\nimport \"./credits/index.tsp\";\nimport \"./charges/index.tsp\";", + "symbols": [], + "line_count": 4 + }, + "api/spec/packages/aip/src/customers/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./customer.tsp\";\nimport \"./billing.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Customers;\n\n/**\n * Filter options for listing customers.\n */\n@friendlyName(\"ListCustomersParamsFilter\")", + "symbols": [], + "line_count": 215 + }, + "api/spec/packages/aip/src/defaults/index.tsp": { + "header": "import \"./taxcodes.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/defaults/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./taxcodes.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Defaults;\n\ninterface OrganizationDefaultTaxCodesOperations {\n @get\n @operationId(\"get-organization-default-tax-codes\")\n @summary(\"Get organization default tax codes\")\n @extension(Shared.UnstableExtension, true)\n @extension(Shared.InternalExtension, true)\n get(", + "symbols": [], + "line_count": 31 + }, + "api/spec/packages/aip/src/defaults/taxcodes.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../tax/codes.tsp\";\n\nnamespace Defaults;\n\n/**\n * Organization-level default tax code references.\n *\n * Stores the default tax codes applied to specific billing contexts for this\n * organization. Provisioned automatically when the organization is created.\n */\n@friendlyName(\"OrganizationDefaultTaxCodes\")\nmodel OrganizationDefaultTaxCodes {\n /**\n * Default tax code for invoicing.\n */\n @summary(\"Invoicing tax code\")\n invoicing_tax_code: Shared.ResourceReference;\n\n /**", + "symbols": [], + "line_count": 37 + }, + "api/spec/packages/aip/src/entitlements/access.tsp": { + "header": "import \"./entitlements.tsp\";\nimport \"../shared/index.tsp\";\n\nnamespace Entitlements;\n\n/**\n * Entitlement access result.\n */\n@friendlyName(\"BillingEntitlementAccessResult\")\nmodel EntitlementAccessResult {\n /**\n * The type of the entitlement.\n */\n @example(EntitlementType.Static)\n @visibility(Lifecycle.Read)\n type: EntitlementType;\n\n /**\n * The feature key of the entitlement.\n */", + "symbols": [], + "line_count": 40 + }, + "api/spec/packages/aip/src/entitlements/entitlements.tsp": { + "header": "namespace Entitlements;\n\n/**\n * The type of the entitlement.\n */\n@friendlyName(\"BillingEntitlementType\")\nenum EntitlementType {\n Metered: \"metered\",\n Static: \"static\",\n Boolean: \"boolean\",\n}", + "symbols": [], + "line_count": 11 + }, + "api/spec/packages/aip/src/entitlements/index.tsp": { + "header": "import \"./entitlements.tsp\";\nimport \"./access.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 3 + }, + "api/spec/packages/aip/src/entitlements/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./access.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Entitlements;\n\n/**\n * List the customer's active features and their access.\n */\n@friendlyName(\"ListCustomerEntitlementAccessResponse\")\nmodel ListCustomerEntitlementAccessResponse {\n @Http.statusCode _: 200;\n @body body: ListCustomerEntitlementAccessResponseData;", + "symbols": [], + "line_count": 42 + }, + "api/spec/packages/aip/src/events/event.tsp": { + "header": "import \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../shared/index.tsp\";\n\nnamespace Events;\n\n/**\n * Metering event following the CloudEvents specification.\n */\n@friendlyName(\"MeteringEvent\")\n@summary(\"Metering Event\")\n@example(#{\n specversion: \"1.0\",\n id: \"5c10fade-1c9e-4d6c-8275-c52c36731d3c\",\n source: \"service-name\",\n type: \"prompt\",\n subject: \"customer-id\",\n time: Shared.DateTime.fromISO(\"2023-01-01T01:01:01.001Z\"),\n data: #{\n prompt: \"Hello, world!\",", + "symbols": [], + "line_count": 160 + }, + "api/spec/packages/aip/src/events/index.tsp": { + "header": "import \"./event.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/events/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./event.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Events;\n\n/**\n * The events have been ingested and are being processed asynchronously.\n */\n@friendlyName(\"IngestEventsResponse\")\nmodel IngestEventsResponse {", + "symbols": [], + "line_count": 134 + }, + "api/spec/packages/aip/src/features/cost.tsp": { + "header": "import \"@typespec/json-schema\";\nimport \"../shared/index.tsp\";\nimport \"../meters/query.tsp\";\n\nnamespace Features;\n\n/**\n * A row in the result of a feature cost query.\n */\n@friendlyName(\"FeatureCostQueryRow\")\nmodel FeatureCostQueryRow {\n /**\n * The metered usage value for the period.\n */\n usage: Shared.Numeric;\n\n /**\n * The computed cost amount (usage \u00d7 unit cost). Null when pricing is not available\n * for the given combination of dimensions.\n */", + "symbols": [], + "line_count": 71 + }, + "api/spec/packages/aip/src/features/feature.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../meters/index.tsp\";\nimport \"./unitcost.tsp\";\nimport \"@typespec/json-schema\";\n\nusing TypeSpec.JsonSchema;\n\nnamespace Features;\n\n/**\n * Reference to a meter associated with a feature.\n */\n@friendlyName(\"FeatureMeterReference\")\nmodel FeatureMeterReference {\n /**\n * The ID of the meter to associate with this feature.\n */\n @visibility(Lifecycle.Read, Lifecycle.Create)\n @summary(\"Meter ID\")\n id: Shared.ULID;", + "symbols": [], + "line_count": 69 + }, + "api/spec/packages/aip/src/features/index.tsp": { + "header": "import \"./cost.tsp\";\nimport \"./unitcost.tsp\";\nimport \"./operations.tsp\";\nimport \"./feature.tsp\";\n\nnamespace Features;", + "symbols": [], + "line_count": 6 + }, + "api/spec/packages/aip/src/features/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../shared/index.tsp\";\nimport \"../meters/query.tsp\";\nimport \"./cost.tsp\";\nimport \"./feature.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Features;\n\n/**\n * Filter options for listing features.\n */\n@friendlyName(\"ListFeatureParamsFilter\")\nmodel ListFeaturesParamsFilter {", + "symbols": [], + "line_count": 129 + }, + "api/spec/packages/aip/src/features/unitcost.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Features;\n\n/**\n * The type of unit cost.\n */\n@friendlyName(\"BillingFeatureUnitCostType\")\nenum FeatureUnitCostType {\n Llm: \"llm\",\n Manual: \"manual\",\n}\n\n/**\n * A fixed per-unit cost amount.\n */\n@friendlyName(\"BillingFeatureManualUnitCost\")\nmodel FeatureManualUnitCost {\n /**\n * The type discriminator for manual unit cost.", + "symbols": [], + "line_count": 163 + }, + "api/spec/packages/aip/src/governance/governance.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../customers/customer.tsp\";\n\nnamespace Governance;\n\n/**\n * List of customer identifiers to evaluate access for.\n */\n@friendlyName(\"GovernanceQueryRequestCustomers\")\nmodel GovernanceQueryRequestCustomers {\n /**\n * Each entry can be a customer `key` or a usage-attribution subject `key`.\n * Identifiers that cannot be resolved to a customer are reported in the response\n * `errors` array.\n */\n @summary(\"Customer keys and usage-attribution subjects\")\n @minItems(1)\n @maxItems(100)\n keys: string[];", + "symbols": [], + "line_count": 227 + }, + "api/spec/packages/aip/src/governance/index.tsp": { + "header": "import \"./governance.tsp\";\nimport \"./operations.tsp\";\n\nnamespace Governance;", + "symbols": [], + "line_count": 4 + }, + "api/spec/packages/aip/src/governance/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./governance.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Governance;\n\ninterface GovernanceOperations {\n /**\n * Query feature access for a list of customers.\n *\n * The endpoint resolves each provided identifier to a customer and returns the\n * access status for the requested features, plus optional credit balance\n * availability.", + "symbols": [], + "line_count": 36 + }, + "api/spec/packages/aip/src/invoices/index.tsp": { + "header": "import \"./invoice.tsp\";\nimport \"./party.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/invoices/invoice.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Invoices;\n\n/**\n * InvoiceNumber is a unique identifier for the invoice, generated by the invoicing\n * app.\n *\n * The uniqueness depends on a lot of factors:\n *\n * - app setting (unique per app or unique per customer)\n * - multiple app scenarios (multiple apps generating invoices with the same\n * prefix)\n */\n@example(\"INV-2024-01-01-01\")\n@minLength(1)\n@maxLength(256)\n@friendlyName(\"BillingInvoiceNumber\")\nscalar InvoiceNumber extends string;", + "symbols": [], + "line_count": 19 + }, + "api/spec/packages/aip/src/invoices/party.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Invoices;\n\n/*\n * Omitted fields\n *\n * identities: Set of codes used to identify the party in other systems.\n * -> This is maintained by apps, and for now we don't see any reason to have this included.\n * people: Details of physical people who represent the party.\n * -> We don't need this level of detail for now, the name is enough if we deal with a person.\n * inboxes: \tDigital inboxes used for forwarding electronic versions of documents\n * -> We don't support this.\n * emails:\n * -> We don't need this on the invoice.\n * websites: \tPublic websites that provide further information about the party.\n * telephones: Telephone numbers for contacting the party.\n * registration: Additional registration details about the company that may need to be included in a document.\n * logos: Images that can be used to identify the party visually.\n * ext: (tax) Extension code map for any additional regime specific codes that may be required.", + "symbols": [], + "line_count": 82 + }, + "api/spec/packages/aip/src/konnect.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"./shared/index.tsp\";\nimport \"./events/index.tsp\";\nimport \"./meters/index.tsp\";\nimport \"./customers/index.tsp\";\nimport \"./customers/credits/index.tsp\";\nimport \"./entitlements/index.tsp\";\nimport \"./subscriptions/index.tsp\";\nimport \"./apps/index.tsp\";\nimport \"./billing/index.tsp\";\nimport \"./tax/index.tsp\";\nimport \"./defaults/index.tsp\";\nimport \"./governance/index.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n", + "symbols": [], + "line_count": 231 + }, + "api/spec/packages/aip/src/llmcost/index.tsp": { + "header": "import \"./prices.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/llmcost/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./prices.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace LLMCost;\n\n/**\n * Filter options for listing LLM cost prices.\n */\n#suppress \"@openmeter/api-spec-aip/repeated-prefix-grouping\" \"model_id and model_name should not be grouped\"\n@friendlyName(\"ListLLMCostPricesParamsFilter\")\nmodel ListPricesParamsFilter {", + "symbols": [], + "line_count": 135 + }, + "api/spec/packages/aip/src/llmcost/prices.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace LLMCost;\n\n/**\n * Identifies where an LLM cost price came from.\n */\n@friendlyName(\"LLMCostPriceSource\")\nenum PriceSource {\n /** Price was manually configured by a user. */\n Manual: \"manual\",\n\n /** Price was automatically synced from external pricing sources. */\n System: \"system\",\n}\n\n/**\n * Token pricing for an LLM model, denominated per token.\n */\n#suppress \"@openmeter/api-spec-aip/repeated-prefix-grouping\" \"per token prices should be grouped together\"", + "symbols": [], + "line_count": 191 + }, + "api/spec/packages/aip/src/main.tsp": { + "header": "import \"./openmeter.tsp\";\nimport \"./konnect.tsp\";\nimport \"./test.tsp\";", + "symbols": [], + "line_count": 3 + }, + "api/spec/packages/aip/src/meters/index.tsp": { + "header": "import \"./meter.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/meters/meter.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Meters;\n\n/**\n * A meter is a configuration that defines how to match and aggregate events.\n */\n@friendlyName(\"Meter\")\n@example(#{\n id: \"01G65Z755AFWAKHE12NY0CQ9FH\",\n key: \"tokens_total\",\n name: \"Tokens Total\",\n description: \"AI Token Usage\",\n aggregation: \"sum\",\n event_type: \"prompt\",\n value_property: \"$.tokens\",\n dimensions: #{ `model`: \"$.model\", type: \"$.type\" },\n created_at: Shared.DateTime.fromISO(\"2024-01-01T01:01:01.001Z\"),\n updated_at: Shared.DateTime.fromISO(\"2024-01-01T01:01:01.001Z\"),\n})", + "symbols": [], + "line_count": 83 + }, + "api/spec/packages/aip/src/meters/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./meter.tsp\";\nimport \"./query.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Meters;\n\n/**\n * Filter options for listing meters.\n */\n@friendlyName(\"ListMetersParamsFilter\")", + "symbols": [], + "line_count": 177 + }, + "api/spec/packages/aip/src/meters/query.tsp": { + "header": "import \"@typespec/json-schema\";\nimport \"../shared/index.tsp\";\n\nusing TypeSpec.JsonSchema;\n\nnamespace Meters;\n\n/**\n * The granularity of the time grouping. Time durations are specified in ISO 8601\n * format.\n */\n@friendlyName(\"MeterQueryGranularity\")\nunion MeterQueryGranularity {\n /**\n * 1 minute time buckets.\n */\n @summary(\"1 minute\")\n Minute: \"PT1M\",\n\n /**", + "symbols": [], + "line_count": 173 + }, + "api/spec/packages/aip/src/openmeter.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"./shared/index.tsp\";\nimport \"./events/index.tsp\";\nimport \"./meters/index.tsp\";\nimport \"./customers/index.tsp\";\nimport \"./subscriptions/index.tsp\";\nimport \"./apps/index.tsp\";\nimport \"./billing/index.tsp\";\nimport \"./currencies/index.tsp\";\nimport \"./features/index.tsp\";\nimport \"./llmcost/index.tsp\";\nimport \"./productcatalog/index.tsp\";\nimport \"./defaults/index.tsp\";\nimport \"./governance/index.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;", + "symbols": [], + "line_count": 203 + }, + "api/spec/packages/aip/src/productcatalog/addon.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./ratecard.tsp\";\nimport \"./plan.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * The status of the add-on defined by the `effective_from` and `effective_to`\n * properties.\n *\n * - `draft`: The add-on has not yet been published and can be edited.\n * - `active`: The add-on is published and available for use.\n * - `archived`: The add-on is no longer available for use.\n */\n@friendlyName(\"AddonStatus\")\nenum AddonStatus {\n Draft: \"draft\",\n Active: \"active\",\n Archived: \"archived\",\n}", + "symbols": [], + "line_count": 116 + }, + "api/spec/packages/aip/src/productcatalog/index.tsp": { + "header": "import \"./price.tsp\";\nimport \"./unitconfig.tsp\";\nimport \"./ratecard.tsp\";\nimport \"./plan.tsp\";\nimport \"./addon.tsp\";\nimport \"./planaddon.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 7 + }, + "api/spec/packages/aip/src/productcatalog/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./ratecard.tsp\";\nimport \"./plan.tsp\";\nimport \"./planaddon.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace ProductCatalog;\n\n/**\n * Filter options for listing plans.\n */", + "symbols": [], + "line_count": 335 + }, + "api/spec/packages/aip/src/productcatalog/plan.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./ratecard.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * The status of a plan.\n *\n * - `draft`: The plan has not yet been published and can be edited.\n * - `active`: The plan is published and can be used in subscriptions.\n * - `archived`: The plan is no longer available for use.\n * - `scheduled`: The plan is scheduled to be published at a future date.\n */\n@friendlyName(\"BillingPlanStatus\")\nenum PlanStatus {\n Draft: \"draft\",\n Active: \"active\",\n Archived: \"archived\",\n Scheduled: \"scheduled\",\n}", + "symbols": [], + "line_count": 157 + }, + "api/spec/packages/aip/src/productcatalog/planaddon.tsp": { + "header": "import \"./addon.tsp\";\nimport \"./plan.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * PlanAddon represents an association between a plan and an add-on, controlling\n * which add-ons are available for purchase within a plan.\n */\n@friendlyName(\"PlanAddon\")\nmodel PlanAddon {\n ...Shared.Resource;\n\n /**\n * The add-on associated with the plan.\n */\n @summary(\"Add-on\")\n @visibility(Lifecycle.Read, Lifecycle.Create)\n addon: Shared.ResourceReference;\n", + "symbols": [], + "line_count": 44 + }, + "api/spec/packages/aip/src/productcatalog/price.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * The type of the price.\n *\n * - `free`: No charge, the rate card is included at no cost.\n * - `flat`: A fixed amount charged once per billing period, regardless of usage.\n * - `unit`: A fixed rate charged per billing unit consumed.\n * - `graduated`: Tiered pricing where each tier's rate applies only to usage\n * within that tier.\n * - `volume`: Tiered pricing where the rate for the highest tier reached applies\n * to all units in the period.\n */\n@friendlyName(\"BillingPriceType\")\nenum PriceType {\n Free: \"free\",\n Flat: \"flat\",\n Unit: \"unit\",", + "symbols": [], + "line_count": 238 + }, + "api/spec/packages/aip/src/productcatalog/ratecard.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"../billing/tax.tsp\";\nimport \"../features/index.tsp\";\nimport \"../tax/codes.tsp\";\nimport \"./price.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * Settlement mode for billing.\n *\n * Values:\n *\n * - `credit_then_invoice`: Credits are applied first, then any remainder is\n * invoiced.\n * - `credit_only`: Usage is settled exclusively against credits.\n */\n@friendlyName(\"BillingSettlementMode\")\n@summary(\"Settlement mode\")\nenum SettlementMode {", + "symbols": [], + "line_count": 147 + }, + "api/spec/packages/aip/src/productcatalog/unitconfig.tsp": { + "header": "import \"../shared/index.tsp\";\nimport \"./price.tsp\";\n\nnamespace ProductCatalog;\n\n/**\n * The arithmetic operation used to convert raw metered units into billing units.\n *\n * - `divide`: Divide the metered quantity by the conversion factor (e.g., bytes \u00f7\n * 1e9 = GB).\n * - `multiply`: Multiply the metered quantity by the conversion factor (e.g., cost\n * \u00d7 1.2 = cost + 20% margin).\n */\n@friendlyName(\"BillingUnitConfigOperation\")\nenum UnitConfigOperation {\n Divide: \"divide\",\n Multiply: \"multiply\",\n}\n\n/**", + "symbols": [], + "line_count": 158 + }, + "api/spec/packages/aip/src/shared/address.tsp": { + "header": "import \"./properties.tsp\";\n\nnamespace Shared;\n\n/**\n * Address\n */\n@friendlyName(\"Address\")\nmodel Address {\n /**\n * Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html)\n * alpha-2 format.\n */\n @visibility(Lifecycle.Create, Lifecycle.Read, Lifecycle.Update)\n @summary(\"Country\")\n country?: CountryCode;\n\n /**\n * Postal code.\n */", + "symbols": [], + "line_count": 59 + }, + "api/spec/packages/aip/src/shared/consts.tsp": { + "header": "namespace Shared;\n\nconst MeteringAndBillingTitle = \"Metering & Billing\";\nconst OpenMeterTitle = \"OpenMeter\";\n\nconst MetersTag = \"Meters\";\nconst MetersDescription = \"Meters specify how to aggregate events for billing and analytics purposes. Meters can be configured with multiple aggregation methods and groupings. Multiple meters can be created for the same event type, enabling flexible metering scenarios.\";\n\nconst EventsTag = \"Metering Events\";\nconst EventsDescription = \"Metering events are used to track usage of your product or service. Events are processed asynchronously by the meters, so they may not be immediately available for querying.\";\n\nconst CustomersTag = \"OpenMeter Customers\";\nconst CustomersDescription = \"Customers are used to track usage of your product or service. Customers can be individuals or organizations that can subscribe to plans and have access to features.\";\n\nconst EntitlementsTag = \"OpenMeter Entitlements\";\nconst EntitlementsDescription = \"Entitlements are used to control access to features for customers.\";\n\nconst SubscriptionsTag = \"OpenMeter Subscriptions\";\nconst SubscriptionsDescription = \"Subscriptions are used to track usage of your product or service. Subscriptions can be individuals or organizations that can subscribe to plans and have access to features.\";\n", + "symbols": [], + "line_count": 50 + }, + "api/spec/packages/aip/src/shared/enums.tsp": { + "header": "namespace Shared;\n\n/**\n * Identifies which system manages a resource.\n *\n * Values:\n *\n * - `manual`: The resource is managed manually (overridden by our API users).\n * - `system`: The resource is managed by the system.\n * - `subscription`: The resource is managed by the subscription.\n */\n@friendlyName(\"ResourceManagedBy\")\n@summary(\"Resource managed by\")\nenum ResourceManagedBy {\n Manual: \"manual\",\n System: \"system\",\n Subscription: \"subscription\",\n}", + "symbols": [], + "line_count": 18 + }, + "api/spec/packages/aip/src/shared/errors.tsp": { + "header": "namespace Shared;\n\n/**\n * Shared properties for inline errors returned inside a 2xx response.\n *\n * Use for partially successful responses (e.g. per-item failures alongside\n * a `data` array) or for pre-flight findings on resources that are not yet\n * finalized (e.g. validation errors on a draft resource).\n *\n * This is **not** an RFC-7807 problem detail. RFC-7807 covers errors that\n * fail the whole request; inline errors live as fields on the response or\n * resource model.\n *\n * Compose with `is` and add domain-specific identifying fields as needed:\n *\n * ```tsp\n * @friendlyName(\"MyOperationError\")\n * model MyOperationError is Shared.BaseError {\n * // domain-specific identifiers, e.g. the input that produced the error\n * subject?: string;", + "symbols": [], + "line_count": 50 + }, + "api/spec/packages/aip/src/shared/filters.tsp": { + "header": "import \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/json-schema\";\nimport \"./properties.tsp\";\n\nusing TypeSpec.JsonSchema;\n\nnamespace Shared;\n\n/**\n * A query filter for a string attribute. Operators are mutually exclusive, only\n * one operator is allowed at a time.\n */\n@friendlyName(\"QueryFilterString\")\n@summary(\"Query String Filter\")\nmodel QueryFilterString {\n /**\n * The attribute equals the provided value.\n */\n eq?: string;", + "symbols": [], + "line_count": 286 + }, + "api/spec/packages/aip/src/shared/index.tsp": { + "header": "import \"./address.tsp\";\nimport \"./consts.tsp\";\nimport \"./enums.tsp\";\nimport \"./errors.tsp\";\nimport \"./filters.tsp\";\nimport \"./parameters.tsp\";\nimport \"./properties.tsp\";\nimport \"./request.tsp\";\nimport \"./resource.tsp\";\nimport \"./responses.tsp\";", + "symbols": [], + "line_count": 10 + }, + "api/spec/packages/aip/src/shared/parameters.tsp": { + "header": "import \"@typespec/http\";\nimport \"../common/parameters.tsp\";\n\nnamespace Shared;\n\n/**\n * Resource filters.\n */\n@friendlyName(\"ResourceFilters\")\nmodel ResourceFilters {\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n name?: Common.StringFieldFilter;\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n labels?: Common.LabelsFieldFilter;\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n public_labels?: Common.LabelsFieldFilter;\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n created_at?: Common.DateTimeFieldFilter;\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n updated_at?: Common.DateTimeFieldFilter;", + "symbols": [], + "line_count": 23 + }, + "api/spec/packages/aip/src/shared/properties.tsp": { + "header": "import \"../common/properties.tsp\";\n\nnamespace Shared;\n\n// See: https://github.com/ulid/spec/issues/94\n/**\n * ULID (Universally Unique Lexicographically Sortable Identifier).\n */\n@pattern(\"^[0-7][0-9A-HJKMNP-TV-Z]{25}$\")\n@example(\"01G65Z755AFWAKHE12NY0CQ9FH\")\n@friendlyName(\"ULID\")\n@summary(\"ULID\")\nscalar ULID extends string;\n\n/**\n * A key is a unique string that is used to identify a resource.\n */\n@pattern(\n \"^[a-z0-9]+(?:_[a-z0-9]+)*$\",\n \"Must start with a lowercase letter or a number. Can contain lowercase letters, numbers, and underscores.\"", + "symbols": [], + "line_count": 186 + }, + "api/spec/packages/aip/src/shared/request.tsp": { + "header": "import \"@typespec/rest\";\n\nnamespace Shared;\n\n@doc(\"{name} create request.\", T)\n@friendlyName(\"Create{name}Request\", T)\n@withVisibility(Lifecycle.Create)\nmodel CreateRequest is DefaultKeyVisibility;\n\n// Supports visibility filtering for models with nested fields.\n@doc(\"{name} create request.\", T)\n@friendlyName(\"Create{name}Request\", T)\nmodel CreateRequestNested\n is FilterVisibility<\n DefaultKeyVisibility,\n #{ all: #[Lifecycle.Create] },\n \"Create{name}\"\n >;\n\n@doc(\"{name} upsert request.\", T)", + "symbols": [], + "line_count": 32 + }, + "api/spec/packages/aip/src/shared/resource.tsp": { + "header": "import \"../common/properties.tsp\";\nimport \"./properties.tsp\";\n\nnamespace Shared;\n\n/**\n * Represents common fields of resources.\n */\n@friendlyName(\"Resource\")\nmodel Resource {\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"shared model\"\n @visibility(Lifecycle.Read)\n id: ULID;\n\n /**\n * Display name of the resource.\n *\n * Between 1 and 256 characters.\n */\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)", + "symbols": [], + "line_count": 83 + }, + "api/spec/packages/aip/src/shared/responses.tsp": { + "header": "import \"@typespec/rest\";\nimport \"@typespec/http\";\nimport \"../common/properties.tsp\";\n\nnamespace Shared;\n\n@doc(\"{name} response.\", T)\n@friendlyName(\"Get{name}Response\", T)\nmodel GetResponse {\n @Http.statusCode _: 200;\n @Http.body body: T;\n}\n\n@doc(\"{name} created response.\", T)\n@friendlyName(\"Create{name}Response\", T)\nmodel CreateResponse {\n @Http.statusCode _: 201;\n @Http.body body: T;\n}\n", + "symbols": [], + "line_count": 65 + }, + "api/spec/packages/aip/src/subscriptions/index.tsp": { + "header": "import \"./subscription.tsp\";\nimport \"./subscriptionaddon.tsp\";\nimport \"./operations.tsp\";\nimport \"./reference.tsp\";\nimport \"./subscriptionaddon.tsp\";", + "symbols": [], + "line_count": 5 + }, + "api/spec/packages/aip/src/subscriptions/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../shared/index.tsp\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"./subscription.tsp\";\nimport \"./subscriptionaddon.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Subscriptions;\n\n/**\n * Request for canceling a subscription.\n */\n@friendlyName(\"BillingSubscriptionCancel\")\nmodel SubscriptionCancel {", + "symbols": [], + "line_count": 194 + }, + "api/spec/packages/aip/src/subscriptions/reference.tsp": { + "header": "import \"../shared/index.tsp\";\n\nnamespace Subscriptions;\n\n/**\n * Subscription reference represents a reference to the specific subscription item\n * this entity represents.\n */\n@friendlyName(\"BillingSubscriptionReference\")\nmodel SubscriptionReference {\n /**\n * The ID of the subscription.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Subscription ID\")\n id: Shared.ULID;\n\n /**\n * The phase of the subscription.\n */", + "symbols": [], + "line_count": 45 + }, + "api/spec/packages/aip/src/subscriptions/subscription.tsp": { + "header": "import \"@typespec/openapi\";\nimport \"../shared/index.tsp\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace Subscriptions;\n\n/**\n * Subscription status.\n */\n@friendlyName(\"BillingSubscriptionStatus\")\nenum SubscriptionStatus {\n Active: \"active\",\n Inactive: \"inactive\",\n Canceled: \"canceled\",\n Scheduled: \"scheduled\",\n}\n\n/**\n * Subscription edit timing. When immediate, the requested changes take effect", + "symbols": [], + "line_count": 169 + }, + "api/spec/packages/aip/src/subscriptions/subscriptionaddon.tsp": { + "header": "import \"../productcatalog/addon.tsp\";\n\nnamespace Subscriptions;\n\n/**\n * Addon purchased with a subscription.\n */\n#suppress \"@openmeter/api-spec-aip/repeated-prefix-grouping\" \"active_from and active_to should not be grouped\"\n@friendlyName(\"SubscriptionAddon\")\nmodel SubscriptionAddon {\n ...Shared.Resource;\n\n /**\n * The add-on associated with the subscription.\n */\n @summary(\"Add-on\")\n @visibility(Lifecycle.Read, Lifecycle.Create)\n addon: Shared.ResourceReference;\n\n /**", + "symbols": [], + "line_count": 46 + }, + "api/spec/packages/aip/src/tax/codes.tsp": { + "header": "import \"../shared/resource.tsp\";\nimport \"../shared/index.tsp\";\nimport \"../apps/app.tsp\";\n\nnamespace Tax;\n\n/**\n * Mapping of app types to tax codes.\n */\n@friendlyName(\"BillingTaxCodeAppMapping\")\nmodel TaxCodeAppMapping {\n /**\n * The app type that the tax code is associated with.\n */\n @summary(\"App type\")\n app_type: Apps.AppType;\n\n /**\n * Tax code.\n */", + "symbols": [], + "line_count": 38 + }, + "api/spec/packages/aip/src/tax/index.tsp": { + "header": "import \"./codes.tsp\";\nimport \"./operations.tsp\";", + "symbols": [], + "line_count": 2 + }, + "api/spec/packages/aip/src/tax/operations.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"../common/error.tsp\";\nimport \"../common/pagination.tsp\";\nimport \"../common/parameters.tsp\";\nimport \"../shared/index.tsp\";\nimport \"./codes.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace Tax;\n\ninterface TaxCodesOperations {\n @post\n @operationId(\"create-tax-code\")\n @summary(\"Create tax code\")\n @extension(Shared.InternalExtension, true)", + "symbols": [], + "line_count": 75 + }, + "api/spec/packages/aip/src/test.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"./common/parameters.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\n@service(#{ title: \"Filter Test API\" })\n@info(#{ version: \"1.0.0\" })\nnamespace Test;\n\n/**\n * Field filters with all supported types.\n */\n@friendlyName(\"FieldFilters\")\nmodel FieldFilters {\n #suppress \"@openmeter/api-spec-aip/doc-decorator\" \"test model\"\n boolean?: Common.BooleanFieldFilter;", + "symbols": [], + "line_count": 44 + }, + "api/spec/packages/aip/tspconfig.yaml": { + "header": "emit:\n - '@typespec/openapi3'\nparameters:\n base-dir:\n default: '{cwd}'\noutput-dir: '{base-dir}'\noptions:\n '@typespec/openapi3':\n emitter-output-dir: '{output-dir}/output/definitions/metering-and-billing/v3'\n omit-unreachable-types: true\n seal-object-schemas: true\nlinter:\n extends:\n - '@openmeter/api-spec-aip/all'", + "symbols": [], + "line_count": 14 + }, + "api/spec/packages/legacy/README.md": { + "header": "# Legacy API (`packages/legacy`)\n\nThis package defines OpenMeter v1-v2 APIs and OpenMeter Cloud API using TypeSpec, following OpenMeter's existing conventions.\n\n**Outputs:** `openapi.OpenMeter.yaml`, `openapi.OpenMeterCloud.yaml`\n\n---\n\n## Naming conventions\n\n- **Models**: `PascalCase` (e.g. `BillingProfile`, `PlanPhase`)\n- **Model properties**: `camelCase` (e.g. `createdAt`, `billingProfileId`)\n- **Enum names**: `PascalCase`; enum member names: `PascalCase`; enum values: `camelCase` (e.g. `CreatedAt: \"createdAt\"`)\n- **Operation IDs**: `camelCase` verb+noun (e.g. `createMeter`, `listBillingProfiles`)\n\n---\n\n## Use `@visibility` to control property exposure\n\n`@visibility` controls which properties appear in which request/response shapes, allowing one model to serve multiple contexts.", + "symbols": [], + "line_count": 85 + }, + "api/spec/packages/legacy/lib/index.js": { + "header": "const rules = [\n casingRule,\n docDecoratorRule,", + "symbols": [ + { + "kind": "func", + "name": "rules", + "signature": "const rules =", + "line": 9 + } + ], + "line_count": 19 + }, + "api/spec/packages/legacy/lib/rules/casing.js": { + "header": "export const casingRule = createRule({\n name: 'casing',\n severity: 'warning',", + "symbols": [ + { + "kind": "func", + "name": "casingRule", + "signature": "export const casingRule =", + "line": 4 + } + ], + "line_count": 35 + }, + "api/spec/packages/legacy/lib/rules/composition-over-inheritance.js": { + "header": " createRule,\n getDiscriminator,\n getTypeName,", + "symbols": [ + { + "kind": "func", + "name": "compositionOverInheritanceRule", + "signature": "export const compositionOverInheritanceRule =", + "line": 10 + } + ], + "line_count": 44 + }, + "api/spec/packages/legacy/lib/rules/docs.js": { + "header": "export const docDecoratorRule = createRule({\n name: 'doc-decorator',\n severity: 'warning',", + "symbols": [ + { + "kind": "func", + "name": "docDecoratorRule", + "signature": "export const docDecoratorRule =", + "line": 3 + } + ], + "line_count": 62 + }, + "api/spec/packages/legacy/lib/rules/friendly-name.js": { + "header": "export const friendlyNameRule = createRule({\n name: 'friendlyName',\n severity: 'error',", + "symbols": [ + { + "kind": "func", + "name": "friendlyNameRule", + "signature": "export const friendlyNameRule =", + "line": 3 + } + ], + "line_count": 73 + }, + "api/spec/packages/legacy/lib/rules/operation-summary.js": { + "header": "export const operationSummaryRule = createRule({\n name: 'operation-summary',\n severity: 'warning',", + "symbols": [ + { + "kind": "func", + "name": "operationSummaryRule", + "signature": "export const operationSummaryRule =", + "line": 3 + } + ], + "line_count": 27 + }, + "api/spec/packages/legacy/lib/rules/utils.js": { + "header": "const pascalCaseExceptions = ['OAuth2', 'URL', 'API', 'UI', 'ID']\nexport function isPascalCaseNoAcronyms(value) {\n if (value === undefined || value === null || value === '') {", + "symbols": [ + { + "kind": "func", + "name": "pascalCaseExceptions", + "signature": "const pascalCaseExceptions =", + "line": 4 + }, + { + "kind": "func", + "name": "isPascalCaseNoAcronyms", + "signature": "export function isPascalCaseNoAcronyms(value)", + "line": 11 + }, + { + "kind": "func", + "name": "isCamelCaseNoAcronyms", + "signature": "export function isCamelCaseNoAcronyms(value)", + "line": 26 + }, + { + "kind": "func", + "name": "isSnakeCase", + "signature": "export function isSnakeCase(value)", + "line": 39 + }, + { + "kind": "func", + "name": "isKebabCase", + "signature": "export function isKebabCase(value)", + "line": 52 + } + ], + "line_count": 58 + }, + "api/spec/packages/legacy/package.json": { + "header": "{\n \"name\": \"@openmeter/api-spec-legacy\",\n \"version\": \"0.1.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"generate\": \"pnpm generate:openapi && pnpm generate:client\",\n \"generate:openapi\": \"tsp compile --config tspconfig.yaml ./src/cloud\",\n \"generate:client\": \"tsp compile --config tspconfig.client.yaml ./src\",\n \"watch:openapi\": \"tsp compile --watch --config tspconfig.yaml ./src/cloud\",\n \"watch:client\": \"tsp compile --watch --config tspconfig.client.yaml ./src\",\n \"format\": \"prettier --ignore-path ../../.prettierignore --list-different --find-config-path --write .\",\n \"lint\": \"prettier --ignore-path ../../.prettierignore --check .\",\n \"lint:fix\": \"prettier --ignore-path ../../.prettierignore --write .\"\n },\n \"main\": \"./lib/index.js\",\n \"exports\": {\n \".\": {\n \"typespec\": \"./src/cloud/main.tsp\"\n }\n },", + "symbols": [], + "line_count": 35 + }, + "api/spec/packages/legacy/src/app/app.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"./app.tsp\";\nimport \"./capability.tsp\";\nimport \"../errors.tsp\";\nimport \"./stripe.tsp\";\nimport \"../types.tsp\";\nimport \"../query.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Installed Apps API.\n */", + "symbols": [], + "line_count": 160 + }, + "api/spec/packages/legacy/src/app/capability.tsp": { + "header": "import \"../types.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * App capability.\n *\n * Capabilities only exist in config so they don't extend the Resource model.\n */\n@friendlyName(\"AppCapability\")\n@example(#{\n type: AppCapabilityType.CollectPayments,\n key: \"stripe_collect_payment\",\n name: \"Collect Payments\",\n description: \"Stripe payments collects outstanding revenue with Stripe customer's default payment method.\",\n})\nmodel AppCapability {\n /**\n * The capability type.\n */", + "symbols": [], + "line_count": 68 + }, + "api/spec/packages/legacy/src/app/customer.tsp": { + "header": "import \"./app.tsp\";\nimport \"../types.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * CustomerAppData\n * Stores the app specific data for the customer.\n * One of: stripe, sandbox, custom_invoicing\n */\n@friendlyName(\"CustomerAppData\")\n@discriminated(#{ envelope: \"none\", discriminatorPropertyName: \"type\" })\nunion CustomerAppData {\n @summary(\"Stripe\")\n stripe: StripeCustomerAppData,\n\n @summary(\"Sandbox\")\n sandbox: SandboxCustomerAppData,\n\n @summary(\"Custom Invoicing\")", + "symbols": [], + "line_count": 106 + }, + "api/spec/packages/legacy/src/app/custominvoicing.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"../errors.tsp\";\nimport \"../types.tsp\";\nimport \"../billing/invoices/main.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Custom Invoicing app can be used for interface with any invoicing or payment system.\n *\n * This app provides ways to manipulate invoices and payments, however the integration\n * must rely on Notifications API to get notified about invoice changes.\n */", + "symbols": [], + "line_count": 222 + }, + "api/spec/packages/legacy/src/app/main.tsp": { + "header": "// Package Contents\nimport \"./app.tsp\";\nimport \"./capability.tsp\";\nimport \"./customer.tsp\";\nimport \"./marketplace.tsp\";\n\n// Apps\nimport \"./stripe.tsp\";\nimport \"./sandbox.tsp\";\nimport \"./custominvoicing.tsp\";\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 12 + }, + "api/spec/packages/legacy/src/app/marketplace.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"../errors.tsp\";\nimport \"./oauth.tsp\";\nimport \"../types.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Marketplace API.\n */\n@route(\"/api/v1/marketplace\")\n@tag(\"Apps\")\n@friendlyName(\"Marketplace\")\ninterface MarketplaceEndpoints {", + "symbols": [], + "line_count": 244 + }, + "api/spec/packages/legacy/src/app/oauth.tsp": { + "header": "import \"@typespec/http\";\n\nusing TypeSpec.Http;\n\nnamespace OAuth2;\n\n/**\n * Response from the client app (OpenMeter backend) to start the OAuth2 flow.\n *\n */\n@friendlyName(\"ClientAppStartResponse\")\nmodel ClientAppStartResponse {\n /**\n * The URL to start the OAuth2 authorization code grant flow.\n */\n url: string;\n}\n\n/**\n * OAuth2 authorization code grant error types.", + "symbols": [], + "line_count": 135 + }, + "api/spec/packages/legacy/src/app/sandbox.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * Sandbox app can be used for testing OpenMeter features.\n *\n * The app is not creating anything in external systems, thus it is safe to use for\n * verifying OpenMeter features.\n */\n@friendlyName(\"SandboxApp\")\nmodel SandboxApp {\n ...AppBase;\n\n /**\n * The app's type is Sandbox.\n */\n type: AppType.Sandbox;\n}", + "symbols": [], + "line_count": 17 + }, + "api/spec/packages/legacy/src/app/stripe.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"./app.tsp\";\nimport \"./capability.tsp\";\nimport \"../errors.tsp\";\nimport \"../customer\";\nimport \"../types.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Stripe specific APIs.\n */\n@tag(\"App: Stripe\")", + "symbols": [], + "line_count": 778 + }, + "api/spec/packages/legacy/src/auth.tsp": { + "header": "using TypeSpec.Http;\n\n/**\n * Consumer portal token.\n */\n@friendlyName(\"PortalTokenAuth\")\nmodel PortalTokenAuth is BearerAuth;", + "symbols": [], + "line_count": 7 + }, + "api/spec/packages/legacy/src/billing/customeroverride.tsp": { + "header": "using TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/billing/customers\")\n@tag(\"Billing\")\n@friendlyName(\"CustomerOverrides\")\ninterface CustomerOverridesEndpoints {\n /**\n * List customer overrides using the specified filters.\n *\n * The response will include the customer override values and the merged billing profile values.\n *\n * If the includeAllCustomers is set to true, the list contains all customers. This mode is\n * useful for getting the current effective billing workflow settings for all users regardless\n * if they have customer orverrides or not.\n */\n @get\n @summary(\"List customer overrides\")", + "symbols": [], + "line_count": 297 + }, + "api/spec/packages/legacy/src/billing/invoices.tsp": { + "header": "using TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * InvoicesEndpoints is a collection of endpoints that allow invoice operations without prior\n * knowledge of the invoice ID.\n */\n@route(\"/api/v1/billing/invoices\")\n@tag(\"Billing\")\n@friendlyName(\"Invoices\")\ninterface InvoicesEndpoints {\n /**\n * Create a new invoice from the pending line items.\n *\n * This should be only called if for some reason we need to invoice a customer outside of the normal billing cycle.\n *\n * When creating an invoice, the pending line items will be marked as invoiced and the invoice will be created with the total amount of the pending items.\n *", + "symbols": [], + "line_count": 721 + }, + "api/spec/packages/legacy/src/billing/invoices/README.md": { + "header": "# Invoice specification structure\n\nThis directory contains the invoice specification based on [GOBL](https://docs.gobl.org/). We are fond of the universal nature of GOBL as a great schema for describing complex invoicing problems.\n\nUnfortunately for our use-case we had to change/extend the schema. Firstly OpenMeter operates on draft invoices too, and would want to represent the state as part of the Invoice object. GOBL is intended for invoice generation, we on the other hand should support special line item groups (such as tiered pricing). GOBL's representation is good when considering the invoicing use-case, but until we split the tiered prices into seperate line items we should group them together.\n\nFurthermore it would be somewhat inconvinient to represent time series data in the [cbc.Meta object](https://docs.gobl.org/draft-0/cbc/meta).\n\nGOBL can express way more things that we need for now: by removing the unsupported parts from the schema we can use gobl for PUT/POST request payloads.", + "symbols": [], + "line_count": 9 + }, + "api/spec/packages/legacy/src/billing/invoices/credits.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nnamespace OpenMeter;\n\n/**\n * InvoiceLineCreditAllocation represents a credit amount allocated to the line before taxes are applied.\n */\n@friendlyName(\"InvoiceLineCreditAllocation\")\nmodel InvoiceLineCreditAllocation {\n /**\n * Amount allocated from credits.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Amount in the currency of the invoice\")\n amount: Money;\n\n /**\n * Text description as to why the credit was allocated.", + "symbols": [], + "line_count": 24 + }, + "api/spec/packages/legacy/src/billing/invoices/discounts.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nnamespace OpenMeter;\n\n/**\n * InvoiceDiscountBase represents a charge or discount that can be applied to a line or the entire invoice.\n */\n@friendlyName(\"InvoiceDiscountBase\")\nmodel InvoiceDiscountBase {\n ...ResourceTimestamps;\n\n /**\n * ID of the charge or discount.\n */\n @visibility(Lifecycle.Read)\n id: ULID;\n\n /**", + "symbols": [], + "line_count": 196 + }, + "api/spec/packages/legacy/src/billing/invoices/docref.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * InvoiceDocumentRefType defines the type of document that is being referenced.\n */\n@friendlyName(\"InvoiceDocumentRefType\")\nenum InvoiceDocumentRefType {\n creditNoteOriginalInvoice: \"credit_note_original_invoice\",\n}\n\n/**\n * Omitted fields:", + "symbols": [], + "line_count": 83 + }, + "api/spec/packages/legacy/src/billing/invoices/invoice.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * InvoiceNumber is a unique identifier for the invoice, generated by the\n * invoicing app.\n *\n * The uniqueness depends on a lot of factors:\n * - app setting (unique per app or unique per customer)\n * - multiple app scenarios (multiple apps generating invoices with the same prefix)\n */\n@example(\"INV-2024-01-01-01\")\n@minLength(1)", + "symbols": [], + "line_count": 1056 + }, + "api/spec/packages/legacy/src/billing/invoices/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"../..\";\nimport \"../../productcatalog\";\n\n// Package Contents\nimport \"./invoice.tsp\";\nimport \"./tax.tsp\";\nimport \"./party.tsp\";\nimport \"./pay.tsp\";\nimport \"./docref.tsp\";\nimport \"./discounts.tsp\";\nimport \"./credits.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;", + "symbols": [], + "line_count": 24 + }, + "api/spec/packages/legacy/src/billing/invoices/party.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nimport \"../../customer\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/*\n * Omitted fields\n *\n * identities: Set of codes used to identify the party in other systems.\n * -> This is maintained by apps, and for now we don't see any reason to have this included.\n * people: Details of physical people who represent the party.\n * -> We don't need this level of detail for now, the name is enough if we deal with a person.\n * inboxes: \tDigital inboxes used for forwarding electronic versions of documents", + "symbols": [], + "line_count": 94 + }, + "api/spec/packages/legacy/src/billing/invoices/pay.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * PaymentDueDate contains an amount that should be paid by the given date.\n */\n@friendlyName(\"PaymentDueDate\")\nmodel PaymentDueDate {\n /**\n * When the payment is due.\n */\n // Note: This is a date-time, but we should use a date-time string to be more specific. (original schema has a Date field)\n @visibility(Lifecycle.Read)", + "symbols": [], + "line_count": 118 + }, + "api/spec/packages/legacy/src/billing/invoices/tax.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * TaxConfig stores the configuration for a tax line relative to an invoice line.\n */\n@friendlyName(\"InvoiceLineTaxItem\")\nmodel InvoiceLineTaxItem {\n /**\n * Tax provider configuration.\n */\n @visibility(Lifecycle.Read)\n config?: TaxConfig;", + "symbols": [], + "line_count": 60 + }, + "api/spec/packages/legacy/src/billing/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"..\";\nimport \"./invoices/main.tsp\";\n\n// Package Contents\nimport \"./profile.tsp\";\nimport \"./customeroverride.tsp\";\nimport \"./invoices.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\nusing TypeSpec.Versioning;\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 20 + }, + "api/spec/packages/legacy/src/billing/profile.tsp": { + "header": "import \"../rest.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/billing/profiles\")\n@tag(\"Billing\")\n@friendlyName(\"BillingProfiles\")\ninterface BillingProfilesEndpoints {\n /**\n * List all billing profiles matching the specified filters.\n *\n * The expand option can be used to include additional information (besides the billing profile)\n * in the response. For example by adding the expand=apps option the apps used by the billing profile\n * will be included in the response.\n */\n @get\n @operationId(\"listBillingProfiles\")", + "symbols": [], + "line_count": 509 + }, + "api/spec/packages/legacy/src/cloud/auth.tsp": { + "header": "using TypeSpec.Http;\n\n/**\n * Cloud API token.\n */\n@friendlyName(\"CloudTokenAuth\")\nmodel CloudTokenAuth is BearerAuth;\n\n/**\n * Cloud API web app cookie.\n */\n@friendlyName(\"CloudCookieAuth\")\nmodel CloudCookieAuth is ApiKeyAuth;\n\n/**\n * Cloud consumer portal token.\n */\n@friendlyName(\"CloudPortalTokenAuth\")\nmodel CloudPortalTokenAuth is BearerAuth;", + "symbols": [], + "line_count": 19 + }, + "api/spec/packages/legacy/src/cloud/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"..\";\n\nimport \"./auth.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\n/**\n * OpenMeter is a cloud native usage metering service.\n * The OpenMeter API allows you to ingest events, query meter usage, and manage resources.\n */\n@service(#{ title: \"OpenMeter Cloud API\" })\n@info(#{\n version: \"1.0.0\",\n license: #{", + "symbols": [], + "line_count": 331 + }, + "api/spec/packages/legacy/src/customer/app.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nimport \"../app\";\nimport \"../rest.tsp\";\nimport \"../errors.tsp\";\nimport \"../types.tsp\";\nimport \"../query.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Customer App Data API.\n */\n@route(\"/api/v1/customers/{customerIdOrKey}/apps\")\n@tag(\"Customers\")", + "symbols": [], + "line_count": 71 + }, + "api/spec/packages/legacy/src/customer/customer.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nimport \"../productcatalog\";\nimport \"../rest.tsp\";\nimport \"../errors.tsp\";\nimport \"../types.tsp\";\nimport \"../query.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Customer API.\n */\n@route(\"/api/v1/customers\")\n@tag(\"Customers\")", + "symbols": [], + "line_count": 291 + }, + "api/spec/packages/legacy/src/customer/main.tsp": { + "header": "import \"./app.tsp\";\nimport \"./customer.tsp\";\nimport \"./stripe.tsp\";\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 5 + }, + "api/spec/packages/legacy/src/customer/stripe.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nimport \"../rest.tsp\";\nimport \"../errors.tsp\";\nimport \"../types.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n/**\n * Customer Stripe API.\n */\n@route(\"/api/v1/customers/{customerIdOrKey}/stripe\")\n@tag(\"Customers\")\n@tag(\"Apps\")\n@friendlyName(\"CustomerStripe\")\ninterface CustomerStripeEndpoints {", + "symbols": [], + "line_count": 163 + }, + "api/spec/packages/legacy/src/debug.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/debug\")\n@tag(\"Debug\")\n@friendlyName(\"Debug\")\ninterface DebugEndpoints {\n /**\n * Returns debug metrics (in OpenMetrics format) like the number of ingested events since mindnight UTC.\n *\n * The OpenMetrics Counter(s) reset every day at midnight UTC.\n */\n @get\n @route(\"/metrics\")\n @operationId(\"getDebugMetrics\")", + "symbols": [], + "line_count": 35 + }, + "api/spec/packages/legacy/src/entitlements/customer.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/customers/{customerIdOrKey}\")\n@tag(\"Entitlements\")\n@tag(\"Customers\")\n@friendlyName(\"Customer\")\ninterface CustomerEndpoints {\n /**\n * Get the overall access of a customer.\n */\n @get\n @operationId(\"getCustomerAccess\")\n @route(\"/access\")", + "symbols": [], + "line_count": 57 + }, + "api/spec/packages/legacy/src/entitlements/entitlements.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Order by options for entitlements.\n */\n@friendlyName(\"EntitlementOrderBy\")\nenum EntitlementOrderBy {\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n CreatedAt: \"createdAt\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n UpdatedAt: \"updatedAt\",\n}\n", + "symbols": [], + "line_count": 434 + }, + "api/spec/packages/legacy/src/entitlements/grant.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Order by options for grants.\n */\n@friendlyName(\"GrantOrderBy\")\nenum GrantOrderBy {\n ID: \"id\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n CreatedAt: \"createdAt\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n UpdatedAt: \"updatedAt\",", + "symbols": [], + "line_count": 243 + }, + "api/spec/packages/legacy/src/entitlements/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"..\";\n\n// Package Contents\nimport \"./entitlements.tsp\";\nimport \"../productcatalog/features.tsp\";\nimport \"./grant.tsp\";\nimport \"./subjects.tsp\";\nimport \"./customer.tsp\";\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 16 + }, + "api/spec/packages/legacy/src/entitlements/subjects.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/subjects/{subjectIdOrKey}/entitlements\")\n@tag(\"Entitlements\")\n@friendlyName(\"Subjects\")\ninterface SubjectEntitlementsEndpoints {\n /**\n * OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).\n *\n * - Boolean entitlements define static feature access, e.g. \"Can use SSO authentication\".\n * - Static entitlements let you pass along a configuration while granting access, e.g. \"Using this feature with X Y settings\" (passed in the config).\n * - Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems. Example: The customer can use 10000 AI tokens during the usage period of the entitlement.\n *", + "symbols": [], + "line_count": 432 + }, + "api/spec/packages/legacy/src/entitlements/v2/customer.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\nimport \"..\";\nimport \"../..\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v2/customers/{customerIdOrKey}/entitlements\")\n@tag(\"Entitlements\")\n@friendlyName(\"CustomerEntitlementsV2\")\ninterface CustomerEntitlementsV2Endpoints {\n /**\n * OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).\n *\n * - Boolean entitlements define static feature access, e.g. \"Can use SSO authentication\".\n * - Static entitlements let you pass along a configuration while granting access, e.g. \"Using this feature with X Y settings\" (passed in the config).", + "symbols": [], + "line_count": 271 + }, + "api/spec/packages/legacy/src/entitlements/v2/entitlements.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\nimport \"..\";\nimport \"../..\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v2/entitlements\")\n@tag(\"Entitlements\")\n@friendlyName(\"EntitlementsV2\")\ninterface EntitlementsV2Endpoints {\n /**\n * List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.\n * To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.\n */\n @get", + "symbols": [], + "line_count": 237 + }, + "api/spec/packages/legacy/src/entitlements/v2/grant.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\nimport \"..\";\nimport \"../..\";\n\nnamespace OpenMeter;\n\n/**\n * The grant.\n */\n@friendlyName(\"EntitlementGrantV2\")\nmodel GrantV2 {\n ...ResourceTimestamps;\n ...OmitProperties;\n\n /**\n * Readonly unique ULID identifier.\n */\n @example(\"01ARZ3NDEKTSV4RRFFQ69G5FAV\")", + "symbols": [], + "line_count": 80 + }, + "api/spec/packages/legacy/src/entitlements/v2/grants.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\nimport \"..\";\nimport \"../..\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v2/grants\")\n@tag(\"Entitlements\")\n@friendlyName(\"GrantsV2\")\ninterface GrantsV2Endpoints {\n /**\n * List all grants for all the customers and entitlements. This endpoint is intended for administrative purposes only.\n * To fetch the grants of a specific entitlement please use the /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants endpoint.\n * If page is provided that takes precedence and the paginated response is returned.\n */", + "symbols": [], + "line_count": 50 + }, + "api/spec/packages/legacy/src/entitlements/v2/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"..\";\n\n// Package Contents\nimport \"./entitlements.tsp\";\nimport \"./customer.tsp\";\nimport \"./grants.tsp\";\nimport \"./grant.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\nusing TypeSpec.Versioning;\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 22 + }, + "api/spec/packages/legacy/src/errors.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * A Problem Details object (RFC 7807).\n * Additional properties specific to the problem type may be present.\n */\n@error\n@extension(\"x-go-type\", \"models.StatusProblem\")\n@extension(\n \"x-go-type-import\",\n #{ path: \"github.com/openmeterio/openmeter/pkg/models\" }\n)\n@friendlyName(\"UnexpectedProblemResponse\")\nmodel Error {", + "symbols": [], + "line_count": 257 + }, + "api/spec/packages/legacy/src/events.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/events\")\n@tag(\"Events\")\n@friendlyName(\"Events\")\ninterface EventsEndpoints {\n /**\n * List ingested events within a time range.\n *\n * If the from query param is not provided it defaults to last 72 hours.\n */\n @get\n @operationId(\"listEvents\")", + "symbols": [], + "line_count": 330 + }, + "api/spec/packages/legacy/src/filter.tsp": { + "header": "import \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * A filter for a string field.\n */\n@friendlyName(\"FilterString\")\nmodel FilterString {\n /**\n * The field must be equal to the provided value.\n */\n @extension(\"x-omitempty\", true)\n $eq?: string | null;\n\n /**\n * The field must not be equal to the provided value.\n */", + "symbols": [], + "line_count": 303 + }, + "api/spec/packages/legacy/src/info/currencies.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * Currency describes a currency supported by OpenMeter.\n */\n@friendlyName(\"Currency\")\nmodel Currency {\n /**\n * The currency ISO code.\n */\n code: CurrencyCode;\n\n /**\n * The currency name.\n */\n name: string;\n\n /**\n * The currency symbol.\n */", + "symbols": [], + "line_count": 27 + }, + "api/spec/packages/legacy/src/info/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"..\";\n\n// Package Contents\nimport \"./currencies.tsp\";\nimport \"./progress.tsp\";\nimport \"./routes.tsp\";\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 12 + }, + "api/spec/packages/legacy/src/info/progress.tsp": { + "header": "namespace OpenMeter;\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\n@route(\"/api/v1/info/progress\")\n@tag(\"Lookup Information\")\n@friendlyName(\"Progress\")\ninterface ProgressEndpoints {\n /**\n * Get progress\n */\n @get\n @route(\"/{id}\")\n @operationId(\"getProgress\")\n @summary(\"Get progress\")\n getProgress(id: string): Progress | NotFoundError | CommonErrors;\n}\n\n/**", + "symbols": [], + "line_count": 44 + }, + "api/spec/packages/legacy/src/info/routes.tsp": { + "header": "import \"../rest.tsp\";\n\nnamespace OpenMeter;\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\n@route(\"/api/v1/info/currencies\")\n@tag(\"Lookup Information\")\n@friendlyName(\"Currencies\")\ninterface CurrenciesEndpoints {\n /**\n * List all supported currencies.\n */\n @get\n @operationId(\"listCurrencies\")\n @summary(\"List supported currencies\")\n listCurrencies(): Currency[] | CommonErrors;\n}", + "symbols": [], + "line_count": 19 + }, + "api/spec/packages/legacy/src/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"./auth.tsp\";\nimport \"./errors.tsp\";\nimport \"./types.tsp\";\nimport \"./filter.tsp\";\n\nimport \"./app\";\nimport \"./query.tsp\";\nimport \"./customer\";\nimport \"./events.tsp\";\nimport \"./meters.tsp\";\nimport \"./portal.tsp\";\nimport \"./subjects.tsp\";\nimport \"./debug.tsp\";\nimport \"./notification\";", + "symbols": [], + "line_count": 118 + }, + "api/spec/packages/legacy/src/meters.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nimport \"./types.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Query params for listing meters.\n */\n@friendlyName(\"queryMeterList\")\nmodel ListMetersParams {\n ...QueryPagination;\n\n /**\n * Order meters by.", + "symbols": [], + "line_count": 674 + }, + "api/spec/packages/legacy/src/notification/channel.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Type of the notification channel.\n */\n@friendlyName(\"NotificationChannelType\")\n@extension(\"x-enum-varnames\", #[\"Webhook\"])\nenum NotificationChannelType {\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Ignore due to backward compatibility\"\n webhook: \"WEBHOOK\",\n}\n\n/**", + "symbols": [], + "line_count": 241 + }, + "api/spec/packages/legacy/src/notification/entitlements.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Payload for notification event with `entitlements.balance.threshold` type.\n */\n@friendlyName(\"NotificationEventBalanceThresholdPayload\")\nmodel NotificationEventBalanceThresholdPayload {\n /**\n * A unique identifier for the notification event the payload belongs to.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Notification Event Identifier\")\n @example(\"01J2KNP1YTXQRXHTDJ4KPR7PZ0\")", + "symbols": [], + "line_count": 275 + }, + "api/spec/packages/legacy/src/notification/event.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Type of the notification event.\n */\n@friendlyName(\"NotificationEventType\")\nenum NotificationEventType {\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Ignore due to backward compatibility\"\n entitlementsBalanceThreshold: \"entitlements.balance.threshold\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Ignore due to backward compatibility\"\n entitlementsReset: \"entitlements.reset\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Ignore due to backward compatibility\"\n invoiceCreated: \"invoice.created\",", + "symbols": [], + "line_count": 339 + }, + "api/spec/packages/legacy/src/notification/invoice.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Payload for notification event with `invoice.*` type.\n */\n@friendlyName(\"NotificationEventInvoicePayload\")\nmodel NotificationEventInvoicePayload {\n /**\n * A unique identifier for the notification event the payload belongs to.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Notification Event Identifier\")\n @example(\"01J2KNP1YTXQRXHTDJ4KPR7PZ0\")", + "symbols": [], + "line_count": 110 + }, + "api/spec/packages/legacy/src/notification/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\nimport \"@typespec/versioning\";\n\nimport \"..\";\n\n// Package Contents\nimport \"./channel.tsp\";\nimport \"./rule.tsp\";\nimport \"./event.tsp\";\nimport \"./entitlements.tsp\";\nimport \"./invoice.tsp\";\n\nusing TypeSpec.Http;\nusing TypeSpec.Rest;\nusing TypeSpec.OpenAPI;\nusing TypeSpec.Versioning;\n", + "symbols": [], + "line_count": 21 + }, + "api/spec/packages/legacy/src/notification/rule.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Metadata only fields of a notification channel.\n */\n@friendlyName(\"NotificationRuleMeta\")\nmodel NotificationRuleMeta {\n /**\n * Identifies the notification rule.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Rule Unique Identifier\")\n @example(\"01ARZ3NDEKTSV4RRFFQ69G5FAV\")", + "symbols": [], + "line_count": 227 + }, + "api/spec/packages/legacy/src/portal.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter.Portal;\n\n@route(\"/api/v1/portal/tokens\")\n@tag(\"Portal\")\n@friendlyName(\"PortalTokens\")\ninterface TokensEndpoints {\n /**\n * Create a consumer portal token.\n */\n @post\n @operationId(\"createPortalToken\")\n @summary(\"Create consumer portal token\")\n create(@body token: Token): {", + "symbols": [], + "line_count": 140 + }, + "api/spec/packages/legacy/src/productcatalog/addon.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * The status of the add-on defined by the effectiveFrom and effectiveTo properties.\n */\n@friendlyName(\"AddonStatus\")\nenum AddonStatus {\n draft: \"draft\",\n active: \"active\",\n archived: \"archived\",\n}\n\n/**\n * The instanceType of the add-on.\n * Single instance add-ons can be added to subscription only once while add-ons with multiple type can be added more then once.\n */", + "symbols": [], + "line_count": 113 + }, + "api/spec/packages/legacy/src/productcatalog/alignment.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * Alignment configuration for a plan or subscription.\n */\n#deprecated \"Not used anymore\"\n@friendlyName(\"Alignment\")\nmodel Alignment {\n /**\n * Whether all Billable items and RateCards must align.\n * Alignment means the Price's BillingCadence must align for both duration and anchor time.\n */\n #deprecated \"Not used anymore\"\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n billablesMustAlign?: boolean;\n}", + "symbols": [], + "line_count": 20 + }, + "api/spec/packages/legacy/src/productcatalog/discounts.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * Percentage discount.\n */\n@friendlyName(\"DiscountPercentage\")\nmodel DiscountPercentage {\n /**\n * The percentage of the discount.\n */\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)\n @summary(\"Percentage\")\n @minValue(0)\n @maxValue(100)\n percentage: Percentage;\n}\n\n// NOTE(chrisgacsal): amount discount is going to be implemented in future releases\n// /**\n// * Amount discount.", + "symbols": [], + "line_count": 71 + }, + "api/spec/packages/legacy/src/productcatalog/errors.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"../errors.tsp\";\nimport \"./ratecards.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * Common errors for the product catalog API.\n */\nalias CommonSubscriptionErrors =\n | SubscriptionBadRequestErrorResponse\n | SubscriptionConflictErrorResponse\n | UnauthorizedError\n | ForbiddenError\n | InternalServerErrorError\n | ServiceUnavailableError\n | PreconditionFailedError\n | Error;\n", + "symbols": [], + "line_count": 58 + }, + "api/spec/packages/legacy/src/productcatalog/features.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Order by options for features.\n */\n@friendlyName(\"FeatureOrderBy\")\nenum FeatureOrderBy {\n ID: \"id\",\n Key: \"key\",\n Name: \"name\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n CreatedAt: \"createdAt\",\n #suppress \"@openmeter/api-spec-legacy/casing\" \"Use existing values\"\n UpdatedAt: \"updatedAt\",", + "symbols": [], + "line_count": 238 + }, + "api/spec/packages/legacy/src/productcatalog/main.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"..\";\n\n// Package Contents\nimport \"./discounts.tsp\";\nimport \"./plan.tsp\";\nimport \"./prices.tsp\";\nimport \"./ratecards.tsp\";\nimport \"./routes.tsp\";\nimport \"./tax.tsp\";\nimport \"./subscription.tsp\";\nimport \"./alignment.tsp\";\nimport \"./addon.tsp\";\nimport \"./planaddon.tsp\";\n\nnamespace OpenMeter;", + "symbols": [], + "line_count": 19 + }, + "api/spec/packages/legacy/src/productcatalog/plan.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\nimport \"./prorating.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * The status of a plan.\n */\n@friendlyName(\"PlanStatus\")\nenum PlanStatus {\n draft: \"draft\",\n active: \"active\",\n archived: \"archived\",\n scheduled: \"scheduled\",\n}\n\n/**\n * The settlement mode of a plan.", + "symbols": [], + "line_count": 230 + }, + "api/spec/packages/legacy/src/productcatalog/planaddon.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * The PlanAddon describes the association between a plan and add-on.\n */\n@friendlyName(\"PlanAddon\")\nmodel PlanAddon {\n ...ResourceTimestamps;\n\n /**\n * Set of key-value pairs managed by the system. Cannot be modified by user.\n */\n @visibility(Lifecycle.Read)\n @summary(\"Annotations\")\n annotations?: Annotations;\n", + "symbols": [], + "line_count": 84 + }, + "api/spec/packages/legacy/src/productcatalog/prices.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * The type of the price.\n */\n@friendlyName(\"PriceType\")\nenum PriceType {\n flat: \"flat\",\n unit: \"unit\",\n tiered: \"tiered\",\n dynamic: \"dynamic\",\n package: \"package\",\n}\n\n/**\n * Price.\n * One of: flat, unit, or tiered.\n */\n@friendlyName(\"Price\")\n@discriminated(#{ envelope: \"none\", discriminatorPropertyName: \"type\" })", + "symbols": [], + "line_count": 305 + }, + "api/spec/packages/legacy/src/productcatalog/prorating.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * Pro-rating mode options for handling billing period changes.\n */\n@friendlyName(\"ProRatingMode\")\nunion ProRatingMode {\n /**\n * Calculate pro-rated charges based on time remaining in billing period.\n */\n proratePrices: \"prorate_prices\",\n}\n\n/**\n * Configuration for pro-rating behavior.\n */\n@friendlyName(\"ProRatingConfig\")\nmodel ProRatingConfig {\n /**\n * Whether pro-rating is enabled for this plan.", + "symbols": [], + "line_count": 30 + }, + "api/spec/packages/legacy/src/productcatalog/ratecards.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * The type of the rate card.\n */\n@friendlyName(\"RateCardType\")\nenum RateCardType {\n flatFee: \"flat_fee\",\n usageBased: \"usage_based\",\n}\n\n/**\n * Common fields of the rate card.\n */\n@friendlyName(\"RateCardBase\")\nmodel RateCardBase {\n /**\n * The type of the RateCard.\n */\n @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)", + "symbols": [], + "line_count": 219 + }, + "api/spec/packages/legacy/src/productcatalog/routes.tsp": { + "header": "import \"../rest.tsp\";\nimport \"./subscriptionaddon.tsp\";\nimport \"./errors.tsp\";\n\nnamespace OpenMeter;\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\n@route(\"/api/v1/features\")\n@tag(\"Product Catalog\")\n@friendlyName(\"Features\")\ninterface FeaturesEndpoints {\n /**\n * List features.\n */\n @get\n @operationId(\"listFeatures\")\n @summary(\"List features\")\n list(", + "symbols": [], + "line_count": 673 + }, + "api/spec/packages/legacy/src/productcatalog/subscription.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi\";\nimport \"@typespec/openapi3\";\n\nimport \"../types.tsp\";\nimport \"../errors.tsp\";\nimport \"./prices.tsp\";\nimport \"./ratecards.tsp\";\nimport \"./discounts.tsp\";\nimport \"../entitlements/main.tsp\";\n\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n/**\n * Expanded subscription\n */\n@friendlyName(\"SubscriptionExpanded\")", + "symbols": [], + "line_count": 638 + }, + "api/spec/packages/legacy/src/productcatalog/subscriptionaddon.tsp": { + "header": "import \"@typespec/http\";\nimport \"../types.tsp\";\nimport \"./ratecards.tsp\";\n\nnamespace OpenMeter;\n\n/**\n * A subscription add-on, represents concrete instances of an add-on for a given subscription.\n */\n@friendlyName(\"SubscriptionAddon\")\nmodel SubscriptionAddon {\n ...Resource;\n\n /**\n * The cadence start of the resource.\n */\n @visibility(Lifecycle.Read)\n activeFrom: DateTime;\n\n /**", + "symbols": [], + "line_count": 179 + }, + "api/spec/packages/legacy/src/productcatalog/tax.tsp": { + "header": "namespace OpenMeter;\n\n/**\n * Set of provider specific tax configs.\n */\n@friendlyName(\"TaxConfig\")\nmodel TaxConfig {\n /**\n * Tax behavior.\n *\n * If not specified the billing profile is used to determine the tax behavior.\n * If not specified in the billing profile, the provider's default behavior is used.\n */\n @summary(\"Tax behavior\")\n behavior?: TaxBehavior;\n\n /**\n * Stripe tax config.\n *\n * @deprecated Use `taxCodeId` instead. When both `stripe.code` and `taxCodeId` are provided,", + "symbols": [], + "line_count": 92 + }, + "api/spec/packages/legacy/src/query.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\n\nnamespace OpenMeter;\n\n/**\n * Pagination query params\n */\n@friendlyName(\"Pagination\")\nmodel QueryPagination {\n /**\n * Page index.\n *\n * Default is 1.\n */\n @query\n @minValue(1)", + "symbols": [], + "line_count": 167 + }, + "api/spec/packages/legacy/src/rest.tsp": { + "header": "import \"@typespec/rest\";\n\nnamespace TypeSpec.Rest.Resource {\n /**\n * Resource update operation model.\n * @template Resource The resource model to update with replace.\n */\n @friendlyName(\"{name}ReplaceUpdate\", Resource)\n model ResourceReplaceModel\n is UpdateableProperties>;\n}\n\nnamespace OpenMeter.Rest {\n /**\n * Resource create operation model.\n * @template Resource The resource model to create.\n */\n @friendlyName(\"{name}Create\", Resource)\n @withVisibilityFilter(#{ all: #[Lifecycle.Create] })\n model ResourceCreateModel {", + "symbols": [], + "line_count": 43 + }, + "api/spec/packages/legacy/src/subjects.tsp": { + "header": "import \"@typespec/http\";\nimport \"@typespec/rest\";\nimport \"@typespec/openapi3\";\n\nusing TypeSpec.Http;\nusing TypeSpec.OpenAPI;\n\nnamespace OpenMeter;\n\n@route(\"/api/v1/subjects\")\n@tag(\"Subjects\")\n@friendlyName(\"Subjects\")\ninterface SubjectsEndpoints {\n /**\n * List subjects.\n *\n * \u26a0\ufe0f __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.\n */\n #deprecated \"Subjects as entities are being depracated, use customers instead\"\n #suppress \"deprecated\" \"Subjects APIs will be removed on December 1st, 2025\"", + "symbols": [], + "line_count": 156 + }, + "api/spec/packages/legacy/src/types.tsp": { + "header": "import \"@typespec/openapi3\";\n\nusing TypeSpec.OpenAPI;\n\n/**\n * ULID (Universally Unique Lexicographically Sortable Identifier).\n */\n// See: https://github.com/ulid/spec/issues/94\n@pattern(\"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$\")\n@example(\"01G65Z755AFWAKHE12NY0CQ9FH\")\n@extension(\"x-inline\", true)\nscalar ULID extends string;\n\n/**\n * A key is a unique string that is used to identify a resource.\n */\n@pattern(\n \"^[a-z0-9]+(?:_[a-z0-9]+)*$\",\n \"Must start with a lowercase letter or a number. Can contain lowercase letters, numbers, and underscores.\"\n)", + "symbols": [], + "line_count": 447 + }, + "api/spec/packages/legacy/tspconfig.client.yaml": { + "header": "emit:\n - '@typespec/http-client-python'\nparameters:\n base-dir:\n default: '{cwd}'\n client-dir:\n default: '{cwd}/../../../client'\noutput-dir: '{base-dir}'\noptions:\n '@typespec/http-client-python':\n emitter-output-dir: '{client-dir}/python'\n package-name: openmeter\n generation-subdir: _generated\n namespace: openmeter\n package-version: '0.0.0'\n generate-packaging-files: false\n license:\n name: Apache 2.0\nlinter:\n extends:", + "symbols": [], + "line_count": 21 + }, + "api/spec/packages/legacy/tspconfig.yaml": { + "header": "emit:\n - '@typespec/openapi3'\nparameters:\n base-dir:\n default: '{cwd}'\n client-dir:\n default: '{cwd}/../client'\noutput-dir: '{base-dir}'\noptions:\n '@typespec/openapi3':\n emitter-output-dir: '{output-dir}/output'\nlinter:\n extends:\n - '@openmeter/api-spec-legacy/all'", + "symbols": [], + "line_count": 14 + }, + "api/spec/patches/@typespec__http.patch": { + "header": "diff --git a/dist/generated-defs/TypeSpec.Http.d.ts b/dist/generated-defs/TypeSpec.Http.d.ts\nindex 1aae9759899672f72d5bedbca756166b45227707..a3fff7c6908586d90399464dae2113c20b01ce4f 100644\n--- a/dist/generated-defs/TypeSpec.Http.d.ts\n+++ b/dist/generated-defs/TypeSpec.Http.d.ts\n@@ -9,6 +9,7 @@ export interface CookieOptions {\n export interface QueryOptions {\n readonly name?: string;\n readonly explode?: boolean;\n+ readonly style?: \"form\" | \"spaceDelimited\" | \"pipeDelimited\" | \"deepObject\";\n }\n export interface PathOptions {\n readonly name?: string;\ndiff --git a/dist/generated-defs/TypeSpec.Http.d.ts.map b/dist/generated-defs/TypeSpec.Http.d.ts.map\nindex a4ebb5b91247eb04ee066e9ddc6f9e4e551f46a4..34e7a844756932e9320048b67ce885bbb3771e77 100644\n--- a/dist/generated-defs/TypeSpec.Http.d.ts.map\n+++ b/dist/generated-defs/TypeSpec.Http.d.ts.map\n@@ -1 +1 @@\n-{\"version\":3,\"file\":\"TypeSpec.Http.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../generated-defs/TypeSpec.Http.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACrE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,aAAa,KACzC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,aAAa,KACzC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,YAAY,KACvC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,WAAW,KACtC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,YAAY,KACnB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,IAAI,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,IAAI,EAAE,IAAI,KACP,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,KACT,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,mBAAmB,CAAC;IAChC,aAAa,EAAE,sBAAsB,CAAC;IACtC,GAAG,EAAE,YAAY,CAAC;IAClB,GAAG,EAAE,YAAY,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC\"}\n\\ No newline at end of file\n+{\"version\":3,\"file\":\"TypeSpec.Http.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../generated-defs/TypeSpec.Http.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;CAC7E;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACrE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,aAAa,KACzC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,mBAAmB,CAAC,EAAE,MAAM,GAAG,aAAa,KACzC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,YAAY,KACvC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,WAAW,KACtC,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,YAAY,KACnB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,IAAI,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,IAAI,EAAE,IAAI,KACP,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,KACT,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,KACd,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,mBAAmB,CAAC;IAChC,aAAa,EAAE,sBAAsB,CAAC;IACtC,GAAG,EAAE,YAAY,CAAC;IAClB,GAAG,EAAE,YAAY,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC\"}", + "symbols": [], + "line_count": 132 + }, + "api/spec/patches/@typespec__openapi.patch": { + "header": "diff --git a/dist/src/helpers.d.ts.map b/dist/src/helpers.d.ts.map\nindex bf6e4d8f4c79f6d7b82dfff8a66aa9715f171336..3c7e16657bab6125c613ac31d20a5fafdc7762ac 100644\n--- a/dist/src/helpers.d.ts.map\n+++ b/dist/src/helpers.d.ts.map\n@@ -1 +1 @@\n-{\"version\":3,\"file\":\"helpers.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../src/helpers.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAEL,gBAAgB,EAUhB,aAAa,EACb,SAAS,EACT,OAAO,EACP,IAAI,EACJ,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAelE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,QAW9C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,OAAO,EACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,OAAO,EAAE,eAAe,GACvB,MAAM,CAoBR;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,UAmBxE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAM3E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,YAAY,CAEtE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,GACnB,OAAO,CAgBT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAiBT\"}\n\\ No newline at end of file\n+{\"version\":3,\"file\":\"helpers.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../src/helpers.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAEL,gBAAgB,EAUhB,aAAa,EACb,SAAS,EACT,OAAO,EACP,IAAI,EACJ,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAyBlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,MAAM,CAKR;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,QAW9C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,OAAO,EACjB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,OAAO,EAAE,eAAe,GACvB,MAAM,CAoBR;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,UAmBxE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAM3E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,YAAY,CAEtE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,GACnB,OAAO,CAgBT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAiBT\"}\n\\ No newline at end of file\ndiff --git a/dist/src/helpers.js b/dist/src/helpers.js\nindex 89f2d7cb32461185c2299e145cfbf6cd65fddcff..c14007d9bf4bc887e22ef3312473e4a9c1d783db 100644\n--- a/dist/src/helpers.js\n+++ b/dist/src/helpers.js\n@@ -1,5 +1,5 @@\n import { getFriendlyName, getLifecycleVisibilityEnum, getProperty, getTypeName, getVisibilityForClass, isGlobalNamespace, isService, isTemplateInstance, } from \"@typespec/compiler\";\n-import { getOperationId } from \"./decorators.js\";\n+import { getExtensions, getOperationId } from \"./decorators.js\";\n import { createDiagnostic, reportDiagnostic } from \"./lib.js\";\n /**\n * Determines whether a type will be inlined in OpenAPI rather than defined", + "symbols": [], + "line_count": 98 + }, + "api/spec/patches/@typespec__openapi3.patch": { + "header": "diff --git a/dist/src/attach-extensions.d.ts.map b/dist/src/attach-extensions.d.ts.map\nindex 7b28892e9cc64d88569596d2f14310e47c0bb214..5f622f032e25cc826f2d91e28d5acbb722c85f93 100644\n--- a/dist/src/attach-extensions.d.ts.map\n+++ b/dist/src/attach-extensions.d.ts.map\n@@ -1 +1 @@\n-{\"version\":3,\"file\":\"attach-extensions.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../src/attach-extensions.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAGnD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,QAQ7E\"}\n\\ No newline at end of file\n+{\"version\":3,\"file\":\"attach-extensions.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../src/attach-extensions.ts\"],\"names\":[],\"mappings\":\"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAGnD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,QAW7E\"}\n\\ No newline at end of file\ndiff --git a/dist/src/attach-extensions.js b/dist/src/attach-extensions.js\nindex 8e557682fd556430304cd178c93bb3e98cab7fdf..eb543fb17a926596f01227c4ee4610b3a7ecea5d 100644\n--- a/dist/src/attach-extensions.js\n+++ b/dist/src/attach-extensions.js\n@@ -4,6 +4,9 @@ export function attachExtensions(program, type, emitObject) {\n const extensions = getExtensions(program, type);\n if (extensions) {\n for (const key of extensions.keys()) {\n+ if (key === \"x-inline\") {\n+ continue;\n+ }", + "symbols": [], + "line_count": 602 + }, + "api/spec/pnpm-lock.yaml": { + "header": "lockfileVersion: '9.0'\n\nsettings:\n autoInstallPeers: true\n excludeLinksFromLockfile: false\n\noverrides:\n postcss@<8.5.10: '>=8.5.10'\n\npatchedDependencies:\n '@typespec/compiler':\n hash: 3c2b359a3f53dc45d1cb921d164fdd02b562613bbd72527208ac5c1f1631b6a7\n path: patches/@typespec__compiler.patch\n '@typespec/http':\n hash: e5eb7d65296bdaff8a23f7b13f46c819ab5f5f0f14d1efd4e4a5694b13be1410\n path: patches/@typespec__http.patch\n '@typespec/http-client-python':\n hash: 9dcf4fca858e9dbe3b04ba9a577a6a45b074b6ebbab97ab781834c3b609a22b5\n path: patches/@typespec__http-client-python.patch\n '@typespec/openapi':", + "symbols": [], + "line_count": 3190 + }, + "api/spec/pnpm-workspace.yaml": { + "header": "packages:\n - packages/*\nblockExoticSubdeps: true\nminimumReleaseAge: 4320\ntrustPolicy: no-downgrade", + "symbols": [], + "line_count": 5 + }, + "api/types/doc.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "api/v3/api.gen.go": { + "header": "\t\"bytes\"\n\t\"compress/gzip\"\n\t\"encoding/base64\"", + "symbols": [ + { + "kind": "func", + "name": "Valid", + "signature": "func (e AddonInstanceType) Valid() bool", + "line": 33 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e AddonStatus) Valid() bool", + "line": 52 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppExternalInvoicingType) Valid() bool", + "line": 71 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppSandboxType) Valid() bool", + "line": 86 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStatus) Valid() bool", + "line": 102 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeType) Valid() bool", + "line": 119 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCheckoutSessionMode) Valid() bool", + "line": 134 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCheckoutSessionUIMode) Valid() bool", + "line": 150 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionBillingAddressCollection) Valid() bool", + "line": 168 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition) Valid() bool", + "line": 186 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions) Valid() bool", + "line": 204 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService) Valid() bool", + "line": 222 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior) Valid() bool", + "line": 240 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionRedirectOnCompletion) Valid() bool", + "line": 259 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired) Valid() bool", + "line": 279 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingAppType) Valid() bool", + "line": 298 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingChargeStatus) Valid() bool", + "line": 320 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingChargesExpand) Valid() bool", + "line": 341 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCreditAvailabilityPolicy) Valid() bool", + "line": 356 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCreditFundingMethod) Valid() bool", + "line": 373 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCreditGrantStatus) Valid() bool", + "line": 395 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCreditPurchasePaymentSettlementStatus) Valid() bool", + "line": 418 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCreditTransactionType) Valid() bool", + "line": 439 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCurrencyCustomType) Valid() bool", + "line": 458 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCurrencyFiatType) Valid() bool", + "line": 473 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingCurrencyType) Valid() bool", + "line": 489 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingEntitlementType) Valid() bool", + "line": 508 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingFeatureLLMTokenType) Valid() bool", + "line": 533 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingFeatureLLMUnitCostType) Valid() bool", + "line": 560 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingFeatureManualUnitCostType) Valid() bool", + "line": 575 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingFlatFeeChargeType) Valid() bool", + "line": 590 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPlanStatus) Valid() bool", + "line": 608 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPriceFlatType) Valid() bool", + "line": 629 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPriceFreeType) Valid() bool", + "line": 644 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPriceGraduatedType) Valid() bool", + "line": 659 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPricePaymentTerm) Valid() bool", + "line": 675 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPriceUnitType) Valid() bool", + "line": 692 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingPriceVolumeType) Valid() bool", + "line": 707 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingRateCardProrationMode) Valid() bool", + "line": 723 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingSettlementMode) Valid() bool", + "line": 741 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingSubscriptionEditTimingEnum) Valid() bool", + "line": 759 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingSubscriptionStatus) Valid() bool", + "line": 779 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingTaxBehavior) Valid() bool", + "line": 801 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingUsageBasedChargeType) Valid() bool", + "line": 818 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingWorkflowCollectionAlignmentAnchoredType) Valid() bool", + "line": 833 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingWorkflowCollectionAlignmentSubscriptionType) Valid() bool", + "line": 848 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod) Valid() bool", + "line": 863 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod) Valid() bool", + "line": 878 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e GovernanceFeatureAccessReasonCode) Valid() bool", + "line": 897 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e GovernanceQueryErrorCode) Valid() bool", + "line": 921 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e InvalidParameterChoiceItemRule) Valid() bool", + "line": 938 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e InvalidParameterDependentItemRule) Valid() bool", + "line": 953 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e InvalidParameterMaximumLengthRule) Valid() bool", + "line": 970 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e InvalidParameterMinimumLengthRule) Valid() bool", + "line": 995 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e InvalidRules) Valid() bool", + "line": 1043 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e LLMCostPriceSource) Valid() bool", + "line": 1101 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e MeterAggregation) Valid() bool", + "line": 1124 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e MeterQueryGranularity) Valid() bool", + "line": 1154 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e MeteringEventDatacontenttype) Valid() bool", + "line": 1175 + }, + { + "kind": "func", + "name": "Valid", + "signature": "func (e ResourceManagedBy) Valid() bool", + "line": 1192 + }, + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 1207 + }, + { + "kind": "struct", + "name": "AddonPagePaginatedResponse", + "signature": "type AddonPagePaginatedResponse struct", + "line": 1277 + }, + { + "kind": "struct", + "name": "AddonReference", + "signature": "type AddonReference struct", + "line": 1285 + }, + { + "kind": "struct", + "name": "AddonReferenceItem", + "signature": "type AddonReferenceItem struct", + "line": 1291 + }, + { + "kind": "struct", + "name": "Address", + "signature": "type Address struct", + "line": 1305 + }, + { + "kind": "struct", + "name": "AppPagePaginatedResponse", + "signature": "type AppPagePaginatedResponse struct", + "line": 1330 + }, + { + "kind": "struct", + "name": "BadRequestError", + "signature": "type BadRequestError struct", + "line": 1338 + }, + { + "kind": "struct", + "name": "BaseError", + "signature": "type BaseError struct", + "line": 1367 + }, + { + "kind": "struct", + "name": "BillingAddress", + "signature": "type BillingAddress struct", + "line": 1393 + }, + { + "kind": "struct", + "name": "BillingApp", + "signature": "type BillingApp struct", + "line": 1418 + }, + { + "kind": "struct", + "name": "BillingAppCatalogItem", + "signature": "type BillingAppCatalogItem struct", + "line": 1426 + }, + { + "kind": "struct", + "name": "BillingAppCustomerData", + "signature": "type BillingAppCustomerData struct", + "line": 1438 + }, + { + "kind": "struct", + "name": "BillingAppCustomerDataExternalInvoicing", + "signature": "type BillingAppCustomerDataExternalInvoicing struct", + "line": 1447 + }, + { + "kind": "struct", + "name": "BillingAppCustomerDataStripe", + "signature": "type BillingAppCustomerDataStripe struct", + "line": 1453 + }, + { + "kind": "struct", + "name": "BillingAppExternalInvoicing", + "signature": "type BillingAppExternalInvoicing struct", + "line": 1481 + }, + { + "kind": "struct", + "name": "BillingAppReference", + "signature": "type BillingAppReference struct", + "line": 1543 + }, + { + "kind": "struct", + "name": "BillingAppSandbox", + "signature": "type BillingAppSandbox struct", + "line": 1549 + }, + { + "kind": "struct", + "name": "BillingAppStripe", + "signature": "type BillingAppStripe struct", + "line": 1592 + }, + { + "kind": "struct", + "name": "BillingAppStripeCheckoutSessionCustomTextParams", + "signature": "type BillingAppStripeCheckoutSessionCustomTextParams struct", + "line": 1641 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionConsentCollection", + "signature": "type BillingAppStripeCreateCheckoutSessionConsentCollection struct", + "line": 1679 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement", + "signature": "type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct", + "line": 1696 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionCustomerUpdate", + "signature": "type BillingAppStripeCreateCheckoutSessionCustomerUpdate struct", + "line": 1711 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionRequestOptions", + "signature": "type BillingAppStripeCreateCheckoutSessionRequestOptions struct", + "line": 1738 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionResult", + "signature": "type BillingAppStripeCreateCheckoutSessionResult struct", + "line": 1821 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCheckoutSessionTaxIdCollection", + "signature": "type BillingAppStripeCreateCheckoutSessionTaxIdCollection struct", + "line": 1885 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCustomerPortalSessionOptions", + "signature": "type BillingAppStripeCreateCustomerPortalSessionOptions struct", + "line": 1901 + }, + { + "kind": "struct", + "name": "BillingAppStripeCreateCustomerPortalSessionResult", + "signature": "type BillingAppStripeCreateCustomerPortalSessionResult struct", + "line": 1925 + }, + { + "kind": "struct", + "name": "BillingCharge", + "signature": "type BillingCharge struct", + "line": 1974 + }, + { + "kind": "struct", + "name": "BillingChargeTotals", + "signature": "type BillingChargeTotals struct", + "line": 1991 + }, + { + "kind": "struct", + "name": "BillingCostBasis", + "signature": "type BillingCostBasis struct", + "line": 2009 + }, + { + "kind": "struct", + "name": "BillingCreditAdjustment", + "signature": "type BillingCreditAdjustment struct", + "line": 2032 + }, + { + "kind": "struct", + "name": "BillingCreditBalances", + "signature": "type BillingCreditBalances struct", + "line": 2057 + }, + { + "kind": "struct", + "name": "BillingCreditGrant", + "signature": "type BillingCreditGrant struct", + "line": 2077 + }, + { + "kind": "struct", + "name": "BillingCreditGrantFilters", + "signature": "type BillingCreditGrantFilters struct", + "line": 2145 + }, + { + "kind": "struct", + "name": "BillingCreditGrantInvoiceReference", + "signature": "type BillingCreditGrantInvoiceReference struct", + "line": 2152 + }, + { + "kind": "struct", + "name": "BillingCreditGrantPurchase", + "signature": "type BillingCreditGrantPurchase struct", + "line": 2164 + }, + { + "kind": "struct", + "name": "BillingCreditGrantTaxConfig", + "signature": "type BillingCreditGrantTaxConfig struct", + "line": 2205 + }, + { + "kind": "struct", + "name": "BillingCreditTransaction", + "signature": "type BillingCreditTransaction struct", + "line": 2224 + }, + { + "kind": "struct", + "name": "BillingCurrency", + "signature": "type BillingCurrency struct", + "line": 2275 + }, + { + "kind": "struct", + "name": "BillingCurrencyCustom", + "signature": "type BillingCurrencyCustom struct", + "line": 2289 + }, + { + "kind": "struct", + "name": "BillingCurrencyFiat", + "signature": "type BillingCurrencyFiat struct", + "line": 2317 + }, + { + "kind": "struct", + "name": "BillingCustomer", + "signature": "type BillingCustomer struct", + "line": 2345 + }, + { + "kind": "struct", + "name": "BillingCustomerData", + "signature": "type BillingCustomerData struct", + "line": 2389 + }, + { + "kind": "struct", + "name": "BillingCustomerReference", + "signature": "type BillingCustomerReference struct", + "line": 2400 + }, + { + "kind": "struct", + "name": "BillingCustomerStripeCreateCheckoutSessionRequest", + "signature": "type BillingCustomerStripeCreateCheckoutSessionRequest struct", + "line": 2410 + }, + { + "kind": "struct", + "name": "BillingCustomerStripeCreateCustomerPortalSessionRequest", + "signature": "type BillingCustomerStripeCreateCustomerPortalSessionRequest struct", + "line": 2424 + }, + { + "kind": "struct", + "name": "BillingCustomerUsageAttribution", + "signature": "type BillingCustomerUsageAttribution struct", + "line": 2431 + }, + { + "kind": "struct", + "name": "BillingEntitlementAccessResult", + "signature": "type BillingEntitlementAccessResult struct", + "line": 2438 + }, + { + "kind": "struct", + "name": "BillingFeatureLLMUnitCost", + "signature": "type BillingFeatureLLMUnitCost struct", + "line": 2463 + }, + { + "kind": "struct", + "name": "BillingFeatureLLMUnitCostPricing", + "signature": "type BillingFeatureLLMUnitCostPricing struct", + "line": 2502 + }, + { + "kind": "struct", + "name": "BillingFeatureManualUnitCost", + "signature": "type BillingFeatureManualUnitCost struct", + "line": 2520 + }, + { + "kind": "struct", + "name": "BillingFeatureUnitCost", + "signature": "type BillingFeatureUnitCost struct", + "line": 2533 + }, + { + "kind": "struct", + "name": "BillingFlatFeeCharge", + "signature": "type BillingFlatFeeCharge struct", + "line": 2538 + }, + { + "kind": "struct", + "name": "BillingFlatFeeDiscounts", + "signature": "type BillingFlatFeeDiscounts struct", + "line": 2634 + }, + { + "kind": "struct", + "name": "BillingParty", + "signature": "type BillingParty struct", + "line": 2640 + }, + { + "kind": "struct", + "name": "BillingPartyAddresses", + "signature": "type BillingPartyAddresses struct", + "line": 2659 + }, + { + "kind": "struct", + "name": "BillingPartyTaxIdentity", + "signature": "type BillingPartyTaxIdentity struct", + "line": 2666 + }, + { + "kind": "struct", + "name": "BillingPlan", + "signature": "type BillingPlan struct", + "line": 2672 + }, + { + "kind": "struct", + "name": "BillingPlanPhase", + "signature": "type BillingPlanPhase struct", + "line": 2744 + }, + { + "kind": "struct", + "name": "BillingPrice", + "signature": "type BillingPrice struct", + "line": 2780 + }, + { + "kind": "struct", + "name": "BillingPriceFlat", + "signature": "type BillingPriceFlat struct", + "line": 2785 + }, + { + "kind": "struct", + "name": "BillingPriceFree", + "signature": "type BillingPriceFree struct", + "line": 2797 + }, + { + "kind": "struct", + "name": "BillingPriceGraduated", + "signature": "type BillingPriceGraduated struct", + "line": 2812 + }, + { + "kind": "struct", + "name": "BillingPriceTier", + "signature": "type BillingPriceTier struct", + "line": 2831 + }, + { + "kind": "struct", + "name": "BillingPriceUnit", + "signature": "type BillingPriceUnit struct", + "line": 2847 + }, + { + "kind": "struct", + "name": "BillingPriceVolume", + "signature": "type BillingPriceVolume struct", + "line": 2865 + }, + { + "kind": "struct", + "name": "BillingProfile", + "signature": "type BillingProfile struct", + "line": 2878 + }, + { + "kind": "struct", + "name": "BillingProfileAppReferences", + "signature": "type BillingProfileAppReferences struct", + "line": 2919 + }, + { + "kind": "struct", + "name": "BillingProfilePagePaginatedResponse", + "signature": "type BillingProfilePagePaginatedResponse struct", + "line": 2931 + }, + { + "kind": "struct", + "name": "BillingProfileReference", + "signature": "type BillingProfileReference struct", + "line": 2939 + }, + { + "kind": "struct", + "name": "BillingRateCard", + "signature": "type BillingRateCard struct", + "line": 2945 + }, + { + "kind": "struct", + "name": "BillingRateCardDiscounts", + "signature": "type BillingRateCardDiscounts struct", + "line": 2990 + }, + { + "kind": "struct", + "name": "BillingRateCardProrationConfiguration", + "signature": "type BillingRateCardProrationConfiguration struct", + "line": 3001 + }, + { + "kind": "struct", + "name": "BillingRateCardTaxConfig", + "signature": "type BillingRateCardTaxConfig struct", + "line": 3016 + }, + { + "kind": "struct", + "name": "BillingSpendCommitments", + "signature": "type BillingSpendCommitments struct", + "line": 3038 + }, + { + "kind": "struct", + "name": "BillingSubscription", + "signature": "type BillingSubscription struct", + "line": 3047 + }, + { + "kind": "struct", + "name": "BillingSubscriptionCancel", + "signature": "type BillingSubscriptionCancel struct", + "line": 3083 + }, + { + "kind": "struct", + "name": "BillingSubscriptionChange", + "signature": "type BillingSubscriptionChange struct", + "line": 3089 + }, + { + "kind": "struct", + "name": "BillingSubscriptionChangeResponse", + "signature": "type BillingSubscriptionChangeResponse struct", + "line": 3149 + }, + { + "kind": "struct", + "name": "BillingSubscriptionCreate", + "signature": "type BillingSubscriptionCreate struct", + "line": 3158 + }, + { + "kind": "struct", + "name": "BillingSubscriptionEditTiming", + "signature": "type BillingSubscriptionEditTiming struct", + "line": 3215 + }, + { + "kind": "struct", + "name": "BillingSubscriptionReference", + "signature": "type BillingSubscriptionReference struct", + "line": 3226 + }, + { + "kind": "struct", + "name": "BillingTaxCode", + "signature": "type BillingTaxCode struct", + "line": 3253 + }, + { + "kind": "struct", + "name": "BillingTaxCodeAppMapping", + "signature": "type BillingTaxCodeAppMapping struct", + "line": 3287 + }, + { + "kind": "struct", + "name": "BillingTaxConfig", + "signature": "type BillingTaxConfig struct", + "line": 3296 + }, + { + "kind": "struct", + "name": "BillingTaxConfigExternalInvoicing", + "signature": "type BillingTaxConfigExternalInvoicing struct", + "line": 3324 + }, + { + "kind": "struct", + "name": "BillingTaxConfigStripe", + "signature": "type BillingTaxConfigStripe struct", + "line": 3330 + }, + { + "kind": "struct", + "name": "BillingTotals", + "signature": "type BillingTotals struct", + "line": 3340 + }, + { + "kind": "struct", + "name": "BillingUsageBasedCharge", + "signature": "type BillingUsageBasedCharge struct", + "line": 3367 + }, + { + "kind": "struct", + "name": "BillingWorkflow", + "signature": "type BillingWorkflow struct", + "line": 3454 + }, + { + "kind": "struct", + "name": "BillingWorkflowCollectionAlignment", + "signature": "type BillingWorkflowCollectionAlignment struct", + "line": 3473 + }, + { + "kind": "struct", + "name": "BillingWorkflowCollectionAlignmentAnchored", + "signature": "type BillingWorkflowCollectionAlignmentAnchored struct", + "line": 3479 + }, + { + "kind": "struct", + "name": "BillingWorkflowCollectionAlignmentSubscription", + "signature": "type BillingWorkflowCollectionAlignmentSubscription struct", + "line": 3492 + }, + { + "kind": "struct", + "name": "BillingWorkflowCollectionSettings", + "signature": "type BillingWorkflowCollectionSettings struct", + "line": 3502 + }, + { + "kind": "struct", + "name": "BillingWorkflowInvoicingSettings", + "signature": "type BillingWorkflowInvoicingSettings struct", + "line": 3515 + }, + { + "kind": "struct", + "name": "BillingWorkflowPaymentChargeAutomaticallySettings", + "signature": "type BillingWorkflowPaymentChargeAutomaticallySettings struct", + "line": 3528 + }, + { + "kind": "struct", + "name": "BillingWorkflowPaymentSendInvoiceSettings", + "signature": "type BillingWorkflowPaymentSendInvoiceSettings struct", + "line": 3538 + }, + { + "kind": "struct", + "name": "BillingWorkflowPaymentSettings", + "signature": "type BillingWorkflowPaymentSettings struct", + "line": 3551 + }, + { + "kind": "struct", + "name": "BillingWorkflowTaxSettings", + "signature": "type BillingWorkflowTaxSettings struct", + "line": 3556 + }, + { + "kind": "struct", + "name": "ChargePagePaginatedResponse", + "signature": "type ChargePagePaginatedResponse struct", + "line": 3572 + }, + { + "kind": "struct", + "name": "ClosedPeriod", + "signature": "type ClosedPeriod struct", + "line": 3582 + }, + { + "kind": "struct", + "name": "ConflictError", + "signature": "type ConflictError struct", + "line": 3595 + }, + { + "kind": "struct", + "name": "CostBasisPagePaginatedResponse", + "signature": "type CostBasisPagePaginatedResponse struct", + "line": 3604 + }, + { + "kind": "struct", + "name": "CreateAddonRequest", + "signature": "type CreateAddonRequest struct", + "line": 3616 + }, + { + "kind": "struct", + "name": "CreateBillingProfileRequest", + "signature": "type CreateBillingProfileRequest struct", + "line": 3648 + }, + { + "kind": "struct", + "name": "CreateCostBasisRequest", + "signature": "type CreateCostBasisRequest struct", + "line": 3679 + }, + { + "kind": "struct", + "name": "CreateCreditAdjustmentRequest", + "signature": "type CreateCreditAdjustmentRequest struct", + "line": 3693 + }, + { + "kind": "struct", + "name": "CreateCreditGrantFilters", + "signature": "type CreateCreditGrantFilters struct", + "line": 3717 + }, + { + "kind": "struct", + "name": "CreateCreditGrantPurchase", + "signature": "type CreateCreditGrantPurchase struct", + "line": 3724 + }, + { + "kind": "struct", + "name": "CreateCreditGrantRequest", + "signature": "type CreateCreditGrantRequest struct", + "line": 3744 + }, + { + "kind": "struct", + "name": "CreateCreditGrantTaxConfig", + "signature": "type CreateCreditGrantTaxConfig struct", + "line": 3796 + }, + { + "kind": "struct", + "name": "CreateCurrencyCustomRequest", + "signature": "type CreateCurrencyCustomRequest struct", + "line": 3810 + }, + { + "kind": "struct", + "name": "CreateCustomerRequest", + "signature": "type CreateCustomerRequest struct", + "line": 3828 + }, + { + "kind": "struct", + "name": "CreateFeatureRequest", + "signature": "type CreateFeatureRequest struct", + "line": 3862 + }, + { + "kind": "struct", + "name": "CreateMeterRequest", + "signature": "type CreateMeterRequest struct", + "line": 3892 + }, + { + "kind": "struct", + "name": "CreatePlanAddonRequest", + "signature": "type CreatePlanAddonRequest struct", + "line": 3938 + }, + { + "kind": "struct", + "name": "CreatePlanRequest", + "signature": "type CreatePlanRequest struct", + "line": 3967 + }, + { + "kind": "struct", + "name": "CreateResourceReference", + "signature": "type CreateResourceReference struct", + "line": 4003 + }, + { + "kind": "struct", + "name": "CreateTaxCodeRequest", + "signature": "type CreateTaxCodeRequest struct", + "line": 4009 + }, + { + "kind": "struct", + "name": "CreditBalance", + "signature": "type CreditBalance struct", + "line": 4033 + }, + { + "kind": "struct", + "name": "CreditGrantPagePaginatedResponse", + "signature": "type CreditGrantPagePaginatedResponse struct", + "line": 4045 + }, + { + "kind": "struct", + "name": "CreditTransactionPaginatedResponse", + "signature": "type CreditTransactionPaginatedResponse struct", + "line": 4053 + }, + { + "kind": "struct", + "name": "CurrencyAmount", + "signature": "type CurrencyAmount struct", + "line": 4061 + }, + { + "kind": "struct", + "name": "CurrencyPagePaginatedResponse", + "signature": "type CurrencyPagePaginatedResponse struct", + "line": 4077 + }, + { + "kind": "struct", + "name": "CursorMeta", + "signature": "type CursorMeta struct", + "line": 4085 + }, + { + "kind": "struct", + "name": "CursorMetaPage", + "signature": "type CursorMetaPage struct", + "line": 4090 + }, + { + "kind": "struct", + "name": "CursorPaginationQueryPage", + "signature": "type CursorPaginationQueryPage struct", + "line": 4108 + }, + { + "kind": "struct", + "name": "CustomerPagePaginatedResponse", + "signature": "type CustomerPagePaginatedResponse struct", + "line": 4120 + }, + { + "kind": "struct", + "name": "CustomerReference", + "signature": "type CustomerReference struct", + "line": 4128 + }, + { + "kind": "struct", + "name": "Feature", + "signature": "type Feature struct", + "line": 4146 + }, + { + "kind": "struct", + "name": "FeatureCostQueryResult", + "signature": "type FeatureCostQueryResult struct", + "line": 4186 + }, + { + "kind": "struct", + "name": "FeatureCostQueryRow", + "signature": "type FeatureCostQueryRow struct", + "line": 4198 + }, + { + "kind": "struct", + "name": "FeatureMeterReference", + "signature": "type FeatureMeterReference struct", + "line": 4225 + }, + { + "kind": "struct", + "name": "FeaturePagePaginatedResponse", + "signature": "type FeaturePagePaginatedResponse struct", + "line": 4234 + }, + { + "kind": "struct", + "name": "FeatureReferenceItem", + "signature": "type FeatureReferenceItem struct", + "line": 4242 + }, + { + "kind": "struct", + "name": "ForbiddenError", + "signature": "type ForbiddenError struct", + "line": 4248 + }, + { + "kind": "struct", + "name": "GetCreditBalanceParamsFilter", + "signature": "type GetCreditBalanceParamsFilter struct", + "line": 4257 + }, + { + "kind": "struct", + "name": "GoneError", + "signature": "type GoneError struct", + "line": 4263 + }, + { + "kind": "struct", + "name": "GovernanceFeatureAccess", + "signature": "type GovernanceFeatureAccess struct", + "line": 4272 + }, + { + "kind": "struct", + "name": "GovernanceFeatureAccessReason", + "signature": "type GovernanceFeatureAccessReason struct", + "line": 4287 + }, + { + "kind": "struct", + "name": "GovernanceQueryError", + "signature": "type GovernanceQueryError struct", + "line": 4302 + }, + { + "kind": "struct", + "name": "GovernanceQueryRequest", + "signature": "type GovernanceQueryRequest struct", + "line": 4320 + }, + { + "kind": "struct", + "name": "GovernanceQueryRequestCustomers", + "signature": "type GovernanceQueryRequestCustomers struct", + "line": 4332 + }, + { + "kind": "struct", + "name": "GovernanceQueryRequestFeatures", + "signature": "type GovernanceQueryRequestFeatures struct", + "line": 4342 + }, + { + "kind": "struct", + "name": "GovernanceQueryResponse", + "signature": "type GovernanceQueryResponse struct", + "line": 4348 + }, + { + "kind": "struct", + "name": "GovernanceQueryResult", + "signature": "type GovernanceQueryResult struct", + "line": 4361 + }, + { + "kind": "struct", + "name": "IngestedEventPaginatedResponse", + "signature": "type IngestedEventPaginatedResponse struct", + "line": 4389 + }, + { + "kind": "struct", + "name": "InvalidParameterChoiceItem", + "signature": "type InvalidParameterChoiceItem struct", + "line": 4397 + }, + { + "kind": "struct", + "name": "InvalidParameterDependentItem", + "signature": "type InvalidParameterDependentItem struct", + "line": 4411 + }, + { + "kind": "struct", + "name": "InvalidParameterMaximumLength", + "signature": "type InvalidParameterMaximumLength struct", + "line": 4425 + }, + { + "kind": "struct", + "name": "InvalidParameterMinimumLength", + "signature": "type InvalidParameterMinimumLength struct", + "line": 4439 + }, + { + "kind": "struct", + "name": "InvalidParameterStandard", + "signature": "type InvalidParameterStandard struct", + "line": 4453 + }, + { + "kind": "struct", + "name": "InvalidParameters_Item", + "signature": "type InvalidParameters_Item struct", + "line": 4466 + }, + { + "kind": "struct", + "name": "LLMCostModel", + "signature": "type LLMCostModel struct", + "line": 4474 + }, + { + "kind": "struct", + "name": "LLMCostModelPricing", + "signature": "type LLMCostModelPricing struct", + "line": 4483 + }, + { + "kind": "struct", + "name": "LLMCostOverrideCreate", + "signature": "type LLMCostOverrideCreate struct", + "line": 4503 + }, + { + "kind": "struct", + "name": "LLMCostPrice", + "signature": "type LLMCostPrice struct", + "line": 4528 + }, + { + "kind": "struct", + "name": "LLMCostProvider", + "signature": "type LLMCostProvider struct", + "line": 4564 + }, + { + "kind": "struct", + "name": "ListAddonsParamsFilter", + "signature": "type ListAddonsParamsFilter struct", + "line": 4578 + }, + { + "kind": "struct", + "name": "ListChargesParamsFilter", + "signature": "type ListChargesParamsFilter struct", + "line": 4601 + }, + { + "kind": "struct", + "name": "ListCostBasesParamsFilter", + "signature": "type ListCostBasesParamsFilter struct", + "line": 4616 + }, + { + "kind": "struct", + "name": "ListCreditGrantsParamsFilter", + "signature": "type ListCreditGrantsParamsFilter struct", + "line": 4622 + }, + { + "kind": "struct", + "name": "ListCreditTransactionsParamsFilter", + "signature": "type ListCreditTransactionsParamsFilter struct", + "line": 4631 + }, + { + "kind": "struct", + "name": "ListCurrenciesParamsFilter", + "signature": "type ListCurrenciesParamsFilter struct", + "line": 4640 + }, + { + "kind": "struct", + "name": "ListCustomerEntitlementAccessResponseData", + "signature": "type ListCustomerEntitlementAccessResponseData struct", + "line": 4651 + }, + { + "kind": "struct", + "name": "ListCustomersParamsFilter", + "signature": "type ListCustomersParamsFilter struct", + "line": 4657 + }, + { + "kind": "struct", + "name": "ListEventsParamsFilter", + "signature": "type ListEventsParamsFilter struct", + "line": 4684 + }, + { + "kind": "struct", + "name": "ListFeatureParamsFilter", + "signature": "type ListFeatureParamsFilter struct", + "line": 4711 + }, + { + "kind": "struct", + "name": "ListLLMCostPricesParamsFilter", + "signature": "type ListLLMCostPricesParamsFilter struct", + "line": 4726 + }, + { + "kind": "struct", + "name": "ListMetersParamsFilter", + "signature": "type ListMetersParamsFilter struct", + "line": 4744 + }, + { + "kind": "struct", + "name": "ListPlansParamsFilter", + "signature": "type ListPlansParamsFilter struct", + "line": 4753 + }, + { + "kind": "struct", + "name": "ListSubscriptionsParamsFilter", + "signature": "type ListSubscriptionsParamsFilter struct", + "line": 4772 + }, + { + "kind": "struct", + "name": "Meter", + "signature": "type Meter struct", + "line": 4795 + }, + { + "kind": "struct", + "name": "MeterPagePaginatedResponse", + "signature": "type MeterPagePaginatedResponse struct", + "line": 4854 + }, + { + "kind": "struct", + "name": "MeterQueryFilters", + "signature": "type MeterQueryFilters struct", + "line": 4862 + }, + { + "kind": "struct", + "name": "MeterQueryRequest", + "signature": "type MeterQueryRequest struct", + "line": 4873 + }, + { + "kind": "struct", + "name": "MeterQueryResult", + "signature": "type MeterQueryResult struct", + "line": 4897 + }, + { + "kind": "struct", + "name": "MeterQueryRow", + "signature": "type MeterQueryRow struct", + "line": 4909 + }, + { + "kind": "struct", + "name": "MeteringEvent", + "signature": "type MeteringEvent struct", + "line": 4925 + }, + { + "kind": "struct", + "name": "MeteringIngestedEvent", + "signature": "type MeteringIngestedEvent struct", + "line": 4962 + }, + { + "kind": "struct", + "name": "MeteringIngestedEventValidationError", + "signature": "type MeteringIngestedEventValidationError struct", + "line": 4980 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 4992 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodes", + "signature": "type OrganizationDefaultTaxCodes struct", + "line": 5007 + }, + { + "kind": "struct", + "name": "PageMeta", + "signature": "type PageMeta struct", + "line": 5022 + }, + { + "kind": "struct", + "name": "PaginatedMeta", + "signature": "type PaginatedMeta struct", + "line": 5029 + }, + { + "kind": "struct", + "name": "PlanAddon", + "signature": "type PlanAddon struct", + "line": 5036 + }, + { + "kind": "struct", + "name": "PlanAddonPagePaginatedResponse", + "signature": "type PlanAddonPagePaginatedResponse struct", + "line": 5078 + }, + { + "kind": "struct", + "name": "PlanPagePaginatedResponse", + "signature": "type PlanPagePaginatedResponse struct", + "line": 5086 + }, + { + "kind": "struct", + "name": "PricePagePaginatedResponse", + "signature": "type PricePagePaginatedResponse struct", + "line": 5094 + }, + { + "kind": "struct", + "name": "ProductCatalogValidationError", + "signature": "type ProductCatalogValidationError struct", + "line": 5102 + }, + { + "kind": "struct", + "name": "QueryFilterString", + "signature": "type QueryFilterString struct", + "line": 5118 + }, + { + "kind": "struct", + "name": "QueryFilterStringMapItem", + "signature": "type QueryFilterStringMapItem struct", + "line": 5146 + }, + { + "kind": "struct", + "name": "RecurringPeriod", + "signature": "type RecurringPeriod struct", + "line": 5176 + }, + { + "kind": "struct", + "name": "SubscriptionAddon", + "signature": "type SubscriptionAddon struct", + "line": 5211 + }, + { + "kind": "struct", + "name": "SubscriptionAddonPagePaginatedResponse", + "signature": "type SubscriptionAddonPagePaginatedResponse struct", + "line": 5255 + }, + { + "kind": "struct", + "name": "SubscriptionPagePaginatedResponse", + "signature": "type SubscriptionPagePaginatedResponse struct", + "line": 5263 + }, + { + "kind": "struct", + "name": "TaxCodePagePaginatedResponse", + "signature": "type TaxCodePagePaginatedResponse struct", + "line": 5271 + }, + { + "kind": "struct", + "name": "TaxCodeReference", + "signature": "type TaxCodeReference struct", + "line": 5279 + }, + { + "kind": "struct", + "name": "TaxCodeReferenceItem", + "signature": "type TaxCodeReferenceItem struct", + "line": 5285 + }, + { + "kind": "struct", + "name": "UnauthorizedError", + "signature": "type UnauthorizedError struct", + "line": 5298 + }, + { + "kind": "struct", + "name": "UpdateCreditGrantExternalSettlementRequest", + "signature": "type UpdateCreditGrantExternalSettlementRequest struct", + "line": 5308 + }, + { + "kind": "struct", + "name": "UpdateFeatureRequest", + "signature": "type UpdateFeatureRequest struct", + "line": 5315 + }, + { + "kind": "struct", + "name": "UpdateMeterRequest", + "signature": "type UpdateMeterRequest struct", + "line": 5324 + }, + { + "kind": "struct", + "name": "UpdateOrganizationDefaultTaxCodesRequest", + "signature": "type UpdateOrganizationDefaultTaxCodesRequest struct", + "line": 5347 + }, + { + "kind": "struct", + "name": "UpsertAddonRequest", + "signature": "type UpsertAddonRequest struct", + "line": 5356 + }, + { + "kind": "struct", + "name": "UpsertAppCustomerDataRequest", + "signature": "type UpsertAppCustomerDataRequest struct", + "line": 5380 + }, + { + "kind": "struct", + "name": "UpsertBillingProfileRequest", + "signature": "type UpsertBillingProfileRequest struct", + "line": 5389 + }, + { + "kind": "struct", + "name": "UpsertCustomerBillingDataRequest", + "signature": "type UpsertCustomerBillingDataRequest struct", + "line": 5417 + }, + { + "kind": "struct", + "name": "UpsertCustomerRequest", + "signature": "type UpsertCustomerRequest struct", + "line": 5428 + }, + { + "kind": "struct", + "name": "UpsertPlanAddonRequest", + "signature": "type UpsertPlanAddonRequest struct", + "line": 5458 + }, + { + "kind": "struct", + "name": "UpsertPlanRequest", + "signature": "type UpsertPlanRequest struct", + "line": 5484 + }, + { + "kind": "struct", + "name": "UpsertTaxCodeRequest", + "signature": "type UpsertTaxCodeRequest struct", + "line": 5509 + }, + { + "kind": "struct", + "name": "PagePaginationQuery", + "signature": "type PagePaginationQuery struct", + "line": 5536 + }, + { + "kind": "struct", + "name": "ListAddonsParams", + "signature": "type ListAddonsParams struct", + "line": 5563 + }, + { + "kind": "struct", + "name": "ListAppsParams", + "signature": "type ListAppsParams struct", + "line": 5584 + }, + { + "kind": "struct", + "name": "ListCurrenciesParams", + "signature": "type ListCurrenciesParams struct", + "line": 5590 + }, + { + "kind": "struct", + "name": "ListCostBasesParams", + "signature": "type ListCostBasesParams struct", + "line": 5610 + }, + { + "kind": "struct", + "name": "ListCustomersParams", + "signature": "type ListCustomersParams struct", + "line": 5622 + }, + { + "kind": "struct", + "name": "ListCustomerChargesParams", + "signature": "type ListCustomerChargesParams struct", + "line": 5643 + }, + { + "kind": "struct", + "name": "GetCustomerCreditBalanceParams", + "signature": "type GetCustomerCreditBalanceParams struct", + "line": 5672 + }, + { + "kind": "struct", + "name": "ListCreditGrantsParams", + "signature": "type ListCreditGrantsParams struct", + "line": 5681 + }, + { + "kind": "struct", + "name": "ListCreditTransactionsParams", + "signature": "type ListCreditTransactionsParams struct", + "line": 5690 + }, + { + "kind": "struct", + "name": "ListMeteringEventsParams", + "signature": "type ListMeteringEventsParams struct", + "line": 5698 + }, + { + "kind": "struct", + "name": "IngestMeteringEventsJSONBody", + "signature": "type IngestMeteringEventsJSONBody struct", + "line": 5723 + }, + { + "kind": "struct", + "name": "ListFeaturesParams", + "signature": "type ListFeaturesParams struct", + "line": 5731 + }, + { + "kind": "struct", + "name": "QueryGovernanceAccessParams", + "signature": "type QueryGovernanceAccessParams struct", + "line": 5754 + }, + { + "kind": "struct", + "name": "ListLlmCostOverridesParams", + "signature": "type ListLlmCostOverridesParams struct", + "line": 5759 + }, + { + "kind": "struct", + "name": "ListLlmCostPricesParams", + "signature": "type ListLlmCostPricesParams struct", + "line": 5767 + }, + { + "kind": "struct", + "name": "ListMetersParams", + "signature": "type ListMetersParams struct", + "line": 5788 + }, + { + "kind": "struct", + "name": "ListPlansParams", + "signature": "type ListPlansParams struct", + "line": 5811 + }, + { + "kind": "struct", + "name": "ListPlanAddonsParams", + "signature": "type ListPlanAddonsParams struct", + "line": 5829 + }, + { + "kind": "struct", + "name": "ListBillingProfilesParams", + "signature": "type ListBillingProfilesParams struct", + "line": 5835 + }, + { + "kind": "struct", + "name": "ListSubscriptionsParams", + "signature": "type ListSubscriptionsParams struct", + "line": 5841 + }, + { + "kind": "struct", + "name": "ListSubscriptionAddonsParams", + "signature": "type ListSubscriptionAddonsParams struct", + "line": 5860 + }, + { + "kind": "struct", + "name": "ListTaxCodesParams", + "signature": "type ListTaxCodesParams struct", + "line": 5867 + }, + { + "kind": "func", + "name": "AsBillingAppStripe", + "signature": "func (t BillingApp) AsBillingAppStripe() (BillingAppStripe, error)", + "line": 5984 + }, + { + "kind": "func", + "name": "FromBillingAppStripe", + "signature": "func (t *BillingApp) FromBillingAppStripe(v BillingAppStripe) error", + "line": 5991 + }, + { + "kind": "func", + "name": "MergeBillingAppStripe", + "signature": "func (t *BillingApp) MergeBillingAppStripe(v BillingAppStripe) error", + "line": 5999 + }, + { + "kind": "func", + "name": "AsBillingAppSandbox", + "signature": "func (t BillingApp) AsBillingAppSandbox() (BillingAppSandbox, error)", + "line": 6012 + }, + { + "kind": "func", + "name": "FromBillingAppSandbox", + "signature": "func (t *BillingApp) FromBillingAppSandbox(v BillingAppSandbox) error", + "line": 6019 + }, + { + "kind": "func", + "name": "MergeBillingAppSandbox", + "signature": "func (t *BillingApp) MergeBillingAppSandbox(v BillingAppSandbox) error", + "line": 6027 + }, + { + "kind": "func", + "name": "AsBillingAppExternalInvoicing", + "signature": "func (t BillingApp) AsBillingAppExternalInvoicing() (BillingAppExternalInvoicing, error)", + "line": 6040 + }, + { + "kind": "func", + "name": "FromBillingAppExternalInvoicing", + "signature": "func (t *BillingApp) FromBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error", + "line": 6047 + }, + { + "kind": "func", + "name": "MergeBillingAppExternalInvoicing", + "signature": "func (t *BillingApp) MergeBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error", + "line": 6055 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingApp) Discriminator() (string, error)", + "line": 6067 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingApp) ValueByDiscriminator() (interface", + "line": 6075 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingApp) MarshalJSON() ([]byte, error)", + "line": 6092 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingApp) UnmarshalJSON(b []byte) error", + "line": 6097 + }, + { + "kind": "func", + "name": "AsBillingFlatFeeCharge", + "signature": "func (t BillingCharge) AsBillingFlatFeeCharge() (BillingFlatFeeCharge, error)", + "line": 6103 + }, + { + "kind": "func", + "name": "FromBillingFlatFeeCharge", + "signature": "func (t *BillingCharge) FromBillingFlatFeeCharge(v BillingFlatFeeCharge) error", + "line": 6110 + }, + { + "kind": "func", + "name": "MergeBillingFlatFeeCharge", + "signature": "func (t *BillingCharge) MergeBillingFlatFeeCharge(v BillingFlatFeeCharge) error", + "line": 6118 + }, + { + "kind": "func", + "name": "AsBillingUsageBasedCharge", + "signature": "func (t BillingCharge) AsBillingUsageBasedCharge() (BillingUsageBasedCharge, error)", + "line": 6131 + }, + { + "kind": "func", + "name": "FromBillingUsageBasedCharge", + "signature": "func (t *BillingCharge) FromBillingUsageBasedCharge(v BillingUsageBasedCharge) error", + "line": 6138 + }, + { + "kind": "func", + "name": "MergeBillingUsageBasedCharge", + "signature": "func (t *BillingCharge) MergeBillingUsageBasedCharge(v BillingUsageBasedCharge) error", + "line": 6146 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingCharge) Discriminator() (string, error)", + "line": 6158 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingCharge) ValueByDiscriminator() (interface", + "line": 6166 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingCharge) MarshalJSON() ([]byte, error)", + "line": 6181 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingCharge) UnmarshalJSON(b []byte) error", + "line": 6186 + }, + { + "kind": "func", + "name": "AsBillingCurrencyFiat", + "signature": "func (t BillingCurrency) AsBillingCurrencyFiat() (BillingCurrencyFiat, error)", + "line": 6192 + }, + { + "kind": "func", + "name": "FromBillingCurrencyFiat", + "signature": "func (t *BillingCurrency) FromBillingCurrencyFiat(v BillingCurrencyFiat) error", + "line": 6199 + }, + { + "kind": "func", + "name": "MergeBillingCurrencyFiat", + "signature": "func (t *BillingCurrency) MergeBillingCurrencyFiat(v BillingCurrencyFiat) error", + "line": 6207 + }, + { + "kind": "func", + "name": "AsBillingCurrencyCustom", + "signature": "func (t BillingCurrency) AsBillingCurrencyCustom() (BillingCurrencyCustom, error)", + "line": 6220 + }, + { + "kind": "func", + "name": "FromBillingCurrencyCustom", + "signature": "func (t *BillingCurrency) FromBillingCurrencyCustom(v BillingCurrencyCustom) error", + "line": 6227 + }, + { + "kind": "func", + "name": "MergeBillingCurrencyCustom", + "signature": "func (t *BillingCurrency) MergeBillingCurrencyCustom(v BillingCurrencyCustom) error", + "line": 6235 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingCurrency) Discriminator() (string, error)", + "line": 6247 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingCurrency) ValueByDiscriminator() (interface", + "line": 6255 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingCurrency) MarshalJSON() ([]byte, error)", + "line": 6270 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingCurrency) UnmarshalJSON(b []byte) error", + "line": 6275 + }, + { + "kind": "func", + "name": "AsBillingFeatureManualUnitCost", + "signature": "func (t BillingFeatureUnitCost) AsBillingFeatureManualUnitCost() (BillingFeatureManualUnitCost, error)", + "line": 6281 + }, + { + "kind": "func", + "name": "FromBillingFeatureManualUnitCost", + "signature": "func (t *BillingFeatureUnitCost) FromBillingFeatureManualUnitCost(v BillingFeatureManualUnitCost) error", + "line": 6288 + }, + { + "kind": "func", + "name": "MergeBillingFeatureManualUnitCost", + "signature": "func (t *BillingFeatureUnitCost) MergeBillingFeatureManualUnitCost(v BillingFeatureManualUnitCost) error", + "line": 6296 + }, + { + "kind": "func", + "name": "AsBillingFeatureLLMUnitCost", + "signature": "func (t BillingFeatureUnitCost) AsBillingFeatureLLMUnitCost() (BillingFeatureLLMUnitCost, error)", + "line": 6309 + }, + { + "kind": "func", + "name": "FromBillingFeatureLLMUnitCost", + "signature": "func (t *BillingFeatureUnitCost) FromBillingFeatureLLMUnitCost(v BillingFeatureLLMUnitCost) error", + "line": 6316 + }, + { + "kind": "func", + "name": "MergeBillingFeatureLLMUnitCost", + "signature": "func (t *BillingFeatureUnitCost) MergeBillingFeatureLLMUnitCost(v BillingFeatureLLMUnitCost) error", + "line": 6324 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingFeatureUnitCost) Discriminator() (string, error)", + "line": 6336 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingFeatureUnitCost) ValueByDiscriminator() (interface", + "line": 6344 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingFeatureUnitCost) MarshalJSON() ([]byte, error)", + "line": 6359 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingFeatureUnitCost) UnmarshalJSON(b []byte) error", + "line": 6364 + }, + { + "kind": "func", + "name": "AsBillingPriceFree", + "signature": "func (t BillingPrice) AsBillingPriceFree() (BillingPriceFree, error)", + "line": 6370 + }, + { + "kind": "func", + "name": "FromBillingPriceFree", + "signature": "func (t *BillingPrice) FromBillingPriceFree(v BillingPriceFree) error", + "line": 6377 + }, + { + "kind": "func", + "name": "MergeBillingPriceFree", + "signature": "func (t *BillingPrice) MergeBillingPriceFree(v BillingPriceFree) error", + "line": 6385 + }, + { + "kind": "func", + "name": "AsBillingPriceFlat", + "signature": "func (t BillingPrice) AsBillingPriceFlat() (BillingPriceFlat, error)", + "line": 6398 + }, + { + "kind": "func", + "name": "FromBillingPriceFlat", + "signature": "func (t *BillingPrice) FromBillingPriceFlat(v BillingPriceFlat) error", + "line": 6405 + }, + { + "kind": "func", + "name": "MergeBillingPriceFlat", + "signature": "func (t *BillingPrice) MergeBillingPriceFlat(v BillingPriceFlat) error", + "line": 6413 + }, + { + "kind": "func", + "name": "AsBillingPriceUnit", + "signature": "func (t BillingPrice) AsBillingPriceUnit() (BillingPriceUnit, error)", + "line": 6426 + }, + { + "kind": "func", + "name": "FromBillingPriceUnit", + "signature": "func (t *BillingPrice) FromBillingPriceUnit(v BillingPriceUnit) error", + "line": 6433 + }, + { + "kind": "func", + "name": "MergeBillingPriceUnit", + "signature": "func (t *BillingPrice) MergeBillingPriceUnit(v BillingPriceUnit) error", + "line": 6441 + }, + { + "kind": "func", + "name": "AsBillingPriceGraduated", + "signature": "func (t BillingPrice) AsBillingPriceGraduated() (BillingPriceGraduated, error)", + "line": 6454 + }, + { + "kind": "func", + "name": "FromBillingPriceGraduated", + "signature": "func (t *BillingPrice) FromBillingPriceGraduated(v BillingPriceGraduated) error", + "line": 6461 + }, + { + "kind": "func", + "name": "MergeBillingPriceGraduated", + "signature": "func (t *BillingPrice) MergeBillingPriceGraduated(v BillingPriceGraduated) error", + "line": 6469 + }, + { + "kind": "func", + "name": "AsBillingPriceVolume", + "signature": "func (t BillingPrice) AsBillingPriceVolume() (BillingPriceVolume, error)", + "line": 6482 + }, + { + "kind": "func", + "name": "FromBillingPriceVolume", + "signature": "func (t *BillingPrice) FromBillingPriceVolume(v BillingPriceVolume) error", + "line": 6489 + }, + { + "kind": "func", + "name": "MergeBillingPriceVolume", + "signature": "func (t *BillingPrice) MergeBillingPriceVolume(v BillingPriceVolume) error", + "line": 6497 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingPrice) Discriminator() (string, error)", + "line": 6509 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingPrice) ValueByDiscriminator() (interface", + "line": 6517 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingPrice) MarshalJSON() ([]byte, error)", + "line": 6538 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingPrice) UnmarshalJSON(b []byte) error", + "line": 6543 + }, + { + "kind": "func", + "name": "AsBillingSubscriptionEditTimingEnum", + "signature": "func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)", + "line": 6549 + }, + { + "kind": "func", + "name": "FromBillingSubscriptionEditTimingEnum", + "signature": "func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error", + "line": 6556 + }, + { + "kind": "func", + "name": "MergeBillingSubscriptionEditTimingEnum", + "signature": "func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error", + "line": 6563 + }, + { + "kind": "func", + "name": "AsDateTime", + "signature": "func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)", + "line": 6575 + }, + { + "kind": "func", + "name": "FromDateTime", + "signature": "func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error", + "line": 6582 + }, + { + "kind": "func", + "name": "MergeDateTime", + "signature": "func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error", + "line": 6589 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)", + "line": 6600 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error", + "line": 6605 + }, + { + "kind": "func", + "name": "AsBillingWorkflowCollectionAlignmentSubscription", + "signature": "func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription() (BillingWorkflowCollectionAlignmentSubscription, error)", + "line": 6611 + }, + { + "kind": "func", + "name": "FromBillingWorkflowCollectionAlignmentSubscription", + "signature": "func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error", + "line": 6618 + }, + { + "kind": "func", + "name": "MergeBillingWorkflowCollectionAlignmentSubscription", + "signature": "func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error", + "line": 6626 + }, + { + "kind": "func", + "name": "AsBillingWorkflowCollectionAlignmentAnchored", + "signature": "func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored() (BillingWorkflowCollectionAlignmentAnchored, error)", + "line": 6639 + }, + { + "kind": "func", + "name": "FromBillingWorkflowCollectionAlignmentAnchored", + "signature": "func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error", + "line": 6646 + }, + { + "kind": "func", + "name": "MergeBillingWorkflowCollectionAlignmentAnchored", + "signature": "func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error", + "line": 6654 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingWorkflowCollectionAlignment) Discriminator() (string, error)", + "line": 6666 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingWorkflowCollectionAlignment) ValueByDiscriminator() (interface", + "line": 6674 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingWorkflowCollectionAlignment) MarshalJSON() ([]byte, error)", + "line": 6689 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingWorkflowCollectionAlignment) UnmarshalJSON(b []byte) error", + "line": 6694 + }, + { + "kind": "func", + "name": "AsBillingWorkflowPaymentChargeAutomaticallySettings", + "signature": "func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings() (BillingWorkflowPaymentChargeAutomaticallySettings, error)", + "line": 6700 + }, + { + "kind": "func", + "name": "FromBillingWorkflowPaymentChargeAutomaticallySettings", + "signature": "func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error", + "line": 6707 + }, + { + "kind": "func", + "name": "MergeBillingWorkflowPaymentChargeAutomaticallySettings", + "signature": "func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error", + "line": 6715 + }, + { + "kind": "func", + "name": "AsBillingWorkflowPaymentSendInvoiceSettings", + "signature": "func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings() (BillingWorkflowPaymentSendInvoiceSettings, error)", + "line": 6728 + }, + { + "kind": "func", + "name": "FromBillingWorkflowPaymentSendInvoiceSettings", + "signature": "func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error", + "line": 6735 + }, + { + "kind": "func", + "name": "MergeBillingWorkflowPaymentSendInvoiceSettings", + "signature": "func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error", + "line": 6743 + }, + { + "kind": "func", + "name": "Discriminator", + "signature": "func (t BillingWorkflowPaymentSettings) Discriminator() (string, error)", + "line": 6755 + }, + { + "kind": "func", + "name": "ValueByDiscriminator", + "signature": "func (t BillingWorkflowPaymentSettings) ValueByDiscriminator() (interface", + "line": 6763 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t BillingWorkflowPaymentSettings) MarshalJSON() ([]byte, error)", + "line": 6778 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *BillingWorkflowPaymentSettings) UnmarshalJSON(b []byte) error", + "line": 6783 + }, + { + "kind": "func", + "name": "AsInvalidParameterStandard", + "signature": "func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)", + "line": 6789 + }, + { + "kind": "func", + "name": "FromInvalidParameterStandard", + "signature": "func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error", + "line": 6796 + }, + { + "kind": "func", + "name": "MergeInvalidParameterStandard", + "signature": "func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error", + "line": 6803 + }, + { + "kind": "func", + "name": "AsInvalidParameterMinimumLength", + "signature": "func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)", + "line": 6815 + }, + { + "kind": "func", + "name": "FromInvalidParameterMinimumLength", + "signature": "func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error", + "line": 6822 + }, + { + "kind": "func", + "name": "MergeInvalidParameterMinimumLength", + "signature": "func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error", + "line": 6829 + }, + { + "kind": "func", + "name": "AsInvalidParameterMaximumLength", + "signature": "func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)", + "line": 6841 + }, + { + "kind": "func", + "name": "FromInvalidParameterMaximumLength", + "signature": "func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error", + "line": 6848 + }, + { + "kind": "func", + "name": "MergeInvalidParameterMaximumLength", + "signature": "func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error", + "line": 6855 + }, + { + "kind": "func", + "name": "AsInvalidParameterChoiceItem", + "signature": "func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)", + "line": 6867 + }, + { + "kind": "func", + "name": "FromInvalidParameterChoiceItem", + "signature": "func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error", + "line": 6874 + }, + { + "kind": "func", + "name": "MergeInvalidParameterChoiceItem", + "signature": "func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error", + "line": 6881 + }, + { + "kind": "func", + "name": "AsInvalidParameterDependentItem", + "signature": "func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)", + "line": 6893 + }, + { + "kind": "func", + "name": "FromInvalidParameterDependentItem", + "signature": "func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error", + "line": 6900 + }, + { + "kind": "func", + "name": "MergeInvalidParameterDependentItem", + "signature": "func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error", + "line": 6907 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)", + "line": 6918 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error", + "line": 6923 + }, + { + "kind": "interface", + "name": "ServerInterface", + "signature": "type ServerInterface interface", + "line": 6929 + }, + { + "kind": "struct", + "name": "Unimplemented", + "signature": "type Unimplemented struct", + "line": 7186 + }, + { + "kind": "func", + "name": "ListAddons", + "signature": "func (_ Unimplemented) ListAddons(w http.ResponseWriter, r *http.Request, params ListAddonsParams)", + "line": 7190 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (_ Unimplemented) CreateAddon(w http.ResponseWriter, r *http.Request)", + "line": 7196 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (_ Unimplemented) DeleteAddon(w http.ResponseWriter, r *http.Request, addonId ULID)", + "line": 7202 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (_ Unimplemented) GetAddon(w http.ResponseWriter, r *http.Request, addonId ULID)", + "line": 7208 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (_ Unimplemented) UpdateAddon(w http.ResponseWriter, r *http.Request, addonId ULID)", + "line": 7214 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (_ Unimplemented) ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId ULID)", + "line": 7220 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (_ Unimplemented) PublishAddon(w http.ResponseWriter, r *http.Request, addonId ULID)", + "line": 7226 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (_ Unimplemented) ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)", + "line": 7232 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (_ Unimplemented) GetApp(w http.ResponseWriter, r *http.Request, appId ULID)", + "line": 7238 + }, + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (_ Unimplemented) ListCurrencies(w http.ResponseWriter, r *http.Request, params ListCurrenciesParams)", + "line": 7244 + }, + { + "kind": "func", + "name": "CreateCustomCurrency", + "signature": "func (_ Unimplemented) CreateCustomCurrency(w http.ResponseWriter, r *http.Request)", + "line": 7250 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (_ Unimplemented) ListCostBases(w http.ResponseWriter, r *http.Request, currencyId ULID, params ListCostBasesParams)", + "line": 7256 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (_ Unimplemented) CreateCostBasis(w http.ResponseWriter, r *http.Request, currencyId ULID)", + "line": 7262 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)", + "line": 7268 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)", + "line": 7274 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7280 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7286 + }, + { + "kind": "func", + "name": "UpsertCustomer", + "signature": "func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7292 + }, + { + "kind": "func", + "name": "GetCustomerBilling", + "signature": "func (_ Unimplemented) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7298 + }, + { + "kind": "func", + "name": "UpdateCustomerBilling", + "signature": "func (_ Unimplemented) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7304 + }, + { + "kind": "func", + "name": "UpdateCustomerBillingAppData", + "signature": "func (_ Unimplemented) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7310 + }, + { + "kind": "func", + "name": "CreateCustomerStripeCheckoutSession", + "signature": "func (_ Unimplemented) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7316 + }, + { + "kind": "func", + "name": "CreateCustomerStripePortalSession", + "signature": "func (_ Unimplemented) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7322 + }, + { + "kind": "func", + "name": "ListCustomerCharges", + "signature": "func (_ Unimplemented) ListCustomerCharges(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCustomerChargesParams)", + "line": 7328 + }, + { + "kind": "func", + "name": "CreateCreditAdjustment", + "signature": "func (_ Unimplemented) CreateCreditAdjustment(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7334 + }, + { + "kind": "func", + "name": "GetCustomerCreditBalance", + "signature": "func (_ Unimplemented) GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request, customerId ULID, params GetCustomerCreditBalanceParams)", + "line": 7340 + }, + { + "kind": "func", + "name": "ListCreditGrants", + "signature": "func (_ Unimplemented) ListCreditGrants(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditGrantsParams)", + "line": 7346 + }, + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (_ Unimplemented) CreateCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7352 + }, + { + "kind": "func", + "name": "GetCreditGrant", + "signature": "func (_ Unimplemented) GetCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)", + "line": 7358 + }, + { + "kind": "func", + "name": "UpdateCreditGrantExternalSettlement", + "signature": "func (_ Unimplemented) UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)", + "line": 7364 + }, + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (_ Unimplemented) ListCreditTransactions(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditTransactionsParams)", + "line": 7370 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementAccess", + "signature": "func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)", + "line": 7376 + }, + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (_ Unimplemented) GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 7382 + }, + { + "kind": "func", + "name": "UpdateOrganizationDefaultTaxCodes", + "signature": "func (_ Unimplemented) UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 7388 + }, + { + "kind": "func", + "name": "ListMeteringEvents", + "signature": "func (_ Unimplemented) ListMeteringEvents(w http.ResponseWriter, r *http.Request, params ListMeteringEventsParams)", + "line": 7394 + }, + { + "kind": "func", + "name": "IngestMeteringEvents", + "signature": "func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)", + "line": 7400 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (_ Unimplemented) ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)", + "line": 7406 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)", + "line": 7412 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId ULID)", + "line": 7418 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (_ Unimplemented) GetFeature(w http.ResponseWriter, r *http.Request, featureId ULID)", + "line": 7424 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (_ Unimplemented) UpdateFeature(w http.ResponseWriter, r *http.Request, featureId ULID)", + "line": 7430 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (_ Unimplemented) QueryFeatureCost(w http.ResponseWriter, r *http.Request, featureId ULID)", + "line": 7436 + }, + { + "kind": "func", + "name": "QueryGovernanceAccess", + "signature": "func (_ Unimplemented) QueryGovernanceAccess(w http.ResponseWriter, r *http.Request, params QueryGovernanceAccessParams)", + "line": 7442 + }, + { + "kind": "func", + "name": "ListLlmCostOverrides", + "signature": "func (_ Unimplemented) ListLlmCostOverrides(w http.ResponseWriter, r *http.Request, params ListLlmCostOverridesParams)", + "line": 7448 + }, + { + "kind": "func", + "name": "CreateLlmCostOverride", + "signature": "func (_ Unimplemented) CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)", + "line": 7454 + }, + { + "kind": "func", + "name": "DeleteLlmCostOverride", + "signature": "func (_ Unimplemented) DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request, priceId ULID)", + "line": 7460 + }, + { + "kind": "func", + "name": "ListLlmCostPrices", + "signature": "func (_ Unimplemented) ListLlmCostPrices(w http.ResponseWriter, r *http.Request, params ListLlmCostPricesParams)", + "line": 7466 + }, + { + "kind": "func", + "name": "GetLlmCostPrice", + "signature": "func (_ Unimplemented) GetLlmCostPrice(w http.ResponseWriter, r *http.Request, priceId ULID)", + "line": 7472 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)", + "line": 7478 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)", + "line": 7484 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)", + "line": 7490 + }, + { + "kind": "func", + "name": "GetMeter", + "signature": "func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)", + "line": 7496 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (_ Unimplemented) UpdateMeter(w http.ResponseWriter, r *http.Request, meterId ULID)", + "line": 7502 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterId ULID)", + "line": 7508 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (_ Unimplemented) ListPlans(w http.ResponseWriter, r *http.Request, params ListPlansParams)", + "line": 7514 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (_ Unimplemented) CreatePlan(w http.ResponseWriter, r *http.Request)", + "line": 7520 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (_ Unimplemented) DeletePlan(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7526 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (_ Unimplemented) GetPlan(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7532 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (_ Unimplemented) UpdatePlan(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7538 + }, + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (_ Unimplemented) ListPlanAddons(w http.ResponseWriter, r *http.Request, planId ULID, params ListPlanAddonsParams)", + "line": 7544 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (_ Unimplemented) CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7550 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (_ Unimplemented) DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)", + "line": 7556 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (_ Unimplemented) GetPlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)", + "line": 7562 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (_ Unimplemented) UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)", + "line": 7568 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (_ Unimplemented) ArchivePlan(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7574 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (_ Unimplemented) PublishPlan(w http.ResponseWriter, r *http.Request, planId ULID)", + "line": 7580 + }, + { + "kind": "func", + "name": "ListBillingProfiles", + "signature": "func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)", + "line": 7586 + }, + { + "kind": "func", + "name": "CreateBillingProfile", + "signature": "func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 7592 + }, + { + "kind": "func", + "name": "DeleteBillingProfile", + "signature": "func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)", + "line": 7598 + }, + { + "kind": "func", + "name": "GetBillingProfile", + "signature": "func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)", + "line": 7604 + }, + { + "kind": "func", + "name": "UpdateBillingProfile", + "signature": "func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)", + "line": 7610 + }, + { + "kind": "func", + "name": "ListSubscriptions", + "signature": "func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)", + "line": 7616 + }, + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)", + "line": 7622 + }, + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)", + "line": 7628 + }, + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (_ Unimplemented) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId ULID, params ListSubscriptionAddonsParams)", + "line": 7634 + }, + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (_ Unimplemented) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID, subscriptionAddonId ULID)", + "line": 7640 + }, + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)", + "line": 7646 + }, + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)", + "line": 7652 + }, + { + "kind": "func", + "name": "UnscheduleCancelation", + "signature": "func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)", + "line": 7658 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (_ Unimplemented) ListTaxCodes(w http.ResponseWriter, r *http.Request, params ListTaxCodesParams)", + "line": 7664 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (_ Unimplemented) CreateTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 7670 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (_ Unimplemented) DeleteTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)", + "line": 7676 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (_ Unimplemented) GetTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)", + "line": 7682 + }, + { + "kind": "func", + "name": "UpsertTaxCode", + "signature": "func (_ Unimplemented) UpsertTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)", + "line": 7688 + }, + { + "kind": "struct", + "name": "ServerInterfaceWrapper", + "signature": "type ServerInterfaceWrapper struct", + "line": 7693 + }, + { + "kind": "func", + "name": "ListAddons", + "signature": "func (siw *ServerInterfaceWrapper) ListAddons(w http.ResponseWriter, r *http.Request)", + "line": 7702 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (siw *ServerInterfaceWrapper) CreateAddon(w http.ResponseWriter, r *http.Request)", + "line": 7745 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (siw *ServerInterfaceWrapper) DeleteAddon(w http.ResponseWriter, r *http.Request)", + "line": 7759 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (siw *ServerInterfaceWrapper) GetAddon(w http.ResponseWriter, r *http.Request)", + "line": 7784 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (siw *ServerInterfaceWrapper) UpdateAddon(w http.ResponseWriter, r *http.Request)", + "line": 7809 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (siw *ServerInterfaceWrapper) ArchiveAddon(w http.ResponseWriter, r *http.Request)", + "line": 7834 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (siw *ServerInterfaceWrapper) PublishAddon(w http.ResponseWriter, r *http.Request)", + "line": 7859 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (siw *ServerInterfaceWrapper) ListApps(w http.ResponseWriter, r *http.Request)", + "line": 7884 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (siw *ServerInterfaceWrapper) GetApp(w http.ResponseWriter, r *http.Request)", + "line": 7911 + }, + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (siw *ServerInterfaceWrapper) ListCurrencies(w http.ResponseWriter, r *http.Request)", + "line": 7936 + }, + { + "kind": "func", + "name": "CreateCustomCurrency", + "signature": "func (siw *ServerInterfaceWrapper) CreateCustomCurrency(w http.ResponseWriter, r *http.Request)", + "line": 7979 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (siw *ServerInterfaceWrapper) ListCostBases(w http.ResponseWriter, r *http.Request)", + "line": 7993 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (siw *ServerInterfaceWrapper) CreateCostBasis(w http.ResponseWriter, r *http.Request)", + "line": 8037 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)", + "line": 8062 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)", + "line": 8105 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)", + "line": 8119 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)", + "line": 8144 + }, + { + "kind": "func", + "name": "UpsertCustomer", + "signature": "func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)", + "line": 8169 + }, + { + "kind": "func", + "name": "GetCustomerBilling", + "signature": "func (siw *ServerInterfaceWrapper) GetCustomerBilling(w http.ResponseWriter, r *http.Request)", + "line": 8194 + }, + { + "kind": "func", + "name": "UpdateCustomerBilling", + "signature": "func (siw *ServerInterfaceWrapper) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request)", + "line": 8219 + }, + { + "kind": "func", + "name": "UpdateCustomerBillingAppData", + "signature": "func (siw *ServerInterfaceWrapper) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request)", + "line": 8244 + }, + { + "kind": "func", + "name": "CreateCustomerStripeCheckoutSession", + "signature": "func (siw *ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request)", + "line": 8269 + }, + { + "kind": "func", + "name": "CreateCustomerStripePortalSession", + "signature": "func (siw *ServerInterfaceWrapper) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request)", + "line": 8294 + }, + { + "kind": "func", + "name": "ListCustomerCharges", + "signature": "func (siw *ServerInterfaceWrapper) ListCustomerCharges(w http.ResponseWriter, r *http.Request)", + "line": 8319 + }, + { + "kind": "func", + "name": "CreateCreditAdjustment", + "signature": "func (siw *ServerInterfaceWrapper) CreateCreditAdjustment(w http.ResponseWriter, r *http.Request)", + "line": 8379 + }, + { + "kind": "func", + "name": "GetCustomerCreditBalance", + "signature": "func (siw *ServerInterfaceWrapper) GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request)", + "line": 8404 + }, + { + "kind": "func", + "name": "ListCreditGrants", + "signature": "func (siw *ServerInterfaceWrapper) ListCreditGrants(w http.ResponseWriter, r *http.Request)", + "line": 8448 + }, + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (siw *ServerInterfaceWrapper) CreateCreditGrant(w http.ResponseWriter, r *http.Request)", + "line": 8492 + }, + { + "kind": "func", + "name": "GetCreditGrant", + "signature": "func (siw *ServerInterfaceWrapper) GetCreditGrant(w http.ResponseWriter, r *http.Request)", + "line": 8517 + }, + { + "kind": "func", + "name": "UpdateCreditGrantExternalSettlement", + "signature": "func (siw *ServerInterfaceWrapper) UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request)", + "line": 8551 + }, + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (siw *ServerInterfaceWrapper) ListCreditTransactions(w http.ResponseWriter, r *http.Request)", + "line": 8585 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementAccess", + "signature": "func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)", + "line": 8629 + }, + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (siw *ServerInterfaceWrapper) GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 8654 + }, + { + "kind": "func", + "name": "UpdateOrganizationDefaultTaxCodes", + "signature": "func (siw *ServerInterfaceWrapper) UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 8668 + }, + { + "kind": "func", + "name": "ListMeteringEvents", + "signature": "func (siw *ServerInterfaceWrapper) ListMeteringEvents(w http.ResponseWriter, r *http.Request)", + "line": 8682 + }, + { + "kind": "func", + "name": "IngestMeteringEvents", + "signature": "func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)", + "line": 8725 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (siw *ServerInterfaceWrapper) ListFeatures(w http.ResponseWriter, r *http.Request)", + "line": 8739 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (siw *ServerInterfaceWrapper) CreateFeature(w http.ResponseWriter, r *http.Request)", + "line": 8782 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (siw *ServerInterfaceWrapper) DeleteFeature(w http.ResponseWriter, r *http.Request)", + "line": 8796 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (siw *ServerInterfaceWrapper) GetFeature(w http.ResponseWriter, r *http.Request)", + "line": 8821 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (siw *ServerInterfaceWrapper) UpdateFeature(w http.ResponseWriter, r *http.Request)", + "line": 8846 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (siw *ServerInterfaceWrapper) QueryFeatureCost(w http.ResponseWriter, r *http.Request)", + "line": 8871 + }, + { + "kind": "func", + "name": "QueryGovernanceAccess", + "signature": "func (siw *ServerInterfaceWrapper) QueryGovernanceAccess(w http.ResponseWriter, r *http.Request)", + "line": 8896 + }, + { + "kind": "func", + "name": "ListLlmCostOverrides", + "signature": "func (siw *ServerInterfaceWrapper) ListLlmCostOverrides(w http.ResponseWriter, r *http.Request)", + "line": 8923 + }, + { + "kind": "func", + "name": "CreateLlmCostOverride", + "signature": "func (siw *ServerInterfaceWrapper) CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)", + "line": 8958 + }, + { + "kind": "func", + "name": "DeleteLlmCostOverride", + "signature": "func (siw *ServerInterfaceWrapper) DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request)", + "line": 8972 + }, + { + "kind": "func", + "name": "ListLlmCostPrices", + "signature": "func (siw *ServerInterfaceWrapper) ListLlmCostPrices(w http.ResponseWriter, r *http.Request)", + "line": 8997 + }, + { + "kind": "func", + "name": "GetLlmCostPrice", + "signature": "func (siw *ServerInterfaceWrapper) GetLlmCostPrice(w http.ResponseWriter, r *http.Request)", + "line": 9040 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)", + "line": 9065 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)", + "line": 9108 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)", + "line": 9122 + }, + { + "kind": "func", + "name": "GetMeter", + "signature": "func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)", + "line": 9147 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (siw *ServerInterfaceWrapper) UpdateMeter(w http.ResponseWriter, r *http.Request)", + "line": 9172 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (siw *ServerInterfaceWrapper) QueryMeter(w http.ResponseWriter, r *http.Request)", + "line": 9197 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (siw *ServerInterfaceWrapper) ListPlans(w http.ResponseWriter, r *http.Request)", + "line": 9222 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (siw *ServerInterfaceWrapper) CreatePlan(w http.ResponseWriter, r *http.Request)", + "line": 9265 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (siw *ServerInterfaceWrapper) DeletePlan(w http.ResponseWriter, r *http.Request)", + "line": 9279 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (siw *ServerInterfaceWrapper) GetPlan(w http.ResponseWriter, r *http.Request)", + "line": 9304 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (siw *ServerInterfaceWrapper) UpdatePlan(w http.ResponseWriter, r *http.Request)", + "line": 9329 + }, + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (siw *ServerInterfaceWrapper) ListPlanAddons(w http.ResponseWriter, r *http.Request)", + "line": 9354 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (siw *ServerInterfaceWrapper) CreatePlanAddon(w http.ResponseWriter, r *http.Request)", + "line": 9390 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (siw *ServerInterfaceWrapper) DeletePlanAddon(w http.ResponseWriter, r *http.Request)", + "line": 9415 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (siw *ServerInterfaceWrapper) GetPlanAddon(w http.ResponseWriter, r *http.Request)", + "line": 9449 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (siw *ServerInterfaceWrapper) UpdatePlanAddon(w http.ResponseWriter, r *http.Request)", + "line": 9483 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (siw *ServerInterfaceWrapper) ArchivePlan(w http.ResponseWriter, r *http.Request)", + "line": 9517 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (siw *ServerInterfaceWrapper) PublishPlan(w http.ResponseWriter, r *http.Request)", + "line": 9542 + }, + { + "kind": "func", + "name": "ListBillingProfiles", + "signature": "func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request)", + "line": 9567 + }, + { + "kind": "func", + "name": "CreateBillingProfile", + "signature": "func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 9594 + }, + { + "kind": "func", + "name": "DeleteBillingProfile", + "signature": "func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 9608 + }, + { + "kind": "func", + "name": "GetBillingProfile", + "signature": "func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 9633 + }, + { + "kind": "func", + "name": "UpdateBillingProfile", + "signature": "func (siw *ServerInterfaceWrapper) UpdateBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 9658 + }, + { + "kind": "func", + "name": "ListSubscriptions", + "signature": "func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)", + "line": 9683 + }, + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)", + "line": 9726 + }, + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)", + "line": 9740 + }, + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (siw *ServerInterfaceWrapper) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request)", + "line": 9765 + }, + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (siw *ServerInterfaceWrapper) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request)", + "line": 9809 + }, + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)", + "line": 9843 + }, + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)", + "line": 9868 + }, + { + "kind": "func", + "name": "UnscheduleCancelation", + "signature": "func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)", + "line": 9893 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (siw *ServerInterfaceWrapper) ListTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 9918 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (siw *ServerInterfaceWrapper) CreateTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 9953 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (siw *ServerInterfaceWrapper) DeleteTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 9967 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (siw *ServerInterfaceWrapper) GetTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 9992 + }, + { + "kind": "func", + "name": "UpsertTaxCode", + "signature": "func (siw *ServerInterfaceWrapper) UpsertTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 10017 + }, + { + "kind": "struct", + "name": "UnescapedCookieParamError", + "signature": "type UnescapedCookieParamError struct", + "line": 10041 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *UnescapedCookieParamError) Error() string", + "line": 10046 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *UnescapedCookieParamError) Unwrap() error", + "line": 10050 + }, + { + "kind": "struct", + "name": "UnmarshalingParamError", + "signature": "type UnmarshalingParamError struct", + "line": 10054 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *UnmarshalingParamError) Error() string", + "line": 10059 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *UnmarshalingParamError) Unwrap() error", + "line": 10063 + }, + { + "kind": "struct", + "name": "RequiredParamError", + "signature": "type RequiredParamError struct", + "line": 10067 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *RequiredParamError) Error() string", + "line": 10071 + }, + { + "kind": "struct", + "name": "RequiredHeaderError", + "signature": "type RequiredHeaderError struct", + "line": 10075 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *RequiredHeaderError) Error() string", + "line": 10080 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *RequiredHeaderError) Unwrap() error", + "line": 10084 + }, + { + "kind": "struct", + "name": "InvalidParamFormatError", + "signature": "type InvalidParamFormatError struct", + "line": 10088 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *InvalidParamFormatError) Error() string", + "line": 10093 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *InvalidParamFormatError) Unwrap() error", + "line": 10097 + }, + { + "kind": "struct", + "name": "TooManyValuesForParamError", + "signature": "type TooManyValuesForParamError struct", + "line": 10101 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *TooManyValuesForParamError) Error() string", + "line": 10106 + }, + { + "kind": "func", + "name": "Handler", + "signature": "func Handler(si ServerInterface) http.Handler", + "line": 10111 + }, + { + "kind": "struct", + "name": "ChiServerOptions", + "signature": "type ChiServerOptions struct", + "line": 10115 + }, + { + "kind": "func", + "name": "HandlerFromMux", + "signature": "func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler", + "line": 10123 + }, + { + "kind": "func", + "name": "HandlerFromMuxWithBaseURL", + "signature": "func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler", + "line": 10129 + }, + { + "kind": "func", + "name": "HandlerWithOptions", + "signature": "func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler", + "line": 10137 + }, + { + "kind": "func", + "name": "decodeSpec", + "signature": "func decodeSpec() ([]byte, error)", + "line": 11067 + }, + { + "kind": "func", + "name": "decodeSpecCached", + "signature": "func decodeSpecCached() func() ([]byte, error)", + "line": 11088 + }, + { + "kind": "func", + "name": "PathToRawSpec", + "signature": "func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)", + "line": 11096 + }, + { + "kind": "func", + "name": "GetSwagger", + "signature": "func GetSwagger() (swagger *openapi3.T, err error)", + "line": 11110 + } + ], + "line_count": 11135 + }, + "api/v3/api.go": { + "header": "", + "symbols": [], + "line_count": 2 + }, + "api/v3/apierrors/encoder.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GenericErrorEncoder", + "signature": "func GenericErrorEncoder() encoder.ErrorEncoder", + "line": 16 + } + ], + "line_count": 27 + }, + "api/v3/apierrors/encoder_test.go": { + "header": "\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/http/httptest\"", + "symbols": [ + { + "kind": "func", + "name": "TestGenericErrorEncoder", + "signature": "func TestGenericErrorEncoder(t *testing.T)", + "line": 16 + } + ], + "line_count": 48 + }, + "api/v3/apierrors/errors.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BaseAPIError", + "signature": "type BaseAPIError struct", + "line": 14 + }, + { + "kind": "func", + "name": "String", + "signature": "func (i InvalidParameterSource) String() string", + "line": 65 + }, + { + "kind": "func", + "name": "ToInvalid", + "signature": "func ToInvalid(s string) InvalidParameterSource", + "line": 79 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (i InvalidParameterSource) MarshalJSON() ([]byte, error)", + "line": 93 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (i *InvalidParameterSource) UnmarshalJSON(data []byte) error", + "line": 97 + }, + { + "kind": "struct", + "name": "InvalidParameter", + "signature": "type InvalidParameter struct", + "line": 107 + }, + { + "kind": "func", + "name": "String", + "signature": "func (ips InvalidParameters) String() string", + "line": 137 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (bae *BaseAPIError) Error() string", + "line": 153 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (bae *BaseAPIError) Unwrap() error", + "line": 169 + }, + { + "kind": "func", + "name": "Context", + "signature": "func (bae *BaseAPIError) Context() context.Context", + "line": 174 + }, + { + "kind": "func", + "name": "HandleAPIError", + "signature": "func (bae *BaseAPIError) HandleAPIError(\n\tw http.ResponseWriter,\n\tr *http.Request,\n)", + "line": 179 + } + ], + "line_count": 184 + }, + "api/v3/apierrors/errors_ctors.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewInternalError", + "signature": "func NewInternalError(ctx context.Context, err error) *BaseAPIError", + "line": 81 + }, + { + "kind": "func", + "name": "NewServiceUnavailable", + "signature": "func NewServiceUnavailable(ctx context.Context, err error) *BaseAPIError", + "line": 94 + }, + { + "kind": "func", + "name": "NewUnauthenticatedError", + "signature": "func NewUnauthenticatedError(ctx context.Context, err error) *BaseAPIError", + "line": 107 + }, + { + "kind": "func", + "name": "NewForbiddenError", + "signature": "func NewForbiddenError(ctx context.Context, err error) *BaseAPIError", + "line": 120 + }, + { + "kind": "func", + "name": "NewForbiddenErrorDetail", + "signature": "func NewForbiddenErrorDetail(ctx context.Context, detailMessage string) *BaseAPIError", + "line": 133 + }, + { + "kind": "func", + "name": "NewNotFoundError", + "signature": "func NewNotFoundError(ctx context.Context, err error, entityType string) *BaseAPIError", + "line": 145 + }, + { + "kind": "func", + "name": "NewNotFoundErrors", + "signature": "func NewNotFoundErrors(\n\tctx context.Context,\n\terr error,\n\tentityType string,\n\tresources any,\n) *BaseAPIError", + "line": 168 + }, + { + "kind": "func", + "name": "NewMethodNotAllowedError", + "signature": "func NewMethodNotAllowedError(ctx context.Context) *BaseAPIError", + "line": 186 + }, + { + "kind": "func", + "name": "NewBadRequestError", + "signature": "func NewBadRequestError(ctx context.Context, err error, invalidFields InvalidParameters) *BaseAPIError", + "line": 198 + }, + { + "kind": "func", + "name": "NewGoneError", + "signature": "func NewGoneError(ctx context.Context, err error) *BaseAPIError", + "line": 216 + }, + { + "kind": "func", + "name": "NewPreconditionFailedError", + "signature": "func NewPreconditionFailedError(ctx context.Context, precondition string) *BaseAPIError", + "line": 229 + }, + { + "kind": "func", + "name": "NewRateLimitError", + "signature": "func NewRateLimitError(ctx context.Context) *BaseAPIError", + "line": 242 + }, + { + "kind": "func", + "name": "NewConflictError", + "signature": "func NewConflictError(ctx context.Context, err error, detail string) *BaseAPIError", + "line": 253 + }, + { + "kind": "func", + "name": "NewEmptySetResponse", + "signature": "func NewEmptySetResponse(ctx context.Context, cursorPagination bool) *BaseAPIError", + "line": 265 + }, + { + "kind": "func", + "name": "NewNotImplementedError", + "signature": "func NewNotImplementedError(ctx context.Context, err error) *BaseAPIError", + "line": 280 + }, + { + "kind": "func", + "name": "MakeSentenceCase", + "signature": "func MakeSentenceCase(msg string) string", + "line": 293 + }, + { + "kind": "func", + "name": "instance", + "signature": "func instance(ctx context.Context) string", + "line": 302 + } + ], + "line_count": 308 + }, + "api/v3/apierrors/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewV3ErrorHandlerFunc", + "signature": "func NewV3ErrorHandlerFunc(logger errorsx.Handler) func(w http.ResponseWriter, r *http.Request, err error)", + "line": 21 + }, + { + "kind": "func", + "name": "invalidParametersFromGeneratedRouterError", + "signature": "func invalidParametersFromGeneratedRouterError(err error) (InvalidParameters, bool)", + "line": 60 + }, + { + "kind": "func", + "name": "enrichFieldFromBindError", + "signature": "func enrichFieldFromBindError(paramName string, bindErrMsg string) string", + "line": 142 + }, + { + "kind": "func", + "name": "singularHTTPStatusFromValidationIssues", + "signature": "func singularHTTPStatusFromValidationIssues(err error) (int, bool)", + "line": 172 + }, + { + "kind": "func", + "name": "apiErrorFromHTTPStatus", + "signature": "func apiErrorFromHTTPStatus(ctx context.Context, status int, err error) *BaseAPIError", + "line": 203 + } + ], + "line_count": 222 + }, + "api/v3/codegen.yaml": { + "header": "# yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json\npackage: v3\ngenerate:\n chi-server: true\n models: true\n embedded-spec: true\ncompatibility:\n apply-chi-middleware-first-to-last: true\n # See: https://github.com/oapi-codegen/oapi-codegen/issues/778\n disable-required-readonly-as-pointer: true\n always-prefix-enum-values: true\n preserve-original-operation-id-casing-in-embedded-spec: true\noutput: ./api.gen.go\noutput-options:\n nullable-type: true\n skip-prune: true\n user-templates:\n chi/chi-middleware.tmpl: ./templates/chi-middleware.tmpl", + "symbols": [], + "line_count": 18 + }, + "api/v3/filters/convert.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "FromAPIFilterString", + "signature": "func FromAPIFilterString(f *FilterString) (*filter.FilterString, error)", + "line": 16 + }, + { + "kind": "func", + "name": "FromAPIFilterULID", + "signature": "func FromAPIFilterULID(f *FilterULID) (*filter.FilterULID, error)", + "line": 69 + }, + { + "kind": "func", + "name": "FromAPIFilterLabel", + "signature": "func FromAPIFilterLabel(f *FilterLabel) (*filter.FilterString, error)", + "line": 97 + }, + { + "kind": "func", + "name": "FromAPIFilterLabels", + "signature": "func FromAPIFilterLabels(f *FilterLabels) (map[string]filter.FilterString, error)", + "line": 135 + }, + { + "kind": "func", + "name": "FromAPIFilterStringExact", + "signature": "func FromAPIFilterStringExact(f *FilterStringExact) (*filter.FilterString, error)", + "line": 156 + }, + { + "kind": "func", + "name": "FromAPIFilterNumeric", + "signature": "func FromAPIFilterNumeric(f *FilterNumeric) (*filter.FilterFloat, error)", + "line": 172 + }, + { + "kind": "func", + "name": "FromAPIFilterDateTime", + "signature": "func FromAPIFilterDateTime(f *FilterDateTime) (*filter.FilterTime, error)", + "line": 216 + }, + { + "kind": "func", + "name": "FromAPIFilterBoolean", + "signature": "func FromAPIFilterBoolean(f *FilterBoolean) (*filter.FilterBoolean, error)", + "line": 250 + } + ], + "line_count": 297 + }, + "api/v3/filters/convert_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertFilterString", + "signature": "func TestConvertFilterString(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestConvertFilterStringPtr", + "signature": "func TestConvertFilterStringPtr(t *testing.T)", + "line": 160 + }, + { + "kind": "func", + "name": "TestConvertFilterLabel", + "signature": "func TestConvertFilterLabel(t *testing.T)", + "line": 181 + }, + { + "kind": "func", + "name": "TestConvertFilterLabels", + "signature": "func TestConvertFilterLabels(t *testing.T)", + "line": 245 + }, + { + "kind": "func", + "name": "TestConvertFilterStringExact", + "signature": "func TestConvertFilterStringExact(t *testing.T)", + "line": 273 + }, + { + "kind": "func", + "name": "TestConvertFilterNumeric", + "signature": "func TestConvertFilterNumeric(t *testing.T)", + "line": 288 + }, + { + "kind": "func", + "name": "TestConvertFilterDateTime", + "signature": "func TestConvertFilterDateTime(t *testing.T)", + "line": 326 + }, + { + "kind": "func", + "name": "TestConvertFilterBoolean", + "signature": "func TestConvertFilterBoolean(t *testing.T)", + "line": 375 + } + ], + "line_count": 387 + }, + "api/v3/filters/filter.go": { + "header": "type FilterBoolean struct {\n\tEq *bool `json:\"eq,omitempty\"`\n}", + "symbols": [ + { + "kind": "struct", + "name": "FilterBoolean", + "signature": "type FilterBoolean struct", + "line": 6 + }, + { + "kind": "struct", + "name": "FilterNumeric", + "signature": "type FilterNumeric struct", + "line": 12 + }, + { + "kind": "struct", + "name": "FilterDateTime", + "signature": "type FilterDateTime struct", + "line": 36 + }, + { + "kind": "struct", + "name": "FilterString", + "signature": "type FilterString struct", + "line": 54 + }, + { + "kind": "struct", + "name": "FilterULID", + "signature": "type FilterULID struct", + "line": 87 + }, + { + "kind": "struct", + "name": "FilterLabel", + "signature": "type FilterLabel struct", + "line": 99 + }, + { + "kind": "struct", + "name": "FilterStringExact", + "signature": "type FilterStringExact struct", + "line": 120 + } + ], + "line_count": 129 + }, + "api/v3/filters/parse.go": { + "header": "\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Parse", + "signature": "func Parse(qs url.Values, target any) error", + "line": 47 + }, + { + "kind": "func", + "name": "fieldError", + "signature": "func fieldError(field, op string, err error) error", + "line": 75 + }, + { + "kind": "func", + "name": "parseFiltersValue", + "signature": "func parseFiltersValue(qs url.Values, v reflect.Value) error", + "line": 93 + }, + { + "kind": "func", + "name": "parseStringPtr", + "signature": "func parseStringPtr(qs url.Values, name string, fieldVal reflect.Value) error", + "line": 219 + }, + { + "kind": "func", + "name": "parseStringPtrTyped", + "signature": "func parseStringPtrTyped(qs url.Values, name string, fieldVal reflect.Value) error", + "line": 238 + }, + { + "kind": "func", + "name": "parseTextUnmarshalerPtr", + "signature": "func parseTextUnmarshalerPtr(qs url.Values, name string, fieldVal reflect.Value) error", + "line": 260 + }, + { + "kind": "func", + "name": "parseFilterString", + "signature": "func parseFilterString(qs url.Values, field string) (FilterString, error)", + "line": 291 + }, + { + "kind": "func", + "name": "parseFilterStringExact", + "signature": "func parseFilterStringExact(qs url.Values, field string) (FilterStringExact, error)", + "line": 341 + }, + { + "kind": "func", + "name": "parseFilterULID", + "signature": "func parseFilterULID(qs url.Values, field string) (FilterULID, error)", + "line": 366 + }, + { + "kind": "func", + "name": "parseFilterNumeric", + "signature": "func parseFilterNumeric(qs url.Values, field string) (FilterNumeric, error)", + "line": 391 + }, + { + "kind": "func", + "name": "parseFilterDateTime", + "signature": "func parseFilterDateTime(qs url.Values, field string) (FilterDateTime, error)", + "line": 434 + }, + { + "kind": "func", + "name": "parseFilterBoolean", + "signature": "func parseFilterBoolean(qs url.Values, field string) (FilterBoolean, error)", + "line": 462 + }, + { + "kind": "func", + "name": "applyLabelOp", + "signature": "func applyLabelOp(f *FilterLabel, labelField string, p parsedFilterParam) error", + "line": 484 + }, + { + "kind": "func", + "name": "parseFilterLabels", + "signature": "func parseFilterLabels(qs url.Values, field string) (FilterLabels, error)", + "line": 515 + }, + { + "kind": "func", + "name": "parseFloat", + "signature": "func parseFloat(field string, p parsedFilterParam, dst **float64) error", + "line": 574 + }, + { + "kind": "func", + "name": "parseTime", + "signature": "func parseTime(field string, p parsedFilterParam, dst **time.Time) error", + "line": 584 + }, + { + "kind": "func", + "name": "parseCommaSeparatedField", + "signature": "func parseCommaSeparatedField(field, op, value string) ([]string, error)", + "line": 594 + }, + { + "kind": "struct", + "name": "parsedFilterParam", + "signature": "type parsedFilterParam struct", + "line": 603 + }, + { + "kind": "func", + "name": "forEachFieldParam", + "signature": "func forEachFieldParam(qs url.Values, field string, visit func(parsedFilterParam) error) error", + "line": 610 + }, + { + "kind": "func", + "name": "hasFilterKeys", + "signature": "func hasFilterKeys(qs url.Values) bool", + "line": 642 + }, + { + "kind": "func", + "name": "hasOperatorStyleKeys", + "signature": "func hasOperatorStyleKeys(qs url.Values, name string) bool", + "line": 652 + }, + { + "kind": "func", + "name": "hasFieldKeys", + "signature": "func hasFieldKeys(qs url.Values, field string) bool", + "line": 663 + }, + { + "kind": "func", + "name": "checkUnknownFilterKeys", + "signature": "func checkUnknownFilterKeys(qs url.Values, knownFields map[string]struct{}) error", + "line": 674 + }, + { + "kind": "func", + "name": "filterFieldName", + "signature": "func filterFieldName(key string) (string, bool)", + "line": 706 + }, + { + "kind": "func", + "name": "jsonFieldName", + "signature": "func jsonFieldName(f reflect.StructField) string", + "line": 720 + }, + { + "kind": "func", + "name": "parseOperator", + "signature": "func parseOperator(rest string) (string, error)", + "line": 730 + }, + { + "kind": "func", + "name": "parseCommaSeparated", + "signature": "func parseCommaSeparated(value string) ([]string, error)", + "line": 745 + }, + { + "kind": "func", + "name": "singleValue", + "signature": "func singleValue(key string, values []string) (string, error)", + "line": 760 + } + ], + "line_count": 772 + }, + "api/v3/filters/parse_test.go": { + "header": "\t\"fmt\"\n\t\"net/url\"\n\t\"strconv\"", + "symbols": [ + { + "kind": "struct", + "name": "testFilter", + "signature": "type testFilter struct", + "line": 19 + }, + { + "kind": "func", + "name": "TestParse_FilterString", + "signature": "func TestParse_FilterString(t *testing.T)", + "line": 33 + }, + { + "kind": "func", + "name": "TestParse_FilterStringExact", + "signature": "func TestParse_FilterStringExact(t *testing.T)", + "line": 165 + }, + { + "kind": "func", + "name": "TestParse_FilterNumeric", + "signature": "func TestParse_FilterNumeric(t *testing.T)", + "line": 195 + }, + { + "kind": "func", + "name": "TestParse_FilterDateTime", + "signature": "func TestParse_FilterDateTime(t *testing.T)", + "line": 229 + }, + { + "kind": "func", + "name": "TestParse_FilterBoolean", + "signature": "func TestParse_FilterBoolean(t *testing.T)", + "line": 285 + }, + { + "kind": "func", + "name": "TestParse_StringPtr", + "signature": "func TestParse_StringPtr(t *testing.T)", + "line": 314 + }, + { + "kind": "func", + "name": "TestParse_TimePtr", + "signature": "func TestParse_TimePtr(t *testing.T)", + "line": 322 + }, + { + "kind": "func", + "name": "TestParse_NamedStringType", + "signature": "func TestParse_NamedStringType(t *testing.T)", + "line": 344 + }, + { + "kind": "func", + "name": "TestParse_StringPtrOperatorRejected", + "signature": "func TestParse_StringPtrOperatorRejected(t *testing.T)", + "line": 366 + }, + { + "kind": "func", + "name": "TestParse_PointerToPointer", + "signature": "func TestParse_PointerToPointer(t *testing.T)", + "line": 375 + }, + { + "kind": "func", + "name": "TestParse_UnknownFilterKey", + "signature": "func TestParse_UnknownFilterKey(t *testing.T)", + "line": 391 + }, + { + "kind": "func", + "name": "TestParse_DotNotation", + "signature": "func TestParse_DotNotation(t *testing.T)", + "line": 452 + }, + { + "kind": "func", + "name": "TestParse_Complex", + "signature": "func TestParse_Complex(t *testing.T)", + "line": 498 + }, + { + "kind": "func", + "name": "TestParse_InvalidTarget", + "signature": "func TestParse_InvalidTarget(t *testing.T)", + "line": 534 + }, + { + "kind": "func", + "name": "TestParse_MultiValueKeyRejected", + "signature": "func TestParse_MultiValueKeyRejected(t *testing.T)", + "line": 570 + }, + { + "kind": "func", + "name": "TestParse_CommaSeparatedCapEnforced", + "signature": "func TestParse_CommaSeparatedCapEnforced(t *testing.T)", + "line": 614 + }, + { + "kind": "func", + "name": "TestParse_ValueLengthCapEnforced", + "signature": "func TestParse_ValueLengthCapEnforced(t *testing.T)", + "line": 671 + }, + { + "kind": "func", + "name": "TestParse_FilterNumericInvalidPerOp", + "signature": "func TestParse_FilterNumericInvalidPerOp(t *testing.T)", + "line": 687 + }, + { + "kind": "func", + "name": "TestParse_EmptyTypedValueRejected", + "signature": "func TestParse_EmptyTypedValueRejected(t *testing.T)", + "line": 698 + }, + { + "kind": "func", + "name": "TestParse_AdversarialInputs", + "signature": "func TestParse_AdversarialInputs(t *testing.T)", + "line": 720 + }, + { + "kind": "struct", + "name": "testFilterWithLabels", + "signature": "type testFilterWithLabels struct", + "line": 749 + }, + { + "kind": "func", + "name": "TestParse_FilterLabels", + "signature": "func TestParse_FilterLabels(t *testing.T)", + "line": 754 + }, + { + "kind": "func", + "name": "TestParse_RangeValidation", + "signature": "func TestParse_RangeValidation(t *testing.T)", + "line": 869 + } + ], + "line_count": 929 + }, + "api/v3/handlers/addons/archive.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (h *handler) ArchiveAddon() ArchiveAddonHandler", + "line": 24 + } + ], + "line_count": 56 + }, + "api/v3/handlers/addons/convert.go": { + "header": "\t\"fmt\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\tcurrency \"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "ToAPILabels", + "signature": "func ToAPILabels(source addon.Addon) *apiv3.Labels", + "line": 18 + }, + { + "kind": "func", + "name": "ToAPIAddonStatus", + "signature": "func ToAPIAddonStatus(source addon.Addon) (apiv3.AddonStatus, error)", + "line": 22 + }, + { + "kind": "func", + "name": "ToAPIValidationAttributes", + "signature": "func ToAPIValidationAttributes(attrs models.Attributes) *map[string]any", + "line": 35 + }, + { + "kind": "func", + "name": "ToAPIProductCatalogValidationErrors", + "signature": "func ToAPIProductCatalogValidationErrors(source addon.Addon) (*[]apiv3.ProductCatalogValidationError, error)", + "line": 49 + }, + { + "kind": "func", + "name": "ToAPIAddonInstanceType", + "signature": "func ToAPIAddonInstanceType(source productcatalog.AddonInstanceType) (apiv3.AddonInstanceType, error)", + "line": 73 + }, + { + "kind": "func", + "name": "FromAPIAddonInstanceType", + "signature": "func FromAPIAddonInstanceType(source apiv3.AddonInstanceType) (productcatalog.AddonInstanceType, error)", + "line": 84 + }, + { + "kind": "func", + "name": "ToAPIAddon", + "signature": "func ToAPIAddon(source addon.Addon) (apiv3.Addon, error)", + "line": 96 + }, + { + "kind": "func", + "name": "FromAPICreateAddonRequest", + "signature": "func FromAPICreateAddonRequest(namespace string, body apiv3.CreateAddonRequest) (addon.CreateAddonInput, error)", + "line": 143 + }, + { + "kind": "func", + "name": "FromAPIUpsertAddonRequest", + "signature": "func FromAPIUpsertAddonRequest(namespace string, addonID string, body apiv3.UpsertAddonRequest) (addon.UpdateAddonInput, error)", + "line": 176 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCards", + "signature": "func ToAPIBillingRateCards(rcs productcatalog.RateCards) ([]apiv3.BillingRateCard, error)", + "line": 206 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCard", + "signature": "func ToAPIBillingRateCard(rc productcatalog.RateCard) (apiv3.BillingRateCard, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ToAPIBillingPrice", + "signature": "func ToAPIBillingPrice(price productcatalog.Price) (apiv3.BillingPrice, *apiv3.BillingSpendCommitments, *apiv3.BillingPricePaymentTerm, error)", + "line": 317 + }, + { + "kind": "func", + "name": "ToAPIBillingPriceTiers", + "signature": "func ToAPIBillingPriceTiers(tiers []productcatalog.PriceTier) []apiv3.BillingPriceTier", + "line": 391 + }, + { + "kind": "func", + "name": "ToAPIBillingSpendCommitments", + "signature": "func ToAPIBillingSpendCommitments(minAmount, maxAmount *decimal.Decimal) *apiv3.BillingSpendCommitments", + "line": 420 + }, + { + "kind": "func", + "name": "ToAPIBillingPricePaymentTerm", + "signature": "func ToAPIBillingPricePaymentTerm(t productcatalog.PaymentTermType) (*apiv3.BillingPricePaymentTerm, error)", + "line": 437 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCardTaxConfig", + "signature": "func ToAPIBillingRateCardTaxConfig(tc *productcatalog.TaxConfig) *apiv3.BillingRateCardTaxConfig", + "line": 448 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCardDiscounts", + "signature": "func ToAPIBillingRateCardDiscounts(d productcatalog.Discounts) *apiv3.BillingRateCardDiscounts", + "line": 466 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCards", + "signature": "func FromAPIBillingRateCards(rcs []apiv3.BillingRateCard) (productcatalog.RateCards, error)", + "line": 487 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCard", + "signature": "func FromAPIBillingRateCard(rc apiv3.BillingRateCard) (productcatalog.RateCard, error)", + "line": 503 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceFlat", + "signature": "func FromAPIBillingPriceFlat(f apiv3.BillingPriceFlat, paymentTermPtr *apiv3.BillingPricePaymentTerm) (productcatalog.FlatPrice, productcatalog.PaymentTermType, error)", + "line": 634 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceUnit", + "signature": "func FromAPIBillingPriceUnit(u apiv3.BillingPriceUnit, commitments *apiv3.BillingSpendCommitments) (productcatalog.UnitPrice, error)", + "line": 655 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceGraduated", + "signature": "func FromAPIBillingPriceGraduated(g apiv3.BillingPriceGraduated, commitments *apiv3.BillingSpendCommitments) (productcatalog.TieredPrice, error)", + "line": 674 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceVolume", + "signature": "func FromAPIBillingPriceVolume(v apiv3.BillingPriceVolume, commitments *apiv3.BillingSpendCommitments) (productcatalog.TieredPrice, error)", + "line": 696 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceTiers", + "signature": "func FromAPIBillingPriceTiers(tiers []apiv3.BillingPriceTier) ([]productcatalog.PriceTier, error)", + "line": 718 + }, + { + "kind": "func", + "name": "FromAPIBillingSpendCommitments", + "signature": "func FromAPIBillingSpendCommitments(c *apiv3.BillingSpendCommitments) (productcatalog.Commitments, error)", + "line": 752 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCardTaxConfig", + "signature": "func FromAPIBillingRateCardTaxConfig(tc *apiv3.BillingRateCardTaxConfig) *productcatalog.TaxConfig", + "line": 778 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCardDiscounts", + "signature": "func FromAPIBillingRateCardDiscounts(d *apiv3.BillingRateCardDiscounts) (productcatalog.Discounts, error)", + "line": 796 + } + ], + "line_count": 818 + }, + "api/v3/handlers/addons/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (h *handler) CreateAddon() CreateAddonHandler", + "line": 22 + } + ], + "line_count": 63 + }, + "api/v3/handlers/addons/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (h *handler) DeleteAddon() DeleteAddonHandler", + "line": 20 + } + ], + "line_count": 50 + }, + "api/v3/handlers/addons/get.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetAddon", + "signature": "func (h *handler) GetAddon() GetAddonHandler", + "line": 23 + } + ], + "line_count": 57 + }, + "api/v3/handlers/addons/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/addon\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice addon.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 26 + } + ], + "line_count": 36 + }, + "api/v3/handlers/addons/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListAddons", + "signature": "func (h *handler) ListAddons() ListAddonsHandler", + "line": 29 + } + ], + "line_count": 139 + }, + "api/v3/handlers/addons/publish.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (h *handler) PublishAddon() PublishAddonHandler", + "line": 27 + } + ], + "line_count": 61 + }, + "api/v3/handlers/addons/update.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (h *handler) UpdateAddon() UpdateAddonHandler", + "line": 23 + } + ], + "line_count": 64 + }, + "api/v3/handlers/apps/convert.gen.go": { + "header": "\t\"fmt\"\n\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\tresponse \"github.com/openmeterio/openmeter/api/v3/response\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 13 + }, + { + "kind": "func", + "name": "responsePageMetaPageToV3PageMeta", + "signature": "func responsePageMetaPageToV3PageMeta(source response.PageMetaPage) v3.PageMeta", + "line": 60 + }, + { + "kind": "func", + "name": "responsePageMetaToV3PaginatedMeta", + "signature": "func responsePageMetaToV3PaginatedMeta(source response.PageMeta) v3.PaginatedMeta", + "line": 69 + } + ], + "line_count": 73 + }, + "api/v3/handlers/apps/convert.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "IntToFloat32", + "signature": "func IntToFloat32(i int) float32", + "line": 39 + }, + { + "kind": "func", + "name": "ToAPIBillingApp", + "signature": "func ToAPIBillingApp(item app.App) (api.BillingApp, error)", + "line": 44 + }, + { + "kind": "func", + "name": "toAPIBillingAppSandbox", + "signature": "func toAPIBillingAppSandbox(sandboxApp appsandbox.Meta) (api.BillingAppSandbox, error)", + "line": 106 + }, + { + "kind": "func", + "name": "toAPIBillingAppStripe", + "signature": "func toAPIBillingAppStripe(\n\tstripeApp appstripe.Meta,\n) (api.BillingAppStripe, error)", + "line": 126 + }, + { + "kind": "func", + "name": "toAPIBillingAppExternalInvoicing", + "signature": "func toAPIBillingAppExternalInvoicing(customInvoicingApp appcustominvoicing.Meta) (api.BillingAppExternalInvoicing, error)", + "line": 154 + } + ], + "line_count": 175 + }, + "api/v3/handlers/apps/get_app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetApp", + "signature": "func (h *handler) GetApp() GetAppHandler", + "line": 23 + } + ], + "line_count": 52 + }, + "api/v3/handlers/apps/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 18 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tappService app.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 24 + } + ], + "line_count": 34 + }, + "api/v3/handlers/apps/list_app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListApps", + "signature": "func (h *handler) ListApps() ListAppsHandler", + "line": 28 + } + ], + "line_count": 88 + }, + "api/v3/handlers/billingprofiles/convert.gen.go": { + "header": "\t\"fmt\"\n\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\tapp \"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 16 + }, + { + "kind": "func", + "name": "pBillingProfileAppsToV3BillingProfileAppReferences", + "signature": "func pBillingProfileAppsToV3BillingProfileAppReferences(source *billing.ProfileApps) v3.BillingProfileAppReferences", + "line": 205 + }, + { + "kind": "func", + "name": "pProductcatalogStripeTaxConfigToPV3BillingTaxConfigExternalInvoicing", + "signature": "func pProductcatalogStripeTaxConfigToPV3BillingTaxConfigExternalInvoicing(source *productcatalog.StripeTaxConfig) *v3.BillingTaxConfigExternalInvoicing", + "line": 214 + }, + { + "kind": "func", + "name": "pProductcatalogStripeTaxConfigToPV3BillingTaxConfigStripe", + "signature": "func pProductcatalogStripeTaxConfigToPV3BillingTaxConfigStripe(source *productcatalog.StripeTaxConfig) *v3.BillingTaxConfigStripe", + "line": 223 + }, + { + "kind": "func", + "name": "pV3BillingTaxConfigStripeToPProductcatalogStripeTaxConfig", + "signature": "func pV3BillingTaxConfigStripeToPProductcatalogStripeTaxConfig(source *v3.BillingTaxConfigStripe) *productcatalog.StripeTaxConfig", + "line": 232 + }, + { + "kind": "func", + "name": "timeTimeToTimeTime", + "signature": "func timeTimeToTimeTime(source time.Time) time.Time", + "line": 241 + } + ], + "line_count": 243 + }, + "api/v3/handlers/billingprofiles/convert.go": { + "header": "\t\"github.com/rickb777/period\"\n\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "NamespaceFromContext", + "signature": "func NamespaceFromContext(namespace string) string", + "line": 85 + }, + { + "kind": "func", + "name": "IDFromContext", + "signature": "func IDFromContext(id string) string", + "line": 90 + }, + { + "kind": "func", + "name": "toAPIBillingTaxConfigFull", + "signature": "func toAPIBillingTaxConfigFull(config *productcatalog.TaxConfig) (*api.BillingTaxConfig, error)", + "line": 96 + }, + { + "kind": "func", + "name": "fromAPIBillingTaxConfigFull", + "signature": "func fromAPIBillingTaxConfigFull(config *api.BillingTaxConfig) (*productcatalog.TaxConfig, error)", + "line": 109 + }, + { + "kind": "func", + "name": "ResolveNamespaceFromContext", + "signature": "func ResolveNamespaceFromContext(namespacedID models.NamespacedID) string", + "line": 121 + }, + { + "kind": "func", + "name": "ResolveIDFromContext", + "signature": "func ResolveIDFromContext(namespacedID models.NamespacedID) string", + "line": 126 + }, + { + "kind": "func", + "name": "ToAPIBillingAppReference", + "signature": "func ToAPIBillingAppReference(app app.App) api.BillingAppReference", + "line": 131 + }, + { + "kind": "func", + "name": "ToAPIBillingParty", + "signature": "func ToAPIBillingParty(supplier billing.SupplierContact) api.BillingParty", + "line": 138 + }, + { + "kind": "func", + "name": "FromAPIBillingParty", + "signature": "func FromAPIBillingParty(party api.BillingParty) billing.SupplierContact", + "line": 160 + }, + { + "kind": "func", + "name": "ToAPIBillingWorkflow", + "signature": "func ToAPIBillingWorkflow(config billing.WorkflowConfig) (api.BillingWorkflow, error)", + "line": 179 + }, + { + "kind": "func", + "name": "FromAPIBillingWorkflow", + "signature": "func FromAPIBillingWorkflow(workflow api.BillingWorkflow) (billing.WorkflowConfig, error)", + "line": 260 + } + ], + "line_count": 370 + }, + "api/v3/handlers/billingprofiles/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateBillingProfile", + "signature": "func (h *handler) CreateBillingProfile() CreateBillingProfileHandler", + "line": 22 + } + ], + "line_count": 57 + }, + "api/v3/handlers/billingprofiles/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteBillingProfile", + "signature": "func (h *handler) DeleteBillingProfile() DeleteBillingProfileHandler", + "line": 24 + } + ], + "line_count": 56 + }, + "api/v3/handlers/billingprofiles/error_encoder.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 12 + } + ], + "line_count": 20 + }, + "api/v3/handlers/billingprofiles/get.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetBillingProfile", + "signature": "func (h *handler) GetBillingProfile() GetBillingProfileHandler", + "line": 23 + } + ], + "line_count": 61 + }, + "api/v3/handlers/billingprofiles/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 18 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice billing.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 24 + } + ], + "line_count": 34 + }, + "api/v3/handlers/billingprofiles/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListBillingProfiles", + "signature": "func (h *handler) ListBillingProfiles() ListBillingProfilesHandler", + "line": 26 + } + ], + "line_count": 89 + }, + "api/v3/handlers/billingprofiles/update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateBillingProfile", + "signature": "func (h *handler) UpdateBillingProfile() UpdateBillingProfileHandler", + "line": 28 + } + ], + "line_count": 77 + }, + "api/v3/handlers/currencies/convert.go": { + "header": "\t\"fmt\"\n\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/openmeter/currencies\"", + "symbols": [ + { + "kind": "func", + "name": "FromAPIBillingCurrencyType", + "signature": "func FromAPIBillingCurrencyType(t v3.BillingCurrencyType) currencies.CurrencyType", + "line": 10 + }, + { + "kind": "func", + "name": "ToAPIBillingCurrency", + "signature": "func ToAPIBillingCurrency(c currencies.Currency) (v3.BillingCurrency, error)", + "line": 36 + }, + { + "kind": "func", + "name": "ToAPIBillingCostBasis", + "signature": "func ToAPIBillingCostBasis(cb currencies.CostBasis) v3.BillingCostBasis", + "line": 55 + } + ], + "line_count": 63 + }, + "api/v3/handlers/currencies/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCurrency", + "signature": "func (h *handler) CreateCurrency() CreateCurrencyHandler", + "line": 21 + } + ], + "line_count": 50 + }, + "api/v3/handlers/currencies/create_cost_basis.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (h *handler) CreateCostBasis() CreateCostBasisHandler", + "line": 21 + } + ], + "line_count": 52 + }, + "api/v3/handlers/currencies/get_cost_bases.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListCostBasesArgs", + "signature": "type ListCostBasesArgs struct", + "line": 26 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (h *handler) ListCostBases() ListCostBasesHandler", + "line": 31 + } + ], + "line_count": 96 + }, + "api/v3/handlers/currencies/handler.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/currencies\"\n\t\"github.com/openmeterio/openmeter/openmeter/namespace/namespacedriver\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 9 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 16 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(namespaceDecoder namespacedriver.NamespaceDecoder, currencyService currencies.CurrencyService, options ...httptransport.HandlerOption) Handler", + "line": 22 + } + ], + "line_count": 28 + }, + "api/v3/handlers/currencies/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (h *handler) ListCurrencies() ListCurrenciesHandler", + "line": 29 + } + ], + "line_count": 123 + }, + "api/v3/handlers/customers/billing/convert.gen.go": { + "header": "\t\"fmt\"\n\tapi \"github.com/openmeterio/openmeter/api\"\n\tv3 \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 13 + }, + { + "kind": "func", + "name": "pV3BillingAppStripeCheckoutSessionCustomTextParamsToPApiCheckoutSessionCustomTextAfterSubmitParams", + "signature": "func pV3BillingAppStripeCheckoutSessionCustomTextParamsToPApiCheckoutSessionCustomTextAfterSubmitParams(source *v3.BillingAppStripeCheckoutSessionCustomTextParams) *api.CheckoutSessionCustomTextAfterSubmitParams", + "line": 208 + }, + { + "kind": "func", + "name": "pV3BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementToPApiCreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement", + "signature": "func pV3BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementToPApiCreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement(source *v3.BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement) (*api.CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, error)", + "line": 220 + }, + { + "kind": "func", + "name": "pV3BillingAppStripeCreateCheckoutSessionConsentCollectionToPApiCreateStripeCheckoutSessionConsentCollection", + "signature": "func pV3BillingAppStripeCreateCheckoutSessionConsentCollectionToPApiCreateStripeCheckoutSessionConsentCollection(source *v3.BillingAppStripeCreateCheckoutSessionConsentCollection) (*api.CreateStripeCheckoutSessionConsentCollection, error)", + "line": 235 + }, + { + "kind": "func", + "name": "pV3BillingAppStripeCreateCheckoutSessionCustomerUpdateToPApiCreateStripeCheckoutSessionCustomerUpdate", + "signature": "func pV3BillingAppStripeCreateCheckoutSessionCustomerUpdateToPApiCreateStripeCheckoutSessionCustomerUpdate(source *v3.BillingAppStripeCreateCheckoutSessionCustomerUpdate) (*api.CreateStripeCheckoutSessionCustomerUpdate, error)", + "line": 262 + }, + { + "kind": "func", + "name": "pV3BillingAppStripeCreateCheckoutSessionTaxIdCollectionToPApiCreateCheckoutSessionTaxIdCollection", + "signature": "func pV3BillingAppStripeCreateCheckoutSessionTaxIdCollectionToPApiCreateCheckoutSessionTaxIdCollection(source *v3.BillingAppStripeCreateCheckoutSessionTaxIdCollection) (*api.CreateCheckoutSessionTaxIdCollection, error)", + "line": 291 + } + ], + "line_count": 308 + }, + "api/v3/handlers/customers/billing/convert.go": { + "header": "\tapilegacy \"github.com/openmeterio/openmeter/api\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\tappstripe \"github.com/openmeterio/openmeter/openmeter/app/stripe\"", + "symbols": [ + { + "kind": "func", + "name": "ResolveIDFromCustomerId", + "signature": "func ResolveIDFromCustomerId(namespacedID customer.CustomerID) string", + "line": 62 + } + ], + "line_count": 64 + }, + "api/v3/handlers/customers/billing/create_customer_stripe_checkout_session.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomerStripeCheckoutSession", + "signature": "func (h *handler) CreateCustomerStripeCheckoutSession() CreateCustomerStripeCheckoutSessionHandler", + "line": 25 + } + ], + "line_count": 97 + }, + "api/v3/handlers/customers/billing/create_customer_stripe_portal_session.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomerStripePortalSession", + "signature": "func (h *handler) CreateCustomerStripePortalSession() CreateCustomerStripePortalSessionHandler", + "line": 29 + } + ], + "line_count": 109 + }, + "api/v3/handlers/customers/billing/error_encoder.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 12 + } + ], + "line_count": 20 + }, + "api/v3/handlers/customers/billing/get_billing.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerBilling", + "signature": "func (h *handler) GetCustomerBilling() GetCustomerBillingHandler", + "line": 30 + } + ], + "line_count": 107 + }, + "api/v3/handlers/customers/billing/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\tappstripe \"github.com/openmeterio/openmeter/openmeter/app/stripe\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 13 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tbillingService billing.Service,\n\tcustomerService customer.Service,\n\tstripeService appstripe.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 30 + } + ], + "line_count": 44 + }, + "api/v3/handlers/customers/billing/update_billing.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCustomerBilling", + "signature": "func (h *handler) UpdateCustomerBilling() UpdateCustomerBillingHandler", + "line": 34 + } + ], + "line_count": 203 + }, + "api/v3/handlers/customers/billing/update_billing_app_data.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCustomerBillingAppData", + "signature": "func (h *handler) UpdateCustomerBillingAppData() UpdateCustomerBillingAppDataHandler", + "line": 33 + } + ], + "line_count": 150 + }, + "api/v3/handlers/customers/charges/convert.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "convertFlatFeeChargeToAPI", + "signature": "func convertFlatFeeChargeToAPI(source flatfee.Charge) (api.BillingFlatFeeCharge, error)", + "line": 27 + }, + { + "kind": "func", + "name": "convertUsageBasedChargeToAPI", + "signature": "func convertUsageBasedChargeToAPI(source usagebased.Charge) (api.BillingUsageBasedCharge, error)", + "line": 68 + }, + { + "kind": "func", + "name": "subscriptionRefPtrToAPI", + "signature": "func subscriptionRefPtrToAPI(source *meta.SubscriptionReference) *api.BillingSubscriptionReference", + "line": 109 + }, + { + "kind": "func", + "name": "convertChargeToAPI", + "signature": "func convertChargeToAPI(charge billingcharges.Charge) (api.BillingCharge, error)", + "line": 118 + }, + { + "kind": "func", + "name": "convertUsageBasedChargeTotals", + "signature": "func convertUsageBasedChargeTotals(charge usagebased.Charge) api.BillingChargeTotals", + "line": 161 + }, + { + "kind": "func", + "name": "toAPIBillingTotals", + "signature": "func toAPIBillingTotals(t totals.Totals) api.BillingTotals", + "line": 174 + }, + { + "kind": "func", + "name": "toAPIBillingPrice", + "signature": "func toAPIBillingPrice(p productcatalog.Price) (api.BillingPrice, error)", + "line": 189 + }, + { + "kind": "func", + "name": "toAPIBillingPriceTier", + "signature": "func toAPIBillingPriceTier(t productcatalog.PriceTier, _ int) api.BillingPriceTier", + "line": 250 + }, + { + "kind": "func", + "name": "convertFlatFeeDiscounts", + "signature": "func convertFlatFeeDiscounts(pd *productcatalog.PercentageDiscount) *api.BillingFlatFeeDiscounts", + "line": 272 + }, + { + "kind": "func", + "name": "convertUsageBasedDiscounts", + "signature": "func convertUsageBasedDiscounts(d productcatalog.Discounts) *api.BillingRateCardDiscounts", + "line": 281 + }, + { + "kind": "func", + "name": "ConvertUsageBasedStatusToAPI", + "signature": "func ConvertUsageBasedStatusToAPI(status usagebased.Status) (*api.BillingChargeStatus, error)", + "line": 299 + }, + { + "kind": "func", + "name": "ConvertClosedPeriodToAPI", + "signature": "func ConvertClosedPeriodToAPI(p timeutil.ClosedPeriod) api.ClosedPeriod", + "line": 308 + }, + { + "kind": "func", + "name": "ConvertDecimalToCurrencyAmount", + "signature": "func ConvertDecimalToCurrencyAmount(d alpacadecimal.Decimal) api.CurrencyAmount", + "line": 313 + }, + { + "kind": "func", + "name": "ConvertCustomerIDToReference", + "signature": "func ConvertCustomerIDToReference(id string) api.BillingCustomerReference", + "line": 318 + }, + { + "kind": "func", + "name": "ConvertProRatingConfigToAPI", + "signature": "func ConvertProRatingConfigToAPI(c productcatalog.ProRatingConfig) api.BillingRateCardProrationConfiguration", + "line": 323 + }, + { + "kind": "func", + "name": "ConvertSubscriptionRefToAPI", + "signature": "func ConvertSubscriptionRefToAPI(ref meta.SubscriptionReference) api.BillingSubscriptionReference", + "line": 330 + }, + { + "kind": "func", + "name": "ConvertChargeStatusToAPI", + "signature": "func ConvertChargeStatusToAPI(s meta.ChargeStatus) api.BillingChargeStatus", + "line": 340 + }, + { + "kind": "func", + "name": "ConvertSettlementModeToAPI", + "signature": "func ConvertSettlementModeToAPI(s productcatalog.SettlementMode) api.BillingSettlementMode", + "line": 345 + }, + { + "kind": "func", + "name": "ConvertPaymentTermToAPI", + "signature": "func ConvertPaymentTermToAPI(pt productcatalog.PaymentTermType) api.BillingPricePaymentTerm", + "line": 350 + }, + { + "kind": "func", + "name": "ConvertManagedByToAPI", + "signature": "func ConvertManagedByToAPI(mb billing.InvoiceLineManagedBy) api.ResourceManagedBy", + "line": 355 + }, + { + "kind": "func", + "name": "ConvertCurrencyCodeToAPI", + "signature": "func ConvertCurrencyCodeToAPI(c currencyx.Code) api.CurrencyCode", + "line": 360 + }, + { + "kind": "func", + "name": "convertTaxCodeConfigToAPI", + "signature": "func convertTaxCodeConfigToAPI(cfg *productcatalog.TaxCodeConfig) *api.BillingTaxConfig", + "line": 365 + }, + { + "kind": "func", + "name": "convertAPIChargeStatus", + "signature": "func convertAPIChargeStatus(s string) (meta.ChargeStatus, error)", + "line": 384 + } + ], + "line_count": 397 + }, + "api/v3/handlers/customers/charges/convert_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertTaxCodeConfigToAPI", + "signature": "func TestConvertTaxCodeConfigToAPI(t *testing.T)", + "line": 13 + } + ], + "line_count": 77 + }, + "api/v3/handlers/customers/charges/handler.go": { + "header": "\t\"context\"\n\tbillingcharges \"github.com/openmeterio/openmeter/openmeter/billing/charges\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice billingcharges.ChargeService,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 20 + } + ], + "line_count": 30 + }, + "api/v3/handlers/customers/charges/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomerCharges", + "signature": "func (h *handler) ListCustomerCharges() ListCustomerChargesHandler", + "line": 34 + }, + { + "kind": "func", + "name": "parseChargeStatusFilterSlice", + "signature": "func parseChargeStatusFilterSlice(values []string) ([]meta.ChargeStatus, error)", + "line": 147 + }, + { + "kind": "func", + "name": "validChargesSortField", + "signature": "func validChargesSortField(field string) bool", + "line": 166 + } + ], + "line_count": 173 + }, + "api/v3/handlers/customers/convert.gen.go": { + "header": "\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\tresponse \"github.com/openmeterio/openmeter/api/v3/response\"\n\tcustomer \"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + }, + { + "kind": "func", + "name": "pCustomerCustomerUsageAttributionToPV3BillingCustomerUsageAttribution", + "signature": "func pCustomerCustomerUsageAttributionToPV3BillingCustomerUsageAttribution(source *customer.CustomerUsageAttribution) *v3.BillingCustomerUsageAttribution", + "line": 97 + }, + { + "kind": "func", + "name": "pModelsAddressToPV3BillingAddress", + "signature": "func pModelsAddressToPV3BillingAddress(source *models.Address) *v3.BillingAddress", + "line": 106 + }, + { + "kind": "func", + "name": "pV3BillingAddressToPModelsAddress", + "signature": "func pV3BillingAddressToPModelsAddress(source *v3.BillingAddress) *models.Address", + "line": 124 + }, + { + "kind": "func", + "name": "pV3BillingCustomerUsageAttributionToPCustomerCustomerUsageAttribution", + "signature": "func pV3BillingCustomerUsageAttributionToPCustomerCustomerUsageAttribution(source *v3.BillingCustomerUsageAttribution) *customer.CustomerUsageAttribution", + "line": 142 + }, + { + "kind": "func", + "name": "responsePageMetaPageToV3PageMeta", + "signature": "func responsePageMetaPageToV3PageMeta(source response.PageMetaPage) v3.PageMeta", + "line": 151 + }, + { + "kind": "func", + "name": "responsePageMetaToV3PaginatedMeta", + "signature": "func responsePageMetaToV3PaginatedMeta(source response.PageMeta) v3.PaginatedMeta", + "line": 160 + }, + { + "kind": "func", + "name": "timeTimeToTimeTime", + "signature": "func timeTimeToTimeTime(source time.Time) time.Time", + "line": 165 + } + ], + "line_count": 167 + }, + "api/v3/handlers/customers/convert.go": { + "header": "\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/api/v3/labels\"", + "symbols": [ + { + "kind": "func", + "name": "ConvertLabelsToMetadata", + "signature": "func ConvertLabelsToMetadata(l *api.Labels) (*models.Metadata, error)", + "line": 46 + }, + { + "kind": "func", + "name": "NamespaceFromContext", + "signature": "func NamespaceFromContext(namespace string) string", + "line": 53 + }, + { + "kind": "func", + "name": "IntToFloat32", + "signature": "func IntToFloat32(i int) float32", + "line": 57 + }, + { + "kind": "func", + "name": "ConvertMetadataAnnotationsToLabels", + "signature": "func ConvertMetadataAnnotationsToLabels(source customer.Customer) *api.Labels", + "line": 61 + } + ], + "line_count": 63 + }, + "api/v3/handlers/customers/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (h *handler) CreateCustomer() CreateCustomerHandler", + "line": 23 + } + ], + "line_count": 57 + }, + "api/v3/handlers/customers/credits/convert.go": { + "header": "\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "toAPIBillingCreditGrant", + "signature": "func toAPIBillingCreditGrant(charge creditpurchase.Charge) (api.BillingCreditGrant, error)", + "line": 26 + }, + { + "kind": "func", + "name": "toAPIBillingCreditFundingMethod", + "signature": "func toAPIBillingCreditFundingMethod(settlement creditpurchase.Settlement) api.BillingCreditFundingMethod", + "line": 59 + }, + { + "kind": "func", + "name": "toAPIBillingCreditGrantStatus", + "signature": "func toAPIBillingCreditGrantStatus(charge creditpurchase.Charge) api.BillingCreditGrantStatus", + "line": 70 + }, + { + "kind": "func", + "name": "toAPICreditGrantPurchase", + "signature": "func toAPICreditGrantPurchase(charge creditpurchase.Charge) (*api.BillingCreditGrantPurchase, error)", + "line": 85 + }, + { + "kind": "func", + "name": "toAPIBillingCreditPurchasePaymentSettlementStatus", + "signature": "func toAPIBillingCreditPurchasePaymentSettlementStatus(status payment.Status) api.BillingCreditPurchasePaymentSettlementStatus", + "line": 152 + }, + { + "kind": "func", + "name": "toAPIBillingCreditAvailabilityPolicy", + "signature": "func toAPIBillingCreditAvailabilityPolicy(status creditpurchase.InitialPaymentSettlementStatus) (api.BillingCreditAvailabilityPolicy, error)", + "line": 163 + }, + { + "kind": "func", + "name": "toAPIBillingCreditGrantTaxConfig", + "signature": "func toAPIBillingCreditGrantTaxConfig(charge creditpurchase.Charge) *api.BillingCreditGrantTaxConfig", + "line": 172 + }, + { + "kind": "func", + "name": "toAPIBillingCreditGrantFilters", + "signature": "func toAPIBillingCreditGrantFilters(filters creditpurchase.FeatureFilters) *api.BillingCreditGrantFilters", + "line": 191 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditFundingMethod", + "signature": "func fromAPIBillingCreditFundingMethod(fm api.BillingCreditFundingMethod) creditgrant.FundingMethod", + "line": 205 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditAvailabilityPolicy", + "signature": "func fromAPIBillingCreditAvailabilityPolicy(policy api.BillingCreditAvailabilityPolicy) (creditpurchase.InitialPaymentSettlementStatus, error)", + "line": 216 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditGrantTaxConfig", + "signature": "func fromAPIBillingCreditGrantTaxConfig(tc *api.CreateCreditGrantTaxConfig) *productcatalog.TaxConfig", + "line": 225 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditGrantFilters", + "signature": "func fromAPIBillingCreditGrantFilters(filters *api.CreateCreditGrantFilters) (*creditgrant.GrantFilters, error)", + "line": 244 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditGrantStatus", + "signature": "func fromAPIBillingCreditGrantStatus(status api.BillingCreditGrantStatus) (meta.ChargeStatus, error)", + "line": 262 + }, + { + "kind": "struct", + "name": "billingCreditTransactionCursorPayload", + "signature": "type billingCreditTransactionCursorPayload struct", + "line": 278 + }, + { + "kind": "func", + "name": "encodeBillingCreditTransactionCursor", + "signature": "func encodeBillingCreditTransactionCursor(cursor ledger.TransactionCursor) (string, error)", + "line": 284 + }, + { + "kind": "func", + "name": "decodeBillingCreditTransactionCursor", + "signature": "func decodeBillingCreditTransactionCursor(cursor string, namespace string) (*ledger.TransactionCursor, error)", + "line": 299 + }, + { + "kind": "func", + "name": "fromAPICreateCreditGrantRequest", + "signature": "func fromAPICreateCreditGrantRequest(ns string, customerID api.ULID, body api.CreateCreditGrantRequest) (creditgrant.CreateInput, error)", + "line": 326 + }, + { + "kind": "func", + "name": "fromAPIUpdateCreditGrantExternalSettlementRequest", + "signature": "func fromAPIUpdateCreditGrantExternalSettlementRequest(\n\tns string,\n\tcustomerID api.ULID,\n\tcreditGrantID api.ULID,\n\tbody api.UpdateCreditGrantExternalSettlementRequest,\n) (creditgrant.UpdateExternalSettlementInput, error)", + "line": 391 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditPurchasePaymentSettlementStatus", + "signature": "func fromAPIBillingCreditPurchasePaymentSettlementStatus(status api.BillingCreditPurchasePaymentSettlementStatus) (payment.Status, error)", + "line": 410 + }, + { + "kind": "func", + "name": "toAPICreditBalance", + "signature": "func toAPICreditBalance(currency currencyx.Code, balance ledger.Balance) api.CreditBalance", + "line": 421 + }, + { + "kind": "func", + "name": "fromAPIBillingCreditTransactionType", + "signature": "func fromAPIBillingCreditTransactionType(filter *api.BillingCreditTransactionType) *customerbalance.CreditTransactionType", + "line": 431 + }, + { + "kind": "func", + "name": "toAPIBillingCreditTransactions", + "signature": "func toAPIBillingCreditTransactions(items []customerbalance.CreditTransaction) []api.BillingCreditTransaction", + "line": 451 + }, + { + "kind": "func", + "name": "toAPIBillingCreditTransaction", + "signature": "func toAPIBillingCreditTransaction(tx customerbalance.CreditTransaction) api.BillingCreditTransaction", + "line": 461 + }, + { + "kind": "func", + "name": "toAPIBillingCreditTransactionType", + "signature": "func toAPIBillingCreditTransactionType(txType customerbalance.CreditTransactionType) api.BillingCreditTransactionType", + "line": 489 + }, + { + "kind": "func", + "name": "creditTransactionLabels", + "signature": "func creditTransactionLabels(annotations models.Annotations) map[string]string", + "line": 500 + }, + { + "kind": "func", + "name": "stringAnnotation", + "signature": "func stringAnnotation(annotations models.Annotations, key string) string", + "line": 519 + } + ], + "line_count": 531 + }, + "api/v3/handlers/customers/credits/convert_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestToAPIBillingCreditGrantPromotional", + "signature": "func TestToAPIBillingCreditGrantPromotional(t *testing.T)", + "line": 17 + } + ], + "line_count": 50 + }, + "api/v3/handlers/customers/credits/create_grant.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (h *handler) CreateCreditGrant() CreateCreditGrantHandler", + "line": 24 + } + ], + "line_count": 59 + }, + "api/v3/handlers/customers/credits/errors.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "func", + "name": "newCreditGrantExternalSettlementStatusInvalid", + "signature": "func newCreditGrantExternalSettlementStatusInvalid(status string) error", + "line": 13 + } + ], + "line_count": 22 + }, + "api/v3/handlers/customers/credits/externalsettlement.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCreditGrantExternalSettlement", + "signature": "func (h *handler) UpdateCreditGrantExternalSettlement() UpdateCreditGrantExternalSettlementHandler", + "line": 25 + } + ], + "line_count": 60 + }, + "api/v3/handlers/customers/credits/externalsettlement_test.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"net/http/httptest\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertAPIUpdateCreditGrantExternalSettlementRequest", + "signature": "func TestConvertAPIUpdateCreditGrantExternalSettlementRequest(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestConvertAPIUpdateCreditGrantExternalSettlementRequestRejectsPending", + "signature": "func TestConvertAPIUpdateCreditGrantExternalSettlementRequestRejectsPending(t *testing.T)", + "line": 33 + } + ], + "line_count": 55 + }, + "api/v3/handlers/customers/credits/get_balance.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerCreditBalance", + "signature": "func (h *handler) GetCustomerCreditBalance() GetCustomerCreditBalanceHandler", + "line": 33 + } + ], + "line_count": 115 + }, + "api/v3/handlers/customers/credits/get_grant.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetCreditGrant", + "signature": "func (h *handler) GetCreditGrant() GetCreditGrantHandler", + "line": 24 + } + ], + "line_count": 53 + }, + "api/v3/handlers/customers/credits/handler.go": { + "header": "\t\"context\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/creditgrant\"", + "symbols": [ + { + "kind": "interface", + "name": "customerBalanceFacade", + "signature": "type customerBalanceFacade interface", + "line": 15 + }, + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 21 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 30 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tcustomerService customer.Service,\n\tbalanceFacade customerBalanceFacade,\n\tcreditGrantService creditgrant.Service,\n\tledger ledger.Ledger,\n\taccountResolver ledger.AccountResolver,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 40 + } + ], + "line_count": 58 + }, + "api/v3/handlers/customers/credits/list_grants.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCreditGrants", + "signature": "func (h *handler) ListCreditGrants() ListCreditGrantsHandler", + "line": 32 + } + ], + "line_count": 113 + }, + "api/v3/handlers/customers/credits/list_transactions.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (h *handler) ListCreditTransactions() ListCreditTransactionsHandler", + "line": 30 + } + ], + "line_count": 150 + }, + "api/v3/handlers/customers/credits/list_transactions_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestFromAPIBillingCreditTransactionType_Funded", + "signature": "func TestFromAPIBillingCreditTransactionType_Funded(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestFromAPIBillingCreditTransactionType_Expired", + "signature": "func TestFromAPIBillingCreditTransactionType_Expired(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "TestToAPIBillingCreditTransaction", + "signature": "func TestToAPIBillingCreditTransaction(t *testing.T)", + "line": 35 + }, + { + "kind": "func", + "name": "TestToAPIBillingCreditTransaction_Expired", + "signature": "func TestToAPIBillingCreditTransaction_Expired(t *testing.T)", + "line": 73 + }, + { + "kind": "func", + "name": "TestCreditTransactionCursorConversion", + "signature": "func TestCreditTransactionCursorConversion(t *testing.T)", + "line": 89 + }, + { + "kind": "func", + "name": "TestCreditTransactionCursorConversion_InvalidCursor", + "signature": "func TestCreditTransactionCursorConversion_InvalidCursor(t *testing.T)", + "line": 114 + } + ], + "line_count": 117 + }, + "api/v3/handlers/customers/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (h *handler) DeleteCustomer() DeleteCustomerHandler", + "line": 24 + } + ], + "line_count": 55 + }, + "api/v3/handlers/customers/entitlementaccess/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 11 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 15 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tcustomerService customer.Service,\n\tentitlementService entitlement.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 22 + } + ], + "line_count": 34 + }, + "api/v3/handlers/customers/entitlementaccess/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListCustomerEntitlementAccessRequest", + "signature": "type ListCustomerEntitlementAccessRequest struct", + "line": 22 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementAccess", + "signature": "func (h *handler) ListCustomerEntitlementAccess() ListCustomerEntitlementAccessHandler", + "line": 26 + } + ], + "line_count": 97 + }, + "api/v3/handlers/customers/entitlementaccess/mapping.go": { + "header": "\t\"errors\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "func", + "name": "mapEntitlementValueToAPI", + "signature": "func mapEntitlementValueToAPI(featureKey string, entitlementValue entitlement.EntitlementValue) (bool, api.BillingEntitlementAccessResult, error)", + "line": 14 + } + ], + "line_count": 46 + }, + "api/v3/handlers/customers/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (h *handler) GetCustomer() GetCustomerHandler", + "line": 22 + } + ], + "line_count": 53 + }, + "api/v3/handlers/customers/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 18 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice customer.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 24 + } + ], + "line_count": 34 + }, + "api/v3/handlers/customers/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (h *handler) ListCustomers() ListCustomersHandler", + "line": 29 + } + ], + "line_count": 151 + }, + "api/v3/handlers/customers/upsert.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertCustomer", + "signature": "func (h *handler) UpsertCustomer() UpsertCustomerHandler", + "line": 28 + } + ], + "line_count": 106 + }, + "api/v3/handlers/events/convert.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "toAPIMeteringIngestedEvent", + "signature": "func toAPIMeteringIngestedEvent(e meterevent.Event) (api.MeteringIngestedEvent, error)", + "line": 25 + }, + { + "kind": "func", + "name": "toAPICustomerReference", + "signature": "func toAPICustomerReference(id *string) *api.CustomerReference", + "line": 53 + }, + { + "kind": "func", + "name": "toAPIMeteringIngestedEventValidationErrors", + "signature": "func toAPIMeteringIngestedEventValidationErrors(errs []error) *[]api.MeteringIngestedEventValidationError", + "line": 60 + }, + { + "kind": "func", + "name": "fromAPICustomerIDFilter", + "signature": "func fromAPICustomerIDFilter(ctx context.Context, f *api.ULIDFieldFilter) (*filter.FilterString, error)", + "line": 87 + }, + { + "kind": "func", + "name": "fromAPIEventSort", + "signature": "func fromAPIEventSort(ctx context.Context, sort *api.SortQuery) (streaming.EventSortField, sortx.Order, error)", + "line": 119 + } + ], + "line_count": 163 + }, + "api/v3/handlers/events/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ingest\"\n\t\"github.com/openmeterio/openmeter/openmeter/meterevent\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 11 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 16 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice ingest.Service,\n\tmetereventService meterevent.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 23 + } + ], + "line_count": 35 + }, + "api/v3/handlers/events/ingest.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "IngestEvents", + "signature": "func (h *handler) IngestEvents() IngestEventsHandler", + "line": 25 + } + ], + "line_count": 106 + }, + "api/v3/handlers/events/list.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListMeteringEvents", + "signature": "func (h *handler) ListMeteringEvents() ListMeteringEventsHandler", + "line": 31 + }, + { + "kind": "func", + "name": "applyFilters", + "signature": "func applyFilters(ctx context.Context, req *ListMeteringEventsRequest, f *api.ListEventsParamsFilter) error", + "line": 128 + } + ], + "line_count": 220 + }, + "api/v3/handlers/events/list_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestFromAPICustomerIDFilter", + "signature": "func TestFromAPICustomerIDFilter(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestFromAPIEventSort", + "signature": "func TestFromAPIEventSort(t *testing.T)", + "line": 47 + }, + { + "kind": "func", + "name": "assertBadRequestField", + "signature": "func assertBadRequestField(t *testing.T, err error, field string)", + "line": 104 + } + ], + "line_count": 110 + }, + "api/v3/handlers/featurecost/convert.go": { + "header": "\t\"github.com/oapi-codegen/nullable\"\n\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "ToAPIFeatureCostQueryResult", + "signature": "func ToAPIFeatureCostQueryResult(result *cost.CostQueryResult, body api.MeterQueryRequest) api.FeatureCostQueryResult", + "line": 13 + }, + { + "kind": "func", + "name": "toAPIFeatureCostQueryRow", + "signature": "func toAPIFeatureCostQueryRow(row cost.CostQueryRow) api.FeatureCostQueryRow", + "line": 30 + } + ], + "line_count": 69 + }, + "api/v3/handlers/featurecost/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/cost\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 13 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 17 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tcostService cost.Service,\n\tfeatureConnector feature.FeatureConnector,\n\tmeterService meter.Service,\n\tcustomerService customer.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 26 + } + ], + "line_count": 42 + }, + "api/v3/handlers/featurecost/query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (h *handler) QueryFeatureCost() QueryFeatureCostHandler", + "line": 31 + } + ], + "line_count": 97 + }, + "api/v3/handlers/features/convert.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "convertFeatureToAPI", + "signature": "func convertFeatureToAPI(f feature.Feature) (api.Feature, error)", + "line": 19 + }, + { + "kind": "func", + "name": "convertCreateRequestToDomain", + "signature": "func convertCreateRequestToDomain(ns string, body api.CreateFeatureRequest, meterID *string) (feature.CreateFeatureInputs, error)", + "line": 53 + }, + { + "kind": "func", + "name": "convertUpdateRequestToDomain", + "signature": "func convertUpdateRequestToDomain(ns string, featureID string, body api.UpdateFeatureRequest) (feature.UpdateFeatureInputs, error)", + "line": 85 + }, + { + "kind": "func", + "name": "convertUnitCostToAPI", + "signature": "func convertUnitCostToAPI(u *feature.UnitCost) (api.BillingFeatureUnitCost, error)", + "line": 108 + }, + { + "kind": "func", + "name": "convertUnitCostFromAPI", + "signature": "func convertUnitCostFromAPI(u *api.BillingFeatureUnitCost) (*feature.UnitCost, error)", + "line": 148 + }, + { + "kind": "func", + "name": "enrichFeatureResponseWithPricing", + "signature": "func enrichFeatureResponseWithPricing(resp *api.Feature, pricing *llmcost.ModelPricing)", + "line": 194 + }, + { + "kind": "func", + "name": "resolveLLMPricing", + "signature": "func resolveLLMPricing(ctx context.Context, svc llmcost.Service, feat *feature.Feature) *llmcost.ModelPricing", + "line": 234 + }, + { + "kind": "func", + "name": "extractEqFilterValue", + "signature": "func extractEqFilterValue(filters feature.MeterGroupByFilters, key string) string", + "line": 269 + }, + { + "kind": "func", + "name": "convertFiltersFromAPI", + "signature": "func convertFiltersFromAPI(apiFilters map[string]api.QueryFilterStringMapItem) feature.MeterGroupByFilters", + "line": 282 + }, + { + "kind": "func", + "name": "convertFiltersToAPI", + "signature": "func convertFiltersToAPI(filters feature.MeterGroupByFilters) map[string]api.QueryFilterStringMapItem", + "line": 290 + }, + { + "kind": "func", + "name": "convertFilterStringToAPIMapItem", + "signature": "func convertFilterStringToAPIMapItem(f filter.FilterString) api.QueryFilterStringMapItem", + "line": 298 + }, + { + "kind": "func", + "name": "convertFilterStringListToAPI", + "signature": "func convertFilterStringListToAPI(filters *[]filter.FilterString) *[]api.QueryFilterString", + "line": 312 + }, + { + "kind": "func", + "name": "convertFilterStringToAPIQueryFilter", + "signature": "func convertFilterStringToAPIQueryFilter(f filter.FilterString) api.QueryFilterString", + "line": 323 + } + ], + "line_count": 334 + }, + "api/v3/handlers/features/convert_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertUnitCostToAPI", + "signature": "func TestConvertUnitCostToAPI(t *testing.T)", + "line": 20 + }, + { + "kind": "func", + "name": "TestConvertUnitCostFromAPI", + "signature": "func TestConvertUnitCostFromAPI(t *testing.T)", + "line": 99 + }, + { + "kind": "func", + "name": "TestConvertUnitCostRoundTrip", + "signature": "func TestConvertUnitCostRoundTrip(t *testing.T)", + "line": 154 + }, + { + "kind": "func", + "name": "TestConvertFeatureToAPI", + "signature": "func TestConvertFeatureToAPI(t *testing.T)", + "line": 194 + }, + { + "kind": "func", + "name": "TestConvertCreateRequestToDomain", + "signature": "func TestConvertCreateRequestToDomain(t *testing.T)", + "line": 288 + }, + { + "kind": "func", + "name": "TestConvertUpdateRequestToDomain", + "signature": "func TestConvertUpdateRequestToDomain(t *testing.T)", + "line": 358 + }, + { + "kind": "func", + "name": "TestEnrichFeatureResponseWithPricing", + "signature": "func TestEnrichFeatureResponseWithPricing(t *testing.T)", + "line": 392 + }, + { + "kind": "func", + "name": "TestExtractEqFilterValue", + "signature": "func TestExtractEqFilterValue(t *testing.T)", + "line": 480 + }, + { + "kind": "func", + "name": "TestConvertFiltersRoundTrip", + "signature": "func TestConvertFiltersRoundTrip(t *testing.T)", + "line": 507 + }, + { + "kind": "func", + "name": "TestConvertMetadataLabels", + "signature": "func TestConvertMetadataLabels(t *testing.T)", + "line": 523 + }, + { + "kind": "func", + "name": "TestConvertFilterStringToAPIMapItem", + "signature": "func TestConvertFilterStringToAPIMapItem(t *testing.T)", + "line": 550 + } + ], + "line_count": 574 + }, + "api/v3/handlers/features/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (h *handler) CreateFeature() CreateFeatureHandler", + "line": 24 + }, + { + "kind": "func", + "name": "validateMeterFilters", + "signature": "func validateMeterFilters(filters map[string]api.QueryFilterStringMapItem, m meter.Meter) error", + "line": 86 + } + ], + "line_count": 95 + }, + "api/v3/handlers/features/create_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateMeterFilters", + "signature": "func TestValidateMeterFilters(t *testing.T)", + "line": 14 + } + ], + "line_count": 60 + }, + "api/v3/handlers/features/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (h *handler) DeleteFeature() DeleteFeatureHandler", + "line": 20 + } + ], + "line_count": 49 + }, + "api/v3/handlers/features/error_encoder.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/feature\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 12 + } + ], + "line_count": 19 + }, + "api/v3/handlers/features/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetFeature", + "signature": "func (h *handler) GetFeature() GetFeatureHandler", + "line": 24 + } + ], + "line_count": 66 + }, + "api/v3/handlers/features/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/llmcost\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 12 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tconnector feature.FeatureConnector,\n\tmeterService meter.Service,\n\tllmcostService llmcost.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 28 + } + ], + "line_count": 42 + }, + "api/v3/handlers/features/list.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (h *handler) ListFeatures() ListFeaturesHandler", + "line": 27 + } + ], + "line_count": 127 + }, + "api/v3/handlers/features/update.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (h *handler) UpdateFeature() UpdateFeatureHandler", + "line": 22 + } + ], + "line_count": 66 + }, + "api/v3/handlers/llmcost/convert.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "formatProviderName", + "signature": "func formatProviderName(id string) string", + "line": 37 + }, + { + "kind": "func", + "name": "domainPriceToAPI", + "signature": "func domainPriceToAPI(p llmcost.Price) api.LLMCostPrice", + "line": 59 + }, + { + "kind": "func", + "name": "domainPricingToAPI", + "signature": "func domainPricingToAPI(p llmcost.ModelPricing) api.LLMCostModelPricing", + "line": 91 + }, + { + "kind": "func", + "name": "apiPricingToDomain", + "signature": "func apiPricingToDomain(p api.LLMCostModelPricing) (llmcost.ModelPricing, error)", + "line": 112 + }, + { + "kind": "func", + "name": "apiCreateOverrideToDomain", + "signature": "func apiCreateOverrideToDomain(ns string, body api.LLMCostOverrideCreate) (llmcost.CreateOverrideInput, error)", + "line": 165 + }, + { + "kind": "func", + "name": "decimalFromString", + "signature": "func decimalFromString(s string) (alpacadecimal.Decimal, error)", + "line": 191 + }, + { + "kind": "func", + "name": "validPriceSortField", + "signature": "func validPriceSortField(field string) bool", + "line": 203 + } + ], + "line_count": 210 + }, + "api/v3/handlers/llmcost/convert_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestFilterSourceInListPricesParams", + "signature": "func TestFilterSourceInListPricesParams(t *testing.T)", + "line": 13 + } + ], + "line_count": 22 + }, + "api/v3/handlers/llmcost/create_override.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (h *handler) CreateOverride() CreateOverrideHandler", + "line": 22 + } + ], + "line_count": 52 + }, + "api/v3/handlers/llmcost/delete_override.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (h *handler) DeleteOverride() DeleteOverrideHandler", + "line": 20 + } + ], + "line_count": 48 + }, + "api/v3/handlers/llmcost/get_price.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetPrice", + "signature": "func (h *handler) GetPrice() GetPriceHandler", + "line": 20 + } + ], + "line_count": 48 + }, + "api/v3/handlers/llmcost/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/llmcost\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 18 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice llmcost.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 24 + } + ], + "line_count": 34 + }, + "api/v3/handlers/llmcost/list_overrides.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (h *handler) ListOverrides() ListOverridesHandler", + "line": 27 + } + ], + "line_count": 112 + }, + "api/v3/handlers/llmcost/list_prices.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListPrices", + "signature": "func (h *handler) ListPrices() ListPricesHandler", + "line": 28 + } + ], + "line_count": 139 + }, + "api/v3/handlers/meters/convert.gen.go": { + "header": "\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\tresponse \"github.com/openmeterio/openmeter/api/v3/response\"\n\tmeter \"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 13 + }, + { + "kind": "func", + "name": "responsePageMetaPageToV3PageMeta", + "signature": "func responsePageMetaPageToV3PageMeta(source response.PageMetaPage) v3.PageMeta", + "line": 63 + }, + { + "kind": "func", + "name": "responsePageMetaToV3PaginatedMeta", + "signature": "func responsePageMetaToV3PaginatedMeta(source response.PageMeta) v3.PaginatedMeta", + "line": 72 + }, + { + "kind": "func", + "name": "timeTimeToTimeTime", + "signature": "func timeTimeToTimeTime(source time.Time) time.Time", + "line": 77 + } + ], + "line_count": 79 + }, + "api/v3/handlers/meters/convert.go": { + "header": "\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "ConvertMetadataAnnotationsToLabels", + "signature": "func ConvertMetadataAnnotationsToLabels(source meter.Meter) *api.Labels", + "line": 51 + }, + { + "kind": "func", + "name": "NamespaceFromContext", + "signature": "func NamespaceFromContext(namespace string) string", + "line": 56 + }, + { + "kind": "func", + "name": "ToAPIMeterAggregation", + "signature": "func ToAPIMeterAggregation(aggregation meter.MeterAggregation) api.MeterAggregation", + "line": 60 + }, + { + "kind": "func", + "name": "FromAPIMeterAggregation", + "signature": "func FromAPIMeterAggregation(aggregation api.MeterAggregation) meter.MeterAggregation", + "line": 81 + }, + { + "kind": "func", + "name": "IntToFloat32", + "signature": "func IntToFloat32(i int) float32", + "line": 102 + }, + { + "kind": "func", + "name": "FromAPIUpdateMeterRequest", + "signature": "func FromAPIUpdateMeterRequest(namespace string, meterID string, body api.UpdateMeterRequest) (meter.UpdateMeterInput, error)", + "line": 106 + }, + { + "kind": "func", + "name": "ConvertMetadataToLabels", + "signature": "func ConvertMetadataToLabels(source models.Metadata) *api.Labels", + "line": 138 + }, + { + "kind": "func", + "name": "ToAPIMeterQueryRow", + "signature": "func ToAPIMeterQueryRow(row meter.MeterQueryRow) api.MeterQueryRow", + "line": 146 + }, + { + "kind": "func", + "name": "ToAPIMeterQueryResult", + "signature": "func ToAPIMeterQueryResult(from *api.DateTime, to *api.DateTime, rows []meter.MeterQueryRow) api.MeterQueryResult", + "line": 174 + } + ], + "line_count": 182 + }, + "api/v3/handlers/meters/create.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (h *handler) CreateMeter() CreateMeterHandler", + "line": 22 + } + ], + "line_count": 58 + }, + "api/v3/handlers/meters/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (h *handler) DeleteMeter() DeleteMeterHandler", + "line": 24 + } + ], + "line_count": 56 + }, + "api/v3/handlers/meters/dimensions.go": { + "header": "func validateDimensionsWithoutReserved[T any](dimensions map[string]T) error {\n\tfor dimension := range dimensions {\n\t\tif query.IsReservedDimension(dimension) {", + "symbols": [], + "line_count": 13 + }, + "api/v3/handlers/meters/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewReservedDimensionError", + "signature": "func NewReservedDimensionError(dimension string) error", + "line": 20 + } + ], + "line_count": 22 + }, + "api/v3/handlers/meters/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetMeter", + "signature": "func (h *handler) GetMeter() GetMeterHandler", + "line": 22 + } + ], + "line_count": 51 + }, + "api/v3/handlers/meters/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 12 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice meter.ManageService,\n\tstreaming streaming.Connector,\n\tcustomerService customer.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 30 + } + ], + "line_count": 44 + }, + "api/v3/handlers/meters/list.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListMeters", + "signature": "func (h *handler) ListMeters() ListMetersHandler", + "line": 27 + } + ], + "line_count": 114 + }, + "api/v3/handlers/meters/query.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (h *handler) QueryMeter() QueryMeterHandler", + "line": 27 + } + ], + "line_count": 76 + }, + "api/v3/handlers/meters/query/convert.go": { + "header": "\t\"fmt\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "ConvertISO8601DurationToWindowSize", + "signature": "func ConvertISO8601DurationToWindowSize(duration string) (meter.WindowSize, error)", + "line": 24 + }, + { + "kind": "func", + "name": "ConvertWindowSizeToISO8601Duration", + "signature": "func ConvertWindowSizeToISO8601Duration(ws meter.WindowSize) (string, error)", + "line": 32 + }, + { + "kind": "func", + "name": "ExtractStringsFromQueryFilter", + "signature": "func ExtractStringsFromQueryFilter(f *api.QueryFilterString, fieldPath ...string) ([]string, error)", + "line": 41 + }, + { + "kind": "func", + "name": "ExtractStringsFromQueryFilterMapItem", + "signature": "func ExtractStringsFromQueryFilterMapItem(f *api.QueryFilterStringMapItem, fieldPath ...string) ([]string, error)", + "line": 67 + } + ], + "line_count": 89 + }, + "api/v3/handlers/meters/query/convert_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertISO8601DurationToWindowSize", + "signature": "func TestConvertISO8601DurationToWindowSize(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestConvertWindowSizeToISO8601Duration", + "signature": "func TestConvertWindowSizeToISO8601Duration(t *testing.T)", + "line": 42 + }, + { + "kind": "func", + "name": "TestExtractStringsFromQueryFilter", + "signature": "func TestExtractStringsFromQueryFilter(t *testing.T)", + "line": 69 + } + ], + "line_count": 146 + }, + "api/v3/handlers/meters/query/customers.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewCustomerResolver", + "signature": "func NewCustomerResolver(customerService customer.Service) CustomerResolverFunc", + "line": 18 + }, + { + "kind": "func", + "name": "CustomersToStreaming", + "signature": "func CustomersToStreaming(customers []customer.Customer) []streaming.Customer", + "line": 49 + } + ], + "line_count": 53 + }, + "api/v3/handlers/meters/query/dimensions.go": { + "header": "const (\n\tDimensionSubject = \"subject\"\n\tDimensionCustomerID = \"customer_id\"", + "symbols": [ + { + "kind": "func", + "name": "IsReservedDimension", + "signature": "func IsReservedDimension(dimension string) bool", + "line": 10 + }, + { + "kind": "func", + "name": "IsSupportedGroupByDimension", + "signature": "func IsSupportedGroupByDimension(m meter.Meter, dimension string) bool", + "line": 19 + } + ], + "line_count": 27 + }, + "api/v3/handlers/meters/query/dimensions_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsReservedDimension", + "signature": "func TestIsReservedDimension(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestIsSupportedGroupByDimension", + "signature": "func TestIsSupportedGroupByDimension(t *testing.T)", + "line": 19 + } + ], + "line_count": 48 + }, + "api/v3/handlers/meters/query/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewInvalidWindowSizeError", + "signature": "func NewInvalidWindowSizeError(duration string) error", + "line": 20 + }, + { + "kind": "func", + "name": "NewInvalidTimeZoneError", + "signature": "func NewInvalidTimeZoneError(tz string) error", + "line": 34 + }, + { + "kind": "func", + "name": "NewInvalidGroupByError", + "signature": "func NewInvalidGroupByError(dimension string) error", + "line": 48 + }, + { + "kind": "func", + "name": "NewInvalidDimensionFilterError", + "signature": "func NewInvalidDimensionFilterError(dimension string) error", + "line": 62 + }, + { + "kind": "func", + "name": "NewUnsupportedFilterOperatorError", + "signature": "func NewUnsupportedFilterOperatorError(path ...string) error", + "line": 75 + }, + { + "kind": "func", + "name": "NewCustomerNotFoundError", + "signature": "func NewCustomerNotFoundError(id string) error", + "line": 89 + } + ], + "line_count": 91 + }, + "api/v3/handlers/meters/query/params.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "BuildQueryParams", + "signature": "func BuildQueryParams(ctx context.Context, m meter.Meter, body api.MeterQueryRequest, resolveCustomers CustomerResolverFunc) (streaming.QueryParams, error)", + "line": 21 + } + ], + "line_count": 107 + }, + "api/v3/handlers/meters/query/params_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "newTestMeter", + "signature": "func newTestMeter() meter.Meter", + "line": 18 + }, + { + "kind": "func", + "name": "noopCustomerResolver", + "signature": "func noopCustomerResolver(_ context.Context, _ string, _ []string) ([]customer.Customer, error)", + "line": 30 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_Empty", + "signature": "func TestBuildQueryParams_Empty(t *testing.T)", + "line": 34 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_FromTo", + "signature": "func TestBuildQueryParams_FromTo(t *testing.T)", + "line": 47 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_Granularity", + "signature": "func TestBuildQueryParams_Granularity(t *testing.T)", + "line": 61 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_TimeZone", + "signature": "func TestBuildQueryParams_TimeZone(t *testing.T)", + "line": 83 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_GroupByDimensions", + "signature": "func TestBuildQueryParams_GroupByDimensions(t *testing.T)", + "line": 103 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_SubjectFilter", + "signature": "func TestBuildQueryParams_SubjectFilter(t *testing.T)", + "line": 126 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_CustomerFilter", + "signature": "func TestBuildQueryParams_CustomerFilter(t *testing.T)", + "line": 166 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_DimensionFilters", + "signature": "func TestBuildQueryParams_DimensionFilters(t *testing.T)", + "line": 198 + }, + { + "kind": "func", + "name": "TestBuildQueryParams_MultipleSubjectFilterOperators", + "signature": "func TestBuildQueryParams_MultipleSubjectFilterOperators(t *testing.T)", + "line": 245 + }, + { + "kind": "func", + "name": "TestCustomersToStreaming", + "signature": "func TestCustomersToStreaming(t *testing.T)", + "line": 262 + } + ], + "line_count": 280 + }, + "api/v3/handlers/meters/query_csv.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "QueryMeterCSV", + "signature": "func (h *handler) QueryMeterCSV() QueryMeterCSVHandler", + "line": 40 + }, + { + "kind": "func", + "name": "collectCustomerIDs", + "signature": "func collectCustomerIDs(rows []meter.MeterQueryRow) []string", + "line": 110 + }, + { + "kind": "struct", + "name": "queryMeterCSVResult", + "signature": "type queryMeterCSVResult struct", + "line": 128 + }, + { + "kind": "func", + "name": "newQueryMeterCSVResult", + "signature": "func newQueryMeterCSVResult(\n\tmeterSlug string,\n\tgroupBy []string,\n\trows []meter.MeterQueryRow,\n\tcustomersByID map[string]customer.Customer,\n) *queryMeterCSVResult", + "line": 137 + }, + { + "kind": "func", + "name": "FileName", + "signature": "func (r *queryMeterCSVResult) FileName() string", + "line": 151 + }, + { + "kind": "func", + "name": "Records", + "signature": "func (r *queryMeterCSVResult) Records() [][]string", + "line": 155 + } + ], + "line_count": 222 + }, + "api/v3/handlers/meters/update.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (h *handler) UpdateMeter() UpdateMeterHandler", + "line": 23 + } + ], + "line_count": 59 + }, + "api/v3/handlers/plans/archive.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (h *handler) ArchivePlan() ArchivePlanHandler", + "line": 24 + } + ], + "line_count": 59 + }, + "api/v3/handlers/plans/convert.go": { + "header": "\t\"fmt\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "hasUnsupportedV3Price", + "signature": "func hasUnsupportedV3Price(p plan.Plan) bool", + "line": 24 + }, + { + "kind": "func", + "name": "ToAPIBillingPlan", + "signature": "func ToAPIBillingPlan(p plan.Plan) (api.BillingPlan, error)", + "line": 41 + }, + { + "kind": "func", + "name": "ToAPIBillingPlanPhase", + "signature": "func ToAPIBillingPlanPhase(p plan.Phase) (api.BillingPlanPhase, error)", + "line": 90 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCard", + "signature": "func ToAPIBillingRateCard(rc productcatalog.RateCard) (api.BillingRateCard, error)", + "line": 111 + }, + { + "kind": "func", + "name": "ToAPIBillingPrice", + "signature": "func ToAPIBillingPrice(p *productcatalog.Price) (api.BillingPrice, error)", + "line": 169 + }, + { + "kind": "func", + "name": "ToAPIBillingPriceTiers", + "signature": "func ToAPIBillingPriceTiers(tiers []productcatalog.PriceTier) []api.BillingPriceTier", + "line": 251 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCardTaxConfig", + "signature": "func ToAPIBillingRateCardTaxConfig(c *productcatalog.TaxConfig, tc *taxcode.TaxCode) *api.BillingRateCardTaxConfig", + "line": 281 + }, + { + "kind": "func", + "name": "ToAPIBillingRateCardDiscount", + "signature": "func ToAPIBillingRateCardDiscount(d productcatalog.Discounts) *api.BillingRateCardDiscounts", + "line": 299 + }, + { + "kind": "func", + "name": "ToAPIBillingSpendCommitments", + "signature": "func ToAPIBillingSpendCommitments(c productcatalog.Commitments) *api.BillingSpendCommitments", + "line": 318 + }, + { + "kind": "func", + "name": "ToAPIProductCatalogValidationErrors", + "signature": "func ToAPIProductCatalogValidationErrors(issues models.ValidationIssues) *[]api.ProductCatalogValidationError", + "line": 336 + }, + { + "kind": "func", + "name": "FromAPIUpsertPlanRequest", + "signature": "func FromAPIUpsertPlanRequest(ns string, planID string, body api.UpsertPlanRequest) (plan.UpdatePlanInput, error)", + "line": 353 + }, + { + "kind": "func", + "name": "FromAPICreatePlanRequest", + "signature": "func FromAPICreatePlanRequest(ns string, body api.CreatePlanRequest) (plan.CreatePlanInput, error)", + "line": 389 + }, + { + "kind": "func", + "name": "ToProRatingConfig", + "signature": "func ToProRatingConfig(enabled *bool) productcatalog.ProRatingConfig", + "line": 435 + }, + { + "kind": "func", + "name": "FromAPIBillingPlanPhase", + "signature": "func FromAPIBillingPlanPhase(p api.BillingPlanPhase) (productcatalog.Phase, error)", + "line": 448 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCard", + "signature": "func FromAPIBillingRateCard(rc api.BillingRateCard) (productcatalog.RateCard, error)", + "line": 487 + }, + { + "kind": "func", + "name": "FromAPIBillingPrice", + "signature": "func FromAPIBillingPrice(p api.BillingPrice, paymentTerm *api.BillingPricePaymentTerm) (*productcatalog.Price, error)", + "line": 573 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceWithCommitments", + "signature": "func FromAPIBillingPriceWithCommitments(p api.BillingPrice, commitments *api.BillingSpendCommitments) (*productcatalog.Price, error)", + "line": 609 + }, + { + "kind": "func", + "name": "ParseCommitments", + "signature": "func ParseCommitments(c *api.BillingSpendCommitments) (productcatalog.Commitments, error)", + "line": 676 + }, + { + "kind": "func", + "name": "FromAPIBillingPriceTiers", + "signature": "func FromAPIBillingPriceTiers(tiers []api.BillingPriceTier) ([]productcatalog.PriceTier, error)", + "line": 704 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCardTaxConfig", + "signature": "func FromAPIBillingRateCardTaxConfig(tc api.BillingRateCardTaxConfig) *productcatalog.TaxConfig", + "line": 743 + }, + { + "kind": "func", + "name": "FromAPIBillingRateCardDiscounts", + "signature": "func FromAPIBillingRateCardDiscounts(d api.BillingRateCardDiscounts) (productcatalog.Discounts, error)", + "line": 755 + } + ], + "line_count": 776 + }, + "api/v3/handlers/plans/convert_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "newTestPlan", + "signature": "func newTestPlan(t *testing.T) plan.Plan", + "line": 22 + }, + { + "kind": "func", + "name": "TestFromPlan", + "signature": "func TestFromPlan(t *testing.T)", + "line": 54 + }, + { + "kind": "func", + "name": "TestFromPlanStatus", + "signature": "func TestFromPlanStatus(t *testing.T)", + "line": 130 + }, + { + "kind": "func", + "name": "TestFromPlanPhase", + "signature": "func TestFromPlanPhase(t *testing.T)", + "line": 176 + }, + { + "kind": "func", + "name": "TestFromValidationErrors", + "signature": "func TestFromValidationErrors(t *testing.T)", + "line": 232 + }, + { + "kind": "func", + "name": "TestFromPlanWithPhases", + "signature": "func TestFromPlanWithPhases(t *testing.T)", + "line": 267 + }, + { + "kind": "func", + "name": "TestFromRateCard", + "signature": "func TestFromRateCard(t *testing.T)", + "line": 309 + }, + { + "kind": "func", + "name": "TestFromBillingPrice", + "signature": "func TestFromBillingPrice(t *testing.T)", + "line": 445 + }, + { + "kind": "func", + "name": "TestFromBillingDiscounts", + "signature": "func TestFromBillingDiscounts(t *testing.T)", + "line": 554 + }, + { + "kind": "func", + "name": "TestFromBillingCommitments", + "signature": "func TestFromBillingCommitments(t *testing.T)", + "line": 602 + }, + { + "kind": "func", + "name": "TestFromBillingTaxConfig", + "signature": "func TestFromBillingTaxConfig(t *testing.T)", + "line": 640 + }, + { + "kind": "func", + "name": "TestFromPlanPhaseWithRateCards", + "signature": "func TestFromPlanPhaseWithRateCards(t *testing.T)", + "line": 673 + }, + { + "kind": "func", + "name": "TestToUpdatePlanInput", + "signature": "func TestToUpdatePlanInput(t *testing.T)", + "line": 696 + }, + { + "kind": "func", + "name": "TestToCreatePlanInput", + "signature": "func TestToCreatePlanInput(t *testing.T)", + "line": 782 + }, + { + "kind": "func", + "name": "TestToPlanPhase", + "signature": "func TestToPlanPhase(t *testing.T)", + "line": 906 + }, + { + "kind": "func", + "name": "TestToRateCard", + "signature": "func TestToRateCard(t *testing.T)", + "line": 943 + }, + { + "kind": "func", + "name": "TestToBillingPrice", + "signature": "func TestToBillingPrice(t *testing.T)", + "line": 1131 + }, + { + "kind": "func", + "name": "TestToBillingPriceTiers", + "signature": "func TestToBillingPriceTiers(t *testing.T)", + "line": 1170 + }, + { + "kind": "func", + "name": "TestToBillingTaxConfig", + "signature": "func TestToBillingTaxConfig(t *testing.T)", + "line": 1201 + }, + { + "kind": "func", + "name": "TestToBillingDiscounts", + "signature": "func TestToBillingDiscounts(t *testing.T)", + "line": 1227 + }, + { + "kind": "func", + "name": "TestFromPlanInvalidStatus", + "signature": "func TestFromPlanInvalidStatus(t *testing.T)", + "line": 1260 + } + ], + "line_count": 1277 + }, + "api/v3/handlers/plans/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (h *handler) CreatePlan() CreatePlanHandler", + "line": 22 + } + ], + "line_count": 63 + }, + "api/v3/handlers/plans/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (h *handler) DeletePlan() DeletePlanHandler", + "line": 21 + } + ], + "line_count": 50 + }, + "api/v3/handlers/plans/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetPlan", + "signature": "func (h *handler) GetPlan() GetPlanHandler", + "line": 22 + } + ], + "line_count": 52 + }, + "api/v3/handlers/plans/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/plan\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice plan.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 26 + } + ], + "line_count": 36 + }, + "api/v3/handlers/plans/list.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlans", + "signature": "func (h *handler) ListPlans() ListPlansHandler", + "line": 28 + } + ], + "line_count": 140 + }, + "api/v3/handlers/plans/planaddons/convert.go": { + "header": "\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/api/v3/labels\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/planaddon\"", + "symbols": [ + { + "kind": "func", + "name": "ToAPIPlanAddon", + "signature": "func ToAPIPlanAddon(a planaddon.PlanAddon) (api.PlanAddon, error)", + "line": 10 + }, + { + "kind": "func", + "name": "ToAPIProductCatalogValidationErrors", + "signature": "func ToAPIProductCatalogValidationErrors(issues models.ValidationIssues) *[]api.ProductCatalogValidationError", + "line": 26 + } + ], + "line_count": 41 + }, + "api/v3/handlers/plans/planaddons/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (h *handler) CreatePlanAddon() CreatePlanAddonHandler", + "line": 25 + } + ], + "line_count": 73 + }, + "api/v3/handlers/plans/planaddons/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (h *handler) DeletePlanAddon() DeletePlanAddonHandler", + "line": 24 + } + ], + "line_count": 54 + }, + "api/v3/handlers/plans/planaddons/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (h *handler) GetPlanAddon() GetPlanAddonHandler", + "line": 25 + } + ], + "line_count": 55 + }, + "api/v3/handlers/plans/planaddons/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/plan\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/planaddon\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 11 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice plan.Service,\n\taddonService planaddon.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 26 + } + ], + "line_count": 38 + }, + "api/v3/handlers/plans/planaddons/lists.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (h *handler) ListPlanAddons() ListPlanAddonsHandler", + "line": 28 + } + ], + "line_count": 89 + }, + "api/v3/handlers/plans/planaddons/update.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (h *handler) UpdatePlanAddon() UpdatePlanAddonHandler", + "line": 28 + } + ], + "line_count": 80 + }, + "api/v3/handlers/plans/publish.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (h *handler) PublishPlan() PublishPlanHandler", + "line": 27 + } + ], + "line_count": 64 + }, + "api/v3/handlers/plans/update.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (h *handler) UpdatePlan() UpdatePlanHandler", + "line": 23 + } + ], + "line_count": 64 + }, + "api/v3/handlers/subscriptions/cancel.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (h *handler) CancelSubscription() CancelSubscriptionHandler", + "line": 28 + } + ], + "line_count": 77 + }, + "api/v3/handlers/subscriptions/change.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (h *handler) ChangeSubscription() ChangeSubscriptionHandler", + "line": 29 + } + ], + "line_count": 137 + }, + "api/v3/handlers/subscriptions/convert.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "ToAPIBillingSubscription", + "signature": "func ToAPIBillingSubscription(subscription subscription.Subscription) api.BillingSubscription", + "line": 17 + }, + { + "kind": "func", + "name": "FromAPIBillingSubscriptionEditTimingEnum", + "signature": "func FromAPIBillingSubscriptionEditTimingEnum(t api.BillingSubscriptionEditTimingEnum) (subscription.Timing, error)", + "line": 37 + }, + { + "kind": "func", + "name": "FromAPIBillingSubscriptionEditTiming", + "signature": "func FromAPIBillingSubscriptionEditTiming(t api.BillingSubscriptionEditTiming) (subscription.Timing, error)", + "line": 48 + }, + { + "kind": "func", + "name": "FromAPIBillingSubscriptionCreate", + "signature": "func FromAPIBillingSubscriptionCreate(\n\tnamespace string,\n\tcustomerID customer.CustomerID,\n\tsubscriptionName string,\n\tcreateSubscriptionRequest api.BillingSubscriptionCreate,\n) (subscriptionworkflow.CreateSubscriptionWorkflowInput, error)", + "line": 64 + } + ], + "line_count": 93 + }, + "api/v3/handlers/subscriptions/create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (h *handler) CreateSubscription() CreateSubscriptionHandler", + "line": 27 + }, + { + "kind": "func", + "name": "getCustomerByIDOrKey", + "signature": "func (h *handler) getCustomerByIDOrKey(ctx context.Context, namespace string, customerID *string, customerKey *string) (*customer.Customer, error)", + "line": 144 + }, + { + "kind": "func", + "name": "getPlanByIDOrKey", + "signature": "func (h *handler) getPlanByIDOrKey(ctx context.Context, namespace string, planID *string, planKey *string, planVersion *int) (*plan.Plan, error)", + "line": 170 + } + ], + "line_count": 199 + }, + "api/v3/handlers/subscriptions/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (h *handler) GetSubscription() GetSubscriptionHandler", + "line": 22 + } + ], + "line_count": 51 + }, + "api/v3/handlers/subscriptions/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/plan\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 13 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tcustomerService customer.Service,\n\tplanService plan.Service,\n\tplanSubscriptionService plansubscription.PlanSubscriptionService,\n\tsubscriptionService subscription.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 31 + } + ], + "line_count": 47 + }, + "api/v3/handlers/subscriptions/list.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListSubscriptions", + "signature": "func (h *handler) ListSubscriptions() ListSubscriptionsHandler", + "line": 27 + } + ], + "line_count": 143 + }, + "api/v3/handlers/subscriptions/subscriptionaddons/convert.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "toAPISubscriptionAddon", + "signature": "func toAPISubscriptionAddon(addon subscriptionaddon.SubscriptionAddon) (apiv3.SubscriptionAddon, error)", + "line": 18 + } + ], + "line_count": 54 + }, + "api/v3/handlers/subscriptions/subscriptionaddons/get.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (h *handler) GetSubscriptionAddon() GetSubscriptionAddonHandler", + "line": 25 + } + ], + "line_count": 59 + }, + "api/v3/handlers/subscriptions/subscriptionaddons/handler.go": { + "header": "\t\"context\"\n\tsubscriptionaddon \"github.com/openmeterio/openmeter/openmeter/subscription/addon\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 15 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\taddonService subscriptionaddon.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 21 + } + ], + "line_count": 31 + }, + "api/v3/handlers/subscriptions/subscriptionaddons/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListSubscriptionAddonsParams", + "signature": "type ListSubscriptionAddonsParams struct", + "line": 21 + }, + { + "kind": "struct", + "name": "listSubscriptionAddonsRequest", + "signature": "type listSubscriptionAddonsRequest struct", + "line": 26 + }, + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (h *handler) ListSubscriptionAddons() ListSubscriptionAddonsHandler", + "line": 37 + } + ], + "line_count": 115 + }, + "api/v3/handlers/subscriptions/unschedule_cancelation.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UnscheduleCancelation", + "signature": "func (h *handler) UnscheduleCancelation() UnscheduleCancelationHandler", + "line": 21 + } + ], + "line_count": 49 + }, + "api/v3/handlers/taxcodes/convert.gen.go": { + "header": "\tv3 \"github.com/openmeterio/openmeter/api/v3\"\n\ttaxcode \"github.com/openmeterio/openmeter/openmeter/taxcode\"\n\tmodels \"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 13 + }, + { + "kind": "func", + "name": "timeTimeToTimeTime", + "signature": "func timeTimeToTimeTime(source time.Time) time.Time", + "line": 78 + }, + { + "kind": "func", + "name": "v3BillingTaxCodeAppMappingListToTaxcodeTaxCodeAppMappings", + "signature": "func v3BillingTaxCodeAppMappingListToTaxcodeTaxCodeAppMappings(source []v3.BillingTaxCodeAppMapping) taxcode.TaxCodeAppMappings", + "line": 81 + }, + { + "kind": "func", + "name": "v3BillingTaxCodeAppMappingToTaxcodeTaxCodeAppMapping", + "signature": "func v3BillingTaxCodeAppMappingToTaxcodeTaxCodeAppMapping(source v3.BillingTaxCodeAppMapping) taxcode.TaxCodeAppMapping", + "line": 91 + } + ], + "line_count": 96 + }, + "api/v3/handlers/taxcodes/convert.go": { + "header": "\t\"errors\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/api/v3/labels\"", + "symbols": [ + { + "kind": "func", + "name": "ConvertMetadataAnnotationsToLabels", + "signature": "func ConvertMetadataAnnotationsToLabels(source taxcode.TaxCode) *api.Labels", + "line": 65 + }, + { + "kind": "func", + "name": "NamespaceFromContext", + "signature": "func NamespaceFromContext(namespace string) string", + "line": 70 + }, + { + "kind": "func", + "name": "ResolveNamespacedIDFromContext", + "signature": "func ResolveNamespacedIDFromContext(namespacedID models.NamespacedID) models.NamespacedID", + "line": 75 + }, + { + "kind": "func", + "name": "FromAPIBillingAppType", + "signature": "func FromAPIBillingAppType(source api.BillingAppType) app.AppType", + "line": 81 + }, + { + "kind": "func", + "name": "ToAPIBillingAppType", + "signature": "func ToAPIBillingAppType(source app.AppType) api.BillingAppType", + "line": 90 + }, + { + "kind": "func", + "name": "IDStringToTaxCodeReference", + "signature": "func IDStringToTaxCodeReference(id string) api.TaxCodeReference", + "line": 97 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeReferenceToIDString", + "signature": "func InvoicingTaxCodeReferenceToIDString(ref *api.TaxCodeReference) (string, error)", + "line": 101 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeReferenceToIDString", + "signature": "func CreditGrantTaxCodeReferenceToIDString(ref *api.TaxCodeReference) (string, error)", + "line": 108 + }, + { + "kind": "func", + "name": "ToAPIBillingTaxCodeAppMappings", + "signature": "func ToAPIBillingTaxCodeAppMappings(source taxcode.TaxCodeAppMappings) []api.BillingTaxCodeAppMapping", + "line": 117 + } + ], + "line_count": 130 + }, + "api/v3/handlers/taxcodes/create.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (h *handler) CreateTaxCode() CreateTaxCodeHandler", + "line": 22 + } + ], + "line_count": 56 + }, + "api/v3/handlers/taxcodes/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api/v3/apierrors\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (h *handler) DeleteTaxCode() DeleteTaxCodeHandler", + "line": 22 + } + ], + "line_count": 57 + }, + "api/v3/handlers/taxcodes/get.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (h *handler) GetTaxCode() GetTaxCodeHandler", + "line": 22 + } + ], + "line_count": 53 + }, + "api/v3/handlers/taxcodes/get_organization_default_tax_codes.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (h *handler) GetOrganizationDefaultTaxCodes() GetOrganizationDefaultTaxCodesHandler", + "line": 20 + } + ], + "line_count": 43 + }, + "api/v3/handlers/taxcodes/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/taxcode\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 10 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tresolveNamespace func(ctx context.Context) (string, error),\n\tservice taxcode.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 27 + } + ], + "line_count": 37 + }, + "api/v3/handlers/taxcodes/list.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (h *handler) ListTaxCodes() ListTaxCodesHandler", + "line": 25 + } + ], + "line_count": 89 + }, + "api/v3/handlers/taxcodes/update.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateTaxCode", + "signature": "func (h *handler) UpdateTaxCode() UpdateTaxCodeHandler", + "line": 24 + } + ], + "line_count": 62 + }, + "api/v3/handlers/taxcodes/upsert_organization_default_tax_codes.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertOrganizationDefaultTaxCodes", + "signature": "func (h *handler) UpsertOrganizationDefaultTaxCodes() UpsertOrganizationDefaultTaxCodesHandler", + "line": 21 + } + ], + "line_count": 50 + }, + "api/v3/labels/convert.go": { + "header": "\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "MetadataAnnotations", + "signature": "type MetadataAnnotations struct", + "line": 15 + }, + { + "kind": "func", + "name": "ToMetadataAnnotations", + "signature": "func ToMetadataAnnotations(labels *api.Labels) (MetadataAnnotations, error)", + "line": 20 + }, + { + "kind": "func", + "name": "FromMetadataAnnotations", + "signature": "func FromMetadataAnnotations(metadata models.Metadata, annotations models.Annotations) *api.Labels", + "line": 56 + }, + { + "kind": "func", + "name": "ToMetadata", + "signature": "func ToMetadata(labels *api.Labels) (models.Metadata, error)", + "line": 102 + } + ], + "line_count": 106 + }, + "api/v3/labels/convert_test.go": { + "header": "\t\"encoding\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "struct", + "name": "stringerValue", + "signature": "type stringerValue struct", + "line": 14 + }, + { + "kind": "func", + "name": "String", + "signature": "func (v stringerValue) String() string", + "line": 16 + }, + { + "kind": "struct", + "name": "textMarshalerValue", + "signature": "type textMarshalerValue struct", + "line": 19 + }, + { + "kind": "func", + "name": "MarshalText", + "signature": "func (v textMarshalerValue) MarshalText() ([]byte, error)", + "line": 21 + }, + { + "kind": "struct", + "name": "failingTextMarshaler", + "signature": "type failingTextMarshaler struct", + "line": 24 + }, + { + "kind": "func", + "name": "TestToMetadataAnnotations", + "signature": "func TestToMetadataAnnotations(t *testing.T)", + "line": 36 + }, + { + "kind": "func", + "name": "TestFromMetadataAnnotations", + "signature": "func TestFromMetadataAnnotations(t *testing.T)", + "line": 115 + } + ], + "line_count": 235 + }, + "api/v3/labels/validate.go": { + "header": "\t\"errors\"\n\t\"net/http\"\n\t\"regexp\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateLabel", + "signature": "func ValidateLabel(k, v string) error", + "line": 19 + }, + { + "kind": "func", + "name": "ValidateLabels", + "signature": "func ValidateLabels(l api.Labels) error", + "line": 55 + } + ], + "line_count": 65 + }, + "api/v3/labels/validate_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateLabel", + "signature": "func TestValidateLabel(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestValidateLabels", + "signature": "func TestValidateLabels(t *testing.T)", + "line": 162 + } + ], + "line_count": 237 + }, + "api/v3/oasmiddleware/decoder.go": { + "header": "\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "JsonBodyDecoder", + "signature": "func JsonBodyDecoder(body io.Reader, _ http.Header, _ *openapi3.SchemaRef, _ openapi3filter.EncodingFn) (any, error)", + "line": 16 + } + ], + "line_count": 25 + }, + "api/v3/oasmiddleware/error.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "ToAipError", + "signature": "func ToAipError(me openapi3.MultiError) []apierrors.InvalidParameter", + "line": 21 + }, + { + "kind": "func", + "name": "aipMapper", + "signature": "func aipMapper(me openapi3.MultiError, parent *apierrors.InvalidParameter) []apierrors.InvalidParameter", + "line": 25 + }, + { + "kind": "func", + "name": "collectFromSchemaError", + "signature": "func collectFromSchemaError(se *openapi3.SchemaError) []apierrors.InvalidParameter", + "line": 82 + }, + { + "kind": "func", + "name": "unwrapOriginError", + "signature": "func unwrapOriginError(schemaErr *openapi3.SchemaError) []apierrors.InvalidParameter", + "line": 94 + }, + { + "kind": "func", + "name": "invalidParamFromSchemaError", + "signature": "func invalidParamFromSchemaError(\n\tschemaErr *openapi3.SchemaError,\n\tparent *apierrors.InvalidParameter,\n) apierrors.InvalidParameter", + "line": 122 + } + ], + "line_count": 143 + }, + "api/v3/oasmiddleware/hook.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "OasRouteNotFoundErrorHook", + "signature": "func OasRouteNotFoundErrorHook(err error, w http.ResponseWriter, r *http.Request) bool", + "line": 18 + }, + { + "kind": "func", + "name": "OasValidationErrorHook", + "signature": "func OasValidationErrorHook(ctx context.Context, err error, w http.ResponseWriter, r *http.Request) bool", + "line": 31 + }, + { + "kind": "func", + "name": "SanitizeSensitiveFieldValues", + "signature": "func SanitizeSensitiveFieldValues(err error) error", + "line": 68 + }, + { + "kind": "func", + "name": "isSensitive", + "signature": "func isSensitive(sensitive any) bool", + "line": 94 + } + ], + "line_count": 106 + }, + "api/v3/oasmiddleware/response.go": { + "header": "\t\"bytes\"\n\t\"net/http\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "ResponseWriterWrapper", + "signature": "type ResponseWriterWrapper struct", + "line": 11 + }, + { + "kind": "func", + "name": "Body", + "signature": "func (rww ResponseWriterWrapper) Body() *bytes.Buffer", + "line": 17 + }, + { + "kind": "func", + "name": "StatusCode", + "signature": "func (rww ResponseWriterWrapper) StatusCode() *int", + "line": 21 + }, + { + "kind": "func", + "name": "NewResponseWriterWrapper", + "signature": "func NewResponseWriterWrapper(w http.ResponseWriter) ResponseWriterWrapper", + "line": 25 + }, + { + "kind": "func", + "name": "Write", + "signature": "func (rww ResponseWriterWrapper) Write(buf []byte) (int, error)", + "line": 38 + }, + { + "kind": "func", + "name": "Header", + "signature": "func (rww ResponseWriterWrapper) Header() http.Header", + "line": 44 + }, + { + "kind": "func", + "name": "WriteHeader", + "signature": "func (rww ResponseWriterWrapper) WriteHeader(statusCode int)", + "line": 49 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (rww ResponseWriterWrapper) Unwrap() http.ResponseWriter", + "line": 54 + } + ], + "line_count": 56 + }, + "api/v3/oasmiddleware/router.go": { + "header": "\t\"context\"\n\t\"github.com/getkin/kin-openapi/openapi3\"\n\t\"github.com/getkin/kin-openapi/routers\"", + "symbols": [ + { + "kind": "struct", + "name": "ValidationRouterOpts", + "signature": "type ValidationRouterOpts struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewValidationRouter", + "signature": "func NewValidationRouter(ctx context.Context, doc *openapi3.T, opts *ValidationRouterOpts) (routers.Router, error)", + "line": 26 + } + ], + "line_count": 60 + }, + "api/v3/oasmiddleware/validator.go": { + "header": "\t\"bytes\"\n\t\"io\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ValidateRequestOption", + "signature": "type ValidateRequestOption struct", + "line": 20 + }, + { + "kind": "func", + "name": "ValidateRequest", + "signature": "func ValidateRequest(validationRouter routers.Router, opts ValidateRequestOption) func(h http.Handler) http.Handler", + "line": 33 + }, + { + "kind": "struct", + "name": "ValidateResponseOption", + "signature": "type ValidateResponseOption struct", + "line": 66 + }, + { + "kind": "func", + "name": "ValidateResponse", + "signature": "func ValidateResponse(validationRouter routers.Router, opts ValidateResponseOption) func(h http.Handler) http.Handler", + "line": 78 + } + ], + "line_count": 127 + }, + "api/v3/oasmiddleware/validator_test.go": { + "header": "\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateResponse_Violation", + "signature": "func TestValidateResponse_Violation(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestValidateResponse_Clean", + "signature": "func TestValidateResponse_Clean(t *testing.T)", + "line": 55 + }, + { + "kind": "func", + "name": "TestValidateResponse_RouteFilterSkipsValidation", + "signature": "func TestValidateResponse_RouteFilterSkipsValidation(t *testing.T)", + "line": 91 + } + ], + "line_count": 133 + }, + "api/v3/openapi.yaml": { + "header": "openapi: 3.0.0\ninfo:\n title: OpenMeter and Konnect Metering & Billing API\n version: 0.0.1\n description: |-\n OpenMeter is a cloud native usage metering and billing service. The API allows\n you to ingest events, query meter usage, and manage resources.\nservers:\n - url: http://localhost:{port}/api/v3\n description: Local\n variables:\n port:\n default: '8888'\n - url: https://{region}.api.konghq.com/v3\n description: Production region\n variables:\n region:\n default: us\n enum:\n - us", + "symbols": [], + "line_count": 10289 + }, + "api/v3/render/render.go": { + "header": "\t\"encoding/json\"\n\t\"net/http\"\n\t\"github.com/invopop/yaml\"", + "symbols": [ + { + "kind": "struct", + "name": "config", + "signature": "type config struct", + "line": 17 + }, + { + "kind": "func", + "name": "WithStatus", + "signature": "func WithStatus(status int) Option", + "line": 23 + }, + { + "kind": "func", + "name": "WithHeader", + "signature": "func WithHeader(key, value string) Option", + "line": 29 + }, + { + "kind": "func", + "name": "WithContentType", + "signature": "func WithContentType(contentType string) Option", + "line": 35 + } + ], + "line_count": 86 + }, + "api/v3/request/body.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"io\"", + "symbols": [ + { + "kind": "func", + "name": "ParseBody", + "signature": "func ParseBody(r *http.Request, payload any) *apierrors.BaseAPIError", + "line": 12 + }, + { + "kind": "func", + "name": "ParseOptionalBody", + "signature": "func ParseOptionalBody(r *http.Request, payload any) *apierrors.BaseAPIError", + "line": 29 + } + ], + "line_count": 51 + }, + "api/v3/request/filter.go": { + "header": "\t\"github.com/samber/lo\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\t\"github.com/openmeterio/openmeter/pkg/filter\"", + "symbols": [ + { + "kind": "func", + "name": "convertContainsOperator", + "signature": "func convertContainsOperator(value *string) *string", + "line": 10 + }, + { + "kind": "func", + "name": "convertQueryFilterStringList", + "signature": "func convertQueryFilterStringList(source *[]api.QueryFilterString) *[]filter.FilterString", + "line": 18 + }, + { + "kind": "func", + "name": "ConvertQueryFilterString", + "signature": "func ConvertQueryFilterString(source api.QueryFilterString) filter.FilterString", + "line": 32 + }, + { + "kind": "func", + "name": "ConvertQueryFilterStringPtr", + "signature": "func ConvertQueryFilterStringPtr(source *api.QueryFilterString) *filter.FilterString", + "line": 46 + }, + { + "kind": "func", + "name": "ConvertQueryFilterStringMapItem", + "signature": "func ConvertQueryFilterStringMapItem(source api.QueryFilterStringMapItem) filter.FilterString", + "line": 55 + } + ], + "line_count": 67 + }, + "api/v3/request/filter_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestConvertQueryFilterString", + "signature": "func TestConvertQueryFilterString(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestConvertQueryFilterStringPtr", + "signature": "func TestConvertQueryFilterStringPtr(t *testing.T)", + "line": 113 + } + ], + "line_count": 127 + }, + "api/v3/request/sort.go": { + "header": "\t\"errors\"\n\t\"strings\"\n\t\"github.com/openmeterio/openmeter/pkg/sortx\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s SortOrder) Validate() error", + "line": 24 + }, + { + "kind": "struct", + "name": "SortBy", + "signature": "type SortBy struct", + "line": 32 + }, + { + "kind": "func", + "name": "ParseSortBy", + "signature": "func ParseSortBy(sort string) (*SortBy, error)", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SortBy) Validate() error", + "line": 47 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (s *SortBy) UnmarshalText(text []byte) error", + "line": 59 + }, + { + "kind": "func", + "name": "ToSortxOrder", + "signature": "func (s SortOrder) ToSortxOrder() sortx.Order", + "line": 78 + } + ], + "line_count": 84 + }, + "api/v3/response/cursorpagination.go": { + "header": "\t\"github.com/oapi-codegen/nullable\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "CursorMeta", + "signature": "type CursorMeta struct", + "line": 11 + }, + { + "kind": "struct", + "name": "CursorMetaPage", + "signature": "type CursorMetaPage struct", + "line": 16 + } + ], + "line_count": 68 + }, + "api/v3/response/pagepagination.go": { + "header": "type PagePaginationResponse[T any] struct {\n\tData []T `json:\"data\"`\n\tMeta PageMeta `json:\"meta\"`", + "symbols": [ + { + "kind": "struct", + "name": "PageMeta", + "signature": "type PageMeta struct", + "line": 8 + }, + { + "kind": "struct", + "name": "PageMetaPage", + "signature": "type PageMetaPage struct", + "line": 12 + } + ], + "line_count": 25 + }, + "api/v3/server/routes.go": { + "header": "\t\"net/http\"\n\tapi \"github.com/openmeterio/openmeter/api/v3\"\n\tcurrencieshandler \"github.com/openmeterio/openmeter/api/v3/handlers/currencies\"", + "symbols": [ + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (s *Server) CreateMeter(w http.ResponseWriter, r *http.Request)", + "line": 17 + }, + { + "kind": "func", + "name": "GetMeter", + "signature": "func (s *Server) GetMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)", + "line": 21 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (s *Server) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)", + "line": 25 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (s *Server) UpdateMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)", + "line": 29 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (s *Server) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)", + "line": 33 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (s *Server) QueryMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID)", + "line": 37 + }, + { + "kind": "func", + "name": "IngestMeteringEvents", + "signature": "func (s *Server) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)", + "line": 50 + }, + { + "kind": "func", + "name": "ListMeteringEvents", + "signature": "func (s *Server) ListMeteringEvents(w http.ResponseWriter, r *http.Request, params api.ListMeteringEventsParams)", + "line": 54 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (s *Server) CreateCustomer(w http.ResponseWriter, r *http.Request)", + "line": 60 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (s *Server) GetCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 64 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (s *Server) ListCustomers(w http.ResponseWriter, r *http.Request, params api.ListCustomersParams)", + "line": 68 + }, + { + "kind": "func", + "name": "UpsertCustomer", + "signature": "func (s *Server) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 72 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (s *Server) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 76 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementAccess", + "signature": "func (s *Server) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 82 + }, + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (s *Server) CreateSubscription(w http.ResponseWriter, r *http.Request)", + "line": 88 + }, + { + "kind": "func", + "name": "ListSubscriptions", + "signature": "func (s *Server) ListSubscriptions(w http.ResponseWriter, r *http.Request, params api.ListSubscriptionsParams)", + "line": 92 + }, + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (s *Server) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)", + "line": 96 + }, + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (s *Server) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)", + "line": 100 + }, + { + "kind": "func", + "name": "UnscheduleCancelation", + "signature": "func (s *Server) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)", + "line": 104 + }, + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (s *Server) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID)", + "line": 108 + }, + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (s *Server) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID, params api.ListSubscriptionAddonsParams)", + "line": 113 + }, + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (s *Server) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId api.ULID, subscriptionAddonId api.ULID)", + "line": 120 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (s *Server) ListApps(w http.ResponseWriter, r *http.Request, params api.ListAppsParams)", + "line": 129 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (s *Server) GetApp(w http.ResponseWriter, r *http.Request, appId api.ULID)", + "line": 133 + }, + { + "kind": "func", + "name": "ListBillingProfiles", + "signature": "func (s *Server) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams)", + "line": 139 + }, + { + "kind": "func", + "name": "CreateBillingProfile", + "signature": "func (s *Server) CreateBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 143 + }, + { + "kind": "func", + "name": "DeleteBillingProfile", + "signature": "func (s *Server) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)", + "line": 147 + }, + { + "kind": "func", + "name": "GetBillingProfile", + "signature": "func (s *Server) GetBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)", + "line": 151 + }, + { + "kind": "func", + "name": "UpdateBillingProfile", + "signature": "func (s *Server) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id api.ULID)", + "line": 155 + }, + { + "kind": "func", + "name": "GetCustomerBilling", + "signature": "func (s *Server) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 161 + }, + { + "kind": "func", + "name": "UpdateCustomerBilling", + "signature": "func (s *Server) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 165 + }, + { + "kind": "func", + "name": "UpdateCustomerBillingAppData", + "signature": "func (s *Server) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 169 + }, + { + "kind": "func", + "name": "CreateCustomerStripeCheckoutSession", + "signature": "func (s *Server) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 173 + }, + { + "kind": "func", + "name": "CreateCustomerStripePortalSession", + "signature": "func (s *Server) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 177 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (s *Server) ListTaxCodes(w http.ResponseWriter, r *http.Request, params api.ListTaxCodesParams)", + "line": 183 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (s *Server) CreateTaxCode(w http.ResponseWriter, r *http.Request)", + "line": 187 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (s *Server) DeleteTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId api.ULID)", + "line": 191 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (s *Server) GetTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId api.ULID)", + "line": 195 + }, + { + "kind": "func", + "name": "UpsertTaxCode", + "signature": "func (s *Server) UpsertTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId api.ULID)", + "line": 199 + }, + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (s *Server) ListCurrencies(w http.ResponseWriter, r *http.Request, params api.ListCurrenciesParams)", + "line": 205 + }, + { + "kind": "func", + "name": "CreateCustomCurrency", + "signature": "func (s *Server) CreateCustomCurrency(w http.ResponseWriter, r *http.Request)", + "line": 209 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (s *Server) CreateCostBasis(w http.ResponseWriter, r *http.Request, currencyId api.ULID)", + "line": 213 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (s *Server) ListCostBases(w http.ResponseWriter, r *http.Request, currencyId api.ULID, params api.ListCostBasesParams)", + "line": 217 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (s *Server) ListFeatures(w http.ResponseWriter, r *http.Request, params api.ListFeaturesParams)", + "line": 223 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (s *Server) CreateFeature(w http.ResponseWriter, r *http.Request)", + "line": 227 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (s *Server) GetFeature(w http.ResponseWriter, r *http.Request, featureId api.ULID)", + "line": 231 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (s *Server) UpdateFeature(w http.ResponseWriter, r *http.Request, featureId api.ULID)", + "line": 235 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (s *Server) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId api.ULID)", + "line": 239 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (s *Server) QueryFeatureCost(w http.ResponseWriter, r *http.Request, featureId api.ULID)", + "line": 245 + }, + { + "kind": "func", + "name": "ListLlmCostPrices", + "signature": "func (s *Server) ListLlmCostPrices(w http.ResponseWriter, r *http.Request, params api.ListLlmCostPricesParams)", + "line": 251 + }, + { + "kind": "func", + "name": "GetLlmCostPrice", + "signature": "func (s *Server) GetLlmCostPrice(w http.ResponseWriter, r *http.Request, priceId api.ULID)", + "line": 255 + }, + { + "kind": "func", + "name": "ListLlmCostOverrides", + "signature": "func (s *Server) ListLlmCostOverrides(w http.ResponseWriter, r *http.Request, params api.ListLlmCostOverridesParams)", + "line": 261 + }, + { + "kind": "func", + "name": "CreateLlmCostOverride", + "signature": "func (s *Server) CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)", + "line": 265 + }, + { + "kind": "func", + "name": "DeleteLlmCostOverride", + "signature": "func (s *Server) DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request, priceId api.ULID)", + "line": 269 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (s *Server) ListPlans(w http.ResponseWriter, r *http.Request, params api.ListPlansParams)", + "line": 275 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (s *Server) CreatePlan(w http.ResponseWriter, r *http.Request)", + "line": 279 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (s *Server) GetPlan(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 283 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (s *Server) UpdatePlan(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 287 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (s *Server) DeletePlan(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 291 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (s *Server) ArchivePlan(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 295 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (s *Server) PublishPlan(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 299 + }, + { + "kind": "func", + "name": "ListAddons", + "signature": "func (s *Server) ListAddons(w http.ResponseWriter, r *http.Request, params api.ListAddonsParams)", + "line": 305 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (s *Server) CreateAddon(w http.ResponseWriter, r *http.Request)", + "line": 309 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (s *Server) GetAddon(w http.ResponseWriter, r *http.Request, addonId api.ULID)", + "line": 313 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (s *Server) UpdateAddon(w http.ResponseWriter, r *http.Request, addonId api.ULID)", + "line": 317 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (s *Server) DeleteAddon(w http.ResponseWriter, r *http.Request, addonId api.ULID)", + "line": 321 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (s *Server) ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId api.ULID)", + "line": 325 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (s *Server) PublishAddon(w http.ResponseWriter, r *http.Request, addonId api.ULID)", + "line": 329 + }, + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (s *Server) ListPlanAddons(w http.ResponseWriter, r *http.Request, planId api.ULID, params api.ListPlanAddonsParams)", + "line": 335 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (s *Server) CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId api.ULID)", + "line": 342 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (s *Server) GetPlanAddon(w http.ResponseWriter, r *http.Request, planId api.ULID, planAddonId api.ULID)", + "line": 346 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (s *Server) UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId api.ULID, planAddonId api.ULID)", + "line": 353 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (s *Server) DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId api.ULID, planAddonId api.ULID)", + "line": 360 + }, + { + "kind": "func", + "name": "GetCustomerCreditBalance", + "signature": "func (s *Server) GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request, customerId api.ULID, params api.GetCustomerCreditBalanceParams)", + "line": 371 + }, + { + "kind": "func", + "name": "ListCreditGrants", + "signature": "func (s *Server) ListCreditGrants(w http.ResponseWriter, r *http.Request, customerId api.ULID, params api.ListCreditGrantsParams)", + "line": 383 + }, + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (s *Server) CreateCreditGrant(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 395 + }, + { + "kind": "func", + "name": "GetCreditGrant", + "signature": "func (s *Server) GetCreditGrant(w http.ResponseWriter, r *http.Request, customerId api.ULID, creditGrantId api.ULID)", + "line": 406 + }, + { + "kind": "func", + "name": "CreateCreditAdjustment", + "signature": "func (s *Server) CreateCreditAdjustment(w http.ResponseWriter, r *http.Request, customerId api.ULID)", + "line": 418 + }, + { + "kind": "func", + "name": "UpdateCreditGrantExternalSettlement", + "signature": "func (s *Server) UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request, customerId api.ULID, creditGrantId api.ULID)", + "line": 422 + }, + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (s *Server) ListCreditTransactions(w http.ResponseWriter, r *http.Request, customerId api.ULID, params api.ListCreditTransactionsParams)", + "line": 434 + }, + { + "kind": "func", + "name": "ListCustomerCharges", + "signature": "func (s *Server) ListCustomerCharges(w http.ResponseWriter, r *http.Request, customerId api.ULID, params api.ListCustomerChargesParams)", + "line": 448 + }, + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (s *Server) GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 462 + }, + { + "kind": "func", + "name": "UpdateOrganizationDefaultTaxCodes", + "signature": "func (s *Server) UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)", + "line": 466 + }, + { + "kind": "func", + "name": "QueryGovernanceAccess", + "signature": "func (s *Server) QueryGovernanceAccess(w http.ResponseWriter, r *http.Request, params api.QueryGovernanceAccessParams)", + "line": 472 + } + ], + "line_count": 474 + }, + "api/v3/server/server.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 72 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *Config) Validate() error", + "line": 111 + }, + { + "kind": "struct", + "name": "Server", + "signature": "type Server struct", + "line": 227 + }, + { + "kind": "func", + "name": "NewServer", + "signature": "func NewServer(config *Config) (*Server, error)", + "line": 257 + }, + { + "kind": "func", + "name": "RegisterRoutes", + "signature": "func (s *Server) RegisterRoutes(r chi.Router) error", + "line": 357 + }, + { + "kind": "func", + "name": "buildResponseValidationRouteFilter", + "signature": "func buildResponseValidationRouteFilter(cfg config.ResponseValidationConfig) func(*routers.Route) bool", + "line": 449 + } + ], + "line_count": 462 + }, + "api/v3/templates/chi-middleware.tmpl.patch": { + "header": "--- a/chi-middleware.tmpl\n+++ b/chi-middleware.tmpl\n@@ -77,11 +77,21 @@\n }{{end}}\n {{end}}\n {{if .IsStyled}}\n+ {{- /* For \"filter\" deepObject params, use the custom filter parser which\n+ correctly handles all filter types including union types. */ -}}\n+ {{- if and (eq .ParamName \"filter\") (eq .Style \"deepObject\") }}\n+ err = filters.Parse(r.URL.Query(), ¶ms.{{.GoName}})\n+ if err != nil {\n+ siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: \"{{.ParamName}}\", Err: err})\n+ return\n+ }\n+ {{- else }}\n err = runtime.BindQueryParameterWithOptions(\"{{.Style}}\", {{.Explode}}, {{.Required}}, \"{{.ParamName}}\", r.URL.Query(), ¶ms.{{.GoName}}, runtime.BindQueryParameterOptions{Type: \"{{.SchemaType}}\", Format: \"{{.SchemaFormat}}\"})\n if err != nil {\n siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: \"{{.ParamName}}\", Err: err})\n return\n }", + "symbols": [], + "line_count": 23 + }, + "api/v3/test/embed.go": { + "header": "var OpenAPITestSpec []byte", + "symbols": [], + "line_count": 6 + }, + "api/v3/test/filters_test.go": { + "header": "\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "fieldFiltersTarget", + "signature": "type fieldFiltersTarget struct", + "line": 25 + }, + { + "kind": "struct", + "name": "validatorErrorResponse", + "signature": "type validatorErrorResponse struct", + "line": 37 + }, + { + "kind": "struct", + "name": "validatorInvalidParameter", + "signature": "type validatorInvalidParameter struct", + "line": 45 + }, + { + "kind": "func", + "name": "newTestServer", + "signature": "func newTestServer(t *testing.T, handler http.HandlerFunc) *httptest.Server", + "line": 52 + }, + { + "kind": "func", + "name": "noopHandler", + "signature": "func noopHandler(w http.ResponseWriter, _ *http.Request)", + "line": 82 + }, + { + "kind": "func", + "name": "parseHandler", + "signature": "func parseHandler(w http.ResponseWriter, r *http.Request)", + "line": 86 + }, + { + "kind": "func", + "name": "TestFieldFilterValidation", + "signature": "func TestFieldFilterValidation(t *testing.T)", + "line": 100 + }, + { + "kind": "func", + "name": "TestFieldFilterParse", + "signature": "func TestFieldFilterParse(t *testing.T)", + "line": 312 + } + ], + "line_count": 658 + }, + "api/v3/test/openapi.test.yaml": { + "header": "openapi: 3.0.0\ninfo:\n title: Filter Test API\n version: 1.0.0\ntags: []\npaths:\n /field-filters:\n get:\n operationId: get-field-filters-with-all-supported-types\n summary: Field filters\n parameters:\n - name: filter\n in: query\n required: false\n schema:\n $ref: \"#/components/schemas/FieldFilters\"\n style: deepObject\n responses:\n \"204\":\n description: \"There is no content to send for this request, but the headers may be useful. \"", + "symbols": [], + "line_count": 276 + }, + "app/common/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewAppService", + "signature": "func NewAppService(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tpublisher eventbus.Publisher,\n) (app.Service, error)", + "line": 39 + }, + { + "kind": "func", + "name": "NewAppStripeService", + "signature": "func NewAppStripeService(logger *slog.Logger, db *entdb.Client, appsConfig config.AppsConfiguration, appService app.Service, customerService customer.Service, secretService secret.Service, billingRegistry BillingRegistry, publisher eventbus.Publisher) (appstripe.Service, error)", + "line": 57 + }, + { + "kind": "func", + "name": "NewAppSandboxFactory", + "signature": "func NewAppSandboxFactory(\n\tappsConfig config.AppsConfiguration,\n\tappService app.Service,\n\tbilling BillingRegistry,\n) (*appsandbox.Factory, error)", + "line": 93 + }, + { + "kind": "func", + "name": "NewAppSandboxProvisioner", + "signature": "func NewAppSandboxProvisioner(ctx context.Context, logger *slog.Logger, appsConfig config.AppsConfiguration, appService app.Service, namespaceManager *namespace.Manager, billingRegistry BillingRegistry, _ *appsandbox.Factory,\n) (AppSandboxProvisioner, error)", + "line": 109 + }, + { + "kind": "func", + "name": "NewAppCustomInvoicingService", + "signature": "func NewAppCustomInvoicingService(logger *slog.Logger, db *entdb.Client, appsConfig config.AppsConfiguration, appService app.Service, customerService customer.Service, secretService secret.Service, billingRegistry BillingRegistry, publisher eventbus.Publisher) (appcustominvoicing.Service, error)", + "line": 126 + }, + { + "kind": "struct", + "name": "AppRegistry", + "signature": "type AppRegistry struct", + "line": 158 + }, + { + "kind": "func", + "name": "NewAppRegistry", + "signature": "func NewAppRegistry(\n\tService app.Service,\n\tSandboxProvisioner AppSandboxProvisioner,\n\tStripe appstripe.Service,\n\tCustomInvoicing appcustominvoicing.Service,\n) AppRegistry", + "line": 165 + } + ], + "line_count": 177 + }, + "app/common/billing.go": { + "header": "\t\"log/slog\"\n\t\"github.com/google/wire\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingRegistry", + "signature": "type BillingRegistry struct", + "line": 46 + }, + { + "kind": "func", + "name": "ChargesServiceOrNil", + "signature": "func (r BillingRegistry) ChargesServiceOrNil() charges.Service", + "line": 51 + }, + { + "kind": "struct", + "name": "ChargesRegistry", + "signature": "type ChargesRegistry struct", + "line": 60 + }, + { + "kind": "func", + "name": "BillingAdapter", + "signature": "func BillingAdapter(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n) (billing.Adapter, error)", + "line": 78 + }, + { + "kind": "func", + "name": "newBillingService", + "signature": "func newBillingService(\n\tlogger *slog.Logger,\n\tappService app.Service,\n\tbillingAdapter billing.Adapter,\n\tbillingRatingService rating.Service,\n\tcustomerService customer.Service,\n\tfeatureConnector feature.FeatureConnector,\n\tmeterService meter.Service,\n\tstreamingConnector streaming.Connector,\n\teventPublisher eventbus.Publisher,\n\tbillingConfig config.BillingConfiguration,\n\tsubscriptionServices SubscriptionServiceWithWorkflow,\n\tdb *entdb.Client,\n\tfsConfig config.BillingFeatureSwitchesConfiguration,\n\ttracer trace.Tracer,\n\ttaxCodeService taxcode.Service,\n) (billing.Service, error)", + "line": 90 + }, + { + "kind": "func", + "name": "NewBillingRegistry", + "signature": "func NewBillingRegistry(\n\tlogger *slog.Logger,\n\tappService app.Service,\n\tbillingAdapter billing.Adapter,\n\tbillingRatingService rating.Service,\n\tcustomerService customer.Service,\n\tfeatureConnector feature.FeatureConnector,\n\tmeterService meter.Service,\n\tstreamingConnector streaming.Connector,\n\teventPublisher eventbus.Publisher,\n\tbillingConfig config.BillingConfiguration,\n\tsubscriptionServices SubscriptionServiceWithWorkflow,\n\tdb *entdb.Client,\n\tfsConfig config.BillingFeatureSwitchesConfiguration,\n\tcreditsConfig config.CreditsConfiguration,\n\ttracer trace.Tracer,\n\ttaxCodeService taxcode.Service,\n\tlocker *lockr.Locker,\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tbreakageService ledgerbreakage.Service,\n\tfeatureGate featuregate.Gate,\n) (BillingRegistry, error)", + "line": 130 + }, + { + "kind": "func", + "name": "NewBillingCustomerOverrideService", + "signature": "func NewBillingCustomerOverrideService(billingRegistry BillingRegistry) billing.CustomerOverrideService", + "line": 239 + }, + { + "kind": "func", + "name": "NewBillingRatingService", + "signature": "func NewBillingRatingService() rating.Service", + "line": 243 + }, + { + "kind": "func", + "name": "NewBillingAutoAdvancer", + "signature": "func NewBillingAutoAdvancer(logger *slog.Logger, billingRegistry BillingRegistry) (*billingworkerautoadvance.AutoAdvancer, error)", + "line": 247 + }, + { + "kind": "func", + "name": "NewChargesAutoAdvancer", + "signature": "func NewChargesAutoAdvancer(logger *slog.Logger, billingRegistry BillingRegistry) (*chargesworkeradvance.AutoAdvancer, error)", + "line": 254 + }, + { + "kind": "func", + "name": "NewBillingCollector", + "signature": "func NewBillingCollector(logger *slog.Logger, billingRegistry BillingRegistry, fs config.BillingFeatureSwitchesConfiguration) (*billingworkercollect.InvoiceCollector, error)", + "line": 266 + }, + { + "kind": "func", + "name": "NewBillingSubscriptionReconciler", + "signature": "func NewBillingSubscriptionReconciler(logger *slog.Logger, subsServices SubscriptionServiceWithWorkflow, subscriptionSync subscriptionsync.Service, customerService customer.Service) (*reconciler.Reconciler, error)", + "line": 275 + }, + { + "kind": "func", + "name": "NewBillingSubscriptionSyncAdapter", + "signature": "func NewBillingSubscriptionSyncAdapter(db *entdb.Client) (subscriptionsync.Adapter, error)", + "line": 284 + }, + { + "kind": "func", + "name": "NewBillingSubscriptionSyncService", + "signature": "func NewBillingSubscriptionSyncService(logger *slog.Logger, subsServices SubscriptionServiceWithWorkflow, billingRegistry BillingRegistry, subscriptionSyncAdapter subscriptionsync.Adapter, tracer trace.Tracer, creditsConfig config.CreditsConfiguration, featureGate featuregate.Gate) (subscriptionsync.Service, error)", + "line": 290 + } + ], + "line_count": 304 + }, + "app/common/charges.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "NewChargesMetaAdapter", + "signature": "func NewChargesMetaAdapter(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n) (meta.Adapter, error)", + "line": 45 + }, + { + "kind": "func", + "name": "NewChargesCollectorService", + "signature": "func NewChargesCollectorService(\n\tdb *entdb.Client,\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n) (ledgercollector.Service, error)", + "line": 60 + }, + { + "kind": "func", + "name": "NewLedgerBreakageService", + "signature": "func NewLedgerBreakageService(\n\tcreditsConfig config.CreditsConfiguration,\n\tdb *entdb.Client,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n) (ledgerbreakage.Service, error)", + "line": 84 + }, + { + "kind": "func", + "name": "NewChargesFlatFeeHandler", + "signature": "func NewChargesFlatFeeHandler(\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tcollectorService ledgercollector.Service,\n) flatfee.Handler", + "line": 117 + }, + { + "kind": "func", + "name": "NewChargesCreditPurchaseHandler", + "signature": "func NewChargesCreditPurchaseHandler(\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tbreakageService ledgerbreakage.Service,\n\ttransactionManager transaction.Creator,\n) (creditpurchase.Handler, error)", + "line": 131 + }, + { + "kind": "func", + "name": "NewChargesUsageBasedHandler", + "signature": "func NewChargesUsageBasedHandler(\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tcollectorService ledgercollector.Service,\n) usagebased.Handler", + "line": 147 + }, + { + "kind": "func", + "name": "NewChargesFlatFeeAdapter", + "signature": "func NewChargesFlatFeeAdapter(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n\tmetaAdapter meta.Adapter,\n) (flatfee.Adapter, error)", + "line": 161 + }, + { + "kind": "func", + "name": "NewChargesLineageAdapter", + "signature": "func NewChargesLineageAdapter(\n\tdb *entdb.Client,\n) (lineage.Adapter, error)", + "line": 178 + }, + { + "kind": "func", + "name": "NewChargesLineageService", + "signature": "func NewChargesLineageService(\n\tlineageAdapter lineage.Adapter,\n) (lineage.Service, error)", + "line": 191 + }, + { + "kind": "func", + "name": "NewChargesFlatFeeService", + "signature": "func NewChargesFlatFeeService(\n\tflatFeeAdapter flatfee.Adapter,\n\tflatFeeHandler flatfee.Handler,\n\tlineageService lineage.Service,\n\tmetaAdapter meta.Adapter,\n\tlocker *lockr.Locker,\n\tratingService rating.Service,\n) (flatfee.Service, error)", + "line": 204 + }, + { + "kind": "func", + "name": "NewChargesUsageBasedAdapter", + "signature": "func NewChargesUsageBasedAdapter(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n\tmetaAdapter meta.Adapter,\n) (usagebased.Adapter, error)", + "line": 227 + }, + { + "kind": "func", + "name": "NewChargesUsageBasedService", + "signature": "func NewChargesUsageBasedService(\n\tusageBasedAdapter usagebased.Adapter,\n\tusageBasedHandler usagebased.Handler,\n\tlineageService lineage.Service,\n\tlocker *lockr.Locker,\n\tmetaAdapter meta.Adapter,\n\tbillingService billing.Service,\n\tfeatureService feature.FeatureConnector,\n\tratingService rating.Service,\n\tstreamingConnector streaming.Connector,\n) (usagebased.Service, error)", + "line": 244 + }, + { + "kind": "func", + "name": "NewChargesCreditPurchaseAdapter", + "signature": "func NewChargesCreditPurchaseAdapter(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n\tmetaAdapter meta.Adapter,\n) (creditpurchase.Adapter, error)", + "line": 273 + }, + { + "kind": "func", + "name": "NewChargesCreditPurchaseService", + "signature": "func NewChargesCreditPurchaseService(\n\tcreditPurchaseAdapter creditpurchase.Adapter,\n\tcreditPurchaseHandler creditpurchase.Handler,\n\tlineageService lineage.Service,\n\tmetaAdapter meta.Adapter,\n) (creditpurchase.Service, error)", + "line": 290 + }, + { + "kind": "func", + "name": "NewChargesAdapter", + "signature": "func NewChargesAdapter(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n) (charges.Adapter, error)", + "line": 309 + }, + { + "kind": "func", + "name": "NewChargesService", + "signature": "func NewChargesService(\n\tlogger *slog.Logger,\n\trootAdapter charges.Adapter,\n\tmetaAdapter meta.Adapter,\n\tfeatureService feature.FeatureConnector,\n\tflatFeeSvc flatfee.Service,\n\tcreditPurchaseSvc creditpurchase.Service,\n\tusageBasedSvc usagebased.Service,\n\tbillingService billing.Service,\n\trecognizerService recognizer.Service,\n\ttaxCodeService taxcode.Service,\n\tfsNamespaceLockdown []string,\n) (charges.Service, error)", + "line": 324 + }, + { + "kind": "func", + "name": "NewRecognizerService", + "signature": "func NewRecognizerService(\n\tdb *entdb.Client,\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tlineageService lineage.Service,\n) (recognizer.Service, error)", + "line": 357 + }, + { + "kind": "func", + "name": "newChargesRegistry", + "signature": "func newChargesRegistry(\n\tdb *entdb.Client,\n\tlogger *slog.Logger,\n\tlocker *lockr.Locker,\n\tbillingService billing.Service,\n\tratingService rating.Service,\n\tfeatureService feature.FeatureConnector,\n\tstreamingConnector streaming.Connector,\n\tledgerService ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tbreakageService ledgerbreakage.Service,\n\ttaxCodeService taxcode.Service,\n\tfsNamespaceLockdown []string,\n) (*ChargesRegistry, error)", + "line": 379 + } + ], + "line_count": 533 + }, + "app/common/clickhouse.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewClickHouse", + "signature": "func NewClickHouse(ctx context.Context, conf config.ClickHouseAggregationConfiguration, tracer trace.Tracer, meter metric.Meter, logger *slog.Logger) (clickhouse.Conn, func(), error)", + "line": 21 + } + ], + "line_count": 74 + }, + "app/common/config.go": { + "header": "\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/app/config\"\n)", + "symbols": [], + "line_count": 62 + }, + "app/common/creditgrant.go": { + "header": "\t\"fmt\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/creditgrant\"", + "symbols": [ + { + "kind": "func", + "name": "NewCreditGrantService", + "signature": "func NewCreditGrantService(\n\tbillingRegistry BillingRegistry,\n\tcustomerService customer.Service,\n) (creditgrant.Service, error)", + "line": 17 + } + ], + "line_count": 35 + }, + "app/common/currency.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewCurrencyService", + "signature": "func NewCurrencyService(logger *slog.Logger, db *entdb.Client) (currencies.CurrencyService, error)", + "line": 19 + } + ], + "line_count": 27 + }, + "app/common/customer.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewCustomerService", + "signature": "func NewCustomerService(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\teventPublisher eventbus.Publisher,\n) (customer.Service, error)", + "line": 27 + }, + { + "kind": "func", + "name": "NewCustomerLedgerServiceHook", + "signature": "func NewCustomerLedgerServiceHook(\n\tcreditsConfig config.CreditsConfiguration,\n\ttracer trace.Tracer,\n\taccountResolver customerLedgerProvisioner,\n\tcustomerService customer.Service,\n) (CustomerLedgerHook, error)", + "line": 55 + }, + { + "kind": "func", + "name": "NewCustomerSubjectServiceHook", + "signature": "func NewCustomerSubjectServiceHook(\n\tconfig config.CustomerConfiguration,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n\tsubjectService subject.Service,\n\tcustomerService customer.Service,\n\tcustomerOverrideService billing.CustomerOverrideService,\n) (CustomerSubjectHook, error)", + "line": 78 + }, + { + "kind": "func", + "name": "NewCustomerEntitlementValidatorServiceHook", + "signature": "func NewCustomerEntitlementValidatorServiceHook(\n\tlogger *slog.Logger,\n\tentitlementRegistry *registry.Entitlement,\n\tcustomerService customer.Service,\n) (CustomerEntitlementValidatorHook, error)", + "line": 109 + } + ], + "line_count": 124 + }, + "app/common/customerbalance.go": { + "header": "\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/app/config\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "func", + "name": "NewCustomerBalanceService", + "signature": "func NewCustomerBalanceService(\n\tcreditsConfig config.CreditsConfiguration,\n\thistoricalLedger ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountService ledgeraccount.Service,\n\tbillingRegistry BillingRegistry,\n\tbreakageService ledgerbreakage.Service,\n) (customerbalance.Service, error)", + "line": 18 + }, + { + "kind": "func", + "name": "NewCustomerBalanceFacade", + "signature": "func NewCustomerBalanceFacade(service customerbalance.Service) (*customerbalance.Facade, error)", + "line": 43 + } + ], + "line_count": 45 + }, + "app/common/database.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Migrator", + "signature": "type Migrator struct", + "line": 31 + }, + { + "kind": "func", + "name": "Migrate", + "signature": "func (m Migrator) Migrate(ctx context.Context) error", + "line": 37 + }, + { + "kind": "func", + "name": "NewPostgresDriver", + "signature": "func NewPostgresDriver(\n\tctx context.Context,\n\tconf config.PostgresConfig,\n\tmeterProvider metric.MeterProvider,\n\tmeter metric.Meter,\n\ttracerProvider trace.TracerProvider,\n\tlogger *slog.Logger,\n) (*pgdriver.Driver, func(), error)", + "line": 80 + }, + { + "kind": "func", + "name": "NewDB", + "signature": "func NewDB(driver *pgdriver.Driver) *sql.DB", + "line": 113 + }, + { + "kind": "func", + "name": "NewEntPostgresDriver", + "signature": "func NewEntPostgresDriver(db *sql.DB, logger *slog.Logger) (*entdriver.EntPostgresDriver, func())", + "line": 117 + }, + { + "kind": "func", + "name": "NewEntClient", + "signature": "func NewEntClient(driver *entdriver.EntPostgresDriver) *db.Client", + "line": 129 + } + ], + "line_count": 131 + }, + "app/common/entitlement.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewEntitlementRegistry", + "signature": "func NewEntitlementRegistry(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\ttracer trace.Tracer,\n\tentitlementConfig config.EntitlementsConfiguration,\n\tstreamingConnector streaming.Connector,\n\tmeterService meter.Service,\n\teventPublisher eventbus.Publisher,\n\tlocker *lockr.Locker,\n\tcustomerService customer.Service,\n) (*registry.Entitlement, error)", + "line": 26 + } + ], + "line_count": 58 + }, + "app/common/featuregate.go": { + "header": "\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/pkg/featuregate\"\n)", + "symbols": [], + "line_count": 11 + }, + "app/common/ffx.go": { + "header": "\t\"log/slog\"\n\t\"net/http\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewFFXConfigContextMiddleware", + "signature": "func NewFFXConfigContextMiddleware(\n\tsubsConfig config.SubscriptionConfiguration,\n\tnamespaceDriver namespacedriver.NamespaceDecoder,\n\tlogger *slog.Logger,\n) FFXConfigContextMiddleware", + "line": 24 + } + ], + "line_count": 59 + }, + "app/common/framework.go": { + "header": "var Framework = wire.NewSet(\n\twire.Struct(new(GlobalInitializer), \"*\"),\n\twire.Struct(new(Runner), \"*\"),", + "symbols": [], + "line_count": 8 + }, + "app/common/globals.go": { + "header": "\t\"log/slog\"\n\t\"go.opentelemetry.io/otel\"\n\t\"go.opentelemetry.io/otel/metric\"", + "symbols": [ + { + "kind": "struct", + "name": "GlobalInitializer", + "signature": "type GlobalInitializer struct", + "line": 15 + }, + { + "kind": "func", + "name": "SetGlobals", + "signature": "func (i *GlobalInitializer) SetGlobals()", + "line": 25 + } + ], + "line_count": 30 + }, + "app/common/kafka.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "func", + "name": "NewKafkaProducer", + "signature": "func NewKafkaProducer(conf config.KafkaIngestConfiguration, logger *slog.Logger, meta Metadata) (*kafka.Producer, error)", + "line": 35 + }, + { + "kind": "func", + "name": "NewKafkaMetrics", + "signature": "func NewKafkaMetrics(meter metric.Meter) (*kafkametrics.Metrics, error)", + "line": 49 + }, + { + "kind": "func", + "name": "NewKafkaAdminClient", + "signature": "func NewKafkaAdminClient(conf config.KafkaConfiguration) (*kafka.AdminClient, error)", + "line": 58 + }, + { + "kind": "func", + "name": "NewKafkaTopicProvisioner", + "signature": "func NewKafkaTopicProvisioner(\n\tkafkaConfig config.KafkaConfiguration,\n\tsettings config.TopicProvisionerConfig,\n\tlogger *slog.Logger,\n\tmeter metric.Meter,\n) (pkgkafka.TopicProvisioner, error)", + "line": 76 + }, + { + "kind": "func", + "name": "NewNoopKafkaTopicProvisioner", + "signature": "func NewNoopKafkaTopicProvisioner() pkgkafka.TopicProvisioner", + "line": 108 + }, + { + "kind": "func", + "name": "NewNamespacedTopicResolver", + "signature": "func NewNamespacedTopicResolver(config config.KafkaIngestConfiguration) (*topicresolver.NamespacedTopicResolver, error)", + "line": 112 + }, + { + "kind": "func", + "name": "NewKafkaIngestNamespaceHandler", + "signature": "func NewKafkaIngestNamespaceHandler(\n\ttopicResolver topicresolver.Resolver,\n\ttopicProvisioner pkgkafka.TopicProvisioner,\n\tingestConfig config.KafkaIngestConfiguration,\n) (*kafkaingest.NamespaceHandler, error)", + "line": 121 + }, + { + "kind": "func", + "name": "NewKafkaConsumer", + "signature": "func NewKafkaConsumer(conf pkgkafka.ConsumerConfig, logger *slog.Logger) (*kafka.Consumer, func(), error)", + "line": 136 + } + ], + "line_count": 168 + }, + "app/common/ledger.go": { + "header": "\t\"context\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "interface", + "name": "ledgerReadWriter", + "signature": "type ledgerReadWriter interface", + "line": 25 + }, + { + "kind": "interface", + "name": "customerLedgerProvisioner", + "signature": "type customerLedgerProvisioner interface", + "line": 30 + }, + { + "kind": "func", + "name": "NewLedgerRoutingValidator", + "signature": "func NewLedgerRoutingValidator() ledger.RoutingValidator", + "line": 53 + }, + { + "kind": "func", + "name": "NewLedgerAccountRepo", + "signature": "func NewLedgerAccountRepo(db *entdb.Client) ledgeraccount.Repo", + "line": 57 + }, + { + "kind": "func", + "name": "NewLedgerHistoricalRepo", + "signature": "func NewLedgerHistoricalRepo(db *entdb.Client) historical.Repo", + "line": 61 + }, + { + "kind": "func", + "name": "NewLedgerResolversRepo", + "signature": "func NewLedgerResolversRepo(db *entdb.Client) resolvers.CustomerAccountRepo", + "line": 65 + }, + { + "kind": "func", + "name": "NewLedgerAccountService", + "signature": "func NewLedgerAccountService(\n\tcreditsConfig config.CreditsConfiguration,\n\trepo ledgeraccount.Repo,\n\tlocker *lockr.Locker,\n) ledgeraccount.Service", + "line": 69 + }, + { + "kind": "func", + "name": "NewLedgerHistoricalLedger", + "signature": "func NewLedgerHistoricalLedger(\n\tcreditsConfig config.CreditsConfiguration,\n\trepo historical.Repo,\n\taccountCatalog ledger.AccountCatalog,\n\taccountLocker ledger.AccountLocker,\n\troutingValidator ledger.RoutingValidator,\n) ledgerReadWriter", + "line": 81 + }, + { + "kind": "func", + "name": "NewLedgerBalanceQuerier", + "signature": "func NewLedgerBalanceQuerier(historicalLedger ledgerReadWriter) ledger.BalanceQuerier", + "line": 95 + }, + { + "kind": "func", + "name": "NewLedgerAccountCatalog", + "signature": "func NewLedgerAccountCatalog(accountSvc ledgeraccount.Service) ledger.AccountCatalog", + "line": 99 + }, + { + "kind": "func", + "name": "NewLedgerAccountLocker", + "signature": "func NewLedgerAccountLocker(accountSvc ledgeraccount.Service) ledger.AccountLocker", + "line": 103 + }, + { + "kind": "func", + "name": "NewLedgerResolversService", + "signature": "func NewLedgerResolversService(\n\tcreditsConfig config.CreditsConfiguration,\n\taccountSvc ledgeraccount.Service,\n\trepo resolvers.CustomerAccountRepo,\n\tlocker *lockr.Locker,\n) customerLedgerProvisioner", + "line": 107 + }, + { + "kind": "func", + "name": "NewLedgerAccountResolver", + "signature": "func NewLedgerAccountResolver(accountResolver customerLedgerProvisioner) ledger.AccountResolver", + "line": 124 + }, + { + "kind": "func", + "name": "NewLedgerService", + "signature": "func NewLedgerService(historicalLedger ledgerReadWriter) ledger.Ledger", + "line": 128 + }, + { + "kind": "func", + "name": "NewLedgerNamespaceHandler", + "signature": "func NewLedgerNamespaceHandler(accountResolver ledger.AccountResolver) namespace.Handler", + "line": 132 + } + ], + "line_count": 138 + }, + "app/common/ledger_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestLedgerNamespaceHandlerIsSafeForRepeatedCreateNamespaceCalls", + "signature": "func TestLedgerNamespaceHandlerIsSafeForRepeatedCreateNamespaceCalls(t *testing.T)", + "line": 17 + } + ], + "line_count": 58 + }, + "app/common/llmcost.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewLLMCostService", + "signature": "func NewLLMCostService(logger *slog.Logger, db *entdb.Client) (llmcost.Service, error)", + "line": 22 + }, + { + "kind": "func", + "name": "NewLLMCostSyncJob", + "signature": "func NewLLMCostSyncJob(logger *slog.Logger, db *entdb.Client) (*llmcostsync.SyncJob, error)", + "line": 34 + } + ], + "line_count": 48 + }, + "app/common/locker.go": { + "header": "\t\"log/slog\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/lockr\"", + "symbols": [ + { + "kind": "func", + "name": "NewLocker", + "signature": "func NewLocker(\n\tlogger *slog.Logger,\n) (*lockr.Locker, error)", + "line": 15 + } + ], + "line_count": 21 + }, + "app/common/metadata.go": { + "header": "\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "struct", + "name": "Metadata", + "signature": "type Metadata struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewMetadata", + "signature": "func NewMetadata(conf config.Configuration, version string, serviceName string, additionalAttributes ...attribute.KeyValue) Metadata", + "line": 21 + } + ], + "line_count": 29 + }, + "app/common/meter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewMeterService", + "signature": "func NewMeterService(\n\tmeterAdapter *adapter.Adapter,\n) meter.Service", + "line": 45 + }, + { + "kind": "func", + "name": "NewReservedEventTypePatterns", + "signature": "func NewReservedEventTypePatterns(reserved []config.ReservedEventTypePattern) ([]*meter.EventTypePattern, error)", + "line": 51 + }, + { + "kind": "func", + "name": "NewMeterManageService", + "signature": "func NewMeterManageService(\n\tmeterAdapter *adapter.Adapter,\n\tnamespaceManager *namespace.Manager,\n\tpublisher eventbus.Publisher,\n\treservedEventTypes []*meter.EventTypePattern,\n) meter.ManageService", + "line": 70 + }, + { + "kind": "func", + "name": "NewMeterAdapter", + "signature": "func NewMeterAdapter(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n) (*adapter.Adapter, error)", + "line": 84 + }, + { + "kind": "func", + "name": "NewMeterConfigInitializer", + "signature": "func NewMeterConfigInitializer(\n\tlogger *slog.Logger,\n\tconfigMeters []*meter.Meter,\n\tmeterManagerService meter.ManageService,\n\tnamespaceManager *namespace.Manager,\n) MeterConfigInitializer", + "line": 94 + }, + { + "kind": "func", + "name": "createConfigMetersInDatabase", + "signature": "func createConfigMetersInDatabase(\n\tctx context.Context,\n\tlogger *slog.Logger,\n\tconfigMeters []*meter.Meter,\n\tnamespaceManager *namespace.Manager,\n\tmeterService meter.ManageService,\n) error", + "line": 114 + } + ], + "line_count": 172 + }, + "app/common/meterevent.go": { + "header": "\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "NewMeterEventService", + "signature": "func NewMeterEventService(\n\tstreamingConnector streaming.Connector,\n\tcustomerService customer.Service,\n\tmeterService meter.Service,\n) meterevent.Service", + "line": 17 + } + ], + "line_count": 23 + }, + "app/common/namespace.go": { + "header": "\t\"fmt\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "NewNamespaceManager", + "signature": "func NewNamespaceManager(\n\tconf config.NamespaceConfiguration,\n) (*namespace.Manager, error)", + "line": 17 + }, + { + "kind": "func", + "name": "NewStaticNamespaceDecoder", + "signature": "func NewStaticNamespaceDecoder(\n\tconf config.NamespaceConfiguration,\n) namespacedriver.NamespaceDecoder", + "line": 35 + } + ], + "line_count": 39 + }, + "app/common/notification.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"math/rand/v2\"", + "symbols": [ + { + "kind": "func", + "name": "NewNotificationAdapter", + "signature": "func NewNotificationAdapter(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n) (notification.Repository, error)", + "line": 41 + }, + { + "kind": "func", + "name": "NewNotificationEventHandler", + "signature": "func NewNotificationEventHandler(\n\tconfig config.NotificationConfiguration,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n\tadapter notification.Repository,\n\twebhook notificationwebhook.Handler,\n\tdriver *pgdriver.Driver,\n) (notification.EventHandler, error)", + "line": 56 + }, + { + "kind": "func", + "name": "NewNotificationService", + "signature": "func NewNotificationService(\n\tlogger *slog.Logger,\n\tadapter notification.Repository,\n\twebhook notificationwebhook.Handler,\n\tfeatureConnector feature.FeatureConnector,\n) (notification.Service, error)", + "line": 94 + }, + { + "kind": "func", + "name": "NewNoopNotificationWebhookHandler", + "signature": "func NewNoopNotificationWebhookHandler(\n\tlogger *slog.Logger,\n) (notificationwebhook.Handler, error)", + "line": 113 + }, + { + "kind": "func", + "name": "NewNotificationWebhookHandler", + "signature": "func NewNotificationWebhookHandler(\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n\twebhookConfig config.WebhookConfiguration,\n\tsvixClient *svix.Svix,\n) (notificationwebhook.Handler, error)", + "line": 119 + } + ], + "line_count": 144 + }, + "app/common/openmeter_balanceworker.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "BalanceWorkerEntitlementRepo", + "signature": "type BalanceWorkerEntitlementRepo interface", + "line": 43 + }, + { + "kind": "func", + "name": "NewBalanceWorkerEntitlementRepo", + "signature": "func NewBalanceWorkerEntitlementRepo(db *db.Client) BalanceWorkerEntitlementRepo", + "line": 48 + }, + { + "kind": "func", + "name": "BalanceWorkerProvisionTopics", + "signature": "func BalanceWorkerProvisionTopics(conf config.BalanceWorkerConfiguration, eventsConfig config.EventsConfiguration) []pkgkafka.TopicConfig", + "line": 52 + }, + { + "kind": "func", + "name": "BalanceWorkerSubscriber", + "signature": "func BalanceWorkerSubscriber(conf config.BalanceWorkerConfiguration, brokerOptions watermillkafka.BrokerOptions) (message.Subscriber, error)", + "line": 74 + }, + { + "kind": "func", + "name": "NewBalanceWorkerOptions", + "signature": "func NewBalanceWorkerOptions(\n\teventConfig config.EventsConfiguration,\n\trouterOptions router.Options,\n\teventBus eventbus.Publisher,\n\tentitlements *registry.Entitlement,\n\trepo balanceworker.BalanceWorkerRepository,\n\tnotificationService notification.Service,\n\tsubjectService subject.Service,\n\tcustomerService customer.Service,\n\tlogger *slog.Logger,\n\tbalanceWorkerConfiguration config.BalanceWorkerConfiguration,\n) balanceworker.WorkerOptions", + "line": 86 + }, + { + "kind": "func", + "name": "NewBalanceWorker", + "signature": "func NewBalanceWorker(workerOptions balanceworker.WorkerOptions) (*balanceworker.Worker, error)", + "line": 115 + }, + { + "kind": "func", + "name": "BalanceWorkerGroup", + "signature": "func BalanceWorkerGroup(\n\tctx context.Context,\n\tworker *balanceworker.Worker,\n\ttelemetryServer TelemetryServer,\n) run.Group", + "line": 124 + } + ], + "line_count": 144 + }, + "app/common/openmeter_billingworker.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "BillingWorkerProvisionTopics", + "signature": "func BillingWorkerProvisionTopics(conf config.BillingConfiguration) []pkgkafka.TopicConfig", + "line": 46 + }, + { + "kind": "func", + "name": "BillingWorkerSubscriber", + "signature": "func BillingWorkerSubscriber(conf config.BillingConfiguration, brokerOptions watermillkafka.BrokerOptions) (message.Subscriber, error)", + "line": 61 + }, + { + "kind": "func", + "name": "NewBillingWorkerOptions", + "signature": "func NewBillingWorkerOptions(\n\teventConfig config.EventsConfiguration,\n\trouterOptions router.Options,\n\teventBus eventbus.Publisher,\n\tbillingRegistry BillingRegistry,\n\tsubscriptionServices SubscriptionServiceWithWorkflow,\n\tsubscriptionSyncService subscriptionsync.Service,\n\tbillingFsConfig config.BillingFeatureSwitchesConfiguration,\n\tlogger *slog.Logger,\n) billingworker.WorkerOptions", + "line": 73 + }, + { + "kind": "func", + "name": "NewBillingWorker", + "signature": "func NewBillingWorker(workerOptions billingworker.WorkerOptions) (*billingworker.Worker, error)", + "line": 99 + }, + { + "kind": "func", + "name": "BillingWorkerGroup", + "signature": "func BillingWorkerGroup(\n\tctx context.Context,\n\tworker *billingworker.Worker,\n\ttelemetryServer TelemetryServer,\n) run.Group", + "line": 108 + } + ], + "line_count": 128 + }, + "app/common/openmeter_notification.go": { + "header": "\t\"github.com/openmeterio/openmeter/app/config\"\n\tpkgkafka \"github.com/openmeterio/openmeter/pkg/kafka\"\n)", + "symbols": [ + { + "kind": "func", + "name": "NotificationServiceProvisionTopics", + "signature": "func NotificationServiceProvisionTopics(conf config.NotificationConfiguration) []pkgkafka.TopicConfig", + "line": 8 + } + ], + "line_count": 20 + }, + "app/common/openmeter_server.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewKafkaIngestCollector", + "signature": "func NewKafkaIngestCollector(\n\tconfig config.KafkaIngestConfiguration,\n\tproducer *kafka.Producer,\n\ttopicResolver topicresolver.Resolver,\n\ttopicProvisioner pkgkafka.TopicProvisioner,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n) (*kafkaingest.Collector, error)", + "line": 23 + }, + { + "kind": "func", + "name": "NewIngestCollector", + "signature": "func NewIngestCollector(\n\tdedupeConfig config.DedupeConfiguration,\n\tkafkaCollector *kafkaingest.Collector,\n\tlogger *slog.Logger,\n\tmeter metric.Meter,\n\ttracer trace.Tracer,\n) (ingest.Collector, func(), error)", + "line": 47 + }, + { + "kind": "func", + "name": "NewServerPublisher", + "signature": "func NewServerPublisher(\n\tctx context.Context,\n\toptions watermillkafka.PublisherOptions,\n\tlogger *slog.Logger,\n) (message.Publisher, func(), error)", + "line": 86 + }, + { + "kind": "func", + "name": "ServerProvisionTopics", + "signature": "func ServerProvisionTopics(conf config.EventsConfiguration) []pkgkafka.TopicConfig", + "line": 94 + }, + { + "kind": "func", + "name": "NewIngestService", + "signature": "func NewIngestService(\n\tcollector ingest.Collector,\n\tlogger *slog.Logger,\n) (ingest.Service, error)", + "line": 107 + } + ], + "line_count": 115 + }, + "app/common/openmeter_sinkworker.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewSinkWorkerPublisher", + "signature": "func NewSinkWorkerPublisher(\n\tctx context.Context,\n\toptions watermillkafka.PublisherOptions,\n\tlogger *slog.Logger,\n) (message.Publisher, func(), error)", + "line": 39 + }, + { + "kind": "func", + "name": "NewIngestNotificationHandler", + "signature": "func NewIngestNotificationHandler(\n\tsinkConfig config.SinkConfiguration,\n\teventPublisher eventbus.Publisher,\n\tmeter metric.Meter,\n\tlogger *slog.Logger,\n) (IngestNotificationHandler, error)", + "line": 51 + }, + { + "kind": "func", + "name": "NewFlushHandlers", + "signature": "func NewFlushHandlers(\n\tingest IngestNotificationHandler,\n) []flushhandler.FlushEventHandler", + "line": 67 + }, + { + "kind": "func", + "name": "NewFlushHandlerManager", + "signature": "func NewFlushHandlerManager(\n\tsinkConfig config.SinkConfiguration,\n\tmessagePublisher message.Publisher,\n\tlogger *slog.Logger,\n\thandlers []flushhandler.FlushEventHandler,\n) (flushhandler.FlushEventHandler, func(), error)", + "line": 73 + }, + { + "kind": "func", + "name": "SinkWorkerProvisionTopics", + "signature": "func SinkWorkerProvisionTopics(conf config.EventsConfiguration) []pkgkafka.TopicConfig", + "line": 113 + }, + { + "kind": "func", + "name": "NewSinkStorage", + "signature": "func NewSinkStorage(\n\tstreaming streaming.Connector,\n) (sink.Storage, error)", + "line": 122 + }, + { + "kind": "func", + "name": "NewSinkDeduplicator", + "signature": "func NewSinkDeduplicator(conf config.SinkConfiguration, logger *slog.Logger) (dedupe.Deduplicator, func(), error)", + "line": 130 + }, + { + "kind": "func", + "name": "NewSinkKafkaConsumer", + "signature": "func NewSinkKafkaConsumer(conf config.SinkConfiguration, logger *slog.Logger) (*kafka.Consumer, func(), error)", + "line": 154 + }, + { + "kind": "func", + "name": "NewSink", + "signature": "func NewSink(\n\tconf config.SinkConfiguration,\n\tlogger *slog.Logger,\n\tmetricMeter metric.Meter,\n\ttracer trace.Tracer,\n\tkafkaConsumer *SinkKafkaConsumer,\n\tsinkStorage sink.Storage,\n\tdeduplicator dedupe.Deduplicator,\n\tmeterService meter.Service,\n\ttopicResolver topicresolver.Resolver,\n\tflushHandler flushhandler.FlushEventHandler,\n) (*sink.Sink, func(), error)", + "line": 168 + } + ], + "line_count": 212 + }, + "app/common/portal.go": { + "header": "\t\"fmt\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "NewPortalService", + "signature": "func NewPortalService(conf config.PortalConfiguration) (portal.Service, error)", + "line": 17 + } + ], + "line_count": 31 + }, + "app/common/productcatalog.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewFeatureConnector", + "signature": "func NewFeatureConnector(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tmeterService meter.Service,\n\tpublisher eventbus.Publisher,\n) feature.FeatureConnector", + "line": 62 + }, + { + "kind": "func", + "name": "NewCostService", + "signature": "func NewCostService(\n\tfeatureConnector feature.FeatureConnector,\n\tmeterService meter.Service,\n\tstreamingConnector streaming.Connector,\n\tllmcostService llmcost.Service,\n) (cost.Service, error)", + "line": 74 + }, + { + "kind": "func", + "name": "NewPlanService", + "signature": "func NewPlanService(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tfeatureResolver productcatalog.FeatureResolver,\n\ttaxCodeService taxcode.Service,\n\tpublisher eventbus.Publisher,\n) (plan.Service, error)", + "line": 87 + }, + { + "kind": "func", + "name": "NewAddonService", + "signature": "func NewAddonService(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tfeatureResolver productcatalog.FeatureResolver,\n\ttaxCodeService taxcode.Service,\n\tpublisher eventbus.Publisher,\n) (addon.Service, error)", + "line": 111 + }, + { + "kind": "func", + "name": "NewPlanAddonService", + "signature": "func NewPlanAddonService(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tplanService plan.Service,\n\taddonService addon.Service,\n\tpublisher eventbus.Publisher,\n) (planaddon.Service, error)", + "line": 135 + } + ], + "line_count": 157 + }, + "app/common/progressmanager.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewProgressManager", + "signature": "func NewProgressManager(logger *slog.Logger, conf config.ProgressManagerConfiguration) (progressmanager.Service, error)", + "line": 19 + } + ], + "line_count": 40 + }, + "app/common/runner.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "Runner", + "signature": "type Runner struct", + "line": 12 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (r Runner) Run()", + "line": 17 + } + ], + "line_count": 24 + }, + "app/common/secret.go": { + "header": "\t\"log/slog\"\n\t\"github.com/google/wire\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "NewUnsafeSecretService", + "signature": "func NewUnsafeSecretService(logger *slog.Logger, db *entdb.Client) (*secretservice.Service, error)", + "line": 20 + } + ], + "line_count": 26 + }, + "app/common/server.go": { + "header": "\t\"net/http\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/openmeter/server\"", + "symbols": [ + { + "kind": "func", + "name": "NewRouterHooks", + "signature": "func NewRouterHooks(\n\ttelemetry TelemetryMiddlewareHook,\n) *server.RouterHooks", + "line": 18 + }, + { + "kind": "func", + "name": "NewPostAuthMiddlewares", + "signature": "func NewPostAuthMiddlewares(\n\tffx FFXConfigContextMiddleware,\n) server.PostAuthMiddlewares", + "line": 28 + } + ], + "line_count": 36 + }, + "app/common/streaming.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewStreamingConnector", + "signature": "func NewStreamingConnector(\n\tctx context.Context,\n\tconf config.AggregationConfiguration,\n\tclickHouse clickhouse.Conn,\n\tlogger *slog.Logger,\n\tprogressmanager progressmanager.Service,\n\tnamespaceManager *namespace.Manager,\n) (streaming.Connector, error)", + "line": 23 + } + ], + "line_count": 70 + }, + "app/common/subject.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewSubjectService", + "signature": "func NewSubjectService(\n\tadapter subject.Adapter,\n) (subject.Service, error)", + "line": 23 + }, + { + "kind": "func", + "name": "NewSubjectAdapter", + "signature": "func NewSubjectAdapter(\n\tdb *entdb.Client,\n) (subject.Adapter, error)", + "line": 29 + }, + { + "kind": "func", + "name": "NewSubjectCustomerHook", + "signature": "func NewSubjectCustomerHook(\n\tsubject subject.Service,\n\tcustomer customer.Service,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n) (subjecthooks.CustomerSubjectHook, error)", + "line": 35 + } + ], + "line_count": 53 + }, + "app/common/subscription.go": { + "header": "\t\"log/slog\"\n\t\"github.com/google/wire\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionServiceWithWorkflow", + "signature": "type SubscriptionServiceWithWorkflow struct", + "line": 39 + }, + { + "kind": "func", + "name": "NewSubscriptionServices", + "signature": "func NewSubscriptionServices(\n\tlogger *slog.Logger,\n\tdb *entdb.Client,\n\tfeatureConnector feature.FeatureConnector,\n\tentitlementRegistry *registry.Entitlement,\n\tcustomerService customer.Service,\n\tplanService plan.Service,\n\tplanAddonService planaddon.Service,\n\taddonService addon.Service,\n\teventPublisher eventbus.Publisher,\n\tlockr *lockr.Locker,\n\tfeatureFlags ffx.Service,\n\ttaxCodeService taxcode.Service,\n) (SubscriptionServiceWithWorkflow, error)", + "line": 46 + } + ], + "line_count": 144 + }, + "app/common/svix.go": { + "header": "\t\"crypto/tls\"\n\t\"net/http\"\n\t\"net/url\"", + "symbols": [ + { + "kind": "func", + "name": "NewSvixAPIClient", + "signature": "func NewSvixAPIClient(\n\tconfig config.SvixConfig,\n\tmeterProvider metric.MeterProvider,\n\ttracerProvider trace.TracerProvider,\n) (*svix.Svix, error)", + "line": 17 + } + ], + "line_count": 58 + }, + "app/common/taxcode.go": { + "header": "\t\"log/slog\"\n\t\"strings\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "func", + "name": "NewTaxCodeAdapter", + "signature": "func NewTaxCodeAdapter(logger *slog.Logger, db *entdb.Client) (taxcode.Repository, error)", + "line": 28 + }, + { + "kind": "func", + "name": "NewTaxCodeService", + "signature": "func NewTaxCodeService(\n\tlogger *slog.Logger,\n\tadapter taxcode.Repository,\n) (taxcode.Service, error)", + "line": 35 + }, + { + "kind": "func", + "name": "NewTaxCodeNamespaceHandler", + "signature": "func NewTaxCodeNamespaceHandler(\n\tlogger *slog.Logger,\n\tservice taxcode.Service,\n\trepository taxcode.Repository,\n\tcfg config.TaxCodeConfiguration,\n) (*taxcode.NamespaceHandler, error)", + "line": 45 + } + ], + "line_count": 73 + }, + "app/common/telemetry.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 86 + }, + { + "kind": "func", + "name": "NewTelemetryResource", + "signature": "func NewTelemetryResource(metadata Metadata) *resource.Resource", + "line": 94 + }, + { + "kind": "func", + "name": "NewLoggerProvider", + "signature": "func NewLoggerProvider(ctx context.Context, conf config.LogTelemetryConfig, res *resource.Resource) (*sdklog.LoggerProvider, func(), error)", + "line": 114 + }, + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(conf config.LogTelemetryConfig, res *resource.Resource, loggerProvider log.LoggerProvider, metadata Metadata, additionalMiddlewares []slogmulti.Middleware) *slog.Logger", + "line": 138 + }, + { + "kind": "func", + "name": "TelemetryLoggerNoAdditionalMiddlewares", + "signature": "func TelemetryLoggerNoAdditionalMiddlewares() []slogmulti.Middleware", + "line": 172 + }, + { + "kind": "func", + "name": "NewMeterProvider", + "signature": "func NewMeterProvider(ctx context.Context, conf config.MetricsTelemetryConfig, res *resource.Resource, logger *slog.Logger) (*sdkmetric.MeterProvider, func(), error)", + "line": 176 + }, + { + "kind": "func", + "name": "NewMeter", + "signature": "func NewMeter(meterProvider metric.MeterProvider, metadata Metadata) metric.Meter", + "line": 194 + }, + { + "kind": "func", + "name": "NewTracerProvider", + "signature": "func NewTracerProvider(ctx context.Context, conf config.TraceTelemetryConfig, res *resource.Resource, logger *slog.Logger) (*sdktrace.TracerProvider, func(), error)", + "line": 198 + }, + { + "kind": "func", + "name": "NewTracer", + "signature": "func NewTracer(tracerProvider trace.TracerProvider, metadata Metadata) trace.Tracer", + "line": 219 + }, + { + "kind": "func", + "name": "NewDefaultTextMapPropagator", + "signature": "func NewDefaultTextMapPropagator() propagation.TextMapPropagator", + "line": 223 + }, + { + "kind": "func", + "name": "NewHealthChecker", + "signature": "func NewHealthChecker(logger *slog.Logger) health.Health", + "line": 227 + }, + { + "kind": "func", + "name": "NewTelemetryHandler", + "signature": "func NewTelemetryHandler(\n\tmetricsConf config.MetricsTelemetryConfig,\n\thealthChecker health.Health,\n\tlogger *slog.Logger,\n) TelemetryHandler", + "line": 233 + }, + { + "kind": "func", + "name": "NewTelemetryServer", + "signature": "func NewTelemetryServer(conf config.TelemetryConfig, handler TelemetryHandler) (TelemetryServer, func())", + "line": 267 + }, + { + "kind": "func", + "name": "NewTelemetryRouterHook", + "signature": "func NewTelemetryRouterHook(meterProvider metric.MeterProvider, tracerProvider trace.TracerProvider) TelemetryMiddlewareHook", + "line": 279 + }, + { + "kind": "func", + "name": "lowCardinalityPath", + "signature": "func lowCardinalityPath(path string) string", + "line": 357 + }, + { + "kind": "func", + "name": "isHighCardinalitySegment", + "signature": "func isHighCardinalitySegment(seg string) bool", + "line": 381 + }, + { + "kind": "func", + "name": "isAllDigits", + "signature": "func isAllDigits(s string) bool", + "line": 397 + }, + { + "kind": "struct", + "name": "RuntimeMetricsCollector", + "signature": "type RuntimeMetricsCollector struct", + "line": 409 + }, + { + "kind": "func", + "name": "NewRuntimeMetricsCollector", + "signature": "func NewRuntimeMetricsCollector(\n\tmeterProvider metric.MeterProvider,\n\tlogger *slog.Logger,\n) (RuntimeMetricsCollector, error)", + "line": 411 + }, + { + "kind": "func", + "name": "NewLevelHandler", + "signature": "func NewLevelHandler(handler slog.Handler, level slog.Leveler) *LevelHandler", + "line": 431 + }, + { + "kind": "struct", + "name": "LevelHandler", + "signature": "type LevelHandler struct", + "line": 439 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (h *LevelHandler) Enabled(ctx context.Context, level slog.Level) bool", + "line": 444 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (h *LevelHandler) WithGroup(name string) slog.Handler", + "line": 449 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (h *LevelHandler) WithAttrs(attrs []slog.Attr) slog.Handler", + "line": 453 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *LevelHandler) Handle(ctx context.Context, record slog.Record) error", + "line": 457 + } + ], + "line_count": 459 + }, + "app/common/telemetry_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "TestLowCardinalityPath", + "signature": "func TestLowCardinalityPath(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestLowCardinalityPath_TruncatesDeepPaths", + "signature": "func TestLowCardinalityPath_TruncatesDeepPaths(t *testing.T)", + "line": 58 + }, + { + "kind": "func", + "name": "TestLevelHandler", + "signature": "func TestLevelHandler(t *testing.T)", + "line": 67 + }, + { + "kind": "func", + "name": "TestLevelHandlerWith", + "signature": "func TestLevelHandlerWith(t *testing.T)", + "line": 83 + }, + { + "kind": "struct", + "name": "MockHandler", + "signature": "type MockHandler struct", + "line": 101 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (h *MockHandler) Enabled(ctx context.Context, level slog.Level) bool", + "line": 105 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (h *MockHandler) WithGroup(name string) slog.Handler", + "line": 110 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (h *MockHandler) WithAttrs(attrs []slog.Attr) slog.Handler", + "line": 114 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *MockHandler) Handle(ctx context.Context, record slog.Record) error", + "line": 118 + } + ], + "line_count": 120 + }, + "app/common/termination.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "status", + "signature": "type status struct", + "line": 24 + }, + { + "kind": "struct", + "name": "TerminationChecker", + "signature": "type TerminationChecker struct", + "line": 32 + }, + { + "kind": "func", + "name": "setDetails", + "signature": "func (s *TerminationChecker) setDetails(state TerminationState, reason error)", + "line": 40 + }, + { + "kind": "func", + "name": "Terminate", + "signature": "func (s *TerminationChecker) Terminate(reason error)", + "line": 49 + }, + { + "kind": "func", + "name": "IsRunning", + "signature": "func (s *TerminationChecker) IsRunning() bool", + "line": 53 + }, + { + "kind": "func", + "name": "IsTerminating", + "signature": "func (s *TerminationChecker) IsTerminating() bool", + "line": 60 + }, + { + "kind": "func", + "name": "Name", + "signature": "func (s *TerminationChecker) Name() string", + "line": 67 + }, + { + "kind": "func", + "name": "Execute", + "signature": "func (s *TerminationChecker) Execute(_ context.Context) (interface", + "line": 71 + }, + { + "kind": "func", + "name": "WaitForPropagation", + "signature": "func (s *TerminationChecker) WaitForPropagation(ctx context.Context) error", + "line": 90 + }, + { + "kind": "func", + "name": "NewTerminationChecker", + "signature": "func NewTerminationChecker(conf config.TerminationConfig, healthChecker health.Health) (*TerminationChecker, error)", + "line": 117 + }, + { + "kind": "func", + "name": "NewTerminationCheckerActor", + "signature": "func NewTerminationCheckerActor(r *TerminationChecker, logger *slog.Logger) (execute func() error, interrupt func(error), err error)", + "line": 139 + } + ], + "line_count": 173 + }, + "app/common/watermill.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "NewBrokerConfiguration", + "signature": "func NewBrokerConfiguration(\n\tkafkaConfig config.KafkaConfiguration,\n\tappMetadata Metadata,\n\tlogger *slog.Logger,\n\tmeter metric.Meter,\n) watermillkafka.BrokerOptions", + "line": 43 + }, + { + "kind": "func", + "name": "NewPublisher", + "signature": "func NewPublisher(\n\tctx context.Context,\n\toptions watermillkafka.PublisherOptions,\n\tlogger *slog.Logger,\n) (message.Publisher, func(), error)", + "line": 58 + }, + { + "kind": "func", + "name": "NewEventBusPublisher", + "signature": "func NewEventBusPublisher(\n\tpublisher message.Publisher,\n\tconf config.EventsConfiguration,\n\tlogger *slog.Logger,\n) (eventbus.Publisher, error)", + "line": 78 + }, + { + "kind": "func", + "name": "NewEmptyProvisionTopics", + "signature": "func NewEmptyProvisionTopics() []pkgkafka.TopicConfig", + "line": 96 + } + ], + "line_count": 98 + }, + "app/config/aggregation.go": { + "header": "\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AggregationConfiguration", + "signature": "type AggregationConfiguration struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c AggregationConfiguration) Validate() error", + "line": 47 + }, + { + "kind": "struct", + "name": "ClickHouseAggregationConfiguration", + "signature": "type ClickHouseAggregationConfiguration struct", + "line": 64 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ClickHouseAggregationConfiguration) Validate() error", + "line": 85 + }, + { + "kind": "func", + "name": "GetClientOptions", + "signature": "func (c ClickHouseAggregationConfiguration) GetClientOptions() *clickhouse.Options", + "line": 123 + }, + { + "kind": "struct", + "name": "ClickhouseQueryRetryConfig", + "signature": "type ClickhouseQueryRetryConfig struct", + "line": 149 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ClickhouseQueryRetryConfig) Validate() error", + "line": 156 + }, + { + "kind": "struct", + "name": "ClickhousePoolMetricsConfig", + "signature": "type ClickhousePoolMetricsConfig struct", + "line": 178 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ClickhousePoolMetricsConfig) Validate() error", + "line": 183 + }, + { + "kind": "func", + "name": "ConfigureAggregation", + "signature": "func ConfigureAggregation(v *viper.Viper)", + "line": 198 + } + ], + "line_count": 228 + }, + "app/config/apps.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/pflag\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "AppsConfiguration", + "signature": "type AppsConfiguration struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c AppsConfiguration) Validate() error", + "line": 17 + }, + { + "kind": "struct", + "name": "AppStripeConfiguration", + "signature": "type AppStripeConfiguration struct", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c AppStripeConfiguration) Validate() error", + "line": 36 + }, + { + "kind": "func", + "name": "ConfigureApps", + "signature": "func ConfigureApps(v *viper.Viper, flags *pflag.FlagSet)", + "line": 40 + } + ], + "line_count": 48 + }, + "app/config/balanceworker.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/openmeterio/openmeter/pkg/errorsx\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceWorkerConfiguration", + "signature": "type BalanceWorkerConfiguration struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BalanceWorkerConfiguration) Validate() error", + "line": 16 + }, + { + "kind": "struct", + "name": "rawBalanceWorkerStateStorageConfiguration", + "signature": "type rawBalanceWorkerStateStorageConfiguration struct", + "line": 37 + }, + { + "kind": "struct", + "name": "BalanceWorkerStateStorageConfiguration", + "signature": "type BalanceWorkerStateStorageConfiguration struct", + "line": 42 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BalanceWorkerStateStorageConfiguration) Validate() error", + "line": 46 + }, + { + "kind": "struct", + "name": "BalanceWorkerHighWatermarkCacheConfiguration", + "signature": "type BalanceWorkerHighWatermarkCacheConfiguration struct", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BalanceWorkerHighWatermarkCacheConfiguration) Validate() error", + "line": 60 + }, + { + "kind": "func", + "name": "ConfigureBalanceWorker", + "signature": "func ConfigureBalanceWorker(v *viper.Viper)", + "line": 68 + } + ], + "line_count": 74 + }, + "app/config/billing.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/pflag\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingConfiguration", + "signature": "type BillingConfiguration struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BillingConfiguration) Validate() error", + "line": 19 + }, + { + "kind": "struct", + "name": "BillingFeatureSwitchesConfiguration", + "signature": "type BillingFeatureSwitchesConfiguration struct", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BillingFeatureSwitchesConfiguration) Validate() error", + "line": 40 + }, + { + "kind": "func", + "name": "ConfigureBilling", + "signature": "func ConfigureBilling(v *viper.Viper, flags *pflag.FlagSet)", + "line": 44 + } + ], + "line_count": 53 + }, + "app/config/billingworker.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/viper\"\n\t\"github.com/openmeterio/openmeter/pkg/errorsx\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkerConfiguration", + "signature": "type BillingWorkerConfiguration struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c BillingWorkerConfiguration) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "ConfigureBillingWorker", + "signature": "func ConfigureBillingWorker(v *viper.Viper)", + "line": 25 + } + ], + "line_count": 30 + }, + "app/config/config.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"", + "symbols": [ + { + "kind": "struct", + "name": "Configuration", + "signature": "type Configuration struct", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Configuration) Validate() error", + "line": 58 + }, + { + "kind": "func", + "name": "SetViperDefaults", + "signature": "func SetViperDefaults(v *viper.Viper, flags *pflag.FlagSet)", + "line": 183 + } + ], + "line_count": 232 + }, + "app/config/config_test.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"os\"", + "symbols": [ + { + "kind": "func", + "name": "TestComplete", + "signature": "func TestComplete(t *testing.T)", + "line": 27 + } + ], + "line_count": 474 + }, + "app/config/credits.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/viper\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "CreditsConfiguration", + "signature": "type CreditsConfiguration struct", + "line": 9 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreditsConfiguration) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "ConfigureCredits", + "signature": "func ConfigureCredits(v *viper.Viper, prefixes ...string)", + "line": 23 + } + ], + "line_count": 29 + }, + "app/config/customer.go": { + "header": "\t\"github.com/spf13/viper\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "CustomerConfiguration", + "signature": "type CustomerConfiguration struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerConfiguration) Validate() error", + "line": 16 + }, + { + "kind": "func", + "name": "ConfigureCustomer", + "signature": "func ConfigureCustomer(v *viper.Viper, prefixes ...string)", + "line": 21 + } + ], + "line_count": 26 + }, + "app/config/dedupe.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "DedupeConfiguration", + "signature": "type DedupeConfiguration struct", + "line": 19 + }, + { + "kind": "func", + "name": "NewDeduplicator", + "signature": "func (c DedupeConfiguration) NewDeduplicator() (dedupe.Deduplicator, error)", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DedupeConfiguration) Validate() error", + "line": 37 + }, + { + "kind": "struct", + "name": "rawDedupeConfiguration", + "signature": "type rawDedupeConfiguration struct", + "line": 53 + }, + { + "kind": "func", + "name": "DecodeMap", + "signature": "func (c *DedupeConfiguration) DecodeMap(v map[string]any) error", + "line": 59 + }, + { + "kind": "interface", + "name": "DedupeDriverConfiguration", + "signature": "type DedupeDriverConfiguration interface", + "line": 116 + }, + { + "kind": "struct", + "name": "unknownDedupeDriverConfiguration", + "signature": "type unknownDedupeDriverConfiguration struct", + "line": 122 + }, + { + "kind": "func", + "name": "DriverName", + "signature": "func (c unknownDedupeDriverConfiguration) DriverName() string", + "line": 126 + }, + { + "kind": "func", + "name": "NewDeduplicator", + "signature": "func (c unknownDedupeDriverConfiguration) NewDeduplicator() (dedupe.Deduplicator, error)", + "line": 130 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c unknownDedupeDriverConfiguration) Validate() error", + "line": 134 + }, + { + "kind": "struct", + "name": "DedupeDriverMemoryConfiguration", + "signature": "type DedupeDriverMemoryConfiguration struct", + "line": 139 + }, + { + "kind": "func", + "name": "NewDeduplicator", + "signature": "func (c DedupeDriverMemoryConfiguration) NewDeduplicator() (dedupe.Deduplicator, error)", + "line": 148 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DedupeDriverMemoryConfiguration) Validate() error", + "line": 152 + }, + { + "kind": "struct", + "name": "DedupeDriverRedisConfiguration", + "signature": "type DedupeDriverRedisConfiguration struct", + "line": 163 + }, + { + "kind": "func", + "name": "NewDeduplicator", + "signature": "func (c DedupeDriverRedisConfiguration) NewDeduplicator() (dedupe.Deduplicator, error)", + "line": 174 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DedupeDriverRedisConfiguration) Validate() error", + "line": 188 + }, + { + "kind": "func", + "name": "ConfigureDedupe", + "signature": "func ConfigureDedupe(v *viper.Viper)", + "line": 203 + } + ], + "line_count": 214 + }, + "app/config/entitlements.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/spf13/pflag\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementsConfiguration", + "signature": "type EntitlementsConfiguration struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c EntitlementsConfiguration) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "GetGracePeriod", + "signature": "func (c *EntitlementsConfiguration) GetGracePeriod() datetime.ISODuration", + "line": 34 + }, + { + "kind": "func", + "name": "ConfigureEntitlements", + "signature": "func ConfigureEntitlements(v *viper.Viper, flags *pflag.FlagSet)", + "line": 43 + } + ], + "line_count": 46 + }, + "app/config/events.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "EventsConfiguration", + "signature": "type EventsConfiguration struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c EventsConfiguration) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "EventBusTopicMapping", + "signature": "func (c EventsConfiguration) EventBusTopicMapping() eventbus.TopicMapping", + "line": 44 + }, + { + "kind": "struct", + "name": "EventSubsystemConfiguration", + "signature": "type EventSubsystemConfiguration struct", + "line": 52 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c EventSubsystemConfiguration) Validate() error", + "line": 58 + }, + { + "kind": "struct", + "name": "AutoProvisionConfiguration", + "signature": "type AutoProvisionConfiguration struct", + "line": 72 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c AutoProvisionConfiguration) Validate() error", + "line": 78 + }, + { + "kind": "struct", + "name": "ConsumerConfiguration", + "signature": "type ConsumerConfiguration struct", + "line": 92 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ConsumerConfiguration) Validate() error", + "line": 106 + }, + { + "kind": "struct", + "name": "DLQConfiguration", + "signature": "type DLQConfiguration struct", + "line": 128 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DLQConfiguration) Validate() error", + "line": 134 + }, + { + "kind": "struct", + "name": "DLQAutoProvisionConfiguration", + "signature": "type DLQAutoProvisionConfiguration struct", + "line": 152 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DLQAutoProvisionConfiguration) Validate() error", + "line": 158 + }, + { + "kind": "struct", + "name": "RetryConfiguration", + "signature": "type RetryConfiguration struct", + "line": 176 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c RetryConfiguration) Validate() error", + "line": 187 + }, + { + "kind": "func", + "name": "ConfigureConsumer", + "signature": "func ConfigureConsumer(v *viper.Viper, prefix string)", + "line": 213 + }, + { + "kind": "func", + "name": "ConfigureEvents", + "signature": "func ConfigureEvents(v *viper.Viper)", + "line": 227 + } + ], + "line_count": 241 + }, + "app/config/helpers.go": { + "header": "func AddPrefix(prefix, key string) string {\n\tif prefix == \"\" || strings.HasPrefix(key, prefix+\".\") {\n\t\treturn key", + "symbols": [ + { + "kind": "func", + "name": "AddPrefix", + "signature": "func AddPrefix(prefix, key string) string", + "line": 7 + } + ], + "line_count": 13 + }, + "app/config/ingest.go": { + "header": "\t\"errors\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "IngestConfiguration", + "signature": "type IngestConfiguration struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c IngestConfiguration) Validate() error", + "line": 20 + }, + { + "kind": "struct", + "name": "KafkaIngestConfiguration", + "signature": "type KafkaIngestConfiguration struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c KafkaIngestConfiguration) Validate() error", + "line": 43 + }, + { + "kind": "struct", + "name": "KafkaConfiguration", + "signature": "type KafkaConfiguration struct", + "line": 61 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c KafkaConfiguration) Validate() error", + "line": 87 + }, + { + "kind": "func", + "name": "CreateKafkaConfig", + "signature": "func (c KafkaConfiguration) CreateKafkaConfig() kafka.ConfigMap", + "line": 106 + }, + { + "kind": "func", + "name": "ConfigureIngestKafkaConfiguration", + "signature": "func ConfigureIngestKafkaConfiguration(v *viper.Viper, prefixes ...string)", + "line": 163 + }, + { + "kind": "func", + "name": "ConfigureIngest", + "signature": "func ConfigureIngest(v *viper.Viper)", + "line": 178 + } + ], + "line_count": 185 + }, + "app/config/ingest_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "func", + "name": "TestKafkaIngestConfiguration", + "signature": "func TestKafkaIngestConfiguration(t *testing.T)", + "line": 13 + } + ], + "line_count": 72 + }, + "app/config/kafka.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/viper\"\n\tpkgkafka \"github.com/openmeterio/openmeter/pkg/kafka\"", + "symbols": [ + { + "kind": "struct", + "name": "KafkaConfig", + "signature": "type KafkaConfig struct", + "line": 13 + }, + { + "kind": "func", + "name": "AsProducerConfig", + "signature": "func (c KafkaConfig) AsProducerConfig() pkgkafka.ProducerConfig", + "line": 19 + }, + { + "kind": "func", + "name": "AsConsumerConfig", + "signature": "func (c KafkaConfig) AsConsumerConfig() pkgkafka.ConsumerConfig", + "line": 26 + }, + { + "kind": "func", + "name": "AsAdminConfig", + "signature": "func (c KafkaConfig) AsAdminConfig() pkgkafka.AdminConfig", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c KafkaConfig) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "ConfigureKafkaConfiguration", + "signature": "func ConfigureKafkaConfiguration(v *viper.Viper, prefix string)", + "line": 58 + } + ], + "line_count": 80 + }, + "app/config/namespace.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/viper\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NamespaceConfiguration", + "signature": "type NamespaceConfiguration struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c NamespaceConfiguration) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "ConfigureNamespace", + "signature": "func ConfigureNamespace(v *viper.Viper)", + "line": 26 + } + ], + "line_count": 29 + }, + "app/config/notification.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "WebhookConfiguration", + "signature": "type WebhookConfiguration struct", + "line": 15 + }, + { + "kind": "struct", + "name": "NotificationConfiguration", + "signature": "type NotificationConfiguration struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c NotificationConfiguration) Validate() error", + "line": 37 + }, + { + "kind": "func", + "name": "ConfigureNotification", + "signature": "func ConfigureNotification(v *viper.Viper)", + "line": 47 + } + ], + "line_count": 60 + }, + "app/config/portal.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "PortalCORSConfiguration", + "signature": "type PortalCORSConfiguration struct", + "line": 10 + }, + { + "kind": "struct", + "name": "PortalConfiguration", + "signature": "type PortalConfiguration struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PortalConfiguration) Validate() error", + "line": 22 + }, + { + "kind": "func", + "name": "ConfigurePortal", + "signature": "func ConfigurePortal(v *viper.Viper)", + "line": 41 + } + ], + "line_count": 46 + }, + "app/config/postgres.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"net/url\"", + "symbols": [ + { + "kind": "struct", + "name": "PostgresConfig", + "signature": "type PostgresConfig struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PostgresConfig) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "AsURL", + "signature": "func (c PostgresConfig) AsURL() string", + "line": 46 + }, + { + "kind": "func", + "name": "ConfigurePostgres", + "signature": "func ConfigurePostgres(v *viper.Viper, prefix string)", + "line": 53 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (a AutoMigrate) Enabled() bool", + "line": 75 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a AutoMigrate) Validate() error", + "line": 80 + }, + { + "kind": "struct", + "name": "PostgresConnectionParams", + "signature": "type PostgresConnectionParams struct", + "line": 89 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PostgresConnectionParams) Validate() error", + "line": 99 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (c PostgresConnectionParams) IsEmpty() bool", + "line": 121 + }, + { + "kind": "func", + "name": "AsURL", + "signature": "func (c PostgresConnectionParams) AsURL() string", + "line": 125 + }, + { + "kind": "struct", + "name": "PostgresConnectionOptions", + "signature": "type PostgresConnectionOptions struct", + "line": 160 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PostgresConnectionOptions) Validate() error", + "line": 167 + } + ], + "line_count": 175 + }, + "app/config/productcatalog.go": { + "header": "type ProductCatalogConfiguration struct {\n\tSubscription SubscriptionConfiguration\n}", + "symbols": [ + { + "kind": "struct", + "name": "ProductCatalogConfiguration", + "signature": "type ProductCatalogConfiguration struct", + "line": 5 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ProductCatalogConfiguration) Validate() error", + "line": 9 + }, + { + "kind": "func", + "name": "ConfigureProductCatalog", + "signature": "func ConfigureProductCatalog(v *viper.Viper)", + "line": 13 + }, + { + "kind": "struct", + "name": "SubscriptionConfiguration", + "signature": "type SubscriptionConfiguration struct", + "line": 16 + } + ], + "line_count": 18 + }, + "app/config/progressmanager.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "ProgressManagerConfiguration", + "signature": "type ProgressManagerConfiguration struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ProgressManagerConfiguration) Validate() error", + "line": 22 + }, + { + "kind": "func", + "name": "ConfigureProgressManager", + "signature": "func ConfigureProgressManager(v *viper.Viper)", + "line": 41 + } + ], + "line_count": 45 + }, + "app/config/server.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "ServerConfig", + "signature": "type ServerConfig struct", + "line": 11 + }, + { + "kind": "struct", + "name": "ResponseValidationConfig", + "signature": "type ResponseValidationConfig struct", + "line": 21 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (m ResponseValidationMode) Enabled() bool", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m ResponseValidationMode) Validate() error", + "line": 40 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ServerConfig) Validate() error", + "line": 49 + }, + { + "kind": "func", + "name": "ConfigureServer", + "signature": "func ConfigureServer(v *viper.Viper, prefixes ...string)", + "line": 76 + } + ], + "line_count": 85 + }, + "app/config/sink.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "SinkConfiguration", + "signature": "type SinkConfiguration struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SinkConfiguration) Validate() error", + "line": 43 + }, + { + "kind": "struct", + "name": "IngestNotificationsConfiguration", + "signature": "type IngestNotificationsConfiguration struct", + "line": 93 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c IngestNotificationsConfiguration) Validate() error", + "line": 97 + }, + { + "kind": "struct", + "name": "StorageConfiguration", + "signature": "type StorageConfiguration struct", + "line": 111 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StorageConfiguration) Validate() error", + "line": 127 + }, + { + "kind": "func", + "name": "ConfigureSink", + "signature": "func ConfigureSink(v *viper.Viper)", + "line": 136 + } + ], + "line_count": 180 + }, + "app/config/svix.go": { + "header": "\twebhooksvix \"github.com/openmeterio/openmeter/openmeter/notification/webhook/svix\"\n)\ntype SvixConfig = webhooksvix.SvixConfig", + "symbols": [], + "line_count": 7 + }, + "app/config/taxcode.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeConfiguration", + "signature": "type TaxCodeConfiguration struct", + "line": 13 + }, + { + "kind": "struct", + "name": "TaxCodeSeed", + "signature": "type TaxCodeSeed struct", + "line": 20 + }, + { + "kind": "struct", + "name": "TaxCodeAppMapping", + "signature": "type TaxCodeAppMapping struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TaxCodeConfiguration) Validate() error", + "line": 34 + }, + { + "kind": "func", + "name": "ConfigureTaxCode", + "signature": "func ConfigureTaxCode(v *viper.Viper)", + "line": 98 + } + ], + "line_count": 117 + }, + "app/config/taxcode_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestTaxCodeConfigurationValidate", + "signature": "func TestTaxCodeConfigurationValidate(t *testing.T)", + "line": 10 + } + ], + "line_count": 103 + }, + "app/config/telemetry.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "OTLPExporterTelemetryConfig", + "signature": "type OTLPExporterTelemetryConfig struct", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c OTLPExporterTelemetryConfig) Validate() error", + "line": 41 + }, + { + "kind": "func", + "name": "DialExporter", + "signature": "func (c OTLPExporterTelemetryConfig) DialExporter(ctx context.Context) (*grpc.ClientConn, error)", + "line": 51 + }, + { + "kind": "struct", + "name": "TelemetryConfig", + "signature": "type TelemetryConfig struct", + "line": 64 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TelemetryConfig) Validate() error", + "line": 78 + }, + { + "kind": "struct", + "name": "TraceTelemetryConfig", + "signature": "type TraceTelemetryConfig struct", + "line": 100 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TraceTelemetryConfig) Validate() error", + "line": 112 + }, + { + "kind": "func", + "name": "GetSampler", + "signature": "func (c TraceTelemetryConfig) GetSampler() sdktrace.Sampler", + "line": 126 + }, + { + "kind": "func", + "name": "NewTracerProvider", + "signature": "func (c TraceTelemetryConfig) NewTracerProvider(ctx context.Context, res *resource.Resource) (*sdktrace.TracerProvider, error)", + "line": 144 + }, + { + "kind": "struct", + "name": "ExportersTraceTelemetryConfig", + "signature": "type ExportersTraceTelemetryConfig struct", + "line": 162 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ExportersTraceTelemetryConfig) Validate() error", + "line": 167 + }, + { + "kind": "struct", + "name": "OTLPExportersTraceTelemetryConfig", + "signature": "type OTLPExportersTraceTelemetryConfig struct", + "line": 177 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c OTLPExportersTraceTelemetryConfig) Validate() error", + "line": 184 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c OTLPExportersTraceTelemetryConfig) NewExporter(ctx context.Context) (sdktrace.SpanExporter, error)", + "line": 193 + }, + { + "kind": "struct", + "name": "MetricsTelemetryConfig", + "signature": "type MetricsTelemetryConfig struct", + "line": 215 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c MetricsTelemetryConfig) Validate() error", + "line": 220 + }, + { + "kind": "func", + "name": "NewMeterProvider", + "signature": "func (c MetricsTelemetryConfig) NewMeterProvider(ctx context.Context, res *resource.Resource) (*sdkmetric.MeterProvider, error)", + "line": 228 + }, + { + "kind": "struct", + "name": "ExportersMetricsTelemetryConfig", + "signature": "type ExportersMetricsTelemetryConfig struct", + "line": 254 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ExportersMetricsTelemetryConfig) Validate() error", + "line": 260 + }, + { + "kind": "struct", + "name": "PrometheusExportersMetricsTelemetryConfig", + "signature": "type PrometheusExportersMetricsTelemetryConfig struct", + "line": 274 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PrometheusExportersMetricsTelemetryConfig) Validate() error", + "line": 284 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c PrometheusExportersMetricsTelemetryConfig) NewExporter() (sdkmetric.Reader, error)", + "line": 289 + }, + { + "kind": "struct", + "name": "OTLPExportersMetricsTelemetryConfig", + "signature": "type OTLPExportersMetricsTelemetryConfig struct", + "line": 302 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c OTLPExportersMetricsTelemetryConfig) Validate() error", + "line": 309 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c OTLPExportersMetricsTelemetryConfig) NewExporter(ctx context.Context) (sdkmetric.Reader, error)", + "line": 318 + }, + { + "kind": "struct", + "name": "LogTelemetryConfig", + "signature": "type LogTelemetryConfig struct", + "line": 340 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c LogTelemetryConfig) Validate() error", + "line": 354 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 372 + }, + { + "kind": "func", + "name": "kongReplaceAttr", + "signature": "func kongReplaceAttr(groups []string, a slog.Attr) slog.Attr", + "line": 386 + }, + { + "kind": "func", + "name": "NewJSONHandler", + "signature": "func NewJSONHandler(w io.Writer, level slog.Leveler) *slog.JSONHandler", + "line": 411 + }, + { + "kind": "func", + "name": "NewHandler", + "signature": "func (c LogTelemetryConfig) NewHandler(w io.Writer) slog.Handler", + "line": 420 + }, + { + "kind": "struct", + "name": "ExportersLogTelemetryConfig", + "signature": "type ExportersLogTelemetryConfig struct", + "line": 444 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ExportersLogTelemetryConfig) Validate() error", + "line": 451 + }, + { + "kind": "struct", + "name": "OTLPExportersLogTelemetryConfig", + "signature": "type OTLPExportersLogTelemetryConfig struct", + "line": 465 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c OTLPExportersLogTelemetryConfig) Validate() error", + "line": 472 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c OTLPExportersLogTelemetryConfig) NewExporter(ctx context.Context) (sdklog.Exporter, error)", + "line": 481 + }, + { + "kind": "struct", + "name": "StdoutExportersLogTelemetryConfig", + "signature": "type StdoutExportersLogTelemetryConfig struct", + "line": 505 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StdoutExportersLogTelemetryConfig) Validate() error", + "line": 511 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c StdoutExportersLogTelemetryConfig) NewExporter() (sdklog.Exporter, error)", + "line": 520 + }, + { + "kind": "struct", + "name": "FileExportersLogTelemetryConfig", + "signature": "type FileExportersLogTelemetryConfig struct", + "line": 535 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c FileExportersLogTelemetryConfig) Validate() error", + "line": 542 + }, + { + "kind": "struct", + "name": "fileExporter", + "signature": "type fileExporter struct", + "line": 555 + }, + { + "kind": "func", + "name": "Export", + "signature": "func (e *fileExporter) Export(ctx context.Context, logs []sdklog.Record) error", + "line": 560 + }, + { + "kind": "func", + "name": "ForceFlush", + "signature": "func (e *fileExporter) ForceFlush(ctx context.Context) error", + "line": 596 + }, + { + "kind": "func", + "name": "Shutdown", + "signature": "func (e *fileExporter) Shutdown(ctx context.Context) error", + "line": 600 + }, + { + "kind": "func", + "name": "NewExporter", + "signature": "func (c FileExportersLogTelemetryConfig) NewExporter() (sdklog.Exporter, error)", + "line": 605 + }, + { + "kind": "func", + "name": "NewLoggerProvider", + "signature": "func (c LogTelemetryConfig) NewLoggerProvider(ctx context.Context, res *resource.Resource) (*sdklog.LoggerProvider, error)", + "line": 625 + }, + { + "kind": "func", + "name": "ConfigureTelemetry", + "signature": "func ConfigureTelemetry(v *viper.Viper, flags *pflag.FlagSet)", + "line": 662 + } + ], + "line_count": 688 + }, + "app/config/termination.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "struct", + "name": "TerminationConfig", + "signature": "type TerminationConfig struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TerminationConfig) Validate() error", + "line": 25 + }, + { + "kind": "func", + "name": "ConfigureTermination", + "signature": "func ConfigureTermination(v *viper.Viper, prefixes ...string)", + "line": 40 + } + ], + "line_count": 46 + }, + "app/config/testdata/complete.yaml": { + "header": "address: 127.0.0.1:8888\n\nenvironment: local\n\ntermination:\n checkInterval: 7s\n gracefulShutdownTimeout: 43s\n propagationTimeout: 18s\n\ntelemetry:\n address: 127.0.0.1:10000\n\n trace:\n sampler: always\n exporters:\n otlp:\n enabled: true\n address: 127.0.0.1:4317\n\n metrics:", + "symbols": [], + "line_count": 181 + }, + "app/config/topicprovisioner.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "TopicProvisionerConfig", + "signature": "type TopicProvisionerConfig struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TopicProvisionerConfig) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "ConfigureTopicProvisioner", + "signature": "func ConfigureTopicProvisioner(v *viper.Viper, prefixes ...string)", + "line": 46 + } + ], + "line_count": 53 + }, + "app/config/viper.go": { + "header": "\t\"github.com/go-viper/mapstructure/v2\"\n\t\"github.com/sagikazarmark/mapstructurex\"\n)", + "symbols": [ + { + "kind": "func", + "name": "DecodeHook", + "signature": "func DecodeHook() mapstructure.DecodeHookFunc", + "line": 8 + }, + { + "kind": "func", + "name": "NewViperKeyPrefixer", + "signature": "func NewViperKeyPrefixer(prefixes ...string) ViperKeyPrefixer", + "line": 28 + } + ], + "line_count": 48 + }, + "atlas.hcl": { + "header": "env \"local\" {\n src = \"${local.schema_src}\"\n\n migration {\n dir = \"${local.migrations_dir}\"\n format = \"${local.migrations_format}\"\n exclude = \"${local.migration_exlude}\"\n }\n\n format {\n migrate {\n diff = \"{{ sql . \\\" \\\" }}\"\n }\n }\n\n url = \"${local.local_url}\"\n\n // Define the URL of the Dev Database for this environment\n // See: https://atlasgo.io/concepts/dev-database\n dev = \"docker://postgres/15/dev?search_path=public\"", + "symbols": [], + "line_count": 78 + }, + "benthos-collector.Dockerfile": { + "header": "FROM --platform=$BUILDPLATFORM golang:1.26.3-alpine3.23@sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d AS builder\n\nRUN apk add --update --no-cache ca-certificates make git curl\n\nARG TARGETPLATFORM\n\nWORKDIR /src\n\nARG GOPROXY\n\nENV CGO_ENABLED=0\n\nENV GOCACHE=/go/cache\nENV GOMODCACHE=/go/pkg/mod\n\nCOPY --link go.mod go.sum ./\n\nRUN --mount=type=cache,target=/go/pkg/mod \\\n --mount=type=cache,target=/go/cache \\\n go mod download -x", + "symbols": [], + "line_count": 54 + }, + "cloudevents.spec.json": { + "header": "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"description\": \"CloudEvents Specification JSON Schema\",\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"description\": \"Identifies the event.\",\n \"$ref\": \"#/definitions/iddef\",\n \"examples\": [\n \"A234-1234-1234\"\n ]\n },\n \"source\": {\n \"description\": \"Identifies the context in which an event happened.\",\n \"$ref\": \"#/definitions/sourcedef\",\n \"examples\" : [\n \"https://github.com/cloudevents\",\n \"mailto:cncf-wg-serverless@lists.cncf.io\",\n \"urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66\",\n \"cloudevents/spec/pull/123\",", + "symbols": [], + "line_count": 123 + }, + "cmd/balance-worker/main.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 17 + } + ], + "line_count": 88 + }, + "cmd/balance-worker/version.go": { + "header": "var version string\nvar (\n\trevision string", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 34 + }, + "cmd/balance-worker/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 16 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 25 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 59 + } + ], + "line_count": 61 + }, + "cmd/balance-worker/wire_gen.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/app/common\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 20 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 345 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 354 + } + ], + "line_count": 356 + }, + "cmd/billing-worker/main.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 17 + } + ], + "line_count": 100 + }, + "cmd/billing-worker/version.go": { + "header": "var version string\nvar (\n\trevision string", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 34 + }, + "cmd/billing-worker/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/google/wire\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 20 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 34 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 62 + } + ], + "line_count": 64 + }, + "cmd/billing-worker/wire_gen.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/app/common\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 27 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 506 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 520 + } + ], + "line_count": 522 + }, + "cmd/jobs/billing/advance/advance.go": { + "header": "\t\"fmt\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 19 + } + ], + "line_count": 99 + }, + "cmd/jobs/billing/advancecharges/advancecharges.go": { + "header": "\t\"fmt\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 19 + } + ], + "line_count": 100 + }, + "cmd/jobs/billing/billing.go": { + "header": "\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/billing/advance\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/billing/advancecharges\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 17 + } + ], + "line_count": 22 + }, + "cmd/jobs/billing/collect/collect.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/spf13/cobra\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 25 + } + ], + "line_count": 106 + }, + "cmd/jobs/billing/subscriptionsync/sync.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/spf13/cobra\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 28 + } + ], + "line_count": 95 + }, + "cmd/jobs/entitlement/recalculatesnapshots.go": { + "header": "\t\"time\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"", + "symbols": [ + { + "kind": "func", + "name": "NewRecalculateBalanceSnapshotsCommand", + "signature": "func NewRecalculateBalanceSnapshotsCommand() *cobra.Command", + "line": 12 + } + ], + "line_count": 34 + }, + "cmd/jobs/entitlement/root.go": { + "header": "func RootCommand() *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tUse: \"entitlement\",", + "symbols": [ + { + "kind": "func", + "name": "RootCommand", + "signature": "func RootCommand() *cobra.Command", + "line": 5 + } + ], + "line_count": 14 + }, + "cmd/jobs/internal/app.go": { + "header": "func InitializeApplication(ctx context.Context, configFile string) error {\n\tvar err error\n\tif err = loadConfig(configFile); err != nil {", + "symbols": [ + { + "kind": "func", + "name": "InitializeApplication", + "signature": "func InitializeApplication(ctx context.Context, configFile string) error", + "line": 5 + } + ], + "line_count": 18 + }, + "cmd/jobs/internal/config.go": { + "header": "\t\"errors\"\n\t\"github.com/spf13/pflag\"\n\t\"github.com/spf13/viper\"", + "symbols": [ + { + "kind": "func", + "name": "loadConfig", + "signature": "func loadConfig(configFile string) error", + "line": 12 + } + ], + "line_count": 31 + }, + "cmd/jobs/internal/globals.go": { + "header": "var (\n\tApp Application\n\tAppShutdown func()", + "symbols": [], + "line_count": 11 + }, + "cmd/jobs/internal/version.go": { + "header": "\t\"runtime/debug\"\n)\nvar (", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + }, + { + "kind": "func", + "name": "Version", + "signature": "func Version() (string, string, string)", + "line": 36 + } + ], + "line_count": 38 + }, + "cmd/jobs/internal/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 38 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 70 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 116 + } + ], + "line_count": 118 + }, + "cmd/jobs/internal/wire_gen.go": { + "header": "\t\"context\"\n\tkafka2 \"github.com/confluentinc/confluent-kafka-go/v2/kafka\"\n\t\"github.com/openmeterio/openmeter/app/common\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 44 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 617 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 649 + } + ], + "line_count": 651 + }, + "cmd/jobs/ledger/backfillaccounts/backfillaccounts.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 72 + }, + { + "kind": "func", + "name": "newService", + "signature": "func newService() (*ledgerbackfillservice.Service, error)", + "line": 80 + }, + { + "kind": "func", + "name": "printSummary", + "signature": "func printSummary(out ledgerbackfillservice.RunOutput)", + "line": 110 + } + ], + "line_count": 125 + }, + "cmd/jobs/ledger/ledger.go": { + "header": "\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/ledger/backfillaccounts\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 14 + } + ], + "line_count": 16 + }, + "cmd/jobs/ledger/service/customer_lister_ent.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "struct", + "name": "EntCustomerLister", + "signature": "type EntCustomerLister struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewEntCustomerLister", + "signature": "func NewEntCustomerLister(entClient *entdb.Client) *EntCustomerLister", + "line": 16 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (l *EntCustomerLister) ListCustomers(ctx context.Context, input ListCustomersInput) (ListCustomersResult, error)", + "line": 22 + } + ], + "line_count": 64 + }, + "cmd/jobs/ledger/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "customerLister", + "signature": "type customerLister interface", + "line": 17 + }, + { + "kind": "struct", + "name": "ListCustomersInput", + "signature": "type ListCustomersInput struct", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCustomersInput) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "CustomerListItem", + "signature": "type CustomerListItem struct", + "line": 41 + }, + { + "kind": "struct", + "name": "ListCustomersResult", + "signature": "type ListCustomersResult struct", + "line": 46 + }, + { + "kind": "interface", + "name": "accountProvisioner", + "signature": "type accountProvisioner interface", + "line": 51 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 58 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 64 + }, + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 76 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(cfg Config) (*Service, error)", + "line": 82 + }, + { + "kind": "struct", + "name": "RunInput", + "signature": "type RunInput struct", + "line": 94 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RunInput) Validate() error", + "line": 105 + }, + { + "kind": "func", + "name": "normalized", + "signature": "func (i RunInput) normalized() RunInput", + "line": 117 + }, + { + "kind": "struct", + "name": "RunOutput", + "signature": "type RunOutput struct", + "line": 132 + }, + { + "kind": "struct", + "name": "NamespaceResult", + "signature": "type NamespaceResult struct", + "line": 136 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (s *Service) Run(ctx context.Context, in RunInput) (RunOutput, error)", + "line": 152 + }, + { + "kind": "func", + "name": "runNamespace", + "signature": "func (s *Service) runNamespace(ctx context.Context, input RunInput, namespace string) (NamespaceResult, error)", + "line": 172 + }, + { + "kind": "func", + "name": "ensureBusinessAccounts", + "signature": "func (s *Service) ensureBusinessAccounts(ctx context.Context, input RunInput, result *NamespaceResult) error", + "line": 236 + }, + { + "kind": "func", + "name": "ensureCustomerAccounts", + "signature": "func (s *Service) ensureCustomerAccounts(ctx context.Context, input RunInput, result *NamespaceResult, customerID customer.CustomerID) error", + "line": 264 + }, + { + "kind": "func", + "name": "hasValidationIssueCode", + "signature": "func hasValidationIssueCode(err error, code models.ErrorCode) bool", + "line": 292 + }, + { + "kind": "func", + "name": "recordFailure", + "signature": "func (s *Service) recordFailure(result *NamespaceResult, stage string, customerID string, err error) error", + "line": 307 + } + ], + "line_count": 334 + }, + "cmd/jobs/ledger/service/service_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestRunDryRun", + "signature": "func TestRunDryRun(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestRunCursorsThroughMultiplePages", + "signature": "func TestRunCursorsThroughMultiplePages(t *testing.T)", + "line": 55 + }, + { + "kind": "func", + "name": "TestRunProvisionWithCreatedBeforeCutoff", + "signature": "func TestRunProvisionWithCreatedBeforeCutoff(t *testing.T)", + "line": 96 + }, + { + "kind": "func", + "name": "TestRunContinueOnError", + "signature": "func TestRunContinueOnError(t *testing.T)", + "line": 136 + }, + { + "kind": "struct", + "name": "fakeCustomerLister", + "signature": "type fakeCustomerLister struct", + "line": 166 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (f fakeCustomerLister) ListCustomers(_ context.Context, input ListCustomersInput) (ListCustomersResult, error)", + "line": 170 + }, + { + "kind": "func", + "name": "stringsCompare", + "signature": "func stringsCompare(a string, b string) int", + "line": 244 + }, + { + "kind": "struct", + "name": "fakeAccountProvisioner", + "signature": "type fakeAccountProvisioner struct", + "line": 255 + }, + { + "kind": "func", + "name": "newFakeAccountProvisioner", + "signature": "func newFakeAccountProvisioner() *fakeAccountProvisioner", + "line": 265 + }, + { + "kind": "func", + "name": "customerKey", + "signature": "func (f *fakeAccountProvisioner) customerKey(id customer.CustomerID) string", + "line": 273 + }, + { + "kind": "func", + "name": "GetCustomerAccounts", + "signature": "func (f *fakeAccountProvisioner) GetCustomerAccounts(_ context.Context, customerID customer.CustomerID) (ledger.CustomerAccounts, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CreateCustomerAccounts", + "signature": "func (f *fakeAccountProvisioner) CreateCustomerAccounts(_ context.Context, customerID customer.CustomerID) (ledger.CustomerAccounts, error)", + "line": 294 + }, + { + "kind": "func", + "name": "GetBusinessAccounts", + "signature": "func (f *fakeAccountProvisioner) GetBusinessAccounts(_ context.Context, namespace string) (ledger.BusinessAccounts, error)", + "line": 302 + }, + { + "kind": "func", + "name": "EnsureBusinessAccounts", + "signature": "func (f *fakeAccountProvisioner) EnsureBusinessAccounts(_ context.Context, namespace string) (ledger.BusinessAccounts, error)", + "line": 312 + }, + { + "kind": "func", + "name": "newCustomer", + "signature": "func newCustomer(namespace string, id string, createdAt time.Time) customer.Customer", + "line": 319 + } + ], + "line_count": 333 + }, + "cmd/jobs/llmcost/llmcost.go": { + "header": "\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 14 + }, + { + "kind": "func", + "name": "syncCmd", + "signature": "func syncCmd() *cobra.Command", + "line": 18 + } + ], + "line_count": 26 + }, + "cmd/jobs/main.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 24 + } + ], + "line_count": 76 + }, + "cmd/jobs/migrate/migrate.go": { + "header": "\t\"fmt\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/app/config\"", + "symbols": [ + { + "kind": "func", + "name": "RootCommand", + "signature": "func RootCommand() *cobra.Command", + "line": 12 + } + ], + "line_count": 43 + }, + "cmd/jobs/quickstart/cronjobs.go": { + "header": "\t\"log/slog\"\n\t\"os\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 114 + } + ], + "line_count": 116 + }, + "cmd/jobs/quickstart/quickstart.go": { + "header": "\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/billing/subscriptionsync\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 17 + }, + "cmd/jobs/version.go": { + "header": "\t\"github.com/spf13/cobra\"\n\t\"github.com/openmeterio/openmeter/cmd/jobs/internal\"\n)", + "symbols": [ + { + "kind": "func", + "name": "versionCommand", + "signature": "func versionCommand() *cobra.Command", + "line": 9 + } + ], + "line_count": 18 + }, + "cmd/notification-service/main.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 23 + } + ], + "line_count": 156 + }, + "cmd/notification-service/version.go": { + "header": "var version string\nvar (\n\trevision string", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 34 + }, + "cmd/notification-service/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/ThreeDotsLabs/watermill/message\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 26 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 46 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 71 + } + ], + "line_count": 73 + }, + "cmd/notification-service/wire_gen.go": { + "header": "\t\"context\"\n\t\"github.com/ThreeDotsLabs/watermill/message\"\n\t\"github.com/openmeterio/openmeter/app/common\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 28 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 264 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 284 + } + ], + "line_count": 286 + }, + "cmd/server/main.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 30 + }, + { + "kind": "func", + "name": "initNamespace", + "signature": "func initNamespace(manager *namespace.Manager, logger *slog.Logger) error", + "line": 335 + } + ], + "line_count": 346 + }, + "cmd/server/version.go": { + "header": "var version string\nvar (\n\trevision string", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 34 + }, + "cmd/server/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 50 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 107 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 165 + } + ], + "line_count": 167 + }, + "cmd/server/wire_gen.go": { + "header": "\t\"context\"\n\tkafka2 \"github.com/confluentinc/confluent-kafka-go/v2/kafka\"\n\t\"github.com/openmeterio/openmeter/app/common\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 54 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 853 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 910 + } + ], + "line_count": 912 + }, + "cmd/sink-worker/main.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 21 + } + ], + "line_count": 127 + }, + "cmd/sink-worker/version.go": { + "header": "var version string\nvar (\n\trevision string", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 34 + }, + "cmd/sink-worker/wire.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"os\"", + "symbols": [ + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 28 + }, + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 45 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 71 + }, + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(conf config.LogTelemetryConfig, res *resource.Resource) *slog.Logger", + "line": 76 + } + ], + "line_count": 81 + }, + "cmd/sink-worker/wire_gen.go": { + "header": "\t\"context\"\n\t\"github.com/go-slog/otelslog\"\n\t\"github.com/openmeterio/openmeter/app/common\"", + "symbols": [ + { + "kind": "func", + "name": "initializeApplication", + "signature": "func initializeApplication(ctx context.Context, conf config.Configuration) (Application, func(), error)", + "line": 31 + }, + { + "kind": "struct", + "name": "Application", + "signature": "type Application struct", + "line": 304 + }, + { + "kind": "func", + "name": "metadata", + "signature": "func metadata(conf config.Configuration) common.Metadata", + "line": 321 + }, + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(conf config.LogTelemetryConfig, res *resource.Resource) *slog.Logger", + "line": 326 + } + ], + "line_count": 328 + }, + "collector/README.md": { + "header": "# OpenMeter Collector\n\nOpenMeter Collector is a configurable, production-ready data pipeline for **usage metering**. It helps you **collect, transform, buffer, and reliably deliver** usage events into OpenMeter, especially in distributed and network-unreliable environments.\n\nLearn more in the docs:\n\n* Overview: [https://openmeter.io/docs/collectors](https://openmeter.io/docs/collectors)\n* Quickstart: [https://openmeter.io/docs/collectors/quickstart](https://openmeter.io/docs/collectors/quickstart)\n* How it works: [https://openmeter.io/docs/collectors/how-it-works](https://openmeter.io/docs/collectors/how-it-works)\n\n---\n\n## Capabilities\n\n* **Multiple ingestion sources**: HTTP/event ingestion and a growing set of presets and integrations\n\n * Kubernetes: [https://openmeter.io/docs/collectors/kubernetes](https://openmeter.io/docs/collectors/kubernetes)\n * Prometheus: [https://openmeter.io/docs/collectors/prometheus](https://openmeter.io/docs/collectors/prometheus)\n * OpenTelemetry: [https://openmeter.io/docs/collectors/otel](https://openmeter.io/docs/collectors/otel)\n * ClickHouse: [https://openmeter.io/docs/collectors/clickhouse](https://openmeter.io/docs/collectors/clickhouse)", + "symbols": [], + "line_count": 95 + }, + "collector/benthos/bloblang/parse_resource.go": { + "header": "\t\"github.com/redpanda-data/benthos/v4/public/bloblang\"\n\t\"k8s.io/apimachinery/pkg/api/resource\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 9 + } + ], + "line_count": 41 + }, + "collector/benthos/input/kubernetes.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "kubernetesResourcesInputConfig", + "signature": "func kubernetesResourcesInputConfig() *service.ConfigSpec", + "line": 27 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 47 + }, + { + "kind": "struct", + "name": "kubernetesResourcesInput", + "signature": "type kubernetesResourcesInput struct", + "line": 56 + }, + { + "kind": "func", + "name": "newKubernetesResourcesInput", + "signature": "func newKubernetesResourcesInput(conf *service.ParsedConfig, res *service.Resources) (*kubernetesResourcesInput, error)", + "line": 72 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (in *kubernetesResourcesInput) Connect(ctx context.Context) error", + "line": 155 + }, + { + "kind": "func", + "name": "ReadBatch", + "signature": "func (in *kubernetesResourcesInput) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)", + "line": 181 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (in *kubernetesResourcesInput) Close(ctx context.Context) error", + "line": 305 + } + ], + "line_count": 319 + }, + "collector/benthos/input/otel_log.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "otelLogInputConfig", + "signature": "func otelLogInputConfig() *service.ConfigSpec", + "line": 27 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 41 + }, + { + "kind": "struct", + "name": "otelLogInput", + "signature": "type otelLogInput struct", + "line": 50 + }, + { + "kind": "func", + "name": "newOtelLogInput", + "signature": "func newOtelLogInput(conf *service.ParsedConfig) (*otelLogInput, error)", + "line": 64 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (in *otelLogInput) Connect(_ context.Context) error", + "line": 93 + }, + { + "kind": "func", + "name": "ReadBatch", + "signature": "func (in *otelLogInput) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)", + "line": 106 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (in *otelLogInput) Close(_ context.Context) error", + "line": 118 + }, + { + "kind": "func", + "name": "Export", + "signature": "func (in *otelLogInput) Export(ctx context.Context, request *collogspb.ExportLogsServiceRequest) (*collogspb.ExportLogsServiceResponse, error)", + "line": 124 + }, + { + "kind": "struct", + "name": "record", + "signature": "type record struct", + "line": 179 + }, + { + "kind": "struct", + "name": "resource", + "signature": "type resource struct", + "line": 185 + }, + { + "kind": "func", + "name": "resourceFrom", + "signature": "func resourceFrom(pb *resourcepb.Resource) *resource", + "line": 190 + }, + { + "kind": "func", + "name": "anyFrom", + "signature": "func anyFrom(pb *commonpb.AnyValue) any", + "line": 203 + }, + { + "kind": "struct", + "name": "scope", + "signature": "type scope struct", + "line": 232 + }, + { + "kind": "func", + "name": "scopeFrom", + "signature": "func scopeFrom(pb *commonpb.InstrumentationScope) *scope", + "line": 239 + }, + { + "kind": "struct", + "name": "logRecord", + "signature": "type logRecord struct", + "line": 254 + }, + { + "kind": "func", + "name": "logRecordFrom", + "signature": "func logRecordFrom(pb *logspb.LogRecord) *logRecord", + "line": 267 + }, + { + "kind": "func", + "name": "extractMessageFromRequest", + "signature": "func (in *otelLogInput) extractMessageFromRequest(request *collogspb.ExportLogsServiceRequest) (service.MessageBatch, error)", + "line": 288 + }, + { + "kind": "func", + "name": "loop", + "signature": "func (in *otelLogInput) loop(ln net.Listener)", + "line": 318 + } + ], + "line_count": 337 + }, + "collector/benthos/input/prometheus.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "prometheusInputConfig", + "signature": "func prometheusInputConfig() *service.ConfigSpec", + "line": 28 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 74 + }, + { + "kind": "struct", + "name": "PromQuery", + "signature": "type PromQuery struct", + "line": 83 + }, + { + "kind": "struct", + "name": "QueryResult", + "signature": "type QueryResult struct", + "line": 88 + }, + { + "kind": "struct", + "name": "prometheusInput", + "signature": "type prometheusInput struct", + "line": 97 + }, + { + "kind": "func", + "name": "newPrometheusInput", + "signature": "func newPrometheusInput(conf *service.ParsedConfig, res *service.Resources) (*prometheusInput, error)", + "line": 111 + }, + { + "kind": "func", + "name": "scrape", + "signature": "func (in *prometheusInput) scrape(ctx context.Context, t time.Time) error", + "line": 222 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (in *prometheusInput) Connect(ctx context.Context) error", + "line": 274 + }, + { + "kind": "func", + "name": "ReadBatch", + "signature": "func (in *prometheusInput) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)", + "line": 328 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (in *prometheusInput) Close(ctx context.Context) error", + "line": 381 + }, + { + "kind": "struct", + "name": "headerRoundTripper", + "signature": "type headerRoundTripper struct", + "line": 391 + }, + { + "kind": "func", + "name": "RoundTrip", + "signature": "func (h *headerRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)", + "line": 397 + } + ], + "line_count": 405 + }, + "collector/benthos/input/run_ai.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "runAIInputConfig", + "signature": "func runAIInputConfig() *service.ConfigSpec", + "line": 37 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 124 + }, + { + "kind": "struct", + "name": "runAIInput", + "signature": "type runAIInput struct", + "line": 144 + }, + { + "kind": "func", + "name": "newRunAIInput", + "signature": "func newRunAIInput(conf *service.ParsedConfig, resources *service.Resources, httpMetrics *service.MetricTimer, resourceTypeMetrics *service.MetricGauge) (*runAIInput, error)", + "line": 161 + }, + { + "kind": "func", + "name": "scrape", + "signature": "func (in *runAIInput) scrape(ctx context.Context, t time.Time) error", + "line": 284 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (in *runAIInput) Connect(ctx context.Context) error", + "line": 326 + }, + { + "kind": "func", + "name": "ReadBatch", + "signature": "func (in *runAIInput) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)", + "line": 381 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (in *runAIInput) Close(ctx context.Context) error", + "line": 435 + } + ], + "line_count": 437 + }, + "collector/benthos/input/runai/metrics.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "ResourceWithMetrics", + "signature": "type ResourceWithMetrics interface", + "line": 24 + }, + { + "kind": "struct", + "name": "MeasurementParams", + "signature": "type MeasurementParams struct", + "line": 48 + }, + { + "kind": "struct", + "name": "Measurement", + "signature": "type Measurement struct", + "line": 54 + }, + { + "kind": "struct", + "name": "MeasurementResponse", + "signature": "type MeasurementResponse struct", + "line": 62 + }, + { + "kind": "struct", + "name": "Metrics", + "signature": "type Metrics struct", + "line": 66 + }, + { + "kind": "func", + "name": "GetWorkloadMetrics", + "signature": "func (s *Service) GetWorkloadMetrics(ctx context.Context, workloadID string, params MeasurementParams) (Metrics, error)", + "line": 72 + }, + { + "kind": "struct", + "name": "WorkloadWithMetrics", + "signature": "type WorkloadWithMetrics struct", + "line": 120 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (w *WorkloadWithMetrics) GetType() ResourceType", + "line": 127 + }, + { + "kind": "func", + "name": "GetMetrics", + "signature": "func (w *WorkloadWithMetrics) GetMetrics() Metrics", + "line": 131 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p *WorkloadWithMetrics) MarshalJSON() ([]byte, error)", + "line": 135 + }, + { + "kind": "func", + "name": "GetAllWorkloadWithMetrics", + "signature": "func (s *Service) GetAllWorkloadWithMetrics(ctx context.Context, params MeasurementParams) ([]WorkloadWithMetrics, error)", + "line": 146 + }, + { + "kind": "func", + "name": "GetPodMetrics", + "signature": "func (s *Service) GetPodMetrics(ctx context.Context, workloadID string, podID string, params MeasurementParams) (Metrics, error)", + "line": 212 + }, + { + "kind": "struct", + "name": "PodWithMetrics", + "signature": "type PodWithMetrics struct", + "line": 260 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (p *PodWithMetrics) GetType() ResourceType", + "line": 267 + }, + { + "kind": "func", + "name": "GetMetrics", + "signature": "func (p *PodWithMetrics) GetMetrics() Metrics", + "line": 271 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p *PodWithMetrics) MarshalJSON() ([]byte, error)", + "line": 275 + }, + { + "kind": "func", + "name": "GetAllPodWithMetrics", + "signature": "func (s *Service) GetAllPodWithMetrics(ctx context.Context, params MeasurementParams) ([]PodWithMetrics, error)", + "line": 286 + } + ], + "line_count": 326 + }, + "collector/benthos/input/runai/pods.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Pod", + "signature": "type Pod struct", + "line": 11 + }, + { + "kind": "struct", + "name": "ListPodsParams", + "signature": "type ListPodsParams struct", + "line": 61 + }, + { + "kind": "struct", + "name": "ListPodsResponse", + "signature": "type ListPodsResponse struct", + "line": 66 + }, + { + "kind": "func", + "name": "ListPods", + "signature": "func (s *Service) ListPods(ctx context.Context, params ListPodsParams) (*ListPodsResponse, error)", + "line": 72 + }, + { + "kind": "func", + "name": "ListAllPods", + "signature": "func (s *Service) ListAllPods(ctx context.Context) ([]Pod, error)", + "line": 110 + } + ], + "line_count": 132 + }, + "collector/benthos/input/runai/service.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 13 + }, + { + "kind": "struct", + "name": "ServiceConfig", + "signature": "type ServiceConfig struct", + "line": 24 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(baseURL, appID, appSecret string, logger *service.Logger, config ServiceConfig) (*Service, error)", + "line": 35 + } + ], + "line_count": 94 + }, + "collector/benthos/input/runai/token.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "TokenRequest", + "signature": "type TokenRequest struct", + "line": 13 + }, + { + "kind": "struct", + "name": "TokenResponse", + "signature": "type TokenResponse struct", + "line": 20 + }, + { + "kind": "func", + "name": "RefreshToken", + "signature": "func (s *Service) RefreshToken(ctx context.Context) error", + "line": 25 + }, + { + "kind": "func", + "name": "GetToken", + "signature": "func (s *Service) GetToken() string", + "line": 51 + }, + { + "kind": "func", + "name": "SetToken", + "signature": "func (s *Service) SetToken(token string)", + "line": 56 + }, + { + "kind": "func", + "name": "NewToken", + "signature": "func (s *Service) NewToken(ctx context.Context) (string, error)", + "line": 61 + }, + { + "kind": "func", + "name": "verifyToken", + "signature": "func (s *Service) verifyToken() error", + "line": 86 + } + ], + "line_count": 106 + }, + "collector/benthos/input/runai/workloads.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Workload", + "signature": "type Workload struct", + "line": 16 + }, + { + "kind": "struct", + "name": "ListWorkloadParams", + "signature": "type ListWorkloadParams struct", + "line": 65 + }, + { + "kind": "struct", + "name": "ListWorkloadsResponse", + "signature": "type ListWorkloadsResponse struct", + "line": 70 + }, + { + "kind": "func", + "name": "ListWorkloads", + "signature": "func (s *Service) ListWorkloads(ctx context.Context, params ListWorkloadParams) (*ListWorkloadsResponse, error)", + "line": 76 + }, + { + "kind": "func", + "name": "ListAllWorkloads", + "signature": "func (s *Service) ListAllWorkloads(ctx context.Context) ([]Workload, error)", + "line": 140 + } + ], + "line_count": 162 + }, + "collector/benthos/input/schedule.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/redpanda-data/benthos/v4/public/service\"", + "symbols": [ + { + "kind": "func", + "name": "scheduleInputConfig", + "signature": "func scheduleInputConfig() *service.ConfigSpec", + "line": 13 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 27 + }, + { + "kind": "struct", + "name": "scheduleInput", + "signature": "type scheduleInput struct", + "line": 36 + }, + { + "kind": "func", + "name": "newScheduleInput", + "signature": "func newScheduleInput(conf *service.ParsedConfig) (*scheduleInput, error)", + "line": 42 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (in *scheduleInput) Connect(_ context.Context) error", + "line": 60 + }, + { + "kind": "func", + "name": "ReadBatch", + "signature": "func (in *scheduleInput) ReadBatch(ctx context.Context) (service.MessageBatch, service.AckFunc, error)", + "line": 64 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (in *scheduleInput) Close(ctx context.Context) error", + "line": 90 + } + ], + "line_count": 94 + }, + "collector/benthos/internal/LICENSE": { + "header": "Copyright (c) 2020 Ashley Jeffs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", + "symbols": [], + "line_count": 19 + }, + "collector/benthos/internal/logging/logging.go": { + "header": "\t\"github.com/go-logr/logr\"\n\t\"github.com/redpanda-data/benthos/v4/public/service\"\n\t\"k8s.io/klog/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "CtrlLogger", + "signature": "type CtrlLogger struct", + "line": 10 + }, + { + "kind": "func", + "name": "Init", + "signature": "func (l *CtrlLogger) Init(info logr.RuntimeInfo)", + "line": 15 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (l *CtrlLogger) Enabled(level int) bool", + "line": 18 + }, + { + "kind": "func", + "name": "Info", + "signature": "func (l *CtrlLogger) Info(level int, msg string, keysAndValues ...any)", + "line": 23 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (l *CtrlLogger) Error(err error, msg string, keysAndValues ...any)", + "line": 32 + }, + { + "kind": "func", + "name": "WithValues", + "signature": "func (l *CtrlLogger) WithValues(keysAndValues ...any) logr.LogSink", + "line": 37 + }, + { + "kind": "func", + "name": "WithName", + "signature": "func (l *CtrlLogger) WithName(name string) logr.LogSink", + "line": 42 + }, + { + "kind": "func", + "name": "NewLogrLogger", + "signature": "func NewLogrLogger(logger *service.Logger) logr.Logger", + "line": 47 + }, + { + "kind": "func", + "name": "SetupKlog", + "signature": "func SetupKlog(logger *service.Logger)", + "line": 52 + } + ], + "line_count": 54 + }, + "collector/benthos/internal/message/batch.go": { + "header": "type Batch = service.MessageBatch", + "symbols": [], + "line_count": 5 + }, + "collector/benthos/internal/message/transaction.go": { + "header": "type Transaction struct {\n\tPayload Batch\n\tresponseChan chan<- error", + "symbols": [ + { + "kind": "struct", + "name": "Transaction", + "signature": "type Transaction struct", + "line": 20 + }, + { + "kind": "func", + "name": "NewTransaction", + "signature": "func NewTransaction(payload Batch, resChan chan<- error) Transaction", + "line": 44 + }, + { + "kind": "func", + "name": "NewTransactionFunc", + "signature": "func NewTransactionFunc(payload Batch, fn func(context.Context, error) error) Transaction", + "line": 54 + }, + { + "kind": "func", + "name": "Context", + "signature": "func (t *Transaction) Context() context.Context", + "line": 69 + }, + { + "kind": "func", + "name": "WithContext", + "signature": "func (t *Transaction) WithContext(ctx context.Context) *Transaction", + "line": 76 + }, + { + "kind": "func", + "name": "Ack", + "signature": "func (t *Transaction) Ack(ctx context.Context, err error) error", + "line": 86 + } + ], + "line_count": 96 + }, + "collector/benthos/internal/shutdown/signaler.go": { + "header": "\t\"context\"\n\t\"sync\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Signaller", + "signature": "type Signaller struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewSignaller", + "signature": "func NewSignaller() *Signaller", + "line": 35 + }, + { + "kind": "func", + "name": "CloseAtLeisure", + "signature": "func (s *Signaller) CloseAtLeisure()", + "line": 46 + }, + { + "kind": "func", + "name": "CloseNow", + "signature": "func (s *Signaller) CloseNow()", + "line": 54 + }, + { + "kind": "func", + "name": "ShutdownComplete", + "signature": "func (s *Signaller) ShutdownComplete()", + "line": 63 + }, + { + "kind": "func", + "name": "ShouldCloseAtLeisure", + "signature": "func (s *Signaller) ShouldCloseAtLeisure() bool", + "line": 73 + }, + { + "kind": "func", + "name": "CloseAtLeisureChan", + "signature": "func (s *Signaller) CloseAtLeisureChan() <-chan struct", + "line": 84 + }, + { + "kind": "func", + "name": "CloseAtLeisureCtx", + "signature": "func (s *Signaller) CloseAtLeisureCtx(ctx context.Context) (context.Context, context.CancelFunc)", + "line": 91 + }, + { + "kind": "func", + "name": "ShouldCloseNow", + "signature": "func (s *Signaller) ShouldCloseNow() bool", + "line": 106 + }, + { + "kind": "func", + "name": "CloseNowChan", + "signature": "func (s *Signaller) CloseNowChan() <-chan struct", + "line": 117 + }, + { + "kind": "func", + "name": "CloseNowCtx", + "signature": "func (s *Signaller) CloseNowCtx(ctx context.Context) (context.Context, context.CancelFunc)", + "line": 124 + }, + { + "kind": "func", + "name": "HasClosed", + "signature": "func (s *Signaller) HasClosed() bool", + "line": 139 + }, + { + "kind": "func", + "name": "HasClosedChan", + "signature": "func (s *Signaller) HasClosedChan() <-chan struct", + "line": 150 + }, + { + "kind": "func", + "name": "HasClosedCtx", + "signature": "func (s *Signaller) HasClosedCtx(ctx context.Context) (context.Context, context.CancelFunc)", + "line": 157 + } + ], + "line_count": 168 + }, + "collector/benthos/output/openmeter.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "func", + "name": "openmeterOutputConfig", + "signature": "func openmeterOutputConfig() *service.ConfigSpec", + "line": 38 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 62 + }, + { + "kind": "struct", + "name": "openmeterOutput", + "signature": "type openmeterOutput struct", + "line": 87 + }, + { + "kind": "func", + "name": "newOpenMeterOutput", + "signature": "func newOpenMeterOutput(conf *service.ParsedConfig, mgr *service.Resources) (*openmeterOutput, error)", + "line": 96 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (o *openmeterOutput) Connect(_ context.Context) error", + "line": 139 + }, + { + "kind": "func", + "name": "WriteBatch", + "signature": "func (o *openmeterOutput) WriteBatch(ctx context.Context, batch service.MessageBatch) error", + "line": 144 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (o *openmeterOutput) Close(_ context.Context) error", + "line": 246 + }, + { + "kind": "func", + "name": "UpdateMessageSpan", + "signature": "func (o *openmeterOutput) UpdateMessageSpan(ctx context.Context, msg *service.Message)", + "line": 250 + }, + { + "kind": "func", + "name": "toAttrs", + "signature": "func toAttrs(prefix string, v interface{}) []attribute.KeyValue", + "line": 304 + } + ], + "line_count": 331 + }, + "collector/benthos/output/otel_log.go": { + "header": "\t\"context\"\n\t\"github.com/redpanda-data/benthos/v4/public/service\"\n\tcollogspb \"go.opentelemetry.io/proto/otlp/collector/logs/v1\"", + "symbols": [ + { + "kind": "func", + "name": "otelLogOutputConfig", + "signature": "func otelLogOutputConfig() *service.ConfigSpec", + "line": 14 + }, + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 29 + }, + { + "kind": "struct", + "name": "otelLogOutput", + "signature": "type otelLogOutput struct", + "line": 54 + }, + { + "kind": "func", + "name": "newOtelLogOutput", + "signature": "func newOtelLogOutput(conf *service.ParsedConfig) (*otelLogOutput, error)", + "line": 61 + }, + { + "kind": "func", + "name": "Connect", + "signature": "func (out *otelLogOutput) Connect(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "WriteBatch", + "signature": "func (out *otelLogOutput) WriteBatch(ctx context.Context, batch service.MessageBatch) error", + "line": 89 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (out *otelLogOutput) Close(_ context.Context) error", + "line": 120 + } + ], + "line_count": 124 + }, + "collector/benthos/presets/http-server/config.yaml": { + "header": "logger:\n level: \"${LOG_LEVEL:DEBUG}\"\n format: \"${LOG_FORMAT:json}\"\n # Log fields that are constant across all events\n static_fields:\n service: \"openmeter-collector\"\n instance: \"${K8S_APP_INSTANCE:unknown}\"\n version: \"${K8S_APP_VERSION:unknown}\"\n\n# Timeout before shutting down the collector\nshutdown_timeout: 10s\n\nhttp:\n enabled: true\n address: 0.0.0.0:4195\n debug_endpoints: false\n\n# Define the input sources for collecting metrics\ninput:\n http_server:", + "symbols": [], + "line_count": 118 + }, + "collector/benthos/presets/kubernetes-pod-exec-time/config.yaml": { + "header": "input:\n schedule:\n input:\n kubernetes_resources:\n namespaces:\n - ${SCRAPE_NAMESPACE:}\n label_selector: \"app=seed\"\n interval: \"${SCRAPE_INTERVAL:15s}\"\n\npipeline:\n processors:\n - mapping: |\n let duration_seconds = (meta(\"schedule_interval\").parse_duration() / 1000 / 1000 / 1000).round().int64()\n root = {\n \"id\": uuid_v4(),\n \"specversion\": \"1.0\",\n \"type\": \"kubernetes\",\n \"source\": \"kubernetes-api\",\n \"time\": meta(\"schedule_time\"),\n \"subject\": this.metadata.annotations.\"openmeter.io/subject\".or(this.metadata.name),", + "symbols": [], + "line_count": 63 + }, + "collector/benthos/services/leaderelection/flags.go": { + "header": "\t\"os\"\n\t\"time\"\n\t\"github.com/urfave/cli/v2\"", + "symbols": [], + "line_count": 69 + }, + "collector/benthos/services/leaderelection/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 27 + }, + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 38 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(res *service.Resources, cfg Config) (*Service, error)", + "line": 51 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (s *Service) Start(ctx context.Context) error", + "line": 115 + }, + { + "kind": "func", + "name": "Stop", + "signature": "func (s *Service) Stop(ctx context.Context)", + "line": 165 + }, + { + "kind": "func", + "name": "GetLeaderElectionCLIOpts", + "signature": "func GetLeaderElectionCLIOpts(ctx context.Context) []service.CLIOptFunc", + "line": 178 + }, + { + "kind": "func", + "name": "IsLeader", + "signature": "func IsLeader(res *service.Resources) bool", + "line": 231 + } + ], + "line_count": 245 + }, + "collector/cmd/main.go": { + "header": "\t\"context\"\n\t_ \"github.com/redpanda-data/benthos/v4/public/components/io\"\n\t_ \"github.com/redpanda-data/benthos/v4/public/components/pure\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 18 + } + ], + "line_count": 24 + }, + "collector/cmd/version.go": { + "header": "var version string\nfunc init() {\n\tif version == \"\" {", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 7 + } + ], + "line_count": 11 + }, + "collector/go.mod": { + "header": "module github.com/openmeterio/openmeter/collector\n\ngo 1.26.3\n\nreplace github.com/openmeterio/openmeter => ../\n\nrequire (\n\tgithub.com/go-co-op/gocron/v2 v2.21.2\n\tgithub.com/go-logr/logr v1.4.3\n\tgithub.com/go-resty/resty/v2 v2.17.2\n\tgithub.com/golang-jwt/jwt/v5 v5.3.1\n\tgithub.com/openmeterio/openmeter v0.0.0\n\tgithub.com/prometheus/client_golang v1.23.2\n\tgithub.com/prometheus/common v0.68.0\n\tgithub.com/redpanda-data/benthos/v4 v4.73.0\n\tgithub.com/redpanda-data/connect/public/bundle/free/v4 v4.93.0\n\tgithub.com/robfig/cron/v3 v3.0.1\n\tgithub.com/samber/lo v1.53.0\n\tgithub.com/urfave/cli/v2 v2.27.7\n\tgo.opentelemetry.io/otel v1.44.0", + "symbols": [], + "line_count": 492 + }, + "collector/quickstart/collector/config.yaml": { + "header": "http:\n enabled: true\n address: 0.0.0.0:4195\n debug_endpoints: false\n\nmetrics:\n prometheus: {}\n\n#tracer:\n# open_telemetry_collector:\n# grpc:\n# - address: :4317\n# tags:\n# application: openmeter-collector\n# sampling:\n# enabled: false", + "symbols": [], + "line_count": 16 + }, + "collector/quickstart/collector/resources/dedupe-cache.yaml": { + "header": "cache_resources:\n - label: dedupe_cache\n memory:\n default_ttl: 1h", + "symbols": [], + "line_count": 4 + }, + "collector/quickstart/collector/streams/input.yaml": { + "header": "input:\n http_server:\n address: 0.0.0.0:8889\n path: /api/v1/events\n sync_response:\n status: '${! meta(\"http_response_status\").or(\"204\") }'\n\npipeline:\n processors:\n - switch:\n - check: meta(\"Content-Type\").lowercase() == \"application/cloudevents-batch+json\"\n processors:\n - unarchive:\n format: json_array\n - check: meta(\"Content-Type\").lowercase() == \"application/cloudevents+json\"\n processors:\n - noop: {}\n - check: \"\"\n processors:\n - log:", + "symbols": [], + "line_count": 75 + }, + "collector/quickstart/collector/streams/output.yaml": { + "header": "input:\n inproc: openmeter\n\nbuffer:\n sqlite:\n path: /var/lib/collector/buffer.sqlite\n post_processors:\n - split: {}\n\noutput:\n openmeter:\n url: \"${OPENMETER_URL:https://openmeter.cloud}\"\n token: \"${OPENMETER_TOKEN:}\"\n batching:\n count: ${BATCH_SIZE:1}\n period: ${BATCH_PERIOD:30s}", + "symbols": [], + "line_count": 16 + }, + "collector/quickstart/docker-compose.yaml": { + "header": "include:\n - ../../quickstart/docker-compose.yaml\n\nservices:\n collector:\n image: ghcr.io/openmeterio/benthos-collector:latest\n ports:\n - \"127.0.0.1:4195:4195\"\n environment:\n OPENMETER_URL: http://openmeter:8888\n BATCH_SIZE: 1\n command: [\n \"--config\",\n \"/etc/collector/config.yaml\",\n \"--log.level\",\n \"debug\",\n \"--resources\",\n \"/etc/collector/resources/*.yaml\",\n \"streams\",\n \"--no-api\",", + "symbols": [], + "line_count": 65 + }, + "collector/quickstart/seeder/config.yaml": { + "header": "http:\n enabled: true\n address: 0.0.0.0:4196\n debug_endpoints: false\n\ninput:\n generate:\n count: ${SEEDER_COUNT:0}\n interval: \"${SEEDER_INTERVAL:50ms}\"\n # batch_size: 1\n mapping: |\n let max_subjects = ${SEEDER_MAX_SUBJECTS:10}\n\n let event_type = \"request\"\n let source = \"api-gateway\"\n let methods = [\"GET\", \"POST\"]\n let paths = [\"/\", \"/about\", \"/contact\", \"/pricing\", \"/docs\"]\n let regions = [\"us-east-1\", \"us-west-1\", \"us-east-2\", \"us-west-2\"]\n let zoneSuffixes = [\"a\", \"b\", \"c\", \"d\"]\n", + "symbols": [], + "line_count": 63 + }, + "config.example.yaml": { + "header": "address: 127.0.0.1:8888\n\ntelemetry:\n log:\n level: debug\n # For writing to a file\n exporters:\n # file:\n # enabled: true\n # filepath: \"./openmeter.log\"\n # prettyprint: true # optional\n\ntermination:\n # checkInterval defines the time period used for updating the readiness check based on the termination status.\n checkInterval: 1s\n # gracefulShutdownTimeout defines the maximum time for the process to gracefully stop on receiving stop signal.\n gracefulShutdownTimeout: 30s\n # propagationTimeout defines how long to block the termination process in order\n # to allow the termination event to be propagated to other systems. e.g. reverse proxy.\n # Its value should be set higher than the failure threshold for readiness probe.", + "symbols": [], + "line_count": 237 + }, + "deploy/README.md": { + "header": "# Deploy OpenMeter\n\n## Deploy OpenMeter to a local Kubernetes cluster\n\n## Prerequisites\n\n- [docker](https://www.docker.com/)\n- [kind](https://kind.sigs.k8s.io/)\n- [helm](https://helm.sh/)\n\n## 1. Check out this repository\n\n```shell\ngit clone git@github.com:openmeterio/openmeter.git\ncd openmeter/deploy\n```\n\n## 2. Setup local cluster\n\n```shell", + "symbols": [], + "line_count": 35 + }, + "deploy/charts/Makefile": { + "header": ".PHONY: docs\ndocs:\n\thelm-docs --log-level trace -s file -c . -t $$PWD/template.md -t README.tmpl.md", + "symbols": [], + "line_count": 3 + }, + "deploy/charts/benthos-collector/Chart.yaml": { + "header": "apiVersion: v2\ntype: application\nname: benthos-collector\nversion: 0.0.0\nappVersion: \"latest\"\ndescription: \"A Benthos-based collector for OpenMeter\"\nicon: https://openmeter.io/favicon.svg\nkeywords:\n - metering\n - usage\n - billing\n - aggregation\nhome: https://openmeter.io\nsources:\n - https://github.com/openmeterio/openmeter", + "symbols": [], + "line_count": 15 + }, + "deploy/charts/benthos-collector/README.md": { + "header": "# benthos-collector\n\n![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-benthos--collector-informational?style=flat-square)](https://artifacthub.io/packages/helm/openmeter/benthos-collector)\n\nA Benthos-based collector for OpenMeter\n\n**Homepage:** \n\n## TL;DR;\n\n```bash\nhelm install --generate-name --wait oci://ghcr.io/openmeterio/helm-charts/benthos-collector\n```\n\nto install a specific version:\n\n```bash\nhelm install --generate-name --wait oci://ghcr.io/openmeterio/helm-charts/benthos-collector --version $VERSION\n```\n", + "symbols": [], + "line_count": 72 + }, + "deploy/charts/benthos-collector/README.tmpl.md": { + "header": "{{ template \"chart.base\" . }}", + "symbols": [], + "line_count": 1 + }, + "deploy/charts/benthos-collector/templates/_helpers.tpl": { + "header": "{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"benthos-collector.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" }}\n{{- end }}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"benthos-collector.fullname\" -}}\n{{- if .Values.fullnameOverride }}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" }}\n{{- else }}\n{{- $name := default .Chart.Name .Values.nameOverride }}\n{{- if contains $name .Release.Name }}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" }}\n{{- else }}", + "symbols": [], + "line_count": 113 + }, + "deploy/charts/benthos-collector/templates/configmap.yaml": { + "header": "{{- if ne (len .Values.caRootCertificates) 0 -}}\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: ca-certificates\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\ndata:\n {{- range $ca, $cert := .Values.caRootCertificates }}\n {{- cat $ca \".crt\" | nospace | lower | nindent 2 }}: |\n {{- $cert | nindent 4 }}\n {{- end }}\n{{- end }}", + "symbols": [], + "line_count": 13 + }, + "deploy/charts/benthos-collector/templates/rbac.yaml": { + "header": "{{- if .Values.rbac.create }}\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\nrules:\n - apiGroups: [\"\"]\n resources: [\"pods\", \"nodes\", \"persistentvolumeclaims\", \"persistentvolumes\"]\n verbs: [\"watch\", \"list\", \"get\"]\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\nroleRef:\n kind: ClusterRole", + "symbols": [], + "line_count": 54 + }, + "deploy/charts/benthos-collector/templates/secret.yaml": { + "header": "apiVersion: v1\nkind: Secret\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\ntype: Opaque\ndata:\n OPENMETER_URL: {{ required \"OpenMeter URL is required\" .Values.openmeter.url | b64enc | quote }}\n {{- with .Values.openmeter.token }}\n OPENMETER_TOKEN: {{ . | b64enc | quote }}\n {{- end }}\n\n\n---\napiVersion: v1\nkind: Secret\nmetadata:\n name: {{ include \"benthos-collector.componentName\" (list . \"config\") }}\n labels:", + "symbols": [], + "line_count": 24 + }, + "deploy/charts/benthos-collector/templates/service.yaml": { + "header": "{{- if .Values.service.enabled }}\napiVersion: v1\nkind: Service\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\n {{- with .Values.service.annotations }}\n annotations:\n {{- toYaml . | nindent 4 }}\n {{- end }}\nspec:\n type: {{ .Values.service.type }}\n ports:\n - port: {{ .Values.service.port }}\n targetPort: http\n protocol: TCP\n name: http\n selector:\n {{- include \"benthos-collector.selectorLabels\" . | nindent 4 }} ", + "symbols": [], + "line_count": 21 + }, + "deploy/charts/benthos-collector/templates/serviceaccount.yaml": { + "header": "{{- if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ include \"benthos-collector.serviceAccountName\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\n {{- with .Values.serviceAccount.annotations }}\n annotations:\n {{- toYaml . | nindent 4 }}\n {{- end }}\nautomountServiceAccountToken: {{ .Values.serviceAccount.automount }}\n{{- end }}", + "symbols": [], + "line_count": 13 + }, + "deploy/charts/benthos-collector/templates/statefulset.yaml": { + "header": "apiVersion: apps/v1\nkind: StatefulSet\nmetadata:\n name: {{ include \"benthos-collector.fullname\" . }}\n labels:\n {{- include \"benthos-collector.labels\" . | nindent 4 }}\nspec:\n replicas: {{ .Values.replicaCount | int }}\n serviceName: {{ include \"benthos-collector.fullname\" . }}\n selector:\n matchLabels:\n {{- include \"benthos-collector.selectorLabels\" . | nindent 6 }}\n template:\n metadata:\n annotations:\n checksum/config: {{ .Values.config | toYaml | sha256sum }}\n checksum/secret: {{ .Values.openmeter | toYaml | sha256sum }}\n {{- with .Values.podAnnotations }}\n {{- toYaml . | nindent 8 }}\n {{- end }}", + "symbols": [], + "line_count": 175 + }, + "deploy/charts/benthos-collector/values.yaml": { + "header": "# Default values for benthos-collector.\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates.\n\nimage:\n # -- Name of the image repository to pull the container image from.\n repository: ghcr.io/openmeterio/benthos-collector\n\n # -- [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for updating already existing images on a node.\n pullPolicy: IfNotPresent\n\n # -- Image tag override for the default value (chart appVersion).\n tag: \"\"\n\n# -- Number of replicas of pods in the StatefulSet\nreplicaCount: 1\n\nopenmeter:\n # -- OpenMeter API URL\n url: https://openmeter.cloud", + "symbols": [], + "line_count": 181 + }, + "deploy/charts/openmeter/.gitignore": { + "header": "/charts/", + "symbols": [], + "line_count": 1 + }, + "deploy/charts/openmeter/Chart.yaml": { + "header": "apiVersion: v2\ntype: application\nname: openmeter\nversion: 1.0.0-beta.213\nappVersion: \"v1.0.0-beta.213\"\ndescription: \"Usage Metering for AI, DevOps, and Billing. Built for engineers to collect and aggregate millions of events in real-time.\"\nicon: https://openmeter.io/favicon.svg\nkeywords:\n - metering\n - usage\n - billing\n - aggregation\nhome: https://openmeter.io\nsources:\n - https://github.com/openmeterio/openmeter\ndependencies:\n - name: altinity-clickhouse-operator\n version: \"0.23.3\"\n repository: \"https://docs.altinity.com/clickhouse-operator/\"\n condition: clickhouse.operator.install", + "symbols": [], + "line_count": 33 + }, + "deploy/charts/openmeter/README.md": { + "header": "# openmeter\n\n![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-openmeter-informational?style=flat-square)](https://artifacthub.io/packages/helm/openmeter/openmeter)\n\nUsage Metering for AI, DevOps, and Billing. Built for engineers to collect and aggregate millions of events in real-time.\n\n**Homepage:** \n\n## Requirements\n\n| Repository | Name | Version |\n|------------|------|---------|\n| https://docs.altinity.com/clickhouse-operator/ | altinity-clickhouse-operator | 0.23.3 |\n| oci://registry-1.docker.io/bitnamicharts | kafka | 30.1.8 |\n| oci://registry-1.docker.io/bitnamicharts | postgresql | 16.1.2 |\n| oci://registry-1.docker.io/bitnamicharts | redis | 20.2.1 |\n\n## TL;DR;\n\n```bash", + "symbols": [], + "line_count": 167 + }, + "deploy/charts/openmeter/README.tmpl.md": { + "header": "{{ template \"chart.baseHead\" . }}\n\n\n## Getting started\n\nOpenMeter needs meters to be defined in configuration to process events:\n\n```yaml\nconfig:\n meters:\n - slug: m1\n description: API calls\n eventType: api-calls\n valueProperty: $.duration_ms\n aggregation: SUM\n groupBy:\n method: $.method\n path: $.path\n```\n", + "symbols": [], + "line_count": 75 + }, + "deploy/charts/openmeter/templates/NOTES.txt": { + "header": "Thank you for installing OpenMeter!\n\n{{ if .Values.postgresql.enabled }}\nIt is highly recommended to use your own Postgres for production deployments!\n{{- end }}\n{{- if .Values.clickhouse.enabled }}\nIt is highly recommended to use your own Clickhouse for production deployments!\n{{- end }}\n{{- if .Values.clickhouse.enabled }}\nIt is highly recommended to use your own ClickHouse for production deployments!\n{{- end }}\n{{- if .Values.kafka.enabled }}\nIt is highly recommended to use your own Kafka for production deployments!\n{{- end }}\n{{- if .Values.redis.enabled }}\nIt is highly recommended to use your own Redis for production deployments!\n{{- end }}\n{{- if .Values.svix.enabled }}\nIt is highly recommended to use your own Svix for production deployments!\n{{- end }}", + "symbols": [], + "line_count": 20 + }, + "deploy/charts/openmeter/templates/_helpers.tpl": { + "header": "{{/*\nExpand the name of the chart.\n*/}}\n{{- define \"openmeter.name\" -}}\n{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix \"-\" }}\n{{- end }}\n\n{{/*\nCreate a default fully qualified app name.\nWe truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).\nIf release name contains chart name it will be used as a full name.\n*/}}\n{{- define \"openmeter.fullname\" -}}\n{{- if .Values.fullnameOverride }}\n{{- .Values.fullnameOverride | trunc 63 | trimSuffix \"-\" }}\n{{- else }}\n{{- $name := default .Chart.Name .Values.nameOverride }}\n{{- if contains $name .Release.Name }}\n{{- .Release.Name | trunc 63 | trimSuffix \"-\" }}\n{{- else }}", + "symbols": [], + "line_count": 166 + }, + "deploy/charts/openmeter/templates/clickhouse.yaml": { + "header": "{{- if .Values.clickhouse.enabled -}}\napiVersion: clickhouse.altinity.com/v1\nkind: ClickHouseInstallation\nmetadata:\n name: {{ include \"openmeter.fullname\" . }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"clickhouse\") | nindent 4 }}\nspec:\n defaults:\n templates:\n podTemplate: pod-template-with-volumes\n serviceTemplate: svc-template\n configuration:\n clusters:\n - name: {{ include \"openmeter.fullname\" . }}\n users:\n default/networks/ip: \"::/0\"\n templates:\n podTemplates:\n - name: pod-template-with-volumes", + "symbols": [], + "line_count": 54 + }, + "deploy/charts/openmeter/templates/configmap.yaml": { + "header": "{{- define \"openmeter.helmValuesConfig\" -}}\n{{/* Overwrite kafka config if self-hosted kafka is used */}}\n{{- if .Values.kafka.enabled -}}\ningest:\n kafka:\n broker: {{ include \"openmeter.componentName\" (list . \"kafka\") }}-controller-headless:9092\nsink:\n kafka:\n brokers: {{ include \"openmeter.componentName\" (list . \"kafka\") }}-controller-headless:9092\n{{- end }}\n\n{{/* Overwrite clickhouse config if self-hosted clickhouse is used */}}\n{{- if .Values.clickhouse.enabled -}}\naggregation:\n clickhouse:\n address: clickhouse-{{ include \"openmeter.fullname\" . }}:9000\n username: default\n password: \"\"\n database: default\n{{- end }}", + "symbols": [], + "line_count": 67 + }, + "deploy/charts/openmeter/templates/deployment.yaml": { + "header": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ include \"openmeter.componentName\" (list . \"api\") }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"api\") | nindent 4 }}\nspec:\n replicas: {{ .Values.api.replicaCount }}\n selector:\n matchLabels:\n {{- include \"openmeter.componentSelectorLabels\" (list . \"api\") | nindent 6 }}\n template:\n metadata:\n annotations:\n {{- with .Values.podAnnotations }}\n {{- toYaml . | nindent 8 }}\n {{- end }}\n checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"api\") | nindent 8 }}", + "symbols": [], + "line_count": 462 + }, + "deploy/charts/openmeter/templates/ingress.yaml": { + "header": "{{- if .Values.ingress.enabled -}}\n{{- $fullName := include \"openmeter.fullname\" . -}}\n{{- $svcName := include \"openmeter.componentName\" (list . \"api\") -}}\n{{- $svcPort := .Values.service.port -}}\n{{- if and .Values.ingress.className (not (semverCompare \">=1.18-0\" .Capabilities.KubeVersion.GitVersion)) }}\n {{- if not (hasKey .Values.ingress.annotations \"kubernetes.io/ingress.class\") }}\n {{- $_ := set .Values.ingress.annotations \"kubernetes.io/ingress.class\" .Values.ingress.className}}\n {{- end }}\n{{- end }}\n{{- if semverCompare \">=1.19-0\" .Capabilities.KubeVersion.GitVersion -}}\napiVersion: networking.k8s.io/v1\n{{- else if semverCompare \">=1.14-0\" .Capabilities.KubeVersion.GitVersion -}}\napiVersion: networking.k8s.io/v1beta1\n{{- else -}}\napiVersion: extensions/v1beta1\n{{- end }}\nkind: Ingress\nmetadata:\n name: {{ $fullName }}\n labels:", + "symbols": [], + "line_count": 62 + }, + "deploy/charts/openmeter/templates/jobs.yaml": { + "header": "---\napiVersion: batch/v1\nkind: CronJob\nmetadata:\n name: {{ include \"openmeter.componentName\" (list . \"subscription-sync\") }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"subscription-sync\") | nindent 4 }}\nspec:\n schedule: \"{{ .Values.jobs.subscriptionSync.schedule }}\"\n concurrencyPolicy: Forbid\n jobTemplate:\n metadata:\n annotations:\n {{- with .Values.podAnnotations }}\n {{- toYaml . | nindent 8 }}\n {{- end }}\n checksum/config: {{ include (print $.Template.BasePath \"/configmap.yaml\") . | sha256sum }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"subscription-sync\") | nindent 8 }}\n {{- with .Values.podLabels }}", + "symbols": [], + "line_count": 288 + }, + "deploy/charts/openmeter/templates/service.yaml": { + "header": "apiVersion: v1\nkind: Service\nmetadata:\n name: {{ include \"openmeter.componentName\" (list . \"api\") }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"api\") | nindent 4 }}\nspec:\n type: {{ .Values.service.type }}\n ports:\n - port: {{ .Values.service.port }}\n targetPort: http\n protocol: TCP\n name: http\n selector:\n {{- include \"openmeter.componentSelectorLabels\" (list . \"api\") | nindent 4 }}", + "symbols": [], + "line_count": 15 + }, + "deploy/charts/openmeter/templates/serviceaccount.yaml": { + "header": "{{- if .Values.serviceAccount.create -}}\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: {{ include \"openmeter.serviceAccountName\" . }}\n labels:\n {{- include \"openmeter.labels\" . | nindent 4 }}\n {{- with .Values.serviceAccount.annotations }}\n annotations:\n {{- toYaml . | nindent 4 }}\n {{- end }}\nautomountServiceAccountToken: {{ .Values.serviceAccount.automount }}\n{{- end }}", + "symbols": [], + "line_count": 13 + }, + "deploy/charts/openmeter/templates/svix.yaml": { + "header": "{{- if .Values.svix.enabled -}}\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: {{ include \"openmeter.componentName\" (list . \"svix\") }}\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"svix\") | nindent 4 }}\nspec:\n replicas: {{ .Values.svix.replicaCount }}\n selector:\n matchLabels:\n {{- include \"openmeter.componentSelectorLabels\" (list . \"svix\") | nindent 6 }}\n template:\n metadata:\n labels:\n {{- include \"openmeter.componentLabels\" (list . \"svix\") | nindent 8 }}\n spec:\n serviceAccountName: {{ include \"openmeter.serviceAccountName\" . }}\n securityContext:\n {{- toYaml .Values.podSecurityContext | nindent 8 }}", + "symbols": [], + "line_count": 83 + }, + "deploy/charts/openmeter/values.example.yaml": { + "header": "config:\n events:\n enabled: true\n notification:\n enabled: true\n entitlements:\n enabled: true\n meters:\n # Sample meter to count API requests\n - slug: api_requests_total # Unique identifier for the meter\n description: API Requests\n eventType: request # Filter events by type\n aggregation: COUNT # Aggregation method: COUNT, SUM, etc.\n groupBy:\n method: $.method # HTTP Method: GET, POST, etc.\n route: $.route # Route: /products/:product_id\n\n # Sample meter to count LLM Token Usage\n - slug: tokens_total\n description: AI Token Usage", + "symbols": [], + "line_count": 26 + }, + "deploy/charts/openmeter/values.yaml": { + "header": "# Default values for openmeter.\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates.\n\nimage:\n # -- Name of the image repository to pull the container image from.\n repository: ghcr.io/openmeterio/openmeter\n\n # -- [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for updating already existing images on a node.\n pullPolicy: IfNotPresent\n\n # -- Image tag override for the default value (chart appVersion).\n tag: \"\"\n\n# -- Reference to one or more secrets to be used when [pulling images](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) (from private registries).\nimagePullSecrets: []\n\n# -- A name in place of the chart name for `app:` labels.\nnameOverride: \"\"\n", + "symbols": [], + "line_count": 338 + }, + "deploy/charts/template.md": { + "header": "{{- define \"chart.versionBadge\" -}}\n![version: {{ .Version }}](https://img.shields.io/badge/version-{{ .Version | replace \"-\" \"--\" }}-informational?style=flat-square)\n{{- end -}}\n\n{{- define \"chart.typeBadge\" -}}\n{{- if .Type -}}![type: {{ .Type }}](https://img.shields.io/badge/type-{{ .Type }}-informational?style=flat-square){{- end -}}\n{{- end -}}\n\n{{- define \"chart.appVersionBadge\" -}}\n{{- if .AppVersion -}}![app version: {{ .AppVersion }}](https://img.shields.io/badge/app%20version-{{ .AppVersion | replace \"-\" \"--\" }}-informational?style=flat-square){{- end -}}\n{{- end -}}\n\n{{- define \"chart.kubeVersionBadge\" -}}\n{{- if .KubeVersion -}}![kube version: {{ .KubeVersion }}](https://img.shields.io/badge/kube%20version-{{ .KubeVersion | replace \"-\" \"--\" }}-informational?style=flat-square){{- end -}}\n{{- end -}}\n\n{{- define \"chart.artifactHubBadge\" -}}\n[![artifact hub](https://img.shields.io/badge/artifact%20hub-{{ .Name | replace \"-\" \"--\" }}-informational?style=flat-square)](https://artifacthub.io/packages/helm/openmeter/{{ .Name }})\n{{- end -}}\n", + "symbols": [], + "line_count": 57 + }, + "deploy/kind.yaml": { + "header": "kind: Cluster\napiVersion: kind.x-k8s.io/v1alpha4\nnodes:\n - role: control-plane\n kubeadmConfigPatches:\n - |\n kind: InitConfiguration\n nodeRegistration:\n kubeletExtraArgs:\n node-labels: \"ingress-ready=true\"\n extraPortMappings:\n - containerPort: 80\n hostPort: 80\n protocol: TCP\n - containerPort: 443\n hostPort: 443\n protocol: TCP", + "symbols": [], + "line_count": 17 + }, + "docker-compose.base.yaml": { + "header": "services:\n kafka:\n image: confluentinc/cp-kafka:8.0.3@sha256:db5eac24a1d15a1689fa89642ef97a7e3bc4f55ad5159a07b213c4dc7d0114e3\n environment:\n CLUSTER_ID: ca497efe-9f82-4b84-890b-d9969a9a2e1c\n KAFKA_BROKER_ID: 0\n KAFKA_PROCESS_ROLES: \"broker,controller\"\n KAFKA_CONTROLLER_QUORUM_VOTERS: \"0@kafka:9093\"\n KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER\n KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL\n KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT\n KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://localhost:29092\n KAFKA_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://0.0.0.0:29092,CONTROLLER://kafka:9093\n KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1\n KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0\n KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1\n KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1\n KAFKA_AUTO_CREATE_TOPICS_ENABLE: \"false\"\n # Message timestamp validation\n # See:", + "symbols": [], + "line_count": 152 + }, + "docker-compose.yaml": { + "header": "services:\n kafka:\n extends:\n file: docker-compose.base.yaml\n service: kafka\n ports:\n - \"127.0.0.1:29092:29092\"\n\n clickhouse:\n extends:\n file: docker-compose.base.yaml\n service: clickhouse\n ports:\n - \"127.0.0.1:8123:8123\"\n - \"127.0.0.1:9000:9000\"\n - \"127.0.0.1:9009:9009\"\n\n ch-ui:\n extends:\n file: docker-compose.base.yaml", + "symbols": [], + "line_count": 73 + }, + "docs/database-migration.md": { + "header": "# Database Migrations in OpenMeter\n\nOpenMeter uses [ent](https://entgo.io) for its data storage and schema management. Database state is synced from the ent schema definitions under `internal/ent/schema` via either `ent` schema upsertions or migrations.\n\n## AutoMigrate\n\nOpenMeter can automatically sync the database schema even in multi-instance deployments. This behavior can be configured via `postgres.autoMigrate` in the configuration.\n\n- Choosing the value of `ent` will internally call `ent.Schema.Create` which runs a schema upsertion. This is the default behavior, intended for development and testing.\n- Choosing the value of `migration` will automatically execute the scripts in the `migrations` directory.\n- Choosing the value of `false` will disable the automatic schema sync and lets the user manage the schema manually, for example `migrate -database \"postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable&x-migrations-table=schema_om\" -path ./services/common/migrations/om up`\n\n## Generating Migrations\n\nOpenMeter uses [atlas](https://atlasgo.io/) to generate versioned migrations from changes in the ent schema.\n\nAfter changing the schema and running `go generate` you can create a new migration diff via `atlas migrate --env local diff `, the generated migration files will be placed in the `migrations` directory.\n\n## Data Migrations\n", + "symbols": [], + "line_count": 35 + }, + "docs/decisions/0001-event-streaming-platform.md": { + "header": "# Event Streaming Platform\n\nTo handle the aggregation of millions of events per second, we needed to select a stream processing solution.\n\n## Context and Problem Statement\n\nUsage metering requires real-time processing of large event volumes with high accuracy to support billing and data-intensive applications such as DevTool, AI, and IoT.\nBalancing scale, accuracy, latency, and cost poses challenges:\n\n- Monitoring systems fall short in terms of accuracy and consistency necessary for billing\n- Scaling databases to handle large volumes of writes and real-time queries can be expensive\n- Warehouse processing leads to stale usage data and longer feedback cycles\n\n## Considered Options\n\n1. Kafka with Kafka Connect.\n2. Kafka with ksqlDB.\n3. InfinyOn Cloud.\n\n## Decision Outcome", + "symbols": [], + "line_count": 37 + }, + "docs/decisions/0002-event-format.md": { + "header": "# Event Format\n\nTo ensure seamless integration with infrastructure solutions and address common challenges like idempotency, we needed to choose an event format for usage ingestion.\n\n## Context and Problem Statement\n\nThe event format needed to fulfill the following requirements:\n\n- Integration with cloud infrastructure solutions.\n- Support for multiple programming languages.\n- Compatibility with various transport layers.\n- Flexible payload definition.\n- Support for batch ingestion.\n- Uniqueness enforcement.\n- Source and subject description.\n- Uniqueness definition.\n\n## Considered Options\n\n1. [CloudEvents](https://cloudevents.io/)", + "symbols": [], + "line_count": 31 + }, + "docs/decisions/0003-idempotency.md": { + "header": "# Idempotency\n\n## Context and Problem Statement\n\nEvent-driven ingestion requires idempotency to handle message retries, ensuring reliable processing.\nKey considerations are:\n\n- Distributed systems often guarantee least-once delivery.\n- Event replays may be necessary for failure and recovery scenarios.\n- CloudEvents are unique by ID + Source properties.\n\nNeither Kafka nor ksqlDB natively supports message idempotency.\n\n## Considered Options\n\nTo achieve idempotency we discovered event deduplication options both on producer (API Server) and consumer (ksqlDB) side:\n\n1. Redis with key expiration\n1. Redis with bloom filter\n1. Deduplication in ksqlDB via windowed tables", + "symbols": [], + "line_count": 61 + }, + "docs/decisions/0004-partitioning.md": { + "header": "# Partitioning\n\n## Context and Problem Statement\n\nKafka and ksqlDB achieve horizontal scalability through partitions, which can be assigned to dedicated Kafka brokers and ksqlDB instances.\n\n## Considered Options\n\nWe need to address the following challenges related to partitioning:\n\n- Defining partitioning key for producers, tables, and streams\n- Ensuring co-partitioning for certain ksqlDB operations like joins.\n- Making usage data retrievable by subject and group by properties\n- Determining the default number of partitions\n\n## Decision Outcome\n\n- Choose `subject` as the key for Kafka producers.\n- Include `subject` and group by properties in ksqlDB meter keys.\n- Make the number of partitions configurable.", + "symbols": [], + "line_count": 35 + }, + "docs/decisions/0005-clickhouse.md": { + "header": "# ClickHouse\n\nTo store historical usage data and to pre-aggregate events we choose ClickHouse.\n\n## Context and Problem Statement\n\nOpenMeter faces the need to store historical usage data and enable efficient querying of this data.\nAdditionally, our initial choice of the streaming processor, ksqlDB, revealed limitations when scaling for small to medium-sized producers.\nThe constraints stemmed from ksqlDB's limited capacity to run persisted queries per instance and its lack of support for clusterization.\n\n## Considered Options\n\n1. **ClickHouse**: A columnar database optimized for real-time analytics.\n2. **PostgreSQL**: A popular open-source relational database system.\n3. **Timescale**: An extension for PostgreSQL optimized for time-series data.\n4. **VictoriaMetrics**: A time-series database and monitoring solution.\n\n## Decision Outcome\n\nAfter careful consideration, we have selected ClickHouse in conjunction with Kafka Connect to address our requirements.", + "symbols": [], + "line_count": 38 + }, + "docs/event-ingestion.md": { + "header": "# Event Ingestion\n\nOpenMeter ingests usage data through events using the [CloudEvents](https://cloudevents.io/) specification incubated under CNCF.\n\nA usage event can be anything you need to track accurately over time for billing or analytics purposes.\nFor example, a CI/CD product can include active or parallel jobs, build minutes, network traffic, storage used, or other product-related actions.\n\n## Event Format\n\nAs we mentioned in the intro, OpenMeter ingests events using the CloudEvents specification from CNCF.\nThis event format is abstracted away in many of the cloud infrastructure integrations and SDKs from the end-user.\n\nHere is an example of a CloudEvent describing the execution duration of a serverless application:\n\n```json\n{\n \"specversion\": \"1.0\",\n \"type\": \"api-calls\",\n \"id\": \"00001\",\n \"time\": \"2023-01-01T00:00:00.001Z\",", + "symbols": [], + "line_count": 120 + }, + "docs/migration-guides/2025-06-26-subscription-alignment.md": { + "header": "# Deprecating Unaligned Subscriptions\n\nFrom Version: `v1.0.0-beta.214`\nTo Version: `v1.0.0-beta.215`\n\n## Summary\n\nUnaligned subscriptions are being deprecated. As the first step, OpenMeter will [error](/openmeter/productcatalog/errors.go#L411) when creating a new unaligned subscription. At a later point (`v1.0.0-beta.216`), alignment config (`BillablesMustAlign`) will be removed and all subscriptions will follow the current aligned behavior.\n\nThis document describes the manual migration steps if you are using unaligned subscriptions. For more information on the alignment behavior, see the [documentation](https://openmeter.io/docs/billing/subscription/overview).\n\n> We recommend you first read through this document before copy-pasting any queries. Be nice to your database.\n## Migration Steps\n\nThe aim of the process is to convert all unaligned subscriptions (and plans) to aligned subscriptions (and plans) while minimizing the guesswork required.\n\nWhile the generated cadences will be different between aligned and unaligned plans, an unaligned plan can be converted to an aligned plan if its cadence (BillingCadence) and every billable RateCard's billing cadence (ServiceCadence) meet the following criteria:\n\n```md\nFor each ServiceCadence, either:", + "symbols": [], + "line_count": 166 + }, + "docs/migration-guides/2025-08-12-subject-customer-consolidation.md": { + "header": "# Subject-Customer Consolidation\n\nOpenMeter has always separated usage owners (subjects) from billing\nentities (customers). This design stays, but now you can assign multiple\nsubjects to a customer.\n\nTo reduce complexity, usage sent with a Customer ID or Key is now\nautomatically mapped to that customer.\n\nWe are also unifying subjects and customers for entitlements and\nnotifications, making customer APIs the primary interface.\n\n## \ud83d\udd04 What's Changing\n\n### \ud83d\udd17 1. Consolidating Subject and Customer Entities\n\nCustomers now replace subjects as the primary entity. Mapping subjects\nto customers is optional and does not affect the ingest API or the\n`subject` field in usage events.\n", + "symbols": [], + "line_count": 193 + }, + "docs/migration-guides/2025-11-04-entitlement-events-v1.md": { + "header": "# Entitlement Events V1 Deprecation\n\nThis commit finally removes the V1 Entitlement Events from the codebase.\nThe V2 events were introduced in [85f7ec90](https://github.com/openmeterio/openmeter/commit/85f7ec9080ce9db3f8f5f363e2fa6d62270f4357) due to breaking schema changes.\nAt that point production of the V1 events was stopped in favor of the V2 events. **Before upgrading to this version, validate in your event processing that all V1 events are drained!**\nThis is especially relevant if you're upgrading from a version prior to [85f7ec90](https://github.com/openmeterio/openmeter/commit/85f7ec9080ce9db3f8f5f363e2fa6d62270f4357).", + "symbols": [], + "line_count": 6 + }, + "docs/seeder.md": { + "header": "# Seeding OpenMeter with sample data\n\nIt's often useful to seed OpenMeter with test data during development.\n\nWe use [Benthos](https://www.benthos.dev) as a seeder (even though it's not built for this purpose, it works just fine).\n\nTo run the seeder continuously ingesting data, run the following command:\n\n```sh\nmake seed\n```\n\nIf you would like to see the generated events, enable logging:\n\n```sh\nmake SEEDER_LOG=true seed\n```\n\nIn some cases, you might want to fine tune the total number of events and at what rate they are ingested:\n", + "symbols": [], + "line_count": 42 + }, + "docs/stripe-dev.md": { + "header": "# Developing against a stripe test account\n\n## Prerequisites\n\nThis guide assumes that you have the secret key available (starts with `sk_test`).\n\nYou have the stripe cli installed on your computer.\n\nBefore executing the following commands, please make sure that you are specifying the `--stripe-disable-webhook-registration` command line argument to the `Server` component (see (.vscode/launch.json)[../.vscode/launch.json]). This is required as OpenMeter would create a new webhook for your service on the stripe side. We are going to rely on the stripe cli instead, so that we don't clutter the test account's webhook list.\n\n## Setting up stripe\n\nPlease start the server using the `--stripe-disable-webhook-registration` arguments.\n\nRegister the stripe app (replace the `sk_test_***` with your API key):\n\n```sh\n# curl -H \"Content-Type: application/json\" -X POST -d '{\"apiKey\": \"sk_test_***\", \"name\": \"stripe\"}' http://127.0.0.1:8000/api/v1/marketplace/listings/stripe/install/apikey\n{\"app\":{\"createdAt\":\"2025-02-03T14:13:23.276159Z\",\"default\":true,\"description\":\"Stripe account ***\",\"id\":\"01JK62H967WX20W9E6RNS05E80\",\"listing\":{\"capabilities\":[{\"description\":\"Process payments\",\"key\":\"stripe_collect_payment\",\"name\":\"Payment\",\"type\":\"collectPayments\"},{\"description\":\"Calculate tax for a payment\",\"key\":\"stripe_calculate_tax\",\"name\":\"Calculate Tax\",\"type\":\"calculateTax\"},{\"description\":\"Invoice a customer\",\"key\":\"stripe_invoice_customer\",\"name\":\"Invoice Customer\",\"type\":\"invoiceCustomers\"}],\"description\":\"Send invoices, calculate tax and collect payments.\",\"name\":\"Stripe\",\"type\":\"stripe\"},\"livemode\":false,\"maskedAPIKey\":\"sk_test_***QpT\",\"metadata\":null,\"name\":\"stripe\",\"status\":\"ready\",\"stripeAccountId\":\"acct_1OSLCsE98Y117at0\",\"type\":\"stripe\",\"updatedAt\":\"2025-02-03T14:13:23.276165Z\"},\"defaultForCapabilityTypes\":[\"calculateTax\",\"invoiceCustomers\",\"collectPayments\"]}\n```", + "symbols": [], + "line_count": 81 + }, + "e2e/.gitignore": { + "header": "logs\ndocker-compose.override.yaml", + "symbols": [], + "line_count": 2 + }, + "e2e/Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\n.PHONY: test-local\ntest-local: ## Run tests against local openmeter\n\t$(call print-target)\n\t$(MAKE) env-local-down\n\t$(MAKE) env-local-up\n\n\t# wait for sink-worker to be ready\n\tcurl --retry 10 --retry-max-time 120 --retry-all-errors http://localhost:30000/healthz\n\n\tTZ=UTC OPENMETER_ADDRESS=http://localhost:38888 go test -count=1 -v ./...\n\n\t$(MAKE) env-local-down\n\n.PHONY: env-local-down\nenv-local-down:\n\t$(call print-target)\n\tdocker compose \\\n\t\t-f docker-compose.infra.yaml \\", + "symbols": [], + "line_count": 47 + }, + "e2e/addons_v3_test.go": { + "header": "\t\"net/http\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestV3Addon", + "signature": "func TestV3Addon(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestV3AddonMixedRateCardRoundTrip", + "signature": "func TestV3AddonMixedRateCardRoundTrip(t *testing.T)", + "line": 133 + }, + { + "kind": "func", + "name": "TestV3AddonVersioningAndAutoArchive", + "signature": "func TestV3AddonVersioningAndAutoArchive(t *testing.T)", + "line": 239 + }, + { + "kind": "func", + "name": "TestV3AddonFeatureReferenceResolution", + "signature": "func TestV3AddonFeatureReferenceResolution(t *testing.T)", + "line": 288 + }, + { + "kind": "func", + "name": "TestV3AddonPaymentTermPriceCompatibility", + "signature": "func TestV3AddonPaymentTermPriceCompatibility(t *testing.T)", + "line": 311 + }, + { + "kind": "func", + "name": "TestV3AddonInstanceTypePriceCompatibility", + "signature": "func TestV3AddonInstanceTypePriceCompatibility(t *testing.T)", + "line": 334 + } + ], + "line_count": 394 + }, + "e2e/config.yaml": { + "header": "address: 0.0.0.0:8080\n\ntelemetry:\n address: 0.0.0.0:10000\n log:\n level: debug\n exporters:\n file:\n enabled: true\n filepath: \"/var/log/openmeter/openmeter.log\"\n prettyprint: true\n\ningest:\n kafka:\n broker: kafka:9092\n\naggregation:\n clickhouse:\n address: clickhouse:9000\n retry:", + "symbols": [], + "line_count": 119 + }, + "e2e/customer_credits_v3_test.go": { + "header": "\t\"net/http\"\n\t\"net/url\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestV3CustomerCreditBalanceTimestampParamParsing", + "signature": "func TestV3CustomerCreditBalanceTimestampParamParsing(t *testing.T)", + "line": 14 + } + ], + "line_count": 37 + }, + "e2e/docker-compose.debug-ports.yaml": { + "header": "# Optional host port exposure for local debugging.\n# CI does not need these infra services reachable from the host.\nservices:\n kafka:\n ports:\n - \"127.0.0.1:39092:29092\"\n\n clickhouse:\n ports:\n - \"127.0.0.1:38123:8123\"\n - \"127.0.0.1:39000:9000\"\n - \"127.0.0.1:39009:9009\"\n\n redis:\n ports:\n - \"127.0.0.1:36379:6379\"", + "symbols": [], + "line_count": 16 + }, + "e2e/docker-compose.infra.yaml": { + "header": "# please use port numbers in the 30000 range so that it doesn't conflict with the main dev environment\nservices:\n kafka:\n extends:\n file: ../docker-compose.base.yaml\n service: kafka\n\n clickhouse:\n extends:\n file: ../docker-compose.base.yaml\n service: clickhouse\n\n redis:\n extends:\n file: ../docker-compose.base.yaml\n service: redis\n\n postgres:\n extends:\n file: ../docker-compose.base.yaml", + "symbols": [], + "line_count": 31 + }, + "e2e/docker-compose.openmeter-latest.yaml": { + "header": "services:\n openmeter:\n image: ghcr.io/openmeterio/openmeter:latest\n pull_policy: always\n\n sink-worker:\n image: ghcr.io/openmeterio/openmeter:latest\n pull_policy: always", + "symbols": [], + "line_count": 8 + }, + "e2e/docker-compose.openmeter-local.yaml": { + "header": "# Note: this can only be started using\n# docker compose -f docker-compose.infra.yaml -f docker-compose.openmeter.yaml up\n#\n# Given this is governed by the Makefile, it's fine to not to add all the extends here.\nservices:\n openmeter:\n build: ..\n\n sink-worker:\n build: ..", + "symbols": [], + "line_count": 10 + }, + "e2e/docker-compose.openmeter.yaml": { + "header": "# Note: this can only be started using\n# docker compose -f docker-compose.infra.yaml -f docker-compose.openmeter.yaml up\n#\n# Given this is governed by the Makefile, it's fine to not to add all the extends here.\nservices:\n openmeter:\n command: openmeter --address 0.0.0.0:8888 --config /etc/openmeter/config.yaml\n restart: always\n pull_policy: always\n depends_on:\n kafka:\n condition: service_healthy\n clickhouse:\n condition: service_healthy\n postgres:\n condition: service_healthy\n ports:\n - \"127.0.0.1:38888:8888\"\n volumes:\n - ./config.yaml:/etc/openmeter/config.yaml", + "symbols": [], + "line_count": 45 + }, + "e2e/e2e_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "Key", + "signature": "func (c customerIOTA) Key() string", + "line": 27 + }, + { + "kind": "func", + "name": "TestIngest", + "signature": "func TestIngest(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "TestIngestContentTypeApplicationJSON", + "signature": "func TestIngestContentTypeApplicationJSON(t *testing.T)", + "line": 92 + }, + { + "kind": "func", + "name": "TestBatchIngest", + "signature": "func TestBatchIngest(t *testing.T)", + "line": 170 + }, + { + "kind": "func", + "name": "TestInvalidIngest", + "signature": "func TestInvalidIngest(t *testing.T)", + "line": 226 + }, + { + "kind": "func", + "name": "TestDedupe", + "signature": "func TestDedupe(t *testing.T)", + "line": 433 + }, + { + "kind": "func", + "name": "TestQuery", + "signature": "func TestQuery(t *testing.T)", + "line": 478 + }, + { + "kind": "func", + "name": "TestQueryDSTTransition", + "signature": "func TestQueryDSTTransition(t *testing.T)", + "line": 980 + }, + { + "kind": "func", + "name": "TestCredit", + "signature": "func TestCredit(t *testing.T)", + "line": 1223 + } + ], + "line_count": 1760 + }, + "e2e/entitlement_parity_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "func", + "name": "TestEntitlementParitySuite", + "signature": "func TestEntitlementParitySuite(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestEntitlementDifferences", + "signature": "func TestEntitlementDifferences(t *testing.T)", + "line": 419 + } + ], + "line_count": 504 + }, + "e2e/entitlement_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "func", + "name": "TestEntitlementV2", + "signature": "func TestEntitlementV2(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestEntitlementWithUniqueCountAggregation", + "signature": "func TestEntitlementWithUniqueCountAggregation(t *testing.T)", + "line": 140 + }, + { + "kind": "func", + "name": "TestVoidGrantAtParam", + "signature": "func TestVoidGrantAtParam(t *testing.T)", + "line": 367 + }, + { + "kind": "func", + "name": "TestEntitlementISOUsagePeriod", + "signature": "func TestEntitlementISOUsagePeriod(t *testing.T)", + "line": 482 + }, + { + "kind": "func", + "name": "TestEntitlementWithLatestAggregation", + "signature": "func TestEntitlementWithLatestAggregation(t *testing.T)", + "line": 567 + } + ], + "line_count": 757 + }, + "e2e/helpers.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomerWithSubject", + "signature": "func CreateCustomerWithSubject(t *testing.T, client *api.ClientWithResponses, customerKey string, subjectKey string) *api.Customer", + "line": 22 + }, + { + "kind": "func", + "name": "GetMeterIDBySlug", + "signature": "func GetMeterIDBySlug(t *testing.T, client *api.ClientWithResponses, meterSlug string) string", + "line": 56 + }, + { + "kind": "func", + "name": "QueryMeterV3", + "signature": "func QueryMeterV3(t *testing.T, meterID string, body apiv3.MeterQueryRequest) (int, *apiv3.MeterQueryResult, error)", + "line": 67 + } + ], + "line_count": 108 + }, + "e2e/ledger_backfill_test.go": { + "header": "\t\"bytes\"\n\t\"os\"\n\t\"os/exec\"", + "symbols": [ + { + "kind": "func", + "name": "TestLedgerBackfillAccountsJob", + "signature": "func TestLedgerBackfillAccountsJob(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "ensureLocalComposeBackfillSupport", + "signature": "func ensureLocalComposeBackfillSupport(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "initE2EPostgresPool", + "signature": "func initE2EPostgresPool(t *testing.T) *pgxpool.Pool", + "line": 77 + }, + { + "kind": "func", + "name": "runJobsBackfillAccounts", + "signature": "func runJobsBackfillAccounts(t *testing.T, args ...string) string", + "line": 95 + }, + { + "kind": "func", + "name": "getCustomerAccountMappingCounts", + "signature": "func getCustomerAccountMappingCounts(t *testing.T, pool *pgxpool.Pool, namespace string, customerIDs []string) map[string]int", + "line": 126 + }, + { + "kind": "func", + "name": "getBusinessAccountIDs", + "signature": "func getBusinessAccountIDs(t *testing.T, pool *pgxpool.Pool, namespace string) map[ledger.AccountType]string", + "line": 160 + }, + { + "kind": "func", + "name": "getCustomerNamespace", + "signature": "func getCustomerNamespace(t *testing.T, pool *pgxpool.Pool, customerID string) string", + "line": 201 + }, + { + "kind": "func", + "name": "getCustomerAccountMappings", + "signature": "func getCustomerAccountMappings(t *testing.T, pool *pgxpool.Pool, namespace string, customerIDs []string) map[string]map[ledger.AccountType]string", + "line": 215 + } + ], + "line_count": 260 + }, + "e2e/multisubject_test.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestMultiSubject", + "signature": "func TestMultiSubject(t *testing.T)", + "line": 25 + } + ], + "line_count": 269 + }, + "e2e/planaddons_v3_test.go": { + "header": "\t\"net/http\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestV3PlanAddonAttachLifecycle", + "signature": "func TestV3PlanAddonAttachLifecycle(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestV3PlanAddonAttachStatusMatrix", + "signature": "func TestV3PlanAddonAttachStatusMatrix(t *testing.T)", + "line": 144 + }, + { + "kind": "func", + "name": "TestV3PlanAddonInstanceTypeMaxQuantityMatrix", + "signature": "func TestV3PlanAddonInstanceTypeMaxQuantityMatrix(t *testing.T)", + "line": 213 + }, + { + "kind": "func", + "name": "TestV3PlanAddonDetachRulesByPlanStatus", + "signature": "func TestV3PlanAddonDetachRulesByPlanStatus(t *testing.T)", + "line": 291 + }, + { + "kind": "func", + "name": "setupAttachedPlanAddon", + "signature": "func setupAttachedPlanAddon(t *testing.T, c *v3Client, keyPrefix string) (string, string)", + "line": 336 + }, + { + "kind": "func", + "name": "TestV3PlanAddonPublishAgainstArchivedAddon", + "signature": "func TestV3PlanAddonPublishAgainstArchivedAddon(t *testing.T)", + "line": 354 + }, + { + "kind": "func", + "name": "TestV3PlanAddonDuplicateAttachmentRejected", + "signature": "func TestV3PlanAddonDuplicateAttachmentRejected(t *testing.T)", + "line": 375 + }, + { + "kind": "func", + "name": "TestV3PlanAddonPublishWithAttachedAddon", + "signature": "func TestV3PlanAddonPublishWithAttachedAddon(t *testing.T)", + "line": 398 + }, + { + "kind": "func", + "name": "makePlanWithStatus", + "signature": "func makePlanWithStatus(t *testing.T, c *v3Client, keyPrefix string, target apiv3.BillingPlanStatus) *apiv3.BillingPlan", + "line": 439 + }, + { + "kind": "func", + "name": "makeAddonWithStatus", + "signature": "func makeAddonWithStatus(t *testing.T, c *v3Client, keyPrefix string, target apiv3.AddonStatus) *apiv3.Addon", + "line": 467 + } + ], + "line_count": 491 + }, + "e2e/plans_v3_test.go": { + "header": "\t\"net/http\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestV3PlanLifecycle", + "signature": "func TestV3PlanLifecycle(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestV3PlanPhaseValidationOnCreate", + "signature": "func TestV3PlanPhaseValidationOnCreate(t *testing.T)", + "line": 158 + }, + { + "kind": "func", + "name": "TestV3PlanInvalidDraftLifecycle", + "signature": "func TestV3PlanInvalidDraftLifecycle(t *testing.T)", + "line": 194 + }, + { + "kind": "func", + "name": "TestV3PlanDuplicateDraftKeyRejected", + "signature": "func TestV3PlanDuplicateDraftKeyRejected(t *testing.T)", + "line": 259 + }, + { + "kind": "func", + "name": "TestV3PlanDeleteWhileActiveRejected", + "signature": "func TestV3PlanDeleteWhileActiveRejected(t *testing.T)", + "line": 281 + }, + { + "kind": "func", + "name": "TestV3PlanUpdateAfterPublishRejected", + "signature": "func TestV3PlanUpdateAfterPublishRejected(t *testing.T)", + "line": 302 + }, + { + "kind": "func", + "name": "TestV3PlanVersioningAndAutoArchive", + "signature": "func TestV3PlanVersioningAndAutoArchive(t *testing.T)", + "line": 331 + }, + { + "kind": "func", + "name": "TestV3PlanPublishValidationCases", + "signature": "func TestV3PlanPublishValidationCases(t *testing.T)", + "line": 380 + }, + { + "kind": "func", + "name": "TestV3PlanInvalidCurrency", + "signature": "func TestV3PlanInvalidCurrency(t *testing.T)", + "line": 436 + } + ], + "line_count": 445 + }, + "e2e/productcatalog_smoke_v3_test.go": { + "header": "\t\"net/http\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestV3ProductCatalogSmoke", + "signature": "func TestV3ProductCatalogSmoke(t *testing.T)", + "line": 30 + } + ], + "line_count": 279 + }, + "e2e/productcatalog_test.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlan", + "signature": "func TestPlan(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestSettlementMode", + "signature": "func TestSettlementMode(t *testing.T)", + "line": 1188 + } + ], + "line_count": 1324 + }, + "e2e/setup_test.go": { + "header": "\t\"os\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "initClient", + "signature": "func initClient(t *testing.T) *api.ClientWithResponses", + "line": 12 + }, + { + "kind": "func", + "name": "shouldRunSlowTests", + "signature": "func shouldRunSlowTests(t *testing.T) bool", + "line": 26 + } + ], + "line_count": 30 + }, + "e2e/v3helpers_test.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "struct", + "name": "v3Client", + "signature": "type v3Client struct", + "line": 38 + }, + { + "kind": "func", + "name": "newV3Client", + "signature": "func newV3Client(t *testing.T) *v3Client", + "line": 45 + }, + { + "kind": "struct", + "name": "v3Problem", + "signature": "type v3Problem struct", + "line": 68 + }, + { + "kind": "struct", + "name": "v3InvalidParameter", + "signature": "type v3InvalidParameter struct", + "line": 78 + }, + { + "kind": "struct", + "name": "v3ValidationError", + "signature": "type v3ValidationError struct", + "line": 85 + }, + { + "kind": "func", + "name": "ValidationErrors", + "signature": "func (p *v3Problem) ValidationErrors() []v3ValidationError", + "line": 95 + }, + { + "kind": "func", + "name": "do", + "signature": "func (c *v3Client) do(method, path string, body any) (int, []byte, *v3Problem)", + "line": 115 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (c *v3Client) CreateMeter(body apiv3.CreateMeterRequest) (int, *apiv3.Meter, *v3Problem)", + "line": 167 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (c *v3Client) CreateFeature(body apiv3.CreateFeatureRequest) (int, *apiv3.Feature, *v3Problem)", + "line": 174 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (c *v3Client) CreatePlan(body apiv3.CreatePlanRequest) (int, *apiv3.BillingPlan, *v3Problem)", + "line": 181 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (c *v3Client) GetPlan(id string) (int, *apiv3.BillingPlan, *v3Problem)", + "line": 186 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (c *v3Client) UpdatePlan(id string, body apiv3.UpsertPlanRequest) (int, *apiv3.BillingPlan, *v3Problem)", + "line": 191 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (c *v3Client) PublishPlan(id string) (int, *apiv3.BillingPlan, *v3Problem)", + "line": 196 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (c *v3Client) ArchivePlan(id string) (int, *apiv3.BillingPlan, *v3Problem)", + "line": 201 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (c *v3Client) DeletePlan(id string) (int, *v3Problem)", + "line": 206 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (c *v3Client) ListPlans(opts ...listOption) (int, *apiv3.PlanPagePaginatedResponse, *v3Problem)", + "line": 211 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (c *v3Client) CreateAddon(body apiv3.CreateAddonRequest) (int, *apiv3.Addon, *v3Problem)", + "line": 218 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (c *v3Client) GetAddon(id string) (int, *apiv3.Addon, *v3Problem)", + "line": 223 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (c *v3Client) UpdateAddon(id string, body apiv3.UpsertAddonRequest) (int, *apiv3.Addon, *v3Problem)", + "line": 228 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (c *v3Client) PublishAddon(id string) (int, *apiv3.Addon, *v3Problem)", + "line": 233 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (c *v3Client) ArchiveAddon(id string) (int, *apiv3.Addon, *v3Problem)", + "line": 238 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (c *v3Client) DeleteAddon(id string) (int, *v3Problem)", + "line": 243 + }, + { + "kind": "func", + "name": "ListAddons", + "signature": "func (c *v3Client) ListAddons(opts ...listOption) (int, *apiv3.AddonPagePaginatedResponse, *v3Problem)", + "line": 248 + }, + { + "kind": "func", + "name": "AttachAddon", + "signature": "func (c *v3Client) AttachAddon(planID string, body apiv3.CreatePlanAddonRequest) (int, *apiv3.PlanAddon, *v3Problem)", + "line": 255 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (c *v3Client) GetPlanAddon(planID, planAddonID string) (int, *apiv3.PlanAddon, *v3Problem)", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (c *v3Client) UpdatePlanAddon(planID, planAddonID string, body apiv3.UpsertPlanAddonRequest) (int, *apiv3.PlanAddon, *v3Problem)", + "line": 265 + }, + { + "kind": "func", + "name": "DetachAddon", + "signature": "func (c *v3Client) DetachAddon(planID, planAddonID string) (int, *v3Problem)", + "line": 270 + }, + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (c *v3Client) ListPlanAddons(planID string, opts ...listOption) (int, *apiv3.PlanAddonPagePaginatedResponse, *v3Problem)", + "line": 275 + }, + { + "kind": "struct", + "name": "listOptions", + "signature": "type listOptions struct", + "line": 285 + }, + { + "kind": "func", + "name": "withPageSize", + "signature": "func withPageSize(n int) listOption", + "line": 294 + }, + { + "kind": "func", + "name": "withPageNumber", + "signature": "func withPageNumber(n int) listOption", + "line": 297 + }, + { + "kind": "func", + "name": "buildPageQuery", + "signature": "func buildPageQuery(opts []listOption) string", + "line": 299 + }, + { + "kind": "func", + "name": "uniqueKey", + "signature": "func uniqueKey(prefix string) string", + "line": 322 + }, + { + "kind": "func", + "name": "validPlanRequest", + "signature": "func validPlanRequest(keyPrefix string) apiv3.CreatePlanRequest", + "line": 328 + }, + { + "kind": "func", + "name": "validPlanPhase", + "signature": "func validPlanPhase(keyPrefix string, isLast bool) apiv3.BillingPlanPhase", + "line": 340 + }, + { + "kind": "func", + "name": "validFlatRateCard", + "signature": "func validFlatRateCard(keyPrefix string) apiv3.BillingRateCard", + "line": 355 + }, + { + "kind": "func", + "name": "validUnitRateCard", + "signature": "func validUnitRateCard(f apiv3.Feature) apiv3.BillingRateCard", + "line": 379 + }, + { + "kind": "func", + "name": "validGraduatedRateCard", + "signature": "func validGraduatedRateCard(f apiv3.Feature) apiv3.BillingRateCard", + "line": 403 + }, + { + "kind": "func", + "name": "validAddonRequest", + "signature": "func validAddonRequest(keyPrefix string) apiv3.CreateAddonRequest", + "line": 441 + }, + { + "kind": "func", + "name": "validPlanAddonRequest", + "signature": "func validPlanAddonRequest(phaseKey, addonID string) apiv3.CreatePlanAddonRequest", + "line": 453 + }, + { + "kind": "func", + "name": "assertValidationCode", + "signature": "func assertValidationCode(t *testing.T, problem *v3Problem, code string)", + "line": 468 + }, + { + "kind": "func", + "name": "assertProblemDetail", + "signature": "func assertProblemDetail(t *testing.T, problem *v3Problem, substring string)", + "line": 490 + }, + { + "kind": "func", + "name": "assertInvalidParameterRule", + "signature": "func assertInvalidParameterRule(t *testing.T, problem *v3Problem, rule string)", + "line": 500 + } + ], + "line_count": 514 + }, + "entrypoint.sh": { + "header": "#!/usr/bin/env sh\n\nset -euo pipefail\n\nmain() {\n # Update CA certificates if needed\n find /usr/local/share/ca-certificates -maxdepth 0 ! -empty -exec update-ca-certificates \\;\n\n # Start CMD\n exec \"$@\"\n}\n\nmain \"$@\"", + "symbols": [], + "line_count": 13 + }, + "etc/seed/observability.yaml": { + "header": "tracer:\n open_telemetry_collector:\n grpc:\n - address: 127.0.0.1:4317\n tags:\n application: openmeter-output\n sampling:\n enabled: false", + "symbols": [], + "line_count": 8 + }, + "etc/seed/seed.yaml": { + "header": "input:\n generate:\n count: ${SEEDER_COUNT:0}\n interval: \"${SEEDER_INTERVAL:50ms}\"\n # batch_size: 1\n mapping: |\n let max_subjects = ${SEEDER_MAX_SUBJECTS:20}\n let event_type = \"tokens\"\n let source = \"api-gateway\"\n let provider_models = [\n {\"provider\": \"openai\", \"models\": [\"gpt-4o\", \"gpt-4-turbo\", \"gpt-3.5-turbo\"]},\n {\"provider\": \"anthropic\", \"models\": [\"claude-3-5-sonnet\", \"claude-3-opus\", \"claude-3-5-haiku\"]}\n ]\n let types = [\"input\", \"output\"]\n let subject = \"customer-%d\".format(random_int(seed: timestamp_unix_nano()) % $max_subjects)\n let time = now().ts_format()\n # let time = (now().ts_sub_iso8601(\"P30D\").ts_unix() + random_int(min: 60, max: 60 * 60 * 24 * 30)).ts_format()\n let idx = random_int(seed: timestamp_unix_nano()) % $provider_models.length()\n let selection = $provider_models.index($idx)\n let provider = $selection.provider", + "symbols": [], + "line_count": 55 + }, + "etc/seed/streams/api-requests.yaml": { + "header": "input:\n generate:\n count: 0\n interval: \"${SEEDER_INTERVAL:100ms}\"\n mapping: |\n let subject_count = ${SEEDER_SUBJECT_COUNT:1000}\n\n let event_type = \"request\"\n let source = \"demo-org-seeder\"\n let methods = [\"GET\", \"POST\"]\n let routes = [\"/\", \"/about\", \"/contact\", \"/pricing\", \"/docs\"]\n\n let subject = \"demo-subject-%d\".format(random_int(seed: timestamp_unix_nano()) % $subject_count)\n let time = now()\n\n let method = $methods.index(random_int(seed: timestamp_unix_nano()) % $methods.length())\n let path = $routes.index(random_int(seed: timestamp_unix_nano()) % $routes.length())\n\n root = {\n \"id\": uuid_v4(),", + "symbols": [], + "line_count": 49 + }, + "etc/seed/streams/prompt-tokens.yaml": { + "header": "input:\n generate:\n count: 0\n interval: \"${SEEDER_INTERVAL:100ms}\"\n mapping: |\n let subject_count = ${SEEDER_SUBJECT_COUNT:1000}\n\n let event_type = \"prompt\"\n let source = \"demo-org-seeder\"\n\n let token_types = [\"input\", \"output\"]\n let models = [\n \"gpt-4o\",\n \"gpt-4o-mini\",\n \"gpt-4-turbo\",\n \"gpt-3.5-turbo-0125\",\n \"text-embedding-3-large\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n ]", + "symbols": [], + "line_count": 60 + }, + "etc/seed/streams/workload-runtime.yaml": { + "header": "input:\n generate:\n count: 0\n interval: \"${SEEDER_INTERVAL:100ms}\"\n mapping: |\n let subject_count = ${SEEDER_SUBJECT_COUNT:1000}\n\n let event_type = \"workload\"\n let source = \"demo-org-seeder\"\n\n let regions = [\"us-east-1\", \"us-west-1\", \"us-east-2\", \"us-west-2\"]\n let zoneSuffixes = [\"a\", \"b\", \"c\", \"d\"]\n let instance_types = [\"t2.micro\", \"t2.small\", \"t2.medium\", \"t2.large\", \"t2.xlarge\", \"t2.2xlarge\"]\n\n let subject = \"demo-subject-%d\".format(random_int(seed: timestamp_unix_nano()) % $subject_count)\n let time = now()\n\n let region = $regions.index(random_int(seed: timestamp_unix_nano()) % $regions.length())\n let zone = \"%s%s\".format($region, $zoneSuffixes.index(random_int(seed: timestamp_unix_nano()) % $zoneSuffixes.length()))\n let instance_type = $instance_types.index(random_int(seed: timestamp_unix_nano()) % $instance_types.length())", + "symbols": [], + "line_count": 56 + }, + "etc/wiretap/config.docker.yaml": { + "header": "redirectURL: http://host.docker.internal:8888\nport: 19090\nmonitorPort: 19091\nwebSocketPort: 19092\ncontract: /usr/local/src/openmeter/api/openapi.yaml", + "symbols": [], + "line_count": 5 + }, + "flake.nix": { + "header": "{\n inputs = {\n nixpkgs.url = \"github:NixOS/nixpkgs/nixpkgs-unstable\";\n flake-parts.url = \"github:hercules-ci/flake-parts\";\n devenv.url = \"github:cachix/devenv\";\n git-hooks.url = \"github:cachix/git-hooks.nix\";\n pre-commit-hooks.follows = \"git-hooks\";\n };\n\n outputs = inputs@{ flake-parts, ... }:\n flake-parts.lib.mkFlake { inherit inputs; } {\n imports = [\n inputs.devenv.flakeModule\n ];\n\n systems = [ \"x86_64-linux\" \"x86_64-darwin\" \"aarch64-darwin\" \"aarch64-linux\" ];\n\n perSystem = { config, self', inputs', pkgs, lib, system, ... }: rec {\n _module.args.pkgs = import inputs.nixpkgs {\n inherit system;", + "symbols": [], + "line_count": 215 + }, + "go.mod": { + "header": "module github.com/openmeterio/openmeter\n\ngo 1.25.6\n\n// ee: https://github.com/oklog/run/pull/35\nreplace github.com/oklog/run => github.com/openmeterio/run v0.0.0-20250217124527-c72029d4b634\n\nrequire (\n\tcirello.io/pglock v1.16.1\n\tentgo.io/ent v0.14.6\n\tgithub.com/AppsFlyer/go-sundheit v0.6.0\n\tgithub.com/ClickHouse/clickhouse-go/v2 v2.46.0\n\tgithub.com/IBM/sarama v1.49.0\n\tgithub.com/ThreeDotsLabs/watermill v1.5.2\n\tgithub.com/ThreeDotsLabs/watermill-kafka/v3 v3.1.2\n\tgithub.com/XSAM/otelsql v0.42.0\n\tgithub.com/alpacahq/alpacadecimal v0.0.9\n\tgithub.com/avast/retry-go/v4 v4.7.0\n\tgithub.com/bhmj/jsonslice v1.1.3\n\tgithub.com/brianvoe/gofakeit/v6 v6.28.0", + "symbols": [], + "line_count": 279 + }, + "justfile": { + "header": "[private]\ndefault:\n @just --list\n\ngenerate:\n make gen-api\n\n GOWORK=off go generate ./cmd/...\n go generate ./api/client/go\n\n# tag and release a new version\nrelease:\n #!/usr/bin/env bash\n set -euo pipefail\n\n git checkout main > /dev/null 2>&1\n git diff-index --quiet HEAD || (echo \"Git directory is dirty\" && exit 1)\n\n version=v$(semver bump prerelease beta.. $(git describe --abbrev=0))\n", + "symbols": [], + "line_count": 36 + }, + "openmeter/apiconverter/cursor.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination/v2\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ConvertCursor", + "signature": "func ConvertCursor(s api.CursorPaginationCursor) (*pagination.Cursor, error)", + "line": 8 + }, + { + "kind": "func", + "name": "ConvertCursorPtr", + "signature": "func ConvertCursorPtr(s *api.CursorPaginationCursor) (*pagination.Cursor, error)", + "line": 12 + } + ], + "line_count": 18 + }, + "openmeter/apiconverter/filter.gen.go": { + "header": "\tapi \"github.com/openmeterio/openmeter/api\"\n\tfilter \"github.com/openmeterio/openmeter/pkg/filter\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 11 + }, + { + "kind": "func", + "name": "filterFilterStringToApiFilterString", + "signature": "func filterFilterStringToApiFilterString(source filter.FilterString) api.FilterString", + "line": 231 + } + ], + "line_count": 266 + }, + "openmeter/apiconverter/filter.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/filter\"\n)", + "symbols": [], + "line_count": 43 + }, + "openmeter/app/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 10 + }, + { + "kind": "interface", + "name": "AppAdapter", + "signature": "type AppAdapter interface", + "line": 15 + } + ], + "line_count": 37 + }, + "openmeter/app/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (app.Adapter, error)", + "line": 27 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 42 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 48 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 58 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 66 + } + ], + "line_count": 68 + }, + "openmeter/app/adapter/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreateApp", + "signature": "func (a *adapter) CreateApp(ctx context.Context, input app.CreateAppInput) (app.AppBase, error)", + "line": 23 + }, + { + "kind": "func", + "name": "UpdateAppStatus", + "signature": "func (a *adapter) UpdateAppStatus(ctx context.Context, input app.UpdateAppStatusInput) error", + "line": 61 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (a *adapter) ListApps(ctx context.Context, params app.ListAppInput) (pagination.Result[app.App], error)", + "line": 75 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (a *adapter) GetApp(ctx context.Context, input app.GetAppInput) (app.App, error)", + "line": 145 + }, + { + "kind": "func", + "name": "UpdateApp", + "signature": "func (a *adapter) UpdateApp(ctx context.Context, input app.UpdateAppInput) (app.App, error)", + "line": 182 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (a *adapter) UninstallApp(ctx context.Context, input app.UninstallAppInput) (*app.AppBase, error)", + "line": 212 + }, + { + "kind": "func", + "name": "mapAppBaseFromDB", + "signature": "func mapAppBaseFromDB(dbApp *db.App, registryItem app.RegistryItem) app.AppBase", + "line": 255 + }, + { + "kind": "func", + "name": "mapAppFromDB", + "signature": "func mapAppFromDB(ctx context.Context, dbApp *db.App, registryItem app.RegistryItem) (app.App, error)", + "line": 274 + } + ], + "line_count": 283 + }, + "openmeter/app/adapter/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomerData", + "signature": "func (a *adapter) ListCustomerData(ctx context.Context, input app.ListCustomerInput) (pagination.Result[app.CustomerApp], error)", + "line": 22 + }, + { + "kind": "func", + "name": "EnsureCustomer", + "signature": "func (a *adapter) EnsureCustomer(ctx context.Context, input app.EnsureCustomerInput) error", + "line": 72 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (a *adapter) DeleteCustomer(ctx context.Context, input app.DeleteCustomerInput) error", + "line": 127 + } + ], + "line_count": 178 + }, + "openmeter/app/adapter/marketplace.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ListMarketplaceListings", + "signature": "func (a adapter) ListMarketplaceListings(ctx context.Context, input app.MarketplaceListInput) (pagination.Result[app.RegistryItem], error)", + "line": 16 + }, + { + "kind": "func", + "name": "GetMarketplaceListing", + "signature": "func (a adapter) GetMarketplaceListing(ctx context.Context, input app.MarketplaceGetInput) (app.RegistryItem, error)", + "line": 30 + }, + { + "kind": "func", + "name": "InstallMarketplaceListingWithAPIKey", + "signature": "func (a *adapter) InstallMarketplaceListingWithAPIKey(ctx context.Context, input app.InstallAppWithAPIKeyInput) (app.App, error)", + "line": 41 + }, + { + "kind": "func", + "name": "InstallMarketplaceListing", + "signature": "func (a *adapter) InstallMarketplaceListing(ctx context.Context, input app.InstallAppInput) (app.App, error)", + "line": 76 + }, + { + "kind": "func", + "name": "GetMarketplaceListingOauth2InstallURL", + "signature": "func (a adapter) GetMarketplaceListingOauth2InstallURL(ctx context.Context, input app.GetOauth2InstallURLInput) (app.GetOauth2InstallURLOutput, error)", + "line": 110 + }, + { + "kind": "func", + "name": "AuthorizeMarketplaceListingOauth2Install", + "signature": "func (a adapter) AuthorizeMarketplaceListingOauth2Install(ctx context.Context, input app.AuthorizeOauth2InstallInput) error", + "line": 115 + }, + { + "kind": "func", + "name": "RegisterMarketplaceListing", + "signature": "func (a adapter) RegisterMarketplaceListing(input app.RegisterMarketplaceListingInput) error", + "line": 120 + } + ], + "line_count": 132 + }, + "openmeter/app/app.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "App", + "signature": "type App interface", + "line": 14 + }, + { + "kind": "struct", + "name": "GetAppInstanceCustomerDataInput", + "signature": "type GetAppInstanceCustomerDataInput struct", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetAppInstanceCustomerDataInput) Validate() error", + "line": 41 + }, + { + "kind": "struct", + "name": "UpsertAppInstanceCustomerDataInput", + "signature": "type UpsertAppInstanceCustomerDataInput struct", + "line": 49 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertAppInstanceCustomerDataInput) Validate() error", + "line": 54 + }, + { + "kind": "struct", + "name": "DeleteAppInstanceCustomerDataInput", + "signature": "type DeleteAppInstanceCustomerDataInput struct", + "line": 66 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteAppInstanceCustomerDataInput) Validate() error", + "line": 70 + }, + { + "kind": "interface", + "name": "AppConfigUpdate", + "signature": "type AppConfigUpdate interface", + "line": 81 + }, + { + "kind": "struct", + "name": "UpdateAppInput", + "signature": "type UpdateAppInput struct", + "line": 86 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAppInput) Validate() error", + "line": 95 + }, + { + "kind": "struct", + "name": "CreateAppInput", + "signature": "type CreateAppInput struct", + "line": 127 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAppInput) Validate() error", + "line": 136 + }, + { + "kind": "struct", + "name": "ListAppInput", + "signature": "type ListAppInput struct", + "line": 149 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListAppInput) Validate() error", + "line": 160 + }, + { + "kind": "struct", + "name": "UpdateAppStatusInput", + "signature": "type UpdateAppStatusInput struct", + "line": 203 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAppStatusInput) Validate() error", + "line": 208 + } + ], + "line_count": 218 + }, + "openmeter/app/appbase.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (t AppType) Validate() error", + "line": 19 + }, + { + "kind": "struct", + "name": "AppBase", + "signature": "type AppBase struct", + "line": 47 + }, + { + "kind": "func", + "name": "GetAppBase", + "signature": "func (a AppBase) GetAppBase() AppBase", + "line": 56 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (a AppBase) GetID() AppID", + "line": 60 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (a AppBase) GetType() AppType", + "line": 67 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (a AppBase) GetName() string", + "line": 71 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (a AppBase) GetDescription() *string", + "line": 75 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (a AppBase) GetStatus() AppStatus", + "line": 79 + }, + { + "kind": "func", + "name": "GetListing", + "signature": "func (a AppBase) GetListing() MarketplaceListing", + "line": 83 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (a AppBase) GetMetadata() models.Metadata", + "line": 87 + }, + { + "kind": "func", + "name": "ValidateCapabilities", + "signature": "func (a AppBase) ValidateCapabilities(capabilities ...CapabilityType) error", + "line": 92 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a AppBase) Validate() error", + "line": 117 + }, + { + "kind": "struct", + "name": "AppID", + "signature": "type AppID struct", + "line": 146 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AppID) Validate() error", + "line": 151 + } + ], + "line_count": 161 + }, + "openmeter/app/customer.go": { + "header": "type CustomerData interface {\n\tValidate() error\n}", + "symbols": [ + { + "kind": "interface", + "name": "CustomerData", + "signature": "type CustomerData interface", + "line": 3 + }, + { + "kind": "struct", + "name": "CustomerApp", + "signature": "type CustomerApp struct", + "line": 7 + } + ], + "line_count": 10 + }, + "openmeter/app/custominvoicing/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 10 + }, + { + "kind": "interface", + "name": "CustomerDataAdapter", + "signature": "type CustomerDataAdapter interface", + "line": 17 + }, + { + "kind": "interface", + "name": "AppConfigAdapter", + "signature": "type AppConfigAdapter interface", + "line": 23 + } + ], + "line_count": 27 + }, + "openmeter/app/custominvoicing/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (appcustominvoicing.Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 61 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/app/custominvoicing/adapter/appconfig.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "func", + "name": "GetAppConfiguration", + "signature": "func (a *adapter) GetAppConfiguration(ctx context.Context, input app.AppID) (custominvoicing.Configuration, error)", + "line": 16 + }, + { + "kind": "func", + "name": "UpsertAppConfiguration", + "signature": "func (a *adapter) UpsertAppConfiguration(ctx context.Context, input custominvoicing.UpsertAppConfigurationInput) error", + "line": 37 + }, + { + "kind": "func", + "name": "DeleteAppConfiguration", + "signature": "func (a *adapter) DeleteAppConfiguration(ctx context.Context, input app.AppID) error", + "line": 52 + }, + { + "kind": "func", + "name": "mapDBToAppConfiguration", + "signature": "func mapDBToAppConfiguration(appConfig *db.AppCustomInvoicing) custominvoicing.Configuration", + "line": 65 + } + ], + "line_count": 70 + }, + "openmeter/app/custominvoicing/adapter/customerdata.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (a *adapter) GetCustomerData(ctx context.Context, input appcustominvoicing.GetAppCustomerDataInput) (appcustominvoicing.CustomerData, error)", + "line": 15 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (a *adapter) UpsertCustomerData(ctx context.Context, input appcustominvoicing.UpsertCustomerDataInput) error", + "line": 41 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (a *adapter) DeleteCustomerData(ctx context.Context, input appcustominvoicing.DeleteAppCustomerDataInput) error", + "line": 67 + }, + { + "kind": "func", + "name": "mapDBToCustomerData", + "signature": "func mapDBToCustomerData(line *db.AppCustomInvoicingCustomer) appcustominvoicing.CustomerData", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/app/custominvoicing/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Configuration", + "signature": "type Configuration struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Configuration) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "Meta", + "signature": "type Meta struct", + "line": 39 + }, + { + "kind": "func", + "name": "FromEventAppData", + "signature": "func (m *Meta) FromEventAppData(event app.EventApp) error", + "line": 46 + }, + { + "kind": "struct", + "name": "App", + "signature": "type App struct", + "line": 56 + }, + { + "kind": "func", + "name": "ValidateCustomer", + "signature": "func (a App) ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error", + "line": 63 + }, + { + "kind": "func", + "name": "UpdateAppConfig", + "signature": "func (a App) UpdateAppConfig(ctx context.Context, input app.AppConfigUpdate) error", + "line": 67 + }, + { + "kind": "func", + "name": "GetEventAppData", + "signature": "func (a App) GetEventAppData() (app.EventAppData, error)", + "line": 83 + }, + { + "kind": "func", + "name": "ValidateStandardInvoice", + "signature": "func (a App) ValidateStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 92 + }, + { + "kind": "func", + "name": "UpsertStandardInvoice", + "signature": "func (a App) UpsertStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 96 + }, + { + "kind": "func", + "name": "FinalizeStandardInvoice", + "signature": "func (a App) FinalizeStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.FinalizeStandardInvoiceResult, error)", + "line": 100 + }, + { + "kind": "func", + "name": "DeleteStandardInvoice", + "signature": "func (a App) DeleteStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 132 + }, + { + "kind": "func", + "name": "CanDraftSyncAdvance", + "signature": "func (a App) CanDraftSyncAdvance(invoice billing.StandardInvoice) (bool, error)", + "line": 138 + }, + { + "kind": "func", + "name": "CanIssuingSyncAdvance", + "signature": "func (a App) CanIssuingSyncAdvance(invoice billing.StandardInvoice) (bool, error)", + "line": 154 + } + ], + "line_count": 168 + }, + "openmeter/app/custominvoicing/customerdata.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerData", + "signature": "type CustomerData struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerData) Validate() error", + "line": 18 + }, + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (a App) GetCustomerData(ctx context.Context, input app.GetAppInstanceCustomerDataInput) (app.CustomerData, error)", + "line": 24 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (a App) UpsertCustomerData(ctx context.Context, input app.UpsertAppInstanceCustomerDataInput) error", + "line": 32 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (a App) DeleteCustomerData(ctx context.Context, input app.DeleteAppInstanceCustomerDataInput) error", + "line": 48 + }, + { + "kind": "struct", + "name": "UpsertCustomerDataInput", + "signature": "type UpsertCustomerDataInput struct", + "line": 58 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertCustomerDataInput) Validate() error", + "line": 63 + }, + { + "kind": "struct", + "name": "CustomerDataID", + "signature": "type CustomerDataID struct", + "line": 75 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CustomerDataID) Validate() error", + "line": 81 + } + ], + "line_count": 100 + }, + "openmeter/app/custominvoicing/factory.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Factory", + "signature": "type Factory struct", + "line": 48 + }, + { + "kind": "struct", + "name": "FactoryConfig", + "signature": "type FactoryConfig struct", + "line": 54 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c FactoryConfig) Validate() error", + "line": 60 + }, + { + "kind": "func", + "name": "NewFactory", + "signature": "func NewFactory(config FactoryConfig) (*Factory, error)", + "line": 76 + }, + { + "kind": "func", + "name": "NewApp", + "signature": "func (f *Factory) NewApp(ctx context.Context, appBase app.AppBase) (app.App, error)", + "line": 99 + }, + { + "kind": "func", + "name": "InstallApp", + "signature": "func (f *Factory) InstallApp(ctx context.Context, input app.AppFactoryInstallAppInput) (app.App, error)", + "line": 115 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (f *Factory) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 131 + }, + { + "kind": "struct", + "name": "CreateAppInput", + "signature": "type CreateAppInput struct", + "line": 137 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAppInput) Validate() error", + "line": 144 + }, + { + "kind": "struct", + "name": "UpsertAppConfigurationInput", + "signature": "type UpsertAppConfigurationInput struct", + "line": 156 + } + ], + "line_count": 159 + }, + "openmeter/app/custominvoicing/httpdriver/custominvoicing.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "DraftSyncronized", + "signature": "func (h *handler) DraftSyncronized() DraftSyncronizedHandler", + "line": 25 + }, + { + "kind": "func", + "name": "IssuingSyncronized", + "signature": "func (h *handler) IssuingSyncronized() IssuingSyncronizedHandler", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatePaymentStatus", + "signature": "func (h *handler) UpdatePaymentStatus() UpdatePaymentStatusHandler", + "line": 127 + } + ], + "line_count": 172 + }, + "openmeter/app/custominvoicing/httpdriver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 12 + } + ], + "line_count": 21 + }, + "openmeter/app/custominvoicing/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "AppHandler", + "signature": "type AppHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 26 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 33 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tservice appcustominvoicing.SyncService,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 42 + } + ], + "line_count": 52 + }, + "openmeter/app/custominvoicing/httpdriver/mapper.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "mapUpsertStandardInvoiceResultFromAPI", + "signature": "func mapUpsertStandardInvoiceResultFromAPI(in *api.CustomInvoicingSyncResult) *billing.UpsertStandardInvoiceResult", + "line": 11 + }, + { + "kind": "func", + "name": "mapFinalizeStandardInvoiceResultFromAPI", + "signature": "func mapFinalizeStandardInvoiceResultFromAPI(in api.CustomInvoicingFinalizedRequest) *billing.FinalizeStandardInvoiceResult", + "line": 41 + }, + { + "kind": "func", + "name": "mapPaymentTriggerFromAPI", + "signature": "func mapPaymentTriggerFromAPI(in api.CustomInvoicingPaymentTrigger) (billing.InvoiceTrigger, error)", + "line": 62 + } + ], + "line_count": 85 + }, + "openmeter/app/custominvoicing/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 10 + }, + { + "kind": "interface", + "name": "CustomerDataService", + "signature": "type CustomerDataService interface", + "line": 16 + }, + { + "kind": "interface", + "name": "FactoryService", + "signature": "type FactoryService interface", + "line": 22 + }, + { + "kind": "interface", + "name": "SyncService", + "signature": "type SyncService interface", + "line": 29 + } + ], + "line_count": 34 + }, + "openmeter/app/custominvoicing/service/customerdata.go": { + "header": "\t\"context\"\n\tappcustominvoicing \"github.com/openmeterio/openmeter/openmeter/app/custominvoicing\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (s *Service) GetCustomerData(ctx context.Context, input appcustominvoicing.GetAppCustomerDataInput) (appcustominvoicing.CustomerData, error)", + "line": 10 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (s *Service) UpsertCustomerData(ctx context.Context, input appcustominvoicing.UpsertCustomerDataInput) error", + "line": 16 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (s *Service) DeleteCustomerData(ctx context.Context, input appcustominvoicing.DeleteAppCustomerDataInput) error", + "line": 22 + } + ], + "line_count": 26 + }, + "openmeter/app/custominvoicing/service/factory.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "func", + "name": "CreateApp", + "signature": "func (s *Service) CreateApp(ctx context.Context, input appcustominvoicing.CreateAppInput) (app.AppBase, error)", + "line": 14 + }, + { + "kind": "func", + "name": "DeleteApp", + "signature": "func (s *Service) DeleteApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 43 + }, + { + "kind": "func", + "name": "UpsertAppConfiguration", + "signature": "func (s *Service) UpsertAppConfiguration(ctx context.Context, input appcustominvoicing.UpsertAppConfigurationInput) error", + "line": 49 + }, + { + "kind": "func", + "name": "GetAppConfiguration", + "signature": "func (s *Service) GetAppConfiguration(ctx context.Context, appID app.AppID) (appcustominvoicing.Configuration, error)", + "line": 55 + } + ], + "line_count": 57 + }, + "openmeter/app/custominvoicing/service/service.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 14 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 51 + } + ], + "line_count": 62 + }, + "openmeter/app/custominvoicing/service/sync.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "SyncDraftInvoice", + "signature": "func (s *Service) SyncDraftInvoice(ctx context.Context, input appcustominvoicing.SyncDraftInvoiceInput) (billing.StandardInvoice, error)", + "line": 20 + }, + { + "kind": "func", + "name": "SyncIssuingInvoice", + "signature": "func (s *Service) SyncIssuingInvoice(ctx context.Context, input appcustominvoicing.SyncIssuingInvoiceInput) (billing.StandardInvoice, error)", + "line": 35 + }, + { + "kind": "func", + "name": "ValidateInvoiceApp", + "signature": "func (s *Service) ValidateInvoiceApp(invoice billing.StandardInvoice) error", + "line": 50 + }, + { + "kind": "func", + "name": "HandlePaymentTrigger", + "signature": "func (s *Service) HandlePaymentTrigger(ctx context.Context, input appcustominvoicing.HandlePaymentTriggerInput) (billing.StandardInvoice, error)", + "line": 66 + } + ], + "line_count": 117 + }, + "openmeter/app/custominvoicing/sync.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "SyncDraftInvoiceInput", + "signature": "type SyncDraftInvoiceInput struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *SyncDraftInvoiceInput) Validate() error", + "line": 16 + }, + { + "kind": "struct", + "name": "SyncIssuingInvoiceInput", + "signature": "type SyncIssuingInvoiceInput struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *SyncIssuingInvoiceInput) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "HandlePaymentTriggerInput", + "signature": "type HandlePaymentTriggerInput struct", + "line": 49 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *HandlePaymentTriggerInput) Validate() error", + "line": 54 + } + ], + "line_count": 66 + }, + "openmeter/app/defaults.go": { + "header": "const (\n\tDefaultPageNumber = 1\n\tDefaultPageSize = 100", + "symbols": [], + "line_count": 6 + }, + "openmeter/app/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "NewAppNotFoundError", + "signature": "func NewAppNotFoundError(appID AppID) *AppNotFoundError", + "line": 12 + }, + { + "kind": "struct", + "name": "AppNotFoundError", + "signature": "type AppNotFoundError struct", + "line": 22 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppNotFoundError) Error() string", + "line": 26 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppNotFoundError) Unwrap() error", + "line": 30 + }, + { + "kind": "func", + "name": "IsAppNotFoundError", + "signature": "func IsAppNotFoundError(err error) bool", + "line": 35 + }, + { + "kind": "func", + "name": "NewAppDefaultNotFoundError", + "signature": "func NewAppDefaultNotFoundError(appType AppType, namespace string) *AppDefaultNotFoundError", + "line": 46 + }, + { + "kind": "struct", + "name": "AppDefaultNotFoundError", + "signature": "type AppDefaultNotFoundError struct", + "line": 56 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppDefaultNotFoundError) Error() string", + "line": 60 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppDefaultNotFoundError) Unwrap() error", + "line": 64 + }, + { + "kind": "func", + "name": "IsAppDefaultNotFoundError", + "signature": "func IsAppDefaultNotFoundError(err error) bool", + "line": 68 + }, + { + "kind": "func", + "name": "NewAppProviderAuthenticationError", + "signature": "func NewAppProviderAuthenticationError(appID *AppID, namespace string, providerError error) *AppProviderAuthenticationError", + "line": 79 + }, + { + "kind": "struct", + "name": "AppProviderAuthenticationError", + "signature": "type AppProviderAuthenticationError struct", + "line": 95 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppProviderAuthenticationError) Error() string", + "line": 99 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppProviderAuthenticationError) Unwrap() error", + "line": 103 + }, + { + "kind": "func", + "name": "IsAppProviderAuthenticationError", + "signature": "func IsAppProviderAuthenticationError(err error) bool", + "line": 107 + }, + { + "kind": "func", + "name": "NewAppProviderError", + "signature": "func NewAppProviderError(appID *AppID, namespace string, providerError error) *AppProviderError", + "line": 118 + }, + { + "kind": "struct", + "name": "AppProviderError", + "signature": "type AppProviderError struct", + "line": 134 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppProviderError) Error() string", + "line": 138 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppProviderError) Unwrap() error", + "line": 142 + }, + { + "kind": "func", + "name": "IsAppProviderError", + "signature": "func IsAppProviderError(err error) bool", + "line": 146 + }, + { + "kind": "func", + "name": "NewAppProviderPreConditionError", + "signature": "func NewAppProviderPreConditionError(appID AppID, condition string) *AppProviderPreConditionError", + "line": 159 + }, + { + "kind": "struct", + "name": "AppProviderPreConditionError", + "signature": "type AppProviderPreConditionError struct", + "line": 167 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppProviderPreConditionError) Error() string", + "line": 171 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppProviderPreConditionError) Unwrap() error", + "line": 175 + }, + { + "kind": "func", + "name": "IsAppProviderPreConditionError", + "signature": "func IsAppProviderPreConditionError(err error) bool", + "line": 179 + }, + { + "kind": "func", + "name": "NewAppCustomerPreConditionError", + "signature": "func NewAppCustomerPreConditionError(appID AppID, appType AppType, customerID *customer.CustomerID, condition string) *AppCustomerPreConditionError", + "line": 190 + }, + { + "kind": "struct", + "name": "AppCustomerPreConditionError", + "signature": "type AppCustomerPreConditionError struct", + "line": 206 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppCustomerPreConditionError) Error() string", + "line": 210 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AppCustomerPreConditionError) Unwrap() error", + "line": 214 + }, + { + "kind": "func", + "name": "IsAppCustomerPreConditionError", + "signature": "func IsAppCustomerPreConditionError(err error) bool", + "line": 218 + } + ], + "line_count": 226 + }, + "openmeter/app/event.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "EventAppParser", + "signature": "type EventAppParser interface", + "line": 16 + }, + { + "kind": "func", + "name": "NewEventAppData", + "signature": "func NewEventAppData(v any) (EventAppData, error)", + "line": 25 + }, + { + "kind": "func", + "name": "ParseInto", + "signature": "func (e EventAppData) ParseInto(v any) error", + "line": 40 + }, + { + "kind": "struct", + "name": "EventApp", + "signature": "type EventApp struct", + "line": 57 + }, + { + "kind": "func", + "name": "NewEventApp", + "signature": "func NewEventApp(app App) (EventApp, error)", + "line": 62 + }, + { + "kind": "func", + "name": "NewAppCreateEvent", + "signature": "func NewAppCreateEvent(ctx context.Context, appBase AppBase) AppCreateEvent", + "line": 86 + }, + { + "kind": "struct", + "name": "AppCreateEvent", + "signature": "type AppCreateEvent struct", + "line": 94 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AppCreateEvent) EventName() string", + "line": 99 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AppCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 107 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AppCreateEvent) Validate() error", + "line": 118 + }, + { + "kind": "func", + "name": "NewAppUpdateEvent", + "signature": "func NewAppUpdateEvent(ctx context.Context, app App) (AppUpdateEvent, error)", + "line": 126 + }, + { + "kind": "struct", + "name": "AppUpdateEvent", + "signature": "type AppUpdateEvent struct", + "line": 139 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AppUpdateEvent) EventName() string", + "line": 144 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AppUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 152 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AppUpdateEvent) Validate() error", + "line": 164 + }, + { + "kind": "func", + "name": "NewAppDeleteEvent", + "signature": "func NewAppDeleteEvent(ctx context.Context, app AppBase, appData EventAppData) AppDeleteEvent", + "line": 173 + }, + { + "kind": "struct", + "name": "AppDeleteEvent", + "signature": "type AppDeleteEvent struct", + "line": 184 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AppDeleteEvent) EventName() string", + "line": 189 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AppDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 197 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AppDeleteEvent) Validate() error", + "line": 208 + } + ], + "line_count": 214 + }, + "openmeter/app/events.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "interface", + "name": "PaymentSetupAppData", + "signature": "type PaymentSetupAppData interface", + "line": 15 + }, + { + "kind": "struct", + "name": "CustomerPaymentSetupResult", + "signature": "type CustomerPaymentSetupResult struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r CustomerPaymentSetupResult) Validate() error", + "line": 25 + }, + { + "kind": "struct", + "name": "CustomerPaymentSetupSucceededEvent", + "signature": "type CustomerPaymentSetupSucceededEvent struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CustomerPaymentSetupSucceededEvent) Validate() error", + "line": 45 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CustomerPaymentSetupSucceededEvent) EventName() string", + "line": 61 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CustomerPaymentSetupSucceededEvent) EventMetadata() metadata.EventMetadata", + "line": 65 + } + ], + "line_count": 70 + }, + "openmeter/app/httpdriver/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListApps", + "signature": "func (h *handler) ListApps() ListAppsHandler", + "line": 30 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (h *handler) GetApp() GetAppHandler", + "line": 86 + }, + { + "kind": "func", + "name": "UpdateApp", + "signature": "func (h *handler) UpdateApp() UpdateAppHandler", + "line": 124 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (h *handler) UninstallApp() UninstallAppHandler", + "line": 226 + } + ], + "line_count": 261 + }, + "openmeter/app/httpdriver/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListCustomerDataParams", + "signature": "type ListCustomerDataParams struct", + "line": 29 + }, + { + "kind": "func", + "name": "ListCustomerData", + "signature": "func (h *handler) ListCustomerData() ListCustomerDataHandler", + "line": 35 + }, + { + "kind": "struct", + "name": "UpsertCustomerDataRequest", + "signature": "type UpsertCustomerDataRequest struct", + "line": 109 + }, + { + "kind": "struct", + "name": "UpsertCustomerDataParams", + "signature": "type UpsertCustomerDataParams struct", + "line": 114 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (h *handler) UpsertCustomerData() UpsertCustomerDataHandler", + "line": 124 + }, + { + "kind": "struct", + "name": "DeleteCustomerDataParams", + "signature": "type DeleteCustomerDataParams struct", + "line": 188 + }, + { + "kind": "struct", + "name": "DeleteCustomerDataRequest", + "signature": "type DeleteCustomerDataRequest struct", + "line": 193 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (h *handler) DeleteCustomerData() DeleteCustomerDataHandler", + "line": 204 + }, + { + "kind": "func", + "name": "toCustomerData", + "signature": "func (h *handler) toCustomerData(ctx context.Context, customerID customer.CustomerID, apiApp api.CustomerAppData) (app.App, app.CustomerData, error)", + "line": 264 + }, + { + "kind": "func", + "name": "resolveCustomerApp", + "signature": "func (h *handler) resolveCustomerApp(ctx context.Context, customerID customer.CustomerID, appType app.AppType, appID *string) (app.App, error)", + "line": 334 + }, + { + "kind": "func", + "name": "toAPICustomerAppData", + "signature": "func (h *handler) toAPICustomerAppData(a app.CustomerApp) (api.CustomerAppData, error)", + "line": 359 + } + ], + "line_count": 421 + }, + "openmeter/app/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 18 + }, + { + "kind": "interface", + "name": "AppHandler", + "signature": "type AppHandler interface", + "line": 22 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 43 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 53 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tlogger *slog.Logger,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tappService app.Service,\n\tappStripeService stripeapp.Service,\n\tbillingService billing.Service,\n\tcustomerService customer.Service,\n\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 62 + } + ], + "line_count": 80 + }, + "openmeter/app/httpdriver/mapper.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "MapAppToAPI", + "signature": "func MapAppToAPI(item app.App) (api.App, error)", + "line": 17 + }, + { + "kind": "func", + "name": "mapSandboxAppToAPI", + "signature": "func mapSandboxAppToAPI(app appsandbox.Meta) api.SandboxApp", + "line": 55 + }, + { + "kind": "func", + "name": "mapStripeAppToAPI", + "signature": "func mapStripeAppToAPI(\n\tstripeApp appstripe.Meta,\n) api.StripeApp", + "line": 68 + }, + { + "kind": "func", + "name": "mapCustomInvoicingAppToAPI", + "signature": "func mapCustomInvoicingAppToAPI(app appcustominvoicing.Meta) api.CustomInvoicingApp", + "line": 94 + }, + { + "kind": "func", + "name": "MapEventAppToAPI", + "signature": "func MapEventAppToAPI(event app.EventApp) (api.App, error)", + "line": 112 + }, + { + "kind": "func", + "name": "fromAPIAppStripeCustomerData", + "signature": "func fromAPIAppStripeCustomerData(apiStripeCustomerData api.StripeCustomerAppData) appstripe.CustomerData", + "line": 156 + }, + { + "kind": "func", + "name": "ToAPIStripeCustomerAppData", + "signature": "func ToAPIStripeCustomerAppData(\n\tcustomerAppData appstripe.CustomerData,\n\tstripeApp appstripe.App,\n) api.StripeCustomerAppData", + "line": 164 + } + ], + "line_count": 177 + }, + "openmeter/app/httpdriver/marketplace.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListMarketplaceListings", + "signature": "func (h *handler) ListMarketplaceListings() ListMarketplaceListingsHandler", + "line": 28 + }, + { + "kind": "func", + "name": "GetMarketplaceListing", + "signature": "func (h *handler) GetMarketplaceListing() GetMarketplaceListingHandler", + "line": 69 + }, + { + "kind": "struct", + "name": "MarketplaceAppAPIKeyInstallRequest", + "signature": "type MarketplaceAppAPIKeyInstallRequest struct", + "line": 97 + }, + { + "kind": "func", + "name": "MarketplaceAppAPIKeyInstall", + "signature": "func (h *handler) MarketplaceAppAPIKeyInstall() MarketplaceAppAPIKeyInstallHandler", + "line": 103 + }, + { + "kind": "struct", + "name": "MarketplaceAppInstallRequest", + "signature": "type MarketplaceAppInstallRequest struct", + "line": 176 + }, + { + "kind": "func", + "name": "MarketplaceAppInstall", + "signature": "func (h *handler) MarketplaceAppInstall() MarketplaceAppInstallHandler", + "line": 182 + }, + { + "kind": "func", + "name": "createBillingProfile", + "signature": "func (h *handler) createBillingProfile(ctx context.Context, installedApp app.App) ([]api.AppCapabilityType, error)", + "line": 247 + }, + { + "kind": "func", + "name": "makeStripeDefaultBillingApp", + "signature": "func (h *handler) makeStripeDefaultBillingApp(ctx context.Context, stripeApp app.App) ([]api.AppCapabilityType, error)", + "line": 263 + }, + { + "kind": "func", + "name": "mapMarketplaceListing", + "signature": "func mapMarketplaceListing(listing app.MarketplaceListing) api.MarketplaceListing", + "line": 320 + } + ], + "line_count": 337 + }, + "openmeter/app/input.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "ListCustomerInput", + "signature": "type ListCustomerInput struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a ListCustomerInput) Validate() error", + "line": 19 + }, + { + "kind": "struct", + "name": "EnsureCustomerInput", + "signature": "type EnsureCustomerInput struct", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a EnsureCustomerInput) Validate() error", + "line": 48 + }, + { + "kind": "struct", + "name": "DeleteCustomerInput", + "signature": "type DeleteCustomerInput struct", + "line": 64 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a DeleteCustomerInput) Validate() error", + "line": 69 + } + ], + "line_count": 91 + }, + "openmeter/app/marketplace.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (i InstallMethod) Validate() error", + "line": 20 + }, + { + "kind": "struct", + "name": "MarketplaceListing", + "signature": "type MarketplaceListing struct", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p MarketplaceListing) Validate() error", + "line": 44 + }, + { + "kind": "struct", + "name": "Capability", + "signature": "type Capability struct", + "line": 72 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Capability) Validate() error", + "line": 79 + }, + { + "kind": "struct", + "name": "MarketplaceListingID", + "signature": "type MarketplaceListingID struct", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i MarketplaceListingID) Validate() error", + "line": 99 + }, + { + "kind": "struct", + "name": "MarketplaceListInput", + "signature": "type MarketplaceListInput struct", + "line": 111 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i MarketplaceListInput) Validate() error", + "line": 115 + }, + { + "kind": "struct", + "name": "InstallAppWithAPIKeyInput", + "signature": "type InstallAppWithAPIKeyInput struct", + "line": 123 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InstallAppWithAPIKeyInput) Validate() error", + "line": 129 + }, + { + "kind": "struct", + "name": "InstallAppInput", + "signature": "type InstallAppInput struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InstallAppInput) Validate() error", + "line": 148 + }, + { + "kind": "struct", + "name": "GetOauth2InstallURLOutput", + "signature": "type GetOauth2InstallURLOutput struct", + "line": 164 + }, + { + "kind": "struct", + "name": "AuthorizeOauth2InstallInput", + "signature": "type AuthorizeOauth2InstallInput struct", + "line": 168 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AuthorizeOauth2InstallInput) Validate() error", + "line": 180 + } + ], + "line_count": 196 + }, + "openmeter/app/registry.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "AppFactory", + "signature": "type AppFactory interface", + "line": 9 + }, + { + "kind": "interface", + "name": "AppFactoryInstallWithAPIKey", + "signature": "type AppFactoryInstallWithAPIKey interface", + "line": 14 + }, + { + "kind": "struct", + "name": "AppFactoryInstallAppWithAPIKeyInput", + "signature": "type AppFactoryInstallAppWithAPIKeyInput struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AppFactoryInstallAppWithAPIKeyInput) Validate() error", + "line": 26 + }, + { + "kind": "interface", + "name": "AppFactoryInstall", + "signature": "type AppFactoryInstall interface", + "line": 42 + }, + { + "kind": "struct", + "name": "AppFactoryInstallAppInput", + "signature": "type AppFactoryInstallAppInput struct", + "line": 46 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AppFactoryInstallAppInput) Validate() error", + "line": 51 + }, + { + "kind": "struct", + "name": "RegistryItem", + "signature": "type RegistryItem struct", + "line": 63 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RegistryItem) Validate() error", + "line": 68 + } + ], + "line_count": 78 + }, + "openmeter/app/sandbox/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Meta", + "signature": "type Meta struct", + "line": 36 + }, + { + "kind": "func", + "name": "FromEventAppData", + "signature": "func (m *Meta) FromEventAppData(event app.EventApp) error", + "line": 42 + }, + { + "kind": "struct", + "name": "App", + "signature": "type App struct", + "line": 48 + }, + { + "kind": "func", + "name": "ValidateCustomer", + "signature": "func (a App) ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error", + "line": 54 + }, + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (a App) GetCustomerData(ctx context.Context, input app.GetAppInstanceCustomerDataInput) (app.CustomerData, error)", + "line": 62 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (a App) UpsertCustomerData(ctx context.Context, input app.UpsertAppInstanceCustomerDataInput) error", + "line": 66 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (a App) DeleteCustomerData(ctx context.Context, input app.DeleteAppInstanceCustomerDataInput) error", + "line": 70 + }, + { + "kind": "func", + "name": "ValidateStandardInvoice", + "signature": "func (a App) ValidateStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 74 + }, + { + "kind": "func", + "name": "UpdateAppConfig", + "signature": "func (a App) UpdateAppConfig(ctx context.Context, input app.AppConfigUpdate) error", + "line": 78 + }, + { + "kind": "func", + "name": "UpsertStandardInvoice", + "signature": "func (a App) UpsertStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 82 + }, + { + "kind": "func", + "name": "FinalizeStandardInvoice", + "signature": "func (a App) FinalizeStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.FinalizeStandardInvoiceResult, error)", + "line": 86 + }, + { + "kind": "func", + "name": "DeleteStandardInvoice", + "signature": "func (a App) DeleteStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 105 + }, + { + "kind": "func", + "name": "PostAdvanceStandardInvoiceHook", + "signature": "func (a App) PostAdvanceStandardInvoiceHook(ctx context.Context, invoice billing.StandardInvoice) (*billing.PostAdvanceHookResult, error)", + "line": 109 + }, + { + "kind": "func", + "name": "GetEventAppData", + "signature": "func (a App) GetEventAppData() (app.EventAppData, error)", + "line": 154 + }, + { + "kind": "struct", + "name": "CustomerData", + "signature": "type CustomerData struct", + "line": 158 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerData) Validate() error", + "line": 160 + }, + { + "kind": "struct", + "name": "Factory", + "signature": "type Factory struct", + "line": 164 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 169 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 174 + }, + { + "kind": "func", + "name": "NewFactory", + "signature": "func NewFactory(config Config) (*Factory, error)", + "line": 186 + }, + { + "kind": "func", + "name": "NewApp", + "signature": "func (a *Factory) NewApp(_ context.Context, appBase app.AppBase) (app.App, error)", + "line": 208 + }, + { + "kind": "func", + "name": "InstallAppWithAPIKey", + "signature": "func (a *Factory) InstallAppWithAPIKey(ctx context.Context, input app.AppFactoryInstallAppWithAPIKeyInput) (app.App, error)", + "line": 217 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (a *Factory) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 235 + } + ], + "line_count": 237 + }, + "openmeter/app/sandbox/config.go": { + "header": "type Configuration struct{}\nfunc (c Configuration) Validate() error {\n\treturn nil", + "symbols": [ + { + "kind": "struct", + "name": "Configuration", + "signature": "type Configuration struct", + "line": 3 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Configuration) Validate() error", + "line": 5 + } + ], + "line_count": 7 + }, + "openmeter/app/sandbox/errors.go": { + "header": "var ErrSimulatedPaymentFailure = billing.NewValidationError(\"simulated_payment_failure\", \"simulated payment failure\")", + "symbols": [], + "line_count": 5 + }, + "openmeter/app/sandbox/helpers.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AutoProvisionInput", + "signature": "type AutoProvisionInput struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a AutoProvisionInput) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "AutoProvision", + "signature": "func AutoProvision(ctx context.Context, input AutoProvisionInput) (app.App, error)", + "line": 35 + } + ], + "line_count": 70 + }, + "openmeter/app/sandbox/marketplace.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/app\"\n)\nvar (", + "symbols": [], + "line_count": 42 + }, + "openmeter/app/sandbox/mock.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "interface", + "name": "AppFactory", + "signature": "type AppFactory interface", + "line": 16 + }, + { + "kind": "struct", + "name": "MockApp", + "signature": "type MockApp struct", + "line": 22 + }, + { + "kind": "func", + "name": "NewMockApp", + "signature": "func NewMockApp(_ *testing.T) *MockApp", + "line": 39 + }, + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (m *MockApp) GetCustomerData(ctx context.Context, input app.GetAppInstanceCustomerDataInput) (app.CustomerData, error)", + "line": 43 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (m *MockApp) UpsertCustomerData(ctx context.Context, input app.UpsertAppInstanceCustomerDataInput) error", + "line": 47 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (m *MockApp) DeleteCustomerData(ctx context.Context, input app.DeleteAppInstanceCustomerDataInput) error", + "line": 51 + }, + { + "kind": "func", + "name": "UpdateAppConfig", + "signature": "func (m *MockApp) UpdateAppConfig(ctx context.Context, input app.AppConfigUpdate) error", + "line": 55 + }, + { + "kind": "func", + "name": "ValidateCustomer", + "signature": "func (m *MockApp) ValidateCustomer(appID string, customer *customer.Customer, capabilities []app.CapabilityType) error", + "line": 59 + }, + { + "kind": "func", + "name": "OnValidateCustomer", + "signature": "func (m *MockApp) OnValidateCustomer(err error)", + "line": 64 + }, + { + "kind": "func", + "name": "ValidateStandardInvoice", + "signature": "func (m *MockApp) ValidateStandardInvoice(appID string, invoice billing.StandardInvoice) error", + "line": 70 + }, + { + "kind": "func", + "name": "OnValidateStandardInvoice", + "signature": "func (m *MockApp) OnValidateStandardInvoice(err error)", + "line": 75 + }, + { + "kind": "func", + "name": "UpsertStandardInvoice", + "signature": "func (m *MockApp) UpsertStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 79 + }, + { + "kind": "func", + "name": "OnUpsertStandardInvoice", + "signature": "func (m *MockApp) OnUpsertStandardInvoice(cb InvoiceUpsertCallback)", + "line": 89 + }, + { + "kind": "func", + "name": "FinalizeStandardInvoice", + "signature": "func (m *MockApp) FinalizeStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.FinalizeStandardInvoiceResult, error)", + "line": 93 + }, + { + "kind": "func", + "name": "OnFinalizeStandardInvoice", + "signature": "func (m *MockApp) OnFinalizeStandardInvoice(result *billing.FinalizeStandardInvoiceResult)", + "line": 98 + }, + { + "kind": "func", + "name": "DeleteStandardInvoice", + "signature": "func (m *MockApp) DeleteStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 102 + }, + { + "kind": "func", + "name": "OnDeleteStandardInvoice", + "signature": "func (m *MockApp) OnDeleteStandardInvoice(err error)", + "line": 107 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (m *MockApp) Reset(t *testing.T)", + "line": 111 + }, + { + "kind": "func", + "name": "AssertExpectations", + "signature": "func (m *MockApp) AssertExpectations(t *testing.T)", + "line": 132 + }, + { + "kind": "func", + "name": "NewApp", + "signature": "func (m *MockApp) NewApp(_ context.Context, app app.AppBase) (app.App, error)", + "line": 156 + }, + { + "kind": "struct", + "name": "mockAppInstance", + "signature": "type mockAppInstance struct", + "line": 163 + }, + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (m *mockAppInstance) GetCustomerData(ctx context.Context, input app.GetAppInstanceCustomerDataInput) (app.CustomerData, error)", + "line": 174 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (m *mockAppInstance) UpsertCustomerData(ctx context.Context, input app.UpsertAppInstanceCustomerDataInput) error", + "line": 178 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (m *mockAppInstance) DeleteCustomerData(ctx context.Context, input app.DeleteAppInstanceCustomerDataInput) error", + "line": 182 + }, + { + "kind": "func", + "name": "UpdateAppConfig", + "signature": "func (m *mockAppInstance) UpdateAppConfig(ctx context.Context, input app.AppConfigUpdate) error", + "line": 186 + }, + { + "kind": "func", + "name": "ValidateCustomer", + "signature": "func (m *mockAppInstance) ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error", + "line": 190 + }, + { + "kind": "func", + "name": "ValidateStandardInvoice", + "signature": "func (m *mockAppInstance) ValidateStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 194 + }, + { + "kind": "func", + "name": "UpsertStandardInvoice", + "signature": "func (m *mockAppInstance) UpsertStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 198 + }, + { + "kind": "func", + "name": "FinalizeStandardInvoice", + "signature": "func (m *mockAppInstance) FinalizeStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.FinalizeStandardInvoiceResult, error)", + "line": 202 + }, + { + "kind": "func", + "name": "DeleteStandardInvoice", + "signature": "func (m *mockAppInstance) DeleteStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 206 + }, + { + "kind": "func", + "name": "GetEventAppData", + "signature": "func (m *mockAppInstance) GetEventAppData() (app.EventAppData, error)", + "line": 210 + }, + { + "kind": "struct", + "name": "MockableFactory", + "signature": "type MockableFactory struct", + "line": 214 + }, + { + "kind": "struct", + "name": "mockConfig", + "signature": "type mockConfig struct", + "line": 220 + }, + { + "kind": "func", + "name": "MockWithAppType", + "signature": "func MockWithAppType(t app.AppType) mockConfigOption", + "line": 226 + }, + { + "kind": "func", + "name": "NewMockableFactory", + "signature": "func NewMockableFactory(_ *testing.T, config Config, opts ...mockConfigOption) (*MockableFactory, error)", + "line": 232 + }, + { + "kind": "func", + "name": "NewApp", + "signature": "func (m *MockableFactory) NewApp(ctx context.Context, appBase app.AppBase) (app.App, error)", + "line": 266 + }, + { + "kind": "func", + "name": "EnableMock", + "signature": "func (m *MockableFactory) EnableMock(t *testing.T) *MockApp", + "line": 274 + }, + { + "kind": "func", + "name": "DisableMock", + "signature": "func (m *MockableFactory) DisableMock()", + "line": 282 + } + ], + "line_count": 284 + }, + "openmeter/app/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 9 + }, + { + "kind": "interface", + "name": "AppService", + "signature": "type AppService interface", + "line": 13 + } + ], + "line_count": 35 + }, + "openmeter/app/service/app.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "CreateApp", + "signature": "func (s *Service) CreateApp(ctx context.Context, input app.CreateAppInput) (app.AppBase, error)", + "line": 14 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (s *Service) GetApp(ctx context.Context, input app.GetAppInput) (app.App, error)", + "line": 35 + }, + { + "kind": "func", + "name": "UpdateApp", + "signature": "func (s *Service) UpdateApp(ctx context.Context, input app.UpdateAppInput) (app.App, error)", + "line": 43 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (s *Service) ListApps(ctx context.Context, input app.ListAppInput) (pagination.Result[app.App], error)", + "line": 83 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (s *Service) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 91 + }, + { + "kind": "func", + "name": "UpdateAppStatus", + "signature": "func (s *Service) UpdateAppStatus(ctx context.Context, input app.UpdateAppStatusInput) error", + "line": 123 + } + ], + "line_count": 151 + }, + "openmeter/app/service/customer.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomerData", + "signature": "func (s *Service) ListCustomerData(ctx context.Context, input app.ListCustomerInput) (pagination.Result[app.CustomerApp], error)", + "line": 12 + }, + { + "kind": "func", + "name": "EnsureCustomer", + "signature": "func (s *Service) EnsureCustomer(ctx context.Context, input app.EnsureCustomerInput) error", + "line": 16 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (s *Service) DeleteCustomer(ctx context.Context, input app.DeleteCustomerInput) error", + "line": 20 + } + ], + "line_count": 22 + }, + "openmeter/app/service/marketplace.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "RegisterMarketplaceListing", + "signature": "func (s *Service) RegisterMarketplaceListing(input app.RegisterMarketplaceListingInput) error", + "line": 13 + }, + { + "kind": "func", + "name": "GetMarketplaceListing", + "signature": "func (s *Service) GetMarketplaceListing(ctx context.Context, input app.MarketplaceGetInput) (app.RegistryItem, error)", + "line": 21 + }, + { + "kind": "func", + "name": "ListMarketplaceListings", + "signature": "func (s *Service) ListMarketplaceListings(ctx context.Context, input app.MarketplaceListInput) (pagination.Result[app.RegistryItem], error)", + "line": 29 + }, + { + "kind": "func", + "name": "InstallMarketplaceListingWithAPIKey", + "signature": "func (s *Service) InstallMarketplaceListingWithAPIKey(ctx context.Context, input app.InstallAppWithAPIKeyInput) (app.App, error)", + "line": 37 + }, + { + "kind": "func", + "name": "InstallMarketplaceListing", + "signature": "func (s *Service) InstallMarketplaceListing(ctx context.Context, input app.InstallAppInput) (app.App, error)", + "line": 45 + }, + { + "kind": "func", + "name": "GetMarketplaceListingOauth2InstallURL", + "signature": "func (s *Service) GetMarketplaceListingOauth2InstallURL(ctx context.Context, input app.GetOauth2InstallURLInput) (app.GetOauth2InstallURLOutput, error)", + "line": 53 + }, + { + "kind": "func", + "name": "AuthorizeMarketplaceListingOauth2Install", + "signature": "func (s *Service) AuthorizeMarketplaceListingOauth2Install(ctx context.Context, input app.AuthorizeOauth2InstallInput) error", + "line": 61 + } + ], + "line_count": 67 + }, + "openmeter/app/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/watermill/eventbus\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 12 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 34 + } + ], + "line_count": 43 + }, + "openmeter/app/stripe/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/stripe/stripe-go/v80\"\n\t\"github.com/openmeterio/openmeter/openmeter/app/stripe/client\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 13 + }, + { + "kind": "interface", + "name": "AppStripeAdapter", + "signature": "type AppStripeAdapter interface", + "line": 19 + } + ], + "line_count": 40 + }, + "openmeter/app/stripe/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 30 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (appstripe.Adapter, error)", + "line": 54 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 87 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 100 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 110 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 122 + } + ], + "line_count": 124 + }, + "openmeter/app/stripe/adapter/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "GetStripeCustomerData", + "signature": "func (a *adapter) GetStripeCustomerData(ctx context.Context, input appstripe.GetStripeCustomerDataInput) (appstripe.CustomerData, error)", + "line": 19 + }, + { + "kind": "func", + "name": "UpsertStripeCustomerData", + "signature": "func (a *adapter) UpsertStripeCustomerData(ctx context.Context, input appstripe.UpsertStripeCustomerDataInput) error", + "line": 58 + }, + { + "kind": "func", + "name": "DeleteStripeCustomerData", + "signature": "func (a *adapter) DeleteStripeCustomerData(ctx context.Context, input appstripe.DeleteStripeCustomerDataInput) error", + "line": 172 + }, + { + "kind": "func", + "name": "createStripeCustomer", + "signature": "func (a *adapter) createStripeCustomer(ctx context.Context, input appstripe.CreateStripeCustomerInput) (appstripe.CreateStripeCustomerOutput, error)", + "line": 233 + } + ], + "line_count": 290 + }, + "openmeter/app/stripe/adapter/stripe.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetStripeClientFactory", + "signature": "func (a adapter) GetStripeClientFactory() stripeclient.StripeClientFactory", + "line": 27 + }, + { + "kind": "func", + "name": "GetStripeAppClientFactory", + "signature": "func (a adapter) GetStripeAppClientFactory() stripeclient.StripeAppClientFactory", + "line": 32 + }, + { + "kind": "func", + "name": "CreateStripeApp", + "signature": "func (a *adapter) CreateStripeApp(ctx context.Context, input appstripe.CreateAppStripeInput) (appstripe.AppBase, error)", + "line": 37 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (a *adapter) UpdateAPIKey(ctx context.Context, input appstripe.UpdateAPIKeyAdapterInput) error", + "line": 84 + }, + { + "kind": "func", + "name": "GetStripeAppData", + "signature": "func (a *adapter) GetStripeAppData(ctx context.Context, input appstripe.GetStripeAppDataInput) (appstripe.AppData, error)", + "line": 182 + }, + { + "kind": "func", + "name": "DeleteStripeAppData", + "signature": "func (a *adapter) DeleteStripeAppData(ctx context.Context, input appstripe.DeleteStripeAppDataInput) error", + "line": 214 + }, + { + "kind": "func", + "name": "GetWebhookSecret", + "signature": "func (a *adapter) GetWebhookSecret(ctx context.Context, input appstripe.GetWebhookSecretInput) (appstripe.GetWebhookSecretOutput, error)", + "line": 241 + }, + { + "kind": "func", + "name": "SetCustomerDefaultPaymentMethod", + "signature": "func (a *adapter) SetCustomerDefaultPaymentMethod(ctx context.Context, input appstripe.SetCustomerDefaultPaymentMethodInput) (appstripe.SetCustomerDefaultPaymentMethodOutput, error)", + "line": 283 + }, + { + "kind": "func", + "name": "CreateCheckoutSession", + "signature": "func (a *adapter) CreateCheckoutSession(ctx context.Context, input appstripe.CreateCheckoutSessionInput) (appstripe.CreateCheckoutSessionOutput, error)", + "line": 346 + }, + { + "kind": "func", + "name": "GetSupplierContact", + "signature": "func (a adapter) GetSupplierContact(ctx context.Context, input appstripe.GetSupplierContactInput) (billing.SupplierContact, error)", + "line": 501 + }, + { + "kind": "func", + "name": "GetStripeInvoice", + "signature": "func (a adapter) GetStripeInvoice(ctx context.Context, input appstripe.GetStripeInvoiceInput) (*stripe.Invoice, error)", + "line": 562 + }, + { + "kind": "func", + "name": "CreatePortalSession", + "signature": "func (a adapter) CreatePortalSession(ctx context.Context, input appstripe.CreateStripePortalSessionInput) (appstripe.StripePortalSession, error)", + "line": 583 + }, + { + "kind": "func", + "name": "getStripeAppClient", + "signature": "func (a adapter) getStripeAppClient(ctx context.Context, appID app.AppID, logOperation string, logFields ...any) (appstripe.AppData, stripeclient.StripeAppClient, error)", + "line": 638 + }, + { + "kind": "func", + "name": "mapAppStripeData", + "signature": "func mapAppStripeData(appID app.AppID, dbApp *entdb.AppStripe) appstripe.AppData", + "line": 673 + } + ], + "line_count": 682 + }, + "openmeter/app/stripe/app.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Meta", + "signature": "type Meta struct", + "line": 14 + }, + { + "kind": "func", + "name": "FromEventAppData", + "signature": "func (m *Meta) FromEventAppData(event app.EventApp) error", + "line": 21 + }, + { + "kind": "struct", + "name": "App", + "signature": "type App struct", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a App) Validate() error", + "line": 44 + }, + { + "kind": "func", + "name": "GetEventAppData", + "signature": "func (a App) GetEventAppData() (app.EventAppData, error)", + "line": 88 + } + ], + "line_count": 90 + }, + "openmeter/app/stripe/appcustomer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateCustomer", + "signature": "func (a App) ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error", + "line": 19 + }, + { + "kind": "func", + "name": "ValidateCustomerByID", + "signature": "func (a App) ValidateCustomerByID(ctx context.Context, customerID customer.CustomerID, capabilities []app.CapabilityType) error", + "line": 24 + }, + { + "kind": "func", + "name": "GetCustomerData", + "signature": "func (a App) GetCustomerData(ctx context.Context, input app.GetAppInstanceCustomerDataInput) (app.CustomerData, error)", + "line": 174 + }, + { + "kind": "func", + "name": "UpsertCustomerData", + "signature": "func (a App) UpsertCustomerData(ctx context.Context, input app.UpsertAppInstanceCustomerDataInput) error", + "line": 193 + }, + { + "kind": "func", + "name": "DeleteCustomerData", + "signature": "func (a App) DeleteCustomerData(ctx context.Context, input app.DeleteAppInstanceCustomerDataInput) error", + "line": 219 + } + ], + "line_count": 237 + }, + "openmeter/app/stripe/appinvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateStandardInvoice", + "signature": "func (a App) ValidateStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 32 + }, + { + "kind": "func", + "name": "UpsertStandardInvoice", + "signature": "func (a App) UpsertStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 64 + }, + { + "kind": "func", + "name": "DeleteStandardInvoice", + "signature": "func (a App) DeleteStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 75 + }, + { + "kind": "func", + "name": "FinalizeStandardInvoice", + "signature": "func (a App) FinalizeStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.FinalizeStandardInvoiceResult, error)", + "line": 89 + }, + { + "kind": "func", + "name": "createInvoice", + "signature": "func (a App) createInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 148 + }, + { + "kind": "func", + "name": "updateInvoice", + "signature": "func (a App) updateInvoice(ctx context.Context, invoice billing.StandardInvoice) (*billing.UpsertStandardInvoiceResult, error)", + "line": 272 + }, + { + "kind": "interface", + "name": "StripeInvoiceLineOperationParams", + "signature": "type StripeInvoiceLineOperationParams interface", + "line": 467 + }, + { + "kind": "func", + "name": "getDiscountStripeUpdateInvoiceItemParams", + "signature": "func getDiscountStripeUpdateInvoiceItemParams(\n\tcalculator StripeCalculator,\n\tline billing.DetailedLineWithResolvedTaxConfig,\n\tdiscount billing.AmountLineDiscountManaged,\n\tstripeLine *stripe.InvoiceLineItem,\n) *stripeclient.StripeInvoiceItemWithID", + "line": 499 + }, + { + "kind": "func", + "name": "getDiscountStripeInvoiceItemParams", + "signature": "func getDiscountStripeInvoiceItemParams(calculator StripeCalculator, line billing.DetailedLineWithResolvedTaxConfig, discount billing.AmountLineDiscountManaged) *stripe.InvoiceItemParams", + "line": 512 + }, + { + "kind": "func", + "name": "getDiscountStripeAddInvoiceItemParams", + "signature": "func getDiscountStripeAddInvoiceItemParams(calculator StripeCalculator, line billing.DetailedLineWithResolvedTaxConfig, discount billing.AmountLineDiscountManaged, stripeCustomerID string) *stripe.InvoiceItemParams", + "line": 529 + }, + { + "kind": "func", + "name": "getCreditStripeUpdateInvoiceItemParams", + "signature": "func getCreditStripeUpdateInvoiceItemParams(\n\tcalculator StripeCalculator,\n\tline billing.DetailedLineWithResolvedTaxConfig,\n\tcredit billing.CreditApplied,\n\tstripeLine *stripe.InvoiceLineItem,\n) *stripeclient.StripeInvoiceItemWithID", + "line": 537 + }, + { + "kind": "func", + "name": "getCreditStripeInvoiceItemParams", + "signature": "func getCreditStripeInvoiceItemParams(calculator StripeCalculator, line billing.DetailedLineWithResolvedTaxConfig, credit billing.CreditApplied) *stripe.InvoiceItemParams", + "line": 550 + }, + { + "kind": "func", + "name": "getCreditStripeAddInvoiceItemParams", + "signature": "func getCreditStripeAddInvoiceItemParams(calculator StripeCalculator, line billing.DetailedLineWithResolvedTaxConfig, credit billing.CreditApplied, stripeCustomerID string) *stripe.InvoiceItemParams", + "line": 567 + }, + { + "kind": "func", + "name": "applyTaxSettingsToInvoiceItem", + "signature": "func applyTaxSettingsToInvoiceItem(add *stripe.InvoiceItemParams, taxConfig *billing.TaxConfig) *stripe.InvoiceItemParams", + "line": 574 + }, + { + "kind": "func", + "name": "getStripeUpdateInvoiceItemParams", + "signature": "func getStripeUpdateInvoiceItemParams(\n\tcalculator StripeCalculator,\n\tline billing.DetailedLineWithResolvedTaxConfig,\n\tstripeLine *stripe.InvoiceLineItem,\n) *stripeclient.StripeInvoiceItemWithID", + "line": 589 + }, + { + "kind": "func", + "name": "getStripeInvoiceItemParams", + "signature": "func getStripeInvoiceItemParams(line billing.DetailedLineWithResolvedTaxConfig, calculator StripeCalculator) *stripe.InvoiceItemParams", + "line": 601 + }, + { + "kind": "func", + "name": "getStripeAddInvoiceItemParams", + "signature": "func getStripeAddInvoiceItemParams(line billing.DetailedLineWithResolvedTaxConfig, calculator StripeCalculator, stripeCustomerID string) *stripe.InvoiceItemParams", + "line": 638 + }, + { + "kind": "func", + "name": "getPeriod", + "signature": "func getPeriod(line billing.DetailedLine) *stripe.InvoiceItemPeriodParams", + "line": 645 + }, + { + "kind": "func", + "name": "getDiscountLineName", + "signature": "func getDiscountLineName(line billing.DetailedLine, discount billing.AmountLineDiscountManaged) string", + "line": 653 + }, + { + "kind": "func", + "name": "getCreditLineName", + "signature": "func getCreditLineName(line billing.DetailedLine, credit billing.CreditApplied) string", + "line": 663 + }, + { + "kind": "func", + "name": "getLineName", + "signature": "func getLineName(line billing.DetailedLine) string", + "line": 673 + }, + { + "kind": "func", + "name": "getStripeTaxBehavior", + "signature": "func getStripeTaxBehavior(tb *productcatalog.TaxBehavior) *string", + "line": 683 + }, + { + "kind": "func", + "name": "addResultExternalIDs", + "signature": "func addResultExternalIDs(\n\tnewLines []stripeclient.StripeInvoiceItemWithLineID,\n\tresult *billing.UpsertStandardInvoiceResult,\n) error", + "line": 699 + } + ], + "line_count": 735 + }, + "openmeter/app/stripe/calculator.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/num\"", + "symbols": [ + { + "kind": "func", + "name": "NewStripeCalculator", + "signature": "func NewStripeCalculator(currency currencyx.Code) (StripeCalculator, error)", + "line": 15 + }, + { + "kind": "struct", + "name": "StripeCalculator", + "signature": "type StripeCalculator struct", + "line": 29 + }, + { + "kind": "func", + "name": "RoundToAmount", + "signature": "func (c StripeCalculator) RoundToAmount(amount alpacadecimal.Decimal) int64", + "line": 36 + }, + { + "kind": "func", + "name": "FormatAmount", + "signature": "func (c StripeCalculator) FormatAmount(amount alpacadecimal.Decimal) string", + "line": 41 + }, + { + "kind": "func", + "name": "FormatQuantity", + "signature": "func (c StripeCalculator) FormatQuantity(quantity alpacadecimal.Decimal) string", + "line": 52 + }, + { + "kind": "func", + "name": "IsInteger", + "signature": "func (c StripeCalculator) IsInteger(amount alpacadecimal.Decimal) bool", + "line": 62 + } + ], + "line_count": 64 + }, + "openmeter/app/stripe/client/appclient.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "StripeAppClient", + "signature": "type StripeAppClient interface", + "line": 65 + }, + { + "kind": "struct", + "name": "StripeAppClientConfig", + "signature": "type StripeAppClientConfig struct", + "line": 89 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *StripeAppClientConfig) Validate() error", + "line": 96 + }, + { + "kind": "struct", + "name": "stripeAppClient", + "signature": "type stripeAppClient struct", + "line": 116 + }, + { + "kind": "func", + "name": "NewStripeAppClient", + "signature": "func NewStripeAppClient(config StripeAppClientConfig) (StripeAppClient, error)", + "line": 122 + }, + { + "kind": "func", + "name": "DeleteWebhook", + "signature": "func (c *stripeAppClient) DeleteWebhook(ctx context.Context, input DeleteWebhookInput) error", + "line": 147 + }, + { + "kind": "func", + "name": "GetAccount", + "signature": "func (c *stripeAppClient) GetAccount(ctx context.Context) (StripeAccount, error)", + "line": 168 + }, + { + "kind": "func", + "name": "GetPaymentMethod", + "signature": "func (c *stripeAppClient) GetPaymentMethod(ctx context.Context, stripePaymentMethodID string) (StripePaymentMethod, error)", + "line": 180 + }, + { + "kind": "func", + "name": "toStripePaymentMethod", + "signature": "func toStripePaymentMethod(stripePaymentMethod *stripe.PaymentMethod) StripePaymentMethod", + "line": 197 + }, + { + "kind": "func", + "name": "providerError", + "signature": "func (c *stripeAppClient) providerError(err error) error", + "line": 227 + } + ], + "line_count": 263 + }, + "openmeter/app/stripe/client/checkout.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCheckoutSession", + "signature": "func (c *stripeAppClient) CreateCheckoutSession(ctx context.Context, input CreateCheckoutSessionInput) (StripeCheckoutSession, error)", + "line": 21 + }, + { + "kind": "struct", + "name": "StripeCheckoutSession", + "signature": "type StripeCheckoutSession struct", + "line": 240 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o StripeCheckoutSession) Validate() error", + "line": 260 + }, + { + "kind": "struct", + "name": "CreateCheckoutSessionInput", + "signature": "type CreateCheckoutSessionInput struct", + "line": 276 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCheckoutSessionInput) Validate() error", + "line": 283 + } + ], + "line_count": 323 + }, + "openmeter/app/stripe/client/client.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "StripeClient", + "signature": "type StripeClient interface", + "line": 23 + }, + { + "kind": "struct", + "name": "StripeClientConfig", + "signature": "type StripeClientConfig struct", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *StripeClientConfig) Validate() error", + "line": 37 + }, + { + "kind": "struct", + "name": "stripeClient", + "signature": "type stripeClient struct", + "line": 53 + }, + { + "kind": "func", + "name": "NewStripeClient", + "signature": "func NewStripeClient(config StripeClientConfig) (StripeClient, error)", + "line": 58 + }, + { + "kind": "func", + "name": "SetupWebhook", + "signature": "func (c *stripeClient) SetupWebhook(ctx context.Context, input SetupWebhookInput) (StripeWebhookEndpoint, error)", + "line": 82 + }, + { + "kind": "func", + "name": "GetAccount", + "signature": "func (c *stripeClient) GetAccount(ctx context.Context) (StripeAccount, error)", + "line": 130 + }, + { + "kind": "func", + "name": "providerError", + "signature": "func (c *stripeClient) providerError(err error) error", + "line": 144 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(c currencyx.Code) string", + "line": 173 + }, + { + "kind": "func", + "name": "CurrencyPtr", + "signature": "func CurrencyPtr(c *currencyx.Code) *string", + "line": 178 + }, + { + "kind": "func", + "name": "FromStripeCurrency", + "signature": "func FromStripeCurrency(c stripe.Currency) currencyx.Code", + "line": 183 + } + ], + "line_count": 185 + }, + "openmeter/app/stripe/client/customer.go": { + "header": "\t\"context\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stripe/stripe-go/v80\"", + "symbols": [ + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (c *stripeAppClient) GetCustomer(ctx context.Context, stripeCustomerID string) (StripeCustomer, error)", + "line": 11 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (c *stripeAppClient) CreateCustomer(ctx context.Context, input CreateStripeCustomerInput) (StripeCustomer, error)", + "line": 57 + } + ], + "line_count": 80 + }, + "openmeter/app/stripe/client/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewStripeCustomerNotFoundError", + "signature": "func NewStripeCustomerNotFoundError(stripeCustomerID string) *StripeCustomerNotFoundError", + "line": 13 + }, + { + "kind": "func", + "name": "IsStripeCustomerNotFoundError", + "signature": "func IsStripeCustomerNotFoundError(err error) bool", + "line": 19 + }, + { + "kind": "struct", + "name": "StripeCustomerNotFoundError", + "signature": "type StripeCustomerNotFoundError struct", + "line": 29 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e StripeCustomerNotFoundError) Error() string", + "line": 33 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e StripeCustomerNotFoundError) Unwrap() error", + "line": 37 + }, + { + "kind": "func", + "name": "NewStripePaymentMethodNotFoundError", + "signature": "func NewStripePaymentMethodNotFoundError(stripePaymentMethodID string) *StripePaymentMethodNotFoundError", + "line": 44 + }, + { + "kind": "func", + "name": "IsStripePaymentMethodNotFoundError", + "signature": "func IsStripePaymentMethodNotFoundError(err error) bool", + "line": 50 + }, + { + "kind": "struct", + "name": "StripePaymentMethodNotFoundError", + "signature": "type StripePaymentMethodNotFoundError struct", + "line": 60 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e StripePaymentMethodNotFoundError) Error() string", + "line": 64 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e StripePaymentMethodNotFoundError) Unwrap() error", + "line": 68 + }, + { + "kind": "func", + "name": "NewStripeInvoiceCustomerTaxLocationInvalidError", + "signature": "func NewStripeInvoiceCustomerTaxLocationInvalidError(stripeInvoiceID string, stripeMessage string) *StripeInvoiceCustomerTaxLocationInvalidError", + "line": 75 + }, + { + "kind": "func", + "name": "IsStripeInvoiceCustomerTaxLocationInvalidError", + "signature": "func IsStripeInvoiceCustomerTaxLocationInvalidError(err error) bool", + "line": 81 + }, + { + "kind": "struct", + "name": "StripeInvoiceCustomerTaxLocationInvalidError", + "signature": "type StripeInvoiceCustomerTaxLocationInvalidError struct", + "line": 91 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e StripeInvoiceCustomerTaxLocationInvalidError) Error() string", + "line": 95 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e StripeInvoiceCustomerTaxLocationInvalidError) Unwrap() error", + "line": 99 + } + ], + "line_count": 101 + }, + "openmeter/app/stripe/client/invoice.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateInvoice", + "signature": "func (c *stripeAppClient) CreateInvoice(ctx context.Context, input CreateInvoiceInput) (*stripe.Invoice, error)", + "line": 19 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (c *stripeAppClient) UpdateInvoice(ctx context.Context, input UpdateInvoiceInput) (*stripe.Invoice, error)", + "line": 70 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (c *stripeAppClient) DeleteInvoice(ctx context.Context, input DeleteInvoiceInput) error", + "line": 92 + }, + { + "kind": "func", + "name": "FinalizeInvoice", + "signature": "func (c *stripeAppClient) FinalizeInvoice(ctx context.Context, input FinalizeInvoiceInput) (*stripe.Invoice, error)", + "line": 106 + }, + { + "kind": "func", + "name": "GetInvoice", + "signature": "func (c *stripeAppClient) GetInvoice(ctx context.Context, input GetInvoiceInput) (*stripe.Invoice, error)", + "line": 127 + }, + { + "kind": "struct", + "name": "CreateInvoiceInput", + "signature": "type CreateInvoiceInput struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInvoiceInput) Validate() error", + "line": 154 + }, + { + "kind": "struct", + "name": "UpdateInvoiceInput", + "signature": "type UpdateInvoiceInput struct", + "line": 201 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInvoiceInput) Validate() error", + "line": 207 + }, + { + "kind": "struct", + "name": "DeleteInvoiceInput", + "signature": "type DeleteInvoiceInput struct", + "line": 220 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteInvoiceInput) Validate() error", + "line": 224 + }, + { + "kind": "struct", + "name": "FinalizeInvoiceInput", + "signature": "type FinalizeInvoiceInput struct", + "line": 233 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i FinalizeInvoiceInput) Validate() error", + "line": 238 + }, + { + "kind": "struct", + "name": "GetInvoiceInput", + "signature": "type GetInvoiceInput struct", + "line": 247 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetInvoiceInput) Validate() error", + "line": 251 + } + ], + "line_count": 257 + }, + "openmeter/app/stripe/client/invoice_line.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListInvoiceLineItems", + "signature": "func (c *stripeAppClient) ListInvoiceLineItems(ctx context.Context, stripeInvoiceID string) ([]*stripe.InvoiceLineItem, error)", + "line": 15 + }, + { + "kind": "func", + "name": "AddInvoiceLines", + "signature": "func (c *stripeAppClient) AddInvoiceLines(ctx context.Context, input AddInvoiceLinesInput) ([]StripeInvoiceItemWithLineID, error)", + "line": 43 + }, + { + "kind": "func", + "name": "UpdateInvoiceLines", + "signature": "func (c *stripeAppClient) UpdateInvoiceLines(ctx context.Context, input UpdateInvoiceLinesInput) ([]*stripe.InvoiceItem, error)", + "line": 91 + }, + { + "kind": "func", + "name": "RemoveInvoiceLines", + "signature": "func (c *stripeAppClient) RemoveInvoiceLines(ctx context.Context, input RemoveInvoiceLinesInput) error", + "line": 102 + }, + { + "kind": "struct", + "name": "AddInvoiceLinesInput", + "signature": "type AddInvoiceLinesInput struct", + "line": 114 + }, + { + "kind": "struct", + "name": "StripeInvoiceItemWithLineID", + "signature": "type StripeInvoiceItemWithLineID struct", + "line": 119 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AddInvoiceLinesInput) Validate() error", + "line": 125 + }, + { + "kind": "struct", + "name": "StripeInvoiceItemWithID", + "signature": "type StripeInvoiceItemWithID struct", + "line": 137 + }, + { + "kind": "struct", + "name": "UpdateInvoiceLinesInput", + "signature": "type UpdateInvoiceLinesInput struct", + "line": 144 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInvoiceLinesInput) Validate() error", + "line": 149 + }, + { + "kind": "struct", + "name": "RemoveInvoiceLinesInput", + "signature": "type RemoveInvoiceLinesInput struct", + "line": 162 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RemoveInvoiceLinesInput) Validate() error", + "line": 167 + } + ], + "line_count": 177 + }, + "openmeter/app/stripe/client/logger.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/stripe/stripe-go/v80\"", + "symbols": [ + { + "kind": "struct", + "name": "leveledLogger", + "signature": "type leveledLogger struct", + "line": 13 + }, + { + "kind": "func", + "name": "Debugf", + "signature": "func (l leveledLogger) Debugf(format string, args ...interface{})", + "line": 17 + }, + { + "kind": "func", + "name": "Infof", + "signature": "func (l leveledLogger) Infof(format string, args ...interface{})", + "line": 21 + }, + { + "kind": "func", + "name": "Warnf", + "signature": "func (l leveledLogger) Warnf(format string, args ...interface{})", + "line": 25 + }, + { + "kind": "func", + "name": "Errorf", + "signature": "func (l leveledLogger) Errorf(format string, args ...interface{})", + "line": 29 + } + ], + "line_count": 32 + }, + "openmeter/app/stripe/client/portal.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreatePortalSessionInput", + "signature": "type CreatePortalSessionInput struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreatePortalSessionInput) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "PortalSession", + "signature": "type PortalSession struct", + "line": 42 + }, + { + "kind": "func", + "name": "CreatePortalSession", + "signature": "func (c *stripeAppClient) CreatePortalSession(ctx context.Context, input CreatePortalSessionInput) (PortalSession, error)", + "line": 71 + } + ], + "line_count": 103 + }, + "openmeter/app/stripe/client/stripe.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "StripeWebhookEndpoint", + "signature": "type StripeWebhookEndpoint struct", + "line": 15 + }, + { + "kind": "struct", + "name": "StripeAccount", + "signature": "type StripeAccount struct", + "line": 20 + }, + { + "kind": "struct", + "name": "StripeCustomer", + "signature": "type StripeCustomer struct", + "line": 26 + }, + { + "kind": "struct", + "name": "StripeCustomerTax", + "signature": "type StripeCustomerTax struct", + "line": 37 + }, + { + "kind": "struct", + "name": "StripePaymentMethod", + "signature": "type StripePaymentMethod struct", + "line": 55 + }, + { + "kind": "struct", + "name": "SetupWebhookInput", + "signature": "type SetupWebhookInput struct", + "line": 63 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SetupWebhookInput) Validate() error", + "line": 68 + }, + { + "kind": "struct", + "name": "DeleteWebhookInput", + "signature": "type DeleteWebhookInput struct", + "line": 80 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteWebhookInput) Validate() error", + "line": 85 + }, + { + "kind": "struct", + "name": "CreateStripeCustomerInput", + "signature": "type CreateStripeCustomerInput struct", + "line": 97 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateStripeCustomerInput) Validate() error", + "line": 105 + }, + { + "kind": "func", + "name": "IsAPIKeyLiveMode", + "signature": "func IsAPIKeyLiveMode(apiKey string) bool", + "line": 130 + } + ], + "line_count": 142 + }, + "openmeter/app/stripe/clientapp.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tstripeclient \"github.com/openmeterio/openmeter/openmeter/app/stripe/client\"", + "symbols": [ + { + "kind": "func", + "name": "getStripeClient", + "signature": "func (a App) getStripeClient(ctx context.Context, logOperation string, logFields ...any) (AppData, stripeclient.StripeAppClient, error)", + "line": 12 + } + ], + "line_count": 39 + }, + "openmeter/app/stripe/config.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Configuration", + "signature": "type Configuration struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Configuration) Validate() error", + "line": 14 + }, + { + "kind": "func", + "name": "UpdateAppConfig", + "signature": "func (a App) UpdateAppConfig(ctx context.Context, input app.AppConfigUpdate) error", + "line": 22 + } + ], + "line_count": 40 + }, + "openmeter/app/stripe/customerdata.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "CustomerData", + "signature": "type CustomerData struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d CustomerData) Validate() error", + "line": 16 + } + ], + "line_count": 26 + }, + "openmeter/app/stripe/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewAppCheckoutSessionEvent", + "signature": "func NewAppCheckoutSessionEvent(ctx context.Context, namespace string, sessionID string, appID string, customerID string) AppCheckoutSessionEvent", + "line": 21 + }, + { + "kind": "struct", + "name": "AppCheckoutSessionEvent", + "signature": "type AppCheckoutSessionEvent struct", + "line": 32 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AppCheckoutSessionEvent) EventName() string", + "line": 40 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AppCheckoutSessionEvent) EventMetadata() metadata.EventMetadata", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AppCheckoutSessionEvent) Validate() error", + "line": 59 + } + ], + "line_count": 79 + }, + "openmeter/app/stripe/httpdriver/apikey.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateStripeAPIKey", + "signature": "func (h *handler) UpdateStripeAPIKey() UpdateStripeAPIKeyHandler", + "line": 22 + } + ], + "line_count": 56 + }, + "openmeter/app/stripe/httpdriver/checkout_session.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateAppStripeCheckoutSession", + "signature": "func (h *handler) CreateAppStripeCheckoutSession() CreateAppStripeCheckoutSessionHandler", + "line": 27 + } + ], + "line_count": 161 + }, + "openmeter/app/stripe/httpdriver/const.go": { + "header": "type StripeLogAttributeName string\nconst (\n\tStripeEventIDAttributeName StripeLogAttributeName = \"stripe_event_id\"", + "symbols": [], + "line_count": 9 + }, + "openmeter/app/stripe/httpdriver/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "GetCustomerStripeAppDataRequest", + "signature": "type GetCustomerStripeAppDataRequest struct", + "line": 24 + }, + { + "kind": "struct", + "name": "GetCustomerStripeAppDataParams", + "signature": "type GetCustomerStripeAppDataParams struct", + "line": 28 + }, + { + "kind": "func", + "name": "GetCustomerStripeAppData", + "signature": "func (h *handler) GetCustomerStripeAppData() GetCustomerStripeAppDataHandler", + "line": 33 + }, + { + "kind": "struct", + "name": "UpsertCustomerStripeAppDataRequest", + "signature": "type UpsertCustomerStripeAppDataRequest struct", + "line": 78 + }, + { + "kind": "struct", + "name": "UpsertCustomerStripeAppDataParams", + "signature": "type UpsertCustomerStripeAppDataParams struct", + "line": 83 + }, + { + "kind": "func", + "name": "UpsertCustomerStripeAppData", + "signature": "func (h *handler) UpsertCustomerStripeAppData() UpsertCustomerStripeAppDataHandler", + "line": 93 + }, + { + "kind": "struct", + "name": "CreateStripeCustomerPortalSessionRequest", + "signature": "type CreateStripeCustomerPortalSessionRequest struct", + "line": 165 + }, + { + "kind": "struct", + "name": "CreateStripeCustomerPortalSessionParams", + "signature": "type CreateStripeCustomerPortalSessionParams struct", + "line": 170 + }, + { + "kind": "func", + "name": "CreateStripeCustomerPortalSession", + "signature": "func (h *handler) CreateStripeCustomerPortalSession() CreateStripeCustomerPortalSessionHandler", + "line": 175 + }, + { + "kind": "func", + "name": "getAPIStripeCustomerAppData", + "signature": "func (h *handler) getAPIStripeCustomerAppData(ctx context.Context, customerID customer.CustomerID) (api.StripeCustomerAppData, error)", + "line": 255 + } + ], + "line_count": 284 + }, + "openmeter/app/stripe/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 16 + }, + { + "kind": "interface", + "name": "AppStripeHandler", + "signature": "type AppStripeHandler interface", + "line": 20 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 35 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 43 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice appstripe.Service,\n\tbillingService billing.Service,\n\tcustomerService customer.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 52 + } + ], + "line_count": 66 + }, + "openmeter/app/stripe/httpdriver/mapping.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n\tappstripe \"github.com/openmeterio/openmeter/openmeter/app/stripe\"\n)", + "symbols": [ + { + "kind": "func", + "name": "toAPIStripePortalSession", + "signature": "func toAPIStripePortalSession(portalSession appstripe.StripePortalSession) api.StripeCustomerPortalSession", + "line": 9 + }, + { + "kind": "func", + "name": "fromAPIAppStripeCustomerDataBase", + "signature": "func fromAPIAppStripeCustomerDataBase(apiStripeCustomerData api.StripeCustomerAppDataBase) appstripe.CustomerData", + "line": 28 + } + ], + "line_count": 33 + }, + "openmeter/app/stripe/httpdriver/webhook.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeWebhookParams", + "signature": "type AppStripeWebhookParams struct", + "line": 24 + }, + { + "kind": "struct", + "name": "AppStripeWebhookRequest", + "signature": "type AppStripeWebhookRequest struct", + "line": 29 + }, + { + "kind": "func", + "name": "AppStripeWebhook", + "signature": "func (h *handler) AppStripeWebhook() AppStripeWebhookHandler", + "line": 40 + }, + { + "kind": "func", + "name": "unmarshalInvoiceEvent", + "signature": "func unmarshalInvoiceEvent(data []byte) (stripe.Invoice, error)", + "line": 440 + } + ], + "line_count": 448 + }, + "openmeter/app/stripe/marketplace.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/app\"\n)\nvar (", + "symbols": [], + "line_count": 42 + }, + "openmeter/app/stripe/portal.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateStripePortalSessionInput", + "signature": "type CreateStripePortalSessionInput struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateStripePortalSessionInput) Validate() error", + "line": 25 + }, + { + "kind": "struct", + "name": "StripePortalSession", + "signature": "type StripePortalSession struct", + "line": 48 + } + ], + "line_count": 74 + }, + "openmeter/app/stripe/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 10 + }, + { + "kind": "interface", + "name": "AppFactoryService", + "signature": "type AppFactoryService interface", + "line": 18 + }, + { + "kind": "interface", + "name": "StripeAppService", + "signature": "type StripeAppService interface", + "line": 26 + }, + { + "kind": "interface", + "name": "CustomerService", + "signature": "type CustomerService interface", + "line": 33 + }, + { + "kind": "interface", + "name": "BillingService", + "signature": "type BillingService interface", + "line": 44 + } + ], + "line_count": 50 + }, + "openmeter/app/stripe/service/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GetWebhookSecret", + "signature": "func (s *Service) GetWebhookSecret(ctx context.Context, input appstripe.GetWebhookSecretInput) (appstripe.GetWebhookSecretOutput, error)", + "line": 17 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (s *Service) UpdateAPIKey(ctx context.Context, input appstripe.UpdateAPIKeyInput) error", + "line": 23 + }, + { + "kind": "func", + "name": "CreateCheckoutSession", + "signature": "func (s *Service) CreateCheckoutSession(ctx context.Context, input appstripe.CreateCheckoutSessionInput) (appstripe.CreateCheckoutSessionOutput, error)", + "line": 32 + }, + { + "kind": "func", + "name": "GetStripeAppData", + "signature": "func (s *Service) GetStripeAppData(ctx context.Context, input appstripe.GetStripeAppDataInput) (appstripe.AppData, error)", + "line": 50 + }, + { + "kind": "func", + "name": "GetStripeCustomerData", + "signature": "func (s *Service) GetStripeCustomerData(ctx context.Context, input appstripe.GetStripeCustomerDataInput) (appstripe.CustomerData, error)", + "line": 56 + }, + { + "kind": "func", + "name": "UpsertStripeCustomerData", + "signature": "func (s *Service) UpsertStripeCustomerData(ctx context.Context, input appstripe.UpsertStripeCustomerDataInput) error", + "line": 62 + }, + { + "kind": "func", + "name": "DeleteStripeCustomerData", + "signature": "func (s *Service) DeleteStripeCustomerData(ctx context.Context, input appstripe.DeleteStripeCustomerDataInput) error", + "line": 68 + }, + { + "kind": "func", + "name": "HandleSetupIntentSucceeded", + "signature": "func (s *Service) HandleSetupIntentSucceeded(ctx context.Context, input appstripe.HandleSetupIntentSucceededInput) (appstripe.HandleSetupIntentSucceededOutput, error)", + "line": 74 + }, + { + "kind": "func", + "name": "CreatePortalSession", + "signature": "func (s *Service) CreatePortalSession(ctx context.Context, input appstripe.CreateStripePortalSessionInput) (appstripe.StripePortalSession, error)", + "line": 105 + }, + { + "kind": "func", + "name": "generateMaskedSecretAPIKey", + "signature": "func (s *Service) generateMaskedSecretAPIKey(secretAPIKey string) string", + "line": 109 + } + ], + "line_count": 111 + }, + "openmeter/app/stripe/service/billing.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "GetSupplierContact", + "signature": "func (s *Service) GetSupplierContact(ctx context.Context, input appstripe.GetSupplierContactInput) (billing.SupplierContact, error)", + "line": 22 + }, + { + "kind": "func", + "name": "HandleInvoiceStateTransition", + "signature": "func (s *Service) HandleInvoiceStateTransition(ctx context.Context, input appstripe.HandleInvoiceStateTransitionInput) error", + "line": 27 + }, + { + "kind": "func", + "name": "HandleInvoiceSentEvent", + "signature": "func (s *Service) HandleInvoiceSentEvent(ctx context.Context, input appstripe.HandleInvoiceSentEventInput) error", + "line": 121 + }, + { + "kind": "func", + "name": "stripeErrorToValidationError", + "signature": "func stripeErrorToValidationError(stripeErr *stripe.Error) error", + "line": 141 + }, + { + "kind": "func", + "name": "getInvoiceByStripeID", + "signature": "func (s *Service) getInvoiceByStripeID(ctx context.Context, appID app.AppID, stripeInvoiceID string) (*billing.StandardInvoice, error)", + "line": 150 + } + ], + "line_count": 187 + }, + "openmeter/app/stripe/service/const.go": { + "header": "const (\n\tStripeInvoiceIDAttributeName = \"invoice.stripe_invoice_id\"\n\tInvoiceIDAttributeName = \"invoice.id\"", + "symbols": [], + "line_count": 7 + }, + "openmeter/app/stripe/service/factory.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewApp", + "signature": "func (s *Service) NewApp(ctx context.Context, appBase app.AppBase) (app.App, error)", + "line": 20 + }, + { + "kind": "func", + "name": "InstallAppWithAPIKey", + "signature": "func (s *Service) InstallAppWithAPIKey(ctx context.Context, input app.AppFactoryInstallAppWithAPIKeyInput) (app.App, error)", + "line": 35 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (s *Service) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 146 + }, + { + "kind": "func", + "name": "newApp", + "signature": "func (s *Service) newApp(appBase app.AppBase, stripeApp appstripe.AppData) (appstripe.App, error)", + "line": 219 + } + ], + "line_count": 238 + }, + "openmeter/app/stripe/service/service.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 17 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 71 + } + ], + "line_count": 97 + }, + "openmeter/app/stripe/service/webhook.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "baseURLWebhookURLGenerator", + "signature": "type baseURLWebhookURLGenerator struct", + "line": 15 + }, + { + "kind": "func", + "name": "NewBaseURLWebhookURLGenerator", + "signature": "func NewBaseURLWebhookURLGenerator(baseURL string) (app.WebhookURLGenerator, error)", + "line": 19 + }, + { + "kind": "func", + "name": "GetWebhookURL", + "signature": "func (g *baseURLWebhookURLGenerator) GetWebhookURL(ctx context.Context, appID app.AppID) (string, error)", + "line": 29 + }, + { + "kind": "struct", + "name": "patternWebhookURLGenerator", + "signature": "type patternWebhookURLGenerator struct", + "line": 39 + }, + { + "kind": "func", + "name": "NewPatternWebhookURLGenerator", + "signature": "func NewPatternWebhookURLGenerator(pattern string) (app.WebhookURLGenerator, error)", + "line": 43 + }, + { + "kind": "func", + "name": "GetWebhookURL", + "signature": "func (g *patternWebhookURLGenerator) GetWebhookURL(ctx context.Context, appID app.AppID) (string, error)", + "line": 57 + } + ], + "line_count": 63 + }, + "openmeter/app/stripe/types.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateAppStripeInput", + "signature": "type CreateAppStripeInput struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAppStripeInput) Validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "GetStripeAppDataInput", + "signature": "type GetStripeAppDataInput struct", + "line": 78 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetStripeAppDataInput) Validate() error", + "line": 82 + }, + { + "kind": "struct", + "name": "DeleteStripeAppDataInput", + "signature": "type DeleteStripeAppDataInput struct", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteStripeAppDataInput) Validate() error", + "line": 94 + }, + { + "kind": "struct", + "name": "GetStripeCustomerDataInput", + "signature": "type GetStripeCustomerDataInput struct", + "line": 102 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetStripeCustomerDataInput) Validate() error", + "line": 107 + }, + { + "kind": "struct", + "name": "CreateStripeCustomerInput", + "signature": "type CreateStripeCustomerInput struct", + "line": 123 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateStripeCustomerInput) Validate() error", + "line": 131 + }, + { + "kind": "struct", + "name": "CreateStripeCustomerOutput", + "signature": "type CreateStripeCustomerOutput struct", + "line": 155 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o CreateStripeCustomerOutput) Validate() error", + "line": 159 + }, + { + "kind": "struct", + "name": "UpsertStripeCustomerDataInput", + "signature": "type UpsertStripeCustomerDataInput struct", + "line": 167 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertStripeCustomerDataInput) Validate() error", + "line": 174 + }, + { + "kind": "struct", + "name": "DeleteStripeCustomerDataInput", + "signature": "type DeleteStripeCustomerDataInput struct", + "line": 198 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteStripeCustomerDataInput) Validate() error", + "line": 203 + }, + { + "kind": "struct", + "name": "GetWebhookSecretInput", + "signature": "type GetWebhookSecretInput struct", + "line": 237 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetWebhookSecretInput) Validate() error", + "line": 241 + }, + { + "kind": "struct", + "name": "UpdateAPIKeyInput", + "signature": "type UpdateAPIKeyInput struct", + "line": 251 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAPIKeyInput) Validate() error", + "line": 256 + }, + { + "kind": "struct", + "name": "UpdateAPIKeyAdapterInput", + "signature": "type UpdateAPIKeyAdapterInput struct", + "line": 268 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAPIKeyAdapterInput) Validate() error", + "line": 274 + }, + { + "kind": "struct", + "name": "CreateCheckoutSessionInput", + "signature": "type CreateCheckoutSessionInput struct", + "line": 286 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCheckoutSessionInput) Validate() error", + "line": 295 + }, + { + "kind": "struct", + "name": "CreateCheckoutSessionOutput", + "signature": "type CreateCheckoutSessionOutput struct", + "line": 358 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o CreateCheckoutSessionOutput) Validate() error", + "line": 366 + }, + { + "kind": "struct", + "name": "AppBase", + "signature": "type AppBase struct", + "line": 388 + }, + { + "kind": "struct", + "name": "AppData", + "signature": "type AppData struct", + "line": 394 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d AppData) Validate() error", + "line": 403 + }, + { + "kind": "struct", + "name": "SetCustomerDefaultPaymentMethodInput", + "signature": "type SetCustomerDefaultPaymentMethodInput struct", + "line": 423 + }, + { + "kind": "struct", + "name": "SetCustomerDefaultPaymentMethodOutput", + "signature": "type SetCustomerDefaultPaymentMethodOutput struct", + "line": 429 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SetCustomerDefaultPaymentMethodInput) Validate() error", + "line": 433 + }, + { + "kind": "struct", + "name": "HandleSetupIntentSucceededInput", + "signature": "type HandleSetupIntentSucceededInput struct", + "line": 449 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i HandleSetupIntentSucceededInput) Validate() error", + "line": 455 + }, + { + "kind": "struct", + "name": "HandleSetupIntentSucceededOutput", + "signature": "type HandleSetupIntentSucceededOutput struct", + "line": 463 + }, + { + "kind": "struct", + "name": "GetSupplierContactInput", + "signature": "type GetSupplierContactInput struct", + "line": 468 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetSupplierContactInput) Validate() error", + "line": 472 + }, + { + "kind": "struct", + "name": "ValidationErrorsInput", + "signature": "type ValidationErrorsInput struct", + "line": 480 + }, + { + "kind": "struct", + "name": "HandleInvoiceStateTransitionInput", + "signature": "type HandleInvoiceStateTransitionInput struct", + "line": 485 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i HandleInvoiceStateTransitionInput) Validate() error", + "line": 511 + }, + { + "kind": "struct", + "name": "HandleInvoiceSentEventInput", + "signature": "type HandleInvoiceSentEventInput struct", + "line": 531 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i HandleInvoiceSentEventInput) Validate() error", + "line": 537 + }, + { + "kind": "struct", + "name": "GetStripeInvoiceInput", + "signature": "type GetStripeInvoiceInput struct", + "line": 553 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetStripeInvoiceInput) Validate() error", + "line": 558 + } + ], + "line_count": 568 + }, + "openmeter/app/webhook.go": { + "header": "\t\"context\"\n)\ntype WebhookURLGenerator interface {", + "symbols": [ + { + "kind": "interface", + "name": "WebhookURLGenerator", + "signature": "type WebhookURLGenerator interface", + "line": 7 + } + ], + "line_count": 9 + }, + "openmeter/billing/README.md": { + "header": "# Billing\n\nThis package contains the implementation for the billing stack (invoicing, tax and payments).\n\nThe package has the following main entities:\n\n## BillingProfile\n\nCaptures all the billing details, two main information is stored inside:\n- The [billing workflow](./entity/customeroverride.go) (when to invoice, due periods etc)\n- References to the apps responsible for tax, invoicing and payments (Sandbox or Stripe for now)\n\nOnly one default billing profile can exist per namespace.\n\n## CustomerOverride\n\nContains customer specific overrides for billing pruposes. It can reference a billing profile other than the default (e.g. when different apps or lifecycle should be used) and allows to override the billing workflow.\n\n## Invoice\n", + "symbols": [], + "line_count": 159 + }, + "openmeter/billing/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 14 + }, + { + "kind": "interface", + "name": "ProfileAdapter", + "signature": "type ProfileAdapter interface", + "line": 30 + }, + { + "kind": "interface", + "name": "CustomerOverrideAdapter", + "signature": "type CustomerOverrideAdapter interface", + "line": 43 + }, + { + "kind": "interface", + "name": "CustomerSynchronizationAdapter", + "signature": "type CustomerSynchronizationAdapter interface", + "line": 55 + }, + { + "kind": "interface", + "name": "InvoiceLineAdapter", + "signature": "type InvoiceLineAdapter interface", + "line": 62 + }, + { + "kind": "interface", + "name": "InvoiceAdapter", + "signature": "type InvoiceAdapter interface", + "line": 68 + }, + { + "kind": "interface", + "name": "StandardInvoiceAdapter", + "signature": "type StandardInvoiceAdapter interface", + "line": 79 + }, + { + "kind": "interface", + "name": "GatheringInvoiceAdapter", + "signature": "type GatheringInvoiceAdapter interface", + "line": 84 + }, + { + "kind": "interface", + "name": "InvoiceSplitLineGroupAdapter", + "signature": "type InvoiceSplitLineGroupAdapter interface", + "line": 94 + }, + { + "kind": "interface", + "name": "SequenceAdapter", + "signature": "type SequenceAdapter interface", + "line": 102 + }, + { + "kind": "interface", + "name": "InvoiceAppAdapter", + "signature": "type InvoiceAppAdapter interface", + "line": 106 + }, + { + "kind": "interface", + "name": "SchemaLevelAdapter", + "signature": "type SchemaLevelAdapter interface", + "line": 110 + } + ], + "line_count": 115 + }, + "openmeter/billing/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (billing.Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 61 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/billing/adapter/customeroverride.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomerOverride", + "signature": "func (a *adapter) CreateCustomerOverride(ctx context.Context, input billing.CreateCustomerOverrideAdapterInput) (*billing.CustomerOverride, error)", + "line": 35 + }, + { + "kind": "func", + "name": "UpdateCustomerOverride", + "signature": "func (a *adapter) UpdateCustomerOverride(ctx context.Context, input billing.UpdateCustomerOverrideAdapterInput) (*billing.CustomerOverride, error)", + "line": 70 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (a *adapter) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideAdapterInput) (*billing.CustomerOverride, error)", + "line": 128 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (a *adapter) ListCustomerOverrides(ctx context.Context, input billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesAdapterResult, error)", + "line": 172 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (a *adapter) DeleteCustomerOverride(ctx context.Context, input billing.DeleteCustomerOverrideInput) error", + "line": 307 + }, + { + "kind": "func", + "name": "GetCustomerOverrideReferencingProfile", + "signature": "func (a *adapter) GetCustomerOverrideReferencingProfile(ctx context.Context, input billing.HasCustomerOverrideReferencingProfileAdapterInput) ([]customer.CustomerID, error)", + "line": 339 + }, + { + "kind": "func", + "name": "BulkAssignCustomersToProfile", + "signature": "func (a *adapter) BulkAssignCustomersToProfile(ctx context.Context, input billing.BulkAssignCustomersToProfileInput) error", + "line": 363 + }, + { + "kind": "func", + "name": "mapCustomerOverrideFromDB", + "signature": "func mapCustomerOverrideFromDB(dbOverride *db.BillingCustomerOverride) (*billing.CustomerOverride, error)", + "line": 390 + } + ], + "line_count": 457 + }, + "openmeter/billing/adapter/gatheringinvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreateGatheringInvoice", + "signature": "func (a *adapter) CreateGatheringInvoice(ctx context.Context, input billing.CreateGatheringInvoiceAdapterInput) (billing.GatheringInvoice, error)", + "line": 28 + }, + { + "kind": "func", + "name": "UpdateGatheringInvoice", + "signature": "func (a *adapter) UpdateGatheringInvoice(ctx context.Context, in billing.GatheringInvoice) error", + "line": 97 + }, + { + "kind": "func", + "name": "ListGatheringInvoices", + "signature": "func (a *adapter) ListGatheringInvoices(ctx context.Context, input billing.ListGatheringInvoicesInput) (pagination.Result[billing.GatheringInvoice], error)", + "line": 200 + }, + { + "kind": "func", + "name": "validateUpdateGatheringInvoiceRequest", + "signature": "func (a *adapter) validateUpdateGatheringInvoiceRequest(req billing.GatheringInvoice, existing *db.BillingInvoice) error", + "line": 279 + }, + { + "kind": "func", + "name": "DeleteGatheringInvoice", + "signature": "func (a *adapter) DeleteGatheringInvoice(ctx context.Context, input billing.DeleteGatheringInvoiceAdapterInput) error", + "line": 301 + }, + { + "kind": "func", + "name": "expandGatheringInvoiceLines", + "signature": "func (a *adapter) expandGatheringInvoiceLines(q *db.BillingInvoiceQuery, expand billing.GatheringInvoiceExpands) *db.BillingInvoiceQuery", + "line": 338 + }, + { + "kind": "func", + "name": "GetGatheringInvoiceById", + "signature": "func (a *adapter) GetGatheringInvoiceById(ctx context.Context, input billing.GetGatheringInvoiceByIdInput) (billing.GatheringInvoice, error)", + "line": 352 + }, + { + "kind": "func", + "name": "mapGatheringInvoiceFromDB", + "signature": "func (a *adapter) mapGatheringInvoiceFromDB(ctx context.Context, invoice *db.BillingInvoice, expand billing.GatheringInvoiceExpands) (billing.GatheringInvoice, error)", + "line": 381 + } + ], + "line_count": 451 + }, + "openmeter/billing/adapter/gatheringlines.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "HardDeleteGatheringInvoiceLines", + "signature": "func (a *adapter) HardDeleteGatheringInvoiceLines(ctx context.Context, invoiceID billing.InvoiceID, lineIDs []string) error", + "line": 28 + }, + { + "kind": "struct", + "name": "gatheringLineDiff", + "signature": "type gatheringLineDiff struct", + "line": 104 + }, + { + "kind": "func", + "name": "diffGatheringInvoiceLines", + "signature": "func diffGatheringInvoiceLines(lines billing.GatheringLines) (gatheringLineDiff, error)", + "line": 108 + }, + { + "kind": "func", + "name": "updateGatheringLines", + "signature": "func (a *adapter) updateGatheringLines(ctx context.Context, lines billing.GatheringLines) error", + "line": 145 + }, + { + "kind": "func", + "name": "mapGatheringInvoiceLinesFromDB", + "signature": "func (a *adapter) mapGatheringInvoiceLinesFromDB(schemaLevel int, dbLines []*db.BillingInvoiceLine) (billing.GatheringLines, error)", + "line": 265 + }, + { + "kind": "func", + "name": "mapGatheringInvoiceLineFromDB", + "signature": "func (a *adapter) mapGatheringInvoiceLineFromDB(schemaLevel int, dbLine *db.BillingInvoiceLine) (billing.GatheringLine, error)", + "line": 271 + } + ], + "line_count": 348 + }, + "openmeter/billing/adapter/invoice.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetStandardInvoiceById", + "signature": "func (a *adapter) GetStandardInvoiceById(ctx context.Context, in billing.GetStandardInvoiceByIdInput) (billing.StandardInvoice, error)", + "line": 36 + }, + { + "kind": "func", + "name": "expandInvoiceLineItems", + "signature": "func (a *adapter) expandInvoiceLineItems(query *db.BillingInvoiceQuery, expand billing.StandardInvoiceExpands) *db.BillingInvoiceQuery", + "line": 72 + }, + { + "kind": "func", + "name": "DeleteGatheringInvoices", + "signature": "func (a *adapter) DeleteGatheringInvoices(ctx context.Context, input billing.DeleteGatheringInvoicesInput) error", + "line": 89 + }, + { + "kind": "func", + "name": "ListInvoices", + "signature": "func (a *adapter) ListInvoices(ctx context.Context, input billing.ListInvoicesAdapterInput) (billing.ListInvoicesResponse, error)", + "line": 119 + }, + { + "kind": "func", + "name": "CreateInvoice", + "signature": "func (a *adapter) CreateInvoice(ctx context.Context, input billing.CreateInvoiceAdapterInput) (billing.CreateInvoiceAdapterRespone, error)", + "line": 302 + }, + { + "kind": "struct", + "name": "lineCountQueryOut", + "signature": "type lineCountQueryOut struct", + "line": 386 + }, + { + "kind": "func", + "name": "AssociatedLineCounts", + "signature": "func (a *adapter) AssociatedLineCounts(ctx context.Context, input billing.AssociatedLineCountsAdapterInput) (billing.AssociatedLineCountsAdapterResponse, error)", + "line": 391 + }, + { + "kind": "func", + "name": "validateUpdateRequest", + "signature": "func (a *adapter) validateUpdateRequest(req billing.UpdateStandardInvoiceAdapterInput, existing *db.BillingInvoice) error", + "line": 432 + }, + { + "kind": "func", + "name": "UpdateStandardInvoice", + "signature": "func (a *adapter) UpdateStandardInvoice(ctx context.Context, in billing.UpdateStandardInvoiceAdapterInput) (billing.StandardInvoice, error)", + "line": 455 + }, + { + "kind": "func", + "name": "GetInvoiceOwnership", + "signature": "func (a *adapter) GetInvoiceOwnership(ctx context.Context, in billing.GetInvoiceOwnershipAdapterInput) (billing.GetOwnershipAdapterResponse, error)", + "line": 615 + }, + { + "kind": "func", + "name": "mapStandardInvoiceBaseFromDB", + "signature": "func (a *adapter) mapStandardInvoiceBaseFromDB(invoice *db.BillingInvoice) billing.StandardInvoiceBase", + "line": 647 + }, + { + "kind": "func", + "name": "normalizeOptionalTime", + "signature": "func normalizeOptionalTime(t *time.Time) *time.Time", + "line": 706 + }, + { + "kind": "func", + "name": "mapStandardInvoiceFromDB", + "signature": "func (a *adapter) mapStandardInvoiceFromDB(ctx context.Context, invoice *db.BillingInvoice, expand billing.StandardInvoiceExpands) (billing.StandardInvoice, error)", + "line": 719 + }, + { + "kind": "func", + "name": "mapPeriodFromDB", + "signature": "func mapPeriodFromDB(start, end *time.Time) *timeutil.ClosedPeriod", + "line": 794 + }, + { + "kind": "func", + "name": "mapCustomerUsageAttributionFromDB", + "signature": "func mapCustomerUsageAttributionFromDB(customerID string, customerKey *string, vua *billing.VersionedCustomerUsageAttribution) *streaming.CustomerUsageAttribution", + "line": 804 + }, + { + "kind": "func", + "name": "mapCustomerUsageAttributionToDB", + "signature": "func mapCustomerUsageAttributionToDB(customer customer.Customer) *billing.VersionedCustomerUsageAttribution", + "line": 820 + }, + { + "kind": "func", + "name": "IsAppUsed", + "signature": "func (a *adapter) IsAppUsed(ctx context.Context, appID app.AppID) error", + "line": 834 + }, + { + "kind": "func", + "name": "GetInvoiceType", + "signature": "func (a *adapter) GetInvoiceType(ctx context.Context, input billing.GetInvoiceTypeAdapterInput) (billing.InvoiceType, error)", + "line": 896 + } + ], + "line_count": 922 + }, + "openmeter/billing/adapter/invoiceapp.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateInvoiceFields", + "signature": "func (a *adapter) UpdateInvoiceFields(ctx context.Context, in billing.UpdateInvoiceFieldsInput) error", + "line": 15 + } + ], + "line_count": 41 + }, + "openmeter/billing/adapter/invoicelinesplitgroup.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreateSplitLineGroup", + "signature": "func (a *adapter) CreateSplitLineGroup(ctx context.Context, input billing.CreateSplitLineGroupAdapterInput) (billing.SplitLineGroup, error)", + "line": 21 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroup", + "signature": "func (a *adapter) UpdateSplitLineGroup(ctx context.Context, input billing.UpdateSplitLineGroupInput) (billing.SplitLineGroup, error)", + "line": 59 + }, + { + "kind": "func", + "name": "DeleteSplitLineGroup", + "signature": "func (a *adapter) DeleteSplitLineGroup(ctx context.Context, input billing.DeleteSplitLineGroupInput) error", + "line": 88 + }, + { + "kind": "func", + "name": "GetSplitLineGroup", + "signature": "func (a *adapter) GetSplitLineGroup(ctx context.Context, input billing.GetSplitLineGroupInput) (billing.SplitLineHierarchy, error)", + "line": 115 + }, + { + "kind": "func", + "name": "mapSplitLineGroupFromDB", + "signature": "func (a *adapter) mapSplitLineGroupFromDB(dbSplitLineGroup *db.BillingInvoiceSplitLineGroup) (billing.SplitLineGroup, error)", + "line": 149 + }, + { + "kind": "func", + "name": "mapSplitLineHierarchyFromDB", + "signature": "func (a *adapter) mapSplitLineHierarchyFromDB(ctx context.Context, dbSplitLineGroup *db.BillingInvoiceSplitLineGroup) (billing.SplitLineHierarchy, error)", + "line": 202 + }, + { + "kind": "func", + "name": "mapSplitLineHierarchyLinesFromDB", + "signature": "func (a *adapter) mapSplitLineHierarchyLinesFromDB(ctx context.Context, dbLines []*db.BillingInvoiceLine) ([]billing.LineWithInvoiceHeader, error)", + "line": 221 + }, + { + "kind": "func", + "name": "mapSplitLineHierarchyStandardLineFromDB", + "signature": "func (a *adapter) mapSplitLineHierarchyStandardLineFromDB(ctx context.Context, dbLine *db.BillingInvoiceLine) (billing.LineWithInvoiceHeader, error)", + "line": 236 + }, + { + "kind": "func", + "name": "mapSplitLineHierarchyGatheringLineFromDB", + "signature": "func (a *adapter) mapSplitLineHierarchyGatheringLineFromDB(ctx context.Context, dbLine *db.BillingInvoiceLine) (billing.LineWithInvoiceHeader, error)", + "line": 253 + }, + { + "kind": "func", + "name": "expandSplitLineHierarchy", + "signature": "func (a *adapter) expandSplitLineHierarchy(ctx context.Context, namespace string, lines []billing.GenericInvoiceLine) (lineIdToSplitLineHierarchy, error)", + "line": 275 + }, + { + "kind": "interface", + "name": "splitLineSettableLines", + "signature": "type splitLineSettableLines interface", + "line": 306 + }, + { + "kind": "func", + "name": "fetchAllSplitLineGroups", + "signature": "func (a *adapter) fetchAllSplitLineGroups(ctx context.Context, namespace string, splitLineGroupIDs []string) ([]billing.SplitLineHierarchy, error)", + "line": 329 + }, + { + "kind": "func", + "name": "GetSplitLineGroupHeaders", + "signature": "func (a *adapter) GetSplitLineGroupHeaders(ctx context.Context, input billing.GetSplitLineGroupHeadersInput) (billing.SplitLineGroupHeaders, error)", + "line": 352 + } + ], + "line_count": 377 + }, + "openmeter/billing/adapter/lock.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\tentsql \"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertCustomerLock", + "signature": "func (a *adapter) UpsertCustomerLock(ctx context.Context, input billing.UpsertCustomerLockAdapterInput) error", + "line": 16 + }, + { + "kind": "func", + "name": "LockCustomerForUpdate", + "signature": "func (a *adapter) LockCustomerForUpdate(ctx context.Context, input billing.LockCustomerForUpdateAdapterInput) error", + "line": 33 + } + ], + "line_count": 63 + }, + "openmeter/billing/adapter/profile.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "CreateProfile", + "signature": "func (a *adapter) CreateProfile(ctx context.Context, input billing.CreateProfileInput) (*billing.BaseProfile, error)", + "line": 40 + }, + { + "kind": "func", + "name": "createWorkflowConfig", + "signature": "func (a *adapter) createWorkflowConfig(ctx context.Context, ns string, input billing.WorkflowConfig) (*db.BillingWorkflowConfig, error)", + "line": 91 + }, + { + "kind": "func", + "name": "GetProfile", + "signature": "func (a *adapter) GetProfile(ctx context.Context, input billing.GetProfileInput) (*billing.AdapterGetProfileResponse, error)", + "line": 132 + }, + { + "kind": "func", + "name": "ListProfiles", + "signature": "func (a *adapter) ListProfiles(ctx context.Context, input billing.ListProfilesInput) (pagination.Result[billing.BaseProfile], error)", + "line": 154 + }, + { + "kind": "func", + "name": "GetDefaultProfile", + "signature": "func (a *adapter) GetDefaultProfile(ctx context.Context, input billing.GetDefaultProfileInput) (*billing.AdapterGetProfileResponse, error)", + "line": 211 + }, + { + "kind": "func", + "name": "DeleteProfile", + "signature": "func (a *adapter) DeleteProfile(ctx context.Context, input billing.DeleteProfileInput) error", + "line": 233 + }, + { + "kind": "func", + "name": "UpdateProfile", + "signature": "func (a *adapter) UpdateProfile(ctx context.Context, input billing.UpdateProfileAdapterInput) (*billing.BaseProfile, error)", + "line": 266 + }, + { + "kind": "func", + "name": "GetUnpinnedCustomerIDsWithPaidSubscription", + "signature": "func (a *adapter) GetUnpinnedCustomerIDsWithPaidSubscription(ctx context.Context, input billing.GetUnpinnedCustomerIDsWithPaidSubscriptionInput) ([]customer.CustomerID, error)", + "line": 313 + }, + { + "kind": "func", + "name": "isBillingProfileUsed", + "signature": "func (a *adapter) isBillingProfileUsed(ctx context.Context, appID app.AppID) error", + "line": 366 + }, + { + "kind": "func", + "name": "updateWorkflowConfig", + "signature": "func (a *adapter) updateWorkflowConfig(ctx context.Context, ns string, id string, input billing.WorkflowConfig) (*db.BillingWorkflowConfig, error)", + "line": 396 + }, + { + "kind": "func", + "name": "mapProfileFromDB", + "signature": "func mapProfileFromDB(dbProfile *db.BillingProfile) (*billing.AdapterGetProfileResponse, error)", + "line": 435 + }, + { + "kind": "func", + "name": "mapWorkflowConfigFromDB", + "signature": "func mapWorkflowConfigFromDB(dbWC *db.BillingWorkflowConfig) (billing.WorkflowConfig, error)", + "line": 484 + } + ], + "line_count": 535 + }, + "openmeter/billing/adapter/schemalevel.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "GetInvoiceDefaultSchemaLevel", + "signature": "func (a *adapter) GetInvoiceDefaultSchemaLevel(ctx context.Context) (int, error)", + "line": 21 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultSchemaLevel", + "signature": "func (a *adapter) SetInvoiceDefaultSchemaLevel(ctx context.Context, level int) error", + "line": 36 + }, + { + "kind": "func", + "name": "getSchemaLevelPerInvoice", + "signature": "func (a *adapter) getSchemaLevelPerInvoice(ctx context.Context, customerID customer.CustomerID) (map[string]int, error)", + "line": 47 + } + ], + "line_count": 65 + }, + "openmeter/billing/adapter/schemamigration.go": { + "header": "\t\"context\"\n\tentsql \"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "customerMigrationStatus", + "signature": "type customerMigrationStatus struct", + "line": 14 + }, + { + "kind": "func", + "name": "shouldInvoicesBeMigrated", + "signature": "func (a *adapter) shouldInvoicesBeMigrated(ctx context.Context, customerID customer.CustomerID) (customerMigrationStatus, error)", + "line": 19 + }, + { + "kind": "func", + "name": "migrateCustomerInvoices", + "signature": "func (a *adapter) migrateCustomerInvoices(ctx context.Context, customerID customer.CustomerID, minLevel int) error", + "line": 56 + }, + { + "kind": "func", + "name": "migrateSchemaLevel1", + "signature": "func (a *adapter) migrateSchemaLevel1(ctx context.Context, customerID customer.CustomerID) error", + "line": 69 + } + ], + "line_count": 91 + }, + "openmeter/billing/adapter/seq.go": { + "header": "\t\"context\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "NextSequenceNumber", + "signature": "func (a *adapter) NextSequenceNumber(ctx context.Context, input billing.NextSequenceNumberInput) (alpacadecimal.Decimal, error)", + "line": 16 + } + ], + "line_count": 70 + }, + "openmeter/billing/adapter/stdinvoicelinediff.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/pkg/entitydiff\"", + "symbols": [ + { + "kind": "struct", + "name": "invoiceLineDiff", + "signature": "type invoiceLineDiff struct", + "line": 22 + }, + { + "kind": "func", + "name": "diffInvoiceLines", + "signature": "func diffInvoiceLines(lines []*billing.StandardLine) (invoiceLineDiff, error)", + "line": 42 + }, + { + "kind": "func", + "name": "DeleteLine", + "signature": "func (d *invoiceLineDiff) DeleteLine(item *billing.StandardLine) error", + "line": 158 + }, + { + "kind": "func", + "name": "CreateLine", + "signature": "func (d *invoiceLineDiff) CreateLine(item *billing.StandardLine) error", + "line": 177 + }, + { + "kind": "func", + "name": "DeleteDetailedLine", + "signature": "func (d *invoiceLineDiff) DeleteDetailedLine(item *billing.DetailedLine, parent *billing.StandardLine) error", + "line": 205 + }, + { + "kind": "func", + "name": "CreateDetailedLine", + "signature": "func (d *invoiceLineDiff) CreateDetailedLine(item *billing.DetailedLine, parent *billing.StandardLine) error", + "line": 221 + } + ], + "line_count": 235 + }, + "openmeter/billing/adapter/stdinvoicelinediff_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "idDiff", + "signature": "type idDiff struct", + "line": 18 + }, + { + "kind": "struct", + "name": "lineDiffExpectation", + "signature": "type lineDiffExpectation struct", + "line": 24 + }, + { + "kind": "func", + "name": "TestInvoiceLineDiffing", + "signature": "func TestInvoiceLineDiffing(t *testing.T)", + "line": 36 + }, + { + "kind": "func", + "name": "msgPrefix", + "signature": "func msgPrefix(prefix string, in ...interface{}) []interface", + "line": 332 + }, + { + "kind": "func", + "name": "requireDiff", + "signature": "func requireDiff(t *testing.T, expected lineDiffExpectation, actual invoiceLineDiff)", + "line": 355 + }, + { + "kind": "func", + "name": "cloneLines", + "signature": "func cloneLines(lines []*billing.StandardLine) []*billing.StandardLine", + "line": 367 + }, + { + "kind": "func", + "name": "snapshotAsDBState", + "signature": "func snapshotAsDBState(t *testing.T, lines []*billing.StandardLine)", + "line": 374 + }, + { + "kind": "func", + "name": "newDetailedLineAmountDiscountsWithIDs", + "signature": "func newDetailedLineAmountDiscountsWithIDs(ids ...string) billing.AmountLineDiscountsManaged", + "line": 383 + }, + { + "kind": "func", + "name": "getDetailedLineByID", + "signature": "func getDetailedLineByID(l *billing.StandardLine, id string) *billing.DetailedLine", + "line": 396 + }, + { + "kind": "func", + "name": "removeDetailedLineByID", + "signature": "func removeDetailedLineByID(l *billing.StandardLine, id string) bool", + "line": 405 + } + ], + "line_count": 415 + }, + "openmeter/billing/adapter/stdinvoicelinemapper.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "mapStandardInvoiceLinesFromDB", + "signature": "func (a *adapter) mapStandardInvoiceLinesFromDB(schemaLevelByInvoiceID map[string]int, dbLines []*db.BillingInvoiceLine) (billing.StandardLines, error)", + "line": 24 + }, + { + "kind": "func", + "name": "mapStandardInvoiceLineWithoutReferences", + "signature": "func (a *adapter) mapStandardInvoiceLineWithoutReferences(dbLine *db.BillingInvoiceLine) (*billing.StandardLine, error)", + "line": 61 + }, + { + "kind": "func", + "name": "mapStandardInvoiceDetailedLineFromDB", + "signature": "func (a *adapter) mapStandardInvoiceDetailedLineFromDB(dbLine *db.BillingInvoiceLine) (billing.DetailedLine, error)", + "line": 155 + }, + { + "kind": "func", + "name": "mapStandardInvoiceDetailedLineV2FromDB", + "signature": "func (a *adapter) mapStandardInvoiceDetailedLineV2FromDB(dbLine *db.BillingStandardInvoiceDetailedLine) (billing.DetailedLine, error)", + "line": 207 + }, + { + "kind": "func", + "name": "mapStandardInvoiceLineUsageDiscountFromDB", + "signature": "func (a *adapter) mapStandardInvoiceLineUsageDiscountFromDB(dbDiscount *db.BillingInvoiceLineUsageDiscount) (billing.UsageLineDiscountManaged, error)", + "line": 224 + }, + { + "kind": "func", + "name": "mapStandardInvoiceLineAmountDiscountFromDB", + "signature": "func (a *adapter) mapStandardInvoiceLineAmountDiscountFromDB(dbDiscount *db.BillingInvoiceLineDiscount) (billing.AmountLineDiscountManaged, error)", + "line": 260 + }, + { + "kind": "func", + "name": "taxCodeFromInvoiceLineEdge", + "signature": "func taxCodeFromInvoiceLineEdge(dbLine *db.BillingInvoiceLine) *taxcode.TaxCode", + "line": 296 + }, + { + "kind": "func", + "name": "backfillTaxConfigReferences", + "signature": "func backfillTaxConfigReferences(snapshottedTaxConfig *billing.TaxConfig, persistedTaxBehavior *productcatalog.TaxBehavior, resolvedTaxCode *taxcode.TaxCode) *billing.TaxConfig", + "line": 321 + }, + { + "kind": "func", + "name": "mapStandardInvoiceDetailedLineAmountDiscountFromDB", + "signature": "func (a *adapter) mapStandardInvoiceDetailedLineAmountDiscountFromDB(dbDiscount *db.BillingStandardInvoiceDetailedLineAmountDiscount) (billing.AmountLineDiscountManaged, error)", + "line": 349 + } + ], + "line_count": 383 + }, + "openmeter/billing/adapter/stdinvoicelines.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertInvoiceLines", + "signature": "func (a *adapter) UpsertInvoiceLines(ctx context.Context, inputIn billing.UpsertInvoiceLinesAdapterInput) ([]*billing.StandardLine, error)", + "line": 36 + }, + { + "kind": "func", + "name": "upsertFeeLineConfig", + "signature": "func (a *adapter) upsertFeeLineConfig(ctx context.Context, in detailedLineDiff) error", + "line": 267 + }, + { + "kind": "func", + "name": "upsertDetailedLines", + "signature": "func (a *adapter) upsertDetailedLines(ctx context.Context, in detailedLineDiff) error", + "line": 298 + }, + { + "kind": "func", + "name": "upsertDetailedLineAmountDiscounts", + "signature": "func (a *adapter) upsertDetailedLineAmountDiscounts(ctx context.Context, in detailedLineAmountDiscountDiff) error", + "line": 361 + }, + { + "kind": "func", + "name": "upsertDetailedLinesV2", + "signature": "func (a *adapter) upsertDetailedLinesV2(ctx context.Context, in detailedLineDiff) error", + "line": 405 + }, + { + "kind": "func", + "name": "upsertDetailedLineAmountDiscountsV2", + "signature": "func (a *adapter) upsertDetailedLineAmountDiscountsV2(ctx context.Context, in detailedLineAmountDiscountDiff) error", + "line": 453 + }, + { + "kind": "func", + "name": "upsertUsageBasedConfig", + "signature": "func (a *adapter) upsertUsageBasedConfig(ctx context.Context, lineDiffs entitydiff.Diff[*billing.StandardLine]) error", + "line": 504 + }, + { + "kind": "func", + "name": "ListInvoiceLines", + "signature": "func (a *adapter) ListInvoiceLines(ctx context.Context, input billing.ListInvoiceLinesAdapterInput) ([]*billing.StandardLine, error)", + "line": 536 + }, + { + "kind": "func", + "name": "expandLineItems", + "signature": "func (a *adapter) expandLineItems(q *db.BillingInvoiceLineQuery) *db.BillingInvoiceLineQuery", + "line": 609 + }, + { + "kind": "func", + "name": "expandLineItemsWithDetailedLines", + "signature": "func (a *adapter) expandLineItemsWithDetailedLines(q *db.BillingInvoiceLineQuery) *db.BillingInvoiceLineQuery", + "line": 626 + }, + { + "kind": "struct", + "name": "refetchInvoiceLinesInput", + "signature": "type refetchInvoiceLinesInput struct", + "line": 654 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i refetchInvoiceLinesInput) Validate() error", + "line": 662 + }, + { + "kind": "func", + "name": "refetchInvoiceLines", + "signature": "func (a *adapter) refetchInvoiceLines(ctx context.Context, in refetchInvoiceLinesInput) ([]*billing.StandardLine, error)", + "line": 678 + }, + { + "kind": "func", + "name": "GetLinesForSubscription", + "signature": "func (a *adapter) GetLinesForSubscription(ctx context.Context, in billing.GetLinesForSubscriptionInput) ([]billing.LineOrHierarchy, error)", + "line": 744 + } + ], + "line_count": 911 + }, + "openmeter/billing/adapter/upsert.go": { + "header": "\t\"context\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\t\"github.com/openmeterio/openmeter/pkg/entitydiff\"", + "symbols": [], + "line_count": 78 + }, + "openmeter/billing/adapter/validationissue.go": { + "header": "\t\"context\"\n\t\"crypto/sha256\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "validationIssueWithDedupe", + "signature": "type validationIssueWithDedupe struct", + "line": 17 + }, + { + "kind": "func", + "name": "issueDedupeHash", + "signature": "func issueDedupeHash(issue billing.ValidationIssue) []byte", + "line": 22 + }, + { + "kind": "func", + "name": "persistValidationIssues", + "signature": "func (a *adapter) persistValidationIssues(ctx context.Context, invoice billing.InvoiceID, issues []billing.ValidationIssue) error", + "line": 36 + }, + { + "kind": "struct", + "name": "ValidationIssueWithDBMeta", + "signature": "type ValidationIssueWithDBMeta struct", + "line": 95 + }, + { + "kind": "func", + "name": "IntrospectValidationIssues", + "signature": "func (a *adapter) IntrospectValidationIssues(ctx context.Context, invoice billing.InvoiceID) ([]ValidationIssueWithDBMeta, error)", + "line": 105 + } + ], + "line_count": 128 + }, + "openmeter/billing/annotations.go": { + "header": "const (\n\tAnnotationSubscriptionSyncIgnore = \"billing.subscription.sync.ignore\"\n\tAnnotationSubscriptionSyncForceContinuousLines = \"billing.subscription.sync.force-continuous-lines\"", + "symbols": [], + "line_count": 14 + }, + "openmeter/billing/app.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "UpsertResults", + "signature": "type UpsertResults struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewUpsertResults", + "signature": "func NewUpsertResults() *UpsertResults", + "line": 25 + }, + { + "kind": "func", + "name": "GetInvoiceNumber", + "signature": "func (u *UpsertResults) GetInvoiceNumber() (string, bool)", + "line": 32 + }, + { + "kind": "func", + "name": "SetInvoiceNumber", + "signature": "func (u *UpsertResults) SetInvoiceNumber(invoiceNumber string) *UpsertResults", + "line": 36 + }, + { + "kind": "func", + "name": "GetExternalID", + "signature": "func (u *UpsertResults) GetExternalID() (string, bool)", + "line": 41 + }, + { + "kind": "func", + "name": "SetExternalID", + "signature": "func (u *UpsertResults) SetExternalID(externalID string) *UpsertResults", + "line": 45 + }, + { + "kind": "func", + "name": "AddLineExternalID", + "signature": "func (u *UpsertResults) AddLineExternalID(lineID string, externalID string) *UpsertResults", + "line": 50 + }, + { + "kind": "func", + "name": "GetLineExternalID", + "signature": "func (u *UpsertResults) GetLineExternalID(lineID string) (string, bool)", + "line": 55 + }, + { + "kind": "func", + "name": "GetLineExternalIDs", + "signature": "func (u *UpsertResults) GetLineExternalIDs() map[string]string", + "line": 60 + }, + { + "kind": "func", + "name": "AddLineDiscountExternalID", + "signature": "func (u *UpsertResults) AddLineDiscountExternalID(lineDiscountID string, externalID string) *UpsertResults", + "line": 64 + }, + { + "kind": "func", + "name": "GetLineDiscountExternalID", + "signature": "func (u *UpsertResults) GetLineDiscountExternalID(lineDiscountID string) (string, bool)", + "line": 69 + }, + { + "kind": "func", + "name": "GetLineDiscountExternalIDs", + "signature": "func (u *UpsertResults) GetLineDiscountExternalIDs() map[string]string", + "line": 74 + }, + { + "kind": "func", + "name": "NewUpsertStandardInvoiceResult", + "signature": "func NewUpsertStandardInvoiceResult() *UpsertStandardInvoiceResult", + "line": 80 + }, + { + "kind": "struct", + "name": "FinalizeStandardInvoiceResult", + "signature": "type FinalizeStandardInvoiceResult struct", + "line": 84 + }, + { + "kind": "func", + "name": "NewFinalizeStandardInvoiceResult", + "signature": "func NewFinalizeStandardInvoiceResult() *FinalizeStandardInvoiceResult", + "line": 90 + }, + { + "kind": "func", + "name": "GetPaymentExternalID", + "signature": "func (f *FinalizeStandardInvoiceResult) GetPaymentExternalID() (string, bool)", + "line": 94 + }, + { + "kind": "func", + "name": "SetPaymentExternalID", + "signature": "func (f *FinalizeStandardInvoiceResult) SetPaymentExternalID(paymentExternalID string) *FinalizeStandardInvoiceResult", + "line": 98 + }, + { + "kind": "func", + "name": "GetInvoiceNumber", + "signature": "func (u *FinalizeStandardInvoiceResult) GetInvoiceNumber() (string, bool)", + "line": 103 + }, + { + "kind": "func", + "name": "SetInvoiceNumber", + "signature": "func (f *FinalizeStandardInvoiceResult) SetInvoiceNumber(invoiceNumber string) *FinalizeStandardInvoiceResult", + "line": 107 + }, + { + "kind": "func", + "name": "GetSentToCustomerAt", + "signature": "func (f *FinalizeStandardInvoiceResult) GetSentToCustomerAt() (time.Time, bool)", + "line": 112 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (f *FinalizeStandardInvoiceResult) SetSentToCustomerAt(sentToCustomerAt time.Time) *FinalizeStandardInvoiceResult", + "line": 116 + }, + { + "kind": "func", + "name": "MergeIntoInvoice", + "signature": "func (f *FinalizeStandardInvoiceResult) MergeIntoInvoice(invoice *StandardInvoice) error", + "line": 121 + }, + { + "kind": "struct", + "name": "PostAdvanceHookResult", + "signature": "type PostAdvanceHookResult struct", + "line": 137 + }, + { + "kind": "func", + "name": "NewPostAdvanceHookResult", + "signature": "func NewPostAdvanceHookResult() *PostAdvanceHookResult", + "line": 141 + }, + { + "kind": "func", + "name": "InvokeTrigger", + "signature": "func (p *PostAdvanceHookResult) InvokeTrigger(trigger InvoiceTriggerInput) *PostAdvanceHookResult", + "line": 145 + }, + { + "kind": "func", + "name": "GetTriggerToInvoke", + "signature": "func (p *PostAdvanceHookResult) GetTriggerToInvoke() *InvoiceTriggerInput", + "line": 150 + }, + { + "kind": "interface", + "name": "InvoicingApp", + "signature": "type InvoicingApp interface", + "line": 164 + }, + { + "kind": "interface", + "name": "InvoicingAppPostAdvanceHook", + "signature": "type InvoicingAppPostAdvanceHook interface", + "line": 185 + }, + { + "kind": "interface", + "name": "InvoicingAppAsyncSyncer", + "signature": "type InvoicingAppAsyncSyncer interface", + "line": 196 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func GetApp(app app.App) (InvoicingApp, error)", + "line": 203 + }, + { + "kind": "func", + "name": "MergeIntoInvoice", + "signature": "func (r UpsertStandardInvoiceResult) MergeIntoInvoice(invoice *StandardInvoice) error", + "line": 217 + }, + { + "kind": "interface", + "name": "SyncInput", + "signature": "type SyncInput interface", + "line": 274 + }, + { + "kind": "struct", + "name": "SyncDraftStandardInvoiceInput", + "signature": "type SyncDraftStandardInvoiceInput struct", + "line": 285 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SyncDraftStandardInvoiceInput) Validate() error", + "line": 292 + }, + { + "kind": "func", + "name": "MergeIntoInvoice", + "signature": "func (i SyncDraftStandardInvoiceInput) MergeIntoInvoice(invoice *StandardInvoice) error", + "line": 306 + }, + { + "kind": "func", + "name": "GetAdditionalMetadata", + "signature": "func (i SyncDraftStandardInvoiceInput) GetAdditionalMetadata() map[string]string", + "line": 317 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (i SyncDraftStandardInvoiceInput) GetInvoiceID() InvoiceID", + "line": 321 + }, + { + "kind": "func", + "name": "ValidateWithInvoice", + "signature": "func (i SyncDraftStandardInvoiceInput) ValidateWithInvoice(invoice StandardInvoice) error", + "line": 325 + }, + { + "kind": "struct", + "name": "SyncIssuingStandardInvoiceInput", + "signature": "type SyncIssuingStandardInvoiceInput struct", + "line": 335 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SyncIssuingStandardInvoiceInput) Validate() error", + "line": 342 + }, + { + "kind": "func", + "name": "MergeIntoInvoice", + "signature": "func (i SyncIssuingStandardInvoiceInput) MergeIntoInvoice(invoice *StandardInvoice) error", + "line": 356 + }, + { + "kind": "func", + "name": "GetAdditionalMetadata", + "signature": "func (i SyncIssuingStandardInvoiceInput) GetAdditionalMetadata() map[string]string", + "line": 368 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (i SyncIssuingStandardInvoiceInput) GetInvoiceID() InvoiceID", + "line": 372 + }, + { + "kind": "func", + "name": "ValidateWithInvoice", + "signature": "func (i SyncIssuingStandardInvoiceInput) ValidateWithInvoice(invoice StandardInvoice) error", + "line": 376 + } + ], + "line_count": 382 + }, + "openmeter/billing/charges/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 15 + }, + { + "kind": "interface", + "name": "ChargesSearchAdapter", + "signature": "type ChargesSearchAdapter interface", + "line": 21 + }, + { + "kind": "struct", + "name": "ChargeSearchItem", + "signature": "type ChargeSearchItem struct", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *ChargeSearchItem) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ChargeSearchItems) Validate() error", + "line": 51 + } + ], + "line_count": 59 + }, + "openmeter/billing/charges/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (charges.Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 61 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/billing/charges/adapter/search.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (a *adapter) GetByIDs(ctx context.Context, input charges.GetByIDsInput) (charges.ChargeSearchItems, error)", + "line": 20 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (a *adapter) ListCharges(ctx context.Context, input charges.ListChargesInput) (pagination.Result[charges.ChargeSearchItem], error)", + "line": 46 + }, + { + "kind": "func", + "name": "ListCustomersToAdvance", + "signature": "func (a *adapter) ListCustomersToAdvance(ctx context.Context, input charges.ListCustomersToAdvanceInput) (pagination.Result[customer.CustomerID], error)", + "line": 107 + }, + { + "kind": "func", + "name": "mapChargeSearchToChargeWithType", + "signature": "func mapChargeSearchToChargeWithType(item *db.ChargesSearchV1) charges.ChargeSearchItem", + "line": 174 + }, + { + "kind": "struct", + "name": "searchResultIDAccessor", + "signature": "type searchResultIDAccessor struct", + "line": 184 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (s searchResultIDAccessor) GetID() string", + "line": 188 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (s searchResultIDAccessor) GetNamespace() string", + "line": 192 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (s searchResultIDAccessor) GetChargeID() meta.ChargeID", + "line": 196 + }, + { + "kind": "func", + "name": "withIDAccessor", + "signature": "func withIDAccessor(entity []*db.ChargesSearchV1) []searchResultIDAccessor", + "line": 203 + } + ], + "line_count": 209 + }, + "openmeter/billing/charges/adapter/search_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"sort\"", + "symbols": [ + { + "kind": "func", + "name": "TestListCustomersToAdvance", + "signature": "func TestListCustomersToAdvance(t *testing.T)", + "line": 27 + }, + { + "kind": "struct", + "name": "ListCustomersToAdvanceSuite", + "signature": "type ListCustomersToAdvanceSuite struct", + "line": 31 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *ListCustomersToAdvanceSuite) SetupSuite()", + "line": 39 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *ListCustomersToAdvanceSuite) TearDownSuite()", + "line": 62 + }, + { + "kind": "func", + "name": "createCustomer", + "signature": "func (s *ListCustomersToAdvanceSuite) createCustomer(namespace string) string", + "line": 68 + }, + { + "kind": "func", + "name": "insertFlatFeeCharge", + "signature": "func (s *ListCustomersToAdvanceSuite) insertFlatFeeCharge(namespace, customerID string, status meta.ChargeStatus, advanceAfter *time.Time)", + "line": 81 + }, + { + "kind": "func", + "name": "TestReturnsOnlyEligibleCustomers", + "signature": "func (s *ListCustomersToAdvanceSuite) TestReturnsOnlyEligibleCustomers()", + "line": 115 + }, + { + "kind": "func", + "name": "TestDeduplicatesCustomers", + "signature": "func (s *ListCustomersToAdvanceSuite) TestDeduplicatesCustomers()", + "line": 144 + }, + { + "kind": "func", + "name": "TestStableOrdering", + "signature": "func (s *ListCustomersToAdvanceSuite) TestStableOrdering()", + "line": 166 + }, + { + "kind": "func", + "name": "TestPagination", + "signature": "func (s *ListCustomersToAdvanceSuite) TestPagination()", + "line": 209 + }, + { + "kind": "func", + "name": "TestNamespaceFilter", + "signature": "func (s *ListCustomersToAdvanceSuite) TestNamespaceFilter()", + "line": 259 + } + ], + "line_count": 280 + }, + "openmeter/billing/charges/charge.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 20 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (c Charge) Type() meta.ChargeType", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charge) Validate() error", + "line": 54 + }, + { + "kind": "func", + "name": "AsFlatFeeCharge", + "signature": "func (c Charge) AsFlatFeeCharge() (flatfee.Charge, error)", + "line": 79 + }, + { + "kind": "func", + "name": "AsCreditPurchaseCharge", + "signature": "func (c Charge) AsCreditPurchaseCharge() (creditpurchase.Charge, error)", + "line": 91 + }, + { + "kind": "func", + "name": "AsUsageBasedCharge", + "signature": "func (c Charge) AsUsageBasedCharge() (usagebased.Charge, error)", + "line": 103 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c Charge) GetChargeID() (meta.ChargeID, error)", + "line": 115 + }, + { + "kind": "func", + "name": "GetUniqueReferenceID", + "signature": "func (c Charge) GetUniqueReferenceID() (*string, error)", + "line": 140 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (c Charge) GetCustomerID() (customer.CustomerID, error)", + "line": 165 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (c Charge) GetCurrency() (currencyx.Code, error)", + "line": 190 + }, + { + "kind": "func", + "name": "SettlementMode", + "signature": "func (c Charge) SettlementMode() (productcatalog.SettlementMode, error)", + "line": 215 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (c Charge) GetID() string", + "line": 236 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (c Charge) GetNamespace() string", + "line": 245 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charges) Validate() error", + "line": 256 + }, + { + "kind": "struct", + "name": "ChargeIntent", + "signature": "type ChargeIntent struct", + "line": 268 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i ChargeIntent) Type() meta.ChargeType", + "line": 298 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ChargeIntent) Validate() error", + "line": 302 + }, + { + "kind": "func", + "name": "AsFlatFeeIntent", + "signature": "func (i ChargeIntent) AsFlatFeeIntent() (flatfee.Intent, error)", + "line": 327 + }, + { + "kind": "func", + "name": "AsCreditPurchaseIntent", + "signature": "func (i ChargeIntent) AsCreditPurchaseIntent() (creditpurchase.Intent, error)", + "line": 339 + }, + { + "kind": "func", + "name": "AsUsageBasedIntent", + "signature": "func (i ChargeIntent) AsUsageBasedIntent() (usagebased.Intent, error)", + "line": 351 + }, + { + "kind": "func", + "name": "GetUniqueReferenceID", + "signature": "func (c ChargeIntent) GetUniqueReferenceID() (*string, error)", + "line": 363 + }, + { + "kind": "func", + "name": "Meta", + "signature": "func (i ChargeIntent) Meta() (meta.Intent, error)", + "line": 389 + }, + { + "kind": "func", + "name": "WithTaxCodeID", + "signature": "func (i ChargeIntent) WithTaxCodeID(id string) (ChargeIntent, error)", + "line": 416 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ChargeIntents) Validate() error", + "line": 470 + }, + { + "kind": "func", + "name": "CollectFeatureKeys", + "signature": "func (i ChargeIntents) CollectFeatureKeys() ([]string, error)", + "line": 482 + }, + { + "kind": "struct", + "name": "ChargeIntentsByType", + "signature": "type ChargeIntentsByType struct", + "line": 513 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func (i ChargeIntents) ByType() (ChargeIntentsByType, error)", + "line": 519 + } + ], + "line_count": 555 + }, + "openmeter/billing/charges/creditpurchase/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 18 + }, + { + "kind": "interface", + "name": "ChargeAdapter", + "signature": "type ChargeAdapter interface", + "line": 27 + }, + { + "kind": "interface", + "name": "ExternalPaymentAdapter", + "signature": "type ExternalPaymentAdapter interface", + "line": 36 + }, + { + "kind": "interface", + "name": "CreditGrantAdapter", + "signature": "type CreditGrantAdapter interface", + "line": 41 + }, + { + "kind": "interface", + "name": "InvoicedPaymentAdapter", + "signature": "type InvoicedPaymentAdapter interface", + "line": 45 + }, + { + "kind": "struct", + "name": "GetByIDsInput", + "signature": "type GetByIDsInput struct", + "line": 50 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDsInput) Validate() error", + "line": 57 + }, + { + "kind": "struct", + "name": "GetByIDInput", + "signature": "type GetByIDInput struct", + "line": 77 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDInput) Validate() error", + "line": 82 + }, + { + "kind": "struct", + "name": "CreateChargeInput", + "signature": "type CreateChargeInput struct", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateChargeInput) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "ListChargesInput", + "signature": "type ListChargesInput struct", + "line": 113 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListChargesInput) Validate() error", + "line": 127 + }, + { + "kind": "struct", + "name": "CreateCreditGrantInput", + "signature": "type CreateCreditGrantInput struct", + "line": 159 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCreditGrantInput) Validate() error", + "line": 164 + } + ], + "line_count": 176 + }, + "openmeter/billing/charges/creditpurchase/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (creditpurchase.Adapter, error)", + "line": 39 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 53 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 59 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 69 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 79 + } + ], + "line_count": 81 + }, + "openmeter/billing/charges/creditpurchase/adapter/charge.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/lib/pq\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCharge", + "signature": "func (a *adapter) UpdateCharge(ctx context.Context, charge creditpurchase.ChargeBase) (creditpurchase.ChargeBase, error)", + "line": 21 + }, + { + "kind": "func", + "name": "CreateCharge", + "signature": "func (a *adapter) CreateCharge(ctx context.Context, in creditpurchase.CreateChargeInput) (creditpurchase.Charge, error)", + "line": 56 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (a *adapter) GetByID(ctx context.Context, input creditpurchase.GetByIDInput) (creditpurchase.Charge, error)", + "line": 104 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (a *adapter) GetByIDs(ctx context.Context, input creditpurchase.GetByIDsInput) ([]creditpurchase.Charge, error)", + "line": 127 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (a *adapter) ListCharges(ctx context.Context, input creditpurchase.ListChargesInput) (pagination.Result[creditpurchase.Charge], error)", + "line": 155 + }, + { + "kind": "func", + "name": "withExpands", + "signature": "func withExpands(query *db.ChargeCreditPurchaseQuery, expands meta.Expands) *db.ChargeCreditPurchaseQuery", + "line": 202 + } + ], + "line_count": 207 + }, + "openmeter/billing/charges/creditpurchase/adapter/creditgrant.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (a *adapter) CreateCreditGrant(ctx context.Context, chargeID meta.ChargeID, input creditpurchase.CreateCreditGrantInput) (ledgertransaction.TimedGroupReference, error)", + "line": 16 + } + ], + "line_count": 43 + }, + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ListFundedCreditActivities", + "signature": "func (a *adapter) ListFundedCreditActivities(ctx context.Context, input creditpurchase.ListFundedCreditActivitiesInput) (creditpurchase.ListFundedCreditActivitiesResult, error)", + "line": 18 + }, + { + "kind": "func", + "name": "ListFundedCreditActivities", + "signature": "func ListFundedCreditActivities(ctx context.Context, dbClient *db.Client, input creditpurchase.ListFundedCreditActivitiesInput) (creditpurchase.ListFundedCreditActivitiesResult, error)", + "line": 22 + }, + { + "kind": "func", + "name": "fundedCreditActivityAfterPredicate", + "signature": "func fundedCreditActivityAfterPredicate(cursor creditpurchase.FundedCreditActivityCursor) predicate.ChargeCreditPurchaseCreditGrant", + "line": 133 + }, + { + "kind": "func", + "name": "fundedCreditActivityBeforePredicate", + "signature": "func fundedCreditActivityBeforePredicate(cursor creditpurchase.FundedCreditActivityCursor) predicate.ChargeCreditPurchaseCreditGrant", + "line": 152 + } + ], + "line_count": 169 + }, + "openmeter/billing/charges/creditpurchase/adapter/funded_credit_activity_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestListFundedCreditActivities", + "signature": "func TestListFundedCreditActivities(t *testing.T)", + "line": 24 + }, + { + "kind": "struct", + "name": "ListFundedCreditActivitiesSuite", + "signature": "type ListFundedCreditActivitiesSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *ListFundedCreditActivitiesSuite) SetupSuite()", + "line": 35 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *ListFundedCreditActivitiesSuite) TearDownSuite()", + "line": 51 + }, + { + "kind": "func", + "name": "createCustomer", + "signature": "func (s *ListFundedCreditActivitiesSuite) createCustomer(namespace string) string", + "line": 56 + }, + { + "kind": "func", + "name": "insertCreditPurchaseWithGrant", + "signature": "func (s *ListFundedCreditActivitiesSuite) insertCreditPurchaseWithGrant(\n\tnamespace string,\n\tcustomerID string,\n\tcurrency currencyx.Code,\n\tchargeCreatedAt time.Time,\n\tfundedAt time.Time,\n\tname string,\n\tdescription *string,\n) meta.ChargeID", + "line": 68 + }, + { + "kind": "func", + "name": "TestPaginatesWithAfter", + "signature": "func (s *ListFundedCreditActivitiesSuite) TestPaginatesWithAfter()", + "line": 120 + }, + { + "kind": "func", + "name": "TestPaginatesWithBefore", + "signature": "func (s *ListFundedCreditActivitiesSuite) TestPaginatesWithBefore()", + "line": 179 + }, + { + "kind": "func", + "name": "TestFiltersByCurrency", + "signature": "func (s *ListFundedCreditActivitiesSuite) TestFiltersByCurrency()", + "line": 279 + }, + { + "kind": "func", + "name": "TestFiltersByAsOf", + "signature": "func (s *ListFundedCreditActivitiesSuite) TestFiltersByAsOf()", + "line": 316 + } + ], + "line_count": 351 + }, + "openmeter/billing/charges/creditpurchase/adapter/mapper.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "MapChargeBaseFromDB", + "signature": "func MapChargeBaseFromDB(dbEntity *entdb.ChargeCreditPurchase) creditpurchase.ChargeBase", + "line": 18 + }, + { + "kind": "func", + "name": "MapCreditPurchaseChargeFromDB", + "signature": "func MapCreditPurchaseChargeFromDB(dbEntity *entdb.ChargeCreditPurchase, expands meta.Expands) (creditpurchase.Charge, error)", + "line": 36 + } + ], + "line_count": 84 + }, + "openmeter/billing/charges/creditpurchase/adapter/payment.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/payment\"", + "symbols": [ + { + "kind": "func", + "name": "CreateExternalPayment", + "signature": "func (a *adapter) CreateExternalPayment(ctx context.Context, chargeID meta.ChargeID, in payment.ExternalCreateInput) (payment.External, error)", + "line": 13 + }, + { + "kind": "func", + "name": "UpdateExternalPayment", + "signature": "func (a *adapter) UpdateExternalPayment(ctx context.Context, in payment.External) (payment.External, error)", + "line": 37 + }, + { + "kind": "func", + "name": "CreateInvoicedPayment", + "signature": "func (a *adapter) CreateInvoicedPayment(ctx context.Context, chargeID meta.ChargeID, in payment.InvoicedCreate) (payment.Invoiced, error)", + "line": 57 + }, + { + "kind": "func", + "name": "UpdateInvoicedPayment", + "signature": "func (a *adapter) UpdateInvoicedPayment(ctx context.Context, in payment.Invoiced) (payment.Invoiced, error)", + "line": 81 + } + ], + "line_count": 99 + }, + "openmeter/billing/charges/creditpurchase/charge.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeBase", + "signature": "type ChargeBase struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ChargeBase) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c ChargeBase) GetChargeID() meta.ChargeID", + "line": 51 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (c ChargeBase) GetCustomerID() customer.CustomerID", + "line": 58 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (c ChargeBase) GetCurrency() currencyx.Code", + "line": 65 + }, + { + "kind": "func", + "name": "ErrorAttributes", + "signature": "func (c ChargeBase) ErrorAttributes() models.Attributes", + "line": 69 + }, + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 79 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (c Charge) GetStatus() Status", + "line": 85 + }, + { + "kind": "func", + "name": "WithStatus", + "signature": "func (c Charge) WithStatus(status Status) Charge", + "line": 89 + }, + { + "kind": "func", + "name": "GetBase", + "signature": "func (c Charge) GetBase() ChargeBase", + "line": 94 + }, + { + "kind": "func", + "name": "WithBase", + "signature": "func (c Charge) WithBase(base ChargeBase) Charge", + "line": 98 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charge) Validate() error", + "line": 103 + }, + { + "kind": "struct", + "name": "Intent", + "signature": "type Intent struct", + "line": 117 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (i Intent) Normalized() Intent", + "line": 134 + }, + { + "kind": "func", + "name": "CalculateEffectiveAt", + "signature": "func (i Intent) CalculateEffectiveAt() time.Time", + "line": 148 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Intent) Validate() error", + "line": 152 + }, + { + "kind": "struct", + "name": "State", + "signature": "type State struct", + "line": 201 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s State) Validate() error", + "line": 203 + }, + { + "kind": "struct", + "name": "Realizations", + "signature": "type Realizations struct", + "line": 208 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Realizations) Validate() error", + "line": 214 + }, + { + "kind": "struct", + "name": "UpdateExternalPaymentStateInput", + "signature": "type UpdateExternalPaymentStateInput struct", + "line": 238 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateExternalPaymentStateInput) Validate() error", + "line": 243 + } + ], + "line_count": 255 + }, + "openmeter/billing/charges/creditpurchase/charge_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestFeatureFiltersNormalize", + "signature": "func TestFeatureFiltersNormalize(t *testing.T)", + "line": 9 + }, + { + "kind": "func", + "name": "TestFeatureFiltersValidate", + "signature": "func TestFeatureFiltersValidate(t *testing.T)", + "line": 13 + } + ], + "line_count": 25 + }, + "openmeter/billing/charges/creditpurchase/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [], + "line_count": 18 + }, + "openmeter/billing/charges/creditpurchase/featurefilters.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (f FeatureFilters) Validate() error", + "line": 13 + }, + { + "kind": "func", + "name": "Normalize", + "signature": "func (f FeatureFilters) Normalize() FeatureFilters", + "line": 29 + } + ], + "line_count": 31 + }, + "openmeter/billing/charges/creditpurchase/funded_credit_activity.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "FundedCreditActivityCursor", + "signature": "type FundedCreditActivityCursor struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c FundedCreditActivityCursor) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "FundedCreditActivity", + "signature": "type FundedCreditActivity struct", + "line": 40 + }, + { + "kind": "struct", + "name": "ListFundedCreditActivitiesInput", + "signature": "type ListFundedCreditActivitiesInput struct", + "line": 51 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListFundedCreditActivitiesInput) Validate() error", + "line": 60 + }, + { + "kind": "struct", + "name": "ListFundedCreditActivitiesResult", + "signature": "type ListFundedCreditActivitiesResult struct", + "line": 100 + } + ], + "line_count": 104 + }, + "openmeter/billing/charges/creditpurchase/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 26 + }, + { + "kind": "struct", + "name": "PaymentEventInput", + "signature": "type PaymentEventInput struct", + "line": 51 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PaymentEventInput) Validate() error", + "line": 56 + } + ], + "line_count": 68 + }, + "openmeter/billing/charges/creditpurchase/lineengine/engine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "Engine", + "signature": "type Engine struct", + "line": 30 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Engine, error)", + "line": 34 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (e *Engine) GetLineEngineType() billing.LineEngineType", + "line": 44 + }, + { + "kind": "func", + "name": "IsLineBillableAsOf", + "signature": "func (e *Engine) IsLineBillableAsOf(_ context.Context, input billing.IsLineBillableAsOfInput) (bool, error)", + "line": 48 + }, + { + "kind": "func", + "name": "SplitGatheringLine", + "signature": "func (e *Engine) SplitGatheringLine(_ context.Context, _ billing.SplitGatheringLineInput) (billing.SplitGatheringLineResult, error)", + "line": 58 + }, + { + "kind": "func", + "name": "BuildStandardInvoiceLines", + "signature": "func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 62 + }, + { + "kind": "func", + "name": "BuildStandardLinesForGatheringPreview", + "signature": "func (e *Engine) BuildStandardLinesForGatheringPreview(_ context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 81 + }, + { + "kind": "func", + "name": "OnCollectionCompleted", + "signature": "func (e *Engine) OnCollectionCompleted(_ context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error)", + "line": 85 + }, + { + "kind": "func", + "name": "OnStandardInvoiceCreated", + "signature": "func (e *Engine) OnStandardInvoiceCreated(_ context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error)", + "line": 89 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (e *Engine) OnMutableStandardLinesDeleted(_ context.Context, _ billing.OnMutableStandardLinesDeletedInput) error", + "line": 93 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (e *Engine) OnUnsupportedCreditNote(_ context.Context, _ billing.OnUnsupportedCreditNoteInput) error", + "line": 97 + }, + { + "kind": "func", + "name": "OnInvoiceIssued", + "signature": "func (e *Engine) OnInvoiceIssued(_ context.Context, _ billing.OnInvoiceIssuedInput) error", + "line": 101 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (e *Engine) OnPaymentAuthorized(_ context.Context, _ billing.OnPaymentAuthorizedInput) error", + "line": 105 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (e *Engine) OnPaymentSettled(_ context.Context, _ billing.OnPaymentSettledInput) error", + "line": 109 + }, + { + "kind": "func", + "name": "CalculateLines", + "signature": "func (e *Engine) CalculateLines(input billing.CalculateLinesInput) (billing.StandardLines, error)", + "line": 113 + } + ], + "line_count": 142 + }, + "openmeter/billing/charges/creditpurchase/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 13 + }, + { + "kind": "interface", + "name": "CreditPurchaseService", + "signature": "type CreditPurchaseService interface", + "line": 19 + }, + { + "kind": "struct", + "name": "ChargeWithGatheringLine", + "signature": "type ChargeWithGatheringLine struct", + "line": 29 + }, + { + "kind": "interface", + "name": "ExternalPaymentLifecycle", + "signature": "type ExternalPaymentLifecycle interface", + "line": 34 + }, + { + "kind": "interface", + "name": "InvoicePaymentLifecycle", + "signature": "type InvoicePaymentLifecycle interface", + "line": 39 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 45 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 50 + } + ], + "line_count": 61 + }, + "openmeter/billing/charges/creditpurchase/service/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, input creditpurchase.CreateInput) (creditpurchase.ChargeWithGatheringLine, error)", + "line": 16 + }, + { + "kind": "func", + "name": "buildInvoiceCreditPurchaseGatheringLine", + "signature": "func (s *service) buildInvoiceCreditPurchaseGatheringLine(charge creditpurchase.Charge) (billing.GatheringLine, error)", + "line": 82 + } + ], + "line_count": 137 + }, + "openmeter/billing/charges/creditpurchase/service/external.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/lineage\"", + "symbols": [ + { + "kind": "func", + "name": "onExternalCreditPurchase", + "signature": "func (s *service) onExternalCreditPurchase(ctx context.Context, charge creditpurchase.Charge) (creditpurchase.Charge, error)", + "line": 14 + }, + { + "kind": "func", + "name": "HandleExternalPaymentAuthorized", + "signature": "func (s *service) HandleExternalPaymentAuthorized(ctx context.Context, charge creditpurchase.Charge) (creditpurchase.Charge, error)", + "line": 88 + }, + { + "kind": "func", + "name": "HandleExternalPaymentSettled", + "signature": "func (s *service) HandleExternalPaymentSettled(ctx context.Context, charge creditpurchase.Charge) (creditpurchase.Charge, error)", + "line": 129 + } + ], + "line_count": 179 + }, + "openmeter/billing/charges/creditpurchase/service/funded_credit_activity.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "ListFundedCreditActivities", + "signature": "func (s *service) ListFundedCreditActivities(ctx context.Context, input creditpurchase.ListFundedCreditActivitiesInput) (creditpurchase.ListFundedCreditActivitiesResult, error)", + "line": 10 + } + ], + "line_count": 18 + }, + "openmeter/billing/charges/creditpurchase/service/get.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (s *service) GetByIDs(ctx context.Context, input creditpurchase.GetByIDsInput) ([]creditpurchase.Charge, error)", + "line": 11 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *service) List(ctx context.Context, input creditpurchase.ListChargesInput) (pagination.Result[creditpurchase.Charge], error)", + "line": 21 + } + ], + "line_count": 29 + }, + "openmeter/billing/charges/creditpurchase/service/invoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "PostInvoiceDraftCreated", + "signature": "func (s *service) PostInvoiceDraftCreated(ctx context.Context, charge creditpurchase.Charge, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 16 + }, + { + "kind": "func", + "name": "PostInvoicePaymentAuthorized", + "signature": "func (s *service) PostInvoicePaymentAuthorized(ctx context.Context, charge creditpurchase.Charge, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 52 + }, + { + "kind": "func", + "name": "PostInvoicePaymentSettled", + "signature": "func (s *service) PostInvoicePaymentSettled(ctx context.Context, charge creditpurchase.Charge, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 91 + } + ], + "line_count": 131 + }, + "openmeter/billing/charges/creditpurchase/service/promotional.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"", + "symbols": [ + { + "kind": "func", + "name": "grantPromotionalCredit", + "signature": "func (s *service) grantPromotionalCredit(ctx context.Context, charge creditpurchase.Charge) (creditpurchase.Charge, error)", + "line": 14 + }, + { + "kind": "struct", + "name": "PromotionalCreditpurchaseStateMachine", + "signature": "type PromotionalCreditpurchaseStateMachine struct", + "line": 50 + }, + { + "kind": "func", + "name": "NewPromotionalCreditPurchaseStateMachine", + "signature": "func NewPromotionalCreditPurchaseStateMachine(config StateMachineConfig) (*PromotionalCreditpurchaseStateMachine, error)", + "line": 54 + }, + { + "kind": "func", + "name": "configureStates", + "signature": "func (s *PromotionalCreditpurchaseStateMachine) configureStates()", + "line": 80 + }, + { + "kind": "func", + "name": "GrantPromotionalCredit", + "signature": "func (s *PromotionalCreditpurchaseStateMachine) GrantPromotionalCredit(ctx context.Context) error", + "line": 91 + } + ], + "line_count": 99 + }, + "openmeter/billing/charges/creditpurchase/service/promotional_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineAdvancesCreatedChargeToFinal", + "signature": "func TestPromotionalCreditPurchaseStateMachineAdvancesCreatedChargeToFinal(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineAdvancesActiveChargeToFinal", + "signature": "func TestPromotionalCreditPurchaseStateMachineAdvancesActiveChargeToFinal(t *testing.T)", + "line": 48 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineRejectsExistingCreditGrant", + "signature": "func TestPromotionalCreditPurchaseStateMachineRejectsExistingCreditGrant(t *testing.T)", + "line": 70 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineReturnsNilForFinalCharge", + "signature": "func TestPromotionalCreditPurchaseStateMachineReturnsNilForFinalCharge(t *testing.T)", + "line": 110 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineRejectsNonPromotionalCharge", + "signature": "func TestPromotionalCreditPurchaseStateMachineRejectsNonPromotionalCharge(t *testing.T)", + "line": 139 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineRejectsMissingAdapter", + "signature": "func TestPromotionalCreditPurchaseStateMachineRejectsMissingAdapter(t *testing.T)", + "line": 159 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchaseStateMachineRejectsMissingService", + "signature": "func TestPromotionalCreditPurchaseStateMachineRejectsMissingService(t *testing.T)", + "line": 175 + }, + { + "kind": "func", + "name": "newPromotionalStateMachineTestMachine", + "signature": "func newPromotionalStateMachineTestMachine(\n\tt *testing.T,\n\tstatus creditpurchase.Status,\n) (*PromotionalCreditpurchaseStateMachine, creditpurchase.Charge, *promotionalStateMachineAdapter, *promotionalStateMachineLineage)", + "line": 191 + }, + { + "kind": "func", + "name": "newPromotionalStateMachineTestCharge", + "signature": "func newPromotionalStateMachineTestCharge(status creditpurchase.Status) creditpurchase.Charge", + "line": 235 + }, + { + "kind": "struct", + "name": "promotionalStateMachineAdapter", + "signature": "type promotionalStateMachineAdapter struct", + "line": 270 + }, + { + "kind": "func", + "name": "UpdateCharge", + "signature": "func (a *promotionalStateMachineAdapter) UpdateCharge(ctx context.Context, charge creditpurchase.ChargeBase) (creditpurchase.ChargeBase, error)", + "line": 280 + }, + { + "kind": "func", + "name": "CreateCreditGrant", + "signature": "func (a *promotionalStateMachineAdapter) CreateCreditGrant(ctx context.Context, chargeID meta.ChargeID, input creditpurchase.CreateCreditGrantInput) (ledgertransaction.TimedGroupReference, error)", + "line": 286 + }, + { + "kind": "struct", + "name": "promotionalStateMachineHandler", + "signature": "type promotionalStateMachineHandler struct", + "line": 298 + }, + { + "kind": "func", + "name": "OnPromotionalCreditPurchase", + "signature": "func (h *promotionalStateMachineHandler) OnPromotionalCreditPurchase(ctx context.Context, charge creditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 304 + }, + { + "kind": "struct", + "name": "promotionalStateMachineLineage", + "signature": "type promotionalStateMachineLineage struct", + "line": 312 + }, + { + "kind": "func", + "name": "BackfillAdvanceLineageSegments", + "signature": "func (l *promotionalStateMachineLineage) BackfillAdvanceLineageSegments(ctx context.Context, input lineage.BackfillAdvanceLineageSegmentsInput) error", + "line": 317 + } + ], + "line_count": 325 + }, + "openmeter/billing/charges/creditpurchase/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/lineage\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 18 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (creditpurchase.Service, error)", + "line": 40 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 53 + } + ], + "line_count": 58 + }, + "openmeter/billing/charges/creditpurchase/service/statemachine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"", + "symbols": [ + { + "kind": "struct", + "name": "stateMachine", + "signature": "type stateMachine struct", + "line": 12 + }, + { + "kind": "struct", + "name": "StateMachineConfig", + "signature": "type StateMachineConfig struct", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StateMachineConfig) Validate() error", + "line": 34 + }, + { + "kind": "func", + "name": "newStateMachineBase", + "signature": "func newStateMachineBase(config StateMachineConfig) (*stateMachine, error)", + "line": 44 + } + ], + "line_count": 76 + }, + "openmeter/billing/charges/creditpurchase/settlement.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s SettlementType) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s SettlementType) Values() []string", + "line": 30 + }, + { + "kind": "struct", + "name": "GenericSettlement", + "signature": "type GenericSettlement struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s GenericSettlement) Validate() error", + "line": 43 + }, + { + "kind": "struct", + "name": "InvoiceSettlement", + "signature": "type InvoiceSettlement struct", + "line": 57 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s InvoiceSettlement) Validate() error", + "line": 61 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s InitialPaymentSettlementStatus) Validate() error", + "line": 79 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s InitialPaymentSettlementStatus) Values() []string", + "line": 86 + }, + { + "kind": "func", + "name": "In", + "signature": "func (s InitialPaymentSettlementStatus) In(statuses ...InitialPaymentSettlementStatus) bool", + "line": 94 + }, + { + "kind": "struct", + "name": "ExternalSettlement", + "signature": "type ExternalSettlement struct", + "line": 98 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ExternalSettlement) Validate() error", + "line": 104 + }, + { + "kind": "struct", + "name": "PromotionalSettlement", + "signature": "type PromotionalSettlement struct", + "line": 118 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s PromotionalSettlement) Validate() error", + "line": 120 + }, + { + "kind": "struct", + "name": "Settlement", + "signature": "type Settlement struct", + "line": 124 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (s Settlement) MarshalJSON() ([]byte, error)", + "line": 132 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *Settlement) UnmarshalJSON(bytes []byte) error", + "line": 178 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (s Settlement) Type() SettlementType", + "line": 236 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s Settlement) Validate() error", + "line": 240 + }, + { + "kind": "func", + "name": "AsInvoiceSettlement", + "signature": "func (s Settlement) AsInvoiceSettlement() (InvoiceSettlement, error)", + "line": 272 + }, + { + "kind": "func", + "name": "AsExternalSettlement", + "signature": "func (s Settlement) AsExternalSettlement() (ExternalSettlement, error)", + "line": 284 + }, + { + "kind": "func", + "name": "AsPromotionalSettlement", + "signature": "func (s Settlement) AsPromotionalSettlement() (PromotionalSettlement, error)", + "line": 296 + }, + { + "kind": "func", + "name": "GetCostBasis", + "signature": "func (s Settlement) GetCostBasis() (alpacadecimal.Decimal, error)", + "line": 310 + } + ], + "line_count": 329 + }, + "openmeter/billing/charges/creditpurchase/statemachine.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s Status) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "ToMetaChargeStatus", + "signature": "func (s Status) ToMetaChargeStatus() (meta.ChargeStatus, error)", + "line": 36 + } + ], + "line_count": 42 + }, + "openmeter/billing/charges/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewChargeNotFoundError", + "signature": "func NewChargeNotFoundError(namespace, id string) error", + "line": 30 + } + ], + "line_count": 50 + }, + "openmeter/billing/charges/events.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "AdvanceChargesEvent", + "signature": "type AdvanceChargesEvent struct", + "line": 14 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AdvanceChargesEvent) EventName() string", + "line": 19 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AdvanceChargesEvent) EventMetadata() metadata.EventMetadata", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AdvanceChargesEvent) Validate() error", + "line": 34 + } + ], + "line_count": 44 + }, + "openmeter/billing/charges/features.go": { + "header": "var CreditNotesSupportedByLineUpdater = false", + "symbols": [], + "line_count": 7 + }, + "openmeter/billing/charges/flatfee/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 20 + }, + { + "kind": "interface", + "name": "ChargeAdapter", + "signature": "type ChargeAdapter interface", + "line": 31 + }, + { + "kind": "interface", + "name": "ChargeDetailedLineAdapter", + "signature": "type ChargeDetailedLineAdapter interface", + "line": 41 + }, + { + "kind": "interface", + "name": "ChargeInvoicedUsageAdapter", + "signature": "type ChargeInvoicedUsageAdapter interface", + "line": 46 + }, + { + "kind": "interface", + "name": "ChargeRunAdapter", + "signature": "type ChargeRunAdapter interface", + "line": 50 + }, + { + "kind": "interface", + "name": "ChargeCreditAllocationAdapter", + "signature": "type ChargeCreditAllocationAdapter interface", + "line": 56 + }, + { + "kind": "interface", + "name": "ChargePaymentAdapter", + "signature": "type ChargePaymentAdapter interface", + "line": 60 + }, + { + "kind": "struct", + "name": "CreateCurrentRunInput", + "signature": "type CreateCurrentRunInput struct", + "line": 65 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCurrentRunInput) Validate() error", + "line": 75 + }, + { + "kind": "struct", + "name": "CreateInvoicedUsageInput", + "signature": "type CreateInvoicedUsageInput struct", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInvoicedUsageInput) Validate() error", + "line": 112 + }, + { + "kind": "struct", + "name": "IntentWithInitialStatus", + "signature": "type IntentWithInitialStatus struct", + "line": 134 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i IntentWithInitialStatus) Validate() error", + "line": 143 + }, + { + "kind": "struct", + "name": "GetByIDsInput", + "signature": "type GetByIDsInput struct", + "line": 164 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDsInput) Validate() error", + "line": 171 + }, + { + "kind": "struct", + "name": "GetByIDInput", + "signature": "type GetByIDInput struct", + "line": 191 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDInput) Validate() error", + "line": 196 + }, + { + "kind": "struct", + "name": "CreateChargesInput", + "signature": "type CreateChargesInput struct", + "line": 209 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateChargesInput) Validate() error", + "line": 214 + }, + { + "kind": "func", + "name": "validateExpands", + "signature": "func validateExpands(expands meta.Expands) error", + "line": 230 + } + ], + "line_count": 244 + }, + "openmeter/billing/charges/flatfee/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (flatfee.Adapter, error)", + "line": 39 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 53 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 59 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 69 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 79 + } + ], + "line_count": 81 + }, + "openmeter/billing/charges/flatfee/adapter/charge.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCharge", + "signature": "func (a *adapter) UpdateCharge(ctx context.Context, charge flatfee.ChargeBase) (flatfee.ChargeBase, error)", + "line": 25 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (a *adapter) UpdateSubscriptionItemID(ctx context.Context, charge flatfee.Charge, newSubscriptionItemID string) (flatfee.Charge, error)", + "line": 82 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (a *adapter) DeleteCharge(ctx context.Context, charge flatfee.Charge) error", + "line": 112 + }, + { + "kind": "func", + "name": "CreateCharges", + "signature": "func (a *adapter) CreateCharges(ctx context.Context, in flatfee.CreateChargesInput) ([]flatfee.Charge, error)", + "line": 152 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (a *adapter) GetByIDs(ctx context.Context, input flatfee.GetByIDsInput) ([]flatfee.Charge, error)", + "line": 198 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (a *adapter) GetByID(ctx context.Context, input flatfee.GetByIDInput) (flatfee.Charge, error)", + "line": 239 + }, + { + "kind": "func", + "name": "expandRealizations", + "signature": "func expandRealizations(query *db.ChargeFlatFeeQuery) *db.ChargeFlatFeeQuery", + "line": 275 + }, + { + "kind": "func", + "name": "buildCreateFlatFeeCharge", + "signature": "func (a *adapter) buildCreateFlatFeeCharge(ns string, intent flatfee.IntentWithInitialStatus) (*db.ChargeFlatFeeCreate, error)", + "line": 288 + } + ], + "line_count": 331 + }, + "openmeter/billing/charges/flatfee/adapter/credits.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCreditAllocations", + "signature": "func (a *adapter) CreateCreditAllocations(ctx context.Context, runID flatfee.RealizationRunID, creditAllocations creditrealization.CreateInputs) (creditrealization.Realizations, error)", + "line": 19 + } + ], + "line_count": 61 + }, + "openmeter/billing/charges/flatfee/adapter/detailedline.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "FetchCurrentRunDetailedLines", + "signature": "func (a *adapter) FetchCurrentRunDetailedLines(ctx context.Context, charge flatfee.Charge) (flatfee.Charge, error)", + "line": 23 + }, + { + "kind": "func", + "name": "UpsertDetailedLines", + "signature": "func (a *adapter) UpsertDetailedLines(ctx context.Context, runID flatfee.RealizationRunID, lines flatfee.DetailedLines) error", + "line": 57 + }, + { + "kind": "func", + "name": "buildDetailedLineCreate", + "signature": "func buildDetailedLineCreate(db *entdb.Client, runID flatfee.RealizationRunID, line flatfee.DetailedLine) (*entdb.ChargeFlatFeeRunDetailedLineCreate, error)", + "line": 135 + } + ], + "line_count": 153 + }, + "openmeter/billing/charges/flatfee/adapter/detailedline_test.go": { + "header": "\t\"log/slog\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatFeeDetailedLineAdapter", + "signature": "func TestFlatFeeDetailedLineAdapter(t *testing.T)", + "line": 30 + }, + { + "kind": "struct", + "name": "FlatFeeDetailedLineAdapterSuite", + "signature": "type FlatFeeDetailedLineAdapterSuite struct", + "line": 34 + }, + { + "kind": "struct", + "name": "newDetailedLineInput", + "signature": "type newDetailedLineInput struct", + "line": 42 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) SetupSuite()", + "line": 50 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) TearDownSuite()", + "line": 81 + }, + { + "kind": "func", + "name": "TestUpsertDetailedLinesReplacesAndSoftDeletesByChildUniqueReferenceID", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) TestUpsertDetailedLinesReplacesAndSoftDeletesByChildUniqueReferenceID()", + "line": 87 + }, + { + "kind": "func", + "name": "TestFetchCurrentRunDetailedLinesRequiresCurrentRun", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) TestFetchCurrentRunDetailedLinesRequiresCurrentRun()", + "line": 231 + }, + { + "kind": "func", + "name": "createCustomer", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) createCustomer(namespace string) string", + "line": 247 + }, + { + "kind": "func", + "name": "newDetailedLine", + "signature": "func (s *FlatFeeDetailedLineAdapterSuite) newDetailedLine(input newDetailedLineInput) flatfee.DetailedLine", + "line": 259 + } + ], + "line_count": 283 + }, + "openmeter/billing/charges/flatfee/adapter/mapper.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "MapChargeFlatFeeFromDB", + "signature": "func MapChargeFlatFeeFromDB(entity *entdb.ChargeFlatFee, expands meta.Expands) (flatfee.Charge, error)", + "line": 24 + }, + { + "kind": "func", + "name": "mapRealizationsFromDB", + "signature": "func mapRealizationsFromDB(entity *entdb.ChargeFlatFee) (flatfee.Realizations, error)", + "line": 42 + }, + { + "kind": "func", + "name": "mapRealizationRunBaseFromDB", + "signature": "func mapRealizationRunBaseFromDB(dbRun *entdb.ChargeFlatFeeRun) flatfee.RealizationRunBase", + "line": 70 + }, + { + "kind": "func", + "name": "mapRealizationRunFromDB", + "signature": "func mapRealizationRunFromDB(dbRun *entdb.ChargeFlatFeeRun) (flatfee.RealizationRun, error)", + "line": 90 + }, + { + "kind": "func", + "name": "sortDetailedLines", + "signature": "func sortDetailedLines(lines flatfee.DetailedLines)", + "line": 127 + }, + { + "kind": "func", + "name": "MapChargeBaseFromDB", + "signature": "func MapChargeBaseFromDB(entity *entdb.ChargeFlatFee) flatfee.ChargeBase", + "line": 131 + }, + { + "kind": "func", + "name": "proRatingConfigFromDB", + "signature": "func proRatingConfigFromDB(pr flatfee.ProRatingModeAdapterEnum) productcatalog.ProRatingConfig", + "line": 161 + }, + { + "kind": "func", + "name": "proRatingConfigToDB", + "signature": "func proRatingConfigToDB(pc productcatalog.ProRatingConfig) (flatfee.ProRatingModeAdapterEnum, error)", + "line": 177 + } + ], + "line_count": 187 + }, + "openmeter/billing/charges/flatfee/adapter/payment.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePayment", + "signature": "func (a *adapter) CreatePayment(ctx context.Context, runID flatfee.RealizationRunID, paymentSettlement payment.InvoicedCreate) (payment.Invoiced, error)", + "line": 15 + }, + { + "kind": "func", + "name": "UpdatePayment", + "signature": "func (a *adapter) UpdatePayment(ctx context.Context, paymentSettlement payment.Invoiced) (payment.Invoiced, error)", + "line": 39 + } + ], + "line_count": 57 + }, + "openmeter/billing/charges/flatfee/adapter/realizationrun.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCurrentRun", + "signature": "func (a *adapter) CreateCurrentRun(ctx context.Context, input flatfee.CreateCurrentRunInput) (flatfee.RealizationRunBase, error)", + "line": 17 + }, + { + "kind": "func", + "name": "UpdateRealizationRun", + "signature": "func (a *adapter) UpdateRealizationRun(ctx context.Context, input flatfee.UpdateRealizationRunInput) (flatfee.RealizationRunBase, error)", + "line": 69 + }, + { + "kind": "func", + "name": "DetachCurrentRun", + "signature": "func (a *adapter) DetachCurrentRun(ctx context.Context, chargeID meta.ChargeID) error", + "line": 128 + } + ], + "line_count": 146 + }, + "openmeter/billing/charges/flatfee/adapter/realizationrun_test.go": { + "header": "\t\"log/slog\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatFeeRealizationRunAdapter", + "signature": "func TestFlatFeeRealizationRunAdapter(t *testing.T)", + "line": 24 + }, + { + "kind": "struct", + "name": "FlatFeeRealizationRunAdapterSuite", + "signature": "type FlatFeeRealizationRunAdapterSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *FlatFeeRealizationRunAdapterSuite) SetupSuite()", + "line": 36 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *FlatFeeRealizationRunAdapterSuite) TearDownSuite()", + "line": 67 + }, + { + "kind": "func", + "name": "TestCreateCurrentRunFailsWhenCurrentRunAlreadyAttached", + "signature": "func (s *FlatFeeRealizationRunAdapterSuite) TestCreateCurrentRunFailsWhenCurrentRunAlreadyAttached()", + "line": 73 + }, + { + "kind": "func", + "name": "createCustomer", + "signature": "func (s *FlatFeeRealizationRunAdapterSuite) createCustomer(namespace string) string", + "line": 131 + } + ], + "line_count": 141 + }, + "openmeter/billing/charges/flatfee/adapter/usage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"", + "symbols": [ + { + "kind": "func", + "name": "CreateInvoicedUsage", + "signature": "func (a *adapter) CreateInvoicedUsage(ctx context.Context, input flatfee.CreateInvoicedUsageInput) (invoicedusage.AccruedUsage, error)", + "line": 15 + } + ], + "line_count": 41 + }, + "openmeter/billing/charges/flatfee/bookedat.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/pkg/timeutil\"", + "symbols": [ + { + "kind": "func", + "name": "UsageBookedAt", + "signature": "func UsageBookedAt(paymentTerm productcatalog.PaymentTermType, servicePeriod timeutil.ClosedPeriod) time.Time", + "line": 11 + } + ], + "line_count": 17 + }, + "openmeter/billing/charges/flatfee/charge.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeBase", + "signature": "type ChargeBase struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ChargeBase) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c ChargeBase) GetChargeID() meta.ChargeID", + "line": 49 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (c ChargeBase) GetCustomerID() customer.CustomerID", + "line": 56 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (c ChargeBase) GetCurrency() currencyx.Code", + "line": 63 + }, + { + "kind": "func", + "name": "ErrorAttributes", + "signature": "func (c ChargeBase) ErrorAttributes() models.Attributes", + "line": 67 + }, + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 77 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (c Charge) GetStatus() Status", + "line": 83 + }, + { + "kind": "func", + "name": "WithStatus", + "signature": "func (c Charge) WithStatus(status Status) Charge", + "line": 87 + }, + { + "kind": "func", + "name": "GetBase", + "signature": "func (c Charge) GetBase() ChargeBase", + "line": 92 + }, + { + "kind": "func", + "name": "WithBase", + "signature": "func (c Charge) WithBase(base ChargeBase) Charge", + "line": 96 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charge) Validate() error", + "line": 101 + }, + { + "kind": "struct", + "name": "Intent", + "signature": "type Intent struct", + "line": 115 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (i Intent) Normalized() Intent", + "line": 129 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Intent) Validate() error", + "line": 141 + }, + { + "kind": "func", + "name": "CalculateAmountAfterProration", + "signature": "func (i Intent) CalculateAmountAfterProration() (alpacadecimal.Decimal, error)", + "line": 180 + }, + { + "kind": "struct", + "name": "State", + "signature": "type State struct", + "line": 209 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (s State) Normalized() State", + "line": 215 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s State) Validate() error", + "line": 221 + }, + { + "kind": "struct", + "name": "Realizations", + "signature": "type Realizations struct", + "line": 237 + }, + { + "kind": "func", + "name": "GetByLineID", + "signature": "func (r Realizations) GetByLineID(lineID string) (RealizationRun, error)", + "line": 242 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Realizations) Validate() error", + "line": 258 + } + ], + "line_count": 272 + }, + "openmeter/billing/charges/flatfee/charge_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestCalculateAmountAfterProration", + "signature": "func TestCalculateAmountAfterProration(t *testing.T)", + "line": 18 + } + ], + "line_count": 170 + }, + "openmeter/billing/charges/flatfee/detailedline.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLines) Clone() DetailedLines", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLines) Validate() error", + "line": 23 + } + ], + "line_count": 33 + }, + "openmeter/billing/charges/flatfee/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "OnAllocateCreditsInput", + "signature": "type OnAllocateCreditsInput struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i OnAllocateCreditsInput) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "OnInvoiceUsageAccruedInput", + "signature": "type OnInvoiceUsageAccruedInput struct", + "line": 51 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i OnInvoiceUsageAccruedInput) Validate() error", + "line": 58 + }, + { + "kind": "struct", + "name": "CorrectCreditAllocationsInput", + "signature": "type CorrectCreditAllocationsInput struct", + "line": 80 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CorrectCreditAllocationsInput) Validate() error", + "line": 88 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CorrectCreditAllocationsInput) ValidateWith(currencyCalculator currencyx.Calculator) error", + "line": 102 + }, + { + "kind": "struct", + "name": "PaymentEventInput", + "signature": "type PaymentEventInput struct", + "line": 116 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PaymentEventInput) Validate() error", + "line": 122 + }, + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 145 + } + ], + "line_count": 163 + }, + "openmeter/billing/charges/flatfee/prorating.go": { + "header": "type ProRatingModeAdapterEnum string\nconst (\n\tProratePricesProratingAdapterMode ProRatingModeAdapterEnum = ProRatingModeAdapterEnum(productcatalog.ProRatingModeProratePrices)", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (e ProRatingModeAdapterEnum) Values() []string", + "line": 12 + } + ], + "line_count": 17 + }, + "openmeter/billing/charges/flatfee/realizationrun.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (t RealizationRunType) Values() []string", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t RealizationRunType) Validate() error", + "line": 35 + }, + { + "kind": "func", + "name": "IsVoidedBillingHistory", + "signature": "func (t RealizationRunType) IsVoidedBillingHistory() bool", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RealizationRunID) Validate() error", + "line": 49 + }, + { + "kind": "struct", + "name": "UpdateRealizationRunInput", + "signature": "type UpdateRealizationRunInput struct", + "line": 53 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (r UpdateRealizationRunInput) Normalized() UpdateRealizationRunInput", + "line": 67 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r UpdateRealizationRunInput) Validate() error", + "line": 75 + }, + { + "kind": "struct", + "name": "RealizationRunBase", + "signature": "type RealizationRunBase struct", + "line": 128 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (r RealizationRunBase) Normalized() RealizationRunBase", + "line": 147 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRunBase) Validate() error", + "line": 153 + }, + { + "kind": "struct", + "name": "RealizationRun", + "signature": "type RealizationRun struct", + "line": 207 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRun) Validate() error", + "line": 216 + }, + { + "kind": "func", + "name": "IsVoidedBillingHistory", + "signature": "func (r RealizationRun) IsVoidedBillingHistory() bool", + "line": 252 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRuns) Validate() error", + "line": 262 + } + ], + "line_count": 271 + }, + "openmeter/billing/charges/flatfee/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 14 + }, + { + "kind": "interface", + "name": "FlatFeeService", + "signature": "type FlatFeeService interface", + "line": 19 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "ChargeWithGatheringLine", + "signature": "type ChargeWithGatheringLine struct", + "line": 49 + }, + { + "kind": "struct", + "name": "GetByMetasInput", + "signature": "type GetByMetasInput struct", + "line": 54 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByMetasInput) Validate() error", + "line": 60 + }, + { + "kind": "struct", + "name": "AdvanceChargeInput", + "signature": "type AdvanceChargeInput struct", + "line": 78 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AdvanceChargeInput) Validate() error", + "line": 82 + } + ], + "line_count": 84 + }, + "openmeter/billing/charges/flatfee/service/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, input flatfee.CreateInput) ([]flatfee.ChargeWithGatheringLine, error)", + "line": 20 + }, + { + "kind": "struct", + "name": "buildFlatFeeGatheringLineInput", + "signature": "type buildFlatFeeGatheringLineInput struct", + "line": 102 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i buildFlatFeeGatheringLineInput) Validate() error", + "line": 108 + }, + { + "kind": "func", + "name": "buildFlatFeeGatheringLine", + "signature": "func buildFlatFeeGatheringLine(input buildFlatFeeGatheringLineInput) (billing.GatheringLine, error)", + "line": 128 + } + ], + "line_count": 209 + }, + "openmeter/billing/charges/flatfee/service/creditheninvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditThenInvoiceStateMachine", + "signature": "type CreditThenInvoiceStateMachine struct", + "line": 23 + }, + { + "kind": "interface", + "name": "periodPatch", + "signature": "type periodPatch interface", + "line": 27 + }, + { + "kind": "func", + "name": "NewCreditThenInvoiceStateMachine", + "signature": "func NewCreditThenInvoiceStateMachine(config StateMachineConfig) (*CreditThenInvoiceStateMachine, error)", + "line": 40 + }, + { + "kind": "func", + "name": "configureStates", + "signature": "func (s *CreditThenInvoiceStateMachine) configureStates()", + "line": 62 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) DeleteCharge(ctx context.Context, _ meta.PatchDeletePolicy) error", + "line": 147 + }, + { + "kind": "func", + "name": "ExtendCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) ExtendCharge(ctx context.Context, patch meta.PatchExtend) error", + "line": 182 + }, + { + "kind": "func", + "name": "ShrinkCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) ShrinkCharge(ctx context.Context, patch meta.PatchShrink) error", + "line": 195 + }, + { + "kind": "func", + "name": "applyPeriodPatch", + "signature": "func (s *CreditThenInvoiceStateMachine) applyPeriodPatch(patch periodPatch) (generateInvoicePatchesInput, error)", + "line": 208 + }, + { + "kind": "func", + "name": "UnsupportedExtendOperation", + "signature": "func (s *CreditThenInvoiceStateMachine) UnsupportedExtendOperation(_ context.Context, _ meta.PatchExtend) error", + "line": 232 + }, + { + "kind": "func", + "name": "UnsupportedShrinkOperation", + "signature": "func (s *CreditThenInvoiceStateMachine) UnsupportedShrinkOperation(_ context.Context, _ meta.PatchShrink) error", + "line": 238 + }, + { + "kind": "func", + "name": "StartRealization", + "signature": "func (s *CreditThenInvoiceStateMachine) StartRealization(ctx context.Context, input billing.StandardLineWithInvoiceHeader) error", + "line": 246 + }, + { + "kind": "func", + "name": "AccrueInvoiceUsage", + "signature": "func (s *CreditThenInvoiceStateMachine) AccrueInvoiceUsage(ctx context.Context, input billing.StandardLineWithInvoiceHeader) error", + "line": 265 + }, + { + "kind": "func", + "name": "AreAllPaymentsSettled", + "signature": "func (s *CreditThenInvoiceStateMachine) AreAllPaymentsSettled() bool", + "line": 285 + }, + { + "kind": "struct", + "name": "generateInvoicePatchesInput", + "signature": "type generateInvoicePatchesInput struct", + "line": 302 + }, + { + "kind": "func", + "name": "generateInvoicePatches", + "signature": "func (s *CreditThenInvoiceStateMachine) generateInvoicePatches(ctx context.Context, input generateInvoicePatchesInput) error", + "line": 310 + } + ], + "line_count": 492 + }, + "openmeter/billing/charges/flatfee/service/creditsonly.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditsOnlyStateMachine", + "signature": "type CreditsOnlyStateMachine struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewCreditsOnlyStateMachine", + "signature": "func NewCreditsOnlyStateMachine(config StateMachineConfig) (*CreditsOnlyStateMachine, error)", + "line": 21 + }, + { + "kind": "func", + "name": "configureStates", + "signature": "func (s *CreditsOnlyStateMachine) configureStates()", + "line": 43 + }, + { + "kind": "func", + "name": "IsAfterInvoiceAt", + "signature": "func (s *CreditsOnlyStateMachine) IsAfterInvoiceAt() bool", + "line": 71 + }, + { + "kind": "func", + "name": "AdvanceAfterInvoiceAt", + "signature": "func (s *CreditsOnlyStateMachine) AdvanceAfterInvoiceAt(ctx context.Context) error", + "line": 75 + }, + { + "kind": "func", + "name": "AllocateCredits", + "signature": "func (s *CreditsOnlyStateMachine) AllocateCredits(ctx context.Context) error", + "line": 80 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (s *CreditsOnlyStateMachine) DeleteCharge(ctx context.Context, policy meta.PatchDeletePolicy) error", + "line": 121 + } + ], + "line_count": 147 + }, + "openmeter/billing/charges/flatfee/service/get.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (s *service) GetByIDs(ctx context.Context, input flatfee.GetByIDsInput) ([]flatfee.Charge, error)", + "line": 10 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (s *service) GetByID(ctx context.Context, input flatfee.GetByIDInput) (flatfee.Charge, error)", + "line": 20 + } + ], + "line_count": 28 + }, + "openmeter/billing/charges/flatfee/service/lineengine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "LineEngine", + "signature": "type LineEngine struct", + "line": 21 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (e *LineEngine) GetLineEngineType() billing.LineEngineType", + "line": 25 + }, + { + "kind": "func", + "name": "IsLineBillableAsOf", + "signature": "func (e *LineEngine) IsLineBillableAsOf(_ context.Context, input billing.IsLineBillableAsOfInput) (bool, error)", + "line": 29 + }, + { + "kind": "func", + "name": "SplitGatheringLine", + "signature": "func (e *LineEngine) SplitGatheringLine(context.Context, billing.SplitGatheringLineInput) (billing.SplitGatheringLineResult, error)", + "line": 37 + }, + { + "kind": "func", + "name": "BuildStandardInvoiceLines", + "signature": "func (e *LineEngine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 41 + }, + { + "kind": "func", + "name": "BuildStandardLinesForGatheringPreview", + "signature": "func (e *LineEngine) BuildStandardLinesForGatheringPreview(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 57 + }, + { + "kind": "func", + "name": "OnStandardInvoiceCreated", + "signature": "func (e *LineEngine) OnStandardInvoiceCreated(ctx context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error)", + "line": 103 + }, + { + "kind": "func", + "name": "OnCollectionCompleted", + "signature": "func (e *LineEngine) OnCollectionCompleted(ctx context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error)", + "line": 151 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (e *LineEngine) OnMutableStandardLinesDeleted(ctx context.Context, input billing.OnMutableStandardLinesDeletedInput) error", + "line": 183 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (e *LineEngine) OnUnsupportedCreditNote(ctx context.Context, input billing.OnUnsupportedCreditNoteInput) error", + "line": 255 + }, + { + "kind": "func", + "name": "newStateMachineForStandardLine", + "signature": "func (e *LineEngine) newStateMachineForStandardLine(ctx context.Context, stdLine *billing.StandardLine) (*CreditThenInvoiceStateMachine, error)", + "line": 301 + }, + { + "kind": "func", + "name": "getChargesForStandardLineEvent", + "signature": "func (e *LineEngine) getChargesForStandardLineEvent(ctx context.Context, input billing.StandardLineEventInput, expands meta.Expands) (map[string]flatfee.Charge, error)", + "line": 350 + }, + { + "kind": "func", + "name": "OnInvoiceIssued", + "signature": "func (e *LineEngine) OnInvoiceIssued(ctx context.Context, input billing.OnInvoiceIssuedInput) error", + "line": 385 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (e *LineEngine) OnPaymentAuthorized(ctx context.Context, input billing.OnPaymentAuthorizedInput) error", + "line": 411 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (e *LineEngine) OnPaymentSettled(ctx context.Context, input billing.OnPaymentSettledInput) error", + "line": 433 + } + ], + "line_count": 470 + }, + "openmeter/billing/charges/flatfee/service/linemapper.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "populateFlatFeeStandardLineFromRun", + "signature": "func populateFlatFeeStandardLineFromRun(stdLine *billing.StandardLine, run flatfee.RealizationRun) error", + "line": 13 + }, + { + "kind": "func", + "name": "mapFlatFeeDetailedLines", + "signature": "func mapFlatFeeDetailedLines(stdLine *billing.StandardLine, run flatfee.RealizationRun) (billing.DetailedLines, error)", + "line": 48 + } + ], + "line_count": 68 + }, + "openmeter/billing/charges/flatfee/service/payment.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "postInvoicePaymentAuthorized", + "signature": "func (s *service) postInvoicePaymentAuthorized(ctx context.Context, charge flatfee.Charge, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 17 + }, + { + "kind": "func", + "name": "postInvoicePaymentSettled", + "signature": "func (s *service) postInvoicePaymentSettled(ctx context.Context, charge flatfee.Charge, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 82 + }, + { + "kind": "func", + "name": "getPaymentTotal", + "signature": "func getPaymentTotal(run flatfee.RealizationRun) (alpacadecimal.Decimal, error)", + "line": 148 + }, + { + "kind": "func", + "name": "validatePaymentRunForLine", + "signature": "func validatePaymentRunForLine(charge flatfee.Charge, run flatfee.RealizationRun, lineWithHeader billing.StandardLineWithInvoiceHeader) error", + "line": 165 + } + ], + "line_count": 179 + }, + "openmeter/billing/charges/flatfee/service/payment_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetPaymentTotal", + "signature": "func TestGetPaymentTotal(t *testing.T)", + "line": 17 + } + ], + "line_count": 108 + }, + "openmeter/billing/charges/flatfee/service/realizations/correct.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ReconcileCreditRealizationsInput", + "signature": "type ReconcileCreditRealizationsInput struct", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReconcileCreditRealizationsInput) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "ReconcileCreditRealizationsResult", + "signature": "type ReconcileCreditRealizationsResult struct", + "line": 55 + }, + { + "kind": "func", + "name": "ReconcileCredits", + "signature": "func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error)", + "line": 66 + }, + { + "kind": "struct", + "name": "CorrectAllCreditRealizationsInput", + "signature": "type CorrectAllCreditRealizationsInput struct", + "line": 153 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CorrectAllCreditRealizationsInput) Validate() error", + "line": 160 + }, + { + "kind": "struct", + "name": "CorrectAllCreditRealizationsResult", + "signature": "type CorrectAllCreditRealizationsResult struct", + "line": 180 + }, + { + "kind": "func", + "name": "CorrectAllCredits", + "signature": "func (s *Service) CorrectAllCredits(ctx context.Context, in CorrectAllCreditRealizationsInput) (CorrectAllCreditRealizationsResult, error)", + "line": 184 + } + ], + "line_count": 220 + }, + "openmeter/billing/charges/flatfee/service/realizations/creditsonly.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "AllocateCreditsOnlyInput", + "signature": "type AllocateCreditsOnlyInput struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AllocateCreditsOnlyInput) Validate() error", + "line": 24 + }, + { + "kind": "struct", + "name": "AllocateCreditsOnlyResult", + "signature": "type AllocateCreditsOnlyResult struct", + "line": 40 + }, + { + "kind": "func", + "name": "AllocateCreditsOnly", + "signature": "func (s *Service) AllocateCreditsOnly(ctx context.Context, in AllocateCreditsOnlyInput) (AllocateCreditsOnlyResult, error)", + "line": 45 + } + ], + "line_count": 115 + }, + "openmeter/billing/charges/flatfee/service/realizations/credittheninvoice.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "StartCreditThenInvoiceRunInput", + "signature": "type StartCreditThenInvoiceRunInput struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StartCreditThenInvoiceRunInput) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "StartCreditThenInvoiceRunResult", + "signature": "type StartCreditThenInvoiceRunResult struct", + "line": 60 + }, + { + "kind": "func", + "name": "StartCreditThenInvoiceRun", + "signature": "func (s *Service) StartCreditThenInvoiceRun(ctx context.Context, in StartCreditThenInvoiceRunInput) (StartCreditThenInvoiceRunResult, error)", + "line": 64 + }, + { + "kind": "struct", + "name": "ReconcileStandardLineToIntentInput", + "signature": "type ReconcileStandardLineToIntentInput struct", + "line": 181 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReconcileStandardLineToIntentInput) Validate() error", + "line": 194 + }, + { + "kind": "struct", + "name": "ReconcileStandardLineToIntentResult", + "signature": "type ReconcileStandardLineToIntentResult struct", + "line": 235 + }, + { + "kind": "func", + "name": "ReconcileStandardLineToIntent", + "signature": "func (s *Service) ReconcileStandardLineToIntent(ctx context.Context, in ReconcileStandardLineToIntentInput) (ReconcileStandardLineToIntentResult, error)", + "line": 250 + }, + { + "kind": "func", + "name": "rateFlatFeeLine", + "signature": "func rateFlatFeeLine(line billing.StandardLine, ratingService billingrating.Service) (*billing.StandardLine, error)", + "line": 334 + }, + { + "kind": "func", + "name": "applyCreditsToFlatFeeLine", + "signature": "func applyCreditsToFlatFeeLine(line billing.StandardLine, creditsApplied billing.CreditsApplied, currencyCalculator currencyx.Calculator) (*billing.StandardLine, error)", + "line": 372 + } + ], + "line_count": 393 + }, + "openmeter/billing/charges/flatfee/service/realizations/invoiceaccrued.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AccrueInvoiceUsageInput", + "signature": "type AccrueInvoiceUsageInput struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AccrueInvoiceUsageInput) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "AccrueInvoiceUsageResult", + "signature": "type AccrueInvoiceUsageResult struct", + "line": 62 + }, + { + "kind": "func", + "name": "AccrueInvoiceUsage", + "signature": "func (s *Service) AccrueInvoiceUsage(ctx context.Context, in AccrueInvoiceUsageInput) (AccrueInvoiceUsageResult, error)", + "line": 67 + } + ], + "line_count": 123 + }, + "openmeter/billing/charges/flatfee/service/realizations/preview.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "BuildCreditThenInvoiceGatheringPreviewRunInput", + "signature": "type BuildCreditThenInvoiceGatheringPreviewRunInput struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BuildCreditThenInvoiceGatheringPreviewRunInput) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "BuildCreditThenInvoiceGatheringPreviewRunResult", + "signature": "type BuildCreditThenInvoiceGatheringPreviewRunResult struct", + "line": 45 + }, + { + "kind": "func", + "name": "BuildCreditThenInvoiceGatheringPreviewRun", + "signature": "func (s *Service) BuildCreditThenInvoiceGatheringPreviewRun(in BuildCreditThenInvoiceGatheringPreviewRunInput) (BuildCreditThenInvoiceGatheringPreviewRunResult, error)", + "line": 54 + } + ], + "line_count": 101 + }, + "openmeter/billing/charges/flatfee/service/realizations/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 18 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 54 + }, + { + "kind": "func", + "name": "createCreditAllocations", + "signature": "func (s *Service) createCreditAllocations(ctx context.Context, charge flatfee.Charge, runID flatfee.RealizationRunID, creditAllocations creditrealization.CreateInputs) (creditrealization.Realizations, error)", + "line": 67 + } + ], + "line_count": 92 + }, + "openmeter/billing/charges/flatfee/service/service.go": { + "header": "\t\"errors\"\n\t\"sync/atomic\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (flatfee.Service, error)", + "line": 57 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 84 + }, + { + "kind": "func", + "name": "GetLineEngine", + "signature": "func (s *service) GetLineEngine() billing.LineEngine", + "line": 93 + }, + { + "kind": "func", + "name": "SetCreditNotesSupportedByLineUpdater", + "signature": "func (s *service) SetCreditNotesSupportedByLineUpdater(t *testing.T, supported bool) error", + "line": 102 + } + ], + "line_count": 110 + }, + "openmeter/billing/charges/flatfee/service/statemachine.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "stateMachine", + "signature": "type stateMachine struct", + "line": 17 + }, + { + "kind": "struct", + "name": "StateMachineConfig", + "signature": "type StateMachineConfig struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StateMachineConfig) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "newStateMachineBase", + "signature": "func newStateMachineBase(config StateMachineConfig) (*stateMachine, error)", + "line": 61 + }, + { + "kind": "func", + "name": "IsInsideServicePeriod", + "signature": "func (s *stateMachine) IsInsideServicePeriod() bool", + "line": 96 + }, + { + "kind": "func", + "name": "IsInsideServicePeriodAndZeroAmount", + "signature": "func (s *stateMachine) IsInsideServicePeriodAndZeroAmount() bool", + "line": 100 + }, + { + "kind": "func", + "name": "IsInsideServicePeriodAndNonZeroAmount", + "signature": "func (s *stateMachine) IsInsideServicePeriodAndNonZeroAmount() bool", + "line": 104 + }, + { + "kind": "func", + "name": "IsZeroAmount", + "signature": "func (s *stateMachine) IsZeroAmount() bool", + "line": 108 + }, + { + "kind": "func", + "name": "AdvanceAfterServicePeriodFrom", + "signature": "func (s *stateMachine) AdvanceAfterServicePeriodFrom(ctx context.Context) error", + "line": 112 + }, + { + "kind": "func", + "name": "AdvanceAfterServicePeriodTo", + "signature": "func (s *stateMachine) AdvanceAfterServicePeriodTo(ctx context.Context) error", + "line": 117 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (s *stateMachine) ClearAdvanceAfter(ctx context.Context) error", + "line": 122 + } + ], + "line_count": 125 + }, + "openmeter/billing/charges/flatfee/service/subscription.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (s *service) UpdateSubscriptionItemID(ctx context.Context, charge flatfee.Charge, newSubscriptionItemID string) (flatfee.Charge, error)", + "line": 13 + } + ], + "line_count": 33 + }, + "openmeter/billing/charges/flatfee/service/triggers.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges\"", + "symbols": [ + { + "kind": "func", + "name": "AdvanceCharge", + "signature": "func (s *service) AdvanceCharge(ctx context.Context, input flatfee.AdvanceChargeInput) (*flatfee.Charge, error)", + "line": 15 + }, + { + "kind": "func", + "name": "TriggerPatch", + "signature": "func (s *service) TriggerPatch(ctx context.Context, chargeID meta.ChargeID, patch meta.Patch) (meta.TriggerPatchResult[flatfee.Charge], error)", + "line": 36 + }, + { + "kind": "func", + "name": "newStateMachine", + "signature": "func (s *service) newStateMachine(config StateMachineConfig) (StateMachine, error)", + "line": 78 + }, + { + "kind": "func", + "name": "withLockedCharge", + "signature": "func (s *service) withLockedCharge(ctx context.Context, chargeID meta.ChargeID, fn func(ctx context.Context, charge flatfee.Charge) (*flatfee.Charge, error)) (*flatfee.Charge, error)", + "line": 101 + } + ], + "line_count": 129 + }, + "openmeter/billing/charges/flatfee/statemachine.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s Status) Validate() error", + "line": 44 + }, + { + "kind": "func", + "name": "ToMetaChargeStatus", + "signature": "func (s Status) ToMetaChargeStatus() (meta.ChargeStatus, error)", + "line": 51 + } + ], + "line_count": 67 + }, + "openmeter/billing/charges/helpers.go": { + "header": "type WithIndex[T any] struct {\n\tIndex int\n\tValue T", + "symbols": [], + "line_count": 6 + }, + "openmeter/billing/charges/invoiceupdater/feehelper.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "IsFlatFee", + "signature": "func IsFlatFee(line billing.GenericInvoiceLineReader) bool", + "line": 13 + }, + { + "kind": "func", + "name": "GetFlatFeePerUnitAmount", + "signature": "func GetFlatFeePerUnitAmount(line billing.GenericInvoiceLineReader) (alpacadecimal.Decimal, error)", + "line": 26 + }, + { + "kind": "func", + "name": "SetFlatFeePerUnitAmount", + "signature": "func SetFlatFeePerUnitAmount(line billing.GenericInvoiceLine, perUnitAmount alpacadecimal.Decimal) error", + "line": 44 + } + ], + "line_count": 62 + }, + "openmeter/billing/charges/invoiceupdater/invoiceupdate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Updater", + "signature": "type Updater struct", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(billingService billing.Service, logger *slog.Logger) *Updater", + "line": 26 + }, + { + "kind": "func", + "name": "ApplyPatches", + "signature": "func (u *Updater) ApplyPatches(ctx context.Context, customerID customer.CustomerID, patches []Patch) error", + "line": 33 + }, + { + "kind": "func", + "name": "listInvoicesByID", + "signature": "func (u *Updater) listInvoicesByID(ctx context.Context, namespace string, invoiceIDs []string) (map[string]billing.Invoice, error)", + "line": 97 + }, + { + "kind": "func", + "name": "LogPatches", + "signature": "func (u *Updater) LogPatches(patches []Patch, invoicesByID map[string]billing.Invoice)", + "line": 124 + }, + { + "kind": "func", + "name": "isDryRunLoggablePatch", + "signature": "func isDryRunLoggablePatch(patch Patch, invoicesByID map[string]billing.Invoice) bool", + "line": 141 + }, + { + "kind": "func", + "name": "isCurrentBillingPeriod", + "signature": "func isCurrentBillingPeriod(line billing.GatheringLine) bool", + "line": 175 + }, + { + "kind": "func", + "name": "isMutableInvoice", + "signature": "func isMutableInvoice(invoiceID string, invoicesByID map[string]billing.Invoice) bool", + "line": 187 + }, + { + "kind": "struct", + "name": "patchesParsed", + "signature": "type patchesParsed struct", + "line": 205 + }, + { + "kind": "struct", + "name": "invoicePatches", + "signature": "type invoicePatches struct", + "line": 214 + }, + { + "kind": "struct", + "name": "invoiceLineUpdatePatch", + "signature": "type invoiceLineUpdatePatch struct", + "line": 219 + }, + { + "kind": "struct", + "name": "invoiceLineDeletePatch", + "signature": "type invoiceLineDeletePatch struct", + "line": 224 + }, + { + "kind": "func", + "name": "parsePatches", + "signature": "func (u *Updater) parsePatches(patches []Patch) (patchesParsed, error)", + "line": 229 + }, + { + "kind": "func", + "name": "provisionUpcomingLines", + "signature": "func (u *Updater) provisionUpcomingLines(ctx context.Context, customerID customer.CustomerID, lines []billing.GatheringLine) error", + "line": 290 + }, + { + "kind": "func", + "name": "resolveGatheringLineDeletesByChargeID", + "signature": "func (u *Updater) resolveGatheringLineDeletesByChargeID(ctx context.Context, customerID customer.CustomerID, parsed *patchesParsed) error", + "line": 313 + }, + { + "kind": "func", + "name": "resolveGatheringLineUpdatesByChargeID", + "signature": "func (u *Updater) resolveGatheringLineUpdatesByChargeID(ctx context.Context, customerID customer.CustomerID, parsed *patchesParsed) error", + "line": 356 + }, + { + "kind": "func", + "name": "updateMutableStandardInvoice", + "signature": "func (u *Updater) updateMutableStandardInvoice(ctx context.Context, invoice billing.StandardInvoice, linePatches invoicePatches) error", + "line": 406 + }, + { + "kind": "func", + "name": "updateGatheringInvoice", + "signature": "func (u *Updater) updateGatheringInvoice(ctx context.Context, invoiceID billing.InvoiceID, linePatches invoicePatches) error", + "line": 483 + }, + { + "kind": "func", + "name": "updateImmutableInvoice", + "signature": "func (u *Updater) updateImmutableInvoice(ctx context.Context, invoice billing.StandardInvoice, linePatches invoicePatches) error", + "line": 525 + }, + { + "kind": "func", + "name": "standardLineUsageQuantity", + "signature": "func standardLineUsageQuantity(line *billing.StandardLine) *alpacadecimal.Decimal", + "line": 636 + }, + { + "kind": "func", + "name": "standardLineUsageQuantityString", + "signature": "func standardLineUsageQuantityString(line *billing.StandardLine) string", + "line": 644 + }, + { + "kind": "func", + "name": "ensureLineHasChargeID", + "signature": "func ensureLineHasChargeID(line billing.GenericInvoiceLineReader, operation PatchOperation) error", + "line": 653 + }, + { + "kind": "func", + "name": "newValidationIssueOnLine", + "signature": "func newValidationIssueOnLine(line *billing.StandardLine, message string, a ...any) billing.ValidationIssue", + "line": 670 + }, + { + "kind": "func", + "name": "mergeValidationIssues", + "signature": "func (u *Updater) mergeValidationIssues(invoice billing.StandardInvoice, issues []billing.ValidationIssue) (billing.ValidationIssues, bool)", + "line": 690 + } + ], + "line_count": 708 + }, + "openmeter/billing/charges/invoiceupdater/patch.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchLineCreate", + "signature": "type PatchLineCreate struct", + "line": 21 + }, + { + "kind": "struct", + "name": "PatchLineDelete", + "signature": "type PatchLineDelete struct", + "line": 25 + }, + { + "kind": "struct", + "name": "PatchLineUpdate", + "signature": "type PatchLineUpdate struct", + "line": 30 + }, + { + "kind": "struct", + "name": "PatchDeleteGatheringLineByChargeID", + "signature": "type PatchDeleteGatheringLineByChargeID struct", + "line": 34 + }, + { + "kind": "struct", + "name": "PatchUpdateGatheringLineByChargeID", + "signature": "type PatchUpdateGatheringLineByChargeID struct", + "line": 38 + }, + { + "kind": "struct", + "name": "Patch", + "signature": "type Patch struct", + "line": 44 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p Patch) Op() PatchOperation", + "line": 54 + }, + { + "kind": "func", + "name": "AsCreateLinePatch", + "signature": "func (p Patch) AsCreateLinePatch() (PatchLineCreate, error)", + "line": 58 + }, + { + "kind": "func", + "name": "AsDeleteLinePatch", + "signature": "func (p Patch) AsDeleteLinePatch() (PatchLineDelete, error)", + "line": 66 + }, + { + "kind": "func", + "name": "AsUpdateLinePatch", + "signature": "func (p Patch) AsUpdateLinePatch() (PatchLineUpdate, error)", + "line": 74 + }, + { + "kind": "func", + "name": "AsDeleteGatheringLineByChargeIDPatch", + "signature": "func (p Patch) AsDeleteGatheringLineByChargeIDPatch() (PatchDeleteGatheringLineByChargeID, error)", + "line": 82 + }, + { + "kind": "func", + "name": "AsUpdateGatheringLineByChargeIDPatch", + "signature": "func (p Patch) AsUpdateGatheringLineByChargeIDPatch() (PatchUpdateGatheringLineByChargeID, error)", + "line": 90 + }, + { + "kind": "func", + "name": "NewDeleteLinePatch", + "signature": "func NewDeleteLinePatch(lineID billing.LineID, invoiceID string) Patch", + "line": 98 + }, + { + "kind": "func", + "name": "NewDeleteGatheringLineByChargeIDPatch", + "signature": "func NewDeleteGatheringLineByChargeIDPatch(chargeID string) Patch", + "line": 108 + }, + { + "kind": "func", + "name": "NewUpdateGatheringLineByChargeIDPatch", + "signature": "func NewUpdateGatheringLineByChargeIDPatch(chargeID string, servicePeriodTo time.Time, invoiceAt time.Time) Patch", + "line": 117 + }, + { + "kind": "func", + "name": "NewUpdateLinePatch", + "signature": "func NewUpdateLinePatch(line billing.GenericInvoiceLine) Patch", + "line": 128 + }, + { + "kind": "func", + "name": "NewCreateLinePatch", + "signature": "func NewCreateLinePatch(line billing.GatheringLine) Patch", + "line": 137 + }, + { + "kind": "func", + "name": "Log", + "signature": "func (p Patch) Log(logger *slog.Logger)", + "line": 146 + } + ], + "line_count": 161 + }, + "openmeter/billing/charges/lineage/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (lineage.Adapter, error)", + "line": 27 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 37 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 41 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 52 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 60 + } + ], + "line_count": 62 + }, + "openmeter/billing/charges/lineage/adapter/lineage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "LoadActiveSegmentsByRealizationID", + "signature": "func LoadActiveSegmentsByRealizationID(\n\tctx context.Context,\n\tdb *entdb.Client,\n\tnamespace string,\n\trealizationIDs []string,\n) (lineage.ActiveSegmentsByRealizationID, error)", + "line": 21 + }, + { + "kind": "func", + "name": "LoadActiveSegmentsByRealizationID", + "signature": "func (a *adapter) LoadActiveSegmentsByRealizationID(\n\tctx context.Context,\n\tnamespace string,\n\trealizationIDs []string,\n) (lineage.ActiveSegmentsByRealizationID, error)", + "line": 56 + }, + { + "kind": "func", + "name": "CreateLineages", + "signature": "func (a *adapter) CreateLineages(ctx context.Context, input lineage.CreateLineagesInput) error", + "line": 64 + }, + { + "kind": "func", + "name": "LoadLineagesByCustomer", + "signature": "func (a *adapter) LoadLineagesByCustomer(ctx context.Context, input lineage.LoadLineagesByCustomerInput) ([]lineage.Lineage, error)", + "line": 98 + }, + { + "kind": "func", + "name": "LockCorrectionLineages", + "signature": "func (a *adapter) LockCorrectionLineages(ctx context.Context, namespace string, realizationIDs []string) ([]lineage.Lineage, error)", + "line": 120 + }, + { + "kind": "func", + "name": "LockAdvanceLineagesForBackfill", + "signature": "func (a *adapter) LockAdvanceLineagesForBackfill(ctx context.Context, namespace string, customerID string, currency currencyx.Code) ([]lineage.Lineage, error)", + "line": 146 + }, + { + "kind": "func", + "name": "ListActiveSegments", + "signature": "func (a *adapter) ListActiveSegments(ctx context.Context, input lineage.ListActiveSegmentsInput) ([]lineage.Segment, error)", + "line": 183 + }, + { + "kind": "func", + "name": "CloseSegment", + "signature": "func (a *adapter) CloseSegment(ctx context.Context, segmentID string, closedAt time.Time) error", + "line": 207 + }, + { + "kind": "func", + "name": "CreateSegment", + "signature": "func (a *adapter) CreateSegment(ctx context.Context, input lineage.CreateSegmentInput) error", + "line": 219 + }, + { + "kind": "func", + "name": "mapLineage", + "signature": "func mapLineage(entry *entdb.CreditRealizationLineage, _ int) lineage.Lineage", + "line": 239 + }, + { + "kind": "func", + "name": "mapSegment", + "signature": "func mapSegment(segment *entdb.CreditRealizationLineageSegment) lineage.Segment", + "line": 254 + } + ], + "line_count": 264 + }, + "openmeter/billing/charges/lineage/lineage.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"sort\"", + "symbols": [ + { + "kind": "func", + "name": "SortCorrectionPersistSegments", + "signature": "func SortCorrectionPersistSegments(segments []Segment) []Segment", + "line": 14 + }, + { + "kind": "func", + "name": "MinDecimal", + "signature": "func MinDecimal(a, b alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 39 + }, + { + "kind": "func", + "name": "FilterAdvanceLineagesForBackfill", + "signature": "func FilterAdvanceLineagesForBackfill(lineages []Lineage, featureFilters []string) []Lineage", + "line": 47 + }, + { + "kind": "func", + "name": "FeatureFiltersMatchAdvance", + "signature": "func FeatureFiltersMatchAdvance(featureFilters []string, advanceFeatures []string) bool", + "line": 53 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s Segment) Validate() error", + "line": 71 + } + ], + "line_count": 104 + }, + "openmeter/billing/charges/lineage/lineage_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestSegmentValidateRequiresSourceBackingTransactionGroupForAdvanceBackfilledSource", + "signature": "func TestSegmentValidateRequiresSourceBackingTransactionGroupForAdvanceBackfilledSource(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestFeatureFiltersMatchAdvance", + "signature": "func TestFeatureFiltersMatchAdvance(t *testing.T)", + "line": 27 + } + ], + "line_count": 35 + }, + "openmeter/billing/charges/lineage/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 16 + }, + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 26 + }, + { + "kind": "struct", + "name": "CreateInitialLineagesInput", + "signature": "type CreateInitialLineagesInput struct", + "line": 39 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInitialLineagesInput) Validate() error", + "line": 48 + }, + { + "kind": "struct", + "name": "PersistCorrectionLineageSegmentsInput", + "signature": "type PersistCorrectionLineageSegmentsInput struct", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PersistCorrectionLineageSegmentsInput) Validate() error", + "line": 75 + }, + { + "kind": "struct", + "name": "BackfillAdvanceLineageSegmentsInput", + "signature": "type BackfillAdvanceLineageSegmentsInput struct", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BackfillAdvanceLineageSegmentsInput) Validate() error", + "line": 104 + }, + { + "kind": "struct", + "name": "LoadLineagesByCustomerInput", + "signature": "type LoadLineagesByCustomerInput struct", + "line": 126 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i LoadLineagesByCustomerInput) Validate() error", + "line": 132 + }, + { + "kind": "struct", + "name": "CreateLineagesInput", + "signature": "type CreateLineagesInput struct", + "line": 148 + }, + { + "kind": "struct", + "name": "ListActiveSegmentsInput", + "signature": "type ListActiveSegmentsInput struct", + "line": 156 + }, + { + "kind": "struct", + "name": "CreateSegmentInput", + "signature": "type CreateSegmentInput struct", + "line": 161 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateSegmentInput) Validate() error", + "line": 170 + }, + { + "kind": "struct", + "name": "Lineage", + "signature": "type Lineage struct", + "line": 222 + }, + { + "kind": "struct", + "name": "Segment", + "signature": "type Segment struct", + "line": 233 + } + ], + "line_count": 243 + }, + "openmeter/billing/charges/lineage/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (lineage.Service, error)", + "line": 29 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 39 + }, + { + "kind": "func", + "name": "CreateInitialLineages", + "signature": "func (s *service) CreateInitialLineages(ctx context.Context, input lineage.CreateInitialLineagesInput) error", + "line": 43 + }, + { + "kind": "func", + "name": "LoadActiveSegmentsByRealizationID", + "signature": "func (s *service) LoadActiveSegmentsByRealizationID(ctx context.Context, namespace string, realizationIDs []string) (lineage.ActiveSegmentsByRealizationID, error)", + "line": 72 + }, + { + "kind": "func", + "name": "LoadLineagesByCustomer", + "signature": "func (s *service) LoadLineagesByCustomer(ctx context.Context, input lineage.LoadLineagesByCustomerInput) ([]lineage.Lineage, error)", + "line": 85 + }, + { + "kind": "func", + "name": "PersistCorrectionLineageSegments", + "signature": "func (s *service) PersistCorrectionLineageSegments(ctx context.Context, input lineage.PersistCorrectionLineageSegmentsInput) error", + "line": 93 + }, + { + "kind": "func", + "name": "BackfillAdvanceLineageSegments", + "signature": "func (s *service) BackfillAdvanceLineageSegments(ctx context.Context, input lineage.BackfillAdvanceLineageSegmentsInput) error", + "line": 178 + }, + { + "kind": "func", + "name": "CloseSegment", + "signature": "func (s *service) CloseSegment(ctx context.Context, segmentID string, closedAt time.Time) error", + "line": 250 + }, + { + "kind": "func", + "name": "CreateSegment", + "signature": "func (s *service) CreateSegment(ctx context.Context, input lineage.CreateSegmentInput) error", + "line": 254 + } + ], + "line_count": 256 + }, + "openmeter/billing/charges/lock.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/lockr\"", + "symbols": [ + { + "kind": "func", + "name": "NewLockKeyForCharge", + "signature": "func NewLockKeyForCharge(chargeID meta.ChargeID) (lockr.Key, error)", + "line": 10 + } + ], + "line_count": 16 + }, + "openmeter/billing/charges/meta/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 12 + }, + { + "kind": "struct", + "name": "RegisterChargesInput", + "signature": "type RegisterChargesInput struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RegisterChargesInput) Validate() error", + "line": 26 + }, + { + "kind": "struct", + "name": "IDWithUniqueReferenceID", + "signature": "type IDWithUniqueReferenceID struct", + "line": 44 + } + ], + "line_count": 49 + }, + "openmeter/billing/charges/meta/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (meta.Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 61 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/billing/charges/meta/adapter/charges.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"", + "symbols": [ + { + "kind": "func", + "name": "RegisterCharges", + "signature": "func (a *adapter) RegisterCharges(ctx context.Context, in meta.RegisterChargesInput) error", + "line": 15 + }, + { + "kind": "func", + "name": "DeleteRegisteredCharge", + "signature": "func (a *adapter) DeleteRegisteredCharge(ctx context.Context, in meta.DeleteRegisteredChargeInput) error", + "line": 51 + } + ], + "line_count": 63 + }, + "openmeter/billing/charges/meta/charge.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (i ChargeID) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ChargeIDs) Validate() error", + "line": 25 + }, + { + "kind": "func", + "name": "ToNamespacedIDs", + "signature": "func (i ChargeIDs) ToNamespacedIDs() []models.NamespacedID", + "line": 36 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (t ChargeType) Values() []string", + "line": 53 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ChargeType) Validate() error", + "line": 61 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e Expand) Values() []Expand", + "line": 78 + }, + { + "kind": "interface", + "name": "ChargeAccessor", + "signature": "type ChargeAccessor interface", + "line": 91 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s ChargeStatus) Values() []string", + "line": 112 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ChargeStatus) Validate() error", + "line": 121 + }, + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 129 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charge) Validate() error", + "line": 137 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charges) Validate() error", + "line": 157 + } + ], + "line_count": 167 + }, + "openmeter/billing/charges/meta/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [], + "line_count": 17 + }, + "openmeter/billing/charges/meta/intent.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "Intent", + "signature": "type Intent struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Intent) Validate() error", + "line": 36 + } + ], + "line_count": 82 + }, + "openmeter/billing/charges/meta/patch.go": { + "header": "\t\"github.com/qmuntal/stateless\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/invoiceupdater\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "Patch", + "signature": "type Patch interface", + "line": 18 + } + ], + "line_count": 30 + }, + "openmeter/billing/charges/meta/patchdelete.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchDelete", + "signature": "type PatchDelete struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewPatchDelete", + "signature": "func NewPatchDelete(policy PatchDeletePolicy) PatchDelete", + "line": 22 + }, + { + "kind": "func", + "name": "SetPolicy", + "signature": "func (p *PatchDelete) SetPolicy(policy PatchDeletePolicy)", + "line": 28 + }, + { + "kind": "func", + "name": "GetPolicy", + "signature": "func (p PatchDelete) GetPolicy() PatchDeletePolicy", + "line": 32 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p PatchDelete) Op() PatchType", + "line": 36 + }, + { + "kind": "func", + "name": "Trigger", + "signature": "func (p PatchDelete) Trigger() stateless.Trigger", + "line": 40 + }, + { + "kind": "func", + "name": "TriggerParams", + "signature": "func (p PatchDelete) TriggerParams() any", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchDelete) Validate() error", + "line": 48 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (p CreditRefundPolicy) Values() []CreditRefundPolicy", + "line": 63 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p CreditRefundPolicy) Validate() error", + "line": 70 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (p InvoiceRefundPolicy) Values() []InvoiceRefundPolicy", + "line": 92 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p InvoiceRefundPolicy) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "PatchDeletePolicy", + "signature": "type PatchDeletePolicy struct", + "line": 110 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchDeletePolicy) Validate() error", + "line": 115 + } + ], + "line_count": 134 + }, + "openmeter/billing/charges/meta/patchextend.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchExtend", + "signature": "type PatchExtend struct", + "line": 18 + }, + { + "kind": "struct", + "name": "NewPatchExtendInput", + "signature": "type NewPatchExtendInput struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NewPatchExtendInput) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "NewPatchExtend", + "signature": "func NewPatchExtend(input NewPatchExtendInput) (PatchExtend, error)", + "line": 52 + }, + { + "kind": "func", + "name": "SetNewServicePeriodTo", + "signature": "func (p *PatchExtend) SetNewServicePeriodTo(v time.Time)", + "line": 65 + }, + { + "kind": "func", + "name": "GetNewServicePeriodTo", + "signature": "func (p PatchExtend) GetNewServicePeriodTo() time.Time", + "line": 69 + }, + { + "kind": "func", + "name": "SetNewFullServicePeriodTo", + "signature": "func (p *PatchExtend) SetNewFullServicePeriodTo(v time.Time)", + "line": 73 + }, + { + "kind": "func", + "name": "GetNewFullServicePeriodTo", + "signature": "func (p PatchExtend) GetNewFullServicePeriodTo() time.Time", + "line": 77 + }, + { + "kind": "func", + "name": "SetNewBillingPeriodTo", + "signature": "func (p *PatchExtend) SetNewBillingPeriodTo(v time.Time)", + "line": 81 + }, + { + "kind": "func", + "name": "GetNewBillingPeriodTo", + "signature": "func (p PatchExtend) GetNewBillingPeriodTo() time.Time", + "line": 85 + }, + { + "kind": "func", + "name": "SetNewInvoiceAt", + "signature": "func (p *PatchExtend) SetNewInvoiceAt(v time.Time)", + "line": 89 + }, + { + "kind": "func", + "name": "GetNewInvoiceAt", + "signature": "func (p PatchExtend) GetNewInvoiceAt() time.Time", + "line": 93 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p PatchExtend) Op() PatchType", + "line": 97 + }, + { + "kind": "func", + "name": "Trigger", + "signature": "func (p PatchExtend) Trigger() stateless.Trigger", + "line": 101 + }, + { + "kind": "func", + "name": "TriggerParams", + "signature": "func (p PatchExtend) TriggerParams() any", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchExtend) Validate() error", + "line": 109 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p PatchExtend) ValidateWith(intent Intent) error", + "line": 129 + } + ], + "line_count": 149 + }, + "openmeter/billing/charges/meta/patchextend_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestPatchExtendValidateWith", + "signature": "func TestPatchExtendValidateWith(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "mustNewPatchExtend", + "signature": "func mustNewPatchExtend(t *testing.T, input NewPatchExtendInput) PatchExtend", + "line": 99 + } + ], + "line_count": 105 + }, + "openmeter/billing/charges/meta/patchshrink.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchShrink", + "signature": "type PatchShrink struct", + "line": 18 + }, + { + "kind": "struct", + "name": "NewPatchShrinkInput", + "signature": "type NewPatchShrinkInput struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NewPatchShrinkInput) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "NewPatchShrink", + "signature": "func NewPatchShrink(input NewPatchShrinkInput) (PatchShrink, error)", + "line": 52 + }, + { + "kind": "func", + "name": "SetNewServicePeriodTo", + "signature": "func (p *PatchShrink) SetNewServicePeriodTo(v time.Time)", + "line": 65 + }, + { + "kind": "func", + "name": "GetNewServicePeriodTo", + "signature": "func (p PatchShrink) GetNewServicePeriodTo() time.Time", + "line": 69 + }, + { + "kind": "func", + "name": "SetNewFullServicePeriodTo", + "signature": "func (p *PatchShrink) SetNewFullServicePeriodTo(v time.Time)", + "line": 73 + }, + { + "kind": "func", + "name": "GetNewFullServicePeriodTo", + "signature": "func (p PatchShrink) GetNewFullServicePeriodTo() time.Time", + "line": 77 + }, + { + "kind": "func", + "name": "SetNewBillingPeriodTo", + "signature": "func (p *PatchShrink) SetNewBillingPeriodTo(v time.Time)", + "line": 81 + }, + { + "kind": "func", + "name": "GetNewBillingPeriodTo", + "signature": "func (p PatchShrink) GetNewBillingPeriodTo() time.Time", + "line": 85 + }, + { + "kind": "func", + "name": "SetNewInvoiceAt", + "signature": "func (p *PatchShrink) SetNewInvoiceAt(v time.Time)", + "line": 89 + }, + { + "kind": "func", + "name": "GetNewInvoiceAt", + "signature": "func (p PatchShrink) GetNewInvoiceAt() time.Time", + "line": 93 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p PatchShrink) Op() PatchType", + "line": 97 + }, + { + "kind": "func", + "name": "Trigger", + "signature": "func (p PatchShrink) Trigger() stateless.Trigger", + "line": 101 + }, + { + "kind": "func", + "name": "TriggerParams", + "signature": "func (p PatchShrink) TriggerParams() any", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchShrink) Validate() error", + "line": 109 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p PatchShrink) ValidateWith(intent Intent) error", + "line": 129 + } + ], + "line_count": 161 + }, + "openmeter/billing/charges/meta/patchshrink_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestPatchShrinkValidateWith", + "signature": "func TestPatchShrinkValidateWith(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "mustNewPatchShrink", + "signature": "func mustNewPatchShrink(t *testing.T, input NewPatchShrinkInput) PatchShrink", + "line": 148 + } + ], + "line_count": 154 + }, + "openmeter/billing/charges/meta/resource.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "ManagedResource", + "signature": "type ManagedResource struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r ManagedResource) Validate() error", + "line": 16 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (r ManagedResource) GetChargeID() ChargeID", + "line": 34 + } + ], + "line_count": 39 + }, + "openmeter/billing/charges/meta/service.go": { + "header": "type Service = Adapter", + "symbols": [], + "line_count": 5 + }, + "openmeter/billing/charges/meta/subscription.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionReference", + "signature": "type SubscriptionReference struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r SubscriptionReference) Validate() error", + "line": 16 + } + ], + "line_count": 32 + }, + "openmeter/billing/charges/meta/timestamps.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/streaming\"\n\t\"github.com/openmeterio/openmeter/pkg/timeutil\"", + "symbols": [ + { + "kind": "func", + "name": "NormalizeTimestamp", + "signature": "func NormalizeTimestamp(t time.Time) time.Time", + "line": 10 + }, + { + "kind": "func", + "name": "NormalizeOptionalTimestamp", + "signature": "func NormalizeOptionalTimestamp(t *time.Time) *time.Time", + "line": 18 + }, + { + "kind": "func", + "name": "NormalizeClosedPeriod", + "signature": "func NormalizeClosedPeriod(period timeutil.ClosedPeriod) timeutil.ClosedPeriod", + "line": 27 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (i Intent) Normalized() Intent", + "line": 34 + } + ], + "line_count": 40 + }, + "openmeter/billing/charges/meta/triggers.go": { + "header": "type Trigger = stateless.Trigger\nvar (\n\tTriggerNext Trigger = \"next\"", + "symbols": [], + "line_count": 14 + }, + "openmeter/billing/charges/models/chargemeta/mixin.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"", + "symbols": [ + { + "kind": "struct", + "name": "metaMixin", + "signature": "type metaMixin struct", + "line": 25 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 112 + }, + { + "kind": "struct", + "name": "UpdateInput", + "signature": "type UpdateInput struct", + "line": 224 + } + ], + "line_count": 346 + }, + "openmeter/billing/charges/models/creditrealization/allocation.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateAllocationInput", + "signature": "type CreateAllocationInput struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAllocationInput) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAllocationInputs) Validate() error", + "line": 55 + }, + { + "kind": "func", + "name": "AsCreateInputs", + "signature": "func (i CreateAllocationInputs) AsCreateInputs() CreateInputs", + "line": 67 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func (i CreateAllocationInputs) Sum() alpacadecimal.Decimal", + "line": 81 + } + ], + "line_count": 87 + }, + "openmeter/billing/charges/models/creditrealization/correction.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (c CorrectionRequest) ValidateWith(currency currencyx.Calculator) error", + "line": 18 + }, + { + "kind": "struct", + "name": "CorrectionRequestItem", + "signature": "type CorrectionRequestItem struct", + "line": 30 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CorrectionRequestItem) ValidateWith(currency currencyx.Calculator) error", + "line": 37 + }, + { + "kind": "func", + "name": "NormalizeWith", + "signature": "func (i CorrectionRequestItem) NormalizeWith(currency currencyx.Calculator) CorrectionRequestItem", + "line": 55 + }, + { + "kind": "struct", + "name": "CreateCorrectionInput", + "signature": "type CreateCorrectionInput struct", + "line": 60 + }, + { + "kind": "func", + "name": "NormalizeWith", + "signature": "func (i CreateCorrectionInput) NormalizeWith(currency currencyx.Calculator) CreateCorrectionInput", + "line": 77 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateCorrectionInput) ValidateWith(currency currencyx.Calculator) error", + "line": 82 + }, + { + "kind": "func", + "name": "NormalizeWith", + "signature": "func (i CreateCorrectionInputs) NormalizeWith(currency currencyx.Calculator) CreateCorrectionInputs", + "line": 106 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateCorrectionInputs) ValidateWith(existingRealizations Realizations, totalAmountToCorrect alpacadecimal.Decimal, currency currencyx.Calculator) error", + "line": 112 + }, + { + "kind": "func", + "name": "AsCreateInputs", + "signature": "func (i CreateCorrectionInputs) AsCreateInputs(existingRealizations Realizations) ([]CreateInput, error)", + "line": 168 + } + ], + "line_count": 187 + }, + "openmeter/billing/charges/models/creditrealization/correction_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "testCurrency", + "signature": "func testCurrency(t *testing.T) currencyx.Calculator", + "line": 21 + }, + { + "kind": "struct", + "name": "allocationBuilder", + "signature": "type allocationBuilder struct", + "line": 36 + }, + { + "kind": "func", + "name": "newAllocationBuilder", + "signature": "func newAllocationBuilder() *allocationBuilder", + "line": 41 + }, + { + "kind": "func", + "name": "withCreatedAt", + "signature": "func (b *allocationBuilder) withCreatedAt(t time.Time) *allocationBuilder", + "line": 47 + }, + { + "kind": "func", + "name": "build", + "signature": "func (b *allocationBuilder) build(amount float64) Realization", + "line": 52 + }, + { + "kind": "func", + "name": "correctionFor", + "signature": "func correctionFor(allocation Realization, amount float64) Realization", + "line": 78 + }, + { + "kind": "func", + "name": "correctionInputsSum", + "signature": "func correctionInputsSum(inputs CreateCorrectionInputs) alpacadecimal.Decimal", + "line": 102 + }, + { + "kind": "func", + "name": "correctionRequestAmounts", + "signature": "func correctionRequestAmounts(cr CorrectionRequest) []float64", + "line": 111 + }, + { + "kind": "func", + "name": "correctionRequestAllocationIDs", + "signature": "func correctionRequestAllocationIDs(cr CorrectionRequest) []string", + "line": 120 + }, + { + "kind": "func", + "name": "TestCreateCorrectionRequest", + "signature": "func TestCreateCorrectionRequest(t *testing.T)", + "line": 128 + }, + { + "kind": "func", + "name": "TestCreateCorrectionInputsValidateWith", + "signature": "func TestCreateCorrectionInputsValidateWith(t *testing.T)", + "line": 406 + }, + { + "kind": "func", + "name": "TestCreateCorrectionInputsAsCreateInputs", + "signature": "func TestCreateCorrectionInputsAsCreateInputs(t *testing.T)", + "line": 672 + }, + { + "kind": "func", + "name": "TestCorrectionEndToEnd", + "signature": "func TestCorrectionEndToEnd(t *testing.T)", + "line": 775 + }, + { + "kind": "func", + "name": "correctionCallback", + "signature": "func correctionCallback(txGroupID string) func(req CorrectionRequest) (CreateCorrectionInputs, error)", + "line": 930 + }, + { + "kind": "func", + "name": "TestCorrect", + "signature": "func TestCorrect(t *testing.T)", + "line": 946 + } + ], + "line_count": 1137 + }, + "openmeter/billing/charges/models/creditrealization/lineage.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (k LineageOriginKind) Values() []string", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (k LineageOriginKind) Validate() error", + "line": 26 + }, + { + "kind": "func", + "name": "LineageAnnotations", + "signature": "func LineageAnnotations(originKind LineageOriginKind) models.Annotations", + "line": 34 + }, + { + "kind": "func", + "name": "LineageOriginKindFromAnnotations", + "signature": "func LineageOriginKindFromAnnotations(annotations models.Annotations) (LineageOriginKind, error)", + "line": 40 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s LineageSegmentState) Values() []string", + "line": 72 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s LineageSegmentState) Validate() error", + "line": 81 + }, + { + "kind": "func", + "name": "InitialLineageSegmentState", + "signature": "func InitialLineageSegmentState(originKind LineageOriginKind) LineageSegmentState", + "line": 89 + } + ], + "line_count": 98 + }, + "openmeter/billing/charges/models/creditrealization/lineage_specs.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "InitialLineageSpec", + "signature": "type InitialLineageSpec struct", + "line": 10 + }, + { + "kind": "func", + "name": "InitialLineageSpecs", + "signature": "func InitialLineageSpecs(realizations Realizations) ([]InitialLineageSpec, error)", + "line": 19 + } + ], + "line_count": 47 + }, + "openmeter/billing/charges/models/creditrealization/mixin.go": { + "header": "\t\"slices\"\n\t\"time\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "Mixin", + "signature": "type Mixin struct", + "line": 20 + }, + { + "kind": "struct", + "name": "mixinBase", + "signature": "type mixinBase struct", + "line": 26 + }, + { + "kind": "func", + "name": "Fields", + "signature": "func (m mixinBase) Fields() []ent.Field", + "line": 39 + }, + { + "kind": "func", + "name": "Edges", + "signature": "func (m Mixin) Edges() []ent.Edge", + "line": 84 + }, + { + "kind": "interface", + "name": "Getter", + "signature": "type Getter interface", + "line": 132 + }, + { + "kind": "func", + "name": "MapFromDB", + "signature": "func MapFromDB(dbEntity Getter) Realization", + "line": 148 + } + ], + "line_count": 173 + }, + "openmeter/billing/charges/models/creditrealization/models.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 15 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (t Type) Values() []string", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t Type) Validate() error", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 55 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInputs) Validate() error", + "line": 94 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func (i CreateInputs) Sum() alpacadecimal.Decimal", + "line": 106 + }, + { + "kind": "struct", + "name": "Realization", + "signature": "type Realization struct", + "line": 114 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Realization) Validate() error", + "line": 124 + } + ], + "line_count": 132 + }, + "openmeter/billing/charges/models/creditrealization/realizations.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (r Realizations) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func (r Realizations) Sum() alpacadecimal.Decimal", + "line": 32 + }, + { + "kind": "func", + "name": "AllocationsByID", + "signature": "func (r Realizations) AllocationsByID() map[string]Realization", + "line": 40 + }, + { + "kind": "func", + "name": "AsCreditsApplied", + "signature": "func (r Realizations) AsCreditsApplied() (billing.CreditsApplied, error)", + "line": 51 + }, + { + "kind": "func", + "name": "CreateCorrectionRequest", + "signature": "func (r Realizations) CreateCorrectionRequest(amount alpacadecimal.Decimal, currency currencyx.Calculator) (CorrectionRequest, error)", + "line": 74 + }, + { + "kind": "func", + "name": "Correct", + "signature": "func (r Realizations) Correct(amount alpacadecimal.Decimal, currency currencyx.Calculator, cb func(req CorrectionRequest) (CreateCorrectionInputs, error)) (CreateInputs, error)", + "line": 123 + }, + { + "kind": "func", + "name": "CorrectAll", + "signature": "func (r Realizations) CorrectAll(currency currencyx.Calculator, cb func(req CorrectionRequest) (CreateCorrectionInputs, error)) (CreateInputs, error)", + "line": 150 + }, + { + "kind": "struct", + "name": "allocationWithCorrections", + "signature": "type allocationWithCorrections struct", + "line": 159 + }, + { + "kind": "func", + "name": "allocationsWithCorrections", + "signature": "func (r Realizations) allocationsWithCorrections() ([]allocationWithCorrections, error)", + "line": 167 + } + ], + "line_count": 214 + }, + "openmeter/billing/charges/models/invoicedusage/mixin.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"", + "symbols": [ + { + "kind": "struct", + "name": "mixin", + "signature": "type mixin struct", + "line": 19 + }, + { + "kind": "interface", + "name": "Getter", + "signature": "type Getter interface", + "line": 75 + }, + { + "kind": "func", + "name": "MapAccruedUsageFromDB", + "signature": "func MapAccruedUsageFromDB(dbEntity Getter) AccruedUsage", + "line": 86 + } + ], + "line_count": 108 + }, + "openmeter/billing/charges/models/invoicedusage/stdinvoice.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/ledgertransaction\"", + "symbols": [ + { + "kind": "struct", + "name": "AccruedUsage", + "signature": "type AccruedUsage struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r AccruedUsage) Validate() error", + "line": 24 + } + ], + "line_count": 42 + }, + "openmeter/billing/charges/models/ledgertransaction/ledger.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "GroupReference", + "signature": "type GroupReference struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r GroupReference) Validate() error", + "line": 17 + }, + { + "kind": "func", + "name": "GetIDOrNull", + "signature": "func (r *GroupReference) GetIDOrNull() *string", + "line": 27 + }, + { + "kind": "struct", + "name": "TimedGroupReference", + "signature": "type TimedGroupReference struct", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r TimedGroupReference) Validate() error", + "line": 40 + }, + { + "kind": "func", + "name": "GetIDOrNull", + "signature": "func (r *TimedGroupReference) GetIDOrNull() *string", + "line": 54 + }, + { + "kind": "func", + "name": "GetTimeOrNull", + "signature": "func (r *TimedGroupReference) GetTimeOrNull() *time.Time", + "line": 62 + } + ], + "line_count": 68 + }, + "openmeter/billing/charges/models/payment/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [], + "line_count": 35 + }, + "openmeter/billing/charges/models/payment/external.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "ExternalCreateInput", + "signature": "type ExternalCreateInput struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ExternalCreateInput) Validate() error", + "line": 18 + }, + { + "kind": "struct", + "name": "External", + "signature": "type External struct", + "line": 32 + }, + { + "kind": "func", + "name": "ErrorAttributes", + "signature": "func (r External) ErrorAttributes() models.Attributes", + "line": 36 + }, + { + "kind": "func", + "name": "MapExternalFromDB", + "signature": "func MapExternalFromDB(dbEntity Getter) External", + "line": 50 + } + ], + "line_count": 59 + }, + "openmeter/billing/charges/models/payment/invoiced.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "invoicedMixin", + "signature": "type invoicedMixin struct", + "line": 17 + }, + { + "kind": "struct", + "name": "InvoicedCreate", + "signature": "type InvoicedCreate struct", + "line": 42 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoicedCreate) Validate() error", + "line": 50 + }, + { + "kind": "struct", + "name": "Invoiced", + "signature": "type Invoiced struct", + "line": 92 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Invoiced) Validate() error", + "line": 101 + }, + { + "kind": "func", + "name": "ErrorAttributes", + "signature": "func (r Invoiced) ErrorAttributes() models.Attributes", + "line": 119 + }, + { + "kind": "interface", + "name": "InvoicedGetter", + "signature": "type InvoicedGetter interface", + "line": 127 + }, + { + "kind": "func", + "name": "MapInvoicedFromDB", + "signature": "func MapInvoicedFromDB(dbEntity InvoicedGetter) Invoiced", + "line": 133 + } + ], + "line_count": 139 + }, + "openmeter/billing/charges/models/payment/mixin.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"", + "symbols": [ + { + "kind": "struct", + "name": "mixin", + "signature": "type mixin struct", + "line": 20 + }, + { + "kind": "interface", + "name": "Getter", + "signature": "type Getter interface", + "line": 119 + }, + { + "kind": "func", + "name": "mapBaseFromDB", + "signature": "func mapBaseFromDB(dbEntity Getter) Base", + "line": 134 + }, + { + "kind": "func", + "name": "mapPaymentFromDB", + "signature": "func mapPaymentFromDB(dbEntity Getter) Payment", + "line": 148 + }, + { + "kind": "func", + "name": "mapTimedLedgerTransactionGroupReferenceFromDB", + "signature": "func mapTimedLedgerTransactionGroupReferenceFromDB(reference *string, at *time.Time) *ledgertransaction.TimedGroupReference", + "line": 159 + } + ], + "line_count": 170 + }, + "openmeter/billing/charges/models/payment/models.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (o Status) Values() []string", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o Status) Validate() error", + "line": 39 + }, + { + "kind": "struct", + "name": "Base", + "signature": "type Base struct", + "line": 47 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Base) Validate() error", + "line": 58 + }, + { + "kind": "struct", + "name": "Payment", + "signature": "type Payment struct", + "line": 103 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Payment) Validate() error", + "line": 112 + } + ], + "line_count": 128 + }, + "openmeter/billing/charges/patch.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "ApplyPatchesInput", + "signature": "type ApplyPatchesInput struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ApplyPatchesInput) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "ConcatenateApplyPatchesInputs", + "signature": "func ConcatenateApplyPatchesInputs(inputs ...ApplyPatchesInput) (ApplyPatchesInput, error)", + "line": 57 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (i ApplyPatchesInput) IsEmpty() bool", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/billing/charges/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 18 + }, + { + "kind": "interface", + "name": "ChargeService", + "signature": "type ChargeService interface", + "line": 25 + }, + { + "kind": "interface", + "name": "CreditPurchaseFacadeService", + "signature": "type CreditPurchaseFacadeService interface", + "line": 40 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 49 + }, + { + "kind": "struct", + "name": "GetByIDInput", + "signature": "type GetByIDInput struct", + "line": 63 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDInput) Validate() error", + "line": 68 + }, + { + "kind": "struct", + "name": "GetByIDsInput", + "signature": "type GetByIDsInput struct", + "line": 82 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDsInput) Validate() error", + "line": 88 + }, + { + "kind": "struct", + "name": "HandleCreditPurchaseExternalPaymentStateTransitionInput", + "signature": "type HandleCreditPurchaseExternalPaymentStateTransitionInput struct", + "line": 108 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i HandleCreditPurchaseExternalPaymentStateTransitionInput) Validate() error", + "line": 114 + }, + { + "kind": "struct", + "name": "AdvanceChargesInput", + "signature": "type AdvanceChargesInput struct", + "line": 128 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AdvanceChargesInput) Validate() error", + "line": 132 + }, + { + "kind": "struct", + "name": "ListChargesInput", + "signature": "type ListChargesInput struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListChargesInput) Validate() error", + "line": 161 + }, + { + "kind": "struct", + "name": "ListCustomersToAdvanceInput", + "signature": "type ListCustomersToAdvanceInput struct", + "line": 209 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCustomersToAdvanceInput) Validate() error", + "line": 216 + } + ], + "line_count": 228 + }, + "openmeter/billing/charges/service/advance.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "AdvanceCharges", + "signature": "func (s *service) AdvanceCharges(ctx context.Context, input charges.AdvanceChargesInput) (charges.Charges, error)", + "line": 18 + }, + { + "kind": "func", + "name": "collectCurrencies", + "signature": "func collectCurrencies(chargeList charges.Charges) ([]currencyx.Code, error)", + "line": 117 + } + ], + "line_count": 130 + }, + "openmeter/billing/charges/service/advance_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestAdvanceCharges", + "signature": "func TestAdvanceCharges(t *testing.T)", + "line": 20 + }, + { + "kind": "struct", + "name": "AdvanceChargesTestSuite", + "signature": "type AdvanceChargesTestSuite struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *AdvanceChargesTestSuite) SetupSuite()", + "line": 28 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *AdvanceChargesTestSuite) TearDownTest()", + "line": 32 + }, + { + "kind": "func", + "name": "TestAdvanceChargesReturnsEmptyForAlreadyActiveCreditCharges", + "signature": "func (s *AdvanceChargesTestSuite) TestAdvanceChargesReturnsEmptyForAlreadyActiveCreditCharges()", + "line": 36 + }, + { + "kind": "func", + "name": "TestAdvanceChargesActivatesCreditThenInvoiceFlatFeeAtServicePeriodStart", + "signature": "func (s *AdvanceChargesTestSuite) TestAdvanceChargesActivatesCreditThenInvoiceFlatFeeAtServicePeriodStart()", + "line": 124 + }, + { + "kind": "func", + "name": "TestAdvanceChargesActivatesCreditThenInvoiceUsageBasedChargesAtServicePeriodStart", + "signature": "func (s *AdvanceChargesTestSuite) TestAdvanceChargesActivatesCreditThenInvoiceUsageBasedChargesAtServicePeriodStart()", + "line": 175 + } + ], + "line_count": 238 + }, + "openmeter/billing/charges/service/base_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "BaseSuite", + "signature": "type BaseSuite struct", + "line": 42 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *BaseSuite) SetupSuite()", + "line": 52 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *BaseSuite) TearDownTest()", + "line": 171 + }, + { + "kind": "struct", + "name": "createMockChargeIntentInput", + "signature": "type createMockChargeIntentInput struct", + "line": 180 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *createMockChargeIntentInput) Validate() error", + "line": 194 + }, + { + "kind": "func", + "name": "createMockChargeIntent", + "signature": "func (s *BaseSuite) createMockChargeIntent(input createMockChargeIntentInput) charges.ChargeIntent", + "line": 214 + }, + { + "kind": "func", + "name": "grantPromotionalCredits", + "signature": "func (s *BaseSuite) grantPromotionalCredits(ctx context.Context, customerID customer.CustomerID, amount float64) []charges.Charge", + "line": 274 + }, + { + "kind": "func", + "name": "mustGetChargeByID", + "signature": "func (s *BaseSuite) mustGetChargeByID(chargeID meta.ChargeID) charges.Charge", + "line": 302 + } + ], + "line_count": 312 + }, + "openmeter/billing/charges/service/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "chargesWithInvoiceNowActions", + "signature": "type chargesWithInvoiceNowActions struct", + "line": 27 + }, + { + "kind": "func", + "name": "applyDefaultTaxCodes", + "signature": "func (s *service) applyDefaultTaxCodes(ctx context.Context, namespace string, intents charges.ChargeIntents) (charges.ChargeIntents, error)", + "line": 36 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, input charges.CreateInput) (charges.Charges, error)", + "line": 79 + }, + { + "kind": "func", + "name": "autoAdvanceCreatedCharges", + "signature": "func (s *service) autoAdvanceCreatedCharges(ctx context.Context, created charges.Charges) (charges.Charges, error)", + "line": 260 + }, + { + "kind": "func", + "name": "isAdvanceDue", + "signature": "func isAdvanceDue(advanceAfter *time.Time) bool", + "line": 342 + }, + { + "kind": "struct", + "name": "currencyAndCustomerID", + "signature": "type currencyAndCustomerID struct", + "line": 346 + }, + { + "kind": "struct", + "name": "gatheringLineWithCustomerID", + "signature": "type gatheringLineWithCustomerID struct", + "line": 351 + }, + { + "kind": "func", + "name": "invokeInvoiceNowOnCreate", + "signature": "func (s *service) invokeInvoiceNowOnCreate(ctx context.Context, invoiceNowLines []invoicePendingLinesInput) error", + "line": 357 + }, + { + "kind": "struct", + "name": "invoicePendingLinesInput", + "signature": "type invoicePendingLinesInput struct", + "line": 383 + }, + { + "kind": "func", + "name": "createGatheringLines", + "signature": "func (s *service) createGatheringLines(ctx context.Context, gatheringLinesToCreate []gatheringLineWithCustomerID) ([]invoicePendingLinesInput, error)", + "line": 388 + } + ], + "line_count": 426 + }, + "openmeter/billing/charges/service/creditpurchase.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges\"", + "symbols": [ + { + "kind": "func", + "name": "HandleCreditPurchaseExternalPaymentStateTransition", + "signature": "func (s *service) HandleCreditPurchaseExternalPaymentStateTransition(ctx context.Context, input charges.HandleCreditPurchaseExternalPaymentStateTransitionInput) (creditpurchase.Charge, error)", + "line": 17 + } + ], + "line_count": 60 + }, + "openmeter/billing/charges/service/creditpurchase_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditPurchaseTestSuite", + "signature": "type CreditPurchaseTestSuite struct", + "line": 31 + }, + { + "kind": "func", + "name": "TestCreditPurchase", + "signature": "func TestCreditPurchase(t *testing.T)", + "line": 35 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CreditPurchaseTestSuite) SetupSuite()", + "line": 39 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *CreditPurchaseTestSuite) TearDownTest()", + "line": 43 + }, + { + "kind": "func", + "name": "TestPromotionalCreditPurchase", + "signature": "func (s *CreditPurchaseTestSuite) TestPromotionalCreditPurchase()", + "line": 47 + }, + { + "kind": "func", + "name": "TestCreditPurchaseRejectsMismatchedSettlementCurrency", + "signature": "func (s *CreditPurchaseTestSuite) TestCreditPurchaseRejectsMismatchedSettlementCurrency()", + "line": 99 + }, + { + "kind": "struct", + "name": "createCreditPurchaseIntentInput", + "signature": "type createCreditPurchaseIntentInput struct", + "line": 158 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i createCreditPurchaseIntentInput) Validate() error", + "line": 166 + }, + { + "kind": "func", + "name": "CreateCreditPurchaseIntent", + "signature": "func CreateCreditPurchaseIntent(t *testing.T, input createCreditPurchaseIntentInput) charges.ChargeIntent", + "line": 190 + }, + { + "kind": "func", + "name": "TestExternalAuthorizedCreditPurchaseAutoSettled", + "signature": "func (s *CreditPurchaseTestSuite) TestExternalAuthorizedCreditPurchaseAutoSettled()", + "line": 209 + }, + { + "kind": "func", + "name": "TestExternalAuthorizedCreditPurchaseManuallySettled", + "signature": "func (s *CreditPurchaseTestSuite) TestExternalAuthorizedCreditPurchaseManuallySettled()", + "line": 312 + }, + { + "kind": "func", + "name": "TestStandardInvoiceCreditPurchase", + "signature": "func (s *CreditPurchaseTestSuite) TestStandardInvoiceCreditPurchase()", + "line": 431 + }, + { + "kind": "func", + "name": "TestStandardInvoiceCreditPurchaseDeferred", + "signature": "func (s *CreditPurchaseTestSuite) TestStandardInvoiceCreditPurchaseDeferred()", + "line": 667 + } + ], + "line_count": 753 + }, + "openmeter/billing/charges/service/featureid_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestChargeFeatureIDs", + "signature": "func TestChargeFeatureIDs(t *testing.T)", + "line": 30 + }, + { + "kind": "struct", + "name": "ChargeFeatureIDTestSuite", + "signature": "type ChargeFeatureIDTestSuite struct", + "line": 34 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *ChargeFeatureIDTestSuite) SetupSuite()", + "line": 38 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *ChargeFeatureIDTestSuite) TearDownTest()", + "line": 42 + }, + { + "kind": "func", + "name": "TestCreateResolvesFeatureIDsForUsageBasedAndFlatFeeCharges", + "signature": "func (s *ChargeFeatureIDTestSuite) TestCreateResolvesFeatureIDsForUsageBasedAndFlatFeeCharges()", + "line": 46 + }, + { + "kind": "func", + "name": "TestUsageBasedActivationRecalculatesFeatureIDAndRunsKeepUsingIt", + "signature": "func (s *ChargeFeatureIDTestSuite) TestUsageBasedActivationRecalculatesFeatureIDAndRunsKeepUsingIt()", + "line": 123 + }, + { + "kind": "func", + "name": "installMeters", + "signature": "func (s *ChargeFeatureIDTestSuite) installMeters(ctx context.Context, meters ...meter.Meter)", + "line": 228 + }, + { + "kind": "func", + "name": "createFeature", + "signature": "func (s *ChargeFeatureIDTestSuite) createFeature(ctx context.Context, namespace, key, meterID string) featurepkg.Feature", + "line": 233 + }, + { + "kind": "func", + "name": "archiveFeature", + "signature": "func (s *ChargeFeatureIDTestSuite) archiveFeature(ctx context.Context, namespace, featureID string)", + "line": 247 + }, + { + "kind": "func", + "name": "newTestMeter", + "signature": "func newTestMeter(namespace, key string) meter.Meter", + "line": 255 + } + ], + "line_count": 275 + }, + "openmeter/billing/charges/service/gathering_preview_test.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\tbillingtest \"github.com/openmeterio/openmeter/test/billing\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "assertGatheringPreviewInput", + "signature": "type assertGatheringPreviewInput struct", + "line": 8 + }, + { + "kind": "func", + "name": "assertGatheringPreview", + "signature": "func (s *BaseSuite) assertGatheringPreview(input assertGatheringPreviewInput) billing.StandardInvoice", + "line": 18 + } + ], + "line_count": 47 + }, + "openmeter/billing/charges/service/get.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GetByID", + "signature": "func (s *service) GetByID(ctx context.Context, input charges.GetByIDInput) (charges.Charge, error)", + "line": 18 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (s *service) GetByIDs(ctx context.Context, input charges.GetByIDsInput) (charges.Charges, error)", + "line": 39 + }, + { + "kind": "func", + "name": "expandChargesWithTypes", + "signature": "func (s *service) expandChargesWithTypes(ctx context.Context, namespace string, chargesItems charges.ChargeSearchItems, expands meta.Expands) (charges.Charges, error)", + "line": 58 + } + ], + "line_count": 118 + }, + "openmeter/billing/charges/service/handlers_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "flatFeeTestHandler", + "signature": "type flatFeeTestHandler struct", + "line": 20 + }, + { + "kind": "func", + "name": "newFlatFeeTestHandler", + "signature": "func newFlatFeeTestHandler() *flatFeeTestHandler", + "line": 29 + }, + { + "kind": "func", + "name": "OnAllocateCredits", + "signature": "func (h *flatFeeTestHandler) OnAllocateCredits(ctx context.Context, input flatfee.OnAllocateCreditsInput) (creditrealization.CreateAllocationInputs, error)", + "line": 33 + }, + { + "kind": "func", + "name": "OnInvoiceUsageAccrued", + "signature": "func (h *flatFeeTestHandler) OnInvoiceUsageAccrued(ctx context.Context, input flatfee.OnInvoiceUsageAccruedInput) (ledgertransaction.GroupReference, error)", + "line": 41 + }, + { + "kind": "func", + "name": "OnCorrectCreditAllocations", + "signature": "func (h *flatFeeTestHandler) OnCorrectCreditAllocations(ctx context.Context, input flatfee.CorrectCreditAllocationsInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 49 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (h *flatFeeTestHandler) OnPaymentAuthorized(ctx context.Context, input flatfee.OnPaymentAuthorizedInput) (ledgertransaction.GroupReference, error)", + "line": 57 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (h *flatFeeTestHandler) OnPaymentSettled(ctx context.Context, input flatfee.OnPaymentSettledInput) (ledgertransaction.GroupReference, error)", + "line": 65 + }, + { + "kind": "func", + "name": "OnPaymentUncollectible", + "signature": "func (h *flatFeeTestHandler) OnPaymentUncollectible(ctx context.Context, charge flatfee.Charge) (ledgertransaction.GroupReference, error)", + "line": 73 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (h *flatFeeTestHandler) Reset()", + "line": 81 + }, + { + "kind": "struct", + "name": "creditPurchaseTestHandler", + "signature": "type creditPurchaseTestHandler struct", + "line": 87 + }, + { + "kind": "func", + "name": "newCreditPurchaseTestHandler", + "signature": "func newCreditPurchaseTestHandler() *creditPurchaseTestHandler", + "line": 94 + }, + { + "kind": "func", + "name": "OnPromotionalCreditPurchase", + "signature": "func (h *creditPurchaseTestHandler) OnPromotionalCreditPurchase(ctx context.Context, charge creditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 98 + }, + { + "kind": "func", + "name": "OnCreditPurchaseInitiated", + "signature": "func (h *creditPurchaseTestHandler) OnCreditPurchaseInitiated(ctx context.Context, charge creditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 106 + }, + { + "kind": "func", + "name": "OnCreditPurchasePaymentAuthorized", + "signature": "func (h *creditPurchaseTestHandler) OnCreditPurchasePaymentAuthorized(ctx context.Context, input creditpurchase.PaymentEventInput) (ledgertransaction.GroupReference, error)", + "line": 114 + }, + { + "kind": "func", + "name": "OnCreditPurchasePaymentSettled", + "signature": "func (h *creditPurchaseTestHandler) OnCreditPurchasePaymentSettled(ctx context.Context, input creditpurchase.PaymentEventInput) (ledgertransaction.GroupReference, error)", + "line": 122 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (h *creditPurchaseTestHandler) Reset()", + "line": 130 + }, + { + "kind": "struct", + "name": "usageBasedTestHandler", + "signature": "type usageBasedTestHandler struct", + "line": 136 + }, + { + "kind": "func", + "name": "newUsageBasedTestHandler", + "signature": "func newUsageBasedTestHandler() *usageBasedTestHandler", + "line": 144 + }, + { + "kind": "func", + "name": "OnInvoiceUsageAccrued", + "signature": "func (h *usageBasedTestHandler) OnInvoiceUsageAccrued(ctx context.Context, input usagebased.OnInvoiceUsageAccruedInput) (ledgertransaction.GroupReference, error)", + "line": 148 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (h *usageBasedTestHandler) OnPaymentAuthorized(ctx context.Context, input usagebased.OnPaymentAuthorizedInput) (ledgertransaction.GroupReference, error)", + "line": 156 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (h *usageBasedTestHandler) OnPaymentSettled(ctx context.Context, input usagebased.OnPaymentSettledInput) (ledgertransaction.GroupReference, error)", + "line": 164 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccrued", + "signature": "func (h *usageBasedTestHandler) OnCreditsOnlyUsageAccrued(ctx context.Context, input usagebased.CreditsOnlyUsageAccruedInput) (creditrealization.CreateAllocationInputs, error)", + "line": 172 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccruedCorrection", + "signature": "func (h *usageBasedTestHandler) OnCreditsOnlyUsageAccruedCorrection(ctx context.Context, input usagebased.CreditsOnlyUsageAccruedCorrectionInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 180 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (h *usageBasedTestHandler) Reset()", + "line": 188 + }, + { + "kind": "func", + "name": "newCappedCreditAllocator", + "signature": "func newCappedCreditAllocator(availableCredits float64) (func(ctx context.Context, input usagebased.CreditsOnlyUsageAccruedInput) (creditrealization.CreateAllocationInputs, error), *alpacadecimal.Decimal)", + "line": 220 + } + ], + "line_count": 270 + }, + "openmeter/billing/charges/service/helpers.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "chargesByTypeResult", + "signature": "type chargesByTypeResult struct", + "line": 16 + }, + { + "kind": "func", + "name": "chargesByType", + "signature": "func chargesByType(in charges.Charges) (chargesByTypeResult, error)", + "line": 22 + }, + { + "kind": "interface", + "name": "InvocableCharge", + "signature": "type InvocableCharge interface", + "line": 60 + }, + { + "kind": "func", + "name": "newInvocableCharges", + "signature": "func (s *service) newInvocableCharges(si charges.ChargeSearchItems) (map[string]InvocableCharge, error)", + "line": 67 + }, + { + "kind": "struct", + "name": "flatFeeInvocableCharge", + "signature": "type flatFeeInvocableCharge struct", + "line": 94 + }, + { + "kind": "func", + "name": "TriggerPatch", + "signature": "func (c *flatFeeInvocableCharge) TriggerPatch(ctx context.Context, patch meta.Patch) (TriggerPatchResult, error)", + "line": 99 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c *flatFeeInvocableCharge) GetChargeID() meta.ChargeID", + "line": 115 + }, + { + "kind": "struct", + "name": "usageBasedInvocableCharge", + "signature": "type usageBasedInvocableCharge struct", + "line": 121 + }, + { + "kind": "func", + "name": "TriggerPatch", + "signature": "func (c *usageBasedInvocableCharge) TriggerPatch(ctx context.Context, patch meta.Patch) (TriggerPatchResult, error)", + "line": 126 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c *usageBasedInvocableCharge) GetChargeID() meta.ChargeID", + "line": 142 + } + ], + "line_count": 144 + }, + "openmeter/billing/charges/service/invoicable_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestInvoicableCharges", + "signature": "func TestInvoicableCharges(t *testing.T)", + "line": 36 + }, + { + "kind": "struct", + "name": "InvoicableChargesTestSuite", + "signature": "type InvoicableChargesTestSuite struct", + "line": 40 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *InvoicableChargesTestSuite) SetupSuite()", + "line": 44 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *InvoicableChargesTestSuite) TearDownTest()", + "line": 48 + }, + { + "kind": "func", + "name": "TestFlatFeeGatheringPreviewPopulatesTotalsWithoutRealizationRun", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeGatheringPreviewPopulatesTotalsWithoutRealizationRun()", + "line": 52 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringPreviewPopulatesTotalsWithoutRealizationRun", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedGatheringPreviewPopulatesTotalsWithoutRealizationRun()", + "line": 130 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceImmutableProration", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditThenInvoiceImmutableProration()", + "line": 217 + }, + { + "kind": "func", + "name": "runFlatFeeCreditThenInvoiceImmutableProrationScenario", + "signature": "func runFlatFeeCreditThenInvoiceImmutableProrationScenario(s *BaseSuite, expectReplacementGatheringLine bool)", + "line": 235 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceZeroAmountCreatesNoGatheringLine", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditThenInvoiceZeroAmountCreatesNoGatheringLine()", + "line": 385 + }, + { + "kind": "func", + "name": "TestFlatFeePartialCreditRealizations", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeePartialCreditRealizations()", + "line": 436 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceInAdvanceWithPromotionalCredits", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditThenInvoiceInAdvanceWithPromotionalCredits()", + "line": 710 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceFullyCreditedDoesNotAccrueInvoiceUsage", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditThenInvoiceFullyCreditedDoesNotAccrueInvoiceUsage()", + "line": 861 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceZeroAmountNonZeroChargesAccruesInvoiceUsage", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditThenInvoiceZeroAmountNonZeroChargesAccruesInvoiceUsage()", + "line": 986 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyLifecycle", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreditOnlyLifecycle()", + "line": 1117 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyLifecycleVolumeTieredCorrection", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreditOnlyLifecycleVolumeTieredCorrection()", + "line": 1444 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceLifecycle", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreditThenInvoiceLifecycle()", + "line": 1712 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceFullyCreditedDoesNotAccrueInvoiceUsage", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreditThenInvoiceFullyCreditedDoesNotAccrueInvoiceUsage()", + "line": 2010 + }, + { + "kind": "func", + "name": "TestUsageBasedCreateImmediatelyActive", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreateImmediatelyActive()", + "line": 2200 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceDirectPaidFlow", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreditThenInvoiceDirectPaidFlow()", + "line": 2270 + }, + { + "kind": "func", + "name": "TestUsageBasedCreateImmediatelyFinal", + "signature": "func (s *InvoicableChargesTestSuite) TestUsageBasedCreateImmediatelyFinal()", + "line": 2416 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyLifecycle", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditOnlyLifecycle()", + "line": 2530 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyCreateImmediatelyFinal", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditOnlyCreateImmediatelyFinal()", + "line": 2693 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyInArrearsActivatesAtServiceStartAndAllocatesAtInvoiceAt", + "signature": "func (s *InvoicableChargesTestSuite) TestFlatFeeCreditOnlyInArrearsActivatesAtServiceStartAndAllocatesAtInvoiceAt()", + "line": 2775 + }, + { + "kind": "func", + "name": "mustAdvanceFlatFeeCharges", + "signature": "func (s *InvoicableChargesTestSuite) mustAdvanceFlatFeeCharges(ctx context.Context, customerID customer.CustomerID) charges.Charges", + "line": 2866 + }, + { + "kind": "func", + "name": "mustAdvanceSingleUsageBasedCharge", + "signature": "func (s *InvoicableChargesTestSuite) mustAdvanceSingleUsageBasedCharge(ctx context.Context, customerID customer.CustomerID) *usagebased.Charge", + "line": 2885 + }, + { + "kind": "func", + "name": "mustGetUsageBasedChargeByID", + "signature": "func (s *InvoicableChargesTestSuite) mustGetUsageBasedChargeByID(chargeID meta.ChargeID) usagebased.Charge", + "line": 2906 + }, + { + "kind": "func", + "name": "mustGetUsageBasedChargeByIDWithDetailedLines", + "signature": "func (s *InvoicableChargesTestSuite) mustGetUsageBasedChargeByIDWithDetailedLines(chargeID meta.ChargeID) usagebased.Charge", + "line": 2916 + }, + { + "kind": "func", + "name": "mustGetFlatFeeChargeByIDWithDetailedLines", + "signature": "func (s *InvoicableChargesTestSuite) mustGetFlatFeeChargeByIDWithDetailedLines(chargeID meta.ChargeID) flatfee.Charge", + "line": 2934 + }, + { + "kind": "func", + "name": "mustGetFlatFeeChargeWithExpands", + "signature": "func mustGetFlatFeeChargeWithExpands(s *BaseSuite, chargeID meta.ChargeID, expands meta.Expands) flatfee.Charge", + "line": 2952 + }, + { + "kind": "func", + "name": "activeGatheringLinesForCharge", + "signature": "func activeGatheringLinesForCharge(s *BaseSuite, namespace, customerID, chargeID string) []billing.GatheringLine", + "line": 2967 + }, + { + "kind": "struct", + "name": "assertFlatFeeCreditThenInvoiceLineAndRunInput", + "signature": "type assertFlatFeeCreditThenInvoiceLineAndRunInput struct", + "line": 2993 + }, + { + "kind": "func", + "name": "assertFlatFeeCreditThenInvoiceLineAndRun", + "signature": "func (s *InvoicableChargesTestSuite) assertFlatFeeCreditThenInvoiceLineAndRun(input assertFlatFeeCreditThenInvoiceLineAndRunInput) billing.LineID", + "line": 3003 + } + ], + "line_count": 3062 + }, + "openmeter/billing/charges/service/invoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "processorByType", + "signature": "type processorByType struct", + "line": 32 + }, + { + "kind": "func", + "name": "handleStandardInvoiceUpdate", + "signature": "func (s *service) handleStandardInvoiceUpdate(ctx context.Context, invoice billing.StandardInvoice) error", + "line": 38 + }, + { + "kind": "func", + "name": "handleChargeEvent", + "signature": "func (s *service) handleChargeEvent(ctx context.Context, invoice billing.StandardInvoice, processorByType processorByType) error", + "line": 93 + }, + { + "kind": "struct", + "name": "standardInvoiceEventHandler", + "signature": "type standardInvoiceEventHandler struct", + "line": 155 + }, + { + "kind": "func", + "name": "PostUpdate", + "signature": "func (h *standardInvoiceEventHandler) PostUpdate(ctx context.Context, invoice *billing.StandardInvoice) error", + "line": 160 + }, + { + "kind": "func", + "name": "PostCreate", + "signature": "func (h *standardInvoiceEventHandler) PostCreate(ctx context.Context, invoice *billing.StandardInvoice) error", + "line": 164 + }, + { + "kind": "struct", + "name": "standardLineWithCharge", + "signature": "type standardLineWithCharge struct", + "line": 169 + }, + { + "kind": "func", + "name": "getLinesWithChargesForStandardInvoice", + "signature": "func (s *service) getLinesWithChargesForStandardInvoice(ctx context.Context, ns string, invoice billing.StandardInvoice) ([]standardLineWithCharge, error)", + "line": 174 + } + ], + "line_count": 243 + }, + "openmeter/billing/charges/service/lineage_test.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageTestSuite", + "signature": "type CreditRealizationLineageTestSuite struct", + "line": 41 + }, + { + "kind": "func", + "name": "TestCreditRealizationLineage", + "signature": "func TestCreditRealizationLineage(t *testing.T)", + "line": 45 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CreditRealizationLineageTestSuite) SetupSuite()", + "line": 49 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *CreditRealizationLineageTestSuite) TearDownTest()", + "line": 53 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyAllocationCreatesInitialLineages", + "signature": "func (s *CreditRealizationLineageTestSuite) TestFlatFeeCreditOnlyAllocationCreatesInitialLineages()", + "line": 57 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyAllocationCreatesInitialLineage", + "signature": "func (s *CreditRealizationLineageTestSuite) TestUsageBasedCreditOnlyAllocationCreatesInitialLineage()", + "line": 137 + }, + { + "kind": "func", + "name": "TestBackfillAdvanceLineageSegmentsFiltersByAdvanceFeatures", + "signature": "func (s *CreditRealizationLineageTestSuite) TestBackfillAdvanceLineageSegmentsFiltersByAdvanceFeatures()", + "line": 227 + }, + { + "kind": "func", + "name": "TestLockAdvanceLineagesForBackfillRequiresTransaction", + "signature": "func (s *CreditRealizationLineageTestSuite) TestLockAdvanceLineagesForBackfillRequiresTransaction()", + "line": 268 + }, + { + "kind": "func", + "name": "TestLockAdvanceLineagesForBackfillWorksInTransaction", + "signature": "func (s *CreditRealizationLineageTestSuite) TestLockAdvanceLineagesForBackfillWorksInTransaction()", + "line": 281 + }, + { + "kind": "func", + "name": "TestPersistCorrectionLineageSegmentsConsumesBackfilledBeforeUncovered", + "signature": "func (s *CreditRealizationLineageTestSuite) TestPersistCorrectionLineageSegmentsConsumesBackfilledBeforeUncovered()", + "line": 303 + }, + { + "kind": "func", + "name": "TestCreateSegmentRejectsInvalidInput", + "signature": "func (s *CreditRealizationLineageTestSuite) TestCreateSegmentRejectsInvalidInput()", + "line": 387 + }, + { + "kind": "func", + "name": "mustAdvanceSingleUsageBasedCharge", + "signature": "func (s *CreditRealizationLineageTestSuite) mustAdvanceSingleUsageBasedCharge(ctx context.Context, customerID customer.CustomerID) *usagebased.Charge", + "line": 403 + }, + { + "kind": "func", + "name": "mustListLineages", + "signature": "func (s *CreditRealizationLineageTestSuite) mustListLineages(namespace string, realizationIDs []string) map[string]*entdb.CreditRealizationLineage", + "line": 422 + }, + { + "kind": "func", + "name": "createAdvanceLineageForBackfill", + "signature": "func (s *CreditRealizationLineageTestSuite) createAdvanceLineageForBackfill(ctx context.Context, namespace string, customerID string, advanceFeatures []string, amount alpacadecimal.Decimal) string", + "line": 442 + }, + { + "kind": "func", + "name": "activeLineageSegments", + "signature": "func (s *CreditRealizationLineageTestSuite) activeLineageSegments(ctx context.Context, lineageID string) []*entdb.CreditRealizationLineageSegment", + "line": 478 + }, + { + "kind": "func", + "name": "assertInitialLineage", + "signature": "func (s *CreditRealizationLineageTestSuite) assertInitialLineage(lineage *entdb.CreditRealizationLineage, chargeID string, amount alpacadecimal.Decimal, originKind creditrealization.LineageOriginKind, state creditrealization.LineageSegmentState)", + "line": 493 + }, + { + "kind": "func", + "name": "realizationIDs", + "signature": "func realizationIDs(realizations creditrealization.Realizations) []string", + "line": 506 + } + ], + "line_count": 510 + }, + "openmeter/billing/charges/service/list.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomersToAdvance", + "signature": "func (s *service) ListCustomersToAdvance(ctx context.Context, input charges.ListCustomersToAdvanceInput) (pagination.Result[customer.CustomerID], error)", + "line": 12 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (s *service) ListCharges(ctx context.Context, input charges.ListChargesInput) (pagination.Result[charges.Charge], error)", + "line": 22 + } + ], + "line_count": 44 + }, + "openmeter/billing/charges/service/patch.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ApplyPatches", + "signature": "func (s *service) ApplyPatches(ctx context.Context, input charges.ApplyPatchesInput) error", + "line": 15 + }, + { + "kind": "func", + "name": "applyPatches", + "signature": "func (s *service) applyPatches(ctx context.Context, customerID customer.CustomerID, patchesByChargeID map[string]charges.Patch) error", + "line": 40 + } + ], + "line_count": 88 + }, + "openmeter/billing/charges/service/recognition.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "recognizeCustomerEarnings", + "signature": "func (s *service) recognizeCustomerEarnings(ctx context.Context, customerID customer.CustomerID, currencies ...currencyx.Code) error", + "line": 17 + }, + { + "kind": "func", + "name": "recognizeCreatedCreditPurchaseEarnings", + "signature": "func (s *service) recognizeCreatedCreditPurchaseEarnings(ctx context.Context, created charges.Charges) error", + "line": 31 + } + ], + "line_count": 64 + }, + "openmeter/billing/charges/service/service.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 21 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 57 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*service, error)", + "line": 103 + }, + { + "kind": "func", + "name": "validateNamespaceLockdown", + "signature": "func (s *service) validateNamespaceLockdown(namespace string) error", + "line": 131 + } + ], + "line_count": 141 + }, + "openmeter/billing/charges/service/subscription.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (s *service) UpdateSubscriptionItemID(ctx context.Context, charge charges.Charge, newSubscriptionItemID string) (charges.Charge, error)", + "line": 13 + } + ], + "line_count": 58 + }, + "openmeter/billing/charges/service/taxcode_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestTaxCodePersistence", + "signature": "func TestTaxCodePersistence(t *testing.T)", + "line": 33 + }, + { + "kind": "struct", + "name": "TaxCodePersistenceTestSuite", + "signature": "type TaxCodePersistenceTestSuite struct", + "line": 37 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *TaxCodePersistenceTestSuite) SetupSuite()", + "line": 41 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *TaxCodePersistenceTestSuite) TearDownTest()", + "line": 45 + }, + { + "kind": "func", + "name": "TestFlatFeeChargePersistsTaxConfig", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeChargePersistsTaxConfig()", + "line": 51 + }, + { + "kind": "func", + "name": "TestUsageBasedChargePersistsTaxConfig", + "signature": "func (s *TaxCodePersistenceTestSuite) TestUsageBasedChargePersistsTaxConfig()", + "line": 147 + }, + { + "kind": "func", + "name": "TestCreditPurchaseChargePersistsTaxConfig", + "signature": "func (s *TaxCodePersistenceTestSuite) TestCreditPurchaseChargePersistsTaxConfig()", + "line": 245 + }, + { + "kind": "func", + "name": "TestCreditPurchaseInvoiceSettlementPropagatesTaxConfigToGatheringLine", + "signature": "func (s *TaxCodePersistenceTestSuite) TestCreditPurchaseInvoiceSettlementPropagatesTaxConfigToGatheringLine()", + "line": 347 + }, + { + "kind": "func", + "name": "TestCreditPurchaseInvoiceSettlementNilTaxConfigGetsDefaultCreditGrantTaxCodeStamped", + "signature": "func (s *TaxCodePersistenceTestSuite) TestCreditPurchaseInvoiceSettlementNilTaxConfigGetsDefaultCreditGrantTaxCodeStamped()", + "line": 476 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyHandlerReceivesTaxConfig", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeCreditOnlyHandlerReceivesTaxConfig()", + "line": 540 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyHandlerReceivesTaxConfig", + "signature": "func (s *TaxCodePersistenceTestSuite) TestUsageBasedCreditOnlyHandlerReceivesTaxConfig()", + "line": 612 + }, + { + "kind": "func", + "name": "TestFlatFeeInvoiceSettlementPopulatesStripeCodeOnStandardInvoice", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeInvoiceSettlementPopulatesStripeCodeOnStandardInvoice()", + "line": 695 + }, + { + "kind": "func", + "name": "TestTaxConfigInListCharges", + "signature": "func (s *TaxCodePersistenceTestSuite) TestTaxConfigInListCharges()", + "line": 793 + }, + { + "kind": "func", + "name": "TestFlatFeeInvoiceSettlementPropagatesTaxConfigToGatheringLine", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeInvoiceSettlementPropagatesTaxConfigToGatheringLine()", + "line": 927 + }, + { + "kind": "func", + "name": "TestFlatFeeInvoiceSettlementNilTaxConfigGetsDefaultInvoicingTaxCodeStampedOnGatheringLine", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeInvoiceSettlementNilTaxConfigGetsDefaultInvoicingTaxCodeStampedOnGatheringLine()", + "line": 998 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoicePropagatesTaxConfigToGatheringLine", + "signature": "func (s *TaxCodePersistenceTestSuite) TestUsageBasedCreditThenInvoicePropagatesTaxConfigToGatheringLine()", + "line": 1057 + }, + { + "kind": "func", + "name": "TestUsageBasedInvoiceSettlementPopulatesStripeCodeOnStandardInvoice", + "signature": "func (s *TaxCodePersistenceTestSuite) TestUsageBasedInvoiceSettlementPopulatesStripeCodeOnStandardInvoice()", + "line": 1130 + }, + { + "kind": "func", + "name": "TestFlatFeeBehaviorOnlyTaxConfigGetsDefaultTaxCodeStamped", + "signature": "func (s *TaxCodePersistenceTestSuite) TestFlatFeeBehaviorOnlyTaxConfigGetsDefaultTaxCodeStamped()", + "line": 1239 + }, + { + "kind": "func", + "name": "TestUsageBasedBehaviorOnlyTaxConfigGetsDefaultTaxCodeStamped", + "signature": "func (s *TaxCodePersistenceTestSuite) TestUsageBasedBehaviorOnlyTaxConfigGetsDefaultTaxCodeStamped()", + "line": 1315 + }, + { + "kind": "func", + "name": "createTestTaxCode", + "signature": "func (s *TaxCodePersistenceTestSuite) createTestTaxCode(ctx context.Context, ns, key string) taxcode.TaxCode", + "line": 1387 + }, + { + "kind": "func", + "name": "createTestTaxCodeWithStripeMapping", + "signature": "func (s *TaxCodePersistenceTestSuite) createTestTaxCodeWithStripeMapping(ctx context.Context, ns, key, stripeCode string) taxcode.TaxCode", + "line": 1398 + } + ], + "line_count": 1410 + }, + "openmeter/billing/charges/service/truncation_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestChargeTimestampTruncation", + "signature": "func TestChargeTimestampTruncation(t *testing.T)", + "line": 24 + }, + { + "kind": "struct", + "name": "ChargeTimestampTruncationTestSuite", + "signature": "type ChargeTimestampTruncationTestSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *ChargeTimestampTruncationTestSuite) SetupSuite()", + "line": 32 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *ChargeTimestampTruncationTestSuite) TearDownTest()", + "line": 36 + }, + { + "kind": "func", + "name": "TestCreateTruncatesFlatFeeIntentAndProrationInputs", + "signature": "func (s *ChargeTimestampTruncationTestSuite) TestCreateTruncatesFlatFeeIntentAndProrationInputs()", + "line": 40 + }, + { + "kind": "func", + "name": "TestUsageBasedAdvanceTruncatesPersistedCalculationTimestamps", + "signature": "func (s *ChargeTimestampTruncationTestSuite) TestUsageBasedAdvanceTruncatesPersistedCalculationTimestamps()", + "line": 98 + } + ], + "line_count": 174 + }, + "openmeter/billing/charges/service/usagebased_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestUsageBasedCharges", + "signature": "func TestUsageBasedCharges(t *testing.T)", + "line": 23 + }, + { + "kind": "struct", + "name": "UsageBasedChargesTestSuite", + "signature": "type UsageBasedChargesTestSuite struct", + "line": 27 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *UsageBasedChargesTestSuite) SetupSuite()", + "line": 31 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *UsageBasedChargesTestSuite) TearDownTest()", + "line": 35 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoicePartialInvoiceLifecycle", + "signature": "func (s *UsageBasedChargesTestSuite) TestUsageBasedCreditThenInvoicePartialInvoiceLifecycle()", + "line": 39 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoicePendingPartialInvoiceBlocksFinalRealizationUntilApproval", + "signature": "func (s *UsageBasedChargesTestSuite) TestUsageBasedCreditThenInvoicePendingPartialInvoiceBlocksFinalRealizationUntilApproval()", + "line": 497 + }, + { + "kind": "func", + "name": "mustGetUsageBasedChargeByID", + "signature": "func (s *UsageBasedChargesTestSuite) mustGetUsageBasedChargeByID(chargeID meta.ChargeID) usagebased.Charge", + "line": 703 + } + ], + "line_count": 711 + }, + "openmeter/billing/charges/statemachine/machine.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Status", + "signature": "type Status interface", + "line": 16 + } + ], + "line_count": 199 + }, + "openmeter/billing/charges/statemachine/machine_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s fakeStatus) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "fakeBase", + "signature": "type fakeBase struct", + "line": 31 + }, + { + "kind": "struct", + "name": "fakeCharge", + "signature": "type fakeCharge struct", + "line": 35 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c fakeCharge) GetChargeID() meta.ChargeID", + "line": 42 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (c fakeCharge) GetStatus() fakeStatus", + "line": 46 + }, + { + "kind": "func", + "name": "WithStatus", + "signature": "func (c fakeCharge) WithStatus(status fakeStatus) fakeCharge", + "line": 50 + }, + { + "kind": "func", + "name": "GetBase", + "signature": "func (c fakeCharge) GetBase() fakeBase", + "line": 55 + }, + { + "kind": "func", + "name": "WithBase", + "signature": "func (c fakeCharge) WithBase(base fakeBase) fakeCharge", + "line": 59 + }, + { + "kind": "func", + "name": "newFakeCharge", + "signature": "func newFakeCharge(status fakeStatus) fakeCharge", + "line": 64 + }, + { + "kind": "func", + "name": "newTestMachine", + "signature": "func newTestMachine(\n\tt *testing.T,\n\tcharge fakeCharge,\n\tupdateBase func(ctx context.Context, base fakeBase) (fakeBase, error),\n\trefetch func(ctx context.Context, chargeID meta.ChargeID) (fakeCharge, error),\n) *Machine[fakeCharge, fakeBase, fakeStatus]", + "line": 78 + }, + { + "kind": "func", + "name": "TestMachine_FireAndActivateUpdatesStatus", + "signature": "func TestMachine_FireAndActivateUpdatesStatus(t *testing.T)", + "line": 98 + }, + { + "kind": "func", + "name": "TestMachine_FireAndActivateReturnsUnsupportedOperationWhenTriggerCannotFire", + "signature": "func TestMachine_FireAndActivateReturnsUnsupportedOperationWhenTriggerCannotFire(t *testing.T)", + "line": 128 + }, + { + "kind": "func", + "name": "TestMachine_AdvanceUntilStateStableReturnsNilWhenAlreadyStable", + "signature": "func TestMachine_AdvanceUntilStateStableReturnsNilWhenAlreadyStable(t *testing.T)", + "line": 151 + }, + { + "kind": "func", + "name": "TestMachine_AdvanceUntilStateStableWalksTransitionsAndPersistsReturnedBase", + "signature": "func TestMachine_AdvanceUntilStateStableWalksTransitionsAndPersistsReturnedBase(t *testing.T)", + "line": 177 + }, + { + "kind": "func", + "name": "TestMachine_AdvanceUntilStateStablePersistsPostActivationBase", + "signature": "func TestMachine_AdvanceUntilStateStablePersistsPostActivationBase(t *testing.T)", + "line": 209 + }, + { + "kind": "func", + "name": "TestMachine_FireAndActivatePropagatesActivationErrors", + "signature": "func TestMachine_FireAndActivatePropagatesActivationErrors(t *testing.T)", + "line": 244 + }, + { + "kind": "func", + "name": "TestMachine_FireAndActivateDoesNotPersistWhenActivationFails", + "signature": "func TestMachine_FireAndActivateDoesNotPersistWhenActivationFails(t *testing.T)", + "line": 271 + }, + { + "kind": "func", + "name": "TestMachine_FireAndActivateFailsFastOnInvalidTargetStatus", + "signature": "func TestMachine_FireAndActivateFailsFastOnInvalidTargetStatus(t *testing.T)", + "line": 303 + }, + { + "kind": "func", + "name": "TestMachine_RefetchChargeReplacesTheInMemoryCharge", + "signature": "func TestMachine_RefetchChargeReplacesTheInMemoryCharge(t *testing.T)", + "line": 328 + }, + { + "kind": "func", + "name": "TestMachine_AdvanceUntilStateStablePropagatesPersistenceErrors", + "signature": "func TestMachine_AdvanceUntilStateStablePropagatesPersistenceErrors(t *testing.T)", + "line": 355 + } + ], + "line_count": 380 + }, + "openmeter/billing/charges/testutils/handlers.go": { + "header": "\t\"context\"\n\t\"github.com/oklog/ulid/v2\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "MockHandlers", + "signature": "type MockHandlers struct", + "line": 16 + }, + { + "kind": "func", + "name": "NewMockHandlers", + "signature": "func NewMockHandlers() MockHandlers", + "line": 22 + }, + { + "kind": "struct", + "name": "mockFlatFeeHandler", + "signature": "type mockFlatFeeHandler struct", + "line": 30 + }, + { + "kind": "struct", + "name": "mockCreditPurchaseHandler", + "signature": "type mockCreditPurchaseHandler struct", + "line": 74 + }, + { + "kind": "struct", + "name": "mockUsageBasedHandler", + "signature": "type mockUsageBasedHandler struct", + "line": 94 + }, + { + "kind": "func", + "name": "newMockLedgerTransactionGroupReference", + "signature": "func newMockLedgerTransactionGroupReference() ledgertransaction.GroupReference", + "line": 130 + } + ], + "line_count": 134 + }, + "openmeter/billing/charges/testutils/service.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 50 + }, + { + "kind": "struct", + "name": "Services", + "signature": "type Services struct", + "line": 88 + }, + { + "kind": "func", + "name": "NewServices", + "signature": "func NewServices(t testing.TB, config Config) (*Services, error)", + "line": 96 + } + ], + "line_count": 254 + }, + "openmeter/billing/charges/usagebased/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/creditrealization\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 13 + }, + { + "kind": "interface", + "name": "ChargeAdapter", + "signature": "type ChargeAdapter interface", + "line": 23 + }, + { + "kind": "interface", + "name": "RealizationRunAdapter", + "signature": "type RealizationRunAdapter interface", + "line": 32 + }, + { + "kind": "interface", + "name": "RealizationRunCreditAllocationAdapter", + "signature": "type RealizationRunCreditAllocationAdapter interface", + "line": 39 + }, + { + "kind": "interface", + "name": "RealizationRunInvoiceUsageAdapter", + "signature": "type RealizationRunInvoiceUsageAdapter interface", + "line": 43 + }, + { + "kind": "interface", + "name": "RealizationRunPaymentAdapter", + "signature": "type RealizationRunPaymentAdapter interface", + "line": 47 + } + ], + "line_count": 50 + }, + "openmeter/billing/charges/usagebased/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (usagebased.Adapter, error)", + "line": 39 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 53 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 59 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 69 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 79 + } + ], + "line_count": 81 + }, + "openmeter/billing/charges/usagebased/adapter/charge.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateCharge", + "signature": "func (a *adapter) UpdateCharge(ctx context.Context, charge usagebased.ChargeBase) (usagebased.ChargeBase, error)", + "line": 24 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (a *adapter) UpdateSubscriptionItemID(ctx context.Context, charge usagebased.Charge, newSubscriptionItemID string) (usagebased.Charge, error)", + "line": 64 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (a *adapter) DeleteCharge(ctx context.Context, charge usagebased.Charge) error", + "line": 94 + }, + { + "kind": "func", + "name": "CreateCharges", + "signature": "func (a *adapter) CreateCharges(ctx context.Context, in usagebased.CreateChargesInput) ([]usagebased.Charge, error)", + "line": 135 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (a *adapter) GetByIDs(ctx context.Context, input usagebased.GetByIDsInput) ([]usagebased.Charge, error)", + "line": 159 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (a *adapter) GetByID(ctx context.Context, input usagebased.GetByIDInput) (usagebased.Charge, error)", + "line": 204 + }, + { + "kind": "func", + "name": "expandRealizations", + "signature": "func expandRealizations(query *db.ChargeUsageBasedQuery, expands meta.Expands) *db.ChargeUsageBasedQuery", + "line": 243 + }, + { + "kind": "func", + "name": "buildCreateUsageBasedCharge", + "signature": "func (a *adapter) buildCreateUsageBasedCharge(ctx context.Context, ns string, intent usagebased.CreateIntent) (*db.ChargeUsageBasedCreate, error)", + "line": 257 + } + ], + "line_count": 278 + }, + "openmeter/billing/charges/usagebased/adapter/creditallocation.go": { + "header": "\t\"context\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/creditrealization\"", + "symbols": [ + { + "kind": "func", + "name": "CreateRunCreditRealization", + "signature": "func (a *adapter) CreateRunCreditRealization(ctx context.Context, runID usagebased.RealizationRunID, creditAllocations creditrealization.CreateInputs) (creditrealization.Realizations, error)", + "line": 16 + } + ], + "line_count": 47 + }, + "openmeter/billing/charges/usagebased/adapter/detailedline.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "FetchDetailedLines", + "signature": "func (a *adapter) FetchDetailedLines(ctx context.Context, charge usagebased.Charge) (usagebased.Charge, error)", + "line": 23 + }, + { + "kind": "func", + "name": "UpsertRunDetailedLines", + "signature": "func (a *adapter) UpsertRunDetailedLines(ctx context.Context, chargeID chargesmeta.ChargeID, runID usagebased.RealizationRunID, lines usagebased.DetailedLines) error", + "line": 96 + }, + { + "kind": "func", + "name": "buildDetailedLineCreate", + "signature": "func buildDetailedLineCreate(db *entdb.Client, chargeID chargesmeta.ChargeID, runID usagebased.RealizationRunID, line usagebased.DetailedLine) (*entdb.ChargeUsageBasedRunDetailedLineCreate, error)", + "line": 196 + }, + { + "kind": "func", + "name": "mapDetailedLineFromDB", + "signature": "func mapDetailedLineFromDB(dbLine *entdb.ChargeUsageBasedRunDetailedLine) (usagebased.DetailedLine, error)", + "line": 218 + } + ], + "line_count": 226 + }, + "openmeter/billing/charges/usagebased/adapter/detailedline_test.go": { + "header": "\t\"log/slog\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestDetailedLineAdapter", + "signature": "func TestDetailedLineAdapter(t *testing.T)", + "line": 32 + }, + { + "kind": "struct", + "name": "DetailedLineAdapterSuite", + "signature": "type DetailedLineAdapterSuite struct", + "line": 36 + }, + { + "kind": "struct", + "name": "newDetailedLineInput", + "signature": "type newDetailedLineInput struct", + "line": 44 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *DetailedLineAdapterSuite) SetupSuite()", + "line": 55 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *DetailedLineAdapterSuite) TearDownSuite()", + "line": 86 + }, + { + "kind": "func", + "name": "TestUpsertRunDetailedLinesReplacesAndSoftDeletesByChildUniqueReferenceID", + "signature": "func (s *DetailedLineAdapterSuite) TestUpsertRunDetailedLinesReplacesAndSoftDeletesByChildUniqueReferenceID()", + "line": 92 + }, + { + "kind": "func", + "name": "TestFetchDetailedLinesUsesDetailedLinesPresentFlag", + "signature": "func (s *DetailedLineAdapterSuite) TestFetchDetailedLinesUsesDetailedLinesPresentFlag()", + "line": 259 + }, + { + "kind": "func", + "name": "TestFetchDetailedLinesDoesNotRepairDetailedLinesPresentFlagWhenRowsExist", + "signature": "func (s *DetailedLineAdapterSuite) TestFetchDetailedLinesDoesNotRepairDetailedLinesPresentFlagWhenRowsExist()", + "line": 299 + }, + { + "kind": "func", + "name": "TestFetchDetailedLinesUsesPersistedDetailedLinesPresentFlag", + "signature": "func (s *DetailedLineAdapterSuite) TestFetchDetailedLinesUsesPersistedDetailedLinesPresentFlag()", + "line": 341 + }, + { + "kind": "func", + "name": "TestFetchDetailedLinesClearsStaleDetailedLinesWhenRunMetadataIsMissing", + "signature": "func (s *DetailedLineAdapterSuite) TestFetchDetailedLinesClearsStaleDetailedLinesWhenRunMetadataIsMissing()", + "line": 384 + }, + { + "kind": "func", + "name": "TestExpandRealizationsExcludesDeletedRuns", + "signature": "func (s *DetailedLineAdapterSuite) TestExpandRealizationsExcludesDeletedRuns()", + "line": 414 + }, + { + "kind": "func", + "name": "createChargeWithRun", + "signature": "func (s *DetailedLineAdapterSuite) createChargeWithRun(namespace string) (usagebased.Charge, usagebased.RealizationRunBase, timeutil.ClosedPeriod)", + "line": 444 + }, + { + "kind": "func", + "name": "createCustomer", + "signature": "func (s *DetailedLineAdapterSuite) createCustomer(namespace string) string", + "line": 505 + }, + { + "kind": "func", + "name": "createFeature", + "signature": "func (s *DetailedLineAdapterSuite) createFeature(namespace, featureID string)", + "line": 517 + }, + { + "kind": "func", + "name": "newDetailedLine", + "signature": "func (s *DetailedLineAdapterSuite) newDetailedLine(input newDetailedLineInput) usagebased.DetailedLine", + "line": 529 + } + ], + "line_count": 555 + }, + "openmeter/billing/charges/usagebased/adapter/invoicedusage.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/invoicedusage\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"", + "symbols": [ + { + "kind": "func", + "name": "CreateRunInvoicedUsage", + "signature": "func (a *adapter) CreateRunInvoicedUsage(ctx context.Context, runID usagebased.RealizationRunID, usage invoicedusage.AccruedUsage) (invoicedusage.AccruedUsage, error)", + "line": 13 + } + ], + "line_count": 35 + }, + "openmeter/billing/charges/usagebased/adapter/mapper.go": { + "header": "\t\"cmp\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "MapChargeFromDB", + "signature": "func MapChargeFromDB(entity *entdb.ChargeUsageBased, expands meta.Expands) (usagebased.Charge, error)", + "line": 22 + }, + { + "kind": "func", + "name": "MapChargeBaseFromDB", + "signature": "func MapChargeBaseFromDB(entity *entdb.ChargeUsageBased) usagebased.ChargeBase", + "line": 41 + }, + { + "kind": "func", + "name": "MapRealizationRunsFromDB", + "signature": "func MapRealizationRunsFromDB(entity *entdb.ChargeUsageBased) (usagebased.RealizationRuns, error)", + "line": 65 + }, + { + "kind": "func", + "name": "MapRealizationRunBaseFromDB", + "signature": "func MapRealizationRunBaseFromDB(dbRun *entdb.ChargeUsageBasedRuns) usagebased.RealizationRunBase", + "line": 91 + }, + { + "kind": "func", + "name": "MapRealizationRunFromDB", + "signature": "func MapRealizationRunFromDB(dbRun *entdb.ChargeUsageBasedRuns) (usagebased.RealizationRun, error)", + "line": 112 + } + ], + "line_count": 145 + }, + "openmeter/billing/charges/usagebased/adapter/payment.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/models/payment\"", + "symbols": [ + { + "kind": "func", + "name": "CreateRunPayment", + "signature": "func (a *adapter) CreateRunPayment(ctx context.Context, runID usagebased.RealizationRunID, in payment.InvoicedCreate) (payment.Invoiced, error)", + "line": 15 + }, + { + "kind": "func", + "name": "UpdateRunPayment", + "signature": "func (a *adapter) UpdateRunPayment(ctx context.Context, in payment.Invoiced) (payment.Invoiced, error)", + "line": 43 + } + ], + "line_count": 61 + }, + "openmeter/billing/charges/usagebased/adapter/realizationrun.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"", + "symbols": [ + { + "kind": "func", + "name": "CreateRealizationRun", + "signature": "func (a *adapter) CreateRealizationRun(ctx context.Context, chargeID meta.ChargeID, input usagebased.CreateRealizationRunInput) (usagebased.RealizationRunBase, error)", + "line": 15 + }, + { + "kind": "func", + "name": "UpdateRealizationRun", + "signature": "func (a *adapter) UpdateRealizationRun(ctx context.Context, input usagebased.UpdateRealizationRunInput) (usagebased.RealizationRunBase, error)", + "line": 50 + } + ], + "line_count": 96 + }, + "openmeter/billing/charges/usagebased/charge.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeBase", + "signature": "type ChargeBase struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ChargeBase) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (c ChargeBase) GetChargeID() meta.ChargeID", + "line": 53 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (c ChargeBase) GetCustomerID() customer.CustomerID", + "line": 60 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (c ChargeBase) GetCurrency() currencyx.Code", + "line": 67 + }, + { + "kind": "func", + "name": "ErrorAttributes", + "signature": "func (c ChargeBase) ErrorAttributes() models.Attributes", + "line": 71 + }, + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 81 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (c Charge) GetStatus() Status", + "line": 90 + }, + { + "kind": "func", + "name": "WithStatus", + "signature": "func (c Charge) WithStatus(status Status) Charge", + "line": 94 + }, + { + "kind": "func", + "name": "GetBase", + "signature": "func (c Charge) GetBase() ChargeBase", + "line": 99 + }, + { + "kind": "func", + "name": "WithBase", + "signature": "func (c Charge) WithBase(base ChargeBase) Charge", + "line": 103 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Charge) Validate() error", + "line": 108 + }, + { + "kind": "func", + "name": "GetCurrentRealizationRun", + "signature": "func (c Charge) GetCurrentRealizationRun() (RealizationRun, error)", + "line": 122 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (c Charge) GetCustomerID() customer.CustomerID", + "line": 130 + }, + { + "kind": "func", + "name": "GetFeatureKeyOrID", + "signature": "func (c Charge) GetFeatureKeyOrID() ref.IDOrKey", + "line": 137 + }, + { + "kind": "func", + "name": "ResolveFeatureMeter", + "signature": "func (c Charge) ResolveFeatureMeter(featureMeters feature.FeatureMeters) (feature.FeatureMeter, error)", + "line": 160 + }, + { + "kind": "func", + "name": "GetFeatureKeysOrIDs", + "signature": "func (c Charges) GetFeatureKeysOrIDs() []ref.IDOrKey", + "line": 179 + }, + { + "kind": "struct", + "name": "Intent", + "signature": "type Intent struct", + "line": 185 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (i Intent) Normalized() Intent", + "line": 198 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Intent) Validate() error", + "line": 205 + }, + { + "kind": "struct", + "name": "State", + "signature": "type State struct", + "line": 235 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (s State) Normalized() State", + "line": 242 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s State) Validate() error", + "line": 248 + }, + { + "kind": "struct", + "name": "Expands", + "signature": "type Expands struct", + "line": 266 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e Expands) Validate() error", + "line": 270 + } + ], + "line_count": 280 + }, + "openmeter/billing/charges/usagebased/const.go": { + "header": "const (\n\tInternalCollectionPeriod time.Duration = time.Minute\n)", + "symbols": [], + "line_count": 7 + }, + "openmeter/billing/charges/usagebased/detailedline.go": { + "header": "\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "DetailedLine", + "signature": "type DetailedLine struct", + "line": 19 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLine) Clone() DetailedLine", + "line": 26 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLine) Validate() error", + "line": 36 + }, + { + "kind": "func", + "name": "NewDetailedLinesFromBilling", + "signature": "func NewDetailedLinesFromBilling(\n\tintent Intent,\n\tdefaultServicePeriod timeutil.ClosedPeriod,\n\tlines billingrating.DetailedLines,\n) DetailedLines", + "line": 56 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLines) Clone() DetailedLines", + "line": 93 + }, + { + "kind": "func", + "name": "Sort", + "signature": "func (l DetailedLines) Sort()", + "line": 99 + }, + { + "kind": "func", + "name": "compareDetailedLineForOutput", + "signature": "func compareDetailedLineForOutput(a, b DetailedLine) int", + "line": 103 + }, + { + "kind": "func", + "name": "SumTotals", + "signature": "func (l DetailedLines) SumTotals() totals.Totals", + "line": 129 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLines) Validate() error", + "line": 139 + } + ], + "line_count": 149 + }, + "openmeter/billing/charges/usagebased/detailedline_uniqueref.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "StripServicePeriodFromUniqueReferenceID", + "signature": "func (l DetailedLines) StripServicePeriodFromUniqueReferenceID() (DetailedLines, error)", + "line": 16 + }, + { + "kind": "func", + "name": "WithServicePeriodFromUniqueReferenceID", + "signature": "func (l DetailedLines) WithServicePeriodFromUniqueReferenceID() (DetailedLines, error)", + "line": 31 + }, + { + "kind": "func", + "name": "stripServicePeriodFromUniqueReferenceID", + "signature": "func stripServicePeriodFromUniqueReferenceID(id string) (string, error)", + "line": 43 + }, + { + "kind": "func", + "name": "formatServicePeriodInUniqueReferenceID", + "signature": "func formatServicePeriodInUniqueReferenceID(id string, servicePeriod timeutil.ClosedPeriod) string", + "line": 57 + } + ], + "line_count": 64 + }, + "openmeter/billing/charges/usagebased/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [], + "line_count": 35 + }, + "openmeter/billing/charges/usagebased/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditsOnlyUsageAccruedInput", + "signature": "type CreditsOnlyUsageAccruedInput struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreditsOnlyUsageAccruedInput) Validate() error", + "line": 26 + }, + { + "kind": "struct", + "name": "CreditsOnlyUsageAccruedCorrectionInput", + "signature": "type CreditsOnlyUsageAccruedCorrectionInput struct", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreditsOnlyUsageAccruedCorrectionInput) Validate() error", + "line": 57 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreditsOnlyUsageAccruedCorrectionInput) ValidateWith(currencyCalculator currencyx.Calculator) error", + "line": 75 + }, + { + "kind": "struct", + "name": "OnInvoiceUsageAccruedInput", + "signature": "type OnInvoiceUsageAccruedInput struct", + "line": 89 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i OnInvoiceUsageAccruedInput) Validate() error", + "line": 97 + }, + { + "kind": "struct", + "name": "RunEventInput", + "signature": "type RunEventInput struct", + "line": 123 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RunEventInput) Validate() error", + "line": 129 + }, + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 152 + }, + { + "kind": "struct", + "name": "UnimplementedHandler", + "signature": "type UnimplementedHandler struct", + "line": 169 + }, + { + "kind": "func", + "name": "OnInvoiceUsageAccrued", + "signature": "func (h UnimplementedHandler) OnInvoiceUsageAccrued(ctx context.Context, input OnInvoiceUsageAccruedInput) (ledgertransaction.GroupReference, error)", + "line": 173 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (h UnimplementedHandler) OnPaymentAuthorized(ctx context.Context, input OnPaymentAuthorizedInput) (ledgertransaction.GroupReference, error)", + "line": 177 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (h UnimplementedHandler) OnPaymentSettled(ctx context.Context, input OnPaymentSettledInput) (ledgertransaction.GroupReference, error)", + "line": 181 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccrued", + "signature": "func (h UnimplementedHandler) OnCreditsOnlyUsageAccrued(ctx context.Context, input CreditsOnlyUsageAccruedInput) (creditrealization.CreateAllocationInputs, error)", + "line": 185 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccruedCorrection", + "signature": "func (h UnimplementedHandler) OnCreditsOnlyUsageAccruedCorrection(ctx context.Context, input CreditsOnlyUsageAccruedCorrectionInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 189 + } + ], + "line_count": 191 + }, + "openmeter/billing/charges/usagebased/rating.go": { + "header": "\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "RateableIntent", + "signature": "type RateableIntent struct", + "line": 16 + }, + { + "kind": "func", + "name": "GetMeteredQuantity", + "signature": "func (r RateableIntent) GetMeteredQuantity() (*alpacadecimal.Decimal, error)", + "line": 24 + }, + { + "kind": "func", + "name": "GetMeteredPreLinePeriodQuantity", + "signature": "func (r RateableIntent) GetMeteredPreLinePeriodQuantity() (*alpacadecimal.Decimal, error)", + "line": 28 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (r RateableIntent) GetPrice() *productcatalog.Price", + "line": 32 + }, + { + "kind": "func", + "name": "GetServicePeriod", + "signature": "func (r RateableIntent) GetServicePeriod() timeutil.ClosedPeriod", + "line": 36 + }, + { + "kind": "func", + "name": "GetFeatureKey", + "signature": "func (r RateableIntent) GetFeatureKey() string", + "line": 40 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (r RateableIntent) GetCurrency() currencyx.Code", + "line": 44 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (r RateableIntent) GetName() string", + "line": 48 + }, + { + "kind": "func", + "name": "GetRateCardDiscounts", + "signature": "func (r RateableIntent) GetRateCardDiscounts() billing.Discounts", + "line": 52 + }, + { + "kind": "func", + "name": "GetStandardLineDiscounts", + "signature": "func (r RateableIntent) GetStandardLineDiscounts() billing.StandardLineDiscounts", + "line": 74 + }, + { + "kind": "func", + "name": "IsProgressivelyBilled", + "signature": "func (r RateableIntent) IsProgressivelyBilled() bool", + "line": 79 + }, + { + "kind": "func", + "name": "GetProgressivelyBilledServicePeriod", + "signature": "func (r RateableIntent) GetProgressivelyBilledServicePeriod() (timeutil.ClosedPeriod, error)", + "line": 84 + }, + { + "kind": "func", + "name": "GetPreviouslyBilledAmount", + "signature": "func (r RateableIntent) GetPreviouslyBilledAmount() (alpacadecimal.Decimal, error)", + "line": 88 + }, + { + "kind": "func", + "name": "GetCreditsApplied", + "signature": "func (r RateableIntent) GetCreditsApplied() billing.CreditsApplied", + "line": 92 + } + ], + "line_count": 94 + }, + "openmeter/billing/charges/usagebased/ratingengine.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (e RatingEngine) Values() []string", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e RatingEngine) Validate() error", + "line": 29 + } + ], + "line_count": 35 + }, + "openmeter/billing/charges/usagebased/realizationrun.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (t RealizationRunType) Values() []string", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t RealizationRunType) Validate() error", + "line": 38 + }, + { + "kind": "func", + "name": "IsVoidedBillingHistory", + "signature": "func (t RealizationRunType) IsVoidedBillingHistory() bool", + "line": 47 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RealizationRunID) Validate() error", + "line": 53 + }, + { + "kind": "struct", + "name": "BillingMeteredQuantity", + "signature": "type BillingMeteredQuantity struct", + "line": 62 + }, + { + "kind": "struct", + "name": "CreateRealizationRunInput", + "signature": "type CreateRealizationRunInput struct", + "line": 71 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (r CreateRealizationRunInput) Normalized() CreateRealizationRunInput", + "line": 83 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r CreateRealizationRunInput) Validate() error", + "line": 90 + }, + { + "kind": "struct", + "name": "UpdateRealizationRunInput", + "signature": "type UpdateRealizationRunInput struct", + "line": 132 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (r UpdateRealizationRunInput) Normalized() UpdateRealizationRunInput", + "line": 144 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r UpdateRealizationRunInput) Validate() error", + "line": 153 + }, + { + "kind": "struct", + "name": "RealizationRunBase", + "signature": "type RealizationRunBase struct", + "line": 197 + }, + { + "kind": "func", + "name": "Normalized", + "signature": "func (r RealizationRunBase) Normalized() RealizationRunBase", + "line": 216 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRunBase) Validate() error", + "line": 223 + }, + { + "kind": "struct", + "name": "RealizationRun", + "signature": "type RealizationRun struct", + "line": 277 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRun) Validate() error", + "line": 287 + }, + { + "kind": "func", + "name": "IsVoidedBillingHistory", + "signature": "func (r RealizationRun) IsVoidedBillingHistory() bool", + "line": 323 + }, + { + "kind": "func", + "name": "BisectByTimestamp", + "signature": "func (r RealizationRuns) BisectByTimestamp(chargeIntentServicePeriod timeutil.ClosedPeriod, at time.Time) (before RealizationRuns, containingOrAfter RealizationRuns)", + "line": 348 + }, + { + "kind": "func", + "name": "MapToBillingMeteredQuantity", + "signature": "func (r RealizationRuns) MapToBillingMeteredQuantity(currentRun RealizationRun) (BillingMeteredQuantity, error)", + "line": 379 + }, + { + "kind": "func", + "name": "WithoutVoidedBillingHistory", + "signature": "func (r RealizationRuns) WithoutVoidedBillingHistory() RealizationRuns", + "line": 424 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RealizationRuns) Validate() error", + "line": 430 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func (r RealizationRuns) Sum() totals.Totals", + "line": 441 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (r RealizationRuns) GetByID(id string) (RealizationRun, error)", + "line": 447 + }, + { + "kind": "func", + "name": "GetByLineID", + "signature": "func (r RealizationRuns) GetByLineID(lineID string) (RealizationRun, error)", + "line": 456 + }, + { + "kind": "func", + "name": "Without", + "signature": "func (r RealizationRuns) Without(id RealizationRunID) RealizationRuns", + "line": 467 + }, + { + "kind": "func", + "name": "SetRealizationRun", + "signature": "func (r *RealizationRuns) SetRealizationRun(updatedRun RealizationRun) error", + "line": 473 + } + ], + "line_count": 481 + }, + "openmeter/billing/charges/usagebased/realizationrun_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestRealizationRuns_MapToBillingMeteredQuantity", + "signature": "func TestRealizationRuns_MapToBillingMeteredQuantity(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestRealizationRunType_IsVoidedBillingHistory", + "signature": "func TestRealizationRunType_IsVoidedBillingHistory(t *testing.T)", + "line": 152 + }, + { + "kind": "func", + "name": "TestRealizationRun_InvalidUnsupportedCreditNoteKeepsInitialType", + "signature": "func TestRealizationRun_InvalidUnsupportedCreditNoteKeepsInitialType(t *testing.T)", + "line": 158 + }, + { + "kind": "func", + "name": "TestRealizationRuns_SumSkipsVoidedBillingHistory", + "signature": "func TestRealizationRuns_SumSkipsVoidedBillingHistory(t *testing.T)", + "line": 172 + }, + { + "kind": "func", + "name": "TestRealizationRuns_GetByLineID", + "signature": "func TestRealizationRuns_GetByLineID(t *testing.T)", + "line": 201 + }, + { + "kind": "func", + "name": "TestRealizationRuns_BisectByTimestamp", + "signature": "func TestRealizationRuns_BisectByTimestamp(t *testing.T)", + "line": 228 + }, + { + "kind": "func", + "name": "newRealizationRunForBillingMeteredQuantityTest", + "signature": "func newRealizationRunForBillingMeteredQuantityTest(id string, typ RealizationRunType, servicePeriodTo time.Time, meteredQuantity int64) RealizationRun", + "line": 287 + } + ], + "line_count": 310 + }, + "openmeter/billing/charges/usagebased/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 15 + }, + { + "kind": "interface", + "name": "UsageBasedService", + "signature": "type UsageBasedService interface", + "line": 20 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "ChargeWithGatheringLine", + "signature": "type ChargeWithGatheringLine struct", + "line": 54 + }, + { + "kind": "struct", + "name": "CreateIntent", + "signature": "type CreateIntent struct", + "line": 59 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateIntent) Validate() error", + "line": 65 + }, + { + "kind": "struct", + "name": "CreateChargesInput", + "signature": "type CreateChargesInput struct", + "line": 83 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateChargesInput) Validate() error", + "line": 88 + }, + { + "kind": "struct", + "name": "GetByIDsInput", + "signature": "type GetByIDsInput struct", + "line": 104 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDsInput) Validate() error", + "line": 110 + }, + { + "kind": "struct", + "name": "AdvanceChargeInput", + "signature": "type AdvanceChargeInput struct", + "line": 124 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AdvanceChargeInput) Validate() error", + "line": 130 + }, + { + "kind": "struct", + "name": "GetByIDInput", + "signature": "type GetByIDInput struct", + "line": 151 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetByIDInput) Validate() error", + "line": 156 + }, + { + "kind": "struct", + "name": "GetCurrentTotalsInput", + "signature": "type GetCurrentTotalsInput struct", + "line": 169 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetCurrentTotalsInput) Validate() error", + "line": 173 + }, + { + "kind": "struct", + "name": "GetCurrentTotalsResult", + "signature": "type GetCurrentTotalsResult struct", + "line": 181 + }, + { + "kind": "func", + "name": "validateExpands", + "signature": "func validateExpands(expands meta.Expands) error", + "line": 186 + } + ], + "line_count": 200 + }, + "openmeter/billing/charges/usagebased/service/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, input usagebased.CreateInput) ([]usagebased.ChargeWithGatheringLine, error)", + "line": 20 + }, + { + "kind": "func", + "name": "gatheringLineFromUsageBasedCharge", + "signature": "func gatheringLineFromUsageBasedCharge(charge usagebased.Charge) (usagebased.ChargeWithGatheringLine, error)", + "line": 84 + }, + { + "kind": "func", + "name": "gatheringLineFromUsageBasedChargeForPeriod", + "signature": "func gatheringLineFromUsageBasedChargeForPeriod(charge usagebased.Charge, servicePeriod timeutil.ClosedPeriod, invoiceAt time.Time) (usagebased.ChargeWithGatheringLine, error)", + "line": 88 + } + ], + "line_count": 152 + }, + "openmeter/billing/charges/usagebased/service/creditheninvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditThenInvoiceStateMachine", + "signature": "type CreditThenInvoiceStateMachine struct", + "line": 24 + }, + { + "kind": "func", + "name": "NewCreditThenInvoiceStateMachine", + "signature": "func NewCreditThenInvoiceStateMachine(config StateMachineConfig) (*CreditThenInvoiceStateMachine, error)", + "line": 28 + }, + { + "kind": "func", + "name": "configureStates", + "signature": "func (s *CreditThenInvoiceStateMachine) configureStates()", + "line": 51 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) DeleteCharge(ctx context.Context, _ meta.PatchDeletePolicy) error", + "line": 237 + }, + { + "kind": "func", + "name": "ExtendCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) ExtendCharge(ctx context.Context, patch meta.PatchExtend) error", + "line": 275 + }, + { + "kind": "func", + "name": "ShrinkCharge", + "signature": "func (s *CreditThenInvoiceStateMachine) ShrinkCharge(_ context.Context, patch meta.PatchShrink) error", + "line": 316 + }, + { + "kind": "func", + "name": "UnsupportedExtendOperation", + "signature": "func (s *CreditThenInvoiceStateMachine) UnsupportedExtendOperation(_ context.Context, _ meta.PatchExtend) error", + "line": 335 + }, + { + "kind": "func", + "name": "UnsupportedShrinkOperation", + "signature": "func (s *CreditThenInvoiceStateMachine) UnsupportedShrinkOperation(_ context.Context, _ meta.PatchShrink) error", + "line": 341 + }, + { + "kind": "func", + "name": "handleRunsOnShrink", + "signature": "func (s *CreditThenInvoiceStateMachine) handleRunsOnShrink() error", + "line": 347 + }, + { + "kind": "func", + "name": "updateStateAfterShrink", + "signature": "func (s *CreditThenInvoiceStateMachine) updateStateAfterShrink(\n\trunsToKeep usagebased.RealizationRuns,\n\treplacementGatheringLinePeriod timeutil.ClosedPeriod,\n\tnewServicePeriodTo time.Time,\n)", + "line": 422 + }, + { + "kind": "func", + "name": "handleFinalRunOnExtend", + "signature": "func (s *CreditThenInvoiceStateMachine) handleFinalRunOnExtend(ctx context.Context, oldServicePeriod timeutil.ClosedPeriod) (mo.Option[timeutil.ClosedPeriod], error)", + "line": 472 + }, + { + "kind": "struct", + "name": "invoiceCreatedInput", + "signature": "type invoiceCreatedInput struct", + "line": 549 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i invoiceCreatedInput) Validate() error", + "line": 555 + }, + { + "kind": "func", + "name": "startInvoiceCreatedRun", + "signature": "func (s *CreditThenInvoiceStateMachine) startInvoiceCreatedRun(\n\tctx context.Context,\n\tinput invoiceCreatedInput,\n\trunType usagebased.RealizationRunType,\n) error", + "line": 571 + }, + { + "kind": "func", + "name": "StartPartialInvoiceRun", + "signature": "func (s *CreditThenInvoiceStateMachine) StartPartialInvoiceRun(ctx context.Context, input invoiceCreatedInput) error", + "line": 611 + }, + { + "kind": "func", + "name": "StartFinalInvoiceRun", + "signature": "func (s *CreditThenInvoiceStateMachine) StartFinalInvoiceRun(ctx context.Context, input invoiceCreatedInput) error", + "line": 615 + }, + { + "kind": "func", + "name": "resolveInvoiceCreatedTrigger", + "signature": "func resolveInvoiceCreatedTrigger(charge usagebased.Charge, billedPeriod timeutil.ClosedPeriod) meta.Trigger", + "line": 619 + }, + { + "kind": "func", + "name": "AreAllInvoicedRunsSettled", + "signature": "func (s *CreditThenInvoiceStateMachine) AreAllInvoicedRunsSettled() bool", + "line": 627 + }, + { + "kind": "func", + "name": "SnapshotInvoiceUsage", + "signature": "func (s *CreditThenInvoiceStateMachine) SnapshotInvoiceUsage(ctx context.Context) error", + "line": 631 + }, + { + "kind": "func", + "name": "FinalizeInvoiceRun", + "signature": "func (s *CreditThenInvoiceStateMachine) FinalizeInvoiceRun(ctx context.Context, input billing.StandardLineWithInvoiceHeader) error", + "line": 697 + }, + { + "kind": "func", + "name": "getRunForLine", + "signature": "func getRunForLine(charge usagebased.Charge, lineID string) (usagebased.RealizationRun, error)", + "line": 738 + } + ], + "line_count": 746 + }, + "openmeter/billing/charges/usagebased/service/creditheninvoice_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestUnsupportedExtendOperation", + "signature": "func TestUnsupportedExtendOperation(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestUnsupportedExtendOperationIsConfiguredForFinalRealizationBoundary", + "signature": "func TestUnsupportedExtendOperationIsConfiguredForFinalRealizationBoundary(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "TestUnsupportedShrinkOperation", + "signature": "func TestUnsupportedShrinkOperation(t *testing.T)", + "line": 75 + }, + { + "kind": "func", + "name": "TestUnsupportedShrinkOperationIsConfiguredForImmutableBoundaries", + "signature": "func TestUnsupportedShrinkOperationIsConfiguredForImmutableBoundaries(t *testing.T)", + "line": 105 + }, + { + "kind": "func", + "name": "TestShrinkChargeKeepsCurrentRunStateWhenCurrentRunSurvivesShrink", + "signature": "func TestShrinkChargeKeepsCurrentRunStateWhenCurrentRunSurvivesShrink(t *testing.T)", + "line": 137 + }, + { + "kind": "func", + "name": "TestShrinkChargeMovesToAwaitingPaymentWhenKeptRunCoversNewEnd", + "signature": "func TestShrinkChargeMovesToAwaitingPaymentWhenKeptRunCoversNewEnd(t *testing.T)", + "line": 191 + }, + { + "kind": "func", + "name": "TestShrinkChargeMovesToFinalWhenKeptRunCoversNewEndAndSettlementIsComplete", + "signature": "func TestShrinkChargeMovesToFinalWhenKeptRunCoversNewEndAndSettlementIsComplete(t *testing.T)", + "line": 237 + }, + { + "kind": "func", + "name": "newCreditThenInvoiceStateMachineForTest", + "signature": "func newCreditThenInvoiceStateMachineForTest(t *testing.T, status usagebased.Status) *CreditThenInvoiceStateMachine", + "line": 289 + }, + { + "kind": "func", + "name": "newCreditThenInvoiceStateMachineWithChargeForTest", + "signature": "func newCreditThenInvoiceStateMachineWithChargeForTest(t *testing.T, charge usagebased.Charge) *CreditThenInvoiceStateMachine", + "line": 327 + }, + { + "kind": "func", + "name": "newUsageBasedRunForShrinkTest", + "signature": "func newUsageBasedRunForShrinkTest(id string, typ usagebased.RealizationRunType, servicePeriodTo time.Time) usagebased.RealizationRun", + "line": 353 + }, + { + "kind": "func", + "name": "mustNewPatchShrink", + "signature": "func mustNewPatchShrink(t *testing.T, newServicePeriodTo time.Time) meta.PatchShrink", + "line": 373 + }, + { + "kind": "func", + "name": "TestStartInvoiceCreatedRunValidatesInput", + "signature": "func TestStartInvoiceCreatedRunValidatesInput(t *testing.T)", + "line": 387 + }, + { + "kind": "func", + "name": "TestResolveInvoiceCreatedTrigger", + "signature": "func TestResolveInvoiceCreatedTrigger(t *testing.T)", + "line": 404 + } + ], + "line_count": 434 + }, + "openmeter/billing/charges/usagebased/service/creditsonly.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditsOnlyStateMachine", + "signature": "type CreditsOnlyStateMachine struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewCreditsOnlyStateMachine", + "signature": "func NewCreditsOnlyStateMachine(config StateMachineConfig) (*CreditsOnlyStateMachine, error)", + "line": 22 + }, + { + "kind": "func", + "name": "configureStates", + "signature": "func (s *CreditsOnlyStateMachine) configureStates()", + "line": 45 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (s *CreditsOnlyStateMachine) ClearAdvanceAfter(ctx context.Context) error", + "line": 116 + }, + { + "kind": "func", + "name": "DeleteCharge", + "signature": "func (s *CreditsOnlyStateMachine) DeleteCharge(ctx context.Context, policy meta.PatchDeletePolicy) error", + "line": 121 + }, + { + "kind": "func", + "name": "StartFinalRealizationRun", + "signature": "func (s *CreditsOnlyStateMachine) StartFinalRealizationRun(ctx context.Context) error", + "line": 146 + }, + { + "kind": "func", + "name": "FinalizeRealizationRun", + "signature": "func (s *CreditsOnlyStateMachine) FinalizeRealizationRun(ctx context.Context) error", + "line": 171 + } + ], + "line_count": 242 + }, + "openmeter/billing/charges/usagebased/service/currenttotals.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "GetCurrentTotals", + "signature": "func (s *service) GetCurrentTotals(ctx context.Context, input usagebased.GetCurrentTotalsInput) (usagebased.GetCurrentTotalsResult, error)", + "line": 15 + } + ], + "line_count": 68 + }, + "openmeter/billing/charges/usagebased/service/get.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (s *service) GetByIDs(ctx context.Context, input usagebased.GetByIDsInput) ([]usagebased.Charge, error)", + "line": 29 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (s *service) GetByID(ctx context.Context, input usagebased.GetByIDInput) (usagebased.Charge, error)", + "line": 51 + }, + { + "kind": "func", + "name": "expandChargesUsage", + "signature": "func (s *service) expandChargesUsage(ctx context.Context, namespace string, charges usagebased.Charges) (usagebased.Charges, error)", + "line": 77 + } + ], + "line_count": 192 + }, + "openmeter/billing/charges/usagebased/service/lineengine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "LineEngine", + "signature": "type LineEngine struct", + "line": 23 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (e *LineEngine) GetLineEngineType() billing.LineEngineType", + "line": 27 + }, + { + "kind": "func", + "name": "IsLineBillableAsOf", + "signature": "func (e *LineEngine) IsLineBillableAsOf(_ context.Context, input billing.IsLineBillableAsOfInput) (bool, error)", + "line": 31 + }, + { + "kind": "func", + "name": "SplitGatheringLine", + "signature": "func (e *LineEngine) SplitGatheringLine(_ context.Context, input billing.SplitGatheringLineInput) (billing.SplitGatheringLineResult, error)", + "line": 39 + }, + { + "kind": "func", + "name": "BuildStandardInvoiceLines", + "signature": "func (e *LineEngine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 104 + }, + { + "kind": "func", + "name": "BuildStandardLinesForGatheringPreview", + "signature": "func (e *LineEngine) BuildStandardLinesForGatheringPreview(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 120 + }, + { + "kind": "func", + "name": "buildGatheringPreviewRun", + "signature": "func (e *LineEngine) buildGatheringPreviewRun(ctx context.Context, charge usagebased.Charge, stdLine *billing.StandardLine) (usagebasedrun.BuildCreditThenInvoiceGatheringPreviewRunResult, error)", + "line": 164 + }, + { + "kind": "func", + "name": "OnStandardInvoiceCreated", + "signature": "func (e *LineEngine) OnStandardInvoiceCreated(ctx context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error)", + "line": 201 + }, + { + "kind": "func", + "name": "OnCollectionCompleted", + "signature": "func (e *LineEngine) OnCollectionCompleted(ctx context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error)", + "line": 269 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (e *LineEngine) OnMutableStandardLinesDeleted(ctx context.Context, input billing.OnMutableStandardLinesDeletedInput) error", + "line": 315 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (e *LineEngine) OnUnsupportedCreditNote(ctx context.Context, input billing.OnUnsupportedCreditNoteInput) error", + "line": 382 + }, + { + "kind": "func", + "name": "markMutableStandardLineRunDeleted", + "signature": "func (e *LineEngine) markMutableStandardLineRunDeleted(\n\tctx context.Context,\n\tcharge usagebased.Charge,\n\trun usagebased.RealizationRun,\n\tdeletedAt time.Time,\n) (usagebased.Charge, error)", + "line": 429 + }, + { + "kind": "func", + "name": "getChargesForStandardLineEvent", + "signature": "func (e *LineEngine) getChargesForStandardLineEvent(ctx context.Context, input billing.StandardLineEventInput, expands meta.Expands, operation string) (map[string]usagebased.Charge, error)", + "line": 463 + }, + { + "kind": "func", + "name": "OnInvoiceIssued", + "signature": "func (e *LineEngine) OnInvoiceIssued(ctx context.Context, input billing.OnInvoiceIssuedInput) error", + "line": 498 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (e *LineEngine) OnPaymentAuthorized(ctx context.Context, input billing.OnPaymentAuthorizedInput) error", + "line": 516 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (e *LineEngine) OnPaymentSettled(ctx context.Context, input billing.OnPaymentSettledInput) error", + "line": 528 + }, + { + "kind": "struct", + "name": "fireLineTriggerInput", + "signature": "type fireLineTriggerInput struct", + "line": 540 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i fireLineTriggerInput) Validate() error", + "line": 547 + }, + { + "kind": "func", + "name": "fireLineTrigger", + "signature": "func (e *LineEngine) fireLineTrigger(ctx context.Context, input fireLineTriggerInput) error", + "line": 563 + }, + { + "kind": "func", + "name": "newStateMachineForStandardLine", + "signature": "func (e *LineEngine) newStateMachineForStandardLine(ctx context.Context, stdLine *billing.StandardLine) (StateMachine, error)", + "line": 603 + }, + { + "kind": "func", + "name": "isUsageBasedSplitPeriodEmpty", + "signature": "func isUsageBasedSplitPeriodEmpty(line billing.GatheringLine) (bool, error)", + "line": 632 + } + ], + "line_count": 643 + }, + "openmeter/billing/charges/usagebased/service/lineengine_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestLineEngineIsLineBillableAsOfSupportsPartialBillablePeriod", + "signature": "func TestLineEngineIsLineBillableAsOfSupportsPartialBillablePeriod(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestLineEngineSplitGatheringLineKeepsChargeGroupingWithoutChildReferences", + "signature": "func TestLineEngineSplitGatheringLineKeepsChargeGroupingWithoutChildReferences(t *testing.T)", + "line": 40 + }, + { + "kind": "func", + "name": "billingtestFeatureMeters", + "signature": "func billingtestFeatureMeters() feature.FeatureMeters", + "line": 89 + } + ], + "line_count": 91 + }, + "openmeter/billing/charges/usagebased/service/linemapper.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "populateUsageBasedStandardLineFromRun", + "signature": "func populateUsageBasedStandardLineFromRun(stdLine *billing.StandardLine, run usagebased.RealizationRun, runs usagebased.RealizationRuns) error", + "line": 16 + }, + { + "kind": "func", + "name": "mapUsageBasedDetailedLines", + "signature": "func mapUsageBasedDetailedLines(\n\tstdLine *billing.StandardLine,\n\trun usagebased.RealizationRun,\n\tcurrencyCalculator currencyx.Calculator,\n) (billing.DetailedLines, error)", + "line": 78 + } + ], + "line_count": 109 + }, + "openmeter/billing/charges/usagebased/service/linemapper_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestPopulateUsageBasedStandardLineFromRunProjectsDetailsAndCredits", + "signature": "func TestPopulateUsageBasedStandardLineFromRunProjectsDetailsAndCredits(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestPopulateUsageBasedStandardLineFromRunAppliesUsageDiscount", + "signature": "func TestPopulateUsageBasedStandardLineFromRunAppliesUsageDiscount(t *testing.T)", + "line": 120 + }, + { + "kind": "func", + "name": "TestPopulateUsageBasedStandardLineFromRunRequiresExpandedDetails", + "signature": "func TestPopulateUsageBasedStandardLineFromRunRequiresExpandedDetails(t *testing.T)", + "line": 186 + }, + { + "kind": "func", + "name": "newUsageBasedStandardLineForTest", + "signature": "func newUsageBasedStandardLineForTest(period timeutil.ClosedPeriod) *billing.StandardLine", + "line": 213 + }, + { + "kind": "func", + "name": "newUsageBasedDetailedLineForTest", + "signature": "func newUsageBasedDetailedLineForTest(ref string, period timeutil.ClosedPeriod, amount alpacadecimal.Decimal) usagebased.DetailedLine", + "line": 240 + } + ], + "line_count": 262 + }, + "openmeter/billing/charges/usagebased/service/payments.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "recordRunPaymentsInput", + "signature": "type recordRunPaymentsInput struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i recordRunPaymentsInput) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "recordRunPayments", + "signature": "func (e *LineEngine) recordRunPayments(ctx context.Context, input recordRunPaymentsInput) error", + "line": 36 + }, + { + "kind": "func", + "name": "recordPaymentAuthorized", + "signature": "func (e *LineEngine) recordPaymentAuthorized(ctx context.Context, stateMachine StateMachine, line billing.StandardLine, invoice billing.StandardInvoice) error", + "line": 55 + }, + { + "kind": "func", + "name": "recordPaymentSettled", + "signature": "func (e *LineEngine) recordPaymentSettled(ctx context.Context, stateMachine StateMachine, line billing.StandardLine, invoice billing.StandardInvoice) error", + "line": 76 + }, + { + "kind": "func", + "name": "areAllInvoicedRunsSettled", + "signature": "func areAllInvoicedRunsSettled(charge usagebased.Charge) bool", + "line": 123 + } + ], + "line_count": 149 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/README.md": { + "header": "# Delta Rating\n\nDelta rating is the temporary production detailed-line engine for usage-based\ncharges. It rates the latest cumulative meter snapshot, subtracts every detailed\nline already booked for the charge, and books the remaining delta on the current\nrun's service period.\n\nThe engine intentionally does not preserve the original service period of\ncorrections. That keeps downstream invoicing in the simpler \"current invoice\nperiod only\" shape while the period-preserving engine and invoicing support for\ncorrections evolve.\n\nRepricing is expected with non-linear prices. For example, a volume-tiered price\ncan rate `15` units at one unit amount and `16` units at a different unit\namount for the whole quantity. Delta rating handles this by emitting a reversal\nfor the previously booked price component and a current line for the newly rated\nprice component, both on the current run's service period.\n\n## Algorithm\n", + "symbols": [], + "line_count": 108 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/base_test.go": { + "header": "\t\"strconv\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "deltaRatingTestPeriodsValue", + "signature": "type deltaRatingTestPeriodsValue struct", + "line": 18 + }, + { + "kind": "struct", + "name": "deltaRatingTestCase", + "signature": "type deltaRatingTestCase struct", + "line": 24 + }, + { + "kind": "struct", + "name": "deltaRatingPhase", + "signature": "type deltaRatingPhase struct", + "line": 30 + }, + { + "kind": "func", + "name": "runDeltaRatingTestCase", + "signature": "func runDeltaRatingTestCase(t *testing.T, tc deltaRatingTestCase)", + "line": 37 + }, + { + "kind": "func", + "name": "deltaRatingTestPeriods", + "signature": "func deltaRatingTestPeriods() deltaRatingTestPeriodsValue", + "line": 75 + } + ], + "line_count": 94 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/dynamic_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestDynamicDeltaNoUsageProducesNoLines", + "signature": "func TestDynamicDeltaNoUsageProducesNoLines(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestDynamicDeltaInitialUsageCreatesCurrentPeriodUsageLine", + "signature": "func TestDynamicDeltaInitialUsageCreatesCurrentPeriodUsageLine(t *testing.T)", + "line": 41 + }, + { + "kind": "func", + "name": "TestDynamicDeltaAdditionalUsageRepricesCumulativeAmount", + "signature": "func TestDynamicDeltaAdditionalUsageRepricesCumulativeAmount(t *testing.T)", + "line": 82 + }, + { + "kind": "func", + "name": "TestDynamicDeltaNoAdditionalUsageAfterPriorBookingProducesNoLines", + "signature": "func TestDynamicDeltaNoAdditionalUsageAfterPriorBookingProducesNoLines(t *testing.T)", + "line": 156 + }, + { + "kind": "func", + "name": "TestDynamicDeltaRoundingCorrection", + "signature": "func TestDynamicDeltaRoundingCorrection(t *testing.T)", + "line": 203 + }, + { + "kind": "func", + "name": "TestDynamicDeltaMaximumSpendClampsCumulativeAmount", + "signature": "func TestDynamicDeltaMaximumSpendClampsCumulativeAmount(t *testing.T)", + "line": 277 + }, + { + "kind": "func", + "name": "TestDynamicDeltaMinimumCommitmentOnlyOnFinalPhase", + "signature": "func TestDynamicDeltaMinimumCommitmentOnlyOnFinalPhase(t *testing.T)", + "line": 356 + } + ], + "line_count": 420 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/engine.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Engine", + "signature": "type Engine struct", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(ratingService billingrating.Service) Engine", + "line": 23 + }, + { + "kind": "struct", + "name": "Input", + "signature": "type Input struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Input) Validate() error", + "line": 40 + }, + { + "kind": "struct", + "name": "CurrentPeriod", + "signature": "type CurrentPeriod struct", + "line": 56 + }, + { + "kind": "struct", + "name": "Result", + "signature": "type Result struct", + "line": 65 + }, + { + "kind": "func", + "name": "Rate", + "signature": "func (e Engine) Rate(_ context.Context, in Input) (Result, error)", + "line": 73 + } + ], + "line_count": 148 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/engine_test.go": { + "header": "\t\"strconv\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRateKeepsDetailedLineChildUniqueReferenceIDsWithoutServicePeriodSuffix", + "signature": "func TestRateKeepsDetailedLineChildUniqueReferenceIDsWithoutServicePeriodSuffix(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestRateIgnoresMinimumCommitmentForPartialRun", + "signature": "func TestRateIgnoresMinimumCommitmentForPartialRun(t *testing.T)", + "line": 84 + }, + { + "kind": "func", + "name": "TestRateSubtractsAlreadyBilledLinesAndBooksDeltaOnCurrentPeriod", + "signature": "func TestRateSubtractsAlreadyBilledLinesAndBooksDeltaOnCurrentPeriod(t *testing.T)", + "line": 115 + }, + { + "kind": "func", + "name": "TestRateGeneratesCorrectionChildUniqueReferenceIDForPreviousOnlyReversal", + "signature": "func TestRateGeneratesCorrectionChildUniqueReferenceIDForPreviousOnlyReversal(t *testing.T)", + "line": 198 + }, + { + "kind": "func", + "name": "TestRateErrorsWhenPreviousOnlyReversalDetailedLineIDIsMissing", + "signature": "func TestRateErrorsWhenPreviousOnlyReversalDetailedLineIDIsMissing(t *testing.T)", + "line": 266 + }, + { + "kind": "func", + "name": "detailedLinesBookedForDeltaTest", + "signature": "func detailedLinesBookedForDeltaTest(phaseIdx int, lines usagebased.DetailedLines) usagebased.DetailedLines", + "line": 320 + }, + { + "kind": "func", + "name": "newIntentForTest", + "signature": "func newIntentForTest(t testing.TB, servicePeriod timeutil.ClosedPeriod) usagebased.Intent", + "line": 329 + }, + { + "kind": "struct", + "name": "stubRatingService", + "signature": "type stubRatingService struct", + "line": 335 + }, + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (s *stubRatingService) ResolveBillablePeriod(in billingrating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 340 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (s *stubRatingService) GenerateDetailedLines(in billingrating.StandardLineAccessor, opts ...billingrating.GenerateDetailedLinesOption) (billingrating.GenerateDetailedLinesResult, error)", + "line": 344 + } + ], + "line_count": 347 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/package_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestPackageDeltaInitialPartialPackage", + "signature": "func TestPackageDeltaInitialPartialPackage(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestPackageDeltaUsageWithinAlreadyBilledPackageProducesNoLines", + "signature": "func TestPackageDeltaUsageWithinAlreadyBilledPackageProducesNoLines(t *testing.T)", + "line": 57 + }, + { + "kind": "func", + "name": "TestPackageDeltaCrossingPackageBoundaryBillsOnlyNewPackage", + "signature": "func TestPackageDeltaCrossingPackageBoundaryBillsOnlyNewPackage(t *testing.T)", + "line": 111 + }, + { + "kind": "func", + "name": "TestPackageDeltaMultiplePackageJumpBillsOnlyNewPackages", + "signature": "func TestPackageDeltaMultiplePackageJumpBillsOnlyNewPackages(t *testing.T)", + "line": 174 + }, + { + "kind": "func", + "name": "TestPackageDeltaUsageDecreaseWithinSamePackageProducesNoLines", + "signature": "func TestPackageDeltaUsageDecreaseWithinSamePackageProducesNoLines(t *testing.T)", + "line": 237 + }, + { + "kind": "func", + "name": "TestPackageDeltaUsageDecreaseAcrossPackageBoundaryReversesPackage", + "signature": "func TestPackageDeltaUsageDecreaseAcrossPackageBoundaryReversesPackage(t *testing.T)", + "line": 285 + }, + { + "kind": "func", + "name": "TestPackageDeltaUsageDropsToZeroReversesBookedPackage", + "signature": "func TestPackageDeltaUsageDropsToZeroReversesBookedPackage(t *testing.T)", + "line": 348 + } + ], + "line_count": 409 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/tieredgraduated_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestGraduatedTieredDeltaSameTierSubtractsNormally", + "signature": "func TestGraduatedTieredDeltaSameTierSubtractsNormally(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaCrossingTierBoundaryBooksOnlyNewTierUsage", + "signature": "func TestGraduatedTieredDeltaCrossingTierBoundaryBooksOnlyNewTierUsage(t *testing.T)", + "line": 95 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaMultipleTierJumpBooksOnlyNewTierUsage", + "signature": "func TestGraduatedTieredDeltaMultipleTierJumpBooksOnlyNewTierUsage(t *testing.T)", + "line": 187 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaUsageDecreaseWithinSameTierReversesTierQuantity", + "signature": "func TestGraduatedTieredDeltaUsageDecreaseWithinSameTierReversesTierQuantity(t *testing.T)", + "line": 290 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaUsageDecreaseAcrossTierBoundaryReversesRemovedTier", + "signature": "func TestGraduatedTieredDeltaUsageDecreaseAcrossTierBoundaryReversesRemovedTier(t *testing.T)", + "line": 371 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaFlatTierAlreadyBookedDoesNotRepeat", + "signature": "func TestGraduatedTieredDeltaFlatTierAlreadyBookedDoesNotRepeat(t *testing.T)", + "line": 474 + }, + { + "kind": "func", + "name": "TestGraduatedTieredDeltaCrossingFlatTierBoundaryBooksOnlyNewFlatComponent", + "signature": "func TestGraduatedTieredDeltaCrossingFlatTierBoundaryBooksOnlyNewFlatComponent(t *testing.T)", + "line": 572 + } + ], + "line_count": 690 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/tieredvolume_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestVolumeTieredDeltaSameUnitTierSubtractsNormally", + "signature": "func TestVolumeTieredDeltaSameUnitTierSubtractsNormally(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaUnitTierCrossingRepricesCurrentPeriod", + "signature": "func TestVolumeTieredDeltaUnitTierCrossingRepricesCurrentPeriod(t *testing.T)", + "line": 76 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaLateUsageCrossingTierBooksOnCurrentPeriod", + "signature": "func TestVolumeTieredDeltaLateUsageCrossingTierBooksOnCurrentPeriod(t *testing.T)", + "line": 154 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaFlatTierRepricing", + "signature": "func TestVolumeTieredDeltaFlatTierRepricing(t *testing.T)", + "line": 232 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaFlatTierToUnitTierTransition", + "signature": "func TestVolumeTieredDeltaFlatTierToUnitTierTransition(t *testing.T)", + "line": 303 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaFlatTierWithNoUsage", + "signature": "func TestVolumeTieredDeltaFlatTierWithNoUsage(t *testing.T)", + "line": 374 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaUnitTierWithNoUsage", + "signature": "func TestVolumeTieredDeltaUnitTierWithNoUsage(t *testing.T)", + "line": 413 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaMinimumCommitmentOnlyOnFinalPhase", + "signature": "func TestVolumeTieredDeltaMinimumCommitmentOnlyOnFinalPhase(t *testing.T)", + "line": 446 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaMaximumSpendWithTierRepricing", + "signature": "func TestVolumeTieredDeltaMaximumSpendWithTierRepricing(t *testing.T)", + "line": 520 + }, + { + "kind": "func", + "name": "TestVolumeTieredDeltaUsageDiscountWithTierRepricing", + "signature": "func TestVolumeTieredDeltaUsageDiscountWithTierRepricing(t *testing.T)", + "line": 598 + }, + { + "kind": "func", + "name": "volumeUnitTierPrice", + "signature": "func volumeUnitTierPrice() productcatalog.Price", + "line": 675 + }, + { + "kind": "func", + "name": "volumeUnitTierPriceWithCommitments", + "signature": "func volumeUnitTierPriceWithCommitments(commitments productcatalog.Commitments) productcatalog.Price", + "line": 679 + }, + { + "kind": "func", + "name": "volumeFlatTierPrice", + "signature": "func volumeFlatTierPrice() productcatalog.Price", + "line": 699 + }, + { + "kind": "func", + "name": "volumeFlatToUnitTierPrice", + "signature": "func volumeFlatToUnitTierPrice() productcatalog.Price", + "line": 724 + } + ], + "line_count": 741 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/uniquereferenceid.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "uniqueReferenceIDGenerator", + "signature": "type uniqueReferenceIDGenerator struct", + "line": 9 + } + ], + "line_count": 25 + }, + "openmeter/billing/charges/usagebased/service/rating/delta/unit_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestUnitDeltaInitialUsage", + "signature": "func TestUnitDeltaInitialUsage(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestUnitDeltaAdditionalUsage", + "signature": "func TestUnitDeltaAdditionalUsage(t *testing.T)", + "line": 56 + }, + { + "kind": "func", + "name": "TestUnitDeltaNoAdditionalUsage", + "signature": "func TestUnitDeltaNoAdditionalUsage(t *testing.T)", + "line": 118 + }, + { + "kind": "func", + "name": "TestUnitDeltaUsageDecrease", + "signature": "func TestUnitDeltaUsageDecrease(t *testing.T)", + "line": 165 + }, + { + "kind": "func", + "name": "TestUnitDeltaUsageDropsToZero", + "signature": "func TestUnitDeltaUsageDropsToZero(t *testing.T)", + "line": 227 + }, + { + "kind": "func", + "name": "TestUnitDeltaRoundingCorrection", + "signature": "func TestUnitDeltaRoundingCorrection(t *testing.T)", + "line": 289 + }, + { + "kind": "func", + "name": "TestUnitDeltaRoundingNoVisibleDeltaProducesNoLines", + "signature": "func TestUnitDeltaRoundingNoVisibleDeltaProducesNoLines(t *testing.T)", + "line": 352 + } + ], + "line_count": 382 + }, + "openmeter/billing/charges/usagebased/service/rating/details.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "GetDetailedRatingForUsageInput", + "signature": "type GetDetailedRatingForUsageInput struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetDetailedRatingForUsageInput) Validate() error", + "line": 41 + }, + { + "kind": "struct", + "name": "GetDetailedRatingForUsageResult", + "signature": "type GetDetailedRatingForUsageResult struct", + "line": 74 + }, + { + "kind": "func", + "name": "GetDetailedRatingForUsage", + "signature": "func (s *service) GetDetailedRatingForUsage(ctx context.Context, in GetDetailedRatingForUsageInput) (GetDetailedRatingForUsageResult, error)", + "line": 82 + }, + { + "kind": "func", + "name": "ensureDetailedLinesLoadedForRating", + "signature": "func (s *service) ensureDetailedLinesLoadedForRating(ctx context.Context, charge usagebased.Charge, servicePeriodTo time.Time) (usagebased.Charge, error)", + "line": 155 + }, + { + "kind": "func", + "name": "currentBillingPeriod", + "signature": "func currentBillingPeriod(currentRunServicePeriod timeutil.ClosedPeriod, eligibleRealizations usagebased.RealizationRuns) timeutil.ClosedPeriod", + "line": 195 + }, + { + "kind": "struct", + "name": "ratePeriodPreservingDetailsInput", + "signature": "type ratePeriodPreservingDetailsInput struct", + "line": 206 + }, + { + "kind": "func", + "name": "ratePeriodPreservingDetails", + "signature": "func (s *service) ratePeriodPreservingDetails(ctx context.Context, in ratePeriodPreservingDetailsInput) (GetDetailedRatingForUsageResult, error)", + "line": 214 + } + ], + "line_count": 292 + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/README.md": { + "header": "# Period-Preserving Rating\n\nPeriod-preserving rating calculates detailed-line deltas while keeping\ncorrections on the service period where the corrected usage belongs. It is\ndesigned for late-arriving usage and repricing scenarios where the invoice must\nshow changes against prior periods instead of rolling every correction into the\ncurrent period.\n\nThe engine receives cumulative meter snapshots for the current period and each\nprior period. Prior-period snapshots are evaluated with the current run's\nstored-at cutoff by the orchestration layer before invoking this engine.\n\nCompared to delta rating, period-preserving rating does not roll late usage into\nthe current run's service period. If usage arrives late for period 1 while the\ncurrent invoice is for period 2, the output line keeps period 1 as its service\nperiod and marks the period 1 realization run as corrected.\n\n## Warning\n\nDo not use period-preserving rating as the production invoice-facing engine", + "symbols": [], + "line_count": 169 + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Engine", + "signature": "type Engine struct", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(ratingService billingrating.Service) Engine", + "line": 26 + }, + { + "kind": "struct", + "name": "Input", + "signature": "type Input struct", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Input) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "SortPriorPeriods", + "signature": "func (i *Input) SortPriorPeriods()", + "line": 107 + }, + { + "kind": "struct", + "name": "CurrentPeriod", + "signature": "type CurrentPeriod struct", + "line": 113 + }, + { + "kind": "struct", + "name": "PriorPeriod", + "signature": "type PriorPeriod struct", + "line": 122 + }, + { + "kind": "struct", + "name": "Result", + "signature": "type Result struct", + "line": 136 + }, + { + "kind": "struct", + "name": "epochClosedPeriod", + "signature": "type epochClosedPeriod struct", + "line": 141 + }, + { + "kind": "func", + "name": "AsClosedPeriod", + "signature": "func (e epochClosedPeriod) AsClosedPeriod() timeutil.ClosedPeriod", + "line": 146 + }, + { + "kind": "func", + "name": "closedPeriodToEpochClosedPeriod", + "signature": "func closedPeriodToEpochClosedPeriod(period timeutil.ClosedPeriod) epochClosedPeriod", + "line": 153 + }, + { + "kind": "struct", + "name": "epochPeriodRatingInput", + "signature": "type epochPeriodRatingInput struct", + "line": 160 + }, + { + "kind": "func", + "name": "Rate", + "signature": "func (e Engine) Rate(ctx context.Context, in Input) (Result, error)", + "line": 165 + }, + { + "kind": "func", + "name": "buildDetailsByEpoch", + "signature": "func (e Engine) buildDetailsByEpoch(ctx context.Context, in Input) (map[epochClosedPeriod]usagebased.DetailedLines, error)", + "line": 185 + }, + { + "kind": "func", + "name": "flattenDetailedLinesByEpoch", + "signature": "func flattenDetailedLinesByEpoch(detailedLinesByEpoch map[epochClosedPeriod]usagebased.DetailedLines) (usagebased.DetailedLines, error)", + "line": 318 + }, + { + "kind": "func", + "name": "compareEpochClosedPeriod", + "signature": "func compareEpochClosedPeriod(a, b epochClosedPeriod) int", + "line": 344 + } + ], + "line_count": 350 + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/engine_test.go": { + "header": "\t\"strconv\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "lateEventRatingTestCase", + "signature": "type lateEventRatingTestCase struct", + "line": 24 + }, + { + "kind": "struct", + "name": "lateEventRatingPhase", + "signature": "type lateEventRatingPhase struct", + "line": 31 + }, + { + "kind": "func", + "name": "TestLateEventRatingUnitPrice", + "signature": "func TestLateEventRatingUnitPrice(t *testing.T)", + "line": 40 + }, + { + "kind": "func", + "name": "TestLateEventRatingCreditsAllocation", + "signature": "func TestLateEventRatingCreditsAllocation(t *testing.T)", + "line": 670 + }, + { + "kind": "func", + "name": "TestLateEventRatingVolumeTieredPrice", + "signature": "func TestLateEventRatingVolumeTieredPrice(t *testing.T)", + "line": 833 + }, + { + "kind": "func", + "name": "TestRateRejectsOverlappingPriorPeriods", + "signature": "func TestRateRejectsOverlappingPriorPeriods(t *testing.T)", + "line": 1164 + }, + { + "kind": "func", + "name": "TestRateRejectsPriorPeriodThatIsEmptyAtMinimumStreamingWindowSize", + "signature": "func TestRateRejectsPriorPeriodThatIsEmptyAtMinimumStreamingWindowSize(t *testing.T)", + "line": 1201 + }, + { + "kind": "func", + "name": "runLateEventRatingTestCase", + "signature": "func runLateEventRatingTestCase(t *testing.T, tc lateEventRatingTestCase)", + "line": 1233 + }, + { + "kind": "struct", + "name": "lateEventRatingTestPeriodsValue", + "signature": "type lateEventRatingTestPeriodsValue struct", + "line": 1299 + }, + { + "kind": "func", + "name": "lateEventRatingTestPeriods", + "signature": "func lateEventRatingTestPeriods() lateEventRatingTestPeriodsValue", + "line": 1306 + }, + { + "kind": "func", + "name": "formatCorrectionDetailedLineChildUniqueReferenceID", + "signature": "func formatCorrectionDetailedLineChildUniqueReferenceID(referenceID, detailedLineID string, servicePeriod timeutil.ClosedPeriod) string", + "line": 1332 + } + ], + "line_count": 1337 + }, + "openmeter/billing/charges/usagebased/service/rating/periodpreserving/uniquereferenceid.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "generatedUniqueReferenceIDGenerator", + "signature": "type generatedUniqueReferenceIDGenerator struct", + "line": 9 + }, + { + "kind": "struct", + "name": "bookedCorrectionUniqueReferenceIDGenerator", + "signature": "type bookedCorrectionUniqueReferenceIDGenerator struct", + "line": 23 + } + ], + "line_count": 39 + }, + "openmeter/billing/charges/usagebased/service/rating/quantitysnapshot.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "getQuantityForUsageInput", + "signature": "type getQuantityForUsageInput struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i getQuantityForUsageInput) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "getQuantityForUsage", + "signature": "func (s *service) getQuantityForUsage(ctx context.Context, in getQuantityForUsageInput) (alpacadecimal.Decimal, error)", + "line": 60 + }, + { + "kind": "struct", + "name": "snapshotQuantityInput", + "signature": "type snapshotQuantityInput struct", + "line": 76 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i snapshotQuantityInput) Validate() error", + "line": 83 + }, + { + "kind": "func", + "name": "snapshotQuantity", + "signature": "func (s *service) snapshotQuantity(ctx context.Context, in snapshotQuantityInput) (alpacadecimal.Decimal, error)", + "line": 99 + }, + { + "kind": "func", + "name": "summarizeMeterQueryRow", + "signature": "func summarizeMeterQueryRow(in []meter.MeterQueryRow) alpacadecimal.Decimal", + "line": 126 + } + ], + "line_count": 133 + }, + "openmeter/billing/charges/usagebased/service/rating/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"", + "symbols": [ + { + "kind": "interface", + "name": "DetailedLinesFetcher", + "signature": "type DetailedLinesFetcher interface", + "line": 15 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 25 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 43 + }, + { + "kind": "func", + "name": "GetPreferredRatingEngineFor", + "signature": "func (s *service) GetPreferredRatingEngineFor(_ usagebased.Intent) usagebased.RatingEngine", + "line": 54 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 58 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (Service, error)", + "line": 66 + } + ], + "line_count": 78 + }, + "openmeter/billing/charges/usagebased/service/rating/service_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "getDetailedRatingForUsageFixture", + "signature": "type getDetailedRatingForUsageFixture struct", + "line": 32 + }, + { + "kind": "func", + "name": "TestFormatDetailedLineChildUniqueReferenceID", + "signature": "func TestFormatDetailedLineChildUniqueReferenceID(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "TestGetPreferredRatingEngineFor", + "signature": "func TestGetPreferredRatingEngineFor(t *testing.T)", + "line": 52 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageDisablesCreditsMutator", + "signature": "func TestGetDetailedRatingForUsageDisablesCreditsMutator(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "TestNewDetailedLinesFromBilling", + "signature": "func TestNewDetailedLinesFromBilling(t *testing.T)", + "line": 78 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageIgnoresCurrentRunOnCharge", + "signature": "func TestGetDetailedRatingForUsageIgnoresCurrentRunOnCharge(t *testing.T)", + "line": 132 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageUsesPeriodPreservingRatingEngine", + "signature": "func TestGetDetailedRatingForUsageUsesPeriodPreservingRatingEngine(t *testing.T)", + "line": 146 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageLoadsPriorDetailedLines", + "signature": "func TestGetDetailedRatingForUsageLoadsPriorDetailedLines(t *testing.T)", + "line": 239 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageIgnoresInvalidUnsupportedCreditNotePriorRuns", + "signature": "func TestGetDetailedRatingForUsageIgnoresInvalidUnsupportedCreditNotePriorRuns(t *testing.T)", + "line": 262 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageDoesNotLoadCurrentRunDetailedLines", + "signature": "func TestGetDetailedRatingForUsageDoesNotLoadCurrentRunDetailedLines(t *testing.T)", + "line": 284 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageWrapsDetailedLinesLoadError", + "signature": "func TestGetDetailedRatingForUsageWrapsDetailedLinesLoadError(t *testing.T)", + "line": 306 + }, + { + "kind": "func", + "name": "TestGetDetailedRatingForUsageFiltersQuantityByServicePeriodToAndStoredAtLT", + "signature": "func TestGetDetailedRatingForUsageFiltersQuantityByServicePeriodToAndStoredAtLT(t *testing.T)", + "line": 324 + }, + { + "kind": "func", + "name": "TestGetTotalsForUsageMinimumCommitment", + "signature": "func TestGetTotalsForUsageMinimumCommitment(t *testing.T)", + "line": 359 + }, + { + "kind": "func", + "name": "newGetDetailedRatingForUsageFixture", + "signature": "func newGetDetailedRatingForUsageFixture(t *testing.T, result billingrating.GenerateDetailedLinesResult) getDetailedRatingForUsageFixture", + "line": 420 + }, + { + "kind": "func", + "name": "newDetailedRatingTestRun", + "signature": "func newDetailedRatingTestRun(id string, servicePeriodTo time.Time, meteredQuantity int64) usagebased.RealizationRun", + "line": 450 + }, + { + "kind": "func", + "name": "newDetailedRatingTestCharge", + "signature": "func newDetailedRatingTestCharge(period timeutil.ClosedPeriod, runs usagebased.RealizationRuns) usagebased.Charge", + "line": 474 + }, + { + "kind": "func", + "name": "newDetailedRatingTestCustomer", + "signature": "func newDetailedRatingTestCustomer() billing.CustomerOverrideWithDetails", + "line": 512 + }, + { + "kind": "func", + "name": "newDetailedRatingTestFeatureMeter", + "signature": "func newDetailedRatingTestFeatureMeter() feature.FeatureMeter", + "line": 527 + }, + { + "kind": "struct", + "name": "stubRatingService", + "signature": "type stubRatingService struct", + "line": 554 + }, + { + "kind": "func", + "name": "FetchDetailedLines", + "signature": "func (f detailedLinesFetcherFunc) FetchDetailedLines(ctx context.Context, charge usagebased.Charge) (usagebased.Charge, error)", + "line": 563 + }, + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (s *stubRatingService) ResolveBillablePeriod(in billingrating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 571 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (s *stubRatingService) GenerateDetailedLines(in billingrating.StandardLineAccessor, opts ...billingrating.GenerateDetailedLinesOption) (billingrating.GenerateDetailedLinesResult, error)", + "line": 575 + } + ], + "line_count": 578 + }, + "openmeter/billing/charges/usagebased/service/rating/subtract/README.md": { + "header": "# Rated Detail Subtraction\n\nThe `subtract` package is the arithmetic primitive used by usage-based rating\nengines. It subtracts previously rated detailed lines from currently rated\ndetailed lines and returns the remaining detailed lines. It does not query\nmeters, call billing rating, allocate credits, or decide invoice periods.\n\n## Warning\n\nDo not use this package as a standalone final invoice rating algorithm. It is a\nlow-level arithmetic primitive.\n\n## Matching Model\n\nDetailed lines are matched by a calculation key:\n\n- `PricerReferenceID`\n- `Category`\n- `PaymentTerm`\n", + "symbols": [], + "line_count": 128 + }, + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract.go": { + "header": "\t\"fmt\"\n\t\"sort\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "detailedLineKey", + "signature": "type detailedLineKey struct", + "line": 16 + }, + { + "kind": "struct", + "name": "options", + "signature": "type options struct", + "line": 22 + }, + { + "kind": "func", + "name": "WithUniqueReferenceIDValidationIgnored", + "signature": "func WithUniqueReferenceIDValidationIgnored() Option", + "line": 31 + }, + { + "kind": "func", + "name": "SubtractRatedRunDetails", + "signature": "func SubtractRatedRunDetails(\n\tcurrent usagebased.DetailedLines,\n\tprevious usagebased.DetailedLines,\n\tuniqueReferenceIDGenerator UniqueReferenceIDGenerator,\n\topts ...Option,\n) (usagebased.DetailedLines, error)", + "line": 48 + }, + { + "kind": "func", + "name": "validateDetailedLinesForSubtract", + "signature": "func validateDetailedLinesForSubtract(lines usagebased.DetailedLines) error", + "line": 95 + }, + { + "kind": "func", + "name": "validateCurrencyForSubtract", + "signature": "func validateCurrencyForSubtract(current, previous usagebased.DetailedLines) error", + "line": 110 + }, + { + "kind": "func", + "name": "sumDetailedLinesByKey", + "signature": "func sumDetailedLinesByKey(lines usagebased.DetailedLines) map[detailedLineKey]usagebased.DetailedLines", + "line": 138 + }, + { + "kind": "func", + "name": "appendOrSumDetailedLineByPerUnitAmount", + "signature": "func appendOrSumDetailedLineByPerUnitAmount(lines usagebased.DetailedLines, line usagebased.DetailedLine) usagebased.DetailedLines", + "line": 154 + }, + { + "kind": "func", + "name": "subtractDetailedLinesByKey", + "signature": "func subtractDetailedLinesByKey(\n\tcurrent map[detailedLineKey]usagebased.DetailedLines,\n\tprevious map[detailedLineKey]usagebased.DetailedLines,\n\tgenerator UniqueReferenceIDGenerator,\n) (usagebased.DetailedLines, error)", + "line": 168 + }, + { + "kind": "func", + "name": "subtractDetailedLinesWithSameKey", + "signature": "func subtractDetailedLinesWithSameKey(\n\tcurrent usagebased.DetailedLines,\n\tprevious usagebased.DetailedLines,\n\tgenerator UniqueReferenceIDGenerator,\n) (usagebased.DetailedLines, error)", + "line": 204 + }, + { + "kind": "func", + "name": "validateUniqueChildReferenceIDs", + "signature": "func validateUniqueChildReferenceIDs(lines usagebased.DetailedLines) error", + "line": 269 + }, + { + "kind": "func", + "name": "findDetailedLineByPerUnitAmount", + "signature": "func findDetailedLineByPerUnitAmount(lines usagebased.DetailedLines, perUnitAmount alpacadecimal.Decimal, matched []bool) (int, bool)", + "line": 282 + }, + { + "kind": "func", + "name": "subtractDetailedLine", + "signature": "func subtractDetailedLine(current, previous usagebased.DetailedLine) (usagebased.DetailedLine, bool)", + "line": 296 + }, + { + "kind": "func", + "name": "isZeroDetailedLine", + "signature": "func isZeroDetailedLine(line usagebased.DetailedLine) bool", + "line": 304 + } + ], + "line_count": 306 + }, + "openmeter/billing/charges/usagebased/service/rating/subtract/subtract_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestUnitPriceSubtract", + "signature": "func TestUnitPriceSubtract(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestMinimumCommitmentSubtract", + "signature": "func TestMinimumCommitmentSubtract(t *testing.T)", + "line": 211 + }, + { + "kind": "func", + "name": "TestGraduatedTieredSubtract", + "signature": "func TestGraduatedTieredSubtract(t *testing.T)", + "line": 290 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsMatchesByPricerReferenceIDAndPreservesChildUniqueReferenceID", + "signature": "func TestSubtractRatedRunDetailsMatchesByPricerReferenceIDAndPreservesChildUniqueReferenceID(t *testing.T)", + "line": 526 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsDoesNotMatchDifferentPricerReferenceIDs", + "signature": "func TestSubtractRatedRunDetailsDoesNotMatchDifferentPricerReferenceIDs(t *testing.T)", + "line": 583 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsRejectsCurrencyMismatch", + "signature": "func TestSubtractRatedRunDetailsRejectsCurrencyMismatch(t *testing.T)", + "line": 650 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsPreservesMatchedCurrentServicePeriod", + "signature": "func TestSubtractRatedRunDetailsPreservesMatchedCurrentServicePeriod(t *testing.T)", + "line": 691 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsPreservesIndexes", + "signature": "func TestSubtractRatedRunDetailsPreservesIndexes(t *testing.T)", + "line": 750 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsKeepsRepricingAsSeparateLines", + "signature": "func TestSubtractRatedRunDetailsKeepsRepricingAsSeparateLines(t *testing.T)", + "line": 863 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsDisambiguatesPreviousOnlyRepricingReversalChildUniqueReferenceID", + "signature": "func TestSubtractRatedRunDetailsDisambiguatesPreviousOnlyRepricingReversalChildUniqueReferenceID(t *testing.T)", + "line": 925 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsAllowsDuplicateChildUniqueReferenceIDsWhenValidationIgnored", + "signature": "func TestSubtractRatedRunDetailsAllowsDuplicateChildUniqueReferenceIDsWhenValidationIgnored(t *testing.T)", + "line": 970 + }, + { + "kind": "func", + "name": "TestVolumeTieredSubtract", + "signature": "func TestVolumeTieredSubtract(t *testing.T)", + "line": 1018 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsAcceptsNegativeCorrectionInputs", + "signature": "func TestSubtractRatedRunDetailsAcceptsNegativeCorrectionInputs(t *testing.T)", + "line": 1187 + }, + { + "kind": "struct", + "name": "rateRunDetailsForTestInput", + "signature": "type rateRunDetailsForTestInput struct", + "line": 1231 + }, + { + "kind": "struct", + "name": "subtractRatedRunDetailsTestCase", + "signature": "type subtractRatedRunDetailsTestCase struct", + "line": 1237 + }, + { + "kind": "func", + "name": "runSubtractRatedRunDetailsTestCases", + "signature": "func runSubtractRatedRunDetailsTestCases(\n\tt *testing.T,\n\tservicePeriod timeutil.ClosedPeriod,\n\ttestCases []subtractRatedRunDetailsTestCase,\n)", + "line": 1248 + }, + { + "kind": "func", + "name": "TestSubtractRatedRunDetailsMixedPositiveAndNegativeLines", + "signature": "func TestSubtractRatedRunDetailsMixedPositiveAndNegativeLines(t *testing.T)", + "line": 1292 + }, + { + "kind": "func", + "name": "rateRunDetailsForTest", + "signature": "func rateRunDetailsForTest(t *testing.T, ratingService billingrating.Service, in rateRunDetailsForTestInput, opts ...billingrating.GenerateDetailedLinesOption) usagebased.DetailedLines", + "line": 1380 + }, + { + "kind": "func", + "name": "usageBasedDetailedLinesForTest", + "signature": "func usageBasedDetailedLinesForTest(lines billingrating.DetailedLines, servicePeriod timeutil.ClosedPeriod) usagebased.DetailedLines", + "line": 1405 + }, + { + "kind": "struct", + "name": "expectedDetailedLine", + "signature": "type expectedDetailedLine struct", + "line": 1439 + }, + { + "kind": "struct", + "name": "expectedTotals", + "signature": "type expectedTotals struct", + "line": 1449 + }, + { + "kind": "func", + "name": "toExpectedDetailedLines", + "signature": "func toExpectedDetailedLines(lines usagebased.DetailedLines) []expectedDetailedLine", + "line": 1460 + }, + { + "kind": "func", + "name": "toExpectedDetailedLinesWithServicePeriod", + "signature": "func toExpectedDetailedLinesWithServicePeriod(lines usagebased.DetailedLines) []expectedDetailedLine", + "line": 1473 + }, + { + "kind": "func", + "name": "toExpectedTotals", + "signature": "func toExpectedTotals(in totals.Totals) expectedTotals", + "line": 1487 + }, + { + "kind": "func", + "name": "totalsFromExpectedDetailedLines", + "signature": "func totalsFromExpectedDetailedLines(lines []expectedDetailedLine) totals.Totals", + "line": 1500 + }, + { + "kind": "struct", + "name": "ratedDetailedLineForTestInput", + "signature": "type ratedDetailedLineForTestInput struct", + "line": 1519 + }, + { + "kind": "struct", + "name": "passthroughUniqueReferenceIDGenerator", + "signature": "type passthroughUniqueReferenceIDGenerator struct", + "line": 1530 + }, + { + "kind": "func", + "name": "makeRatedDetailedLineForTest", + "signature": "func makeRatedDetailedLineForTest(in ratedDetailedLineForTestInput) usagebased.DetailedLine", + "line": 1544 + } + ], + "line_count": 1582 + }, + "openmeter/billing/charges/usagebased/service/rating/subtract/uniquereferenceid.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/usagebased\"", + "symbols": [ + { + "kind": "interface", + "name": "UniqueReferenceIDGenerator", + "signature": "type UniqueReferenceIDGenerator interface", + "line": 12 + }, + { + "kind": "func", + "name": "NewMockUniqueReferenceIDGenerator", + "signature": "func NewMockUniqueReferenceIDGenerator(_ testing.TB) UniqueReferenceIDGenerator", + "line": 26 + }, + { + "kind": "struct", + "name": "mockUniqueReferenceIDGenerator", + "signature": "type mockUniqueReferenceIDGenerator struct", + "line": 30 + } + ], + "line_count": 48 + }, + "openmeter/billing/charges/usagebased/service/rating/testutils/testutils.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ExpectedDetailedLine", + "signature": "type ExpectedDetailedLine struct", + "line": 22 + }, + { + "kind": "struct", + "name": "ExpectedTotals", + "signature": "type ExpectedTotals struct", + "line": 32 + }, + { + "kind": "func", + "name": "ToExpectedDetailedLinesWithServicePeriod", + "signature": "func ToExpectedDetailedLinesWithServicePeriod(lines usagebased.DetailedLines) []ExpectedDetailedLine", + "line": 43 + }, + { + "kind": "func", + "name": "ToExpectedTotals", + "signature": "func ToExpectedTotals(in totals.Totals) ExpectedTotals", + "line": 57 + }, + { + "kind": "func", + "name": "FormatDetailedLineChildUniqueReferenceID", + "signature": "func FormatDetailedLineChildUniqueReferenceID(id string, servicePeriod timeutil.ClosedPeriod) string", + "line": 70 + }, + { + "kind": "func", + "name": "NewIntentForTest", + "signature": "func NewIntentForTest(t testing.TB, servicePeriod timeutil.ClosedPeriod, price productcatalog.Price, discounts productcatalog.Discounts) usagebased.Intent", + "line": 79 + }, + { + "kind": "func", + "name": "NewUnitPriceIntentForTest", + "signature": "func NewUnitPriceIntentForTest(t testing.TB, servicePeriod timeutil.ClosedPeriod, amount alpacadecimal.Decimal) usagebased.Intent", + "line": 104 + } + ], + "line_count": 115 + }, + "openmeter/billing/charges/usagebased/service/rating/totals.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "GetTotalsForUsageInput", + "signature": "type GetTotalsForUsageInput struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetTotalsForUsageInput) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "GetTotalsForUsage", + "signature": "func (s *service) GetTotalsForUsage(ctx context.Context, in GetTotalsForUsageInput) (totals.Totals, error)", + "line": 45 + } + ], + "line_count": 78 + }, + "openmeter/billing/charges/usagebased/service/run/correct.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ReconcileCreditRealizationsInput", + "signature": "type ReconcileCreditRealizationsInput struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReconcileCreditRealizationsInput) Validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "ReconcileCreditRealizationsResult", + "signature": "type ReconcileCreditRealizationsResult struct", + "line": 58 + }, + { + "kind": "func", + "name": "ReconcileCredits", + "signature": "func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error)", + "line": 66 + }, + { + "kind": "struct", + "name": "CorrectAllCreditRealizationsInput", + "signature": "type CorrectAllCreditRealizationsInput struct", + "line": 135 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CorrectAllCreditRealizationsInput) Validate() error", + "line": 142 + }, + { + "kind": "struct", + "name": "CorrectAllCreditRealizationsResult", + "signature": "type CorrectAllCreditRealizationsResult struct", + "line": 162 + }, + { + "kind": "func", + "name": "CorrectAllCredits", + "signature": "func (s *Service) CorrectAllCredits(ctx context.Context, in CorrectAllCreditRealizationsInput) (CorrectAllCreditRealizationsResult, error)", + "line": 166 + } + ], + "line_count": 203 + }, + "openmeter/billing/charges/usagebased/service/run/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateRatedRunInput", + "signature": "type CreateRatedRunInput struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateRatedRunInput) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "CreateRatedRunResult", + "signature": "type CreateRatedRunResult struct", + "line": 92 + }, + { + "kind": "func", + "name": "createNewRealizationRun", + "signature": "func (s *Service) createNewRealizationRun(ctx context.Context, charge usagebased.Charge, in usagebased.CreateRealizationRunInput) (usagebased.Charge, error)", + "line": 98 + }, + { + "kind": "func", + "name": "CreateRatedRun", + "signature": "func (s *Service) CreateRatedRun(ctx context.Context, in CreateRatedRunInput) (CreateRatedRunResult, error)", + "line": 128 + } + ], + "line_count": 222 + }, + "openmeter/billing/charges/usagebased/service/run/credits.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "createRunCreditRealizations", + "signature": "func (s *Service) createRunCreditRealizations(ctx context.Context, charge usagebased.Charge, runID usagebased.RealizationRunID, creditAllocations creditrealization.CreateInputs) (creditrealization.Realizations, error)", + "line": 17 + }, + { + "kind": "func", + "name": "featuresForLineage", + "signature": "func featuresForLineage(featureKey string) []string", + "line": 44 + }, + { + "kind": "struct", + "name": "allocateCreditRealizationsInput", + "signature": "type allocateCreditRealizationsInput struct", + "line": 52 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i allocateCreditRealizationsInput) Validate() error", + "line": 61 + }, + { + "kind": "struct", + "name": "allocateCreditRealizationsResult", + "signature": "type allocateCreditRealizationsResult struct", + "line": 85 + }, + { + "kind": "func", + "name": "allocate", + "signature": "func (s *Service) allocate(ctx context.Context, in allocateCreditRealizationsInput) (allocateCreditRealizationsResult, error)", + "line": 90 + } + ], + "line_count": 142 + }, + "openmeter/billing/charges/usagebased/service/run/invoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "BookAccruedInvoiceUsageInput", + "signature": "type BookAccruedInvoiceUsageInput struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BookAccruedInvoiceUsageInput) Validate() error", + "line": 18 + }, + { + "kind": "struct", + "name": "BookAccruedInvoiceUsageResult", + "signature": "type BookAccruedInvoiceUsageResult struct", + "line": 54 + }, + { + "kind": "func", + "name": "BookAccruedInvoiceUsage", + "signature": "func (s *Service) BookAccruedInvoiceUsage(ctx context.Context, in BookAccruedInvoiceUsageInput) (BookAccruedInvoiceUsageResult, error)", + "line": 59 + } + ], + "line_count": 117 + }, + "openmeter/billing/charges/usagebased/service/run/payment.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "BookInvoicedPaymentAuthorizedInput", + "signature": "type BookInvoicedPaymentAuthorizedInput struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BookInvoicedPaymentAuthorizedInput) Validate() error", + "line": 21 + }, + { + "kind": "struct", + "name": "BookInvoicedPaymentAuthorizedResult", + "signature": "type BookInvoicedPaymentAuthorizedResult struct", + "line": 53 + }, + { + "kind": "func", + "name": "BookInvoicedPaymentAuthorized", + "signature": "func (s *Service) BookInvoicedPaymentAuthorized(ctx context.Context, in BookInvoicedPaymentAuthorizedInput) (BookInvoicedPaymentAuthorizedResult, error)", + "line": 58 + }, + { + "kind": "struct", + "name": "SettleInvoicedPaymentInput", + "signature": "type SettleInvoicedPaymentInput struct", + "line": 112 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SettleInvoicedPaymentInput) Validate() error", + "line": 119 + }, + { + "kind": "struct", + "name": "SettleInvoicedPaymentResult", + "signature": "type SettleInvoicedPaymentResult struct", + "line": 163 + }, + { + "kind": "func", + "name": "SettleInvoicedPayment", + "signature": "func (s *Service) SettleInvoicedPayment(ctx context.Context, in SettleInvoicedPaymentInput) (SettleInvoicedPaymentResult, error)", + "line": 168 + } + ], + "line_count": 214 + }, + "openmeter/billing/charges/usagebased/service/run/payment_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestBookInvoicedPaymentAuthorizedInputValidate", + "signature": "func TestBookInvoicedPaymentAuthorizedInputValidate(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestSettleInvoicedPaymentInputValidate", + "signature": "func TestSettleInvoicedPaymentInputValidate(t *testing.T)", + "line": 60 + }, + { + "kind": "func", + "name": "newBookPaymentAuthorizedInput", + "signature": "func newBookPaymentAuthorizedInput() BookInvoicedPaymentAuthorizedInput", + "line": 96 + }, + { + "kind": "func", + "name": "newSettlePaymentInput", + "signature": "func newSettlePaymentInput() SettleInvoicedPaymentInput", + "line": 139 + }, + { + "kind": "func", + "name": "newUsageBasedCharge", + "signature": "func newUsageBasedCharge() usagebased.Charge", + "line": 168 + }, + { + "kind": "func", + "name": "newUsageBasedRun", + "signature": "func newUsageBasedRun(lineID string) usagebased.RealizationRun", + "line": 202 + } + ], + "line_count": 221 + }, + "openmeter/billing/charges/usagebased/service/run/preview.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BuildCreditThenInvoiceGatheringPreviewRunInput", + "signature": "type BuildCreditThenInvoiceGatheringPreviewRunInput struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BuildCreditThenInvoiceGatheringPreviewRunInput) Validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "BuildCreditThenInvoiceGatheringPreviewRunResult", + "signature": "type BuildCreditThenInvoiceGatheringPreviewRunResult struct", + "line": 84 + }, + { + "kind": "func", + "name": "BuildCreditThenInvoiceGatheringPreviewRun", + "signature": "func (s *Service) BuildCreditThenInvoiceGatheringPreviewRun(ctx context.Context, in BuildCreditThenInvoiceGatheringPreviewRunInput) (BuildCreditThenInvoiceGatheringPreviewRunResult, error)", + "line": 94 + } + ], + "line_count": 143 + }, + "openmeter/billing/charges/usagebased/service/run/service.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/lineage\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 17 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 53 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m CreditAllocationMode) Validate() error", + "line": 78 + } + ], + "line_count": 85 + }, + "openmeter/billing/charges/usagebased/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/lineage\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (usagebased.Service, error)", + "line": 73 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 109 + }, + { + "kind": "func", + "name": "GetLineEngine", + "signature": "func (s *service) GetLineEngine() billing.LineEngine", + "line": 121 + } + ], + "line_count": 125 + }, + "openmeter/billing/charges/usagebased/service/statemachine.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "stateMachine", + "signature": "type stateMachine struct", + "line": 23 + }, + { + "kind": "struct", + "name": "StateMachineConfig", + "signature": "type StateMachineConfig struct", + "line": 39 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StateMachineConfig) Validate() error", + "line": 50 + }, + { + "kind": "func", + "name": "newStateMachineBase", + "signature": "func newStateMachineBase(config StateMachineConfig) (*stateMachine, error)", + "line": 88 + }, + { + "kind": "func", + "name": "IsInsideServicePeriod", + "signature": "func (s *stateMachine) IsInsideServicePeriod() bool", + "line": 126 + }, + { + "kind": "func", + "name": "IsAfterServicePeriod", + "signature": "func (s *stateMachine) IsAfterServicePeriod() bool", + "line": 130 + }, + { + "kind": "func", + "name": "AdvanceAfterServicePeriodTo", + "signature": "func (s *stateMachine) AdvanceAfterServicePeriodTo(ctx context.Context) error", + "line": 134 + }, + { + "kind": "func", + "name": "SyncFeatureIDFromFeatureMeter", + "signature": "func (s *stateMachine) SyncFeatureIDFromFeatureMeter(ctx context.Context) error", + "line": 139 + }, + { + "kind": "func", + "name": "AdvanceAfterServicePeriodFrom", + "signature": "func (s *stateMachine) AdvanceAfterServicePeriodFrom(ctx context.Context) error", + "line": 144 + }, + { + "kind": "func", + "name": "AdvanceAfterCollectionPeriodEnd", + "signature": "func (s *stateMachine) AdvanceAfterCollectionPeriodEnd(ctx context.Context) error", + "line": 149 + }, + { + "kind": "func", + "name": "IsAfterCollectionPeriod", + "signature": "func (s *stateMachine) IsAfterCollectionPeriod(ctx context.Context, _ ...any) bool", + "line": 160 + }, + { + "kind": "func", + "name": "getFinalRunStoredAtLT", + "signature": "func (s *stateMachine) getFinalRunStoredAtLT() (time.Time, error)", + "line": 170 + }, + { + "kind": "func", + "name": "getCurrentRunSnapshotAfter", + "signature": "func (s *stateMachine) getCurrentRunSnapshotAfter() (time.Time, error)", + "line": 176 + } + ], + "line_count": 187 + }, + "openmeter/billing/charges/usagebased/service/subscription.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (s *service) UpdateSubscriptionItemID(ctx context.Context, charge usagebased.Charge, newSubscriptionItemID string) (usagebased.Charge, error)", + "line": 13 + } + ], + "line_count": 33 + }, + "openmeter/billing/charges/usagebased/service/triggers.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "AdvanceCharge", + "signature": "func (s *service) AdvanceCharge(ctx context.Context, input usagebased.AdvanceChargeInput) (*usagebased.Charge, error)", + "line": 17 + }, + { + "kind": "func", + "name": "TriggerPatch", + "signature": "func (s *service) TriggerPatch(ctx context.Context, chargeID meta.ChargeID, patch meta.Patch) (meta.TriggerPatchResult[usagebased.Charge], error)", + "line": 50 + }, + { + "kind": "func", + "name": "newStateMachine", + "signature": "func (s *service) newStateMachine(config StateMachineConfig) (StateMachine, error)", + "line": 90 + }, + { + "kind": "func", + "name": "getStateMachineConfigForPatch", + "signature": "func (s *service) getStateMachineConfigForPatch(ctx context.Context, charge usagebased.Charge) (StateMachineConfig, error)", + "line": 116 + }, + { + "kind": "func", + "name": "withLockedCharge", + "signature": "func (s *service) withLockedCharge(ctx context.Context, chargeID meta.ChargeID, fn func(ctx context.Context, charge usagebased.Charge) (*usagebased.Charge, error)) (*usagebased.Charge, error)", + "line": 157 + } + ], + "line_count": 178 + }, + "openmeter/billing/charges/usagebased/service_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateExpands", + "signature": "func TestValidateExpands(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestRatingEngineValidate", + "signature": "func TestRatingEngineValidate(t *testing.T)", + "line": 21 + } + ], + "line_count": 28 + }, + "openmeter/billing/charges/usagebased/statemachine.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "IsMutableFinalRealizationStatus", + "signature": "func IsMutableFinalRealizationStatus(status Status) bool", + "line": 43 + }, + { + "kind": "func", + "name": "IsMutableInvoiceBackedRealizationStatus", + "signature": "func IsMutableInvoiceBackedRealizationStatus(status Status) bool", + "line": 60 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s Status) Validate() error", + "line": 84 + }, + { + "kind": "func", + "name": "ToMetaChargeStatus", + "signature": "func (s Status) ToMetaChargeStatus() (meta.ChargeStatus, error)", + "line": 91 + } + ], + "line_count": 107 + }, + "openmeter/billing/charges/worker/advance/advance.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AutoAdvancer", + "signature": "type AutoAdvancer struct", + "line": 17 + }, + { + "kind": "func", + "name": "All", + "signature": "func (a *AutoAdvancer) All(ctx context.Context, namespaces []string) error", + "line": 24 + }, + { + "kind": "func", + "name": "ListCustomersToAdvance", + "signature": "func (a *AutoAdvancer) ListCustomersToAdvance(ctx context.Context, namespaces []string) ([]customer.CustomerID, error)", + "line": 50 + }, + { + "kind": "func", + "name": "AdvanceCharges", + "signature": "func (a *AutoAdvancer) AdvanceCharges(ctx context.Context, customerID customer.CustomerID) error", + "line": 63 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 80 + }, + { + "kind": "func", + "name": "NewAdvancer", + "signature": "func NewAdvancer(config Config) (*AutoAdvancer, error)", + "line": 85 + } + ], + "line_count": 98 + }, + "openmeter/billing/charges/worker/asyncadvance/asyncadvance.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 12 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(c Config) (*Handler, error)", + "line": 34 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *Handler) Handle(ctx context.Context, event *charges.AdvanceChargesEvent) error", + "line": 45 + } + ], + "line_count": 63 + }, + "openmeter/billing/consts.go": { + "header": "const (\n\tAnnotationKeyTaxable = \"openmeter.io/taxable\"\n\tAnnotationKeyReason = \"openmeter.io/reason\"", + "symbols": [], + "line_count": 18 + }, + "openmeter/billing/creditgrant/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "newCreditGrantFeatureFiltersUnsupportedError", + "signature": "func newCreditGrantFeatureFiltersUnsupportedError(featureCount int) error", + "line": 12 + } + ], + "line_count": 21 + }, + "openmeter/billing/creditgrant/noop.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "struct", + "name": "NoopService", + "signature": "type NoopService struct", + "line": 10 + }, + { + "kind": "func", + "name": "NewNoopService", + "signature": "func NewNoopService() Service", + "line": 14 + } + ], + "line_count": 32 + }, + "openmeter/billing/creditgrant/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FundingMethod) Validate() error", + "line": 37 + }, + { + "kind": "struct", + "name": "PurchaseTerms", + "signature": "type PurchaseTerms struct", + "line": 47 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 53 + }, + { + "kind": "struct", + "name": "GrantFilters", + "signature": "type GrantFilters struct", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 74 + }, + { + "kind": "struct", + "name": "GetInput", + "signature": "type GetInput struct", + "line": 142 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetInput) Validate() error", + "line": 148 + }, + { + "kind": "struct", + "name": "ListInput", + "signature": "type ListInput struct", + "line": 166 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListInput) Validate() error", + "line": 177 + }, + { + "kind": "struct", + "name": "UpdateExternalSettlementInput", + "signature": "type UpdateExternalSettlementInput struct", + "line": 203 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateExternalSettlementInput) Validate() error", + "line": 211 + } + ], + "line_count": 231 + }, + "openmeter/billing/creditgrant/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 35 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (creditgrant.Service, error)", + "line": 53 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 65 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, input creditgrant.CreateInput) (creditpurchase.Charge, error)", + "line": 71 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (s *service) Get(ctx context.Context, input creditgrant.GetInput) (creditpurchase.Charge, error)", + "line": 123 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *service) List(ctx context.Context, input creditgrant.ListInput) (pagination.Result[creditpurchase.Charge], error)", + "line": 154 + }, + { + "kind": "func", + "name": "UpdateExternalSettlement", + "signature": "func (s *service) UpdateExternalSettlement(ctx context.Context, input creditgrant.UpdateExternalSettlementInput) (creditpurchase.Charge, error)", + "line": 177 + }, + { + "kind": "func", + "name": "toIntent", + "signature": "func toIntent(input creditgrant.CreateInput) creditpurchase.Intent", + "line": 215 + }, + { + "kind": "func", + "name": "calculateExpiresAt", + "signature": "func calculateExpiresAt(from time.Time, expiresAfter *datetime.ISODuration) *time.Time", + "line": 250 + }, + { + "kind": "func", + "name": "toSettlement", + "signature": "func toSettlement(input creditgrant.CreateInput) creditpurchase.Settlement", + "line": 260 + } + ], + "line_count": 289 + }, + "openmeter/billing/customer.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "NewInvoiceCustomer", + "signature": "func NewInvoiceCustomer(cust customer.Customer) InvoiceCustomer", + "line": 18 + }, + { + "kind": "struct", + "name": "InvoiceCustomer", + "signature": "type InvoiceCustomer struct", + "line": 38 + }, + { + "kind": "func", + "name": "GetUsageAttribution", + "signature": "func (c InvoiceCustomer) GetUsageAttribution() streaming.CustomerUsageAttribution", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *InvoiceCustomer) Validate() error", + "line": 58 + }, + { + "kind": "struct", + "name": "CustomerMetadata", + "signature": "type CustomerMetadata struct", + "line": 74 + } + ], + "line_count": 76 + }, + "openmeter/billing/customeroverride.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerOverride", + "signature": "type CustomerOverride struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerOverride) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "CollectionOverrideConfig", + "signature": "type CollectionOverrideConfig struct", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *CollectionOverrideConfig) Validate() error", + "line": 75 + }, + { + "kind": "struct", + "name": "InvoicingOverrideConfig", + "signature": "type InvoicingOverrideConfig struct", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *InvoicingOverrideConfig) Validate() error", + "line": 113 + }, + { + "kind": "struct", + "name": "PaymentOverrideConfig", + "signature": "type PaymentOverrideConfig struct", + "line": 135 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *PaymentOverrideConfig) Validate() error", + "line": 139 + }, + { + "kind": "struct", + "name": "UpsertCustomerOverrideInput", + "signature": "type UpsertCustomerOverrideInput struct", + "line": 151 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u UpsertCustomerOverrideInput) Validate() error", + "line": 162 + }, + { + "kind": "struct", + "name": "GetCustomerOverrideInput", + "signature": "type GetCustomerOverrideInput struct", + "line": 186 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g GetCustomerOverrideInput) Validate() error", + "line": 191 + }, + { + "kind": "struct", + "name": "GetCustomerAppInput", + "signature": "type GetCustomerAppInput struct", + "line": 196 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g GetCustomerAppInput) Validate() error", + "line": 202 + }, + { + "kind": "struct", + "name": "DeleteCustomerOverrideInput", + "signature": "type DeleteCustomerOverrideInput struct", + "line": 218 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d DeleteCustomerOverrideInput) Validate() error", + "line": 222 + }, + { + "kind": "struct", + "name": "GetProfileWithCustomerOverrideInput", + "signature": "type GetProfileWithCustomerOverrideInput struct", + "line": 226 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g GetProfileWithCustomerOverrideInput) Validate() error", + "line": 230 + }, + { + "kind": "struct", + "name": "GetCustomerOverrideAdapterInput", + "signature": "type GetCustomerOverrideAdapterInput struct", + "line": 234 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetCustomerOverrideAdapterInput) Validate() error", + "line": 240 + }, + { + "kind": "struct", + "name": "CustomerOverrideWithDetails", + "signature": "type CustomerOverrideWithDetails struct", + "line": 255 + }, + { + "kind": "struct", + "name": "CustomerOverrideWithAdapterProfile", + "signature": "type CustomerOverrideWithAdapterProfile struct", + "line": 264 + }, + { + "kind": "struct", + "name": "ListCustomerOverridesInput", + "signature": "type ListCustomerOverridesInput struct", + "line": 270 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l ListCustomerOverridesInput) Validate() error", + "line": 291 + }, + { + "kind": "struct", + "name": "CustomerOverrideExpand", + "signature": "type CustomerOverrideExpand struct", + "line": 305 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o CustomerOverrideOrderBy) Validate() error", + "line": 338 + }, + { + "kind": "struct", + "name": "CustomerOverrideWithCustomerID", + "signature": "type CustomerOverrideWithCustomerID struct", + "line": 350 + }, + { + "kind": "struct", + "name": "BulkAssignCustomersToProfileInput", + "signature": "type BulkAssignCustomersToProfileInput struct", + "line": 358 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b BulkAssignCustomersToProfileInput) Validate() error", + "line": 363 + } + ], + "line_count": 379 + }, + "openmeter/billing/defaults.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"\n)", + "symbols": [], + "line_count": 32 + }, + "openmeter/billing/derived.gen.go": { + "header": "\tcreditsapplied \"github.com/openmeterio/openmeter/openmeter/billing/models/creditsapplied\"\n\tmodels \"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "func", + "name": "deriveEqualGatheringLineBase", + "signature": "func deriveEqualGatheringLineBase(this, that *GatheringLineBase) bool", + "line": 11 + }, + { + "kind": "func", + "name": "deriveEqualLineDiscountBase", + "signature": "func deriveEqualLineDiscountBase(this, that *LineDiscountBase) bool", + "line": 35 + }, + { + "kind": "func", + "name": "deriveEqualAmountLineDiscount", + "signature": "func deriveEqualAmountLineDiscount(this, that *AmountLineDiscount) bool", + "line": 45 + }, + { + "kind": "func", + "name": "deriveEqualAmountLineDiscountManaged", + "signature": "func deriveEqualAmountLineDiscountManaged(this, that *AmountLineDiscountManaged) bool", + "line": 54 + }, + { + "kind": "func", + "name": "deriveEqualUsageLineDiscount", + "signature": "func deriveEqualUsageLineDiscount(this, that *UsageLineDiscount) bool", + "line": 62 + }, + { + "kind": "func", + "name": "deriveEqualUsageLineDiscountManaged", + "signature": "func deriveEqualUsageLineDiscountManaged(this, that *UsageLineDiscountManaged) bool", + "line": 71 + }, + { + "kind": "func", + "name": "deriveEqualLineBase", + "signature": "func deriveEqualLineBase(this, that *StandardLineBase) bool", + "line": 79 + }, + { + "kind": "func", + "name": "deriveEqualUsageBasedLine", + "signature": "func deriveEqualUsageBasedLine(this, that *UsageBasedLine) bool", + "line": 105 + }, + { + "kind": "func", + "name": "deriveEqual", + "signature": "func deriveEqual(this, that *models.ManagedResource) bool", + "line": 118 + }, + { + "kind": "func", + "name": "deriveEqual_", + "signature": "func deriveEqual_(this, that *Discounts) bool", + "line": 129 + }, + { + "kind": "func", + "name": "deriveEqual_1", + "signature": "func deriveEqual_1(this, that *SubscriptionReference) bool", + "line": 137 + }, + { + "kind": "func", + "name": "deriveEqual_2", + "signature": "func deriveEqual_2(this, that *DiscountReason) bool", + "line": 147 + }, + { + "kind": "func", + "name": "deriveEqual_3", + "signature": "func deriveEqual_3(this, that []creditsapplied.CreditApplied) bool", + "line": 156 + }, + { + "kind": "func", + "name": "deriveEqual_4", + "signature": "func deriveEqual_4(this, that *creditsapplied.CreditApplied) bool", + "line": 172 + } + ], + "line_count": 178 + }, + "openmeter/billing/discount.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PercentageDiscount", + "signature": "type PercentageDiscount struct", + "line": 24 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d PercentageDiscount) Clone() PercentageDiscount", + "line": 30 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (d PercentageDiscount) Equal(other PercentageDiscount) bool", + "line": 37 + }, + { + "kind": "struct", + "name": "UsageDiscount", + "signature": "type UsageDiscount struct", + "line": 49 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d UsageDiscount) Clone() UsageDiscount", + "line": 57 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (d UsageDiscount) Equal(other UsageDiscount) bool", + "line": 64 + }, + { + "kind": "struct", + "name": "Discounts", + "signature": "type Discounts struct", + "line": 78 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d Discounts) Clone() Discounts", + "line": 83 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (d Discounts) IsEmpty() bool", + "line": 97 + }, + { + "kind": "func", + "name": "ValidateForPrice", + "signature": "func (d Discounts) ValidateForPrice(price *productcatalog.Price) error", + "line": 101 + }, + { + "kind": "interface", + "name": "discountReason", + "signature": "type discountReason interface", + "line": 114 + }, + { + "kind": "struct", + "name": "MaximumSpendDiscount", + "signature": "type MaximumSpendDiscount struct", + "line": 145 + }, + { + "kind": "struct", + "name": "DiscountReason", + "signature": "type DiscountReason struct", + "line": 147 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (d *DiscountReason) MarshalJSON() ([]byte, error)", + "line": 193 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (d *DiscountReason) UnmarshalJSON(bytes []byte) error", + "line": 231 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (d *DiscountReason) Type() DiscountReasonType", + "line": 266 + }, + { + "kind": "func", + "name": "AsRatecardPercentage", + "signature": "func (d *DiscountReason) AsRatecardPercentage() (PercentageDiscount, error)", + "line": 270 + }, + { + "kind": "func", + "name": "AsRatecardUsage", + "signature": "func (d *DiscountReason) AsRatecardUsage() (UsageDiscount, error)", + "line": 282 + }, + { + "kind": "func", + "name": "AsMaximumSpend", + "signature": "func (d *DiscountReason) AsMaximumSpend() (MaximumSpendDiscount, error)", + "line": 294 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d *DiscountReason) Validate() error", + "line": 302 + } + ], + "line_count": 313 + }, + "openmeter/billing/errors.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 82 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e NotFoundError) Error() string", + "line": 88 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e NotFoundError) Unwrap() error", + "line": 97 + }, + { + "kind": "struct", + "name": "genericError", + "signature": "type genericError struct", + "line": 101 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ValidationError) Error() string", + "line": 127 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e ValidationError) Unwrap() error", + "line": 131 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e UpdateAfterDeleteError) Error() string", + "line": 139 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e UpdateAfterDeleteError) Unwrap() error", + "line": 143 + }, + { + "kind": "struct", + "name": "AppError", + "signature": "type AppError struct", + "line": 150 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AppError) Error() string", + "line": 156 + }, + { + "kind": "struct", + "name": "ErrSnapshotInvalidDatabaseState", + "signature": "type ErrSnapshotInvalidDatabaseState struct", + "line": 163 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ErrSnapshotInvalidDatabaseState) Error() string", + "line": 167 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e ErrSnapshotInvalidDatabaseState) Unwrap() error", + "line": 171 + } + ], + "line_count": 173 + }, + "openmeter/billing/events.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoiceApps", + "signature": "type InvoiceApps struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a InvoiceApps) Validate() error", + "line": 21 + }, + { + "kind": "struct", + "name": "EventStandardInvoice", + "signature": "type EventStandardInvoice struct", + "line": 39 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EventStandardInvoice) Validate() error", + "line": 44 + }, + { + "kind": "func", + "name": "NewEventStandardInvoice", + "signature": "func NewEventStandardInvoice(invoice StandardInvoice) (EventStandardInvoice, error)", + "line": 58 + }, + { + "kind": "struct", + "name": "StandardInvoiceCreatedEvent", + "signature": "type StandardInvoiceCreatedEvent struct", + "line": 96 + }, + { + "kind": "func", + "name": "NewStandardInvoiceCreatedEvent", + "signature": "func NewStandardInvoiceCreatedEvent(invoice StandardInvoice) (StandardInvoiceCreatedEvent, error)", + "line": 100 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e StandardInvoiceCreatedEvent) EventName() string", + "line": 109 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e StandardInvoiceCreatedEvent) EventMetadata() metadata.EventMetadata", + "line": 117 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e StandardInvoiceCreatedEvent) Validate() error", + "line": 124 + }, + { + "kind": "struct", + "name": "StandardInvoiceUpdatedEvent", + "signature": "type StandardInvoiceUpdatedEvent struct", + "line": 128 + }, + { + "kind": "func", + "name": "NewStandardInvoiceUpdatedEvent", + "signature": "func NewStandardInvoiceUpdatedEvent(new StandardInvoice, old EventStandardInvoice) (StandardInvoiceUpdatedEvent, error)", + "line": 133 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e StandardInvoiceUpdatedEvent) EventName() string", + "line": 145 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e StandardInvoiceUpdatedEvent) EventMetadata() metadata.EventMetadata", + "line": 153 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e StandardInvoiceUpdatedEvent) Validate() error", + "line": 160 + }, + { + "kind": "struct", + "name": "AdvanceStandardInvoiceEvent", + "signature": "type AdvanceStandardInvoiceEvent struct", + "line": 164 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AdvanceStandardInvoiceEvent) EventName() string", + "line": 169 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AdvanceStandardInvoiceEvent) EventMetadata() metadata.EventMetadata", + "line": 177 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AdvanceStandardInvoiceEvent) Validate() error", + "line": 184 + } + ], + "line_count": 194 + }, + "openmeter/billing/eventsgathering.go": { + "header": "type GatheringInvoiceCreatedEvent struct {\n\tInvoice GatheringInvoice `json:\"gatheringInvoice\"`\n}", + "symbols": [ + { + "kind": "struct", + "name": "GatheringInvoiceCreatedEvent", + "signature": "type GatheringInvoiceCreatedEvent struct", + "line": 5 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e GatheringInvoiceCreatedEvent) Validate() error", + "line": 9 + }, + { + "kind": "func", + "name": "NewGatheringInvoiceCreatedEvent", + "signature": "func NewGatheringInvoiceCreatedEvent(invoice GatheringInvoice) GatheringInvoiceCreatedEvent", + "line": 13 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e GatheringInvoiceCreatedEvent) EventName() string", + "line": 17 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e GatheringInvoiceCreatedEvent) EventMetadata() metadata.EventMetadata", + "line": 25 + } + ], + "line_count": 30 + }, + "openmeter/billing/gatheringinvoice.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "GatheringInvoiceBase", + "signature": "type GatheringInvoiceBase struct", + "line": 26 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g GatheringInvoiceBase) Validate() error", + "line": 41 + }, + { + "kind": "struct", + "name": "GatheringInvoice", + "signature": "type GatheringInvoice struct", + "line": 69 + }, + { + "kind": "func", + "name": "WithoutDBState", + "signature": "func (g GatheringInvoice) WithoutDBState() (GatheringInvoice, error)", + "line": 82 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (g GatheringInvoice) GetID() string", + "line": 98 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (g GatheringInvoice) GetInvoiceID() InvoiceID", + "line": 102 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (g GatheringInvoice) GetDeletedAt() *time.Time", + "line": 109 + }, + { + "kind": "func", + "name": "AsInvoice", + "signature": "func (g GatheringInvoice) AsInvoice() Invoice", + "line": 113 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g GatheringInvoice) Validate() error", + "line": 120 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (g GatheringInvoice) GetCustomerID() customer.CustomerID", + "line": 134 + }, + { + "kind": "func", + "name": "SortLines", + "signature": "func (g *GatheringInvoice) SortLines()", + "line": 141 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (g GatheringInvoice) Clone() (GatheringInvoice, error)", + "line": 149 + }, + { + "kind": "func", + "name": "GetGenericLines", + "signature": "func (g GatheringInvoice) GetGenericLines() mo.Option[[]GenericInvoiceLine]", + "line": 167 + }, + { + "kind": "func", + "name": "SetLines", + "signature": "func (g *GatheringInvoice) SetLines(lines []GenericInvoiceLine) error", + "line": 177 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e GatheringInvoiceExpand) Values() []GatheringInvoiceExpand", + "line": 198 + }, + { + "kind": "func", + "name": "NewGatheringInvoiceExpands", + "signature": "func NewGatheringInvoiceExpands(values ...GatheringInvoiceExpand) GatheringInvoiceExpands", + "line": 211 + }, + { + "kind": "struct", + "name": "GatheringInvoiceAvailableActions", + "signature": "type GatheringInvoiceAvailableActions struct", + "line": 215 + }, + { + "kind": "func", + "name": "ToStandardLines", + "signature": "func (l GatheringLines) ToStandardLines(invoiceID string) (StandardLines, error)", + "line": 221 + }, + { + "kind": "func", + "name": "ValidateStandardLineIDsMatchGatheringLinesUnordered", + "signature": "func ValidateStandardLineIDsMatchGatheringLinesUnordered(expected GatheringLines, actual StandardLines) error", + "line": 234 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l GatheringLines) Validate() error", + "line": 249 + }, + { + "kind": "func", + "name": "AsGenericLines", + "signature": "func (l GatheringLines) AsGenericLines() []GenericInvoiceLine", + "line": 261 + }, + { + "kind": "struct", + "name": "GatheringInvoiceLines", + "signature": "type GatheringInvoiceLines struct", + "line": 267 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l GatheringInvoiceLines) Validate() error", + "line": 271 + }, + { + "kind": "func", + "name": "Sort", + "signature": "func (l *GatheringInvoiceLines) Sort()", + "line": 279 + }, + { + "kind": "func", + "name": "NonDeletedLineCount", + "signature": "func (l GatheringInvoiceLines) NonDeletedLineCount() int", + "line": 292 + }, + { + "kind": "func", + "name": "NonDeletedLines", + "signature": "func (l GatheringInvoiceLines) NonDeletedLines() GatheringLines", + "line": 298 + }, + { + "kind": "func", + "name": "Map", + "signature": "func (l GatheringInvoiceLines) Map(fn func(GatheringLine) GatheringLine) GatheringInvoiceLines", + "line": 304 + }, + { + "kind": "func", + "name": "MapWithErr", + "signature": "func (l GatheringInvoiceLines) MapWithErr(fn func(GatheringLine) (GatheringLine, error)) (GatheringInvoiceLines, error)", + "line": 312 + }, + { + "kind": "func", + "name": "WithNormalizedValues", + "signature": "func (l GatheringInvoiceLines) WithNormalizedValues() (GatheringInvoiceLines, error)", + "line": 327 + }, + { + "kind": "func", + "name": "Append", + "signature": "func (l *GatheringInvoiceLines) Append(lines ...GatheringLine)", + "line": 333 + }, + { + "kind": "func", + "name": "GetReferencedFeatureKeys", + "signature": "func (l GatheringInvoiceLines) GetReferencedFeatureKeys() ([]string, error)", + "line": 337 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (l GatheringInvoiceLines) GetByID(id string) (GatheringLine, bool)", + "line": 354 + }, + { + "kind": "func", + "name": "ReplaceByID", + "signature": "func (l *GatheringInvoiceLines) ReplaceByID(line GatheringLine) error", + "line": 369 + }, + { + "kind": "func", + "name": "NewGatheringInvoiceLines", + "signature": "func NewGatheringInvoiceLines(children []GatheringLine) GatheringInvoiceLines", + "line": 385 + }, + { + "kind": "struct", + "name": "GatheringLineBase", + "signature": "type GatheringLineBase struct", + "line": 391 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (i GatheringLineBase) GetChargeID() *string", + "line": 418 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GatheringLineBase) Validate() error", + "line": 422 + }, + { + "kind": "func", + "name": "NormalizeValues", + "signature": "func (i *GatheringLineBase) NormalizeValues() error", + "line": 486 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i GatheringLineBase) Clone() (GatheringLineBase, error)", + "line": 496 + }, + { + "kind": "func", + "name": "GetFeatureKey", + "signature": "func (i GatheringLineBase) GetFeatureKey() string", + "line": 521 + }, + { + "kind": "func", + "name": "GetServicePeriod", + "signature": "func (i GatheringLineBase) GetServicePeriod() timeutil.ClosedPeriod", + "line": 525 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (i GatheringLineBase) GetPrice() *productcatalog.Price", + "line": 529 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (i *GatheringLineBase) SetPrice(price productcatalog.Price)", + "line": 533 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (i GatheringLineBase) GetID() string", + "line": 537 + }, + { + "kind": "func", + "name": "GetInvoiceAt", + "signature": "func (i GatheringLineBase) GetInvoiceAt() time.Time", + "line": 541 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (g *GatheringLineBase) SetInvoiceAt(at time.Time)", + "line": 545 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (i GatheringLineBase) GetChildUniqueReferenceID() *string", + "line": 549 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (i *GatheringLineBase) SetChildUniqueReferenceID(id *string)", + "line": 553 + }, + { + "kind": "func", + "name": "GetSplitLineGroupID", + "signature": "func (i GatheringLineBase) GetSplitLineGroupID() *string", + "line": 557 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (g GatheringLineBase) GetLineID() LineID", + "line": 561 + }, + { + "kind": "func", + "name": "GetManagedBy", + "signature": "func (g GatheringLineBase) GetManagedBy() InvoiceLineManagedBy", + "line": 568 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (g GatheringLineBase) GetAnnotations() models.Annotations", + "line": 572 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (g *GatheringLineBase) SetDeletedAt(at *time.Time)", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateServicePeriod", + "signature": "func (g *GatheringLineBase) UpdateServicePeriod(fn func(p *timeutil.ClosedPeriod))", + "line": 580 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (g GatheringLineBase) GetInvoiceID() string", + "line": 584 + }, + { + "kind": "func", + "name": "GetRateCardDiscounts", + "signature": "func (g GatheringLineBase) GetRateCardDiscounts() Discounts", + "line": 588 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (g GatheringLineBase) Equal(other GatheringLineBase) bool", + "line": 592 + }, + { + "kind": "func", + "name": "GetSubscriptionReference", + "signature": "func (g GatheringLineBase) GetSubscriptionReference() *SubscriptionReference", + "line": 596 + }, + { + "kind": "struct", + "name": "gatheringInvoiceLineGenericWrapper", + "signature": "type gatheringInvoiceLineGenericWrapper struct", + "line": 611 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i gatheringInvoiceLineGenericWrapper) Clone() (GenericInvoiceLine, error)", + "line": 615 + }, + { + "kind": "func", + "name": "CloneWithoutChildren", + "signature": "func (i gatheringInvoiceLineGenericWrapper) CloneWithoutChildren() (GenericInvoiceLine, error)", + "line": 624 + }, + { + "kind": "struct", + "name": "GatheringLine", + "signature": "type GatheringLine struct", + "line": 629 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (g GatheringLine) Clone() (GatheringLine, error)", + "line": 636 + }, + { + "kind": "func", + "name": "CloneForCreate", + "signature": "func (i GatheringLine) CloneForCreate(edits ...func(*GatheringLine)) (GatheringLine, error)", + "line": 648 + }, + { + "kind": "func", + "name": "WithoutDBState", + "signature": "func (g GatheringLine) WithoutDBState() (GatheringLine, error)", + "line": 668 + }, + { + "kind": "func", + "name": "WithNormalizedValues", + "signature": "func (g GatheringLine) WithNormalizedValues() (GatheringLine, error)", + "line": 678 + }, + { + "kind": "func", + "name": "AsInvoiceLine", + "signature": "func (g GatheringLine) AsInvoiceLine() InvoiceLine", + "line": 691 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (g GatheringLine) Equal(other GatheringLine) bool", + "line": 698 + }, + { + "kind": "func", + "name": "RemoveMetaForCompare", + "signature": "func (g GatheringLine) RemoveMetaForCompare() (GatheringLine, error)", + "line": 702 + }, + { + "kind": "func", + "name": "SetSplitLineHierarchy", + "signature": "func (g *GatheringLine) SetSplitLineHierarchy(hierarchy *SplitLineHierarchy)", + "line": 706 + }, + { + "kind": "func", + "name": "AsNewStandardLine", + "signature": "func (g GatheringLine) AsNewStandardLine(invoiceID string) (*StandardLine, error)", + "line": 710 + }, + { + "kind": "struct", + "name": "CreatePendingInvoiceLinesInput", + "signature": "type CreatePendingInvoiceLinesInput struct", + "line": 773 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreatePendingInvoiceLinesInput) Validate() error", + "line": 780 + }, + { + "kind": "struct", + "name": "CreatePendingInvoiceLinesResult", + "signature": "type CreatePendingInvoiceLinesResult struct", + "line": 811 + }, + { + "kind": "struct", + "name": "CreateGatheringInvoiceAdapterInput", + "signature": "type CreateGatheringInvoiceAdapterInput struct", + "line": 817 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreateGatheringInvoiceAdapterInput) Validate() error", + "line": 831 + }, + { + "kind": "struct", + "name": "ListGatheringInvoicesInput", + "signature": "type ListGatheringInvoicesInput struct", + "line": 861 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListGatheringInvoicesInput) Validate() error", + "line": 875 + }, + { + "kind": "func", + "name": "NewFlatFeeGatheringLine", + "signature": "func NewFlatFeeGatheringLine(input NewFlatFeeLineInput, opts ...usageBasedLineOption) GatheringLine", + "line": 897 + }, + { + "kind": "struct", + "name": "GetGatheringInvoiceByIdInput", + "signature": "type GetGatheringInvoiceByIdInput struct", + "line": 939 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetGatheringInvoiceByIdInput) Validate() error", + "line": 944 + }, + { + "kind": "struct", + "name": "UpdateGatheringInvoiceInput", + "signature": "type UpdateGatheringInvoiceInput struct", + "line": 958 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateGatheringInvoiceInput) Validate() error", + "line": 965 + }, + { + "kind": "struct", + "name": "PrepareBillableLinesResult", + "signature": "type PrepareBillableLinesResult struct", + "line": 979 + } + ], + "line_count": 981 + }, + "openmeter/billing/gatheringinvoice_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestGatheringInvoiceLineInvoiceAtAccessor", + "signature": "func TestGatheringInvoiceLineInvoiceAtAccessor(t *testing.T)", + "line": 11 + } + ], + "line_count": 34 + }, + "openmeter/billing/generate.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "openmeter/billing/httpdriver/customeroverride.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (h *handler) ListCustomerOverrides() ListCustomerOverridesHandler", + "line": 28 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (h *handler) GetCustomerOverride() GetCustomerOverrideHandler", + "line": 104 + }, + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (h *handler) UpsertCustomerOverride() UpsertCustomerOverrideHandler", + "line": 156 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (h *handler) DeleteCustomerOverride() DeleteCustomerOverrideHandler", + "line": 203 + }, + { + "kind": "func", + "name": "mapCustomerOverrideExpandToEntity", + "signature": "func (h *handler) mapCustomerOverrideExpandToEntity(in *api.BillingProfileListCustomerOverridesParamsExpand) (billing.CustomerOverrideExpand, error)", + "line": 235 + }, + { + "kind": "func", + "name": "mapCustomerOverrideToAPI", + "signature": "func (h *handler) mapCustomerOverrideToAPI(ctx context.Context, in billing.CustomerOverrideWithDetails) (api.BillingProfileCustomerOverrideWithDetails, error)", + "line": 256 + }, + { + "kind": "func", + "name": "mapCustomerProfileToAPI", + "signature": "func (h *handler) mapCustomerProfileToAPI(ctx context.Context, in billing.Profile) (api.BillingCustomerProfile, error)", + "line": 298 + } + ], + "line_count": 309 + }, + "openmeter/billing/httpdriver/defaults.go": { + "header": "const (\n\tDefaultPageSize = 100\n\tDefaultPageNumber = 1", + "symbols": [], + "line_count": 8 + }, + "openmeter/billing/httpdriver/deprecations.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "struct", + "name": "invoiceLineRateCardItems", + "signature": "type invoiceLineRateCardItems struct", + "line": 18 + }, + { + "kind": "func", + "name": "ValidateDeprecatedFields", + "signature": "func (i *invoiceLineRateCardItems) ValidateDeprecatedFields() error", + "line": 27 + }, + { + "kind": "func", + "name": "ValidateRateCard", + "signature": "func (i *invoiceLineRateCardItems) ValidateRateCard() error", + "line": 47 + }, + { + "kind": "struct", + "name": "invoiceLineRateCardParsed", + "signature": "type invoiceLineRateCardParsed struct", + "line": 95 + }, + { + "kind": "func", + "name": "mapAndValidateInvoiceLineRateCardDeprecatedFields", + "signature": "func mapAndValidateInvoiceLineRateCardDeprecatedFields(in invoiceLineRateCardItems) (*invoiceLineRateCardParsed, error)", + "line": 102 + } + ], + "line_count": 157 + }, + "openmeter/billing/httpdriver/deprecations_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestUsageBasedLineParser", + "signature": "func TestUsageBasedLineParser(t *testing.T)", + "line": 13 + } + ], + "line_count": 91 + }, + "openmeter/billing/httpdriver/discounts.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "AsPercentageDiscount", + "signature": "func AsPercentageDiscount(d api.BillingDiscountPercentage) billing.PercentageDiscount", + "line": 13 + }, + { + "kind": "func", + "name": "AsUsageDiscount", + "signature": "func AsUsageDiscount(d api.BillingDiscountUsage) (billing.UsageDiscount, error)", + "line": 20 + }, + { + "kind": "func", + "name": "AsDiscounts", + "signature": "func AsDiscounts(discounts *api.BillingDiscounts) (billing.Discounts, error)", + "line": 34 + } + ], + "line_count": 64 + }, + "openmeter/billing/httpdriver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 12 + } + ], + "line_count": 21 + }, + "openmeter/billing/httpdriver/gatheringinvoice.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "MapGatheringInvoiceToAPI", + "signature": "func MapGatheringInvoiceToAPI(invoice billing.GatheringInvoice, customer *customer.Customer, profile billing.Profile) (api.Invoice, error)", + "line": 17 + }, + { + "kind": "func", + "name": "mapServicePeriodToAPI", + "signature": "func mapServicePeriodToAPI(p timeutil.ClosedPeriod) *api.Period", + "line": 92 + }, + { + "kind": "func", + "name": "mapGatheringInvoiceLineToAPI", + "signature": "func mapGatheringInvoiceLineToAPI(line billing.GatheringLine) (api.InvoiceLine, error)", + "line": 103 + } + ], + "line_count": 151 + }, + "openmeter/billing/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 18 + }, + { + "kind": "interface", + "name": "ProfileHandler", + "signature": "type ProfileHandler interface", + "line": 25 + }, + { + "kind": "interface", + "name": "InvoiceLineHandler", + "signature": "type InvoiceLineHandler interface", + "line": 33 + }, + { + "kind": "interface", + "name": "InvoiceHandler", + "signature": "type InvoiceHandler interface", + "line": 37 + }, + { + "kind": "interface", + "name": "CustomerOverrideHandler", + "signature": "type CustomerOverrideHandler interface", + "line": 47 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 54 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 62 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tlogger *slog.Logger,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tfeatureSwitches config.BillingFeatureSwitchesConfiguration,\n\tservice billing.Service,\n\tappService app.Service,\n\tstripeAppService appstripe.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 71 + } + ], + "line_count": 87 + }, + "openmeter/billing/httpdriver/invoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListInvoices", + "signature": "func (h *handler) ListInvoices() ListInvoicesHandler", + "line": 40 + }, + { + "kind": "func", + "name": "InvoicePendingLinesAction", + "signature": "func (h *handler) InvoicePendingLinesAction() InvoicePendingLinesActionHandler", + "line": 132 + }, + { + "kind": "func", + "name": "GetInvoice", + "signature": "func (h *handler) GetInvoice() GetInvoiceHandler", + "line": 215 + }, + { + "kind": "func", + "name": "ProgressInvoice", + "signature": "func (h *handler) ProgressInvoice(action ProgressAction) ProgressInvoiceHandler", + "line": 289 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (h *handler) DeleteInvoice() DeleteInvoiceHandler", + "line": 349 + }, + { + "kind": "func", + "name": "SimulateInvoice", + "signature": "func (h *handler) SimulateInvoice() SimulateInvoiceHandler", + "line": 404 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (h *handler) UpdateInvoice() UpdateInvoiceHandler", + "line": 463 + }, + { + "kind": "func", + "name": "MapInvoiceToAPI", + "signature": "func (h *handler) MapInvoiceToAPI(ctx context.Context, invoice billing.Invoice) (api.Invoice, error)", + "line": 544 + }, + { + "kind": "func", + "name": "MapStandardInvoiceToAPI", + "signature": "func MapStandardInvoiceToAPI(invoice billing.StandardInvoice) (api.Invoice, error)", + "line": 577 + }, + { + "kind": "func", + "name": "mapInvoiceAppExternalIdsToAPI", + "signature": "func mapInvoiceAppExternalIdsToAPI(externalIds externalid.InvoiceExternalIDs) *api.InvoiceAppExternalIds", + "line": 686 + }, + { + "kind": "func", + "name": "MapEventInvoiceToAPI", + "signature": "func MapEventInvoiceToAPI(event billing.EventStandardInvoice) (api.Invoice, error)", + "line": 697 + }, + { + "kind": "func", + "name": "mapPeriodToAPI", + "signature": "func mapPeriodToAPI(p *timeutil.ClosedPeriod) *api.Period", + "line": 739 + }, + { + "kind": "func", + "name": "mapInvoiceCustomerToAPI", + "signature": "func mapInvoiceCustomerToAPI(c billing.InvoiceCustomer) api.BillingInvoiceCustomerExtendedDetails", + "line": 751 + }, + { + "kind": "func", + "name": "mapInvoiceExpandsToEntity", + "signature": "func mapInvoiceExpandsToEntity(expand []api.InvoiceExpand) billing.InvoiceExpands", + "line": 783 + }, + { + "kind": "func", + "name": "mapTotalsToAPI", + "signature": "func mapTotalsToAPI(t totals.Totals) api.InvoiceTotals", + "line": 792 + }, + { + "kind": "func", + "name": "mapInvoiceAvailableActionsToAPI", + "signature": "func mapInvoiceAvailableActionsToAPI(actions billing.StandardInvoiceAvailableActions) api.InvoiceAvailableActions", + "line": 805 + }, + { + "kind": "func", + "name": "mapInvoiceAvailableActionDetailsToAPI", + "signature": "func mapInvoiceAvailableActionDetailsToAPI(actions *billing.StandardInvoiceAvailableActionDetails) *api.InvoiceAvailableActionDetails", + "line": 817 + }, + { + "kind": "func", + "name": "mergeInvoiceSupplierFromAPI", + "signature": "func mergeInvoiceSupplierFromAPI(existing billing.SupplierContact, updatedSupplier api.BillingPartyReplaceUpdate) billing.SupplierContact", + "line": 827 + }, + { + "kind": "func", + "name": "mergeInvoiceCustomerFromAPI", + "signature": "func mergeInvoiceCustomerFromAPI(existing billing.InvoiceCustomer, updatedCustomer api.BillingPartyReplaceUpdate) billing.InvoiceCustomer", + "line": 846 + }, + { + "kind": "func", + "name": "mergeInvoiceWorkflowFromAPI", + "signature": "func mergeInvoiceWorkflowFromAPI(existing billing.InvoiceWorkflow, updatedWorkflow api.InvoiceWorkflowReplaceUpdate) (billing.InvoiceWorkflow, error)", + "line": 859 + } + ], + "line_count": 897 + }, + "openmeter/billing/httpdriver/invoice_test.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoicingTestSuite", + "signature": "type InvoicingTestSuite struct", + "line": 26 + }, + { + "kind": "func", + "name": "TestInvoicingTax", + "signature": "func TestInvoicingTax(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestMapTotalsToAPIIncludesCreditsTotal", + "signature": "func TestMapTotalsToAPIIncludesCreditsTotal(t *testing.T)", + "line": 34 + }, + { + "kind": "func", + "name": "TestMapInvoiceLineCreditsToAPI", + "signature": "func TestMapInvoiceLineCreditsToAPI(t *testing.T)", + "line": 49 + }, + { + "kind": "func", + "name": "TestMapInvoiceLineCreditsToAPIOmitsEmptyCredits", + "signature": "func TestMapInvoiceLineCreditsToAPIOmitsEmptyCredits(t *testing.T)", + "line": 70 + }, + { + "kind": "func", + "name": "TestGatheringInvoiceSerialization", + "signature": "func (s *InvoicingTestSuite) TestGatheringInvoiceSerialization()", + "line": 74 + }, + { + "kind": "func", + "name": "toString", + "signature": "func toString(member any) (string, error)", + "line": 265 + } + ], + "line_count": 274 + }, + "openmeter/billing/httpdriver/invoiceline.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePendingLine", + "signature": "func (h *handler) CreatePendingLine() CreatePendingLineHandler", + "line": 47 + }, + { + "kind": "func", + "name": "mapCreateLineToEntity", + "signature": "func mapCreateLineToEntity(line api.InvoicePendingLineCreate, ns string) (*billing.StandardLine, error)", + "line": 134 + }, + { + "kind": "func", + "name": "mapCreateGatheringLineToEntity", + "signature": "func mapCreateGatheringLineToEntity(line api.InvoicePendingLineCreate, ns string) (billing.GatheringLine, error)", + "line": 173 + }, + { + "kind": "func", + "name": "mapTaxConfigToEntity", + "signature": "func mapTaxConfigToEntity(tc *api.TaxConfig) *productcatalog.TaxConfig", + "line": 214 + }, + { + "kind": "func", + "name": "mapTaxConfigToAPI", + "signature": "func mapTaxConfigToAPI(to *productcatalog.TaxConfig) *api.TaxConfig", + "line": 222 + }, + { + "kind": "func", + "name": "mapDetailedLinesToAPI", + "signature": "func mapDetailedLinesToAPI(lines billing.DetailedLines, invoiceAt time.Time, taxConfig *productcatalog.TaxConfig) (*[]api.InvoiceDetailedLine, error)", + "line": 230 + }, + { + "kind": "func", + "name": "mapDetailedLineToAPI", + "signature": "func mapDetailedLineToAPI(line billing.DetailedLine, invoiceAt time.Time, taxConfig *productcatalog.TaxConfig) (api.InvoiceDetailedLine, error)", + "line": 241 + }, + { + "kind": "func", + "name": "mapLineAppExternalIdsToAPI", + "signature": "func mapLineAppExternalIdsToAPI(externalIds externalid.LineExternalIDs) *api.InvoiceLineAppExternalIds", + "line": 303 + }, + { + "kind": "func", + "name": "mapInvoiceLineToAPI", + "signature": "func mapInvoiceLineToAPI(line *billing.StandardLine) (api.InvoiceLine, error)", + "line": 313 + }, + { + "kind": "func", + "name": "mapSubscriptionReferencesToAPI", + "signature": "func mapSubscriptionReferencesToAPI(optSub *billing.SubscriptionReference) *api.InvoiceLineSubscriptionReference", + "line": 393 + }, + { + "kind": "func", + "name": "mapInvoiceLineCreditsToAPI", + "signature": "func mapInvoiceLineCreditsToAPI(credits billing.CreditsApplied) *[]api.InvoiceLineCreditAllocation", + "line": 418 + }, + { + "kind": "func", + "name": "mapDiscountsToAPI", + "signature": "func mapDiscountsToAPI(discounts billing.StandardLineDiscounts) (*api.InvoiceLineDiscounts, error)", + "line": 433 + }, + { + "kind": "func", + "name": "mapInvoiceLineAmountDiscountsToAPI", + "signature": "func mapInvoiceLineAmountDiscountsToAPI(amountDiscounts billing.AmountLineDiscountsManaged) (*[]api.InvoiceLineAmountDiscount, error)", + "line": 448 + }, + { + "kind": "func", + "name": "mapInvoiceLineUsageDiscountsToAPI", + "signature": "func mapInvoiceLineUsageDiscountsToAPI(usageDiscounts billing.UsageLineDiscountsManaged) (*[]api.InvoiceLineUsageDiscount, error)", + "line": 477 + }, + { + "kind": "func", + "name": "mapDiscountReasonToAPI", + "signature": "func mapDiscountReasonToAPI(reason billing.DiscountReason) (api.BillingDiscountReason, error)", + "line": 507 + }, + { + "kind": "func", + "name": "decimalPtrToStringPtr", + "signature": "func decimalPtrToStringPtr(d *alpacadecimal.Decimal) *string", + "line": 549 + }, + { + "kind": "func", + "name": "decimalPtrToStringPtrIgnoringZeroValue", + "signature": "func decimalPtrToStringPtrIgnoringZeroValue(d *alpacadecimal.Decimal) *string", + "line": 557 + }, + { + "kind": "func", + "name": "decimalPtrToStringPtrIfNotEqual", + "signature": "func decimalPtrToStringPtrIfNotEqual(value *alpacadecimal.Decimal, other *alpacadecimal.Decimal) *string", + "line": 570 + }, + { + "kind": "func", + "name": "mapSimulationLineToEntity", + "signature": "func mapSimulationLineToEntity(line api.InvoiceSimulationLine) (*billing.StandardLine, error)", + "line": 586 + }, + { + "kind": "func", + "name": "standardLineFromInvoiceLineReplaceUpdate", + "signature": "func standardLineFromInvoiceLineReplaceUpdate(line api.InvoiceLineReplaceUpdate, invoice *billing.StandardInvoice) (*billing.StandardLine, error)", + "line": 651 + }, + { + "kind": "func", + "name": "gatheringLineFromInvoiceLineReplaceUpdate", + "signature": "func gatheringLineFromInvoiceLineReplaceUpdate(line api.InvoiceLineReplaceUpdate, invoice *billing.GatheringInvoice) (billing.GatheringLine, error)", + "line": 694 + }, + { + "kind": "func", + "name": "mergeStandardLineFromInvoiceLineReplaceUpdate", + "signature": "func mergeStandardLineFromInvoiceLineReplaceUpdate(existing *billing.StandardLine, line api.InvoiceLineReplaceUpdate) (*billing.StandardLine, bool, error)", + "line": 739 + }, + { + "kind": "func", + "name": "mergeGatheringLineFromInvoiceLineReplaceUpdate", + "signature": "func mergeGatheringLineFromInvoiceLineReplaceUpdate(existing billing.GatheringLine, line api.InvoiceLineReplaceUpdate) (billing.GatheringLine, error)", + "line": 819 + }, + { + "kind": "func", + "name": "mergeStandardInvoiceLinesFromAPI", + "signature": "func (h *handler) mergeStandardInvoiceLinesFromAPI(ctx context.Context, invoice *billing.StandardInvoice, updatedLines []api.InvoiceLineReplaceUpdate) (billing.StandardInvoiceLines, error)", + "line": 905 + }, + { + "kind": "func", + "name": "mergeGatheringInvoiceLinesFromAPI", + "signature": "func (h *handler) mergeGatheringInvoiceLinesFromAPI(ctx context.Context, invoice *billing.GatheringInvoice, updatedLines []api.InvoiceLineReplaceUpdate) (billing.GatheringInvoiceLines, error)", + "line": 972 + } + ], + "line_count": 1017 + }, + "openmeter/billing/httpdriver/profile.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateProfile", + "signature": "func (h *handler) CreateProfile() CreateProfileHandler", + "line": 34 + }, + { + "kind": "func", + "name": "GetProfile", + "signature": "func (h *handler) GetProfile() GetProfileHandler", + "line": 108 + }, + { + "kind": "func", + "name": "DeleteProfile", + "signature": "func (h *handler) DeleteProfile() DeleteProfileHandler", + "line": 147 + }, + { + "kind": "func", + "name": "UpdateProfile", + "signature": "func (h *handler) UpdateProfile() UpdateProfileHandler", + "line": 182 + }, + { + "kind": "func", + "name": "ListProfiles", + "signature": "func (h *handler) ListProfiles() ListProfilesHandler", + "line": 240 + }, + { + "kind": "func", + "name": "apiBillingPartyCreateToSupplierContact", + "signature": "func apiBillingPartyCreateToSupplierContact(c api.BillingParty) billing.SupplierContact", + "line": 293 + }, + { + "kind": "func", + "name": "apiBillingPartyToSupplierContact", + "signature": "func apiBillingPartyToSupplierContact(c api.BillingParty) billing.SupplierContact", + "line": 321 + }, + { + "kind": "func", + "name": "fromAPIBillingWorkflow", + "signature": "func fromAPIBillingWorkflow(i api.BillingWorkflow) (billing.WorkflowConfig, error)", + "line": 349 + }, + { + "kind": "func", + "name": "fromAPIBillingWorkflowCreate", + "signature": "func fromAPIBillingWorkflowCreate(i api.BillingWorkflowCreate) (billing.WorkflowConfig, error)", + "line": 408 + }, + { + "kind": "func", + "name": "parseDurationPtr", + "signature": "func parseDurationPtr(d *string, defaultDuration datetime.ISODuration) (datetime.ISODuration, error)", + "line": 412 + }, + { + "kind": "func", + "name": "MapProfileToApi", + "signature": "func (h *handler) MapProfileToApi(ctx context.Context, p *billing.Profile) (api.BillingProfile, error)", + "line": 420 + }, + { + "kind": "func", + "name": "mapProfileAppsToAPI", + "signature": "func mapProfileAppsToAPI(a *billing.ProfileApps) (*api.BillingProfileAppsOrReference, error)", + "line": 468 + }, + { + "kind": "func", + "name": "mapProfileAppReferencesToAPI", + "signature": "func mapProfileAppReferencesToAPI(a *billing.ProfileAppReferences) (*api.BillingProfileAppsOrReference, error)", + "line": 503 + }, + { + "kind": "func", + "name": "mapProfileExpandToEntity", + "signature": "func mapProfileExpandToEntity(expand []api.BillingProfileExpand) billing.ProfileExpand", + "line": 529 + }, + { + "kind": "func", + "name": "mapSupplierContactToAPI", + "signature": "func mapSupplierContactToAPI(c billing.SupplierContact) api.BillingParty", + "line": 539 + }, + { + "kind": "func", + "name": "mapAlignmentToAPI", + "signature": "func mapAlignmentToAPI(c billing.CollectionConfig) (*api.BillingWorkflowCollectionAlignment, error)", + "line": 567 + }, + { + "kind": "func", + "name": "mapWorkflowConfigToAPI", + "signature": "func mapWorkflowConfigToAPI(c billing.WorkflowConfig) (api.BillingWorkflow, error)", + "line": 607 + }, + { + "kind": "func", + "name": "mapWorkflowConfigSettingsToAPI", + "signature": "func mapWorkflowConfigSettingsToAPI(c billing.WorkflowConfig) (api.BillingWorkflow, error)", + "line": 638 + } + ], + "line_count": 667 + }, + "openmeter/billing/invoice.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (t InvoiceType) Values() []string", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t InvoiceType) Validate() error", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoiceID) Validate() error", + "line": 47 + }, + { + "kind": "interface", + "name": "GenericInvoice", + "signature": "type GenericInvoice interface", + "line": 51 + }, + { + "kind": "interface", + "name": "GenericInvoiceReader", + "signature": "type GenericInvoiceReader interface", + "line": 57 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e InvoiceExpand) Values() []InvoiceExpand", + "line": 77 + }, + { + "kind": "struct", + "name": "Invoice", + "signature": "type Invoice struct", + "line": 91 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i Invoice) Type() InvoiceType", + "line": 114 + }, + { + "kind": "func", + "name": "AsStandardInvoice", + "signature": "func (i Invoice) AsStandardInvoice() (StandardInvoice, error)", + "line": 118 + }, + { + "kind": "func", + "name": "AsGatheringInvoice", + "signature": "func (i Invoice) AsGatheringInvoice() (GatheringInvoice, error)", + "line": 130 + }, + { + "kind": "func", + "name": "AsGenericInvoice", + "signature": "func (i Invoice) AsGenericInvoice() (GenericInvoice, error)", + "line": 142 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i Invoice) Validate() error", + "line": 171 + }, + { + "kind": "struct", + "name": "GetInvoiceByIdInput", + "signature": "type GetInvoiceByIdInput struct", + "line": 190 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetInvoiceByIdInput) Validate() error", + "line": 195 + }, + { + "kind": "struct", + "name": "genericMultiInvoiceInput", + "signature": "type genericMultiInvoiceInput struct", + "line": 207 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i genericMultiInvoiceInput) Validate() error", + "line": 212 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ExternalIDType) Validate() error", + "line": 238 + }, + { + "kind": "struct", + "name": "ListInvoicesExternalIDFilter", + "signature": "type ListInvoicesExternalIDFilter struct", + "line": 250 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f ListInvoicesExternalIDFilter) Validate() error", + "line": 255 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (f InvoiceAvailableActionsFilter) Values() []InvoiceAvailableActionsFilter", + "line": 274 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f InvoiceAvailableActionsFilter) Validate() error", + "line": 281 + }, + { + "kind": "struct", + "name": "ListInvoicesInput", + "signature": "type ListInvoicesInput struct", + "line": 289 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListInvoicesInput) Validate() error", + "line": 319 + }, + { + "kind": "struct", + "name": "ListInvoicesAdapterInput", + "signature": "type ListInvoicesAdapterInput struct", + "line": 341 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListInvoicesAdapterInput) Validate() error", + "line": 383 + }, + { + "kind": "struct", + "name": "InvoicePendingLinesInput", + "signature": "type InvoicePendingLinesInput struct", + "line": 429 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoicePendingLinesInput) Validate() error", + "line": 436 + }, + { + "kind": "struct", + "name": "InvoicePendingLinesOptions", + "signature": "type InvoicePendingLinesOptions struct", + "line": 454 + }, + { + "kind": "func", + "name": "NewInvoicePendingLinesOptions", + "signature": "func NewInvoicePendingLinesOptions(opts ...InvoicePendingLinesOption) InvoicePendingLinesOptions", + "line": 467 + }, + { + "kind": "func", + "name": "WithBypassCollectionAlignment", + "signature": "func WithBypassCollectionAlignment() InvoicePendingLinesOption", + "line": 477 + }, + { + "kind": "func", + "name": "WithPartialInvoiceLinesDisabled", + "signature": "func WithPartialInvoiceLinesDisabled() InvoicePendingLinesOption", + "line": 483 + }, + { + "kind": "func", + "name": "WithPartialInvoiceLinesEnabled", + "signature": "func WithPartialInvoiceLinesEnabled() InvoicePendingLinesOption", + "line": 489 + }, + { + "kind": "struct", + "name": "UpdateInvoiceInput", + "signature": "type UpdateInvoiceInput struct", + "line": 495 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInvoiceInput) Validate() error", + "line": 502 + } + ], + "line_count": 516 + }, + "openmeter/billing/invoicedetailedline.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "DetailedLineBase", + "signature": "type DetailedLineBase struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLineBase) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLineBase) Clone() DetailedLineBase", + "line": 44 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (l DetailedLineBase) Equal(other DetailedLineBase) bool", + "line": 50 + }, + { + "kind": "struct", + "name": "DetailedLine", + "signature": "type DetailedLine struct", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLine) Validate() error", + "line": 65 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLine) Clone() DetailedLine", + "line": 79 + }, + { + "kind": "func", + "name": "SetDiscountExternalIDs", + "signature": "func (l DetailedLine) SetDiscountExternalIDs(externalIDs map[string]string) []string", + "line": 86 + }, + { + "kind": "func", + "name": "Map", + "signature": "func (l DetailedLines) Map(fn func(DetailedLine) DetailedLine) DetailedLines", + "line": 103 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l DetailedLines) Clone() DetailedLines", + "line": 109 + }, + { + "kind": "func", + "name": "SumTotals", + "signature": "func (l DetailedLines) SumTotals() totals.Totals", + "line": 115 + }, + { + "kind": "func", + "name": "WithReversedCredits", + "signature": "func (l DetailedLines) WithReversedCredits() DetailedLines", + "line": 123 + }, + { + "kind": "func", + "name": "WithCreditsApplied", + "signature": "func (l DetailedLines) WithCreditsApplied(\n\tcreditsApplied CreditsApplied,\n\tcurrencyCalculator currencyx.Calculator,\n) (DetailedLines, error)", + "line": 134 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l DetailedLines) Validate() error", + "line": 175 + }, + { + "kind": "func", + "name": "GetByChildUniqueReferenceID", + "signature": "func (l DetailedLines) GetByChildUniqueReferenceID(id string) *DetailedLine", + "line": 187 + } + ], + "line_count": 195 + }, + "openmeter/billing/invoicedetailedline_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestDetailedLineValidateAllowsNegativeQuantity", + "signature": "func TestDetailedLineValidateAllowsNegativeQuantity(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestDetailedLineValidateRejectsNegativePerUnitAmount", + "signature": "func TestDetailedLineValidateRejectsNegativePerUnitAmount(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestDetailedLinesWithCreditsAppliedConsumesCreditsAcrossPositiveTotals", + "signature": "func TestDetailedLinesWithCreditsAppliedConsumesCreditsAcrossPositiveTotals(t *testing.T)", + "line": 31 + }, + { + "kind": "func", + "name": "TestDetailedLinesWithCreditsAppliedReturnsErrorForUnusedCredits", + "signature": "func TestDetailedLinesWithCreditsAppliedReturnsErrorForUnusedCredits(t *testing.T)", + "line": 69 + }, + { + "kind": "func", + "name": "TestDetailedLinesWithCreditsAppliedReplacesExistingCredits", + "signature": "func TestDetailedLinesWithCreditsAppliedReplacesExistingCredits(t *testing.T)", + "line": 90 + }, + { + "kind": "func", + "name": "TestDetailedLinesWithCreditsAppliedNoCreditsReturnsClone", + "signature": "func TestDetailedLinesWithCreditsAppliedNoCreditsReturnsClone(t *testing.T)", + "line": 120 + }, + { + "kind": "func", + "name": "TestDetailedLinesWithReversedCreditsClearsCreditValues", + "signature": "func TestDetailedLinesWithReversedCreditsClearsCreditValues(t *testing.T)", + "line": 142 + }, + { + "kind": "func", + "name": "validDetailedLineForValidation", + "signature": "func validDetailedLineForValidation() DetailedLine", + "line": 159 + }, + { + "kind": "func", + "name": "detailedLineWithTotal", + "signature": "func detailedLineWithTotal(childUniqueReferenceID string, total int64) DetailedLine", + "line": 181 + }, + { + "kind": "func", + "name": "detailedLineWithAppliedCredit", + "signature": "func detailedLineWithAppliedCredit(childUniqueReferenceID string, amount int64, creditAmount int64) DetailedLine", + "line": 192 + }, + { + "kind": "func", + "name": "requireDecimalEqual", + "signature": "func requireDecimalEqual(t *testing.T, expected, actual alpacadecimal.Decimal)", + "line": 207 + } + ], + "line_count": 211 + }, + "openmeter/billing/invoiceline.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (i LineID) Validate() error", + "line": 18 + }, + { + "kind": "struct", + "name": "GetLinesForSubscriptionInput", + "signature": "type GetLinesForSubscriptionInput struct", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetLinesForSubscriptionInput) Validate() error", + "line": 48 + }, + { + "kind": "interface", + "name": "GenericInvoiceLine", + "signature": "type GenericInvoiceLine interface", + "line": 64 + }, + { + "kind": "interface", + "name": "GenericInvoiceLineReader", + "signature": "type GenericInvoiceLineReader interface", + "line": 77 + }, + { + "kind": "interface", + "name": "InvoiceAtAccessor", + "signature": "type InvoiceAtAccessor interface", + "line": 97 + }, + { + "kind": "interface", + "name": "QuantityAccessor", + "signature": "type QuantityAccessor interface", + "line": 102 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t InvoiceLineType) Validate() error", + "line": 118 + }, + { + "kind": "struct", + "name": "InvoiceLine", + "signature": "type InvoiceLine struct", + "line": 126 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoiceLine) Validate() error", + "line": 132 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i InvoiceLine) Type() InvoiceLineType", + "line": 151 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (i InvoiceLine) GetChargeID() (*string, error)", + "line": 155 + }, + { + "kind": "func", + "name": "AsStandardLine", + "signature": "func (i InvoiceLine) AsStandardLine() (StandardLine, error)", + "line": 174 + }, + { + "kind": "func", + "name": "AsGatheringLine", + "signature": "func (i InvoiceLine) AsGatheringLine() (GatheringLine, error)", + "line": 186 + }, + { + "kind": "func", + "name": "AsGenericLine", + "signature": "func (i InvoiceLine) AsGenericLine() (GenericInvoiceLine, error)", + "line": 198 + } + ], + "line_count": 215 + }, + "openmeter/billing/invoiceline_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestInvoiceLineConversion", + "signature": "func TestInvoiceLineConversion(t *testing.T)", + "line": 12 + } + ], + "line_count": 46 + }, + "openmeter/billing/invoicelinediscount.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "LineDiscountBase", + "signature": "type LineDiscountBase struct", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i LineDiscountBase) Validate() error", + "line": 28 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i LineDiscountBase) Equal(other LineDiscountBase) bool", + "line": 38 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i LineDiscountBase) Clone() LineDiscountBase", + "line": 42 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (i LineDiscountBase) GetChildUniqueReferenceID() *string", + "line": 46 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (i LineDiscountBase) GetDescription() *string", + "line": 50 + }, + { + "kind": "struct", + "name": "LineDiscountBaseManaged", + "signature": "type LineDiscountBaseManaged struct", + "line": 54 + }, + { + "kind": "struct", + "name": "AmountLineDiscount", + "signature": "type AmountLineDiscount struct", + "line": 59 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AmountLineDiscount) Validate() error", + "line": 69 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i AmountLineDiscount) Equal(other AmountLineDiscount) bool", + "line": 83 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i AmountLineDiscount) Clone() AmountLineDiscount", + "line": 87 + }, + { + "kind": "struct", + "name": "AmountLineDiscountManaged", + "signature": "type AmountLineDiscountManaged struct", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AmountLineDiscountManaged) Validate() error", + "line": 100 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i AmountLineDiscountManaged) Equal(other AmountLineDiscountManaged) bool", + "line": 110 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i AmountLineDiscountManaged) Clone() AmountLineDiscountManaged", + "line": 114 + }, + { + "kind": "func", + "name": "ContentsEqual", + "signature": "func (i AmountLineDiscountManaged) ContentsEqual(other AmountLineDiscountManaged) bool", + "line": 121 + }, + { + "kind": "func", + "name": "GetManagedFieldsWithID", + "signature": "func (i AmountLineDiscountManaged) GetManagedFieldsWithID() models.ManagedModelWithID", + "line": 125 + }, + { + "kind": "func", + "name": "WithManagedFieldsWithID", + "signature": "func (i AmountLineDiscountManaged) WithManagedFieldsWithID(managed models.ManagedModelWithID) AmountLineDiscountManaged", + "line": 129 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i AmountLineDiscountsManaged) Clone() AmountLineDiscountsManaged", + "line": 138 + }, + { + "kind": "func", + "name": "SumAmount", + "signature": "func (i AmountLineDiscountsManaged) SumAmount(currency currencyx.Calculator) alpacadecimal.Decimal", + "line": 144 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (i AmountLineDiscountsManaged) GetByID() (map[string]AmountLineDiscountManaged, error)", + "line": 153 + }, + { + "kind": "func", + "name": "GetDiscountByChildUniqueReferenceID", + "signature": "func (i AmountLineDiscountsManaged) GetDiscountByChildUniqueReferenceID(childUniqueReferenceID string) (AmountLineDiscountManaged, bool)", + "line": 163 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (i AmountLineDiscountsManaged) Mutate(mutator func(AmountLineDiscountManaged) (AmountLineDiscountManaged, error)) (AmountLineDiscountsManaged, error)", + "line": 173 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AmountLineDiscountsManaged) Validate() error", + "line": 188 + }, + { + "kind": "func", + "name": "ReuseIDsFrom", + "signature": "func (i AmountLineDiscountsManaged) ReuseIDsFrom(existingItems AmountLineDiscountsManaged) AmountLineDiscountsManaged", + "line": 200 + }, + { + "kind": "struct", + "name": "UsageLineDiscount", + "signature": "type UsageLineDiscount struct", + "line": 204 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UsageLineDiscount) Validate() error", + "line": 211 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UsageLineDiscount) Equal(other UsageLineDiscount) bool", + "line": 229 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i UsageLineDiscount) Clone() UsageLineDiscount", + "line": 233 + }, + { + "kind": "struct", + "name": "UsageLineDiscountManaged", + "signature": "type UsageLineDiscountManaged struct", + "line": 241 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UsageLineDiscountManaged) Validate() error", + "line": 246 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UsageLineDiscountManaged) Equal(other UsageLineDiscountManaged) bool", + "line": 256 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i UsageLineDiscountManaged) Clone() UsageLineDiscountManaged", + "line": 260 + }, + { + "kind": "func", + "name": "ContentsEqual", + "signature": "func (i UsageLineDiscountManaged) ContentsEqual(other UsageLineDiscountManaged) bool", + "line": 267 + }, + { + "kind": "func", + "name": "GetManagedFieldsWithID", + "signature": "func (i UsageLineDiscountManaged) GetManagedFieldsWithID() models.ManagedModelWithID", + "line": 271 + }, + { + "kind": "func", + "name": "WithManagedFieldsWithID", + "signature": "func (i UsageLineDiscountManaged) WithManagedFieldsWithID(managed models.ManagedModelWithID) UsageLineDiscountManaged", + "line": 275 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d UsageLineDiscountsManaged) Clone() UsageLineDiscountsManaged", + "line": 286 + }, + { + "kind": "func", + "name": "MergeDiscountsByChildUniqueReferenceID", + "signature": "func (d UsageLineDiscountsManaged) MergeDiscountsByChildUniqueReferenceID(newDiscount UsageLineDiscountManaged) UsageLineDiscountsManaged", + "line": 292 + }, + { + "kind": "struct", + "name": "StandardLineDiscounts", + "signature": "type StandardLineDiscounts struct", + "line": 331 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i StandardLineDiscounts) Clone() StandardLineDiscounts", + "line": 335 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardLineDiscounts) Validate() error", + "line": 347 + }, + { + "kind": "func", + "name": "ReuseIDsFrom", + "signature": "func (i StandardLineDiscounts) ReuseIDsFrom(existingItems StandardLineDiscounts) StandardLineDiscounts", + "line": 359 + } + ], + "line_count": 414 + }, + "openmeter/billing/invoicelinesplitgroup.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SplitLineGroupMutableFields", + "signature": "type SplitLineGroupMutableFields struct", + "line": 19 + }, + { + "kind": "func", + "name": "ValidateForPrice", + "signature": "func (i SplitLineGroupMutableFields) ValidateForPrice(price *productcatalog.Price) error", + "line": 29 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i SplitLineGroupMutableFields) Clone() SplitLineGroupMutableFields", + "line": 47 + }, + { + "kind": "struct", + "name": "SplitLineGroupCreate", + "signature": "type SplitLineGroupCreate struct", + "line": 54 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SplitLineGroupCreate) Validate() error", + "line": 66 + }, + { + "kind": "struct", + "name": "SplitLineGroupUpdate", + "signature": "type SplitLineGroupUpdate struct", + "line": 102 + }, + { + "kind": "func", + "name": "ValidateWithPrice", + "signature": "func (i SplitLineGroupUpdate) ValidateWithPrice(price *productcatalog.Price) error", + "line": 108 + }, + { + "kind": "struct", + "name": "SplitLineGroup", + "signature": "type SplitLineGroup struct", + "line": 122 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SplitLineGroup) Validate() error", + "line": 134 + }, + { + "kind": "func", + "name": "ToUpdate", + "signature": "func (i SplitLineGroup) ToUpdate() SplitLineGroupUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i SplitLineGroup) Clone() SplitLineGroup", + "line": 161 + }, + { + "kind": "struct", + "name": "GatheringLineWithInvoiceHeader", + "signature": "type GatheringLineWithInvoiceHeader struct", + "line": 174 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l GatheringLineWithInvoiceHeader) Validate() error", + "line": 179 + }, + { + "kind": "struct", + "name": "StandardLineWithInvoiceHeader", + "signature": "type StandardLineWithInvoiceHeader struct", + "line": 193 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l StandardLineWithInvoiceHeader) Validate() error", + "line": 198 + }, + { + "kind": "struct", + "name": "LineWithInvoiceHeader", + "signature": "type LineWithInvoiceHeader struct", + "line": 216 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (l *LineWithInvoiceHeader) UnmarshalJSON(data []byte) error", + "line": 228 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (l LineWithInvoiceHeader) MarshalJSON() ([]byte, error)", + "line": 263 + }, + { + "kind": "func", + "name": "Lines", + "signature": "func (i LinesWithInvoiceHeaders) Lines() []GenericInvoiceLine", + "line": 319 + }, + { + "kind": "struct", + "name": "SplitLineHierarchy", + "signature": "type SplitLineHierarchy struct", + "line": 325 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (h *SplitLineHierarchy) Clone() (SplitLineHierarchy, error)", + "line": 330 + }, + { + "kind": "struct", + "name": "SumNetAmountInput", + "signature": "type SumNetAmountInput struct", + "line": 350 + }, + { + "kind": "func", + "name": "SumNetAmount", + "signature": "func (h *SplitLineHierarchy) SumNetAmount(in SumNetAmountInput) (alpacadecimal.Decimal, error)", + "line": 359 + }, + { + "kind": "struct", + "name": "ForEachChildInput", + "signature": "type ForEachChildInput struct", + "line": 390 + }, + { + "kind": "func", + "name": "ForEachChild", + "signature": "func (h *SplitLineHierarchy) ForEachChild(in ForEachChildInput) error", + "line": 395 + }, + { + "kind": "struct", + "name": "LineOrHierarchy", + "signature": "type LineOrHierarchy struct", + "line": 451 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i LineOrHierarchy) Type() LineOrHierarchyType", + "line": 470 + }, + { + "kind": "func", + "name": "AsGenericLine", + "signature": "func (i LineOrHierarchy) AsGenericLine() (GenericInvoiceLine, error)", + "line": 474 + }, + { + "kind": "func", + "name": "AsHierarchy", + "signature": "func (i LineOrHierarchy) AsHierarchy() (*SplitLineHierarchy, error)", + "line": 486 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func (i LineOrHierarchy) ChildUniqueReferenceID() *string", + "line": 498 + }, + { + "kind": "func", + "name": "ServicePeriod", + "signature": "func (i LineOrHierarchy) ServicePeriod() timeutil.ClosedPeriod", + "line": 509 + }, + { + "kind": "struct", + "name": "GetSplitLineGroupHeadersInput", + "signature": "type GetSplitLineGroupHeadersInput struct", + "line": 520 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetSplitLineGroupHeadersInput) Validate() error", + "line": 527 + } + ], + "line_count": 535 + }, + "openmeter/billing/invoicelinesplitgroup_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestSplitLineGroupMarshaling", + "signature": "func TestSplitLineGroupMarshaling(t *testing.T)", + "line": 15 + } + ], + "line_count": 89 + }, + "openmeter/billing/invoicelinetypes.go": { + "header": "type InvoiceLineAdapterType string\nconst (\n\tInvoiceLineAdapterTypeFee InvoiceLineAdapterType = \"flat_fee\"", + "symbols": [], + "line_count": 35 + }, + "openmeter/billing/lineengine.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (b LineEngineType) Values() []string", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b LineEngineType) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "IsCharge", + "signature": "func (b LineEngineType) IsCharge() bool", + "line": 40 + }, + { + "kind": "struct", + "name": "LineBillability", + "signature": "type LineBillability struct", + "line": 49 + }, + { + "kind": "struct", + "name": "BuildStandardInvoiceLinesInput", + "signature": "type BuildStandardInvoiceLinesInput struct", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BuildStandardInvoiceLinesInput) Validate() error", + "line": 63 + }, + { + "kind": "struct", + "name": "CalculateLinesInput", + "signature": "type CalculateLinesInput struct", + "line": 81 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CalculateLinesInput) Validate() error", + "line": 88 + }, + { + "kind": "struct", + "name": "StandardLineEventInput", + "signature": "type StandardLineEventInput struct", + "line": 106 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardLineEventInput) Validate() error", + "line": 113 + }, + { + "kind": "struct", + "name": "IsLineBillableAsOfInput", + "signature": "type IsLineBillableAsOfInput struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i IsLineBillableAsOfInput) Validate() error", + "line": 149 + }, + { + "kind": "struct", + "name": "SplitGatheringLineInput", + "signature": "type SplitGatheringLineInput struct", + "line": 161 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SplitGatheringLineInput) Validate() error", + "line": 167 + }, + { + "kind": "struct", + "name": "SplitGatheringLineResult", + "signature": "type SplitGatheringLineResult struct", + "line": 185 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r SplitGatheringLineResult) Validate() error", + "line": 190 + }, + { + "kind": "interface", + "name": "LineEngine", + "signature": "type LineEngine interface", + "line": 206 + }, + { + "kind": "interface", + "name": "LineCalculator", + "signature": "type LineCalculator interface", + "line": 240 + }, + { + "kind": "func", + "name": "LineEngineValidationComponent", + "signature": "func LineEngineValidationComponent(engineType LineEngineType) ComponentName", + "line": 245 + }, + { + "kind": "func", + "name": "NewLineEngineValidationError", + "signature": "func NewLineEngineValidationError(engine LineEngine, err error) error", + "line": 249 + } + ], + "line_count": 274 + }, + "openmeter/billing/lineengine/engine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 25 + }, + { + "kind": "struct", + "name": "Engine", + "signature": "type Engine struct", + "line": 41 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Engine, error)", + "line": 47 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (e *Engine) GetLineEngineType() billing.LineEngineType", + "line": 59 + }, + { + "kind": "func", + "name": "OnCollectionCompleted", + "signature": "func (e *Engine) OnCollectionCompleted(ctx context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error)", + "line": 63 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (e *Engine) OnMutableStandardLinesDeleted(_ context.Context, _ billing.OnMutableStandardLinesDeletedInput) error", + "line": 95 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (e *Engine) OnUnsupportedCreditNote(_ context.Context, _ billing.OnUnsupportedCreditNoteInput) error", + "line": 99 + }, + { + "kind": "func", + "name": "OnStandardInvoiceCreated", + "signature": "func (e *Engine) OnStandardInvoiceCreated(_ context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error)", + "line": 103 + }, + { + "kind": "func", + "name": "OnInvoiceIssued", + "signature": "func (e *Engine) OnInvoiceIssued(_ context.Context, _ billing.OnInvoiceIssuedInput) error", + "line": 107 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (e *Engine) OnPaymentAuthorized(_ context.Context, _ billing.OnPaymentAuthorizedInput) error", + "line": 111 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (e *Engine) OnPaymentSettled(_ context.Context, _ billing.OnPaymentSettledInput) error", + "line": 115 + } + ], + "line_count": 117 + }, + "openmeter/billing/lineengine/splitlinegroup.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "SplitLineGroupAdapter", + "signature": "type SplitLineGroupAdapter interface", + "line": 16 + }, + { + "kind": "func", + "name": "SplitGatheringLine", + "signature": "func (e *Engine) SplitGatheringLine(ctx context.Context, in billing.SplitGatheringLineInput) (billing.SplitGatheringLineResult, error)", + "line": 21 + }, + { + "kind": "func", + "name": "ResolveSplitLineGroupHeaders", + "signature": "func (e *Engine) ResolveSplitLineGroupHeaders(ctx context.Context, ns string, lines billing.StandardLines) error", + "line": 116 + }, + { + "kind": "func", + "name": "isPeriodEmptyConsideringTruncations", + "signature": "func isPeriodEmptyConsideringTruncations(line billing.GatheringLine) (bool, error)", + "line": 158 + } + ], + "line_count": 169 + }, + "openmeter/billing/lineengine/stdinvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "QuantitySnapshotter", + "signature": "type QuantitySnapshotter interface", + "line": 13 + }, + { + "kind": "func", + "name": "BuildStandardInvoiceLines", + "signature": "func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 17 + }, + { + "kind": "func", + "name": "BuildStandardLinesForGatheringPreview", + "signature": "func (e *Engine) BuildStandardLinesForGatheringPreview(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 29 + }, + { + "kind": "func", + "name": "buildStandardInvoiceLinesWithQuantitySnapshot", + "signature": "func (e *Engine) buildStandardInvoiceLinesWithQuantitySnapshot(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error)", + "line": 33 + }, + { + "kind": "func", + "name": "CalculateLines", + "signature": "func (e *Engine) CalculateLines(input billing.CalculateLinesInput) (billing.StandardLines, error)", + "line": 58 + }, + { + "kind": "func", + "name": "IsLineBillableAsOf", + "signature": "func (e *Engine) IsLineBillableAsOf(_ context.Context, input billing.IsLineBillableAsOfInput) (bool, error)", + "line": 85 + } + ], + "line_count": 91 + }, + "openmeter/billing/lock.go": { + "header": "type (\n\tLockCustomerForUpdateAdapterInput = customer.CustomerID\n\tUpsertCustomerLockAdapterInput = LockCustomerForUpdateAdapterInput", + "symbols": [], + "line_count": 8 + }, + "openmeter/billing/models/creditsapplied/model.go": { + "header": "\t\"errors\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreditsApplied) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (c CreditsApplied) Clone() CreditsApplied", + "line": 30 + }, + { + "kind": "func", + "name": "SumAmount", + "signature": "func (c CreditsApplied) SumAmount(currency currencyx.Calculator) alpacadecimal.Decimal", + "line": 40 + }, + { + "kind": "struct", + "name": "CreditApplied", + "signature": "type CreditApplied struct", + "line": 50 + }, + { + "kind": "func", + "name": "CloneWithAmount", + "signature": "func (c CreditApplied) CloneWithAmount(amount alpacadecimal.Decimal) CreditApplied", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreditApplied) Validate() error", + "line": 62 + } + ], + "line_count": 68 + }, + "openmeter/billing/models/externalid/mixin.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\t\"entgo.io/ent/schema/mixin\"", + "symbols": [ + { + "kind": "struct", + "name": "LineMixin", + "signature": "type LineMixin struct", + "line": 10 + }, + { + "kind": "interface", + "name": "LineExternalIDGetter", + "signature": "type LineExternalIDGetter interface", + "line": 38 + }, + { + "kind": "func", + "name": "MapLineExternalIDFromDB", + "signature": "func MapLineExternalIDFromDB(dbEntity LineExternalIDGetter) LineExternalIDs", + "line": 42 + }, + { + "kind": "struct", + "name": "InvoiceMixin", + "signature": "type InvoiceMixin struct", + "line": 48 + }, + { + "kind": "interface", + "name": "InvoiceExternalIDGetter", + "signature": "type InvoiceExternalIDGetter interface", + "line": 88 + }, + { + "kind": "func", + "name": "MapInvoiceExternalIDFromDB", + "signature": "func MapInvoiceExternalIDFromDB(dbEntity InvoiceExternalIDGetter) InvoiceExternalIDs", + "line": 93 + } + ], + "line_count": 98 + }, + "openmeter/billing/models/externalid/model.go": { + "header": "type InvoiceExternalIDs struct {\n\tInvoicing string `json:\"invoicing,omitempty\"`\n\tPayment string `json:\"payment,omitempty\"`", + "symbols": [ + { + "kind": "struct", + "name": "InvoiceExternalIDs", + "signature": "type InvoiceExternalIDs struct", + "line": 3 + }, + { + "kind": "func", + "name": "GetInvoicingOrEmpty", + "signature": "func (i *InvoiceExternalIDs) GetInvoicingOrEmpty() string", + "line": 8 + }, + { + "kind": "struct", + "name": "LineExternalIDs", + "signature": "type LineExternalIDs struct", + "line": 16 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i LineExternalIDs) Equal(other LineExternalIDs) bool", + "line": 20 + } + ], + "line_count": 22 + }, + "openmeter/billing/models/stddetailedline/create.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/externalid\"", + "symbols": [], + "line_count": 51 + }, + "openmeter/billing/models/stddetailedline/derived.gen.go": { + "header": "\tcreditsapplied \"github.com/openmeterio/openmeter/openmeter/billing/models/creditsapplied\"\n\tmodels \"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "func", + "name": "deriveEqualBase", + "signature": "func deriveEqualBase(this, that *Base) bool", + "line": 11 + }, + { + "kind": "func", + "name": "deriveEqual", + "signature": "func deriveEqual(this, that *models.ManagedResource) bool", + "line": 29 + }, + { + "kind": "func", + "name": "deriveEqual_", + "signature": "func deriveEqual_(this, that []creditsapplied.CreditApplied) bool", + "line": 40 + }, + { + "kind": "func", + "name": "deriveEqual_1", + "signature": "func deriveEqual_1(this, that *creditsapplied.CreditApplied) bool", + "line": 56 + } + ], + "line_count": 62 + }, + "openmeter/billing/models/stddetailedline/generate.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "openmeter/billing/models/stddetailedline/mapping.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "DBGetter", + "signature": "type DBGetter interface", + "line": 19 + } + ], + "line_count": 68 + }, + "openmeter/billing/models/stddetailedline/mixin.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Mixin", + "signature": "type Mixin struct", + "line": 20 + }, + { + "kind": "struct", + "name": "mixinBase", + "signature": "type mixinBase struct", + "line": 24 + } + ], + "line_count": 125 + }, + "openmeter/billing/models/stddetailedline/model.go": { + "header": "\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (c Category) Validate() error", + "line": 39 + }, + { + "kind": "struct", + "name": "Base", + "signature": "type Base struct", + "line": 47 + }, + { + "kind": "struct", + "name": "validateOptions", + "signature": "type validateOptions struct", + "line": 65 + }, + { + "kind": "func", + "name": "IgnoreQuantityChecks", + "signature": "func IgnoreQuantityChecks() ValidateOption", + "line": 71 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (l Base) Validate(opts ...ValidateOption) error", + "line": 77 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (l Base) Clone() Base", + "line": 120 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (l Base) Equal(other Base) bool", + "line": 128 + }, + { + "kind": "func", + "name": "GetIndex", + "signature": "func (l Base) GetIndex() *int", + "line": 132 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (l Base) GetCreatedAt() time.Time", + "line": 136 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (l Base) GetID() string", + "line": 140 + }, + { + "kind": "interface", + "name": "Comparable", + "signature": "type Comparable interface", + "line": 144 + } + ], + "line_count": 166 + }, + "openmeter/billing/models/totals/mixin.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "struct", + "name": "Mixin", + "signature": "type Mixin struct", + "line": 11 + }, + { + "kind": "func", + "name": "Fields", + "signature": "func (m Mixin) Fields() []ent.Field", + "line": 15 + }, + { + "kind": "interface", + "name": "TotalsGetter", + "signature": "type TotalsGetter interface", + "line": 74 + }, + { + "kind": "func", + "name": "FromDB", + "signature": "func FromDB(e TotalsGetter) Totals", + "line": 85 + } + ], + "line_count": 96 + }, + "openmeter/billing/models/totals/model.go": { + "header": "\t\"errors\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/pkg/currencyx\"", + "symbols": [ + { + "kind": "struct", + "name": "Totals", + "signature": "type Totals struct", + "line": 11 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t Totals) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "ValidateTotalNonNegative", + "signature": "func (t Totals) ValidateTotalNonNegative() error", + "line": 69 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (t Totals) Add(others ...Totals) Totals", + "line": 77 + }, + { + "kind": "func", + "name": "Sub", + "signature": "func (t Totals) Sub(others ...Totals) Totals", + "line": 94 + }, + { + "kind": "func", + "name": "Neg", + "signature": "func (t Totals) Neg() Totals", + "line": 111 + }, + { + "kind": "func", + "name": "IsZero", + "signature": "func (t Totals) IsZero() bool", + "line": 124 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t Totals) Equal(other Totals) bool", + "line": 135 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func Sum(others ...Totals) Totals", + "line": 146 + }, + { + "kind": "func", + "name": "RoundToPrecision", + "signature": "func (t Totals) RoundToPrecision(calc currencyx.Calculator) Totals", + "line": 152 + }, + { + "kind": "func", + "name": "CalculateTotal", + "signature": "func (t Totals) CalculateTotal() alpacadecimal.Decimal", + "line": 165 + } + ], + "line_count": 172 + }, + "openmeter/billing/models/totals/model_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "TestTotalsRoundToPrecision", + "signature": "func TestTotalsRoundToPrecision(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestTotalsEqual", + "signature": "func TestTotalsEqual(t *testing.T)", + "line": 51 + }, + { + "kind": "func", + "name": "TestValidateTotalNonNegative", + "signature": "func TestValidateTotalNonNegative(t *testing.T)", + "line": 72 + } + ], + "line_count": 78 + }, + "openmeter/billing/profile.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (k AlignmentKind) Validate() error", + "line": 41 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (k AlignmentKind) Values() []string", + "line": 49 + }, + { + "kind": "struct", + "name": "AnchoredAlignmentDetail", + "signature": "type AnchoredAlignmentDetail struct", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *AnchoredAlignmentDetail) Validate() error", + "line": 61 + }, + { + "kind": "struct", + "name": "InvoicingConfig", + "signature": "type InvoicingConfig struct", + "line": 78 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *InvoicingConfig) Validate() error", + "line": 86 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (r GranularityResolution) Values() []string", + "line": 113 + }, + { + "kind": "struct", + "name": "PaymentConfig", + "signature": "type PaymentConfig struct", + "line": 120 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *PaymentConfig) Validate() error", + "line": 124 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (c CollectionMethod) Values() []string", + "line": 143 + }, + { + "kind": "struct", + "name": "SupplierContact", + "signature": "type SupplierContact struct", + "line": 150 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SupplierContact) Validate() error", + "line": 158 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ProfileID) Validate() error", + "line": 172 + }, + { + "kind": "struct", + "name": "BaseProfile", + "signature": "type BaseProfile struct", + "line": 176 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p BaseProfile) Validate() error", + "line": 197 + }, + { + "kind": "func", + "name": "ProfileID", + "signature": "func (p BaseProfile) ProfileID() ProfileID", + "line": 217 + }, + { + "kind": "struct", + "name": "Profile", + "signature": "type Profile struct", + "line": 224 + }, + { + "kind": "struct", + "name": "AdapterGetProfileResponse", + "signature": "type AdapterGetProfileResponse struct", + "line": 231 + }, + { + "kind": "func", + "name": "BaseProfileOrEmpty", + "signature": "func (r *AdapterGetProfileResponse) BaseProfileOrEmpty() *BaseProfile", + "line": 237 + }, + { + "kind": "struct", + "name": "ProfileApps", + "signature": "type ProfileApps struct", + "line": 245 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Profile) Validate() error", + "line": 251 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (p Profile) Merge(o *CustomerOverride) Profile", + "line": 259 + }, + { + "kind": "struct", + "name": "ProfileAppReferences", + "signature": "type ProfileAppReferences struct", + "line": 296 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ProfileAppReferences) Validate() error", + "line": 302 + }, + { + "kind": "struct", + "name": "InvoiceWorkflow", + "signature": "type InvoiceWorkflow struct", + "line": 318 + }, + { + "kind": "struct", + "name": "CreateWorkflowConfigInput", + "signature": "type CreateWorkflowConfigInput struct", + "line": 325 + }, + { + "kind": "struct", + "name": "CreateProfileInput", + "signature": "type CreateProfileInput struct", + "line": 329 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateProfileInput) Validate() error", + "line": 341 + }, + { + "kind": "struct", + "name": "ListProfilesInput", + "signature": "type ListProfilesInput struct", + "line": 369 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListProfilesInput) Validate() error", + "line": 380 + }, + { + "kind": "struct", + "name": "ProfileExpand", + "signature": "type ProfileExpand struct", + "line": 392 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e ProfileExpand) Validate() error", + "line": 400 + }, + { + "kind": "struct", + "name": "GetDefaultProfileInput", + "signature": "type GetDefaultProfileInput struct", + "line": 404 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetDefaultProfileInput) Validate() error", + "line": 408 + }, + { + "kind": "struct", + "name": "GetProfileInput", + "signature": "type GetProfileInput struct", + "line": 416 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetProfileInput) Validate() error", + "line": 421 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateProfileInput) Validate() error", + "line": 437 + }, + { + "kind": "func", + "name": "ProfileID", + "signature": "func (i UpdateProfileInput) ProfileID() ProfileID", + "line": 449 + }, + { + "kind": "struct", + "name": "UpdateProfileAdapterInput", + "signature": "type UpdateProfileAdapterInput struct", + "line": 453 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateProfileAdapterInput) Validate() error", + "line": 458 + }, + { + "kind": "struct", + "name": "GetUnpinnedCustomerIDsWithPaidSubscriptionInput", + "signature": "type GetUnpinnedCustomerIDsWithPaidSubscriptionInput struct", + "line": 474 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetUnpinnedCustomerIDsWithPaidSubscriptionInput) Validate() error", + "line": 478 + } + ], + "line_count": 484 + }, + "openmeter/billing/rating/const.go": { + "header": "const (\n\tUsageChildUniqueReferenceID = \"usage\"\n\tMinSpendChildUniqueReferenceID = \"min-spend\"", + "symbols": [], + "line_count": 23 + }, + "openmeter/billing/rating/detailedline.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "DetailedLine", + "signature": "type DetailedLine struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DetailedLine) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "TotalAmount", + "signature": "func (i DetailedLine) TotalAmount(currency currencyx.Calculator) alpacadecimal.Decimal", + "line": 49 + }, + { + "kind": "struct", + "name": "getTotalAmountInput", + "signature": "type getTotalAmountInput struct", + "line": 59 + }, + { + "kind": "func", + "name": "TotalAmount", + "signature": "func TotalAmount(in getTotalAmountInput) alpacadecimal.Decimal", + "line": 67 + }, + { + "kind": "struct", + "name": "AddDiscountInput", + "signature": "type AddDiscountInput struct", + "line": 77 + }, + { + "kind": "func", + "name": "AddDiscountForOverage", + "signature": "func (i DetailedLine) AddDiscountForOverage(in AddDiscountInput) DetailedLine", + "line": 83 + }, + { + "kind": "func", + "name": "formatMaximumSpendDiscountDescription", + "signature": "func formatMaximumSpendDiscountDescription(amount alpacadecimal.Decimal) *string", + "line": 127 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func (i DetailedLines) Sum(currency currencyx.Calculator) alpacadecimal.Decimal", + "line": 134 + } + ], + "line_count": 142 + }, + "openmeter/billing/rating/detailedline_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "TestDetailedLineValidateAllowsNegativeQuantity", + "signature": "func TestDetailedLineValidateAllowsNegativeQuantity(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestDetailedLineValidateRejectsNegativePerUnitAmount", + "signature": "func TestDetailedLineValidateRejectsNegativePerUnitAmount(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "TestAddDiscountForOverage", + "signature": "func TestAddDiscountForOverage(t *testing.T)", + "line": 37 + } + ], + "line_count": 172 + }, + "openmeter/billing/rating/line.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "interface", + "name": "PriceAccessor", + "signature": "type PriceAccessor interface", + "line": 14 + }, + { + "kind": "interface", + "name": "GatheringLineAccessor", + "signature": "type GatheringLineAccessor interface", + "line": 20 + }, + { + "kind": "interface", + "name": "StandardLineAccessor", + "signature": "type StandardLineAccessor interface", + "line": 27 + } + ], + "line_count": 53 + }, + "openmeter/billing/rating/service.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 15 + }, + { + "kind": "struct", + "name": "GenerateDetailedLinesOptions", + "signature": "type GenerateDetailedLinesOptions struct", + "line": 20 + }, + { + "kind": "func", + "name": "NewGenerateDetailedLinesOptions", + "signature": "func NewGenerateDetailedLinesOptions(opts ...GenerateDetailedLinesOption) GenerateDetailedLinesOptions", + "line": 27 + }, + { + "kind": "func", + "name": "WithMinimumCommitmentIgnored", + "signature": "func WithMinimumCommitmentIgnored() GenerateDetailedLinesOption", + "line": 37 + }, + { + "kind": "func", + "name": "WithCreditsMutatorDisabled", + "signature": "func WithCreditsMutatorDisabled() GenerateDetailedLinesOption", + "line": 43 + }, + { + "kind": "struct", + "name": "Usage", + "signature": "type Usage struct", + "line": 49 + }, + { + "kind": "struct", + "name": "GenerateDetailedLinesResult", + "signature": "type GenerateDetailedLinesResult struct", + "line": 54 + }, + { + "kind": "struct", + "name": "ResolveBillablePeriodInput", + "signature": "type ResolveBillablePeriodInput struct", + "line": 65 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ResolveBillablePeriodInput) Validate() error", + "line": 72 + } + ], + "line_count": 86 + }, + "openmeter/billing/rating/service/billableperiod.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (s *service) ResolveBillablePeriod(in rating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 12 + }, + { + "kind": "func", + "name": "isDependingOnIncreaseOnlyMeters", + "signature": "func isDependingOnIncreaseOnlyMeters(in rating.ResolveBillablePeriodInput) (bool, error)", + "line": 57 + } + ], + "line_count": 83 + }, + "openmeter/billing/rating/service/detailedline.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "validateStandardLine", + "signature": "func validateStandardLine(in rating.StandardLineAccessor) error", + "line": 18 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (s *service) GenerateDetailedLines(in rating.StandardLineAccessor, opts ...rating.GenerateDetailedLinesOption) (rating.GenerateDetailedLinesResult, error)", + "line": 41 + }, + { + "kind": "func", + "name": "getTotalsFromDetailedLines", + "signature": "func getTotalsFromDetailedLines(in rating.GenerateDetailedLinesResult, calc currencyx.Calculator) rating.GenerateDetailedLinesResult", + "line": 102 + }, + { + "kind": "func", + "name": "calculateDetailedLineTotals", + "signature": "func calculateDetailedLineTotals(line rating.DetailedLine, calc currencyx.Calculator) totals.Totals", + "line": 124 + } + ], + "line_count": 148 + }, + "openmeter/billing/rating/service/mutator/commitments.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/stddetailedline\"", + "symbols": [ + { + "kind": "struct", + "name": "MinAmountCommitment", + "signature": "type MinAmountCommitment struct", + "line": 14 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (m *MinAmountCommitment) Mutate(i rate.PricerCalculateInput, pricerResult rating.DetailedLines) (rating.DetailedLines, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "MaxAmountCommitment", + "signature": "type MaxAmountCommitment struct", + "line": 60 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (m *MaxAmountCommitment) Mutate(i rate.PricerCalculateInput, pricerResult rating.DetailedLines) (rating.DetailedLines, error)", + "line": 64 + } + ], + "line_count": 94 + }, + "openmeter/billing/rating/service/mutator/credits.go": { + "header": "\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "struct", + "name": "Credits", + "signature": "type Credits struct", + "line": 11 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (m *Credits) Mutate(i rate.PricerCalculateInput, pricerResult rating.DetailedLines) (rating.DetailedLines, error)", + "line": 17 + } + ], + "line_count": 52 + }, + "openmeter/billing/rating/service/mutator/credits_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreditsMutator", + "signature": "func TestCreditsMutator(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestCreditsMutatorSkipsNonPositiveDetailedLineTotals", + "signature": "func TestCreditsMutatorSkipsNonPositiveDetailedLineTotals(t *testing.T)", + "line": 401 + }, + { + "kind": "func", + "name": "TestCreditsMutatorAllocatesOnlyRemainingPayableAmount", + "signature": "func TestCreditsMutatorAllocatesOnlyRemainingPayableAmount(t *testing.T)", + "line": 442 + } + ], + "line_count": 474 + }, + "openmeter/billing/rating/service/mutator/discountpercentage.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "DiscountPercentage", + "signature": "type DiscountPercentage struct", + "line": 16 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (m *DiscountPercentage) Mutate(in rate.PricerCalculateInput, pricerResult rating.DetailedLines) (rating.DetailedLines, error)", + "line": 20 + }, + { + "kind": "struct", + "name": "discountWithChildReferenceID", + "signature": "type discountWithChildReferenceID struct", + "line": 46 + }, + { + "kind": "func", + "name": "getDiscount", + "signature": "func (m *DiscountPercentage) getDiscount(discounts billing.Discounts) (*discountWithChildReferenceID, error)", + "line": 51 + }, + { + "kind": "func", + "name": "getLineDiscount", + "signature": "func (m *DiscountPercentage) getLineDiscount(lineTotal alpacadecimal.Decimal, currency currencyx.Calculator, discount discountWithChildReferenceID) (billing.AmountLineDiscountManaged, error)", + "line": 66 + } + ], + "line_count": 80 + }, + "openmeter/billing/rating/service/mutator/discountusage.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "DiscountUsage", + "signature": "type DiscountUsage struct", + "line": 14 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (m *DiscountUsage) Mutate(l rate.PricerCalculateInput) (rate.PricerCalculateInput, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "ApplyUsageDiscountInput", + "signature": "type ApplyUsageDiscountInput struct", + "line": 46 + }, + { + "kind": "struct", + "name": "ApplyUsageDiscountResult", + "signature": "type ApplyUsageDiscountResult struct", + "line": 53 + }, + { + "kind": "func", + "name": "ApplyUsageDiscount", + "signature": "func ApplyUsageDiscount(in ApplyUsageDiscountInput) (ApplyUsageDiscountResult, error)", + "line": 59 + }, + { + "kind": "func", + "name": "removeRateCardUsageDiscounts", + "signature": "func removeRateCardUsageDiscounts(discounts billing.StandardLineDiscounts) billing.StandardLineDiscounts", + "line": 102 + }, + { + "kind": "struct", + "name": "applyDiscountResult", + "signature": "type applyDiscountResult struct", + "line": 110 + }, + { + "kind": "func", + "name": "applyDiscount", + "signature": "func applyDiscount(discountAvailable alpacadecimal.Decimal, usage alpacadecimal.Decimal) applyDiscountResult", + "line": 115 + } + ], + "line_count": 127 + }, + "openmeter/billing/rating/service/mutator/discountusage_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestApplyUsageDiscount", + "signature": "func TestApplyUsageDiscount(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestApplyUsageDiscountWhenDiscountAlreadyConsumed", + "signature": "func TestApplyUsageDiscountWhenDiscountAlreadyConsumed(t *testing.T)", + "line": 42 + } + ], + "line_count": 62 + }, + "openmeter/billing/rating/service/mutator/types.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating/service/rate\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "PostCalculationMutator", + "signature": "type PostCalculationMutator interface", + "line": 8 + }, + { + "kind": "interface", + "name": "PreCalculationMutator", + "signature": "type PreCalculationMutator interface", + "line": 12 + } + ], + "line_count": 14 + }, + "openmeter/billing/rating/service/options_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestGenerateDetailedLinesMinimumCommitmentOptions", + "signature": "func TestGenerateDetailedLinesMinimumCommitmentOptions(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestGenerateDetailedLinesCreditsMutatorOptions", + "signature": "func TestGenerateDetailedLinesCreditsMutatorOptions(t *testing.T)", + "line": 115 + } + ], + "line_count": 184 + }, + "openmeter/billing/rating/service/pricer.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "func", + "name": "getPricerFor", + "signature": "func getPricerFor(line rating.PriceAccessor, opts rating.GenerateDetailedLinesOptions) (*priceMutator, error)", + "line": 14 + }, + { + "kind": "struct", + "name": "priceMutator", + "signature": "type priceMutator struct", + "line": 83 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p *priceMutator) GenerateDetailedLines(l rate.PricerCalculateInput) (rating.GenerateDetailedLinesResult, error)", + "line": 89 + }, + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (p *priceMutator) ResolveBillablePeriod(in rating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 121 + } + ], + "line_count": 123 + }, + "openmeter/billing/rating/service/rate/base.go": { + "header": "\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "ProgressiveBillingMeteredPricer", + "signature": "type ProgressiveBillingMeteredPricer struct", + "line": 15 + }, + { + "kind": "struct", + "name": "NonProgressiveBillingPricer", + "signature": "type NonProgressiveBillingPricer struct", + "line": 50 + } + ], + "line_count": 68 + }, + "openmeter/billing/rating/service/rate/dynamic.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "struct", + "name": "Dynamic", + "signature": "type Dynamic struct", + "line": 12 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p Dynamic) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 18 + } + ], + "line_count": 46 + }, + "openmeter/billing/rating/service/rate/dynamic_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestDynamicPriceCalculation", + "signature": "func TestDynamicPriceCalculation(t *testing.T)", + "line": 19 + } + ], + "line_count": 235 + }, + "openmeter/billing/rating/service/rate/flat.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "Flat", + "signature": "type Flat struct", + "line": 17 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p Flat) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 21 + }, + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (p Flat) ResolveBillablePeriod(in rating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 65 + } + ], + "line_count": 82 + }, + "openmeter/billing/rating/service/rate/flat_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/totals\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatLineCalculation", + "signature": "func TestFlatLineCalculation(t *testing.T)", + "line": 14 + } + ], + "line_count": 140 + }, + "openmeter/billing/rating/service/rate/package.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "struct", + "name": "Package", + "signature": "type Package struct", + "line": 12 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p Package) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 18 + }, + { + "kind": "func", + "name": "GetNumberOfPackages", + "signature": "func (p Package) GetNumberOfPackages(qty alpacadecimal.Decimal, packageSize alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 55 + } + ], + "line_count": 63 + }, + "openmeter/billing/rating/service/rate/package_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestPackagePriceCalculation", + "signature": "func TestPackagePriceCalculation(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestGetNumberOfPackages", + "signature": "func TestGetNumberOfPackages(t *testing.T)", + "line": 299 + } + ], + "line_count": 307 + }, + "openmeter/billing/rating/service/rate/tiered.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "Tiered", + "signature": "type Tiered struct", + "line": 13 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p Tiered) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 20 + }, + { + "kind": "func", + "name": "ResolveBillablePeriod", + "signature": "func (p Tiered) ResolveBillablePeriod(in rating.ResolveBillablePeriodInput) (*timeutil.ClosedPeriod, error)", + "line": 36 + } + ], + "line_count": 50 + }, + "openmeter/billing/rating/service/rate/tieredgraduated.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "struct", + "name": "GraduatedTiered", + "signature": "type GraduatedTiered struct", + "line": 13 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p GraduatedTiered) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 19 + }, + { + "kind": "struct", + "name": "TierRange", + "signature": "type TierRange struct", + "line": 81 + }, + { + "kind": "struct", + "name": "TierCallbackInput", + "signature": "type TierCallbackInput struct", + "line": 90 + }, + { + "kind": "struct", + "name": "TieredPriceCalculatorInput", + "signature": "type TieredPriceCalculatorInput struct", + "line": 98 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i TieredPriceCalculatorInput) Validate() error", + "line": 112 + }, + { + "kind": "func", + "name": "splitTierRangeAtBoundary", + "signature": "func (p GraduatedTiered) splitTierRangeAtBoundary(from, to alpacadecimal.Decimal, qtyRange TierRange) []TierRange", + "line": 140 + }, + { + "kind": "func", + "name": "TieredPriceCalculator", + "signature": "func (p GraduatedTiered) TieredPriceCalculator(in TieredPriceCalculatorInput) error", + "line": 193 + } + ], + "line_count": 294 + }, + "openmeter/billing/rating/service/rate/tieredgraduated_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "TestTieredGraduatedCalculation", + "signature": "func TestTieredGraduatedCalculation(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestTieredPriceCalculator", + "signature": "func TestTieredPriceCalculator(t *testing.T)", + "line": 367 + }, + { + "kind": "func", + "name": "getTotalAmountForGraduatedTieredPrice", + "signature": "func getTotalAmountForGraduatedTieredPrice(t *testing.T, qty alpacadecimal.Decimal, tieredPrice productcatalog.TieredPrice) alpacadecimal.Decimal", + "line": 630 + }, + { + "kind": "func", + "name": "introspectTieredPriceRangesFn", + "signature": "func introspectTieredPriceRangesFn(t *testing.T) func([]rate.TierRange)", + "line": 653 + }, + { + "kind": "struct", + "name": "mockableTieredPriceCalculator", + "signature": "type mockableTieredPriceCalculator struct", + "line": 661 + }, + { + "kind": "func", + "name": "TierCallbackFn", + "signature": "func (m *mockableTieredPriceCalculator) TierCallbackFn(i rate.TierCallbackInput) error", + "line": 665 + }, + { + "kind": "func", + "name": "FinalizerFn", + "signature": "func (m *mockableTieredPriceCalculator) FinalizerFn(t alpacadecimal.Decimal) error", + "line": 670 + } + ], + "line_count": 673 + }, + "openmeter/billing/rating/service/rate/tieredvolume.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "VolumeTiered", + "signature": "type VolumeTiered struct", + "line": 13 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p VolumeTiered) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 19 + }, + { + "kind": "struct", + "name": "FindTierForQuantityResult", + "signature": "type FindTierForQuantityResult struct", + "line": 81 + }, + { + "kind": "func", + "name": "FindTierForQuantity", + "signature": "func (p VolumeTiered) FindTierForQuantity(price productcatalog.TieredPrice, quantity alpacadecimal.Decimal) (FindTierForQuantityResult, error)", + "line": 86 + } + ], + "line_count": 100 + }, + "openmeter/billing/rating/service/rate/tieredvolume_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestTieredVolumeCalculation", + "signature": "func TestTieredVolumeCalculation(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestFindTierForQuantity", + "signature": "func TestFindTierForQuantity(t *testing.T)", + "line": 481 + } + ], + "line_count": 541 + }, + "openmeter/billing/rating/service/rate/types.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "interface", + "name": "Pricer", + "signature": "type Pricer interface", + "line": 14 + }, + { + "kind": "struct", + "name": "PricerCalculateInput", + "signature": "type PricerCalculateInput struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PricerCalculateInput) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "GetUsage", + "signature": "func (i PricerCalculateInput) GetUsage() (rating.Usage, error)", + "line": 44 + }, + { + "kind": "func", + "name": "IsLastInPeriod", + "signature": "func (i PricerCalculateInput) IsLastInPeriod() bool", + "line": 52 + }, + { + "kind": "func", + "name": "IsFirstInPeriod", + "signature": "func (i PricerCalculateInput) IsFirstInPeriod() bool", + "line": 62 + } + ], + "line_count": 70 + }, + "openmeter/billing/rating/service/rate/unit.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "Unit", + "signature": "type Unit struct", + "line": 10 + }, + { + "kind": "func", + "name": "GenerateDetailedLines", + "signature": "func (p Unit) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error)", + "line": 16 + } + ], + "line_count": 40 + }, + "openmeter/billing/rating/service/rate/unit_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestUnitPriceCalculation", + "signature": "func TestUnitPriceCalculation(t *testing.T)", + "line": 18 + } + ], + "line_count": 306 + }, + "openmeter/billing/rating/service/service.go": { + "header": "type service struct{}\nfunc New() rating.Service {\n\treturn &service{}", + "symbols": [ + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 5 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() rating.Service", + "line": 7 + } + ], + "line_count": 9 + }, + "openmeter/billing/rating/service/testutil/ubptest.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureUsageResponse", + "signature": "type FeatureUsageResponse struct", + "line": 34 + }, + { + "kind": "struct", + "name": "CalculationTestCase", + "signature": "type CalculationTestCase struct", + "line": 39 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 51 + }, + { + "kind": "func", + "name": "RunCalculationTestCase", + "signature": "func RunCalculationTestCase(t *testing.T, tc CalculationTestCase)", + "line": 55 + } + ], + "line_count": 154 + }, + "openmeter/billing/seq.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"github.com/openmeterio/openmeter/pkg/currencyx\"", + "symbols": [ + { + "kind": "struct", + "name": "NextSequenceNumberInput", + "signature": "type NextSequenceNumberInput struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (n NextSequenceNumberInput) Validate() error", + "line": 15 + }, + { + "kind": "struct", + "name": "SequenceDefinition", + "signature": "type SequenceDefinition struct", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d SequenceDefinition) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "PrefixMatches", + "signature": "func (d SequenceDefinition) PrefixMatches(s string) bool", + "line": 49 + }, + { + "kind": "struct", + "name": "SequenceGenerationInput", + "signature": "type SequenceGenerationInput struct", + "line": 66 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SequenceGenerationInput) Validate() error", + "line": 72 + } + ], + "line_count": 86 + }, + "openmeter/billing/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 11 + }, + { + "kind": "interface", + "name": "ProfileService", + "signature": "type ProfileService interface", + "line": 28 + }, + { + "kind": "interface", + "name": "CustomerOverrideService", + "signature": "type CustomerOverrideService interface", + "line": 40 + }, + { + "kind": "interface", + "name": "InvoiceLineService", + "signature": "type InvoiceLineService interface", + "line": 49 + }, + { + "kind": "interface", + "name": "LineEngineService", + "signature": "type LineEngineService interface", + "line": 63 + }, + { + "kind": "interface", + "name": "SplitLineGroupService", + "signature": "type SplitLineGroupService interface", + "line": 74 + }, + { + "kind": "interface", + "name": "InvoiceService", + "signature": "type InvoiceService interface", + "line": 79 + }, + { + "kind": "interface", + "name": "StandardInvoiceService", + "signature": "type StandardInvoiceService interface", + "line": 111 + }, + { + "kind": "interface", + "name": "GatheringInvoiceService", + "signature": "type GatheringInvoiceService interface", + "line": 124 + }, + { + "kind": "interface", + "name": "SequenceService", + "signature": "type SequenceService interface", + "line": 134 + }, + { + "kind": "interface", + "name": "InvoiceAppService", + "signature": "type InvoiceAppService interface", + "line": 138 + }, + { + "kind": "interface", + "name": "LockableService", + "signature": "type LockableService interface", + "line": 151 + }, + { + "kind": "interface", + "name": "ConfigService", + "signature": "type ConfigService interface", + "line": 155 + } + ], + "line_count": 159 + }, + "openmeter/billing/service/customeroverride.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (s *Service) UpsertCustomerOverride(ctx context.Context, input billing.UpsertCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 19 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (s *Service) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 74 + }, + { + "kind": "func", + "name": "GetCustomerApp", + "signature": "func (s *Service) GetCustomerApp(ctx context.Context, input billing.GetCustomerAppInput) (app.App, error)", + "line": 109 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (s *Service) DeleteCustomerOverride(ctx context.Context, input billing.DeleteCustomerOverrideInput) error", + "line": 162 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (s *Service) ListCustomerOverrides(ctx context.Context, input billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesResult, error)", + "line": 202 + }, + { + "kind": "struct", + "name": "resolveCustomerOverrideWithDetailsInput", + "signature": "type resolveCustomerOverrideWithDetailsInput struct", + "line": 266 + }, + { + "kind": "func", + "name": "GetCustomerFromCache", + "signature": "func (v resolveCustomerOverrideWithDetailsInput) GetCustomerFromCache(id string) (customer.Customer, bool)", + "line": 275 + }, + { + "kind": "func", + "name": "GetDefaultProfile", + "signature": "func (v *resolveCustomerOverrideWithDetailsInput) GetDefaultProfile(ctx context.Context, svc *Service) (*billing.Profile, error)", + "line": 284 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (v resolveCustomerOverrideWithDetailsInput) Validate() error", + "line": 294 + }, + { + "kind": "func", + "name": "resolveCustomerOverrideWithDetails", + "signature": "func (s *Service) resolveCustomerOverrideWithDetails(ctx context.Context, in resolveCustomerOverrideWithDetailsInput) (billing.CustomerOverrideWithDetails, error)", + "line": 304 + }, + { + "kind": "func", + "name": "resolveProfileWorkflow", + "signature": "func (s *Service) resolveProfileWorkflow(ctx context.Context, in resolveCustomerOverrideWithDetailsInput) (billing.CustomerOverrideWithDetails, error)", + "line": 345 + } + ], + "line_count": 401 + }, + "openmeter/billing/service/featuremeter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "linesFeatureGetter", + "signature": "type linesFeatureGetter interface", + "line": 14 + }, + { + "kind": "func", + "name": "resolveFeatureMeters", + "signature": "func (s *Service) resolveFeatureMeters(ctx context.Context, namespace string, lines linesFeatureGetter) (feature.FeatureMeters, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "featureMetersErrorWrapper", + "signature": "type featureMetersErrorWrapper struct", + "line": 36 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (w featureMetersErrorWrapper) Get(featureKey string, requireMeter bool) (feature.FeatureMeter, error)", + "line": 40 + } + ], + "line_count": 49 + }, + "openmeter/billing/service/gatheringinvoice.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListGatheringInvoices", + "signature": "func (s *Service) ListGatheringInvoices(ctx context.Context, input billing.ListGatheringInvoicesInput) (pagination.Result[billing.GatheringInvoice], error)", + "line": 20 + }, + { + "kind": "func", + "name": "UpdateGatheringInvoice", + "signature": "func (s *Service) UpdateGatheringInvoice(ctx context.Context, input billing.UpdateGatheringInvoiceInput) error", + "line": 30 + }, + { + "kind": "func", + "name": "checkIfGatheringLinesAreInvoicable", + "signature": "func (s Service) checkIfGatheringLinesAreInvoicable(ctx context.Context, invoice billing.GatheringInvoice, progressiveBilling bool, featureMeters feature.FeatureMeters) error", + "line": 119 + }, + { + "kind": "func", + "name": "GetGatheringInvoiceById", + "signature": "func (s *Service) GetGatheringInvoiceById(ctx context.Context, input billing.GetGatheringInvoiceByIdInput) (billing.GatheringInvoice, error)", + "line": 150 + } + ], + "line_count": 158 + }, + "openmeter/billing/service/gatheringinvoicependinglines.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "InvoicePendingLines", + "signature": "func (s *Service) InvoicePendingLines(ctx context.Context, input billing.InvoicePendingLinesInput, opts ...billing.InvoicePendingLinesOption) ([]billing.StandardInvoice, error)", + "line": 49 + }, + { + "kind": "func", + "name": "prepareBillableLines", + "signature": "func (s *Service) prepareBillableLines(ctx context.Context, input billing.PrepareBillableLinesInput, options billing.InvoicePendingLinesOptions) (*billing.PrepareBillableLinesResult, error)", + "line": 98 + }, + { + "kind": "func", + "name": "resolvePendingLineCollectionCutoff", + "signature": "func resolvePendingLineCollectionCutoff(options billing.InvoicePendingLinesOptions, collection billing.CollectionConfig, asOf time.Time) (time.Time, error)", + "line": 250 + }, + { + "kind": "func", + "name": "latestAnchorAtOrBefore", + "signature": "func latestAnchorAtOrBefore(detail *billing.AnchoredAlignmentDetail, asOf time.Time) (time.Time, error)", + "line": 265 + }, + { + "kind": "struct", + "name": "gatheringLineWithBillablePeriod", + "signature": "type gatheringLineWithBillablePeriod struct", + "line": 283 + }, + { + "kind": "struct", + "name": "gatheringInvoiceWithFeatureMeters", + "signature": "type gatheringInvoiceWithFeatureMeters struct", + "line": 289 + }, + { + "kind": "struct", + "name": "gatherInScopeLineInput", + "signature": "type gatherInScopeLineInput struct", + "line": 294 + }, + { + "kind": "func", + "name": "gatherInScopeLines", + "signature": "func (s *Service) gatherInScopeLines(ctx context.Context, in gatherInScopeLineInput) (gatherInScopeLinesResult, error)", + "line": 305 + }, + { + "kind": "struct", + "name": "hasInvoicableLinesInput", + "signature": "type hasInvoicableLinesInput struct", + "line": 428 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i hasInvoicableLinesInput) Validate() error", + "line": 435 + }, + { + "kind": "func", + "name": "hasInvoicableLines", + "signature": "func (s *Service) hasInvoicableLines(ctx context.Context, in hasInvoicableLinesInput) (bool, error)", + "line": 453 + }, + { + "kind": "struct", + "name": "prepareLinesToBillInput", + "signature": "type prepareLinesToBillInput struct", + "line": 480 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i prepareLinesToBillInput) Validate() error", + "line": 486 + }, + { + "kind": "struct", + "name": "prepareLinesToBillResult", + "signature": "type prepareLinesToBillResult struct", + "line": 510 + }, + { + "kind": "func", + "name": "prepareLinesToBill", + "signature": "func (s *Service) prepareLinesToBill(ctx context.Context, input prepareLinesToBillInput) (*prepareLinesToBillResult, error)", + "line": 517 + }, + { + "kind": "func", + "name": "CreateStandardInvoiceFromGatheringLines", + "signature": "func (s *Service) CreateStandardInvoiceFromGatheringLines(ctx context.Context, in billing.CreateStandardInvoiceFromGatheringLinesInput) (*billing.StandardInvoice, error)", + "line": 621 + }, + { + "kind": "func", + "name": "invokeOnStandardInvoiceCreated", + "signature": "func (s *Service) invokeOnStandardInvoiceCreated(ctx context.Context, invoice billing.StandardInvoice) (billing.StandardInvoice, error)", + "line": 836 + }, + { + "kind": "func", + "name": "recalculateStandardInvoice", + "signature": "func (s *Service) recalculateStandardInvoice(ctx context.Context, invoice billing.StandardInvoice) (billing.StandardInvoice, error)", + "line": 872 + }, + { + "kind": "func", + "name": "invokePostCreationHooks", + "signature": "func (s *Service) invokePostCreationHooks(invoice billing.StandardInvoice, hook billing.PostCreationCalculationHook) error", + "line": 905 + }, + { + "kind": "func", + "name": "removeLinesFromGatheringInvoice", + "signature": "func (s *Service) removeLinesFromGatheringInvoice(ctx context.Context, invoice billing.GatheringInvoice, linesToRemove billing.GatheringLines) error", + "line": 930 + }, + { + "kind": "func", + "name": "validateUniqueChargeIDs", + "signature": "func validateUniqueChargeIDs(lines billing.GatheringLines) error", + "line": 984 + } + ], + "line_count": 998 + }, + "openmeter/billing/service/gatheringinvoicependinglines_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestResolvePendingLineCollectionCutoff", + "signature": "func TestResolvePendingLineCollectionCutoff(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "mustTime", + "signature": "func mustTime(t *testing.T, value string) time.Time", + "line": 152 + } + ], + "line_count": 159 + }, + "openmeter/billing/service/invoice.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListInvoices", + "signature": "func (s *Service) ListInvoices(ctx context.Context, input billing.ListInvoicesInput) (billing.ListInvoicesResponse, error)", + "line": 24 + }, + { + "kind": "func", + "name": "resolveWorkflowApps", + "signature": "func (s *Service) resolveWorkflowApps(ctx context.Context, invoice billing.StandardInvoice) (billing.StandardInvoice, error)", + "line": 104 + }, + { + "kind": "func", + "name": "resolveStatusDetails", + "signature": "func (s *Service) resolveStatusDetails(ctx context.Context, invoice billing.StandardInvoice) (billing.StandardInvoice, error)", + "line": 129 + }, + { + "kind": "struct", + "name": "recalculateGatheringInvoiceInput", + "signature": "type recalculateGatheringInvoiceInput struct", + "line": 158 + }, + { + "kind": "func", + "name": "calculateGatheringInvoiceAsStandardInvoice", + "signature": "func (s *Service) calculateGatheringInvoiceAsStandardInvoice(ctx context.Context, in recalculateGatheringInvoiceInput) (*billing.StandardInvoice, error)", + "line": 163 + }, + { + "kind": "func", + "name": "createStandardInvoiceHeaderFromGatheringInvoice", + "signature": "func (s *Service) createStandardInvoiceHeaderFromGatheringInvoice(ctx context.Context, in billing.GatheringInvoice) (*billing.StandardInvoice, error)", + "line": 331 + }, + { + "kind": "func", + "name": "GetInvoiceById", + "signature": "func (s *Service) GetInvoiceById(ctx context.Context, input billing.GetInvoiceByIdInput) (billing.Invoice, error)", + "line": 375 + }, + { + "kind": "func", + "name": "advanceUntilStateStable", + "signature": "func (s *Service) advanceUntilStateStable(ctx context.Context, sm *InvoiceStateMachine) error", + "line": 444 + }, + { + "kind": "struct", + "name": "withLockedStateMachineInput", + "signature": "type withLockedStateMachineInput struct", + "line": 463 + }, + { + "kind": "func", + "name": "withLockedInvoiceStateMachine", + "signature": "func (s *Service) withLockedInvoiceStateMachine(\n\tctx context.Context,\n\tin withLockedStateMachineInput,\n) (billing.StandardInvoice, error)", + "line": 469 + }, + { + "kind": "func", + "name": "AdvanceInvoice", + "signature": "func (s *Service) AdvanceInvoice(ctx context.Context, input billing.AdvanceInvoiceInput) (billing.StandardInvoice, error)", + "line": 504 + }, + { + "kind": "func", + "name": "ApproveInvoice", + "signature": "func (s *Service) ApproveInvoice(ctx context.Context, input billing.ApproveInvoiceInput) (billing.StandardInvoice, error)", + "line": 547 + }, + { + "kind": "func", + "name": "PaymentAuthorized", + "signature": "func (s *Service) PaymentAuthorized(ctx context.Context, input billing.PaymentAuthorizedInput) (billing.StandardInvoice, error)", + "line": 551 + }, + { + "kind": "func", + "name": "ForceCollectInvoice", + "signature": "func (s *Service) ForceCollectInvoice(ctx context.Context, input billing.ForceCollectInvoiceInput) (billing.StandardInvoice, error)", + "line": 556 + }, + { + "kind": "func", + "name": "RetryInvoice", + "signature": "func (s *Service) RetryInvoice(ctx context.Context, input billing.RetryInvoiceInput) (billing.StandardInvoice, error)", + "line": 560 + }, + { + "kind": "struct", + "name": "executeTriggerOnInvoiceOptions", + "signature": "type executeTriggerOnInvoiceOptions struct", + "line": 594 + }, + { + "kind": "func", + "name": "ExecuteTriggerWithEditCallback", + "signature": "func ExecuteTriggerWithEditCallback(cb editCallbackFunc) executeTriggerApplyOptionFunc", + "line": 600 + }, + { + "kind": "func", + "name": "ExecuteTriggerWithAllowInStates", + "signature": "func ExecuteTriggerWithAllowInStates(states ...billing.StandardInvoiceStatus) executeTriggerApplyOptionFunc", + "line": 606 + }, + { + "kind": "func", + "name": "ExecuteTriggerWithIncludeDeletedLines", + "signature": "func ExecuteTriggerWithIncludeDeletedLines(includeDeletedLines bool) executeTriggerApplyOptionFunc", + "line": 612 + }, + { + "kind": "func", + "name": "collectNewlyDeletedStandardLines", + "signature": "func collectNewlyDeletedStandardLines(before, after billing.StandardInvoiceLines) (billing.StandardLines, error)", + "line": 618 + }, + { + "kind": "func", + "name": "executeTriggerOnInvoice", + "signature": "func (s *Service) executeTriggerOnInvoice(ctx context.Context, invoiceID billing.InvoiceID, trigger billing.InvoiceTrigger, opts ...executeTriggerApplyOptionFunc) (billing.StandardInvoice, error)", + "line": 658 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (s *Service) DeleteInvoice(ctx context.Context, input billing.DeleteInvoiceInput) (billing.StandardInvoice, error)", + "line": 768 + }, + { + "kind": "func", + "name": "updateInvoice", + "signature": "func (s Service) updateInvoice(ctx context.Context, in billing.UpdateStandardInvoiceAdapterInput) (billing.StandardInvoice, error)", + "line": 792 + }, + { + "kind": "func", + "name": "checkIfLinesAreInvoicable", + "signature": "func (s Service) checkIfLinesAreInvoicable(ctx context.Context, invoice *billing.StandardInvoice, progressiveBilling bool, featureMeters feature.FeatureMeters) error", + "line": 817 + }, + { + "kind": "func", + "name": "SimulateInvoice", + "signature": "func (s Service) SimulateInvoice(ctx context.Context, input billing.SimulateInvoiceInput) (billing.StandardInvoice, error)", + "line": 852 + }, + { + "kind": "func", + "name": "buildSimulatedCustomerProfile", + "signature": "func (s *Service) buildSimulatedCustomerProfile(ctx context.Context, namespace string, simulatedCustomer customer.Customer) (billing.CustomerOverrideWithDetails, error)", + "line": 984 + }, + { + "kind": "func", + "name": "UpsertValidationIssues", + "signature": "func (s *Service) UpsertValidationIssues(ctx context.Context, input billing.UpsertValidationIssuesInput) error", + "line": 998 + }, + { + "kind": "func", + "name": "RecalculateGatheringInvoices", + "signature": "func (s *Service) RecalculateGatheringInvoices(ctx context.Context, input billing.RecalculateGatheringInvoicesInput) error", + "line": 1029 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (s *Service) UpdateInvoice(ctx context.Context, input billing.UpdateInvoiceInput) (billing.Invoice, error)", + "line": 1074 + } + ], + "line_count": 1164 + }, + "openmeter/billing/service/invoice_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestCollectNewlyDeletedStandardLines", + "signature": "func TestCollectNewlyDeletedStandardLines(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "newStandardLineForLineEngineTest", + "signature": "func newStandardLineForLineEngineTest(id string, engine billing.LineEngineType, deleted bool) *billing.StandardLine", + "line": 39 + } + ], + "line_count": 72 + }, + "openmeter/billing/service/invoiceapp.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "TriggerInvoice", + "signature": "func (s *Service) TriggerInvoice(ctx context.Context, input billing.InvoiceTriggerServiceInput) error", + "line": 13 + }, + { + "kind": "func", + "name": "UpdateInvoiceFields", + "signature": "func (s *Service) UpdateInvoiceFields(ctx context.Context, input billing.UpdateInvoiceFieldsInput) error", + "line": 53 + }, + { + "kind": "struct", + "name": "syncEditInvoiceInput", + "signature": "type syncEditInvoiceInput struct", + "line": 63 + }, + { + "kind": "func", + "name": "syncEditInvoice", + "signature": "func (s *Service) syncEditInvoice(ctx context.Context, input syncEditInvoiceInput) (billing.StandardInvoice, error)", + "line": 68 + }, + { + "kind": "func", + "name": "SyncDraftInvoice", + "signature": "func (s *Service) SyncDraftInvoice(ctx context.Context, input billing.SyncDraftStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 117 + }, + { + "kind": "func", + "name": "SyncIssuingInvoice", + "signature": "func (s *Service) SyncIssuingInvoice(ctx context.Context, input billing.SyncIssuingStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 124 + } + ], + "line_count": 129 + }, + "openmeter/billing/service/invoicecalc/calculator.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/rating\"", + "symbols": [ + { + "kind": "struct", + "name": "invoiceCalculatorsByType", + "signature": "type invoiceCalculatorsByType struct", + "line": 12 + }, + { + "kind": "interface", + "name": "Calculator", + "signature": "type Calculator interface", + "line": 49 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (t TaxCodes) Get(stripeCode string) (*taxcode.TaxCode, bool)", + "line": 61 + }, + { + "kind": "struct", + "name": "StandardInvoiceCalculatorDependencies", + "signature": "type StandardInvoiceCalculatorDependencies struct", + "line": 72 + }, + { + "kind": "struct", + "name": "GatheringInvoiceCalculatorDependencies", + "signature": "type GatheringInvoiceCalculatorDependencies struct", + "line": 79 + }, + { + "kind": "interface", + "name": "LineEngineResolver", + "signature": "type LineEngineResolver interface", + "line": 83 + }, + { + "kind": "struct", + "name": "calculator", + "signature": "type calculator struct", + "line": 87 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() Calculator", + "line": 89 + }, + { + "kind": "func", + "name": "Calculate", + "signature": "func (c *calculator) Calculate(invoice *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 93 + }, + { + "kind": "func", + "name": "applyCalculations", + "signature": "func (c *calculator) applyCalculations(invoice *billing.StandardInvoice, calculators []StandardInvoiceCalculation, deps StandardInvoiceCalculatorDependencies) error", + "line": 97 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoiceWithLiveData", + "signature": "func (c *calculator) CalculateGatheringInvoiceWithLiveData(invoice *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 113 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoice", + "signature": "func (c *calculator) CalculateGatheringInvoice(invoice *billing.GatheringInvoice, deps GatheringInvoiceCalculatorDependencies) error", + "line": 121 + }, + { + "kind": "func", + "name": "WithNoDependencies", + "signature": "func WithNoDependencies(cb func(inv *billing.StandardInvoice) error) StandardInvoiceCalculation", + "line": 135 + }, + { + "kind": "func", + "name": "WithNoGatheringDependencies", + "signature": "func WithNoGatheringDependencies(cb func(inv *billing.GatheringInvoice) error) GatheringInvoiceCalculation", + "line": 141 + } + ], + "line_count": 145 + }, + "openmeter/billing/service/invoicecalc/collectionat.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "GatheringInvoiceCollectionAt", + "signature": "func GatheringInvoiceCollectionAt(i *billing.GatheringInvoice, deps GatheringInvoiceCalculatorDependencies) error", + "line": 14 + }, + { + "kind": "func", + "name": "calculateGatheringInvoiceNextCollectionAt", + "signature": "func calculateGatheringInvoiceNextCollectionAt(collectionConfig billing.CollectionConfig, minInvoiceAt time.Time) (time.Time, error)", + "line": 42 + }, + { + "kind": "func", + "name": "StandardInvoiceCollectionAt", + "signature": "func StandardInvoiceCollectionAt(i *billing.StandardInvoice) error", + "line": 73 + }, + { + "kind": "func", + "name": "resolveStandardLineCollectionAt", + "signature": "func resolveStandardLineCollectionAt(collectionConfig billing.CollectionConfig, line *billing.StandardLine) time.Time", + "line": 101 + } + ], + "line_count": 114 + }, + "openmeter/billing/service/invoicecalc/collectionat_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestGatheringInvoiceCollectionAt", + "signature": "func TestGatheringInvoiceCollectionAt(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestStandardInvoiceCollectionAt", + "signature": "func TestStandardInvoiceCollectionAt(t *testing.T)", + "line": 196 + }, + { + "kind": "func", + "name": "newGatheringInvoice", + "signature": "func newGatheringInvoice(lines ...billing.GatheringLine) billing.GatheringInvoice", + "line": 329 + }, + { + "kind": "func", + "name": "newGatheringLine", + "signature": "func newGatheringLine(t *testing.T, invoiceAt string) billing.GatheringLine", + "line": 335 + }, + { + "kind": "func", + "name": "newDeletedGatheringLine", + "signature": "func newDeletedGatheringLine(t *testing.T, invoiceAt string) billing.GatheringLine", + "line": 347 + }, + { + "kind": "func", + "name": "newStandardInvoice", + "signature": "func newStandardInvoice(createdAt time.Time, interval datetime.ISODuration, lines ...*billing.StandardLine) billing.StandardInvoice", + "line": 357 + }, + { + "kind": "func", + "name": "newStandardLine", + "signature": "func newStandardLine(t *testing.T, invoiceAt string) *billing.StandardLine", + "line": 374 + }, + { + "kind": "func", + "name": "newStandardLineWithOverride", + "signature": "func newStandardLineWithOverride(t *testing.T, invoiceAt, overrideCollectionPeriodEnd string) *billing.StandardLine", + "line": 398 + }, + { + "kind": "func", + "name": "newDeletedStandardLine", + "signature": "func newDeletedStandardLine(t *testing.T, invoiceAt string) *billing.StandardLine", + "line": 407 + }, + { + "kind": "func", + "name": "newFlatFeeStandardLine", + "signature": "func newFlatFeeStandardLine(t *testing.T, invoiceAt string) *billing.StandardLine", + "line": 417 + }, + { + "kind": "func", + "name": "mustTime", + "signature": "func mustTime(t *testing.T, value string) time.Time", + "line": 438 + } + ], + "line_count": 445 + }, + "openmeter/billing/service/invoicecalc/details.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "RecalculateDetailedLinesAndTotals", + "signature": "func RecalculateDetailedLinesAndTotals(invoice *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 19 + }, + { + "kind": "func", + "name": "newDetailedLines", + "signature": "func newDetailedLines(line *billing.StandardLine, inputs ...rating.DetailedLine) (billing.DetailedLines, error)", + "line": 92 + }, + { + "kind": "func", + "name": "MergeGeneratedDetailedLines", + "signature": "func MergeGeneratedDetailedLines(parentLine *billing.StandardLine, in rating.GenerateDetailedLinesResult) error", + "line": 140 + } + ], + "line_count": 163 + }, + "openmeter/billing/service/invoicecalc/details_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestRecalculateDetailedLinesAndTotalsSkipsEnginesWithoutCalculator", + "signature": "func TestRecalculateDetailedLinesAndTotalsSkipsEnginesWithoutCalculator(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (r staticLineEngineResolver) Get(engineType billing.LineEngineType) (billing.LineEngine, error)", + "line": 46 + }, + { + "kind": "struct", + "name": "nonCalculatingLineEngine", + "signature": "type nonCalculatingLineEngine struct", + "line": 55 + } + ], + "line_count": 57 + }, + "openmeter/billing/service/invoicecalc/discounts.go": { + "header": "\t\"fmt\"\n\t\"github.com/oklog/ulid/v2\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "UpsertDiscountCorrelationIDs", + "signature": "func UpsertDiscountCorrelationIDs(invoice *billing.StandardInvoice) error", + "line": 11 + }, + { + "kind": "func", + "name": "UpsertGatheringInvoiceDiscountCorrelationIDs", + "signature": "func UpsertGatheringInvoiceDiscountCorrelationIDs(invoice *billing.GatheringInvoice) error", + "line": 25 + }, + { + "kind": "func", + "name": "ensureDiscountCorrelationIDs", + "signature": "func ensureDiscountCorrelationIDs(discounts billing.Discounts) (billing.Discounts, error)", + "line": 45 + }, + { + "kind": "func", + "name": "generateDiscountCorrelationID", + "signature": "func generateDiscountCorrelationID(correlationID string) (string, error)", + "line": 65 + } + ], + "line_count": 76 + }, + "openmeter/billing/service/invoicecalc/draftuntil.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n)", + "symbols": [ + { + "kind": "func", + "name": "CalculateDraftUntil", + "signature": "func CalculateDraftUntil(i *billing.StandardInvoice) error", + "line": 10 + } + ], + "line_count": 23 + }, + "openmeter/billing/service/invoicecalc/dueat.go": { + "header": "\t\"time\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "CalculateDueAt", + "signature": "func CalculateDueAt(i *billing.StandardInvoice) error", + "line": 11 + } + ], + "line_count": 40 + }, + "openmeter/billing/service/invoicecalc/gatheringrealtime.go": { + "header": "\t\"time\"\n\t\"github.com/oklog/ulid/v2\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "FillGatheringDetailedLineMeta", + "signature": "func FillGatheringDetailedLineMeta(invoice *billing.StandardInvoice) error", + "line": 15 + } + ], + "line_count": 37 + }, + "openmeter/billing/service/invoicecalc/mock.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/samber/mo\"", + "symbols": [ + { + "kind": "struct", + "name": "MockableInvoiceCalculator", + "signature": "type MockableInvoiceCalculator struct", + "line": 12 + }, + { + "kind": "struct", + "name": "mockCalculator", + "signature": "type mockCalculator struct", + "line": 18 + }, + { + "kind": "func", + "name": "Calculate", + "signature": "func (m *mockCalculator) Calculate(i *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 29 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoiceWithLiveData", + "signature": "func (m *mockCalculator) CalculateGatheringInvoiceWithLiveData(i *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 44 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoice", + "signature": "func (m *mockCalculator) CalculateGatheringInvoice(i *billing.GatheringInvoice, _ GatheringInvoiceCalculatorDependencies) error", + "line": 59 + }, + { + "kind": "func", + "name": "OnCalculate", + "signature": "func (m *mockCalculator) OnCalculate(err error)", + "line": 67 + }, + { + "kind": "func", + "name": "OnCalculateGatheringInvoiceWithLiveData", + "signature": "func (m *mockCalculator) OnCalculateGatheringInvoiceWithLiveData(err error)", + "line": 71 + }, + { + "kind": "func", + "name": "OnCalculateGatheringInvoice", + "signature": "func (m *mockCalculator) OnCalculateGatheringInvoice(err error)", + "line": 75 + }, + { + "kind": "func", + "name": "AssertExpectations", + "signature": "func (m *mockCalculator) AssertExpectations(t *testing.T)", + "line": 79 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (m *mockCalculator) Reset(t *testing.T)", + "line": 95 + }, + { + "kind": "func", + "name": "NewMockableCalculator", + "signature": "func NewMockableCalculator(_ *testing.T, upstream Calculator) *MockableInvoiceCalculator", + "line": 110 + }, + { + "kind": "func", + "name": "Calculate", + "signature": "func (m *MockableInvoiceCalculator) Calculate(i *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 116 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoice", + "signature": "func (m *MockableInvoiceCalculator) CalculateGatheringInvoice(i *billing.GatheringInvoice, deps GatheringInvoiceCalculatorDependencies) error", + "line": 129 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoiceWithLiveData", + "signature": "func (m *MockableInvoiceCalculator) CalculateGatheringInvoiceWithLiveData(i *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 142 + }, + { + "kind": "func", + "name": "EnableMock", + "signature": "func (m *MockableInvoiceCalculator) EnableMock() *mockCalculator", + "line": 155 + }, + { + "kind": "func", + "name": "DisableMock", + "signature": "func (m *MockableInvoiceCalculator) DisableMock(t *testing.T)", + "line": 162 + } + ], + "line_count": 165 + }, + "openmeter/billing/service/invoicecalc/period.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/pkg/timeutil\"", + "symbols": [ + { + "kind": "func", + "name": "CalculateStandardInvoiceServicePeriod", + "signature": "func CalculateStandardInvoiceServicePeriod(invoice *billing.StandardInvoice) error", + "line": 11 + }, + { + "kind": "func", + "name": "CalculateGatheringInvoiceServicePeriod", + "signature": "func CalculateGatheringInvoiceServicePeriod(invoice *billing.GatheringInvoice) error", + "line": 41 + } + ], + "line_count": 66 + }, + "openmeter/billing/service/invoicecalc/taxconfig.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n)", + "symbols": [ + { + "kind": "func", + "name": "SnapshotTaxConfigIntoLines", + "signature": "func SnapshotTaxConfigIntoLines(invoice *billing.StandardInvoice, deps StandardInvoiceCalculatorDependencies) error", + "line": 12 + } + ], + "line_count": 36 + }, + "openmeter/billing/service/invoicecalc/taxconfig_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestTaxConfigEqualDetectsTaxCode", + "signature": "func TestTaxConfigEqualDetectsTaxCode(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestSnapshotTaxConfigIntoLines", + "signature": "func TestSnapshotTaxConfigIntoLines(t *testing.T)", + "line": 82 + } + ], + "line_count": 286 + }, + "openmeter/billing/service/invoicelinesplitgroup.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteSplitLineGroup", + "signature": "func (s *Service) DeleteSplitLineGroup(ctx context.Context, input billing.DeleteSplitLineGroupInput) error", + "line": 11 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroup", + "signature": "func (s *Service) UpdateSplitLineGroup(ctx context.Context, input billing.UpdateSplitLineGroupInput) (billing.SplitLineGroup, error)", + "line": 42 + }, + { + "kind": "func", + "name": "GetSplitLineGroup", + "signature": "func (s *Service) GetSplitLineGroup(ctx context.Context, input billing.GetSplitLineGroupInput) (billing.SplitLineHierarchy, error)", + "line": 59 + } + ], + "line_count": 69 + }, + "openmeter/billing/service/lineengine.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "engineRegistry", + "signature": "type engineRegistry struct", + "line": 13 + }, + { + "kind": "func", + "name": "newEngineRegistry", + "signature": "func newEngineRegistry() *engineRegistry", + "line": 18 + }, + { + "kind": "func", + "name": "Register", + "signature": "func (r *engineRegistry) Register(eng billing.LineEngine) error", + "line": 24 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (r *engineRegistry) Get(engineType billing.LineEngineType) (billing.LineEngine, error)", + "line": 45 + }, + { + "kind": "func", + "name": "Deregister", + "signature": "func (r *engineRegistry) Deregister(engineType billing.LineEngineType) error", + "line": 61 + }, + { + "kind": "func", + "name": "List", + "signature": "func (r *engineRegistry) List() []billing.LineEngineType", + "line": 78 + }, + { + "kind": "func", + "name": "validateLineEngine", + "signature": "func (r *engineRegistry) validateLineEngine(engineType billing.LineEngineType) error", + "line": 85 + }, + { + "kind": "func", + "name": "populateGatheringLineEngine", + "signature": "func (r *engineRegistry) populateGatheringLineEngine(line *billing.GatheringLine) error", + "line": 89 + }, + { + "kind": "func", + "name": "populateStandardLineEngine", + "signature": "func (r *engineRegistry) populateStandardLineEngine(line *billing.StandardLine) error", + "line": 98 + }, + { + "kind": "struct", + "name": "GatheringLinesWithEngine", + "signature": "type GatheringLinesWithEngine struct", + "line": 107 + }, + { + "kind": "struct", + "name": "StandardLinesWithEngine", + "signature": "type StandardLinesWithEngine struct", + "line": 112 + }, + { + "kind": "func", + "name": "groupGatheringLinesByEngine", + "signature": "func (r *engineRegistry) groupGatheringLinesByEngine(lines billing.GatheringLines) ([]GatheringLinesWithEngine, error)", + "line": 117 + }, + { + "kind": "func", + "name": "groupStandardLinesByEngine", + "signature": "func (r *engineRegistry) groupStandardLinesByEngine(lines billing.StandardLines) ([]StandardLinesWithEngine, error)", + "line": 138 + }, + { + "kind": "func", + "name": "RegisterLineEngine", + "signature": "func (s *Service) RegisterLineEngine(eng billing.LineEngine) error", + "line": 159 + }, + { + "kind": "func", + "name": "DeregisterLineEngine", + "signature": "func (s *Service) DeregisterLineEngine(engineType billing.LineEngineType) error", + "line": 163 + }, + { + "kind": "func", + "name": "GetRegisteredLineEngines", + "signature": "func (s *Service) GetRegisteredLineEngines() []billing.LineEngineType", + "line": 167 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (s *Service) OnMutableStandardLinesDeleted(ctx context.Context, input billing.OnMutableStandardLinesDeletedInput) error", + "line": 171 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (s *Service) OnUnsupportedCreditNote(ctx context.Context, input billing.OnUnsupportedCreditNoteInput) error", + "line": 199 + } + ], + "line_count": 225 + }, + "openmeter/billing/service/lineengine_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestOnMutableStandardLinesDeletedGroupsLinesByEngine", + "signature": "func TestOnMutableStandardLinesDeletedGroupsLinesByEngine(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestOnMutableStandardLinesDeletedReturnsEngineError", + "signature": "func TestOnMutableStandardLinesDeletedReturnsEngineError(t *testing.T)", + "line": 60 + }, + { + "kind": "func", + "name": "TestOnUnsupportedCreditNoteGroupsLinesByEngine", + "signature": "func TestOnUnsupportedCreditNoteGroupsLinesByEngine(t *testing.T)", + "line": 90 + }, + { + "kind": "func", + "name": "TestOnUnsupportedCreditNoteReturnsEngineError", + "signature": "func TestOnUnsupportedCreditNoteReturnsEngineError(t *testing.T)", + "line": 136 + }, + { + "kind": "struct", + "name": "recordingLineEngine", + "signature": "type recordingLineEngine struct", + "line": 166 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (e *recordingLineEngine) OnMutableStandardLinesDeleted(_ context.Context, input billing.OnMutableStandardLinesDeletedInput) error", + "line": 174 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (e *recordingLineEngine) OnUnsupportedCreditNote(_ context.Context, input billing.OnUnsupportedCreditNoteInput) error", + "line": 179 + }, + { + "kind": "func", + "name": "lineIDs", + "signature": "func lineIDs(lines billing.StandardLines) []string", + "line": 184 + } + ], + "line_count": 191 + }, + "openmeter/billing/service/lock.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "WithLock", + "signature": "func (s *Service) WithLock(ctx context.Context, customerID customer.CustomerID, fn func(ctx context.Context) error) error", + "line": 13 + } + ], + "line_count": 24 + }, + "openmeter/billing/service/profile.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateProfile", + "signature": "func (s *Service) CreateProfile(ctx context.Context, input billing.CreateProfileInput) (*billing.Profile, error)", + "line": 22 + }, + { + "kind": "struct", + "name": "resolvedApps", + "signature": "type resolvedApps struct", + "line": 117 + }, + { + "kind": "func", + "name": "GetDefaultProfile", + "signature": "func (s *Service) GetDefaultProfile(ctx context.Context, input billing.GetDefaultProfileInput) (*billing.Profile, error)", + "line": 123 + }, + { + "kind": "func", + "name": "GetProfile", + "signature": "func (s *Service) GetProfile(ctx context.Context, input billing.GetProfileInput) (*billing.Profile, error)", + "line": 140 + }, + { + "kind": "func", + "name": "DeleteProfile", + "signature": "func (s *Service) DeleteProfile(ctx context.Context, input billing.DeleteProfileInput) error", + "line": 161 + }, + { + "kind": "func", + "name": "ListProfiles", + "signature": "func (s *Service) ListProfiles(ctx context.Context, input billing.ListProfilesInput) (billing.ListProfilesResult, error)", + "line": 212 + }, + { + "kind": "func", + "name": "UpdateProfile", + "signature": "func (s *Service) UpdateProfile(ctx context.Context, input billing.UpdateProfileInput) (*billing.Profile, error)", + "line": 248 + }, + { + "kind": "func", + "name": "ProvisionDefaultBillingProfile", + "signature": "func (s *Service) ProvisionDefaultBillingProfile(ctx context.Context, namespace string) error", + "line": 334 + }, + { + "kind": "func", + "name": "IsAppUsed", + "signature": "func (s *Service) IsAppUsed(ctx context.Context, appID app.AppID) error", + "line": 386 + }, + { + "kind": "func", + "name": "resolveProfileApps", + "signature": "func (s *Service) resolveProfileApps(ctx context.Context, input *billing.BaseProfile) (*billing.Profile, error)", + "line": 392 + }, + { + "kind": "struct", + "name": "demoteDefaultProfileResult", + "signature": "type demoteDefaultProfileResult struct", + "line": 433 + }, + { + "kind": "func", + "name": "demoteDefaultProfile", + "signature": "func (s *Service) demoteDefaultProfile(ctx context.Context, ns string) (*demoteDefaultProfileResult, error)", + "line": 439 + }, + { + "kind": "struct", + "name": "defaultProfileChangeInput", + "signature": "type defaultProfileChangeInput struct", + "line": 484 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i defaultProfileChangeInput) Validate() error", + "line": 489 + }, + { + "kind": "func", + "name": "handleDefaultProfileChange", + "signature": "func (s *Service) handleDefaultProfileChange(ctx context.Context, input defaultProfileChangeInput) error", + "line": 505 + }, + { + "kind": "func", + "name": "ResolveStripeAppIDFromBillingProfile", + "signature": "func (s *Service) ResolveStripeAppIDFromBillingProfile(ctx context.Context, namespace string, customerId *customer.CustomerID) (app.AppID, error)", + "line": 554 + }, + { + "kind": "func", + "name": "resolveDefaultTaxCode", + "signature": "func (s *Service) resolveDefaultTaxCode(ctx context.Context, namespace string, taxConfig *productcatalog.TaxConfig) error", + "line": 635 + } + ], + "line_count": 637 + }, + "openmeter/billing/service/quantitysnapshot.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "SnapshotLineQuantity", + "signature": "func (s *Service) SnapshotLineQuantity(ctx context.Context, input billing.SnapshotLineQuantityInput) (*billing.StandardLine, error)", + "line": 20 + }, + { + "kind": "func", + "name": "SnapshotLineQuantities", + "signature": "func (s *Service) SnapshotLineQuantities(ctx context.Context, invoice billing.StandardInvoice, lines billing.StandardLines) error", + "line": 40 + }, + { + "kind": "func", + "name": "snapshotMeteredLineQuantity", + "signature": "func (s *Service) snapshotMeteredLineQuantity(ctx context.Context, line *billing.StandardLine, customer billing.InvoiceCustomer, featureMeters feature.FeatureMeters) error", + "line": 53 + }, + { + "kind": "func", + "name": "snapshotFlatPriceLineQuantity", + "signature": "func (s *Service) snapshotFlatPriceLineQuantity(_ context.Context, line *billing.StandardLine) error", + "line": 79 + }, + { + "kind": "func", + "name": "snapshotLineQuantity", + "signature": "func (s *Service) snapshotLineQuantity(ctx context.Context, customer billing.InvoiceCustomer, line *billing.StandardLine, featureMeters feature.FeatureMeters) error", + "line": 87 + }, + { + "kind": "func", + "name": "snapshotLineQuantitiesInParallel", + "signature": "func (s *Service) snapshotLineQuantitiesInParallel(ctx context.Context, customer billing.InvoiceCustomer, lines billing.StandardLines, featureMeters feature.FeatureMeters) error", + "line": 95 + }, + { + "kind": "struct", + "name": "getFeatureUsageInput", + "signature": "type getFeatureUsageInput struct", + "line": 150 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i getFeatureUsageInput) Validate() error", + "line": 157 + }, + { + "kind": "struct", + "name": "featureUsageResponse", + "signature": "type featureUsageResponse struct", + "line": 185 + }, + { + "kind": "func", + "name": "getFeatureUsage", + "signature": "func (s *Service) getFeatureUsage(ctx context.Context, in getFeatureUsageInput) (*featureUsageResponse, error)", + "line": 192 + }, + { + "kind": "func", + "name": "summarizeMeterQueryRow", + "signature": "func summarizeMeterQueryRow(in []meter.MeterQueryRow) alpacadecimal.Decimal", + "line": 264 + } + ], + "line_count": 271 + }, + "openmeter/billing/service/seq.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "sequenceInput", + "signature": "type sequenceInput struct", + "line": 16 + }, + { + "kind": "func", + "name": "GenerateInvoiceSequenceNumber", + "signature": "func (s *Service) GenerateInvoiceSequenceNumber(ctx context.Context, in billing.SequenceGenerationInput, def billing.SequenceDefinition) (string, error)", + "line": 22 + }, + { + "kind": "func", + "name": "getCustomerPrefix", + "signature": "func getCustomerPrefix(name string) string", + "line": 59 + }, + { + "kind": "func", + "name": "safeSubStr", + "signature": "func safeSubStr(str string, length int) string", + "line": 74 + } + ], + "line_count": 80 + }, + "openmeter/billing/service/seq_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestCustomerPrefix", + "signature": "func TestCustomerPrefix(t *testing.T)", + "line": 9 + } + ], + "line_count": 21 + }, + "openmeter/billing/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 26 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 64 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 116 + }, + { + "kind": "func", + "name": "WithInvoiceCalculator", + "signature": "func (s Service) WithInvoiceCalculator(calc invoicecalc.Calculator) *Service", + "line": 156 + }, + { + "kind": "func", + "name": "InvoiceCalculator", + "signature": "func (s Service) InvoiceCalculator() invoicecalc.Calculator", + "line": 162 + }, + { + "kind": "func", + "name": "transactionForInvoiceManipulationNoValue", + "signature": "func transactionForInvoiceManipulationNoValue(ctx context.Context, svc *Service, customerID customer.CustomerID, fn func(ctx context.Context) error) error", + "line": 192 + }, + { + "kind": "func", + "name": "GetAdvancementStrategy", + "signature": "func (s Service) GetAdvancementStrategy() billing.AdvancementStrategy", + "line": 200 + }, + { + "kind": "func", + "name": "WithAdvancementStrategy", + "signature": "func (s Service) WithAdvancementStrategy(strategy billing.AdvancementStrategy) billing.Service", + "line": 204 + }, + { + "kind": "func", + "name": "WithLockedNamespaces", + "signature": "func (s *Service) WithLockedNamespaces(namespaces []string) billing.Service", + "line": 210 + }, + { + "kind": "func", + "name": "RegisterStandardInvoiceHooks", + "signature": "func (s *Service) RegisterStandardInvoiceHooks(hooks ...billing.StandardInvoiceHook)", + "line": 216 + } + ], + "line_count": 218 + }, + "openmeter/billing/service/stdinvoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateStandardInvoice", + "signature": "func (s *Service) UpdateStandardInvoice(ctx context.Context, input billing.UpdateStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 13 + }, + { + "kind": "func", + "name": "GetStandardInvoiceById", + "signature": "func (s *Service) GetStandardInvoiceById(ctx context.Context, input billing.GetStandardInvoiceByIdInput) (billing.StandardInvoice, error)", + "line": 42 + }, + { + "kind": "func", + "name": "ListStandardInvoices", + "signature": "func (s *Service) ListStandardInvoices(ctx context.Context, input billing.ListStandardInvoicesInput) (billing.ListStandardInvoicesResponse, error)", + "line": 78 + } + ], + "line_count": 121 + }, + "openmeter/billing/service/stdinvoiceline.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePendingInvoiceLines", + "signature": "func (s *Service) CreatePendingInvoiceLines(ctx context.Context, input billing.CreatePendingInvoiceLinesInput) (*billing.CreatePendingInvoiceLinesResult, error)", + "line": 26 + }, + { + "kind": "struct", + "name": "upsertGatheringInvoiceForCurrencyResponse", + "signature": "type upsertGatheringInvoiceForCurrencyResponse struct", + "line": 170 + }, + { + "kind": "func", + "name": "upsertGatheringInvoiceForCurrency", + "signature": "func (s *Service) upsertGatheringInvoiceForCurrency(ctx context.Context, currency currencyx.Code, customerProfile billing.CustomerOverrideWithDetails) (*upsertGatheringInvoiceForCurrencyResponse, error)", + "line": 175 + }, + { + "kind": "func", + "name": "GetLinesForSubscription", + "signature": "func (s *Service) GetLinesForSubscription(ctx context.Context, input billing.GetLinesForSubscriptionInput) ([]billing.LineOrHierarchy, error)", + "line": 264 + } + ], + "line_count": 274 + }, + "openmeter/billing/service/stdinvoicestate.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoiceStateMachine", + "signature": "type InvoiceStateMachine struct", + "line": 24 + }, + { + "kind": "func", + "name": "allocateStateMachine", + "signature": "func allocateStateMachine() *InvoiceStateMachine", + "line": 42 + }, + { + "kind": "func", + "name": "WithInvoiceStateMachine", + "signature": "func (s *Service) WithInvoiceStateMachine(ctx context.Context, invoice billing.StandardInvoice, cb InvoiceStateMachineCallback) (billing.StandardInvoice, error)", + "line": 349 + }, + { + "kind": "func", + "name": "StatusDetails", + "signature": "func (m *InvoiceStateMachine) StatusDetails(ctx context.Context) (billing.StandardInvoiceStatusDetails, error)", + "line": 385 + }, + { + "kind": "func", + "name": "calculateAvailableActionDetails", + "signature": "func (m *InvoiceStateMachine) calculateAvailableActionDetails(ctx context.Context, baseTrigger billing.InvoiceTrigger) (*billing.StandardInvoiceAvailableActionDetails, error)", + "line": 430 + }, + { + "kind": "func", + "name": "requireDBSave", + "signature": "func (m *InvoiceStateMachine) requireDBSave(ctx context.Context) error", + "line": 478 + }, + { + "kind": "func", + "name": "AdvanceUntilStateStable", + "signature": "func (m *InvoiceStateMachine) AdvanceUntilStateStable(ctx context.Context) error", + "line": 484 + }, + { + "kind": "func", + "name": "CanFire", + "signature": "func (m *InvoiceStateMachine) CanFire(ctx context.Context, trigger billing.InvoiceTrigger) (bool, error)", + "line": 538 + }, + { + "kind": "func", + "name": "TriggerFailed", + "signature": "func (m *InvoiceStateMachine) TriggerFailed(ctx context.Context) error", + "line": 542 + }, + { + "kind": "func", + "name": "FireAndActivate", + "signature": "func (m *InvoiceStateMachine) FireAndActivate(ctx context.Context, trigger billing.InvoiceTrigger) error", + "line": 558 + }, + { + "kind": "func", + "name": "withInvoicingApp", + "signature": "func (m *InvoiceStateMachine) withInvoicingApp(op billing.StandardInvoiceOperation, cb func(billing.InvoicingApp) (*billing.StandardInvoiceOperation, error)) error", + "line": 628 + }, + { + "kind": "func", + "name": "triggerPostAdvanceHooks", + "signature": "func (m *InvoiceStateMachine) triggerPostAdvanceHooks(ctx context.Context) error", + "line": 659 + }, + { + "kind": "func", + "name": "HandleInvoiceTrigger", + "signature": "func (m *InvoiceStateMachine) HandleInvoiceTrigger(ctx context.Context, trigger billing.InvoiceTriggerInput) error", + "line": 692 + }, + { + "kind": "func", + "name": "mergeUpsertInvoiceResult", + "signature": "func (m *InvoiceStateMachine) mergeUpsertInvoiceResult(result *billing.UpsertStandardInvoiceResult) error", + "line": 731 + }, + { + "kind": "func", + "name": "validateDraftInvoice", + "signature": "func (m *InvoiceStateMachine) validateDraftInvoice(ctx context.Context) error", + "line": 736 + }, + { + "kind": "func", + "name": "calculateInvoice", + "signature": "func (m *InvoiceStateMachine) calculateInvoice(ctx context.Context) error", + "line": 751 + }, + { + "kind": "func", + "name": "syncDraftInvoice", + "signature": "func (m *InvoiceStateMachine) syncDraftInvoice(ctx context.Context) error", + "line": 775 + }, + { + "kind": "func", + "name": "finalizeInvoice", + "signature": "func (m *InvoiceStateMachine) finalizeInvoice(ctx context.Context) error", + "line": 801 + }, + { + "kind": "func", + "name": "syncDeletedInvoice", + "signature": "func (m *InvoiceStateMachine) syncDeletedInvoice(ctx context.Context) error", + "line": 855 + }, + { + "kind": "func", + "name": "deleteInvoice", + "signature": "func (m *InvoiceStateMachine) deleteInvoice(ctx context.Context) error", + "line": 871 + }, + { + "kind": "func", + "name": "noCriticalValidationErrors", + "signature": "func (m *InvoiceStateMachine) noCriticalValidationErrors() bool", + "line": 877 + }, + { + "kind": "func", + "name": "isAutoAdvanceEnabled", + "signature": "func (m *InvoiceStateMachine) isAutoAdvanceEnabled() bool", + "line": 881 + }, + { + "kind": "func", + "name": "shouldAutoAdvance", + "signature": "func (m *InvoiceStateMachine) shouldAutoAdvance() bool", + "line": 885 + }, + { + "kind": "func", + "name": "isReadyForCollection", + "signature": "func (m *InvoiceStateMachine) isReadyForCollection() bool", + "line": 893 + }, + { + "kind": "func", + "name": "onCollectionCompleted", + "signature": "func (m *InvoiceStateMachine) onCollectionCompleted(ctx context.Context) error", + "line": 906 + }, + { + "kind": "func", + "name": "onInvoiceIssued", + "signature": "func (m *InvoiceStateMachine) onInvoiceIssued(ctx context.Context) error", + "line": 955 + }, + { + "kind": "func", + "name": "onPaymentAuthorized", + "signature": "func (m *InvoiceStateMachine) onPaymentAuthorized(ctx context.Context) error", + "line": 978 + }, + { + "kind": "func", + "name": "onPaymentAuthorizedAndSettled", + "signature": "func (m *InvoiceStateMachine) onPaymentAuthorizedAndSettled(ctx context.Context) error", + "line": 1001 + }, + { + "kind": "func", + "name": "onPaymentSettled", + "signature": "func (m *InvoiceStateMachine) onPaymentSettled(ctx context.Context) error", + "line": 1009 + }, + { + "kind": "func", + "name": "canDraftSyncAdvance", + "signature": "func (m *InvoiceStateMachine) canDraftSyncAdvance() bool", + "line": 1032 + }, + { + "kind": "func", + "name": "validateNamespaceLockdown", + "signature": "func (m *InvoiceStateMachine) validateNamespaceLockdown() error", + "line": 1045 + }, + { + "kind": "func", + "name": "canIssuingSyncAdvance", + "signature": "func (m *InvoiceStateMachine) canIssuingSyncAdvance() bool", + "line": 1053 + } + ], + "line_count": 1064 + }, + "openmeter/billing/service/taxcode.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "resolveTaxCodesInput", + "signature": "type resolveTaxCodesInput struct", + "line": 13 + }, + { + "kind": "func", + "name": "resolveTaxCodes", + "signature": "func (s *Service) resolveTaxCodes(ctx context.Context, in resolveTaxCodesInput) (invoicecalc.TaxCodes, error)", + "line": 24 + } + ], + "line_count": 76 + }, + "openmeter/billing/serviceconfig.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s AdvancementStrategy) Validate() error", + "line": 21 + } + ], + "line_count": 33 + }, + "openmeter/billing/stdinvoice.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "MatchesInvoiceStatus", + "signature": "func (s StandardInvoiceStatusCategory) MatchesInvoiceStatus(status StandardInvoiceStatus) bool", + "line": 41 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s StandardInvoiceStatus) Values() []string", + "line": 145 + }, + { + "kind": "func", + "name": "ShortStatus", + "signature": "func (s StandardInvoiceStatus) ShortStatus() string", + "line": 154 + }, + { + "kind": "interface", + "name": "StandardInvoiceStatusMatcher", + "signature": "type StandardInvoiceStatusMatcher interface", + "line": 159 + }, + { + "kind": "func", + "name": "Matches", + "signature": "func (s StandardInvoiceStatus) Matches(statuses ...StandardInvoiceStatusMatcher) bool", + "line": 163 + }, + { + "kind": "func", + "name": "MatchesInvoiceStatus", + "signature": "func (s StandardInvoiceStatus) MatchesInvoiceStatus(status StandardInvoiceStatus) bool", + "line": 173 + }, + { + "kind": "func", + "name": "IsFailed", + "signature": "func (s StandardInvoiceStatus) IsFailed() bool", + "line": 188 + }, + { + "kind": "func", + "name": "IsFinal", + "signature": "func (s StandardInvoiceStatus) IsFinal() bool", + "line": 199 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s StandardInvoiceStatus) Validate() error", + "line": 203 + }, + { + "kind": "struct", + "name": "StandardInvoiceBase", + "signature": "type StandardInvoiceBase struct", + "line": 211 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardInvoiceBase) Validate() error", + "line": 257 + }, + { + "kind": "func", + "name": "DefaultCollectionAtForStandardInvoice", + "signature": "func (i StandardInvoiceBase) DefaultCollectionAtForStandardInvoice() time.Time", + "line": 289 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (i StandardInvoiceBase) GetDeletedAt() *time.Time", + "line": 297 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (i StandardInvoiceBase) GetID() string", + "line": 301 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (i StandardInvoiceBase) GetInvoiceID() InvoiceID", + "line": 305 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (i StandardInvoiceBase) GetCustomerID() customer.CustomerID", + "line": 312 + }, + { + "kind": "struct", + "name": "StandardInvoice", + "signature": "type StandardInvoice struct", + "line": 321 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardInvoice) Validate() error", + "line": 334 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func (i StandardInvoice) CustomerID() customer.CustomerID", + "line": 356 + }, + { + "kind": "func", + "name": "AsInvoice", + "signature": "func (i StandardInvoice) AsInvoice() Invoice", + "line": 363 + }, + { + "kind": "func", + "name": "GetGenericLines", + "signature": "func (i StandardInvoice) GetGenericLines() mo.Option[[]GenericInvoiceLine]", + "line": 370 + }, + { + "kind": "func", + "name": "SetLines", + "signature": "func (i *StandardInvoice) SetLines(lines []GenericInvoiceLine) error", + "line": 380 + }, + { + "kind": "func", + "name": "MergeValidationIssues", + "signature": "func (i *StandardInvoice) MergeValidationIssues(errIn error, reportingComponent ComponentName) error", + "line": 397 + }, + { + "kind": "func", + "name": "HasCriticalValidationIssues", + "signature": "func (i *StandardInvoice) HasCriticalValidationIssues() bool", + "line": 410 + }, + { + "kind": "func", + "name": "RemoveMetaForCompare", + "signature": "func (i StandardInvoice) RemoveMetaForCompare() (StandardInvoice, error)", + "line": 423 + }, + { + "kind": "func", + "name": "getLeafLines", + "signature": "func (i *StandardInvoice) getLeafLines() DetailedLines", + "line": 438 + }, + { + "kind": "struct", + "name": "DetailedLineWithResolvedTaxConfig", + "signature": "type DetailedLineWithResolvedTaxConfig struct", + "line": 450 + }, + { + "kind": "func", + "name": "GetLeafLinesWithResolvedTaxConfig", + "signature": "func (i *StandardInvoice) GetLeafLinesWithResolvedTaxConfig() []DetailedLineWithResolvedTaxConfig", + "line": 457 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i StandardInvoice) Clone() (StandardInvoice, error)", + "line": 473 + }, + { + "kind": "func", + "name": "RemoveCircularReferences", + "signature": "func (i StandardInvoice) RemoveCircularReferences() (StandardInvoice, error)", + "line": 488 + }, + { + "kind": "func", + "name": "SortLines", + "signature": "func (i *StandardInvoice) SortLines()", + "line": 504 + }, + { + "kind": "struct", + "name": "StandardInvoiceLines", + "signature": "type StandardInvoiceLines struct", + "line": 512 + }, + { + "kind": "func", + "name": "NewStandardInvoiceLines", + "signature": "func NewStandardInvoiceLines(children []*StandardLine) StandardInvoiceLines", + "line": 516 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardInvoiceLines) Validate() error", + "line": 525 + }, + { + "kind": "func", + "name": "Map", + "signature": "func (c StandardInvoiceLines) Map(fn func(*StandardLine) *StandardLine) StandardInvoiceLines", + "line": 531 + }, + { + "kind": "func", + "name": "MapWithErr", + "signature": "func (c StandardInvoiceLines) MapWithErr(fn func(*StandardLine) (*StandardLine, error)) (StandardInvoiceLines, error)", + "line": 543 + }, + { + "kind": "func", + "name": "WithNormalizedValues", + "signature": "func (c StandardInvoiceLines) WithNormalizedValues() (StandardInvoiceLines, error)", + "line": 556 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (c StandardInvoiceLines) Clone() (StandardInvoiceLines, error)", + "line": 562 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (c StandardInvoiceLines) GetByID(id string) *StandardLine", + "line": 568 + }, + { + "kind": "func", + "name": "ReplaceByID", + "signature": "func (c *StandardInvoiceLines) ReplaceByID(id string, newLine *StandardLine) bool", + "line": 574 + }, + { + "kind": "func", + "name": "ReplaceLinesByID", + "signature": "func (c *StandardInvoiceLines) ReplaceLinesByID(lines ...*StandardLine) error", + "line": 595 + }, + { + "kind": "func", + "name": "Sort", + "signature": "func (c *StandardInvoiceLines) Sort()", + "line": 615 + }, + { + "kind": "func", + "name": "NonDeletedLineCount", + "signature": "func (c StandardInvoiceLines) NonDeletedLineCount() int", + "line": 626 + }, + { + "kind": "func", + "name": "Append", + "signature": "func (c *StandardInvoiceLines) Append(l ...*StandardLine)", + "line": 632 + }, + { + "kind": "func", + "name": "RemoveByID", + "signature": "func (c *StandardInvoiceLines) RemoveByID(id string) bool", + "line": 636 + }, + { + "kind": "func", + "name": "GetReferencedFeatureKeys", + "signature": "func (c StandardInvoiceLines) GetReferencedFeatureKeys() ([]string, error)", + "line": 651 + }, + { + "kind": "struct", + "name": "StandardInvoiceAvailableActions", + "signature": "type StandardInvoiceAvailableActions struct", + "line": 659 + }, + { + "kind": "struct", + "name": "StandardInvoiceAvailableActionDetails", + "signature": "type StandardInvoiceAvailableActionDetails struct", + "line": 670 + }, + { + "kind": "struct", + "name": "StandardInvoiceAvailableActionInvoiceDetails", + "signature": "type StandardInvoiceAvailableActionInvoiceDetails struct", + "line": 674 + }, + { + "kind": "struct", + "name": "StandardInvoiceStatusDetails", + "signature": "type StandardInvoiceStatusDetails struct", + "line": 676 + }, + { + "kind": "struct", + "name": "CreateInvoiceAdapterInput", + "signature": "type CreateInvoiceAdapterInput struct", + "line": 694 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreateInvoiceAdapterInput) Validate() error", + "line": 712 + }, + { + "kind": "struct", + "name": "AssociatedLineCountsAdapterResponse", + "signature": "type AssociatedLineCountsAdapterResponse struct", + "line": 758 + }, + { + "kind": "struct", + "name": "GetOwnershipAdapterResponse", + "signature": "type GetOwnershipAdapterResponse struct", + "line": 774 + }, + { + "kind": "struct", + "name": "UpdateInvoiceLinesInternalInput", + "signature": "type UpdateInvoiceLinesInternalInput struct", + "line": 782 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInvoiceLinesInternalInput) Validate() error", + "line": 788 + }, + { + "kind": "struct", + "name": "UpdateStandardInvoiceInput", + "signature": "type UpdateStandardInvoiceInput struct", + "line": 800 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateStandardInvoiceInput) Validate() error", + "line": 807 + }, + { + "kind": "struct", + "name": "SimulateInvoiceInput", + "signature": "type SimulateInvoiceInput struct", + "line": 819 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SimulateInvoiceInput) Validate() error", + "line": 829 + }, + { + "kind": "struct", + "name": "UpsertValidationIssuesInput", + "signature": "type UpsertValidationIssuesInput struct", + "line": 865 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertValidationIssuesInput) Validate() error", + "line": 870 + }, + { + "kind": "struct", + "name": "InvoiceTriggerValidationInput", + "signature": "type InvoiceTriggerValidationInput struct", + "line": 882 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoiceTriggerValidationInput) Validate() error", + "line": 889 + }, + { + "kind": "struct", + "name": "InvoiceTriggerInput", + "signature": "type InvoiceTriggerInput struct", + "line": 901 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoiceTriggerInput) Validate() error", + "line": 909 + }, + { + "kind": "struct", + "name": "InvoiceTriggerServiceInput", + "signature": "type InvoiceTriggerServiceInput struct", + "line": 927 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvoiceTriggerServiceInput) Validate() error", + "line": 936 + }, + { + "kind": "struct", + "name": "UpdateInvoiceFieldsInput", + "signature": "type UpdateInvoiceFieldsInput struct", + "line": 952 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInvoiceFieldsInput) Validate() error", + "line": 957 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e StandardInvoiceExpand) Values() []StandardInvoiceExpand", + "line": 974 + }, + { + "kind": "struct", + "name": "GetStandardInvoiceByIdInput", + "signature": "type GetStandardInvoiceByIdInput struct", + "line": 988 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetStandardInvoiceByIdInput) Validate() error", + "line": 993 + }, + { + "kind": "struct", + "name": "ListStandardInvoicesInput", + "signature": "type ListStandardInvoicesInput struct", + "line": 1007 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListStandardInvoicesInput) Validate() error", + "line": 1024 + }, + { + "kind": "struct", + "name": "CreateStandardInvoiceFromGatheringLinesInput", + "signature": "type CreateStandardInvoiceFromGatheringLinesInput struct", + "line": 1047 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateStandardInvoiceFromGatheringLinesInput) Validate() error", + "line": 1062 + }, + { + "kind": "func", + "name": "NewSetCreditsAppliedOperation", + "signature": "func NewSetCreditsAppliedOperation(creditsApplied CreditsApplied) LineMutator", + "line": 1099 + } + ], + "line_count": 1104 + }, + "openmeter/billing/stdinvoice_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestSortLines", + "signature": "func TestSortLines(t *testing.T)", + "line": 15 + } + ], + "line_count": 72 + }, + "openmeter/billing/stdinvoicecredits.go": { + "header": "type (\n\tCreditsApplied = creditsapplied.CreditsApplied\n\tCreditApplied = creditsapplied.CreditApplied", + "symbols": [], + "line_count": 8 + }, + "openmeter/billing/stdinvoiceline.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "StandardLineBase", + "signature": "type StandardLineBase struct", + "line": 25 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i StandardLineBase) Equal(other StandardLineBase) bool", + "line": 58 + }, + { + "kind": "func", + "name": "GetParentID", + "signature": "func (i StandardLineBase) GetParentID() (string, bool)", + "line": 62 + }, + { + "kind": "func", + "name": "GetChargeID", + "signature": "func (i StandardLineBase) GetChargeID() *string", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardLineBase) Validate() error", + "line": 73 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i StandardLineBase) Clone() StandardLineBase", + "line": 135 + }, + { + "kind": "func", + "name": "GetCreditsApplied", + "signature": "func (i StandardLineBase) GetCreditsApplied() CreditsApplied", + "line": 171 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (i StandardLineBase) GetCurrency() currencyx.Code", + "line": 175 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (i StandardLineBase) GetName() string", + "line": 179 + }, + { + "kind": "func", + "name": "IsProgressivelyBilled", + "signature": "func (i StandardLineBase) IsProgressivelyBilled() bool", + "line": 183 + }, + { + "kind": "struct", + "name": "SubscriptionReference", + "signature": "type SubscriptionReference struct", + "line": 187 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SubscriptionReference) Validate() error", + "line": 194 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i SubscriptionReference) Clone() *SubscriptionReference", + "line": 216 + }, + { + "kind": "struct", + "name": "standardInvoiceLineGenericWrapper", + "signature": "type standardInvoiceLineGenericWrapper struct", + "line": 232 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i standardInvoiceLineGenericWrapper) Clone() (GenericInvoiceLine, error)", + "line": 236 + }, + { + "kind": "func", + "name": "CloneWithoutChildren", + "signature": "func (i standardInvoiceLineGenericWrapper) CloneWithoutChildren() (GenericInvoiceLine, error)", + "line": 245 + }, + { + "kind": "struct", + "name": "StandardLine", + "signature": "type StandardLine struct", + "line": 254 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (i StandardLine) GetLineID() LineID", + "line": 267 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (i StandardLine) GetID() string", + "line": 274 + }, + { + "kind": "func", + "name": "GetManagedBy", + "signature": "func (i StandardLine) GetManagedBy() InvoiceLineManagedBy", + "line": 278 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (i StandardLine) GetAnnotations() models.Annotations", + "line": 282 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (i *StandardLine) SetDeletedAt(at *time.Time)", + "line": 286 + }, + { + "kind": "func", + "name": "UpdateServicePeriod", + "signature": "func (i *StandardLine) UpdateServicePeriod(fn func(p *timeutil.ClosedPeriod))", + "line": 290 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (i StandardLine) GetInvoiceID() string", + "line": 296 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (i StandardLine) GetChildUniqueReferenceID() *string", + "line": 300 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (i *StandardLine) SetChildUniqueReferenceID(id *string)", + "line": 304 + }, + { + "kind": "func", + "name": "AsInvoiceLine", + "signature": "func (i StandardLine) AsInvoiceLine() InvoiceLine", + "line": 308 + }, + { + "kind": "func", + "name": "GetQuantity", + "signature": "func (i StandardLine) GetQuantity() *alpacadecimal.Decimal", + "line": 315 + }, + { + "kind": "func", + "name": "GetMeteredQuantity", + "signature": "func (i StandardLine) GetMeteredQuantity() (*alpacadecimal.Decimal, error)", + "line": 323 + }, + { + "kind": "func", + "name": "GetMeteredPreLinePeriodQuantity", + "signature": "func (i StandardLine) GetMeteredPreLinePeriodQuantity() (*alpacadecimal.Decimal, error)", + "line": 331 + }, + { + "kind": "func", + "name": "GetProgressivelyBilledServicePeriod", + "signature": "func (i StandardLine) GetProgressivelyBilledServicePeriod() (timeutil.ClosedPeriod, error)", + "line": 339 + }, + { + "kind": "func", + "name": "GetPreviouslyBilledAmount", + "signature": "func (i StandardLine) GetPreviouslyBilledAmount() (alpacadecimal.Decimal, error)", + "line": 354 + }, + { + "kind": "func", + "name": "GetStandardLineDiscounts", + "signature": "func (i StandardLine) GetStandardLineDiscounts() StandardLineDiscounts", + "line": 368 + }, + { + "kind": "func", + "name": "SetSplitLineHierarchy", + "signature": "func (i *StandardLine) SetSplitLineHierarchy(hierarchy *SplitLineHierarchy)", + "line": 372 + }, + { + "kind": "func", + "name": "ToGatheringLineBase", + "signature": "func (i StandardLine) ToGatheringLineBase() (GatheringLineBase, error)", + "line": 378 + }, + { + "kind": "func", + "name": "CloneWithoutDependencies", + "signature": "func (i StandardLine) CloneWithoutDependencies(edits ...StandardLineEditFunction) (*StandardLine, error)", + "line": 422 + }, + { + "kind": "func", + "name": "WithoutDBState", + "signature": "func (i StandardLine) WithoutDBState() *StandardLine", + "line": 454 + }, + { + "kind": "func", + "name": "WithoutSplitLineHierarchy", + "signature": "func (i StandardLine) WithoutSplitLineHierarchy() *StandardLine", + "line": 459 + }, + { + "kind": "func", + "name": "RemoveCircularReferences", + "signature": "func (i StandardLine) RemoveCircularReferences() (*StandardLine, error)", + "line": 464 + }, + { + "kind": "func", + "name": "RemoveMetaForCompare", + "signature": "func (i StandardLine) RemoveMetaForCompare() (*StandardLine, error)", + "line": 480 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i StandardLine) Clone() (*StandardLine, error)", + "line": 491 + }, + { + "kind": "func", + "name": "GetFeatureKey", + "signature": "func (i StandardLine) GetFeatureKey() string", + "line": 495 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (i StandardLine) GetPrice() *productcatalog.Price", + "line": 503 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (i *StandardLine) SetPrice(price productcatalog.Price)", + "line": 511 + }, + { + "kind": "func", + "name": "GetRateCardDiscounts", + "signature": "func (i StandardLine) GetRateCardDiscounts() Discounts", + "line": 519 + }, + { + "kind": "func", + "name": "GetServicePeriod", + "signature": "func (i StandardLine) GetServicePeriod() timeutil.ClosedPeriod", + "line": 523 + }, + { + "kind": "func", + "name": "GetSplitLineGroupID", + "signature": "func (i StandardLine) GetSplitLineGroupID() *string", + "line": 530 + }, + { + "kind": "func", + "name": "GetInvoiceAt", + "signature": "func (i StandardLine) GetInvoiceAt() time.Time", + "line": 534 + }, + { + "kind": "func", + "name": "GetSubscriptionReference", + "signature": "func (i StandardLine) GetSubscriptionReference() *SubscriptionReference", + "line": 538 + }, + { + "kind": "struct", + "name": "cloneOptions", + "signature": "type cloneOptions struct", + "line": 546 + }, + { + "kind": "func", + "name": "clone", + "signature": "func (i StandardLine) clone(opts cloneOptions) (*StandardLine, error)", + "line": 552 + }, + { + "kind": "func", + "name": "CloneWithoutChildren", + "signature": "func (i StandardLine) CloneWithoutChildren() (*StandardLine, error)", + "line": 582 + }, + { + "kind": "func", + "name": "SaveDBSnapshot", + "signature": "func (i *StandardLine) SaveDBSnapshot() error", + "line": 588 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i StandardLine) Validate() error", + "line": 598 + }, + { + "kind": "func", + "name": "WithNormalizedValues", + "signature": "func (i StandardLine) WithNormalizedValues() (*StandardLine, error)", + "line": 665 + }, + { + "kind": "func", + "name": "setDefaultPaymentTermForFlatPrice", + "signature": "func setDefaultPaymentTermForFlatPrice(price *productcatalog.Price) error", + "line": 692 + }, + { + "kind": "func", + "name": "DisassociateChildren", + "signature": "func (i *StandardLine) DisassociateChildren()", + "line": 714 + }, + { + "kind": "func", + "name": "DependsOnMeteredQuantity", + "signature": "func (i StandardLine) DependsOnMeteredQuantity() bool", + "line": 721 + }, + { + "kind": "func", + "name": "SortDetailedLines", + "signature": "func (i *StandardLine) SortDetailedLines()", + "line": 725 + }, + { + "kind": "struct", + "name": "NewFlatFeeLineInput", + "signature": "type NewFlatFeeLineInput struct", + "line": 755 + }, + { + "kind": "struct", + "name": "usageBasedLineOptions", + "signature": "type usageBasedLineOptions struct", + "line": 781 + }, + { + "kind": "func", + "name": "WithFeatureKey", + "signature": "func WithFeatureKey(fk string) usageBasedLineOption", + "line": 787 + }, + { + "kind": "func", + "name": "NewFlatFeeLine", + "signature": "func NewFlatFeeLine(input NewFlatFeeLineInput, opts ...usageBasedLineOption) *StandardLine", + "line": 794 + }, + { + "kind": "func", + "name": "DetailedLinesWithIDReuse", + "signature": "func (c StandardLine) DetailedLinesWithIDReuse(l DetailedLines) DetailedLines", + "line": 837 + }, + { + "kind": "func", + "name": "NewStandardLines", + "signature": "func NewStandardLines(children []*StandardLine) StandardLines", + "line": 883 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c StandardLines) Validate() error", + "line": 892 + }, + { + "kind": "func", + "name": "GetByChildUniqueReferenceID", + "signature": "func (c StandardLines) GetByChildUniqueReferenceID(id string) *StandardLine", + "line": 898 + }, + { + "kind": "func", + "name": "ValidateStandardLineIDsMatchExactly", + "signature": "func ValidateStandardLineIDsMatchExactly(expected StandardLines, actual StandardLines) error", + "line": 904 + }, + { + "kind": "func", + "name": "Map", + "signature": "func (c StandardLines) Map(fn func(*StandardLine) *StandardLine) StandardLines", + "line": 919 + }, + { + "kind": "func", + "name": "Sort", + "signature": "func (c *StandardLines) Sort()", + "line": 927 + }, + { + "kind": "func", + "name": "GetReferencedFeatureKeys", + "signature": "func (c StandardLines) GetReferencedFeatureKeys() ([]string, error)", + "line": 948 + }, + { + "kind": "func", + "name": "AsGenericLines", + "signature": "func (i StandardLines) AsGenericLines() []GenericInvoiceLine", + "line": 966 + }, + { + "kind": "func", + "name": "SetDiscountExternalIDs", + "signature": "func (i StandardLine) SetDiscountExternalIDs(externalIDs map[string]string) []string", + "line": 972 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i StandardLines) Clone() (StandardLines, error)", + "line": 987 + }, + { + "kind": "struct", + "name": "UsageBasedLine", + "signature": "type UsageBasedLine struct", + "line": 993 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UsageBasedLine) Equal(other *UsageBasedLine) bool", + "line": 1008 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i UsageBasedLine) Clone() *UsageBasedLine", + "line": 1012 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UsageBasedLine) Validate() error", + "line": 1016 + }, + { + "kind": "struct", + "name": "UpsertInvoiceLinesAdapterInput", + "signature": "type UpsertInvoiceLinesAdapterInput struct", + "line": 1032 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c UpsertInvoiceLinesAdapterInput) Validate() error", + "line": 1039 + }, + { + "kind": "struct", + "name": "ListInvoiceLinesAdapterInput", + "signature": "type ListInvoiceLinesAdapterInput struct", + "line": 1069 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g ListInvoiceLinesAdapterInput) Validate() error", + "line": 1081 + }, + { + "kind": "struct", + "name": "SnapshotLineQuantityInput", + "signature": "type SnapshotLineQuantityInput struct", + "line": 1097 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SnapshotLineQuantityInput) Validate() error", + "line": 1102 + } + ], + "line_count": 1112 + }, + "openmeter/billing/stdinvoiceline_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestStandardLineValidateAllowsNonNegativeTotals", + "signature": "func TestStandardLineValidateAllowsNonNegativeTotals(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestStandardLineValidateRejectsNegativeTotals", + "signature": "func TestStandardLineValidateRejectsNegativeTotals(t *testing.T)", + "line": 29 + }, + { + "kind": "func", + "name": "TestStandardLineValidateAllowsNegativeDetailedLineQuantityWithPositiveTotal", + "signature": "func TestStandardLineValidateAllowsNegativeDetailedLineQuantityWithPositiveTotal(t *testing.T)", + "line": 36 + }, + { + "kind": "func", + "name": "validStandardLineForValidation", + "signature": "func validStandardLineForValidation() StandardLine", + "line": 66 + } + ], + "line_count": 96 + }, + "openmeter/billing/stdinvoicestate.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/qmuntal/stateless\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (o StandardInvoiceOperation) Validate() error", + "line": 72 + } + ], + "line_count": 78 + }, + "openmeter/billing/taxconfig.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxConfig", + "signature": "type TaxConfig struct", + "line": 17 + }, + { + "kind": "func", + "name": "FromProductCatalog", + "signature": "func FromProductCatalog(c *productcatalog.TaxConfig) *TaxConfig", + "line": 25 + }, + { + "kind": "func", + "name": "ToProductCatalog", + "signature": "func (c *TaxConfig) ToProductCatalog() *productcatalog.TaxConfig", + "line": 36 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c *TaxConfig) Equal(v *TaxConfig) bool", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *TaxConfig) Validate() error", + "line": 64 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (c TaxConfig) Clone() TaxConfig", + "line": 86 + }, + { + "kind": "func", + "name": "MergeTaxConfigs", + "signature": "func MergeTaxConfigs(base, overrides *TaxConfig) *TaxConfig", + "line": 111 + } + ], + "line_count": 138 + }, + "openmeter/billing/testutils/lineengine.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NoopLineEngine", + "signature": "type NoopLineEngine struct", + "line": 13 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (e NoopLineEngine) GetLineEngineType() billing.LineEngineType", + "line": 17 + } + ], + "line_count": 69 + }, + "openmeter/billing/validationissue.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ValidationIssue", + "signature": "type ValidationIssue struct", + "line": 32 + }, + { + "kind": "func", + "name": "EncodeAsErrorExtension", + "signature": "func (i ValidationIssue) EncodeAsErrorExtension() map[string]interface", + "line": 45 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (i ValidationIssue) Error() string", + "line": 66 + }, + { + "kind": "func", + "name": "NewValidationWarning", + "signature": "func NewValidationWarning(code, message string) ValidationIssue", + "line": 70 + }, + { + "kind": "func", + "name": "NewValidationError", + "signature": "func NewValidationError(code, message string) ValidationIssue", + "line": 78 + }, + { + "kind": "func", + "name": "AppTypeCapabilityToComponent", + "signature": "func AppTypeCapabilityToComponent(appType app.AppType, cap app.CapabilityType, op string) ComponentName", + "line": 88 + }, + { + "kind": "struct", + "name": "componentWrapper", + "signature": "type componentWrapper struct", + "line": 92 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (c componentWrapper) Error() string", + "line": 97 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (c componentWrapper) Unwrap() error", + "line": 101 + }, + { + "kind": "func", + "name": "ValidationWithComponent", + "signature": "func ValidationWithComponent(component ComponentName, err error) error", + "line": 107 + }, + { + "kind": "struct", + "name": "fieldPrefixWrapper", + "signature": "type fieldPrefixWrapper struct", + "line": 118 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (f fieldPrefixWrapper) Error() string", + "line": 123 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (f fieldPrefixWrapper) Unwrap() error", + "line": 127 + }, + { + "kind": "func", + "name": "ValidationWithFieldPrefix", + "signature": "func ValidationWithFieldPrefix(prefix string, err error) error", + "line": 134 + }, + { + "kind": "func", + "name": "ToValidationIssues", + "signature": "func ToValidationIssues(errIn error) (ValidationIssues, error)", + "line": 152 + }, + { + "kind": "func", + "name": "RemoveMetaForCompare", + "signature": "func (v ValidationIssues) RemoveMetaForCompare() ValidationIssues", + "line": 165 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (v ValidationIssues) Clone() ValidationIssues", + "line": 176 + }, + { + "kind": "func", + "name": "AsError", + "signature": "func (v ValidationIssues) AsError() error", + "line": 180 + }, + { + "kind": "func", + "name": "Map", + "signature": "func (v ValidationIssues) Map(f func(ValidationIssue, int) ValidationIssue) ValidationIssues", + "line": 190 + }, + { + "kind": "interface", + "name": "errorsUnwrap", + "signature": "type errorsUnwrap interface", + "line": 194 + }, + { + "kind": "interface", + "name": "errorUnwrap", + "signature": "type errorUnwrap interface", + "line": 198 + }, + { + "kind": "func", + "name": "addStartingSlashIfNeeded", + "signature": "func addStartingSlashIfNeeded(path string) string", + "line": 202 + }, + { + "kind": "func", + "name": "appendToPrefix", + "signature": "func appendToPrefix(prefix string, field string) string", + "line": 214 + }, + { + "kind": "func", + "name": "toValidationIssue", + "signature": "func toValidationIssue(err error, fieldPrefix string, component ComponentName, unknownAsValidationIssue bool) ([]ValidationIssue, error)", + "line": 226 + } + ], + "line_count": 286 + }, + "openmeter/billing/validationissue_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidationIssueParsing", + "signature": "func TestValidationIssueParsing(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestAsError", + "signature": "func TestAsError(t *testing.T)", + "line": 71 + } + ], + "line_count": 86 + }, + "openmeter/billing/validators/customer/customer.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewValidator", + "signature": "func NewValidator(billingService billing.Service, syncService subscriptionsync.Service, subscriptionService subscription.Service) (*Validator, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "Validator", + "signature": "type Validator struct", + "line": 34 + }, + { + "kind": "func", + "name": "ValidateDeleteCustomer", + "signature": "func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 41 + } + ], + "line_count": 104 + }, + "openmeter/billing/validators/subscription/validator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "Validator", + "signature": "type Validator struct", + "line": 15 + }, + { + "kind": "func", + "name": "NewValidator", + "signature": "func NewValidator(billingService billing.Service) (subscription.SubscriptionCommandHook, error)", + "line": 20 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (v Validator) AfterCreate(ctx context.Context, view subscription.SubscriptionView) error", + "line": 30 + }, + { + "kind": "func", + "name": "AfterUpdate", + "signature": "func (v Validator) AfterUpdate(ctx context.Context, view subscription.SubscriptionView) error", + "line": 39 + }, + { + "kind": "func", + "name": "validateBillingSetup", + "signature": "func (v Validator) validateBillingSetup(ctx context.Context, view subscription.SubscriptionView) error", + "line": 48 + }, + { + "kind": "func", + "name": "hasBillableItems", + "signature": "func (v Validator) hasBillableItems(view subscription.SubscriptionView) bool", + "line": 86 + } + ], + "line_count": 98 + }, + "openmeter/billing/worker/advance/advance.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AutoAdvancer", + "signature": "type AutoAdvancer struct", + "line": 16 + }, + { + "kind": "func", + "name": "All", + "signature": "func (a *AutoAdvancer) All(ctx context.Context, namespaces []string, batchSize int) error", + "line": 23 + }, + { + "kind": "func", + "name": "ListInvoicesPendingAutoAdvance", + "signature": "func (a *AutoAdvancer) ListInvoicesPendingAutoAdvance(ctx context.Context, namespaces []string, ids []string) ([]billing.StandardInvoice, error)", + "line": 79 + }, + { + "kind": "func", + "name": "ListInvoicesPendingCollection", + "signature": "func (a *AutoAdvancer) ListInvoicesPendingCollection(ctx context.Context, namespaces []string, ids []string) ([]billing.StandardInvoice, error)", + "line": 94 + }, + { + "kind": "func", + "name": "ListStuckInvoicesNeedingAdvance", + "signature": "func (a *AutoAdvancer) ListStuckInvoicesNeedingAdvance(ctx context.Context, namespaces []string, ids []string) ([]billing.StandardInvoice, error)", + "line": 109 + }, + { + "kind": "func", + "name": "ListInvoicesToAdvance", + "signature": "func (a *AutoAdvancer) ListInvoicesToAdvance(ctx context.Context, namespace []string, ids []string) ([]billing.StandardInvoice, error)", + "line": 122 + }, + { + "kind": "func", + "name": "AdvanceInvoice", + "signature": "func (a *AutoAdvancer) AdvanceInvoice(ctx context.Context, id billing.InvoiceID) (billing.StandardInvoice, error)", + "line": 145 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 179 + }, + { + "kind": "func", + "name": "NewAdvancer", + "signature": "func NewAdvancer(config Config) (*AutoAdvancer, error)", + "line": 184 + } + ], + "line_count": 197 + }, + "openmeter/billing/worker/asyncadvance/asyncadvance.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 11 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(c Config) (*Handler, error)", + "line": 37 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *Handler) Handle(ctx context.Context, event *billing.AdvanceStandardInvoiceEvent) error", + "line": 48 + } + ], + "line_count": 57 + }, + "openmeter/billing/worker/collect/collect.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoiceCollector", + "signature": "type InvoiceCollector struct", + "line": 19 + }, + { + "kind": "struct", + "name": "ListCollectableInvoicesInput", + "signature": "type ListCollectableInvoicesInput struct", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCollectableInvoicesInput) Validate() error", + "line": 34 + }, + { + "kind": "func", + "name": "ListCollectableInvoices", + "signature": "func (a *InvoiceCollector) ListCollectableInvoices(ctx context.Context, params ListCollectableInvoicesInput) ([]billing.GatheringInvoice, error)", + "line": 44 + }, + { + "kind": "struct", + "name": "CollectCustomerInvoiceInput", + "signature": "type CollectCustomerInvoiceInput struct", + "line": 79 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CollectCustomerInvoiceInput) Validate() error", + "line": 84 + }, + { + "kind": "func", + "name": "CollectCustomerInvoice", + "signature": "func (a *InvoiceCollector) CollectCustomerInvoice(ctx context.Context, params CollectCustomerInvoiceInput) ([]billing.StandardInvoice, error)", + "line": 98 + }, + { + "kind": "func", + "name": "All", + "signature": "func (a *InvoiceCollector) All(ctx context.Context, namespaces []string, customerIDFilter []string, batchSize int) error", + "line": 137 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 214 + }, + { + "kind": "func", + "name": "NewInvoiceCollector", + "signature": "func NewInvoiceCollector(config Config) (*InvoiceCollector, error)", + "line": 221 + } + ], + "line_count": 240 + }, + "openmeter/billing/worker/subscriptionsync/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 12 + }, + { + "kind": "interface", + "name": "SyncStateAdapter", + "signature": "type SyncStateAdapter interface", + "line": 18 + }, + { + "kind": "struct", + "name": "SyncState", + "signature": "type SyncState struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertSyncStateInput) Validate() error", + "line": 37 + } + ], + "line_count": 57 + }, + "openmeter/billing/worker/subscriptionsync/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 19 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 29 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (subscriptionsync.Adapter, error)", + "line": 33 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 43 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 53 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 61 + } + ], + "line_count": 63 + }, + "openmeter/billing/worker/subscriptionsync/adapter/syncstate.go": { + "header": "\t\"context\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync\"", + "symbols": [ + { + "kind": "func", + "name": "InvalidateSyncState", + "signature": "func (a *adapter) InvalidateSyncState(ctx context.Context, input subscriptionsync.InvalidateSyncStateInput) error", + "line": 18 + }, + { + "kind": "func", + "name": "GetSyncStates", + "signature": "func (a *adapter) GetSyncStates(ctx context.Context, input subscriptionsync.GetSyncStatesInput) ([]subscriptionsync.SyncState, error)", + "line": 29 + }, + { + "kind": "func", + "name": "mapSyncStateFromDB", + "signature": "func mapSyncStateFromDB(state *entdb.SubscriptionBillingSyncState) subscriptionsync.SyncState", + "line": 51 + }, + { + "kind": "func", + "name": "UpsertSyncState", + "signature": "func (a *adapter) UpsertSyncState(ctx context.Context, input subscriptionsync.UpsertSyncStateInput) error", + "line": 65 + } + ], + "line_count": 91 + }, + "openmeter/billing/worker/subscriptionsync/reconciler/reconciler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Reconciler", + "signature": "type Reconciler struct", + "line": 29 + }, + { + "kind": "struct", + "name": "ReconcilerConfig", + "signature": "type ReconcilerConfig struct", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ReconcilerConfig) Validate() error", + "line": 43 + }, + { + "kind": "func", + "name": "NewReconciler", + "signature": "func NewReconciler(config ReconcilerConfig) (*Reconciler, error)", + "line": 63 + }, + { + "kind": "struct", + "name": "ReconcilerListSubscriptionsInput", + "signature": "type ReconcilerListSubscriptionsInput struct", + "line": 76 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReconcilerListSubscriptionsInput) Validate() error", + "line": 82 + }, + { + "kind": "struct", + "name": "SubscriptionWithSyncState", + "signature": "type SubscriptionWithSyncState struct", + "line": 90 + }, + { + "kind": "func", + "name": "ListSubscriptions", + "signature": "func (r *Reconciler) ListSubscriptions(ctx context.Context, in ReconcilerListSubscriptionsInput) ([]SubscriptionWithSyncState, error)", + "line": 95 + }, + { + "kind": "func", + "name": "mapToSubscriptionWithSyncState", + "signature": "func (r *Reconciler) mapToSubscriptionWithSyncState(ctx context.Context, subs []subscription.Subscription) ([]SubscriptionWithSyncState, error)", + "line": 178 + }, + { + "kind": "func", + "name": "ReconcileSubscription", + "signature": "func (r *Reconciler) ReconcileSubscription(ctx context.Context, subsID models.NamespacedID) error", + "line": 211 + }, + { + "kind": "struct", + "name": "ReconcilerAllInput", + "signature": "type ReconcilerAllInput struct", + "line": 215 + }, + { + "kind": "func", + "name": "All", + "signature": "func (r *Reconciler) All(ctx context.Context, in ReconcilerAllInput) error", + "line": 220 + } + ], + "line_count": 253 + }, + "openmeter/billing/worker/subscriptionsync/service.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 12 + }, + { + "kind": "interface", + "name": "SyncService", + "signature": "type SyncService interface", + "line": 18 + }, + { + "kind": "interface", + "name": "EventHandler", + "signature": "type EventHandler interface", + "line": 25 + }, + { + "kind": "interface", + "name": "SyncStateService", + "signature": "type SyncStateService interface", + "line": 32 + }, + { + "kind": "struct", + "name": "SynchronizeSubscriptionOptions", + "signature": "type SynchronizeSubscriptionOptions struct", + "line": 36 + }, + { + "kind": "func", + "name": "EnableDryRun", + "signature": "func EnableDryRun() SynchronizeSubscriptionOption", + "line": 42 + } + ], + "line_count": 46 + }, + "openmeter/billing/worker/subscriptionsync/service/base_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "SuiteBase", + "signature": "type SuiteBase struct", + "line": 48 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *SuiteBase) SetupSuite()", + "line": 61 + }, + { + "kind": "func", + "name": "setupChargesService", + "signature": "func (s *SuiteBase) setupChargesService(config chargestestutils.Config)", + "line": 84 + }, + { + "kind": "func", + "name": "BeforeTest", + "signature": "func (s *SuiteBase) BeforeTest(suiteName, testName string)", + "line": 107 + }, + { + "kind": "func", + "name": "beforeTest", + "signature": "func (s *SuiteBase) beforeTest(ctx context.Context, suiteName, testName string)", + "line": 111 + }, + { + "kind": "func", + "name": "AfterTest", + "signature": "func (s *SuiteBase) AfterTest(suiteName, testName string)", + "line": 160 + }, + { + "kind": "func", + "name": "afterTest", + "signature": "func (s *SuiteBase) afterTest(ctx context.Context, suiteName, testName string)", + "line": 164 + }, + { + "kind": "func", + "name": "gatheringInvoice", + "signature": "func (s *SuiteBase) gatheringInvoice(ctx context.Context, namespace string, customerID string) billing.GatheringInvoice", + "line": 175 + }, + { + "kind": "func", + "name": "expectNoGatheringInvoice", + "signature": "func (s *SuiteBase) expectNoGatheringInvoice(ctx context.Context, namespace string, customerID string)", + "line": 196 + }, + { + "kind": "func", + "name": "enableProrating", + "signature": "func (s *SuiteBase) enableProrating()", + "line": 218 + }, + { + "kind": "func", + "name": "getGatheringLineByChildID", + "signature": "func (s *SuiteBase) getGatheringLineByChildID(invoice billing.GatheringInvoice, childID string) *billing.GatheringLine", + "line": 223 + }, + { + "kind": "func", + "name": "getStandardLineByChildID", + "signature": "func (s *SuiteBase) getStandardLineByChildID(invoice billing.StandardInvoice, childID string) *billing.StandardLine", + "line": 237 + }, + { + "kind": "func", + "name": "expectNoLineWithChildID", + "signature": "func (s *SuiteBase) expectNoLineWithChildID(invoice billing.GenericInvoiceReader, childID string)", + "line": 251 + }, + { + "kind": "func", + "name": "timingImmediate", + "signature": "func (s *SuiteBase) timingImmediate() subscription.Timing", + "line": 261 + }, + { + "kind": "func", + "name": "mustParseTime", + "signature": "func (s *SuiteBase) mustParseTime(t string) time.Time", + "line": 267 + }, + { + "kind": "func", + "name": "testContext", + "signature": "func (s *SuiteBase) testContext() context.Context", + "line": 272 + }, + { + "kind": "func", + "name": "getPhaseByKey", + "signature": "func (s *SuiteBase) getPhaseByKey(t *testing.T, subsView subscription.SubscriptionView, key string) subscription.SubscriptionPhaseView", + "line": 277 + }, + { + "kind": "struct", + "name": "expectedLine", + "signature": "type expectedLine struct", + "line": 288 + }, + { + "kind": "struct", + "name": "chargeExpects", + "signature": "type chargeExpects struct", + "line": 298 + }, + { + "kind": "func", + "name": "expectLines", + "signature": "func (s *SuiteBase) expectLines(invoice billing.GenericInvoiceReader, subscriptionID string, expectedLines []expectedLine)", + "line": 303 + }, + { + "kind": "struct", + "name": "expectedCharge", + "signature": "type expectedCharge struct", + "line": 370 + }, + { + "kind": "struct", + "name": "expectedChargeGatheringLine", + "signature": "type expectedChargeGatheringLine struct", + "line": 383 + }, + { + "kind": "struct", + "name": "expectedChargeRealization", + "signature": "type expectedChargeRealization struct", + "line": 390 + }, + { + "kind": "struct", + "name": "actualChargeGatheringLine", + "signature": "type actualChargeGatheringLine struct", + "line": 400 + }, + { + "kind": "struct", + "name": "chargeRealizationKey", + "signature": "type chargeRealizationKey struct", + "line": 406 + }, + { + "kind": "struct", + "name": "actualChargeLedgerTransactionGroup", + "signature": "type actualChargeLedgerTransactionGroup struct", + "line": 412 + }, + { + "kind": "func", + "name": "assertCharges", + "signature": "func (s *SuiteBase) assertCharges(ctx context.Context, subsView subscription.SubscriptionView, expectedCharges []expectedCharge)", + "line": 417 + }, + { + "kind": "func", + "name": "assertCharge", + "signature": "func (s *SuiteBase) assertCharge(ctx context.Context, charge charges.Charge, subsView subscription.SubscriptionView, childID string, expectedChargeIDs []string, expectedCharge expectedCharge, idx int)", + "line": 480 + }, + { + "kind": "func", + "name": "assertChargeRealizationLedgerTransactions", + "signature": "func (s *SuiteBase) assertChargeRealizationLedgerTransactions(ctx context.Context, namespace string, childID string, expectedRealization expectedChargeRealization, actualRealization actualChargeRealization)", + "line": 610 + }, + { + "kind": "func", + "name": "expectedChargeRealizationRequiresLedgerTransactionGroups", + "signature": "func expectedChargeRealizationRequiresLedgerTransactionGroups(expectedRealization expectedChargeRealization) bool", + "line": 624 + }, + { + "kind": "func", + "name": "assertChargePaymentLedgerTransactions", + "signature": "func (s *SuiteBase) assertChargePaymentLedgerTransactions(ctx context.Context, charge charges.Charge, childID string)", + "line": 637 + }, + { + "kind": "func", + "name": "assertPaymentLedgerTransactions", + "signature": "func (s *SuiteBase) assertPaymentLedgerTransactions(ctx context.Context, namespace string, childID string, payment *chargepayment.Invoiced)", + "line": 666 + }, + { + "kind": "func", + "name": "assertLedgerTransactionGroupBookedAt", + "signature": "func (s *SuiteBase) assertLedgerTransactionGroupBookedAt(ctx context.Context, namespace string, groupID string, expectedBookedAt time.Time, label string)", + "line": 681 + }, + { + "kind": "func", + "name": "subscriptionItemByID", + "signature": "func (s *SuiteBase) subscriptionItemByID(phase subscription.SubscriptionPhaseView, itemKey string, itemID string, childID string, allowMissing bool) (subscription.SubscriptionItemView, bool)", + "line": 710 + }, + { + "kind": "func", + "name": "assertChargeGatheringLines", + "signature": "func (s *SuiteBase) assertChargeGatheringLines(ctx context.Context, charge charges.Charge, subscriptionID string, childID string, expectedChargeIDs []string, chargePeriod timeutil.ClosedPeriod, chargePrice *productcatalog.Price, expectedGatheringLines []expectedChargeGatheringLine)", + "line": 723 + }, + { + "kind": "func", + "name": "expectedGatheringLinesForCharge", + "signature": "func (s *SuiteBase) expectedGatheringLinesForCharge(subscriptionID string, childID string, expectedChargeIDs []string, chargePeriod timeutil.ClosedPeriod, expectedGatheringLines []expectedChargeGatheringLine) []expectedChargeGatheringLine", + "line": 762 + }, + { + "kind": "func", + "name": "expectedRealizationsForCharge", + "signature": "func (s *SuiteBase) expectedRealizationsForCharge(subscriptionID string, childID string, expectedChargeIDs []string, chargePeriod timeutil.ClosedPeriod, expectedRealizations []expectedChargeRealization) []expectedChargeRealization", + "line": 791 + }, + { + "kind": "func", + "name": "chargeRealizations", + "signature": "func (s *SuiteBase) chargeRealizations(ctx context.Context, charge charges.Charge) []actualChargeRealization", + "line": 820 + }, + { + "kind": "func", + "name": "usageBasedRunLedgerTransactionGroups", + "signature": "func (s *SuiteBase) usageBasedRunLedgerTransactionGroups(run usagebased.RealizationRun) []actualChargeLedgerTransactionGroup", + "line": 881 + }, + { + "kind": "func", + "name": "flatFeeRunLedgerTransactionGroups", + "signature": "func (s *SuiteBase) flatFeeRunLedgerTransactionGroups(run flatfee.RealizationRun) []actualChargeLedgerTransactionGroup", + "line": 905 + }, + { + "kind": "struct", + "name": "actualChargeRealization", + "signature": "type actualChargeRealization struct", + "line": 929 + }, + { + "kind": "func", + "name": "standardLineChargeRealization", + "signature": "func (s *SuiteBase) standardLineChargeRealization(ctx context.Context, invoiceID billing.InvoiceID, lineID string) actualChargeRealization", + "line": 938 + }, + { + "kind": "func", + "name": "gatheringChargeLines", + "signature": "func (s *SuiteBase) gatheringChargeLines(ctx context.Context, charge charges.Charge) []actualChargeGatheringLine", + "line": 958 + }, + { + "kind": "interface", + "name": "lineMatcher", + "signature": "type lineMatcher interface", + "line": 998 + }, + { + "kind": "func", + "name": "chargeExpectedLineMatcherParts", + "signature": "func (s *SuiteBase) chargeExpectedLineMatcherParts(matcher lineMatcher) (string, string, int)", + "line": 1002 + }, + { + "kind": "struct", + "name": "recurringLineMatcher", + "signature": "type recurringLineMatcher struct", + "line": 1016 + }, + { + "kind": "func", + "name": "ChildIDs", + "signature": "func (m recurringLineMatcher) ChildIDs(subsID string) []string", + "line": 1024 + }, + { + "kind": "struct", + "name": "oneTimeLineMatcher", + "signature": "type oneTimeLineMatcher struct", + "line": 1033 + }, + { + "kind": "func", + "name": "ChildIDs", + "signature": "func (m oneTimeLineMatcher) ChildIDs(subsID string) []string", + "line": 1039 + }, + { + "kind": "func", + "name": "phaseMeta", + "signature": "func (s *SuiteBase) phaseMeta(key string, duration string) productcatalog.PhaseMeta", + "line": 1043 + }, + { + "kind": "func", + "name": "enableProgressiveBilling", + "signature": "func (s *SuiteBase) enableProgressiveBilling()", + "line": 1056 + }, + { + "kind": "func", + "name": "updateProfile", + "signature": "func (s *SuiteBase) updateProfile(modify func(profile *billing.Profile))", + "line": 1062 + }, + { + "kind": "struct", + "name": "subscriptionAddItem", + "signature": "type subscriptionAddItem struct", + "line": 1076 + }, + { + "kind": "func", + "name": "AsPatch", + "signature": "func (i subscriptionAddItem) AsPatch() subscription.Patch", + "line": 1085 + }, + { + "kind": "func", + "name": "generatePeriods", + "signature": "func (s *SuiteBase) generatePeriods(startStr, endStr string, cadenceStr string, n int) []timeutil.ClosedPeriod", + "line": 1129 + }, + { + "kind": "func", + "name": "populateChildIDsFromParents", + "signature": "func (s *SuiteBase) populateChildIDsFromParents(invoice billing.GenericInvoice)", + "line": 1153 + }, + { + "kind": "func", + "name": "createSubscriptionFromPlanPhases", + "signature": "func (s *SuiteBase) createSubscriptionFromPlanPhases(phases []productcatalog.Phase) subscription.SubscriptionView", + "line": 1196 + }, + { + "kind": "func", + "name": "createSubscriptionFromPlan", + "signature": "func (s *SuiteBase) createSubscriptionFromPlan(planInput plan.CreatePlanInput) subscription.SubscriptionView", + "line": 1220 + }, + { + "kind": "func", + "name": "createSubscriptionFromPlanAt", + "signature": "func (s *SuiteBase) createSubscriptionFromPlanAt(planInput plan.CreatePlanInput, startAt time.Time) subscription.SubscriptionView", + "line": 1224 + } + ], + "line_count": 1250 + }, + "openmeter/billing/worker/subscriptionsync/service/creditsonly_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditsOnlySubscriptionHandlerTestSuite", + "signature": "type CreditsOnlySubscriptionHandlerTestSuite struct", + "line": 31 + }, + { + "kind": "struct", + "name": "expectedFlatFeeCharge", + "signature": "type expectedFlatFeeCharge struct", + "line": 35 + }, + { + "kind": "func", + "name": "Indexes", + "signature": "func (e expectedFlatFeeCharge) Indexes(indexes ...int) expectedFlatFeeCharge", + "line": 45 + }, + { + "kind": "func", + "name": "amountBeforeProration", + "signature": "func (e expectedFlatFeeCharge) amountBeforeProration(index int) alpacadecimal.Decimal", + "line": 57 + }, + { + "kind": "func", + "name": "amountAfterProration", + "signature": "func (e expectedFlatFeeCharge) amountAfterProration(index int) alpacadecimal.Decimal", + "line": 65 + }, + { + "kind": "struct", + "name": "expectedUsageBasedCharge", + "signature": "type expectedUsageBasedCharge struct", + "line": 73 + }, + { + "kind": "func", + "name": "Indexes", + "signature": "func (e expectedUsageBasedCharge) Indexes(indexes ...int) expectedUsageBasedCharge", + "line": 83 + }, + { + "kind": "func", + "name": "TestCreditsOnlySubscriptionHandlerScenarios", + "signature": "func TestCreditsOnlySubscriptionHandlerScenarios(t *testing.T)", + "line": 95 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) SetupSuite()", + "line": 99 + }, + { + "kind": "func", + "name": "TestCreditsOnlyFlatFeeProvisioningAndReconciliation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyFlatFeeProvisioningAndReconciliation()", + "line": 116 + }, + { + "kind": "func", + "name": "TestCreditsOnlyFlatFeeCancellationAtPeriodBoundary", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyFlatFeeCancellationAtPeriodBoundary()", + "line": 237 + }, + { + "kind": "func", + "name": "TestCreditsOnlyFlatFeeMidPeriodCancellation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyFlatFeeMidPeriodCancellation()", + "line": 371 + }, + { + "kind": "func", + "name": "TestCreditsOnlyUsageBasedProvisioningAndReconciliation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyUsageBasedProvisioningAndReconciliation()", + "line": 526 + }, + { + "kind": "func", + "name": "TestCreditsOnlyUsageBasedCancellationInCreatedStateDeletesCharge", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyUsageBasedCancellationInCreatedStateDeletesCharge()", + "line": 646 + }, + { + "kind": "func", + "name": "TestCreditsOnlyUsageBasedMidPeriodCancellation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyUsageBasedMidPeriodCancellation()", + "line": 775 + }, + { + "kind": "func", + "name": "TestCreditsOnlyMixedProvisioning", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyMixedProvisioning()", + "line": 984 + }, + { + "kind": "func", + "name": "expectCreditsOnlyMixedCharges", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) expectCreditsOnlyMixedCharges(ctx context.Context, subscriptionID string, expectedFlatFee []expectedFlatFeeCharge, expectedUsageBased []expectedUsageBasedCharge)", + "line": 1103 + }, + { + "kind": "func", + "name": "expectCreditsOnlyFlatFeeCharges", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) expectCreditsOnlyFlatFeeCharges(ctx context.Context, subscriptionID string, expected []expectedFlatFeeCharge) []flatfee.Charge", + "line": 1153 + }, + { + "kind": "func", + "name": "assertExpectedFlatFeeCharges", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) assertExpectedFlatFeeCharges(ctx context.Context, subscriptionID string, out []flatfee.Charge, expected []expectedFlatFeeCharge)", + "line": 1179 + }, + { + "kind": "func", + "name": "expectCreditsOnlyUsageBasedCharges", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) expectCreditsOnlyUsageBasedCharges(ctx context.Context, subscriptionID string, expected []expectedUsageBasedCharge) []usagebased.Charge", + "line": 1215 + }, + { + "kind": "func", + "name": "assertExpectedUsageBasedCharges", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) assertExpectedUsageBasedCharges(ctx context.Context, subscriptionID string, out []usagebased.Charge, expected []expectedUsageBasedCharge)", + "line": 1241 + }, + { + "kind": "func", + "name": "getExpectedPhaseIDForChildReference", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) getExpectedPhaseIDForChildReference(ctx context.Context, subscriptionID string, childID string) string", + "line": 1276 + }, + { + "kind": "func", + "name": "TestCreditsOnlyFlatFeeTaxCodePropagation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyFlatFeeTaxCodePropagation()", + "line": 1295 + }, + { + "kind": "func", + "name": "TestCreditsOnlyUsageBasedTaxCodePropagation", + "signature": "func (s *CreditsOnlySubscriptionHandlerTestSuite) TestCreditsOnlyUsageBasedTaxCodePropagation()", + "line": 1376 + } + ], + "line_count": 1455 + }, + "openmeter/billing/worker/subscriptionsync/service/handlers.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "HandleCancelledEvent", + "signature": "func (s *Service) HandleCancelledEvent(ctx context.Context, event *subscription.CancelledEvent) error", + "line": 18 + }, + { + "kind": "func", + "name": "HandleInvoiceCreation", + "signature": "func (s *Service) HandleInvoiceCreation(ctx context.Context, event *billing.StandardInvoiceCreatedEvent) error", + "line": 45 + }, + { + "kind": "func", + "name": "HandleDeletedEvent", + "signature": "func (s *Service) HandleDeletedEvent(ctx context.Context, event *subscription.DeletedEvent) error", + "line": 80 + } + ], + "line_count": 83 + }, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/item.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"", + "symbols": [ + { + "kind": "interface", + "name": "Item", + "signature": "type Item interface", + "line": 23 + }, + { + "kind": "interface", + "name": "LineGetter", + "signature": "type LineGetter interface", + "line": 32 + }, + { + "kind": "interface", + "name": "SplitLineHierarchyGetter", + "signature": "type SplitLineHierarchyGetter interface", + "line": 36 + }, + { + "kind": "interface", + "name": "UsageBasedChargeGetter", + "signature": "type UsageBasedChargeGetter interface", + "line": 40 + }, + { + "kind": "interface", + "name": "FlatFeeChargeGetter", + "signature": "type FlatFeeChargeGetter interface", + "line": 44 + }, + { + "kind": "struct", + "name": "persistedLine", + "signature": "type persistedLine struct", + "line": 48 + }, + { + "kind": "func", + "name": "newPersistedLine", + "signature": "func newPersistedLine(line billing.GenericInvoiceLine) (persistedLine, error)", + "line": 60 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i persistedLine) Type() ItemType", + "line": 68 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func (i persistedLine) ChildUniqueReferenceID() *string", + "line": 72 + }, + { + "kind": "func", + "name": "ServicePeriod", + "signature": "func (i persistedLine) ServicePeriod() timeutil.ClosedPeriod", + "line": 76 + }, + { + "kind": "func", + "name": "GetLine", + "signature": "func (i persistedLine) GetLine() billing.GenericInvoiceLine", + "line": 80 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (i persistedLine) ID() models.NamespacedID", + "line": 84 + }, + { + "kind": "func", + "name": "IsSubscriptionManaged", + "signature": "func (i persistedLine) IsSubscriptionManaged() bool", + "line": 93 + }, + { + "kind": "func", + "name": "HasLastLineAnnotation", + "signature": "func (i persistedLine) HasLastLineAnnotation(annotation string) bool", + "line": 97 + }, + { + "kind": "func", + "name": "ItemAsLine", + "signature": "func ItemAsLine(in Item) (billing.GenericInvoiceLine, error)", + "line": 102 + }, + { + "kind": "struct", + "name": "persistedSplitLineHierarchy", + "signature": "type persistedSplitLineHierarchy struct", + "line": 111 + }, + { + "kind": "func", + "name": "newPersistedSplitLineHierarchy", + "signature": "func newPersistedSplitLineHierarchy(hierarchy *billing.SplitLineHierarchy) (persistedSplitLineHierarchy, error)", + "line": 123 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i persistedSplitLineHierarchy) Type() ItemType", + "line": 131 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func (i persistedSplitLineHierarchy) ChildUniqueReferenceID() *string", + "line": 135 + }, + { + "kind": "func", + "name": "ServicePeriod", + "signature": "func (i persistedSplitLineHierarchy) ServicePeriod() timeutil.ClosedPeriod", + "line": 139 + }, + { + "kind": "func", + "name": "GetSplitLineHierarchy", + "signature": "func (i persistedSplitLineHierarchy) GetSplitLineHierarchy() *billing.SplitLineHierarchy", + "line": 143 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (i persistedSplitLineHierarchy) ID() models.NamespacedID", + "line": 147 + }, + { + "kind": "func", + "name": "IsSubscriptionManaged", + "signature": "func (i persistedSplitLineHierarchy) IsSubscriptionManaged() bool", + "line": 154 + }, + { + "kind": "func", + "name": "HasLastLineAnnotation", + "signature": "func (i persistedSplitLineHierarchy) HasLastLineAnnotation(annotation string) bool", + "line": 163 + }, + { + "kind": "func", + "name": "getLastLineForAnnotations", + "signature": "func (i persistedSplitLineHierarchy) getLastLineForAnnotations() billing.GenericInvoiceLine", + "line": 172 + }, + { + "kind": "func", + "name": "ItemAsSplitLineHierarchy", + "signature": "func ItemAsSplitLineHierarchy(in Item) (*billing.SplitLineHierarchy, error)", + "line": 184 + }, + { + "kind": "func", + "name": "NewItemFromLineOrHierarchy", + "signature": "func NewItemFromLineOrHierarchy(lineOrHierarchy billing.LineOrHierarchy) (Item, error)", + "line": 193 + }, + { + "kind": "struct", + "name": "persistedUsageBasedCharge", + "signature": "type persistedUsageBasedCharge struct", + "line": 222 + }, + { + "kind": "func", + "name": "newPersistedUsageBasedCharge", + "signature": "func newPersistedUsageBasedCharge(charge usagebased.Charge) (persistedUsageBasedCharge, error)", + "line": 234 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (i persistedUsageBasedCharge) ID() models.NamespacedID", + "line": 242 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i persistedUsageBasedCharge) Type() ItemType", + "line": 251 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func (i persistedUsageBasedCharge) ChildUniqueReferenceID() *string", + "line": 255 + }, + { + "kind": "func", + "name": "ServicePeriod", + "signature": "func (i persistedUsageBasedCharge) ServicePeriod() timeutil.ClosedPeriod", + "line": 259 + }, + { + "kind": "func", + "name": "IsSubscriptionManaged", + "signature": "func (i persistedUsageBasedCharge) IsSubscriptionManaged() bool", + "line": 263 + }, + { + "kind": "func", + "name": "HasLastLineAnnotation", + "signature": "func (i persistedUsageBasedCharge) HasLastLineAnnotation(annotation string) bool", + "line": 269 + }, + { + "kind": "func", + "name": "GetUsageBasedCharge", + "signature": "func (i persistedUsageBasedCharge) GetUsageBasedCharge() usagebased.Charge", + "line": 273 + }, + { + "kind": "func", + "name": "ItemAsUsageBasedCharge", + "signature": "func ItemAsUsageBasedCharge(in Item) (usagebased.Charge, error)", + "line": 278 + }, + { + "kind": "struct", + "name": "persistedFlatFeeCharge", + "signature": "type persistedFlatFeeCharge struct", + "line": 287 + }, + { + "kind": "func", + "name": "newPersistedFlatFeeCharge", + "signature": "func newPersistedFlatFeeCharge(charge flatfee.Charge) (persistedFlatFeeCharge, error)", + "line": 299 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (i persistedFlatFeeCharge) ID() models.NamespacedID", + "line": 307 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (i persistedFlatFeeCharge) Type() ItemType", + "line": 316 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func (i persistedFlatFeeCharge) ChildUniqueReferenceID() *string", + "line": 320 + }, + { + "kind": "func", + "name": "ServicePeriod", + "signature": "func (i persistedFlatFeeCharge) ServicePeriod() timeutil.ClosedPeriod", + "line": 324 + }, + { + "kind": "func", + "name": "IsSubscriptionManaged", + "signature": "func (i persistedFlatFeeCharge) IsSubscriptionManaged() bool", + "line": 328 + }, + { + "kind": "func", + "name": "HasLastLineAnnotation", + "signature": "func (i persistedFlatFeeCharge) HasLastLineAnnotation(annotation string) bool", + "line": 334 + }, + { + "kind": "func", + "name": "GetFlatFeeCharge", + "signature": "func (i persistedFlatFeeCharge) GetFlatFeeCharge() flatfee.Charge", + "line": 338 + }, + { + "kind": "func", + "name": "ItemAsFlatFeeCharge", + "signature": "func ItemAsFlatFeeCharge(in Item) (flatfee.Charge, error)", + "line": 343 + }, + { + "kind": "func", + "name": "NewChargeItemFromChargeType", + "signature": "func NewChargeItemFromChargeType(chargeType meta.ChargeType, usageBasedCharge *usagebased.Charge, flatFeeCharge *flatfee.Charge) (Item, error)", + "line": 352 + }, + { + "kind": "func", + "name": "getErrorDetails", + "signature": "func getErrorDetails(in Item) string", + "line": 371 + } + ], + "line_count": 373 + }, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/loader.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "billingService", + "signature": "type billingService interface", + "line": 19 + }, + { + "kind": "interface", + "name": "chargeService", + "signature": "type chargeService interface", + "line": 24 + }, + { + "kind": "struct", + "name": "Loader", + "signature": "type Loader struct", + "line": 28 + }, + { + "kind": "func", + "name": "NewLoader", + "signature": "func NewLoader(billingService billingService, chargeService chargeService) Loader", + "line": 33 + }, + { + "kind": "func", + "name": "LoadForSubscription", + "signature": "func (l Loader) LoadForSubscription(ctx context.Context, subs subscription.Subscription) (State, error)", + "line": 40 + }, + { + "kind": "func", + "name": "loadChargesForSubscription", + "signature": "func (l Loader) loadChargesForSubscription(ctx context.Context, subs subscription.Subscription) (map[string]Item, error)", + "line": 101 + }, + { + "kind": "func", + "name": "loadInvoicesForSubscriptionLines", + "signature": "func (l Loader) loadInvoicesForSubscriptionLines(ctx context.Context, subs subscription.Subscription, lines []billing.LineOrHierarchy) (Invoices, error)", + "line": 174 + }, + { + "kind": "func", + "name": "loadInvoices", + "signature": "func (l Loader) loadInvoices(ctx context.Context, namespace string, invoiceIDs []string) (Invoices, error)", + "line": 216 + }, + { + "kind": "func", + "name": "normalizePersistedLineOrHierarchy", + "signature": "func normalizePersistedLineOrHierarchy(lineOrHierarchy billing.LineOrHierarchy) (billing.LineOrHierarchy, error)", + "line": 239 + }, + { + "kind": "func", + "name": "normalizeSubscriptionReference", + "signature": "func normalizeSubscriptionReference(ref *billing.SubscriptionReference)", + "line": 319 + } + ], + "line_count": 331 + }, + "openmeter/billing/worker/subscriptionsync/service/persistedstate/state.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "State", + "signature": "type State struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s State) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "IsGatheringInvoice", + "signature": "func (i Invoices) IsGatheringInvoice(invoiceID string) (bool, error)", + "line": 29 + } + ], + "line_count": 36 + }, + "openmeter/billing/worker/subscriptionsync/service/reconcile.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service/persistedstate\"", + "symbols": [ + { + "kind": "func", + "name": "buildSyncPlan", + "signature": "func (s *Service) buildSyncPlan(ctx context.Context, subs subscription.Subscription, subsView *subscription.SubscriptionView, asOf time.Time, customerDeletedAt *time.Time, currency currencyx.Calculator, dryRun bool) (*reconciler.Plan, error)", + "line": 16 + } + ], + "line_count": 49 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/feehelper.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "IsFlatFee", + "signature": "func IsFlatFee(line billing.GenericInvoiceLineReader) bool", + "line": 13 + }, + { + "kind": "func", + "name": "GetFlatFeePerUnitAmount", + "signature": "func GetFlatFeePerUnitAmount(line billing.GenericInvoiceLineReader) (alpacadecimal.Decimal, error)", + "line": 26 + }, + { + "kind": "func", + "name": "SetFlatFeePerUnitAmount", + "signature": "func SetFlatFeePerUnitAmount(line billing.GenericInvoiceLine, perUnitAmount alpacadecimal.Decimal) error", + "line": 44 + } + ], + "line_count": 62 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/invoiceupdate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "Updater", + "signature": "type Updater struct", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(billingService billing.Service, logger *slog.Logger) *Updater", + "line": 26 + }, + { + "kind": "func", + "name": "ApplyPatches", + "signature": "func (u *Updater) ApplyPatches(ctx context.Context, customerID customer.CustomerID, patches []Patch) error", + "line": 33 + }, + { + "kind": "func", + "name": "listInvoicesByID", + "signature": "func (u *Updater) listInvoicesByID(ctx context.Context, namespace string, invoiceIDs []string) (map[string]billing.Invoice, error)", + "line": 94 + }, + { + "kind": "func", + "name": "LogPatches", + "signature": "func (u *Updater) LogPatches(patches []Patch, invoicesByID map[string]billing.Invoice)", + "line": 121 + }, + { + "kind": "func", + "name": "isDryRunLoggablePatch", + "signature": "func isDryRunLoggablePatch(patch Patch, invoicesByID map[string]billing.Invoice) bool", + "line": 138 + }, + { + "kind": "func", + "name": "isCurrentBillingPeriod", + "signature": "func isCurrentBillingPeriod(line billing.GatheringLine) bool", + "line": 172 + }, + { + "kind": "func", + "name": "isMutableInvoice", + "signature": "func isMutableInvoice(invoiceID string, invoicesByID map[string]billing.Invoice) bool", + "line": 184 + }, + { + "kind": "struct", + "name": "patchesParsed", + "signature": "type patchesParsed struct", + "line": 202 + }, + { + "kind": "struct", + "name": "invoicePatches", + "signature": "type invoicePatches struct", + "line": 210 + }, + { + "kind": "struct", + "name": "splitLineGroupPatches", + "signature": "type splitLineGroupPatches struct", + "line": 215 + }, + { + "kind": "func", + "name": "parsePatches", + "signature": "func (u *Updater) parsePatches(patches []Patch) (patchesParsed, error)", + "line": 220 + }, + { + "kind": "func", + "name": "provisionUpcomingLines", + "signature": "func (u *Updater) provisionUpcomingLines(ctx context.Context, customerID customer.CustomerID, lines []billing.GatheringLine) error", + "line": 274 + }, + { + "kind": "func", + "name": "updateMutableStandardInvoice", + "signature": "func (u *Updater) updateMutableStandardInvoice(ctx context.Context, invoice billing.StandardInvoice, linePatches invoicePatches) error", + "line": 297 + }, + { + "kind": "func", + "name": "updateGatheringInvoice", + "signature": "func (u *Updater) updateGatheringInvoice(ctx context.Context, invoiceID billing.InvoiceID, linePatches invoicePatches) error", + "line": 369 + }, + { + "kind": "func", + "name": "updateImmutableInvoice", + "signature": "func (u *Updater) updateImmutableInvoice(ctx context.Context, invoice billing.StandardInvoice, linePatches invoicePatches) error", + "line": 403 + }, + { + "kind": "func", + "name": "newValidationIssueOnLine", + "signature": "func newValidationIssueOnLine(line *billing.StandardLine, message string, a ...any) billing.ValidationIssue", + "line": 493 + }, + { + "kind": "func", + "name": "mergeValidationIssues", + "signature": "func (u *Updater) mergeValidationIssues(invoice billing.StandardInvoice, issues []billing.ValidationIssue) (billing.ValidationIssues, bool)", + "line": 513 + }, + { + "kind": "func", + "name": "upsertSplitLineGroups", + "signature": "func (u *Updater) upsertSplitLineGroups(ctx context.Context, customerID customer.CustomerID, changes splitLineGroupPatches) error", + "line": 533 + } + ], + "line_count": 551 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/patch.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchLineCreate", + "signature": "type PatchLineCreate struct", + "line": 21 + }, + { + "kind": "struct", + "name": "PatchLineDelete", + "signature": "type PatchLineDelete struct", + "line": 25 + }, + { + "kind": "struct", + "name": "PatchLineUpdate", + "signature": "type PatchLineUpdate struct", + "line": 30 + }, + { + "kind": "struct", + "name": "PatchSplitLineGroupDelete", + "signature": "type PatchSplitLineGroupDelete struct", + "line": 34 + }, + { + "kind": "struct", + "name": "PatchSplitLineGroupUpdate", + "signature": "type PatchSplitLineGroupUpdate struct", + "line": 38 + }, + { + "kind": "struct", + "name": "Patch", + "signature": "type Patch struct", + "line": 42 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p Patch) Op() PatchOperation", + "line": 53 + }, + { + "kind": "func", + "name": "AsCreateLinePatch", + "signature": "func (p Patch) AsCreateLinePatch() (PatchLineCreate, error)", + "line": 57 + }, + { + "kind": "func", + "name": "AsDeleteLinePatch", + "signature": "func (p Patch) AsDeleteLinePatch() (PatchLineDelete, error)", + "line": 65 + }, + { + "kind": "func", + "name": "AsUpdateLinePatch", + "signature": "func (p Patch) AsUpdateLinePatch() (PatchLineUpdate, error)", + "line": 73 + }, + { + "kind": "func", + "name": "AsDeleteSplitLineGroupPatch", + "signature": "func (p Patch) AsDeleteSplitLineGroupPatch() (PatchSplitLineGroupDelete, error)", + "line": 81 + }, + { + "kind": "func", + "name": "AsUpdateSplitLineGroupPatch", + "signature": "func (p Patch) AsUpdateSplitLineGroupPatch() (PatchSplitLineGroupUpdate, error)", + "line": 89 + }, + { + "kind": "func", + "name": "NewDeleteLinePatch", + "signature": "func NewDeleteLinePatch(lineID billing.LineID, invoiceID string) Patch", + "line": 97 + }, + { + "kind": "func", + "name": "NewUpdateLinePatch", + "signature": "func NewUpdateLinePatch(line billing.GenericInvoiceLine) Patch", + "line": 107 + }, + { + "kind": "func", + "name": "NewDeleteSplitLineGroupPatch", + "signature": "func NewDeleteSplitLineGroupPatch(groupID models.NamespacedID) Patch", + "line": 116 + }, + { + "kind": "func", + "name": "NewUpdateSplitLineGroupPatch", + "signature": "func NewUpdateSplitLineGroupPatch(group billing.SplitLineGroupUpdate) Patch", + "line": 125 + }, + { + "kind": "func", + "name": "NewCreateLinePatch", + "signature": "func NewCreateLinePatch(line billing.GatheringLine) Patch", + "line": 134 + }, + { + "kind": "func", + "name": "Log", + "signature": "func (p Patch) Log(logger *slog.Logger)", + "line": 143 + }, + { + "kind": "func", + "name": "GetDeletePatchesForLine", + "signature": "func GetDeletePatchesForLine(lineOrHierarchy billing.LineOrHierarchy) ([]Patch, error)", + "line": 160 + } + ], + "line_count": 213 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "interface", + "name": "Patch", + "signature": "type Patch interface", + "line": 30 + }, + { + "kind": "interface", + "name": "InvoicePatch", + "signature": "type InvoicePatch interface", + "line": 35 + }, + { + "kind": "interface", + "name": "InvoicePatchCollection", + "signature": "type InvoicePatchCollection interface", + "line": 40 + }, + { + "kind": "interface", + "name": "ChargePatchCollection", + "signature": "type ChargePatchCollection interface", + "line": 45 + }, + { + "kind": "interface", + "name": "PatchCollection", + "signature": "type PatchCollection interface", + "line": 50 + }, + { + "kind": "struct", + "name": "patchCollectionRouter", + "signature": "type patchCollectionRouter struct", + "line": 59 + }, + { + "kind": "struct", + "name": "patchCollectionRouterConfig", + "signature": "type patchCollectionRouterConfig struct", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c patchCollectionRouterConfig) Validate() error", + "line": 79 + }, + { + "kind": "func", + "name": "newPatchCollectionRouter", + "signature": "func newPatchCollectionRouter(cfg patchCollectionRouterConfig) (*patchCollectionRouter, error)", + "line": 95 + }, + { + "kind": "func", + "name": "GetCollectionFor", + "signature": "func (c patchCollectionRouter) GetCollectionFor(item persistedstate.Item) (PatchCollection, error)", + "line": 117 + }, + { + "kind": "func", + "name": "isCreditsEnabled", + "signature": "func (c patchCollectionRouter) isCreditsEnabled(ns string) (bool, error)", + "line": 132 + }, + { + "kind": "func", + "name": "ResolveDefaultCollection", + "signature": "func (c patchCollectionRouter) ResolveDefaultCollection(target targetstate.StateItem) (PatchCollection, error)", + "line": 145 + }, + { + "kind": "func", + "name": "CollectInvoicePatches", + "signature": "func (c patchCollectionRouter) CollectInvoicePatches() []InvoicePatch", + "line": 174 + }, + { + "kind": "func", + "name": "CollectChargePatches", + "signature": "func (c patchCollectionRouter) CollectChargePatches() (charges.ApplyPatchesInput, error)", + "line": 184 + } + ], + "line_count": 189 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestPatchCollectionRouterResolveDefaultCollection", + "signature": "func TestPatchCollectionRouterResolveDefaultCollection(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "testTargetStateItem", + "signature": "func testTargetStateItem(settlementMode productcatalog.SettlementMode, rateCard productcatalog.RateCard) targetstate.StateItem", + "line": 104 + }, + { + "kind": "func", + "name": "TestIsCreditEnabled", + "signature": "func TestIsCreditEnabled(t *testing.T)", + "line": 126 + } + ], + "line_count": 170 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "chargePatchCollection", + "signature": "type chargePatchCollection struct", + "line": 20 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (c chargePatchCollection) GetLineEngineType() billing.LineEngineType", + "line": 26 + }, + { + "kind": "func", + "name": "newChargePatchCollection", + "signature": "func newChargePatchCollection(engineType billing.LineEngineType, itemType persistedstate.ItemType, preallocatedCapacity int) chargePatchCollection", + "line": 30 + }, + { + "kind": "func", + "name": "unsupportedOperationError", + "signature": "func (c chargePatchCollection) unsupportedOperationError(operation PatchOperation, uniqueID string, existing persistedstate.Item) error", + "line": 45 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (c chargePatchCollection) IsEmpty() bool", + "line": 49 + }, + { + "kind": "func", + "name": "Patches", + "signature": "func (c chargePatchCollection) Patches() charges.ApplyPatchesInput", + "line": 53 + }, + { + "kind": "func", + "name": "addCreate", + "signature": "func (c *chargePatchCollection) addCreate(intent charges.ChargeIntent) error", + "line": 57 + }, + { + "kind": "func", + "name": "addPatch", + "signature": "func (c *chargePatchCollection) addPatch(chargeID string, patch charges.Patch) error", + "line": 75 + }, + { + "kind": "func", + "name": "AddDelete", + "signature": "func (c *chargePatchCollection) AddDelete(_ string, existing persistedstate.Item) error", + "line": 96 + }, + { + "kind": "func", + "name": "AddProrate", + "signature": "func (c *chargePatchCollection) AddProrate(existing persistedstate.Item, target targetstate.StateItem, originalPeriod, targetPeriod timeutil.ClosedPeriod, originalAmount, targetAmount alpacadecimal.Decimal) error", + "line": 100 + }, + { + "kind": "func", + "name": "addEmulatedReplacement", + "signature": "func (c *chargePatchCollection) addEmulatedReplacement(existing persistedstate.Item, replacement charges.ChargeIntent) error", + "line": 107 + }, + { + "kind": "func", + "name": "newChargeIntentBaseFromTargetState", + "signature": "func newChargeIntentBaseFromTargetState(target targetstate.StateItem) (chargesmeta.Intent, error)", + "line": 123 + }, + { + "kind": "func", + "name": "logChargesPatches", + "signature": "func logChargesPatches(ctx context.Context, log *slog.Logger, patches charges.ApplyPatchesInput)", + "line": 157 + } + ], + "line_count": 165 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchcharge_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatFeeChargeCollectionPeriodChangesEmitEmulatedReplacement", + "signature": "func TestFlatFeeChargeCollectionPeriodChangesEmitEmulatedReplacement(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyChargeCollectionShrinkEmitsEmulatedReplacement", + "signature": "func TestUsageBasedCreditOnlyChargeCollectionShrinkEmitsEmulatedReplacement(t *testing.T)", + "line": 62 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceChargeCollectionShrinkEmitsNativePatch", + "signature": "func TestUsageBasedCreditThenInvoiceChargeCollectionShrinkEmitsNativePatch(t *testing.T)", + "line": 84 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyChargeCollectionExtendEmitsEmulatedReplacement", + "signature": "func TestUsageBasedCreditOnlyChargeCollectionExtendEmitsEmulatedReplacement(t *testing.T)", + "line": 110 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceChargeCollectionExtendEmitsNativePatch", + "signature": "func TestUsageBasedCreditThenInvoiceChargeCollectionExtendEmitsNativePatch(t *testing.T)", + "line": 127 + }, + { + "kind": "func", + "name": "assertEmulatedReplacement", + "signature": "func assertEmulatedReplacement(t *testing.T, patches charges.ApplyPatchesInput, chargeID string, assertCreate func(charges.ChargeIntent))", + "line": 149 + }, + { + "kind": "func", + "name": "newChargePatchTestFlatFeeItem", + "signature": "func newChargePatchTestFlatFeeItem(t *testing.T, target targetstate.StateItem, id string) persistedstate.Item", + "line": 164 + }, + { + "kind": "func", + "name": "newChargePatchTestUsageBasedItem", + "signature": "func newChargePatchTestUsageBasedItem(t *testing.T, target targetstate.StateItem, id string, settlementMode productcatalog.SettlementMode) persistedstate.Item", + "line": 191 + }, + { + "kind": "func", + "name": "newChargePatchTestUsageBasedItemWithFullServicePeriod", + "signature": "func newChargePatchTestUsageBasedItemWithFullServicePeriod(t *testing.T, target targetstate.StateItem, id string, settlementMode productcatalog.SettlementMode, fullServicePeriod timeutil.ClosedPeriod) persistedstate.Item", + "line": 197 + }, + { + "kind": "func", + "name": "newChargePatchTestUsageBasedItemWithServicePeriod", + "signature": "func newChargePatchTestUsageBasedItemWithServicePeriod(t *testing.T, target targetstate.StateItem, id string, settlementMode productcatalog.SettlementMode, servicePeriod timeutil.ClosedPeriod) persistedstate.Item", + "line": 206 + }, + { + "kind": "func", + "name": "newChargePatchTestUsageBasedItemWithIntent", + "signature": "func newChargePatchTestUsageBasedItemWithIntent(t *testing.T, target targetstate.StateItem, id string, settlementMode productcatalog.SettlementMode, intent chargesmeta.Intent) persistedstate.Item", + "line": 215 + }, + { + "kind": "func", + "name": "newChargePatchTestManagedResource", + "signature": "func newChargePatchTestManagedResource(namespace, id string) chargesmeta.ManagedResource", + "line": 244 + }, + { + "kind": "func", + "name": "newChargePatchTestExistingIntent", + "signature": "func newChargePatchTestExistingIntent(target targetstate.StateItem) chargesmeta.Intent", + "line": 259 + }, + { + "kind": "func", + "name": "newChargePatchTestTarget", + "signature": "func newChargePatchTestTarget(t *testing.T, settlementMode productcatalog.SettlementMode, rateCard productcatalog.RateCard) targetstate.StateItem", + "line": 280 + }, + { + "kind": "func", + "name": "newChargePatchTestUsageRateCard", + "signature": "func newChargePatchTestUsageRateCard() productcatalog.RateCard", + "line": 345 + }, + { + "kind": "func", + "name": "newChargePatchTestFlatRateCard", + "signature": "func newChargePatchTestFlatRateCard() productcatalog.RateCard", + "line": 359 + } + ], + "line_count": 376 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeflatfee.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "flatFeeChargeCollection", + "signature": "type flatFeeChargeCollection struct", + "line": 17 + }, + { + "kind": "func", + "name": "newFlatFeeChargeCollection", + "signature": "func newFlatFeeChargeCollection(preallocatedCapacity int) *flatFeeChargeCollection", + "line": 21 + }, + { + "kind": "func", + "name": "AddCreate", + "signature": "func (c *flatFeeChargeCollection) AddCreate(target targetstate.StateItem) error", + "line": 27 + }, + { + "kind": "func", + "name": "AddShrink", + "signature": "func (c *flatFeeChargeCollection) AddShrink(_ string, existing persistedstate.Item, target targetstate.StateItem) error", + "line": 36 + }, + { + "kind": "func", + "name": "AddExtend", + "signature": "func (c *flatFeeChargeCollection) AddExtend(existing persistedstate.Item, target targetstate.StateItem) error", + "line": 66 + }, + { + "kind": "func", + "name": "newFlatFeeChargeIntent", + "signature": "func newFlatFeeChargeIntent(target targetstate.StateItem) (charges.ChargeIntent, error)", + "line": 96 + } + ], + "line_count": 125 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchchargeusagebased.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "usageBasedChargeCollection", + "signature": "type usageBasedChargeCollection struct", + "line": 17 + }, + { + "kind": "func", + "name": "newUsageBasedChargeCollection", + "signature": "func newUsageBasedChargeCollection(preallocatedCapacity int) *usageBasedChargeCollection", + "line": 21 + }, + { + "kind": "func", + "name": "AddCreate", + "signature": "func (c *usageBasedChargeCollection) AddCreate(target targetstate.StateItem) error", + "line": 27 + }, + { + "kind": "func", + "name": "AddShrink", + "signature": "func (c *usageBasedChargeCollection) AddShrink(_ string, existing persistedstate.Item, target targetstate.StateItem) error", + "line": 36 + }, + { + "kind": "func", + "name": "AddExtend", + "signature": "func (c *usageBasedChargeCollection) AddExtend(existing persistedstate.Item, target targetstate.StateItem) error", + "line": 66 + }, + { + "kind": "func", + "name": "newUsageBasedChargeIntent", + "signature": "func newUsageBasedChargeIntent(target targetstate.StateItem) (charges.ChargeIntent, error)", + "line": 96 + } + ], + "line_count": 118 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchhelpers.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "shouldSkipLinePatch", + "signature": "func shouldSkipLinePatch(existingLine billing.GenericInvoiceLine, expectedLine billing.GatheringLine) bool", + "line": 15 + }, + { + "kind": "func", + "name": "shouldSkipHierarchyPatch", + "signature": "func shouldSkipHierarchyPatch(existingHierarchy *billing.SplitLineHierarchy, expectedLine billing.GatheringLine) bool", + "line": 31 + }, + { + "kind": "func", + "name": "getPatchesForUpdateUsageBasedLine", + "signature": "func getPatchesForUpdateUsageBasedLine(existingLine billing.GenericInvoiceLine, expectedLine billing.GatheringLine, invoices persistedstate.Invoices) (*invoiceupdater.Patch, error)", + "line": 45 + } + ], + "line_count": 98 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoice.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater\"", + "symbols": [ + { + "kind": "struct", + "name": "invoicePatchCollectionBase", + "signature": "type invoicePatchCollectionBase struct", + "line": 10 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (c invoicePatchCollectionBase) GetLineEngineType() billing.LineEngineType", + "line": 14 + }, + { + "kind": "func", + "name": "newInvoicePatchCollectionBase", + "signature": "func newInvoicePatchCollectionBase(preallocatedCapacity int) invoicePatchCollectionBase", + "line": 18 + }, + { + "kind": "func", + "name": "addPatches", + "signature": "func (c *invoicePatchCollectionBase) addPatches(uniqueID string, operation PatchOperation, invoiceUpdates ...invoiceupdater.Patch) error", + "line": 28 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (c invoicePatchCollectionBase) IsEmpty() bool", + "line": 42 + }, + { + "kind": "func", + "name": "Patches", + "signature": "func (c invoicePatchCollectionBase) Patches() []InvoicePatch", + "line": 46 + }, + { + "kind": "struct", + "name": "genericInvoicePatch", + "signature": "type genericInvoicePatch struct", + "line": 50 + }, + { + "kind": "func", + "name": "newGenericInvoicePatch", + "signature": "func newGenericInvoicePatch(uniqueID string, operation PatchOperation, invoiceUpdates ...invoiceupdater.Patch) genericInvoicePatch", + "line": 56 + }, + { + "kind": "func", + "name": "Operation", + "signature": "func (p genericInvoicePatch) Operation() PatchOperation", + "line": 64 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func (p genericInvoicePatch) UniqueReferenceID() string", + "line": 68 + }, + { + "kind": "func", + "name": "GetInvoicePatches", + "signature": "func (p genericInvoicePatch) GetInvoicePatches() ([]invoiceupdater.Patch, error)", + "line": 72 + } + ], + "line_count": 74 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoiceline.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "lineInvoicePatchCollection", + "signature": "type lineInvoicePatchCollection struct", + "line": 20 + }, + { + "kind": "func", + "name": "newLineInvoicePatchCollection", + "signature": "func newLineInvoicePatchCollection(invoices persistedstate.Invoices, preallocatedCapacity int) (*lineInvoicePatchCollection, error)", + "line": 26 + }, + { + "kind": "func", + "name": "AddCreate", + "signature": "func (c *lineInvoicePatchCollection) AddCreate(target targetstate.StateItem) error", + "line": 37 + }, + { + "kind": "func", + "name": "AddDelete", + "signature": "func (c *lineInvoicePatchCollection) AddDelete(uniqueID string, existing persistedstate.Item) error", + "line": 50 + }, + { + "kind": "func", + "name": "AddShrink", + "signature": "func (c *lineInvoicePatchCollection) AddShrink(uniqueID string, existing persistedstate.Item, target targetstate.StateItem) error", + "line": 67 + }, + { + "kind": "func", + "name": "AddExtend", + "signature": "func (c *lineInvoicePatchCollection) AddExtend(existing persistedstate.Item, target targetstate.StateItem) error", + "line": 102 + }, + { + "kind": "func", + "name": "AddProrate", + "signature": "func (c *lineInvoicePatchCollection) AddProrate(existing persistedstate.Item, target targetstate.StateItem, originalPeriod, targetPeriod timeutil.ClosedPeriod, originalAmount, targetAmount alpacadecimal.Decimal) error", + "line": 137 + } + ], + "line_count": 215 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/patchinvoicelinehierarchy.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "lineHierarchyPatchCollection", + "signature": "type lineHierarchyPatchCollection struct", + "line": 22 + }, + { + "kind": "func", + "name": "newLineHierarchyPatchCollection", + "signature": "func newLineHierarchyPatchCollection(preallocatedCapacity int) *lineHierarchyPatchCollection", + "line": 26 + }, + { + "kind": "func", + "name": "AddCreate", + "signature": "func (c *lineHierarchyPatchCollection) AddCreate(target targetstate.StateItem) error", + "line": 32 + }, + { + "kind": "func", + "name": "AddDelete", + "signature": "func (c *lineHierarchyPatchCollection) AddDelete(uniqueID string, existing persistedstate.Item) error", + "line": 36 + }, + { + "kind": "func", + "name": "AddShrink", + "signature": "func (c *lineHierarchyPatchCollection) AddShrink(uniqueID string, existing persistedstate.Item, target targetstate.StateItem) error", + "line": 68 + }, + { + "kind": "func", + "name": "AddExtend", + "signature": "func (c *lineHierarchyPatchCollection) AddExtend(existing persistedstate.Item, target targetstate.StateItem) error", + "line": 136 + }, + { + "kind": "func", + "name": "AddProrate", + "signature": "func (c *lineHierarchyPatchCollection) AddProrate(existing persistedstate.Item, target targetstate.StateItem, originalPeriod, targetPeriod timeutil.ClosedPeriod, originalAmount, targetAmount alpacadecimal.Decimal) error", + "line": 198 + } + ], + "line_count": 200 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/prorate.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "ProrateDecision", + "signature": "type ProrateDecision struct", + "line": 14 + }, + { + "kind": "func", + "name": "semanticProrateDecision", + "signature": "func semanticProrateDecision(existing persistedstate.Item, target targetstate.StateItem) (ProrateDecision, error)", + "line": 20 + } + ], + "line_count": 63 + }, + "openmeter/billing/worker/subscriptionsync/service/reconciler/reconciler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Reconciler", + "signature": "type Reconciler interface", + "line": 25 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 39 + }, + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 59 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 70 + }, + { + "kind": "struct", + "name": "PlanInput", + "signature": "type PlanInput struct", + "line": 86 + }, + { + "kind": "struct", + "name": "ApplyInput", + "signature": "type ApplyInput struct", + "line": 93 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ApplyInput) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 115 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (p *Plan) IsEmpty() bool", + "line": 122 + }, + { + "kind": "func", + "name": "diffItem", + "signature": "func (s *Service) diffItem(\n\ttarget *targetstate.StateItem,\n\texisting persistedstate.Item,\n\tpatches PatchCollection,\n) error", + "line": 130 + }, + { + "kind": "func", + "name": "filterInScopeLines", + "signature": "func filterInScopeLines(inScopeLines []targetstate.StateItem, patchCollections *patchCollectionRouter) ([]targetstate.StateItem, error)", + "line": 184 + }, + { + "kind": "func", + "name": "Plan", + "signature": "func (s *Service) Plan(ctx context.Context, input PlanInput) (*Plan, error)", + "line": 217 + }, + { + "kind": "func", + "name": "Apply", + "signature": "func (s *Service) Apply(ctx context.Context, input ApplyInput) error", + "line": 329 + } + ], + "line_count": 375 + }, + "openmeter/billing/worker/subscriptionsync/service/ref.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (t SubscriptionReferenceType) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "subscriptionReferenceOrView", + "signature": "type subscriptionReferenceOrView struct", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r subscriptionReferenceOrView) Validate() error", + "line": 59 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (r subscriptionReferenceOrView) Type() SubscriptionReferenceType", + "line": 78 + }, + { + "kind": "func", + "name": "AsNamespacedID", + "signature": "func (r subscriptionReferenceOrView) AsNamespacedID() (models.NamespacedID, error)", + "line": 82 + }, + { + "kind": "func", + "name": "AsSubscriptionView", + "signature": "func (r subscriptionReferenceOrView) AsSubscriptionView() (subscription.SubscriptionView, error)", + "line": 94 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (r subscriptionReferenceOrView) GetID() models.NamespacedID", + "line": 106 + } + ], + "line_count": 123 + }, + "openmeter/billing/worker/subscriptionsync/service/repair.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "repairChargeSubscriptionReferences", + "signature": "func (s *Service) repairChargeSubscriptionReferences(ctx context.Context, persisted persistedstate.State, target targetstate.State, dryRun bool) (persistedstate.State, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "persistedChargeSubscriptionReference", + "signature": "type persistedChargeSubscriptionReference struct", + "line": 118 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (r persistedChargeSubscriptionReference) UpdateSubscriptionItemID(ctx context.Context, chargesService charges.Service, newSubscriptionItemID string) (charges.Charge, error)", + "line": 125 + }, + { + "kind": "func", + "name": "WithSubscriptionItemID", + "signature": "func (r persistedChargeSubscriptionReference) WithSubscriptionItemID(newSubscriptionItemID string) (charges.Charge, error)", + "line": 129 + }, + { + "kind": "func", + "name": "subscriptionReferenceWithItemID", + "signature": "func subscriptionReferenceWithItemID(subscription *meta.SubscriptionReference, newSubscriptionItemID string) (*meta.SubscriptionReference, error)", + "line": 168 + }, + { + "kind": "func", + "name": "persistedChargeSubscriptionReferenceFromItem", + "signature": "func persistedChargeSubscriptionReferenceFromItem(item persistedstate.Item) (persistedChargeSubscriptionReference, error)", + "line": 179 + }, + { + "kind": "func", + "name": "persistedItemFromCharge", + "signature": "func persistedItemFromCharge(charge charges.Charge) (persistedstate.Item, error)", + "line": 210 + } + ], + "line_count": 229 + }, + "openmeter/billing/worker/subscriptionsync/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureFlags", + "signature": "type FeatureFlags struct", + "line": 21 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 41 + }, + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 71 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 82 + }, + { + "kind": "func", + "name": "GetSyncStates", + "signature": "func (s *Service) GetSyncStates(ctx context.Context, input subscriptionsync.GetSyncStatesInput) ([]subscriptionsync.SyncState, error)", + "line": 109 + }, + { + "kind": "func", + "name": "SyncByViewAndInvoiceCustomer", + "signature": "func (s *Service) SyncByViewAndInvoiceCustomer(ctx context.Context, view subscription.SubscriptionView, asOf time.Time) error", + "line": 115 + }, + { + "kind": "func", + "name": "SyncByIDAndInvoiceCustomer", + "signature": "func (s *Service) SyncByIDAndInvoiceCustomer(ctx context.Context, subscriptionID models.NamespacedID, asOf time.Time) error", + "line": 119 + }, + { + "kind": "func", + "name": "SyncByView", + "signature": "func (s *Service) SyncByView(ctx context.Context, view subscription.SubscriptionView, asOf time.Time, opts ...subscriptionsync.SynchronizeSubscriptionOption) error", + "line": 123 + }, + { + "kind": "func", + "name": "SyncByID", + "signature": "func (s *Service) SyncByID(ctx context.Context, subscriptionID models.NamespacedID, asOf time.Time, opts ...subscriptionsync.SynchronizeSubscriptionOption) error", + "line": 128 + } + ], + "line_count": 131 + }, + "openmeter/billing/worker/subscriptionsync/service/sync.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "invoicePendingLines", + "signature": "func (s *Service) invoicePendingLines(ctx context.Context, customer customer.CustomerID) error", + "line": 30 + }, + { + "kind": "func", + "name": "HandleSubscriptionSyncEvent", + "signature": "func (s *Service) HandleSubscriptionSyncEvent(ctx context.Context, event *subscription.SubscriptionSyncEvent) error", + "line": 55 + }, + { + "kind": "func", + "name": "synchronizeSubscriptionAndInvoiceCustomer", + "signature": "func (s *Service) synchronizeSubscriptionAndInvoiceCustomer(ctx context.Context, refOrView subscriptionReferenceOrView, asOf time.Time) error", + "line": 63 + }, + { + "kind": "struct", + "name": "synchronizeSubscriptionResult", + "signature": "type synchronizeSubscriptionResult struct", + "line": 83 + }, + { + "kind": "func", + "name": "synchronizeSubscription", + "signature": "func (s *Service) synchronizeSubscription(ctx context.Context, refOrView subscriptionReferenceOrView, asOf time.Time, opts ...subscriptionsync.SynchronizeSubscriptionOption) (*synchronizeSubscriptionResult, error)", + "line": 88 + }, + { + "kind": "func", + "name": "getSubscription", + "signature": "func (s *Service) getSubscription(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 255 + }, + { + "kind": "struct", + "name": "updateSyncStateInput", + "signature": "type updateSyncStateInput struct", + "line": 276 + }, + { + "kind": "func", + "name": "updateSyncState", + "signature": "func (s *Service) updateSyncState(ctx context.Context, in updateSyncStateInput) error", + "line": 283 + } + ], + "line_count": 322 + }, + "openmeter/billing/worker/subscriptionsync/service/sync_credittheninvoice_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditThenInvoiceTestSuite", + "signature": "type CreditThenInvoiceTestSuite struct", + "line": 52 + }, + { + "kind": "func", + "name": "TestCreditThenInvoiceScenarios", + "signature": "func TestCreditThenInvoiceScenarios(t *testing.T)", + "line": 59 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CreditThenInvoiceTestSuite) SetupSuite()", + "line": 63 + }, + { + "kind": "func", + "name": "BeforeTest", + "signature": "func (s *CreditThenInvoiceTestSuite) BeforeTest(suiteName, testName string)", + "line": 148 + }, + { + "kind": "func", + "name": "TestSubscriptionHappyPath", + "signature": "func (s *CreditThenInvoiceTestSuite) TestSubscriptionHappyPath()", + "line": 158 + }, + { + "kind": "func", + "name": "TestInArrearsProratingGathering", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInArrearsProratingGathering()", + "line": 647 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncNonBillableAmountProrated", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceGatheringSyncNonBillableAmountProrated()", + "line": 842 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncNonBillableAmount", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceGatheringSyncNonBillableAmount()", + "line": 1043 + }, + { + "kind": "func", + "name": "TestInArrearsGatheringSyncNonBillableAmount", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInArrearsGatheringSyncNonBillableAmount()", + "line": 1248 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncBillableAmountProrated", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceGatheringSyncBillableAmountProrated()", + "line": 1409 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncDraftInvoiceProrated", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceGatheringSyncDraftInvoiceProrated()", + "line": 1625 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncIssuedInvoiceProrated", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceGatheringSyncIssuedInvoiceProrated()", + "line": 2071 + }, + { + "kind": "func", + "name": "TestDefactoZeroPrices", + "signature": "func (s *CreditThenInvoiceTestSuite) TestDefactoZeroPrices()", + "line": 2460 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionInvoicing", + "signature": "func (s *CreditThenInvoiceTestSuite) TestAlignedSubscriptionInvoicing()", + "line": 2555 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionCancellation", + "signature": "func (s *CreditThenInvoiceTestSuite) TestAlignedSubscriptionCancellation()", + "line": 2906 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionProgressiveBillingCancellation", + "signature": "func (s *CreditThenInvoiceTestSuite) TestAlignedSubscriptionProgressiveBillingCancellation()", + "line": 3073 + }, + { + "kind": "func", + "name": "TestInAdvanceOneTimeFeeSyncing", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceOneTimeFeeSyncing()", + "line": 3266 + }, + { + "kind": "func", + "name": "TestInArrearsOneTimeFeeSyncing", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInArrearsOneTimeFeeSyncing()", + "line": 3371 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdate", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedGatheringUpdate()", + "line": 3521 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdateDraftInvoice", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedGatheringUpdateDraftInvoice()", + "line": 3715 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdateIssuedInvoice", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedGatheringUpdateIssuedInvoice()", + "line": 4068 + }, + { + "kind": "func", + "name": "TestUsageBasedUpdateWithLineSplits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedUpdateWithLineSplits()", + "line": 4442 + }, + { + "kind": "func", + "name": "TestRateCardTaxSyncFlatFee", + "signature": "func (s *CreditThenInvoiceTestSuite) TestRateCardTaxSyncFlatFee()", + "line": 4954 + }, + { + "kind": "func", + "name": "TestRateCardTaxSyncUsageBased", + "signature": "func (s *CreditThenInvoiceTestSuite) TestRateCardTaxSyncUsageBased()", + "line": 5123 + }, + { + "kind": "func", + "name": "TestInAdvanceInstantBillingOnSubscriptionCreation", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceInstantBillingOnSubscriptionCreation()", + "line": 5288 + }, + { + "kind": "func", + "name": "TestInAdvanceInstantBillingOnSubscriptionCreationWithSubscriptionStartInFuture", + "signature": "func (s *CreditThenInvoiceTestSuite) TestInAdvanceInstantBillingOnSubscriptionCreationWithSubscriptionStartInFuture()", + "line": 5423 + }, + { + "kind": "func", + "name": "TestDiscountSynchronization", + "signature": "func (s *CreditThenInvoiceTestSuite) TestDiscountSynchronization()", + "line": 5554 + }, + { + "kind": "func", + "name": "TestDiscountSynchronizationWithPartialDiscount", + "signature": "func (s *CreditThenInvoiceTestSuite) TestDiscountSynchronizationWithPartialDiscount()", + "line": 5788 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionProratingBehavior", + "signature": "func (s *CreditThenInvoiceTestSuite) TestAlignedSubscriptionProratingBehavior()", + "line": 6056 + }, + { + "kind": "func", + "name": "TestSynchronizeSubscriptionPeriodAlgorithmChange", + "signature": "func (s *CreditThenInvoiceTestSuite) TestSynchronizeSubscriptionPeriodAlgorithmChange()", + "line": 6409 + }, + { + "kind": "func", + "name": "TestDeletedCustomerHandling", + "signature": "func (s *CreditThenInvoiceTestSuite) TestDeletedCustomerHandling()", + "line": 6583 + }, + { + "kind": "func", + "name": "TestFirstDayOfMonthBillingForSubPeriodLength", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFirstDayOfMonthBillingForSubPeriodLength()", + "line": 6725 + }, + { + "kind": "func", + "name": "TestSyncStateUpdateNoBillables", + "signature": "func (s *CreditThenInvoiceTestSuite) TestSyncStateUpdateNoBillables()", + "line": 6859 + }, + { + "kind": "func", + "name": "TestSyncStateUpdateWithFreePhaseActiveInTheFuture", + "signature": "func (s *CreditThenInvoiceTestSuite) TestSyncStateUpdateWithFreePhaseActiveInTheFuture()", + "line": 6954 + }, + { + "kind": "func", + "name": "expectValidationIssueForLine", + "signature": "func (s *CreditThenInvoiceTestSuite) expectValidationIssueForLine(line *billing.StandardLine, issue billing.ValidationIssue)", + "line": 7172 + }, + { + "kind": "struct", + "name": "expectedCreditThenInvoiceBalances", + "signature": "type expectedCreditThenInvoiceBalances struct", + "line": 7179 + }, + { + "kind": "func", + "name": "assertCreditThenInvoiceBalances", + "signature": "func (s *CreditThenInvoiceTestSuite) assertCreditThenInvoiceBalances(expected expectedCreditThenInvoiceBalances)", + "line": 7203 + }, + { + "kind": "func", + "name": "mustCustomerFBOBalance", + "signature": "func (s *CreditThenInvoiceTestSuite) mustCustomerFBOBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 7237 + }, + { + "kind": "func", + "name": "mustCustomerReceivableBalance", + "signature": "func (s *CreditThenInvoiceTestSuite) mustCustomerReceivableBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], status ledger.TransactionAuthorizationStatus) alpacadecimal.Decimal", + "line": 7253 + }, + { + "kind": "func", + "name": "mustCustomerAccruedBalance", + "signature": "func (s *CreditThenInvoiceTestSuite) mustCustomerAccruedBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 7269 + }, + { + "kind": "func", + "name": "mustWashBalance", + "signature": "func (s *CreditThenInvoiceTestSuite) mustWashBalance(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 7284 + }, + { + "kind": "func", + "name": "mustEarningsBalance", + "signature": "func (s *CreditThenInvoiceTestSuite) mustEarningsBalance(namespace string, code currencyx.Code) alpacadecimal.Decimal", + "line": 7299 + }, + { + "kind": "func", + "name": "mustGetOnlyUsageBasedCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) mustGetOnlyUsageBasedCharge(ctx context.Context, subscriptionID string) usagebased.Charge", + "line": 7313 + }, + { + "kind": "func", + "name": "mustGetUsageBasedChargeByIDWithExpands", + "signature": "func (s *CreditThenInvoiceTestSuite) mustGetUsageBasedChargeByIDWithExpands(ctx context.Context, chargeID chargesmeta.ChargeID, expands chargesmeta.Expands) usagebased.Charge", + "line": 7330 + }, + { + "kind": "func", + "name": "assertGatheringLineTaxConfigs", + "signature": "func (s *CreditThenInvoiceTestSuite) assertGatheringLineTaxConfigs(lines []billing.GatheringLine, expected *productcatalog.TaxConfig)", + "line": 7345 + }, + { + "kind": "func", + "name": "assertStandardLineTaxConfigs", + "signature": "func (s *CreditThenInvoiceTestSuite) assertStandardLineTaxConfigs(lines []*billing.StandardLine, expected *productcatalog.TaxConfig)", + "line": 7355 + }, + { + "kind": "func", + "name": "assertCreditThenInvoiceChargeTaxConfigs", + "signature": "func (s *CreditThenInvoiceTestSuite) assertCreditThenInvoiceChargeTaxConfigs(ctx context.Context, subscriptionID string, chargeType chargesmeta.ChargeType, expected *productcatalog.TaxConfig)", + "line": 7365 + }, + { + "kind": "func", + "name": "assertTaxCodeConfigEqual", + "signature": "func (s *CreditThenInvoiceTestSuite) assertTaxCodeConfigEqual(expected, actual *productcatalog.TaxCodeConfig, label string)", + "line": 7393 + }, + { + "kind": "struct", + "name": "expectedUsageBasedChargeInput", + "signature": "type expectedUsageBasedChargeInput struct", + "line": 7417 + }, + { + "kind": "func", + "name": "assertCreditThenInvoiceUsageBasedCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) assertCreditThenInvoiceUsageBasedCharge(charge usagebased.Charge, input expectedUsageBasedChargeInput)", + "line": 7429 + }, + { + "kind": "struct", + "name": "expectedTotalsInput", + "signature": "type expectedTotalsInput struct", + "line": 7447 + }, + { + "kind": "func", + "name": "assertTotals", + "signature": "func (s *CreditThenInvoiceTestSuite) assertTotals(actual totals.Totals, input expectedTotalsInput)", + "line": 7453 + }, + { + "kind": "struct", + "name": "createPromotionalCreditFundingInput", + "signature": "type createPromotionalCreditFundingInput struct", + "line": 7461 + }, + { + "kind": "func", + "name": "createPromotionalCreditFunding", + "signature": "func (s *CreditThenInvoiceTestSuite) createPromotionalCreditFunding(ctx context.Context, input createPromotionalCreditFundingInput) creditpurchase.Charge", + "line": 7469 + } + ], + "line_count": 7500 + }, + "openmeter/billing/worker/subscriptionsync/service/sync_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionHandlerTestSuite", + "signature": "type SubscriptionHandlerTestSuite struct", + "line": 33 + }, + { + "kind": "func", + "name": "TestSubscriptionHandlerScenarios", + "signature": "func TestSubscriptionHandlerScenarios(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "TestSubscriptionHappyPath", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSubscriptionHappyPath()", + "line": 41 + }, + { + "kind": "func", + "name": "TestInArrearsProratingGathering", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInArrearsProratingGathering()", + "line": 382 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncNonBillableAmountProrated", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceGatheringSyncNonBillableAmountProrated()", + "line": 559 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncNonBillableAmount", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceGatheringSyncNonBillableAmount()", + "line": 652 + }, + { + "kind": "func", + "name": "TestInArrearsGatheringSyncNonBillableAmount", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInArrearsGatheringSyncNonBillableAmount()", + "line": 786 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncBillableAmountProrated", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceGatheringSyncBillableAmountProrated()", + "line": 913 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncDraftInvoiceProrated", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceGatheringSyncDraftInvoiceProrated()", + "line": 1047 + }, + { + "kind": "func", + "name": "TestInAdvanceGatheringSyncIssuedInvoiceProrated", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceGatheringSyncIssuedInvoiceProrated()", + "line": 1216 + }, + { + "kind": "func", + "name": "TestDefactoZeroPrices", + "signature": "func (s *SubscriptionHandlerTestSuite) TestDefactoZeroPrices()", + "line": 1392 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionInvoicing", + "signature": "func (s *SubscriptionHandlerTestSuite) TestAlignedSubscriptionInvoicing()", + "line": 1464 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionCancellation", + "signature": "func (s *SubscriptionHandlerTestSuite) TestAlignedSubscriptionCancellation()", + "line": 1740 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionProgressiveBillingCancellation", + "signature": "func (s *SubscriptionHandlerTestSuite) TestAlignedSubscriptionProgressiveBillingCancellation()", + "line": 1875 + }, + { + "kind": "func", + "name": "TestInAdvanceOneTimeFeeSyncing", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceOneTimeFeeSyncing()", + "line": 2071 + }, + { + "kind": "func", + "name": "TestInArrearsOneTimeFeeSyncing", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInArrearsOneTimeFeeSyncing()", + "line": 2127 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdate", + "signature": "func (s *SubscriptionHandlerTestSuite) TestUsageBasedGatheringUpdate()", + "line": 2245 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdateDraftInvoice", + "signature": "func (s *SubscriptionHandlerTestSuite) TestUsageBasedGatheringUpdateDraftInvoice()", + "line": 2378 + }, + { + "kind": "func", + "name": "TestUsageBasedGatheringUpdateIssuedInvoice", + "signature": "func (s *SubscriptionHandlerTestSuite) TestUsageBasedGatheringUpdateIssuedInvoice()", + "line": 2583 + }, + { + "kind": "func", + "name": "TestUsageBasedUpdateWithLineSplits", + "signature": "func (s *SubscriptionHandlerTestSuite) TestUsageBasedUpdateWithLineSplits()", + "line": 2732 + }, + { + "kind": "func", + "name": "TestGatheringManualEditSync", + "signature": "func (s *SubscriptionHandlerTestSuite) TestGatheringManualEditSync()", + "line": 2998 + }, + { + "kind": "func", + "name": "TestSplitLineManualEditSync", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSplitLineManualEditSync()", + "line": 3079 + }, + { + "kind": "func", + "name": "TestGatheringManualDeleteSync", + "signature": "func (s *SubscriptionHandlerTestSuite) TestGatheringManualDeleteSync()", + "line": 3186 + }, + { + "kind": "func", + "name": "TestManualIgnoringOfSyncedLines", + "signature": "func (s *SubscriptionHandlerTestSuite) TestManualIgnoringOfSyncedLines()", + "line": 3263 + }, + { + "kind": "func", + "name": "TestManualIgnoringOfSyncedLinesWhenPeriodChanges", + "signature": "func (s *SubscriptionHandlerTestSuite) TestManualIgnoringOfSyncedLinesWhenPeriodChanges()", + "line": 3448 + }, + { + "kind": "func", + "name": "TestSplitLineManualDeleteSync", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSplitLineManualDeleteSync()", + "line": 3550 + }, + { + "kind": "func", + "name": "TestRateCardTaxSync", + "signature": "func (s *SubscriptionHandlerTestSuite) TestRateCardTaxSync()", + "line": 3664 + }, + { + "kind": "func", + "name": "TestInAdvanceInstantBillingOnSubscriptionCreation", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceInstantBillingOnSubscriptionCreation()", + "line": 3744 + }, + { + "kind": "func", + "name": "TestInAdvanceInstantBillingOnSubscriptionCreationWithSubscriptionStartInFuture", + "signature": "func (s *SubscriptionHandlerTestSuite) TestInAdvanceInstantBillingOnSubscriptionCreationWithSubscriptionStartInFuture()", + "line": 3824 + }, + { + "kind": "func", + "name": "expectValidationIssueForLine", + "signature": "func (s *SubscriptionHandlerTestSuite) expectValidationIssueForLine(line *billing.StandardLine, issue billing.ValidationIssue)", + "line": 3909 + }, + { + "kind": "func", + "name": "TestDiscountSynchronization", + "signature": "func (s *SubscriptionHandlerTestSuite) TestDiscountSynchronization()", + "line": 3916 + }, + { + "kind": "func", + "name": "TestAlignedSubscriptionProratingBehavior", + "signature": "func (s *SubscriptionHandlerTestSuite) TestAlignedSubscriptionProratingBehavior()", + "line": 4056 + }, + { + "kind": "func", + "name": "TestSynchronizeSubscriptionPeriodAlgorithmChange", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSynchronizeSubscriptionPeriodAlgorithmChange()", + "line": 4315 + }, + { + "kind": "func", + "name": "TestDeletedCustomerHandling", + "signature": "func (s *SubscriptionHandlerTestSuite) TestDeletedCustomerHandling()", + "line": 4439 + }, + { + "kind": "func", + "name": "TestFirstDayOfMonthBillingForSubPeriodLength", + "signature": "func (s *SubscriptionHandlerTestSuite) TestFirstDayOfMonthBillingForSubPeriodLength()", + "line": 4559 + }, + { + "kind": "func", + "name": "TestSyncStateUpdateNoBillables", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSyncStateUpdateNoBillables()", + "line": 4675 + }, + { + "kind": "func", + "name": "TestSyncStateUpdateWithFreePhaseActiveInTheFuture", + "signature": "func (s *SubscriptionHandlerTestSuite) TestSyncStateUpdateWithFreePhaseActiveInTheFuture()", + "line": 4768 + } + ], + "line_count": 4900 + }, + "openmeter/billing/worker/subscriptionsync/service/syncbillinganchor_test.go": { + "header": "\t\"slices\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingAnchorTestSuite", + "signature": "type BillingAnchorTestSuite struct", + "line": 29 + }, + { + "kind": "func", + "name": "TestBillingAnchor", + "signature": "func TestBillingAnchor(t *testing.T)", + "line": 33 + }, + { + "kind": "func", + "name": "TestBillingAnchorSinglePhase", + "signature": "func (s *BillingAnchorTestSuite) TestBillingAnchorSinglePhase()", + "line": 37 + }, + { + "kind": "func", + "name": "TestBillingAnchorMultiPhase", + "signature": "func (s *BillingAnchorTestSuite) TestBillingAnchorMultiPhase()", + "line": 204 + } + ], + "line_count": 402 + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "PhaseIterator", + "signature": "type PhaseIterator struct", + "line": 31 + }, + { + "kind": "struct", + "name": "SubscriptionItemWithPeriods", + "signature": "type SubscriptionItemWithPeriods struct", + "line": 44 + }, + { + "kind": "func", + "name": "PeriodPercentage", + "signature": "func (r SubscriptionItemWithPeriods) PeriodPercentage() alpacadecimal.Decimal", + "line": 68 + }, + { + "kind": "func", + "name": "GetInvoiceAt", + "signature": "func (r SubscriptionItemWithPeriods) GetInvoiceAt() time.Time", + "line": 80 + }, + { + "kind": "func", + "name": "NewPhaseIterator", + "signature": "func NewPhaseIterator(logger *slog.Logger, tracer trace.Tracer, subs subscription.SubscriptionView, phaseKey string) (*PhaseIterator, error)", + "line": 97 + }, + { + "kind": "func", + "name": "HasInvoicableItems", + "signature": "func (it *PhaseIterator) HasInvoicableItems() bool", + "line": 123 + }, + { + "kind": "func", + "name": "PhaseEnd", + "signature": "func (it *PhaseIterator) PhaseEnd() *time.Time", + "line": 132 + }, + { + "kind": "func", + "name": "PhaseStart", + "signature": "func (it *PhaseIterator) PhaseStart() time.Time", + "line": 136 + }, + { + "kind": "func", + "name": "GetMinimumBillableTime", + "signature": "func (it *PhaseIterator) GetMinimumBillableTime() time.Time", + "line": 144 + }, + { + "kind": "func", + "name": "Generate", + "signature": "func (it *PhaseIterator) Generate(ctx context.Context, iterationEnd time.Time) ([]SubscriptionItemWithPeriods, error)", + "line": 191 + }, + { + "kind": "func", + "name": "generateAligned", + "signature": "func (it *PhaseIterator) generateAligned(ctx context.Context, iterationEnd time.Time) ([]SubscriptionItemWithPeriods, error)", + "line": 204 + }, + { + "kind": "func", + "name": "generateForAlignedItemVersion", + "signature": "func (it *PhaseIterator) generateForAlignedItemVersion(ctx context.Context, item subscription.SubscriptionItemView, version int, iterationEnd time.Time, items *[]SubscriptionItemWithPeriods) (bool, error)", + "line": 226 + }, + { + "kind": "struct", + "name": "generatedVersionPeriodItem", + "signature": "type generatedVersionPeriodItem struct", + "line": 325 + }, + { + "kind": "func", + "name": "generateForAlignedItemVersionPeriod", + "signature": "func (it *PhaseIterator) generateForAlignedItemVersionPeriod(ctx context.Context, logger *slog.Logger, item subscription.SubscriptionItemView, version int, periodIdx int, at time.Time) (SubscriptionItemWithPeriods, error)", + "line": 332 + }, + { + "kind": "func", + "name": "truncateItemsIfNeeded", + "signature": "func (it *PhaseIterator) truncateItemsIfNeeded(in []SubscriptionItemWithPeriods) []SubscriptionItemWithPeriods", + "line": 413 + }, + { + "kind": "func", + "name": "generateOneTimeAlignedItem", + "signature": "func (it *PhaseIterator) generateOneTimeAlignedItem(item subscription.SubscriptionItemView, versionID int) (*SubscriptionItemWithPeriods, error)", + "line": 439 + } + ], + "line_count": 509 + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate/phaseiterator_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "PhaseIteratorTestSuite", + "signature": "type PhaseIteratorTestSuite struct", + "line": 24 + }, + { + "kind": "func", + "name": "TestPhaseIterator", + "signature": "func TestPhaseIterator(t *testing.T)", + "line": 29 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *PhaseIteratorTestSuite) SetupSuite()", + "line": 33 + }, + { + "kind": "struct", + "name": "expectedIterations", + "signature": "type expectedIterations struct", + "line": 37 + }, + { + "kind": "struct", + "name": "subscriptionItemViewMock", + "signature": "type subscriptionItemViewMock struct", + "line": 44 + }, + { + "kind": "func", + "name": "mustParseTime", + "signature": "func (s *PhaseIteratorTestSuite) mustParseTime(t string) time.Time", + "line": 56 + }, + { + "kind": "func", + "name": "TestPhaseIterator", + "signature": "func (s *PhaseIteratorTestSuite) TestPhaseIterator()", + "line": 60 + } + ], + "line_count": 1277 + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstate.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "State", + "signature": "type State struct", + "line": 24 + }, + { + "kind": "struct", + "name": "BuildInput", + "signature": "type BuildInput struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i BuildInput) Validate() error", + "line": 36 + }, + { + "kind": "struct", + "name": "Builder", + "signature": "type Builder struct", + "line": 56 + }, + { + "kind": "func", + "name": "NewBuilder", + "signature": "func NewBuilder(logger *slog.Logger, tracer trace.Tracer) Builder", + "line": 61 + }, + { + "kind": "func", + "name": "Build", + "signature": "func (b Builder) Build(ctx context.Context, input BuildInput) (State, error)", + "line": 65 + }, + { + "kind": "struct", + "name": "collectResult", + "signature": "type collectResult struct", + "line": 131 + }, + { + "kind": "func", + "name": "collectUpcomingLines", + "signature": "func (b Builder) collectUpcomingLines(ctx context.Context, subs subscription.SubscriptionView, asOf time.Time) (collectResult, error)", + "line": 136 + }, + { + "kind": "func", + "name": "withActiveTo", + "signature": "func withActiveTo(subs subscription.SubscriptionView, endAt time.Time) subscription.SubscriptionView", + "line": 200 + }, + { + "kind": "func", + "name": "correctPeriodStartForUpcomingLines", + "signature": "func (b Builder) correctPeriodStartForUpcomingLines(ctx context.Context, subscriptionID string, inScopeLines []SubscriptionItemWithPeriods, persisted persistedstate.State) ([]SubscriptionItemWithPeriods, error)", + "line": 206 + } + ], + "line_count": 273 + }, + "openmeter/billing/worker/subscriptionsync/service/targetstate/targetstateitem.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "StateItem", + "signature": "type StateItem struct", + "line": 18 + }, + { + "kind": "func", + "name": "IsBillable", + "signature": "func (r StateItem) IsBillable() bool", + "line": 29 + }, + { + "kind": "func", + "name": "GetServicePeriod", + "signature": "func (r StateItem) GetServicePeriod() timeutil.ClosedPeriod", + "line": 47 + }, + { + "kind": "func", + "name": "GetExpectedLine", + "signature": "func (r StateItem) GetExpectedLine() (*billing.GatheringLine, error)", + "line": 51 + }, + { + "kind": "func", + "name": "discountsToBillingDiscounts", + "signature": "func discountsToBillingDiscounts(discounts productcatalog.Discounts) billing.Discounts", + "line": 122 + }, + { + "kind": "func", + "name": "shouldProrate", + "signature": "func (r StateItem) shouldProrate() bool", + "line": 136 + }, + { + "kind": "func", + "name": "GetExpectedLineOrErr", + "signature": "func (r StateItem) GetExpectedLineOrErr() (billing.GatheringLine, error)", + "line": 159 + } + ], + "line_count": 170 + }, + "openmeter/billing/worker/worker.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "WorkerOptions", + "signature": "type WorkerOptions struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (w WorkerOptions) Validate() error", + "line": 41 + }, + { + "kind": "struct", + "name": "Worker", + "signature": "type Worker struct", + "line": 73 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(opts WorkerOptions) (*Worker, error)", + "line": 84 + }, + { + "kind": "func", + "name": "AddHandler", + "signature": "func (w *Worker) AddHandler(handler grouphandler.GroupEventHandler)", + "line": 144 + }, + { + "kind": "func", + "name": "eventHandler", + "signature": "func (w *Worker) eventHandler(opts WorkerOptions) (*grouphandler.NoPublishingHandler, error)", + "line": 148 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (w *Worker) Run(ctx context.Context) error", + "line": 228 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (w *Worker) Close() error", + "line": 232 + } + ], + "line_count": 234 + }, + "openmeter/billing/workflow.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "WorkflowConfig", + "signature": "type WorkflowConfig struct", + "line": 9 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c WorkflowConfig) Validate() error", + "line": 16 + }, + { + "kind": "struct", + "name": "CollectionConfig", + "signature": "type CollectionConfig struct", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *CollectionConfig) Validate() error", + "line": 43 + }, + { + "kind": "struct", + "name": "WorkflowTaxConfig", + "signature": "type WorkflowTaxConfig struct", + "line": 72 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *WorkflowTaxConfig) Validate() error", + "line": 85 + } + ], + "line_count": 91 + }, + "openmeter/cost/adapter.go": { + "header": "type Adapter interface {\n\tQueryFeatureCost(ctx context.Context, input QueryFeatureCostInput) (*CostQueryResult, error)\n}", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 6 + } + ], + "line_count": 8 + }, + "openmeter/cost/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tfeatureConnector feature.FeatureConnector,\n\tmeterService meterpkg.Service,\n\tstreamingConnector streaming.Connector,\n\tllmcostService llmcost.Service,\n) cost.Adapter", + "line": 20 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 36 + }, + { + "kind": "struct", + "name": "llmPriceKey", + "signature": "type llmPriceKey struct", + "line": 44 + }, + { + "kind": "struct", + "name": "llmPriceResult", + "signature": "type llmPriceResult struct", + "line": 50 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (a *adapter) QueryFeatureCost(ctx context.Context, input cost.QueryFeatureCostInput) (*cost.CostQueryResult, error)", + "line": 56 + }, + { + "kind": "func", + "name": "getLLMPrices", + "signature": "func (a *adapter) getLLMPrices(ctx context.Context, feat *feature.Feature, rows []meterpkg.MeterQueryRow) map[llmPriceKey]llmPriceResult", + "line": 138 + }, + { + "kind": "func", + "name": "addLLMGroupByKeys", + "signature": "func addLLMGroupByKeys(feat *feature.Feature, params *streaming.QueryParams) []string", + "line": 203 + }, + { + "kind": "func", + "name": "makeCostResolver", + "signature": "func (a *adapter) makeCostResolver(ctx context.Context, feat *feature.Feature, priceCache map[llmPriceKey]llmPriceResult) costResolverFunc", + "line": 226 + }, + { + "kind": "func", + "name": "resolveUnitCost", + "signature": "func (a *adapter) resolveUnitCost(ctx context.Context, feat *feature.Feature, groupByValues map[string]string, priceCache map[llmPriceKey]llmPriceResult) (*cost.ResolvedUnitCost, error)", + "line": 242 + }, + { + "kind": "func", + "name": "resolveLLMUnitCost", + "signature": "func (a *adapter) resolveLLMUnitCost(ctx context.Context, feat *feature.Feature, groupByValues map[string]string, priceCache map[llmPriceKey]llmPriceResult) (*cost.ResolvedUnitCost, error)", + "line": 272 + }, + { + "kind": "func", + "name": "resolveDimension", + "signature": "func resolveDimension(staticValue, groupByKey string, groupByValues map[string]string) (string, error)", + "line": 334 + } + ], + "line_count": 355 + }, + "openmeter/cost/adapter/compute.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "costRowAccumulator", + "signature": "type costRowAccumulator struct", + "line": 25 + }, + { + "kind": "func", + "name": "addUsage", + "signature": "func (acc *costRowAccumulator) addUsage(usage alpacadecimal.Decimal, resolved *cost.ResolvedUnitCost, detail string)", + "line": 34 + }, + { + "kind": "func", + "name": "finalize", + "signature": "func (acc *costRowAccumulator) finalize() cost.CostQueryRow", + "line": 49 + }, + { + "kind": "func", + "name": "computeCostRows", + "signature": "func computeCostRows(rows []meter.MeterQueryRow, internalGroupByKeys []string, resolver costResolverFunc) ([]cost.CostQueryRow, currencyx.Code, error)", + "line": 66 + }, + { + "kind": "func", + "name": "buildDirectCostRow", + "signature": "func buildDirectCostRow(row meter.MeterQueryRow, usage alpacadecimal.Decimal, resolved *cost.ResolvedUnitCost, detail string) cost.CostQueryRow", + "line": 166 + }, + { + "kind": "func", + "name": "filterGroupBy", + "signature": "func filterGroupBy(groupBy map[string]*string, excludeKeys []string) (filtered map[string]*string, values map[string]string)", + "line": 191 + }, + { + "kind": "func", + "name": "costPerTokenForType", + "signature": "func costPerTokenForType(pricing llmcost.ModelPricing, tokenType feature.LLMTokenType) (alpacadecimal.Decimal, error)", + "line": 215 + }, + { + "kind": "func", + "name": "buildCacheKey", + "signature": "func buildCacheKey(groupByValues map[string]string) string", + "line": 242 + } + ], + "line_count": 256 + }, + "openmeter/cost/adapter/compute_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "strPtr", + "signature": "func strPtr(s string) *string", + "line": 22 + }, + { + "kind": "func", + "name": "makeResolver", + "signature": "func makeResolver(prices map[string]*cost.ResolvedUnitCost) costResolverFunc", + "line": 24 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(f float64) alpacadecimal.Decimal", + "line": 34 + }, + { + "kind": "func", + "name": "TestComputeCostRows", + "signature": "func TestComputeCostRows(t *testing.T)", + "line": 38 + }, + { + "kind": "func", + "name": "TestCostPerTokenForType", + "signature": "func TestCostPerTokenForType(t *testing.T)", + "line": 567 + }, + { + "kind": "func", + "name": "TestBuildCacheKey", + "signature": "func TestBuildCacheKey(t *testing.T)", + "line": 650 + }, + { + "kind": "func", + "name": "TestGetLLMPricesEmptyProvider", + "signature": "func TestGetLLMPricesEmptyProvider(t *testing.T)", + "line": 696 + }, + { + "kind": "func", + "name": "TestUnknownTokenTypeSurfacesAsDetail", + "signature": "func TestUnknownTokenTypeSurfacesAsDetail(t *testing.T)", + "line": 792 + }, + { + "kind": "struct", + "name": "mockLLMCostService", + "signature": "type mockLLMCostService struct", + "line": 886 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (m *mockLLMCostService) ResolvePrice(_ context.Context, input llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 890 + }, + { + "kind": "struct", + "name": "mockLLMCostServiceWithPrices", + "signature": "type mockLLMCostServiceWithPrices struct", + "line": 895 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (m *mockLLMCostServiceWithPrices) ResolvePrice(_ context.Context, input llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 899 + }, + { + "kind": "func", + "name": "TestResolveDimension", + "signature": "func TestResolveDimension(t *testing.T)", + "line": 912 + } + ], + "line_count": 953 + }, + "openmeter/cost/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 16 + }, + { + "kind": "struct", + "name": "QueryFeatureCostInput", + "signature": "type QueryFeatureCostInput struct", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i QueryFeatureCostInput) Validate() error", + "line": 27 + }, + { + "kind": "struct", + "name": "CostQueryRow", + "signature": "type CostQueryRow struct", + "line": 42 + }, + { + "kind": "struct", + "name": "CostQueryResult", + "signature": "type CostQueryResult struct", + "line": 55 + }, + { + "kind": "struct", + "name": "ResolvedUnitCost", + "signature": "type ResolvedUnitCost struct", + "line": 61 + } + ], + "line_count": 66 + }, + "openmeter/cost/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/cost\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 12 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 28 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (s *Service) QueryFeatureCost(ctx context.Context, input cost.QueryFeatureCostInput) (*cost.CostQueryResult, error)", + "line": 38 + } + ], + "line_count": 44 + }, + "openmeter/credit/adapter/balance_snapshot.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "struct", + "name": "balanceSnapshotRepo", + "signature": "type balanceSnapshotRepo struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewPostgresBalanceSnapshotRepo", + "signature": "func NewPostgresBalanceSnapshotRepo(db *db.Client) *balanceSnapshotRepo", + "line": 22 + }, + { + "kind": "func", + "name": "InvalidateAfter", + "signature": "func (b *balanceSnapshotRepo) InvalidateAfter(ctx context.Context, owner models.NamespacedID, at time.Time) error", + "line": 28 + }, + { + "kind": "func", + "name": "GetLatestValidAt", + "signature": "func (b *balanceSnapshotRepo) GetLatestValidAt(ctx context.Context, owner models.NamespacedID, at time.Time) (balance.Snapshot, error)", + "line": 37 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (b *balanceSnapshotRepo) Save(ctx context.Context, owner models.NamespacedID, balances []balance.Snapshot) error", + "line": 60 + }, + { + "kind": "func", + "name": "mapBalanceSnapshotEntity", + "signature": "func mapBalanceSnapshotEntity(entity *db.BalanceSnapshot) balance.Snapshot", + "line": 79 + } + ], + "line_count": 89 + }, + "openmeter/credit/adapter/grant.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "struct", + "name": "grantDBADapter", + "signature": "type grantDBADapter struct", + "line": 25 + }, + { + "kind": "func", + "name": "NewPostgresGrantRepo", + "signature": "func NewPostgresGrantRepo(db *db.Client) grant.Repo", + "line": 29 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (g *grantDBADapter) CreateGrant(ctx context.Context, grant grant.RepoCreateInput) (*grant.Grant, error)", + "line": 35 + }, + { + "kind": "func", + "name": "DeleteOwnerGrants", + "signature": "func (g *grantDBADapter) DeleteOwnerGrants(ctx context.Context, ownerID models.NamespacedID) error", + "line": 66 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (g *grantDBADapter) VoidGrant(ctx context.Context, grantID models.NamespacedID, at time.Time) error", + "line": 75 + }, + { + "kind": "func", + "name": "ListGrants", + "signature": "func (g *grantDBADapter) ListGrants(ctx context.Context, params grant.ListParams) (pagination.Result[grant.Grant], error)", + "line": 83 + }, + { + "kind": "func", + "name": "ListActiveGrantsBetween", + "signature": "func (g *grantDBADapter) ListActiveGrantsBetween(ctx context.Context, owner models.NamespacedID, from, to time.Time) ([]grant.Grant, error)", + "line": 211 + }, + { + "kind": "func", + "name": "GetGrant", + "signature": "func (g *grantDBADapter) GetGrant(ctx context.Context, grantID models.NamespacedID) (grant.Grant, error)", + "line": 240 + }, + { + "kind": "func", + "name": "mapGrantEntity", + "signature": "func mapGrantEntity(entity *db.Grant) grant.Grant", + "line": 252 + } + ], + "line_count": 288 + }, + "openmeter/credit/adapter/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Tx", + "signature": "func (e *grantDBADapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 17 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (e *grantDBADapter) WithTx(ctx context.Context, tx *entutils.TxDriver) grant.Repo", + "line": 27 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (e *grantDBADapter) Self() grant.Repo", + "line": 32 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (e *balanceSnapshotRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 36 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (e *balanceSnapshotRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *balanceSnapshotRepo", + "line": 46 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (e *balanceSnapshotRepo) Self() *balanceSnapshotRepo", + "line": 51 + } + ], + "line_count": 53 + }, + "openmeter/credit/balance.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ResetUsageForOwnerParams", + "signature": "type ResetUsageForOwnerParams struct", + "line": 21 + }, + { + "kind": "interface", + "name": "BalanceConnector", + "signature": "type BalanceConnector interface", + "line": 28 + }, + { + "kind": "func", + "name": "getBalanceSinceSnapshot", + "signature": "func (m *connector) getBalanceSinceSnapshot(ctx context.Context, ownerID models.NamespacedID, snap balance.Snapshot, at time.Time) (engine.RunResult, error)", + "line": 44 + }, + { + "kind": "func", + "name": "GetBalanceAt", + "signature": "func (m *connector) GetBalanceAt(ctx context.Context, ownerID models.NamespacedID, at time.Time) (engine.RunResult, error)", + "line": 124 + }, + { + "kind": "func", + "name": "GetBalanceForPeriod", + "signature": "func (m *connector) GetBalanceForPeriod(ctx context.Context, ownerID models.NamespacedID, period timeutil.ClosedPeriod) (engine.RunResult, error)", + "line": 147 + }, + { + "kind": "func", + "name": "ResetUsageForOwner", + "signature": "func (m *connector) ResetUsageForOwner(ctx context.Context, ownerID models.NamespacedID, params ResetUsageForOwnerParams) (*balance.Snapshot, error)", + "line": 214 + } + ], + "line_count": 345 + }, + "openmeter/credit/balance/balance.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"\n)", + "symbols": [ + { + "kind": "func", + "name": "NewStartingMap", + "signature": "func NewStartingMap(grants []grant.Grant, at time.Time) Map", + "line": 9 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (g Map) Clone() Map", + "line": 24 + }, + { + "kind": "func", + "name": "Burn", + "signature": "func (g Map) Burn(grantID string, amount float64)", + "line": 32 + }, + { + "kind": "func", + "name": "Set", + "signature": "func (g Map) Set(grantID string, amount float64)", + "line": 37 + }, + { + "kind": "func", + "name": "Balance", + "signature": "func (g Map) Balance() float64", + "line": 42 + }, + { + "kind": "func", + "name": "ExactlyForGrants", + "signature": "func (g Map) ExactlyForGrants(grants []grant.Grant) bool", + "line": 53 + }, + { + "kind": "struct", + "name": "SnapshottedUsage", + "signature": "type SnapshottedUsage struct", + "line": 71 + }, + { + "kind": "func", + "name": "IsZero", + "signature": "func (s SnapshottedUsage) IsZero() bool", + "line": 76 + }, + { + "kind": "struct", + "name": "Snapshot", + "signature": "type Snapshot struct", + "line": 80 + }, + { + "kind": "func", + "name": "Balance", + "signature": "func (g Snapshot) Balance() float64", + "line": 87 + } + ], + "line_count": 89 + }, + "openmeter/credit/balance/balance_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\tbalance \"github.com/openmeterio/openmeter/openmeter/credit/balance\"", + "symbols": [ + { + "kind": "func", + "name": "TestGrantBalanceMap", + "signature": "func TestGrantBalanceMap(t *testing.T)", + "line": 12 + } + ], + "line_count": 60 + }, + "openmeter/credit/balance/repository.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "SnapshotRepo", + "signature": "type SnapshotRepo interface", + "line": 11 + }, + { + "kind": "struct", + "name": "NoSavedBalanceForOwnerError", + "signature": "type NoSavedBalanceForOwnerError struct", + "line": 19 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e NoSavedBalanceForOwnerError) Error() string", + "line": 24 + } + ], + "line_count": 26 + }, + "openmeter/credit/balance/service.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"", + "symbols": [ + { + "kind": "interface", + "name": "SnapshotService", + "signature": "type SnapshotService interface", + "line": 13 + }, + { + "kind": "struct", + "name": "SnapshotServiceConfig", + "signature": "type SnapshotServiceConfig struct", + "line": 21 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 27 + }, + { + "kind": "func", + "name": "NewSnapshotService", + "signature": "func NewSnapshotService(conf SnapshotServiceConfig) SnapshotService", + "line": 32 + }, + { + "kind": "func", + "name": "service", + "signature": "func (s *service) service()", + "line": 51 + }, + { + "kind": "func", + "name": "InvalidateAfter", + "signature": "func (s *service) InvalidateAfter(ctx context.Context, owner models.NamespacedID, at time.Time) error", + "line": 53 + }, + { + "kind": "func", + "name": "GetLatestValidAt", + "signature": "func (s *service) GetLatestValidAt(ctx context.Context, owner models.NamespacedID, at time.Time) (Snapshot, error)", + "line": 57 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (s *service) Save(ctx context.Context, owner models.NamespacedID, balances []Snapshot) error", + "line": 87 + } + ], + "line_count": 89 + }, + "openmeter/credit/balance/service_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "MockSnapshotRepo", + "signature": "type MockSnapshotRepo struct", + "line": 21 + }, + { + "kind": "func", + "name": "NewMockSnapshotRepo", + "signature": "func NewMockSnapshotRepo() *MockSnapshotRepo", + "line": 25 + }, + { + "kind": "func", + "name": "InvalidateAfter", + "signature": "func (m *MockSnapshotRepo) InvalidateAfter(ctx context.Context, owner models.NamespacedID, at time.Time) error", + "line": 31 + }, + { + "kind": "func", + "name": "GetLatestValidAt", + "signature": "func (m *MockSnapshotRepo) GetLatestValidAt(ctx context.Context, owner models.NamespacedID, at time.Time) (balance.Snapshot, error)", + "line": 35 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (m *MockSnapshotRepo) Save(ctx context.Context, owner models.NamespacedID, balances []balance.Snapshot) error", + "line": 47 + }, + { + "kind": "struct", + "name": "MockOwnerConnector", + "signature": "type MockOwnerConnector struct", + "line": 56 + }, + { + "kind": "func", + "name": "NewMockOwnerConnector", + "signature": "func NewMockOwnerConnector(usagePeriodStartAt time.Time, meterSlug string) *MockOwnerConnector", + "line": 61 + }, + { + "kind": "func", + "name": "DescribeOwner", + "signature": "func (m *MockOwnerConnector) DescribeOwner(ctx context.Context, id models.NamespacedID) (grant.Owner, error)", + "line": 68 + }, + { + "kind": "func", + "name": "GetResetTimelineInclusive", + "signature": "func (m *MockOwnerConnector) GetResetTimelineInclusive(ctx context.Context, id models.NamespacedID, period timeutil.ClosedPeriod) (timeutil.SimpleTimeline, error)", + "line": 81 + }, + { + "kind": "func", + "name": "GetUsagePeriodStartAt", + "signature": "func (m *MockOwnerConnector) GetUsagePeriodStartAt(ctx context.Context, id models.NamespacedID, at time.Time) (time.Time, error)", + "line": 85 + }, + { + "kind": "func", + "name": "GetStartOfMeasurement", + "signature": "func (m *MockOwnerConnector) GetStartOfMeasurement(ctx context.Context, id models.NamespacedID) (time.Time, error)", + "line": 89 + }, + { + "kind": "func", + "name": "EndCurrentUsagePeriod", + "signature": "func (m *MockOwnerConnector) EndCurrentUsagePeriod(ctx context.Context, id models.NamespacedID, params grant.EndCurrentUsagePeriodParams) error", + "line": 93 + }, + { + "kind": "func", + "name": "LockOwnerForTx", + "signature": "func (m *MockOwnerConnector) LockOwnerForTx(ctx context.Context, id models.NamespacedID, wait bool) error", + "line": 97 + }, + { + "kind": "func", + "name": "TestGetLatestValidAt", + "signature": "func TestGetLatestValidAt(t *testing.T)", + "line": 101 + } + ], + "line_count": 215 + }, + "openmeter/credit/balance/usage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "UsageQuerier", + "signature": "type UsageQuerier interface", + "line": 18 + }, + { + "kind": "struct", + "name": "UsageQuerierConfig", + "signature": "type UsageQuerierConfig struct", + "line": 22 + }, + { + "kind": "struct", + "name": "usageQuerier", + "signature": "type usageQuerier struct", + "line": 29 + }, + { + "kind": "func", + "name": "NewUsageQuerier", + "signature": "func NewUsageQuerier(conf UsageQuerierConfig) UsageQuerier", + "line": 33 + }, + { + "kind": "func", + "name": "QueryUsage", + "signature": "func (u *usageQuerier) QueryUsage(ctx context.Context, ownerID models.NamespacedID, period timeutil.ClosedPeriod) (float64, error)", + "line": 41 + }, + { + "kind": "func", + "name": "getValueFromRows", + "signature": "func (u *usageQuerier) getValueFromRows(rows []meter.MeterQueryRow) (float64, error)", + "line": 127 + } + ], + "line_count": 136 + }, + "openmeter/credit/connector.go": { + "header": "\t\"log/slog\"\n\t\"time\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "interface", + "name": "CreditConnector", + "signature": "type CreditConnector interface", + "line": 17 + }, + { + "kind": "struct", + "name": "connector", + "signature": "type connector struct", + "line": 22 + }, + { + "kind": "struct", + "name": "CreditConnectorConfig", + "signature": "type CreditConnectorConfig struct", + "line": 26 + }, + { + "kind": "func", + "name": "NewCreditConnector", + "signature": "func NewCreditConnector(\n\tcfg CreditConnectorConfig,\n) CreditConnector", + "line": 41 + }, + { + "kind": "func", + "name": "getSnapshotNotAfter", + "signature": "func (c *connector) getSnapshotNotAfter(lastResetAt, at time.Time) time.Time", + "line": 52 + } + ], + "line_count": 60 + }, + "openmeter/credit/driver/grant.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "GrantHandler", + "signature": "type GrantHandler interface", + "line": 28 + }, + { + "kind": "struct", + "name": "grantHandler", + "signature": "type grantHandler struct", + "line": 34 + }, + { + "kind": "func", + "name": "NewGrantHandler", + "signature": "func NewGrantHandler(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tgrantConnector credit.GrantConnector,\n\tgrantRepo grant.Repo,\n\tcustomerService customer.Service,\n\toptions ...httptransport.HandlerOption,\n) GrantHandler", + "line": 42 + }, + { + "kind": "func", + "name": "ListGrants", + "signature": "func (h *grantHandler) ListGrants() ListGrantsHandler", + "line": 69 + }, + { + "kind": "struct", + "name": "VoidGrantHandlerRequest", + "signature": "type VoidGrantHandlerRequest struct", + "line": 156 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (h *grantHandler) VoidGrant() VoidGrantHandler", + "line": 169 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *grantHandler) resolveNamespace(ctx context.Context) (string, error)", + "line": 217 + }, + { + "kind": "func", + "name": "ListGrantsV2", + "signature": "func (h *grantHandler) ListGrantsV2() ListGrantsV2Handler", + "line": 238 + } + ], + "line_count": 327 + }, + "openmeter/credit/engine/burnphase.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"", + "symbols": [ + { + "kind": "struct", + "name": "burnPhase", + "signature": "type burnPhase struct", + "line": 11 + }, + { + "kind": "struct", + "name": "phasePlan", + "signature": "type phasePlan struct", + "line": 20 + }, + { + "kind": "func", + "name": "getPhases", + "signature": "func (e *engine) getPhases(grants []grant.Grant, period timeutil.ClosedPeriod, recurrenceEndBoundaryBehavior timeutil.Boundary) (phasePlan, error)", + "line": 34 + } + ], + "line_count": 160 + }, + "openmeter/credit/engine/engine.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "RunParams", + "signature": "type RunParams struct", + "line": 16 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (p RunParams) Clone() RunParams", + "line": 32 + }, + { + "kind": "struct", + "name": "RunResult", + "signature": "type RunResult struct", + "line": 50 + }, + { + "kind": "func", + "name": "TotalAvailableGrantAmountAtLastPeriod", + "signature": "func (r RunResult) TotalAvailableGrantAmountAtLastPeriod() float64", + "line": 61 + }, + { + "kind": "interface", + "name": "Engine", + "signature": "type Engine interface", + "line": 69 + }, + { + "kind": "struct", + "name": "EngineConfig", + "signature": "type EngineConfig struct", + "line": 80 + }, + { + "kind": "func", + "name": "NewEngine", + "signature": "func NewEngine(conf EngineConfig) Engine", + "line": 84 + }, + { + "kind": "struct", + "name": "engine", + "signature": "type engine struct", + "line": 91 + } + ], + "line_count": 96 + }, + "openmeter/credit/engine/engine_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "func", + "name": "Test_Fuzzing", + "signature": "func Test_Fuzzing(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "makeGrant", + "signature": "func makeGrant(grant grant.Grant) grant.Grant", + "line": 392 + } + ], + "line_count": 397 + }, + "openmeter/credit/engine/grant.go": { + "header": "\t\"slices\"\n\t\"sort\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "getGrantActivityChanges", + "signature": "func (e *engine) getGrantActivityChanges(grants []grant.Grant, period timeutil.ClosedPeriod) []time.Time", + "line": 17 + }, + { + "kind": "func", + "name": "getGrantRecurrenceTimes", + "signature": "func (e *engine) getGrantRecurrenceTimes(grants []grant.Grant, period timeutil.ClosedPeriod, endBoundaryBehavior timeutil.Boundary) ([]struct", + "line": 66 + }, + { + "kind": "func", + "name": "filterRelevantGrants", + "signature": "func (e *engine) filterRelevantGrants(grants []grant.Grant, bm balance.Map, period timeutil.ClosedPeriod) []grant.Grant", + "line": 157 + }, + { + "kind": "func", + "name": "PrioritizeGrants", + "signature": "func PrioritizeGrants(grants []grant.Grant) error", + "line": 176 + } + ], + "line_count": 229 + }, + "openmeter/credit/engine/history.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"", + "symbols": [ + { + "kind": "struct", + "name": "SegmentTerminationReason", + "signature": "type SegmentTerminationReason struct", + "line": 15 + }, + { + "kind": "struct", + "name": "GrantUsage", + "signature": "type GrantUsage struct", + "line": 40 + }, + { + "kind": "struct", + "name": "GrantBurnDownHistorySegment", + "signature": "type GrantBurnDownHistorySegment struct", + "line": 54 + }, + { + "kind": "func", + "name": "ApplyUsage", + "signature": "func (s GrantBurnDownHistorySegment) ApplyUsage() balance.Map", + "line": 65 + }, + { + "kind": "func", + "name": "NewGrantBurnDownHistory", + "signature": "func NewGrantBurnDownHistory(segments []GrantBurnDownHistorySegment, usageAtStart balance.SnapshottedUsage) (GrantBurnDownHistory, error)", + "line": 73 + }, + { + "kind": "struct", + "name": "GrantBurnDownHistory", + "signature": "type GrantBurnDownHistory struct", + "line": 96 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (g GrantBurnDownHistory) MarshalJSON() ([]byte, error)", + "line": 101 + }, + { + "kind": "func", + "name": "GetSnapshotAtStartOfSegment", + "signature": "func (g *GrantBurnDownHistory) GetSnapshotAtStartOfSegment(segmentIndex int) (balance.Snapshot, error)", + "line": 105 + }, + { + "kind": "func", + "name": "GetUsageInPeriodUntilSegment", + "signature": "func (g *GrantBurnDownHistory) GetUsageInPeriodUntilSegment(segmentIndex int) (balance.SnapshottedUsage, error)", + "line": 129 + }, + { + "kind": "func", + "name": "Segments", + "signature": "func (g *GrantBurnDownHistory) Segments() []GrantBurnDownHistorySegment", + "line": 162 + }, + { + "kind": "func", + "name": "ChunkByResets", + "signature": "func (g GrantBurnDownHistory) ChunkByResets() []GrantBurnDownHistory", + "line": 166 + }, + { + "kind": "func", + "name": "TotalGrantUsage", + "signature": "func (g GrantBurnDownHistory) TotalGrantUsage() alpacadecimal.Decimal", + "line": 195 + }, + { + "kind": "func", + "name": "usageAtReset", + "signature": "func usageAtReset(at time.Time) balance.SnapshottedUsage", + "line": 207 + }, + { + "kind": "func", + "name": "TotalUsageInHistory", + "signature": "func (g *GrantBurnDownHistory) TotalUsageInHistory() float64", + "line": 214 + }, + { + "kind": "func", + "name": "Overage", + "signature": "func (g *GrantBurnDownHistory) Overage() float64", + "line": 222 + }, + { + "kind": "func", + "name": "GetPeriods", + "signature": "func (g *GrantBurnDownHistory) GetPeriods() []timeutil.ClosedPeriod", + "line": 227 + } + ], + "line_count": 234 + }, + "openmeter/credit/engine/history_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestGrantBurnDownHistory_ChunkByResets", + "signature": "func TestGrantBurnDownHistory_ChunkByResets(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "assertChunkUsageAtStart", + "signature": "func assertChunkUsageAtStart(t *testing.T, history engine.GrantBurnDownHistory, expected balance.SnapshottedUsage)", + "line": 112 + } + ], + "line_count": 118 + }, + "openmeter/credit/engine/reset.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "reset", + "signature": "func (e *engine) reset(grants []grant.Grant, snap balance.Snapshot, behavior grant.ResetBehavior, at time.Time) (balance.Snapshot, error)", + "line": 14 + } + ], + "line_count": 57 + }, + "openmeter/credit/engine/reset_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestReset", + "signature": "func TestReset(t *testing.T)", + "line": 21 + } + ], + "line_count": 327 + }, + "openmeter/credit/engine/run.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Run", + "signature": "func (e *engine) Run(ctx context.Context, params RunParams) (RunResult, error)", + "line": 17 + }, + { + "kind": "struct", + "name": "inbetweenRunParams", + "signature": "type inbetweenRunParams struct", + "line": 103 + }, + { + "kind": "func", + "name": "runBetweenResets", + "signature": "func (e *engine) runBetweenResets(ctx context.Context, params inbetweenRunParams) (RunResult, error)", + "line": 122 + }, + { + "kind": "func", + "name": "burnDownGrants", + "signature": "func (m *engine) burnDownGrants(startingBalances balance.Map, prioritized []grant.Grant, usage float64) (balance.Map, []GrantUsage, float64)", + "line": 273 + } + ], + "line_count": 311 + }, + "openmeter/credit/engine/run_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestEngine", + "signature": "func TestEngine(t *testing.T)", + "line": 24 + } + ], + "line_count": 1104 + }, + "openmeter/credit/engine/runresult_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestRunResult_TotalAvailableGrantAmount", + "signature": "func TestRunResult_TotalAvailableGrantAmount(t *testing.T)", + "line": 22 + } + ], + "line_count": 418 + }, + "openmeter/credit/errors.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [], + "line_count": 26 + }, + "openmeter/credit/grant.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "GrantConnector", + "signature": "type GrantConnector interface", + "line": 18 + }, + { + "kind": "struct", + "name": "CreateGrantInput", + "signature": "type CreateGrantInput struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateGrantInput) Validate() error", + "line": 37 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (m *connector) CreateGrant(ctx context.Context, ownerID models.NamespacedID, input CreateGrantInput) (*grant.Grant, error)", + "line": 47 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (m *connector) VoidGrant(ctx context.Context, grantID models.NamespacedID, at *time.Time) error", + "line": 125 + }, + { + "kind": "struct", + "name": "GrantNotFoundError", + "signature": "type GrantNotFoundError struct", + "line": 194 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GrantNotFoundError) Error() string", + "line": 198 + } + ], + "line_count": 200 + }, + "openmeter/credit/grant/events.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"\n\teventmodels \"github.com/openmeterio/openmeter/openmeter/event/models\"", + "symbols": [ + { + "kind": "struct", + "name": "grantEventV1", + "signature": "type grantEventV1 struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g grantEventV1) Validate() error", + "line": 26 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e grantEventV1) EventMetadata() metadata.EventMetadata", + "line": 47 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CreatedEvent) EventName() string", + "line": 66 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CreatedEvent) EventMetadata() metadata.EventMetadata", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CreatedEvent) Validate() error", + "line": 74 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e VoidedEvent) EventName() string", + "line": 90 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e VoidedEvent) EventMetadata() metadata.EventMetadata", + "line": 94 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e VoidedEvent) Validate() error", + "line": 98 + } + ], + "line_count": 100 + }, + "openmeter/credit/grant/events_2.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "grantEventV2", + "signature": "type grantEventV2 struct", + "line": 17 + }, + { + "kind": "struct", + "name": "grantEventV2GrantLiteral", + "signature": "type grantEventV2GrantLiteral struct", + "line": 23 + }, + { + "kind": "func", + "name": "ToDomainGrant", + "signature": "func (g grantEventV2GrantLiteral) ToDomainGrant() Grant", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g grantEventV2GrantLiteral) Validate() error", + "line": 60 + }, + { + "kind": "func", + "name": "mapGrantToV2Literal", + "signature": "func mapGrantToV2Literal(g Grant) grantEventV2GrantLiteral", + "line": 68 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g grantEventV2) Validate() error", + "line": 87 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e grantEventV2) EventMetadata() metadata.EventMetadata", + "line": 103 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CreatedEventV2) EventName() string", + "line": 124 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CreatedEventV2) EventMetadata() metadata.EventMetadata", + "line": 125 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CreatedEventV2) Validate() error", + "line": 128 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e VoidedEventV2) EventName() string", + "line": 142 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e VoidedEventV2) EventMetadata() metadata.EventMetadata", + "line": 143 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e VoidedEventV2) Validate() error", + "line": 144 + }, + { + "kind": "func", + "name": "NewCreatedEventV2FromGrant", + "signature": "func NewCreatedEventV2FromGrant(g Grant, streamingCustomer streaming.Customer) CreatedEventV2", + "line": 146 + }, + { + "kind": "func", + "name": "NewVoidedEventV2FromGrant", + "signature": "func NewVoidedEventV2FromGrant(g Grant, streamingCustomer streaming.Customer, voidedAt time.Time) VoidedEventV2", + "line": 154 + } + ], + "line_count": 164 + }, + "openmeter/credit/grant/expiration.go": { + "header": "type ExpirationPeriod struct {\n\tCount uint32 `json:\"count,omitempty\"`\n\tDuration ExpirationPeriodDuration `json:\"duration,omitempty\"`", + "symbols": [ + { + "kind": "struct", + "name": "ExpirationPeriod", + "signature": "type ExpirationPeriod struct", + "line": 6 + }, + { + "kind": "func", + "name": "GetExpiration", + "signature": "func (c ExpirationPeriod) GetExpiration(t time.Time) time.Time", + "line": 14 + } + ], + "line_count": 53 + }, + "openmeter/credit/grant/grant.go": { + "header": "\t\"math\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "Grant", + "signature": "type Grant struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (g Grant) Validate() error", + "line": 62 + }, + { + "kind": "func", + "name": "GetExpiration", + "signature": "func (g Grant) GetExpiration() *time.Time", + "line": 68 + }, + { + "kind": "func", + "name": "GetEffectivePeriod", + "signature": "func (g Grant) GetEffectivePeriod() timeutil.StartBoundedPeriod", + "line": 76 + }, + { + "kind": "func", + "name": "ActiveAt", + "signature": "func (g Grant) ActiveAt(t time.Time) bool", + "line": 108 + }, + { + "kind": "func", + "name": "RecurrenceBalance", + "signature": "func (g Grant) RecurrenceBalance(currentBalance float64) float64", + "line": 113 + }, + { + "kind": "func", + "name": "RolloverBalance", + "signature": "func (g Grant) RolloverBalance(endingBalance float64) float64", + "line": 124 + }, + { + "kind": "func", + "name": "GetNamespacedID", + "signature": "func (g Grant) GetNamespacedID() models.NamespacedID", + "line": 130 + }, + { + "kind": "func", + "name": "GetNamespacedOwner", + "signature": "func (g Grant) GetNamespacedOwner() models.NamespacedID", + "line": 137 + } + ], + "line_count": 142 + }, + "openmeter/credit/grant/grant_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestEffectivePeriod", + "signature": "func TestEffectivePeriod(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestIsActiveAt", + "signature": "func TestIsActiveAt(t *testing.T)", + "line": 185 + } + ], + "line_count": 263 + }, + "openmeter/credit/grant/owner_connector.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Owner", + "signature": "type Owner struct", + "line": 14 + }, + { + "kind": "struct", + "name": "EndCurrentUsagePeriodParams", + "signature": "type EndCurrentUsagePeriodParams struct", + "line": 22 + }, + { + "kind": "struct", + "name": "OwnerMeter", + "signature": "type OwnerMeter struct", + "line": 27 + }, + { + "kind": "struct", + "name": "ResetBehavior", + "signature": "type ResetBehavior struct", + "line": 32 + }, + { + "kind": "interface", + "name": "OwnerConnector", + "signature": "type OwnerConnector interface", + "line": 36 + }, + { + "kind": "struct", + "name": "OwnerNotFoundError", + "signature": "type OwnerNotFoundError struct", + "line": 51 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e OwnerNotFoundError) Error() string", + "line": 56 + }, + { + "kind": "func", + "name": "NewOwnerNotFoundError", + "signature": "func NewOwnerNotFoundError(owner models.NamespacedID, attemptedOwner string) error", + "line": 60 + } + ], + "line_count": 65 + }, + "openmeter/credit/grant/repo.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (f OrderBy) Values() []OrderBy", + "line": 26 + }, + { + "kind": "func", + "name": "StrValues", + "signature": "func (f OrderBy) StrValues() []string", + "line": 36 + }, + { + "kind": "struct", + "name": "ListParams", + "signature": "type ListParams struct", + "line": 42 + }, + { + "kind": "struct", + "name": "RepoCreateInput", + "signature": "type RepoCreateInput struct", + "line": 58 + }, + { + "kind": "interface", + "name": "Repo", + "signature": "type Repo interface", + "line": 73 + } + ], + "line_count": 87 + }, + "openmeter/credit/helper.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetLastValidSnapshotAt", + "signature": "func (m *connector) GetLastValidSnapshotAt(ctx context.Context, owner models.NamespacedID, at time.Time) (balance.Snapshot, error)", + "line": 26 + }, + { + "kind": "func", + "name": "runEngineInSpan", + "signature": "func (m *connector) runEngineInSpan(ctx context.Context, eng engine.Engine, runParams engine.RunParams) (engine.RunResult, error)", + "line": 59 + }, + { + "kind": "struct", + "name": "buildEngineForOwnerParams", + "signature": "type buildEngineForOwnerParams struct", + "line": 79 + }, + { + "kind": "func", + "name": "buildEngineForOwner", + "signature": "func (m *connector) buildEngineForOwner(ctx context.Context, params buildEngineForOwnerParams) (engine.Engine, error)", + "line": 90 + }, + { + "kind": "struct", + "name": "snapshotParams", + "signature": "type snapshotParams struct", + "line": 164 + }, + { + "kind": "func", + "name": "snapshotEngineResult", + "signature": "func (m *connector) snapshotEngineResult(ctx context.Context, snapParams snapshotParams, runRes engine.RunResult) error", + "line": 176 + }, + { + "kind": "func", + "name": "saveSnapshot", + "signature": "func (m *connector) saveSnapshot(ctx context.Context, params snapshotParams, snap balance.Snapshot) (balance.Snapshot, error)", + "line": 218 + }, + { + "kind": "func", + "name": "populateBalanceSnapshotWithMissingGrantsActiveAt", + "signature": "func (m *connector) populateBalanceSnapshotWithMissingGrantsActiveAt(snapshot *balance.Snapshot, grants []grant.Grant, at time.Time)", + "line": 241 + }, + { + "kind": "func", + "name": "removeInactiveGrantsFromSnapshotAt", + "signature": "func (m *connector) removeInactiveGrantsFromSnapshotAt(snapshot *balance.Snapshot, grants []grant.Grant, at time.Time) error", + "line": 254 + }, + { + "kind": "func", + "name": "SortedPeriodsFromDedupedTimes", + "signature": "func SortedPeriodsFromDedupedTimes(ts []time.Time) []timeutil.ClosedPeriod", + "line": 278 + } + ], + "line_count": 299 + }, + "openmeter/credit/hook/entitlement_hook.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "struct", + "name": "entitlementHook", + "signature": "type entitlementHook struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewEntitlementHook", + "signature": "func NewEntitlementHook(\n\tgrantRepo grant.Repo,\n) EntitlementHook", + "line": 23 + }, + { + "kind": "func", + "name": "PreDelete", + "signature": "func (h *entitlementHook) PreDelete(ctx context.Context, ent *entitlement.Entitlement) error", + "line": 31 + } + ], + "line_count": 42 + }, + "openmeter/credit/trace.go": { + "header": "\t\"strings\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "ctrace", + "signature": "type ctrace struct", + "line": 16 + }, + { + "kind": "func", + "name": "WithOwner", + "signature": "func (c ctrace) WithOwner(owner models.NamespacedID) trace.SpanStartEventOption", + "line": 20 + }, + { + "kind": "func", + "name": "WithPeriod", + "signature": "func (c ctrace) WithPeriod(period timeutil.ClosedPeriod) trace.SpanStartEventOption", + "line": 27 + }, + { + "kind": "func", + "name": "WithEngineParams", + "signature": "func (c ctrace) WithEngineParams(params engine.RunParams) trace.SpanStartEventOption", + "line": 34 + } + ], + "line_count": 40 + }, + "openmeter/currencies/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 10 + }, + { + "kind": "interface", + "name": "CurrenciesAdapter", + "signature": "type CurrenciesAdapter interface", + "line": 15 + } + ], + "line_count": 20 + }, + "openmeter/currencies/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (currencies.Adapter, error)", + "line": 28 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 40 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 46 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 56 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 64 + } + ], + "line_count": 66 + }, + "openmeter/currencies/adapter/currencies.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "mapCurrencyFromDB", + "signature": "func mapCurrencyFromDB(c *entdb.CustomCurrency) currencies.Currency", + "line": 25 + }, + { + "kind": "func", + "name": "mapCostBasisFromDB", + "signature": "func mapCostBasisFromDB(c *entdb.CurrencyCostBasis) currencies.CostBasis", + "line": 35 + }, + { + "kind": "func", + "name": "ListCustomCurrencies", + "signature": "func (a *adapter) ListCustomCurrencies(ctx context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error)", + "line": 46 + }, + { + "kind": "func", + "name": "CreateCurrency", + "signature": "func (a *adapter) CreateCurrency(ctx context.Context, params currencies.CreateCurrencyInput) (currencies.Currency, error)", + "line": 88 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (a *adapter) CreateCostBasis(ctx context.Context, params currencies.CreateCostBasisInput) (currencies.CostBasis, error)", + "line": 107 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (a *adapter) ListCostBases(ctx context.Context, params currencies.ListCostBasesInput) (pagination.Result[currencies.CostBasis], error)", + "line": 127 + } + ], + "line_count": 147 + }, + "openmeter/currencies/models.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Currency", + "signature": "type Currency struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o OrderBy) Validate() error", + "line": 32 + }, + { + "kind": "struct", + "name": "ListCurrenciesInput", + "signature": "type ListCurrenciesInput struct", + "line": 42 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCurrenciesInput) Validate() error", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t CurrencyType) Validate() error", + "line": 85 + }, + { + "kind": "struct", + "name": "CreateCurrencyInput", + "signature": "type CreateCurrencyInput struct", + "line": 101 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCurrencyInput) Validate() error", + "line": 108 + }, + { + "kind": "struct", + "name": "CostBasis", + "signature": "type CostBasis struct", + "line": 130 + }, + { + "kind": "struct", + "name": "CreateCostBasisInput", + "signature": "type CreateCostBasisInput struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCostBasisInput) Validate() error", + "line": 149 + }, + { + "kind": "struct", + "name": "ListCostBasesInput", + "signature": "type ListCostBasesInput struct", + "line": 171 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCostBasesInput) Validate() error", + "line": 181 + } + ], + "line_count": 193 + }, + "openmeter/currencies/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "CurrencyService", + "signature": "type CurrencyService interface", + "line": 9 + } + ], + "line_count": 14 + }, + "openmeter/currencies/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(adapter currencies.Adapter) *Service", + "line": 26 + }, + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (s *Service) ListCurrencies(ctx context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error)", + "line": 32 + }, + { + "kind": "func", + "name": "CreateCurrency", + "signature": "func (s *Service) CreateCurrency(ctx context.Context, params currencies.CreateCurrencyInput) (currencies.Currency, error)", + "line": 122 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (s *Service) CreateCostBasis(ctx context.Context, params currencies.CreateCostBasisInput) (currencies.CostBasis, error)", + "line": 132 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (s *Service) ListCostBases(ctx context.Context, params currencies.ListCostBasesInput) (pagination.Result[currencies.CostBasis], error)", + "line": 157 + } + ], + "line_count": 165 + }, + "openmeter/currencies/service/service_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "noopDriver", + "signature": "type noopDriver struct", + "line": 19 + }, + { + "kind": "struct", + "name": "fakeAdapter", + "signature": "type fakeAdapter struct", + "line": 27 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (f *fakeAdapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 31 + }, + { + "kind": "func", + "name": "ListCustomCurrencies", + "signature": "func (f *fakeAdapter) ListCustomCurrencies(_ context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error)", + "line": 35 + }, + { + "kind": "func", + "name": "CreateCurrency", + "signature": "func (f *fakeAdapter) CreateCurrency(_ context.Context, _ currencies.CreateCurrencyInput) (currencies.Currency, error)", + "line": 49 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (f *fakeAdapter) CreateCostBasis(_ context.Context, _ currencies.CreateCostBasisInput) (currencies.CostBasis, error)", + "line": 53 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (f *fakeAdapter) ListCostBases(_ context.Context, _ currencies.ListCostBasesInput) (pagination.Result[currencies.CostBasis], error)", + "line": 57 + }, + { + "kind": "func", + "name": "newTestService", + "signature": "func newTestService(custom []currencies.Currency) *Service", + "line": 62 + }, + { + "kind": "func", + "name": "TestListCurrencies_CombinedPath", + "signature": "func TestListCurrencies_CombinedPath(t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestListCurrencies_CustomOnlyPath", + "signature": "func TestListCurrencies_CustomOnlyPath(t *testing.T)", + "line": 197 + } + ], + "line_count": 223 + }, + "openmeter/customer/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/streaming\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 11 + }, + { + "kind": "interface", + "name": "CustomerAdapter", + "signature": "type CustomerAdapter interface", + "line": 17 + } + ], + "line_count": 25 + }, + "openmeter/customer/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (customer.Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 52 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 62 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/customer/adapter/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (a *adapter) ListCustomers(ctx context.Context, input customer.ListCustomersInput) (pagination.Result[customer.Customer], error)", + "line": 34 + }, + { + "kind": "func", + "name": "ListCustomerUsageAttributions", + "signature": "func (a *adapter) ListCustomerUsageAttributions(ctx context.Context, input customer.ListCustomerUsageAttributionsInput) (pagination.Result[streaming.CustomerUsageAttribution], error)", + "line": 154 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (a *adapter) CreateCustomer(ctx context.Context, input customer.CreateCustomerInput) (*customer.Customer, error)", + "line": 227 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (a *adapter) DeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 358 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (a *adapter) GetCustomer(ctx context.Context, input customer.GetCustomerInput) (*customer.Customer, error)", + "line": 435 + }, + { + "kind": "func", + "name": "GetCustomerByUsageAttribution", + "signature": "func (a *adapter) GetCustomerByUsageAttribution(ctx context.Context, input customer.GetCustomerByUsageAttributionInput) (*customer.Customer, error)", + "line": 504 + }, + { + "kind": "func", + "name": "UpdateCustomer", + "signature": "func (a *adapter) UpdateCustomer(ctx context.Context, input customer.UpdateCustomerInput) (*customer.Customer, error)", + "line": 556 + }, + { + "kind": "func", + "name": "WithSubjects", + "signature": "func WithSubjects(q *entdb.CustomerQuery, at time.Time) *entdb.CustomerQuery", + "line": 752 + }, + { + "kind": "func", + "name": "WithActiveSubscriptions", + "signature": "func WithActiveSubscriptions(query *entdb.CustomerQuery, at time.Time) *entdb.CustomerQuery", + "line": 779 + }, + { + "kind": "func", + "name": "applyActiveSubscriptionFilter", + "signature": "func applyActiveSubscriptionFilter(query *entdb.SubscriptionQuery, at time.Time)", + "line": 786 + }, + { + "kind": "func", + "name": "applyActiveSubscriptionFilterWithPlanKey", + "signature": "func applyActiveSubscriptionFilterWithPlanKey(query *entdb.CustomerQuery, at time.Time, planKey *filter.FilterString)", + "line": 790 + }, + { + "kind": "func", + "name": "activeSubscriptionFilter", + "signature": "func activeSubscriptionFilter(at time.Time) []predicate.Subscription", + "line": 804 + }, + { + "kind": "func", + "name": "buildBillingProfileIDPredicate", + "signature": "func buildBillingProfileIDPredicate(f filter.FilterULID, defaultProfileID string) *predicate.Customer", + "line": 827 + } + ], + "line_count": 870 + }, + "openmeter/customer/adapter/customer_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "fixture", + "signature": "type fixture struct", + "line": 25 + }, + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 35 + }, + { + "kind": "func", + "name": "newTestEnv", + "signature": "func newTestEnv(t *testing.T) *testEnv", + "line": 41 + }, + { + "kind": "func", + "name": "seed", + "signature": "func (e *testEnv) seed(namespace string) fixture", + "line": 71 + }, + { + "kind": "func", + "name": "freezeTime", + "signature": "func freezeTime(t *testing.T, at time.Time) time.Time", + "line": 164 + }, + { + "kind": "func", + "name": "TestDeleteCustomer", + "signature": "func TestDeleteCustomer(t *testing.T)", + "line": 172 + }, + { + "kind": "func", + "name": "assertCustomerDeletedAt", + "signature": "func assertCustomerDeletedAt(t *testing.T, db *entdb.Client, ns, id string, want time.Time)", + "line": 363 + }, + { + "kind": "func", + "name": "assertCustomerActive", + "signature": "func assertCustomerActive(t *testing.T, db *entdb.Client, ns, id string)", + "line": 374 + }, + { + "kind": "func", + "name": "assertSubjectsDeletedAt", + "signature": "func assertSubjectsDeletedAt(t *testing.T, db *entdb.Client, ns, customerID string, keys []string, want time.Time)", + "line": 383 + }, + { + "kind": "func", + "name": "assertSubjectsActive", + "signature": "func assertSubjectsActive(t *testing.T, db *entdb.Client, ns, customerID string, keys []string)", + "line": 400 + }, + { + "kind": "func", + "name": "assertAppCustomerDeletedAt", + "signature": "func assertAppCustomerDeletedAt(t *testing.T, db *entdb.Client, ns, customerID string, want time.Time)", + "line": 415 + }, + { + "kind": "func", + "name": "assertAppCustomerActive", + "signature": "func assertAppCustomerActive(t *testing.T, db *entdb.Client, ns, customerID string)", + "line": 432 + }, + { + "kind": "func", + "name": "assertAppStripeCustomerDeletedAt", + "signature": "func assertAppStripeCustomerDeletedAt(t *testing.T, db *entdb.Client, ns, customerID string, want time.Time)", + "line": 447 + }, + { + "kind": "func", + "name": "assertAppStripeCustomerActive", + "signature": "func assertAppStripeCustomerActive(t *testing.T, db *entdb.Client, ns, customerID string)", + "line": 464 + }, + { + "kind": "func", + "name": "assertAppCustomInvoicingCustomerDeletedAt", + "signature": "func assertAppCustomInvoicingCustomerDeletedAt(t *testing.T, db *entdb.Client, ns, customerID string, want time.Time)", + "line": 479 + }, + { + "kind": "func", + "name": "assertAppCustomInvoicingCustomerActive", + "signature": "func assertAppCustomInvoicingCustomerActive(t *testing.T, db *entdb.Client, ns, customerID string)", + "line": 496 + } + ], + "line_count": 509 + }, + "openmeter/customer/adapter/entitymapping.go": { + "header": "\t\"errors\"\n\t\"slices\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "CustomerFromDBEntity", + "signature": "func CustomerFromDBEntity(e db.Customer, expands customer.Expands) (*customer.Customer, error)", + "line": 15 + }, + { + "kind": "func", + "name": "resolveActiveSubscriptionIDs", + "signature": "func resolveActiveSubscriptionIDs(e db.Customer) ([]string, error)", + "line": 84 + }, + { + "kind": "func", + "name": "subjectKeysFromDBEntity", + "signature": "func subjectKeysFromDBEntity(customerEntity db.Customer) ([]string, error)", + "line": 105 + } + ], + "line_count": 127 + }, + "openmeter/customer/app/app.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "interface", + "name": "App", + "signature": "type App interface", + "line": 12 + }, + { + "kind": "func", + "name": "AsCustomerApp", + "signature": "func AsCustomerApp(customerAppCandidate app.App) (App, error)", + "line": 18 + } + ], + "line_count": 27 + }, + "openmeter/customer/customer.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (e Expands) Validate() error", + "line": 28 + }, + { + "kind": "struct", + "name": "Customer", + "signature": "type Customer struct", + "line": 41 + }, + { + "kind": "func", + "name": "AsCustomerMutate", + "signature": "func (c Customer) AsCustomerMutate() CustomerMutate", + "line": 56 + }, + { + "kind": "func", + "name": "GetUsageAttribution", + "signature": "func (c Customer) GetUsageAttribution() streaming.CustomerUsageAttribution", + "line": 79 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (c Customer) GetID() CustomerID", + "line": 92 + }, + { + "kind": "func", + "name": "IsDeleted", + "signature": "func (c Customer) IsDeleted() bool", + "line": 99 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Customer) Validate() error", + "line": 104 + }, + { + "kind": "struct", + "name": "CustomerMutate", + "signature": "type CustomerMutate struct", + "line": 136 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerMutate) Validate() error", + "line": 148 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CustomerID) Validate() error", + "line": 183 + }, + { + "kind": "struct", + "name": "CustomerKey", + "signature": "type CustomerKey struct", + "line": 196 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CustomerKey) Validate() error", + "line": 201 + }, + { + "kind": "struct", + "name": "CustomerIDOrKey", + "signature": "type CustomerIDOrKey struct", + "line": 214 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CustomerIDOrKey) Validate() error", + "line": 219 + }, + { + "kind": "struct", + "name": "CustomerUsageAttribution", + "signature": "type CustomerUsageAttribution struct", + "line": 236 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerUsageAttribution) Validate() error", + "line": 242 + }, + { + "kind": "func", + "name": "GetFirstSubjectKey", + "signature": "func (c CustomerUsageAttribution) GetFirstSubjectKey() (string, error)", + "line": 257 + }, + { + "kind": "struct", + "name": "GetCustomerByUsageAttributionInput", + "signature": "type GetCustomerByUsageAttributionInput struct", + "line": 269 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetCustomerByUsageAttributionInput) Validate() error", + "line": 279 + }, + { + "kind": "struct", + "name": "ListCustomersInput", + "signature": "type ListCustomersInput struct", + "line": 296 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCustomersInput) Validate() error", + "line": 319 + }, + { + "kind": "struct", + "name": "ListCustomerUsageAttributionsInput", + "signature": "type ListCustomerUsageAttributionsInput struct", + "line": 371 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCustomerUsageAttributionsInput) Validate() error", + "line": 380 + }, + { + "kind": "struct", + "name": "CreateCustomerInput", + "signature": "type CreateCustomerInput struct", + "line": 389 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCustomerInput) Validate() error", + "line": 394 + }, + { + "kind": "struct", + "name": "UpdateCustomerInput", + "signature": "type UpdateCustomerInput struct", + "line": 407 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateCustomerInput) Validate() error", + "line": 412 + }, + { + "kind": "struct", + "name": "GetCustomerInput", + "signature": "type GetCustomerInput struct", + "line": 428 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetCustomerInput) Validate() error", + "line": 437 + }, + { + "kind": "struct", + "name": "GetEntitlementValueInput", + "signature": "type GetEntitlementValueInput struct", + "line": 478 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetEntitlementValueInput) Validate() error", + "line": 483 + } + ], + "line_count": 493 + }, + "openmeter/customer/defaults.go": { + "header": "const (\n\tIncludeDeleted = false\n\tDefaultPageNumber = 1", + "symbols": [], + "line_count": 7 + }, + "openmeter/customer/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "NewUpdateAfterDeleteError", + "signature": "func NewUpdateAfterDeleteError() *UpdateAfterDeleteError", + "line": 14 + }, + { + "kind": "struct", + "name": "UpdateAfterDeleteError", + "signature": "type UpdateAfterDeleteError struct", + "line": 22 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e UpdateAfterDeleteError) Error() string", + "line": 26 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e UpdateAfterDeleteError) Unwrap() error", + "line": 30 + }, + { + "kind": "func", + "name": "NewKeyConflictError", + "signature": "func NewKeyConflictError(namespace, key string) *KeyConflictError", + "line": 35 + }, + { + "kind": "struct", + "name": "KeyConflictError", + "signature": "type KeyConflictError struct", + "line": 44 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e KeyConflictError) Error() string", + "line": 48 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e KeyConflictError) Unwrap() error", + "line": 52 + }, + { + "kind": "func", + "name": "IsKeyConflictError", + "signature": "func IsKeyConflictError(err error) bool", + "line": 56 + }, + { + "kind": "func", + "name": "NewSubjectKeyConflictError", + "signature": "func NewSubjectKeyConflictError(namespace string, subjectKeys []string) *SubjectKeyConflictError", + "line": 67 + }, + { + "kind": "struct", + "name": "SubjectKeyConflictError", + "signature": "type SubjectKeyConflictError struct", + "line": 76 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e SubjectKeyConflictError) Error() string", + "line": 80 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e SubjectKeyConflictError) Unwrap() error", + "line": 84 + }, + { + "kind": "func", + "name": "IsSubjectKeyConflictError", + "signature": "func IsSubjectKeyConflictError(err error) bool", + "line": 88 + }, + { + "kind": "func", + "name": "NewErrDeletingCustomerWithActiveSubscriptions", + "signature": "func NewErrDeletingCustomerWithActiveSubscriptions(subscriptionIDs []string) error", + "line": 105 + } + ], + "line_count": 107 + }, + "openmeter/customer/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewCustomerCreateEvent", + "signature": "func NewCustomerCreateEvent(ctx context.Context, customer *Customer) CustomerCreateEvent", + "line": 22 + }, + { + "kind": "struct", + "name": "CustomerCreateEvent", + "signature": "type CustomerCreateEvent struct", + "line": 30 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CustomerCreateEvent) EventName() string", + "line": 35 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CustomerCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CustomerCreateEvent) Validate() error", + "line": 54 + }, + { + "kind": "func", + "name": "NewCustomerUpdateEvent", + "signature": "func NewCustomerUpdateEvent(ctx context.Context, customer *Customer) CustomerUpdateEvent", + "line": 69 + }, + { + "kind": "struct", + "name": "CustomerUpdateEvent", + "signature": "type CustomerUpdateEvent struct", + "line": 77 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CustomerUpdateEvent) EventName() string", + "line": 82 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CustomerUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CustomerUpdateEvent) Validate() error", + "line": 101 + }, + { + "kind": "func", + "name": "NewCustomerDeleteEvent", + "signature": "func NewCustomerDeleteEvent(ctx context.Context, customer *Customer) CustomerDeleteEvent", + "line": 116 + }, + { + "kind": "struct", + "name": "CustomerDeleteEvent", + "signature": "type CustomerDeleteEvent struct", + "line": 124 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e CustomerDeleteEvent) EventName() string", + "line": 129 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e CustomerDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 137 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e CustomerDeleteEvent) Validate() error", + "line": 148 + } + ], + "line_count": 164 + }, + "openmeter/customer/httpdriver/apimapping.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementValueV2", + "signature": "type EntitlementValueV2 struct", + "line": 17 + }, + { + "kind": "struct", + "name": "CustomerAccessV2", + "signature": "type CustomerAccessV2 struct", + "line": 27 + }, + { + "kind": "func", + "name": "MapCustomerCreate", + "signature": "func MapCustomerCreate(body api.CustomerCreate) customer.CustomerMutate", + "line": 31 + }, + { + "kind": "func", + "name": "MapCustomerReplaceUpdate", + "signature": "func MapCustomerReplaceUpdate(body api.CustomerReplaceUpdate) customer.CustomerMutate", + "line": 57 + }, + { + "kind": "func", + "name": "mapCurrency", + "signature": "func mapCurrency(apiCurrency *string) *currencyx.Code", + "line": 83 + }, + { + "kind": "func", + "name": "MapAddress", + "signature": "func MapAddress(apiAddress *api.Address) *models.Address", + "line": 91 + }, + { + "kind": "func", + "name": "FromMetadata", + "signature": "func FromMetadata(metadata models.Metadata) *api.Metadata", + "line": 112 + }, + { + "kind": "func", + "name": "FromAnnotations", + "signature": "func FromAnnotations(annotations models.Annotations) *api.Annotations", + "line": 127 + }, + { + "kind": "func", + "name": "CustomerToAPI", + "signature": "func CustomerToAPI(c customer.Customer, subscriptions []subscription.Subscription, expand customer.Expands) (api.Customer, error)", + "line": 143 + }, + { + "kind": "func", + "name": "MapAccessToAPI", + "signature": "func MapAccessToAPI(access entitlement.Access) (api.CustomerAccess, error)", + "line": 200 + }, + { + "kind": "func", + "name": "MapEntitlementValueToAPIV2", + "signature": "func MapEntitlementValueToAPIV2(v entitlement.EntitlementValue) (EntitlementValueV2, error)", + "line": 217 + }, + { + "kind": "func", + "name": "MapAccessToAPIV2", + "signature": "func MapAccessToAPIV2(access entitlement.Access) (CustomerAccessV2, error)", + "line": 243 + } + ], + "line_count": 258 + }, + "openmeter/customer/httpdriver/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "containsFilter", + "signature": "func containsFilter(value *string) *filter.FilterString", + "line": 28 + }, + { + "kind": "func", + "name": "eqFilter", + "signature": "func eqFilter(value *string) *filter.FilterString", + "line": 37 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (h *handler) ListCustomers() ListCustomersHandler", + "line": 52 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (h *handler) CreateCustomer() CreateCustomerHandler", + "line": 156 + }, + { + "kind": "func", + "name": "UpdateCustomer", + "signature": "func (h *handler) UpdateCustomer() UpdateCustomerHandler", + "line": 207 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (h *handler) DeleteCustomer() DeleteCustomerHandler", + "line": 280 + }, + { + "kind": "struct", + "name": "GetCustomerParams", + "signature": "type GetCustomerParams struct", + "line": 334 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (h *handler) GetCustomer() GetCustomerHandler", + "line": 340 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementValue", + "signature": "func (h *handler) GetCustomerEntitlementValue() GetCustomerEntitlementValueHandler", + "line": 399 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementValueV2", + "signature": "func (h *handler) GetCustomerEntitlementValueV2() GetCustomerEntitlementValueV2Handler", + "line": 456 + }, + { + "kind": "func", + "name": "GetCustomerAccess", + "signature": "func (h *handler) GetCustomerAccess() GetCustomerAccessHandler", + "line": 527 + }, + { + "kind": "func", + "name": "GetCustomerAccessV2", + "signature": "func (h *handler) GetCustomerAccessV2() GetCustomerAccessV2Handler", + "line": 577 + }, + { + "kind": "func", + "name": "mapCustomerWithSubscriptionsToAPI", + "signature": "func (h *handler) mapCustomerWithSubscriptionsToAPI(ctx context.Context, cust customer.Customer, expand []customer.Expand) (api.Customer, error)", + "line": 628 + } + ], + "line_count": 645 + }, + "openmeter/customer/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 16 + }, + { + "kind": "interface", + "name": "CustomerHandler", + "signature": "type CustomerHandler interface", + "line": 20 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 34 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 42 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice customer.Service,\n\tsubscriptionService subscription.Service,\n\tentitlementService entitlement.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 51 + } + ], + "line_count": 65 + }, + "openmeter/customer/requestvalidator.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"sync\"", + "symbols": [ + { + "kind": "interface", + "name": "RequestValidator", + "signature": "type RequestValidator interface", + "line": 13 + }, + { + "kind": "struct", + "name": "NoopRequestValidator", + "signature": "type NoopRequestValidator struct", + "line": 21 + }, + { + "kind": "interface", + "name": "RequestValidatorRegistry", + "signature": "type RequestValidatorRegistry interface", + "line": 35 + }, + { + "kind": "func", + "name": "NewRequestValidatorRegistry", + "signature": "func NewRequestValidatorRegistry() RequestValidatorRegistry", + "line": 41 + }, + { + "kind": "struct", + "name": "requestValidatorRegistry", + "signature": "type requestValidatorRegistry struct", + "line": 45 + }, + { + "kind": "func", + "name": "Register", + "signature": "func (r *requestValidatorRegistry) Register(v RequestValidator)", + "line": 57 + }, + { + "kind": "func", + "name": "ValidateDeleteCustomer", + "signature": "func (r *requestValidatorRegistry) ValidateDeleteCustomer(ctx context.Context, input DeleteCustomerInput) error", + "line": 64 + }, + { + "kind": "func", + "name": "ValidateCreateCustomer", + "signature": "func (r *requestValidatorRegistry) ValidateCreateCustomer(ctx context.Context, input CreateCustomerInput) error", + "line": 74 + }, + { + "kind": "func", + "name": "ValidateUpdateCustomer", + "signature": "func (r *requestValidatorRegistry) ValidateUpdateCustomer(ctx context.Context, input UpdateCustomerInput) error", + "line": 84 + } + ], + "line_count": 92 + }, + "openmeter/customer/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/streaming\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 11 + }, + { + "kind": "interface", + "name": "RequestValidatorService", + "signature": "type RequestValidatorService interface", + "line": 18 + }, + { + "kind": "interface", + "name": "CustomerService", + "signature": "type CustomerService interface", + "line": 22 + } + ], + "line_count": 30 + }, + "openmeter/customer/service/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (s *Service) ListCustomers(ctx context.Context, input customer.ListCustomersInput) (pagination.Result[customer.Customer], error)", + "line": 17 + }, + { + "kind": "func", + "name": "ListCustomerUsageAttributions", + "signature": "func (s *Service) ListCustomerUsageAttributions(ctx context.Context, input customer.ListCustomerUsageAttributionsInput) (pagination.Result[streaming.CustomerUsageAttribution], error)", + "line": 22 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (s *Service) CreateCustomer(ctx context.Context, input customer.CreateCustomerInput) (*customer.Customer, error)", + "line": 27 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (s *Service) DeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 55 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (s *Service) GetCustomer(ctx context.Context, input customer.GetCustomerInput) (*customer.Customer, error)", + "line": 130 + }, + { + "kind": "func", + "name": "GetCustomerByUsageAttribution", + "signature": "func (s *Service) GetCustomerByUsageAttribution(ctx context.Context, input customer.GetCustomerByUsageAttributionInput) (*customer.Customer, error)", + "line": 135 + }, + { + "kind": "func", + "name": "UpdateCustomer", + "signature": "func (s *Service) UpdateCustomer(ctx context.Context, input customer.UpdateCustomerInput) (*customer.Customer, error)", + "line": 140 + } + ], + "line_count": 186 + }, + "openmeter/customer/service/hooks/entitlementvalidator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "entitlementValidatorHook", + "signature": "type entitlementValidatorHook struct", + "line": 20 + }, + { + "kind": "struct", + "name": "EntitlementValidatorHookConfig", + "signature": "type EntitlementValidatorHookConfig struct", + "line": 26 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementValidatorHookConfig) Validate() error", + "line": 30 + }, + { + "kind": "func", + "name": "NewEntitlementValidatorHook", + "signature": "func NewEntitlementValidatorHook(config EntitlementValidatorHookConfig) (EntitlementValidatorHook, error)", + "line": 38 + }, + { + "kind": "func", + "name": "PreDelete", + "signature": "func (e *entitlementValidatorHook) PreDelete(ctx context.Context, customer *customer.Customer) error", + "line": 48 + } + ], + "line_count": 59 + }, + "openmeter/customer/service/hooks/subjectcustomer.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "subjectCustomerHook", + "signature": "type subjectCustomerHook struct", + "line": 37 + }, + { + "kind": "func", + "name": "provision", + "signature": "func (s subjectCustomerHook) provision(ctx context.Context, sub *subject.Subject) error", + "line": 47 + }, + { + "kind": "func", + "name": "PostDelete", + "signature": "func (s subjectCustomerHook) PostDelete(ctx context.Context, sub *subject.Subject) error", + "line": 62 + }, + { + "kind": "func", + "name": "PostCreate", + "signature": "func (s subjectCustomerHook) PostCreate(ctx context.Context, sub *subject.Subject) error", + "line": 141 + }, + { + "kind": "func", + "name": "PostUpdate", + "signature": "func (s subjectCustomerHook) PostUpdate(ctx context.Context, sub *subject.Subject) error", + "line": 156 + }, + { + "kind": "func", + "name": "NewSubjectCustomerHook", + "signature": "func NewSubjectCustomerHook(config SubjectCustomerHookConfig) (SubjectCustomerHook, error)", + "line": 171 + }, + { + "kind": "struct", + "name": "SubjectCustomerHookConfig", + "signature": "type SubjectCustomerHookConfig struct", + "line": 194 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SubjectCustomerHookConfig) Validate() error", + "line": 204 + }, + { + "kind": "func", + "name": "CmpSubjectCustomer", + "signature": "func CmpSubjectCustomer(s *subject.Subject, c *customer.Customer) bool", + "line": 226 + }, + { + "kind": "struct", + "name": "CustomerProvisionerConfig", + "signature": "type CustomerProvisionerConfig struct", + "line": 265 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CustomerProvisionerConfig) Validate() error", + "line": 272 + }, + { + "kind": "func", + "name": "NewCustomerProvisioner", + "signature": "func NewCustomerProvisioner(config CustomerProvisionerConfig) (*CustomerProvisioner, error)", + "line": 294 + }, + { + "kind": "struct", + "name": "CustomerProvisioner", + "signature": "type CustomerProvisioner struct", + "line": 307 + }, + { + "kind": "func", + "name": "getCustomerForSubject", + "signature": "func (p CustomerProvisioner) getCustomerForSubject(ctx context.Context, sub *subject.Subject) (*customer.Customer, error)", + "line": 316 + }, + { + "kind": "func", + "name": "EnsureCustomer", + "signature": "func (p CustomerProvisioner) EnsureCustomer(ctx context.Context, sub *subject.Subject) (*customer.Customer, error)", + "line": 369 + }, + { + "kind": "struct", + "name": "InvalidPaymentAppError", + "signature": "type InvalidPaymentAppError struct", + "line": 519 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e InvalidPaymentAppError) Error() string", + "line": 524 + }, + { + "kind": "func", + "name": "EnsureStripeCustomer", + "signature": "func (p CustomerProvisioner) EnsureStripeCustomer(ctx context.Context, customerID customer.CustomerID, stripeCustomerID string) error", + "line": 528 + }, + { + "kind": "func", + "name": "Provision", + "signature": "func (p CustomerProvisioner) Provision(ctx context.Context, sub *subject.Subject) error", + "line": 597 + }, + { + "kind": "func", + "name": "MetadataFromMap", + "signature": "func MetadataFromMap(m map[string]interface{}) models.Metadata", + "line": 633 + }, + { + "kind": "func", + "name": "toString", + "signature": "func toString(v interface{}, rec int) string", + "line": 653 + } + ], + "line_count": 734 + }, + "openmeter/customer/service/hooks/subjectcustomer_test.go": { + "header": "\t\"crypto/rand\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "func", + "name": "TestCustomerProvisioner_EnsureCustomer", + "signature": "func TestCustomerProvisioner_EnsureCustomer(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "AssertSubjectCustomerStrictEqual", + "signature": "func AssertSubjectCustomerStrictEqual(t *testing.T, s *subject.Subject, c *customer.Customer)", + "line": 236 + }, + { + "kind": "func", + "name": "AssertSubjectCustomerEqual", + "signature": "func AssertSubjectCustomerEqual(t *testing.T, s *subject.Subject, c *customer.Customer)", + "line": 244 + }, + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 260 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 268 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 279 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 288 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 310 + }, + { + "kind": "func", + "name": "TestMetadataFromMap", + "signature": "func TestMetadataFromMap(t *testing.T)", + "line": 365 + } + ], + "line_count": 424 + }, + "openmeter/customer/service/ledger_hook_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestCustomerService_CreateCustomerProvisionsLedgerAccounts", + "signature": "func TestCustomerService_CreateCustomerProvisionsLedgerAccounts(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestCustomerService_CreateCustomerRollsBackWhenLedgerProvisioningFails", + "signature": "func TestCustomerService_CreateCustomerRollsBackWhenLedgerProvisioningFails(t *testing.T)", + "line": 60 + }, + { + "kind": "struct", + "name": "failingCustomerAccountProvisioner", + "signature": "type failingCustomerAccountProvisioner struct", + "line": 100 + }, + { + "kind": "func", + "name": "CreateCustomerAccounts", + "signature": "func (f failingCustomerAccountProvisioner) CreateCustomerAccounts(_ context.Context, _ customer.CustomerID) (ledger.CustomerAccounts, error)", + "line": 104 + } + ], + "line_count": 106 + }, + "openmeter/customer/service/requestvalidator.go": { + "header": "var _ customer.RequestValidatorService = (*Service)(nil)\nfunc (s *Service) RegisterRequestValidator(v customer.RequestValidator) {\n\ts.requestValidatorRegistry.Register(v)", + "symbols": [ + { + "kind": "func", + "name": "RegisterRequestValidator", + "signature": "func (s *Service) RegisterRequestValidator(v customer.RequestValidator)", + "line": 7 + } + ], + "line_count": 9 + }, + "openmeter/customer/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/watermill/eventbus\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 13 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (s *Service) RegisterHooks(hooks ...models.ServiceHook[customer.Customer])", + "line": 21 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 30 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 42 + } + ], + "line_count": 53 + }, + "openmeter/customer/service/service_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "Test_CustomerService", + "signature": "func Test_CustomerService(t *testing.T)", + "line": 15 + } + ], + "line_count": 222 + }, + "openmeter/customer/testutils/env.go": { + "header": "\t\"crypto/rand\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 27 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 35 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 55 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 77 + } + ], + "line_count": 130 + }, + "openmeter/debug/debug.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "DebugConnector", + "signature": "type DebugConnector interface", + "line": 18 + }, + { + "kind": "struct", + "name": "debugConnector", + "signature": "type debugConnector struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewDebugConnector", + "signature": "func NewDebugConnector(streaming streaming.Connector) DebugConnector", + "line": 28 + }, + { + "kind": "func", + "name": "GetDebugMetrics", + "signature": "func (c *debugConnector) GetDebugMetrics(ctx context.Context, namespace string) (string, error)", + "line": 36 + } + ], + "line_count": 83 + }, + "openmeter/debug/httpdriver/metrics.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "DebugHandler", + "signature": "type DebugHandler interface", + "line": 15 + }, + { + "kind": "struct", + "name": "debugHandler", + "signature": "type debugHandler struct", + "line": 19 + }, + { + "kind": "func", + "name": "NewDebugHandler", + "signature": "func NewDebugHandler(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tdebugConnector debug.DebugConnector,\n\toptions ...httptransport.HandlerOption,\n) DebugHandler", + "line": 25 + }, + { + "kind": "struct", + "name": "GetMetricsHandlerRequestParams", + "signature": "type GetMetricsHandlerRequestParams struct", + "line": 37 + }, + { + "kind": "struct", + "name": "GetMetricsHandlerRequest", + "signature": "type GetMetricsHandlerRequest struct", + "line": 41 + }, + { + "kind": "func", + "name": "GetMetrics", + "signature": "func (h *debugHandler) GetMetrics() GetMetricsHandler", + "line": 50 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *debugHandler) resolveNamespace(ctx context.Context) (string, error)", + "line": 84 + } + ], + "line_count": 91 + }, + "openmeter/dedupe/dedupe.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "interface", + "name": "Deduplicator", + "signature": "type Deduplicator interface", + "line": 12 + }, + { + "kind": "struct", + "name": "CheckUniqueBatchResult", + "signature": "type CheckUniqueBatchResult struct", + "line": 28 + }, + { + "kind": "struct", + "name": "Item", + "signature": "type Item struct", + "line": 33 + }, + { + "kind": "func", + "name": "Key", + "signature": "func (i Item) Key() string", + "line": 39 + } + ], + "line_count": 41 + }, + "openmeter/dedupe/memorydedupe/memorydedupe.go": { + "header": "\t\"context\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"\n\tlru \"github.com/hashicorp/golang-lru/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "Deduplicator", + "signature": "type Deduplicator struct", + "line": 16 + }, + { + "kind": "func", + "name": "NewDeduplicator", + "signature": "func NewDeduplicator(size int) (*Deduplicator, error)", + "line": 21 + }, + { + "kind": "func", + "name": "IsUnique", + "signature": "func (d *Deduplicator) IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error)", + "line": 36 + }, + { + "kind": "func", + "name": "CheckUnique", + "signature": "func (d *Deduplicator) CheckUnique(ctx context.Context, item dedupe.Item) (bool, error)", + "line": 47 + }, + { + "kind": "func", + "name": "Set", + "signature": "func (d *Deduplicator) Set(ctx context.Context, items ...dedupe.Item) ([]dedupe.Item, error)", + "line": 53 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d *Deduplicator) Close() error", + "line": 61 + }, + { + "kind": "func", + "name": "CheckUniqueBatch", + "signature": "func (d *Deduplicator) CheckUniqueBatch(ctx context.Context, items []dedupe.Item) (dedupe.CheckUniqueBatchResult, error)", + "line": 65 + } + ], + "line_count": 80 + }, + "openmeter/dedupe/memorydedupe/memorydedupe_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsUniqueDeduplicator", + "signature": "func TestIsUniqueDeduplicator(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestDeduplicator", + "signature": "func TestDeduplicator(t *testing.T)", + "line": 34 + } + ], + "line_count": 53 + }, + "openmeter/dedupe/redisdedupe/keyhash.go": { + "header": "\t\"encoding/base64\"\n\t\"github.com/zeebo/xxh3\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetKeyHash", + "signature": "func GetKeyHash(itemKey string) string", + "line": 33 + } + ], + "line_count": 37 + }, + "openmeter/dedupe/redisdedupe/redisdedupe.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (m DedupeMode) Validate() error", + "line": 24 + }, + { + "kind": "struct", + "name": "Deduplicator", + "signature": "type Deduplicator struct", + "line": 33 + }, + { + "kind": "func", + "name": "IsUnique", + "signature": "func (d Deduplicator) IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error)", + "line": 40 + }, + { + "kind": "func", + "name": "setKey", + "signature": "func (d Deduplicator) setKey(ctx context.Context, key string) (bool, error)", + "line": 82 + }, + { + "kind": "func", + "name": "CheckUnique", + "signature": "func (d Deduplicator) CheckUnique(ctx context.Context, item dedupe.Item) (bool, error)", + "line": 107 + }, + { + "kind": "func", + "name": "Set", + "signature": "func (d Deduplicator) Set(ctx context.Context, items ...dedupe.Item) ([]dedupe.Item, error)", + "line": 127 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d Deduplicator) Close() error", + "line": 171 + }, + { + "kind": "func", + "name": "CheckUniqueBatch", + "signature": "func (d Deduplicator) CheckUniqueBatch(ctx context.Context, items []dedupe.Item) (dedupe.CheckUniqueBatchResult, error)", + "line": 181 + } + ], + "line_count": 220 + }, + "openmeter/ent/db/addon.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 19 + }, + { + "kind": "struct", + "name": "AddonEdges", + "signature": "type AddonEdges struct", + "line": 58 + }, + { + "kind": "func", + "name": "RatecardsOrErr", + "signature": "func (e AddonEdges) RatecardsOrErr() ([]*AddonRateCard, error)", + "line": 72 + }, + { + "kind": "func", + "name": "PlansOrErr", + "signature": "func (e AddonEdges) PlansOrErr() ([]*PlanAddon, error)", + "line": 81 + }, + { + "kind": "func", + "name": "SubscriptionAddonsOrErr", + "signature": "func (e AddonEdges) SubscriptionAddonsOrErr() ([]*SubscriptionAddon, error)", + "line": 90 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Addon) assignValues(columns []string, values []any) error", + "line": 121 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Addon) Value(name string) (ent.Value, error)", + "line": 232 + }, + { + "kind": "func", + "name": "QueryRatecards", + "signature": "func (_m *Addon) QueryRatecards() *AddonRateCardQuery", + "line": 237 + }, + { + "kind": "func", + "name": "QueryPlans", + "signature": "func (_m *Addon) QueryPlans() *PlanAddonQuery", + "line": 242 + }, + { + "kind": "func", + "name": "QuerySubscriptionAddons", + "signature": "func (_m *Addon) QuerySubscriptionAddons() *SubscriptionAddonQuery", + "line": 247 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Addon) Update() *AddonUpdateOne", + "line": 254 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Addon) Unwrap() *Addon", + "line": 260 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Addon) String() string", + "line": 270 + } + ], + "line_count": 328 + }, + "openmeter/ent/db/addon/addon.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 100 + }, + { + "kind": "func", + "name": "InstanceTypeValidator", + "signature": "func InstanceTypeValidator(it productcatalog.AddonInstanceType) error", + "line": 137 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByVersion", + "signature": "func ByVersion(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByInstanceType", + "signature": "func ByInstanceType(opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "ByEffectiveFrom", + "signature": "func ByEffectiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 205 + }, + { + "kind": "func", + "name": "ByEffectiveTo", + "signature": "func ByEffectiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 210 + }, + { + "kind": "func", + "name": "ByAnnotations", + "signature": "func ByAnnotations(opts ...sql.OrderTermOption) OrderOption", + "line": 215 + }, + { + "kind": "func", + "name": "ByRatecardsCount", + "signature": "func ByRatecardsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 220 + }, + { + "kind": "func", + "name": "ByRatecards", + "signature": "func ByRatecards(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 227 + }, + { + "kind": "func", + "name": "ByPlansCount", + "signature": "func ByPlansCount(opts ...sql.OrderTermOption) OrderOption", + "line": 234 + }, + { + "kind": "func", + "name": "ByPlans", + "signature": "func ByPlans(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "BySubscriptionAddonsCount", + "signature": "func BySubscriptionAddonsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "BySubscriptionAddons", + "signature": "func BySubscriptionAddons(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 255 + }, + { + "kind": "func", + "name": "newRatecardsStep", + "signature": "func newRatecardsStep() *sqlgraph.Step", + "line": 260 + }, + { + "kind": "func", + "name": "newPlansStep", + "signature": "func newPlansStep() *sqlgraph.Step", + "line": 267 + }, + { + "kind": "func", + "name": "newSubscriptionAddonsStep", + "signature": "func newSubscriptionAddonsStep() *sqlgraph.Step", + "line": 274 + } + ], + "line_count": 280 + }, + "openmeter/ent/db/addon/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Addon", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Addon", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Addon", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Addon", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Addon", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Addon", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Addon", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Addon", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Addon", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Addon", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Addon", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Addon", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Addon", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Addon", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Addon", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Addon", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Addon", + "line": 95 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Addon", + "line": 100 + }, + { + "kind": "func", + "name": "Version", + "signature": "func Version(v int) predicate.Addon", + "line": 105 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v string) predicate.Addon", + "line": 110 + }, + { + "kind": "func", + "name": "EffectiveFrom", + "signature": "func EffectiveFrom(v time.Time) predicate.Addon", + "line": 115 + }, + { + "kind": "func", + "name": "EffectiveTo", + "signature": "func EffectiveTo(v time.Time) predicate.Addon", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Addon", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Addon", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Addon", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Addon", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Addon", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Addon", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Addon", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Addon", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Addon", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Addon", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Addon", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Addon", + "line": 180 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Addon", + "line": 185 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Addon", + "line": 190 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Addon", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Addon", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Addon", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Addon", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Addon", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Addon", + "line": 220 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Addon", + "line": 225 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Addon", + "line": 230 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Addon", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Addon", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Addon", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Addon", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Addon", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Addon", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Addon", + "line": 265 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Addon", + "line": 270 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Addon", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Addon", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Addon", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Addon", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Addon", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Addon", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Addon", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Addon", + "line": 310 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Addon", + "line": 315 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Addon", + "line": 320 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Addon", + "line": 325 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Addon", + "line": 330 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Addon", + "line": 335 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Addon", + "line": 340 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Addon", + "line": 345 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Addon", + "line": 350 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Addon", + "line": 355 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Addon", + "line": 360 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Addon", + "line": 365 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Addon", + "line": 370 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Addon", + "line": 375 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Addon", + "line": 380 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Addon", + "line": 385 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Addon", + "line": 390 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Addon", + "line": 395 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Addon", + "line": 400 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Addon", + "line": 405 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Addon", + "line": 410 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Addon", + "line": 415 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Addon", + "line": 420 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Addon", + "line": 425 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Addon", + "line": 430 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Addon", + "line": 435 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Addon", + "line": 440 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Addon", + "line": 445 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Addon", + "line": 450 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Addon", + "line": 455 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Addon", + "line": 460 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Addon", + "line": 465 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Addon", + "line": 470 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Addon", + "line": 475 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Addon", + "line": 480 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Addon", + "line": 485 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Addon", + "line": 490 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Addon", + "line": 495 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Addon", + "line": 500 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Addon", + "line": 505 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Addon", + "line": 510 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Addon", + "line": 515 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Addon", + "line": 520 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Addon", + "line": 525 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Addon", + "line": 530 + }, + { + "kind": "func", + "name": "VersionEQ", + "signature": "func VersionEQ(v int) predicate.Addon", + "line": 535 + }, + { + "kind": "func", + "name": "VersionNEQ", + "signature": "func VersionNEQ(v int) predicate.Addon", + "line": 540 + }, + { + "kind": "func", + "name": "VersionIn", + "signature": "func VersionIn(vs ...int) predicate.Addon", + "line": 545 + }, + { + "kind": "func", + "name": "VersionNotIn", + "signature": "func VersionNotIn(vs ...int) predicate.Addon", + "line": 550 + }, + { + "kind": "func", + "name": "VersionGT", + "signature": "func VersionGT(v int) predicate.Addon", + "line": 555 + }, + { + "kind": "func", + "name": "VersionGTE", + "signature": "func VersionGTE(v int) predicate.Addon", + "line": 560 + }, + { + "kind": "func", + "name": "VersionLT", + "signature": "func VersionLT(v int) predicate.Addon", + "line": 565 + }, + { + "kind": "func", + "name": "VersionLTE", + "signature": "func VersionLTE(v int) predicate.Addon", + "line": 570 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v string) predicate.Addon", + "line": 575 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v string) predicate.Addon", + "line": 580 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...string) predicate.Addon", + "line": 585 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...string) predicate.Addon", + "line": 590 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v string) predicate.Addon", + "line": 595 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v string) predicate.Addon", + "line": 600 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v string) predicate.Addon", + "line": 605 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v string) predicate.Addon", + "line": 610 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v string) predicate.Addon", + "line": 615 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v string) predicate.Addon", + "line": 620 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v string) predicate.Addon", + "line": 625 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v string) predicate.Addon", + "line": 630 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v string) predicate.Addon", + "line": 635 + }, + { + "kind": "func", + "name": "InstanceTypeEQ", + "signature": "func InstanceTypeEQ(v productcatalog.AddonInstanceType) predicate.Addon", + "line": 640 + }, + { + "kind": "func", + "name": "InstanceTypeNEQ", + "signature": "func InstanceTypeNEQ(v productcatalog.AddonInstanceType) predicate.Addon", + "line": 646 + }, + { + "kind": "func", + "name": "InstanceTypeIn", + "signature": "func InstanceTypeIn(vs ...productcatalog.AddonInstanceType) predicate.Addon", + "line": 652 + }, + { + "kind": "func", + "name": "InstanceTypeNotIn", + "signature": "func InstanceTypeNotIn(vs ...productcatalog.AddonInstanceType) predicate.Addon", + "line": 661 + }, + { + "kind": "func", + "name": "EffectiveFromEQ", + "signature": "func EffectiveFromEQ(v time.Time) predicate.Addon", + "line": 670 + }, + { + "kind": "func", + "name": "EffectiveFromNEQ", + "signature": "func EffectiveFromNEQ(v time.Time) predicate.Addon", + "line": 675 + }, + { + "kind": "func", + "name": "EffectiveFromIn", + "signature": "func EffectiveFromIn(vs ...time.Time) predicate.Addon", + "line": 680 + }, + { + "kind": "func", + "name": "EffectiveFromNotIn", + "signature": "func EffectiveFromNotIn(vs ...time.Time) predicate.Addon", + "line": 685 + }, + { + "kind": "func", + "name": "EffectiveFromGT", + "signature": "func EffectiveFromGT(v time.Time) predicate.Addon", + "line": 690 + }, + { + "kind": "func", + "name": "EffectiveFromGTE", + "signature": "func EffectiveFromGTE(v time.Time) predicate.Addon", + "line": 695 + }, + { + "kind": "func", + "name": "EffectiveFromLT", + "signature": "func EffectiveFromLT(v time.Time) predicate.Addon", + "line": 700 + }, + { + "kind": "func", + "name": "EffectiveFromLTE", + "signature": "func EffectiveFromLTE(v time.Time) predicate.Addon", + "line": 705 + }, + { + "kind": "func", + "name": "EffectiveFromIsNil", + "signature": "func EffectiveFromIsNil() predicate.Addon", + "line": 710 + }, + { + "kind": "func", + "name": "EffectiveFromNotNil", + "signature": "func EffectiveFromNotNil() predicate.Addon", + "line": 715 + }, + { + "kind": "func", + "name": "EffectiveToEQ", + "signature": "func EffectiveToEQ(v time.Time) predicate.Addon", + "line": 720 + }, + { + "kind": "func", + "name": "EffectiveToNEQ", + "signature": "func EffectiveToNEQ(v time.Time) predicate.Addon", + "line": 725 + }, + { + "kind": "func", + "name": "EffectiveToIn", + "signature": "func EffectiveToIn(vs ...time.Time) predicate.Addon", + "line": 730 + }, + { + "kind": "func", + "name": "EffectiveToNotIn", + "signature": "func EffectiveToNotIn(vs ...time.Time) predicate.Addon", + "line": 735 + }, + { + "kind": "func", + "name": "EffectiveToGT", + "signature": "func EffectiveToGT(v time.Time) predicate.Addon", + "line": 740 + }, + { + "kind": "func", + "name": "EffectiveToGTE", + "signature": "func EffectiveToGTE(v time.Time) predicate.Addon", + "line": 745 + }, + { + "kind": "func", + "name": "EffectiveToLT", + "signature": "func EffectiveToLT(v time.Time) predicate.Addon", + "line": 750 + }, + { + "kind": "func", + "name": "EffectiveToLTE", + "signature": "func EffectiveToLTE(v time.Time) predicate.Addon", + "line": 755 + }, + { + "kind": "func", + "name": "EffectiveToIsNil", + "signature": "func EffectiveToIsNil() predicate.Addon", + "line": 760 + }, + { + "kind": "func", + "name": "EffectiveToNotNil", + "signature": "func EffectiveToNotNil() predicate.Addon", + "line": 765 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Addon", + "line": 770 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Addon", + "line": 775 + }, + { + "kind": "func", + "name": "HasRatecards", + "signature": "func HasRatecards() predicate.Addon", + "line": 780 + }, + { + "kind": "func", + "name": "HasRatecardsWith", + "signature": "func HasRatecardsWith(preds ...predicate.AddonRateCard) predicate.Addon", + "line": 791 + }, + { + "kind": "func", + "name": "HasPlans", + "signature": "func HasPlans() predicate.Addon", + "line": 803 + }, + { + "kind": "func", + "name": "HasPlansWith", + "signature": "func HasPlansWith(preds ...predicate.PlanAddon) predicate.Addon", + "line": 814 + }, + { + "kind": "func", + "name": "HasSubscriptionAddons", + "signature": "func HasSubscriptionAddons() predicate.Addon", + "line": 826 + }, + { + "kind": "func", + "name": "HasSubscriptionAddonsWith", + "signature": "func HasSubscriptionAddonsWith(preds ...predicate.SubscriptionAddon) predicate.Addon", + "line": 837 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Addon) predicate.Addon", + "line": 849 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Addon) predicate.Addon", + "line": 854 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Addon) predicate.Addon", + "line": 859 + } + ], + "line_count": 861 + }, + "openmeter/ent/db/addon_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonCreate", + "signature": "type AddonCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AddonCreate) SetNamespace(v string) *AddonCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *AddonCreate) SetMetadata(v map[string]string) *AddonCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AddonCreate) SetCreatedAt(v time.Time) *AddonCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AddonCreate) SetNillableCreatedAt(v *time.Time) *AddonCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AddonCreate) SetUpdatedAt(v time.Time) *AddonCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AddonCreate) SetNillableUpdatedAt(v *time.Time) *AddonCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AddonCreate) SetDeletedAt(v time.Time) *AddonCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AddonCreate) SetNillableDeletedAt(v *time.Time) *AddonCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *AddonCreate) SetName(v string) *AddonCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *AddonCreate) SetDescription(v string) *AddonCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *AddonCreate) SetNillableDescription(v *string) *AddonCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *AddonCreate) SetKey(v string) *AddonCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_c *AddonCreate) SetVersion(v int) *AddonCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *AddonCreate) SetCurrency(v string) *AddonCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_c *AddonCreate) SetNillableCurrency(v *string) *AddonCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (_c *AddonCreate) SetInstanceType(v productcatalog.AddonInstanceType) *AddonCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetNillableInstanceType", + "signature": "func (_c *AddonCreate) SetNillableInstanceType(v *productcatalog.AddonInstanceType) *AddonCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_c *AddonCreate) SetEffectiveFrom(v time.Time) *AddonCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_c *AddonCreate) SetNillableEffectiveFrom(v *time.Time) *AddonCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_c *AddonCreate) SetEffectiveTo(v time.Time) *AddonCreate", + "line": 160 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_c *AddonCreate) SetNillableEffectiveTo(v *time.Time) *AddonCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *AddonCreate) SetAnnotations(v models.Annotations) *AddonCreate", + "line": 174 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *AddonCreate) SetID(v string) *AddonCreate", + "line": 180 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *AddonCreate) SetNillableID(v *string) *AddonCreate", + "line": 186 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_c *AddonCreate) AddRatecardIDs(ids ...string) *AddonCreate", + "line": 194 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_c *AddonCreate) AddRatecards(v ...*AddonRateCard) *AddonCreate", + "line": 200 + }, + { + "kind": "func", + "name": "AddPlanIDs", + "signature": "func (_c *AddonCreate) AddPlanIDs(ids ...string) *AddonCreate", + "line": 209 + }, + { + "kind": "func", + "name": "AddPlans", + "signature": "func (_c *AddonCreate) AddPlans(v ...*PlanAddon) *AddonCreate", + "line": 215 + }, + { + "kind": "func", + "name": "AddSubscriptionAddonIDs", + "signature": "func (_c *AddonCreate) AddSubscriptionAddonIDs(ids ...string) *AddonCreate", + "line": 224 + }, + { + "kind": "func", + "name": "AddSubscriptionAddons", + "signature": "func (_c *AddonCreate) AddSubscriptionAddons(v ...*SubscriptionAddon) *AddonCreate", + "line": 230 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AddonCreate) Mutation() *AddonMutation", + "line": 239 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AddonCreate) Save(ctx context.Context) (*Addon, error)", + "line": 244 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AddonCreate) SaveX(ctx context.Context) *Addon", + "line": 250 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AddonCreate) Exec(ctx context.Context) error", + "line": 259 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AddonCreate) ExecX(ctx context.Context)", + "line": 265 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AddonCreate) defaults()", + "line": 272 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AddonCreate) check() error", + "line": 296 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AddonCreate) sqlSave(ctx context.Context) (*Addon, error)", + "line": 349 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AddonCreate) createSpec() (*Addon, *sqlgraph.CreateSpec, error)", + "line": 375 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AddonCreate) OnConflict(opts ...sql.ConflictOption) *AddonUpsertOne", + "line": 512 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AddonCreate) OnConflictColumns(columns ...string) *AddonUpsertOne", + "line": 525 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonUpsert) SetMetadata(v map[string]string) *AddonUpsert", + "line": 546 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonUpsert) UpdateMetadata() *AddonUpsert", + "line": 552 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonUpsert) ClearMetadata() *AddonUpsert", + "line": 558 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonUpsert) SetUpdatedAt(v time.Time) *AddonUpsert", + "line": 564 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonUpsert) UpdateUpdatedAt() *AddonUpsert", + "line": 570 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonUpsert) SetDeletedAt(v time.Time) *AddonUpsert", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonUpsert) UpdateDeletedAt() *AddonUpsert", + "line": 582 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonUpsert) ClearDeletedAt() *AddonUpsert", + "line": 588 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonUpsert) SetName(v string) *AddonUpsert", + "line": 594 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonUpsert) UpdateName() *AddonUpsert", + "line": 600 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonUpsert) SetDescription(v string) *AddonUpsert", + "line": 606 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonUpsert) UpdateDescription() *AddonUpsert", + "line": 612 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonUpsert) ClearDescription() *AddonUpsert", + "line": 618 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *AddonUpsert) SetVersion(v int) *AddonUpsert", + "line": 624 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *AddonUpsert) UpdateVersion() *AddonUpsert", + "line": 630 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *AddonUpsert) AddVersion(v int) *AddonUpsert", + "line": 636 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (u *AddonUpsert) SetInstanceType(v productcatalog.AddonInstanceType) *AddonUpsert", + "line": 642 + }, + { + "kind": "func", + "name": "UpdateInstanceType", + "signature": "func (u *AddonUpsert) UpdateInstanceType() *AddonUpsert", + "line": 648 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *AddonUpsert) SetEffectiveFrom(v time.Time) *AddonUpsert", + "line": 654 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *AddonUpsert) UpdateEffectiveFrom() *AddonUpsert", + "line": 660 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *AddonUpsert) ClearEffectiveFrom() *AddonUpsert", + "line": 666 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *AddonUpsert) SetEffectiveTo(v time.Time) *AddonUpsert", + "line": 672 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *AddonUpsert) UpdateEffectiveTo() *AddonUpsert", + "line": 678 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *AddonUpsert) ClearEffectiveTo() *AddonUpsert", + "line": 684 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *AddonUpsert) SetAnnotations(v models.Annotations) *AddonUpsert", + "line": 690 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *AddonUpsert) UpdateAnnotations() *AddonUpsert", + "line": 696 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *AddonUpsert) ClearAnnotations() *AddonUpsert", + "line": 702 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AddonUpsertOne) UpdateNewValues() *AddonUpsertOne", + "line": 718 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AddonUpsertOne) Ignore() *AddonUpsertOne", + "line": 746 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AddonUpsertOne) DoNothing() *AddonUpsertOne", + "line": 753 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AddonUpsertOne) Update(set func(*AddonUpsert)) *AddonUpsertOne", + "line": 760 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonUpsertOne) SetMetadata(v map[string]string) *AddonUpsertOne", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonUpsertOne) UpdateMetadata() *AddonUpsertOne", + "line": 775 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonUpsertOne) ClearMetadata() *AddonUpsertOne", + "line": 782 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonUpsertOne) SetUpdatedAt(v time.Time) *AddonUpsertOne", + "line": 789 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonUpsertOne) UpdateUpdatedAt() *AddonUpsertOne", + "line": 796 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonUpsertOne) SetDeletedAt(v time.Time) *AddonUpsertOne", + "line": 803 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonUpsertOne) UpdateDeletedAt() *AddonUpsertOne", + "line": 810 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonUpsertOne) ClearDeletedAt() *AddonUpsertOne", + "line": 817 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonUpsertOne) SetName(v string) *AddonUpsertOne", + "line": 824 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonUpsertOne) UpdateName() *AddonUpsertOne", + "line": 831 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonUpsertOne) SetDescription(v string) *AddonUpsertOne", + "line": 838 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonUpsertOne) UpdateDescription() *AddonUpsertOne", + "line": 845 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonUpsertOne) ClearDescription() *AddonUpsertOne", + "line": 852 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *AddonUpsertOne) SetVersion(v int) *AddonUpsertOne", + "line": 859 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *AddonUpsertOne) AddVersion(v int) *AddonUpsertOne", + "line": 866 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *AddonUpsertOne) UpdateVersion() *AddonUpsertOne", + "line": 873 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (u *AddonUpsertOne) SetInstanceType(v productcatalog.AddonInstanceType) *AddonUpsertOne", + "line": 880 + }, + { + "kind": "func", + "name": "UpdateInstanceType", + "signature": "func (u *AddonUpsertOne) UpdateInstanceType() *AddonUpsertOne", + "line": 887 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *AddonUpsertOne) SetEffectiveFrom(v time.Time) *AddonUpsertOne", + "line": 894 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *AddonUpsertOne) UpdateEffectiveFrom() *AddonUpsertOne", + "line": 901 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *AddonUpsertOne) ClearEffectiveFrom() *AddonUpsertOne", + "line": 908 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *AddonUpsertOne) SetEffectiveTo(v time.Time) *AddonUpsertOne", + "line": 915 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *AddonUpsertOne) UpdateEffectiveTo() *AddonUpsertOne", + "line": 922 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *AddonUpsertOne) ClearEffectiveTo() *AddonUpsertOne", + "line": 929 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *AddonUpsertOne) SetAnnotations(v models.Annotations) *AddonUpsertOne", + "line": 936 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *AddonUpsertOne) UpdateAnnotations() *AddonUpsertOne", + "line": 943 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *AddonUpsertOne) ClearAnnotations() *AddonUpsertOne", + "line": 950 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AddonUpsertOne) Exec(ctx context.Context) error", + "line": 957 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AddonUpsertOne) ExecX(ctx context.Context)", + "line": 965 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AddonUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 972 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AddonUpsertOne) IDX(ctx context.Context) string", + "line": 986 + }, + { + "kind": "struct", + "name": "AddonCreateBulk", + "signature": "type AddonCreateBulk struct", + "line": 995 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AddonCreateBulk) Save(ctx context.Context) ([]*Addon, error)", + "line": 1003 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AddonCreateBulk) SaveX(ctx context.Context) []*Addon", + "line": 1062 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AddonCreateBulk) Exec(ctx context.Context) error", + "line": 1071 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AddonCreateBulk) ExecX(ctx context.Context)", + "line": 1077 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AddonCreateBulk) OnConflict(opts ...sql.ConflictOption) *AddonUpsertBulk", + "line": 1098 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AddonCreateBulk) OnConflictColumns(columns ...string) *AddonUpsertBulk", + "line": 1111 + }, + { + "kind": "struct", + "name": "AddonUpsertBulk", + "signature": "type AddonUpsertBulk struct", + "line": 1120 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AddonUpsertBulk) UpdateNewValues() *AddonUpsertBulk", + "line": 1135 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AddonUpsertBulk) Ignore() *AddonUpsertBulk", + "line": 1165 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AddonUpsertBulk) DoNothing() *AddonUpsertBulk", + "line": 1172 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AddonUpsertBulk) Update(set func(*AddonUpsert)) *AddonUpsertBulk", + "line": 1179 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonUpsertBulk) SetMetadata(v map[string]string) *AddonUpsertBulk", + "line": 1187 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonUpsertBulk) UpdateMetadata() *AddonUpsertBulk", + "line": 1194 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonUpsertBulk) ClearMetadata() *AddonUpsertBulk", + "line": 1201 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonUpsertBulk) SetUpdatedAt(v time.Time) *AddonUpsertBulk", + "line": 1208 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonUpsertBulk) UpdateUpdatedAt() *AddonUpsertBulk", + "line": 1215 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonUpsertBulk) SetDeletedAt(v time.Time) *AddonUpsertBulk", + "line": 1222 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonUpsertBulk) UpdateDeletedAt() *AddonUpsertBulk", + "line": 1229 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonUpsertBulk) ClearDeletedAt() *AddonUpsertBulk", + "line": 1236 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonUpsertBulk) SetName(v string) *AddonUpsertBulk", + "line": 1243 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonUpsertBulk) UpdateName() *AddonUpsertBulk", + "line": 1250 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonUpsertBulk) SetDescription(v string) *AddonUpsertBulk", + "line": 1257 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonUpsertBulk) UpdateDescription() *AddonUpsertBulk", + "line": 1264 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonUpsertBulk) ClearDescription() *AddonUpsertBulk", + "line": 1271 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *AddonUpsertBulk) SetVersion(v int) *AddonUpsertBulk", + "line": 1278 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *AddonUpsertBulk) AddVersion(v int) *AddonUpsertBulk", + "line": 1285 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *AddonUpsertBulk) UpdateVersion() *AddonUpsertBulk", + "line": 1292 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (u *AddonUpsertBulk) SetInstanceType(v productcatalog.AddonInstanceType) *AddonUpsertBulk", + "line": 1299 + }, + { + "kind": "func", + "name": "UpdateInstanceType", + "signature": "func (u *AddonUpsertBulk) UpdateInstanceType() *AddonUpsertBulk", + "line": 1306 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *AddonUpsertBulk) SetEffectiveFrom(v time.Time) *AddonUpsertBulk", + "line": 1313 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *AddonUpsertBulk) UpdateEffectiveFrom() *AddonUpsertBulk", + "line": 1320 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *AddonUpsertBulk) ClearEffectiveFrom() *AddonUpsertBulk", + "line": 1327 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *AddonUpsertBulk) SetEffectiveTo(v time.Time) *AddonUpsertBulk", + "line": 1334 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *AddonUpsertBulk) UpdateEffectiveTo() *AddonUpsertBulk", + "line": 1341 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *AddonUpsertBulk) ClearEffectiveTo() *AddonUpsertBulk", + "line": 1348 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *AddonUpsertBulk) SetAnnotations(v models.Annotations) *AddonUpsertBulk", + "line": 1355 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *AddonUpsertBulk) UpdateAnnotations() *AddonUpsertBulk", + "line": 1362 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *AddonUpsertBulk) ClearAnnotations() *AddonUpsertBulk", + "line": 1369 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AddonUpsertBulk) Exec(ctx context.Context) error", + "line": 1376 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AddonUpsertBulk) ExecX(ctx context.Context)", + "line": 1392 + } + ], + "line_count": 1396 + }, + "openmeter/ent/db/addon_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonDelete", + "signature": "type AddonDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AddonDelete) Where(ps ...predicate.Addon) *AddonDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AddonDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AddonDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AddonDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AddonDeleteOne", + "signature": "type AddonDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AddonDeleteOne) Where(ps ...predicate.Addon) *AddonDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AddonDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AddonDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/addon_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonQuery", + "signature": "type AddonQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AddonQuery) Where(ps ...predicate.Addon) *AddonQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AddonQuery) Limit(limit int) *AddonQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AddonQuery) Offset(offset int) *AddonQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AddonQuery) Unique(unique bool) *AddonQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AddonQuery) Order(o ...addon.OrderOption) *AddonQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryRatecards", + "signature": "func (_q *AddonQuery) QueryRatecards() *AddonRateCardQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryPlans", + "signature": "func (_q *AddonQuery) QueryPlans() *PlanAddonQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QuerySubscriptionAddons", + "signature": "func (_q *AddonQuery) QuerySubscriptionAddons() *SubscriptionAddonQuery", + "line": 115 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AddonQuery) First(ctx context.Context) (*Addon, error)", + "line": 138 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AddonQuery) FirstX(ctx context.Context) *Addon", + "line": 150 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AddonQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AddonQuery) FirstIDX(ctx context.Context) string", + "line": 173 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AddonQuery) Only(ctx context.Context) (*Addon, error)", + "line": 184 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AddonQuery) OnlyX(ctx context.Context) *Addon", + "line": 200 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AddonQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AddonQuery) OnlyIDX(ctx context.Context) string", + "line": 228 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AddonQuery) All(ctx context.Context) ([]*Addon, error)", + "line": 237 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AddonQuery) AllX(ctx context.Context) []*Addon", + "line": 247 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AddonQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AddonQuery) IDsX(ctx context.Context) []string", + "line": 268 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AddonQuery) Count(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AddonQuery) CountX(ctx context.Context) int", + "line": 286 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AddonQuery) Exist(ctx context.Context) (bool, error)", + "line": 295 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AddonQuery) ExistX(ctx context.Context) bool", + "line": 308 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AddonQuery) Clone() *AddonQuery", + "line": 318 + }, + { + "kind": "func", + "name": "WithRatecards", + "signature": "func (_q *AddonQuery) WithRatecards(opts ...func(*AddonRateCardQuery)) *AddonQuery", + "line": 339 + }, + { + "kind": "func", + "name": "WithPlans", + "signature": "func (_q *AddonQuery) WithPlans(opts ...func(*PlanAddonQuery)) *AddonQuery", + "line": 350 + }, + { + "kind": "func", + "name": "WithSubscriptionAddons", + "signature": "func (_q *AddonQuery) WithSubscriptionAddons(opts ...func(*SubscriptionAddonQuery)) *AddonQuery", + "line": 361 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AddonQuery) GroupBy(field string, fields ...string) *AddonGroupBy", + "line": 384 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AddonQuery) Select(fields ...string) *AddonSelect", + "line": 405 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AddonQuery) Aggregate(fns ...AggregateFunc) *AddonSelect", + "line": 414 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AddonQuery) prepareQuery(ctx context.Context) error", + "line": 418 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AddonQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Addon, error)", + "line": 444 + }, + { + "kind": "func", + "name": "loadRatecards", + "signature": "func (_q *AddonQuery) loadRatecards(ctx context.Context, query *AddonRateCardQuery, nodes []*Addon, init func(*Addon), assign func(*Addon, *AddonRateCard)) error", + "line": 501 + }, + { + "kind": "func", + "name": "loadPlans", + "signature": "func (_q *AddonQuery) loadPlans(ctx context.Context, query *PlanAddonQuery, nodes []*Addon, init func(*Addon), assign func(*Addon, *PlanAddon)) error", + "line": 531 + }, + { + "kind": "func", + "name": "loadSubscriptionAddons", + "signature": "func (_q *AddonQuery) loadSubscriptionAddons(ctx context.Context, query *SubscriptionAddonQuery, nodes []*Addon, init func(*Addon), assign func(*Addon, *SubscriptionAddon)) error", + "line": 561 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AddonQuery) sqlCount(ctx context.Context) (int, error)", + "line": 592 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AddonQuery) querySpec() *sqlgraph.QuerySpec", + "line": 604 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AddonQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 644 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AddonQuery) ForUpdate(opts ...sql.LockOption) *AddonQuery", + "line": 682 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AddonQuery) ForShare(opts ...sql.LockOption) *AddonQuery", + "line": 695 + }, + { + "kind": "struct", + "name": "AddonGroupBy", + "signature": "type AddonGroupBy struct", + "line": 706 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AddonGroupBy) Aggregate(fns ...AggregateFunc) *AddonGroupBy", + "line": 712 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AddonGroupBy) Scan(ctx context.Context, v any) error", + "line": 718 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AddonGroupBy) sqlScan(ctx context.Context, root *AddonQuery, v any) error", + "line": 726 + }, + { + "kind": "struct", + "name": "AddonSelect", + "signature": "type AddonSelect struct", + "line": 754 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AddonSelect) Aggregate(fns ...AggregateFunc) *AddonSelect", + "line": 760 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AddonSelect) Scan(ctx context.Context, v any) error", + "line": 766 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AddonSelect) sqlScan(ctx context.Context, root *AddonQuery, v any) error", + "line": 774 + } + ], + "line_count": 793 + }, + "openmeter/ent/db/addon_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonUpdate", + "signature": "type AddonUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AddonUpdate) Where(ps ...predicate.Addon) *AddonUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AddonUpdate) SetMetadata(v map[string]string) *AddonUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AddonUpdate) ClearMetadata() *AddonUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AddonUpdate) SetUpdatedAt(v time.Time) *AddonUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AddonUpdate) SetDeletedAt(v time.Time) *AddonUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AddonUpdate) SetNillableDeletedAt(v *time.Time) *AddonUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AddonUpdate) ClearDeletedAt() *AddonUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AddonUpdate) SetName(v string) *AddonUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AddonUpdate) SetNillableName(v *string) *AddonUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AddonUpdate) SetDescription(v string) *AddonUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AddonUpdate) SetNillableDescription(v *string) *AddonUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AddonUpdate) ClearDescription() *AddonUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_u *AddonUpdate) SetVersion(v int) *AddonUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableVersion", + "signature": "func (_u *AddonUpdate) SetNillableVersion(v *int) *AddonUpdate", + "line": 116 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (_u *AddonUpdate) AddVersion(v int) *AddonUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (_u *AddonUpdate) SetInstanceType(v productcatalog.AddonInstanceType) *AddonUpdate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableInstanceType", + "signature": "func (_u *AddonUpdate) SetNillableInstanceType(v *productcatalog.AddonInstanceType) *AddonUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *AddonUpdate) SetEffectiveFrom(v time.Time) *AddonUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *AddonUpdate) SetNillableEffectiveFrom(v *time.Time) *AddonUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (_u *AddonUpdate) ClearEffectiveFrom() *AddonUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *AddonUpdate) SetEffectiveTo(v time.Time) *AddonUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *AddonUpdate) SetNillableEffectiveTo(v *time.Time) *AddonUpdate", + "line": 170 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *AddonUpdate) ClearEffectiveTo() *AddonUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *AddonUpdate) SetAnnotations(v models.Annotations) *AddonUpdate", + "line": 184 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *AddonUpdate) ClearAnnotations() *AddonUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *AddonUpdate) AddRatecardIDs(ids ...string) *AddonUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_u *AddonUpdate) AddRatecards(v ...*AddonRateCard) *AddonUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "AddPlanIDs", + "signature": "func (_u *AddonUpdate) AddPlanIDs(ids ...string) *AddonUpdate", + "line": 211 + }, + { + "kind": "func", + "name": "AddPlans", + "signature": "func (_u *AddonUpdate) AddPlans(v ...*PlanAddon) *AddonUpdate", + "line": 217 + }, + { + "kind": "func", + "name": "AddSubscriptionAddonIDs", + "signature": "func (_u *AddonUpdate) AddSubscriptionAddonIDs(ids ...string) *AddonUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "AddSubscriptionAddons", + "signature": "func (_u *AddonUpdate) AddSubscriptionAddons(v ...*SubscriptionAddon) *AddonUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AddonUpdate) Mutation() *AddonMutation", + "line": 241 + }, + { + "kind": "func", + "name": "ClearRatecards", + "signature": "func (_u *AddonUpdate) ClearRatecards() *AddonUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *AddonUpdate) RemoveRatecardIDs(ids ...string) *AddonUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "RemoveRatecards", + "signature": "func (_u *AddonUpdate) RemoveRatecards(v ...*AddonRateCard) *AddonUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "ClearPlans", + "signature": "func (_u *AddonUpdate) ClearPlans() *AddonUpdate", + "line": 267 + }, + { + "kind": "func", + "name": "RemovePlanIDs", + "signature": "func (_u *AddonUpdate) RemovePlanIDs(ids ...string) *AddonUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "RemovePlans", + "signature": "func (_u *AddonUpdate) RemovePlans(v ...*PlanAddon) *AddonUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "ClearSubscriptionAddons", + "signature": "func (_u *AddonUpdate) ClearSubscriptionAddons() *AddonUpdate", + "line": 288 + }, + { + "kind": "func", + "name": "RemoveSubscriptionAddonIDs", + "signature": "func (_u *AddonUpdate) RemoveSubscriptionAddonIDs(ids ...string) *AddonUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "RemoveSubscriptionAddons", + "signature": "func (_u *AddonUpdate) RemoveSubscriptionAddons(v ...*SubscriptionAddon) *AddonUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AddonUpdate) Save(ctx context.Context) (int, error)", + "line": 309 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AddonUpdate) SaveX(ctx context.Context) int", + "line": 315 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AddonUpdate) Exec(ctx context.Context) error", + "line": 324 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AddonUpdate) ExecX(ctx context.Context)", + "line": 330 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AddonUpdate) defaults()", + "line": 337 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AddonUpdate) check() error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AddonUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 359 + }, + { + "kind": "struct", + "name": "AddonUpdateOne", + "signature": "type AddonUpdateOne struct", + "line": 574 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AddonUpdateOne) SetMetadata(v map[string]string) *AddonUpdateOne", + "line": 582 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AddonUpdateOne) ClearMetadata() *AddonUpdateOne", + "line": 588 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AddonUpdateOne) SetUpdatedAt(v time.Time) *AddonUpdateOne", + "line": 594 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AddonUpdateOne) SetDeletedAt(v time.Time) *AddonUpdateOne", + "line": 600 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AddonUpdateOne) SetNillableDeletedAt(v *time.Time) *AddonUpdateOne", + "line": 606 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AddonUpdateOne) ClearDeletedAt() *AddonUpdateOne", + "line": 614 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AddonUpdateOne) SetName(v string) *AddonUpdateOne", + "line": 620 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AddonUpdateOne) SetNillableName(v *string) *AddonUpdateOne", + "line": 626 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AddonUpdateOne) SetDescription(v string) *AddonUpdateOne", + "line": 634 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AddonUpdateOne) SetNillableDescription(v *string) *AddonUpdateOne", + "line": 640 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AddonUpdateOne) ClearDescription() *AddonUpdateOne", + "line": 648 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_u *AddonUpdateOne) SetVersion(v int) *AddonUpdateOne", + "line": 654 + }, + { + "kind": "func", + "name": "SetNillableVersion", + "signature": "func (_u *AddonUpdateOne) SetNillableVersion(v *int) *AddonUpdateOne", + "line": 661 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (_u *AddonUpdateOne) AddVersion(v int) *AddonUpdateOne", + "line": 669 + }, + { + "kind": "func", + "name": "SetInstanceType", + "signature": "func (_u *AddonUpdateOne) SetInstanceType(v productcatalog.AddonInstanceType) *AddonUpdateOne", + "line": 675 + }, + { + "kind": "func", + "name": "SetNillableInstanceType", + "signature": "func (_u *AddonUpdateOne) SetNillableInstanceType(v *productcatalog.AddonInstanceType) *AddonUpdateOne", + "line": 681 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *AddonUpdateOne) SetEffectiveFrom(v time.Time) *AddonUpdateOne", + "line": 689 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *AddonUpdateOne) SetNillableEffectiveFrom(v *time.Time) *AddonUpdateOne", + "line": 695 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (_u *AddonUpdateOne) ClearEffectiveFrom() *AddonUpdateOne", + "line": 703 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *AddonUpdateOne) SetEffectiveTo(v time.Time) *AddonUpdateOne", + "line": 709 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *AddonUpdateOne) SetNillableEffectiveTo(v *time.Time) *AddonUpdateOne", + "line": 715 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *AddonUpdateOne) ClearEffectiveTo() *AddonUpdateOne", + "line": 723 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *AddonUpdateOne) SetAnnotations(v models.Annotations) *AddonUpdateOne", + "line": 729 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *AddonUpdateOne) ClearAnnotations() *AddonUpdateOne", + "line": 735 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *AddonUpdateOne) AddRatecardIDs(ids ...string) *AddonUpdateOne", + "line": 741 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_u *AddonUpdateOne) AddRatecards(v ...*AddonRateCard) *AddonUpdateOne", + "line": 747 + }, + { + "kind": "func", + "name": "AddPlanIDs", + "signature": "func (_u *AddonUpdateOne) AddPlanIDs(ids ...string) *AddonUpdateOne", + "line": 756 + }, + { + "kind": "func", + "name": "AddPlans", + "signature": "func (_u *AddonUpdateOne) AddPlans(v ...*PlanAddon) *AddonUpdateOne", + "line": 762 + }, + { + "kind": "func", + "name": "AddSubscriptionAddonIDs", + "signature": "func (_u *AddonUpdateOne) AddSubscriptionAddonIDs(ids ...string) *AddonUpdateOne", + "line": 771 + }, + { + "kind": "func", + "name": "AddSubscriptionAddons", + "signature": "func (_u *AddonUpdateOne) AddSubscriptionAddons(v ...*SubscriptionAddon) *AddonUpdateOne", + "line": 777 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AddonUpdateOne) Mutation() *AddonMutation", + "line": 786 + }, + { + "kind": "func", + "name": "ClearRatecards", + "signature": "func (_u *AddonUpdateOne) ClearRatecards() *AddonUpdateOne", + "line": 791 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *AddonUpdateOne) RemoveRatecardIDs(ids ...string) *AddonUpdateOne", + "line": 797 + }, + { + "kind": "func", + "name": "RemoveRatecards", + "signature": "func (_u *AddonUpdateOne) RemoveRatecards(v ...*AddonRateCard) *AddonUpdateOne", + "line": 803 + }, + { + "kind": "func", + "name": "ClearPlans", + "signature": "func (_u *AddonUpdateOne) ClearPlans() *AddonUpdateOne", + "line": 812 + }, + { + "kind": "func", + "name": "RemovePlanIDs", + "signature": "func (_u *AddonUpdateOne) RemovePlanIDs(ids ...string) *AddonUpdateOne", + "line": 818 + }, + { + "kind": "func", + "name": "RemovePlans", + "signature": "func (_u *AddonUpdateOne) RemovePlans(v ...*PlanAddon) *AddonUpdateOne", + "line": 824 + }, + { + "kind": "func", + "name": "ClearSubscriptionAddons", + "signature": "func (_u *AddonUpdateOne) ClearSubscriptionAddons() *AddonUpdateOne", + "line": 833 + }, + { + "kind": "func", + "name": "RemoveSubscriptionAddonIDs", + "signature": "func (_u *AddonUpdateOne) RemoveSubscriptionAddonIDs(ids ...string) *AddonUpdateOne", + "line": 839 + }, + { + "kind": "func", + "name": "RemoveSubscriptionAddons", + "signature": "func (_u *AddonUpdateOne) RemoveSubscriptionAddons(v ...*SubscriptionAddon) *AddonUpdateOne", + "line": 845 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AddonUpdateOne) Where(ps ...predicate.Addon) *AddonUpdateOne", + "line": 854 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AddonUpdateOne) Select(field string, fields ...string) *AddonUpdateOne", + "line": 861 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AddonUpdateOne) Save(ctx context.Context) (*Addon, error)", + "line": 867 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AddonUpdateOne) SaveX(ctx context.Context) *Addon", + "line": 873 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AddonUpdateOne) Exec(ctx context.Context) error", + "line": 882 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AddonUpdateOne) ExecX(ctx context.Context)", + "line": 888 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AddonUpdateOne) defaults()", + "line": 895 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AddonUpdateOne) check() error", + "line": 903 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AddonUpdateOne) sqlSave(ctx context.Context) (_node *Addon, err error)", + "line": 917 + } + ], + "line_count": 1149 + }, + "openmeter/ent/db/addonratecard.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonRateCard", + "signature": "type AddonRateCard struct", + "line": 22 + }, + { + "kind": "struct", + "name": "AddonRateCardEdges", + "signature": "type AddonRateCardEdges struct", + "line": 71 + }, + { + "kind": "func", + "name": "AddonOrErr", + "signature": "func (e AddonRateCardEdges) AddonOrErr() (*Addon, error)", + "line": 85 + }, + { + "kind": "func", + "name": "FeaturesOrErr", + "signature": "func (e AddonRateCardEdges) FeaturesOrErr() (*Feature, error)", + "line": 96 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e AddonRateCardEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 107 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AddonRateCard) assignValues(columns []string, values []any) error", + "line": 144 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AddonRateCard) Value(name string) (ent.Value, error)", + "line": 288 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_m *AddonRateCard) QueryAddon() *AddonQuery", + "line": 293 + }, + { + "kind": "func", + "name": "QueryFeatures", + "signature": "func (_m *AddonRateCard) QueryFeatures() *FeatureQuery", + "line": 298 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *AddonRateCard) QueryTaxCode() *TaxCodeQuery", + "line": 303 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AddonRateCard) Update() *AddonRateCardUpdateOne", + "line": 310 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AddonRateCard) Unwrap() *AddonRateCard", + "line": 316 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AddonRateCard) String() string", + "line": 326 + } + ], + "line_count": 413 + }, + "openmeter/ent/db/addonratecard/addonratecard.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 114 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 148 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type productcatalog.RateCardType) error", + "line": 158 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 176 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 181 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 186 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 191 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 196 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 201 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 206 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 211 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 216 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 221 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 226 + }, + { + "kind": "func", + "name": "ByEntitlementTemplate", + "signature": "func ByEntitlementTemplate(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByTaxConfig", + "signature": "func ByTaxConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByBillingCadence", + "signature": "func ByBillingCadence(opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 246 + }, + { + "kind": "func", + "name": "ByDiscounts", + "signature": "func ByDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByAddonID", + "signature": "func ByAddonID(opts ...sql.OrderTermOption) OrderOption", + "line": 256 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 261 + }, + { + "kind": "func", + "name": "ByAddonField", + "signature": "func ByAddonField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByFeaturesField", + "signature": "func ByFeaturesField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 280 + }, + { + "kind": "func", + "name": "newAddonStep", + "signature": "func newAddonStep() *sqlgraph.Step", + "line": 285 + }, + { + "kind": "func", + "name": "newFeaturesStep", + "signature": "func newFeaturesStep() *sqlgraph.Step", + "line": 292 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 299 + } + ], + "line_count": 305 + }, + "openmeter/ent/db/addonratecard/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.AddonRateCard", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.AddonRateCard", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.AddonRateCard", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.AddonRateCard", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.AddonRateCard", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.AddonRateCard", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.AddonRateCard", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.AddonRateCard", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.AddonRateCard", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.AddonRateCard", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.AddonRateCard", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AddonRateCard", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AddonRateCard", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AddonRateCard", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AddonRateCard", + "line": 86 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.AddonRateCard", + "line": 91 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.AddonRateCard", + "line": 96 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.AddonRateCard", + "line": 101 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.AddonRateCard", + "line": 106 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.AddonRateCard", + "line": 111 + }, + { + "kind": "func", + "name": "BillingCadence", + "signature": "func BillingCadence(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 116 + }, + { + "kind": "func", + "name": "AddonID", + "signature": "func AddonID(v string) predicate.AddonRateCard", + "line": 122 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.AddonRateCard", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AddonRateCard", + "line": 132 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AddonRateCard", + "line": 137 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AddonRateCard", + "line": 142 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AddonRateCard", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AddonRateCard", + "line": 152 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AddonRateCard", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AddonRateCard", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AddonRateCard", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AddonRateCard", + "line": 172 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AddonRateCard", + "line": 177 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AddonRateCard", + "line": 182 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AddonRateCard", + "line": 187 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AddonRateCard", + "line": 192 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.AddonRateCard", + "line": 197 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.AddonRateCard", + "line": 202 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AddonRateCard", + "line": 207 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AddonRateCard", + "line": 212 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AddonRateCard", + "line": 217 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AddonRateCard", + "line": 222 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AddonRateCard", + "line": 227 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AddonRateCard", + "line": 232 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AddonRateCard", + "line": 237 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AddonRateCard", + "line": 242 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AddonRateCard", + "line": 247 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AddonRateCard", + "line": 252 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AddonRateCard", + "line": 257 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AddonRateCard", + "line": 262 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AddonRateCard", + "line": 267 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AddonRateCard", + "line": 272 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AddonRateCard", + "line": 277 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AddonRateCard", + "line": 282 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AddonRateCard", + "line": 287 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AddonRateCard", + "line": 292 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AddonRateCard", + "line": 297 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AddonRateCard", + "line": 302 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AddonRateCard", + "line": 307 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AddonRateCard", + "line": 312 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AddonRateCard", + "line": 317 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AddonRateCard", + "line": 322 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AddonRateCard", + "line": 327 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AddonRateCard", + "line": 332 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.AddonRateCard", + "line": 337 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.AddonRateCard", + "line": 342 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.AddonRateCard", + "line": 347 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.AddonRateCard", + "line": 352 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.AddonRateCard", + "line": 357 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.AddonRateCard", + "line": 362 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.AddonRateCard", + "line": 367 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.AddonRateCard", + "line": 372 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.AddonRateCard", + "line": 377 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.AddonRateCard", + "line": 382 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.AddonRateCard", + "line": 387 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.AddonRateCard", + "line": 392 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.AddonRateCard", + "line": 397 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.AddonRateCard", + "line": 402 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.AddonRateCard", + "line": 407 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.AddonRateCard", + "line": 412 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.AddonRateCard", + "line": 417 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.AddonRateCard", + "line": 422 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.AddonRateCard", + "line": 427 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.AddonRateCard", + "line": 432 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.AddonRateCard", + "line": 437 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.AddonRateCard", + "line": 442 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.AddonRateCard", + "line": 447 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.AddonRateCard", + "line": 452 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.AddonRateCard", + "line": 457 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.AddonRateCard", + "line": 462 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.AddonRateCard", + "line": 467 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.AddonRateCard", + "line": 472 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.AddonRateCard", + "line": 477 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.AddonRateCard", + "line": 482 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.AddonRateCard", + "line": 487 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.AddonRateCard", + "line": 492 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.AddonRateCard", + "line": 497 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.AddonRateCard", + "line": 502 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.AddonRateCard", + "line": 507 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.AddonRateCard", + "line": 512 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.AddonRateCard", + "line": 517 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.AddonRateCard", + "line": 522 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.AddonRateCard", + "line": 527 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.AddonRateCard", + "line": 532 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.AddonRateCard", + "line": 537 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.AddonRateCard", + "line": 542 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.AddonRateCard", + "line": 547 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.AddonRateCard", + "line": 552 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.AddonRateCard", + "line": 557 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.AddonRateCard", + "line": 562 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.AddonRateCard", + "line": 567 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.AddonRateCard", + "line": 572 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.AddonRateCard", + "line": 577 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.AddonRateCard", + "line": 582 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.AddonRateCard", + "line": 587 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.AddonRateCard", + "line": 592 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.AddonRateCard", + "line": 597 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.AddonRateCard", + "line": 602 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.AddonRateCard", + "line": 607 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.AddonRateCard", + "line": 612 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.AddonRateCard", + "line": 617 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.AddonRateCard", + "line": 623 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.AddonRateCard", + "line": 629 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.AddonRateCard", + "line": 638 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.AddonRateCard", + "line": 647 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.AddonRateCard", + "line": 652 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v productcatalog.RateCardType) predicate.AddonRateCard", + "line": 657 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v productcatalog.RateCardType) predicate.AddonRateCard", + "line": 663 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...productcatalog.RateCardType) predicate.AddonRateCard", + "line": 669 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...productcatalog.RateCardType) predicate.AddonRateCard", + "line": 678 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.AddonRateCard", + "line": 687 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.AddonRateCard", + "line": 692 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.AddonRateCard", + "line": 697 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.AddonRateCard", + "line": 702 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.AddonRateCard", + "line": 707 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.AddonRateCard", + "line": 712 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.AddonRateCard", + "line": 717 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.AddonRateCard", + "line": 722 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.AddonRateCard", + "line": 727 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.AddonRateCard", + "line": 732 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.AddonRateCard", + "line": 737 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.AddonRateCard", + "line": 742 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.AddonRateCard", + "line": 747 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.AddonRateCard", + "line": 752 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.AddonRateCard", + "line": 757 + }, + { + "kind": "func", + "name": "EntitlementTemplateIsNil", + "signature": "func EntitlementTemplateIsNil() predicate.AddonRateCard", + "line": 762 + }, + { + "kind": "func", + "name": "EntitlementTemplateNotNil", + "signature": "func EntitlementTemplateNotNil() predicate.AddonRateCard", + "line": 767 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.AddonRateCard", + "line": 772 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.AddonRateCard", + "line": 777 + }, + { + "kind": "func", + "name": "BillingCadenceEQ", + "signature": "func BillingCadenceEQ(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 782 + }, + { + "kind": "func", + "name": "BillingCadenceNEQ", + "signature": "func BillingCadenceNEQ(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 788 + }, + { + "kind": "func", + "name": "BillingCadenceIn", + "signature": "func BillingCadenceIn(vs ...datetime.ISODurationString) predicate.AddonRateCard", + "line": 794 + }, + { + "kind": "func", + "name": "BillingCadenceNotIn", + "signature": "func BillingCadenceNotIn(vs ...datetime.ISODurationString) predicate.AddonRateCard", + "line": 803 + }, + { + "kind": "func", + "name": "BillingCadenceGT", + "signature": "func BillingCadenceGT(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 812 + }, + { + "kind": "func", + "name": "BillingCadenceGTE", + "signature": "func BillingCadenceGTE(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 818 + }, + { + "kind": "func", + "name": "BillingCadenceLT", + "signature": "func BillingCadenceLT(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 824 + }, + { + "kind": "func", + "name": "BillingCadenceLTE", + "signature": "func BillingCadenceLTE(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 830 + }, + { + "kind": "func", + "name": "BillingCadenceContains", + "signature": "func BillingCadenceContains(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 836 + }, + { + "kind": "func", + "name": "BillingCadenceHasPrefix", + "signature": "func BillingCadenceHasPrefix(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 842 + }, + { + "kind": "func", + "name": "BillingCadenceHasSuffix", + "signature": "func BillingCadenceHasSuffix(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 848 + }, + { + "kind": "func", + "name": "BillingCadenceIsNil", + "signature": "func BillingCadenceIsNil() predicate.AddonRateCard", + "line": 854 + }, + { + "kind": "func", + "name": "BillingCadenceNotNil", + "signature": "func BillingCadenceNotNil() predicate.AddonRateCard", + "line": 859 + }, + { + "kind": "func", + "name": "BillingCadenceEqualFold", + "signature": "func BillingCadenceEqualFold(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 864 + }, + { + "kind": "func", + "name": "BillingCadenceContainsFold", + "signature": "func BillingCadenceContainsFold(v datetime.ISODurationString) predicate.AddonRateCard", + "line": 870 + }, + { + "kind": "func", + "name": "PriceIsNil", + "signature": "func PriceIsNil() predicate.AddonRateCard", + "line": 876 + }, + { + "kind": "func", + "name": "PriceNotNil", + "signature": "func PriceNotNil() predicate.AddonRateCard", + "line": 881 + }, + { + "kind": "func", + "name": "DiscountsIsNil", + "signature": "func DiscountsIsNil() predicate.AddonRateCard", + "line": 886 + }, + { + "kind": "func", + "name": "DiscountsNotNil", + "signature": "func DiscountsNotNil() predicate.AddonRateCard", + "line": 891 + }, + { + "kind": "func", + "name": "AddonIDEQ", + "signature": "func AddonIDEQ(v string) predicate.AddonRateCard", + "line": 896 + }, + { + "kind": "func", + "name": "AddonIDNEQ", + "signature": "func AddonIDNEQ(v string) predicate.AddonRateCard", + "line": 901 + }, + { + "kind": "func", + "name": "AddonIDIn", + "signature": "func AddonIDIn(vs ...string) predicate.AddonRateCard", + "line": 906 + }, + { + "kind": "func", + "name": "AddonIDNotIn", + "signature": "func AddonIDNotIn(vs ...string) predicate.AddonRateCard", + "line": 911 + }, + { + "kind": "func", + "name": "AddonIDGT", + "signature": "func AddonIDGT(v string) predicate.AddonRateCard", + "line": 916 + }, + { + "kind": "func", + "name": "AddonIDGTE", + "signature": "func AddonIDGTE(v string) predicate.AddonRateCard", + "line": 921 + }, + { + "kind": "func", + "name": "AddonIDLT", + "signature": "func AddonIDLT(v string) predicate.AddonRateCard", + "line": 926 + }, + { + "kind": "func", + "name": "AddonIDLTE", + "signature": "func AddonIDLTE(v string) predicate.AddonRateCard", + "line": 931 + }, + { + "kind": "func", + "name": "AddonIDContains", + "signature": "func AddonIDContains(v string) predicate.AddonRateCard", + "line": 936 + }, + { + "kind": "func", + "name": "AddonIDHasPrefix", + "signature": "func AddonIDHasPrefix(v string) predicate.AddonRateCard", + "line": 941 + }, + { + "kind": "func", + "name": "AddonIDHasSuffix", + "signature": "func AddonIDHasSuffix(v string) predicate.AddonRateCard", + "line": 946 + }, + { + "kind": "func", + "name": "AddonIDEqualFold", + "signature": "func AddonIDEqualFold(v string) predicate.AddonRateCard", + "line": 951 + }, + { + "kind": "func", + "name": "AddonIDContainsFold", + "signature": "func AddonIDContainsFold(v string) predicate.AddonRateCard", + "line": 956 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.AddonRateCard", + "line": 961 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.AddonRateCard", + "line": 966 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.AddonRateCard", + "line": 971 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.AddonRateCard", + "line": 976 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.AddonRateCard", + "line": 981 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.AddonRateCard", + "line": 986 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.AddonRateCard", + "line": 991 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.AddonRateCard", + "line": 996 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.AddonRateCard", + "line": 1001 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.AddonRateCard", + "line": 1006 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.AddonRateCard", + "line": 1011 + }, + { + "kind": "func", + "name": "FeatureIDIsNil", + "signature": "func FeatureIDIsNil() predicate.AddonRateCard", + "line": 1016 + }, + { + "kind": "func", + "name": "FeatureIDNotNil", + "signature": "func FeatureIDNotNil() predicate.AddonRateCard", + "line": 1021 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.AddonRateCard", + "line": 1026 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.AddonRateCard", + "line": 1031 + }, + { + "kind": "func", + "name": "HasAddon", + "signature": "func HasAddon() predicate.AddonRateCard", + "line": 1036 + }, + { + "kind": "func", + "name": "HasAddonWith", + "signature": "func HasAddonWith(preds ...predicate.Addon) predicate.AddonRateCard", + "line": 1047 + }, + { + "kind": "func", + "name": "HasFeatures", + "signature": "func HasFeatures() predicate.AddonRateCard", + "line": 1059 + }, + { + "kind": "func", + "name": "HasFeaturesWith", + "signature": "func HasFeaturesWith(preds ...predicate.Feature) predicate.AddonRateCard", + "line": 1070 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.AddonRateCard", + "line": 1082 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.AddonRateCard", + "line": 1093 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AddonRateCard) predicate.AddonRateCard", + "line": 1105 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AddonRateCard) predicate.AddonRateCard", + "line": 1110 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AddonRateCard) predicate.AddonRateCard", + "line": 1115 + } + ], + "line_count": 1117 + }, + "openmeter/ent/db/addonratecard_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonRateCardCreate", + "signature": "type AddonRateCardCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AddonRateCardCreate) SetNamespace(v string) *AddonRateCardCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *AddonRateCardCreate) SetMetadata(v map[string]string) *AddonRateCardCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AddonRateCardCreate) SetCreatedAt(v time.Time) *AddonRateCardCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AddonRateCardCreate) SetNillableCreatedAt(v *time.Time) *AddonRateCardCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AddonRateCardCreate) SetUpdatedAt(v time.Time) *AddonRateCardCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AddonRateCardCreate) SetNillableUpdatedAt(v *time.Time) *AddonRateCardCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AddonRateCardCreate) SetDeletedAt(v time.Time) *AddonRateCardCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AddonRateCardCreate) SetNillableDeletedAt(v *time.Time) *AddonRateCardCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *AddonRateCardCreate) SetName(v string) *AddonRateCardCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *AddonRateCardCreate) SetDescription(v string) *AddonRateCardCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *AddonRateCardCreate) SetNillableDescription(v *string) *AddonRateCardCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *AddonRateCardCreate) SetKey(v string) *AddonRateCardCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *AddonRateCardCreate) SetTaxCodeID(v string) *AddonRateCardCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *AddonRateCardCreate) SetNillableTaxCodeID(v *string) *AddonRateCardCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *AddonRateCardCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *AddonRateCardCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *AddonRateCardCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *AddonRateCardCreate) SetType(v productcatalog.RateCardType) *AddonRateCardCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *AddonRateCardCreate) SetFeatureKey(v string) *AddonRateCardCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *AddonRateCardCreate) SetNillableFeatureKey(v *string) *AddonRateCardCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_c *AddonRateCardCreate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardCreate", + "line": 160 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *AddonRateCardCreate) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_c *AddonRateCardCreate) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_c *AddonRateCardCreate) SetNillableBillingCadence(v *datetime.ISODurationString) *AddonRateCardCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *AddonRateCardCreate) SetPrice(v *productcatalog.Price) *AddonRateCardCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_c *AddonRateCardCreate) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (_c *AddonRateCardCreate) SetAddonID(v string) *AddonRateCardCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *AddonRateCardCreate) SetFeatureID(v string) *AddonRateCardCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_c *AddonRateCardCreate) SetNillableFeatureID(v *string) *AddonRateCardCreate", + "line": 210 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *AddonRateCardCreate) SetID(v string) *AddonRateCardCreate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *AddonRateCardCreate) SetNillableID(v *string) *AddonRateCardCreate", + "line": 224 + }, + { + "kind": "func", + "name": "SetAddon", + "signature": "func (_c *AddonRateCardCreate) SetAddon(v *Addon) *AddonRateCardCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_c *AddonRateCardCreate) SetFeaturesID(id string) *AddonRateCardCreate", + "line": 237 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_c *AddonRateCardCreate) SetNillableFeaturesID(id *string) *AddonRateCardCreate", + "line": 243 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_c *AddonRateCardCreate) SetFeatures(v *Feature) *AddonRateCardCreate", + "line": 251 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *AddonRateCardCreate) SetTaxCode(v *TaxCode) *AddonRateCardCreate", + "line": 256 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AddonRateCardCreate) Mutation() *AddonRateCardMutation", + "line": 261 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AddonRateCardCreate) Save(ctx context.Context) (*AddonRateCard, error)", + "line": 266 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AddonRateCardCreate) SaveX(ctx context.Context) *AddonRateCard", + "line": 272 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AddonRateCardCreate) Exec(ctx context.Context) error", + "line": 281 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AddonRateCardCreate) ExecX(ctx context.Context)", + "line": 287 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AddonRateCardCreate) defaults()", + "line": 294 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AddonRateCardCreate) check() error", + "line": 310 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AddonRateCardCreate) sqlSave(ctx context.Context) (*AddonRateCard, error)", + "line": 383 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AddonRateCardCreate) createSpec() (*AddonRateCard, *sqlgraph.CreateSpec, error)", + "line": 409 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AddonRateCardCreate) OnConflict(opts ...sql.ConflictOption) *AddonRateCardUpsertOne", + "line": 569 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AddonRateCardCreate) OnConflictColumns(columns ...string) *AddonRateCardUpsertOne", + "line": 582 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonRateCardUpsert) SetMetadata(v map[string]string) *AddonRateCardUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonRateCardUpsert) UpdateMetadata() *AddonRateCardUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonRateCardUpsert) ClearMetadata() *AddonRateCardUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonRateCardUpsert) SetUpdatedAt(v time.Time) *AddonRateCardUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonRateCardUpsert) UpdateUpdatedAt() *AddonRateCardUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonRateCardUpsert) SetDeletedAt(v time.Time) *AddonRateCardUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonRateCardUpsert) UpdateDeletedAt() *AddonRateCardUpsert", + "line": 639 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonRateCardUpsert) ClearDeletedAt() *AddonRateCardUpsert", + "line": 645 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonRateCardUpsert) SetName(v string) *AddonRateCardUpsert", + "line": 651 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonRateCardUpsert) UpdateName() *AddonRateCardUpsert", + "line": 657 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonRateCardUpsert) SetDescription(v string) *AddonRateCardUpsert", + "line": 663 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonRateCardUpsert) UpdateDescription() *AddonRateCardUpsert", + "line": 669 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonRateCardUpsert) ClearDescription() *AddonRateCardUpsert", + "line": 675 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *AddonRateCardUpsert) SetTaxCodeID(v string) *AddonRateCardUpsert", + "line": 681 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *AddonRateCardUpsert) UpdateTaxCodeID() *AddonRateCardUpsert", + "line": 687 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *AddonRateCardUpsert) ClearTaxCodeID() *AddonRateCardUpsert", + "line": 693 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *AddonRateCardUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardUpsert", + "line": 699 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *AddonRateCardUpsert) UpdateTaxBehavior() *AddonRateCardUpsert", + "line": 705 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *AddonRateCardUpsert) ClearTaxBehavior() *AddonRateCardUpsert", + "line": 711 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *AddonRateCardUpsert) SetFeatureKey(v string) *AddonRateCardUpsert", + "line": 717 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *AddonRateCardUpsert) UpdateFeatureKey() *AddonRateCardUpsert", + "line": 723 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *AddonRateCardUpsert) ClearFeatureKey() *AddonRateCardUpsert", + "line": 729 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsert) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardUpsert", + "line": 735 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsert) UpdateEntitlementTemplate() *AddonRateCardUpsert", + "line": 741 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsert) ClearEntitlementTemplate() *AddonRateCardUpsert", + "line": 747 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *AddonRateCardUpsert) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardUpsert", + "line": 753 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *AddonRateCardUpsert) UpdateTaxConfig() *AddonRateCardUpsert", + "line": 759 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *AddonRateCardUpsert) ClearTaxConfig() *AddonRateCardUpsert", + "line": 765 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *AddonRateCardUpsert) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardUpsert", + "line": 771 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *AddonRateCardUpsert) UpdateBillingCadence() *AddonRateCardUpsert", + "line": 777 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *AddonRateCardUpsert) ClearBillingCadence() *AddonRateCardUpsert", + "line": 783 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *AddonRateCardUpsert) SetPrice(v *productcatalog.Price) *AddonRateCardUpsert", + "line": 789 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *AddonRateCardUpsert) UpdatePrice() *AddonRateCardUpsert", + "line": 795 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *AddonRateCardUpsert) ClearPrice() *AddonRateCardUpsert", + "line": 801 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *AddonRateCardUpsert) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardUpsert", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *AddonRateCardUpsert) UpdateDiscounts() *AddonRateCardUpsert", + "line": 813 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *AddonRateCardUpsert) ClearDiscounts() *AddonRateCardUpsert", + "line": 819 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (u *AddonRateCardUpsert) SetAddonID(v string) *AddonRateCardUpsert", + "line": 825 + }, + { + "kind": "func", + "name": "UpdateAddonID", + "signature": "func (u *AddonRateCardUpsert) UpdateAddonID() *AddonRateCardUpsert", + "line": 831 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *AddonRateCardUpsert) SetFeatureID(v string) *AddonRateCardUpsert", + "line": 837 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *AddonRateCardUpsert) UpdateFeatureID() *AddonRateCardUpsert", + "line": 843 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *AddonRateCardUpsert) ClearFeatureID() *AddonRateCardUpsert", + "line": 849 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AddonRateCardUpsertOne) UpdateNewValues() *AddonRateCardUpsertOne", + "line": 865 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AddonRateCardUpsertOne) Ignore() *AddonRateCardUpsertOne", + "line": 893 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AddonRateCardUpsertOne) DoNothing() *AddonRateCardUpsertOne", + "line": 900 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AddonRateCardUpsertOne) Update(set func(*AddonRateCardUpsert)) *AddonRateCardUpsertOne", + "line": 907 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonRateCardUpsertOne) SetMetadata(v map[string]string) *AddonRateCardUpsertOne", + "line": 915 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonRateCardUpsertOne) UpdateMetadata() *AddonRateCardUpsertOne", + "line": 922 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonRateCardUpsertOne) ClearMetadata() *AddonRateCardUpsertOne", + "line": 929 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonRateCardUpsertOne) SetUpdatedAt(v time.Time) *AddonRateCardUpsertOne", + "line": 936 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonRateCardUpsertOne) UpdateUpdatedAt() *AddonRateCardUpsertOne", + "line": 943 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonRateCardUpsertOne) SetDeletedAt(v time.Time) *AddonRateCardUpsertOne", + "line": 950 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonRateCardUpsertOne) UpdateDeletedAt() *AddonRateCardUpsertOne", + "line": 957 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonRateCardUpsertOne) ClearDeletedAt() *AddonRateCardUpsertOne", + "line": 964 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonRateCardUpsertOne) SetName(v string) *AddonRateCardUpsertOne", + "line": 971 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonRateCardUpsertOne) UpdateName() *AddonRateCardUpsertOne", + "line": 978 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonRateCardUpsertOne) SetDescription(v string) *AddonRateCardUpsertOne", + "line": 985 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonRateCardUpsertOne) UpdateDescription() *AddonRateCardUpsertOne", + "line": 992 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonRateCardUpsertOne) ClearDescription() *AddonRateCardUpsertOne", + "line": 999 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *AddonRateCardUpsertOne) SetTaxCodeID(v string) *AddonRateCardUpsertOne", + "line": 1006 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *AddonRateCardUpsertOne) UpdateTaxCodeID() *AddonRateCardUpsertOne", + "line": 1013 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *AddonRateCardUpsertOne) ClearTaxCodeID() *AddonRateCardUpsertOne", + "line": 1020 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *AddonRateCardUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardUpsertOne", + "line": 1027 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *AddonRateCardUpsertOne) UpdateTaxBehavior() *AddonRateCardUpsertOne", + "line": 1034 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *AddonRateCardUpsertOne) ClearTaxBehavior() *AddonRateCardUpsertOne", + "line": 1041 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *AddonRateCardUpsertOne) SetFeatureKey(v string) *AddonRateCardUpsertOne", + "line": 1048 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *AddonRateCardUpsertOne) UpdateFeatureKey() *AddonRateCardUpsertOne", + "line": 1055 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *AddonRateCardUpsertOne) ClearFeatureKey() *AddonRateCardUpsertOne", + "line": 1062 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardUpsertOne", + "line": 1069 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertOne) UpdateEntitlementTemplate() *AddonRateCardUpsertOne", + "line": 1076 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertOne) ClearEntitlementTemplate() *AddonRateCardUpsertOne", + "line": 1083 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *AddonRateCardUpsertOne) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardUpsertOne", + "line": 1090 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *AddonRateCardUpsertOne) UpdateTaxConfig() *AddonRateCardUpsertOne", + "line": 1097 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *AddonRateCardUpsertOne) ClearTaxConfig() *AddonRateCardUpsertOne", + "line": 1104 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *AddonRateCardUpsertOne) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardUpsertOne", + "line": 1111 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *AddonRateCardUpsertOne) UpdateBillingCadence() *AddonRateCardUpsertOne", + "line": 1118 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *AddonRateCardUpsertOne) ClearBillingCadence() *AddonRateCardUpsertOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *AddonRateCardUpsertOne) SetPrice(v *productcatalog.Price) *AddonRateCardUpsertOne", + "line": 1132 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *AddonRateCardUpsertOne) UpdatePrice() *AddonRateCardUpsertOne", + "line": 1139 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *AddonRateCardUpsertOne) ClearPrice() *AddonRateCardUpsertOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *AddonRateCardUpsertOne) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardUpsertOne", + "line": 1153 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *AddonRateCardUpsertOne) UpdateDiscounts() *AddonRateCardUpsertOne", + "line": 1160 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *AddonRateCardUpsertOne) ClearDiscounts() *AddonRateCardUpsertOne", + "line": 1167 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (u *AddonRateCardUpsertOne) SetAddonID(v string) *AddonRateCardUpsertOne", + "line": 1174 + }, + { + "kind": "func", + "name": "UpdateAddonID", + "signature": "func (u *AddonRateCardUpsertOne) UpdateAddonID() *AddonRateCardUpsertOne", + "line": 1181 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *AddonRateCardUpsertOne) SetFeatureID(v string) *AddonRateCardUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *AddonRateCardUpsertOne) UpdateFeatureID() *AddonRateCardUpsertOne", + "line": 1195 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *AddonRateCardUpsertOne) ClearFeatureID() *AddonRateCardUpsertOne", + "line": 1202 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AddonRateCardUpsertOne) Exec(ctx context.Context) error", + "line": 1209 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AddonRateCardUpsertOne) ExecX(ctx context.Context)", + "line": 1217 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AddonRateCardUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1224 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AddonRateCardUpsertOne) IDX(ctx context.Context) string", + "line": 1238 + }, + { + "kind": "struct", + "name": "AddonRateCardCreateBulk", + "signature": "type AddonRateCardCreateBulk struct", + "line": 1247 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AddonRateCardCreateBulk) Save(ctx context.Context) ([]*AddonRateCard, error)", + "line": 1255 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AddonRateCardCreateBulk) SaveX(ctx context.Context) []*AddonRateCard", + "line": 1314 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AddonRateCardCreateBulk) Exec(ctx context.Context) error", + "line": 1323 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AddonRateCardCreateBulk) ExecX(ctx context.Context)", + "line": 1329 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AddonRateCardCreateBulk) OnConflict(opts ...sql.ConflictOption) *AddonRateCardUpsertBulk", + "line": 1350 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AddonRateCardCreateBulk) OnConflictColumns(columns ...string) *AddonRateCardUpsertBulk", + "line": 1363 + }, + { + "kind": "struct", + "name": "AddonRateCardUpsertBulk", + "signature": "type AddonRateCardUpsertBulk struct", + "line": 1372 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateNewValues() *AddonRateCardUpsertBulk", + "line": 1387 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AddonRateCardUpsertBulk) Ignore() *AddonRateCardUpsertBulk", + "line": 1417 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AddonRateCardUpsertBulk) DoNothing() *AddonRateCardUpsertBulk", + "line": 1424 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AddonRateCardUpsertBulk) Update(set func(*AddonRateCardUpsert)) *AddonRateCardUpsertBulk", + "line": 1431 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AddonRateCardUpsertBulk) SetMetadata(v map[string]string) *AddonRateCardUpsertBulk", + "line": 1439 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateMetadata() *AddonRateCardUpsertBulk", + "line": 1446 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AddonRateCardUpsertBulk) ClearMetadata() *AddonRateCardUpsertBulk", + "line": 1453 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AddonRateCardUpsertBulk) SetUpdatedAt(v time.Time) *AddonRateCardUpsertBulk", + "line": 1460 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateUpdatedAt() *AddonRateCardUpsertBulk", + "line": 1467 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AddonRateCardUpsertBulk) SetDeletedAt(v time.Time) *AddonRateCardUpsertBulk", + "line": 1474 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateDeletedAt() *AddonRateCardUpsertBulk", + "line": 1481 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AddonRateCardUpsertBulk) ClearDeletedAt() *AddonRateCardUpsertBulk", + "line": 1488 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AddonRateCardUpsertBulk) SetName(v string) *AddonRateCardUpsertBulk", + "line": 1495 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateName() *AddonRateCardUpsertBulk", + "line": 1502 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AddonRateCardUpsertBulk) SetDescription(v string) *AddonRateCardUpsertBulk", + "line": 1509 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateDescription() *AddonRateCardUpsertBulk", + "line": 1516 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AddonRateCardUpsertBulk) ClearDescription() *AddonRateCardUpsertBulk", + "line": 1523 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *AddonRateCardUpsertBulk) SetTaxCodeID(v string) *AddonRateCardUpsertBulk", + "line": 1530 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateTaxCodeID() *AddonRateCardUpsertBulk", + "line": 1537 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *AddonRateCardUpsertBulk) ClearTaxCodeID() *AddonRateCardUpsertBulk", + "line": 1544 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *AddonRateCardUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardUpsertBulk", + "line": 1551 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateTaxBehavior() *AddonRateCardUpsertBulk", + "line": 1558 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *AddonRateCardUpsertBulk) ClearTaxBehavior() *AddonRateCardUpsertBulk", + "line": 1565 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *AddonRateCardUpsertBulk) SetFeatureKey(v string) *AddonRateCardUpsertBulk", + "line": 1572 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateFeatureKey() *AddonRateCardUpsertBulk", + "line": 1579 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *AddonRateCardUpsertBulk) ClearFeatureKey() *AddonRateCardUpsertBulk", + "line": 1586 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertBulk) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardUpsertBulk", + "line": 1593 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateEntitlementTemplate() *AddonRateCardUpsertBulk", + "line": 1600 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *AddonRateCardUpsertBulk) ClearEntitlementTemplate() *AddonRateCardUpsertBulk", + "line": 1607 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *AddonRateCardUpsertBulk) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardUpsertBulk", + "line": 1614 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateTaxConfig() *AddonRateCardUpsertBulk", + "line": 1621 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *AddonRateCardUpsertBulk) ClearTaxConfig() *AddonRateCardUpsertBulk", + "line": 1628 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *AddonRateCardUpsertBulk) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardUpsertBulk", + "line": 1635 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateBillingCadence() *AddonRateCardUpsertBulk", + "line": 1642 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *AddonRateCardUpsertBulk) ClearBillingCadence() *AddonRateCardUpsertBulk", + "line": 1649 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *AddonRateCardUpsertBulk) SetPrice(v *productcatalog.Price) *AddonRateCardUpsertBulk", + "line": 1656 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *AddonRateCardUpsertBulk) UpdatePrice() *AddonRateCardUpsertBulk", + "line": 1663 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *AddonRateCardUpsertBulk) ClearPrice() *AddonRateCardUpsertBulk", + "line": 1670 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *AddonRateCardUpsertBulk) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardUpsertBulk", + "line": 1677 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateDiscounts() *AddonRateCardUpsertBulk", + "line": 1684 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *AddonRateCardUpsertBulk) ClearDiscounts() *AddonRateCardUpsertBulk", + "line": 1691 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (u *AddonRateCardUpsertBulk) SetAddonID(v string) *AddonRateCardUpsertBulk", + "line": 1698 + }, + { + "kind": "func", + "name": "UpdateAddonID", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateAddonID() *AddonRateCardUpsertBulk", + "line": 1705 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *AddonRateCardUpsertBulk) SetFeatureID(v string) *AddonRateCardUpsertBulk", + "line": 1712 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *AddonRateCardUpsertBulk) UpdateFeatureID() *AddonRateCardUpsertBulk", + "line": 1719 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *AddonRateCardUpsertBulk) ClearFeatureID() *AddonRateCardUpsertBulk", + "line": 1726 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AddonRateCardUpsertBulk) Exec(ctx context.Context) error", + "line": 1733 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AddonRateCardUpsertBulk) ExecX(ctx context.Context)", + "line": 1749 + } + ], + "line_count": 1753 + }, + "openmeter/ent/db/addonratecard_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonRateCardDelete", + "signature": "type AddonRateCardDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AddonRateCardDelete) Where(ps ...predicate.AddonRateCard) *AddonRateCardDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AddonRateCardDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AddonRateCardDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AddonRateCardDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AddonRateCardDeleteOne", + "signature": "type AddonRateCardDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AddonRateCardDeleteOne) Where(ps ...predicate.AddonRateCard) *AddonRateCardDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AddonRateCardDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AddonRateCardDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/addonratecard_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonRateCardQuery", + "signature": "type AddonRateCardQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AddonRateCardQuery) Where(ps ...predicate.AddonRateCard) *AddonRateCardQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AddonRateCardQuery) Limit(limit int) *AddonRateCardQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AddonRateCardQuery) Offset(offset int) *AddonRateCardQuery", + "line": 51 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AddonRateCardQuery) Unique(unique bool) *AddonRateCardQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AddonRateCardQuery) Order(o ...addonratecard.OrderOption) *AddonRateCardQuery", + "line": 64 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_q *AddonRateCardQuery) QueryAddon() *AddonQuery", + "line": 70 + }, + { + "kind": "func", + "name": "QueryFeatures", + "signature": "func (_q *AddonRateCardQuery) QueryFeatures() *FeatureQuery", + "line": 92 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *AddonRateCardQuery) QueryTaxCode() *TaxCodeQuery", + "line": 114 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AddonRateCardQuery) First(ctx context.Context) (*AddonRateCard, error)", + "line": 137 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AddonRateCardQuery) FirstX(ctx context.Context) *AddonRateCard", + "line": 149 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AddonRateCardQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 159 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AddonRateCardQuery) FirstIDX(ctx context.Context) string", + "line": 172 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AddonRateCardQuery) Only(ctx context.Context) (*AddonRateCard, error)", + "line": 183 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AddonRateCardQuery) OnlyX(ctx context.Context) *AddonRateCard", + "line": 199 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AddonRateCardQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 210 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AddonRateCardQuery) OnlyIDX(ctx context.Context) string", + "line": 227 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AddonRateCardQuery) All(ctx context.Context) ([]*AddonRateCard, error)", + "line": 236 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AddonRateCardQuery) AllX(ctx context.Context) []*AddonRateCard", + "line": 246 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AddonRateCardQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 255 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AddonRateCardQuery) IDsX(ctx context.Context) []string", + "line": 267 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AddonRateCardQuery) Count(ctx context.Context) (int, error)", + "line": 276 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AddonRateCardQuery) CountX(ctx context.Context) int", + "line": 285 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AddonRateCardQuery) Exist(ctx context.Context) (bool, error)", + "line": 294 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AddonRateCardQuery) ExistX(ctx context.Context) bool", + "line": 307 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AddonRateCardQuery) Clone() *AddonRateCardQuery", + "line": 317 + }, + { + "kind": "func", + "name": "WithAddon", + "signature": "func (_q *AddonRateCardQuery) WithAddon(opts ...func(*AddonQuery)) *AddonRateCardQuery", + "line": 338 + }, + { + "kind": "func", + "name": "WithFeatures", + "signature": "func (_q *AddonRateCardQuery) WithFeatures(opts ...func(*FeatureQuery)) *AddonRateCardQuery", + "line": 349 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *AddonRateCardQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *AddonRateCardQuery", + "line": 360 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AddonRateCardQuery) GroupBy(field string, fields ...string) *AddonRateCardGroupBy", + "line": 383 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AddonRateCardQuery) Select(fields ...string) *AddonRateCardSelect", + "line": 404 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AddonRateCardQuery) Aggregate(fns ...AggregateFunc) *AddonRateCardSelect", + "line": 413 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AddonRateCardQuery) prepareQuery(ctx context.Context) error", + "line": 417 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AddonRateCardQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AddonRateCard, error)", + "line": 443 + }, + { + "kind": "func", + "name": "loadAddon", + "signature": "func (_q *AddonRateCardQuery) loadAddon(ctx context.Context, query *AddonQuery, nodes []*AddonRateCard, init func(*AddonRateCard), assign func(*AddonRateCard, *Addon)) error", + "line": 495 + }, + { + "kind": "func", + "name": "loadFeatures", + "signature": "func (_q *AddonRateCardQuery) loadFeatures(ctx context.Context, query *FeatureQuery, nodes []*AddonRateCard, init func(*AddonRateCard), assign func(*AddonRateCard, *Feature)) error", + "line": 524 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *AddonRateCardQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*AddonRateCard, init func(*AddonRateCard), assign func(*AddonRateCard, *TaxCode)) error", + "line": 556 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AddonRateCardQuery) sqlCount(ctx context.Context) (int, error)", + "line": 589 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AddonRateCardQuery) querySpec() *sqlgraph.QuerySpec", + "line": 601 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AddonRateCardQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 650 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AddonRateCardQuery) ForUpdate(opts ...sql.LockOption) *AddonRateCardQuery", + "line": 688 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AddonRateCardQuery) ForShare(opts ...sql.LockOption) *AddonRateCardQuery", + "line": 701 + }, + { + "kind": "struct", + "name": "AddonRateCardGroupBy", + "signature": "type AddonRateCardGroupBy struct", + "line": 712 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AddonRateCardGroupBy) Aggregate(fns ...AggregateFunc) *AddonRateCardGroupBy", + "line": 718 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AddonRateCardGroupBy) Scan(ctx context.Context, v any) error", + "line": 724 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AddonRateCardGroupBy) sqlScan(ctx context.Context, root *AddonRateCardQuery, v any) error", + "line": 732 + }, + { + "kind": "struct", + "name": "AddonRateCardSelect", + "signature": "type AddonRateCardSelect struct", + "line": 760 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AddonRateCardSelect) Aggregate(fns ...AggregateFunc) *AddonRateCardSelect", + "line": 766 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AddonRateCardSelect) Scan(ctx context.Context, v any) error", + "line": 772 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AddonRateCardSelect) sqlScan(ctx context.Context, root *AddonRateCardQuery, v any) error", + "line": 780 + } + ], + "line_count": 799 + }, + "openmeter/ent/db/addonratecard_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AddonRateCardUpdate", + "signature": "type AddonRateCardUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AddonRateCardUpdate) Where(ps ...predicate.AddonRateCard) *AddonRateCardUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AddonRateCardUpdate) SetMetadata(v map[string]string) *AddonRateCardUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AddonRateCardUpdate) ClearMetadata() *AddonRateCardUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AddonRateCardUpdate) SetUpdatedAt(v time.Time) *AddonRateCardUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AddonRateCardUpdate) SetDeletedAt(v time.Time) *AddonRateCardUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AddonRateCardUpdate) SetNillableDeletedAt(v *time.Time) *AddonRateCardUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AddonRateCardUpdate) ClearDeletedAt() *AddonRateCardUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AddonRateCardUpdate) SetName(v string) *AddonRateCardUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AddonRateCardUpdate) SetNillableName(v *string) *AddonRateCardUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AddonRateCardUpdate) SetDescription(v string) *AddonRateCardUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AddonRateCardUpdate) SetNillableDescription(v *string) *AddonRateCardUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AddonRateCardUpdate) ClearDescription() *AddonRateCardUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *AddonRateCardUpdate) SetTaxCodeID(v string) *AddonRateCardUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *AddonRateCardUpdate) SetNillableTaxCodeID(v *string) *AddonRateCardUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *AddonRateCardUpdate) ClearTaxCodeID() *AddonRateCardUpdate", + "line": 123 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *AddonRateCardUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *AddonRateCardUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *AddonRateCardUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *AddonRateCardUpdate) ClearTaxBehavior() *AddonRateCardUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *AddonRateCardUpdate) SetFeatureKey(v string) *AddonRateCardUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *AddonRateCardUpdate) SetNillableFeatureKey(v *string) *AddonRateCardUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *AddonRateCardUpdate) ClearFeatureKey() *AddonRateCardUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *AddonRateCardUpdate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *AddonRateCardUpdate) ClearEntitlementTemplate() *AddonRateCardUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *AddonRateCardUpdate) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *AddonRateCardUpdate) ClearTaxConfig() *AddonRateCardUpdate", + "line": 187 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *AddonRateCardUpdate) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardUpdate", + "line": 193 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *AddonRateCardUpdate) SetNillableBillingCadence(v *datetime.ISODurationString) *AddonRateCardUpdate", + "line": 199 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *AddonRateCardUpdate) ClearBillingCadence() *AddonRateCardUpdate", + "line": 207 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *AddonRateCardUpdate) SetPrice(v *productcatalog.Price) *AddonRateCardUpdate", + "line": 213 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *AddonRateCardUpdate) ClearPrice() *AddonRateCardUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *AddonRateCardUpdate) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *AddonRateCardUpdate) ClearDiscounts() *AddonRateCardUpdate", + "line": 231 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (_u *AddonRateCardUpdate) SetAddonID(v string) *AddonRateCardUpdate", + "line": 237 + }, + { + "kind": "func", + "name": "SetNillableAddonID", + "signature": "func (_u *AddonRateCardUpdate) SetNillableAddonID(v *string) *AddonRateCardUpdate", + "line": 243 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *AddonRateCardUpdate) SetFeatureID(v string) *AddonRateCardUpdate", + "line": 251 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *AddonRateCardUpdate) SetNillableFeatureID(v *string) *AddonRateCardUpdate", + "line": 257 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *AddonRateCardUpdate) ClearFeatureID() *AddonRateCardUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "SetAddon", + "signature": "func (_u *AddonRateCardUpdate) SetAddon(v *Addon) *AddonRateCardUpdate", + "line": 271 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_u *AddonRateCardUpdate) SetFeaturesID(id string) *AddonRateCardUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_u *AddonRateCardUpdate) SetNillableFeaturesID(id *string) *AddonRateCardUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_u *AddonRateCardUpdate) SetFeatures(v *Feature) *AddonRateCardUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *AddonRateCardUpdate) SetTaxCode(v *TaxCode) *AddonRateCardUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AddonRateCardUpdate) Mutation() *AddonRateCardMutation", + "line": 300 + }, + { + "kind": "func", + "name": "ClearAddon", + "signature": "func (_u *AddonRateCardUpdate) ClearAddon() *AddonRateCardUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "ClearFeatures", + "signature": "func (_u *AddonRateCardUpdate) ClearFeatures() *AddonRateCardUpdate", + "line": 311 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *AddonRateCardUpdate) ClearTaxCode() *AddonRateCardUpdate", + "line": 317 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AddonRateCardUpdate) Save(ctx context.Context) (int, error)", + "line": 323 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AddonRateCardUpdate) SaveX(ctx context.Context) int", + "line": 329 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AddonRateCardUpdate) Exec(ctx context.Context) error", + "line": 338 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AddonRateCardUpdate) ExecX(ctx context.Context)", + "line": 344 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AddonRateCardUpdate) defaults()", + "line": 351 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AddonRateCardUpdate) check() error", + "line": 359 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AddonRateCardUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 396 + }, + { + "kind": "struct", + "name": "AddonRateCardUpdateOne", + "signature": "type AddonRateCardUpdateOne struct", + "line": 590 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AddonRateCardUpdateOne) SetMetadata(v map[string]string) *AddonRateCardUpdateOne", + "line": 598 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AddonRateCardUpdateOne) ClearMetadata() *AddonRateCardUpdateOne", + "line": 604 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AddonRateCardUpdateOne) SetUpdatedAt(v time.Time) *AddonRateCardUpdateOne", + "line": 610 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AddonRateCardUpdateOne) SetDeletedAt(v time.Time) *AddonRateCardUpdateOne", + "line": 616 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableDeletedAt(v *time.Time) *AddonRateCardUpdateOne", + "line": 622 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AddonRateCardUpdateOne) ClearDeletedAt() *AddonRateCardUpdateOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AddonRateCardUpdateOne) SetName(v string) *AddonRateCardUpdateOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableName(v *string) *AddonRateCardUpdateOne", + "line": 642 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AddonRateCardUpdateOne) SetDescription(v string) *AddonRateCardUpdateOne", + "line": 650 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableDescription(v *string) *AddonRateCardUpdateOne", + "line": 656 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AddonRateCardUpdateOne) ClearDescription() *AddonRateCardUpdateOne", + "line": 664 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *AddonRateCardUpdateOne) SetTaxCodeID(v string) *AddonRateCardUpdateOne", + "line": 670 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableTaxCodeID(v *string) *AddonRateCardUpdateOne", + "line": 676 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *AddonRateCardUpdateOne) ClearTaxCodeID() *AddonRateCardUpdateOne", + "line": 684 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *AddonRateCardUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *AddonRateCardUpdateOne", + "line": 690 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *AddonRateCardUpdateOne", + "line": 696 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *AddonRateCardUpdateOne) ClearTaxBehavior() *AddonRateCardUpdateOne", + "line": 704 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *AddonRateCardUpdateOne) SetFeatureKey(v string) *AddonRateCardUpdateOne", + "line": 710 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableFeatureKey(v *string) *AddonRateCardUpdateOne", + "line": 716 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *AddonRateCardUpdateOne) ClearFeatureKey() *AddonRateCardUpdateOne", + "line": 724 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *AddonRateCardUpdateOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *AddonRateCardUpdateOne", + "line": 730 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *AddonRateCardUpdateOne) ClearEntitlementTemplate() *AddonRateCardUpdateOne", + "line": 736 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *AddonRateCardUpdateOne) SetTaxConfig(v *productcatalog.TaxConfig) *AddonRateCardUpdateOne", + "line": 742 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *AddonRateCardUpdateOne) ClearTaxConfig() *AddonRateCardUpdateOne", + "line": 748 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *AddonRateCardUpdateOne) SetBillingCadence(v datetime.ISODurationString) *AddonRateCardUpdateOne", + "line": 754 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableBillingCadence(v *datetime.ISODurationString) *AddonRateCardUpdateOne", + "line": 760 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *AddonRateCardUpdateOne) ClearBillingCadence() *AddonRateCardUpdateOne", + "line": 768 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *AddonRateCardUpdateOne) SetPrice(v *productcatalog.Price) *AddonRateCardUpdateOne", + "line": 774 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *AddonRateCardUpdateOne) ClearPrice() *AddonRateCardUpdateOne", + "line": 780 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *AddonRateCardUpdateOne) SetDiscounts(v *productcatalog.Discounts) *AddonRateCardUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *AddonRateCardUpdateOne) ClearDiscounts() *AddonRateCardUpdateOne", + "line": 792 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (_u *AddonRateCardUpdateOne) SetAddonID(v string) *AddonRateCardUpdateOne", + "line": 798 + }, + { + "kind": "func", + "name": "SetNillableAddonID", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableAddonID(v *string) *AddonRateCardUpdateOne", + "line": 804 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *AddonRateCardUpdateOne) SetFeatureID(v string) *AddonRateCardUpdateOne", + "line": 812 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableFeatureID(v *string) *AddonRateCardUpdateOne", + "line": 818 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *AddonRateCardUpdateOne) ClearFeatureID() *AddonRateCardUpdateOne", + "line": 826 + }, + { + "kind": "func", + "name": "SetAddon", + "signature": "func (_u *AddonRateCardUpdateOne) SetAddon(v *Addon) *AddonRateCardUpdateOne", + "line": 832 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_u *AddonRateCardUpdateOne) SetFeaturesID(id string) *AddonRateCardUpdateOne", + "line": 837 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_u *AddonRateCardUpdateOne) SetNillableFeaturesID(id *string) *AddonRateCardUpdateOne", + "line": 843 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_u *AddonRateCardUpdateOne) SetFeatures(v *Feature) *AddonRateCardUpdateOne", + "line": 851 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *AddonRateCardUpdateOne) SetTaxCode(v *TaxCode) *AddonRateCardUpdateOne", + "line": 856 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AddonRateCardUpdateOne) Mutation() *AddonRateCardMutation", + "line": 861 + }, + { + "kind": "func", + "name": "ClearAddon", + "signature": "func (_u *AddonRateCardUpdateOne) ClearAddon() *AddonRateCardUpdateOne", + "line": 866 + }, + { + "kind": "func", + "name": "ClearFeatures", + "signature": "func (_u *AddonRateCardUpdateOne) ClearFeatures() *AddonRateCardUpdateOne", + "line": 872 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *AddonRateCardUpdateOne) ClearTaxCode() *AddonRateCardUpdateOne", + "line": 878 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AddonRateCardUpdateOne) Where(ps ...predicate.AddonRateCard) *AddonRateCardUpdateOne", + "line": 884 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AddonRateCardUpdateOne) Select(field string, fields ...string) *AddonRateCardUpdateOne", + "line": 891 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AddonRateCardUpdateOne) Save(ctx context.Context) (*AddonRateCard, error)", + "line": 897 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AddonRateCardUpdateOne) SaveX(ctx context.Context) *AddonRateCard", + "line": 903 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AddonRateCardUpdateOne) Exec(ctx context.Context) error", + "line": 912 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AddonRateCardUpdateOne) ExecX(ctx context.Context)", + "line": 918 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AddonRateCardUpdateOne) defaults()", + "line": 925 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AddonRateCardUpdateOne) check() error", + "line": 933 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AddonRateCardUpdateOne) sqlSave(ctx context.Context) (_node *AddonRateCard, err error)", + "line": 970 + } + ], + "line_count": 1181 + }, + "openmeter/ent/db/app.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "App", + "signature": "type App struct", + "line": 18 + }, + { + "kind": "struct", + "name": "AppEdges", + "signature": "type AppEdges struct", + "line": 47 + }, + { + "kind": "func", + "name": "CustomerAppsOrErr", + "signature": "func (e AppEdges) CustomerAppsOrErr() ([]*AppCustomer, error)", + "line": 69 + }, + { + "kind": "func", + "name": "BillingProfileTaxAppOrErr", + "signature": "func (e AppEdges) BillingProfileTaxAppOrErr() ([]*BillingProfile, error)", + "line": 78 + }, + { + "kind": "func", + "name": "BillingProfileInvoicingAppOrErr", + "signature": "func (e AppEdges) BillingProfileInvoicingAppOrErr() ([]*BillingProfile, error)", + "line": 87 + }, + { + "kind": "func", + "name": "BillingProfilePaymentAppOrErr", + "signature": "func (e AppEdges) BillingProfilePaymentAppOrErr() ([]*BillingProfile, error)", + "line": 96 + }, + { + "kind": "func", + "name": "BillingInvoiceTaxAppOrErr", + "signature": "func (e AppEdges) BillingInvoiceTaxAppOrErr() ([]*BillingInvoice, error)", + "line": 105 + }, + { + "kind": "func", + "name": "BillingInvoiceInvoicingAppOrErr", + "signature": "func (e AppEdges) BillingInvoiceInvoicingAppOrErr() ([]*BillingInvoice, error)", + "line": 114 + }, + { + "kind": "func", + "name": "BillingInvoicePaymentAppOrErr", + "signature": "func (e AppEdges) BillingInvoicePaymentAppOrErr() ([]*BillingInvoice, error)", + "line": 123 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *App) assignValues(columns []string, values []any) error", + "line": 150 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *App) Value(name string) (ent.Value, error)", + "line": 229 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_m *App) QueryCustomerApps() *AppCustomerQuery", + "line": 234 + }, + { + "kind": "func", + "name": "QueryBillingProfileTaxApp", + "signature": "func (_m *App) QueryBillingProfileTaxApp() *BillingProfileQuery", + "line": 239 + }, + { + "kind": "func", + "name": "QueryBillingProfileInvoicingApp", + "signature": "func (_m *App) QueryBillingProfileInvoicingApp() *BillingProfileQuery", + "line": 244 + }, + { + "kind": "func", + "name": "QueryBillingProfilePaymentApp", + "signature": "func (_m *App) QueryBillingProfilePaymentApp() *BillingProfileQuery", + "line": 249 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceTaxApp", + "signature": "func (_m *App) QueryBillingInvoiceTaxApp() *BillingInvoiceQuery", + "line": 254 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceInvoicingApp", + "signature": "func (_m *App) QueryBillingInvoiceInvoicingApp() *BillingInvoiceQuery", + "line": 259 + }, + { + "kind": "func", + "name": "QueryBillingInvoicePaymentApp", + "signature": "func (_m *App) QueryBillingInvoicePaymentApp() *BillingInvoiceQuery", + "line": 264 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *App) Update() *AppUpdateOne", + "line": 271 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *App) Unwrap() *App", + "line": 277 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *App) String() string", + "line": 287 + } + ], + "line_count": 326 + }, + "openmeter/ent/db/app/app.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 117 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 158 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 173 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByCustomerAppsCount", + "signature": "func ByCustomerAppsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByCustomerApps", + "signature": "func ByCustomerApps(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByBillingProfileTaxAppCount", + "signature": "func ByBillingProfileTaxAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 202 + }, + { + "kind": "func", + "name": "ByBillingProfileTaxApp", + "signature": "func ByBillingProfileTaxApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByBillingProfileInvoicingAppCount", + "signature": "func ByBillingProfileInvoicingAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 216 + }, + { + "kind": "func", + "name": "ByBillingProfileInvoicingApp", + "signature": "func ByBillingProfileInvoicingApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "ByBillingProfilePaymentAppCount", + "signature": "func ByBillingProfilePaymentAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 230 + }, + { + "kind": "func", + "name": "ByBillingProfilePaymentApp", + "signature": "func ByBillingProfilePaymentApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 237 + }, + { + "kind": "func", + "name": "ByBillingInvoiceTaxAppCount", + "signature": "func ByBillingInvoiceTaxAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 244 + }, + { + "kind": "func", + "name": "ByBillingInvoiceTaxApp", + "signature": "func ByBillingInvoiceTaxApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByBillingInvoiceInvoicingAppCount", + "signature": "func ByBillingInvoiceInvoicingAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByBillingInvoiceInvoicingApp", + "signature": "func ByBillingInvoiceInvoicingApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 265 + }, + { + "kind": "func", + "name": "ByBillingInvoicePaymentAppCount", + "signature": "func ByBillingInvoicePaymentAppCount(opts ...sql.OrderTermOption) OrderOption", + "line": 272 + }, + { + "kind": "func", + "name": "ByBillingInvoicePaymentApp", + "signature": "func ByBillingInvoicePaymentApp(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 279 + }, + { + "kind": "func", + "name": "newCustomerAppsStep", + "signature": "func newCustomerAppsStep() *sqlgraph.Step", + "line": 284 + }, + { + "kind": "func", + "name": "newBillingProfileTaxAppStep", + "signature": "func newBillingProfileTaxAppStep() *sqlgraph.Step", + "line": 291 + }, + { + "kind": "func", + "name": "newBillingProfileInvoicingAppStep", + "signature": "func newBillingProfileInvoicingAppStep() *sqlgraph.Step", + "line": 298 + }, + { + "kind": "func", + "name": "newBillingProfilePaymentAppStep", + "signature": "func newBillingProfilePaymentAppStep() *sqlgraph.Step", + "line": 305 + }, + { + "kind": "func", + "name": "newBillingInvoiceTaxAppStep", + "signature": "func newBillingInvoiceTaxAppStep() *sqlgraph.Step", + "line": 312 + }, + { + "kind": "func", + "name": "newBillingInvoiceInvoicingAppStep", + "signature": "func newBillingInvoiceInvoicingAppStep() *sqlgraph.Step", + "line": 319 + }, + { + "kind": "func", + "name": "newBillingInvoicePaymentAppStep", + "signature": "func newBillingInvoicePaymentAppStep() *sqlgraph.Step", + "line": 326 + } + ], + "line_count": 332 + }, + "openmeter/ent/db/app/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.App", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.App", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.App", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.App", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.App", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.App", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.App", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.App", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.App", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.App", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.App", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.App", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.App", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.App", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.App", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.App", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.App", + "line": 95 + }, + { + "kind": "func", + "name": "Type", + "signature": "func Type(v app.AppType) predicate.App", + "line": 100 + }, + { + "kind": "func", + "name": "Status", + "signature": "func Status(v app.AppStatus) predicate.App", + "line": 106 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.App", + "line": 112 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.App", + "line": 117 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.App", + "line": 122 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.App", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.App", + "line": 132 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.App", + "line": 137 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.App", + "line": 142 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.App", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.App", + "line": 152 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.App", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.App", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.App", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.App", + "line": 172 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.App", + "line": 177 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.App", + "line": 182 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.App", + "line": 187 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.App", + "line": 192 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.App", + "line": 197 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.App", + "line": 202 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.App", + "line": 207 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.App", + "line": 212 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.App", + "line": 217 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.App", + "line": 222 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.App", + "line": 227 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.App", + "line": 232 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.App", + "line": 237 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.App", + "line": 242 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.App", + "line": 247 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.App", + "line": 252 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.App", + "line": 257 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.App", + "line": 262 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.App", + "line": 267 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.App", + "line": 272 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.App", + "line": 277 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.App", + "line": 282 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.App", + "line": 287 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.App", + "line": 292 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.App", + "line": 297 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.App", + "line": 302 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.App", + "line": 307 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.App", + "line": 312 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.App", + "line": 317 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.App", + "line": 322 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.App", + "line": 327 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.App", + "line": 332 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.App", + "line": 337 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.App", + "line": 342 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.App", + "line": 347 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.App", + "line": 352 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.App", + "line": 357 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.App", + "line": 362 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.App", + "line": 367 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.App", + "line": 372 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.App", + "line": 377 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.App", + "line": 382 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.App", + "line": 387 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.App", + "line": 392 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.App", + "line": 397 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.App", + "line": 402 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.App", + "line": 407 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.App", + "line": 412 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.App", + "line": 417 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.App", + "line": 422 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.App", + "line": 427 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.App", + "line": 432 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.App", + "line": 437 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.App", + "line": 442 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.App", + "line": 447 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.App", + "line": 452 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v app.AppType) predicate.App", + "line": 457 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v app.AppType) predicate.App", + "line": 463 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...app.AppType) predicate.App", + "line": 469 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...app.AppType) predicate.App", + "line": 478 + }, + { + "kind": "func", + "name": "TypeGT", + "signature": "func TypeGT(v app.AppType) predicate.App", + "line": 487 + }, + { + "kind": "func", + "name": "TypeGTE", + "signature": "func TypeGTE(v app.AppType) predicate.App", + "line": 493 + }, + { + "kind": "func", + "name": "TypeLT", + "signature": "func TypeLT(v app.AppType) predicate.App", + "line": 499 + }, + { + "kind": "func", + "name": "TypeLTE", + "signature": "func TypeLTE(v app.AppType) predicate.App", + "line": 505 + }, + { + "kind": "func", + "name": "TypeContains", + "signature": "func TypeContains(v app.AppType) predicate.App", + "line": 511 + }, + { + "kind": "func", + "name": "TypeHasPrefix", + "signature": "func TypeHasPrefix(v app.AppType) predicate.App", + "line": 517 + }, + { + "kind": "func", + "name": "TypeHasSuffix", + "signature": "func TypeHasSuffix(v app.AppType) predicate.App", + "line": 523 + }, + { + "kind": "func", + "name": "TypeEqualFold", + "signature": "func TypeEqualFold(v app.AppType) predicate.App", + "line": 529 + }, + { + "kind": "func", + "name": "TypeContainsFold", + "signature": "func TypeContainsFold(v app.AppType) predicate.App", + "line": 535 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v app.AppStatus) predicate.App", + "line": 541 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v app.AppStatus) predicate.App", + "line": 547 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...app.AppStatus) predicate.App", + "line": 553 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...app.AppStatus) predicate.App", + "line": 562 + }, + { + "kind": "func", + "name": "StatusGT", + "signature": "func StatusGT(v app.AppStatus) predicate.App", + "line": 571 + }, + { + "kind": "func", + "name": "StatusGTE", + "signature": "func StatusGTE(v app.AppStatus) predicate.App", + "line": 577 + }, + { + "kind": "func", + "name": "StatusLT", + "signature": "func StatusLT(v app.AppStatus) predicate.App", + "line": 583 + }, + { + "kind": "func", + "name": "StatusLTE", + "signature": "func StatusLTE(v app.AppStatus) predicate.App", + "line": 589 + }, + { + "kind": "func", + "name": "StatusContains", + "signature": "func StatusContains(v app.AppStatus) predicate.App", + "line": 595 + }, + { + "kind": "func", + "name": "StatusHasPrefix", + "signature": "func StatusHasPrefix(v app.AppStatus) predicate.App", + "line": 601 + }, + { + "kind": "func", + "name": "StatusHasSuffix", + "signature": "func StatusHasSuffix(v app.AppStatus) predicate.App", + "line": 607 + }, + { + "kind": "func", + "name": "StatusEqualFold", + "signature": "func StatusEqualFold(v app.AppStatus) predicate.App", + "line": 613 + }, + { + "kind": "func", + "name": "StatusContainsFold", + "signature": "func StatusContainsFold(v app.AppStatus) predicate.App", + "line": 619 + }, + { + "kind": "func", + "name": "HasCustomerApps", + "signature": "func HasCustomerApps() predicate.App", + "line": 625 + }, + { + "kind": "func", + "name": "HasCustomerAppsWith", + "signature": "func HasCustomerAppsWith(preds ...predicate.AppCustomer) predicate.App", + "line": 636 + }, + { + "kind": "func", + "name": "HasBillingProfileTaxApp", + "signature": "func HasBillingProfileTaxApp() predicate.App", + "line": 648 + }, + { + "kind": "func", + "name": "HasBillingProfileTaxAppWith", + "signature": "func HasBillingProfileTaxAppWith(preds ...predicate.BillingProfile) predicate.App", + "line": 659 + }, + { + "kind": "func", + "name": "HasBillingProfileInvoicingApp", + "signature": "func HasBillingProfileInvoicingApp() predicate.App", + "line": 671 + }, + { + "kind": "func", + "name": "HasBillingProfileInvoicingAppWith", + "signature": "func HasBillingProfileInvoicingAppWith(preds ...predicate.BillingProfile) predicate.App", + "line": 682 + }, + { + "kind": "func", + "name": "HasBillingProfilePaymentApp", + "signature": "func HasBillingProfilePaymentApp() predicate.App", + "line": 694 + }, + { + "kind": "func", + "name": "HasBillingProfilePaymentAppWith", + "signature": "func HasBillingProfilePaymentAppWith(preds ...predicate.BillingProfile) predicate.App", + "line": 705 + }, + { + "kind": "func", + "name": "HasBillingInvoiceTaxApp", + "signature": "func HasBillingInvoiceTaxApp() predicate.App", + "line": 717 + }, + { + "kind": "func", + "name": "HasBillingInvoiceTaxAppWith", + "signature": "func HasBillingInvoiceTaxAppWith(preds ...predicate.BillingInvoice) predicate.App", + "line": 728 + }, + { + "kind": "func", + "name": "HasBillingInvoiceInvoicingApp", + "signature": "func HasBillingInvoiceInvoicingApp() predicate.App", + "line": 740 + }, + { + "kind": "func", + "name": "HasBillingInvoiceInvoicingAppWith", + "signature": "func HasBillingInvoiceInvoicingAppWith(preds ...predicate.BillingInvoice) predicate.App", + "line": 751 + }, + { + "kind": "func", + "name": "HasBillingInvoicePaymentApp", + "signature": "func HasBillingInvoicePaymentApp() predicate.App", + "line": 763 + }, + { + "kind": "func", + "name": "HasBillingInvoicePaymentAppWith", + "signature": "func HasBillingInvoicePaymentAppWith(preds ...predicate.BillingInvoice) predicate.App", + "line": 774 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.App) predicate.App", + "line": 786 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.App) predicate.App", + "line": 791 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.App) predicate.App", + "line": 796 + } + ], + "line_count": 798 + }, + "openmeter/ent/db/app_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCreate", + "signature": "type AppCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppCreate) SetNamespace(v string) *AppCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *AppCreate) SetMetadata(v map[string]string) *AppCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppCreate) SetCreatedAt(v time.Time) *AppCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppCreate) SetNillableCreatedAt(v *time.Time) *AppCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppCreate) SetUpdatedAt(v time.Time) *AppCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppCreate) SetNillableUpdatedAt(v *time.Time) *AppCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppCreate) SetDeletedAt(v time.Time) *AppCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppCreate) SetNillableDeletedAt(v *time.Time) *AppCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *AppCreate) SetName(v string) *AppCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *AppCreate) SetDescription(v string) *AppCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *AppCreate) SetNillableDescription(v *string) *AppCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *AppCreate) SetType(v app.AppType) *AppCreate", + "line": 105 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *AppCreate) SetStatus(v app.AppStatus) *AppCreate", + "line": 111 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *AppCreate) SetID(v string) *AppCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *AppCreate) SetNillableID(v *string) *AppCreate", + "line": 123 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_c *AppCreate) AddCustomerAppIDs(ids ...int) *AppCreate", + "line": 131 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_c *AppCreate) AddCustomerApps(v ...*AppCustomer) *AppCreate", + "line": 137 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxAppIDs", + "signature": "func (_c *AppCreate) AddBillingProfileTaxAppIDs(ids ...string) *AppCreate", + "line": 146 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxApp", + "signature": "func (_c *AppCreate) AddBillingProfileTaxApp(v ...*BillingProfile) *AppCreate", + "line": 152 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingAppIDs", + "signature": "func (_c *AppCreate) AddBillingProfileInvoicingAppIDs(ids ...string) *AppCreate", + "line": 161 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingApp", + "signature": "func (_c *AppCreate) AddBillingProfileInvoicingApp(v ...*BillingProfile) *AppCreate", + "line": 167 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentAppIDs", + "signature": "func (_c *AppCreate) AddBillingProfilePaymentAppIDs(ids ...string) *AppCreate", + "line": 176 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentApp", + "signature": "func (_c *AppCreate) AddBillingProfilePaymentApp(v ...*BillingProfile) *AppCreate", + "line": 182 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxAppIDs", + "signature": "func (_c *AppCreate) AddBillingInvoiceTaxAppIDs(ids ...string) *AppCreate", + "line": 191 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxApp", + "signature": "func (_c *AppCreate) AddBillingInvoiceTaxApp(v ...*BillingInvoice) *AppCreate", + "line": 197 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingAppIDs", + "signature": "func (_c *AppCreate) AddBillingInvoiceInvoicingAppIDs(ids ...string) *AppCreate", + "line": 206 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingApp", + "signature": "func (_c *AppCreate) AddBillingInvoiceInvoicingApp(v ...*BillingInvoice) *AppCreate", + "line": 212 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentAppIDs", + "signature": "func (_c *AppCreate) AddBillingInvoicePaymentAppIDs(ids ...string) *AppCreate", + "line": 221 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentApp", + "signature": "func (_c *AppCreate) AddBillingInvoicePaymentApp(v ...*BillingInvoice) *AppCreate", + "line": 227 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppCreate) Mutation() *AppMutation", + "line": 236 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCreate) Save(ctx context.Context) (*App, error)", + "line": 241 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCreate) SaveX(ctx context.Context) *App", + "line": 247 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCreate) Exec(ctx context.Context) error", + "line": 256 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCreate) ExecX(ctx context.Context)", + "line": 262 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppCreate) defaults()", + "line": 269 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppCreate) check() error", + "line": 285 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppCreate) sqlSave(ctx context.Context) (*App, error)", + "line": 317 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppCreate) createSpec() (*App, *sqlgraph.CreateSpec)", + "line": 340 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCreate) OnConflict(opts ...sql.ConflictOption) *AppUpsertOne", + "line": 517 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCreate) OnConflictColumns(columns ...string) *AppUpsertOne", + "line": 530 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppUpsert) SetMetadata(v map[string]string) *AppUpsert", + "line": 551 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppUpsert) UpdateMetadata() *AppUpsert", + "line": 557 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppUpsert) ClearMetadata() *AppUpsert", + "line": 563 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppUpsert) SetUpdatedAt(v time.Time) *AppUpsert", + "line": 569 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppUpsert) UpdateUpdatedAt() *AppUpsert", + "line": 575 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppUpsert) SetDeletedAt(v time.Time) *AppUpsert", + "line": 581 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppUpsert) UpdateDeletedAt() *AppUpsert", + "line": 587 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppUpsert) ClearDeletedAt() *AppUpsert", + "line": 593 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AppUpsert) SetName(v string) *AppUpsert", + "line": 599 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AppUpsert) UpdateName() *AppUpsert", + "line": 605 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AppUpsert) SetDescription(v string) *AppUpsert", + "line": 611 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AppUpsert) UpdateDescription() *AppUpsert", + "line": 617 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AppUpsert) ClearDescription() *AppUpsert", + "line": 623 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *AppUpsert) SetStatus(v app.AppStatus) *AppUpsert", + "line": 629 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *AppUpsert) UpdateStatus() *AppUpsert", + "line": 635 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppUpsertOne) UpdateNewValues() *AppUpsertOne", + "line": 651 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppUpsertOne) Ignore() *AppUpsertOne", + "line": 676 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppUpsertOne) DoNothing() *AppUpsertOne", + "line": 683 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppUpsertOne) Update(set func(*AppUpsert)) *AppUpsertOne", + "line": 690 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppUpsertOne) SetMetadata(v map[string]string) *AppUpsertOne", + "line": 698 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppUpsertOne) UpdateMetadata() *AppUpsertOne", + "line": 705 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppUpsertOne) ClearMetadata() *AppUpsertOne", + "line": 712 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppUpsertOne) SetUpdatedAt(v time.Time) *AppUpsertOne", + "line": 719 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppUpsertOne) UpdateUpdatedAt() *AppUpsertOne", + "line": 726 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppUpsertOne) SetDeletedAt(v time.Time) *AppUpsertOne", + "line": 733 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppUpsertOne) UpdateDeletedAt() *AppUpsertOne", + "line": 740 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppUpsertOne) ClearDeletedAt() *AppUpsertOne", + "line": 747 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AppUpsertOne) SetName(v string) *AppUpsertOne", + "line": 754 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AppUpsertOne) UpdateName() *AppUpsertOne", + "line": 761 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AppUpsertOne) SetDescription(v string) *AppUpsertOne", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AppUpsertOne) UpdateDescription() *AppUpsertOne", + "line": 775 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AppUpsertOne) ClearDescription() *AppUpsertOne", + "line": 782 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *AppUpsertOne) SetStatus(v app.AppStatus) *AppUpsertOne", + "line": 789 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *AppUpsertOne) UpdateStatus() *AppUpsertOne", + "line": 796 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppUpsertOne) Exec(ctx context.Context) error", + "line": 803 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppUpsertOne) ExecX(ctx context.Context)", + "line": 811 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 818 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppUpsertOne) IDX(ctx context.Context) string", + "line": 832 + }, + { + "kind": "struct", + "name": "AppCreateBulk", + "signature": "type AppCreateBulk struct", + "line": 841 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCreateBulk) Save(ctx context.Context) ([]*App, error)", + "line": 849 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCreateBulk) SaveX(ctx context.Context) []*App", + "line": 905 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCreateBulk) Exec(ctx context.Context) error", + "line": 914 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCreateBulk) ExecX(ctx context.Context)", + "line": 920 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppUpsertBulk", + "line": 941 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCreateBulk) OnConflictColumns(columns ...string) *AppUpsertBulk", + "line": 954 + }, + { + "kind": "struct", + "name": "AppUpsertBulk", + "signature": "type AppUpsertBulk struct", + "line": 963 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppUpsertBulk) UpdateNewValues() *AppUpsertBulk", + "line": 978 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppUpsertBulk) Ignore() *AppUpsertBulk", + "line": 1005 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppUpsertBulk) DoNothing() *AppUpsertBulk", + "line": 1012 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppUpsertBulk) Update(set func(*AppUpsert)) *AppUpsertBulk", + "line": 1019 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppUpsertBulk) SetMetadata(v map[string]string) *AppUpsertBulk", + "line": 1027 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppUpsertBulk) UpdateMetadata() *AppUpsertBulk", + "line": 1034 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppUpsertBulk) ClearMetadata() *AppUpsertBulk", + "line": 1041 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppUpsertBulk) SetUpdatedAt(v time.Time) *AppUpsertBulk", + "line": 1048 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppUpsertBulk) UpdateUpdatedAt() *AppUpsertBulk", + "line": 1055 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppUpsertBulk) SetDeletedAt(v time.Time) *AppUpsertBulk", + "line": 1062 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppUpsertBulk) UpdateDeletedAt() *AppUpsertBulk", + "line": 1069 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppUpsertBulk) ClearDeletedAt() *AppUpsertBulk", + "line": 1076 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *AppUpsertBulk) SetName(v string) *AppUpsertBulk", + "line": 1083 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *AppUpsertBulk) UpdateName() *AppUpsertBulk", + "line": 1090 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *AppUpsertBulk) SetDescription(v string) *AppUpsertBulk", + "line": 1097 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *AppUpsertBulk) UpdateDescription() *AppUpsertBulk", + "line": 1104 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *AppUpsertBulk) ClearDescription() *AppUpsertBulk", + "line": 1111 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *AppUpsertBulk) SetStatus(v app.AppStatus) *AppUpsertBulk", + "line": 1118 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *AppUpsertBulk) UpdateStatus() *AppUpsertBulk", + "line": 1125 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppUpsertBulk) Exec(ctx context.Context) error", + "line": 1132 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppUpsertBulk) ExecX(ctx context.Context)", + "line": 1148 + } + ], + "line_count": 1152 + }, + "openmeter/ent/db/app_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppDelete", + "signature": "type AppDelete struct", + "line": 17 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppDelete) Where(ps ...predicate.App) *AppDelete", + "line": 24 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppDelete) Exec(ctx context.Context) (int, error)", + "line": 30 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppDelete) ExecX(ctx context.Context) int", + "line": 35 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppDelete) sqlExec(ctx context.Context) (int, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "AppDeleteOne", + "signature": "type AppDeleteOne struct", + "line": 61 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppDeleteOne) Where(ps ...predicate.App) *AppDeleteOne", + "line": 66 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppDeleteOne) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppDeleteOne) ExecX(ctx context.Context)", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/ent/db/app_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppQuery", + "signature": "type AppQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppQuery) Where(ps ...predicate.App) *AppQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppQuery) Limit(limit int) *AppQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppQuery) Offset(offset int) *AppQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppQuery) Unique(unique bool) *AppQuery", + "line": 63 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppQuery) Order(o ...dbapp.OrderOption) *AppQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_q *AppQuery) QueryCustomerApps() *AppCustomerQuery", + "line": 75 + }, + { + "kind": "func", + "name": "QueryBillingProfileTaxApp", + "signature": "func (_q *AppQuery) QueryBillingProfileTaxApp() *BillingProfileQuery", + "line": 97 + }, + { + "kind": "func", + "name": "QueryBillingProfileInvoicingApp", + "signature": "func (_q *AppQuery) QueryBillingProfileInvoicingApp() *BillingProfileQuery", + "line": 119 + }, + { + "kind": "func", + "name": "QueryBillingProfilePaymentApp", + "signature": "func (_q *AppQuery) QueryBillingProfilePaymentApp() *BillingProfileQuery", + "line": 141 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceTaxApp", + "signature": "func (_q *AppQuery) QueryBillingInvoiceTaxApp() *BillingInvoiceQuery", + "line": 163 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceInvoicingApp", + "signature": "func (_q *AppQuery) QueryBillingInvoiceInvoicingApp() *BillingInvoiceQuery", + "line": 185 + }, + { + "kind": "func", + "name": "QueryBillingInvoicePaymentApp", + "signature": "func (_q *AppQuery) QueryBillingInvoicePaymentApp() *BillingInvoiceQuery", + "line": 207 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppQuery) First(ctx context.Context) (*App, error)", + "line": 230 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppQuery) FirstX(ctx context.Context) *App", + "line": 242 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 252 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppQuery) FirstIDX(ctx context.Context) string", + "line": 265 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppQuery) Only(ctx context.Context) (*App, error)", + "line": 276 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppQuery) OnlyX(ctx context.Context) *App", + "line": 292 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 303 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppQuery) OnlyIDX(ctx context.Context) string", + "line": 320 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppQuery) All(ctx context.Context) ([]*App, error)", + "line": 329 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppQuery) AllX(ctx context.Context) []*App", + "line": 339 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 348 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppQuery) IDsX(ctx context.Context) []string", + "line": 360 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppQuery) Count(ctx context.Context) (int, error)", + "line": 369 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppQuery) CountX(ctx context.Context) int", + "line": 378 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppQuery) Exist(ctx context.Context) (bool, error)", + "line": 387 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppQuery) ExistX(ctx context.Context) bool", + "line": 400 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppQuery) Clone() *AppQuery", + "line": 410 + }, + { + "kind": "func", + "name": "WithCustomerApps", + "signature": "func (_q *AppQuery) WithCustomerApps(opts ...func(*AppCustomerQuery)) *AppQuery", + "line": 435 + }, + { + "kind": "func", + "name": "WithBillingProfileTaxApp", + "signature": "func (_q *AppQuery) WithBillingProfileTaxApp(opts ...func(*BillingProfileQuery)) *AppQuery", + "line": 446 + }, + { + "kind": "func", + "name": "WithBillingProfileInvoicingApp", + "signature": "func (_q *AppQuery) WithBillingProfileInvoicingApp(opts ...func(*BillingProfileQuery)) *AppQuery", + "line": 457 + }, + { + "kind": "func", + "name": "WithBillingProfilePaymentApp", + "signature": "func (_q *AppQuery) WithBillingProfilePaymentApp(opts ...func(*BillingProfileQuery)) *AppQuery", + "line": 468 + }, + { + "kind": "func", + "name": "WithBillingInvoiceTaxApp", + "signature": "func (_q *AppQuery) WithBillingInvoiceTaxApp(opts ...func(*BillingInvoiceQuery)) *AppQuery", + "line": 479 + }, + { + "kind": "func", + "name": "WithBillingInvoiceInvoicingApp", + "signature": "func (_q *AppQuery) WithBillingInvoiceInvoicingApp(opts ...func(*BillingInvoiceQuery)) *AppQuery", + "line": 490 + }, + { + "kind": "func", + "name": "WithBillingInvoicePaymentApp", + "signature": "func (_q *AppQuery) WithBillingInvoicePaymentApp(opts ...func(*BillingInvoiceQuery)) *AppQuery", + "line": 501 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy", + "line": 524 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppQuery) Select(fields ...string) *AppSelect", + "line": 545 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect", + "line": 554 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppQuery) prepareQuery(ctx context.Context) error", + "line": 558 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*App, error)", + "line": 584 + }, + { + "kind": "func", + "name": "loadCustomerApps", + "signature": "func (_q *AppQuery) loadCustomerApps(ctx context.Context, query *AppCustomerQuery, nodes []*App, init func(*App), assign func(*App, *AppCustomer)) error", + "line": 683 + }, + { + "kind": "func", + "name": "loadBillingProfileTaxApp", + "signature": "func (_q *AppQuery) loadBillingProfileTaxApp(ctx context.Context, query *BillingProfileQuery, nodes []*App, init func(*App), assign func(*App, *BillingProfile)) error", + "line": 713 + }, + { + "kind": "func", + "name": "loadBillingProfileInvoicingApp", + "signature": "func (_q *AppQuery) loadBillingProfileInvoicingApp(ctx context.Context, query *BillingProfileQuery, nodes []*App, init func(*App), assign func(*App, *BillingProfile)) error", + "line": 743 + }, + { + "kind": "func", + "name": "loadBillingProfilePaymentApp", + "signature": "func (_q *AppQuery) loadBillingProfilePaymentApp(ctx context.Context, query *BillingProfileQuery, nodes []*App, init func(*App), assign func(*App, *BillingProfile)) error", + "line": 773 + }, + { + "kind": "func", + "name": "loadBillingInvoiceTaxApp", + "signature": "func (_q *AppQuery) loadBillingInvoiceTaxApp(ctx context.Context, query *BillingInvoiceQuery, nodes []*App, init func(*App), assign func(*App, *BillingInvoice)) error", + "line": 803 + }, + { + "kind": "func", + "name": "loadBillingInvoiceInvoicingApp", + "signature": "func (_q *AppQuery) loadBillingInvoiceInvoicingApp(ctx context.Context, query *BillingInvoiceQuery, nodes []*App, init func(*App), assign func(*App, *BillingInvoice)) error", + "line": 833 + }, + { + "kind": "func", + "name": "loadBillingInvoicePaymentApp", + "signature": "func (_q *AppQuery) loadBillingInvoicePaymentApp(ctx context.Context, query *BillingInvoiceQuery, nodes []*App, init func(*App), assign func(*App, *BillingInvoice)) error", + "line": 863 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppQuery) sqlCount(ctx context.Context) (int, error)", + "line": 894 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppQuery) querySpec() *sqlgraph.QuerySpec", + "line": 906 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 946 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppQuery) ForUpdate(opts ...sql.LockOption) *AppQuery", + "line": 984 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppQuery) ForShare(opts ...sql.LockOption) *AppQuery", + "line": 997 + }, + { + "kind": "struct", + "name": "AppGroupBy", + "signature": "type AppGroupBy struct", + "line": 1008 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy", + "line": 1014 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppGroupBy) Scan(ctx context.Context, v any) error", + "line": 1020 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppGroupBy) sqlScan(ctx context.Context, root *AppQuery, v any) error", + "line": 1028 + }, + { + "kind": "struct", + "name": "AppSelect", + "signature": "type AppSelect struct", + "line": 1056 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect", + "line": 1062 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppSelect) Scan(ctx context.Context, v any) error", + "line": 1068 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppSelect) sqlScan(ctx context.Context, root *AppQuery, v any) error", + "line": 1076 + } + ], + "line_count": 1095 + }, + "openmeter/ent/db/app_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppUpdate", + "signature": "type AppUpdate struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppUpdate) Where(ps ...predicate.App) *AppUpdate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AppUpdate) SetMetadata(v map[string]string) *AppUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AppUpdate) ClearMetadata() *AppUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppUpdate) SetUpdatedAt(v time.Time) *AppUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppUpdate) SetDeletedAt(v time.Time) *AppUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppUpdate) SetNillableDeletedAt(v *time.Time) *AppUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppUpdate) ClearDeletedAt() *AppUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AppUpdate) SetName(v string) *AppUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AppUpdate) SetNillableName(v *string) *AppUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AppUpdate) SetDescription(v string) *AppUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AppUpdate) SetNillableDescription(v *string) *AppUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AppUpdate) ClearDescription() *AppUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *AppUpdate) SetStatus(v app.AppStatus) *AppUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *AppUpdate) SetNillableStatus(v *app.AppStatus) *AppUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppUpdate) AddCustomerAppIDs(ids ...int) *AppUpdate", + "line": 122 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppUpdate) AddCustomerApps(v ...*AppCustomer) *AppUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxAppIDs", + "signature": "func (_u *AppUpdate) AddBillingProfileTaxAppIDs(ids ...string) *AppUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxApp", + "signature": "func (_u *AppUpdate) AddBillingProfileTaxApp(v ...*BillingProfile) *AppUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingAppIDs", + "signature": "func (_u *AppUpdate) AddBillingProfileInvoicingAppIDs(ids ...string) *AppUpdate", + "line": 152 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdate) AddBillingProfileInvoicingApp(v ...*BillingProfile) *AppUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentAppIDs", + "signature": "func (_u *AppUpdate) AddBillingProfilePaymentAppIDs(ids ...string) *AppUpdate", + "line": 167 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentApp", + "signature": "func (_u *AppUpdate) AddBillingProfilePaymentApp(v ...*BillingProfile) *AppUpdate", + "line": 173 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxAppIDs", + "signature": "func (_u *AppUpdate) AddBillingInvoiceTaxAppIDs(ids ...string) *AppUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdate) AddBillingInvoiceTaxApp(v ...*BillingInvoice) *AppUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingAppIDs", + "signature": "func (_u *AppUpdate) AddBillingInvoiceInvoicingAppIDs(ids ...string) *AppUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdate) AddBillingInvoiceInvoicingApp(v ...*BillingInvoice) *AppUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentAppIDs", + "signature": "func (_u *AppUpdate) AddBillingInvoicePaymentAppIDs(ids ...string) *AppUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdate) AddBillingInvoicePaymentApp(v ...*BillingInvoice) *AppUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppUpdate) Mutation() *AppMutation", + "line": 227 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppUpdate) ClearCustomerApps() *AppUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppUpdate) RemoveCustomerAppIDs(ids ...int) *AppUpdate", + "line": 238 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppUpdate) RemoveCustomerApps(v ...*AppCustomer) *AppUpdate", + "line": 244 + }, + { + "kind": "func", + "name": "ClearBillingProfileTaxApp", + "signature": "func (_u *AppUpdate) ClearBillingProfileTaxApp() *AppUpdate", + "line": 253 + }, + { + "kind": "func", + "name": "RemoveBillingProfileTaxAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingProfileTaxAppIDs(ids ...string) *AppUpdate", + "line": 259 + }, + { + "kind": "func", + "name": "RemoveBillingProfileTaxApp", + "signature": "func (_u *AppUpdate) RemoveBillingProfileTaxApp(v ...*BillingProfile) *AppUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "ClearBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdate) ClearBillingProfileInvoicingApp() *AppUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "RemoveBillingProfileInvoicingAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingProfileInvoicingAppIDs(ids ...string) *AppUpdate", + "line": 280 + }, + { + "kind": "func", + "name": "RemoveBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdate) RemoveBillingProfileInvoicingApp(v ...*BillingProfile) *AppUpdate", + "line": 286 + }, + { + "kind": "func", + "name": "ClearBillingProfilePaymentApp", + "signature": "func (_u *AppUpdate) ClearBillingProfilePaymentApp() *AppUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "RemoveBillingProfilePaymentAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingProfilePaymentAppIDs(ids ...string) *AppUpdate", + "line": 301 + }, + { + "kind": "func", + "name": "RemoveBillingProfilePaymentApp", + "signature": "func (_u *AppUpdate) RemoveBillingProfilePaymentApp(v ...*BillingProfile) *AppUpdate", + "line": 307 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdate) ClearBillingInvoiceTaxApp() *AppUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceTaxAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingInvoiceTaxAppIDs(ids ...string) *AppUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdate) RemoveBillingInvoiceTaxApp(v ...*BillingInvoice) *AppUpdate", + "line": 328 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdate) ClearBillingInvoiceInvoicingApp() *AppUpdate", + "line": 337 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceInvoicingAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingInvoiceInvoicingAppIDs(ids ...string) *AppUpdate", + "line": 343 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdate) RemoveBillingInvoiceInvoicingApp(v ...*BillingInvoice) *AppUpdate", + "line": 349 + }, + { + "kind": "func", + "name": "ClearBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdate) ClearBillingInvoicePaymentApp() *AppUpdate", + "line": 358 + }, + { + "kind": "func", + "name": "RemoveBillingInvoicePaymentAppIDs", + "signature": "func (_u *AppUpdate) RemoveBillingInvoicePaymentAppIDs(ids ...string) *AppUpdate", + "line": 364 + }, + { + "kind": "func", + "name": "RemoveBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdate) RemoveBillingInvoicePaymentApp(v ...*BillingInvoice) *AppUpdate", + "line": 370 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppUpdate) Save(ctx context.Context) (int, error)", + "line": 379 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppUpdate) SaveX(ctx context.Context) int", + "line": 385 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppUpdate) Exec(ctx context.Context) error", + "line": 394 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppUpdate) ExecX(ctx context.Context)", + "line": 400 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppUpdate) defaults()", + "line": 407 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 414 + }, + { + "kind": "struct", + "name": "AppUpdateOne", + "signature": "type AppUpdateOne struct", + "line": 778 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AppUpdateOne) SetMetadata(v map[string]string) *AppUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AppUpdateOne) ClearMetadata() *AppUpdateOne", + "line": 792 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppUpdateOne) SetUpdatedAt(v time.Time) *AppUpdateOne", + "line": 798 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppUpdateOne) SetDeletedAt(v time.Time) *AppUpdateOne", + "line": 804 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppUpdateOne) SetNillableDeletedAt(v *time.Time) *AppUpdateOne", + "line": 810 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppUpdateOne) ClearDeletedAt() *AppUpdateOne", + "line": 818 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *AppUpdateOne) SetName(v string) *AppUpdateOne", + "line": 824 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *AppUpdateOne) SetNillableName(v *string) *AppUpdateOne", + "line": 830 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *AppUpdateOne) SetDescription(v string) *AppUpdateOne", + "line": 838 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *AppUpdateOne) SetNillableDescription(v *string) *AppUpdateOne", + "line": 844 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *AppUpdateOne) ClearDescription() *AppUpdateOne", + "line": 852 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *AppUpdateOne) SetStatus(v app.AppStatus) *AppUpdateOne", + "line": 858 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *AppUpdateOne) SetNillableStatus(v *app.AppStatus) *AppUpdateOne", + "line": 864 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppUpdateOne) AddCustomerAppIDs(ids ...int) *AppUpdateOne", + "line": 872 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppUpdateOne) AddCustomerApps(v ...*AppCustomer) *AppUpdateOne", + "line": 878 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingProfileTaxAppIDs(ids ...string) *AppUpdateOne", + "line": 887 + }, + { + "kind": "func", + "name": "AddBillingProfileTaxApp", + "signature": "func (_u *AppUpdateOne) AddBillingProfileTaxApp(v ...*BillingProfile) *AppUpdateOne", + "line": 893 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingProfileInvoicingAppIDs(ids ...string) *AppUpdateOne", + "line": 902 + }, + { + "kind": "func", + "name": "AddBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdateOne) AddBillingProfileInvoicingApp(v ...*BillingProfile) *AppUpdateOne", + "line": 908 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingProfilePaymentAppIDs(ids ...string) *AppUpdateOne", + "line": 917 + }, + { + "kind": "func", + "name": "AddBillingProfilePaymentApp", + "signature": "func (_u *AppUpdateOne) AddBillingProfilePaymentApp(v ...*BillingProfile) *AppUpdateOne", + "line": 923 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingInvoiceTaxAppIDs(ids ...string) *AppUpdateOne", + "line": 932 + }, + { + "kind": "func", + "name": "AddBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdateOne) AddBillingInvoiceTaxApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 938 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingInvoiceInvoicingAppIDs(ids ...string) *AppUpdateOne", + "line": 947 + }, + { + "kind": "func", + "name": "AddBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdateOne) AddBillingInvoiceInvoicingApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 953 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentAppIDs", + "signature": "func (_u *AppUpdateOne) AddBillingInvoicePaymentAppIDs(ids ...string) *AppUpdateOne", + "line": 962 + }, + { + "kind": "func", + "name": "AddBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdateOne) AddBillingInvoicePaymentApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 968 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppUpdateOne) Mutation() *AppMutation", + "line": 977 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppUpdateOne) ClearCustomerApps() *AppUpdateOne", + "line": 982 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveCustomerAppIDs(ids ...int) *AppUpdateOne", + "line": 988 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppUpdateOne) RemoveCustomerApps(v ...*AppCustomer) *AppUpdateOne", + "line": 994 + }, + { + "kind": "func", + "name": "ClearBillingProfileTaxApp", + "signature": "func (_u *AppUpdateOne) ClearBillingProfileTaxApp() *AppUpdateOne", + "line": 1003 + }, + { + "kind": "func", + "name": "RemoveBillingProfileTaxAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfileTaxAppIDs(ids ...string) *AppUpdateOne", + "line": 1009 + }, + { + "kind": "func", + "name": "RemoveBillingProfileTaxApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfileTaxApp(v ...*BillingProfile) *AppUpdateOne", + "line": 1015 + }, + { + "kind": "func", + "name": "ClearBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdateOne) ClearBillingProfileInvoicingApp() *AppUpdateOne", + "line": 1024 + }, + { + "kind": "func", + "name": "RemoveBillingProfileInvoicingAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfileInvoicingAppIDs(ids ...string) *AppUpdateOne", + "line": 1030 + }, + { + "kind": "func", + "name": "RemoveBillingProfileInvoicingApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfileInvoicingApp(v ...*BillingProfile) *AppUpdateOne", + "line": 1036 + }, + { + "kind": "func", + "name": "ClearBillingProfilePaymentApp", + "signature": "func (_u *AppUpdateOne) ClearBillingProfilePaymentApp() *AppUpdateOne", + "line": 1045 + }, + { + "kind": "func", + "name": "RemoveBillingProfilePaymentAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfilePaymentAppIDs(ids ...string) *AppUpdateOne", + "line": 1051 + }, + { + "kind": "func", + "name": "RemoveBillingProfilePaymentApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingProfilePaymentApp(v ...*BillingProfile) *AppUpdateOne", + "line": 1057 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdateOne) ClearBillingInvoiceTaxApp() *AppUpdateOne", + "line": 1066 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceTaxAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoiceTaxAppIDs(ids ...string) *AppUpdateOne", + "line": 1072 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceTaxApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoiceTaxApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 1078 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdateOne) ClearBillingInvoiceInvoicingApp() *AppUpdateOne", + "line": 1087 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceInvoicingAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoiceInvoicingAppIDs(ids ...string) *AppUpdateOne", + "line": 1093 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceInvoicingApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoiceInvoicingApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 1099 + }, + { + "kind": "func", + "name": "ClearBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdateOne) ClearBillingInvoicePaymentApp() *AppUpdateOne", + "line": 1108 + }, + { + "kind": "func", + "name": "RemoveBillingInvoicePaymentAppIDs", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoicePaymentAppIDs(ids ...string) *AppUpdateOne", + "line": 1114 + }, + { + "kind": "func", + "name": "RemoveBillingInvoicePaymentApp", + "signature": "func (_u *AppUpdateOne) RemoveBillingInvoicePaymentApp(v ...*BillingInvoice) *AppUpdateOne", + "line": 1120 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppUpdateOne) Where(ps ...predicate.App) *AppUpdateOne", + "line": 1129 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne", + "line": 1136 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppUpdateOne) Save(ctx context.Context) (*App, error)", + "line": 1142 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppUpdateOne) SaveX(ctx context.Context) *App", + "line": 1148 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppUpdateOne) Exec(ctx context.Context) error", + "line": 1157 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppUpdateOne) ExecX(ctx context.Context)", + "line": 1163 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppUpdateOne) defaults()", + "line": 1170 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppUpdateOne) sqlSave(ctx context.Context) (_node *App, err error)", + "line": 1177 + } + ], + "line_count": 1558 + }, + "openmeter/ent/db/appcustomer.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomer", + "signature": "type AppCustomer struct", + "line": 18 + }, + { + "kind": "struct", + "name": "AppCustomerEdges", + "signature": "type AppCustomerEdges struct", + "line": 41 + }, + { + "kind": "func", + "name": "AppOrErr", + "signature": "func (e AppCustomerEdges) AppOrErr() (*App, error)", + "line": 53 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e AppCustomerEdges) CustomerOrErr() (*Customer, error)", + "line": 64 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AppCustomer) assignValues(columns []string, values []any) error", + "line": 93 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AppCustomer) Value(name string) (ent.Value, error)", + "line": 151 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_m *AppCustomer) QueryApp() *AppQuery", + "line": 156 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *AppCustomer) QueryCustomer() *CustomerQuery", + "line": 161 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AppCustomer) Update() *AppCustomerUpdateOne", + "line": 168 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AppCustomer) Unwrap() *AppCustomer", + "line": 174 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AppCustomer) String() string", + "line": 184 + } + ], + "line_count": 212 + }, + "openmeter/ent/db/appcustomer/appcustomer.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 63 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 91 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 96 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 101 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 106 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 111 + }, + { + "kind": "func", + "name": "ByAppID", + "signature": "func ByAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 116 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 121 + }, + { + "kind": "func", + "name": "ByAppField", + "signature": "func ByAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "newAppStep", + "signature": "func newAppStep() *sqlgraph.Step", + "line": 138 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 145 + } + ], + "line_count": 151 + }, + "openmeter/ent/db/appcustomer/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.AppCustomer", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.AppCustomer", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.AppCustomer", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.AppCustomer", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.AppCustomer", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.AppCustomer", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.AppCustomer", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.AppCustomer", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.AppCustomer", + "line": 54 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AppCustomer", + "line": 59 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AppCustomer", + "line": 64 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AppCustomer", + "line": 69 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AppCustomer", + "line": 74 + }, + { + "kind": "func", + "name": "AppID", + "signature": "func AppID(v string) predicate.AppCustomer", + "line": 79 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.AppCustomer", + "line": 84 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AppCustomer", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AppCustomer", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AppCustomer", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AppCustomer", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AppCustomer", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AppCustomer", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AppCustomer", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AppCustomer", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AppCustomer", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AppCustomer", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AppCustomer", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AppCustomer", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AppCustomer", + "line": 149 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AppCustomer", + "line": 154 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AppCustomer", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AppCustomer", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AppCustomer", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AppCustomer", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AppCustomer", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AppCustomer", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AppCustomer", + "line": 189 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AppCustomer", + "line": 194 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AppCustomer", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AppCustomer", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AppCustomer", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AppCustomer", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AppCustomer", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AppCustomer", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AppCustomer", + "line": 229 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AppCustomer", + "line": 234 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AppCustomer", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AppCustomer", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AppCustomer", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AppCustomer", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AppCustomer", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AppCustomer", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AppCustomer", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AppCustomer", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AppCustomer", + "line": 279 + }, + { + "kind": "func", + "name": "AppIDEQ", + "signature": "func AppIDEQ(v string) predicate.AppCustomer", + "line": 284 + }, + { + "kind": "func", + "name": "AppIDNEQ", + "signature": "func AppIDNEQ(v string) predicate.AppCustomer", + "line": 289 + }, + { + "kind": "func", + "name": "AppIDIn", + "signature": "func AppIDIn(vs ...string) predicate.AppCustomer", + "line": 294 + }, + { + "kind": "func", + "name": "AppIDNotIn", + "signature": "func AppIDNotIn(vs ...string) predicate.AppCustomer", + "line": 299 + }, + { + "kind": "func", + "name": "AppIDGT", + "signature": "func AppIDGT(v string) predicate.AppCustomer", + "line": 304 + }, + { + "kind": "func", + "name": "AppIDGTE", + "signature": "func AppIDGTE(v string) predicate.AppCustomer", + "line": 309 + }, + { + "kind": "func", + "name": "AppIDLT", + "signature": "func AppIDLT(v string) predicate.AppCustomer", + "line": 314 + }, + { + "kind": "func", + "name": "AppIDLTE", + "signature": "func AppIDLTE(v string) predicate.AppCustomer", + "line": 319 + }, + { + "kind": "func", + "name": "AppIDContains", + "signature": "func AppIDContains(v string) predicate.AppCustomer", + "line": 324 + }, + { + "kind": "func", + "name": "AppIDHasPrefix", + "signature": "func AppIDHasPrefix(v string) predicate.AppCustomer", + "line": 329 + }, + { + "kind": "func", + "name": "AppIDHasSuffix", + "signature": "func AppIDHasSuffix(v string) predicate.AppCustomer", + "line": 334 + }, + { + "kind": "func", + "name": "AppIDEqualFold", + "signature": "func AppIDEqualFold(v string) predicate.AppCustomer", + "line": 339 + }, + { + "kind": "func", + "name": "AppIDContainsFold", + "signature": "func AppIDContainsFold(v string) predicate.AppCustomer", + "line": 344 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.AppCustomer", + "line": 349 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.AppCustomer", + "line": 354 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.AppCustomer", + "line": 359 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.AppCustomer", + "line": 364 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.AppCustomer", + "line": 369 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.AppCustomer", + "line": 374 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.AppCustomer", + "line": 379 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.AppCustomer", + "line": 384 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.AppCustomer", + "line": 389 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.AppCustomer", + "line": 394 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.AppCustomer", + "line": 399 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.AppCustomer", + "line": 404 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.AppCustomer", + "line": 409 + }, + { + "kind": "func", + "name": "HasApp", + "signature": "func HasApp() predicate.AppCustomer", + "line": 414 + }, + { + "kind": "func", + "name": "HasAppWith", + "signature": "func HasAppWith(preds ...predicate.App) predicate.AppCustomer", + "line": 425 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.AppCustomer", + "line": 437 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.AppCustomer", + "line": 448 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AppCustomer) predicate.AppCustomer", + "line": 460 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AppCustomer) predicate.AppCustomer", + "line": 465 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AppCustomer) predicate.AppCustomer", + "line": 470 + } + ], + "line_count": 472 + }, + "openmeter/ent/db/appcustomer_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomerCreate", + "signature": "type AppCustomerCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppCustomerCreate) SetNamespace(v string) *AppCustomerCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppCustomerCreate) SetCreatedAt(v time.Time) *AppCustomerCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppCustomerCreate) SetNillableCreatedAt(v *time.Time) *AppCustomerCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppCustomerCreate) SetUpdatedAt(v time.Time) *AppCustomerCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppCustomerCreate) SetNillableUpdatedAt(v *time.Time) *AppCustomerCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppCustomerCreate) SetDeletedAt(v time.Time) *AppCustomerCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppCustomerCreate) SetNillableDeletedAt(v *time.Time) *AppCustomerCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetAppID", + "signature": "func (_c *AppCustomerCreate) SetAppID(v string) *AppCustomerCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *AppCustomerCreate) SetCustomerID(v string) *AppCustomerCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetApp", + "signature": "func (_c *AppCustomerCreate) SetApp(v *App) *AppCustomerCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *AppCustomerCreate) SetCustomer(v *Customer) *AppCustomerCreate", + "line": 93 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppCustomerCreate) Mutation() *AppCustomerMutation", + "line": 98 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomerCreate) Save(ctx context.Context) (*AppCustomer, error)", + "line": 103 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomerCreate) SaveX(ctx context.Context) *AppCustomer", + "line": 109 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomerCreate) Exec(ctx context.Context) error", + "line": 118 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomerCreate) ExecX(ctx context.Context)", + "line": 124 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppCustomerCreate) defaults()", + "line": 131 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppCustomerCreate) check() error", + "line": 143 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppCustomerCreate) sqlSave(ctx context.Context) (*AppCustomer, error)", + "line": 183 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppCustomerCreate) createSpec() (*AppCustomer, *sqlgraph.CreateSpec)", + "line": 201 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomerCreate) OnConflict(opts ...sql.ConflictOption) *AppCustomerUpsertOne", + "line": 276 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomerCreate) OnConflictColumns(columns ...string) *AppCustomerUpsertOne", + "line": 289 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomerUpsert) SetUpdatedAt(v time.Time) *AppCustomerUpsert", + "line": 310 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomerUpsert) UpdateUpdatedAt() *AppCustomerUpsert", + "line": 316 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomerUpsert) SetDeletedAt(v time.Time) *AppCustomerUpsert", + "line": 322 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomerUpsert) UpdateDeletedAt() *AppCustomerUpsert", + "line": 328 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomerUpsert) ClearDeletedAt() *AppCustomerUpsert", + "line": 334 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomerUpsertOne) UpdateNewValues() *AppCustomerUpsertOne", + "line": 347 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomerUpsertOne) Ignore() *AppCustomerUpsertOne", + "line": 372 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomerUpsertOne) DoNothing() *AppCustomerUpsertOne", + "line": 379 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomerUpsertOne) Update(set func(*AppCustomerUpsert)) *AppCustomerUpsertOne", + "line": 386 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomerUpsertOne) SetUpdatedAt(v time.Time) *AppCustomerUpsertOne", + "line": 394 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomerUpsertOne) UpdateUpdatedAt() *AppCustomerUpsertOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomerUpsertOne) SetDeletedAt(v time.Time) *AppCustomerUpsertOne", + "line": 408 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomerUpsertOne) UpdateDeletedAt() *AppCustomerUpsertOne", + "line": 415 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomerUpsertOne) ClearDeletedAt() *AppCustomerUpsertOne", + "line": 422 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomerUpsertOne) Exec(ctx context.Context) error", + "line": 429 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomerUpsertOne) ExecX(ctx context.Context)", + "line": 437 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppCustomerUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 444 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppCustomerUpsertOne) IDX(ctx context.Context) int", + "line": 453 + }, + { + "kind": "struct", + "name": "AppCustomerCreateBulk", + "signature": "type AppCustomerCreateBulk struct", + "line": 462 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomerCreateBulk) Save(ctx context.Context) ([]*AppCustomer, error)", + "line": 470 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomerCreateBulk) SaveX(ctx context.Context) []*AppCustomer", + "line": 530 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomerCreateBulk) Exec(ctx context.Context) error", + "line": 539 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomerCreateBulk) ExecX(ctx context.Context)", + "line": 545 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomerCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppCustomerUpsertBulk", + "line": 566 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomerCreateBulk) OnConflictColumns(columns ...string) *AppCustomerUpsertBulk", + "line": 579 + }, + { + "kind": "struct", + "name": "AppCustomerUpsertBulk", + "signature": "type AppCustomerUpsertBulk struct", + "line": 588 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomerUpsertBulk) UpdateNewValues() *AppCustomerUpsertBulk", + "line": 600 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomerUpsertBulk) Ignore() *AppCustomerUpsertBulk", + "line": 627 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomerUpsertBulk) DoNothing() *AppCustomerUpsertBulk", + "line": 634 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomerUpsertBulk) Update(set func(*AppCustomerUpsert)) *AppCustomerUpsertBulk", + "line": 641 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomerUpsertBulk) SetUpdatedAt(v time.Time) *AppCustomerUpsertBulk", + "line": 649 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomerUpsertBulk) UpdateUpdatedAt() *AppCustomerUpsertBulk", + "line": 656 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomerUpsertBulk) SetDeletedAt(v time.Time) *AppCustomerUpsertBulk", + "line": 663 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomerUpsertBulk) UpdateDeletedAt() *AppCustomerUpsertBulk", + "line": 670 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomerUpsertBulk) ClearDeletedAt() *AppCustomerUpsertBulk", + "line": 677 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomerUpsertBulk) Exec(ctx context.Context) error", + "line": 684 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomerUpsertBulk) ExecX(ctx context.Context)", + "line": 700 + } + ], + "line_count": 704 + }, + "openmeter/ent/db/appcustomer_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomerDelete", + "signature": "type AppCustomerDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomerDelete) Where(ps ...predicate.AppCustomer) *AppCustomerDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomerDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomerDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppCustomerDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AppCustomerDeleteOne", + "signature": "type AppCustomerDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomerDeleteOne) Where(ps ...predicate.AppCustomer) *AppCustomerDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomerDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomerDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/appcustomer_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomerQuery", + "signature": "type AppCustomerQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppCustomerQuery) Where(ps ...predicate.AppCustomer) *AppCustomerQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppCustomerQuery) Limit(limit int) *AppCustomerQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppCustomerQuery) Offset(offset int) *AppCustomerQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppCustomerQuery) Unique(unique bool) *AppCustomerQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppCustomerQuery) Order(o ...appcustomer.OrderOption) *AppCustomerQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_q *AppCustomerQuery) QueryApp() *AppQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *AppCustomerQuery) QueryCustomer() *CustomerQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppCustomerQuery) First(ctx context.Context) (*AppCustomer, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppCustomerQuery) FirstX(ctx context.Context) *AppCustomer", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppCustomerQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppCustomerQuery) FirstIDX(ctx context.Context) int", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppCustomerQuery) Only(ctx context.Context) (*AppCustomer, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppCustomerQuery) OnlyX(ctx context.Context) *AppCustomer", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppCustomerQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppCustomerQuery) OnlyIDX(ctx context.Context) int", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppCustomerQuery) All(ctx context.Context) ([]*AppCustomer, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppCustomerQuery) AllX(ctx context.Context) []*AppCustomer", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppCustomerQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppCustomerQuery) IDsX(ctx context.Context) []int", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppCustomerQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppCustomerQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppCustomerQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppCustomerQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppCustomerQuery) Clone() *AppCustomerQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithApp", + "signature": "func (_q *AppCustomerQuery) WithApp(opts ...func(*AppQuery)) *AppCustomerQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *AppCustomerQuery) WithCustomer(opts ...func(*CustomerQuery)) *AppCustomerQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppCustomerQuery) GroupBy(field string, fields ...string) *AppCustomerGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppCustomerQuery) Select(fields ...string) *AppCustomerSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppCustomerQuery) Aggregate(fns ...AggregateFunc) *AppCustomerSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppCustomerQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppCustomerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AppCustomer, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadApp", + "signature": "func (_q *AppCustomerQuery) loadApp(ctx context.Context, query *AppQuery, nodes []*AppCustomer, init func(*AppCustomer), assign func(*AppCustomer, *App)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *AppCustomerQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*AppCustomer, init func(*AppCustomer), assign func(*AppCustomer, *Customer)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppCustomerQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppCustomerQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppCustomerQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppCustomerQuery) ForUpdate(opts ...sql.LockOption) *AppCustomerQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppCustomerQuery) ForShare(opts ...sql.LockOption) *AppCustomerQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "AppCustomerGroupBy", + "signature": "type AppCustomerGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppCustomerGroupBy) Aggregate(fns ...AggregateFunc) *AppCustomerGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppCustomerGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppCustomerGroupBy) sqlScan(ctx context.Context, root *AppCustomerQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "AppCustomerSelect", + "signature": "type AppCustomerSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppCustomerSelect) Aggregate(fns ...AggregateFunc) *AppCustomerSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppCustomerSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppCustomerSelect) sqlScan(ctx context.Context, root *AppCustomerQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/appcustomer_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomerUpdate", + "signature": "type AppCustomerUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomerUpdate) Where(ps ...predicate.AppCustomer) *AppCustomerUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomerUpdate) SetUpdatedAt(v time.Time) *AppCustomerUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomerUpdate) SetDeletedAt(v time.Time) *AppCustomerUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomerUpdate) SetNillableDeletedAt(v *time.Time) *AppCustomerUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomerUpdate) ClearDeletedAt() *AppCustomerUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomerUpdate) Mutation() *AppCustomerMutation", + "line": 58 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomerUpdate) Save(ctx context.Context) (int, error)", + "line": 63 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomerUpdate) SaveX(ctx context.Context) int", + "line": 69 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomerUpdate) Exec(ctx context.Context) error", + "line": 78 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomerUpdate) ExecX(ctx context.Context)", + "line": 84 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomerUpdate) defaults()", + "line": 91 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppCustomerUpdate) check() error", + "line": 99 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomerUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 109 + }, + { + "kind": "struct", + "name": "AppCustomerUpdateOne", + "signature": "type AppCustomerUpdateOne struct", + "line": 143 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomerUpdateOne) SetUpdatedAt(v time.Time) *AppCustomerUpdateOne", + "line": 151 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomerUpdateOne) SetDeletedAt(v time.Time) *AppCustomerUpdateOne", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomerUpdateOne) SetNillableDeletedAt(v *time.Time) *AppCustomerUpdateOne", + "line": 163 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomerUpdateOne) ClearDeletedAt() *AppCustomerUpdateOne", + "line": 171 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomerUpdateOne) Mutation() *AppCustomerMutation", + "line": 177 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomerUpdateOne) Where(ps ...predicate.AppCustomer) *AppCustomerUpdateOne", + "line": 182 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppCustomerUpdateOne) Select(field string, fields ...string) *AppCustomerUpdateOne", + "line": 189 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomerUpdateOne) Save(ctx context.Context) (*AppCustomer, error)", + "line": 195 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomerUpdateOne) SaveX(ctx context.Context) *AppCustomer", + "line": 201 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomerUpdateOne) Exec(ctx context.Context) error", + "line": 210 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomerUpdateOne) ExecX(ctx context.Context)", + "line": 216 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomerUpdateOne) defaults()", + "line": 223 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppCustomerUpdateOne) check() error", + "line": 231 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomerUpdateOne) sqlSave(ctx context.Context) (_node *AppCustomer, err error)", + "line": 241 + } + ], + "line_count": 292 + }, + "openmeter/ent/db/appcustominvoicing.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicing", + "signature": "type AppCustomInvoicing struct", + "line": 17 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingEdges", + "signature": "type AppCustomInvoicingEdges struct", + "line": 40 + }, + { + "kind": "func", + "name": "CustomerAppsOrErr", + "signature": "func (e AppCustomInvoicingEdges) CustomerAppsOrErr() ([]*AppCustomInvoicingCustomer, error)", + "line": 52 + }, + { + "kind": "func", + "name": "AppOrErr", + "signature": "func (e AppCustomInvoicingEdges) AppOrErr() (*App, error)", + "line": 61 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AppCustomInvoicing) assignValues(columns []string, values []any) error", + "line": 90 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AppCustomInvoicing) Value(name string) (ent.Value, error)", + "line": 148 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_m *AppCustomInvoicing) QueryCustomerApps() *AppCustomInvoicingCustomerQuery", + "line": 153 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_m *AppCustomInvoicing) QueryApp() *AppQuery", + "line": 158 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AppCustomInvoicing) Update() *AppCustomInvoicingUpdateOne", + "line": 165 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AppCustomInvoicing) Unwrap() *AppCustomInvoicing", + "line": 171 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AppCustomInvoicing) String() string", + "line": 181 + } + ], + "line_count": 209 + }, + "openmeter/ent/db/appcustominvoicing/appcustominvoicing.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 63 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 93 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 98 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 103 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByEnableDraftSyncHook", + "signature": "func ByEnableDraftSyncHook(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByEnableIssuingSyncHook", + "signature": "func ByEnableIssuingSyncHook(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByCustomerAppsCount", + "signature": "func ByCustomerAppsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "ByCustomerApps", + "signature": "func ByCustomerApps(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByAppField", + "signature": "func ByAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 142 + }, + { + "kind": "func", + "name": "newCustomerAppsStep", + "signature": "func newCustomerAppsStep() *sqlgraph.Step", + "line": 147 + }, + { + "kind": "func", + "name": "newAppStep", + "signature": "func newAppStep() *sqlgraph.Step", + "line": 154 + } + ], + "line_count": 160 + }, + "openmeter/ent/db/appcustominvoicing/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.AppCustomInvoicing", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.AppCustomInvoicing", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.AppCustomInvoicing", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.AppCustomInvoicing", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.AppCustomInvoicing", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.AppCustomInvoicing", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.AppCustomInvoicing", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.AppCustomInvoicing", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.AppCustomInvoicing", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.AppCustomInvoicing", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.AppCustomInvoicing", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AppCustomInvoicing", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AppCustomInvoicing", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AppCustomInvoicing", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AppCustomInvoicing", + "line": 84 + }, + { + "kind": "func", + "name": "EnableDraftSyncHook", + "signature": "func EnableDraftSyncHook(v bool) predicate.AppCustomInvoicing", + "line": 89 + }, + { + "kind": "func", + "name": "EnableIssuingSyncHook", + "signature": "func EnableIssuingSyncHook(v bool) predicate.AppCustomInvoicing", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AppCustomInvoicing", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AppCustomInvoicing", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AppCustomInvoicing", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AppCustomInvoicing", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AppCustomInvoicing", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AppCustomInvoicing", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AppCustomInvoicing", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AppCustomInvoicing", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AppCustomInvoicing", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AppCustomInvoicing", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AppCustomInvoicing", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AppCustomInvoicing", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AppCustomInvoicing", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AppCustomInvoicing", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AppCustomInvoicing", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AppCustomInvoicing", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AppCustomInvoicing", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AppCustomInvoicing", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AppCustomInvoicing", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AppCustomInvoicing", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AppCustomInvoicing", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AppCustomInvoicing", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicing", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AppCustomInvoicing", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AppCustomInvoicing", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AppCustomInvoicing", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AppCustomInvoicing", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AppCustomInvoicing", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AppCustomInvoicing", + "line": 289 + }, + { + "kind": "func", + "name": "EnableDraftSyncHookEQ", + "signature": "func EnableDraftSyncHookEQ(v bool) predicate.AppCustomInvoicing", + "line": 294 + }, + { + "kind": "func", + "name": "EnableDraftSyncHookNEQ", + "signature": "func EnableDraftSyncHookNEQ(v bool) predicate.AppCustomInvoicing", + "line": 299 + }, + { + "kind": "func", + "name": "EnableIssuingSyncHookEQ", + "signature": "func EnableIssuingSyncHookEQ(v bool) predicate.AppCustomInvoicing", + "line": 304 + }, + { + "kind": "func", + "name": "EnableIssuingSyncHookNEQ", + "signature": "func EnableIssuingSyncHookNEQ(v bool) predicate.AppCustomInvoicing", + "line": 309 + }, + { + "kind": "func", + "name": "HasCustomerApps", + "signature": "func HasCustomerApps() predicate.AppCustomInvoicing", + "line": 314 + }, + { + "kind": "func", + "name": "HasCustomerAppsWith", + "signature": "func HasCustomerAppsWith(preds ...predicate.AppCustomInvoicingCustomer) predicate.AppCustomInvoicing", + "line": 325 + }, + { + "kind": "func", + "name": "HasApp", + "signature": "func HasApp() predicate.AppCustomInvoicing", + "line": 337 + }, + { + "kind": "func", + "name": "HasAppWith", + "signature": "func HasAppWith(preds ...predicate.App) predicate.AppCustomInvoicing", + "line": 348 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AppCustomInvoicing) predicate.AppCustomInvoicing", + "line": 360 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AppCustomInvoicing) predicate.AppCustomInvoicing", + "line": 365 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AppCustomInvoicing) predicate.AppCustomInvoicing", + "line": 370 + } + ], + "line_count": 372 + }, + "openmeter/ent/db/appcustominvoicing_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCreate", + "signature": "type AppCustomInvoicingCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppCustomInvoicingCreate) SetNamespace(v string) *AppCustomInvoicingCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetCreatedAt(v time.Time) *AppCustomInvoicingCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableCreatedAt(v *time.Time) *AppCustomInvoicingCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetUpdatedAt(v time.Time) *AppCustomInvoicingCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableUpdatedAt(v *time.Time) *AppCustomInvoicingCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetDeletedAt(v time.Time) *AppCustomInvoicingCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (_c *AppCustomInvoicingCreate) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableEnableDraftSyncHook", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableEnableDraftSyncHook(v *bool) *AppCustomInvoicingCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (_c *AppCustomInvoicingCreate) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableEnableIssuingSyncHook", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableEnableIssuingSyncHook(v *bool) *AppCustomInvoicingCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *AppCustomInvoicingCreate) SetID(v string) *AppCustomInvoicingCreate", + "line": 105 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableID(v *string) *AppCustomInvoicingCreate", + "line": 111 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_c *AppCustomInvoicingCreate) AddCustomerAppIDs(ids ...int) *AppCustomInvoicingCreate", + "line": 119 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_c *AppCustomInvoicingCreate) AddCustomerApps(v ...*AppCustomInvoicingCustomer) *AppCustomInvoicingCreate", + "line": 125 + }, + { + "kind": "func", + "name": "SetAppID", + "signature": "func (_c *AppCustomInvoicingCreate) SetAppID(id string) *AppCustomInvoicingCreate", + "line": 134 + }, + { + "kind": "func", + "name": "SetNillableAppID", + "signature": "func (_c *AppCustomInvoicingCreate) SetNillableAppID(id *string) *AppCustomInvoicingCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetApp", + "signature": "func (_c *AppCustomInvoicingCreate) SetApp(v *App) *AppCustomInvoicingCreate", + "line": 148 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppCustomInvoicingCreate) Mutation() *AppCustomInvoicingMutation", + "line": 153 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomInvoicingCreate) Save(ctx context.Context) (*AppCustomInvoicing, error)", + "line": 158 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomInvoicingCreate) SaveX(ctx context.Context) *AppCustomInvoicing", + "line": 164 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomInvoicingCreate) Exec(ctx context.Context) error", + "line": 173 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomInvoicingCreate) ExecX(ctx context.Context)", + "line": 179 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppCustomInvoicingCreate) defaults()", + "line": 186 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppCustomInvoicingCreate) check() error", + "line": 210 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppCustomInvoicingCreate) sqlSave(ctx context.Context) (*AppCustomInvoicing, error)", + "line": 234 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppCustomInvoicingCreate) createSpec() (*AppCustomInvoicing, *sqlgraph.CreateSpec)", + "line": 257 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomInvoicingCreate) OnConflict(opts ...sql.ConflictOption) *AppCustomInvoicingUpsertOne", + "line": 343 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomInvoicingCreate) OnConflictColumns(columns ...string) *AppCustomInvoicingUpsertOne", + "line": 356 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsert) SetUpdatedAt(v time.Time) *AppCustomInvoicingUpsert", + "line": 377 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsert) UpdateUpdatedAt() *AppCustomInvoicingUpsert", + "line": 383 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsert) SetDeletedAt(v time.Time) *AppCustomInvoicingUpsert", + "line": 389 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsert) UpdateDeletedAt() *AppCustomInvoicingUpsert", + "line": 395 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsert) ClearDeletedAt() *AppCustomInvoicingUpsert", + "line": 401 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsert) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingUpsert", + "line": 407 + }, + { + "kind": "func", + "name": "UpdateEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsert) UpdateEnableDraftSyncHook() *AppCustomInvoicingUpsert", + "line": 413 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsert) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingUpsert", + "line": 419 + }, + { + "kind": "func", + "name": "UpdateEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsert) UpdateEnableIssuingSyncHook() *AppCustomInvoicingUpsert", + "line": 425 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomInvoicingUpsertOne) UpdateNewValues() *AppCustomInvoicingUpsertOne", + "line": 441 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomInvoicingUpsertOne) Ignore() *AppCustomInvoicingUpsertOne", + "line": 463 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomInvoicingUpsertOne) DoNothing() *AppCustomInvoicingUpsertOne", + "line": 470 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomInvoicingUpsertOne) Update(set func(*AppCustomInvoicingUpsert)) *AppCustomInvoicingUpsertOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsertOne) SetUpdatedAt(v time.Time) *AppCustomInvoicingUpsertOne", + "line": 485 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsertOne) UpdateUpdatedAt() *AppCustomInvoicingUpsertOne", + "line": 492 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertOne) SetDeletedAt(v time.Time) *AppCustomInvoicingUpsertOne", + "line": 499 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertOne) UpdateDeletedAt() *AppCustomInvoicingUpsertOne", + "line": 506 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertOne) ClearDeletedAt() *AppCustomInvoicingUpsertOne", + "line": 513 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertOne) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingUpsertOne", + "line": 520 + }, + { + "kind": "func", + "name": "UpdateEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertOne) UpdateEnableDraftSyncHook() *AppCustomInvoicingUpsertOne", + "line": 527 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertOne) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingUpsertOne", + "line": 534 + }, + { + "kind": "func", + "name": "UpdateEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertOne) UpdateEnableIssuingSyncHook() *AppCustomInvoicingUpsertOne", + "line": 541 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomInvoicingUpsertOne) Exec(ctx context.Context) error", + "line": 548 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomInvoicingUpsertOne) ExecX(ctx context.Context)", + "line": 556 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppCustomInvoicingUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 563 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppCustomInvoicingUpsertOne) IDX(ctx context.Context) string", + "line": 577 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCreateBulk", + "signature": "type AppCustomInvoicingCreateBulk struct", + "line": 586 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomInvoicingCreateBulk) Save(ctx context.Context) ([]*AppCustomInvoicing, error)", + "line": 594 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomInvoicingCreateBulk) SaveX(ctx context.Context) []*AppCustomInvoicing", + "line": 650 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomInvoicingCreateBulk) Exec(ctx context.Context) error", + "line": 659 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomInvoicingCreateBulk) ExecX(ctx context.Context)", + "line": 665 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomInvoicingCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppCustomInvoicingUpsertBulk", + "line": 686 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomInvoicingCreateBulk) OnConflictColumns(columns ...string) *AppCustomInvoicingUpsertBulk", + "line": 699 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingUpsertBulk", + "signature": "type AppCustomInvoicingUpsertBulk struct", + "line": 708 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomInvoicingUpsertBulk) UpdateNewValues() *AppCustomInvoicingUpsertBulk", + "line": 723 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomInvoicingUpsertBulk) Ignore() *AppCustomInvoicingUpsertBulk", + "line": 747 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomInvoicingUpsertBulk) DoNothing() *AppCustomInvoicingUpsertBulk", + "line": 754 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomInvoicingUpsertBulk) Update(set func(*AppCustomInvoicingUpsert)) *AppCustomInvoicingUpsertBulk", + "line": 761 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsertBulk) SetUpdatedAt(v time.Time) *AppCustomInvoicingUpsertBulk", + "line": 769 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingUpsertBulk) UpdateUpdatedAt() *AppCustomInvoicingUpsertBulk", + "line": 776 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertBulk) SetDeletedAt(v time.Time) *AppCustomInvoicingUpsertBulk", + "line": 783 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertBulk) UpdateDeletedAt() *AppCustomInvoicingUpsertBulk", + "line": 790 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingUpsertBulk) ClearDeletedAt() *AppCustomInvoicingUpsertBulk", + "line": 797 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertBulk) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingUpsertBulk", + "line": 804 + }, + { + "kind": "func", + "name": "UpdateEnableDraftSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertBulk) UpdateEnableDraftSyncHook() *AppCustomInvoicingUpsertBulk", + "line": 811 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertBulk) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingUpsertBulk", + "line": 818 + }, + { + "kind": "func", + "name": "UpdateEnableIssuingSyncHook", + "signature": "func (u *AppCustomInvoicingUpsertBulk) UpdateEnableIssuingSyncHook() *AppCustomInvoicingUpsertBulk", + "line": 825 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomInvoicingUpsertBulk) Exec(ctx context.Context) error", + "line": 832 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomInvoicingUpsertBulk) ExecX(ctx context.Context)", + "line": 848 + } + ], + "line_count": 852 + }, + "openmeter/ent/db/appcustominvoicing_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingDelete", + "signature": "type AppCustomInvoicingDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomInvoicingDelete) Where(ps ...predicate.AppCustomInvoicing) *AppCustomInvoicingDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomInvoicingDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomInvoicingDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppCustomInvoicingDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingDeleteOne", + "signature": "type AppCustomInvoicingDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomInvoicingDeleteOne) Where(ps ...predicate.AppCustomInvoicing) *AppCustomInvoicingDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomInvoicingDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomInvoicingDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/appcustominvoicing_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingQuery", + "signature": "type AppCustomInvoicingQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppCustomInvoicingQuery) Where(ps ...predicate.AppCustomInvoicing) *AppCustomInvoicingQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppCustomInvoicingQuery) Limit(limit int) *AppCustomInvoicingQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppCustomInvoicingQuery) Offset(offset int) *AppCustomInvoicingQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppCustomInvoicingQuery) Unique(unique bool) *AppCustomInvoicingQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppCustomInvoicingQuery) Order(o ...appcustominvoicing.OrderOption) *AppCustomInvoicingQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_q *AppCustomInvoicingQuery) QueryCustomerApps() *AppCustomInvoicingCustomerQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_q *AppCustomInvoicingQuery) QueryApp() *AppQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppCustomInvoicingQuery) First(ctx context.Context) (*AppCustomInvoicing, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppCustomInvoicingQuery) FirstX(ctx context.Context) *AppCustomInvoicing", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppCustomInvoicingQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppCustomInvoicingQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppCustomInvoicingQuery) Only(ctx context.Context) (*AppCustomInvoicing, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppCustomInvoicingQuery) OnlyX(ctx context.Context) *AppCustomInvoicing", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppCustomInvoicingQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppCustomInvoicingQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppCustomInvoicingQuery) All(ctx context.Context) ([]*AppCustomInvoicing, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppCustomInvoicingQuery) AllX(ctx context.Context) []*AppCustomInvoicing", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppCustomInvoicingQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppCustomInvoicingQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppCustomInvoicingQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppCustomInvoicingQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppCustomInvoicingQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppCustomInvoicingQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppCustomInvoicingQuery) Clone() *AppCustomInvoicingQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithCustomerApps", + "signature": "func (_q *AppCustomInvoicingQuery) WithCustomerApps(opts ...func(*AppCustomInvoicingCustomerQuery)) *AppCustomInvoicingQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithApp", + "signature": "func (_q *AppCustomInvoicingQuery) WithApp(opts ...func(*AppQuery)) *AppCustomInvoicingQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppCustomInvoicingQuery) GroupBy(field string, fields ...string) *AppCustomInvoicingGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppCustomInvoicingQuery) Select(fields ...string) *AppCustomInvoicingSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppCustomInvoicingQuery) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppCustomInvoicingQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppCustomInvoicingQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AppCustomInvoicing, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadCustomerApps", + "signature": "func (_q *AppCustomInvoicingQuery) loadCustomerApps(ctx context.Context, query *AppCustomInvoicingCustomerQuery, nodes []*AppCustomInvoicing, init func(*AppCustomInvoicing), assign func(*AppCustomInvoicing, *AppCustomInvoicingCustomer)) error", + "line": 456 + }, + { + "kind": "func", + "name": "loadApp", + "signature": "func (_q *AppCustomInvoicingQuery) loadApp(ctx context.Context, query *AppQuery, nodes []*AppCustomInvoicing, init func(*AppCustomInvoicing), assign func(*AppCustomInvoicing, *App)) error", + "line": 486 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppCustomInvoicingQuery) sqlCount(ctx context.Context) (int, error)", + "line": 516 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppCustomInvoicingQuery) querySpec() *sqlgraph.QuerySpec", + "line": 528 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppCustomInvoicingQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 568 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppCustomInvoicingQuery) ForUpdate(opts ...sql.LockOption) *AppCustomInvoicingQuery", + "line": 606 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppCustomInvoicingQuery) ForShare(opts ...sql.LockOption) *AppCustomInvoicingQuery", + "line": 619 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingGroupBy", + "signature": "type AppCustomInvoicingGroupBy struct", + "line": 630 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppCustomInvoicingGroupBy) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingGroupBy", + "line": 636 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppCustomInvoicingGroupBy) Scan(ctx context.Context, v any) error", + "line": 642 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppCustomInvoicingGroupBy) sqlScan(ctx context.Context, root *AppCustomInvoicingQuery, v any) error", + "line": 650 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingSelect", + "signature": "type AppCustomInvoicingSelect struct", + "line": 678 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppCustomInvoicingSelect) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingSelect", + "line": 684 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppCustomInvoicingSelect) Scan(ctx context.Context, v any) error", + "line": 690 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppCustomInvoicingSelect) sqlScan(ctx context.Context, root *AppCustomInvoicingQuery, v any) error", + "line": 698 + } + ], + "line_count": 717 + }, + "openmeter/ent/db/appcustominvoicing_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingUpdate", + "signature": "type AppCustomInvoicingUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomInvoicingUpdate) Where(ps ...predicate.AppCustomInvoicing) *AppCustomInvoicingUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomInvoicingUpdate) SetUpdatedAt(v time.Time) *AppCustomInvoicingUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdate) SetDeletedAt(v time.Time) *AppCustomInvoicingUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdate) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdate) ClearDeletedAt() *AppCustomInvoicingUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdate) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableEnableDraftSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdate) SetNillableEnableDraftSyncHook(v *bool) *AppCustomInvoicingUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdate) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableEnableIssuingSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdate) SetNillableEnableIssuingSyncHook(v *bool) *AppCustomInvoicingUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppCustomInvoicingUpdate) AddCustomerAppIDs(ids ...int) *AppCustomInvoicingUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdate) AddCustomerApps(v ...*AppCustomInvoicingCustomer) *AppCustomInvoicingUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomInvoicingUpdate) Mutation() *AppCustomInvoicingMutation", + "line": 102 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdate) ClearCustomerApps() *AppCustomInvoicingUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppCustomInvoicingUpdate) RemoveCustomerAppIDs(ids ...int) *AppCustomInvoicingUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdate) RemoveCustomerApps(v ...*AppCustomInvoicingCustomer) *AppCustomInvoicingUpdate", + "line": 119 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomInvoicingUpdate) Save(ctx context.Context) (int, error)", + "line": 128 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomInvoicingUpdate) SaveX(ctx context.Context) int", + "line": 134 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomInvoicingUpdate) Exec(ctx context.Context) error", + "line": 143 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomInvoicingUpdate) ExecX(ctx context.Context)", + "line": 149 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomInvoicingUpdate) defaults()", + "line": 156 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomInvoicingUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 163 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingUpdateOne", + "signature": "type AppCustomInvoicingUpdateOne struct", + "line": 245 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetUpdatedAt(v time.Time) *AppCustomInvoicingUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetDeletedAt(v time.Time) *AppCustomInvoicingUpdateOne", + "line": 259 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingUpdateOne", + "line": 265 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomInvoicingUpdateOne) ClearDeletedAt() *AppCustomInvoicingUpdateOne", + "line": 273 + }, + { + "kind": "func", + "name": "SetEnableDraftSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetEnableDraftSyncHook(v bool) *AppCustomInvoicingUpdateOne", + "line": 279 + }, + { + "kind": "func", + "name": "SetNillableEnableDraftSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetNillableEnableDraftSyncHook(v *bool) *AppCustomInvoicingUpdateOne", + "line": 285 + }, + { + "kind": "func", + "name": "SetEnableIssuingSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetEnableIssuingSyncHook(v bool) *AppCustomInvoicingUpdateOne", + "line": 293 + }, + { + "kind": "func", + "name": "SetNillableEnableIssuingSyncHook", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SetNillableEnableIssuingSyncHook(v *bool) *AppCustomInvoicingUpdateOne", + "line": 299 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppCustomInvoicingUpdateOne) AddCustomerAppIDs(ids ...int) *AppCustomInvoicingUpdateOne", + "line": 307 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdateOne) AddCustomerApps(v ...*AppCustomInvoicingCustomer) *AppCustomInvoicingUpdateOne", + "line": 313 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomInvoicingUpdateOne) Mutation() *AppCustomInvoicingMutation", + "line": 322 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdateOne) ClearCustomerApps() *AppCustomInvoicingUpdateOne", + "line": 327 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppCustomInvoicingUpdateOne) RemoveCustomerAppIDs(ids ...int) *AppCustomInvoicingUpdateOne", + "line": 333 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppCustomInvoicingUpdateOne) RemoveCustomerApps(v ...*AppCustomInvoicingCustomer) *AppCustomInvoicingUpdateOne", + "line": 339 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomInvoicingUpdateOne) Where(ps ...predicate.AppCustomInvoicing) *AppCustomInvoicingUpdateOne", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppCustomInvoicingUpdateOne) Select(field string, fields ...string) *AppCustomInvoicingUpdateOne", + "line": 355 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomInvoicingUpdateOne) Save(ctx context.Context) (*AppCustomInvoicing, error)", + "line": 361 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomInvoicingUpdateOne) SaveX(ctx context.Context) *AppCustomInvoicing", + "line": 367 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomInvoicingUpdateOne) Exec(ctx context.Context) error", + "line": 376 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomInvoicingUpdateOne) ExecX(ctx context.Context)", + "line": 382 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomInvoicingUpdateOne) defaults()", + "line": 389 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomInvoicingUpdateOne) sqlSave(ctx context.Context) (_node *AppCustomInvoicing, err error)", + "line": 396 + } + ], + "line_count": 495 + }, + "openmeter/ent/db/appcustominvoicingcustomer.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCustomer", + "signature": "type AppCustomInvoicingCustomer struct", + "line": 19 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerEdges", + "signature": "type AppCustomInvoicingCustomerEdges struct", + "line": 44 + }, + { + "kind": "func", + "name": "CustomInvoicingAppOrErr", + "signature": "func (e AppCustomInvoicingCustomerEdges) CustomInvoicingAppOrErr() (*AppCustomInvoicing, error)", + "line": 56 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e AppCustomInvoicingCustomerEdges) CustomerOrErr() (*Customer, error)", + "line": 67 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AppCustomInvoicingCustomer) assignValues(columns []string, values []any) error", + "line": 98 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AppCustomInvoicingCustomer) Value(name string) (ent.Value, error)", + "line": 164 + }, + { + "kind": "func", + "name": "QueryCustomInvoicingApp", + "signature": "func (_m *AppCustomInvoicingCustomer) QueryCustomInvoicingApp() *AppCustomInvoicingQuery", + "line": 169 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *AppCustomInvoicingCustomer) QueryCustomer() *CustomerQuery", + "line": 174 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AppCustomInvoicingCustomer) Update() *AppCustomInvoicingCustomerUpdateOne", + "line": 181 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AppCustomInvoicingCustomer) Unwrap() *AppCustomInvoicingCustomer", + "line": 187 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AppCustomInvoicingCustomer) String() string", + "line": 197 + } + ], + "line_count": 228 + }, + "openmeter/ent/db/appcustominvoicingcustomer/appcustominvoicingcustomer.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 66 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 94 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByAppID", + "signature": "func ByAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByCustomInvoicingAppField", + "signature": "func ByCustomInvoicingAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "newCustomInvoicingAppStep", + "signature": "func newCustomInvoicingAppStep() *sqlgraph.Step", + "line": 141 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 148 + } + ], + "line_count": 154 + }, + "openmeter/ent/db/appcustominvoicingcustomer/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.AppCustomInvoicingCustomer", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.AppCustomInvoicingCustomer", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.AppCustomInvoicingCustomer", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.AppCustomInvoicingCustomer", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.AppCustomInvoicingCustomer", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.AppCustomInvoicingCustomer", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.AppCustomInvoicingCustomer", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.AppCustomInvoicingCustomer", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.AppCustomInvoicingCustomer", + "line": 54 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AppCustomInvoicingCustomer", + "line": 59 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 64 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 69 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 74 + }, + { + "kind": "func", + "name": "AppID", + "signature": "func AppID(v string) predicate.AppCustomInvoicingCustomer", + "line": 79 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.AppCustomInvoicingCustomer", + "line": 84 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AppCustomInvoicingCustomer", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AppCustomInvoicingCustomer", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AppCustomInvoicingCustomer", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AppCustomInvoicingCustomer", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AppCustomInvoicingCustomer", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 149 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 154 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 189 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 194 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 229 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 234 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AppCustomInvoicingCustomer", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AppCustomInvoicingCustomer", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AppCustomInvoicingCustomer", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AppCustomInvoicingCustomer", + "line": 279 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.AppCustomInvoicingCustomer", + "line": 284 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.AppCustomInvoicingCustomer", + "line": 289 + }, + { + "kind": "func", + "name": "AppIDEQ", + "signature": "func AppIDEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 294 + }, + { + "kind": "func", + "name": "AppIDNEQ", + "signature": "func AppIDNEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 299 + }, + { + "kind": "func", + "name": "AppIDIn", + "signature": "func AppIDIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 304 + }, + { + "kind": "func", + "name": "AppIDNotIn", + "signature": "func AppIDNotIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 309 + }, + { + "kind": "func", + "name": "AppIDGT", + "signature": "func AppIDGT(v string) predicate.AppCustomInvoicingCustomer", + "line": 314 + }, + { + "kind": "func", + "name": "AppIDGTE", + "signature": "func AppIDGTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 319 + }, + { + "kind": "func", + "name": "AppIDLT", + "signature": "func AppIDLT(v string) predicate.AppCustomInvoicingCustomer", + "line": 324 + }, + { + "kind": "func", + "name": "AppIDLTE", + "signature": "func AppIDLTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 329 + }, + { + "kind": "func", + "name": "AppIDContains", + "signature": "func AppIDContains(v string) predicate.AppCustomInvoicingCustomer", + "line": 334 + }, + { + "kind": "func", + "name": "AppIDHasPrefix", + "signature": "func AppIDHasPrefix(v string) predicate.AppCustomInvoicingCustomer", + "line": 339 + }, + { + "kind": "func", + "name": "AppIDHasSuffix", + "signature": "func AppIDHasSuffix(v string) predicate.AppCustomInvoicingCustomer", + "line": 344 + }, + { + "kind": "func", + "name": "AppIDEqualFold", + "signature": "func AppIDEqualFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 349 + }, + { + "kind": "func", + "name": "AppIDContainsFold", + "signature": "func AppIDContainsFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 354 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 359 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.AppCustomInvoicingCustomer", + "line": 364 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 369 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.AppCustomInvoicingCustomer", + "line": 374 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.AppCustomInvoicingCustomer", + "line": 379 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 384 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.AppCustomInvoicingCustomer", + "line": 389 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.AppCustomInvoicingCustomer", + "line": 394 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.AppCustomInvoicingCustomer", + "line": 399 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.AppCustomInvoicingCustomer", + "line": 404 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.AppCustomInvoicingCustomer", + "line": 409 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 414 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.AppCustomInvoicingCustomer", + "line": 419 + }, + { + "kind": "func", + "name": "HasCustomInvoicingApp", + "signature": "func HasCustomInvoicingApp() predicate.AppCustomInvoicingCustomer", + "line": 424 + }, + { + "kind": "func", + "name": "HasCustomInvoicingAppWith", + "signature": "func HasCustomInvoicingAppWith(preds ...predicate.AppCustomInvoicing) predicate.AppCustomInvoicingCustomer", + "line": 435 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.AppCustomInvoicingCustomer", + "line": 447 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.AppCustomInvoicingCustomer", + "line": 458 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AppCustomInvoicingCustomer) predicate.AppCustomInvoicingCustomer", + "line": 470 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AppCustomInvoicingCustomer) predicate.AppCustomInvoicingCustomer", + "line": 475 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AppCustomInvoicingCustomer) predicate.AppCustomInvoicingCustomer", + "line": 480 + } + ], + "line_count": 482 + }, + "openmeter/ent/db/appcustominvoicingcustomer_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerCreate", + "signature": "type AppCustomInvoicingCustomerCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetNamespace(v string) *AppCustomInvoicingCustomerCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetCreatedAt(v time.Time) *AppCustomInvoicingCustomerCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetNillableCreatedAt(v *time.Time) *AppCustomInvoicingCustomerCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetNillableUpdatedAt(v *time.Time) *AppCustomInvoicingCustomerCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingCustomerCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetAppID", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetAppID(v string) *AppCustomInvoicingCustomerCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetCustomerID(v string) *AppCustomInvoicingCustomerCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetCustomInvoicingAppID", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetCustomInvoicingAppID(id string) *AppCustomInvoicingCustomerCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetCustomInvoicingApp", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetCustomInvoicingApp(v *AppCustomInvoicing) *AppCustomInvoicingCustomerCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SetCustomer(v *Customer) *AppCustomInvoicingCustomerCreate", + "line": 105 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) Mutation() *AppCustomInvoicingCustomerMutation", + "line": 110 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) Save(ctx context.Context) (*AppCustomInvoicingCustomer, error)", + "line": 115 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) SaveX(ctx context.Context) *AppCustomInvoicingCustomer", + "line": 121 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) Exec(ctx context.Context) error", + "line": 130 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) ExecX(ctx context.Context)", + "line": 136 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) defaults()", + "line": 143 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) check() error", + "line": 155 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) sqlSave(ctx context.Context) (*AppCustomInvoicingCustomer, error)", + "line": 195 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) createSpec() (*AppCustomInvoicingCustomer, *sqlgraph.CreateSpec)", + "line": 213 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) OnConflict(opts ...sql.ConflictOption) *AppCustomInvoicingCustomerUpsertOne", + "line": 292 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomInvoicingCustomerCreate) OnConflictColumns(columns ...string) *AppCustomInvoicingCustomerUpsertOne", + "line": 305 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerUpsert", + "line": 326 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) UpdateUpdatedAt() *AppCustomInvoicingCustomerUpsert", + "line": 332 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerUpsert", + "line": 338 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) UpdateDeletedAt() *AppCustomInvoicingCustomerUpsert", + "line": 344 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) ClearDeletedAt() *AppCustomInvoicingCustomerUpsert", + "line": 350 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerUpsert", + "line": 356 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) UpdateMetadata() *AppCustomInvoicingCustomerUpsert", + "line": 362 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsert) ClearMetadata() *AppCustomInvoicingCustomerUpsert", + "line": 368 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) UpdateNewValues() *AppCustomInvoicingCustomerUpsertOne", + "line": 381 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) Ignore() *AppCustomInvoicingCustomerUpsertOne", + "line": 406 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) DoNothing() *AppCustomInvoicingCustomerUpsertOne", + "line": 413 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) Update(set func(*AppCustomInvoicingCustomerUpsert)) *AppCustomInvoicingCustomerUpsertOne", + "line": 420 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerUpsertOne", + "line": 428 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) UpdateUpdatedAt() *AppCustomInvoicingCustomerUpsertOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerUpsertOne", + "line": 442 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) UpdateDeletedAt() *AppCustomInvoicingCustomerUpsertOne", + "line": 449 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) ClearDeletedAt() *AppCustomInvoicingCustomerUpsertOne", + "line": 456 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerUpsertOne", + "line": 463 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) UpdateMetadata() *AppCustomInvoicingCustomerUpsertOne", + "line": 470 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) ClearMetadata() *AppCustomInvoicingCustomerUpsertOne", + "line": 477 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) Exec(ctx context.Context) error", + "line": 484 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) ExecX(ctx context.Context)", + "line": 492 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 499 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppCustomInvoicingCustomerUpsertOne) IDX(ctx context.Context) int", + "line": 508 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerCreateBulk", + "signature": "type AppCustomInvoicingCustomerCreateBulk struct", + "line": 517 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) Save(ctx context.Context) ([]*AppCustomInvoicingCustomer, error)", + "line": 525 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) SaveX(ctx context.Context) []*AppCustomInvoicingCustomer", + "line": 585 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) Exec(ctx context.Context) error", + "line": 594 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) ExecX(ctx context.Context)", + "line": 600 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppCustomInvoicingCustomerUpsertBulk", + "line": 621 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppCustomInvoicingCustomerCreateBulk) OnConflictColumns(columns ...string) *AppCustomInvoicingCustomerUpsertBulk", + "line": 634 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerUpsertBulk", + "signature": "type AppCustomInvoicingCustomerUpsertBulk struct", + "line": 643 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) UpdateNewValues() *AppCustomInvoicingCustomerUpsertBulk", + "line": 655 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) Ignore() *AppCustomInvoicingCustomerUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) DoNothing() *AppCustomInvoicingCustomerUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) Update(set func(*AppCustomInvoicingCustomerUpsert)) *AppCustomInvoicingCustomerUpsertBulk", + "line": 696 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerUpsertBulk", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) UpdateUpdatedAt() *AppCustomInvoicingCustomerUpsertBulk", + "line": 711 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerUpsertBulk", + "line": 718 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) UpdateDeletedAt() *AppCustomInvoicingCustomerUpsertBulk", + "line": 725 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) ClearDeletedAt() *AppCustomInvoicingCustomerUpsertBulk", + "line": 732 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerUpsertBulk", + "line": 739 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) UpdateMetadata() *AppCustomInvoicingCustomerUpsertBulk", + "line": 746 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) ClearMetadata() *AppCustomInvoicingCustomerUpsertBulk", + "line": 753 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) Exec(ctx context.Context) error", + "line": 760 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppCustomInvoicingCustomerUpsertBulk) ExecX(ctx context.Context)", + "line": 776 + } + ], + "line_count": 780 + }, + "openmeter/ent/db/appcustominvoicingcustomer_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerDelete", + "signature": "type AppCustomInvoicingCustomerDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomInvoicingCustomerDelete) Where(ps ...predicate.AppCustomInvoicingCustomer) *AppCustomInvoicingCustomerDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomInvoicingCustomerDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomInvoicingCustomerDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppCustomInvoicingCustomerDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerDeleteOne", + "signature": "type AppCustomInvoicingCustomerDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppCustomInvoicingCustomerDeleteOne) Where(ps ...predicate.AppCustomInvoicingCustomer) *AppCustomInvoicingCustomerDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppCustomInvoicingCustomerDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppCustomInvoicingCustomerDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/appcustominvoicingcustomer_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerQuery", + "signature": "type AppCustomInvoicingCustomerQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Where(ps ...predicate.AppCustomInvoicingCustomer) *AppCustomInvoicingCustomerQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Limit(limit int) *AppCustomInvoicingCustomerQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Offset(offset int) *AppCustomInvoicingCustomerQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Unique(unique bool) *AppCustomInvoicingCustomerQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Order(o ...appcustominvoicingcustomer.OrderOption) *AppCustomInvoicingCustomerQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryCustomInvoicingApp", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) QueryCustomInvoicingApp() *AppCustomInvoicingQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) QueryCustomer() *CustomerQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) First(ctx context.Context) (*AppCustomInvoicingCustomer, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) FirstX(ctx context.Context) *AppCustomInvoicingCustomer", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) FirstIDX(ctx context.Context) int", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Only(ctx context.Context) (*AppCustomInvoicingCustomer, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) OnlyX(ctx context.Context) *AppCustomInvoicingCustomer", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) OnlyIDX(ctx context.Context) int", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) All(ctx context.Context) ([]*AppCustomInvoicingCustomer, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) AllX(ctx context.Context) []*AppCustomInvoicingCustomer", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) IDsX(ctx context.Context) []int", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Clone() *AppCustomInvoicingCustomerQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithCustomInvoicingApp", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) WithCustomInvoicingApp(opts ...func(*AppCustomInvoicingQuery)) *AppCustomInvoicingCustomerQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) WithCustomer(opts ...func(*CustomerQuery)) *AppCustomInvoicingCustomerQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) GroupBy(field string, fields ...string) *AppCustomInvoicingCustomerGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Select(fields ...string) *AppCustomInvoicingCustomerSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingCustomerSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AppCustomInvoicingCustomer, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadCustomInvoicingApp", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) loadCustomInvoicingApp(ctx context.Context, query *AppCustomInvoicingQuery, nodes []*AppCustomInvoicingCustomer, init func(*AppCustomInvoicingCustomer), assign func(*AppCustomInvoicingCustomer, *AppCustomInvoicing)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*AppCustomInvoicingCustomer, init func(*AppCustomInvoicingCustomer), assign func(*AppCustomInvoicingCustomer, *Customer)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) ForUpdate(opts ...sql.LockOption) *AppCustomInvoicingCustomerQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppCustomInvoicingCustomerQuery) ForShare(opts ...sql.LockOption) *AppCustomInvoicingCustomerQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerGroupBy", + "signature": "type AppCustomInvoicingCustomerGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppCustomInvoicingCustomerGroupBy) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingCustomerGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppCustomInvoicingCustomerGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppCustomInvoicingCustomerGroupBy) sqlScan(ctx context.Context, root *AppCustomInvoicingCustomerQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerSelect", + "signature": "type AppCustomInvoicingCustomerSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppCustomInvoicingCustomerSelect) Aggregate(fns ...AggregateFunc) *AppCustomInvoicingCustomerSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppCustomInvoicingCustomerSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppCustomInvoicingCustomerSelect) sqlScan(ctx context.Context, root *AppCustomInvoicingCustomerQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/appcustominvoicingcustomer_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerUpdate", + "signature": "type AppCustomInvoicingCustomerUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) Where(ps ...predicate.AppCustomInvoicingCustomer) *AppCustomInvoicingCustomerUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingCustomerUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) ClearDeletedAt() *AppCustomInvoicingCustomerUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) ClearMetadata() *AppCustomInvoicingCustomerUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) Mutation() *AppCustomInvoicingCustomerMutation", + "line": 70 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) Save(ctx context.Context) (int, error)", + "line": 75 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) SaveX(ctx context.Context) int", + "line": 81 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) Exec(ctx context.Context) error", + "line": 90 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) ExecX(ctx context.Context)", + "line": 96 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) defaults()", + "line": 103 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) check() error", + "line": 111 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomInvoicingCustomerUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 121 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomerUpdateOne", + "signature": "type AppCustomInvoicingCustomerUpdateOne struct", + "line": 161 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) SetUpdatedAt(v time.Time) *AppCustomInvoicingCustomerUpdateOne", + "line": 169 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) SetDeletedAt(v time.Time) *AppCustomInvoicingCustomerUpdateOne", + "line": 175 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) SetNillableDeletedAt(v *time.Time) *AppCustomInvoicingCustomerUpdateOne", + "line": 181 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) ClearDeletedAt() *AppCustomInvoicingCustomerUpdateOne", + "line": 189 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) SetMetadata(v map[string]string) *AppCustomInvoicingCustomerUpdateOne", + "line": 195 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) ClearMetadata() *AppCustomInvoicingCustomerUpdateOne", + "line": 201 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) Mutation() *AppCustomInvoicingCustomerMutation", + "line": 207 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) Where(ps ...predicate.AppCustomInvoicingCustomer) *AppCustomInvoicingCustomerUpdateOne", + "line": 212 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) Select(field string, fields ...string) *AppCustomInvoicingCustomerUpdateOne", + "line": 219 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) Save(ctx context.Context) (*AppCustomInvoicingCustomer, error)", + "line": 225 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) SaveX(ctx context.Context) *AppCustomInvoicingCustomer", + "line": 231 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) Exec(ctx context.Context) error", + "line": 240 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) ExecX(ctx context.Context)", + "line": 246 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) defaults()", + "line": 253 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) check() error", + "line": 261 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppCustomInvoicingCustomerUpdateOne) sqlSave(ctx context.Context) (_node *AppCustomInvoicingCustomer, err error)", + "line": 271 + } + ], + "line_count": 328 + }, + "openmeter/ent/db/appstripe.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripe", + "signature": "type AppStripe struct", + "line": 17 + }, + { + "kind": "struct", + "name": "AppStripeEdges", + "signature": "type AppStripeEdges struct", + "line": 48 + }, + { + "kind": "func", + "name": "CustomerAppsOrErr", + "signature": "func (e AppStripeEdges) CustomerAppsOrErr() ([]*AppStripeCustomer, error)", + "line": 60 + }, + { + "kind": "func", + "name": "AppOrErr", + "signature": "func (e AppStripeEdges) AppOrErr() (*App, error)", + "line": 69 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AppStripe) assignValues(columns []string, values []any) error", + "line": 98 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AppStripe) Value(name string) (ent.Value, error)", + "line": 180 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_m *AppStripe) QueryCustomerApps() *AppStripeCustomerQuery", + "line": 185 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_m *AppStripe) QueryApp() *AppQuery", + "line": 190 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AppStripe) Update() *AppStripeUpdateOne", + "line": 197 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AppStripe) Unwrap() *AppStripe", + "line": 203 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AppStripe) String() string", + "line": 213 + } + ], + "line_count": 251 + }, + "openmeter/ent/db/appstripe/appstripe.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByStripeAccountID", + "signature": "func ByStripeAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByStripeLivemode", + "signature": "func ByStripeLivemode(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByAPIKey", + "signature": "func ByAPIKey(opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByMaskedAPIKey", + "signature": "func ByMaskedAPIKey(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByStripeWebhookID", + "signature": "func ByStripeWebhookID(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByWebhookSecret", + "signature": "func ByWebhookSecret(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByCustomerAppsCount", + "signature": "func ByCustomerAppsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByCustomerApps", + "signature": "func ByCustomerApps(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "ByAppField", + "signature": "func ByAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "newCustomerAppsStep", + "signature": "func newCustomerAppsStep() *sqlgraph.Step", + "line": 183 + }, + { + "kind": "func", + "name": "newAppStep", + "signature": "func newAppStep() *sqlgraph.Step", + "line": 190 + } + ], + "line_count": 196 + }, + "openmeter/ent/db/appstripe/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.AppStripe", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.AppStripe", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.AppStripe", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.AppStripe", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.AppStripe", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.AppStripe", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.AppStripe", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.AppStripe", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.AppStripe", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.AppStripe", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.AppStripe", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AppStripe", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AppStripe", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AppStripe", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AppStripe", + "line": 84 + }, + { + "kind": "func", + "name": "StripeAccountID", + "signature": "func StripeAccountID(v string) predicate.AppStripe", + "line": 89 + }, + { + "kind": "func", + "name": "StripeLivemode", + "signature": "func StripeLivemode(v bool) predicate.AppStripe", + "line": 94 + }, + { + "kind": "func", + "name": "APIKey", + "signature": "func APIKey(v string) predicate.AppStripe", + "line": 99 + }, + { + "kind": "func", + "name": "MaskedAPIKey", + "signature": "func MaskedAPIKey(v string) predicate.AppStripe", + "line": 104 + }, + { + "kind": "func", + "name": "StripeWebhookID", + "signature": "func StripeWebhookID(v string) predicate.AppStripe", + "line": 109 + }, + { + "kind": "func", + "name": "WebhookSecret", + "signature": "func WebhookSecret(v string) predicate.AppStripe", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AppStripe", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AppStripe", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AppStripe", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AppStripe", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AppStripe", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AppStripe", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AppStripe", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AppStripe", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AppStripe", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AppStripe", + "line": 164 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AppStripe", + "line": 169 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AppStripe", + "line": 174 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AppStripe", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AppStripe", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AppStripe", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AppStripe", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AppStripe", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AppStripe", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AppStripe", + "line": 209 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AppStripe", + "line": 214 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AppStripe", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AppStripe", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AppStripe", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AppStripe", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AppStripe", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AppStripe", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AppStripe", + "line": 249 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AppStripe", + "line": 254 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AppStripe", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AppStripe", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AppStripe", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AppStripe", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AppStripe", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AppStripe", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AppStripe", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AppStripe", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AppStripe", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AppStripe", + "line": 304 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AppStripe", + "line": 309 + }, + { + "kind": "func", + "name": "StripeAccountIDEQ", + "signature": "func StripeAccountIDEQ(v string) predicate.AppStripe", + "line": 314 + }, + { + "kind": "func", + "name": "StripeAccountIDNEQ", + "signature": "func StripeAccountIDNEQ(v string) predicate.AppStripe", + "line": 319 + }, + { + "kind": "func", + "name": "StripeAccountIDIn", + "signature": "func StripeAccountIDIn(vs ...string) predicate.AppStripe", + "line": 324 + }, + { + "kind": "func", + "name": "StripeAccountIDNotIn", + "signature": "func StripeAccountIDNotIn(vs ...string) predicate.AppStripe", + "line": 329 + }, + { + "kind": "func", + "name": "StripeAccountIDGT", + "signature": "func StripeAccountIDGT(v string) predicate.AppStripe", + "line": 334 + }, + { + "kind": "func", + "name": "StripeAccountIDGTE", + "signature": "func StripeAccountIDGTE(v string) predicate.AppStripe", + "line": 339 + }, + { + "kind": "func", + "name": "StripeAccountIDLT", + "signature": "func StripeAccountIDLT(v string) predicate.AppStripe", + "line": 344 + }, + { + "kind": "func", + "name": "StripeAccountIDLTE", + "signature": "func StripeAccountIDLTE(v string) predicate.AppStripe", + "line": 349 + }, + { + "kind": "func", + "name": "StripeAccountIDContains", + "signature": "func StripeAccountIDContains(v string) predicate.AppStripe", + "line": 354 + }, + { + "kind": "func", + "name": "StripeAccountIDHasPrefix", + "signature": "func StripeAccountIDHasPrefix(v string) predicate.AppStripe", + "line": 359 + }, + { + "kind": "func", + "name": "StripeAccountIDHasSuffix", + "signature": "func StripeAccountIDHasSuffix(v string) predicate.AppStripe", + "line": 364 + }, + { + "kind": "func", + "name": "StripeAccountIDEqualFold", + "signature": "func StripeAccountIDEqualFold(v string) predicate.AppStripe", + "line": 369 + }, + { + "kind": "func", + "name": "StripeAccountIDContainsFold", + "signature": "func StripeAccountIDContainsFold(v string) predicate.AppStripe", + "line": 374 + }, + { + "kind": "func", + "name": "StripeLivemodeEQ", + "signature": "func StripeLivemodeEQ(v bool) predicate.AppStripe", + "line": 379 + }, + { + "kind": "func", + "name": "StripeLivemodeNEQ", + "signature": "func StripeLivemodeNEQ(v bool) predicate.AppStripe", + "line": 384 + }, + { + "kind": "func", + "name": "APIKeyEQ", + "signature": "func APIKeyEQ(v string) predicate.AppStripe", + "line": 389 + }, + { + "kind": "func", + "name": "APIKeyNEQ", + "signature": "func APIKeyNEQ(v string) predicate.AppStripe", + "line": 394 + }, + { + "kind": "func", + "name": "APIKeyIn", + "signature": "func APIKeyIn(vs ...string) predicate.AppStripe", + "line": 399 + }, + { + "kind": "func", + "name": "APIKeyNotIn", + "signature": "func APIKeyNotIn(vs ...string) predicate.AppStripe", + "line": 404 + }, + { + "kind": "func", + "name": "APIKeyGT", + "signature": "func APIKeyGT(v string) predicate.AppStripe", + "line": 409 + }, + { + "kind": "func", + "name": "APIKeyGTE", + "signature": "func APIKeyGTE(v string) predicate.AppStripe", + "line": 414 + }, + { + "kind": "func", + "name": "APIKeyLT", + "signature": "func APIKeyLT(v string) predicate.AppStripe", + "line": 419 + }, + { + "kind": "func", + "name": "APIKeyLTE", + "signature": "func APIKeyLTE(v string) predicate.AppStripe", + "line": 424 + }, + { + "kind": "func", + "name": "APIKeyContains", + "signature": "func APIKeyContains(v string) predicate.AppStripe", + "line": 429 + }, + { + "kind": "func", + "name": "APIKeyHasPrefix", + "signature": "func APIKeyHasPrefix(v string) predicate.AppStripe", + "line": 434 + }, + { + "kind": "func", + "name": "APIKeyHasSuffix", + "signature": "func APIKeyHasSuffix(v string) predicate.AppStripe", + "line": 439 + }, + { + "kind": "func", + "name": "APIKeyEqualFold", + "signature": "func APIKeyEqualFold(v string) predicate.AppStripe", + "line": 444 + }, + { + "kind": "func", + "name": "APIKeyContainsFold", + "signature": "func APIKeyContainsFold(v string) predicate.AppStripe", + "line": 449 + }, + { + "kind": "func", + "name": "MaskedAPIKeyEQ", + "signature": "func MaskedAPIKeyEQ(v string) predicate.AppStripe", + "line": 454 + }, + { + "kind": "func", + "name": "MaskedAPIKeyNEQ", + "signature": "func MaskedAPIKeyNEQ(v string) predicate.AppStripe", + "line": 459 + }, + { + "kind": "func", + "name": "MaskedAPIKeyIn", + "signature": "func MaskedAPIKeyIn(vs ...string) predicate.AppStripe", + "line": 464 + }, + { + "kind": "func", + "name": "MaskedAPIKeyNotIn", + "signature": "func MaskedAPIKeyNotIn(vs ...string) predicate.AppStripe", + "line": 469 + }, + { + "kind": "func", + "name": "MaskedAPIKeyGT", + "signature": "func MaskedAPIKeyGT(v string) predicate.AppStripe", + "line": 474 + }, + { + "kind": "func", + "name": "MaskedAPIKeyGTE", + "signature": "func MaskedAPIKeyGTE(v string) predicate.AppStripe", + "line": 479 + }, + { + "kind": "func", + "name": "MaskedAPIKeyLT", + "signature": "func MaskedAPIKeyLT(v string) predicate.AppStripe", + "line": 484 + }, + { + "kind": "func", + "name": "MaskedAPIKeyLTE", + "signature": "func MaskedAPIKeyLTE(v string) predicate.AppStripe", + "line": 489 + }, + { + "kind": "func", + "name": "MaskedAPIKeyContains", + "signature": "func MaskedAPIKeyContains(v string) predicate.AppStripe", + "line": 494 + }, + { + "kind": "func", + "name": "MaskedAPIKeyHasPrefix", + "signature": "func MaskedAPIKeyHasPrefix(v string) predicate.AppStripe", + "line": 499 + }, + { + "kind": "func", + "name": "MaskedAPIKeyHasSuffix", + "signature": "func MaskedAPIKeyHasSuffix(v string) predicate.AppStripe", + "line": 504 + }, + { + "kind": "func", + "name": "MaskedAPIKeyEqualFold", + "signature": "func MaskedAPIKeyEqualFold(v string) predicate.AppStripe", + "line": 509 + }, + { + "kind": "func", + "name": "MaskedAPIKeyContainsFold", + "signature": "func MaskedAPIKeyContainsFold(v string) predicate.AppStripe", + "line": 514 + }, + { + "kind": "func", + "name": "StripeWebhookIDEQ", + "signature": "func StripeWebhookIDEQ(v string) predicate.AppStripe", + "line": 519 + }, + { + "kind": "func", + "name": "StripeWebhookIDNEQ", + "signature": "func StripeWebhookIDNEQ(v string) predicate.AppStripe", + "line": 524 + }, + { + "kind": "func", + "name": "StripeWebhookIDIn", + "signature": "func StripeWebhookIDIn(vs ...string) predicate.AppStripe", + "line": 529 + }, + { + "kind": "func", + "name": "StripeWebhookIDNotIn", + "signature": "func StripeWebhookIDNotIn(vs ...string) predicate.AppStripe", + "line": 534 + }, + { + "kind": "func", + "name": "StripeWebhookIDGT", + "signature": "func StripeWebhookIDGT(v string) predicate.AppStripe", + "line": 539 + }, + { + "kind": "func", + "name": "StripeWebhookIDGTE", + "signature": "func StripeWebhookIDGTE(v string) predicate.AppStripe", + "line": 544 + }, + { + "kind": "func", + "name": "StripeWebhookIDLT", + "signature": "func StripeWebhookIDLT(v string) predicate.AppStripe", + "line": 549 + }, + { + "kind": "func", + "name": "StripeWebhookIDLTE", + "signature": "func StripeWebhookIDLTE(v string) predicate.AppStripe", + "line": 554 + }, + { + "kind": "func", + "name": "StripeWebhookIDContains", + "signature": "func StripeWebhookIDContains(v string) predicate.AppStripe", + "line": 559 + }, + { + "kind": "func", + "name": "StripeWebhookIDHasPrefix", + "signature": "func StripeWebhookIDHasPrefix(v string) predicate.AppStripe", + "line": 564 + }, + { + "kind": "func", + "name": "StripeWebhookIDHasSuffix", + "signature": "func StripeWebhookIDHasSuffix(v string) predicate.AppStripe", + "line": 569 + }, + { + "kind": "func", + "name": "StripeWebhookIDEqualFold", + "signature": "func StripeWebhookIDEqualFold(v string) predicate.AppStripe", + "line": 574 + }, + { + "kind": "func", + "name": "StripeWebhookIDContainsFold", + "signature": "func StripeWebhookIDContainsFold(v string) predicate.AppStripe", + "line": 579 + }, + { + "kind": "func", + "name": "WebhookSecretEQ", + "signature": "func WebhookSecretEQ(v string) predicate.AppStripe", + "line": 584 + }, + { + "kind": "func", + "name": "WebhookSecretNEQ", + "signature": "func WebhookSecretNEQ(v string) predicate.AppStripe", + "line": 589 + }, + { + "kind": "func", + "name": "WebhookSecretIn", + "signature": "func WebhookSecretIn(vs ...string) predicate.AppStripe", + "line": 594 + }, + { + "kind": "func", + "name": "WebhookSecretNotIn", + "signature": "func WebhookSecretNotIn(vs ...string) predicate.AppStripe", + "line": 599 + }, + { + "kind": "func", + "name": "WebhookSecretGT", + "signature": "func WebhookSecretGT(v string) predicate.AppStripe", + "line": 604 + }, + { + "kind": "func", + "name": "WebhookSecretGTE", + "signature": "func WebhookSecretGTE(v string) predicate.AppStripe", + "line": 609 + }, + { + "kind": "func", + "name": "WebhookSecretLT", + "signature": "func WebhookSecretLT(v string) predicate.AppStripe", + "line": 614 + }, + { + "kind": "func", + "name": "WebhookSecretLTE", + "signature": "func WebhookSecretLTE(v string) predicate.AppStripe", + "line": 619 + }, + { + "kind": "func", + "name": "WebhookSecretContains", + "signature": "func WebhookSecretContains(v string) predicate.AppStripe", + "line": 624 + }, + { + "kind": "func", + "name": "WebhookSecretHasPrefix", + "signature": "func WebhookSecretHasPrefix(v string) predicate.AppStripe", + "line": 629 + }, + { + "kind": "func", + "name": "WebhookSecretHasSuffix", + "signature": "func WebhookSecretHasSuffix(v string) predicate.AppStripe", + "line": 634 + }, + { + "kind": "func", + "name": "WebhookSecretEqualFold", + "signature": "func WebhookSecretEqualFold(v string) predicate.AppStripe", + "line": 639 + }, + { + "kind": "func", + "name": "WebhookSecretContainsFold", + "signature": "func WebhookSecretContainsFold(v string) predicate.AppStripe", + "line": 644 + }, + { + "kind": "func", + "name": "HasCustomerApps", + "signature": "func HasCustomerApps() predicate.AppStripe", + "line": 649 + }, + { + "kind": "func", + "name": "HasCustomerAppsWith", + "signature": "func HasCustomerAppsWith(preds ...predicate.AppStripeCustomer) predicate.AppStripe", + "line": 660 + }, + { + "kind": "func", + "name": "HasApp", + "signature": "func HasApp() predicate.AppStripe", + "line": 672 + }, + { + "kind": "func", + "name": "HasAppWith", + "signature": "func HasAppWith(preds ...predicate.App) predicate.AppStripe", + "line": 683 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AppStripe) predicate.AppStripe", + "line": 695 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AppStripe) predicate.AppStripe", + "line": 700 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AppStripe) predicate.AppStripe", + "line": 705 + } + ], + "line_count": 707 + }, + "openmeter/ent/db/appstripe_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCreate", + "signature": "type AppStripeCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppStripeCreate) SetNamespace(v string) *AppStripeCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppStripeCreate) SetCreatedAt(v time.Time) *AppStripeCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppStripeCreate) SetNillableCreatedAt(v *time.Time) *AppStripeCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppStripeCreate) SetUpdatedAt(v time.Time) *AppStripeCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppStripeCreate) SetNillableUpdatedAt(v *time.Time) *AppStripeCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppStripeCreate) SetDeletedAt(v time.Time) *AppStripeCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppStripeCreate) SetNillableDeletedAt(v *time.Time) *AppStripeCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetStripeAccountID", + "signature": "func (_c *AppStripeCreate) SetStripeAccountID(v string) *AppStripeCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetStripeLivemode", + "signature": "func (_c *AppStripeCreate) SetStripeLivemode(v bool) *AppStripeCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (_c *AppStripeCreate) SetAPIKey(v string) *AppStripeCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (_c *AppStripeCreate) SetMaskedAPIKey(v string) *AppStripeCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (_c *AppStripeCreate) SetStripeWebhookID(v string) *AppStripeCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (_c *AppStripeCreate) SetWebhookSecret(v string) *AppStripeCreate", + "line": 107 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *AppStripeCreate) SetID(v string) *AppStripeCreate", + "line": 113 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *AppStripeCreate) SetNillableID(v *string) *AppStripeCreate", + "line": 119 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_c *AppStripeCreate) AddCustomerAppIDs(ids ...int) *AppStripeCreate", + "line": 127 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_c *AppStripeCreate) AddCustomerApps(v ...*AppStripeCustomer) *AppStripeCreate", + "line": 133 + }, + { + "kind": "func", + "name": "SetAppID", + "signature": "func (_c *AppStripeCreate) SetAppID(id string) *AppStripeCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetNillableAppID", + "signature": "func (_c *AppStripeCreate) SetNillableAppID(id *string) *AppStripeCreate", + "line": 148 + }, + { + "kind": "func", + "name": "SetApp", + "signature": "func (_c *AppStripeCreate) SetApp(v *App) *AppStripeCreate", + "line": 156 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppStripeCreate) Mutation() *AppStripeMutation", + "line": 161 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppStripeCreate) Save(ctx context.Context) (*AppStripe, error)", + "line": 166 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppStripeCreate) SaveX(ctx context.Context) *AppStripe", + "line": 172 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppStripeCreate) Exec(ctx context.Context) error", + "line": 181 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppStripeCreate) ExecX(ctx context.Context)", + "line": 187 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppStripeCreate) defaults()", + "line": 194 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppStripeCreate) check() error", + "line": 210 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppStripeCreate) sqlSave(ctx context.Context) (*AppStripe, error)", + "line": 266 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppStripeCreate) createSpec() (*AppStripe, *sqlgraph.CreateSpec)", + "line": 289 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppStripeCreate) OnConflict(opts ...sql.ConflictOption) *AppStripeUpsertOne", + "line": 391 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppStripeCreate) OnConflictColumns(columns ...string) *AppStripeUpsertOne", + "line": 404 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeUpsert) SetUpdatedAt(v time.Time) *AppStripeUpsert", + "line": 425 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeUpsert) UpdateUpdatedAt() *AppStripeUpsert", + "line": 431 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeUpsert) SetDeletedAt(v time.Time) *AppStripeUpsert", + "line": 437 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeUpsert) UpdateDeletedAt() *AppStripeUpsert", + "line": 443 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeUpsert) ClearDeletedAt() *AppStripeUpsert", + "line": 449 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (u *AppStripeUpsert) SetAPIKey(v string) *AppStripeUpsert", + "line": 455 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (u *AppStripeUpsert) UpdateAPIKey() *AppStripeUpsert", + "line": 461 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (u *AppStripeUpsert) SetMaskedAPIKey(v string) *AppStripeUpsert", + "line": 467 + }, + { + "kind": "func", + "name": "UpdateMaskedAPIKey", + "signature": "func (u *AppStripeUpsert) UpdateMaskedAPIKey() *AppStripeUpsert", + "line": 473 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (u *AppStripeUpsert) SetStripeWebhookID(v string) *AppStripeUpsert", + "line": 479 + }, + { + "kind": "func", + "name": "UpdateStripeWebhookID", + "signature": "func (u *AppStripeUpsert) UpdateStripeWebhookID() *AppStripeUpsert", + "line": 485 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (u *AppStripeUpsert) SetWebhookSecret(v string) *AppStripeUpsert", + "line": 491 + }, + { + "kind": "func", + "name": "UpdateWebhookSecret", + "signature": "func (u *AppStripeUpsert) UpdateWebhookSecret() *AppStripeUpsert", + "line": 497 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppStripeUpsertOne) UpdateNewValues() *AppStripeUpsertOne", + "line": 513 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppStripeUpsertOne) Ignore() *AppStripeUpsertOne", + "line": 541 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppStripeUpsertOne) DoNothing() *AppStripeUpsertOne", + "line": 548 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppStripeUpsertOne) Update(set func(*AppStripeUpsert)) *AppStripeUpsertOne", + "line": 555 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeUpsertOne) SetUpdatedAt(v time.Time) *AppStripeUpsertOne", + "line": 563 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeUpsertOne) UpdateUpdatedAt() *AppStripeUpsertOne", + "line": 570 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeUpsertOne) SetDeletedAt(v time.Time) *AppStripeUpsertOne", + "line": 577 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeUpsertOne) UpdateDeletedAt() *AppStripeUpsertOne", + "line": 584 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeUpsertOne) ClearDeletedAt() *AppStripeUpsertOne", + "line": 591 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (u *AppStripeUpsertOne) SetAPIKey(v string) *AppStripeUpsertOne", + "line": 598 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (u *AppStripeUpsertOne) UpdateAPIKey() *AppStripeUpsertOne", + "line": 605 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (u *AppStripeUpsertOne) SetMaskedAPIKey(v string) *AppStripeUpsertOne", + "line": 612 + }, + { + "kind": "func", + "name": "UpdateMaskedAPIKey", + "signature": "func (u *AppStripeUpsertOne) UpdateMaskedAPIKey() *AppStripeUpsertOne", + "line": 619 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (u *AppStripeUpsertOne) SetStripeWebhookID(v string) *AppStripeUpsertOne", + "line": 626 + }, + { + "kind": "func", + "name": "UpdateStripeWebhookID", + "signature": "func (u *AppStripeUpsertOne) UpdateStripeWebhookID() *AppStripeUpsertOne", + "line": 633 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (u *AppStripeUpsertOne) SetWebhookSecret(v string) *AppStripeUpsertOne", + "line": 640 + }, + { + "kind": "func", + "name": "UpdateWebhookSecret", + "signature": "func (u *AppStripeUpsertOne) UpdateWebhookSecret() *AppStripeUpsertOne", + "line": 647 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppStripeUpsertOne) Exec(ctx context.Context) error", + "line": 654 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppStripeUpsertOne) ExecX(ctx context.Context)", + "line": 662 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppStripeUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 669 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppStripeUpsertOne) IDX(ctx context.Context) string", + "line": 683 + }, + { + "kind": "struct", + "name": "AppStripeCreateBulk", + "signature": "type AppStripeCreateBulk struct", + "line": 692 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppStripeCreateBulk) Save(ctx context.Context) ([]*AppStripe, error)", + "line": 700 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppStripeCreateBulk) SaveX(ctx context.Context) []*AppStripe", + "line": 756 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppStripeCreateBulk) Exec(ctx context.Context) error", + "line": 765 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppStripeCreateBulk) ExecX(ctx context.Context)", + "line": 771 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppStripeCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppStripeUpsertBulk", + "line": 792 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppStripeCreateBulk) OnConflictColumns(columns ...string) *AppStripeUpsertBulk", + "line": 805 + }, + { + "kind": "struct", + "name": "AppStripeUpsertBulk", + "signature": "type AppStripeUpsertBulk struct", + "line": 814 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppStripeUpsertBulk) UpdateNewValues() *AppStripeUpsertBulk", + "line": 829 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppStripeUpsertBulk) Ignore() *AppStripeUpsertBulk", + "line": 859 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppStripeUpsertBulk) DoNothing() *AppStripeUpsertBulk", + "line": 866 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppStripeUpsertBulk) Update(set func(*AppStripeUpsert)) *AppStripeUpsertBulk", + "line": 873 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeUpsertBulk) SetUpdatedAt(v time.Time) *AppStripeUpsertBulk", + "line": 881 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeUpsertBulk) UpdateUpdatedAt() *AppStripeUpsertBulk", + "line": 888 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeUpsertBulk) SetDeletedAt(v time.Time) *AppStripeUpsertBulk", + "line": 895 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeUpsertBulk) UpdateDeletedAt() *AppStripeUpsertBulk", + "line": 902 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeUpsertBulk) ClearDeletedAt() *AppStripeUpsertBulk", + "line": 909 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (u *AppStripeUpsertBulk) SetAPIKey(v string) *AppStripeUpsertBulk", + "line": 916 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (u *AppStripeUpsertBulk) UpdateAPIKey() *AppStripeUpsertBulk", + "line": 923 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (u *AppStripeUpsertBulk) SetMaskedAPIKey(v string) *AppStripeUpsertBulk", + "line": 930 + }, + { + "kind": "func", + "name": "UpdateMaskedAPIKey", + "signature": "func (u *AppStripeUpsertBulk) UpdateMaskedAPIKey() *AppStripeUpsertBulk", + "line": 937 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (u *AppStripeUpsertBulk) SetStripeWebhookID(v string) *AppStripeUpsertBulk", + "line": 944 + }, + { + "kind": "func", + "name": "UpdateStripeWebhookID", + "signature": "func (u *AppStripeUpsertBulk) UpdateStripeWebhookID() *AppStripeUpsertBulk", + "line": 951 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (u *AppStripeUpsertBulk) SetWebhookSecret(v string) *AppStripeUpsertBulk", + "line": 958 + }, + { + "kind": "func", + "name": "UpdateWebhookSecret", + "signature": "func (u *AppStripeUpsertBulk) UpdateWebhookSecret() *AppStripeUpsertBulk", + "line": 965 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppStripeUpsertBulk) Exec(ctx context.Context) error", + "line": 972 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppStripeUpsertBulk) ExecX(ctx context.Context)", + "line": 988 + } + ], + "line_count": 992 + }, + "openmeter/ent/db/appstripe_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeDelete", + "signature": "type AppStripeDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppStripeDelete) Where(ps ...predicate.AppStripe) *AppStripeDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppStripeDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppStripeDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppStripeDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AppStripeDeleteOne", + "signature": "type AppStripeDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppStripeDeleteOne) Where(ps ...predicate.AppStripe) *AppStripeDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppStripeDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppStripeDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/appstripe_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeQuery", + "signature": "type AppStripeQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppStripeQuery) Where(ps ...predicate.AppStripe) *AppStripeQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppStripeQuery) Limit(limit int) *AppStripeQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppStripeQuery) Offset(offset int) *AppStripeQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppStripeQuery) Unique(unique bool) *AppStripeQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppStripeQuery) Order(o ...appstripe.OrderOption) *AppStripeQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryCustomerApps", + "signature": "func (_q *AppStripeQuery) QueryCustomerApps() *AppStripeCustomerQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryApp", + "signature": "func (_q *AppStripeQuery) QueryApp() *AppQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppStripeQuery) First(ctx context.Context) (*AppStripe, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppStripeQuery) FirstX(ctx context.Context) *AppStripe", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppStripeQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppStripeQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppStripeQuery) Only(ctx context.Context) (*AppStripe, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppStripeQuery) OnlyX(ctx context.Context) *AppStripe", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppStripeQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppStripeQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppStripeQuery) All(ctx context.Context) ([]*AppStripe, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppStripeQuery) AllX(ctx context.Context) []*AppStripe", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppStripeQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppStripeQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppStripeQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppStripeQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppStripeQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppStripeQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppStripeQuery) Clone() *AppStripeQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithCustomerApps", + "signature": "func (_q *AppStripeQuery) WithCustomerApps(opts ...func(*AppStripeCustomerQuery)) *AppStripeQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithApp", + "signature": "func (_q *AppStripeQuery) WithApp(opts ...func(*AppQuery)) *AppStripeQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppStripeQuery) GroupBy(field string, fields ...string) *AppStripeGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppStripeQuery) Select(fields ...string) *AppStripeSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppStripeQuery) Aggregate(fns ...AggregateFunc) *AppStripeSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppStripeQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppStripeQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AppStripe, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadCustomerApps", + "signature": "func (_q *AppStripeQuery) loadCustomerApps(ctx context.Context, query *AppStripeCustomerQuery, nodes []*AppStripe, init func(*AppStripe), assign func(*AppStripe, *AppStripeCustomer)) error", + "line": 454 + }, + { + "kind": "func", + "name": "loadApp", + "signature": "func (_q *AppStripeQuery) loadApp(ctx context.Context, query *AppQuery, nodes []*AppStripe, init func(*AppStripe), assign func(*AppStripe, *App)) error", + "line": 484 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppStripeQuery) sqlCount(ctx context.Context) (int, error)", + "line": 514 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppStripeQuery) querySpec() *sqlgraph.QuerySpec", + "line": 526 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppStripeQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 566 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppStripeQuery) ForUpdate(opts ...sql.LockOption) *AppStripeQuery", + "line": 604 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppStripeQuery) ForShare(opts ...sql.LockOption) *AppStripeQuery", + "line": 617 + }, + { + "kind": "struct", + "name": "AppStripeGroupBy", + "signature": "type AppStripeGroupBy struct", + "line": 628 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppStripeGroupBy) Aggregate(fns ...AggregateFunc) *AppStripeGroupBy", + "line": 634 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppStripeGroupBy) Scan(ctx context.Context, v any) error", + "line": 640 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppStripeGroupBy) sqlScan(ctx context.Context, root *AppStripeQuery, v any) error", + "line": 648 + }, + { + "kind": "struct", + "name": "AppStripeSelect", + "signature": "type AppStripeSelect struct", + "line": 676 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppStripeSelect) Aggregate(fns ...AggregateFunc) *AppStripeSelect", + "line": 682 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppStripeSelect) Scan(ctx context.Context, v any) error", + "line": 688 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppStripeSelect) sqlScan(ctx context.Context, root *AppStripeQuery, v any) error", + "line": 696 + } + ], + "line_count": 715 + }, + "openmeter/ent/db/appstripe_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeUpdate", + "signature": "type AppStripeUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppStripeUpdate) Where(ps ...predicate.AppStripe) *AppStripeUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppStripeUpdate) SetUpdatedAt(v time.Time) *AppStripeUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppStripeUpdate) SetDeletedAt(v time.Time) *AppStripeUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppStripeUpdate) SetNillableDeletedAt(v *time.Time) *AppStripeUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppStripeUpdate) ClearDeletedAt() *AppStripeUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (_u *AppStripeUpdate) SetAPIKey(v string) *AppStripeUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableAPIKey", + "signature": "func (_u *AppStripeUpdate) SetNillableAPIKey(v *string) *AppStripeUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (_u *AppStripeUpdate) SetMaskedAPIKey(v string) *AppStripeUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableMaskedAPIKey", + "signature": "func (_u *AppStripeUpdate) SetNillableMaskedAPIKey(v *string) *AppStripeUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (_u *AppStripeUpdate) SetStripeWebhookID(v string) *AppStripeUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetNillableStripeWebhookID", + "signature": "func (_u *AppStripeUpdate) SetNillableStripeWebhookID(v *string) *AppStripeUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (_u *AppStripeUpdate) SetWebhookSecret(v string) *AppStripeUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "SetNillableWebhookSecret", + "signature": "func (_u *AppStripeUpdate) SetNillableWebhookSecret(v *string) *AppStripeUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppStripeUpdate) AddCustomerAppIDs(ids ...int) *AppStripeUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppStripeUpdate) AddCustomerApps(v ...*AppStripeCustomer) *AppStripeUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppStripeUpdate) Mutation() *AppStripeMutation", + "line": 130 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppStripeUpdate) ClearCustomerApps() *AppStripeUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppStripeUpdate) RemoveCustomerAppIDs(ids ...int) *AppStripeUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppStripeUpdate) RemoveCustomerApps(v ...*AppStripeCustomer) *AppStripeUpdate", + "line": 147 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppStripeUpdate) Save(ctx context.Context) (int, error)", + "line": 156 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppStripeUpdate) SaveX(ctx context.Context) int", + "line": 162 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppStripeUpdate) Exec(ctx context.Context) error", + "line": 171 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppStripeUpdate) ExecX(ctx context.Context)", + "line": 177 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppStripeUpdate) defaults()", + "line": 184 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppStripeUpdate) check() error", + "line": 192 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppStripeUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 216 + }, + { + "kind": "struct", + "name": "AppStripeUpdateOne", + "signature": "type AppStripeUpdateOne struct", + "line": 307 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppStripeUpdateOne) SetUpdatedAt(v time.Time) *AppStripeUpdateOne", + "line": 315 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppStripeUpdateOne) SetDeletedAt(v time.Time) *AppStripeUpdateOne", + "line": 321 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppStripeUpdateOne) SetNillableDeletedAt(v *time.Time) *AppStripeUpdateOne", + "line": 327 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppStripeUpdateOne) ClearDeletedAt() *AppStripeUpdateOne", + "line": 335 + }, + { + "kind": "func", + "name": "SetAPIKey", + "signature": "func (_u *AppStripeUpdateOne) SetAPIKey(v string) *AppStripeUpdateOne", + "line": 341 + }, + { + "kind": "func", + "name": "SetNillableAPIKey", + "signature": "func (_u *AppStripeUpdateOne) SetNillableAPIKey(v *string) *AppStripeUpdateOne", + "line": 347 + }, + { + "kind": "func", + "name": "SetMaskedAPIKey", + "signature": "func (_u *AppStripeUpdateOne) SetMaskedAPIKey(v string) *AppStripeUpdateOne", + "line": 355 + }, + { + "kind": "func", + "name": "SetNillableMaskedAPIKey", + "signature": "func (_u *AppStripeUpdateOne) SetNillableMaskedAPIKey(v *string) *AppStripeUpdateOne", + "line": 361 + }, + { + "kind": "func", + "name": "SetStripeWebhookID", + "signature": "func (_u *AppStripeUpdateOne) SetStripeWebhookID(v string) *AppStripeUpdateOne", + "line": 369 + }, + { + "kind": "func", + "name": "SetNillableStripeWebhookID", + "signature": "func (_u *AppStripeUpdateOne) SetNillableStripeWebhookID(v *string) *AppStripeUpdateOne", + "line": 375 + }, + { + "kind": "func", + "name": "SetWebhookSecret", + "signature": "func (_u *AppStripeUpdateOne) SetWebhookSecret(v string) *AppStripeUpdateOne", + "line": 383 + }, + { + "kind": "func", + "name": "SetNillableWebhookSecret", + "signature": "func (_u *AppStripeUpdateOne) SetNillableWebhookSecret(v *string) *AppStripeUpdateOne", + "line": 389 + }, + { + "kind": "func", + "name": "AddCustomerAppIDs", + "signature": "func (_u *AppStripeUpdateOne) AddCustomerAppIDs(ids ...int) *AppStripeUpdateOne", + "line": 397 + }, + { + "kind": "func", + "name": "AddCustomerApps", + "signature": "func (_u *AppStripeUpdateOne) AddCustomerApps(v ...*AppStripeCustomer) *AppStripeUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppStripeUpdateOne) Mutation() *AppStripeMutation", + "line": 412 + }, + { + "kind": "func", + "name": "ClearCustomerApps", + "signature": "func (_u *AppStripeUpdateOne) ClearCustomerApps() *AppStripeUpdateOne", + "line": 417 + }, + { + "kind": "func", + "name": "RemoveCustomerAppIDs", + "signature": "func (_u *AppStripeUpdateOne) RemoveCustomerAppIDs(ids ...int) *AppStripeUpdateOne", + "line": 423 + }, + { + "kind": "func", + "name": "RemoveCustomerApps", + "signature": "func (_u *AppStripeUpdateOne) RemoveCustomerApps(v ...*AppStripeCustomer) *AppStripeUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppStripeUpdateOne) Where(ps ...predicate.AppStripe) *AppStripeUpdateOne", + "line": 438 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppStripeUpdateOne) Select(field string, fields ...string) *AppStripeUpdateOne", + "line": 445 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppStripeUpdateOne) Save(ctx context.Context) (*AppStripe, error)", + "line": 451 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppStripeUpdateOne) SaveX(ctx context.Context) *AppStripe", + "line": 457 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppStripeUpdateOne) Exec(ctx context.Context) error", + "line": 466 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppStripeUpdateOne) ExecX(ctx context.Context)", + "line": 472 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppStripeUpdateOne) defaults()", + "line": 479 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppStripeUpdateOne) check() error", + "line": 487 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppStripeUpdateOne) sqlSave(ctx context.Context) (_node *AppStripe, err error)", + "line": 511 + } + ], + "line_count": 619 + }, + "openmeter/ent/db/appstripecustomer.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCustomer", + "signature": "type AppStripeCustomer struct", + "line": 18 + }, + { + "kind": "struct", + "name": "AppStripeCustomerEdges", + "signature": "type AppStripeCustomerEdges struct", + "line": 45 + }, + { + "kind": "func", + "name": "StripeAppOrErr", + "signature": "func (e AppStripeCustomerEdges) StripeAppOrErr() (*AppStripe, error)", + "line": 57 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e AppStripeCustomerEdges) CustomerOrErr() (*Customer, error)", + "line": 68 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *AppStripeCustomer) assignValues(columns []string, values []any) error", + "line": 97 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *AppStripeCustomer) Value(name string) (ent.Value, error)", + "line": 168 + }, + { + "kind": "func", + "name": "QueryStripeApp", + "signature": "func (_m *AppStripeCustomer) QueryStripeApp() *AppStripeQuery", + "line": 173 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *AppStripeCustomer) QueryCustomer() *CustomerQuery", + "line": 178 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *AppStripeCustomer) Update() *AppStripeCustomerUpdateOne", + "line": 185 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *AppStripeCustomer) Unwrap() *AppStripeCustomer", + "line": 191 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *AppStripeCustomer) String() string", + "line": 201 + } + ], + "line_count": 237 + }, + "openmeter/ent/db/appstripecustomer/appstripecustomer.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 69 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByAppID", + "signature": "func ByAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByStripeCustomerID", + "signature": "func ByStripeCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByStripeDefaultPaymentMethodID", + "signature": "func ByStripeDefaultPaymentMethodID(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByStripeAppField", + "signature": "func ByStripeAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 151 + }, + { + "kind": "func", + "name": "newStripeAppStep", + "signature": "func newStripeAppStep() *sqlgraph.Step", + "line": 156 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 163 + } + ], + "line_count": 169 + }, + "openmeter/ent/db/appstripecustomer/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.AppStripeCustomer", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.AppStripeCustomer", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.AppStripeCustomer", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.AppStripeCustomer", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.AppStripeCustomer", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.AppStripeCustomer", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.AppStripeCustomer", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.AppStripeCustomer", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.AppStripeCustomer", + "line": 54 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.AppStripeCustomer", + "line": 59 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.AppStripeCustomer", + "line": 64 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.AppStripeCustomer", + "line": 69 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.AppStripeCustomer", + "line": 74 + }, + { + "kind": "func", + "name": "AppID", + "signature": "func AppID(v string) predicate.AppStripeCustomer", + "line": 79 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.AppStripeCustomer", + "line": 84 + }, + { + "kind": "func", + "name": "StripeCustomerID", + "signature": "func StripeCustomerID(v string) predicate.AppStripeCustomer", + "line": 89 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodID", + "signature": "func StripeDefaultPaymentMethodID(v string) predicate.AppStripeCustomer", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.AppStripeCustomer", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.AppStripeCustomer", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.AppStripeCustomer", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.AppStripeCustomer", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.AppStripeCustomer", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.AppStripeCustomer", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.AppStripeCustomer", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.AppStripeCustomer", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.AppStripeCustomer", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.AppStripeCustomer", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.AppStripeCustomer", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.AppStripeCustomer", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.AppStripeCustomer", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.AppStripeCustomer", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.AppStripeCustomer", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.AppStripeCustomer", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.AppStripeCustomer", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.AppStripeCustomer", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.AppStripeCustomer", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.AppStripeCustomer", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.AppStripeCustomer", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.AppStripeCustomer", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.AppStripeCustomer", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.AppStripeCustomer", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.AppStripeCustomer", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.AppStripeCustomer", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.AppStripeCustomer", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.AppStripeCustomer", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.AppStripeCustomer", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.AppStripeCustomer", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.AppStripeCustomer", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.AppStripeCustomer", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.AppStripeCustomer", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.AppStripeCustomer", + "line": 289 + }, + { + "kind": "func", + "name": "AppIDEQ", + "signature": "func AppIDEQ(v string) predicate.AppStripeCustomer", + "line": 294 + }, + { + "kind": "func", + "name": "AppIDNEQ", + "signature": "func AppIDNEQ(v string) predicate.AppStripeCustomer", + "line": 299 + }, + { + "kind": "func", + "name": "AppIDIn", + "signature": "func AppIDIn(vs ...string) predicate.AppStripeCustomer", + "line": 304 + }, + { + "kind": "func", + "name": "AppIDNotIn", + "signature": "func AppIDNotIn(vs ...string) predicate.AppStripeCustomer", + "line": 309 + }, + { + "kind": "func", + "name": "AppIDGT", + "signature": "func AppIDGT(v string) predicate.AppStripeCustomer", + "line": 314 + }, + { + "kind": "func", + "name": "AppIDGTE", + "signature": "func AppIDGTE(v string) predicate.AppStripeCustomer", + "line": 319 + }, + { + "kind": "func", + "name": "AppIDLT", + "signature": "func AppIDLT(v string) predicate.AppStripeCustomer", + "line": 324 + }, + { + "kind": "func", + "name": "AppIDLTE", + "signature": "func AppIDLTE(v string) predicate.AppStripeCustomer", + "line": 329 + }, + { + "kind": "func", + "name": "AppIDContains", + "signature": "func AppIDContains(v string) predicate.AppStripeCustomer", + "line": 334 + }, + { + "kind": "func", + "name": "AppIDHasPrefix", + "signature": "func AppIDHasPrefix(v string) predicate.AppStripeCustomer", + "line": 339 + }, + { + "kind": "func", + "name": "AppIDHasSuffix", + "signature": "func AppIDHasSuffix(v string) predicate.AppStripeCustomer", + "line": 344 + }, + { + "kind": "func", + "name": "AppIDEqualFold", + "signature": "func AppIDEqualFold(v string) predicate.AppStripeCustomer", + "line": 349 + }, + { + "kind": "func", + "name": "AppIDContainsFold", + "signature": "func AppIDContainsFold(v string) predicate.AppStripeCustomer", + "line": 354 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.AppStripeCustomer", + "line": 359 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.AppStripeCustomer", + "line": 364 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.AppStripeCustomer", + "line": 369 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.AppStripeCustomer", + "line": 374 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.AppStripeCustomer", + "line": 379 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.AppStripeCustomer", + "line": 384 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.AppStripeCustomer", + "line": 389 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.AppStripeCustomer", + "line": 394 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.AppStripeCustomer", + "line": 399 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.AppStripeCustomer", + "line": 404 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.AppStripeCustomer", + "line": 409 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.AppStripeCustomer", + "line": 414 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.AppStripeCustomer", + "line": 419 + }, + { + "kind": "func", + "name": "StripeCustomerIDEQ", + "signature": "func StripeCustomerIDEQ(v string) predicate.AppStripeCustomer", + "line": 424 + }, + { + "kind": "func", + "name": "StripeCustomerIDNEQ", + "signature": "func StripeCustomerIDNEQ(v string) predicate.AppStripeCustomer", + "line": 429 + }, + { + "kind": "func", + "name": "StripeCustomerIDIn", + "signature": "func StripeCustomerIDIn(vs ...string) predicate.AppStripeCustomer", + "line": 434 + }, + { + "kind": "func", + "name": "StripeCustomerIDNotIn", + "signature": "func StripeCustomerIDNotIn(vs ...string) predicate.AppStripeCustomer", + "line": 439 + }, + { + "kind": "func", + "name": "StripeCustomerIDGT", + "signature": "func StripeCustomerIDGT(v string) predicate.AppStripeCustomer", + "line": 444 + }, + { + "kind": "func", + "name": "StripeCustomerIDGTE", + "signature": "func StripeCustomerIDGTE(v string) predicate.AppStripeCustomer", + "line": 449 + }, + { + "kind": "func", + "name": "StripeCustomerIDLT", + "signature": "func StripeCustomerIDLT(v string) predicate.AppStripeCustomer", + "line": 454 + }, + { + "kind": "func", + "name": "StripeCustomerIDLTE", + "signature": "func StripeCustomerIDLTE(v string) predicate.AppStripeCustomer", + "line": 459 + }, + { + "kind": "func", + "name": "StripeCustomerIDContains", + "signature": "func StripeCustomerIDContains(v string) predicate.AppStripeCustomer", + "line": 464 + }, + { + "kind": "func", + "name": "StripeCustomerIDHasPrefix", + "signature": "func StripeCustomerIDHasPrefix(v string) predicate.AppStripeCustomer", + "line": 469 + }, + { + "kind": "func", + "name": "StripeCustomerIDHasSuffix", + "signature": "func StripeCustomerIDHasSuffix(v string) predicate.AppStripeCustomer", + "line": 474 + }, + { + "kind": "func", + "name": "StripeCustomerIDEqualFold", + "signature": "func StripeCustomerIDEqualFold(v string) predicate.AppStripeCustomer", + "line": 479 + }, + { + "kind": "func", + "name": "StripeCustomerIDContainsFold", + "signature": "func StripeCustomerIDContainsFold(v string) predicate.AppStripeCustomer", + "line": 484 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDEQ", + "signature": "func StripeDefaultPaymentMethodIDEQ(v string) predicate.AppStripeCustomer", + "line": 489 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDNEQ", + "signature": "func StripeDefaultPaymentMethodIDNEQ(v string) predicate.AppStripeCustomer", + "line": 494 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDIn", + "signature": "func StripeDefaultPaymentMethodIDIn(vs ...string) predicate.AppStripeCustomer", + "line": 499 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDNotIn", + "signature": "func StripeDefaultPaymentMethodIDNotIn(vs ...string) predicate.AppStripeCustomer", + "line": 504 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDGT", + "signature": "func StripeDefaultPaymentMethodIDGT(v string) predicate.AppStripeCustomer", + "line": 509 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDGTE", + "signature": "func StripeDefaultPaymentMethodIDGTE(v string) predicate.AppStripeCustomer", + "line": 514 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDLT", + "signature": "func StripeDefaultPaymentMethodIDLT(v string) predicate.AppStripeCustomer", + "line": 519 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDLTE", + "signature": "func StripeDefaultPaymentMethodIDLTE(v string) predicate.AppStripeCustomer", + "line": 524 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDContains", + "signature": "func StripeDefaultPaymentMethodIDContains(v string) predicate.AppStripeCustomer", + "line": 529 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDHasPrefix", + "signature": "func StripeDefaultPaymentMethodIDHasPrefix(v string) predicate.AppStripeCustomer", + "line": 534 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDHasSuffix", + "signature": "func StripeDefaultPaymentMethodIDHasSuffix(v string) predicate.AppStripeCustomer", + "line": 539 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDIsNil", + "signature": "func StripeDefaultPaymentMethodIDIsNil() predicate.AppStripeCustomer", + "line": 544 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDNotNil", + "signature": "func StripeDefaultPaymentMethodIDNotNil() predicate.AppStripeCustomer", + "line": 549 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDEqualFold", + "signature": "func StripeDefaultPaymentMethodIDEqualFold(v string) predicate.AppStripeCustomer", + "line": 554 + }, + { + "kind": "func", + "name": "StripeDefaultPaymentMethodIDContainsFold", + "signature": "func StripeDefaultPaymentMethodIDContainsFold(v string) predicate.AppStripeCustomer", + "line": 559 + }, + { + "kind": "func", + "name": "HasStripeApp", + "signature": "func HasStripeApp() predicate.AppStripeCustomer", + "line": 564 + }, + { + "kind": "func", + "name": "HasStripeAppWith", + "signature": "func HasStripeAppWith(preds ...predicate.AppStripe) predicate.AppStripeCustomer", + "line": 575 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.AppStripeCustomer", + "line": 587 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.AppStripeCustomer", + "line": 598 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.AppStripeCustomer) predicate.AppStripeCustomer", + "line": 610 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.AppStripeCustomer) predicate.AppStripeCustomer", + "line": 615 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.AppStripeCustomer) predicate.AppStripeCustomer", + "line": 620 + } + ], + "line_count": 622 + }, + "openmeter/ent/db/appstripecustomer_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCustomerCreate", + "signature": "type AppStripeCustomerCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *AppStripeCustomerCreate) SetNamespace(v string) *AppStripeCustomerCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetCreatedAt(v time.Time) *AppStripeCustomerCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetNillableCreatedAt(v *time.Time) *AppStripeCustomerCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetUpdatedAt(v time.Time) *AppStripeCustomerCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetNillableUpdatedAt(v *time.Time) *AppStripeCustomerCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetDeletedAt(v time.Time) *AppStripeCustomerCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *AppStripeCustomerCreate) SetNillableDeletedAt(v *time.Time) *AppStripeCustomerCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetAppID", + "signature": "func (_c *AppStripeCustomerCreate) SetAppID(v string) *AppStripeCustomerCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *AppStripeCustomerCreate) SetCustomerID(v string) *AppStripeCustomerCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_c *AppStripeCustomerCreate) SetStripeCustomerID(v string) *AppStripeCustomerCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (_c *AppStripeCustomerCreate) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableStripeDefaultPaymentMethodID", + "signature": "func (_c *AppStripeCustomerCreate) SetNillableStripeDefaultPaymentMethodID(v *string) *AppStripeCustomerCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetStripeAppID", + "signature": "func (_c *AppStripeCustomerCreate) SetStripeAppID(id string) *AppStripeCustomerCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetStripeApp", + "signature": "func (_c *AppStripeCustomerCreate) SetStripeApp(v *AppStripe) *AppStripeCustomerCreate", + "line": 114 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *AppStripeCustomerCreate) SetCustomer(v *Customer) *AppStripeCustomerCreate", + "line": 119 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *AppStripeCustomerCreate) Mutation() *AppStripeCustomerMutation", + "line": 124 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppStripeCustomerCreate) Save(ctx context.Context) (*AppStripeCustomer, error)", + "line": 129 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppStripeCustomerCreate) SaveX(ctx context.Context) *AppStripeCustomer", + "line": 135 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppStripeCustomerCreate) Exec(ctx context.Context) error", + "line": 144 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppStripeCustomerCreate) ExecX(ctx context.Context)", + "line": 150 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *AppStripeCustomerCreate) defaults()", + "line": 157 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *AppStripeCustomerCreate) check() error", + "line": 169 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *AppStripeCustomerCreate) sqlSave(ctx context.Context) (*AppStripeCustomer, error)", + "line": 217 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *AppStripeCustomerCreate) createSpec() (*AppStripeCustomer, *sqlgraph.CreateSpec)", + "line": 235 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppStripeCustomerCreate) OnConflict(opts ...sql.ConflictOption) *AppStripeCustomerUpsertOne", + "line": 318 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppStripeCustomerCreate) OnConflictColumns(columns ...string) *AppStripeCustomerUpsertOne", + "line": 331 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsert) SetUpdatedAt(v time.Time) *AppStripeCustomerUpsert", + "line": 352 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsert) UpdateUpdatedAt() *AppStripeCustomerUpsert", + "line": 358 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeCustomerUpsert) SetDeletedAt(v time.Time) *AppStripeCustomerUpsert", + "line": 364 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeCustomerUpsert) UpdateDeletedAt() *AppStripeCustomerUpsert", + "line": 370 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeCustomerUpsert) ClearDeletedAt() *AppStripeCustomerUpsert", + "line": 376 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsert) SetStripeCustomerID(v string) *AppStripeCustomerUpsert", + "line": 382 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsert) UpdateStripeCustomerID() *AppStripeCustomerUpsert", + "line": 388 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsert) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerUpsert", + "line": 394 + }, + { + "kind": "func", + "name": "UpdateStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsert) UpdateStripeDefaultPaymentMethodID() *AppStripeCustomerUpsert", + "line": 400 + }, + { + "kind": "func", + "name": "ClearStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsert) ClearStripeDefaultPaymentMethodID() *AppStripeCustomerUpsert", + "line": 406 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppStripeCustomerUpsertOne) UpdateNewValues() *AppStripeCustomerUpsertOne", + "line": 419 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppStripeCustomerUpsertOne) Ignore() *AppStripeCustomerUpsertOne", + "line": 444 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppStripeCustomerUpsertOne) DoNothing() *AppStripeCustomerUpsertOne", + "line": 451 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppStripeCustomerUpsertOne) Update(set func(*AppStripeCustomerUpsert)) *AppStripeCustomerUpsertOne", + "line": 458 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsertOne) SetUpdatedAt(v time.Time) *AppStripeCustomerUpsertOne", + "line": 466 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsertOne) UpdateUpdatedAt() *AppStripeCustomerUpsertOne", + "line": 473 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertOne) SetDeletedAt(v time.Time) *AppStripeCustomerUpsertOne", + "line": 480 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertOne) UpdateDeletedAt() *AppStripeCustomerUpsertOne", + "line": 487 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertOne) ClearDeletedAt() *AppStripeCustomerUpsertOne", + "line": 494 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsertOne) SetStripeCustomerID(v string) *AppStripeCustomerUpsertOne", + "line": 501 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsertOne) UpdateStripeCustomerID() *AppStripeCustomerUpsertOne", + "line": 508 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertOne) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerUpsertOne", + "line": 515 + }, + { + "kind": "func", + "name": "UpdateStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertOne) UpdateStripeDefaultPaymentMethodID() *AppStripeCustomerUpsertOne", + "line": 522 + }, + { + "kind": "func", + "name": "ClearStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertOne) ClearStripeDefaultPaymentMethodID() *AppStripeCustomerUpsertOne", + "line": 529 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppStripeCustomerUpsertOne) Exec(ctx context.Context) error", + "line": 536 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppStripeCustomerUpsertOne) ExecX(ctx context.Context)", + "line": 544 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *AppStripeCustomerUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 551 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *AppStripeCustomerUpsertOne) IDX(ctx context.Context) int", + "line": 560 + }, + { + "kind": "struct", + "name": "AppStripeCustomerCreateBulk", + "signature": "type AppStripeCustomerCreateBulk struct", + "line": 569 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *AppStripeCustomerCreateBulk) Save(ctx context.Context) ([]*AppStripeCustomer, error)", + "line": 577 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *AppStripeCustomerCreateBulk) SaveX(ctx context.Context) []*AppStripeCustomer", + "line": 637 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *AppStripeCustomerCreateBulk) Exec(ctx context.Context) error", + "line": 646 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *AppStripeCustomerCreateBulk) ExecX(ctx context.Context)", + "line": 652 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *AppStripeCustomerCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppStripeCustomerUpsertBulk", + "line": 673 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *AppStripeCustomerCreateBulk) OnConflictColumns(columns ...string) *AppStripeCustomerUpsertBulk", + "line": 686 + }, + { + "kind": "struct", + "name": "AppStripeCustomerUpsertBulk", + "signature": "type AppStripeCustomerUpsertBulk struct", + "line": 695 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *AppStripeCustomerUpsertBulk) UpdateNewValues() *AppStripeCustomerUpsertBulk", + "line": 707 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *AppStripeCustomerUpsertBulk) Ignore() *AppStripeCustomerUpsertBulk", + "line": 734 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *AppStripeCustomerUpsertBulk) DoNothing() *AppStripeCustomerUpsertBulk", + "line": 741 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *AppStripeCustomerUpsertBulk) Update(set func(*AppStripeCustomerUpsert)) *AppStripeCustomerUpsertBulk", + "line": 748 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsertBulk) SetUpdatedAt(v time.Time) *AppStripeCustomerUpsertBulk", + "line": 756 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *AppStripeCustomerUpsertBulk) UpdateUpdatedAt() *AppStripeCustomerUpsertBulk", + "line": 763 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertBulk) SetDeletedAt(v time.Time) *AppStripeCustomerUpsertBulk", + "line": 770 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertBulk) UpdateDeletedAt() *AppStripeCustomerUpsertBulk", + "line": 777 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *AppStripeCustomerUpsertBulk) ClearDeletedAt() *AppStripeCustomerUpsertBulk", + "line": 784 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsertBulk) SetStripeCustomerID(v string) *AppStripeCustomerUpsertBulk", + "line": 791 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *AppStripeCustomerUpsertBulk) UpdateStripeCustomerID() *AppStripeCustomerUpsertBulk", + "line": 798 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertBulk) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerUpsertBulk", + "line": 805 + }, + { + "kind": "func", + "name": "UpdateStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertBulk) UpdateStripeDefaultPaymentMethodID() *AppStripeCustomerUpsertBulk", + "line": 812 + }, + { + "kind": "func", + "name": "ClearStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpsertBulk) ClearStripeDefaultPaymentMethodID() *AppStripeCustomerUpsertBulk", + "line": 819 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *AppStripeCustomerUpsertBulk) Exec(ctx context.Context) error", + "line": 826 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *AppStripeCustomerUpsertBulk) ExecX(ctx context.Context)", + "line": 842 + } + ], + "line_count": 846 + }, + "openmeter/ent/db/appstripecustomer_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCustomerDelete", + "signature": "type AppStripeCustomerDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppStripeCustomerDelete) Where(ps ...predicate.AppStripeCustomer) *AppStripeCustomerDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppStripeCustomerDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppStripeCustomerDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *AppStripeCustomerDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "AppStripeCustomerDeleteOne", + "signature": "type AppStripeCustomerDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *AppStripeCustomerDeleteOne) Where(ps ...predicate.AppStripeCustomer) *AppStripeCustomerDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *AppStripeCustomerDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *AppStripeCustomerDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/appstripecustomer_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCustomerQuery", + "signature": "type AppStripeCustomerQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *AppStripeCustomerQuery) Where(ps ...predicate.AppStripeCustomer) *AppStripeCustomerQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *AppStripeCustomerQuery) Limit(limit int) *AppStripeCustomerQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *AppStripeCustomerQuery) Offset(offset int) *AppStripeCustomerQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *AppStripeCustomerQuery) Unique(unique bool) *AppStripeCustomerQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *AppStripeCustomerQuery) Order(o ...appstripecustomer.OrderOption) *AppStripeCustomerQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryStripeApp", + "signature": "func (_q *AppStripeCustomerQuery) QueryStripeApp() *AppStripeQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *AppStripeCustomerQuery) QueryCustomer() *CustomerQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *AppStripeCustomerQuery) First(ctx context.Context) (*AppStripeCustomer, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *AppStripeCustomerQuery) FirstX(ctx context.Context) *AppStripeCustomer", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *AppStripeCustomerQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *AppStripeCustomerQuery) FirstIDX(ctx context.Context) int", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *AppStripeCustomerQuery) Only(ctx context.Context) (*AppStripeCustomer, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *AppStripeCustomerQuery) OnlyX(ctx context.Context) *AppStripeCustomer", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *AppStripeCustomerQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *AppStripeCustomerQuery) OnlyIDX(ctx context.Context) int", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *AppStripeCustomerQuery) All(ctx context.Context) ([]*AppStripeCustomer, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *AppStripeCustomerQuery) AllX(ctx context.Context) []*AppStripeCustomer", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *AppStripeCustomerQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *AppStripeCustomerQuery) IDsX(ctx context.Context) []int", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *AppStripeCustomerQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *AppStripeCustomerQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *AppStripeCustomerQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *AppStripeCustomerQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *AppStripeCustomerQuery) Clone() *AppStripeCustomerQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithStripeApp", + "signature": "func (_q *AppStripeCustomerQuery) WithStripeApp(opts ...func(*AppStripeQuery)) *AppStripeCustomerQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *AppStripeCustomerQuery) WithCustomer(opts ...func(*CustomerQuery)) *AppStripeCustomerQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *AppStripeCustomerQuery) GroupBy(field string, fields ...string) *AppStripeCustomerGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *AppStripeCustomerQuery) Select(fields ...string) *AppStripeCustomerSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *AppStripeCustomerQuery) Aggregate(fns ...AggregateFunc) *AppStripeCustomerSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *AppStripeCustomerQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *AppStripeCustomerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*AppStripeCustomer, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadStripeApp", + "signature": "func (_q *AppStripeCustomerQuery) loadStripeApp(ctx context.Context, query *AppStripeQuery, nodes []*AppStripeCustomer, init func(*AppStripeCustomer), assign func(*AppStripeCustomer, *AppStripe)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *AppStripeCustomerQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*AppStripeCustomer, init func(*AppStripeCustomer), assign func(*AppStripeCustomer, *Customer)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *AppStripeCustomerQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *AppStripeCustomerQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *AppStripeCustomerQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *AppStripeCustomerQuery) ForUpdate(opts ...sql.LockOption) *AppStripeCustomerQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *AppStripeCustomerQuery) ForShare(opts ...sql.LockOption) *AppStripeCustomerQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "AppStripeCustomerGroupBy", + "signature": "type AppStripeCustomerGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *AppStripeCustomerGroupBy) Aggregate(fns ...AggregateFunc) *AppStripeCustomerGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *AppStripeCustomerGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *AppStripeCustomerGroupBy) sqlScan(ctx context.Context, root *AppStripeCustomerQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "AppStripeCustomerSelect", + "signature": "type AppStripeCustomerSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *AppStripeCustomerSelect) Aggregate(fns ...AggregateFunc) *AppStripeCustomerSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *AppStripeCustomerSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *AppStripeCustomerSelect) sqlScan(ctx context.Context, root *AppStripeCustomerQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/appstripecustomer_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripeCustomerUpdate", + "signature": "type AppStripeCustomerUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppStripeCustomerUpdate) Where(ps ...predicate.AppStripeCustomer) *AppStripeCustomerUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppStripeCustomerUpdate) SetUpdatedAt(v time.Time) *AppStripeCustomerUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdate) SetDeletedAt(v time.Time) *AppStripeCustomerUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdate) SetNillableDeletedAt(v *time.Time) *AppStripeCustomerUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdate) ClearDeletedAt() *AppStripeCustomerUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_u *AppStripeCustomerUpdate) SetStripeCustomerID(v string) *AppStripeCustomerUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableStripeCustomerID", + "signature": "func (_u *AppStripeCustomerUpdate) SetNillableStripeCustomerID(v *string) *AppStripeCustomerUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdate) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdate) SetNillableStripeDefaultPaymentMethodID(v *string) *AppStripeCustomerUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "ClearStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdate) ClearStripeDefaultPaymentMethodID() *AppStripeCustomerUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppStripeCustomerUpdate) Mutation() *AppStripeCustomerMutation", + "line": 92 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppStripeCustomerUpdate) Save(ctx context.Context) (int, error)", + "line": 97 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppStripeCustomerUpdate) SaveX(ctx context.Context) int", + "line": 103 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppStripeCustomerUpdate) Exec(ctx context.Context) error", + "line": 112 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppStripeCustomerUpdate) ExecX(ctx context.Context)", + "line": 118 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppStripeCustomerUpdate) defaults()", + "line": 125 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppStripeCustomerUpdate) check() error", + "line": 133 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppStripeCustomerUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 148 + }, + { + "kind": "struct", + "name": "AppStripeCustomerUpdateOne", + "signature": "type AppStripeCustomerUpdateOne struct", + "line": 191 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetUpdatedAt(v time.Time) *AppStripeCustomerUpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetDeletedAt(v time.Time) *AppStripeCustomerUpdateOne", + "line": 205 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetNillableDeletedAt(v *time.Time) *AppStripeCustomerUpdateOne", + "line": 211 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *AppStripeCustomerUpdateOne) ClearDeletedAt() *AppStripeCustomerUpdateOne", + "line": 219 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetStripeCustomerID(v string) *AppStripeCustomerUpdateOne", + "line": 225 + }, + { + "kind": "func", + "name": "SetNillableStripeCustomerID", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetNillableStripeCustomerID(v *string) *AppStripeCustomerUpdateOne", + "line": 231 + }, + { + "kind": "func", + "name": "SetStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetStripeDefaultPaymentMethodID(v string) *AppStripeCustomerUpdateOne", + "line": 239 + }, + { + "kind": "func", + "name": "SetNillableStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdateOne) SetNillableStripeDefaultPaymentMethodID(v *string) *AppStripeCustomerUpdateOne", + "line": 245 + }, + { + "kind": "func", + "name": "ClearStripeDefaultPaymentMethodID", + "signature": "func (_u *AppStripeCustomerUpdateOne) ClearStripeDefaultPaymentMethodID() *AppStripeCustomerUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *AppStripeCustomerUpdateOne) Mutation() *AppStripeCustomerMutation", + "line": 259 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *AppStripeCustomerUpdateOne) Where(ps ...predicate.AppStripeCustomer) *AppStripeCustomerUpdateOne", + "line": 264 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *AppStripeCustomerUpdateOne) Select(field string, fields ...string) *AppStripeCustomerUpdateOne", + "line": 271 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *AppStripeCustomerUpdateOne) Save(ctx context.Context) (*AppStripeCustomer, error)", + "line": 277 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *AppStripeCustomerUpdateOne) SaveX(ctx context.Context) *AppStripeCustomer", + "line": 283 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *AppStripeCustomerUpdateOne) Exec(ctx context.Context) error", + "line": 292 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *AppStripeCustomerUpdateOne) ExecX(ctx context.Context)", + "line": 298 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *AppStripeCustomerUpdateOne) defaults()", + "line": 305 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *AppStripeCustomerUpdateOne) check() error", + "line": 313 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *AppStripeCustomerUpdateOne) sqlSave(ctx context.Context) (_node *AppStripeCustomer, err error)", + "line": 328 + } + ], + "line_count": 388 + }, + "openmeter/ent/db/balancesnapshot.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshot", + "signature": "type BalanceSnapshot struct", + "line": 19 + }, + { + "kind": "struct", + "name": "BalanceSnapshotEdges", + "signature": "type BalanceSnapshotEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func (e BalanceSnapshotEdges) EntitlementOrErr() (*Entitlement, error)", + "line": 60 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BalanceSnapshot) assignValues(columns []string, values []any) error", + "line": 93 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BalanceSnapshot) Value(name string) (ent.Value, error)", + "line": 179 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_m *BalanceSnapshot) QueryEntitlement() *EntitlementQuery", + "line": 184 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BalanceSnapshot) Update() *BalanceSnapshotUpdateOne", + "line": 191 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BalanceSnapshot) Unwrap() *BalanceSnapshot", + "line": 197 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BalanceSnapshot) String() string", + "line": 207 + } + ], + "line_count": 247 + }, + "openmeter/ent/db/balancesnapshot/balancesnapshot.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 66 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 90 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 95 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 100 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 110 + }, + { + "kind": "func", + "name": "ByOwnerID", + "signature": "func ByOwnerID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByBalance", + "signature": "func ByBalance(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByOverage", + "signature": "func ByOverage(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByAt", + "signature": "func ByAt(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByEntitlementField", + "signature": "func ByEntitlementField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "newEntitlementStep", + "signature": "func newEntitlementStep() *sqlgraph.Step", + "line": 140 + } + ], + "line_count": 146 + }, + "openmeter/ent/db/balancesnapshot/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.BalanceSnapshot", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.BalanceSnapshot", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.BalanceSnapshot", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.BalanceSnapshot", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.BalanceSnapshot", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.BalanceSnapshot", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.BalanceSnapshot", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.BalanceSnapshot", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.BalanceSnapshot", + "line": 54 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BalanceSnapshot", + "line": 59 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BalanceSnapshot", + "line": 64 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BalanceSnapshot", + "line": 69 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BalanceSnapshot", + "line": 74 + }, + { + "kind": "func", + "name": "OwnerID", + "signature": "func OwnerID(v string) predicate.BalanceSnapshot", + "line": 79 + }, + { + "kind": "func", + "name": "Balance", + "signature": "func Balance(v float64) predicate.BalanceSnapshot", + "line": 84 + }, + { + "kind": "func", + "name": "Overage", + "signature": "func Overage(v float64) predicate.BalanceSnapshot", + "line": 89 + }, + { + "kind": "func", + "name": "At", + "signature": "func At(v time.Time) predicate.BalanceSnapshot", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BalanceSnapshot", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BalanceSnapshot", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BalanceSnapshot", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BalanceSnapshot", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BalanceSnapshot", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BalanceSnapshot", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BalanceSnapshot", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BalanceSnapshot", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BalanceSnapshot", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BalanceSnapshot", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BalanceSnapshot", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BalanceSnapshot", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BalanceSnapshot", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BalanceSnapshot", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BalanceSnapshot", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BalanceSnapshot", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BalanceSnapshot", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BalanceSnapshot", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BalanceSnapshot", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BalanceSnapshot", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BalanceSnapshot", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BalanceSnapshot", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BalanceSnapshot", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BalanceSnapshot", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BalanceSnapshot", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BalanceSnapshot", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BalanceSnapshot", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BalanceSnapshot", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BalanceSnapshot", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BalanceSnapshot", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BalanceSnapshot", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BalanceSnapshot", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BalanceSnapshot", + "line": 289 + }, + { + "kind": "func", + "name": "OwnerIDEQ", + "signature": "func OwnerIDEQ(v string) predicate.BalanceSnapshot", + "line": 294 + }, + { + "kind": "func", + "name": "OwnerIDNEQ", + "signature": "func OwnerIDNEQ(v string) predicate.BalanceSnapshot", + "line": 299 + }, + { + "kind": "func", + "name": "OwnerIDIn", + "signature": "func OwnerIDIn(vs ...string) predicate.BalanceSnapshot", + "line": 304 + }, + { + "kind": "func", + "name": "OwnerIDNotIn", + "signature": "func OwnerIDNotIn(vs ...string) predicate.BalanceSnapshot", + "line": 309 + }, + { + "kind": "func", + "name": "OwnerIDGT", + "signature": "func OwnerIDGT(v string) predicate.BalanceSnapshot", + "line": 314 + }, + { + "kind": "func", + "name": "OwnerIDGTE", + "signature": "func OwnerIDGTE(v string) predicate.BalanceSnapshot", + "line": 319 + }, + { + "kind": "func", + "name": "OwnerIDLT", + "signature": "func OwnerIDLT(v string) predicate.BalanceSnapshot", + "line": 324 + }, + { + "kind": "func", + "name": "OwnerIDLTE", + "signature": "func OwnerIDLTE(v string) predicate.BalanceSnapshot", + "line": 329 + }, + { + "kind": "func", + "name": "OwnerIDContains", + "signature": "func OwnerIDContains(v string) predicate.BalanceSnapshot", + "line": 334 + }, + { + "kind": "func", + "name": "OwnerIDHasPrefix", + "signature": "func OwnerIDHasPrefix(v string) predicate.BalanceSnapshot", + "line": 339 + }, + { + "kind": "func", + "name": "OwnerIDHasSuffix", + "signature": "func OwnerIDHasSuffix(v string) predicate.BalanceSnapshot", + "line": 344 + }, + { + "kind": "func", + "name": "OwnerIDEqualFold", + "signature": "func OwnerIDEqualFold(v string) predicate.BalanceSnapshot", + "line": 349 + }, + { + "kind": "func", + "name": "OwnerIDContainsFold", + "signature": "func OwnerIDContainsFold(v string) predicate.BalanceSnapshot", + "line": 354 + }, + { + "kind": "func", + "name": "UsageIsNil", + "signature": "func UsageIsNil() predicate.BalanceSnapshot", + "line": 359 + }, + { + "kind": "func", + "name": "UsageNotNil", + "signature": "func UsageNotNil() predicate.BalanceSnapshot", + "line": 364 + }, + { + "kind": "func", + "name": "BalanceEQ", + "signature": "func BalanceEQ(v float64) predicate.BalanceSnapshot", + "line": 369 + }, + { + "kind": "func", + "name": "BalanceNEQ", + "signature": "func BalanceNEQ(v float64) predicate.BalanceSnapshot", + "line": 374 + }, + { + "kind": "func", + "name": "BalanceIn", + "signature": "func BalanceIn(vs ...float64) predicate.BalanceSnapshot", + "line": 379 + }, + { + "kind": "func", + "name": "BalanceNotIn", + "signature": "func BalanceNotIn(vs ...float64) predicate.BalanceSnapshot", + "line": 384 + }, + { + "kind": "func", + "name": "BalanceGT", + "signature": "func BalanceGT(v float64) predicate.BalanceSnapshot", + "line": 389 + }, + { + "kind": "func", + "name": "BalanceGTE", + "signature": "func BalanceGTE(v float64) predicate.BalanceSnapshot", + "line": 394 + }, + { + "kind": "func", + "name": "BalanceLT", + "signature": "func BalanceLT(v float64) predicate.BalanceSnapshot", + "line": 399 + }, + { + "kind": "func", + "name": "BalanceLTE", + "signature": "func BalanceLTE(v float64) predicate.BalanceSnapshot", + "line": 404 + }, + { + "kind": "func", + "name": "OverageEQ", + "signature": "func OverageEQ(v float64) predicate.BalanceSnapshot", + "line": 409 + }, + { + "kind": "func", + "name": "OverageNEQ", + "signature": "func OverageNEQ(v float64) predicate.BalanceSnapshot", + "line": 414 + }, + { + "kind": "func", + "name": "OverageIn", + "signature": "func OverageIn(vs ...float64) predicate.BalanceSnapshot", + "line": 419 + }, + { + "kind": "func", + "name": "OverageNotIn", + "signature": "func OverageNotIn(vs ...float64) predicate.BalanceSnapshot", + "line": 424 + }, + { + "kind": "func", + "name": "OverageGT", + "signature": "func OverageGT(v float64) predicate.BalanceSnapshot", + "line": 429 + }, + { + "kind": "func", + "name": "OverageGTE", + "signature": "func OverageGTE(v float64) predicate.BalanceSnapshot", + "line": 434 + }, + { + "kind": "func", + "name": "OverageLT", + "signature": "func OverageLT(v float64) predicate.BalanceSnapshot", + "line": 439 + }, + { + "kind": "func", + "name": "OverageLTE", + "signature": "func OverageLTE(v float64) predicate.BalanceSnapshot", + "line": 444 + }, + { + "kind": "func", + "name": "AtEQ", + "signature": "func AtEQ(v time.Time) predicate.BalanceSnapshot", + "line": 449 + }, + { + "kind": "func", + "name": "AtNEQ", + "signature": "func AtNEQ(v time.Time) predicate.BalanceSnapshot", + "line": 454 + }, + { + "kind": "func", + "name": "AtIn", + "signature": "func AtIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 459 + }, + { + "kind": "func", + "name": "AtNotIn", + "signature": "func AtNotIn(vs ...time.Time) predicate.BalanceSnapshot", + "line": 464 + }, + { + "kind": "func", + "name": "AtGT", + "signature": "func AtGT(v time.Time) predicate.BalanceSnapshot", + "line": 469 + }, + { + "kind": "func", + "name": "AtGTE", + "signature": "func AtGTE(v time.Time) predicate.BalanceSnapshot", + "line": 474 + }, + { + "kind": "func", + "name": "AtLT", + "signature": "func AtLT(v time.Time) predicate.BalanceSnapshot", + "line": 479 + }, + { + "kind": "func", + "name": "AtLTE", + "signature": "func AtLTE(v time.Time) predicate.BalanceSnapshot", + "line": 484 + }, + { + "kind": "func", + "name": "HasEntitlement", + "signature": "func HasEntitlement() predicate.BalanceSnapshot", + "line": 489 + }, + { + "kind": "func", + "name": "HasEntitlementWith", + "signature": "func HasEntitlementWith(preds ...predicate.Entitlement) predicate.BalanceSnapshot", + "line": 500 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BalanceSnapshot) predicate.BalanceSnapshot", + "line": 512 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BalanceSnapshot) predicate.BalanceSnapshot", + "line": 517 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BalanceSnapshot) predicate.BalanceSnapshot", + "line": 522 + } + ], + "line_count": 524 + }, + "openmeter/ent/db/balancesnapshot_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshotCreate", + "signature": "type BalanceSnapshotCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BalanceSnapshotCreate) SetNamespace(v string) *BalanceSnapshotCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetCreatedAt(v time.Time) *BalanceSnapshotCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetNillableCreatedAt(v *time.Time) *BalanceSnapshotCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetUpdatedAt(v time.Time) *BalanceSnapshotCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetNillableUpdatedAt(v *time.Time) *BalanceSnapshotCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetDeletedAt(v time.Time) *BalanceSnapshotCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BalanceSnapshotCreate) SetNillableDeletedAt(v *time.Time) *BalanceSnapshotCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetOwnerID", + "signature": "func (_c *BalanceSnapshotCreate) SetOwnerID(v string) *BalanceSnapshotCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetGrantBalances", + "signature": "func (_c *BalanceSnapshotCreate) SetGrantBalances(v balance.Map) *BalanceSnapshotCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetUsage", + "signature": "func (_c *BalanceSnapshotCreate) SetUsage(v *balance.SnapshottedUsage) *BalanceSnapshotCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetBalance", + "signature": "func (_c *BalanceSnapshotCreate) SetBalance(v float64) *BalanceSnapshotCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetOverage", + "signature": "func (_c *BalanceSnapshotCreate) SetOverage(v float64) *BalanceSnapshotCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetAt", + "signature": "func (_c *BalanceSnapshotCreate) SetAt(v time.Time) *BalanceSnapshotCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_c *BalanceSnapshotCreate) SetEntitlementID(id string) *BalanceSnapshotCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_c *BalanceSnapshotCreate) SetEntitlement(v *Entitlement) *BalanceSnapshotCreate", + "line": 118 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BalanceSnapshotCreate) Mutation() *BalanceSnapshotMutation", + "line": 123 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BalanceSnapshotCreate) Save(ctx context.Context) (*BalanceSnapshot, error)", + "line": 128 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BalanceSnapshotCreate) SaveX(ctx context.Context) *BalanceSnapshot", + "line": 134 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BalanceSnapshotCreate) Exec(ctx context.Context) error", + "line": 143 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BalanceSnapshotCreate) ExecX(ctx context.Context)", + "line": 149 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BalanceSnapshotCreate) defaults()", + "line": 156 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BalanceSnapshotCreate) check() error", + "line": 168 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BalanceSnapshotCreate) sqlSave(ctx context.Context) (*BalanceSnapshot, error)", + "line": 204 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BalanceSnapshotCreate) createSpec() (*BalanceSnapshot, *sqlgraph.CreateSpec)", + "line": 222 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BalanceSnapshotCreate) OnConflict(opts ...sql.ConflictOption) *BalanceSnapshotUpsertOne", + "line": 300 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BalanceSnapshotCreate) OnConflictColumns(columns ...string) *BalanceSnapshotUpsertOne", + "line": 313 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsert) SetUpdatedAt(v time.Time) *BalanceSnapshotUpsert", + "line": 334 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsert) UpdateUpdatedAt() *BalanceSnapshotUpsert", + "line": 340 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BalanceSnapshotUpsert) SetDeletedAt(v time.Time) *BalanceSnapshotUpsert", + "line": 346 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BalanceSnapshotUpsert) UpdateDeletedAt() *BalanceSnapshotUpsert", + "line": 352 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BalanceSnapshotUpsert) ClearDeletedAt() *BalanceSnapshotUpsert", + "line": 358 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BalanceSnapshotUpsertOne) UpdateNewValues() *BalanceSnapshotUpsertOne", + "line": 371 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BalanceSnapshotUpsertOne) Ignore() *BalanceSnapshotUpsertOne", + "line": 408 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BalanceSnapshotUpsertOne) DoNothing() *BalanceSnapshotUpsertOne", + "line": 415 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BalanceSnapshotUpsertOne) Update(set func(*BalanceSnapshotUpsert)) *BalanceSnapshotUpsertOne", + "line": 422 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsertOne) SetUpdatedAt(v time.Time) *BalanceSnapshotUpsertOne", + "line": 430 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsertOne) UpdateUpdatedAt() *BalanceSnapshotUpsertOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertOne) SetDeletedAt(v time.Time) *BalanceSnapshotUpsertOne", + "line": 444 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertOne) UpdateDeletedAt() *BalanceSnapshotUpsertOne", + "line": 451 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertOne) ClearDeletedAt() *BalanceSnapshotUpsertOne", + "line": 458 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BalanceSnapshotUpsertOne) Exec(ctx context.Context) error", + "line": 465 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BalanceSnapshotUpsertOne) ExecX(ctx context.Context)", + "line": 473 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BalanceSnapshotUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 480 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BalanceSnapshotUpsertOne) IDX(ctx context.Context) int", + "line": 489 + }, + { + "kind": "struct", + "name": "BalanceSnapshotCreateBulk", + "signature": "type BalanceSnapshotCreateBulk struct", + "line": 498 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BalanceSnapshotCreateBulk) Save(ctx context.Context) ([]*BalanceSnapshot, error)", + "line": 506 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BalanceSnapshotCreateBulk) SaveX(ctx context.Context) []*BalanceSnapshot", + "line": 566 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BalanceSnapshotCreateBulk) Exec(ctx context.Context) error", + "line": 575 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BalanceSnapshotCreateBulk) ExecX(ctx context.Context)", + "line": 581 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BalanceSnapshotCreateBulk) OnConflict(opts ...sql.ConflictOption) *BalanceSnapshotUpsertBulk", + "line": 602 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BalanceSnapshotCreateBulk) OnConflictColumns(columns ...string) *BalanceSnapshotUpsertBulk", + "line": 615 + }, + { + "kind": "struct", + "name": "BalanceSnapshotUpsertBulk", + "signature": "type BalanceSnapshotUpsertBulk struct", + "line": 624 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BalanceSnapshotUpsertBulk) UpdateNewValues() *BalanceSnapshotUpsertBulk", + "line": 636 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BalanceSnapshotUpsertBulk) Ignore() *BalanceSnapshotUpsertBulk", + "line": 675 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BalanceSnapshotUpsertBulk) DoNothing() *BalanceSnapshotUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BalanceSnapshotUpsertBulk) Update(set func(*BalanceSnapshotUpsert)) *BalanceSnapshotUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsertBulk) SetUpdatedAt(v time.Time) *BalanceSnapshotUpsertBulk", + "line": 697 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BalanceSnapshotUpsertBulk) UpdateUpdatedAt() *BalanceSnapshotUpsertBulk", + "line": 704 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertBulk) SetDeletedAt(v time.Time) *BalanceSnapshotUpsertBulk", + "line": 711 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertBulk) UpdateDeletedAt() *BalanceSnapshotUpsertBulk", + "line": 718 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BalanceSnapshotUpsertBulk) ClearDeletedAt() *BalanceSnapshotUpsertBulk", + "line": 725 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BalanceSnapshotUpsertBulk) Exec(ctx context.Context) error", + "line": 732 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BalanceSnapshotUpsertBulk) ExecX(ctx context.Context)", + "line": 748 + } + ], + "line_count": 752 + }, + "openmeter/ent/db/balancesnapshot_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshotDelete", + "signature": "type BalanceSnapshotDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BalanceSnapshotDelete) Where(ps ...predicate.BalanceSnapshot) *BalanceSnapshotDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BalanceSnapshotDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BalanceSnapshotDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BalanceSnapshotDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BalanceSnapshotDeleteOne", + "signature": "type BalanceSnapshotDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BalanceSnapshotDeleteOne) Where(ps ...predicate.BalanceSnapshot) *BalanceSnapshotDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BalanceSnapshotDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BalanceSnapshotDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/balancesnapshot_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshotQuery", + "signature": "type BalanceSnapshotQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BalanceSnapshotQuery) Where(ps ...predicate.BalanceSnapshot) *BalanceSnapshotQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BalanceSnapshotQuery) Limit(limit int) *BalanceSnapshotQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BalanceSnapshotQuery) Offset(offset int) *BalanceSnapshotQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BalanceSnapshotQuery) Unique(unique bool) *BalanceSnapshotQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BalanceSnapshotQuery) Order(o ...balancesnapshot.OrderOption) *BalanceSnapshotQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_q *BalanceSnapshotQuery) QueryEntitlement() *EntitlementQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BalanceSnapshotQuery) First(ctx context.Context) (*BalanceSnapshot, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BalanceSnapshotQuery) FirstX(ctx context.Context) *BalanceSnapshot", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BalanceSnapshotQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BalanceSnapshotQuery) FirstIDX(ctx context.Context) int", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BalanceSnapshotQuery) Only(ctx context.Context) (*BalanceSnapshot, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BalanceSnapshotQuery) OnlyX(ctx context.Context) *BalanceSnapshot", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BalanceSnapshotQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BalanceSnapshotQuery) OnlyIDX(ctx context.Context) int", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BalanceSnapshotQuery) All(ctx context.Context) ([]*BalanceSnapshot, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BalanceSnapshotQuery) AllX(ctx context.Context) []*BalanceSnapshot", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BalanceSnapshotQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BalanceSnapshotQuery) IDsX(ctx context.Context) []int", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BalanceSnapshotQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BalanceSnapshotQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BalanceSnapshotQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BalanceSnapshotQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BalanceSnapshotQuery) Clone() *BalanceSnapshotQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithEntitlement", + "signature": "func (_q *BalanceSnapshotQuery) WithEntitlement(opts ...func(*EntitlementQuery)) *BalanceSnapshotQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BalanceSnapshotQuery) GroupBy(field string, fields ...string) *BalanceSnapshotGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BalanceSnapshotQuery) Select(fields ...string) *BalanceSnapshotSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BalanceSnapshotQuery) Aggregate(fns ...AggregateFunc) *BalanceSnapshotSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BalanceSnapshotQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BalanceSnapshotQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BalanceSnapshot, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadEntitlement", + "signature": "func (_q *BalanceSnapshotQuery) loadEntitlement(ctx context.Context, query *EntitlementQuery, nodes []*BalanceSnapshot, init func(*BalanceSnapshot), assign func(*BalanceSnapshot, *Entitlement)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BalanceSnapshotQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BalanceSnapshotQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BalanceSnapshotQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BalanceSnapshotQuery) ForUpdate(opts ...sql.LockOption) *BalanceSnapshotQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BalanceSnapshotQuery) ForShare(opts ...sql.LockOption) *BalanceSnapshotQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "BalanceSnapshotGroupBy", + "signature": "type BalanceSnapshotGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BalanceSnapshotGroupBy) Aggregate(fns ...AggregateFunc) *BalanceSnapshotGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BalanceSnapshotGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BalanceSnapshotGroupBy) sqlScan(ctx context.Context, root *BalanceSnapshotQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "BalanceSnapshotSelect", + "signature": "type BalanceSnapshotSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BalanceSnapshotSelect) Aggregate(fns ...AggregateFunc) *BalanceSnapshotSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BalanceSnapshotSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BalanceSnapshotSelect) sqlScan(ctx context.Context, root *BalanceSnapshotQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/balancesnapshot_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshotUpdate", + "signature": "type BalanceSnapshotUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BalanceSnapshotUpdate) Where(ps ...predicate.BalanceSnapshot) *BalanceSnapshotUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BalanceSnapshotUpdate) SetUpdatedAt(v time.Time) *BalanceSnapshotUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdate) SetDeletedAt(v time.Time) *BalanceSnapshotUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdate) SetNillableDeletedAt(v *time.Time) *BalanceSnapshotUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdate) ClearDeletedAt() *BalanceSnapshotUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BalanceSnapshotUpdate) Mutation() *BalanceSnapshotMutation", + "line": 58 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BalanceSnapshotUpdate) Save(ctx context.Context) (int, error)", + "line": 63 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BalanceSnapshotUpdate) SaveX(ctx context.Context) int", + "line": 69 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BalanceSnapshotUpdate) Exec(ctx context.Context) error", + "line": 78 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BalanceSnapshotUpdate) ExecX(ctx context.Context)", + "line": 84 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BalanceSnapshotUpdate) defaults()", + "line": 91 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BalanceSnapshotUpdate) check() error", + "line": 99 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BalanceSnapshotUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 106 + }, + { + "kind": "struct", + "name": "BalanceSnapshotUpdateOne", + "signature": "type BalanceSnapshotUpdateOne struct", + "line": 143 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BalanceSnapshotUpdateOne) SetUpdatedAt(v time.Time) *BalanceSnapshotUpdateOne", + "line": 151 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdateOne) SetDeletedAt(v time.Time) *BalanceSnapshotUpdateOne", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdateOne) SetNillableDeletedAt(v *time.Time) *BalanceSnapshotUpdateOne", + "line": 163 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BalanceSnapshotUpdateOne) ClearDeletedAt() *BalanceSnapshotUpdateOne", + "line": 171 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BalanceSnapshotUpdateOne) Mutation() *BalanceSnapshotMutation", + "line": 177 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BalanceSnapshotUpdateOne) Where(ps ...predicate.BalanceSnapshot) *BalanceSnapshotUpdateOne", + "line": 182 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BalanceSnapshotUpdateOne) Select(field string, fields ...string) *BalanceSnapshotUpdateOne", + "line": 189 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BalanceSnapshotUpdateOne) Save(ctx context.Context) (*BalanceSnapshot, error)", + "line": 195 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BalanceSnapshotUpdateOne) SaveX(ctx context.Context) *BalanceSnapshot", + "line": 201 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BalanceSnapshotUpdateOne) Exec(ctx context.Context) error", + "line": 210 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BalanceSnapshotUpdateOne) ExecX(ctx context.Context)", + "line": 216 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BalanceSnapshotUpdateOne) defaults()", + "line": 223 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BalanceSnapshotUpdateOne) check() error", + "line": 231 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BalanceSnapshotUpdateOne) sqlSave(ctx context.Context) (_node *BalanceSnapshot, err error)", + "line": 238 + } + ], + "line_count": 292 + }, + "openmeter/ent/db/billingcustomerlock.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerLock", + "signature": "type BillingCustomerLock struct", + "line": 15 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingCustomerLock) assignValues(columns []string, values []any) error", + "line": 42 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingCustomerLock) Value(name string) (ent.Value, error)", + "line": 75 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingCustomerLock) Update() *BillingCustomerLockUpdateOne", + "line": 82 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingCustomerLock) Unwrap() *BillingCustomerLock", + "line": 88 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingCustomerLock) String() string", + "line": 98 + } + ], + "line_count": 112 + }, + "openmeter/ent/db/billingcustomerlock/billingcustomerlock.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\nconst (", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 30 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 50 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 55 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 60 + } + ], + "line_count": 62 + }, + "openmeter/ent/db/billingcustomerlock/where.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingCustomerLock", + "line": 11 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingCustomerLock", + "line": 16 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingCustomerLock", + "line": 21 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingCustomerLock", + "line": 26 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingCustomerLock", + "line": 31 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingCustomerLock", + "line": 36 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingCustomerLock", + "line": 41 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingCustomerLock", + "line": 46 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingCustomerLock", + "line": 51 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingCustomerLock", + "line": 56 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingCustomerLock", + "line": 61 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingCustomerLock", + "line": 66 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.BillingCustomerLock", + "line": 71 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingCustomerLock", + "line": 76 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingCustomerLock", + "line": 81 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingCustomerLock", + "line": 86 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingCustomerLock", + "line": 91 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingCustomerLock", + "line": 96 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingCustomerLock", + "line": 101 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingCustomerLock", + "line": 106 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingCustomerLock", + "line": 111 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingCustomerLock", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingCustomerLock", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingCustomerLock", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingCustomerLock", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingCustomerLock", + "line": 136 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.BillingCustomerLock", + "line": 141 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.BillingCustomerLock", + "line": 146 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.BillingCustomerLock", + "line": 151 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.BillingCustomerLock", + "line": 156 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.BillingCustomerLock", + "line": 161 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.BillingCustomerLock", + "line": 166 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.BillingCustomerLock", + "line": 171 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.BillingCustomerLock", + "line": 176 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.BillingCustomerLock", + "line": 181 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.BillingCustomerLock", + "line": 186 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.BillingCustomerLock", + "line": 191 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.BillingCustomerLock", + "line": 196 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.BillingCustomerLock", + "line": 201 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingCustomerLock) predicate.BillingCustomerLock", + "line": 206 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingCustomerLock) predicate.BillingCustomerLock", + "line": 211 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingCustomerLock) predicate.BillingCustomerLock", + "line": 216 + } + ], + "line_count": 218 + }, + "openmeter/ent/db/billingcustomerlock_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerLockCreate", + "signature": "type BillingCustomerLockCreate struct", + "line": 18 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingCustomerLockCreate) SetNamespace(v string) *BillingCustomerLockCreate", + "line": 26 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *BillingCustomerLockCreate) SetCustomerID(v string) *BillingCustomerLockCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingCustomerLockCreate) SetID(v string) *BillingCustomerLockCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingCustomerLockCreate) SetNillableID(v *string) *BillingCustomerLockCreate", + "line": 44 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingCustomerLockCreate) Mutation() *BillingCustomerLockMutation", + "line": 52 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingCustomerLockCreate) Save(ctx context.Context) (*BillingCustomerLock, error)", + "line": 57 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingCustomerLockCreate) SaveX(ctx context.Context) *BillingCustomerLock", + "line": 63 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingCustomerLockCreate) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingCustomerLockCreate) ExecX(ctx context.Context)", + "line": 78 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingCustomerLockCreate) defaults()", + "line": 85 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingCustomerLockCreate) check() error", + "line": 93 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingCustomerLockCreate) sqlSave(ctx context.Context) (*BillingCustomerLock, error)", + "line": 108 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingCustomerLockCreate) createSpec() (*BillingCustomerLock, *sqlgraph.CreateSpec)", + "line": 131 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingCustomerLockCreate) OnConflict(opts ...sql.ConflictOption) *BillingCustomerLockUpsertOne", + "line": 168 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingCustomerLockCreate) OnConflictColumns(columns ...string) *BillingCustomerLockUpsertOne", + "line": 181 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (u *BillingCustomerLockUpsert) SetCustomerID(v string) *BillingCustomerLockUpsert", + "line": 202 + }, + { + "kind": "func", + "name": "UpdateCustomerID", + "signature": "func (u *BillingCustomerLockUpsert) UpdateCustomerID() *BillingCustomerLockUpsert", + "line": 208 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingCustomerLockUpsertOne) UpdateNewValues() *BillingCustomerLockUpsertOne", + "line": 224 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingCustomerLockUpsertOne) Ignore() *BillingCustomerLockUpsertOne", + "line": 243 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingCustomerLockUpsertOne) DoNothing() *BillingCustomerLockUpsertOne", + "line": 250 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingCustomerLockUpsertOne) Update(set func(*BillingCustomerLockUpsert)) *BillingCustomerLockUpsertOne", + "line": 257 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (u *BillingCustomerLockUpsertOne) SetCustomerID(v string) *BillingCustomerLockUpsertOne", + "line": 265 + }, + { + "kind": "func", + "name": "UpdateCustomerID", + "signature": "func (u *BillingCustomerLockUpsertOne) UpdateCustomerID() *BillingCustomerLockUpsertOne", + "line": 272 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingCustomerLockUpsertOne) Exec(ctx context.Context) error", + "line": 279 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingCustomerLockUpsertOne) ExecX(ctx context.Context)", + "line": 287 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingCustomerLockUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 294 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingCustomerLockUpsertOne) IDX(ctx context.Context) string", + "line": 308 + }, + { + "kind": "struct", + "name": "BillingCustomerLockCreateBulk", + "signature": "type BillingCustomerLockCreateBulk struct", + "line": 317 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingCustomerLockCreateBulk) Save(ctx context.Context) ([]*BillingCustomerLock, error)", + "line": 325 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingCustomerLockCreateBulk) SaveX(ctx context.Context) []*BillingCustomerLock", + "line": 381 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingCustomerLockCreateBulk) Exec(ctx context.Context) error", + "line": 390 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingCustomerLockCreateBulk) ExecX(ctx context.Context)", + "line": 396 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingCustomerLockCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingCustomerLockUpsertBulk", + "line": 417 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingCustomerLockCreateBulk) OnConflictColumns(columns ...string) *BillingCustomerLockUpsertBulk", + "line": 430 + }, + { + "kind": "struct", + "name": "BillingCustomerLockUpsertBulk", + "signature": "type BillingCustomerLockUpsertBulk struct", + "line": 439 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingCustomerLockUpsertBulk) UpdateNewValues() *BillingCustomerLockUpsertBulk", + "line": 454 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingCustomerLockUpsertBulk) Ignore() *BillingCustomerLockUpsertBulk", + "line": 475 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingCustomerLockUpsertBulk) DoNothing() *BillingCustomerLockUpsertBulk", + "line": 482 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingCustomerLockUpsertBulk) Update(set func(*BillingCustomerLockUpsert)) *BillingCustomerLockUpsertBulk", + "line": 489 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (u *BillingCustomerLockUpsertBulk) SetCustomerID(v string) *BillingCustomerLockUpsertBulk", + "line": 497 + }, + { + "kind": "func", + "name": "UpdateCustomerID", + "signature": "func (u *BillingCustomerLockUpsertBulk) UpdateCustomerID() *BillingCustomerLockUpsertBulk", + "line": 504 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingCustomerLockUpsertBulk) Exec(ctx context.Context) error", + "line": 511 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingCustomerLockUpsertBulk) ExecX(ctx context.Context)", + "line": 527 + } + ], + "line_count": 531 + }, + "openmeter/ent/db/billingcustomerlock_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerLockDelete", + "signature": "type BillingCustomerLockDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingCustomerLockDelete) Where(ps ...predicate.BillingCustomerLock) *BillingCustomerLockDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingCustomerLockDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingCustomerLockDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingCustomerLockDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingCustomerLockDeleteOne", + "signature": "type BillingCustomerLockDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingCustomerLockDeleteOne) Where(ps ...predicate.BillingCustomerLock) *BillingCustomerLockDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingCustomerLockDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingCustomerLockDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingcustomerlock_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerLockQuery", + "signature": "type BillingCustomerLockQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingCustomerLockQuery) Where(ps ...predicate.BillingCustomerLock) *BillingCustomerLockQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingCustomerLockQuery) Limit(limit int) *BillingCustomerLockQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingCustomerLockQuery) Offset(offset int) *BillingCustomerLockQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingCustomerLockQuery) Unique(unique bool) *BillingCustomerLockQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingCustomerLockQuery) Order(o ...billingcustomerlock.OrderOption) *BillingCustomerLockQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingCustomerLockQuery) First(ctx context.Context) (*BillingCustomerLock, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingCustomerLockQuery) FirstX(ctx context.Context) *BillingCustomerLock", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingCustomerLockQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingCustomerLockQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingCustomerLockQuery) Only(ctx context.Context) (*BillingCustomerLock, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingCustomerLockQuery) OnlyX(ctx context.Context) *BillingCustomerLock", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingCustomerLockQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingCustomerLockQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingCustomerLockQuery) All(ctx context.Context) ([]*BillingCustomerLock, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingCustomerLockQuery) AllX(ctx context.Context) []*BillingCustomerLock", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingCustomerLockQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingCustomerLockQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingCustomerLockQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingCustomerLockQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingCustomerLockQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingCustomerLockQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingCustomerLockQuery) Clone() *BillingCustomerLockQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingCustomerLockQuery) GroupBy(field string, fields ...string) *BillingCustomerLockGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingCustomerLockQuery) Select(fields ...string) *BillingCustomerLockSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingCustomerLockQuery) Aggregate(fns ...AggregateFunc) *BillingCustomerLockSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingCustomerLockQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingCustomerLockQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingCustomerLock, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingCustomerLockQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingCustomerLockQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingCustomerLockQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingCustomerLockQuery) ForUpdate(opts ...sql.LockOption) *BillingCustomerLockQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingCustomerLockQuery) ForShare(opts ...sql.LockOption) *BillingCustomerLockQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "BillingCustomerLockGroupBy", + "signature": "type BillingCustomerLockGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingCustomerLockGroupBy) Aggregate(fns ...AggregateFunc) *BillingCustomerLockGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingCustomerLockGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingCustomerLockGroupBy) sqlScan(ctx context.Context, root *BillingCustomerLockQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "BillingCustomerLockSelect", + "signature": "type BillingCustomerLockSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingCustomerLockSelect) Aggregate(fns ...AggregateFunc) *BillingCustomerLockSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingCustomerLockSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingCustomerLockSelect) sqlScan(ctx context.Context, root *BillingCustomerLockQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/billingcustomerlock_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerLockUpdate", + "signature": "type BillingCustomerLockUpdate struct", + "line": 18 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingCustomerLockUpdate) Where(ps ...predicate.BillingCustomerLock) *BillingCustomerLockUpdate", + "line": 25 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_u *BillingCustomerLockUpdate) SetCustomerID(v string) *BillingCustomerLockUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetNillableCustomerID", + "signature": "func (_u *BillingCustomerLockUpdate) SetNillableCustomerID(v *string) *BillingCustomerLockUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingCustomerLockUpdate) Mutation() *BillingCustomerLockMutation", + "line": 45 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingCustomerLockUpdate) Save(ctx context.Context) (int, error)", + "line": 50 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingCustomerLockUpdate) SaveX(ctx context.Context) int", + "line": 55 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingCustomerLockUpdate) Exec(ctx context.Context) error", + "line": 64 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingCustomerLockUpdate) ExecX(ctx context.Context)", + "line": 70 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingCustomerLockUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 76 + }, + { + "kind": "struct", + "name": "BillingCustomerLockUpdateOne", + "signature": "type BillingCustomerLockUpdateOne struct", + "line": 101 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_u *BillingCustomerLockUpdateOne) SetCustomerID(v string) *BillingCustomerLockUpdateOne", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableCustomerID", + "signature": "func (_u *BillingCustomerLockUpdateOne) SetNillableCustomerID(v *string) *BillingCustomerLockUpdateOne", + "line": 115 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingCustomerLockUpdateOne) Mutation() *BillingCustomerLockMutation", + "line": 123 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingCustomerLockUpdateOne) Where(ps ...predicate.BillingCustomerLock) *BillingCustomerLockUpdateOne", + "line": 128 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingCustomerLockUpdateOne) Select(field string, fields ...string) *BillingCustomerLockUpdateOne", + "line": 135 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingCustomerLockUpdateOne) Save(ctx context.Context) (*BillingCustomerLock, error)", + "line": 141 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingCustomerLockUpdateOne) SaveX(ctx context.Context) *BillingCustomerLock", + "line": 146 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingCustomerLockUpdateOne) Exec(ctx context.Context) error", + "line": 155 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingCustomerLockUpdateOne) ExecX(ctx context.Context)", + "line": 161 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingCustomerLockUpdateOne) sqlSave(ctx context.Context) (_node *BillingCustomerLock, err error)", + "line": 167 + } + ], + "line_count": 209 + }, + "openmeter/ent/db/billingcustomeroverride.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerOverride", + "signature": "type BillingCustomerOverride struct", + "line": 23 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideEdges", + "signature": "type BillingCustomerOverrideEdges struct", + "line": 68 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e BillingCustomerOverrideEdges) CustomerOrErr() (*Customer, error)", + "line": 82 + }, + { + "kind": "func", + "name": "BillingProfileOrErr", + "signature": "func (e BillingCustomerOverrideEdges) BillingProfileOrErr() (*BillingProfile, error)", + "line": 93 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e BillingCustomerOverrideEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 104 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingCustomerOverride) assignValues(columns []string, values []any) error", + "line": 135 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingCustomerOverride) Value(name string) (ent.Value, error)", + "line": 273 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *BillingCustomerOverride) QueryCustomer() *CustomerQuery", + "line": 278 + }, + { + "kind": "func", + "name": "QueryBillingProfile", + "signature": "func (_m *BillingCustomerOverride) QueryBillingProfile() *BillingProfileQuery", + "line": 283 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *BillingCustomerOverride) QueryTaxCode() *TaxCodeQuery", + "line": 288 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingCustomerOverride) Update() *BillingCustomerOverrideUpdateOne", + "line": 295 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingCustomerOverride) Unwrap() *BillingCustomerOverride", + "line": 301 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingCustomerOverride) String() string", + "line": 311 + } + ], + "line_count": 392 + }, + "openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 108 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 131 + }, + { + "kind": "func", + "name": "CollectionAlignmentValidator", + "signature": "func CollectionAlignmentValidator(ca billing.AlignmentKind) error", + "line": 141 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodValidator", + "signature": "func InvoiceCollectionMethodValidator(icm billing.CollectionMethod) error", + "line": 151 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 179 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 184 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 189 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 194 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "ByBillingProfileID", + "signature": "func ByBillingProfileID(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "ByCollectionAlignment", + "signature": "func ByCollectionAlignment(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByLineCollectionPeriod", + "signature": "func ByLineCollectionPeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 214 + }, + { + "kind": "func", + "name": "ByInvoiceAutoAdvance", + "signature": "func ByInvoiceAutoAdvance(opts ...sql.OrderTermOption) OrderOption", + "line": 219 + }, + { + "kind": "func", + "name": "ByInvoiceDraftPeriod", + "signature": "func ByInvoiceDraftPeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 224 + }, + { + "kind": "func", + "name": "ByInvoiceDueAfter", + "signature": "func ByInvoiceDueAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 229 + }, + { + "kind": "func", + "name": "ByInvoiceCollectionMethod", + "signature": "func ByInvoiceCollectionMethod(opts ...sql.OrderTermOption) OrderOption", + "line": 234 + }, + { + "kind": "func", + "name": "ByInvoiceProgressiveBilling", + "signature": "func ByInvoiceProgressiveBilling(opts ...sql.OrderTermOption) OrderOption", + "line": 239 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 244 + }, + { + "kind": "func", + "name": "ByBillingProfileField", + "signature": "func ByBillingProfileField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 263 + }, + { + "kind": "func", + "name": "newBillingProfileStep", + "signature": "func newBillingProfileStep() *sqlgraph.Step", + "line": 270 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 277 + } + ], + "line_count": 283 + }, + "openmeter/ent/db/billingcustomeroverride/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingCustomerOverride", + "line": 17 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingCustomerOverride", + "line": 22 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingCustomerOverride", + "line": 27 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingCustomerOverride", + "line": 32 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingCustomerOverride", + "line": 37 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingCustomerOverride", + "line": 42 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingCustomerOverride", + "line": 47 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingCustomerOverride", + "line": 52 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingCustomerOverride", + "line": 57 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingCustomerOverride", + "line": 62 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingCustomerOverride", + "line": 67 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingCustomerOverride", + "line": 72 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingCustomerOverride", + "line": 77 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingCustomerOverride", + "line": 82 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingCustomerOverride", + "line": 87 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.BillingCustomerOverride", + "line": 92 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.BillingCustomerOverride", + "line": 97 + }, + { + "kind": "func", + "name": "BillingProfileID", + "signature": "func BillingProfileID(v string) predicate.BillingCustomerOverride", + "line": 102 + }, + { + "kind": "func", + "name": "LineCollectionPeriod", + "signature": "func LineCollectionPeriod(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 107 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvance", + "signature": "func InvoiceAutoAdvance(v bool) predicate.BillingCustomerOverride", + "line": 113 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriod", + "signature": "func InvoiceDraftPeriod(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 118 + }, + { + "kind": "func", + "name": "InvoiceDueAfter", + "signature": "func InvoiceDueAfter(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 124 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBilling", + "signature": "func InvoiceProgressiveBilling(v bool) predicate.BillingCustomerOverride", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingCustomerOverride", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingCustomerOverride", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingCustomerOverride", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingCustomerOverride", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingCustomerOverride", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingCustomerOverride", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingCustomerOverride", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingCustomerOverride", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingCustomerOverride", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingCustomerOverride", + "line": 180 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingCustomerOverride", + "line": 185 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingCustomerOverride", + "line": 190 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingCustomerOverride", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingCustomerOverride", + "line": 220 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingCustomerOverride", + "line": 225 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingCustomerOverride", + "line": 230 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingCustomerOverride", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingCustomerOverride", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingCustomerOverride", + "line": 265 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingCustomerOverride", + "line": 270 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingCustomerOverride", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingCustomerOverride", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingCustomerOverride", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingCustomerOverride", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingCustomerOverride", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingCustomerOverride", + "line": 310 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingCustomerOverride", + "line": 315 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingCustomerOverride", + "line": 320 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingCustomerOverride", + "line": 325 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.BillingCustomerOverride", + "line": 330 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.BillingCustomerOverride", + "line": 335 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.BillingCustomerOverride", + "line": 340 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.BillingCustomerOverride", + "line": 345 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.BillingCustomerOverride", + "line": 350 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.BillingCustomerOverride", + "line": 355 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.BillingCustomerOverride", + "line": 360 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.BillingCustomerOverride", + "line": 365 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.BillingCustomerOverride", + "line": 370 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.BillingCustomerOverride", + "line": 375 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.BillingCustomerOverride", + "line": 380 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.BillingCustomerOverride", + "line": 385 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.BillingCustomerOverride", + "line": 390 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.BillingCustomerOverride", + "line": 395 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.BillingCustomerOverride", + "line": 400 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.BillingCustomerOverride", + "line": 405 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.BillingCustomerOverride", + "line": 411 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.BillingCustomerOverride", + "line": 417 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.BillingCustomerOverride", + "line": 426 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.BillingCustomerOverride", + "line": 435 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.BillingCustomerOverride", + "line": 440 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.BillingCustomerOverride", + "line": 445 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.BillingCustomerOverride", + "line": 450 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.BillingCustomerOverride", + "line": 455 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.BillingCustomerOverride", + "line": 460 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.BillingCustomerOverride", + "line": 465 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.BillingCustomerOverride", + "line": 470 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.BillingCustomerOverride", + "line": 475 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.BillingCustomerOverride", + "line": 480 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.BillingCustomerOverride", + "line": 485 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.BillingCustomerOverride", + "line": 490 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.BillingCustomerOverride", + "line": 495 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.BillingCustomerOverride", + "line": 500 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.BillingCustomerOverride", + "line": 505 + }, + { + "kind": "func", + "name": "BillingProfileIDEQ", + "signature": "func BillingProfileIDEQ(v string) predicate.BillingCustomerOverride", + "line": 510 + }, + { + "kind": "func", + "name": "BillingProfileIDNEQ", + "signature": "func BillingProfileIDNEQ(v string) predicate.BillingCustomerOverride", + "line": 515 + }, + { + "kind": "func", + "name": "BillingProfileIDIn", + "signature": "func BillingProfileIDIn(vs ...string) predicate.BillingCustomerOverride", + "line": 520 + }, + { + "kind": "func", + "name": "BillingProfileIDNotIn", + "signature": "func BillingProfileIDNotIn(vs ...string) predicate.BillingCustomerOverride", + "line": 525 + }, + { + "kind": "func", + "name": "BillingProfileIDGT", + "signature": "func BillingProfileIDGT(v string) predicate.BillingCustomerOverride", + "line": 530 + }, + { + "kind": "func", + "name": "BillingProfileIDGTE", + "signature": "func BillingProfileIDGTE(v string) predicate.BillingCustomerOverride", + "line": 535 + }, + { + "kind": "func", + "name": "BillingProfileIDLT", + "signature": "func BillingProfileIDLT(v string) predicate.BillingCustomerOverride", + "line": 540 + }, + { + "kind": "func", + "name": "BillingProfileIDLTE", + "signature": "func BillingProfileIDLTE(v string) predicate.BillingCustomerOverride", + "line": 545 + }, + { + "kind": "func", + "name": "BillingProfileIDContains", + "signature": "func BillingProfileIDContains(v string) predicate.BillingCustomerOverride", + "line": 550 + }, + { + "kind": "func", + "name": "BillingProfileIDHasPrefix", + "signature": "func BillingProfileIDHasPrefix(v string) predicate.BillingCustomerOverride", + "line": 555 + }, + { + "kind": "func", + "name": "BillingProfileIDHasSuffix", + "signature": "func BillingProfileIDHasSuffix(v string) predicate.BillingCustomerOverride", + "line": 560 + }, + { + "kind": "func", + "name": "BillingProfileIDIsNil", + "signature": "func BillingProfileIDIsNil() predicate.BillingCustomerOverride", + "line": 565 + }, + { + "kind": "func", + "name": "BillingProfileIDNotNil", + "signature": "func BillingProfileIDNotNil() predicate.BillingCustomerOverride", + "line": 570 + }, + { + "kind": "func", + "name": "BillingProfileIDEqualFold", + "signature": "func BillingProfileIDEqualFold(v string) predicate.BillingCustomerOverride", + "line": 575 + }, + { + "kind": "func", + "name": "BillingProfileIDContainsFold", + "signature": "func BillingProfileIDContainsFold(v string) predicate.BillingCustomerOverride", + "line": 580 + }, + { + "kind": "func", + "name": "CollectionAlignmentEQ", + "signature": "func CollectionAlignmentEQ(v billing.AlignmentKind) predicate.BillingCustomerOverride", + "line": 585 + }, + { + "kind": "func", + "name": "CollectionAlignmentNEQ", + "signature": "func CollectionAlignmentNEQ(v billing.AlignmentKind) predicate.BillingCustomerOverride", + "line": 591 + }, + { + "kind": "func", + "name": "CollectionAlignmentIn", + "signature": "func CollectionAlignmentIn(vs ...billing.AlignmentKind) predicate.BillingCustomerOverride", + "line": 597 + }, + { + "kind": "func", + "name": "CollectionAlignmentNotIn", + "signature": "func CollectionAlignmentNotIn(vs ...billing.AlignmentKind) predicate.BillingCustomerOverride", + "line": 606 + }, + { + "kind": "func", + "name": "CollectionAlignmentIsNil", + "signature": "func CollectionAlignmentIsNil() predicate.BillingCustomerOverride", + "line": 615 + }, + { + "kind": "func", + "name": "CollectionAlignmentNotNil", + "signature": "func CollectionAlignmentNotNil() predicate.BillingCustomerOverride", + "line": 620 + }, + { + "kind": "func", + "name": "AnchoredAlignmentDetailIsNil", + "signature": "func AnchoredAlignmentDetailIsNil() predicate.BillingCustomerOverride", + "line": 625 + }, + { + "kind": "func", + "name": "AnchoredAlignmentDetailNotNil", + "signature": "func AnchoredAlignmentDetailNotNil() predicate.BillingCustomerOverride", + "line": 630 + }, + { + "kind": "func", + "name": "LineCollectionPeriodEQ", + "signature": "func LineCollectionPeriodEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 635 + }, + { + "kind": "func", + "name": "LineCollectionPeriodNEQ", + "signature": "func LineCollectionPeriodNEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 641 + }, + { + "kind": "func", + "name": "LineCollectionPeriodIn", + "signature": "func LineCollectionPeriodIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 647 + }, + { + "kind": "func", + "name": "LineCollectionPeriodNotIn", + "signature": "func LineCollectionPeriodNotIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 656 + }, + { + "kind": "func", + "name": "LineCollectionPeriodGT", + "signature": "func LineCollectionPeriodGT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 665 + }, + { + "kind": "func", + "name": "LineCollectionPeriodGTE", + "signature": "func LineCollectionPeriodGTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 671 + }, + { + "kind": "func", + "name": "LineCollectionPeriodLT", + "signature": "func LineCollectionPeriodLT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 677 + }, + { + "kind": "func", + "name": "LineCollectionPeriodLTE", + "signature": "func LineCollectionPeriodLTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 683 + }, + { + "kind": "func", + "name": "LineCollectionPeriodContains", + "signature": "func LineCollectionPeriodContains(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 689 + }, + { + "kind": "func", + "name": "LineCollectionPeriodHasPrefix", + "signature": "func LineCollectionPeriodHasPrefix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 695 + }, + { + "kind": "func", + "name": "LineCollectionPeriodHasSuffix", + "signature": "func LineCollectionPeriodHasSuffix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 701 + }, + { + "kind": "func", + "name": "LineCollectionPeriodIsNil", + "signature": "func LineCollectionPeriodIsNil() predicate.BillingCustomerOverride", + "line": 707 + }, + { + "kind": "func", + "name": "LineCollectionPeriodNotNil", + "signature": "func LineCollectionPeriodNotNil() predicate.BillingCustomerOverride", + "line": 712 + }, + { + "kind": "func", + "name": "LineCollectionPeriodEqualFold", + "signature": "func LineCollectionPeriodEqualFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 717 + }, + { + "kind": "func", + "name": "LineCollectionPeriodContainsFold", + "signature": "func LineCollectionPeriodContainsFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 723 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceEQ", + "signature": "func InvoiceAutoAdvanceEQ(v bool) predicate.BillingCustomerOverride", + "line": 729 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceNEQ", + "signature": "func InvoiceAutoAdvanceNEQ(v bool) predicate.BillingCustomerOverride", + "line": 734 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceIsNil", + "signature": "func InvoiceAutoAdvanceIsNil() predicate.BillingCustomerOverride", + "line": 739 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceNotNil", + "signature": "func InvoiceAutoAdvanceNotNil() predicate.BillingCustomerOverride", + "line": 744 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodEQ", + "signature": "func InvoiceDraftPeriodEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 749 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodNEQ", + "signature": "func InvoiceDraftPeriodNEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 755 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodIn", + "signature": "func InvoiceDraftPeriodIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 761 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodNotIn", + "signature": "func InvoiceDraftPeriodNotIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 770 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodGT", + "signature": "func InvoiceDraftPeriodGT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 779 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodGTE", + "signature": "func InvoiceDraftPeriodGTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 785 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodLT", + "signature": "func InvoiceDraftPeriodLT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 791 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodLTE", + "signature": "func InvoiceDraftPeriodLTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 797 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodContains", + "signature": "func InvoiceDraftPeriodContains(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 803 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodHasPrefix", + "signature": "func InvoiceDraftPeriodHasPrefix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 809 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodHasSuffix", + "signature": "func InvoiceDraftPeriodHasSuffix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 815 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodIsNil", + "signature": "func InvoiceDraftPeriodIsNil() predicate.BillingCustomerOverride", + "line": 821 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodNotNil", + "signature": "func InvoiceDraftPeriodNotNil() predicate.BillingCustomerOverride", + "line": 826 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodEqualFold", + "signature": "func InvoiceDraftPeriodEqualFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 831 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodContainsFold", + "signature": "func InvoiceDraftPeriodContainsFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 837 + }, + { + "kind": "func", + "name": "InvoiceDueAfterEQ", + "signature": "func InvoiceDueAfterEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 843 + }, + { + "kind": "func", + "name": "InvoiceDueAfterNEQ", + "signature": "func InvoiceDueAfterNEQ(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 849 + }, + { + "kind": "func", + "name": "InvoiceDueAfterIn", + "signature": "func InvoiceDueAfterIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 855 + }, + { + "kind": "func", + "name": "InvoiceDueAfterNotIn", + "signature": "func InvoiceDueAfterNotIn(vs ...datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 864 + }, + { + "kind": "func", + "name": "InvoiceDueAfterGT", + "signature": "func InvoiceDueAfterGT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 873 + }, + { + "kind": "func", + "name": "InvoiceDueAfterGTE", + "signature": "func InvoiceDueAfterGTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 879 + }, + { + "kind": "func", + "name": "InvoiceDueAfterLT", + "signature": "func InvoiceDueAfterLT(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 885 + }, + { + "kind": "func", + "name": "InvoiceDueAfterLTE", + "signature": "func InvoiceDueAfterLTE(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 891 + }, + { + "kind": "func", + "name": "InvoiceDueAfterContains", + "signature": "func InvoiceDueAfterContains(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 897 + }, + { + "kind": "func", + "name": "InvoiceDueAfterHasPrefix", + "signature": "func InvoiceDueAfterHasPrefix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 903 + }, + { + "kind": "func", + "name": "InvoiceDueAfterHasSuffix", + "signature": "func InvoiceDueAfterHasSuffix(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 909 + }, + { + "kind": "func", + "name": "InvoiceDueAfterIsNil", + "signature": "func InvoiceDueAfterIsNil() predicate.BillingCustomerOverride", + "line": 915 + }, + { + "kind": "func", + "name": "InvoiceDueAfterNotNil", + "signature": "func InvoiceDueAfterNotNil() predicate.BillingCustomerOverride", + "line": 920 + }, + { + "kind": "func", + "name": "InvoiceDueAfterEqualFold", + "signature": "func InvoiceDueAfterEqualFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 925 + }, + { + "kind": "func", + "name": "InvoiceDueAfterContainsFold", + "signature": "func InvoiceDueAfterContainsFold(v datetime.ISODurationString) predicate.BillingCustomerOverride", + "line": 931 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodEQ", + "signature": "func InvoiceCollectionMethodEQ(v billing.CollectionMethod) predicate.BillingCustomerOverride", + "line": 937 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodNEQ", + "signature": "func InvoiceCollectionMethodNEQ(v billing.CollectionMethod) predicate.BillingCustomerOverride", + "line": 943 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodIn", + "signature": "func InvoiceCollectionMethodIn(vs ...billing.CollectionMethod) predicate.BillingCustomerOverride", + "line": 949 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodNotIn", + "signature": "func InvoiceCollectionMethodNotIn(vs ...billing.CollectionMethod) predicate.BillingCustomerOverride", + "line": 958 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodIsNil", + "signature": "func InvoiceCollectionMethodIsNil() predicate.BillingCustomerOverride", + "line": 967 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodNotNil", + "signature": "func InvoiceCollectionMethodNotNil() predicate.BillingCustomerOverride", + "line": 972 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingEQ", + "signature": "func InvoiceProgressiveBillingEQ(v bool) predicate.BillingCustomerOverride", + "line": 977 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingNEQ", + "signature": "func InvoiceProgressiveBillingNEQ(v bool) predicate.BillingCustomerOverride", + "line": 982 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingIsNil", + "signature": "func InvoiceProgressiveBillingIsNil() predicate.BillingCustomerOverride", + "line": 987 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingNotNil", + "signature": "func InvoiceProgressiveBillingNotNil() predicate.BillingCustomerOverride", + "line": 992 + }, + { + "kind": "func", + "name": "InvoiceDefaultTaxConfigIsNil", + "signature": "func InvoiceDefaultTaxConfigIsNil() predicate.BillingCustomerOverride", + "line": 997 + }, + { + "kind": "func", + "name": "InvoiceDefaultTaxConfigNotNil", + "signature": "func InvoiceDefaultTaxConfigNotNil() predicate.BillingCustomerOverride", + "line": 1002 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.BillingCustomerOverride", + "line": 1007 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.BillingCustomerOverride", + "line": 1018 + }, + { + "kind": "func", + "name": "HasBillingProfile", + "signature": "func HasBillingProfile() predicate.BillingCustomerOverride", + "line": 1030 + }, + { + "kind": "func", + "name": "HasBillingProfileWith", + "signature": "func HasBillingProfileWith(preds ...predicate.BillingProfile) predicate.BillingCustomerOverride", + "line": 1041 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.BillingCustomerOverride", + "line": 1053 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.BillingCustomerOverride", + "line": 1064 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingCustomerOverride) predicate.BillingCustomerOverride", + "line": 1076 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingCustomerOverride) predicate.BillingCustomerOverride", + "line": 1081 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingCustomerOverride) predicate.BillingCustomerOverride", + "line": 1086 + } + ], + "line_count": 1088 + }, + "openmeter/ent/db/billingcustomeroverride_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerOverrideCreate", + "signature": "type BillingCustomerOverrideCreate struct", + "line": 25 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNamespace(v string) *BillingCustomerOverrideCreate", + "line": 33 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetCreatedAt(v time.Time) *BillingCustomerOverrideCreate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableCreatedAt(v *time.Time) *BillingCustomerOverrideCreate", + "line": 45 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetUpdatedAt(v time.Time) *BillingCustomerOverrideCreate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableUpdatedAt(v *time.Time) *BillingCustomerOverrideCreate", + "line": 59 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetDeletedAt(v time.Time) *BillingCustomerOverrideCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableDeletedAt(v *time.Time) *BillingCustomerOverrideCreate", + "line": 73 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetTaxCodeID(v string) *BillingCustomerOverrideCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableTaxCodeID(v *string) *BillingCustomerOverrideCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *BillingCustomerOverrideCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingCustomerOverrideCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetCustomerID(v string) *BillingCustomerOverrideCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetBillingProfileID(v string) *BillingCustomerOverrideCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableBillingProfileID(v *string) *BillingCustomerOverrideCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_c *BillingCustomerOverrideCreate) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableCollectionAlignment", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableCollectionAlignment(v *billing.AlignmentKind) *BillingCustomerOverrideCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_c *BillingCustomerOverrideCreate) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableLineCollectionPeriod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableLineCollectionPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAutoAdvance", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceAutoAdvance(v *bool) *BillingCustomerOverrideCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDraftPeriod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceDraftPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 183 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 191 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDueAfter", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceDueAfter(v *datetime.ISODurationString) *BillingCustomerOverrideCreate", + "line": 197 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideCreate", + "line": 205 + }, + { + "kind": "func", + "name": "SetNillableInvoiceCollectionMethod", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceCollectionMethod(v *billing.CollectionMethod) *BillingCustomerOverrideCreate", + "line": 211 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideCreate", + "line": 219 + }, + { + "kind": "func", + "name": "SetNillableInvoiceProgressiveBilling", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceProgressiveBilling(v *bool) *BillingCustomerOverrideCreate", + "line": 225 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (_c *BillingCustomerOverrideCreate) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideCreate", + "line": 233 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxConfig", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableInvoiceDefaultTaxConfig(v *productcatalog.TaxConfig) *BillingCustomerOverrideCreate", + "line": 239 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetID(v string) *BillingCustomerOverrideCreate", + "line": 247 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingCustomerOverrideCreate) SetNillableID(v *string) *BillingCustomerOverrideCreate", + "line": 253 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *BillingCustomerOverrideCreate) SetCustomer(v *Customer) *BillingCustomerOverrideCreate", + "line": 261 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_c *BillingCustomerOverrideCreate) SetBillingProfile(v *BillingProfile) *BillingCustomerOverrideCreate", + "line": 266 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *BillingCustomerOverrideCreate) SetTaxCode(v *TaxCode) *BillingCustomerOverrideCreate", + "line": 271 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingCustomerOverrideCreate) Mutation() *BillingCustomerOverrideMutation", + "line": 276 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingCustomerOverrideCreate) Save(ctx context.Context) (*BillingCustomerOverride, error)", + "line": 281 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingCustomerOverrideCreate) SaveX(ctx context.Context) *BillingCustomerOverride", + "line": 287 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingCustomerOverrideCreate) Exec(ctx context.Context) error", + "line": 296 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingCustomerOverrideCreate) ExecX(ctx context.Context)", + "line": 302 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingCustomerOverrideCreate) defaults()", + "line": 309 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingCustomerOverrideCreate) check() error", + "line": 325 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingCustomerOverrideCreate) sqlSave(ctx context.Context) (*BillingCustomerOverride, error)", + "line": 374 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingCustomerOverrideCreate) createSpec() (*BillingCustomerOverride, *sqlgraph.CreateSpec)", + "line": 397 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingCustomerOverrideCreate) OnConflict(opts ...sql.ConflictOption) *BillingCustomerOverrideUpsertOne", + "line": 533 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingCustomerOverrideCreate) OnConflictColumns(columns ...string) *BillingCustomerOverrideUpsertOne", + "line": 546 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsert) SetUpdatedAt(v time.Time) *BillingCustomerOverrideUpsert", + "line": 567 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateUpdatedAt() *BillingCustomerOverrideUpsert", + "line": 573 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsert) SetDeletedAt(v time.Time) *BillingCustomerOverrideUpsert", + "line": 579 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateDeletedAt() *BillingCustomerOverrideUpsert", + "line": 585 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearDeletedAt() *BillingCustomerOverrideUpsert", + "line": 591 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsert) SetTaxCodeID(v string) *BillingCustomerOverrideUpsert", + "line": 597 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateTaxCodeID() *BillingCustomerOverrideUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearTaxCodeID() *BillingCustomerOverrideUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateTaxBehavior() *BillingCustomerOverrideUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearTaxBehavior() *BillingCustomerOverrideUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsert) SetBillingProfileID(v string) *BillingCustomerOverrideUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "UpdateBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateBillingProfileID() *BillingCustomerOverrideUpsert", + "line": 639 + }, + { + "kind": "func", + "name": "ClearBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearBillingProfileID() *BillingCustomerOverrideUpsert", + "line": 645 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsert) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideUpsert", + "line": 651 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateCollectionAlignment() *BillingCustomerOverrideUpsert", + "line": 657 + }, + { + "kind": "func", + "name": "ClearCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearCollectionAlignment() *BillingCustomerOverrideUpsert", + "line": 663 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsert) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpsert", + "line": 669 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateAnchoredAlignmentDetail() *BillingCustomerOverrideUpsert", + "line": 675 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearAnchoredAlignmentDetail() *BillingCustomerOverrideUpsert", + "line": 681 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsert", + "line": 687 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateLineCollectionPeriod() *BillingCustomerOverrideUpsert", + "line": 693 + }, + { + "kind": "func", + "name": "ClearLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearLineCollectionPeriod() *BillingCustomerOverrideUpsert", + "line": 699 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideUpsert", + "line": 705 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceAutoAdvance() *BillingCustomerOverrideUpsert", + "line": 711 + }, + { + "kind": "func", + "name": "ClearInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceAutoAdvance() *BillingCustomerOverrideUpsert", + "line": 717 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsert", + "line": 723 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceDraftPeriod() *BillingCustomerOverrideUpsert", + "line": 729 + }, + { + "kind": "func", + "name": "ClearInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceDraftPeriod() *BillingCustomerOverrideUpsert", + "line": 735 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideUpsert", + "line": 741 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceDueAfter() *BillingCustomerOverrideUpsert", + "line": 747 + }, + { + "kind": "func", + "name": "ClearInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceDueAfter() *BillingCustomerOverrideUpsert", + "line": 753 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideUpsert", + "line": 759 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceCollectionMethod() *BillingCustomerOverrideUpsert", + "line": 765 + }, + { + "kind": "func", + "name": "ClearInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceCollectionMethod() *BillingCustomerOverrideUpsert", + "line": 771 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideUpsert", + "line": 777 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceProgressiveBilling() *BillingCustomerOverrideUpsert", + "line": 783 + }, + { + "kind": "func", + "name": "ClearInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceProgressiveBilling() *BillingCustomerOverrideUpsert", + "line": 789 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsert) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideUpsert", + "line": 795 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsert) UpdateInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsert", + "line": 801 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsert) ClearInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsert", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateNewValues() *BillingCustomerOverrideUpsertOne", + "line": 823 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingCustomerOverrideUpsertOne) Ignore() *BillingCustomerOverrideUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingCustomerOverrideUpsertOne) DoNothing() *BillingCustomerOverrideUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingCustomerOverrideUpsertOne) Update(set func(*BillingCustomerOverrideUpsert)) *BillingCustomerOverrideUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetUpdatedAt(v time.Time) *BillingCustomerOverrideUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateUpdatedAt() *BillingCustomerOverrideUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetDeletedAt(v time.Time) *BillingCustomerOverrideUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateDeletedAt() *BillingCustomerOverrideUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearDeletedAt() *BillingCustomerOverrideUpsertOne", + "line": 898 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetTaxCodeID(v string) *BillingCustomerOverrideUpsertOne", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateTaxCodeID() *BillingCustomerOverrideUpsertOne", + "line": 912 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearTaxCodeID() *BillingCustomerOverrideUpsertOne", + "line": 919 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideUpsertOne", + "line": 926 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateTaxBehavior() *BillingCustomerOverrideUpsertOne", + "line": 933 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearTaxBehavior() *BillingCustomerOverrideUpsertOne", + "line": 940 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetBillingProfileID(v string) *BillingCustomerOverrideUpsertOne", + "line": 947 + }, + { + "kind": "func", + "name": "UpdateBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateBillingProfileID() *BillingCustomerOverrideUpsertOne", + "line": 954 + }, + { + "kind": "func", + "name": "ClearBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearBillingProfileID() *BillingCustomerOverrideUpsertOne", + "line": 961 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideUpsertOne", + "line": 968 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateCollectionAlignment() *BillingCustomerOverrideUpsertOne", + "line": 975 + }, + { + "kind": "func", + "name": "ClearCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearCollectionAlignment() *BillingCustomerOverrideUpsertOne", + "line": 982 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpsertOne", + "line": 989 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateAnchoredAlignmentDetail() *BillingCustomerOverrideUpsertOne", + "line": 996 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearAnchoredAlignmentDetail() *BillingCustomerOverrideUpsertOne", + "line": 1003 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsertOne", + "line": 1010 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateLineCollectionPeriod() *BillingCustomerOverrideUpsertOne", + "line": 1017 + }, + { + "kind": "func", + "name": "ClearLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearLineCollectionPeriod() *BillingCustomerOverrideUpsertOne", + "line": 1024 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideUpsertOne", + "line": 1031 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceAutoAdvance() *BillingCustomerOverrideUpsertOne", + "line": 1038 + }, + { + "kind": "func", + "name": "ClearInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceAutoAdvance() *BillingCustomerOverrideUpsertOne", + "line": 1045 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsertOne", + "line": 1052 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceDraftPeriod() *BillingCustomerOverrideUpsertOne", + "line": 1059 + }, + { + "kind": "func", + "name": "ClearInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceDraftPeriod() *BillingCustomerOverrideUpsertOne", + "line": 1066 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideUpsertOne", + "line": 1073 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceDueAfter() *BillingCustomerOverrideUpsertOne", + "line": 1080 + }, + { + "kind": "func", + "name": "ClearInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceDueAfter() *BillingCustomerOverrideUpsertOne", + "line": 1087 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideUpsertOne", + "line": 1094 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceCollectionMethod() *BillingCustomerOverrideUpsertOne", + "line": 1101 + }, + { + "kind": "func", + "name": "ClearInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceCollectionMethod() *BillingCustomerOverrideUpsertOne", + "line": 1108 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideUpsertOne", + "line": 1115 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceProgressiveBilling() *BillingCustomerOverrideUpsertOne", + "line": 1122 + }, + { + "kind": "func", + "name": "ClearInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceProgressiveBilling() *BillingCustomerOverrideUpsertOne", + "line": 1129 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertOne) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideUpsertOne", + "line": 1136 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertOne) UpdateInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsertOne", + "line": 1143 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ClearInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsertOne", + "line": 1150 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingCustomerOverrideUpsertOne) Exec(ctx context.Context) error", + "line": 1157 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ExecX(ctx context.Context)", + "line": 1165 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingCustomerOverrideUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1172 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingCustomerOverrideUpsertOne) IDX(ctx context.Context) string", + "line": 1186 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideCreateBulk", + "signature": "type BillingCustomerOverrideCreateBulk struct", + "line": 1195 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) Save(ctx context.Context) ([]*BillingCustomerOverride, error)", + "line": 1203 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) SaveX(ctx context.Context) []*BillingCustomerOverride", + "line": 1259 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) Exec(ctx context.Context) error", + "line": 1268 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) ExecX(ctx context.Context)", + "line": 1274 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingCustomerOverrideUpsertBulk", + "line": 1295 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingCustomerOverrideCreateBulk) OnConflictColumns(columns ...string) *BillingCustomerOverrideUpsertBulk", + "line": 1308 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideUpsertBulk", + "signature": "type BillingCustomerOverrideUpsertBulk struct", + "line": 1317 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateNewValues() *BillingCustomerOverrideUpsertBulk", + "line": 1332 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) Ignore() *BillingCustomerOverrideUpsertBulk", + "line": 1359 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) DoNothing() *BillingCustomerOverrideUpsertBulk", + "line": 1366 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) Update(set func(*BillingCustomerOverrideUpsert)) *BillingCustomerOverrideUpsertBulk", + "line": 1373 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetUpdatedAt(v time.Time) *BillingCustomerOverrideUpsertBulk", + "line": 1381 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateUpdatedAt() *BillingCustomerOverrideUpsertBulk", + "line": 1388 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetDeletedAt(v time.Time) *BillingCustomerOverrideUpsertBulk", + "line": 1395 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateDeletedAt() *BillingCustomerOverrideUpsertBulk", + "line": 1402 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearDeletedAt() *BillingCustomerOverrideUpsertBulk", + "line": 1409 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetTaxCodeID(v string) *BillingCustomerOverrideUpsertBulk", + "line": 1416 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateTaxCodeID() *BillingCustomerOverrideUpsertBulk", + "line": 1423 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearTaxCodeID() *BillingCustomerOverrideUpsertBulk", + "line": 1430 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideUpsertBulk", + "line": 1437 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateTaxBehavior() *BillingCustomerOverrideUpsertBulk", + "line": 1444 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearTaxBehavior() *BillingCustomerOverrideUpsertBulk", + "line": 1451 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetBillingProfileID(v string) *BillingCustomerOverrideUpsertBulk", + "line": 1458 + }, + { + "kind": "func", + "name": "UpdateBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateBillingProfileID() *BillingCustomerOverrideUpsertBulk", + "line": 1465 + }, + { + "kind": "func", + "name": "ClearBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearBillingProfileID() *BillingCustomerOverrideUpsertBulk", + "line": 1472 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideUpsertBulk", + "line": 1479 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateCollectionAlignment() *BillingCustomerOverrideUpsertBulk", + "line": 1486 + }, + { + "kind": "func", + "name": "ClearCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearCollectionAlignment() *BillingCustomerOverrideUpsertBulk", + "line": 1493 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpsertBulk", + "line": 1500 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateAnchoredAlignmentDetail() *BillingCustomerOverrideUpsertBulk", + "line": 1507 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearAnchoredAlignmentDetail() *BillingCustomerOverrideUpsertBulk", + "line": 1514 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsertBulk", + "line": 1521 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateLineCollectionPeriod() *BillingCustomerOverrideUpsertBulk", + "line": 1528 + }, + { + "kind": "func", + "name": "ClearLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearLineCollectionPeriod() *BillingCustomerOverrideUpsertBulk", + "line": 1535 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideUpsertBulk", + "line": 1542 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceAutoAdvance() *BillingCustomerOverrideUpsertBulk", + "line": 1549 + }, + { + "kind": "func", + "name": "ClearInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceAutoAdvance() *BillingCustomerOverrideUpsertBulk", + "line": 1556 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpsertBulk", + "line": 1563 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceDraftPeriod() *BillingCustomerOverrideUpsertBulk", + "line": 1570 + }, + { + "kind": "func", + "name": "ClearInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceDraftPeriod() *BillingCustomerOverrideUpsertBulk", + "line": 1577 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideUpsertBulk", + "line": 1584 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceDueAfter() *BillingCustomerOverrideUpsertBulk", + "line": 1591 + }, + { + "kind": "func", + "name": "ClearInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceDueAfter() *BillingCustomerOverrideUpsertBulk", + "line": 1598 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideUpsertBulk", + "line": 1605 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceCollectionMethod() *BillingCustomerOverrideUpsertBulk", + "line": 1612 + }, + { + "kind": "func", + "name": "ClearInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceCollectionMethod() *BillingCustomerOverrideUpsertBulk", + "line": 1619 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideUpsertBulk", + "line": 1626 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceProgressiveBilling() *BillingCustomerOverrideUpsertBulk", + "line": 1633 + }, + { + "kind": "func", + "name": "ClearInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceProgressiveBilling() *BillingCustomerOverrideUpsertBulk", + "line": 1640 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideUpsertBulk", + "line": 1647 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) UpdateInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsertBulk", + "line": 1654 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ClearInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpsertBulk", + "line": 1661 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) Exec(ctx context.Context) error", + "line": 1668 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingCustomerOverrideUpsertBulk) ExecX(ctx context.Context)", + "line": 1684 + } + ], + "line_count": 1688 + }, + "openmeter/ent/db/billingcustomeroverride_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerOverrideDelete", + "signature": "type BillingCustomerOverrideDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingCustomerOverrideDelete) Where(ps ...predicate.BillingCustomerOverride) *BillingCustomerOverrideDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingCustomerOverrideDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingCustomerOverrideDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingCustomerOverrideDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideDeleteOne", + "signature": "type BillingCustomerOverrideDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingCustomerOverrideDeleteOne) Where(ps ...predicate.BillingCustomerOverride) *BillingCustomerOverrideDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingCustomerOverrideDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingCustomerOverrideDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingcustomeroverride_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerOverrideQuery", + "signature": "type BillingCustomerOverrideQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingCustomerOverrideQuery) Where(ps ...predicate.BillingCustomerOverride) *BillingCustomerOverrideQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingCustomerOverrideQuery) Limit(limit int) *BillingCustomerOverrideQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingCustomerOverrideQuery) Offset(offset int) *BillingCustomerOverrideQuery", + "line": 51 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingCustomerOverrideQuery) Unique(unique bool) *BillingCustomerOverrideQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingCustomerOverrideQuery) Order(o ...billingcustomeroverride.OrderOption) *BillingCustomerOverrideQuery", + "line": 64 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *BillingCustomerOverrideQuery) QueryCustomer() *CustomerQuery", + "line": 70 + }, + { + "kind": "func", + "name": "QueryBillingProfile", + "signature": "func (_q *BillingCustomerOverrideQuery) QueryBillingProfile() *BillingProfileQuery", + "line": 92 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *BillingCustomerOverrideQuery) QueryTaxCode() *TaxCodeQuery", + "line": 114 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingCustomerOverrideQuery) First(ctx context.Context) (*BillingCustomerOverride, error)", + "line": 137 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingCustomerOverrideQuery) FirstX(ctx context.Context) *BillingCustomerOverride", + "line": 149 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingCustomerOverrideQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 159 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingCustomerOverrideQuery) FirstIDX(ctx context.Context) string", + "line": 172 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingCustomerOverrideQuery) Only(ctx context.Context) (*BillingCustomerOverride, error)", + "line": 183 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingCustomerOverrideQuery) OnlyX(ctx context.Context) *BillingCustomerOverride", + "line": 199 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingCustomerOverrideQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 210 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingCustomerOverrideQuery) OnlyIDX(ctx context.Context) string", + "line": 227 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingCustomerOverrideQuery) All(ctx context.Context) ([]*BillingCustomerOverride, error)", + "line": 236 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingCustomerOverrideQuery) AllX(ctx context.Context) []*BillingCustomerOverride", + "line": 246 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingCustomerOverrideQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 255 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingCustomerOverrideQuery) IDsX(ctx context.Context) []string", + "line": 267 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingCustomerOverrideQuery) Count(ctx context.Context) (int, error)", + "line": 276 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingCustomerOverrideQuery) CountX(ctx context.Context) int", + "line": 285 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingCustomerOverrideQuery) Exist(ctx context.Context) (bool, error)", + "line": 294 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingCustomerOverrideQuery) ExistX(ctx context.Context) bool", + "line": 307 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingCustomerOverrideQuery) Clone() *BillingCustomerOverrideQuery", + "line": 317 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *BillingCustomerOverrideQuery) WithCustomer(opts ...func(*CustomerQuery)) *BillingCustomerOverrideQuery", + "line": 338 + }, + { + "kind": "func", + "name": "WithBillingProfile", + "signature": "func (_q *BillingCustomerOverrideQuery) WithBillingProfile(opts ...func(*BillingProfileQuery)) *BillingCustomerOverrideQuery", + "line": 349 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *BillingCustomerOverrideQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *BillingCustomerOverrideQuery", + "line": 360 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingCustomerOverrideQuery) GroupBy(field string, fields ...string) *BillingCustomerOverrideGroupBy", + "line": 383 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingCustomerOverrideQuery) Select(fields ...string) *BillingCustomerOverrideSelect", + "line": 404 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingCustomerOverrideQuery) Aggregate(fns ...AggregateFunc) *BillingCustomerOverrideSelect", + "line": 413 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingCustomerOverrideQuery) prepareQuery(ctx context.Context) error", + "line": 417 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingCustomerOverrideQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingCustomerOverride, error)", + "line": 443 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *BillingCustomerOverrideQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*BillingCustomerOverride, init func(*BillingCustomerOverride), assign func(*BillingCustomerOverride, *Customer)) error", + "line": 495 + }, + { + "kind": "func", + "name": "loadBillingProfile", + "signature": "func (_q *BillingCustomerOverrideQuery) loadBillingProfile(ctx context.Context, query *BillingProfileQuery, nodes []*BillingCustomerOverride, init func(*BillingCustomerOverride), assign func(*BillingCustomerOverride, *BillingProfile)) error", + "line": 524 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *BillingCustomerOverrideQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*BillingCustomerOverride, init func(*BillingCustomerOverride), assign func(*BillingCustomerOverride, *TaxCode)) error", + "line": 556 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingCustomerOverrideQuery) sqlCount(ctx context.Context) (int, error)", + "line": 589 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingCustomerOverrideQuery) querySpec() *sqlgraph.QuerySpec", + "line": 601 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingCustomerOverrideQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 650 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingCustomerOverrideQuery) ForUpdate(opts ...sql.LockOption) *BillingCustomerOverrideQuery", + "line": 688 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingCustomerOverrideQuery) ForShare(opts ...sql.LockOption) *BillingCustomerOverrideQuery", + "line": 701 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideGroupBy", + "signature": "type BillingCustomerOverrideGroupBy struct", + "line": 712 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingCustomerOverrideGroupBy) Aggregate(fns ...AggregateFunc) *BillingCustomerOverrideGroupBy", + "line": 718 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingCustomerOverrideGroupBy) Scan(ctx context.Context, v any) error", + "line": 724 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingCustomerOverrideGroupBy) sqlScan(ctx context.Context, root *BillingCustomerOverrideQuery, v any) error", + "line": 732 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideSelect", + "signature": "type BillingCustomerOverrideSelect struct", + "line": 760 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingCustomerOverrideSelect) Aggregate(fns ...AggregateFunc) *BillingCustomerOverrideSelect", + "line": 766 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingCustomerOverrideSelect) Scan(ctx context.Context, v any) error", + "line": 772 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingCustomerOverrideSelect) sqlScan(ctx context.Context, root *BillingCustomerOverrideQuery, v any) error", + "line": 780 + } + ], + "line_count": 799 + }, + "openmeter/ent/db/billingcustomeroverride_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingCustomerOverrideUpdate", + "signature": "type BillingCustomerOverrideUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingCustomerOverrideUpdate) Where(ps ...predicate.BillingCustomerOverride) *BillingCustomerOverrideUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetUpdatedAt(v time.Time) *BillingCustomerOverrideUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetDeletedAt(v time.Time) *BillingCustomerOverrideUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableDeletedAt(v *time.Time) *BillingCustomerOverrideUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearDeletedAt() *BillingCustomerOverrideUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetTaxCodeID(v string) *BillingCustomerOverrideUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableTaxCodeID(v *string) *BillingCustomerOverrideUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearTaxCodeID() *BillingCustomerOverrideUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingCustomerOverrideUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearTaxBehavior() *BillingCustomerOverrideUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetBillingProfileID(v string) *BillingCustomerOverrideUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableBillingProfileID(v *string) *BillingCustomerOverrideUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "ClearBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearBillingProfileID() *BillingCustomerOverrideUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideUpdate", + "line": 123 + }, + { + "kind": "func", + "name": "SetNillableCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableCollectionAlignment(v *billing.AlignmentKind) *BillingCustomerOverrideUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "ClearCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearCollectionAlignment() *BillingCustomerOverrideUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearAnchoredAlignmentDetail() *BillingCustomerOverrideUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableLineCollectionPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 161 + }, + { + "kind": "func", + "name": "ClearLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearLineCollectionPeriod() *BillingCustomerOverrideUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceAutoAdvance(v *bool) *BillingCustomerOverrideUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceAutoAdvance() *BillingCustomerOverrideUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceDraftPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "ClearInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceDraftPeriod() *BillingCustomerOverrideUpdate", + "line": 209 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceDueAfter(v *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 221 + }, + { + "kind": "func", + "name": "ClearInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceDueAfter() *BillingCustomerOverrideUpdate", + "line": 229 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "SetNillableInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceCollectionMethod(v *billing.CollectionMethod) *BillingCustomerOverrideUpdate", + "line": 241 + }, + { + "kind": "func", + "name": "ClearInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceCollectionMethod() *BillingCustomerOverrideUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "SetNillableInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceProgressiveBilling(v *bool) *BillingCustomerOverrideUpdate", + "line": 261 + }, + { + "kind": "func", + "name": "ClearInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceProgressiveBilling() *BillingCustomerOverrideUpdate", + "line": 269 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideUpdate", + "line": 275 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetNillableInvoiceDefaultTaxConfig(v *productcatalog.TaxConfig) *BillingCustomerOverrideUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpdate", + "line": 289 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetBillingProfile(v *BillingProfile) *BillingCustomerOverrideUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingCustomerOverrideUpdate) SetTaxCode(v *TaxCode) *BillingCustomerOverrideUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingCustomerOverrideUpdate) Mutation() *BillingCustomerOverrideMutation", + "line": 305 + }, + { + "kind": "func", + "name": "ClearBillingProfile", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearBillingProfile() *BillingCustomerOverrideUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingCustomerOverrideUpdate) ClearTaxCode() *BillingCustomerOverrideUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingCustomerOverrideUpdate) Save(ctx context.Context) (int, error)", + "line": 322 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingCustomerOverrideUpdate) SaveX(ctx context.Context) int", + "line": 328 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingCustomerOverrideUpdate) Exec(ctx context.Context) error", + "line": 337 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingCustomerOverrideUpdate) ExecX(ctx context.Context)", + "line": 343 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingCustomerOverrideUpdate) defaults()", + "line": 350 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingCustomerOverrideUpdate) check() error", + "line": 358 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingCustomerOverrideUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 390 + }, + { + "kind": "struct", + "name": "BillingCustomerOverrideUpdateOne", + "signature": "type BillingCustomerOverrideUpdateOne struct", + "line": 542 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetUpdatedAt(v time.Time) *BillingCustomerOverrideUpdateOne", + "line": 550 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetDeletedAt(v time.Time) *BillingCustomerOverrideUpdateOne", + "line": 556 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingCustomerOverrideUpdateOne", + "line": 562 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearDeletedAt() *BillingCustomerOverrideUpdateOne", + "line": 570 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetTaxCodeID(v string) *BillingCustomerOverrideUpdateOne", + "line": 576 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableTaxCodeID(v *string) *BillingCustomerOverrideUpdateOne", + "line": 582 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearTaxCodeID() *BillingCustomerOverrideUpdateOne", + "line": 590 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingCustomerOverrideUpdateOne", + "line": 596 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingCustomerOverrideUpdateOne", + "line": 602 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearTaxBehavior() *BillingCustomerOverrideUpdateOne", + "line": 610 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetBillingProfileID(v string) *BillingCustomerOverrideUpdateOne", + "line": 616 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableBillingProfileID(v *string) *BillingCustomerOverrideUpdateOne", + "line": 622 + }, + { + "kind": "func", + "name": "ClearBillingProfileID", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearBillingProfileID() *BillingCustomerOverrideUpdateOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetCollectionAlignment(v billing.AlignmentKind) *BillingCustomerOverrideUpdateOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetNillableCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableCollectionAlignment(v *billing.AlignmentKind) *BillingCustomerOverrideUpdateOne", + "line": 642 + }, + { + "kind": "func", + "name": "ClearCollectionAlignment", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearCollectionAlignment() *BillingCustomerOverrideUpdateOne", + "line": 650 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpdateOne", + "line": 656 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearAnchoredAlignmentDetail() *BillingCustomerOverrideUpdateOne", + "line": 662 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 668 + }, + { + "kind": "func", + "name": "SetNillableLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableLineCollectionPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 674 + }, + { + "kind": "func", + "name": "ClearLineCollectionPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearLineCollectionPeriod() *BillingCustomerOverrideUpdateOne", + "line": 682 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceAutoAdvance(v bool) *BillingCustomerOverrideUpdateOne", + "line": 688 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceAutoAdvance(v *bool) *BillingCustomerOverrideUpdateOne", + "line": 694 + }, + { + "kind": "func", + "name": "ClearInvoiceAutoAdvance", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceAutoAdvance() *BillingCustomerOverrideUpdateOne", + "line": 702 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 708 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceDraftPeriod(v *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 714 + }, + { + "kind": "func", + "name": "ClearInvoiceDraftPeriod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceDraftPeriod() *BillingCustomerOverrideUpdateOne", + "line": 722 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 728 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceDueAfter(v *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 734 + }, + { + "kind": "func", + "name": "ClearInvoiceDueAfter", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceDueAfter() *BillingCustomerOverrideUpdateOne", + "line": 742 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingCustomerOverrideUpdateOne", + "line": 748 + }, + { + "kind": "func", + "name": "SetNillableInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceCollectionMethod(v *billing.CollectionMethod) *BillingCustomerOverrideUpdateOne", + "line": 754 + }, + { + "kind": "func", + "name": "ClearInvoiceCollectionMethod", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceCollectionMethod() *BillingCustomerOverrideUpdateOne", + "line": 762 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceProgressiveBilling(v bool) *BillingCustomerOverrideUpdateOne", + "line": 768 + }, + { + "kind": "func", + "name": "SetNillableInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceProgressiveBilling(v *bool) *BillingCustomerOverrideUpdateOne", + "line": 774 + }, + { + "kind": "func", + "name": "ClearInvoiceProgressiveBilling", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceProgressiveBilling() *BillingCustomerOverrideUpdateOne", + "line": 782 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetInvoiceDefaultTaxConfig(v productcatalog.TaxConfig) *BillingCustomerOverrideUpdateOne", + "line": 788 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetNillableInvoiceDefaultTaxConfig(v *productcatalog.TaxConfig) *BillingCustomerOverrideUpdateOne", + "line": 794 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxConfig", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearInvoiceDefaultTaxConfig() *BillingCustomerOverrideUpdateOne", + "line": 802 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetBillingProfile(v *BillingProfile) *BillingCustomerOverrideUpdateOne", + "line": 808 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SetTaxCode(v *TaxCode) *BillingCustomerOverrideUpdateOne", + "line": 813 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) Mutation() *BillingCustomerOverrideMutation", + "line": 818 + }, + { + "kind": "func", + "name": "ClearBillingProfile", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearBillingProfile() *BillingCustomerOverrideUpdateOne", + "line": 823 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ClearTaxCode() *BillingCustomerOverrideUpdateOne", + "line": 829 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) Where(ps ...predicate.BillingCustomerOverride) *BillingCustomerOverrideUpdateOne", + "line": 835 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) Select(field string, fields ...string) *BillingCustomerOverrideUpdateOne", + "line": 842 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) Save(ctx context.Context) (*BillingCustomerOverride, error)", + "line": 848 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) SaveX(ctx context.Context) *BillingCustomerOverride", + "line": 854 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) Exec(ctx context.Context) error", + "line": 863 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) ExecX(ctx context.Context)", + "line": 869 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) defaults()", + "line": 876 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) check() error", + "line": 884 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingCustomerOverrideUpdateOne) sqlSave(ctx context.Context) (_node *BillingCustomerOverride, err error)", + "line": 916 + } + ], + "line_count": 1085 + }, + "openmeter/ent/db/billinginvoice.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoice", + "signature": "type BillingInvoice struct", + "line": 25 + }, + { + "kind": "struct", + "name": "BillingInvoiceEdges", + "signature": "type BillingInvoiceEdges struct", + "line": 152 + }, + { + "kind": "func", + "name": "SourceBillingProfileOrErr", + "signature": "func (e BillingInvoiceEdges) SourceBillingProfileOrErr() (*BillingProfile, error)", + "line": 182 + }, + { + "kind": "func", + "name": "BillingWorkflowConfigOrErr", + "signature": "func (e BillingInvoiceEdges) BillingWorkflowConfigOrErr() (*BillingWorkflowConfig, error)", + "line": 193 + }, + { + "kind": "func", + "name": "BillingInvoiceLinesOrErr", + "signature": "func (e BillingInvoiceEdges) BillingInvoiceLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 204 + }, + { + "kind": "func", + "name": "BillingInvoiceDetailedLinesOrErr", + "signature": "func (e BillingInvoiceEdges) BillingInvoiceDetailedLinesOrErr() ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 213 + }, + { + "kind": "func", + "name": "BillingInvoiceValidationIssuesOrErr", + "signature": "func (e BillingInvoiceEdges) BillingInvoiceValidationIssuesOrErr() ([]*BillingInvoiceValidationIssue, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ChargeFlatFeeRunsOrErr", + "signature": "func (e BillingInvoiceEdges) ChargeFlatFeeRunsOrErr() ([]*ChargeFlatFeeRun, error)", + "line": 231 + }, + { + "kind": "func", + "name": "ChargeUsageBasedRunsOrErr", + "signature": "func (e BillingInvoiceEdges) ChargeUsageBasedRunsOrErr() ([]*ChargeUsageBasedRuns, error)", + "line": 240 + }, + { + "kind": "func", + "name": "BillingInvoiceCustomerOrErr", + "signature": "func (e BillingInvoiceEdges) BillingInvoiceCustomerOrErr() (*Customer, error)", + "line": 249 + }, + { + "kind": "func", + "name": "TaxAppOrErr", + "signature": "func (e BillingInvoiceEdges) TaxAppOrErr() (*App, error)", + "line": 260 + }, + { + "kind": "func", + "name": "InvoicingAppOrErr", + "signature": "func (e BillingInvoiceEdges) InvoicingAppOrErr() (*App, error)", + "line": 271 + }, + { + "kind": "func", + "name": "PaymentAppOrErr", + "signature": "func (e BillingInvoiceEdges) PaymentAppOrErr() (*App, error)", + "line": 282 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoice) assignValues(columns []string, values []any) error", + "line": 315 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoice) Value(name string) (ent.Value, error)", + "line": 721 + }, + { + "kind": "func", + "name": "QuerySourceBillingProfile", + "signature": "func (_m *BillingInvoice) QuerySourceBillingProfile() *BillingProfileQuery", + "line": 726 + }, + { + "kind": "func", + "name": "QueryBillingWorkflowConfig", + "signature": "func (_m *BillingInvoice) QueryBillingWorkflowConfig() *BillingWorkflowConfigQuery", + "line": 731 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_m *BillingInvoice) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 736 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceDetailedLines", + "signature": "func (_m *BillingInvoice) QueryBillingInvoiceDetailedLines() *BillingStandardInvoiceDetailedLineQuery", + "line": 741 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceValidationIssues", + "signature": "func (_m *BillingInvoice) QueryBillingInvoiceValidationIssues() *BillingInvoiceValidationIssueQuery", + "line": 746 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRuns", + "signature": "func (_m *BillingInvoice) QueryChargeFlatFeeRuns() *ChargeFlatFeeRunQuery", + "line": 751 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRuns", + "signature": "func (_m *BillingInvoice) QueryChargeUsageBasedRuns() *ChargeUsageBasedRunsQuery", + "line": 756 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceCustomer", + "signature": "func (_m *BillingInvoice) QueryBillingInvoiceCustomer() *CustomerQuery", + "line": 761 + }, + { + "kind": "func", + "name": "QueryTaxApp", + "signature": "func (_m *BillingInvoice) QueryTaxApp() *AppQuery", + "line": 766 + }, + { + "kind": "func", + "name": "QueryInvoicingApp", + "signature": "func (_m *BillingInvoice) QueryInvoicingApp() *AppQuery", + "line": 771 + }, + { + "kind": "func", + "name": "QueryPaymentApp", + "signature": "func (_m *BillingInvoice) QueryPaymentApp() *AppQuery", + "line": 776 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoice) Update() *BillingInvoiceUpdateOne", + "line": 783 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoice) Unwrap() *BillingInvoice", + "line": 789 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoice) String() string", + "line": 799 + } + ], + "line_count": 1043 + }, + "openmeter/ent/db/billinginvoice/billinginvoice.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 302 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type billing.InvoiceType) error", + "line": 341 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s billing.StandardInvoiceStatus) error", + "line": 351 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 364 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 369 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 374 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 384 + }, + { + "kind": "func", + "name": "BySupplierAddressCountry", + "signature": "func BySupplierAddressCountry(opts ...sql.OrderTermOption) OrderOption", + "line": 389 + }, + { + "kind": "func", + "name": "BySupplierAddressPostalCode", + "signature": "func BySupplierAddressPostalCode(opts ...sql.OrderTermOption) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "BySupplierAddressState", + "signature": "func BySupplierAddressState(opts ...sql.OrderTermOption) OrderOption", + "line": 399 + }, + { + "kind": "func", + "name": "BySupplierAddressCity", + "signature": "func BySupplierAddressCity(opts ...sql.OrderTermOption) OrderOption", + "line": 404 + }, + { + "kind": "func", + "name": "BySupplierAddressLine1", + "signature": "func BySupplierAddressLine1(opts ...sql.OrderTermOption) OrderOption", + "line": 409 + }, + { + "kind": "func", + "name": "BySupplierAddressLine2", + "signature": "func BySupplierAddressLine2(opts ...sql.OrderTermOption) OrderOption", + "line": 414 + }, + { + "kind": "func", + "name": "BySupplierAddressPhoneNumber", + "signature": "func BySupplierAddressPhoneNumber(opts ...sql.OrderTermOption) OrderOption", + "line": 419 + }, + { + "kind": "func", + "name": "ByCustomerAddressCountry", + "signature": "func ByCustomerAddressCountry(opts ...sql.OrderTermOption) OrderOption", + "line": 424 + }, + { + "kind": "func", + "name": "ByCustomerAddressPostalCode", + "signature": "func ByCustomerAddressPostalCode(opts ...sql.OrderTermOption) OrderOption", + "line": 429 + }, + { + "kind": "func", + "name": "ByCustomerAddressState", + "signature": "func ByCustomerAddressState(opts ...sql.OrderTermOption) OrderOption", + "line": 434 + }, + { + "kind": "func", + "name": "ByCustomerAddressCity", + "signature": "func ByCustomerAddressCity(opts ...sql.OrderTermOption) OrderOption", + "line": 439 + }, + { + "kind": "func", + "name": "ByCustomerAddressLine1", + "signature": "func ByCustomerAddressLine1(opts ...sql.OrderTermOption) OrderOption", + "line": 444 + }, + { + "kind": "func", + "name": "ByCustomerAddressLine2", + "signature": "func ByCustomerAddressLine2(opts ...sql.OrderTermOption) OrderOption", + "line": 449 + }, + { + "kind": "func", + "name": "ByCustomerAddressPhoneNumber", + "signature": "func ByCustomerAddressPhoneNumber(opts ...sql.OrderTermOption) OrderOption", + "line": 454 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 459 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 464 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 469 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 474 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 479 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 484 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 489 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 494 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 499 + }, + { + "kind": "func", + "name": "ByPaymentAppExternalID", + "signature": "func ByPaymentAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 504 + }, + { + "kind": "func", + "name": "ByTaxAppExternalID", + "signature": "func ByTaxAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 509 + }, + { + "kind": "func", + "name": "BySupplierName", + "signature": "func BySupplierName(opts ...sql.OrderTermOption) OrderOption", + "line": 514 + }, + { + "kind": "func", + "name": "BySupplierTaxCode", + "signature": "func BySupplierTaxCode(opts ...sql.OrderTermOption) OrderOption", + "line": 519 + }, + { + "kind": "func", + "name": "ByCustomerKey", + "signature": "func ByCustomerKey(opts ...sql.OrderTermOption) OrderOption", + "line": 524 + }, + { + "kind": "func", + "name": "ByCustomerName", + "signature": "func ByCustomerName(opts ...sql.OrderTermOption) OrderOption", + "line": 529 + }, + { + "kind": "func", + "name": "ByNumber", + "signature": "func ByNumber(opts ...sql.OrderTermOption) OrderOption", + "line": 534 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 539 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 544 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 549 + }, + { + "kind": "func", + "name": "BySourceBillingProfileID", + "signature": "func BySourceBillingProfileID(opts ...sql.OrderTermOption) OrderOption", + "line": 554 + }, + { + "kind": "func", + "name": "ByVoidedAt", + "signature": "func ByVoidedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 559 + }, + { + "kind": "func", + "name": "ByIssuedAt", + "signature": "func ByIssuedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 564 + }, + { + "kind": "func", + "name": "BySentToCustomerAt", + "signature": "func BySentToCustomerAt(opts ...sql.OrderTermOption) OrderOption", + "line": 569 + }, + { + "kind": "func", + "name": "ByDraftUntil", + "signature": "func ByDraftUntil(opts ...sql.OrderTermOption) OrderOption", + "line": 574 + }, + { + "kind": "func", + "name": "ByQuantitySnapshotedAt", + "signature": "func ByQuantitySnapshotedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 579 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 584 + }, + { + "kind": "func", + "name": "ByDueAt", + "signature": "func ByDueAt(opts ...sql.OrderTermOption) OrderOption", + "line": 589 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 594 + }, + { + "kind": "func", + "name": "ByWorkflowConfigID", + "signature": "func ByWorkflowConfigID(opts ...sql.OrderTermOption) OrderOption", + "line": 599 + }, + { + "kind": "func", + "name": "ByTaxAppID", + "signature": "func ByTaxAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 604 + }, + { + "kind": "func", + "name": "ByInvoicingAppID", + "signature": "func ByInvoicingAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 609 + }, + { + "kind": "func", + "name": "ByPaymentAppID", + "signature": "func ByPaymentAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 614 + }, + { + "kind": "func", + "name": "ByPeriodStart", + "signature": "func ByPeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 619 + }, + { + "kind": "func", + "name": "ByPeriodEnd", + "signature": "func ByPeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 624 + }, + { + "kind": "func", + "name": "ByCollectionAt", + "signature": "func ByCollectionAt(opts ...sql.OrderTermOption) OrderOption", + "line": 629 + }, + { + "kind": "func", + "name": "ByPaymentProcessingEnteredAt", + "signature": "func ByPaymentProcessingEnteredAt(opts ...sql.OrderTermOption) OrderOption", + "line": 634 + }, + { + "kind": "func", + "name": "BySchemaLevel", + "signature": "func BySchemaLevel(opts ...sql.OrderTermOption) OrderOption", + "line": 639 + }, + { + "kind": "func", + "name": "BySourceBillingProfileField", + "signature": "func BySourceBillingProfileField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 644 + }, + { + "kind": "func", + "name": "ByBillingWorkflowConfigField", + "signature": "func ByBillingWorkflowConfigField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 651 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLinesCount", + "signature": "func ByBillingInvoiceLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 658 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLines", + "signature": "func ByBillingInvoiceLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 665 + }, + { + "kind": "func", + "name": "ByBillingInvoiceDetailedLinesCount", + "signature": "func ByBillingInvoiceDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 672 + }, + { + "kind": "func", + "name": "ByBillingInvoiceDetailedLines", + "signature": "func ByBillingInvoiceDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 679 + }, + { + "kind": "func", + "name": "ByBillingInvoiceValidationIssuesCount", + "signature": "func ByBillingInvoiceValidationIssuesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 686 + }, + { + "kind": "func", + "name": "ByBillingInvoiceValidationIssues", + "signature": "func ByBillingInvoiceValidationIssues(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 693 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunsCount", + "signature": "func ByChargeFlatFeeRunsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 700 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRuns", + "signature": "func ByChargeFlatFeeRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 707 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedRunsCount", + "signature": "func ByChargeUsageBasedRunsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 714 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedRuns", + "signature": "func ByChargeUsageBasedRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 721 + }, + { + "kind": "func", + "name": "ByBillingInvoiceCustomerField", + "signature": "func ByBillingInvoiceCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 728 + }, + { + "kind": "func", + "name": "ByTaxAppField", + "signature": "func ByTaxAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 735 + }, + { + "kind": "func", + "name": "ByInvoicingAppField", + "signature": "func ByInvoicingAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 742 + }, + { + "kind": "func", + "name": "ByPaymentAppField", + "signature": "func ByPaymentAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 749 + }, + { + "kind": "func", + "name": "newSourceBillingProfileStep", + "signature": "func newSourceBillingProfileStep() *sqlgraph.Step", + "line": 754 + }, + { + "kind": "func", + "name": "newBillingWorkflowConfigStep", + "signature": "func newBillingWorkflowConfigStep() *sqlgraph.Step", + "line": 761 + }, + { + "kind": "func", + "name": "newBillingInvoiceLinesStep", + "signature": "func newBillingInvoiceLinesStep() *sqlgraph.Step", + "line": 768 + }, + { + "kind": "func", + "name": "newBillingInvoiceDetailedLinesStep", + "signature": "func newBillingInvoiceDetailedLinesStep() *sqlgraph.Step", + "line": 775 + }, + { + "kind": "func", + "name": "newBillingInvoiceValidationIssuesStep", + "signature": "func newBillingInvoiceValidationIssuesStep() *sqlgraph.Step", + "line": 782 + }, + { + "kind": "func", + "name": "newChargeFlatFeeRunsStep", + "signature": "func newChargeFlatFeeRunsStep() *sqlgraph.Step", + "line": 789 + }, + { + "kind": "func", + "name": "newChargeUsageBasedRunsStep", + "signature": "func newChargeUsageBasedRunsStep() *sqlgraph.Step", + "line": 796 + }, + { + "kind": "func", + "name": "newBillingInvoiceCustomerStep", + "signature": "func newBillingInvoiceCustomerStep() *sqlgraph.Step", + "line": 803 + }, + { + "kind": "func", + "name": "newTaxAppStep", + "signature": "func newTaxAppStep() *sqlgraph.Step", + "line": 810 + }, + { + "kind": "func", + "name": "newInvoicingAppStep", + "signature": "func newInvoicingAppStep() *sqlgraph.Step", + "line": 817 + }, + { + "kind": "func", + "name": "newPaymentAppStep", + "signature": "func newPaymentAppStep() *sqlgraph.Step", + "line": 824 + } + ], + "line_count": 830 + }, + "openmeter/ent/db/billinginvoice/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoice", + "line": 18 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoice", + "line": 23 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoice", + "line": 28 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoice", + "line": 33 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoice", + "line": 38 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoice", + "line": 43 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoice", + "line": 48 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoice", + "line": 53 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoice", + "line": 58 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoice", + "line": 63 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoice", + "line": 68 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoice", + "line": 73 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoice", + "line": 78 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoice", + "line": 83 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoice", + "line": 88 + }, + { + "kind": "func", + "name": "SupplierAddressCountry", + "signature": "func SupplierAddressCountry(v models.CountryCode) predicate.BillingInvoice", + "line": 93 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCode", + "signature": "func SupplierAddressPostalCode(v string) predicate.BillingInvoice", + "line": 99 + }, + { + "kind": "func", + "name": "SupplierAddressState", + "signature": "func SupplierAddressState(v string) predicate.BillingInvoice", + "line": 104 + }, + { + "kind": "func", + "name": "SupplierAddressCity", + "signature": "func SupplierAddressCity(v string) predicate.BillingInvoice", + "line": 109 + }, + { + "kind": "func", + "name": "SupplierAddressLine1", + "signature": "func SupplierAddressLine1(v string) predicate.BillingInvoice", + "line": 114 + }, + { + "kind": "func", + "name": "SupplierAddressLine2", + "signature": "func SupplierAddressLine2(v string) predicate.BillingInvoice", + "line": 119 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumber", + "signature": "func SupplierAddressPhoneNumber(v string) predicate.BillingInvoice", + "line": 124 + }, + { + "kind": "func", + "name": "CustomerAddressCountry", + "signature": "func CustomerAddressCountry(v models.CountryCode) predicate.BillingInvoice", + "line": 129 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCode", + "signature": "func CustomerAddressPostalCode(v string) predicate.BillingInvoice", + "line": 135 + }, + { + "kind": "func", + "name": "CustomerAddressState", + "signature": "func CustomerAddressState(v string) predicate.BillingInvoice", + "line": 140 + }, + { + "kind": "func", + "name": "CustomerAddressCity", + "signature": "func CustomerAddressCity(v string) predicate.BillingInvoice", + "line": 145 + }, + { + "kind": "func", + "name": "CustomerAddressLine1", + "signature": "func CustomerAddressLine1(v string) predicate.BillingInvoice", + "line": 150 + }, + { + "kind": "func", + "name": "CustomerAddressLine2", + "signature": "func CustomerAddressLine2(v string) predicate.BillingInvoice", + "line": 155 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumber", + "signature": "func CustomerAddressPhoneNumber(v string) predicate.BillingInvoice", + "line": 160 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 165 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 170 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 175 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 180 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 185 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 190 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 195 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 200 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingInvoice", + "line": 205 + }, + { + "kind": "func", + "name": "PaymentAppExternalID", + "signature": "func PaymentAppExternalID(v string) predicate.BillingInvoice", + "line": 210 + }, + { + "kind": "func", + "name": "TaxAppExternalID", + "signature": "func TaxAppExternalID(v string) predicate.BillingInvoice", + "line": 215 + }, + { + "kind": "func", + "name": "SupplierName", + "signature": "func SupplierName(v string) predicate.BillingInvoice", + "line": 220 + }, + { + "kind": "func", + "name": "SupplierTaxCode", + "signature": "func SupplierTaxCode(v string) predicate.BillingInvoice", + "line": 225 + }, + { + "kind": "func", + "name": "CustomerKey", + "signature": "func CustomerKey(v string) predicate.BillingInvoice", + "line": 230 + }, + { + "kind": "func", + "name": "CustomerName", + "signature": "func CustomerName(v string) predicate.BillingInvoice", + "line": 235 + }, + { + "kind": "func", + "name": "Number", + "signature": "func Number(v string) predicate.BillingInvoice", + "line": 240 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingInvoice", + "line": 245 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.BillingInvoice", + "line": 250 + }, + { + "kind": "func", + "name": "SourceBillingProfileID", + "signature": "func SourceBillingProfileID(v string) predicate.BillingInvoice", + "line": 255 + }, + { + "kind": "func", + "name": "VoidedAt", + "signature": "func VoidedAt(v time.Time) predicate.BillingInvoice", + "line": 260 + }, + { + "kind": "func", + "name": "IssuedAt", + "signature": "func IssuedAt(v time.Time) predicate.BillingInvoice", + "line": 265 + }, + { + "kind": "func", + "name": "SentToCustomerAt", + "signature": "func SentToCustomerAt(v time.Time) predicate.BillingInvoice", + "line": 270 + }, + { + "kind": "func", + "name": "DraftUntil", + "signature": "func DraftUntil(v time.Time) predicate.BillingInvoice", + "line": 275 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAt", + "signature": "func QuantitySnapshotedAt(v time.Time) predicate.BillingInvoice", + "line": 280 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.BillingInvoice", + "line": 285 + }, + { + "kind": "func", + "name": "DueAt", + "signature": "func DueAt(v time.Time) predicate.BillingInvoice", + "line": 291 + }, + { + "kind": "func", + "name": "WorkflowConfigID", + "signature": "func WorkflowConfigID(v string) predicate.BillingInvoice", + "line": 296 + }, + { + "kind": "func", + "name": "TaxAppID", + "signature": "func TaxAppID(v string) predicate.BillingInvoice", + "line": 301 + }, + { + "kind": "func", + "name": "InvoicingAppID", + "signature": "func InvoicingAppID(v string) predicate.BillingInvoice", + "line": 306 + }, + { + "kind": "func", + "name": "PaymentAppID", + "signature": "func PaymentAppID(v string) predicate.BillingInvoice", + "line": 311 + }, + { + "kind": "func", + "name": "PeriodStart", + "signature": "func PeriodStart(v time.Time) predicate.BillingInvoice", + "line": 316 + }, + { + "kind": "func", + "name": "PeriodEnd", + "signature": "func PeriodEnd(v time.Time) predicate.BillingInvoice", + "line": 321 + }, + { + "kind": "func", + "name": "CollectionAt", + "signature": "func CollectionAt(v time.Time) predicate.BillingInvoice", + "line": 326 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAt", + "signature": "func PaymentProcessingEnteredAt(v time.Time) predicate.BillingInvoice", + "line": 331 + }, + { + "kind": "func", + "name": "SchemaLevel", + "signature": "func SchemaLevel(v int) predicate.BillingInvoice", + "line": 336 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoice", + "line": 341 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoice", + "line": 346 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoice", + "line": 351 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoice", + "line": 356 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoice", + "line": 361 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoice", + "line": 366 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoice", + "line": 371 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoice", + "line": 376 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoice", + "line": 381 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoice", + "line": 386 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoice", + "line": 391 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoice", + "line": 396 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoice", + "line": 401 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.BillingInvoice", + "line": 406 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.BillingInvoice", + "line": 411 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 416 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 421 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 426 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 431 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoice", + "line": 436 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 441 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoice", + "line": 446 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 451 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 456 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 461 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 466 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 471 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoice", + "line": 476 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 481 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoice", + "line": 486 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 491 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 496 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 501 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 506 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 511 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoice", + "line": 516 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 521 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoice", + "line": 526 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 531 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoice", + "line": 536 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoice", + "line": 541 + }, + { + "kind": "func", + "name": "SupplierAddressCountryEQ", + "signature": "func SupplierAddressCountryEQ(v models.CountryCode) predicate.BillingInvoice", + "line": 546 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNEQ", + "signature": "func SupplierAddressCountryNEQ(v models.CountryCode) predicate.BillingInvoice", + "line": 552 + }, + { + "kind": "func", + "name": "SupplierAddressCountryIn", + "signature": "func SupplierAddressCountryIn(vs ...models.CountryCode) predicate.BillingInvoice", + "line": 558 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNotIn", + "signature": "func SupplierAddressCountryNotIn(vs ...models.CountryCode) predicate.BillingInvoice", + "line": 567 + }, + { + "kind": "func", + "name": "SupplierAddressCountryGT", + "signature": "func SupplierAddressCountryGT(v models.CountryCode) predicate.BillingInvoice", + "line": 576 + }, + { + "kind": "func", + "name": "SupplierAddressCountryGTE", + "signature": "func SupplierAddressCountryGTE(v models.CountryCode) predicate.BillingInvoice", + "line": 582 + }, + { + "kind": "func", + "name": "SupplierAddressCountryLT", + "signature": "func SupplierAddressCountryLT(v models.CountryCode) predicate.BillingInvoice", + "line": 588 + }, + { + "kind": "func", + "name": "SupplierAddressCountryLTE", + "signature": "func SupplierAddressCountryLTE(v models.CountryCode) predicate.BillingInvoice", + "line": 594 + }, + { + "kind": "func", + "name": "SupplierAddressCountryContains", + "signature": "func SupplierAddressCountryContains(v models.CountryCode) predicate.BillingInvoice", + "line": 600 + }, + { + "kind": "func", + "name": "SupplierAddressCountryHasPrefix", + "signature": "func SupplierAddressCountryHasPrefix(v models.CountryCode) predicate.BillingInvoice", + "line": 606 + }, + { + "kind": "func", + "name": "SupplierAddressCountryHasSuffix", + "signature": "func SupplierAddressCountryHasSuffix(v models.CountryCode) predicate.BillingInvoice", + "line": 612 + }, + { + "kind": "func", + "name": "SupplierAddressCountryIsNil", + "signature": "func SupplierAddressCountryIsNil() predicate.BillingInvoice", + "line": 618 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNotNil", + "signature": "func SupplierAddressCountryNotNil() predicate.BillingInvoice", + "line": 623 + }, + { + "kind": "func", + "name": "SupplierAddressCountryEqualFold", + "signature": "func SupplierAddressCountryEqualFold(v models.CountryCode) predicate.BillingInvoice", + "line": 628 + }, + { + "kind": "func", + "name": "SupplierAddressCountryContainsFold", + "signature": "func SupplierAddressCountryContainsFold(v models.CountryCode) predicate.BillingInvoice", + "line": 634 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeEQ", + "signature": "func SupplierAddressPostalCodeEQ(v string) predicate.BillingInvoice", + "line": 640 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNEQ", + "signature": "func SupplierAddressPostalCodeNEQ(v string) predicate.BillingInvoice", + "line": 645 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeIn", + "signature": "func SupplierAddressPostalCodeIn(vs ...string) predicate.BillingInvoice", + "line": 650 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNotIn", + "signature": "func SupplierAddressPostalCodeNotIn(vs ...string) predicate.BillingInvoice", + "line": 655 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeGT", + "signature": "func SupplierAddressPostalCodeGT(v string) predicate.BillingInvoice", + "line": 660 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeGTE", + "signature": "func SupplierAddressPostalCodeGTE(v string) predicate.BillingInvoice", + "line": 665 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeLT", + "signature": "func SupplierAddressPostalCodeLT(v string) predicate.BillingInvoice", + "line": 670 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeLTE", + "signature": "func SupplierAddressPostalCodeLTE(v string) predicate.BillingInvoice", + "line": 675 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeContains", + "signature": "func SupplierAddressPostalCodeContains(v string) predicate.BillingInvoice", + "line": 680 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeHasPrefix", + "signature": "func SupplierAddressPostalCodeHasPrefix(v string) predicate.BillingInvoice", + "line": 685 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeHasSuffix", + "signature": "func SupplierAddressPostalCodeHasSuffix(v string) predicate.BillingInvoice", + "line": 690 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeIsNil", + "signature": "func SupplierAddressPostalCodeIsNil() predicate.BillingInvoice", + "line": 695 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNotNil", + "signature": "func SupplierAddressPostalCodeNotNil() predicate.BillingInvoice", + "line": 700 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeEqualFold", + "signature": "func SupplierAddressPostalCodeEqualFold(v string) predicate.BillingInvoice", + "line": 705 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeContainsFold", + "signature": "func SupplierAddressPostalCodeContainsFold(v string) predicate.BillingInvoice", + "line": 710 + }, + { + "kind": "func", + "name": "SupplierAddressStateEQ", + "signature": "func SupplierAddressStateEQ(v string) predicate.BillingInvoice", + "line": 715 + }, + { + "kind": "func", + "name": "SupplierAddressStateNEQ", + "signature": "func SupplierAddressStateNEQ(v string) predicate.BillingInvoice", + "line": 720 + }, + { + "kind": "func", + "name": "SupplierAddressStateIn", + "signature": "func SupplierAddressStateIn(vs ...string) predicate.BillingInvoice", + "line": 725 + }, + { + "kind": "func", + "name": "SupplierAddressStateNotIn", + "signature": "func SupplierAddressStateNotIn(vs ...string) predicate.BillingInvoice", + "line": 730 + }, + { + "kind": "func", + "name": "SupplierAddressStateGT", + "signature": "func SupplierAddressStateGT(v string) predicate.BillingInvoice", + "line": 735 + }, + { + "kind": "func", + "name": "SupplierAddressStateGTE", + "signature": "func SupplierAddressStateGTE(v string) predicate.BillingInvoice", + "line": 740 + }, + { + "kind": "func", + "name": "SupplierAddressStateLT", + "signature": "func SupplierAddressStateLT(v string) predicate.BillingInvoice", + "line": 745 + }, + { + "kind": "func", + "name": "SupplierAddressStateLTE", + "signature": "func SupplierAddressStateLTE(v string) predicate.BillingInvoice", + "line": 750 + }, + { + "kind": "func", + "name": "SupplierAddressStateContains", + "signature": "func SupplierAddressStateContains(v string) predicate.BillingInvoice", + "line": 755 + }, + { + "kind": "func", + "name": "SupplierAddressStateHasPrefix", + "signature": "func SupplierAddressStateHasPrefix(v string) predicate.BillingInvoice", + "line": 760 + }, + { + "kind": "func", + "name": "SupplierAddressStateHasSuffix", + "signature": "func SupplierAddressStateHasSuffix(v string) predicate.BillingInvoice", + "line": 765 + }, + { + "kind": "func", + "name": "SupplierAddressStateIsNil", + "signature": "func SupplierAddressStateIsNil() predicate.BillingInvoice", + "line": 770 + }, + { + "kind": "func", + "name": "SupplierAddressStateNotNil", + "signature": "func SupplierAddressStateNotNil() predicate.BillingInvoice", + "line": 775 + }, + { + "kind": "func", + "name": "SupplierAddressStateEqualFold", + "signature": "func SupplierAddressStateEqualFold(v string) predicate.BillingInvoice", + "line": 780 + }, + { + "kind": "func", + "name": "SupplierAddressStateContainsFold", + "signature": "func SupplierAddressStateContainsFold(v string) predicate.BillingInvoice", + "line": 785 + }, + { + "kind": "func", + "name": "SupplierAddressCityEQ", + "signature": "func SupplierAddressCityEQ(v string) predicate.BillingInvoice", + "line": 790 + }, + { + "kind": "func", + "name": "SupplierAddressCityNEQ", + "signature": "func SupplierAddressCityNEQ(v string) predicate.BillingInvoice", + "line": 795 + }, + { + "kind": "func", + "name": "SupplierAddressCityIn", + "signature": "func SupplierAddressCityIn(vs ...string) predicate.BillingInvoice", + "line": 800 + }, + { + "kind": "func", + "name": "SupplierAddressCityNotIn", + "signature": "func SupplierAddressCityNotIn(vs ...string) predicate.BillingInvoice", + "line": 805 + }, + { + "kind": "func", + "name": "SupplierAddressCityGT", + "signature": "func SupplierAddressCityGT(v string) predicate.BillingInvoice", + "line": 810 + }, + { + "kind": "func", + "name": "SupplierAddressCityGTE", + "signature": "func SupplierAddressCityGTE(v string) predicate.BillingInvoice", + "line": 815 + }, + { + "kind": "func", + "name": "SupplierAddressCityLT", + "signature": "func SupplierAddressCityLT(v string) predicate.BillingInvoice", + "line": 820 + }, + { + "kind": "func", + "name": "SupplierAddressCityLTE", + "signature": "func SupplierAddressCityLTE(v string) predicate.BillingInvoice", + "line": 825 + }, + { + "kind": "func", + "name": "SupplierAddressCityContains", + "signature": "func SupplierAddressCityContains(v string) predicate.BillingInvoice", + "line": 830 + }, + { + "kind": "func", + "name": "SupplierAddressCityHasPrefix", + "signature": "func SupplierAddressCityHasPrefix(v string) predicate.BillingInvoice", + "line": 835 + }, + { + "kind": "func", + "name": "SupplierAddressCityHasSuffix", + "signature": "func SupplierAddressCityHasSuffix(v string) predicate.BillingInvoice", + "line": 840 + }, + { + "kind": "func", + "name": "SupplierAddressCityIsNil", + "signature": "func SupplierAddressCityIsNil() predicate.BillingInvoice", + "line": 845 + }, + { + "kind": "func", + "name": "SupplierAddressCityNotNil", + "signature": "func SupplierAddressCityNotNil() predicate.BillingInvoice", + "line": 850 + }, + { + "kind": "func", + "name": "SupplierAddressCityEqualFold", + "signature": "func SupplierAddressCityEqualFold(v string) predicate.BillingInvoice", + "line": 855 + }, + { + "kind": "func", + "name": "SupplierAddressCityContainsFold", + "signature": "func SupplierAddressCityContainsFold(v string) predicate.BillingInvoice", + "line": 860 + }, + { + "kind": "func", + "name": "SupplierAddressLine1EQ", + "signature": "func SupplierAddressLine1EQ(v string) predicate.BillingInvoice", + "line": 865 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NEQ", + "signature": "func SupplierAddressLine1NEQ(v string) predicate.BillingInvoice", + "line": 870 + }, + { + "kind": "func", + "name": "SupplierAddressLine1In", + "signature": "func SupplierAddressLine1In(vs ...string) predicate.BillingInvoice", + "line": 875 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NotIn", + "signature": "func SupplierAddressLine1NotIn(vs ...string) predicate.BillingInvoice", + "line": 880 + }, + { + "kind": "func", + "name": "SupplierAddressLine1GT", + "signature": "func SupplierAddressLine1GT(v string) predicate.BillingInvoice", + "line": 885 + }, + { + "kind": "func", + "name": "SupplierAddressLine1GTE", + "signature": "func SupplierAddressLine1GTE(v string) predicate.BillingInvoice", + "line": 890 + }, + { + "kind": "func", + "name": "SupplierAddressLine1LT", + "signature": "func SupplierAddressLine1LT(v string) predicate.BillingInvoice", + "line": 895 + }, + { + "kind": "func", + "name": "SupplierAddressLine1LTE", + "signature": "func SupplierAddressLine1LTE(v string) predicate.BillingInvoice", + "line": 900 + }, + { + "kind": "func", + "name": "SupplierAddressLine1Contains", + "signature": "func SupplierAddressLine1Contains(v string) predicate.BillingInvoice", + "line": 905 + }, + { + "kind": "func", + "name": "SupplierAddressLine1HasPrefix", + "signature": "func SupplierAddressLine1HasPrefix(v string) predicate.BillingInvoice", + "line": 910 + }, + { + "kind": "func", + "name": "SupplierAddressLine1HasSuffix", + "signature": "func SupplierAddressLine1HasSuffix(v string) predicate.BillingInvoice", + "line": 915 + }, + { + "kind": "func", + "name": "SupplierAddressLine1IsNil", + "signature": "func SupplierAddressLine1IsNil() predicate.BillingInvoice", + "line": 920 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NotNil", + "signature": "func SupplierAddressLine1NotNil() predicate.BillingInvoice", + "line": 925 + }, + { + "kind": "func", + "name": "SupplierAddressLine1EqualFold", + "signature": "func SupplierAddressLine1EqualFold(v string) predicate.BillingInvoice", + "line": 930 + }, + { + "kind": "func", + "name": "SupplierAddressLine1ContainsFold", + "signature": "func SupplierAddressLine1ContainsFold(v string) predicate.BillingInvoice", + "line": 935 + }, + { + "kind": "func", + "name": "SupplierAddressLine2EQ", + "signature": "func SupplierAddressLine2EQ(v string) predicate.BillingInvoice", + "line": 940 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NEQ", + "signature": "func SupplierAddressLine2NEQ(v string) predicate.BillingInvoice", + "line": 945 + }, + { + "kind": "func", + "name": "SupplierAddressLine2In", + "signature": "func SupplierAddressLine2In(vs ...string) predicate.BillingInvoice", + "line": 950 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NotIn", + "signature": "func SupplierAddressLine2NotIn(vs ...string) predicate.BillingInvoice", + "line": 955 + }, + { + "kind": "func", + "name": "SupplierAddressLine2GT", + "signature": "func SupplierAddressLine2GT(v string) predicate.BillingInvoice", + "line": 960 + }, + { + "kind": "func", + "name": "SupplierAddressLine2GTE", + "signature": "func SupplierAddressLine2GTE(v string) predicate.BillingInvoice", + "line": 965 + }, + { + "kind": "func", + "name": "SupplierAddressLine2LT", + "signature": "func SupplierAddressLine2LT(v string) predicate.BillingInvoice", + "line": 970 + }, + { + "kind": "func", + "name": "SupplierAddressLine2LTE", + "signature": "func SupplierAddressLine2LTE(v string) predicate.BillingInvoice", + "line": 975 + }, + { + "kind": "func", + "name": "SupplierAddressLine2Contains", + "signature": "func SupplierAddressLine2Contains(v string) predicate.BillingInvoice", + "line": 980 + }, + { + "kind": "func", + "name": "SupplierAddressLine2HasPrefix", + "signature": "func SupplierAddressLine2HasPrefix(v string) predicate.BillingInvoice", + "line": 985 + }, + { + "kind": "func", + "name": "SupplierAddressLine2HasSuffix", + "signature": "func SupplierAddressLine2HasSuffix(v string) predicate.BillingInvoice", + "line": 990 + }, + { + "kind": "func", + "name": "SupplierAddressLine2IsNil", + "signature": "func SupplierAddressLine2IsNil() predicate.BillingInvoice", + "line": 995 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NotNil", + "signature": "func SupplierAddressLine2NotNil() predicate.BillingInvoice", + "line": 1000 + }, + { + "kind": "func", + "name": "SupplierAddressLine2EqualFold", + "signature": "func SupplierAddressLine2EqualFold(v string) predicate.BillingInvoice", + "line": 1005 + }, + { + "kind": "func", + "name": "SupplierAddressLine2ContainsFold", + "signature": "func SupplierAddressLine2ContainsFold(v string) predicate.BillingInvoice", + "line": 1010 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberEQ", + "signature": "func SupplierAddressPhoneNumberEQ(v string) predicate.BillingInvoice", + "line": 1015 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNEQ", + "signature": "func SupplierAddressPhoneNumberNEQ(v string) predicate.BillingInvoice", + "line": 1020 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberIn", + "signature": "func SupplierAddressPhoneNumberIn(vs ...string) predicate.BillingInvoice", + "line": 1025 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNotIn", + "signature": "func SupplierAddressPhoneNumberNotIn(vs ...string) predicate.BillingInvoice", + "line": 1030 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberGT", + "signature": "func SupplierAddressPhoneNumberGT(v string) predicate.BillingInvoice", + "line": 1035 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberGTE", + "signature": "func SupplierAddressPhoneNumberGTE(v string) predicate.BillingInvoice", + "line": 1040 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberLT", + "signature": "func SupplierAddressPhoneNumberLT(v string) predicate.BillingInvoice", + "line": 1045 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberLTE", + "signature": "func SupplierAddressPhoneNumberLTE(v string) predicate.BillingInvoice", + "line": 1050 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberContains", + "signature": "func SupplierAddressPhoneNumberContains(v string) predicate.BillingInvoice", + "line": 1055 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberHasPrefix", + "signature": "func SupplierAddressPhoneNumberHasPrefix(v string) predicate.BillingInvoice", + "line": 1060 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberHasSuffix", + "signature": "func SupplierAddressPhoneNumberHasSuffix(v string) predicate.BillingInvoice", + "line": 1065 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberIsNil", + "signature": "func SupplierAddressPhoneNumberIsNil() predicate.BillingInvoice", + "line": 1070 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNotNil", + "signature": "func SupplierAddressPhoneNumberNotNil() predicate.BillingInvoice", + "line": 1075 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberEqualFold", + "signature": "func SupplierAddressPhoneNumberEqualFold(v string) predicate.BillingInvoice", + "line": 1080 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberContainsFold", + "signature": "func SupplierAddressPhoneNumberContainsFold(v string) predicate.BillingInvoice", + "line": 1085 + }, + { + "kind": "func", + "name": "CustomerAddressCountryEQ", + "signature": "func CustomerAddressCountryEQ(v models.CountryCode) predicate.BillingInvoice", + "line": 1090 + }, + { + "kind": "func", + "name": "CustomerAddressCountryNEQ", + "signature": "func CustomerAddressCountryNEQ(v models.CountryCode) predicate.BillingInvoice", + "line": 1096 + }, + { + "kind": "func", + "name": "CustomerAddressCountryIn", + "signature": "func CustomerAddressCountryIn(vs ...models.CountryCode) predicate.BillingInvoice", + "line": 1102 + }, + { + "kind": "func", + "name": "CustomerAddressCountryNotIn", + "signature": "func CustomerAddressCountryNotIn(vs ...models.CountryCode) predicate.BillingInvoice", + "line": 1111 + }, + { + "kind": "func", + "name": "CustomerAddressCountryGT", + "signature": "func CustomerAddressCountryGT(v models.CountryCode) predicate.BillingInvoice", + "line": 1120 + }, + { + "kind": "func", + "name": "CustomerAddressCountryGTE", + "signature": "func CustomerAddressCountryGTE(v models.CountryCode) predicate.BillingInvoice", + "line": 1126 + }, + { + "kind": "func", + "name": "CustomerAddressCountryLT", + "signature": "func CustomerAddressCountryLT(v models.CountryCode) predicate.BillingInvoice", + "line": 1132 + }, + { + "kind": "func", + "name": "CustomerAddressCountryLTE", + "signature": "func CustomerAddressCountryLTE(v models.CountryCode) predicate.BillingInvoice", + "line": 1138 + }, + { + "kind": "func", + "name": "CustomerAddressCountryContains", + "signature": "func CustomerAddressCountryContains(v models.CountryCode) predicate.BillingInvoice", + "line": 1144 + }, + { + "kind": "func", + "name": "CustomerAddressCountryHasPrefix", + "signature": "func CustomerAddressCountryHasPrefix(v models.CountryCode) predicate.BillingInvoice", + "line": 1150 + }, + { + "kind": "func", + "name": "CustomerAddressCountryHasSuffix", + "signature": "func CustomerAddressCountryHasSuffix(v models.CountryCode) predicate.BillingInvoice", + "line": 1156 + }, + { + "kind": "func", + "name": "CustomerAddressCountryIsNil", + "signature": "func CustomerAddressCountryIsNil() predicate.BillingInvoice", + "line": 1162 + }, + { + "kind": "func", + "name": "CustomerAddressCountryNotNil", + "signature": "func CustomerAddressCountryNotNil() predicate.BillingInvoice", + "line": 1167 + }, + { + "kind": "func", + "name": "CustomerAddressCountryEqualFold", + "signature": "func CustomerAddressCountryEqualFold(v models.CountryCode) predicate.BillingInvoice", + "line": 1172 + }, + { + "kind": "func", + "name": "CustomerAddressCountryContainsFold", + "signature": "func CustomerAddressCountryContainsFold(v models.CountryCode) predicate.BillingInvoice", + "line": 1178 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeEQ", + "signature": "func CustomerAddressPostalCodeEQ(v string) predicate.BillingInvoice", + "line": 1184 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeNEQ", + "signature": "func CustomerAddressPostalCodeNEQ(v string) predicate.BillingInvoice", + "line": 1189 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeIn", + "signature": "func CustomerAddressPostalCodeIn(vs ...string) predicate.BillingInvoice", + "line": 1194 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeNotIn", + "signature": "func CustomerAddressPostalCodeNotIn(vs ...string) predicate.BillingInvoice", + "line": 1199 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeGT", + "signature": "func CustomerAddressPostalCodeGT(v string) predicate.BillingInvoice", + "line": 1204 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeGTE", + "signature": "func CustomerAddressPostalCodeGTE(v string) predicate.BillingInvoice", + "line": 1209 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeLT", + "signature": "func CustomerAddressPostalCodeLT(v string) predicate.BillingInvoice", + "line": 1214 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeLTE", + "signature": "func CustomerAddressPostalCodeLTE(v string) predicate.BillingInvoice", + "line": 1219 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeContains", + "signature": "func CustomerAddressPostalCodeContains(v string) predicate.BillingInvoice", + "line": 1224 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeHasPrefix", + "signature": "func CustomerAddressPostalCodeHasPrefix(v string) predicate.BillingInvoice", + "line": 1229 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeHasSuffix", + "signature": "func CustomerAddressPostalCodeHasSuffix(v string) predicate.BillingInvoice", + "line": 1234 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeIsNil", + "signature": "func CustomerAddressPostalCodeIsNil() predicate.BillingInvoice", + "line": 1239 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeNotNil", + "signature": "func CustomerAddressPostalCodeNotNil() predicate.BillingInvoice", + "line": 1244 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeEqualFold", + "signature": "func CustomerAddressPostalCodeEqualFold(v string) predicate.BillingInvoice", + "line": 1249 + }, + { + "kind": "func", + "name": "CustomerAddressPostalCodeContainsFold", + "signature": "func CustomerAddressPostalCodeContainsFold(v string) predicate.BillingInvoice", + "line": 1254 + }, + { + "kind": "func", + "name": "CustomerAddressStateEQ", + "signature": "func CustomerAddressStateEQ(v string) predicate.BillingInvoice", + "line": 1259 + }, + { + "kind": "func", + "name": "CustomerAddressStateNEQ", + "signature": "func CustomerAddressStateNEQ(v string) predicate.BillingInvoice", + "line": 1264 + }, + { + "kind": "func", + "name": "CustomerAddressStateIn", + "signature": "func CustomerAddressStateIn(vs ...string) predicate.BillingInvoice", + "line": 1269 + }, + { + "kind": "func", + "name": "CustomerAddressStateNotIn", + "signature": "func CustomerAddressStateNotIn(vs ...string) predicate.BillingInvoice", + "line": 1274 + }, + { + "kind": "func", + "name": "CustomerAddressStateGT", + "signature": "func CustomerAddressStateGT(v string) predicate.BillingInvoice", + "line": 1279 + }, + { + "kind": "func", + "name": "CustomerAddressStateGTE", + "signature": "func CustomerAddressStateGTE(v string) predicate.BillingInvoice", + "line": 1284 + }, + { + "kind": "func", + "name": "CustomerAddressStateLT", + "signature": "func CustomerAddressStateLT(v string) predicate.BillingInvoice", + "line": 1289 + }, + { + "kind": "func", + "name": "CustomerAddressStateLTE", + "signature": "func CustomerAddressStateLTE(v string) predicate.BillingInvoice", + "line": 1294 + }, + { + "kind": "func", + "name": "CustomerAddressStateContains", + "signature": "func CustomerAddressStateContains(v string) predicate.BillingInvoice", + "line": 1299 + }, + { + "kind": "func", + "name": "CustomerAddressStateHasPrefix", + "signature": "func CustomerAddressStateHasPrefix(v string) predicate.BillingInvoice", + "line": 1304 + }, + { + "kind": "func", + "name": "CustomerAddressStateHasSuffix", + "signature": "func CustomerAddressStateHasSuffix(v string) predicate.BillingInvoice", + "line": 1309 + }, + { + "kind": "func", + "name": "CustomerAddressStateIsNil", + "signature": "func CustomerAddressStateIsNil() predicate.BillingInvoice", + "line": 1314 + }, + { + "kind": "func", + "name": "CustomerAddressStateNotNil", + "signature": "func CustomerAddressStateNotNil() predicate.BillingInvoice", + "line": 1319 + }, + { + "kind": "func", + "name": "CustomerAddressStateEqualFold", + "signature": "func CustomerAddressStateEqualFold(v string) predicate.BillingInvoice", + "line": 1324 + }, + { + "kind": "func", + "name": "CustomerAddressStateContainsFold", + "signature": "func CustomerAddressStateContainsFold(v string) predicate.BillingInvoice", + "line": 1329 + }, + { + "kind": "func", + "name": "CustomerAddressCityEQ", + "signature": "func CustomerAddressCityEQ(v string) predicate.BillingInvoice", + "line": 1334 + }, + { + "kind": "func", + "name": "CustomerAddressCityNEQ", + "signature": "func CustomerAddressCityNEQ(v string) predicate.BillingInvoice", + "line": 1339 + }, + { + "kind": "func", + "name": "CustomerAddressCityIn", + "signature": "func CustomerAddressCityIn(vs ...string) predicate.BillingInvoice", + "line": 1344 + }, + { + "kind": "func", + "name": "CustomerAddressCityNotIn", + "signature": "func CustomerAddressCityNotIn(vs ...string) predicate.BillingInvoice", + "line": 1349 + }, + { + "kind": "func", + "name": "CustomerAddressCityGT", + "signature": "func CustomerAddressCityGT(v string) predicate.BillingInvoice", + "line": 1354 + }, + { + "kind": "func", + "name": "CustomerAddressCityGTE", + "signature": "func CustomerAddressCityGTE(v string) predicate.BillingInvoice", + "line": 1359 + }, + { + "kind": "func", + "name": "CustomerAddressCityLT", + "signature": "func CustomerAddressCityLT(v string) predicate.BillingInvoice", + "line": 1364 + }, + { + "kind": "func", + "name": "CustomerAddressCityLTE", + "signature": "func CustomerAddressCityLTE(v string) predicate.BillingInvoice", + "line": 1369 + }, + { + "kind": "func", + "name": "CustomerAddressCityContains", + "signature": "func CustomerAddressCityContains(v string) predicate.BillingInvoice", + "line": 1374 + }, + { + "kind": "func", + "name": "CustomerAddressCityHasPrefix", + "signature": "func CustomerAddressCityHasPrefix(v string) predicate.BillingInvoice", + "line": 1379 + }, + { + "kind": "func", + "name": "CustomerAddressCityHasSuffix", + "signature": "func CustomerAddressCityHasSuffix(v string) predicate.BillingInvoice", + "line": 1384 + }, + { + "kind": "func", + "name": "CustomerAddressCityIsNil", + "signature": "func CustomerAddressCityIsNil() predicate.BillingInvoice", + "line": 1389 + }, + { + "kind": "func", + "name": "CustomerAddressCityNotNil", + "signature": "func CustomerAddressCityNotNil() predicate.BillingInvoice", + "line": 1394 + }, + { + "kind": "func", + "name": "CustomerAddressCityEqualFold", + "signature": "func CustomerAddressCityEqualFold(v string) predicate.BillingInvoice", + "line": 1399 + }, + { + "kind": "func", + "name": "CustomerAddressCityContainsFold", + "signature": "func CustomerAddressCityContainsFold(v string) predicate.BillingInvoice", + "line": 1404 + }, + { + "kind": "func", + "name": "CustomerAddressLine1EQ", + "signature": "func CustomerAddressLine1EQ(v string) predicate.BillingInvoice", + "line": 1409 + }, + { + "kind": "func", + "name": "CustomerAddressLine1NEQ", + "signature": "func CustomerAddressLine1NEQ(v string) predicate.BillingInvoice", + "line": 1414 + }, + { + "kind": "func", + "name": "CustomerAddressLine1In", + "signature": "func CustomerAddressLine1In(vs ...string) predicate.BillingInvoice", + "line": 1419 + }, + { + "kind": "func", + "name": "CustomerAddressLine1NotIn", + "signature": "func CustomerAddressLine1NotIn(vs ...string) predicate.BillingInvoice", + "line": 1424 + }, + { + "kind": "func", + "name": "CustomerAddressLine1GT", + "signature": "func CustomerAddressLine1GT(v string) predicate.BillingInvoice", + "line": 1429 + }, + { + "kind": "func", + "name": "CustomerAddressLine1GTE", + "signature": "func CustomerAddressLine1GTE(v string) predicate.BillingInvoice", + "line": 1434 + }, + { + "kind": "func", + "name": "CustomerAddressLine1LT", + "signature": "func CustomerAddressLine1LT(v string) predicate.BillingInvoice", + "line": 1439 + }, + { + "kind": "func", + "name": "CustomerAddressLine1LTE", + "signature": "func CustomerAddressLine1LTE(v string) predicate.BillingInvoice", + "line": 1444 + }, + { + "kind": "func", + "name": "CustomerAddressLine1Contains", + "signature": "func CustomerAddressLine1Contains(v string) predicate.BillingInvoice", + "line": 1449 + }, + { + "kind": "func", + "name": "CustomerAddressLine1HasPrefix", + "signature": "func CustomerAddressLine1HasPrefix(v string) predicate.BillingInvoice", + "line": 1454 + }, + { + "kind": "func", + "name": "CustomerAddressLine1HasSuffix", + "signature": "func CustomerAddressLine1HasSuffix(v string) predicate.BillingInvoice", + "line": 1459 + }, + { + "kind": "func", + "name": "CustomerAddressLine1IsNil", + "signature": "func CustomerAddressLine1IsNil() predicate.BillingInvoice", + "line": 1464 + }, + { + "kind": "func", + "name": "CustomerAddressLine1NotNil", + "signature": "func CustomerAddressLine1NotNil() predicate.BillingInvoice", + "line": 1469 + }, + { + "kind": "func", + "name": "CustomerAddressLine1EqualFold", + "signature": "func CustomerAddressLine1EqualFold(v string) predicate.BillingInvoice", + "line": 1474 + }, + { + "kind": "func", + "name": "CustomerAddressLine1ContainsFold", + "signature": "func CustomerAddressLine1ContainsFold(v string) predicate.BillingInvoice", + "line": 1479 + }, + { + "kind": "func", + "name": "CustomerAddressLine2EQ", + "signature": "func CustomerAddressLine2EQ(v string) predicate.BillingInvoice", + "line": 1484 + }, + { + "kind": "func", + "name": "CustomerAddressLine2NEQ", + "signature": "func CustomerAddressLine2NEQ(v string) predicate.BillingInvoice", + "line": 1489 + }, + { + "kind": "func", + "name": "CustomerAddressLine2In", + "signature": "func CustomerAddressLine2In(vs ...string) predicate.BillingInvoice", + "line": 1494 + }, + { + "kind": "func", + "name": "CustomerAddressLine2NotIn", + "signature": "func CustomerAddressLine2NotIn(vs ...string) predicate.BillingInvoice", + "line": 1499 + }, + { + "kind": "func", + "name": "CustomerAddressLine2GT", + "signature": "func CustomerAddressLine2GT(v string) predicate.BillingInvoice", + "line": 1504 + }, + { + "kind": "func", + "name": "CustomerAddressLine2GTE", + "signature": "func CustomerAddressLine2GTE(v string) predicate.BillingInvoice", + "line": 1509 + }, + { + "kind": "func", + "name": "CustomerAddressLine2LT", + "signature": "func CustomerAddressLine2LT(v string) predicate.BillingInvoice", + "line": 1514 + }, + { + "kind": "func", + "name": "CustomerAddressLine2LTE", + "signature": "func CustomerAddressLine2LTE(v string) predicate.BillingInvoice", + "line": 1519 + }, + { + "kind": "func", + "name": "CustomerAddressLine2Contains", + "signature": "func CustomerAddressLine2Contains(v string) predicate.BillingInvoice", + "line": 1524 + }, + { + "kind": "func", + "name": "CustomerAddressLine2HasPrefix", + "signature": "func CustomerAddressLine2HasPrefix(v string) predicate.BillingInvoice", + "line": 1529 + }, + { + "kind": "func", + "name": "CustomerAddressLine2HasSuffix", + "signature": "func CustomerAddressLine2HasSuffix(v string) predicate.BillingInvoice", + "line": 1534 + }, + { + "kind": "func", + "name": "CustomerAddressLine2IsNil", + "signature": "func CustomerAddressLine2IsNil() predicate.BillingInvoice", + "line": 1539 + }, + { + "kind": "func", + "name": "CustomerAddressLine2NotNil", + "signature": "func CustomerAddressLine2NotNil() predicate.BillingInvoice", + "line": 1544 + }, + { + "kind": "func", + "name": "CustomerAddressLine2EqualFold", + "signature": "func CustomerAddressLine2EqualFold(v string) predicate.BillingInvoice", + "line": 1549 + }, + { + "kind": "func", + "name": "CustomerAddressLine2ContainsFold", + "signature": "func CustomerAddressLine2ContainsFold(v string) predicate.BillingInvoice", + "line": 1554 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberEQ", + "signature": "func CustomerAddressPhoneNumberEQ(v string) predicate.BillingInvoice", + "line": 1559 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberNEQ", + "signature": "func CustomerAddressPhoneNumberNEQ(v string) predicate.BillingInvoice", + "line": 1564 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberIn", + "signature": "func CustomerAddressPhoneNumberIn(vs ...string) predicate.BillingInvoice", + "line": 1569 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberNotIn", + "signature": "func CustomerAddressPhoneNumberNotIn(vs ...string) predicate.BillingInvoice", + "line": 1574 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberGT", + "signature": "func CustomerAddressPhoneNumberGT(v string) predicate.BillingInvoice", + "line": 1579 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberGTE", + "signature": "func CustomerAddressPhoneNumberGTE(v string) predicate.BillingInvoice", + "line": 1584 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberLT", + "signature": "func CustomerAddressPhoneNumberLT(v string) predicate.BillingInvoice", + "line": 1589 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberLTE", + "signature": "func CustomerAddressPhoneNumberLTE(v string) predicate.BillingInvoice", + "line": 1594 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberContains", + "signature": "func CustomerAddressPhoneNumberContains(v string) predicate.BillingInvoice", + "line": 1599 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberHasPrefix", + "signature": "func CustomerAddressPhoneNumberHasPrefix(v string) predicate.BillingInvoice", + "line": 1604 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberHasSuffix", + "signature": "func CustomerAddressPhoneNumberHasSuffix(v string) predicate.BillingInvoice", + "line": 1609 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberIsNil", + "signature": "func CustomerAddressPhoneNumberIsNil() predicate.BillingInvoice", + "line": 1614 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberNotNil", + "signature": "func CustomerAddressPhoneNumberNotNil() predicate.BillingInvoice", + "line": 1619 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberEqualFold", + "signature": "func CustomerAddressPhoneNumberEqualFold(v string) predicate.BillingInvoice", + "line": 1624 + }, + { + "kind": "func", + "name": "CustomerAddressPhoneNumberContainsFold", + "signature": "func CustomerAddressPhoneNumberContainsFold(v string) predicate.BillingInvoice", + "line": 1629 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1634 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1639 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1644 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1649 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1654 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1659 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1664 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1669 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1674 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1679 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1684 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1689 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1694 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1699 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1704 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1709 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1714 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1719 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1724 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1729 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1734 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1739 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1744 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1749 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1754 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1759 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1764 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1769 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1774 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1779 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1784 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1789 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1794 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1799 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1804 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1809 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1814 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1819 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1824 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1829 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1834 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1839 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1844 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1849 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1854 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1859 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1864 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1869 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1874 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1879 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1884 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1889 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1894 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1899 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1904 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1909 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1914 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1919 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1924 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1929 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1934 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1939 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1944 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoice", + "line": 1949 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingInvoice", + "line": 1954 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingInvoice", + "line": 1959 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingInvoice", + "line": 1964 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 1969 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingInvoice", + "line": 1974 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingInvoice", + "line": 1979 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingInvoice", + "line": 1984 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingInvoice", + "line": 1989 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingInvoice", + "line": 1994 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingInvoice", + "line": 1999 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingInvoice", + "line": 2004 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingInvoice", + "line": 2009 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingInvoice", + "line": 2014 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingInvoice", + "line": 2019 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingInvoice", + "line": 2024 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDEQ", + "signature": "func PaymentAppExternalIDEQ(v string) predicate.BillingInvoice", + "line": 2029 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDNEQ", + "signature": "func PaymentAppExternalIDNEQ(v string) predicate.BillingInvoice", + "line": 2034 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDIn", + "signature": "func PaymentAppExternalIDIn(vs ...string) predicate.BillingInvoice", + "line": 2039 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDNotIn", + "signature": "func PaymentAppExternalIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 2044 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDGT", + "signature": "func PaymentAppExternalIDGT(v string) predicate.BillingInvoice", + "line": 2049 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDGTE", + "signature": "func PaymentAppExternalIDGTE(v string) predicate.BillingInvoice", + "line": 2054 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDLT", + "signature": "func PaymentAppExternalIDLT(v string) predicate.BillingInvoice", + "line": 2059 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDLTE", + "signature": "func PaymentAppExternalIDLTE(v string) predicate.BillingInvoice", + "line": 2064 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDContains", + "signature": "func PaymentAppExternalIDContains(v string) predicate.BillingInvoice", + "line": 2069 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDHasPrefix", + "signature": "func PaymentAppExternalIDHasPrefix(v string) predicate.BillingInvoice", + "line": 2074 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDHasSuffix", + "signature": "func PaymentAppExternalIDHasSuffix(v string) predicate.BillingInvoice", + "line": 2079 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDIsNil", + "signature": "func PaymentAppExternalIDIsNil() predicate.BillingInvoice", + "line": 2084 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDNotNil", + "signature": "func PaymentAppExternalIDNotNil() predicate.BillingInvoice", + "line": 2089 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDEqualFold", + "signature": "func PaymentAppExternalIDEqualFold(v string) predicate.BillingInvoice", + "line": 2094 + }, + { + "kind": "func", + "name": "PaymentAppExternalIDContainsFold", + "signature": "func PaymentAppExternalIDContainsFold(v string) predicate.BillingInvoice", + "line": 2099 + }, + { + "kind": "func", + "name": "TaxAppExternalIDEQ", + "signature": "func TaxAppExternalIDEQ(v string) predicate.BillingInvoice", + "line": 2104 + }, + { + "kind": "func", + "name": "TaxAppExternalIDNEQ", + "signature": "func TaxAppExternalIDNEQ(v string) predicate.BillingInvoice", + "line": 2109 + }, + { + "kind": "func", + "name": "TaxAppExternalIDIn", + "signature": "func TaxAppExternalIDIn(vs ...string) predicate.BillingInvoice", + "line": 2114 + }, + { + "kind": "func", + "name": "TaxAppExternalIDNotIn", + "signature": "func TaxAppExternalIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 2119 + }, + { + "kind": "func", + "name": "TaxAppExternalIDGT", + "signature": "func TaxAppExternalIDGT(v string) predicate.BillingInvoice", + "line": 2124 + }, + { + "kind": "func", + "name": "TaxAppExternalIDGTE", + "signature": "func TaxAppExternalIDGTE(v string) predicate.BillingInvoice", + "line": 2129 + }, + { + "kind": "func", + "name": "TaxAppExternalIDLT", + "signature": "func TaxAppExternalIDLT(v string) predicate.BillingInvoice", + "line": 2134 + }, + { + "kind": "func", + "name": "TaxAppExternalIDLTE", + "signature": "func TaxAppExternalIDLTE(v string) predicate.BillingInvoice", + "line": 2139 + }, + { + "kind": "func", + "name": "TaxAppExternalIDContains", + "signature": "func TaxAppExternalIDContains(v string) predicate.BillingInvoice", + "line": 2144 + }, + { + "kind": "func", + "name": "TaxAppExternalIDHasPrefix", + "signature": "func TaxAppExternalIDHasPrefix(v string) predicate.BillingInvoice", + "line": 2149 + }, + { + "kind": "func", + "name": "TaxAppExternalIDHasSuffix", + "signature": "func TaxAppExternalIDHasSuffix(v string) predicate.BillingInvoice", + "line": 2154 + }, + { + "kind": "func", + "name": "TaxAppExternalIDIsNil", + "signature": "func TaxAppExternalIDIsNil() predicate.BillingInvoice", + "line": 2159 + }, + { + "kind": "func", + "name": "TaxAppExternalIDNotNil", + "signature": "func TaxAppExternalIDNotNil() predicate.BillingInvoice", + "line": 2164 + }, + { + "kind": "func", + "name": "TaxAppExternalIDEqualFold", + "signature": "func TaxAppExternalIDEqualFold(v string) predicate.BillingInvoice", + "line": 2169 + }, + { + "kind": "func", + "name": "TaxAppExternalIDContainsFold", + "signature": "func TaxAppExternalIDContainsFold(v string) predicate.BillingInvoice", + "line": 2174 + }, + { + "kind": "func", + "name": "SupplierNameEQ", + "signature": "func SupplierNameEQ(v string) predicate.BillingInvoice", + "line": 2179 + }, + { + "kind": "func", + "name": "SupplierNameNEQ", + "signature": "func SupplierNameNEQ(v string) predicate.BillingInvoice", + "line": 2184 + }, + { + "kind": "func", + "name": "SupplierNameIn", + "signature": "func SupplierNameIn(vs ...string) predicate.BillingInvoice", + "line": 2189 + }, + { + "kind": "func", + "name": "SupplierNameNotIn", + "signature": "func SupplierNameNotIn(vs ...string) predicate.BillingInvoice", + "line": 2194 + }, + { + "kind": "func", + "name": "SupplierNameGT", + "signature": "func SupplierNameGT(v string) predicate.BillingInvoice", + "line": 2199 + }, + { + "kind": "func", + "name": "SupplierNameGTE", + "signature": "func SupplierNameGTE(v string) predicate.BillingInvoice", + "line": 2204 + }, + { + "kind": "func", + "name": "SupplierNameLT", + "signature": "func SupplierNameLT(v string) predicate.BillingInvoice", + "line": 2209 + }, + { + "kind": "func", + "name": "SupplierNameLTE", + "signature": "func SupplierNameLTE(v string) predicate.BillingInvoice", + "line": 2214 + }, + { + "kind": "func", + "name": "SupplierNameContains", + "signature": "func SupplierNameContains(v string) predicate.BillingInvoice", + "line": 2219 + }, + { + "kind": "func", + "name": "SupplierNameHasPrefix", + "signature": "func SupplierNameHasPrefix(v string) predicate.BillingInvoice", + "line": 2224 + }, + { + "kind": "func", + "name": "SupplierNameHasSuffix", + "signature": "func SupplierNameHasSuffix(v string) predicate.BillingInvoice", + "line": 2229 + }, + { + "kind": "func", + "name": "SupplierNameEqualFold", + "signature": "func SupplierNameEqualFold(v string) predicate.BillingInvoice", + "line": 2234 + }, + { + "kind": "func", + "name": "SupplierNameContainsFold", + "signature": "func SupplierNameContainsFold(v string) predicate.BillingInvoice", + "line": 2239 + }, + { + "kind": "func", + "name": "SupplierTaxCodeEQ", + "signature": "func SupplierTaxCodeEQ(v string) predicate.BillingInvoice", + "line": 2244 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNEQ", + "signature": "func SupplierTaxCodeNEQ(v string) predicate.BillingInvoice", + "line": 2249 + }, + { + "kind": "func", + "name": "SupplierTaxCodeIn", + "signature": "func SupplierTaxCodeIn(vs ...string) predicate.BillingInvoice", + "line": 2254 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNotIn", + "signature": "func SupplierTaxCodeNotIn(vs ...string) predicate.BillingInvoice", + "line": 2259 + }, + { + "kind": "func", + "name": "SupplierTaxCodeGT", + "signature": "func SupplierTaxCodeGT(v string) predicate.BillingInvoice", + "line": 2264 + }, + { + "kind": "func", + "name": "SupplierTaxCodeGTE", + "signature": "func SupplierTaxCodeGTE(v string) predicate.BillingInvoice", + "line": 2269 + }, + { + "kind": "func", + "name": "SupplierTaxCodeLT", + "signature": "func SupplierTaxCodeLT(v string) predicate.BillingInvoice", + "line": 2274 + }, + { + "kind": "func", + "name": "SupplierTaxCodeLTE", + "signature": "func SupplierTaxCodeLTE(v string) predicate.BillingInvoice", + "line": 2279 + }, + { + "kind": "func", + "name": "SupplierTaxCodeContains", + "signature": "func SupplierTaxCodeContains(v string) predicate.BillingInvoice", + "line": 2284 + }, + { + "kind": "func", + "name": "SupplierTaxCodeHasPrefix", + "signature": "func SupplierTaxCodeHasPrefix(v string) predicate.BillingInvoice", + "line": 2289 + }, + { + "kind": "func", + "name": "SupplierTaxCodeHasSuffix", + "signature": "func SupplierTaxCodeHasSuffix(v string) predicate.BillingInvoice", + "line": 2294 + }, + { + "kind": "func", + "name": "SupplierTaxCodeIsNil", + "signature": "func SupplierTaxCodeIsNil() predicate.BillingInvoice", + "line": 2299 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNotNil", + "signature": "func SupplierTaxCodeNotNil() predicate.BillingInvoice", + "line": 2304 + }, + { + "kind": "func", + "name": "SupplierTaxCodeEqualFold", + "signature": "func SupplierTaxCodeEqualFold(v string) predicate.BillingInvoice", + "line": 2309 + }, + { + "kind": "func", + "name": "SupplierTaxCodeContainsFold", + "signature": "func SupplierTaxCodeContainsFold(v string) predicate.BillingInvoice", + "line": 2314 + }, + { + "kind": "func", + "name": "CustomerKeyEQ", + "signature": "func CustomerKeyEQ(v string) predicate.BillingInvoice", + "line": 2319 + }, + { + "kind": "func", + "name": "CustomerKeyNEQ", + "signature": "func CustomerKeyNEQ(v string) predicate.BillingInvoice", + "line": 2324 + }, + { + "kind": "func", + "name": "CustomerKeyIn", + "signature": "func CustomerKeyIn(vs ...string) predicate.BillingInvoice", + "line": 2329 + }, + { + "kind": "func", + "name": "CustomerKeyNotIn", + "signature": "func CustomerKeyNotIn(vs ...string) predicate.BillingInvoice", + "line": 2334 + }, + { + "kind": "func", + "name": "CustomerKeyGT", + "signature": "func CustomerKeyGT(v string) predicate.BillingInvoice", + "line": 2339 + }, + { + "kind": "func", + "name": "CustomerKeyGTE", + "signature": "func CustomerKeyGTE(v string) predicate.BillingInvoice", + "line": 2344 + }, + { + "kind": "func", + "name": "CustomerKeyLT", + "signature": "func CustomerKeyLT(v string) predicate.BillingInvoice", + "line": 2349 + }, + { + "kind": "func", + "name": "CustomerKeyLTE", + "signature": "func CustomerKeyLTE(v string) predicate.BillingInvoice", + "line": 2354 + }, + { + "kind": "func", + "name": "CustomerKeyContains", + "signature": "func CustomerKeyContains(v string) predicate.BillingInvoice", + "line": 2359 + }, + { + "kind": "func", + "name": "CustomerKeyHasPrefix", + "signature": "func CustomerKeyHasPrefix(v string) predicate.BillingInvoice", + "line": 2364 + }, + { + "kind": "func", + "name": "CustomerKeyHasSuffix", + "signature": "func CustomerKeyHasSuffix(v string) predicate.BillingInvoice", + "line": 2369 + }, + { + "kind": "func", + "name": "CustomerKeyIsNil", + "signature": "func CustomerKeyIsNil() predicate.BillingInvoice", + "line": 2374 + }, + { + "kind": "func", + "name": "CustomerKeyNotNil", + "signature": "func CustomerKeyNotNil() predicate.BillingInvoice", + "line": 2379 + }, + { + "kind": "func", + "name": "CustomerKeyEqualFold", + "signature": "func CustomerKeyEqualFold(v string) predicate.BillingInvoice", + "line": 2384 + }, + { + "kind": "func", + "name": "CustomerKeyContainsFold", + "signature": "func CustomerKeyContainsFold(v string) predicate.BillingInvoice", + "line": 2389 + }, + { + "kind": "func", + "name": "CustomerNameEQ", + "signature": "func CustomerNameEQ(v string) predicate.BillingInvoice", + "line": 2394 + }, + { + "kind": "func", + "name": "CustomerNameNEQ", + "signature": "func CustomerNameNEQ(v string) predicate.BillingInvoice", + "line": 2399 + }, + { + "kind": "func", + "name": "CustomerNameIn", + "signature": "func CustomerNameIn(vs ...string) predicate.BillingInvoice", + "line": 2404 + }, + { + "kind": "func", + "name": "CustomerNameNotIn", + "signature": "func CustomerNameNotIn(vs ...string) predicate.BillingInvoice", + "line": 2409 + }, + { + "kind": "func", + "name": "CustomerNameGT", + "signature": "func CustomerNameGT(v string) predicate.BillingInvoice", + "line": 2414 + }, + { + "kind": "func", + "name": "CustomerNameGTE", + "signature": "func CustomerNameGTE(v string) predicate.BillingInvoice", + "line": 2419 + }, + { + "kind": "func", + "name": "CustomerNameLT", + "signature": "func CustomerNameLT(v string) predicate.BillingInvoice", + "line": 2424 + }, + { + "kind": "func", + "name": "CustomerNameLTE", + "signature": "func CustomerNameLTE(v string) predicate.BillingInvoice", + "line": 2429 + }, + { + "kind": "func", + "name": "CustomerNameContains", + "signature": "func CustomerNameContains(v string) predicate.BillingInvoice", + "line": 2434 + }, + { + "kind": "func", + "name": "CustomerNameHasPrefix", + "signature": "func CustomerNameHasPrefix(v string) predicate.BillingInvoice", + "line": 2439 + }, + { + "kind": "func", + "name": "CustomerNameHasSuffix", + "signature": "func CustomerNameHasSuffix(v string) predicate.BillingInvoice", + "line": 2444 + }, + { + "kind": "func", + "name": "CustomerNameEqualFold", + "signature": "func CustomerNameEqualFold(v string) predicate.BillingInvoice", + "line": 2449 + }, + { + "kind": "func", + "name": "CustomerNameContainsFold", + "signature": "func CustomerNameContainsFold(v string) predicate.BillingInvoice", + "line": 2454 + }, + { + "kind": "func", + "name": "CustomerUsageAttributionIsNil", + "signature": "func CustomerUsageAttributionIsNil() predicate.BillingInvoice", + "line": 2459 + }, + { + "kind": "func", + "name": "CustomerUsageAttributionNotNil", + "signature": "func CustomerUsageAttributionNotNil() predicate.BillingInvoice", + "line": 2464 + }, + { + "kind": "func", + "name": "NumberEQ", + "signature": "func NumberEQ(v string) predicate.BillingInvoice", + "line": 2469 + }, + { + "kind": "func", + "name": "NumberNEQ", + "signature": "func NumberNEQ(v string) predicate.BillingInvoice", + "line": 2474 + }, + { + "kind": "func", + "name": "NumberIn", + "signature": "func NumberIn(vs ...string) predicate.BillingInvoice", + "line": 2479 + }, + { + "kind": "func", + "name": "NumberNotIn", + "signature": "func NumberNotIn(vs ...string) predicate.BillingInvoice", + "line": 2484 + }, + { + "kind": "func", + "name": "NumberGT", + "signature": "func NumberGT(v string) predicate.BillingInvoice", + "line": 2489 + }, + { + "kind": "func", + "name": "NumberGTE", + "signature": "func NumberGTE(v string) predicate.BillingInvoice", + "line": 2494 + }, + { + "kind": "func", + "name": "NumberLT", + "signature": "func NumberLT(v string) predicate.BillingInvoice", + "line": 2499 + }, + { + "kind": "func", + "name": "NumberLTE", + "signature": "func NumberLTE(v string) predicate.BillingInvoice", + "line": 2504 + }, + { + "kind": "func", + "name": "NumberContains", + "signature": "func NumberContains(v string) predicate.BillingInvoice", + "line": 2509 + }, + { + "kind": "func", + "name": "NumberHasPrefix", + "signature": "func NumberHasPrefix(v string) predicate.BillingInvoice", + "line": 2514 + }, + { + "kind": "func", + "name": "NumberHasSuffix", + "signature": "func NumberHasSuffix(v string) predicate.BillingInvoice", + "line": 2519 + }, + { + "kind": "func", + "name": "NumberEqualFold", + "signature": "func NumberEqualFold(v string) predicate.BillingInvoice", + "line": 2524 + }, + { + "kind": "func", + "name": "NumberContainsFold", + "signature": "func NumberContainsFold(v string) predicate.BillingInvoice", + "line": 2529 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v billing.InvoiceType) predicate.BillingInvoice", + "line": 2534 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v billing.InvoiceType) predicate.BillingInvoice", + "line": 2540 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...billing.InvoiceType) predicate.BillingInvoice", + "line": 2546 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...billing.InvoiceType) predicate.BillingInvoice", + "line": 2555 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingInvoice", + "line": 2564 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingInvoice", + "line": 2569 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingInvoice", + "line": 2574 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingInvoice", + "line": 2579 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingInvoice", + "line": 2584 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingInvoice", + "line": 2589 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingInvoice", + "line": 2594 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingInvoice", + "line": 2599 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingInvoice", + "line": 2604 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingInvoice", + "line": 2609 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingInvoice", + "line": 2614 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingInvoice", + "line": 2619 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingInvoice", + "line": 2624 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingInvoice", + "line": 2629 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingInvoice", + "line": 2634 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.BillingInvoice", + "line": 2639 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.BillingInvoice", + "line": 2644 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.BillingInvoice", + "line": 2649 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 2654 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.BillingInvoice", + "line": 2659 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.BillingInvoice", + "line": 2664 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.BillingInvoice", + "line": 2669 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.BillingInvoice", + "line": 2674 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.BillingInvoice", + "line": 2679 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.BillingInvoice", + "line": 2684 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.BillingInvoice", + "line": 2689 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.BillingInvoice", + "line": 2694 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.BillingInvoice", + "line": 2699 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDEQ", + "signature": "func SourceBillingProfileIDEQ(v string) predicate.BillingInvoice", + "line": 2704 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDNEQ", + "signature": "func SourceBillingProfileIDNEQ(v string) predicate.BillingInvoice", + "line": 2709 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDIn", + "signature": "func SourceBillingProfileIDIn(vs ...string) predicate.BillingInvoice", + "line": 2714 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDNotIn", + "signature": "func SourceBillingProfileIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 2719 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDGT", + "signature": "func SourceBillingProfileIDGT(v string) predicate.BillingInvoice", + "line": 2724 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDGTE", + "signature": "func SourceBillingProfileIDGTE(v string) predicate.BillingInvoice", + "line": 2729 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDLT", + "signature": "func SourceBillingProfileIDLT(v string) predicate.BillingInvoice", + "line": 2734 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDLTE", + "signature": "func SourceBillingProfileIDLTE(v string) predicate.BillingInvoice", + "line": 2739 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDContains", + "signature": "func SourceBillingProfileIDContains(v string) predicate.BillingInvoice", + "line": 2744 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDHasPrefix", + "signature": "func SourceBillingProfileIDHasPrefix(v string) predicate.BillingInvoice", + "line": 2749 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDHasSuffix", + "signature": "func SourceBillingProfileIDHasSuffix(v string) predicate.BillingInvoice", + "line": 2754 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDEqualFold", + "signature": "func SourceBillingProfileIDEqualFold(v string) predicate.BillingInvoice", + "line": 2759 + }, + { + "kind": "func", + "name": "SourceBillingProfileIDContainsFold", + "signature": "func SourceBillingProfileIDContainsFold(v string) predicate.BillingInvoice", + "line": 2764 + }, + { + "kind": "func", + "name": "VoidedAtEQ", + "signature": "func VoidedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 2769 + }, + { + "kind": "func", + "name": "VoidedAtNEQ", + "signature": "func VoidedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 2774 + }, + { + "kind": "func", + "name": "VoidedAtIn", + "signature": "func VoidedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2779 + }, + { + "kind": "func", + "name": "VoidedAtNotIn", + "signature": "func VoidedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2784 + }, + { + "kind": "func", + "name": "VoidedAtGT", + "signature": "func VoidedAtGT(v time.Time) predicate.BillingInvoice", + "line": 2789 + }, + { + "kind": "func", + "name": "VoidedAtGTE", + "signature": "func VoidedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 2794 + }, + { + "kind": "func", + "name": "VoidedAtLT", + "signature": "func VoidedAtLT(v time.Time) predicate.BillingInvoice", + "line": 2799 + }, + { + "kind": "func", + "name": "VoidedAtLTE", + "signature": "func VoidedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 2804 + }, + { + "kind": "func", + "name": "VoidedAtIsNil", + "signature": "func VoidedAtIsNil() predicate.BillingInvoice", + "line": 2809 + }, + { + "kind": "func", + "name": "VoidedAtNotNil", + "signature": "func VoidedAtNotNil() predicate.BillingInvoice", + "line": 2814 + }, + { + "kind": "func", + "name": "IssuedAtEQ", + "signature": "func IssuedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 2819 + }, + { + "kind": "func", + "name": "IssuedAtNEQ", + "signature": "func IssuedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 2824 + }, + { + "kind": "func", + "name": "IssuedAtIn", + "signature": "func IssuedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2829 + }, + { + "kind": "func", + "name": "IssuedAtNotIn", + "signature": "func IssuedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2834 + }, + { + "kind": "func", + "name": "IssuedAtGT", + "signature": "func IssuedAtGT(v time.Time) predicate.BillingInvoice", + "line": 2839 + }, + { + "kind": "func", + "name": "IssuedAtGTE", + "signature": "func IssuedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 2844 + }, + { + "kind": "func", + "name": "IssuedAtLT", + "signature": "func IssuedAtLT(v time.Time) predicate.BillingInvoice", + "line": 2849 + }, + { + "kind": "func", + "name": "IssuedAtLTE", + "signature": "func IssuedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 2854 + }, + { + "kind": "func", + "name": "IssuedAtIsNil", + "signature": "func IssuedAtIsNil() predicate.BillingInvoice", + "line": 2859 + }, + { + "kind": "func", + "name": "IssuedAtNotNil", + "signature": "func IssuedAtNotNil() predicate.BillingInvoice", + "line": 2864 + }, + { + "kind": "func", + "name": "SentToCustomerAtEQ", + "signature": "func SentToCustomerAtEQ(v time.Time) predicate.BillingInvoice", + "line": 2869 + }, + { + "kind": "func", + "name": "SentToCustomerAtNEQ", + "signature": "func SentToCustomerAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 2874 + }, + { + "kind": "func", + "name": "SentToCustomerAtIn", + "signature": "func SentToCustomerAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2879 + }, + { + "kind": "func", + "name": "SentToCustomerAtNotIn", + "signature": "func SentToCustomerAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2884 + }, + { + "kind": "func", + "name": "SentToCustomerAtGT", + "signature": "func SentToCustomerAtGT(v time.Time) predicate.BillingInvoice", + "line": 2889 + }, + { + "kind": "func", + "name": "SentToCustomerAtGTE", + "signature": "func SentToCustomerAtGTE(v time.Time) predicate.BillingInvoice", + "line": 2894 + }, + { + "kind": "func", + "name": "SentToCustomerAtLT", + "signature": "func SentToCustomerAtLT(v time.Time) predicate.BillingInvoice", + "line": 2899 + }, + { + "kind": "func", + "name": "SentToCustomerAtLTE", + "signature": "func SentToCustomerAtLTE(v time.Time) predicate.BillingInvoice", + "line": 2904 + }, + { + "kind": "func", + "name": "SentToCustomerAtIsNil", + "signature": "func SentToCustomerAtIsNil() predicate.BillingInvoice", + "line": 2909 + }, + { + "kind": "func", + "name": "SentToCustomerAtNotNil", + "signature": "func SentToCustomerAtNotNil() predicate.BillingInvoice", + "line": 2914 + }, + { + "kind": "func", + "name": "DraftUntilEQ", + "signature": "func DraftUntilEQ(v time.Time) predicate.BillingInvoice", + "line": 2919 + }, + { + "kind": "func", + "name": "DraftUntilNEQ", + "signature": "func DraftUntilNEQ(v time.Time) predicate.BillingInvoice", + "line": 2924 + }, + { + "kind": "func", + "name": "DraftUntilIn", + "signature": "func DraftUntilIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2929 + }, + { + "kind": "func", + "name": "DraftUntilNotIn", + "signature": "func DraftUntilNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2934 + }, + { + "kind": "func", + "name": "DraftUntilGT", + "signature": "func DraftUntilGT(v time.Time) predicate.BillingInvoice", + "line": 2939 + }, + { + "kind": "func", + "name": "DraftUntilGTE", + "signature": "func DraftUntilGTE(v time.Time) predicate.BillingInvoice", + "line": 2944 + }, + { + "kind": "func", + "name": "DraftUntilLT", + "signature": "func DraftUntilLT(v time.Time) predicate.BillingInvoice", + "line": 2949 + }, + { + "kind": "func", + "name": "DraftUntilLTE", + "signature": "func DraftUntilLTE(v time.Time) predicate.BillingInvoice", + "line": 2954 + }, + { + "kind": "func", + "name": "DraftUntilIsNil", + "signature": "func DraftUntilIsNil() predicate.BillingInvoice", + "line": 2959 + }, + { + "kind": "func", + "name": "DraftUntilNotNil", + "signature": "func DraftUntilNotNil() predicate.BillingInvoice", + "line": 2964 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtEQ", + "signature": "func QuantitySnapshotedAtEQ(v time.Time) predicate.BillingInvoice", + "line": 2969 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtNEQ", + "signature": "func QuantitySnapshotedAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 2974 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtIn", + "signature": "func QuantitySnapshotedAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2979 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtNotIn", + "signature": "func QuantitySnapshotedAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 2984 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtGT", + "signature": "func QuantitySnapshotedAtGT(v time.Time) predicate.BillingInvoice", + "line": 2989 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtGTE", + "signature": "func QuantitySnapshotedAtGTE(v time.Time) predicate.BillingInvoice", + "line": 2994 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtLT", + "signature": "func QuantitySnapshotedAtLT(v time.Time) predicate.BillingInvoice", + "line": 2999 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtLTE", + "signature": "func QuantitySnapshotedAtLTE(v time.Time) predicate.BillingInvoice", + "line": 3004 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtIsNil", + "signature": "func QuantitySnapshotedAtIsNil() predicate.BillingInvoice", + "line": 3009 + }, + { + "kind": "func", + "name": "QuantitySnapshotedAtNotNil", + "signature": "func QuantitySnapshotedAtNotNil() predicate.BillingInvoice", + "line": 3014 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.BillingInvoice", + "line": 3019 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.BillingInvoice", + "line": 3025 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.BillingInvoice", + "line": 3031 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.BillingInvoice", + "line": 3040 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.BillingInvoice", + "line": 3049 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.BillingInvoice", + "line": 3055 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.BillingInvoice", + "line": 3061 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.BillingInvoice", + "line": 3067 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.BillingInvoice", + "line": 3073 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.BillingInvoice", + "line": 3079 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.BillingInvoice", + "line": 3085 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.BillingInvoice", + "line": 3091 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.BillingInvoice", + "line": 3097 + }, + { + "kind": "func", + "name": "DueAtEQ", + "signature": "func DueAtEQ(v time.Time) predicate.BillingInvoice", + "line": 3103 + }, + { + "kind": "func", + "name": "DueAtNEQ", + "signature": "func DueAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 3108 + }, + { + "kind": "func", + "name": "DueAtIn", + "signature": "func DueAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3113 + }, + { + "kind": "func", + "name": "DueAtNotIn", + "signature": "func DueAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3118 + }, + { + "kind": "func", + "name": "DueAtGT", + "signature": "func DueAtGT(v time.Time) predicate.BillingInvoice", + "line": 3123 + }, + { + "kind": "func", + "name": "DueAtGTE", + "signature": "func DueAtGTE(v time.Time) predicate.BillingInvoice", + "line": 3128 + }, + { + "kind": "func", + "name": "DueAtLT", + "signature": "func DueAtLT(v time.Time) predicate.BillingInvoice", + "line": 3133 + }, + { + "kind": "func", + "name": "DueAtLTE", + "signature": "func DueAtLTE(v time.Time) predicate.BillingInvoice", + "line": 3138 + }, + { + "kind": "func", + "name": "DueAtIsNil", + "signature": "func DueAtIsNil() predicate.BillingInvoice", + "line": 3143 + }, + { + "kind": "func", + "name": "DueAtNotNil", + "signature": "func DueAtNotNil() predicate.BillingInvoice", + "line": 3148 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v billing.StandardInvoiceStatus) predicate.BillingInvoice", + "line": 3153 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v billing.StandardInvoiceStatus) predicate.BillingInvoice", + "line": 3159 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...billing.StandardInvoiceStatus) predicate.BillingInvoice", + "line": 3165 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...billing.StandardInvoiceStatus) predicate.BillingInvoice", + "line": 3174 + }, + { + "kind": "func", + "name": "StatusDetailsCacheIsNil", + "signature": "func StatusDetailsCacheIsNil() predicate.BillingInvoice", + "line": 3183 + }, + { + "kind": "func", + "name": "StatusDetailsCacheNotNil", + "signature": "func StatusDetailsCacheNotNil() predicate.BillingInvoice", + "line": 3188 + }, + { + "kind": "func", + "name": "WorkflowConfigIDEQ", + "signature": "func WorkflowConfigIDEQ(v string) predicate.BillingInvoice", + "line": 3193 + }, + { + "kind": "func", + "name": "WorkflowConfigIDNEQ", + "signature": "func WorkflowConfigIDNEQ(v string) predicate.BillingInvoice", + "line": 3198 + }, + { + "kind": "func", + "name": "WorkflowConfigIDIn", + "signature": "func WorkflowConfigIDIn(vs ...string) predicate.BillingInvoice", + "line": 3203 + }, + { + "kind": "func", + "name": "WorkflowConfigIDNotIn", + "signature": "func WorkflowConfigIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 3208 + }, + { + "kind": "func", + "name": "WorkflowConfigIDGT", + "signature": "func WorkflowConfigIDGT(v string) predicate.BillingInvoice", + "line": 3213 + }, + { + "kind": "func", + "name": "WorkflowConfigIDGTE", + "signature": "func WorkflowConfigIDGTE(v string) predicate.BillingInvoice", + "line": 3218 + }, + { + "kind": "func", + "name": "WorkflowConfigIDLT", + "signature": "func WorkflowConfigIDLT(v string) predicate.BillingInvoice", + "line": 3223 + }, + { + "kind": "func", + "name": "WorkflowConfigIDLTE", + "signature": "func WorkflowConfigIDLTE(v string) predicate.BillingInvoice", + "line": 3228 + }, + { + "kind": "func", + "name": "WorkflowConfigIDContains", + "signature": "func WorkflowConfigIDContains(v string) predicate.BillingInvoice", + "line": 3233 + }, + { + "kind": "func", + "name": "WorkflowConfigIDHasPrefix", + "signature": "func WorkflowConfigIDHasPrefix(v string) predicate.BillingInvoice", + "line": 3238 + }, + { + "kind": "func", + "name": "WorkflowConfigIDHasSuffix", + "signature": "func WorkflowConfigIDHasSuffix(v string) predicate.BillingInvoice", + "line": 3243 + }, + { + "kind": "func", + "name": "WorkflowConfigIDEqualFold", + "signature": "func WorkflowConfigIDEqualFold(v string) predicate.BillingInvoice", + "line": 3248 + }, + { + "kind": "func", + "name": "WorkflowConfigIDContainsFold", + "signature": "func WorkflowConfigIDContainsFold(v string) predicate.BillingInvoice", + "line": 3253 + }, + { + "kind": "func", + "name": "TaxAppIDEQ", + "signature": "func TaxAppIDEQ(v string) predicate.BillingInvoice", + "line": 3258 + }, + { + "kind": "func", + "name": "TaxAppIDNEQ", + "signature": "func TaxAppIDNEQ(v string) predicate.BillingInvoice", + "line": 3263 + }, + { + "kind": "func", + "name": "TaxAppIDIn", + "signature": "func TaxAppIDIn(vs ...string) predicate.BillingInvoice", + "line": 3268 + }, + { + "kind": "func", + "name": "TaxAppIDNotIn", + "signature": "func TaxAppIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 3273 + }, + { + "kind": "func", + "name": "TaxAppIDGT", + "signature": "func TaxAppIDGT(v string) predicate.BillingInvoice", + "line": 3278 + }, + { + "kind": "func", + "name": "TaxAppIDGTE", + "signature": "func TaxAppIDGTE(v string) predicate.BillingInvoice", + "line": 3283 + }, + { + "kind": "func", + "name": "TaxAppIDLT", + "signature": "func TaxAppIDLT(v string) predicate.BillingInvoice", + "line": 3288 + }, + { + "kind": "func", + "name": "TaxAppIDLTE", + "signature": "func TaxAppIDLTE(v string) predicate.BillingInvoice", + "line": 3293 + }, + { + "kind": "func", + "name": "TaxAppIDContains", + "signature": "func TaxAppIDContains(v string) predicate.BillingInvoice", + "line": 3298 + }, + { + "kind": "func", + "name": "TaxAppIDHasPrefix", + "signature": "func TaxAppIDHasPrefix(v string) predicate.BillingInvoice", + "line": 3303 + }, + { + "kind": "func", + "name": "TaxAppIDHasSuffix", + "signature": "func TaxAppIDHasSuffix(v string) predicate.BillingInvoice", + "line": 3308 + }, + { + "kind": "func", + "name": "TaxAppIDEqualFold", + "signature": "func TaxAppIDEqualFold(v string) predicate.BillingInvoice", + "line": 3313 + }, + { + "kind": "func", + "name": "TaxAppIDContainsFold", + "signature": "func TaxAppIDContainsFold(v string) predicate.BillingInvoice", + "line": 3318 + }, + { + "kind": "func", + "name": "InvoicingAppIDEQ", + "signature": "func InvoicingAppIDEQ(v string) predicate.BillingInvoice", + "line": 3323 + }, + { + "kind": "func", + "name": "InvoicingAppIDNEQ", + "signature": "func InvoicingAppIDNEQ(v string) predicate.BillingInvoice", + "line": 3328 + }, + { + "kind": "func", + "name": "InvoicingAppIDIn", + "signature": "func InvoicingAppIDIn(vs ...string) predicate.BillingInvoice", + "line": 3333 + }, + { + "kind": "func", + "name": "InvoicingAppIDNotIn", + "signature": "func InvoicingAppIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 3338 + }, + { + "kind": "func", + "name": "InvoicingAppIDGT", + "signature": "func InvoicingAppIDGT(v string) predicate.BillingInvoice", + "line": 3343 + }, + { + "kind": "func", + "name": "InvoicingAppIDGTE", + "signature": "func InvoicingAppIDGTE(v string) predicate.BillingInvoice", + "line": 3348 + }, + { + "kind": "func", + "name": "InvoicingAppIDLT", + "signature": "func InvoicingAppIDLT(v string) predicate.BillingInvoice", + "line": 3353 + }, + { + "kind": "func", + "name": "InvoicingAppIDLTE", + "signature": "func InvoicingAppIDLTE(v string) predicate.BillingInvoice", + "line": 3358 + }, + { + "kind": "func", + "name": "InvoicingAppIDContains", + "signature": "func InvoicingAppIDContains(v string) predicate.BillingInvoice", + "line": 3363 + }, + { + "kind": "func", + "name": "InvoicingAppIDHasPrefix", + "signature": "func InvoicingAppIDHasPrefix(v string) predicate.BillingInvoice", + "line": 3368 + }, + { + "kind": "func", + "name": "InvoicingAppIDHasSuffix", + "signature": "func InvoicingAppIDHasSuffix(v string) predicate.BillingInvoice", + "line": 3373 + }, + { + "kind": "func", + "name": "InvoicingAppIDEqualFold", + "signature": "func InvoicingAppIDEqualFold(v string) predicate.BillingInvoice", + "line": 3378 + }, + { + "kind": "func", + "name": "InvoicingAppIDContainsFold", + "signature": "func InvoicingAppIDContainsFold(v string) predicate.BillingInvoice", + "line": 3383 + }, + { + "kind": "func", + "name": "PaymentAppIDEQ", + "signature": "func PaymentAppIDEQ(v string) predicate.BillingInvoice", + "line": 3388 + }, + { + "kind": "func", + "name": "PaymentAppIDNEQ", + "signature": "func PaymentAppIDNEQ(v string) predicate.BillingInvoice", + "line": 3393 + }, + { + "kind": "func", + "name": "PaymentAppIDIn", + "signature": "func PaymentAppIDIn(vs ...string) predicate.BillingInvoice", + "line": 3398 + }, + { + "kind": "func", + "name": "PaymentAppIDNotIn", + "signature": "func PaymentAppIDNotIn(vs ...string) predicate.BillingInvoice", + "line": 3403 + }, + { + "kind": "func", + "name": "PaymentAppIDGT", + "signature": "func PaymentAppIDGT(v string) predicate.BillingInvoice", + "line": 3408 + }, + { + "kind": "func", + "name": "PaymentAppIDGTE", + "signature": "func PaymentAppIDGTE(v string) predicate.BillingInvoice", + "line": 3413 + }, + { + "kind": "func", + "name": "PaymentAppIDLT", + "signature": "func PaymentAppIDLT(v string) predicate.BillingInvoice", + "line": 3418 + }, + { + "kind": "func", + "name": "PaymentAppIDLTE", + "signature": "func PaymentAppIDLTE(v string) predicate.BillingInvoice", + "line": 3423 + }, + { + "kind": "func", + "name": "PaymentAppIDContains", + "signature": "func PaymentAppIDContains(v string) predicate.BillingInvoice", + "line": 3428 + }, + { + "kind": "func", + "name": "PaymentAppIDHasPrefix", + "signature": "func PaymentAppIDHasPrefix(v string) predicate.BillingInvoice", + "line": 3433 + }, + { + "kind": "func", + "name": "PaymentAppIDHasSuffix", + "signature": "func PaymentAppIDHasSuffix(v string) predicate.BillingInvoice", + "line": 3438 + }, + { + "kind": "func", + "name": "PaymentAppIDEqualFold", + "signature": "func PaymentAppIDEqualFold(v string) predicate.BillingInvoice", + "line": 3443 + }, + { + "kind": "func", + "name": "PaymentAppIDContainsFold", + "signature": "func PaymentAppIDContainsFold(v string) predicate.BillingInvoice", + "line": 3448 + }, + { + "kind": "func", + "name": "PeriodStartEQ", + "signature": "func PeriodStartEQ(v time.Time) predicate.BillingInvoice", + "line": 3453 + }, + { + "kind": "func", + "name": "PeriodStartNEQ", + "signature": "func PeriodStartNEQ(v time.Time) predicate.BillingInvoice", + "line": 3458 + }, + { + "kind": "func", + "name": "PeriodStartIn", + "signature": "func PeriodStartIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3463 + }, + { + "kind": "func", + "name": "PeriodStartNotIn", + "signature": "func PeriodStartNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3468 + }, + { + "kind": "func", + "name": "PeriodStartGT", + "signature": "func PeriodStartGT(v time.Time) predicate.BillingInvoice", + "line": 3473 + }, + { + "kind": "func", + "name": "PeriodStartGTE", + "signature": "func PeriodStartGTE(v time.Time) predicate.BillingInvoice", + "line": 3478 + }, + { + "kind": "func", + "name": "PeriodStartLT", + "signature": "func PeriodStartLT(v time.Time) predicate.BillingInvoice", + "line": 3483 + }, + { + "kind": "func", + "name": "PeriodStartLTE", + "signature": "func PeriodStartLTE(v time.Time) predicate.BillingInvoice", + "line": 3488 + }, + { + "kind": "func", + "name": "PeriodStartIsNil", + "signature": "func PeriodStartIsNil() predicate.BillingInvoice", + "line": 3493 + }, + { + "kind": "func", + "name": "PeriodStartNotNil", + "signature": "func PeriodStartNotNil() predicate.BillingInvoice", + "line": 3498 + }, + { + "kind": "func", + "name": "PeriodEndEQ", + "signature": "func PeriodEndEQ(v time.Time) predicate.BillingInvoice", + "line": 3503 + }, + { + "kind": "func", + "name": "PeriodEndNEQ", + "signature": "func PeriodEndNEQ(v time.Time) predicate.BillingInvoice", + "line": 3508 + }, + { + "kind": "func", + "name": "PeriodEndIn", + "signature": "func PeriodEndIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3513 + }, + { + "kind": "func", + "name": "PeriodEndNotIn", + "signature": "func PeriodEndNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3518 + }, + { + "kind": "func", + "name": "PeriodEndGT", + "signature": "func PeriodEndGT(v time.Time) predicate.BillingInvoice", + "line": 3523 + }, + { + "kind": "func", + "name": "PeriodEndGTE", + "signature": "func PeriodEndGTE(v time.Time) predicate.BillingInvoice", + "line": 3528 + }, + { + "kind": "func", + "name": "PeriodEndLT", + "signature": "func PeriodEndLT(v time.Time) predicate.BillingInvoice", + "line": 3533 + }, + { + "kind": "func", + "name": "PeriodEndLTE", + "signature": "func PeriodEndLTE(v time.Time) predicate.BillingInvoice", + "line": 3538 + }, + { + "kind": "func", + "name": "PeriodEndIsNil", + "signature": "func PeriodEndIsNil() predicate.BillingInvoice", + "line": 3543 + }, + { + "kind": "func", + "name": "PeriodEndNotNil", + "signature": "func PeriodEndNotNil() predicate.BillingInvoice", + "line": 3548 + }, + { + "kind": "func", + "name": "CollectionAtEQ", + "signature": "func CollectionAtEQ(v time.Time) predicate.BillingInvoice", + "line": 3553 + }, + { + "kind": "func", + "name": "CollectionAtNEQ", + "signature": "func CollectionAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 3558 + }, + { + "kind": "func", + "name": "CollectionAtIn", + "signature": "func CollectionAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3563 + }, + { + "kind": "func", + "name": "CollectionAtNotIn", + "signature": "func CollectionAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3568 + }, + { + "kind": "func", + "name": "CollectionAtGT", + "signature": "func CollectionAtGT(v time.Time) predicate.BillingInvoice", + "line": 3573 + }, + { + "kind": "func", + "name": "CollectionAtGTE", + "signature": "func CollectionAtGTE(v time.Time) predicate.BillingInvoice", + "line": 3578 + }, + { + "kind": "func", + "name": "CollectionAtLT", + "signature": "func CollectionAtLT(v time.Time) predicate.BillingInvoice", + "line": 3583 + }, + { + "kind": "func", + "name": "CollectionAtLTE", + "signature": "func CollectionAtLTE(v time.Time) predicate.BillingInvoice", + "line": 3588 + }, + { + "kind": "func", + "name": "CollectionAtIsNil", + "signature": "func CollectionAtIsNil() predicate.BillingInvoice", + "line": 3593 + }, + { + "kind": "func", + "name": "CollectionAtNotNil", + "signature": "func CollectionAtNotNil() predicate.BillingInvoice", + "line": 3598 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtEQ", + "signature": "func PaymentProcessingEnteredAtEQ(v time.Time) predicate.BillingInvoice", + "line": 3603 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtNEQ", + "signature": "func PaymentProcessingEnteredAtNEQ(v time.Time) predicate.BillingInvoice", + "line": 3608 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtIn", + "signature": "func PaymentProcessingEnteredAtIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3613 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtNotIn", + "signature": "func PaymentProcessingEnteredAtNotIn(vs ...time.Time) predicate.BillingInvoice", + "line": 3618 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtGT", + "signature": "func PaymentProcessingEnteredAtGT(v time.Time) predicate.BillingInvoice", + "line": 3623 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtGTE", + "signature": "func PaymentProcessingEnteredAtGTE(v time.Time) predicate.BillingInvoice", + "line": 3628 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtLT", + "signature": "func PaymentProcessingEnteredAtLT(v time.Time) predicate.BillingInvoice", + "line": 3633 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtLTE", + "signature": "func PaymentProcessingEnteredAtLTE(v time.Time) predicate.BillingInvoice", + "line": 3638 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtIsNil", + "signature": "func PaymentProcessingEnteredAtIsNil() predicate.BillingInvoice", + "line": 3643 + }, + { + "kind": "func", + "name": "PaymentProcessingEnteredAtNotNil", + "signature": "func PaymentProcessingEnteredAtNotNil() predicate.BillingInvoice", + "line": 3648 + }, + { + "kind": "func", + "name": "SchemaLevelEQ", + "signature": "func SchemaLevelEQ(v int) predicate.BillingInvoice", + "line": 3653 + }, + { + "kind": "func", + "name": "SchemaLevelNEQ", + "signature": "func SchemaLevelNEQ(v int) predicate.BillingInvoice", + "line": 3658 + }, + { + "kind": "func", + "name": "SchemaLevelIn", + "signature": "func SchemaLevelIn(vs ...int) predicate.BillingInvoice", + "line": 3663 + }, + { + "kind": "func", + "name": "SchemaLevelNotIn", + "signature": "func SchemaLevelNotIn(vs ...int) predicate.BillingInvoice", + "line": 3668 + }, + { + "kind": "func", + "name": "SchemaLevelGT", + "signature": "func SchemaLevelGT(v int) predicate.BillingInvoice", + "line": 3673 + }, + { + "kind": "func", + "name": "SchemaLevelGTE", + "signature": "func SchemaLevelGTE(v int) predicate.BillingInvoice", + "line": 3678 + }, + { + "kind": "func", + "name": "SchemaLevelLT", + "signature": "func SchemaLevelLT(v int) predicate.BillingInvoice", + "line": 3683 + }, + { + "kind": "func", + "name": "SchemaLevelLTE", + "signature": "func SchemaLevelLTE(v int) predicate.BillingInvoice", + "line": 3688 + }, + { + "kind": "func", + "name": "HasSourceBillingProfile", + "signature": "func HasSourceBillingProfile() predicate.BillingInvoice", + "line": 3693 + }, + { + "kind": "func", + "name": "HasSourceBillingProfileWith", + "signature": "func HasSourceBillingProfileWith(preds ...predicate.BillingProfile) predicate.BillingInvoice", + "line": 3704 + }, + { + "kind": "func", + "name": "HasBillingWorkflowConfig", + "signature": "func HasBillingWorkflowConfig() predicate.BillingInvoice", + "line": 3716 + }, + { + "kind": "func", + "name": "HasBillingWorkflowConfigWith", + "signature": "func HasBillingWorkflowConfigWith(preds ...predicate.BillingWorkflowConfig) predicate.BillingInvoice", + "line": 3727 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLines", + "signature": "func HasBillingInvoiceLines() predicate.BillingInvoice", + "line": 3739 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLinesWith", + "signature": "func HasBillingInvoiceLinesWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoice", + "line": 3750 + }, + { + "kind": "func", + "name": "HasBillingInvoiceDetailedLines", + "signature": "func HasBillingInvoiceDetailedLines() predicate.BillingInvoice", + "line": 3762 + }, + { + "kind": "func", + "name": "HasBillingInvoiceDetailedLinesWith", + "signature": "func HasBillingInvoiceDetailedLinesWith(preds ...predicate.BillingStandardInvoiceDetailedLine) predicate.BillingInvoice", + "line": 3773 + }, + { + "kind": "func", + "name": "HasBillingInvoiceValidationIssues", + "signature": "func HasBillingInvoiceValidationIssues() predicate.BillingInvoice", + "line": 3785 + }, + { + "kind": "func", + "name": "HasBillingInvoiceValidationIssuesWith", + "signature": "func HasBillingInvoiceValidationIssuesWith(preds ...predicate.BillingInvoiceValidationIssue) predicate.BillingInvoice", + "line": 3796 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRuns", + "signature": "func HasChargeFlatFeeRuns() predicate.BillingInvoice", + "line": 3808 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunsWith", + "signature": "func HasChargeFlatFeeRunsWith(preds ...predicate.ChargeFlatFeeRun) predicate.BillingInvoice", + "line": 3819 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRuns", + "signature": "func HasChargeUsageBasedRuns() predicate.BillingInvoice", + "line": 3831 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRunsWith", + "signature": "func HasChargeUsageBasedRunsWith(preds ...predicate.ChargeUsageBasedRuns) predicate.BillingInvoice", + "line": 3842 + }, + { + "kind": "func", + "name": "HasBillingInvoiceCustomer", + "signature": "func HasBillingInvoiceCustomer() predicate.BillingInvoice", + "line": 3854 + }, + { + "kind": "func", + "name": "HasBillingInvoiceCustomerWith", + "signature": "func HasBillingInvoiceCustomerWith(preds ...predicate.Customer) predicate.BillingInvoice", + "line": 3865 + }, + { + "kind": "func", + "name": "HasTaxApp", + "signature": "func HasTaxApp() predicate.BillingInvoice", + "line": 3877 + }, + { + "kind": "func", + "name": "HasTaxAppWith", + "signature": "func HasTaxAppWith(preds ...predicate.App) predicate.BillingInvoice", + "line": 3888 + }, + { + "kind": "func", + "name": "HasInvoicingApp", + "signature": "func HasInvoicingApp() predicate.BillingInvoice", + "line": 3900 + }, + { + "kind": "func", + "name": "HasInvoicingAppWith", + "signature": "func HasInvoicingAppWith(preds ...predicate.App) predicate.BillingInvoice", + "line": 3911 + }, + { + "kind": "func", + "name": "HasPaymentApp", + "signature": "func HasPaymentApp() predicate.BillingInvoice", + "line": 3923 + }, + { + "kind": "func", + "name": "HasPaymentAppWith", + "signature": "func HasPaymentAppWith(preds ...predicate.App) predicate.BillingInvoice", + "line": 3934 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoice) predicate.BillingInvoice", + "line": 3946 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoice) predicate.BillingInvoice", + "line": 3951 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoice) predicate.BillingInvoice", + "line": 3956 + } + ], + "line_count": 3958 + }, + "openmeter/ent/db/billinginvoice_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceCreate", + "signature": "type BillingInvoiceCreate struct", + "line": 32 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceCreate) SetNamespace(v string) *BillingInvoiceCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *BillingInvoiceCreate) SetMetadata(v map[string]string) *BillingInvoiceCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceCreate) SetCreatedAt(v time.Time) *BillingInvoiceCreate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceCreate) SetUpdatedAt(v time.Time) *BillingInvoiceCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceCreate) SetDeletedAt(v time.Time) *BillingInvoiceCreate", + "line": 80 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingInvoiceCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressPostalCode(v string) *BillingInvoiceCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressPostalCode(v *string) *BillingInvoiceCreate", + "line": 114 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressState(v string) *BillingInvoiceCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressState(v *string) *BillingInvoiceCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressCity(v string) *BillingInvoiceCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressCity(v *string) *BillingInvoiceCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressLine1(v string) *BillingInvoiceCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressLine1(v *string) *BillingInvoiceCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressLine2(v string) *BillingInvoiceCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressLine2(v *string) *BillingInvoiceCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierAddressPhoneNumber(v *string) *BillingInvoiceCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCountry", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressCountry(v *models.CountryCode) *BillingInvoiceCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressPostalCode(v string) *BillingInvoiceCreate", + "line": 206 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPostalCode", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressPostalCode(v *string) *BillingInvoiceCreate", + "line": 212 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressState(v string) *BillingInvoiceCreate", + "line": 220 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressState", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressState(v *string) *BillingInvoiceCreate", + "line": 226 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressCity(v string) *BillingInvoiceCreate", + "line": 234 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCity", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressCity(v *string) *BillingInvoiceCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressLine1(v string) *BillingInvoiceCreate", + "line": 248 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine1", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressLine1(v *string) *BillingInvoiceCreate", + "line": 254 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressLine2(v string) *BillingInvoiceCreate", + "line": 262 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine2", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressLine2(v *string) *BillingInvoiceCreate", + "line": 268 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceCreate", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPhoneNumber", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerAddressPhoneNumber(v *string) *BillingInvoiceCreate", + "line": 282 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *BillingInvoiceCreate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 290 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *BillingInvoiceCreate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 296 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *BillingInvoiceCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 302 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *BillingInvoiceCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 308 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *BillingInvoiceCreate) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 314 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *BillingInvoiceCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 320 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *BillingInvoiceCreate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 326 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *BillingInvoiceCreate) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceCreate", + "line": 332 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetInvoicingAppExternalID(v string) *BillingInvoiceCreate", + "line": 338 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceCreate", + "line": 344 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetPaymentAppExternalID(v string) *BillingInvoiceCreate", + "line": 352 + }, + { + "kind": "func", + "name": "SetNillablePaymentAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetNillablePaymentAppExternalID(v *string) *BillingInvoiceCreate", + "line": 358 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetTaxAppExternalID(v string) *BillingInvoiceCreate", + "line": 366 + }, + { + "kind": "func", + "name": "SetNillableTaxAppExternalID", + "signature": "func (_c *BillingInvoiceCreate) SetNillableTaxAppExternalID(v *string) *BillingInvoiceCreate", + "line": 372 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierName(v string) *BillingInvoiceCreate", + "line": 380 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_c *BillingInvoiceCreate) SetSupplierTaxCode(v string) *BillingInvoiceCreate", + "line": 386 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSupplierTaxCode(v *string) *BillingInvoiceCreate", + "line": 392 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerKey(v string) *BillingInvoiceCreate", + "line": 400 + }, + { + "kind": "func", + "name": "SetNillableCustomerKey", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCustomerKey(v *string) *BillingInvoiceCreate", + "line": 406 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerName(v string) *BillingInvoiceCreate", + "line": 414 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceCreate", + "line": 420 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (_c *BillingInvoiceCreate) SetNumber(v string) *BillingInvoiceCreate", + "line": 426 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *BillingInvoiceCreate) SetType(v billing.InvoiceType) *BillingInvoiceCreate", + "line": 432 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingInvoiceCreate) SetDescription(v string) *BillingInvoiceCreate", + "line": 438 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingInvoiceCreate) SetNillableDescription(v *string) *BillingInvoiceCreate", + "line": 444 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *BillingInvoiceCreate) SetCustomerID(v string) *BillingInvoiceCreate", + "line": 452 + }, + { + "kind": "func", + "name": "SetSourceBillingProfileID", + "signature": "func (_c *BillingInvoiceCreate) SetSourceBillingProfileID(v string) *BillingInvoiceCreate", + "line": 458 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_c *BillingInvoiceCreate) SetVoidedAt(v time.Time) *BillingInvoiceCreate", + "line": 464 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableVoidedAt(v *time.Time) *BillingInvoiceCreate", + "line": 470 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (_c *BillingInvoiceCreate) SetIssuedAt(v time.Time) *BillingInvoiceCreate", + "line": 478 + }, + { + "kind": "func", + "name": "SetNillableIssuedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableIssuedAt(v *time.Time) *BillingInvoiceCreate", + "line": 484 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (_c *BillingInvoiceCreate) SetSentToCustomerAt(v time.Time) *BillingInvoiceCreate", + "line": 492 + }, + { + "kind": "func", + "name": "SetNillableSentToCustomerAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSentToCustomerAt(v *time.Time) *BillingInvoiceCreate", + "line": 498 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (_c *BillingInvoiceCreate) SetDraftUntil(v time.Time) *BillingInvoiceCreate", + "line": 506 + }, + { + "kind": "func", + "name": "SetNillableDraftUntil", + "signature": "func (_c *BillingInvoiceCreate) SetNillableDraftUntil(v *time.Time) *BillingInvoiceCreate", + "line": 512 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (_c *BillingInvoiceCreate) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceCreate", + "line": 520 + }, + { + "kind": "func", + "name": "SetNillableQuantitySnapshotedAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableQuantitySnapshotedAt(v *time.Time) *BillingInvoiceCreate", + "line": 526 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *BillingInvoiceCreate) SetCurrency(v currencyx.Code) *BillingInvoiceCreate", + "line": 534 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (_c *BillingInvoiceCreate) SetDueAt(v time.Time) *BillingInvoiceCreate", + "line": 540 + }, + { + "kind": "func", + "name": "SetNillableDueAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableDueAt(v *time.Time) *BillingInvoiceCreate", + "line": 546 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *BillingInvoiceCreate) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceCreate", + "line": 554 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (_c *BillingInvoiceCreate) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceCreate", + "line": 560 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailsCache", + "signature": "func (_c *BillingInvoiceCreate) SetNillableStatusDetailsCache(v *billing.StandardInvoiceStatusDetails) *BillingInvoiceCreate", + "line": 566 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_c *BillingInvoiceCreate) SetWorkflowConfigID(v string) *BillingInvoiceCreate", + "line": 574 + }, + { + "kind": "func", + "name": "SetTaxAppID", + "signature": "func (_c *BillingInvoiceCreate) SetTaxAppID(v string) *BillingInvoiceCreate", + "line": 580 + }, + { + "kind": "func", + "name": "SetInvoicingAppID", + "signature": "func (_c *BillingInvoiceCreate) SetInvoicingAppID(v string) *BillingInvoiceCreate", + "line": 586 + }, + { + "kind": "func", + "name": "SetPaymentAppID", + "signature": "func (_c *BillingInvoiceCreate) SetPaymentAppID(v string) *BillingInvoiceCreate", + "line": 592 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_c *BillingInvoiceCreate) SetPeriodStart(v time.Time) *BillingInvoiceCreate", + "line": 598 + }, + { + "kind": "func", + "name": "SetNillablePeriodStart", + "signature": "func (_c *BillingInvoiceCreate) SetNillablePeriodStart(v *time.Time) *BillingInvoiceCreate", + "line": 604 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_c *BillingInvoiceCreate) SetPeriodEnd(v time.Time) *BillingInvoiceCreate", + "line": 612 + }, + { + "kind": "func", + "name": "SetNillablePeriodEnd", + "signature": "func (_c *BillingInvoiceCreate) SetNillablePeriodEnd(v *time.Time) *BillingInvoiceCreate", + "line": 618 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (_c *BillingInvoiceCreate) SetCollectionAt(v time.Time) *BillingInvoiceCreate", + "line": 626 + }, + { + "kind": "func", + "name": "SetNillableCollectionAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillableCollectionAt(v *time.Time) *BillingInvoiceCreate", + "line": 632 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (_c *BillingInvoiceCreate) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceCreate", + "line": 640 + }, + { + "kind": "func", + "name": "SetNillablePaymentProcessingEnteredAt", + "signature": "func (_c *BillingInvoiceCreate) SetNillablePaymentProcessingEnteredAt(v *time.Time) *BillingInvoiceCreate", + "line": 646 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_c *BillingInvoiceCreate) SetSchemaLevel(v int) *BillingInvoiceCreate", + "line": 654 + }, + { + "kind": "func", + "name": "SetNillableSchemaLevel", + "signature": "func (_c *BillingInvoiceCreate) SetNillableSchemaLevel(v *int) *BillingInvoiceCreate", + "line": 660 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceCreate) SetID(v string) *BillingInvoiceCreate", + "line": 668 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceCreate) SetNillableID(v *string) *BillingInvoiceCreate", + "line": 674 + }, + { + "kind": "func", + "name": "SetSourceBillingProfile", + "signature": "func (_c *BillingInvoiceCreate) SetSourceBillingProfile(v *BillingProfile) *BillingInvoiceCreate", + "line": 682 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfigID", + "signature": "func (_c *BillingInvoiceCreate) SetBillingWorkflowConfigID(id string) *BillingInvoiceCreate", + "line": 687 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfig", + "signature": "func (_c *BillingInvoiceCreate) SetBillingWorkflowConfig(v *BillingWorkflowConfig) *BillingInvoiceCreate", + "line": 693 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceCreate", + "line": 698 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceCreate", + "line": 704 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLineIDs", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceDetailedLineIDs(ids ...string) *BillingInvoiceCreate", + "line": 713 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLines", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceCreate", + "line": 719 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssueIDs", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceValidationIssueIDs(ids ...string) *BillingInvoiceCreate", + "line": 728 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssues", + "signature": "func (_c *BillingInvoiceCreate) AddBillingInvoiceValidationIssues(v ...*BillingInvoiceValidationIssue) *BillingInvoiceCreate", + "line": 734 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunIDs", + "signature": "func (_c *BillingInvoiceCreate) AddChargeFlatFeeRunIDs(ids ...string) *BillingInvoiceCreate", + "line": 743 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRuns", + "signature": "func (_c *BillingInvoiceCreate) AddChargeFlatFeeRuns(v ...*ChargeFlatFeeRun) *BillingInvoiceCreate", + "line": 749 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunIDs", + "signature": "func (_c *BillingInvoiceCreate) AddChargeUsageBasedRunIDs(ids ...string) *BillingInvoiceCreate", + "line": 758 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRuns", + "signature": "func (_c *BillingInvoiceCreate) AddChargeUsageBasedRuns(v ...*ChargeUsageBasedRuns) *BillingInvoiceCreate", + "line": 764 + }, + { + "kind": "func", + "name": "SetBillingInvoiceCustomerID", + "signature": "func (_c *BillingInvoiceCreate) SetBillingInvoiceCustomerID(id string) *BillingInvoiceCreate", + "line": 773 + }, + { + "kind": "func", + "name": "SetBillingInvoiceCustomer", + "signature": "func (_c *BillingInvoiceCreate) SetBillingInvoiceCustomer(v *Customer) *BillingInvoiceCreate", + "line": 779 + }, + { + "kind": "func", + "name": "SetTaxApp", + "signature": "func (_c *BillingInvoiceCreate) SetTaxApp(v *App) *BillingInvoiceCreate", + "line": 784 + }, + { + "kind": "func", + "name": "SetInvoicingApp", + "signature": "func (_c *BillingInvoiceCreate) SetInvoicingApp(v *App) *BillingInvoiceCreate", + "line": 789 + }, + { + "kind": "func", + "name": "SetPaymentApp", + "signature": "func (_c *BillingInvoiceCreate) SetPaymentApp(v *App) *BillingInvoiceCreate", + "line": 794 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceCreate) Mutation() *BillingInvoiceMutation", + "line": 799 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceCreate) Save(ctx context.Context) (*BillingInvoice, error)", + "line": 804 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceCreate) SaveX(ctx context.Context) *BillingInvoice", + "line": 810 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceCreate) Exec(ctx context.Context) error", + "line": 819 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceCreate) ExecX(ctx context.Context)", + "line": 825 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceCreate) defaults()", + "line": 832 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceCreate) check() error", + "line": 852 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceCreate) sqlSave(ctx context.Context) (*BillingInvoice, error)", + "line": 1001 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceCreate) createSpec() (*BillingInvoice, *sqlgraph.CreateSpec)", + "line": 1024 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceUpsertOne", + "line": 1443 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceCreate) OnConflictColumns(columns ...string) *BillingInvoiceUpsertOne", + "line": 1456 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceUpsert) SetMetadata(v map[string]string) *BillingInvoiceUpsert", + "line": 1477 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceUpsert) UpdateMetadata() *BillingInvoiceUpsert", + "line": 1483 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceUpsert) ClearMetadata() *BillingInvoiceUpsert", + "line": 1489 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceUpsert", + "line": 1495 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateUpdatedAt() *BillingInvoiceUpsert", + "line": 1501 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceUpsert) SetDeletedAt(v time.Time) *BillingInvoiceUpsert", + "line": 1507 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateDeletedAt() *BillingInvoiceUpsert", + "line": 1513 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceUpsert) ClearDeletedAt() *BillingInvoiceUpsert", + "line": 1519 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceUpsert", + "line": 1525 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressCountry() *BillingInvoiceUpsert", + "line": 1531 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressCountry() *BillingInvoiceUpsert", + "line": 1537 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressPostalCode(v string) *BillingInvoiceUpsert", + "line": 1543 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressPostalCode() *BillingInvoiceUpsert", + "line": 1549 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressPostalCode() *BillingInvoiceUpsert", + "line": 1555 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressState(v string) *BillingInvoiceUpsert", + "line": 1561 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressState() *BillingInvoiceUpsert", + "line": 1567 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressState() *BillingInvoiceUpsert", + "line": 1573 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressCity(v string) *BillingInvoiceUpsert", + "line": 1579 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressCity() *BillingInvoiceUpsert", + "line": 1585 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressCity() *BillingInvoiceUpsert", + "line": 1591 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressLine1(v string) *BillingInvoiceUpsert", + "line": 1597 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressLine1() *BillingInvoiceUpsert", + "line": 1603 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressLine1() *BillingInvoiceUpsert", + "line": 1609 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressLine2(v string) *BillingInvoiceUpsert", + "line": 1615 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressLine2() *BillingInvoiceUpsert", + "line": 1621 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressLine2() *BillingInvoiceUpsert", + "line": 1627 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceUpsert", + "line": 1633 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierAddressPhoneNumber() *BillingInvoiceUpsert", + "line": 1639 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierAddressPhoneNumber() *BillingInvoiceUpsert", + "line": 1645 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceUpsert", + "line": 1651 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressCountry() *BillingInvoiceUpsert", + "line": 1657 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressCountry() *BillingInvoiceUpsert", + "line": 1663 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressPostalCode(v string) *BillingInvoiceUpsert", + "line": 1669 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressPostalCode() *BillingInvoiceUpsert", + "line": 1675 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressPostalCode() *BillingInvoiceUpsert", + "line": 1681 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressState(v string) *BillingInvoiceUpsert", + "line": 1687 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressState() *BillingInvoiceUpsert", + "line": 1693 + }, + { + "kind": "func", + "name": "ClearCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressState() *BillingInvoiceUpsert", + "line": 1699 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressCity(v string) *BillingInvoiceUpsert", + "line": 1705 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressCity() *BillingInvoiceUpsert", + "line": 1711 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressCity() *BillingInvoiceUpsert", + "line": 1717 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressLine1(v string) *BillingInvoiceUpsert", + "line": 1723 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressLine1() *BillingInvoiceUpsert", + "line": 1729 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressLine1() *BillingInvoiceUpsert", + "line": 1735 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressLine2(v string) *BillingInvoiceUpsert", + "line": 1741 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressLine2() *BillingInvoiceUpsert", + "line": 1747 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressLine2() *BillingInvoiceUpsert", + "line": 1753 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceUpsert", + "line": 1759 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerAddressPhoneNumber() *BillingInvoiceUpsert", + "line": 1765 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerAddressPhoneNumber() *BillingInvoiceUpsert", + "line": 1771 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceUpsert) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1777 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceUpsert) UpdateAmount() *BillingInvoiceUpsert", + "line": 1783 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1789 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateTaxesTotal() *BillingInvoiceUpsert", + "line": 1795 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1801 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateTaxesInclusiveTotal() *BillingInvoiceUpsert", + "line": 1807 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1813 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateTaxesExclusiveTotal() *BillingInvoiceUpsert", + "line": 1819 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceUpsert) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1825 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateChargesTotal() *BillingInvoiceUpsert", + "line": 1831 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1837 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateDiscountsTotal() *BillingInvoiceUpsert", + "line": 1843 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1849 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateCreditsTotal() *BillingInvoiceUpsert", + "line": 1855 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceUpsert) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsert", + "line": 1861 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceUpsert) UpdateTotal() *BillingInvoiceUpsert", + "line": 1867 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) SetInvoicingAppExternalID(v string) *BillingInvoiceUpsert", + "line": 1873 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) UpdateInvoicingAppExternalID() *BillingInvoiceUpsert", + "line": 1879 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) ClearInvoicingAppExternalID() *BillingInvoiceUpsert", + "line": 1885 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) SetPaymentAppExternalID(v string) *BillingInvoiceUpsert", + "line": 1891 + }, + { + "kind": "func", + "name": "UpdatePaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) UpdatePaymentAppExternalID() *BillingInvoiceUpsert", + "line": 1897 + }, + { + "kind": "func", + "name": "ClearPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) ClearPaymentAppExternalID() *BillingInvoiceUpsert", + "line": 1903 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) SetTaxAppExternalID(v string) *BillingInvoiceUpsert", + "line": 1909 + }, + { + "kind": "func", + "name": "UpdateTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) UpdateTaxAppExternalID() *BillingInvoiceUpsert", + "line": 1915 + }, + { + "kind": "func", + "name": "ClearTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsert) ClearTaxAppExternalID() *BillingInvoiceUpsert", + "line": 1921 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierName(v string) *BillingInvoiceUpsert", + "line": 1927 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierName() *BillingInvoiceUpsert", + "line": 1933 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsert) SetSupplierTaxCode(v string) *BillingInvoiceUpsert", + "line": 1939 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsert) UpdateSupplierTaxCode() *BillingInvoiceUpsert", + "line": 1945 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsert) ClearSupplierTaxCode() *BillingInvoiceUpsert", + "line": 1951 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerKey(v string) *BillingInvoiceUpsert", + "line": 1957 + }, + { + "kind": "func", + "name": "UpdateCustomerKey", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerKey() *BillingInvoiceUpsert", + "line": 1963 + }, + { + "kind": "func", + "name": "ClearCustomerKey", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerKey() *BillingInvoiceUpsert", + "line": 1969 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerName(v string) *BillingInvoiceUpsert", + "line": 1975 + }, + { + "kind": "func", + "name": "UpdateCustomerName", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerName() *BillingInvoiceUpsert", + "line": 1981 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsert) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpsert", + "line": 1987 + }, + { + "kind": "func", + "name": "UpdateCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsert) UpdateCustomerUsageAttribution() *BillingInvoiceUpsert", + "line": 1993 + }, + { + "kind": "func", + "name": "ClearCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsert) ClearCustomerUsageAttribution() *BillingInvoiceUpsert", + "line": 1999 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (u *BillingInvoiceUpsert) SetNumber(v string) *BillingInvoiceUpsert", + "line": 2005 + }, + { + "kind": "func", + "name": "UpdateNumber", + "signature": "func (u *BillingInvoiceUpsert) UpdateNumber() *BillingInvoiceUpsert", + "line": 2011 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceUpsert) SetType(v billing.InvoiceType) *BillingInvoiceUpsert", + "line": 2017 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceUpsert) UpdateType() *BillingInvoiceUpsert", + "line": 2023 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceUpsert) SetDescription(v string) *BillingInvoiceUpsert", + "line": 2029 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceUpsert) UpdateDescription() *BillingInvoiceUpsert", + "line": 2035 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceUpsert) ClearDescription() *BillingInvoiceUpsert", + "line": 2041 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *BillingInvoiceUpsert) SetVoidedAt(v time.Time) *BillingInvoiceUpsert", + "line": 2047 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateVoidedAt() *BillingInvoiceUpsert", + "line": 2053 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *BillingInvoiceUpsert) ClearVoidedAt() *BillingInvoiceUpsert", + "line": 2059 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (u *BillingInvoiceUpsert) SetIssuedAt(v time.Time) *BillingInvoiceUpsert", + "line": 2065 + }, + { + "kind": "func", + "name": "UpdateIssuedAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateIssuedAt() *BillingInvoiceUpsert", + "line": 2071 + }, + { + "kind": "func", + "name": "ClearIssuedAt", + "signature": "func (u *BillingInvoiceUpsert) ClearIssuedAt() *BillingInvoiceUpsert", + "line": 2077 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsert) SetSentToCustomerAt(v time.Time) *BillingInvoiceUpsert", + "line": 2083 + }, + { + "kind": "func", + "name": "UpdateSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateSentToCustomerAt() *BillingInvoiceUpsert", + "line": 2089 + }, + { + "kind": "func", + "name": "ClearSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsert) ClearSentToCustomerAt() *BillingInvoiceUpsert", + "line": 2095 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (u *BillingInvoiceUpsert) SetDraftUntil(v time.Time) *BillingInvoiceUpsert", + "line": 2101 + }, + { + "kind": "func", + "name": "UpdateDraftUntil", + "signature": "func (u *BillingInvoiceUpsert) UpdateDraftUntil() *BillingInvoiceUpsert", + "line": 2107 + }, + { + "kind": "func", + "name": "ClearDraftUntil", + "signature": "func (u *BillingInvoiceUpsert) ClearDraftUntil() *BillingInvoiceUpsert", + "line": 2113 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsert) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceUpsert", + "line": 2119 + }, + { + "kind": "func", + "name": "UpdateQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateQuantitySnapshotedAt() *BillingInvoiceUpsert", + "line": 2125 + }, + { + "kind": "func", + "name": "ClearQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsert) ClearQuantitySnapshotedAt() *BillingInvoiceUpsert", + "line": 2131 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (u *BillingInvoiceUpsert) SetDueAt(v time.Time) *BillingInvoiceUpsert", + "line": 2137 + }, + { + "kind": "func", + "name": "UpdateDueAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateDueAt() *BillingInvoiceUpsert", + "line": 2143 + }, + { + "kind": "func", + "name": "ClearDueAt", + "signature": "func (u *BillingInvoiceUpsert) ClearDueAt() *BillingInvoiceUpsert", + "line": 2149 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceUpsert) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceUpsert", + "line": 2155 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceUpsert) UpdateStatus() *BillingInvoiceUpsert", + "line": 2161 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsert) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceUpsert", + "line": 2167 + }, + { + "kind": "func", + "name": "UpdateStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsert) UpdateStatusDetailsCache() *BillingInvoiceUpsert", + "line": 2173 + }, + { + "kind": "func", + "name": "ClearStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsert) ClearStatusDetailsCache() *BillingInvoiceUpsert", + "line": 2179 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsert) SetWorkflowConfigID(v string) *BillingInvoiceUpsert", + "line": 2185 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsert) UpdateWorkflowConfigID() *BillingInvoiceUpsert", + "line": 2191 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceUpsert) SetPeriodStart(v time.Time) *BillingInvoiceUpsert", + "line": 2197 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceUpsert) UpdatePeriodStart() *BillingInvoiceUpsert", + "line": 2203 + }, + { + "kind": "func", + "name": "ClearPeriodStart", + "signature": "func (u *BillingInvoiceUpsert) ClearPeriodStart() *BillingInvoiceUpsert", + "line": 2209 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceUpsert) SetPeriodEnd(v time.Time) *BillingInvoiceUpsert", + "line": 2215 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceUpsert) UpdatePeriodEnd() *BillingInvoiceUpsert", + "line": 2221 + }, + { + "kind": "func", + "name": "ClearPeriodEnd", + "signature": "func (u *BillingInvoiceUpsert) ClearPeriodEnd() *BillingInvoiceUpsert", + "line": 2227 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (u *BillingInvoiceUpsert) SetCollectionAt(v time.Time) *BillingInvoiceUpsert", + "line": 2233 + }, + { + "kind": "func", + "name": "UpdateCollectionAt", + "signature": "func (u *BillingInvoiceUpsert) UpdateCollectionAt() *BillingInvoiceUpsert", + "line": 2239 + }, + { + "kind": "func", + "name": "ClearCollectionAt", + "signature": "func (u *BillingInvoiceUpsert) ClearCollectionAt() *BillingInvoiceUpsert", + "line": 2245 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsert) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceUpsert", + "line": 2251 + }, + { + "kind": "func", + "name": "UpdatePaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsert) UpdatePaymentProcessingEnteredAt() *BillingInvoiceUpsert", + "line": 2257 + }, + { + "kind": "func", + "name": "ClearPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsert) ClearPaymentProcessingEnteredAt() *BillingInvoiceUpsert", + "line": 2263 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceUpsert) SetSchemaLevel(v int) *BillingInvoiceUpsert", + "line": 2269 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceUpsert) UpdateSchemaLevel() *BillingInvoiceUpsert", + "line": 2275 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceUpsert) AddSchemaLevel(v int) *BillingInvoiceUpsert", + "line": 2281 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateNewValues() *BillingInvoiceUpsertOne", + "line": 2297 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceUpsertOne) Ignore() *BillingInvoiceUpsertOne", + "line": 2337 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceUpsertOne) DoNothing() *BillingInvoiceUpsertOne", + "line": 2344 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceUpsertOne) Update(set func(*BillingInvoiceUpsert)) *BillingInvoiceUpsertOne", + "line": 2351 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceUpsertOne) SetMetadata(v map[string]string) *BillingInvoiceUpsertOne", + "line": 2359 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateMetadata() *BillingInvoiceUpsertOne", + "line": 2366 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceUpsertOne) ClearMetadata() *BillingInvoiceUpsertOne", + "line": 2373 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 2380 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateUpdatedAt() *BillingInvoiceUpsertOne", + "line": 2387 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 2394 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateDeletedAt() *BillingInvoiceUpsertOne", + "line": 2401 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearDeletedAt() *BillingInvoiceUpsertOne", + "line": 2408 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceUpsertOne", + "line": 2415 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressCountry() *BillingInvoiceUpsertOne", + "line": 2422 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressCountry() *BillingInvoiceUpsertOne", + "line": 2429 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressPostalCode(v string) *BillingInvoiceUpsertOne", + "line": 2436 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressPostalCode() *BillingInvoiceUpsertOne", + "line": 2443 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressPostalCode() *BillingInvoiceUpsertOne", + "line": 2450 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressState(v string) *BillingInvoiceUpsertOne", + "line": 2457 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressState() *BillingInvoiceUpsertOne", + "line": 2464 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressState() *BillingInvoiceUpsertOne", + "line": 2471 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressCity(v string) *BillingInvoiceUpsertOne", + "line": 2478 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressCity() *BillingInvoiceUpsertOne", + "line": 2485 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressCity() *BillingInvoiceUpsertOne", + "line": 2492 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressLine1(v string) *BillingInvoiceUpsertOne", + "line": 2499 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressLine1() *BillingInvoiceUpsertOne", + "line": 2506 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressLine1() *BillingInvoiceUpsertOne", + "line": 2513 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressLine2(v string) *BillingInvoiceUpsertOne", + "line": 2520 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressLine2() *BillingInvoiceUpsertOne", + "line": 2527 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressLine2() *BillingInvoiceUpsertOne", + "line": 2534 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceUpsertOne", + "line": 2541 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierAddressPhoneNumber() *BillingInvoiceUpsertOne", + "line": 2548 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierAddressPhoneNumber() *BillingInvoiceUpsertOne", + "line": 2555 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceUpsertOne", + "line": 2562 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressCountry() *BillingInvoiceUpsertOne", + "line": 2569 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressCountry() *BillingInvoiceUpsertOne", + "line": 2576 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressPostalCode(v string) *BillingInvoiceUpsertOne", + "line": 2583 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressPostalCode() *BillingInvoiceUpsertOne", + "line": 2590 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressPostalCode() *BillingInvoiceUpsertOne", + "line": 2597 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressState(v string) *BillingInvoiceUpsertOne", + "line": 2604 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressState() *BillingInvoiceUpsertOne", + "line": 2611 + }, + { + "kind": "func", + "name": "ClearCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressState() *BillingInvoiceUpsertOne", + "line": 2618 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressCity(v string) *BillingInvoiceUpsertOne", + "line": 2625 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressCity() *BillingInvoiceUpsertOne", + "line": 2632 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressCity() *BillingInvoiceUpsertOne", + "line": 2639 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressLine1(v string) *BillingInvoiceUpsertOne", + "line": 2646 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressLine1() *BillingInvoiceUpsertOne", + "line": 2653 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressLine1() *BillingInvoiceUpsertOne", + "line": 2660 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressLine2(v string) *BillingInvoiceUpsertOne", + "line": 2667 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressLine2() *BillingInvoiceUpsertOne", + "line": 2674 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressLine2() *BillingInvoiceUpsertOne", + "line": 2681 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceUpsertOne", + "line": 2688 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerAddressPhoneNumber() *BillingInvoiceUpsertOne", + "line": 2695 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerAddressPhoneNumber() *BillingInvoiceUpsertOne", + "line": 2702 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceUpsertOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2709 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateAmount() *BillingInvoiceUpsertOne", + "line": 2716 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2723 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateTaxesTotal() *BillingInvoiceUpsertOne", + "line": 2730 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2737 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateTaxesInclusiveTotal() *BillingInvoiceUpsertOne", + "line": 2744 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2751 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateTaxesExclusiveTotal() *BillingInvoiceUpsertOne", + "line": 2758 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2765 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateChargesTotal() *BillingInvoiceUpsertOne", + "line": 2772 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2779 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateDiscountsTotal() *BillingInvoiceUpsertOne", + "line": 2786 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2793 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCreditsTotal() *BillingInvoiceUpsertOne", + "line": 2800 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceUpsertOne) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertOne", + "line": 2807 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateTotal() *BillingInvoiceUpsertOne", + "line": 2814 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) SetInvoicingAppExternalID(v string) *BillingInvoiceUpsertOne", + "line": 2821 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateInvoicingAppExternalID() *BillingInvoiceUpsertOne", + "line": 2828 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) ClearInvoicingAppExternalID() *BillingInvoiceUpsertOne", + "line": 2835 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) SetPaymentAppExternalID(v string) *BillingInvoiceUpsertOne", + "line": 2842 + }, + { + "kind": "func", + "name": "UpdatePaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) UpdatePaymentAppExternalID() *BillingInvoiceUpsertOne", + "line": 2849 + }, + { + "kind": "func", + "name": "ClearPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) ClearPaymentAppExternalID() *BillingInvoiceUpsertOne", + "line": 2856 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) SetTaxAppExternalID(v string) *BillingInvoiceUpsertOne", + "line": 2863 + }, + { + "kind": "func", + "name": "UpdateTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateTaxAppExternalID() *BillingInvoiceUpsertOne", + "line": 2870 + }, + { + "kind": "func", + "name": "ClearTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertOne) ClearTaxAppExternalID() *BillingInvoiceUpsertOne", + "line": 2877 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierName(v string) *BillingInvoiceUpsertOne", + "line": 2884 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierName() *BillingInvoiceUpsertOne", + "line": 2891 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertOne) SetSupplierTaxCode(v string) *BillingInvoiceUpsertOne", + "line": 2898 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSupplierTaxCode() *BillingInvoiceUpsertOne", + "line": 2905 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSupplierTaxCode() *BillingInvoiceUpsertOne", + "line": 2912 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerKey(v string) *BillingInvoiceUpsertOne", + "line": 2919 + }, + { + "kind": "func", + "name": "UpdateCustomerKey", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerKey() *BillingInvoiceUpsertOne", + "line": 2926 + }, + { + "kind": "func", + "name": "ClearCustomerKey", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerKey() *BillingInvoiceUpsertOne", + "line": 2933 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerName(v string) *BillingInvoiceUpsertOne", + "line": 2940 + }, + { + "kind": "func", + "name": "UpdateCustomerName", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerName() *BillingInvoiceUpsertOne", + "line": 2947 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertOne) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpsertOne", + "line": 2954 + }, + { + "kind": "func", + "name": "UpdateCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCustomerUsageAttribution() *BillingInvoiceUpsertOne", + "line": 2961 + }, + { + "kind": "func", + "name": "ClearCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCustomerUsageAttribution() *BillingInvoiceUpsertOne", + "line": 2968 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (u *BillingInvoiceUpsertOne) SetNumber(v string) *BillingInvoiceUpsertOne", + "line": 2975 + }, + { + "kind": "func", + "name": "UpdateNumber", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateNumber() *BillingInvoiceUpsertOne", + "line": 2982 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceUpsertOne) SetType(v billing.InvoiceType) *BillingInvoiceUpsertOne", + "line": 2989 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateType() *BillingInvoiceUpsertOne", + "line": 2996 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceUpsertOne) SetDescription(v string) *BillingInvoiceUpsertOne", + "line": 3003 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateDescription() *BillingInvoiceUpsertOne", + "line": 3010 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceUpsertOne) ClearDescription() *BillingInvoiceUpsertOne", + "line": 3017 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetVoidedAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3024 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateVoidedAt() *BillingInvoiceUpsertOne", + "line": 3031 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearVoidedAt() *BillingInvoiceUpsertOne", + "line": 3038 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetIssuedAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3045 + }, + { + "kind": "func", + "name": "UpdateIssuedAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateIssuedAt() *BillingInvoiceUpsertOne", + "line": 3052 + }, + { + "kind": "func", + "name": "ClearIssuedAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearIssuedAt() *BillingInvoiceUpsertOne", + "line": 3059 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetSentToCustomerAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3066 + }, + { + "kind": "func", + "name": "UpdateSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSentToCustomerAt() *BillingInvoiceUpsertOne", + "line": 3073 + }, + { + "kind": "func", + "name": "ClearSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearSentToCustomerAt() *BillingInvoiceUpsertOne", + "line": 3080 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (u *BillingInvoiceUpsertOne) SetDraftUntil(v time.Time) *BillingInvoiceUpsertOne", + "line": 3087 + }, + { + "kind": "func", + "name": "UpdateDraftUntil", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateDraftUntil() *BillingInvoiceUpsertOne", + "line": 3094 + }, + { + "kind": "func", + "name": "ClearDraftUntil", + "signature": "func (u *BillingInvoiceUpsertOne) ClearDraftUntil() *BillingInvoiceUpsertOne", + "line": 3101 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3108 + }, + { + "kind": "func", + "name": "UpdateQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateQuantitySnapshotedAt() *BillingInvoiceUpsertOne", + "line": 3115 + }, + { + "kind": "func", + "name": "ClearQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearQuantitySnapshotedAt() *BillingInvoiceUpsertOne", + "line": 3122 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetDueAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3129 + }, + { + "kind": "func", + "name": "UpdateDueAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateDueAt() *BillingInvoiceUpsertOne", + "line": 3136 + }, + { + "kind": "func", + "name": "ClearDueAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearDueAt() *BillingInvoiceUpsertOne", + "line": 3143 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceUpsertOne) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceUpsertOne", + "line": 3150 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateStatus() *BillingInvoiceUpsertOne", + "line": 3157 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertOne) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceUpsertOne", + "line": 3164 + }, + { + "kind": "func", + "name": "UpdateStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateStatusDetailsCache() *BillingInvoiceUpsertOne", + "line": 3171 + }, + { + "kind": "func", + "name": "ClearStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertOne) ClearStatusDetailsCache() *BillingInvoiceUpsertOne", + "line": 3178 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsertOne) SetWorkflowConfigID(v string) *BillingInvoiceUpsertOne", + "line": 3185 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateWorkflowConfigID() *BillingInvoiceUpsertOne", + "line": 3192 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceUpsertOne) SetPeriodStart(v time.Time) *BillingInvoiceUpsertOne", + "line": 3199 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceUpsertOne) UpdatePeriodStart() *BillingInvoiceUpsertOne", + "line": 3206 + }, + { + "kind": "func", + "name": "ClearPeriodStart", + "signature": "func (u *BillingInvoiceUpsertOne) ClearPeriodStart() *BillingInvoiceUpsertOne", + "line": 3213 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceUpsertOne) SetPeriodEnd(v time.Time) *BillingInvoiceUpsertOne", + "line": 3220 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceUpsertOne) UpdatePeriodEnd() *BillingInvoiceUpsertOne", + "line": 3227 + }, + { + "kind": "func", + "name": "ClearPeriodEnd", + "signature": "func (u *BillingInvoiceUpsertOne) ClearPeriodEnd() *BillingInvoiceUpsertOne", + "line": 3234 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetCollectionAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3241 + }, + { + "kind": "func", + "name": "UpdateCollectionAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateCollectionAt() *BillingInvoiceUpsertOne", + "line": 3248 + }, + { + "kind": "func", + "name": "ClearCollectionAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearCollectionAt() *BillingInvoiceUpsertOne", + "line": 3255 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertOne) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceUpsertOne", + "line": 3262 + }, + { + "kind": "func", + "name": "UpdatePaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertOne) UpdatePaymentProcessingEnteredAt() *BillingInvoiceUpsertOne", + "line": 3269 + }, + { + "kind": "func", + "name": "ClearPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertOne) ClearPaymentProcessingEnteredAt() *BillingInvoiceUpsertOne", + "line": 3276 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertOne) SetSchemaLevel(v int) *BillingInvoiceUpsertOne", + "line": 3283 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertOne) AddSchemaLevel(v int) *BillingInvoiceUpsertOne", + "line": 3290 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertOne) UpdateSchemaLevel() *BillingInvoiceUpsertOne", + "line": 3297 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceUpsertOne) Exec(ctx context.Context) error", + "line": 3304 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceUpsertOne) ExecX(ctx context.Context)", + "line": 3312 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 3319 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceUpsertOne) IDX(ctx context.Context) string", + "line": 3333 + }, + { + "kind": "struct", + "name": "BillingInvoiceCreateBulk", + "signature": "type BillingInvoiceCreateBulk struct", + "line": 3342 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceCreateBulk) Save(ctx context.Context) ([]*BillingInvoice, error)", + "line": 3350 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceCreateBulk) SaveX(ctx context.Context) []*BillingInvoice", + "line": 3406 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceCreateBulk) Exec(ctx context.Context) error", + "line": 3415 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceCreateBulk) ExecX(ctx context.Context)", + "line": 3421 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceUpsertBulk", + "line": 3442 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceUpsertBulk", + "line": 3455 + }, + { + "kind": "struct", + "name": "BillingInvoiceUpsertBulk", + "signature": "type BillingInvoiceUpsertBulk struct", + "line": 3464 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateNewValues() *BillingInvoiceUpsertBulk", + "line": 3479 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceUpsertBulk) Ignore() *BillingInvoiceUpsertBulk", + "line": 3521 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceUpsertBulk) DoNothing() *BillingInvoiceUpsertBulk", + "line": 3528 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceUpsertBulk) Update(set func(*BillingInvoiceUpsert)) *BillingInvoiceUpsertBulk", + "line": 3535 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceUpsertBulk) SetMetadata(v map[string]string) *BillingInvoiceUpsertBulk", + "line": 3543 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateMetadata() *BillingInvoiceUpsertBulk", + "line": 3550 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearMetadata() *BillingInvoiceUpsertBulk", + "line": 3557 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 3564 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateUpdatedAt() *BillingInvoiceUpsertBulk", + "line": 3571 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 3578 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateDeletedAt() *BillingInvoiceUpsertBulk", + "line": 3585 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearDeletedAt() *BillingInvoiceUpsertBulk", + "line": 3592 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceUpsertBulk", + "line": 3599 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressCountry() *BillingInvoiceUpsertBulk", + "line": 3606 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressCountry() *BillingInvoiceUpsertBulk", + "line": 3613 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressPostalCode(v string) *BillingInvoiceUpsertBulk", + "line": 3620 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressPostalCode() *BillingInvoiceUpsertBulk", + "line": 3627 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressPostalCode() *BillingInvoiceUpsertBulk", + "line": 3634 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressState(v string) *BillingInvoiceUpsertBulk", + "line": 3641 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressState() *BillingInvoiceUpsertBulk", + "line": 3648 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressState() *BillingInvoiceUpsertBulk", + "line": 3655 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressCity(v string) *BillingInvoiceUpsertBulk", + "line": 3662 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressCity() *BillingInvoiceUpsertBulk", + "line": 3669 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressCity() *BillingInvoiceUpsertBulk", + "line": 3676 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressLine1(v string) *BillingInvoiceUpsertBulk", + "line": 3683 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressLine1() *BillingInvoiceUpsertBulk", + "line": 3690 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressLine1() *BillingInvoiceUpsertBulk", + "line": 3697 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressLine2(v string) *BillingInvoiceUpsertBulk", + "line": 3704 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressLine2() *BillingInvoiceUpsertBulk", + "line": 3711 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressLine2() *BillingInvoiceUpsertBulk", + "line": 3718 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceUpsertBulk", + "line": 3725 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierAddressPhoneNumber() *BillingInvoiceUpsertBulk", + "line": 3732 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierAddressPhoneNumber() *BillingInvoiceUpsertBulk", + "line": 3739 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceUpsertBulk", + "line": 3746 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressCountry() *BillingInvoiceUpsertBulk", + "line": 3753 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressCountry() *BillingInvoiceUpsertBulk", + "line": 3760 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressPostalCode(v string) *BillingInvoiceUpsertBulk", + "line": 3767 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressPostalCode() *BillingInvoiceUpsertBulk", + "line": 3774 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressPostalCode() *BillingInvoiceUpsertBulk", + "line": 3781 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressState(v string) *BillingInvoiceUpsertBulk", + "line": 3788 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressState() *BillingInvoiceUpsertBulk", + "line": 3795 + }, + { + "kind": "func", + "name": "ClearCustomerAddressState", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressState() *BillingInvoiceUpsertBulk", + "line": 3802 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressCity(v string) *BillingInvoiceUpsertBulk", + "line": 3809 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressCity() *BillingInvoiceUpsertBulk", + "line": 3816 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressCity() *BillingInvoiceUpsertBulk", + "line": 3823 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressLine1(v string) *BillingInvoiceUpsertBulk", + "line": 3830 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressLine1() *BillingInvoiceUpsertBulk", + "line": 3837 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressLine1() *BillingInvoiceUpsertBulk", + "line": 3844 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressLine2(v string) *BillingInvoiceUpsertBulk", + "line": 3851 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressLine2() *BillingInvoiceUpsertBulk", + "line": 3858 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressLine2() *BillingInvoiceUpsertBulk", + "line": 3865 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceUpsertBulk", + "line": 3872 + }, + { + "kind": "func", + "name": "UpdateCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerAddressPhoneNumber() *BillingInvoiceUpsertBulk", + "line": 3879 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerAddressPhoneNumber() *BillingInvoiceUpsertBulk", + "line": 3886 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceUpsertBulk) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3893 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateAmount() *BillingInvoiceUpsertBulk", + "line": 3900 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3907 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateTaxesTotal() *BillingInvoiceUpsertBulk", + "line": 3914 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3921 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateTaxesInclusiveTotal() *BillingInvoiceUpsertBulk", + "line": 3928 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3935 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateTaxesExclusiveTotal() *BillingInvoiceUpsertBulk", + "line": 3942 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3949 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateChargesTotal() *BillingInvoiceUpsertBulk", + "line": 3956 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3963 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateDiscountsTotal() *BillingInvoiceUpsertBulk", + "line": 3970 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3977 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCreditsTotal() *BillingInvoiceUpsertBulk", + "line": 3984 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceUpsertBulk", + "line": 3991 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateTotal() *BillingInvoiceUpsertBulk", + "line": 3998 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) SetInvoicingAppExternalID(v string) *BillingInvoiceUpsertBulk", + "line": 4005 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateInvoicingAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4012 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearInvoicingAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4019 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) SetPaymentAppExternalID(v string) *BillingInvoiceUpsertBulk", + "line": 4026 + }, + { + "kind": "func", + "name": "UpdatePaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdatePaymentAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4033 + }, + { + "kind": "func", + "name": "ClearPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearPaymentAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4040 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) SetTaxAppExternalID(v string) *BillingInvoiceUpsertBulk", + "line": 4047 + }, + { + "kind": "func", + "name": "UpdateTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateTaxAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4054 + }, + { + "kind": "func", + "name": "ClearTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearTaxAppExternalID() *BillingInvoiceUpsertBulk", + "line": 4061 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierName(v string) *BillingInvoiceUpsertBulk", + "line": 4068 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierName() *BillingInvoiceUpsertBulk", + "line": 4075 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSupplierTaxCode(v string) *BillingInvoiceUpsertBulk", + "line": 4082 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSupplierTaxCode() *BillingInvoiceUpsertBulk", + "line": 4089 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSupplierTaxCode() *BillingInvoiceUpsertBulk", + "line": 4096 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerKey(v string) *BillingInvoiceUpsertBulk", + "line": 4103 + }, + { + "kind": "func", + "name": "UpdateCustomerKey", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerKey() *BillingInvoiceUpsertBulk", + "line": 4110 + }, + { + "kind": "func", + "name": "ClearCustomerKey", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerKey() *BillingInvoiceUpsertBulk", + "line": 4117 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerName(v string) *BillingInvoiceUpsertBulk", + "line": 4124 + }, + { + "kind": "func", + "name": "UpdateCustomerName", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerName() *BillingInvoiceUpsertBulk", + "line": 4131 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpsertBulk", + "line": 4138 + }, + { + "kind": "func", + "name": "UpdateCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCustomerUsageAttribution() *BillingInvoiceUpsertBulk", + "line": 4145 + }, + { + "kind": "func", + "name": "ClearCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCustomerUsageAttribution() *BillingInvoiceUpsertBulk", + "line": 4152 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) SetNumber(v string) *BillingInvoiceUpsertBulk", + "line": 4159 + }, + { + "kind": "func", + "name": "UpdateNumber", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateNumber() *BillingInvoiceUpsertBulk", + "line": 4166 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceUpsertBulk) SetType(v billing.InvoiceType) *BillingInvoiceUpsertBulk", + "line": 4173 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateType() *BillingInvoiceUpsertBulk", + "line": 4180 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceUpsertBulk) SetDescription(v string) *BillingInvoiceUpsertBulk", + "line": 4187 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateDescription() *BillingInvoiceUpsertBulk", + "line": 4194 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearDescription() *BillingInvoiceUpsertBulk", + "line": 4201 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetVoidedAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4208 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateVoidedAt() *BillingInvoiceUpsertBulk", + "line": 4215 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearVoidedAt() *BillingInvoiceUpsertBulk", + "line": 4222 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetIssuedAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4229 + }, + { + "kind": "func", + "name": "UpdateIssuedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateIssuedAt() *BillingInvoiceUpsertBulk", + "line": 4236 + }, + { + "kind": "func", + "name": "ClearIssuedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearIssuedAt() *BillingInvoiceUpsertBulk", + "line": 4243 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSentToCustomerAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4250 + }, + { + "kind": "func", + "name": "UpdateSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSentToCustomerAt() *BillingInvoiceUpsertBulk", + "line": 4257 + }, + { + "kind": "func", + "name": "ClearSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearSentToCustomerAt() *BillingInvoiceUpsertBulk", + "line": 4264 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (u *BillingInvoiceUpsertBulk) SetDraftUntil(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4271 + }, + { + "kind": "func", + "name": "UpdateDraftUntil", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateDraftUntil() *BillingInvoiceUpsertBulk", + "line": 4278 + }, + { + "kind": "func", + "name": "ClearDraftUntil", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearDraftUntil() *BillingInvoiceUpsertBulk", + "line": 4285 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4292 + }, + { + "kind": "func", + "name": "UpdateQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateQuantitySnapshotedAt() *BillingInvoiceUpsertBulk", + "line": 4299 + }, + { + "kind": "func", + "name": "ClearQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearQuantitySnapshotedAt() *BillingInvoiceUpsertBulk", + "line": 4306 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetDueAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4313 + }, + { + "kind": "func", + "name": "UpdateDueAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateDueAt() *BillingInvoiceUpsertBulk", + "line": 4320 + }, + { + "kind": "func", + "name": "ClearDueAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearDueAt() *BillingInvoiceUpsertBulk", + "line": 4327 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceUpsertBulk) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceUpsertBulk", + "line": 4334 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateStatus() *BillingInvoiceUpsertBulk", + "line": 4341 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertBulk) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceUpsertBulk", + "line": 4348 + }, + { + "kind": "func", + "name": "UpdateStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateStatusDetailsCache() *BillingInvoiceUpsertBulk", + "line": 4355 + }, + { + "kind": "func", + "name": "ClearStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearStatusDetailsCache() *BillingInvoiceUpsertBulk", + "line": 4362 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsertBulk) SetWorkflowConfigID(v string) *BillingInvoiceUpsertBulk", + "line": 4369 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateWorkflowConfigID() *BillingInvoiceUpsertBulk", + "line": 4376 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceUpsertBulk) SetPeriodStart(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4383 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdatePeriodStart() *BillingInvoiceUpsertBulk", + "line": 4390 + }, + { + "kind": "func", + "name": "ClearPeriodStart", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearPeriodStart() *BillingInvoiceUpsertBulk", + "line": 4397 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceUpsertBulk) SetPeriodEnd(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4404 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdatePeriodEnd() *BillingInvoiceUpsertBulk", + "line": 4411 + }, + { + "kind": "func", + "name": "ClearPeriodEnd", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearPeriodEnd() *BillingInvoiceUpsertBulk", + "line": 4418 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetCollectionAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4425 + }, + { + "kind": "func", + "name": "UpdateCollectionAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateCollectionAt() *BillingInvoiceUpsertBulk", + "line": 4432 + }, + { + "kind": "func", + "name": "ClearCollectionAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearCollectionAt() *BillingInvoiceUpsertBulk", + "line": 4439 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertBulk) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceUpsertBulk", + "line": 4446 + }, + { + "kind": "func", + "name": "UpdatePaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdatePaymentProcessingEnteredAt() *BillingInvoiceUpsertBulk", + "line": 4453 + }, + { + "kind": "func", + "name": "ClearPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpsertBulk) ClearPaymentProcessingEnteredAt() *BillingInvoiceUpsertBulk", + "line": 4460 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertBulk) SetSchemaLevel(v int) *BillingInvoiceUpsertBulk", + "line": 4467 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertBulk) AddSchemaLevel(v int) *BillingInvoiceUpsertBulk", + "line": 4474 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceUpsertBulk) UpdateSchemaLevel() *BillingInvoiceUpsertBulk", + "line": 4481 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceUpsertBulk) Exec(ctx context.Context) error", + "line": 4488 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceUpsertBulk) ExecX(ctx context.Context)", + "line": 4504 + } + ], + "line_count": 4508 + }, + "openmeter/ent/db/billinginvoice_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceDelete", + "signature": "type BillingInvoiceDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceDelete) Where(ps ...predicate.BillingInvoice) *BillingInvoiceDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceDeleteOne", + "signature": "type BillingInvoiceDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceDeleteOne) Where(ps ...predicate.BillingInvoice) *BillingInvoiceDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoice_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceQuery", + "signature": "type BillingInvoiceQuery struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceQuery) Where(ps ...predicate.BillingInvoice) *BillingInvoiceQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceQuery) Limit(limit int) *BillingInvoiceQuery", + "line": 60 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceQuery) Offset(offset int) *BillingInvoiceQuery", + "line": 66 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceQuery) Unique(unique bool) *BillingInvoiceQuery", + "line": 73 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceQuery) Order(o ...billinginvoice.OrderOption) *BillingInvoiceQuery", + "line": 79 + }, + { + "kind": "func", + "name": "QuerySourceBillingProfile", + "signature": "func (_q *BillingInvoiceQuery) QuerySourceBillingProfile() *BillingProfileQuery", + "line": 85 + }, + { + "kind": "func", + "name": "QueryBillingWorkflowConfig", + "signature": "func (_q *BillingInvoiceQuery) QueryBillingWorkflowConfig() *BillingWorkflowConfigQuery", + "line": 107 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceQuery) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 129 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceDetailedLines", + "signature": "func (_q *BillingInvoiceQuery) QueryBillingInvoiceDetailedLines() *BillingStandardInvoiceDetailedLineQuery", + "line": 151 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceValidationIssues", + "signature": "func (_q *BillingInvoiceQuery) QueryBillingInvoiceValidationIssues() *BillingInvoiceValidationIssueQuery", + "line": 173 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceQuery) QueryChargeFlatFeeRuns() *ChargeFlatFeeRunQuery", + "line": 195 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRuns", + "signature": "func (_q *BillingInvoiceQuery) QueryChargeUsageBasedRuns() *ChargeUsageBasedRunsQuery", + "line": 217 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceCustomer", + "signature": "func (_q *BillingInvoiceQuery) QueryBillingInvoiceCustomer() *CustomerQuery", + "line": 239 + }, + { + "kind": "func", + "name": "QueryTaxApp", + "signature": "func (_q *BillingInvoiceQuery) QueryTaxApp() *AppQuery", + "line": 261 + }, + { + "kind": "func", + "name": "QueryInvoicingApp", + "signature": "func (_q *BillingInvoiceQuery) QueryInvoicingApp() *AppQuery", + "line": 283 + }, + { + "kind": "func", + "name": "QueryPaymentApp", + "signature": "func (_q *BillingInvoiceQuery) QueryPaymentApp() *AppQuery", + "line": 305 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceQuery) First(ctx context.Context) (*BillingInvoice, error)", + "line": 328 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceQuery) FirstX(ctx context.Context) *BillingInvoice", + "line": 340 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 350 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceQuery) FirstIDX(ctx context.Context) string", + "line": 363 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceQuery) Only(ctx context.Context) (*BillingInvoice, error)", + "line": 374 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceQuery) OnlyX(ctx context.Context) *BillingInvoice", + "line": 390 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 401 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceQuery) OnlyIDX(ctx context.Context) string", + "line": 418 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceQuery) All(ctx context.Context) ([]*BillingInvoice, error)", + "line": 427 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceQuery) AllX(ctx context.Context) []*BillingInvoice", + "line": 437 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 446 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceQuery) IDsX(ctx context.Context) []string", + "line": 458 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceQuery) Count(ctx context.Context) (int, error)", + "line": 467 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceQuery) CountX(ctx context.Context) int", + "line": 476 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceQuery) Exist(ctx context.Context) (bool, error)", + "line": 485 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceQuery) ExistX(ctx context.Context) bool", + "line": 498 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceQuery) Clone() *BillingInvoiceQuery", + "line": 508 + }, + { + "kind": "func", + "name": "WithSourceBillingProfile", + "signature": "func (_q *BillingInvoiceQuery) WithSourceBillingProfile(opts ...func(*BillingProfileQuery)) *BillingInvoiceQuery", + "line": 537 + }, + { + "kind": "func", + "name": "WithBillingWorkflowConfig", + "signature": "func (_q *BillingInvoiceQuery) WithBillingWorkflowConfig(opts ...func(*BillingWorkflowConfigQuery)) *BillingInvoiceQuery", + "line": 548 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceQuery) WithBillingInvoiceLines(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceQuery", + "line": 559 + }, + { + "kind": "func", + "name": "WithBillingInvoiceDetailedLines", + "signature": "func (_q *BillingInvoiceQuery) WithBillingInvoiceDetailedLines(opts ...func(*BillingStandardInvoiceDetailedLineQuery)) *BillingInvoiceQuery", + "line": 570 + }, + { + "kind": "func", + "name": "WithBillingInvoiceValidationIssues", + "signature": "func (_q *BillingInvoiceQuery) WithBillingInvoiceValidationIssues(opts ...func(*BillingInvoiceValidationIssueQuery)) *BillingInvoiceQuery", + "line": 581 + }, + { + "kind": "func", + "name": "WithChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceQuery) WithChargeFlatFeeRuns(opts ...func(*ChargeFlatFeeRunQuery)) *BillingInvoiceQuery", + "line": 592 + }, + { + "kind": "func", + "name": "WithChargeUsageBasedRuns", + "signature": "func (_q *BillingInvoiceQuery) WithChargeUsageBasedRuns(opts ...func(*ChargeUsageBasedRunsQuery)) *BillingInvoiceQuery", + "line": 603 + }, + { + "kind": "func", + "name": "WithBillingInvoiceCustomer", + "signature": "func (_q *BillingInvoiceQuery) WithBillingInvoiceCustomer(opts ...func(*CustomerQuery)) *BillingInvoiceQuery", + "line": 614 + }, + { + "kind": "func", + "name": "WithTaxApp", + "signature": "func (_q *BillingInvoiceQuery) WithTaxApp(opts ...func(*AppQuery)) *BillingInvoiceQuery", + "line": 625 + }, + { + "kind": "func", + "name": "WithInvoicingApp", + "signature": "func (_q *BillingInvoiceQuery) WithInvoicingApp(opts ...func(*AppQuery)) *BillingInvoiceQuery", + "line": 636 + }, + { + "kind": "func", + "name": "WithPaymentApp", + "signature": "func (_q *BillingInvoiceQuery) WithPaymentApp(opts ...func(*AppQuery)) *BillingInvoiceQuery", + "line": 647 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceQuery) GroupBy(field string, fields ...string) *BillingInvoiceGroupBy", + "line": 670 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceQuery) Select(fields ...string) *BillingInvoiceSelect", + "line": 691 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceSelect", + "line": 700 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceQuery) prepareQuery(ctx context.Context) error", + "line": 704 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoice, error)", + "line": 730 + }, + { + "kind": "func", + "name": "loadSourceBillingProfile", + "signature": "func (_q *BillingInvoiceQuery) loadSourceBillingProfile(ctx context.Context, query *BillingProfileQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *BillingProfile)) error", + "line": 853 + }, + { + "kind": "func", + "name": "loadBillingWorkflowConfig", + "signature": "func (_q *BillingInvoiceQuery) loadBillingWorkflowConfig(ctx context.Context, query *BillingWorkflowConfigQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *BillingWorkflowConfig)) error", + "line": 882 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceQuery) loadBillingInvoiceLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *BillingInvoiceLine)) error", + "line": 911 + }, + { + "kind": "func", + "name": "loadBillingInvoiceDetailedLines", + "signature": "func (_q *BillingInvoiceQuery) loadBillingInvoiceDetailedLines(ctx context.Context, query *BillingStandardInvoiceDetailedLineQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *BillingStandardInvoiceDetailedLine)) error", + "line": 942 + }, + { + "kind": "func", + "name": "loadBillingInvoiceValidationIssues", + "signature": "func (_q *BillingInvoiceQuery) loadBillingInvoiceValidationIssues(ctx context.Context, query *BillingInvoiceValidationIssueQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *BillingInvoiceValidationIssue)) error", + "line": 972 + }, + { + "kind": "func", + "name": "loadChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceQuery) loadChargeFlatFeeRuns(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *ChargeFlatFeeRun)) error", + "line": 1002 + }, + { + "kind": "func", + "name": "loadChargeUsageBasedRuns", + "signature": "func (_q *BillingInvoiceQuery) loadChargeUsageBasedRuns(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *ChargeUsageBasedRuns)) error", + "line": 1035 + }, + { + "kind": "func", + "name": "loadBillingInvoiceCustomer", + "signature": "func (_q *BillingInvoiceQuery) loadBillingInvoiceCustomer(ctx context.Context, query *CustomerQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *Customer)) error", + "line": 1068 + }, + { + "kind": "func", + "name": "loadTaxApp", + "signature": "func (_q *BillingInvoiceQuery) loadTaxApp(ctx context.Context, query *AppQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *App)) error", + "line": 1097 + }, + { + "kind": "func", + "name": "loadInvoicingApp", + "signature": "func (_q *BillingInvoiceQuery) loadInvoicingApp(ctx context.Context, query *AppQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *App)) error", + "line": 1126 + }, + { + "kind": "func", + "name": "loadPaymentApp", + "signature": "func (_q *BillingInvoiceQuery) loadPaymentApp(ctx context.Context, query *AppQuery, nodes []*BillingInvoice, init func(*BillingInvoice), assign func(*BillingInvoice, *App)) error", + "line": 1155 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1185 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1197 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1255 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceQuery", + "line": 1293 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceQuery", + "line": 1306 + }, + { + "kind": "struct", + "name": "BillingInvoiceGroupBy", + "signature": "type BillingInvoiceGroupBy struct", + "line": 1317 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceGroupBy", + "line": 1323 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceGroupBy) Scan(ctx context.Context, v any) error", + "line": 1329 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceQuery, v any) error", + "line": 1337 + }, + { + "kind": "struct", + "name": "BillingInvoiceSelect", + "signature": "type BillingInvoiceSelect struct", + "line": 1365 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceSelect", + "line": 1371 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceSelect) Scan(ctx context.Context, v any) error", + "line": 1377 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceSelect) sqlScan(ctx context.Context, root *BillingInvoiceQuery, v any) error", + "line": 1385 + } + ], + "line_count": 1404 + }, + "openmeter/ent/db/billinginvoice_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUpdate", + "signature": "type BillingInvoiceUpdate struct", + "line": 28 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceUpdate) Where(ps ...predicate.BillingInvoice) *BillingInvoiceUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceUpdate) SetMetadata(v map[string]string) *BillingInvoiceUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceUpdate) ClearMetadata() *BillingInvoiceUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetDeletedAt(v time.Time) *BillingInvoiceUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearDeletedAt() *BillingInvoiceUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingInvoiceUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressCountry() *BillingInvoiceUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressPostalCode(v string) *BillingInvoiceUpdate", + "line": 99 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressPostalCode(v *string) *BillingInvoiceUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressPostalCode() *BillingInvoiceUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressState(v string) *BillingInvoiceUpdate", + "line": 119 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressState(v *string) *BillingInvoiceUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressState() *BillingInvoiceUpdate", + "line": 133 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressCity(v string) *BillingInvoiceUpdate", + "line": 139 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressCity(v *string) *BillingInvoiceUpdate", + "line": 145 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressCity() *BillingInvoiceUpdate", + "line": 153 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressLine1(v string) *BillingInvoiceUpdate", + "line": 159 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressLine1(v *string) *BillingInvoiceUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressLine1() *BillingInvoiceUpdate", + "line": 173 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressLine2(v string) *BillingInvoiceUpdate", + "line": 179 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressLine2(v *string) *BillingInvoiceUpdate", + "line": 185 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressLine2() *BillingInvoiceUpdate", + "line": 193 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceUpdate", + "line": 199 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierAddressPhoneNumber(v *string) *BillingInvoiceUpdate", + "line": 205 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierAddressPhoneNumber() *BillingInvoiceUpdate", + "line": 213 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressCountry(v *models.CountryCode) *BillingInvoiceUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressCountry() *BillingInvoiceUpdate", + "line": 233 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressPostalCode(v string) *BillingInvoiceUpdate", + "line": 239 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressPostalCode(v *string) *BillingInvoiceUpdate", + "line": 245 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressPostalCode() *BillingInvoiceUpdate", + "line": 253 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressState(v string) *BillingInvoiceUpdate", + "line": 259 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressState(v *string) *BillingInvoiceUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "ClearCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressState() *BillingInvoiceUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressCity(v string) *BillingInvoiceUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressCity(v *string) *BillingInvoiceUpdate", + "line": 285 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressCity() *BillingInvoiceUpdate", + "line": 293 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressLine1(v string) *BillingInvoiceUpdate", + "line": 299 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressLine1(v *string) *BillingInvoiceUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressLine1() *BillingInvoiceUpdate", + "line": 313 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressLine2(v string) *BillingInvoiceUpdate", + "line": 319 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressLine2(v *string) *BillingInvoiceUpdate", + "line": 325 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressLine2() *BillingInvoiceUpdate", + "line": 333 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceUpdate", + "line": 339 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerAddressPhoneNumber(v *string) *BillingInvoiceUpdate", + "line": 345 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerAddressPhoneNumber() *BillingInvoiceUpdate", + "line": 353 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceUpdate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 359 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 365 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 373 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 379 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 393 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 401 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 407 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 415 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 421 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 429 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 435 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 443 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 449 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 457 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdate", + "line": 463 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetInvoicingAppExternalID(v string) *BillingInvoiceUpdate", + "line": 471 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceUpdate", + "line": 477 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) ClearInvoicingAppExternalID() *BillingInvoiceUpdate", + "line": 485 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetPaymentAppExternalID(v string) *BillingInvoiceUpdate", + "line": 491 + }, + { + "kind": "func", + "name": "SetNillablePaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetNillablePaymentAppExternalID(v *string) *BillingInvoiceUpdate", + "line": 497 + }, + { + "kind": "func", + "name": "ClearPaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) ClearPaymentAppExternalID() *BillingInvoiceUpdate", + "line": 505 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetTaxAppExternalID(v string) *BillingInvoiceUpdate", + "line": 511 + }, + { + "kind": "func", + "name": "SetNillableTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableTaxAppExternalID(v *string) *BillingInvoiceUpdate", + "line": 517 + }, + { + "kind": "func", + "name": "ClearTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdate) ClearTaxAppExternalID() *BillingInvoiceUpdate", + "line": 525 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierName(v string) *BillingInvoiceUpdate", + "line": 531 + }, + { + "kind": "func", + "name": "SetNillableSupplierName", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierName(v *string) *BillingInvoiceUpdate", + "line": 537 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdate) SetSupplierTaxCode(v string) *BillingInvoiceUpdate", + "line": 545 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSupplierTaxCode(v *string) *BillingInvoiceUpdate", + "line": 551 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdate) ClearSupplierTaxCode() *BillingInvoiceUpdate", + "line": 559 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerKey(v string) *BillingInvoiceUpdate", + "line": 565 + }, + { + "kind": "func", + "name": "SetNillableCustomerKey", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerKey(v *string) *BillingInvoiceUpdate", + "line": 571 + }, + { + "kind": "func", + "name": "ClearCustomerKey", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerKey() *BillingInvoiceUpdate", + "line": 579 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerName(v string) *BillingInvoiceUpdate", + "line": 585 + }, + { + "kind": "func", + "name": "SetNillableCustomerName", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCustomerName(v *string) *BillingInvoiceUpdate", + "line": 591 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (_u *BillingInvoiceUpdate) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpdate", + "line": 599 + }, + { + "kind": "func", + "name": "ClearCustomerUsageAttribution", + "signature": "func (_u *BillingInvoiceUpdate) ClearCustomerUsageAttribution() *BillingInvoiceUpdate", + "line": 605 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetNumber(v string) *BillingInvoiceUpdate", + "line": 611 + }, + { + "kind": "func", + "name": "SetNillableNumber", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableNumber(v *string) *BillingInvoiceUpdate", + "line": 617 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *BillingInvoiceUpdate) SetType(v billing.InvoiceType) *BillingInvoiceUpdate", + "line": 625 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableType(v *billing.InvoiceType) *BillingInvoiceUpdate", + "line": 631 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceUpdate) SetDescription(v string) *BillingInvoiceUpdate", + "line": 639 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableDescription(v *string) *BillingInvoiceUpdate", + "line": 645 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceUpdate) ClearDescription() *BillingInvoiceUpdate", + "line": 653 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetVoidedAt(v time.Time) *BillingInvoiceUpdate", + "line": 659 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableVoidedAt(v *time.Time) *BillingInvoiceUpdate", + "line": 665 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearVoidedAt() *BillingInvoiceUpdate", + "line": 673 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetIssuedAt(v time.Time) *BillingInvoiceUpdate", + "line": 679 + }, + { + "kind": "func", + "name": "SetNillableIssuedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableIssuedAt(v *time.Time) *BillingInvoiceUpdate", + "line": 685 + }, + { + "kind": "func", + "name": "ClearIssuedAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearIssuedAt() *BillingInvoiceUpdate", + "line": 693 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdate) SetSentToCustomerAt(v time.Time) *BillingInvoiceUpdate", + "line": 699 + }, + { + "kind": "func", + "name": "SetNillableSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSentToCustomerAt(v *time.Time) *BillingInvoiceUpdate", + "line": 705 + }, + { + "kind": "func", + "name": "ClearSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearSentToCustomerAt() *BillingInvoiceUpdate", + "line": 713 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (_u *BillingInvoiceUpdate) SetDraftUntil(v time.Time) *BillingInvoiceUpdate", + "line": 719 + }, + { + "kind": "func", + "name": "SetNillableDraftUntil", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableDraftUntil(v *time.Time) *BillingInvoiceUpdate", + "line": 725 + }, + { + "kind": "func", + "name": "ClearDraftUntil", + "signature": "func (_u *BillingInvoiceUpdate) ClearDraftUntil() *BillingInvoiceUpdate", + "line": 733 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceUpdate", + "line": 739 + }, + { + "kind": "func", + "name": "SetNillableQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableQuantitySnapshotedAt(v *time.Time) *BillingInvoiceUpdate", + "line": 745 + }, + { + "kind": "func", + "name": "ClearQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearQuantitySnapshotedAt() *BillingInvoiceUpdate", + "line": 753 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (_u *BillingInvoiceUpdate) SetDueAt(v time.Time) *BillingInvoiceUpdate", + "line": 759 + }, + { + "kind": "func", + "name": "SetNillableDueAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableDueAt(v *time.Time) *BillingInvoiceUpdate", + "line": 765 + }, + { + "kind": "func", + "name": "ClearDueAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearDueAt() *BillingInvoiceUpdate", + "line": 773 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *BillingInvoiceUpdate) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceUpdate", + "line": 779 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableStatus(v *billing.StandardInvoiceStatus) *BillingInvoiceUpdate", + "line": 785 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdate) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdate", + "line": 793 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableStatusDetailsCache(v *billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdate", + "line": 799 + }, + { + "kind": "func", + "name": "ClearStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdate) ClearStatusDetailsCache() *BillingInvoiceUpdate", + "line": 807 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdate) SetWorkflowConfigID(v string) *BillingInvoiceUpdate", + "line": 813 + }, + { + "kind": "func", + "name": "SetNillableWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableWorkflowConfigID(v *string) *BillingInvoiceUpdate", + "line": 819 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_u *BillingInvoiceUpdate) SetPeriodStart(v time.Time) *BillingInvoiceUpdate", + "line": 827 + }, + { + "kind": "func", + "name": "SetNillablePeriodStart", + "signature": "func (_u *BillingInvoiceUpdate) SetNillablePeriodStart(v *time.Time) *BillingInvoiceUpdate", + "line": 833 + }, + { + "kind": "func", + "name": "ClearPeriodStart", + "signature": "func (_u *BillingInvoiceUpdate) ClearPeriodStart() *BillingInvoiceUpdate", + "line": 841 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_u *BillingInvoiceUpdate) SetPeriodEnd(v time.Time) *BillingInvoiceUpdate", + "line": 847 + }, + { + "kind": "func", + "name": "SetNillablePeriodEnd", + "signature": "func (_u *BillingInvoiceUpdate) SetNillablePeriodEnd(v *time.Time) *BillingInvoiceUpdate", + "line": 853 + }, + { + "kind": "func", + "name": "ClearPeriodEnd", + "signature": "func (_u *BillingInvoiceUpdate) ClearPeriodEnd() *BillingInvoiceUpdate", + "line": 861 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (_u *BillingInvoiceUpdate) SetCollectionAt(v time.Time) *BillingInvoiceUpdate", + "line": 867 + }, + { + "kind": "func", + "name": "SetNillableCollectionAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableCollectionAt(v *time.Time) *BillingInvoiceUpdate", + "line": 873 + }, + { + "kind": "func", + "name": "ClearCollectionAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearCollectionAt() *BillingInvoiceUpdate", + "line": 881 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdate) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceUpdate", + "line": 887 + }, + { + "kind": "func", + "name": "SetNillablePaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdate) SetNillablePaymentProcessingEnteredAt(v *time.Time) *BillingInvoiceUpdate", + "line": 893 + }, + { + "kind": "func", + "name": "ClearPaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdate) ClearPaymentProcessingEnteredAt() *BillingInvoiceUpdate", + "line": 901 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdate) SetSchemaLevel(v int) *BillingInvoiceUpdate", + "line": 907 + }, + { + "kind": "func", + "name": "SetNillableSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdate) SetNillableSchemaLevel(v *int) *BillingInvoiceUpdate", + "line": 914 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdate) AddSchemaLevel(v int) *BillingInvoiceUpdate", + "line": 922 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdate) SetBillingWorkflowConfigID(id string) *BillingInvoiceUpdate", + "line": 928 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfig", + "signature": "func (_u *BillingInvoiceUpdate) SetBillingWorkflowConfig(v *BillingWorkflowConfig) *BillingInvoiceUpdate", + "line": 934 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceUpdate", + "line": 939 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceUpdate", + "line": 945 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLineIDs", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceDetailedLineIDs(ids ...string) *BillingInvoiceUpdate", + "line": 954 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceUpdate", + "line": 960 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssueIDs", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceValidationIssueIDs(ids ...string) *BillingInvoiceUpdate", + "line": 969 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdate) AddBillingInvoiceValidationIssues(v ...*BillingInvoiceValidationIssue) *BillingInvoiceUpdate", + "line": 975 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunIDs", + "signature": "func (_u *BillingInvoiceUpdate) AddChargeFlatFeeRunIDs(ids ...string) *BillingInvoiceUpdate", + "line": 984 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdate) AddChargeFlatFeeRuns(v ...*ChargeFlatFeeRun) *BillingInvoiceUpdate", + "line": 990 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunIDs", + "signature": "func (_u *BillingInvoiceUpdate) AddChargeUsageBasedRunIDs(ids ...string) *BillingInvoiceUpdate", + "line": 999 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdate) AddChargeUsageBasedRuns(v ...*ChargeUsageBasedRuns) *BillingInvoiceUpdate", + "line": 1005 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceUpdate) Mutation() *BillingInvoiceMutation", + "line": 1014 + }, + { + "kind": "func", + "name": "ClearBillingWorkflowConfig", + "signature": "func (_u *BillingInvoiceUpdate) ClearBillingWorkflowConfig() *BillingInvoiceUpdate", + "line": 1019 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdate) ClearBillingInvoiceLines() *BillingInvoiceUpdate", + "line": 1025 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceLineIDs(ids ...string) *BillingInvoiceUpdate", + "line": 1031 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceUpdate", + "line": 1037 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdate) ClearBillingInvoiceDetailedLines() *BillingInvoiceUpdate", + "line": 1046 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceDetailedLineIDs", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceDetailedLineIDs(ids ...string) *BillingInvoiceUpdate", + "line": 1052 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceUpdate", + "line": 1058 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdate) ClearBillingInvoiceValidationIssues() *BillingInvoiceUpdate", + "line": 1067 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceValidationIssueIDs", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceValidationIssueIDs(ids ...string) *BillingInvoiceUpdate", + "line": 1073 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdate) RemoveBillingInvoiceValidationIssues(v ...*BillingInvoiceValidationIssue) *BillingInvoiceUpdate", + "line": 1079 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdate) ClearChargeFlatFeeRuns() *BillingInvoiceUpdate", + "line": 1088 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunIDs", + "signature": "func (_u *BillingInvoiceUpdate) RemoveChargeFlatFeeRunIDs(ids ...string) *BillingInvoiceUpdate", + "line": 1094 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdate) RemoveChargeFlatFeeRuns(v ...*ChargeFlatFeeRun) *BillingInvoiceUpdate", + "line": 1100 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdate) ClearChargeUsageBasedRuns() *BillingInvoiceUpdate", + "line": 1109 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunIDs", + "signature": "func (_u *BillingInvoiceUpdate) RemoveChargeUsageBasedRunIDs(ids ...string) *BillingInvoiceUpdate", + "line": 1115 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdate) RemoveChargeUsageBasedRuns(v ...*ChargeUsageBasedRuns) *BillingInvoiceUpdate", + "line": 1121 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceUpdate) Save(ctx context.Context) (int, error)", + "line": 1130 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceUpdate) SaveX(ctx context.Context) int", + "line": 1136 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceUpdate) Exec(ctx context.Context) error", + "line": 1145 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceUpdate) ExecX(ctx context.Context)", + "line": 1151 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceUpdate) defaults()", + "line": 1158 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceUpdate) check() error", + "line": 1166 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 1223 + }, + { + "kind": "struct", + "name": "BillingInvoiceUpdateOne", + "signature": "type BillingInvoiceUpdateOne struct", + "line": 1754 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceUpdateOne) SetMetadata(v map[string]string) *BillingInvoiceUpdateOne", + "line": 1762 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearMetadata() *BillingInvoiceUpdateOne", + "line": 1768 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 1774 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 1780 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 1786 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearDeletedAt() *BillingInvoiceUpdateOne", + "line": 1794 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressCountry(v models.CountryCode) *BillingInvoiceUpdateOne", + "line": 1800 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingInvoiceUpdateOne", + "line": 1806 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressCountry() *BillingInvoiceUpdateOne", + "line": 1814 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressPostalCode(v string) *BillingInvoiceUpdateOne", + "line": 1820 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressPostalCode(v *string) *BillingInvoiceUpdateOne", + "line": 1826 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressPostalCode() *BillingInvoiceUpdateOne", + "line": 1834 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressState(v string) *BillingInvoiceUpdateOne", + "line": 1840 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressState(v *string) *BillingInvoiceUpdateOne", + "line": 1846 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressState() *BillingInvoiceUpdateOne", + "line": 1854 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressCity(v string) *BillingInvoiceUpdateOne", + "line": 1860 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressCity(v *string) *BillingInvoiceUpdateOne", + "line": 1866 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressCity() *BillingInvoiceUpdateOne", + "line": 1874 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressLine1(v string) *BillingInvoiceUpdateOne", + "line": 1880 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressLine1(v *string) *BillingInvoiceUpdateOne", + "line": 1886 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressLine1() *BillingInvoiceUpdateOne", + "line": 1894 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressLine2(v string) *BillingInvoiceUpdateOne", + "line": 1900 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressLine2(v *string) *BillingInvoiceUpdateOne", + "line": 1906 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressLine2() *BillingInvoiceUpdateOne", + "line": 1914 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierAddressPhoneNumber(v string) *BillingInvoiceUpdateOne", + "line": 1920 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierAddressPhoneNumber(v *string) *BillingInvoiceUpdateOne", + "line": 1926 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierAddressPhoneNumber() *BillingInvoiceUpdateOne", + "line": 1934 + }, + { + "kind": "func", + "name": "SetCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressCountry(v models.CountryCode) *BillingInvoiceUpdateOne", + "line": 1940 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressCountry(v *models.CountryCode) *BillingInvoiceUpdateOne", + "line": 1946 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCountry", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressCountry() *BillingInvoiceUpdateOne", + "line": 1954 + }, + { + "kind": "func", + "name": "SetCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressPostalCode(v string) *BillingInvoiceUpdateOne", + "line": 1960 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressPostalCode(v *string) *BillingInvoiceUpdateOne", + "line": 1966 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPostalCode", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressPostalCode() *BillingInvoiceUpdateOne", + "line": 1974 + }, + { + "kind": "func", + "name": "SetCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressState(v string) *BillingInvoiceUpdateOne", + "line": 1980 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressState(v *string) *BillingInvoiceUpdateOne", + "line": 1986 + }, + { + "kind": "func", + "name": "ClearCustomerAddressState", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressState() *BillingInvoiceUpdateOne", + "line": 1994 + }, + { + "kind": "func", + "name": "SetCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressCity(v string) *BillingInvoiceUpdateOne", + "line": 2000 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressCity(v *string) *BillingInvoiceUpdateOne", + "line": 2006 + }, + { + "kind": "func", + "name": "ClearCustomerAddressCity", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressCity() *BillingInvoiceUpdateOne", + "line": 2014 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressLine1(v string) *BillingInvoiceUpdateOne", + "line": 2020 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressLine1(v *string) *BillingInvoiceUpdateOne", + "line": 2026 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine1", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressLine1() *BillingInvoiceUpdateOne", + "line": 2034 + }, + { + "kind": "func", + "name": "SetCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressLine2(v string) *BillingInvoiceUpdateOne", + "line": 2040 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressLine2(v *string) *BillingInvoiceUpdateOne", + "line": 2046 + }, + { + "kind": "func", + "name": "ClearCustomerAddressLine2", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressLine2() *BillingInvoiceUpdateOne", + "line": 2054 + }, + { + "kind": "func", + "name": "SetCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerAddressPhoneNumber(v string) *BillingInvoiceUpdateOne", + "line": 2060 + }, + { + "kind": "func", + "name": "SetNillableCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerAddressPhoneNumber(v *string) *BillingInvoiceUpdateOne", + "line": 2066 + }, + { + "kind": "func", + "name": "ClearCustomerAddressPhoneNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerAddressPhoneNumber() *BillingInvoiceUpdateOne", + "line": 2074 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceUpdateOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2080 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2086 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2094 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2100 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2108 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2114 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2122 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2128 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2136 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2142 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2150 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2156 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2164 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2170 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2178 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *BillingInvoiceUpdateOne", + "line": 2184 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetInvoicingAppExternalID(v string) *BillingInvoiceUpdateOne", + "line": 2192 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceUpdateOne", + "line": 2198 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearInvoicingAppExternalID() *BillingInvoiceUpdateOne", + "line": 2206 + }, + { + "kind": "func", + "name": "SetPaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetPaymentAppExternalID(v string) *BillingInvoiceUpdateOne", + "line": 2212 + }, + { + "kind": "func", + "name": "SetNillablePaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillablePaymentAppExternalID(v *string) *BillingInvoiceUpdateOne", + "line": 2218 + }, + { + "kind": "func", + "name": "ClearPaymentAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearPaymentAppExternalID() *BillingInvoiceUpdateOne", + "line": 2226 + }, + { + "kind": "func", + "name": "SetTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetTaxAppExternalID(v string) *BillingInvoiceUpdateOne", + "line": 2232 + }, + { + "kind": "func", + "name": "SetNillableTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableTaxAppExternalID(v *string) *BillingInvoiceUpdateOne", + "line": 2238 + }, + { + "kind": "func", + "name": "ClearTaxAppExternalID", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearTaxAppExternalID() *BillingInvoiceUpdateOne", + "line": 2246 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierName(v string) *BillingInvoiceUpdateOne", + "line": 2252 + }, + { + "kind": "func", + "name": "SetNillableSupplierName", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierName(v *string) *BillingInvoiceUpdateOne", + "line": 2258 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSupplierTaxCode(v string) *BillingInvoiceUpdateOne", + "line": 2266 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSupplierTaxCode(v *string) *BillingInvoiceUpdateOne", + "line": 2272 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSupplierTaxCode() *BillingInvoiceUpdateOne", + "line": 2280 + }, + { + "kind": "func", + "name": "SetCustomerKey", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerKey(v string) *BillingInvoiceUpdateOne", + "line": 2286 + }, + { + "kind": "func", + "name": "SetNillableCustomerKey", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerKey(v *string) *BillingInvoiceUpdateOne", + "line": 2292 + }, + { + "kind": "func", + "name": "ClearCustomerKey", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerKey() *BillingInvoiceUpdateOne", + "line": 2300 + }, + { + "kind": "func", + "name": "SetCustomerName", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerName(v string) *BillingInvoiceUpdateOne", + "line": 2306 + }, + { + "kind": "func", + "name": "SetNillableCustomerName", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCustomerName(v *string) *BillingInvoiceUpdateOne", + "line": 2312 + }, + { + "kind": "func", + "name": "SetCustomerUsageAttribution", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCustomerUsageAttribution(v *billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpdateOne", + "line": 2320 + }, + { + "kind": "func", + "name": "ClearCustomerUsageAttribution", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCustomerUsageAttribution() *BillingInvoiceUpdateOne", + "line": 2326 + }, + { + "kind": "func", + "name": "SetNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNumber(v string) *BillingInvoiceUpdateOne", + "line": 2332 + }, + { + "kind": "func", + "name": "SetNillableNumber", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableNumber(v *string) *BillingInvoiceUpdateOne", + "line": 2338 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *BillingInvoiceUpdateOne) SetType(v billing.InvoiceType) *BillingInvoiceUpdateOne", + "line": 2346 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableType(v *billing.InvoiceType) *BillingInvoiceUpdateOne", + "line": 2352 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceUpdateOne) SetDescription(v string) *BillingInvoiceUpdateOne", + "line": 2360 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableDescription(v *string) *BillingInvoiceUpdateOne", + "line": 2366 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearDescription() *BillingInvoiceUpdateOne", + "line": 2374 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetVoidedAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2380 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableVoidedAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2386 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearVoidedAt() *BillingInvoiceUpdateOne", + "line": 2394 + }, + { + "kind": "func", + "name": "SetIssuedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetIssuedAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2400 + }, + { + "kind": "func", + "name": "SetNillableIssuedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableIssuedAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2406 + }, + { + "kind": "func", + "name": "ClearIssuedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearIssuedAt() *BillingInvoiceUpdateOne", + "line": 2414 + }, + { + "kind": "func", + "name": "SetSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSentToCustomerAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2420 + }, + { + "kind": "func", + "name": "SetNillableSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSentToCustomerAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2426 + }, + { + "kind": "func", + "name": "ClearSentToCustomerAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearSentToCustomerAt() *BillingInvoiceUpdateOne", + "line": 2434 + }, + { + "kind": "func", + "name": "SetDraftUntil", + "signature": "func (_u *BillingInvoiceUpdateOne) SetDraftUntil(v time.Time) *BillingInvoiceUpdateOne", + "line": 2440 + }, + { + "kind": "func", + "name": "SetNillableDraftUntil", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableDraftUntil(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2446 + }, + { + "kind": "func", + "name": "ClearDraftUntil", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearDraftUntil() *BillingInvoiceUpdateOne", + "line": 2454 + }, + { + "kind": "func", + "name": "SetQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetQuantitySnapshotedAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2460 + }, + { + "kind": "func", + "name": "SetNillableQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableQuantitySnapshotedAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2466 + }, + { + "kind": "func", + "name": "ClearQuantitySnapshotedAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearQuantitySnapshotedAt() *BillingInvoiceUpdateOne", + "line": 2474 + }, + { + "kind": "func", + "name": "SetDueAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetDueAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2480 + }, + { + "kind": "func", + "name": "SetNillableDueAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableDueAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2486 + }, + { + "kind": "func", + "name": "ClearDueAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearDueAt() *BillingInvoiceUpdateOne", + "line": 2494 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *BillingInvoiceUpdateOne) SetStatus(v billing.StandardInvoiceStatus) *BillingInvoiceUpdateOne", + "line": 2500 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableStatus(v *billing.StandardInvoiceStatus) *BillingInvoiceUpdateOne", + "line": 2506 + }, + { + "kind": "func", + "name": "SetStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdateOne) SetStatusDetailsCache(v billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdateOne", + "line": 2514 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableStatusDetailsCache(v *billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdateOne", + "line": 2520 + }, + { + "kind": "func", + "name": "ClearStatusDetailsCache", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearStatusDetailsCache() *BillingInvoiceUpdateOne", + "line": 2528 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetWorkflowConfigID(v string) *BillingInvoiceUpdateOne", + "line": 2534 + }, + { + "kind": "func", + "name": "SetNillableWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableWorkflowConfigID(v *string) *BillingInvoiceUpdateOne", + "line": 2540 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_u *BillingInvoiceUpdateOne) SetPeriodStart(v time.Time) *BillingInvoiceUpdateOne", + "line": 2548 + }, + { + "kind": "func", + "name": "SetNillablePeriodStart", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillablePeriodStart(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2554 + }, + { + "kind": "func", + "name": "ClearPeriodStart", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearPeriodStart() *BillingInvoiceUpdateOne", + "line": 2562 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_u *BillingInvoiceUpdateOne) SetPeriodEnd(v time.Time) *BillingInvoiceUpdateOne", + "line": 2568 + }, + { + "kind": "func", + "name": "SetNillablePeriodEnd", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillablePeriodEnd(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2574 + }, + { + "kind": "func", + "name": "ClearPeriodEnd", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearPeriodEnd() *BillingInvoiceUpdateOne", + "line": 2582 + }, + { + "kind": "func", + "name": "SetCollectionAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetCollectionAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2588 + }, + { + "kind": "func", + "name": "SetNillableCollectionAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableCollectionAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2594 + }, + { + "kind": "func", + "name": "ClearCollectionAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearCollectionAt() *BillingInvoiceUpdateOne", + "line": 2602 + }, + { + "kind": "func", + "name": "SetPaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetPaymentProcessingEnteredAt(v time.Time) *BillingInvoiceUpdateOne", + "line": 2608 + }, + { + "kind": "func", + "name": "SetNillablePaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillablePaymentProcessingEnteredAt(v *time.Time) *BillingInvoiceUpdateOne", + "line": 2614 + }, + { + "kind": "func", + "name": "ClearPaymentProcessingEnteredAt", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearPaymentProcessingEnteredAt() *BillingInvoiceUpdateOne", + "line": 2622 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdateOne) SetSchemaLevel(v int) *BillingInvoiceUpdateOne", + "line": 2628 + }, + { + "kind": "func", + "name": "SetNillableSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdateOne) SetNillableSchemaLevel(v *int) *BillingInvoiceUpdateOne", + "line": 2635 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (_u *BillingInvoiceUpdateOne) AddSchemaLevel(v int) *BillingInvoiceUpdateOne", + "line": 2643 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfigID", + "signature": "func (_u *BillingInvoiceUpdateOne) SetBillingWorkflowConfigID(id string) *BillingInvoiceUpdateOne", + "line": 2649 + }, + { + "kind": "func", + "name": "SetBillingWorkflowConfig", + "signature": "func (_u *BillingInvoiceUpdateOne) SetBillingWorkflowConfig(v *BillingWorkflowConfig) *BillingInvoiceUpdateOne", + "line": 2655 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2660 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceUpdateOne", + "line": 2666 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLineIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceDetailedLineIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2675 + }, + { + "kind": "func", + "name": "AddBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceUpdateOne", + "line": 2681 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssueIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceValidationIssueIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2690 + }, + { + "kind": "func", + "name": "AddBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdateOne) AddBillingInvoiceValidationIssues(v ...*BillingInvoiceValidationIssue) *BillingInvoiceUpdateOne", + "line": 2696 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) AddChargeFlatFeeRunIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2705 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) AddChargeFlatFeeRuns(v ...*ChargeFlatFeeRun) *BillingInvoiceUpdateOne", + "line": 2711 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) AddChargeUsageBasedRunIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2720 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) AddChargeUsageBasedRuns(v ...*ChargeUsageBasedRuns) *BillingInvoiceUpdateOne", + "line": 2726 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceUpdateOne) Mutation() *BillingInvoiceMutation", + "line": 2735 + }, + { + "kind": "func", + "name": "ClearBillingWorkflowConfig", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearBillingWorkflowConfig() *BillingInvoiceUpdateOne", + "line": 2740 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearBillingInvoiceLines() *BillingInvoiceUpdateOne", + "line": 2746 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceLineIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2752 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceUpdateOne", + "line": 2758 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearBillingInvoiceDetailedLines() *BillingInvoiceUpdateOne", + "line": 2767 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceDetailedLineIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceDetailedLineIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2773 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceDetailedLines", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceUpdateOne", + "line": 2779 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearBillingInvoiceValidationIssues() *BillingInvoiceUpdateOne", + "line": 2788 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceValidationIssueIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceValidationIssueIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2794 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceValidationIssues", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveBillingInvoiceValidationIssues(v ...*BillingInvoiceValidationIssue) *BillingInvoiceUpdateOne", + "line": 2800 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearChargeFlatFeeRuns() *BillingInvoiceUpdateOne", + "line": 2809 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveChargeFlatFeeRunIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2815 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveChargeFlatFeeRuns(v ...*ChargeFlatFeeRun) *BillingInvoiceUpdateOne", + "line": 2821 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) ClearChargeUsageBasedRuns() *BillingInvoiceUpdateOne", + "line": 2830 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunIDs", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveChargeUsageBasedRunIDs(ids ...string) *BillingInvoiceUpdateOne", + "line": 2836 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRuns", + "signature": "func (_u *BillingInvoiceUpdateOne) RemoveChargeUsageBasedRuns(v ...*ChargeUsageBasedRuns) *BillingInvoiceUpdateOne", + "line": 2842 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceUpdateOne) Where(ps ...predicate.BillingInvoice) *BillingInvoiceUpdateOne", + "line": 2851 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceUpdateOne) Select(field string, fields ...string) *BillingInvoiceUpdateOne", + "line": 2858 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceUpdateOne) Save(ctx context.Context) (*BillingInvoice, error)", + "line": 2864 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceUpdateOne) SaveX(ctx context.Context) *BillingInvoice", + "line": 2870 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceUpdateOne) Exec(ctx context.Context) error", + "line": 2879 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceUpdateOne) ExecX(ctx context.Context)", + "line": 2885 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceUpdateOne) defaults()", + "line": 2892 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceUpdateOne) check() error", + "line": 2900 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoice, err error)", + "line": 2957 + } + ], + "line_count": 3505 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfig", + "signature": "type BillingInvoiceFlatFeeLineConfig struct", + "line": 18 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfig) assignValues(columns []string, values []any) error", + "line": 55 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfig) Value(name string) (ent.Value, error)", + "line": 107 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfig) Update() *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 114 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfig) Unwrap() *BillingInvoiceFlatFeeLineConfig", + "line": 120 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfig) String() string", + "line": 130 + } + ], + "line_count": 155 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig/billinginvoiceflatfeelineconfig.go": { + "header": "\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/stddetailedline\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 43 + }, + { + "kind": "func", + "name": "CategoryValidator", + "signature": "func CategoryValidator(c stddetailedline.Category) error", + "line": 62 + }, + { + "kind": "func", + "name": "PaymentTermValidator", + "signature": "func PaymentTermValidator(pt productcatalog.PaymentTermType) error", + "line": 74 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 87 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 92 + }, + { + "kind": "func", + "name": "ByPerUnitAmount", + "signature": "func ByPerUnitAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 97 + }, + { + "kind": "func", + "name": "ByCategory", + "signature": "func ByCategory(opts ...sql.OrderTermOption) OrderOption", + "line": 102 + }, + { + "kind": "func", + "name": "ByPaymentTerm", + "signature": "func ByPaymentTerm(opts ...sql.OrderTermOption) OrderOption", + "line": 107 + }, + { + "kind": "func", + "name": "ByIndex", + "signature": "func ByIndex(opts ...sql.OrderTermOption) OrderOption", + "line": 112 + } + ], + "line_count": 114 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig/where.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/models/stddetailedline\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 69 + }, + { + "kind": "func", + "name": "PerUnitAmount", + "signature": "func PerUnitAmount(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 74 + }, + { + "kind": "func", + "name": "Index", + "signature": "func Index(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 79 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 84 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 144 + }, + { + "kind": "func", + "name": "PerUnitAmountEQ", + "signature": "func PerUnitAmountEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 149 + }, + { + "kind": "func", + "name": "PerUnitAmountNEQ", + "signature": "func PerUnitAmountNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 154 + }, + { + "kind": "func", + "name": "PerUnitAmountIn", + "signature": "func PerUnitAmountIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 159 + }, + { + "kind": "func", + "name": "PerUnitAmountNotIn", + "signature": "func PerUnitAmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 164 + }, + { + "kind": "func", + "name": "PerUnitAmountGT", + "signature": "func PerUnitAmountGT(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 169 + }, + { + "kind": "func", + "name": "PerUnitAmountGTE", + "signature": "func PerUnitAmountGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 174 + }, + { + "kind": "func", + "name": "PerUnitAmountLT", + "signature": "func PerUnitAmountLT(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 179 + }, + { + "kind": "func", + "name": "PerUnitAmountLTE", + "signature": "func PerUnitAmountLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 184 + }, + { + "kind": "func", + "name": "CategoryEQ", + "signature": "func CategoryEQ(v stddetailedline.Category) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 189 + }, + { + "kind": "func", + "name": "CategoryNEQ", + "signature": "func CategoryNEQ(v stddetailedline.Category) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 195 + }, + { + "kind": "func", + "name": "CategoryIn", + "signature": "func CategoryIn(vs ...stddetailedline.Category) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 201 + }, + { + "kind": "func", + "name": "CategoryNotIn", + "signature": "func CategoryNotIn(vs ...stddetailedline.Category) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 210 + }, + { + "kind": "func", + "name": "PaymentTermEQ", + "signature": "func PaymentTermEQ(v productcatalog.PaymentTermType) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 219 + }, + { + "kind": "func", + "name": "PaymentTermNEQ", + "signature": "func PaymentTermNEQ(v productcatalog.PaymentTermType) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 225 + }, + { + "kind": "func", + "name": "PaymentTermIn", + "signature": "func PaymentTermIn(vs ...productcatalog.PaymentTermType) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 231 + }, + { + "kind": "func", + "name": "PaymentTermNotIn", + "signature": "func PaymentTermNotIn(vs ...productcatalog.PaymentTermType) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 240 + }, + { + "kind": "func", + "name": "IndexEQ", + "signature": "func IndexEQ(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 249 + }, + { + "kind": "func", + "name": "IndexNEQ", + "signature": "func IndexNEQ(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 254 + }, + { + "kind": "func", + "name": "IndexIn", + "signature": "func IndexIn(vs ...int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 259 + }, + { + "kind": "func", + "name": "IndexNotIn", + "signature": "func IndexNotIn(vs ...int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 264 + }, + { + "kind": "func", + "name": "IndexGT", + "signature": "func IndexGT(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 269 + }, + { + "kind": "func", + "name": "IndexGTE", + "signature": "func IndexGTE(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 274 + }, + { + "kind": "func", + "name": "IndexLT", + "signature": "func IndexLT(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 279 + }, + { + "kind": "func", + "name": "IndexLTE", + "signature": "func IndexLTE(v int) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 284 + }, + { + "kind": "func", + "name": "IndexIsNil", + "signature": "func IndexIsNil() predicate.BillingInvoiceFlatFeeLineConfig", + "line": 289 + }, + { + "kind": "func", + "name": "IndexNotNil", + "signature": "func IndexNotNil() predicate.BillingInvoiceFlatFeeLineConfig", + "line": 294 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceFlatFeeLineConfig) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 299 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceFlatFeeLineConfig) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 304 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceFlatFeeLineConfig) predicate.BillingInvoiceFlatFeeLineConfig", + "line": 309 + } + ], + "line_count": 311 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigCreate", + "signature": "type BillingInvoiceFlatFeeLineConfigCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetNamespace(v string) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetNillableCategory(v *stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetNillableIndex(v *int) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetID(v string) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SetNillableID(v *string) *BillingInvoiceFlatFeeLineConfigCreate", + "line": 89 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) Mutation() *BillingInvoiceFlatFeeLineConfigMutation", + "line": 97 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) Save(ctx context.Context) (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 102 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) SaveX(ctx context.Context) *BillingInvoiceFlatFeeLineConfig", + "line": 108 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) Exec(ctx context.Context) error", + "line": 117 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) ExecX(ctx context.Context)", + "line": 123 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) defaults()", + "line": 130 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) check() error", + "line": 146 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) sqlSave(ctx context.Context) (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 177 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) createSpec() (*BillingInvoiceFlatFeeLineConfig, *sqlgraph.CreateSpec)", + "line": 200 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 249 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreate) OnConflictColumns(columns ...string) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 262 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 283 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) UpdatePerUnitAmount() *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 289 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 295 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) UpdateCategory() *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 301 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 307 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) UpdatePaymentTerm() *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 313 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 319 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) UpdateIndex() *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 325 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) AddIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 331 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsert) ClearIndex() *BillingInvoiceFlatFeeLineConfigUpsert", + "line": 337 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) UpdateNewValues() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 353 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) Ignore() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 372 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) DoNothing() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 379 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) Update(set func(*BillingInvoiceFlatFeeLineConfigUpsert)) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 386 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 394 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) UpdatePerUnitAmount() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 408 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) UpdateCategory() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 415 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 422 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) UpdatePaymentTerm() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 429 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 436 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) AddIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 443 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) UpdateIndex() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 450 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) ClearIndex() *BillingInvoiceFlatFeeLineConfigUpsertOne", + "line": 457 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) Exec(ctx context.Context) error", + "line": 464 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) ExecX(ctx context.Context)", + "line": 472 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 479 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertOne) IDX(ctx context.Context) string", + "line": 493 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigCreateBulk", + "signature": "type BillingInvoiceFlatFeeLineConfigCreateBulk struct", + "line": 502 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceFlatFeeLineConfig, error)", + "line": 510 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceFlatFeeLineConfig", + "line": 566 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) Exec(ctx context.Context) error", + "line": 575 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) ExecX(ctx context.Context)", + "line": 581 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 602 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceFlatFeeLineConfigCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 615 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigUpsertBulk", + "signature": "type BillingInvoiceFlatFeeLineConfigUpsertBulk struct", + "line": 624 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) UpdateNewValues() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 639 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) Ignore() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 660 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) DoNothing() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 667 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) Update(set func(*BillingInvoiceFlatFeeLineConfigUpsert)) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 674 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) UpdatePerUnitAmount() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 696 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) UpdateCategory() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 703 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 710 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) UpdatePaymentTerm() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 717 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 724 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) AddIndex(v int) *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 731 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) UpdateIndex() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 738 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) ClearIndex() *BillingInvoiceFlatFeeLineConfigUpsertBulk", + "line": 745 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) Exec(ctx context.Context) error", + "line": 752 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpsertBulk) ExecX(ctx context.Context)", + "line": 768 + } + ], + "line_count": 772 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigDelete", + "signature": "type BillingInvoiceFlatFeeLineConfigDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDelete) Where(ps ...predicate.BillingInvoiceFlatFeeLineConfig) *BillingInvoiceFlatFeeLineConfigDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigDeleteOne", + "signature": "type BillingInvoiceFlatFeeLineConfigDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDeleteOne) Where(ps ...predicate.BillingInvoiceFlatFeeLineConfig) *BillingInvoiceFlatFeeLineConfigDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceFlatFeeLineConfigDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigQuery", + "signature": "type BillingInvoiceFlatFeeLineConfigQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Where(ps ...predicate.BillingInvoiceFlatFeeLineConfig) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Limit(limit int) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Offset(offset int) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Unique(unique bool) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Order(o ...billinginvoiceflatfeelineconfig.OrderOption) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) First(ctx context.Context) (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) FirstX(ctx context.Context) *BillingInvoiceFlatFeeLineConfig", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Only(ctx context.Context) (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) OnlyX(ctx context.Context) *BillingInvoiceFlatFeeLineConfig", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) All(ctx context.Context) ([]*BillingInvoiceFlatFeeLineConfig, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) AllX(ctx context.Context) []*BillingInvoiceFlatFeeLineConfig", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Clone() *BillingInvoiceFlatFeeLineConfigQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) GroupBy(field string, fields ...string) *BillingInvoiceFlatFeeLineConfigGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Select(fields ...string) *BillingInvoiceFlatFeeLineConfigSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceFlatFeeLineConfigSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceFlatFeeLineConfig, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceFlatFeeLineConfigQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceFlatFeeLineConfigQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigGroupBy", + "signature": "type BillingInvoiceFlatFeeLineConfigGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceFlatFeeLineConfigGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceFlatFeeLineConfigGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceFlatFeeLineConfigGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceFlatFeeLineConfigGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceFlatFeeLineConfigQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigSelect", + "signature": "type BillingInvoiceFlatFeeLineConfigSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceFlatFeeLineConfigSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceFlatFeeLineConfigSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceFlatFeeLineConfigSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceFlatFeeLineConfigSelect) sqlScan(ctx context.Context, root *BillingInvoiceFlatFeeLineConfigQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/billinginvoiceflatfeelineconfig_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigUpdate", + "signature": "type BillingInvoiceFlatFeeLineConfigUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) Where(ps ...predicate.BillingInvoiceFlatFeeLineConfig) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetNillableCategory(v *stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SetNillableIndex(v *int) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) AddIndex(v int) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) ClearIndex() *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) Mutation() *BillingInvoiceFlatFeeLineConfigMutation", + "line": 103 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) Save(ctx context.Context) (int, error)", + "line": 108 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) SaveX(ctx context.Context) int", + "line": 113 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) Exec(ctx context.Context) error", + "line": 122 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) ExecX(ctx context.Context)", + "line": 128 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) check() error", + "line": 135 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 149 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfigUpdateOne", + "signature": "type BillingInvoiceFlatFeeLineConfigUpdateOne struct", + "line": 192 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 200 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 206 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetCategory(v stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 214 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetNillableCategory(v *stddetailedline.Category) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 220 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 228 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 234 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetIndex(v int) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 242 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetNillableIndex(v *int) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 249 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) AddIndex(v int) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 257 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) ClearIndex() *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 263 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) Mutation() *BillingInvoiceFlatFeeLineConfigMutation", + "line": 269 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) Where(ps ...predicate.BillingInvoiceFlatFeeLineConfig) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 274 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) Select(field string, fields ...string) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 281 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) Save(ctx context.Context) (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 287 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) SaveX(ctx context.Context) *BillingInvoiceFlatFeeLineConfig", + "line": 292 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) Exec(ctx context.Context) error", + "line": 301 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) ExecX(ctx context.Context)", + "line": 307 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) check() error", + "line": 314 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceFlatFeeLineConfigUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceFlatFeeLineConfig, err error)", + "line": 328 + } + ], + "line_count": 388 + }, + "openmeter/ent/db/billinginvoiceline.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLine", + "signature": "type BillingInvoiceLine struct", + "line": 36 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineEdges", + "signature": "type BillingInvoiceLineEdges struct", + "line": 137 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e BillingInvoiceLineEdges) BillingInvoiceOrErr() (*BillingInvoice, error)", + "line": 183 + }, + { + "kind": "func", + "name": "SplitLineGroupOrErr", + "signature": "func (e BillingInvoiceLineEdges) SplitLineGroupOrErr() (*BillingInvoiceSplitLineGroup, error)", + "line": 194 + }, + { + "kind": "func", + "name": "FlatFeeLineOrErr", + "signature": "func (e BillingInvoiceLineEdges) FlatFeeLineOrErr() (*BillingInvoiceFlatFeeLineConfig, error)", + "line": 205 + }, + { + "kind": "func", + "name": "UsageBasedLineOrErr", + "signature": "func (e BillingInvoiceLineEdges) UsageBasedLineOrErr() (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 216 + }, + { + "kind": "func", + "name": "ParentLineOrErr", + "signature": "func (e BillingInvoiceLineEdges) ParentLineOrErr() (*BillingInvoiceLine, error)", + "line": 227 + }, + { + "kind": "func", + "name": "DetailedLinesOrErr", + "signature": "func (e BillingInvoiceLineEdges) DetailedLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 238 + }, + { + "kind": "func", + "name": "DetailedLinesV2OrErr", + "signature": "func (e BillingInvoiceLineEdges) DetailedLinesV2OrErr() ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 247 + }, + { + "kind": "func", + "name": "LineUsageDiscountsOrErr", + "signature": "func (e BillingInvoiceLineEdges) LineUsageDiscountsOrErr() ([]*BillingInvoiceLineUsageDiscount, error)", + "line": 256 + }, + { + "kind": "func", + "name": "LineAmountDiscountsOrErr", + "signature": "func (e BillingInvoiceLineEdges) LineAmountDiscountsOrErr() ([]*BillingInvoiceLineDiscount, error)", + "line": 265 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e BillingInvoiceLineEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 274 + }, + { + "kind": "func", + "name": "SubscriptionPhaseOrErr", + "signature": "func (e BillingInvoiceLineEdges) SubscriptionPhaseOrErr() (*SubscriptionPhase, error)", + "line": 285 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e BillingInvoiceLineEdges) SubscriptionItemOrErr() (*SubscriptionItem, error)", + "line": 296 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeOrErr() (*Charge, error)", + "line": 307 + }, + { + "kind": "func", + "name": "ChargeFlatFeeRunPaymentOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeFlatFeeRunPaymentOrErr() (*ChargeFlatFeeRunPayment, error)", + "line": 318 + }, + { + "kind": "func", + "name": "ChargeFlatFeeRunCreditAllocationsOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeFlatFeeRunCreditAllocationsOrErr() ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 329 + }, + { + "kind": "func", + "name": "ChargeFlatFeeRunsOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeFlatFeeRunsOrErr() (*ChargeFlatFeeRun, error)", + "line": 338 + }, + { + "kind": "func", + "name": "ChargeUsageBasedRunOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeUsageBasedRunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 349 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseInvoicedPaymentOrErr", + "signature": "func (e BillingInvoiceLineEdges) ChargeCreditPurchaseInvoicedPaymentOrErr() (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 360 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e BillingInvoiceLineEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 371 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceLine) assignValues(columns []string, values []any) error", + "line": 412 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceLine) Value(name string) (ent.Value, error)", + "line": 728 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *BillingInvoiceLine) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 733 + }, + { + "kind": "func", + "name": "QuerySplitLineGroup", + "signature": "func (_m *BillingInvoiceLine) QuerySplitLineGroup() *BillingInvoiceSplitLineGroupQuery", + "line": 738 + }, + { + "kind": "func", + "name": "QueryFlatFeeLine", + "signature": "func (_m *BillingInvoiceLine) QueryFlatFeeLine() *BillingInvoiceFlatFeeLineConfigQuery", + "line": 743 + }, + { + "kind": "func", + "name": "QueryUsageBasedLine", + "signature": "func (_m *BillingInvoiceLine) QueryUsageBasedLine() *BillingInvoiceUsageBasedLineConfigQuery", + "line": 748 + }, + { + "kind": "func", + "name": "QueryParentLine", + "signature": "func (_m *BillingInvoiceLine) QueryParentLine() *BillingInvoiceLineQuery", + "line": 753 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_m *BillingInvoiceLine) QueryDetailedLines() *BillingInvoiceLineQuery", + "line": 758 + }, + { + "kind": "func", + "name": "QueryDetailedLinesV2", + "signature": "func (_m *BillingInvoiceLine) QueryDetailedLinesV2() *BillingStandardInvoiceDetailedLineQuery", + "line": 763 + }, + { + "kind": "func", + "name": "QueryLineUsageDiscounts", + "signature": "func (_m *BillingInvoiceLine) QueryLineUsageDiscounts() *BillingInvoiceLineUsageDiscountQuery", + "line": 768 + }, + { + "kind": "func", + "name": "QueryLineAmountDiscounts", + "signature": "func (_m *BillingInvoiceLine) QueryLineAmountDiscounts() *BillingInvoiceLineDiscountQuery", + "line": 773 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *BillingInvoiceLine) QuerySubscription() *SubscriptionQuery", + "line": 778 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_m *BillingInvoiceLine) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 783 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *BillingInvoiceLine) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 788 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *BillingInvoiceLine) QueryCharge() *ChargeQuery", + "line": 793 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunPayment", + "signature": "func (_m *BillingInvoiceLine) QueryChargeFlatFeeRunPayment() *ChargeFlatFeeRunPaymentQuery", + "line": 798 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunCreditAllocations", + "signature": "func (_m *BillingInvoiceLine) QueryChargeFlatFeeRunCreditAllocations() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 803 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRuns", + "signature": "func (_m *BillingInvoiceLine) QueryChargeFlatFeeRuns() *ChargeFlatFeeRunQuery", + "line": 808 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRun", + "signature": "func (_m *BillingInvoiceLine) QueryChargeUsageBasedRun() *ChargeUsageBasedRunsQuery", + "line": 813 + }, + { + "kind": "func", + "name": "QueryChargeCreditPurchaseInvoicedPayment", + "signature": "func (_m *BillingInvoiceLine) QueryChargeCreditPurchaseInvoicedPayment() *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 818 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *BillingInvoiceLine) QueryTaxCode() *TaxCodeQuery", + "line": 823 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceLine) Update() *BillingInvoiceLineUpdateOne", + "line": 830 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceLine) Unwrap() *BillingInvoiceLine", + "line": 836 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceLine) String() string", + "line": 846 + } + ], + "line_count": 1021 + }, + "openmeter/ent/db/billinginvoiceline/billinginvoiceline.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 332 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 372 + }, + { + "kind": "func", + "name": "ManagedByValidator", + "signature": "func ManagedByValidator(mb billing.InvoiceLineManagedBy) error", + "line": 382 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type billing.InvoiceLineAdapterType) error", + "line": 392 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s billing.InvoiceLineStatus) error", + "line": 402 + }, + { + "kind": "func", + "name": "EngineValidator", + "signature": "func EngineValidator(e billing.LineEngineType) error", + "line": 414 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 427 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 432 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 437 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 442 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 447 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 452 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 457 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 462 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 467 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 472 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 477 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 482 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 487 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 492 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 497 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 502 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 507 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 512 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 517 + }, + { + "kind": "func", + "name": "ByPeriodStart", + "signature": "func ByPeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 522 + }, + { + "kind": "func", + "name": "ByPeriodEnd", + "signature": "func ByPeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 527 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 532 + }, + { + "kind": "func", + "name": "ByManagedBy", + "signature": "func ByManagedBy(opts ...sql.OrderTermOption) OrderOption", + "line": 537 + }, + { + "kind": "func", + "name": "ByParentLineID", + "signature": "func ByParentLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 542 + }, + { + "kind": "func", + "name": "ByInvoiceAt", + "signature": "func ByInvoiceAt(opts ...sql.OrderTermOption) OrderOption", + "line": 547 + }, + { + "kind": "func", + "name": "ByOverrideCollectionPeriodEnd", + "signature": "func ByOverrideCollectionPeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 552 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 557 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 562 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 567 + }, + { + "kind": "func", + "name": "ByRatecardDiscounts", + "signature": "func ByRatecardDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 572 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 577 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 582 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 587 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 592 + }, + { + "kind": "func", + "name": "BySubscriptionBillingPeriodFrom", + "signature": "func BySubscriptionBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 597 + }, + { + "kind": "func", + "name": "BySubscriptionBillingPeriodTo", + "signature": "func BySubscriptionBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 602 + }, + { + "kind": "func", + "name": "BySplitLineGroupID", + "signature": "func BySplitLineGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 607 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 612 + }, + { + "kind": "func", + "name": "ByEngine", + "signature": "func ByEngine(opts ...sql.OrderTermOption) OrderOption", + "line": 617 + }, + { + "kind": "func", + "name": "ByLineIds", + "signature": "func ByLineIds(opts ...sql.OrderTermOption) OrderOption", + "line": 622 + }, + { + "kind": "func", + "name": "ByCreditsApplied", + "signature": "func ByCreditsApplied(opts ...sql.OrderTermOption) OrderOption", + "line": 627 + }, + { + "kind": "func", + "name": "ByBillingInvoiceField", + "signature": "func ByBillingInvoiceField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 632 + }, + { + "kind": "func", + "name": "BySplitLineGroupField", + "signature": "func BySplitLineGroupField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 639 + }, + { + "kind": "func", + "name": "ByFlatFeeLineField", + "signature": "func ByFlatFeeLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 646 + }, + { + "kind": "func", + "name": "ByUsageBasedLineField", + "signature": "func ByUsageBasedLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 653 + }, + { + "kind": "func", + "name": "ByParentLineField", + "signature": "func ByParentLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 660 + }, + { + "kind": "func", + "name": "ByDetailedLinesCount", + "signature": "func ByDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 667 + }, + { + "kind": "func", + "name": "ByDetailedLines", + "signature": "func ByDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 674 + }, + { + "kind": "func", + "name": "ByDetailedLinesV2Count", + "signature": "func ByDetailedLinesV2Count(opts ...sql.OrderTermOption) OrderOption", + "line": 681 + }, + { + "kind": "func", + "name": "ByDetailedLinesV2", + "signature": "func ByDetailedLinesV2(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 688 + }, + { + "kind": "func", + "name": "ByLineUsageDiscountsCount", + "signature": "func ByLineUsageDiscountsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 695 + }, + { + "kind": "func", + "name": "ByLineUsageDiscounts", + "signature": "func ByLineUsageDiscounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 702 + }, + { + "kind": "func", + "name": "ByLineAmountDiscountsCount", + "signature": "func ByLineAmountDiscountsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 709 + }, + { + "kind": "func", + "name": "ByLineAmountDiscounts", + "signature": "func ByLineAmountDiscounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 716 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 723 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseField", + "signature": "func BySubscriptionPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 730 + }, + { + "kind": "func", + "name": "BySubscriptionItemField", + "signature": "func BySubscriptionItemField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 737 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 744 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunPaymentField", + "signature": "func ByChargeFlatFeeRunPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 751 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunCreditAllocationsCount", + "signature": "func ByChargeFlatFeeRunCreditAllocationsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 758 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunCreditAllocations", + "signature": "func ByChargeFlatFeeRunCreditAllocations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 765 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunsField", + "signature": "func ByChargeFlatFeeRunsField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 772 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedRunField", + "signature": "func ByChargeUsageBasedRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 779 + }, + { + "kind": "func", + "name": "ByChargeCreditPurchaseInvoicedPaymentField", + "signature": "func ByChargeCreditPurchaseInvoicedPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 786 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 793 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 798 + }, + { + "kind": "func", + "name": "newSplitLineGroupStep", + "signature": "func newSplitLineGroupStep() *sqlgraph.Step", + "line": 805 + }, + { + "kind": "func", + "name": "newFlatFeeLineStep", + "signature": "func newFlatFeeLineStep() *sqlgraph.Step", + "line": 812 + }, + { + "kind": "func", + "name": "newUsageBasedLineStep", + "signature": "func newUsageBasedLineStep() *sqlgraph.Step", + "line": 819 + }, + { + "kind": "func", + "name": "newParentLineStep", + "signature": "func newParentLineStep() *sqlgraph.Step", + "line": 826 + }, + { + "kind": "func", + "name": "newDetailedLinesStep", + "signature": "func newDetailedLinesStep() *sqlgraph.Step", + "line": 833 + }, + { + "kind": "func", + "name": "newDetailedLinesV2Step", + "signature": "func newDetailedLinesV2Step() *sqlgraph.Step", + "line": 840 + }, + { + "kind": "func", + "name": "newLineUsageDiscountsStep", + "signature": "func newLineUsageDiscountsStep() *sqlgraph.Step", + "line": 847 + }, + { + "kind": "func", + "name": "newLineAmountDiscountsStep", + "signature": "func newLineAmountDiscountsStep() *sqlgraph.Step", + "line": 854 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 861 + }, + { + "kind": "func", + "name": "newSubscriptionPhaseStep", + "signature": "func newSubscriptionPhaseStep() *sqlgraph.Step", + "line": 868 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 875 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 882 + }, + { + "kind": "func", + "name": "newChargeFlatFeeRunPaymentStep", + "signature": "func newChargeFlatFeeRunPaymentStep() *sqlgraph.Step", + "line": 889 + }, + { + "kind": "func", + "name": "newChargeFlatFeeRunCreditAllocationsStep", + "signature": "func newChargeFlatFeeRunCreditAllocationsStep() *sqlgraph.Step", + "line": 896 + }, + { + "kind": "func", + "name": "newChargeFlatFeeRunsStep", + "signature": "func newChargeFlatFeeRunsStep() *sqlgraph.Step", + "line": 903 + }, + { + "kind": "func", + "name": "newChargeUsageBasedRunStep", + "signature": "func newChargeUsageBasedRunStep() *sqlgraph.Step", + "line": 910 + }, + { + "kind": "func", + "name": "newChargeCreditPurchaseInvoicedPaymentStep", + "signature": "func newChargeCreditPurchaseInvoicedPaymentStep() *sqlgraph.Step", + "line": 917 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 924 + } + ], + "line_count": 930 + }, + "openmeter/ent/db/billinginvoiceline/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceLine", + "line": 18 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceLine", + "line": 23 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceLine", + "line": 28 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceLine", + "line": 33 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceLine", + "line": 38 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceLine", + "line": 43 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceLine", + "line": 48 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceLine", + "line": 53 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceLine", + "line": 58 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceLine", + "line": 63 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceLine", + "line": 68 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceLine", + "line": 73 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoiceLine", + "line": 78 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoiceLine", + "line": 83 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoiceLine", + "line": 88 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.BillingInvoiceLine", + "line": 93 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingInvoiceLine", + "line": 98 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 103 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.BillingInvoiceLine", + "line": 109 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 114 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 119 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 124 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 129 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 134 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 139 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 144 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 149 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingInvoiceLine", + "line": 154 + }, + { + "kind": "func", + "name": "PeriodStart", + "signature": "func PeriodStart(v time.Time) predicate.BillingInvoiceLine", + "line": 159 + }, + { + "kind": "func", + "name": "PeriodEnd", + "signature": "func PeriodEnd(v time.Time) predicate.BillingInvoiceLine", + "line": 164 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.BillingInvoiceLine", + "line": 169 + }, + { + "kind": "func", + "name": "ParentLineID", + "signature": "func ParentLineID(v string) predicate.BillingInvoiceLine", + "line": 174 + }, + { + "kind": "func", + "name": "InvoiceAt", + "signature": "func InvoiceAt(v time.Time) predicate.BillingInvoiceLine", + "line": 179 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEnd", + "signature": "func OverrideCollectionPeriodEnd(v time.Time) predicate.BillingInvoiceLine", + "line": 184 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 189 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.BillingInvoiceLine", + "line": 194 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.BillingInvoiceLine", + "line": 199 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.BillingInvoiceLine", + "line": 204 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.BillingInvoiceLine", + "line": 209 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFrom", + "signature": "func SubscriptionBillingPeriodFrom(v time.Time) predicate.BillingInvoiceLine", + "line": 214 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodTo", + "signature": "func SubscriptionBillingPeriodTo(v time.Time) predicate.BillingInvoiceLine", + "line": 219 + }, + { + "kind": "func", + "name": "SplitLineGroupID", + "signature": "func SplitLineGroupID(v string) predicate.BillingInvoiceLine", + "line": 224 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.BillingInvoiceLine", + "line": 229 + }, + { + "kind": "func", + "name": "LineIds", + "signature": "func LineIds(v string) predicate.BillingInvoiceLine", + "line": 234 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.BillingInvoiceLine", + "line": 239 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.BillingInvoiceLine", + "line": 244 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceLine", + "line": 249 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceLine", + "line": 254 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceLine", + "line": 259 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 264 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceLine", + "line": 269 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceLine", + "line": 274 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceLine", + "line": 279 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceLine", + "line": 284 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceLine", + "line": 289 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 294 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 299 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceLine", + "line": 304 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceLine", + "line": 309 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.BillingInvoiceLine", + "line": 314 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.BillingInvoiceLine", + "line": 319 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 324 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 329 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 334 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 339 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoiceLine", + "line": 344 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 349 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoiceLine", + "line": 354 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 359 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 364 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 369 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 374 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 379 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoiceLine", + "line": 384 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 389 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoiceLine", + "line": 394 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 399 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 404 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 409 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 414 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 419 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoiceLine", + "line": 424 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 429 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoiceLine", + "line": 434 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 439 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoiceLine", + "line": 444 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoiceLine", + "line": 449 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.BillingInvoiceLine", + "line": 454 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.BillingInvoiceLine", + "line": 459 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.BillingInvoiceLine", + "line": 464 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 469 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.BillingInvoiceLine", + "line": 474 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.BillingInvoiceLine", + "line": 479 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.BillingInvoiceLine", + "line": 484 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.BillingInvoiceLine", + "line": 489 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.BillingInvoiceLine", + "line": 494 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 499 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 504 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.BillingInvoiceLine", + "line": 509 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.BillingInvoiceLine", + "line": 514 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingInvoiceLine", + "line": 519 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingInvoiceLine", + "line": 524 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingInvoiceLine", + "line": 529 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 534 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingInvoiceLine", + "line": 539 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingInvoiceLine", + "line": 544 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingInvoiceLine", + "line": 549 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingInvoiceLine", + "line": 554 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingInvoiceLine", + "line": 559 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 564 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 569 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingInvoiceLine", + "line": 574 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingInvoiceLine", + "line": 579 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingInvoiceLine", + "line": 584 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingInvoiceLine", + "line": 589 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 594 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 600 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.BillingInvoiceLine", + "line": 606 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.BillingInvoiceLine", + "line": 615 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 624 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 630 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 636 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 642 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 648 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 654 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 660 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 666 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.BillingInvoiceLine", + "line": 672 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.BillingInvoiceLine", + "line": 678 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.BillingInvoiceLine", + "line": 683 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.BillingInvoiceLine", + "line": 688 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 693 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 698 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 703 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.BillingInvoiceLine", + "line": 708 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.BillingInvoiceLine", + "line": 713 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.BillingInvoiceLine", + "line": 718 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.BillingInvoiceLine", + "line": 723 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.BillingInvoiceLine", + "line": 728 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 733 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 738 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.BillingInvoiceLine", + "line": 743 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.BillingInvoiceLine", + "line": 748 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 753 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 758 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.BillingInvoiceLine", + "line": 763 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.BillingInvoiceLine", + "line": 769 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.BillingInvoiceLine", + "line": 775 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.BillingInvoiceLine", + "line": 784 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.BillingInvoiceLine", + "line": 793 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.BillingInvoiceLine", + "line": 798 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 803 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 808 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 813 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 818 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 823 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 828 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 833 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 838 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 843 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 848 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 853 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 858 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 863 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 868 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 873 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 878 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 883 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 888 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 893 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 898 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 903 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 908 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 913 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 918 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 923 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 928 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 933 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 938 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 943 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 948 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 953 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 958 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 963 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 968 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 973 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 978 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 983 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 988 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 993 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 998 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1003 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1008 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1013 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1018 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1023 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1028 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1033 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1038 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1043 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1048 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1053 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1058 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1063 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1068 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1073 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1078 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1083 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1088 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1093 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1098 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1103 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1108 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1113 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1118 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1123 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1128 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1133 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1138 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingInvoiceLine", + "line": 1143 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1148 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingInvoiceLine", + "line": 1153 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1158 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingInvoiceLine", + "line": 1163 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1168 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1173 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingInvoiceLine", + "line": 1178 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingInvoiceLine", + "line": 1183 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1188 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1193 + }, + { + "kind": "func", + "name": "PeriodStartEQ", + "signature": "func PeriodStartEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1198 + }, + { + "kind": "func", + "name": "PeriodStartNEQ", + "signature": "func PeriodStartNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1203 + }, + { + "kind": "func", + "name": "PeriodStartIn", + "signature": "func PeriodStartIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1208 + }, + { + "kind": "func", + "name": "PeriodStartNotIn", + "signature": "func PeriodStartNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1213 + }, + { + "kind": "func", + "name": "PeriodStartGT", + "signature": "func PeriodStartGT(v time.Time) predicate.BillingInvoiceLine", + "line": 1218 + }, + { + "kind": "func", + "name": "PeriodStartGTE", + "signature": "func PeriodStartGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1223 + }, + { + "kind": "func", + "name": "PeriodStartLT", + "signature": "func PeriodStartLT(v time.Time) predicate.BillingInvoiceLine", + "line": 1228 + }, + { + "kind": "func", + "name": "PeriodStartLTE", + "signature": "func PeriodStartLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1233 + }, + { + "kind": "func", + "name": "PeriodEndEQ", + "signature": "func PeriodEndEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1238 + }, + { + "kind": "func", + "name": "PeriodEndNEQ", + "signature": "func PeriodEndNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1243 + }, + { + "kind": "func", + "name": "PeriodEndIn", + "signature": "func PeriodEndIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1248 + }, + { + "kind": "func", + "name": "PeriodEndNotIn", + "signature": "func PeriodEndNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1253 + }, + { + "kind": "func", + "name": "PeriodEndGT", + "signature": "func PeriodEndGT(v time.Time) predicate.BillingInvoiceLine", + "line": 1258 + }, + { + "kind": "func", + "name": "PeriodEndGTE", + "signature": "func PeriodEndGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1263 + }, + { + "kind": "func", + "name": "PeriodEndLT", + "signature": "func PeriodEndLT(v time.Time) predicate.BillingInvoiceLine", + "line": 1268 + }, + { + "kind": "func", + "name": "PeriodEndLTE", + "signature": "func PeriodEndLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1273 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1278 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1283 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1288 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1293 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.BillingInvoiceLine", + "line": 1298 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1303 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.BillingInvoiceLine", + "line": 1308 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1313 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.BillingInvoiceLine", + "line": 1318 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1323 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1328 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1333 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1338 + }, + { + "kind": "func", + "name": "ManagedByEQ", + "signature": "func ManagedByEQ(v billing.InvoiceLineManagedBy) predicate.BillingInvoiceLine", + "line": 1343 + }, + { + "kind": "func", + "name": "ManagedByNEQ", + "signature": "func ManagedByNEQ(v billing.InvoiceLineManagedBy) predicate.BillingInvoiceLine", + "line": 1349 + }, + { + "kind": "func", + "name": "ManagedByIn", + "signature": "func ManagedByIn(vs ...billing.InvoiceLineManagedBy) predicate.BillingInvoiceLine", + "line": 1355 + }, + { + "kind": "func", + "name": "ManagedByNotIn", + "signature": "func ManagedByNotIn(vs ...billing.InvoiceLineManagedBy) predicate.BillingInvoiceLine", + "line": 1364 + }, + { + "kind": "func", + "name": "ParentLineIDEQ", + "signature": "func ParentLineIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1373 + }, + { + "kind": "func", + "name": "ParentLineIDNEQ", + "signature": "func ParentLineIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1378 + }, + { + "kind": "func", + "name": "ParentLineIDIn", + "signature": "func ParentLineIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1383 + }, + { + "kind": "func", + "name": "ParentLineIDNotIn", + "signature": "func ParentLineIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1388 + }, + { + "kind": "func", + "name": "ParentLineIDGT", + "signature": "func ParentLineIDGT(v string) predicate.BillingInvoiceLine", + "line": 1393 + }, + { + "kind": "func", + "name": "ParentLineIDGTE", + "signature": "func ParentLineIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1398 + }, + { + "kind": "func", + "name": "ParentLineIDLT", + "signature": "func ParentLineIDLT(v string) predicate.BillingInvoiceLine", + "line": 1403 + }, + { + "kind": "func", + "name": "ParentLineIDLTE", + "signature": "func ParentLineIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1408 + }, + { + "kind": "func", + "name": "ParentLineIDContains", + "signature": "func ParentLineIDContains(v string) predicate.BillingInvoiceLine", + "line": 1413 + }, + { + "kind": "func", + "name": "ParentLineIDHasPrefix", + "signature": "func ParentLineIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1418 + }, + { + "kind": "func", + "name": "ParentLineIDHasSuffix", + "signature": "func ParentLineIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1423 + }, + { + "kind": "func", + "name": "ParentLineIDIsNil", + "signature": "func ParentLineIDIsNil() predicate.BillingInvoiceLine", + "line": 1428 + }, + { + "kind": "func", + "name": "ParentLineIDNotNil", + "signature": "func ParentLineIDNotNil() predicate.BillingInvoiceLine", + "line": 1433 + }, + { + "kind": "func", + "name": "ParentLineIDEqualFold", + "signature": "func ParentLineIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1438 + }, + { + "kind": "func", + "name": "ParentLineIDContainsFold", + "signature": "func ParentLineIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1443 + }, + { + "kind": "func", + "name": "InvoiceAtEQ", + "signature": "func InvoiceAtEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1448 + }, + { + "kind": "func", + "name": "InvoiceAtNEQ", + "signature": "func InvoiceAtNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1453 + }, + { + "kind": "func", + "name": "InvoiceAtIn", + "signature": "func InvoiceAtIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1458 + }, + { + "kind": "func", + "name": "InvoiceAtNotIn", + "signature": "func InvoiceAtNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1463 + }, + { + "kind": "func", + "name": "InvoiceAtGT", + "signature": "func InvoiceAtGT(v time.Time) predicate.BillingInvoiceLine", + "line": 1468 + }, + { + "kind": "func", + "name": "InvoiceAtGTE", + "signature": "func InvoiceAtGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1473 + }, + { + "kind": "func", + "name": "InvoiceAtLT", + "signature": "func InvoiceAtLT(v time.Time) predicate.BillingInvoiceLine", + "line": 1478 + }, + { + "kind": "func", + "name": "InvoiceAtLTE", + "signature": "func InvoiceAtLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1483 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndEQ", + "signature": "func OverrideCollectionPeriodEndEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1488 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndNEQ", + "signature": "func OverrideCollectionPeriodEndNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1493 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndIn", + "signature": "func OverrideCollectionPeriodEndIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1498 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndNotIn", + "signature": "func OverrideCollectionPeriodEndNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1503 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndGT", + "signature": "func OverrideCollectionPeriodEndGT(v time.Time) predicate.BillingInvoiceLine", + "line": 1508 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndGTE", + "signature": "func OverrideCollectionPeriodEndGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1513 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndLT", + "signature": "func OverrideCollectionPeriodEndLT(v time.Time) predicate.BillingInvoiceLine", + "line": 1518 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndLTE", + "signature": "func OverrideCollectionPeriodEndLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1523 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndIsNil", + "signature": "func OverrideCollectionPeriodEndIsNil() predicate.BillingInvoiceLine", + "line": 1528 + }, + { + "kind": "func", + "name": "OverrideCollectionPeriodEndNotNil", + "signature": "func OverrideCollectionPeriodEndNotNil() predicate.BillingInvoiceLine", + "line": 1533 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v billing.InvoiceLineAdapterType) predicate.BillingInvoiceLine", + "line": 1538 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v billing.InvoiceLineAdapterType) predicate.BillingInvoiceLine", + "line": 1544 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...billing.InvoiceLineAdapterType) predicate.BillingInvoiceLine", + "line": 1550 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...billing.InvoiceLineAdapterType) predicate.BillingInvoiceLine", + "line": 1559 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v billing.InvoiceLineStatus) predicate.BillingInvoiceLine", + "line": 1568 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v billing.InvoiceLineStatus) predicate.BillingInvoiceLine", + "line": 1574 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...billing.InvoiceLineStatus) predicate.BillingInvoiceLine", + "line": 1580 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...billing.InvoiceLineStatus) predicate.BillingInvoiceLine", + "line": 1589 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1598 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1603 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1608 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1613 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1618 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1623 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1628 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLine", + "line": 1633 + }, + { + "kind": "func", + "name": "QuantityIsNil", + "signature": "func QuantityIsNil() predicate.BillingInvoiceLine", + "line": 1638 + }, + { + "kind": "func", + "name": "QuantityNotNil", + "signature": "func QuantityNotNil() predicate.BillingInvoiceLine", + "line": 1643 + }, + { + "kind": "func", + "name": "RatecardDiscountsIsNil", + "signature": "func RatecardDiscountsIsNil() predicate.BillingInvoiceLine", + "line": 1648 + }, + { + "kind": "func", + "name": "RatecardDiscountsNotNil", + "signature": "func RatecardDiscountsNotNil() predicate.BillingInvoiceLine", + "line": 1653 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1658 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1663 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1668 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1673 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.BillingInvoiceLine", + "line": 1678 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1683 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.BillingInvoiceLine", + "line": 1688 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1693 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.BillingInvoiceLine", + "line": 1698 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1703 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1708 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIsNil", + "signature": "func ChildUniqueReferenceIDIsNil() predicate.BillingInvoiceLine", + "line": 1713 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotNil", + "signature": "func ChildUniqueReferenceIDNotNil() predicate.BillingInvoiceLine", + "line": 1718 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1723 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1728 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1733 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1738 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1743 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1748 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.BillingInvoiceLine", + "line": 1753 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1758 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.BillingInvoiceLine", + "line": 1763 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1768 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.BillingInvoiceLine", + "line": 1773 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1778 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1783 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.BillingInvoiceLine", + "line": 1788 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.BillingInvoiceLine", + "line": 1793 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1798 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1803 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1808 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1813 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1818 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1823 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.BillingInvoiceLine", + "line": 1828 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1833 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.BillingInvoiceLine", + "line": 1838 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1843 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.BillingInvoiceLine", + "line": 1848 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1853 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1858 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.BillingInvoiceLine", + "line": 1863 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.BillingInvoiceLine", + "line": 1868 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1873 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1878 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.BillingInvoiceLine", + "line": 1883 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 1888 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1893 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 1898 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.BillingInvoiceLine", + "line": 1903 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.BillingInvoiceLine", + "line": 1908 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.BillingInvoiceLine", + "line": 1913 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.BillingInvoiceLine", + "line": 1918 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.BillingInvoiceLine", + "line": 1923 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 1928 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 1933 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.BillingInvoiceLine", + "line": 1938 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.BillingInvoiceLine", + "line": 1943 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 1948 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 1953 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromEQ", + "signature": "func SubscriptionBillingPeriodFromEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1958 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNEQ", + "signature": "func SubscriptionBillingPeriodFromNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 1963 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromIn", + "signature": "func SubscriptionBillingPeriodFromIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1968 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNotIn", + "signature": "func SubscriptionBillingPeriodFromNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 1973 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromGT", + "signature": "func SubscriptionBillingPeriodFromGT(v time.Time) predicate.BillingInvoiceLine", + "line": 1978 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromGTE", + "signature": "func SubscriptionBillingPeriodFromGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1983 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromLT", + "signature": "func SubscriptionBillingPeriodFromLT(v time.Time) predicate.BillingInvoiceLine", + "line": 1988 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromLTE", + "signature": "func SubscriptionBillingPeriodFromLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 1993 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromIsNil", + "signature": "func SubscriptionBillingPeriodFromIsNil() predicate.BillingInvoiceLine", + "line": 1998 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNotNil", + "signature": "func SubscriptionBillingPeriodFromNotNil() predicate.BillingInvoiceLine", + "line": 2003 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToEQ", + "signature": "func SubscriptionBillingPeriodToEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 2008 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNEQ", + "signature": "func SubscriptionBillingPeriodToNEQ(v time.Time) predicate.BillingInvoiceLine", + "line": 2013 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToIn", + "signature": "func SubscriptionBillingPeriodToIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 2018 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNotIn", + "signature": "func SubscriptionBillingPeriodToNotIn(vs ...time.Time) predicate.BillingInvoiceLine", + "line": 2023 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToGT", + "signature": "func SubscriptionBillingPeriodToGT(v time.Time) predicate.BillingInvoiceLine", + "line": 2028 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToGTE", + "signature": "func SubscriptionBillingPeriodToGTE(v time.Time) predicate.BillingInvoiceLine", + "line": 2033 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToLT", + "signature": "func SubscriptionBillingPeriodToLT(v time.Time) predicate.BillingInvoiceLine", + "line": 2038 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToLTE", + "signature": "func SubscriptionBillingPeriodToLTE(v time.Time) predicate.BillingInvoiceLine", + "line": 2043 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToIsNil", + "signature": "func SubscriptionBillingPeriodToIsNil() predicate.BillingInvoiceLine", + "line": 2048 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNotNil", + "signature": "func SubscriptionBillingPeriodToNotNil() predicate.BillingInvoiceLine", + "line": 2053 + }, + { + "kind": "func", + "name": "SplitLineGroupIDEQ", + "signature": "func SplitLineGroupIDEQ(v string) predicate.BillingInvoiceLine", + "line": 2058 + }, + { + "kind": "func", + "name": "SplitLineGroupIDNEQ", + "signature": "func SplitLineGroupIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 2063 + }, + { + "kind": "func", + "name": "SplitLineGroupIDIn", + "signature": "func SplitLineGroupIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2068 + }, + { + "kind": "func", + "name": "SplitLineGroupIDNotIn", + "signature": "func SplitLineGroupIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2073 + }, + { + "kind": "func", + "name": "SplitLineGroupIDGT", + "signature": "func SplitLineGroupIDGT(v string) predicate.BillingInvoiceLine", + "line": 2078 + }, + { + "kind": "func", + "name": "SplitLineGroupIDGTE", + "signature": "func SplitLineGroupIDGTE(v string) predicate.BillingInvoiceLine", + "line": 2083 + }, + { + "kind": "func", + "name": "SplitLineGroupIDLT", + "signature": "func SplitLineGroupIDLT(v string) predicate.BillingInvoiceLine", + "line": 2088 + }, + { + "kind": "func", + "name": "SplitLineGroupIDLTE", + "signature": "func SplitLineGroupIDLTE(v string) predicate.BillingInvoiceLine", + "line": 2093 + }, + { + "kind": "func", + "name": "SplitLineGroupIDContains", + "signature": "func SplitLineGroupIDContains(v string) predicate.BillingInvoiceLine", + "line": 2098 + }, + { + "kind": "func", + "name": "SplitLineGroupIDHasPrefix", + "signature": "func SplitLineGroupIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 2103 + }, + { + "kind": "func", + "name": "SplitLineGroupIDHasSuffix", + "signature": "func SplitLineGroupIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 2108 + }, + { + "kind": "func", + "name": "SplitLineGroupIDIsNil", + "signature": "func SplitLineGroupIDIsNil() predicate.BillingInvoiceLine", + "line": 2113 + }, + { + "kind": "func", + "name": "SplitLineGroupIDNotNil", + "signature": "func SplitLineGroupIDNotNil() predicate.BillingInvoiceLine", + "line": 2118 + }, + { + "kind": "func", + "name": "SplitLineGroupIDEqualFold", + "signature": "func SplitLineGroupIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 2123 + }, + { + "kind": "func", + "name": "SplitLineGroupIDContainsFold", + "signature": "func SplitLineGroupIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 2128 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.BillingInvoiceLine", + "line": 2133 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.BillingInvoiceLine", + "line": 2138 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2143 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2148 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.BillingInvoiceLine", + "line": 2153 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.BillingInvoiceLine", + "line": 2158 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.BillingInvoiceLine", + "line": 2163 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.BillingInvoiceLine", + "line": 2168 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.BillingInvoiceLine", + "line": 2173 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 2178 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 2183 + }, + { + "kind": "func", + "name": "ChargeIDIsNil", + "signature": "func ChargeIDIsNil() predicate.BillingInvoiceLine", + "line": 2188 + }, + { + "kind": "func", + "name": "ChargeIDNotNil", + "signature": "func ChargeIDNotNil() predicate.BillingInvoiceLine", + "line": 2193 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.BillingInvoiceLine", + "line": 2198 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.BillingInvoiceLine", + "line": 2203 + }, + { + "kind": "func", + "name": "EngineEQ", + "signature": "func EngineEQ(v billing.LineEngineType) predicate.BillingInvoiceLine", + "line": 2208 + }, + { + "kind": "func", + "name": "EngineNEQ", + "signature": "func EngineNEQ(v billing.LineEngineType) predicate.BillingInvoiceLine", + "line": 2214 + }, + { + "kind": "func", + "name": "EngineIn", + "signature": "func EngineIn(vs ...billing.LineEngineType) predicate.BillingInvoiceLine", + "line": 2220 + }, + { + "kind": "func", + "name": "EngineNotIn", + "signature": "func EngineNotIn(vs ...billing.LineEngineType) predicate.BillingInvoiceLine", + "line": 2229 + }, + { + "kind": "func", + "name": "LineIdsEQ", + "signature": "func LineIdsEQ(v string) predicate.BillingInvoiceLine", + "line": 2238 + }, + { + "kind": "func", + "name": "LineIdsNEQ", + "signature": "func LineIdsNEQ(v string) predicate.BillingInvoiceLine", + "line": 2243 + }, + { + "kind": "func", + "name": "LineIdsIn", + "signature": "func LineIdsIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2248 + }, + { + "kind": "func", + "name": "LineIdsNotIn", + "signature": "func LineIdsNotIn(vs ...string) predicate.BillingInvoiceLine", + "line": 2253 + }, + { + "kind": "func", + "name": "LineIdsGT", + "signature": "func LineIdsGT(v string) predicate.BillingInvoiceLine", + "line": 2258 + }, + { + "kind": "func", + "name": "LineIdsGTE", + "signature": "func LineIdsGTE(v string) predicate.BillingInvoiceLine", + "line": 2263 + }, + { + "kind": "func", + "name": "LineIdsLT", + "signature": "func LineIdsLT(v string) predicate.BillingInvoiceLine", + "line": 2268 + }, + { + "kind": "func", + "name": "LineIdsLTE", + "signature": "func LineIdsLTE(v string) predicate.BillingInvoiceLine", + "line": 2273 + }, + { + "kind": "func", + "name": "LineIdsContains", + "signature": "func LineIdsContains(v string) predicate.BillingInvoiceLine", + "line": 2278 + }, + { + "kind": "func", + "name": "LineIdsHasPrefix", + "signature": "func LineIdsHasPrefix(v string) predicate.BillingInvoiceLine", + "line": 2283 + }, + { + "kind": "func", + "name": "LineIdsHasSuffix", + "signature": "func LineIdsHasSuffix(v string) predicate.BillingInvoiceLine", + "line": 2288 + }, + { + "kind": "func", + "name": "LineIdsIsNil", + "signature": "func LineIdsIsNil() predicate.BillingInvoiceLine", + "line": 2293 + }, + { + "kind": "func", + "name": "LineIdsNotNil", + "signature": "func LineIdsNotNil() predicate.BillingInvoiceLine", + "line": 2298 + }, + { + "kind": "func", + "name": "LineIdsEqualFold", + "signature": "func LineIdsEqualFold(v string) predicate.BillingInvoiceLine", + "line": 2303 + }, + { + "kind": "func", + "name": "LineIdsContainsFold", + "signature": "func LineIdsContainsFold(v string) predicate.BillingInvoiceLine", + "line": 2308 + }, + { + "kind": "func", + "name": "CreditsAppliedIsNil", + "signature": "func CreditsAppliedIsNil() predicate.BillingInvoiceLine", + "line": 2313 + }, + { + "kind": "func", + "name": "CreditsAppliedNotNil", + "signature": "func CreditsAppliedNotNil() predicate.BillingInvoiceLine", + "line": 2318 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.BillingInvoiceLine", + "line": 2323 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.BillingInvoiceLine", + "line": 2334 + }, + { + "kind": "func", + "name": "HasSplitLineGroup", + "signature": "func HasSplitLineGroup() predicate.BillingInvoiceLine", + "line": 2346 + }, + { + "kind": "func", + "name": "HasSplitLineGroupWith", + "signature": "func HasSplitLineGroupWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.BillingInvoiceLine", + "line": 2357 + }, + { + "kind": "func", + "name": "HasFlatFeeLine", + "signature": "func HasFlatFeeLine() predicate.BillingInvoiceLine", + "line": 2369 + }, + { + "kind": "func", + "name": "HasFlatFeeLineWith", + "signature": "func HasFlatFeeLineWith(preds ...predicate.BillingInvoiceFlatFeeLineConfig) predicate.BillingInvoiceLine", + "line": 2380 + }, + { + "kind": "func", + "name": "HasUsageBasedLine", + "signature": "func HasUsageBasedLine() predicate.BillingInvoiceLine", + "line": 2392 + }, + { + "kind": "func", + "name": "HasUsageBasedLineWith", + "signature": "func HasUsageBasedLineWith(preds ...predicate.BillingInvoiceUsageBasedLineConfig) predicate.BillingInvoiceLine", + "line": 2403 + }, + { + "kind": "func", + "name": "HasParentLine", + "signature": "func HasParentLine() predicate.BillingInvoiceLine", + "line": 2415 + }, + { + "kind": "func", + "name": "HasParentLineWith", + "signature": "func HasParentLineWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLine", + "line": 2426 + }, + { + "kind": "func", + "name": "HasDetailedLines", + "signature": "func HasDetailedLines() predicate.BillingInvoiceLine", + "line": 2438 + }, + { + "kind": "func", + "name": "HasDetailedLinesWith", + "signature": "func HasDetailedLinesWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLine", + "line": 2449 + }, + { + "kind": "func", + "name": "HasDetailedLinesV2", + "signature": "func HasDetailedLinesV2() predicate.BillingInvoiceLine", + "line": 2461 + }, + { + "kind": "func", + "name": "HasDetailedLinesV2With", + "signature": "func HasDetailedLinesV2With(preds ...predicate.BillingStandardInvoiceDetailedLine) predicate.BillingInvoiceLine", + "line": 2472 + }, + { + "kind": "func", + "name": "HasLineUsageDiscounts", + "signature": "func HasLineUsageDiscounts() predicate.BillingInvoiceLine", + "line": 2484 + }, + { + "kind": "func", + "name": "HasLineUsageDiscountsWith", + "signature": "func HasLineUsageDiscountsWith(preds ...predicate.BillingInvoiceLineUsageDiscount) predicate.BillingInvoiceLine", + "line": 2495 + }, + { + "kind": "func", + "name": "HasLineAmountDiscounts", + "signature": "func HasLineAmountDiscounts() predicate.BillingInvoiceLine", + "line": 2507 + }, + { + "kind": "func", + "name": "HasLineAmountDiscountsWith", + "signature": "func HasLineAmountDiscountsWith(preds ...predicate.BillingInvoiceLineDiscount) predicate.BillingInvoiceLine", + "line": 2518 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.BillingInvoiceLine", + "line": 2530 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.BillingInvoiceLine", + "line": 2541 + }, + { + "kind": "func", + "name": "HasSubscriptionPhase", + "signature": "func HasSubscriptionPhase() predicate.BillingInvoiceLine", + "line": 2553 + }, + { + "kind": "func", + "name": "HasSubscriptionPhaseWith", + "signature": "func HasSubscriptionPhaseWith(preds ...predicate.SubscriptionPhase) predicate.BillingInvoiceLine", + "line": 2564 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.BillingInvoiceLine", + "line": 2576 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.BillingInvoiceLine", + "line": 2587 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.BillingInvoiceLine", + "line": 2599 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.BillingInvoiceLine", + "line": 2610 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunPayment", + "signature": "func HasChargeFlatFeeRunPayment() predicate.BillingInvoiceLine", + "line": 2622 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunPaymentWith", + "signature": "func HasChargeFlatFeeRunPaymentWith(preds ...predicate.ChargeFlatFeeRunPayment) predicate.BillingInvoiceLine", + "line": 2633 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunCreditAllocations", + "signature": "func HasChargeFlatFeeRunCreditAllocations() predicate.BillingInvoiceLine", + "line": 2645 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunCreditAllocationsWith", + "signature": "func HasChargeFlatFeeRunCreditAllocationsWith(preds ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.BillingInvoiceLine", + "line": 2656 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRuns", + "signature": "func HasChargeFlatFeeRuns() predicate.BillingInvoiceLine", + "line": 2668 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunsWith", + "signature": "func HasChargeFlatFeeRunsWith(preds ...predicate.ChargeFlatFeeRun) predicate.BillingInvoiceLine", + "line": 2679 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRun", + "signature": "func HasChargeUsageBasedRun() predicate.BillingInvoiceLine", + "line": 2691 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRunWith", + "signature": "func HasChargeUsageBasedRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.BillingInvoiceLine", + "line": 2702 + }, + { + "kind": "func", + "name": "HasChargeCreditPurchaseInvoicedPayment", + "signature": "func HasChargeCreditPurchaseInvoicedPayment() predicate.BillingInvoiceLine", + "line": 2714 + }, + { + "kind": "func", + "name": "HasChargeCreditPurchaseInvoicedPaymentWith", + "signature": "func HasChargeCreditPurchaseInvoicedPaymentWith(preds ...predicate.ChargeCreditPurchaseInvoicedPayment) predicate.BillingInvoiceLine", + "line": 2725 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.BillingInvoiceLine", + "line": 2737 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.BillingInvoiceLine", + "line": 2748 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLine", + "line": 2760 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLine", + "line": 2765 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceLine) predicate.BillingInvoiceLine", + "line": 2770 + } + ], + "line_count": 2772 + }, + "openmeter/ent/db/billinginvoiceline_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineCreate", + "signature": "type BillingInvoiceLineCreate struct", + "line": 42 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *BillingInvoiceLineCreate) SetAnnotations(v models.Annotations) *BillingInvoiceLineCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceLineCreate) SetNamespace(v string) *BillingInvoiceLineCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *BillingInvoiceLineCreate) SetMetadata(v map[string]string) *BillingInvoiceLineCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetCreatedAt(v time.Time) *BillingInvoiceLineCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceLineCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetUpdatedAt(v time.Time) *BillingInvoiceLineCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceLineCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetDeletedAt(v time.Time) *BillingInvoiceLineCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *BillingInvoiceLineCreate) SetName(v string) *BillingInvoiceLineCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingInvoiceLineCreate) SetDescription(v string) *BillingInvoiceLineCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableDescription(v *string) *BillingInvoiceLineCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *BillingInvoiceLineCreate) SetCurrency(v currencyx.Code) *BillingInvoiceLineCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableTaxConfig(v *billing.TaxConfig) *BillingInvoiceLineCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxCodeID(v string) *BillingInvoiceLineCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableTaxCodeID(v *string) *BillingInvoiceLineCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceLineCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *BillingInvoiceLineCreate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 196 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 202 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 208 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *BillingInvoiceLineCreate) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 220 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineCreate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineCreate", + "line": 226 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_c *BillingInvoiceLineCreate) SetPeriodStart(v time.Time) *BillingInvoiceLineCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_c *BillingInvoiceLineCreate) SetPeriodEnd(v time.Time) *BillingInvoiceLineCreate", + "line": 246 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *BillingInvoiceLineCreate) SetInvoiceID(v string) *BillingInvoiceLineCreate", + "line": 252 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_c *BillingInvoiceLineCreate) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineCreate", + "line": 258 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetParentLineID(v string) *BillingInvoiceLineCreate", + "line": 264 + }, + { + "kind": "func", + "name": "SetNillableParentLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableParentLineID(v *string) *BillingInvoiceLineCreate", + "line": 270 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_c *BillingInvoiceLineCreate) SetInvoiceAt(v time.Time) *BillingInvoiceLineCreate", + "line": 278 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (_c *BillingInvoiceLineCreate) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineCreate", + "line": 284 + }, + { + "kind": "func", + "name": "SetNillableOverrideCollectionPeriodEnd", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableOverrideCollectionPeriodEnd(v *time.Time) *BillingInvoiceLineCreate", + "line": 290 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *BillingInvoiceLineCreate) SetType(v billing.InvoiceLineAdapterType) *BillingInvoiceLineCreate", + "line": 298 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *BillingInvoiceLineCreate) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineCreate", + "line": 304 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *BillingInvoiceLineCreate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 310 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_c *BillingInvoiceLineCreate) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineCreate", + "line": 324 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineCreate", + "line": 330 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineCreate", + "line": 336 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionID(v string) *BillingInvoiceLineCreate", + "line": 344 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSubscriptionID(v *string) *BillingInvoiceLineCreate", + "line": 350 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionPhaseID(v string) *BillingInvoiceLineCreate", + "line": 358 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSubscriptionPhaseID(v *string) *BillingInvoiceLineCreate", + "line": 364 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionItemID(v string) *BillingInvoiceLineCreate", + "line": 372 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSubscriptionItemID(v *string) *BillingInvoiceLineCreate", + "line": 378 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineCreate", + "line": 386 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceLineCreate", + "line": 392 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineCreate", + "line": 400 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceLineCreate", + "line": 406 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (_c *BillingInvoiceLineCreate) SetSplitLineGroupID(v string) *BillingInvoiceLineCreate", + "line": 414 + }, + { + "kind": "func", + "name": "SetNillableSplitLineGroupID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableSplitLineGroupID(v *string) *BillingInvoiceLineCreate", + "line": 420 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeID(v string) *BillingInvoiceLineCreate", + "line": 428 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChargeID(v *string) *BillingInvoiceLineCreate", + "line": 434 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (_c *BillingInvoiceLineCreate) SetEngine(v billing.LineEngineType) *BillingInvoiceLineCreate", + "line": 442 + }, + { + "kind": "func", + "name": "SetNillableEngine", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableEngine(v *billing.LineEngineType) *BillingInvoiceLineCreate", + "line": 448 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (_c *BillingInvoiceLineCreate) SetLineIds(v string) *BillingInvoiceLineCreate", + "line": 456 + }, + { + "kind": "func", + "name": "SetNillableLineIds", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableLineIds(v *string) *BillingInvoiceLineCreate", + "line": 462 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_c *BillingInvoiceLineCreate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineCreate", + "line": 470 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceLineCreate) SetID(v string) *BillingInvoiceLineCreate", + "line": 476 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableID(v *string) *BillingInvoiceLineCreate", + "line": 482 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_c *BillingInvoiceLineCreate) SetBillingInvoiceID(id string) *BillingInvoiceLineCreate", + "line": 490 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_c *BillingInvoiceLineCreate) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceLineCreate", + "line": 496 + }, + { + "kind": "func", + "name": "SetSplitLineGroup", + "signature": "func (_c *BillingInvoiceLineCreate) SetSplitLineGroup(v *BillingInvoiceSplitLineGroup) *BillingInvoiceLineCreate", + "line": 501 + }, + { + "kind": "func", + "name": "SetFlatFeeLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetFlatFeeLineID(id string) *BillingInvoiceLineCreate", + "line": 506 + }, + { + "kind": "func", + "name": "SetNillableFlatFeeLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableFlatFeeLineID(id *string) *BillingInvoiceLineCreate", + "line": 512 + }, + { + "kind": "func", + "name": "SetFlatFeeLine", + "signature": "func (_c *BillingInvoiceLineCreate) SetFlatFeeLine(v *BillingInvoiceFlatFeeLineConfig) *BillingInvoiceLineCreate", + "line": 520 + }, + { + "kind": "func", + "name": "SetUsageBasedLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetUsageBasedLineID(id string) *BillingInvoiceLineCreate", + "line": 525 + }, + { + "kind": "func", + "name": "SetNillableUsageBasedLineID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableUsageBasedLineID(id *string) *BillingInvoiceLineCreate", + "line": 531 + }, + { + "kind": "func", + "name": "SetUsageBasedLine", + "signature": "func (_c *BillingInvoiceLineCreate) SetUsageBasedLine(v *BillingInvoiceUsageBasedLineConfig) *BillingInvoiceLineCreate", + "line": 539 + }, + { + "kind": "func", + "name": "SetParentLine", + "signature": "func (_c *BillingInvoiceLineCreate) SetParentLine(v *BillingInvoiceLine) *BillingInvoiceLineCreate", + "line": 544 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_c *BillingInvoiceLineCreate) AddDetailedLineIDs(ids ...string) *BillingInvoiceLineCreate", + "line": 549 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_c *BillingInvoiceLineCreate) AddDetailedLines(v ...*BillingInvoiceLine) *BillingInvoiceLineCreate", + "line": 555 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2IDs", + "signature": "func (_c *BillingInvoiceLineCreate) AddDetailedLinesV2IDs(ids ...string) *BillingInvoiceLineCreate", + "line": 564 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2", + "signature": "func (_c *BillingInvoiceLineCreate) AddDetailedLinesV2(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceLineCreate", + "line": 570 + }, + { + "kind": "func", + "name": "AddLineUsageDiscountIDs", + "signature": "func (_c *BillingInvoiceLineCreate) AddLineUsageDiscountIDs(ids ...string) *BillingInvoiceLineCreate", + "line": 579 + }, + { + "kind": "func", + "name": "AddLineUsageDiscounts", + "signature": "func (_c *BillingInvoiceLineCreate) AddLineUsageDiscounts(v ...*BillingInvoiceLineUsageDiscount) *BillingInvoiceLineCreate", + "line": 585 + }, + { + "kind": "func", + "name": "AddLineAmountDiscountIDs", + "signature": "func (_c *BillingInvoiceLineCreate) AddLineAmountDiscountIDs(ids ...string) *BillingInvoiceLineCreate", + "line": 594 + }, + { + "kind": "func", + "name": "AddLineAmountDiscounts", + "signature": "func (_c *BillingInvoiceLineCreate) AddLineAmountDiscounts(v ...*BillingInvoiceLineDiscount) *BillingInvoiceLineCreate", + "line": 600 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscription(v *Subscription) *BillingInvoiceLineCreate", + "line": 609 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionPhase(v *SubscriptionPhase) *BillingInvoiceLineCreate", + "line": 614 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_c *BillingInvoiceLineCreate) SetSubscriptionItem(v *SubscriptionItem) *BillingInvoiceLineCreate", + "line": 619 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *BillingInvoiceLineCreate) SetCharge(v *Charge) *BillingInvoiceLineCreate", + "line": 624 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPaymentID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeFlatFeeRunPaymentID(id string) *BillingInvoiceLineCreate", + "line": 629 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunPaymentID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChargeFlatFeeRunPaymentID(id *string) *BillingInvoiceLineCreate", + "line": 635 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPayment", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeFlatFeeRunPayment(v *ChargeFlatFeeRunPayment) *BillingInvoiceLineCreate", + "line": 643 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocationIDs", + "signature": "func (_c *BillingInvoiceLineCreate) AddChargeFlatFeeRunCreditAllocationIDs(ids ...string) *BillingInvoiceLineCreate", + "line": 648 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocations", + "signature": "func (_c *BillingInvoiceLineCreate) AddChargeFlatFeeRunCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *BillingInvoiceLineCreate", + "line": 654 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunsID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeFlatFeeRunsID(id string) *BillingInvoiceLineCreate", + "line": 663 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunsID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChargeFlatFeeRunsID(id *string) *BillingInvoiceLineCreate", + "line": 669 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRuns", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeFlatFeeRuns(v *ChargeFlatFeeRun) *BillingInvoiceLineCreate", + "line": 677 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRunID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeUsageBasedRunID(id string) *BillingInvoiceLineCreate", + "line": 682 + }, + { + "kind": "func", + "name": "SetNillableChargeUsageBasedRunID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChargeUsageBasedRunID(id *string) *BillingInvoiceLineCreate", + "line": 688 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRun", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeUsageBasedRun(v *ChargeUsageBasedRuns) *BillingInvoiceLineCreate", + "line": 696 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeCreditPurchaseInvoicedPaymentID(id string) *BillingInvoiceLineCreate", + "line": 701 + }, + { + "kind": "func", + "name": "SetNillableChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_c *BillingInvoiceLineCreate) SetNillableChargeCreditPurchaseInvoicedPaymentID(id *string) *BillingInvoiceLineCreate", + "line": 707 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPayment", + "signature": "func (_c *BillingInvoiceLineCreate) SetChargeCreditPurchaseInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *BillingInvoiceLineCreate", + "line": 715 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *BillingInvoiceLineCreate) SetTaxCode(v *TaxCode) *BillingInvoiceLineCreate", + "line": 720 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceLineCreate) Mutation() *BillingInvoiceLineMutation", + "line": 725 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineCreate) Save(ctx context.Context) (*BillingInvoiceLine, error)", + "line": 730 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineCreate) SaveX(ctx context.Context) *BillingInvoiceLine", + "line": 736 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineCreate) Exec(ctx context.Context) error", + "line": 745 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineCreate) ExecX(ctx context.Context)", + "line": 751 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceLineCreate) defaults()", + "line": 758 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceLineCreate) check() error", + "line": 778 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceLineCreate) sqlSave(ctx context.Context) (*BillingInvoiceLine, error)", + "line": 893 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceLineCreate) createSpec() (*BillingInvoiceLine, *sqlgraph.CreateSpec, error)", + "line": 919 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineUpsertOne", + "line": 1410 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineCreate) OnConflictColumns(columns ...string) *BillingInvoiceLineUpsertOne", + "line": 1423 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingInvoiceLineUpsert) SetAnnotations(v models.Annotations) *BillingInvoiceLineUpsert", + "line": 1444 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateAnnotations() *BillingInvoiceLineUpsert", + "line": 1450 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingInvoiceLineUpsert) ClearAnnotations() *BillingInvoiceLineUpsert", + "line": 1456 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceLineUpsert) SetMetadata(v map[string]string) *BillingInvoiceLineUpsert", + "line": 1462 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateMetadata() *BillingInvoiceLineUpsert", + "line": 1468 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceLineUpsert) ClearMetadata() *BillingInvoiceLineUpsert", + "line": 1474 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceLineUpsert", + "line": 1480 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateUpdatedAt() *BillingInvoiceLineUpsert", + "line": 1486 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsert) SetDeletedAt(v time.Time) *BillingInvoiceLineUpsert", + "line": 1492 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateDeletedAt() *BillingInvoiceLineUpsert", + "line": 1498 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsert) ClearDeletedAt() *BillingInvoiceLineUpsert", + "line": 1504 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceLineUpsert) SetName(v string) *BillingInvoiceLineUpsert", + "line": 1510 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateName() *BillingInvoiceLineUpsert", + "line": 1516 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUpsert) SetDescription(v string) *BillingInvoiceLineUpsert", + "line": 1522 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateDescription() *BillingInvoiceLineUpsert", + "line": 1528 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUpsert) ClearDescription() *BillingInvoiceLineUpsert", + "line": 1534 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineUpsert", + "line": 1540 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxConfig() *BillingInvoiceLineUpsert", + "line": 1546 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsert) ClearTaxConfig() *BillingInvoiceLineUpsert", + "line": 1552 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxCodeID(v string) *BillingInvoiceLineUpsert", + "line": 1558 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxCodeID() *BillingInvoiceLineUpsert", + "line": 1564 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearTaxCodeID() *BillingInvoiceLineUpsert", + "line": 1570 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineUpsert", + "line": 1576 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxBehavior() *BillingInvoiceLineUpsert", + "line": 1582 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsert) ClearTaxBehavior() *BillingInvoiceLineUpsert", + "line": 1588 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineUpsert) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1594 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateAmount() *BillingInvoiceLineUpsert", + "line": 1600 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1606 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxesTotal() *BillingInvoiceLineUpsert", + "line": 1612 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1618 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxesInclusiveTotal() *BillingInvoiceLineUpsert", + "line": 1624 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1630 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTaxesExclusiveTotal() *BillingInvoiceLineUpsert", + "line": 1636 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1642 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateChargesTotal() *BillingInvoiceLineUpsert", + "line": 1648 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1654 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateDiscountsTotal() *BillingInvoiceLineUpsert", + "line": 1660 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1666 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateCreditsTotal() *BillingInvoiceLineUpsert", + "line": 1672 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceLineUpsert) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1678 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateTotal() *BillingInvoiceLineUpsert", + "line": 1684 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsert) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUpsert", + "line": 1690 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateInvoicingAppExternalID() *BillingInvoiceLineUpsert", + "line": 1696 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearInvoicingAppExternalID() *BillingInvoiceLineUpsert", + "line": 1702 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceLineUpsert) SetPeriodStart(v time.Time) *BillingInvoiceLineUpsert", + "line": 1708 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceLineUpsert) UpdatePeriodStart() *BillingInvoiceLineUpsert", + "line": 1714 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsert) SetPeriodEnd(v time.Time) *BillingInvoiceLineUpsert", + "line": 1720 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsert) UpdatePeriodEnd() *BillingInvoiceLineUpsert", + "line": 1726 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsert) SetInvoiceID(v string) *BillingInvoiceLineUpsert", + "line": 1732 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateInvoiceID() *BillingInvoiceLineUpsert", + "line": 1738 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *BillingInvoiceLineUpsert) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineUpsert", + "line": 1744 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateManagedBy() *BillingInvoiceLineUpsert", + "line": 1750 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingInvoiceLineUpsert) SetParentLineID(v string) *BillingInvoiceLineUpsert", + "line": 1756 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateParentLineID() *BillingInvoiceLineUpsert", + "line": 1762 + }, + { + "kind": "func", + "name": "ClearParentLineID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearParentLineID() *BillingInvoiceLineUpsert", + "line": 1768 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsert) SetInvoiceAt(v time.Time) *BillingInvoiceLineUpsert", + "line": 1774 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateInvoiceAt() *BillingInvoiceLineUpsert", + "line": 1780 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsert) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineUpsert", + "line": 1786 + }, + { + "kind": "func", + "name": "UpdateOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsert", + "line": 1792 + }, + { + "kind": "func", + "name": "ClearOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsert) ClearOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsert", + "line": 1798 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceLineUpsert) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineUpsert", + "line": 1804 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateStatus() *BillingInvoiceLineUpsert", + "line": 1810 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUpsert) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUpsert", + "line": 1816 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateQuantity() *BillingInvoiceLineUpsert", + "line": 1822 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineUpsert) ClearQuantity() *BillingInvoiceLineUpsert", + "line": 1828 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsert) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineUpsert", + "line": 1834 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateRatecardDiscounts() *BillingInvoiceLineUpsert", + "line": 1840 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsert) ClearRatecardDiscounts() *BillingInvoiceLineUpsert", + "line": 1846 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsert) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUpsert", + "line": 1852 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateChildUniqueReferenceID() *BillingInvoiceLineUpsert", + "line": 1858 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearChildUniqueReferenceID() *BillingInvoiceLineUpsert", + "line": 1864 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsert) SetSubscriptionID(v string) *BillingInvoiceLineUpsert", + "line": 1870 + }, + { + "kind": "func", + "name": "UpdateSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSubscriptionID() *BillingInvoiceLineUpsert", + "line": 1876 + }, + { + "kind": "func", + "name": "ClearSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSubscriptionID() *BillingInvoiceLineUpsert", + "line": 1882 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsert) SetSubscriptionPhaseID(v string) *BillingInvoiceLineUpsert", + "line": 1888 + }, + { + "kind": "func", + "name": "UpdateSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSubscriptionPhaseID() *BillingInvoiceLineUpsert", + "line": 1894 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSubscriptionPhaseID() *BillingInvoiceLineUpsert", + "line": 1900 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsert) SetSubscriptionItemID(v string) *BillingInvoiceLineUpsert", + "line": 1906 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSubscriptionItemID() *BillingInvoiceLineUpsert", + "line": 1912 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSubscriptionItemID() *BillingInvoiceLineUpsert", + "line": 1918 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsert) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineUpsert", + "line": 1924 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsert", + "line": 1930 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsert", + "line": 1936 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsert) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineUpsert", + "line": 1942 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsert", + "line": 1948 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsert", + "line": 1954 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsert) SetSplitLineGroupID(v string) *BillingInvoiceLineUpsert", + "line": 1960 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateSplitLineGroupID() *BillingInvoiceLineUpsert", + "line": 1966 + }, + { + "kind": "func", + "name": "ClearSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearSplitLineGroupID() *BillingInvoiceLineUpsert", + "line": 1972 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceLineUpsert) SetChargeID(v string) *BillingInvoiceLineUpsert", + "line": 1978 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateChargeID() *BillingInvoiceLineUpsert", + "line": 1984 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceLineUpsert) ClearChargeID() *BillingInvoiceLineUpsert", + "line": 1990 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (u *BillingInvoiceLineUpsert) SetEngine(v billing.LineEngineType) *BillingInvoiceLineUpsert", + "line": 1996 + }, + { + "kind": "func", + "name": "UpdateEngine", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateEngine() *BillingInvoiceLineUpsert", + "line": 2002 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (u *BillingInvoiceLineUpsert) SetLineIds(v string) *BillingInvoiceLineUpsert", + "line": 2008 + }, + { + "kind": "func", + "name": "UpdateLineIds", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateLineIds() *BillingInvoiceLineUpsert", + "line": 2014 + }, + { + "kind": "func", + "name": "ClearLineIds", + "signature": "func (u *BillingInvoiceLineUpsert) ClearLineIds() *BillingInvoiceLineUpsert", + "line": 2020 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsert) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineUpsert", + "line": 2026 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsert) UpdateCreditsApplied() *BillingInvoiceLineUpsert", + "line": 2032 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsert) ClearCreditsApplied() *BillingInvoiceLineUpsert", + "line": 2038 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateNewValues() *BillingInvoiceLineUpsertOne", + "line": 2054 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineUpsertOne) Ignore() *BillingInvoiceLineUpsertOne", + "line": 2082 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineUpsertOne) DoNothing() *BillingInvoiceLineUpsertOne", + "line": 2089 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineUpsertOne) Update(set func(*BillingInvoiceLineUpsert)) *BillingInvoiceLineUpsertOne", + "line": 2096 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetAnnotations(v models.Annotations) *BillingInvoiceLineUpsertOne", + "line": 2104 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateAnnotations() *BillingInvoiceLineUpsertOne", + "line": 2111 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearAnnotations() *BillingInvoiceLineUpsertOne", + "line": 2118 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetMetadata(v map[string]string) *BillingInvoiceLineUpsertOne", + "line": 2125 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateMetadata() *BillingInvoiceLineUpsertOne", + "line": 2132 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearMetadata() *BillingInvoiceLineUpsertOne", + "line": 2139 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2146 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateUpdatedAt() *BillingInvoiceLineUpsertOne", + "line": 2153 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2160 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateDeletedAt() *BillingInvoiceLineUpsertOne", + "line": 2167 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearDeletedAt() *BillingInvoiceLineUpsertOne", + "line": 2174 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetName(v string) *BillingInvoiceLineUpsertOne", + "line": 2181 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateName() *BillingInvoiceLineUpsertOne", + "line": 2188 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetDescription(v string) *BillingInvoiceLineUpsertOne", + "line": 2195 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateDescription() *BillingInvoiceLineUpsertOne", + "line": 2202 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearDescription() *BillingInvoiceLineUpsertOne", + "line": 2209 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineUpsertOne", + "line": 2216 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxConfig() *BillingInvoiceLineUpsertOne", + "line": 2223 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearTaxConfig() *BillingInvoiceLineUpsertOne", + "line": 2230 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxCodeID(v string) *BillingInvoiceLineUpsertOne", + "line": 2237 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxCodeID() *BillingInvoiceLineUpsertOne", + "line": 2244 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearTaxCodeID() *BillingInvoiceLineUpsertOne", + "line": 2251 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineUpsertOne", + "line": 2258 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxBehavior() *BillingInvoiceLineUpsertOne", + "line": 2265 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearTaxBehavior() *BillingInvoiceLineUpsertOne", + "line": 2272 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2279 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateAmount() *BillingInvoiceLineUpsertOne", + "line": 2286 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2293 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxesTotal() *BillingInvoiceLineUpsertOne", + "line": 2300 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2307 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxesInclusiveTotal() *BillingInvoiceLineUpsertOne", + "line": 2314 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2321 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTaxesExclusiveTotal() *BillingInvoiceLineUpsertOne", + "line": 2328 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2335 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateChargesTotal() *BillingInvoiceLineUpsertOne", + "line": 2342 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2349 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateDiscountsTotal() *BillingInvoiceLineUpsertOne", + "line": 2356 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2363 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateCreditsTotal() *BillingInvoiceLineUpsertOne", + "line": 2370 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2377 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateTotal() *BillingInvoiceLineUpsertOne", + "line": 2384 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUpsertOne", + "line": 2391 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateInvoicingAppExternalID() *BillingInvoiceLineUpsertOne", + "line": 2398 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearInvoicingAppExternalID() *BillingInvoiceLineUpsertOne", + "line": 2405 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetPeriodStart(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2412 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdatePeriodStart() *BillingInvoiceLineUpsertOne", + "line": 2419 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetPeriodEnd(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2426 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdatePeriodEnd() *BillingInvoiceLineUpsertOne", + "line": 2433 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetInvoiceID(v string) *BillingInvoiceLineUpsertOne", + "line": 2440 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateInvoiceID() *BillingInvoiceLineUpsertOne", + "line": 2447 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineUpsertOne", + "line": 2454 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateManagedBy() *BillingInvoiceLineUpsertOne", + "line": 2461 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetParentLineID(v string) *BillingInvoiceLineUpsertOne", + "line": 2468 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateParentLineID() *BillingInvoiceLineUpsertOne", + "line": 2475 + }, + { + "kind": "func", + "name": "ClearParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearParentLineID() *BillingInvoiceLineUpsertOne", + "line": 2482 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetInvoiceAt(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2489 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateInvoiceAt() *BillingInvoiceLineUpsertOne", + "line": 2496 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2503 + }, + { + "kind": "func", + "name": "UpdateOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsertOne", + "line": 2510 + }, + { + "kind": "func", + "name": "ClearOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsertOne", + "line": 2517 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineUpsertOne", + "line": 2524 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateStatus() *BillingInvoiceLineUpsertOne", + "line": 2531 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertOne", + "line": 2538 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateQuantity() *BillingInvoiceLineUpsertOne", + "line": 2545 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearQuantity() *BillingInvoiceLineUpsertOne", + "line": 2552 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineUpsertOne", + "line": 2559 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateRatecardDiscounts() *BillingInvoiceLineUpsertOne", + "line": 2566 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearRatecardDiscounts() *BillingInvoiceLineUpsertOne", + "line": 2573 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUpsertOne", + "line": 2580 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateChildUniqueReferenceID() *BillingInvoiceLineUpsertOne", + "line": 2587 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearChildUniqueReferenceID() *BillingInvoiceLineUpsertOne", + "line": 2594 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSubscriptionID(v string) *BillingInvoiceLineUpsertOne", + "line": 2601 + }, + { + "kind": "func", + "name": "UpdateSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSubscriptionID() *BillingInvoiceLineUpsertOne", + "line": 2608 + }, + { + "kind": "func", + "name": "ClearSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSubscriptionID() *BillingInvoiceLineUpsertOne", + "line": 2615 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSubscriptionPhaseID(v string) *BillingInvoiceLineUpsertOne", + "line": 2622 + }, + { + "kind": "func", + "name": "UpdateSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSubscriptionPhaseID() *BillingInvoiceLineUpsertOne", + "line": 2629 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSubscriptionPhaseID() *BillingInvoiceLineUpsertOne", + "line": 2636 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSubscriptionItemID(v string) *BillingInvoiceLineUpsertOne", + "line": 2643 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSubscriptionItemID() *BillingInvoiceLineUpsertOne", + "line": 2650 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSubscriptionItemID() *BillingInvoiceLineUpsertOne", + "line": 2657 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2664 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsertOne", + "line": 2671 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsertOne", + "line": 2678 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineUpsertOne", + "line": 2685 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsertOne", + "line": 2692 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsertOne", + "line": 2699 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetSplitLineGroupID(v string) *BillingInvoiceLineUpsertOne", + "line": 2706 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateSplitLineGroupID() *BillingInvoiceLineUpsertOne", + "line": 2713 + }, + { + "kind": "func", + "name": "ClearSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearSplitLineGroupID() *BillingInvoiceLineUpsertOne", + "line": 2720 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetChargeID(v string) *BillingInvoiceLineUpsertOne", + "line": 2727 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateChargeID() *BillingInvoiceLineUpsertOne", + "line": 2734 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearChargeID() *BillingInvoiceLineUpsertOne", + "line": 2741 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetEngine(v billing.LineEngineType) *BillingInvoiceLineUpsertOne", + "line": 2748 + }, + { + "kind": "func", + "name": "UpdateEngine", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateEngine() *BillingInvoiceLineUpsertOne", + "line": 2755 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetLineIds(v string) *BillingInvoiceLineUpsertOne", + "line": 2762 + }, + { + "kind": "func", + "name": "UpdateLineIds", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateLineIds() *BillingInvoiceLineUpsertOne", + "line": 2769 + }, + { + "kind": "func", + "name": "ClearLineIds", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearLineIds() *BillingInvoiceLineUpsertOne", + "line": 2776 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineUpsertOne", + "line": 2783 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertOne) UpdateCreditsApplied() *BillingInvoiceLineUpsertOne", + "line": 2790 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertOne) ClearCreditsApplied() *BillingInvoiceLineUpsertOne", + "line": 2797 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineUpsertOne) Exec(ctx context.Context) error", + "line": 2804 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineUpsertOne) ExecX(ctx context.Context)", + "line": 2812 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceLineUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 2819 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceLineUpsertOne) IDX(ctx context.Context) string", + "line": 2833 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineCreateBulk", + "signature": "type BillingInvoiceLineCreateBulk struct", + "line": 2842 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceLine, error)", + "line": 2850 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceLine", + "line": 2909 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineCreateBulk) Exec(ctx context.Context) error", + "line": 2918 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineCreateBulk) ExecX(ctx context.Context)", + "line": 2924 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineUpsertBulk", + "line": 2945 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceLineUpsertBulk", + "line": 2958 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUpsertBulk", + "signature": "type BillingInvoiceLineUpsertBulk struct", + "line": 2967 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateNewValues() *BillingInvoiceLineUpsertBulk", + "line": 2982 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineUpsertBulk) Ignore() *BillingInvoiceLineUpsertBulk", + "line": 3012 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineUpsertBulk) DoNothing() *BillingInvoiceLineUpsertBulk", + "line": 3019 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineUpsertBulk) Update(set func(*BillingInvoiceLineUpsert)) *BillingInvoiceLineUpsertBulk", + "line": 3026 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetAnnotations(v models.Annotations) *BillingInvoiceLineUpsertBulk", + "line": 3034 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateAnnotations() *BillingInvoiceLineUpsertBulk", + "line": 3041 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearAnnotations() *BillingInvoiceLineUpsertBulk", + "line": 3048 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetMetadata(v map[string]string) *BillingInvoiceLineUpsertBulk", + "line": 3055 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateMetadata() *BillingInvoiceLineUpsertBulk", + "line": 3062 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearMetadata() *BillingInvoiceLineUpsertBulk", + "line": 3069 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3076 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateUpdatedAt() *BillingInvoiceLineUpsertBulk", + "line": 3083 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3090 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateDeletedAt() *BillingInvoiceLineUpsertBulk", + "line": 3097 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearDeletedAt() *BillingInvoiceLineUpsertBulk", + "line": 3104 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetName(v string) *BillingInvoiceLineUpsertBulk", + "line": 3111 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateName() *BillingInvoiceLineUpsertBulk", + "line": 3118 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetDescription(v string) *BillingInvoiceLineUpsertBulk", + "line": 3125 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateDescription() *BillingInvoiceLineUpsertBulk", + "line": 3132 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearDescription() *BillingInvoiceLineUpsertBulk", + "line": 3139 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineUpsertBulk", + "line": 3146 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxConfig() *BillingInvoiceLineUpsertBulk", + "line": 3153 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearTaxConfig() *BillingInvoiceLineUpsertBulk", + "line": 3160 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxCodeID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3167 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxCodeID() *BillingInvoiceLineUpsertBulk", + "line": 3174 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearTaxCodeID() *BillingInvoiceLineUpsertBulk", + "line": 3181 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineUpsertBulk", + "line": 3188 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxBehavior() *BillingInvoiceLineUpsertBulk", + "line": 3195 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearTaxBehavior() *BillingInvoiceLineUpsertBulk", + "line": 3202 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3209 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateAmount() *BillingInvoiceLineUpsertBulk", + "line": 3216 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3223 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxesTotal() *BillingInvoiceLineUpsertBulk", + "line": 3230 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3237 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxesInclusiveTotal() *BillingInvoiceLineUpsertBulk", + "line": 3244 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3251 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTaxesExclusiveTotal() *BillingInvoiceLineUpsertBulk", + "line": 3258 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3265 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateChargesTotal() *BillingInvoiceLineUpsertBulk", + "line": 3272 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3279 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateDiscountsTotal() *BillingInvoiceLineUpsertBulk", + "line": 3286 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3293 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateCreditsTotal() *BillingInvoiceLineUpsertBulk", + "line": 3300 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3307 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateTotal() *BillingInvoiceLineUpsertBulk", + "line": 3314 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3321 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateInvoicingAppExternalID() *BillingInvoiceLineUpsertBulk", + "line": 3328 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearInvoicingAppExternalID() *BillingInvoiceLineUpsertBulk", + "line": 3335 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetPeriodStart(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3342 + }, + { + "kind": "func", + "name": "UpdatePeriodStart", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdatePeriodStart() *BillingInvoiceLineUpsertBulk", + "line": 3349 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetPeriodEnd(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3356 + }, + { + "kind": "func", + "name": "UpdatePeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdatePeriodEnd() *BillingInvoiceLineUpsertBulk", + "line": 3363 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetInvoiceID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3370 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateInvoiceID() *BillingInvoiceLineUpsertBulk", + "line": 3377 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineUpsertBulk", + "line": 3384 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateManagedBy() *BillingInvoiceLineUpsertBulk", + "line": 3391 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetParentLineID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3398 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateParentLineID() *BillingInvoiceLineUpsertBulk", + "line": 3405 + }, + { + "kind": "func", + "name": "ClearParentLineID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearParentLineID() *BillingInvoiceLineUpsertBulk", + "line": 3412 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetInvoiceAt(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3419 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateInvoiceAt() *BillingInvoiceLineUpsertBulk", + "line": 3426 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3433 + }, + { + "kind": "func", + "name": "UpdateOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsertBulk", + "line": 3440 + }, + { + "kind": "func", + "name": "ClearOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearOverrideCollectionPeriodEnd() *BillingInvoiceLineUpsertBulk", + "line": 3447 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineUpsertBulk", + "line": 3454 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateStatus() *BillingInvoiceLineUpsertBulk", + "line": 3461 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUpsertBulk", + "line": 3468 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateQuantity() *BillingInvoiceLineUpsertBulk", + "line": 3475 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearQuantity() *BillingInvoiceLineUpsertBulk", + "line": 3482 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineUpsertBulk", + "line": 3489 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateRatecardDiscounts() *BillingInvoiceLineUpsertBulk", + "line": 3496 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearRatecardDiscounts() *BillingInvoiceLineUpsertBulk", + "line": 3503 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3510 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateChildUniqueReferenceID() *BillingInvoiceLineUpsertBulk", + "line": 3517 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearChildUniqueReferenceID() *BillingInvoiceLineUpsertBulk", + "line": 3524 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSubscriptionID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3531 + }, + { + "kind": "func", + "name": "UpdateSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSubscriptionID() *BillingInvoiceLineUpsertBulk", + "line": 3538 + }, + { + "kind": "func", + "name": "ClearSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSubscriptionID() *BillingInvoiceLineUpsertBulk", + "line": 3545 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSubscriptionPhaseID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3552 + }, + { + "kind": "func", + "name": "UpdateSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSubscriptionPhaseID() *BillingInvoiceLineUpsertBulk", + "line": 3559 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSubscriptionPhaseID() *BillingInvoiceLineUpsertBulk", + "line": 3566 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSubscriptionItemID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3573 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSubscriptionItemID() *BillingInvoiceLineUpsertBulk", + "line": 3580 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSubscriptionItemID() *BillingInvoiceLineUpsertBulk", + "line": 3587 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3594 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsertBulk", + "line": 3601 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpsertBulk", + "line": 3608 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineUpsertBulk", + "line": 3615 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsertBulk", + "line": 3622 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSubscriptionBillingPeriodTo() *BillingInvoiceLineUpsertBulk", + "line": 3629 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetSplitLineGroupID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3636 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateSplitLineGroupID() *BillingInvoiceLineUpsertBulk", + "line": 3643 + }, + { + "kind": "func", + "name": "ClearSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearSplitLineGroupID() *BillingInvoiceLineUpsertBulk", + "line": 3650 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetChargeID(v string) *BillingInvoiceLineUpsertBulk", + "line": 3657 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateChargeID() *BillingInvoiceLineUpsertBulk", + "line": 3664 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearChargeID() *BillingInvoiceLineUpsertBulk", + "line": 3671 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetEngine(v billing.LineEngineType) *BillingInvoiceLineUpsertBulk", + "line": 3678 + }, + { + "kind": "func", + "name": "UpdateEngine", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateEngine() *BillingInvoiceLineUpsertBulk", + "line": 3685 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetLineIds(v string) *BillingInvoiceLineUpsertBulk", + "line": 3692 + }, + { + "kind": "func", + "name": "UpdateLineIds", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateLineIds() *BillingInvoiceLineUpsertBulk", + "line": 3699 + }, + { + "kind": "func", + "name": "ClearLineIds", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearLineIds() *BillingInvoiceLineUpsertBulk", + "line": 3706 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertBulk) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineUpsertBulk", + "line": 3713 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertBulk) UpdateCreditsApplied() *BillingInvoiceLineUpsertBulk", + "line": 3720 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ClearCreditsApplied() *BillingInvoiceLineUpsertBulk", + "line": 3727 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineUpsertBulk) Exec(ctx context.Context) error", + "line": 3734 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineUpsertBulk) ExecX(ctx context.Context)", + "line": 3750 + } + ], + "line_count": 3754 + }, + "openmeter/ent/db/billinginvoiceline_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDelete", + "signature": "type BillingInvoiceLineDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineDelete) Where(ps ...predicate.BillingInvoiceLine) *BillingInvoiceLineDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceLineDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDeleteOne", + "signature": "type BillingInvoiceLineDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineDeleteOne) Where(ps ...predicate.BillingInvoiceLine) *BillingInvoiceLineDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoiceline_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineQuery", + "signature": "type BillingInvoiceLineQuery struct", + "line": 38 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceLineQuery) Where(ps ...predicate.BillingInvoiceLine) *BillingInvoiceLineQuery", + "line": 71 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceLineQuery) Limit(limit int) *BillingInvoiceLineQuery", + "line": 77 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceLineQuery) Offset(offset int) *BillingInvoiceLineQuery", + "line": 83 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceLineQuery) Unique(unique bool) *BillingInvoiceLineQuery", + "line": 90 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceLineQuery) Order(o ...billinginvoiceline.OrderOption) *BillingInvoiceLineQuery", + "line": 96 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *BillingInvoiceLineQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 102 + }, + { + "kind": "func", + "name": "QuerySplitLineGroup", + "signature": "func (_q *BillingInvoiceLineQuery) QuerySplitLineGroup() *BillingInvoiceSplitLineGroupQuery", + "line": 124 + }, + { + "kind": "func", + "name": "QueryFlatFeeLine", + "signature": "func (_q *BillingInvoiceLineQuery) QueryFlatFeeLine() *BillingInvoiceFlatFeeLineConfigQuery", + "line": 146 + }, + { + "kind": "func", + "name": "QueryUsageBasedLine", + "signature": "func (_q *BillingInvoiceLineQuery) QueryUsageBasedLine() *BillingInvoiceUsageBasedLineConfigQuery", + "line": 168 + }, + { + "kind": "func", + "name": "QueryParentLine", + "signature": "func (_q *BillingInvoiceLineQuery) QueryParentLine() *BillingInvoiceLineQuery", + "line": 190 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_q *BillingInvoiceLineQuery) QueryDetailedLines() *BillingInvoiceLineQuery", + "line": 212 + }, + { + "kind": "func", + "name": "QueryDetailedLinesV2", + "signature": "func (_q *BillingInvoiceLineQuery) QueryDetailedLinesV2() *BillingStandardInvoiceDetailedLineQuery", + "line": 234 + }, + { + "kind": "func", + "name": "QueryLineUsageDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) QueryLineUsageDiscounts() *BillingInvoiceLineUsageDiscountQuery", + "line": 256 + }, + { + "kind": "func", + "name": "QueryLineAmountDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) QueryLineAmountDiscounts() *BillingInvoiceLineDiscountQuery", + "line": 278 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *BillingInvoiceLineQuery) QuerySubscription() *SubscriptionQuery", + "line": 300 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_q *BillingInvoiceLineQuery) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 322 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *BillingInvoiceLineQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 344 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *BillingInvoiceLineQuery) QueryCharge() *ChargeQuery", + "line": 366 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunPayment", + "signature": "func (_q *BillingInvoiceLineQuery) QueryChargeFlatFeeRunPayment() *ChargeFlatFeeRunPaymentQuery", + "line": 388 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunCreditAllocations", + "signature": "func (_q *BillingInvoiceLineQuery) QueryChargeFlatFeeRunCreditAllocations() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 410 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceLineQuery) QueryChargeFlatFeeRuns() *ChargeFlatFeeRunQuery", + "line": 432 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRun", + "signature": "func (_q *BillingInvoiceLineQuery) QueryChargeUsageBasedRun() *ChargeUsageBasedRunsQuery", + "line": 454 + }, + { + "kind": "func", + "name": "QueryChargeCreditPurchaseInvoicedPayment", + "signature": "func (_q *BillingInvoiceLineQuery) QueryChargeCreditPurchaseInvoicedPayment() *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 476 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *BillingInvoiceLineQuery) QueryTaxCode() *TaxCodeQuery", + "line": 498 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceLineQuery) First(ctx context.Context) (*BillingInvoiceLine, error)", + "line": 521 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceLineQuery) FirstX(ctx context.Context) *BillingInvoiceLine", + "line": 533 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceLineQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 543 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceLineQuery) FirstIDX(ctx context.Context) string", + "line": 556 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceLineQuery) Only(ctx context.Context) (*BillingInvoiceLine, error)", + "line": 567 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceLineQuery) OnlyX(ctx context.Context) *BillingInvoiceLine", + "line": 583 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceLineQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 594 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceLineQuery) OnlyIDX(ctx context.Context) string", + "line": 611 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceLineQuery) All(ctx context.Context) ([]*BillingInvoiceLine, error)", + "line": 620 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceLineQuery) AllX(ctx context.Context) []*BillingInvoiceLine", + "line": 630 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceLineQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 639 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceLineQuery) IDsX(ctx context.Context) []string", + "line": 651 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceLineQuery) Count(ctx context.Context) (int, error)", + "line": 660 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceLineQuery) CountX(ctx context.Context) int", + "line": 669 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceLineQuery) Exist(ctx context.Context) (bool, error)", + "line": 678 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceLineQuery) ExistX(ctx context.Context) bool", + "line": 691 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceLineQuery) Clone() *BillingInvoiceLineQuery", + "line": 701 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *BillingInvoiceLineQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *BillingInvoiceLineQuery", + "line": 738 + }, + { + "kind": "func", + "name": "WithSplitLineGroup", + "signature": "func (_q *BillingInvoiceLineQuery) WithSplitLineGroup(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *BillingInvoiceLineQuery", + "line": 749 + }, + { + "kind": "func", + "name": "WithFlatFeeLine", + "signature": "func (_q *BillingInvoiceLineQuery) WithFlatFeeLine(opts ...func(*BillingInvoiceFlatFeeLineConfigQuery)) *BillingInvoiceLineQuery", + "line": 760 + }, + { + "kind": "func", + "name": "WithUsageBasedLine", + "signature": "func (_q *BillingInvoiceLineQuery) WithUsageBasedLine(opts ...func(*BillingInvoiceUsageBasedLineConfigQuery)) *BillingInvoiceLineQuery", + "line": 771 + }, + { + "kind": "func", + "name": "WithParentLine", + "signature": "func (_q *BillingInvoiceLineQuery) WithParentLine(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceLineQuery", + "line": 782 + }, + { + "kind": "func", + "name": "WithDetailedLines", + "signature": "func (_q *BillingInvoiceLineQuery) WithDetailedLines(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceLineQuery", + "line": 793 + }, + { + "kind": "func", + "name": "WithDetailedLinesV2", + "signature": "func (_q *BillingInvoiceLineQuery) WithDetailedLinesV2(opts ...func(*BillingStandardInvoiceDetailedLineQuery)) *BillingInvoiceLineQuery", + "line": 804 + }, + { + "kind": "func", + "name": "WithLineUsageDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) WithLineUsageDiscounts(opts ...func(*BillingInvoiceLineUsageDiscountQuery)) *BillingInvoiceLineQuery", + "line": 815 + }, + { + "kind": "func", + "name": "WithLineAmountDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) WithLineAmountDiscounts(opts ...func(*BillingInvoiceLineDiscountQuery)) *BillingInvoiceLineQuery", + "line": 826 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *BillingInvoiceLineQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *BillingInvoiceLineQuery", + "line": 837 + }, + { + "kind": "func", + "name": "WithSubscriptionPhase", + "signature": "func (_q *BillingInvoiceLineQuery) WithSubscriptionPhase(opts ...func(*SubscriptionPhaseQuery)) *BillingInvoiceLineQuery", + "line": 848 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *BillingInvoiceLineQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *BillingInvoiceLineQuery", + "line": 859 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *BillingInvoiceLineQuery) WithCharge(opts ...func(*ChargeQuery)) *BillingInvoiceLineQuery", + "line": 870 + }, + { + "kind": "func", + "name": "WithChargeFlatFeeRunPayment", + "signature": "func (_q *BillingInvoiceLineQuery) WithChargeFlatFeeRunPayment(opts ...func(*ChargeFlatFeeRunPaymentQuery)) *BillingInvoiceLineQuery", + "line": 881 + }, + { + "kind": "func", + "name": "WithChargeFlatFeeRunCreditAllocations", + "signature": "func (_q *BillingInvoiceLineQuery) WithChargeFlatFeeRunCreditAllocations(opts ...func(*ChargeFlatFeeRunCreditAllocationsQuery)) *BillingInvoiceLineQuery", + "line": 892 + }, + { + "kind": "func", + "name": "WithChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceLineQuery) WithChargeFlatFeeRuns(opts ...func(*ChargeFlatFeeRunQuery)) *BillingInvoiceLineQuery", + "line": 903 + }, + { + "kind": "func", + "name": "WithChargeUsageBasedRun", + "signature": "func (_q *BillingInvoiceLineQuery) WithChargeUsageBasedRun(opts ...func(*ChargeUsageBasedRunsQuery)) *BillingInvoiceLineQuery", + "line": 914 + }, + { + "kind": "func", + "name": "WithChargeCreditPurchaseInvoicedPayment", + "signature": "func (_q *BillingInvoiceLineQuery) WithChargeCreditPurchaseInvoicedPayment(opts ...func(*ChargeCreditPurchaseInvoicedPaymentQuery)) *BillingInvoiceLineQuery", + "line": 925 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *BillingInvoiceLineQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *BillingInvoiceLineQuery", + "line": 936 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceLineQuery) GroupBy(field string, fields ...string) *BillingInvoiceLineGroupBy", + "line": 959 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceLineQuery) Select(fields ...string) *BillingInvoiceLineSelect", + "line": 980 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceLineQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineSelect", + "line": 989 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceLineQuery) prepareQuery(ctx context.Context) error", + "line": 993 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceLineQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceLine, error)", + "line": 1019 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *BillingInvoiceLineQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoice)) error", + "line": 1209 + }, + { + "kind": "func", + "name": "loadSplitLineGroup", + "signature": "func (_q *BillingInvoiceLineQuery) loadSplitLineGroup(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceSplitLineGroup)) error", + "line": 1238 + }, + { + "kind": "func", + "name": "loadFlatFeeLine", + "signature": "func (_q *BillingInvoiceLineQuery) loadFlatFeeLine(ctx context.Context, query *BillingInvoiceFlatFeeLineConfigQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceFlatFeeLineConfig)) error", + "line": 1270 + }, + { + "kind": "func", + "name": "loadUsageBasedLine", + "signature": "func (_q *BillingInvoiceLineQuery) loadUsageBasedLine(ctx context.Context, query *BillingInvoiceUsageBasedLineConfigQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceUsageBasedLineConfig)) error", + "line": 1302 + }, + { + "kind": "func", + "name": "loadParentLine", + "signature": "func (_q *BillingInvoiceLineQuery) loadParentLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceLine)) error", + "line": 1334 + }, + { + "kind": "func", + "name": "loadDetailedLines", + "signature": "func (_q *BillingInvoiceLineQuery) loadDetailedLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceLine)) error", + "line": 1366 + }, + { + "kind": "func", + "name": "loadDetailedLinesV2", + "signature": "func (_q *BillingInvoiceLineQuery) loadDetailedLinesV2(ctx context.Context, query *BillingStandardInvoiceDetailedLineQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingStandardInvoiceDetailedLine)) error", + "line": 1400 + }, + { + "kind": "func", + "name": "loadLineUsageDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) loadLineUsageDiscounts(ctx context.Context, query *BillingInvoiceLineUsageDiscountQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceLineUsageDiscount)) error", + "line": 1430 + }, + { + "kind": "func", + "name": "loadLineAmountDiscounts", + "signature": "func (_q *BillingInvoiceLineQuery) loadLineAmountDiscounts(ctx context.Context, query *BillingInvoiceLineDiscountQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *BillingInvoiceLineDiscount)) error", + "line": 1460 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *BillingInvoiceLineQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *Subscription)) error", + "line": 1490 + }, + { + "kind": "func", + "name": "loadSubscriptionPhase", + "signature": "func (_q *BillingInvoiceLineQuery) loadSubscriptionPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *SubscriptionPhase)) error", + "line": 1522 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *BillingInvoiceLineQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *SubscriptionItem)) error", + "line": 1554 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *BillingInvoiceLineQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *Charge)) error", + "line": 1586 + }, + { + "kind": "func", + "name": "loadChargeFlatFeeRunPayment", + "signature": "func (_q *BillingInvoiceLineQuery) loadChargeFlatFeeRunPayment(ctx context.Context, query *ChargeFlatFeeRunPaymentQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *ChargeFlatFeeRunPayment)) error", + "line": 1618 + }, + { + "kind": "func", + "name": "loadChargeFlatFeeRunCreditAllocations", + "signature": "func (_q *BillingInvoiceLineQuery) loadChargeFlatFeeRunCreditAllocations(ctx context.Context, query *ChargeFlatFeeRunCreditAllocationsQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *ChargeFlatFeeRunCreditAllocations)) error", + "line": 1645 + }, + { + "kind": "func", + "name": "loadChargeFlatFeeRuns", + "signature": "func (_q *BillingInvoiceLineQuery) loadChargeFlatFeeRuns(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *ChargeFlatFeeRun)) error", + "line": 1678 + }, + { + "kind": "func", + "name": "loadChargeUsageBasedRun", + "signature": "func (_q *BillingInvoiceLineQuery) loadChargeUsageBasedRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *ChargeUsageBasedRuns)) error", + "line": 1708 + }, + { + "kind": "func", + "name": "loadChargeCreditPurchaseInvoicedPayment", + "signature": "func (_q *BillingInvoiceLineQuery) loadChargeCreditPurchaseInvoicedPayment(ctx context.Context, query *ChargeCreditPurchaseInvoicedPaymentQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *ChargeCreditPurchaseInvoicedPayment)) error", + "line": 1738 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *BillingInvoiceLineQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*BillingInvoiceLine, init func(*BillingInvoiceLine), assign func(*BillingInvoiceLine, *TaxCode)) error", + "line": 1765 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceLineQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1798 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceLineQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1810 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceLineQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1874 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceLineQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceLineQuery", + "line": 1912 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceLineQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceLineQuery", + "line": 1925 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineGroupBy", + "signature": "type BillingInvoiceLineGroupBy struct", + "line": 1936 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceLineGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineGroupBy", + "line": 1942 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceLineGroupBy) Scan(ctx context.Context, v any) error", + "line": 1948 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceLineGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceLineQuery, v any) error", + "line": 1956 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineSelect", + "signature": "type BillingInvoiceLineSelect struct", + "line": 1984 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceLineSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineSelect", + "line": 1990 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceLineSelect) Scan(ctx context.Context, v any) error", + "line": 1996 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceLineSelect) sqlScan(ctx context.Context, root *BillingInvoiceLineQuery, v any) error", + "line": 2004 + } + ], + "line_count": 2023 + }, + "openmeter/ent/db/billinginvoiceline_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUpdate", + "signature": "type BillingInvoiceLineUpdate struct", + "line": 41 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineUpdate) Where(ps ...predicate.BillingInvoiceLine) *BillingInvoiceLineUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *BillingInvoiceLineUpdate) SetAnnotations(v models.Annotations) *BillingInvoiceLineUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearAnnotations() *BillingInvoiceLineUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceLineUpdate) SetMetadata(v map[string]string) *BillingInvoiceLineUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearMetadata() *BillingInvoiceLineUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceLineUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdate) SetDeletedAt(v time.Time) *BillingInvoiceLineUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineUpdate", + "line": 90 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearDeletedAt() *BillingInvoiceLineUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingInvoiceLineUpdate) SetName(v string) *BillingInvoiceLineUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableName(v *string) *BillingInvoiceLineUpdate", + "line": 110 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineUpdate) SetDescription(v string) *BillingInvoiceLineUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableDescription(v *string) *BillingInvoiceLineUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearDescription() *BillingInvoiceLineUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxConfig(v *billing.TaxConfig) *BillingInvoiceLineUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearTaxConfig() *BillingInvoiceLineUpdate", + "line": 152 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxCodeID(v string) *BillingInvoiceLineUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxCodeID(v *string) *BillingInvoiceLineUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearTaxCodeID() *BillingInvoiceLineUpdate", + "line": 172 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceLineUpdate", + "line": 184 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearTaxBehavior() *BillingInvoiceLineUpdate", + "line": 192 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceLineUpdate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 198 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 254 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 260 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 268 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 288 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 296 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 302 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearInvoicingAppExternalID() *BillingInvoiceLineUpdate", + "line": 324 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_u *BillingInvoiceLineUpdate) SetPeriodStart(v time.Time) *BillingInvoiceLineUpdate", + "line": 330 + }, + { + "kind": "func", + "name": "SetNillablePeriodStart", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillablePeriodStart(v *time.Time) *BillingInvoiceLineUpdate", + "line": 336 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdate) SetPeriodEnd(v time.Time) *BillingInvoiceLineUpdate", + "line": 344 + }, + { + "kind": "func", + "name": "SetNillablePeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillablePeriodEnd(v *time.Time) *BillingInvoiceLineUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetInvoiceID(v string) *BillingInvoiceLineUpdate", + "line": 358 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableInvoiceID(v *string) *BillingInvoiceLineUpdate", + "line": 364 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *BillingInvoiceLineUpdate) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineUpdate", + "line": 372 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *BillingInvoiceLineUpdate", + "line": 378 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetParentLineID(v string) *BillingInvoiceLineUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "SetNillableParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableParentLineID(v *string) *BillingInvoiceLineUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "ClearParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearParentLineID() *BillingInvoiceLineUpdate", + "line": 400 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *BillingInvoiceLineUpdate) SetInvoiceAt(v time.Time) *BillingInvoiceLineUpdate", + "line": 406 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableInvoiceAt(v *time.Time) *BillingInvoiceLineUpdate", + "line": 412 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdate) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineUpdate", + "line": 420 + }, + { + "kind": "func", + "name": "SetNillableOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableOverrideCollectionPeriodEnd(v *time.Time) *BillingInvoiceLineUpdate", + "line": 426 + }, + { + "kind": "func", + "name": "ClearOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearOverrideCollectionPeriodEnd() *BillingInvoiceLineUpdate", + "line": 434 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *BillingInvoiceLineUpdate) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineUpdate", + "line": 440 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableStatus(v *billing.InvoiceLineStatus) *BillingInvoiceLineUpdate", + "line": 446 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineUpdate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 454 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 460 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearQuantity() *BillingInvoiceLineUpdate", + "line": 468 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineUpdate", + "line": 474 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearRatecardDiscounts() *BillingInvoiceLineUpdate", + "line": 480 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUpdate", + "line": 486 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineUpdate", + "line": 492 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChildUniqueReferenceID() *BillingInvoiceLineUpdate", + "line": 500 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionID(v string) *BillingInvoiceLineUpdate", + "line": 506 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSubscriptionID(v *string) *BillingInvoiceLineUpdate", + "line": 512 + }, + { + "kind": "func", + "name": "ClearSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionID() *BillingInvoiceLineUpdate", + "line": 520 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionPhaseID(v string) *BillingInvoiceLineUpdate", + "line": 526 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSubscriptionPhaseID(v *string) *BillingInvoiceLineUpdate", + "line": 532 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionPhaseID() *BillingInvoiceLineUpdate", + "line": 540 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionItemID(v string) *BillingInvoiceLineUpdate", + "line": 546 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSubscriptionItemID(v *string) *BillingInvoiceLineUpdate", + "line": 552 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionItemID() *BillingInvoiceLineUpdate", + "line": 560 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineUpdate", + "line": 566 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceLineUpdate", + "line": 572 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpdate", + "line": 580 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineUpdate", + "line": 586 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceLineUpdate", + "line": 592 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionBillingPeriodTo() *BillingInvoiceLineUpdate", + "line": 600 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSplitLineGroupID(v string) *BillingInvoiceLineUpdate", + "line": 606 + }, + { + "kind": "func", + "name": "SetNillableSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableSplitLineGroupID(v *string) *BillingInvoiceLineUpdate", + "line": 612 + }, + { + "kind": "func", + "name": "ClearSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSplitLineGroupID() *BillingInvoiceLineUpdate", + "line": 620 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeID(v string) *BillingInvoiceLineUpdate", + "line": 626 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargeID(v *string) *BillingInvoiceLineUpdate", + "line": 632 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeID() *BillingInvoiceLineUpdate", + "line": 640 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (_u *BillingInvoiceLineUpdate) SetEngine(v billing.LineEngineType) *BillingInvoiceLineUpdate", + "line": 646 + }, + { + "kind": "func", + "name": "SetNillableEngine", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableEngine(v *billing.LineEngineType) *BillingInvoiceLineUpdate", + "line": 652 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (_u *BillingInvoiceLineUpdate) SetLineIds(v string) *BillingInvoiceLineUpdate", + "line": 660 + }, + { + "kind": "func", + "name": "SetNillableLineIds", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableLineIds(v *string) *BillingInvoiceLineUpdate", + "line": 666 + }, + { + "kind": "func", + "name": "ClearLineIds", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearLineIds() *BillingInvoiceLineUpdate", + "line": 674 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *BillingInvoiceLineUpdate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineUpdate", + "line": 680 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearCreditsApplied() *BillingInvoiceLineUpdate", + "line": 686 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetBillingInvoiceID(id string) *BillingInvoiceLineUpdate", + "line": 692 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingInvoiceLineUpdate) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceLineUpdate", + "line": 698 + }, + { + "kind": "func", + "name": "SetSplitLineGroup", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSplitLineGroup(v *BillingInvoiceSplitLineGroup) *BillingInvoiceLineUpdate", + "line": 703 + }, + { + "kind": "func", + "name": "SetFlatFeeLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetFlatFeeLineID(id string) *BillingInvoiceLineUpdate", + "line": 708 + }, + { + "kind": "func", + "name": "SetNillableFlatFeeLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableFlatFeeLineID(id *string) *BillingInvoiceLineUpdate", + "line": 714 + }, + { + "kind": "func", + "name": "SetFlatFeeLine", + "signature": "func (_u *BillingInvoiceLineUpdate) SetFlatFeeLine(v *BillingInvoiceFlatFeeLineConfig) *BillingInvoiceLineUpdate", + "line": 722 + }, + { + "kind": "func", + "name": "SetUsageBasedLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetUsageBasedLineID(id string) *BillingInvoiceLineUpdate", + "line": 727 + }, + { + "kind": "func", + "name": "SetNillableUsageBasedLineID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableUsageBasedLineID(id *string) *BillingInvoiceLineUpdate", + "line": 733 + }, + { + "kind": "func", + "name": "SetUsageBasedLine", + "signature": "func (_u *BillingInvoiceLineUpdate) SetUsageBasedLine(v *BillingInvoiceUsageBasedLineConfig) *BillingInvoiceLineUpdate", + "line": 741 + }, + { + "kind": "func", + "name": "SetParentLine", + "signature": "func (_u *BillingInvoiceLineUpdate) SetParentLine(v *BillingInvoiceLine) *BillingInvoiceLineUpdate", + "line": 746 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) AddDetailedLineIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 751 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdate) AddDetailedLines(v ...*BillingInvoiceLine) *BillingInvoiceLineUpdate", + "line": 757 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2IDs", + "signature": "func (_u *BillingInvoiceLineUpdate) AddDetailedLinesV2IDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 766 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdate) AddDetailedLinesV2(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceLineUpdate", + "line": 772 + }, + { + "kind": "func", + "name": "AddLineUsageDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) AddLineUsageDiscountIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 781 + }, + { + "kind": "func", + "name": "AddLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) AddLineUsageDiscounts(v ...*BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUpdate", + "line": 787 + }, + { + "kind": "func", + "name": "AddLineAmountDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) AddLineAmountDiscountIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 796 + }, + { + "kind": "func", + "name": "AddLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) AddLineAmountDiscounts(v ...*BillingInvoiceLineDiscount) *BillingInvoiceLineUpdate", + "line": 802 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscription(v *Subscription) *BillingInvoiceLineUpdate", + "line": 811 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionPhase(v *SubscriptionPhase) *BillingInvoiceLineUpdate", + "line": 816 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *BillingInvoiceLineUpdate) SetSubscriptionItem(v *SubscriptionItem) *BillingInvoiceLineUpdate", + "line": 821 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *BillingInvoiceLineUpdate) SetCharge(v *Charge) *BillingInvoiceLineUpdate", + "line": 826 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeFlatFeeRunPaymentID(id string) *BillingInvoiceLineUpdate", + "line": 831 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargeFlatFeeRunPaymentID(id *string) *BillingInvoiceLineUpdate", + "line": 837 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPayment", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeFlatFeeRunPayment(v *ChargeFlatFeeRunPayment) *BillingInvoiceLineUpdate", + "line": 845 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocationIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) AddChargeFlatFeeRunCreditAllocationIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 850 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdate) AddChargeFlatFeeRunCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *BillingInvoiceLineUpdate", + "line": 856 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunsID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeFlatFeeRunsID(id string) *BillingInvoiceLineUpdate", + "line": 865 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunsID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargeFlatFeeRunsID(id *string) *BillingInvoiceLineUpdate", + "line": 871 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeFlatFeeRuns(v *ChargeFlatFeeRun) *BillingInvoiceLineUpdate", + "line": 879 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRunID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeUsageBasedRunID(id string) *BillingInvoiceLineUpdate", + "line": 884 + }, + { + "kind": "func", + "name": "SetNillableChargeUsageBasedRunID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargeUsageBasedRunID(id *string) *BillingInvoiceLineUpdate", + "line": 890 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRun", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeUsageBasedRun(v *ChargeUsageBasedRuns) *BillingInvoiceLineUpdate", + "line": 898 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeCreditPurchaseInvoicedPaymentID(id string) *BillingInvoiceLineUpdate", + "line": 903 + }, + { + "kind": "func", + "name": "SetNillableChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdate) SetNillableChargeCreditPurchaseInvoicedPaymentID(id *string) *BillingInvoiceLineUpdate", + "line": 909 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPayment", + "signature": "func (_u *BillingInvoiceLineUpdate) SetChargeCreditPurchaseInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *BillingInvoiceLineUpdate", + "line": 917 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingInvoiceLineUpdate) SetTaxCode(v *TaxCode) *BillingInvoiceLineUpdate", + "line": 922 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineUpdate) Mutation() *BillingInvoiceLineMutation", + "line": 927 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearBillingInvoice() *BillingInvoiceLineUpdate", + "line": 932 + }, + { + "kind": "func", + "name": "ClearSplitLineGroup", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSplitLineGroup() *BillingInvoiceLineUpdate", + "line": 938 + }, + { + "kind": "func", + "name": "ClearFlatFeeLine", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearFlatFeeLine() *BillingInvoiceLineUpdate", + "line": 944 + }, + { + "kind": "func", + "name": "ClearUsageBasedLine", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearUsageBasedLine() *BillingInvoiceLineUpdate", + "line": 950 + }, + { + "kind": "func", + "name": "ClearParentLine", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearParentLine() *BillingInvoiceLineUpdate", + "line": 956 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearDetailedLines() *BillingInvoiceLineUpdate", + "line": 962 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveDetailedLineIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 968 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveDetailedLines(v ...*BillingInvoiceLine) *BillingInvoiceLineUpdate", + "line": 974 + }, + { + "kind": "func", + "name": "ClearDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearDetailedLinesV2() *BillingInvoiceLineUpdate", + "line": 983 + }, + { + "kind": "func", + "name": "RemoveDetailedLinesV2IDs", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveDetailedLinesV2IDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 989 + }, + { + "kind": "func", + "name": "RemoveDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveDetailedLinesV2(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceLineUpdate", + "line": 995 + }, + { + "kind": "func", + "name": "ClearLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearLineUsageDiscounts() *BillingInvoiceLineUpdate", + "line": 1004 + }, + { + "kind": "func", + "name": "RemoveLineUsageDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveLineUsageDiscountIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 1010 + }, + { + "kind": "func", + "name": "RemoveLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveLineUsageDiscounts(v ...*BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUpdate", + "line": 1016 + }, + { + "kind": "func", + "name": "ClearLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearLineAmountDiscounts() *BillingInvoiceLineUpdate", + "line": 1025 + }, + { + "kind": "func", + "name": "RemoveLineAmountDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveLineAmountDiscountIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 1031 + }, + { + "kind": "func", + "name": "RemoveLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveLineAmountDiscounts(v ...*BillingInvoiceLineDiscount) *BillingInvoiceLineUpdate", + "line": 1037 + }, + { + "kind": "func", + "name": "ClearSubscription", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscription() *BillingInvoiceLineUpdate", + "line": 1046 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhase", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionPhase() *BillingInvoiceLineUpdate", + "line": 1052 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearSubscriptionItem() *BillingInvoiceLineUpdate", + "line": 1058 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearCharge() *BillingInvoiceLineUpdate", + "line": 1064 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunPayment", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeFlatFeeRunPayment() *BillingInvoiceLineUpdate", + "line": 1070 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeFlatFeeRunCreditAllocations() *BillingInvoiceLineUpdate", + "line": 1076 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunCreditAllocationIDs", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveChargeFlatFeeRunCreditAllocationIDs(ids ...string) *BillingInvoiceLineUpdate", + "line": 1082 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdate) RemoveChargeFlatFeeRunCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *BillingInvoiceLineUpdate", + "line": 1088 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeFlatFeeRuns() *BillingInvoiceLineUpdate", + "line": 1097 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRun", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeUsageBasedRun() *BillingInvoiceLineUpdate", + "line": 1103 + }, + { + "kind": "func", + "name": "ClearChargeCreditPurchaseInvoicedPayment", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearChargeCreditPurchaseInvoicedPayment() *BillingInvoiceLineUpdate", + "line": 1109 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingInvoiceLineUpdate) ClearTaxCode() *BillingInvoiceLineUpdate", + "line": 1115 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineUpdate) Save(ctx context.Context) (int, error)", + "line": 1121 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineUpdate) SaveX(ctx context.Context) int", + "line": 1127 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineUpdate) Exec(ctx context.Context) error", + "line": 1136 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineUpdate) ExecX(ctx context.Context)", + "line": 1142 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineUpdate) defaults()", + "line": 1149 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineUpdate) check() error", + "line": 1157 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 1194 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUpdateOne", + "signature": "type BillingInvoiceLineUpdateOne struct", + "line": 1996 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetAnnotations(v models.Annotations) *BillingInvoiceLineUpdateOne", + "line": 2004 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearAnnotations() *BillingInvoiceLineUpdateOne", + "line": 2010 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetMetadata(v map[string]string) *BillingInvoiceLineUpdateOne", + "line": 2016 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearMetadata() *BillingInvoiceLineUpdateOne", + "line": 2022 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2028 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2034 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2040 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearDeletedAt() *BillingInvoiceLineUpdateOne", + "line": 2048 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetName(v string) *BillingInvoiceLineUpdateOne", + "line": 2054 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableName(v *string) *BillingInvoiceLineUpdateOne", + "line": 2060 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetDescription(v string) *BillingInvoiceLineUpdateOne", + "line": 2068 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableDescription(v *string) *BillingInvoiceLineUpdateOne", + "line": 2074 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearDescription() *BillingInvoiceLineUpdateOne", + "line": 2082 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxConfig(v billing.TaxConfig) *BillingInvoiceLineUpdateOne", + "line": 2088 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxConfig(v *billing.TaxConfig) *BillingInvoiceLineUpdateOne", + "line": 2094 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearTaxConfig() *BillingInvoiceLineUpdateOne", + "line": 2102 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxCodeID(v string) *BillingInvoiceLineUpdateOne", + "line": 2108 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxCodeID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2114 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearTaxCodeID() *BillingInvoiceLineUpdateOne", + "line": 2122 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceLineUpdateOne", + "line": 2128 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceLineUpdateOne", + "line": 2134 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearTaxBehavior() *BillingInvoiceLineUpdateOne", + "line": 2142 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2148 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2154 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2162 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2168 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2176 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2182 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2190 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2196 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2204 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2210 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2218 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2224 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2232 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2238 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTotal(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2246 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2252 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUpdateOne", + "line": 2260 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2266 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearInvoicingAppExternalID() *BillingInvoiceLineUpdateOne", + "line": 2274 + }, + { + "kind": "func", + "name": "SetPeriodStart", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetPeriodStart(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2280 + }, + { + "kind": "func", + "name": "SetNillablePeriodStart", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillablePeriodStart(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2286 + }, + { + "kind": "func", + "name": "SetPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetPeriodEnd(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2294 + }, + { + "kind": "func", + "name": "SetNillablePeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillablePeriodEnd(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2300 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetInvoiceID(v string) *BillingInvoiceLineUpdateOne", + "line": 2308 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableInvoiceID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2314 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetManagedBy(v billing.InvoiceLineManagedBy) *BillingInvoiceLineUpdateOne", + "line": 2322 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *BillingInvoiceLineUpdateOne", + "line": 2328 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetParentLineID(v string) *BillingInvoiceLineUpdateOne", + "line": 2336 + }, + { + "kind": "func", + "name": "SetNillableParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableParentLineID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2342 + }, + { + "kind": "func", + "name": "ClearParentLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearParentLineID() *BillingInvoiceLineUpdateOne", + "line": 2350 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetInvoiceAt(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2356 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableInvoiceAt(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2362 + }, + { + "kind": "func", + "name": "SetOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetOverrideCollectionPeriodEnd(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2370 + }, + { + "kind": "func", + "name": "SetNillableOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableOverrideCollectionPeriodEnd(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2376 + }, + { + "kind": "func", + "name": "ClearOverrideCollectionPeriodEnd", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearOverrideCollectionPeriodEnd() *BillingInvoiceLineUpdateOne", + "line": 2384 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetStatus(v billing.InvoiceLineStatus) *BillingInvoiceLineUpdateOne", + "line": 2390 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableStatus(v *billing.InvoiceLineStatus) *BillingInvoiceLineUpdateOne", + "line": 2396 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2404 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 2410 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearQuantity() *BillingInvoiceLineUpdateOne", + "line": 2418 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceLineUpdateOne", + "line": 2424 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearRatecardDiscounts() *BillingInvoiceLineUpdateOne", + "line": 2430 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUpdateOne", + "line": 2436 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2442 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChildUniqueReferenceID() *BillingInvoiceLineUpdateOne", + "line": 2450 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionID(v string) *BillingInvoiceLineUpdateOne", + "line": 2456 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSubscriptionID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2462 + }, + { + "kind": "func", + "name": "ClearSubscriptionID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionID() *BillingInvoiceLineUpdateOne", + "line": 2470 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionPhaseID(v string) *BillingInvoiceLineUpdateOne", + "line": 2476 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSubscriptionPhaseID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2482 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhaseID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionPhaseID() *BillingInvoiceLineUpdateOne", + "line": 2490 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionItemID(v string) *BillingInvoiceLineUpdateOne", + "line": 2496 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSubscriptionItemID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2502 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionItemID() *BillingInvoiceLineUpdateOne", + "line": 2510 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2516 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2522 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceLineUpdateOne", + "line": 2530 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceLineUpdateOne", + "line": 2536 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceLineUpdateOne", + "line": 2542 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionBillingPeriodTo() *BillingInvoiceLineUpdateOne", + "line": 2550 + }, + { + "kind": "func", + "name": "SetSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSplitLineGroupID(v string) *BillingInvoiceLineUpdateOne", + "line": 2556 + }, + { + "kind": "func", + "name": "SetNillableSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableSplitLineGroupID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2562 + }, + { + "kind": "func", + "name": "ClearSplitLineGroupID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSplitLineGroupID() *BillingInvoiceLineUpdateOne", + "line": 2570 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeID(v string) *BillingInvoiceLineUpdateOne", + "line": 2576 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargeID(v *string) *BillingInvoiceLineUpdateOne", + "line": 2582 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeID() *BillingInvoiceLineUpdateOne", + "line": 2590 + }, + { + "kind": "func", + "name": "SetEngine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetEngine(v billing.LineEngineType) *BillingInvoiceLineUpdateOne", + "line": 2596 + }, + { + "kind": "func", + "name": "SetNillableEngine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableEngine(v *billing.LineEngineType) *BillingInvoiceLineUpdateOne", + "line": 2602 + }, + { + "kind": "func", + "name": "SetLineIds", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetLineIds(v string) *BillingInvoiceLineUpdateOne", + "line": 2610 + }, + { + "kind": "func", + "name": "SetNillableLineIds", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableLineIds(v *string) *BillingInvoiceLineUpdateOne", + "line": 2616 + }, + { + "kind": "func", + "name": "ClearLineIds", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearLineIds() *BillingInvoiceLineUpdateOne", + "line": 2624 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingInvoiceLineUpdateOne", + "line": 2630 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearCreditsApplied() *BillingInvoiceLineUpdateOne", + "line": 2636 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetBillingInvoiceID(id string) *BillingInvoiceLineUpdateOne", + "line": 2642 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceLineUpdateOne", + "line": 2648 + }, + { + "kind": "func", + "name": "SetSplitLineGroup", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSplitLineGroup(v *BillingInvoiceSplitLineGroup) *BillingInvoiceLineUpdateOne", + "line": 2653 + }, + { + "kind": "func", + "name": "SetFlatFeeLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetFlatFeeLineID(id string) *BillingInvoiceLineUpdateOne", + "line": 2658 + }, + { + "kind": "func", + "name": "SetNillableFlatFeeLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableFlatFeeLineID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2664 + }, + { + "kind": "func", + "name": "SetFlatFeeLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetFlatFeeLine(v *BillingInvoiceFlatFeeLineConfig) *BillingInvoiceLineUpdateOne", + "line": 2672 + }, + { + "kind": "func", + "name": "SetUsageBasedLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetUsageBasedLineID(id string) *BillingInvoiceLineUpdateOne", + "line": 2677 + }, + { + "kind": "func", + "name": "SetNillableUsageBasedLineID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableUsageBasedLineID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2683 + }, + { + "kind": "func", + "name": "SetUsageBasedLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetUsageBasedLine(v *BillingInvoiceUsageBasedLineConfig) *BillingInvoiceLineUpdateOne", + "line": 2691 + }, + { + "kind": "func", + "name": "SetParentLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetParentLine(v *BillingInvoiceLine) *BillingInvoiceLineUpdateOne", + "line": 2696 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddDetailedLineIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2701 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddDetailedLines(v ...*BillingInvoiceLine) *BillingInvoiceLineUpdateOne", + "line": 2707 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2IDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddDetailedLinesV2IDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2716 + }, + { + "kind": "func", + "name": "AddDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddDetailedLinesV2(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceLineUpdateOne", + "line": 2722 + }, + { + "kind": "func", + "name": "AddLineUsageDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddLineUsageDiscountIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2731 + }, + { + "kind": "func", + "name": "AddLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddLineUsageDiscounts(v ...*BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUpdateOne", + "line": 2737 + }, + { + "kind": "func", + "name": "AddLineAmountDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddLineAmountDiscountIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2746 + }, + { + "kind": "func", + "name": "AddLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddLineAmountDiscounts(v ...*BillingInvoiceLineDiscount) *BillingInvoiceLineUpdateOne", + "line": 2752 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscription(v *Subscription) *BillingInvoiceLineUpdateOne", + "line": 2761 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionPhase(v *SubscriptionPhase) *BillingInvoiceLineUpdateOne", + "line": 2766 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetSubscriptionItem(v *SubscriptionItem) *BillingInvoiceLineUpdateOne", + "line": 2771 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetCharge(v *Charge) *BillingInvoiceLineUpdateOne", + "line": 2776 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeFlatFeeRunPaymentID(id string) *BillingInvoiceLineUpdateOne", + "line": 2781 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargeFlatFeeRunPaymentID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2787 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunPayment", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeFlatFeeRunPayment(v *ChargeFlatFeeRunPayment) *BillingInvoiceLineUpdateOne", + "line": 2795 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocationIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddChargeFlatFeeRunCreditAllocationIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2800 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdateOne) AddChargeFlatFeeRunCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *BillingInvoiceLineUpdateOne", + "line": 2806 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRunsID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeFlatFeeRunsID(id string) *BillingInvoiceLineUpdateOne", + "line": 2815 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeRunsID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargeFlatFeeRunsID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2821 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeFlatFeeRuns(v *ChargeFlatFeeRun) *BillingInvoiceLineUpdateOne", + "line": 2829 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRunID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeUsageBasedRunID(id string) *BillingInvoiceLineUpdateOne", + "line": 2834 + }, + { + "kind": "func", + "name": "SetNillableChargeUsageBasedRunID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargeUsageBasedRunID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2840 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedRun", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeUsageBasedRun(v *ChargeUsageBasedRuns) *BillingInvoiceLineUpdateOne", + "line": 2848 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeCreditPurchaseInvoicedPaymentID(id string) *BillingInvoiceLineUpdateOne", + "line": 2853 + }, + { + "kind": "func", + "name": "SetNillableChargeCreditPurchaseInvoicedPaymentID", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetNillableChargeCreditPurchaseInvoicedPaymentID(id *string) *BillingInvoiceLineUpdateOne", + "line": 2859 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseInvoicedPayment", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetChargeCreditPurchaseInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *BillingInvoiceLineUpdateOne", + "line": 2867 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SetTaxCode(v *TaxCode) *BillingInvoiceLineUpdateOne", + "line": 2872 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineUpdateOne) Mutation() *BillingInvoiceLineMutation", + "line": 2877 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearBillingInvoice() *BillingInvoiceLineUpdateOne", + "line": 2882 + }, + { + "kind": "func", + "name": "ClearSplitLineGroup", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSplitLineGroup() *BillingInvoiceLineUpdateOne", + "line": 2888 + }, + { + "kind": "func", + "name": "ClearFlatFeeLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearFlatFeeLine() *BillingInvoiceLineUpdateOne", + "line": 2894 + }, + { + "kind": "func", + "name": "ClearUsageBasedLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearUsageBasedLine() *BillingInvoiceLineUpdateOne", + "line": 2900 + }, + { + "kind": "func", + "name": "ClearParentLine", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearParentLine() *BillingInvoiceLineUpdateOne", + "line": 2906 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearDetailedLines() *BillingInvoiceLineUpdateOne", + "line": 2912 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveDetailedLineIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2918 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveDetailedLines(v ...*BillingInvoiceLine) *BillingInvoiceLineUpdateOne", + "line": 2924 + }, + { + "kind": "func", + "name": "ClearDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearDetailedLinesV2() *BillingInvoiceLineUpdateOne", + "line": 2933 + }, + { + "kind": "func", + "name": "RemoveDetailedLinesV2IDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveDetailedLinesV2IDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2939 + }, + { + "kind": "func", + "name": "RemoveDetailedLinesV2", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveDetailedLinesV2(v ...*BillingStandardInvoiceDetailedLine) *BillingInvoiceLineUpdateOne", + "line": 2945 + }, + { + "kind": "func", + "name": "ClearLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearLineUsageDiscounts() *BillingInvoiceLineUpdateOne", + "line": 2954 + }, + { + "kind": "func", + "name": "RemoveLineUsageDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveLineUsageDiscountIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2960 + }, + { + "kind": "func", + "name": "RemoveLineUsageDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveLineUsageDiscounts(v ...*BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUpdateOne", + "line": 2966 + }, + { + "kind": "func", + "name": "ClearLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearLineAmountDiscounts() *BillingInvoiceLineUpdateOne", + "line": 2975 + }, + { + "kind": "func", + "name": "RemoveLineAmountDiscountIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveLineAmountDiscountIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 2981 + }, + { + "kind": "func", + "name": "RemoveLineAmountDiscounts", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveLineAmountDiscounts(v ...*BillingInvoiceLineDiscount) *BillingInvoiceLineUpdateOne", + "line": 2987 + }, + { + "kind": "func", + "name": "ClearSubscription", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscription() *BillingInvoiceLineUpdateOne", + "line": 2996 + }, + { + "kind": "func", + "name": "ClearSubscriptionPhase", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionPhase() *BillingInvoiceLineUpdateOne", + "line": 3002 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearSubscriptionItem() *BillingInvoiceLineUpdateOne", + "line": 3008 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearCharge() *BillingInvoiceLineUpdateOne", + "line": 3014 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunPayment", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeFlatFeeRunPayment() *BillingInvoiceLineUpdateOne", + "line": 3020 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeFlatFeeRunCreditAllocations() *BillingInvoiceLineUpdateOne", + "line": 3026 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunCreditAllocationIDs", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveChargeFlatFeeRunCreditAllocationIDs(ids ...string) *BillingInvoiceLineUpdateOne", + "line": 3032 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunCreditAllocations", + "signature": "func (_u *BillingInvoiceLineUpdateOne) RemoveChargeFlatFeeRunCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *BillingInvoiceLineUpdateOne", + "line": 3038 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRuns", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeFlatFeeRuns() *BillingInvoiceLineUpdateOne", + "line": 3047 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRun", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeUsageBasedRun() *BillingInvoiceLineUpdateOne", + "line": 3053 + }, + { + "kind": "func", + "name": "ClearChargeCreditPurchaseInvoicedPayment", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearChargeCreditPurchaseInvoicedPayment() *BillingInvoiceLineUpdateOne", + "line": 3059 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ClearTaxCode() *BillingInvoiceLineUpdateOne", + "line": 3065 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineUpdateOne) Where(ps ...predicate.BillingInvoiceLine) *BillingInvoiceLineUpdateOne", + "line": 3071 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceLineUpdateOne) Select(field string, fields ...string) *BillingInvoiceLineUpdateOne", + "line": 3078 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineUpdateOne) Save(ctx context.Context) (*BillingInvoiceLine, error)", + "line": 3084 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineUpdateOne) SaveX(ctx context.Context) *BillingInvoiceLine", + "line": 3090 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineUpdateOne) Exec(ctx context.Context) error", + "line": 3099 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineUpdateOne) ExecX(ctx context.Context)", + "line": 3105 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineUpdateOne) defaults()", + "line": 3112 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineUpdateOne) check() error", + "line": 3120 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceLine, err error)", + "line": 3157 + } + ], + "line_count": 3976 + }, + "openmeter/ent/db/billinginvoicelinediscount.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDiscount", + "signature": "type BillingInvoiceLineDiscount struct", + "line": 19 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountEdges", + "signature": "type BillingInvoiceLineDiscountEdges struct", + "line": 66 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e BillingInvoiceLineDiscountEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 76 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceLineDiscount) assignValues(columns []string, values []any) error", + "line": 109 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceLineDiscount) Value(name string) (ent.Value, error)", + "line": 228 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *BillingInvoiceLineDiscount) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 233 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceLineDiscount) Update() *BillingInvoiceLineDiscountUpdateOne", + "line": 240 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceLineDiscount) Unwrap() *BillingInvoiceLineDiscount", + "line": 246 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceLineDiscount) String() string", + "line": 256 + } + ], + "line_count": 327 + }, + "openmeter/ent/db/billinginvoicelinediscount/billinginvoicelinediscount.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 81 + }, + { + "kind": "func", + "name": "ReasonValidator", + "signature": "func ReasonValidator(r billing.DiscountReasonType) error", + "line": 113 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 141 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 146 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 151 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 156 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 161 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 166 + }, + { + "kind": "func", + "name": "ByReason", + "signature": "func ByReason(opts ...sql.OrderTermOption) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 176 + }, + { + "kind": "func", + "name": "ByRoundingAmount", + "signature": "func ByRoundingAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 181 + }, + { + "kind": "func", + "name": "BySourceDiscount", + "signature": "func BySourceDiscount(opts ...sql.OrderTermOption) OrderOption", + "line": 186 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 191 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 196 + }, + { + "kind": "func", + "name": "ByPreLinePeriodQuantity", + "signature": "func ByPreLinePeriodQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 201 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 206 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 211 + } + ], + "line_count": 217 + }, + "openmeter/ent/db/billinginvoicelinediscount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceLineDiscount", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceLineDiscount", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceLineDiscount", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceLineDiscount", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceLineDiscount", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceLineDiscount", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceLineDiscount", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceLineDiscount", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceLineDiscount", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceLineDiscount", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceLineDiscount", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceLineDiscount", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 86 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingInvoiceLineDiscount", + "line": 91 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.BillingInvoiceLineDiscount", + "line": 96 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.BillingInvoiceLineDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingInvoiceLineDiscount", + "line": 106 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 111 + }, + { + "kind": "func", + "name": "RoundingAmount", + "signature": "func RoundingAmount(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 116 + }, + { + "kind": "func", + "name": "Type", + "signature": "func Type(v string) predicate.BillingInvoiceLineDiscount", + "line": 121 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 126 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantity", + "signature": "func PreLinePeriodQuantity(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 221 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 226 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 231 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 246 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 261 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 266 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 271 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineDiscount", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 311 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoiceLineDiscount", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoiceLineDiscount", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoiceLineDiscount", + "line": 326 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 331 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 336 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 341 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 346 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 351 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 356 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 361 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 366 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 371 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 376 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 381 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingInvoiceLineDiscount", + "line": 386 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingInvoiceLineDiscount", + "line": 391 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 396 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 401 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 406 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 411 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 416 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 421 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 426 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 431 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 436 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 441 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 446 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 451 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 456 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 461 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 466 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 471 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 476 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 481 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 486 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 491 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 496 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 501 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 506 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 511 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 516 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 521 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIsNil", + "signature": "func ChildUniqueReferenceIDIsNil() predicate.BillingInvoiceLineDiscount", + "line": 526 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotNil", + "signature": "func ChildUniqueReferenceIDNotNil() predicate.BillingInvoiceLineDiscount", + "line": 531 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 536 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 541 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 546 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 551 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 556 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 561 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 566 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 571 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 576 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 581 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 586 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 591 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 596 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingInvoiceLineDiscount", + "line": 601 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingInvoiceLineDiscount", + "line": 606 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 611 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 616 + }, + { + "kind": "func", + "name": "ReasonEQ", + "signature": "func ReasonEQ(v billing.DiscountReasonType) predicate.BillingInvoiceLineDiscount", + "line": 621 + }, + { + "kind": "func", + "name": "ReasonNEQ", + "signature": "func ReasonNEQ(v billing.DiscountReasonType) predicate.BillingInvoiceLineDiscount", + "line": 627 + }, + { + "kind": "func", + "name": "ReasonIn", + "signature": "func ReasonIn(vs ...billing.DiscountReasonType) predicate.BillingInvoiceLineDiscount", + "line": 633 + }, + { + "kind": "func", + "name": "ReasonNotIn", + "signature": "func ReasonNotIn(vs ...billing.DiscountReasonType) predicate.BillingInvoiceLineDiscount", + "line": 642 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 651 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 656 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 661 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 666 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 671 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 676 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 681 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 686 + }, + { + "kind": "func", + "name": "RoundingAmountEQ", + "signature": "func RoundingAmountEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 691 + }, + { + "kind": "func", + "name": "RoundingAmountNEQ", + "signature": "func RoundingAmountNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 696 + }, + { + "kind": "func", + "name": "RoundingAmountIn", + "signature": "func RoundingAmountIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 701 + }, + { + "kind": "func", + "name": "RoundingAmountNotIn", + "signature": "func RoundingAmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 706 + }, + { + "kind": "func", + "name": "RoundingAmountGT", + "signature": "func RoundingAmountGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 711 + }, + { + "kind": "func", + "name": "RoundingAmountGTE", + "signature": "func RoundingAmountGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 716 + }, + { + "kind": "func", + "name": "RoundingAmountLT", + "signature": "func RoundingAmountLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 721 + }, + { + "kind": "func", + "name": "RoundingAmountLTE", + "signature": "func RoundingAmountLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 726 + }, + { + "kind": "func", + "name": "RoundingAmountIsNil", + "signature": "func RoundingAmountIsNil() predicate.BillingInvoiceLineDiscount", + "line": 731 + }, + { + "kind": "func", + "name": "RoundingAmountNotNil", + "signature": "func RoundingAmountNotNil() predicate.BillingInvoiceLineDiscount", + "line": 736 + }, + { + "kind": "func", + "name": "SourceDiscountIsNil", + "signature": "func SourceDiscountIsNil() predicate.BillingInvoiceLineDiscount", + "line": 741 + }, + { + "kind": "func", + "name": "SourceDiscountNotNil", + "signature": "func SourceDiscountNotNil() predicate.BillingInvoiceLineDiscount", + "line": 746 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 751 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v string) predicate.BillingInvoiceLineDiscount", + "line": 756 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 761 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...string) predicate.BillingInvoiceLineDiscount", + "line": 766 + }, + { + "kind": "func", + "name": "TypeGT", + "signature": "func TypeGT(v string) predicate.BillingInvoiceLineDiscount", + "line": 771 + }, + { + "kind": "func", + "name": "TypeGTE", + "signature": "func TypeGTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 776 + }, + { + "kind": "func", + "name": "TypeLT", + "signature": "func TypeLT(v string) predicate.BillingInvoiceLineDiscount", + "line": 781 + }, + { + "kind": "func", + "name": "TypeLTE", + "signature": "func TypeLTE(v string) predicate.BillingInvoiceLineDiscount", + "line": 786 + }, + { + "kind": "func", + "name": "TypeContains", + "signature": "func TypeContains(v string) predicate.BillingInvoiceLineDiscount", + "line": 791 + }, + { + "kind": "func", + "name": "TypeHasPrefix", + "signature": "func TypeHasPrefix(v string) predicate.BillingInvoiceLineDiscount", + "line": 796 + }, + { + "kind": "func", + "name": "TypeHasSuffix", + "signature": "func TypeHasSuffix(v string) predicate.BillingInvoiceLineDiscount", + "line": 801 + }, + { + "kind": "func", + "name": "TypeIsNil", + "signature": "func TypeIsNil() predicate.BillingInvoiceLineDiscount", + "line": 806 + }, + { + "kind": "func", + "name": "TypeNotNil", + "signature": "func TypeNotNil() predicate.BillingInvoiceLineDiscount", + "line": 811 + }, + { + "kind": "func", + "name": "TypeEqualFold", + "signature": "func TypeEqualFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 816 + }, + { + "kind": "func", + "name": "TypeContainsFold", + "signature": "func TypeContainsFold(v string) predicate.BillingInvoiceLineDiscount", + "line": 821 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 826 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 831 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 836 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 841 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 846 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 851 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 856 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 861 + }, + { + "kind": "func", + "name": "QuantityIsNil", + "signature": "func QuantityIsNil() predicate.BillingInvoiceLineDiscount", + "line": 866 + }, + { + "kind": "func", + "name": "QuantityNotNil", + "signature": "func QuantityNotNil() predicate.BillingInvoiceLineDiscount", + "line": 871 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityEQ", + "signature": "func PreLinePeriodQuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 876 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNEQ", + "signature": "func PreLinePeriodQuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 881 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIn", + "signature": "func PreLinePeriodQuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 886 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotIn", + "signature": "func PreLinePeriodQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 891 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGT", + "signature": "func PreLinePeriodQuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 896 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGTE", + "signature": "func PreLinePeriodQuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 901 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLT", + "signature": "func PreLinePeriodQuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 906 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLTE", + "signature": "func PreLinePeriodQuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineDiscount", + "line": 911 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIsNil", + "signature": "func PreLinePeriodQuantityIsNil() predicate.BillingInvoiceLineDiscount", + "line": 916 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotNil", + "signature": "func PreLinePeriodQuantityNotNil() predicate.BillingInvoiceLineDiscount", + "line": 921 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.BillingInvoiceLineDiscount", + "line": 926 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLineDiscount", + "line": 937 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceLineDiscount) predicate.BillingInvoiceLineDiscount", + "line": 949 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceLineDiscount) predicate.BillingInvoiceLineDiscount", + "line": 954 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceLineDiscount) predicate.BillingInvoiceLineDiscount", + "line": 959 + } + ], + "line_count": 961 + }, + "openmeter/ent/db/billinginvoicelinediscount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountCreate", + "signature": "type BillingInvoiceLineDiscountCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNamespace(v string) *BillingInvoiceLineDiscountCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetCreatedAt(v time.Time) *BillingInvoiceLineDiscountCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceLineDiscountCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceLineDiscountCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineDiscountCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineDiscountCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetLineID(v string) *BillingInvoiceLineDiscountCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineDiscountCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetDescription(v string) *BillingInvoiceLineDiscountCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableDescription(v *string) *BillingInvoiceLineDiscountCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetType(v string) *BillingInvoiceLineDiscountCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableType(v *string) *BillingInvoiceLineDiscountCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetID(v string) *BillingInvoiceLineDiscountCreate", + "line": 200 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetNillableID(v *string) *BillingInvoiceLineDiscountCreate", + "line": 206 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetBillingInvoiceLineID(id string) *BillingInvoiceLineDiscountCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineDiscountCreate", + "line": 220 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) Mutation() *BillingInvoiceLineDiscountMutation", + "line": 225 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) Save(ctx context.Context) (*BillingInvoiceLineDiscount, error)", + "line": 230 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) SaveX(ctx context.Context) *BillingInvoiceLineDiscount", + "line": 236 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) Exec(ctx context.Context) error", + "line": 245 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) ExecX(ctx context.Context)", + "line": 251 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) defaults()", + "line": 258 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) check() error", + "line": 274 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) sqlSave(ctx context.Context) (*BillingInvoiceLineDiscount, error)", + "line": 314 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) createSpec() (*BillingInvoiceLineDiscount, *sqlgraph.CreateSpec, error)", + "line": 340 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineDiscountUpsertOne", + "line": 446 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineDiscountCreate) OnConflictColumns(columns ...string) *BillingInvoiceLineDiscountUpsertOne", + "line": 459 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateUpdatedAt() *BillingInvoiceLineDiscountUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountUpsert", + "line": 492 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateDeletedAt() *BillingInvoiceLineDiscountUpsert", + "line": 498 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearDeletedAt() *BillingInvoiceLineDiscountUpsert", + "line": 504 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountUpsert", + "line": 510 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsert", + "line": 516 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsert", + "line": 522 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetLineID(v string) *BillingInvoiceLineDiscountUpsert", + "line": 528 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateLineID() *BillingInvoiceLineDiscountUpsert", + "line": 534 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountUpsert", + "line": 540 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsert", + "line": 546 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsert", + "line": 552 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetDescription(v string) *BillingInvoiceLineDiscountUpsert", + "line": 558 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateDescription() *BillingInvoiceLineDiscountUpsert", + "line": 564 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearDescription() *BillingInvoiceLineDiscountUpsert", + "line": 570 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountUpsert", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateReason() *BillingInvoiceLineDiscountUpsert", + "line": 582 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsert", + "line": 588 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateAmount() *BillingInvoiceLineDiscountUpsert", + "line": 594 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsert", + "line": 600 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateRoundingAmount() *BillingInvoiceLineDiscountUpsert", + "line": 606 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearRoundingAmount() *BillingInvoiceLineDiscountUpsert", + "line": 612 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountUpsert", + "line": 618 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateSourceDiscount() *BillingInvoiceLineDiscountUpsert", + "line": 624 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearSourceDiscount() *BillingInvoiceLineDiscountUpsert", + "line": 630 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetType(v string) *BillingInvoiceLineDiscountUpsert", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateType() *BillingInvoiceLineDiscountUpsert", + "line": 642 + }, + { + "kind": "func", + "name": "ClearType", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearType() *BillingInvoiceLineDiscountUpsert", + "line": 648 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsert", + "line": 654 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdateQuantity() *BillingInvoiceLineDiscountUpsert", + "line": 660 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearQuantity() *BillingInvoiceLineDiscountUpsert", + "line": 666 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsert", + "line": 672 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) UpdatePreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsert", + "line": 678 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsert) ClearPreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsert", + "line": 684 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateNewValues() *BillingInvoiceLineDiscountUpsertOne", + "line": 700 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) Ignore() *BillingInvoiceLineDiscountUpsertOne", + "line": 722 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) DoNothing() *BillingInvoiceLineDiscountUpsertOne", + "line": 729 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) Update(set func(*BillingInvoiceLineDiscountUpsert)) *BillingInvoiceLineDiscountUpsertOne", + "line": 736 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountUpsertOne", + "line": 744 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateUpdatedAt() *BillingInvoiceLineDiscountUpsertOne", + "line": 751 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountUpsertOne", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateDeletedAt() *BillingInvoiceLineDiscountUpsertOne", + "line": 765 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearDeletedAt() *BillingInvoiceLineDiscountUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountUpsertOne", + "line": 779 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsertOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsertOne", + "line": 793 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetLineID(v string) *BillingInvoiceLineDiscountUpsertOne", + "line": 800 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateLineID() *BillingInvoiceLineDiscountUpsertOne", + "line": 807 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountUpsertOne", + "line": 814 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsertOne", + "line": 821 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsertOne", + "line": 828 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetDescription(v string) *BillingInvoiceLineDiscountUpsertOne", + "line": 835 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateDescription() *BillingInvoiceLineDiscountUpsertOne", + "line": 842 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearDescription() *BillingInvoiceLineDiscountUpsertOne", + "line": 849 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountUpsertOne", + "line": 856 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateReason() *BillingInvoiceLineDiscountUpsertOne", + "line": 863 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateAmount() *BillingInvoiceLineDiscountUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateRoundingAmount() *BillingInvoiceLineDiscountUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearRoundingAmount() *BillingInvoiceLineDiscountUpsertOne", + "line": 898 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountUpsertOne", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateSourceDiscount() *BillingInvoiceLineDiscountUpsertOne", + "line": 912 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearSourceDiscount() *BillingInvoiceLineDiscountUpsertOne", + "line": 919 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetType(v string) *BillingInvoiceLineDiscountUpsertOne", + "line": 926 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateType() *BillingInvoiceLineDiscountUpsertOne", + "line": 933 + }, + { + "kind": "func", + "name": "ClearType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearType() *BillingInvoiceLineDiscountUpsertOne", + "line": 940 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertOne", + "line": 947 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdateQuantity() *BillingInvoiceLineDiscountUpsertOne", + "line": 954 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearQuantity() *BillingInvoiceLineDiscountUpsertOne", + "line": 961 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertOne", + "line": 968 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) UpdatePreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsertOne", + "line": 975 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ClearPreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsertOne", + "line": 982 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) Exec(ctx context.Context) error", + "line": 989 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ExecX(ctx context.Context)", + "line": 997 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1004 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceLineDiscountUpsertOne) IDX(ctx context.Context) string", + "line": 1018 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountCreateBulk", + "signature": "type BillingInvoiceLineDiscountCreateBulk struct", + "line": 1027 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceLineDiscount, error)", + "line": 1035 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceLineDiscount", + "line": 1094 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) Exec(ctx context.Context) error", + "line": 1103 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) ExecX(ctx context.Context)", + "line": 1109 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1130 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineDiscountCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1143 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountUpsertBulk", + "signature": "type BillingInvoiceLineDiscountUpsertBulk struct", + "line": 1152 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateNewValues() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1167 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) Ignore() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) DoNothing() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) Update(set func(*BillingInvoiceLineDiscountUpsert)) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1213 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateUpdatedAt() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1220 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1227 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateDeletedAt() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1234 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearDeletedAt() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1241 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1248 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1255 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearInvoicingAppExternalID() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1262 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetLineID(v string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1269 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateLineID() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1276 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1283 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1290 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearChildUniqueReferenceID() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1297 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetDescription(v string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1304 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateDescription() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1311 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearDescription() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1318 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1325 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateReason() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1332 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1339 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateAmount() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1346 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1353 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateRoundingAmount() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1360 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearRoundingAmount() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1367 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1374 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateSourceDiscount() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1381 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearSourceDiscount() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1388 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetType(v string) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1395 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateType() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1402 + }, + { + "kind": "func", + "name": "ClearType", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearType() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1409 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1416 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdateQuantity() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1423 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearQuantity() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1430 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpsertBulk", + "line": 1437 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) UpdatePreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1444 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ClearPreLinePeriodQuantity() *BillingInvoiceLineDiscountUpsertBulk", + "line": 1451 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) Exec(ctx context.Context) error", + "line": 1458 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineDiscountUpsertBulk) ExecX(ctx context.Context)", + "line": 1474 + } + ], + "line_count": 1478 + }, + "openmeter/ent/db/billinginvoicelinediscount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountDelete", + "signature": "type BillingInvoiceLineDiscountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineDiscountDelete) Where(ps ...predicate.BillingInvoiceLineDiscount) *BillingInvoiceLineDiscountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineDiscountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineDiscountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceLineDiscountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountDeleteOne", + "signature": "type BillingInvoiceLineDiscountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineDiscountDeleteOne) Where(ps ...predicate.BillingInvoiceLineDiscount) *BillingInvoiceLineDiscountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineDiscountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineDiscountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoicelinediscount_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountQuery", + "signature": "type BillingInvoiceLineDiscountQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Where(ps ...predicate.BillingInvoiceLineDiscount) *BillingInvoiceLineDiscountQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Limit(limit int) *BillingInvoiceLineDiscountQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Offset(offset int) *BillingInvoiceLineDiscountQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Unique(unique bool) *BillingInvoiceLineDiscountQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Order(o ...billinginvoicelinediscount.OrderOption) *BillingInvoiceLineDiscountQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) First(ctx context.Context) (*BillingInvoiceLineDiscount, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) FirstX(ctx context.Context) *BillingInvoiceLineDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Only(ctx context.Context) (*BillingInvoiceLineDiscount, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) OnlyX(ctx context.Context) *BillingInvoiceLineDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) All(ctx context.Context) ([]*BillingInvoiceLineDiscount, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) AllX(ctx context.Context) []*BillingInvoiceLineDiscount", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Clone() *BillingInvoiceLineDiscountQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceLineDiscountQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) GroupBy(field string, fields ...string) *BillingInvoiceLineDiscountGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Select(fields ...string) *BillingInvoiceLineDiscountSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineDiscountSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceLineDiscount, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoiceLineDiscount, init func(*BillingInvoiceLineDiscount), assign func(*BillingInvoiceLineDiscount, *BillingInvoiceLine)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceLineDiscountQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceLineDiscountQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceLineDiscountQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountGroupBy", + "signature": "type BillingInvoiceLineDiscountGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceLineDiscountGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineDiscountGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceLineDiscountGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceLineDiscountGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceLineDiscountQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountSelect", + "signature": "type BillingInvoiceLineDiscountSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceLineDiscountSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineDiscountSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceLineDiscountSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceLineDiscountSelect) sqlScan(ctx context.Context, root *BillingInvoiceLineDiscountQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/billinginvoicelinediscount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountUpdate", + "signature": "type BillingInvoiceLineDiscountUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) Where(ps ...predicate.BillingInvoiceLineDiscount) *BillingInvoiceLineDiscountUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineDiscountUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearDeletedAt() *BillingInvoiceLineDiscountUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineDiscountUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearInvoicingAppExternalID() *BillingInvoiceLineDiscountUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetLineID(v string) *BillingInvoiceLineDiscountUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableLineID(v *string) *BillingInvoiceLineDiscountUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineDiscountUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearChildUniqueReferenceID() *BillingInvoiceLineDiscountUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetDescription(v string) *BillingInvoiceLineDiscountUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableDescription(v *string) *BillingInvoiceLineDiscountUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearDescription() *BillingInvoiceLineDiscountUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableReason(v *billing.DiscountReasonType) *BillingInvoiceLineDiscountUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearRoundingAmount() *BillingInvoiceLineDiscountUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearSourceDiscount() *BillingInvoiceLineDiscountUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetType(v string) *BillingInvoiceLineDiscountUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableType(v *string) *BillingInvoiceLineDiscountUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "ClearType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearType() *BillingInvoiceLineDiscountUpdate", + "line": 209 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 221 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearQuantity() *BillingInvoiceLineDiscountUpdate", + "line": 229 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 241 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearPreLinePeriodQuantity() *BillingInvoiceLineDiscountUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetBillingInvoiceLineID(id string) *BillingInvoiceLineDiscountUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineDiscountUpdate", + "line": 261 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) Mutation() *BillingInvoiceLineDiscountMutation", + "line": 266 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ClearBillingInvoiceLine() *BillingInvoiceLineDiscountUpdate", + "line": 271 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) Save(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) SaveX(ctx context.Context) int", + "line": 283 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) Exec(ctx context.Context) error", + "line": 292 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) ExecX(ctx context.Context)", + "line": 298 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) defaults()", + "line": 305 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) check() error", + "line": 313 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineDiscountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 330 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountUpdateOne", + "signature": "type BillingInvoiceLineDiscountUpdateOne struct", + "line": 451 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineDiscountUpdateOne", + "line": 459 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceLineDiscountUpdateOne", + "line": 465 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineDiscountUpdateOne", + "line": 471 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearDeletedAt() *BillingInvoiceLineDiscountUpdateOne", + "line": 479 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineDiscountUpdateOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearInvoicingAppExternalID() *BillingInvoiceLineDiscountUpdateOne", + "line": 499 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetLineID(v string) *BillingInvoiceLineDiscountUpdateOne", + "line": 505 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableLineID(v *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 511 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineDiscountUpdateOne", + "line": 519 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 525 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearChildUniqueReferenceID() *BillingInvoiceLineDiscountUpdateOne", + "line": 533 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetDescription(v string) *BillingInvoiceLineDiscountUpdateOne", + "line": 539 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableDescription(v *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 545 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearDescription() *BillingInvoiceLineDiscountUpdateOne", + "line": 553 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineDiscountUpdateOne", + "line": 559 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableReason(v *billing.DiscountReasonType) *BillingInvoiceLineDiscountUpdateOne", + "line": 565 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 573 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 579 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetRoundingAmount(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 587 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 593 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearRoundingAmount() *BillingInvoiceLineDiscountUpdateOne", + "line": 601 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetSourceDiscount(v *billing.DiscountReason) *BillingInvoiceLineDiscountUpdateOne", + "line": 607 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearSourceDiscount() *BillingInvoiceLineDiscountUpdateOne", + "line": 613 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetType(v string) *BillingInvoiceLineDiscountUpdateOne", + "line": 619 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableType(v *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 625 + }, + { + "kind": "func", + "name": "ClearType", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearType() *BillingInvoiceLineDiscountUpdateOne", + "line": 633 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 639 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 645 + }, + { + "kind": "func", + "name": "ClearQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearQuantity() *BillingInvoiceLineDiscountUpdateOne", + "line": 653 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 659 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 665 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearPreLinePeriodQuantity() *BillingInvoiceLineDiscountUpdateOne", + "line": 673 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetBillingInvoiceLineID(id string) *BillingInvoiceLineDiscountUpdateOne", + "line": 679 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineDiscountUpdateOne", + "line": 685 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) Mutation() *BillingInvoiceLineDiscountMutation", + "line": 690 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ClearBillingInvoiceLine() *BillingInvoiceLineDiscountUpdateOne", + "line": 695 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) Where(ps ...predicate.BillingInvoiceLineDiscount) *BillingInvoiceLineDiscountUpdateOne", + "line": 701 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) Select(field string, fields ...string) *BillingInvoiceLineDiscountUpdateOne", + "line": 708 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) Save(ctx context.Context) (*BillingInvoiceLineDiscount, error)", + "line": 714 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) SaveX(ctx context.Context) *BillingInvoiceLineDiscount", + "line": 720 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) Exec(ctx context.Context) error", + "line": 729 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) ExecX(ctx context.Context)", + "line": 735 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) defaults()", + "line": 742 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) check() error", + "line": 750 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineDiscountUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceLineDiscount, err error)", + "line": 767 + } + ], + "line_count": 905 + }, + "openmeter/ent/db/billinginvoicelineusagediscount.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscount", + "signature": "type BillingInvoiceLineUsageDiscount struct", + "line": 19 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountEdges", + "signature": "type BillingInvoiceLineUsageDiscountEdges struct", + "line": 54 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e BillingInvoiceLineUsageDiscountEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 64 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) assignValues(columns []string, values []any) error", + "line": 97 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) Value(name string) (ent.Value, error)", + "line": 195 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 200 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) Update() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 207 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) Unwrap() *BillingInvoiceLineUsageDiscount", + "line": 213 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceLineUsageDiscount) String() string", + "line": 223 + } + ], + "line_count": 279 + }, + "openmeter/ent/db/billinginvoicelineusagediscount/billinginvoicelineusagediscount.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ReasonValidator", + "signature": "func ReasonValidator(r billing.DiscountReasonType) error", + "line": 102 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByReason", + "signature": "func ByReason(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByPreLinePeriodQuantity", + "signature": "func ByPreLinePeriodQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByReasonDetails", + "signature": "func ByReasonDetails(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 185 + } + ], + "line_count": 191 + }, + "openmeter/ent/db/billinginvoicelineusagediscount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceLineUsageDiscount", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 86 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 91 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 96 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 106 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 111 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantity", + "signature": "func PreLinePeriodQuantity(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 181 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 186 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 221 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 226 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 231 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 246 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 261 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 266 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 271 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoiceLineUsageDiscount", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 311 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 316 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 321 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 326 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 331 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 336 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 341 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 346 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 351 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 356 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 361 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 366 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 371 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 376 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 381 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 386 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 391 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 396 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 401 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 406 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 411 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 416 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 421 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 426 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 431 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 436 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 441 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 446 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 451 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 456 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 461 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 466 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 471 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 476 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 481 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 486 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 491 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 496 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 501 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 506 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIsNil", + "signature": "func ChildUniqueReferenceIDIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 511 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotNil", + "signature": "func ChildUniqueReferenceIDNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 516 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 521 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 526 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 531 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 536 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 541 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingInvoiceLineUsageDiscount", + "line": 546 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 551 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 556 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 561 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 566 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 571 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 576 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 581 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 586 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 591 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 596 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingInvoiceLineUsageDiscount", + "line": 601 + }, + { + "kind": "func", + "name": "ReasonEQ", + "signature": "func ReasonEQ(v billing.DiscountReasonType) predicate.BillingInvoiceLineUsageDiscount", + "line": 606 + }, + { + "kind": "func", + "name": "ReasonNEQ", + "signature": "func ReasonNEQ(v billing.DiscountReasonType) predicate.BillingInvoiceLineUsageDiscount", + "line": 612 + }, + { + "kind": "func", + "name": "ReasonIn", + "signature": "func ReasonIn(vs ...billing.DiscountReasonType) predicate.BillingInvoiceLineUsageDiscount", + "line": 618 + }, + { + "kind": "func", + "name": "ReasonNotIn", + "signature": "func ReasonNotIn(vs ...billing.DiscountReasonType) predicate.BillingInvoiceLineUsageDiscount", + "line": 627 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 636 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 641 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 646 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 651 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 656 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 661 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 666 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 671 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityEQ", + "signature": "func PreLinePeriodQuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 676 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNEQ", + "signature": "func PreLinePeriodQuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 681 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIn", + "signature": "func PreLinePeriodQuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 686 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotIn", + "signature": "func PreLinePeriodQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 691 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGT", + "signature": "func PreLinePeriodQuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 696 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGTE", + "signature": "func PreLinePeriodQuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 701 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLT", + "signature": "func PreLinePeriodQuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 706 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLTE", + "signature": "func PreLinePeriodQuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceLineUsageDiscount", + "line": 711 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIsNil", + "signature": "func PreLinePeriodQuantityIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 716 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotNil", + "signature": "func PreLinePeriodQuantityNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 721 + }, + { + "kind": "func", + "name": "ReasonDetailsIsNil", + "signature": "func ReasonDetailsIsNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 726 + }, + { + "kind": "func", + "name": "ReasonDetailsNotNil", + "signature": "func ReasonDetailsNotNil() predicate.BillingInvoiceLineUsageDiscount", + "line": 731 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.BillingInvoiceLineUsageDiscount", + "line": 736 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoiceLineUsageDiscount", + "line": 747 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceLineUsageDiscount) predicate.BillingInvoiceLineUsageDiscount", + "line": 759 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceLineUsageDiscount) predicate.BillingInvoiceLineUsageDiscount", + "line": 764 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceLineUsageDiscount) predicate.BillingInvoiceLineUsageDiscount", + "line": 769 + } + ], + "line_count": 771 + }, + "openmeter/ent/db/billinginvoicelineusagediscount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountCreate", + "signature": "type BillingInvoiceLineUsageDiscountCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNamespace(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetCreatedAt(v time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineUsageDiscountCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineUsageDiscountCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetLineID(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineUsageDiscountCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetDescription(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableDescription(v *string) *BillingInvoiceLineUsageDiscountCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetID(v string) *BillingInvoiceLineUsageDiscountCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetNillableID(v *string) *BillingInvoiceLineUsageDiscountCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetBillingInvoiceLineID(id string) *BillingInvoiceLineUsageDiscountCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineUsageDiscountCreate", + "line": 178 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) Mutation() *BillingInvoiceLineUsageDiscountMutation", + "line": 183 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) Save(ctx context.Context) (*BillingInvoiceLineUsageDiscount, error)", + "line": 188 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) SaveX(ctx context.Context) *BillingInvoiceLineUsageDiscount", + "line": 194 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) Exec(ctx context.Context) error", + "line": 203 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) ExecX(ctx context.Context)", + "line": 209 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) defaults()", + "line": 216 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) check() error", + "line": 232 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) sqlSave(ctx context.Context) (*BillingInvoiceLineUsageDiscount, error)", + "line": 272 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) createSpec() (*BillingInvoiceLineUsageDiscount, *sqlgraph.CreateSpec, error)", + "line": 298 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 392 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreate) OnConflictColumns(columns ...string) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 405 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsert", + "line": 426 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateUpdatedAt() *BillingInvoiceLineUsageDiscountUpsert", + "line": 432 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsert", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateDeletedAt() *BillingInvoiceLineUsageDiscountUpsert", + "line": 444 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearDeletedAt() *BillingInvoiceLineUsageDiscountUpsert", + "line": 450 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountUpsert", + "line": 456 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsert", + "line": 462 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsert", + "line": 468 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetLineID(v string) *BillingInvoiceLineUsageDiscountUpsert", + "line": 474 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateLineID() *BillingInvoiceLineUsageDiscountUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsert", + "line": 492 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsert", + "line": 498 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetDescription(v string) *BillingInvoiceLineUsageDiscountUpsert", + "line": 504 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateDescription() *BillingInvoiceLineUsageDiscountUpsert", + "line": 510 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearDescription() *BillingInvoiceLineUsageDiscountUpsert", + "line": 516 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpsert", + "line": 522 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateReason() *BillingInvoiceLineUsageDiscountUpsert", + "line": 528 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsert", + "line": 534 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateQuantity() *BillingInvoiceLineUsageDiscountUpsert", + "line": 540 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsert", + "line": 546 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdatePreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsert", + "line": 552 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearPreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsert", + "line": 558 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpsert", + "line": 564 + }, + { + "kind": "func", + "name": "UpdateReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) UpdateReasonDetails() *BillingInvoiceLineUsageDiscountUpsert", + "line": 570 + }, + { + "kind": "func", + "name": "ClearReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsert) ClearReasonDetails() *BillingInvoiceLineUsageDiscountUpsert", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateNewValues() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 592 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) Ignore() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 614 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) DoNothing() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 621 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) Update(set func(*BillingInvoiceLineUsageDiscountUpsert)) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 628 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateUpdatedAt() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 643 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 650 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateDeletedAt() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 657 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearDeletedAt() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 664 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 671 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 678 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 685 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetLineID(v string) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 692 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateLineID() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 699 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 706 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 713 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 720 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetDescription(v string) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 727 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateDescription() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 734 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearDescription() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 741 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 748 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateReason() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 755 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 762 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateQuantity() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 769 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 776 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdatePreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 783 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearPreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 790 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 797 + }, + { + "kind": "func", + "name": "UpdateReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) UpdateReasonDetails() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 804 + }, + { + "kind": "func", + "name": "ClearReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ClearReasonDetails() *BillingInvoiceLineUsageDiscountUpsertOne", + "line": 811 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) Exec(ctx context.Context) error", + "line": 818 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ExecX(ctx context.Context)", + "line": 826 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 833 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertOne) IDX(ctx context.Context) string", + "line": 847 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountCreateBulk", + "signature": "type BillingInvoiceLineUsageDiscountCreateBulk struct", + "line": 856 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceLineUsageDiscount, error)", + "line": 864 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceLineUsageDiscount", + "line": 923 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) Exec(ctx context.Context) error", + "line": 932 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) ExecX(ctx context.Context)", + "line": 938 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 959 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceLineUsageDiscountCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 972 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountUpsertBulk", + "signature": "type BillingInvoiceLineUsageDiscountUpsertBulk struct", + "line": 981 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateNewValues() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 996 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) Ignore() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1020 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) DoNothing() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1027 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) Update(set func(*BillingInvoiceLineUsageDiscountUpsert)) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1034 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1042 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateUpdatedAt() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1049 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1056 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateDeletedAt() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1063 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearDeletedAt() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1070 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1077 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1084 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1091 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetLineID(v string) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1098 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateLineID() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1105 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1112 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1119 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1126 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetDescription(v string) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1133 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateDescription() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1140 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearDescription() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1147 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1154 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateReason() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1161 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1168 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateQuantity() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1175 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1182 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdatePreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1189 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearPreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1196 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1203 + }, + { + "kind": "func", + "name": "UpdateReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) UpdateReasonDetails() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1210 + }, + { + "kind": "func", + "name": "ClearReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ClearReasonDetails() *BillingInvoiceLineUsageDiscountUpsertBulk", + "line": 1217 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) Exec(ctx context.Context) error", + "line": 1224 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpsertBulk) ExecX(ctx context.Context)", + "line": 1240 + } + ], + "line_count": 1244 + }, + "openmeter/ent/db/billinginvoicelineusagediscount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountDelete", + "signature": "type BillingInvoiceLineUsageDiscountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDelete) Where(ps ...predicate.BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUsageDiscountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountDeleteOne", + "signature": "type BillingInvoiceLineUsageDiscountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDeleteOne) Where(ps ...predicate.BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUsageDiscountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceLineUsageDiscountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoicelineusagediscount_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountQuery", + "signature": "type BillingInvoiceLineUsageDiscountQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Where(ps ...predicate.BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUsageDiscountQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Limit(limit int) *BillingInvoiceLineUsageDiscountQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Offset(offset int) *BillingInvoiceLineUsageDiscountQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Unique(unique bool) *BillingInvoiceLineUsageDiscountQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Order(o ...billinginvoicelineusagediscount.OrderOption) *BillingInvoiceLineUsageDiscountQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) First(ctx context.Context) (*BillingInvoiceLineUsageDiscount, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) FirstX(ctx context.Context) *BillingInvoiceLineUsageDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Only(ctx context.Context) (*BillingInvoiceLineUsageDiscount, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) OnlyX(ctx context.Context) *BillingInvoiceLineUsageDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) All(ctx context.Context) ([]*BillingInvoiceLineUsageDiscount, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) AllX(ctx context.Context) []*BillingInvoiceLineUsageDiscount", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Clone() *BillingInvoiceLineUsageDiscountQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceLineUsageDiscountQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) GroupBy(field string, fields ...string) *BillingInvoiceLineUsageDiscountGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Select(fields ...string) *BillingInvoiceLineUsageDiscountSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineUsageDiscountSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceLineUsageDiscount, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoiceLineUsageDiscount, init func(*BillingInvoiceLineUsageDiscount), assign func(*BillingInvoiceLineUsageDiscount, *BillingInvoiceLine)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceLineUsageDiscountQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceLineUsageDiscountQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceLineUsageDiscountQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountGroupBy", + "signature": "type BillingInvoiceLineUsageDiscountGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceLineUsageDiscountGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineUsageDiscountGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceLineUsageDiscountGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceLineUsageDiscountGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceLineUsageDiscountQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountSelect", + "signature": "type BillingInvoiceLineUsageDiscountSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceLineUsageDiscountSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceLineUsageDiscountSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceLineUsageDiscountSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceLineUsageDiscountSelect) sqlScan(ctx context.Context, root *BillingInvoiceLineUsageDiscountQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/billinginvoicelineusagediscount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountUpdate", + "signature": "type BillingInvoiceLineUsageDiscountUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) Where(ps ...predicate.BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUsageDiscountUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineUsageDiscountUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearDeletedAt() *BillingInvoiceLineUsageDiscountUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetLineID(v string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableLineID(v *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetDescription(v string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableDescription(v *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearDescription() *BillingInvoiceLineUsageDiscountUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableReason(v *billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearPreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearReasonDetails", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearReasonDetails() *BillingInvoiceLineUsageDiscountUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetBillingInvoiceLineID(id string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineUsageDiscountUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) Mutation() *BillingInvoiceLineUsageDiscountMutation", + "line": 206 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ClearBillingInvoiceLine() *BillingInvoiceLineUsageDiscountUpdate", + "line": 211 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) Save(ctx context.Context) (int, error)", + "line": 217 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) SaveX(ctx context.Context) int", + "line": 223 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) Exec(ctx context.Context) error", + "line": 232 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) ExecX(ctx context.Context)", + "line": 238 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) defaults()", + "line": 245 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) check() error", + "line": 253 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 270 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscountUpdateOne", + "signature": "type BillingInvoiceLineUsageDiscountUpdateOne struct", + "line": 373 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 381 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearDeletedAt() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetInvoicingAppExternalID(v string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 413 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearInvoicingAppExternalID() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetLineID(v string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 427 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableLineID(v *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 433 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetChildUniqueReferenceID(v string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableChildUniqueReferenceID(v *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 447 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearChildUniqueReferenceID() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetDescription(v string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableDescription(v *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 467 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearDescription() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetReason(v billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 481 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableReason(v *billing.DiscountReasonType) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 487 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 495 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 501 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 509 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 515 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearPreLinePeriodQuantity() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 523 + }, + { + "kind": "func", + "name": "SetReasonDetails", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetReasonDetails(v *billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 529 + }, + { + "kind": "func", + "name": "ClearReasonDetails", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearReasonDetails() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 535 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetBillingInvoiceLineID(id string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 541 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 547 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) Mutation() *BillingInvoiceLineUsageDiscountMutation", + "line": 552 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ClearBillingInvoiceLine() *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 557 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) Where(ps ...predicate.BillingInvoiceLineUsageDiscount) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 563 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) Select(field string, fields ...string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 570 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) Save(ctx context.Context) (*BillingInvoiceLineUsageDiscount, error)", + "line": 576 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) SaveX(ctx context.Context) *BillingInvoiceLineUsageDiscount", + "line": 582 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) Exec(ctx context.Context) error", + "line": 591 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) ExecX(ctx context.Context)", + "line": 597 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) defaults()", + "line": 604 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) check() error", + "line": 612 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceLineUsageDiscountUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceLineUsageDiscount, err error)", + "line": 629 + } + ], + "line_count": 749 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroup", + "signature": "type BillingInvoiceSplitLineGroup struct", + "line": 25 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupEdges", + "signature": "type BillingInvoiceSplitLineGroupEdges struct", + "line": 88 + }, + { + "kind": "func", + "name": "BillingInvoiceLinesOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) BillingInvoiceLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 108 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 117 + }, + { + "kind": "func", + "name": "SubscriptionPhaseOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) SubscriptionPhaseOrErr() (*SubscriptionPhase, error)", + "line": 128 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) SubscriptionItemOrErr() (*SubscriptionItem, error)", + "line": 139 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) ChargeOrErr() (*Charge, error)", + "line": 150 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e BillingInvoiceSplitLineGroupEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 161 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceSplitLineGroup) assignValues(columns []string, values []any) error", + "line": 194 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceSplitLineGroup) Value(name string) (ent.Value, error)", + "line": 369 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 374 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QuerySubscription() *SubscriptionQuery", + "line": 379 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 384 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 389 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QueryCharge() *ChargeQuery", + "line": 394 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *BillingInvoiceSplitLineGroup) QueryTaxCode() *TaxCodeQuery", + "line": 399 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceSplitLineGroup) Update() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 406 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceSplitLineGroup) Unwrap() *BillingInvoiceSplitLineGroup", + "line": 412 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceSplitLineGroup) String() string", + "line": 422 + } + ], + "line_count": 525 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 151 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 186 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 214 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 219 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 224 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 229 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 234 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 239 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 244 + }, + { + "kind": "func", + "name": "ByServicePeriodStart", + "signature": "func ByServicePeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 249 + }, + { + "kind": "func", + "name": "ByServicePeriodEnd", + "signature": "func ByServicePeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 254 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 259 + }, + { + "kind": "func", + "name": "ByRatecardDiscounts", + "signature": "func ByRatecardDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 264 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 269 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 274 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 279 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 284 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 289 + }, + { + "kind": "func", + "name": "BySubscriptionBillingPeriodFrom", + "signature": "func BySubscriptionBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 294 + }, + { + "kind": "func", + "name": "BySubscriptionBillingPeriodTo", + "signature": "func BySubscriptionBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 299 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 304 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLinesCount", + "signature": "func ByBillingInvoiceLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 309 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLines", + "signature": "func ByBillingInvoiceLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 316 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 323 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseField", + "signature": "func BySubscriptionPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 330 + }, + { + "kind": "func", + "name": "BySubscriptionItemField", + "signature": "func BySubscriptionItemField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 337 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 344 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 351 + }, + { + "kind": "func", + "name": "newBillingInvoiceLinesStep", + "signature": "func newBillingInvoiceLinesStep() *sqlgraph.Step", + "line": 356 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 363 + }, + { + "kind": "func", + "name": "newSubscriptionPhaseStep", + "signature": "func newSubscriptionPhaseStep() *sqlgraph.Step", + "line": 370 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 377 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 384 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 391 + } + ], + "line_count": 397 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceSplitLineGroup", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 86 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 91 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 96 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 101 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 107 + }, + { + "kind": "func", + "name": "ServicePeriodStart", + "signature": "func ServicePeriodStart(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 112 + }, + { + "kind": "func", + "name": "ServicePeriodEnd", + "signature": "func ServicePeriodEnd(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 117 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 122 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 127 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 132 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 137 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 142 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFrom", + "signature": "func SubscriptionBillingPeriodFrom(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 147 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodTo", + "signature": "func SubscriptionBillingPeriodTo(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 152 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 172 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 177 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 182 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 187 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 192 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 197 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 202 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 207 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 212 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 217 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 222 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 227 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 232 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 237 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 242 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 247 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 252 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 257 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 262 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 267 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 272 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 277 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 282 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 287 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 292 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 297 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 302 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 307 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 312 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 317 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 322 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 327 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 332 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 337 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 342 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 347 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 352 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 357 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 362 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 367 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 372 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 377 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 382 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 387 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 392 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 397 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 402 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 407 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 412 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 417 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 422 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 427 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 432 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 437 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 442 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 447 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 452 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 457 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 462 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 467 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 472 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 477 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 482 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 487 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 492 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 497 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 502 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 507 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 513 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 519 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 528 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 537 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 543 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 549 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 555 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 561 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 567 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 573 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 579 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.BillingInvoiceSplitLineGroup", + "line": 585 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 591 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 596 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 601 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 606 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 611 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 616 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 621 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 626 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 631 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 636 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 641 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 646 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 651 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 656 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 661 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 666 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 671 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.BillingInvoiceSplitLineGroup", + "line": 676 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.BillingInvoiceSplitLineGroup", + "line": 682 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.BillingInvoiceSplitLineGroup", + "line": 688 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.BillingInvoiceSplitLineGroup", + "line": 697 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 706 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 711 + }, + { + "kind": "func", + "name": "ServicePeriodStartEQ", + "signature": "func ServicePeriodStartEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 716 + }, + { + "kind": "func", + "name": "ServicePeriodStartNEQ", + "signature": "func ServicePeriodStartNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 721 + }, + { + "kind": "func", + "name": "ServicePeriodStartIn", + "signature": "func ServicePeriodStartIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 726 + }, + { + "kind": "func", + "name": "ServicePeriodStartNotIn", + "signature": "func ServicePeriodStartNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 731 + }, + { + "kind": "func", + "name": "ServicePeriodStartGT", + "signature": "func ServicePeriodStartGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 736 + }, + { + "kind": "func", + "name": "ServicePeriodStartGTE", + "signature": "func ServicePeriodStartGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 741 + }, + { + "kind": "func", + "name": "ServicePeriodStartLT", + "signature": "func ServicePeriodStartLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 746 + }, + { + "kind": "func", + "name": "ServicePeriodStartLTE", + "signature": "func ServicePeriodStartLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 751 + }, + { + "kind": "func", + "name": "ServicePeriodEndEQ", + "signature": "func ServicePeriodEndEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 756 + }, + { + "kind": "func", + "name": "ServicePeriodEndNEQ", + "signature": "func ServicePeriodEndNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 761 + }, + { + "kind": "func", + "name": "ServicePeriodEndIn", + "signature": "func ServicePeriodEndIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 766 + }, + { + "kind": "func", + "name": "ServicePeriodEndNotIn", + "signature": "func ServicePeriodEndNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 771 + }, + { + "kind": "func", + "name": "ServicePeriodEndGT", + "signature": "func ServicePeriodEndGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 776 + }, + { + "kind": "func", + "name": "ServicePeriodEndGTE", + "signature": "func ServicePeriodEndGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 781 + }, + { + "kind": "func", + "name": "ServicePeriodEndLT", + "signature": "func ServicePeriodEndLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 786 + }, + { + "kind": "func", + "name": "ServicePeriodEndLTE", + "signature": "func ServicePeriodEndLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 791 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 796 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 801 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 806 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 811 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 816 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 821 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 826 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 831 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 836 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 841 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 846 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 851 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 856 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 861 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 866 + }, + { + "kind": "func", + "name": "RatecardDiscountsIsNil", + "signature": "func RatecardDiscountsIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 871 + }, + { + "kind": "func", + "name": "RatecardDiscountsNotNil", + "signature": "func RatecardDiscountsNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 876 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 881 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 886 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 891 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 896 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 901 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 906 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 911 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 916 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 921 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 926 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 931 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 936 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 941 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 946 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 951 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 956 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 961 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 966 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 971 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 976 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 981 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 986 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 991 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 996 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1001 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1006 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1011 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1016 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1021 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1026 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1031 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1036 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1041 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1046 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1051 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1056 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1061 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1066 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1071 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1076 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1081 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1086 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1091 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1096 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1101 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1106 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1111 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1116 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1121 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1126 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1131 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1136 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1141 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1146 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1151 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1156 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1161 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1166 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1171 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1176 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromEQ", + "signature": "func SubscriptionBillingPeriodFromEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1181 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNEQ", + "signature": "func SubscriptionBillingPeriodFromNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1186 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromIn", + "signature": "func SubscriptionBillingPeriodFromIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1191 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNotIn", + "signature": "func SubscriptionBillingPeriodFromNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1196 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromGT", + "signature": "func SubscriptionBillingPeriodFromGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1201 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromGTE", + "signature": "func SubscriptionBillingPeriodFromGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1206 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromLT", + "signature": "func SubscriptionBillingPeriodFromLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1211 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromLTE", + "signature": "func SubscriptionBillingPeriodFromLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1216 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromIsNil", + "signature": "func SubscriptionBillingPeriodFromIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1221 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodFromNotNil", + "signature": "func SubscriptionBillingPeriodFromNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1226 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToEQ", + "signature": "func SubscriptionBillingPeriodToEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1231 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNEQ", + "signature": "func SubscriptionBillingPeriodToNEQ(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1236 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToIn", + "signature": "func SubscriptionBillingPeriodToIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1241 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNotIn", + "signature": "func SubscriptionBillingPeriodToNotIn(vs ...time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1246 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToGT", + "signature": "func SubscriptionBillingPeriodToGT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1251 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToGTE", + "signature": "func SubscriptionBillingPeriodToGTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1256 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToLT", + "signature": "func SubscriptionBillingPeriodToLT(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1261 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToLTE", + "signature": "func SubscriptionBillingPeriodToLTE(v time.Time) predicate.BillingInvoiceSplitLineGroup", + "line": 1266 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToIsNil", + "signature": "func SubscriptionBillingPeriodToIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1271 + }, + { + "kind": "func", + "name": "SubscriptionBillingPeriodToNotNil", + "signature": "func SubscriptionBillingPeriodToNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1276 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1281 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1286 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1291 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.BillingInvoiceSplitLineGroup", + "line": 1296 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1301 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1306 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1311 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1316 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1321 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1326 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1331 + }, + { + "kind": "func", + "name": "ChargeIDIsNil", + "signature": "func ChargeIDIsNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1336 + }, + { + "kind": "func", + "name": "ChargeIDNotNil", + "signature": "func ChargeIDNotNil() predicate.BillingInvoiceSplitLineGroup", + "line": 1341 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1346 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.BillingInvoiceSplitLineGroup", + "line": 1351 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLines", + "signature": "func HasBillingInvoiceLines() predicate.BillingInvoiceSplitLineGroup", + "line": 1356 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLinesWith", + "signature": "func HasBillingInvoiceLinesWith(preds ...predicate.BillingInvoiceLine) predicate.BillingInvoiceSplitLineGroup", + "line": 1367 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.BillingInvoiceSplitLineGroup", + "line": 1379 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.BillingInvoiceSplitLineGroup", + "line": 1390 + }, + { + "kind": "func", + "name": "HasSubscriptionPhase", + "signature": "func HasSubscriptionPhase() predicate.BillingInvoiceSplitLineGroup", + "line": 1402 + }, + { + "kind": "func", + "name": "HasSubscriptionPhaseWith", + "signature": "func HasSubscriptionPhaseWith(preds ...predicate.SubscriptionPhase) predicate.BillingInvoiceSplitLineGroup", + "line": 1413 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.BillingInvoiceSplitLineGroup", + "line": 1425 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.BillingInvoiceSplitLineGroup", + "line": 1436 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.BillingInvoiceSplitLineGroup", + "line": 1448 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.BillingInvoiceSplitLineGroup", + "line": 1459 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.BillingInvoiceSplitLineGroup", + "line": 1471 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.BillingInvoiceSplitLineGroup", + "line": 1482 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceSplitLineGroup) predicate.BillingInvoiceSplitLineGroup", + "line": 1494 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceSplitLineGroup) predicate.BillingInvoiceSplitLineGroup", + "line": 1499 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceSplitLineGroup) predicate.BillingInvoiceSplitLineGroup", + "line": 1504 + } + ], + "line_count": 1506 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupCreate", + "signature": "type BillingInvoiceSplitLineGroupCreate struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNamespace(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetCreatedAt(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetName(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetDescription(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableDescription(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetCurrency(v currencyx.Code) *BillingInvoiceSplitLineGroupCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableTaxCodeID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetUniqueReferenceID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetUniqueReferenceID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetNillableUniqueReferenceID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableUniqueReferenceID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetFeatureKey(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableFeatureKey(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 196 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetPrice(v *productcatalog.Price) *BillingInvoiceSplitLineGroupCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 210 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableSubscriptionID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 216 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionPhaseID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 224 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableSubscriptionPhaseID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 230 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionItemID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 238 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableSubscriptionItemID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 244 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 252 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 258 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 266 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceSplitLineGroupCreate", + "line": 272 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetChargeID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 280 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableChargeID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 286 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetID(v string) *BillingInvoiceSplitLineGroupCreate", + "line": 294 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetNillableID(v *string) *BillingInvoiceSplitLineGroupCreate", + "line": 300 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceSplitLineGroupCreate", + "line": 308 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceSplitLineGroupCreate", + "line": 314 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscription(v *Subscription) *BillingInvoiceSplitLineGroupCreate", + "line": 323 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionPhase(v *SubscriptionPhase) *BillingInvoiceSplitLineGroupCreate", + "line": 328 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetSubscriptionItem(v *SubscriptionItem) *BillingInvoiceSplitLineGroupCreate", + "line": 333 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetCharge(v *Charge) *BillingInvoiceSplitLineGroupCreate", + "line": 338 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SetTaxCode(v *TaxCode) *BillingInvoiceSplitLineGroupCreate", + "line": 343 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) Mutation() *BillingInvoiceSplitLineGroupMutation", + "line": 348 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) Save(ctx context.Context) (*BillingInvoiceSplitLineGroup, error)", + "line": 353 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) SaveX(ctx context.Context) *BillingInvoiceSplitLineGroup", + "line": 359 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) Exec(ctx context.Context) error", + "line": 368 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) ExecX(ctx context.Context)", + "line": 374 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) defaults()", + "line": 381 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) check() error", + "line": 397 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) sqlSave(ctx context.Context) (*BillingInvoiceSplitLineGroup, error)", + "line": 450 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) createSpec() (*BillingInvoiceSplitLineGroup, *sqlgraph.CreateSpec, error)", + "line": 476 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 686 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreate) OnConflictColumns(columns ...string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 699 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupUpsert", + "line": 720 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateMetadata() *BillingInvoiceSplitLineGroupUpsert", + "line": 726 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearMetadata() *BillingInvoiceSplitLineGroupUpsert", + "line": 732 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 738 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateUpdatedAt() *BillingInvoiceSplitLineGroupUpsert", + "line": 744 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateDeletedAt() *BillingInvoiceSplitLineGroupUpsert", + "line": 756 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearDeletedAt() *BillingInvoiceSplitLineGroupUpsert", + "line": 762 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetName(v string) *BillingInvoiceSplitLineGroupUpsert", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateName() *BillingInvoiceSplitLineGroupUpsert", + "line": 774 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetDescription(v string) *BillingInvoiceSplitLineGroupUpsert", + "line": 780 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateDescription() *BillingInvoiceSplitLineGroupUpsert", + "line": 786 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearDescription() *BillingInvoiceSplitLineGroupUpsert", + "line": 792 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpsert", + "line": 798 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateTaxConfig() *BillingInvoiceSplitLineGroupUpsert", + "line": 804 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearTaxConfig() *BillingInvoiceSplitLineGroupUpsert", + "line": 810 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupUpsert", + "line": 816 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateTaxCodeID() *BillingInvoiceSplitLineGroupUpsert", + "line": 822 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearTaxCodeID() *BillingInvoiceSplitLineGroupUpsert", + "line": 828 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpsert", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateTaxBehavior() *BillingInvoiceSplitLineGroupUpsert", + "line": 840 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearTaxBehavior() *BillingInvoiceSplitLineGroupUpsert", + "line": 846 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 852 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateServicePeriodStart() *BillingInvoiceSplitLineGroupUpsert", + "line": 858 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 864 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateServicePeriodEnd() *BillingInvoiceSplitLineGroupUpsert", + "line": 870 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupUpsert", + "line": 876 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsert", + "line": 882 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsert", + "line": 888 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 894 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsert", + "line": 900 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsert", + "line": 906 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupUpsert", + "line": 912 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsert", + "line": 918 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsert", + "line": 924 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) SetChargeID(v string) *BillingInvoiceSplitLineGroupUpsert", + "line": 930 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) UpdateChargeID() *BillingInvoiceSplitLineGroupUpsert", + "line": 936 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsert) ClearChargeID() *BillingInvoiceSplitLineGroupUpsert", + "line": 942 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateNewValues() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 958 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) Ignore() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1001 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) DoNothing() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1008 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) Update(set func(*BillingInvoiceSplitLineGroupUpsert)) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1015 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1023 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateMetadata() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1030 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearMetadata() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1037 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1044 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateUpdatedAt() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1051 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1058 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateDeletedAt() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1065 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearDeletedAt() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1072 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetName(v string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1079 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateName() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1086 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetDescription(v string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1093 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateDescription() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1100 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearDescription() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1107 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1114 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateTaxConfig() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1121 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearTaxConfig() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1128 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1135 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateTaxCodeID() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1142 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearTaxCodeID() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1149 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateTaxBehavior() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1163 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearTaxBehavior() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1170 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1177 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateServicePeriodStart() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1184 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1191 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateServicePeriodEnd() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1198 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1205 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1212 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1219 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1226 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1233 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1240 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1254 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1261 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) SetChargeID(v string) *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1268 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) UpdateChargeID() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1275 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ClearChargeID() *BillingInvoiceSplitLineGroupUpsertOne", + "line": 1282 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) Exec(ctx context.Context) error", + "line": 1289 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ExecX(ctx context.Context)", + "line": 1297 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1304 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertOne) IDX(ctx context.Context) string", + "line": 1318 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupCreateBulk", + "signature": "type BillingInvoiceSplitLineGroupCreateBulk struct", + "line": 1327 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceSplitLineGroup, error)", + "line": 1335 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceSplitLineGroup", + "line": 1394 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) Exec(ctx context.Context) error", + "line": 1403 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) ExecX(ctx context.Context)", + "line": 1409 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1430 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceSplitLineGroupCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1443 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupUpsertBulk", + "signature": "type BillingInvoiceSplitLineGroupUpsertBulk struct", + "line": 1452 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateNewValues() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1467 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) Ignore() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1512 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) DoNothing() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1519 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) Update(set func(*BillingInvoiceSplitLineGroupUpsert)) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1526 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1534 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateMetadata() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1541 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearMetadata() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1548 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1555 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateUpdatedAt() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1562 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1569 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateDeletedAt() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1576 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearDeletedAt() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1583 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetName(v string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1590 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateName() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1597 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetDescription(v string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1604 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateDescription() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1611 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearDescription() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1618 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1625 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateTaxConfig() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1632 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearTaxConfig() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1639 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1646 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateTaxCodeID() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1653 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearTaxCodeID() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1660 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1667 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateTaxBehavior() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1674 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearTaxBehavior() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1681 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1688 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateServicePeriodStart() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1695 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1702 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateServicePeriodEnd() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1709 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1716 + }, + { + "kind": "func", + "name": "UpdateRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1723 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearRatecardDiscounts() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1730 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1737 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1744 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1751 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1758 + }, + { + "kind": "func", + "name": "UpdateSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1765 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1772 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) SetChargeID(v string) *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1779 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) UpdateChargeID() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1786 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ClearChargeID() *BillingInvoiceSplitLineGroupUpsertBulk", + "line": 1793 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) Exec(ctx context.Context) error", + "line": 1800 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceSplitLineGroupUpsertBulk) ExecX(ctx context.Context)", + "line": 1816 + } + ], + "line_count": 1820 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupDelete", + "signature": "type BillingInvoiceSplitLineGroupDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceSplitLineGroupDelete) Where(ps ...predicate.BillingInvoiceSplitLineGroup) *BillingInvoiceSplitLineGroupDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceSplitLineGroupDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceSplitLineGroupDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceSplitLineGroupDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupDeleteOne", + "signature": "type BillingInvoiceSplitLineGroupDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceSplitLineGroupDeleteOne) Where(ps ...predicate.BillingInvoiceSplitLineGroup) *BillingInvoiceSplitLineGroupDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceSplitLineGroupDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceSplitLineGroupDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupQuery", + "signature": "type BillingInvoiceSplitLineGroupQuery struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Where(ps ...predicate.BillingInvoiceSplitLineGroup) *BillingInvoiceSplitLineGroupQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Limit(limit int) *BillingInvoiceSplitLineGroupQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Offset(offset int) *BillingInvoiceSplitLineGroupQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Unique(unique bool) *BillingInvoiceSplitLineGroupQuery", + "line": 65 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Order(o ...billinginvoicesplitlinegroup.OrderOption) *BillingInvoiceSplitLineGroupQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 77 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QuerySubscription() *SubscriptionQuery", + "line": 99 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 121 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 143 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QueryCharge() *ChargeQuery", + "line": 165 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) QueryTaxCode() *TaxCodeQuery", + "line": 187 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) First(ctx context.Context) (*BillingInvoiceSplitLineGroup, error)", + "line": 210 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) FirstX(ctx context.Context) *BillingInvoiceSplitLineGroup", + "line": 222 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) FirstIDX(ctx context.Context) string", + "line": 245 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Only(ctx context.Context) (*BillingInvoiceSplitLineGroup, error)", + "line": 256 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) OnlyX(ctx context.Context) *BillingInvoiceSplitLineGroup", + "line": 272 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 283 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) OnlyIDX(ctx context.Context) string", + "line": 300 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) All(ctx context.Context) ([]*BillingInvoiceSplitLineGroup, error)", + "line": 309 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) AllX(ctx context.Context) []*BillingInvoiceSplitLineGroup", + "line": 319 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 328 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) IDsX(ctx context.Context) []string", + "line": 340 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Count(ctx context.Context) (int, error)", + "line": 349 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) CountX(ctx context.Context) int", + "line": 358 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Exist(ctx context.Context) (bool, error)", + "line": 367 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) ExistX(ctx context.Context) bool", + "line": 380 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Clone() *BillingInvoiceSplitLineGroupQuery", + "line": 390 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithBillingInvoiceLines(opts ...func(*BillingInvoiceLineQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 425 + }, + { + "kind": "func", + "name": "WithSubscriptionPhase", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithSubscriptionPhase(opts ...func(*SubscriptionPhaseQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 436 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 447 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithCharge(opts ...func(*ChargeQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 458 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *BillingInvoiceSplitLineGroupQuery", + "line": 469 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) GroupBy(field string, fields ...string) *BillingInvoiceSplitLineGroupGroupBy", + "line": 492 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Select(fields ...string) *BillingInvoiceSplitLineGroupSelect", + "line": 513 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceSplitLineGroupSelect", + "line": 522 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) prepareQuery(ctx context.Context) error", + "line": 526 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceSplitLineGroup, error)", + "line": 552 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLines", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadBillingInvoiceLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *BillingInvoiceLine)) error", + "line": 628 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *Subscription)) error", + "line": 662 + }, + { + "kind": "func", + "name": "loadSubscriptionPhase", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadSubscriptionPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *SubscriptionPhase)) error", + "line": 694 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *SubscriptionItem)) error", + "line": 726 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *Charge)) error", + "line": 758 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*BillingInvoiceSplitLineGroup, init func(*BillingInvoiceSplitLineGroup), assign func(*BillingInvoiceSplitLineGroup, *TaxCode)) error", + "line": 790 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) sqlCount(ctx context.Context) (int, error)", + "line": 823 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) querySpec() *sqlgraph.QuerySpec", + "line": 835 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 890 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceSplitLineGroupQuery", + "line": 928 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceSplitLineGroupQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceSplitLineGroupQuery", + "line": 941 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupGroupBy", + "signature": "type BillingInvoiceSplitLineGroupGroupBy struct", + "line": 952 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceSplitLineGroupGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceSplitLineGroupGroupBy", + "line": 958 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceSplitLineGroupGroupBy) Scan(ctx context.Context, v any) error", + "line": 964 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceSplitLineGroupGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceSplitLineGroupQuery, v any) error", + "line": 972 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupSelect", + "signature": "type BillingInvoiceSplitLineGroupSelect struct", + "line": 1000 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceSplitLineGroupSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceSplitLineGroupSelect", + "line": 1006 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceSplitLineGroupSelect) Scan(ctx context.Context, v any) error", + "line": 1012 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceSplitLineGroupSelect) sqlScan(ctx context.Context, root *BillingInvoiceSplitLineGroupQuery, v any) error", + "line": 1020 + } + ], + "line_count": 1039 + }, + "openmeter/ent/db/billinginvoicesplitlinegroup_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupUpdate", + "signature": "type BillingInvoiceSplitLineGroupUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) Where(ps ...predicate.BillingInvoiceSplitLineGroup) *BillingInvoiceSplitLineGroupUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearMetadata() *BillingInvoiceSplitLineGroupUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearDeletedAt() *BillingInvoiceSplitLineGroupUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetName(v string) *BillingInvoiceSplitLineGroupUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableName(v *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetDescription(v string) *BillingInvoiceSplitLineGroupUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableDescription(v *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearDescription() *BillingInvoiceSplitLineGroupUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearTaxConfig() *BillingInvoiceSplitLineGroupUpdate", + "line": 123 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableTaxCodeID(v *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearTaxCodeID() *BillingInvoiceSplitLineGroupUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearTaxBehavior() *BillingInvoiceSplitLineGroupUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableServicePeriodStart(v *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableServicePeriodEnd(v *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearRatecardDiscounts() *BillingInvoiceSplitLineGroupUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 209 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpdate", + "line": 223 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 229 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpdate", + "line": 243 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetChargeID(v string) *BillingInvoiceSplitLineGroupUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetNillableChargeID(v *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearChargeID() *BillingInvoiceSplitLineGroupUpdate", + "line": 263 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceSplitLineGroupUpdate", + "line": 269 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceSplitLineGroupUpdate", + "line": 275 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetCharge(v *Charge) *BillingInvoiceSplitLineGroupUpdate", + "line": 284 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SetTaxCode(v *TaxCode) *BillingInvoiceSplitLineGroupUpdate", + "line": 289 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) Mutation() *BillingInvoiceSplitLineGroupMutation", + "line": 294 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearBillingInvoiceLines() *BillingInvoiceSplitLineGroupUpdate", + "line": 299 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) RemoveBillingInvoiceLineIDs(ids ...string) *BillingInvoiceSplitLineGroupUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceSplitLineGroupUpdate", + "line": 311 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearCharge() *BillingInvoiceSplitLineGroupUpdate", + "line": 320 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ClearTaxCode() *BillingInvoiceSplitLineGroupUpdate", + "line": 326 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) Save(ctx context.Context) (int, error)", + "line": 332 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) SaveX(ctx context.Context) int", + "line": 338 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) Exec(ctx context.Context) error", + "line": 347 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) ExecX(ctx context.Context)", + "line": 353 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) defaults()", + "line": 360 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) check() error", + "line": 368 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 382 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroupUpdateOne", + "signature": "type BillingInvoiceSplitLineGroupUpdateOne struct", + "line": 580 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetMetadata(v map[string]string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 588 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearMetadata() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 594 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 600 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 606 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 612 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearDeletedAt() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 620 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetName(v string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 626 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableName(v *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 632 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetDescription(v string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 640 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableDescription(v *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 646 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearDescription() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 654 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetTaxConfig(v productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 660 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 666 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearTaxConfig() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 674 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetTaxCodeID(v string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 680 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableTaxCodeID(v *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 686 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearTaxCodeID() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 694 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 700 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 706 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearTaxBehavior() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 714 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetServicePeriodStart(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 720 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableServicePeriodStart(v *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 726 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetServicePeriodEnd(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 734 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableServicePeriodEnd(v *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 740 + }, + { + "kind": "func", + "name": "SetRatecardDiscounts", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetRatecardDiscounts(v *billing.Discounts) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 748 + }, + { + "kind": "func", + "name": "ClearRatecardDiscounts", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearRatecardDiscounts() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 754 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetSubscriptionBillingPeriodFrom(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 760 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableSubscriptionBillingPeriodFrom(v *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 766 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodFrom", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearSubscriptionBillingPeriodFrom() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 774 + }, + { + "kind": "func", + "name": "SetSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetSubscriptionBillingPeriodTo(v time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 780 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableSubscriptionBillingPeriodTo(v *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearSubscriptionBillingPeriodTo", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearSubscriptionBillingPeriodTo() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 794 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetChargeID(v string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 800 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetNillableChargeID(v *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 806 + }, + { + "kind": "func", + "name": "ClearChargeID", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearChargeID() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 814 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) AddBillingInvoiceLineIDs(ids ...string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 820 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 826 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetCharge(v *Charge) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 835 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SetTaxCode(v *TaxCode) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 840 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) Mutation() *BillingInvoiceSplitLineGroupMutation", + "line": 845 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearBillingInvoiceLines() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 850 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) RemoveBillingInvoiceLineIDs(ids ...string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 856 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 862 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearCharge() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 871 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ClearTaxCode() *BillingInvoiceSplitLineGroupUpdateOne", + "line": 877 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) Where(ps ...predicate.BillingInvoiceSplitLineGroup) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 883 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) Select(field string, fields ...string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 890 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) Save(ctx context.Context) (*BillingInvoiceSplitLineGroup, error)", + "line": 896 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) SaveX(ctx context.Context) *BillingInvoiceSplitLineGroup", + "line": 902 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) Exec(ctx context.Context) error", + "line": 911 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) ExecX(ctx context.Context)", + "line": 917 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) defaults()", + "line": 924 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) check() error", + "line": 932 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceSplitLineGroupUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceSplitLineGroup, err error)", + "line": 946 + } + ], + "line_count": 1161 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfig", + "signature": "type BillingInvoiceUsageBasedLineConfig struct", + "line": 17 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfig) assignValues(columns []string, values []any) error", + "line": 58 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfig) Value(name string) (ent.Value, error)", + "line": 125 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfig) Update() *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 132 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfig) Unwrap() *BillingInvoiceUsageBasedLineConfig", + "line": 138 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfig) String() string", + "line": 148 + } + ], + "line_count": 185 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/billinginvoiceusagebasedlineconfig.go": { + "header": "\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 49 + }, + { + "kind": "func", + "name": "PriceTypeValidator", + "signature": "func PriceTypeValidator(pt productcatalog.PriceType) error", + "line": 70 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 83 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 88 + }, + { + "kind": "func", + "name": "ByPriceType", + "signature": "func ByPriceType(opts ...sql.OrderTermOption) OrderOption", + "line": 93 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 98 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 103 + }, + { + "kind": "func", + "name": "ByPreLinePeriodQuantity", + "signature": "func ByPreLinePeriodQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByMeteredPreLinePeriodQuantity", + "signature": "func ByMeteredPreLinePeriodQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByMeteredQuantity", + "signature": "func ByMeteredQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + } + ], + "line_count": 120 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig/where.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 13 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 18 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 23 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 28 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 33 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 38 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 43 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 48 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 53 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 58 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 63 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 68 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 73 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantity", + "signature": "func PreLinePeriodQuantity(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 78 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantity", + "signature": "func MeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 83 + }, + { + "kind": "func", + "name": "MeteredQuantity", + "signature": "func MeteredQuantity(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 88 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 93 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 98 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 103 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 108 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 113 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 118 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 123 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 128 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 133 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 138 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 143 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 148 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 153 + }, + { + "kind": "func", + "name": "PriceTypeEQ", + "signature": "func PriceTypeEQ(v productcatalog.PriceType) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 158 + }, + { + "kind": "func", + "name": "PriceTypeNEQ", + "signature": "func PriceTypeNEQ(v productcatalog.PriceType) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 164 + }, + { + "kind": "func", + "name": "PriceTypeIn", + "signature": "func PriceTypeIn(vs ...productcatalog.PriceType) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 170 + }, + { + "kind": "func", + "name": "PriceTypeNotIn", + "signature": "func PriceTypeNotIn(vs ...productcatalog.PriceType) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 179 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 188 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 193 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 198 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 203 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 208 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 213 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 218 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 223 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 228 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 233 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 238 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 243 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 248 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 253 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 258 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityEQ", + "signature": "func PreLinePeriodQuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 263 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNEQ", + "signature": "func PreLinePeriodQuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 268 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIn", + "signature": "func PreLinePeriodQuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 273 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotIn", + "signature": "func PreLinePeriodQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 278 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGT", + "signature": "func PreLinePeriodQuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 283 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityGTE", + "signature": "func PreLinePeriodQuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 288 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLT", + "signature": "func PreLinePeriodQuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 293 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityLTE", + "signature": "func PreLinePeriodQuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 298 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityIsNil", + "signature": "func PreLinePeriodQuantityIsNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 303 + }, + { + "kind": "func", + "name": "PreLinePeriodQuantityNotNil", + "signature": "func PreLinePeriodQuantityNotNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 308 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityEQ", + "signature": "func MeteredPreLinePeriodQuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 313 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityNEQ", + "signature": "func MeteredPreLinePeriodQuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 318 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityIn", + "signature": "func MeteredPreLinePeriodQuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 323 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityNotIn", + "signature": "func MeteredPreLinePeriodQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 328 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityGT", + "signature": "func MeteredPreLinePeriodQuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 333 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityGTE", + "signature": "func MeteredPreLinePeriodQuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 338 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityLT", + "signature": "func MeteredPreLinePeriodQuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 343 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityLTE", + "signature": "func MeteredPreLinePeriodQuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 348 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityIsNil", + "signature": "func MeteredPreLinePeriodQuantityIsNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 353 + }, + { + "kind": "func", + "name": "MeteredPreLinePeriodQuantityNotNil", + "signature": "func MeteredPreLinePeriodQuantityNotNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 358 + }, + { + "kind": "func", + "name": "MeteredQuantityEQ", + "signature": "func MeteredQuantityEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 363 + }, + { + "kind": "func", + "name": "MeteredQuantityNEQ", + "signature": "func MeteredQuantityNEQ(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 368 + }, + { + "kind": "func", + "name": "MeteredQuantityIn", + "signature": "func MeteredQuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 373 + }, + { + "kind": "func", + "name": "MeteredQuantityNotIn", + "signature": "func MeteredQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 378 + }, + { + "kind": "func", + "name": "MeteredQuantityGT", + "signature": "func MeteredQuantityGT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 383 + }, + { + "kind": "func", + "name": "MeteredQuantityGTE", + "signature": "func MeteredQuantityGTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 388 + }, + { + "kind": "func", + "name": "MeteredQuantityLT", + "signature": "func MeteredQuantityLT(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 393 + }, + { + "kind": "func", + "name": "MeteredQuantityLTE", + "signature": "func MeteredQuantityLTE(v alpacadecimal.Decimal) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 398 + }, + { + "kind": "func", + "name": "MeteredQuantityIsNil", + "signature": "func MeteredQuantityIsNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 403 + }, + { + "kind": "func", + "name": "MeteredQuantityNotNil", + "signature": "func MeteredQuantityNotNil() predicate.BillingInvoiceUsageBasedLineConfig", + "line": 408 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceUsageBasedLineConfig) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 413 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceUsageBasedLineConfig) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 418 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceUsageBasedLineConfig) predicate.BillingInvoiceUsageBasedLineConfig", + "line": 423 + } + ], + "line_count": 425 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigCreate", + "signature": "type BillingInvoiceUsageBasedLineConfigCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNamespace(v string) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetFeatureKey(v string) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNillableFeatureKey(v *string) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 60 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetNillableMeteredPreLinePeriodQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNillableMeteredPreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 80 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableMeteredQuantity", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNillableMeteredQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetID(v string) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SetNillableID(v *string) *BillingInvoiceUsageBasedLineConfigCreate", + "line": 108 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) Mutation() *BillingInvoiceUsageBasedLineConfigMutation", + "line": 116 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) Save(ctx context.Context) (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 121 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) SaveX(ctx context.Context) *BillingInvoiceUsageBasedLineConfig", + "line": 127 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) Exec(ctx context.Context) error", + "line": 136 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) ExecX(ctx context.Context)", + "line": 142 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) defaults()", + "line": 149 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) check() error", + "line": 157 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) sqlSave(ctx context.Context) (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 185 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) createSpec() (*BillingInvoiceUsageBasedLineConfig, *sqlgraph.CreateSpec, error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 272 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreate) OnConflictColumns(columns ...string) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 285 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 306 + }, + { + "kind": "func", + "name": "UpdatePriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) UpdatePriceType() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 312 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 318 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) UpdatePrice() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 324 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 330 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) UpdatePreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 336 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) ClearPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 342 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 348 + }, + { + "kind": "func", + "name": "UpdateMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) UpdateMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 354 + }, + { + "kind": "func", + "name": "ClearMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) ClearMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 360 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 366 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) UpdateMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 372 + }, + { + "kind": "func", + "name": "ClearMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsert) ClearMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsert", + "line": 378 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdateNewValues() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 394 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) Ignore() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 416 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) DoNothing() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 423 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) Update(set func(*BillingInvoiceUsageBasedLineConfigUpsert)) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 430 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 438 + }, + { + "kind": "func", + "name": "UpdatePriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdatePriceType() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 445 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 452 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdatePrice() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 459 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 466 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdatePreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 473 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) ClearPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 480 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 487 + }, + { + "kind": "func", + "name": "UpdateMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdateMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 494 + }, + { + "kind": "func", + "name": "ClearMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) ClearMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 501 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 508 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) UpdateMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 515 + }, + { + "kind": "func", + "name": "ClearMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) ClearMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsertOne", + "line": 522 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) Exec(ctx context.Context) error", + "line": 529 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) ExecX(ctx context.Context)", + "line": 537 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 544 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertOne) IDX(ctx context.Context) string", + "line": 558 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigCreateBulk", + "signature": "type BillingInvoiceUsageBasedLineConfigCreateBulk struct", + "line": 567 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceUsageBasedLineConfig, error)", + "line": 575 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceUsageBasedLineConfig", + "line": 634 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) Exec(ctx context.Context) error", + "line": 643 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) ExecX(ctx context.Context)", + "line": 649 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 670 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceUsageBasedLineConfigCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 683 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigUpsertBulk", + "signature": "type BillingInvoiceUsageBasedLineConfigUpsertBulk struct", + "line": 692 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdateNewValues() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 707 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) Ignore() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 731 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) DoNothing() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 738 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) Update(set func(*BillingInvoiceUsageBasedLineConfigUpsert)) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 745 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 753 + }, + { + "kind": "func", + "name": "UpdatePriceType", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdatePriceType() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 760 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 767 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdatePrice() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 774 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 781 + }, + { + "kind": "func", + "name": "UpdatePreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdatePreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 788 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) ClearPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 795 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 802 + }, + { + "kind": "func", + "name": "UpdateMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdateMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 809 + }, + { + "kind": "func", + "name": "ClearMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) ClearMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 816 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 823 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) UpdateMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 830 + }, + { + "kind": "func", + "name": "ClearMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) ClearMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpsertBulk", + "line": 837 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) Exec(ctx context.Context) error", + "line": 844 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpsertBulk) ExecX(ctx context.Context)", + "line": 860 + } + ], + "line_count": 864 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigDelete", + "signature": "type BillingInvoiceUsageBasedLineConfigDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDelete) Where(ps ...predicate.BillingInvoiceUsageBasedLineConfig) *BillingInvoiceUsageBasedLineConfigDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigDeleteOne", + "signature": "type BillingInvoiceUsageBasedLineConfigDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDeleteOne) Where(ps ...predicate.BillingInvoiceUsageBasedLineConfig) *BillingInvoiceUsageBasedLineConfigDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceUsageBasedLineConfigDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigQuery", + "signature": "type BillingInvoiceUsageBasedLineConfigQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Where(ps ...predicate.BillingInvoiceUsageBasedLineConfig) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Limit(limit int) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Offset(offset int) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Unique(unique bool) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Order(o ...billinginvoiceusagebasedlineconfig.OrderOption) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) First(ctx context.Context) (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) FirstX(ctx context.Context) *BillingInvoiceUsageBasedLineConfig", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Only(ctx context.Context) (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) OnlyX(ctx context.Context) *BillingInvoiceUsageBasedLineConfig", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) All(ctx context.Context) ([]*BillingInvoiceUsageBasedLineConfig, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) AllX(ctx context.Context) []*BillingInvoiceUsageBasedLineConfig", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Clone() *BillingInvoiceUsageBasedLineConfigQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) GroupBy(field string, fields ...string) *BillingInvoiceUsageBasedLineConfigGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Select(fields ...string) *BillingInvoiceUsageBasedLineConfigSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceUsageBasedLineConfigSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceUsageBasedLineConfig, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceUsageBasedLineConfigQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceUsageBasedLineConfigQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigGroupBy", + "signature": "type BillingInvoiceUsageBasedLineConfigGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceUsageBasedLineConfigGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceUsageBasedLineConfigGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceUsageBasedLineConfigGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceUsageBasedLineConfigGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceUsageBasedLineConfigQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigSelect", + "signature": "type BillingInvoiceUsageBasedLineConfigSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceUsageBasedLineConfigSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceUsageBasedLineConfigSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceUsageBasedLineConfigSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceUsageBasedLineConfigSelect) sqlScan(ctx context.Context, root *BillingInvoiceUsageBasedLineConfigQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/billinginvoiceusagebasedlineconfig_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigUpdate", + "signature": "type BillingInvoiceUsageBasedLineConfigUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) Where(ps ...predicate.BillingInvoiceUsageBasedLineConfig) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetNillablePriceType", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetNillablePriceType(v *productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) ClearPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetNillableMeteredPreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "ClearMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) ClearMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "SetNillableMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SetNillableMeteredQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 99 + }, + { + "kind": "func", + "name": "ClearMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) ClearMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) Mutation() *BillingInvoiceUsageBasedLineConfigMutation", + "line": 113 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) Save(ctx context.Context) (int, error)", + "line": 118 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) SaveX(ctx context.Context) int", + "line": 123 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) Exec(ctx context.Context) error", + "line": 132 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) ExecX(ctx context.Context)", + "line": 138 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) check() error", + "line": 145 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 159 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfigUpdateOne", + "signature": "type BillingInvoiceUsageBasedLineConfigUpdateOne struct", + "line": 215 + }, + { + "kind": "func", + "name": "SetPriceType", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetPriceType(v productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 223 + }, + { + "kind": "func", + "name": "SetNillablePriceType", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetNillablePriceType(v *productcatalog.PriceType) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 229 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetPrice(v *productcatalog.Price) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 237 + }, + { + "kind": "func", + "name": "SetPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 243 + }, + { + "kind": "func", + "name": "SetNillablePreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetNillablePreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 249 + }, + { + "kind": "func", + "name": "ClearPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) ClearPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 257 + }, + { + "kind": "func", + "name": "SetMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetMeteredPreLinePeriodQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 263 + }, + { + "kind": "func", + "name": "SetNillableMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetNillableMeteredPreLinePeriodQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 269 + }, + { + "kind": "func", + "name": "ClearMeteredPreLinePeriodQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) ClearMeteredPreLinePeriodQuantity() *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 277 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetMeteredQuantity(v alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 283 + }, + { + "kind": "func", + "name": "SetNillableMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetNillableMeteredQuantity(v *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 289 + }, + { + "kind": "func", + "name": "ClearMeteredQuantity", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) ClearMeteredQuantity() *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 297 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) Mutation() *BillingInvoiceUsageBasedLineConfigMutation", + "line": 303 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) Where(ps ...predicate.BillingInvoiceUsageBasedLineConfig) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 308 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) Select(field string, fields ...string) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 315 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) Save(ctx context.Context) (*BillingInvoiceUsageBasedLineConfig, error)", + "line": 321 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) SaveX(ctx context.Context) *BillingInvoiceUsageBasedLineConfig", + "line": 326 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) Exec(ctx context.Context) error", + "line": 335 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) ExecX(ctx context.Context)", + "line": 341 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) check() error", + "line": 348 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceUsageBasedLineConfigUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceUsageBasedLineConfig, err error)", + "line": 362 + } + ], + "line_count": 435 + }, + "openmeter/ent/db/billinginvoicevalidationissue.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceValidationIssue", + "signature": "type BillingInvoiceValidationIssue struct", + "line": 18 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueEdges", + "signature": "type BillingInvoiceValidationIssueEdges struct", + "line": 51 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e BillingInvoiceValidationIssueEdges) BillingInvoiceOrErr() (*BillingInvoice, error)", + "line": 61 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceValidationIssue) assignValues(columns []string, values []any) error", + "line": 90 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceValidationIssue) Value(name string) (ent.Value, error)", + "line": 180 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *BillingInvoiceValidationIssue) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 185 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceValidationIssue) Update() *BillingInvoiceValidationIssueUpdateOne", + "line": 192 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceValidationIssue) Unwrap() *BillingInvoiceValidationIssue", + "line": 198 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceValidationIssue) String() string", + "line": 208 + } + ], + "line_count": 255 + }, + "openmeter/ent/db/billinginvoicevalidationissue/billinginvoicevalidationissue.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 71 + }, + { + "kind": "func", + "name": "SeverityValidator", + "signature": "func SeverityValidator(s billing.ValidationIssueSeverity) error", + "line": 100 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 138 + }, + { + "kind": "func", + "name": "BySeverity", + "signature": "func BySeverity(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByCode", + "signature": "func ByCode(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByMessage", + "signature": "func ByMessage(opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "ByPath", + "signature": "func ByPath(opts ...sql.OrderTermOption) OrderOption", + "line": 158 + }, + { + "kind": "func", + "name": "ByComponent", + "signature": "func ByComponent(opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "ByBillingInvoiceField", + "signature": "func ByBillingInvoiceField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 173 + } + ], + "line_count": 179 + }, + "openmeter/ent/db/billinginvoicevalidationissue/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceValidationIssue", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceValidationIssue", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceValidationIssue", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceValidationIssue", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceValidationIssue", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceValidationIssue", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceValidationIssue", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceValidationIssue", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceValidationIssue", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceValidationIssue", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceValidationIssue", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingInvoiceValidationIssue", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 85 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.BillingInvoiceValidationIssue", + "line": 90 + }, + { + "kind": "func", + "name": "Code", + "signature": "func Code(v string) predicate.BillingInvoiceValidationIssue", + "line": 95 + }, + { + "kind": "func", + "name": "Message", + "signature": "func Message(v string) predicate.BillingInvoiceValidationIssue", + "line": 100 + }, + { + "kind": "func", + "name": "Path", + "signature": "func Path(v string) predicate.BillingInvoiceValidationIssue", + "line": 105 + }, + { + "kind": "func", + "name": "Component", + "signature": "func Component(v string) predicate.BillingInvoiceValidationIssue", + "line": 110 + }, + { + "kind": "func", + "name": "DedupeHash", + "signature": "func DedupeHash(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingInvoiceValidationIssue", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingInvoiceValidationIssue", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingInvoiceValidationIssue", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingInvoiceValidationIssue", + "line": 310 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 315 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 320 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 325 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 330 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 335 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 340 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 345 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 350 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 355 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 360 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 365 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 370 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 375 + }, + { + "kind": "func", + "name": "SeverityEQ", + "signature": "func SeverityEQ(v billing.ValidationIssueSeverity) predicate.BillingInvoiceValidationIssue", + "line": 380 + }, + { + "kind": "func", + "name": "SeverityNEQ", + "signature": "func SeverityNEQ(v billing.ValidationIssueSeverity) predicate.BillingInvoiceValidationIssue", + "line": 386 + }, + { + "kind": "func", + "name": "SeverityIn", + "signature": "func SeverityIn(vs ...billing.ValidationIssueSeverity) predicate.BillingInvoiceValidationIssue", + "line": 392 + }, + { + "kind": "func", + "name": "SeverityNotIn", + "signature": "func SeverityNotIn(vs ...billing.ValidationIssueSeverity) predicate.BillingInvoiceValidationIssue", + "line": 401 + }, + { + "kind": "func", + "name": "CodeEQ", + "signature": "func CodeEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 410 + }, + { + "kind": "func", + "name": "CodeNEQ", + "signature": "func CodeNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 415 + }, + { + "kind": "func", + "name": "CodeIn", + "signature": "func CodeIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 420 + }, + { + "kind": "func", + "name": "CodeNotIn", + "signature": "func CodeNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 425 + }, + { + "kind": "func", + "name": "CodeGT", + "signature": "func CodeGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 430 + }, + { + "kind": "func", + "name": "CodeGTE", + "signature": "func CodeGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 435 + }, + { + "kind": "func", + "name": "CodeLT", + "signature": "func CodeLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 440 + }, + { + "kind": "func", + "name": "CodeLTE", + "signature": "func CodeLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 445 + }, + { + "kind": "func", + "name": "CodeContains", + "signature": "func CodeContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 450 + }, + { + "kind": "func", + "name": "CodeHasPrefix", + "signature": "func CodeHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 455 + }, + { + "kind": "func", + "name": "CodeHasSuffix", + "signature": "func CodeHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 460 + }, + { + "kind": "func", + "name": "CodeIsNil", + "signature": "func CodeIsNil() predicate.BillingInvoiceValidationIssue", + "line": 465 + }, + { + "kind": "func", + "name": "CodeNotNil", + "signature": "func CodeNotNil() predicate.BillingInvoiceValidationIssue", + "line": 470 + }, + { + "kind": "func", + "name": "CodeEqualFold", + "signature": "func CodeEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 475 + }, + { + "kind": "func", + "name": "CodeContainsFold", + "signature": "func CodeContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 480 + }, + { + "kind": "func", + "name": "MessageEQ", + "signature": "func MessageEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 485 + }, + { + "kind": "func", + "name": "MessageNEQ", + "signature": "func MessageNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 490 + }, + { + "kind": "func", + "name": "MessageIn", + "signature": "func MessageIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 495 + }, + { + "kind": "func", + "name": "MessageNotIn", + "signature": "func MessageNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 500 + }, + { + "kind": "func", + "name": "MessageGT", + "signature": "func MessageGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 505 + }, + { + "kind": "func", + "name": "MessageGTE", + "signature": "func MessageGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 510 + }, + { + "kind": "func", + "name": "MessageLT", + "signature": "func MessageLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 515 + }, + { + "kind": "func", + "name": "MessageLTE", + "signature": "func MessageLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 520 + }, + { + "kind": "func", + "name": "MessageContains", + "signature": "func MessageContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 525 + }, + { + "kind": "func", + "name": "MessageHasPrefix", + "signature": "func MessageHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 530 + }, + { + "kind": "func", + "name": "MessageHasSuffix", + "signature": "func MessageHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 535 + }, + { + "kind": "func", + "name": "MessageEqualFold", + "signature": "func MessageEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 540 + }, + { + "kind": "func", + "name": "MessageContainsFold", + "signature": "func MessageContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 545 + }, + { + "kind": "func", + "name": "PathEQ", + "signature": "func PathEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 550 + }, + { + "kind": "func", + "name": "PathNEQ", + "signature": "func PathNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 555 + }, + { + "kind": "func", + "name": "PathIn", + "signature": "func PathIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 560 + }, + { + "kind": "func", + "name": "PathNotIn", + "signature": "func PathNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 565 + }, + { + "kind": "func", + "name": "PathGT", + "signature": "func PathGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 570 + }, + { + "kind": "func", + "name": "PathGTE", + "signature": "func PathGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 575 + }, + { + "kind": "func", + "name": "PathLT", + "signature": "func PathLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 580 + }, + { + "kind": "func", + "name": "PathLTE", + "signature": "func PathLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 585 + }, + { + "kind": "func", + "name": "PathContains", + "signature": "func PathContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 590 + }, + { + "kind": "func", + "name": "PathHasPrefix", + "signature": "func PathHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 595 + }, + { + "kind": "func", + "name": "PathHasSuffix", + "signature": "func PathHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 600 + }, + { + "kind": "func", + "name": "PathIsNil", + "signature": "func PathIsNil() predicate.BillingInvoiceValidationIssue", + "line": 605 + }, + { + "kind": "func", + "name": "PathNotNil", + "signature": "func PathNotNil() predicate.BillingInvoiceValidationIssue", + "line": 610 + }, + { + "kind": "func", + "name": "PathEqualFold", + "signature": "func PathEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 615 + }, + { + "kind": "func", + "name": "PathContainsFold", + "signature": "func PathContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 620 + }, + { + "kind": "func", + "name": "ComponentEQ", + "signature": "func ComponentEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 625 + }, + { + "kind": "func", + "name": "ComponentNEQ", + "signature": "func ComponentNEQ(v string) predicate.BillingInvoiceValidationIssue", + "line": 630 + }, + { + "kind": "func", + "name": "ComponentIn", + "signature": "func ComponentIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 635 + }, + { + "kind": "func", + "name": "ComponentNotIn", + "signature": "func ComponentNotIn(vs ...string) predicate.BillingInvoiceValidationIssue", + "line": 640 + }, + { + "kind": "func", + "name": "ComponentGT", + "signature": "func ComponentGT(v string) predicate.BillingInvoiceValidationIssue", + "line": 645 + }, + { + "kind": "func", + "name": "ComponentGTE", + "signature": "func ComponentGTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 650 + }, + { + "kind": "func", + "name": "ComponentLT", + "signature": "func ComponentLT(v string) predicate.BillingInvoiceValidationIssue", + "line": 655 + }, + { + "kind": "func", + "name": "ComponentLTE", + "signature": "func ComponentLTE(v string) predicate.BillingInvoiceValidationIssue", + "line": 660 + }, + { + "kind": "func", + "name": "ComponentContains", + "signature": "func ComponentContains(v string) predicate.BillingInvoiceValidationIssue", + "line": 665 + }, + { + "kind": "func", + "name": "ComponentHasPrefix", + "signature": "func ComponentHasPrefix(v string) predicate.BillingInvoiceValidationIssue", + "line": 670 + }, + { + "kind": "func", + "name": "ComponentHasSuffix", + "signature": "func ComponentHasSuffix(v string) predicate.BillingInvoiceValidationIssue", + "line": 675 + }, + { + "kind": "func", + "name": "ComponentEqualFold", + "signature": "func ComponentEqualFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 680 + }, + { + "kind": "func", + "name": "ComponentContainsFold", + "signature": "func ComponentContainsFold(v string) predicate.BillingInvoiceValidationIssue", + "line": 685 + }, + { + "kind": "func", + "name": "DedupeHashEQ", + "signature": "func DedupeHashEQ(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 690 + }, + { + "kind": "func", + "name": "DedupeHashNEQ", + "signature": "func DedupeHashNEQ(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 695 + }, + { + "kind": "func", + "name": "DedupeHashIn", + "signature": "func DedupeHashIn(vs ...[]byte) predicate.BillingInvoiceValidationIssue", + "line": 700 + }, + { + "kind": "func", + "name": "DedupeHashNotIn", + "signature": "func DedupeHashNotIn(vs ...[]byte) predicate.BillingInvoiceValidationIssue", + "line": 705 + }, + { + "kind": "func", + "name": "DedupeHashGT", + "signature": "func DedupeHashGT(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 710 + }, + { + "kind": "func", + "name": "DedupeHashGTE", + "signature": "func DedupeHashGTE(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 715 + }, + { + "kind": "func", + "name": "DedupeHashLT", + "signature": "func DedupeHashLT(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 720 + }, + { + "kind": "func", + "name": "DedupeHashLTE", + "signature": "func DedupeHashLTE(v []byte) predicate.BillingInvoiceValidationIssue", + "line": 725 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.BillingInvoiceValidationIssue", + "line": 730 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.BillingInvoiceValidationIssue", + "line": 741 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceValidationIssue) predicate.BillingInvoiceValidationIssue", + "line": 753 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceValidationIssue) predicate.BillingInvoiceValidationIssue", + "line": 758 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceValidationIssue) predicate.BillingInvoiceValidationIssue", + "line": 763 + } + ], + "line_count": 765 + }, + "openmeter/ent/db/billinginvoicevalidationissue_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueCreate", + "signature": "type BillingInvoiceValidationIssueCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNamespace(v string) *BillingInvoiceValidationIssueCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetCreatedAt(v time.Time) *BillingInvoiceValidationIssueCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillableCreatedAt(v *time.Time) *BillingInvoiceValidationIssueCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillableUpdatedAt(v *time.Time) *BillingInvoiceValidationIssueCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceValidationIssueCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetInvoiceID(v string) *BillingInvoiceValidationIssueCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetCode(v string) *BillingInvoiceValidationIssueCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableCode", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillableCode(v *string) *BillingInvoiceValidationIssueCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetMessage(v string) *BillingInvoiceValidationIssueCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetPath(v string) *BillingInvoiceValidationIssueCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillablePath", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillablePath(v *string) *BillingInvoiceValidationIssueCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetComponent(v string) *BillingInvoiceValidationIssueCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetID(v string) *BillingInvoiceValidationIssueCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetNillableID(v *string) *BillingInvoiceValidationIssueCreate", + "line": 141 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetBillingInvoiceID(id string) *BillingInvoiceValidationIssueCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceValidationIssueCreate", + "line": 155 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) Mutation() *BillingInvoiceValidationIssueMutation", + "line": 160 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) Save(ctx context.Context) (*BillingInvoiceValidationIssue, error)", + "line": 165 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) SaveX(ctx context.Context) *BillingInvoiceValidationIssue", + "line": 171 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) Exec(ctx context.Context) error", + "line": 180 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) ExecX(ctx context.Context)", + "line": 186 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) defaults()", + "line": 193 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) check() error", + "line": 209 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) sqlSave(ctx context.Context) (*BillingInvoiceValidationIssue, error)", + "line": 265 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) createSpec() (*BillingInvoiceValidationIssue, *sqlgraph.CreateSpec)", + "line": 288 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceValidationIssueUpsertOne", + "line": 374 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceValidationIssueCreate) OnConflictColumns(columns ...string) *BillingInvoiceValidationIssueUpsertOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueUpsert", + "line": 408 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateUpdatedAt() *BillingInvoiceValidationIssueUpsert", + "line": 414 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueUpsert", + "line": 420 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateDeletedAt() *BillingInvoiceValidationIssueUpsert", + "line": 426 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) ClearDeletedAt() *BillingInvoiceValidationIssueUpsert", + "line": 432 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetInvoiceID(v string) *BillingInvoiceValidationIssueUpsert", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateInvoiceID() *BillingInvoiceValidationIssueUpsert", + "line": 444 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpsert", + "line": 450 + }, + { + "kind": "func", + "name": "UpdateSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateSeverity() *BillingInvoiceValidationIssueUpsert", + "line": 456 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetCode(v string) *BillingInvoiceValidationIssueUpsert", + "line": 462 + }, + { + "kind": "func", + "name": "UpdateCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateCode() *BillingInvoiceValidationIssueUpsert", + "line": 468 + }, + { + "kind": "func", + "name": "ClearCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) ClearCode() *BillingInvoiceValidationIssueUpsert", + "line": 474 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetMessage(v string) *BillingInvoiceValidationIssueUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "UpdateMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateMessage() *BillingInvoiceValidationIssueUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetPath(v string) *BillingInvoiceValidationIssueUpsert", + "line": 492 + }, + { + "kind": "func", + "name": "UpdatePath", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdatePath() *BillingInvoiceValidationIssueUpsert", + "line": 498 + }, + { + "kind": "func", + "name": "ClearPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) ClearPath() *BillingInvoiceValidationIssueUpsert", + "line": 504 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetComponent(v string) *BillingInvoiceValidationIssueUpsert", + "line": 510 + }, + { + "kind": "func", + "name": "UpdateComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateComponent() *BillingInvoiceValidationIssueUpsert", + "line": 516 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueUpsert", + "line": 522 + }, + { + "kind": "func", + "name": "UpdateDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsert) UpdateDedupeHash() *BillingInvoiceValidationIssueUpsert", + "line": 528 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateNewValues() *BillingInvoiceValidationIssueUpsertOne", + "line": 544 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) Ignore() *BillingInvoiceValidationIssueUpsertOne", + "line": 566 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) DoNothing() *BillingInvoiceValidationIssueUpsertOne", + "line": 573 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) Update(set func(*BillingInvoiceValidationIssueUpsert)) *BillingInvoiceValidationIssueUpsertOne", + "line": 580 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueUpsertOne", + "line": 588 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateUpdatedAt() *BillingInvoiceValidationIssueUpsertOne", + "line": 595 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueUpsertOne", + "line": 602 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateDeletedAt() *BillingInvoiceValidationIssueUpsertOne", + "line": 609 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) ClearDeletedAt() *BillingInvoiceValidationIssueUpsertOne", + "line": 616 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetInvoiceID(v string) *BillingInvoiceValidationIssueUpsertOne", + "line": 623 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateInvoiceID() *BillingInvoiceValidationIssueUpsertOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpsertOne", + "line": 637 + }, + { + "kind": "func", + "name": "UpdateSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateSeverity() *BillingInvoiceValidationIssueUpsertOne", + "line": 644 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetCode(v string) *BillingInvoiceValidationIssueUpsertOne", + "line": 651 + }, + { + "kind": "func", + "name": "UpdateCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateCode() *BillingInvoiceValidationIssueUpsertOne", + "line": 658 + }, + { + "kind": "func", + "name": "ClearCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) ClearCode() *BillingInvoiceValidationIssueUpsertOne", + "line": 665 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetMessage(v string) *BillingInvoiceValidationIssueUpsertOne", + "line": 672 + }, + { + "kind": "func", + "name": "UpdateMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateMessage() *BillingInvoiceValidationIssueUpsertOne", + "line": 679 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetPath(v string) *BillingInvoiceValidationIssueUpsertOne", + "line": 686 + }, + { + "kind": "func", + "name": "UpdatePath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdatePath() *BillingInvoiceValidationIssueUpsertOne", + "line": 693 + }, + { + "kind": "func", + "name": "ClearPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) ClearPath() *BillingInvoiceValidationIssueUpsertOne", + "line": 700 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetComponent(v string) *BillingInvoiceValidationIssueUpsertOne", + "line": 707 + }, + { + "kind": "func", + "name": "UpdateComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateComponent() *BillingInvoiceValidationIssueUpsertOne", + "line": 714 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueUpsertOne", + "line": 721 + }, + { + "kind": "func", + "name": "UpdateDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) UpdateDedupeHash() *BillingInvoiceValidationIssueUpsertOne", + "line": 728 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) Exec(ctx context.Context) error", + "line": 735 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) ExecX(ctx context.Context)", + "line": 743 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 750 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceValidationIssueUpsertOne) IDX(ctx context.Context) string", + "line": 764 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueCreateBulk", + "signature": "type BillingInvoiceValidationIssueCreateBulk struct", + "line": 773 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceValidationIssue, error)", + "line": 781 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceValidationIssue", + "line": 837 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) Exec(ctx context.Context) error", + "line": 846 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) ExecX(ctx context.Context)", + "line": 852 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceValidationIssueUpsertBulk", + "line": 873 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceValidationIssueCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 886 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueUpsertBulk", + "signature": "type BillingInvoiceValidationIssueUpsertBulk struct", + "line": 895 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateNewValues() *BillingInvoiceValidationIssueUpsertBulk", + "line": 910 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) Ignore() *BillingInvoiceValidationIssueUpsertBulk", + "line": 934 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) DoNothing() *BillingInvoiceValidationIssueUpsertBulk", + "line": 941 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) Update(set func(*BillingInvoiceValidationIssueUpsert)) *BillingInvoiceValidationIssueUpsertBulk", + "line": 948 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueUpsertBulk", + "line": 956 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateUpdatedAt() *BillingInvoiceValidationIssueUpsertBulk", + "line": 963 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueUpsertBulk", + "line": 970 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateDeletedAt() *BillingInvoiceValidationIssueUpsertBulk", + "line": 977 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) ClearDeletedAt() *BillingInvoiceValidationIssueUpsertBulk", + "line": 984 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetInvoiceID(v string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 991 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateInvoiceID() *BillingInvoiceValidationIssueUpsertBulk", + "line": 998 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1005 + }, + { + "kind": "func", + "name": "UpdateSeverity", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateSeverity() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1012 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetCode(v string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1019 + }, + { + "kind": "func", + "name": "UpdateCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateCode() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1026 + }, + { + "kind": "func", + "name": "ClearCode", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) ClearCode() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1033 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetMessage(v string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1040 + }, + { + "kind": "func", + "name": "UpdateMessage", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateMessage() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1047 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetPath(v string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1054 + }, + { + "kind": "func", + "name": "UpdatePath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdatePath() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1061 + }, + { + "kind": "func", + "name": "ClearPath", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) ClearPath() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1068 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetComponent(v string) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1075 + }, + { + "kind": "func", + "name": "UpdateComponent", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateComponent() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1082 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueUpsertBulk", + "line": 1089 + }, + { + "kind": "func", + "name": "UpdateDedupeHash", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) UpdateDedupeHash() *BillingInvoiceValidationIssueUpsertBulk", + "line": 1096 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) Exec(ctx context.Context) error", + "line": 1103 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceValidationIssueUpsertBulk) ExecX(ctx context.Context)", + "line": 1119 + } + ], + "line_count": 1123 + }, + "openmeter/ent/db/billinginvoicevalidationissue_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueDelete", + "signature": "type BillingInvoiceValidationIssueDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceValidationIssueDelete) Where(ps ...predicate.BillingInvoiceValidationIssue) *BillingInvoiceValidationIssueDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceValidationIssueDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceValidationIssueDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceValidationIssueDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueDeleteOne", + "signature": "type BillingInvoiceValidationIssueDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceValidationIssueDeleteOne) Where(ps ...predicate.BillingInvoiceValidationIssue) *BillingInvoiceValidationIssueDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceValidationIssueDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceValidationIssueDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoicevalidationissue_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueQuery", + "signature": "type BillingInvoiceValidationIssueQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Where(ps ...predicate.BillingInvoiceValidationIssue) *BillingInvoiceValidationIssueQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Limit(limit int) *BillingInvoiceValidationIssueQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Offset(offset int) *BillingInvoiceValidationIssueQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Unique(unique bool) *BillingInvoiceValidationIssueQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Order(o ...billinginvoicevalidationissue.OrderOption) *BillingInvoiceValidationIssueQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) First(ctx context.Context) (*BillingInvoiceValidationIssue, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) FirstX(ctx context.Context) *BillingInvoiceValidationIssue", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Only(ctx context.Context) (*BillingInvoiceValidationIssue, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) OnlyX(ctx context.Context) *BillingInvoiceValidationIssue", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) All(ctx context.Context) ([]*BillingInvoiceValidationIssue, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) AllX(ctx context.Context) []*BillingInvoiceValidationIssue", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Clone() *BillingInvoiceValidationIssueQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *BillingInvoiceValidationIssueQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) GroupBy(field string, fields ...string) *BillingInvoiceValidationIssueGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Select(fields ...string) *BillingInvoiceValidationIssueSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceValidationIssueSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceValidationIssue, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*BillingInvoiceValidationIssue, init func(*BillingInvoiceValidationIssue), assign func(*BillingInvoiceValidationIssue, *BillingInvoice)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceValidationIssueQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceValidationIssueQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceValidationIssueQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueGroupBy", + "signature": "type BillingInvoiceValidationIssueGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceValidationIssueGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceValidationIssueGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceValidationIssueGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceValidationIssueGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceValidationIssueQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueSelect", + "signature": "type BillingInvoiceValidationIssueSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceValidationIssueSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceValidationIssueSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceValidationIssueSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceValidationIssueSelect) sqlScan(ctx context.Context, root *BillingInvoiceValidationIssueQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/billinginvoicevalidationissue_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueUpdate", + "signature": "type BillingInvoiceValidationIssueUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) Where(ps ...predicate.BillingInvoiceValidationIssue) *BillingInvoiceValidationIssueUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableDeletedAt(v *time.Time) *BillingInvoiceValidationIssueUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) ClearDeletedAt() *BillingInvoiceValidationIssueUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetInvoiceID(v string) *BillingInvoiceValidationIssueUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableInvoiceID(v *string) *BillingInvoiceValidationIssueUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetNillableSeverity", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableSeverity(v *billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetCode(v string) *BillingInvoiceValidationIssueUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableCode(v *string) *BillingInvoiceValidationIssueUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) ClearCode() *BillingInvoiceValidationIssueUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetMessage(v string) *BillingInvoiceValidationIssueUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableMessage", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableMessage(v *string) *BillingInvoiceValidationIssueUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetPath(v string) *BillingInvoiceValidationIssueUpdate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillablePath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillablePath(v *string) *BillingInvoiceValidationIssueUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "ClearPath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) ClearPath() *BillingInvoiceValidationIssueUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetComponent(v string) *BillingInvoiceValidationIssueUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetNillableComponent", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetNillableComponent(v *string) *BillingInvoiceValidationIssueUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetBillingInvoiceID(id string) *BillingInvoiceValidationIssueUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceValidationIssueUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) Mutation() *BillingInvoiceValidationIssueMutation", + "line": 173 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) ClearBillingInvoice() *BillingInvoiceValidationIssueUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) Save(ctx context.Context) (int, error)", + "line": 184 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) SaveX(ctx context.Context) int", + "line": 190 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) Exec(ctx context.Context) error", + "line": 199 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) ExecX(ctx context.Context)", + "line": 205 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) defaults()", + "line": 212 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) check() error", + "line": 220 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceValidationIssueUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 247 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssueUpdateOne", + "signature": "type BillingInvoiceValidationIssueUpdateOne struct", + "line": 334 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetUpdatedAt(v time.Time) *BillingInvoiceValidationIssueUpdateOne", + "line": 342 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetDeletedAt(v time.Time) *BillingInvoiceValidationIssueUpdateOne", + "line": 348 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingInvoiceValidationIssueUpdateOne", + "line": 354 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) ClearDeletedAt() *BillingInvoiceValidationIssueUpdateOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetInvoiceID(v string) *BillingInvoiceValidationIssueUpdateOne", + "line": 368 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableInvoiceID(v *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 374 + }, + { + "kind": "func", + "name": "SetSeverity", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetSeverity(v billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpdateOne", + "line": 382 + }, + { + "kind": "func", + "name": "SetNillableSeverity", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableSeverity(v *billing.ValidationIssueSeverity) *BillingInvoiceValidationIssueUpdateOne", + "line": 388 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetCode(v string) *BillingInvoiceValidationIssueUpdateOne", + "line": 396 + }, + { + "kind": "func", + "name": "SetNillableCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableCode(v *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 402 + }, + { + "kind": "func", + "name": "ClearCode", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) ClearCode() *BillingInvoiceValidationIssueUpdateOne", + "line": 410 + }, + { + "kind": "func", + "name": "SetMessage", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetMessage(v string) *BillingInvoiceValidationIssueUpdateOne", + "line": 416 + }, + { + "kind": "func", + "name": "SetNillableMessage", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableMessage(v *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 422 + }, + { + "kind": "func", + "name": "SetPath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetPath(v string) *BillingInvoiceValidationIssueUpdateOne", + "line": 430 + }, + { + "kind": "func", + "name": "SetNillablePath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillablePath(v *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 436 + }, + { + "kind": "func", + "name": "ClearPath", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) ClearPath() *BillingInvoiceValidationIssueUpdateOne", + "line": 444 + }, + { + "kind": "func", + "name": "SetComponent", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetComponent(v string) *BillingInvoiceValidationIssueUpdateOne", + "line": 450 + }, + { + "kind": "func", + "name": "SetNillableComponent", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetNillableComponent(v *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 456 + }, + { + "kind": "func", + "name": "SetDedupeHash", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetDedupeHash(v []byte) *BillingInvoiceValidationIssueUpdateOne", + "line": 464 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetBillingInvoiceID(id string) *BillingInvoiceValidationIssueUpdateOne", + "line": 470 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SetBillingInvoice(v *BillingInvoice) *BillingInvoiceValidationIssueUpdateOne", + "line": 476 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) Mutation() *BillingInvoiceValidationIssueMutation", + "line": 481 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) ClearBillingInvoice() *BillingInvoiceValidationIssueUpdateOne", + "line": 486 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) Where(ps ...predicate.BillingInvoiceValidationIssue) *BillingInvoiceValidationIssueUpdateOne", + "line": 492 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) Select(field string, fields ...string) *BillingInvoiceValidationIssueUpdateOne", + "line": 499 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) Save(ctx context.Context) (*BillingInvoiceValidationIssue, error)", + "line": 505 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) SaveX(ctx context.Context) *BillingInvoiceValidationIssue", + "line": 511 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) Exec(ctx context.Context) error", + "line": 520 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) ExecX(ctx context.Context)", + "line": 526 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) defaults()", + "line": 533 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) check() error", + "line": 541 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceValidationIssueUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceValidationIssue, err error)", + "line": 568 + } + ], + "line_count": 672 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevel", + "signature": "type BillingInvoiceWriteSchemaLevel struct", + "line": 15 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingInvoiceWriteSchemaLevel) assignValues(columns []string, values []any) error", + "line": 42 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingInvoiceWriteSchemaLevel) Value(name string) (ent.Value, error)", + "line": 69 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingInvoiceWriteSchemaLevel) Update() *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 76 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingInvoiceWriteSchemaLevel) Unwrap() *BillingInvoiceWriteSchemaLevel", + "line": 82 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingInvoiceWriteSchemaLevel) String() string", + "line": 92 + } + ], + "line_count": 103 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel/billinginvoicewriteschemalevel.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\nconst (", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 27 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 45 + }, + { + "kind": "func", + "name": "BySchemaLevel", + "signature": "func BySchemaLevel(opts ...sql.OrderTermOption) OrderOption", + "line": 50 + } + ], + "line_count": 52 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel/where.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 11 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 16 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 21 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 26 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 31 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 36 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 41 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 46 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 51 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 56 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingInvoiceWriteSchemaLevel", + "line": 61 + }, + { + "kind": "func", + "name": "SchemaLevel", + "signature": "func SchemaLevel(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 66 + }, + { + "kind": "func", + "name": "SchemaLevelEQ", + "signature": "func SchemaLevelEQ(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 71 + }, + { + "kind": "func", + "name": "SchemaLevelNEQ", + "signature": "func SchemaLevelNEQ(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 76 + }, + { + "kind": "func", + "name": "SchemaLevelIn", + "signature": "func SchemaLevelIn(vs ...int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 81 + }, + { + "kind": "func", + "name": "SchemaLevelNotIn", + "signature": "func SchemaLevelNotIn(vs ...int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 86 + }, + { + "kind": "func", + "name": "SchemaLevelGT", + "signature": "func SchemaLevelGT(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 91 + }, + { + "kind": "func", + "name": "SchemaLevelGTE", + "signature": "func SchemaLevelGTE(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 96 + }, + { + "kind": "func", + "name": "SchemaLevelLT", + "signature": "func SchemaLevelLT(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 101 + }, + { + "kind": "func", + "name": "SchemaLevelLTE", + "signature": "func SchemaLevelLTE(v int) predicate.BillingInvoiceWriteSchemaLevel", + "line": 106 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingInvoiceWriteSchemaLevel) predicate.BillingInvoiceWriteSchemaLevel", + "line": 111 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingInvoiceWriteSchemaLevel) predicate.BillingInvoiceWriteSchemaLevel", + "line": 116 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingInvoiceWriteSchemaLevel) predicate.BillingInvoiceWriteSchemaLevel", + "line": 121 + } + ], + "line_count": 123 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelCreate", + "signature": "type BillingInvoiceWriteSchemaLevelCreate struct", + "line": 18 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelCreate", + "line": 26 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) SetID(v string) *BillingInvoiceWriteSchemaLevelCreate", + "line": 32 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) Mutation() *BillingInvoiceWriteSchemaLevelMutation", + "line": 38 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) Save(ctx context.Context) (*BillingInvoiceWriteSchemaLevel, error)", + "line": 43 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) SaveX(ctx context.Context) *BillingInvoiceWriteSchemaLevel", + "line": 48 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) Exec(ctx context.Context) error", + "line": 57 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) ExecX(ctx context.Context)", + "line": 63 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) check() error", + "line": 70 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) sqlSave(ctx context.Context) (*BillingInvoiceWriteSchemaLevel, error)", + "line": 82 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) createSpec() (*BillingInvoiceWriteSchemaLevel, *sqlgraph.CreateSpec)", + "line": 105 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 138 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreate) OnConflictColumns(columns ...string) *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 151 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsert) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsert", + "line": 172 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsert) UpdateSchemaLevel() *BillingInvoiceWriteSchemaLevelUpsert", + "line": 178 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsert) AddSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsert", + "line": 184 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) UpdateNewValues() *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 200 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) Ignore() *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 216 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) DoNothing() *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 223 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) Update(set func(*BillingInvoiceWriteSchemaLevelUpsert)) *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 230 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 238 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) AddSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 245 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) UpdateSchemaLevel() *BillingInvoiceWriteSchemaLevelUpsertOne", + "line": 252 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) Exec(ctx context.Context) error", + "line": 259 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) ExecX(ctx context.Context)", + "line": 267 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 274 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertOne) IDX(ctx context.Context) string", + "line": 288 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelCreateBulk", + "signature": "type BillingInvoiceWriteSchemaLevelCreateBulk struct", + "line": 297 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) Save(ctx context.Context) ([]*BillingInvoiceWriteSchemaLevel, error)", + "line": 305 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) SaveX(ctx context.Context) []*BillingInvoiceWriteSchemaLevel", + "line": 360 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) Exec(ctx context.Context) error", + "line": 369 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) ExecX(ctx context.Context)", + "line": 375 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 396 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingInvoiceWriteSchemaLevelCreateBulk) OnConflictColumns(columns ...string) *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 409 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelUpsertBulk", + "signature": "type BillingInvoiceWriteSchemaLevelUpsertBulk struct", + "line": 418 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) UpdateNewValues() *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 433 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) Ignore() *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 451 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) DoNothing() *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 458 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) Update(set func(*BillingInvoiceWriteSchemaLevelUpsert)) *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 465 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 473 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) AddSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 480 + }, + { + "kind": "func", + "name": "UpdateSchemaLevel", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) UpdateSchemaLevel() *BillingInvoiceWriteSchemaLevelUpsertBulk", + "line": 487 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) Exec(ctx context.Context) error", + "line": 494 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingInvoiceWriteSchemaLevelUpsertBulk) ExecX(ctx context.Context)", + "line": 510 + } + ], + "line_count": 514 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelDelete", + "signature": "type BillingInvoiceWriteSchemaLevelDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDelete) Where(ps ...predicate.BillingInvoiceWriteSchemaLevel) *BillingInvoiceWriteSchemaLevelDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelDeleteOne", + "signature": "type BillingInvoiceWriteSchemaLevelDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDeleteOne) Where(ps ...predicate.BillingInvoiceWriteSchemaLevel) *BillingInvoiceWriteSchemaLevelDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingInvoiceWriteSchemaLevelDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelQuery", + "signature": "type BillingInvoiceWriteSchemaLevelQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Where(ps ...predicate.BillingInvoiceWriteSchemaLevel) *BillingInvoiceWriteSchemaLevelQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Limit(limit int) *BillingInvoiceWriteSchemaLevelQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Offset(offset int) *BillingInvoiceWriteSchemaLevelQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Unique(unique bool) *BillingInvoiceWriteSchemaLevelQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Order(o ...billinginvoicewriteschemalevel.OrderOption) *BillingInvoiceWriteSchemaLevelQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) First(ctx context.Context) (*BillingInvoiceWriteSchemaLevel, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) FirstX(ctx context.Context) *BillingInvoiceWriteSchemaLevel", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Only(ctx context.Context) (*BillingInvoiceWriteSchemaLevel, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) OnlyX(ctx context.Context) *BillingInvoiceWriteSchemaLevel", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) All(ctx context.Context) ([]*BillingInvoiceWriteSchemaLevel, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) AllX(ctx context.Context) []*BillingInvoiceWriteSchemaLevel", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Clone() *BillingInvoiceWriteSchemaLevelQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) GroupBy(field string, fields ...string) *BillingInvoiceWriteSchemaLevelGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Select(fields ...string) *BillingInvoiceWriteSchemaLevelSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) Aggregate(fns ...AggregateFunc) *BillingInvoiceWriteSchemaLevelSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingInvoiceWriteSchemaLevel, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) ForUpdate(opts ...sql.LockOption) *BillingInvoiceWriteSchemaLevelQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingInvoiceWriteSchemaLevelQuery) ForShare(opts ...sql.LockOption) *BillingInvoiceWriteSchemaLevelQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelGroupBy", + "signature": "type BillingInvoiceWriteSchemaLevelGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingInvoiceWriteSchemaLevelGroupBy) Aggregate(fns ...AggregateFunc) *BillingInvoiceWriteSchemaLevelGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingInvoiceWriteSchemaLevelGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingInvoiceWriteSchemaLevelGroupBy) sqlScan(ctx context.Context, root *BillingInvoiceWriteSchemaLevelQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelSelect", + "signature": "type BillingInvoiceWriteSchemaLevelSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingInvoiceWriteSchemaLevelSelect) Aggregate(fns ...AggregateFunc) *BillingInvoiceWriteSchemaLevelSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingInvoiceWriteSchemaLevelSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingInvoiceWriteSchemaLevelSelect) sqlScan(ctx context.Context, root *BillingInvoiceWriteSchemaLevelQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/billinginvoicewriteschemalevel_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelUpdate", + "signature": "type BillingInvoiceWriteSchemaLevelUpdate struct", + "line": 18 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) Where(ps ...predicate.BillingInvoiceWriteSchemaLevel) *BillingInvoiceWriteSchemaLevelUpdate", + "line": 25 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetNillableSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) SetNillableSchemaLevel(v *int) *BillingInvoiceWriteSchemaLevelUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) AddSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) Mutation() *BillingInvoiceWriteSchemaLevelMutation", + "line": 52 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) Save(ctx context.Context) (int, error)", + "line": 57 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) SaveX(ctx context.Context) int", + "line": 62 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) ExecX(ctx context.Context)", + "line": 77 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 83 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevelUpdateOne", + "signature": "type BillingInvoiceWriteSchemaLevelUpdateOne struct", + "line": 111 + }, + { + "kind": "func", + "name": "SetSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) SetSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 119 + }, + { + "kind": "func", + "name": "SetNillableSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) SetNillableSchemaLevel(v *int) *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 126 + }, + { + "kind": "func", + "name": "AddSchemaLevel", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) AddSchemaLevel(v int) *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 134 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) Mutation() *BillingInvoiceWriteSchemaLevelMutation", + "line": 140 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) Where(ps ...predicate.BillingInvoiceWriteSchemaLevel) *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 145 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) Select(field string, fields ...string) *BillingInvoiceWriteSchemaLevelUpdateOne", + "line": 152 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) Save(ctx context.Context) (*BillingInvoiceWriteSchemaLevel, error)", + "line": 158 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) SaveX(ctx context.Context) *BillingInvoiceWriteSchemaLevel", + "line": 163 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) Exec(ctx context.Context) error", + "line": 172 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) ExecX(ctx context.Context)", + "line": 178 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingInvoiceWriteSchemaLevelUpdateOne) sqlSave(ctx context.Context) (_node *BillingInvoiceWriteSchemaLevel, err error)", + "line": 184 + } + ], + "line_count": 229 + }, + "openmeter/ent/db/billingprofile.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfile", + "signature": "type BillingProfile struct", + "line": 20 + }, + { + "kind": "struct", + "name": "BillingProfileEdges", + "signature": "type BillingProfileEdges struct", + "line": 73 + }, + { + "kind": "func", + "name": "BillingInvoicesOrErr", + "signature": "func (e BillingProfileEdges) BillingInvoicesOrErr() ([]*BillingInvoice, error)", + "line": 93 + }, + { + "kind": "func", + "name": "BillingCustomerOverrideOrErr", + "signature": "func (e BillingProfileEdges) BillingCustomerOverrideOrErr() ([]*BillingCustomerOverride, error)", + "line": 102 + }, + { + "kind": "func", + "name": "WorkflowConfigOrErr", + "signature": "func (e BillingProfileEdges) WorkflowConfigOrErr() (*BillingWorkflowConfig, error)", + "line": 111 + }, + { + "kind": "func", + "name": "TaxAppOrErr", + "signature": "func (e BillingProfileEdges) TaxAppOrErr() (*App, error)", + "line": 122 + }, + { + "kind": "func", + "name": "InvoicingAppOrErr", + "signature": "func (e BillingProfileEdges) InvoicingAppOrErr() (*App, error)", + "line": 133 + }, + { + "kind": "func", + "name": "PaymentAppOrErr", + "signature": "func (e BillingProfileEdges) PaymentAppOrErr() (*App, error)", + "line": 144 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingProfile) assignValues(columns []string, values []any) error", + "line": 175 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingProfile) Value(name string) (ent.Value, error)", + "line": 334 + }, + { + "kind": "func", + "name": "QueryBillingInvoices", + "signature": "func (_m *BillingProfile) QueryBillingInvoices() *BillingInvoiceQuery", + "line": 339 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverride", + "signature": "func (_m *BillingProfile) QueryBillingCustomerOverride() *BillingCustomerOverrideQuery", + "line": 344 + }, + { + "kind": "func", + "name": "QueryWorkflowConfig", + "signature": "func (_m *BillingProfile) QueryWorkflowConfig() *BillingWorkflowConfigQuery", + "line": 349 + }, + { + "kind": "func", + "name": "QueryTaxApp", + "signature": "func (_m *BillingProfile) QueryTaxApp() *AppQuery", + "line": 354 + }, + { + "kind": "func", + "name": "QueryInvoicingApp", + "signature": "func (_m *BillingProfile) QueryInvoicingApp() *AppQuery", + "line": 359 + }, + { + "kind": "func", + "name": "QueryPaymentApp", + "signature": "func (_m *BillingProfile) QueryPaymentApp() *AppQuery", + "line": 364 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingProfile) Update() *BillingProfileUpdateOne", + "line": 371 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingProfile) Unwrap() *BillingProfile", + "line": 377 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingProfile) String() string", + "line": 387 + } + ], + "line_count": 478 + }, + "openmeter/ent/db/billingprofile/billingprofile.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 144 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 193 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 198 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 203 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 208 + }, + { + "kind": "func", + "name": "BySupplierAddressCountry", + "signature": "func BySupplierAddressCountry(opts ...sql.OrderTermOption) OrderOption", + "line": 213 + }, + { + "kind": "func", + "name": "BySupplierAddressPostalCode", + "signature": "func BySupplierAddressPostalCode(opts ...sql.OrderTermOption) OrderOption", + "line": 218 + }, + { + "kind": "func", + "name": "BySupplierAddressState", + "signature": "func BySupplierAddressState(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "BySupplierAddressCity", + "signature": "func BySupplierAddressCity(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "BySupplierAddressLine1", + "signature": "func BySupplierAddressLine1(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "BySupplierAddressLine2", + "signature": "func BySupplierAddressLine2(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "BySupplierAddressPhoneNumber", + "signature": "func BySupplierAddressPhoneNumber(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByTaxAppID", + "signature": "func ByTaxAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByInvoicingAppID", + "signature": "func ByInvoicingAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByPaymentAppID", + "signature": "func ByPaymentAppID(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByWorkflowConfigID", + "signature": "func ByWorkflowConfigID(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByDefault", + "signature": "func ByDefault(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "BySupplierName", + "signature": "func BySupplierName(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "BySupplierTaxCode", + "signature": "func BySupplierTaxCode(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByBillingInvoicesCount", + "signature": "func ByBillingInvoicesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByBillingInvoices", + "signature": "func ByBillingInvoices(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 290 + }, + { + "kind": "func", + "name": "ByBillingCustomerOverrideCount", + "signature": "func ByBillingCustomerOverrideCount(opts ...sql.OrderTermOption) OrderOption", + "line": 297 + }, + { + "kind": "func", + "name": "ByBillingCustomerOverride", + "signature": "func ByBillingCustomerOverride(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 304 + }, + { + "kind": "func", + "name": "ByWorkflowConfigField", + "signature": "func ByWorkflowConfigField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 311 + }, + { + "kind": "func", + "name": "ByTaxAppField", + "signature": "func ByTaxAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 318 + }, + { + "kind": "func", + "name": "ByInvoicingAppField", + "signature": "func ByInvoicingAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 325 + }, + { + "kind": "func", + "name": "ByPaymentAppField", + "signature": "func ByPaymentAppField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 332 + }, + { + "kind": "func", + "name": "newBillingInvoicesStep", + "signature": "func newBillingInvoicesStep() *sqlgraph.Step", + "line": 337 + }, + { + "kind": "func", + "name": "newBillingCustomerOverrideStep", + "signature": "func newBillingCustomerOverrideStep() *sqlgraph.Step", + "line": 344 + }, + { + "kind": "func", + "name": "newWorkflowConfigStep", + "signature": "func newWorkflowConfigStep() *sqlgraph.Step", + "line": 351 + }, + { + "kind": "func", + "name": "newTaxAppStep", + "signature": "func newTaxAppStep() *sqlgraph.Step", + "line": 358 + }, + { + "kind": "func", + "name": "newInvoicingAppStep", + "signature": "func newInvoicingAppStep() *sqlgraph.Step", + "line": 365 + }, + { + "kind": "func", + "name": "newPaymentAppStep", + "signature": "func newPaymentAppStep() *sqlgraph.Step", + "line": 372 + } + ], + "line_count": 378 + }, + "openmeter/ent/db/billingprofile/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingProfile", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingProfile", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingProfile", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingProfile", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingProfile", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingProfile", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingProfile", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingProfile", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingProfile", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingProfile", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingProfile", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingProfile", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingProfile", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingProfile", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingProfile", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.BillingProfile", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingProfile", + "line": 95 + }, + { + "kind": "func", + "name": "SupplierAddressCountry", + "signature": "func SupplierAddressCountry(v models.CountryCode) predicate.BillingProfile", + "line": 100 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCode", + "signature": "func SupplierAddressPostalCode(v string) predicate.BillingProfile", + "line": 106 + }, + { + "kind": "func", + "name": "SupplierAddressState", + "signature": "func SupplierAddressState(v string) predicate.BillingProfile", + "line": 111 + }, + { + "kind": "func", + "name": "SupplierAddressCity", + "signature": "func SupplierAddressCity(v string) predicate.BillingProfile", + "line": 116 + }, + { + "kind": "func", + "name": "SupplierAddressLine1", + "signature": "func SupplierAddressLine1(v string) predicate.BillingProfile", + "line": 121 + }, + { + "kind": "func", + "name": "SupplierAddressLine2", + "signature": "func SupplierAddressLine2(v string) predicate.BillingProfile", + "line": 126 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumber", + "signature": "func SupplierAddressPhoneNumber(v string) predicate.BillingProfile", + "line": 131 + }, + { + "kind": "func", + "name": "TaxAppID", + "signature": "func TaxAppID(v string) predicate.BillingProfile", + "line": 136 + }, + { + "kind": "func", + "name": "InvoicingAppID", + "signature": "func InvoicingAppID(v string) predicate.BillingProfile", + "line": 141 + }, + { + "kind": "func", + "name": "PaymentAppID", + "signature": "func PaymentAppID(v string) predicate.BillingProfile", + "line": 146 + }, + { + "kind": "func", + "name": "WorkflowConfigID", + "signature": "func WorkflowConfigID(v string) predicate.BillingProfile", + "line": 151 + }, + { + "kind": "func", + "name": "Default", + "signature": "func Default(v bool) predicate.BillingProfile", + "line": 156 + }, + { + "kind": "func", + "name": "SupplierName", + "signature": "func SupplierName(v string) predicate.BillingProfile", + "line": 161 + }, + { + "kind": "func", + "name": "SupplierTaxCode", + "signature": "func SupplierTaxCode(v string) predicate.BillingProfile", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingProfile", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingProfile", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingProfile", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingProfile", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingProfile", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingProfile", + "line": 196 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingProfile", + "line": 201 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingProfile", + "line": 206 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingProfile", + "line": 211 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingProfile", + "line": 216 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingProfile", + "line": 221 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingProfile", + "line": 226 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingProfile", + "line": 231 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.BillingProfile", + "line": 236 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.BillingProfile", + "line": 241 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingProfile", + "line": 246 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingProfile", + "line": 251 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingProfile", + "line": 256 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingProfile", + "line": 261 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingProfile", + "line": 266 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingProfile", + "line": 271 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingProfile", + "line": 276 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingProfile", + "line": 281 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingProfile", + "line": 286 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingProfile", + "line": 291 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingProfile", + "line": 296 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingProfile", + "line": 301 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingProfile", + "line": 306 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingProfile", + "line": 311 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingProfile", + "line": 316 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingProfile", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingProfile", + "line": 326 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingProfile", + "line": 331 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingProfile", + "line": 336 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingProfile", + "line": 341 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingProfile", + "line": 346 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingProfile", + "line": 351 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingProfile", + "line": 356 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingProfile", + "line": 361 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingProfile", + "line": 366 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingProfile", + "line": 371 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.BillingProfile", + "line": 376 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.BillingProfile", + "line": 381 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.BillingProfile", + "line": 386 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.BillingProfile", + "line": 391 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.BillingProfile", + "line": 396 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.BillingProfile", + "line": 401 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.BillingProfile", + "line": 406 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.BillingProfile", + "line": 411 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.BillingProfile", + "line": 416 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.BillingProfile", + "line": 421 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.BillingProfile", + "line": 426 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.BillingProfile", + "line": 431 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.BillingProfile", + "line": 436 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingProfile", + "line": 441 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingProfile", + "line": 446 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingProfile", + "line": 451 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingProfile", + "line": 456 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingProfile", + "line": 461 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingProfile", + "line": 466 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingProfile", + "line": 471 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingProfile", + "line": 476 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingProfile", + "line": 481 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingProfile", + "line": 486 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingProfile", + "line": 491 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingProfile", + "line": 496 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingProfile", + "line": 501 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingProfile", + "line": 506 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingProfile", + "line": 511 + }, + { + "kind": "func", + "name": "SupplierAddressCountryEQ", + "signature": "func SupplierAddressCountryEQ(v models.CountryCode) predicate.BillingProfile", + "line": 516 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNEQ", + "signature": "func SupplierAddressCountryNEQ(v models.CountryCode) predicate.BillingProfile", + "line": 522 + }, + { + "kind": "func", + "name": "SupplierAddressCountryIn", + "signature": "func SupplierAddressCountryIn(vs ...models.CountryCode) predicate.BillingProfile", + "line": 528 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNotIn", + "signature": "func SupplierAddressCountryNotIn(vs ...models.CountryCode) predicate.BillingProfile", + "line": 537 + }, + { + "kind": "func", + "name": "SupplierAddressCountryGT", + "signature": "func SupplierAddressCountryGT(v models.CountryCode) predicate.BillingProfile", + "line": 546 + }, + { + "kind": "func", + "name": "SupplierAddressCountryGTE", + "signature": "func SupplierAddressCountryGTE(v models.CountryCode) predicate.BillingProfile", + "line": 552 + }, + { + "kind": "func", + "name": "SupplierAddressCountryLT", + "signature": "func SupplierAddressCountryLT(v models.CountryCode) predicate.BillingProfile", + "line": 558 + }, + { + "kind": "func", + "name": "SupplierAddressCountryLTE", + "signature": "func SupplierAddressCountryLTE(v models.CountryCode) predicate.BillingProfile", + "line": 564 + }, + { + "kind": "func", + "name": "SupplierAddressCountryContains", + "signature": "func SupplierAddressCountryContains(v models.CountryCode) predicate.BillingProfile", + "line": 570 + }, + { + "kind": "func", + "name": "SupplierAddressCountryHasPrefix", + "signature": "func SupplierAddressCountryHasPrefix(v models.CountryCode) predicate.BillingProfile", + "line": 576 + }, + { + "kind": "func", + "name": "SupplierAddressCountryHasSuffix", + "signature": "func SupplierAddressCountryHasSuffix(v models.CountryCode) predicate.BillingProfile", + "line": 582 + }, + { + "kind": "func", + "name": "SupplierAddressCountryIsNil", + "signature": "func SupplierAddressCountryIsNil() predicate.BillingProfile", + "line": 588 + }, + { + "kind": "func", + "name": "SupplierAddressCountryNotNil", + "signature": "func SupplierAddressCountryNotNil() predicate.BillingProfile", + "line": 593 + }, + { + "kind": "func", + "name": "SupplierAddressCountryEqualFold", + "signature": "func SupplierAddressCountryEqualFold(v models.CountryCode) predicate.BillingProfile", + "line": 598 + }, + { + "kind": "func", + "name": "SupplierAddressCountryContainsFold", + "signature": "func SupplierAddressCountryContainsFold(v models.CountryCode) predicate.BillingProfile", + "line": 604 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeEQ", + "signature": "func SupplierAddressPostalCodeEQ(v string) predicate.BillingProfile", + "line": 610 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNEQ", + "signature": "func SupplierAddressPostalCodeNEQ(v string) predicate.BillingProfile", + "line": 615 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeIn", + "signature": "func SupplierAddressPostalCodeIn(vs ...string) predicate.BillingProfile", + "line": 620 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNotIn", + "signature": "func SupplierAddressPostalCodeNotIn(vs ...string) predicate.BillingProfile", + "line": 625 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeGT", + "signature": "func SupplierAddressPostalCodeGT(v string) predicate.BillingProfile", + "line": 630 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeGTE", + "signature": "func SupplierAddressPostalCodeGTE(v string) predicate.BillingProfile", + "line": 635 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeLT", + "signature": "func SupplierAddressPostalCodeLT(v string) predicate.BillingProfile", + "line": 640 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeLTE", + "signature": "func SupplierAddressPostalCodeLTE(v string) predicate.BillingProfile", + "line": 645 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeContains", + "signature": "func SupplierAddressPostalCodeContains(v string) predicate.BillingProfile", + "line": 650 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeHasPrefix", + "signature": "func SupplierAddressPostalCodeHasPrefix(v string) predicate.BillingProfile", + "line": 655 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeHasSuffix", + "signature": "func SupplierAddressPostalCodeHasSuffix(v string) predicate.BillingProfile", + "line": 660 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeIsNil", + "signature": "func SupplierAddressPostalCodeIsNil() predicate.BillingProfile", + "line": 665 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeNotNil", + "signature": "func SupplierAddressPostalCodeNotNil() predicate.BillingProfile", + "line": 670 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeEqualFold", + "signature": "func SupplierAddressPostalCodeEqualFold(v string) predicate.BillingProfile", + "line": 675 + }, + { + "kind": "func", + "name": "SupplierAddressPostalCodeContainsFold", + "signature": "func SupplierAddressPostalCodeContainsFold(v string) predicate.BillingProfile", + "line": 680 + }, + { + "kind": "func", + "name": "SupplierAddressStateEQ", + "signature": "func SupplierAddressStateEQ(v string) predicate.BillingProfile", + "line": 685 + }, + { + "kind": "func", + "name": "SupplierAddressStateNEQ", + "signature": "func SupplierAddressStateNEQ(v string) predicate.BillingProfile", + "line": 690 + }, + { + "kind": "func", + "name": "SupplierAddressStateIn", + "signature": "func SupplierAddressStateIn(vs ...string) predicate.BillingProfile", + "line": 695 + }, + { + "kind": "func", + "name": "SupplierAddressStateNotIn", + "signature": "func SupplierAddressStateNotIn(vs ...string) predicate.BillingProfile", + "line": 700 + }, + { + "kind": "func", + "name": "SupplierAddressStateGT", + "signature": "func SupplierAddressStateGT(v string) predicate.BillingProfile", + "line": 705 + }, + { + "kind": "func", + "name": "SupplierAddressStateGTE", + "signature": "func SupplierAddressStateGTE(v string) predicate.BillingProfile", + "line": 710 + }, + { + "kind": "func", + "name": "SupplierAddressStateLT", + "signature": "func SupplierAddressStateLT(v string) predicate.BillingProfile", + "line": 715 + }, + { + "kind": "func", + "name": "SupplierAddressStateLTE", + "signature": "func SupplierAddressStateLTE(v string) predicate.BillingProfile", + "line": 720 + }, + { + "kind": "func", + "name": "SupplierAddressStateContains", + "signature": "func SupplierAddressStateContains(v string) predicate.BillingProfile", + "line": 725 + }, + { + "kind": "func", + "name": "SupplierAddressStateHasPrefix", + "signature": "func SupplierAddressStateHasPrefix(v string) predicate.BillingProfile", + "line": 730 + }, + { + "kind": "func", + "name": "SupplierAddressStateHasSuffix", + "signature": "func SupplierAddressStateHasSuffix(v string) predicate.BillingProfile", + "line": 735 + }, + { + "kind": "func", + "name": "SupplierAddressStateIsNil", + "signature": "func SupplierAddressStateIsNil() predicate.BillingProfile", + "line": 740 + }, + { + "kind": "func", + "name": "SupplierAddressStateNotNil", + "signature": "func SupplierAddressStateNotNil() predicate.BillingProfile", + "line": 745 + }, + { + "kind": "func", + "name": "SupplierAddressStateEqualFold", + "signature": "func SupplierAddressStateEqualFold(v string) predicate.BillingProfile", + "line": 750 + }, + { + "kind": "func", + "name": "SupplierAddressStateContainsFold", + "signature": "func SupplierAddressStateContainsFold(v string) predicate.BillingProfile", + "line": 755 + }, + { + "kind": "func", + "name": "SupplierAddressCityEQ", + "signature": "func SupplierAddressCityEQ(v string) predicate.BillingProfile", + "line": 760 + }, + { + "kind": "func", + "name": "SupplierAddressCityNEQ", + "signature": "func SupplierAddressCityNEQ(v string) predicate.BillingProfile", + "line": 765 + }, + { + "kind": "func", + "name": "SupplierAddressCityIn", + "signature": "func SupplierAddressCityIn(vs ...string) predicate.BillingProfile", + "line": 770 + }, + { + "kind": "func", + "name": "SupplierAddressCityNotIn", + "signature": "func SupplierAddressCityNotIn(vs ...string) predicate.BillingProfile", + "line": 775 + }, + { + "kind": "func", + "name": "SupplierAddressCityGT", + "signature": "func SupplierAddressCityGT(v string) predicate.BillingProfile", + "line": 780 + }, + { + "kind": "func", + "name": "SupplierAddressCityGTE", + "signature": "func SupplierAddressCityGTE(v string) predicate.BillingProfile", + "line": 785 + }, + { + "kind": "func", + "name": "SupplierAddressCityLT", + "signature": "func SupplierAddressCityLT(v string) predicate.BillingProfile", + "line": 790 + }, + { + "kind": "func", + "name": "SupplierAddressCityLTE", + "signature": "func SupplierAddressCityLTE(v string) predicate.BillingProfile", + "line": 795 + }, + { + "kind": "func", + "name": "SupplierAddressCityContains", + "signature": "func SupplierAddressCityContains(v string) predicate.BillingProfile", + "line": 800 + }, + { + "kind": "func", + "name": "SupplierAddressCityHasPrefix", + "signature": "func SupplierAddressCityHasPrefix(v string) predicate.BillingProfile", + "line": 805 + }, + { + "kind": "func", + "name": "SupplierAddressCityHasSuffix", + "signature": "func SupplierAddressCityHasSuffix(v string) predicate.BillingProfile", + "line": 810 + }, + { + "kind": "func", + "name": "SupplierAddressCityIsNil", + "signature": "func SupplierAddressCityIsNil() predicate.BillingProfile", + "line": 815 + }, + { + "kind": "func", + "name": "SupplierAddressCityNotNil", + "signature": "func SupplierAddressCityNotNil() predicate.BillingProfile", + "line": 820 + }, + { + "kind": "func", + "name": "SupplierAddressCityEqualFold", + "signature": "func SupplierAddressCityEqualFold(v string) predicate.BillingProfile", + "line": 825 + }, + { + "kind": "func", + "name": "SupplierAddressCityContainsFold", + "signature": "func SupplierAddressCityContainsFold(v string) predicate.BillingProfile", + "line": 830 + }, + { + "kind": "func", + "name": "SupplierAddressLine1EQ", + "signature": "func SupplierAddressLine1EQ(v string) predicate.BillingProfile", + "line": 835 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NEQ", + "signature": "func SupplierAddressLine1NEQ(v string) predicate.BillingProfile", + "line": 840 + }, + { + "kind": "func", + "name": "SupplierAddressLine1In", + "signature": "func SupplierAddressLine1In(vs ...string) predicate.BillingProfile", + "line": 845 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NotIn", + "signature": "func SupplierAddressLine1NotIn(vs ...string) predicate.BillingProfile", + "line": 850 + }, + { + "kind": "func", + "name": "SupplierAddressLine1GT", + "signature": "func SupplierAddressLine1GT(v string) predicate.BillingProfile", + "line": 855 + }, + { + "kind": "func", + "name": "SupplierAddressLine1GTE", + "signature": "func SupplierAddressLine1GTE(v string) predicate.BillingProfile", + "line": 860 + }, + { + "kind": "func", + "name": "SupplierAddressLine1LT", + "signature": "func SupplierAddressLine1LT(v string) predicate.BillingProfile", + "line": 865 + }, + { + "kind": "func", + "name": "SupplierAddressLine1LTE", + "signature": "func SupplierAddressLine1LTE(v string) predicate.BillingProfile", + "line": 870 + }, + { + "kind": "func", + "name": "SupplierAddressLine1Contains", + "signature": "func SupplierAddressLine1Contains(v string) predicate.BillingProfile", + "line": 875 + }, + { + "kind": "func", + "name": "SupplierAddressLine1HasPrefix", + "signature": "func SupplierAddressLine1HasPrefix(v string) predicate.BillingProfile", + "line": 880 + }, + { + "kind": "func", + "name": "SupplierAddressLine1HasSuffix", + "signature": "func SupplierAddressLine1HasSuffix(v string) predicate.BillingProfile", + "line": 885 + }, + { + "kind": "func", + "name": "SupplierAddressLine1IsNil", + "signature": "func SupplierAddressLine1IsNil() predicate.BillingProfile", + "line": 890 + }, + { + "kind": "func", + "name": "SupplierAddressLine1NotNil", + "signature": "func SupplierAddressLine1NotNil() predicate.BillingProfile", + "line": 895 + }, + { + "kind": "func", + "name": "SupplierAddressLine1EqualFold", + "signature": "func SupplierAddressLine1EqualFold(v string) predicate.BillingProfile", + "line": 900 + }, + { + "kind": "func", + "name": "SupplierAddressLine1ContainsFold", + "signature": "func SupplierAddressLine1ContainsFold(v string) predicate.BillingProfile", + "line": 905 + }, + { + "kind": "func", + "name": "SupplierAddressLine2EQ", + "signature": "func SupplierAddressLine2EQ(v string) predicate.BillingProfile", + "line": 910 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NEQ", + "signature": "func SupplierAddressLine2NEQ(v string) predicate.BillingProfile", + "line": 915 + }, + { + "kind": "func", + "name": "SupplierAddressLine2In", + "signature": "func SupplierAddressLine2In(vs ...string) predicate.BillingProfile", + "line": 920 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NotIn", + "signature": "func SupplierAddressLine2NotIn(vs ...string) predicate.BillingProfile", + "line": 925 + }, + { + "kind": "func", + "name": "SupplierAddressLine2GT", + "signature": "func SupplierAddressLine2GT(v string) predicate.BillingProfile", + "line": 930 + }, + { + "kind": "func", + "name": "SupplierAddressLine2GTE", + "signature": "func SupplierAddressLine2GTE(v string) predicate.BillingProfile", + "line": 935 + }, + { + "kind": "func", + "name": "SupplierAddressLine2LT", + "signature": "func SupplierAddressLine2LT(v string) predicate.BillingProfile", + "line": 940 + }, + { + "kind": "func", + "name": "SupplierAddressLine2LTE", + "signature": "func SupplierAddressLine2LTE(v string) predicate.BillingProfile", + "line": 945 + }, + { + "kind": "func", + "name": "SupplierAddressLine2Contains", + "signature": "func SupplierAddressLine2Contains(v string) predicate.BillingProfile", + "line": 950 + }, + { + "kind": "func", + "name": "SupplierAddressLine2HasPrefix", + "signature": "func SupplierAddressLine2HasPrefix(v string) predicate.BillingProfile", + "line": 955 + }, + { + "kind": "func", + "name": "SupplierAddressLine2HasSuffix", + "signature": "func SupplierAddressLine2HasSuffix(v string) predicate.BillingProfile", + "line": 960 + }, + { + "kind": "func", + "name": "SupplierAddressLine2IsNil", + "signature": "func SupplierAddressLine2IsNil() predicate.BillingProfile", + "line": 965 + }, + { + "kind": "func", + "name": "SupplierAddressLine2NotNil", + "signature": "func SupplierAddressLine2NotNil() predicate.BillingProfile", + "line": 970 + }, + { + "kind": "func", + "name": "SupplierAddressLine2EqualFold", + "signature": "func SupplierAddressLine2EqualFold(v string) predicate.BillingProfile", + "line": 975 + }, + { + "kind": "func", + "name": "SupplierAddressLine2ContainsFold", + "signature": "func SupplierAddressLine2ContainsFold(v string) predicate.BillingProfile", + "line": 980 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberEQ", + "signature": "func SupplierAddressPhoneNumberEQ(v string) predicate.BillingProfile", + "line": 985 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNEQ", + "signature": "func SupplierAddressPhoneNumberNEQ(v string) predicate.BillingProfile", + "line": 990 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberIn", + "signature": "func SupplierAddressPhoneNumberIn(vs ...string) predicate.BillingProfile", + "line": 995 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNotIn", + "signature": "func SupplierAddressPhoneNumberNotIn(vs ...string) predicate.BillingProfile", + "line": 1000 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberGT", + "signature": "func SupplierAddressPhoneNumberGT(v string) predicate.BillingProfile", + "line": 1005 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberGTE", + "signature": "func SupplierAddressPhoneNumberGTE(v string) predicate.BillingProfile", + "line": 1010 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberLT", + "signature": "func SupplierAddressPhoneNumberLT(v string) predicate.BillingProfile", + "line": 1015 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberLTE", + "signature": "func SupplierAddressPhoneNumberLTE(v string) predicate.BillingProfile", + "line": 1020 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberContains", + "signature": "func SupplierAddressPhoneNumberContains(v string) predicate.BillingProfile", + "line": 1025 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberHasPrefix", + "signature": "func SupplierAddressPhoneNumberHasPrefix(v string) predicate.BillingProfile", + "line": 1030 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberHasSuffix", + "signature": "func SupplierAddressPhoneNumberHasSuffix(v string) predicate.BillingProfile", + "line": 1035 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberIsNil", + "signature": "func SupplierAddressPhoneNumberIsNil() predicate.BillingProfile", + "line": 1040 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberNotNil", + "signature": "func SupplierAddressPhoneNumberNotNil() predicate.BillingProfile", + "line": 1045 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberEqualFold", + "signature": "func SupplierAddressPhoneNumberEqualFold(v string) predicate.BillingProfile", + "line": 1050 + }, + { + "kind": "func", + "name": "SupplierAddressPhoneNumberContainsFold", + "signature": "func SupplierAddressPhoneNumberContainsFold(v string) predicate.BillingProfile", + "line": 1055 + }, + { + "kind": "func", + "name": "TaxAppIDEQ", + "signature": "func TaxAppIDEQ(v string) predicate.BillingProfile", + "line": 1060 + }, + { + "kind": "func", + "name": "TaxAppIDNEQ", + "signature": "func TaxAppIDNEQ(v string) predicate.BillingProfile", + "line": 1065 + }, + { + "kind": "func", + "name": "TaxAppIDIn", + "signature": "func TaxAppIDIn(vs ...string) predicate.BillingProfile", + "line": 1070 + }, + { + "kind": "func", + "name": "TaxAppIDNotIn", + "signature": "func TaxAppIDNotIn(vs ...string) predicate.BillingProfile", + "line": 1075 + }, + { + "kind": "func", + "name": "TaxAppIDGT", + "signature": "func TaxAppIDGT(v string) predicate.BillingProfile", + "line": 1080 + }, + { + "kind": "func", + "name": "TaxAppIDGTE", + "signature": "func TaxAppIDGTE(v string) predicate.BillingProfile", + "line": 1085 + }, + { + "kind": "func", + "name": "TaxAppIDLT", + "signature": "func TaxAppIDLT(v string) predicate.BillingProfile", + "line": 1090 + }, + { + "kind": "func", + "name": "TaxAppIDLTE", + "signature": "func TaxAppIDLTE(v string) predicate.BillingProfile", + "line": 1095 + }, + { + "kind": "func", + "name": "TaxAppIDContains", + "signature": "func TaxAppIDContains(v string) predicate.BillingProfile", + "line": 1100 + }, + { + "kind": "func", + "name": "TaxAppIDHasPrefix", + "signature": "func TaxAppIDHasPrefix(v string) predicate.BillingProfile", + "line": 1105 + }, + { + "kind": "func", + "name": "TaxAppIDHasSuffix", + "signature": "func TaxAppIDHasSuffix(v string) predicate.BillingProfile", + "line": 1110 + }, + { + "kind": "func", + "name": "TaxAppIDEqualFold", + "signature": "func TaxAppIDEqualFold(v string) predicate.BillingProfile", + "line": 1115 + }, + { + "kind": "func", + "name": "TaxAppIDContainsFold", + "signature": "func TaxAppIDContainsFold(v string) predicate.BillingProfile", + "line": 1120 + }, + { + "kind": "func", + "name": "InvoicingAppIDEQ", + "signature": "func InvoicingAppIDEQ(v string) predicate.BillingProfile", + "line": 1125 + }, + { + "kind": "func", + "name": "InvoicingAppIDNEQ", + "signature": "func InvoicingAppIDNEQ(v string) predicate.BillingProfile", + "line": 1130 + }, + { + "kind": "func", + "name": "InvoicingAppIDIn", + "signature": "func InvoicingAppIDIn(vs ...string) predicate.BillingProfile", + "line": 1135 + }, + { + "kind": "func", + "name": "InvoicingAppIDNotIn", + "signature": "func InvoicingAppIDNotIn(vs ...string) predicate.BillingProfile", + "line": 1140 + }, + { + "kind": "func", + "name": "InvoicingAppIDGT", + "signature": "func InvoicingAppIDGT(v string) predicate.BillingProfile", + "line": 1145 + }, + { + "kind": "func", + "name": "InvoicingAppIDGTE", + "signature": "func InvoicingAppIDGTE(v string) predicate.BillingProfile", + "line": 1150 + }, + { + "kind": "func", + "name": "InvoicingAppIDLT", + "signature": "func InvoicingAppIDLT(v string) predicate.BillingProfile", + "line": 1155 + }, + { + "kind": "func", + "name": "InvoicingAppIDLTE", + "signature": "func InvoicingAppIDLTE(v string) predicate.BillingProfile", + "line": 1160 + }, + { + "kind": "func", + "name": "InvoicingAppIDContains", + "signature": "func InvoicingAppIDContains(v string) predicate.BillingProfile", + "line": 1165 + }, + { + "kind": "func", + "name": "InvoicingAppIDHasPrefix", + "signature": "func InvoicingAppIDHasPrefix(v string) predicate.BillingProfile", + "line": 1170 + }, + { + "kind": "func", + "name": "InvoicingAppIDHasSuffix", + "signature": "func InvoicingAppIDHasSuffix(v string) predicate.BillingProfile", + "line": 1175 + }, + { + "kind": "func", + "name": "InvoicingAppIDEqualFold", + "signature": "func InvoicingAppIDEqualFold(v string) predicate.BillingProfile", + "line": 1180 + }, + { + "kind": "func", + "name": "InvoicingAppIDContainsFold", + "signature": "func InvoicingAppIDContainsFold(v string) predicate.BillingProfile", + "line": 1185 + }, + { + "kind": "func", + "name": "PaymentAppIDEQ", + "signature": "func PaymentAppIDEQ(v string) predicate.BillingProfile", + "line": 1190 + }, + { + "kind": "func", + "name": "PaymentAppIDNEQ", + "signature": "func PaymentAppIDNEQ(v string) predicate.BillingProfile", + "line": 1195 + }, + { + "kind": "func", + "name": "PaymentAppIDIn", + "signature": "func PaymentAppIDIn(vs ...string) predicate.BillingProfile", + "line": 1200 + }, + { + "kind": "func", + "name": "PaymentAppIDNotIn", + "signature": "func PaymentAppIDNotIn(vs ...string) predicate.BillingProfile", + "line": 1205 + }, + { + "kind": "func", + "name": "PaymentAppIDGT", + "signature": "func PaymentAppIDGT(v string) predicate.BillingProfile", + "line": 1210 + }, + { + "kind": "func", + "name": "PaymentAppIDGTE", + "signature": "func PaymentAppIDGTE(v string) predicate.BillingProfile", + "line": 1215 + }, + { + "kind": "func", + "name": "PaymentAppIDLT", + "signature": "func PaymentAppIDLT(v string) predicate.BillingProfile", + "line": 1220 + }, + { + "kind": "func", + "name": "PaymentAppIDLTE", + "signature": "func PaymentAppIDLTE(v string) predicate.BillingProfile", + "line": 1225 + }, + { + "kind": "func", + "name": "PaymentAppIDContains", + "signature": "func PaymentAppIDContains(v string) predicate.BillingProfile", + "line": 1230 + }, + { + "kind": "func", + "name": "PaymentAppIDHasPrefix", + "signature": "func PaymentAppIDHasPrefix(v string) predicate.BillingProfile", + "line": 1235 + }, + { + "kind": "func", + "name": "PaymentAppIDHasSuffix", + "signature": "func PaymentAppIDHasSuffix(v string) predicate.BillingProfile", + "line": 1240 + }, + { + "kind": "func", + "name": "PaymentAppIDEqualFold", + "signature": "func PaymentAppIDEqualFold(v string) predicate.BillingProfile", + "line": 1245 + }, + { + "kind": "func", + "name": "PaymentAppIDContainsFold", + "signature": "func PaymentAppIDContainsFold(v string) predicate.BillingProfile", + "line": 1250 + }, + { + "kind": "func", + "name": "WorkflowConfigIDEQ", + "signature": "func WorkflowConfigIDEQ(v string) predicate.BillingProfile", + "line": 1255 + }, + { + "kind": "func", + "name": "WorkflowConfigIDNEQ", + "signature": "func WorkflowConfigIDNEQ(v string) predicate.BillingProfile", + "line": 1260 + }, + { + "kind": "func", + "name": "WorkflowConfigIDIn", + "signature": "func WorkflowConfigIDIn(vs ...string) predicate.BillingProfile", + "line": 1265 + }, + { + "kind": "func", + "name": "WorkflowConfigIDNotIn", + "signature": "func WorkflowConfigIDNotIn(vs ...string) predicate.BillingProfile", + "line": 1270 + }, + { + "kind": "func", + "name": "WorkflowConfigIDGT", + "signature": "func WorkflowConfigIDGT(v string) predicate.BillingProfile", + "line": 1275 + }, + { + "kind": "func", + "name": "WorkflowConfigIDGTE", + "signature": "func WorkflowConfigIDGTE(v string) predicate.BillingProfile", + "line": 1280 + }, + { + "kind": "func", + "name": "WorkflowConfigIDLT", + "signature": "func WorkflowConfigIDLT(v string) predicate.BillingProfile", + "line": 1285 + }, + { + "kind": "func", + "name": "WorkflowConfigIDLTE", + "signature": "func WorkflowConfigIDLTE(v string) predicate.BillingProfile", + "line": 1290 + }, + { + "kind": "func", + "name": "WorkflowConfigIDContains", + "signature": "func WorkflowConfigIDContains(v string) predicate.BillingProfile", + "line": 1295 + }, + { + "kind": "func", + "name": "WorkflowConfigIDHasPrefix", + "signature": "func WorkflowConfigIDHasPrefix(v string) predicate.BillingProfile", + "line": 1300 + }, + { + "kind": "func", + "name": "WorkflowConfigIDHasSuffix", + "signature": "func WorkflowConfigIDHasSuffix(v string) predicate.BillingProfile", + "line": 1305 + }, + { + "kind": "func", + "name": "WorkflowConfigIDEqualFold", + "signature": "func WorkflowConfigIDEqualFold(v string) predicate.BillingProfile", + "line": 1310 + }, + { + "kind": "func", + "name": "WorkflowConfigIDContainsFold", + "signature": "func WorkflowConfigIDContainsFold(v string) predicate.BillingProfile", + "line": 1315 + }, + { + "kind": "func", + "name": "DefaultEQ", + "signature": "func DefaultEQ(v bool) predicate.BillingProfile", + "line": 1320 + }, + { + "kind": "func", + "name": "DefaultNEQ", + "signature": "func DefaultNEQ(v bool) predicate.BillingProfile", + "line": 1325 + }, + { + "kind": "func", + "name": "SupplierNameEQ", + "signature": "func SupplierNameEQ(v string) predicate.BillingProfile", + "line": 1330 + }, + { + "kind": "func", + "name": "SupplierNameNEQ", + "signature": "func SupplierNameNEQ(v string) predicate.BillingProfile", + "line": 1335 + }, + { + "kind": "func", + "name": "SupplierNameIn", + "signature": "func SupplierNameIn(vs ...string) predicate.BillingProfile", + "line": 1340 + }, + { + "kind": "func", + "name": "SupplierNameNotIn", + "signature": "func SupplierNameNotIn(vs ...string) predicate.BillingProfile", + "line": 1345 + }, + { + "kind": "func", + "name": "SupplierNameGT", + "signature": "func SupplierNameGT(v string) predicate.BillingProfile", + "line": 1350 + }, + { + "kind": "func", + "name": "SupplierNameGTE", + "signature": "func SupplierNameGTE(v string) predicate.BillingProfile", + "line": 1355 + }, + { + "kind": "func", + "name": "SupplierNameLT", + "signature": "func SupplierNameLT(v string) predicate.BillingProfile", + "line": 1360 + }, + { + "kind": "func", + "name": "SupplierNameLTE", + "signature": "func SupplierNameLTE(v string) predicate.BillingProfile", + "line": 1365 + }, + { + "kind": "func", + "name": "SupplierNameContains", + "signature": "func SupplierNameContains(v string) predicate.BillingProfile", + "line": 1370 + }, + { + "kind": "func", + "name": "SupplierNameHasPrefix", + "signature": "func SupplierNameHasPrefix(v string) predicate.BillingProfile", + "line": 1375 + }, + { + "kind": "func", + "name": "SupplierNameHasSuffix", + "signature": "func SupplierNameHasSuffix(v string) predicate.BillingProfile", + "line": 1380 + }, + { + "kind": "func", + "name": "SupplierNameEqualFold", + "signature": "func SupplierNameEqualFold(v string) predicate.BillingProfile", + "line": 1385 + }, + { + "kind": "func", + "name": "SupplierNameContainsFold", + "signature": "func SupplierNameContainsFold(v string) predicate.BillingProfile", + "line": 1390 + }, + { + "kind": "func", + "name": "SupplierTaxCodeEQ", + "signature": "func SupplierTaxCodeEQ(v string) predicate.BillingProfile", + "line": 1395 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNEQ", + "signature": "func SupplierTaxCodeNEQ(v string) predicate.BillingProfile", + "line": 1400 + }, + { + "kind": "func", + "name": "SupplierTaxCodeIn", + "signature": "func SupplierTaxCodeIn(vs ...string) predicate.BillingProfile", + "line": 1405 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNotIn", + "signature": "func SupplierTaxCodeNotIn(vs ...string) predicate.BillingProfile", + "line": 1410 + }, + { + "kind": "func", + "name": "SupplierTaxCodeGT", + "signature": "func SupplierTaxCodeGT(v string) predicate.BillingProfile", + "line": 1415 + }, + { + "kind": "func", + "name": "SupplierTaxCodeGTE", + "signature": "func SupplierTaxCodeGTE(v string) predicate.BillingProfile", + "line": 1420 + }, + { + "kind": "func", + "name": "SupplierTaxCodeLT", + "signature": "func SupplierTaxCodeLT(v string) predicate.BillingProfile", + "line": 1425 + }, + { + "kind": "func", + "name": "SupplierTaxCodeLTE", + "signature": "func SupplierTaxCodeLTE(v string) predicate.BillingProfile", + "line": 1430 + }, + { + "kind": "func", + "name": "SupplierTaxCodeContains", + "signature": "func SupplierTaxCodeContains(v string) predicate.BillingProfile", + "line": 1435 + }, + { + "kind": "func", + "name": "SupplierTaxCodeHasPrefix", + "signature": "func SupplierTaxCodeHasPrefix(v string) predicate.BillingProfile", + "line": 1440 + }, + { + "kind": "func", + "name": "SupplierTaxCodeHasSuffix", + "signature": "func SupplierTaxCodeHasSuffix(v string) predicate.BillingProfile", + "line": 1445 + }, + { + "kind": "func", + "name": "SupplierTaxCodeIsNil", + "signature": "func SupplierTaxCodeIsNil() predicate.BillingProfile", + "line": 1450 + }, + { + "kind": "func", + "name": "SupplierTaxCodeNotNil", + "signature": "func SupplierTaxCodeNotNil() predicate.BillingProfile", + "line": 1455 + }, + { + "kind": "func", + "name": "SupplierTaxCodeEqualFold", + "signature": "func SupplierTaxCodeEqualFold(v string) predicate.BillingProfile", + "line": 1460 + }, + { + "kind": "func", + "name": "SupplierTaxCodeContainsFold", + "signature": "func SupplierTaxCodeContainsFold(v string) predicate.BillingProfile", + "line": 1465 + }, + { + "kind": "func", + "name": "HasBillingInvoices", + "signature": "func HasBillingInvoices() predicate.BillingProfile", + "line": 1470 + }, + { + "kind": "func", + "name": "HasBillingInvoicesWith", + "signature": "func HasBillingInvoicesWith(preds ...predicate.BillingInvoice) predicate.BillingProfile", + "line": 1481 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverride", + "signature": "func HasBillingCustomerOverride() predicate.BillingProfile", + "line": 1493 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverrideWith", + "signature": "func HasBillingCustomerOverrideWith(preds ...predicate.BillingCustomerOverride) predicate.BillingProfile", + "line": 1504 + }, + { + "kind": "func", + "name": "HasWorkflowConfig", + "signature": "func HasWorkflowConfig() predicate.BillingProfile", + "line": 1516 + }, + { + "kind": "func", + "name": "HasWorkflowConfigWith", + "signature": "func HasWorkflowConfigWith(preds ...predicate.BillingWorkflowConfig) predicate.BillingProfile", + "line": 1527 + }, + { + "kind": "func", + "name": "HasTaxApp", + "signature": "func HasTaxApp() predicate.BillingProfile", + "line": 1539 + }, + { + "kind": "func", + "name": "HasTaxAppWith", + "signature": "func HasTaxAppWith(preds ...predicate.App) predicate.BillingProfile", + "line": 1550 + }, + { + "kind": "func", + "name": "HasInvoicingApp", + "signature": "func HasInvoicingApp() predicate.BillingProfile", + "line": 1562 + }, + { + "kind": "func", + "name": "HasInvoicingAppWith", + "signature": "func HasInvoicingAppWith(preds ...predicate.App) predicate.BillingProfile", + "line": 1573 + }, + { + "kind": "func", + "name": "HasPaymentApp", + "signature": "func HasPaymentApp() predicate.BillingProfile", + "line": 1585 + }, + { + "kind": "func", + "name": "HasPaymentAppWith", + "signature": "func HasPaymentAppWith(preds ...predicate.App) predicate.BillingProfile", + "line": 1596 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingProfile) predicate.BillingProfile", + "line": 1608 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingProfile) predicate.BillingProfile", + "line": 1613 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingProfile) predicate.BillingProfile", + "line": 1618 + } + ], + "line_count": 1620 + }, + "openmeter/ent/db/billingprofile_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfileCreate", + "signature": "type BillingProfileCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingProfileCreate) SetNamespace(v string) *BillingProfileCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *BillingProfileCreate) SetMetadata(v map[string]string) *BillingProfileCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingProfileCreate) SetCreatedAt(v time.Time) *BillingProfileCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingProfileCreate) SetNillableCreatedAt(v *time.Time) *BillingProfileCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingProfileCreate) SetUpdatedAt(v time.Time) *BillingProfileCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingProfileCreate) SetNillableUpdatedAt(v *time.Time) *BillingProfileCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingProfileCreate) SetDeletedAt(v time.Time) *BillingProfileCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingProfileCreate) SetNillableDeletedAt(v *time.Time) *BillingProfileCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *BillingProfileCreate) SetName(v string) *BillingProfileCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingProfileCreate) SetDescription(v string) *BillingProfileCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingProfileCreate) SetNillableDescription(v *string) *BillingProfileCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingProfileCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressPostalCode(v string) *BillingProfileCreate", + "line": 120 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressPostalCode(v *string) *BillingProfileCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressState(v string) *BillingProfileCreate", + "line": 134 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressState(v *string) *BillingProfileCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressCity(v string) *BillingProfileCreate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressCity(v *string) *BillingProfileCreate", + "line": 154 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressLine1(v string) *BillingProfileCreate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressLine1(v *string) *BillingProfileCreate", + "line": 168 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressLine2(v string) *BillingProfileCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressLine2(v *string) *BillingProfileCreate", + "line": 182 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_c *BillingProfileCreate) SetSupplierAddressPhoneNumber(v string) *BillingProfileCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierAddressPhoneNumber(v *string) *BillingProfileCreate", + "line": 196 + }, + { + "kind": "func", + "name": "SetTaxAppID", + "signature": "func (_c *BillingProfileCreate) SetTaxAppID(v string) *BillingProfileCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetInvoicingAppID", + "signature": "func (_c *BillingProfileCreate) SetInvoicingAppID(v string) *BillingProfileCreate", + "line": 210 + }, + { + "kind": "func", + "name": "SetPaymentAppID", + "signature": "func (_c *BillingProfileCreate) SetPaymentAppID(v string) *BillingProfileCreate", + "line": 216 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_c *BillingProfileCreate) SetWorkflowConfigID(v string) *BillingProfileCreate", + "line": 222 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (_c *BillingProfileCreate) SetDefault(v bool) *BillingProfileCreate", + "line": 228 + }, + { + "kind": "func", + "name": "SetNillableDefault", + "signature": "func (_c *BillingProfileCreate) SetNillableDefault(v *bool) *BillingProfileCreate", + "line": 234 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_c *BillingProfileCreate) SetSupplierName(v string) *BillingProfileCreate", + "line": 242 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_c *BillingProfileCreate) SetSupplierTaxCode(v string) *BillingProfileCreate", + "line": 248 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_c *BillingProfileCreate) SetNillableSupplierTaxCode(v *string) *BillingProfileCreate", + "line": 254 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingProfileCreate) SetID(v string) *BillingProfileCreate", + "line": 262 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingProfileCreate) SetNillableID(v *string) *BillingProfileCreate", + "line": 268 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_c *BillingProfileCreate) AddBillingInvoiceIDs(ids ...string) *BillingProfileCreate", + "line": 276 + }, + { + "kind": "func", + "name": "AddBillingInvoices", + "signature": "func (_c *BillingProfileCreate) AddBillingInvoices(v ...*BillingInvoice) *BillingProfileCreate", + "line": 282 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_c *BillingProfileCreate) AddBillingCustomerOverrideIDs(ids ...string) *BillingProfileCreate", + "line": 291 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverride", + "signature": "func (_c *BillingProfileCreate) AddBillingCustomerOverride(v ...*BillingCustomerOverride) *BillingProfileCreate", + "line": 297 + }, + { + "kind": "func", + "name": "SetWorkflowConfig", + "signature": "func (_c *BillingProfileCreate) SetWorkflowConfig(v *BillingWorkflowConfig) *BillingProfileCreate", + "line": 306 + }, + { + "kind": "func", + "name": "SetTaxApp", + "signature": "func (_c *BillingProfileCreate) SetTaxApp(v *App) *BillingProfileCreate", + "line": 311 + }, + { + "kind": "func", + "name": "SetInvoicingApp", + "signature": "func (_c *BillingProfileCreate) SetInvoicingApp(v *App) *BillingProfileCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetPaymentApp", + "signature": "func (_c *BillingProfileCreate) SetPaymentApp(v *App) *BillingProfileCreate", + "line": 321 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingProfileCreate) Mutation() *BillingProfileMutation", + "line": 326 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingProfileCreate) Save(ctx context.Context) (*BillingProfile, error)", + "line": 331 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingProfileCreate) SaveX(ctx context.Context) *BillingProfile", + "line": 337 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingProfileCreate) Exec(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingProfileCreate) ExecX(ctx context.Context)", + "line": 352 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingProfileCreate) defaults()", + "line": 359 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingProfileCreate) check() error", + "line": 379 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingProfileCreate) sqlSave(ctx context.Context) (*BillingProfile, error)", + "line": 445 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingProfileCreate) createSpec() (*BillingProfile, *sqlgraph.CreateSpec)", + "line": 468 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingProfileCreate) OnConflict(opts ...sql.ConflictOption) *BillingProfileUpsertOne", + "line": 665 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingProfileCreate) OnConflictColumns(columns ...string) *BillingProfileUpsertOne", + "line": 678 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingProfileUpsert) SetMetadata(v map[string]string) *BillingProfileUpsert", + "line": 699 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingProfileUpsert) UpdateMetadata() *BillingProfileUpsert", + "line": 705 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingProfileUpsert) ClearMetadata() *BillingProfileUpsert", + "line": 711 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingProfileUpsert) SetUpdatedAt(v time.Time) *BillingProfileUpsert", + "line": 717 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingProfileUpsert) UpdateUpdatedAt() *BillingProfileUpsert", + "line": 723 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingProfileUpsert) SetDeletedAt(v time.Time) *BillingProfileUpsert", + "line": 729 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingProfileUpsert) UpdateDeletedAt() *BillingProfileUpsert", + "line": 735 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingProfileUpsert) ClearDeletedAt() *BillingProfileUpsert", + "line": 741 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingProfileUpsert) SetName(v string) *BillingProfileUpsert", + "line": 747 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingProfileUpsert) UpdateName() *BillingProfileUpsert", + "line": 753 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingProfileUpsert) SetDescription(v string) *BillingProfileUpsert", + "line": 759 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingProfileUpsert) UpdateDescription() *BillingProfileUpsert", + "line": 765 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingProfileUpsert) ClearDescription() *BillingProfileUpsert", + "line": 771 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileUpsert", + "line": 777 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressCountry() *BillingProfileUpsert", + "line": 783 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressCountry() *BillingProfileUpsert", + "line": 789 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressPostalCode(v string) *BillingProfileUpsert", + "line": 795 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressPostalCode() *BillingProfileUpsert", + "line": 801 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressPostalCode() *BillingProfileUpsert", + "line": 807 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressState(v string) *BillingProfileUpsert", + "line": 813 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressState() *BillingProfileUpsert", + "line": 819 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressState() *BillingProfileUpsert", + "line": 825 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressCity(v string) *BillingProfileUpsert", + "line": 831 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressCity() *BillingProfileUpsert", + "line": 837 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressCity() *BillingProfileUpsert", + "line": 843 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressLine1(v string) *BillingProfileUpsert", + "line": 849 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressLine1() *BillingProfileUpsert", + "line": 855 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressLine1() *BillingProfileUpsert", + "line": 861 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressLine2(v string) *BillingProfileUpsert", + "line": 867 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressLine2() *BillingProfileUpsert", + "line": 873 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressLine2() *BillingProfileUpsert", + "line": 879 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsert) SetSupplierAddressPhoneNumber(v string) *BillingProfileUpsert", + "line": 885 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierAddressPhoneNumber() *BillingProfileUpsert", + "line": 891 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsert) ClearSupplierAddressPhoneNumber() *BillingProfileUpsert", + "line": 897 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingProfileUpsert) SetWorkflowConfigID(v string) *BillingProfileUpsert", + "line": 903 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingProfileUpsert) UpdateWorkflowConfigID() *BillingProfileUpsert", + "line": 909 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (u *BillingProfileUpsert) SetDefault(v bool) *BillingProfileUpsert", + "line": 915 + }, + { + "kind": "func", + "name": "UpdateDefault", + "signature": "func (u *BillingProfileUpsert) UpdateDefault() *BillingProfileUpsert", + "line": 921 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingProfileUpsert) SetSupplierName(v string) *BillingProfileUpsert", + "line": 927 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierName() *BillingProfileUpsert", + "line": 933 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingProfileUpsert) SetSupplierTaxCode(v string) *BillingProfileUpsert", + "line": 939 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingProfileUpsert) UpdateSupplierTaxCode() *BillingProfileUpsert", + "line": 945 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingProfileUpsert) ClearSupplierTaxCode() *BillingProfileUpsert", + "line": 951 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingProfileUpsertOne) UpdateNewValues() *BillingProfileUpsertOne", + "line": 967 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingProfileUpsertOne) Ignore() *BillingProfileUpsertOne", + "line": 998 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingProfileUpsertOne) DoNothing() *BillingProfileUpsertOne", + "line": 1005 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingProfileUpsertOne) Update(set func(*BillingProfileUpsert)) *BillingProfileUpsertOne", + "line": 1012 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingProfileUpsertOne) SetMetadata(v map[string]string) *BillingProfileUpsertOne", + "line": 1020 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingProfileUpsertOne) UpdateMetadata() *BillingProfileUpsertOne", + "line": 1027 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingProfileUpsertOne) ClearMetadata() *BillingProfileUpsertOne", + "line": 1034 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingProfileUpsertOne) SetUpdatedAt(v time.Time) *BillingProfileUpsertOne", + "line": 1041 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingProfileUpsertOne) UpdateUpdatedAt() *BillingProfileUpsertOne", + "line": 1048 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingProfileUpsertOne) SetDeletedAt(v time.Time) *BillingProfileUpsertOne", + "line": 1055 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingProfileUpsertOne) UpdateDeletedAt() *BillingProfileUpsertOne", + "line": 1062 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingProfileUpsertOne) ClearDeletedAt() *BillingProfileUpsertOne", + "line": 1069 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingProfileUpsertOne) SetName(v string) *BillingProfileUpsertOne", + "line": 1076 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingProfileUpsertOne) UpdateName() *BillingProfileUpsertOne", + "line": 1083 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingProfileUpsertOne) SetDescription(v string) *BillingProfileUpsertOne", + "line": 1090 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingProfileUpsertOne) UpdateDescription() *BillingProfileUpsertOne", + "line": 1097 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingProfileUpsertOne) ClearDescription() *BillingProfileUpsertOne", + "line": 1104 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileUpsertOne", + "line": 1111 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressCountry() *BillingProfileUpsertOne", + "line": 1118 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressCountry() *BillingProfileUpsertOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressPostalCode(v string) *BillingProfileUpsertOne", + "line": 1132 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressPostalCode() *BillingProfileUpsertOne", + "line": 1139 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressPostalCode() *BillingProfileUpsertOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressState(v string) *BillingProfileUpsertOne", + "line": 1153 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressState() *BillingProfileUpsertOne", + "line": 1160 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressState() *BillingProfileUpsertOne", + "line": 1167 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressCity(v string) *BillingProfileUpsertOne", + "line": 1174 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressCity() *BillingProfileUpsertOne", + "line": 1181 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressCity() *BillingProfileUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressLine1(v string) *BillingProfileUpsertOne", + "line": 1195 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressLine1() *BillingProfileUpsertOne", + "line": 1202 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressLine1() *BillingProfileUpsertOne", + "line": 1209 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressLine2(v string) *BillingProfileUpsertOne", + "line": 1216 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressLine2() *BillingProfileUpsertOne", + "line": 1223 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressLine2() *BillingProfileUpsertOne", + "line": 1230 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierAddressPhoneNumber(v string) *BillingProfileUpsertOne", + "line": 1237 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierAddressPhoneNumber() *BillingProfileUpsertOne", + "line": 1244 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierAddressPhoneNumber() *BillingProfileUpsertOne", + "line": 1251 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingProfileUpsertOne) SetWorkflowConfigID(v string) *BillingProfileUpsertOne", + "line": 1258 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingProfileUpsertOne) UpdateWorkflowConfigID() *BillingProfileUpsertOne", + "line": 1265 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (u *BillingProfileUpsertOne) SetDefault(v bool) *BillingProfileUpsertOne", + "line": 1272 + }, + { + "kind": "func", + "name": "UpdateDefault", + "signature": "func (u *BillingProfileUpsertOne) UpdateDefault() *BillingProfileUpsertOne", + "line": 1279 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierName(v string) *BillingProfileUpsertOne", + "line": 1286 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierName() *BillingProfileUpsertOne", + "line": 1293 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertOne) SetSupplierTaxCode(v string) *BillingProfileUpsertOne", + "line": 1300 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertOne) UpdateSupplierTaxCode() *BillingProfileUpsertOne", + "line": 1307 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertOne) ClearSupplierTaxCode() *BillingProfileUpsertOne", + "line": 1314 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingProfileUpsertOne) Exec(ctx context.Context) error", + "line": 1321 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingProfileUpsertOne) ExecX(ctx context.Context)", + "line": 1329 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingProfileUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1336 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingProfileUpsertOne) IDX(ctx context.Context) string", + "line": 1350 + }, + { + "kind": "struct", + "name": "BillingProfileCreateBulk", + "signature": "type BillingProfileCreateBulk struct", + "line": 1359 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingProfileCreateBulk) Save(ctx context.Context) ([]*BillingProfile, error)", + "line": 1367 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingProfileCreateBulk) SaveX(ctx context.Context) []*BillingProfile", + "line": 1423 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingProfileCreateBulk) Exec(ctx context.Context) error", + "line": 1432 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingProfileCreateBulk) ExecX(ctx context.Context)", + "line": 1438 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingProfileCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingProfileUpsertBulk", + "line": 1459 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingProfileCreateBulk) OnConflictColumns(columns ...string) *BillingProfileUpsertBulk", + "line": 1472 + }, + { + "kind": "struct", + "name": "BillingProfileUpsertBulk", + "signature": "type BillingProfileUpsertBulk struct", + "line": 1481 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingProfileUpsertBulk) UpdateNewValues() *BillingProfileUpsertBulk", + "line": 1496 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingProfileUpsertBulk) Ignore() *BillingProfileUpsertBulk", + "line": 1529 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingProfileUpsertBulk) DoNothing() *BillingProfileUpsertBulk", + "line": 1536 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingProfileUpsertBulk) Update(set func(*BillingProfileUpsert)) *BillingProfileUpsertBulk", + "line": 1543 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingProfileUpsertBulk) SetMetadata(v map[string]string) *BillingProfileUpsertBulk", + "line": 1551 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingProfileUpsertBulk) UpdateMetadata() *BillingProfileUpsertBulk", + "line": 1558 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingProfileUpsertBulk) ClearMetadata() *BillingProfileUpsertBulk", + "line": 1565 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingProfileUpsertBulk) SetUpdatedAt(v time.Time) *BillingProfileUpsertBulk", + "line": 1572 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingProfileUpsertBulk) UpdateUpdatedAt() *BillingProfileUpsertBulk", + "line": 1579 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingProfileUpsertBulk) SetDeletedAt(v time.Time) *BillingProfileUpsertBulk", + "line": 1586 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingProfileUpsertBulk) UpdateDeletedAt() *BillingProfileUpsertBulk", + "line": 1593 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingProfileUpsertBulk) ClearDeletedAt() *BillingProfileUpsertBulk", + "line": 1600 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingProfileUpsertBulk) SetName(v string) *BillingProfileUpsertBulk", + "line": 1607 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingProfileUpsertBulk) UpdateName() *BillingProfileUpsertBulk", + "line": 1614 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingProfileUpsertBulk) SetDescription(v string) *BillingProfileUpsertBulk", + "line": 1621 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingProfileUpsertBulk) UpdateDescription() *BillingProfileUpsertBulk", + "line": 1628 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingProfileUpsertBulk) ClearDescription() *BillingProfileUpsertBulk", + "line": 1635 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileUpsertBulk", + "line": 1642 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressCountry() *BillingProfileUpsertBulk", + "line": 1649 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressCountry() *BillingProfileUpsertBulk", + "line": 1656 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressPostalCode(v string) *BillingProfileUpsertBulk", + "line": 1663 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressPostalCode() *BillingProfileUpsertBulk", + "line": 1670 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressPostalCode() *BillingProfileUpsertBulk", + "line": 1677 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressState(v string) *BillingProfileUpsertBulk", + "line": 1684 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressState", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressState() *BillingProfileUpsertBulk", + "line": 1691 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressState() *BillingProfileUpsertBulk", + "line": 1698 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressCity(v string) *BillingProfileUpsertBulk", + "line": 1705 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressCity() *BillingProfileUpsertBulk", + "line": 1712 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressCity() *BillingProfileUpsertBulk", + "line": 1719 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressLine1(v string) *BillingProfileUpsertBulk", + "line": 1726 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressLine1() *BillingProfileUpsertBulk", + "line": 1733 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressLine1() *BillingProfileUpsertBulk", + "line": 1740 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressLine2(v string) *BillingProfileUpsertBulk", + "line": 1747 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressLine2() *BillingProfileUpsertBulk", + "line": 1754 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressLine2() *BillingProfileUpsertBulk", + "line": 1761 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierAddressPhoneNumber(v string) *BillingProfileUpsertBulk", + "line": 1768 + }, + { + "kind": "func", + "name": "UpdateSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierAddressPhoneNumber() *BillingProfileUpsertBulk", + "line": 1775 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierAddressPhoneNumber() *BillingProfileUpsertBulk", + "line": 1782 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (u *BillingProfileUpsertBulk) SetWorkflowConfigID(v string) *BillingProfileUpsertBulk", + "line": 1789 + }, + { + "kind": "func", + "name": "UpdateWorkflowConfigID", + "signature": "func (u *BillingProfileUpsertBulk) UpdateWorkflowConfigID() *BillingProfileUpsertBulk", + "line": 1796 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (u *BillingProfileUpsertBulk) SetDefault(v bool) *BillingProfileUpsertBulk", + "line": 1803 + }, + { + "kind": "func", + "name": "UpdateDefault", + "signature": "func (u *BillingProfileUpsertBulk) UpdateDefault() *BillingProfileUpsertBulk", + "line": 1810 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierName(v string) *BillingProfileUpsertBulk", + "line": 1817 + }, + { + "kind": "func", + "name": "UpdateSupplierName", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierName() *BillingProfileUpsertBulk", + "line": 1824 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertBulk) SetSupplierTaxCode(v string) *BillingProfileUpsertBulk", + "line": 1831 + }, + { + "kind": "func", + "name": "UpdateSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertBulk) UpdateSupplierTaxCode() *BillingProfileUpsertBulk", + "line": 1838 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (u *BillingProfileUpsertBulk) ClearSupplierTaxCode() *BillingProfileUpsertBulk", + "line": 1845 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingProfileUpsertBulk) Exec(ctx context.Context) error", + "line": 1852 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingProfileUpsertBulk) ExecX(ctx context.Context)", + "line": 1868 + } + ], + "line_count": 1872 + }, + "openmeter/ent/db/billingprofile_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfileDelete", + "signature": "type BillingProfileDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingProfileDelete) Where(ps ...predicate.BillingProfile) *BillingProfileDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingProfileDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingProfileDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingProfileDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingProfileDeleteOne", + "signature": "type BillingProfileDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingProfileDeleteOne) Where(ps ...predicate.BillingProfile) *BillingProfileDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingProfileDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingProfileDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingprofile_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfileQuery", + "signature": "type BillingProfileQuery struct", + "line": 25 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingProfileQuery) Where(ps ...predicate.BillingProfile) *BillingProfileQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingProfileQuery) Limit(limit int) *BillingProfileQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingProfileQuery) Offset(offset int) *BillingProfileQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingProfileQuery) Unique(unique bool) *BillingProfileQuery", + "line": 63 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingProfileQuery) Order(o ...billingprofile.OrderOption) *BillingProfileQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryBillingInvoices", + "signature": "func (_q *BillingProfileQuery) QueryBillingInvoices() *BillingInvoiceQuery", + "line": 75 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverride", + "signature": "func (_q *BillingProfileQuery) QueryBillingCustomerOverride() *BillingCustomerOverrideQuery", + "line": 97 + }, + { + "kind": "func", + "name": "QueryWorkflowConfig", + "signature": "func (_q *BillingProfileQuery) QueryWorkflowConfig() *BillingWorkflowConfigQuery", + "line": 119 + }, + { + "kind": "func", + "name": "QueryTaxApp", + "signature": "func (_q *BillingProfileQuery) QueryTaxApp() *AppQuery", + "line": 141 + }, + { + "kind": "func", + "name": "QueryInvoicingApp", + "signature": "func (_q *BillingProfileQuery) QueryInvoicingApp() *AppQuery", + "line": 163 + }, + { + "kind": "func", + "name": "QueryPaymentApp", + "signature": "func (_q *BillingProfileQuery) QueryPaymentApp() *AppQuery", + "line": 185 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingProfileQuery) First(ctx context.Context) (*BillingProfile, error)", + "line": 208 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingProfileQuery) FirstX(ctx context.Context) *BillingProfile", + "line": 220 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingProfileQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 230 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingProfileQuery) FirstIDX(ctx context.Context) string", + "line": 243 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingProfileQuery) Only(ctx context.Context) (*BillingProfile, error)", + "line": 254 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingProfileQuery) OnlyX(ctx context.Context) *BillingProfile", + "line": 270 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingProfileQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 281 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingProfileQuery) OnlyIDX(ctx context.Context) string", + "line": 298 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingProfileQuery) All(ctx context.Context) ([]*BillingProfile, error)", + "line": 307 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingProfileQuery) AllX(ctx context.Context) []*BillingProfile", + "line": 317 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingProfileQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 326 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingProfileQuery) IDsX(ctx context.Context) []string", + "line": 338 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingProfileQuery) Count(ctx context.Context) (int, error)", + "line": 347 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingProfileQuery) CountX(ctx context.Context) int", + "line": 356 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingProfileQuery) Exist(ctx context.Context) (bool, error)", + "line": 365 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingProfileQuery) ExistX(ctx context.Context) bool", + "line": 378 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingProfileQuery) Clone() *BillingProfileQuery", + "line": 388 + }, + { + "kind": "func", + "name": "WithBillingInvoices", + "signature": "func (_q *BillingProfileQuery) WithBillingInvoices(opts ...func(*BillingInvoiceQuery)) *BillingProfileQuery", + "line": 412 + }, + { + "kind": "func", + "name": "WithBillingCustomerOverride", + "signature": "func (_q *BillingProfileQuery) WithBillingCustomerOverride(opts ...func(*BillingCustomerOverrideQuery)) *BillingProfileQuery", + "line": 423 + }, + { + "kind": "func", + "name": "WithWorkflowConfig", + "signature": "func (_q *BillingProfileQuery) WithWorkflowConfig(opts ...func(*BillingWorkflowConfigQuery)) *BillingProfileQuery", + "line": 434 + }, + { + "kind": "func", + "name": "WithTaxApp", + "signature": "func (_q *BillingProfileQuery) WithTaxApp(opts ...func(*AppQuery)) *BillingProfileQuery", + "line": 445 + }, + { + "kind": "func", + "name": "WithInvoicingApp", + "signature": "func (_q *BillingProfileQuery) WithInvoicingApp(opts ...func(*AppQuery)) *BillingProfileQuery", + "line": 456 + }, + { + "kind": "func", + "name": "WithPaymentApp", + "signature": "func (_q *BillingProfileQuery) WithPaymentApp(opts ...func(*AppQuery)) *BillingProfileQuery", + "line": 467 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingProfileQuery) GroupBy(field string, fields ...string) *BillingProfileGroupBy", + "line": 490 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingProfileQuery) Select(fields ...string) *BillingProfileSelect", + "line": 511 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingProfileQuery) Aggregate(fns ...AggregateFunc) *BillingProfileSelect", + "line": 520 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingProfileQuery) prepareQuery(ctx context.Context) error", + "line": 524 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingProfileQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingProfile, error)", + "line": 550 + }, + { + "kind": "func", + "name": "loadBillingInvoices", + "signature": "func (_q *BillingProfileQuery) loadBillingInvoices(ctx context.Context, query *BillingInvoiceQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *BillingInvoice)) error", + "line": 629 + }, + { + "kind": "func", + "name": "loadBillingCustomerOverride", + "signature": "func (_q *BillingProfileQuery) loadBillingCustomerOverride(ctx context.Context, query *BillingCustomerOverrideQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *BillingCustomerOverride)) error", + "line": 659 + }, + { + "kind": "func", + "name": "loadWorkflowConfig", + "signature": "func (_q *BillingProfileQuery) loadWorkflowConfig(ctx context.Context, query *BillingWorkflowConfigQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *BillingWorkflowConfig)) error", + "line": 692 + }, + { + "kind": "func", + "name": "loadTaxApp", + "signature": "func (_q *BillingProfileQuery) loadTaxApp(ctx context.Context, query *AppQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *App)) error", + "line": 721 + }, + { + "kind": "func", + "name": "loadInvoicingApp", + "signature": "func (_q *BillingProfileQuery) loadInvoicingApp(ctx context.Context, query *AppQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *App)) error", + "line": 750 + }, + { + "kind": "func", + "name": "loadPaymentApp", + "signature": "func (_q *BillingProfileQuery) loadPaymentApp(ctx context.Context, query *AppQuery, nodes []*BillingProfile, init func(*BillingProfile), assign func(*BillingProfile, *App)) error", + "line": 779 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingProfileQuery) sqlCount(ctx context.Context) (int, error)", + "line": 809 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingProfileQuery) querySpec() *sqlgraph.QuerySpec", + "line": 821 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingProfileQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 873 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingProfileQuery) ForUpdate(opts ...sql.LockOption) *BillingProfileQuery", + "line": 911 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingProfileQuery) ForShare(opts ...sql.LockOption) *BillingProfileQuery", + "line": 924 + }, + { + "kind": "struct", + "name": "BillingProfileGroupBy", + "signature": "type BillingProfileGroupBy struct", + "line": 935 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingProfileGroupBy) Aggregate(fns ...AggregateFunc) *BillingProfileGroupBy", + "line": 941 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingProfileGroupBy) Scan(ctx context.Context, v any) error", + "line": 947 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingProfileGroupBy) sqlScan(ctx context.Context, root *BillingProfileQuery, v any) error", + "line": 955 + }, + { + "kind": "struct", + "name": "BillingProfileSelect", + "signature": "type BillingProfileSelect struct", + "line": 983 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingProfileSelect) Aggregate(fns ...AggregateFunc) *BillingProfileSelect", + "line": 989 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingProfileSelect) Scan(ctx context.Context, v any) error", + "line": 995 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingProfileSelect) sqlScan(ctx context.Context, root *BillingProfileQuery, v any) error", + "line": 1003 + } + ], + "line_count": 1022 + }, + "openmeter/ent/db/billingprofile_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfileUpdate", + "signature": "type BillingProfileUpdate struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingProfileUpdate) Where(ps ...predicate.BillingProfile) *BillingProfileUpdate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingProfileUpdate) SetMetadata(v map[string]string) *BillingProfileUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingProfileUpdate) ClearMetadata() *BillingProfileUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingProfileUpdate) SetUpdatedAt(v time.Time) *BillingProfileUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingProfileUpdate) SetDeletedAt(v time.Time) *BillingProfileUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingProfileUpdate) SetNillableDeletedAt(v *time.Time) *BillingProfileUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingProfileUpdate) ClearDeletedAt() *BillingProfileUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingProfileUpdate) SetName(v string) *BillingProfileUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingProfileUpdate) SetNillableName(v *string) *BillingProfileUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingProfileUpdate) SetDescription(v string) *BillingProfileUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingProfileUpdate) SetNillableDescription(v *string) *BillingProfileUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingProfileUpdate) ClearDescription() *BillingProfileUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingProfileUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressCountry() *BillingProfileUpdate", + "line": 122 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressPostalCode(v string) *BillingProfileUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressPostalCode(v *string) *BillingProfileUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressPostalCode() *BillingProfileUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressState(v string) *BillingProfileUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressState(v *string) *BillingProfileUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressState() *BillingProfileUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressCity(v string) *BillingProfileUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressCity(v *string) *BillingProfileUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressCity() *BillingProfileUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressLine1(v string) *BillingProfileUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressLine1(v *string) *BillingProfileUpdate", + "line": 194 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressLine1() *BillingProfileUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressLine2(v string) *BillingProfileUpdate", + "line": 208 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressLine2(v *string) *BillingProfileUpdate", + "line": 214 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressLine2() *BillingProfileUpdate", + "line": 222 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdate) SetSupplierAddressPhoneNumber(v string) *BillingProfileUpdate", + "line": 228 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierAddressPhoneNumber(v *string) *BillingProfileUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierAddressPhoneNumber() *BillingProfileUpdate", + "line": 242 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_u *BillingProfileUpdate) SetWorkflowConfigID(v string) *BillingProfileUpdate", + "line": 248 + }, + { + "kind": "func", + "name": "SetNillableWorkflowConfigID", + "signature": "func (_u *BillingProfileUpdate) SetNillableWorkflowConfigID(v *string) *BillingProfileUpdate", + "line": 254 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (_u *BillingProfileUpdate) SetDefault(v bool) *BillingProfileUpdate", + "line": 262 + }, + { + "kind": "func", + "name": "SetNillableDefault", + "signature": "func (_u *BillingProfileUpdate) SetNillableDefault(v *bool) *BillingProfileUpdate", + "line": 268 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_u *BillingProfileUpdate) SetSupplierName(v string) *BillingProfileUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableSupplierName", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierName(v *string) *BillingProfileUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdate) SetSupplierTaxCode(v string) *BillingProfileUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdate) SetNillableSupplierTaxCode(v *string) *BillingProfileUpdate", + "line": 296 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdate) ClearSupplierTaxCode() *BillingProfileUpdate", + "line": 304 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_u *BillingProfileUpdate) AddBillingInvoiceIDs(ids ...string) *BillingProfileUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "AddBillingInvoices", + "signature": "func (_u *BillingProfileUpdate) AddBillingInvoices(v ...*BillingInvoice) *BillingProfileUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_u *BillingProfileUpdate) AddBillingCustomerOverrideIDs(ids ...string) *BillingProfileUpdate", + "line": 325 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdate) AddBillingCustomerOverride(v ...*BillingCustomerOverride) *BillingProfileUpdate", + "line": 331 + }, + { + "kind": "func", + "name": "SetWorkflowConfig", + "signature": "func (_u *BillingProfileUpdate) SetWorkflowConfig(v *BillingWorkflowConfig) *BillingProfileUpdate", + "line": 340 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingProfileUpdate) Mutation() *BillingProfileMutation", + "line": 345 + }, + { + "kind": "func", + "name": "ClearBillingInvoices", + "signature": "func (_u *BillingProfileUpdate) ClearBillingInvoices() *BillingProfileUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceIDs", + "signature": "func (_u *BillingProfileUpdate) RemoveBillingInvoiceIDs(ids ...string) *BillingProfileUpdate", + "line": 356 + }, + { + "kind": "func", + "name": "RemoveBillingInvoices", + "signature": "func (_u *BillingProfileUpdate) RemoveBillingInvoices(v ...*BillingInvoice) *BillingProfileUpdate", + "line": 362 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdate) ClearBillingCustomerOverride() *BillingProfileUpdate", + "line": 371 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrideIDs", + "signature": "func (_u *BillingProfileUpdate) RemoveBillingCustomerOverrideIDs(ids ...string) *BillingProfileUpdate", + "line": 377 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdate) RemoveBillingCustomerOverride(v ...*BillingCustomerOverride) *BillingProfileUpdate", + "line": 383 + }, + { + "kind": "func", + "name": "ClearWorkflowConfig", + "signature": "func (_u *BillingProfileUpdate) ClearWorkflowConfig() *BillingProfileUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingProfileUpdate) Save(ctx context.Context) (int, error)", + "line": 398 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingProfileUpdate) SaveX(ctx context.Context) int", + "line": 404 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingProfileUpdate) Exec(ctx context.Context) error", + "line": 413 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingProfileUpdate) ExecX(ctx context.Context)", + "line": 419 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingProfileUpdate) defaults()", + "line": 426 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingProfileUpdate) check() error", + "line": 434 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingProfileUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 465 + }, + { + "kind": "struct", + "name": "BillingProfileUpdateOne", + "signature": "type BillingProfileUpdateOne struct", + "line": 687 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingProfileUpdateOne) SetMetadata(v map[string]string) *BillingProfileUpdateOne", + "line": 695 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingProfileUpdateOne) ClearMetadata() *BillingProfileUpdateOne", + "line": 701 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingProfileUpdateOne) SetUpdatedAt(v time.Time) *BillingProfileUpdateOne", + "line": 707 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingProfileUpdateOne) SetDeletedAt(v time.Time) *BillingProfileUpdateOne", + "line": 713 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingProfileUpdateOne", + "line": 719 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingProfileUpdateOne) ClearDeletedAt() *BillingProfileUpdateOne", + "line": 727 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingProfileUpdateOne) SetName(v string) *BillingProfileUpdateOne", + "line": 733 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableName(v *string) *BillingProfileUpdateOne", + "line": 739 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingProfileUpdateOne) SetDescription(v string) *BillingProfileUpdateOne", + "line": 747 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableDescription(v *string) *BillingProfileUpdateOne", + "line": 753 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingProfileUpdateOne) ClearDescription() *BillingProfileUpdateOne", + "line": 761 + }, + { + "kind": "func", + "name": "SetSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressCountry(v models.CountryCode) *BillingProfileUpdateOne", + "line": 767 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressCountry(v *models.CountryCode) *BillingProfileUpdateOne", + "line": 773 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCountry", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressCountry() *BillingProfileUpdateOne", + "line": 781 + }, + { + "kind": "func", + "name": "SetSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressPostalCode(v string) *BillingProfileUpdateOne", + "line": 787 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressPostalCode(v *string) *BillingProfileUpdateOne", + "line": 793 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPostalCode", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressPostalCode() *BillingProfileUpdateOne", + "line": 801 + }, + { + "kind": "func", + "name": "SetSupplierAddressState", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressState(v string) *BillingProfileUpdateOne", + "line": 807 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressState", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressState(v *string) *BillingProfileUpdateOne", + "line": 813 + }, + { + "kind": "func", + "name": "ClearSupplierAddressState", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressState() *BillingProfileUpdateOne", + "line": 821 + }, + { + "kind": "func", + "name": "SetSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressCity(v string) *BillingProfileUpdateOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressCity(v *string) *BillingProfileUpdateOne", + "line": 833 + }, + { + "kind": "func", + "name": "ClearSupplierAddressCity", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressCity() *BillingProfileUpdateOne", + "line": 841 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressLine1(v string) *BillingProfileUpdateOne", + "line": 847 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressLine1(v *string) *BillingProfileUpdateOne", + "line": 853 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine1", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressLine1() *BillingProfileUpdateOne", + "line": 861 + }, + { + "kind": "func", + "name": "SetSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressLine2(v string) *BillingProfileUpdateOne", + "line": 867 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressLine2(v *string) *BillingProfileUpdateOne", + "line": 873 + }, + { + "kind": "func", + "name": "ClearSupplierAddressLine2", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressLine2() *BillingProfileUpdateOne", + "line": 881 + }, + { + "kind": "func", + "name": "SetSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierAddressPhoneNumber(v string) *BillingProfileUpdateOne", + "line": 887 + }, + { + "kind": "func", + "name": "SetNillableSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierAddressPhoneNumber(v *string) *BillingProfileUpdateOne", + "line": 893 + }, + { + "kind": "func", + "name": "ClearSupplierAddressPhoneNumber", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierAddressPhoneNumber() *BillingProfileUpdateOne", + "line": 901 + }, + { + "kind": "func", + "name": "SetWorkflowConfigID", + "signature": "func (_u *BillingProfileUpdateOne) SetWorkflowConfigID(v string) *BillingProfileUpdateOne", + "line": 907 + }, + { + "kind": "func", + "name": "SetNillableWorkflowConfigID", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableWorkflowConfigID(v *string) *BillingProfileUpdateOne", + "line": 913 + }, + { + "kind": "func", + "name": "SetDefault", + "signature": "func (_u *BillingProfileUpdateOne) SetDefault(v bool) *BillingProfileUpdateOne", + "line": 921 + }, + { + "kind": "func", + "name": "SetNillableDefault", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableDefault(v *bool) *BillingProfileUpdateOne", + "line": 927 + }, + { + "kind": "func", + "name": "SetSupplierName", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierName(v string) *BillingProfileUpdateOne", + "line": 935 + }, + { + "kind": "func", + "name": "SetNillableSupplierName", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierName(v *string) *BillingProfileUpdateOne", + "line": 941 + }, + { + "kind": "func", + "name": "SetSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdateOne) SetSupplierTaxCode(v string) *BillingProfileUpdateOne", + "line": 949 + }, + { + "kind": "func", + "name": "SetNillableSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdateOne) SetNillableSupplierTaxCode(v *string) *BillingProfileUpdateOne", + "line": 955 + }, + { + "kind": "func", + "name": "ClearSupplierTaxCode", + "signature": "func (_u *BillingProfileUpdateOne) ClearSupplierTaxCode() *BillingProfileUpdateOne", + "line": 963 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_u *BillingProfileUpdateOne) AddBillingInvoiceIDs(ids ...string) *BillingProfileUpdateOne", + "line": 969 + }, + { + "kind": "func", + "name": "AddBillingInvoices", + "signature": "func (_u *BillingProfileUpdateOne) AddBillingInvoices(v ...*BillingInvoice) *BillingProfileUpdateOne", + "line": 975 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_u *BillingProfileUpdateOne) AddBillingCustomerOverrideIDs(ids ...string) *BillingProfileUpdateOne", + "line": 984 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdateOne) AddBillingCustomerOverride(v ...*BillingCustomerOverride) *BillingProfileUpdateOne", + "line": 990 + }, + { + "kind": "func", + "name": "SetWorkflowConfig", + "signature": "func (_u *BillingProfileUpdateOne) SetWorkflowConfig(v *BillingWorkflowConfig) *BillingProfileUpdateOne", + "line": 999 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingProfileUpdateOne) Mutation() *BillingProfileMutation", + "line": 1004 + }, + { + "kind": "func", + "name": "ClearBillingInvoices", + "signature": "func (_u *BillingProfileUpdateOne) ClearBillingInvoices() *BillingProfileUpdateOne", + "line": 1009 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceIDs", + "signature": "func (_u *BillingProfileUpdateOne) RemoveBillingInvoiceIDs(ids ...string) *BillingProfileUpdateOne", + "line": 1015 + }, + { + "kind": "func", + "name": "RemoveBillingInvoices", + "signature": "func (_u *BillingProfileUpdateOne) RemoveBillingInvoices(v ...*BillingInvoice) *BillingProfileUpdateOne", + "line": 1021 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdateOne) ClearBillingCustomerOverride() *BillingProfileUpdateOne", + "line": 1030 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrideIDs", + "signature": "func (_u *BillingProfileUpdateOne) RemoveBillingCustomerOverrideIDs(ids ...string) *BillingProfileUpdateOne", + "line": 1036 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverride", + "signature": "func (_u *BillingProfileUpdateOne) RemoveBillingCustomerOverride(v ...*BillingCustomerOverride) *BillingProfileUpdateOne", + "line": 1042 + }, + { + "kind": "func", + "name": "ClearWorkflowConfig", + "signature": "func (_u *BillingProfileUpdateOne) ClearWorkflowConfig() *BillingProfileUpdateOne", + "line": 1051 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingProfileUpdateOne) Where(ps ...predicate.BillingProfile) *BillingProfileUpdateOne", + "line": 1057 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingProfileUpdateOne) Select(field string, fields ...string) *BillingProfileUpdateOne", + "line": 1064 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingProfileUpdateOne) Save(ctx context.Context) (*BillingProfile, error)", + "line": 1070 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingProfileUpdateOne) SaveX(ctx context.Context) *BillingProfile", + "line": 1076 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingProfileUpdateOne) Exec(ctx context.Context) error", + "line": 1085 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingProfileUpdateOne) ExecX(ctx context.Context)", + "line": 1091 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingProfileUpdateOne) defaults()", + "line": 1098 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingProfileUpdateOne) check() error", + "line": 1106 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingProfileUpdateOne) sqlSave(ctx context.Context) (_node *BillingProfile, err error)", + "line": 1137 + } + ], + "line_count": 1376 + }, + "openmeter/ent/db/billingsequencenumbers.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingSequenceNumbers", + "signature": "type BillingSequenceNumbers struct", + "line": 16 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingSequenceNumbers) assignValues(columns []string, values []any) error", + "line": 49 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingSequenceNumbers) Value(name string) (ent.Value, error)", + "line": 88 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingSequenceNumbers) Update() *BillingSequenceNumbersUpdateOne", + "line": 95 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingSequenceNumbers) Unwrap() *BillingSequenceNumbers", + "line": 101 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingSequenceNumbers) String() string", + "line": 111 + } + ], + "line_count": 128 + }, + "openmeter/ent/db/billingsequencenumbers/billingsequencenumbers.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\nconst (", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 33 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 51 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 56 + }, + { + "kind": "func", + "name": "ByScope", + "signature": "func ByScope(opts ...sql.OrderTermOption) OrderOption", + "line": 61 + }, + { + "kind": "func", + "name": "ByLast", + "signature": "func ByLast(opts ...sql.OrderTermOption) OrderOption", + "line": 66 + } + ], + "line_count": 68 + }, + "openmeter/ent/db/billingsequencenumbers/where.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.BillingSequenceNumbers", + "line": 12 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.BillingSequenceNumbers", + "line": 17 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.BillingSequenceNumbers", + "line": 22 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.BillingSequenceNumbers", + "line": 27 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.BillingSequenceNumbers", + "line": 32 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.BillingSequenceNumbers", + "line": 37 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.BillingSequenceNumbers", + "line": 42 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.BillingSequenceNumbers", + "line": 47 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.BillingSequenceNumbers", + "line": 52 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingSequenceNumbers", + "line": 57 + }, + { + "kind": "func", + "name": "Scope", + "signature": "func Scope(v string) predicate.BillingSequenceNumbers", + "line": 62 + }, + { + "kind": "func", + "name": "Last", + "signature": "func Last(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 67 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingSequenceNumbers", + "line": 72 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingSequenceNumbers", + "line": 77 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingSequenceNumbers", + "line": 82 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingSequenceNumbers", + "line": 87 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingSequenceNumbers", + "line": 92 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingSequenceNumbers", + "line": 97 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingSequenceNumbers", + "line": 102 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingSequenceNumbers", + "line": 107 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingSequenceNumbers", + "line": 112 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingSequenceNumbers", + "line": 117 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingSequenceNumbers", + "line": 122 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingSequenceNumbers", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingSequenceNumbers", + "line": 132 + }, + { + "kind": "func", + "name": "ScopeEQ", + "signature": "func ScopeEQ(v string) predicate.BillingSequenceNumbers", + "line": 137 + }, + { + "kind": "func", + "name": "ScopeNEQ", + "signature": "func ScopeNEQ(v string) predicate.BillingSequenceNumbers", + "line": 142 + }, + { + "kind": "func", + "name": "ScopeIn", + "signature": "func ScopeIn(vs ...string) predicate.BillingSequenceNumbers", + "line": 147 + }, + { + "kind": "func", + "name": "ScopeNotIn", + "signature": "func ScopeNotIn(vs ...string) predicate.BillingSequenceNumbers", + "line": 152 + }, + { + "kind": "func", + "name": "ScopeGT", + "signature": "func ScopeGT(v string) predicate.BillingSequenceNumbers", + "line": 157 + }, + { + "kind": "func", + "name": "ScopeGTE", + "signature": "func ScopeGTE(v string) predicate.BillingSequenceNumbers", + "line": 162 + }, + { + "kind": "func", + "name": "ScopeLT", + "signature": "func ScopeLT(v string) predicate.BillingSequenceNumbers", + "line": 167 + }, + { + "kind": "func", + "name": "ScopeLTE", + "signature": "func ScopeLTE(v string) predicate.BillingSequenceNumbers", + "line": 172 + }, + { + "kind": "func", + "name": "ScopeContains", + "signature": "func ScopeContains(v string) predicate.BillingSequenceNumbers", + "line": 177 + }, + { + "kind": "func", + "name": "ScopeHasPrefix", + "signature": "func ScopeHasPrefix(v string) predicate.BillingSequenceNumbers", + "line": 182 + }, + { + "kind": "func", + "name": "ScopeHasSuffix", + "signature": "func ScopeHasSuffix(v string) predicate.BillingSequenceNumbers", + "line": 187 + }, + { + "kind": "func", + "name": "ScopeEqualFold", + "signature": "func ScopeEqualFold(v string) predicate.BillingSequenceNumbers", + "line": 192 + }, + { + "kind": "func", + "name": "ScopeContainsFold", + "signature": "func ScopeContainsFold(v string) predicate.BillingSequenceNumbers", + "line": 197 + }, + { + "kind": "func", + "name": "LastEQ", + "signature": "func LastEQ(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 202 + }, + { + "kind": "func", + "name": "LastNEQ", + "signature": "func LastNEQ(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 207 + }, + { + "kind": "func", + "name": "LastIn", + "signature": "func LastIn(vs ...alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 212 + }, + { + "kind": "func", + "name": "LastNotIn", + "signature": "func LastNotIn(vs ...alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 217 + }, + { + "kind": "func", + "name": "LastGT", + "signature": "func LastGT(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 222 + }, + { + "kind": "func", + "name": "LastGTE", + "signature": "func LastGTE(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 227 + }, + { + "kind": "func", + "name": "LastLT", + "signature": "func LastLT(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 232 + }, + { + "kind": "func", + "name": "LastLTE", + "signature": "func LastLTE(v alpacadecimal.Decimal) predicate.BillingSequenceNumbers", + "line": 237 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingSequenceNumbers) predicate.BillingSequenceNumbers", + "line": 242 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingSequenceNumbers) predicate.BillingSequenceNumbers", + "line": 247 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingSequenceNumbers) predicate.BillingSequenceNumbers", + "line": 252 + } + ], + "line_count": 254 + }, + "openmeter/ent/db/billingsequencenumbers_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingSequenceNumbersCreate", + "signature": "type BillingSequenceNumbersCreate struct", + "line": 18 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingSequenceNumbersCreate) SetNamespace(v string) *BillingSequenceNumbersCreate", + "line": 26 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (_c *BillingSequenceNumbersCreate) SetScope(v string) *BillingSequenceNumbersCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (_c *BillingSequenceNumbersCreate) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersCreate", + "line": 38 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingSequenceNumbersCreate) Mutation() *BillingSequenceNumbersMutation", + "line": 44 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingSequenceNumbersCreate) Save(ctx context.Context) (*BillingSequenceNumbers, error)", + "line": 49 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingSequenceNumbersCreate) SaveX(ctx context.Context) *BillingSequenceNumbers", + "line": 54 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingSequenceNumbersCreate) Exec(ctx context.Context) error", + "line": 63 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingSequenceNumbersCreate) ExecX(ctx context.Context)", + "line": 69 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingSequenceNumbersCreate) check() error", + "line": 76 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingSequenceNumbersCreate) sqlSave(ctx context.Context) (*BillingSequenceNumbers, error)", + "line": 94 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingSequenceNumbersCreate) createSpec() (*BillingSequenceNumbers, *sqlgraph.CreateSpec)", + "line": 112 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingSequenceNumbersCreate) OnConflict(opts ...sql.ConflictOption) *BillingSequenceNumbersUpsertOne", + "line": 149 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingSequenceNumbersCreate) OnConflictColumns(columns ...string) *BillingSequenceNumbersUpsertOne", + "line": 162 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (u *BillingSequenceNumbersUpsert) SetScope(v string) *BillingSequenceNumbersUpsert", + "line": 183 + }, + { + "kind": "func", + "name": "UpdateScope", + "signature": "func (u *BillingSequenceNumbersUpsert) UpdateScope() *BillingSequenceNumbersUpsert", + "line": 189 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (u *BillingSequenceNumbersUpsert) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersUpsert", + "line": 195 + }, + { + "kind": "func", + "name": "UpdateLast", + "signature": "func (u *BillingSequenceNumbersUpsert) UpdateLast() *BillingSequenceNumbersUpsert", + "line": 201 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingSequenceNumbersUpsertOne) UpdateNewValues() *BillingSequenceNumbersUpsertOne", + "line": 214 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingSequenceNumbersUpsertOne) Ignore() *BillingSequenceNumbersUpsertOne", + "line": 230 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingSequenceNumbersUpsertOne) DoNothing() *BillingSequenceNumbersUpsertOne", + "line": 237 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingSequenceNumbersUpsertOne) Update(set func(*BillingSequenceNumbersUpsert)) *BillingSequenceNumbersUpsertOne", + "line": 244 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (u *BillingSequenceNumbersUpsertOne) SetScope(v string) *BillingSequenceNumbersUpsertOne", + "line": 252 + }, + { + "kind": "func", + "name": "UpdateScope", + "signature": "func (u *BillingSequenceNumbersUpsertOne) UpdateScope() *BillingSequenceNumbersUpsertOne", + "line": 259 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (u *BillingSequenceNumbersUpsertOne) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersUpsertOne", + "line": 266 + }, + { + "kind": "func", + "name": "UpdateLast", + "signature": "func (u *BillingSequenceNumbersUpsertOne) UpdateLast() *BillingSequenceNumbersUpsertOne", + "line": 273 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingSequenceNumbersUpsertOne) Exec(ctx context.Context) error", + "line": 280 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingSequenceNumbersUpsertOne) ExecX(ctx context.Context)", + "line": 288 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingSequenceNumbersUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 295 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingSequenceNumbersUpsertOne) IDX(ctx context.Context) int", + "line": 304 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersCreateBulk", + "signature": "type BillingSequenceNumbersCreateBulk struct", + "line": 313 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) Save(ctx context.Context) ([]*BillingSequenceNumbers, error)", + "line": 321 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) SaveX(ctx context.Context) []*BillingSequenceNumbers", + "line": 380 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) Exec(ctx context.Context) error", + "line": 389 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) ExecX(ctx context.Context)", + "line": 395 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingSequenceNumbersUpsertBulk", + "line": 416 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingSequenceNumbersCreateBulk) OnConflictColumns(columns ...string) *BillingSequenceNumbersUpsertBulk", + "line": 429 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersUpsertBulk", + "signature": "type BillingSequenceNumbersUpsertBulk struct", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) UpdateNewValues() *BillingSequenceNumbersUpsertBulk", + "line": 450 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) Ignore() *BillingSequenceNumbersUpsertBulk", + "line": 468 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) DoNothing() *BillingSequenceNumbersUpsertBulk", + "line": 475 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) Update(set func(*BillingSequenceNumbersUpsert)) *BillingSequenceNumbersUpsertBulk", + "line": 482 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) SetScope(v string) *BillingSequenceNumbersUpsertBulk", + "line": 490 + }, + { + "kind": "func", + "name": "UpdateScope", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) UpdateScope() *BillingSequenceNumbersUpsertBulk", + "line": 497 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersUpsertBulk", + "line": 504 + }, + { + "kind": "func", + "name": "UpdateLast", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) UpdateLast() *BillingSequenceNumbersUpsertBulk", + "line": 511 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) Exec(ctx context.Context) error", + "line": 518 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingSequenceNumbersUpsertBulk) ExecX(ctx context.Context)", + "line": 534 + } + ], + "line_count": 538 + }, + "openmeter/ent/db/billingsequencenumbers_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingSequenceNumbersDelete", + "signature": "type BillingSequenceNumbersDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingSequenceNumbersDelete) Where(ps ...predicate.BillingSequenceNumbers) *BillingSequenceNumbersDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingSequenceNumbersDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingSequenceNumbersDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingSequenceNumbersDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersDeleteOne", + "signature": "type BillingSequenceNumbersDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingSequenceNumbersDeleteOne) Where(ps ...predicate.BillingSequenceNumbers) *BillingSequenceNumbersDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingSequenceNumbersDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingSequenceNumbersDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingsequencenumbers_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingSequenceNumbersQuery", + "signature": "type BillingSequenceNumbersQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingSequenceNumbersQuery) Where(ps ...predicate.BillingSequenceNumbers) *BillingSequenceNumbersQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingSequenceNumbersQuery) Limit(limit int) *BillingSequenceNumbersQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingSequenceNumbersQuery) Offset(offset int) *BillingSequenceNumbersQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingSequenceNumbersQuery) Unique(unique bool) *BillingSequenceNumbersQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingSequenceNumbersQuery) Order(o ...billingsequencenumbers.OrderOption) *BillingSequenceNumbersQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingSequenceNumbersQuery) First(ctx context.Context) (*BillingSequenceNumbers, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingSequenceNumbersQuery) FirstX(ctx context.Context) *BillingSequenceNumbers", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingSequenceNumbersQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingSequenceNumbersQuery) FirstIDX(ctx context.Context) int", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingSequenceNumbersQuery) Only(ctx context.Context) (*BillingSequenceNumbers, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingSequenceNumbersQuery) OnlyX(ctx context.Context) *BillingSequenceNumbers", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingSequenceNumbersQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingSequenceNumbersQuery) OnlyIDX(ctx context.Context) int", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingSequenceNumbersQuery) All(ctx context.Context) ([]*BillingSequenceNumbers, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingSequenceNumbersQuery) AllX(ctx context.Context) []*BillingSequenceNumbers", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingSequenceNumbersQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingSequenceNumbersQuery) IDsX(ctx context.Context) []int", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingSequenceNumbersQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingSequenceNumbersQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingSequenceNumbersQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingSequenceNumbersQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingSequenceNumbersQuery) Clone() *BillingSequenceNumbersQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingSequenceNumbersQuery) GroupBy(field string, fields ...string) *BillingSequenceNumbersGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingSequenceNumbersQuery) Select(fields ...string) *BillingSequenceNumbersSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingSequenceNumbersQuery) Aggregate(fns ...AggregateFunc) *BillingSequenceNumbersSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingSequenceNumbersQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingSequenceNumbersQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingSequenceNumbers, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingSequenceNumbersQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingSequenceNumbersQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingSequenceNumbersQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingSequenceNumbersQuery) ForUpdate(opts ...sql.LockOption) *BillingSequenceNumbersQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingSequenceNumbersQuery) ForShare(opts ...sql.LockOption) *BillingSequenceNumbersQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersGroupBy", + "signature": "type BillingSequenceNumbersGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingSequenceNumbersGroupBy) Aggregate(fns ...AggregateFunc) *BillingSequenceNumbersGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingSequenceNumbersGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingSequenceNumbersGroupBy) sqlScan(ctx context.Context, root *BillingSequenceNumbersQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersSelect", + "signature": "type BillingSequenceNumbersSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingSequenceNumbersSelect) Aggregate(fns ...AggregateFunc) *BillingSequenceNumbersSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingSequenceNumbersSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingSequenceNumbersSelect) sqlScan(ctx context.Context, root *BillingSequenceNumbersQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/billingsequencenumbers_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingSequenceNumbersUpdate", + "signature": "type BillingSequenceNumbersUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingSequenceNumbersUpdate) Where(ps ...predicate.BillingSequenceNumbers) *BillingSequenceNumbersUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (_u *BillingSequenceNumbersUpdate) SetScope(v string) *BillingSequenceNumbersUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetNillableScope", + "signature": "func (_u *BillingSequenceNumbersUpdate) SetNillableScope(v *string) *BillingSequenceNumbersUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (_u *BillingSequenceNumbersUpdate) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetNillableLast", + "signature": "func (_u *BillingSequenceNumbersUpdate) SetNillableLast(v *alpacadecimal.Decimal) *BillingSequenceNumbersUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingSequenceNumbersUpdate) Mutation() *BillingSequenceNumbersMutation", + "line": 60 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingSequenceNumbersUpdate) Save(ctx context.Context) (int, error)", + "line": 65 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingSequenceNumbersUpdate) SaveX(ctx context.Context) int", + "line": 70 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingSequenceNumbersUpdate) Exec(ctx context.Context) error", + "line": 79 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingSequenceNumbersUpdate) ExecX(ctx context.Context)", + "line": 85 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingSequenceNumbersUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 91 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbersUpdateOne", + "signature": "type BillingSequenceNumbersUpdateOne struct", + "line": 119 + }, + { + "kind": "func", + "name": "SetScope", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) SetScope(v string) *BillingSequenceNumbersUpdateOne", + "line": 127 + }, + { + "kind": "func", + "name": "SetNillableScope", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) SetNillableScope(v *string) *BillingSequenceNumbersUpdateOne", + "line": 133 + }, + { + "kind": "func", + "name": "SetLast", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) SetLast(v alpacadecimal.Decimal) *BillingSequenceNumbersUpdateOne", + "line": 141 + }, + { + "kind": "func", + "name": "SetNillableLast", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) SetNillableLast(v *alpacadecimal.Decimal) *BillingSequenceNumbersUpdateOne", + "line": 147 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) Mutation() *BillingSequenceNumbersMutation", + "line": 155 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) Where(ps ...predicate.BillingSequenceNumbers) *BillingSequenceNumbersUpdateOne", + "line": 160 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) Select(field string, fields ...string) *BillingSequenceNumbersUpdateOne", + "line": 167 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) Save(ctx context.Context) (*BillingSequenceNumbers, error)", + "line": 173 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) SaveX(ctx context.Context) *BillingSequenceNumbers", + "line": 178 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) Exec(ctx context.Context) error", + "line": 187 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) ExecX(ctx context.Context)", + "line": 193 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingSequenceNumbersUpdateOne) sqlSave(ctx context.Context) (_node *BillingSequenceNumbers, err error)", + "line": 199 + } + ], + "line_count": 244 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLine", + "signature": "type BillingStandardInvoiceDetailedLine struct", + "line": 26 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineEdges", + "signature": "type BillingStandardInvoiceDetailedLineEdges struct", + "line": 107 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e BillingStandardInvoiceDetailedLineEdges) BillingInvoiceOrErr() (*BillingInvoice, error)", + "line": 123 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e BillingStandardInvoiceDetailedLineEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 134 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e BillingStandardInvoiceDetailedLineEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 145 + }, + { + "kind": "func", + "name": "AmountDiscountsOrErr", + "signature": "func (e BillingStandardInvoiceDetailedLineEdges) AmountDiscountsOrErr() ([]*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 156 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) assignValues(columns []string, values []any) error", + "line": 187 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) Value(name string) (ent.Value, error)", + "line": 414 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 419 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 424 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) QueryTaxCode() *TaxCodeQuery", + "line": 429 + }, + { + "kind": "func", + "name": "QueryAmountDiscounts", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) QueryAmountDiscounts() *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 434 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) Update() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) Unwrap() *BillingStandardInvoiceDetailedLine", + "line": 447 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingStandardInvoiceDetailedLine) String() string", + "line": 457 + } + ], + "line_count": 573 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline/billingstandardinvoicedetailedline.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 159 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 191 + }, + { + "kind": "func", + "name": "CategoryValidator", + "signature": "func CategoryValidator(c stddetailedline.Category) error", + "line": 203 + }, + { + "kind": "func", + "name": "PaymentTermValidator", + "signature": "func PaymentTermValidator(pt productcatalog.PaymentTermType) error", + "line": 215 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByServicePeriodStart", + "signature": "func ByServicePeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByServicePeriodEnd", + "signature": "func ByServicePeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "ByPerUnitAmount", + "signature": "func ByPerUnitAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByCategory", + "signature": "func ByCategory(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByPaymentTerm", + "signature": "func ByPaymentTerm(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByIndex", + "signature": "func ByIndex(opts ...sql.OrderTermOption) OrderOption", + "line": 288 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 293 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 298 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 303 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 308 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 313 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 318 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 323 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 328 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 333 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 338 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 343 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 348 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 353 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 358 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 363 + }, + { + "kind": "func", + "name": "ByParentLineID", + "signature": "func ByParentLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 368 + }, + { + "kind": "func", + "name": "ByBillingInvoiceField", + "signature": "func ByBillingInvoiceField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 373 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 380 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 387 + }, + { + "kind": "func", + "name": "ByAmountDiscountsCount", + "signature": "func ByAmountDiscountsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "ByAmountDiscounts", + "signature": "func ByAmountDiscounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 401 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 406 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 413 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 420 + }, + { + "kind": "func", + "name": "newAmountDiscountsStep", + "signature": "func newAmountDiscountsStep() *sqlgraph.Step", + "line": 427 + } + ], + "line_count": 433 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 18 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 23 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 28 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 33 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 38 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 43 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 48 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 53 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 58 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 63 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingStandardInvoiceDetailedLine", + "line": 68 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 73 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 79 + }, + { + "kind": "func", + "name": "ServicePeriodStart", + "signature": "func ServicePeriodStart(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 84 + }, + { + "kind": "func", + "name": "ServicePeriodEnd", + "signature": "func ServicePeriodEnd(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 89 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 94 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 99 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 104 + }, + { + "kind": "func", + "name": "PerUnitAmount", + "signature": "func PerUnitAmount(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 109 + }, + { + "kind": "func", + "name": "Index", + "signature": "func Index(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 114 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 119 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 124 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 129 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 134 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 139 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 144 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 149 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 154 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 159 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 164 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 169 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 174 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 179 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 184 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 189 + }, + { + "kind": "func", + "name": "ParentLineID", + "signature": "func ParentLineID(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 194 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 199 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 205 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 211 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 220 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 229 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 235 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 241 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 247 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 253 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 259 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 265 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 271 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.BillingStandardInvoiceDetailedLine", + "line": 277 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 283 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 288 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 293 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 298 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 303 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 308 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 313 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 318 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 323 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 328 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 333 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 338 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 343 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 348 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 353 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 358 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 363 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.BillingStandardInvoiceDetailedLine", + "line": 368 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.BillingStandardInvoiceDetailedLine", + "line": 374 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.BillingStandardInvoiceDetailedLine", + "line": 380 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.BillingStandardInvoiceDetailedLine", + "line": 389 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 398 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 403 + }, + { + "kind": "func", + "name": "ServicePeriodStartEQ", + "signature": "func ServicePeriodStartEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 408 + }, + { + "kind": "func", + "name": "ServicePeriodStartNEQ", + "signature": "func ServicePeriodStartNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 413 + }, + { + "kind": "func", + "name": "ServicePeriodStartIn", + "signature": "func ServicePeriodStartIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 418 + }, + { + "kind": "func", + "name": "ServicePeriodStartNotIn", + "signature": "func ServicePeriodStartNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 423 + }, + { + "kind": "func", + "name": "ServicePeriodStartGT", + "signature": "func ServicePeriodStartGT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 428 + }, + { + "kind": "func", + "name": "ServicePeriodStartGTE", + "signature": "func ServicePeriodStartGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 433 + }, + { + "kind": "func", + "name": "ServicePeriodStartLT", + "signature": "func ServicePeriodStartLT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 438 + }, + { + "kind": "func", + "name": "ServicePeriodStartLTE", + "signature": "func ServicePeriodStartLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 443 + }, + { + "kind": "func", + "name": "ServicePeriodEndEQ", + "signature": "func ServicePeriodEndEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 448 + }, + { + "kind": "func", + "name": "ServicePeriodEndNEQ", + "signature": "func ServicePeriodEndNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 453 + }, + { + "kind": "func", + "name": "ServicePeriodEndIn", + "signature": "func ServicePeriodEndIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 458 + }, + { + "kind": "func", + "name": "ServicePeriodEndNotIn", + "signature": "func ServicePeriodEndNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 463 + }, + { + "kind": "func", + "name": "ServicePeriodEndGT", + "signature": "func ServicePeriodEndGT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 468 + }, + { + "kind": "func", + "name": "ServicePeriodEndGTE", + "signature": "func ServicePeriodEndGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 473 + }, + { + "kind": "func", + "name": "ServicePeriodEndLT", + "signature": "func ServicePeriodEndLT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 478 + }, + { + "kind": "func", + "name": "ServicePeriodEndLTE", + "signature": "func ServicePeriodEndLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 483 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 488 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 493 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 498 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 503 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 508 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 513 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 518 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 523 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 528 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 533 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 538 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 543 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 548 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 553 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 558 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 563 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 568 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 573 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 578 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 583 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 588 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 593 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 598 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 603 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 608 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 613 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 618 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 623 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 628 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 633 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 638 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 643 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 648 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 653 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 658 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 663 + }, + { + "kind": "func", + "name": "PerUnitAmountEQ", + "signature": "func PerUnitAmountEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 668 + }, + { + "kind": "func", + "name": "PerUnitAmountNEQ", + "signature": "func PerUnitAmountNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 673 + }, + { + "kind": "func", + "name": "PerUnitAmountIn", + "signature": "func PerUnitAmountIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 678 + }, + { + "kind": "func", + "name": "PerUnitAmountNotIn", + "signature": "func PerUnitAmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 683 + }, + { + "kind": "func", + "name": "PerUnitAmountGT", + "signature": "func PerUnitAmountGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 688 + }, + { + "kind": "func", + "name": "PerUnitAmountGTE", + "signature": "func PerUnitAmountGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 693 + }, + { + "kind": "func", + "name": "PerUnitAmountLT", + "signature": "func PerUnitAmountLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 698 + }, + { + "kind": "func", + "name": "PerUnitAmountLTE", + "signature": "func PerUnitAmountLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 703 + }, + { + "kind": "func", + "name": "CategoryEQ", + "signature": "func CategoryEQ(v stddetailedline.Category) predicate.BillingStandardInvoiceDetailedLine", + "line": 708 + }, + { + "kind": "func", + "name": "CategoryNEQ", + "signature": "func CategoryNEQ(v stddetailedline.Category) predicate.BillingStandardInvoiceDetailedLine", + "line": 714 + }, + { + "kind": "func", + "name": "CategoryIn", + "signature": "func CategoryIn(vs ...stddetailedline.Category) predicate.BillingStandardInvoiceDetailedLine", + "line": 720 + }, + { + "kind": "func", + "name": "CategoryNotIn", + "signature": "func CategoryNotIn(vs ...stddetailedline.Category) predicate.BillingStandardInvoiceDetailedLine", + "line": 729 + }, + { + "kind": "func", + "name": "PaymentTermEQ", + "signature": "func PaymentTermEQ(v productcatalog.PaymentTermType) predicate.BillingStandardInvoiceDetailedLine", + "line": 738 + }, + { + "kind": "func", + "name": "PaymentTermNEQ", + "signature": "func PaymentTermNEQ(v productcatalog.PaymentTermType) predicate.BillingStandardInvoiceDetailedLine", + "line": 744 + }, + { + "kind": "func", + "name": "PaymentTermIn", + "signature": "func PaymentTermIn(vs ...productcatalog.PaymentTermType) predicate.BillingStandardInvoiceDetailedLine", + "line": 750 + }, + { + "kind": "func", + "name": "PaymentTermNotIn", + "signature": "func PaymentTermNotIn(vs ...productcatalog.PaymentTermType) predicate.BillingStandardInvoiceDetailedLine", + "line": 759 + }, + { + "kind": "func", + "name": "IndexEQ", + "signature": "func IndexEQ(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 768 + }, + { + "kind": "func", + "name": "IndexNEQ", + "signature": "func IndexNEQ(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 773 + }, + { + "kind": "func", + "name": "IndexIn", + "signature": "func IndexIn(vs ...int) predicate.BillingStandardInvoiceDetailedLine", + "line": 778 + }, + { + "kind": "func", + "name": "IndexNotIn", + "signature": "func IndexNotIn(vs ...int) predicate.BillingStandardInvoiceDetailedLine", + "line": 783 + }, + { + "kind": "func", + "name": "IndexGT", + "signature": "func IndexGT(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 788 + }, + { + "kind": "func", + "name": "IndexGTE", + "signature": "func IndexGTE(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 793 + }, + { + "kind": "func", + "name": "IndexLT", + "signature": "func IndexLT(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 798 + }, + { + "kind": "func", + "name": "IndexLTE", + "signature": "func IndexLTE(v int) predicate.BillingStandardInvoiceDetailedLine", + "line": 803 + }, + { + "kind": "func", + "name": "IndexIsNil", + "signature": "func IndexIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 808 + }, + { + "kind": "func", + "name": "IndexNotNil", + "signature": "func IndexNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 813 + }, + { + "kind": "func", + "name": "CreditsAppliedIsNil", + "signature": "func CreditsAppliedIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 818 + }, + { + "kind": "func", + "name": "CreditsAppliedNotNil", + "signature": "func CreditsAppliedNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 823 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 828 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 833 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 838 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 843 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 848 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 853 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 858 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 863 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 868 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 873 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 878 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 883 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 888 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 893 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 898 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 903 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 908 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 913 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 918 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 923 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 928 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 933 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 938 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 943 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 948 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 953 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 958 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 963 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 968 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 973 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 978 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 983 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 988 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 993 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 998 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1003 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1008 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1013 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1018 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1023 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLine", + "line": 1028 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 1033 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 1038 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1043 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1048 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1053 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1058 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1063 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1068 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1073 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1078 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1083 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1088 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1093 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1098 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1103 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1108 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1113 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1118 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1123 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1128 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1133 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1138 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1143 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1148 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1153 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1158 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 1163 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingStandardInvoiceDetailedLine", + "line": 1168 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1173 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1178 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1183 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1188 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1193 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1198 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1203 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1208 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1213 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1218 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1223 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1228 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1233 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1238 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1243 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1248 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1253 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1258 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1263 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1268 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1273 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1278 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1283 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1288 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1293 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1298 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1303 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1308 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1313 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1318 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1323 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1328 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1333 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1338 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1343 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1348 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1353 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1358 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1363 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1368 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1373 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1378 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1383 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1388 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1393 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1398 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1403 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1408 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1413 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1418 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1423 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1428 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1433 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1438 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1443 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1448 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1453 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1458 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1463 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1468 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1473 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1478 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1483 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1488 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1493 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLine", + "line": 1498 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1503 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1508 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1513 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1518 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1523 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1528 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1533 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1538 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1543 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1548 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1553 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1558 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1563 + }, + { + "kind": "func", + "name": "ParentLineIDEQ", + "signature": "func ParentLineIDEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1568 + }, + { + "kind": "func", + "name": "ParentLineIDNEQ", + "signature": "func ParentLineIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1573 + }, + { + "kind": "func", + "name": "ParentLineIDIn", + "signature": "func ParentLineIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1578 + }, + { + "kind": "func", + "name": "ParentLineIDNotIn", + "signature": "func ParentLineIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1583 + }, + { + "kind": "func", + "name": "ParentLineIDGT", + "signature": "func ParentLineIDGT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1588 + }, + { + "kind": "func", + "name": "ParentLineIDGTE", + "signature": "func ParentLineIDGTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1593 + }, + { + "kind": "func", + "name": "ParentLineIDLT", + "signature": "func ParentLineIDLT(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1598 + }, + { + "kind": "func", + "name": "ParentLineIDLTE", + "signature": "func ParentLineIDLTE(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1603 + }, + { + "kind": "func", + "name": "ParentLineIDContains", + "signature": "func ParentLineIDContains(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1608 + }, + { + "kind": "func", + "name": "ParentLineIDHasPrefix", + "signature": "func ParentLineIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1613 + }, + { + "kind": "func", + "name": "ParentLineIDHasSuffix", + "signature": "func ParentLineIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1618 + }, + { + "kind": "func", + "name": "ParentLineIDEqualFold", + "signature": "func ParentLineIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1623 + }, + { + "kind": "func", + "name": "ParentLineIDContainsFold", + "signature": "func ParentLineIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLine", + "line": 1628 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.BillingStandardInvoiceDetailedLine", + "line": 1633 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.BillingStandardInvoiceDetailedLine", + "line": 1644 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.BillingStandardInvoiceDetailedLine", + "line": 1656 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.BillingStandardInvoiceDetailedLine", + "line": 1667 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.BillingStandardInvoiceDetailedLine", + "line": 1679 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.BillingStandardInvoiceDetailedLine", + "line": 1690 + }, + { + "kind": "func", + "name": "HasAmountDiscounts", + "signature": "func HasAmountDiscounts() predicate.BillingStandardInvoiceDetailedLine", + "line": 1702 + }, + { + "kind": "func", + "name": "HasAmountDiscountsWith", + "signature": "func HasAmountDiscountsWith(preds ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) predicate.BillingStandardInvoiceDetailedLine", + "line": 1713 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingStandardInvoiceDetailedLine) predicate.BillingStandardInvoiceDetailedLine", + "line": 1725 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingStandardInvoiceDetailedLine) predicate.BillingStandardInvoiceDetailedLine", + "line": 1730 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingStandardInvoiceDetailedLine) predicate.BillingStandardInvoiceDetailedLine", + "line": 1735 + } + ], + "line_count": 1737 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineCreate", + "signature": "type BillingStandardInvoiceDetailedLineCreate struct", + "line": 29 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetCurrency(v currencyx.Code) *BillingStandardInvoiceDetailedLineCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableTaxCodeID(v *string) *BillingStandardInvoiceDetailedLineCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableCategory(v *stddetailedline.Category) *BillingStandardInvoiceDetailedLineCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetIndex(v int) *BillingStandardInvoiceDetailedLineCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableIndex(v *int) *BillingStandardInvoiceDetailedLineCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineCreate", + "line": 171 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNamespace(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 183 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineCreate", + "line": 189 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetCreatedAt(v time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 195 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableCreatedAt(v *time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 201 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 209 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableUpdatedAt(v *time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 215 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 223 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineCreate", + "line": 229 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetName(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 237 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetDescription(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 243 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineCreate", + "line": 249 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 257 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 263 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 269 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 275 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 281 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 287 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 293 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineCreate", + "line": 299 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 305 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 311 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetID(v string) *BillingStandardInvoiceDetailedLineCreate", + "line": 317 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetNillableID(v *string) *BillingStandardInvoiceDetailedLineCreate", + "line": 323 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetBillingInvoiceID(id string) *BillingStandardInvoiceDetailedLineCreate", + "line": 331 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetBillingInvoice(v *BillingInvoice) *BillingStandardInvoiceDetailedLineCreate", + "line": 337 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetBillingInvoiceLineID(id string) *BillingStandardInvoiceDetailedLineCreate", + "line": 342 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingStandardInvoiceDetailedLineCreate", + "line": 348 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SetTaxCode(v *TaxCode) *BillingStandardInvoiceDetailedLineCreate", + "line": 353 + }, + { + "kind": "func", + "name": "AddAmountDiscountIDs", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) AddAmountDiscountIDs(ids ...string) *BillingStandardInvoiceDetailedLineCreate", + "line": 358 + }, + { + "kind": "func", + "name": "AddAmountDiscounts", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) AddAmountDiscounts(v ...*BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineCreate", + "line": 364 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) Mutation() *BillingStandardInvoiceDetailedLineMutation", + "line": 373 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) Save(ctx context.Context) (*BillingStandardInvoiceDetailedLine, error)", + "line": 378 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) SaveX(ctx context.Context) *BillingStandardInvoiceDetailedLine", + "line": 384 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) Exec(ctx context.Context) error", + "line": 393 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) ExecX(ctx context.Context)", + "line": 399 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) defaults()", + "line": 406 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) check() error", + "line": 430 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) sqlSave(ctx context.Context) (*BillingStandardInvoiceDetailedLine, error)", + "line": 546 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) createSpec() (*BillingStandardInvoiceDetailedLine, *sqlgraph.CreateSpec)", + "line": 569 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) OnConflict(opts ...sql.ConflictOption) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 781 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreate) OnConflictColumns(columns ...string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 794 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpsert", + "line": 815 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxConfig() *BillingStandardInvoiceDetailedLineUpsert", + "line": 821 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearTaxConfig() *BillingStandardInvoiceDetailedLineUpsert", + "line": 827 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 833 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxCodeID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 839 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearTaxCodeID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 845 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpsert", + "line": 851 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxBehavior() *BillingStandardInvoiceDetailedLineUpsert", + "line": 857 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearTaxBehavior() *BillingStandardInvoiceDetailedLineUpsert", + "line": 863 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineUpsert", + "line": 869 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateServicePeriodStart() *BillingStandardInvoiceDetailedLineUpsert", + "line": 875 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineUpsert", + "line": 881 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateServicePeriodEnd() *BillingStandardInvoiceDetailedLineUpsert", + "line": 887 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 893 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateQuantity() *BillingStandardInvoiceDetailedLineUpsert", + "line": 899 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 911 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 917 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 923 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 929 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 935 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdatePerUnitAmount() *BillingStandardInvoiceDetailedLineUpsert", + "line": 941 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpsert", + "line": 947 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateCategory() *BillingStandardInvoiceDetailedLineUpsert", + "line": 953 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpsert", + "line": 959 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdatePaymentTerm() *BillingStandardInvoiceDetailedLineUpsert", + "line": 965 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetIndex(v int) *BillingStandardInvoiceDetailedLineUpsert", + "line": 971 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateIndex() *BillingStandardInvoiceDetailedLineUpsert", + "line": 977 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) AddIndex(v int) *BillingStandardInvoiceDetailedLineUpsert", + "line": 983 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearIndex() *BillingStandardInvoiceDetailedLineUpsert", + "line": 989 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpsert", + "line": 995 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateCreditsApplied() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1001 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearCreditsApplied() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1007 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1013 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateAnnotations() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1019 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearAnnotations() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1025 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1031 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateMetadata() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1037 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearMetadata() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1043 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1049 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1055 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1061 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1067 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearDeletedAt() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1073 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetName(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1079 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateName() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1085 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetDescription(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1091 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateDescription() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1097 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) ClearDescription() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1103 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1109 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateAmount() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1115 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1121 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxesTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1127 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1133 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxesInclusiveTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1139 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1145 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTaxesExclusiveTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1151 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1157 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateChargesTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1163 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1169 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateDiscountsTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1175 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1181 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateCreditsTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1187 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1193 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateTotal() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1199 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1205 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateInvoiceID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1211 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineUpsert", + "line": 1217 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsert) UpdateParentLineID() *BillingStandardInvoiceDetailedLineUpsert", + "line": 1223 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateNewValues() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1239 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) Ignore() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1264 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) DoNothing() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1271 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) Update(set func(*BillingStandardInvoiceDetailedLineUpsert)) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1278 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1286 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxConfig() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1293 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearTaxConfig() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1300 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxCodeID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1314 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearTaxCodeID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1321 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1328 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxBehavior() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1335 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearTaxBehavior() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1342 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1349 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateServicePeriodStart() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1356 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1363 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateServicePeriodEnd() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1370 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1377 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateQuantity() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1384 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1391 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1398 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1405 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1412 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1419 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1426 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdatePerUnitAmount() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1433 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1440 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateCategory() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1447 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1454 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdatePaymentTerm() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1461 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetIndex(v int) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1468 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) AddIndex(v int) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1475 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateIndex() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1482 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearIndex() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1489 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1496 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateCreditsApplied() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1503 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearCreditsApplied() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1510 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1517 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateAnnotations() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1524 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearAnnotations() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1531 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1538 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateMetadata() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1545 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearMetadata() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1552 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1559 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1566 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1573 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1580 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearDeletedAt() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1587 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetName(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1594 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateName() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1601 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetDescription(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1608 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateDescription() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1615 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ClearDescription() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1622 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1629 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateAmount() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1636 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1643 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxesTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1650 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1657 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxesInclusiveTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1664 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1671 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTaxesExclusiveTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1678 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1685 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateChargesTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1692 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1699 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateDiscountsTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1706 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1713 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateCreditsTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1720 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1727 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateTotal() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1734 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1741 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateInvoiceID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1748 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1755 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) UpdateParentLineID() *BillingStandardInvoiceDetailedLineUpsertOne", + "line": 1762 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) Exec(ctx context.Context) error", + "line": 1769 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ExecX(ctx context.Context)", + "line": 1777 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1784 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertOne) IDX(ctx context.Context) string", + "line": 1798 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineCreateBulk", + "signature": "type BillingStandardInvoiceDetailedLineCreateBulk struct", + "line": 1807 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) Save(ctx context.Context) ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 1815 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) SaveX(ctx context.Context) []*BillingStandardInvoiceDetailedLine", + "line": 1871 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) Exec(ctx context.Context) error", + "line": 1880 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) ExecX(ctx context.Context)", + "line": 1886 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1907 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingStandardInvoiceDetailedLineCreateBulk) OnConflictColumns(columns ...string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1920 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineUpsertBulk", + "signature": "type BillingStandardInvoiceDetailedLineUpsertBulk struct", + "line": 1929 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateNewValues() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1944 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) Ignore() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1971 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) DoNothing() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1978 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) Update(set func(*BillingStandardInvoiceDetailedLineUpsert)) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1985 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 1993 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxConfig() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2000 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearTaxConfig() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2007 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2014 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxCodeID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2021 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearTaxCodeID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2028 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2035 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxBehavior() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2042 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearTaxBehavior() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2049 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2056 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateServicePeriodStart() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2063 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2070 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateServicePeriodEnd() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2077 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2084 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateQuantity() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2091 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2098 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2105 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2112 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2119 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2126 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2133 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdatePerUnitAmount() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2140 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2147 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateCategory() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2154 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2161 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdatePaymentTerm() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2168 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetIndex(v int) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2175 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) AddIndex(v int) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2182 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateIndex() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2189 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearIndex() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2196 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2203 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateCreditsApplied() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2210 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearCreditsApplied() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2217 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2224 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateAnnotations() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2231 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearAnnotations() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2238 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2245 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateMetadata() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2252 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearMetadata() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2259 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2266 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2273 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2280 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2287 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearDeletedAt() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2294 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetName(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2301 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateName() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2308 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetDescription(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2315 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateDescription() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2322 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ClearDescription() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2329 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2336 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateAmount() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2343 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2350 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxesTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2357 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2364 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxesInclusiveTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2371 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2378 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTaxesExclusiveTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2385 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2392 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateChargesTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2399 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2406 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateDiscountsTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2413 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2420 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateCreditsTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2427 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2434 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateTotal() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2441 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2448 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateInvoiceID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2455 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2462 + }, + { + "kind": "func", + "name": "UpdateParentLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) UpdateParentLineID() *BillingStandardInvoiceDetailedLineUpsertBulk", + "line": 2469 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) Exec(ctx context.Context) error", + "line": 2476 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpsertBulk) ExecX(ctx context.Context)", + "line": 2492 + } + ], + "line_count": 2496 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineDelete", + "signature": "type BillingStandardInvoiceDetailedLineDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDelete) Where(ps ...predicate.BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineDeleteOne", + "signature": "type BillingStandardInvoiceDetailedLineDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDeleteOne) Where(ps ...predicate.BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingStandardInvoiceDetailedLineDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineQuery", + "signature": "type BillingStandardInvoiceDetailedLineQuery struct", + "line": 25 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Where(ps ...predicate.BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Limit(limit int) *BillingStandardInvoiceDetailedLineQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Offset(offset int) *BillingStandardInvoiceDetailedLineQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Unique(unique bool) *BillingStandardInvoiceDetailedLineQuery", + "line": 61 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Order(o ...billingstandardinvoicedetailedline.OrderOption) *BillingStandardInvoiceDetailedLineQuery", + "line": 67 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 73 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 95 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) QueryTaxCode() *TaxCodeQuery", + "line": 117 + }, + { + "kind": "func", + "name": "QueryAmountDiscounts", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) QueryAmountDiscounts() *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 139 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) First(ctx context.Context) (*BillingStandardInvoiceDetailedLine, error)", + "line": 162 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) FirstX(ctx context.Context) *BillingStandardInvoiceDetailedLine", + "line": 174 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 184 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) FirstIDX(ctx context.Context) string", + "line": 197 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Only(ctx context.Context) (*BillingStandardInvoiceDetailedLine, error)", + "line": 208 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) OnlyX(ctx context.Context) *BillingStandardInvoiceDetailedLine", + "line": 224 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 235 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) OnlyIDX(ctx context.Context) string", + "line": 252 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) All(ctx context.Context) ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 261 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) AllX(ctx context.Context) []*BillingStandardInvoiceDetailedLine", + "line": 271 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 280 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) IDsX(ctx context.Context) []string", + "line": 292 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Count(ctx context.Context) (int, error)", + "line": 301 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) CountX(ctx context.Context) int", + "line": 310 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Exist(ctx context.Context) (bool, error)", + "line": 319 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) ExistX(ctx context.Context) bool", + "line": 332 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Clone() *BillingStandardInvoiceDetailedLineQuery", + "line": 342 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *BillingStandardInvoiceDetailedLineQuery", + "line": 364 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *BillingStandardInvoiceDetailedLineQuery", + "line": 375 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *BillingStandardInvoiceDetailedLineQuery", + "line": 386 + }, + { + "kind": "func", + "name": "WithAmountDiscounts", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) WithAmountDiscounts(opts ...func(*BillingStandardInvoiceDetailedLineAmountDiscountQuery)) *BillingStandardInvoiceDetailedLineQuery", + "line": 397 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) GroupBy(field string, fields ...string) *BillingStandardInvoiceDetailedLineGroupBy", + "line": 420 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Select(fields ...string) *BillingStandardInvoiceDetailedLineSelect", + "line": 441 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineSelect", + "line": 450 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) prepareQuery(ctx context.Context) error", + "line": 454 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 480 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*BillingStandardInvoiceDetailedLine, init func(*BillingStandardInvoiceDetailedLine), assign func(*BillingStandardInvoiceDetailedLine, *BillingInvoice)) error", + "line": 544 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*BillingStandardInvoiceDetailedLine, init func(*BillingStandardInvoiceDetailedLine), assign func(*BillingStandardInvoiceDetailedLine, *BillingInvoiceLine)) error", + "line": 573 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*BillingStandardInvoiceDetailedLine, init func(*BillingStandardInvoiceDetailedLine), assign func(*BillingStandardInvoiceDetailedLine, *TaxCode)) error", + "line": 602 + }, + { + "kind": "func", + "name": "loadAmountDiscounts", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) loadAmountDiscounts(ctx context.Context, query *BillingStandardInvoiceDetailedLineAmountDiscountQuery, nodes []*BillingStandardInvoiceDetailedLine, init func(*BillingStandardInvoiceDetailedLine), assign func(*BillingStandardInvoiceDetailedLine, *BillingStandardInvoiceDetailedLineAmountDiscount)) error", + "line": 634 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) sqlCount(ctx context.Context) (int, error)", + "line": 665 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) querySpec() *sqlgraph.QuerySpec", + "line": 677 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 726 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) ForUpdate(opts ...sql.LockOption) *BillingStandardInvoiceDetailedLineQuery", + "line": 764 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingStandardInvoiceDetailedLineQuery) ForShare(opts ...sql.LockOption) *BillingStandardInvoiceDetailedLineQuery", + "line": 777 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineGroupBy", + "signature": "type BillingStandardInvoiceDetailedLineGroupBy struct", + "line": 788 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingStandardInvoiceDetailedLineGroupBy) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineGroupBy", + "line": 794 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingStandardInvoiceDetailedLineGroupBy) Scan(ctx context.Context, v any) error", + "line": 800 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingStandardInvoiceDetailedLineGroupBy) sqlScan(ctx context.Context, root *BillingStandardInvoiceDetailedLineQuery, v any) error", + "line": 808 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineSelect", + "signature": "type BillingStandardInvoiceDetailedLineSelect struct", + "line": 836 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingStandardInvoiceDetailedLineSelect) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineSelect", + "line": 842 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingStandardInvoiceDetailedLineSelect) Scan(ctx context.Context, v any) error", + "line": 848 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingStandardInvoiceDetailedLineSelect) sqlScan(ctx context.Context, root *BillingStandardInvoiceDetailedLineQuery, v any) error", + "line": 856 + } + ], + "line_count": 875 + }, + "openmeter/ent/db/billingstandardinvoicedetailedline_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineUpdate", + "signature": "type BillingStandardInvoiceDetailedLineUpdate struct", + "line": 28 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) Where(ps ...predicate.BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearTaxConfig() *BillingStandardInvoiceDetailedLineUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxCodeID(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearTaxCodeID() *BillingStandardInvoiceDetailedLineUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearTaxBehavior() *BillingStandardInvoiceDetailedLineUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableServicePeriodStart(v *time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableServicePeriodEnd(v *time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableChildUniqueReferenceID(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableCategory(v *stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpdate", + "line": 205 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpdate", + "line": 211 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetIndex(v int) *BillingStandardInvoiceDetailedLineUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableIndex(v *int) *BillingStandardInvoiceDetailedLineUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) AddIndex(v int) *BillingStandardInvoiceDetailedLineUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearIndex() *BillingStandardInvoiceDetailedLineUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearCreditsApplied() *BillingStandardInvoiceDetailedLineUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearAnnotations() *BillingStandardInvoiceDetailedLineUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 270 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearMetadata() *BillingStandardInvoiceDetailedLineUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 288 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearDeletedAt() *BillingStandardInvoiceDetailedLineUpdate", + "line": 302 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetName(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 308 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableName(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 314 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetDescription(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 328 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearDescription() *BillingStandardInvoiceDetailedLineUpdate", + "line": 336 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 342 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 348 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 356 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 362 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 370 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 376 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 384 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 390 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 398 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 404 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 412 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 418 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 426 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 432 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 440 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdate", + "line": 446 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 454 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableInvoiceID(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 460 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 468 + }, + { + "kind": "func", + "name": "SetNillableParentLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetNillableParentLineID(v *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 474 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetBillingInvoiceID(id string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 482 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetBillingInvoice(v *BillingInvoice) *BillingStandardInvoiceDetailedLineUpdate", + "line": 488 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetBillingInvoiceLineID(id string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 493 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingStandardInvoiceDetailedLineUpdate", + "line": 499 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SetTaxCode(v *TaxCode) *BillingStandardInvoiceDetailedLineUpdate", + "line": 504 + }, + { + "kind": "func", + "name": "AddAmountDiscountIDs", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) AddAmountDiscountIDs(ids ...string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 509 + }, + { + "kind": "func", + "name": "AddAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) AddAmountDiscounts(v ...*BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineUpdate", + "line": 515 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) Mutation() *BillingStandardInvoiceDetailedLineMutation", + "line": 524 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearBillingInvoice() *BillingStandardInvoiceDetailedLineUpdate", + "line": 529 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearBillingInvoiceLine() *BillingStandardInvoiceDetailedLineUpdate", + "line": 535 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearTaxCode() *BillingStandardInvoiceDetailedLineUpdate", + "line": 541 + }, + { + "kind": "func", + "name": "ClearAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ClearAmountDiscounts() *BillingStandardInvoiceDetailedLineUpdate", + "line": 547 + }, + { + "kind": "func", + "name": "RemoveAmountDiscountIDs", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) RemoveAmountDiscountIDs(ids ...string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 553 + }, + { + "kind": "func", + "name": "RemoveAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) RemoveAmountDiscounts(v ...*BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineUpdate", + "line": 559 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) Save(ctx context.Context) (int, error)", + "line": 568 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) SaveX(ctx context.Context) int", + "line": 574 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) Exec(ctx context.Context) error", + "line": 583 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) ExecX(ctx context.Context)", + "line": 589 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) defaults()", + "line": 596 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) check() error", + "line": 604 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 644 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineUpdateOne", + "signature": "type BillingStandardInvoiceDetailedLineUpdateOne struct", + "line": 909 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxConfig(v productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 917 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxConfig(v *productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 923 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearTaxConfig() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 931 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxCodeID(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 937 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxCodeID(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 943 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearTaxCodeID() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 951 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 957 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 963 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearTaxBehavior() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 971 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetServicePeriodStart(v time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 977 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableServicePeriodStart(v *time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 983 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetServicePeriodEnd(v time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 991 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableServicePeriodEnd(v *time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 997 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetQuantity(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1005 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1011 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1019 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1025 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1033 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1039 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableChildUniqueReferenceID(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1045 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetPerUnitAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1053 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1059 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetCategory(v stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableCategory(v *stddetailedline.Category) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1073 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetPaymentTerm(v productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1081 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1087 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetIndex(v int) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableIndex(v *int) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1102 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) AddIndex(v int) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1110 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearIndex() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1116 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1122 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearCreditsApplied() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1128 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetAnnotations(v models.Annotations) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1134 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearAnnotations() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1140 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetMetadata(v map[string]string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1146 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearMetadata() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1152 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1158 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1164 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1170 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearDeletedAt() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1178 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetName(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1184 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableName(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1190 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetDescription(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1198 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1204 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearDescription() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1212 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1218 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1224 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1232 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1238 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1246 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1252 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1260 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1266 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1274 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1280 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1288 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1294 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1302 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1308 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTotal(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1316 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1322 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetInvoiceID(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1330 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableInvoiceID(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1336 + }, + { + "kind": "func", + "name": "SetParentLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetParentLineID(v string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1344 + }, + { + "kind": "func", + "name": "SetNillableParentLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetNillableParentLineID(v *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1350 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetBillingInvoiceID(id string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1358 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetBillingInvoice(v *BillingInvoice) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1364 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetBillingInvoiceLineID(id string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1369 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1375 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SetTaxCode(v *TaxCode) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1380 + }, + { + "kind": "func", + "name": "AddAmountDiscountIDs", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) AddAmountDiscountIDs(ids ...string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1385 + }, + { + "kind": "func", + "name": "AddAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) AddAmountDiscounts(v ...*BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1391 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) Mutation() *BillingStandardInvoiceDetailedLineMutation", + "line": 1400 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearBillingInvoice() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1405 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearBillingInvoiceLine() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1411 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearTaxCode() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1417 + }, + { + "kind": "func", + "name": "ClearAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ClearAmountDiscounts() *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1423 + }, + { + "kind": "func", + "name": "RemoveAmountDiscountIDs", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) RemoveAmountDiscountIDs(ids ...string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1429 + }, + { + "kind": "func", + "name": "RemoveAmountDiscounts", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) RemoveAmountDiscounts(v ...*BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1435 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) Where(ps ...predicate.BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1444 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) Select(field string, fields ...string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 1451 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) Save(ctx context.Context) (*BillingStandardInvoiceDetailedLine, error)", + "line": 1457 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) SaveX(ctx context.Context) *BillingStandardInvoiceDetailedLine", + "line": 1463 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) Exec(ctx context.Context) error", + "line": 1472 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) ExecX(ctx context.Context)", + "line": 1478 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) defaults()", + "line": 1485 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) check() error", + "line": 1493 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingStandardInvoiceDetailedLineUpdateOne) sqlSave(ctx context.Context) (_node *BillingStandardInvoiceDetailedLine, err error)", + "line": 1533 + } + ], + "line_count": 1815 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscount", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscount struct", + "line": 19 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountEdges", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountEdges struct", + "line": 54 + }, + { + "kind": "func", + "name": "DetailedLineOrErr", + "signature": "func (e BillingStandardInvoiceDetailedLineAmountDiscountEdges) DetailedLineOrErr() (*BillingStandardInvoiceDetailedLine, error)", + "line": 64 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) assignValues(columns []string, values []any) error", + "line": 97 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) Value(name string) (ent.Value, error)", + "line": 195 + }, + { + "kind": "func", + "name": "QueryDetailedLine", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) QueryDetailedLine() *BillingStandardInvoiceDetailedLineQuery", + "line": 200 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) Update() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 207 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) Unwrap() *BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 213 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscount) String() string", + "line": 223 + } + ], + "line_count": 279 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/billingstandardinvoicedetailedlineamountdiscount.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ReasonValidator", + "signature": "func ReasonValidator(r billing.DiscountReasonType) error", + "line": 102 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByReason", + "signature": "func ByReason(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByRoundingAmount", + "signature": "func ByRoundingAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "BySourceDiscount", + "signature": "func BySourceDiscount(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByDetailedLineField", + "signature": "func ByDetailedLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "newDetailedLineStep", + "signature": "func newDetailedLineStep() *sqlgraph.Step", + "line": 185 + } + ], + "line_count": 191 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 86 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 91 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 96 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 106 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 111 + }, + { + "kind": "func", + "name": "RoundingAmount", + "signature": "func RoundingAmount(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 181 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 186 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 221 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 226 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 231 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 246 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 261 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 266 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 271 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 311 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 316 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 321 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 326 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 331 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 336 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 341 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 346 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 351 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 356 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 361 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 366 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 371 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 376 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 381 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 386 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 391 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 396 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 401 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 406 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 411 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 416 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 421 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 426 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 431 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 436 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 441 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 446 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 451 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 456 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 461 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 466 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 471 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 476 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 481 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 486 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 491 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 496 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 501 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 506 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIsNil", + "signature": "func ChildUniqueReferenceIDIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 511 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotNil", + "signature": "func ChildUniqueReferenceIDNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 516 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 521 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 526 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 531 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 536 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 541 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 546 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 551 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 556 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 561 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 566 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 571 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 576 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 581 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 586 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 591 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 596 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 601 + }, + { + "kind": "func", + "name": "ReasonEQ", + "signature": "func ReasonEQ(v billing.DiscountReasonType) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 606 + }, + { + "kind": "func", + "name": "ReasonNEQ", + "signature": "func ReasonNEQ(v billing.DiscountReasonType) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 612 + }, + { + "kind": "func", + "name": "ReasonIn", + "signature": "func ReasonIn(vs ...billing.DiscountReasonType) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 618 + }, + { + "kind": "func", + "name": "ReasonNotIn", + "signature": "func ReasonNotIn(vs ...billing.DiscountReasonType) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 627 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 636 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 641 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 646 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 651 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 656 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 661 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 666 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 671 + }, + { + "kind": "func", + "name": "RoundingAmountEQ", + "signature": "func RoundingAmountEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 676 + }, + { + "kind": "func", + "name": "RoundingAmountNEQ", + "signature": "func RoundingAmountNEQ(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 681 + }, + { + "kind": "func", + "name": "RoundingAmountIn", + "signature": "func RoundingAmountIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 686 + }, + { + "kind": "func", + "name": "RoundingAmountNotIn", + "signature": "func RoundingAmountNotIn(vs ...alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 691 + }, + { + "kind": "func", + "name": "RoundingAmountGT", + "signature": "func RoundingAmountGT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 696 + }, + { + "kind": "func", + "name": "RoundingAmountGTE", + "signature": "func RoundingAmountGTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 701 + }, + { + "kind": "func", + "name": "RoundingAmountLT", + "signature": "func RoundingAmountLT(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 706 + }, + { + "kind": "func", + "name": "RoundingAmountLTE", + "signature": "func RoundingAmountLTE(v alpacadecimal.Decimal) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 711 + }, + { + "kind": "func", + "name": "RoundingAmountIsNil", + "signature": "func RoundingAmountIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 716 + }, + { + "kind": "func", + "name": "RoundingAmountNotNil", + "signature": "func RoundingAmountNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 721 + }, + { + "kind": "func", + "name": "SourceDiscountIsNil", + "signature": "func SourceDiscountIsNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 726 + }, + { + "kind": "func", + "name": "SourceDiscountNotNil", + "signature": "func SourceDiscountNotNil() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 731 + }, + { + "kind": "func", + "name": "HasDetailedLine", + "signature": "func HasDetailedLine() predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 736 + }, + { + "kind": "func", + "name": "HasDetailedLineWith", + "signature": "func HasDetailedLineWith(preds ...predicate.BillingStandardInvoiceDetailedLine) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 747 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 759 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 764 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingStandardInvoiceDetailedLineAmountDiscount) predicate.BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 769 + } + ], + "line_count": 771 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNamespace(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetCreatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableCreatedAt(v *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableUpdatedAt(v *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableChildUniqueReferenceID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetNillableID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetDetailedLineID", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetDetailedLineID(id string) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetDetailedLine", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SetDetailedLine(v *BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineAmountDiscountCreate", + "line": 178 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) Mutation() *BillingStandardInvoiceDetailedLineAmountDiscountMutation", + "line": 183 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) Save(ctx context.Context) (*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 188 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) SaveX(ctx context.Context) *BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 194 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) Exec(ctx context.Context) error", + "line": 203 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) ExecX(ctx context.Context)", + "line": 209 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) defaults()", + "line": 216 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) check() error", + "line": 232 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) sqlSave(ctx context.Context) (*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 272 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) createSpec() (*BillingStandardInvoiceDetailedLineAmountDiscount, *sqlgraph.CreateSpec, error)", + "line": 298 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) OnConflict(opts ...sql.ConflictOption) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 392 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreate) OnConflictColumns(columns ...string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 405 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 426 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 432 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 444 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 450 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 456 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 462 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 468 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 474 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateLineID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 492 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 498 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 504 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 510 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 516 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 522 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateReason() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 528 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 534 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 540 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 546 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 552 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 558 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 564 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) UpdateSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 570 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsert) ClearSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsert", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateNewValues() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 592 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) Ignore() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 614 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) DoNothing() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 621 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) Update(set func(*BillingStandardInvoiceDetailedLineAmountDiscountUpsert)) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 628 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 643 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 650 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 657 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 664 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 671 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 678 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 685 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 692 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateLineID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 699 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 706 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 713 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 720 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 727 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 734 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 741 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 748 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateReason() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 755 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 762 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 769 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 776 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 783 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 790 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 797 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) UpdateSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 804 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ClearSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne", + "line": 811 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) Exec(ctx context.Context) error", + "line": 818 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ExecX(ctx context.Context)", + "line": 826 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 833 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertOne) IDX(ctx context.Context) string", + "line": 847 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk struct", + "line": 856 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) Save(ctx context.Context) ([]*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 864 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) SaveX(ctx context.Context) []*BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 923 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) Exec(ctx context.Context) error", + "line": 932 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) ExecX(ctx context.Context)", + "line": 938 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 959 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingStandardInvoiceDetailedLineAmountDiscountCreateBulk) OnConflictColumns(columns ...string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 972 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk struct", + "line": 981 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateNewValues() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 996 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) Ignore() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1020 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) DoNothing() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1027 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) Update(set func(*BillingStandardInvoiceDetailedLineAmountDiscountUpsert)) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1034 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1042 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateUpdatedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1049 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1056 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1063 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1070 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1077 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1084 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1091 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1098 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateLineID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1105 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1112 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1119 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1126 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1133 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1140 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1147 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1154 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateReason() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1161 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1168 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1175 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1182 + }, + { + "kind": "func", + "name": "UpdateRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1189 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1196 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1203 + }, + { + "kind": "func", + "name": "UpdateSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) UpdateSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1210 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ClearSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk", + "line": 1217 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) Exec(ctx context.Context) error", + "line": 1224 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpsertBulk) ExecX(ctx context.Context)", + "line": 1240 + } + ], + "line_count": 1244 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountDelete", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDelete) Where(ps ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineAmountDiscountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne) Where(ps ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingStandardInvoiceDetailedLineAmountDiscountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Where(ps ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Limit(limit int) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Offset(offset int) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Unique(unique bool) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Order(o ...billingstandardinvoicedetailedlineamountdiscount.OrderOption) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryDetailedLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) QueryDetailedLine() *BillingStandardInvoiceDetailedLineQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) First(ctx context.Context) (*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) FirstX(ctx context.Context) *BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Only(ctx context.Context) (*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) OnlyX(ctx context.Context) *BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) All(ctx context.Context) ([]*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) AllX(ctx context.Context) []*BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Clone() *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithDetailedLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) WithDetailedLine(opts ...func(*BillingStandardInvoiceDetailedLineQuery)) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) GroupBy(field string, fields ...string) *BillingStandardInvoiceDetailedLineAmountDiscountGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Select(fields ...string) *BillingStandardInvoiceDetailedLineAmountDiscountSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineAmountDiscountSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadDetailedLine", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) loadDetailedLine(ctx context.Context, query *BillingStandardInvoiceDetailedLineQuery, nodes []*BillingStandardInvoiceDetailedLineAmountDiscount, init func(*BillingStandardInvoiceDetailedLineAmountDiscount), assign func(*BillingStandardInvoiceDetailedLineAmountDiscount, *BillingStandardInvoiceDetailedLine)) error", + "line": 411 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 441 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 453 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 496 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) ForUpdate(opts ...sql.LockOption) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 534 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingStandardInvoiceDetailedLineAmountDiscountQuery) ForShare(opts ...sql.LockOption) *BillingStandardInvoiceDetailedLineAmountDiscountQuery", + "line": 547 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountGroupBy", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountGroupBy struct", + "line": 558 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingStandardInvoiceDetailedLineAmountDiscountGroupBy) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineAmountDiscountGroupBy", + "line": 564 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingStandardInvoiceDetailedLineAmountDiscountGroupBy) Scan(ctx context.Context, v any) error", + "line": 570 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingStandardInvoiceDetailedLineAmountDiscountGroupBy) sqlScan(ctx context.Context, root *BillingStandardInvoiceDetailedLineAmountDiscountQuery, v any) error", + "line": 578 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountSelect", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountSelect struct", + "line": 606 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingStandardInvoiceDetailedLineAmountDiscountSelect) Aggregate(fns ...AggregateFunc) *BillingStandardInvoiceDetailedLineAmountDiscountSelect", + "line": 612 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingStandardInvoiceDetailedLineAmountDiscountSelect) Scan(ctx context.Context, v any) error", + "line": 618 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingStandardInvoiceDetailedLineAmountDiscountSelect) sqlScan(ctx context.Context, root *BillingStandardInvoiceDetailedLineAmountDiscountQuery, v any) error", + "line": 626 + } + ], + "line_count": 645 + }, + "openmeter/ent/db/billingstandardinvoicedetailedlineamountdiscount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) Where(ps ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableLineID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableChildUniqueReferenceID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableReason(v *billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetDetailedLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetDetailedLineID(id string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetDetailedLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetDetailedLine(v *BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) Mutation() *BillingStandardInvoiceDetailedLineAmountDiscountMutation", + "line": 206 + }, + { + "kind": "func", + "name": "ClearDetailedLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ClearDetailedLine() *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 211 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) Save(ctx context.Context) (int, error)", + "line": 217 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SaveX(ctx context.Context) int", + "line": 223 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) Exec(ctx context.Context) error", + "line": 232 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) ExecX(ctx context.Context)", + "line": 238 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) defaults()", + "line": 245 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) check() error", + "line": 253 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 270 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne struct", + "line": 373 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetUpdatedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 381 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetDeletedAt(v time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearDeletedAt() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetInvoicingAppExternalID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableInvoicingAppExternalID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 413 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearInvoicingAppExternalID() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetLineID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 427 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableLineID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 433 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetChildUniqueReferenceID(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableChildUniqueReferenceID(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 447 + }, + { + "kind": "func", + "name": "ClearChildUniqueReferenceID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearChildUniqueReferenceID() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetDescription(v string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableDescription(v *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 467 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearDescription() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetReason(v billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 481 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableReason(v *billing.DiscountReasonType) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 487 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 495 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 501 + }, + { + "kind": "func", + "name": "SetRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetRoundingAmount(v alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 509 + }, + { + "kind": "func", + "name": "SetNillableRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetNillableRoundingAmount(v *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 515 + }, + { + "kind": "func", + "name": "ClearRoundingAmount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearRoundingAmount() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 523 + }, + { + "kind": "func", + "name": "SetSourceDiscount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetSourceDiscount(v *billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 529 + }, + { + "kind": "func", + "name": "ClearSourceDiscount", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearSourceDiscount() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 535 + }, + { + "kind": "func", + "name": "SetDetailedLineID", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetDetailedLineID(id string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 541 + }, + { + "kind": "func", + "name": "SetDetailedLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetDetailedLine(v *BillingStandardInvoiceDetailedLine) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 547 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) Mutation() *BillingStandardInvoiceDetailedLineAmountDiscountMutation", + "line": 552 + }, + { + "kind": "func", + "name": "ClearDetailedLine", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ClearDetailedLine() *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 557 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) Where(ps ...predicate.BillingStandardInvoiceDetailedLineAmountDiscount) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 563 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) Select(field string, fields ...string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 570 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) Save(ctx context.Context) (*BillingStandardInvoiceDetailedLineAmountDiscount, error)", + "line": 576 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SaveX(ctx context.Context) *BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 582 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) Exec(ctx context.Context) error", + "line": 591 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) ExecX(ctx context.Context)", + "line": 597 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) defaults()", + "line": 604 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) check() error", + "line": 612 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) sqlSave(ctx context.Context) (_node *BillingStandardInvoiceDetailedLineAmountDiscount, err error)", + "line": 629 + } + ], + "line_count": 749 + }, + "openmeter/ent/db/billingworkflowconfig.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkflowConfig", + "signature": "type BillingWorkflowConfig struct", + "line": 23 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigEdges", + "signature": "type BillingWorkflowConfigEdges struct", + "line": 68 + }, + { + "kind": "func", + "name": "BillingInvoicesOrErr", + "signature": "func (e BillingWorkflowConfigEdges) BillingInvoicesOrErr() (*BillingInvoice, error)", + "line": 82 + }, + { + "kind": "func", + "name": "BillingProfileOrErr", + "signature": "func (e BillingWorkflowConfigEdges) BillingProfileOrErr() (*BillingProfile, error)", + "line": 93 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e BillingWorkflowConfigEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 104 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *BillingWorkflowConfig) assignValues(columns []string, values []any) error", + "line": 135 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *BillingWorkflowConfig) Value(name string) (ent.Value, error)", + "line": 265 + }, + { + "kind": "func", + "name": "QueryBillingInvoices", + "signature": "func (_m *BillingWorkflowConfig) QueryBillingInvoices() *BillingInvoiceQuery", + "line": 270 + }, + { + "kind": "func", + "name": "QueryBillingProfile", + "signature": "func (_m *BillingWorkflowConfig) QueryBillingProfile() *BillingProfileQuery", + "line": 275 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *BillingWorkflowConfig) QueryTaxCode() *TaxCodeQuery", + "line": 280 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *BillingWorkflowConfig) Update() *BillingWorkflowConfigUpdateOne", + "line": 287 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *BillingWorkflowConfig) Unwrap() *BillingWorkflowConfig", + "line": 293 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *BillingWorkflowConfig) String() string", + "line": 303 + } + ], + "line_count": 368 + }, + "openmeter/ent/db/billingworkflowconfig/billingworkflowconfig.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 108 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 135 + }, + { + "kind": "func", + "name": "CollectionAlignmentValidator", + "signature": "func CollectionAlignmentValidator(ca billing.AlignmentKind) error", + "line": 145 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodValidator", + "signature": "func InvoiceCollectionMethodValidator(icm billing.CollectionMethod) error", + "line": 155 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 173 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 193 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 198 + }, + { + "kind": "func", + "name": "ByCollectionAlignment", + "signature": "func ByCollectionAlignment(opts ...sql.OrderTermOption) OrderOption", + "line": 203 + }, + { + "kind": "func", + "name": "ByLineCollectionPeriod", + "signature": "func ByLineCollectionPeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 208 + }, + { + "kind": "func", + "name": "ByInvoiceAutoAdvance", + "signature": "func ByInvoiceAutoAdvance(opts ...sql.OrderTermOption) OrderOption", + "line": 213 + }, + { + "kind": "func", + "name": "ByInvoiceDraftPeriod", + "signature": "func ByInvoiceDraftPeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 218 + }, + { + "kind": "func", + "name": "ByInvoiceDueAfter", + "signature": "func ByInvoiceDueAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "ByInvoiceCollectionMethod", + "signature": "func ByInvoiceCollectionMethod(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "ByInvoiceProgressiveBilling", + "signature": "func ByInvoiceProgressiveBilling(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "ByTaxEnabled", + "signature": "func ByTaxEnabled(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByTaxEnforced", + "signature": "func ByTaxEnforced(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByBillingInvoicesField", + "signature": "func ByBillingInvoicesField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByBillingProfileField", + "signature": "func ByBillingProfileField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 255 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 262 + }, + { + "kind": "func", + "name": "newBillingInvoicesStep", + "signature": "func newBillingInvoicesStep() *sqlgraph.Step", + "line": 267 + }, + { + "kind": "func", + "name": "newBillingProfileStep", + "signature": "func newBillingProfileStep() *sqlgraph.Step", + "line": 274 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 281 + } + ], + "line_count": 287 + }, + "openmeter/ent/db/billingworkflowconfig/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.BillingWorkflowConfig", + "line": 17 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.BillingWorkflowConfig", + "line": 22 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.BillingWorkflowConfig", + "line": 27 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.BillingWorkflowConfig", + "line": 32 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.BillingWorkflowConfig", + "line": 37 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.BillingWorkflowConfig", + "line": 42 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.BillingWorkflowConfig", + "line": 47 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.BillingWorkflowConfig", + "line": 52 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.BillingWorkflowConfig", + "line": 57 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.BillingWorkflowConfig", + "line": 62 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.BillingWorkflowConfig", + "line": 67 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.BillingWorkflowConfig", + "line": 72 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.BillingWorkflowConfig", + "line": 77 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.BillingWorkflowConfig", + "line": 82 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.BillingWorkflowConfig", + "line": 87 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.BillingWorkflowConfig", + "line": 92 + }, + { + "kind": "func", + "name": "LineCollectionPeriod", + "signature": "func LineCollectionPeriod(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 97 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvance", + "signature": "func InvoiceAutoAdvance(v bool) predicate.BillingWorkflowConfig", + "line": 103 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriod", + "signature": "func InvoiceDraftPeriod(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 108 + }, + { + "kind": "func", + "name": "InvoiceDueAfter", + "signature": "func InvoiceDueAfter(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 114 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBilling", + "signature": "func InvoiceProgressiveBilling(v bool) predicate.BillingWorkflowConfig", + "line": 120 + }, + { + "kind": "func", + "name": "TaxEnabled", + "signature": "func TaxEnabled(v bool) predicate.BillingWorkflowConfig", + "line": 125 + }, + { + "kind": "func", + "name": "TaxEnforced", + "signature": "func TaxEnforced(v bool) predicate.BillingWorkflowConfig", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.BillingWorkflowConfig", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.BillingWorkflowConfig", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.BillingWorkflowConfig", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.BillingWorkflowConfig", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.BillingWorkflowConfig", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.BillingWorkflowConfig", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.BillingWorkflowConfig", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.BillingWorkflowConfig", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.BillingWorkflowConfig", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.BillingWorkflowConfig", + "line": 180 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.BillingWorkflowConfig", + "line": 185 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.BillingWorkflowConfig", + "line": 190 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.BillingWorkflowConfig", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.BillingWorkflowConfig", + "line": 220 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 225 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.BillingWorkflowConfig", + "line": 230 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.BillingWorkflowConfig", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 265 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.BillingWorkflowConfig", + "line": 270 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.BillingWorkflowConfig", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.BillingWorkflowConfig", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.BillingWorkflowConfig", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.BillingWorkflowConfig", + "line": 310 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.BillingWorkflowConfig", + "line": 315 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.BillingWorkflowConfig", + "line": 320 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.BillingWorkflowConfig", + "line": 325 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.BillingWorkflowConfig", + "line": 330 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.BillingWorkflowConfig", + "line": 335 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.BillingWorkflowConfig", + "line": 340 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.BillingWorkflowConfig", + "line": 345 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.BillingWorkflowConfig", + "line": 350 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.BillingWorkflowConfig", + "line": 355 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.BillingWorkflowConfig", + "line": 360 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.BillingWorkflowConfig", + "line": 365 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.BillingWorkflowConfig", + "line": 370 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.BillingWorkflowConfig", + "line": 375 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.BillingWorkflowConfig", + "line": 380 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.BillingWorkflowConfig", + "line": 385 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.BillingWorkflowConfig", + "line": 390 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.BillingWorkflowConfig", + "line": 395 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.BillingWorkflowConfig", + "line": 400 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.BillingWorkflowConfig", + "line": 405 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.BillingWorkflowConfig", + "line": 411 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.BillingWorkflowConfig", + "line": 417 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.BillingWorkflowConfig", + "line": 426 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.BillingWorkflowConfig", + "line": 435 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.BillingWorkflowConfig", + "line": 440 + }, + { + "kind": "func", + "name": "CollectionAlignmentEQ", + "signature": "func CollectionAlignmentEQ(v billing.AlignmentKind) predicate.BillingWorkflowConfig", + "line": 445 + }, + { + "kind": "func", + "name": "CollectionAlignmentNEQ", + "signature": "func CollectionAlignmentNEQ(v billing.AlignmentKind) predicate.BillingWorkflowConfig", + "line": 451 + }, + { + "kind": "func", + "name": "CollectionAlignmentIn", + "signature": "func CollectionAlignmentIn(vs ...billing.AlignmentKind) predicate.BillingWorkflowConfig", + "line": 457 + }, + { + "kind": "func", + "name": "CollectionAlignmentNotIn", + "signature": "func CollectionAlignmentNotIn(vs ...billing.AlignmentKind) predicate.BillingWorkflowConfig", + "line": 466 + }, + { + "kind": "func", + "name": "AnchoredAlignmentDetailIsNil", + "signature": "func AnchoredAlignmentDetailIsNil() predicate.BillingWorkflowConfig", + "line": 475 + }, + { + "kind": "func", + "name": "AnchoredAlignmentDetailNotNil", + "signature": "func AnchoredAlignmentDetailNotNil() predicate.BillingWorkflowConfig", + "line": 480 + }, + { + "kind": "func", + "name": "LineCollectionPeriodEQ", + "signature": "func LineCollectionPeriodEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 485 + }, + { + "kind": "func", + "name": "LineCollectionPeriodNEQ", + "signature": "func LineCollectionPeriodNEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 491 + }, + { + "kind": "func", + "name": "LineCollectionPeriodIn", + "signature": "func LineCollectionPeriodIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 497 + }, + { + "kind": "func", + "name": "LineCollectionPeriodNotIn", + "signature": "func LineCollectionPeriodNotIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 506 + }, + { + "kind": "func", + "name": "LineCollectionPeriodGT", + "signature": "func LineCollectionPeriodGT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 515 + }, + { + "kind": "func", + "name": "LineCollectionPeriodGTE", + "signature": "func LineCollectionPeriodGTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 521 + }, + { + "kind": "func", + "name": "LineCollectionPeriodLT", + "signature": "func LineCollectionPeriodLT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 527 + }, + { + "kind": "func", + "name": "LineCollectionPeriodLTE", + "signature": "func LineCollectionPeriodLTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 533 + }, + { + "kind": "func", + "name": "LineCollectionPeriodContains", + "signature": "func LineCollectionPeriodContains(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 539 + }, + { + "kind": "func", + "name": "LineCollectionPeriodHasPrefix", + "signature": "func LineCollectionPeriodHasPrefix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 545 + }, + { + "kind": "func", + "name": "LineCollectionPeriodHasSuffix", + "signature": "func LineCollectionPeriodHasSuffix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 551 + }, + { + "kind": "func", + "name": "LineCollectionPeriodEqualFold", + "signature": "func LineCollectionPeriodEqualFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 557 + }, + { + "kind": "func", + "name": "LineCollectionPeriodContainsFold", + "signature": "func LineCollectionPeriodContainsFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 563 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceEQ", + "signature": "func InvoiceAutoAdvanceEQ(v bool) predicate.BillingWorkflowConfig", + "line": 569 + }, + { + "kind": "func", + "name": "InvoiceAutoAdvanceNEQ", + "signature": "func InvoiceAutoAdvanceNEQ(v bool) predicate.BillingWorkflowConfig", + "line": 574 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodEQ", + "signature": "func InvoiceDraftPeriodEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 579 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodNEQ", + "signature": "func InvoiceDraftPeriodNEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 585 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodIn", + "signature": "func InvoiceDraftPeriodIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 591 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodNotIn", + "signature": "func InvoiceDraftPeriodNotIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 600 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodGT", + "signature": "func InvoiceDraftPeriodGT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 609 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodGTE", + "signature": "func InvoiceDraftPeriodGTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 615 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodLT", + "signature": "func InvoiceDraftPeriodLT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 621 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodLTE", + "signature": "func InvoiceDraftPeriodLTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 627 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodContains", + "signature": "func InvoiceDraftPeriodContains(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 633 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodHasPrefix", + "signature": "func InvoiceDraftPeriodHasPrefix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 639 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodHasSuffix", + "signature": "func InvoiceDraftPeriodHasSuffix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 645 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodEqualFold", + "signature": "func InvoiceDraftPeriodEqualFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 651 + }, + { + "kind": "func", + "name": "InvoiceDraftPeriodContainsFold", + "signature": "func InvoiceDraftPeriodContainsFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 657 + }, + { + "kind": "func", + "name": "InvoiceDueAfterEQ", + "signature": "func InvoiceDueAfterEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 663 + }, + { + "kind": "func", + "name": "InvoiceDueAfterNEQ", + "signature": "func InvoiceDueAfterNEQ(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 669 + }, + { + "kind": "func", + "name": "InvoiceDueAfterIn", + "signature": "func InvoiceDueAfterIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 675 + }, + { + "kind": "func", + "name": "InvoiceDueAfterNotIn", + "signature": "func InvoiceDueAfterNotIn(vs ...datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 684 + }, + { + "kind": "func", + "name": "InvoiceDueAfterGT", + "signature": "func InvoiceDueAfterGT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 693 + }, + { + "kind": "func", + "name": "InvoiceDueAfterGTE", + "signature": "func InvoiceDueAfterGTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 699 + }, + { + "kind": "func", + "name": "InvoiceDueAfterLT", + "signature": "func InvoiceDueAfterLT(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 705 + }, + { + "kind": "func", + "name": "InvoiceDueAfterLTE", + "signature": "func InvoiceDueAfterLTE(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 711 + }, + { + "kind": "func", + "name": "InvoiceDueAfterContains", + "signature": "func InvoiceDueAfterContains(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 717 + }, + { + "kind": "func", + "name": "InvoiceDueAfterHasPrefix", + "signature": "func InvoiceDueAfterHasPrefix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 723 + }, + { + "kind": "func", + "name": "InvoiceDueAfterHasSuffix", + "signature": "func InvoiceDueAfterHasSuffix(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 729 + }, + { + "kind": "func", + "name": "InvoiceDueAfterEqualFold", + "signature": "func InvoiceDueAfterEqualFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 735 + }, + { + "kind": "func", + "name": "InvoiceDueAfterContainsFold", + "signature": "func InvoiceDueAfterContainsFold(v datetime.ISODurationString) predicate.BillingWorkflowConfig", + "line": 741 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodEQ", + "signature": "func InvoiceCollectionMethodEQ(v billing.CollectionMethod) predicate.BillingWorkflowConfig", + "line": 747 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodNEQ", + "signature": "func InvoiceCollectionMethodNEQ(v billing.CollectionMethod) predicate.BillingWorkflowConfig", + "line": 753 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodIn", + "signature": "func InvoiceCollectionMethodIn(vs ...billing.CollectionMethod) predicate.BillingWorkflowConfig", + "line": 759 + }, + { + "kind": "func", + "name": "InvoiceCollectionMethodNotIn", + "signature": "func InvoiceCollectionMethodNotIn(vs ...billing.CollectionMethod) predicate.BillingWorkflowConfig", + "line": 768 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingEQ", + "signature": "func InvoiceProgressiveBillingEQ(v bool) predicate.BillingWorkflowConfig", + "line": 777 + }, + { + "kind": "func", + "name": "InvoiceProgressiveBillingNEQ", + "signature": "func InvoiceProgressiveBillingNEQ(v bool) predicate.BillingWorkflowConfig", + "line": 782 + }, + { + "kind": "func", + "name": "InvoiceDefaultTaxSettingsIsNil", + "signature": "func InvoiceDefaultTaxSettingsIsNil() predicate.BillingWorkflowConfig", + "line": 787 + }, + { + "kind": "func", + "name": "InvoiceDefaultTaxSettingsNotNil", + "signature": "func InvoiceDefaultTaxSettingsNotNil() predicate.BillingWorkflowConfig", + "line": 792 + }, + { + "kind": "func", + "name": "TaxEnabledEQ", + "signature": "func TaxEnabledEQ(v bool) predicate.BillingWorkflowConfig", + "line": 797 + }, + { + "kind": "func", + "name": "TaxEnabledNEQ", + "signature": "func TaxEnabledNEQ(v bool) predicate.BillingWorkflowConfig", + "line": 802 + }, + { + "kind": "func", + "name": "TaxEnforcedEQ", + "signature": "func TaxEnforcedEQ(v bool) predicate.BillingWorkflowConfig", + "line": 807 + }, + { + "kind": "func", + "name": "TaxEnforcedNEQ", + "signature": "func TaxEnforcedNEQ(v bool) predicate.BillingWorkflowConfig", + "line": 812 + }, + { + "kind": "func", + "name": "HasBillingInvoices", + "signature": "func HasBillingInvoices() predicate.BillingWorkflowConfig", + "line": 817 + }, + { + "kind": "func", + "name": "HasBillingInvoicesWith", + "signature": "func HasBillingInvoicesWith(preds ...predicate.BillingInvoice) predicate.BillingWorkflowConfig", + "line": 828 + }, + { + "kind": "func", + "name": "HasBillingProfile", + "signature": "func HasBillingProfile() predicate.BillingWorkflowConfig", + "line": 840 + }, + { + "kind": "func", + "name": "HasBillingProfileWith", + "signature": "func HasBillingProfileWith(preds ...predicate.BillingProfile) predicate.BillingWorkflowConfig", + "line": 851 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.BillingWorkflowConfig", + "line": 863 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.BillingWorkflowConfig", + "line": 874 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.BillingWorkflowConfig) predicate.BillingWorkflowConfig", + "line": 886 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.BillingWorkflowConfig) predicate.BillingWorkflowConfig", + "line": 891 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.BillingWorkflowConfig) predicate.BillingWorkflowConfig", + "line": 896 + } + ], + "line_count": 898 + }, + "openmeter/ent/db/billingworkflowconfig_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkflowConfigCreate", + "signature": "type BillingWorkflowConfigCreate struct", + "line": 25 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNamespace(v string) *BillingWorkflowConfigCreate", + "line": 33 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetCreatedAt(v time.Time) *BillingWorkflowConfigCreate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableCreatedAt(v *time.Time) *BillingWorkflowConfigCreate", + "line": 45 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetUpdatedAt(v time.Time) *BillingWorkflowConfigCreate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableUpdatedAt(v *time.Time) *BillingWorkflowConfigCreate", + "line": 59 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetDeletedAt(v time.Time) *BillingWorkflowConfigCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableDeletedAt(v *time.Time) *BillingWorkflowConfigCreate", + "line": 73 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetTaxCodeID(v string) *BillingWorkflowConfigCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableTaxCodeID(v *string) *BillingWorkflowConfigCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *BillingWorkflowConfigCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingWorkflowConfigCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_c *BillingWorkflowConfigCreate) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_c *BillingWorkflowConfigCreate) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_c *BillingWorkflowConfigCreate) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigCreate", + "line": 127 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigCreate", + "line": 133 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigCreate", + "line": 139 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigCreate", + "line": 145 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigCreate", + "line": 151 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (_c *BillingWorkflowConfigCreate) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxSettings", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableInvoiceDefaultTaxSettings(v *productcatalog.TaxConfig) *BillingWorkflowConfigCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (_c *BillingWorkflowConfigCreate) SetTaxEnabled(v bool) *BillingWorkflowConfigCreate", + "line": 171 + }, + { + "kind": "func", + "name": "SetNillableTaxEnabled", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableTaxEnabled(v *bool) *BillingWorkflowConfigCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (_c *BillingWorkflowConfigCreate) SetTaxEnforced(v bool) *BillingWorkflowConfigCreate", + "line": 185 + }, + { + "kind": "func", + "name": "SetNillableTaxEnforced", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableTaxEnforced(v *bool) *BillingWorkflowConfigCreate", + "line": 191 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetID(v string) *BillingWorkflowConfigCreate", + "line": 199 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableID(v *string) *BillingWorkflowConfigCreate", + "line": 205 + }, + { + "kind": "func", + "name": "SetBillingInvoicesID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetBillingInvoicesID(id string) *BillingWorkflowConfigCreate", + "line": 213 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoicesID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableBillingInvoicesID(id *string) *BillingWorkflowConfigCreate", + "line": 219 + }, + { + "kind": "func", + "name": "SetBillingInvoices", + "signature": "func (_c *BillingWorkflowConfigCreate) SetBillingInvoices(v *BillingInvoice) *BillingWorkflowConfigCreate", + "line": 227 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetBillingProfileID(id string) *BillingWorkflowConfigCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_c *BillingWorkflowConfigCreate) SetNillableBillingProfileID(id *string) *BillingWorkflowConfigCreate", + "line": 238 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_c *BillingWorkflowConfigCreate) SetBillingProfile(v *BillingProfile) *BillingWorkflowConfigCreate", + "line": 246 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *BillingWorkflowConfigCreate) SetTaxCode(v *TaxCode) *BillingWorkflowConfigCreate", + "line": 251 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *BillingWorkflowConfigCreate) Mutation() *BillingWorkflowConfigMutation", + "line": 256 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingWorkflowConfigCreate) Save(ctx context.Context) (*BillingWorkflowConfig, error)", + "line": 261 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingWorkflowConfigCreate) SaveX(ctx context.Context) *BillingWorkflowConfig", + "line": 267 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingWorkflowConfigCreate) Exec(ctx context.Context) error", + "line": 276 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingWorkflowConfigCreate) ExecX(ctx context.Context)", + "line": 282 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *BillingWorkflowConfigCreate) defaults()", + "line": 289 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *BillingWorkflowConfigCreate) check() error", + "line": 313 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *BillingWorkflowConfigCreate) sqlSave(ctx context.Context) (*BillingWorkflowConfig, error)", + "line": 383 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *BillingWorkflowConfigCreate) createSpec() (*BillingWorkflowConfig, *sqlgraph.CreateSpec)", + "line": 406 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingWorkflowConfigCreate) OnConflict(opts ...sql.ConflictOption) *BillingWorkflowConfigUpsertOne", + "line": 548 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingWorkflowConfigCreate) OnConflictColumns(columns ...string) *BillingWorkflowConfigUpsertOne", + "line": 561 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsert) SetUpdatedAt(v time.Time) *BillingWorkflowConfigUpsert", + "line": 582 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateUpdatedAt() *BillingWorkflowConfigUpsert", + "line": 588 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsert) SetDeletedAt(v time.Time) *BillingWorkflowConfigUpsert", + "line": 594 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateDeletedAt() *BillingWorkflowConfigUpsert", + "line": 600 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsert) ClearDeletedAt() *BillingWorkflowConfigUpsert", + "line": 606 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsert) SetTaxCodeID(v string) *BillingWorkflowConfigUpsert", + "line": 612 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateTaxCodeID() *BillingWorkflowConfigUpsert", + "line": 618 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsert) ClearTaxCodeID() *BillingWorkflowConfigUpsert", + "line": 624 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigUpsert", + "line": 630 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateTaxBehavior() *BillingWorkflowConfigUpsert", + "line": 636 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsert) ClearTaxBehavior() *BillingWorkflowConfigUpsert", + "line": 642 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsert) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigUpsert", + "line": 648 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateCollectionAlignment() *BillingWorkflowConfigUpsert", + "line": 654 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsert) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpsert", + "line": 660 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateAnchoredAlignmentDetail() *BillingWorkflowConfigUpsert", + "line": 666 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsert) ClearAnchoredAlignmentDetail() *BillingWorkflowConfigUpsert", + "line": 672 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsert) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsert", + "line": 678 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateLineCollectionPeriod() *BillingWorkflowConfigUpsert", + "line": 684 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigUpsert", + "line": 690 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceAutoAdvance() *BillingWorkflowConfigUpsert", + "line": 696 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsert", + "line": 702 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceDraftPeriod() *BillingWorkflowConfigUpsert", + "line": 708 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigUpsert", + "line": 714 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceDueAfter() *BillingWorkflowConfigUpsert", + "line": 720 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigUpsert", + "line": 726 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceCollectionMethod() *BillingWorkflowConfigUpsert", + "line": 732 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigUpsert", + "line": 738 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceProgressiveBilling() *BillingWorkflowConfigUpsert", + "line": 744 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsert) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigUpsert", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsert", + "line": 756 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsert) ClearInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsert", + "line": 762 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsert) SetTaxEnabled(v bool) *BillingWorkflowConfigUpsert", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateTaxEnabled() *BillingWorkflowConfigUpsert", + "line": 774 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsert) SetTaxEnforced(v bool) *BillingWorkflowConfigUpsert", + "line": 780 + }, + { + "kind": "func", + "name": "UpdateTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsert) UpdateTaxEnforced() *BillingWorkflowConfigUpsert", + "line": 786 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateNewValues() *BillingWorkflowConfigUpsertOne", + "line": 802 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingWorkflowConfigUpsertOne) Ignore() *BillingWorkflowConfigUpsertOne", + "line": 824 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingWorkflowConfigUpsertOne) DoNothing() *BillingWorkflowConfigUpsertOne", + "line": 831 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingWorkflowConfigUpsertOne) Update(set func(*BillingWorkflowConfigUpsert)) *BillingWorkflowConfigUpsertOne", + "line": 838 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetUpdatedAt(v time.Time) *BillingWorkflowConfigUpsertOne", + "line": 846 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateUpdatedAt() *BillingWorkflowConfigUpsertOne", + "line": 853 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetDeletedAt(v time.Time) *BillingWorkflowConfigUpsertOne", + "line": 860 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateDeletedAt() *BillingWorkflowConfigUpsertOne", + "line": 867 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ClearDeletedAt() *BillingWorkflowConfigUpsertOne", + "line": 874 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetTaxCodeID(v string) *BillingWorkflowConfigUpsertOne", + "line": 881 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateTaxCodeID() *BillingWorkflowConfigUpsertOne", + "line": 888 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ClearTaxCodeID() *BillingWorkflowConfigUpsertOne", + "line": 895 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigUpsertOne", + "line": 902 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateTaxBehavior() *BillingWorkflowConfigUpsertOne", + "line": 909 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ClearTaxBehavior() *BillingWorkflowConfigUpsertOne", + "line": 916 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigUpsertOne", + "line": 923 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateCollectionAlignment() *BillingWorkflowConfigUpsertOne", + "line": 930 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpsertOne", + "line": 937 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateAnchoredAlignmentDetail() *BillingWorkflowConfigUpsertOne", + "line": 944 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ClearAnchoredAlignmentDetail() *BillingWorkflowConfigUpsertOne", + "line": 951 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsertOne", + "line": 958 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateLineCollectionPeriod() *BillingWorkflowConfigUpsertOne", + "line": 965 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigUpsertOne", + "line": 972 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceAutoAdvance() *BillingWorkflowConfigUpsertOne", + "line": 979 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsertOne", + "line": 986 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceDraftPeriod() *BillingWorkflowConfigUpsertOne", + "line": 993 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigUpsertOne", + "line": 1000 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceDueAfter() *BillingWorkflowConfigUpsertOne", + "line": 1007 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigUpsertOne", + "line": 1014 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceCollectionMethod() *BillingWorkflowConfigUpsertOne", + "line": 1021 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigUpsertOne", + "line": 1028 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceProgressiveBilling() *BillingWorkflowConfigUpsertOne", + "line": 1035 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigUpsertOne", + "line": 1042 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsertOne", + "line": 1049 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ClearInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsertOne", + "line": 1056 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetTaxEnabled(v bool) *BillingWorkflowConfigUpsertOne", + "line": 1063 + }, + { + "kind": "func", + "name": "UpdateTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateTaxEnabled() *BillingWorkflowConfigUpsertOne", + "line": 1070 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsertOne) SetTaxEnforced(v bool) *BillingWorkflowConfigUpsertOne", + "line": 1077 + }, + { + "kind": "func", + "name": "UpdateTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsertOne) UpdateTaxEnforced() *BillingWorkflowConfigUpsertOne", + "line": 1084 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingWorkflowConfigUpsertOne) Exec(ctx context.Context) error", + "line": 1091 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ExecX(ctx context.Context)", + "line": 1099 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *BillingWorkflowConfigUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1106 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *BillingWorkflowConfigUpsertOne) IDX(ctx context.Context) string", + "line": 1120 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigCreateBulk", + "signature": "type BillingWorkflowConfigCreateBulk struct", + "line": 1129 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) Save(ctx context.Context) ([]*BillingWorkflowConfig, error)", + "line": 1137 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) SaveX(ctx context.Context) []*BillingWorkflowConfig", + "line": 1193 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) Exec(ctx context.Context) error", + "line": 1202 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) ExecX(ctx context.Context)", + "line": 1208 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) OnConflict(opts ...sql.ConflictOption) *BillingWorkflowConfigUpsertBulk", + "line": 1229 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *BillingWorkflowConfigCreateBulk) OnConflictColumns(columns ...string) *BillingWorkflowConfigUpsertBulk", + "line": 1242 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigUpsertBulk", + "signature": "type BillingWorkflowConfigUpsertBulk struct", + "line": 1251 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateNewValues() *BillingWorkflowConfigUpsertBulk", + "line": 1266 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) Ignore() *BillingWorkflowConfigUpsertBulk", + "line": 1290 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) DoNothing() *BillingWorkflowConfigUpsertBulk", + "line": 1297 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) Update(set func(*BillingWorkflowConfigUpsert)) *BillingWorkflowConfigUpsertBulk", + "line": 1304 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetUpdatedAt(v time.Time) *BillingWorkflowConfigUpsertBulk", + "line": 1312 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateUpdatedAt() *BillingWorkflowConfigUpsertBulk", + "line": 1319 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetDeletedAt(v time.Time) *BillingWorkflowConfigUpsertBulk", + "line": 1326 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateDeletedAt() *BillingWorkflowConfigUpsertBulk", + "line": 1333 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ClearDeletedAt() *BillingWorkflowConfigUpsertBulk", + "line": 1340 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetTaxCodeID(v string) *BillingWorkflowConfigUpsertBulk", + "line": 1347 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateTaxCodeID() *BillingWorkflowConfigUpsertBulk", + "line": 1354 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ClearTaxCodeID() *BillingWorkflowConfigUpsertBulk", + "line": 1361 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigUpsertBulk", + "line": 1368 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateTaxBehavior() *BillingWorkflowConfigUpsertBulk", + "line": 1375 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ClearTaxBehavior() *BillingWorkflowConfigUpsertBulk", + "line": 1382 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigUpsertBulk", + "line": 1389 + }, + { + "kind": "func", + "name": "UpdateCollectionAlignment", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateCollectionAlignment() *BillingWorkflowConfigUpsertBulk", + "line": 1396 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpsertBulk", + "line": 1403 + }, + { + "kind": "func", + "name": "UpdateAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateAnchoredAlignmentDetail() *BillingWorkflowConfigUpsertBulk", + "line": 1410 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ClearAnchoredAlignmentDetail() *BillingWorkflowConfigUpsertBulk", + "line": 1417 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsertBulk", + "line": 1424 + }, + { + "kind": "func", + "name": "UpdateLineCollectionPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateLineCollectionPeriod() *BillingWorkflowConfigUpsertBulk", + "line": 1431 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigUpsertBulk", + "line": 1438 + }, + { + "kind": "func", + "name": "UpdateInvoiceAutoAdvance", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceAutoAdvance() *BillingWorkflowConfigUpsertBulk", + "line": 1445 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpsertBulk", + "line": 1452 + }, + { + "kind": "func", + "name": "UpdateInvoiceDraftPeriod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceDraftPeriod() *BillingWorkflowConfigUpsertBulk", + "line": 1459 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigUpsertBulk", + "line": 1466 + }, + { + "kind": "func", + "name": "UpdateInvoiceDueAfter", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceDueAfter() *BillingWorkflowConfigUpsertBulk", + "line": 1473 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigUpsertBulk", + "line": 1480 + }, + { + "kind": "func", + "name": "UpdateInvoiceCollectionMethod", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceCollectionMethod() *BillingWorkflowConfigUpsertBulk", + "line": 1487 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigUpsertBulk", + "line": 1494 + }, + { + "kind": "func", + "name": "UpdateInvoiceProgressiveBilling", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceProgressiveBilling() *BillingWorkflowConfigUpsertBulk", + "line": 1501 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigUpsertBulk", + "line": 1508 + }, + { + "kind": "func", + "name": "UpdateInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsertBulk", + "line": 1515 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ClearInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpsertBulk", + "line": 1522 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetTaxEnabled(v bool) *BillingWorkflowConfigUpsertBulk", + "line": 1529 + }, + { + "kind": "func", + "name": "UpdateTaxEnabled", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateTaxEnabled() *BillingWorkflowConfigUpsertBulk", + "line": 1536 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) SetTaxEnforced(v bool) *BillingWorkflowConfigUpsertBulk", + "line": 1543 + }, + { + "kind": "func", + "name": "UpdateTaxEnforced", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) UpdateTaxEnforced() *BillingWorkflowConfigUpsertBulk", + "line": 1550 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) Exec(ctx context.Context) error", + "line": 1557 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *BillingWorkflowConfigUpsertBulk) ExecX(ctx context.Context)", + "line": 1573 + } + ], + "line_count": 1577 + }, + "openmeter/ent/db/billingworkflowconfig_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkflowConfigDelete", + "signature": "type BillingWorkflowConfigDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingWorkflowConfigDelete) Where(ps ...predicate.BillingWorkflowConfig) *BillingWorkflowConfigDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingWorkflowConfigDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingWorkflowConfigDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *BillingWorkflowConfigDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigDeleteOne", + "signature": "type BillingWorkflowConfigDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *BillingWorkflowConfigDeleteOne) Where(ps ...predicate.BillingWorkflowConfig) *BillingWorkflowConfigDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *BillingWorkflowConfigDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *BillingWorkflowConfigDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/billingworkflowconfig_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkflowConfigQuery", + "signature": "type BillingWorkflowConfigQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *BillingWorkflowConfigQuery) Where(ps ...predicate.BillingWorkflowConfig) *BillingWorkflowConfigQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *BillingWorkflowConfigQuery) Limit(limit int) *BillingWorkflowConfigQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *BillingWorkflowConfigQuery) Offset(offset int) *BillingWorkflowConfigQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *BillingWorkflowConfigQuery) Unique(unique bool) *BillingWorkflowConfigQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *BillingWorkflowConfigQuery) Order(o ...billingworkflowconfig.OrderOption) *BillingWorkflowConfigQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryBillingInvoices", + "signature": "func (_q *BillingWorkflowConfigQuery) QueryBillingInvoices() *BillingInvoiceQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryBillingProfile", + "signature": "func (_q *BillingWorkflowConfigQuery) QueryBillingProfile() *BillingProfileQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *BillingWorkflowConfigQuery) QueryTaxCode() *TaxCodeQuery", + "line": 115 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *BillingWorkflowConfigQuery) First(ctx context.Context) (*BillingWorkflowConfig, error)", + "line": 138 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *BillingWorkflowConfigQuery) FirstX(ctx context.Context) *BillingWorkflowConfig", + "line": 150 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *BillingWorkflowConfigQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *BillingWorkflowConfigQuery) FirstIDX(ctx context.Context) string", + "line": 173 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *BillingWorkflowConfigQuery) Only(ctx context.Context) (*BillingWorkflowConfig, error)", + "line": 184 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *BillingWorkflowConfigQuery) OnlyX(ctx context.Context) *BillingWorkflowConfig", + "line": 200 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *BillingWorkflowConfigQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *BillingWorkflowConfigQuery) OnlyIDX(ctx context.Context) string", + "line": 228 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *BillingWorkflowConfigQuery) All(ctx context.Context) ([]*BillingWorkflowConfig, error)", + "line": 237 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *BillingWorkflowConfigQuery) AllX(ctx context.Context) []*BillingWorkflowConfig", + "line": 247 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *BillingWorkflowConfigQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *BillingWorkflowConfigQuery) IDsX(ctx context.Context) []string", + "line": 268 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *BillingWorkflowConfigQuery) Count(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *BillingWorkflowConfigQuery) CountX(ctx context.Context) int", + "line": 286 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *BillingWorkflowConfigQuery) Exist(ctx context.Context) (bool, error)", + "line": 295 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *BillingWorkflowConfigQuery) ExistX(ctx context.Context) bool", + "line": 308 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *BillingWorkflowConfigQuery) Clone() *BillingWorkflowConfigQuery", + "line": 318 + }, + { + "kind": "func", + "name": "WithBillingInvoices", + "signature": "func (_q *BillingWorkflowConfigQuery) WithBillingInvoices(opts ...func(*BillingInvoiceQuery)) *BillingWorkflowConfigQuery", + "line": 339 + }, + { + "kind": "func", + "name": "WithBillingProfile", + "signature": "func (_q *BillingWorkflowConfigQuery) WithBillingProfile(opts ...func(*BillingProfileQuery)) *BillingWorkflowConfigQuery", + "line": 350 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *BillingWorkflowConfigQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *BillingWorkflowConfigQuery", + "line": 361 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *BillingWorkflowConfigQuery) GroupBy(field string, fields ...string) *BillingWorkflowConfigGroupBy", + "line": 384 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *BillingWorkflowConfigQuery) Select(fields ...string) *BillingWorkflowConfigSelect", + "line": 405 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *BillingWorkflowConfigQuery) Aggregate(fns ...AggregateFunc) *BillingWorkflowConfigSelect", + "line": 414 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *BillingWorkflowConfigQuery) prepareQuery(ctx context.Context) error", + "line": 418 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *BillingWorkflowConfigQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BillingWorkflowConfig, error)", + "line": 444 + }, + { + "kind": "func", + "name": "loadBillingInvoices", + "signature": "func (_q *BillingWorkflowConfigQuery) loadBillingInvoices(ctx context.Context, query *BillingInvoiceQuery, nodes []*BillingWorkflowConfig, init func(*BillingWorkflowConfig), assign func(*BillingWorkflowConfig, *BillingInvoice)) error", + "line": 496 + }, + { + "kind": "func", + "name": "loadBillingProfile", + "signature": "func (_q *BillingWorkflowConfigQuery) loadBillingProfile(ctx context.Context, query *BillingProfileQuery, nodes []*BillingWorkflowConfig, init func(*BillingWorkflowConfig), assign func(*BillingWorkflowConfig, *BillingProfile)) error", + "line": 523 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *BillingWorkflowConfigQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*BillingWorkflowConfig, init func(*BillingWorkflowConfig), assign func(*BillingWorkflowConfig, *TaxCode)) error", + "line": 550 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *BillingWorkflowConfigQuery) sqlCount(ctx context.Context) (int, error)", + "line": 583 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *BillingWorkflowConfigQuery) querySpec() *sqlgraph.QuerySpec", + "line": 595 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *BillingWorkflowConfigQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 638 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *BillingWorkflowConfigQuery) ForUpdate(opts ...sql.LockOption) *BillingWorkflowConfigQuery", + "line": 676 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *BillingWorkflowConfigQuery) ForShare(opts ...sql.LockOption) *BillingWorkflowConfigQuery", + "line": 689 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigGroupBy", + "signature": "type BillingWorkflowConfigGroupBy struct", + "line": 700 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *BillingWorkflowConfigGroupBy) Aggregate(fns ...AggregateFunc) *BillingWorkflowConfigGroupBy", + "line": 706 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *BillingWorkflowConfigGroupBy) Scan(ctx context.Context, v any) error", + "line": 712 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *BillingWorkflowConfigGroupBy) sqlScan(ctx context.Context, root *BillingWorkflowConfigQuery, v any) error", + "line": 720 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigSelect", + "signature": "type BillingWorkflowConfigSelect struct", + "line": 748 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *BillingWorkflowConfigSelect) Aggregate(fns ...AggregateFunc) *BillingWorkflowConfigSelect", + "line": 754 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *BillingWorkflowConfigSelect) Scan(ctx context.Context, v any) error", + "line": 760 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *BillingWorkflowConfigSelect) sqlScan(ctx context.Context, root *BillingWorkflowConfigQuery, v any) error", + "line": 768 + } + ], + "line_count": 787 + }, + "openmeter/ent/db/billingworkflowconfig_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingWorkflowConfigUpdate", + "signature": "type BillingWorkflowConfigUpdate struct", + "line": 25 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingWorkflowConfigUpdate) Where(ps ...predicate.BillingWorkflowConfig) *BillingWorkflowConfigUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetUpdatedAt(v time.Time) *BillingWorkflowConfigUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetDeletedAt(v time.Time) *BillingWorkflowConfigUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableDeletedAt(v *time.Time) *BillingWorkflowConfigUpdate", + "line": 50 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearDeletedAt() *BillingWorkflowConfigUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetTaxCodeID(v string) *BillingWorkflowConfigUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableTaxCodeID(v *string) *BillingWorkflowConfigUpdate", + "line": 70 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearTaxCodeID() *BillingWorkflowConfigUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingWorkflowConfigUpdate", + "line": 90 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearTaxBehavior() *BillingWorkflowConfigUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetNillableCollectionAlignment", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableCollectionAlignment(v *billing.AlignmentKind) *BillingWorkflowConfigUpdate", + "line": 110 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearAnchoredAlignmentDetail() *BillingWorkflowConfigUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableLineCollectionPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableLineCollectionPeriod(v *datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAutoAdvance", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceAutoAdvance(v *bool) *BillingWorkflowConfigUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDraftPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceDraftPeriod(v *datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDueAfter", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceDueAfter(v *datetime.ISODurationString) *BillingWorkflowConfigUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigUpdate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillableInvoiceCollectionMethod", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceCollectionMethod(v *billing.CollectionMethod) *BillingWorkflowConfigUpdate", + "line": 192 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigUpdate", + "line": 200 + }, + { + "kind": "func", + "name": "SetNillableInvoiceProgressiveBilling", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceProgressiveBilling(v *bool) *BillingWorkflowConfigUpdate", + "line": 206 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigUpdate", + "line": 214 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableInvoiceDefaultTaxSettings(v *productcatalog.TaxConfig) *BillingWorkflowConfigUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpdate", + "line": 228 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetTaxEnabled(v bool) *BillingWorkflowConfigUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "SetNillableTaxEnabled", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableTaxEnabled(v *bool) *BillingWorkflowConfigUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetTaxEnforced(v bool) *BillingWorkflowConfigUpdate", + "line": 248 + }, + { + "kind": "func", + "name": "SetNillableTaxEnforced", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableTaxEnforced(v *bool) *BillingWorkflowConfigUpdate", + "line": 254 + }, + { + "kind": "func", + "name": "SetBillingInvoicesID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetBillingInvoicesID(id string) *BillingWorkflowConfigUpdate", + "line": 262 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoicesID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableBillingInvoicesID(id *string) *BillingWorkflowConfigUpdate", + "line": 268 + }, + { + "kind": "func", + "name": "SetBillingInvoices", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetBillingInvoices(v *BillingInvoice) *BillingWorkflowConfigUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetBillingProfileID(id string) *BillingWorkflowConfigUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetNillableBillingProfileID(id *string) *BillingWorkflowConfigUpdate", + "line": 287 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetBillingProfile(v *BillingProfile) *BillingWorkflowConfigUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingWorkflowConfigUpdate) SetTaxCode(v *TaxCode) *BillingWorkflowConfigUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingWorkflowConfigUpdate) Mutation() *BillingWorkflowConfigMutation", + "line": 305 + }, + { + "kind": "func", + "name": "ClearBillingInvoices", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearBillingInvoices() *BillingWorkflowConfigUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "ClearBillingProfile", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearBillingProfile() *BillingWorkflowConfigUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingWorkflowConfigUpdate) ClearTaxCode() *BillingWorkflowConfigUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingWorkflowConfigUpdate) Save(ctx context.Context) (int, error)", + "line": 328 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingWorkflowConfigUpdate) SaveX(ctx context.Context) int", + "line": 334 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingWorkflowConfigUpdate) Exec(ctx context.Context) error", + "line": 343 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingWorkflowConfigUpdate) ExecX(ctx context.Context)", + "line": 349 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingWorkflowConfigUpdate) defaults()", + "line": 356 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingWorkflowConfigUpdate) check() error", + "line": 364 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingWorkflowConfigUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 393 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfigUpdateOne", + "signature": "type BillingWorkflowConfigUpdateOne struct", + "line": 559 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetUpdatedAt(v time.Time) *BillingWorkflowConfigUpdateOne", + "line": 567 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetDeletedAt(v time.Time) *BillingWorkflowConfigUpdateOne", + "line": 573 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableDeletedAt(v *time.Time) *BillingWorkflowConfigUpdateOne", + "line": 579 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearDeletedAt() *BillingWorkflowConfigUpdateOne", + "line": 587 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetTaxCodeID(v string) *BillingWorkflowConfigUpdateOne", + "line": 593 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableTaxCodeID(v *string) *BillingWorkflowConfigUpdateOne", + "line": 599 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearTaxCodeID() *BillingWorkflowConfigUpdateOne", + "line": 607 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *BillingWorkflowConfigUpdateOne", + "line": 613 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *BillingWorkflowConfigUpdateOne", + "line": 619 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearTaxBehavior() *BillingWorkflowConfigUpdateOne", + "line": 627 + }, + { + "kind": "func", + "name": "SetCollectionAlignment", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetCollectionAlignment(v billing.AlignmentKind) *BillingWorkflowConfigUpdateOne", + "line": 633 + }, + { + "kind": "func", + "name": "SetNillableCollectionAlignment", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableCollectionAlignment(v *billing.AlignmentKind) *BillingWorkflowConfigUpdateOne", + "line": 639 + }, + { + "kind": "func", + "name": "SetAnchoredAlignmentDetail", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetAnchoredAlignmentDetail(v *billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpdateOne", + "line": 647 + }, + { + "kind": "func", + "name": "ClearAnchoredAlignmentDetail", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearAnchoredAlignmentDetail() *BillingWorkflowConfigUpdateOne", + "line": 653 + }, + { + "kind": "func", + "name": "SetLineCollectionPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetLineCollectionPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 659 + }, + { + "kind": "func", + "name": "SetNillableLineCollectionPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableLineCollectionPeriod(v *datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 665 + }, + { + "kind": "func", + "name": "SetInvoiceAutoAdvance", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceAutoAdvance(v bool) *BillingWorkflowConfigUpdateOne", + "line": 673 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAutoAdvance", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceAutoAdvance(v *bool) *BillingWorkflowConfigUpdateOne", + "line": 679 + }, + { + "kind": "func", + "name": "SetInvoiceDraftPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceDraftPeriod(v datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 687 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDraftPeriod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceDraftPeriod(v *datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 693 + }, + { + "kind": "func", + "name": "SetInvoiceDueAfter", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceDueAfter(v datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 701 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDueAfter", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceDueAfter(v *datetime.ISODurationString) *BillingWorkflowConfigUpdateOne", + "line": 707 + }, + { + "kind": "func", + "name": "SetInvoiceCollectionMethod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceCollectionMethod(v billing.CollectionMethod) *BillingWorkflowConfigUpdateOne", + "line": 715 + }, + { + "kind": "func", + "name": "SetNillableInvoiceCollectionMethod", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceCollectionMethod(v *billing.CollectionMethod) *BillingWorkflowConfigUpdateOne", + "line": 721 + }, + { + "kind": "func", + "name": "SetInvoiceProgressiveBilling", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceProgressiveBilling(v bool) *BillingWorkflowConfigUpdateOne", + "line": 729 + }, + { + "kind": "func", + "name": "SetNillableInvoiceProgressiveBilling", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceProgressiveBilling(v *bool) *BillingWorkflowConfigUpdateOne", + "line": 735 + }, + { + "kind": "func", + "name": "SetInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetInvoiceDefaultTaxSettings(v productcatalog.TaxConfig) *BillingWorkflowConfigUpdateOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetNillableInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableInvoiceDefaultTaxSettings(v *productcatalog.TaxConfig) *BillingWorkflowConfigUpdateOne", + "line": 749 + }, + { + "kind": "func", + "name": "ClearInvoiceDefaultTaxSettings", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearInvoiceDefaultTaxSettings() *BillingWorkflowConfigUpdateOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetTaxEnabled", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetTaxEnabled(v bool) *BillingWorkflowConfigUpdateOne", + "line": 763 + }, + { + "kind": "func", + "name": "SetNillableTaxEnabled", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableTaxEnabled(v *bool) *BillingWorkflowConfigUpdateOne", + "line": 769 + }, + { + "kind": "func", + "name": "SetTaxEnforced", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetTaxEnforced(v bool) *BillingWorkflowConfigUpdateOne", + "line": 777 + }, + { + "kind": "func", + "name": "SetNillableTaxEnforced", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableTaxEnforced(v *bool) *BillingWorkflowConfigUpdateOne", + "line": 783 + }, + { + "kind": "func", + "name": "SetBillingInvoicesID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetBillingInvoicesID(id string) *BillingWorkflowConfigUpdateOne", + "line": 791 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoicesID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableBillingInvoicesID(id *string) *BillingWorkflowConfigUpdateOne", + "line": 797 + }, + { + "kind": "func", + "name": "SetBillingInvoices", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetBillingInvoices(v *BillingInvoice) *BillingWorkflowConfigUpdateOne", + "line": 805 + }, + { + "kind": "func", + "name": "SetBillingProfileID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetBillingProfileID(id string) *BillingWorkflowConfigUpdateOne", + "line": 810 + }, + { + "kind": "func", + "name": "SetNillableBillingProfileID", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetNillableBillingProfileID(id *string) *BillingWorkflowConfigUpdateOne", + "line": 816 + }, + { + "kind": "func", + "name": "SetBillingProfile", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetBillingProfile(v *BillingProfile) *BillingWorkflowConfigUpdateOne", + "line": 824 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SetTaxCode(v *TaxCode) *BillingWorkflowConfigUpdateOne", + "line": 829 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) Mutation() *BillingWorkflowConfigMutation", + "line": 834 + }, + { + "kind": "func", + "name": "ClearBillingInvoices", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearBillingInvoices() *BillingWorkflowConfigUpdateOne", + "line": 839 + }, + { + "kind": "func", + "name": "ClearBillingProfile", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearBillingProfile() *BillingWorkflowConfigUpdateOne", + "line": 845 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ClearTaxCode() *BillingWorkflowConfigUpdateOne", + "line": 851 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) Where(ps ...predicate.BillingWorkflowConfig) *BillingWorkflowConfigUpdateOne", + "line": 857 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) Select(field string, fields ...string) *BillingWorkflowConfigUpdateOne", + "line": 864 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) Save(ctx context.Context) (*BillingWorkflowConfig, error)", + "line": 870 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) SaveX(ctx context.Context) *BillingWorkflowConfig", + "line": 876 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) Exec(ctx context.Context) error", + "line": 885 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) ExecX(ctx context.Context)", + "line": 891 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) defaults()", + "line": 898 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) check() error", + "line": 906 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *BillingWorkflowConfigUpdateOne) sqlSave(ctx context.Context) (_node *BillingWorkflowConfig, err error)", + "line": 935 + } + ], + "line_count": 1118 + }, + "openmeter/ent/db/charge.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 20 + }, + { + "kind": "struct", + "name": "ChargeEdges", + "signature": "type ChargeEdges struct", + "line": 47 + }, + { + "kind": "func", + "name": "FlatFeeOrErr", + "signature": "func (e ChargeEdges) FlatFeeOrErr() (*ChargeFlatFee, error)", + "line": 67 + }, + { + "kind": "func", + "name": "CreditPurchaseOrErr", + "signature": "func (e ChargeEdges) CreditPurchaseOrErr() (*ChargeCreditPurchase, error)", + "line": 78 + }, + { + "kind": "func", + "name": "UsageBasedOrErr", + "signature": "func (e ChargeEdges) UsageBasedOrErr() (*ChargeUsageBased, error)", + "line": 89 + }, + { + "kind": "func", + "name": "BillingInvoiceLinesOrErr", + "signature": "func (e ChargeEdges) BillingInvoiceLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 100 + }, + { + "kind": "func", + "name": "BillingSplitLineGroupsOrErr", + "signature": "func (e ChargeEdges) BillingSplitLineGroupsOrErr() ([]*BillingInvoiceSplitLineGroup, error)", + "line": 109 + }, + { + "kind": "func", + "name": "CreditRealizationLineagesOrErr", + "signature": "func (e ChargeEdges) CreditRealizationLineagesOrErr() ([]*CreditRealizationLineage, error)", + "line": 118 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Charge) assignValues(columns []string, values []any) error", + "line": 143 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Charge) Value(name string) (ent.Value, error)", + "line": 217 + }, + { + "kind": "func", + "name": "QueryFlatFee", + "signature": "func (_m *Charge) QueryFlatFee() *ChargeFlatFeeQuery", + "line": 222 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_m *Charge) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 227 + }, + { + "kind": "func", + "name": "QueryUsageBased", + "signature": "func (_m *Charge) QueryUsageBased() *ChargeUsageBasedQuery", + "line": 232 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_m *Charge) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 237 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_m *Charge) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 242 + }, + { + "kind": "func", + "name": "QueryCreditRealizationLineages", + "signature": "func (_m *Charge) QueryCreditRealizationLineages() *CreditRealizationLineageQuery", + "line": 247 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Charge) Update() *ChargeUpdateOne", + "line": 254 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Charge) Unwrap() *Charge", + "line": 260 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Charge) String() string", + "line": 270 + } + ], + "line_count": 312 + }, + "openmeter/ent/db/charge/charge.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 105 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeID", + "signature": "func ByChargeFlatFeeID(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByChargeCreditPurchaseID", + "signature": "func ByChargeCreditPurchaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedID", + "signature": "func ByChargeUsageBasedID(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByFlatFeeField", + "signature": "func ByFlatFeeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByCreditPurchaseField", + "signature": "func ByCreditPurchaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 181 + }, + { + "kind": "func", + "name": "ByUsageBasedField", + "signature": "func ByUsageBasedField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLinesCount", + "signature": "func ByBillingInvoiceLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLines", + "signature": "func ByBillingInvoiceLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 202 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroupsCount", + "signature": "func ByBillingSplitLineGroupsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroups", + "signature": "func ByBillingSplitLineGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 216 + }, + { + "kind": "func", + "name": "ByCreditRealizationLineagesCount", + "signature": "func ByCreditRealizationLineagesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "ByCreditRealizationLineages", + "signature": "func ByCreditRealizationLineages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 230 + }, + { + "kind": "func", + "name": "newFlatFeeStep", + "signature": "func newFlatFeeStep() *sqlgraph.Step", + "line": 235 + }, + { + "kind": "func", + "name": "newCreditPurchaseStep", + "signature": "func newCreditPurchaseStep() *sqlgraph.Step", + "line": 242 + }, + { + "kind": "func", + "name": "newUsageBasedStep", + "signature": "func newUsageBasedStep() *sqlgraph.Step", + "line": 249 + }, + { + "kind": "func", + "name": "newBillingInvoiceLinesStep", + "signature": "func newBillingInvoiceLinesStep() *sqlgraph.Step", + "line": 256 + }, + { + "kind": "func", + "name": "newBillingSplitLineGroupsStep", + "signature": "func newBillingSplitLineGroupsStep() *sqlgraph.Step", + "line": 263 + }, + { + "kind": "func", + "name": "newCreditRealizationLineagesStep", + "signature": "func newCreditRealizationLineagesStep() *sqlgraph.Step", + "line": 270 + } + ], + "line_count": 276 + }, + "openmeter/ent/db/charge/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Charge", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Charge", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Charge", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Charge", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Charge", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Charge", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Charge", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Charge", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Charge", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Charge", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Charge", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Charge", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Charge", + "line": 75 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Charge", + "line": 80 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.Charge", + "line": 85 + }, + { + "kind": "func", + "name": "Type", + "signature": "func Type(v meta.ChargeType) predicate.Charge", + "line": 90 + }, + { + "kind": "func", + "name": "ChargeFlatFeeID", + "signature": "func ChargeFlatFeeID(v string) predicate.Charge", + "line": 96 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseID", + "signature": "func ChargeCreditPurchaseID(v string) predicate.Charge", + "line": 101 + }, + { + "kind": "func", + "name": "ChargeUsageBasedID", + "signature": "func ChargeUsageBasedID(v string) predicate.Charge", + "line": 106 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Charge", + "line": 111 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Charge", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Charge", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Charge", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Charge", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Charge", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Charge", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Charge", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Charge", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Charge", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Charge", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Charge", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Charge", + "line": 171 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Charge", + "line": 176 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Charge", + "line": 181 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Charge", + "line": 186 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Charge", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Charge", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Charge", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Charge", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Charge", + "line": 211 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Charge", + "line": 216 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Charge", + "line": 221 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Charge", + "line": 226 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Charge", + "line": 231 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Charge", + "line": 236 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Charge", + "line": 241 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Charge", + "line": 246 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Charge", + "line": 251 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Charge", + "line": 256 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Charge", + "line": 261 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.Charge", + "line": 266 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.Charge", + "line": 271 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.Charge", + "line": 276 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.Charge", + "line": 281 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.Charge", + "line": 286 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.Charge", + "line": 291 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.Charge", + "line": 296 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.Charge", + "line": 301 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.Charge", + "line": 306 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.Charge", + "line": 311 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.Charge", + "line": 316 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.Charge", + "line": 321 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.Charge", + "line": 326 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.Charge", + "line": 331 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.Charge", + "line": 336 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v meta.ChargeType) predicate.Charge", + "line": 341 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v meta.ChargeType) predicate.Charge", + "line": 347 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...meta.ChargeType) predicate.Charge", + "line": 353 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...meta.ChargeType) predicate.Charge", + "line": 362 + }, + { + "kind": "func", + "name": "TypeGT", + "signature": "func TypeGT(v meta.ChargeType) predicate.Charge", + "line": 371 + }, + { + "kind": "func", + "name": "TypeGTE", + "signature": "func TypeGTE(v meta.ChargeType) predicate.Charge", + "line": 377 + }, + { + "kind": "func", + "name": "TypeLT", + "signature": "func TypeLT(v meta.ChargeType) predicate.Charge", + "line": 383 + }, + { + "kind": "func", + "name": "TypeLTE", + "signature": "func TypeLTE(v meta.ChargeType) predicate.Charge", + "line": 389 + }, + { + "kind": "func", + "name": "TypeContains", + "signature": "func TypeContains(v meta.ChargeType) predicate.Charge", + "line": 395 + }, + { + "kind": "func", + "name": "TypeHasPrefix", + "signature": "func TypeHasPrefix(v meta.ChargeType) predicate.Charge", + "line": 401 + }, + { + "kind": "func", + "name": "TypeHasSuffix", + "signature": "func TypeHasSuffix(v meta.ChargeType) predicate.Charge", + "line": 407 + }, + { + "kind": "func", + "name": "TypeEqualFold", + "signature": "func TypeEqualFold(v meta.ChargeType) predicate.Charge", + "line": 413 + }, + { + "kind": "func", + "name": "TypeContainsFold", + "signature": "func TypeContainsFold(v meta.ChargeType) predicate.Charge", + "line": 419 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDEQ", + "signature": "func ChargeFlatFeeIDEQ(v string) predicate.Charge", + "line": 425 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDNEQ", + "signature": "func ChargeFlatFeeIDNEQ(v string) predicate.Charge", + "line": 430 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDIn", + "signature": "func ChargeFlatFeeIDIn(vs ...string) predicate.Charge", + "line": 435 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDNotIn", + "signature": "func ChargeFlatFeeIDNotIn(vs ...string) predicate.Charge", + "line": 440 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDGT", + "signature": "func ChargeFlatFeeIDGT(v string) predicate.Charge", + "line": 445 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDGTE", + "signature": "func ChargeFlatFeeIDGTE(v string) predicate.Charge", + "line": 450 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDLT", + "signature": "func ChargeFlatFeeIDLT(v string) predicate.Charge", + "line": 455 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDLTE", + "signature": "func ChargeFlatFeeIDLTE(v string) predicate.Charge", + "line": 460 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDContains", + "signature": "func ChargeFlatFeeIDContains(v string) predicate.Charge", + "line": 465 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDHasPrefix", + "signature": "func ChargeFlatFeeIDHasPrefix(v string) predicate.Charge", + "line": 470 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDHasSuffix", + "signature": "func ChargeFlatFeeIDHasSuffix(v string) predicate.Charge", + "line": 475 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDIsNil", + "signature": "func ChargeFlatFeeIDIsNil() predicate.Charge", + "line": 480 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDNotNil", + "signature": "func ChargeFlatFeeIDNotNil() predicate.Charge", + "line": 485 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDEqualFold", + "signature": "func ChargeFlatFeeIDEqualFold(v string) predicate.Charge", + "line": 490 + }, + { + "kind": "func", + "name": "ChargeFlatFeeIDContainsFold", + "signature": "func ChargeFlatFeeIDContainsFold(v string) predicate.Charge", + "line": 495 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDEQ", + "signature": "func ChargeCreditPurchaseIDEQ(v string) predicate.Charge", + "line": 500 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDNEQ", + "signature": "func ChargeCreditPurchaseIDNEQ(v string) predicate.Charge", + "line": 505 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDIn", + "signature": "func ChargeCreditPurchaseIDIn(vs ...string) predicate.Charge", + "line": 510 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDNotIn", + "signature": "func ChargeCreditPurchaseIDNotIn(vs ...string) predicate.Charge", + "line": 515 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDGT", + "signature": "func ChargeCreditPurchaseIDGT(v string) predicate.Charge", + "line": 520 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDGTE", + "signature": "func ChargeCreditPurchaseIDGTE(v string) predicate.Charge", + "line": 525 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDLT", + "signature": "func ChargeCreditPurchaseIDLT(v string) predicate.Charge", + "line": 530 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDLTE", + "signature": "func ChargeCreditPurchaseIDLTE(v string) predicate.Charge", + "line": 535 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDContains", + "signature": "func ChargeCreditPurchaseIDContains(v string) predicate.Charge", + "line": 540 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDHasPrefix", + "signature": "func ChargeCreditPurchaseIDHasPrefix(v string) predicate.Charge", + "line": 545 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDHasSuffix", + "signature": "func ChargeCreditPurchaseIDHasSuffix(v string) predicate.Charge", + "line": 550 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDIsNil", + "signature": "func ChargeCreditPurchaseIDIsNil() predicate.Charge", + "line": 555 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDNotNil", + "signature": "func ChargeCreditPurchaseIDNotNil() predicate.Charge", + "line": 560 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDEqualFold", + "signature": "func ChargeCreditPurchaseIDEqualFold(v string) predicate.Charge", + "line": 565 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseIDContainsFold", + "signature": "func ChargeCreditPurchaseIDContainsFold(v string) predicate.Charge", + "line": 570 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDEQ", + "signature": "func ChargeUsageBasedIDEQ(v string) predicate.Charge", + "line": 575 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDNEQ", + "signature": "func ChargeUsageBasedIDNEQ(v string) predicate.Charge", + "line": 580 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDIn", + "signature": "func ChargeUsageBasedIDIn(vs ...string) predicate.Charge", + "line": 585 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDNotIn", + "signature": "func ChargeUsageBasedIDNotIn(vs ...string) predicate.Charge", + "line": 590 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDGT", + "signature": "func ChargeUsageBasedIDGT(v string) predicate.Charge", + "line": 595 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDGTE", + "signature": "func ChargeUsageBasedIDGTE(v string) predicate.Charge", + "line": 600 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDLT", + "signature": "func ChargeUsageBasedIDLT(v string) predicate.Charge", + "line": 605 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDLTE", + "signature": "func ChargeUsageBasedIDLTE(v string) predicate.Charge", + "line": 610 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDContains", + "signature": "func ChargeUsageBasedIDContains(v string) predicate.Charge", + "line": 615 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDHasPrefix", + "signature": "func ChargeUsageBasedIDHasPrefix(v string) predicate.Charge", + "line": 620 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDHasSuffix", + "signature": "func ChargeUsageBasedIDHasSuffix(v string) predicate.Charge", + "line": 625 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDIsNil", + "signature": "func ChargeUsageBasedIDIsNil() predicate.Charge", + "line": 630 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDNotNil", + "signature": "func ChargeUsageBasedIDNotNil() predicate.Charge", + "line": 635 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDEqualFold", + "signature": "func ChargeUsageBasedIDEqualFold(v string) predicate.Charge", + "line": 640 + }, + { + "kind": "func", + "name": "ChargeUsageBasedIDContainsFold", + "signature": "func ChargeUsageBasedIDContainsFold(v string) predicate.Charge", + "line": 645 + }, + { + "kind": "func", + "name": "HasFlatFee", + "signature": "func HasFlatFee() predicate.Charge", + "line": 650 + }, + { + "kind": "func", + "name": "HasFlatFeeWith", + "signature": "func HasFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.Charge", + "line": 661 + }, + { + "kind": "func", + "name": "HasCreditPurchase", + "signature": "func HasCreditPurchase() predicate.Charge", + "line": 673 + }, + { + "kind": "func", + "name": "HasCreditPurchaseWith", + "signature": "func HasCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.Charge", + "line": 684 + }, + { + "kind": "func", + "name": "HasUsageBased", + "signature": "func HasUsageBased() predicate.Charge", + "line": 696 + }, + { + "kind": "func", + "name": "HasUsageBasedWith", + "signature": "func HasUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.Charge", + "line": 707 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLines", + "signature": "func HasBillingInvoiceLines() predicate.Charge", + "line": 719 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLinesWith", + "signature": "func HasBillingInvoiceLinesWith(preds ...predicate.BillingInvoiceLine) predicate.Charge", + "line": 730 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroups", + "signature": "func HasBillingSplitLineGroups() predicate.Charge", + "line": 742 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroupsWith", + "signature": "func HasBillingSplitLineGroupsWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.Charge", + "line": 753 + }, + { + "kind": "func", + "name": "HasCreditRealizationLineages", + "signature": "func HasCreditRealizationLineages() predicate.Charge", + "line": 765 + }, + { + "kind": "func", + "name": "HasCreditRealizationLineagesWith", + "signature": "func HasCreditRealizationLineagesWith(preds ...predicate.CreditRealizationLineage) predicate.Charge", + "line": 776 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Charge) predicate.Charge", + "line": 788 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Charge) predicate.Charge", + "line": 793 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Charge) predicate.Charge", + "line": 798 + } + ], + "line_count": 800 + }, + "openmeter/ent/db/charge_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreate", + "signature": "type ChargeCreate struct", + "line": 26 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeCreate) SetNamespace(v string) *ChargeCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeCreate) SetCreatedAt(v time.Time) *ChargeCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeCreate) SetNillableCreatedAt(v *time.Time) *ChargeCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeCreate) SetDeletedAt(v time.Time) *ChargeCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeCreate) SetNillableDeletedAt(v *time.Time) *ChargeCreate", + "line": 60 + }, + { + "kind": "func", + "name": "SetUniqueReferenceID", + "signature": "func (_c *ChargeCreate) SetUniqueReferenceID(v string) *ChargeCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableUniqueReferenceID", + "signature": "func (_c *ChargeCreate) SetNillableUniqueReferenceID(v *string) *ChargeCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *ChargeCreate) SetType(v meta.ChargeType) *ChargeCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetChargeFlatFeeID", + "signature": "func (_c *ChargeCreate) SetChargeFlatFeeID(v string) *ChargeCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableChargeFlatFeeID", + "signature": "func (_c *ChargeCreate) SetNillableChargeFlatFeeID(v *string) *ChargeCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetChargeCreditPurchaseID", + "signature": "func (_c *ChargeCreate) SetChargeCreditPurchaseID(v string) *ChargeCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableChargeCreditPurchaseID", + "signature": "func (_c *ChargeCreate) SetNillableChargeCreditPurchaseID(v *string) *ChargeCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetChargeUsageBasedID", + "signature": "func (_c *ChargeCreate) SetChargeUsageBasedID(v string) *ChargeCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableChargeUsageBasedID", + "signature": "func (_c *ChargeCreate) SetNillableChargeUsageBasedID(v *string) *ChargeCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeCreate) SetID(v string) *ChargeCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeCreate) SetNillableID(v *string) *ChargeCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetFlatFeeID", + "signature": "func (_c *ChargeCreate) SetFlatFeeID(id string) *ChargeCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableFlatFeeID", + "signature": "func (_c *ChargeCreate) SetNillableFlatFeeID(id *string) *ChargeCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetFlatFee", + "signature": "func (_c *ChargeCreate) SetFlatFee(v *ChargeFlatFee) *ChargeCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetCreditPurchaseID", + "signature": "func (_c *ChargeCreate) SetCreditPurchaseID(id string) *ChargeCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableCreditPurchaseID", + "signature": "func (_c *ChargeCreate) SetNillableCreditPurchaseID(id *string) *ChargeCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetCreditPurchase", + "signature": "func (_c *ChargeCreate) SetCreditPurchase(v *ChargeCreditPurchase) *ChargeCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetUsageBasedID", + "signature": "func (_c *ChargeCreate) SetUsageBasedID(id string) *ChargeCreate", + "line": 182 + }, + { + "kind": "func", + "name": "SetNillableUsageBasedID", + "signature": "func (_c *ChargeCreate) SetNillableUsageBasedID(id *string) *ChargeCreate", + "line": 188 + }, + { + "kind": "func", + "name": "SetUsageBased", + "signature": "func (_c *ChargeCreate) SetUsageBased(v *ChargeUsageBased) *ChargeCreate", + "line": 196 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_c *ChargeCreate) AddBillingInvoiceLineIDs(ids ...string) *ChargeCreate", + "line": 201 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_c *ChargeCreate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *ChargeCreate", + "line": 207 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_c *ChargeCreate) AddBillingSplitLineGroupIDs(ids ...string) *ChargeCreate", + "line": 216 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_c *ChargeCreate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *ChargeCreate", + "line": 222 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineageIDs", + "signature": "func (_c *ChargeCreate) AddCreditRealizationLineageIDs(ids ...string) *ChargeCreate", + "line": 231 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineages", + "signature": "func (_c *ChargeCreate) AddCreditRealizationLineages(v ...*CreditRealizationLineage) *ChargeCreate", + "line": 237 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeCreate) Mutation() *ChargeMutation", + "line": 246 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreate) Save(ctx context.Context) (*Charge, error)", + "line": 251 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreate) SaveX(ctx context.Context) *Charge", + "line": 257 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreate) Exec(ctx context.Context) error", + "line": 266 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreate) ExecX(ctx context.Context)", + "line": 272 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeCreate) defaults()", + "line": 279 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeCreate) check() error", + "line": 291 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeCreate) sqlSave(ctx context.Context) (*Charge, error)", + "line": 319 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeCreate) createSpec() (*Charge, *sqlgraph.CreateSpec)", + "line": 342 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUpsertOne", + "line": 490 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreate) OnConflictColumns(columns ...string) *ChargeUpsertOne", + "line": 503 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUpsert) SetDeletedAt(v time.Time) *ChargeUpsert", + "line": 524 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUpsert) UpdateDeletedAt() *ChargeUpsert", + "line": 530 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUpsert) ClearDeletedAt() *ChargeUpsert", + "line": 536 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUpsertOne) UpdateNewValues() *ChargeUpsertOne", + "line": 552 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUpsertOne) Ignore() *ChargeUpsertOne", + "line": 589 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUpsertOne) DoNothing() *ChargeUpsertOne", + "line": 596 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUpsertOne) Update(set func(*ChargeUpsert)) *ChargeUpsertOne", + "line": 603 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUpsertOne) SetDeletedAt(v time.Time) *ChargeUpsertOne", + "line": 611 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUpsertOne) UpdateDeletedAt() *ChargeUpsertOne", + "line": 618 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUpsertOne) ClearDeletedAt() *ChargeUpsertOne", + "line": 625 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUpsertOne) Exec(ctx context.Context) error", + "line": 632 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUpsertOne) ExecX(ctx context.Context)", + "line": 640 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 647 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUpsertOne) IDX(ctx context.Context) string", + "line": 661 + }, + { + "kind": "struct", + "name": "ChargeCreateBulk", + "signature": "type ChargeCreateBulk struct", + "line": 670 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreateBulk) Save(ctx context.Context) ([]*Charge, error)", + "line": 678 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreateBulk) SaveX(ctx context.Context) []*Charge", + "line": 734 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreateBulk) Exec(ctx context.Context) error", + "line": 743 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreateBulk) ExecX(ctx context.Context)", + "line": 749 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUpsertBulk", + "line": 770 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreateBulk) OnConflictColumns(columns ...string) *ChargeUpsertBulk", + "line": 783 + }, + { + "kind": "struct", + "name": "ChargeUpsertBulk", + "signature": "type ChargeUpsertBulk struct", + "line": 792 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUpsertBulk) UpdateNewValues() *ChargeUpsertBulk", + "line": 807 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUpsertBulk) Ignore() *ChargeUpsertBulk", + "line": 846 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUpsertBulk) DoNothing() *ChargeUpsertBulk", + "line": 853 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUpsertBulk) Update(set func(*ChargeUpsert)) *ChargeUpsertBulk", + "line": 860 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUpsertBulk) SetDeletedAt(v time.Time) *ChargeUpsertBulk", + "line": 868 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUpsertBulk) UpdateDeletedAt() *ChargeUpsertBulk", + "line": 875 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUpsertBulk) ClearDeletedAt() *ChargeUpsertBulk", + "line": 882 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUpsertBulk) Exec(ctx context.Context) error", + "line": 889 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUpsertBulk) ExecX(ctx context.Context)", + "line": 905 + } + ], + "line_count": 909 + }, + "openmeter/ent/db/charge_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeDelete", + "signature": "type ChargeDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeDelete) Where(ps ...predicate.Charge) *ChargeDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeDeleteOne", + "signature": "type ChargeDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeDeleteOne) Where(ps ...predicate.Charge) *ChargeDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/charge_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeQuery", + "signature": "type ChargeQuery struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeQuery) Where(ps ...predicate.Charge) *ChargeQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeQuery) Limit(limit int) *ChargeQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeQuery) Offset(offset int) *ChargeQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeQuery) Unique(unique bool) *ChargeQuery", + "line": 65 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeQuery) Order(o ...charge.OrderOption) *ChargeQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryFlatFee", + "signature": "func (_q *ChargeQuery) QueryFlatFee() *ChargeFlatFeeQuery", + "line": 77 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_q *ChargeQuery) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 99 + }, + { + "kind": "func", + "name": "QueryUsageBased", + "signature": "func (_q *ChargeQuery) QueryUsageBased() *ChargeUsageBasedQuery", + "line": 121 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_q *ChargeQuery) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 143 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_q *ChargeQuery) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 165 + }, + { + "kind": "func", + "name": "QueryCreditRealizationLineages", + "signature": "func (_q *ChargeQuery) QueryCreditRealizationLineages() *CreditRealizationLineageQuery", + "line": 187 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeQuery) First(ctx context.Context) (*Charge, error)", + "line": 210 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeQuery) FirstX(ctx context.Context) *Charge", + "line": 222 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeQuery) FirstIDX(ctx context.Context) string", + "line": 245 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeQuery) Only(ctx context.Context) (*Charge, error)", + "line": 256 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeQuery) OnlyX(ctx context.Context) *Charge", + "line": 272 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 283 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeQuery) OnlyIDX(ctx context.Context) string", + "line": 300 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeQuery) All(ctx context.Context) ([]*Charge, error)", + "line": 309 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeQuery) AllX(ctx context.Context) []*Charge", + "line": 319 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 328 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeQuery) IDsX(ctx context.Context) []string", + "line": 340 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeQuery) Count(ctx context.Context) (int, error)", + "line": 349 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeQuery) CountX(ctx context.Context) int", + "line": 358 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeQuery) Exist(ctx context.Context) (bool, error)", + "line": 367 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeQuery) ExistX(ctx context.Context) bool", + "line": 380 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeQuery) Clone() *ChargeQuery", + "line": 390 + }, + { + "kind": "func", + "name": "WithFlatFee", + "signature": "func (_q *ChargeQuery) WithFlatFee(opts ...func(*ChargeFlatFeeQuery)) *ChargeQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithCreditPurchase", + "signature": "func (_q *ChargeQuery) WithCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *ChargeQuery", + "line": 425 + }, + { + "kind": "func", + "name": "WithUsageBased", + "signature": "func (_q *ChargeQuery) WithUsageBased(opts ...func(*ChargeUsageBasedQuery)) *ChargeQuery", + "line": 436 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLines", + "signature": "func (_q *ChargeQuery) WithBillingInvoiceLines(opts ...func(*BillingInvoiceLineQuery)) *ChargeQuery", + "line": 447 + }, + { + "kind": "func", + "name": "WithBillingSplitLineGroups", + "signature": "func (_q *ChargeQuery) WithBillingSplitLineGroups(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *ChargeQuery", + "line": 458 + }, + { + "kind": "func", + "name": "WithCreditRealizationLineages", + "signature": "func (_q *ChargeQuery) WithCreditRealizationLineages(opts ...func(*CreditRealizationLineageQuery)) *ChargeQuery", + "line": 469 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeQuery) GroupBy(field string, fields ...string) *ChargeGroupBy", + "line": 492 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeQuery) Select(fields ...string) *ChargeSelect", + "line": 513 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeQuery) Aggregate(fns ...AggregateFunc) *ChargeSelect", + "line": 522 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeQuery) prepareQuery(ctx context.Context) error", + "line": 526 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Charge, error)", + "line": 552 + }, + { + "kind": "func", + "name": "loadFlatFee", + "signature": "func (_q *ChargeQuery) loadFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *ChargeFlatFee)) error", + "line": 634 + }, + { + "kind": "func", + "name": "loadCreditPurchase", + "signature": "func (_q *ChargeQuery) loadCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *ChargeCreditPurchase)) error", + "line": 666 + }, + { + "kind": "func", + "name": "loadUsageBased", + "signature": "func (_q *ChargeQuery) loadUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *ChargeUsageBased)) error", + "line": 698 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLines", + "signature": "func (_q *ChargeQuery) loadBillingInvoiceLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *BillingInvoiceLine)) error", + "line": 730 + }, + { + "kind": "func", + "name": "loadBillingSplitLineGroups", + "signature": "func (_q *ChargeQuery) loadBillingSplitLineGroups(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *BillingInvoiceSplitLineGroup)) error", + "line": 764 + }, + { + "kind": "func", + "name": "loadCreditRealizationLineages", + "signature": "func (_q *ChargeQuery) loadCreditRealizationLineages(ctx context.Context, query *CreditRealizationLineageQuery, nodes []*Charge, init func(*Charge), assign func(*Charge, *CreditRealizationLineage)) error", + "line": 797 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeQuery) sqlCount(ctx context.Context) (int, error)", + "line": 828 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeQuery) querySpec() *sqlgraph.QuerySpec", + "line": 840 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 889 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeQuery) ForUpdate(opts ...sql.LockOption) *ChargeQuery", + "line": 927 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeQuery) ForShare(opts ...sql.LockOption) *ChargeQuery", + "line": 940 + }, + { + "kind": "struct", + "name": "ChargeGroupBy", + "signature": "type ChargeGroupBy struct", + "line": 951 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeGroupBy) Aggregate(fns ...AggregateFunc) *ChargeGroupBy", + "line": 957 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeGroupBy) Scan(ctx context.Context, v any) error", + "line": 963 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeGroupBy) sqlScan(ctx context.Context, root *ChargeQuery, v any) error", + "line": 971 + }, + { + "kind": "struct", + "name": "ChargeSelect", + "signature": "type ChargeSelect struct", + "line": 999 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeSelect) Aggregate(fns ...AggregateFunc) *ChargeSelect", + "line": 1005 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeSelect) Scan(ctx context.Context, v any) error", + "line": 1011 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeSelect) sqlScan(ctx context.Context, root *ChargeQuery, v any) error", + "line": 1019 + } + ], + "line_count": 1038 + }, + "openmeter/ent/db/charge_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUpdate", + "signature": "type ChargeUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUpdate) Where(ps ...predicate.Charge) *ChargeUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUpdate) SetDeletedAt(v time.Time) *ChargeUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUpdate) ClearDeletedAt() *ChargeUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *ChargeUpdate) AddBillingInvoiceLineIDs(ids ...string) *ChargeUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *ChargeUpdate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *ChargeUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *ChargeUpdate) AddBillingSplitLineGroupIDs(ids ...string) *ChargeUpdate", + "line": 70 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *ChargeUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineageIDs", + "signature": "func (_u *ChargeUpdate) AddCreditRealizationLineageIDs(ids ...string) *ChargeUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineages", + "signature": "func (_u *ChargeUpdate) AddCreditRealizationLineages(v ...*CreditRealizationLineage) *ChargeUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUpdate) Mutation() *ChargeMutation", + "line": 100 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *ChargeUpdate) ClearBillingInvoiceLines() *ChargeUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *ChargeUpdate) RemoveBillingInvoiceLineIDs(ids ...string) *ChargeUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *ChargeUpdate) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *ChargeUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdate) ClearBillingSplitLineGroups() *ChargeUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *ChargeUpdate) RemoveBillingSplitLineGroupIDs(ids ...string) *ChargeUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdate) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *ChargeUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "ClearCreditRealizationLineages", + "signature": "func (_u *ChargeUpdate) ClearCreditRealizationLineages() *ChargeUpdate", + "line": 147 + }, + { + "kind": "func", + "name": "RemoveCreditRealizationLineageIDs", + "signature": "func (_u *ChargeUpdate) RemoveCreditRealizationLineageIDs(ids ...string) *ChargeUpdate", + "line": 153 + }, + { + "kind": "func", + "name": "RemoveCreditRealizationLineages", + "signature": "func (_u *ChargeUpdate) RemoveCreditRealizationLineages(v ...*CreditRealizationLineage) *ChargeUpdate", + "line": 159 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUpdate) Save(ctx context.Context) (int, error)", + "line": 168 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUpdate) SaveX(ctx context.Context) int", + "line": 173 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUpdate) Exec(ctx context.Context) error", + "line": 182 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUpdate) ExecX(ctx context.Context)", + "line": 188 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 194 + }, + { + "kind": "struct", + "name": "ChargeUpdateOne", + "signature": "type ChargeUpdateOne struct", + "line": 360 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUpdateOne) SetDeletedAt(v time.Time) *ChargeUpdateOne", + "line": 368 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUpdateOne", + "line": 374 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUpdateOne) ClearDeletedAt() *ChargeUpdateOne", + "line": 382 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *ChargeUpdateOne) AddBillingInvoiceLineIDs(ids ...string) *ChargeUpdateOne", + "line": 388 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *ChargeUpdateOne) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *ChargeUpdateOne", + "line": 394 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *ChargeUpdateOne) AddBillingSplitLineGroupIDs(ids ...string) *ChargeUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdateOne) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *ChargeUpdateOne", + "line": 409 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineageIDs", + "signature": "func (_u *ChargeUpdateOne) AddCreditRealizationLineageIDs(ids ...string) *ChargeUpdateOne", + "line": 418 + }, + { + "kind": "func", + "name": "AddCreditRealizationLineages", + "signature": "func (_u *ChargeUpdateOne) AddCreditRealizationLineages(v ...*CreditRealizationLineage) *ChargeUpdateOne", + "line": 424 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUpdateOne) Mutation() *ChargeMutation", + "line": 433 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *ChargeUpdateOne) ClearBillingInvoiceLines() *ChargeUpdateOne", + "line": 438 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *ChargeUpdateOne) RemoveBillingInvoiceLineIDs(ids ...string) *ChargeUpdateOne", + "line": 444 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *ChargeUpdateOne) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *ChargeUpdateOne", + "line": 450 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdateOne) ClearBillingSplitLineGroups() *ChargeUpdateOne", + "line": 459 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *ChargeUpdateOne) RemoveBillingSplitLineGroupIDs(ids ...string) *ChargeUpdateOne", + "line": 465 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *ChargeUpdateOne) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *ChargeUpdateOne", + "line": 471 + }, + { + "kind": "func", + "name": "ClearCreditRealizationLineages", + "signature": "func (_u *ChargeUpdateOne) ClearCreditRealizationLineages() *ChargeUpdateOne", + "line": 480 + }, + { + "kind": "func", + "name": "RemoveCreditRealizationLineageIDs", + "signature": "func (_u *ChargeUpdateOne) RemoveCreditRealizationLineageIDs(ids ...string) *ChargeUpdateOne", + "line": 486 + }, + { + "kind": "func", + "name": "RemoveCreditRealizationLineages", + "signature": "func (_u *ChargeUpdateOne) RemoveCreditRealizationLineages(v ...*CreditRealizationLineage) *ChargeUpdateOne", + "line": 492 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUpdateOne) Where(ps ...predicate.Charge) *ChargeUpdateOne", + "line": 501 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUpdateOne) Select(field string, fields ...string) *ChargeUpdateOne", + "line": 508 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUpdateOne) Save(ctx context.Context) (*Charge, error)", + "line": 514 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUpdateOne) SaveX(ctx context.Context) *Charge", + "line": 519 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUpdateOne) Exec(ctx context.Context) error", + "line": 528 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUpdateOne) ExecX(ctx context.Context)", + "line": 534 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUpdateOne) sqlSave(ctx context.Context) (_node *Charge, err error)", + "line": 540 + } + ], + "line_count": 723 + }, + "openmeter/ent/db/chargecreditpurchase.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchase", + "signature": "type ChargeCreditPurchase struct", + "line": 34 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseEdges", + "signature": "type ChargeCreditPurchaseEdges struct", + "line": 109 + }, + { + "kind": "func", + "name": "ExternalPaymentOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) ExternalPaymentOrErr() (*ChargeCreditPurchaseExternalPayment, error)", + "line": 135 + }, + { + "kind": "func", + "name": "InvoicedPaymentOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) InvoicedPaymentOrErr() (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 146 + }, + { + "kind": "func", + "name": "CreditGrantOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) CreditGrantOrErr() (*ChargeCreditPurchaseCreditGrant, error)", + "line": 157 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) ChargeOrErr() (*Charge, error)", + "line": 168 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 179 + }, + { + "kind": "func", + "name": "SubscriptionPhaseOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) SubscriptionPhaseOrErr() (*SubscriptionPhase, error)", + "line": 190 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) SubscriptionItemOrErr() (*SubscriptionItem, error)", + "line": 201 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) CustomerOrErr() (*Customer, error)", + "line": 212 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e ChargeCreditPurchaseEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 223 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeCreditPurchase) assignValues(columns []string, values []any) error", + "line": 260 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeCreditPurchase) Value(name string) (ent.Value, error)", + "line": 489 + }, + { + "kind": "func", + "name": "QueryExternalPayment", + "signature": "func (_m *ChargeCreditPurchase) QueryExternalPayment() *ChargeCreditPurchaseExternalPaymentQuery", + "line": 494 + }, + { + "kind": "func", + "name": "QueryInvoicedPayment", + "signature": "func (_m *ChargeCreditPurchase) QueryInvoicedPayment() *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 499 + }, + { + "kind": "func", + "name": "QueryCreditGrant", + "signature": "func (_m *ChargeCreditPurchase) QueryCreditGrant() *ChargeCreditPurchaseCreditGrantQuery", + "line": 504 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *ChargeCreditPurchase) QueryCharge() *ChargeQuery", + "line": 509 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *ChargeCreditPurchase) QuerySubscription() *SubscriptionQuery", + "line": 514 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_m *ChargeCreditPurchase) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 519 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *ChargeCreditPurchase) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 524 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *ChargeCreditPurchase) QueryCustomer() *CustomerQuery", + "line": 529 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *ChargeCreditPurchase) QueryTaxCode() *TaxCodeQuery", + "line": 534 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeCreditPurchase) Update() *ChargeCreditPurchaseUpdateOne", + "line": 541 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeCreditPurchase) Unwrap() *ChargeCreditPurchase", + "line": 547 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeCreditPurchase) String() string", + "line": 557 + } + ], + "line_count": 685 + }, + "openmeter/ent/db/chargecreditpurchase/chargecreditpurchase.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 210 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s meta.ChargeStatus) error", + "line": 241 + }, + { + "kind": "func", + "name": "ManagedByValidator", + "signature": "func ManagedByValidator(mb billing.InvoiceLineManagedBy) error", + "line": 251 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 261 + }, + { + "kind": "func", + "name": "StatusDetailedValidator", + "signature": "func StatusDetailedValidator(sd creditpurchase.Status) error", + "line": 271 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 284 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 289 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 294 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 299 + }, + { + "kind": "func", + "name": "ByBillingPeriodFrom", + "signature": "func ByBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 304 + }, + { + "kind": "func", + "name": "ByBillingPeriodTo", + "signature": "func ByBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 309 + }, + { + "kind": "func", + "name": "ByFullServicePeriodFrom", + "signature": "func ByFullServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 314 + }, + { + "kind": "func", + "name": "ByFullServicePeriodTo", + "signature": "func ByFullServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 319 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 324 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 329 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 334 + }, + { + "kind": "func", + "name": "ByManagedBy", + "signature": "func ByManagedBy(opts ...sql.OrderTermOption) OrderOption", + "line": 339 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 344 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 349 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 354 + }, + { + "kind": "func", + "name": "ByAdvanceAfter", + "signature": "func ByAdvanceAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 359 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 364 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 369 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 374 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 384 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 389 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 399 + }, + { + "kind": "func", + "name": "ByCreditAmount", + "signature": "func ByCreditAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 404 + }, + { + "kind": "func", + "name": "ByEffectiveAt", + "signature": "func ByEffectiveAt(opts ...sql.OrderTermOption) OrderOption", + "line": 409 + }, + { + "kind": "func", + "name": "ByExpiresAt", + "signature": "func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption", + "line": 414 + }, + { + "kind": "func", + "name": "ByPriority", + "signature": "func ByPriority(opts ...sql.OrderTermOption) OrderOption", + "line": 419 + }, + { + "kind": "func", + "name": "ByFeatureFilters", + "signature": "func ByFeatureFilters(opts ...sql.OrderTermOption) OrderOption", + "line": 424 + }, + { + "kind": "func", + "name": "BySettlement", + "signature": "func BySettlement(opts ...sql.OrderTermOption) OrderOption", + "line": 429 + }, + { + "kind": "func", + "name": "ByStatusDetailed", + "signature": "func ByStatusDetailed(opts ...sql.OrderTermOption) OrderOption", + "line": 434 + }, + { + "kind": "func", + "name": "ByExternalPaymentField", + "signature": "func ByExternalPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 439 + }, + { + "kind": "func", + "name": "ByInvoicedPaymentField", + "signature": "func ByInvoicedPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 446 + }, + { + "kind": "func", + "name": "ByCreditGrantField", + "signature": "func ByCreditGrantField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 453 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 460 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 467 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseField", + "signature": "func BySubscriptionPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 474 + }, + { + "kind": "func", + "name": "BySubscriptionItemField", + "signature": "func BySubscriptionItemField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 481 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 488 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 495 + }, + { + "kind": "func", + "name": "newExternalPaymentStep", + "signature": "func newExternalPaymentStep() *sqlgraph.Step", + "line": 500 + }, + { + "kind": "func", + "name": "newInvoicedPaymentStep", + "signature": "func newInvoicedPaymentStep() *sqlgraph.Step", + "line": 507 + }, + { + "kind": "func", + "name": "newCreditGrantStep", + "signature": "func newCreditGrantStep() *sqlgraph.Step", + "line": 514 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 521 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 528 + }, + { + "kind": "func", + "name": "newSubscriptionPhaseStep", + "signature": "func newSubscriptionPhaseStep() *sqlgraph.Step", + "line": 535 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 542 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 549 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 556 + } + ], + "line_count": 562 + }, + "openmeter/ent/db/chargecreditpurchase/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeCreditPurchase", + "line": 21 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeCreditPurchase", + "line": 26 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeCreditPurchase", + "line": 31 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeCreditPurchase", + "line": 36 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeCreditPurchase", + "line": 41 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeCreditPurchase", + "line": 46 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeCreditPurchase", + "line": 51 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeCreditPurchase", + "line": 56 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeCreditPurchase", + "line": 61 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeCreditPurchase", + "line": 66 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeCreditPurchase", + "line": 71 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.ChargeCreditPurchase", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeCreditPurchase", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeCreditPurchase", + "line": 86 + }, + { + "kind": "func", + "name": "BillingPeriodFrom", + "signature": "func BillingPeriodFrom(v time.Time) predicate.ChargeCreditPurchase", + "line": 91 + }, + { + "kind": "func", + "name": "BillingPeriodTo", + "signature": "func BillingPeriodTo(v time.Time) predicate.ChargeCreditPurchase", + "line": 96 + }, + { + "kind": "func", + "name": "FullServicePeriodFrom", + "signature": "func FullServicePeriodFrom(v time.Time) predicate.ChargeCreditPurchase", + "line": 101 + }, + { + "kind": "func", + "name": "FullServicePeriodTo", + "signature": "func FullServicePeriodTo(v time.Time) predicate.ChargeCreditPurchase", + "line": 106 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.ChargeCreditPurchase", + "line": 111 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 116 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.ChargeCreditPurchase", + "line": 122 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.ChargeCreditPurchase", + "line": 127 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.ChargeCreditPurchase", + "line": 132 + }, + { + "kind": "func", + "name": "AdvanceAfter", + "signature": "func AdvanceAfter(v time.Time) predicate.ChargeCreditPurchase", + "line": 137 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargeCreditPurchase", + "line": 142 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeCreditPurchase", + "line": 147 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeCreditPurchase", + "line": 152 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeCreditPurchase", + "line": 157 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeCreditPurchase", + "line": 162 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargeCreditPurchase", + "line": 167 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargeCreditPurchase", + "line": 172 + }, + { + "kind": "func", + "name": "CreditAmount", + "signature": "func CreditAmount(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 177 + }, + { + "kind": "func", + "name": "EffectiveAt", + "signature": "func EffectiveAt(v time.Time) predicate.ChargeCreditPurchase", + "line": 182 + }, + { + "kind": "func", + "name": "ExpiresAt", + "signature": "func ExpiresAt(v time.Time) predicate.ChargeCreditPurchase", + "line": 187 + }, + { + "kind": "func", + "name": "Priority", + "signature": "func Priority(v int) predicate.ChargeCreditPurchase", + "line": 192 + }, + { + "kind": "func", + "name": "FeatureFilters", + "signature": "func FeatureFilters(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 197 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 202 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 207 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 212 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 217 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.ChargeCreditPurchase", + "line": 222 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 227 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.ChargeCreditPurchase", + "line": 232 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 237 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.ChargeCreditPurchase", + "line": 242 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 247 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 252 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 257 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 262 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 267 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 272 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 277 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 282 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 287 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 292 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 297 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 302 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 307 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 312 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 317 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 322 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 327 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 332 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 337 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 342 + }, + { + "kind": "func", + "name": "BillingPeriodFromEQ", + "signature": "func BillingPeriodFromEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 347 + }, + { + "kind": "func", + "name": "BillingPeriodFromNEQ", + "signature": "func BillingPeriodFromNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 352 + }, + { + "kind": "func", + "name": "BillingPeriodFromIn", + "signature": "func BillingPeriodFromIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 357 + }, + { + "kind": "func", + "name": "BillingPeriodFromNotIn", + "signature": "func BillingPeriodFromNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 362 + }, + { + "kind": "func", + "name": "BillingPeriodFromGT", + "signature": "func BillingPeriodFromGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 367 + }, + { + "kind": "func", + "name": "BillingPeriodFromGTE", + "signature": "func BillingPeriodFromGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 372 + }, + { + "kind": "func", + "name": "BillingPeriodFromLT", + "signature": "func BillingPeriodFromLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 377 + }, + { + "kind": "func", + "name": "BillingPeriodFromLTE", + "signature": "func BillingPeriodFromLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 382 + }, + { + "kind": "func", + "name": "BillingPeriodToEQ", + "signature": "func BillingPeriodToEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 387 + }, + { + "kind": "func", + "name": "BillingPeriodToNEQ", + "signature": "func BillingPeriodToNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 392 + }, + { + "kind": "func", + "name": "BillingPeriodToIn", + "signature": "func BillingPeriodToIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 397 + }, + { + "kind": "func", + "name": "BillingPeriodToNotIn", + "signature": "func BillingPeriodToNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 402 + }, + { + "kind": "func", + "name": "BillingPeriodToGT", + "signature": "func BillingPeriodToGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 407 + }, + { + "kind": "func", + "name": "BillingPeriodToGTE", + "signature": "func BillingPeriodToGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 412 + }, + { + "kind": "func", + "name": "BillingPeriodToLT", + "signature": "func BillingPeriodToLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 417 + }, + { + "kind": "func", + "name": "BillingPeriodToLTE", + "signature": "func BillingPeriodToLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 422 + }, + { + "kind": "func", + "name": "FullServicePeriodFromEQ", + "signature": "func FullServicePeriodFromEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 427 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNEQ", + "signature": "func FullServicePeriodFromNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 432 + }, + { + "kind": "func", + "name": "FullServicePeriodFromIn", + "signature": "func FullServicePeriodFromIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 437 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNotIn", + "signature": "func FullServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 442 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGT", + "signature": "func FullServicePeriodFromGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 447 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGTE", + "signature": "func FullServicePeriodFromGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 452 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLT", + "signature": "func FullServicePeriodFromLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 457 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLTE", + "signature": "func FullServicePeriodFromLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 462 + }, + { + "kind": "func", + "name": "FullServicePeriodToEQ", + "signature": "func FullServicePeriodToEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 467 + }, + { + "kind": "func", + "name": "FullServicePeriodToNEQ", + "signature": "func FullServicePeriodToNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 472 + }, + { + "kind": "func", + "name": "FullServicePeriodToIn", + "signature": "func FullServicePeriodToIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 477 + }, + { + "kind": "func", + "name": "FullServicePeriodToNotIn", + "signature": "func FullServicePeriodToNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 482 + }, + { + "kind": "func", + "name": "FullServicePeriodToGT", + "signature": "func FullServicePeriodToGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 487 + }, + { + "kind": "func", + "name": "FullServicePeriodToGTE", + "signature": "func FullServicePeriodToGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 492 + }, + { + "kind": "func", + "name": "FullServicePeriodToLT", + "signature": "func FullServicePeriodToLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 497 + }, + { + "kind": "func", + "name": "FullServicePeriodToLTE", + "signature": "func FullServicePeriodToLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 502 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v meta.ChargeStatus) predicate.ChargeCreditPurchase", + "line": 507 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v meta.ChargeStatus) predicate.ChargeCreditPurchase", + "line": 513 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...meta.ChargeStatus) predicate.ChargeCreditPurchase", + "line": 519 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...meta.ChargeStatus) predicate.ChargeCreditPurchase", + "line": 528 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 537 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 542 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 547 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 552 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.ChargeCreditPurchase", + "line": 557 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 562 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.ChargeCreditPurchase", + "line": 567 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 572 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.ChargeCreditPurchase", + "line": 577 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 582 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 587 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.ChargeCreditPurchase", + "line": 592 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.ChargeCreditPurchase", + "line": 597 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 602 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 607 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 612 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 618 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargeCreditPurchase", + "line": 624 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargeCreditPurchase", + "line": 633 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 642 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 648 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 654 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 660 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 666 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 672 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 678 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 684 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargeCreditPurchase", + "line": 690 + }, + { + "kind": "func", + "name": "ManagedByEQ", + "signature": "func ManagedByEQ(v billing.InvoiceLineManagedBy) predicate.ChargeCreditPurchase", + "line": 696 + }, + { + "kind": "func", + "name": "ManagedByNEQ", + "signature": "func ManagedByNEQ(v billing.InvoiceLineManagedBy) predicate.ChargeCreditPurchase", + "line": 702 + }, + { + "kind": "func", + "name": "ManagedByIn", + "signature": "func ManagedByIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeCreditPurchase", + "line": 708 + }, + { + "kind": "func", + "name": "ManagedByNotIn", + "signature": "func ManagedByNotIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeCreditPurchase", + "line": 717 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 726 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 731 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 736 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 741 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.ChargeCreditPurchase", + "line": 746 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 751 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.ChargeCreditPurchase", + "line": 756 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 761 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.ChargeCreditPurchase", + "line": 766 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 771 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 776 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.ChargeCreditPurchase", + "line": 781 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.ChargeCreditPurchase", + "line": 786 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 791 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 796 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 801 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 806 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 811 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 816 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.ChargeCreditPurchase", + "line": 821 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 826 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.ChargeCreditPurchase", + "line": 831 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 836 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.ChargeCreditPurchase", + "line": 841 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 846 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 851 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.ChargeCreditPurchase", + "line": 856 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.ChargeCreditPurchase", + "line": 861 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 866 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 871 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 876 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 881 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 886 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 891 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.ChargeCreditPurchase", + "line": 896 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 901 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.ChargeCreditPurchase", + "line": 906 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 911 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.ChargeCreditPurchase", + "line": 916 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 921 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 926 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.ChargeCreditPurchase", + "line": 931 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.ChargeCreditPurchase", + "line": 936 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 941 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 946 + }, + { + "kind": "func", + "name": "AdvanceAfterEQ", + "signature": "func AdvanceAfterEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 951 + }, + { + "kind": "func", + "name": "AdvanceAfterNEQ", + "signature": "func AdvanceAfterNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 956 + }, + { + "kind": "func", + "name": "AdvanceAfterIn", + "signature": "func AdvanceAfterIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 961 + }, + { + "kind": "func", + "name": "AdvanceAfterNotIn", + "signature": "func AdvanceAfterNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 966 + }, + { + "kind": "func", + "name": "AdvanceAfterGT", + "signature": "func AdvanceAfterGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 971 + }, + { + "kind": "func", + "name": "AdvanceAfterGTE", + "signature": "func AdvanceAfterGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 976 + }, + { + "kind": "func", + "name": "AdvanceAfterLT", + "signature": "func AdvanceAfterLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 981 + }, + { + "kind": "func", + "name": "AdvanceAfterLTE", + "signature": "func AdvanceAfterLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 986 + }, + { + "kind": "func", + "name": "AdvanceAfterIsNil", + "signature": "func AdvanceAfterIsNil() predicate.ChargeCreditPurchase", + "line": 991 + }, + { + "kind": "func", + "name": "AdvanceAfterNotNil", + "signature": "func AdvanceAfterNotNil() predicate.ChargeCreditPurchase", + "line": 996 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargeCreditPurchase", + "line": 1001 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargeCreditPurchase", + "line": 1006 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1011 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1016 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargeCreditPurchase", + "line": 1021 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargeCreditPurchase", + "line": 1026 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargeCreditPurchase", + "line": 1031 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargeCreditPurchase", + "line": 1036 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargeCreditPurchase", + "line": 1041 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 1046 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 1051 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargeCreditPurchase", + "line": 1056 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargeCreditPurchase", + "line": 1061 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 1066 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 1071 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargeCreditPurchase", + "line": 1076 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargeCreditPurchase", + "line": 1082 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargeCreditPurchase", + "line": 1088 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargeCreditPurchase", + "line": 1097 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargeCreditPurchase", + "line": 1106 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargeCreditPurchase", + "line": 1111 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeCreditPurchase", + "line": 1116 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeCreditPurchase", + "line": 1121 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeCreditPurchase", + "line": 1126 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeCreditPurchase", + "line": 1131 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1136 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1141 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeCreditPurchase", + "line": 1146 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeCreditPurchase", + "line": 1151 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeCreditPurchase", + "line": 1156 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeCreditPurchase", + "line": 1161 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeCreditPurchase", + "line": 1166 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 1171 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 1176 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 1181 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 1186 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargeCreditPurchase", + "line": 1191 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargeCreditPurchase", + "line": 1196 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1201 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1206 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1211 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1216 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1221 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1226 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1231 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1236 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1241 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1246 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1251 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1256 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1261 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1266 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1271 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1276 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1281 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1286 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1291 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1296 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1301 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1306 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1311 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1316 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeCreditPurchase", + "line": 1321 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeCreditPurchase", + "line": 1326 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargeCreditPurchase", + "line": 1331 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargeCreditPurchase", + "line": 1336 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1341 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1346 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargeCreditPurchase", + "line": 1351 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargeCreditPurchase", + "line": 1356 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargeCreditPurchase", + "line": 1361 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargeCreditPurchase", + "line": 1366 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargeCreditPurchase", + "line": 1371 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 1376 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 1381 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 1386 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 1391 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargeCreditPurchase", + "line": 1396 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargeCreditPurchase", + "line": 1401 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1406 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargeCreditPurchase", + "line": 1411 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargeCreditPurchase", + "line": 1416 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargeCreditPurchase", + "line": 1421 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargeCreditPurchase", + "line": 1426 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargeCreditPurchase", + "line": 1431 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargeCreditPurchase", + "line": 1436 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargeCreditPurchase", + "line": 1441 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargeCreditPurchase", + "line": 1446 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargeCreditPurchase", + "line": 1451 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargeCreditPurchase", + "line": 1456 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargeCreditPurchase", + "line": 1461 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargeCreditPurchase", + "line": 1466 + }, + { + "kind": "func", + "name": "CreditAmountEQ", + "signature": "func CreditAmountEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1471 + }, + { + "kind": "func", + "name": "CreditAmountNEQ", + "signature": "func CreditAmountNEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1476 + }, + { + "kind": "func", + "name": "CreditAmountIn", + "signature": "func CreditAmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1481 + }, + { + "kind": "func", + "name": "CreditAmountNotIn", + "signature": "func CreditAmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1486 + }, + { + "kind": "func", + "name": "CreditAmountGT", + "signature": "func CreditAmountGT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1491 + }, + { + "kind": "func", + "name": "CreditAmountGTE", + "signature": "func CreditAmountGTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1496 + }, + { + "kind": "func", + "name": "CreditAmountLT", + "signature": "func CreditAmountLT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1501 + }, + { + "kind": "func", + "name": "CreditAmountLTE", + "signature": "func CreditAmountLTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchase", + "line": 1506 + }, + { + "kind": "func", + "name": "EffectiveAtEQ", + "signature": "func EffectiveAtEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1511 + }, + { + "kind": "func", + "name": "EffectiveAtNEQ", + "signature": "func EffectiveAtNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1516 + }, + { + "kind": "func", + "name": "EffectiveAtIn", + "signature": "func EffectiveAtIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1521 + }, + { + "kind": "func", + "name": "EffectiveAtNotIn", + "signature": "func EffectiveAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1526 + }, + { + "kind": "func", + "name": "EffectiveAtGT", + "signature": "func EffectiveAtGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1531 + }, + { + "kind": "func", + "name": "EffectiveAtGTE", + "signature": "func EffectiveAtGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1536 + }, + { + "kind": "func", + "name": "EffectiveAtLT", + "signature": "func EffectiveAtLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1541 + }, + { + "kind": "func", + "name": "EffectiveAtLTE", + "signature": "func EffectiveAtLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1546 + }, + { + "kind": "func", + "name": "EffectiveAtIsNil", + "signature": "func EffectiveAtIsNil() predicate.ChargeCreditPurchase", + "line": 1551 + }, + { + "kind": "func", + "name": "EffectiveAtNotNil", + "signature": "func EffectiveAtNotNil() predicate.ChargeCreditPurchase", + "line": 1556 + }, + { + "kind": "func", + "name": "ExpiresAtEQ", + "signature": "func ExpiresAtEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1561 + }, + { + "kind": "func", + "name": "ExpiresAtNEQ", + "signature": "func ExpiresAtNEQ(v time.Time) predicate.ChargeCreditPurchase", + "line": 1566 + }, + { + "kind": "func", + "name": "ExpiresAtIn", + "signature": "func ExpiresAtIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1571 + }, + { + "kind": "func", + "name": "ExpiresAtNotIn", + "signature": "func ExpiresAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchase", + "line": 1576 + }, + { + "kind": "func", + "name": "ExpiresAtGT", + "signature": "func ExpiresAtGT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1581 + }, + { + "kind": "func", + "name": "ExpiresAtGTE", + "signature": "func ExpiresAtGTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1586 + }, + { + "kind": "func", + "name": "ExpiresAtLT", + "signature": "func ExpiresAtLT(v time.Time) predicate.ChargeCreditPurchase", + "line": 1591 + }, + { + "kind": "func", + "name": "ExpiresAtLTE", + "signature": "func ExpiresAtLTE(v time.Time) predicate.ChargeCreditPurchase", + "line": 1596 + }, + { + "kind": "func", + "name": "ExpiresAtIsNil", + "signature": "func ExpiresAtIsNil() predicate.ChargeCreditPurchase", + "line": 1601 + }, + { + "kind": "func", + "name": "ExpiresAtNotNil", + "signature": "func ExpiresAtNotNil() predicate.ChargeCreditPurchase", + "line": 1606 + }, + { + "kind": "func", + "name": "PriorityEQ", + "signature": "func PriorityEQ(v int) predicate.ChargeCreditPurchase", + "line": 1611 + }, + { + "kind": "func", + "name": "PriorityNEQ", + "signature": "func PriorityNEQ(v int) predicate.ChargeCreditPurchase", + "line": 1616 + }, + { + "kind": "func", + "name": "PriorityIn", + "signature": "func PriorityIn(vs ...int) predicate.ChargeCreditPurchase", + "line": 1621 + }, + { + "kind": "func", + "name": "PriorityNotIn", + "signature": "func PriorityNotIn(vs ...int) predicate.ChargeCreditPurchase", + "line": 1626 + }, + { + "kind": "func", + "name": "PriorityGT", + "signature": "func PriorityGT(v int) predicate.ChargeCreditPurchase", + "line": 1631 + }, + { + "kind": "func", + "name": "PriorityGTE", + "signature": "func PriorityGTE(v int) predicate.ChargeCreditPurchase", + "line": 1636 + }, + { + "kind": "func", + "name": "PriorityLT", + "signature": "func PriorityLT(v int) predicate.ChargeCreditPurchase", + "line": 1641 + }, + { + "kind": "func", + "name": "PriorityLTE", + "signature": "func PriorityLTE(v int) predicate.ChargeCreditPurchase", + "line": 1646 + }, + { + "kind": "func", + "name": "PriorityIsNil", + "signature": "func PriorityIsNil() predicate.ChargeCreditPurchase", + "line": 1651 + }, + { + "kind": "func", + "name": "PriorityNotNil", + "signature": "func PriorityNotNil() predicate.ChargeCreditPurchase", + "line": 1656 + }, + { + "kind": "func", + "name": "FeatureFiltersEQ", + "signature": "func FeatureFiltersEQ(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1661 + }, + { + "kind": "func", + "name": "FeatureFiltersNEQ", + "signature": "func FeatureFiltersNEQ(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1666 + }, + { + "kind": "func", + "name": "FeatureFiltersIn", + "signature": "func FeatureFiltersIn(vs ...pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1671 + }, + { + "kind": "func", + "name": "FeatureFiltersNotIn", + "signature": "func FeatureFiltersNotIn(vs ...pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1676 + }, + { + "kind": "func", + "name": "FeatureFiltersGT", + "signature": "func FeatureFiltersGT(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1681 + }, + { + "kind": "func", + "name": "FeatureFiltersGTE", + "signature": "func FeatureFiltersGTE(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1686 + }, + { + "kind": "func", + "name": "FeatureFiltersLT", + "signature": "func FeatureFiltersLT(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1691 + }, + { + "kind": "func", + "name": "FeatureFiltersLTE", + "signature": "func FeatureFiltersLTE(v pq.StringArray) predicate.ChargeCreditPurchase", + "line": 1696 + }, + { + "kind": "func", + "name": "FeatureFiltersIsNil", + "signature": "func FeatureFiltersIsNil() predicate.ChargeCreditPurchase", + "line": 1701 + }, + { + "kind": "func", + "name": "FeatureFiltersNotNil", + "signature": "func FeatureFiltersNotNil() predicate.ChargeCreditPurchase", + "line": 1706 + }, + { + "kind": "func", + "name": "StatusDetailedEQ", + "signature": "func StatusDetailedEQ(v creditpurchase.Status) predicate.ChargeCreditPurchase", + "line": 1711 + }, + { + "kind": "func", + "name": "StatusDetailedNEQ", + "signature": "func StatusDetailedNEQ(v creditpurchase.Status) predicate.ChargeCreditPurchase", + "line": 1717 + }, + { + "kind": "func", + "name": "StatusDetailedIn", + "signature": "func StatusDetailedIn(vs ...creditpurchase.Status) predicate.ChargeCreditPurchase", + "line": 1723 + }, + { + "kind": "func", + "name": "StatusDetailedNotIn", + "signature": "func StatusDetailedNotIn(vs ...creditpurchase.Status) predicate.ChargeCreditPurchase", + "line": 1732 + }, + { + "kind": "func", + "name": "HasExternalPayment", + "signature": "func HasExternalPayment() predicate.ChargeCreditPurchase", + "line": 1741 + }, + { + "kind": "func", + "name": "HasExternalPaymentWith", + "signature": "func HasExternalPaymentWith(preds ...predicate.ChargeCreditPurchaseExternalPayment) predicate.ChargeCreditPurchase", + "line": 1752 + }, + { + "kind": "func", + "name": "HasInvoicedPayment", + "signature": "func HasInvoicedPayment() predicate.ChargeCreditPurchase", + "line": 1764 + }, + { + "kind": "func", + "name": "HasInvoicedPaymentWith", + "signature": "func HasInvoicedPaymentWith(preds ...predicate.ChargeCreditPurchaseInvoicedPayment) predicate.ChargeCreditPurchase", + "line": 1775 + }, + { + "kind": "func", + "name": "HasCreditGrant", + "signature": "func HasCreditGrant() predicate.ChargeCreditPurchase", + "line": 1787 + }, + { + "kind": "func", + "name": "HasCreditGrantWith", + "signature": "func HasCreditGrantWith(preds ...predicate.ChargeCreditPurchaseCreditGrant) predicate.ChargeCreditPurchase", + "line": 1798 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.ChargeCreditPurchase", + "line": 1810 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.ChargeCreditPurchase", + "line": 1821 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.ChargeCreditPurchase", + "line": 1833 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.ChargeCreditPurchase", + "line": 1844 + }, + { + "kind": "func", + "name": "HasSubscriptionPhase", + "signature": "func HasSubscriptionPhase() predicate.ChargeCreditPurchase", + "line": 1856 + }, + { + "kind": "func", + "name": "HasSubscriptionPhaseWith", + "signature": "func HasSubscriptionPhaseWith(preds ...predicate.SubscriptionPhase) predicate.ChargeCreditPurchase", + "line": 1867 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.ChargeCreditPurchase", + "line": 1879 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.ChargeCreditPurchase", + "line": 1890 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.ChargeCreditPurchase", + "line": 1902 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.ChargeCreditPurchase", + "line": 1913 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.ChargeCreditPurchase", + "line": 1925 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.ChargeCreditPurchase", + "line": 1936 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchase", + "line": 1948 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchase", + "line": 1953 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchase", + "line": 1958 + } + ], + "line_count": 1960 + }, + "openmeter/ent/db/chargecreditpurchase_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreate", + "signature": "type ChargeCreditPurchaseCreate struct", + "line": 36 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCustomerID(v string) *ChargeCreditPurchaseCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseCreate", + "line": 80 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetUniqueReferenceID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetUniqueReferenceID(v string) *ChargeCreditPurchaseCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableUniqueReferenceID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableUniqueReferenceID(v *string) *ChargeCreditPurchaseCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCurrency(v currencyx.Code) *ChargeCreditPurchaseCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscriptionID(v string) *ChargeCreditPurchaseCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableSubscriptionID(v *string) *ChargeCreditPurchaseCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscriptionPhaseID(v string) *ChargeCreditPurchaseCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableSubscriptionPhaseID(v *string) *ChargeCreditPurchaseCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscriptionItemID(v string) *ChargeCreditPurchaseCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableSubscriptionItemID(v *string) *ChargeCreditPurchaseCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseCreate", + "line": 160 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableAdvanceAfter(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetTaxCodeID(v string) *ChargeCreditPurchaseCreate", + "line": 174 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableTaxCodeID(v *string) *ChargeCreditPurchaseCreate", + "line": 180 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseCreate", + "line": 188 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeCreditPurchaseCreate", + "line": 194 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseCreate", + "line": 202 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNamespace(v string) *ChargeCreditPurchaseCreate", + "line": 208 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetMetadata(v map[string]string) *ChargeCreditPurchaseCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCreatedAt(v time.Time) *ChargeCreditPurchaseCreate", + "line": 220 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableCreatedAt(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 226 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreate", + "line": 234 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableUpdatedAt(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreate", + "line": 248 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 254 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetName(v string) *ChargeCreditPurchaseCreate", + "line": 262 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetDescription(v string) *ChargeCreditPurchaseCreate", + "line": 268 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableDescription(v *string) *ChargeCreditPurchaseCreate", + "line": 274 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseCreate", + "line": 282 + }, + { + "kind": "func", + "name": "SetEffectiveAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetEffectiveAt(v time.Time) *ChargeCreditPurchaseCreate", + "line": 288 + }, + { + "kind": "func", + "name": "SetNillableEffectiveAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableEffectiveAt(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 294 + }, + { + "kind": "func", + "name": "SetExpiresAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetExpiresAt(v time.Time) *ChargeCreditPurchaseCreate", + "line": 302 + }, + { + "kind": "func", + "name": "SetNillableExpiresAt", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableExpiresAt(v *time.Time) *ChargeCreditPurchaseCreate", + "line": 308 + }, + { + "kind": "func", + "name": "SetPriority", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetPriority(v int) *ChargeCreditPurchaseCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetNillablePriority", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillablePriority(v *int) *ChargeCreditPurchaseCreate", + "line": 322 + }, + { + "kind": "func", + "name": "SetFeatureFilters", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetFeatureFilters(v pq.StringArray) *ChargeCreditPurchaseCreate", + "line": 330 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseCreate", + "line": 336 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseCreate", + "line": 342 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetID(v string) *ChargeCreditPurchaseCreate", + "line": 348 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableID(v *string) *ChargeCreditPurchaseCreate", + "line": 354 + }, + { + "kind": "func", + "name": "SetExternalPaymentID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetExternalPaymentID(id string) *ChargeCreditPurchaseCreate", + "line": 362 + }, + { + "kind": "func", + "name": "SetNillableExternalPaymentID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableExternalPaymentID(id *string) *ChargeCreditPurchaseCreate", + "line": 368 + }, + { + "kind": "func", + "name": "SetExternalPayment", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetExternalPayment(v *ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseCreate", + "line": 376 + }, + { + "kind": "func", + "name": "SetInvoicedPaymentID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetInvoicedPaymentID(id string) *ChargeCreditPurchaseCreate", + "line": 381 + }, + { + "kind": "func", + "name": "SetNillableInvoicedPaymentID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableInvoicedPaymentID(id *string) *ChargeCreditPurchaseCreate", + "line": 387 + }, + { + "kind": "func", + "name": "SetInvoicedPayment", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseCreate", + "line": 395 + }, + { + "kind": "func", + "name": "SetCreditGrantID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCreditGrantID(id string) *ChargeCreditPurchaseCreate", + "line": 400 + }, + { + "kind": "func", + "name": "SetNillableCreditGrantID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableCreditGrantID(id *string) *ChargeCreditPurchaseCreate", + "line": 406 + }, + { + "kind": "func", + "name": "SetCreditGrant", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCreditGrant(v *ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreate", + "line": 414 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetChargeID(id string) *ChargeCreditPurchaseCreate", + "line": 419 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetNillableChargeID(id *string) *ChargeCreditPurchaseCreate", + "line": 425 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCharge(v *Charge) *ChargeCreditPurchaseCreate", + "line": 433 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscription(v *Subscription) *ChargeCreditPurchaseCreate", + "line": 438 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscriptionPhase(v *SubscriptionPhase) *ChargeCreditPurchaseCreate", + "line": 443 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetSubscriptionItem(v *SubscriptionItem) *ChargeCreditPurchaseCreate", + "line": 448 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetCustomer(v *Customer) *ChargeCreditPurchaseCreate", + "line": 453 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *ChargeCreditPurchaseCreate) SetTaxCode(v *TaxCode) *ChargeCreditPurchaseCreate", + "line": 458 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeCreditPurchaseCreate) Mutation() *ChargeCreditPurchaseMutation", + "line": 463 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseCreate) Save(ctx context.Context) (*ChargeCreditPurchase, error)", + "line": 468 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseCreate) SaveX(ctx context.Context) *ChargeCreditPurchase", + "line": 474 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseCreate) Exec(ctx context.Context) error", + "line": 483 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseCreate) ExecX(ctx context.Context)", + "line": 489 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeCreditPurchaseCreate) defaults()", + "line": 496 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeCreditPurchaseCreate) check() error", + "line": 512 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeCreditPurchaseCreate) sqlSave(ctx context.Context) (*ChargeCreditPurchase, error)", + "line": 610 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeCreditPurchaseCreate) createSpec() (*ChargeCreditPurchase, *sqlgraph.CreateSpec, error)", + "line": 636 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseCreate) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseUpsertOne", + "line": 926 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseCreate) OnConflictColumns(columns ...string) *ChargeCreditPurchaseUpsertOne", + "line": 939 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 960 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateServicePeriodFrom() *ChargeCreditPurchaseUpsert", + "line": 966 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 972 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateServicePeriodTo() *ChargeCreditPurchaseUpsert", + "line": 978 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 984 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateBillingPeriodFrom() *ChargeCreditPurchaseUpsert", + "line": 990 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 996 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateBillingPeriodTo() *ChargeCreditPurchaseUpsert", + "line": 1002 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 1008 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateFullServicePeriodFrom() *ChargeCreditPurchaseUpsert", + "line": 1014 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 1020 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateFullServicePeriodTo() *ChargeCreditPurchaseUpsert", + "line": 1026 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseUpsert", + "line": 1032 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateStatus() *ChargeCreditPurchaseUpsert", + "line": 1038 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpsert", + "line": 1044 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateManagedBy() *ChargeCreditPurchaseUpsert", + "line": 1050 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetSubscriptionItemID(v string) *ChargeCreditPurchaseUpsert", + "line": 1056 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateSubscriptionItemID() *ChargeCreditPurchaseUpsert", + "line": 1062 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearSubscriptionItemID() *ChargeCreditPurchaseUpsert", + "line": 1068 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 1074 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateAdvanceAfter() *ChargeCreditPurchaseUpsert", + "line": 1080 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearAdvanceAfter() *ChargeCreditPurchaseUpsert", + "line": 1086 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetTaxCodeID(v string) *ChargeCreditPurchaseUpsert", + "line": 1092 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateTaxCodeID() *ChargeCreditPurchaseUpsert", + "line": 1098 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearTaxCodeID() *ChargeCreditPurchaseUpsert", + "line": 1104 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseUpsert", + "line": 1110 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateTaxBehavior() *ChargeCreditPurchaseUpsert", + "line": 1116 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearTaxBehavior() *ChargeCreditPurchaseUpsert", + "line": 1122 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseUpsert", + "line": 1128 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateAnnotations() *ChargeCreditPurchaseUpsert", + "line": 1134 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearAnnotations() *ChargeCreditPurchaseUpsert", + "line": 1140 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetMetadata(v map[string]string) *ChargeCreditPurchaseUpsert", + "line": 1146 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateMetadata() *ChargeCreditPurchaseUpsert", + "line": 1152 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearMetadata() *ChargeCreditPurchaseUpsert", + "line": 1158 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 1164 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateUpdatedAt() *ChargeCreditPurchaseUpsert", + "line": 1170 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetDeletedAt(v time.Time) *ChargeCreditPurchaseUpsert", + "line": 1176 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateDeletedAt() *ChargeCreditPurchaseUpsert", + "line": 1182 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearDeletedAt() *ChargeCreditPurchaseUpsert", + "line": 1188 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetName(v string) *ChargeCreditPurchaseUpsert", + "line": 1194 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateName() *ChargeCreditPurchaseUpsert", + "line": 1200 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetDescription(v string) *ChargeCreditPurchaseUpsert", + "line": 1206 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateDescription() *ChargeCreditPurchaseUpsert", + "line": 1212 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeCreditPurchaseUpsert) ClearDescription() *ChargeCreditPurchaseUpsert", + "line": 1218 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseUpsert", + "line": 1224 + }, + { + "kind": "func", + "name": "UpdateCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateCreditAmount() *ChargeCreditPurchaseUpsert", + "line": 1230 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseUpsert", + "line": 1236 + }, + { + "kind": "func", + "name": "UpdateSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateSettlement() *ChargeCreditPurchaseUpsert", + "line": 1242 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsert) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseUpsert", + "line": 1248 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsert) UpdateStatusDetailed() *ChargeCreditPurchaseUpsert", + "line": 1254 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateNewValues() *ChargeCreditPurchaseUpsertOne", + "line": 1270 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) Ignore() *ChargeCreditPurchaseUpsertOne", + "line": 1319 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) DoNothing() *ChargeCreditPurchaseUpsertOne", + "line": 1326 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) Update(set func(*ChargeCreditPurchaseUpsert)) *ChargeCreditPurchaseUpsertOne", + "line": 1333 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1341 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateServicePeriodFrom() *ChargeCreditPurchaseUpsertOne", + "line": 1348 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1355 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateServicePeriodTo() *ChargeCreditPurchaseUpsertOne", + "line": 1362 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1369 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateBillingPeriodFrom() *ChargeCreditPurchaseUpsertOne", + "line": 1376 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1383 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateBillingPeriodTo() *ChargeCreditPurchaseUpsertOne", + "line": 1390 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1397 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateFullServicePeriodFrom() *ChargeCreditPurchaseUpsertOne", + "line": 1404 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1411 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateFullServicePeriodTo() *ChargeCreditPurchaseUpsertOne", + "line": 1418 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseUpsertOne", + "line": 1425 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateStatus() *ChargeCreditPurchaseUpsertOne", + "line": 1432 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpsertOne", + "line": 1439 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateManagedBy() *ChargeCreditPurchaseUpsertOne", + "line": 1446 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetSubscriptionItemID(v string) *ChargeCreditPurchaseUpsertOne", + "line": 1453 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateSubscriptionItemID() *ChargeCreditPurchaseUpsertOne", + "line": 1460 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearSubscriptionItemID() *ChargeCreditPurchaseUpsertOne", + "line": 1467 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1474 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateAdvanceAfter() *ChargeCreditPurchaseUpsertOne", + "line": 1481 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearAdvanceAfter() *ChargeCreditPurchaseUpsertOne", + "line": 1488 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetTaxCodeID(v string) *ChargeCreditPurchaseUpsertOne", + "line": 1495 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateTaxCodeID() *ChargeCreditPurchaseUpsertOne", + "line": 1502 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearTaxCodeID() *ChargeCreditPurchaseUpsertOne", + "line": 1509 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseUpsertOne", + "line": 1516 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateTaxBehavior() *ChargeCreditPurchaseUpsertOne", + "line": 1523 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearTaxBehavior() *ChargeCreditPurchaseUpsertOne", + "line": 1530 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseUpsertOne", + "line": 1537 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateAnnotations() *ChargeCreditPurchaseUpsertOne", + "line": 1544 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearAnnotations() *ChargeCreditPurchaseUpsertOne", + "line": 1551 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetMetadata(v map[string]string) *ChargeCreditPurchaseUpsertOne", + "line": 1558 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateMetadata() *ChargeCreditPurchaseUpsertOne", + "line": 1565 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearMetadata() *ChargeCreditPurchaseUpsertOne", + "line": 1572 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1579 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateUpdatedAt() *ChargeCreditPurchaseUpsertOne", + "line": 1586 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseUpsertOne", + "line": 1593 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateDeletedAt() *ChargeCreditPurchaseUpsertOne", + "line": 1600 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearDeletedAt() *ChargeCreditPurchaseUpsertOne", + "line": 1607 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetName(v string) *ChargeCreditPurchaseUpsertOne", + "line": 1614 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateName() *ChargeCreditPurchaseUpsertOne", + "line": 1621 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetDescription(v string) *ChargeCreditPurchaseUpsertOne", + "line": 1628 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateDescription() *ChargeCreditPurchaseUpsertOne", + "line": 1635 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ClearDescription() *ChargeCreditPurchaseUpsertOne", + "line": 1642 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseUpsertOne", + "line": 1649 + }, + { + "kind": "func", + "name": "UpdateCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateCreditAmount() *ChargeCreditPurchaseUpsertOne", + "line": 1656 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseUpsertOne", + "line": 1663 + }, + { + "kind": "func", + "name": "UpdateSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateSettlement() *ChargeCreditPurchaseUpsertOne", + "line": 1670 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseUpsertOne", + "line": 1677 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) UpdateStatusDetailed() *ChargeCreditPurchaseUpsertOne", + "line": 1684 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) Exec(ctx context.Context) error", + "line": 1691 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ExecX(ctx context.Context)", + "line": 1699 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1706 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeCreditPurchaseUpsertOne) IDX(ctx context.Context) string", + "line": 1720 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreateBulk", + "signature": "type ChargeCreditPurchaseCreateBulk struct", + "line": 1729 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) Save(ctx context.Context) ([]*ChargeCreditPurchase, error)", + "line": 1737 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) SaveX(ctx context.Context) []*ChargeCreditPurchase", + "line": 1796 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) Exec(ctx context.Context) error", + "line": 1805 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) ExecX(ctx context.Context)", + "line": 1811 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseUpsertBulk", + "line": 1832 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseCreateBulk) OnConflictColumns(columns ...string) *ChargeCreditPurchaseUpsertBulk", + "line": 1845 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseUpsertBulk", + "signature": "type ChargeCreditPurchaseUpsertBulk struct", + "line": 1854 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateNewValues() *ChargeCreditPurchaseUpsertBulk", + "line": 1869 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) Ignore() *ChargeCreditPurchaseUpsertBulk", + "line": 1920 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) DoNothing() *ChargeCreditPurchaseUpsertBulk", + "line": 1927 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) Update(set func(*ChargeCreditPurchaseUpsert)) *ChargeCreditPurchaseUpsertBulk", + "line": 1934 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 1942 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateServicePeriodFrom() *ChargeCreditPurchaseUpsertBulk", + "line": 1949 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 1956 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateServicePeriodTo() *ChargeCreditPurchaseUpsertBulk", + "line": 1963 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 1970 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateBillingPeriodFrom() *ChargeCreditPurchaseUpsertBulk", + "line": 1977 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 1984 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateBillingPeriodTo() *ChargeCreditPurchaseUpsertBulk", + "line": 1991 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 1998 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateFullServicePeriodFrom() *ChargeCreditPurchaseUpsertBulk", + "line": 2005 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 2012 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateFullServicePeriodTo() *ChargeCreditPurchaseUpsertBulk", + "line": 2019 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseUpsertBulk", + "line": 2026 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateStatus() *ChargeCreditPurchaseUpsertBulk", + "line": 2033 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpsertBulk", + "line": 2040 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateManagedBy() *ChargeCreditPurchaseUpsertBulk", + "line": 2047 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetSubscriptionItemID(v string) *ChargeCreditPurchaseUpsertBulk", + "line": 2054 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateSubscriptionItemID() *ChargeCreditPurchaseUpsertBulk", + "line": 2061 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearSubscriptionItemID() *ChargeCreditPurchaseUpsertBulk", + "line": 2068 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 2075 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateAdvanceAfter() *ChargeCreditPurchaseUpsertBulk", + "line": 2082 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearAdvanceAfter() *ChargeCreditPurchaseUpsertBulk", + "line": 2089 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetTaxCodeID(v string) *ChargeCreditPurchaseUpsertBulk", + "line": 2096 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateTaxCodeID() *ChargeCreditPurchaseUpsertBulk", + "line": 2103 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearTaxCodeID() *ChargeCreditPurchaseUpsertBulk", + "line": 2110 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseUpsertBulk", + "line": 2117 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateTaxBehavior() *ChargeCreditPurchaseUpsertBulk", + "line": 2124 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearTaxBehavior() *ChargeCreditPurchaseUpsertBulk", + "line": 2131 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseUpsertBulk", + "line": 2138 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateAnnotations() *ChargeCreditPurchaseUpsertBulk", + "line": 2145 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearAnnotations() *ChargeCreditPurchaseUpsertBulk", + "line": 2152 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetMetadata(v map[string]string) *ChargeCreditPurchaseUpsertBulk", + "line": 2159 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateMetadata() *ChargeCreditPurchaseUpsertBulk", + "line": 2166 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearMetadata() *ChargeCreditPurchaseUpsertBulk", + "line": 2173 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 2180 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateUpdatedAt() *ChargeCreditPurchaseUpsertBulk", + "line": 2187 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetDeletedAt(v time.Time) *ChargeCreditPurchaseUpsertBulk", + "line": 2194 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateDeletedAt() *ChargeCreditPurchaseUpsertBulk", + "line": 2201 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearDeletedAt() *ChargeCreditPurchaseUpsertBulk", + "line": 2208 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetName(v string) *ChargeCreditPurchaseUpsertBulk", + "line": 2215 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateName() *ChargeCreditPurchaseUpsertBulk", + "line": 2222 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetDescription(v string) *ChargeCreditPurchaseUpsertBulk", + "line": 2229 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateDescription() *ChargeCreditPurchaseUpsertBulk", + "line": 2236 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ClearDescription() *ChargeCreditPurchaseUpsertBulk", + "line": 2243 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseUpsertBulk", + "line": 2250 + }, + { + "kind": "func", + "name": "UpdateCreditAmount", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateCreditAmount() *ChargeCreditPurchaseUpsertBulk", + "line": 2257 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseUpsertBulk", + "line": 2264 + }, + { + "kind": "func", + "name": "UpdateSettlement", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateSettlement() *ChargeCreditPurchaseUpsertBulk", + "line": 2271 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseUpsertBulk", + "line": 2278 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) UpdateStatusDetailed() *ChargeCreditPurchaseUpsertBulk", + "line": 2285 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) Exec(ctx context.Context) error", + "line": 2292 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseUpsertBulk) ExecX(ctx context.Context)", + "line": 2308 + } + ], + "line_count": 2312 + }, + "openmeter/ent/db/chargecreditpurchase_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseDelete", + "signature": "type ChargeCreditPurchaseDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseDelete) Where(ps ...predicate.ChargeCreditPurchase) *ChargeCreditPurchaseDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeCreditPurchaseDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseDeleteOne", + "signature": "type ChargeCreditPurchaseDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseDeleteOne) Where(ps ...predicate.ChargeCreditPurchase) *ChargeCreditPurchaseDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargecreditpurchase_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseQuery", + "signature": "type ChargeCreditPurchaseQuery struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeCreditPurchaseQuery) Where(ps ...predicate.ChargeCreditPurchase) *ChargeCreditPurchaseQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeCreditPurchaseQuery) Limit(limit int) *ChargeCreditPurchaseQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeCreditPurchaseQuery) Offset(offset int) *ChargeCreditPurchaseQuery", + "line": 64 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeCreditPurchaseQuery) Unique(unique bool) *ChargeCreditPurchaseQuery", + "line": 71 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeCreditPurchaseQuery) Order(o ...chargecreditpurchase.OrderOption) *ChargeCreditPurchaseQuery", + "line": 77 + }, + { + "kind": "func", + "name": "QueryExternalPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryExternalPayment() *ChargeCreditPurchaseExternalPaymentQuery", + "line": 83 + }, + { + "kind": "func", + "name": "QueryInvoicedPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryInvoicedPayment() *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 105 + }, + { + "kind": "func", + "name": "QueryCreditGrant", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryCreditGrant() *ChargeCreditPurchaseCreditGrantQuery", + "line": 127 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryCharge() *ChargeQuery", + "line": 149 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *ChargeCreditPurchaseQuery) QuerySubscription() *SubscriptionQuery", + "line": 171 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_q *ChargeCreditPurchaseQuery) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 193 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *ChargeCreditPurchaseQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 215 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryCustomer() *CustomerQuery", + "line": 237 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *ChargeCreditPurchaseQuery) QueryTaxCode() *TaxCodeQuery", + "line": 259 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeCreditPurchaseQuery) First(ctx context.Context) (*ChargeCreditPurchase, error)", + "line": 282 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeCreditPurchaseQuery) FirstX(ctx context.Context) *ChargeCreditPurchase", + "line": 294 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeCreditPurchaseQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 304 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeCreditPurchaseQuery) FirstIDX(ctx context.Context) string", + "line": 317 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeCreditPurchaseQuery) Only(ctx context.Context) (*ChargeCreditPurchase, error)", + "line": 328 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeCreditPurchaseQuery) OnlyX(ctx context.Context) *ChargeCreditPurchase", + "line": 344 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeCreditPurchaseQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 355 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeCreditPurchaseQuery) OnlyIDX(ctx context.Context) string", + "line": 372 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeCreditPurchaseQuery) All(ctx context.Context) ([]*ChargeCreditPurchase, error)", + "line": 381 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeCreditPurchaseQuery) AllX(ctx context.Context) []*ChargeCreditPurchase", + "line": 391 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeCreditPurchaseQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 400 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeCreditPurchaseQuery) IDsX(ctx context.Context) []string", + "line": 412 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeCreditPurchaseQuery) Count(ctx context.Context) (int, error)", + "line": 421 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeCreditPurchaseQuery) CountX(ctx context.Context) int", + "line": 430 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeCreditPurchaseQuery) Exist(ctx context.Context) (bool, error)", + "line": 439 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeCreditPurchaseQuery) ExistX(ctx context.Context) bool", + "line": 452 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeCreditPurchaseQuery) Clone() *ChargeCreditPurchaseQuery", + "line": 462 + }, + { + "kind": "func", + "name": "WithExternalPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithExternalPayment(opts ...func(*ChargeCreditPurchaseExternalPaymentQuery)) *ChargeCreditPurchaseQuery", + "line": 489 + }, + { + "kind": "func", + "name": "WithInvoicedPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithInvoicedPayment(opts ...func(*ChargeCreditPurchaseInvoicedPaymentQuery)) *ChargeCreditPurchaseQuery", + "line": 500 + }, + { + "kind": "func", + "name": "WithCreditGrant", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithCreditGrant(opts ...func(*ChargeCreditPurchaseCreditGrantQuery)) *ChargeCreditPurchaseQuery", + "line": 511 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithCharge(opts ...func(*ChargeQuery)) *ChargeCreditPurchaseQuery", + "line": 522 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *ChargeCreditPurchaseQuery", + "line": 533 + }, + { + "kind": "func", + "name": "WithSubscriptionPhase", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithSubscriptionPhase(opts ...func(*SubscriptionPhaseQuery)) *ChargeCreditPurchaseQuery", + "line": 544 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *ChargeCreditPurchaseQuery", + "line": 555 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithCustomer(opts ...func(*CustomerQuery)) *ChargeCreditPurchaseQuery", + "line": 566 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *ChargeCreditPurchaseQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *ChargeCreditPurchaseQuery", + "line": 577 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeCreditPurchaseQuery) GroupBy(field string, fields ...string) *ChargeCreditPurchaseGroupBy", + "line": 600 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeCreditPurchaseQuery) Select(fields ...string) *ChargeCreditPurchaseSelect", + "line": 621 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeCreditPurchaseQuery) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseSelect", + "line": 630 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeCreditPurchaseQuery) prepareQuery(ctx context.Context) error", + "line": 634 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeCreditPurchaseQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeCreditPurchase, error)", + "line": 660 + }, + { + "kind": "func", + "name": "loadExternalPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadExternalPayment(ctx context.Context, query *ChargeCreditPurchaseExternalPaymentQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *ChargeCreditPurchaseExternalPayment)) error", + "line": 754 + }, + { + "kind": "func", + "name": "loadInvoicedPayment", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadInvoicedPayment(ctx context.Context, query *ChargeCreditPurchaseInvoicedPaymentQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *ChargeCreditPurchaseInvoicedPayment)) error", + "line": 781 + }, + { + "kind": "func", + "name": "loadCreditGrant", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadCreditGrant(ctx context.Context, query *ChargeCreditPurchaseCreditGrantQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *ChargeCreditPurchaseCreditGrant)) error", + "line": 808 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *Charge)) error", + "line": 835 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *Subscription)) error", + "line": 865 + }, + { + "kind": "func", + "name": "loadSubscriptionPhase", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadSubscriptionPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *SubscriptionPhase)) error", + "line": 897 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *SubscriptionItem)) error", + "line": 929 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *Customer)) error", + "line": 961 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *ChargeCreditPurchaseQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*ChargeCreditPurchase, init func(*ChargeCreditPurchase), assign func(*ChargeCreditPurchase, *TaxCode)) error", + "line": 990 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeCreditPurchaseQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1023 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeCreditPurchaseQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1035 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeCreditPurchaseQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1090 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeCreditPurchaseQuery) ForUpdate(opts ...sql.LockOption) *ChargeCreditPurchaseQuery", + "line": 1128 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeCreditPurchaseQuery) ForShare(opts ...sql.LockOption) *ChargeCreditPurchaseQuery", + "line": 1141 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseGroupBy", + "signature": "type ChargeCreditPurchaseGroupBy struct", + "line": 1152 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeCreditPurchaseGroupBy) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseGroupBy", + "line": 1158 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeCreditPurchaseGroupBy) Scan(ctx context.Context, v any) error", + "line": 1164 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeCreditPurchaseGroupBy) sqlScan(ctx context.Context, root *ChargeCreditPurchaseQuery, v any) error", + "line": 1172 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseSelect", + "signature": "type ChargeCreditPurchaseSelect struct", + "line": 1200 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeCreditPurchaseSelect) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseSelect", + "line": 1206 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeCreditPurchaseSelect) Scan(ctx context.Context, v any) error", + "line": 1212 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeCreditPurchaseSelect) sqlScan(ctx context.Context, root *ChargeCreditPurchaseQuery, v any) error", + "line": 1220 + } + ], + "line_count": 1239 + }, + "openmeter/ent/db/chargecreditpurchase_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseUpdate", + "signature": "type ChargeCreditPurchaseUpdate struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseUpdate) Where(ps ...predicate.ChargeCreditPurchase) *ChargeCreditPurchaseUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableBillingPeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableBillingPeriodTo(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 99 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableFullServicePeriodTo(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 119 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseUpdate", + "line": 127 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableStatus(v *meta.ChargeStatus) *ChargeCreditPurchaseUpdate", + "line": 133 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpdate", + "line": 147 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetSubscriptionItemID(v string) *ChargeCreditPurchaseUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableSubscriptionItemID(v *string) *ChargeCreditPurchaseUpdate", + "line": 161 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearSubscriptionItemID() *ChargeCreditPurchaseUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableAdvanceAfter(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearAdvanceAfter() *ChargeCreditPurchaseUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetTaxCodeID(v string) *ChargeCreditPurchaseUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableTaxCodeID(v *string) *ChargeCreditPurchaseUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearTaxCodeID() *ChargeCreditPurchaseUpdate", + "line": 209 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdate", + "line": 221 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearTaxBehavior() *ChargeCreditPurchaseUpdate", + "line": 229 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearAnnotations() *ChargeCreditPurchaseUpdate", + "line": 241 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetMetadata(v map[string]string) *ChargeCreditPurchaseUpdate", + "line": 247 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearMetadata() *ChargeCreditPurchaseUpdate", + "line": 253 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 259 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseUpdate", + "line": 271 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearDeletedAt() *ChargeCreditPurchaseUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetName(v string) *ChargeCreditPurchaseUpdate", + "line": 285 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableName(v *string) *ChargeCreditPurchaseUpdate", + "line": 291 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetDescription(v string) *ChargeCreditPurchaseUpdate", + "line": 299 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableDescription(v *string) *ChargeCreditPurchaseUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearDescription() *ChargeCreditPurchaseUpdate", + "line": 313 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseUpdate", + "line": 319 + }, + { + "kind": "func", + "name": "SetNillableCreditAmount", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableCreditAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseUpdate", + "line": 325 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseUpdate", + "line": 333 + }, + { + "kind": "func", + "name": "SetNillableSettlement", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableSettlement(v *creditpurchase.Settlement) *ChargeCreditPurchaseUpdate", + "line": 339 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseUpdate", + "line": 347 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableStatusDetailed(v *creditpurchase.Status) *ChargeCreditPurchaseUpdate", + "line": 353 + }, + { + "kind": "func", + "name": "SetExternalPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetExternalPaymentID(id string) *ChargeCreditPurchaseUpdate", + "line": 361 + }, + { + "kind": "func", + "name": "SetNillableExternalPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableExternalPaymentID(id *string) *ChargeCreditPurchaseUpdate", + "line": 367 + }, + { + "kind": "func", + "name": "SetExternalPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetExternalPayment(v *ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseUpdate", + "line": 375 + }, + { + "kind": "func", + "name": "SetInvoicedPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetInvoicedPaymentID(id string) *ChargeCreditPurchaseUpdate", + "line": 380 + }, + { + "kind": "func", + "name": "SetNillableInvoicedPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableInvoicedPaymentID(id *string) *ChargeCreditPurchaseUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "SetInvoicedPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseUpdate", + "line": 394 + }, + { + "kind": "func", + "name": "SetCreditGrantID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetCreditGrantID(id string) *ChargeCreditPurchaseUpdate", + "line": 399 + }, + { + "kind": "func", + "name": "SetNillableCreditGrantID", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetNillableCreditGrantID(id *string) *ChargeCreditPurchaseUpdate", + "line": 405 + }, + { + "kind": "func", + "name": "SetCreditGrant", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetCreditGrant(v *ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseUpdate", + "line": 413 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetSubscriptionItem(v *SubscriptionItem) *ChargeCreditPurchaseUpdate", + "line": 418 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SetTaxCode(v *TaxCode) *ChargeCreditPurchaseUpdate", + "line": 423 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseUpdate) Mutation() *ChargeCreditPurchaseMutation", + "line": 428 + }, + { + "kind": "func", + "name": "ClearExternalPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearExternalPayment() *ChargeCreditPurchaseUpdate", + "line": 433 + }, + { + "kind": "func", + "name": "ClearInvoicedPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearInvoicedPayment() *ChargeCreditPurchaseUpdate", + "line": 439 + }, + { + "kind": "func", + "name": "ClearCreditGrant", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearCreditGrant() *ChargeCreditPurchaseUpdate", + "line": 445 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearSubscriptionItem() *ChargeCreditPurchaseUpdate", + "line": 451 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ClearTaxCode() *ChargeCreditPurchaseUpdate", + "line": 457 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseUpdate) Save(ctx context.Context) (int, error)", + "line": 463 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseUpdate) SaveX(ctx context.Context) int", + "line": 469 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseUpdate) Exec(ctx context.Context) error", + "line": 478 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseUpdate) ExecX(ctx context.Context)", + "line": 484 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseUpdate) defaults()", + "line": 491 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseUpdate) check() error", + "line": 499 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 531 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseUpdateOne", + "signature": "type ChargeCreditPurchaseUpdateOne struct", + "line": 795 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 803 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 809 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 817 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 823 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetBillingPeriodFrom(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 831 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableBillingPeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 837 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetBillingPeriodTo(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 845 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableBillingPeriodTo(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 851 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetFullServicePeriodFrom(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 859 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 865 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetFullServicePeriodTo(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 873 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableFullServicePeriodTo(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 879 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetStatus(v meta.ChargeStatus) *ChargeCreditPurchaseUpdateOne", + "line": 887 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableStatus(v *meta.ChargeStatus) *ChargeCreditPurchaseUpdateOne", + "line": 893 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpdateOne", + "line": 901 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeCreditPurchaseUpdateOne", + "line": 907 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetSubscriptionItemID(v string) *ChargeCreditPurchaseUpdateOne", + "line": 915 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableSubscriptionItemID(v *string) *ChargeCreditPurchaseUpdateOne", + "line": 921 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearSubscriptionItemID() *ChargeCreditPurchaseUpdateOne", + "line": 929 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetAdvanceAfter(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 935 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableAdvanceAfter(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 941 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearAdvanceAfter() *ChargeCreditPurchaseUpdateOne", + "line": 949 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetTaxCodeID(v string) *ChargeCreditPurchaseUpdateOne", + "line": 955 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableTaxCodeID(v *string) *ChargeCreditPurchaseUpdateOne", + "line": 961 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearTaxCodeID() *ChargeCreditPurchaseUpdateOne", + "line": 969 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdateOne", + "line": 975 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdateOne", + "line": 981 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearTaxBehavior() *ChargeCreditPurchaseUpdateOne", + "line": 989 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseUpdateOne", + "line": 995 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearAnnotations() *ChargeCreditPurchaseUpdateOne", + "line": 1001 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetMetadata(v map[string]string) *ChargeCreditPurchaseUpdateOne", + "line": 1007 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearMetadata() *ChargeCreditPurchaseUpdateOne", + "line": 1013 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 1019 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 1025 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 1031 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearDeletedAt() *ChargeCreditPurchaseUpdateOne", + "line": 1039 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetName(v string) *ChargeCreditPurchaseUpdateOne", + "line": 1045 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableName(v *string) *ChargeCreditPurchaseUpdateOne", + "line": 1051 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetDescription(v string) *ChargeCreditPurchaseUpdateOne", + "line": 1059 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableDescription(v *string) *ChargeCreditPurchaseUpdateOne", + "line": 1065 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearDescription() *ChargeCreditPurchaseUpdateOne", + "line": 1073 + }, + { + "kind": "func", + "name": "SetCreditAmount", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetCreditAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseUpdateOne", + "line": 1079 + }, + { + "kind": "func", + "name": "SetNillableCreditAmount", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableCreditAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseUpdateOne", + "line": 1085 + }, + { + "kind": "func", + "name": "SetSettlement", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetSettlement(v creditpurchase.Settlement) *ChargeCreditPurchaseUpdateOne", + "line": 1093 + }, + { + "kind": "func", + "name": "SetNillableSettlement", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableSettlement(v *creditpurchase.Settlement) *ChargeCreditPurchaseUpdateOne", + "line": 1099 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetStatusDetailed(v creditpurchase.Status) *ChargeCreditPurchaseUpdateOne", + "line": 1107 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableStatusDetailed(v *creditpurchase.Status) *ChargeCreditPurchaseUpdateOne", + "line": 1113 + }, + { + "kind": "func", + "name": "SetExternalPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetExternalPaymentID(id string) *ChargeCreditPurchaseUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "SetNillableExternalPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableExternalPaymentID(id *string) *ChargeCreditPurchaseUpdateOne", + "line": 1127 + }, + { + "kind": "func", + "name": "SetExternalPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetExternalPayment(v *ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseUpdateOne", + "line": 1135 + }, + { + "kind": "func", + "name": "SetInvoicedPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetInvoicedPaymentID(id string) *ChargeCreditPurchaseUpdateOne", + "line": 1140 + }, + { + "kind": "func", + "name": "SetNillableInvoicedPaymentID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableInvoicedPaymentID(id *string) *ChargeCreditPurchaseUpdateOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetInvoicedPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetInvoicedPayment(v *ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseUpdateOne", + "line": 1154 + }, + { + "kind": "func", + "name": "SetCreditGrantID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetCreditGrantID(id string) *ChargeCreditPurchaseUpdateOne", + "line": 1159 + }, + { + "kind": "func", + "name": "SetNillableCreditGrantID", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetNillableCreditGrantID(id *string) *ChargeCreditPurchaseUpdateOne", + "line": 1165 + }, + { + "kind": "func", + "name": "SetCreditGrant", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetCreditGrant(v *ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseUpdateOne", + "line": 1173 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetSubscriptionItem(v *SubscriptionItem) *ChargeCreditPurchaseUpdateOne", + "line": 1178 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SetTaxCode(v *TaxCode) *ChargeCreditPurchaseUpdateOne", + "line": 1183 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) Mutation() *ChargeCreditPurchaseMutation", + "line": 1188 + }, + { + "kind": "func", + "name": "ClearExternalPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearExternalPayment() *ChargeCreditPurchaseUpdateOne", + "line": 1193 + }, + { + "kind": "func", + "name": "ClearInvoicedPayment", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearInvoicedPayment() *ChargeCreditPurchaseUpdateOne", + "line": 1199 + }, + { + "kind": "func", + "name": "ClearCreditGrant", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearCreditGrant() *ChargeCreditPurchaseUpdateOne", + "line": 1205 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearSubscriptionItem() *ChargeCreditPurchaseUpdateOne", + "line": 1211 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ClearTaxCode() *ChargeCreditPurchaseUpdateOne", + "line": 1217 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) Where(ps ...predicate.ChargeCreditPurchase) *ChargeCreditPurchaseUpdateOne", + "line": 1223 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) Select(field string, fields ...string) *ChargeCreditPurchaseUpdateOne", + "line": 1230 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) Save(ctx context.Context) (*ChargeCreditPurchase, error)", + "line": 1236 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) SaveX(ctx context.Context) *ChargeCreditPurchase", + "line": 1242 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) Exec(ctx context.Context) error", + "line": 1251 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) ExecX(ctx context.Context)", + "line": 1257 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) defaults()", + "line": 1264 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) check() error", + "line": 1272 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseUpdateOne) sqlSave(ctx context.Context) (_node *ChargeCreditPurchase, err error)", + "line": 1304 + } + ], + "line_count": 1585 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrant", + "signature": "type ChargeCreditPurchaseCreditGrant struct", + "line": 17 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantEdges", + "signature": "type ChargeCreditPurchaseCreditGrantEdges struct", + "line": 42 + }, + { + "kind": "func", + "name": "CreditPurchaseOrErr", + "signature": "func (e ChargeCreditPurchaseCreditGrantEdges) CreditPurchaseOrErr() (*ChargeCreditPurchase, error)", + "line": 52 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) assignValues(columns []string, values []any) error", + "line": 79 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) Value(name string) (ent.Value, error)", + "line": 143 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 148 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) Update() *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 155 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) Unwrap() *ChargeCreditPurchaseCreditGrant", + "line": 161 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeCreditPurchaseCreditGrant) String() string", + "line": 171 + } + ], + "line_count": 202 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant/chargecreditpurchasecreditgrant.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 57 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 85 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 90 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 95 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 100 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 110 + }, + { + "kind": "func", + "name": "ByTransactionGroupID", + "signature": "func ByTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByGrantedAt", + "signature": "func ByGrantedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByCreditPurchaseField", + "signature": "func ByCreditPurchaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "newCreditPurchaseStep", + "signature": "func newCreditPurchaseStep() *sqlgraph.Step", + "line": 130 + } + ], + "line_count": 136 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 84 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 89 + }, + { + "kind": "func", + "name": "TransactionGroupID", + "signature": "func TransactionGroupID(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 94 + }, + { + "kind": "func", + "name": "GrantedAt", + "signature": "func GrantedAt(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeCreditPurchaseCreditGrant", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeCreditPurchaseCreditGrant", + "line": 294 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 299 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 304 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 309 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 314 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 319 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 324 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 329 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 334 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 339 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 344 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 349 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 354 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 359 + }, + { + "kind": "func", + "name": "TransactionGroupIDEQ", + "signature": "func TransactionGroupIDEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 364 + }, + { + "kind": "func", + "name": "TransactionGroupIDNEQ", + "signature": "func TransactionGroupIDNEQ(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 369 + }, + { + "kind": "func", + "name": "TransactionGroupIDIn", + "signature": "func TransactionGroupIDIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 374 + }, + { + "kind": "func", + "name": "TransactionGroupIDNotIn", + "signature": "func TransactionGroupIDNotIn(vs ...string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 379 + }, + { + "kind": "func", + "name": "TransactionGroupIDGT", + "signature": "func TransactionGroupIDGT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 384 + }, + { + "kind": "func", + "name": "TransactionGroupIDGTE", + "signature": "func TransactionGroupIDGTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 389 + }, + { + "kind": "func", + "name": "TransactionGroupIDLT", + "signature": "func TransactionGroupIDLT(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 394 + }, + { + "kind": "func", + "name": "TransactionGroupIDLTE", + "signature": "func TransactionGroupIDLTE(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 399 + }, + { + "kind": "func", + "name": "TransactionGroupIDContains", + "signature": "func TransactionGroupIDContains(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 404 + }, + { + "kind": "func", + "name": "TransactionGroupIDHasPrefix", + "signature": "func TransactionGroupIDHasPrefix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 409 + }, + { + "kind": "func", + "name": "TransactionGroupIDHasSuffix", + "signature": "func TransactionGroupIDHasSuffix(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 414 + }, + { + "kind": "func", + "name": "TransactionGroupIDEqualFold", + "signature": "func TransactionGroupIDEqualFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 419 + }, + { + "kind": "func", + "name": "TransactionGroupIDContainsFold", + "signature": "func TransactionGroupIDContainsFold(v string) predicate.ChargeCreditPurchaseCreditGrant", + "line": 424 + }, + { + "kind": "func", + "name": "GrantedAtEQ", + "signature": "func GrantedAtEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 429 + }, + { + "kind": "func", + "name": "GrantedAtNEQ", + "signature": "func GrantedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 434 + }, + { + "kind": "func", + "name": "GrantedAtIn", + "signature": "func GrantedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 439 + }, + { + "kind": "func", + "name": "GrantedAtNotIn", + "signature": "func GrantedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 444 + }, + { + "kind": "func", + "name": "GrantedAtGT", + "signature": "func GrantedAtGT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 449 + }, + { + "kind": "func", + "name": "GrantedAtGTE", + "signature": "func GrantedAtGTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 454 + }, + { + "kind": "func", + "name": "GrantedAtLT", + "signature": "func GrantedAtLT(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 459 + }, + { + "kind": "func", + "name": "GrantedAtLTE", + "signature": "func GrantedAtLTE(v time.Time) predicate.ChargeCreditPurchaseCreditGrant", + "line": 464 + }, + { + "kind": "func", + "name": "HasCreditPurchase", + "signature": "func HasCreditPurchase() predicate.ChargeCreditPurchaseCreditGrant", + "line": 469 + }, + { + "kind": "func", + "name": "HasCreditPurchaseWith", + "signature": "func HasCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchaseCreditGrant", + "line": 480 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeCreditPurchaseCreditGrant) predicate.ChargeCreditPurchaseCreditGrant", + "line": 492 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeCreditPurchaseCreditGrant) predicate.ChargeCreditPurchaseCreditGrant", + "line": 497 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeCreditPurchaseCreditGrant) predicate.ChargeCreditPurchaseCreditGrant", + "line": 502 + } + ], + "line_count": 504 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantCreate", + "signature": "type ChargeCreditPurchaseCreditGrantCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetNamespace(v string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetCreatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetNillableCreatedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetNillableUpdatedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetChargeID(v string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetID(v string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetNillableID(v *string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetCreditPurchaseID", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetCreditPurchaseID(id string) *ChargeCreditPurchaseCreditGrantCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetCreditPurchase", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SetCreditPurchase(v *ChargeCreditPurchase) *ChargeCreditPurchaseCreditGrantCreate", + "line": 114 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) Mutation() *ChargeCreditPurchaseCreditGrantMutation", + "line": 119 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) Save(ctx context.Context) (*ChargeCreditPurchaseCreditGrant, error)", + "line": 124 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) SaveX(ctx context.Context) *ChargeCreditPurchaseCreditGrant", + "line": 130 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) Exec(ctx context.Context) error", + "line": 139 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) ExecX(ctx context.Context)", + "line": 145 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) defaults()", + "line": 152 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) check() error", + "line": 168 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) sqlSave(ctx context.Context) (*ChargeCreditPurchaseCreditGrant, error)", + "line": 203 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) createSpec() (*ChargeCreditPurchaseCreditGrant, *sqlgraph.CreateSpec)", + "line": 226 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 296 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreate) OnConflictColumns(columns ...string) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 309 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsert", + "line": 330 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) UpdateUpdatedAt() *ChargeCreditPurchaseCreditGrantUpsert", + "line": 336 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsert", + "line": 342 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) UpdateDeletedAt() *ChargeCreditPurchaseCreditGrantUpsert", + "line": 348 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) ClearDeletedAt() *ChargeCreditPurchaseCreditGrantUpsert", + "line": 354 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantUpsert", + "line": 360 + }, + { + "kind": "func", + "name": "UpdateTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) UpdateTransactionGroupID() *ChargeCreditPurchaseCreditGrantUpsert", + "line": 366 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsert", + "line": 372 + }, + { + "kind": "func", + "name": "UpdateGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsert) UpdateGrantedAt() *ChargeCreditPurchaseCreditGrantUpsert", + "line": 378 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) UpdateNewValues() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 394 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) Ignore() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 419 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) DoNothing() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 426 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) Update(set func(*ChargeCreditPurchaseCreditGrantUpsert)) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 433 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 441 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) UpdateUpdatedAt() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 448 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 455 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) UpdateDeletedAt() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 462 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) ClearDeletedAt() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 469 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 476 + }, + { + "kind": "func", + "name": "UpdateTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) UpdateTransactionGroupID() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 483 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 490 + }, + { + "kind": "func", + "name": "UpdateGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) UpdateGrantedAt() *ChargeCreditPurchaseCreditGrantUpsertOne", + "line": 497 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) Exec(ctx context.Context) error", + "line": 504 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) ExecX(ctx context.Context)", + "line": 512 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 519 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertOne) IDX(ctx context.Context) string", + "line": 533 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantCreateBulk", + "signature": "type ChargeCreditPurchaseCreditGrantCreateBulk struct", + "line": 542 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) Save(ctx context.Context) ([]*ChargeCreditPurchaseCreditGrant, error)", + "line": 550 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) SaveX(ctx context.Context) []*ChargeCreditPurchaseCreditGrant", + "line": 606 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) Exec(ctx context.Context) error", + "line": 615 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) ExecX(ctx context.Context)", + "line": 621 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 642 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseCreditGrantCreateBulk) OnConflictColumns(columns ...string) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 655 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantUpsertBulk", + "signature": "type ChargeCreditPurchaseCreditGrantUpsertBulk struct", + "line": 664 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) UpdateNewValues() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 679 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) Ignore() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 706 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) DoNothing() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 713 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) Update(set func(*ChargeCreditPurchaseCreditGrantUpsert)) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 720 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 728 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) UpdateUpdatedAt() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 735 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 742 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) UpdateDeletedAt() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 749 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) ClearDeletedAt() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 756 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 763 + }, + { + "kind": "func", + "name": "UpdateTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) UpdateTransactionGroupID() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 770 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 777 + }, + { + "kind": "func", + "name": "UpdateGrantedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) UpdateGrantedAt() *ChargeCreditPurchaseCreditGrantUpsertBulk", + "line": 784 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) Exec(ctx context.Context) error", + "line": 791 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpsertBulk) ExecX(ctx context.Context)", + "line": 807 + } + ], + "line_count": 811 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantDelete", + "signature": "type ChargeCreditPurchaseCreditGrantDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDelete) Where(ps ...predicate.ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreditGrantDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantDeleteOne", + "signature": "type ChargeCreditPurchaseCreditGrantDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDeleteOne) Where(ps ...predicate.ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreditGrantDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseCreditGrantDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantQuery", + "signature": "type ChargeCreditPurchaseCreditGrantQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Where(ps ...predicate.ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreditGrantQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Limit(limit int) *ChargeCreditPurchaseCreditGrantQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Offset(offset int) *ChargeCreditPurchaseCreditGrantQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Unique(unique bool) *ChargeCreditPurchaseCreditGrantQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Order(o ...chargecreditpurchasecreditgrant.OrderOption) *ChargeCreditPurchaseCreditGrantQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) First(ctx context.Context) (*ChargeCreditPurchaseCreditGrant, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) FirstX(ctx context.Context) *ChargeCreditPurchaseCreditGrant", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Only(ctx context.Context) (*ChargeCreditPurchaseCreditGrant, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) OnlyX(ctx context.Context) *ChargeCreditPurchaseCreditGrant", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) All(ctx context.Context) ([]*ChargeCreditPurchaseCreditGrant, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) AllX(ctx context.Context) []*ChargeCreditPurchaseCreditGrant", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Clone() *ChargeCreditPurchaseCreditGrantQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) WithCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *ChargeCreditPurchaseCreditGrantQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) GroupBy(field string, fields ...string) *ChargeCreditPurchaseCreditGrantGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Select(fields ...string) *ChargeCreditPurchaseCreditGrantSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseCreditGrantSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeCreditPurchaseCreditGrant, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) loadCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*ChargeCreditPurchaseCreditGrant, init func(*ChargeCreditPurchaseCreditGrant), assign func(*ChargeCreditPurchaseCreditGrant, *ChargeCreditPurchase)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) ForUpdate(opts ...sql.LockOption) *ChargeCreditPurchaseCreditGrantQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeCreditPurchaseCreditGrantQuery) ForShare(opts ...sql.LockOption) *ChargeCreditPurchaseCreditGrantQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantGroupBy", + "signature": "type ChargeCreditPurchaseCreditGrantGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeCreditPurchaseCreditGrantGroupBy) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseCreditGrantGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeCreditPurchaseCreditGrantGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeCreditPurchaseCreditGrantGroupBy) sqlScan(ctx context.Context, root *ChargeCreditPurchaseCreditGrantQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantSelect", + "signature": "type ChargeCreditPurchaseCreditGrantSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeCreditPurchaseCreditGrantSelect) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseCreditGrantSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeCreditPurchaseCreditGrantSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeCreditPurchaseCreditGrantSelect) sqlScan(ctx context.Context, root *ChargeCreditPurchaseCreditGrantQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/chargecreditpurchasecreditgrant_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantUpdate", + "signature": "type ChargeCreditPurchaseCreditGrantUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) Where(ps ...predicate.ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) ClearDeletedAt() *ChargeCreditPurchaseCreditGrantUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetNillableTransactionGroupID(v *string) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableGrantedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SetNillableGrantedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) Mutation() *ChargeCreditPurchaseCreditGrantMutation", + "line": 86 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) Save(ctx context.Context) (int, error)", + "line": 91 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) SaveX(ctx context.Context) int", + "line": 97 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) Exec(ctx context.Context) error", + "line": 106 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) ExecX(ctx context.Context)", + "line": 112 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) defaults()", + "line": 119 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) check() error", + "line": 127 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 139 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrantUpdateOne", + "signature": "type ChargeCreditPurchaseCreditGrantUpdateOne struct", + "line": 179 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 187 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 193 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) ClearDeletedAt() *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 207 + }, + { + "kind": "func", + "name": "SetTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetTransactionGroupID(v string) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 213 + }, + { + "kind": "func", + "name": "SetNillableTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetNillableTransactionGroupID(v *string) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 219 + }, + { + "kind": "func", + "name": "SetGrantedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetGrantedAt(v time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 227 + }, + { + "kind": "func", + "name": "SetNillableGrantedAt", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SetNillableGrantedAt(v *time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 233 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) Mutation() *ChargeCreditPurchaseCreditGrantMutation", + "line": 241 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) Where(ps ...predicate.ChargeCreditPurchaseCreditGrant) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 246 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) Select(field string, fields ...string) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) Save(ctx context.Context) (*ChargeCreditPurchaseCreditGrant, error)", + "line": 259 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) SaveX(ctx context.Context) *ChargeCreditPurchaseCreditGrant", + "line": 265 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) Exec(ctx context.Context) error", + "line": 274 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) ExecX(ctx context.Context)", + "line": 280 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) defaults()", + "line": 287 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) check() error", + "line": 295 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseCreditGrantUpdateOne) sqlSave(ctx context.Context) (_node *ChargeCreditPurchaseCreditGrant, err error)", + "line": 307 + } + ], + "line_count": 364 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPayment", + "signature": "type ChargeCreditPurchaseExternalPayment struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentEdges", + "signature": "type ChargeCreditPurchaseExternalPaymentEdges struct", + "line": 60 + }, + { + "kind": "func", + "name": "CreditPurchaseOrErr", + "signature": "func (e ChargeCreditPurchaseExternalPaymentEdges) CreditPurchaseOrErr() (*ChargeCreditPurchase, error)", + "line": 70 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) assignValues(columns []string, values []any) error", + "line": 101 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) Value(name string) (ent.Value, error)", + "line": 213 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 218 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) Update() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 225 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) Unwrap() *ChargeCreditPurchaseExternalPayment", + "line": 231 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeCreditPurchaseExternalPayment) String() string", + "line": 241 + } + ], + "line_count": 301 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment/chargecreditpurchaseexternalpayment.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 80 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s payment.Status) error", + "line": 107 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByAuthorizedTransactionGroupID", + "signature": "func ByAuthorizedTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByAuthorizedAt", + "signature": "func ByAuthorizedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "BySettledTransactionGroupID", + "signature": "func BySettledTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "BySettledAt", + "signature": "func BySettledAt(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByCreditPurchaseField", + "signature": "func ByCreditPurchaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "newCreditPurchaseStep", + "signature": "func newCreditPurchaseStep() *sqlgraph.Step", + "line": 195 + } + ], + "line_count": 201 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 66 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 71 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 76 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 81 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupID", + "signature": "func AuthorizedTransactionGroupID(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 86 + }, + { + "kind": "func", + "name": "AuthorizedAt", + "signature": "func AuthorizedAt(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 91 + }, + { + "kind": "func", + "name": "SettledTransactionGroupID", + "signature": "func SettledTransactionGroupID(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 96 + }, + { + "kind": "func", + "name": "SettledAt", + "signature": "func SettledAt(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 101 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 106 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 111 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 116 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 121 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 126 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 131 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 136 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 141 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 146 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 151 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 156 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 161 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 166 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 171 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 176 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 181 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 186 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 191 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 196 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 201 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 206 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v payment.Status) predicate.ChargeCreditPurchaseExternalPayment", + "line": 211 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v payment.Status) predicate.ChargeCreditPurchaseExternalPayment", + "line": 217 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...payment.Status) predicate.ChargeCreditPurchaseExternalPayment", + "line": 223 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...payment.Status) predicate.ChargeCreditPurchaseExternalPayment", + "line": 232 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 241 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 246 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 251 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 256 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 261 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 266 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 271 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseExternalPayment", + "line": 276 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEQ", + "signature": "func AuthorizedTransactionGroupIDEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 281 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNEQ", + "signature": "func AuthorizedTransactionGroupIDNEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 286 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIn", + "signature": "func AuthorizedTransactionGroupIDIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 291 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotIn", + "signature": "func AuthorizedTransactionGroupIDNotIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 296 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGT", + "signature": "func AuthorizedTransactionGroupIDGT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 301 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGTE", + "signature": "func AuthorizedTransactionGroupIDGTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 306 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLT", + "signature": "func AuthorizedTransactionGroupIDLT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 311 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLTE", + "signature": "func AuthorizedTransactionGroupIDLTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 316 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContains", + "signature": "func AuthorizedTransactionGroupIDContains(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 321 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasPrefix", + "signature": "func AuthorizedTransactionGroupIDHasPrefix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 326 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasSuffix", + "signature": "func AuthorizedTransactionGroupIDHasSuffix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 331 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIsNil", + "signature": "func AuthorizedTransactionGroupIDIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 336 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotNil", + "signature": "func AuthorizedTransactionGroupIDNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 341 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEqualFold", + "signature": "func AuthorizedTransactionGroupIDEqualFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 346 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContainsFold", + "signature": "func AuthorizedTransactionGroupIDContainsFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 351 + }, + { + "kind": "func", + "name": "AuthorizedAtEQ", + "signature": "func AuthorizedAtEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 356 + }, + { + "kind": "func", + "name": "AuthorizedAtNEQ", + "signature": "func AuthorizedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 361 + }, + { + "kind": "func", + "name": "AuthorizedAtIn", + "signature": "func AuthorizedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 366 + }, + { + "kind": "func", + "name": "AuthorizedAtNotIn", + "signature": "func AuthorizedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 371 + }, + { + "kind": "func", + "name": "AuthorizedAtGT", + "signature": "func AuthorizedAtGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 376 + }, + { + "kind": "func", + "name": "AuthorizedAtGTE", + "signature": "func AuthorizedAtGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 381 + }, + { + "kind": "func", + "name": "AuthorizedAtLT", + "signature": "func AuthorizedAtLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 386 + }, + { + "kind": "func", + "name": "AuthorizedAtLTE", + "signature": "func AuthorizedAtLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 391 + }, + { + "kind": "func", + "name": "AuthorizedAtIsNil", + "signature": "func AuthorizedAtIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 396 + }, + { + "kind": "func", + "name": "AuthorizedAtNotNil", + "signature": "func AuthorizedAtNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 401 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEQ", + "signature": "func SettledTransactionGroupIDEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 406 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNEQ", + "signature": "func SettledTransactionGroupIDNEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 411 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIn", + "signature": "func SettledTransactionGroupIDIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 416 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotIn", + "signature": "func SettledTransactionGroupIDNotIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 421 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGT", + "signature": "func SettledTransactionGroupIDGT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 426 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGTE", + "signature": "func SettledTransactionGroupIDGTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 431 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLT", + "signature": "func SettledTransactionGroupIDLT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 436 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLTE", + "signature": "func SettledTransactionGroupIDLTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 441 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContains", + "signature": "func SettledTransactionGroupIDContains(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 446 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasPrefix", + "signature": "func SettledTransactionGroupIDHasPrefix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 451 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasSuffix", + "signature": "func SettledTransactionGroupIDHasSuffix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 456 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIsNil", + "signature": "func SettledTransactionGroupIDIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 461 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotNil", + "signature": "func SettledTransactionGroupIDNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 466 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEqualFold", + "signature": "func SettledTransactionGroupIDEqualFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 471 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContainsFold", + "signature": "func SettledTransactionGroupIDContainsFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 476 + }, + { + "kind": "func", + "name": "SettledAtEQ", + "signature": "func SettledAtEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 481 + }, + { + "kind": "func", + "name": "SettledAtNEQ", + "signature": "func SettledAtNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 486 + }, + { + "kind": "func", + "name": "SettledAtIn", + "signature": "func SettledAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 491 + }, + { + "kind": "func", + "name": "SettledAtNotIn", + "signature": "func SettledAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 496 + }, + { + "kind": "func", + "name": "SettledAtGT", + "signature": "func SettledAtGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 501 + }, + { + "kind": "func", + "name": "SettledAtGTE", + "signature": "func SettledAtGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 506 + }, + { + "kind": "func", + "name": "SettledAtLT", + "signature": "func SettledAtLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 511 + }, + { + "kind": "func", + "name": "SettledAtLTE", + "signature": "func SettledAtLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 516 + }, + { + "kind": "func", + "name": "SettledAtIsNil", + "signature": "func SettledAtIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 521 + }, + { + "kind": "func", + "name": "SettledAtNotNil", + "signature": "func SettledAtNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 526 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 531 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 536 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 541 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 546 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 551 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 556 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 561 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 566 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 571 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 576 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 581 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 586 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 591 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 596 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 601 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 606 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 611 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 616 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 621 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 626 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 631 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 636 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 641 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 646 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 651 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 656 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 661 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 666 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 671 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 676 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 681 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 686 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 691 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 696 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 701 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 706 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeCreditPurchaseExternalPayment", + "line": 711 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 716 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 721 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 726 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeCreditPurchaseExternalPayment", + "line": 731 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 736 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 741 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 746 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 751 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 756 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 761 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 766 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 771 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 776 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 781 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 786 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 791 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeCreditPurchaseExternalPayment", + "line": 796 + }, + { + "kind": "func", + "name": "HasCreditPurchase", + "signature": "func HasCreditPurchase() predicate.ChargeCreditPurchaseExternalPayment", + "line": 801 + }, + { + "kind": "func", + "name": "HasCreditPurchaseWith", + "signature": "func HasCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchaseExternalPayment", + "line": 812 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeCreditPurchaseExternalPayment) predicate.ChargeCreditPurchaseExternalPayment", + "line": 824 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeCreditPurchaseExternalPayment) predicate.ChargeCreditPurchaseExternalPayment", + "line": 829 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeCreditPurchaseExternalPayment) predicate.ChargeCreditPurchaseExternalPayment", + "line": 834 + } + ], + "line_count": 836 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentCreate", + "signature": "type ChargeCreditPurchaseExternalPaymentCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNamespace(v string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 111 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetCreatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableCreatedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 131 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableUpdatedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 137 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 145 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 151 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 159 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetChargeID(v string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 165 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetID(v string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 171 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetNillableID(v *string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetCreditPurchaseID", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetCreditPurchaseID(id string) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 185 + }, + { + "kind": "func", + "name": "SetCreditPurchase", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SetCreditPurchase(v *ChargeCreditPurchase) *ChargeCreditPurchaseExternalPaymentCreate", + "line": 191 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) Mutation() *ChargeCreditPurchaseExternalPaymentMutation", + "line": 196 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) Save(ctx context.Context) (*ChargeCreditPurchaseExternalPayment, error)", + "line": 201 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) SaveX(ctx context.Context) *ChargeCreditPurchaseExternalPayment", + "line": 207 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) Exec(ctx context.Context) error", + "line": 216 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) ExecX(ctx context.Context)", + "line": 222 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) defaults()", + "line": 229 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) check() error", + "line": 245 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) sqlSave(ctx context.Context) (*ChargeCreditPurchaseExternalPayment, error)", + "line": 296 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) createSpec() (*ChargeCreditPurchaseExternalPayment, *sqlgraph.CreateSpec)", + "line": 319 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 417 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreate) OnConflictColumns(columns ...string) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 430 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 451 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateServicePeriodFrom() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 457 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 463 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateServicePeriodTo() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 469 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 475 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateStatus() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 481 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 487 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateAmount() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 493 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 499 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 535 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 541 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 547 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 553 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateSettledAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 559 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearSettledAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 565 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 571 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateUpdatedAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 577 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 583 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 589 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 595 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 601 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) UpdateAnnotations() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 607 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsert) ClearAnnotations() *ChargeCreditPurchaseExternalPaymentUpsert", + "line": 613 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateNewValues() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 629 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) Ignore() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 654 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) DoNothing() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 661 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) Update(set func(*ChargeCreditPurchaseExternalPaymentUpsert)) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 668 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 676 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateServicePeriodFrom() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 683 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 690 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateServicePeriodTo() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 697 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateStatus() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 711 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 718 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateAmount() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 725 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 732 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 739 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 746 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 753 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 760 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 767 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 774 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 781 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 788 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 795 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateSettledAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 802 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearSettledAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 809 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 816 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateUpdatedAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 823 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 830 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 837 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 844 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 851 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) UpdateAnnotations() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 858 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ClearAnnotations() *ChargeCreditPurchaseExternalPaymentUpsertOne", + "line": 865 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) Exec(ctx context.Context) error", + "line": 872 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ExecX(ctx context.Context)", + "line": 880 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 887 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertOne) IDX(ctx context.Context) string", + "line": 901 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentCreateBulk", + "signature": "type ChargeCreditPurchaseExternalPaymentCreateBulk struct", + "line": 910 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) Save(ctx context.Context) ([]*ChargeCreditPurchaseExternalPayment, error)", + "line": 918 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) SaveX(ctx context.Context) []*ChargeCreditPurchaseExternalPayment", + "line": 974 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) Exec(ctx context.Context) error", + "line": 983 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) ExecX(ctx context.Context)", + "line": 989 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1010 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseExternalPaymentCreateBulk) OnConflictColumns(columns ...string) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1023 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentUpsertBulk", + "signature": "type ChargeCreditPurchaseExternalPaymentUpsertBulk struct", + "line": 1032 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateNewValues() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1047 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) Ignore() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1074 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) DoNothing() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1081 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) Update(set func(*ChargeCreditPurchaseExternalPaymentUpsert)) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1088 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1096 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateServicePeriodFrom() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1103 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1110 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateServicePeriodTo() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1117 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1124 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateStatus() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1131 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1138 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateAmount() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1145 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1152 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1159 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1166 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1173 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1180 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1187 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1194 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1201 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1208 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1215 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateSettledAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1222 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearSettledAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1229 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1236 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateUpdatedAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1243 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1250 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1257 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearDeletedAt() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1264 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1271 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) UpdateAnnotations() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1278 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ClearAnnotations() *ChargeCreditPurchaseExternalPaymentUpsertBulk", + "line": 1285 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) Exec(ctx context.Context) error", + "line": 1292 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpsertBulk) ExecX(ctx context.Context)", + "line": 1308 + } + ], + "line_count": 1312 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentDelete", + "signature": "type ChargeCreditPurchaseExternalPaymentDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDelete) Where(ps ...predicate.ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseExternalPaymentDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentDeleteOne", + "signature": "type ChargeCreditPurchaseExternalPaymentDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDeleteOne) Where(ps ...predicate.ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseExternalPaymentDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseExternalPaymentDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentQuery", + "signature": "type ChargeCreditPurchaseExternalPaymentQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Where(ps ...predicate.ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Limit(limit int) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Offset(offset int) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Unique(unique bool) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Order(o ...chargecreditpurchaseexternalpayment.OrderOption) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) First(ctx context.Context) (*ChargeCreditPurchaseExternalPayment, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) FirstX(ctx context.Context) *ChargeCreditPurchaseExternalPayment", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Only(ctx context.Context) (*ChargeCreditPurchaseExternalPayment, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) OnlyX(ctx context.Context) *ChargeCreditPurchaseExternalPayment", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) All(ctx context.Context) ([]*ChargeCreditPurchaseExternalPayment, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) AllX(ctx context.Context) []*ChargeCreditPurchaseExternalPayment", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Clone() *ChargeCreditPurchaseExternalPaymentQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) WithCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) GroupBy(field string, fields ...string) *ChargeCreditPurchaseExternalPaymentGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Select(fields ...string) *ChargeCreditPurchaseExternalPaymentSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseExternalPaymentSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeCreditPurchaseExternalPayment, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) loadCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*ChargeCreditPurchaseExternalPayment, init func(*ChargeCreditPurchaseExternalPayment), assign func(*ChargeCreditPurchaseExternalPayment, *ChargeCreditPurchase)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) ForUpdate(opts ...sql.LockOption) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeCreditPurchaseExternalPaymentQuery) ForShare(opts ...sql.LockOption) *ChargeCreditPurchaseExternalPaymentQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentGroupBy", + "signature": "type ChargeCreditPurchaseExternalPaymentGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeCreditPurchaseExternalPaymentGroupBy) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseExternalPaymentGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeCreditPurchaseExternalPaymentGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeCreditPurchaseExternalPaymentGroupBy) sqlScan(ctx context.Context, root *ChargeCreditPurchaseExternalPaymentQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentSelect", + "signature": "type ChargeCreditPurchaseExternalPaymentSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeCreditPurchaseExternalPaymentSelect) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseExternalPaymentSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeCreditPurchaseExternalPaymentSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeCreditPurchaseExternalPaymentSelect) sqlScan(ctx context.Context, root *ChargeCreditPurchaseExternalPaymentQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/chargecreditpurchaseexternalpayment_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentUpdate", + "signature": "type ChargeCreditPurchaseExternalPaymentUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) Where(ps ...predicate.ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableStatus(v *payment.Status) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 145 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 151 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearSettledAt() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 171 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearDeletedAt() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ClearAnnotations() *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) Mutation() *ChargeCreditPurchaseExternalPaymentMutation", + "line": 209 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) Save(ctx context.Context) (int, error)", + "line": 214 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) SaveX(ctx context.Context) int", + "line": 220 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) Exec(ctx context.Context) error", + "line": 229 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) ExecX(ctx context.Context)", + "line": 235 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) defaults()", + "line": 242 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) check() error", + "line": 250 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 272 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPaymentUpdateOne", + "signature": "type ChargeCreditPurchaseExternalPaymentUpdateOne struct", + "line": 348 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 356 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 370 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 376 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetStatus(v payment.Status) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 384 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableStatus(v *payment.Status) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 390 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 398 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 404 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 412 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 418 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 426 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 432 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 438 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearAuthorizedAt() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 446 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 452 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 458 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearSettledTransactionGroupID() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 466 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetSettledAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 472 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 478 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearSettledAt() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 486 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 492 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 498 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 504 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearDeletedAt() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 512 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 518 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ClearAnnotations() *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 524 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) Mutation() *ChargeCreditPurchaseExternalPaymentMutation", + "line": 530 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) Where(ps ...predicate.ChargeCreditPurchaseExternalPayment) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 535 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) Select(field string, fields ...string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 542 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) Save(ctx context.Context) (*ChargeCreditPurchaseExternalPayment, error)", + "line": 548 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) SaveX(ctx context.Context) *ChargeCreditPurchaseExternalPayment", + "line": 554 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) Exec(ctx context.Context) error", + "line": 563 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) ExecX(ctx context.Context)", + "line": 569 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) defaults()", + "line": 576 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) check() error", + "line": 584 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseExternalPaymentUpdateOne) sqlSave(ctx context.Context) (_node *ChargeCreditPurchaseExternalPayment, err error)", + "line": 606 + } + ], + "line_count": 699 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPayment", + "signature": "type ChargeCreditPurchaseInvoicedPayment struct", + "line": 22 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentEdges", + "signature": "type ChargeCreditPurchaseInvoicedPaymentEdges struct", + "line": 65 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e ChargeCreditPurchaseInvoicedPaymentEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 77 + }, + { + "kind": "func", + "name": "CreditPurchaseOrErr", + "signature": "func (e ChargeCreditPurchaseInvoicedPaymentEdges) CreditPurchaseOrErr() (*ChargeCreditPurchase, error)", + "line": 88 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) assignValues(columns []string, values []any) error", + "line": 119 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) Value(name string) (ent.Value, error)", + "line": 243 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 248 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 253 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) Update() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 260 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) Unwrap() *ChargeCreditPurchaseInvoicedPayment", + "line": 266 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPayment) String() string", + "line": 276 + } + ], + "line_count": 342 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/chargecreditpurchaseinvoicedpayment.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 95 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s payment.Status) error", + "line": 122 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByAuthorizedTransactionGroupID", + "signature": "func ByAuthorizedTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByAuthorizedAt", + "signature": "func ByAuthorizedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "BySettledTransactionGroupID", + "signature": "func BySettledTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "BySettledAt", + "signature": "func BySettledAt(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 205 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 210 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 215 + }, + { + "kind": "func", + "name": "ByCreditPurchaseField", + "signature": "func ByCreditPurchaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 222 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 227 + }, + { + "kind": "func", + "name": "newCreditPurchaseStep", + "signature": "func newCreditPurchaseStep() *sqlgraph.Step", + "line": 234 + } + ], + "line_count": 240 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 66 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 71 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 91 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupID", + "signature": "func AuthorizedTransactionGroupID(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 96 + }, + { + "kind": "func", + "name": "AuthorizedAt", + "signature": "func AuthorizedAt(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 101 + }, + { + "kind": "func", + "name": "SettledTransactionGroupID", + "signature": "func SettledTransactionGroupID(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 106 + }, + { + "kind": "func", + "name": "SettledAt", + "signature": "func SettledAt(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 111 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 116 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 121 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 126 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 131 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 136 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 141 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 146 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 151 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 156 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 161 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 166 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 171 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 176 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 181 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 186 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 191 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 196 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 201 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 206 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 211 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 216 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 221 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 226 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 231 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 236 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 241 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 246 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 251 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 256 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 261 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 266 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 271 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 276 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 281 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 286 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 291 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 296 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 301 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 306 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 311 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 316 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 321 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 326 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 331 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 336 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 341 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 346 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v payment.Status) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 351 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v payment.Status) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 357 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...payment.Status) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 363 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...payment.Status) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 372 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 381 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 386 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 391 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 396 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 401 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 406 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 411 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 416 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEQ", + "signature": "func AuthorizedTransactionGroupIDEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 421 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNEQ", + "signature": "func AuthorizedTransactionGroupIDNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 426 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIn", + "signature": "func AuthorizedTransactionGroupIDIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 431 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotIn", + "signature": "func AuthorizedTransactionGroupIDNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 436 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGT", + "signature": "func AuthorizedTransactionGroupIDGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 441 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGTE", + "signature": "func AuthorizedTransactionGroupIDGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 446 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLT", + "signature": "func AuthorizedTransactionGroupIDLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 451 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLTE", + "signature": "func AuthorizedTransactionGroupIDLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 456 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContains", + "signature": "func AuthorizedTransactionGroupIDContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 461 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasPrefix", + "signature": "func AuthorizedTransactionGroupIDHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 466 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasSuffix", + "signature": "func AuthorizedTransactionGroupIDHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 471 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIsNil", + "signature": "func AuthorizedTransactionGroupIDIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 476 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotNil", + "signature": "func AuthorizedTransactionGroupIDNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 481 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEqualFold", + "signature": "func AuthorizedTransactionGroupIDEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 486 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContainsFold", + "signature": "func AuthorizedTransactionGroupIDContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 491 + }, + { + "kind": "func", + "name": "AuthorizedAtEQ", + "signature": "func AuthorizedAtEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 496 + }, + { + "kind": "func", + "name": "AuthorizedAtNEQ", + "signature": "func AuthorizedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 501 + }, + { + "kind": "func", + "name": "AuthorizedAtIn", + "signature": "func AuthorizedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 506 + }, + { + "kind": "func", + "name": "AuthorizedAtNotIn", + "signature": "func AuthorizedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 511 + }, + { + "kind": "func", + "name": "AuthorizedAtGT", + "signature": "func AuthorizedAtGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 516 + }, + { + "kind": "func", + "name": "AuthorizedAtGTE", + "signature": "func AuthorizedAtGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 521 + }, + { + "kind": "func", + "name": "AuthorizedAtLT", + "signature": "func AuthorizedAtLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 526 + }, + { + "kind": "func", + "name": "AuthorizedAtLTE", + "signature": "func AuthorizedAtLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 531 + }, + { + "kind": "func", + "name": "AuthorizedAtIsNil", + "signature": "func AuthorizedAtIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 536 + }, + { + "kind": "func", + "name": "AuthorizedAtNotNil", + "signature": "func AuthorizedAtNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 541 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEQ", + "signature": "func SettledTransactionGroupIDEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 546 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNEQ", + "signature": "func SettledTransactionGroupIDNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 551 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIn", + "signature": "func SettledTransactionGroupIDIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 556 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotIn", + "signature": "func SettledTransactionGroupIDNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 561 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGT", + "signature": "func SettledTransactionGroupIDGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 566 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGTE", + "signature": "func SettledTransactionGroupIDGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 571 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLT", + "signature": "func SettledTransactionGroupIDLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 576 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLTE", + "signature": "func SettledTransactionGroupIDLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 581 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContains", + "signature": "func SettledTransactionGroupIDContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 586 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasPrefix", + "signature": "func SettledTransactionGroupIDHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 591 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasSuffix", + "signature": "func SettledTransactionGroupIDHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 596 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIsNil", + "signature": "func SettledTransactionGroupIDIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 601 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotNil", + "signature": "func SettledTransactionGroupIDNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 606 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEqualFold", + "signature": "func SettledTransactionGroupIDEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 611 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContainsFold", + "signature": "func SettledTransactionGroupIDContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 616 + }, + { + "kind": "func", + "name": "SettledAtEQ", + "signature": "func SettledAtEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 621 + }, + { + "kind": "func", + "name": "SettledAtNEQ", + "signature": "func SettledAtNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 626 + }, + { + "kind": "func", + "name": "SettledAtIn", + "signature": "func SettledAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 631 + }, + { + "kind": "func", + "name": "SettledAtNotIn", + "signature": "func SettledAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 636 + }, + { + "kind": "func", + "name": "SettledAtGT", + "signature": "func SettledAtGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 641 + }, + { + "kind": "func", + "name": "SettledAtGTE", + "signature": "func SettledAtGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 646 + }, + { + "kind": "func", + "name": "SettledAtLT", + "signature": "func SettledAtLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 651 + }, + { + "kind": "func", + "name": "SettledAtLTE", + "signature": "func SettledAtLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 656 + }, + { + "kind": "func", + "name": "SettledAtIsNil", + "signature": "func SettledAtIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 661 + }, + { + "kind": "func", + "name": "SettledAtNotNil", + "signature": "func SettledAtNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 666 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 671 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 676 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 681 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 686 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 691 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 696 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 701 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 706 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 711 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 716 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 721 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 726 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 731 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 736 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 741 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 746 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 751 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 756 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 761 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 766 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 771 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 776 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 781 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 786 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 791 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 796 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 801 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 806 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 811 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 816 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 821 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 826 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 831 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 836 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 841 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 846 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 851 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 856 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 861 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 866 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 871 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 876 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 881 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 886 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 891 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 896 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 901 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 906 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 911 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 916 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 921 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 926 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 931 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 936 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 941 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 952 + }, + { + "kind": "func", + "name": "HasCreditPurchase", + "signature": "func HasCreditPurchase() predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 964 + }, + { + "kind": "func", + "name": "HasCreditPurchaseWith", + "signature": "func HasCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 975 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeCreditPurchaseInvoicedPayment) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 987 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeCreditPurchaseInvoicedPayment) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 992 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeCreditPurchaseInvoicedPayment) predicate.ChargeCreditPurchaseInvoicedPayment", + "line": 997 + } + ], + "line_count": 999 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentCreate", + "signature": "type ChargeCreditPurchaseInvoicedPaymentCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetLineID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetInvoiceID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNamespace(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetCreatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableCreatedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableUpdatedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetChargeID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetID(v string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetNillableID(v *string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetBillingInvoiceLineID(id string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetCreditPurchaseID", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetCreditPurchaseID(id string) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 209 + }, + { + "kind": "func", + "name": "SetCreditPurchase", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SetCreditPurchase(v *ChargeCreditPurchase) *ChargeCreditPurchaseInvoicedPaymentCreate", + "line": 215 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) Mutation() *ChargeCreditPurchaseInvoicedPaymentMutation", + "line": 220 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) Save(ctx context.Context) (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 225 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) SaveX(ctx context.Context) *ChargeCreditPurchaseInvoicedPayment", + "line": 231 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) Exec(ctx context.Context) error", + "line": 240 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) ExecX(ctx context.Context)", + "line": 246 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) defaults()", + "line": 253 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) check() error", + "line": 269 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) sqlSave(ctx context.Context) (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 329 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) createSpec() (*ChargeCreditPurchaseInvoicedPayment, *sqlgraph.CreateSpec)", + "line": 352 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 471 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreate) OnConflictColumns(columns ...string) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 484 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateServicePeriodFrom() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateServicePeriodTo() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateStatus() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 535 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 541 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateAmount() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 547 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 553 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 559 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 565 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 571 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 577 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 583 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 589 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 595 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 601 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 607 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 613 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 619 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 625 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateUpdatedAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 631 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 637 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 643 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 649 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 655 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) UpdateAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 661 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsert) ClearAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsert", + "line": 667 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateNewValues() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 683 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) Ignore() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 714 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) DoNothing() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 721 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) Update(set func(*ChargeCreditPurchaseInvoicedPaymentUpsert)) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 728 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 736 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateServicePeriodFrom() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateServicePeriodTo() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 764 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateStatus() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 771 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 778 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateAmount() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 785 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 792 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 799 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 806 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 813 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 820 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 841 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 869 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 876 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateUpdatedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 883 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 897 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 904 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 911 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) UpdateAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 918 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ClearAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsertOne", + "line": 925 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) Exec(ctx context.Context) error", + "line": 932 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ExecX(ctx context.Context)", + "line": 940 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 947 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertOne) IDX(ctx context.Context) string", + "line": 961 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentCreateBulk", + "signature": "type ChargeCreditPurchaseInvoicedPaymentCreateBulk struct", + "line": 970 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) Save(ctx context.Context) ([]*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 978 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) SaveX(ctx context.Context) []*ChargeCreditPurchaseInvoicedPayment", + "line": 1034 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) Exec(ctx context.Context) error", + "line": 1043 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) ExecX(ctx context.Context)", + "line": 1049 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1070 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeCreditPurchaseInvoicedPaymentCreateBulk) OnConflictColumns(columns ...string) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1083 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "signature": "type ChargeCreditPurchaseInvoicedPaymentUpsertBulk struct", + "line": 1092 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateNewValues() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1107 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) Ignore() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1140 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) DoNothing() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1147 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) Update(set func(*ChargeCreditPurchaseInvoicedPaymentUpsert)) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1154 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1162 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateServicePeriodFrom() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1169 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1176 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateServicePeriodTo() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1183 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1190 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateStatus() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1197 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1204 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateAmount() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1211 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1218 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1225 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1232 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1239 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1246 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1253 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1260 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1267 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1274 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1281 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1288 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1295 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1302 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateUpdatedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1309 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1316 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1323 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1330 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1337 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) UpdateAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1344 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ClearAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpsertBulk", + "line": 1351 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) Exec(ctx context.Context) error", + "line": 1358 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpsertBulk) ExecX(ctx context.Context)", + "line": 1374 + } + ], + "line_count": 1378 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentDelete", + "signature": "type ChargeCreditPurchaseInvoicedPaymentDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDelete) Where(ps ...predicate.ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseInvoicedPaymentDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentDeleteOne", + "signature": "type ChargeCreditPurchaseInvoicedPaymentDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDeleteOne) Where(ps ...predicate.ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseInvoicedPaymentDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeCreditPurchaseInvoicedPaymentDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentQuery", + "signature": "type ChargeCreditPurchaseInvoicedPaymentQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Where(ps ...predicate.ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Limit(limit int) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Offset(offset int) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Unique(unique bool) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Order(o ...chargecreditpurchaseinvoicedpayment.OrderOption) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) QueryCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) First(ctx context.Context) (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) FirstX(ctx context.Context) *ChargeCreditPurchaseInvoicedPayment", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) FirstIDX(ctx context.Context) string", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Only(ctx context.Context) (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) OnlyX(ctx context.Context) *ChargeCreditPurchaseInvoicedPayment", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) OnlyIDX(ctx context.Context) string", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) All(ctx context.Context) ([]*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) AllX(ctx context.Context) []*ChargeCreditPurchaseInvoicedPayment", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) IDsX(ctx context.Context) []string", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Clone() *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) WithCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) GroupBy(field string, fields ...string) *ChargeCreditPurchaseInvoicedPaymentGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Select(fields ...string) *ChargeCreditPurchaseInvoicedPaymentSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseInvoicedPaymentSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*ChargeCreditPurchaseInvoicedPayment, init func(*ChargeCreditPurchaseInvoicedPayment), assign func(*ChargeCreditPurchaseInvoicedPayment, *BillingInvoiceLine)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadCreditPurchase", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) loadCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*ChargeCreditPurchaseInvoicedPayment, init func(*ChargeCreditPurchaseInvoicedPayment), assign func(*ChargeCreditPurchaseInvoicedPayment, *ChargeCreditPurchase)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) ForUpdate(opts ...sql.LockOption) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeCreditPurchaseInvoicedPaymentQuery) ForShare(opts ...sql.LockOption) *ChargeCreditPurchaseInvoicedPaymentQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentGroupBy", + "signature": "type ChargeCreditPurchaseInvoicedPaymentGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeCreditPurchaseInvoicedPaymentGroupBy) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseInvoicedPaymentGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeCreditPurchaseInvoicedPaymentGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeCreditPurchaseInvoicedPaymentGroupBy) sqlScan(ctx context.Context, root *ChargeCreditPurchaseInvoicedPaymentQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentSelect", + "signature": "type ChargeCreditPurchaseInvoicedPaymentSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeCreditPurchaseInvoicedPaymentSelect) Aggregate(fns ...AggregateFunc) *ChargeCreditPurchaseInvoicedPaymentSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeCreditPurchaseInvoicedPaymentSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeCreditPurchaseInvoicedPaymentSelect) sqlScan(ctx context.Context, root *ChargeCreditPurchaseInvoicedPaymentQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/chargecreditpurchaseinvoicedpayment_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentUpdate", + "signature": "type ChargeCreditPurchaseInvoicedPaymentUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) Where(ps ...predicate.ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableStatus(v *payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 145 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 151 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 171 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ClearAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) Mutation() *ChargeCreditPurchaseInvoicedPaymentMutation", + "line": 209 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) Save(ctx context.Context) (int, error)", + "line": 214 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) SaveX(ctx context.Context) int", + "line": 220 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) Exec(ctx context.Context) error", + "line": 229 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) ExecX(ctx context.Context)", + "line": 235 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) defaults()", + "line": 242 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) check() error", + "line": 250 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 275 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "signature": "type ChargeCreditPurchaseInvoicedPaymentUpdateOne struct", + "line": 351 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 359 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 365 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetServicePeriodTo(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 373 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 379 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetStatus(v payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableStatus(v *payment.Status) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetAuthorizedTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 415 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearAuthorizedTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetAuthorizedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableAuthorizedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearAuthorizedAt() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetSettledTransactionGroupID(v string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableSettledTransactionGroupID(v *string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearSettledTransactionGroupID() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 469 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetSettledAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableSettledAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 481 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearSettledAt() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 489 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetUpdatedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 495 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetDeletedAt(v time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 501 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 507 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearDeletedAt() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 515 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetAnnotations(v models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 521 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ClearAnnotations() *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 527 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) Mutation() *ChargeCreditPurchaseInvoicedPaymentMutation", + "line": 533 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) Where(ps ...predicate.ChargeCreditPurchaseInvoicedPayment) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 538 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) Select(field string, fields ...string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 545 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) Save(ctx context.Context) (*ChargeCreditPurchaseInvoicedPayment, error)", + "line": 551 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SaveX(ctx context.Context) *ChargeCreditPurchaseInvoicedPayment", + "line": 557 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) Exec(ctx context.Context) error", + "line": 566 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) ExecX(ctx context.Context)", + "line": 572 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) defaults()", + "line": 579 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) check() error", + "line": 587 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) sqlSave(ctx context.Context) (_node *ChargeCreditPurchaseInvoicedPayment, err error)", + "line": 612 + } + ], + "line_count": 705 + }, + "openmeter/ent/db/chargeflatfee.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFee", + "signature": "type ChargeFlatFee struct", + "line": 32 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeEdges", + "signature": "type ChargeFlatFeeEdges struct", + "line": 115 + }, + { + "kind": "func", + "name": "RunsOrErr", + "signature": "func (e ChargeFlatFeeEdges) RunsOrErr() ([]*ChargeFlatFeeRun, error)", + "line": 141 + }, + { + "kind": "func", + "name": "CurrentRunOrErr", + "signature": "func (e ChargeFlatFeeEdges) CurrentRunOrErr() (*ChargeFlatFeeRun, error)", + "line": 150 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e ChargeFlatFeeEdges) ChargeOrErr() (*Charge, error)", + "line": 161 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e ChargeFlatFeeEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 172 + }, + { + "kind": "func", + "name": "SubscriptionPhaseOrErr", + "signature": "func (e ChargeFlatFeeEdges) SubscriptionPhaseOrErr() (*SubscriptionPhase, error)", + "line": 183 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e ChargeFlatFeeEdges) SubscriptionItemOrErr() (*SubscriptionItem, error)", + "line": 194 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e ChargeFlatFeeEdges) CustomerOrErr() (*Customer, error)", + "line": 205 + }, + { + "kind": "func", + "name": "FeatureOrErr", + "signature": "func (e ChargeFlatFeeEdges) FeatureOrErr() (*Feature, error)", + "line": 216 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e ChargeFlatFeeEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 227 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFee) assignValues(columns []string, values []any) error", + "line": 260 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFee) Value(name string) (ent.Value, error)", + "line": 513 + }, + { + "kind": "func", + "name": "QueryRuns", + "signature": "func (_m *ChargeFlatFee) QueryRuns() *ChargeFlatFeeRunQuery", + "line": 518 + }, + { + "kind": "func", + "name": "QueryCurrentRun", + "signature": "func (_m *ChargeFlatFee) QueryCurrentRun() *ChargeFlatFeeRunQuery", + "line": 523 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *ChargeFlatFee) QueryCharge() *ChargeQuery", + "line": 528 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *ChargeFlatFee) QuerySubscription() *SubscriptionQuery", + "line": 533 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_m *ChargeFlatFee) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 538 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *ChargeFlatFee) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 543 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *ChargeFlatFee) QueryCustomer() *CustomerQuery", + "line": 548 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_m *ChargeFlatFee) QueryFeature() *FeatureQuery", + "line": 553 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *ChargeFlatFee) QueryTaxCode() *TaxCodeQuery", + "line": 558 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFee) Update() *ChargeFlatFeeUpdateOne", + "line": 565 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFee) Unwrap() *ChargeFlatFee", + "line": 571 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFee) String() string", + "line": 581 + } + ], + "line_count": 723 + }, + "openmeter/ent/db/chargeflatfee/chargeflatfee.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 222 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s meta.ChargeStatus) error", + "line": 257 + }, + { + "kind": "func", + "name": "ManagedByValidator", + "signature": "func ManagedByValidator(mb billing.InvoiceLineManagedBy) error", + "line": 267 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 277 + }, + { + "kind": "func", + "name": "SettlementModeValidator", + "signature": "func SettlementModeValidator(sm productcatalog.SettlementMode) error", + "line": 287 + }, + { + "kind": "func", + "name": "ProRatingValidator", + "signature": "func ProRatingValidator(pr flatfee.ProRatingModeAdapterEnum) error", + "line": 297 + }, + { + "kind": "func", + "name": "StatusDetailedValidator", + "signature": "func StatusDetailedValidator(sd flatfee.Status) error", + "line": 307 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 320 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 325 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 330 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 335 + }, + { + "kind": "func", + "name": "ByBillingPeriodFrom", + "signature": "func ByBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 340 + }, + { + "kind": "func", + "name": "ByBillingPeriodTo", + "signature": "func ByBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 345 + }, + { + "kind": "func", + "name": "ByFullServicePeriodFrom", + "signature": "func ByFullServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 350 + }, + { + "kind": "func", + "name": "ByFullServicePeriodTo", + "signature": "func ByFullServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 355 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 360 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 365 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 370 + }, + { + "kind": "func", + "name": "ByManagedBy", + "signature": "func ByManagedBy(opts ...sql.OrderTermOption) OrderOption", + "line": 375 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 380 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 385 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 390 + }, + { + "kind": "func", + "name": "ByAdvanceAfter", + "signature": "func ByAdvanceAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 395 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 400 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 405 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 410 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 415 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 420 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 425 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 430 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 435 + }, + { + "kind": "func", + "name": "ByPaymentTerm", + "signature": "func ByPaymentTerm(opts ...sql.OrderTermOption) OrderOption", + "line": 440 + }, + { + "kind": "func", + "name": "ByInvoiceAt", + "signature": "func ByInvoiceAt(opts ...sql.OrderTermOption) OrderOption", + "line": 445 + }, + { + "kind": "func", + "name": "BySettlementMode", + "signature": "func BySettlementMode(opts ...sql.OrderTermOption) OrderOption", + "line": 450 + }, + { + "kind": "func", + "name": "ByDiscounts", + "signature": "func ByDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 455 + }, + { + "kind": "func", + "name": "ByProRating", + "signature": "func ByProRating(opts ...sql.OrderTermOption) OrderOption", + "line": 460 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 465 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 470 + }, + { + "kind": "func", + "name": "ByAmountBeforeProration", + "signature": "func ByAmountBeforeProration(opts ...sql.OrderTermOption) OrderOption", + "line": 475 + }, + { + "kind": "func", + "name": "ByAmountAfterProration", + "signature": "func ByAmountAfterProration(opts ...sql.OrderTermOption) OrderOption", + "line": 480 + }, + { + "kind": "func", + "name": "ByCurrentRealizationRunID", + "signature": "func ByCurrentRealizationRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 485 + }, + { + "kind": "func", + "name": "ByStatusDetailed", + "signature": "func ByStatusDetailed(opts ...sql.OrderTermOption) OrderOption", + "line": 490 + }, + { + "kind": "func", + "name": "ByRunsCount", + "signature": "func ByRunsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 495 + }, + { + "kind": "func", + "name": "ByRuns", + "signature": "func ByRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 502 + }, + { + "kind": "func", + "name": "ByCurrentRunField", + "signature": "func ByCurrentRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 509 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 516 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 523 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseField", + "signature": "func BySubscriptionPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 530 + }, + { + "kind": "func", + "name": "BySubscriptionItemField", + "signature": "func BySubscriptionItemField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 537 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 544 + }, + { + "kind": "func", + "name": "ByFeatureField", + "signature": "func ByFeatureField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 551 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 558 + }, + { + "kind": "func", + "name": "newRunsStep", + "signature": "func newRunsStep() *sqlgraph.Step", + "line": 563 + }, + { + "kind": "func", + "name": "newCurrentRunStep", + "signature": "func newCurrentRunStep() *sqlgraph.Step", + "line": 570 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 577 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 584 + }, + { + "kind": "func", + "name": "newSubscriptionPhaseStep", + "signature": "func newSubscriptionPhaseStep() *sqlgraph.Step", + "line": 591 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 598 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 605 + }, + { + "kind": "func", + "name": "newFeatureStep", + "signature": "func newFeatureStep() *sqlgraph.Step", + "line": 612 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 619 + } + ], + "line_count": 625 + }, + "openmeter/ent/db/chargeflatfee/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFee", + "line": 20 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFee", + "line": 25 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFee", + "line": 30 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFee", + "line": 35 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFee", + "line": 40 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFee", + "line": 45 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFee", + "line": 50 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFee", + "line": 55 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFee", + "line": 60 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFee", + "line": 65 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFee", + "line": 70 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.ChargeFlatFee", + "line": 75 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeFlatFee", + "line": 80 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeFlatFee", + "line": 85 + }, + { + "kind": "func", + "name": "BillingPeriodFrom", + "signature": "func BillingPeriodFrom(v time.Time) predicate.ChargeFlatFee", + "line": 90 + }, + { + "kind": "func", + "name": "BillingPeriodTo", + "signature": "func BillingPeriodTo(v time.Time) predicate.ChargeFlatFee", + "line": 95 + }, + { + "kind": "func", + "name": "FullServicePeriodFrom", + "signature": "func FullServicePeriodFrom(v time.Time) predicate.ChargeFlatFee", + "line": 100 + }, + { + "kind": "func", + "name": "FullServicePeriodTo", + "signature": "func FullServicePeriodTo(v time.Time) predicate.ChargeFlatFee", + "line": 105 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.ChargeFlatFee", + "line": 110 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargeFlatFee", + "line": 115 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.ChargeFlatFee", + "line": 121 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.ChargeFlatFee", + "line": 126 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.ChargeFlatFee", + "line": 131 + }, + { + "kind": "func", + "name": "AdvanceAfter", + "signature": "func AdvanceAfter(v time.Time) predicate.ChargeFlatFee", + "line": 136 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargeFlatFee", + "line": 141 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFee", + "line": 146 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFee", + "line": 151 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFee", + "line": 156 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFee", + "line": 161 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargeFlatFee", + "line": 166 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargeFlatFee", + "line": 171 + }, + { + "kind": "func", + "name": "PaymentTerm", + "signature": "func PaymentTerm(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 176 + }, + { + "kind": "func", + "name": "InvoiceAt", + "signature": "func InvoiceAt(v time.Time) predicate.ChargeFlatFee", + "line": 182 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.ChargeFlatFee", + "line": 187 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.ChargeFlatFee", + "line": 192 + }, + { + "kind": "func", + "name": "AmountBeforeProration", + "signature": "func AmountBeforeProration(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 197 + }, + { + "kind": "func", + "name": "AmountAfterProration", + "signature": "func AmountAfterProration(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 202 + }, + { + "kind": "func", + "name": "CurrentRealizationRunID", + "signature": "func CurrentRealizationRunID(v string) predicate.ChargeFlatFee", + "line": 207 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.ChargeFlatFee", + "line": 212 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.ChargeFlatFee", + "line": 217 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 222 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 227 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.ChargeFlatFee", + "line": 232 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.ChargeFlatFee", + "line": 237 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.ChargeFlatFee", + "line": 242 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.ChargeFlatFee", + "line": 247 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.ChargeFlatFee", + "line": 252 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 257 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 262 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 267 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 272 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFee", + "line": 277 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 282 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 287 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 292 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeFlatFee", + "line": 297 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFee", + "line": 302 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeFlatFee", + "line": 307 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFee", + "line": 312 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeFlatFee", + "line": 317 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 322 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 327 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 332 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeFlatFee", + "line": 337 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeFlatFee", + "line": 342 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeFlatFee", + "line": 347 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeFlatFee", + "line": 352 + }, + { + "kind": "func", + "name": "BillingPeriodFromEQ", + "signature": "func BillingPeriodFromEQ(v time.Time) predicate.ChargeFlatFee", + "line": 357 + }, + { + "kind": "func", + "name": "BillingPeriodFromNEQ", + "signature": "func BillingPeriodFromNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 362 + }, + { + "kind": "func", + "name": "BillingPeriodFromIn", + "signature": "func BillingPeriodFromIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 367 + }, + { + "kind": "func", + "name": "BillingPeriodFromNotIn", + "signature": "func BillingPeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 372 + }, + { + "kind": "func", + "name": "BillingPeriodFromGT", + "signature": "func BillingPeriodFromGT(v time.Time) predicate.ChargeFlatFee", + "line": 377 + }, + { + "kind": "func", + "name": "BillingPeriodFromGTE", + "signature": "func BillingPeriodFromGTE(v time.Time) predicate.ChargeFlatFee", + "line": 382 + }, + { + "kind": "func", + "name": "BillingPeriodFromLT", + "signature": "func BillingPeriodFromLT(v time.Time) predicate.ChargeFlatFee", + "line": 387 + }, + { + "kind": "func", + "name": "BillingPeriodFromLTE", + "signature": "func BillingPeriodFromLTE(v time.Time) predicate.ChargeFlatFee", + "line": 392 + }, + { + "kind": "func", + "name": "BillingPeriodToEQ", + "signature": "func BillingPeriodToEQ(v time.Time) predicate.ChargeFlatFee", + "line": 397 + }, + { + "kind": "func", + "name": "BillingPeriodToNEQ", + "signature": "func BillingPeriodToNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 402 + }, + { + "kind": "func", + "name": "BillingPeriodToIn", + "signature": "func BillingPeriodToIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 407 + }, + { + "kind": "func", + "name": "BillingPeriodToNotIn", + "signature": "func BillingPeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 412 + }, + { + "kind": "func", + "name": "BillingPeriodToGT", + "signature": "func BillingPeriodToGT(v time.Time) predicate.ChargeFlatFee", + "line": 417 + }, + { + "kind": "func", + "name": "BillingPeriodToGTE", + "signature": "func BillingPeriodToGTE(v time.Time) predicate.ChargeFlatFee", + "line": 422 + }, + { + "kind": "func", + "name": "BillingPeriodToLT", + "signature": "func BillingPeriodToLT(v time.Time) predicate.ChargeFlatFee", + "line": 427 + }, + { + "kind": "func", + "name": "BillingPeriodToLTE", + "signature": "func BillingPeriodToLTE(v time.Time) predicate.ChargeFlatFee", + "line": 432 + }, + { + "kind": "func", + "name": "FullServicePeriodFromEQ", + "signature": "func FullServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFee", + "line": 437 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNEQ", + "signature": "func FullServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 442 + }, + { + "kind": "func", + "name": "FullServicePeriodFromIn", + "signature": "func FullServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 447 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNotIn", + "signature": "func FullServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 452 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGT", + "signature": "func FullServicePeriodFromGT(v time.Time) predicate.ChargeFlatFee", + "line": 457 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGTE", + "signature": "func FullServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFee", + "line": 462 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLT", + "signature": "func FullServicePeriodFromLT(v time.Time) predicate.ChargeFlatFee", + "line": 467 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLTE", + "signature": "func FullServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFee", + "line": 472 + }, + { + "kind": "func", + "name": "FullServicePeriodToEQ", + "signature": "func FullServicePeriodToEQ(v time.Time) predicate.ChargeFlatFee", + "line": 477 + }, + { + "kind": "func", + "name": "FullServicePeriodToNEQ", + "signature": "func FullServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 482 + }, + { + "kind": "func", + "name": "FullServicePeriodToIn", + "signature": "func FullServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 487 + }, + { + "kind": "func", + "name": "FullServicePeriodToNotIn", + "signature": "func FullServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 492 + }, + { + "kind": "func", + "name": "FullServicePeriodToGT", + "signature": "func FullServicePeriodToGT(v time.Time) predicate.ChargeFlatFee", + "line": 497 + }, + { + "kind": "func", + "name": "FullServicePeriodToGTE", + "signature": "func FullServicePeriodToGTE(v time.Time) predicate.ChargeFlatFee", + "line": 502 + }, + { + "kind": "func", + "name": "FullServicePeriodToLT", + "signature": "func FullServicePeriodToLT(v time.Time) predicate.ChargeFlatFee", + "line": 507 + }, + { + "kind": "func", + "name": "FullServicePeriodToLTE", + "signature": "func FullServicePeriodToLTE(v time.Time) predicate.ChargeFlatFee", + "line": 512 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v meta.ChargeStatus) predicate.ChargeFlatFee", + "line": 517 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v meta.ChargeStatus) predicate.ChargeFlatFee", + "line": 523 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...meta.ChargeStatus) predicate.ChargeFlatFee", + "line": 529 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...meta.ChargeStatus) predicate.ChargeFlatFee", + "line": 538 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.ChargeFlatFee", + "line": 547 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.ChargeFlatFee", + "line": 552 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 557 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 562 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.ChargeFlatFee", + "line": 567 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.ChargeFlatFee", + "line": 572 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.ChargeFlatFee", + "line": 577 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.ChargeFlatFee", + "line": 582 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.ChargeFlatFee", + "line": 587 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 592 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 597 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.ChargeFlatFee", + "line": 602 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.ChargeFlatFee", + "line": 607 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 612 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 617 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargeFlatFee", + "line": 622 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargeFlatFee", + "line": 628 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargeFlatFee", + "line": 634 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargeFlatFee", + "line": 643 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargeFlatFee", + "line": 652 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargeFlatFee", + "line": 658 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargeFlatFee", + "line": 664 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargeFlatFee", + "line": 670 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargeFlatFee", + "line": 676 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargeFlatFee", + "line": 682 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargeFlatFee", + "line": 688 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargeFlatFee", + "line": 694 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargeFlatFee", + "line": 700 + }, + { + "kind": "func", + "name": "ManagedByEQ", + "signature": "func ManagedByEQ(v billing.InvoiceLineManagedBy) predicate.ChargeFlatFee", + "line": 706 + }, + { + "kind": "func", + "name": "ManagedByNEQ", + "signature": "func ManagedByNEQ(v billing.InvoiceLineManagedBy) predicate.ChargeFlatFee", + "line": 712 + }, + { + "kind": "func", + "name": "ManagedByIn", + "signature": "func ManagedByIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeFlatFee", + "line": 718 + }, + { + "kind": "func", + "name": "ManagedByNotIn", + "signature": "func ManagedByNotIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeFlatFee", + "line": 727 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.ChargeFlatFee", + "line": 736 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.ChargeFlatFee", + "line": 741 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 746 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 751 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.ChargeFlatFee", + "line": 756 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.ChargeFlatFee", + "line": 761 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.ChargeFlatFee", + "line": 766 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.ChargeFlatFee", + "line": 771 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.ChargeFlatFee", + "line": 776 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 781 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 786 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.ChargeFlatFee", + "line": 791 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.ChargeFlatFee", + "line": 796 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 801 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 806 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.ChargeFlatFee", + "line": 811 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.ChargeFlatFee", + "line": 816 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 821 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 826 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.ChargeFlatFee", + "line": 831 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.ChargeFlatFee", + "line": 836 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.ChargeFlatFee", + "line": 841 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.ChargeFlatFee", + "line": 846 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.ChargeFlatFee", + "line": 851 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 856 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 861 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.ChargeFlatFee", + "line": 866 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.ChargeFlatFee", + "line": 871 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 876 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 881 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.ChargeFlatFee", + "line": 886 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.ChargeFlatFee", + "line": 891 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 896 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 901 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.ChargeFlatFee", + "line": 906 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.ChargeFlatFee", + "line": 911 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.ChargeFlatFee", + "line": 916 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.ChargeFlatFee", + "line": 921 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.ChargeFlatFee", + "line": 926 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 931 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 936 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.ChargeFlatFee", + "line": 941 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.ChargeFlatFee", + "line": 946 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 951 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 956 + }, + { + "kind": "func", + "name": "AdvanceAfterEQ", + "signature": "func AdvanceAfterEQ(v time.Time) predicate.ChargeFlatFee", + "line": 961 + }, + { + "kind": "func", + "name": "AdvanceAfterNEQ", + "signature": "func AdvanceAfterNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 966 + }, + { + "kind": "func", + "name": "AdvanceAfterIn", + "signature": "func AdvanceAfterIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 971 + }, + { + "kind": "func", + "name": "AdvanceAfterNotIn", + "signature": "func AdvanceAfterNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 976 + }, + { + "kind": "func", + "name": "AdvanceAfterGT", + "signature": "func AdvanceAfterGT(v time.Time) predicate.ChargeFlatFee", + "line": 981 + }, + { + "kind": "func", + "name": "AdvanceAfterGTE", + "signature": "func AdvanceAfterGTE(v time.Time) predicate.ChargeFlatFee", + "line": 986 + }, + { + "kind": "func", + "name": "AdvanceAfterLT", + "signature": "func AdvanceAfterLT(v time.Time) predicate.ChargeFlatFee", + "line": 991 + }, + { + "kind": "func", + "name": "AdvanceAfterLTE", + "signature": "func AdvanceAfterLTE(v time.Time) predicate.ChargeFlatFee", + "line": 996 + }, + { + "kind": "func", + "name": "AdvanceAfterIsNil", + "signature": "func AdvanceAfterIsNil() predicate.ChargeFlatFee", + "line": 1001 + }, + { + "kind": "func", + "name": "AdvanceAfterNotNil", + "signature": "func AdvanceAfterNotNil() predicate.ChargeFlatFee", + "line": 1006 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargeFlatFee", + "line": 1011 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargeFlatFee", + "line": 1016 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 1021 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1026 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargeFlatFee", + "line": 1031 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargeFlatFee", + "line": 1036 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargeFlatFee", + "line": 1041 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargeFlatFee", + "line": 1046 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargeFlatFee", + "line": 1051 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1056 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1061 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargeFlatFee", + "line": 1066 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargeFlatFee", + "line": 1071 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 1076 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 1081 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargeFlatFee", + "line": 1086 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargeFlatFee", + "line": 1092 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargeFlatFee", + "line": 1098 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargeFlatFee", + "line": 1107 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargeFlatFee", + "line": 1116 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargeFlatFee", + "line": 1121 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeFlatFee", + "line": 1126 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeFlatFee", + "line": 1131 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFee", + "line": 1136 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFee", + "line": 1141 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFee", + "line": 1146 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1151 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFee", + "line": 1156 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFee", + "line": 1161 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFee", + "line": 1166 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFee", + "line": 1171 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFee", + "line": 1176 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1181 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1186 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFee", + "line": 1191 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFee", + "line": 1196 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargeFlatFee", + "line": 1201 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargeFlatFee", + "line": 1206 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1211 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1216 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1221 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1226 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFee", + "line": 1231 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFee", + "line": 1236 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFee", + "line": 1241 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFee", + "line": 1246 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1251 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1256 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1261 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1266 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFee", + "line": 1271 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFee", + "line": 1276 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFee", + "line": 1281 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFee", + "line": 1286 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1291 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1296 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1301 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1306 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFee", + "line": 1311 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFee", + "line": 1316 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFee", + "line": 1321 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFee", + "line": 1326 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFee", + "line": 1331 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFee", + "line": 1336 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargeFlatFee", + "line": 1341 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargeFlatFee", + "line": 1346 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargeFlatFee", + "line": 1351 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1356 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargeFlatFee", + "line": 1361 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargeFlatFee", + "line": 1366 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargeFlatFee", + "line": 1371 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargeFlatFee", + "line": 1376 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargeFlatFee", + "line": 1381 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1386 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1391 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargeFlatFee", + "line": 1396 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargeFlatFee", + "line": 1401 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargeFlatFee", + "line": 1406 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargeFlatFee", + "line": 1411 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargeFlatFee", + "line": 1416 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1421 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargeFlatFee", + "line": 1426 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargeFlatFee", + "line": 1431 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargeFlatFee", + "line": 1436 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargeFlatFee", + "line": 1441 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargeFlatFee", + "line": 1446 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1451 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1456 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargeFlatFee", + "line": 1461 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargeFlatFee", + "line": 1466 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargeFlatFee", + "line": 1471 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargeFlatFee", + "line": 1476 + }, + { + "kind": "func", + "name": "PaymentTermEQ", + "signature": "func PaymentTermEQ(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1481 + }, + { + "kind": "func", + "name": "PaymentTermNEQ", + "signature": "func PaymentTermNEQ(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1487 + }, + { + "kind": "func", + "name": "PaymentTermIn", + "signature": "func PaymentTermIn(vs ...productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1493 + }, + { + "kind": "func", + "name": "PaymentTermNotIn", + "signature": "func PaymentTermNotIn(vs ...productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1502 + }, + { + "kind": "func", + "name": "PaymentTermGT", + "signature": "func PaymentTermGT(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1511 + }, + { + "kind": "func", + "name": "PaymentTermGTE", + "signature": "func PaymentTermGTE(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1517 + }, + { + "kind": "func", + "name": "PaymentTermLT", + "signature": "func PaymentTermLT(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1523 + }, + { + "kind": "func", + "name": "PaymentTermLTE", + "signature": "func PaymentTermLTE(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1529 + }, + { + "kind": "func", + "name": "PaymentTermContains", + "signature": "func PaymentTermContains(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1535 + }, + { + "kind": "func", + "name": "PaymentTermHasPrefix", + "signature": "func PaymentTermHasPrefix(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1541 + }, + { + "kind": "func", + "name": "PaymentTermHasSuffix", + "signature": "func PaymentTermHasSuffix(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1547 + }, + { + "kind": "func", + "name": "PaymentTermEqualFold", + "signature": "func PaymentTermEqualFold(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1553 + }, + { + "kind": "func", + "name": "PaymentTermContainsFold", + "signature": "func PaymentTermContainsFold(v productcatalog.PaymentTermType) predicate.ChargeFlatFee", + "line": 1559 + }, + { + "kind": "func", + "name": "InvoiceAtEQ", + "signature": "func InvoiceAtEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1565 + }, + { + "kind": "func", + "name": "InvoiceAtNEQ", + "signature": "func InvoiceAtNEQ(v time.Time) predicate.ChargeFlatFee", + "line": 1570 + }, + { + "kind": "func", + "name": "InvoiceAtIn", + "signature": "func InvoiceAtIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1575 + }, + { + "kind": "func", + "name": "InvoiceAtNotIn", + "signature": "func InvoiceAtNotIn(vs ...time.Time) predicate.ChargeFlatFee", + "line": 1580 + }, + { + "kind": "func", + "name": "InvoiceAtGT", + "signature": "func InvoiceAtGT(v time.Time) predicate.ChargeFlatFee", + "line": 1585 + }, + { + "kind": "func", + "name": "InvoiceAtGTE", + "signature": "func InvoiceAtGTE(v time.Time) predicate.ChargeFlatFee", + "line": 1590 + }, + { + "kind": "func", + "name": "InvoiceAtLT", + "signature": "func InvoiceAtLT(v time.Time) predicate.ChargeFlatFee", + "line": 1595 + }, + { + "kind": "func", + "name": "InvoiceAtLTE", + "signature": "func InvoiceAtLTE(v time.Time) predicate.ChargeFlatFee", + "line": 1600 + }, + { + "kind": "func", + "name": "SettlementModeEQ", + "signature": "func SettlementModeEQ(v productcatalog.SettlementMode) predicate.ChargeFlatFee", + "line": 1605 + }, + { + "kind": "func", + "name": "SettlementModeNEQ", + "signature": "func SettlementModeNEQ(v productcatalog.SettlementMode) predicate.ChargeFlatFee", + "line": 1611 + }, + { + "kind": "func", + "name": "SettlementModeIn", + "signature": "func SettlementModeIn(vs ...productcatalog.SettlementMode) predicate.ChargeFlatFee", + "line": 1617 + }, + { + "kind": "func", + "name": "SettlementModeNotIn", + "signature": "func SettlementModeNotIn(vs ...productcatalog.SettlementMode) predicate.ChargeFlatFee", + "line": 1626 + }, + { + "kind": "func", + "name": "DiscountsIsNil", + "signature": "func DiscountsIsNil() predicate.ChargeFlatFee", + "line": 1635 + }, + { + "kind": "func", + "name": "DiscountsNotNil", + "signature": "func DiscountsNotNil() predicate.ChargeFlatFee", + "line": 1640 + }, + { + "kind": "func", + "name": "ProRatingEQ", + "signature": "func ProRatingEQ(v flatfee.ProRatingModeAdapterEnum) predicate.ChargeFlatFee", + "line": 1645 + }, + { + "kind": "func", + "name": "ProRatingNEQ", + "signature": "func ProRatingNEQ(v flatfee.ProRatingModeAdapterEnum) predicate.ChargeFlatFee", + "line": 1651 + }, + { + "kind": "func", + "name": "ProRatingIn", + "signature": "func ProRatingIn(vs ...flatfee.ProRatingModeAdapterEnum) predicate.ChargeFlatFee", + "line": 1657 + }, + { + "kind": "func", + "name": "ProRatingNotIn", + "signature": "func ProRatingNotIn(vs ...flatfee.ProRatingModeAdapterEnum) predicate.ChargeFlatFee", + "line": 1666 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.ChargeFlatFee", + "line": 1675 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.ChargeFlatFee", + "line": 1680 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.ChargeFlatFee", + "line": 1685 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1690 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.ChargeFlatFee", + "line": 1695 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.ChargeFlatFee", + "line": 1700 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.ChargeFlatFee", + "line": 1705 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.ChargeFlatFee", + "line": 1710 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.ChargeFlatFee", + "line": 1715 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1720 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1725 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.ChargeFlatFee", + "line": 1730 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.ChargeFlatFee", + "line": 1735 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.ChargeFlatFee", + "line": 1740 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.ChargeFlatFee", + "line": 1745 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.ChargeFlatFee", + "line": 1750 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.ChargeFlatFee", + "line": 1755 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 1760 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1765 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.ChargeFlatFee", + "line": 1770 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.ChargeFlatFee", + "line": 1775 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.ChargeFlatFee", + "line": 1780 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.ChargeFlatFee", + "line": 1785 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.ChargeFlatFee", + "line": 1790 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1795 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1800 + }, + { + "kind": "func", + "name": "FeatureIDIsNil", + "signature": "func FeatureIDIsNil() predicate.ChargeFlatFee", + "line": 1805 + }, + { + "kind": "func", + "name": "FeatureIDNotNil", + "signature": "func FeatureIDNotNil() predicate.ChargeFlatFee", + "line": 1810 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 1815 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 1820 + }, + { + "kind": "func", + "name": "AmountBeforeProrationEQ", + "signature": "func AmountBeforeProrationEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1825 + }, + { + "kind": "func", + "name": "AmountBeforeProrationNEQ", + "signature": "func AmountBeforeProrationNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1830 + }, + { + "kind": "func", + "name": "AmountBeforeProrationIn", + "signature": "func AmountBeforeProrationIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1835 + }, + { + "kind": "func", + "name": "AmountBeforeProrationNotIn", + "signature": "func AmountBeforeProrationNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1840 + }, + { + "kind": "func", + "name": "AmountBeforeProrationGT", + "signature": "func AmountBeforeProrationGT(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1845 + }, + { + "kind": "func", + "name": "AmountBeforeProrationGTE", + "signature": "func AmountBeforeProrationGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1850 + }, + { + "kind": "func", + "name": "AmountBeforeProrationLT", + "signature": "func AmountBeforeProrationLT(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1855 + }, + { + "kind": "func", + "name": "AmountBeforeProrationLTE", + "signature": "func AmountBeforeProrationLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1860 + }, + { + "kind": "func", + "name": "AmountAfterProrationEQ", + "signature": "func AmountAfterProrationEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1865 + }, + { + "kind": "func", + "name": "AmountAfterProrationNEQ", + "signature": "func AmountAfterProrationNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1870 + }, + { + "kind": "func", + "name": "AmountAfterProrationIn", + "signature": "func AmountAfterProrationIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1875 + }, + { + "kind": "func", + "name": "AmountAfterProrationNotIn", + "signature": "func AmountAfterProrationNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1880 + }, + { + "kind": "func", + "name": "AmountAfterProrationGT", + "signature": "func AmountAfterProrationGT(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1885 + }, + { + "kind": "func", + "name": "AmountAfterProrationGTE", + "signature": "func AmountAfterProrationGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1890 + }, + { + "kind": "func", + "name": "AmountAfterProrationLT", + "signature": "func AmountAfterProrationLT(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1895 + }, + { + "kind": "func", + "name": "AmountAfterProrationLTE", + "signature": "func AmountAfterProrationLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFee", + "line": 1900 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDEQ", + "signature": "func CurrentRealizationRunIDEQ(v string) predicate.ChargeFlatFee", + "line": 1905 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNEQ", + "signature": "func CurrentRealizationRunIDNEQ(v string) predicate.ChargeFlatFee", + "line": 1910 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDIn", + "signature": "func CurrentRealizationRunIDIn(vs ...string) predicate.ChargeFlatFee", + "line": 1915 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNotIn", + "signature": "func CurrentRealizationRunIDNotIn(vs ...string) predicate.ChargeFlatFee", + "line": 1920 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDGT", + "signature": "func CurrentRealizationRunIDGT(v string) predicate.ChargeFlatFee", + "line": 1925 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDGTE", + "signature": "func CurrentRealizationRunIDGTE(v string) predicate.ChargeFlatFee", + "line": 1930 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDLT", + "signature": "func CurrentRealizationRunIDLT(v string) predicate.ChargeFlatFee", + "line": 1935 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDLTE", + "signature": "func CurrentRealizationRunIDLTE(v string) predicate.ChargeFlatFee", + "line": 1940 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDContains", + "signature": "func CurrentRealizationRunIDContains(v string) predicate.ChargeFlatFee", + "line": 1945 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDHasPrefix", + "signature": "func CurrentRealizationRunIDHasPrefix(v string) predicate.ChargeFlatFee", + "line": 1950 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDHasSuffix", + "signature": "func CurrentRealizationRunIDHasSuffix(v string) predicate.ChargeFlatFee", + "line": 1955 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDIsNil", + "signature": "func CurrentRealizationRunIDIsNil() predicate.ChargeFlatFee", + "line": 1960 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNotNil", + "signature": "func CurrentRealizationRunIDNotNil() predicate.ChargeFlatFee", + "line": 1965 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDEqualFold", + "signature": "func CurrentRealizationRunIDEqualFold(v string) predicate.ChargeFlatFee", + "line": 1970 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDContainsFold", + "signature": "func CurrentRealizationRunIDContainsFold(v string) predicate.ChargeFlatFee", + "line": 1975 + }, + { + "kind": "func", + "name": "StatusDetailedEQ", + "signature": "func StatusDetailedEQ(v flatfee.Status) predicate.ChargeFlatFee", + "line": 1980 + }, + { + "kind": "func", + "name": "StatusDetailedNEQ", + "signature": "func StatusDetailedNEQ(v flatfee.Status) predicate.ChargeFlatFee", + "line": 1986 + }, + { + "kind": "func", + "name": "StatusDetailedIn", + "signature": "func StatusDetailedIn(vs ...flatfee.Status) predicate.ChargeFlatFee", + "line": 1992 + }, + { + "kind": "func", + "name": "StatusDetailedNotIn", + "signature": "func StatusDetailedNotIn(vs ...flatfee.Status) predicate.ChargeFlatFee", + "line": 2001 + }, + { + "kind": "func", + "name": "HasRuns", + "signature": "func HasRuns() predicate.ChargeFlatFee", + "line": 2010 + }, + { + "kind": "func", + "name": "HasRunsWith", + "signature": "func HasRunsWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFee", + "line": 2021 + }, + { + "kind": "func", + "name": "HasCurrentRun", + "signature": "func HasCurrentRun() predicate.ChargeFlatFee", + "line": 2033 + }, + { + "kind": "func", + "name": "HasCurrentRunWith", + "signature": "func HasCurrentRunWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFee", + "line": 2044 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.ChargeFlatFee", + "line": 2056 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.ChargeFlatFee", + "line": 2067 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.ChargeFlatFee", + "line": 2079 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.ChargeFlatFee", + "line": 2090 + }, + { + "kind": "func", + "name": "HasSubscriptionPhase", + "signature": "func HasSubscriptionPhase() predicate.ChargeFlatFee", + "line": 2102 + }, + { + "kind": "func", + "name": "HasSubscriptionPhaseWith", + "signature": "func HasSubscriptionPhaseWith(preds ...predicate.SubscriptionPhase) predicate.ChargeFlatFee", + "line": 2113 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.ChargeFlatFee", + "line": 2125 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.ChargeFlatFee", + "line": 2136 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.ChargeFlatFee", + "line": 2148 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.ChargeFlatFee", + "line": 2159 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func HasFeature() predicate.ChargeFlatFee", + "line": 2171 + }, + { + "kind": "func", + "name": "HasFeatureWith", + "signature": "func HasFeatureWith(preds ...predicate.Feature) predicate.ChargeFlatFee", + "line": 2182 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.ChargeFlatFee", + "line": 2194 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.ChargeFlatFee", + "line": 2205 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFee) predicate.ChargeFlatFee", + "line": 2217 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFee) predicate.ChargeFlatFee", + "line": 2222 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFee) predicate.ChargeFlatFee", + "line": 2227 + } + ], + "line_count": 2229 + }, + "openmeter/ent/db/chargeflatfee_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeCreate", + "signature": "type ChargeFlatFeeCreate struct", + "line": 34 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *ChargeFlatFeeCreate) SetCustomerID(v string) *ChargeFlatFeeCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeCreate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeCreate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_c *ChargeFlatFeeCreate) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeCreate", + "line": 60 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_c *ChargeFlatFeeCreate) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeCreate) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeCreate) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeFlatFeeCreate) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetUniqueReferenceID", + "signature": "func (_c *ChargeFlatFeeCreate) SetUniqueReferenceID(v string) *ChargeFlatFeeCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableUniqueReferenceID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableUniqueReferenceID(v *string) *ChargeFlatFeeCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *ChargeFlatFeeCreate) SetCurrency(v currencyx.Code) *ChargeFlatFeeCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_c *ChargeFlatFeeCreate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscriptionID(v string) *ChargeFlatFeeCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableSubscriptionID(v *string) *ChargeFlatFeeCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscriptionPhaseID(v string) *ChargeFlatFeeCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableSubscriptionPhaseID(v *string) *ChargeFlatFeeCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscriptionItemID(v string) *ChargeFlatFeeCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableSubscriptionItemID(v *string) *ChargeFlatFeeCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_c *ChargeFlatFeeCreate) SetAdvanceAfter(v time.Time) *ChargeFlatFeeCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableAdvanceAfter(v *time.Time) *ChargeFlatFeeCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *ChargeFlatFeeCreate) SetTaxCodeID(v string) *ChargeFlatFeeCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableTaxCodeID(v *string) *ChargeFlatFeeCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *ChargeFlatFeeCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeFlatFeeCreate) SetAnnotations(v models.Annotations) *ChargeFlatFeeCreate", + "line": 200 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeCreate) SetNamespace(v string) *ChargeFlatFeeCreate", + "line": 206 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *ChargeFlatFeeCreate) SetMetadata(v map[string]string) *ChargeFlatFeeCreate", + "line": 212 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeCreate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeCreate", + "line": 224 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeCreate", + "line": 238 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeCreate", + "line": 246 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeCreate", + "line": 252 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *ChargeFlatFeeCreate) SetName(v string) *ChargeFlatFeeCreate", + "line": 260 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *ChargeFlatFeeCreate) SetDescription(v string) *ChargeFlatFeeCreate", + "line": 266 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableDescription(v *string) *ChargeFlatFeeCreate", + "line": 272 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_c *ChargeFlatFeeCreate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeCreate", + "line": 280 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_c *ChargeFlatFeeCreate) SetInvoiceAt(v time.Time) *ChargeFlatFeeCreate", + "line": 286 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_c *ChargeFlatFeeCreate) SetSettlementMode(v productcatalog.SettlementMode) *ChargeFlatFeeCreate", + "line": 292 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_c *ChargeFlatFeeCreate) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeCreate", + "line": 298 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (_c *ChargeFlatFeeCreate) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeCreate", + "line": 304 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *ChargeFlatFeeCreate) SetFeatureKey(v string) *ChargeFlatFeeCreate", + "line": 310 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableFeatureKey(v *string) *ChargeFlatFeeCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *ChargeFlatFeeCreate) SetFeatureID(v string) *ChargeFlatFeeCreate", + "line": 324 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableFeatureID(v *string) *ChargeFlatFeeCreate", + "line": 330 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (_c *ChargeFlatFeeCreate) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeCreate", + "line": 338 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_c *ChargeFlatFeeCreate) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeCreate", + "line": 344 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_c *ChargeFlatFeeCreate) SetCurrentRealizationRunID(v string) *ChargeFlatFeeCreate", + "line": 350 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableCurrentRealizationRunID(v *string) *ChargeFlatFeeCreate", + "line": 356 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_c *ChargeFlatFeeCreate) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeCreate", + "line": 364 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeCreate) SetID(v string) *ChargeFlatFeeCreate", + "line": 370 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableID(v *string) *ChargeFlatFeeCreate", + "line": 376 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_c *ChargeFlatFeeCreate) AddRunIDs(ids ...string) *ChargeFlatFeeCreate", + "line": 384 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_c *ChargeFlatFeeCreate) AddRuns(v ...*ChargeFlatFeeRun) *ChargeFlatFeeCreate", + "line": 390 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_c *ChargeFlatFeeCreate) SetCurrentRunID(id string) *ChargeFlatFeeCreate", + "line": 399 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableCurrentRunID(id *string) *ChargeFlatFeeCreate", + "line": 405 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_c *ChargeFlatFeeCreate) SetCurrentRun(v *ChargeFlatFeeRun) *ChargeFlatFeeCreate", + "line": 413 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeFlatFeeCreate) SetChargeID(id string) *ChargeFlatFeeCreate", + "line": 418 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_c *ChargeFlatFeeCreate) SetNillableChargeID(id *string) *ChargeFlatFeeCreate", + "line": 424 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *ChargeFlatFeeCreate) SetCharge(v *Charge) *ChargeFlatFeeCreate", + "line": 432 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscription(v *Subscription) *ChargeFlatFeeCreate", + "line": 437 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscriptionPhase(v *SubscriptionPhase) *ChargeFlatFeeCreate", + "line": 442 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_c *ChargeFlatFeeCreate) SetSubscriptionItem(v *SubscriptionItem) *ChargeFlatFeeCreate", + "line": 447 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *ChargeFlatFeeCreate) SetCustomer(v *Customer) *ChargeFlatFeeCreate", + "line": 452 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_c *ChargeFlatFeeCreate) SetFeature(v *Feature) *ChargeFlatFeeCreate", + "line": 457 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *ChargeFlatFeeCreate) SetTaxCode(v *TaxCode) *ChargeFlatFeeCreate", + "line": 462 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeCreate) Mutation() *ChargeFlatFeeMutation", + "line": 467 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeCreate) Save(ctx context.Context) (*ChargeFlatFee, error)", + "line": 472 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeCreate) SaveX(ctx context.Context) *ChargeFlatFee", + "line": 478 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeCreate) Exec(ctx context.Context) error", + "line": 487 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeCreate) ExecX(ctx context.Context)", + "line": 493 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeCreate) defaults()", + "line": 500 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeCreate) check() error", + "line": 516 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeCreate) sqlSave(ctx context.Context) (*ChargeFlatFee, error)", + "line": 646 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeCreate) createSpec() (*ChargeFlatFee, *sqlgraph.CreateSpec, error)", + "line": 672 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeUpsertOne", + "line": 972 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeUpsertOne", + "line": 985 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsert", + "line": 1006 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateServicePeriodFrom() *ChargeFlatFeeUpsert", + "line": 1012 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) SetServicePeriodTo(v time.Time) *ChargeFlatFeeUpsert", + "line": 1018 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateServicePeriodTo() *ChargeFlatFeeUpsert", + "line": 1024 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeUpsert", + "line": 1030 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateBillingPeriodFrom() *ChargeFlatFeeUpsert", + "line": 1036 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeUpsert", + "line": 1042 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateBillingPeriodTo() *ChargeFlatFeeUpsert", + "line": 1048 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsert", + "line": 1054 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateFullServicePeriodFrom() *ChargeFlatFeeUpsert", + "line": 1060 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeUpsert", + "line": 1066 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateFullServicePeriodTo() *ChargeFlatFeeUpsert", + "line": 1072 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeUpsert) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeUpsert", + "line": 1078 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateStatus() *ChargeFlatFeeUpsert", + "line": 1084 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeFlatFeeUpsert) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeUpsert", + "line": 1090 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateManagedBy() *ChargeFlatFeeUpsert", + "line": 1096 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsert) SetSubscriptionItemID(v string) *ChargeFlatFeeUpsert", + "line": 1102 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateSubscriptionItemID() *ChargeFlatFeeUpsert", + "line": 1108 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsert) ClearSubscriptionItemID() *ChargeFlatFeeUpsert", + "line": 1114 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsert) SetAdvanceAfter(v time.Time) *ChargeFlatFeeUpsert", + "line": 1120 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateAdvanceAfter() *ChargeFlatFeeUpsert", + "line": 1126 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsert) ClearAdvanceAfter() *ChargeFlatFeeUpsert", + "line": 1132 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsert) SetTaxCodeID(v string) *ChargeFlatFeeUpsert", + "line": 1138 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateTaxCodeID() *ChargeFlatFeeUpsert", + "line": 1144 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsert) ClearTaxCodeID() *ChargeFlatFeeUpsert", + "line": 1150 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeUpsert", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateTaxBehavior() *ChargeFlatFeeUpsert", + "line": 1162 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsert) ClearTaxBehavior() *ChargeFlatFeeUpsert", + "line": 1168 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeUpsert) SetAnnotations(v models.Annotations) *ChargeFlatFeeUpsert", + "line": 1174 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateAnnotations() *ChargeFlatFeeUpsert", + "line": 1180 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeUpsert) ClearAnnotations() *ChargeFlatFeeUpsert", + "line": 1186 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeUpsert) SetMetadata(v map[string]string) *ChargeFlatFeeUpsert", + "line": 1192 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateMetadata() *ChargeFlatFeeUpsert", + "line": 1198 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeUpsert) ClearMetadata() *ChargeFlatFeeUpsert", + "line": 1204 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeUpsert", + "line": 1210 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateUpdatedAt() *ChargeFlatFeeUpsert", + "line": 1216 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeUpsert", + "line": 1222 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateDeletedAt() *ChargeFlatFeeUpsert", + "line": 1228 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsert) ClearDeletedAt() *ChargeFlatFeeUpsert", + "line": 1234 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeUpsert) SetName(v string) *ChargeFlatFeeUpsert", + "line": 1240 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateName() *ChargeFlatFeeUpsert", + "line": 1246 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeUpsert) SetDescription(v string) *ChargeFlatFeeUpsert", + "line": 1252 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateDescription() *ChargeFlatFeeUpsert", + "line": 1258 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeUpsert) ClearDescription() *ChargeFlatFeeUpsert", + "line": 1264 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsert) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeUpsert", + "line": 1270 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsert) UpdatePaymentTerm() *ChargeFlatFeeUpsert", + "line": 1276 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsert) SetInvoiceAt(v time.Time) *ChargeFlatFeeUpsert", + "line": 1282 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateInvoiceAt() *ChargeFlatFeeUpsert", + "line": 1288 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeFlatFeeUpsert) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeUpsert", + "line": 1294 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateDiscounts() *ChargeFlatFeeUpsert", + "line": 1300 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeFlatFeeUpsert) ClearDiscounts() *ChargeFlatFeeUpsert", + "line": 1306 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (u *ChargeFlatFeeUpsert) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpsert", + "line": 1312 + }, + { + "kind": "func", + "name": "UpdateProRating", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateProRating() *ChargeFlatFeeUpsert", + "line": 1318 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsert) SetFeatureKey(v string) *ChargeFlatFeeUpsert", + "line": 1324 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateFeatureKey() *ChargeFlatFeeUpsert", + "line": 1330 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsert) ClearFeatureKey() *ChargeFlatFeeUpsert", + "line": 1336 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeFlatFeeUpsert) SetFeatureID(v string) *ChargeFlatFeeUpsert", + "line": 1342 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateFeatureID() *ChargeFlatFeeUpsert", + "line": 1348 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *ChargeFlatFeeUpsert) ClearFeatureID() *ChargeFlatFeeUpsert", + "line": 1354 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsert) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsert", + "line": 1360 + }, + { + "kind": "func", + "name": "UpdateAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateAmountBeforeProration() *ChargeFlatFeeUpsert", + "line": 1366 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsert) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsert", + "line": 1372 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateAmountAfterProration() *ChargeFlatFeeUpsert", + "line": 1378 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsert) SetCurrentRealizationRunID(v string) *ChargeFlatFeeUpsert", + "line": 1384 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateCurrentRealizationRunID() *ChargeFlatFeeUpsert", + "line": 1390 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsert) ClearCurrentRealizationRunID() *ChargeFlatFeeUpsert", + "line": 1396 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsert) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeUpsert", + "line": 1402 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsert) UpdateStatusDetailed() *ChargeFlatFeeUpsert", + "line": 1408 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateNewValues() *ChargeFlatFeeUpsertOne", + "line": 1424 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeUpsertOne) Ignore() *ChargeFlatFeeUpsertOne", + "line": 1464 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeUpsertOne) DoNothing() *ChargeFlatFeeUpsertOne", + "line": 1471 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeUpsertOne) Update(set func(*ChargeFlatFeeUpsert)) *ChargeFlatFeeUpsertOne", + "line": 1478 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1486 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateServicePeriodFrom() *ChargeFlatFeeUpsertOne", + "line": 1493 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1500 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateServicePeriodTo() *ChargeFlatFeeUpsertOne", + "line": 1507 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1514 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateBillingPeriodFrom() *ChargeFlatFeeUpsertOne", + "line": 1521 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1528 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateBillingPeriodTo() *ChargeFlatFeeUpsertOne", + "line": 1535 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1542 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateFullServicePeriodFrom() *ChargeFlatFeeUpsertOne", + "line": 1549 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1556 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateFullServicePeriodTo() *ChargeFlatFeeUpsertOne", + "line": 1563 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeUpsertOne", + "line": 1570 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateStatus() *ChargeFlatFeeUpsertOne", + "line": 1577 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeUpsertOne", + "line": 1584 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateManagedBy() *ChargeFlatFeeUpsertOne", + "line": 1591 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetSubscriptionItemID(v string) *ChargeFlatFeeUpsertOne", + "line": 1598 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateSubscriptionItemID() *ChargeFlatFeeUpsertOne", + "line": 1605 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearSubscriptionItemID() *ChargeFlatFeeUpsertOne", + "line": 1612 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetAdvanceAfter(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1619 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateAdvanceAfter() *ChargeFlatFeeUpsertOne", + "line": 1626 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearAdvanceAfter() *ChargeFlatFeeUpsertOne", + "line": 1633 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetTaxCodeID(v string) *ChargeFlatFeeUpsertOne", + "line": 1640 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateTaxCodeID() *ChargeFlatFeeUpsertOne", + "line": 1647 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearTaxCodeID() *ChargeFlatFeeUpsertOne", + "line": 1654 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeUpsertOne", + "line": 1661 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateTaxBehavior() *ChargeFlatFeeUpsertOne", + "line": 1668 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearTaxBehavior() *ChargeFlatFeeUpsertOne", + "line": 1675 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeUpsertOne", + "line": 1682 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateAnnotations() *ChargeFlatFeeUpsertOne", + "line": 1689 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearAnnotations() *ChargeFlatFeeUpsertOne", + "line": 1696 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetMetadata(v map[string]string) *ChargeFlatFeeUpsertOne", + "line": 1703 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateMetadata() *ChargeFlatFeeUpsertOne", + "line": 1710 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearMetadata() *ChargeFlatFeeUpsertOne", + "line": 1717 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1724 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeUpsertOne", + "line": 1731 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1738 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateDeletedAt() *ChargeFlatFeeUpsertOne", + "line": 1745 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearDeletedAt() *ChargeFlatFeeUpsertOne", + "line": 1752 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetName(v string) *ChargeFlatFeeUpsertOne", + "line": 1759 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateName() *ChargeFlatFeeUpsertOne", + "line": 1766 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetDescription(v string) *ChargeFlatFeeUpsertOne", + "line": 1773 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateDescription() *ChargeFlatFeeUpsertOne", + "line": 1780 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearDescription() *ChargeFlatFeeUpsertOne", + "line": 1787 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeUpsertOne", + "line": 1794 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdatePaymentTerm() *ChargeFlatFeeUpsertOne", + "line": 1801 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetInvoiceAt(v time.Time) *ChargeFlatFeeUpsertOne", + "line": 1808 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateInvoiceAt() *ChargeFlatFeeUpsertOne", + "line": 1815 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeUpsertOne", + "line": 1822 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateDiscounts() *ChargeFlatFeeUpsertOne", + "line": 1829 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearDiscounts() *ChargeFlatFeeUpsertOne", + "line": 1836 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpsertOne", + "line": 1843 + }, + { + "kind": "func", + "name": "UpdateProRating", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateProRating() *ChargeFlatFeeUpsertOne", + "line": 1850 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetFeatureKey(v string) *ChargeFlatFeeUpsertOne", + "line": 1857 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateFeatureKey() *ChargeFlatFeeUpsertOne", + "line": 1864 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearFeatureKey() *ChargeFlatFeeUpsertOne", + "line": 1871 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetFeatureID(v string) *ChargeFlatFeeUpsertOne", + "line": 1878 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateFeatureID() *ChargeFlatFeeUpsertOne", + "line": 1885 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearFeatureID() *ChargeFlatFeeUpsertOne", + "line": 1892 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsertOne", + "line": 1899 + }, + { + "kind": "func", + "name": "UpdateAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateAmountBeforeProration() *ChargeFlatFeeUpsertOne", + "line": 1906 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsertOne", + "line": 1913 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateAmountAfterProration() *ChargeFlatFeeUpsertOne", + "line": 1920 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetCurrentRealizationRunID(v string) *ChargeFlatFeeUpsertOne", + "line": 1927 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateCurrentRealizationRunID() *ChargeFlatFeeUpsertOne", + "line": 1934 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertOne) ClearCurrentRealizationRunID() *ChargeFlatFeeUpsertOne", + "line": 1941 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsertOne) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeUpsertOne", + "line": 1948 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsertOne) UpdateStatusDetailed() *ChargeFlatFeeUpsertOne", + "line": 1955 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeUpsertOne) Exec(ctx context.Context) error", + "line": 1962 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeUpsertOne) ExecX(ctx context.Context)", + "line": 1970 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1977 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeUpsertOne) IDX(ctx context.Context) string", + "line": 1991 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeCreateBulk", + "signature": "type ChargeFlatFeeCreateBulk struct", + "line": 2000 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFee, error)", + "line": 2008 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFee", + "line": 2067 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeCreateBulk) Exec(ctx context.Context) error", + "line": 2076 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeCreateBulk) ExecX(ctx context.Context)", + "line": 2082 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeUpsertBulk", + "line": 2103 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeUpsertBulk", + "line": 2116 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeUpsertBulk", + "signature": "type ChargeFlatFeeUpsertBulk struct", + "line": 2125 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateNewValues() *ChargeFlatFeeUpsertBulk", + "line": 2140 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeUpsertBulk) Ignore() *ChargeFlatFeeUpsertBulk", + "line": 2182 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeUpsertBulk) DoNothing() *ChargeFlatFeeUpsertBulk", + "line": 2189 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeUpsertBulk) Update(set func(*ChargeFlatFeeUpsert)) *ChargeFlatFeeUpsertBulk", + "line": 2196 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2204 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateServicePeriodFrom() *ChargeFlatFeeUpsertBulk", + "line": 2211 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2218 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateServicePeriodTo() *ChargeFlatFeeUpsertBulk", + "line": 2225 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2232 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateBillingPeriodFrom() *ChargeFlatFeeUpsertBulk", + "line": 2239 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2246 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateBillingPeriodTo() *ChargeFlatFeeUpsertBulk", + "line": 2253 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2260 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateFullServicePeriodFrom() *ChargeFlatFeeUpsertBulk", + "line": 2267 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2274 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateFullServicePeriodTo() *ChargeFlatFeeUpsertBulk", + "line": 2281 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeUpsertBulk", + "line": 2288 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateStatus() *ChargeFlatFeeUpsertBulk", + "line": 2295 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeUpsertBulk", + "line": 2302 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateManagedBy() *ChargeFlatFeeUpsertBulk", + "line": 2309 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetSubscriptionItemID(v string) *ChargeFlatFeeUpsertBulk", + "line": 2316 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateSubscriptionItemID() *ChargeFlatFeeUpsertBulk", + "line": 2323 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearSubscriptionItemID() *ChargeFlatFeeUpsertBulk", + "line": 2330 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetAdvanceAfter(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2337 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateAdvanceAfter() *ChargeFlatFeeUpsertBulk", + "line": 2344 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearAdvanceAfter() *ChargeFlatFeeUpsertBulk", + "line": 2351 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetTaxCodeID(v string) *ChargeFlatFeeUpsertBulk", + "line": 2358 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateTaxCodeID() *ChargeFlatFeeUpsertBulk", + "line": 2365 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearTaxCodeID() *ChargeFlatFeeUpsertBulk", + "line": 2372 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeUpsertBulk", + "line": 2379 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateTaxBehavior() *ChargeFlatFeeUpsertBulk", + "line": 2386 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearTaxBehavior() *ChargeFlatFeeUpsertBulk", + "line": 2393 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetAnnotations(v models.Annotations) *ChargeFlatFeeUpsertBulk", + "line": 2400 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateAnnotations() *ChargeFlatFeeUpsertBulk", + "line": 2407 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearAnnotations() *ChargeFlatFeeUpsertBulk", + "line": 2414 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetMetadata(v map[string]string) *ChargeFlatFeeUpsertBulk", + "line": 2421 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateMetadata() *ChargeFlatFeeUpsertBulk", + "line": 2428 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearMetadata() *ChargeFlatFeeUpsertBulk", + "line": 2435 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2442 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeUpsertBulk", + "line": 2449 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2456 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeUpsertBulk", + "line": 2463 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearDeletedAt() *ChargeFlatFeeUpsertBulk", + "line": 2470 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetName(v string) *ChargeFlatFeeUpsertBulk", + "line": 2477 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateName() *ChargeFlatFeeUpsertBulk", + "line": 2484 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetDescription(v string) *ChargeFlatFeeUpsertBulk", + "line": 2491 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateDescription() *ChargeFlatFeeUpsertBulk", + "line": 2498 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearDescription() *ChargeFlatFeeUpsertBulk", + "line": 2505 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeUpsertBulk", + "line": 2512 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdatePaymentTerm() *ChargeFlatFeeUpsertBulk", + "line": 2519 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetInvoiceAt(v time.Time) *ChargeFlatFeeUpsertBulk", + "line": 2526 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateInvoiceAt() *ChargeFlatFeeUpsertBulk", + "line": 2533 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeUpsertBulk", + "line": 2540 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateDiscounts() *ChargeFlatFeeUpsertBulk", + "line": 2547 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearDiscounts() *ChargeFlatFeeUpsertBulk", + "line": 2554 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpsertBulk", + "line": 2561 + }, + { + "kind": "func", + "name": "UpdateProRating", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateProRating() *ChargeFlatFeeUpsertBulk", + "line": 2568 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetFeatureKey(v string) *ChargeFlatFeeUpsertBulk", + "line": 2575 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateFeatureKey() *ChargeFlatFeeUpsertBulk", + "line": 2582 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearFeatureKey() *ChargeFlatFeeUpsertBulk", + "line": 2589 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetFeatureID(v string) *ChargeFlatFeeUpsertBulk", + "line": 2596 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateFeatureID() *ChargeFlatFeeUpsertBulk", + "line": 2603 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearFeatureID() *ChargeFlatFeeUpsertBulk", + "line": 2610 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsertBulk", + "line": 2617 + }, + { + "kind": "func", + "name": "UpdateAmountBeforeProration", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateAmountBeforeProration() *ChargeFlatFeeUpsertBulk", + "line": 2624 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpsertBulk", + "line": 2631 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateAmountAfterProration() *ChargeFlatFeeUpsertBulk", + "line": 2638 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetCurrentRealizationRunID(v string) *ChargeFlatFeeUpsertBulk", + "line": 2645 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateCurrentRealizationRunID() *ChargeFlatFeeUpsertBulk", + "line": 2652 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ClearCurrentRealizationRunID() *ChargeFlatFeeUpsertBulk", + "line": 2659 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsertBulk) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeUpsertBulk", + "line": 2666 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeFlatFeeUpsertBulk) UpdateStatusDetailed() *ChargeFlatFeeUpsertBulk", + "line": 2673 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeUpsertBulk) Exec(ctx context.Context) error", + "line": 2680 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeUpsertBulk) ExecX(ctx context.Context)", + "line": 2696 + } + ], + "line_count": 2700 + }, + "openmeter/ent/db/chargeflatfee_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeDelete", + "signature": "type ChargeFlatFeeDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeDelete) Where(ps ...predicate.ChargeFlatFee) *ChargeFlatFeeDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeDeleteOne", + "signature": "type ChargeFlatFeeDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeDeleteOne) Where(ps ...predicate.ChargeFlatFee) *ChargeFlatFeeDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfee_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeQuery", + "signature": "type ChargeFlatFeeQuery struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeQuery) Where(ps ...predicate.ChargeFlatFee) *ChargeFlatFeeQuery", + "line": 51 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeQuery) Limit(limit int) *ChargeFlatFeeQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeQuery) Offset(offset int) *ChargeFlatFeeQuery", + "line": 63 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeQuery) Unique(unique bool) *ChargeFlatFeeQuery", + "line": 70 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeQuery) Order(o ...chargeflatfee.OrderOption) *ChargeFlatFeeQuery", + "line": 76 + }, + { + "kind": "func", + "name": "QueryRuns", + "signature": "func (_q *ChargeFlatFeeQuery) QueryRuns() *ChargeFlatFeeRunQuery", + "line": 82 + }, + { + "kind": "func", + "name": "QueryCurrentRun", + "signature": "func (_q *ChargeFlatFeeQuery) QueryCurrentRun() *ChargeFlatFeeRunQuery", + "line": 104 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *ChargeFlatFeeQuery) QueryCharge() *ChargeQuery", + "line": 126 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *ChargeFlatFeeQuery) QuerySubscription() *SubscriptionQuery", + "line": 148 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_q *ChargeFlatFeeQuery) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 170 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *ChargeFlatFeeQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 192 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *ChargeFlatFeeQuery) QueryCustomer() *CustomerQuery", + "line": 214 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_q *ChargeFlatFeeQuery) QueryFeature() *FeatureQuery", + "line": 236 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *ChargeFlatFeeQuery) QueryTaxCode() *TaxCodeQuery", + "line": 258 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeQuery) First(ctx context.Context) (*ChargeFlatFee, error)", + "line": 281 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeQuery) FirstX(ctx context.Context) *ChargeFlatFee", + "line": 293 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 303 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeQuery) FirstIDX(ctx context.Context) string", + "line": 316 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeQuery) Only(ctx context.Context) (*ChargeFlatFee, error)", + "line": 327 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeQuery) OnlyX(ctx context.Context) *ChargeFlatFee", + "line": 343 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 354 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeQuery) OnlyIDX(ctx context.Context) string", + "line": 371 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeQuery) All(ctx context.Context) ([]*ChargeFlatFee, error)", + "line": 380 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeQuery) AllX(ctx context.Context) []*ChargeFlatFee", + "line": 390 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 399 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeQuery) IDsX(ctx context.Context) []string", + "line": 411 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeQuery) Count(ctx context.Context) (int, error)", + "line": 420 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeQuery) CountX(ctx context.Context) int", + "line": 429 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeQuery) Exist(ctx context.Context) (bool, error)", + "line": 438 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeQuery) ExistX(ctx context.Context) bool", + "line": 451 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeQuery) Clone() *ChargeFlatFeeQuery", + "line": 461 + }, + { + "kind": "func", + "name": "WithRuns", + "signature": "func (_q *ChargeFlatFeeQuery) WithRuns(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeQuery", + "line": 488 + }, + { + "kind": "func", + "name": "WithCurrentRun", + "signature": "func (_q *ChargeFlatFeeQuery) WithCurrentRun(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeQuery", + "line": 499 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *ChargeFlatFeeQuery) WithCharge(opts ...func(*ChargeQuery)) *ChargeFlatFeeQuery", + "line": 510 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *ChargeFlatFeeQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *ChargeFlatFeeQuery", + "line": 521 + }, + { + "kind": "func", + "name": "WithSubscriptionPhase", + "signature": "func (_q *ChargeFlatFeeQuery) WithSubscriptionPhase(opts ...func(*SubscriptionPhaseQuery)) *ChargeFlatFeeQuery", + "line": 532 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *ChargeFlatFeeQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *ChargeFlatFeeQuery", + "line": 543 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *ChargeFlatFeeQuery) WithCustomer(opts ...func(*CustomerQuery)) *ChargeFlatFeeQuery", + "line": 554 + }, + { + "kind": "func", + "name": "WithFeature", + "signature": "func (_q *ChargeFlatFeeQuery) WithFeature(opts ...func(*FeatureQuery)) *ChargeFlatFeeQuery", + "line": 565 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *ChargeFlatFeeQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *ChargeFlatFeeQuery", + "line": 576 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeGroupBy", + "line": 599 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeQuery) Select(fields ...string) *ChargeFlatFeeSelect", + "line": 620 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeSelect", + "line": 629 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeQuery) prepareQuery(ctx context.Context) error", + "line": 633 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFee, error)", + "line": 659 + }, + { + "kind": "func", + "name": "loadRuns", + "signature": "func (_q *ChargeFlatFeeQuery) loadRuns(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *ChargeFlatFeeRun)) error", + "line": 754 + }, + { + "kind": "func", + "name": "loadCurrentRun", + "signature": "func (_q *ChargeFlatFeeQuery) loadCurrentRun(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *ChargeFlatFeeRun)) error", + "line": 784 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *ChargeFlatFeeQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *Charge)) error", + "line": 816 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *ChargeFlatFeeQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *Subscription)) error", + "line": 846 + }, + { + "kind": "func", + "name": "loadSubscriptionPhase", + "signature": "func (_q *ChargeFlatFeeQuery) loadSubscriptionPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *SubscriptionPhase)) error", + "line": 878 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *ChargeFlatFeeQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *SubscriptionItem)) error", + "line": 910 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *ChargeFlatFeeQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *Customer)) error", + "line": 942 + }, + { + "kind": "func", + "name": "loadFeature", + "signature": "func (_q *ChargeFlatFeeQuery) loadFeature(ctx context.Context, query *FeatureQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *Feature)) error", + "line": 971 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *ChargeFlatFeeQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*ChargeFlatFee, init func(*ChargeFlatFee), assign func(*ChargeFlatFee, *TaxCode)) error", + "line": 1003 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1036 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1048 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1109 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeQuery", + "line": 1147 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeQuery", + "line": 1160 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeGroupBy", + "signature": "type ChargeFlatFeeGroupBy struct", + "line": 1171 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeGroupBy", + "line": 1177 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeGroupBy) Scan(ctx context.Context, v any) error", + "line": 1183 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeQuery, v any) error", + "line": 1191 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeSelect", + "signature": "type ChargeFlatFeeSelect struct", + "line": 1219 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeSelect", + "line": 1225 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeSelect) Scan(ctx context.Context, v any) error", + "line": 1231 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeQuery, v any) error", + "line": 1239 + } + ], + "line_count": 1258 + }, + "openmeter/ent/db/chargeflatfee_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeUpdate", + "signature": "type ChargeFlatFeeUpdate struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeUpdate) Where(ps ...predicate.ChargeFlatFee) *ChargeFlatFeeUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeUpdate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeUpdate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableBillingPeriodFrom(v *time.Time) *ChargeFlatFeeUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableBillingPeriodTo(v *time.Time) *ChargeFlatFeeUpdate", + "line": 90 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeFlatFeeUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableFullServicePeriodTo(v *time.Time) *ChargeFlatFeeUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeFlatFeeUpdate) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableStatus(v *meta.ChargeStatus) *ChargeFlatFeeUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeFlatFeeUpdate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeFlatFeeUpdate", + "line": 146 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetSubscriptionItemID(v string) *ChargeFlatFeeUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableSubscriptionItemID(v *string) *ChargeFlatFeeUpdate", + "line": 160 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearSubscriptionItemID() *ChargeFlatFeeUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdate) SetAdvanceAfter(v time.Time) *ChargeFlatFeeUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableAdvanceAfter(v *time.Time) *ChargeFlatFeeUpdate", + "line": 180 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearAdvanceAfter() *ChargeFlatFeeUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetTaxCodeID(v string) *ChargeFlatFeeUpdate", + "line": 194 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableTaxCodeID(v *string) *ChargeFlatFeeUpdate", + "line": 200 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearTaxCodeID() *ChargeFlatFeeUpdate", + "line": 208 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeUpdate", + "line": 214 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearTaxBehavior() *ChargeFlatFeeUpdate", + "line": 228 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeUpdate) SetAnnotations(v models.Annotations) *ChargeFlatFeeUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearAnnotations() *ChargeFlatFeeUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeFlatFeeUpdate) SetMetadata(v map[string]string) *ChargeFlatFeeUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearMetadata() *ChargeFlatFeeUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeUpdate", + "line": 270 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearDeletedAt() *ChargeFlatFeeUpdate", + "line": 278 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeFlatFeeUpdate) SetName(v string) *ChargeFlatFeeUpdate", + "line": 284 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableName(v *string) *ChargeFlatFeeUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeFlatFeeUpdate) SetDescription(v string) *ChargeFlatFeeUpdate", + "line": 298 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableDescription(v *string) *ChargeFlatFeeUpdate", + "line": 304 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearDescription() *ChargeFlatFeeUpdate", + "line": 312 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeFlatFeeUpdate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeUpdate", + "line": 318 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeFlatFeeUpdate", + "line": 324 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *ChargeFlatFeeUpdate) SetInvoiceAt(v time.Time) *ChargeFlatFeeUpdate", + "line": 332 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableInvoiceAt(v *time.Time) *ChargeFlatFeeUpdate", + "line": 338 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *ChargeFlatFeeUpdate) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeUpdate", + "line": 346 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearDiscounts() *ChargeFlatFeeUpdate", + "line": 352 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (_u *ChargeFlatFeeUpdate) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpdate", + "line": 358 + }, + { + "kind": "func", + "name": "SetNillableProRating", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableProRating(v *flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpdate", + "line": 364 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdate) SetFeatureKey(v string) *ChargeFlatFeeUpdate", + "line": 372 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableFeatureKey(v *string) *ChargeFlatFeeUpdate", + "line": 378 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearFeatureKey() *ChargeFlatFeeUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetFeatureID(v string) *ChargeFlatFeeUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableFeatureID(v *string) *ChargeFlatFeeUpdate", + "line": 398 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearFeatureID() *ChargeFlatFeeUpdate", + "line": 406 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (_u *ChargeFlatFeeUpdate) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpdate", + "line": 412 + }, + { + "kind": "func", + "name": "SetNillableAmountBeforeProration", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableAmountBeforeProration(v *alpacadecimal.Decimal) *ChargeFlatFeeUpdate", + "line": 418 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeUpdate) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpdate", + "line": 426 + }, + { + "kind": "func", + "name": "SetNillableAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableAmountAfterProration(v *alpacadecimal.Decimal) *ChargeFlatFeeUpdate", + "line": 432 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetCurrentRealizationRunID(v string) *ChargeFlatFeeUpdate", + "line": 440 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableCurrentRealizationRunID(v *string) *ChargeFlatFeeUpdate", + "line": 446 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearCurrentRealizationRunID() *ChargeFlatFeeUpdate", + "line": 454 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeFlatFeeUpdate) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeUpdate", + "line": 460 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableStatusDetailed(v *flatfee.Status) *ChargeFlatFeeUpdate", + "line": 466 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_u *ChargeFlatFeeUpdate) AddRunIDs(ids ...string) *ChargeFlatFeeUpdate", + "line": 474 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_u *ChargeFlatFeeUpdate) AddRuns(v ...*ChargeFlatFeeRun) *ChargeFlatFeeUpdate", + "line": 480 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetCurrentRunID(id string) *ChargeFlatFeeUpdate", + "line": 489 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_u *ChargeFlatFeeUpdate) SetNillableCurrentRunID(id *string) *ChargeFlatFeeUpdate", + "line": 495 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_u *ChargeFlatFeeUpdate) SetCurrentRun(v *ChargeFlatFeeRun) *ChargeFlatFeeUpdate", + "line": 503 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeFlatFeeUpdate) SetSubscriptionItem(v *SubscriptionItem) *ChargeFlatFeeUpdate", + "line": 508 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_u *ChargeFlatFeeUpdate) SetFeature(v *Feature) *ChargeFlatFeeUpdate", + "line": 513 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeFlatFeeUpdate) SetTaxCode(v *TaxCode) *ChargeFlatFeeUpdate", + "line": 518 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeUpdate) Mutation() *ChargeFlatFeeMutation", + "line": 523 + }, + { + "kind": "func", + "name": "ClearRuns", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearRuns() *ChargeFlatFeeUpdate", + "line": 528 + }, + { + "kind": "func", + "name": "RemoveRunIDs", + "signature": "func (_u *ChargeFlatFeeUpdate) RemoveRunIDs(ids ...string) *ChargeFlatFeeUpdate", + "line": 534 + }, + { + "kind": "func", + "name": "RemoveRuns", + "signature": "func (_u *ChargeFlatFeeUpdate) RemoveRuns(v ...*ChargeFlatFeeRun) *ChargeFlatFeeUpdate", + "line": 540 + }, + { + "kind": "func", + "name": "ClearCurrentRun", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearCurrentRun() *ChargeFlatFeeUpdate", + "line": 549 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearSubscriptionItem() *ChargeFlatFeeUpdate", + "line": 555 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearFeature() *ChargeFlatFeeUpdate", + "line": 561 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeFlatFeeUpdate) ClearTaxCode() *ChargeFlatFeeUpdate", + "line": 567 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeUpdate) Save(ctx context.Context) (int, error)", + "line": 573 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeUpdate) SaveX(ctx context.Context) int", + "line": 579 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeUpdate) Exec(ctx context.Context) error", + "line": 588 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeUpdate) ExecX(ctx context.Context)", + "line": 594 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeUpdate) defaults()", + "line": 601 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeUpdate) check() error", + "line": 609 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 656 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeUpdateOne", + "signature": "type ChargeFlatFeeUpdateOne struct", + "line": 945 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 953 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 959 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 967 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 973 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetBillingPeriodFrom(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 981 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableBillingPeriodFrom(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 987 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetBillingPeriodTo(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 995 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableBillingPeriodTo(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1001 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetFullServicePeriodFrom(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1009 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1015 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetFullServicePeriodTo(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1023 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableFullServicePeriodTo(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1029 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetStatus(v meta.ChargeStatus) *ChargeFlatFeeUpdateOne", + "line": 1037 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableStatus(v *meta.ChargeStatus) *ChargeFlatFeeUpdateOne", + "line": 1043 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeFlatFeeUpdateOne", + "line": 1051 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeFlatFeeUpdateOne", + "line": 1057 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetSubscriptionItemID(v string) *ChargeFlatFeeUpdateOne", + "line": 1065 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableSubscriptionItemID(v *string) *ChargeFlatFeeUpdateOne", + "line": 1071 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearSubscriptionItemID() *ChargeFlatFeeUpdateOne", + "line": 1079 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetAdvanceAfter(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1085 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableAdvanceAfter(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1091 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearAdvanceAfter() *ChargeFlatFeeUpdateOne", + "line": 1099 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetTaxCodeID(v string) *ChargeFlatFeeUpdateOne", + "line": 1105 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableTaxCodeID(v *string) *ChargeFlatFeeUpdateOne", + "line": 1111 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearTaxCodeID() *ChargeFlatFeeUpdateOne", + "line": 1119 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeUpdateOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeUpdateOne", + "line": 1131 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearTaxBehavior() *ChargeFlatFeeUpdateOne", + "line": 1139 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeUpdateOne", + "line": 1145 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearAnnotations() *ChargeFlatFeeUpdateOne", + "line": 1151 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetMetadata(v map[string]string) *ChargeFlatFeeUpdateOne", + "line": 1157 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearMetadata() *ChargeFlatFeeUpdateOne", + "line": 1163 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1169 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1175 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1181 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearDeletedAt() *ChargeFlatFeeUpdateOne", + "line": 1189 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetName(v string) *ChargeFlatFeeUpdateOne", + "line": 1195 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableName(v *string) *ChargeFlatFeeUpdateOne", + "line": 1201 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetDescription(v string) *ChargeFlatFeeUpdateOne", + "line": 1209 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableDescription(v *string) *ChargeFlatFeeUpdateOne", + "line": 1215 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearDescription() *ChargeFlatFeeUpdateOne", + "line": 1223 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeUpdateOne", + "line": 1229 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeFlatFeeUpdateOne", + "line": 1235 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetInvoiceAt(v time.Time) *ChargeFlatFeeUpdateOne", + "line": 1243 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableInvoiceAt(v *time.Time) *ChargeFlatFeeUpdateOne", + "line": 1249 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetDiscounts(v *productcatalog.Discounts) *ChargeFlatFeeUpdateOne", + "line": 1257 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearDiscounts() *ChargeFlatFeeUpdateOne", + "line": 1263 + }, + { + "kind": "func", + "name": "SetProRating", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetProRating(v flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpdateOne", + "line": 1269 + }, + { + "kind": "func", + "name": "SetNillableProRating", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableProRating(v *flatfee.ProRatingModeAdapterEnum) *ChargeFlatFeeUpdateOne", + "line": 1275 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetFeatureKey(v string) *ChargeFlatFeeUpdateOne", + "line": 1283 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableFeatureKey(v *string) *ChargeFlatFeeUpdateOne", + "line": 1289 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearFeatureKey() *ChargeFlatFeeUpdateOne", + "line": 1297 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetFeatureID(v string) *ChargeFlatFeeUpdateOne", + "line": 1303 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableFeatureID(v *string) *ChargeFlatFeeUpdateOne", + "line": 1309 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearFeatureID() *ChargeFlatFeeUpdateOne", + "line": 1317 + }, + { + "kind": "func", + "name": "SetAmountBeforeProration", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetAmountBeforeProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpdateOne", + "line": 1323 + }, + { + "kind": "func", + "name": "SetNillableAmountBeforeProration", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableAmountBeforeProration(v *alpacadecimal.Decimal) *ChargeFlatFeeUpdateOne", + "line": 1329 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeUpdateOne", + "line": 1337 + }, + { + "kind": "func", + "name": "SetNillableAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableAmountAfterProration(v *alpacadecimal.Decimal) *ChargeFlatFeeUpdateOne", + "line": 1343 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetCurrentRealizationRunID(v string) *ChargeFlatFeeUpdateOne", + "line": 1351 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableCurrentRealizationRunID(v *string) *ChargeFlatFeeUpdateOne", + "line": 1357 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearCurrentRealizationRunID() *ChargeFlatFeeUpdateOne", + "line": 1365 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetStatusDetailed(v flatfee.Status) *ChargeFlatFeeUpdateOne", + "line": 1371 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableStatusDetailed(v *flatfee.Status) *ChargeFlatFeeUpdateOne", + "line": 1377 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_u *ChargeFlatFeeUpdateOne) AddRunIDs(ids ...string) *ChargeFlatFeeUpdateOne", + "line": 1385 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_u *ChargeFlatFeeUpdateOne) AddRuns(v ...*ChargeFlatFeeRun) *ChargeFlatFeeUpdateOne", + "line": 1391 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetCurrentRunID(id string) *ChargeFlatFeeUpdateOne", + "line": 1400 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetNillableCurrentRunID(id *string) *ChargeFlatFeeUpdateOne", + "line": 1406 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetCurrentRun(v *ChargeFlatFeeRun) *ChargeFlatFeeUpdateOne", + "line": 1414 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetSubscriptionItem(v *SubscriptionItem) *ChargeFlatFeeUpdateOne", + "line": 1419 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetFeature(v *Feature) *ChargeFlatFeeUpdateOne", + "line": 1424 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SetTaxCode(v *TaxCode) *ChargeFlatFeeUpdateOne", + "line": 1429 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeUpdateOne) Mutation() *ChargeFlatFeeMutation", + "line": 1434 + }, + { + "kind": "func", + "name": "ClearRuns", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearRuns() *ChargeFlatFeeUpdateOne", + "line": 1439 + }, + { + "kind": "func", + "name": "RemoveRunIDs", + "signature": "func (_u *ChargeFlatFeeUpdateOne) RemoveRunIDs(ids ...string) *ChargeFlatFeeUpdateOne", + "line": 1445 + }, + { + "kind": "func", + "name": "RemoveRuns", + "signature": "func (_u *ChargeFlatFeeUpdateOne) RemoveRuns(v ...*ChargeFlatFeeRun) *ChargeFlatFeeUpdateOne", + "line": 1451 + }, + { + "kind": "func", + "name": "ClearCurrentRun", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearCurrentRun() *ChargeFlatFeeUpdateOne", + "line": 1460 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearSubscriptionItem() *ChargeFlatFeeUpdateOne", + "line": 1466 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearFeature() *ChargeFlatFeeUpdateOne", + "line": 1472 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ClearTaxCode() *ChargeFlatFeeUpdateOne", + "line": 1478 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeUpdateOne) Where(ps ...predicate.ChargeFlatFee) *ChargeFlatFeeUpdateOne", + "line": 1484 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeUpdateOne", + "line": 1491 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeUpdateOne) Save(ctx context.Context) (*ChargeFlatFee, error)", + "line": 1497 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeUpdateOne) SaveX(ctx context.Context) *ChargeFlatFee", + "line": 1503 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeUpdateOne) Exec(ctx context.Context) error", + "line": 1512 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeUpdateOne) ExecX(ctx context.Context)", + "line": 1518 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeUpdateOne) defaults()", + "line": 1525 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeUpdateOne) check() error", + "line": 1533 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFee, err error)", + "line": 1580 + } + ], + "line_count": 1886 + }, + "openmeter/ent/db/chargeflatfeerun.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRun", + "signature": "type ChargeFlatFeeRun struct", + "line": 23 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunEdges", + "signature": "type ChargeFlatFeeRunEdges struct", + "line": 78 + }, + { + "kind": "func", + "name": "FlatFeeOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) FlatFeeOrErr() (*ChargeFlatFee, error)", + "line": 100 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 111 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) BillingInvoiceOrErr() (*BillingInvoice, error)", + "line": 122 + }, + { + "kind": "func", + "name": "CreditAllocationsOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) CreditAllocationsOrErr() ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 133 + }, + { + "kind": "func", + "name": "DetailedLinesOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) DetailedLinesOrErr() ([]*ChargeFlatFeeRunDetailedLine, error)", + "line": 142 + }, + { + "kind": "func", + "name": "InvoicedUsageOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) InvoicedUsageOrErr() (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 151 + }, + { + "kind": "func", + "name": "PaymentOrErr", + "signature": "func (e ChargeFlatFeeRunEdges) PaymentOrErr() (*ChargeFlatFeeRunPayment, error)", + "line": 162 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFeeRun) assignValues(columns []string, values []any) error", + "line": 193 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFeeRun) Value(name string) (ent.Value, error)", + "line": 349 + }, + { + "kind": "func", + "name": "QueryFlatFee", + "signature": "func (_m *ChargeFlatFeeRun) QueryFlatFee() *ChargeFlatFeeQuery", + "line": 354 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *ChargeFlatFeeRun) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 359 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *ChargeFlatFeeRun) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 364 + }, + { + "kind": "func", + "name": "QueryCreditAllocations", + "signature": "func (_m *ChargeFlatFeeRun) QueryCreditAllocations() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 369 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_m *ChargeFlatFeeRun) QueryDetailedLines() *ChargeFlatFeeRunDetailedLineQuery", + "line": 374 + }, + { + "kind": "func", + "name": "QueryInvoicedUsage", + "signature": "func (_m *ChargeFlatFeeRun) QueryInvoicedUsage() *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 379 + }, + { + "kind": "func", + "name": "QueryPayment", + "signature": "func (_m *ChargeFlatFeeRun) QueryPayment() *ChargeFlatFeeRunPaymentQuery", + "line": 384 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFeeRun) Update() *ChargeFlatFeeRunUpdateOne", + "line": 391 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFeeRun) Unwrap() *ChargeFlatFeeRun", + "line": 397 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFeeRun) String() string", + "line": 407 + } + ], + "line_count": 487 + }, + "openmeter/ent/db/chargeflatfeerun/chargeflatfeerun.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 158 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type flatfee.RealizationRunType) error", + "line": 185 + }, + { + "kind": "func", + "name": "InitialTypeValidator", + "signature": "func InitialTypeValidator(it flatfee.RealizationRunType) error", + "line": 195 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 208 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 213 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 218 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByInitialType", + "signature": "func ByInitialType(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 288 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 293 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 298 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 303 + }, + { + "kind": "func", + "name": "ByAmountAfterProration", + "signature": "func ByAmountAfterProration(opts ...sql.OrderTermOption) OrderOption", + "line": 308 + }, + { + "kind": "func", + "name": "ByNoFiatTransactionRequired", + "signature": "func ByNoFiatTransactionRequired(opts ...sql.OrderTermOption) OrderOption", + "line": 313 + }, + { + "kind": "func", + "name": "ByImmutable", + "signature": "func ByImmutable(opts ...sql.OrderTermOption) OrderOption", + "line": 318 + }, + { + "kind": "func", + "name": "ByFlatFeeField", + "signature": "func ByFlatFeeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 323 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 330 + }, + { + "kind": "func", + "name": "ByBillingInvoiceField", + "signature": "func ByBillingInvoiceField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 337 + }, + { + "kind": "func", + "name": "ByCreditAllocationsCount", + "signature": "func ByCreditAllocationsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 344 + }, + { + "kind": "func", + "name": "ByCreditAllocations", + "signature": "func ByCreditAllocations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 351 + }, + { + "kind": "func", + "name": "ByDetailedLinesCount", + "signature": "func ByDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 358 + }, + { + "kind": "func", + "name": "ByDetailedLines", + "signature": "func ByDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 365 + }, + { + "kind": "func", + "name": "ByInvoicedUsageField", + "signature": "func ByInvoicedUsageField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 372 + }, + { + "kind": "func", + "name": "ByPaymentField", + "signature": "func ByPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "newFlatFeeStep", + "signature": "func newFlatFeeStep() *sqlgraph.Step", + "line": 384 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 391 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 398 + }, + { + "kind": "func", + "name": "newCreditAllocationsStep", + "signature": "func newCreditAllocationsStep() *sqlgraph.Step", + "line": 405 + }, + { + "kind": "func", + "name": "newDetailedLinesStep", + "signature": "func newDetailedLinesStep() *sqlgraph.Step", + "line": 412 + }, + { + "kind": "func", + "name": "newInvoicedUsageStep", + "signature": "func newInvoicedUsageStep() *sqlgraph.Step", + "line": 419 + }, + { + "kind": "func", + "name": "newPaymentStep", + "signature": "func newPaymentStep() *sqlgraph.Step", + "line": 426 + } + ], + "line_count": 432 + }, + "openmeter/ent/db/chargeflatfeerun/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFeeRun", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFeeRun", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFeeRun", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFeeRun", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFeeRun", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFeeRun", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFeeRun", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFeeRun", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFeeRun", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFeeRun", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFeeRun", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFeeRun", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFeeRun", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFeeRun", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFeeRun", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 91 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 96 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 101 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 106 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 111 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 116 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 121 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 126 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeFlatFeeRun", + "line": 131 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeFlatFeeRun", + "line": 136 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeFlatFeeRun", + "line": 141 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeFlatFeeRun", + "line": 146 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.ChargeFlatFeeRun", + "line": 151 + }, + { + "kind": "func", + "name": "AmountAfterProration", + "signature": "func AmountAfterProration(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 156 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequired", + "signature": "func NoFiatTransactionRequired(v bool) predicate.ChargeFlatFeeRun", + "line": 161 + }, + { + "kind": "func", + "name": "Immutable", + "signature": "func Immutable(v bool) predicate.ChargeFlatFeeRun", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFeeRun", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFeeRun", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFeeRun", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFeeRun", + "line": 196 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFeeRun", + "line": 201 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFeeRun", + "line": 206 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFeeRun", + "line": 211 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFeeRun", + "line": 216 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFeeRun", + "line": 221 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFeeRun", + "line": 226 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFeeRun", + "line": 231 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 236 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 241 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 246 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 251 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 256 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 261 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 266 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 271 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 276 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 281 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 286 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 291 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 296 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 301 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 306 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 311 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 326 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 331 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 336 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 341 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 346 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 351 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFeeRun", + "line": 356 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFeeRun", + "line": 361 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 366 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 371 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 376 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 381 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 386 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 391 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 396 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 401 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 406 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 411 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 416 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 421 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 426 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 431 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 436 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 441 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 446 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 451 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 456 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 461 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 466 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 471 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 476 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 481 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 486 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 491 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 496 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 501 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 506 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 511 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 516 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 521 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 526 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 531 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 536 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 541 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 546 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 551 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 556 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 561 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 566 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 571 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 576 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 581 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 586 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 591 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 596 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 601 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 606 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 611 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 616 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 621 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 626 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 631 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 636 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 641 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 646 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 651 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 656 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 661 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 666 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 671 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 676 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 681 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeFlatFeeRun", + "line": 686 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeFlatFeeRun", + "line": 691 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 696 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 701 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeFlatFeeRun", + "line": 706 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeFlatFeeRun", + "line": 711 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeFlatFeeRun", + "line": 716 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeFlatFeeRun", + "line": 721 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeFlatFeeRun", + "line": 726 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeFlatFeeRun", + "line": 731 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeFlatFeeRun", + "line": 736 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeFlatFeeRun", + "line": 741 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeFlatFeeRun", + "line": 746 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 751 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 757 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 763 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 772 + }, + { + "kind": "func", + "name": "InitialTypeEQ", + "signature": "func InitialTypeEQ(v flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 781 + }, + { + "kind": "func", + "name": "InitialTypeNEQ", + "signature": "func InitialTypeNEQ(v flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 787 + }, + { + "kind": "func", + "name": "InitialTypeIn", + "signature": "func InitialTypeIn(vs ...flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 793 + }, + { + "kind": "func", + "name": "InitialTypeNotIn", + "signature": "func InitialTypeNotIn(vs ...flatfee.RealizationRunType) predicate.ChargeFlatFeeRun", + "line": 802 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 811 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 816 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 821 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 826 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 831 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 836 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 841 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 846 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 851 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFeeRun", + "line": 856 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 861 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFeeRun", + "line": 866 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 871 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 876 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeFlatFeeRun", + "line": 881 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeFlatFeeRun", + "line": 886 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeFlatFeeRun", + "line": 891 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeFlatFeeRun", + "line": 896 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 901 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 906 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeFlatFeeRun", + "line": 911 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeFlatFeeRun", + "line": 916 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeFlatFeeRun", + "line": 921 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeFlatFeeRun", + "line": 926 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeFlatFeeRun", + "line": 931 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeFlatFeeRun", + "line": 936 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeFlatFeeRun", + "line": 941 + }, + { + "kind": "func", + "name": "LineIDIsNil", + "signature": "func LineIDIsNil() predicate.ChargeFlatFeeRun", + "line": 946 + }, + { + "kind": "func", + "name": "LineIDNotNil", + "signature": "func LineIDNotNil() predicate.ChargeFlatFeeRun", + "line": 951 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeFlatFeeRun", + "line": 956 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeFlatFeeRun", + "line": 961 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.ChargeFlatFeeRun", + "line": 966 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.ChargeFlatFeeRun", + "line": 971 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 976 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.ChargeFlatFeeRun", + "line": 981 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.ChargeFlatFeeRun", + "line": 986 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.ChargeFlatFeeRun", + "line": 991 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.ChargeFlatFeeRun", + "line": 996 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.ChargeFlatFeeRun", + "line": 1001 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.ChargeFlatFeeRun", + "line": 1006 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.ChargeFlatFeeRun", + "line": 1011 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.ChargeFlatFeeRun", + "line": 1016 + }, + { + "kind": "func", + "name": "InvoiceIDIsNil", + "signature": "func InvoiceIDIsNil() predicate.ChargeFlatFeeRun", + "line": 1021 + }, + { + "kind": "func", + "name": "InvoiceIDNotNil", + "signature": "func InvoiceIDNotNil() predicate.ChargeFlatFeeRun", + "line": 1026 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.ChargeFlatFeeRun", + "line": 1031 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.ChargeFlatFeeRun", + "line": 1036 + }, + { + "kind": "func", + "name": "AmountAfterProrationEQ", + "signature": "func AmountAfterProrationEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1041 + }, + { + "kind": "func", + "name": "AmountAfterProrationNEQ", + "signature": "func AmountAfterProrationNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1046 + }, + { + "kind": "func", + "name": "AmountAfterProrationIn", + "signature": "func AmountAfterProrationIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1051 + }, + { + "kind": "func", + "name": "AmountAfterProrationNotIn", + "signature": "func AmountAfterProrationNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1056 + }, + { + "kind": "func", + "name": "AmountAfterProrationGT", + "signature": "func AmountAfterProrationGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1061 + }, + { + "kind": "func", + "name": "AmountAfterProrationGTE", + "signature": "func AmountAfterProrationGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1066 + }, + { + "kind": "func", + "name": "AmountAfterProrationLT", + "signature": "func AmountAfterProrationLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1071 + }, + { + "kind": "func", + "name": "AmountAfterProrationLTE", + "signature": "func AmountAfterProrationLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRun", + "line": 1076 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequiredEQ", + "signature": "func NoFiatTransactionRequiredEQ(v bool) predicate.ChargeFlatFeeRun", + "line": 1081 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequiredNEQ", + "signature": "func NoFiatTransactionRequiredNEQ(v bool) predicate.ChargeFlatFeeRun", + "line": 1086 + }, + { + "kind": "func", + "name": "ImmutableEQ", + "signature": "func ImmutableEQ(v bool) predicate.ChargeFlatFeeRun", + "line": 1091 + }, + { + "kind": "func", + "name": "ImmutableNEQ", + "signature": "func ImmutableNEQ(v bool) predicate.ChargeFlatFeeRun", + "line": 1096 + }, + { + "kind": "func", + "name": "HasFlatFee", + "signature": "func HasFlatFee() predicate.ChargeFlatFeeRun", + "line": 1101 + }, + { + "kind": "func", + "name": "HasFlatFeeWith", + "signature": "func HasFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.ChargeFlatFeeRun", + "line": 1112 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.ChargeFlatFeeRun", + "line": 1124 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.ChargeFlatFeeRun", + "line": 1135 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.ChargeFlatFeeRun", + "line": 1147 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.ChargeFlatFeeRun", + "line": 1158 + }, + { + "kind": "func", + "name": "HasCreditAllocations", + "signature": "func HasCreditAllocations() predicate.ChargeFlatFeeRun", + "line": 1170 + }, + { + "kind": "func", + "name": "HasCreditAllocationsWith", + "signature": "func HasCreditAllocationsWith(preds ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRun", + "line": 1181 + }, + { + "kind": "func", + "name": "HasDetailedLines", + "signature": "func HasDetailedLines() predicate.ChargeFlatFeeRun", + "line": 1193 + }, + { + "kind": "func", + "name": "HasDetailedLinesWith", + "signature": "func HasDetailedLinesWith(preds ...predicate.ChargeFlatFeeRunDetailedLine) predicate.ChargeFlatFeeRun", + "line": 1204 + }, + { + "kind": "func", + "name": "HasInvoicedUsage", + "signature": "func HasInvoicedUsage() predicate.ChargeFlatFeeRun", + "line": 1216 + }, + { + "kind": "func", + "name": "HasInvoicedUsageWith", + "signature": "func HasInvoicedUsageWith(preds ...predicate.ChargeFlatFeeRunInvoicedUsage) predicate.ChargeFlatFeeRun", + "line": 1227 + }, + { + "kind": "func", + "name": "HasPayment", + "signature": "func HasPayment() predicate.ChargeFlatFeeRun", + "line": 1239 + }, + { + "kind": "func", + "name": "HasPaymentWith", + "signature": "func HasPaymentWith(preds ...predicate.ChargeFlatFeeRunPayment) predicate.ChargeFlatFeeRun", + "line": 1250 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRun", + "line": 1262 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRun", + "line": 1267 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRun", + "line": 1272 + } + ], + "line_count": 1274 + }, + "openmeter/ent/db/chargeflatfeerun_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreate", + "signature": "type ChargeFlatFeeRunCreate struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNamespace(v string) *ChargeFlatFeeRunCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeRunCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeRunCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeRunCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 114 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 120 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetChargeID(v string) *ChargeFlatFeeRunCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetInitialType", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetInitialType(v flatfee.RealizationRunType) *ChargeFlatFeeRunCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetLineID(v string) *ChargeFlatFeeRunCreate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableLineID(v *string) *ChargeFlatFeeRunCreate", + "line": 168 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetInvoiceID(v string) *ChargeFlatFeeRunCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableInvoiceID(v *string) *ChargeFlatFeeRunCreate", + "line": 182 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunCreate", + "line": 196 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetImmutable(v bool) *ChargeFlatFeeRunCreate", + "line": 202 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetID(v string) *ChargeFlatFeeRunCreate", + "line": 208 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableID(v *string) *ChargeFlatFeeRunCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetFlatFeeID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetFlatFeeID(id string) *ChargeFlatFeeRunCreate", + "line": 222 + }, + { + "kind": "func", + "name": "SetFlatFee", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetFlatFee(v *ChargeFlatFee) *ChargeFlatFeeRunCreate", + "line": 228 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunCreate", + "line": 233 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunCreate", + "line": 239 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunCreate", + "line": 247 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetBillingInvoiceID(id string) *ChargeFlatFeeRunCreate", + "line": 252 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableBillingInvoiceID(id *string) *ChargeFlatFeeRunCreate", + "line": 258 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetBillingInvoice(v *BillingInvoice) *ChargeFlatFeeRunCreate", + "line": 266 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_c *ChargeFlatFeeRunCreate) AddCreditAllocationIDs(ids ...string) *ChargeFlatFeeRunCreate", + "line": 271 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_c *ChargeFlatFeeRunCreate) AddCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreate", + "line": 277 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_c *ChargeFlatFeeRunCreate) AddDetailedLineIDs(ids ...string) *ChargeFlatFeeRunCreate", + "line": 286 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_c *ChargeFlatFeeRunCreate) AddDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunCreate", + "line": 292 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetInvoicedUsageID(id string) *ChargeFlatFeeRunCreate", + "line": 301 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillableInvoicedUsageID(id *string) *ChargeFlatFeeRunCreate", + "line": 307 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetInvoicedUsage(v *ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunCreate", + "line": 315 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetPaymentID(id string) *ChargeFlatFeeRunCreate", + "line": 320 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetNillablePaymentID(id *string) *ChargeFlatFeeRunCreate", + "line": 326 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_c *ChargeFlatFeeRunCreate) SetPayment(v *ChargeFlatFeeRunPayment) *ChargeFlatFeeRunCreate", + "line": 334 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeRunCreate) Mutation() *ChargeFlatFeeRunMutation", + "line": 339 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunCreate) Save(ctx context.Context) (*ChargeFlatFeeRun, error)", + "line": 344 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunCreate) SaveX(ctx context.Context) *ChargeFlatFeeRun", + "line": 350 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunCreate) Exec(ctx context.Context) error", + "line": 359 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunCreate) ExecX(ctx context.Context)", + "line": 365 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeRunCreate) defaults()", + "line": 372 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeRunCreate) check() error", + "line": 388 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeRunCreate) sqlSave(ctx context.Context) (*ChargeFlatFeeRun, error)", + "line": 477 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeRunCreate) createSpec() (*ChargeFlatFeeRun, *sqlgraph.CreateSpec)", + "line": 500 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunUpsertOne", + "line": 720 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeRunUpsertOne", + "line": 733 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunUpsert", + "line": 754 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateUpdatedAt() *ChargeFlatFeeRunUpsert", + "line": 760 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeRunUpsert", + "line": 766 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateDeletedAt() *ChargeFlatFeeRunUpsert", + "line": 772 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsert) ClearDeletedAt() *ChargeFlatFeeRunUpsert", + "line": 778 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 784 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateAmount() *ChargeFlatFeeRunUpsert", + "line": 790 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 796 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateTaxesTotal() *ChargeFlatFeeRunUpsert", + "line": 802 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 808 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunUpsert", + "line": 814 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunUpsert", + "line": 826 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 832 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateChargesTotal() *ChargeFlatFeeRunUpsert", + "line": 838 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 844 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateDiscountsTotal() *ChargeFlatFeeRunUpsert", + "line": 850 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 856 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateCreditsTotal() *ChargeFlatFeeRunUpsert", + "line": 862 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 868 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateTotal() *ChargeFlatFeeRunUpsert", + "line": 874 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunUpsert", + "line": 880 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateType() *ChargeFlatFeeRunUpsert", + "line": 886 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunUpsert", + "line": 892 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateServicePeriodFrom() *ChargeFlatFeeRunUpsert", + "line": 898 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunUpsert", + "line": 904 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateServicePeriodTo() *ChargeFlatFeeRunUpsert", + "line": 910 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetLineID(v string) *ChargeFlatFeeRunUpsert", + "line": 916 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateLineID() *ChargeFlatFeeRunUpsert", + "line": 922 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunUpsert) ClearLineID() *ChargeFlatFeeRunUpsert", + "line": 928 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetInvoiceID(v string) *ChargeFlatFeeRunUpsert", + "line": 934 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateInvoiceID() *ChargeFlatFeeRunUpsert", + "line": 940 + }, + { + "kind": "func", + "name": "ClearInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsert) ClearInvoiceID() *ChargeFlatFeeRunUpsert", + "line": 946 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsert", + "line": 952 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateAmountAfterProration() *ChargeFlatFeeRunUpsert", + "line": 958 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunUpsert", + "line": 964 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateNoFiatTransactionRequired() *ChargeFlatFeeRunUpsert", + "line": 970 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsert) SetImmutable(v bool) *ChargeFlatFeeRunUpsert", + "line": 976 + }, + { + "kind": "func", + "name": "UpdateImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsert) UpdateImmutable() *ChargeFlatFeeRunUpsert", + "line": 982 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateNewValues() *ChargeFlatFeeRunUpsertOne", + "line": 998 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) Ignore() *ChargeFlatFeeRunUpsertOne", + "line": 1026 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) DoNothing() *ChargeFlatFeeRunUpsertOne", + "line": 1033 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) Update(set func(*ChargeFlatFeeRunUpsert)) *ChargeFlatFeeRunUpsertOne", + "line": 1040 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunUpsertOne", + "line": 1048 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeRunUpsertOne", + "line": 1055 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunUpsertOne", + "line": 1062 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateDeletedAt() *ChargeFlatFeeRunUpsertOne", + "line": 1069 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) ClearDeletedAt() *ChargeFlatFeeRunUpsertOne", + "line": 1076 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1083 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateAmount() *ChargeFlatFeeRunUpsertOne", + "line": 1090 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1097 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateTaxesTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1104 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1111 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1118 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1125 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1132 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1139 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateChargesTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1153 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateDiscountsTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1160 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1167 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateCreditsTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1174 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1181 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateTotal() *ChargeFlatFeeRunUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunUpsertOne", + "line": 1195 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateType() *ChargeFlatFeeRunUpsertOne", + "line": 1202 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunUpsertOne", + "line": 1209 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateServicePeriodFrom() *ChargeFlatFeeRunUpsertOne", + "line": 1216 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunUpsertOne", + "line": 1223 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateServicePeriodTo() *ChargeFlatFeeRunUpsertOne", + "line": 1230 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetLineID(v string) *ChargeFlatFeeRunUpsertOne", + "line": 1237 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateLineID() *ChargeFlatFeeRunUpsertOne", + "line": 1244 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) ClearLineID() *ChargeFlatFeeRunUpsertOne", + "line": 1251 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetInvoiceID(v string) *ChargeFlatFeeRunUpsertOne", + "line": 1258 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateInvoiceID() *ChargeFlatFeeRunUpsertOne", + "line": 1265 + }, + { + "kind": "func", + "name": "ClearInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) ClearInvoiceID() *ChargeFlatFeeRunUpsertOne", + "line": 1272 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertOne", + "line": 1279 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateAmountAfterProration() *ChargeFlatFeeRunUpsertOne", + "line": 1286 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunUpsertOne", + "line": 1293 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateNoFiatTransactionRequired() *ChargeFlatFeeRunUpsertOne", + "line": 1300 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) SetImmutable(v bool) *ChargeFlatFeeRunUpsertOne", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdateImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) UpdateImmutable() *ChargeFlatFeeRunUpsertOne", + "line": 1314 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) Exec(ctx context.Context) error", + "line": 1321 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) ExecX(ctx context.Context)", + "line": 1329 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1336 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeRunUpsertOne) IDX(ctx context.Context) string", + "line": 1350 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreateBulk", + "signature": "type ChargeFlatFeeRunCreateBulk struct", + "line": 1359 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFeeRun, error)", + "line": 1367 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFeeRun", + "line": 1423 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) Exec(ctx context.Context) error", + "line": 1432 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) ExecX(ctx context.Context)", + "line": 1438 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunUpsertBulk", + "line": 1459 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeRunUpsertBulk", + "line": 1472 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunUpsertBulk", + "signature": "type ChargeFlatFeeRunUpsertBulk struct", + "line": 1481 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateNewValues() *ChargeFlatFeeRunUpsertBulk", + "line": 1496 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) Ignore() *ChargeFlatFeeRunUpsertBulk", + "line": 1526 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) DoNothing() *ChargeFlatFeeRunUpsertBulk", + "line": 1533 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) Update(set func(*ChargeFlatFeeRunUpsert)) *ChargeFlatFeeRunUpsertBulk", + "line": 1540 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunUpsertBulk", + "line": 1548 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeRunUpsertBulk", + "line": 1555 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeRunUpsertBulk", + "line": 1562 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeRunUpsertBulk", + "line": 1569 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) ClearDeletedAt() *ChargeFlatFeeRunUpsertBulk", + "line": 1576 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1583 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateAmount() *ChargeFlatFeeRunUpsertBulk", + "line": 1590 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1597 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateTaxesTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1604 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1611 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1618 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1625 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1632 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1639 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateChargesTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1646 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1653 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateDiscountsTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1660 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1667 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateCreditsTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1674 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1681 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateTotal() *ChargeFlatFeeRunUpsertBulk", + "line": 1688 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunUpsertBulk", + "line": 1695 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateType() *ChargeFlatFeeRunUpsertBulk", + "line": 1702 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunUpsertBulk", + "line": 1709 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateServicePeriodFrom() *ChargeFlatFeeRunUpsertBulk", + "line": 1716 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunUpsertBulk", + "line": 1723 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateServicePeriodTo() *ChargeFlatFeeRunUpsertBulk", + "line": 1730 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetLineID(v string) *ChargeFlatFeeRunUpsertBulk", + "line": 1737 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateLineID() *ChargeFlatFeeRunUpsertBulk", + "line": 1744 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) ClearLineID() *ChargeFlatFeeRunUpsertBulk", + "line": 1751 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetInvoiceID(v string) *ChargeFlatFeeRunUpsertBulk", + "line": 1758 + }, + { + "kind": "func", + "name": "UpdateInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateInvoiceID() *ChargeFlatFeeRunUpsertBulk", + "line": 1765 + }, + { + "kind": "func", + "name": "ClearInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) ClearInvoiceID() *ChargeFlatFeeRunUpsertBulk", + "line": 1772 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpsertBulk", + "line": 1779 + }, + { + "kind": "func", + "name": "UpdateAmountAfterProration", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateAmountAfterProration() *ChargeFlatFeeRunUpsertBulk", + "line": 1786 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunUpsertBulk", + "line": 1793 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateNoFiatTransactionRequired() *ChargeFlatFeeRunUpsertBulk", + "line": 1800 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) SetImmutable(v bool) *ChargeFlatFeeRunUpsertBulk", + "line": 1807 + }, + { + "kind": "func", + "name": "UpdateImmutable", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) UpdateImmutable() *ChargeFlatFeeRunUpsertBulk", + "line": 1814 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) Exec(ctx context.Context) error", + "line": 1821 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunUpsertBulk) ExecX(ctx context.Context)", + "line": 1837 + } + ], + "line_count": 1841 + }, + "openmeter/ent/db/chargeflatfeerun_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDelete", + "signature": "type ChargeFlatFeeRunDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunDelete) Where(ps ...predicate.ChargeFlatFeeRun) *ChargeFlatFeeRunDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeRunDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDeleteOne", + "signature": "type ChargeFlatFeeRunDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunDeleteOne) Where(ps ...predicate.ChargeFlatFeeRun) *ChargeFlatFeeRunDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfeerun_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunQuery", + "signature": "type ChargeFlatFeeRunQuery struct", + "line": 28 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeRunQuery) Where(ps ...predicate.ChargeFlatFeeRun) *ChargeFlatFeeRunQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeRunQuery) Limit(limit int) *ChargeFlatFeeRunQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeRunQuery) Offset(offset int) *ChargeFlatFeeRunQuery", + "line": 60 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeRunQuery) Unique(unique bool) *ChargeFlatFeeRunQuery", + "line": 67 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeRunQuery) Order(o ...chargeflatfeerun.OrderOption) *ChargeFlatFeeRunQuery", + "line": 73 + }, + { + "kind": "func", + "name": "QueryFlatFee", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryFlatFee() *ChargeFlatFeeQuery", + "line": 79 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 101 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 123 + }, + { + "kind": "func", + "name": "QueryCreditAllocations", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryCreditAllocations() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 145 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryDetailedLines() *ChargeFlatFeeRunDetailedLineQuery", + "line": 167 + }, + { + "kind": "func", + "name": "QueryInvoicedUsage", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryInvoicedUsage() *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 189 + }, + { + "kind": "func", + "name": "QueryPayment", + "signature": "func (_q *ChargeFlatFeeRunQuery) QueryPayment() *ChargeFlatFeeRunPaymentQuery", + "line": 211 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeRunQuery) First(ctx context.Context) (*ChargeFlatFeeRun, error)", + "line": 234 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeRunQuery) FirstX(ctx context.Context) *ChargeFlatFeeRun", + "line": 246 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeRunQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeRunQuery) FirstIDX(ctx context.Context) string", + "line": 269 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeRunQuery) Only(ctx context.Context) (*ChargeFlatFeeRun, error)", + "line": 280 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeRunQuery) OnlyX(ctx context.Context) *ChargeFlatFeeRun", + "line": 296 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeRunQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 307 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeRunQuery) OnlyIDX(ctx context.Context) string", + "line": 324 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeRunQuery) All(ctx context.Context) ([]*ChargeFlatFeeRun, error)", + "line": 333 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeRunQuery) AllX(ctx context.Context) []*ChargeFlatFeeRun", + "line": 343 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeRunQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 352 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeRunQuery) IDsX(ctx context.Context) []string", + "line": 364 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeRunQuery) Count(ctx context.Context) (int, error)", + "line": 373 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeRunQuery) CountX(ctx context.Context) int", + "line": 382 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeRunQuery) Exist(ctx context.Context) (bool, error)", + "line": 391 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeRunQuery) ExistX(ctx context.Context) bool", + "line": 404 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeRunQuery) Clone() *ChargeFlatFeeRunQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithFlatFee", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithFlatFee(opts ...func(*ChargeFlatFeeQuery)) *ChargeFlatFeeRunQuery", + "line": 439 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *ChargeFlatFeeRunQuery", + "line": 450 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *ChargeFlatFeeRunQuery", + "line": 461 + }, + { + "kind": "func", + "name": "WithCreditAllocations", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithCreditAllocations(opts ...func(*ChargeFlatFeeRunCreditAllocationsQuery)) *ChargeFlatFeeRunQuery", + "line": 472 + }, + { + "kind": "func", + "name": "WithDetailedLines", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithDetailedLines(opts ...func(*ChargeFlatFeeRunDetailedLineQuery)) *ChargeFlatFeeRunQuery", + "line": 483 + }, + { + "kind": "func", + "name": "WithInvoicedUsage", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithInvoicedUsage(opts ...func(*ChargeFlatFeeRunInvoicedUsageQuery)) *ChargeFlatFeeRunQuery", + "line": 494 + }, + { + "kind": "func", + "name": "WithPayment", + "signature": "func (_q *ChargeFlatFeeRunQuery) WithPayment(opts ...func(*ChargeFlatFeeRunPaymentQuery)) *ChargeFlatFeeRunQuery", + "line": 505 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeRunQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeRunGroupBy", + "line": 528 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeRunQuery) Select(fields ...string) *ChargeFlatFeeRunSelect", + "line": 549 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeRunQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunSelect", + "line": 558 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeRunQuery) prepareQuery(ctx context.Context) error", + "line": 562 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeRunQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFeeRun, error)", + "line": 588 + }, + { + "kind": "func", + "name": "loadFlatFee", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *ChargeFlatFee)) error", + "line": 674 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *BillingInvoiceLine)) error", + "line": 703 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *BillingInvoice)) error", + "line": 735 + }, + { + "kind": "func", + "name": "loadCreditAllocations", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadCreditAllocations(ctx context.Context, query *ChargeFlatFeeRunCreditAllocationsQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *ChargeFlatFeeRunCreditAllocations)) error", + "line": 767 + }, + { + "kind": "func", + "name": "loadDetailedLines", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadDetailedLines(ctx context.Context, query *ChargeFlatFeeRunDetailedLineQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *ChargeFlatFeeRunDetailedLine)) error", + "line": 797 + }, + { + "kind": "func", + "name": "loadInvoicedUsage", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadInvoicedUsage(ctx context.Context, query *ChargeFlatFeeRunInvoicedUsageQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *ChargeFlatFeeRunInvoicedUsage)) error", + "line": 827 + }, + { + "kind": "func", + "name": "loadPayment", + "signature": "func (_q *ChargeFlatFeeRunQuery) loadPayment(ctx context.Context, query *ChargeFlatFeeRunPaymentQuery, nodes []*ChargeFlatFeeRun, init func(*ChargeFlatFeeRun), assign func(*ChargeFlatFeeRun, *ChargeFlatFeeRunPayment)) error", + "line": 854 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeRunQuery) sqlCount(ctx context.Context) (int, error)", + "line": 882 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeRunQuery) querySpec() *sqlgraph.QuerySpec", + "line": 894 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeRunQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 943 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeRunQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeRunQuery", + "line": 981 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeRunQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeRunQuery", + "line": 994 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunGroupBy", + "signature": "type ChargeFlatFeeRunGroupBy struct", + "line": 1005 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeRunGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunGroupBy", + "line": 1011 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeRunGroupBy) Scan(ctx context.Context, v any) error", + "line": 1017 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeRunGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeRunQuery, v any) error", + "line": 1025 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunSelect", + "signature": "type ChargeFlatFeeRunSelect struct", + "line": 1053 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeRunSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunSelect", + "line": 1059 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeRunSelect) Scan(ctx context.Context, v any) error", + "line": 1065 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeRunSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeRunQuery, v any) error", + "line": 1073 + } + ], + "line_count": 1092 + }, + "openmeter/ent/db/chargeflatfeerun_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunUpdate", + "signature": "type ChargeFlatFeeRunUpdate struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunUpdate) Where(ps ...predicate.ChargeFlatFeeRun) *ChargeFlatFeeRunUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearDeletedAt() *ChargeFlatFeeRunUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 170 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableType(v *flatfee.RealizationRunType) *ChargeFlatFeeRunUpdate", + "line": 184 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunUpdate", + "line": 192 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunUpdate", + "line": 198 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunUpdate", + "line": 206 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetLineID(v string) *ChargeFlatFeeRunUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableLineID(v *string) *ChargeFlatFeeRunUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearLineID() *ChargeFlatFeeRunUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetInvoiceID(v string) *ChargeFlatFeeRunUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableInvoiceID(v *string) *ChargeFlatFeeRunUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "ClearInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearInvoiceID() *ChargeFlatFeeRunUpdate", + "line": 254 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 260 + }, + { + "kind": "func", + "name": "SetNillableAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableAmountAfterProration(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdate", + "line": 266 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "SetNillableNoFiatTransactionRequired", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableNoFiatTransactionRequired(v *bool) *ChargeFlatFeeRunUpdate", + "line": 280 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetImmutable(v bool) *ChargeFlatFeeRunUpdate", + "line": 288 + }, + { + "kind": "func", + "name": "SetNillableImmutable", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableImmutable(v *bool) *ChargeFlatFeeRunUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunUpdate", + "line": 302 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunUpdate", + "line": 308 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetBillingInvoiceID(id string) *ChargeFlatFeeRunUpdate", + "line": 321 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableBillingInvoiceID(id *string) *ChargeFlatFeeRunUpdate", + "line": 327 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetBillingInvoice(v *BillingInvoice) *ChargeFlatFeeRunUpdate", + "line": 335 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdate) AddCreditAllocationIDs(ids ...string) *ChargeFlatFeeRunUpdate", + "line": 340 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdate) AddCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunUpdate", + "line": 346 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdate) AddDetailedLineIDs(ids ...string) *ChargeFlatFeeRunUpdate", + "line": 355 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdate) AddDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunUpdate", + "line": 361 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetInvoicedUsageID(id string) *ChargeFlatFeeRunUpdate", + "line": 370 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillableInvoicedUsageID(id *string) *ChargeFlatFeeRunUpdate", + "line": 376 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetInvoicedUsage(v *ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunUpdate", + "line": 384 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetPaymentID(id string) *ChargeFlatFeeRunUpdate", + "line": 389 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetNillablePaymentID(id *string) *ChargeFlatFeeRunUpdate", + "line": 395 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SetPayment(v *ChargeFlatFeeRunPayment) *ChargeFlatFeeRunUpdate", + "line": 403 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunUpdate) Mutation() *ChargeFlatFeeRunMutation", + "line": 408 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearBillingInvoiceLine() *ChargeFlatFeeRunUpdate", + "line": 413 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearBillingInvoice() *ChargeFlatFeeRunUpdate", + "line": 419 + }, + { + "kind": "func", + "name": "ClearCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearCreditAllocations() *ChargeFlatFeeRunUpdate", + "line": 425 + }, + { + "kind": "func", + "name": "RemoveCreditAllocationIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdate) RemoveCreditAllocationIDs(ids ...string) *ChargeFlatFeeRunUpdate", + "line": 431 + }, + { + "kind": "func", + "name": "RemoveCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdate) RemoveCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunUpdate", + "line": 437 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearDetailedLines() *ChargeFlatFeeRunUpdate", + "line": 446 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdate) RemoveDetailedLineIDs(ids ...string) *ChargeFlatFeeRunUpdate", + "line": 452 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdate) RemoveDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunUpdate", + "line": 458 + }, + { + "kind": "func", + "name": "ClearInvoicedUsage", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearInvoicedUsage() *ChargeFlatFeeRunUpdate", + "line": 467 + }, + { + "kind": "func", + "name": "ClearPayment", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ClearPayment() *ChargeFlatFeeRunUpdate", + "line": 473 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunUpdate) Save(ctx context.Context) (int, error)", + "line": 479 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunUpdate) SaveX(ctx context.Context) int", + "line": 485 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunUpdate) Exec(ctx context.Context) error", + "line": 494 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunUpdate) ExecX(ctx context.Context)", + "line": 500 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunUpdate) defaults()", + "line": 507 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunUpdate) check() error", + "line": 515 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 537 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunUpdateOne", + "signature": "type ChargeFlatFeeRunUpdateOne struct", + "line": 819 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 833 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 839 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearDeletedAt() *ChargeFlatFeeRunUpdateOne", + "line": 847 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 853 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 859 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 867 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 873 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 881 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 887 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 895 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 901 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 909 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 915 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 923 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 929 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 937 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 943 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 951 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 957 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetType(v flatfee.RealizationRunType) *ChargeFlatFeeRunUpdateOne", + "line": 965 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableType(v *flatfee.RealizationRunType) *ChargeFlatFeeRunUpdateOne", + "line": 971 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 979 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 985 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 993 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 999 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetLineID(v string) *ChargeFlatFeeRunUpdateOne", + "line": 1007 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableLineID(v *string) *ChargeFlatFeeRunUpdateOne", + "line": 1013 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearLineID() *ChargeFlatFeeRunUpdateOne", + "line": 1021 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetInvoiceID(v string) *ChargeFlatFeeRunUpdateOne", + "line": 1027 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableInvoiceID(v *string) *ChargeFlatFeeRunUpdateOne", + "line": 1033 + }, + { + "kind": "func", + "name": "ClearInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearInvoiceID() *ChargeFlatFeeRunUpdateOne", + "line": 1041 + }, + { + "kind": "func", + "name": "SetAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetAmountAfterProration(v alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 1047 + }, + { + "kind": "func", + "name": "SetNillableAmountAfterProration", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableAmountAfterProration(v *alpacadecimal.Decimal) *ChargeFlatFeeRunUpdateOne", + "line": 1053 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNoFiatTransactionRequired(v bool) *ChargeFlatFeeRunUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "SetNillableNoFiatTransactionRequired", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableNoFiatTransactionRequired(v *bool) *ChargeFlatFeeRunUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "SetImmutable", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetImmutable(v bool) *ChargeFlatFeeRunUpdateOne", + "line": 1075 + }, + { + "kind": "func", + "name": "SetNillableImmutable", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableImmutable(v *bool) *ChargeFlatFeeRunUpdateOne", + "line": 1081 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunUpdateOne", + "line": 1089 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunUpdateOne", + "line": 1103 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetBillingInvoiceID(id string) *ChargeFlatFeeRunUpdateOne", + "line": 1108 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableBillingInvoiceID(id *string) *ChargeFlatFeeRunUpdateOne", + "line": 1114 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetBillingInvoice(v *BillingInvoice) *ChargeFlatFeeRunUpdateOne", + "line": 1122 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) AddCreditAllocationIDs(ids ...string) *ChargeFlatFeeRunUpdateOne", + "line": 1127 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) AddCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunUpdateOne", + "line": 1133 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) AddDetailedLineIDs(ids ...string) *ChargeFlatFeeRunUpdateOne", + "line": 1142 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) AddDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunUpdateOne", + "line": 1148 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetInvoicedUsageID(id string) *ChargeFlatFeeRunUpdateOne", + "line": 1157 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillableInvoicedUsageID(id *string) *ChargeFlatFeeRunUpdateOne", + "line": 1163 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetInvoicedUsage(v *ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunUpdateOne", + "line": 1171 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetPaymentID(id string) *ChargeFlatFeeRunUpdateOne", + "line": 1176 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetNillablePaymentID(id *string) *ChargeFlatFeeRunUpdateOne", + "line": 1182 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SetPayment(v *ChargeFlatFeeRunPayment) *ChargeFlatFeeRunUpdateOne", + "line": 1190 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) Mutation() *ChargeFlatFeeRunMutation", + "line": 1195 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearBillingInvoiceLine() *ChargeFlatFeeRunUpdateOne", + "line": 1200 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearBillingInvoice() *ChargeFlatFeeRunUpdateOne", + "line": 1206 + }, + { + "kind": "func", + "name": "ClearCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearCreditAllocations() *ChargeFlatFeeRunUpdateOne", + "line": 1212 + }, + { + "kind": "func", + "name": "RemoveCreditAllocationIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) RemoveCreditAllocationIDs(ids ...string) *ChargeFlatFeeRunUpdateOne", + "line": 1218 + }, + { + "kind": "func", + "name": "RemoveCreditAllocations", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) RemoveCreditAllocations(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunUpdateOne", + "line": 1224 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearDetailedLines() *ChargeFlatFeeRunUpdateOne", + "line": 1233 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) RemoveDetailedLineIDs(ids ...string) *ChargeFlatFeeRunUpdateOne", + "line": 1239 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) RemoveDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunUpdateOne", + "line": 1245 + }, + { + "kind": "func", + "name": "ClearInvoicedUsage", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearInvoicedUsage() *ChargeFlatFeeRunUpdateOne", + "line": 1254 + }, + { + "kind": "func", + "name": "ClearPayment", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ClearPayment() *ChargeFlatFeeRunUpdateOne", + "line": 1260 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) Where(ps ...predicate.ChargeFlatFeeRun) *ChargeFlatFeeRunUpdateOne", + "line": 1266 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeRunUpdateOne", + "line": 1273 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) Save(ctx context.Context) (*ChargeFlatFeeRun, error)", + "line": 1279 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) SaveX(ctx context.Context) *ChargeFlatFeeRun", + "line": 1285 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) Exec(ctx context.Context) error", + "line": 1294 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) ExecX(ctx context.Context)", + "line": 1300 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) defaults()", + "line": 1307 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) check() error", + "line": 1315 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFeeRun, err error)", + "line": 1337 + } + ], + "line_count": 1636 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocations", + "signature": "type ChargeFlatFeeRunCreditAllocations struct", + "line": 22 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsEdges", + "signature": "type ChargeFlatFeeRunCreditAllocationsEdges struct", + "line": 61 + }, + { + "kind": "func", + "name": "CorrectionsOrErr", + "signature": "func (e ChargeFlatFeeRunCreditAllocationsEdges) CorrectionsOrErr() ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 77 + }, + { + "kind": "func", + "name": "AllocationOrErr", + "signature": "func (e ChargeFlatFeeRunCreditAllocationsEdges) AllocationOrErr() (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 86 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeFlatFeeRunCreditAllocationsEdges) RunOrErr() (*ChargeFlatFeeRun, error)", + "line": 97 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e ChargeFlatFeeRunCreditAllocationsEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 108 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) assignValues(columns []string, values []any) error", + "line": 141 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) Value(name string) (ent.Value, error)", + "line": 251 + }, + { + "kind": "func", + "name": "QueryCorrections", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) QueryCorrections() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 256 + }, + { + "kind": "func", + "name": "QueryAllocation", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) QueryAllocation() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 261 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) QueryRun() *ChargeFlatFeeRunQuery", + "line": 266 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 271 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) Update() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 278 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) Unwrap() *ChargeFlatFeeRunCreditAllocations", + "line": 284 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocations) String() string", + "line": 294 + } + ], + "line_count": 350 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations/chargeflatfeeruncreditallocations.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 101 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type creditrealization.Type) error", + "line": 130 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 158 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "ByLedgerTransactionGroupID", + "signature": "func ByLedgerTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "BySortHint", + "signature": "func BySortHint(opts ...sql.OrderTermOption) OrderOption", + "line": 173 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByCorrectsRealizationID", + "signature": "func ByCorrectsRealizationID(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 193 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 198 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 203 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 208 + }, + { + "kind": "func", + "name": "ByCorrectionsCount", + "signature": "func ByCorrectionsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 213 + }, + { + "kind": "func", + "name": "ByCorrections", + "signature": "func ByCorrections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 220 + }, + { + "kind": "func", + "name": "ByAllocationField", + "signature": "func ByAllocationField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 227 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 234 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "newCorrectionsStep", + "signature": "func newCorrectionsStep() *sqlgraph.Step", + "line": 246 + }, + { + "kind": "func", + "name": "newAllocationStep", + "signature": "func newAllocationStep() *sqlgraph.Step", + "line": 253 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 260 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 267 + } + ], + "line_count": 273 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 66 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 71 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 86 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupID", + "signature": "func LedgerTransactionGroupID(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 91 + }, + { + "kind": "func", + "name": "SortHint", + "signature": "func SortHint(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 96 + }, + { + "kind": "func", + "name": "CorrectsRealizationID", + "signature": "func CorrectsRealizationID(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 101 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 106 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 111 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 116 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 121 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 126 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 131 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 136 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 141 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 146 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 151 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 156 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 161 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 166 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 171 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 176 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 181 + }, + { + "kind": "func", + "name": "LineIDIsNil", + "signature": "func LineIDIsNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 186 + }, + { + "kind": "func", + "name": "LineIDNotNil", + "signature": "func LineIDNotNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 191 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 196 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 201 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 206 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 211 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 216 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 221 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 226 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 231 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 236 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 241 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 246 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 251 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 256 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 261 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 266 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 271 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 276 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 281 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 286 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 291 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 296 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 301 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 306 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 311 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 316 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 321 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEQ", + "signature": "func LedgerTransactionGroupIDEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 326 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNEQ", + "signature": "func LedgerTransactionGroupIDNEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 331 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIn", + "signature": "func LedgerTransactionGroupIDIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 336 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotIn", + "signature": "func LedgerTransactionGroupIDNotIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 341 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGT", + "signature": "func LedgerTransactionGroupIDGT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 346 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGTE", + "signature": "func LedgerTransactionGroupIDGTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 351 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLT", + "signature": "func LedgerTransactionGroupIDLT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 356 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLTE", + "signature": "func LedgerTransactionGroupIDLTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 361 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContains", + "signature": "func LedgerTransactionGroupIDContains(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 366 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasPrefix", + "signature": "func LedgerTransactionGroupIDHasPrefix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 371 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasSuffix", + "signature": "func LedgerTransactionGroupIDHasSuffix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 376 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEqualFold", + "signature": "func LedgerTransactionGroupIDEqualFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 381 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContainsFold", + "signature": "func LedgerTransactionGroupIDContainsFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 386 + }, + { + "kind": "func", + "name": "SortHintEQ", + "signature": "func SortHintEQ(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 391 + }, + { + "kind": "func", + "name": "SortHintNEQ", + "signature": "func SortHintNEQ(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 396 + }, + { + "kind": "func", + "name": "SortHintIn", + "signature": "func SortHintIn(vs ...int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 401 + }, + { + "kind": "func", + "name": "SortHintNotIn", + "signature": "func SortHintNotIn(vs ...int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 406 + }, + { + "kind": "func", + "name": "SortHintGT", + "signature": "func SortHintGT(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 411 + }, + { + "kind": "func", + "name": "SortHintGTE", + "signature": "func SortHintGTE(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 416 + }, + { + "kind": "func", + "name": "SortHintLT", + "signature": "func SortHintLT(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 421 + }, + { + "kind": "func", + "name": "SortHintLTE", + "signature": "func SortHintLTE(v int) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 426 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v creditrealization.Type) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 431 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v creditrealization.Type) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 437 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...creditrealization.Type) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 443 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...creditrealization.Type) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 452 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDEQ", + "signature": "func CorrectsRealizationIDEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 461 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNEQ", + "signature": "func CorrectsRealizationIDNEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 466 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDIn", + "signature": "func CorrectsRealizationIDIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 471 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNotIn", + "signature": "func CorrectsRealizationIDNotIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 476 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDGT", + "signature": "func CorrectsRealizationIDGT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 481 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDGTE", + "signature": "func CorrectsRealizationIDGTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 486 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDLT", + "signature": "func CorrectsRealizationIDLT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 491 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDLTE", + "signature": "func CorrectsRealizationIDLTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 496 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDContains", + "signature": "func CorrectsRealizationIDContains(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 501 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDHasPrefix", + "signature": "func CorrectsRealizationIDHasPrefix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 506 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDHasSuffix", + "signature": "func CorrectsRealizationIDHasSuffix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 511 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDIsNil", + "signature": "func CorrectsRealizationIDIsNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 516 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNotNil", + "signature": "func CorrectsRealizationIDNotNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 521 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDEqualFold", + "signature": "func CorrectsRealizationIDEqualFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 526 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDContainsFold", + "signature": "func CorrectsRealizationIDContainsFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 531 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 536 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 541 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 546 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 551 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 556 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 561 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 566 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 571 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 576 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 581 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 586 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 591 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 596 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 601 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 606 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 611 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 616 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 621 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 626 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 631 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 636 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 641 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 646 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 651 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 656 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 661 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 666 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 671 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 676 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 681 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 686 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 691 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 696 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 701 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 706 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 711 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 716 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 721 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 726 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 731 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 736 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 741 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 746 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 751 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 756 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 761 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 766 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 771 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 776 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 781 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 786 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 791 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 796 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 801 + }, + { + "kind": "func", + "name": "HasCorrections", + "signature": "func HasCorrections() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 806 + }, + { + "kind": "func", + "name": "HasCorrectionsWith", + "signature": "func HasCorrectionsWith(preds ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 817 + }, + { + "kind": "func", + "name": "HasAllocation", + "signature": "func HasAllocation() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 829 + }, + { + "kind": "func", + "name": "HasAllocationWith", + "signature": "func HasAllocationWith(preds ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 840 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 852 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 863 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.ChargeFlatFeeRunCreditAllocations", + "line": 875 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 886 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 898 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 903 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFeeRunCreditAllocations) predicate.ChargeFlatFeeRunCreditAllocations", + "line": 908 + } + ], + "line_count": 910 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsCreate", + "signature": "type ChargeFlatFeeRunCreditAllocationsCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableLineID(v *string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 52 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetType(v creditrealization.Type) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableCorrectsRealizationID(v *string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNamespace(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetRunID(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetID(v string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableID(v *string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 162 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) AddCorrectionIDs(ids ...string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 170 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) AddCorrections(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetAllocationID(id string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 185 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableAllocationID(id *string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 191 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetAllocation(v *ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 199 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetRun(v *ChargeFlatFeeRun) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 209 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 215 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunCreditAllocationsCreate", + "line": 223 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) Mutation() *ChargeFlatFeeRunCreditAllocationsMutation", + "line": 228 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) Save(ctx context.Context) (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 233 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) SaveX(ctx context.Context) *ChargeFlatFeeRunCreditAllocations", + "line": 239 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) Exec(ctx context.Context) error", + "line": 248 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) ExecX(ctx context.Context)", + "line": 254 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) defaults()", + "line": 261 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) check() error", + "line": 277 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) sqlSave(ctx context.Context) (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 339 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) createSpec() (*ChargeFlatFeeRunCreditAllocations, *sqlgraph.CreateSpec)", + "line": 362 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 502 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 515 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 536 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateLineID() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 542 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) ClearLineID() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 548 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 554 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateAmount() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 560 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 566 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateServicePeriodFrom() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 572 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 578 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateServicePeriodTo() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 584 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 590 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateSortHint() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 596 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) AddSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 602 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 608 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 614 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) ClearCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 620 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 626 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateUpdatedAt() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 632 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 638 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 644 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) ClearDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 650 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 656 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) UpdateAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 662 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsert) ClearAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsert", + "line": 668 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateNewValues() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 684 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) Ignore() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 715 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) DoNothing() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 722 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) Update(set func(*ChargeFlatFeeRunCreditAllocationsUpsert)) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 729 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 737 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateLineID() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 744 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ClearLineID() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 751 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateAmount() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 765 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateServicePeriodFrom() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 779 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 786 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateServicePeriodTo() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 793 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 800 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) AddSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateSortHint() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 814 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 821 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 828 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ClearCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 835 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 842 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 849 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 856 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 863 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ClearDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) UpdateAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ClearAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) Exec(ctx context.Context) error", + "line": 898 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ExecX(ctx context.Context)", + "line": 906 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 913 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertOne) IDX(ctx context.Context) string", + "line": 927 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsCreateBulk", + "signature": "type ChargeFlatFeeRunCreditAllocationsCreateBulk struct", + "line": 936 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 944 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFeeRunCreditAllocations", + "line": 1000 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) Exec(ctx context.Context) error", + "line": 1009 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) ExecX(ctx context.Context)", + "line": 1015 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1036 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunCreditAllocationsCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1049 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "signature": "type ChargeFlatFeeRunCreditAllocationsUpsertBulk struct", + "line": 1058 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateNewValues() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1073 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) Ignore() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1106 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) DoNothing() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1113 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) Update(set func(*ChargeFlatFeeRunCreditAllocationsUpsert)) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1120 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1128 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateLineID() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1135 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) ClearLineID() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1142 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1149 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateAmount() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1156 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1163 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateServicePeriodFrom() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1170 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1177 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateServicePeriodTo() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1184 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) AddSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateSortHint() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1212 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1219 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) ClearCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1226 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) ClearDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) UpdateAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) ClearAnnotations() *ChargeFlatFeeRunCreditAllocationsUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) Exec(ctx context.Context) error", + "line": 1289 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpsertBulk) ExecX(ctx context.Context)", + "line": 1305 + } + ], + "line_count": 1309 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsDelete", + "signature": "type ChargeFlatFeeRunCreditAllocationsDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDelete) Where(ps ...predicate.ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsDeleteOne", + "signature": "type ChargeFlatFeeRunCreditAllocationsDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDeleteOne) Where(ps ...predicate.ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunCreditAllocationsDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsQuery", + "signature": "type ChargeFlatFeeRunCreditAllocationsQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Where(ps ...predicate.ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Limit(limit int) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Offset(offset int) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Unique(unique bool) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Order(o ...chargeflatfeeruncreditallocations.OrderOption) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryCorrections", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) QueryCorrections() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryAllocation", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) QueryAllocation() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) QueryRun() *ChargeFlatFeeRunQuery", + "line": 115 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 137 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) First(ctx context.Context) (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) FirstX(ctx context.Context) *ChargeFlatFeeRunCreditAllocations", + "line": 172 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 182 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) FirstIDX(ctx context.Context) string", + "line": 195 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Only(ctx context.Context) (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 206 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) OnlyX(ctx context.Context) *ChargeFlatFeeRunCreditAllocations", + "line": 222 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 233 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) OnlyIDX(ctx context.Context) string", + "line": 250 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) All(ctx context.Context) ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 259 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) AllX(ctx context.Context) []*ChargeFlatFeeRunCreditAllocations", + "line": 269 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 278 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) IDsX(ctx context.Context) []string", + "line": 290 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Count(ctx context.Context) (int, error)", + "line": 299 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) CountX(ctx context.Context) int", + "line": 308 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Exist(ctx context.Context) (bool, error)", + "line": 317 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) ExistX(ctx context.Context) bool", + "line": 330 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Clone() *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 340 + }, + { + "kind": "func", + "name": "WithCorrections", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) WithCorrections(opts ...func(*ChargeFlatFeeRunCreditAllocationsQuery)) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 362 + }, + { + "kind": "func", + "name": "WithAllocation", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) WithAllocation(opts ...func(*ChargeFlatFeeRunCreditAllocationsQuery)) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 373 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) WithRun(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 384 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 395 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeRunCreditAllocationsGroupBy", + "line": 418 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Select(fields ...string) *ChargeFlatFeeRunCreditAllocationsSelect", + "line": 439 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunCreditAllocationsSelect", + "line": 448 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) prepareQuery(ctx context.Context) error", + "line": 452 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFeeRunCreditAllocations, error)", + "line": 478 + }, + { + "kind": "func", + "name": "loadCorrections", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) loadCorrections(ctx context.Context, query *ChargeFlatFeeRunCreditAllocationsQuery, nodes []*ChargeFlatFeeRunCreditAllocations, init func(*ChargeFlatFeeRunCreditAllocations), assign func(*ChargeFlatFeeRunCreditAllocations, *ChargeFlatFeeRunCreditAllocations)) error", + "line": 544 + }, + { + "kind": "func", + "name": "loadAllocation", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) loadAllocation(ctx context.Context, query *ChargeFlatFeeRunCreditAllocationsQuery, nodes []*ChargeFlatFeeRunCreditAllocations, init func(*ChargeFlatFeeRunCreditAllocations), assign func(*ChargeFlatFeeRunCreditAllocations, *ChargeFlatFeeRunCreditAllocations)) error", + "line": 577 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) loadRun(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFeeRunCreditAllocations, init func(*ChargeFlatFeeRunCreditAllocations), assign func(*ChargeFlatFeeRunCreditAllocations, *ChargeFlatFeeRun)) error", + "line": 609 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*ChargeFlatFeeRunCreditAllocations, init func(*ChargeFlatFeeRunCreditAllocations), assign func(*ChargeFlatFeeRunCreditAllocations, *BillingInvoiceLine)) error", + "line": 638 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) sqlCount(ctx context.Context) (int, error)", + "line": 671 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) querySpec() *sqlgraph.QuerySpec", + "line": 683 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 732 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 770 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeRunCreditAllocationsQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeRunCreditAllocationsQuery", + "line": 783 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsGroupBy", + "signature": "type ChargeFlatFeeRunCreditAllocationsGroupBy struct", + "line": 794 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeRunCreditAllocationsGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunCreditAllocationsGroupBy", + "line": 800 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeRunCreditAllocationsGroupBy) Scan(ctx context.Context, v any) error", + "line": 806 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeRunCreditAllocationsGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeRunCreditAllocationsQuery, v any) error", + "line": 814 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsSelect", + "signature": "type ChargeFlatFeeRunCreditAllocationsSelect struct", + "line": 842 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeRunCreditAllocationsSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunCreditAllocationsSelect", + "line": 848 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeRunCreditAllocationsSelect) Scan(ctx context.Context, v any) error", + "line": 854 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeRunCreditAllocationsSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeRunCreditAllocationsQuery, v any) error", + "line": 862 + } + ], + "line_count": 881 + }, + "openmeter/ent/db/chargeflatfeeruncreditallocations_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsUpdate", + "signature": "type ChargeFlatFeeRunCreditAllocationsUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) Where(ps ...predicate.ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableLineID(v *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearLineID() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableSortHint(v *int) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) AddSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableCorrectsRealizationID(v *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearAnnotations() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 170 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) AddCorrectionIDs(ids ...string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) AddCorrections(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetAllocationID(id string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableAllocationID(id *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetAllocation(v *ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 205 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 216 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 224 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) Mutation() *ChargeFlatFeeRunCreditAllocationsMutation", + "line": 229 + }, + { + "kind": "func", + "name": "ClearCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearCorrections() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "RemoveCorrectionIDs", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) RemoveCorrectionIDs(ids ...string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "RemoveCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) RemoveCorrections(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "ClearAllocation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearAllocation() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ClearBillingInvoiceLine() *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 261 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) Save(ctx context.Context) (int, error)", + "line": 267 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) SaveX(ctx context.Context) int", + "line": 273 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) Exec(ctx context.Context) error", + "line": 282 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) ExecX(ctx context.Context)", + "line": 288 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) defaults()", + "line": 295 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) check() error", + "line": 303 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 320 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocationsUpdateOne", + "signature": "type ChargeFlatFeeRunCreditAllocationsUpdateOne struct", + "line": 478 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetLineID(v string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 486 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableLineID(v *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 492 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearLineID() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 500 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 506 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 512 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 520 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 526 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 534 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 540 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 548 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableSortHint(v *int) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 555 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) AddSortHint(v int) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 563 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetCorrectsRealizationID(v string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 569 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableCorrectsRealizationID(v *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 575 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearCorrectsRealizationID() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 583 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 589 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 595 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 601 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearDeletedAt() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 609 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 615 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearAnnotations() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 621 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) AddCorrectionIDs(ids ...string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 627 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) AddCorrections(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 633 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetAllocationID(id string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 642 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableAllocationID(id *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 648 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetAllocation(v *ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 656 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 661 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetNillableBillingInvoiceLineID(id *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 667 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 675 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) Mutation() *ChargeFlatFeeRunCreditAllocationsMutation", + "line": 680 + }, + { + "kind": "func", + "name": "ClearCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearCorrections() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 685 + }, + { + "kind": "func", + "name": "RemoveCorrectionIDs", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) RemoveCorrectionIDs(ids ...string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 691 + }, + { + "kind": "func", + "name": "RemoveCorrections", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) RemoveCorrections(v ...*ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 697 + }, + { + "kind": "func", + "name": "ClearAllocation", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearAllocation() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 706 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ClearBillingInvoiceLine() *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 712 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) Where(ps ...predicate.ChargeFlatFeeRunCreditAllocations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 718 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 725 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) Save(ctx context.Context) (*ChargeFlatFeeRunCreditAllocations, error)", + "line": 731 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SaveX(ctx context.Context) *ChargeFlatFeeRunCreditAllocations", + "line": 737 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) Exec(ctx context.Context) error", + "line": 746 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) ExecX(ctx context.Context)", + "line": 752 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) defaults()", + "line": 759 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) check() error", + "line": 767 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunCreditAllocationsUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFeeRunCreditAllocations, err error)", + "line": 784 + } + ], + "line_count": 959 + }, + "openmeter/ent/db/chargeflatfeerundetailedline.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLine", + "signature": "type ChargeFlatFeeRunDetailedLine struct", + "line": 25 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineEdges", + "signature": "type ChargeFlatFeeRunDetailedLineEdges struct", + "line": 106 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeFlatFeeRunDetailedLineEdges) RunOrErr() (*ChargeFlatFeeRun, error)", + "line": 118 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e ChargeFlatFeeRunDetailedLineEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 129 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) assignValues(columns []string, values []any) error", + "line": 162 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) Value(name string) (ent.Value, error)", + "line": 389 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) QueryRun() *ChargeFlatFeeRunQuery", + "line": 394 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) QueryTaxCode() *TaxCodeQuery", + "line": 399 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) Update() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 406 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) Unwrap() *ChargeFlatFeeRunDetailedLine", + "line": 412 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFeeRunDetailedLine) String() string", + "line": 422 + } + ], + "line_count": 538 + }, + "openmeter/ent/db/chargeflatfeerundetailedline/chargeflatfeerundetailedline.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 141 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 175 + }, + { + "kind": "func", + "name": "CategoryValidator", + "signature": "func CategoryValidator(c stddetailedline.Category) error", + "line": 187 + }, + { + "kind": "func", + "name": "PaymentTermValidator", + "signature": "func PaymentTermValidator(pt productcatalog.PaymentTermType) error", + "line": 199 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 212 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 217 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 222 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 227 + }, + { + "kind": "func", + "name": "ByServicePeriodStart", + "signature": "func ByServicePeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 232 + }, + { + "kind": "func", + "name": "ByServicePeriodEnd", + "signature": "func ByServicePeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 237 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 242 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 247 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 252 + }, + { + "kind": "func", + "name": "ByPerUnitAmount", + "signature": "func ByPerUnitAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 257 + }, + { + "kind": "func", + "name": "ByCategory", + "signature": "func ByCategory(opts ...sql.OrderTermOption) OrderOption", + "line": 262 + }, + { + "kind": "func", + "name": "ByPaymentTerm", + "signature": "func ByPaymentTerm(opts ...sql.OrderTermOption) OrderOption", + "line": 267 + }, + { + "kind": "func", + "name": "ByIndex", + "signature": "func ByIndex(opts ...sql.OrderTermOption) OrderOption", + "line": 272 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 277 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 282 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 287 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 292 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 297 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 302 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 307 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 312 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 317 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 322 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 327 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 332 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 337 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 342 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 347 + }, + { + "kind": "func", + "name": "ByPricerReferenceID", + "signature": "func ByPricerReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 352 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 357 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 364 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 369 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 376 + } + ], + "line_count": 382 + }, + "openmeter/ent/db/chargeflatfeerundetailedline/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 18 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 23 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 28 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 33 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 38 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 43 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 48 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 53 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 58 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 63 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 68 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 73 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 79 + }, + { + "kind": "func", + "name": "ServicePeriodStart", + "signature": "func ServicePeriodStart(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 84 + }, + { + "kind": "func", + "name": "ServicePeriodEnd", + "signature": "func ServicePeriodEnd(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 89 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 94 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 99 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 104 + }, + { + "kind": "func", + "name": "PerUnitAmount", + "signature": "func PerUnitAmount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 109 + }, + { + "kind": "func", + "name": "Index", + "signature": "func Index(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 114 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 119 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 124 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 129 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 134 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 139 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 144 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 149 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 154 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 159 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 164 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 169 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 174 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 179 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 184 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 189 + }, + { + "kind": "func", + "name": "PricerReferenceID", + "signature": "func PricerReferenceID(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 194 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 199 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 205 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 211 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 220 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 229 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 235 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 241 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 247 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 253 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 259 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 265 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 271 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargeFlatFeeRunDetailedLine", + "line": 277 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 283 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 288 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 293 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 298 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 303 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 308 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 313 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 318 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 323 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 328 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 333 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 338 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 343 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 348 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 353 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 358 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 363 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargeFlatFeeRunDetailedLine", + "line": 368 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargeFlatFeeRunDetailedLine", + "line": 374 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargeFlatFeeRunDetailedLine", + "line": 380 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargeFlatFeeRunDetailedLine", + "line": 389 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 398 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 403 + }, + { + "kind": "func", + "name": "ServicePeriodStartEQ", + "signature": "func ServicePeriodStartEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 408 + }, + { + "kind": "func", + "name": "ServicePeriodStartNEQ", + "signature": "func ServicePeriodStartNEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 413 + }, + { + "kind": "func", + "name": "ServicePeriodStartIn", + "signature": "func ServicePeriodStartIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 418 + }, + { + "kind": "func", + "name": "ServicePeriodStartNotIn", + "signature": "func ServicePeriodStartNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 423 + }, + { + "kind": "func", + "name": "ServicePeriodStartGT", + "signature": "func ServicePeriodStartGT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 428 + }, + { + "kind": "func", + "name": "ServicePeriodStartGTE", + "signature": "func ServicePeriodStartGTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 433 + }, + { + "kind": "func", + "name": "ServicePeriodStartLT", + "signature": "func ServicePeriodStartLT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 438 + }, + { + "kind": "func", + "name": "ServicePeriodStartLTE", + "signature": "func ServicePeriodStartLTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 443 + }, + { + "kind": "func", + "name": "ServicePeriodEndEQ", + "signature": "func ServicePeriodEndEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 448 + }, + { + "kind": "func", + "name": "ServicePeriodEndNEQ", + "signature": "func ServicePeriodEndNEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 453 + }, + { + "kind": "func", + "name": "ServicePeriodEndIn", + "signature": "func ServicePeriodEndIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 458 + }, + { + "kind": "func", + "name": "ServicePeriodEndNotIn", + "signature": "func ServicePeriodEndNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 463 + }, + { + "kind": "func", + "name": "ServicePeriodEndGT", + "signature": "func ServicePeriodEndGT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 468 + }, + { + "kind": "func", + "name": "ServicePeriodEndGTE", + "signature": "func ServicePeriodEndGTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 473 + }, + { + "kind": "func", + "name": "ServicePeriodEndLT", + "signature": "func ServicePeriodEndLT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 478 + }, + { + "kind": "func", + "name": "ServicePeriodEndLTE", + "signature": "func ServicePeriodEndLTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 483 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 488 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 493 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 498 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 503 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 508 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 513 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 518 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 523 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 528 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 533 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 538 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 543 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 548 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 553 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 558 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 563 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 568 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 573 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 578 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 583 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 588 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 593 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 598 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 603 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 608 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 613 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 618 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 623 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 628 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 633 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 638 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 643 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 648 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 653 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 658 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 663 + }, + { + "kind": "func", + "name": "PerUnitAmountEQ", + "signature": "func PerUnitAmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 668 + }, + { + "kind": "func", + "name": "PerUnitAmountNEQ", + "signature": "func PerUnitAmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 673 + }, + { + "kind": "func", + "name": "PerUnitAmountIn", + "signature": "func PerUnitAmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 678 + }, + { + "kind": "func", + "name": "PerUnitAmountNotIn", + "signature": "func PerUnitAmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 683 + }, + { + "kind": "func", + "name": "PerUnitAmountGT", + "signature": "func PerUnitAmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 688 + }, + { + "kind": "func", + "name": "PerUnitAmountGTE", + "signature": "func PerUnitAmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 693 + }, + { + "kind": "func", + "name": "PerUnitAmountLT", + "signature": "func PerUnitAmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 698 + }, + { + "kind": "func", + "name": "PerUnitAmountLTE", + "signature": "func PerUnitAmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 703 + }, + { + "kind": "func", + "name": "CategoryEQ", + "signature": "func CategoryEQ(v stddetailedline.Category) predicate.ChargeFlatFeeRunDetailedLine", + "line": 708 + }, + { + "kind": "func", + "name": "CategoryNEQ", + "signature": "func CategoryNEQ(v stddetailedline.Category) predicate.ChargeFlatFeeRunDetailedLine", + "line": 714 + }, + { + "kind": "func", + "name": "CategoryIn", + "signature": "func CategoryIn(vs ...stddetailedline.Category) predicate.ChargeFlatFeeRunDetailedLine", + "line": 720 + }, + { + "kind": "func", + "name": "CategoryNotIn", + "signature": "func CategoryNotIn(vs ...stddetailedline.Category) predicate.ChargeFlatFeeRunDetailedLine", + "line": 729 + }, + { + "kind": "func", + "name": "PaymentTermEQ", + "signature": "func PaymentTermEQ(v productcatalog.PaymentTermType) predicate.ChargeFlatFeeRunDetailedLine", + "line": 738 + }, + { + "kind": "func", + "name": "PaymentTermNEQ", + "signature": "func PaymentTermNEQ(v productcatalog.PaymentTermType) predicate.ChargeFlatFeeRunDetailedLine", + "line": 744 + }, + { + "kind": "func", + "name": "PaymentTermIn", + "signature": "func PaymentTermIn(vs ...productcatalog.PaymentTermType) predicate.ChargeFlatFeeRunDetailedLine", + "line": 750 + }, + { + "kind": "func", + "name": "PaymentTermNotIn", + "signature": "func PaymentTermNotIn(vs ...productcatalog.PaymentTermType) predicate.ChargeFlatFeeRunDetailedLine", + "line": 759 + }, + { + "kind": "func", + "name": "IndexEQ", + "signature": "func IndexEQ(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 768 + }, + { + "kind": "func", + "name": "IndexNEQ", + "signature": "func IndexNEQ(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 773 + }, + { + "kind": "func", + "name": "IndexIn", + "signature": "func IndexIn(vs ...int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 778 + }, + { + "kind": "func", + "name": "IndexNotIn", + "signature": "func IndexNotIn(vs ...int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 783 + }, + { + "kind": "func", + "name": "IndexGT", + "signature": "func IndexGT(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 788 + }, + { + "kind": "func", + "name": "IndexGTE", + "signature": "func IndexGTE(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 793 + }, + { + "kind": "func", + "name": "IndexLT", + "signature": "func IndexLT(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 798 + }, + { + "kind": "func", + "name": "IndexLTE", + "signature": "func IndexLTE(v int) predicate.ChargeFlatFeeRunDetailedLine", + "line": 803 + }, + { + "kind": "func", + "name": "IndexIsNil", + "signature": "func IndexIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 808 + }, + { + "kind": "func", + "name": "IndexNotNil", + "signature": "func IndexNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 813 + }, + { + "kind": "func", + "name": "CreditsAppliedIsNil", + "signature": "func CreditsAppliedIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 818 + }, + { + "kind": "func", + "name": "CreditsAppliedNotNil", + "signature": "func CreditsAppliedNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 823 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 828 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 833 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 838 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 843 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 848 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 853 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 858 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 863 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 868 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 873 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 878 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 883 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 888 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 893 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 898 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 903 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 908 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 913 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 918 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 923 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 928 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 933 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 938 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 943 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 948 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 953 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 958 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 963 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 968 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 973 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 978 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 983 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 988 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 993 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 998 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1003 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1008 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1013 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1018 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1023 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1028 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1033 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1038 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1043 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1048 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1053 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1058 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1063 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1068 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1073 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1078 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1083 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1088 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1093 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1098 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1103 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1108 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1113 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1118 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1123 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1128 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1133 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1138 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1143 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1148 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1153 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1158 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1163 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1168 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1173 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1178 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1183 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1188 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1193 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1198 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1203 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1208 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1213 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1218 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1223 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1228 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1233 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1238 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1243 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1248 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1253 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1258 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1263 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1268 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1273 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1278 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1283 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1288 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1293 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1298 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1303 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1308 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1313 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1318 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1323 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1328 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1333 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1338 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1343 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1348 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1353 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1358 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1363 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1368 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1373 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1378 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1383 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1388 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1393 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1398 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1403 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1408 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1413 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1418 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1423 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1428 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1433 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1438 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1443 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1448 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1453 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1458 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1463 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1468 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1473 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1478 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1483 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1488 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1493 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1498 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1503 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1508 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1513 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1518 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1523 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1528 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1533 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1538 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1543 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1548 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1553 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1558 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1563 + }, + { + "kind": "func", + "name": "PricerReferenceIDEQ", + "signature": "func PricerReferenceIDEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1568 + }, + { + "kind": "func", + "name": "PricerReferenceIDNEQ", + "signature": "func PricerReferenceIDNEQ(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1573 + }, + { + "kind": "func", + "name": "PricerReferenceIDIn", + "signature": "func PricerReferenceIDIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1578 + }, + { + "kind": "func", + "name": "PricerReferenceIDNotIn", + "signature": "func PricerReferenceIDNotIn(vs ...string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1583 + }, + { + "kind": "func", + "name": "PricerReferenceIDGT", + "signature": "func PricerReferenceIDGT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1588 + }, + { + "kind": "func", + "name": "PricerReferenceIDGTE", + "signature": "func PricerReferenceIDGTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1593 + }, + { + "kind": "func", + "name": "PricerReferenceIDLT", + "signature": "func PricerReferenceIDLT(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1598 + }, + { + "kind": "func", + "name": "PricerReferenceIDLTE", + "signature": "func PricerReferenceIDLTE(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1603 + }, + { + "kind": "func", + "name": "PricerReferenceIDContains", + "signature": "func PricerReferenceIDContains(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1608 + }, + { + "kind": "func", + "name": "PricerReferenceIDHasPrefix", + "signature": "func PricerReferenceIDHasPrefix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1613 + }, + { + "kind": "func", + "name": "PricerReferenceIDHasSuffix", + "signature": "func PricerReferenceIDHasSuffix(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1618 + }, + { + "kind": "func", + "name": "PricerReferenceIDEqualFold", + "signature": "func PricerReferenceIDEqualFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1623 + }, + { + "kind": "func", + "name": "PricerReferenceIDContainsFold", + "signature": "func PricerReferenceIDContainsFold(v string) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1628 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1633 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1644 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.ChargeFlatFeeRunDetailedLine", + "line": 1656 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1667 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFeeRunDetailedLine) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1679 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFeeRunDetailedLine) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1684 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFeeRunDetailedLine) predicate.ChargeFlatFeeRunDetailedLine", + "line": 1689 + } + ], + "line_count": 1691 + }, + "openmeter/ent/db/chargeflatfeerundetailedline_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineCreate", + "signature": "type ChargeFlatFeeRunDetailedLineCreate struct", + "line": 27 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetCurrency(v currencyx.Code) *ChargeFlatFeeRunDetailedLineCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableTaxCodeID(v *string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableInvoicingAppExternalID(v *string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 107 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineCreate", + "line": 127 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableCategory(v *stddetailedline.Category) *ChargeFlatFeeRunDetailedLineCreate", + "line": 133 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineCreate", + "line": 141 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineCreate", + "line": 147 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetIndex(v int) *ChargeFlatFeeRunDetailedLineCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableIndex(v *int) *ChargeFlatFeeRunDetailedLineCreate", + "line": 161 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNamespace(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 181 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 187 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 193 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 199 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 207 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 213 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 221 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunDetailedLineCreate", + "line": 227 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetName(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 235 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetDescription(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 241 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableDescription(v *string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 247 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 255 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 261 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 267 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 273 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 279 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 285 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 291 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineCreate", + "line": 297 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetRunID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 303 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 309 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetID(v string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 315 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetNillableID(v *string) *ChargeFlatFeeRunDetailedLineCreate", + "line": 321 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetRun(v *ChargeFlatFeeRun) *ChargeFlatFeeRunDetailedLineCreate", + "line": 329 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SetTaxCode(v *TaxCode) *ChargeFlatFeeRunDetailedLineCreate", + "line": 334 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) Mutation() *ChargeFlatFeeRunDetailedLineMutation", + "line": 339 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) Save(ctx context.Context) (*ChargeFlatFeeRunDetailedLine, error)", + "line": 344 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) SaveX(ctx context.Context) *ChargeFlatFeeRunDetailedLine", + "line": 350 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) Exec(ctx context.Context) error", + "line": 359 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) ExecX(ctx context.Context)", + "line": 365 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) defaults()", + "line": 372 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) check() error", + "line": 396 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) sqlSave(ctx context.Context) (*ChargeFlatFeeRunDetailedLine, error)", + "line": 514 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) createSpec() (*ChargeFlatFeeRunDetailedLine, *sqlgraph.CreateSpec)", + "line": 537 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 720 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 733 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 754 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxConfig() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 760 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearTaxConfig() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 766 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 772 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 778 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 784 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 790 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 796 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 802 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 808 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateServicePeriodStart() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 814 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateServicePeriodEnd() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 826 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 832 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateQuantity() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 838 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 844 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 850 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 856 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 862 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateChildUniqueReferenceID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 868 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 874 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdatePerUnitAmount() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 880 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 886 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateCategory() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 892 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 898 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdatePaymentTerm() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 904 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetIndex(v int) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 910 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateIndex() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 916 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) AddIndex(v int) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 922 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearIndex() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 928 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 934 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 940 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 946 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 952 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateAnnotations() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 958 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearAnnotations() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 964 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 970 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateMetadata() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 976 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearMetadata() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 982 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 988 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateUpdatedAt() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 994 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1000 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateDeletedAt() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1006 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearDeletedAt() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1012 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetName(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1018 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateName() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1024 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetDescription(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1030 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateDescription() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1036 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) ClearDescription() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1042 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1048 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateAmount() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1054 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1060 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxesTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1066 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1072 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1078 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1084 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1090 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1096 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateChargesTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1102 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1108 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateDiscountsTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1114 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1120 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateCreditsTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1126 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1132 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdateTotal() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1138 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1144 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsert) UpdatePricerReferenceID() *ChargeFlatFeeRunDetailedLineUpsert", + "line": 1150 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateNewValues() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1166 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) Ignore() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1194 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) DoNothing() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1201 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) Update(set func(*ChargeFlatFeeRunDetailedLineUpsert)) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1208 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1216 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxConfig() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1223 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearTaxConfig() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1230 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1237 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1244 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1251 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1258 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1265 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1272 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1279 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateServicePeriodStart() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1286 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1293 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateServicePeriodEnd() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1300 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateQuantity() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1314 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1321 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1328 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1335 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1342 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateChildUniqueReferenceID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1349 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1356 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdatePerUnitAmount() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1363 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1370 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateCategory() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1377 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1384 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdatePaymentTerm() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1391 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetIndex(v int) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1398 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) AddIndex(v int) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1405 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateIndex() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1412 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearIndex() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1419 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1426 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1433 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1440 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1447 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateAnnotations() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1454 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearAnnotations() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1461 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1468 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateMetadata() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1475 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearMetadata() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1482 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1489 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1496 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1503 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateDeletedAt() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1510 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearDeletedAt() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1517 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetName(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1524 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateName() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1531 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetDescription(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1538 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateDescription() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1545 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ClearDescription() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1552 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1559 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateAmount() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1566 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1573 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxesTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1580 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1587 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1594 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1601 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1608 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1615 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateChargesTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1622 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1629 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateDiscountsTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1636 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1643 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateCreditsTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1650 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1657 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdateTotal() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1664 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1671 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) UpdatePricerReferenceID() *ChargeFlatFeeRunDetailedLineUpsertOne", + "line": 1678 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) Exec(ctx context.Context) error", + "line": 1685 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ExecX(ctx context.Context)", + "line": 1693 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1700 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertOne) IDX(ctx context.Context) string", + "line": 1714 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineCreateBulk", + "signature": "type ChargeFlatFeeRunDetailedLineCreateBulk struct", + "line": 1723 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFeeRunDetailedLine, error)", + "line": 1731 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFeeRunDetailedLine", + "line": 1787 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) Exec(ctx context.Context) error", + "line": 1796 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) ExecX(ctx context.Context)", + "line": 1802 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1823 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunDetailedLineCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1836 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineUpsertBulk", + "signature": "type ChargeFlatFeeRunDetailedLineUpsertBulk struct", + "line": 1845 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateNewValues() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1860 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) Ignore() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1890 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) DoNothing() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1897 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) Update(set func(*ChargeFlatFeeRunDetailedLineUpsert)) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1904 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1912 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxConfig() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1919 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearTaxConfig() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1926 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1933 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1940 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearTaxCodeID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1947 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1954 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1961 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearTaxBehavior() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1968 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1975 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateServicePeriodStart() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1982 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1989 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateServicePeriodEnd() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 1996 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2003 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateQuantity() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2010 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2017 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2024 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2031 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2038 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateChildUniqueReferenceID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2045 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2052 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdatePerUnitAmount() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2059 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2066 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateCategory() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2073 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2080 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdatePaymentTerm() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2087 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetIndex(v int) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2094 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) AddIndex(v int) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2101 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateIndex() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2108 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearIndex() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2115 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2122 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2129 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearCreditsApplied() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2136 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2143 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateAnnotations() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2150 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearAnnotations() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2157 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2164 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateMetadata() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2171 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearMetadata() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2178 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2185 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2192 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2199 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2206 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearDeletedAt() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2213 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetName(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2220 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateName() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2227 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetDescription(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2234 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateDescription() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2241 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ClearDescription() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2248 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2255 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateAmount() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2262 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2269 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxesTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2276 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2283 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2290 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2297 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2304 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2311 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateChargesTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2318 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2325 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateDiscountsTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2332 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2339 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateCreditsTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2346 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2353 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdateTotal() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2360 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2367 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) UpdatePricerReferenceID() *ChargeFlatFeeRunDetailedLineUpsertBulk", + "line": 2374 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) Exec(ctx context.Context) error", + "line": 2381 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpsertBulk) ExecX(ctx context.Context)", + "line": 2397 + } + ], + "line_count": 2401 + }, + "openmeter/ent/db/chargeflatfeerundetailedline_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineDelete", + "signature": "type ChargeFlatFeeRunDetailedLineDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDelete) Where(ps ...predicate.ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunDetailedLineDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineDeleteOne", + "signature": "type ChargeFlatFeeRunDetailedLineDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDeleteOne) Where(ps ...predicate.ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunDetailedLineDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunDetailedLineDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfeerundetailedline_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineQuery", + "signature": "type ChargeFlatFeeRunDetailedLineQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Where(ps ...predicate.ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunDetailedLineQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Limit(limit int) *ChargeFlatFeeRunDetailedLineQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Offset(offset int) *ChargeFlatFeeRunDetailedLineQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Unique(unique bool) *ChargeFlatFeeRunDetailedLineQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Order(o ...chargeflatfeerundetailedline.OrderOption) *ChargeFlatFeeRunDetailedLineQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) QueryRun() *ChargeFlatFeeRunQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) QueryTaxCode() *TaxCodeQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) First(ctx context.Context) (*ChargeFlatFeeRunDetailedLine, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) FirstX(ctx context.Context) *ChargeFlatFeeRunDetailedLine", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) FirstIDX(ctx context.Context) string", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Only(ctx context.Context) (*ChargeFlatFeeRunDetailedLine, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) OnlyX(ctx context.Context) *ChargeFlatFeeRunDetailedLine", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) OnlyIDX(ctx context.Context) string", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) All(ctx context.Context) ([]*ChargeFlatFeeRunDetailedLine, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) AllX(ctx context.Context) []*ChargeFlatFeeRunDetailedLine", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) IDsX(ctx context.Context) []string", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Clone() *ChargeFlatFeeRunDetailedLineQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) WithRun(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeRunDetailedLineQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *ChargeFlatFeeRunDetailedLineQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeRunDetailedLineGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Select(fields ...string) *ChargeFlatFeeRunDetailedLineSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunDetailedLineSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFeeRunDetailedLine, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) loadRun(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFeeRunDetailedLine, init func(*ChargeFlatFeeRunDetailedLine), assign func(*ChargeFlatFeeRunDetailedLine, *ChargeFlatFeeRun)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*ChargeFlatFeeRunDetailedLine, init func(*ChargeFlatFeeRunDetailedLine), assign func(*ChargeFlatFeeRunDetailedLine, *TaxCode)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) sqlCount(ctx context.Context) (int, error)", + "line": 514 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) querySpec() *sqlgraph.QuerySpec", + "line": 526 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 572 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeRunDetailedLineQuery", + "line": 610 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeRunDetailedLineQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeRunDetailedLineQuery", + "line": 623 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineGroupBy", + "signature": "type ChargeFlatFeeRunDetailedLineGroupBy struct", + "line": 634 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeRunDetailedLineGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunDetailedLineGroupBy", + "line": 640 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeRunDetailedLineGroupBy) Scan(ctx context.Context, v any) error", + "line": 646 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeRunDetailedLineGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeRunDetailedLineQuery, v any) error", + "line": 654 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineSelect", + "signature": "type ChargeFlatFeeRunDetailedLineSelect struct", + "line": 682 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeRunDetailedLineSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunDetailedLineSelect", + "line": 688 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeRunDetailedLineSelect) Scan(ctx context.Context, v any) error", + "line": 694 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeRunDetailedLineSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeRunDetailedLineQuery, v any) error", + "line": 702 + } + ], + "line_count": 721 + }, + "openmeter/ent/db/chargeflatfeerundetailedline_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineUpdate", + "signature": "type ChargeFlatFeeRunDetailedLineUpdate struct", + "line": 25 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) Where(ps ...predicate.ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearTaxConfig() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxCodeID(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearTaxCodeID() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearTaxBehavior() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableServicePeriodStart(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableServicePeriodEnd(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableInvoicingAppExternalID(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 146 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 160 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableChildUniqueReferenceID(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 166 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 180 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableCategory(v *stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 194 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 208 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetIndex(v int) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 216 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableIndex(v *int) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 223 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) AddIndex(v int) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 231 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearIndex() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 237 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 243 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearCreditsApplied() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearAnnotations() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 261 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 267 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearMetadata() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 285 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 291 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearDeletedAt() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 299 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetName(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableName(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 311 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetDescription(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 319 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableDescription(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 325 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearDescription() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 333 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 339 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 345 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 353 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 359 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 367 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 373 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 381 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 387 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 395 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 401 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 409 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 415 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 423 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 429 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 437 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 443 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 451 + }, + { + "kind": "func", + "name": "SetNillablePricerReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetNillablePricerReferenceID(v *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 457 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SetTaxCode(v *TaxCode) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 465 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) Mutation() *ChargeFlatFeeRunDetailedLineMutation", + "line": 470 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ClearTaxCode() *ChargeFlatFeeRunDetailedLineUpdate", + "line": 475 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) Save(ctx context.Context) (int, error)", + "line": 481 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) SaveX(ctx context.Context) int", + "line": 487 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) Exec(ctx context.Context) error", + "line": 496 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) ExecX(ctx context.Context)", + "line": 502 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) defaults()", + "line": 509 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) check() error", + "line": 517 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 559 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLineUpdateOne", + "signature": "type ChargeFlatFeeRunDetailedLineUpdateOne struct", + "line": 724 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxConfig(v productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 732 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 738 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearTaxConfig() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 746 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxCodeID(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 752 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxCodeID(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 758 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearTaxCodeID() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 766 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 772 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 778 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearTaxBehavior() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetServicePeriodStart(v time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 792 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableServicePeriodStart(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 798 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetServicePeriodEnd(v time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 806 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableServicePeriodEnd(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 812 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetQuantity(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 820 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 826 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetInvoicingAppExternalID(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 834 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableInvoicingAppExternalID(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 840 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearInvoicingAppExternalID() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 848 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetChildUniqueReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 854 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableChildUniqueReferenceID(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 860 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 868 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 874 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetCategory(v stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 882 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableCategory(v *stddetailedline.Category) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 888 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 896 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 902 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetIndex(v int) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 910 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableIndex(v *int) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 917 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) AddIndex(v int) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 925 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearIndex() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 931 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 937 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearCreditsApplied() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 943 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 949 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearAnnotations() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 955 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetMetadata(v map[string]string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 961 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearMetadata() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 967 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 973 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 979 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 985 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearDeletedAt() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 993 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetName(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 999 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableName(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1005 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetDescription(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1013 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableDescription(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1019 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearDescription() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1027 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1033 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1039 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1047 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1053 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1075 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1081 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1089 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1103 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1109 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1117 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1123 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1131 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1137 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetPricerReferenceID(v string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1145 + }, + { + "kind": "func", + "name": "SetNillablePricerReferenceID", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetNillablePricerReferenceID(v *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1151 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SetTaxCode(v *TaxCode) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1159 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) Mutation() *ChargeFlatFeeRunDetailedLineMutation", + "line": 1164 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ClearTaxCode() *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1169 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) Where(ps ...predicate.ChargeFlatFeeRunDetailedLine) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1175 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 1182 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) Save(ctx context.Context) (*ChargeFlatFeeRunDetailedLine, error)", + "line": 1188 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) SaveX(ctx context.Context) *ChargeFlatFeeRunDetailedLine", + "line": 1194 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) Exec(ctx context.Context) error", + "line": 1203 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) ExecX(ctx context.Context)", + "line": 1209 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) defaults()", + "line": 1216 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) check() error", + "line": 1224 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunDetailedLineUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFeeRunDetailedLine, err error)", + "line": 1266 + } + ], + "line_count": 1448 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsage", + "signature": "type ChargeFlatFeeRunInvoicedUsage struct", + "line": 20 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageEdges", + "signature": "type ChargeFlatFeeRunInvoicedUsageEdges struct", + "line": 65 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeFlatFeeRunInvoicedUsageEdges) RunOrErr() (*ChargeFlatFeeRun, error)", + "line": 75 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) assignValues(columns []string, values []any) error", + "line": 106 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) Value(name string) (ent.Value, error)", + "line": 233 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) QueryRun() *ChargeFlatFeeRunQuery", + "line": 238 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) Update() *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 245 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) Unwrap() *ChargeFlatFeeRunInvoicedUsage", + "line": 251 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsage) String() string", + "line": 261 + } + ], + "line_count": 324 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage/chargeflatfeeruninvoicedusage.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 87 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByLedgerTransactionGroupID", + "signature": "func ByLedgerTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 205 + } + ], + "line_count": 211 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 65 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 70 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 75 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupID", + "signature": "func LedgerTransactionGroupID(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 80 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 85 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 90 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 95 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 100 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 105 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 110 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 115 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 120 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 125 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 130 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 135 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 140 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 145 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 150 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 155 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 160 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 165 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 170 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 175 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 180 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 185 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 190 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 195 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 200 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 205 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 210 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 215 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 220 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 225 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEQ", + "signature": "func LedgerTransactionGroupIDEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 230 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNEQ", + "signature": "func LedgerTransactionGroupIDNEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 235 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIn", + "signature": "func LedgerTransactionGroupIDIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 240 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotIn", + "signature": "func LedgerTransactionGroupIDNotIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 245 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGT", + "signature": "func LedgerTransactionGroupIDGT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 250 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGTE", + "signature": "func LedgerTransactionGroupIDGTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 255 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLT", + "signature": "func LedgerTransactionGroupIDLT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 260 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLTE", + "signature": "func LedgerTransactionGroupIDLTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 265 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContains", + "signature": "func LedgerTransactionGroupIDContains(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 270 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasPrefix", + "signature": "func LedgerTransactionGroupIDHasPrefix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 275 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasSuffix", + "signature": "func LedgerTransactionGroupIDHasSuffix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 280 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIsNil", + "signature": "func LedgerTransactionGroupIDIsNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 285 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotNil", + "signature": "func LedgerTransactionGroupIDNotNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 290 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEqualFold", + "signature": "func LedgerTransactionGroupIDEqualFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 295 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContainsFold", + "signature": "func LedgerTransactionGroupIDContainsFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 300 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 305 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 310 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 315 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 320 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 325 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 330 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 335 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 340 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 345 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 350 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 355 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 360 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 365 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 370 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 375 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 380 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 385 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 390 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 395 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 400 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 405 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 410 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 415 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 420 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 425 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 430 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 435 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 440 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 445 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 450 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 455 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 460 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 465 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 470 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 475 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 480 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 485 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 490 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 495 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 500 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 505 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 510 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 515 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 520 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 525 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 530 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 535 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 540 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 545 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 550 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 555 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 560 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 565 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 570 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 575 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 580 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 585 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 590 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 595 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 600 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 605 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 610 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 615 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 620 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 625 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 630 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 635 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 640 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 645 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 650 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 655 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 660 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 665 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 670 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 675 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 680 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 685 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 690 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 695 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 700 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 705 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 710 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 715 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 720 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 725 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 730 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 735 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 740 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 745 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 750 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 755 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 760 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 765 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 770 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 775 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 780 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 785 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 790 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 795 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 800 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 805 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 810 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 815 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 820 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 825 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 830 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 835 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 840 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 845 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 850 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 855 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 860 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 865 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 870 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 875 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 880 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 885 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 890 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 895 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 906 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFeeRunInvoicedUsage) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 918 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFeeRunInvoicedUsage) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 923 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFeeRunInvoicedUsage) predicate.ChargeFlatFeeRunInvoicedUsage", + "line": 928 + } + ], + "line_count": 930 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageCreate", + "signature": "type ChargeFlatFeeRunInvoicedUsageCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNillableLedgerTransactionGroupID(v *string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNamespace(v string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 134 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetRunID(v string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetID(v string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetNillableID(v *string) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SetRun(v *ChargeFlatFeeRun) *ChargeFlatFeeRunInvoicedUsageCreate", + "line": 178 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) Mutation() *ChargeFlatFeeRunInvoicedUsageMutation", + "line": 183 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) Save(ctx context.Context) (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 188 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) SaveX(ctx context.Context) *ChargeFlatFeeRunInvoicedUsage", + "line": 194 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) Exec(ctx context.Context) error", + "line": 203 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) ExecX(ctx context.Context)", + "line": 209 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) defaults()", + "line": 216 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) check() error", + "line": 232 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) sqlSave(ctx context.Context) (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 291 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) createSpec() (*ChargeFlatFeeRunInvoicedUsage, *sqlgraph.CreateSpec)", + "line": 314 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 424 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 458 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateServicePeriodFrom() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 464 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 470 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateServicePeriodTo() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 476 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 482 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 488 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) ClearLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 494 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 500 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateUpdatedAt() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 506 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 512 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 518 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) ClearDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 524 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 530 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 536 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) ClearAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 542 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 548 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateAmount() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 554 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 560 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateTaxesTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 566 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 572 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 578 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 584 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 590 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 596 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateChargesTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 602 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 608 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateDiscountsTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 614 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 620 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateCreditsTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 626 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 632 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsert) UpdateTotal() *ChargeFlatFeeRunInvoicedUsageUpsert", + "line": 638 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateNewValues() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 654 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) Ignore() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 679 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) DoNothing() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 686 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) Update(set func(*ChargeFlatFeeRunInvoicedUsageUpsert)) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 693 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 701 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateServicePeriodFrom() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 708 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 715 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateServicePeriodTo() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 722 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 729 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 736 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) ClearLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 764 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 771 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) ClearDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 778 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 785 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 792 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) ClearAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 799 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 806 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateAmount() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 813 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateTaxesTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 841 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateChargesTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 869 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 876 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateDiscountsTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 883 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateCreditsTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 897 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 904 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) UpdateTotal() *ChargeFlatFeeRunInvoicedUsageUpsertOne", + "line": 911 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) Exec(ctx context.Context) error", + "line": 918 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) ExecX(ctx context.Context)", + "line": 926 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 933 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertOne) IDX(ctx context.Context) string", + "line": 947 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageCreateBulk", + "signature": "type ChargeFlatFeeRunInvoicedUsageCreateBulk struct", + "line": 956 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 964 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFeeRunInvoicedUsage", + "line": 1020 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) Exec(ctx context.Context) error", + "line": 1029 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) ExecX(ctx context.Context)", + "line": 1035 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1056 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunInvoicedUsageCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1069 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "signature": "type ChargeFlatFeeRunInvoicedUsageUpsertBulk struct", + "line": 1078 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateNewValues() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1093 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) Ignore() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1120 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) DoNothing() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1127 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) Update(set func(*ChargeFlatFeeRunInvoicedUsageUpsert)) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1134 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1142 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateServicePeriodFrom() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1149 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateServicePeriodTo() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1163 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1170 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1177 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) ClearLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1184 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1212 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) ClearDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1219 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1226 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) ClearAnnotations() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateAmount() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateTaxesTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1289 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1296 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateChargesTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1310 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1317 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateDiscountsTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1324 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateCreditsTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1338 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1345 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) UpdateTotal() *ChargeFlatFeeRunInvoicedUsageUpsertBulk", + "line": 1352 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) Exec(ctx context.Context) error", + "line": 1359 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpsertBulk) ExecX(ctx context.Context)", + "line": 1375 + } + ], + "line_count": 1379 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageDelete", + "signature": "type ChargeFlatFeeRunInvoicedUsageDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDelete) Where(ps ...predicate.ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunInvoicedUsageDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageDeleteOne", + "signature": "type ChargeFlatFeeRunInvoicedUsageDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDeleteOne) Where(ps ...predicate.ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunInvoicedUsageDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunInvoicedUsageDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageQuery", + "signature": "type ChargeFlatFeeRunInvoicedUsageQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Where(ps ...predicate.ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Limit(limit int) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Offset(offset int) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Unique(unique bool) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Order(o ...chargeflatfeeruninvoicedusage.OrderOption) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) QueryRun() *ChargeFlatFeeRunQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) First(ctx context.Context) (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) FirstX(ctx context.Context) *ChargeFlatFeeRunInvoicedUsage", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Only(ctx context.Context) (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) OnlyX(ctx context.Context) *ChargeFlatFeeRunInvoicedUsage", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) All(ctx context.Context) ([]*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) AllX(ctx context.Context) []*ChargeFlatFeeRunInvoicedUsage", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Clone() *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) WithRun(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeRunInvoicedUsageGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Select(fields ...string) *ChargeFlatFeeRunInvoicedUsageSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunInvoicedUsageSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) loadRun(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFeeRunInvoicedUsage, init func(*ChargeFlatFeeRunInvoicedUsage), assign func(*ChargeFlatFeeRunInvoicedUsage, *ChargeFlatFeeRun)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeRunInvoicedUsageQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeRunInvoicedUsageQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageGroupBy", + "signature": "type ChargeFlatFeeRunInvoicedUsageGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeRunInvoicedUsageGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunInvoicedUsageGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeRunInvoicedUsageGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeRunInvoicedUsageGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeRunInvoicedUsageQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageSelect", + "signature": "type ChargeFlatFeeRunInvoicedUsageSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeRunInvoicedUsageSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunInvoicedUsageSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeRunInvoicedUsageSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeRunInvoicedUsageSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeRunInvoicedUsageQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/chargeflatfeeruninvoicedusage_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageUpdate", + "signature": "type ChargeFlatFeeRunInvoicedUsageUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) Where(ps ...predicate.ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableLedgerTransactionGroupID(v *string) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) ClearLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) ClearDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) ClearAnnotations() *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 224 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) Mutation() *ChargeFlatFeeRunInvoicedUsageMutation", + "line": 232 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) Save(ctx context.Context) (int, error)", + "line": 237 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) SaveX(ctx context.Context) int", + "line": 243 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) Exec(ctx context.Context) error", + "line": 252 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) ExecX(ctx context.Context)", + "line": 258 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) defaults()", + "line": 265 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) check() error", + "line": 273 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 285 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsageUpdateOne", + "signature": "type ChargeFlatFeeRunInvoicedUsageUpdateOne struct", + "line": 361 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 369 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 375 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 383 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 389 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetLedgerTransactionGroupID(v string) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 397 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableLedgerTransactionGroupID(v *string) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) ClearLedgerTransactionGroupID() *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 411 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 417 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 423 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) ClearDeletedAt() *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 443 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) ClearAnnotations() *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 469 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 483 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 489 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 497 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 503 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 511 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 517 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 525 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 531 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 539 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 545 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 553 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 559 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) Mutation() *ChargeFlatFeeRunInvoicedUsageMutation", + "line": 567 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) Where(ps ...predicate.ChargeFlatFeeRunInvoicedUsage) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 572 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 579 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) Save(ctx context.Context) (*ChargeFlatFeeRunInvoicedUsage, error)", + "line": 585 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SaveX(ctx context.Context) *ChargeFlatFeeRunInvoicedUsage", + "line": 591 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) Exec(ctx context.Context) error", + "line": 600 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) ExecX(ctx context.Context)", + "line": 606 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) defaults()", + "line": 613 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) check() error", + "line": 621 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunInvoicedUsageUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFeeRunInvoicedUsage, err error)", + "line": 633 + } + ], + "line_count": 726 + }, + "openmeter/ent/db/chargeflatfeerunpayment.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunPayment", + "signature": "type ChargeFlatFeeRunPayment struct", + "line": 22 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentEdges", + "signature": "type ChargeFlatFeeRunPaymentEdges struct", + "line": 65 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e ChargeFlatFeeRunPaymentEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 77 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeFlatFeeRunPaymentEdges) RunOrErr() (*ChargeFlatFeeRun, error)", + "line": 88 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeFlatFeeRunPayment) assignValues(columns []string, values []any) error", + "line": 119 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeFlatFeeRunPayment) Value(name string) (ent.Value, error)", + "line": 243 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *ChargeFlatFeeRunPayment) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 248 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeFlatFeeRunPayment) QueryRun() *ChargeFlatFeeRunQuery", + "line": 253 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeFlatFeeRunPayment) Update() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 260 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeFlatFeeRunPayment) Unwrap() *ChargeFlatFeeRunPayment", + "line": 266 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeFlatFeeRunPayment) String() string", + "line": 276 + } + ], + "line_count": 342 + }, + "openmeter/ent/db/chargeflatfeerunpayment/chargeflatfeerunpayment.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 95 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s payment.Status) error", + "line": 122 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByAuthorizedTransactionGroupID", + "signature": "func ByAuthorizedTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByAuthorizedAt", + "signature": "func ByAuthorizedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "BySettledTransactionGroupID", + "signature": "func BySettledTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "BySettledAt", + "signature": "func BySettledAt(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 205 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 210 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 215 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 222 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 227 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 234 + } + ], + "line_count": 240 + }, + "openmeter/ent/db/chargeflatfeerunpayment/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeFlatFeeRunPayment", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeFlatFeeRunPayment", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeFlatFeeRunPayment", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeFlatFeeRunPayment", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeFlatFeeRunPayment", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeFlatFeeRunPayment", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeFlatFeeRunPayment", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeFlatFeeRunPayment", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeFlatFeeRunPayment", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeFlatFeeRunPayment", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeFlatFeeRunPayment", + "line": 66 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeFlatFeeRunPayment", + "line": 71 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.ChargeFlatFeeRunPayment", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 91 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupID", + "signature": "func AuthorizedTransactionGroupID(v string) predicate.ChargeFlatFeeRunPayment", + "line": 96 + }, + { + "kind": "func", + "name": "AuthorizedAt", + "signature": "func AuthorizedAt(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 101 + }, + { + "kind": "func", + "name": "SettledTransactionGroupID", + "signature": "func SettledTransactionGroupID(v string) predicate.ChargeFlatFeeRunPayment", + "line": 106 + }, + { + "kind": "func", + "name": "SettledAt", + "signature": "func SettledAt(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 111 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeFlatFeeRunPayment", + "line": 116 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 121 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 126 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 131 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeFlatFeeRunPayment", + "line": 136 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 141 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 146 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 151 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 156 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 161 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 166 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 171 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 176 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 181 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 186 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 191 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 196 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 201 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 206 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 211 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 216 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 221 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 226 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 231 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 236 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 241 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 246 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 251 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 256 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 261 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 266 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 271 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 276 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 281 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 286 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 291 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 296 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 301 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 306 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 311 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 316 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 321 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 326 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 331 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 336 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 341 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 346 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v payment.Status) predicate.ChargeFlatFeeRunPayment", + "line": 351 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v payment.Status) predicate.ChargeFlatFeeRunPayment", + "line": 357 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...payment.Status) predicate.ChargeFlatFeeRunPayment", + "line": 363 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...payment.Status) predicate.ChargeFlatFeeRunPayment", + "line": 372 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 381 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 386 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 391 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 396 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 401 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 406 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 411 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeFlatFeeRunPayment", + "line": 416 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEQ", + "signature": "func AuthorizedTransactionGroupIDEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 421 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNEQ", + "signature": "func AuthorizedTransactionGroupIDNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 426 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIn", + "signature": "func AuthorizedTransactionGroupIDIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 431 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotIn", + "signature": "func AuthorizedTransactionGroupIDNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 436 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGT", + "signature": "func AuthorizedTransactionGroupIDGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 441 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGTE", + "signature": "func AuthorizedTransactionGroupIDGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 446 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLT", + "signature": "func AuthorizedTransactionGroupIDLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 451 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLTE", + "signature": "func AuthorizedTransactionGroupIDLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 456 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContains", + "signature": "func AuthorizedTransactionGroupIDContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 461 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasPrefix", + "signature": "func AuthorizedTransactionGroupIDHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 466 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasSuffix", + "signature": "func AuthorizedTransactionGroupIDHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 471 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIsNil", + "signature": "func AuthorizedTransactionGroupIDIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 476 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotNil", + "signature": "func AuthorizedTransactionGroupIDNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 481 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEqualFold", + "signature": "func AuthorizedTransactionGroupIDEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 486 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContainsFold", + "signature": "func AuthorizedTransactionGroupIDContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 491 + }, + { + "kind": "func", + "name": "AuthorizedAtEQ", + "signature": "func AuthorizedAtEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 496 + }, + { + "kind": "func", + "name": "AuthorizedAtNEQ", + "signature": "func AuthorizedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 501 + }, + { + "kind": "func", + "name": "AuthorizedAtIn", + "signature": "func AuthorizedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 506 + }, + { + "kind": "func", + "name": "AuthorizedAtNotIn", + "signature": "func AuthorizedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 511 + }, + { + "kind": "func", + "name": "AuthorizedAtGT", + "signature": "func AuthorizedAtGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 516 + }, + { + "kind": "func", + "name": "AuthorizedAtGTE", + "signature": "func AuthorizedAtGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 521 + }, + { + "kind": "func", + "name": "AuthorizedAtLT", + "signature": "func AuthorizedAtLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 526 + }, + { + "kind": "func", + "name": "AuthorizedAtLTE", + "signature": "func AuthorizedAtLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 531 + }, + { + "kind": "func", + "name": "AuthorizedAtIsNil", + "signature": "func AuthorizedAtIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 536 + }, + { + "kind": "func", + "name": "AuthorizedAtNotNil", + "signature": "func AuthorizedAtNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 541 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEQ", + "signature": "func SettledTransactionGroupIDEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 546 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNEQ", + "signature": "func SettledTransactionGroupIDNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 551 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIn", + "signature": "func SettledTransactionGroupIDIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 556 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotIn", + "signature": "func SettledTransactionGroupIDNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 561 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGT", + "signature": "func SettledTransactionGroupIDGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 566 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGTE", + "signature": "func SettledTransactionGroupIDGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 571 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLT", + "signature": "func SettledTransactionGroupIDLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 576 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLTE", + "signature": "func SettledTransactionGroupIDLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 581 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContains", + "signature": "func SettledTransactionGroupIDContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 586 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasPrefix", + "signature": "func SettledTransactionGroupIDHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 591 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasSuffix", + "signature": "func SettledTransactionGroupIDHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 596 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIsNil", + "signature": "func SettledTransactionGroupIDIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 601 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotNil", + "signature": "func SettledTransactionGroupIDNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 606 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEqualFold", + "signature": "func SettledTransactionGroupIDEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 611 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContainsFold", + "signature": "func SettledTransactionGroupIDContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 616 + }, + { + "kind": "func", + "name": "SettledAtEQ", + "signature": "func SettledAtEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 621 + }, + { + "kind": "func", + "name": "SettledAtNEQ", + "signature": "func SettledAtNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 626 + }, + { + "kind": "func", + "name": "SettledAtIn", + "signature": "func SettledAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 631 + }, + { + "kind": "func", + "name": "SettledAtNotIn", + "signature": "func SettledAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 636 + }, + { + "kind": "func", + "name": "SettledAtGT", + "signature": "func SettledAtGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 641 + }, + { + "kind": "func", + "name": "SettledAtGTE", + "signature": "func SettledAtGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 646 + }, + { + "kind": "func", + "name": "SettledAtLT", + "signature": "func SettledAtLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 651 + }, + { + "kind": "func", + "name": "SettledAtLTE", + "signature": "func SettledAtLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 656 + }, + { + "kind": "func", + "name": "SettledAtIsNil", + "signature": "func SettledAtIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 661 + }, + { + "kind": "func", + "name": "SettledAtNotNil", + "signature": "func SettledAtNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 666 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 671 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 676 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 681 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 686 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 691 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 696 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 701 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 706 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 711 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 716 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 721 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 726 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 731 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 736 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 741 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 746 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 751 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 756 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 761 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 766 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 771 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 776 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 781 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 786 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 791 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 796 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 801 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 806 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 811 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 816 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 821 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 826 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 831 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 836 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 841 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 846 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeFlatFeeRunPayment", + "line": 851 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 856 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 861 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeFlatFeeRunPayment", + "line": 866 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeFlatFeeRunPayment", + "line": 871 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 876 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeFlatFeeRunPayment", + "line": 881 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 886 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeFlatFeeRunPayment", + "line": 891 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 896 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 901 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeFlatFeeRunPayment", + "line": 906 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeFlatFeeRunPayment", + "line": 911 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeFlatFeeRunPayment", + "line": 916 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 921 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeFlatFeeRunPayment", + "line": 926 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 931 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeFlatFeeRunPayment", + "line": 936 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.ChargeFlatFeeRunPayment", + "line": 941 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.ChargeFlatFeeRunPayment", + "line": 952 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeFlatFeeRunPayment", + "line": 964 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeFlatFeeRun) predicate.ChargeFlatFeeRunPayment", + "line": 975 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeFlatFeeRunPayment) predicate.ChargeFlatFeeRunPayment", + "line": 987 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeFlatFeeRunPayment) predicate.ChargeFlatFeeRunPayment", + "line": 992 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeFlatFeeRunPayment) predicate.ChargeFlatFeeRunPayment", + "line": 997 + } + ], + "line_count": 999 + }, + "openmeter/ent/db/chargeflatfeerunpayment_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentCreate", + "signature": "type ChargeFlatFeeRunPaymentCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetLineID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetInvoiceID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableAuthorizedAt(v *time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableSettledTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableSettledAt(v *time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNamespace(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetCreatedAt(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableCreatedAt(v *time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableUpdatedAt(v *time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunPaymentCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetRunID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetID(v string) *ChargeFlatFeeRunPaymentCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetNillableID(v *string) *ChargeFlatFeeRunPaymentCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetBillingInvoiceLineID(id string) *ChargeFlatFeeRunPaymentCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeFlatFeeRunPaymentCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SetRun(v *ChargeFlatFeeRun) *ChargeFlatFeeRunPaymentCreate", + "line": 209 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) Mutation() *ChargeFlatFeeRunPaymentMutation", + "line": 214 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) Save(ctx context.Context) (*ChargeFlatFeeRunPayment, error)", + "line": 219 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) SaveX(ctx context.Context) *ChargeFlatFeeRunPayment", + "line": 225 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) Exec(ctx context.Context) error", + "line": 234 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) ExecX(ctx context.Context)", + "line": 240 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) defaults()", + "line": 247 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) check() error", + "line": 263 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) sqlSave(ctx context.Context) (*ChargeFlatFeeRunPayment, error)", + "line": 323 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) createSpec() (*ChargeFlatFeeRunPayment, *sqlgraph.CreateSpec)", + "line": 346 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 465 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreate) OnConflictColumns(columns ...string) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 478 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 499 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateServicePeriodFrom() *ChargeFlatFeeRunPaymentUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateServicePeriodTo() *ChargeFlatFeeRunPaymentUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateStatus() *ChargeFlatFeeRunPaymentUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpsert", + "line": 535 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateAmount() *ChargeFlatFeeRunPaymentUpsert", + "line": 541 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsert", + "line": 547 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsert", + "line": 553 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsert", + "line": 559 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 565 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateAuthorizedAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 571 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearAuthorizedAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 577 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsert", + "line": 583 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsert", + "line": 589 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsert", + "line": 595 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 601 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateSettledAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 607 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearSettledAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 613 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 619 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateUpdatedAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 625 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsert", + "line": 631 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateDeletedAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 637 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearDeletedAt() *ChargeFlatFeeRunPaymentUpsert", + "line": 643 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentUpsert", + "line": 649 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) UpdateAnnotations() *ChargeFlatFeeRunPaymentUpsert", + "line": 655 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsert) ClearAnnotations() *ChargeFlatFeeRunPaymentUpsert", + "line": 661 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateNewValues() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 677 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) Ignore() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 708 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) DoNothing() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 715 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) Update(set func(*ChargeFlatFeeRunPaymentUpsert)) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 722 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 730 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateServicePeriodFrom() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 737 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 744 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateServicePeriodTo() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 751 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateStatus() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 765 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateAmount() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 779 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 786 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 793 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 800 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateAuthorizedAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 814 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearAuthorizedAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 821 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 828 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 835 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 842 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 849 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateSettledAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 856 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearSettledAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 863 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateUpdatedAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateDeletedAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearDeletedAt() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 898 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentUpsertOne", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) UpdateAnnotations() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 912 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ClearAnnotations() *ChargeFlatFeeRunPaymentUpsertOne", + "line": 919 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) Exec(ctx context.Context) error", + "line": 926 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ExecX(ctx context.Context)", + "line": 934 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 941 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertOne) IDX(ctx context.Context) string", + "line": 955 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentCreateBulk", + "signature": "type ChargeFlatFeeRunPaymentCreateBulk struct", + "line": 964 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) Save(ctx context.Context) ([]*ChargeFlatFeeRunPayment, error)", + "line": 972 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) SaveX(ctx context.Context) []*ChargeFlatFeeRunPayment", + "line": 1028 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) Exec(ctx context.Context) error", + "line": 1037 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) ExecX(ctx context.Context)", + "line": 1043 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1064 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeFlatFeeRunPaymentCreateBulk) OnConflictColumns(columns ...string) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1077 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentUpsertBulk", + "signature": "type ChargeFlatFeeRunPaymentUpsertBulk struct", + "line": 1086 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateNewValues() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1101 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) Ignore() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1134 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) DoNothing() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1141 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) Update(set func(*ChargeFlatFeeRunPaymentUpsert)) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1148 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateServicePeriodFrom() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1163 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1170 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateServicePeriodTo() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1177 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1184 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateStatus() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateAmount() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1212 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1219 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1226 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateAuthorizedAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearAuthorizedAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateSettledAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearSettledAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1289 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1296 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateUpdatedAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1310 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateDeletedAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1317 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearDeletedAt() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1324 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) UpdateAnnotations() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1338 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ClearAnnotations() *ChargeFlatFeeRunPaymentUpsertBulk", + "line": 1345 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) Exec(ctx context.Context) error", + "line": 1352 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeFlatFeeRunPaymentUpsertBulk) ExecX(ctx context.Context)", + "line": 1368 + } + ], + "line_count": 1372 + }, + "openmeter/ent/db/chargeflatfeerunpayment_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentDelete", + "signature": "type ChargeFlatFeeRunPaymentDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunPaymentDelete) Where(ps ...predicate.ChargeFlatFeeRunPayment) *ChargeFlatFeeRunPaymentDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunPaymentDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunPaymentDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeFlatFeeRunPaymentDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentDeleteOne", + "signature": "type ChargeFlatFeeRunPaymentDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeFlatFeeRunPaymentDeleteOne) Where(ps ...predicate.ChargeFlatFeeRunPayment) *ChargeFlatFeeRunPaymentDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeFlatFeeRunPaymentDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeFlatFeeRunPaymentDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeflatfeerunpayment_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentQuery", + "signature": "type ChargeFlatFeeRunPaymentQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Where(ps ...predicate.ChargeFlatFeeRunPayment) *ChargeFlatFeeRunPaymentQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Limit(limit int) *ChargeFlatFeeRunPaymentQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Offset(offset int) *ChargeFlatFeeRunPaymentQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Unique(unique bool) *ChargeFlatFeeRunPaymentQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Order(o ...chargeflatfeerunpayment.OrderOption) *ChargeFlatFeeRunPaymentQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) QueryRun() *ChargeFlatFeeRunQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) First(ctx context.Context) (*ChargeFlatFeeRunPayment, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) FirstX(ctx context.Context) *ChargeFlatFeeRunPayment", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) FirstIDX(ctx context.Context) string", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Only(ctx context.Context) (*ChargeFlatFeeRunPayment, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) OnlyX(ctx context.Context) *ChargeFlatFeeRunPayment", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) OnlyIDX(ctx context.Context) string", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) All(ctx context.Context) ([]*ChargeFlatFeeRunPayment, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) AllX(ctx context.Context) []*ChargeFlatFeeRunPayment", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) IDsX(ctx context.Context) []string", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Clone() *ChargeFlatFeeRunPaymentQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *ChargeFlatFeeRunPaymentQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) WithRun(opts ...func(*ChargeFlatFeeRunQuery)) *ChargeFlatFeeRunPaymentQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) GroupBy(field string, fields ...string) *ChargeFlatFeeRunPaymentGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Select(fields ...string) *ChargeFlatFeeRunPaymentSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunPaymentSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeFlatFeeRunPayment, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*ChargeFlatFeeRunPayment, init func(*ChargeFlatFeeRunPayment), assign func(*ChargeFlatFeeRunPayment, *BillingInvoiceLine)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) loadRun(ctx context.Context, query *ChargeFlatFeeRunQuery, nodes []*ChargeFlatFeeRunPayment, init func(*ChargeFlatFeeRunPayment), assign func(*ChargeFlatFeeRunPayment, *ChargeFlatFeeRun)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) ForUpdate(opts ...sql.LockOption) *ChargeFlatFeeRunPaymentQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeFlatFeeRunPaymentQuery) ForShare(opts ...sql.LockOption) *ChargeFlatFeeRunPaymentQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentGroupBy", + "signature": "type ChargeFlatFeeRunPaymentGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeFlatFeeRunPaymentGroupBy) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunPaymentGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeFlatFeeRunPaymentGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeFlatFeeRunPaymentGroupBy) sqlScan(ctx context.Context, root *ChargeFlatFeeRunPaymentQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentSelect", + "signature": "type ChargeFlatFeeRunPaymentSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeFlatFeeRunPaymentSelect) Aggregate(fns ...AggregateFunc) *ChargeFlatFeeRunPaymentSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeFlatFeeRunPaymentSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeFlatFeeRunPaymentSelect) sqlScan(ctx context.Context, root *ChargeFlatFeeRunPaymentQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/chargeflatfeerunpayment_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentUpdate", + "signature": "type ChargeFlatFeeRunPaymentUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) Where(ps ...predicate.ChargeFlatFeeRunPayment) *ChargeFlatFeeRunPaymentUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableStatus(v *payment.Status) *ChargeFlatFeeRunPaymentUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableAuthorizedAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearAuthorizedAt() *ChargeFlatFeeRunPaymentUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableSettledTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpdate", + "line": 145 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 151 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableSettledAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearSettledAt() *ChargeFlatFeeRunPaymentUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 171 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearDeletedAt() *ChargeFlatFeeRunPaymentUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ClearAnnotations() *ChargeFlatFeeRunPaymentUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) Mutation() *ChargeFlatFeeRunPaymentMutation", + "line": 209 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) Save(ctx context.Context) (int, error)", + "line": 214 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) SaveX(ctx context.Context) int", + "line": 220 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) Exec(ctx context.Context) error", + "line": 229 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) ExecX(ctx context.Context)", + "line": 235 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) defaults()", + "line": 242 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) check() error", + "line": 250 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 275 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPaymentUpdateOne", + "signature": "type ChargeFlatFeeRunPaymentUpdateOne struct", + "line": 351 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 359 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 365 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetServicePeriodTo(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 373 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 379 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetStatus(v payment.Status) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableStatus(v *payment.Status) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetAuthorizedTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 415 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearAuthorizedTransactionGroupID() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetAuthorizedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableAuthorizedAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearAuthorizedAt() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetSettledTransactionGroupID(v string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableSettledTransactionGroupID(v *string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearSettledTransactionGroupID() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 469 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetSettledAt(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableSettledAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 481 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearSettledAt() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 489 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetUpdatedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 495 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetDeletedAt(v time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 501 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 507 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearDeletedAt() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 515 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SetAnnotations(v models.Annotations) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 521 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ClearAnnotations() *ChargeFlatFeeRunPaymentUpdateOne", + "line": 527 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) Mutation() *ChargeFlatFeeRunPaymentMutation", + "line": 533 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) Where(ps ...predicate.ChargeFlatFeeRunPayment) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 538 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) Select(field string, fields ...string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 545 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) Save(ctx context.Context) (*ChargeFlatFeeRunPayment, error)", + "line": 551 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) SaveX(ctx context.Context) *ChargeFlatFeeRunPayment", + "line": 557 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) Exec(ctx context.Context) error", + "line": 566 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) ExecX(ctx context.Context)", + "line": 572 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) defaults()", + "line": 579 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) check() error", + "line": 587 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeFlatFeeRunPaymentUpdateOne) sqlSave(ctx context.Context) (_node *ChargeFlatFeeRunPayment, err error)", + "line": 612 + } + ], + "line_count": 705 + }, + "openmeter/ent/db/chargessearchv1.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargesSearchV1", + "signature": "type ChargesSearchV1 struct", + "line": 22 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargesSearchV1) assignValues(columns []string, values []any) error", + "line": 101 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargesSearchV1) Value(name string) (ent.Value, error)", + "line": 291 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargesSearchV1) Unwrap() *ChargesSearchV1", + "line": 297 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargesSearchV1) String() string", + "line": 307 + } + ], + "line_count": 413 + }, + "openmeter/ent/db/chargessearchv1/chargessearchv1.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 108 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s meta.ChargeStatus) error", + "line": 135 + }, + { + "kind": "func", + "name": "ManagedByValidator", + "signature": "func ManagedByValidator(mb billing.InvoiceLineManagedBy) error", + "line": 145 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 155 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 173 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByBillingPeriodFrom", + "signature": "func ByBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "ByBillingPeriodTo", + "signature": "func ByBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 193 + }, + { + "kind": "func", + "name": "ByFullServicePeriodFrom", + "signature": "func ByFullServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 198 + }, + { + "kind": "func", + "name": "ByFullServicePeriodTo", + "signature": "func ByFullServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 203 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 208 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 213 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 218 + }, + { + "kind": "func", + "name": "ByManagedBy", + "signature": "func ByManagedBy(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByAdvanceAfter", + "signature": "func ByAdvanceAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 288 + } + ], + "line_count": 290 + }, + "openmeter/ent/db/chargessearchv1/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "Type", + "signature": "func Type(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 17 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.ChargesSearchV1", + "line": 23 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargesSearchV1", + "line": 28 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargesSearchV1", + "line": 33 + }, + { + "kind": "func", + "name": "BillingPeriodFrom", + "signature": "func BillingPeriodFrom(v time.Time) predicate.ChargesSearchV1", + "line": 38 + }, + { + "kind": "func", + "name": "BillingPeriodTo", + "signature": "func BillingPeriodTo(v time.Time) predicate.ChargesSearchV1", + "line": 43 + }, + { + "kind": "func", + "name": "FullServicePeriodFrom", + "signature": "func FullServicePeriodFrom(v time.Time) predicate.ChargesSearchV1", + "line": 48 + }, + { + "kind": "func", + "name": "FullServicePeriodTo", + "signature": "func FullServicePeriodTo(v time.Time) predicate.ChargesSearchV1", + "line": 53 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.ChargesSearchV1", + "line": 58 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargesSearchV1", + "line": 63 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.ChargesSearchV1", + "line": 69 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.ChargesSearchV1", + "line": 74 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.ChargesSearchV1", + "line": 79 + }, + { + "kind": "func", + "name": "AdvanceAfter", + "signature": "func AdvanceAfter(v time.Time) predicate.ChargesSearchV1", + "line": 84 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargesSearchV1", + "line": 89 + }, + { + "kind": "func", + "name": "ID", + "signature": "func ID(v string) predicate.ChargesSearchV1", + "line": 94 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargesSearchV1", + "line": 99 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargesSearchV1", + "line": 104 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargesSearchV1", + "line": 109 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargesSearchV1", + "line": 114 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargesSearchV1", + "line": 119 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargesSearchV1", + "line": 124 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 129 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 135 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...meta.ChargeType) predicate.ChargesSearchV1", + "line": 141 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...meta.ChargeType) predicate.ChargesSearchV1", + "line": 150 + }, + { + "kind": "func", + "name": "TypeGT", + "signature": "func TypeGT(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 159 + }, + { + "kind": "func", + "name": "TypeGTE", + "signature": "func TypeGTE(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 165 + }, + { + "kind": "func", + "name": "TypeLT", + "signature": "func TypeLT(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 171 + }, + { + "kind": "func", + "name": "TypeLTE", + "signature": "func TypeLTE(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 177 + }, + { + "kind": "func", + "name": "TypeContains", + "signature": "func TypeContains(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 183 + }, + { + "kind": "func", + "name": "TypeHasPrefix", + "signature": "func TypeHasPrefix(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 189 + }, + { + "kind": "func", + "name": "TypeHasSuffix", + "signature": "func TypeHasSuffix(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 195 + }, + { + "kind": "func", + "name": "TypeEqualFold", + "signature": "func TypeEqualFold(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 201 + }, + { + "kind": "func", + "name": "TypeContainsFold", + "signature": "func TypeContainsFold(v meta.ChargeType) predicate.ChargesSearchV1", + "line": 207 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.ChargesSearchV1", + "line": 213 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.ChargesSearchV1", + "line": 218 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 223 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 228 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.ChargesSearchV1", + "line": 233 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.ChargesSearchV1", + "line": 238 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.ChargesSearchV1", + "line": 243 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.ChargesSearchV1", + "line": 248 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.ChargesSearchV1", + "line": 253 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 258 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 263 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 268 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 273 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargesSearchV1", + "line": 278 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 283 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 288 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 293 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargesSearchV1", + "line": 298 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargesSearchV1", + "line": 303 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargesSearchV1", + "line": 308 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargesSearchV1", + "line": 313 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargesSearchV1", + "line": 318 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 323 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 328 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 333 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargesSearchV1", + "line": 338 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargesSearchV1", + "line": 343 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargesSearchV1", + "line": 348 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargesSearchV1", + "line": 353 + }, + { + "kind": "func", + "name": "BillingPeriodFromEQ", + "signature": "func BillingPeriodFromEQ(v time.Time) predicate.ChargesSearchV1", + "line": 358 + }, + { + "kind": "func", + "name": "BillingPeriodFromNEQ", + "signature": "func BillingPeriodFromNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 363 + }, + { + "kind": "func", + "name": "BillingPeriodFromIn", + "signature": "func BillingPeriodFromIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 368 + }, + { + "kind": "func", + "name": "BillingPeriodFromNotIn", + "signature": "func BillingPeriodFromNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 373 + }, + { + "kind": "func", + "name": "BillingPeriodFromGT", + "signature": "func BillingPeriodFromGT(v time.Time) predicate.ChargesSearchV1", + "line": 378 + }, + { + "kind": "func", + "name": "BillingPeriodFromGTE", + "signature": "func BillingPeriodFromGTE(v time.Time) predicate.ChargesSearchV1", + "line": 383 + }, + { + "kind": "func", + "name": "BillingPeriodFromLT", + "signature": "func BillingPeriodFromLT(v time.Time) predicate.ChargesSearchV1", + "line": 388 + }, + { + "kind": "func", + "name": "BillingPeriodFromLTE", + "signature": "func BillingPeriodFromLTE(v time.Time) predicate.ChargesSearchV1", + "line": 393 + }, + { + "kind": "func", + "name": "BillingPeriodToEQ", + "signature": "func BillingPeriodToEQ(v time.Time) predicate.ChargesSearchV1", + "line": 398 + }, + { + "kind": "func", + "name": "BillingPeriodToNEQ", + "signature": "func BillingPeriodToNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 403 + }, + { + "kind": "func", + "name": "BillingPeriodToIn", + "signature": "func BillingPeriodToIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 408 + }, + { + "kind": "func", + "name": "BillingPeriodToNotIn", + "signature": "func BillingPeriodToNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 413 + }, + { + "kind": "func", + "name": "BillingPeriodToGT", + "signature": "func BillingPeriodToGT(v time.Time) predicate.ChargesSearchV1", + "line": 418 + }, + { + "kind": "func", + "name": "BillingPeriodToGTE", + "signature": "func BillingPeriodToGTE(v time.Time) predicate.ChargesSearchV1", + "line": 423 + }, + { + "kind": "func", + "name": "BillingPeriodToLT", + "signature": "func BillingPeriodToLT(v time.Time) predicate.ChargesSearchV1", + "line": 428 + }, + { + "kind": "func", + "name": "BillingPeriodToLTE", + "signature": "func BillingPeriodToLTE(v time.Time) predicate.ChargesSearchV1", + "line": 433 + }, + { + "kind": "func", + "name": "FullServicePeriodFromEQ", + "signature": "func FullServicePeriodFromEQ(v time.Time) predicate.ChargesSearchV1", + "line": 438 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNEQ", + "signature": "func FullServicePeriodFromNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 443 + }, + { + "kind": "func", + "name": "FullServicePeriodFromIn", + "signature": "func FullServicePeriodFromIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 448 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNotIn", + "signature": "func FullServicePeriodFromNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 453 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGT", + "signature": "func FullServicePeriodFromGT(v time.Time) predicate.ChargesSearchV1", + "line": 458 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGTE", + "signature": "func FullServicePeriodFromGTE(v time.Time) predicate.ChargesSearchV1", + "line": 463 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLT", + "signature": "func FullServicePeriodFromLT(v time.Time) predicate.ChargesSearchV1", + "line": 468 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLTE", + "signature": "func FullServicePeriodFromLTE(v time.Time) predicate.ChargesSearchV1", + "line": 473 + }, + { + "kind": "func", + "name": "FullServicePeriodToEQ", + "signature": "func FullServicePeriodToEQ(v time.Time) predicate.ChargesSearchV1", + "line": 478 + }, + { + "kind": "func", + "name": "FullServicePeriodToNEQ", + "signature": "func FullServicePeriodToNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 483 + }, + { + "kind": "func", + "name": "FullServicePeriodToIn", + "signature": "func FullServicePeriodToIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 488 + }, + { + "kind": "func", + "name": "FullServicePeriodToNotIn", + "signature": "func FullServicePeriodToNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 493 + }, + { + "kind": "func", + "name": "FullServicePeriodToGT", + "signature": "func FullServicePeriodToGT(v time.Time) predicate.ChargesSearchV1", + "line": 498 + }, + { + "kind": "func", + "name": "FullServicePeriodToGTE", + "signature": "func FullServicePeriodToGTE(v time.Time) predicate.ChargesSearchV1", + "line": 503 + }, + { + "kind": "func", + "name": "FullServicePeriodToLT", + "signature": "func FullServicePeriodToLT(v time.Time) predicate.ChargesSearchV1", + "line": 508 + }, + { + "kind": "func", + "name": "FullServicePeriodToLTE", + "signature": "func FullServicePeriodToLTE(v time.Time) predicate.ChargesSearchV1", + "line": 513 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v meta.ChargeStatus) predicate.ChargesSearchV1", + "line": 518 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v meta.ChargeStatus) predicate.ChargesSearchV1", + "line": 524 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...meta.ChargeStatus) predicate.ChargesSearchV1", + "line": 530 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...meta.ChargeStatus) predicate.ChargesSearchV1", + "line": 539 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.ChargesSearchV1", + "line": 548 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.ChargesSearchV1", + "line": 553 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 558 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 563 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.ChargesSearchV1", + "line": 568 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.ChargesSearchV1", + "line": 573 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.ChargesSearchV1", + "line": 578 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.ChargesSearchV1", + "line": 583 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.ChargesSearchV1", + "line": 588 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 593 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 598 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.ChargesSearchV1", + "line": 603 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.ChargesSearchV1", + "line": 608 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 613 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 618 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargesSearchV1", + "line": 623 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargesSearchV1", + "line": 629 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargesSearchV1", + "line": 635 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargesSearchV1", + "line": 644 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargesSearchV1", + "line": 653 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargesSearchV1", + "line": 659 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargesSearchV1", + "line": 665 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargesSearchV1", + "line": 671 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargesSearchV1", + "line": 677 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargesSearchV1", + "line": 683 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargesSearchV1", + "line": 689 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargesSearchV1", + "line": 695 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargesSearchV1", + "line": 701 + }, + { + "kind": "func", + "name": "ManagedByEQ", + "signature": "func ManagedByEQ(v billing.InvoiceLineManagedBy) predicate.ChargesSearchV1", + "line": 707 + }, + { + "kind": "func", + "name": "ManagedByNEQ", + "signature": "func ManagedByNEQ(v billing.InvoiceLineManagedBy) predicate.ChargesSearchV1", + "line": 713 + }, + { + "kind": "func", + "name": "ManagedByIn", + "signature": "func ManagedByIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargesSearchV1", + "line": 719 + }, + { + "kind": "func", + "name": "ManagedByNotIn", + "signature": "func ManagedByNotIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargesSearchV1", + "line": 728 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.ChargesSearchV1", + "line": 737 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.ChargesSearchV1", + "line": 742 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 747 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 752 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.ChargesSearchV1", + "line": 757 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.ChargesSearchV1", + "line": 762 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.ChargesSearchV1", + "line": 767 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.ChargesSearchV1", + "line": 772 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.ChargesSearchV1", + "line": 777 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 782 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 787 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.ChargesSearchV1", + "line": 792 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.ChargesSearchV1", + "line": 797 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 802 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 807 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.ChargesSearchV1", + "line": 812 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.ChargesSearchV1", + "line": 817 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 822 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 827 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.ChargesSearchV1", + "line": 832 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.ChargesSearchV1", + "line": 837 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.ChargesSearchV1", + "line": 842 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.ChargesSearchV1", + "line": 847 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.ChargesSearchV1", + "line": 852 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 857 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 862 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.ChargesSearchV1", + "line": 867 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.ChargesSearchV1", + "line": 872 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 877 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 882 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.ChargesSearchV1", + "line": 887 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.ChargesSearchV1", + "line": 892 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 897 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 902 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.ChargesSearchV1", + "line": 907 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.ChargesSearchV1", + "line": 912 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.ChargesSearchV1", + "line": 917 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.ChargesSearchV1", + "line": 922 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.ChargesSearchV1", + "line": 927 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 932 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 937 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.ChargesSearchV1", + "line": 942 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.ChargesSearchV1", + "line": 947 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 952 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 957 + }, + { + "kind": "func", + "name": "AdvanceAfterEQ", + "signature": "func AdvanceAfterEQ(v time.Time) predicate.ChargesSearchV1", + "line": 962 + }, + { + "kind": "func", + "name": "AdvanceAfterNEQ", + "signature": "func AdvanceAfterNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 967 + }, + { + "kind": "func", + "name": "AdvanceAfterIn", + "signature": "func AdvanceAfterIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 972 + }, + { + "kind": "func", + "name": "AdvanceAfterNotIn", + "signature": "func AdvanceAfterNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 977 + }, + { + "kind": "func", + "name": "AdvanceAfterGT", + "signature": "func AdvanceAfterGT(v time.Time) predicate.ChargesSearchV1", + "line": 982 + }, + { + "kind": "func", + "name": "AdvanceAfterGTE", + "signature": "func AdvanceAfterGTE(v time.Time) predicate.ChargesSearchV1", + "line": 987 + }, + { + "kind": "func", + "name": "AdvanceAfterLT", + "signature": "func AdvanceAfterLT(v time.Time) predicate.ChargesSearchV1", + "line": 992 + }, + { + "kind": "func", + "name": "AdvanceAfterLTE", + "signature": "func AdvanceAfterLTE(v time.Time) predicate.ChargesSearchV1", + "line": 997 + }, + { + "kind": "func", + "name": "AdvanceAfterIsNil", + "signature": "func AdvanceAfterIsNil() predicate.ChargesSearchV1", + "line": 1002 + }, + { + "kind": "func", + "name": "AdvanceAfterNotNil", + "signature": "func AdvanceAfterNotNil() predicate.ChargesSearchV1", + "line": 1007 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargesSearchV1", + "line": 1012 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargesSearchV1", + "line": 1017 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargesSearchV1", + "line": 1022 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 1027 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargesSearchV1", + "line": 1032 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargesSearchV1", + "line": 1037 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargesSearchV1", + "line": 1042 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargesSearchV1", + "line": 1047 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargesSearchV1", + "line": 1052 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargesSearchV1", + "line": 1057 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargesSearchV1", + "line": 1062 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargesSearchV1", + "line": 1067 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargesSearchV1", + "line": 1072 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargesSearchV1", + "line": 1077 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargesSearchV1", + "line": 1082 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargesSearchV1", + "line": 1087 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargesSearchV1", + "line": 1093 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargesSearchV1", + "line": 1099 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargesSearchV1", + "line": 1108 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargesSearchV1", + "line": 1117 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargesSearchV1", + "line": 1122 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargesSearchV1", + "line": 1127 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargesSearchV1", + "line": 1132 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(v string) predicate.ChargesSearchV1", + "line": 1137 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(v string) predicate.ChargesSearchV1", + "line": 1142 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(vs ...string) predicate.ChargesSearchV1", + "line": 1147 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 1152 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(v string) predicate.ChargesSearchV1", + "line": 1157 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(v string) predicate.ChargesSearchV1", + "line": 1162 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(v string) predicate.ChargesSearchV1", + "line": 1167 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(v string) predicate.ChargesSearchV1", + "line": 1172 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(v string) predicate.ChargesSearchV1", + "line": 1177 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(v string) predicate.ChargesSearchV1", + "line": 1182 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargesSearchV1", + "line": 1187 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargesSearchV1", + "line": 1192 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargesSearchV1", + "line": 1197 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 1202 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargesSearchV1", + "line": 1207 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargesSearchV1", + "line": 1212 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargesSearchV1", + "line": 1217 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargesSearchV1", + "line": 1222 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargesSearchV1", + "line": 1227 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargesSearchV1", + "line": 1232 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargesSearchV1", + "line": 1237 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargesSearchV1", + "line": 1242 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargesSearchV1", + "line": 1247 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargesSearchV1", + "line": 1252 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargesSearchV1", + "line": 1257 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1262 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1267 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1272 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1277 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargesSearchV1", + "line": 1282 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargesSearchV1", + "line": 1287 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargesSearchV1", + "line": 1292 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargesSearchV1", + "line": 1297 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1302 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1312 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1317 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargesSearchV1", + "line": 1322 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargesSearchV1", + "line": 1327 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargesSearchV1", + "line": 1332 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargesSearchV1", + "line": 1337 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1342 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargesSearchV1", + "line": 1347 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1352 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargesSearchV1", + "line": 1357 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargesSearchV1", + "line": 1362 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargesSearchV1", + "line": 1367 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargesSearchV1", + "line": 1372 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargesSearchV1", + "line": 1377 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargesSearchV1", + "line": 1382 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargesSearchV1", + "line": 1387 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargesSearchV1", + "line": 1392 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargesSearchV1", + "line": 1397 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargesSearchV1", + "line": 1402 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 1407 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargesSearchV1", + "line": 1412 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargesSearchV1", + "line": 1417 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargesSearchV1", + "line": 1422 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargesSearchV1", + "line": 1427 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargesSearchV1", + "line": 1432 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargesSearchV1", + "line": 1437 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargesSearchV1", + "line": 1442 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargesSearchV1", + "line": 1447 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargesSearchV1", + "line": 1452 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargesSearchV1", + "line": 1457 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargesSearchV1", + "line": 1462 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargesSearchV1", + "line": 1467 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargesSearchV1", + "line": 1472 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargesSearchV1", + "line": 1477 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargesSearchV1", + "line": 1482 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargesSearchV1", + "line": 1487 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargesSearchV1", + "line": 1492 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargesSearchV1", + "line": 1497 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargesSearchV1", + "line": 1502 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargesSearchV1", + "line": 1507 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargesSearchV1", + "line": 1512 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargesSearchV1", + "line": 1517 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargesSearchV1", + "line": 1522 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargesSearchV1", + "line": 1527 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargesSearchV1) predicate.ChargesSearchV1", + "line": 1532 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargesSearchV1) predicate.ChargesSearchV1", + "line": 1537 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargesSearchV1) predicate.ChargesSearchV1", + "line": 1542 + } + ], + "line_count": 1544 + }, + "openmeter/ent/db/chargessearchv1_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargesSearchV1Query", + "signature": "type ChargesSearchV1Query struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargesSearchV1Query) Where(ps ...predicate.ChargesSearchV1) *ChargesSearchV1Query", + "line": 32 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargesSearchV1Query) Limit(limit int) *ChargesSearchV1Query", + "line": 38 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargesSearchV1Query) Offset(offset int) *ChargesSearchV1Query", + "line": 44 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargesSearchV1Query) Unique(unique bool) *ChargesSearchV1Query", + "line": 51 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargesSearchV1Query) Order(o ...chargessearchv1.OrderOption) *ChargesSearchV1Query", + "line": 57 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargesSearchV1Query) First(ctx context.Context) (*ChargesSearchV1, error)", + "line": 64 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargesSearchV1Query) FirstX(ctx context.Context) *ChargesSearchV1", + "line": 76 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargesSearchV1Query) Only(ctx context.Context) (*ChargesSearchV1, error)", + "line": 87 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargesSearchV1Query) OnlyX(ctx context.Context) *ChargesSearchV1", + "line": 103 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargesSearchV1Query) All(ctx context.Context) ([]*ChargesSearchV1, error)", + "line": 112 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargesSearchV1Query) AllX(ctx context.Context) []*ChargesSearchV1", + "line": 122 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargesSearchV1Query) Count(ctx context.Context) (int, error)", + "line": 131 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargesSearchV1Query) CountX(ctx context.Context) int", + "line": 140 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargesSearchV1Query) Exist(ctx context.Context) (bool, error)", + "line": 149 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargesSearchV1Query) ExistX(ctx context.Context) bool", + "line": 162 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargesSearchV1Query) Clone() *ChargesSearchV1Query", + "line": 172 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargesSearchV1Query) GroupBy(field string, fields ...string) *ChargesSearchV1GroupBy", + "line": 202 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargesSearchV1Query) Select(fields ...string) *ChargesSearchV1Select", + "line": 223 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargesSearchV1Query) Aggregate(fns ...AggregateFunc) *ChargesSearchV1Select", + "line": 232 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargesSearchV1Query) prepareQuery(ctx context.Context) error", + "line": 236 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargesSearchV1Query) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargesSearchV1, error)", + "line": 262 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargesSearchV1Query) sqlCount(ctx context.Context) (int, error)", + "line": 290 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargesSearchV1Query) querySpec() *sqlgraph.QuerySpec", + "line": 302 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargesSearchV1Query) sqlQuery(ctx context.Context) *sql.Selector", + "line": 339 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargesSearchV1Query) ForUpdate(opts ...sql.LockOption) *ChargesSearchV1Query", + "line": 377 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargesSearchV1Query) ForShare(opts ...sql.LockOption) *ChargesSearchV1Query", + "line": 390 + }, + { + "kind": "struct", + "name": "ChargesSearchV1GroupBy", + "signature": "type ChargesSearchV1GroupBy struct", + "line": 401 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargesSearchV1GroupBy) Aggregate(fns ...AggregateFunc) *ChargesSearchV1GroupBy", + "line": 407 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargesSearchV1GroupBy) Scan(ctx context.Context, v any) error", + "line": 413 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargesSearchV1GroupBy) sqlScan(ctx context.Context, root *ChargesSearchV1Query, v any) error", + "line": 421 + }, + { + "kind": "struct", + "name": "ChargesSearchV1Select", + "signature": "type ChargesSearchV1Select struct", + "line": 449 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargesSearchV1Select) Aggregate(fns ...AggregateFunc) *ChargesSearchV1Select", + "line": 455 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargesSearchV1Select) Scan(ctx context.Context, v any) error", + "line": 461 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargesSearchV1Select) sqlScan(ctx context.Context, root *ChargesSearchV1Query, v any) error", + "line": 469 + } + ], + "line_count": 488 + }, + "openmeter/ent/db/chargeusagebased.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBased", + "signature": "type ChargeUsageBased struct", + "line": 31 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedEdges", + "signature": "type ChargeUsageBasedEdges struct", + "line": 110 + }, + { + "kind": "func", + "name": "RunsOrErr", + "signature": "func (e ChargeUsageBasedEdges) RunsOrErr() ([]*ChargeUsageBasedRuns, error)", + "line": 138 + }, + { + "kind": "func", + "name": "DetailedLinesOrErr", + "signature": "func (e ChargeUsageBasedEdges) DetailedLinesOrErr() ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 147 + }, + { + "kind": "func", + "name": "CurrentRunOrErr", + "signature": "func (e ChargeUsageBasedEdges) CurrentRunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 156 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e ChargeUsageBasedEdges) ChargeOrErr() (*Charge, error)", + "line": 167 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e ChargeUsageBasedEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 178 + }, + { + "kind": "func", + "name": "SubscriptionPhaseOrErr", + "signature": "func (e ChargeUsageBasedEdges) SubscriptionPhaseOrErr() (*SubscriptionPhase, error)", + "line": 189 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e ChargeUsageBasedEdges) SubscriptionItemOrErr() (*SubscriptionItem, error)", + "line": 200 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e ChargeUsageBasedEdges) CustomerOrErr() (*Customer, error)", + "line": 211 + }, + { + "kind": "func", + "name": "FeatureOrErr", + "signature": "func (e ChargeUsageBasedEdges) FeatureOrErr() (*Feature, error)", + "line": 222 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e ChargeUsageBasedEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 233 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBased) assignValues(columns []string, values []any) error", + "line": 266 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBased) Value(name string) (ent.Value, error)", + "line": 505 + }, + { + "kind": "func", + "name": "QueryRuns", + "signature": "func (_m *ChargeUsageBased) QueryRuns() *ChargeUsageBasedRunsQuery", + "line": 510 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_m *ChargeUsageBased) QueryDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 515 + }, + { + "kind": "func", + "name": "QueryCurrentRun", + "signature": "func (_m *ChargeUsageBased) QueryCurrentRun() *ChargeUsageBasedRunsQuery", + "line": 520 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *ChargeUsageBased) QueryCharge() *ChargeQuery", + "line": 525 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *ChargeUsageBased) QuerySubscription() *SubscriptionQuery", + "line": 530 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_m *ChargeUsageBased) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 535 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *ChargeUsageBased) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 540 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *ChargeUsageBased) QueryCustomer() *CustomerQuery", + "line": 545 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_m *ChargeUsageBased) QueryFeature() *FeatureQuery", + "line": 550 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *ChargeUsageBased) QueryTaxCode() *TaxCodeQuery", + "line": 555 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBased) Update() *ChargeUsageBasedUpdateOne", + "line": 562 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBased) Unwrap() *ChargeUsageBased", + "line": 568 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBased) String() string", + "line": 578 + } + ], + "line_count": 710 + }, + "openmeter/ent/db/chargeusagebased/chargeusagebased.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 225 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s meta.ChargeStatus) error", + "line": 261 + }, + { + "kind": "func", + "name": "ManagedByValidator", + "signature": "func ManagedByValidator(mb billing.InvoiceLineManagedBy) error", + "line": 271 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 281 + }, + { + "kind": "func", + "name": "SettlementModeValidator", + "signature": "func SettlementModeValidator(sm productcatalog.SettlementMode) error", + "line": 291 + }, + { + "kind": "func", + "name": "RatingEngineValidator", + "signature": "func RatingEngineValidator(re usagebased.RatingEngine) error", + "line": 301 + }, + { + "kind": "func", + "name": "StatusDetailedValidator", + "signature": "func StatusDetailedValidator(sd usagebased.Status) error", + "line": 311 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 324 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 329 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 334 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 339 + }, + { + "kind": "func", + "name": "ByBillingPeriodFrom", + "signature": "func ByBillingPeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 344 + }, + { + "kind": "func", + "name": "ByBillingPeriodTo", + "signature": "func ByBillingPeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 349 + }, + { + "kind": "func", + "name": "ByFullServicePeriodFrom", + "signature": "func ByFullServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 354 + }, + { + "kind": "func", + "name": "ByFullServicePeriodTo", + "signature": "func ByFullServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 359 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 364 + }, + { + "kind": "func", + "name": "ByUniqueReferenceID", + "signature": "func ByUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 369 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 374 + }, + { + "kind": "func", + "name": "ByManagedBy", + "signature": "func ByManagedBy(opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 384 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseID", + "signature": "func BySubscriptionPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 389 + }, + { + "kind": "func", + "name": "BySubscriptionItemID", + "signature": "func BySubscriptionItemID(opts ...sql.OrderTermOption) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "ByAdvanceAfter", + "signature": "func ByAdvanceAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 399 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 404 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 409 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 414 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 419 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 424 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 429 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 434 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 439 + }, + { + "kind": "func", + "name": "ByInvoiceAt", + "signature": "func ByInvoiceAt(opts ...sql.OrderTermOption) OrderOption", + "line": 444 + }, + { + "kind": "func", + "name": "BySettlementMode", + "signature": "func BySettlementMode(opts ...sql.OrderTermOption) OrderOption", + "line": 449 + }, + { + "kind": "func", + "name": "ByDiscounts", + "signature": "func ByDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 454 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 459 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 464 + }, + { + "kind": "func", + "name": "ByRatingEngine", + "signature": "func ByRatingEngine(opts ...sql.OrderTermOption) OrderOption", + "line": 469 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 474 + }, + { + "kind": "func", + "name": "ByCurrentRealizationRunID", + "signature": "func ByCurrentRealizationRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 479 + }, + { + "kind": "func", + "name": "ByStatusDetailed", + "signature": "func ByStatusDetailed(opts ...sql.OrderTermOption) OrderOption", + "line": 484 + }, + { + "kind": "func", + "name": "ByRunsCount", + "signature": "func ByRunsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 489 + }, + { + "kind": "func", + "name": "ByRuns", + "signature": "func ByRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 496 + }, + { + "kind": "func", + "name": "ByDetailedLinesCount", + "signature": "func ByDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 503 + }, + { + "kind": "func", + "name": "ByDetailedLines", + "signature": "func ByDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 510 + }, + { + "kind": "func", + "name": "ByCurrentRunField", + "signature": "func ByCurrentRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 517 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 524 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 531 + }, + { + "kind": "func", + "name": "BySubscriptionPhaseField", + "signature": "func BySubscriptionPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 538 + }, + { + "kind": "func", + "name": "BySubscriptionItemField", + "signature": "func BySubscriptionItemField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 545 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 552 + }, + { + "kind": "func", + "name": "ByFeatureField", + "signature": "func ByFeatureField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 559 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 566 + }, + { + "kind": "func", + "name": "newRunsStep", + "signature": "func newRunsStep() *sqlgraph.Step", + "line": 571 + }, + { + "kind": "func", + "name": "newDetailedLinesStep", + "signature": "func newDetailedLinesStep() *sqlgraph.Step", + "line": 578 + }, + { + "kind": "func", + "name": "newCurrentRunStep", + "signature": "func newCurrentRunStep() *sqlgraph.Step", + "line": 585 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 592 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 599 + }, + { + "kind": "func", + "name": "newSubscriptionPhaseStep", + "signature": "func newSubscriptionPhaseStep() *sqlgraph.Step", + "line": 606 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 613 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 620 + }, + { + "kind": "func", + "name": "newFeatureStep", + "signature": "func newFeatureStep() *sqlgraph.Step", + "line": 627 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 634 + } + ], + "line_count": 640 + }, + "openmeter/ent/db/chargeusagebased/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBased", + "line": 19 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBased", + "line": 24 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBased", + "line": 29 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBased", + "line": 34 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBased", + "line": 39 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBased", + "line": 44 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBased", + "line": 49 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBased", + "line": 54 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBased", + "line": 59 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBased", + "line": 64 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBased", + "line": 69 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.ChargeUsageBased", + "line": 74 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeUsageBased", + "line": 79 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeUsageBased", + "line": 84 + }, + { + "kind": "func", + "name": "BillingPeriodFrom", + "signature": "func BillingPeriodFrom(v time.Time) predicate.ChargeUsageBased", + "line": 89 + }, + { + "kind": "func", + "name": "BillingPeriodTo", + "signature": "func BillingPeriodTo(v time.Time) predicate.ChargeUsageBased", + "line": 94 + }, + { + "kind": "func", + "name": "FullServicePeriodFrom", + "signature": "func FullServicePeriodFrom(v time.Time) predicate.ChargeUsageBased", + "line": 99 + }, + { + "kind": "func", + "name": "FullServicePeriodTo", + "signature": "func FullServicePeriodTo(v time.Time) predicate.ChargeUsageBased", + "line": 104 + }, + { + "kind": "func", + "name": "UniqueReferenceID", + "signature": "func UniqueReferenceID(v string) predicate.ChargeUsageBased", + "line": 109 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargeUsageBased", + "line": 114 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.ChargeUsageBased", + "line": 120 + }, + { + "kind": "func", + "name": "SubscriptionPhaseID", + "signature": "func SubscriptionPhaseID(v string) predicate.ChargeUsageBased", + "line": 125 + }, + { + "kind": "func", + "name": "SubscriptionItemID", + "signature": "func SubscriptionItemID(v string) predicate.ChargeUsageBased", + "line": 130 + }, + { + "kind": "func", + "name": "AdvanceAfter", + "signature": "func AdvanceAfter(v time.Time) predicate.ChargeUsageBased", + "line": 135 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargeUsageBased", + "line": 140 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBased", + "line": 145 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBased", + "line": 150 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBased", + "line": 155 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBased", + "line": 160 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargeUsageBased", + "line": 165 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargeUsageBased", + "line": 170 + }, + { + "kind": "func", + "name": "InvoiceAt", + "signature": "func InvoiceAt(v time.Time) predicate.ChargeUsageBased", + "line": 175 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.ChargeUsageBased", + "line": 180 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.ChargeUsageBased", + "line": 185 + }, + { + "kind": "func", + "name": "CurrentRealizationRunID", + "signature": "func CurrentRealizationRunID(v string) predicate.ChargeUsageBased", + "line": 190 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.ChargeUsageBased", + "line": 195 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.ChargeUsageBased", + "line": 200 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 205 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 210 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.ChargeUsageBased", + "line": 215 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.ChargeUsageBased", + "line": 220 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.ChargeUsageBased", + "line": 225 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.ChargeUsageBased", + "line": 230 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.ChargeUsageBased", + "line": 235 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 240 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 245 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 250 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 255 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeUsageBased", + "line": 260 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 265 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 270 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 275 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeUsageBased", + "line": 280 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeUsageBased", + "line": 285 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeUsageBased", + "line": 290 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeUsageBased", + "line": 295 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeUsageBased", + "line": 300 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 305 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 310 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 315 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeUsageBased", + "line": 320 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeUsageBased", + "line": 325 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeUsageBased", + "line": 330 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeUsageBased", + "line": 335 + }, + { + "kind": "func", + "name": "BillingPeriodFromEQ", + "signature": "func BillingPeriodFromEQ(v time.Time) predicate.ChargeUsageBased", + "line": 340 + }, + { + "kind": "func", + "name": "BillingPeriodFromNEQ", + "signature": "func BillingPeriodFromNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 345 + }, + { + "kind": "func", + "name": "BillingPeriodFromIn", + "signature": "func BillingPeriodFromIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 350 + }, + { + "kind": "func", + "name": "BillingPeriodFromNotIn", + "signature": "func BillingPeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 355 + }, + { + "kind": "func", + "name": "BillingPeriodFromGT", + "signature": "func BillingPeriodFromGT(v time.Time) predicate.ChargeUsageBased", + "line": 360 + }, + { + "kind": "func", + "name": "BillingPeriodFromGTE", + "signature": "func BillingPeriodFromGTE(v time.Time) predicate.ChargeUsageBased", + "line": 365 + }, + { + "kind": "func", + "name": "BillingPeriodFromLT", + "signature": "func BillingPeriodFromLT(v time.Time) predicate.ChargeUsageBased", + "line": 370 + }, + { + "kind": "func", + "name": "BillingPeriodFromLTE", + "signature": "func BillingPeriodFromLTE(v time.Time) predicate.ChargeUsageBased", + "line": 375 + }, + { + "kind": "func", + "name": "BillingPeriodToEQ", + "signature": "func BillingPeriodToEQ(v time.Time) predicate.ChargeUsageBased", + "line": 380 + }, + { + "kind": "func", + "name": "BillingPeriodToNEQ", + "signature": "func BillingPeriodToNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 385 + }, + { + "kind": "func", + "name": "BillingPeriodToIn", + "signature": "func BillingPeriodToIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 390 + }, + { + "kind": "func", + "name": "BillingPeriodToNotIn", + "signature": "func BillingPeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 395 + }, + { + "kind": "func", + "name": "BillingPeriodToGT", + "signature": "func BillingPeriodToGT(v time.Time) predicate.ChargeUsageBased", + "line": 400 + }, + { + "kind": "func", + "name": "BillingPeriodToGTE", + "signature": "func BillingPeriodToGTE(v time.Time) predicate.ChargeUsageBased", + "line": 405 + }, + { + "kind": "func", + "name": "BillingPeriodToLT", + "signature": "func BillingPeriodToLT(v time.Time) predicate.ChargeUsageBased", + "line": 410 + }, + { + "kind": "func", + "name": "BillingPeriodToLTE", + "signature": "func BillingPeriodToLTE(v time.Time) predicate.ChargeUsageBased", + "line": 415 + }, + { + "kind": "func", + "name": "FullServicePeriodFromEQ", + "signature": "func FullServicePeriodFromEQ(v time.Time) predicate.ChargeUsageBased", + "line": 420 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNEQ", + "signature": "func FullServicePeriodFromNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 425 + }, + { + "kind": "func", + "name": "FullServicePeriodFromIn", + "signature": "func FullServicePeriodFromIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 430 + }, + { + "kind": "func", + "name": "FullServicePeriodFromNotIn", + "signature": "func FullServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 435 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGT", + "signature": "func FullServicePeriodFromGT(v time.Time) predicate.ChargeUsageBased", + "line": 440 + }, + { + "kind": "func", + "name": "FullServicePeriodFromGTE", + "signature": "func FullServicePeriodFromGTE(v time.Time) predicate.ChargeUsageBased", + "line": 445 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLT", + "signature": "func FullServicePeriodFromLT(v time.Time) predicate.ChargeUsageBased", + "line": 450 + }, + { + "kind": "func", + "name": "FullServicePeriodFromLTE", + "signature": "func FullServicePeriodFromLTE(v time.Time) predicate.ChargeUsageBased", + "line": 455 + }, + { + "kind": "func", + "name": "FullServicePeriodToEQ", + "signature": "func FullServicePeriodToEQ(v time.Time) predicate.ChargeUsageBased", + "line": 460 + }, + { + "kind": "func", + "name": "FullServicePeriodToNEQ", + "signature": "func FullServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 465 + }, + { + "kind": "func", + "name": "FullServicePeriodToIn", + "signature": "func FullServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 470 + }, + { + "kind": "func", + "name": "FullServicePeriodToNotIn", + "signature": "func FullServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 475 + }, + { + "kind": "func", + "name": "FullServicePeriodToGT", + "signature": "func FullServicePeriodToGT(v time.Time) predicate.ChargeUsageBased", + "line": 480 + }, + { + "kind": "func", + "name": "FullServicePeriodToGTE", + "signature": "func FullServicePeriodToGTE(v time.Time) predicate.ChargeUsageBased", + "line": 485 + }, + { + "kind": "func", + "name": "FullServicePeriodToLT", + "signature": "func FullServicePeriodToLT(v time.Time) predicate.ChargeUsageBased", + "line": 490 + }, + { + "kind": "func", + "name": "FullServicePeriodToLTE", + "signature": "func FullServicePeriodToLTE(v time.Time) predicate.ChargeUsageBased", + "line": 495 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v meta.ChargeStatus) predicate.ChargeUsageBased", + "line": 500 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v meta.ChargeStatus) predicate.ChargeUsageBased", + "line": 506 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...meta.ChargeStatus) predicate.ChargeUsageBased", + "line": 512 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...meta.ChargeStatus) predicate.ChargeUsageBased", + "line": 521 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEQ", + "signature": "func UniqueReferenceIDEQ(v string) predicate.ChargeUsageBased", + "line": 530 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNEQ", + "signature": "func UniqueReferenceIDNEQ(v string) predicate.ChargeUsageBased", + "line": 535 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIn", + "signature": "func UniqueReferenceIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 540 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotIn", + "signature": "func UniqueReferenceIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 545 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGT", + "signature": "func UniqueReferenceIDGT(v string) predicate.ChargeUsageBased", + "line": 550 + }, + { + "kind": "func", + "name": "UniqueReferenceIDGTE", + "signature": "func UniqueReferenceIDGTE(v string) predicate.ChargeUsageBased", + "line": 555 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLT", + "signature": "func UniqueReferenceIDLT(v string) predicate.ChargeUsageBased", + "line": 560 + }, + { + "kind": "func", + "name": "UniqueReferenceIDLTE", + "signature": "func UniqueReferenceIDLTE(v string) predicate.ChargeUsageBased", + "line": 565 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContains", + "signature": "func UniqueReferenceIDContains(v string) predicate.ChargeUsageBased", + "line": 570 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasPrefix", + "signature": "func UniqueReferenceIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 575 + }, + { + "kind": "func", + "name": "UniqueReferenceIDHasSuffix", + "signature": "func UniqueReferenceIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 580 + }, + { + "kind": "func", + "name": "UniqueReferenceIDIsNil", + "signature": "func UniqueReferenceIDIsNil() predicate.ChargeUsageBased", + "line": 585 + }, + { + "kind": "func", + "name": "UniqueReferenceIDNotNil", + "signature": "func UniqueReferenceIDNotNil() predicate.ChargeUsageBased", + "line": 590 + }, + { + "kind": "func", + "name": "UniqueReferenceIDEqualFold", + "signature": "func UniqueReferenceIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 595 + }, + { + "kind": "func", + "name": "UniqueReferenceIDContainsFold", + "signature": "func UniqueReferenceIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 600 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargeUsageBased", + "line": 605 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargeUsageBased", + "line": 611 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargeUsageBased", + "line": 617 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargeUsageBased", + "line": 626 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargeUsageBased", + "line": 635 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargeUsageBased", + "line": 641 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargeUsageBased", + "line": 647 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargeUsageBased", + "line": 653 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargeUsageBased", + "line": 659 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargeUsageBased", + "line": 665 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargeUsageBased", + "line": 671 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargeUsageBased", + "line": 677 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargeUsageBased", + "line": 683 + }, + { + "kind": "func", + "name": "ManagedByEQ", + "signature": "func ManagedByEQ(v billing.InvoiceLineManagedBy) predicate.ChargeUsageBased", + "line": 689 + }, + { + "kind": "func", + "name": "ManagedByNEQ", + "signature": "func ManagedByNEQ(v billing.InvoiceLineManagedBy) predicate.ChargeUsageBased", + "line": 695 + }, + { + "kind": "func", + "name": "ManagedByIn", + "signature": "func ManagedByIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeUsageBased", + "line": 701 + }, + { + "kind": "func", + "name": "ManagedByNotIn", + "signature": "func ManagedByNotIn(vs ...billing.InvoiceLineManagedBy) predicate.ChargeUsageBased", + "line": 710 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.ChargeUsageBased", + "line": 719 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.ChargeUsageBased", + "line": 724 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 729 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 734 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.ChargeUsageBased", + "line": 739 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.ChargeUsageBased", + "line": 744 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.ChargeUsageBased", + "line": 749 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.ChargeUsageBased", + "line": 754 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.ChargeUsageBased", + "line": 759 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 764 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 769 + }, + { + "kind": "func", + "name": "SubscriptionIDIsNil", + "signature": "func SubscriptionIDIsNil() predicate.ChargeUsageBased", + "line": 774 + }, + { + "kind": "func", + "name": "SubscriptionIDNotNil", + "signature": "func SubscriptionIDNotNil() predicate.ChargeUsageBased", + "line": 779 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 784 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 789 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEQ", + "signature": "func SubscriptionPhaseIDEQ(v string) predicate.ChargeUsageBased", + "line": 794 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNEQ", + "signature": "func SubscriptionPhaseIDNEQ(v string) predicate.ChargeUsageBased", + "line": 799 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIn", + "signature": "func SubscriptionPhaseIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 804 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotIn", + "signature": "func SubscriptionPhaseIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 809 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGT", + "signature": "func SubscriptionPhaseIDGT(v string) predicate.ChargeUsageBased", + "line": 814 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDGTE", + "signature": "func SubscriptionPhaseIDGTE(v string) predicate.ChargeUsageBased", + "line": 819 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLT", + "signature": "func SubscriptionPhaseIDLT(v string) predicate.ChargeUsageBased", + "line": 824 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDLTE", + "signature": "func SubscriptionPhaseIDLTE(v string) predicate.ChargeUsageBased", + "line": 829 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContains", + "signature": "func SubscriptionPhaseIDContains(v string) predicate.ChargeUsageBased", + "line": 834 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasPrefix", + "signature": "func SubscriptionPhaseIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 839 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDHasSuffix", + "signature": "func SubscriptionPhaseIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 844 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDIsNil", + "signature": "func SubscriptionPhaseIDIsNil() predicate.ChargeUsageBased", + "line": 849 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDNotNil", + "signature": "func SubscriptionPhaseIDNotNil() predicate.ChargeUsageBased", + "line": 854 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDEqualFold", + "signature": "func SubscriptionPhaseIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 859 + }, + { + "kind": "func", + "name": "SubscriptionPhaseIDContainsFold", + "signature": "func SubscriptionPhaseIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 864 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEQ", + "signature": "func SubscriptionItemIDEQ(v string) predicate.ChargeUsageBased", + "line": 869 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNEQ", + "signature": "func SubscriptionItemIDNEQ(v string) predicate.ChargeUsageBased", + "line": 874 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIn", + "signature": "func SubscriptionItemIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 879 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotIn", + "signature": "func SubscriptionItemIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 884 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGT", + "signature": "func SubscriptionItemIDGT(v string) predicate.ChargeUsageBased", + "line": 889 + }, + { + "kind": "func", + "name": "SubscriptionItemIDGTE", + "signature": "func SubscriptionItemIDGTE(v string) predicate.ChargeUsageBased", + "line": 894 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLT", + "signature": "func SubscriptionItemIDLT(v string) predicate.ChargeUsageBased", + "line": 899 + }, + { + "kind": "func", + "name": "SubscriptionItemIDLTE", + "signature": "func SubscriptionItemIDLTE(v string) predicate.ChargeUsageBased", + "line": 904 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContains", + "signature": "func SubscriptionItemIDContains(v string) predicate.ChargeUsageBased", + "line": 909 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasPrefix", + "signature": "func SubscriptionItemIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 914 + }, + { + "kind": "func", + "name": "SubscriptionItemIDHasSuffix", + "signature": "func SubscriptionItemIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 919 + }, + { + "kind": "func", + "name": "SubscriptionItemIDIsNil", + "signature": "func SubscriptionItemIDIsNil() predicate.ChargeUsageBased", + "line": 924 + }, + { + "kind": "func", + "name": "SubscriptionItemIDNotNil", + "signature": "func SubscriptionItemIDNotNil() predicate.ChargeUsageBased", + "line": 929 + }, + { + "kind": "func", + "name": "SubscriptionItemIDEqualFold", + "signature": "func SubscriptionItemIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 934 + }, + { + "kind": "func", + "name": "SubscriptionItemIDContainsFold", + "signature": "func SubscriptionItemIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 939 + }, + { + "kind": "func", + "name": "AdvanceAfterEQ", + "signature": "func AdvanceAfterEQ(v time.Time) predicate.ChargeUsageBased", + "line": 944 + }, + { + "kind": "func", + "name": "AdvanceAfterNEQ", + "signature": "func AdvanceAfterNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 949 + }, + { + "kind": "func", + "name": "AdvanceAfterIn", + "signature": "func AdvanceAfterIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 954 + }, + { + "kind": "func", + "name": "AdvanceAfterNotIn", + "signature": "func AdvanceAfterNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 959 + }, + { + "kind": "func", + "name": "AdvanceAfterGT", + "signature": "func AdvanceAfterGT(v time.Time) predicate.ChargeUsageBased", + "line": 964 + }, + { + "kind": "func", + "name": "AdvanceAfterGTE", + "signature": "func AdvanceAfterGTE(v time.Time) predicate.ChargeUsageBased", + "line": 969 + }, + { + "kind": "func", + "name": "AdvanceAfterLT", + "signature": "func AdvanceAfterLT(v time.Time) predicate.ChargeUsageBased", + "line": 974 + }, + { + "kind": "func", + "name": "AdvanceAfterLTE", + "signature": "func AdvanceAfterLTE(v time.Time) predicate.ChargeUsageBased", + "line": 979 + }, + { + "kind": "func", + "name": "AdvanceAfterIsNil", + "signature": "func AdvanceAfterIsNil() predicate.ChargeUsageBased", + "line": 984 + }, + { + "kind": "func", + "name": "AdvanceAfterNotNil", + "signature": "func AdvanceAfterNotNil() predicate.ChargeUsageBased", + "line": 989 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargeUsageBased", + "line": 994 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargeUsageBased", + "line": 999 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 1004 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1009 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargeUsageBased", + "line": 1014 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargeUsageBased", + "line": 1019 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargeUsageBased", + "line": 1024 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargeUsageBased", + "line": 1029 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargeUsageBased", + "line": 1034 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1039 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1044 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargeUsageBased", + "line": 1049 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargeUsageBased", + "line": 1054 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 1059 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 1064 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargeUsageBased", + "line": 1069 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargeUsageBased", + "line": 1075 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargeUsageBased", + "line": 1081 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargeUsageBased", + "line": 1090 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargeUsageBased", + "line": 1099 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargeUsageBased", + "line": 1104 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeUsageBased", + "line": 1109 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeUsageBased", + "line": 1114 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBased", + "line": 1119 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBased", + "line": 1124 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBased", + "line": 1129 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1134 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBased", + "line": 1139 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBased", + "line": 1144 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBased", + "line": 1149 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBased", + "line": 1154 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBased", + "line": 1159 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1164 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1169 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBased", + "line": 1174 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBased", + "line": 1179 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargeUsageBased", + "line": 1184 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargeUsageBased", + "line": 1189 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1194 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1199 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1204 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1209 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBased", + "line": 1214 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBased", + "line": 1219 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBased", + "line": 1224 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBased", + "line": 1229 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1234 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1239 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1244 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1249 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBased", + "line": 1254 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBased", + "line": 1259 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBased", + "line": 1264 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBased", + "line": 1269 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1274 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1279 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1284 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1289 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBased", + "line": 1294 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBased", + "line": 1299 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBased", + "line": 1304 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBased", + "line": 1309 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBased", + "line": 1314 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBased", + "line": 1319 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargeUsageBased", + "line": 1324 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargeUsageBased", + "line": 1329 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargeUsageBased", + "line": 1334 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1339 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargeUsageBased", + "line": 1344 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargeUsageBased", + "line": 1349 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargeUsageBased", + "line": 1354 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargeUsageBased", + "line": 1359 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargeUsageBased", + "line": 1364 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1369 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1374 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargeUsageBased", + "line": 1379 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargeUsageBased", + "line": 1384 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargeUsageBased", + "line": 1389 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargeUsageBased", + "line": 1394 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargeUsageBased", + "line": 1399 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1404 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargeUsageBased", + "line": 1409 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargeUsageBased", + "line": 1414 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargeUsageBased", + "line": 1419 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargeUsageBased", + "line": 1424 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargeUsageBased", + "line": 1429 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1434 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1439 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargeUsageBased", + "line": 1444 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargeUsageBased", + "line": 1449 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargeUsageBased", + "line": 1454 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargeUsageBased", + "line": 1459 + }, + { + "kind": "func", + "name": "InvoiceAtEQ", + "signature": "func InvoiceAtEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1464 + }, + { + "kind": "func", + "name": "InvoiceAtNEQ", + "signature": "func InvoiceAtNEQ(v time.Time) predicate.ChargeUsageBased", + "line": 1469 + }, + { + "kind": "func", + "name": "InvoiceAtIn", + "signature": "func InvoiceAtIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1474 + }, + { + "kind": "func", + "name": "InvoiceAtNotIn", + "signature": "func InvoiceAtNotIn(vs ...time.Time) predicate.ChargeUsageBased", + "line": 1479 + }, + { + "kind": "func", + "name": "InvoiceAtGT", + "signature": "func InvoiceAtGT(v time.Time) predicate.ChargeUsageBased", + "line": 1484 + }, + { + "kind": "func", + "name": "InvoiceAtGTE", + "signature": "func InvoiceAtGTE(v time.Time) predicate.ChargeUsageBased", + "line": 1489 + }, + { + "kind": "func", + "name": "InvoiceAtLT", + "signature": "func InvoiceAtLT(v time.Time) predicate.ChargeUsageBased", + "line": 1494 + }, + { + "kind": "func", + "name": "InvoiceAtLTE", + "signature": "func InvoiceAtLTE(v time.Time) predicate.ChargeUsageBased", + "line": 1499 + }, + { + "kind": "func", + "name": "SettlementModeEQ", + "signature": "func SettlementModeEQ(v productcatalog.SettlementMode) predicate.ChargeUsageBased", + "line": 1504 + }, + { + "kind": "func", + "name": "SettlementModeNEQ", + "signature": "func SettlementModeNEQ(v productcatalog.SettlementMode) predicate.ChargeUsageBased", + "line": 1510 + }, + { + "kind": "func", + "name": "SettlementModeIn", + "signature": "func SettlementModeIn(vs ...productcatalog.SettlementMode) predicate.ChargeUsageBased", + "line": 1516 + }, + { + "kind": "func", + "name": "SettlementModeNotIn", + "signature": "func SettlementModeNotIn(vs ...productcatalog.SettlementMode) predicate.ChargeUsageBased", + "line": 1525 + }, + { + "kind": "func", + "name": "DiscountsIsNil", + "signature": "func DiscountsIsNil() predicate.ChargeUsageBased", + "line": 1534 + }, + { + "kind": "func", + "name": "DiscountsNotNil", + "signature": "func DiscountsNotNil() predicate.ChargeUsageBased", + "line": 1539 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.ChargeUsageBased", + "line": 1544 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.ChargeUsageBased", + "line": 1549 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.ChargeUsageBased", + "line": 1554 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1559 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.ChargeUsageBased", + "line": 1564 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.ChargeUsageBased", + "line": 1569 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.ChargeUsageBased", + "line": 1574 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.ChargeUsageBased", + "line": 1579 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.ChargeUsageBased", + "line": 1584 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1589 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1594 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.ChargeUsageBased", + "line": 1599 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.ChargeUsageBased", + "line": 1604 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.ChargeUsageBased", + "line": 1609 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.ChargeUsageBased", + "line": 1614 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 1619 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1624 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.ChargeUsageBased", + "line": 1629 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.ChargeUsageBased", + "line": 1634 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.ChargeUsageBased", + "line": 1639 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.ChargeUsageBased", + "line": 1644 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.ChargeUsageBased", + "line": 1649 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1654 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1659 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 1664 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 1669 + }, + { + "kind": "func", + "name": "RatingEngineEQ", + "signature": "func RatingEngineEQ(v usagebased.RatingEngine) predicate.ChargeUsageBased", + "line": 1674 + }, + { + "kind": "func", + "name": "RatingEngineNEQ", + "signature": "func RatingEngineNEQ(v usagebased.RatingEngine) predicate.ChargeUsageBased", + "line": 1680 + }, + { + "kind": "func", + "name": "RatingEngineIn", + "signature": "func RatingEngineIn(vs ...usagebased.RatingEngine) predicate.ChargeUsageBased", + "line": 1686 + }, + { + "kind": "func", + "name": "RatingEngineNotIn", + "signature": "func RatingEngineNotIn(vs ...usagebased.RatingEngine) predicate.ChargeUsageBased", + "line": 1695 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDEQ", + "signature": "func CurrentRealizationRunIDEQ(v string) predicate.ChargeUsageBased", + "line": 1704 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNEQ", + "signature": "func CurrentRealizationRunIDNEQ(v string) predicate.ChargeUsageBased", + "line": 1709 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDIn", + "signature": "func CurrentRealizationRunIDIn(vs ...string) predicate.ChargeUsageBased", + "line": 1714 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNotIn", + "signature": "func CurrentRealizationRunIDNotIn(vs ...string) predicate.ChargeUsageBased", + "line": 1719 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDGT", + "signature": "func CurrentRealizationRunIDGT(v string) predicate.ChargeUsageBased", + "line": 1724 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDGTE", + "signature": "func CurrentRealizationRunIDGTE(v string) predicate.ChargeUsageBased", + "line": 1729 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDLT", + "signature": "func CurrentRealizationRunIDLT(v string) predicate.ChargeUsageBased", + "line": 1734 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDLTE", + "signature": "func CurrentRealizationRunIDLTE(v string) predicate.ChargeUsageBased", + "line": 1739 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDContains", + "signature": "func CurrentRealizationRunIDContains(v string) predicate.ChargeUsageBased", + "line": 1744 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDHasPrefix", + "signature": "func CurrentRealizationRunIDHasPrefix(v string) predicate.ChargeUsageBased", + "line": 1749 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDHasSuffix", + "signature": "func CurrentRealizationRunIDHasSuffix(v string) predicate.ChargeUsageBased", + "line": 1754 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDIsNil", + "signature": "func CurrentRealizationRunIDIsNil() predicate.ChargeUsageBased", + "line": 1759 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDNotNil", + "signature": "func CurrentRealizationRunIDNotNil() predicate.ChargeUsageBased", + "line": 1764 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDEqualFold", + "signature": "func CurrentRealizationRunIDEqualFold(v string) predicate.ChargeUsageBased", + "line": 1769 + }, + { + "kind": "func", + "name": "CurrentRealizationRunIDContainsFold", + "signature": "func CurrentRealizationRunIDContainsFold(v string) predicate.ChargeUsageBased", + "line": 1774 + }, + { + "kind": "func", + "name": "StatusDetailedEQ", + "signature": "func StatusDetailedEQ(v usagebased.Status) predicate.ChargeUsageBased", + "line": 1779 + }, + { + "kind": "func", + "name": "StatusDetailedNEQ", + "signature": "func StatusDetailedNEQ(v usagebased.Status) predicate.ChargeUsageBased", + "line": 1785 + }, + { + "kind": "func", + "name": "StatusDetailedIn", + "signature": "func StatusDetailedIn(vs ...usagebased.Status) predicate.ChargeUsageBased", + "line": 1791 + }, + { + "kind": "func", + "name": "StatusDetailedNotIn", + "signature": "func StatusDetailedNotIn(vs ...usagebased.Status) predicate.ChargeUsageBased", + "line": 1800 + }, + { + "kind": "func", + "name": "HasRuns", + "signature": "func HasRuns() predicate.ChargeUsageBased", + "line": 1809 + }, + { + "kind": "func", + "name": "HasRunsWith", + "signature": "func HasRunsWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBased", + "line": 1820 + }, + { + "kind": "func", + "name": "HasDetailedLines", + "signature": "func HasDetailedLines() predicate.ChargeUsageBased", + "line": 1832 + }, + { + "kind": "func", + "name": "HasDetailedLinesWith", + "signature": "func HasDetailedLinesWith(preds ...predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBased", + "line": 1843 + }, + { + "kind": "func", + "name": "HasCurrentRun", + "signature": "func HasCurrentRun() predicate.ChargeUsageBased", + "line": 1855 + }, + { + "kind": "func", + "name": "HasCurrentRunWith", + "signature": "func HasCurrentRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBased", + "line": 1866 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.ChargeUsageBased", + "line": 1878 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.ChargeUsageBased", + "line": 1889 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.ChargeUsageBased", + "line": 1901 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.ChargeUsageBased", + "line": 1912 + }, + { + "kind": "func", + "name": "HasSubscriptionPhase", + "signature": "func HasSubscriptionPhase() predicate.ChargeUsageBased", + "line": 1924 + }, + { + "kind": "func", + "name": "HasSubscriptionPhaseWith", + "signature": "func HasSubscriptionPhaseWith(preds ...predicate.SubscriptionPhase) predicate.ChargeUsageBased", + "line": 1935 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.ChargeUsageBased", + "line": 1947 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.ChargeUsageBased", + "line": 1958 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.ChargeUsageBased", + "line": 1970 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.ChargeUsageBased", + "line": 1981 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func HasFeature() predicate.ChargeUsageBased", + "line": 1993 + }, + { + "kind": "func", + "name": "HasFeatureWith", + "signature": "func HasFeatureWith(preds ...predicate.Feature) predicate.ChargeUsageBased", + "line": 2004 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.ChargeUsageBased", + "line": 2016 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.ChargeUsageBased", + "line": 2027 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBased) predicate.ChargeUsageBased", + "line": 2039 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBased) predicate.ChargeUsageBased", + "line": 2044 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBased) predicate.ChargeUsageBased", + "line": 2049 + } + ], + "line_count": 2051 + }, + "openmeter/ent/db/chargeusagebased_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedCreate", + "signature": "type ChargeUsageBasedCreate struct", + "line": 34 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *ChargeUsageBasedCreate) SetCustomerID(v string) *ChargeUsageBasedCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeUsageBasedCreate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedCreate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_c *ChargeUsageBasedCreate) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedCreate", + "line": 60 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_c *ChargeUsageBasedCreate) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_c *ChargeUsageBasedCreate) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedCreate) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeUsageBasedCreate) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetUniqueReferenceID", + "signature": "func (_c *ChargeUsageBasedCreate) SetUniqueReferenceID(v string) *ChargeUsageBasedCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableUniqueReferenceID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableUniqueReferenceID(v *string) *ChargeUsageBasedCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *ChargeUsageBasedCreate) SetCurrency(v currencyx.Code) *ChargeUsageBasedCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_c *ChargeUsageBasedCreate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscriptionID(v string) *ChargeUsageBasedCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableSubscriptionID(v *string) *ChargeUsageBasedCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetSubscriptionPhaseID", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscriptionPhaseID(v string) *ChargeUsageBasedCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionPhaseID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableSubscriptionPhaseID(v *string) *ChargeUsageBasedCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscriptionItemID(v string) *ChargeUsageBasedCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableSubscriptionItemID(v *string) *ChargeUsageBasedCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_c *ChargeUsageBasedCreate) SetAdvanceAfter(v time.Time) *ChargeUsageBasedCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableAdvanceAfter(v *time.Time) *ChargeUsageBasedCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *ChargeUsageBasedCreate) SetTaxCodeID(v string) *ChargeUsageBasedCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableTaxCodeID(v *string) *ChargeUsageBasedCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *ChargeUsageBasedCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeUsageBasedCreate) SetAnnotations(v models.Annotations) *ChargeUsageBasedCreate", + "line": 200 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedCreate) SetNamespace(v string) *ChargeUsageBasedCreate", + "line": 206 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *ChargeUsageBasedCreate) SetMetadata(v map[string]string) *ChargeUsageBasedCreate", + "line": 212 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedCreate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedCreate", + "line": 224 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedCreate", + "line": 238 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedCreate", + "line": 246 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedCreate", + "line": 252 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *ChargeUsageBasedCreate) SetName(v string) *ChargeUsageBasedCreate", + "line": 260 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *ChargeUsageBasedCreate) SetDescription(v string) *ChargeUsageBasedCreate", + "line": 266 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableDescription(v *string) *ChargeUsageBasedCreate", + "line": 272 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_c *ChargeUsageBasedCreate) SetInvoiceAt(v time.Time) *ChargeUsageBasedCreate", + "line": 280 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_c *ChargeUsageBasedCreate) SetSettlementMode(v productcatalog.SettlementMode) *ChargeUsageBasedCreate", + "line": 286 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_c *ChargeUsageBasedCreate) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedCreate", + "line": 292 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *ChargeUsageBasedCreate) SetFeatureKey(v string) *ChargeUsageBasedCreate", + "line": 298 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *ChargeUsageBasedCreate) SetFeatureID(v string) *ChargeUsageBasedCreate", + "line": 304 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (_c *ChargeUsageBasedCreate) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedCreate", + "line": 310 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *ChargeUsageBasedCreate) SetPrice(v *productcatalog.Price) *ChargeUsageBasedCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_c *ChargeUsageBasedCreate) SetCurrentRealizationRunID(v string) *ChargeUsageBasedCreate", + "line": 322 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableCurrentRealizationRunID(v *string) *ChargeUsageBasedCreate", + "line": 328 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_c *ChargeUsageBasedCreate) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedCreate", + "line": 336 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedCreate) SetID(v string) *ChargeUsageBasedCreate", + "line": 342 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableID(v *string) *ChargeUsageBasedCreate", + "line": 348 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_c *ChargeUsageBasedCreate) AddRunIDs(ids ...string) *ChargeUsageBasedCreate", + "line": 356 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_c *ChargeUsageBasedCreate) AddRuns(v ...*ChargeUsageBasedRuns) *ChargeUsageBasedCreate", + "line": 362 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_c *ChargeUsageBasedCreate) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedCreate", + "line": 371 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_c *ChargeUsageBasedCreate) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedCreate", + "line": 377 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_c *ChargeUsageBasedCreate) SetCurrentRunID(id string) *ChargeUsageBasedCreate", + "line": 386 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableCurrentRunID(id *string) *ChargeUsageBasedCreate", + "line": 392 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_c *ChargeUsageBasedCreate) SetCurrentRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedCreate", + "line": 400 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeUsageBasedCreate) SetChargeID(id string) *ChargeUsageBasedCreate", + "line": 405 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_c *ChargeUsageBasedCreate) SetNillableChargeID(id *string) *ChargeUsageBasedCreate", + "line": 411 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *ChargeUsageBasedCreate) SetCharge(v *Charge) *ChargeUsageBasedCreate", + "line": 419 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscription(v *Subscription) *ChargeUsageBasedCreate", + "line": 424 + }, + { + "kind": "func", + "name": "SetSubscriptionPhase", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscriptionPhase(v *SubscriptionPhase) *ChargeUsageBasedCreate", + "line": 429 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_c *ChargeUsageBasedCreate) SetSubscriptionItem(v *SubscriptionItem) *ChargeUsageBasedCreate", + "line": 434 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *ChargeUsageBasedCreate) SetCustomer(v *Customer) *ChargeUsageBasedCreate", + "line": 439 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_c *ChargeUsageBasedCreate) SetFeature(v *Feature) *ChargeUsageBasedCreate", + "line": 444 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *ChargeUsageBasedCreate) SetTaxCode(v *TaxCode) *ChargeUsageBasedCreate", + "line": 449 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedCreate) Mutation() *ChargeUsageBasedMutation", + "line": 454 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedCreate) Save(ctx context.Context) (*ChargeUsageBased, error)", + "line": 459 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedCreate) SaveX(ctx context.Context) *ChargeUsageBased", + "line": 465 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedCreate) Exec(ctx context.Context) error", + "line": 474 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedCreate) ExecX(ctx context.Context)", + "line": 480 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedCreate) defaults()", + "line": 487 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedCreate) check() error", + "line": 503 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedCreate) sqlSave(ctx context.Context) (*ChargeUsageBased, error)", + "line": 641 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedCreate) createSpec() (*ChargeUsageBased, *sqlgraph.CreateSpec, error)", + "line": 667 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedUpsertOne", + "line": 979 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedUpsertOne", + "line": 992 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsert", + "line": 1013 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateServicePeriodFrom() *ChargeUsageBasedUpsert", + "line": 1019 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) SetServicePeriodTo(v time.Time) *ChargeUsageBasedUpsert", + "line": 1025 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateServicePeriodTo() *ChargeUsageBasedUpsert", + "line": 1031 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedUpsert", + "line": 1037 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateBillingPeriodFrom() *ChargeUsageBasedUpsert", + "line": 1043 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedUpsert", + "line": 1049 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateBillingPeriodTo() *ChargeUsageBasedUpsert", + "line": 1055 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsert", + "line": 1061 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateFullServicePeriodFrom() *ChargeUsageBasedUpsert", + "line": 1067 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedUpsert", + "line": 1073 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateFullServicePeriodTo() *ChargeUsageBasedUpsert", + "line": 1079 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedUpsert) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedUpsert", + "line": 1085 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateStatus() *ChargeUsageBasedUpsert", + "line": 1091 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeUsageBasedUpsert) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedUpsert", + "line": 1097 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateManagedBy() *ChargeUsageBasedUpsert", + "line": 1103 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsert) SetSubscriptionItemID(v string) *ChargeUsageBasedUpsert", + "line": 1109 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateSubscriptionItemID() *ChargeUsageBasedUpsert", + "line": 1115 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsert) ClearSubscriptionItemID() *ChargeUsageBasedUpsert", + "line": 1121 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsert) SetAdvanceAfter(v time.Time) *ChargeUsageBasedUpsert", + "line": 1127 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateAdvanceAfter() *ChargeUsageBasedUpsert", + "line": 1133 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsert) ClearAdvanceAfter() *ChargeUsageBasedUpsert", + "line": 1139 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsert) SetTaxCodeID(v string) *ChargeUsageBasedUpsert", + "line": 1145 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateTaxCodeID() *ChargeUsageBasedUpsert", + "line": 1151 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsert) ClearTaxCodeID() *ChargeUsageBasedUpsert", + "line": 1157 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedUpsert", + "line": 1163 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateTaxBehavior() *ChargeUsageBasedUpsert", + "line": 1169 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsert) ClearTaxBehavior() *ChargeUsageBasedUpsert", + "line": 1175 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedUpsert) SetAnnotations(v models.Annotations) *ChargeUsageBasedUpsert", + "line": 1181 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateAnnotations() *ChargeUsageBasedUpsert", + "line": 1187 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedUpsert) ClearAnnotations() *ChargeUsageBasedUpsert", + "line": 1193 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedUpsert) SetMetadata(v map[string]string) *ChargeUsageBasedUpsert", + "line": 1199 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateMetadata() *ChargeUsageBasedUpsert", + "line": 1205 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedUpsert) ClearMetadata() *ChargeUsageBasedUpsert", + "line": 1211 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedUpsert", + "line": 1217 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateUpdatedAt() *ChargeUsageBasedUpsert", + "line": 1223 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedUpsert", + "line": 1229 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateDeletedAt() *ChargeUsageBasedUpsert", + "line": 1235 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsert) ClearDeletedAt() *ChargeUsageBasedUpsert", + "line": 1241 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedUpsert) SetName(v string) *ChargeUsageBasedUpsert", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateName() *ChargeUsageBasedUpsert", + "line": 1253 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedUpsert) SetDescription(v string) *ChargeUsageBasedUpsert", + "line": 1259 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateDescription() *ChargeUsageBasedUpsert", + "line": 1265 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedUpsert) ClearDescription() *ChargeUsageBasedUpsert", + "line": 1271 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsert) SetInvoiceAt(v time.Time) *ChargeUsageBasedUpsert", + "line": 1277 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateInvoiceAt() *ChargeUsageBasedUpsert", + "line": 1283 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeUsageBasedUpsert) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedUpsert", + "line": 1289 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateDiscounts() *ChargeUsageBasedUpsert", + "line": 1295 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeUsageBasedUpsert) ClearDiscounts() *ChargeUsageBasedUpsert", + "line": 1301 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeUsageBasedUpsert) SetFeatureID(v string) *ChargeUsageBasedUpsert", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateFeatureID() *ChargeUsageBasedUpsert", + "line": 1313 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsert) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedUpsert", + "line": 1319 + }, + { + "kind": "func", + "name": "UpdateRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateRatingEngine() *ChargeUsageBasedUpsert", + "line": 1325 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsert) SetCurrentRealizationRunID(v string) *ChargeUsageBasedUpsert", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateCurrentRealizationRunID() *ChargeUsageBasedUpsert", + "line": 1337 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsert) ClearCurrentRealizationRunID() *ChargeUsageBasedUpsert", + "line": 1343 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsert) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedUpsert", + "line": 1349 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsert) UpdateStatusDetailed() *ChargeUsageBasedUpsert", + "line": 1355 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateNewValues() *ChargeUsageBasedUpsertOne", + "line": 1371 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedUpsertOne) Ignore() *ChargeUsageBasedUpsertOne", + "line": 1417 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedUpsertOne) DoNothing() *ChargeUsageBasedUpsertOne", + "line": 1424 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedUpsertOne) Update(set func(*ChargeUsageBasedUpsert)) *ChargeUsageBasedUpsertOne", + "line": 1431 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1439 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateServicePeriodFrom() *ChargeUsageBasedUpsertOne", + "line": 1446 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1453 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateServicePeriodTo() *ChargeUsageBasedUpsertOne", + "line": 1460 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1467 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateBillingPeriodFrom() *ChargeUsageBasedUpsertOne", + "line": 1474 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1481 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateBillingPeriodTo() *ChargeUsageBasedUpsertOne", + "line": 1488 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1495 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateFullServicePeriodFrom() *ChargeUsageBasedUpsertOne", + "line": 1502 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1509 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateFullServicePeriodTo() *ChargeUsageBasedUpsertOne", + "line": 1516 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedUpsertOne", + "line": 1523 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateStatus() *ChargeUsageBasedUpsertOne", + "line": 1530 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedUpsertOne", + "line": 1537 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateManagedBy() *ChargeUsageBasedUpsertOne", + "line": 1544 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetSubscriptionItemID(v string) *ChargeUsageBasedUpsertOne", + "line": 1551 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateSubscriptionItemID() *ChargeUsageBasedUpsertOne", + "line": 1558 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearSubscriptionItemID() *ChargeUsageBasedUpsertOne", + "line": 1565 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetAdvanceAfter(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1572 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateAdvanceAfter() *ChargeUsageBasedUpsertOne", + "line": 1579 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearAdvanceAfter() *ChargeUsageBasedUpsertOne", + "line": 1586 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetTaxCodeID(v string) *ChargeUsageBasedUpsertOne", + "line": 1593 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateTaxCodeID() *ChargeUsageBasedUpsertOne", + "line": 1600 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearTaxCodeID() *ChargeUsageBasedUpsertOne", + "line": 1607 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedUpsertOne", + "line": 1614 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateTaxBehavior() *ChargeUsageBasedUpsertOne", + "line": 1621 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearTaxBehavior() *ChargeUsageBasedUpsertOne", + "line": 1628 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedUpsertOne", + "line": 1635 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateAnnotations() *ChargeUsageBasedUpsertOne", + "line": 1642 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearAnnotations() *ChargeUsageBasedUpsertOne", + "line": 1649 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetMetadata(v map[string]string) *ChargeUsageBasedUpsertOne", + "line": 1656 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateMetadata() *ChargeUsageBasedUpsertOne", + "line": 1663 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearMetadata() *ChargeUsageBasedUpsertOne", + "line": 1670 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1677 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedUpsertOne", + "line": 1684 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1691 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateDeletedAt() *ChargeUsageBasedUpsertOne", + "line": 1698 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearDeletedAt() *ChargeUsageBasedUpsertOne", + "line": 1705 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetName(v string) *ChargeUsageBasedUpsertOne", + "line": 1712 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateName() *ChargeUsageBasedUpsertOne", + "line": 1719 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetDescription(v string) *ChargeUsageBasedUpsertOne", + "line": 1726 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateDescription() *ChargeUsageBasedUpsertOne", + "line": 1733 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearDescription() *ChargeUsageBasedUpsertOne", + "line": 1740 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetInvoiceAt(v time.Time) *ChargeUsageBasedUpsertOne", + "line": 1747 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateInvoiceAt() *ChargeUsageBasedUpsertOne", + "line": 1754 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedUpsertOne", + "line": 1761 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateDiscounts() *ChargeUsageBasedUpsertOne", + "line": 1768 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearDiscounts() *ChargeUsageBasedUpsertOne", + "line": 1775 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetFeatureID(v string) *ChargeUsageBasedUpsertOne", + "line": 1782 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateFeatureID() *ChargeUsageBasedUpsertOne", + "line": 1789 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedUpsertOne", + "line": 1796 + }, + { + "kind": "func", + "name": "UpdateRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateRatingEngine() *ChargeUsageBasedUpsertOne", + "line": 1803 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetCurrentRealizationRunID(v string) *ChargeUsageBasedUpsertOne", + "line": 1810 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateCurrentRealizationRunID() *ChargeUsageBasedUpsertOne", + "line": 1817 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertOne) ClearCurrentRealizationRunID() *ChargeUsageBasedUpsertOne", + "line": 1824 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsertOne) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedUpsertOne", + "line": 1831 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsertOne) UpdateStatusDetailed() *ChargeUsageBasedUpsertOne", + "line": 1838 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedUpsertOne) Exec(ctx context.Context) error", + "line": 1845 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedUpsertOne) ExecX(ctx context.Context)", + "line": 1853 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1860 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedUpsertOne) IDX(ctx context.Context) string", + "line": 1874 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedCreateBulk", + "signature": "type ChargeUsageBasedCreateBulk struct", + "line": 1883 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBased, error)", + "line": 1891 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBased", + "line": 1950 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedCreateBulk) Exec(ctx context.Context) error", + "line": 1959 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedCreateBulk) ExecX(ctx context.Context)", + "line": 1965 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedUpsertBulk", + "line": 1986 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedUpsertBulk", + "line": 1999 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedUpsertBulk", + "signature": "type ChargeUsageBasedUpsertBulk struct", + "line": 2008 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateNewValues() *ChargeUsageBasedUpsertBulk", + "line": 2023 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedUpsertBulk) Ignore() *ChargeUsageBasedUpsertBulk", + "line": 2071 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedUpsertBulk) DoNothing() *ChargeUsageBasedUpsertBulk", + "line": 2078 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedUpsertBulk) Update(set func(*ChargeUsageBasedUpsert)) *ChargeUsageBasedUpsertBulk", + "line": 2085 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2093 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateServicePeriodFrom() *ChargeUsageBasedUpsertBulk", + "line": 2100 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2107 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateServicePeriodTo() *ChargeUsageBasedUpsertBulk", + "line": 2114 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2121 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateBillingPeriodFrom() *ChargeUsageBasedUpsertBulk", + "line": 2128 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2135 + }, + { + "kind": "func", + "name": "UpdateBillingPeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateBillingPeriodTo() *ChargeUsageBasedUpsertBulk", + "line": 2142 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2149 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateFullServicePeriodFrom() *ChargeUsageBasedUpsertBulk", + "line": 2156 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2163 + }, + { + "kind": "func", + "name": "UpdateFullServicePeriodTo", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateFullServicePeriodTo() *ChargeUsageBasedUpsertBulk", + "line": 2170 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedUpsertBulk", + "line": 2177 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateStatus() *ChargeUsageBasedUpsertBulk", + "line": 2184 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedUpsertBulk", + "line": 2191 + }, + { + "kind": "func", + "name": "UpdateManagedBy", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateManagedBy() *ChargeUsageBasedUpsertBulk", + "line": 2198 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetSubscriptionItemID(v string) *ChargeUsageBasedUpsertBulk", + "line": 2205 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateSubscriptionItemID() *ChargeUsageBasedUpsertBulk", + "line": 2212 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearSubscriptionItemID() *ChargeUsageBasedUpsertBulk", + "line": 2219 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetAdvanceAfter(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2226 + }, + { + "kind": "func", + "name": "UpdateAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateAdvanceAfter() *ChargeUsageBasedUpsertBulk", + "line": 2233 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearAdvanceAfter() *ChargeUsageBasedUpsertBulk", + "line": 2240 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetTaxCodeID(v string) *ChargeUsageBasedUpsertBulk", + "line": 2247 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateTaxCodeID() *ChargeUsageBasedUpsertBulk", + "line": 2254 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearTaxCodeID() *ChargeUsageBasedUpsertBulk", + "line": 2261 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedUpsertBulk", + "line": 2268 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateTaxBehavior() *ChargeUsageBasedUpsertBulk", + "line": 2275 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearTaxBehavior() *ChargeUsageBasedUpsertBulk", + "line": 2282 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetAnnotations(v models.Annotations) *ChargeUsageBasedUpsertBulk", + "line": 2289 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateAnnotations() *ChargeUsageBasedUpsertBulk", + "line": 2296 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearAnnotations() *ChargeUsageBasedUpsertBulk", + "line": 2303 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetMetadata(v map[string]string) *ChargeUsageBasedUpsertBulk", + "line": 2310 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateMetadata() *ChargeUsageBasedUpsertBulk", + "line": 2317 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearMetadata() *ChargeUsageBasedUpsertBulk", + "line": 2324 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2331 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedUpsertBulk", + "line": 2338 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2345 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedUpsertBulk", + "line": 2352 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearDeletedAt() *ChargeUsageBasedUpsertBulk", + "line": 2359 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetName(v string) *ChargeUsageBasedUpsertBulk", + "line": 2366 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateName() *ChargeUsageBasedUpsertBulk", + "line": 2373 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetDescription(v string) *ChargeUsageBasedUpsertBulk", + "line": 2380 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateDescription() *ChargeUsageBasedUpsertBulk", + "line": 2387 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearDescription() *ChargeUsageBasedUpsertBulk", + "line": 2394 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetInvoiceAt(v time.Time) *ChargeUsageBasedUpsertBulk", + "line": 2401 + }, + { + "kind": "func", + "name": "UpdateInvoiceAt", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateInvoiceAt() *ChargeUsageBasedUpsertBulk", + "line": 2408 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedUpsertBulk", + "line": 2415 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateDiscounts() *ChargeUsageBasedUpsertBulk", + "line": 2422 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearDiscounts() *ChargeUsageBasedUpsertBulk", + "line": 2429 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetFeatureID(v string) *ChargeUsageBasedUpsertBulk", + "line": 2436 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateFeatureID() *ChargeUsageBasedUpsertBulk", + "line": 2443 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedUpsertBulk", + "line": 2450 + }, + { + "kind": "func", + "name": "UpdateRatingEngine", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateRatingEngine() *ChargeUsageBasedUpsertBulk", + "line": 2457 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetCurrentRealizationRunID(v string) *ChargeUsageBasedUpsertBulk", + "line": 2464 + }, + { + "kind": "func", + "name": "UpdateCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateCurrentRealizationRunID() *ChargeUsageBasedUpsertBulk", + "line": 2471 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ClearCurrentRealizationRunID() *ChargeUsageBasedUpsertBulk", + "line": 2478 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsertBulk) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedUpsertBulk", + "line": 2485 + }, + { + "kind": "func", + "name": "UpdateStatusDetailed", + "signature": "func (u *ChargeUsageBasedUpsertBulk) UpdateStatusDetailed() *ChargeUsageBasedUpsertBulk", + "line": 2492 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedUpsertBulk) Exec(ctx context.Context) error", + "line": 2499 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedUpsertBulk) ExecX(ctx context.Context)", + "line": 2515 + } + ], + "line_count": 2519 + }, + "openmeter/ent/db/chargeusagebased_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedDelete", + "signature": "type ChargeUsageBasedDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedDelete) Where(ps ...predicate.ChargeUsageBased) *ChargeUsageBasedDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedDeleteOne", + "signature": "type ChargeUsageBasedDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedDeleteOne) Where(ps ...predicate.ChargeUsageBased) *ChargeUsageBasedDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebased_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedQuery", + "signature": "type ChargeUsageBasedQuery struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedQuery) Where(ps ...predicate.ChargeUsageBased) *ChargeUsageBasedQuery", + "line": 53 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedQuery) Limit(limit int) *ChargeUsageBasedQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedQuery) Offset(offset int) *ChargeUsageBasedQuery", + "line": 65 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedQuery) Unique(unique bool) *ChargeUsageBasedQuery", + "line": 72 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedQuery) Order(o ...chargeusagebased.OrderOption) *ChargeUsageBasedQuery", + "line": 78 + }, + { + "kind": "func", + "name": "QueryRuns", + "signature": "func (_q *ChargeUsageBasedQuery) QueryRuns() *ChargeUsageBasedRunsQuery", + "line": 84 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_q *ChargeUsageBasedQuery) QueryDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 106 + }, + { + "kind": "func", + "name": "QueryCurrentRun", + "signature": "func (_q *ChargeUsageBasedQuery) QueryCurrentRun() *ChargeUsageBasedRunsQuery", + "line": 128 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *ChargeUsageBasedQuery) QueryCharge() *ChargeQuery", + "line": 150 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *ChargeUsageBasedQuery) QuerySubscription() *SubscriptionQuery", + "line": 172 + }, + { + "kind": "func", + "name": "QuerySubscriptionPhase", + "signature": "func (_q *ChargeUsageBasedQuery) QuerySubscriptionPhase() *SubscriptionPhaseQuery", + "line": 194 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *ChargeUsageBasedQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 216 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *ChargeUsageBasedQuery) QueryCustomer() *CustomerQuery", + "line": 238 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_q *ChargeUsageBasedQuery) QueryFeature() *FeatureQuery", + "line": 260 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *ChargeUsageBasedQuery) QueryTaxCode() *TaxCodeQuery", + "line": 282 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedQuery) First(ctx context.Context) (*ChargeUsageBased, error)", + "line": 305 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedQuery) FirstX(ctx context.Context) *ChargeUsageBased", + "line": 317 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 327 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedQuery) FirstIDX(ctx context.Context) string", + "line": 340 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedQuery) Only(ctx context.Context) (*ChargeUsageBased, error)", + "line": 351 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedQuery) OnlyX(ctx context.Context) *ChargeUsageBased", + "line": 367 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 378 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedQuery) OnlyIDX(ctx context.Context) string", + "line": 395 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedQuery) All(ctx context.Context) ([]*ChargeUsageBased, error)", + "line": 404 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedQuery) AllX(ctx context.Context) []*ChargeUsageBased", + "line": 414 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 423 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedQuery) IDsX(ctx context.Context) []string", + "line": 435 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedQuery) Count(ctx context.Context) (int, error)", + "line": 444 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedQuery) CountX(ctx context.Context) int", + "line": 453 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedQuery) Exist(ctx context.Context) (bool, error)", + "line": 462 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedQuery) ExistX(ctx context.Context) bool", + "line": 475 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedQuery) Clone() *ChargeUsageBasedQuery", + "line": 485 + }, + { + "kind": "func", + "name": "WithRuns", + "signature": "func (_q *ChargeUsageBasedQuery) WithRuns(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedQuery", + "line": 513 + }, + { + "kind": "func", + "name": "WithDetailedLines", + "signature": "func (_q *ChargeUsageBasedQuery) WithDetailedLines(opts ...func(*ChargeUsageBasedRunDetailedLineQuery)) *ChargeUsageBasedQuery", + "line": 524 + }, + { + "kind": "func", + "name": "WithCurrentRun", + "signature": "func (_q *ChargeUsageBasedQuery) WithCurrentRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedQuery", + "line": 535 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *ChargeUsageBasedQuery) WithCharge(opts ...func(*ChargeQuery)) *ChargeUsageBasedQuery", + "line": 546 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *ChargeUsageBasedQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *ChargeUsageBasedQuery", + "line": 557 + }, + { + "kind": "func", + "name": "WithSubscriptionPhase", + "signature": "func (_q *ChargeUsageBasedQuery) WithSubscriptionPhase(opts ...func(*SubscriptionPhaseQuery)) *ChargeUsageBasedQuery", + "line": 568 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *ChargeUsageBasedQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *ChargeUsageBasedQuery", + "line": 579 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *ChargeUsageBasedQuery) WithCustomer(opts ...func(*CustomerQuery)) *ChargeUsageBasedQuery", + "line": 590 + }, + { + "kind": "func", + "name": "WithFeature", + "signature": "func (_q *ChargeUsageBasedQuery) WithFeature(opts ...func(*FeatureQuery)) *ChargeUsageBasedQuery", + "line": 601 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *ChargeUsageBasedQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *ChargeUsageBasedQuery", + "line": 612 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedGroupBy", + "line": 635 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedQuery) Select(fields ...string) *ChargeUsageBasedSelect", + "line": 656 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedSelect", + "line": 665 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedQuery) prepareQuery(ctx context.Context) error", + "line": 669 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBased, error)", + "line": 695 + }, + { + "kind": "func", + "name": "loadRuns", + "signature": "func (_q *ChargeUsageBasedQuery) loadRuns(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *ChargeUsageBasedRuns)) error", + "line": 800 + }, + { + "kind": "func", + "name": "loadDetailedLines", + "signature": "func (_q *ChargeUsageBasedQuery) loadDetailedLines(ctx context.Context, query *ChargeUsageBasedRunDetailedLineQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *ChargeUsageBasedRunDetailedLine)) error", + "line": 830 + }, + { + "kind": "func", + "name": "loadCurrentRun", + "signature": "func (_q *ChargeUsageBasedQuery) loadCurrentRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *ChargeUsageBasedRuns)) error", + "line": 860 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *ChargeUsageBasedQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *Charge)) error", + "line": 892 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *ChargeUsageBasedQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *Subscription)) error", + "line": 922 + }, + { + "kind": "func", + "name": "loadSubscriptionPhase", + "signature": "func (_q *ChargeUsageBasedQuery) loadSubscriptionPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *SubscriptionPhase)) error", + "line": 954 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *ChargeUsageBasedQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *SubscriptionItem)) error", + "line": 986 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *ChargeUsageBasedQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *Customer)) error", + "line": 1018 + }, + { + "kind": "func", + "name": "loadFeature", + "signature": "func (_q *ChargeUsageBasedQuery) loadFeature(ctx context.Context, query *FeatureQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *Feature)) error", + "line": 1047 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *ChargeUsageBasedQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*ChargeUsageBased, init func(*ChargeUsageBased), assign func(*ChargeUsageBased, *TaxCode)) error", + "line": 1076 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1109 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1121 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1182 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedQuery", + "line": 1220 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedQuery", + "line": 1233 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedGroupBy", + "signature": "type ChargeUsageBasedGroupBy struct", + "line": 1244 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedGroupBy", + "line": 1250 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedGroupBy) Scan(ctx context.Context, v any) error", + "line": 1256 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedQuery, v any) error", + "line": 1264 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedSelect", + "signature": "type ChargeUsageBasedSelect struct", + "line": 1292 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedSelect", + "line": 1298 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedSelect) Scan(ctx context.Context, v any) error", + "line": 1304 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedQuery, v any) error", + "line": 1312 + } + ], + "line_count": 1331 + }, + "openmeter/ent/db/chargeusagebased_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedUpdate", + "signature": "type ChargeUsageBasedUpdate struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedUpdate) Where(ps ...predicate.ChargeUsageBased) *ChargeUsageBasedUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedUpdate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedUpdate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableBillingPeriodFrom(v *time.Time) *ChargeUsageBasedUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableBillingPeriodTo(v *time.Time) *ChargeUsageBasedUpdate", + "line": 90 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeUsageBasedUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableFullServicePeriodTo(v *time.Time) *ChargeUsageBasedUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeUsageBasedUpdate) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableStatus(v *meta.ChargeStatus) *ChargeUsageBasedUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeUsageBasedUpdate) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeUsageBasedUpdate", + "line": 146 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetSubscriptionItemID(v string) *ChargeUsageBasedUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableSubscriptionItemID(v *string) *ChargeUsageBasedUpdate", + "line": 160 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearSubscriptionItemID() *ChargeUsageBasedUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdate) SetAdvanceAfter(v time.Time) *ChargeUsageBasedUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableAdvanceAfter(v *time.Time) *ChargeUsageBasedUpdate", + "line": 180 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearAdvanceAfter() *ChargeUsageBasedUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetTaxCodeID(v string) *ChargeUsageBasedUpdate", + "line": 194 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableTaxCodeID(v *string) *ChargeUsageBasedUpdate", + "line": 200 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearTaxCodeID() *ChargeUsageBasedUpdate", + "line": 208 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedUpdate", + "line": 214 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearTaxBehavior() *ChargeUsageBasedUpdate", + "line": 228 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedUpdate) SetAnnotations(v models.Annotations) *ChargeUsageBasedUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearAnnotations() *ChargeUsageBasedUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeUsageBasedUpdate) SetMetadata(v map[string]string) *ChargeUsageBasedUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearMetadata() *ChargeUsageBasedUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedUpdate", + "line": 270 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearDeletedAt() *ChargeUsageBasedUpdate", + "line": 278 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeUsageBasedUpdate) SetName(v string) *ChargeUsageBasedUpdate", + "line": 284 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableName(v *string) *ChargeUsageBasedUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeUsageBasedUpdate) SetDescription(v string) *ChargeUsageBasedUpdate", + "line": 298 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableDescription(v *string) *ChargeUsageBasedUpdate", + "line": 304 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearDescription() *ChargeUsageBasedUpdate", + "line": 312 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *ChargeUsageBasedUpdate) SetInvoiceAt(v time.Time) *ChargeUsageBasedUpdate", + "line": 318 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableInvoiceAt(v *time.Time) *ChargeUsageBasedUpdate", + "line": 324 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *ChargeUsageBasedUpdate) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedUpdate", + "line": 332 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearDiscounts() *ChargeUsageBasedUpdate", + "line": 338 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetFeatureID(v string) *ChargeUsageBasedUpdate", + "line": 344 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableFeatureID(v *string) *ChargeUsageBasedUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (_u *ChargeUsageBasedUpdate) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedUpdate", + "line": 358 + }, + { + "kind": "func", + "name": "SetNillableRatingEngine", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableRatingEngine(v *usagebased.RatingEngine) *ChargeUsageBasedUpdate", + "line": 364 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetCurrentRealizationRunID(v string) *ChargeUsageBasedUpdate", + "line": 372 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableCurrentRealizationRunID(v *string) *ChargeUsageBasedUpdate", + "line": 378 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearCurrentRealizationRunID() *ChargeUsageBasedUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeUsageBasedUpdate) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableStatusDetailed(v *usagebased.Status) *ChargeUsageBasedUpdate", + "line": 398 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_u *ChargeUsageBasedUpdate) AddRunIDs(ids ...string) *ChargeUsageBasedUpdate", + "line": 406 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_u *ChargeUsageBasedUpdate) AddRuns(v ...*ChargeUsageBasedRuns) *ChargeUsageBasedUpdate", + "line": 412 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedUpdate) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedUpdate", + "line": 421 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdate) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedUpdate", + "line": 427 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetCurrentRunID(id string) *ChargeUsageBasedUpdate", + "line": 436 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_u *ChargeUsageBasedUpdate) SetNillableCurrentRunID(id *string) *ChargeUsageBasedUpdate", + "line": 442 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_u *ChargeUsageBasedUpdate) SetCurrentRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedUpdate", + "line": 450 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeUsageBasedUpdate) SetSubscriptionItem(v *SubscriptionItem) *ChargeUsageBasedUpdate", + "line": 455 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_u *ChargeUsageBasedUpdate) SetFeature(v *Feature) *ChargeUsageBasedUpdate", + "line": 460 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeUsageBasedUpdate) SetTaxCode(v *TaxCode) *ChargeUsageBasedUpdate", + "line": 465 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedUpdate) Mutation() *ChargeUsageBasedMutation", + "line": 470 + }, + { + "kind": "func", + "name": "ClearRuns", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearRuns() *ChargeUsageBasedUpdate", + "line": 475 + }, + { + "kind": "func", + "name": "RemoveRunIDs", + "signature": "func (_u *ChargeUsageBasedUpdate) RemoveRunIDs(ids ...string) *ChargeUsageBasedUpdate", + "line": 481 + }, + { + "kind": "func", + "name": "RemoveRuns", + "signature": "func (_u *ChargeUsageBasedUpdate) RemoveRuns(v ...*ChargeUsageBasedRuns) *ChargeUsageBasedUpdate", + "line": 487 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearDetailedLines() *ChargeUsageBasedUpdate", + "line": 496 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedUpdate) RemoveDetailedLineIDs(ids ...string) *ChargeUsageBasedUpdate", + "line": 502 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdate) RemoveDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedUpdate", + "line": 508 + }, + { + "kind": "func", + "name": "ClearCurrentRun", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearCurrentRun() *ChargeUsageBasedUpdate", + "line": 517 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearSubscriptionItem() *ChargeUsageBasedUpdate", + "line": 523 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearFeature() *ChargeUsageBasedUpdate", + "line": 529 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeUsageBasedUpdate) ClearTaxCode() *ChargeUsageBasedUpdate", + "line": 535 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedUpdate) Save(ctx context.Context) (int, error)", + "line": 541 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedUpdate) SaveX(ctx context.Context) int", + "line": 547 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedUpdate) Exec(ctx context.Context) error", + "line": 556 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedUpdate) ExecX(ctx context.Context)", + "line": 562 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedUpdate) defaults()", + "line": 569 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedUpdate) check() error", + "line": 577 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 622 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedUpdateOne", + "signature": "type ChargeUsageBasedUpdateOne struct", + "line": 941 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 949 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 955 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 963 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 969 + }, + { + "kind": "func", + "name": "SetBillingPeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetBillingPeriodFrom(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 977 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableBillingPeriodFrom(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 983 + }, + { + "kind": "func", + "name": "SetBillingPeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetBillingPeriodTo(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 991 + }, + { + "kind": "func", + "name": "SetNillableBillingPeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableBillingPeriodTo(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 997 + }, + { + "kind": "func", + "name": "SetFullServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetFullServicePeriodFrom(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1005 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableFullServicePeriodFrom(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 1011 + }, + { + "kind": "func", + "name": "SetFullServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetFullServicePeriodTo(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1019 + }, + { + "kind": "func", + "name": "SetNillableFullServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableFullServicePeriodTo(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 1025 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetStatus(v meta.ChargeStatus) *ChargeUsageBasedUpdateOne", + "line": 1033 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableStatus(v *meta.ChargeStatus) *ChargeUsageBasedUpdateOne", + "line": 1039 + }, + { + "kind": "func", + "name": "SetManagedBy", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetManagedBy(v billing.InvoiceLineManagedBy) *ChargeUsageBasedUpdateOne", + "line": 1047 + }, + { + "kind": "func", + "name": "SetNillableManagedBy", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableManagedBy(v *billing.InvoiceLineManagedBy) *ChargeUsageBasedUpdateOne", + "line": 1053 + }, + { + "kind": "func", + "name": "SetSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetSubscriptionItemID(v string) *ChargeUsageBasedUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "SetNillableSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableSubscriptionItemID(v *string) *ChargeUsageBasedUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "ClearSubscriptionItemID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearSubscriptionItemID() *ChargeUsageBasedUpdateOne", + "line": 1075 + }, + { + "kind": "func", + "name": "SetAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetAdvanceAfter(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1081 + }, + { + "kind": "func", + "name": "SetNillableAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableAdvanceAfter(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 1087 + }, + { + "kind": "func", + "name": "ClearAdvanceAfter", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearAdvanceAfter() *ChargeUsageBasedUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetTaxCodeID(v string) *ChargeUsageBasedUpdateOne", + "line": 1101 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableTaxCodeID(v *string) *ChargeUsageBasedUpdateOne", + "line": 1107 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearTaxCodeID() *ChargeUsageBasedUpdateOne", + "line": 1115 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedUpdateOne", + "line": 1127 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearTaxBehavior() *ChargeUsageBasedUpdateOne", + "line": 1135 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedUpdateOne", + "line": 1141 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearAnnotations() *ChargeUsageBasedUpdateOne", + "line": 1147 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetMetadata(v map[string]string) *ChargeUsageBasedUpdateOne", + "line": 1153 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearMetadata() *ChargeUsageBasedUpdateOne", + "line": 1159 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1165 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1171 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 1177 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearDeletedAt() *ChargeUsageBasedUpdateOne", + "line": 1185 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetName(v string) *ChargeUsageBasedUpdateOne", + "line": 1191 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableName(v *string) *ChargeUsageBasedUpdateOne", + "line": 1197 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetDescription(v string) *ChargeUsageBasedUpdateOne", + "line": 1205 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableDescription(v *string) *ChargeUsageBasedUpdateOne", + "line": 1211 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearDescription() *ChargeUsageBasedUpdateOne", + "line": 1219 + }, + { + "kind": "func", + "name": "SetInvoiceAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetInvoiceAt(v time.Time) *ChargeUsageBasedUpdateOne", + "line": 1225 + }, + { + "kind": "func", + "name": "SetNillableInvoiceAt", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableInvoiceAt(v *time.Time) *ChargeUsageBasedUpdateOne", + "line": 1231 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetDiscounts(v *productcatalog.Discounts) *ChargeUsageBasedUpdateOne", + "line": 1239 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearDiscounts() *ChargeUsageBasedUpdateOne", + "line": 1245 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetFeatureID(v string) *ChargeUsageBasedUpdateOne", + "line": 1251 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableFeatureID(v *string) *ChargeUsageBasedUpdateOne", + "line": 1257 + }, + { + "kind": "func", + "name": "SetRatingEngine", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetRatingEngine(v usagebased.RatingEngine) *ChargeUsageBasedUpdateOne", + "line": 1265 + }, + { + "kind": "func", + "name": "SetNillableRatingEngine", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableRatingEngine(v *usagebased.RatingEngine) *ChargeUsageBasedUpdateOne", + "line": 1271 + }, + { + "kind": "func", + "name": "SetCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetCurrentRealizationRunID(v string) *ChargeUsageBasedUpdateOne", + "line": 1279 + }, + { + "kind": "func", + "name": "SetNillableCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableCurrentRealizationRunID(v *string) *ChargeUsageBasedUpdateOne", + "line": 1285 + }, + { + "kind": "func", + "name": "ClearCurrentRealizationRunID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearCurrentRealizationRunID() *ChargeUsageBasedUpdateOne", + "line": 1293 + }, + { + "kind": "func", + "name": "SetStatusDetailed", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetStatusDetailed(v usagebased.Status) *ChargeUsageBasedUpdateOne", + "line": 1299 + }, + { + "kind": "func", + "name": "SetNillableStatusDetailed", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableStatusDetailed(v *usagebased.Status) *ChargeUsageBasedUpdateOne", + "line": 1305 + }, + { + "kind": "func", + "name": "AddRunIDs", + "signature": "func (_u *ChargeUsageBasedUpdateOne) AddRunIDs(ids ...string) *ChargeUsageBasedUpdateOne", + "line": 1313 + }, + { + "kind": "func", + "name": "AddRuns", + "signature": "func (_u *ChargeUsageBasedUpdateOne) AddRuns(v ...*ChargeUsageBasedRuns) *ChargeUsageBasedUpdateOne", + "line": 1319 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedUpdateOne) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedUpdateOne", + "line": 1328 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdateOne) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedUpdateOne", + "line": 1334 + }, + { + "kind": "func", + "name": "SetCurrentRunID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetCurrentRunID(id string) *ChargeUsageBasedUpdateOne", + "line": 1343 + }, + { + "kind": "func", + "name": "SetNillableCurrentRunID", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetNillableCurrentRunID(id *string) *ChargeUsageBasedUpdateOne", + "line": 1349 + }, + { + "kind": "func", + "name": "SetCurrentRun", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetCurrentRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedUpdateOne", + "line": 1357 + }, + { + "kind": "func", + "name": "SetSubscriptionItem", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetSubscriptionItem(v *SubscriptionItem) *ChargeUsageBasedUpdateOne", + "line": 1362 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetFeature(v *Feature) *ChargeUsageBasedUpdateOne", + "line": 1367 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SetTaxCode(v *TaxCode) *ChargeUsageBasedUpdateOne", + "line": 1372 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedUpdateOne) Mutation() *ChargeUsageBasedMutation", + "line": 1377 + }, + { + "kind": "func", + "name": "ClearRuns", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearRuns() *ChargeUsageBasedUpdateOne", + "line": 1382 + }, + { + "kind": "func", + "name": "RemoveRunIDs", + "signature": "func (_u *ChargeUsageBasedUpdateOne) RemoveRunIDs(ids ...string) *ChargeUsageBasedUpdateOne", + "line": 1388 + }, + { + "kind": "func", + "name": "RemoveRuns", + "signature": "func (_u *ChargeUsageBasedUpdateOne) RemoveRuns(v ...*ChargeUsageBasedRuns) *ChargeUsageBasedUpdateOne", + "line": 1394 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearDetailedLines() *ChargeUsageBasedUpdateOne", + "line": 1403 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedUpdateOne) RemoveDetailedLineIDs(ids ...string) *ChargeUsageBasedUpdateOne", + "line": 1409 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeUsageBasedUpdateOne) RemoveDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedUpdateOne", + "line": 1415 + }, + { + "kind": "func", + "name": "ClearCurrentRun", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearCurrentRun() *ChargeUsageBasedUpdateOne", + "line": 1424 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearSubscriptionItem() *ChargeUsageBasedUpdateOne", + "line": 1430 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearFeature() *ChargeUsageBasedUpdateOne", + "line": 1436 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ClearTaxCode() *ChargeUsageBasedUpdateOne", + "line": 1442 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedUpdateOne) Where(ps ...predicate.ChargeUsageBased) *ChargeUsageBasedUpdateOne", + "line": 1448 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedUpdateOne", + "line": 1455 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedUpdateOne) Save(ctx context.Context) (*ChargeUsageBased, error)", + "line": 1461 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedUpdateOne) SaveX(ctx context.Context) *ChargeUsageBased", + "line": 1467 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedUpdateOne) Exec(ctx context.Context) error", + "line": 1476 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedUpdateOne) ExecX(ctx context.Context)", + "line": 1482 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedUpdateOne) defaults()", + "line": 1489 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedUpdateOne) check() error", + "line": 1497 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBased, err error)", + "line": 1542 + } + ], + "line_count": 1878 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocations", + "signature": "type ChargeUsageBasedRunCreditAllocations struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsEdges", + "signature": "type ChargeUsageBasedRunCreditAllocationsEdges struct", + "line": 60 + }, + { + "kind": "func", + "name": "CorrectionsOrErr", + "signature": "func (e ChargeUsageBasedRunCreditAllocationsEdges) CorrectionsOrErr() ([]*ChargeUsageBasedRunCreditAllocations, error)", + "line": 74 + }, + { + "kind": "func", + "name": "AllocationOrErr", + "signature": "func (e ChargeUsageBasedRunCreditAllocationsEdges) AllocationOrErr() (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 83 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeUsageBasedRunCreditAllocationsEdges) RunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 94 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) assignValues(columns []string, values []any) error", + "line": 127 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) Value(name string) (ent.Value, error)", + "line": 237 + }, + { + "kind": "func", + "name": "QueryCorrections", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) QueryCorrections() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 242 + }, + { + "kind": "func", + "name": "QueryAllocation", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) QueryAllocation() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 247 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 252 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) Update() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 259 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) Unwrap() *ChargeUsageBasedRunCreditAllocations", + "line": 265 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocations) String() string", + "line": 275 + } + ], + "line_count": 331 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations/chargeusagebasedruncreditallocations.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 92 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type creditrealization.Type) error", + "line": 121 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByLedgerTransactionGroupID", + "signature": "func ByLedgerTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "BySortHint", + "signature": "func BySortHint(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByCorrectsRealizationID", + "signature": "func ByCorrectsRealizationID(opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 179 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 184 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 189 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 194 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "ByCorrectionsCount", + "signature": "func ByCorrectionsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "ByCorrections", + "signature": "func ByCorrections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 211 + }, + { + "kind": "func", + "name": "ByAllocationField", + "signature": "func ByAllocationField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 218 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 225 + }, + { + "kind": "func", + "name": "newCorrectionsStep", + "signature": "func newCorrectionsStep() *sqlgraph.Step", + "line": 230 + }, + { + "kind": "func", + "name": "newAllocationStep", + "signature": "func newAllocationStep() *sqlgraph.Step", + "line": 237 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 244 + } + ], + "line_count": 250 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 66 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 71 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 86 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupID", + "signature": "func LedgerTransactionGroupID(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 91 + }, + { + "kind": "func", + "name": "SortHint", + "signature": "func SortHint(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 96 + }, + { + "kind": "func", + "name": "CorrectsRealizationID", + "signature": "func CorrectsRealizationID(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 101 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 106 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 111 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 116 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 121 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 126 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 131 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 136 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 141 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 146 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 151 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 156 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 161 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 166 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 171 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 176 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 181 + }, + { + "kind": "func", + "name": "LineIDIsNil", + "signature": "func LineIDIsNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 186 + }, + { + "kind": "func", + "name": "LineIDNotNil", + "signature": "func LineIDNotNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 191 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 196 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 201 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 206 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 211 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 216 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 221 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 226 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 231 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 236 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 241 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 246 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 251 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 256 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 261 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 266 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 271 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 276 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 281 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 286 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 291 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 296 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 301 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 306 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 311 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 316 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 321 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEQ", + "signature": "func LedgerTransactionGroupIDEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 326 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNEQ", + "signature": "func LedgerTransactionGroupIDNEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 331 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIn", + "signature": "func LedgerTransactionGroupIDIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 336 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotIn", + "signature": "func LedgerTransactionGroupIDNotIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 341 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGT", + "signature": "func LedgerTransactionGroupIDGT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 346 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGTE", + "signature": "func LedgerTransactionGroupIDGTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 351 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLT", + "signature": "func LedgerTransactionGroupIDLT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 356 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLTE", + "signature": "func LedgerTransactionGroupIDLTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 361 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContains", + "signature": "func LedgerTransactionGroupIDContains(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 366 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasPrefix", + "signature": "func LedgerTransactionGroupIDHasPrefix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 371 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasSuffix", + "signature": "func LedgerTransactionGroupIDHasSuffix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 376 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEqualFold", + "signature": "func LedgerTransactionGroupIDEqualFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 381 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContainsFold", + "signature": "func LedgerTransactionGroupIDContainsFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 386 + }, + { + "kind": "func", + "name": "SortHintEQ", + "signature": "func SortHintEQ(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 391 + }, + { + "kind": "func", + "name": "SortHintNEQ", + "signature": "func SortHintNEQ(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 396 + }, + { + "kind": "func", + "name": "SortHintIn", + "signature": "func SortHintIn(vs ...int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 401 + }, + { + "kind": "func", + "name": "SortHintNotIn", + "signature": "func SortHintNotIn(vs ...int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 406 + }, + { + "kind": "func", + "name": "SortHintGT", + "signature": "func SortHintGT(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 411 + }, + { + "kind": "func", + "name": "SortHintGTE", + "signature": "func SortHintGTE(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 416 + }, + { + "kind": "func", + "name": "SortHintLT", + "signature": "func SortHintLT(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 421 + }, + { + "kind": "func", + "name": "SortHintLTE", + "signature": "func SortHintLTE(v int) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 426 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v creditrealization.Type) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 431 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v creditrealization.Type) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 437 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...creditrealization.Type) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 443 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...creditrealization.Type) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 452 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDEQ", + "signature": "func CorrectsRealizationIDEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 461 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNEQ", + "signature": "func CorrectsRealizationIDNEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 466 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDIn", + "signature": "func CorrectsRealizationIDIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 471 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNotIn", + "signature": "func CorrectsRealizationIDNotIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 476 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDGT", + "signature": "func CorrectsRealizationIDGT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 481 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDGTE", + "signature": "func CorrectsRealizationIDGTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 486 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDLT", + "signature": "func CorrectsRealizationIDLT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 491 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDLTE", + "signature": "func CorrectsRealizationIDLTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 496 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDContains", + "signature": "func CorrectsRealizationIDContains(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 501 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDHasPrefix", + "signature": "func CorrectsRealizationIDHasPrefix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 506 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDHasSuffix", + "signature": "func CorrectsRealizationIDHasSuffix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 511 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDIsNil", + "signature": "func CorrectsRealizationIDIsNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 516 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDNotNil", + "signature": "func CorrectsRealizationIDNotNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 521 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDEqualFold", + "signature": "func CorrectsRealizationIDEqualFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 526 + }, + { + "kind": "func", + "name": "CorrectsRealizationIDContainsFold", + "signature": "func CorrectsRealizationIDContainsFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 531 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 536 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 541 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 546 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 551 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 556 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 561 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 566 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 571 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 576 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 581 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 586 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 591 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 596 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 601 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 606 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 611 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 616 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 621 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 626 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 631 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 636 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 641 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 646 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 651 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 656 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 661 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 666 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 671 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 676 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 681 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 686 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 691 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 696 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 701 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 706 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 711 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 716 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 721 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 726 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 731 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 736 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 741 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 746 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 751 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 756 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 761 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 766 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 771 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 776 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 781 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 786 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 791 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 796 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 801 + }, + { + "kind": "func", + "name": "HasCorrections", + "signature": "func HasCorrections() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 806 + }, + { + "kind": "func", + "name": "HasCorrectionsWith", + "signature": "func HasCorrectionsWith(preds ...predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 817 + }, + { + "kind": "func", + "name": "HasAllocation", + "signature": "func HasAllocation() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 829 + }, + { + "kind": "func", + "name": "HasAllocationWith", + "signature": "func HasAllocationWith(preds ...predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 840 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeUsageBasedRunCreditAllocations", + "line": 852 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 863 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 875 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 880 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRunCreditAllocations", + "line": 885 + } + ], + "line_count": 887 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsCreate", + "signature": "type ChargeUsageBasedRunCreditAllocationsCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableLineID(v *string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 45 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 51 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetType(v creditrealization.Type) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableCorrectsRealizationID(v *string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNamespace(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 107 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetRunID(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetID(v string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableID(v *string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 161 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) AddCorrectionIDs(ids ...string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 169 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) AddCorrections(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetAllocationID(id string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetNillableAllocationID(id *string) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetAllocation(v *ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunCreditAllocationsCreate", + "line": 203 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) Mutation() *ChargeUsageBasedRunCreditAllocationsMutation", + "line": 208 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) Save(ctx context.Context) (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 213 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) SaveX(ctx context.Context) *ChargeUsageBasedRunCreditAllocations", + "line": 219 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) Exec(ctx context.Context) error", + "line": 228 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) ExecX(ctx context.Context)", + "line": 234 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) defaults()", + "line": 241 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) check() error", + "line": 257 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) sqlSave(ctx context.Context) (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 319 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) createSpec() (*ChargeUsageBasedRunCreditAllocations, *sqlgraph.CreateSpec)", + "line": 342 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 469 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 482 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 503 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateLineID() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 509 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) ClearLineID() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 515 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 521 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateAmount() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 527 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 533 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateServicePeriodFrom() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 539 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 545 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateServicePeriodTo() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 551 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 557 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateSortHint() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 563 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) AddSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 569 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 575 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 581 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) ClearCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 587 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 593 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateUpdatedAt() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 599 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 605 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 611 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) ClearDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 617 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 623 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) UpdateAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 629 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsert) ClearAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsert", + "line": 635 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateNewValues() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 651 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) Ignore() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 682 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) DoNothing() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 689 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) Update(set func(*ChargeUsageBasedRunCreditAllocationsUpsert)) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 696 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateLineID() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 711 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ClearLineID() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 718 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 725 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateAmount() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 732 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 739 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateServicePeriodFrom() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 746 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 753 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateServicePeriodTo() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 760 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 767 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) AddSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 774 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateSortHint() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 781 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 788 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 795 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ClearCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 802 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 809 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 816 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 823 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 830 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ClearDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 837 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 844 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) UpdateAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 851 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ClearAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsertOne", + "line": 858 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) Exec(ctx context.Context) error", + "line": 865 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ExecX(ctx context.Context)", + "line": 873 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 880 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertOne) IDX(ctx context.Context) string", + "line": 894 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsCreateBulk", + "signature": "type ChargeUsageBasedRunCreditAllocationsCreateBulk struct", + "line": 903 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBasedRunCreditAllocations, error)", + "line": 911 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBasedRunCreditAllocations", + "line": 967 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) Exec(ctx context.Context) error", + "line": 976 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) ExecX(ctx context.Context)", + "line": 982 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1003 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunCreditAllocationsCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1016 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "signature": "type ChargeUsageBasedRunCreditAllocationsUpsertBulk struct", + "line": 1025 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateNewValues() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1040 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) Ignore() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1073 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) DoNothing() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1080 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) Update(set func(*ChargeUsageBasedRunCreditAllocationsUpsert)) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1087 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1095 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateLineID() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1102 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) ClearLineID() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1109 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1116 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateAmount() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1123 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1130 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateServicePeriodFrom() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1137 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1144 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateServicePeriodTo() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1151 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1158 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) AddSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1165 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateSortHint() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1172 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1179 + }, + { + "kind": "func", + "name": "UpdateCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1186 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) ClearCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1193 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1200 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1207 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1214 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1221 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) ClearDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1228 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1235 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) UpdateAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1242 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) ClearAnnotations() *ChargeUsageBasedRunCreditAllocationsUpsertBulk", + "line": 1249 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) Exec(ctx context.Context) error", + "line": 1256 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpsertBulk) ExecX(ctx context.Context)", + "line": 1272 + } + ], + "line_count": 1276 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsDelete", + "signature": "type ChargeUsageBasedRunCreditAllocationsDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDelete) Where(ps ...predicate.ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsDeleteOne", + "signature": "type ChargeUsageBasedRunCreditAllocationsDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDeleteOne) Where(ps ...predicate.ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunCreditAllocationsDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsQuery", + "signature": "type ChargeUsageBasedRunCreditAllocationsQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Where(ps ...predicate.ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Limit(limit int) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Offset(offset int) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Unique(unique bool) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Order(o ...chargeusagebasedruncreditallocations.OrderOption) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryCorrections", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) QueryCorrections() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryAllocation", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) QueryAllocation() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 91 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 113 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) First(ctx context.Context) (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) FirstX(ctx context.Context) *ChargeUsageBasedRunCreditAllocations", + "line": 148 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 158 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) FirstIDX(ctx context.Context) string", + "line": 171 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Only(ctx context.Context) (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 182 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) OnlyX(ctx context.Context) *ChargeUsageBasedRunCreditAllocations", + "line": 198 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 209 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) OnlyIDX(ctx context.Context) string", + "line": 226 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) All(ctx context.Context) ([]*ChargeUsageBasedRunCreditAllocations, error)", + "line": 235 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) AllX(ctx context.Context) []*ChargeUsageBasedRunCreditAllocations", + "line": 245 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 254 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) IDsX(ctx context.Context) []string", + "line": 266 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Count(ctx context.Context) (int, error)", + "line": 275 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) CountX(ctx context.Context) int", + "line": 284 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Exist(ctx context.Context) (bool, error)", + "line": 293 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) ExistX(ctx context.Context) bool", + "line": 306 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Clone() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 316 + }, + { + "kind": "func", + "name": "WithCorrections", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) WithCorrections(opts ...func(*ChargeUsageBasedRunCreditAllocationsQuery)) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 337 + }, + { + "kind": "func", + "name": "WithAllocation", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) WithAllocation(opts ...func(*ChargeUsageBasedRunCreditAllocationsQuery)) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 348 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) WithRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 359 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedRunCreditAllocationsGroupBy", + "line": 382 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Select(fields ...string) *ChargeUsageBasedRunCreditAllocationsSelect", + "line": 403 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunCreditAllocationsSelect", + "line": 412 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) prepareQuery(ctx context.Context) error", + "line": 416 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBasedRunCreditAllocations, error)", + "line": 442 + }, + { + "kind": "func", + "name": "loadCorrections", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) loadCorrections(ctx context.Context, query *ChargeUsageBasedRunCreditAllocationsQuery, nodes []*ChargeUsageBasedRunCreditAllocations, init func(*ChargeUsageBasedRunCreditAllocations), assign func(*ChargeUsageBasedRunCreditAllocations, *ChargeUsageBasedRunCreditAllocations)) error", + "line": 501 + }, + { + "kind": "func", + "name": "loadAllocation", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) loadAllocation(ctx context.Context, query *ChargeUsageBasedRunCreditAllocationsQuery, nodes []*ChargeUsageBasedRunCreditAllocations, init func(*ChargeUsageBasedRunCreditAllocations), assign func(*ChargeUsageBasedRunCreditAllocations, *ChargeUsageBasedRunCreditAllocations)) error", + "line": 534 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) loadRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBasedRunCreditAllocations, init func(*ChargeUsageBasedRunCreditAllocations), assign func(*ChargeUsageBasedRunCreditAllocations, *ChargeUsageBasedRuns)) error", + "line": 566 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) sqlCount(ctx context.Context) (int, error)", + "line": 596 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) querySpec() *sqlgraph.QuerySpec", + "line": 608 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 654 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 692 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedRunCreditAllocationsQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 705 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsGroupBy", + "signature": "type ChargeUsageBasedRunCreditAllocationsGroupBy struct", + "line": 716 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedRunCreditAllocationsGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunCreditAllocationsGroupBy", + "line": 722 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedRunCreditAllocationsGroupBy) Scan(ctx context.Context, v any) error", + "line": 728 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedRunCreditAllocationsGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedRunCreditAllocationsQuery, v any) error", + "line": 736 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsSelect", + "signature": "type ChargeUsageBasedRunCreditAllocationsSelect struct", + "line": 764 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedRunCreditAllocationsSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunCreditAllocationsSelect", + "line": 770 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedRunCreditAllocationsSelect) Scan(ctx context.Context, v any) error", + "line": 776 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedRunCreditAllocationsSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedRunCreditAllocationsQuery, v any) error", + "line": 784 + } + ], + "line_count": 803 + }, + "openmeter/ent/db/chargeusagebasedruncreditallocations_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsUpdate", + "signature": "type ChargeUsageBasedRunCreditAllocationsUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) Where(ps ...predicate.ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableLineID(v *string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearLineID() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableSortHint(v *int) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) AddSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableCorrectsRealizationID(v *string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 123 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearAnnotations() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) AddCorrectionIDs(ids ...string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) AddCorrections(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetAllocationID(id string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetNillableAllocationID(id *string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SetAllocation(v *ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) Mutation() *ChargeUsageBasedRunCreditAllocationsMutation", + "line": 209 + }, + { + "kind": "func", + "name": "ClearCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearCorrections() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 214 + }, + { + "kind": "func", + "name": "RemoveCorrectionIDs", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) RemoveCorrectionIDs(ids ...string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "RemoveCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) RemoveCorrections(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "ClearAllocation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ClearAllocation() *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) Save(ctx context.Context) (int, error)", + "line": 241 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) SaveX(ctx context.Context) int", + "line": 247 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) Exec(ctx context.Context) error", + "line": 256 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) ExecX(ctx context.Context)", + "line": 262 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) defaults()", + "line": 269 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) check() error", + "line": 277 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 294 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocationsUpdateOne", + "signature": "type ChargeUsageBasedRunCreditAllocationsUpdateOne struct", + "line": 429 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetLineID(v string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableLineID(v *string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 443 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearLineID() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 451 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 457 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 463 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 499 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableSortHint(v *int) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 506 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) AddSortHint(v int) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 514 + }, + { + "kind": "func", + "name": "SetCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetCorrectsRealizationID(v string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 520 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableCorrectsRealizationID(v *string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 526 + }, + { + "kind": "func", + "name": "ClearCorrectsRealizationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearCorrectsRealizationID() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 534 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 540 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 546 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 552 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearDeletedAt() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 560 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 566 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearAnnotations() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 572 + }, + { + "kind": "func", + "name": "AddCorrectionIDs", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) AddCorrectionIDs(ids ...string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 578 + }, + { + "kind": "func", + "name": "AddCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) AddCorrections(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 584 + }, + { + "kind": "func", + "name": "SetAllocationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetAllocationID(id string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 593 + }, + { + "kind": "func", + "name": "SetNillableAllocationID", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetNillableAllocationID(id *string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 599 + }, + { + "kind": "func", + "name": "SetAllocation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetAllocation(v *ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 607 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) Mutation() *ChargeUsageBasedRunCreditAllocationsMutation", + "line": 612 + }, + { + "kind": "func", + "name": "ClearCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearCorrections() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 617 + }, + { + "kind": "func", + "name": "RemoveCorrectionIDs", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) RemoveCorrectionIDs(ids ...string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 623 + }, + { + "kind": "func", + "name": "RemoveCorrections", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) RemoveCorrections(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 629 + }, + { + "kind": "func", + "name": "ClearAllocation", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ClearAllocation() *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 638 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) Where(ps ...predicate.ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 644 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 651 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) Save(ctx context.Context) (*ChargeUsageBasedRunCreditAllocations, error)", + "line": 657 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SaveX(ctx context.Context) *ChargeUsageBasedRunCreditAllocations", + "line": 663 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) Exec(ctx context.Context) error", + "line": 672 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) ExecX(ctx context.Context)", + "line": 678 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) defaults()", + "line": 685 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) check() error", + "line": 693 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunCreditAllocationsUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBasedRunCreditAllocations, err error)", + "line": 710 + } + ], + "line_count": 862 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLine", + "signature": "type ChargeUsageBasedRunDetailedLine struct", + "line": 26 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineEdges", + "signature": "type ChargeUsageBasedRunDetailedLineEdges struct", + "line": 111 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e ChargeUsageBasedRunDetailedLineEdges) ChargeOrErr() (*ChargeUsageBased, error)", + "line": 127 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeUsageBasedRunDetailedLineEdges) RunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 138 + }, + { + "kind": "func", + "name": "CorrectsRunOrErr", + "signature": "func (e ChargeUsageBasedRunDetailedLineEdges) CorrectsRunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 149 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e ChargeUsageBasedRunDetailedLineEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 160 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) assignValues(columns []string, values []any) error", + "line": 193 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) Value(name string) (ent.Value, error)", + "line": 433 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) QueryCharge() *ChargeUsageBasedQuery", + "line": 438 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 443 + }, + { + "kind": "func", + "name": "QueryCorrectsRun", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) QueryCorrectsRun() *ChargeUsageBasedRunsQuery", + "line": 448 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) QueryTaxCode() *TaxCodeQuery", + "line": 453 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) Update() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 460 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) Unwrap() *ChargeUsageBasedRunDetailedLine", + "line": 466 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBasedRunDetailedLine) String() string", + "line": 476 + } + ], + "line_count": 600 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline/chargeusagebasedrundetailedline.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 165 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 201 + }, + { + "kind": "func", + "name": "CategoryValidator", + "signature": "func CategoryValidator(c stddetailedline.Category) error", + "line": 213 + }, + { + "kind": "func", + "name": "PaymentTermValidator", + "signature": "func PaymentTermValidator(pt productcatalog.PaymentTermType) error", + "line": 225 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByServicePeriodStart", + "signature": "func ByServicePeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByServicePeriodEnd", + "signature": "func ByServicePeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "ByInvoicingAppExternalID", + "signature": "func ByInvoicingAppExternalID(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByChildUniqueReferenceID", + "signature": "func ByChildUniqueReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByPerUnitAmount", + "signature": "func ByPerUnitAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByCategory", + "signature": "func ByCategory(opts ...sql.OrderTermOption) OrderOption", + "line": 288 + }, + { + "kind": "func", + "name": "ByPaymentTerm", + "signature": "func ByPaymentTerm(opts ...sql.OrderTermOption) OrderOption", + "line": 293 + }, + { + "kind": "func", + "name": "ByIndex", + "signature": "func ByIndex(opts ...sql.OrderTermOption) OrderOption", + "line": 298 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 303 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 308 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 313 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 318 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 323 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 328 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 333 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 338 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 343 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 348 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 353 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 358 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 363 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 368 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 373 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 378 + }, + { + "kind": "func", + "name": "ByPricerReferenceID", + "signature": "func ByPricerReferenceID(opts ...sql.OrderTermOption) OrderOption", + "line": 383 + }, + { + "kind": "func", + "name": "ByCorrectsRunID", + "signature": "func ByCorrectsRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 388 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 393 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 400 + }, + { + "kind": "func", + "name": "ByCorrectsRunField", + "signature": "func ByCorrectsRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 407 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 414 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 419 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 426 + }, + { + "kind": "func", + "name": "newCorrectsRunStep", + "signature": "func newCorrectsRunStep() *sqlgraph.Step", + "line": 433 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 440 + } + ], + "line_count": 446 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 18 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 23 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 28 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 33 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 38 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 43 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 48 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 53 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 58 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 63 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 68 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 73 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 79 + }, + { + "kind": "func", + "name": "ServicePeriodStart", + "signature": "func ServicePeriodStart(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 84 + }, + { + "kind": "func", + "name": "ServicePeriodEnd", + "signature": "func ServicePeriodEnd(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 89 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 94 + }, + { + "kind": "func", + "name": "InvoicingAppExternalID", + "signature": "func InvoicingAppExternalID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 99 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceID", + "signature": "func ChildUniqueReferenceID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 104 + }, + { + "kind": "func", + "name": "PerUnitAmount", + "signature": "func PerUnitAmount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 109 + }, + { + "kind": "func", + "name": "Index", + "signature": "func Index(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 114 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 119 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 124 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 129 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 134 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 139 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 144 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 149 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 154 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 159 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 164 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 169 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 174 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 179 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 184 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 189 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 194 + }, + { + "kind": "func", + "name": "PricerReferenceID", + "signature": "func PricerReferenceID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 199 + }, + { + "kind": "func", + "name": "CorrectsRunID", + "signature": "func CorrectsRunID(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 204 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 209 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 215 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 221 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 230 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 239 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 245 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 251 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 257 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 263 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 269 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 275 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 281 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.ChargeUsageBasedRunDetailedLine", + "line": 287 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 293 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 298 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 303 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 308 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 313 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 318 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 323 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 328 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 333 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 338 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 343 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 348 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 353 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 358 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 363 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 368 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 373 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.ChargeUsageBasedRunDetailedLine", + "line": 378 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.ChargeUsageBasedRunDetailedLine", + "line": 384 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.ChargeUsageBasedRunDetailedLine", + "line": 390 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.ChargeUsageBasedRunDetailedLine", + "line": 399 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 408 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 413 + }, + { + "kind": "func", + "name": "ServicePeriodStartEQ", + "signature": "func ServicePeriodStartEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 418 + }, + { + "kind": "func", + "name": "ServicePeriodStartNEQ", + "signature": "func ServicePeriodStartNEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 423 + }, + { + "kind": "func", + "name": "ServicePeriodStartIn", + "signature": "func ServicePeriodStartIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 428 + }, + { + "kind": "func", + "name": "ServicePeriodStartNotIn", + "signature": "func ServicePeriodStartNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 433 + }, + { + "kind": "func", + "name": "ServicePeriodStartGT", + "signature": "func ServicePeriodStartGT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 438 + }, + { + "kind": "func", + "name": "ServicePeriodStartGTE", + "signature": "func ServicePeriodStartGTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 443 + }, + { + "kind": "func", + "name": "ServicePeriodStartLT", + "signature": "func ServicePeriodStartLT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 448 + }, + { + "kind": "func", + "name": "ServicePeriodStartLTE", + "signature": "func ServicePeriodStartLTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 453 + }, + { + "kind": "func", + "name": "ServicePeriodEndEQ", + "signature": "func ServicePeriodEndEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 458 + }, + { + "kind": "func", + "name": "ServicePeriodEndNEQ", + "signature": "func ServicePeriodEndNEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 463 + }, + { + "kind": "func", + "name": "ServicePeriodEndIn", + "signature": "func ServicePeriodEndIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 468 + }, + { + "kind": "func", + "name": "ServicePeriodEndNotIn", + "signature": "func ServicePeriodEndNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 473 + }, + { + "kind": "func", + "name": "ServicePeriodEndGT", + "signature": "func ServicePeriodEndGT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 478 + }, + { + "kind": "func", + "name": "ServicePeriodEndGTE", + "signature": "func ServicePeriodEndGTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 483 + }, + { + "kind": "func", + "name": "ServicePeriodEndLT", + "signature": "func ServicePeriodEndLT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 488 + }, + { + "kind": "func", + "name": "ServicePeriodEndLTE", + "signature": "func ServicePeriodEndLTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 493 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 498 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 503 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 508 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 513 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 518 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 523 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 528 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 533 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEQ", + "signature": "func InvoicingAppExternalIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 538 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNEQ", + "signature": "func InvoicingAppExternalIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 543 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIn", + "signature": "func InvoicingAppExternalIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 548 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotIn", + "signature": "func InvoicingAppExternalIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 553 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGT", + "signature": "func InvoicingAppExternalIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 558 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDGTE", + "signature": "func InvoicingAppExternalIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 563 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLT", + "signature": "func InvoicingAppExternalIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 568 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDLTE", + "signature": "func InvoicingAppExternalIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 573 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContains", + "signature": "func InvoicingAppExternalIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 578 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasPrefix", + "signature": "func InvoicingAppExternalIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 583 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDHasSuffix", + "signature": "func InvoicingAppExternalIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 588 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDIsNil", + "signature": "func InvoicingAppExternalIDIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 593 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDNotNil", + "signature": "func InvoicingAppExternalIDNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 598 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDEqualFold", + "signature": "func InvoicingAppExternalIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 603 + }, + { + "kind": "func", + "name": "InvoicingAppExternalIDContainsFold", + "signature": "func InvoicingAppExternalIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 608 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEQ", + "signature": "func ChildUniqueReferenceIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 613 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNEQ", + "signature": "func ChildUniqueReferenceIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 618 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDIn", + "signature": "func ChildUniqueReferenceIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 623 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDNotIn", + "signature": "func ChildUniqueReferenceIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 628 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGT", + "signature": "func ChildUniqueReferenceIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 633 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDGTE", + "signature": "func ChildUniqueReferenceIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 638 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLT", + "signature": "func ChildUniqueReferenceIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 643 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDLTE", + "signature": "func ChildUniqueReferenceIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 648 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContains", + "signature": "func ChildUniqueReferenceIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 653 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasPrefix", + "signature": "func ChildUniqueReferenceIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 658 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDHasSuffix", + "signature": "func ChildUniqueReferenceIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 663 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDEqualFold", + "signature": "func ChildUniqueReferenceIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 668 + }, + { + "kind": "func", + "name": "ChildUniqueReferenceIDContainsFold", + "signature": "func ChildUniqueReferenceIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 673 + }, + { + "kind": "func", + "name": "PerUnitAmountEQ", + "signature": "func PerUnitAmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 678 + }, + { + "kind": "func", + "name": "PerUnitAmountNEQ", + "signature": "func PerUnitAmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 683 + }, + { + "kind": "func", + "name": "PerUnitAmountIn", + "signature": "func PerUnitAmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 688 + }, + { + "kind": "func", + "name": "PerUnitAmountNotIn", + "signature": "func PerUnitAmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 693 + }, + { + "kind": "func", + "name": "PerUnitAmountGT", + "signature": "func PerUnitAmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 698 + }, + { + "kind": "func", + "name": "PerUnitAmountGTE", + "signature": "func PerUnitAmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 703 + }, + { + "kind": "func", + "name": "PerUnitAmountLT", + "signature": "func PerUnitAmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 708 + }, + { + "kind": "func", + "name": "PerUnitAmountLTE", + "signature": "func PerUnitAmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 713 + }, + { + "kind": "func", + "name": "CategoryEQ", + "signature": "func CategoryEQ(v stddetailedline.Category) predicate.ChargeUsageBasedRunDetailedLine", + "line": 718 + }, + { + "kind": "func", + "name": "CategoryNEQ", + "signature": "func CategoryNEQ(v stddetailedline.Category) predicate.ChargeUsageBasedRunDetailedLine", + "line": 724 + }, + { + "kind": "func", + "name": "CategoryIn", + "signature": "func CategoryIn(vs ...stddetailedline.Category) predicate.ChargeUsageBasedRunDetailedLine", + "line": 730 + }, + { + "kind": "func", + "name": "CategoryNotIn", + "signature": "func CategoryNotIn(vs ...stddetailedline.Category) predicate.ChargeUsageBasedRunDetailedLine", + "line": 739 + }, + { + "kind": "func", + "name": "PaymentTermEQ", + "signature": "func PaymentTermEQ(v productcatalog.PaymentTermType) predicate.ChargeUsageBasedRunDetailedLine", + "line": 748 + }, + { + "kind": "func", + "name": "PaymentTermNEQ", + "signature": "func PaymentTermNEQ(v productcatalog.PaymentTermType) predicate.ChargeUsageBasedRunDetailedLine", + "line": 754 + }, + { + "kind": "func", + "name": "PaymentTermIn", + "signature": "func PaymentTermIn(vs ...productcatalog.PaymentTermType) predicate.ChargeUsageBasedRunDetailedLine", + "line": 760 + }, + { + "kind": "func", + "name": "PaymentTermNotIn", + "signature": "func PaymentTermNotIn(vs ...productcatalog.PaymentTermType) predicate.ChargeUsageBasedRunDetailedLine", + "line": 769 + }, + { + "kind": "func", + "name": "IndexEQ", + "signature": "func IndexEQ(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 778 + }, + { + "kind": "func", + "name": "IndexNEQ", + "signature": "func IndexNEQ(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 783 + }, + { + "kind": "func", + "name": "IndexIn", + "signature": "func IndexIn(vs ...int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 788 + }, + { + "kind": "func", + "name": "IndexNotIn", + "signature": "func IndexNotIn(vs ...int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 793 + }, + { + "kind": "func", + "name": "IndexGT", + "signature": "func IndexGT(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 798 + }, + { + "kind": "func", + "name": "IndexGTE", + "signature": "func IndexGTE(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 803 + }, + { + "kind": "func", + "name": "IndexLT", + "signature": "func IndexLT(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 808 + }, + { + "kind": "func", + "name": "IndexLTE", + "signature": "func IndexLTE(v int) predicate.ChargeUsageBasedRunDetailedLine", + "line": 813 + }, + { + "kind": "func", + "name": "IndexIsNil", + "signature": "func IndexIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 818 + }, + { + "kind": "func", + "name": "IndexNotNil", + "signature": "func IndexNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 823 + }, + { + "kind": "func", + "name": "CreditsAppliedIsNil", + "signature": "func CreditsAppliedIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 828 + }, + { + "kind": "func", + "name": "CreditsAppliedNotNil", + "signature": "func CreditsAppliedNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 833 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 838 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 843 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 848 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 853 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 858 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 863 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 868 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 873 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 878 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 883 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 888 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 893 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 898 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 903 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 908 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 913 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 918 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 923 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 928 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 933 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 938 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 943 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 948 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 953 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 958 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 963 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 968 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 973 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 978 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 983 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 988 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 993 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 998 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1003 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1008 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1013 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1018 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1023 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1028 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1033 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1038 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1043 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1048 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1053 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1058 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1063 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1068 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1073 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1078 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1083 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1088 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1093 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1098 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1103 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1108 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1113 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1118 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1123 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1128 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1133 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1138 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1143 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1148 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1153 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1158 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1163 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1168 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1173 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1178 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1183 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1188 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1193 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1198 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1203 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1208 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1213 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1218 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1223 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1228 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1233 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1238 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1243 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1248 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1253 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1258 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1263 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1268 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1273 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1278 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1283 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1288 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1293 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1298 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1303 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1308 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1313 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1318 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1323 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1328 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1333 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1338 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1343 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1348 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1353 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1358 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1363 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1368 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1373 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1378 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1383 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1388 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1393 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1398 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1403 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1408 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1413 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1418 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1423 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1428 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1433 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1438 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1443 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1448 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1453 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1458 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1463 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1468 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1473 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1478 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1483 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1488 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1493 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1498 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1503 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1508 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1513 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1518 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1523 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1528 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1533 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1538 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1543 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1548 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1553 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1558 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1563 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1568 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1573 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1578 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1583 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1588 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1593 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1598 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1603 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1608 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1613 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1618 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1623 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1628 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1633 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1638 + }, + { + "kind": "func", + "name": "PricerReferenceIDEQ", + "signature": "func PricerReferenceIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1643 + }, + { + "kind": "func", + "name": "PricerReferenceIDNEQ", + "signature": "func PricerReferenceIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1648 + }, + { + "kind": "func", + "name": "PricerReferenceIDIn", + "signature": "func PricerReferenceIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1653 + }, + { + "kind": "func", + "name": "PricerReferenceIDNotIn", + "signature": "func PricerReferenceIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1658 + }, + { + "kind": "func", + "name": "PricerReferenceIDGT", + "signature": "func PricerReferenceIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1663 + }, + { + "kind": "func", + "name": "PricerReferenceIDGTE", + "signature": "func PricerReferenceIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1668 + }, + { + "kind": "func", + "name": "PricerReferenceIDLT", + "signature": "func PricerReferenceIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1673 + }, + { + "kind": "func", + "name": "PricerReferenceIDLTE", + "signature": "func PricerReferenceIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1678 + }, + { + "kind": "func", + "name": "PricerReferenceIDContains", + "signature": "func PricerReferenceIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1683 + }, + { + "kind": "func", + "name": "PricerReferenceIDHasPrefix", + "signature": "func PricerReferenceIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1688 + }, + { + "kind": "func", + "name": "PricerReferenceIDHasSuffix", + "signature": "func PricerReferenceIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1693 + }, + { + "kind": "func", + "name": "PricerReferenceIDEqualFold", + "signature": "func PricerReferenceIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1698 + }, + { + "kind": "func", + "name": "PricerReferenceIDContainsFold", + "signature": "func PricerReferenceIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1703 + }, + { + "kind": "func", + "name": "CorrectsRunIDEQ", + "signature": "func CorrectsRunIDEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1708 + }, + { + "kind": "func", + "name": "CorrectsRunIDNEQ", + "signature": "func CorrectsRunIDNEQ(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1713 + }, + { + "kind": "func", + "name": "CorrectsRunIDIn", + "signature": "func CorrectsRunIDIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1718 + }, + { + "kind": "func", + "name": "CorrectsRunIDNotIn", + "signature": "func CorrectsRunIDNotIn(vs ...string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1723 + }, + { + "kind": "func", + "name": "CorrectsRunIDGT", + "signature": "func CorrectsRunIDGT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1728 + }, + { + "kind": "func", + "name": "CorrectsRunIDGTE", + "signature": "func CorrectsRunIDGTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1733 + }, + { + "kind": "func", + "name": "CorrectsRunIDLT", + "signature": "func CorrectsRunIDLT(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1738 + }, + { + "kind": "func", + "name": "CorrectsRunIDLTE", + "signature": "func CorrectsRunIDLTE(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1743 + }, + { + "kind": "func", + "name": "CorrectsRunIDContains", + "signature": "func CorrectsRunIDContains(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1748 + }, + { + "kind": "func", + "name": "CorrectsRunIDHasPrefix", + "signature": "func CorrectsRunIDHasPrefix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1753 + }, + { + "kind": "func", + "name": "CorrectsRunIDHasSuffix", + "signature": "func CorrectsRunIDHasSuffix(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1758 + }, + { + "kind": "func", + "name": "CorrectsRunIDIsNil", + "signature": "func CorrectsRunIDIsNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1763 + }, + { + "kind": "func", + "name": "CorrectsRunIDNotNil", + "signature": "func CorrectsRunIDNotNil() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1768 + }, + { + "kind": "func", + "name": "CorrectsRunIDEqualFold", + "signature": "func CorrectsRunIDEqualFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1773 + }, + { + "kind": "func", + "name": "CorrectsRunIDContainsFold", + "signature": "func CorrectsRunIDContainsFold(v string) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1778 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1783 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.ChargeUsageBased) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1794 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1806 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1817 + }, + { + "kind": "func", + "name": "HasCorrectsRun", + "signature": "func HasCorrectsRun() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1829 + }, + { + "kind": "func", + "name": "HasCorrectsRunWith", + "signature": "func HasCorrectsRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1840 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.ChargeUsageBasedRunDetailedLine", + "line": 1852 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1863 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1875 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1880 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBasedRunDetailedLine", + "line": 1885 + } + ], + "line_count": 1887 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineCreate", + "signature": "type ChargeUsageBasedRunDetailedLineCreate struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCurrency(v currencyx.Code) *ChargeUsageBasedRunDetailedLineCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableTaxCodeID(v *string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableInvoicingAppExternalID(v *string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableCategory(v *stddetailedline.Category) *ChargeUsageBasedRunDetailedLineCreate", + "line": 134 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineCreate", + "line": 148 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetIndex(v int) *ChargeUsageBasedRunDetailedLineCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableIndex(v *int) *ChargeUsageBasedRunDetailedLineCreate", + "line": 162 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNamespace(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 182 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 188 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 194 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 200 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 208 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 222 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunDetailedLineCreate", + "line": 228 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetName(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 236 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetDescription(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 242 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableDescription(v *string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 248 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 256 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 262 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 268 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 274 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 280 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 286 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 292 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineCreate", + "line": 298 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 304 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetRunID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 310 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 316 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 322 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRunID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableCorrectsRunID(v *string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 328 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetID(v string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 336 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetNillableID(v *string) *ChargeUsageBasedRunDetailedLineCreate", + "line": 342 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCharge(v *ChargeUsageBased) *ChargeUsageBasedRunDetailedLineCreate", + "line": 350 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineCreate", + "line": 355 + }, + { + "kind": "func", + "name": "SetCorrectsRun", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetCorrectsRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineCreate", + "line": 360 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SetTaxCode(v *TaxCode) *ChargeUsageBasedRunDetailedLineCreate", + "line": 365 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) Mutation() *ChargeUsageBasedRunDetailedLineMutation", + "line": 370 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) Save(ctx context.Context) (*ChargeUsageBasedRunDetailedLine, error)", + "line": 375 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) SaveX(ctx context.Context) *ChargeUsageBasedRunDetailedLine", + "line": 381 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) Exec(ctx context.Context) error", + "line": 390 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) ExecX(ctx context.Context)", + "line": 396 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) defaults()", + "line": 403 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) check() error", + "line": 427 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) sqlSave(ctx context.Context) (*ChargeUsageBasedRunDetailedLine, error)", + "line": 556 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) createSpec() (*ChargeUsageBasedRunDetailedLine, *sqlgraph.CreateSpec)", + "line": 579 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 796 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 809 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 830 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxConfig() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 836 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearTaxConfig() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 842 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 854 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 860 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 866 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 872 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 878 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 884 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateServicePeriodStart() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 890 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 896 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateServicePeriodEnd() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 902 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 908 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateQuantity() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 914 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 920 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 926 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 932 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 938 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateChildUniqueReferenceID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 944 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 950 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdatePerUnitAmount() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 956 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 962 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateCategory() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 968 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 974 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdatePaymentTerm() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 980 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetIndex(v int) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 986 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateIndex() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 992 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) AddIndex(v int) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 998 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearIndex() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1004 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1010 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1016 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1022 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1028 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateAnnotations() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1034 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearAnnotations() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1040 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1046 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateMetadata() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1052 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearMetadata() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1058 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1064 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateUpdatedAt() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1070 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1076 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateDeletedAt() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1082 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearDeletedAt() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1088 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetName(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1094 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateName() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1100 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetDescription(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1106 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateDescription() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1112 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearDescription() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1118 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1124 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateAmount() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1130 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1136 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxesTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1142 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1148 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1154 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1160 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1166 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1172 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateChargesTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1178 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1184 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateDiscountsTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1190 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1196 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateCreditsTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1202 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1208 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateTotal() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1214 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1220 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateChargeID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1226 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetRunID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1232 + }, + { + "kind": "func", + "name": "UpdateRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateRunID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1238 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1244 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdatePricerReferenceID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1250 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1256 + }, + { + "kind": "func", + "name": "UpdateCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) UpdateCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1262 + }, + { + "kind": "func", + "name": "ClearCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsert) ClearCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsert", + "line": 1268 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateNewValues() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1284 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) Ignore() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1309 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) DoNothing() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1316 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) Update(set func(*ChargeUsageBasedRunDetailedLineUpsert)) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1323 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxConfig() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1338 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearTaxConfig() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1345 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1352 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1359 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1366 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1373 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1380 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1387 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1394 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateServicePeriodStart() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1401 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1408 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateServicePeriodEnd() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1415 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1422 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateQuantity() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1429 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1436 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1443 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1450 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1457 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateChildUniqueReferenceID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1464 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1471 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdatePerUnitAmount() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1478 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1485 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateCategory() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1492 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1499 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdatePaymentTerm() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1506 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetIndex(v int) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1513 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) AddIndex(v int) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1520 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateIndex() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1527 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearIndex() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1534 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1541 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1548 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1555 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1562 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateAnnotations() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1569 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearAnnotations() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1576 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1583 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateMetadata() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1590 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearMetadata() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1597 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1604 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1611 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1618 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateDeletedAt() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1625 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearDeletedAt() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1632 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetName(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1639 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateName() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1646 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetDescription(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1653 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateDescription() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1660 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearDescription() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1667 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1674 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateAmount() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1681 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1688 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxesTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1695 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1702 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1709 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1716 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1723 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1730 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateChargesTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1737 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1744 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateDiscountsTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1751 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1758 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateCreditsTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1765 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1772 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateTotal() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1779 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1786 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateChargeID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1793 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetRunID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1800 + }, + { + "kind": "func", + "name": "UpdateRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateRunID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1807 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1814 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdatePricerReferenceID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1821 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1828 + }, + { + "kind": "func", + "name": "UpdateCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) UpdateCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1835 + }, + { + "kind": "func", + "name": "ClearCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ClearCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsertOne", + "line": 1842 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) Exec(ctx context.Context) error", + "line": 1849 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ExecX(ctx context.Context)", + "line": 1857 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1864 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertOne) IDX(ctx context.Context) string", + "line": 1878 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineCreateBulk", + "signature": "type ChargeUsageBasedRunDetailedLineCreateBulk struct", + "line": 1887 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 1895 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBasedRunDetailedLine", + "line": 1951 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) Exec(ctx context.Context) error", + "line": 1960 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) ExecX(ctx context.Context)", + "line": 1966 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 1987 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunDetailedLineCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2000 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineUpsertBulk", + "signature": "type ChargeUsageBasedRunDetailedLineUpsertBulk struct", + "line": 2009 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateNewValues() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2024 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) Ignore() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2051 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) DoNothing() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2058 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) Update(set func(*ChargeUsageBasedRunDetailedLineUpsert)) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2065 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2073 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxConfig() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2080 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearTaxConfig() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2087 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2094 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2101 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearTaxCodeID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2108 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2115 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2122 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearTaxBehavior() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2129 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2136 + }, + { + "kind": "func", + "name": "UpdateServicePeriodStart", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateServicePeriodStart() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2143 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2150 + }, + { + "kind": "func", + "name": "UpdateServicePeriodEnd", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateServicePeriodEnd() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2157 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2164 + }, + { + "kind": "func", + "name": "UpdateQuantity", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateQuantity() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2171 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2178 + }, + { + "kind": "func", + "name": "UpdateInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2185 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2192 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2199 + }, + { + "kind": "func", + "name": "UpdateChildUniqueReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateChildUniqueReferenceID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2206 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2213 + }, + { + "kind": "func", + "name": "UpdatePerUnitAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdatePerUnitAmount() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2220 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2227 + }, + { + "kind": "func", + "name": "UpdateCategory", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateCategory() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2234 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2241 + }, + { + "kind": "func", + "name": "UpdatePaymentTerm", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdatePaymentTerm() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2248 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetIndex(v int) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2255 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) AddIndex(v int) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2262 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateIndex() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2269 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearIndex() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2276 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2283 + }, + { + "kind": "func", + "name": "UpdateCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2290 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearCreditsApplied() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2297 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2304 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateAnnotations() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2311 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearAnnotations() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2318 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2325 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateMetadata() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2332 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearMetadata() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2339 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2346 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2353 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2360 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2367 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearDeletedAt() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2374 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetName(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2381 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateName() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2388 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetDescription(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2395 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateDescription() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2402 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearDescription() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2409 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2416 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateAmount() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2423 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2430 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxesTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2437 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2444 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2451 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2458 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2465 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2472 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateChargesTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2479 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2486 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateDiscountsTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2493 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2500 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateCreditsTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2507 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2514 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateTotal() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2521 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2528 + }, + { + "kind": "func", + "name": "UpdateChargeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateChargeID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2535 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetRunID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2542 + }, + { + "kind": "func", + "name": "UpdateRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateRunID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2549 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2556 + }, + { + "kind": "func", + "name": "UpdatePricerReferenceID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdatePricerReferenceID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2563 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2570 + }, + { + "kind": "func", + "name": "UpdateCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) UpdateCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2577 + }, + { + "kind": "func", + "name": "ClearCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ClearCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpsertBulk", + "line": 2584 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) Exec(ctx context.Context) error", + "line": 2591 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpsertBulk) ExecX(ctx context.Context)", + "line": 2607 + } + ], + "line_count": 2611 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineDelete", + "signature": "type ChargeUsageBasedRunDetailedLineDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDelete) Where(ps ...predicate.ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunDetailedLineDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineDeleteOne", + "signature": "type ChargeUsageBasedRunDetailedLineDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDeleteOne) Where(ps ...predicate.ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunDetailedLineDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunDetailedLineDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineQuery", + "signature": "type ChargeUsageBasedRunDetailedLineQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Where(ps ...predicate.ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunDetailedLineQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Limit(limit int) *ChargeUsageBasedRunDetailedLineQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Offset(offset int) *ChargeUsageBasedRunDetailedLineQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Unique(unique bool) *ChargeUsageBasedRunDetailedLineQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Order(o ...chargeusagebasedrundetailedline.OrderOption) *ChargeUsageBasedRunDetailedLineQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) QueryCharge() *ChargeUsageBasedQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QueryCorrectsRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) QueryCorrectsRun() *ChargeUsageBasedRunsQuery", + "line": 115 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) QueryTaxCode() *TaxCodeQuery", + "line": 137 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) First(ctx context.Context) (*ChargeUsageBasedRunDetailedLine, error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) FirstX(ctx context.Context) *ChargeUsageBasedRunDetailedLine", + "line": 172 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 182 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) FirstIDX(ctx context.Context) string", + "line": 195 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Only(ctx context.Context) (*ChargeUsageBasedRunDetailedLine, error)", + "line": 206 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) OnlyX(ctx context.Context) *ChargeUsageBasedRunDetailedLine", + "line": 222 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 233 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) OnlyIDX(ctx context.Context) string", + "line": 250 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) All(ctx context.Context) ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 259 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) AllX(ctx context.Context) []*ChargeUsageBasedRunDetailedLine", + "line": 269 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 278 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) IDsX(ctx context.Context) []string", + "line": 290 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Count(ctx context.Context) (int, error)", + "line": 299 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) CountX(ctx context.Context) int", + "line": 308 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Exist(ctx context.Context) (bool, error)", + "line": 317 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) ExistX(ctx context.Context) bool", + "line": 330 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Clone() *ChargeUsageBasedRunDetailedLineQuery", + "line": 340 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) WithCharge(opts ...func(*ChargeUsageBasedQuery)) *ChargeUsageBasedRunDetailedLineQuery", + "line": 362 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) WithRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedRunDetailedLineQuery", + "line": 373 + }, + { + "kind": "func", + "name": "WithCorrectsRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) WithCorrectsRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedRunDetailedLineQuery", + "line": 384 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *ChargeUsageBasedRunDetailedLineQuery", + "line": 395 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedRunDetailedLineGroupBy", + "line": 418 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Select(fields ...string) *ChargeUsageBasedRunDetailedLineSelect", + "line": 439 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunDetailedLineSelect", + "line": 448 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) prepareQuery(ctx context.Context) error", + "line": 452 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 478 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) loadCharge(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*ChargeUsageBasedRunDetailedLine, init func(*ChargeUsageBasedRunDetailedLine), assign func(*ChargeUsageBasedRunDetailedLine, *ChargeUsageBased)) error", + "line": 537 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) loadRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBasedRunDetailedLine, init func(*ChargeUsageBasedRunDetailedLine), assign func(*ChargeUsageBasedRunDetailedLine, *ChargeUsageBasedRuns)) error", + "line": 566 + }, + { + "kind": "func", + "name": "loadCorrectsRun", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) loadCorrectsRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBasedRunDetailedLine, init func(*ChargeUsageBasedRunDetailedLine), assign func(*ChargeUsageBasedRunDetailedLine, *ChargeUsageBasedRuns)) error", + "line": 595 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*ChargeUsageBasedRunDetailedLine, init func(*ChargeUsageBasedRunDetailedLine), assign func(*ChargeUsageBasedRunDetailedLine, *TaxCode)) error", + "line": 627 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) sqlCount(ctx context.Context) (int, error)", + "line": 660 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) querySpec() *sqlgraph.QuerySpec", + "line": 672 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 724 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedRunDetailedLineQuery", + "line": 762 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedRunDetailedLineQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedRunDetailedLineQuery", + "line": 775 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineGroupBy", + "signature": "type ChargeUsageBasedRunDetailedLineGroupBy struct", + "line": 786 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedRunDetailedLineGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunDetailedLineGroupBy", + "line": 792 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedRunDetailedLineGroupBy) Scan(ctx context.Context, v any) error", + "line": 798 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedRunDetailedLineGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedRunDetailedLineQuery, v any) error", + "line": 806 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineSelect", + "signature": "type ChargeUsageBasedRunDetailedLineSelect struct", + "line": 834 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedRunDetailedLineSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunDetailedLineSelect", + "line": 840 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedRunDetailedLineSelect) Scan(ctx context.Context, v any) error", + "line": 846 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedRunDetailedLineSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedRunDetailedLineQuery, v any) error", + "line": 854 + } + ], + "line_count": 873 + }, + "openmeter/ent/db/chargeusagebasedrundetailedline_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineUpdate", + "signature": "type ChargeUsageBasedRunDetailedLineUpdate struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) Where(ps ...predicate.ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearTaxConfig() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxCodeID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearTaxCodeID() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearTaxBehavior() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableServicePeriodStart(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableServicePeriodEnd(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableQuantity(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableInvoicingAppExternalID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableChildUniqueReferenceID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableCategory(v *stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetIndex(v int) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableIndex(v *int) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) AddIndex(v int) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 233 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearIndex() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 239 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 245 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearCreditsApplied() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 251 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 257 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearAnnotations() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 263 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 269 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearMetadata() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 275 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 287 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 293 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearDeletedAt() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 301 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetName(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 307 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableName(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 313 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetDescription(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 321 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableDescription(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 327 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearDescription() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 335 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 341 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 347 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 355 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 361 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 369 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 375 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 383 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 389 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 397 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 403 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 411 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 417 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 425 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 431 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 439 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 445 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 453 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableChargeID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 459 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetRunID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 467 + }, + { + "kind": "func", + "name": "SetNillableRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableRunID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 473 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 481 + }, + { + "kind": "func", + "name": "SetNillablePricerReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillablePricerReferenceID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 487 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 495 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetNillableCorrectsRunID(v *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 501 + }, + { + "kind": "func", + "name": "ClearCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 509 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCharge(v *ChargeUsageBased) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 515 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 520 + }, + { + "kind": "func", + "name": "SetCorrectsRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetCorrectsRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 525 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SetTaxCode(v *TaxCode) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 530 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) Mutation() *ChargeUsageBasedRunDetailedLineMutation", + "line": 535 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearCharge() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 540 + }, + { + "kind": "func", + "name": "ClearRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearRun() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 546 + }, + { + "kind": "func", + "name": "ClearCorrectsRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearCorrectsRun() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 552 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ClearTaxCode() *ChargeUsageBasedRunDetailedLineUpdate", + "line": 558 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) Save(ctx context.Context) (int, error)", + "line": 564 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) SaveX(ctx context.Context) int", + "line": 570 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) Exec(ctx context.Context) error", + "line": 579 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) ExecX(ctx context.Context)", + "line": 585 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) defaults()", + "line": 592 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) check() error", + "line": 600 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 650 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLineUpdateOne", + "signature": "type ChargeUsageBasedRunDetailedLineUpdateOne struct", + "line": 902 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxConfig(v productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 910 + }, + { + "kind": "func", + "name": "SetNillableTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxConfig(v *productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 916 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearTaxConfig() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 924 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxCodeID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 930 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxCodeID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 936 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearTaxCodeID() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 944 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 950 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 956 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearTaxBehavior() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 964 + }, + { + "kind": "func", + "name": "SetServicePeriodStart", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetServicePeriodStart(v time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 970 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodStart", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableServicePeriodStart(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 976 + }, + { + "kind": "func", + "name": "SetServicePeriodEnd", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetServicePeriodEnd(v time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 984 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodEnd", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableServicePeriodEnd(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 990 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 998 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableQuantity(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1004 + }, + { + "kind": "func", + "name": "SetInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetInvoicingAppExternalID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1012 + }, + { + "kind": "func", + "name": "SetNillableInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableInvoicingAppExternalID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1018 + }, + { + "kind": "func", + "name": "ClearInvoicingAppExternalID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearInvoicingAppExternalID() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1026 + }, + { + "kind": "func", + "name": "SetChildUniqueReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetChildUniqueReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1032 + }, + { + "kind": "func", + "name": "SetNillableChildUniqueReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableChildUniqueReferenceID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1038 + }, + { + "kind": "func", + "name": "SetPerUnitAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetPerUnitAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1046 + }, + { + "kind": "func", + "name": "SetNillablePerUnitAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillablePerUnitAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1052 + }, + { + "kind": "func", + "name": "SetCategory", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCategory(v stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1060 + }, + { + "kind": "func", + "name": "SetNillableCategory", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableCategory(v *stddetailedline.Category) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1066 + }, + { + "kind": "func", + "name": "SetPaymentTerm", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetPaymentTerm(v productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1074 + }, + { + "kind": "func", + "name": "SetNillablePaymentTerm", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillablePaymentTerm(v *productcatalog.PaymentTermType) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1080 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetIndex(v int) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1088 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableIndex(v *int) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) AddIndex(v int) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1103 + }, + { + "kind": "func", + "name": "ClearIndex", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearIndex() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1109 + }, + { + "kind": "func", + "name": "SetCreditsApplied", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCreditsApplied(v *creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1115 + }, + { + "kind": "func", + "name": "ClearCreditsApplied", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearCreditsApplied() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1127 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearAnnotations() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1133 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetMetadata(v map[string]string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1139 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearMetadata() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1145 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1151 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1157 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1163 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearDeletedAt() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1171 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetName(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1177 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableName(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1183 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetDescription(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1191 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableDescription(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1197 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearDescription() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1205 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1211 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1217 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1225 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1231 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1239 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1245 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1253 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1259 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1267 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1273 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1281 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1287 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1295 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1301 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1309 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1315 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetChargeID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1323 + }, + { + "kind": "func", + "name": "SetNillableChargeID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableChargeID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1329 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetRunID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1337 + }, + { + "kind": "func", + "name": "SetNillableRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableRunID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1343 + }, + { + "kind": "func", + "name": "SetPricerReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetPricerReferenceID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1351 + }, + { + "kind": "func", + "name": "SetNillablePricerReferenceID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillablePricerReferenceID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1357 + }, + { + "kind": "func", + "name": "SetCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCorrectsRunID(v string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1365 + }, + { + "kind": "func", + "name": "SetNillableCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetNillableCorrectsRunID(v *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1371 + }, + { + "kind": "func", + "name": "ClearCorrectsRunID", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearCorrectsRunID() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1379 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCharge(v *ChargeUsageBased) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1385 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1390 + }, + { + "kind": "func", + "name": "SetCorrectsRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetCorrectsRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1395 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SetTaxCode(v *TaxCode) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1400 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) Mutation() *ChargeUsageBasedRunDetailedLineMutation", + "line": 1405 + }, + { + "kind": "func", + "name": "ClearCharge", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearCharge() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1410 + }, + { + "kind": "func", + "name": "ClearRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearRun() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1416 + }, + { + "kind": "func", + "name": "ClearCorrectsRun", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearCorrectsRun() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1422 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ClearTaxCode() *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1428 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) Where(ps ...predicate.ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1434 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 1441 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) Save(ctx context.Context) (*ChargeUsageBasedRunDetailedLine, error)", + "line": 1447 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) SaveX(ctx context.Context) *ChargeUsageBasedRunDetailedLine", + "line": 1453 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) Exec(ctx context.Context) error", + "line": 1462 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) ExecX(ctx context.Context)", + "line": 1468 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) defaults()", + "line": 1475 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) check() error", + "line": 1483 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunDetailedLineUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBasedRunDetailedLine, err error)", + "line": 1533 + } + ], + "line_count": 1802 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsage", + "signature": "type ChargeUsageBasedRunInvoicedUsage struct", + "line": 20 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageEdges", + "signature": "type ChargeUsageBasedRunInvoicedUsageEdges struct", + "line": 65 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeUsageBasedRunInvoicedUsageEdges) RunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 75 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) assignValues(columns []string, values []any) error", + "line": 106 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) Value(name string) (ent.Value, error)", + "line": 233 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 238 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) Update() *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 245 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) Unwrap() *ChargeUsageBasedRunInvoicedUsage", + "line": 251 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsage) String() string", + "line": 261 + } + ], + "line_count": 324 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage/chargeusagebasedruninvoicedusage.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 87 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByLedgerTransactionGroupID", + "signature": "func ByLedgerTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 205 + } + ], + "line_count": 211 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 65 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 70 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 75 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupID", + "signature": "func LedgerTransactionGroupID(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 80 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 85 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 90 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 95 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 100 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 105 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 110 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 115 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 120 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 125 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 130 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 135 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 140 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 145 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 150 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 155 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 160 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 165 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 170 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 175 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 180 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 185 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 190 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 195 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 200 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 205 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 210 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 215 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 220 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 225 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEQ", + "signature": "func LedgerTransactionGroupIDEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 230 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNEQ", + "signature": "func LedgerTransactionGroupIDNEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 235 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIn", + "signature": "func LedgerTransactionGroupIDIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 240 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotIn", + "signature": "func LedgerTransactionGroupIDNotIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 245 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGT", + "signature": "func LedgerTransactionGroupIDGT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 250 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDGTE", + "signature": "func LedgerTransactionGroupIDGTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 255 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLT", + "signature": "func LedgerTransactionGroupIDLT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 260 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDLTE", + "signature": "func LedgerTransactionGroupIDLTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 265 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContains", + "signature": "func LedgerTransactionGroupIDContains(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 270 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasPrefix", + "signature": "func LedgerTransactionGroupIDHasPrefix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 275 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDHasSuffix", + "signature": "func LedgerTransactionGroupIDHasSuffix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 280 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDIsNil", + "signature": "func LedgerTransactionGroupIDIsNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 285 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDNotNil", + "signature": "func LedgerTransactionGroupIDNotNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 290 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDEqualFold", + "signature": "func LedgerTransactionGroupIDEqualFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 295 + }, + { + "kind": "func", + "name": "LedgerTransactionGroupIDContainsFold", + "signature": "func LedgerTransactionGroupIDContainsFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 300 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 305 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 310 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 315 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 320 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 325 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 330 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 335 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 340 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 345 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 350 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 355 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 360 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 365 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 370 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 375 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 380 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 385 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 390 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 395 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 400 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 405 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 410 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 415 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 420 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 425 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 430 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 435 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 440 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 445 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 450 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 455 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 460 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 465 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 470 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 475 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 480 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 485 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 490 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 495 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 500 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 505 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 510 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 515 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 520 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 525 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 530 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 535 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 540 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 545 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 550 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 555 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 560 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 565 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 570 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 575 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 580 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 585 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 590 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 595 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 600 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 605 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 610 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 615 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 620 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 625 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 630 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 635 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 640 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 645 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 650 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 655 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 660 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 665 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 670 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 675 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 680 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 685 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 690 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 695 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 700 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 705 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 710 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 715 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 720 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 725 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 730 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 735 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 740 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 745 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 750 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 755 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 760 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 765 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 770 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 775 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 780 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 785 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 790 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 795 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 800 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 805 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 810 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 815 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 820 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 825 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 830 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 835 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 840 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 845 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 850 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 855 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 860 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 865 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 870 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 875 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 880 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 885 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 890 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 895 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 906 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBasedRunInvoicedUsage) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 918 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBasedRunInvoicedUsage) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 923 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBasedRunInvoicedUsage) predicate.ChargeUsageBasedRunInvoicedUsage", + "line": 928 + } + ], + "line_count": 930 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageCreate", + "signature": "type ChargeUsageBasedRunInvoicedUsageCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNillableLedgerTransactionGroupID(v *string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNamespace(v string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 134 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetRunID(v string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetID(v string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetNillableID(v *string) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunInvoicedUsageCreate", + "line": 178 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) Mutation() *ChargeUsageBasedRunInvoicedUsageMutation", + "line": 183 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) Save(ctx context.Context) (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 188 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) SaveX(ctx context.Context) *ChargeUsageBasedRunInvoicedUsage", + "line": 194 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) Exec(ctx context.Context) error", + "line": 203 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) ExecX(ctx context.Context)", + "line": 209 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) defaults()", + "line": 216 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) check() error", + "line": 232 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) sqlSave(ctx context.Context) (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 291 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) createSpec() (*ChargeUsageBasedRunInvoicedUsage, *sqlgraph.CreateSpec)", + "line": 314 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 424 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 458 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateServicePeriodFrom() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 464 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 470 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateServicePeriodTo() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 476 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 482 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 488 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) ClearLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 494 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 500 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateUpdatedAt() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 506 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 512 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 518 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) ClearDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 524 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 530 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 536 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) ClearAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 542 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 548 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateAmount() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 554 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 560 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateTaxesTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 566 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 572 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 578 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 584 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 590 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 596 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateChargesTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 602 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 608 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateDiscountsTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 614 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 620 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateCreditsTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 626 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 632 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsert) UpdateTotal() *ChargeUsageBasedRunInvoicedUsageUpsert", + "line": 638 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateNewValues() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 654 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) Ignore() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 679 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) DoNothing() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 686 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) Update(set func(*ChargeUsageBasedRunInvoicedUsageUpsert)) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 693 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 701 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateServicePeriodFrom() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 708 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 715 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateServicePeriodTo() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 722 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 729 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 736 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) ClearLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 764 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 771 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) ClearDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 778 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 785 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 792 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) ClearAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 799 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 806 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateAmount() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 813 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateTaxesTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 841 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateChargesTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 869 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 876 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateDiscountsTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 883 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateCreditsTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 897 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 904 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) UpdateTotal() *ChargeUsageBasedRunInvoicedUsageUpsertOne", + "line": 911 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) Exec(ctx context.Context) error", + "line": 918 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) ExecX(ctx context.Context)", + "line": 926 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 933 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertOne) IDX(ctx context.Context) string", + "line": 947 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageCreateBulk", + "signature": "type ChargeUsageBasedRunInvoicedUsageCreateBulk struct", + "line": 956 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 964 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBasedRunInvoicedUsage", + "line": 1020 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) Exec(ctx context.Context) error", + "line": 1029 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) ExecX(ctx context.Context)", + "line": 1035 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1056 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunInvoicedUsageCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1069 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "signature": "type ChargeUsageBasedRunInvoicedUsageUpsertBulk struct", + "line": 1078 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateNewValues() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1093 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) Ignore() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1120 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) DoNothing() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1127 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) Update(set func(*ChargeUsageBasedRunInvoicedUsageUpsert)) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1134 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1142 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateServicePeriodFrom() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1149 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateServicePeriodTo() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1163 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1170 + }, + { + "kind": "func", + "name": "UpdateLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1177 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) ClearLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1184 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1212 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) ClearDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1219 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1226 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) ClearAnnotations() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateAmount() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateTaxesTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1289 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1296 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateChargesTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1310 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1317 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateDiscountsTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1324 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateCreditsTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1338 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1345 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) UpdateTotal() *ChargeUsageBasedRunInvoicedUsageUpsertBulk", + "line": 1352 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) Exec(ctx context.Context) error", + "line": 1359 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpsertBulk) ExecX(ctx context.Context)", + "line": 1375 + } + ], + "line_count": 1379 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageDelete", + "signature": "type ChargeUsageBasedRunInvoicedUsageDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDelete) Where(ps ...predicate.ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunInvoicedUsageDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageDeleteOne", + "signature": "type ChargeUsageBasedRunInvoicedUsageDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDeleteOne) Where(ps ...predicate.ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunInvoicedUsageDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunInvoicedUsageDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageQuery", + "signature": "type ChargeUsageBasedRunInvoicedUsageQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Where(ps ...predicate.ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Limit(limit int) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Offset(offset int) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Unique(unique bool) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Order(o ...chargeusagebasedruninvoicedusage.OrderOption) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) First(ctx context.Context) (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) FirstX(ctx context.Context) *ChargeUsageBasedRunInvoicedUsage", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Only(ctx context.Context) (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) OnlyX(ctx context.Context) *ChargeUsageBasedRunInvoicedUsage", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) All(ctx context.Context) ([]*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) AllX(ctx context.Context) []*ChargeUsageBasedRunInvoicedUsage", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Clone() *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) WithRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedRunInvoicedUsageGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Select(fields ...string) *ChargeUsageBasedRunInvoicedUsageSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunInvoicedUsageSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) loadRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBasedRunInvoicedUsage, init func(*ChargeUsageBasedRunInvoicedUsage), assign func(*ChargeUsageBasedRunInvoicedUsage, *ChargeUsageBasedRuns)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedRunInvoicedUsageQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageGroupBy", + "signature": "type ChargeUsageBasedRunInvoicedUsageGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedRunInvoicedUsageGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunInvoicedUsageGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedRunInvoicedUsageGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedRunInvoicedUsageGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedRunInvoicedUsageQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageSelect", + "signature": "type ChargeUsageBasedRunInvoicedUsageSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedRunInvoicedUsageSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunInvoicedUsageSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedRunInvoicedUsageSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedRunInvoicedUsageSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedRunInvoicedUsageQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/chargeusagebasedruninvoicedusage_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageUpdate", + "signature": "type ChargeUsageBasedRunInvoicedUsageUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) Where(ps ...predicate.ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableLedgerTransactionGroupID(v *string) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) ClearLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) ClearDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) ClearAnnotations() *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 224 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) Mutation() *ChargeUsageBasedRunInvoicedUsageMutation", + "line": 232 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) Save(ctx context.Context) (int, error)", + "line": 237 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) SaveX(ctx context.Context) int", + "line": 243 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) Exec(ctx context.Context) error", + "line": 252 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) ExecX(ctx context.Context)", + "line": 258 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) defaults()", + "line": 265 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) check() error", + "line": 273 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 285 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsageUpdateOne", + "signature": "type ChargeUsageBasedRunInvoicedUsageUpdateOne struct", + "line": 361 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 369 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 375 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 383 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 389 + }, + { + "kind": "func", + "name": "SetLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetLedgerTransactionGroupID(v string) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 397 + }, + { + "kind": "func", + "name": "SetNillableLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableLedgerTransactionGroupID(v *string) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "ClearLedgerTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) ClearLedgerTransactionGroupID() *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 411 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 417 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 423 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) ClearDeletedAt() *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 443 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) ClearAnnotations() *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 455 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 461 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 469 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 475 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 483 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 489 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 497 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 503 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 511 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 517 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 525 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 531 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 539 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 545 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 553 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 559 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) Mutation() *ChargeUsageBasedRunInvoicedUsageMutation", + "line": 567 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) Where(ps ...predicate.ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 572 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 579 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) Save(ctx context.Context) (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 585 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SaveX(ctx context.Context) *ChargeUsageBasedRunInvoicedUsage", + "line": 591 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) Exec(ctx context.Context) error", + "line": 600 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) ExecX(ctx context.Context)", + "line": 606 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) defaults()", + "line": 613 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) check() error", + "line": 621 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunInvoicedUsageUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBasedRunInvoicedUsage, err error)", + "line": 633 + } + ], + "line_count": 726 + }, + "openmeter/ent/db/chargeusagebasedrunpayment.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunPayment", + "signature": "type ChargeUsageBasedRunPayment struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentEdges", + "signature": "type ChargeUsageBasedRunPaymentEdges struct", + "line": 64 + }, + { + "kind": "func", + "name": "RunOrErr", + "signature": "func (e ChargeUsageBasedRunPaymentEdges) RunOrErr() (*ChargeUsageBasedRuns, error)", + "line": 74 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBasedRunPayment) assignValues(columns []string, values []any) error", + "line": 105 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBasedRunPayment) Value(name string) (ent.Value, error)", + "line": 229 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_m *ChargeUsageBasedRunPayment) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 234 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBasedRunPayment) Update() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 241 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBasedRunPayment) Unwrap() *ChargeUsageBasedRunPayment", + "line": 247 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBasedRunPayment) String() string", + "line": 257 + } + ], + "line_count": 323 + }, + "openmeter/ent/db/chargeusagebasedrunpayment/chargeusagebasedrunpayment.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 86 + }, + { + "kind": "func", + "name": "StatusValidator", + "signature": "func StatusValidator(s payment.Status) error", + "line": 113 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "ByServicePeriodFrom", + "signature": "func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 141 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 146 + }, + { + "kind": "func", + "name": "ByStatus", + "signature": "func ByStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 151 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 156 + }, + { + "kind": "func", + "name": "ByAuthorizedTransactionGroupID", + "signature": "func ByAuthorizedTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 161 + }, + { + "kind": "func", + "name": "ByAuthorizedAt", + "signature": "func ByAuthorizedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 166 + }, + { + "kind": "func", + "name": "BySettledTransactionGroupID", + "signature": "func BySettledTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "BySettledAt", + "signature": "func BySettledAt(opts ...sql.OrderTermOption) OrderOption", + "line": 176 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 181 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 186 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 191 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 196 + }, + { + "kind": "func", + "name": "ByRunID", + "signature": "func ByRunID(opts ...sql.OrderTermOption) OrderOption", + "line": 201 + }, + { + "kind": "func", + "name": "ByRunField", + "signature": "func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 206 + }, + { + "kind": "func", + "name": "newRunStep", + "signature": "func newRunStep() *sqlgraph.Step", + "line": 211 + } + ], + "line_count": 217 + }, + "openmeter/ent/db/chargeusagebasedrunpayment/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBasedRunPayment", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBasedRunPayment", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBasedRunPayment", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBasedRunPayment", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBasedRunPayment", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBasedRunPayment", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBasedRunPayment", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBasedRunPayment", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBasedRunPayment", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBasedRunPayment", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBasedRunPayment", + "line": 66 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeUsageBasedRunPayment", + "line": 71 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.ChargeUsageBasedRunPayment", + "line": 76 + }, + { + "kind": "func", + "name": "ServicePeriodFrom", + "signature": "func ServicePeriodFrom(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 81 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 91 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupID", + "signature": "func AuthorizedTransactionGroupID(v string) predicate.ChargeUsageBasedRunPayment", + "line": 96 + }, + { + "kind": "func", + "name": "AuthorizedAt", + "signature": "func AuthorizedAt(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 101 + }, + { + "kind": "func", + "name": "SettledTransactionGroupID", + "signature": "func SettledTransactionGroupID(v string) predicate.ChargeUsageBasedRunPayment", + "line": 106 + }, + { + "kind": "func", + "name": "SettledAt", + "signature": "func SettledAt(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 111 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBasedRunPayment", + "line": 116 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 121 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 126 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 131 + }, + { + "kind": "func", + "name": "RunID", + "signature": "func RunID(v string) predicate.ChargeUsageBasedRunPayment", + "line": 136 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 141 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 146 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 151 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 156 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 161 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 166 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 171 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 176 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 181 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 186 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 191 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 196 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 201 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 206 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 211 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 216 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 221 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 226 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 231 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 236 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 241 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 246 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 251 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 256 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 261 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 266 + }, + { + "kind": "func", + "name": "ServicePeriodFromEQ", + "signature": "func ServicePeriodFromEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 271 + }, + { + "kind": "func", + "name": "ServicePeriodFromNEQ", + "signature": "func ServicePeriodFromNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 276 + }, + { + "kind": "func", + "name": "ServicePeriodFromIn", + "signature": "func ServicePeriodFromIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 281 + }, + { + "kind": "func", + "name": "ServicePeriodFromNotIn", + "signature": "func ServicePeriodFromNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 286 + }, + { + "kind": "func", + "name": "ServicePeriodFromGT", + "signature": "func ServicePeriodFromGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 291 + }, + { + "kind": "func", + "name": "ServicePeriodFromGTE", + "signature": "func ServicePeriodFromGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 296 + }, + { + "kind": "func", + "name": "ServicePeriodFromLT", + "signature": "func ServicePeriodFromLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 301 + }, + { + "kind": "func", + "name": "ServicePeriodFromLTE", + "signature": "func ServicePeriodFromLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 306 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 311 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 316 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 321 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 326 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 331 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 336 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 341 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 346 + }, + { + "kind": "func", + "name": "StatusEQ", + "signature": "func StatusEQ(v payment.Status) predicate.ChargeUsageBasedRunPayment", + "line": 351 + }, + { + "kind": "func", + "name": "StatusNEQ", + "signature": "func StatusNEQ(v payment.Status) predicate.ChargeUsageBasedRunPayment", + "line": 357 + }, + { + "kind": "func", + "name": "StatusIn", + "signature": "func StatusIn(vs ...payment.Status) predicate.ChargeUsageBasedRunPayment", + "line": 363 + }, + { + "kind": "func", + "name": "StatusNotIn", + "signature": "func StatusNotIn(vs ...payment.Status) predicate.ChargeUsageBasedRunPayment", + "line": 372 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 381 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 386 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 391 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 396 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 401 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 406 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 411 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRunPayment", + "line": 416 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEQ", + "signature": "func AuthorizedTransactionGroupIDEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 421 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNEQ", + "signature": "func AuthorizedTransactionGroupIDNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 426 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIn", + "signature": "func AuthorizedTransactionGroupIDIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 431 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotIn", + "signature": "func AuthorizedTransactionGroupIDNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 436 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGT", + "signature": "func AuthorizedTransactionGroupIDGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 441 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDGTE", + "signature": "func AuthorizedTransactionGroupIDGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 446 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLT", + "signature": "func AuthorizedTransactionGroupIDLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 451 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDLTE", + "signature": "func AuthorizedTransactionGroupIDLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 456 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContains", + "signature": "func AuthorizedTransactionGroupIDContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 461 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasPrefix", + "signature": "func AuthorizedTransactionGroupIDHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 466 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDHasSuffix", + "signature": "func AuthorizedTransactionGroupIDHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 471 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDIsNil", + "signature": "func AuthorizedTransactionGroupIDIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 476 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDNotNil", + "signature": "func AuthorizedTransactionGroupIDNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 481 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDEqualFold", + "signature": "func AuthorizedTransactionGroupIDEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 486 + }, + { + "kind": "func", + "name": "AuthorizedTransactionGroupIDContainsFold", + "signature": "func AuthorizedTransactionGroupIDContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 491 + }, + { + "kind": "func", + "name": "AuthorizedAtEQ", + "signature": "func AuthorizedAtEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 496 + }, + { + "kind": "func", + "name": "AuthorizedAtNEQ", + "signature": "func AuthorizedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 501 + }, + { + "kind": "func", + "name": "AuthorizedAtIn", + "signature": "func AuthorizedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 506 + }, + { + "kind": "func", + "name": "AuthorizedAtNotIn", + "signature": "func AuthorizedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 511 + }, + { + "kind": "func", + "name": "AuthorizedAtGT", + "signature": "func AuthorizedAtGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 516 + }, + { + "kind": "func", + "name": "AuthorizedAtGTE", + "signature": "func AuthorizedAtGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 521 + }, + { + "kind": "func", + "name": "AuthorizedAtLT", + "signature": "func AuthorizedAtLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 526 + }, + { + "kind": "func", + "name": "AuthorizedAtLTE", + "signature": "func AuthorizedAtLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 531 + }, + { + "kind": "func", + "name": "AuthorizedAtIsNil", + "signature": "func AuthorizedAtIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 536 + }, + { + "kind": "func", + "name": "AuthorizedAtNotNil", + "signature": "func AuthorizedAtNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 541 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEQ", + "signature": "func SettledTransactionGroupIDEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 546 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNEQ", + "signature": "func SettledTransactionGroupIDNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 551 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIn", + "signature": "func SettledTransactionGroupIDIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 556 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotIn", + "signature": "func SettledTransactionGroupIDNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 561 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGT", + "signature": "func SettledTransactionGroupIDGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 566 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDGTE", + "signature": "func SettledTransactionGroupIDGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 571 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLT", + "signature": "func SettledTransactionGroupIDLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 576 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDLTE", + "signature": "func SettledTransactionGroupIDLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 581 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContains", + "signature": "func SettledTransactionGroupIDContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 586 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasPrefix", + "signature": "func SettledTransactionGroupIDHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 591 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDHasSuffix", + "signature": "func SettledTransactionGroupIDHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 596 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDIsNil", + "signature": "func SettledTransactionGroupIDIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 601 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDNotNil", + "signature": "func SettledTransactionGroupIDNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 606 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDEqualFold", + "signature": "func SettledTransactionGroupIDEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 611 + }, + { + "kind": "func", + "name": "SettledTransactionGroupIDContainsFold", + "signature": "func SettledTransactionGroupIDContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 616 + }, + { + "kind": "func", + "name": "SettledAtEQ", + "signature": "func SettledAtEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 621 + }, + { + "kind": "func", + "name": "SettledAtNEQ", + "signature": "func SettledAtNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 626 + }, + { + "kind": "func", + "name": "SettledAtIn", + "signature": "func SettledAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 631 + }, + { + "kind": "func", + "name": "SettledAtNotIn", + "signature": "func SettledAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 636 + }, + { + "kind": "func", + "name": "SettledAtGT", + "signature": "func SettledAtGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 641 + }, + { + "kind": "func", + "name": "SettledAtGTE", + "signature": "func SettledAtGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 646 + }, + { + "kind": "func", + "name": "SettledAtLT", + "signature": "func SettledAtLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 651 + }, + { + "kind": "func", + "name": "SettledAtLTE", + "signature": "func SettledAtLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 656 + }, + { + "kind": "func", + "name": "SettledAtIsNil", + "signature": "func SettledAtIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 661 + }, + { + "kind": "func", + "name": "SettledAtNotNil", + "signature": "func SettledAtNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 666 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 671 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 676 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 681 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 686 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 691 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 696 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 701 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 706 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 711 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 716 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 721 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 726 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 731 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 736 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 741 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 746 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 751 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 756 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 761 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 766 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 771 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 776 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 781 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 786 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 791 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 796 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 801 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 806 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 811 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 816 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 821 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 826 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 831 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 836 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 841 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 846 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBasedRunPayment", + "line": 851 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 856 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 861 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.ChargeUsageBasedRunPayment", + "line": 866 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.ChargeUsageBasedRunPayment", + "line": 871 + }, + { + "kind": "func", + "name": "RunIDEQ", + "signature": "func RunIDEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 876 + }, + { + "kind": "func", + "name": "RunIDNEQ", + "signature": "func RunIDNEQ(v string) predicate.ChargeUsageBasedRunPayment", + "line": 881 + }, + { + "kind": "func", + "name": "RunIDIn", + "signature": "func RunIDIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 886 + }, + { + "kind": "func", + "name": "RunIDNotIn", + "signature": "func RunIDNotIn(vs ...string) predicate.ChargeUsageBasedRunPayment", + "line": 891 + }, + { + "kind": "func", + "name": "RunIDGT", + "signature": "func RunIDGT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 896 + }, + { + "kind": "func", + "name": "RunIDGTE", + "signature": "func RunIDGTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 901 + }, + { + "kind": "func", + "name": "RunIDLT", + "signature": "func RunIDLT(v string) predicate.ChargeUsageBasedRunPayment", + "line": 906 + }, + { + "kind": "func", + "name": "RunIDLTE", + "signature": "func RunIDLTE(v string) predicate.ChargeUsageBasedRunPayment", + "line": 911 + }, + { + "kind": "func", + "name": "RunIDContains", + "signature": "func RunIDContains(v string) predicate.ChargeUsageBasedRunPayment", + "line": 916 + }, + { + "kind": "func", + "name": "RunIDHasPrefix", + "signature": "func RunIDHasPrefix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 921 + }, + { + "kind": "func", + "name": "RunIDHasSuffix", + "signature": "func RunIDHasSuffix(v string) predicate.ChargeUsageBasedRunPayment", + "line": 926 + }, + { + "kind": "func", + "name": "RunIDEqualFold", + "signature": "func RunIDEqualFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 931 + }, + { + "kind": "func", + "name": "RunIDContainsFold", + "signature": "func RunIDContainsFold(v string) predicate.ChargeUsageBasedRunPayment", + "line": 936 + }, + { + "kind": "func", + "name": "HasRun", + "signature": "func HasRun() predicate.ChargeUsageBasedRunPayment", + "line": 941 + }, + { + "kind": "func", + "name": "HasRunWith", + "signature": "func HasRunWith(preds ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRunPayment", + "line": 952 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBasedRunPayment) predicate.ChargeUsageBasedRunPayment", + "line": 964 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBasedRunPayment) predicate.ChargeUsageBasedRunPayment", + "line": 969 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBasedRunPayment) predicate.ChargeUsageBasedRunPayment", + "line": 974 + } + ], + "line_count": 976 + }, + "openmeter/ent/db/chargeusagebasedrunpayment_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentCreate", + "signature": "type ChargeUsageBasedRunPaymentCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetLineID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetInvoiceID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentCreate", + "line": 73 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableAuthorizedAt(v *time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableSettledTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableSettledAt(v *time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNamespace(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunPaymentCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentCreate", + "line": 171 + }, + { + "kind": "func", + "name": "SetRunID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetRunID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetID(v string) *ChargeUsageBasedRunPaymentCreate", + "line": 183 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetNillableID(v *string) *ChargeUsageBasedRunPaymentCreate", + "line": 189 + }, + { + "kind": "func", + "name": "SetRun", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SetRun(v *ChargeUsageBasedRuns) *ChargeUsageBasedRunPaymentCreate", + "line": 197 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) Mutation() *ChargeUsageBasedRunPaymentMutation", + "line": 202 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) Save(ctx context.Context) (*ChargeUsageBasedRunPayment, error)", + "line": 207 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) SaveX(ctx context.Context) *ChargeUsageBasedRunPayment", + "line": 213 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) Exec(ctx context.Context) error", + "line": 222 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) ExecX(ctx context.Context)", + "line": 228 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) defaults()", + "line": 235 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) check() error", + "line": 251 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) sqlSave(ctx context.Context) (*ChargeUsageBasedRunPayment, error)", + "line": 308 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) createSpec() (*ChargeUsageBasedRunPayment, *sqlgraph.CreateSpec)", + "line": 331 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 437 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 450 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 471 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateServicePeriodFrom() *ChargeUsageBasedRunPaymentUpsert", + "line": 477 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 483 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateServicePeriodTo() *ChargeUsageBasedRunPaymentUpsert", + "line": 489 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentUpsert", + "line": 495 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateStatus() *ChargeUsageBasedRunPaymentUpsert", + "line": 501 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpsert", + "line": 507 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateAmount() *ChargeUsageBasedRunPaymentUpsert", + "line": 513 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsert", + "line": 519 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsert", + "line": 525 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsert", + "line": 531 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 537 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateAuthorizedAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 543 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearAuthorizedAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 549 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsert", + "line": 555 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsert", + "line": 561 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsert", + "line": 567 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 573 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateSettledAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 579 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearSettledAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 585 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 591 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateUpdatedAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 597 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateDeletedAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearDeletedAt() *ChargeUsageBasedRunPaymentUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) UpdateAnnotations() *ChargeUsageBasedRunPaymentUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsert) ClearAnnotations() *ChargeUsageBasedRunPaymentUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateNewValues() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 649 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) Ignore() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 680 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) DoNothing() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 687 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) Update(set func(*ChargeUsageBasedRunPaymentUpsert)) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 694 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 702 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateServicePeriodFrom() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 709 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 716 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateServicePeriodTo() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 723 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 730 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateStatus() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 737 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 744 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateAmount() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 751 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 765 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 779 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateAuthorizedAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearAuthorizedAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 793 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 800 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 807 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 814 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 821 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateSettledAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 828 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearSettledAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 835 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 842 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 849 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 856 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateDeletedAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 863 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearDeletedAt() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) UpdateAnnotations() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ClearAnnotations() *ChargeUsageBasedRunPaymentUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) Exec(ctx context.Context) error", + "line": 898 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ExecX(ctx context.Context)", + "line": 906 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 913 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertOne) IDX(ctx context.Context) string", + "line": 927 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentCreateBulk", + "signature": "type ChargeUsageBasedRunPaymentCreateBulk struct", + "line": 936 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBasedRunPayment, error)", + "line": 944 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBasedRunPayment", + "line": 1000 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) Exec(ctx context.Context) error", + "line": 1009 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) ExecX(ctx context.Context)", + "line": 1015 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1036 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunPaymentCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1049 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentUpsertBulk", + "signature": "type ChargeUsageBasedRunPaymentUpsertBulk struct", + "line": 1058 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateNewValues() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1073 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) Ignore() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1106 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) DoNothing() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1113 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) Update(set func(*ChargeUsageBasedRunPaymentUpsert)) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1120 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1128 + }, + { + "kind": "func", + "name": "UpdateServicePeriodFrom", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateServicePeriodFrom() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1135 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1142 + }, + { + "kind": "func", + "name": "UpdateServicePeriodTo", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateServicePeriodTo() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1149 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1156 + }, + { + "kind": "func", + "name": "UpdateStatus", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateStatus() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1163 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1170 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateAmount() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1177 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1184 + }, + { + "kind": "func", + "name": "UpdateAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1191 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1198 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1205 + }, + { + "kind": "func", + "name": "UpdateAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateAuthorizedAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1212 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearAuthorizedAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1219 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1226 + }, + { + "kind": "func", + "name": "UpdateSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "UpdateSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateSettledAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearSettledAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1289 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearDeletedAt() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1296 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) UpdateAnnotations() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1310 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ClearAnnotations() *ChargeUsageBasedRunPaymentUpsertBulk", + "line": 1317 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) Exec(ctx context.Context) error", + "line": 1324 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunPaymentUpsertBulk) ExecX(ctx context.Context)", + "line": 1340 + } + ], + "line_count": 1344 + }, + "openmeter/ent/db/chargeusagebasedrunpayment_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentDelete", + "signature": "type ChargeUsageBasedRunPaymentDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunPaymentDelete) Where(ps ...predicate.ChargeUsageBasedRunPayment) *ChargeUsageBasedRunPaymentDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunPaymentDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunPaymentDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedRunPaymentDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentDeleteOne", + "signature": "type ChargeUsageBasedRunPaymentDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunPaymentDeleteOne) Where(ps ...predicate.ChargeUsageBasedRunPayment) *ChargeUsageBasedRunPaymentDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunPaymentDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunPaymentDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebasedrunpayment_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentQuery", + "signature": "type ChargeUsageBasedRunPaymentQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Where(ps ...predicate.ChargeUsageBasedRunPayment) *ChargeUsageBasedRunPaymentQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Limit(limit int) *ChargeUsageBasedRunPaymentQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Offset(offset int) *ChargeUsageBasedRunPaymentQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Unique(unique bool) *ChargeUsageBasedRunPaymentQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Order(o ...chargeusagebasedrunpayment.OrderOption) *ChargeUsageBasedRunPaymentQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryRun", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) QueryRun() *ChargeUsageBasedRunsQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) First(ctx context.Context) (*ChargeUsageBasedRunPayment, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) FirstX(ctx context.Context) *ChargeUsageBasedRunPayment", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Only(ctx context.Context) (*ChargeUsageBasedRunPayment, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) OnlyX(ctx context.Context) *ChargeUsageBasedRunPayment", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) All(ctx context.Context) ([]*ChargeUsageBasedRunPayment, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) AllX(ctx context.Context) []*ChargeUsageBasedRunPayment", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Clone() *ChargeUsageBasedRunPaymentQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithRun", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) WithRun(opts ...func(*ChargeUsageBasedRunsQuery)) *ChargeUsageBasedRunPaymentQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedRunPaymentGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Select(fields ...string) *ChargeUsageBasedRunPaymentSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunPaymentSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBasedRunPayment, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadRun", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) loadRun(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*ChargeUsageBasedRunPayment, init func(*ChargeUsageBasedRunPayment), assign func(*ChargeUsageBasedRunPayment, *ChargeUsageBasedRuns)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedRunPaymentQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedRunPaymentQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedRunPaymentQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentGroupBy", + "signature": "type ChargeUsageBasedRunPaymentGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedRunPaymentGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunPaymentGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedRunPaymentGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedRunPaymentGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedRunPaymentQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentSelect", + "signature": "type ChargeUsageBasedRunPaymentSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedRunPaymentSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunPaymentSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedRunPaymentSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedRunPaymentSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedRunPaymentQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/chargeusagebasedrunpayment_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentUpdate", + "signature": "type ChargeUsageBasedRunPaymentUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) Where(ps ...predicate.ChargeUsageBasedRunPayment) *ChargeUsageBasedRunPaymentUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableStatus(v *payment.Status) *ChargeUsageBasedRunPaymentUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 111 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableAuthorizedAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearAuthorizedAt() *ChargeUsageBasedRunPaymentUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableSettledTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpdate", + "line": 145 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 151 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableSettledAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 157 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearSettledAt() *ChargeUsageBasedRunPaymentUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 171 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearDeletedAt() *ChargeUsageBasedRunPaymentUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ClearAnnotations() *ChargeUsageBasedRunPaymentUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) Mutation() *ChargeUsageBasedRunPaymentMutation", + "line": 209 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) Save(ctx context.Context) (int, error)", + "line": 214 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) SaveX(ctx context.Context) int", + "line": 220 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) Exec(ctx context.Context) error", + "line": 229 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) ExecX(ctx context.Context)", + "line": 235 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) defaults()", + "line": 242 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) check() error", + "line": 250 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 272 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPaymentUpdateOne", + "signature": "type ChargeUsageBasedRunPaymentUpdateOne struct", + "line": 348 + }, + { + "kind": "func", + "name": "SetServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetServicePeriodFrom(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 356 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodFrom", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableServicePeriodFrom(v *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 370 + }, + { + "kind": "func", + "name": "SetNillableServicePeriodTo", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableServicePeriodTo(v *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 376 + }, + { + "kind": "func", + "name": "SetStatus", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetStatus(v payment.Status) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 384 + }, + { + "kind": "func", + "name": "SetNillableStatus", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableStatus(v *payment.Status) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 390 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 398 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 404 + }, + { + "kind": "func", + "name": "SetAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetAuthorizedTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 412 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableAuthorizedTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 418 + }, + { + "kind": "func", + "name": "ClearAuthorizedTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearAuthorizedTransactionGroupID() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 426 + }, + { + "kind": "func", + "name": "SetAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetAuthorizedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 432 + }, + { + "kind": "func", + "name": "SetNillableAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableAuthorizedAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 438 + }, + { + "kind": "func", + "name": "ClearAuthorizedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearAuthorizedAt() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 446 + }, + { + "kind": "func", + "name": "SetSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetSettledTransactionGroupID(v string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 452 + }, + { + "kind": "func", + "name": "SetNillableSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableSettledTransactionGroupID(v *string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 458 + }, + { + "kind": "func", + "name": "ClearSettledTransactionGroupID", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearSettledTransactionGroupID() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 466 + }, + { + "kind": "func", + "name": "SetSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetSettledAt(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 472 + }, + { + "kind": "func", + "name": "SetNillableSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableSettledAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 478 + }, + { + "kind": "func", + "name": "ClearSettledAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearSettledAt() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 486 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 492 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 498 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 504 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearDeletedAt() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 512 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SetAnnotations(v models.Annotations) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 518 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ClearAnnotations() *ChargeUsageBasedRunPaymentUpdateOne", + "line": 524 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) Mutation() *ChargeUsageBasedRunPaymentMutation", + "line": 530 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) Where(ps ...predicate.ChargeUsageBasedRunPayment) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 535 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 542 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) Save(ctx context.Context) (*ChargeUsageBasedRunPayment, error)", + "line": 548 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) SaveX(ctx context.Context) *ChargeUsageBasedRunPayment", + "line": 554 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) Exec(ctx context.Context) error", + "line": 563 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) ExecX(ctx context.Context)", + "line": 569 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) defaults()", + "line": 576 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) check() error", + "line": 584 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunPaymentUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBasedRunPayment, err error)", + "line": 606 + } + ], + "line_count": 699 + }, + "openmeter/ent/db/chargeusagebasedruns.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRuns", + "signature": "type ChargeUsageBasedRuns struct", + "line": 24 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsEdges", + "signature": "type ChargeUsageBasedRunsEdges struct", + "line": 81 + }, + { + "kind": "func", + "name": "UsageBasedOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) UsageBasedOrErr() (*ChargeUsageBased, error)", + "line": 107 + }, + { + "kind": "func", + "name": "FeatureOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) FeatureOrErr() (*Feature, error)", + "line": 118 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) BillingInvoiceLineOrErr() (*BillingInvoiceLine, error)", + "line": 129 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) BillingInvoiceOrErr() (*BillingInvoice, error)", + "line": 140 + }, + { + "kind": "func", + "name": "CreditAllocationsOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) CreditAllocationsOrErr() ([]*ChargeUsageBasedRunCreditAllocations, error)", + "line": 151 + }, + { + "kind": "func", + "name": "DetailedLinesOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) DetailedLinesOrErr() ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 160 + }, + { + "kind": "func", + "name": "CorrectedDetailedLinesOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) CorrectedDetailedLinesOrErr() ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 169 + }, + { + "kind": "func", + "name": "InvoicedUsageOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) InvoicedUsageOrErr() (*ChargeUsageBasedRunInvoicedUsage, error)", + "line": 178 + }, + { + "kind": "func", + "name": "PaymentOrErr", + "signature": "func (e ChargeUsageBasedRunsEdges) PaymentOrErr() (*ChargeUsageBasedRunPayment, error)", + "line": 189 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *ChargeUsageBasedRuns) assignValues(columns []string, values []any) error", + "line": 220 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *ChargeUsageBasedRuns) Value(name string) (ent.Value, error)", + "line": 382 + }, + { + "kind": "func", + "name": "QueryUsageBased", + "signature": "func (_m *ChargeUsageBasedRuns) QueryUsageBased() *ChargeUsageBasedQuery", + "line": 387 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_m *ChargeUsageBasedRuns) QueryFeature() *FeatureQuery", + "line": 392 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_m *ChargeUsageBasedRuns) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 397 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *ChargeUsageBasedRuns) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 402 + }, + { + "kind": "func", + "name": "QueryCreditAllocations", + "signature": "func (_m *ChargeUsageBasedRuns) QueryCreditAllocations() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 407 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_m *ChargeUsageBasedRuns) QueryDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 412 + }, + { + "kind": "func", + "name": "QueryCorrectedDetailedLines", + "signature": "func (_m *ChargeUsageBasedRuns) QueryCorrectedDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 417 + }, + { + "kind": "func", + "name": "QueryInvoicedUsage", + "signature": "func (_m *ChargeUsageBasedRuns) QueryInvoicedUsage() *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 422 + }, + { + "kind": "func", + "name": "QueryPayment", + "signature": "func (_m *ChargeUsageBasedRuns) QueryPayment() *ChargeUsageBasedRunPaymentQuery", + "line": 427 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *ChargeUsageBasedRuns) Update() *ChargeUsageBasedRunsUpdateOne", + "line": 434 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *ChargeUsageBasedRuns) Unwrap() *ChargeUsageBasedRuns", + "line": 440 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *ChargeUsageBasedRuns) String() string", + "line": 450 + } + ], + "line_count": 533 + }, + "openmeter/ent/db/chargeusagebasedruns/chargeusagebasedruns.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 179 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type usagebased.RealizationRunType) error", + "line": 208 + }, + { + "kind": "func", + "name": "InitialTypeValidator", + "signature": "func InitialTypeValidator(it usagebased.RealizationRunType) error", + "line": 218 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 246 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 256 + }, + { + "kind": "func", + "name": "ByTaxesTotal", + "signature": "func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 261 + }, + { + "kind": "func", + "name": "ByTaxesInclusiveTotal", + "signature": "func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByTaxesExclusiveTotal", + "signature": "func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 271 + }, + { + "kind": "func", + "name": "ByChargesTotal", + "signature": "func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 276 + }, + { + "kind": "func", + "name": "ByDiscountsTotal", + "signature": "func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 281 + }, + { + "kind": "func", + "name": "ByCreditsTotal", + "signature": "func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 286 + }, + { + "kind": "func", + "name": "ByTotal", + "signature": "func ByTotal(opts ...sql.OrderTermOption) OrderOption", + "line": 291 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 296 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 301 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 306 + }, + { + "kind": "func", + "name": "ByInitialType", + "signature": "func ByInitialType(opts ...sql.OrderTermOption) OrderOption", + "line": 311 + }, + { + "kind": "func", + "name": "ByStoredAtLt", + "signature": "func ByStoredAtLt(opts ...sql.OrderTermOption) OrderOption", + "line": 316 + }, + { + "kind": "func", + "name": "ByServicePeriodTo", + "signature": "func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption", + "line": 321 + }, + { + "kind": "func", + "name": "ByDetailedLinesPresent", + "signature": "func ByDetailedLinesPresent(opts ...sql.OrderTermOption) OrderOption", + "line": 326 + }, + { + "kind": "func", + "name": "ByLineID", + "signature": "func ByLineID(opts ...sql.OrderTermOption) OrderOption", + "line": 331 + }, + { + "kind": "func", + "name": "ByInvoiceID", + "signature": "func ByInvoiceID(opts ...sql.OrderTermOption) OrderOption", + "line": 336 + }, + { + "kind": "func", + "name": "ByMeteredQuantity", + "signature": "func ByMeteredQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 341 + }, + { + "kind": "func", + "name": "ByNoFiatTransactionRequired", + "signature": "func ByNoFiatTransactionRequired(opts ...sql.OrderTermOption) OrderOption", + "line": 346 + }, + { + "kind": "func", + "name": "ByUsageBasedField", + "signature": "func ByUsageBasedField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 351 + }, + { + "kind": "func", + "name": "ByFeatureField", + "signature": "func ByFeatureField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 358 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLineField", + "signature": "func ByBillingInvoiceLineField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 365 + }, + { + "kind": "func", + "name": "ByBillingInvoiceField", + "signature": "func ByBillingInvoiceField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 372 + }, + { + "kind": "func", + "name": "ByCreditAllocationsCount", + "signature": "func ByCreditAllocationsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "ByCreditAllocations", + "signature": "func ByCreditAllocations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 386 + }, + { + "kind": "func", + "name": "ByDetailedLinesCount", + "signature": "func ByDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 393 + }, + { + "kind": "func", + "name": "ByDetailedLines", + "signature": "func ByDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 400 + }, + { + "kind": "func", + "name": "ByCorrectedDetailedLinesCount", + "signature": "func ByCorrectedDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 407 + }, + { + "kind": "func", + "name": "ByCorrectedDetailedLines", + "signature": "func ByCorrectedDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 414 + }, + { + "kind": "func", + "name": "ByInvoicedUsageField", + "signature": "func ByInvoicedUsageField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 421 + }, + { + "kind": "func", + "name": "ByPaymentField", + "signature": "func ByPaymentField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 428 + }, + { + "kind": "func", + "name": "newUsageBasedStep", + "signature": "func newUsageBasedStep() *sqlgraph.Step", + "line": 433 + }, + { + "kind": "func", + "name": "newFeatureStep", + "signature": "func newFeatureStep() *sqlgraph.Step", + "line": 440 + }, + { + "kind": "func", + "name": "newBillingInvoiceLineStep", + "signature": "func newBillingInvoiceLineStep() *sqlgraph.Step", + "line": 447 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 454 + }, + { + "kind": "func", + "name": "newCreditAllocationsStep", + "signature": "func newCreditAllocationsStep() *sqlgraph.Step", + "line": 461 + }, + { + "kind": "func", + "name": "newDetailedLinesStep", + "signature": "func newDetailedLinesStep() *sqlgraph.Step", + "line": 468 + }, + { + "kind": "func", + "name": "newCorrectedDetailedLinesStep", + "signature": "func newCorrectedDetailedLinesStep() *sqlgraph.Step", + "line": 475 + }, + { + "kind": "func", + "name": "newInvoicedUsageStep", + "signature": "func newInvoicedUsageStep() *sqlgraph.Step", + "line": 482 + }, + { + "kind": "func", + "name": "newPaymentStep", + "signature": "func newPaymentStep() *sqlgraph.Step", + "line": 489 + } + ], + "line_count": 495 + }, + "openmeter/ent/db/chargeusagebasedruns/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.ChargeUsageBasedRuns", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.ChargeUsageBasedRuns", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.ChargeUsageBasedRuns", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.ChargeUsageBasedRuns", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.ChargeUsageBasedRuns", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.ChargeUsageBasedRuns", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.ChargeUsageBasedRuns", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.ChargeUsageBasedRuns", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.ChargeUsageBasedRuns", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.ChargeUsageBasedRuns", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.ChargeUsageBasedRuns", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.ChargeUsageBasedRuns", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 91 + }, + { + "kind": "func", + "name": "TaxesTotal", + "signature": "func TaxesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 96 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotal", + "signature": "func TaxesInclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 101 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotal", + "signature": "func TaxesExclusiveTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 106 + }, + { + "kind": "func", + "name": "ChargesTotal", + "signature": "func ChargesTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 111 + }, + { + "kind": "func", + "name": "DiscountsTotal", + "signature": "func DiscountsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 116 + }, + { + "kind": "func", + "name": "CreditsTotal", + "signature": "func CreditsTotal(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 121 + }, + { + "kind": "func", + "name": "Total", + "signature": "func Total(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 126 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.ChargeUsageBasedRuns", + "line": 131 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.ChargeUsageBasedRuns", + "line": 136 + }, + { + "kind": "func", + "name": "StoredAtLt", + "signature": "func StoredAtLt(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 141 + }, + { + "kind": "func", + "name": "ServicePeriodTo", + "signature": "func ServicePeriodTo(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 146 + }, + { + "kind": "func", + "name": "DetailedLinesPresent", + "signature": "func DetailedLinesPresent(v bool) predicate.ChargeUsageBasedRuns", + "line": 151 + }, + { + "kind": "func", + "name": "LineID", + "signature": "func LineID(v string) predicate.ChargeUsageBasedRuns", + "line": 156 + }, + { + "kind": "func", + "name": "InvoiceID", + "signature": "func InvoiceID(v string) predicate.ChargeUsageBasedRuns", + "line": 161 + }, + { + "kind": "func", + "name": "MeteredQuantity", + "signature": "func MeteredQuantity(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 166 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequired", + "signature": "func NoFiatTransactionRequired(v bool) predicate.ChargeUsageBasedRuns", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.ChargeUsageBasedRuns", + "line": 196 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.ChargeUsageBasedRuns", + "line": 201 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.ChargeUsageBasedRuns", + "line": 206 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.ChargeUsageBasedRuns", + "line": 211 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.ChargeUsageBasedRuns", + "line": 216 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.ChargeUsageBasedRuns", + "line": 221 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.ChargeUsageBasedRuns", + "line": 226 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.ChargeUsageBasedRuns", + "line": 231 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.ChargeUsageBasedRuns", + "line": 236 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 241 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 246 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 251 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 256 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 261 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 266 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 271 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 276 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 281 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 286 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 291 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 296 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 301 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 306 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 311 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 326 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 331 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 336 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 341 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 346 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 351 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 356 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.ChargeUsageBasedRuns", + "line": 361 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.ChargeUsageBasedRuns", + "line": 366 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 371 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 376 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 381 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 386 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 391 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 396 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 401 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 406 + }, + { + "kind": "func", + "name": "TaxesTotalEQ", + "signature": "func TaxesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 411 + }, + { + "kind": "func", + "name": "TaxesTotalNEQ", + "signature": "func TaxesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 416 + }, + { + "kind": "func", + "name": "TaxesTotalIn", + "signature": "func TaxesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 421 + }, + { + "kind": "func", + "name": "TaxesTotalNotIn", + "signature": "func TaxesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 426 + }, + { + "kind": "func", + "name": "TaxesTotalGT", + "signature": "func TaxesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 431 + }, + { + "kind": "func", + "name": "TaxesTotalGTE", + "signature": "func TaxesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 436 + }, + { + "kind": "func", + "name": "TaxesTotalLT", + "signature": "func TaxesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 441 + }, + { + "kind": "func", + "name": "TaxesTotalLTE", + "signature": "func TaxesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 446 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalEQ", + "signature": "func TaxesInclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 451 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNEQ", + "signature": "func TaxesInclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 456 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalIn", + "signature": "func TaxesInclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 461 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalNotIn", + "signature": "func TaxesInclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 466 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGT", + "signature": "func TaxesInclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 471 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalGTE", + "signature": "func TaxesInclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 476 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLT", + "signature": "func TaxesInclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 481 + }, + { + "kind": "func", + "name": "TaxesInclusiveTotalLTE", + "signature": "func TaxesInclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 486 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalEQ", + "signature": "func TaxesExclusiveTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 491 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNEQ", + "signature": "func TaxesExclusiveTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 496 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalIn", + "signature": "func TaxesExclusiveTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 501 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalNotIn", + "signature": "func TaxesExclusiveTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 506 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGT", + "signature": "func TaxesExclusiveTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 511 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalGTE", + "signature": "func TaxesExclusiveTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 516 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLT", + "signature": "func TaxesExclusiveTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 521 + }, + { + "kind": "func", + "name": "TaxesExclusiveTotalLTE", + "signature": "func TaxesExclusiveTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 526 + }, + { + "kind": "func", + "name": "ChargesTotalEQ", + "signature": "func ChargesTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 531 + }, + { + "kind": "func", + "name": "ChargesTotalNEQ", + "signature": "func ChargesTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 536 + }, + { + "kind": "func", + "name": "ChargesTotalIn", + "signature": "func ChargesTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 541 + }, + { + "kind": "func", + "name": "ChargesTotalNotIn", + "signature": "func ChargesTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 546 + }, + { + "kind": "func", + "name": "ChargesTotalGT", + "signature": "func ChargesTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 551 + }, + { + "kind": "func", + "name": "ChargesTotalGTE", + "signature": "func ChargesTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 556 + }, + { + "kind": "func", + "name": "ChargesTotalLT", + "signature": "func ChargesTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 561 + }, + { + "kind": "func", + "name": "ChargesTotalLTE", + "signature": "func ChargesTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 566 + }, + { + "kind": "func", + "name": "DiscountsTotalEQ", + "signature": "func DiscountsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 571 + }, + { + "kind": "func", + "name": "DiscountsTotalNEQ", + "signature": "func DiscountsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 576 + }, + { + "kind": "func", + "name": "DiscountsTotalIn", + "signature": "func DiscountsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 581 + }, + { + "kind": "func", + "name": "DiscountsTotalNotIn", + "signature": "func DiscountsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 586 + }, + { + "kind": "func", + "name": "DiscountsTotalGT", + "signature": "func DiscountsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 591 + }, + { + "kind": "func", + "name": "DiscountsTotalGTE", + "signature": "func DiscountsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 596 + }, + { + "kind": "func", + "name": "DiscountsTotalLT", + "signature": "func DiscountsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 601 + }, + { + "kind": "func", + "name": "DiscountsTotalLTE", + "signature": "func DiscountsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 606 + }, + { + "kind": "func", + "name": "CreditsTotalEQ", + "signature": "func CreditsTotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 611 + }, + { + "kind": "func", + "name": "CreditsTotalNEQ", + "signature": "func CreditsTotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 616 + }, + { + "kind": "func", + "name": "CreditsTotalIn", + "signature": "func CreditsTotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 621 + }, + { + "kind": "func", + "name": "CreditsTotalNotIn", + "signature": "func CreditsTotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 626 + }, + { + "kind": "func", + "name": "CreditsTotalGT", + "signature": "func CreditsTotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 631 + }, + { + "kind": "func", + "name": "CreditsTotalGTE", + "signature": "func CreditsTotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 636 + }, + { + "kind": "func", + "name": "CreditsTotalLT", + "signature": "func CreditsTotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 641 + }, + { + "kind": "func", + "name": "CreditsTotalLTE", + "signature": "func CreditsTotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 646 + }, + { + "kind": "func", + "name": "TotalEQ", + "signature": "func TotalEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 651 + }, + { + "kind": "func", + "name": "TotalNEQ", + "signature": "func TotalNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 656 + }, + { + "kind": "func", + "name": "TotalIn", + "signature": "func TotalIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 661 + }, + { + "kind": "func", + "name": "TotalNotIn", + "signature": "func TotalNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 666 + }, + { + "kind": "func", + "name": "TotalGT", + "signature": "func TotalGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 671 + }, + { + "kind": "func", + "name": "TotalGTE", + "signature": "func TotalGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 676 + }, + { + "kind": "func", + "name": "TotalLT", + "signature": "func TotalLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 681 + }, + { + "kind": "func", + "name": "TotalLTE", + "signature": "func TotalLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 686 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 691 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 696 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 701 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 706 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.ChargeUsageBasedRuns", + "line": 711 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.ChargeUsageBasedRuns", + "line": 716 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.ChargeUsageBasedRuns", + "line": 721 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.ChargeUsageBasedRuns", + "line": 726 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.ChargeUsageBasedRuns", + "line": 731 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.ChargeUsageBasedRuns", + "line": 736 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.ChargeUsageBasedRuns", + "line": 741 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.ChargeUsageBasedRuns", + "line": 746 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.ChargeUsageBasedRuns", + "line": 751 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 756 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 761 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 766 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 771 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.ChargeUsageBasedRuns", + "line": 776 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.ChargeUsageBasedRuns", + "line": 781 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.ChargeUsageBasedRuns", + "line": 786 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.ChargeUsageBasedRuns", + "line": 791 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.ChargeUsageBasedRuns", + "line": 796 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.ChargeUsageBasedRuns", + "line": 801 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.ChargeUsageBasedRuns", + "line": 806 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.ChargeUsageBasedRuns", + "line": 811 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.ChargeUsageBasedRuns", + "line": 816 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 821 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 827 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 833 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 842 + }, + { + "kind": "func", + "name": "InitialTypeEQ", + "signature": "func InitialTypeEQ(v usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 851 + }, + { + "kind": "func", + "name": "InitialTypeNEQ", + "signature": "func InitialTypeNEQ(v usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 857 + }, + { + "kind": "func", + "name": "InitialTypeIn", + "signature": "func InitialTypeIn(vs ...usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 863 + }, + { + "kind": "func", + "name": "InitialTypeNotIn", + "signature": "func InitialTypeNotIn(vs ...usagebased.RealizationRunType) predicate.ChargeUsageBasedRuns", + "line": 872 + }, + { + "kind": "func", + "name": "StoredAtLtEQ", + "signature": "func StoredAtLtEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 881 + }, + { + "kind": "func", + "name": "StoredAtLtNEQ", + "signature": "func StoredAtLtNEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 886 + }, + { + "kind": "func", + "name": "StoredAtLtIn", + "signature": "func StoredAtLtIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 891 + }, + { + "kind": "func", + "name": "StoredAtLtNotIn", + "signature": "func StoredAtLtNotIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 896 + }, + { + "kind": "func", + "name": "StoredAtLtGT", + "signature": "func StoredAtLtGT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 901 + }, + { + "kind": "func", + "name": "StoredAtLtGTE", + "signature": "func StoredAtLtGTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 906 + }, + { + "kind": "func", + "name": "StoredAtLtLT", + "signature": "func StoredAtLtLT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 911 + }, + { + "kind": "func", + "name": "StoredAtLtLTE", + "signature": "func StoredAtLtLTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 916 + }, + { + "kind": "func", + "name": "ServicePeriodToEQ", + "signature": "func ServicePeriodToEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 921 + }, + { + "kind": "func", + "name": "ServicePeriodToNEQ", + "signature": "func ServicePeriodToNEQ(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 926 + }, + { + "kind": "func", + "name": "ServicePeriodToIn", + "signature": "func ServicePeriodToIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 931 + }, + { + "kind": "func", + "name": "ServicePeriodToNotIn", + "signature": "func ServicePeriodToNotIn(vs ...time.Time) predicate.ChargeUsageBasedRuns", + "line": 936 + }, + { + "kind": "func", + "name": "ServicePeriodToGT", + "signature": "func ServicePeriodToGT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 941 + }, + { + "kind": "func", + "name": "ServicePeriodToGTE", + "signature": "func ServicePeriodToGTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 946 + }, + { + "kind": "func", + "name": "ServicePeriodToLT", + "signature": "func ServicePeriodToLT(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 951 + }, + { + "kind": "func", + "name": "ServicePeriodToLTE", + "signature": "func ServicePeriodToLTE(v time.Time) predicate.ChargeUsageBasedRuns", + "line": 956 + }, + { + "kind": "func", + "name": "DetailedLinesPresentEQ", + "signature": "func DetailedLinesPresentEQ(v bool) predicate.ChargeUsageBasedRuns", + "line": 961 + }, + { + "kind": "func", + "name": "DetailedLinesPresentNEQ", + "signature": "func DetailedLinesPresentNEQ(v bool) predicate.ChargeUsageBasedRuns", + "line": 966 + }, + { + "kind": "func", + "name": "LineIDEQ", + "signature": "func LineIDEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 971 + }, + { + "kind": "func", + "name": "LineIDNEQ", + "signature": "func LineIDNEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 976 + }, + { + "kind": "func", + "name": "LineIDIn", + "signature": "func LineIDIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 981 + }, + { + "kind": "func", + "name": "LineIDNotIn", + "signature": "func LineIDNotIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 986 + }, + { + "kind": "func", + "name": "LineIDGT", + "signature": "func LineIDGT(v string) predicate.ChargeUsageBasedRuns", + "line": 991 + }, + { + "kind": "func", + "name": "LineIDGTE", + "signature": "func LineIDGTE(v string) predicate.ChargeUsageBasedRuns", + "line": 996 + }, + { + "kind": "func", + "name": "LineIDLT", + "signature": "func LineIDLT(v string) predicate.ChargeUsageBasedRuns", + "line": 1001 + }, + { + "kind": "func", + "name": "LineIDLTE", + "signature": "func LineIDLTE(v string) predicate.ChargeUsageBasedRuns", + "line": 1006 + }, + { + "kind": "func", + "name": "LineIDContains", + "signature": "func LineIDContains(v string) predicate.ChargeUsageBasedRuns", + "line": 1011 + }, + { + "kind": "func", + "name": "LineIDHasPrefix", + "signature": "func LineIDHasPrefix(v string) predicate.ChargeUsageBasedRuns", + "line": 1016 + }, + { + "kind": "func", + "name": "LineIDHasSuffix", + "signature": "func LineIDHasSuffix(v string) predicate.ChargeUsageBasedRuns", + "line": 1021 + }, + { + "kind": "func", + "name": "LineIDIsNil", + "signature": "func LineIDIsNil() predicate.ChargeUsageBasedRuns", + "line": 1026 + }, + { + "kind": "func", + "name": "LineIDNotNil", + "signature": "func LineIDNotNil() predicate.ChargeUsageBasedRuns", + "line": 1031 + }, + { + "kind": "func", + "name": "LineIDEqualFold", + "signature": "func LineIDEqualFold(v string) predicate.ChargeUsageBasedRuns", + "line": 1036 + }, + { + "kind": "func", + "name": "LineIDContainsFold", + "signature": "func LineIDContainsFold(v string) predicate.ChargeUsageBasedRuns", + "line": 1041 + }, + { + "kind": "func", + "name": "InvoiceIDEQ", + "signature": "func InvoiceIDEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 1046 + }, + { + "kind": "func", + "name": "InvoiceIDNEQ", + "signature": "func InvoiceIDNEQ(v string) predicate.ChargeUsageBasedRuns", + "line": 1051 + }, + { + "kind": "func", + "name": "InvoiceIDIn", + "signature": "func InvoiceIDIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 1056 + }, + { + "kind": "func", + "name": "InvoiceIDNotIn", + "signature": "func InvoiceIDNotIn(vs ...string) predicate.ChargeUsageBasedRuns", + "line": 1061 + }, + { + "kind": "func", + "name": "InvoiceIDGT", + "signature": "func InvoiceIDGT(v string) predicate.ChargeUsageBasedRuns", + "line": 1066 + }, + { + "kind": "func", + "name": "InvoiceIDGTE", + "signature": "func InvoiceIDGTE(v string) predicate.ChargeUsageBasedRuns", + "line": 1071 + }, + { + "kind": "func", + "name": "InvoiceIDLT", + "signature": "func InvoiceIDLT(v string) predicate.ChargeUsageBasedRuns", + "line": 1076 + }, + { + "kind": "func", + "name": "InvoiceIDLTE", + "signature": "func InvoiceIDLTE(v string) predicate.ChargeUsageBasedRuns", + "line": 1081 + }, + { + "kind": "func", + "name": "InvoiceIDContains", + "signature": "func InvoiceIDContains(v string) predicate.ChargeUsageBasedRuns", + "line": 1086 + }, + { + "kind": "func", + "name": "InvoiceIDHasPrefix", + "signature": "func InvoiceIDHasPrefix(v string) predicate.ChargeUsageBasedRuns", + "line": 1091 + }, + { + "kind": "func", + "name": "InvoiceIDHasSuffix", + "signature": "func InvoiceIDHasSuffix(v string) predicate.ChargeUsageBasedRuns", + "line": 1096 + }, + { + "kind": "func", + "name": "InvoiceIDIsNil", + "signature": "func InvoiceIDIsNil() predicate.ChargeUsageBasedRuns", + "line": 1101 + }, + { + "kind": "func", + "name": "InvoiceIDNotNil", + "signature": "func InvoiceIDNotNil() predicate.ChargeUsageBasedRuns", + "line": 1106 + }, + { + "kind": "func", + "name": "InvoiceIDEqualFold", + "signature": "func InvoiceIDEqualFold(v string) predicate.ChargeUsageBasedRuns", + "line": 1111 + }, + { + "kind": "func", + "name": "InvoiceIDContainsFold", + "signature": "func InvoiceIDContainsFold(v string) predicate.ChargeUsageBasedRuns", + "line": 1116 + }, + { + "kind": "func", + "name": "MeteredQuantityEQ", + "signature": "func MeteredQuantityEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1121 + }, + { + "kind": "func", + "name": "MeteredQuantityNEQ", + "signature": "func MeteredQuantityNEQ(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1126 + }, + { + "kind": "func", + "name": "MeteredQuantityIn", + "signature": "func MeteredQuantityIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1131 + }, + { + "kind": "func", + "name": "MeteredQuantityNotIn", + "signature": "func MeteredQuantityNotIn(vs ...alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1136 + }, + { + "kind": "func", + "name": "MeteredQuantityGT", + "signature": "func MeteredQuantityGT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1141 + }, + { + "kind": "func", + "name": "MeteredQuantityGTE", + "signature": "func MeteredQuantityGTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1146 + }, + { + "kind": "func", + "name": "MeteredQuantityLT", + "signature": "func MeteredQuantityLT(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1151 + }, + { + "kind": "func", + "name": "MeteredQuantityLTE", + "signature": "func MeteredQuantityLTE(v alpacadecimal.Decimal) predicate.ChargeUsageBasedRuns", + "line": 1156 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequiredEQ", + "signature": "func NoFiatTransactionRequiredEQ(v bool) predicate.ChargeUsageBasedRuns", + "line": 1161 + }, + { + "kind": "func", + "name": "NoFiatTransactionRequiredNEQ", + "signature": "func NoFiatTransactionRequiredNEQ(v bool) predicate.ChargeUsageBasedRuns", + "line": 1166 + }, + { + "kind": "func", + "name": "HasUsageBased", + "signature": "func HasUsageBased() predicate.ChargeUsageBasedRuns", + "line": 1171 + }, + { + "kind": "func", + "name": "HasUsageBasedWith", + "signature": "func HasUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.ChargeUsageBasedRuns", + "line": 1182 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func HasFeature() predicate.ChargeUsageBasedRuns", + "line": 1194 + }, + { + "kind": "func", + "name": "HasFeatureWith", + "signature": "func HasFeatureWith(preds ...predicate.Feature) predicate.ChargeUsageBasedRuns", + "line": 1205 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLine", + "signature": "func HasBillingInvoiceLine() predicate.ChargeUsageBasedRuns", + "line": 1217 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLineWith", + "signature": "func HasBillingInvoiceLineWith(preds ...predicate.BillingInvoiceLine) predicate.ChargeUsageBasedRuns", + "line": 1228 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.ChargeUsageBasedRuns", + "line": 1240 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.ChargeUsageBasedRuns", + "line": 1251 + }, + { + "kind": "func", + "name": "HasCreditAllocations", + "signature": "func HasCreditAllocations() predicate.ChargeUsageBasedRuns", + "line": 1263 + }, + { + "kind": "func", + "name": "HasCreditAllocationsWith", + "signature": "func HasCreditAllocationsWith(preds ...predicate.ChargeUsageBasedRunCreditAllocations) predicate.ChargeUsageBasedRuns", + "line": 1274 + }, + { + "kind": "func", + "name": "HasDetailedLines", + "signature": "func HasDetailedLines() predicate.ChargeUsageBasedRuns", + "line": 1286 + }, + { + "kind": "func", + "name": "HasDetailedLinesWith", + "signature": "func HasDetailedLinesWith(preds ...predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBasedRuns", + "line": 1297 + }, + { + "kind": "func", + "name": "HasCorrectedDetailedLines", + "signature": "func HasCorrectedDetailedLines() predicate.ChargeUsageBasedRuns", + "line": 1309 + }, + { + "kind": "func", + "name": "HasCorrectedDetailedLinesWith", + "signature": "func HasCorrectedDetailedLinesWith(preds ...predicate.ChargeUsageBasedRunDetailedLine) predicate.ChargeUsageBasedRuns", + "line": 1320 + }, + { + "kind": "func", + "name": "HasInvoicedUsage", + "signature": "func HasInvoicedUsage() predicate.ChargeUsageBasedRuns", + "line": 1332 + }, + { + "kind": "func", + "name": "HasInvoicedUsageWith", + "signature": "func HasInvoicedUsageWith(preds ...predicate.ChargeUsageBasedRunInvoicedUsage) predicate.ChargeUsageBasedRuns", + "line": 1343 + }, + { + "kind": "func", + "name": "HasPayment", + "signature": "func HasPayment() predicate.ChargeUsageBasedRuns", + "line": 1355 + }, + { + "kind": "func", + "name": "HasPaymentWith", + "signature": "func HasPaymentWith(preds ...predicate.ChargeUsageBasedRunPayment) predicate.ChargeUsageBasedRuns", + "line": 1366 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRuns", + "line": 1378 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRuns", + "line": 1383 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.ChargeUsageBasedRuns) predicate.ChargeUsageBasedRuns", + "line": 1388 + } + ], + "line_count": 1390 + }, + "openmeter/ent/db/chargeusagebasedruns_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunsCreate", + "signature": "type ChargeUsageBasedRunsCreate struct", + "line": 29 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNamespace(v string) *ChargeUsageBasedRunsCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetCreatedAt(v time.Time) *ChargeUsageBasedRunsCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableCreatedAt(v *time.Time) *ChargeUsageBasedRunsCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableUpdatedAt(v *time.Time) *ChargeUsageBasedRunsCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunsCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 127 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetChargeID(v string) *ChargeUsageBasedRunsCreate", + "line": 133 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetFeatureID(v string) *ChargeUsageBasedRunsCreate", + "line": 139 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsCreate", + "line": 145 + }, + { + "kind": "func", + "name": "SetInitialType", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetInitialType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsCreate", + "line": 151 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetServicePeriodTo", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetServicePeriodTo(v time.Time) *ChargeUsageBasedRunsCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetLineID(v string) *ChargeUsageBasedRunsCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableLineID(v *string) *ChargeUsageBasedRunsCreate", + "line": 181 + }, + { + "kind": "func", + "name": "SetInvoiceID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetInvoiceID(v string) *ChargeUsageBasedRunsCreate", + "line": 189 + }, + { + "kind": "func", + "name": "SetNillableInvoiceID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableInvoiceID(v *string) *ChargeUsageBasedRunsCreate", + "line": 195 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsCreate", + "line": 203 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsCreate", + "line": 209 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetID(v string) *ChargeUsageBasedRunsCreate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableID(v *string) *ChargeUsageBasedRunsCreate", + "line": 221 + }, + { + "kind": "func", + "name": "SetUsageBasedID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetUsageBasedID(id string) *ChargeUsageBasedRunsCreate", + "line": 229 + }, + { + "kind": "func", + "name": "SetUsageBased", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetUsageBased(v *ChargeUsageBased) *ChargeUsageBasedRunsCreate", + "line": 235 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetFeature(v *Feature) *ChargeUsageBasedRunsCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetBillingInvoiceLineID(id string) *ChargeUsageBasedRunsCreate", + "line": 245 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableBillingInvoiceLineID(id *string) *ChargeUsageBasedRunsCreate", + "line": 251 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeUsageBasedRunsCreate", + "line": 259 + }, + { + "kind": "func", + "name": "SetBillingInvoiceID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetBillingInvoiceID(id string) *ChargeUsageBasedRunsCreate", + "line": 264 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableBillingInvoiceID(id *string) *ChargeUsageBasedRunsCreate", + "line": 270 + }, + { + "kind": "func", + "name": "SetBillingInvoice", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetBillingInvoice(v *BillingInvoice) *ChargeUsageBasedRunsCreate", + "line": 278 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddCreditAllocationIDs(ids ...string) *ChargeUsageBasedRunsCreate", + "line": 283 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddCreditAllocations(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunsCreate", + "line": 289 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsCreate", + "line": 298 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsCreate", + "line": 304 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLineIDs", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddCorrectedDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsCreate", + "line": 313 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLines", + "signature": "func (_c *ChargeUsageBasedRunsCreate) AddCorrectedDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsCreate", + "line": 319 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetInvoicedUsageID(id string) *ChargeUsageBasedRunsCreate", + "line": 328 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillableInvoicedUsageID(id *string) *ChargeUsageBasedRunsCreate", + "line": 334 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetInvoicedUsage(v *ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunsCreate", + "line": 342 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetPaymentID(id string) *ChargeUsageBasedRunsCreate", + "line": 347 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetNillablePaymentID(id *string) *ChargeUsageBasedRunsCreate", + "line": 353 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SetPayment(v *ChargeUsageBasedRunPayment) *ChargeUsageBasedRunsCreate", + "line": 361 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *ChargeUsageBasedRunsCreate) Mutation() *ChargeUsageBasedRunsMutation", + "line": 366 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunsCreate) Save(ctx context.Context) (*ChargeUsageBasedRuns, error)", + "line": 371 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunsCreate) SaveX(ctx context.Context) *ChargeUsageBasedRuns", + "line": 377 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunsCreate) Exec(ctx context.Context) error", + "line": 386 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunsCreate) ExecX(ctx context.Context)", + "line": 392 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *ChargeUsageBasedRunsCreate) defaults()", + "line": 399 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *ChargeUsageBasedRunsCreate) check() error", + "line": 415 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *ChargeUsageBasedRunsCreate) sqlSave(ctx context.Context) (*ChargeUsageBasedRuns, error)", + "line": 515 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *ChargeUsageBasedRunsCreate) createSpec() (*ChargeUsageBasedRuns, *sqlgraph.CreateSpec)", + "line": 538 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunsCreate) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunsUpsertOne", + "line": 791 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunsCreate) OnConflictColumns(columns ...string) *ChargeUsageBasedRunsUpsertOne", + "line": 804 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsUpsert", + "line": 825 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateUpdatedAt() *ChargeUsageBasedRunsUpsert", + "line": 831 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsUpsert", + "line": 837 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateDeletedAt() *ChargeUsageBasedRunsUpsert", + "line": 843 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) ClearDeletedAt() *ChargeUsageBasedRunsUpsert", + "line": 849 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 855 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateAmount() *ChargeUsageBasedRunsUpsert", + "line": 861 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 867 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateTaxesTotal() *ChargeUsageBasedRunsUpsert", + "line": 873 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 879 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunsUpsert", + "line": 885 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 891 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunsUpsert", + "line": 897 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 903 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateChargesTotal() *ChargeUsageBasedRunsUpsert", + "line": 909 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 915 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateDiscountsTotal() *ChargeUsageBasedRunsUpsert", + "line": 921 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 927 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateCreditsTotal() *ChargeUsageBasedRunsUpsert", + "line": 933 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 939 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateTotal() *ChargeUsageBasedRunsUpsert", + "line": 945 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsUpsert", + "line": 951 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateType() *ChargeUsageBasedRunsUpsert", + "line": 957 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsUpsert", + "line": 963 + }, + { + "kind": "func", + "name": "UpdateStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateStoredAtLt() *ChargeUsageBasedRunsUpsert", + "line": 969 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsUpsert", + "line": 975 + }, + { + "kind": "func", + "name": "UpdateDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateDetailedLinesPresent() *ChargeUsageBasedRunsUpsert", + "line": 981 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetLineID(v string) *ChargeUsageBasedRunsUpsert", + "line": 987 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateLineID() *ChargeUsageBasedRunsUpsert", + "line": 993 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsert) ClearLineID() *ChargeUsageBasedRunsUpsert", + "line": 999 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsert", + "line": 1005 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateMeteredQuantity() *ChargeUsageBasedRunsUpsert", + "line": 1011 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsert) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsUpsert", + "line": 1017 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsert) UpdateNoFiatTransactionRequired() *ChargeUsageBasedRunsUpsert", + "line": 1023 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateNewValues() *ChargeUsageBasedRunsUpsertOne", + "line": 1039 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) Ignore() *ChargeUsageBasedRunsUpsertOne", + "line": 1076 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) DoNothing() *ChargeUsageBasedRunsUpsertOne", + "line": 1083 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) Update(set func(*ChargeUsageBasedRunsUpsert)) *ChargeUsageBasedRunsUpsertOne", + "line": 1090 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsUpsertOne", + "line": 1098 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateUpdatedAt() *ChargeUsageBasedRunsUpsertOne", + "line": 1105 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsUpsertOne", + "line": 1112 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateDeletedAt() *ChargeUsageBasedRunsUpsertOne", + "line": 1119 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) ClearDeletedAt() *ChargeUsageBasedRunsUpsertOne", + "line": 1126 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1133 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateAmount() *ChargeUsageBasedRunsUpsertOne", + "line": 1140 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1147 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateTaxesTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1154 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1161 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1168 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1175 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1182 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1189 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateChargesTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1196 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1203 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateDiscountsTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1210 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1217 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateCreditsTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1224 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1231 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateTotal() *ChargeUsageBasedRunsUpsertOne", + "line": 1238 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsUpsertOne", + "line": 1245 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateType() *ChargeUsageBasedRunsUpsertOne", + "line": 1252 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsUpsertOne", + "line": 1259 + }, + { + "kind": "func", + "name": "UpdateStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateStoredAtLt() *ChargeUsageBasedRunsUpsertOne", + "line": 1266 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsUpsertOne", + "line": 1273 + }, + { + "kind": "func", + "name": "UpdateDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateDetailedLinesPresent() *ChargeUsageBasedRunsUpsertOne", + "line": 1280 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetLineID(v string) *ChargeUsageBasedRunsUpsertOne", + "line": 1287 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateLineID() *ChargeUsageBasedRunsUpsertOne", + "line": 1294 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) ClearLineID() *ChargeUsageBasedRunsUpsertOne", + "line": 1301 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertOne", + "line": 1308 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateMeteredQuantity() *ChargeUsageBasedRunsUpsertOne", + "line": 1315 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsUpsertOne", + "line": 1322 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) UpdateNoFiatTransactionRequired() *ChargeUsageBasedRunsUpsertOne", + "line": 1329 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) Exec(ctx context.Context) error", + "line": 1336 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) ExecX(ctx context.Context)", + "line": 1344 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1351 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *ChargeUsageBasedRunsUpsertOne) IDX(ctx context.Context) string", + "line": 1365 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsCreateBulk", + "signature": "type ChargeUsageBasedRunsCreateBulk struct", + "line": 1374 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) Save(ctx context.Context) ([]*ChargeUsageBasedRuns, error)", + "line": 1382 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) SaveX(ctx context.Context) []*ChargeUsageBasedRuns", + "line": 1438 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) Exec(ctx context.Context) error", + "line": 1447 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) ExecX(ctx context.Context)", + "line": 1453 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChargeUsageBasedRunsUpsertBulk", + "line": 1474 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *ChargeUsageBasedRunsCreateBulk) OnConflictColumns(columns ...string) *ChargeUsageBasedRunsUpsertBulk", + "line": 1487 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsUpsertBulk", + "signature": "type ChargeUsageBasedRunsUpsertBulk struct", + "line": 1496 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateNewValues() *ChargeUsageBasedRunsUpsertBulk", + "line": 1511 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) Ignore() *ChargeUsageBasedRunsUpsertBulk", + "line": 1550 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) DoNothing() *ChargeUsageBasedRunsUpsertBulk", + "line": 1557 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) Update(set func(*ChargeUsageBasedRunsUpsert)) *ChargeUsageBasedRunsUpsertBulk", + "line": 1564 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsUpsertBulk", + "line": 1572 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateUpdatedAt() *ChargeUsageBasedRunsUpsertBulk", + "line": 1579 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsUpsertBulk", + "line": 1586 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateDeletedAt() *ChargeUsageBasedRunsUpsertBulk", + "line": 1593 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) ClearDeletedAt() *ChargeUsageBasedRunsUpsertBulk", + "line": 1600 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1607 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateAmount() *ChargeUsageBasedRunsUpsertBulk", + "line": 1614 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1621 + }, + { + "kind": "func", + "name": "UpdateTaxesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateTaxesTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1628 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1635 + }, + { + "kind": "func", + "name": "UpdateTaxesInclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateTaxesInclusiveTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1642 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1649 + }, + { + "kind": "func", + "name": "UpdateTaxesExclusiveTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateTaxesExclusiveTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1656 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1663 + }, + { + "kind": "func", + "name": "UpdateChargesTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateChargesTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1670 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1677 + }, + { + "kind": "func", + "name": "UpdateDiscountsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateDiscountsTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1684 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1691 + }, + { + "kind": "func", + "name": "UpdateCreditsTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateCreditsTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1698 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1705 + }, + { + "kind": "func", + "name": "UpdateTotal", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateTotal() *ChargeUsageBasedRunsUpsertBulk", + "line": 1712 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsUpsertBulk", + "line": 1719 + }, + { + "kind": "func", + "name": "UpdateType", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateType() *ChargeUsageBasedRunsUpsertBulk", + "line": 1726 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsUpsertBulk", + "line": 1733 + }, + { + "kind": "func", + "name": "UpdateStoredAtLt", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateStoredAtLt() *ChargeUsageBasedRunsUpsertBulk", + "line": 1740 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsUpsertBulk", + "line": 1747 + }, + { + "kind": "func", + "name": "UpdateDetailedLinesPresent", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateDetailedLinesPresent() *ChargeUsageBasedRunsUpsertBulk", + "line": 1754 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetLineID(v string) *ChargeUsageBasedRunsUpsertBulk", + "line": 1761 + }, + { + "kind": "func", + "name": "UpdateLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateLineID() *ChargeUsageBasedRunsUpsertBulk", + "line": 1768 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) ClearLineID() *ChargeUsageBasedRunsUpsertBulk", + "line": 1775 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpsertBulk", + "line": 1782 + }, + { + "kind": "func", + "name": "UpdateMeteredQuantity", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateMeteredQuantity() *ChargeUsageBasedRunsUpsertBulk", + "line": 1789 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsUpsertBulk", + "line": 1796 + }, + { + "kind": "func", + "name": "UpdateNoFiatTransactionRequired", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) UpdateNoFiatTransactionRequired() *ChargeUsageBasedRunsUpsertBulk", + "line": 1803 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) Exec(ctx context.Context) error", + "line": 1810 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *ChargeUsageBasedRunsUpsertBulk) ExecX(ctx context.Context)", + "line": 1826 + } + ], + "line_count": 1830 + }, + "openmeter/ent/db/chargeusagebasedruns_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunsDelete", + "signature": "type ChargeUsageBasedRunsDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunsDelete) Where(ps ...predicate.ChargeUsageBasedRuns) *ChargeUsageBasedRunsDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunsDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunsDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *ChargeUsageBasedRunsDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsDeleteOne", + "signature": "type ChargeUsageBasedRunsDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *ChargeUsageBasedRunsDeleteOne) Where(ps ...predicate.ChargeUsageBasedRuns) *ChargeUsageBasedRunsDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *ChargeUsageBasedRunsDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *ChargeUsageBasedRunsDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/chargeusagebasedruns_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunsQuery", + "signature": "type ChargeUsageBasedRunsQuery struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Where(ps ...predicate.ChargeUsageBasedRuns) *ChargeUsageBasedRunsQuery", + "line": 51 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Limit(limit int) *ChargeUsageBasedRunsQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Offset(offset int) *ChargeUsageBasedRunsQuery", + "line": 63 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Unique(unique bool) *ChargeUsageBasedRunsQuery", + "line": 70 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Order(o ...chargeusagebasedruns.OrderOption) *ChargeUsageBasedRunsQuery", + "line": 76 + }, + { + "kind": "func", + "name": "QueryUsageBased", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryUsageBased() *ChargeUsageBasedQuery", + "line": 82 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryFeature() *FeatureQuery", + "line": 104 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLine", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryBillingInvoiceLine() *BillingInvoiceLineQuery", + "line": 126 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 148 + }, + { + "kind": "func", + "name": "QueryCreditAllocations", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryCreditAllocations() *ChargeUsageBasedRunCreditAllocationsQuery", + "line": 170 + }, + { + "kind": "func", + "name": "QueryDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 192 + }, + { + "kind": "func", + "name": "QueryCorrectedDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryCorrectedDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 214 + }, + { + "kind": "func", + "name": "QueryInvoicedUsage", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryInvoicedUsage() *ChargeUsageBasedRunInvoicedUsageQuery", + "line": 236 + }, + { + "kind": "func", + "name": "QueryPayment", + "signature": "func (_q *ChargeUsageBasedRunsQuery) QueryPayment() *ChargeUsageBasedRunPaymentQuery", + "line": 258 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *ChargeUsageBasedRunsQuery) First(ctx context.Context) (*ChargeUsageBasedRuns, error)", + "line": 281 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) FirstX(ctx context.Context) *ChargeUsageBasedRuns", + "line": 293 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *ChargeUsageBasedRunsQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 303 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) FirstIDX(ctx context.Context) string", + "line": 316 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Only(ctx context.Context) (*ChargeUsageBasedRuns, error)", + "line": 327 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) OnlyX(ctx context.Context) *ChargeUsageBasedRuns", + "line": 343 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *ChargeUsageBasedRunsQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 354 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) OnlyIDX(ctx context.Context) string", + "line": 371 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *ChargeUsageBasedRunsQuery) All(ctx context.Context) ([]*ChargeUsageBasedRuns, error)", + "line": 380 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) AllX(ctx context.Context) []*ChargeUsageBasedRuns", + "line": 390 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *ChargeUsageBasedRunsQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 399 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) IDsX(ctx context.Context) []string", + "line": 411 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Count(ctx context.Context) (int, error)", + "line": 420 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) CountX(ctx context.Context) int", + "line": 429 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Exist(ctx context.Context) (bool, error)", + "line": 438 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *ChargeUsageBasedRunsQuery) ExistX(ctx context.Context) bool", + "line": 451 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Clone() *ChargeUsageBasedRunsQuery", + "line": 461 + }, + { + "kind": "func", + "name": "WithUsageBased", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithUsageBased(opts ...func(*ChargeUsageBasedQuery)) *ChargeUsageBasedRunsQuery", + "line": 488 + }, + { + "kind": "func", + "name": "WithFeature", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithFeature(opts ...func(*FeatureQuery)) *ChargeUsageBasedRunsQuery", + "line": 499 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLine", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithBillingInvoiceLine(opts ...func(*BillingInvoiceLineQuery)) *ChargeUsageBasedRunsQuery", + "line": 510 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *ChargeUsageBasedRunsQuery", + "line": 521 + }, + { + "kind": "func", + "name": "WithCreditAllocations", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithCreditAllocations(opts ...func(*ChargeUsageBasedRunCreditAllocationsQuery)) *ChargeUsageBasedRunsQuery", + "line": 532 + }, + { + "kind": "func", + "name": "WithDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithDetailedLines(opts ...func(*ChargeUsageBasedRunDetailedLineQuery)) *ChargeUsageBasedRunsQuery", + "line": 543 + }, + { + "kind": "func", + "name": "WithCorrectedDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithCorrectedDetailedLines(opts ...func(*ChargeUsageBasedRunDetailedLineQuery)) *ChargeUsageBasedRunsQuery", + "line": 554 + }, + { + "kind": "func", + "name": "WithInvoicedUsage", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithInvoicedUsage(opts ...func(*ChargeUsageBasedRunInvoicedUsageQuery)) *ChargeUsageBasedRunsQuery", + "line": 565 + }, + { + "kind": "func", + "name": "WithPayment", + "signature": "func (_q *ChargeUsageBasedRunsQuery) WithPayment(opts ...func(*ChargeUsageBasedRunPaymentQuery)) *ChargeUsageBasedRunsQuery", + "line": 576 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *ChargeUsageBasedRunsQuery) GroupBy(field string, fields ...string) *ChargeUsageBasedRunsGroupBy", + "line": 599 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Select(fields ...string) *ChargeUsageBasedRunsSelect", + "line": 620 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *ChargeUsageBasedRunsQuery) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunsSelect", + "line": 629 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *ChargeUsageBasedRunsQuery) prepareQuery(ctx context.Context) error", + "line": 633 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *ChargeUsageBasedRunsQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*ChargeUsageBasedRuns, error)", + "line": 659 + }, + { + "kind": "func", + "name": "loadUsageBased", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBased)) error", + "line": 762 + }, + { + "kind": "func", + "name": "loadFeature", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadFeature(ctx context.Context, query *FeatureQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *Feature)) error", + "line": 791 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLine", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadBillingInvoiceLine(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *BillingInvoiceLine)) error", + "line": 820 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *BillingInvoice)) error", + "line": 852 + }, + { + "kind": "func", + "name": "loadCreditAllocations", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadCreditAllocations(ctx context.Context, query *ChargeUsageBasedRunCreditAllocationsQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBasedRunCreditAllocations)) error", + "line": 884 + }, + { + "kind": "func", + "name": "loadDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadDetailedLines(ctx context.Context, query *ChargeUsageBasedRunDetailedLineQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBasedRunDetailedLine)) error", + "line": 914 + }, + { + "kind": "func", + "name": "loadCorrectedDetailedLines", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadCorrectedDetailedLines(ctx context.Context, query *ChargeUsageBasedRunDetailedLineQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBasedRunDetailedLine)) error", + "line": 944 + }, + { + "kind": "func", + "name": "loadInvoicedUsage", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadInvoicedUsage(ctx context.Context, query *ChargeUsageBasedRunInvoicedUsageQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBasedRunInvoicedUsage)) error", + "line": 977 + }, + { + "kind": "func", + "name": "loadPayment", + "signature": "func (_q *ChargeUsageBasedRunsQuery) loadPayment(ctx context.Context, query *ChargeUsageBasedRunPaymentQuery, nodes []*ChargeUsageBasedRuns, init func(*ChargeUsageBasedRuns), assign func(*ChargeUsageBasedRuns, *ChargeUsageBasedRunPayment)) error", + "line": 1004 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *ChargeUsageBasedRunsQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1032 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *ChargeUsageBasedRunsQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1044 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *ChargeUsageBasedRunsQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1096 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *ChargeUsageBasedRunsQuery) ForUpdate(opts ...sql.LockOption) *ChargeUsageBasedRunsQuery", + "line": 1134 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *ChargeUsageBasedRunsQuery) ForShare(opts ...sql.LockOption) *ChargeUsageBasedRunsQuery", + "line": 1147 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsGroupBy", + "signature": "type ChargeUsageBasedRunsGroupBy struct", + "line": 1158 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *ChargeUsageBasedRunsGroupBy) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunsGroupBy", + "line": 1164 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *ChargeUsageBasedRunsGroupBy) Scan(ctx context.Context, v any) error", + "line": 1170 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *ChargeUsageBasedRunsGroupBy) sqlScan(ctx context.Context, root *ChargeUsageBasedRunsQuery, v any) error", + "line": 1178 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsSelect", + "signature": "type ChargeUsageBasedRunsSelect struct", + "line": 1206 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *ChargeUsageBasedRunsSelect) Aggregate(fns ...AggregateFunc) *ChargeUsageBasedRunsSelect", + "line": 1212 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *ChargeUsageBasedRunsSelect) Scan(ctx context.Context, v any) error", + "line": 1218 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *ChargeUsageBasedRunsSelect) sqlScan(ctx context.Context, root *ChargeUsageBasedRunsQuery, v any) error", + "line": 1226 + } + ], + "line_count": 1245 + }, + "openmeter/ent/db/chargeusagebasedruns_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBasedRunsUpdate", + "signature": "type ChargeUsageBasedRunsUpdate struct", + "line": 26 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) Where(ps ...predicate.ChargeUsageBasedRuns) *ChargeUsageBasedRunsUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunsUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearDeletedAt() *ChargeUsageBasedRunsUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 71 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 99 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 127 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsUpdate", + "line": 177 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableType(v *usagebased.RealizationRunType) *ChargeUsageBasedRunsUpdate", + "line": 183 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsUpdate", + "line": 191 + }, + { + "kind": "func", + "name": "SetNillableStoredAtLt", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableStoredAtLt(v *time.Time) *ChargeUsageBasedRunsUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsUpdate", + "line": 205 + }, + { + "kind": "func", + "name": "SetNillableDetailedLinesPresent", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableDetailedLinesPresent(v *bool) *ChargeUsageBasedRunsUpdate", + "line": 211 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetLineID(v string) *ChargeUsageBasedRunsUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableLineID(v *string) *ChargeUsageBasedRunsUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearLineID() *ChargeUsageBasedRunsUpdate", + "line": 233 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 239 + }, + { + "kind": "func", + "name": "SetNillableMeteredQuantity", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableMeteredQuantity(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdate", + "line": 245 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsUpdate", + "line": 253 + }, + { + "kind": "func", + "name": "SetNillableNoFiatTransactionRequired", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableNoFiatTransactionRequired(v *bool) *ChargeUsageBasedRunsUpdate", + "line": 259 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetBillingInvoiceLineID(id string) *ChargeUsageBasedRunsUpdate", + "line": 267 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableBillingInvoiceLineID(id *string) *ChargeUsageBasedRunsUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeUsageBasedRunsUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddCreditAllocationIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 286 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddCreditAllocations(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunsUpdate", + "line": 292 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 301 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdate", + "line": 307 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddCorrectedDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) AddCorrectedDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetInvoicedUsageID(id string) *ChargeUsageBasedRunsUpdate", + "line": 331 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillableInvoicedUsageID(id *string) *ChargeUsageBasedRunsUpdate", + "line": 337 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetInvoicedUsage(v *ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunsUpdate", + "line": 345 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetPaymentID(id string) *ChargeUsageBasedRunsUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetNillablePaymentID(id *string) *ChargeUsageBasedRunsUpdate", + "line": 356 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SetPayment(v *ChargeUsageBasedRunPayment) *ChargeUsageBasedRunsUpdate", + "line": 364 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) Mutation() *ChargeUsageBasedRunsMutation", + "line": 369 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearBillingInvoiceLine() *ChargeUsageBasedRunsUpdate", + "line": 374 + }, + { + "kind": "func", + "name": "ClearCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearCreditAllocations() *ChargeUsageBasedRunsUpdate", + "line": 380 + }, + { + "kind": "func", + "name": "RemoveCreditAllocationIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveCreditAllocationIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "RemoveCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveCreditAllocations(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunsUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearDetailedLines() *ChargeUsageBasedRunsUpdate", + "line": 401 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 407 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdate", + "line": 413 + }, + { + "kind": "func", + "name": "ClearCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearCorrectedDetailedLines() *ChargeUsageBasedRunsUpdate", + "line": 422 + }, + { + "kind": "func", + "name": "RemoveCorrectedDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveCorrectedDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdate", + "line": 428 + }, + { + "kind": "func", + "name": "RemoveCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) RemoveCorrectedDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdate", + "line": 434 + }, + { + "kind": "func", + "name": "ClearInvoicedUsage", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearInvoicedUsage() *ChargeUsageBasedRunsUpdate", + "line": 443 + }, + { + "kind": "func", + "name": "ClearPayment", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ClearPayment() *ChargeUsageBasedRunsUpdate", + "line": 449 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) Save(ctx context.Context) (int, error)", + "line": 455 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) SaveX(ctx context.Context) int", + "line": 461 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) Exec(ctx context.Context) error", + "line": 470 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) ExecX(ctx context.Context)", + "line": 476 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) defaults()", + "line": 483 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) check() error", + "line": 491 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunsUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 511 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunsUpdateOne", + "signature": "type ChargeUsageBasedRunsUpdateOne struct", + "line": 806 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetUpdatedAt(v time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 814 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetDeletedAt(v time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 820 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableDeletedAt(v *time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 826 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearDeletedAt() *ChargeUsageBasedRunsUpdateOne", + "line": 834 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetAmount(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 840 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 846 + }, + { + "kind": "func", + "name": "SetTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetTaxesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 854 + }, + { + "kind": "func", + "name": "SetNillableTaxesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableTaxesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 860 + }, + { + "kind": "func", + "name": "SetTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetTaxesInclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 868 + }, + { + "kind": "func", + "name": "SetNillableTaxesInclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableTaxesInclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 874 + }, + { + "kind": "func", + "name": "SetTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetTaxesExclusiveTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 882 + }, + { + "kind": "func", + "name": "SetNillableTaxesExclusiveTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableTaxesExclusiveTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 888 + }, + { + "kind": "func", + "name": "SetChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetChargesTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 896 + }, + { + "kind": "func", + "name": "SetNillableChargesTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableChargesTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 902 + }, + { + "kind": "func", + "name": "SetDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetDiscountsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 910 + }, + { + "kind": "func", + "name": "SetNillableDiscountsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableDiscountsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 916 + }, + { + "kind": "func", + "name": "SetCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetCreditsTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 924 + }, + { + "kind": "func", + "name": "SetNillableCreditsTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableCreditsTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 930 + }, + { + "kind": "func", + "name": "SetTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetTotal(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 938 + }, + { + "kind": "func", + "name": "SetNillableTotal", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableTotal(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 944 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetType(v usagebased.RealizationRunType) *ChargeUsageBasedRunsUpdateOne", + "line": 952 + }, + { + "kind": "func", + "name": "SetNillableType", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableType(v *usagebased.RealizationRunType) *ChargeUsageBasedRunsUpdateOne", + "line": 958 + }, + { + "kind": "func", + "name": "SetStoredAtLt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetStoredAtLt(v time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 966 + }, + { + "kind": "func", + "name": "SetNillableStoredAtLt", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableStoredAtLt(v *time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 972 + }, + { + "kind": "func", + "name": "SetDetailedLinesPresent", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetDetailedLinesPresent(v bool) *ChargeUsageBasedRunsUpdateOne", + "line": 980 + }, + { + "kind": "func", + "name": "SetNillableDetailedLinesPresent", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableDetailedLinesPresent(v *bool) *ChargeUsageBasedRunsUpdateOne", + "line": 986 + }, + { + "kind": "func", + "name": "SetLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetLineID(v string) *ChargeUsageBasedRunsUpdateOne", + "line": 994 + }, + { + "kind": "func", + "name": "SetNillableLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableLineID(v *string) *ChargeUsageBasedRunsUpdateOne", + "line": 1000 + }, + { + "kind": "func", + "name": "ClearLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearLineID() *ChargeUsageBasedRunsUpdateOne", + "line": 1008 + }, + { + "kind": "func", + "name": "SetMeteredQuantity", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetMeteredQuantity(v alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 1014 + }, + { + "kind": "func", + "name": "SetNillableMeteredQuantity", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableMeteredQuantity(v *alpacadecimal.Decimal) *ChargeUsageBasedRunsUpdateOne", + "line": 1020 + }, + { + "kind": "func", + "name": "SetNoFiatTransactionRequired", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNoFiatTransactionRequired(v bool) *ChargeUsageBasedRunsUpdateOne", + "line": 1028 + }, + { + "kind": "func", + "name": "SetNillableNoFiatTransactionRequired", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableNoFiatTransactionRequired(v *bool) *ChargeUsageBasedRunsUpdateOne", + "line": 1034 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetBillingInvoiceLineID(id string) *ChargeUsageBasedRunsUpdateOne", + "line": 1042 + }, + { + "kind": "func", + "name": "SetNillableBillingInvoiceLineID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableBillingInvoiceLineID(id *string) *ChargeUsageBasedRunsUpdateOne", + "line": 1048 + }, + { + "kind": "func", + "name": "SetBillingInvoiceLine", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetBillingInvoiceLine(v *BillingInvoiceLine) *ChargeUsageBasedRunsUpdateOne", + "line": 1056 + }, + { + "kind": "func", + "name": "AddCreditAllocationIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddCreditAllocationIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "AddCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddCreditAllocations(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunsUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "AddDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1076 + }, + { + "kind": "func", + "name": "AddDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdateOne", + "line": 1082 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddCorrectedDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1091 + }, + { + "kind": "func", + "name": "AddCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) AddCorrectedDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdateOne", + "line": 1097 + }, + { + "kind": "func", + "name": "SetInvoicedUsageID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetInvoicedUsageID(id string) *ChargeUsageBasedRunsUpdateOne", + "line": 1106 + }, + { + "kind": "func", + "name": "SetNillableInvoicedUsageID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillableInvoicedUsageID(id *string) *ChargeUsageBasedRunsUpdateOne", + "line": 1112 + }, + { + "kind": "func", + "name": "SetInvoicedUsage", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetInvoicedUsage(v *ChargeUsageBasedRunInvoicedUsage) *ChargeUsageBasedRunsUpdateOne", + "line": 1120 + }, + { + "kind": "func", + "name": "SetPaymentID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetPaymentID(id string) *ChargeUsageBasedRunsUpdateOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetNillablePaymentID", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetNillablePaymentID(id *string) *ChargeUsageBasedRunsUpdateOne", + "line": 1131 + }, + { + "kind": "func", + "name": "SetPayment", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SetPayment(v *ChargeUsageBasedRunPayment) *ChargeUsageBasedRunsUpdateOne", + "line": 1139 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) Mutation() *ChargeUsageBasedRunsMutation", + "line": 1144 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLine", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearBillingInvoiceLine() *ChargeUsageBasedRunsUpdateOne", + "line": 1149 + }, + { + "kind": "func", + "name": "ClearCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearCreditAllocations() *ChargeUsageBasedRunsUpdateOne", + "line": 1155 + }, + { + "kind": "func", + "name": "RemoveCreditAllocationIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveCreditAllocationIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1161 + }, + { + "kind": "func", + "name": "RemoveCreditAllocations", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveCreditAllocations(v ...*ChargeUsageBasedRunCreditAllocations) *ChargeUsageBasedRunsUpdateOne", + "line": 1167 + }, + { + "kind": "func", + "name": "ClearDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearDetailedLines() *ChargeUsageBasedRunsUpdateOne", + "line": 1176 + }, + { + "kind": "func", + "name": "RemoveDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1182 + }, + { + "kind": "func", + "name": "RemoveDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdateOne", + "line": 1188 + }, + { + "kind": "func", + "name": "ClearCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearCorrectedDetailedLines() *ChargeUsageBasedRunsUpdateOne", + "line": 1197 + }, + { + "kind": "func", + "name": "RemoveCorrectedDetailedLineIDs", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveCorrectedDetailedLineIDs(ids ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1203 + }, + { + "kind": "func", + "name": "RemoveCorrectedDetailedLines", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) RemoveCorrectedDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *ChargeUsageBasedRunsUpdateOne", + "line": 1209 + }, + { + "kind": "func", + "name": "ClearInvoicedUsage", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearInvoicedUsage() *ChargeUsageBasedRunsUpdateOne", + "line": 1218 + }, + { + "kind": "func", + "name": "ClearPayment", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ClearPayment() *ChargeUsageBasedRunsUpdateOne", + "line": 1224 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) Where(ps ...predicate.ChargeUsageBasedRuns) *ChargeUsageBasedRunsUpdateOne", + "line": 1230 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) Select(field string, fields ...string) *ChargeUsageBasedRunsUpdateOne", + "line": 1237 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) Save(ctx context.Context) (*ChargeUsageBasedRuns, error)", + "line": 1243 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) SaveX(ctx context.Context) *ChargeUsageBasedRuns", + "line": 1249 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) Exec(ctx context.Context) error", + "line": 1258 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) ExecX(ctx context.Context)", + "line": 1264 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) defaults()", + "line": 1271 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) check() error", + "line": 1279 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *ChargeUsageBasedRunsUpdateOne) sqlSave(ctx context.Context) (_node *ChargeUsageBasedRuns, err error)", + "line": 1299 + } + ], + "line_count": 1611 + }, + "openmeter/ent/db/creditrealizationlineage.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineage", + "signature": "type CreditRealizationLineage struct", + "line": 20 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageEdges", + "signature": "type CreditRealizationLineageEdges struct", + "line": 47 + }, + { + "kind": "func", + "name": "ChargeOrErr", + "signature": "func (e CreditRealizationLineageEdges) ChargeOrErr() (*Charge, error)", + "line": 59 + }, + { + "kind": "func", + "name": "SegmentsOrErr", + "signature": "func (e CreditRealizationLineageEdges) SegmentsOrErr() ([]*CreditRealizationLineageSegment, error)", + "line": 70 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *CreditRealizationLineage) assignValues(columns []string, values []any) error", + "line": 97 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *CreditRealizationLineage) Value(name string) (ent.Value, error)", + "line": 166 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_m *CreditRealizationLineage) QueryCharge() *ChargeQuery", + "line": 171 + }, + { + "kind": "func", + "name": "QuerySegments", + "signature": "func (_m *CreditRealizationLineage) QuerySegments() *CreditRealizationLineageSegmentQuery", + "line": 176 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *CreditRealizationLineage) Update() *CreditRealizationLineageUpdateOne", + "line": 183 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *CreditRealizationLineage) Unwrap() *CreditRealizationLineage", + "line": 189 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *CreditRealizationLineage) String() string", + "line": 199 + } + ], + "line_count": 231 + }, + "openmeter/ent/db/creditrealizationlineage/creditrealizationlineage.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 71 + }, + { + "kind": "func", + "name": "OriginKindValidator", + "signature": "func OriginKindValidator(ok creditrealization.LineageOriginKind) error", + "line": 98 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 111 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 116 + }, + { + "kind": "func", + "name": "ByChargeID", + "signature": "func ByChargeID(opts ...sql.OrderTermOption) OrderOption", + "line": 121 + }, + { + "kind": "func", + "name": "ByRootRealizationID", + "signature": "func ByRootRealizationID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "ByOriginKind", + "signature": "func ByOriginKind(opts ...sql.OrderTermOption) OrderOption", + "line": 141 + }, + { + "kind": "func", + "name": "ByAdvanceFeatures", + "signature": "func ByAdvanceFeatures(opts ...sql.OrderTermOption) OrderOption", + "line": 146 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 151 + }, + { + "kind": "func", + "name": "ByChargeField", + "signature": "func ByChargeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 156 + }, + { + "kind": "func", + "name": "BySegmentsCount", + "signature": "func BySegmentsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "BySegments", + "signature": "func BySegments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "newChargeStep", + "signature": "func newChargeStep() *sqlgraph.Step", + "line": 175 + }, + { + "kind": "func", + "name": "newSegmentsStep", + "signature": "func newSegmentsStep() *sqlgraph.Step", + "line": 182 + } + ], + "line_count": 188 + }, + "openmeter/ent/db/creditrealizationlineage/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.CreditRealizationLineage", + "line": 17 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.CreditRealizationLineage", + "line": 22 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.CreditRealizationLineage", + "line": 27 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.CreditRealizationLineage", + "line": 32 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.CreditRealizationLineage", + "line": 37 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.CreditRealizationLineage", + "line": 42 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.CreditRealizationLineage", + "line": 47 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.CreditRealizationLineage", + "line": 52 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.CreditRealizationLineage", + "line": 57 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.CreditRealizationLineage", + "line": 62 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.CreditRealizationLineage", + "line": 67 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.CreditRealizationLineage", + "line": 72 + }, + { + "kind": "func", + "name": "ChargeID", + "signature": "func ChargeID(v string) predicate.CreditRealizationLineage", + "line": 77 + }, + { + "kind": "func", + "name": "RootRealizationID", + "signature": "func RootRealizationID(v string) predicate.CreditRealizationLineage", + "line": 82 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.CreditRealizationLineage", + "line": 87 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 92 + }, + { + "kind": "func", + "name": "AdvanceFeatures", + "signature": "func AdvanceFeatures(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 98 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.CreditRealizationLineage", + "line": 103 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.CreditRealizationLineage", + "line": 108 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.CreditRealizationLineage", + "line": 113 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.CreditRealizationLineage", + "line": 118 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.CreditRealizationLineage", + "line": 123 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.CreditRealizationLineage", + "line": 128 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.CreditRealizationLineage", + "line": 133 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.CreditRealizationLineage", + "line": 138 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.CreditRealizationLineage", + "line": 143 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.CreditRealizationLineage", + "line": 148 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.CreditRealizationLineage", + "line": 153 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.CreditRealizationLineage", + "line": 158 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.CreditRealizationLineage", + "line": 163 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.CreditRealizationLineage", + "line": 168 + }, + { + "kind": "func", + "name": "ChargeIDEQ", + "signature": "func ChargeIDEQ(v string) predicate.CreditRealizationLineage", + "line": 173 + }, + { + "kind": "func", + "name": "ChargeIDNEQ", + "signature": "func ChargeIDNEQ(v string) predicate.CreditRealizationLineage", + "line": 178 + }, + { + "kind": "func", + "name": "ChargeIDIn", + "signature": "func ChargeIDIn(vs ...string) predicate.CreditRealizationLineage", + "line": 183 + }, + { + "kind": "func", + "name": "ChargeIDNotIn", + "signature": "func ChargeIDNotIn(vs ...string) predicate.CreditRealizationLineage", + "line": 188 + }, + { + "kind": "func", + "name": "ChargeIDGT", + "signature": "func ChargeIDGT(v string) predicate.CreditRealizationLineage", + "line": 193 + }, + { + "kind": "func", + "name": "ChargeIDGTE", + "signature": "func ChargeIDGTE(v string) predicate.CreditRealizationLineage", + "line": 198 + }, + { + "kind": "func", + "name": "ChargeIDLT", + "signature": "func ChargeIDLT(v string) predicate.CreditRealizationLineage", + "line": 203 + }, + { + "kind": "func", + "name": "ChargeIDLTE", + "signature": "func ChargeIDLTE(v string) predicate.CreditRealizationLineage", + "line": 208 + }, + { + "kind": "func", + "name": "ChargeIDContains", + "signature": "func ChargeIDContains(v string) predicate.CreditRealizationLineage", + "line": 213 + }, + { + "kind": "func", + "name": "ChargeIDHasPrefix", + "signature": "func ChargeIDHasPrefix(v string) predicate.CreditRealizationLineage", + "line": 218 + }, + { + "kind": "func", + "name": "ChargeIDHasSuffix", + "signature": "func ChargeIDHasSuffix(v string) predicate.CreditRealizationLineage", + "line": 223 + }, + { + "kind": "func", + "name": "ChargeIDEqualFold", + "signature": "func ChargeIDEqualFold(v string) predicate.CreditRealizationLineage", + "line": 228 + }, + { + "kind": "func", + "name": "ChargeIDContainsFold", + "signature": "func ChargeIDContainsFold(v string) predicate.CreditRealizationLineage", + "line": 233 + }, + { + "kind": "func", + "name": "RootRealizationIDEQ", + "signature": "func RootRealizationIDEQ(v string) predicate.CreditRealizationLineage", + "line": 238 + }, + { + "kind": "func", + "name": "RootRealizationIDNEQ", + "signature": "func RootRealizationIDNEQ(v string) predicate.CreditRealizationLineage", + "line": 243 + }, + { + "kind": "func", + "name": "RootRealizationIDIn", + "signature": "func RootRealizationIDIn(vs ...string) predicate.CreditRealizationLineage", + "line": 248 + }, + { + "kind": "func", + "name": "RootRealizationIDNotIn", + "signature": "func RootRealizationIDNotIn(vs ...string) predicate.CreditRealizationLineage", + "line": 253 + }, + { + "kind": "func", + "name": "RootRealizationIDGT", + "signature": "func RootRealizationIDGT(v string) predicate.CreditRealizationLineage", + "line": 258 + }, + { + "kind": "func", + "name": "RootRealizationIDGTE", + "signature": "func RootRealizationIDGTE(v string) predicate.CreditRealizationLineage", + "line": 263 + }, + { + "kind": "func", + "name": "RootRealizationIDLT", + "signature": "func RootRealizationIDLT(v string) predicate.CreditRealizationLineage", + "line": 268 + }, + { + "kind": "func", + "name": "RootRealizationIDLTE", + "signature": "func RootRealizationIDLTE(v string) predicate.CreditRealizationLineage", + "line": 273 + }, + { + "kind": "func", + "name": "RootRealizationIDContains", + "signature": "func RootRealizationIDContains(v string) predicate.CreditRealizationLineage", + "line": 278 + }, + { + "kind": "func", + "name": "RootRealizationIDHasPrefix", + "signature": "func RootRealizationIDHasPrefix(v string) predicate.CreditRealizationLineage", + "line": 283 + }, + { + "kind": "func", + "name": "RootRealizationIDHasSuffix", + "signature": "func RootRealizationIDHasSuffix(v string) predicate.CreditRealizationLineage", + "line": 288 + }, + { + "kind": "func", + "name": "RootRealizationIDEqualFold", + "signature": "func RootRealizationIDEqualFold(v string) predicate.CreditRealizationLineage", + "line": 293 + }, + { + "kind": "func", + "name": "RootRealizationIDContainsFold", + "signature": "func RootRealizationIDContainsFold(v string) predicate.CreditRealizationLineage", + "line": 298 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.CreditRealizationLineage", + "line": 303 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.CreditRealizationLineage", + "line": 308 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.CreditRealizationLineage", + "line": 313 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.CreditRealizationLineage", + "line": 318 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.CreditRealizationLineage", + "line": 323 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.CreditRealizationLineage", + "line": 328 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.CreditRealizationLineage", + "line": 333 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.CreditRealizationLineage", + "line": 338 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.CreditRealizationLineage", + "line": 343 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.CreditRealizationLineage", + "line": 348 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.CreditRealizationLineage", + "line": 353 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.CreditRealizationLineage", + "line": 358 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.CreditRealizationLineage", + "line": 363 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 368 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 374 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.CreditRealizationLineage", + "line": 380 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.CreditRealizationLineage", + "line": 389 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 398 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 404 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 410 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 416 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 422 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 428 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 434 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 440 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.CreditRealizationLineage", + "line": 446 + }, + { + "kind": "func", + "name": "OriginKindEQ", + "signature": "func OriginKindEQ(v creditrealization.LineageOriginKind) predicate.CreditRealizationLineage", + "line": 452 + }, + { + "kind": "func", + "name": "OriginKindNEQ", + "signature": "func OriginKindNEQ(v creditrealization.LineageOriginKind) predicate.CreditRealizationLineage", + "line": 458 + }, + { + "kind": "func", + "name": "OriginKindIn", + "signature": "func OriginKindIn(vs ...creditrealization.LineageOriginKind) predicate.CreditRealizationLineage", + "line": 464 + }, + { + "kind": "func", + "name": "OriginKindNotIn", + "signature": "func OriginKindNotIn(vs ...creditrealization.LineageOriginKind) predicate.CreditRealizationLineage", + "line": 473 + }, + { + "kind": "func", + "name": "AdvanceFeaturesEQ", + "signature": "func AdvanceFeaturesEQ(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 482 + }, + { + "kind": "func", + "name": "AdvanceFeaturesNEQ", + "signature": "func AdvanceFeaturesNEQ(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 487 + }, + { + "kind": "func", + "name": "AdvanceFeaturesIn", + "signature": "func AdvanceFeaturesIn(vs ...pq.StringArray) predicate.CreditRealizationLineage", + "line": 492 + }, + { + "kind": "func", + "name": "AdvanceFeaturesNotIn", + "signature": "func AdvanceFeaturesNotIn(vs ...pq.StringArray) predicate.CreditRealizationLineage", + "line": 497 + }, + { + "kind": "func", + "name": "AdvanceFeaturesGT", + "signature": "func AdvanceFeaturesGT(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 502 + }, + { + "kind": "func", + "name": "AdvanceFeaturesGTE", + "signature": "func AdvanceFeaturesGTE(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 507 + }, + { + "kind": "func", + "name": "AdvanceFeaturesLT", + "signature": "func AdvanceFeaturesLT(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 512 + }, + { + "kind": "func", + "name": "AdvanceFeaturesLTE", + "signature": "func AdvanceFeaturesLTE(v pq.StringArray) predicate.CreditRealizationLineage", + "line": 517 + }, + { + "kind": "func", + "name": "AdvanceFeaturesIsNil", + "signature": "func AdvanceFeaturesIsNil() predicate.CreditRealizationLineage", + "line": 522 + }, + { + "kind": "func", + "name": "AdvanceFeaturesNotNil", + "signature": "func AdvanceFeaturesNotNil() predicate.CreditRealizationLineage", + "line": 527 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.CreditRealizationLineage", + "line": 532 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.CreditRealizationLineage", + "line": 537 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.CreditRealizationLineage", + "line": 542 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.CreditRealizationLineage", + "line": 547 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.CreditRealizationLineage", + "line": 552 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.CreditRealizationLineage", + "line": 557 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.CreditRealizationLineage", + "line": 562 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.CreditRealizationLineage", + "line": 567 + }, + { + "kind": "func", + "name": "HasCharge", + "signature": "func HasCharge() predicate.CreditRealizationLineage", + "line": 572 + }, + { + "kind": "func", + "name": "HasChargeWith", + "signature": "func HasChargeWith(preds ...predicate.Charge) predicate.CreditRealizationLineage", + "line": 583 + }, + { + "kind": "func", + "name": "HasSegments", + "signature": "func HasSegments() predicate.CreditRealizationLineage", + "line": 595 + }, + { + "kind": "func", + "name": "HasSegmentsWith", + "signature": "func HasSegmentsWith(preds ...predicate.CreditRealizationLineageSegment) predicate.CreditRealizationLineage", + "line": 606 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.CreditRealizationLineage) predicate.CreditRealizationLineage", + "line": 618 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.CreditRealizationLineage) predicate.CreditRealizationLineage", + "line": 623 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.CreditRealizationLineage) predicate.CreditRealizationLineage", + "line": 628 + } + ], + "line_count": 630 + }, + "openmeter/ent/db/creditrealizationlineage_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageCreate", + "signature": "type CreditRealizationLineageCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *CreditRealizationLineageCreate) SetNamespace(v string) *CreditRealizationLineageCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetChargeID", + "signature": "func (_c *CreditRealizationLineageCreate) SetChargeID(v string) *CreditRealizationLineageCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetRootRealizationID", + "signature": "func (_c *CreditRealizationLineageCreate) SetRootRealizationID(v string) *CreditRealizationLineageCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *CreditRealizationLineageCreate) SetCustomerID(v string) *CreditRealizationLineageCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *CreditRealizationLineageCreate) SetCurrency(v currencyx.Code) *CreditRealizationLineageCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetOriginKind", + "signature": "func (_c *CreditRealizationLineageCreate) SetOriginKind(v creditrealization.LineageOriginKind) *CreditRealizationLineageCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetAdvanceFeatures", + "signature": "func (_c *CreditRealizationLineageCreate) SetAdvanceFeatures(v pq.StringArray) *CreditRealizationLineageCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CreditRealizationLineageCreate) SetCreatedAt(v time.Time) *CreditRealizationLineageCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CreditRealizationLineageCreate) SetNillableCreatedAt(v *time.Time) *CreditRealizationLineageCreate", + "line": 80 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *CreditRealizationLineageCreate) SetID(v string) *CreditRealizationLineageCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *CreditRealizationLineageCreate) SetNillableID(v *string) *CreditRealizationLineageCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetCharge", + "signature": "func (_c *CreditRealizationLineageCreate) SetCharge(v *Charge) *CreditRealizationLineageCreate", + "line": 102 + }, + { + "kind": "func", + "name": "AddSegmentIDs", + "signature": "func (_c *CreditRealizationLineageCreate) AddSegmentIDs(ids ...string) *CreditRealizationLineageCreate", + "line": 107 + }, + { + "kind": "func", + "name": "AddSegments", + "signature": "func (_c *CreditRealizationLineageCreate) AddSegments(v ...*CreditRealizationLineageSegment) *CreditRealizationLineageCreate", + "line": 113 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CreditRealizationLineageCreate) Mutation() *CreditRealizationLineageMutation", + "line": 122 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CreditRealizationLineageCreate) Save(ctx context.Context) (*CreditRealizationLineage, error)", + "line": 127 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CreditRealizationLineageCreate) SaveX(ctx context.Context) *CreditRealizationLineage", + "line": 133 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CreditRealizationLineageCreate) Exec(ctx context.Context) error", + "line": 142 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CreditRealizationLineageCreate) ExecX(ctx context.Context)", + "line": 148 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CreditRealizationLineageCreate) defaults()", + "line": 155 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CreditRealizationLineageCreate) check() error", + "line": 167 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CreditRealizationLineageCreate) sqlSave(ctx context.Context) (*CreditRealizationLineage, error)", + "line": 225 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CreditRealizationLineageCreate) createSpec() (*CreditRealizationLineage, *sqlgraph.CreateSpec)", + "line": 248 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CreditRealizationLineageCreate) OnConflict(opts ...sql.ConflictOption) *CreditRealizationLineageUpsertOne", + "line": 338 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CreditRealizationLineageCreate) OnConflictColumns(columns ...string) *CreditRealizationLineageUpsertOne", + "line": 351 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CreditRealizationLineageUpsertOne) UpdateNewValues() *CreditRealizationLineageUpsertOne", + "line": 382 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CreditRealizationLineageUpsertOne) Ignore() *CreditRealizationLineageUpsertOne", + "line": 422 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CreditRealizationLineageUpsertOne) DoNothing() *CreditRealizationLineageUpsertOne", + "line": 429 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CreditRealizationLineageUpsertOne) Update(set func(*CreditRealizationLineageUpsert)) *CreditRealizationLineageUpsertOne", + "line": 436 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CreditRealizationLineageUpsertOne) Exec(ctx context.Context) error", + "line": 444 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CreditRealizationLineageUpsertOne) ExecX(ctx context.Context)", + "line": 452 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CreditRealizationLineageUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 459 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CreditRealizationLineageUpsertOne) IDX(ctx context.Context) string", + "line": 473 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageCreateBulk", + "signature": "type CreditRealizationLineageCreateBulk struct", + "line": 482 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CreditRealizationLineageCreateBulk) Save(ctx context.Context) ([]*CreditRealizationLineage, error)", + "line": 490 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CreditRealizationLineageCreateBulk) SaveX(ctx context.Context) []*CreditRealizationLineage", + "line": 546 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CreditRealizationLineageCreateBulk) Exec(ctx context.Context) error", + "line": 555 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CreditRealizationLineageCreateBulk) ExecX(ctx context.Context)", + "line": 561 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CreditRealizationLineageCreateBulk) OnConflict(opts ...sql.ConflictOption) *CreditRealizationLineageUpsertBulk", + "line": 582 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CreditRealizationLineageCreateBulk) OnConflictColumns(columns ...string) *CreditRealizationLineageUpsertBulk", + "line": 595 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageUpsertBulk", + "signature": "type CreditRealizationLineageUpsertBulk struct", + "line": 604 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CreditRealizationLineageUpsertBulk) UpdateNewValues() *CreditRealizationLineageUpsertBulk", + "line": 619 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CreditRealizationLineageUpsertBulk) Ignore() *CreditRealizationLineageUpsertBulk", + "line": 661 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CreditRealizationLineageUpsertBulk) DoNothing() *CreditRealizationLineageUpsertBulk", + "line": 668 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CreditRealizationLineageUpsertBulk) Update(set func(*CreditRealizationLineageUpsert)) *CreditRealizationLineageUpsertBulk", + "line": 675 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CreditRealizationLineageUpsertBulk) Exec(ctx context.Context) error", + "line": 683 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CreditRealizationLineageUpsertBulk) ExecX(ctx context.Context)", + "line": 699 + } + ], + "line_count": 703 + }, + "openmeter/ent/db/creditrealizationlineage_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageDelete", + "signature": "type CreditRealizationLineageDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CreditRealizationLineageDelete) Where(ps ...predicate.CreditRealizationLineage) *CreditRealizationLineageDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CreditRealizationLineageDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CreditRealizationLineageDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CreditRealizationLineageDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageDeleteOne", + "signature": "type CreditRealizationLineageDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CreditRealizationLineageDeleteOne) Where(ps ...predicate.CreditRealizationLineage) *CreditRealizationLineageDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CreditRealizationLineageDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CreditRealizationLineageDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/creditrealizationlineage_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageQuery", + "signature": "type CreditRealizationLineageQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CreditRealizationLineageQuery) Where(ps ...predicate.CreditRealizationLineage) *CreditRealizationLineageQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CreditRealizationLineageQuery) Limit(limit int) *CreditRealizationLineageQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CreditRealizationLineageQuery) Offset(offset int) *CreditRealizationLineageQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CreditRealizationLineageQuery) Unique(unique bool) *CreditRealizationLineageQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CreditRealizationLineageQuery) Order(o ...creditrealizationlineage.OrderOption) *CreditRealizationLineageQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryCharge", + "signature": "func (_q *CreditRealizationLineageQuery) QueryCharge() *ChargeQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QuerySegments", + "signature": "func (_q *CreditRealizationLineageQuery) QuerySegments() *CreditRealizationLineageSegmentQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CreditRealizationLineageQuery) First(ctx context.Context) (*CreditRealizationLineage, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CreditRealizationLineageQuery) FirstX(ctx context.Context) *CreditRealizationLineage", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CreditRealizationLineageQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CreditRealizationLineageQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CreditRealizationLineageQuery) Only(ctx context.Context) (*CreditRealizationLineage, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CreditRealizationLineageQuery) OnlyX(ctx context.Context) *CreditRealizationLineage", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CreditRealizationLineageQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CreditRealizationLineageQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CreditRealizationLineageQuery) All(ctx context.Context) ([]*CreditRealizationLineage, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CreditRealizationLineageQuery) AllX(ctx context.Context) []*CreditRealizationLineage", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CreditRealizationLineageQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CreditRealizationLineageQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CreditRealizationLineageQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CreditRealizationLineageQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CreditRealizationLineageQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CreditRealizationLineageQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CreditRealizationLineageQuery) Clone() *CreditRealizationLineageQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithCharge", + "signature": "func (_q *CreditRealizationLineageQuery) WithCharge(opts ...func(*ChargeQuery)) *CreditRealizationLineageQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithSegments", + "signature": "func (_q *CreditRealizationLineageQuery) WithSegments(opts ...func(*CreditRealizationLineageSegmentQuery)) *CreditRealizationLineageQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CreditRealizationLineageQuery) GroupBy(field string, fields ...string) *CreditRealizationLineageGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CreditRealizationLineageQuery) Select(fields ...string) *CreditRealizationLineageSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CreditRealizationLineageQuery) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CreditRealizationLineageQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CreditRealizationLineageQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*CreditRealizationLineage, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadCharge", + "signature": "func (_q *CreditRealizationLineageQuery) loadCharge(ctx context.Context, query *ChargeQuery, nodes []*CreditRealizationLineage, init func(*CreditRealizationLineage), assign func(*CreditRealizationLineage, *Charge)) error", + "line": 456 + }, + { + "kind": "func", + "name": "loadSegments", + "signature": "func (_q *CreditRealizationLineageQuery) loadSegments(ctx context.Context, query *CreditRealizationLineageSegmentQuery, nodes []*CreditRealizationLineage, init func(*CreditRealizationLineage), assign func(*CreditRealizationLineage, *CreditRealizationLineageSegment)) error", + "line": 485 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CreditRealizationLineageQuery) sqlCount(ctx context.Context) (int, error)", + "line": 516 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CreditRealizationLineageQuery) querySpec() *sqlgraph.QuerySpec", + "line": 528 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CreditRealizationLineageQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 571 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CreditRealizationLineageQuery) ForUpdate(opts ...sql.LockOption) *CreditRealizationLineageQuery", + "line": 609 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CreditRealizationLineageQuery) ForShare(opts ...sql.LockOption) *CreditRealizationLineageQuery", + "line": 622 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageGroupBy", + "signature": "type CreditRealizationLineageGroupBy struct", + "line": 633 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CreditRealizationLineageGroupBy) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageGroupBy", + "line": 639 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CreditRealizationLineageGroupBy) Scan(ctx context.Context, v any) error", + "line": 645 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CreditRealizationLineageGroupBy) sqlScan(ctx context.Context, root *CreditRealizationLineageQuery, v any) error", + "line": 653 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSelect", + "signature": "type CreditRealizationLineageSelect struct", + "line": 681 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CreditRealizationLineageSelect) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageSelect", + "line": 687 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CreditRealizationLineageSelect) Scan(ctx context.Context, v any) error", + "line": 693 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CreditRealizationLineageSelect) sqlScan(ctx context.Context, root *CreditRealizationLineageQuery, v any) error", + "line": 701 + } + ], + "line_count": 720 + }, + "openmeter/ent/db/creditrealizationlineage_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageUpdate", + "signature": "type CreditRealizationLineageUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CreditRealizationLineageUpdate) Where(ps ...predicate.CreditRealizationLineage) *CreditRealizationLineageUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "AddSegmentIDs", + "signature": "func (_u *CreditRealizationLineageUpdate) AddSegmentIDs(ids ...string) *CreditRealizationLineageUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "AddSegments", + "signature": "func (_u *CreditRealizationLineageUpdate) AddSegments(v ...*CreditRealizationLineageSegment) *CreditRealizationLineageUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CreditRealizationLineageUpdate) Mutation() *CreditRealizationLineageMutation", + "line": 47 + }, + { + "kind": "func", + "name": "ClearSegments", + "signature": "func (_u *CreditRealizationLineageUpdate) ClearSegments() *CreditRealizationLineageUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "RemoveSegmentIDs", + "signature": "func (_u *CreditRealizationLineageUpdate) RemoveSegmentIDs(ids ...string) *CreditRealizationLineageUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "RemoveSegments", + "signature": "func (_u *CreditRealizationLineageUpdate) RemoveSegments(v ...*CreditRealizationLineageSegment) *CreditRealizationLineageUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CreditRealizationLineageUpdate) Save(ctx context.Context) (int, error)", + "line": 73 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CreditRealizationLineageUpdate) SaveX(ctx context.Context) int", + "line": 78 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CreditRealizationLineageUpdate) Exec(ctx context.Context) error", + "line": 87 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CreditRealizationLineageUpdate) ExecX(ctx context.Context)", + "line": 93 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CreditRealizationLineageUpdate) check() error", + "line": 100 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CreditRealizationLineageUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 107 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageUpdateOne", + "signature": "type CreditRealizationLineageUpdateOne struct", + "line": 180 + }, + { + "kind": "func", + "name": "AddSegmentIDs", + "signature": "func (_u *CreditRealizationLineageUpdateOne) AddSegmentIDs(ids ...string) *CreditRealizationLineageUpdateOne", + "line": 188 + }, + { + "kind": "func", + "name": "AddSegments", + "signature": "func (_u *CreditRealizationLineageUpdateOne) AddSegments(v ...*CreditRealizationLineageSegment) *CreditRealizationLineageUpdateOne", + "line": 194 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CreditRealizationLineageUpdateOne) Mutation() *CreditRealizationLineageMutation", + "line": 203 + }, + { + "kind": "func", + "name": "ClearSegments", + "signature": "func (_u *CreditRealizationLineageUpdateOne) ClearSegments() *CreditRealizationLineageUpdateOne", + "line": 208 + }, + { + "kind": "func", + "name": "RemoveSegmentIDs", + "signature": "func (_u *CreditRealizationLineageUpdateOne) RemoveSegmentIDs(ids ...string) *CreditRealizationLineageUpdateOne", + "line": 214 + }, + { + "kind": "func", + "name": "RemoveSegments", + "signature": "func (_u *CreditRealizationLineageUpdateOne) RemoveSegments(v ...*CreditRealizationLineageSegment) *CreditRealizationLineageUpdateOne", + "line": 220 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CreditRealizationLineageUpdateOne) Where(ps ...predicate.CreditRealizationLineage) *CreditRealizationLineageUpdateOne", + "line": 229 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CreditRealizationLineageUpdateOne) Select(field string, fields ...string) *CreditRealizationLineageUpdateOne", + "line": 236 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CreditRealizationLineageUpdateOne) Save(ctx context.Context) (*CreditRealizationLineage, error)", + "line": 242 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CreditRealizationLineageUpdateOne) SaveX(ctx context.Context) *CreditRealizationLineage", + "line": 247 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CreditRealizationLineageUpdateOne) Exec(ctx context.Context) error", + "line": 256 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CreditRealizationLineageUpdateOne) ExecX(ctx context.Context)", + "line": 262 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CreditRealizationLineageUpdateOne) check() error", + "line": 269 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CreditRealizationLineageUpdateOne) sqlSave(ctx context.Context) (_node *CreditRealizationLineage, err error)", + "line": 276 + } + ], + "line_count": 366 + }, + "openmeter/ent/db/creditrealizationlineagesegment.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageSegment", + "signature": "type CreditRealizationLineageSegment struct", + "line": 19 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentEdges", + "signature": "type CreditRealizationLineageSegmentEdges struct", + "line": 46 + }, + { + "kind": "func", + "name": "LineageOrErr", + "signature": "func (e CreditRealizationLineageSegmentEdges) LineageOrErr() (*CreditRealizationLineage, error)", + "line": 56 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *CreditRealizationLineageSegment) assignValues(columns []string, values []any) error", + "line": 85 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *CreditRealizationLineageSegment) Value(name string) (ent.Value, error)", + "line": 158 + }, + { + "kind": "func", + "name": "QueryLineage", + "signature": "func (_m *CreditRealizationLineageSegment) QueryLineage() *CreditRealizationLineageQuery", + "line": 163 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *CreditRealizationLineageSegment) Update() *CreditRealizationLineageSegmentUpdateOne", + "line": 170 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *CreditRealizationLineageSegment) Unwrap() *CreditRealizationLineageSegment", + "line": 176 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *CreditRealizationLineageSegment) String() string", + "line": 186 + } + ], + "line_count": 226 + }, + "openmeter/ent/db/creditrealizationlineagesegment/creditrealizationlineagesegment.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 62 + }, + { + "kind": "func", + "name": "StateValidator", + "signature": "func StateValidator(s creditrealization.LineageSegmentState) error", + "line": 85 + }, + { + "kind": "func", + "name": "SourceStateValidator", + "signature": "func SourceStateValidator(ss creditrealization.LineageSegmentState) error", + "line": 95 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByLineageID", + "signature": "func ByLineageID(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByState", + "signature": "func ByState(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByBackingTransactionGroupID", + "signature": "func ByBackingTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "BySourceState", + "signature": "func BySourceState(opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "BySourceBackingTransactionGroupID", + "signature": "func BySourceBackingTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 138 + }, + { + "kind": "func", + "name": "ByClosedAt", + "signature": "func ByClosedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByLineageField", + "signature": "func ByLineageField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "newLineageStep", + "signature": "func newLineageStep() *sqlgraph.Step", + "line": 158 + } + ], + "line_count": 164 + }, + "openmeter/ent/db/creditrealizationlineagesegment/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.CreditRealizationLineageSegment", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.CreditRealizationLineageSegment", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.CreditRealizationLineageSegment", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.CreditRealizationLineageSegment", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.CreditRealizationLineageSegment", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.CreditRealizationLineageSegment", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.CreditRealizationLineageSegment", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.CreditRealizationLineageSegment", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.CreditRealizationLineageSegment", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.CreditRealizationLineageSegment", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.CreditRealizationLineageSegment", + "line": 66 + }, + { + "kind": "func", + "name": "LineageID", + "signature": "func LineageID(v string) predicate.CreditRealizationLineageSegment", + "line": 71 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 76 + }, + { + "kind": "func", + "name": "BackingTransactionGroupID", + "signature": "func BackingTransactionGroupID(v string) predicate.CreditRealizationLineageSegment", + "line": 81 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupID", + "signature": "func SourceBackingTransactionGroupID(v string) predicate.CreditRealizationLineageSegment", + "line": 86 + }, + { + "kind": "func", + "name": "ClosedAt", + "signature": "func ClosedAt(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 91 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 96 + }, + { + "kind": "func", + "name": "LineageIDEQ", + "signature": "func LineageIDEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 101 + }, + { + "kind": "func", + "name": "LineageIDNEQ", + "signature": "func LineageIDNEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 106 + }, + { + "kind": "func", + "name": "LineageIDIn", + "signature": "func LineageIDIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 111 + }, + { + "kind": "func", + "name": "LineageIDNotIn", + "signature": "func LineageIDNotIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 116 + }, + { + "kind": "func", + "name": "LineageIDGT", + "signature": "func LineageIDGT(v string) predicate.CreditRealizationLineageSegment", + "line": 121 + }, + { + "kind": "func", + "name": "LineageIDGTE", + "signature": "func LineageIDGTE(v string) predicate.CreditRealizationLineageSegment", + "line": 126 + }, + { + "kind": "func", + "name": "LineageIDLT", + "signature": "func LineageIDLT(v string) predicate.CreditRealizationLineageSegment", + "line": 131 + }, + { + "kind": "func", + "name": "LineageIDLTE", + "signature": "func LineageIDLTE(v string) predicate.CreditRealizationLineageSegment", + "line": 136 + }, + { + "kind": "func", + "name": "LineageIDContains", + "signature": "func LineageIDContains(v string) predicate.CreditRealizationLineageSegment", + "line": 141 + }, + { + "kind": "func", + "name": "LineageIDHasPrefix", + "signature": "func LineageIDHasPrefix(v string) predicate.CreditRealizationLineageSegment", + "line": 146 + }, + { + "kind": "func", + "name": "LineageIDHasSuffix", + "signature": "func LineageIDHasSuffix(v string) predicate.CreditRealizationLineageSegment", + "line": 151 + }, + { + "kind": "func", + "name": "LineageIDEqualFold", + "signature": "func LineageIDEqualFold(v string) predicate.CreditRealizationLineageSegment", + "line": 156 + }, + { + "kind": "func", + "name": "LineageIDContainsFold", + "signature": "func LineageIDContainsFold(v string) predicate.CreditRealizationLineageSegment", + "line": 161 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 166 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 171 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 176 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 181 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 186 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 191 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 196 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.CreditRealizationLineageSegment", + "line": 201 + }, + { + "kind": "func", + "name": "StateEQ", + "signature": "func StateEQ(v creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 206 + }, + { + "kind": "func", + "name": "StateNEQ", + "signature": "func StateNEQ(v creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 212 + }, + { + "kind": "func", + "name": "StateIn", + "signature": "func StateIn(vs ...creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 218 + }, + { + "kind": "func", + "name": "StateNotIn", + "signature": "func StateNotIn(vs ...creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 227 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDEQ", + "signature": "func BackingTransactionGroupIDEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 236 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDNEQ", + "signature": "func BackingTransactionGroupIDNEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 241 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDIn", + "signature": "func BackingTransactionGroupIDIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 246 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDNotIn", + "signature": "func BackingTransactionGroupIDNotIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 251 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDGT", + "signature": "func BackingTransactionGroupIDGT(v string) predicate.CreditRealizationLineageSegment", + "line": 256 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDGTE", + "signature": "func BackingTransactionGroupIDGTE(v string) predicate.CreditRealizationLineageSegment", + "line": 261 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDLT", + "signature": "func BackingTransactionGroupIDLT(v string) predicate.CreditRealizationLineageSegment", + "line": 266 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDLTE", + "signature": "func BackingTransactionGroupIDLTE(v string) predicate.CreditRealizationLineageSegment", + "line": 271 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDContains", + "signature": "func BackingTransactionGroupIDContains(v string) predicate.CreditRealizationLineageSegment", + "line": 276 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDHasPrefix", + "signature": "func BackingTransactionGroupIDHasPrefix(v string) predicate.CreditRealizationLineageSegment", + "line": 281 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDHasSuffix", + "signature": "func BackingTransactionGroupIDHasSuffix(v string) predicate.CreditRealizationLineageSegment", + "line": 286 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDIsNil", + "signature": "func BackingTransactionGroupIDIsNil() predicate.CreditRealizationLineageSegment", + "line": 291 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDNotNil", + "signature": "func BackingTransactionGroupIDNotNil() predicate.CreditRealizationLineageSegment", + "line": 296 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDEqualFold", + "signature": "func BackingTransactionGroupIDEqualFold(v string) predicate.CreditRealizationLineageSegment", + "line": 301 + }, + { + "kind": "func", + "name": "BackingTransactionGroupIDContainsFold", + "signature": "func BackingTransactionGroupIDContainsFold(v string) predicate.CreditRealizationLineageSegment", + "line": 306 + }, + { + "kind": "func", + "name": "SourceStateEQ", + "signature": "func SourceStateEQ(v creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 311 + }, + { + "kind": "func", + "name": "SourceStateNEQ", + "signature": "func SourceStateNEQ(v creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 317 + }, + { + "kind": "func", + "name": "SourceStateIn", + "signature": "func SourceStateIn(vs ...creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 323 + }, + { + "kind": "func", + "name": "SourceStateNotIn", + "signature": "func SourceStateNotIn(vs ...creditrealization.LineageSegmentState) predicate.CreditRealizationLineageSegment", + "line": 332 + }, + { + "kind": "func", + "name": "SourceStateIsNil", + "signature": "func SourceStateIsNil() predicate.CreditRealizationLineageSegment", + "line": 341 + }, + { + "kind": "func", + "name": "SourceStateNotNil", + "signature": "func SourceStateNotNil() predicate.CreditRealizationLineageSegment", + "line": 346 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDEQ", + "signature": "func SourceBackingTransactionGroupIDEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 351 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDNEQ", + "signature": "func SourceBackingTransactionGroupIDNEQ(v string) predicate.CreditRealizationLineageSegment", + "line": 356 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDIn", + "signature": "func SourceBackingTransactionGroupIDIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 361 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDNotIn", + "signature": "func SourceBackingTransactionGroupIDNotIn(vs ...string) predicate.CreditRealizationLineageSegment", + "line": 366 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDGT", + "signature": "func SourceBackingTransactionGroupIDGT(v string) predicate.CreditRealizationLineageSegment", + "line": 371 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDGTE", + "signature": "func SourceBackingTransactionGroupIDGTE(v string) predicate.CreditRealizationLineageSegment", + "line": 376 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDLT", + "signature": "func SourceBackingTransactionGroupIDLT(v string) predicate.CreditRealizationLineageSegment", + "line": 381 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDLTE", + "signature": "func SourceBackingTransactionGroupIDLTE(v string) predicate.CreditRealizationLineageSegment", + "line": 386 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDContains", + "signature": "func SourceBackingTransactionGroupIDContains(v string) predicate.CreditRealizationLineageSegment", + "line": 391 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDHasPrefix", + "signature": "func SourceBackingTransactionGroupIDHasPrefix(v string) predicate.CreditRealizationLineageSegment", + "line": 396 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDHasSuffix", + "signature": "func SourceBackingTransactionGroupIDHasSuffix(v string) predicate.CreditRealizationLineageSegment", + "line": 401 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDIsNil", + "signature": "func SourceBackingTransactionGroupIDIsNil() predicate.CreditRealizationLineageSegment", + "line": 406 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDNotNil", + "signature": "func SourceBackingTransactionGroupIDNotNil() predicate.CreditRealizationLineageSegment", + "line": 411 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDEqualFold", + "signature": "func SourceBackingTransactionGroupIDEqualFold(v string) predicate.CreditRealizationLineageSegment", + "line": 416 + }, + { + "kind": "func", + "name": "SourceBackingTransactionGroupIDContainsFold", + "signature": "func SourceBackingTransactionGroupIDContainsFold(v string) predicate.CreditRealizationLineageSegment", + "line": 421 + }, + { + "kind": "func", + "name": "ClosedAtEQ", + "signature": "func ClosedAtEQ(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 426 + }, + { + "kind": "func", + "name": "ClosedAtNEQ", + "signature": "func ClosedAtNEQ(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 431 + }, + { + "kind": "func", + "name": "ClosedAtIn", + "signature": "func ClosedAtIn(vs ...time.Time) predicate.CreditRealizationLineageSegment", + "line": 436 + }, + { + "kind": "func", + "name": "ClosedAtNotIn", + "signature": "func ClosedAtNotIn(vs ...time.Time) predicate.CreditRealizationLineageSegment", + "line": 441 + }, + { + "kind": "func", + "name": "ClosedAtGT", + "signature": "func ClosedAtGT(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 446 + }, + { + "kind": "func", + "name": "ClosedAtGTE", + "signature": "func ClosedAtGTE(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 451 + }, + { + "kind": "func", + "name": "ClosedAtLT", + "signature": "func ClosedAtLT(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 456 + }, + { + "kind": "func", + "name": "ClosedAtLTE", + "signature": "func ClosedAtLTE(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 461 + }, + { + "kind": "func", + "name": "ClosedAtIsNil", + "signature": "func ClosedAtIsNil() predicate.CreditRealizationLineageSegment", + "line": 466 + }, + { + "kind": "func", + "name": "ClosedAtNotNil", + "signature": "func ClosedAtNotNil() predicate.CreditRealizationLineageSegment", + "line": 471 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 476 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 481 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.CreditRealizationLineageSegment", + "line": 486 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.CreditRealizationLineageSegment", + "line": 491 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 496 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 501 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 506 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.CreditRealizationLineageSegment", + "line": 511 + }, + { + "kind": "func", + "name": "HasLineage", + "signature": "func HasLineage() predicate.CreditRealizationLineageSegment", + "line": 516 + }, + { + "kind": "func", + "name": "HasLineageWith", + "signature": "func HasLineageWith(preds ...predicate.CreditRealizationLineage) predicate.CreditRealizationLineageSegment", + "line": 527 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.CreditRealizationLineageSegment) predicate.CreditRealizationLineageSegment", + "line": 539 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.CreditRealizationLineageSegment) predicate.CreditRealizationLineageSegment", + "line": 544 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.CreditRealizationLineageSegment) predicate.CreditRealizationLineageSegment", + "line": 549 + } + ], + "line_count": 551 + }, + "openmeter/ent/db/creditrealizationlineagesegment_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentCreate", + "signature": "type CreditRealizationLineageSegmentCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetLineageID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetLineageID(v string) *CreditRealizationLineageSegmentCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableBackingTransactionGroupID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableSourceState", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableSourceState(v *creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableSourceBackingTransactionGroupID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableSourceBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableClosedAt", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableClosedAt(v *time.Time) *CreditRealizationLineageSegmentCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetCreatedAt(v time.Time) *CreditRealizationLineageSegmentCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableCreatedAt(v *time.Time) *CreditRealizationLineageSegmentCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetID(v string) *CreditRealizationLineageSegmentCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetNillableID(v *string) *CreditRealizationLineageSegmentCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetLineage", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SetLineage(v *CreditRealizationLineage) *CreditRealizationLineageSegmentCreate", + "line": 132 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) Mutation() *CreditRealizationLineageSegmentMutation", + "line": 137 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) Save(ctx context.Context) (*CreditRealizationLineageSegment, error)", + "line": 142 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) SaveX(ctx context.Context) *CreditRealizationLineageSegment", + "line": 148 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) Exec(ctx context.Context) error", + "line": 157 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) ExecX(ctx context.Context)", + "line": 163 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) defaults()", + "line": 170 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) check() error", + "line": 182 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) sqlSave(ctx context.Context) (*CreditRealizationLineageSegment, error)", + "line": 226 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) createSpec() (*CreditRealizationLineageSegment, *sqlgraph.CreateSpec)", + "line": 249 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) OnConflict(opts ...sql.ConflictOption) *CreditRealizationLineageSegmentUpsertOne", + "line": 323 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CreditRealizationLineageSegmentCreate) OnConflictColumns(columns ...string) *CreditRealizationLineageSegmentUpsertOne", + "line": 336 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpsert", + "line": 357 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) UpdateAmount() *CreditRealizationLineageSegmentUpsert", + "line": 363 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsert", + "line": 369 + }, + { + "kind": "func", + "name": "UpdateBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) UpdateBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsert", + "line": 375 + }, + { + "kind": "func", + "name": "ClearBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) ClearBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsert", + "line": 381 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpsert", + "line": 387 + }, + { + "kind": "func", + "name": "UpdateSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) UpdateSourceState() *CreditRealizationLineageSegmentUpsert", + "line": 393 + }, + { + "kind": "func", + "name": "ClearSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) ClearSourceState() *CreditRealizationLineageSegmentUpsert", + "line": 399 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsert", + "line": 405 + }, + { + "kind": "func", + "name": "UpdateSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) UpdateSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsert", + "line": 411 + }, + { + "kind": "func", + "name": "ClearSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) ClearSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsert", + "line": 417 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentUpsert", + "line": 423 + }, + { + "kind": "func", + "name": "UpdateClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) UpdateClosedAt() *CreditRealizationLineageSegmentUpsert", + "line": 429 + }, + { + "kind": "func", + "name": "ClearClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsert) ClearClosedAt() *CreditRealizationLineageSegmentUpsert", + "line": 435 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateNewValues() *CreditRealizationLineageSegmentUpsertOne", + "line": 451 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) Ignore() *CreditRealizationLineageSegmentUpsertOne", + "line": 476 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) DoNothing() *CreditRealizationLineageSegmentUpsertOne", + "line": 483 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) Update(set func(*CreditRealizationLineageSegmentUpsert)) *CreditRealizationLineageSegmentUpsertOne", + "line": 490 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpsertOne", + "line": 498 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateAmount() *CreditRealizationLineageSegmentUpsertOne", + "line": 505 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsertOne", + "line": 512 + }, + { + "kind": "func", + "name": "UpdateBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertOne", + "line": 519 + }, + { + "kind": "func", + "name": "ClearBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ClearBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertOne", + "line": 526 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpsertOne", + "line": 533 + }, + { + "kind": "func", + "name": "UpdateSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateSourceState() *CreditRealizationLineageSegmentUpsertOne", + "line": 540 + }, + { + "kind": "func", + "name": "ClearSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ClearSourceState() *CreditRealizationLineageSegmentUpsertOne", + "line": 547 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsertOne", + "line": 554 + }, + { + "kind": "func", + "name": "UpdateSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertOne", + "line": 561 + }, + { + "kind": "func", + "name": "ClearSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ClearSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertOne", + "line": 568 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentUpsertOne", + "line": 575 + }, + { + "kind": "func", + "name": "UpdateClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) UpdateClosedAt() *CreditRealizationLineageSegmentUpsertOne", + "line": 582 + }, + { + "kind": "func", + "name": "ClearClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ClearClosedAt() *CreditRealizationLineageSegmentUpsertOne", + "line": 589 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) Exec(ctx context.Context) error", + "line": 596 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ExecX(ctx context.Context)", + "line": 604 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 611 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CreditRealizationLineageSegmentUpsertOne) IDX(ctx context.Context) string", + "line": 625 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentCreateBulk", + "signature": "type CreditRealizationLineageSegmentCreateBulk struct", + "line": 634 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) Save(ctx context.Context) ([]*CreditRealizationLineageSegment, error)", + "line": 642 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) SaveX(ctx context.Context) []*CreditRealizationLineageSegment", + "line": 698 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) Exec(ctx context.Context) error", + "line": 707 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) ExecX(ctx context.Context)", + "line": 713 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) OnConflict(opts ...sql.ConflictOption) *CreditRealizationLineageSegmentUpsertBulk", + "line": 734 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CreditRealizationLineageSegmentCreateBulk) OnConflictColumns(columns ...string) *CreditRealizationLineageSegmentUpsertBulk", + "line": 747 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentUpsertBulk", + "signature": "type CreditRealizationLineageSegmentUpsertBulk struct", + "line": 756 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateNewValues() *CreditRealizationLineageSegmentUpsertBulk", + "line": 771 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) Ignore() *CreditRealizationLineageSegmentUpsertBulk", + "line": 798 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) DoNothing() *CreditRealizationLineageSegmentUpsertBulk", + "line": 805 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) Update(set func(*CreditRealizationLineageSegmentUpsert)) *CreditRealizationLineageSegmentUpsertBulk", + "line": 812 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpsertBulk", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateAmount() *CreditRealizationLineageSegmentUpsertBulk", + "line": 827 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsertBulk", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertBulk", + "line": 841 + }, + { + "kind": "func", + "name": "ClearBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) ClearBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertBulk", + "line": 848 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpsertBulk", + "line": 855 + }, + { + "kind": "func", + "name": "UpdateSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateSourceState() *CreditRealizationLineageSegmentUpsertBulk", + "line": 862 + }, + { + "kind": "func", + "name": "ClearSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) ClearSourceState() *CreditRealizationLineageSegmentUpsertBulk", + "line": 869 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpsertBulk", + "line": 876 + }, + { + "kind": "func", + "name": "UpdateSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertBulk", + "line": 883 + }, + { + "kind": "func", + "name": "ClearSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) ClearSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpsertBulk", + "line": 890 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentUpsertBulk", + "line": 897 + }, + { + "kind": "func", + "name": "UpdateClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) UpdateClosedAt() *CreditRealizationLineageSegmentUpsertBulk", + "line": 904 + }, + { + "kind": "func", + "name": "ClearClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) ClearClosedAt() *CreditRealizationLineageSegmentUpsertBulk", + "line": 911 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) Exec(ctx context.Context) error", + "line": 918 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CreditRealizationLineageSegmentUpsertBulk) ExecX(ctx context.Context)", + "line": 934 + } + ], + "line_count": 938 + }, + "openmeter/ent/db/creditrealizationlineagesegment_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentDelete", + "signature": "type CreditRealizationLineageSegmentDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CreditRealizationLineageSegmentDelete) Where(ps ...predicate.CreditRealizationLineageSegment) *CreditRealizationLineageSegmentDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CreditRealizationLineageSegmentDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CreditRealizationLineageSegmentDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CreditRealizationLineageSegmentDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentDeleteOne", + "signature": "type CreditRealizationLineageSegmentDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CreditRealizationLineageSegmentDeleteOne) Where(ps ...predicate.CreditRealizationLineageSegment) *CreditRealizationLineageSegmentDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CreditRealizationLineageSegmentDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CreditRealizationLineageSegmentDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/creditrealizationlineagesegment_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentQuery", + "signature": "type CreditRealizationLineageSegmentQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Where(ps ...predicate.CreditRealizationLineageSegment) *CreditRealizationLineageSegmentQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Limit(limit int) *CreditRealizationLineageSegmentQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Offset(offset int) *CreditRealizationLineageSegmentQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Unique(unique bool) *CreditRealizationLineageSegmentQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Order(o ...creditrealizationlineagesegment.OrderOption) *CreditRealizationLineageSegmentQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryLineage", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) QueryLineage() *CreditRealizationLineageQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) First(ctx context.Context) (*CreditRealizationLineageSegment, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) FirstX(ctx context.Context) *CreditRealizationLineageSegment", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Only(ctx context.Context) (*CreditRealizationLineageSegment, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) OnlyX(ctx context.Context) *CreditRealizationLineageSegment", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) All(ctx context.Context) ([]*CreditRealizationLineageSegment, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) AllX(ctx context.Context) []*CreditRealizationLineageSegment", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Clone() *CreditRealizationLineageSegmentQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithLineage", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) WithLineage(opts ...func(*CreditRealizationLineageQuery)) *CreditRealizationLineageSegmentQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) GroupBy(field string, fields ...string) *CreditRealizationLineageSegmentGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Select(fields ...string) *CreditRealizationLineageSegmentSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageSegmentSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*CreditRealizationLineageSegment, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadLineage", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) loadLineage(ctx context.Context, query *CreditRealizationLineageQuery, nodes []*CreditRealizationLineageSegment, init func(*CreditRealizationLineageSegment), assign func(*CreditRealizationLineageSegment, *CreditRealizationLineage)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) ForUpdate(opts ...sql.LockOption) *CreditRealizationLineageSegmentQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CreditRealizationLineageSegmentQuery) ForShare(opts ...sql.LockOption) *CreditRealizationLineageSegmentQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentGroupBy", + "signature": "type CreditRealizationLineageSegmentGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CreditRealizationLineageSegmentGroupBy) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageSegmentGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CreditRealizationLineageSegmentGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CreditRealizationLineageSegmentGroupBy) sqlScan(ctx context.Context, root *CreditRealizationLineageSegmentQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentSelect", + "signature": "type CreditRealizationLineageSegmentSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CreditRealizationLineageSegmentSelect) Aggregate(fns ...AggregateFunc) *CreditRealizationLineageSegmentSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CreditRealizationLineageSegmentSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CreditRealizationLineageSegmentSelect) sqlScan(ctx context.Context, root *CreditRealizationLineageSegmentQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/creditrealizationlineagesegment_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentUpdate", + "signature": "type CreditRealizationLineageSegmentUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) Where(ps ...predicate.CreditRealizationLineageSegment) *CreditRealizationLineageSegmentUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetNillableBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "ClearBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) ClearBackingTransactionGroupID() *CreditRealizationLineageSegmentUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetNillableSourceState(v *creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "ClearSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) ClearSourceState() *CreditRealizationLineageSegmentUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetNillableSourceBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) ClearSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SetNillableClosedAt(v *time.Time) *CreditRealizationLineageSegmentUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "ClearClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) ClearClosedAt() *CreditRealizationLineageSegmentUpdate", + "line": 122 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) Mutation() *CreditRealizationLineageSegmentMutation", + "line": 128 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) Save(ctx context.Context) (int, error)", + "line": 133 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) SaveX(ctx context.Context) int", + "line": 138 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) Exec(ctx context.Context) error", + "line": 147 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) ExecX(ctx context.Context)", + "line": 153 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) check() error", + "line": 160 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CreditRealizationLineageSegmentUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 182 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegmentUpdateOne", + "signature": "type CreditRealizationLineageSegmentUpdateOne struct", + "line": 234 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetAmount(v alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpdateOne", + "line": 242 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *CreditRealizationLineageSegmentUpdateOne", + "line": 248 + }, + { + "kind": "func", + "name": "SetBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpdateOne", + "line": 256 + }, + { + "kind": "func", + "name": "SetNillableBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetNillableBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentUpdateOne", + "line": 262 + }, + { + "kind": "func", + "name": "ClearBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) ClearBackingTransactionGroupID() *CreditRealizationLineageSegmentUpdateOne", + "line": 270 + }, + { + "kind": "func", + "name": "SetSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetSourceState(v creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdateOne", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetNillableSourceState(v *creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdateOne", + "line": 282 + }, + { + "kind": "func", + "name": "ClearSourceState", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) ClearSourceState() *CreditRealizationLineageSegmentUpdateOne", + "line": 290 + }, + { + "kind": "func", + "name": "SetSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetSourceBackingTransactionGroupID(v string) *CreditRealizationLineageSegmentUpdateOne", + "line": 296 + }, + { + "kind": "func", + "name": "SetNillableSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetNillableSourceBackingTransactionGroupID(v *string) *CreditRealizationLineageSegmentUpdateOne", + "line": 302 + }, + { + "kind": "func", + "name": "ClearSourceBackingTransactionGroupID", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) ClearSourceBackingTransactionGroupID() *CreditRealizationLineageSegmentUpdateOne", + "line": 310 + }, + { + "kind": "func", + "name": "SetClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetClosedAt(v time.Time) *CreditRealizationLineageSegmentUpdateOne", + "line": 316 + }, + { + "kind": "func", + "name": "SetNillableClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SetNillableClosedAt(v *time.Time) *CreditRealizationLineageSegmentUpdateOne", + "line": 322 + }, + { + "kind": "func", + "name": "ClearClosedAt", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) ClearClosedAt() *CreditRealizationLineageSegmentUpdateOne", + "line": 330 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) Mutation() *CreditRealizationLineageSegmentMutation", + "line": 336 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) Where(ps ...predicate.CreditRealizationLineageSegment) *CreditRealizationLineageSegmentUpdateOne", + "line": 341 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) Select(field string, fields ...string) *CreditRealizationLineageSegmentUpdateOne", + "line": 348 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) Save(ctx context.Context) (*CreditRealizationLineageSegment, error)", + "line": 354 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) SaveX(ctx context.Context) *CreditRealizationLineageSegment", + "line": 359 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) Exec(ctx context.Context) error", + "line": 368 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) ExecX(ctx context.Context)", + "line": 374 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) check() error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CreditRealizationLineageSegmentUpdateOne) sqlSave(ctx context.Context) (_node *CreditRealizationLineageSegment, err error)", + "line": 403 + } + ], + "line_count": 472 + }, + "openmeter/ent/db/currencycostbasis.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyCostBasis", + "signature": "type CurrencyCostBasis struct", + "line": 19 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisEdges", + "signature": "type CurrencyCostBasisEdges struct", + "line": 46 + }, + { + "kind": "func", + "name": "CurrencyOrErr", + "signature": "func (e CurrencyCostBasisEdges) CurrencyOrErr() (*CustomCurrency, error)", + "line": 56 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *CurrencyCostBasis) assignValues(columns []string, values []any) error", + "line": 85 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *CurrencyCostBasis) Value(name string) (ent.Value, error)", + "line": 155 + }, + { + "kind": "func", + "name": "QueryCurrency", + "signature": "func (_m *CurrencyCostBasis) QueryCurrency() *CustomCurrencyQuery", + "line": 160 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *CurrencyCostBasis) Update() *CurrencyCostBasisUpdateOne", + "line": 167 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *CurrencyCostBasis) Unwrap() *CurrencyCostBasis", + "line": 173 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *CurrencyCostBasis) String() string", + "line": 183 + } + ], + "line_count": 217 + }, + "openmeter/ent/db/currencycostbasis/currencycostbasis.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 60 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 88 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 93 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 98 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 103 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByCustomCurrencyID", + "signature": "func ByCustomCurrencyID(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByFiatCode", + "signature": "func ByFiatCode(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByRate", + "signature": "func ByRate(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByEffectiveFrom", + "signature": "func ByEffectiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "ByCurrencyField", + "signature": "func ByCurrencyField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "newCurrencyStep", + "signature": "func newCurrencyStep() *sqlgraph.Step", + "line": 138 + } + ], + "line_count": 144 + }, + "openmeter/ent/db/currencycostbasis/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.CurrencyCostBasis", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.CurrencyCostBasis", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.CurrencyCostBasis", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.CurrencyCostBasis", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.CurrencyCostBasis", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.CurrencyCostBasis", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.CurrencyCostBasis", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.CurrencyCostBasis", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.CurrencyCostBasis", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.CurrencyCostBasis", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.CurrencyCostBasis", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.CurrencyCostBasis", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.CurrencyCostBasis", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.CurrencyCostBasis", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.CurrencyCostBasis", + "line": 86 + }, + { + "kind": "func", + "name": "CustomCurrencyID", + "signature": "func CustomCurrencyID(v string) predicate.CurrencyCostBasis", + "line": 91 + }, + { + "kind": "func", + "name": "FiatCode", + "signature": "func FiatCode(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 96 + }, + { + "kind": "func", + "name": "Rate", + "signature": "func Rate(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 102 + }, + { + "kind": "func", + "name": "EffectiveFrom", + "signature": "func EffectiveFrom(v time.Time) predicate.CurrencyCostBasis", + "line": 107 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.CurrencyCostBasis", + "line": 112 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.CurrencyCostBasis", + "line": 117 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.CurrencyCostBasis", + "line": 122 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.CurrencyCostBasis", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.CurrencyCostBasis", + "line": 132 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.CurrencyCostBasis", + "line": 137 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.CurrencyCostBasis", + "line": 142 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.CurrencyCostBasis", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.CurrencyCostBasis", + "line": 152 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.CurrencyCostBasis", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.CurrencyCostBasis", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.CurrencyCostBasis", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.CurrencyCostBasis", + "line": 172 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 177 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 182 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 187 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 192 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.CurrencyCostBasis", + "line": 197 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.CurrencyCostBasis", + "line": 202 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.CurrencyCostBasis", + "line": 207 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.CurrencyCostBasis", + "line": 212 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 217 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 222 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 227 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 232 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.CurrencyCostBasis", + "line": 237 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.CurrencyCostBasis", + "line": 242 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.CurrencyCostBasis", + "line": 247 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.CurrencyCostBasis", + "line": 252 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 257 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 262 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 267 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 272 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.CurrencyCostBasis", + "line": 277 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.CurrencyCostBasis", + "line": 282 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.CurrencyCostBasis", + "line": 287 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.CurrencyCostBasis", + "line": 292 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.CurrencyCostBasis", + "line": 297 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.CurrencyCostBasis", + "line": 302 + }, + { + "kind": "func", + "name": "CustomCurrencyIDEQ", + "signature": "func CustomCurrencyIDEQ(v string) predicate.CurrencyCostBasis", + "line": 307 + }, + { + "kind": "func", + "name": "CustomCurrencyIDNEQ", + "signature": "func CustomCurrencyIDNEQ(v string) predicate.CurrencyCostBasis", + "line": 312 + }, + { + "kind": "func", + "name": "CustomCurrencyIDIn", + "signature": "func CustomCurrencyIDIn(vs ...string) predicate.CurrencyCostBasis", + "line": 317 + }, + { + "kind": "func", + "name": "CustomCurrencyIDNotIn", + "signature": "func CustomCurrencyIDNotIn(vs ...string) predicate.CurrencyCostBasis", + "line": 322 + }, + { + "kind": "func", + "name": "CustomCurrencyIDGT", + "signature": "func CustomCurrencyIDGT(v string) predicate.CurrencyCostBasis", + "line": 327 + }, + { + "kind": "func", + "name": "CustomCurrencyIDGTE", + "signature": "func CustomCurrencyIDGTE(v string) predicate.CurrencyCostBasis", + "line": 332 + }, + { + "kind": "func", + "name": "CustomCurrencyIDLT", + "signature": "func CustomCurrencyIDLT(v string) predicate.CurrencyCostBasis", + "line": 337 + }, + { + "kind": "func", + "name": "CustomCurrencyIDLTE", + "signature": "func CustomCurrencyIDLTE(v string) predicate.CurrencyCostBasis", + "line": 342 + }, + { + "kind": "func", + "name": "CustomCurrencyIDContains", + "signature": "func CustomCurrencyIDContains(v string) predicate.CurrencyCostBasis", + "line": 347 + }, + { + "kind": "func", + "name": "CustomCurrencyIDHasPrefix", + "signature": "func CustomCurrencyIDHasPrefix(v string) predicate.CurrencyCostBasis", + "line": 352 + }, + { + "kind": "func", + "name": "CustomCurrencyIDHasSuffix", + "signature": "func CustomCurrencyIDHasSuffix(v string) predicate.CurrencyCostBasis", + "line": 357 + }, + { + "kind": "func", + "name": "CustomCurrencyIDEqualFold", + "signature": "func CustomCurrencyIDEqualFold(v string) predicate.CurrencyCostBasis", + "line": 362 + }, + { + "kind": "func", + "name": "CustomCurrencyIDContainsFold", + "signature": "func CustomCurrencyIDContainsFold(v string) predicate.CurrencyCostBasis", + "line": 367 + }, + { + "kind": "func", + "name": "FiatCodeEQ", + "signature": "func FiatCodeEQ(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 372 + }, + { + "kind": "func", + "name": "FiatCodeNEQ", + "signature": "func FiatCodeNEQ(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 378 + }, + { + "kind": "func", + "name": "FiatCodeIn", + "signature": "func FiatCodeIn(vs ...currencyx.Code) predicate.CurrencyCostBasis", + "line": 384 + }, + { + "kind": "func", + "name": "FiatCodeNotIn", + "signature": "func FiatCodeNotIn(vs ...currencyx.Code) predicate.CurrencyCostBasis", + "line": 393 + }, + { + "kind": "func", + "name": "FiatCodeGT", + "signature": "func FiatCodeGT(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 402 + }, + { + "kind": "func", + "name": "FiatCodeGTE", + "signature": "func FiatCodeGTE(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 408 + }, + { + "kind": "func", + "name": "FiatCodeLT", + "signature": "func FiatCodeLT(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 414 + }, + { + "kind": "func", + "name": "FiatCodeLTE", + "signature": "func FiatCodeLTE(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 420 + }, + { + "kind": "func", + "name": "FiatCodeContains", + "signature": "func FiatCodeContains(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 426 + }, + { + "kind": "func", + "name": "FiatCodeHasPrefix", + "signature": "func FiatCodeHasPrefix(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 432 + }, + { + "kind": "func", + "name": "FiatCodeHasSuffix", + "signature": "func FiatCodeHasSuffix(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 438 + }, + { + "kind": "func", + "name": "FiatCodeEqualFold", + "signature": "func FiatCodeEqualFold(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 444 + }, + { + "kind": "func", + "name": "FiatCodeContainsFold", + "signature": "func FiatCodeContainsFold(v currencyx.Code) predicate.CurrencyCostBasis", + "line": 450 + }, + { + "kind": "func", + "name": "RateEQ", + "signature": "func RateEQ(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 456 + }, + { + "kind": "func", + "name": "RateNEQ", + "signature": "func RateNEQ(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 461 + }, + { + "kind": "func", + "name": "RateIn", + "signature": "func RateIn(vs ...alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 466 + }, + { + "kind": "func", + "name": "RateNotIn", + "signature": "func RateNotIn(vs ...alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 471 + }, + { + "kind": "func", + "name": "RateGT", + "signature": "func RateGT(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 476 + }, + { + "kind": "func", + "name": "RateGTE", + "signature": "func RateGTE(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 481 + }, + { + "kind": "func", + "name": "RateLT", + "signature": "func RateLT(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 486 + }, + { + "kind": "func", + "name": "RateLTE", + "signature": "func RateLTE(v alpacadecimal.Decimal) predicate.CurrencyCostBasis", + "line": 491 + }, + { + "kind": "func", + "name": "EffectiveFromEQ", + "signature": "func EffectiveFromEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 496 + }, + { + "kind": "func", + "name": "EffectiveFromNEQ", + "signature": "func EffectiveFromNEQ(v time.Time) predicate.CurrencyCostBasis", + "line": 501 + }, + { + "kind": "func", + "name": "EffectiveFromIn", + "signature": "func EffectiveFromIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 506 + }, + { + "kind": "func", + "name": "EffectiveFromNotIn", + "signature": "func EffectiveFromNotIn(vs ...time.Time) predicate.CurrencyCostBasis", + "line": 511 + }, + { + "kind": "func", + "name": "EffectiveFromGT", + "signature": "func EffectiveFromGT(v time.Time) predicate.CurrencyCostBasis", + "line": 516 + }, + { + "kind": "func", + "name": "EffectiveFromGTE", + "signature": "func EffectiveFromGTE(v time.Time) predicate.CurrencyCostBasis", + "line": 521 + }, + { + "kind": "func", + "name": "EffectiveFromLT", + "signature": "func EffectiveFromLT(v time.Time) predicate.CurrencyCostBasis", + "line": 526 + }, + { + "kind": "func", + "name": "EffectiveFromLTE", + "signature": "func EffectiveFromLTE(v time.Time) predicate.CurrencyCostBasis", + "line": 531 + }, + { + "kind": "func", + "name": "HasCurrency", + "signature": "func HasCurrency() predicate.CurrencyCostBasis", + "line": 536 + }, + { + "kind": "func", + "name": "HasCurrencyWith", + "signature": "func HasCurrencyWith(preds ...predicate.CustomCurrency) predicate.CurrencyCostBasis", + "line": 547 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.CurrencyCostBasis) predicate.CurrencyCostBasis", + "line": 559 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.CurrencyCostBasis) predicate.CurrencyCostBasis", + "line": 564 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.CurrencyCostBasis) predicate.CurrencyCostBasis", + "line": 569 + } + ], + "line_count": 571 + }, + "openmeter/ent/db/currencycostbasis_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyCostBasisCreate", + "signature": "type CurrencyCostBasisCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *CurrencyCostBasisCreate) SetNamespace(v string) *CurrencyCostBasisCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetCreatedAt(v time.Time) *CurrencyCostBasisCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetNillableCreatedAt(v *time.Time) *CurrencyCostBasisCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetUpdatedAt(v time.Time) *CurrencyCostBasisCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetNillableUpdatedAt(v *time.Time) *CurrencyCostBasisCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetDeletedAt(v time.Time) *CurrencyCostBasisCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *CurrencyCostBasisCreate) SetNillableDeletedAt(v *time.Time) *CurrencyCostBasisCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetCustomCurrencyID", + "signature": "func (_c *CurrencyCostBasisCreate) SetCustomCurrencyID(v string) *CurrencyCostBasisCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetFiatCode", + "signature": "func (_c *CurrencyCostBasisCreate) SetFiatCode(v currencyx.Code) *CurrencyCostBasisCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetRate", + "signature": "func (_c *CurrencyCostBasisCreate) SetRate(v alpacadecimal.Decimal) *CurrencyCostBasisCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_c *CurrencyCostBasisCreate) SetEffectiveFrom(v time.Time) *CurrencyCostBasisCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *CurrencyCostBasisCreate) SetID(v string) *CurrencyCostBasisCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *CurrencyCostBasisCreate) SetNillableID(v *string) *CurrencyCostBasisCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetCurrencyID", + "signature": "func (_c *CurrencyCostBasisCreate) SetCurrencyID(id string) *CurrencyCostBasisCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *CurrencyCostBasisCreate) SetCurrency(v *CustomCurrency) *CurrencyCostBasisCreate", + "line": 122 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CurrencyCostBasisCreate) Mutation() *CurrencyCostBasisMutation", + "line": 127 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CurrencyCostBasisCreate) Save(ctx context.Context) (*CurrencyCostBasis, error)", + "line": 132 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CurrencyCostBasisCreate) SaveX(ctx context.Context) *CurrencyCostBasis", + "line": 138 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CurrencyCostBasisCreate) Exec(ctx context.Context) error", + "line": 147 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CurrencyCostBasisCreate) ExecX(ctx context.Context)", + "line": 153 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CurrencyCostBasisCreate) defaults()", + "line": 160 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CurrencyCostBasisCreate) check() error", + "line": 176 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CurrencyCostBasisCreate) sqlSave(ctx context.Context) (*CurrencyCostBasis, error)", + "line": 214 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CurrencyCostBasisCreate) createSpec() (*CurrencyCostBasis, *sqlgraph.CreateSpec)", + "line": 237 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CurrencyCostBasisCreate) OnConflict(opts ...sql.ConflictOption) *CurrencyCostBasisUpsertOne", + "line": 311 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CurrencyCostBasisCreate) OnConflictColumns(columns ...string) *CurrencyCostBasisUpsertOne", + "line": 324 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsert) SetUpdatedAt(v time.Time) *CurrencyCostBasisUpsert", + "line": 345 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsert) UpdateUpdatedAt() *CurrencyCostBasisUpsert", + "line": 351 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsert) SetDeletedAt(v time.Time) *CurrencyCostBasisUpsert", + "line": 357 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsert) UpdateDeletedAt() *CurrencyCostBasisUpsert", + "line": 363 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsert) ClearDeletedAt() *CurrencyCostBasisUpsert", + "line": 369 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CurrencyCostBasisUpsertOne) UpdateNewValues() *CurrencyCostBasisUpsertOne", + "line": 385 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CurrencyCostBasisUpsertOne) Ignore() *CurrencyCostBasisUpsertOne", + "line": 419 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CurrencyCostBasisUpsertOne) DoNothing() *CurrencyCostBasisUpsertOne", + "line": 426 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CurrencyCostBasisUpsertOne) Update(set func(*CurrencyCostBasisUpsert)) *CurrencyCostBasisUpsertOne", + "line": 433 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsertOne) SetUpdatedAt(v time.Time) *CurrencyCostBasisUpsertOne", + "line": 441 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsertOne) UpdateUpdatedAt() *CurrencyCostBasisUpsertOne", + "line": 448 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertOne) SetDeletedAt(v time.Time) *CurrencyCostBasisUpsertOne", + "line": 455 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertOne) UpdateDeletedAt() *CurrencyCostBasisUpsertOne", + "line": 462 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertOne) ClearDeletedAt() *CurrencyCostBasisUpsertOne", + "line": 469 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CurrencyCostBasisUpsertOne) Exec(ctx context.Context) error", + "line": 476 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CurrencyCostBasisUpsertOne) ExecX(ctx context.Context)", + "line": 484 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CurrencyCostBasisUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 491 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CurrencyCostBasisUpsertOne) IDX(ctx context.Context) string", + "line": 505 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisCreateBulk", + "signature": "type CurrencyCostBasisCreateBulk struct", + "line": 514 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CurrencyCostBasisCreateBulk) Save(ctx context.Context) ([]*CurrencyCostBasis, error)", + "line": 522 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CurrencyCostBasisCreateBulk) SaveX(ctx context.Context) []*CurrencyCostBasis", + "line": 578 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CurrencyCostBasisCreateBulk) Exec(ctx context.Context) error", + "line": 587 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CurrencyCostBasisCreateBulk) ExecX(ctx context.Context)", + "line": 593 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CurrencyCostBasisCreateBulk) OnConflict(opts ...sql.ConflictOption) *CurrencyCostBasisUpsertBulk", + "line": 614 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CurrencyCostBasisCreateBulk) OnConflictColumns(columns ...string) *CurrencyCostBasisUpsertBulk", + "line": 627 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisUpsertBulk", + "signature": "type CurrencyCostBasisUpsertBulk struct", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CurrencyCostBasisUpsertBulk) UpdateNewValues() *CurrencyCostBasisUpsertBulk", + "line": 651 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CurrencyCostBasisUpsertBulk) Ignore() *CurrencyCostBasisUpsertBulk", + "line": 687 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CurrencyCostBasisUpsertBulk) DoNothing() *CurrencyCostBasisUpsertBulk", + "line": 694 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CurrencyCostBasisUpsertBulk) Update(set func(*CurrencyCostBasisUpsert)) *CurrencyCostBasisUpsertBulk", + "line": 701 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsertBulk) SetUpdatedAt(v time.Time) *CurrencyCostBasisUpsertBulk", + "line": 709 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CurrencyCostBasisUpsertBulk) UpdateUpdatedAt() *CurrencyCostBasisUpsertBulk", + "line": 716 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertBulk) SetDeletedAt(v time.Time) *CurrencyCostBasisUpsertBulk", + "line": 723 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertBulk) UpdateDeletedAt() *CurrencyCostBasisUpsertBulk", + "line": 730 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CurrencyCostBasisUpsertBulk) ClearDeletedAt() *CurrencyCostBasisUpsertBulk", + "line": 737 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CurrencyCostBasisUpsertBulk) Exec(ctx context.Context) error", + "line": 744 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CurrencyCostBasisUpsertBulk) ExecX(ctx context.Context)", + "line": 760 + } + ], + "line_count": 764 + }, + "openmeter/ent/db/currencycostbasis_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyCostBasisDelete", + "signature": "type CurrencyCostBasisDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CurrencyCostBasisDelete) Where(ps ...predicate.CurrencyCostBasis) *CurrencyCostBasisDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CurrencyCostBasisDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CurrencyCostBasisDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CurrencyCostBasisDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisDeleteOne", + "signature": "type CurrencyCostBasisDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CurrencyCostBasisDeleteOne) Where(ps ...predicate.CurrencyCostBasis) *CurrencyCostBasisDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CurrencyCostBasisDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CurrencyCostBasisDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/currencycostbasis_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyCostBasisQuery", + "signature": "type CurrencyCostBasisQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CurrencyCostBasisQuery) Where(ps ...predicate.CurrencyCostBasis) *CurrencyCostBasisQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CurrencyCostBasisQuery) Limit(limit int) *CurrencyCostBasisQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CurrencyCostBasisQuery) Offset(offset int) *CurrencyCostBasisQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CurrencyCostBasisQuery) Unique(unique bool) *CurrencyCostBasisQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CurrencyCostBasisQuery) Order(o ...currencycostbasis.OrderOption) *CurrencyCostBasisQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryCurrency", + "signature": "func (_q *CurrencyCostBasisQuery) QueryCurrency() *CustomCurrencyQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CurrencyCostBasisQuery) First(ctx context.Context) (*CurrencyCostBasis, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CurrencyCostBasisQuery) FirstX(ctx context.Context) *CurrencyCostBasis", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CurrencyCostBasisQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CurrencyCostBasisQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CurrencyCostBasisQuery) Only(ctx context.Context) (*CurrencyCostBasis, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CurrencyCostBasisQuery) OnlyX(ctx context.Context) *CurrencyCostBasis", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CurrencyCostBasisQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CurrencyCostBasisQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CurrencyCostBasisQuery) All(ctx context.Context) ([]*CurrencyCostBasis, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CurrencyCostBasisQuery) AllX(ctx context.Context) []*CurrencyCostBasis", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CurrencyCostBasisQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CurrencyCostBasisQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CurrencyCostBasisQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CurrencyCostBasisQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CurrencyCostBasisQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CurrencyCostBasisQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CurrencyCostBasisQuery) Clone() *CurrencyCostBasisQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithCurrency", + "signature": "func (_q *CurrencyCostBasisQuery) WithCurrency(opts ...func(*CustomCurrencyQuery)) *CurrencyCostBasisQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CurrencyCostBasisQuery) GroupBy(field string, fields ...string) *CurrencyCostBasisGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CurrencyCostBasisQuery) Select(fields ...string) *CurrencyCostBasisSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CurrencyCostBasisQuery) Aggregate(fns ...AggregateFunc) *CurrencyCostBasisSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CurrencyCostBasisQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CurrencyCostBasisQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*CurrencyCostBasis, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadCurrency", + "signature": "func (_q *CurrencyCostBasisQuery) loadCurrency(ctx context.Context, query *CustomCurrencyQuery, nodes []*CurrencyCostBasis, init func(*CurrencyCostBasis), assign func(*CurrencyCostBasis, *CustomCurrency)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CurrencyCostBasisQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CurrencyCostBasisQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CurrencyCostBasisQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CurrencyCostBasisQuery) ForUpdate(opts ...sql.LockOption) *CurrencyCostBasisQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CurrencyCostBasisQuery) ForShare(opts ...sql.LockOption) *CurrencyCostBasisQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisGroupBy", + "signature": "type CurrencyCostBasisGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CurrencyCostBasisGroupBy) Aggregate(fns ...AggregateFunc) *CurrencyCostBasisGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CurrencyCostBasisGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CurrencyCostBasisGroupBy) sqlScan(ctx context.Context, root *CurrencyCostBasisQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisSelect", + "signature": "type CurrencyCostBasisSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CurrencyCostBasisSelect) Aggregate(fns ...AggregateFunc) *CurrencyCostBasisSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CurrencyCostBasisSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CurrencyCostBasisSelect) sqlScan(ctx context.Context, root *CurrencyCostBasisQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/currencycostbasis_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyCostBasisUpdate", + "signature": "type CurrencyCostBasisUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CurrencyCostBasisUpdate) Where(ps ...predicate.CurrencyCostBasis) *CurrencyCostBasisUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CurrencyCostBasisUpdate) SetUpdatedAt(v time.Time) *CurrencyCostBasisUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdate) SetDeletedAt(v time.Time) *CurrencyCostBasisUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdate) SetNillableDeletedAt(v *time.Time) *CurrencyCostBasisUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdate) ClearDeletedAt() *CurrencyCostBasisUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CurrencyCostBasisUpdate) Mutation() *CurrencyCostBasisMutation", + "line": 58 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CurrencyCostBasisUpdate) Save(ctx context.Context) (int, error)", + "line": 63 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CurrencyCostBasisUpdate) SaveX(ctx context.Context) int", + "line": 69 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CurrencyCostBasisUpdate) Exec(ctx context.Context) error", + "line": 78 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CurrencyCostBasisUpdate) ExecX(ctx context.Context)", + "line": 84 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CurrencyCostBasisUpdate) defaults()", + "line": 91 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CurrencyCostBasisUpdate) check() error", + "line": 99 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CurrencyCostBasisUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 106 + }, + { + "kind": "struct", + "name": "CurrencyCostBasisUpdateOne", + "signature": "type CurrencyCostBasisUpdateOne struct", + "line": 140 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CurrencyCostBasisUpdateOne) SetUpdatedAt(v time.Time) *CurrencyCostBasisUpdateOne", + "line": 148 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdateOne) SetDeletedAt(v time.Time) *CurrencyCostBasisUpdateOne", + "line": 154 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdateOne) SetNillableDeletedAt(v *time.Time) *CurrencyCostBasisUpdateOne", + "line": 160 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CurrencyCostBasisUpdateOne) ClearDeletedAt() *CurrencyCostBasisUpdateOne", + "line": 168 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CurrencyCostBasisUpdateOne) Mutation() *CurrencyCostBasisMutation", + "line": 174 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CurrencyCostBasisUpdateOne) Where(ps ...predicate.CurrencyCostBasis) *CurrencyCostBasisUpdateOne", + "line": 179 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CurrencyCostBasisUpdateOne) Select(field string, fields ...string) *CurrencyCostBasisUpdateOne", + "line": 186 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CurrencyCostBasisUpdateOne) Save(ctx context.Context) (*CurrencyCostBasis, error)", + "line": 192 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CurrencyCostBasisUpdateOne) SaveX(ctx context.Context) *CurrencyCostBasis", + "line": 198 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CurrencyCostBasisUpdateOne) Exec(ctx context.Context) error", + "line": 207 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CurrencyCostBasisUpdateOne) ExecX(ctx context.Context)", + "line": 213 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CurrencyCostBasisUpdateOne) defaults()", + "line": 220 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CurrencyCostBasisUpdateOne) check() error", + "line": 228 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CurrencyCostBasisUpdateOne) sqlSave(ctx context.Context) (_node *CurrencyCostBasis, err error)", + "line": 235 + } + ], + "line_count": 286 + }, + "openmeter/ent/db/cursor.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AddonQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Addon], error)", + "line": 16 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AddonRateCardQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AddonRateCard], error)", + "line": 67 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*App], error)", + "line": 118 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppCustomInvoicingQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AppCustomInvoicing], error)", + "line": 169 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppCustomInvoicingCustomerQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AppCustomInvoicingCustomer], error)", + "line": 220 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppCustomerQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AppCustomer], error)", + "line": 271 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppStripeQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AppStripe], error)", + "line": 322 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *AppStripeCustomerQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*AppStripeCustomer], error)", + "line": 373 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BalanceSnapshotQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BalanceSnapshot], error)", + "line": 424 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingCustomerOverrideQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingCustomerOverride], error)", + "line": 475 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoice], error)", + "line": 526 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceLineQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoiceLine], error)", + "line": 577 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceLineDiscountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoiceLineDiscount], error)", + "line": 628 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceLineUsageDiscountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoiceLineUsageDiscount], error)", + "line": 679 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceSplitLineGroupQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoiceSplitLineGroup], error)", + "line": 730 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingInvoiceValidationIssueQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingInvoiceValidationIssue], error)", + "line": 781 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingProfileQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingProfile], error)", + "line": 832 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingStandardInvoiceDetailedLineQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingStandardInvoiceDetailedLine], error)", + "line": 883 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingStandardInvoiceDetailedLineAmountDiscount], error)", + "line": 934 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *BillingWorkflowConfigQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*BillingWorkflowConfig], error)", + "line": 985 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Charge], error)", + "line": 1036 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeCreditPurchaseQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeCreditPurchase], error)", + "line": 1087 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeCreditPurchaseCreditGrantQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeCreditPurchaseCreditGrant], error)", + "line": 1138 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeCreditPurchaseExternalPaymentQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeCreditPurchaseExternalPayment], error)", + "line": 1189 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPaymentQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeCreditPurchaseInvoicedPayment], error)", + "line": 1240 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFee], error)", + "line": 1291 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeRunQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFeeRun], error)", + "line": 1342 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocationsQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFeeRunCreditAllocations], error)", + "line": 1393 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeRunDetailedLineQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFeeRunDetailedLine], error)", + "line": 1444 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsageQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFeeRunInvoicedUsage], error)", + "line": 1495 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeFlatFeeRunPaymentQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeFlatFeeRunPayment], error)", + "line": 1546 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBased], error)", + "line": 1597 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocationsQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBasedRunCreditAllocations], error)", + "line": 1648 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedRunDetailedLineQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBasedRunDetailedLine], error)", + "line": 1699 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsageQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBasedRunInvoicedUsage], error)", + "line": 1750 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedRunPaymentQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBasedRunPayment], error)", + "line": 1801 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargeUsageBasedRunsQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargeUsageBasedRuns], error)", + "line": 1852 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *ChargesSearchV1Query) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*ChargesSearchV1], error)", + "line": 1903 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CreditRealizationLineageQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*CreditRealizationLineage], error)", + "line": 1954 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CreditRealizationLineageSegmentQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*CreditRealizationLineageSegment], error)", + "line": 2005 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CurrencyCostBasisQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*CurrencyCostBasis], error)", + "line": 2056 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CustomCurrencyQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*CustomCurrency], error)", + "line": 2107 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CustomerQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Customer], error)", + "line": 2158 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *CustomerSubjectsQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*CustomerSubjects], error)", + "line": 2209 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *EntitlementQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Entitlement], error)", + "line": 2260 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *FeatureQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Feature], error)", + "line": 2311 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *GrantQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Grant], error)", + "line": 2362 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LLMCostPriceQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LLMCostPrice], error)", + "line": 2413 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerAccountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerAccount], error)", + "line": 2464 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerBreakageRecordQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerBreakageRecord], error)", + "line": 2515 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerCustomerAccountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerCustomerAccount], error)", + "line": 2566 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerEntryQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerEntry], error)", + "line": 2617 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerSubAccountQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerSubAccount], error)", + "line": 2668 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerSubAccountRouteQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerSubAccountRoute], error)", + "line": 2719 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerTransactionQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerTransaction], error)", + "line": 2770 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *LedgerTransactionGroupQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*LedgerTransactionGroup], error)", + "line": 2821 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *MeterQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Meter], error)", + "line": 2872 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *NotificationChannelQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*NotificationChannel], error)", + "line": 2923 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *NotificationEventQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*NotificationEvent], error)", + "line": 2974 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *NotificationEventDeliveryStatusQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*NotificationEventDeliveryStatus], error)", + "line": 3025 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *NotificationRuleQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*NotificationRule], error)", + "line": 3076 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *OrganizationDefaultTaxCodesQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*OrganizationDefaultTaxCodes], error)", + "line": 3127 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *PlanQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Plan], error)", + "line": 3178 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *PlanAddonQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*PlanAddon], error)", + "line": 3229 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *PlanPhaseQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*PlanPhase], error)", + "line": 3280 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *PlanRateCardQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*PlanRateCard], error)", + "line": 3331 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubjectQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Subject], error)", + "line": 3382 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubscriptionQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Subscription], error)", + "line": 3433 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubscriptionAddonQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*SubscriptionAddon], error)", + "line": 3484 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubscriptionAddonQuantityQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*SubscriptionAddonQuantity], error)", + "line": 3535 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubscriptionItemQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*SubscriptionItem], error)", + "line": 3586 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *SubscriptionPhaseQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*SubscriptionPhase], error)", + "line": 3637 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *TaxCodeQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*TaxCode], error)", + "line": 3688 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *UsageResetQuery) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*UsageReset], error)", + "line": 3739 + } + ], + "line_count": 3786 + }, + "openmeter/ent/db/customcurrency.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrency", + "signature": "type CustomCurrency struct", + "line": 16 + }, + { + "kind": "struct", + "name": "CustomCurrencyEdges", + "signature": "type CustomCurrencyEdges struct", + "line": 41 + }, + { + "kind": "func", + "name": "CostBasisHistoryOrErr", + "signature": "func (e CustomCurrencyEdges) CostBasisHistoryOrErr() ([]*CurrencyCostBasis, error)", + "line": 51 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *CustomCurrency) assignValues(columns []string, values []any) error", + "line": 76 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *CustomCurrency) Value(name string) (ent.Value, error)", + "line": 140 + }, + { + "kind": "func", + "name": "QueryCostBasisHistory", + "signature": "func (_m *CustomCurrency) QueryCostBasisHistory() *CurrencyCostBasisQuery", + "line": 145 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *CustomCurrency) Update() *CustomCurrencyUpdateOne", + "line": 152 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *CustomCurrency) Unwrap() *CustomCurrency", + "line": 158 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *CustomCurrency) String() string", + "line": 168 + } + ], + "line_count": 199 + }, + "openmeter/ent/db/customcurrency/customcurrency.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 57 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 89 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 94 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByCode", + "signature": "func ByCode(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "BySymbol", + "signature": "func BySymbol(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByCostBasisHistoryCount", + "signature": "func ByCostBasisHistoryCount(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByCostBasisHistory", + "signature": "func ByCostBasisHistory(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "newCostBasisHistoryStep", + "signature": "func newCostBasisHistoryStep() *sqlgraph.Step", + "line": 141 + } + ], + "line_count": 147 + }, + "openmeter/ent/db/customcurrency/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.CustomCurrency", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.CustomCurrency", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.CustomCurrency", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.CustomCurrency", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.CustomCurrency", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.CustomCurrency", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.CustomCurrency", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.CustomCurrency", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.CustomCurrency", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.CustomCurrency", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.CustomCurrency", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.CustomCurrency", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.CustomCurrency", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.CustomCurrency", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.CustomCurrency", + "line": 84 + }, + { + "kind": "func", + "name": "Code", + "signature": "func Code(v string) predicate.CustomCurrency", + "line": 89 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.CustomCurrency", + "line": 94 + }, + { + "kind": "func", + "name": "Symbol", + "signature": "func Symbol(v string) predicate.CustomCurrency", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.CustomCurrency", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.CustomCurrency", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.CustomCurrency", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.CustomCurrency", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.CustomCurrency", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.CustomCurrency", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.CustomCurrency", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.CustomCurrency", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.CustomCurrency", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.CustomCurrency", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.CustomCurrency", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.CustomCurrency", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.CustomCurrency", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.CustomCurrency", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.CustomCurrency", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.CustomCurrency", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.CustomCurrency", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.CustomCurrency", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.CustomCurrency", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.CustomCurrency", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.CustomCurrency", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.CustomCurrency", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.CustomCurrency", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.CustomCurrency", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.CustomCurrency", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.CustomCurrency", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.CustomCurrency", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.CustomCurrency", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.CustomCurrency", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.CustomCurrency", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.CustomCurrency", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.CustomCurrency", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.CustomCurrency", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.CustomCurrency", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.CustomCurrency", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.CustomCurrency", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.CustomCurrency", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.CustomCurrency", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.CustomCurrency", + "line": 294 + }, + { + "kind": "func", + "name": "CodeEQ", + "signature": "func CodeEQ(v string) predicate.CustomCurrency", + "line": 299 + }, + { + "kind": "func", + "name": "CodeNEQ", + "signature": "func CodeNEQ(v string) predicate.CustomCurrency", + "line": 304 + }, + { + "kind": "func", + "name": "CodeIn", + "signature": "func CodeIn(vs ...string) predicate.CustomCurrency", + "line": 309 + }, + { + "kind": "func", + "name": "CodeNotIn", + "signature": "func CodeNotIn(vs ...string) predicate.CustomCurrency", + "line": 314 + }, + { + "kind": "func", + "name": "CodeGT", + "signature": "func CodeGT(v string) predicate.CustomCurrency", + "line": 319 + }, + { + "kind": "func", + "name": "CodeGTE", + "signature": "func CodeGTE(v string) predicate.CustomCurrency", + "line": 324 + }, + { + "kind": "func", + "name": "CodeLT", + "signature": "func CodeLT(v string) predicate.CustomCurrency", + "line": 329 + }, + { + "kind": "func", + "name": "CodeLTE", + "signature": "func CodeLTE(v string) predicate.CustomCurrency", + "line": 334 + }, + { + "kind": "func", + "name": "CodeContains", + "signature": "func CodeContains(v string) predicate.CustomCurrency", + "line": 339 + }, + { + "kind": "func", + "name": "CodeHasPrefix", + "signature": "func CodeHasPrefix(v string) predicate.CustomCurrency", + "line": 344 + }, + { + "kind": "func", + "name": "CodeHasSuffix", + "signature": "func CodeHasSuffix(v string) predicate.CustomCurrency", + "line": 349 + }, + { + "kind": "func", + "name": "CodeEqualFold", + "signature": "func CodeEqualFold(v string) predicate.CustomCurrency", + "line": 354 + }, + { + "kind": "func", + "name": "CodeContainsFold", + "signature": "func CodeContainsFold(v string) predicate.CustomCurrency", + "line": 359 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.CustomCurrency", + "line": 364 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.CustomCurrency", + "line": 369 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.CustomCurrency", + "line": 374 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.CustomCurrency", + "line": 379 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.CustomCurrency", + "line": 384 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.CustomCurrency", + "line": 389 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.CustomCurrency", + "line": 394 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.CustomCurrency", + "line": 399 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.CustomCurrency", + "line": 404 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.CustomCurrency", + "line": 409 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.CustomCurrency", + "line": 414 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.CustomCurrency", + "line": 419 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.CustomCurrency", + "line": 424 + }, + { + "kind": "func", + "name": "SymbolEQ", + "signature": "func SymbolEQ(v string) predicate.CustomCurrency", + "line": 429 + }, + { + "kind": "func", + "name": "SymbolNEQ", + "signature": "func SymbolNEQ(v string) predicate.CustomCurrency", + "line": 434 + }, + { + "kind": "func", + "name": "SymbolIn", + "signature": "func SymbolIn(vs ...string) predicate.CustomCurrency", + "line": 439 + }, + { + "kind": "func", + "name": "SymbolNotIn", + "signature": "func SymbolNotIn(vs ...string) predicate.CustomCurrency", + "line": 444 + }, + { + "kind": "func", + "name": "SymbolGT", + "signature": "func SymbolGT(v string) predicate.CustomCurrency", + "line": 449 + }, + { + "kind": "func", + "name": "SymbolGTE", + "signature": "func SymbolGTE(v string) predicate.CustomCurrency", + "line": 454 + }, + { + "kind": "func", + "name": "SymbolLT", + "signature": "func SymbolLT(v string) predicate.CustomCurrency", + "line": 459 + }, + { + "kind": "func", + "name": "SymbolLTE", + "signature": "func SymbolLTE(v string) predicate.CustomCurrency", + "line": 464 + }, + { + "kind": "func", + "name": "SymbolContains", + "signature": "func SymbolContains(v string) predicate.CustomCurrency", + "line": 469 + }, + { + "kind": "func", + "name": "SymbolHasPrefix", + "signature": "func SymbolHasPrefix(v string) predicate.CustomCurrency", + "line": 474 + }, + { + "kind": "func", + "name": "SymbolHasSuffix", + "signature": "func SymbolHasSuffix(v string) predicate.CustomCurrency", + "line": 479 + }, + { + "kind": "func", + "name": "SymbolEqualFold", + "signature": "func SymbolEqualFold(v string) predicate.CustomCurrency", + "line": 484 + }, + { + "kind": "func", + "name": "SymbolContainsFold", + "signature": "func SymbolContainsFold(v string) predicate.CustomCurrency", + "line": 489 + }, + { + "kind": "func", + "name": "HasCostBasisHistory", + "signature": "func HasCostBasisHistory() predicate.CustomCurrency", + "line": 494 + }, + { + "kind": "func", + "name": "HasCostBasisHistoryWith", + "signature": "func HasCostBasisHistoryWith(preds ...predicate.CurrencyCostBasis) predicate.CustomCurrency", + "line": 505 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.CustomCurrency) predicate.CustomCurrency", + "line": 517 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.CustomCurrency) predicate.CustomCurrency", + "line": 522 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.CustomCurrency) predicate.CustomCurrency", + "line": 527 + } + ], + "line_count": 529 + }, + "openmeter/ent/db/customcurrency_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrencyCreate", + "signature": "type CustomCurrencyCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *CustomCurrencyCreate) SetNamespace(v string) *CustomCurrencyCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CustomCurrencyCreate) SetCreatedAt(v time.Time) *CustomCurrencyCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CustomCurrencyCreate) SetNillableCreatedAt(v *time.Time) *CustomCurrencyCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *CustomCurrencyCreate) SetUpdatedAt(v time.Time) *CustomCurrencyCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *CustomCurrencyCreate) SetNillableUpdatedAt(v *time.Time) *CustomCurrencyCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *CustomCurrencyCreate) SetDeletedAt(v time.Time) *CustomCurrencyCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *CustomCurrencyCreate) SetNillableDeletedAt(v *time.Time) *CustomCurrencyCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetCode", + "signature": "func (_c *CustomCurrencyCreate) SetCode(v string) *CustomCurrencyCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *CustomCurrencyCreate) SetName(v string) *CustomCurrencyCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (_c *CustomCurrencyCreate) SetSymbol(v string) *CustomCurrencyCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *CustomCurrencyCreate) SetID(v string) *CustomCurrencyCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *CustomCurrencyCreate) SetNillableID(v *string) *CustomCurrencyCreate", + "line": 100 + }, + { + "kind": "func", + "name": "AddCostBasisHistoryIDs", + "signature": "func (_c *CustomCurrencyCreate) AddCostBasisHistoryIDs(ids ...string) *CustomCurrencyCreate", + "line": 108 + }, + { + "kind": "func", + "name": "AddCostBasisHistory", + "signature": "func (_c *CustomCurrencyCreate) AddCostBasisHistory(v ...*CurrencyCostBasis) *CustomCurrencyCreate", + "line": 114 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CustomCurrencyCreate) Mutation() *CustomCurrencyMutation", + "line": 123 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomCurrencyCreate) Save(ctx context.Context) (*CustomCurrency, error)", + "line": 128 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomCurrencyCreate) SaveX(ctx context.Context) *CustomCurrency", + "line": 134 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomCurrencyCreate) Exec(ctx context.Context) error", + "line": 143 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomCurrencyCreate) ExecX(ctx context.Context)", + "line": 149 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CustomCurrencyCreate) defaults()", + "line": 156 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CustomCurrencyCreate) check() error", + "line": 172 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CustomCurrencyCreate) sqlSave(ctx context.Context) (*CustomCurrency, error)", + "line": 214 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CustomCurrencyCreate) createSpec() (*CustomCurrency, *sqlgraph.CreateSpec)", + "line": 237 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomCurrencyCreate) OnConflict(opts ...sql.ConflictOption) *CustomCurrencyUpsertOne", + "line": 310 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomCurrencyCreate) OnConflictColumns(columns ...string) *CustomCurrencyUpsertOne", + "line": 323 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomCurrencyUpsert) SetUpdatedAt(v time.Time) *CustomCurrencyUpsert", + "line": 344 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomCurrencyUpsert) UpdateUpdatedAt() *CustomCurrencyUpsert", + "line": 350 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomCurrencyUpsert) SetDeletedAt(v time.Time) *CustomCurrencyUpsert", + "line": 356 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomCurrencyUpsert) UpdateDeletedAt() *CustomCurrencyUpsert", + "line": 362 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomCurrencyUpsert) ClearDeletedAt() *CustomCurrencyUpsert", + "line": 368 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomCurrencyUpsert) SetName(v string) *CustomCurrencyUpsert", + "line": 374 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomCurrencyUpsert) UpdateName() *CustomCurrencyUpsert", + "line": 380 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (u *CustomCurrencyUpsert) SetSymbol(v string) *CustomCurrencyUpsert", + "line": 386 + }, + { + "kind": "func", + "name": "UpdateSymbol", + "signature": "func (u *CustomCurrencyUpsert) UpdateSymbol() *CustomCurrencyUpsert", + "line": 392 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomCurrencyUpsertOne) UpdateNewValues() *CustomCurrencyUpsertOne", + "line": 408 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomCurrencyUpsertOne) Ignore() *CustomCurrencyUpsertOne", + "line": 433 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomCurrencyUpsertOne) DoNothing() *CustomCurrencyUpsertOne", + "line": 440 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomCurrencyUpsertOne) Update(set func(*CustomCurrencyUpsert)) *CustomCurrencyUpsertOne", + "line": 447 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomCurrencyUpsertOne) SetUpdatedAt(v time.Time) *CustomCurrencyUpsertOne", + "line": 455 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomCurrencyUpsertOne) UpdateUpdatedAt() *CustomCurrencyUpsertOne", + "line": 462 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomCurrencyUpsertOne) SetDeletedAt(v time.Time) *CustomCurrencyUpsertOne", + "line": 469 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomCurrencyUpsertOne) UpdateDeletedAt() *CustomCurrencyUpsertOne", + "line": 476 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomCurrencyUpsertOne) ClearDeletedAt() *CustomCurrencyUpsertOne", + "line": 483 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomCurrencyUpsertOne) SetName(v string) *CustomCurrencyUpsertOne", + "line": 490 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomCurrencyUpsertOne) UpdateName() *CustomCurrencyUpsertOne", + "line": 497 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (u *CustomCurrencyUpsertOne) SetSymbol(v string) *CustomCurrencyUpsertOne", + "line": 504 + }, + { + "kind": "func", + "name": "UpdateSymbol", + "signature": "func (u *CustomCurrencyUpsertOne) UpdateSymbol() *CustomCurrencyUpsertOne", + "line": 511 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomCurrencyUpsertOne) Exec(ctx context.Context) error", + "line": 518 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomCurrencyUpsertOne) ExecX(ctx context.Context)", + "line": 526 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CustomCurrencyUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 533 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CustomCurrencyUpsertOne) IDX(ctx context.Context) string", + "line": 547 + }, + { + "kind": "struct", + "name": "CustomCurrencyCreateBulk", + "signature": "type CustomCurrencyCreateBulk struct", + "line": 556 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomCurrencyCreateBulk) Save(ctx context.Context) ([]*CustomCurrency, error)", + "line": 564 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomCurrencyCreateBulk) SaveX(ctx context.Context) []*CustomCurrency", + "line": 620 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomCurrencyCreateBulk) Exec(ctx context.Context) error", + "line": 629 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomCurrencyCreateBulk) ExecX(ctx context.Context)", + "line": 635 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomCurrencyCreateBulk) OnConflict(opts ...sql.ConflictOption) *CustomCurrencyUpsertBulk", + "line": 656 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomCurrencyCreateBulk) OnConflictColumns(columns ...string) *CustomCurrencyUpsertBulk", + "line": 669 + }, + { + "kind": "struct", + "name": "CustomCurrencyUpsertBulk", + "signature": "type CustomCurrencyUpsertBulk struct", + "line": 678 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomCurrencyUpsertBulk) UpdateNewValues() *CustomCurrencyUpsertBulk", + "line": 693 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomCurrencyUpsertBulk) Ignore() *CustomCurrencyUpsertBulk", + "line": 720 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomCurrencyUpsertBulk) DoNothing() *CustomCurrencyUpsertBulk", + "line": 727 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomCurrencyUpsertBulk) Update(set func(*CustomCurrencyUpsert)) *CustomCurrencyUpsertBulk", + "line": 734 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomCurrencyUpsertBulk) SetUpdatedAt(v time.Time) *CustomCurrencyUpsertBulk", + "line": 742 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomCurrencyUpsertBulk) UpdateUpdatedAt() *CustomCurrencyUpsertBulk", + "line": 749 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomCurrencyUpsertBulk) SetDeletedAt(v time.Time) *CustomCurrencyUpsertBulk", + "line": 756 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomCurrencyUpsertBulk) UpdateDeletedAt() *CustomCurrencyUpsertBulk", + "line": 763 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomCurrencyUpsertBulk) ClearDeletedAt() *CustomCurrencyUpsertBulk", + "line": 770 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomCurrencyUpsertBulk) SetName(v string) *CustomCurrencyUpsertBulk", + "line": 777 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomCurrencyUpsertBulk) UpdateName() *CustomCurrencyUpsertBulk", + "line": 784 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (u *CustomCurrencyUpsertBulk) SetSymbol(v string) *CustomCurrencyUpsertBulk", + "line": 791 + }, + { + "kind": "func", + "name": "UpdateSymbol", + "signature": "func (u *CustomCurrencyUpsertBulk) UpdateSymbol() *CustomCurrencyUpsertBulk", + "line": 798 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomCurrencyUpsertBulk) Exec(ctx context.Context) error", + "line": 805 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomCurrencyUpsertBulk) ExecX(ctx context.Context)", + "line": 821 + } + ], + "line_count": 825 + }, + "openmeter/ent/db/customcurrency_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrencyDelete", + "signature": "type CustomCurrencyDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomCurrencyDelete) Where(ps ...predicate.CustomCurrency) *CustomCurrencyDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomCurrencyDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomCurrencyDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CustomCurrencyDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CustomCurrencyDeleteOne", + "signature": "type CustomCurrencyDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomCurrencyDeleteOne) Where(ps ...predicate.CustomCurrency) *CustomCurrencyDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomCurrencyDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomCurrencyDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/customcurrency_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrencyQuery", + "signature": "type CustomCurrencyQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CustomCurrencyQuery) Where(ps ...predicate.CustomCurrency) *CustomCurrencyQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CustomCurrencyQuery) Limit(limit int) *CustomCurrencyQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CustomCurrencyQuery) Offset(offset int) *CustomCurrencyQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CustomCurrencyQuery) Unique(unique bool) *CustomCurrencyQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CustomCurrencyQuery) Order(o ...customcurrency.OrderOption) *CustomCurrencyQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryCostBasisHistory", + "signature": "func (_q *CustomCurrencyQuery) QueryCostBasisHistory() *CurrencyCostBasisQuery", + "line": 67 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CustomCurrencyQuery) First(ctx context.Context) (*CustomCurrency, error)", + "line": 90 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CustomCurrencyQuery) FirstX(ctx context.Context) *CustomCurrency", + "line": 102 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CustomCurrencyQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CustomCurrencyQuery) FirstIDX(ctx context.Context) string", + "line": 125 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CustomCurrencyQuery) Only(ctx context.Context) (*CustomCurrency, error)", + "line": 136 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CustomCurrencyQuery) OnlyX(ctx context.Context) *CustomCurrency", + "line": 152 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CustomCurrencyQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 163 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CustomCurrencyQuery) OnlyIDX(ctx context.Context) string", + "line": 180 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CustomCurrencyQuery) All(ctx context.Context) ([]*CustomCurrency, error)", + "line": 189 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CustomCurrencyQuery) AllX(ctx context.Context) []*CustomCurrency", + "line": 199 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CustomCurrencyQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 208 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CustomCurrencyQuery) IDsX(ctx context.Context) []string", + "line": 220 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CustomCurrencyQuery) Count(ctx context.Context) (int, error)", + "line": 229 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CustomCurrencyQuery) CountX(ctx context.Context) int", + "line": 238 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CustomCurrencyQuery) Exist(ctx context.Context) (bool, error)", + "line": 247 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CustomCurrencyQuery) ExistX(ctx context.Context) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CustomCurrencyQuery) Clone() *CustomCurrencyQuery", + "line": 270 + }, + { + "kind": "func", + "name": "WithCostBasisHistory", + "signature": "func (_q *CustomCurrencyQuery) WithCostBasisHistory(opts ...func(*CurrencyCostBasisQuery)) *CustomCurrencyQuery", + "line": 289 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CustomCurrencyQuery) GroupBy(field string, fields ...string) *CustomCurrencyGroupBy", + "line": 312 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CustomCurrencyQuery) Select(fields ...string) *CustomCurrencySelect", + "line": 333 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CustomCurrencyQuery) Aggregate(fns ...AggregateFunc) *CustomCurrencySelect", + "line": 342 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CustomCurrencyQuery) prepareQuery(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CustomCurrencyQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*CustomCurrency, error)", + "line": 372 + }, + { + "kind": "func", + "name": "loadCostBasisHistory", + "signature": "func (_q *CustomCurrencyQuery) loadCostBasisHistory(ctx context.Context, query *CurrencyCostBasisQuery, nodes []*CustomCurrency, init func(*CustomCurrency), assign func(*CustomCurrency, *CurrencyCostBasis)) error", + "line": 413 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CustomCurrencyQuery) sqlCount(ctx context.Context) (int, error)", + "line": 444 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CustomCurrencyQuery) querySpec() *sqlgraph.QuerySpec", + "line": 456 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CustomCurrencyQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 496 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CustomCurrencyQuery) ForUpdate(opts ...sql.LockOption) *CustomCurrencyQuery", + "line": 534 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CustomCurrencyQuery) ForShare(opts ...sql.LockOption) *CustomCurrencyQuery", + "line": 547 + }, + { + "kind": "struct", + "name": "CustomCurrencyGroupBy", + "signature": "type CustomCurrencyGroupBy struct", + "line": 558 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CustomCurrencyGroupBy) Aggregate(fns ...AggregateFunc) *CustomCurrencyGroupBy", + "line": 564 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CustomCurrencyGroupBy) Scan(ctx context.Context, v any) error", + "line": 570 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CustomCurrencyGroupBy) sqlScan(ctx context.Context, root *CustomCurrencyQuery, v any) error", + "line": 578 + }, + { + "kind": "struct", + "name": "CustomCurrencySelect", + "signature": "type CustomCurrencySelect struct", + "line": 606 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CustomCurrencySelect) Aggregate(fns ...AggregateFunc) *CustomCurrencySelect", + "line": 612 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CustomCurrencySelect) Scan(ctx context.Context, v any) error", + "line": 618 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CustomCurrencySelect) sqlScan(ctx context.Context, root *CustomCurrencyQuery, v any) error", + "line": 626 + } + ], + "line_count": 645 + }, + "openmeter/ent/db/customcurrency_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrencyUpdate", + "signature": "type CustomCurrencyUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomCurrencyUpdate) Where(ps ...predicate.CustomCurrency) *CustomCurrencyUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CustomCurrencyUpdate) SetUpdatedAt(v time.Time) *CustomCurrencyUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomCurrencyUpdate) SetDeletedAt(v time.Time) *CustomCurrencyUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomCurrencyUpdate) SetNillableDeletedAt(v *time.Time) *CustomCurrencyUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomCurrencyUpdate) ClearDeletedAt() *CustomCurrencyUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *CustomCurrencyUpdate) SetName(v string) *CustomCurrencyUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *CustomCurrencyUpdate) SetNillableName(v *string) *CustomCurrencyUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (_u *CustomCurrencyUpdate) SetSymbol(v string) *CustomCurrencyUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableSymbol", + "signature": "func (_u *CustomCurrencyUpdate) SetNillableSymbol(v *string) *CustomCurrencyUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "AddCostBasisHistoryIDs", + "signature": "func (_u *CustomCurrencyUpdate) AddCostBasisHistoryIDs(ids ...string) *CustomCurrencyUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "AddCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdate) AddCostBasisHistory(v ...*CurrencyCostBasis) *CustomCurrencyUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomCurrencyUpdate) Mutation() *CustomCurrencyMutation", + "line": 102 + }, + { + "kind": "func", + "name": "ClearCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdate) ClearCostBasisHistory() *CustomCurrencyUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "RemoveCostBasisHistoryIDs", + "signature": "func (_u *CustomCurrencyUpdate) RemoveCostBasisHistoryIDs(ids ...string) *CustomCurrencyUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "RemoveCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdate) RemoveCostBasisHistory(v ...*CurrencyCostBasis) *CustomCurrencyUpdate", + "line": 119 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomCurrencyUpdate) Save(ctx context.Context) (int, error)", + "line": 128 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomCurrencyUpdate) SaveX(ctx context.Context) int", + "line": 134 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomCurrencyUpdate) Exec(ctx context.Context) error", + "line": 143 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomCurrencyUpdate) ExecX(ctx context.Context)", + "line": 149 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CustomCurrencyUpdate) defaults()", + "line": 156 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomCurrencyUpdate) check() error", + "line": 164 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomCurrencyUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 178 + }, + { + "kind": "struct", + "name": "CustomCurrencyUpdateOne", + "signature": "type CustomCurrencyUpdateOne struct", + "line": 263 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CustomCurrencyUpdateOne) SetUpdatedAt(v time.Time) *CustomCurrencyUpdateOne", + "line": 271 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomCurrencyUpdateOne) SetDeletedAt(v time.Time) *CustomCurrencyUpdateOne", + "line": 277 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomCurrencyUpdateOne) SetNillableDeletedAt(v *time.Time) *CustomCurrencyUpdateOne", + "line": 283 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomCurrencyUpdateOne) ClearDeletedAt() *CustomCurrencyUpdateOne", + "line": 291 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *CustomCurrencyUpdateOne) SetName(v string) *CustomCurrencyUpdateOne", + "line": 297 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *CustomCurrencyUpdateOne) SetNillableName(v *string) *CustomCurrencyUpdateOne", + "line": 303 + }, + { + "kind": "func", + "name": "SetSymbol", + "signature": "func (_u *CustomCurrencyUpdateOne) SetSymbol(v string) *CustomCurrencyUpdateOne", + "line": 311 + }, + { + "kind": "func", + "name": "SetNillableSymbol", + "signature": "func (_u *CustomCurrencyUpdateOne) SetNillableSymbol(v *string) *CustomCurrencyUpdateOne", + "line": 317 + }, + { + "kind": "func", + "name": "AddCostBasisHistoryIDs", + "signature": "func (_u *CustomCurrencyUpdateOne) AddCostBasisHistoryIDs(ids ...string) *CustomCurrencyUpdateOne", + "line": 325 + }, + { + "kind": "func", + "name": "AddCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdateOne) AddCostBasisHistory(v ...*CurrencyCostBasis) *CustomCurrencyUpdateOne", + "line": 331 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomCurrencyUpdateOne) Mutation() *CustomCurrencyMutation", + "line": 340 + }, + { + "kind": "func", + "name": "ClearCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdateOne) ClearCostBasisHistory() *CustomCurrencyUpdateOne", + "line": 345 + }, + { + "kind": "func", + "name": "RemoveCostBasisHistoryIDs", + "signature": "func (_u *CustomCurrencyUpdateOne) RemoveCostBasisHistoryIDs(ids ...string) *CustomCurrencyUpdateOne", + "line": 351 + }, + { + "kind": "func", + "name": "RemoveCostBasisHistory", + "signature": "func (_u *CustomCurrencyUpdateOne) RemoveCostBasisHistory(v ...*CurrencyCostBasis) *CustomCurrencyUpdateOne", + "line": 357 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomCurrencyUpdateOne) Where(ps ...predicate.CustomCurrency) *CustomCurrencyUpdateOne", + "line": 366 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CustomCurrencyUpdateOne) Select(field string, fields ...string) *CustomCurrencyUpdateOne", + "line": 373 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomCurrencyUpdateOne) Save(ctx context.Context) (*CustomCurrency, error)", + "line": 379 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomCurrencyUpdateOne) SaveX(ctx context.Context) *CustomCurrency", + "line": 385 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomCurrencyUpdateOne) Exec(ctx context.Context) error", + "line": 394 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomCurrencyUpdateOne) ExecX(ctx context.Context)", + "line": 400 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CustomCurrencyUpdateOne) defaults()", + "line": 407 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomCurrencyUpdateOne) check() error", + "line": 415 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomCurrencyUpdateOne) sqlSave(ctx context.Context) (_node *CustomCurrency, err error)", + "line": 429 + } + ], + "line_count": 531 + }, + "openmeter/ent/db/customer.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Customer", + "signature": "type Customer struct", + "line": 20 + }, + { + "kind": "struct", + "name": "CustomerEdges", + "signature": "type CustomerEdges struct", + "line": 67 + }, + { + "kind": "func", + "name": "AppsOrErr", + "signature": "func (e CustomerEdges) AppsOrErr() ([]*AppCustomer, error)", + "line": 93 + }, + { + "kind": "func", + "name": "SubjectsOrErr", + "signature": "func (e CustomerEdges) SubjectsOrErr() ([]*CustomerSubjects, error)", + "line": 102 + }, + { + "kind": "func", + "name": "BillingCustomerOverrideOrErr", + "signature": "func (e CustomerEdges) BillingCustomerOverrideOrErr() (*BillingCustomerOverride, error)", + "line": 111 + }, + { + "kind": "func", + "name": "BillingInvoiceOrErr", + "signature": "func (e CustomerEdges) BillingInvoiceOrErr() ([]*BillingInvoice, error)", + "line": 122 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e CustomerEdges) SubscriptionOrErr() ([]*Subscription, error)", + "line": 131 + }, + { + "kind": "func", + "name": "EntitlementsOrErr", + "signature": "func (e CustomerEdges) EntitlementsOrErr() ([]*Entitlement, error)", + "line": 140 + }, + { + "kind": "func", + "name": "ChargesCreditPurchaseOrErr", + "signature": "func (e CustomerEdges) ChargesCreditPurchaseOrErr() ([]*ChargeCreditPurchase, error)", + "line": 149 + }, + { + "kind": "func", + "name": "ChargesFlatFeeOrErr", + "signature": "func (e CustomerEdges) ChargesFlatFeeOrErr() ([]*ChargeFlatFee, error)", + "line": 158 + }, + { + "kind": "func", + "name": "ChargesUsageBasedOrErr", + "signature": "func (e CustomerEdges) ChargesUsageBasedOrErr() ([]*ChargeUsageBased, error)", + "line": 167 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Customer) assignValues(columns []string, values []any) error", + "line": 194 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Customer) Value(name string) (ent.Value, error)", + "line": 338 + }, + { + "kind": "func", + "name": "QueryApps", + "signature": "func (_m *Customer) QueryApps() *AppCustomerQuery", + "line": 343 + }, + { + "kind": "func", + "name": "QuerySubjects", + "signature": "func (_m *Customer) QuerySubjects() *CustomerSubjectsQuery", + "line": 348 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverride", + "signature": "func (_m *Customer) QueryBillingCustomerOverride() *BillingCustomerOverrideQuery", + "line": 353 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_m *Customer) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 358 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *Customer) QuerySubscription() *SubscriptionQuery", + "line": 363 + }, + { + "kind": "func", + "name": "QueryEntitlements", + "signature": "func (_m *Customer) QueryEntitlements() *EntitlementQuery", + "line": 368 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_m *Customer) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 373 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_m *Customer) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 378 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_m *Customer) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 383 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Customer) Update() *CustomerUpdateOne", + "line": 390 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Customer) Unwrap() *Customer", + "line": 396 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Customer) String() string", + "line": 406 + } + ], + "line_count": 490 + }, + "openmeter/ent/db/customer/customer.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 162 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 192 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 197 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 202 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 207 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 212 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 217 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 222 + }, + { + "kind": "func", + "name": "ByBillingAddressCountry", + "signature": "func ByBillingAddressCountry(opts ...sql.OrderTermOption) OrderOption", + "line": 227 + }, + { + "kind": "func", + "name": "ByBillingAddressPostalCode", + "signature": "func ByBillingAddressPostalCode(opts ...sql.OrderTermOption) OrderOption", + "line": 232 + }, + { + "kind": "func", + "name": "ByBillingAddressState", + "signature": "func ByBillingAddressState(opts ...sql.OrderTermOption) OrderOption", + "line": 237 + }, + { + "kind": "func", + "name": "ByBillingAddressCity", + "signature": "func ByBillingAddressCity(opts ...sql.OrderTermOption) OrderOption", + "line": 242 + }, + { + "kind": "func", + "name": "ByBillingAddressLine1", + "signature": "func ByBillingAddressLine1(opts ...sql.OrderTermOption) OrderOption", + "line": 247 + }, + { + "kind": "func", + "name": "ByBillingAddressLine2", + "signature": "func ByBillingAddressLine2(opts ...sql.OrderTermOption) OrderOption", + "line": 252 + }, + { + "kind": "func", + "name": "ByBillingAddressPhoneNumber", + "signature": "func ByBillingAddressPhoneNumber(opts ...sql.OrderTermOption) OrderOption", + "line": 257 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 262 + }, + { + "kind": "func", + "name": "ByPrimaryEmail", + "signature": "func ByPrimaryEmail(opts ...sql.OrderTermOption) OrderOption", + "line": 267 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 272 + }, + { + "kind": "func", + "name": "ByAppsCount", + "signature": "func ByAppsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 277 + }, + { + "kind": "func", + "name": "ByApps", + "signature": "func ByApps(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 284 + }, + { + "kind": "func", + "name": "BySubjectsCount", + "signature": "func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 291 + }, + { + "kind": "func", + "name": "BySubjects", + "signature": "func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 298 + }, + { + "kind": "func", + "name": "ByBillingCustomerOverrideField", + "signature": "func ByBillingCustomerOverrideField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 305 + }, + { + "kind": "func", + "name": "ByBillingInvoiceCount", + "signature": "func ByBillingInvoiceCount(opts ...sql.OrderTermOption) OrderOption", + "line": 312 + }, + { + "kind": "func", + "name": "ByBillingInvoice", + "signature": "func ByBillingInvoice(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 319 + }, + { + "kind": "func", + "name": "BySubscriptionCount", + "signature": "func BySubscriptionCount(opts ...sql.OrderTermOption) OrderOption", + "line": 326 + }, + { + "kind": "func", + "name": "BySubscription", + "signature": "func BySubscription(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 333 + }, + { + "kind": "func", + "name": "ByEntitlementsCount", + "signature": "func ByEntitlementsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 340 + }, + { + "kind": "func", + "name": "ByEntitlements", + "signature": "func ByEntitlements(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 347 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchaseCount", + "signature": "func ByChargesCreditPurchaseCount(opts ...sql.OrderTermOption) OrderOption", + "line": 354 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchase", + "signature": "func ByChargesCreditPurchase(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 361 + }, + { + "kind": "func", + "name": "ByChargesFlatFeeCount", + "signature": "func ByChargesFlatFeeCount(opts ...sql.OrderTermOption) OrderOption", + "line": 368 + }, + { + "kind": "func", + "name": "ByChargesFlatFee", + "signature": "func ByChargesFlatFee(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 375 + }, + { + "kind": "func", + "name": "ByChargesUsageBasedCount", + "signature": "func ByChargesUsageBasedCount(opts ...sql.OrderTermOption) OrderOption", + "line": 382 + }, + { + "kind": "func", + "name": "ByChargesUsageBased", + "signature": "func ByChargesUsageBased(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 389 + }, + { + "kind": "func", + "name": "newAppsStep", + "signature": "func newAppsStep() *sqlgraph.Step", + "line": 394 + }, + { + "kind": "func", + "name": "newSubjectsStep", + "signature": "func newSubjectsStep() *sqlgraph.Step", + "line": 401 + }, + { + "kind": "func", + "name": "newBillingCustomerOverrideStep", + "signature": "func newBillingCustomerOverrideStep() *sqlgraph.Step", + "line": 408 + }, + { + "kind": "func", + "name": "newBillingInvoiceStep", + "signature": "func newBillingInvoiceStep() *sqlgraph.Step", + "line": 415 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 422 + }, + { + "kind": "func", + "name": "newEntitlementsStep", + "signature": "func newEntitlementsStep() *sqlgraph.Step", + "line": 429 + }, + { + "kind": "func", + "name": "newChargesCreditPurchaseStep", + "signature": "func newChargesCreditPurchaseStep() *sqlgraph.Step", + "line": 436 + }, + { + "kind": "func", + "name": "newChargesFlatFeeStep", + "signature": "func newChargesFlatFeeStep() *sqlgraph.Step", + "line": 443 + }, + { + "kind": "func", + "name": "newChargesUsageBasedStep", + "signature": "func newChargesUsageBasedStep() *sqlgraph.Step", + "line": 450 + } + ], + "line_count": 456 + }, + "openmeter/ent/db/customer/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Customer", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Customer", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Customer", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Customer", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Customer", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Customer", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Customer", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Customer", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Customer", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Customer", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Customer", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Customer", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Customer", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Customer", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Customer", + "line": 86 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Customer", + "line": 91 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Customer", + "line": 96 + }, + { + "kind": "func", + "name": "BillingAddressCountry", + "signature": "func BillingAddressCountry(v models.CountryCode) predicate.Customer", + "line": 101 + }, + { + "kind": "func", + "name": "BillingAddressPostalCode", + "signature": "func BillingAddressPostalCode(v string) predicate.Customer", + "line": 107 + }, + { + "kind": "func", + "name": "BillingAddressState", + "signature": "func BillingAddressState(v string) predicate.Customer", + "line": 112 + }, + { + "kind": "func", + "name": "BillingAddressCity", + "signature": "func BillingAddressCity(v string) predicate.Customer", + "line": 117 + }, + { + "kind": "func", + "name": "BillingAddressLine1", + "signature": "func BillingAddressLine1(v string) predicate.Customer", + "line": 122 + }, + { + "kind": "func", + "name": "BillingAddressLine2", + "signature": "func BillingAddressLine2(v string) predicate.Customer", + "line": 127 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumber", + "signature": "func BillingAddressPhoneNumber(v string) predicate.Customer", + "line": 132 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Customer", + "line": 137 + }, + { + "kind": "func", + "name": "PrimaryEmail", + "signature": "func PrimaryEmail(v string) predicate.Customer", + "line": 142 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.Customer", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Customer", + "line": 153 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Customer", + "line": 158 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Customer", + "line": 163 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Customer", + "line": 168 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Customer", + "line": 173 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Customer", + "line": 178 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Customer", + "line": 183 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Customer", + "line": 188 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Customer", + "line": 193 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Customer", + "line": 198 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Customer", + "line": 203 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Customer", + "line": 208 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Customer", + "line": 213 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Customer", + "line": 218 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Customer", + "line": 223 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Customer", + "line": 228 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Customer", + "line": 233 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Customer", + "line": 238 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Customer", + "line": 243 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Customer", + "line": 248 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Customer", + "line": 253 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Customer", + "line": 258 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Customer", + "line": 263 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Customer", + "line": 268 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Customer", + "line": 273 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Customer", + "line": 278 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Customer", + "line": 283 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Customer", + "line": 288 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Customer", + "line": 293 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Customer", + "line": 298 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Customer", + "line": 303 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Customer", + "line": 308 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Customer", + "line": 313 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Customer", + "line": 318 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Customer", + "line": 323 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Customer", + "line": 328 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Customer", + "line": 333 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Customer", + "line": 338 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Customer", + "line": 343 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Customer", + "line": 348 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Customer", + "line": 353 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Customer", + "line": 358 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Customer", + "line": 363 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Customer", + "line": 368 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Customer", + "line": 373 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Customer", + "line": 378 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Customer", + "line": 383 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Customer", + "line": 388 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Customer", + "line": 393 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Customer", + "line": 398 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Customer", + "line": 403 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Customer", + "line": 408 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Customer", + "line": 413 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Customer", + "line": 418 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Customer", + "line": 423 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Customer", + "line": 428 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Customer", + "line": 433 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Customer", + "line": 438 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Customer", + "line": 443 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Customer", + "line": 448 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Customer", + "line": 453 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Customer", + "line": 458 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Customer", + "line": 463 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Customer", + "line": 468 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Customer", + "line": 473 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Customer", + "line": 478 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Customer", + "line": 483 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Customer", + "line": 488 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Customer", + "line": 493 + }, + { + "kind": "func", + "name": "BillingAddressCountryEQ", + "signature": "func BillingAddressCountryEQ(v models.CountryCode) predicate.Customer", + "line": 498 + }, + { + "kind": "func", + "name": "BillingAddressCountryNEQ", + "signature": "func BillingAddressCountryNEQ(v models.CountryCode) predicate.Customer", + "line": 504 + }, + { + "kind": "func", + "name": "BillingAddressCountryIn", + "signature": "func BillingAddressCountryIn(vs ...models.CountryCode) predicate.Customer", + "line": 510 + }, + { + "kind": "func", + "name": "BillingAddressCountryNotIn", + "signature": "func BillingAddressCountryNotIn(vs ...models.CountryCode) predicate.Customer", + "line": 519 + }, + { + "kind": "func", + "name": "BillingAddressCountryGT", + "signature": "func BillingAddressCountryGT(v models.CountryCode) predicate.Customer", + "line": 528 + }, + { + "kind": "func", + "name": "BillingAddressCountryGTE", + "signature": "func BillingAddressCountryGTE(v models.CountryCode) predicate.Customer", + "line": 534 + }, + { + "kind": "func", + "name": "BillingAddressCountryLT", + "signature": "func BillingAddressCountryLT(v models.CountryCode) predicate.Customer", + "line": 540 + }, + { + "kind": "func", + "name": "BillingAddressCountryLTE", + "signature": "func BillingAddressCountryLTE(v models.CountryCode) predicate.Customer", + "line": 546 + }, + { + "kind": "func", + "name": "BillingAddressCountryContains", + "signature": "func BillingAddressCountryContains(v models.CountryCode) predicate.Customer", + "line": 552 + }, + { + "kind": "func", + "name": "BillingAddressCountryHasPrefix", + "signature": "func BillingAddressCountryHasPrefix(v models.CountryCode) predicate.Customer", + "line": 558 + }, + { + "kind": "func", + "name": "BillingAddressCountryHasSuffix", + "signature": "func BillingAddressCountryHasSuffix(v models.CountryCode) predicate.Customer", + "line": 564 + }, + { + "kind": "func", + "name": "BillingAddressCountryIsNil", + "signature": "func BillingAddressCountryIsNil() predicate.Customer", + "line": 570 + }, + { + "kind": "func", + "name": "BillingAddressCountryNotNil", + "signature": "func BillingAddressCountryNotNil() predicate.Customer", + "line": 575 + }, + { + "kind": "func", + "name": "BillingAddressCountryEqualFold", + "signature": "func BillingAddressCountryEqualFold(v models.CountryCode) predicate.Customer", + "line": 580 + }, + { + "kind": "func", + "name": "BillingAddressCountryContainsFold", + "signature": "func BillingAddressCountryContainsFold(v models.CountryCode) predicate.Customer", + "line": 586 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeEQ", + "signature": "func BillingAddressPostalCodeEQ(v string) predicate.Customer", + "line": 592 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeNEQ", + "signature": "func BillingAddressPostalCodeNEQ(v string) predicate.Customer", + "line": 597 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeIn", + "signature": "func BillingAddressPostalCodeIn(vs ...string) predicate.Customer", + "line": 602 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeNotIn", + "signature": "func BillingAddressPostalCodeNotIn(vs ...string) predicate.Customer", + "line": 607 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeGT", + "signature": "func BillingAddressPostalCodeGT(v string) predicate.Customer", + "line": 612 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeGTE", + "signature": "func BillingAddressPostalCodeGTE(v string) predicate.Customer", + "line": 617 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeLT", + "signature": "func BillingAddressPostalCodeLT(v string) predicate.Customer", + "line": 622 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeLTE", + "signature": "func BillingAddressPostalCodeLTE(v string) predicate.Customer", + "line": 627 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeContains", + "signature": "func BillingAddressPostalCodeContains(v string) predicate.Customer", + "line": 632 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeHasPrefix", + "signature": "func BillingAddressPostalCodeHasPrefix(v string) predicate.Customer", + "line": 637 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeHasSuffix", + "signature": "func BillingAddressPostalCodeHasSuffix(v string) predicate.Customer", + "line": 642 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeIsNil", + "signature": "func BillingAddressPostalCodeIsNil() predicate.Customer", + "line": 647 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeNotNil", + "signature": "func BillingAddressPostalCodeNotNil() predicate.Customer", + "line": 652 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeEqualFold", + "signature": "func BillingAddressPostalCodeEqualFold(v string) predicate.Customer", + "line": 657 + }, + { + "kind": "func", + "name": "BillingAddressPostalCodeContainsFold", + "signature": "func BillingAddressPostalCodeContainsFold(v string) predicate.Customer", + "line": 662 + }, + { + "kind": "func", + "name": "BillingAddressStateEQ", + "signature": "func BillingAddressStateEQ(v string) predicate.Customer", + "line": 667 + }, + { + "kind": "func", + "name": "BillingAddressStateNEQ", + "signature": "func BillingAddressStateNEQ(v string) predicate.Customer", + "line": 672 + }, + { + "kind": "func", + "name": "BillingAddressStateIn", + "signature": "func BillingAddressStateIn(vs ...string) predicate.Customer", + "line": 677 + }, + { + "kind": "func", + "name": "BillingAddressStateNotIn", + "signature": "func BillingAddressStateNotIn(vs ...string) predicate.Customer", + "line": 682 + }, + { + "kind": "func", + "name": "BillingAddressStateGT", + "signature": "func BillingAddressStateGT(v string) predicate.Customer", + "line": 687 + }, + { + "kind": "func", + "name": "BillingAddressStateGTE", + "signature": "func BillingAddressStateGTE(v string) predicate.Customer", + "line": 692 + }, + { + "kind": "func", + "name": "BillingAddressStateLT", + "signature": "func BillingAddressStateLT(v string) predicate.Customer", + "line": 697 + }, + { + "kind": "func", + "name": "BillingAddressStateLTE", + "signature": "func BillingAddressStateLTE(v string) predicate.Customer", + "line": 702 + }, + { + "kind": "func", + "name": "BillingAddressStateContains", + "signature": "func BillingAddressStateContains(v string) predicate.Customer", + "line": 707 + }, + { + "kind": "func", + "name": "BillingAddressStateHasPrefix", + "signature": "func BillingAddressStateHasPrefix(v string) predicate.Customer", + "line": 712 + }, + { + "kind": "func", + "name": "BillingAddressStateHasSuffix", + "signature": "func BillingAddressStateHasSuffix(v string) predicate.Customer", + "line": 717 + }, + { + "kind": "func", + "name": "BillingAddressStateIsNil", + "signature": "func BillingAddressStateIsNil() predicate.Customer", + "line": 722 + }, + { + "kind": "func", + "name": "BillingAddressStateNotNil", + "signature": "func BillingAddressStateNotNil() predicate.Customer", + "line": 727 + }, + { + "kind": "func", + "name": "BillingAddressStateEqualFold", + "signature": "func BillingAddressStateEqualFold(v string) predicate.Customer", + "line": 732 + }, + { + "kind": "func", + "name": "BillingAddressStateContainsFold", + "signature": "func BillingAddressStateContainsFold(v string) predicate.Customer", + "line": 737 + }, + { + "kind": "func", + "name": "BillingAddressCityEQ", + "signature": "func BillingAddressCityEQ(v string) predicate.Customer", + "line": 742 + }, + { + "kind": "func", + "name": "BillingAddressCityNEQ", + "signature": "func BillingAddressCityNEQ(v string) predicate.Customer", + "line": 747 + }, + { + "kind": "func", + "name": "BillingAddressCityIn", + "signature": "func BillingAddressCityIn(vs ...string) predicate.Customer", + "line": 752 + }, + { + "kind": "func", + "name": "BillingAddressCityNotIn", + "signature": "func BillingAddressCityNotIn(vs ...string) predicate.Customer", + "line": 757 + }, + { + "kind": "func", + "name": "BillingAddressCityGT", + "signature": "func BillingAddressCityGT(v string) predicate.Customer", + "line": 762 + }, + { + "kind": "func", + "name": "BillingAddressCityGTE", + "signature": "func BillingAddressCityGTE(v string) predicate.Customer", + "line": 767 + }, + { + "kind": "func", + "name": "BillingAddressCityLT", + "signature": "func BillingAddressCityLT(v string) predicate.Customer", + "line": 772 + }, + { + "kind": "func", + "name": "BillingAddressCityLTE", + "signature": "func BillingAddressCityLTE(v string) predicate.Customer", + "line": 777 + }, + { + "kind": "func", + "name": "BillingAddressCityContains", + "signature": "func BillingAddressCityContains(v string) predicate.Customer", + "line": 782 + }, + { + "kind": "func", + "name": "BillingAddressCityHasPrefix", + "signature": "func BillingAddressCityHasPrefix(v string) predicate.Customer", + "line": 787 + }, + { + "kind": "func", + "name": "BillingAddressCityHasSuffix", + "signature": "func BillingAddressCityHasSuffix(v string) predicate.Customer", + "line": 792 + }, + { + "kind": "func", + "name": "BillingAddressCityIsNil", + "signature": "func BillingAddressCityIsNil() predicate.Customer", + "line": 797 + }, + { + "kind": "func", + "name": "BillingAddressCityNotNil", + "signature": "func BillingAddressCityNotNil() predicate.Customer", + "line": 802 + }, + { + "kind": "func", + "name": "BillingAddressCityEqualFold", + "signature": "func BillingAddressCityEqualFold(v string) predicate.Customer", + "line": 807 + }, + { + "kind": "func", + "name": "BillingAddressCityContainsFold", + "signature": "func BillingAddressCityContainsFold(v string) predicate.Customer", + "line": 812 + }, + { + "kind": "func", + "name": "BillingAddressLine1EQ", + "signature": "func BillingAddressLine1EQ(v string) predicate.Customer", + "line": 817 + }, + { + "kind": "func", + "name": "BillingAddressLine1NEQ", + "signature": "func BillingAddressLine1NEQ(v string) predicate.Customer", + "line": 822 + }, + { + "kind": "func", + "name": "BillingAddressLine1In", + "signature": "func BillingAddressLine1In(vs ...string) predicate.Customer", + "line": 827 + }, + { + "kind": "func", + "name": "BillingAddressLine1NotIn", + "signature": "func BillingAddressLine1NotIn(vs ...string) predicate.Customer", + "line": 832 + }, + { + "kind": "func", + "name": "BillingAddressLine1GT", + "signature": "func BillingAddressLine1GT(v string) predicate.Customer", + "line": 837 + }, + { + "kind": "func", + "name": "BillingAddressLine1GTE", + "signature": "func BillingAddressLine1GTE(v string) predicate.Customer", + "line": 842 + }, + { + "kind": "func", + "name": "BillingAddressLine1LT", + "signature": "func BillingAddressLine1LT(v string) predicate.Customer", + "line": 847 + }, + { + "kind": "func", + "name": "BillingAddressLine1LTE", + "signature": "func BillingAddressLine1LTE(v string) predicate.Customer", + "line": 852 + }, + { + "kind": "func", + "name": "BillingAddressLine1Contains", + "signature": "func BillingAddressLine1Contains(v string) predicate.Customer", + "line": 857 + }, + { + "kind": "func", + "name": "BillingAddressLine1HasPrefix", + "signature": "func BillingAddressLine1HasPrefix(v string) predicate.Customer", + "line": 862 + }, + { + "kind": "func", + "name": "BillingAddressLine1HasSuffix", + "signature": "func BillingAddressLine1HasSuffix(v string) predicate.Customer", + "line": 867 + }, + { + "kind": "func", + "name": "BillingAddressLine1IsNil", + "signature": "func BillingAddressLine1IsNil() predicate.Customer", + "line": 872 + }, + { + "kind": "func", + "name": "BillingAddressLine1NotNil", + "signature": "func BillingAddressLine1NotNil() predicate.Customer", + "line": 877 + }, + { + "kind": "func", + "name": "BillingAddressLine1EqualFold", + "signature": "func BillingAddressLine1EqualFold(v string) predicate.Customer", + "line": 882 + }, + { + "kind": "func", + "name": "BillingAddressLine1ContainsFold", + "signature": "func BillingAddressLine1ContainsFold(v string) predicate.Customer", + "line": 887 + }, + { + "kind": "func", + "name": "BillingAddressLine2EQ", + "signature": "func BillingAddressLine2EQ(v string) predicate.Customer", + "line": 892 + }, + { + "kind": "func", + "name": "BillingAddressLine2NEQ", + "signature": "func BillingAddressLine2NEQ(v string) predicate.Customer", + "line": 897 + }, + { + "kind": "func", + "name": "BillingAddressLine2In", + "signature": "func BillingAddressLine2In(vs ...string) predicate.Customer", + "line": 902 + }, + { + "kind": "func", + "name": "BillingAddressLine2NotIn", + "signature": "func BillingAddressLine2NotIn(vs ...string) predicate.Customer", + "line": 907 + }, + { + "kind": "func", + "name": "BillingAddressLine2GT", + "signature": "func BillingAddressLine2GT(v string) predicate.Customer", + "line": 912 + }, + { + "kind": "func", + "name": "BillingAddressLine2GTE", + "signature": "func BillingAddressLine2GTE(v string) predicate.Customer", + "line": 917 + }, + { + "kind": "func", + "name": "BillingAddressLine2LT", + "signature": "func BillingAddressLine2LT(v string) predicate.Customer", + "line": 922 + }, + { + "kind": "func", + "name": "BillingAddressLine2LTE", + "signature": "func BillingAddressLine2LTE(v string) predicate.Customer", + "line": 927 + }, + { + "kind": "func", + "name": "BillingAddressLine2Contains", + "signature": "func BillingAddressLine2Contains(v string) predicate.Customer", + "line": 932 + }, + { + "kind": "func", + "name": "BillingAddressLine2HasPrefix", + "signature": "func BillingAddressLine2HasPrefix(v string) predicate.Customer", + "line": 937 + }, + { + "kind": "func", + "name": "BillingAddressLine2HasSuffix", + "signature": "func BillingAddressLine2HasSuffix(v string) predicate.Customer", + "line": 942 + }, + { + "kind": "func", + "name": "BillingAddressLine2IsNil", + "signature": "func BillingAddressLine2IsNil() predicate.Customer", + "line": 947 + }, + { + "kind": "func", + "name": "BillingAddressLine2NotNil", + "signature": "func BillingAddressLine2NotNil() predicate.Customer", + "line": 952 + }, + { + "kind": "func", + "name": "BillingAddressLine2EqualFold", + "signature": "func BillingAddressLine2EqualFold(v string) predicate.Customer", + "line": 957 + }, + { + "kind": "func", + "name": "BillingAddressLine2ContainsFold", + "signature": "func BillingAddressLine2ContainsFold(v string) predicate.Customer", + "line": 962 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberEQ", + "signature": "func BillingAddressPhoneNumberEQ(v string) predicate.Customer", + "line": 967 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberNEQ", + "signature": "func BillingAddressPhoneNumberNEQ(v string) predicate.Customer", + "line": 972 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberIn", + "signature": "func BillingAddressPhoneNumberIn(vs ...string) predicate.Customer", + "line": 977 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberNotIn", + "signature": "func BillingAddressPhoneNumberNotIn(vs ...string) predicate.Customer", + "line": 982 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberGT", + "signature": "func BillingAddressPhoneNumberGT(v string) predicate.Customer", + "line": 987 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberGTE", + "signature": "func BillingAddressPhoneNumberGTE(v string) predicate.Customer", + "line": 992 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberLT", + "signature": "func BillingAddressPhoneNumberLT(v string) predicate.Customer", + "line": 997 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberLTE", + "signature": "func BillingAddressPhoneNumberLTE(v string) predicate.Customer", + "line": 1002 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberContains", + "signature": "func BillingAddressPhoneNumberContains(v string) predicate.Customer", + "line": 1007 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberHasPrefix", + "signature": "func BillingAddressPhoneNumberHasPrefix(v string) predicate.Customer", + "line": 1012 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberHasSuffix", + "signature": "func BillingAddressPhoneNumberHasSuffix(v string) predicate.Customer", + "line": 1017 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberIsNil", + "signature": "func BillingAddressPhoneNumberIsNil() predicate.Customer", + "line": 1022 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberNotNil", + "signature": "func BillingAddressPhoneNumberNotNil() predicate.Customer", + "line": 1027 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberEqualFold", + "signature": "func BillingAddressPhoneNumberEqualFold(v string) predicate.Customer", + "line": 1032 + }, + { + "kind": "func", + "name": "BillingAddressPhoneNumberContainsFold", + "signature": "func BillingAddressPhoneNumberContainsFold(v string) predicate.Customer", + "line": 1037 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Customer", + "line": 1042 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Customer", + "line": 1047 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Customer", + "line": 1052 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Customer", + "line": 1057 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Customer", + "line": 1062 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Customer", + "line": 1067 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Customer", + "line": 1072 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Customer", + "line": 1077 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Customer", + "line": 1082 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Customer", + "line": 1087 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Customer", + "line": 1092 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Customer", + "line": 1097 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Customer", + "line": 1102 + }, + { + "kind": "func", + "name": "KeyIsNil", + "signature": "func KeyIsNil() predicate.Customer", + "line": 1107 + }, + { + "kind": "func", + "name": "KeyNotNil", + "signature": "func KeyNotNil() predicate.Customer", + "line": 1112 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Customer", + "line": 1117 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Customer", + "line": 1122 + }, + { + "kind": "func", + "name": "PrimaryEmailEQ", + "signature": "func PrimaryEmailEQ(v string) predicate.Customer", + "line": 1127 + }, + { + "kind": "func", + "name": "PrimaryEmailNEQ", + "signature": "func PrimaryEmailNEQ(v string) predicate.Customer", + "line": 1132 + }, + { + "kind": "func", + "name": "PrimaryEmailIn", + "signature": "func PrimaryEmailIn(vs ...string) predicate.Customer", + "line": 1137 + }, + { + "kind": "func", + "name": "PrimaryEmailNotIn", + "signature": "func PrimaryEmailNotIn(vs ...string) predicate.Customer", + "line": 1142 + }, + { + "kind": "func", + "name": "PrimaryEmailGT", + "signature": "func PrimaryEmailGT(v string) predicate.Customer", + "line": 1147 + }, + { + "kind": "func", + "name": "PrimaryEmailGTE", + "signature": "func PrimaryEmailGTE(v string) predicate.Customer", + "line": 1152 + }, + { + "kind": "func", + "name": "PrimaryEmailLT", + "signature": "func PrimaryEmailLT(v string) predicate.Customer", + "line": 1157 + }, + { + "kind": "func", + "name": "PrimaryEmailLTE", + "signature": "func PrimaryEmailLTE(v string) predicate.Customer", + "line": 1162 + }, + { + "kind": "func", + "name": "PrimaryEmailContains", + "signature": "func PrimaryEmailContains(v string) predicate.Customer", + "line": 1167 + }, + { + "kind": "func", + "name": "PrimaryEmailHasPrefix", + "signature": "func PrimaryEmailHasPrefix(v string) predicate.Customer", + "line": 1172 + }, + { + "kind": "func", + "name": "PrimaryEmailHasSuffix", + "signature": "func PrimaryEmailHasSuffix(v string) predicate.Customer", + "line": 1177 + }, + { + "kind": "func", + "name": "PrimaryEmailIsNil", + "signature": "func PrimaryEmailIsNil() predicate.Customer", + "line": 1182 + }, + { + "kind": "func", + "name": "PrimaryEmailNotNil", + "signature": "func PrimaryEmailNotNil() predicate.Customer", + "line": 1187 + }, + { + "kind": "func", + "name": "PrimaryEmailEqualFold", + "signature": "func PrimaryEmailEqualFold(v string) predicate.Customer", + "line": 1192 + }, + { + "kind": "func", + "name": "PrimaryEmailContainsFold", + "signature": "func PrimaryEmailContainsFold(v string) predicate.Customer", + "line": 1197 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.Customer", + "line": 1202 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.Customer", + "line": 1208 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.Customer", + "line": 1214 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.Customer", + "line": 1223 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.Customer", + "line": 1232 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.Customer", + "line": 1238 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.Customer", + "line": 1244 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.Customer", + "line": 1250 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.Customer", + "line": 1256 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.Customer", + "line": 1262 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.Customer", + "line": 1268 + }, + { + "kind": "func", + "name": "CurrencyIsNil", + "signature": "func CurrencyIsNil() predicate.Customer", + "line": 1274 + }, + { + "kind": "func", + "name": "CurrencyNotNil", + "signature": "func CurrencyNotNil() predicate.Customer", + "line": 1279 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.Customer", + "line": 1284 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.Customer", + "line": 1290 + }, + { + "kind": "func", + "name": "HasApps", + "signature": "func HasApps() predicate.Customer", + "line": 1296 + }, + { + "kind": "func", + "name": "HasAppsWith", + "signature": "func HasAppsWith(preds ...predicate.AppCustomer) predicate.Customer", + "line": 1307 + }, + { + "kind": "func", + "name": "HasSubjects", + "signature": "func HasSubjects() predicate.Customer", + "line": 1319 + }, + { + "kind": "func", + "name": "HasSubjectsWith", + "signature": "func HasSubjectsWith(preds ...predicate.CustomerSubjects) predicate.Customer", + "line": 1330 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverride", + "signature": "func HasBillingCustomerOverride() predicate.Customer", + "line": 1342 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverrideWith", + "signature": "func HasBillingCustomerOverrideWith(preds ...predicate.BillingCustomerOverride) predicate.Customer", + "line": 1353 + }, + { + "kind": "func", + "name": "HasBillingInvoice", + "signature": "func HasBillingInvoice() predicate.Customer", + "line": 1365 + }, + { + "kind": "func", + "name": "HasBillingInvoiceWith", + "signature": "func HasBillingInvoiceWith(preds ...predicate.BillingInvoice) predicate.Customer", + "line": 1376 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.Customer", + "line": 1388 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.Customer", + "line": 1399 + }, + { + "kind": "func", + "name": "HasEntitlements", + "signature": "func HasEntitlements() predicate.Customer", + "line": 1411 + }, + { + "kind": "func", + "name": "HasEntitlementsWith", + "signature": "func HasEntitlementsWith(preds ...predicate.Entitlement) predicate.Customer", + "line": 1422 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchase", + "signature": "func HasChargesCreditPurchase() predicate.Customer", + "line": 1434 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchaseWith", + "signature": "func HasChargesCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.Customer", + "line": 1445 + }, + { + "kind": "func", + "name": "HasChargesFlatFee", + "signature": "func HasChargesFlatFee() predicate.Customer", + "line": 1457 + }, + { + "kind": "func", + "name": "HasChargesFlatFeeWith", + "signature": "func HasChargesFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.Customer", + "line": 1468 + }, + { + "kind": "func", + "name": "HasChargesUsageBased", + "signature": "func HasChargesUsageBased() predicate.Customer", + "line": 1480 + }, + { + "kind": "func", + "name": "HasChargesUsageBasedWith", + "signature": "func HasChargesUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.Customer", + "line": 1491 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Customer) predicate.Customer", + "line": 1503 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Customer) predicate.Customer", + "line": 1508 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Customer) predicate.Customer", + "line": 1513 + } + ], + "line_count": 1515 + }, + "openmeter/ent/db/customer_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerCreate", + "signature": "type CustomerCreate struct", + "line": 30 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *CustomerCreate) SetNamespace(v string) *CustomerCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *CustomerCreate) SetMetadata(v map[string]string) *CustomerCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CustomerCreate) SetCreatedAt(v time.Time) *CustomerCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CustomerCreate) SetNillableCreatedAt(v *time.Time) *CustomerCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *CustomerCreate) SetUpdatedAt(v time.Time) *CustomerCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *CustomerCreate) SetNillableUpdatedAt(v *time.Time) *CustomerCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *CustomerCreate) SetDeletedAt(v time.Time) *CustomerCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *CustomerCreate) SetNillableDeletedAt(v *time.Time) *CustomerCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *CustomerCreate) SetName(v string) *CustomerCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *CustomerCreate) SetDescription(v string) *CustomerCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *CustomerCreate) SetNillableDescription(v *string) *CustomerCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (_c *CustomerCreate) SetBillingAddressCountry(v models.CountryCode) *CustomerCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCountry", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressCountry(v *models.CountryCode) *CustomerCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (_c *CustomerCreate) SetBillingAddressPostalCode(v string) *CustomerCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPostalCode", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressPostalCode(v *string) *CustomerCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (_c *CustomerCreate) SetBillingAddressState(v string) *CustomerCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressState", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressState(v *string) *CustomerCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (_c *CustomerCreate) SetBillingAddressCity(v string) *CustomerCreate", + "line": 154 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCity", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressCity(v *string) *CustomerCreate", + "line": 160 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (_c *CustomerCreate) SetBillingAddressLine1(v string) *CustomerCreate", + "line": 168 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine1", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressLine1(v *string) *CustomerCreate", + "line": 174 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (_c *CustomerCreate) SetBillingAddressLine2(v string) *CustomerCreate", + "line": 182 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine2", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressLine2(v *string) *CustomerCreate", + "line": 188 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (_c *CustomerCreate) SetBillingAddressPhoneNumber(v string) *CustomerCreate", + "line": 196 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPhoneNumber", + "signature": "func (_c *CustomerCreate) SetNillableBillingAddressPhoneNumber(v *string) *CustomerCreate", + "line": 202 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *CustomerCreate) SetAnnotations(v models.Annotations) *CustomerCreate", + "line": 210 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *CustomerCreate) SetKey(v string) *CustomerCreate", + "line": 216 + }, + { + "kind": "func", + "name": "SetNillableKey", + "signature": "func (_c *CustomerCreate) SetNillableKey(v *string) *CustomerCreate", + "line": 222 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (_c *CustomerCreate) SetPrimaryEmail(v string) *CustomerCreate", + "line": 230 + }, + { + "kind": "func", + "name": "SetNillablePrimaryEmail", + "signature": "func (_c *CustomerCreate) SetNillablePrimaryEmail(v *string) *CustomerCreate", + "line": 236 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *CustomerCreate) SetCurrency(v currencyx.Code) *CustomerCreate", + "line": 244 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_c *CustomerCreate) SetNillableCurrency(v *currencyx.Code) *CustomerCreate", + "line": 250 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *CustomerCreate) SetID(v string) *CustomerCreate", + "line": 258 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *CustomerCreate) SetNillableID(v *string) *CustomerCreate", + "line": 264 + }, + { + "kind": "func", + "name": "AddAppIDs", + "signature": "func (_c *CustomerCreate) AddAppIDs(ids ...int) *CustomerCreate", + "line": 272 + }, + { + "kind": "func", + "name": "AddApps", + "signature": "func (_c *CustomerCreate) AddApps(v ...*AppCustomer) *CustomerCreate", + "line": 278 + }, + { + "kind": "func", + "name": "AddSubjectIDs", + "signature": "func (_c *CustomerCreate) AddSubjectIDs(ids ...int) *CustomerCreate", + "line": 287 + }, + { + "kind": "func", + "name": "AddSubjects", + "signature": "func (_c *CustomerCreate) AddSubjects(v ...*CustomerSubjects) *CustomerCreate", + "line": 293 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverrideID", + "signature": "func (_c *CustomerCreate) SetBillingCustomerOverrideID(id string) *CustomerCreate", + "line": 302 + }, + { + "kind": "func", + "name": "SetNillableBillingCustomerOverrideID", + "signature": "func (_c *CustomerCreate) SetNillableBillingCustomerOverrideID(id *string) *CustomerCreate", + "line": 308 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverride", + "signature": "func (_c *CustomerCreate) SetBillingCustomerOverride(v *BillingCustomerOverride) *CustomerCreate", + "line": 316 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_c *CustomerCreate) AddBillingInvoiceIDs(ids ...string) *CustomerCreate", + "line": 321 + }, + { + "kind": "func", + "name": "AddBillingInvoice", + "signature": "func (_c *CustomerCreate) AddBillingInvoice(v ...*BillingInvoice) *CustomerCreate", + "line": 327 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_c *CustomerCreate) AddSubscriptionIDs(ids ...string) *CustomerCreate", + "line": 336 + }, + { + "kind": "func", + "name": "AddSubscription", + "signature": "func (_c *CustomerCreate) AddSubscription(v ...*Subscription) *CustomerCreate", + "line": 342 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_c *CustomerCreate) AddEntitlementIDs(ids ...string) *CustomerCreate", + "line": 351 + }, + { + "kind": "func", + "name": "AddEntitlements", + "signature": "func (_c *CustomerCreate) AddEntitlements(v ...*Entitlement) *CustomerCreate", + "line": 357 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_c *CustomerCreate) AddChargesCreditPurchaseIDs(ids ...string) *CustomerCreate", + "line": 366 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_c *CustomerCreate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *CustomerCreate", + "line": 372 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_c *CustomerCreate) AddChargesFlatFeeIDs(ids ...string) *CustomerCreate", + "line": 381 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_c *CustomerCreate) AddChargesFlatFee(v ...*ChargeFlatFee) *CustomerCreate", + "line": 387 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_c *CustomerCreate) AddChargesUsageBasedIDs(ids ...string) *CustomerCreate", + "line": 396 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_c *CustomerCreate) AddChargesUsageBased(v ...*ChargeUsageBased) *CustomerCreate", + "line": 402 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CustomerCreate) Mutation() *CustomerMutation", + "line": 411 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomerCreate) Save(ctx context.Context) (*Customer, error)", + "line": 416 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomerCreate) SaveX(ctx context.Context) *Customer", + "line": 422 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomerCreate) Exec(ctx context.Context) error", + "line": 431 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomerCreate) ExecX(ctx context.Context)", + "line": 437 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CustomerCreate) defaults()", + "line": 444 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CustomerCreate) check() error", + "line": 460 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CustomerCreate) sqlSave(ctx context.Context) (*Customer, error)", + "line": 491 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CustomerCreate) createSpec() (*Customer, *sqlgraph.CreateSpec)", + "line": 514 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomerCreate) OnConflict(opts ...sql.ConflictOption) *CustomerUpsertOne", + "line": 759 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomerCreate) OnConflictColumns(columns ...string) *CustomerUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *CustomerUpsert) SetMetadata(v map[string]string) *CustomerUpsert", + "line": 793 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *CustomerUpsert) UpdateMetadata() *CustomerUpsert", + "line": 799 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *CustomerUpsert) ClearMetadata() *CustomerUpsert", + "line": 805 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomerUpsert) SetUpdatedAt(v time.Time) *CustomerUpsert", + "line": 811 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomerUpsert) UpdateUpdatedAt() *CustomerUpsert", + "line": 817 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerUpsert) SetDeletedAt(v time.Time) *CustomerUpsert", + "line": 823 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerUpsert) UpdateDeletedAt() *CustomerUpsert", + "line": 829 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerUpsert) ClearDeletedAt() *CustomerUpsert", + "line": 835 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomerUpsert) SetName(v string) *CustomerUpsert", + "line": 841 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomerUpsert) UpdateName() *CustomerUpsert", + "line": 847 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *CustomerUpsert) SetDescription(v string) *CustomerUpsert", + "line": 853 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *CustomerUpsert) UpdateDescription() *CustomerUpsert", + "line": 859 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *CustomerUpsert) ClearDescription() *CustomerUpsert", + "line": 865 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (u *CustomerUpsert) SetBillingAddressCountry(v models.CountryCode) *CustomerUpsert", + "line": 871 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCountry", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressCountry() *CustomerUpsert", + "line": 877 + }, + { + "kind": "func", + "name": "ClearBillingAddressCountry", + "signature": "func (u *CustomerUpsert) ClearBillingAddressCountry() *CustomerUpsert", + "line": 883 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (u *CustomerUpsert) SetBillingAddressPostalCode(v string) *CustomerUpsert", + "line": 889 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPostalCode", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressPostalCode() *CustomerUpsert", + "line": 895 + }, + { + "kind": "func", + "name": "ClearBillingAddressPostalCode", + "signature": "func (u *CustomerUpsert) ClearBillingAddressPostalCode() *CustomerUpsert", + "line": 901 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (u *CustomerUpsert) SetBillingAddressState(v string) *CustomerUpsert", + "line": 907 + }, + { + "kind": "func", + "name": "UpdateBillingAddressState", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressState() *CustomerUpsert", + "line": 913 + }, + { + "kind": "func", + "name": "ClearBillingAddressState", + "signature": "func (u *CustomerUpsert) ClearBillingAddressState() *CustomerUpsert", + "line": 919 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (u *CustomerUpsert) SetBillingAddressCity(v string) *CustomerUpsert", + "line": 925 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCity", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressCity() *CustomerUpsert", + "line": 931 + }, + { + "kind": "func", + "name": "ClearBillingAddressCity", + "signature": "func (u *CustomerUpsert) ClearBillingAddressCity() *CustomerUpsert", + "line": 937 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (u *CustomerUpsert) SetBillingAddressLine1(v string) *CustomerUpsert", + "line": 943 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine1", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressLine1() *CustomerUpsert", + "line": 949 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine1", + "signature": "func (u *CustomerUpsert) ClearBillingAddressLine1() *CustomerUpsert", + "line": 955 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (u *CustomerUpsert) SetBillingAddressLine2(v string) *CustomerUpsert", + "line": 961 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine2", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressLine2() *CustomerUpsert", + "line": 967 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine2", + "signature": "func (u *CustomerUpsert) ClearBillingAddressLine2() *CustomerUpsert", + "line": 973 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsert) SetBillingAddressPhoneNumber(v string) *CustomerUpsert", + "line": 979 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsert) UpdateBillingAddressPhoneNumber() *CustomerUpsert", + "line": 985 + }, + { + "kind": "func", + "name": "ClearBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsert) ClearBillingAddressPhoneNumber() *CustomerUpsert", + "line": 991 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *CustomerUpsert) SetAnnotations(v models.Annotations) *CustomerUpsert", + "line": 997 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *CustomerUpsert) UpdateAnnotations() *CustomerUpsert", + "line": 1003 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *CustomerUpsert) ClearAnnotations() *CustomerUpsert", + "line": 1009 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *CustomerUpsert) SetKey(v string) *CustomerUpsert", + "line": 1015 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *CustomerUpsert) UpdateKey() *CustomerUpsert", + "line": 1021 + }, + { + "kind": "func", + "name": "ClearKey", + "signature": "func (u *CustomerUpsert) ClearKey() *CustomerUpsert", + "line": 1027 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (u *CustomerUpsert) SetPrimaryEmail(v string) *CustomerUpsert", + "line": 1033 + }, + { + "kind": "func", + "name": "UpdatePrimaryEmail", + "signature": "func (u *CustomerUpsert) UpdatePrimaryEmail() *CustomerUpsert", + "line": 1039 + }, + { + "kind": "func", + "name": "ClearPrimaryEmail", + "signature": "func (u *CustomerUpsert) ClearPrimaryEmail() *CustomerUpsert", + "line": 1045 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *CustomerUpsert) SetCurrency(v currencyx.Code) *CustomerUpsert", + "line": 1051 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *CustomerUpsert) UpdateCurrency() *CustomerUpsert", + "line": 1057 + }, + { + "kind": "func", + "name": "ClearCurrency", + "signature": "func (u *CustomerUpsert) ClearCurrency() *CustomerUpsert", + "line": 1063 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomerUpsertOne) UpdateNewValues() *CustomerUpsertOne", + "line": 1079 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomerUpsertOne) Ignore() *CustomerUpsertOne", + "line": 1101 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomerUpsertOne) DoNothing() *CustomerUpsertOne", + "line": 1108 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomerUpsertOne) Update(set func(*CustomerUpsert)) *CustomerUpsertOne", + "line": 1115 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *CustomerUpsertOne) SetMetadata(v map[string]string) *CustomerUpsertOne", + "line": 1123 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *CustomerUpsertOne) UpdateMetadata() *CustomerUpsertOne", + "line": 1130 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *CustomerUpsertOne) ClearMetadata() *CustomerUpsertOne", + "line": 1137 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomerUpsertOne) SetUpdatedAt(v time.Time) *CustomerUpsertOne", + "line": 1144 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomerUpsertOne) UpdateUpdatedAt() *CustomerUpsertOne", + "line": 1151 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerUpsertOne) SetDeletedAt(v time.Time) *CustomerUpsertOne", + "line": 1158 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerUpsertOne) UpdateDeletedAt() *CustomerUpsertOne", + "line": 1165 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerUpsertOne) ClearDeletedAt() *CustomerUpsertOne", + "line": 1172 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomerUpsertOne) SetName(v string) *CustomerUpsertOne", + "line": 1179 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomerUpsertOne) UpdateName() *CustomerUpsertOne", + "line": 1186 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *CustomerUpsertOne) SetDescription(v string) *CustomerUpsertOne", + "line": 1193 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *CustomerUpsertOne) UpdateDescription() *CustomerUpsertOne", + "line": 1200 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *CustomerUpsertOne) ClearDescription() *CustomerUpsertOne", + "line": 1207 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressCountry(v models.CountryCode) *CustomerUpsertOne", + "line": 1214 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCountry", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressCountry() *CustomerUpsertOne", + "line": 1221 + }, + { + "kind": "func", + "name": "ClearBillingAddressCountry", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressCountry() *CustomerUpsertOne", + "line": 1228 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressPostalCode(v string) *CustomerUpsertOne", + "line": 1235 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressPostalCode() *CustomerUpsertOne", + "line": 1242 + }, + { + "kind": "func", + "name": "ClearBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressPostalCode() *CustomerUpsertOne", + "line": 1249 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressState(v string) *CustomerUpsertOne", + "line": 1256 + }, + { + "kind": "func", + "name": "UpdateBillingAddressState", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressState() *CustomerUpsertOne", + "line": 1263 + }, + { + "kind": "func", + "name": "ClearBillingAddressState", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressState() *CustomerUpsertOne", + "line": 1270 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressCity(v string) *CustomerUpsertOne", + "line": 1277 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCity", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressCity() *CustomerUpsertOne", + "line": 1284 + }, + { + "kind": "func", + "name": "ClearBillingAddressCity", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressCity() *CustomerUpsertOne", + "line": 1291 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressLine1(v string) *CustomerUpsertOne", + "line": 1298 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine1", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressLine1() *CustomerUpsertOne", + "line": 1305 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine1", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressLine1() *CustomerUpsertOne", + "line": 1312 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressLine2(v string) *CustomerUpsertOne", + "line": 1319 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine2", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressLine2() *CustomerUpsertOne", + "line": 1326 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine2", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressLine2() *CustomerUpsertOne", + "line": 1333 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertOne) SetBillingAddressPhoneNumber(v string) *CustomerUpsertOne", + "line": 1340 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertOne) UpdateBillingAddressPhoneNumber() *CustomerUpsertOne", + "line": 1347 + }, + { + "kind": "func", + "name": "ClearBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertOne) ClearBillingAddressPhoneNumber() *CustomerUpsertOne", + "line": 1354 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *CustomerUpsertOne) SetAnnotations(v models.Annotations) *CustomerUpsertOne", + "line": 1361 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *CustomerUpsertOne) UpdateAnnotations() *CustomerUpsertOne", + "line": 1368 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *CustomerUpsertOne) ClearAnnotations() *CustomerUpsertOne", + "line": 1375 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *CustomerUpsertOne) SetKey(v string) *CustomerUpsertOne", + "line": 1382 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *CustomerUpsertOne) UpdateKey() *CustomerUpsertOne", + "line": 1389 + }, + { + "kind": "func", + "name": "ClearKey", + "signature": "func (u *CustomerUpsertOne) ClearKey() *CustomerUpsertOne", + "line": 1396 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (u *CustomerUpsertOne) SetPrimaryEmail(v string) *CustomerUpsertOne", + "line": 1403 + }, + { + "kind": "func", + "name": "UpdatePrimaryEmail", + "signature": "func (u *CustomerUpsertOne) UpdatePrimaryEmail() *CustomerUpsertOne", + "line": 1410 + }, + { + "kind": "func", + "name": "ClearPrimaryEmail", + "signature": "func (u *CustomerUpsertOne) ClearPrimaryEmail() *CustomerUpsertOne", + "line": 1417 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *CustomerUpsertOne) SetCurrency(v currencyx.Code) *CustomerUpsertOne", + "line": 1424 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *CustomerUpsertOne) UpdateCurrency() *CustomerUpsertOne", + "line": 1431 + }, + { + "kind": "func", + "name": "ClearCurrency", + "signature": "func (u *CustomerUpsertOne) ClearCurrency() *CustomerUpsertOne", + "line": 1438 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomerUpsertOne) Exec(ctx context.Context) error", + "line": 1445 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomerUpsertOne) ExecX(ctx context.Context)", + "line": 1453 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CustomerUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1460 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CustomerUpsertOne) IDX(ctx context.Context) string", + "line": 1474 + }, + { + "kind": "struct", + "name": "CustomerCreateBulk", + "signature": "type CustomerCreateBulk struct", + "line": 1483 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomerCreateBulk) Save(ctx context.Context) ([]*Customer, error)", + "line": 1491 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomerCreateBulk) SaveX(ctx context.Context) []*Customer", + "line": 1547 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomerCreateBulk) Exec(ctx context.Context) error", + "line": 1556 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomerCreateBulk) ExecX(ctx context.Context)", + "line": 1562 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomerCreateBulk) OnConflict(opts ...sql.ConflictOption) *CustomerUpsertBulk", + "line": 1583 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomerCreateBulk) OnConflictColumns(columns ...string) *CustomerUpsertBulk", + "line": 1596 + }, + { + "kind": "struct", + "name": "CustomerUpsertBulk", + "signature": "type CustomerUpsertBulk struct", + "line": 1605 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomerUpsertBulk) UpdateNewValues() *CustomerUpsertBulk", + "line": 1620 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomerUpsertBulk) Ignore() *CustomerUpsertBulk", + "line": 1644 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomerUpsertBulk) DoNothing() *CustomerUpsertBulk", + "line": 1651 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomerUpsertBulk) Update(set func(*CustomerUpsert)) *CustomerUpsertBulk", + "line": 1658 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *CustomerUpsertBulk) SetMetadata(v map[string]string) *CustomerUpsertBulk", + "line": 1666 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *CustomerUpsertBulk) UpdateMetadata() *CustomerUpsertBulk", + "line": 1673 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *CustomerUpsertBulk) ClearMetadata() *CustomerUpsertBulk", + "line": 1680 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *CustomerUpsertBulk) SetUpdatedAt(v time.Time) *CustomerUpsertBulk", + "line": 1687 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *CustomerUpsertBulk) UpdateUpdatedAt() *CustomerUpsertBulk", + "line": 1694 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerUpsertBulk) SetDeletedAt(v time.Time) *CustomerUpsertBulk", + "line": 1701 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerUpsertBulk) UpdateDeletedAt() *CustomerUpsertBulk", + "line": 1708 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerUpsertBulk) ClearDeletedAt() *CustomerUpsertBulk", + "line": 1715 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *CustomerUpsertBulk) SetName(v string) *CustomerUpsertBulk", + "line": 1722 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *CustomerUpsertBulk) UpdateName() *CustomerUpsertBulk", + "line": 1729 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *CustomerUpsertBulk) SetDescription(v string) *CustomerUpsertBulk", + "line": 1736 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *CustomerUpsertBulk) UpdateDescription() *CustomerUpsertBulk", + "line": 1743 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *CustomerUpsertBulk) ClearDescription() *CustomerUpsertBulk", + "line": 1750 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressCountry(v models.CountryCode) *CustomerUpsertBulk", + "line": 1757 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCountry", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressCountry() *CustomerUpsertBulk", + "line": 1764 + }, + { + "kind": "func", + "name": "ClearBillingAddressCountry", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressCountry() *CustomerUpsertBulk", + "line": 1771 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressPostalCode(v string) *CustomerUpsertBulk", + "line": 1778 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressPostalCode() *CustomerUpsertBulk", + "line": 1785 + }, + { + "kind": "func", + "name": "ClearBillingAddressPostalCode", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressPostalCode() *CustomerUpsertBulk", + "line": 1792 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressState(v string) *CustomerUpsertBulk", + "line": 1799 + }, + { + "kind": "func", + "name": "UpdateBillingAddressState", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressState() *CustomerUpsertBulk", + "line": 1806 + }, + { + "kind": "func", + "name": "ClearBillingAddressState", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressState() *CustomerUpsertBulk", + "line": 1813 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressCity(v string) *CustomerUpsertBulk", + "line": 1820 + }, + { + "kind": "func", + "name": "UpdateBillingAddressCity", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressCity() *CustomerUpsertBulk", + "line": 1827 + }, + { + "kind": "func", + "name": "ClearBillingAddressCity", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressCity() *CustomerUpsertBulk", + "line": 1834 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressLine1(v string) *CustomerUpsertBulk", + "line": 1841 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine1", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressLine1() *CustomerUpsertBulk", + "line": 1848 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine1", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressLine1() *CustomerUpsertBulk", + "line": 1855 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressLine2(v string) *CustomerUpsertBulk", + "line": 1862 + }, + { + "kind": "func", + "name": "UpdateBillingAddressLine2", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressLine2() *CustomerUpsertBulk", + "line": 1869 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine2", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressLine2() *CustomerUpsertBulk", + "line": 1876 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertBulk) SetBillingAddressPhoneNumber(v string) *CustomerUpsertBulk", + "line": 1883 + }, + { + "kind": "func", + "name": "UpdateBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertBulk) UpdateBillingAddressPhoneNumber() *CustomerUpsertBulk", + "line": 1890 + }, + { + "kind": "func", + "name": "ClearBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpsertBulk) ClearBillingAddressPhoneNumber() *CustomerUpsertBulk", + "line": 1897 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *CustomerUpsertBulk) SetAnnotations(v models.Annotations) *CustomerUpsertBulk", + "line": 1904 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *CustomerUpsertBulk) UpdateAnnotations() *CustomerUpsertBulk", + "line": 1911 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *CustomerUpsertBulk) ClearAnnotations() *CustomerUpsertBulk", + "line": 1918 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *CustomerUpsertBulk) SetKey(v string) *CustomerUpsertBulk", + "line": 1925 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *CustomerUpsertBulk) UpdateKey() *CustomerUpsertBulk", + "line": 1932 + }, + { + "kind": "func", + "name": "ClearKey", + "signature": "func (u *CustomerUpsertBulk) ClearKey() *CustomerUpsertBulk", + "line": 1939 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (u *CustomerUpsertBulk) SetPrimaryEmail(v string) *CustomerUpsertBulk", + "line": 1946 + }, + { + "kind": "func", + "name": "UpdatePrimaryEmail", + "signature": "func (u *CustomerUpsertBulk) UpdatePrimaryEmail() *CustomerUpsertBulk", + "line": 1953 + }, + { + "kind": "func", + "name": "ClearPrimaryEmail", + "signature": "func (u *CustomerUpsertBulk) ClearPrimaryEmail() *CustomerUpsertBulk", + "line": 1960 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *CustomerUpsertBulk) SetCurrency(v currencyx.Code) *CustomerUpsertBulk", + "line": 1967 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *CustomerUpsertBulk) UpdateCurrency() *CustomerUpsertBulk", + "line": 1974 + }, + { + "kind": "func", + "name": "ClearCurrency", + "signature": "func (u *CustomerUpsertBulk) ClearCurrency() *CustomerUpsertBulk", + "line": 1981 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomerUpsertBulk) Exec(ctx context.Context) error", + "line": 1988 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomerUpsertBulk) ExecX(ctx context.Context)", + "line": 2004 + } + ], + "line_count": 2008 + }, + "openmeter/ent/db/customer_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerDelete", + "signature": "type CustomerDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomerDelete) Where(ps ...predicate.Customer) *CustomerDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomerDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomerDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CustomerDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CustomerDeleteOne", + "signature": "type CustomerDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomerDeleteOne) Where(ps ...predicate.Customer) *CustomerDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomerDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomerDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/customer_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerQuery", + "signature": "type CustomerQuery struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CustomerQuery) Where(ps ...predicate.Customer) *CustomerQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CustomerQuery) Limit(limit int) *CustomerQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CustomerQuery) Offset(offset int) *CustomerQuery", + "line": 64 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CustomerQuery) Unique(unique bool) *CustomerQuery", + "line": 71 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CustomerQuery) Order(o ...customer.OrderOption) *CustomerQuery", + "line": 77 + }, + { + "kind": "func", + "name": "QueryApps", + "signature": "func (_q *CustomerQuery) QueryApps() *AppCustomerQuery", + "line": 83 + }, + { + "kind": "func", + "name": "QuerySubjects", + "signature": "func (_q *CustomerQuery) QuerySubjects() *CustomerSubjectsQuery", + "line": 105 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverride", + "signature": "func (_q *CustomerQuery) QueryBillingCustomerOverride() *BillingCustomerOverrideQuery", + "line": 127 + }, + { + "kind": "func", + "name": "QueryBillingInvoice", + "signature": "func (_q *CustomerQuery) QueryBillingInvoice() *BillingInvoiceQuery", + "line": 149 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *CustomerQuery) QuerySubscription() *SubscriptionQuery", + "line": 171 + }, + { + "kind": "func", + "name": "QueryEntitlements", + "signature": "func (_q *CustomerQuery) QueryEntitlements() *EntitlementQuery", + "line": 193 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_q *CustomerQuery) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 215 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_q *CustomerQuery) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 237 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_q *CustomerQuery) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 259 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CustomerQuery) First(ctx context.Context) (*Customer, error)", + "line": 282 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CustomerQuery) FirstX(ctx context.Context) *Customer", + "line": 294 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CustomerQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 304 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CustomerQuery) FirstIDX(ctx context.Context) string", + "line": 317 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CustomerQuery) Only(ctx context.Context) (*Customer, error)", + "line": 328 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CustomerQuery) OnlyX(ctx context.Context) *Customer", + "line": 344 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CustomerQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 355 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CustomerQuery) OnlyIDX(ctx context.Context) string", + "line": 372 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CustomerQuery) All(ctx context.Context) ([]*Customer, error)", + "line": 381 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CustomerQuery) AllX(ctx context.Context) []*Customer", + "line": 391 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CustomerQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 400 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CustomerQuery) IDsX(ctx context.Context) []string", + "line": 412 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CustomerQuery) Count(ctx context.Context) (int, error)", + "line": 421 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CustomerQuery) CountX(ctx context.Context) int", + "line": 430 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CustomerQuery) Exist(ctx context.Context) (bool, error)", + "line": 439 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CustomerQuery) ExistX(ctx context.Context) bool", + "line": 452 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CustomerQuery) Clone() *CustomerQuery", + "line": 462 + }, + { + "kind": "func", + "name": "WithApps", + "signature": "func (_q *CustomerQuery) WithApps(opts ...func(*AppCustomerQuery)) *CustomerQuery", + "line": 489 + }, + { + "kind": "func", + "name": "WithSubjects", + "signature": "func (_q *CustomerQuery) WithSubjects(opts ...func(*CustomerSubjectsQuery)) *CustomerQuery", + "line": 500 + }, + { + "kind": "func", + "name": "WithBillingCustomerOverride", + "signature": "func (_q *CustomerQuery) WithBillingCustomerOverride(opts ...func(*BillingCustomerOverrideQuery)) *CustomerQuery", + "line": 511 + }, + { + "kind": "func", + "name": "WithBillingInvoice", + "signature": "func (_q *CustomerQuery) WithBillingInvoice(opts ...func(*BillingInvoiceQuery)) *CustomerQuery", + "line": 522 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *CustomerQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *CustomerQuery", + "line": 533 + }, + { + "kind": "func", + "name": "WithEntitlements", + "signature": "func (_q *CustomerQuery) WithEntitlements(opts ...func(*EntitlementQuery)) *CustomerQuery", + "line": 544 + }, + { + "kind": "func", + "name": "WithChargesCreditPurchase", + "signature": "func (_q *CustomerQuery) WithChargesCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *CustomerQuery", + "line": 555 + }, + { + "kind": "func", + "name": "WithChargesFlatFee", + "signature": "func (_q *CustomerQuery) WithChargesFlatFee(opts ...func(*ChargeFlatFeeQuery)) *CustomerQuery", + "line": 566 + }, + { + "kind": "func", + "name": "WithChargesUsageBased", + "signature": "func (_q *CustomerQuery) WithChargesUsageBased(opts ...func(*ChargeUsageBasedQuery)) *CustomerQuery", + "line": 577 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CustomerQuery) GroupBy(field string, fields ...string) *CustomerGroupBy", + "line": 600 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CustomerQuery) Select(fields ...string) *CustomerSelect", + "line": 621 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CustomerQuery) Aggregate(fns ...AggregateFunc) *CustomerSelect", + "line": 630 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CustomerQuery) prepareQuery(ctx context.Context) error", + "line": 634 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CustomerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Customer, error)", + "line": 660 + }, + { + "kind": "func", + "name": "loadApps", + "signature": "func (_q *CustomerQuery) loadApps(ctx context.Context, query *AppCustomerQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *AppCustomer)) error", + "line": 766 + }, + { + "kind": "func", + "name": "loadSubjects", + "signature": "func (_q *CustomerQuery) loadSubjects(ctx context.Context, query *CustomerSubjectsQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *CustomerSubjects)) error", + "line": 796 + }, + { + "kind": "func", + "name": "loadBillingCustomerOverride", + "signature": "func (_q *CustomerQuery) loadBillingCustomerOverride(ctx context.Context, query *BillingCustomerOverrideQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *BillingCustomerOverride)) error", + "line": 826 + }, + { + "kind": "func", + "name": "loadBillingInvoice", + "signature": "func (_q *CustomerQuery) loadBillingInvoice(ctx context.Context, query *BillingInvoiceQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *BillingInvoice)) error", + "line": 853 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *CustomerQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *Subscription)) error", + "line": 883 + }, + { + "kind": "func", + "name": "loadEntitlements", + "signature": "func (_q *CustomerQuery) loadEntitlements(ctx context.Context, query *EntitlementQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *Entitlement)) error", + "line": 913 + }, + { + "kind": "func", + "name": "loadChargesCreditPurchase", + "signature": "func (_q *CustomerQuery) loadChargesCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *ChargeCreditPurchase)) error", + "line": 943 + }, + { + "kind": "func", + "name": "loadChargesFlatFee", + "signature": "func (_q *CustomerQuery) loadChargesFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *ChargeFlatFee)) error", + "line": 973 + }, + { + "kind": "func", + "name": "loadChargesUsageBased", + "signature": "func (_q *CustomerQuery) loadChargesUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*Customer, init func(*Customer), assign func(*Customer, *ChargeUsageBased)) error", + "line": 1003 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CustomerQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1034 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CustomerQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1046 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CustomerQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1086 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CustomerQuery) ForUpdate(opts ...sql.LockOption) *CustomerQuery", + "line": 1124 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CustomerQuery) ForShare(opts ...sql.LockOption) *CustomerQuery", + "line": 1137 + }, + { + "kind": "struct", + "name": "CustomerGroupBy", + "signature": "type CustomerGroupBy struct", + "line": 1148 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CustomerGroupBy) Aggregate(fns ...AggregateFunc) *CustomerGroupBy", + "line": 1154 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CustomerGroupBy) Scan(ctx context.Context, v any) error", + "line": 1160 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CustomerGroupBy) sqlScan(ctx context.Context, root *CustomerQuery, v any) error", + "line": 1168 + }, + { + "kind": "struct", + "name": "CustomerSelect", + "signature": "type CustomerSelect struct", + "line": 1196 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CustomerSelect) Aggregate(fns ...AggregateFunc) *CustomerSelect", + "line": 1202 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CustomerSelect) Scan(ctx context.Context, v any) error", + "line": 1208 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CustomerSelect) sqlScan(ctx context.Context, root *CustomerQuery, v any) error", + "line": 1216 + } + ], + "line_count": 1235 + }, + "openmeter/ent/db/customer_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerUpdate", + "signature": "type CustomerUpdate struct", + "line": 30 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomerUpdate) Where(ps ...predicate.Customer) *CustomerUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *CustomerUpdate) SetMetadata(v map[string]string) *CustomerUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *CustomerUpdate) ClearMetadata() *CustomerUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CustomerUpdate) SetUpdatedAt(v time.Time) *CustomerUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomerUpdate) SetDeletedAt(v time.Time) *CustomerUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomerUpdate) SetNillableDeletedAt(v *time.Time) *CustomerUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomerUpdate) ClearDeletedAt() *CustomerUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *CustomerUpdate) SetName(v string) *CustomerUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *CustomerUpdate) SetNillableName(v *string) *CustomerUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *CustomerUpdate) SetDescription(v string) *CustomerUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *CustomerUpdate) SetNillableDescription(v *string) *CustomerUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *CustomerUpdate) ClearDescription() *CustomerUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (_u *CustomerUpdate) SetBillingAddressCountry(v models.CountryCode) *CustomerUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCountry", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressCountry(v *models.CountryCode) *CustomerUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "ClearBillingAddressCountry", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressCountry() *CustomerUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdate) SetBillingAddressPostalCode(v string) *CustomerUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressPostalCode(v *string) *CustomerUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "ClearBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressPostalCode() *CustomerUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (_u *CustomerUpdate) SetBillingAddressState(v string) *CustomerUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressState", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressState(v *string) *CustomerUpdate", + "line": 161 + }, + { + "kind": "func", + "name": "ClearBillingAddressState", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressState() *CustomerUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (_u *CustomerUpdate) SetBillingAddressCity(v string) *CustomerUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCity", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressCity(v *string) *CustomerUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearBillingAddressCity", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressCity() *CustomerUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (_u *CustomerUpdate) SetBillingAddressLine1(v string) *CustomerUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine1", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressLine1(v *string) *CustomerUpdate", + "line": 201 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine1", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressLine1() *CustomerUpdate", + "line": 209 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (_u *CustomerUpdate) SetBillingAddressLine2(v string) *CustomerUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine2", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressLine2(v *string) *CustomerUpdate", + "line": 221 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine2", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressLine2() *CustomerUpdate", + "line": 229 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdate) SetBillingAddressPhoneNumber(v string) *CustomerUpdate", + "line": 235 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdate) SetNillableBillingAddressPhoneNumber(v *string) *CustomerUpdate", + "line": 241 + }, + { + "kind": "func", + "name": "ClearBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdate) ClearBillingAddressPhoneNumber() *CustomerUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *CustomerUpdate) SetAnnotations(v models.Annotations) *CustomerUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *CustomerUpdate) ClearAnnotations() *CustomerUpdate", + "line": 261 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_u *CustomerUpdate) SetKey(v string) *CustomerUpdate", + "line": 267 + }, + { + "kind": "func", + "name": "SetNillableKey", + "signature": "func (_u *CustomerUpdate) SetNillableKey(v *string) *CustomerUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "ClearKey", + "signature": "func (_u *CustomerUpdate) ClearKey() *CustomerUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (_u *CustomerUpdate) SetPrimaryEmail(v string) *CustomerUpdate", + "line": 287 + }, + { + "kind": "func", + "name": "SetNillablePrimaryEmail", + "signature": "func (_u *CustomerUpdate) SetNillablePrimaryEmail(v *string) *CustomerUpdate", + "line": 293 + }, + { + "kind": "func", + "name": "ClearPrimaryEmail", + "signature": "func (_u *CustomerUpdate) ClearPrimaryEmail() *CustomerUpdate", + "line": 301 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_u *CustomerUpdate) SetCurrency(v currencyx.Code) *CustomerUpdate", + "line": 307 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_u *CustomerUpdate) SetNillableCurrency(v *currencyx.Code) *CustomerUpdate", + "line": 313 + }, + { + "kind": "func", + "name": "ClearCurrency", + "signature": "func (_u *CustomerUpdate) ClearCurrency() *CustomerUpdate", + "line": 321 + }, + { + "kind": "func", + "name": "AddAppIDs", + "signature": "func (_u *CustomerUpdate) AddAppIDs(ids ...int) *CustomerUpdate", + "line": 327 + }, + { + "kind": "func", + "name": "AddApps", + "signature": "func (_u *CustomerUpdate) AddApps(v ...*AppCustomer) *CustomerUpdate", + "line": 333 + }, + { + "kind": "func", + "name": "AddSubjectIDs", + "signature": "func (_u *CustomerUpdate) AddSubjectIDs(ids ...int) *CustomerUpdate", + "line": 342 + }, + { + "kind": "func", + "name": "AddSubjects", + "signature": "func (_u *CustomerUpdate) AddSubjects(v ...*CustomerSubjects) *CustomerUpdate", + "line": 348 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverrideID", + "signature": "func (_u *CustomerUpdate) SetBillingCustomerOverrideID(id string) *CustomerUpdate", + "line": 357 + }, + { + "kind": "func", + "name": "SetNillableBillingCustomerOverrideID", + "signature": "func (_u *CustomerUpdate) SetNillableBillingCustomerOverrideID(id *string) *CustomerUpdate", + "line": 363 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverride", + "signature": "func (_u *CustomerUpdate) SetBillingCustomerOverride(v *BillingCustomerOverride) *CustomerUpdate", + "line": 371 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_u *CustomerUpdate) AddBillingInvoiceIDs(ids ...string) *CustomerUpdate", + "line": 376 + }, + { + "kind": "func", + "name": "AddBillingInvoice", + "signature": "func (_u *CustomerUpdate) AddBillingInvoice(v ...*BillingInvoice) *CustomerUpdate", + "line": 382 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_u *CustomerUpdate) AddSubscriptionIDs(ids ...string) *CustomerUpdate", + "line": 391 + }, + { + "kind": "func", + "name": "AddSubscription", + "signature": "func (_u *CustomerUpdate) AddSubscription(v ...*Subscription) *CustomerUpdate", + "line": 397 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_u *CustomerUpdate) AddEntitlementIDs(ids ...string) *CustomerUpdate", + "line": 406 + }, + { + "kind": "func", + "name": "AddEntitlements", + "signature": "func (_u *CustomerUpdate) AddEntitlements(v ...*Entitlement) *CustomerUpdate", + "line": 412 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *CustomerUpdate) AddChargesCreditPurchaseIDs(ids ...string) *CustomerUpdate", + "line": 421 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *CustomerUpdate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *CustomerUpdate", + "line": 427 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *CustomerUpdate) AddChargesFlatFeeIDs(ids ...string) *CustomerUpdate", + "line": 436 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *CustomerUpdate) AddChargesFlatFee(v ...*ChargeFlatFee) *CustomerUpdate", + "line": 442 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *CustomerUpdate) AddChargesUsageBasedIDs(ids ...string) *CustomerUpdate", + "line": 451 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *CustomerUpdate) AddChargesUsageBased(v ...*ChargeUsageBased) *CustomerUpdate", + "line": 457 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomerUpdate) Mutation() *CustomerMutation", + "line": 466 + }, + { + "kind": "func", + "name": "ClearApps", + "signature": "func (_u *CustomerUpdate) ClearApps() *CustomerUpdate", + "line": 471 + }, + { + "kind": "func", + "name": "RemoveAppIDs", + "signature": "func (_u *CustomerUpdate) RemoveAppIDs(ids ...int) *CustomerUpdate", + "line": 477 + }, + { + "kind": "func", + "name": "RemoveApps", + "signature": "func (_u *CustomerUpdate) RemoveApps(v ...*AppCustomer) *CustomerUpdate", + "line": 483 + }, + { + "kind": "func", + "name": "ClearSubjects", + "signature": "func (_u *CustomerUpdate) ClearSubjects() *CustomerUpdate", + "line": 492 + }, + { + "kind": "func", + "name": "RemoveSubjectIDs", + "signature": "func (_u *CustomerUpdate) RemoveSubjectIDs(ids ...int) *CustomerUpdate", + "line": 498 + }, + { + "kind": "func", + "name": "RemoveSubjects", + "signature": "func (_u *CustomerUpdate) RemoveSubjects(v ...*CustomerSubjects) *CustomerUpdate", + "line": 504 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverride", + "signature": "func (_u *CustomerUpdate) ClearBillingCustomerOverride() *CustomerUpdate", + "line": 513 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *CustomerUpdate) ClearBillingInvoice() *CustomerUpdate", + "line": 519 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceIDs", + "signature": "func (_u *CustomerUpdate) RemoveBillingInvoiceIDs(ids ...string) *CustomerUpdate", + "line": 525 + }, + { + "kind": "func", + "name": "RemoveBillingInvoice", + "signature": "func (_u *CustomerUpdate) RemoveBillingInvoice(v ...*BillingInvoice) *CustomerUpdate", + "line": 531 + }, + { + "kind": "func", + "name": "ClearSubscription", + "signature": "func (_u *CustomerUpdate) ClearSubscription() *CustomerUpdate", + "line": 540 + }, + { + "kind": "func", + "name": "RemoveSubscriptionIDs", + "signature": "func (_u *CustomerUpdate) RemoveSubscriptionIDs(ids ...string) *CustomerUpdate", + "line": 546 + }, + { + "kind": "func", + "name": "RemoveSubscription", + "signature": "func (_u *CustomerUpdate) RemoveSubscription(v ...*Subscription) *CustomerUpdate", + "line": 552 + }, + { + "kind": "func", + "name": "ClearEntitlements", + "signature": "func (_u *CustomerUpdate) ClearEntitlements() *CustomerUpdate", + "line": 561 + }, + { + "kind": "func", + "name": "RemoveEntitlementIDs", + "signature": "func (_u *CustomerUpdate) RemoveEntitlementIDs(ids ...string) *CustomerUpdate", + "line": 567 + }, + { + "kind": "func", + "name": "RemoveEntitlements", + "signature": "func (_u *CustomerUpdate) RemoveEntitlements(v ...*Entitlement) *CustomerUpdate", + "line": 573 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *CustomerUpdate) ClearChargesCreditPurchase() *CustomerUpdate", + "line": 582 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *CustomerUpdate) RemoveChargesCreditPurchaseIDs(ids ...string) *CustomerUpdate", + "line": 588 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *CustomerUpdate) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *CustomerUpdate", + "line": 594 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *CustomerUpdate) ClearChargesFlatFee() *CustomerUpdate", + "line": 603 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *CustomerUpdate) RemoveChargesFlatFeeIDs(ids ...string) *CustomerUpdate", + "line": 609 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *CustomerUpdate) RemoveChargesFlatFee(v ...*ChargeFlatFee) *CustomerUpdate", + "line": 615 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *CustomerUpdate) ClearChargesUsageBased() *CustomerUpdate", + "line": 624 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *CustomerUpdate) RemoveChargesUsageBasedIDs(ids ...string) *CustomerUpdate", + "line": 630 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *CustomerUpdate) RemoveChargesUsageBased(v ...*ChargeUsageBased) *CustomerUpdate", + "line": 636 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomerUpdate) Save(ctx context.Context) (int, error)", + "line": 645 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomerUpdate) SaveX(ctx context.Context) int", + "line": 651 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomerUpdate) Exec(ctx context.Context) error", + "line": 660 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomerUpdate) ExecX(ctx context.Context)", + "line": 666 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CustomerUpdate) defaults()", + "line": 673 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomerUpdate) check() error", + "line": 681 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomerUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 695 + }, + { + "kind": "struct", + "name": "CustomerUpdateOne", + "signature": "type CustomerUpdateOne struct", + "line": 1199 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *CustomerUpdateOne) SetMetadata(v map[string]string) *CustomerUpdateOne", + "line": 1207 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *CustomerUpdateOne) ClearMetadata() *CustomerUpdateOne", + "line": 1213 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *CustomerUpdateOne) SetUpdatedAt(v time.Time) *CustomerUpdateOne", + "line": 1219 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomerUpdateOne) SetDeletedAt(v time.Time) *CustomerUpdateOne", + "line": 1225 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomerUpdateOne) SetNillableDeletedAt(v *time.Time) *CustomerUpdateOne", + "line": 1231 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomerUpdateOne) ClearDeletedAt() *CustomerUpdateOne", + "line": 1239 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *CustomerUpdateOne) SetName(v string) *CustomerUpdateOne", + "line": 1245 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *CustomerUpdateOne) SetNillableName(v *string) *CustomerUpdateOne", + "line": 1251 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *CustomerUpdateOne) SetDescription(v string) *CustomerUpdateOne", + "line": 1259 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *CustomerUpdateOne) SetNillableDescription(v *string) *CustomerUpdateOne", + "line": 1265 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *CustomerUpdateOne) ClearDescription() *CustomerUpdateOne", + "line": 1273 + }, + { + "kind": "func", + "name": "SetBillingAddressCountry", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressCountry(v models.CountryCode) *CustomerUpdateOne", + "line": 1279 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCountry", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressCountry(v *models.CountryCode) *CustomerUpdateOne", + "line": 1285 + }, + { + "kind": "func", + "name": "ClearBillingAddressCountry", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressCountry() *CustomerUpdateOne", + "line": 1293 + }, + { + "kind": "func", + "name": "SetBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressPostalCode(v string) *CustomerUpdateOne", + "line": 1299 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressPostalCode(v *string) *CustomerUpdateOne", + "line": 1305 + }, + { + "kind": "func", + "name": "ClearBillingAddressPostalCode", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressPostalCode() *CustomerUpdateOne", + "line": 1313 + }, + { + "kind": "func", + "name": "SetBillingAddressState", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressState(v string) *CustomerUpdateOne", + "line": 1319 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressState", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressState(v *string) *CustomerUpdateOne", + "line": 1325 + }, + { + "kind": "func", + "name": "ClearBillingAddressState", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressState() *CustomerUpdateOne", + "line": 1333 + }, + { + "kind": "func", + "name": "SetBillingAddressCity", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressCity(v string) *CustomerUpdateOne", + "line": 1339 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressCity", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressCity(v *string) *CustomerUpdateOne", + "line": 1345 + }, + { + "kind": "func", + "name": "ClearBillingAddressCity", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressCity() *CustomerUpdateOne", + "line": 1353 + }, + { + "kind": "func", + "name": "SetBillingAddressLine1", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressLine1(v string) *CustomerUpdateOne", + "line": 1359 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine1", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressLine1(v *string) *CustomerUpdateOne", + "line": 1365 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine1", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressLine1() *CustomerUpdateOne", + "line": 1373 + }, + { + "kind": "func", + "name": "SetBillingAddressLine2", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressLine2(v string) *CustomerUpdateOne", + "line": 1379 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressLine2", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressLine2(v *string) *CustomerUpdateOne", + "line": 1385 + }, + { + "kind": "func", + "name": "ClearBillingAddressLine2", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressLine2() *CustomerUpdateOne", + "line": 1393 + }, + { + "kind": "func", + "name": "SetBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdateOne) SetBillingAddressPhoneNumber(v string) *CustomerUpdateOne", + "line": 1399 + }, + { + "kind": "func", + "name": "SetNillableBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingAddressPhoneNumber(v *string) *CustomerUpdateOne", + "line": 1405 + }, + { + "kind": "func", + "name": "ClearBillingAddressPhoneNumber", + "signature": "func (_u *CustomerUpdateOne) ClearBillingAddressPhoneNumber() *CustomerUpdateOne", + "line": 1413 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *CustomerUpdateOne) SetAnnotations(v models.Annotations) *CustomerUpdateOne", + "line": 1419 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *CustomerUpdateOne) ClearAnnotations() *CustomerUpdateOne", + "line": 1425 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_u *CustomerUpdateOne) SetKey(v string) *CustomerUpdateOne", + "line": 1431 + }, + { + "kind": "func", + "name": "SetNillableKey", + "signature": "func (_u *CustomerUpdateOne) SetNillableKey(v *string) *CustomerUpdateOne", + "line": 1437 + }, + { + "kind": "func", + "name": "ClearKey", + "signature": "func (_u *CustomerUpdateOne) ClearKey() *CustomerUpdateOne", + "line": 1445 + }, + { + "kind": "func", + "name": "SetPrimaryEmail", + "signature": "func (_u *CustomerUpdateOne) SetPrimaryEmail(v string) *CustomerUpdateOne", + "line": 1451 + }, + { + "kind": "func", + "name": "SetNillablePrimaryEmail", + "signature": "func (_u *CustomerUpdateOne) SetNillablePrimaryEmail(v *string) *CustomerUpdateOne", + "line": 1457 + }, + { + "kind": "func", + "name": "ClearPrimaryEmail", + "signature": "func (_u *CustomerUpdateOne) ClearPrimaryEmail() *CustomerUpdateOne", + "line": 1465 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_u *CustomerUpdateOne) SetCurrency(v currencyx.Code) *CustomerUpdateOne", + "line": 1471 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_u *CustomerUpdateOne) SetNillableCurrency(v *currencyx.Code) *CustomerUpdateOne", + "line": 1477 + }, + { + "kind": "func", + "name": "ClearCurrency", + "signature": "func (_u *CustomerUpdateOne) ClearCurrency() *CustomerUpdateOne", + "line": 1485 + }, + { + "kind": "func", + "name": "AddAppIDs", + "signature": "func (_u *CustomerUpdateOne) AddAppIDs(ids ...int) *CustomerUpdateOne", + "line": 1491 + }, + { + "kind": "func", + "name": "AddApps", + "signature": "func (_u *CustomerUpdateOne) AddApps(v ...*AppCustomer) *CustomerUpdateOne", + "line": 1497 + }, + { + "kind": "func", + "name": "AddSubjectIDs", + "signature": "func (_u *CustomerUpdateOne) AddSubjectIDs(ids ...int) *CustomerUpdateOne", + "line": 1506 + }, + { + "kind": "func", + "name": "AddSubjects", + "signature": "func (_u *CustomerUpdateOne) AddSubjects(v ...*CustomerSubjects) *CustomerUpdateOne", + "line": 1512 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverrideID", + "signature": "func (_u *CustomerUpdateOne) SetBillingCustomerOverrideID(id string) *CustomerUpdateOne", + "line": 1521 + }, + { + "kind": "func", + "name": "SetNillableBillingCustomerOverrideID", + "signature": "func (_u *CustomerUpdateOne) SetNillableBillingCustomerOverrideID(id *string) *CustomerUpdateOne", + "line": 1527 + }, + { + "kind": "func", + "name": "SetBillingCustomerOverride", + "signature": "func (_u *CustomerUpdateOne) SetBillingCustomerOverride(v *BillingCustomerOverride) *CustomerUpdateOne", + "line": 1535 + }, + { + "kind": "func", + "name": "AddBillingInvoiceIDs", + "signature": "func (_u *CustomerUpdateOne) AddBillingInvoiceIDs(ids ...string) *CustomerUpdateOne", + "line": 1540 + }, + { + "kind": "func", + "name": "AddBillingInvoice", + "signature": "func (_u *CustomerUpdateOne) AddBillingInvoice(v ...*BillingInvoice) *CustomerUpdateOne", + "line": 1546 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_u *CustomerUpdateOne) AddSubscriptionIDs(ids ...string) *CustomerUpdateOne", + "line": 1555 + }, + { + "kind": "func", + "name": "AddSubscription", + "signature": "func (_u *CustomerUpdateOne) AddSubscription(v ...*Subscription) *CustomerUpdateOne", + "line": 1561 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_u *CustomerUpdateOne) AddEntitlementIDs(ids ...string) *CustomerUpdateOne", + "line": 1570 + }, + { + "kind": "func", + "name": "AddEntitlements", + "signature": "func (_u *CustomerUpdateOne) AddEntitlements(v ...*Entitlement) *CustomerUpdateOne", + "line": 1576 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *CustomerUpdateOne) AddChargesCreditPurchaseIDs(ids ...string) *CustomerUpdateOne", + "line": 1585 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *CustomerUpdateOne) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *CustomerUpdateOne", + "line": 1591 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *CustomerUpdateOne) AddChargesFlatFeeIDs(ids ...string) *CustomerUpdateOne", + "line": 1600 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *CustomerUpdateOne) AddChargesFlatFee(v ...*ChargeFlatFee) *CustomerUpdateOne", + "line": 1606 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *CustomerUpdateOne) AddChargesUsageBasedIDs(ids ...string) *CustomerUpdateOne", + "line": 1615 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *CustomerUpdateOne) AddChargesUsageBased(v ...*ChargeUsageBased) *CustomerUpdateOne", + "line": 1621 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomerUpdateOne) Mutation() *CustomerMutation", + "line": 1630 + }, + { + "kind": "func", + "name": "ClearApps", + "signature": "func (_u *CustomerUpdateOne) ClearApps() *CustomerUpdateOne", + "line": 1635 + }, + { + "kind": "func", + "name": "RemoveAppIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveAppIDs(ids ...int) *CustomerUpdateOne", + "line": 1641 + }, + { + "kind": "func", + "name": "RemoveApps", + "signature": "func (_u *CustomerUpdateOne) RemoveApps(v ...*AppCustomer) *CustomerUpdateOne", + "line": 1647 + }, + { + "kind": "func", + "name": "ClearSubjects", + "signature": "func (_u *CustomerUpdateOne) ClearSubjects() *CustomerUpdateOne", + "line": 1656 + }, + { + "kind": "func", + "name": "RemoveSubjectIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveSubjectIDs(ids ...int) *CustomerUpdateOne", + "line": 1662 + }, + { + "kind": "func", + "name": "RemoveSubjects", + "signature": "func (_u *CustomerUpdateOne) RemoveSubjects(v ...*CustomerSubjects) *CustomerUpdateOne", + "line": 1668 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverride", + "signature": "func (_u *CustomerUpdateOne) ClearBillingCustomerOverride() *CustomerUpdateOne", + "line": 1677 + }, + { + "kind": "func", + "name": "ClearBillingInvoice", + "signature": "func (_u *CustomerUpdateOne) ClearBillingInvoice() *CustomerUpdateOne", + "line": 1683 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveBillingInvoiceIDs(ids ...string) *CustomerUpdateOne", + "line": 1689 + }, + { + "kind": "func", + "name": "RemoveBillingInvoice", + "signature": "func (_u *CustomerUpdateOne) RemoveBillingInvoice(v ...*BillingInvoice) *CustomerUpdateOne", + "line": 1695 + }, + { + "kind": "func", + "name": "ClearSubscription", + "signature": "func (_u *CustomerUpdateOne) ClearSubscription() *CustomerUpdateOne", + "line": 1704 + }, + { + "kind": "func", + "name": "RemoveSubscriptionIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveSubscriptionIDs(ids ...string) *CustomerUpdateOne", + "line": 1710 + }, + { + "kind": "func", + "name": "RemoveSubscription", + "signature": "func (_u *CustomerUpdateOne) RemoveSubscription(v ...*Subscription) *CustomerUpdateOne", + "line": 1716 + }, + { + "kind": "func", + "name": "ClearEntitlements", + "signature": "func (_u *CustomerUpdateOne) ClearEntitlements() *CustomerUpdateOne", + "line": 1725 + }, + { + "kind": "func", + "name": "RemoveEntitlementIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveEntitlementIDs(ids ...string) *CustomerUpdateOne", + "line": 1731 + }, + { + "kind": "func", + "name": "RemoveEntitlements", + "signature": "func (_u *CustomerUpdateOne) RemoveEntitlements(v ...*Entitlement) *CustomerUpdateOne", + "line": 1737 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *CustomerUpdateOne) ClearChargesCreditPurchase() *CustomerUpdateOne", + "line": 1746 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesCreditPurchaseIDs(ids ...string) *CustomerUpdateOne", + "line": 1752 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *CustomerUpdateOne", + "line": 1758 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *CustomerUpdateOne) ClearChargesFlatFee() *CustomerUpdateOne", + "line": 1767 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesFlatFeeIDs(ids ...string) *CustomerUpdateOne", + "line": 1773 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesFlatFee(v ...*ChargeFlatFee) *CustomerUpdateOne", + "line": 1779 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *CustomerUpdateOne) ClearChargesUsageBased() *CustomerUpdateOne", + "line": 1788 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesUsageBasedIDs(ids ...string) *CustomerUpdateOne", + "line": 1794 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *CustomerUpdateOne) RemoveChargesUsageBased(v ...*ChargeUsageBased) *CustomerUpdateOne", + "line": 1800 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomerUpdateOne) Where(ps ...predicate.Customer) *CustomerUpdateOne", + "line": 1809 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CustomerUpdateOne) Select(field string, fields ...string) *CustomerUpdateOne", + "line": 1816 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomerUpdateOne) Save(ctx context.Context) (*Customer, error)", + "line": 1822 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomerUpdateOne) SaveX(ctx context.Context) *Customer", + "line": 1828 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomerUpdateOne) Exec(ctx context.Context) error", + "line": 1837 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomerUpdateOne) ExecX(ctx context.Context)", + "line": 1843 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *CustomerUpdateOne) defaults()", + "line": 1850 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomerUpdateOne) check() error", + "line": 1858 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomerUpdateOne) sqlSave(ctx context.Context) (_node *Customer, err error)", + "line": 1872 + } + ], + "line_count": 2393 + }, + "openmeter/ent/db/customersubjects.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerSubjects", + "signature": "type CustomerSubjects struct", + "line": 17 + }, + { + "kind": "struct", + "name": "CustomerSubjectsEdges", + "signature": "type CustomerSubjectsEdges struct", + "line": 38 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e CustomerSubjectsEdges) CustomerOrErr() (*Customer, error)", + "line": 48 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *CustomerSubjects) assignValues(columns []string, values []any) error", + "line": 77 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *CustomerSubjects) Value(name string) (ent.Value, error)", + "line": 129 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *CustomerSubjects) QueryCustomer() *CustomerQuery", + "line": 134 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *CustomerSubjects) Update() *CustomerSubjectsUpdateOne", + "line": 141 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *CustomerSubjects) Unwrap() *CustomerSubjects", + "line": 147 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *CustomerSubjects) String() string", + "line": 157 + } + ], + "line_count": 182 + }, + "openmeter/ent/db/customersubjects/customersubjects.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 51 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 75 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 80 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 85 + }, + { + "kind": "func", + "name": "BySubjectKey", + "signature": "func BySubjectKey(opts ...sql.OrderTermOption) OrderOption", + "line": 90 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 95 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 100 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 110 + } + ], + "line_count": 116 + }, + "openmeter/ent/db/customersubjects/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id int) predicate.CustomerSubjects", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id int) predicate.CustomerSubjects", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id int) predicate.CustomerSubjects", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...int) predicate.CustomerSubjects", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...int) predicate.CustomerSubjects", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id int) predicate.CustomerSubjects", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id int) predicate.CustomerSubjects", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id int) predicate.CustomerSubjects", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id int) predicate.CustomerSubjects", + "line": 54 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.CustomerSubjects", + "line": 59 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.CustomerSubjects", + "line": 64 + }, + { + "kind": "func", + "name": "SubjectKey", + "signature": "func SubjectKey(v string) predicate.CustomerSubjects", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.CustomerSubjects", + "line": 74 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.CustomerSubjects", + "line": 79 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.CustomerSubjects", + "line": 84 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.CustomerSubjects", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.CustomerSubjects", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.CustomerSubjects", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.CustomerSubjects", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.CustomerSubjects", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.CustomerSubjects", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.CustomerSubjects", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.CustomerSubjects", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.CustomerSubjects", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.CustomerSubjects", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.CustomerSubjects", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.CustomerSubjects", + "line": 144 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.CustomerSubjects", + "line": 149 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.CustomerSubjects", + "line": 154 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.CustomerSubjects", + "line": 159 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.CustomerSubjects", + "line": 164 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.CustomerSubjects", + "line": 169 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.CustomerSubjects", + "line": 174 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.CustomerSubjects", + "line": 179 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.CustomerSubjects", + "line": 184 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.CustomerSubjects", + "line": 189 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.CustomerSubjects", + "line": 194 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.CustomerSubjects", + "line": 199 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.CustomerSubjects", + "line": 204 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.CustomerSubjects", + "line": 209 + }, + { + "kind": "func", + "name": "SubjectKeyEQ", + "signature": "func SubjectKeyEQ(v string) predicate.CustomerSubjects", + "line": 214 + }, + { + "kind": "func", + "name": "SubjectKeyNEQ", + "signature": "func SubjectKeyNEQ(v string) predicate.CustomerSubjects", + "line": 219 + }, + { + "kind": "func", + "name": "SubjectKeyIn", + "signature": "func SubjectKeyIn(vs ...string) predicate.CustomerSubjects", + "line": 224 + }, + { + "kind": "func", + "name": "SubjectKeyNotIn", + "signature": "func SubjectKeyNotIn(vs ...string) predicate.CustomerSubjects", + "line": 229 + }, + { + "kind": "func", + "name": "SubjectKeyGT", + "signature": "func SubjectKeyGT(v string) predicate.CustomerSubjects", + "line": 234 + }, + { + "kind": "func", + "name": "SubjectKeyGTE", + "signature": "func SubjectKeyGTE(v string) predicate.CustomerSubjects", + "line": 239 + }, + { + "kind": "func", + "name": "SubjectKeyLT", + "signature": "func SubjectKeyLT(v string) predicate.CustomerSubjects", + "line": 244 + }, + { + "kind": "func", + "name": "SubjectKeyLTE", + "signature": "func SubjectKeyLTE(v string) predicate.CustomerSubjects", + "line": 249 + }, + { + "kind": "func", + "name": "SubjectKeyContains", + "signature": "func SubjectKeyContains(v string) predicate.CustomerSubjects", + "line": 254 + }, + { + "kind": "func", + "name": "SubjectKeyHasPrefix", + "signature": "func SubjectKeyHasPrefix(v string) predicate.CustomerSubjects", + "line": 259 + }, + { + "kind": "func", + "name": "SubjectKeyHasSuffix", + "signature": "func SubjectKeyHasSuffix(v string) predicate.CustomerSubjects", + "line": 264 + }, + { + "kind": "func", + "name": "SubjectKeyEqualFold", + "signature": "func SubjectKeyEqualFold(v string) predicate.CustomerSubjects", + "line": 269 + }, + { + "kind": "func", + "name": "SubjectKeyContainsFold", + "signature": "func SubjectKeyContainsFold(v string) predicate.CustomerSubjects", + "line": 274 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.CustomerSubjects", + "line": 279 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.CustomerSubjects", + "line": 284 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.CustomerSubjects", + "line": 289 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.CustomerSubjects", + "line": 294 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.CustomerSubjects", + "line": 299 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.CustomerSubjects", + "line": 304 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.CustomerSubjects", + "line": 309 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.CustomerSubjects", + "line": 314 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.CustomerSubjects", + "line": 319 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.CustomerSubjects", + "line": 324 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.CustomerSubjects", + "line": 329 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.CustomerSubjects", + "line": 334 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.CustomerSubjects", + "line": 339 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.CustomerSubjects", + "line": 344 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.CustomerSubjects", + "line": 349 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.CustomerSubjects", + "line": 354 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.CustomerSubjects", + "line": 359 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.CustomerSubjects", + "line": 364 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.CustomerSubjects", + "line": 369 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.CustomerSubjects", + "line": 380 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.CustomerSubjects) predicate.CustomerSubjects", + "line": 392 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.CustomerSubjects) predicate.CustomerSubjects", + "line": 397 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.CustomerSubjects) predicate.CustomerSubjects", + "line": 402 + } + ], + "line_count": 404 + }, + "openmeter/ent/db/customersubjects_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerSubjectsCreate", + "signature": "type CustomerSubjectsCreate struct", + "line": 19 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *CustomerSubjectsCreate) SetNamespace(v string) *CustomerSubjectsCreate", + "line": 27 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *CustomerSubjectsCreate) SetCustomerID(v string) *CustomerSubjectsCreate", + "line": 33 + }, + { + "kind": "func", + "name": "SetSubjectKey", + "signature": "func (_c *CustomerSubjectsCreate) SetSubjectKey(v string) *CustomerSubjectsCreate", + "line": 39 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *CustomerSubjectsCreate) SetCreatedAt(v time.Time) *CustomerSubjectsCreate", + "line": 45 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *CustomerSubjectsCreate) SetNillableCreatedAt(v *time.Time) *CustomerSubjectsCreate", + "line": 51 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *CustomerSubjectsCreate) SetDeletedAt(v time.Time) *CustomerSubjectsCreate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *CustomerSubjectsCreate) SetNillableDeletedAt(v *time.Time) *CustomerSubjectsCreate", + "line": 65 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *CustomerSubjectsCreate) SetCustomer(v *Customer) *CustomerSubjectsCreate", + "line": 73 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *CustomerSubjectsCreate) Mutation() *CustomerSubjectsMutation", + "line": 78 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomerSubjectsCreate) Save(ctx context.Context) (*CustomerSubjects, error)", + "line": 83 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomerSubjectsCreate) SaveX(ctx context.Context) *CustomerSubjects", + "line": 89 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomerSubjectsCreate) Exec(ctx context.Context) error", + "line": 98 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomerSubjectsCreate) ExecX(ctx context.Context)", + "line": 104 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *CustomerSubjectsCreate) defaults()", + "line": 111 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *CustomerSubjectsCreate) check() error", + "line": 119 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *CustomerSubjectsCreate) sqlSave(ctx context.Context) (*CustomerSubjects, error)", + "line": 153 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *CustomerSubjectsCreate) createSpec() (*CustomerSubjects, *sqlgraph.CreateSpec)", + "line": 171 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomerSubjectsCreate) OnConflict(opts ...sql.ConflictOption) *CustomerSubjectsUpsertOne", + "line": 229 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomerSubjectsCreate) OnConflictColumns(columns ...string) *CustomerSubjectsUpsertOne", + "line": 242 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerSubjectsUpsert) SetDeletedAt(v time.Time) *CustomerSubjectsUpsert", + "line": 263 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerSubjectsUpsert) UpdateDeletedAt() *CustomerSubjectsUpsert", + "line": 269 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerSubjectsUpsert) ClearDeletedAt() *CustomerSubjectsUpsert", + "line": 275 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomerSubjectsUpsertOne) UpdateNewValues() *CustomerSubjectsUpsertOne", + "line": 288 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomerSubjectsUpsertOne) Ignore() *CustomerSubjectsUpsertOne", + "line": 313 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomerSubjectsUpsertOne) DoNothing() *CustomerSubjectsUpsertOne", + "line": 320 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomerSubjectsUpsertOne) Update(set func(*CustomerSubjectsUpsert)) *CustomerSubjectsUpsertOne", + "line": 327 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertOne) SetDeletedAt(v time.Time) *CustomerSubjectsUpsertOne", + "line": 335 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertOne) UpdateDeletedAt() *CustomerSubjectsUpsertOne", + "line": 342 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertOne) ClearDeletedAt() *CustomerSubjectsUpsertOne", + "line": 349 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomerSubjectsUpsertOne) Exec(ctx context.Context) error", + "line": 356 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomerSubjectsUpsertOne) ExecX(ctx context.Context)", + "line": 364 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *CustomerSubjectsUpsertOne) ID(ctx context.Context) (id int, err error)", + "line": 371 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *CustomerSubjectsUpsertOne) IDX(ctx context.Context) int", + "line": 380 + }, + { + "kind": "struct", + "name": "CustomerSubjectsCreateBulk", + "signature": "type CustomerSubjectsCreateBulk struct", + "line": 389 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *CustomerSubjectsCreateBulk) Save(ctx context.Context) ([]*CustomerSubjects, error)", + "line": 397 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *CustomerSubjectsCreateBulk) SaveX(ctx context.Context) []*CustomerSubjects", + "line": 457 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *CustomerSubjectsCreateBulk) Exec(ctx context.Context) error", + "line": 466 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *CustomerSubjectsCreateBulk) ExecX(ctx context.Context)", + "line": 472 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *CustomerSubjectsCreateBulk) OnConflict(opts ...sql.ConflictOption) *CustomerSubjectsUpsertBulk", + "line": 493 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *CustomerSubjectsCreateBulk) OnConflictColumns(columns ...string) *CustomerSubjectsUpsertBulk", + "line": 506 + }, + { + "kind": "struct", + "name": "CustomerSubjectsUpsertBulk", + "signature": "type CustomerSubjectsUpsertBulk struct", + "line": 515 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *CustomerSubjectsUpsertBulk) UpdateNewValues() *CustomerSubjectsUpsertBulk", + "line": 527 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *CustomerSubjectsUpsertBulk) Ignore() *CustomerSubjectsUpsertBulk", + "line": 554 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *CustomerSubjectsUpsertBulk) DoNothing() *CustomerSubjectsUpsertBulk", + "line": 561 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *CustomerSubjectsUpsertBulk) Update(set func(*CustomerSubjectsUpsert)) *CustomerSubjectsUpsertBulk", + "line": 568 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertBulk) SetDeletedAt(v time.Time) *CustomerSubjectsUpsertBulk", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertBulk) UpdateDeletedAt() *CustomerSubjectsUpsertBulk", + "line": 583 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *CustomerSubjectsUpsertBulk) ClearDeletedAt() *CustomerSubjectsUpsertBulk", + "line": 590 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *CustomerSubjectsUpsertBulk) Exec(ctx context.Context) error", + "line": 597 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *CustomerSubjectsUpsertBulk) ExecX(ctx context.Context)", + "line": 613 + } + ], + "line_count": 617 + }, + "openmeter/ent/db/customersubjects_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerSubjectsDelete", + "signature": "type CustomerSubjectsDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomerSubjectsDelete) Where(ps ...predicate.CustomerSubjects) *CustomerSubjectsDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomerSubjectsDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomerSubjectsDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *CustomerSubjectsDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "CustomerSubjectsDeleteOne", + "signature": "type CustomerSubjectsDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *CustomerSubjectsDeleteOne) Where(ps ...predicate.CustomerSubjects) *CustomerSubjectsDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *CustomerSubjectsDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *CustomerSubjectsDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/customersubjects_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerSubjectsQuery", + "signature": "type CustomerSubjectsQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *CustomerSubjectsQuery) Where(ps ...predicate.CustomerSubjects) *CustomerSubjectsQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *CustomerSubjectsQuery) Limit(limit int) *CustomerSubjectsQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *CustomerSubjectsQuery) Offset(offset int) *CustomerSubjectsQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *CustomerSubjectsQuery) Unique(unique bool) *CustomerSubjectsQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *CustomerSubjectsQuery) Order(o ...customersubjects.OrderOption) *CustomerSubjectsQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *CustomerSubjectsQuery) QueryCustomer() *CustomerQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *CustomerSubjectsQuery) First(ctx context.Context) (*CustomerSubjects, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *CustomerSubjectsQuery) FirstX(ctx context.Context) *CustomerSubjects", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *CustomerSubjectsQuery) FirstID(ctx context.Context) (id int, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *CustomerSubjectsQuery) FirstIDX(ctx context.Context) int", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *CustomerSubjectsQuery) Only(ctx context.Context) (*CustomerSubjects, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *CustomerSubjectsQuery) OnlyX(ctx context.Context) *CustomerSubjects", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *CustomerSubjectsQuery) OnlyID(ctx context.Context) (id int, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *CustomerSubjectsQuery) OnlyIDX(ctx context.Context) int", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *CustomerSubjectsQuery) All(ctx context.Context) ([]*CustomerSubjects, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *CustomerSubjectsQuery) AllX(ctx context.Context) []*CustomerSubjects", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *CustomerSubjectsQuery) IDs(ctx context.Context) (ids []int, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *CustomerSubjectsQuery) IDsX(ctx context.Context) []int", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *CustomerSubjectsQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *CustomerSubjectsQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *CustomerSubjectsQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *CustomerSubjectsQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *CustomerSubjectsQuery) Clone() *CustomerSubjectsQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *CustomerSubjectsQuery) WithCustomer(opts ...func(*CustomerQuery)) *CustomerSubjectsQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *CustomerSubjectsQuery) GroupBy(field string, fields ...string) *CustomerSubjectsGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *CustomerSubjectsQuery) Select(fields ...string) *CustomerSubjectsSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *CustomerSubjectsQuery) Aggregate(fns ...AggregateFunc) *CustomerSubjectsSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *CustomerSubjectsQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *CustomerSubjectsQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*CustomerSubjects, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *CustomerSubjectsQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*CustomerSubjects, init func(*CustomerSubjects), assign func(*CustomerSubjects, *Customer)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *CustomerSubjectsQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *CustomerSubjectsQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *CustomerSubjectsQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *CustomerSubjectsQuery) ForUpdate(opts ...sql.LockOption) *CustomerSubjectsQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *CustomerSubjectsQuery) ForShare(opts ...sql.LockOption) *CustomerSubjectsQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "CustomerSubjectsGroupBy", + "signature": "type CustomerSubjectsGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *CustomerSubjectsGroupBy) Aggregate(fns ...AggregateFunc) *CustomerSubjectsGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *CustomerSubjectsGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *CustomerSubjectsGroupBy) sqlScan(ctx context.Context, root *CustomerSubjectsQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "CustomerSubjectsSelect", + "signature": "type CustomerSubjectsSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *CustomerSubjectsSelect) Aggregate(fns ...AggregateFunc) *CustomerSubjectsSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *CustomerSubjectsSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *CustomerSubjectsSelect) sqlScan(ctx context.Context, root *CustomerSubjectsQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/customersubjects_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerSubjectsUpdate", + "signature": "type CustomerSubjectsUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomerSubjectsUpdate) Where(ps ...predicate.CustomerSubjects) *CustomerSubjectsUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdate) SetDeletedAt(v time.Time) *CustomerSubjectsUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdate) SetNillableDeletedAt(v *time.Time) *CustomerSubjectsUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdate) ClearDeletedAt() *CustomerSubjectsUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomerSubjectsUpdate) Mutation() *CustomerSubjectsMutation", + "line": 52 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomerSubjectsUpdate) Save(ctx context.Context) (int, error)", + "line": 57 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomerSubjectsUpdate) SaveX(ctx context.Context) int", + "line": 62 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomerSubjectsUpdate) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomerSubjectsUpdate) ExecX(ctx context.Context)", + "line": 77 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomerSubjectsUpdate) check() error", + "line": 84 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomerSubjectsUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 91 + }, + { + "kind": "struct", + "name": "CustomerSubjectsUpdateOne", + "signature": "type CustomerSubjectsUpdateOne struct", + "line": 122 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdateOne) SetDeletedAt(v time.Time) *CustomerSubjectsUpdateOne", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdateOne) SetNillableDeletedAt(v *time.Time) *CustomerSubjectsUpdateOne", + "line": 136 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *CustomerSubjectsUpdateOne) ClearDeletedAt() *CustomerSubjectsUpdateOne", + "line": 144 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *CustomerSubjectsUpdateOne) Mutation() *CustomerSubjectsMutation", + "line": 150 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *CustomerSubjectsUpdateOne) Where(ps ...predicate.CustomerSubjects) *CustomerSubjectsUpdateOne", + "line": 155 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *CustomerSubjectsUpdateOne) Select(field string, fields ...string) *CustomerSubjectsUpdateOne", + "line": 162 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *CustomerSubjectsUpdateOne) Save(ctx context.Context) (*CustomerSubjects, error)", + "line": 168 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *CustomerSubjectsUpdateOne) SaveX(ctx context.Context) *CustomerSubjects", + "line": 173 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *CustomerSubjectsUpdateOne) Exec(ctx context.Context) error", + "line": 182 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *CustomerSubjectsUpdateOne) ExecX(ctx context.Context)", + "line": 188 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *CustomerSubjectsUpdateOne) check() error", + "line": 195 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *CustomerSubjectsUpdateOne) sqlSave(ctx context.Context) (_node *CustomerSubjects, err error)", + "line": 202 + } + ], + "line_count": 250 + }, + "openmeter/ent/db/ent.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "clientCtxKey", + "signature": "type clientCtxKey struct", + "line": 121 + }, + { + "kind": "func", + "name": "FromContext", + "signature": "func FromContext(ctx context.Context) *Client", + "line": 124 + }, + { + "kind": "func", + "name": "NewContext", + "signature": "func NewContext(parent context.Context, c *Client) context.Context", + "line": 130 + }, + { + "kind": "struct", + "name": "txCtxKey", + "signature": "type txCtxKey struct", + "line": 134 + }, + { + "kind": "func", + "name": "TxFromContext", + "signature": "func TxFromContext(ctx context.Context) *Tx", + "line": 137 + }, + { + "kind": "func", + "name": "NewTxContext", + "signature": "func NewTxContext(parent context.Context, tx *Tx) context.Context", + "line": 143 + }, + { + "kind": "func", + "name": "checkColumn", + "signature": "func checkColumn(t, c string) error", + "line": 157 + }, + { + "kind": "func", + "name": "Asc", + "signature": "func Asc(fields ...string) func(*sql.Selector)", + "line": 246 + }, + { + "kind": "func", + "name": "Desc", + "signature": "func Desc(fields ...string) func(*sql.Selector)", + "line": 258 + }, + { + "kind": "func", + "name": "As", + "signature": "func As(fn AggregateFunc, end string) AggregateFunc", + "line": 277 + }, + { + "kind": "func", + "name": "Count", + "signature": "func Count() AggregateFunc", + "line": 284 + }, + { + "kind": "func", + "name": "Max", + "signature": "func Max(field string) AggregateFunc", + "line": 291 + }, + { + "kind": "func", + "name": "Mean", + "signature": "func Mean(field string) AggregateFunc", + "line": 302 + }, + { + "kind": "func", + "name": "Min", + "signature": "func Min(field string) AggregateFunc", + "line": 313 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func Sum(field string) AggregateFunc", + "line": 324 + }, + { + "kind": "struct", + "name": "ValidationError", + "signature": "type ValidationError struct", + "line": 335 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ValidationError) Error() string", + "line": 341 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ValidationError) Unwrap() error", + "line": 346 + }, + { + "kind": "func", + "name": "IsValidationError", + "signature": "func IsValidationError(err error) bool", + "line": 351 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 360 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 365 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 370 + }, + { + "kind": "func", + "name": "MaskNotFound", + "signature": "func MaskNotFound(err error) error", + "line": 379 + }, + { + "kind": "struct", + "name": "NotSingularError", + "signature": "type NotSingularError struct", + "line": 387 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotSingularError) Error() string", + "line": 392 + }, + { + "kind": "func", + "name": "IsNotSingular", + "signature": "func IsNotSingular(err error) bool", + "line": 397 + }, + { + "kind": "struct", + "name": "NotLoadedError", + "signature": "type NotLoadedError struct", + "line": 406 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotLoadedError) Error() string", + "line": 411 + }, + { + "kind": "func", + "name": "IsNotLoaded", + "signature": "func IsNotLoaded(err error) bool", + "line": 416 + }, + { + "kind": "struct", + "name": "ConstraintError", + "signature": "type ConstraintError struct", + "line": 427 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ConstraintError) Error() string", + "line": 433 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ConstraintError) Unwrap() error", + "line": 438 + }, + { + "kind": "func", + "name": "IsConstraintError", + "signature": "func IsConstraintError(err error) bool", + "line": 443 + }, + { + "kind": "struct", + "name": "selector", + "signature": "type selector struct", + "line": 452 + }, + { + "kind": "func", + "name": "ScanX", + "signature": "func (s *selector) ScanX(ctx context.Context, v any)", + "line": 460 + }, + { + "kind": "func", + "name": "Strings", + "signature": "func (s *selector) Strings(ctx context.Context) ([]string, error)", + "line": 467 + }, + { + "kind": "func", + "name": "StringsX", + "signature": "func (s *selector) StringsX(ctx context.Context) []string", + "line": 479 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s *selector) String(ctx context.Context) (_ string, err error)", + "line": 488 + }, + { + "kind": "func", + "name": "StringX", + "signature": "func (s *selector) StringX(ctx context.Context) string", + "line": 505 + }, + { + "kind": "func", + "name": "Ints", + "signature": "func (s *selector) Ints(ctx context.Context) ([]int, error)", + "line": 514 + }, + { + "kind": "func", + "name": "IntsX", + "signature": "func (s *selector) IntsX(ctx context.Context) []int", + "line": 526 + }, + { + "kind": "func", + "name": "Int", + "signature": "func (s *selector) Int(ctx context.Context) (_ int, err error)", + "line": 535 + }, + { + "kind": "func", + "name": "IntX", + "signature": "func (s *selector) IntX(ctx context.Context) int", + "line": 552 + }, + { + "kind": "func", + "name": "Float64s", + "signature": "func (s *selector) Float64s(ctx context.Context) ([]float64, error)", + "line": 561 + }, + { + "kind": "func", + "name": "Float64sX", + "signature": "func (s *selector) Float64sX(ctx context.Context) []float64", + "line": 573 + }, + { + "kind": "func", + "name": "Float64", + "signature": "func (s *selector) Float64(ctx context.Context) (_ float64, err error)", + "line": 582 + }, + { + "kind": "func", + "name": "Float64X", + "signature": "func (s *selector) Float64X(ctx context.Context) float64", + "line": 599 + }, + { + "kind": "func", + "name": "Bools", + "signature": "func (s *selector) Bools(ctx context.Context) ([]bool, error)", + "line": 608 + }, + { + "kind": "func", + "name": "BoolsX", + "signature": "func (s *selector) BoolsX(ctx context.Context) []bool", + "line": 620 + }, + { + "kind": "func", + "name": "Bool", + "signature": "func (s *selector) Bool(ctx context.Context) (_ bool, err error)", + "line": 629 + }, + { + "kind": "func", + "name": "BoolX", + "signature": "func (s *selector) BoolX(ctx context.Context) bool", + "line": 646 + }, + { + "kind": "func", + "name": "setContextOp", + "signature": "func setContextOp(ctx context.Context, qc *QueryContext, op string) context.Context", + "line": 689 + } + ], + "line_count": 771 + }, + "openmeter/ent/db/entitlement.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 21 + }, + { + "kind": "struct", + "name": "EntitlementEdges", + "signature": "type EntitlementEdges struct", + "line": 76 + }, + { + "kind": "func", + "name": "UsageResetOrErr", + "signature": "func (e EntitlementEdges) UsageResetOrErr() ([]*UsageReset, error)", + "line": 96 + }, + { + "kind": "func", + "name": "GrantOrErr", + "signature": "func (e EntitlementEdges) GrantOrErr() ([]*Grant, error)", + "line": 105 + }, + { + "kind": "func", + "name": "BalanceSnapshotOrErr", + "signature": "func (e EntitlementEdges) BalanceSnapshotOrErr() ([]*BalanceSnapshot, error)", + "line": 114 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func (e EntitlementEdges) SubscriptionItemOrErr() ([]*SubscriptionItem, error)", + "line": 123 + }, + { + "kind": "func", + "name": "FeatureOrErr", + "signature": "func (e EntitlementEdges) FeatureOrErr() (*Feature, error)", + "line": 132 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e EntitlementEdges) CustomerOrErr() (*Customer, error)", + "line": 143 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Entitlement) assignValues(columns []string, values []any) error", + "line": 180 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Entitlement) Value(name string) (ent.Value, error)", + "line": 348 + }, + { + "kind": "func", + "name": "QueryUsageReset", + "signature": "func (_m *Entitlement) QueryUsageReset() *UsageResetQuery", + "line": 353 + }, + { + "kind": "func", + "name": "QueryGrant", + "signature": "func (_m *Entitlement) QueryGrant() *GrantQuery", + "line": 358 + }, + { + "kind": "func", + "name": "QueryBalanceSnapshot", + "signature": "func (_m *Entitlement) QueryBalanceSnapshot() *BalanceSnapshotQuery", + "line": 363 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_m *Entitlement) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 368 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_m *Entitlement) QueryFeature() *FeatureQuery", + "line": 373 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *Entitlement) QueryCustomer() *CustomerQuery", + "line": 378 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Entitlement) Update() *EntitlementUpdateOne", + "line": 385 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Entitlement) Unwrap() *Entitlement", + "line": 391 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Entitlement) String() string", + "line": 401 + } + ], + "line_count": 501 + }, + "openmeter/ent/db/entitlement/entitlement.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 150 + }, + { + "kind": "func", + "name": "String", + "signature": "func (et EntitlementType) String() string", + "line": 188 + }, + { + "kind": "func", + "name": "EntitlementTypeValidator", + "signature": "func EntitlementTypeValidator(et EntitlementType) error", + "line": 193 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 206 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 211 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 216 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 221 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 226 + }, + { + "kind": "func", + "name": "ByEntitlementType", + "signature": "func ByEntitlementType(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByActiveFrom", + "signature": "func ByActiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "ByActiveTo", + "signature": "func ByActiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 246 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 256 + }, + { + "kind": "func", + "name": "ByMeasureUsageFrom", + "signature": "func ByMeasureUsageFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 261 + }, + { + "kind": "func", + "name": "ByIssueAfterReset", + "signature": "func ByIssueAfterReset(opts ...sql.OrderTermOption) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByIssueAfterResetPriority", + "signature": "func ByIssueAfterResetPriority(opts ...sql.OrderTermOption) OrderOption", + "line": 271 + }, + { + "kind": "func", + "name": "ByIsSoftLimit", + "signature": "func ByIsSoftLimit(opts ...sql.OrderTermOption) OrderOption", + "line": 276 + }, + { + "kind": "func", + "name": "ByPreserveOverageAtReset", + "signature": "func ByPreserveOverageAtReset(opts ...sql.OrderTermOption) OrderOption", + "line": 281 + }, + { + "kind": "func", + "name": "ByConfig", + "signature": "func ByConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 286 + }, + { + "kind": "func", + "name": "ByUsagePeriodInterval", + "signature": "func ByUsagePeriodInterval(opts ...sql.OrderTermOption) OrderOption", + "line": 291 + }, + { + "kind": "func", + "name": "ByUsagePeriodAnchor", + "signature": "func ByUsagePeriodAnchor(opts ...sql.OrderTermOption) OrderOption", + "line": 296 + }, + { + "kind": "func", + "name": "ByCurrentUsagePeriodStart", + "signature": "func ByCurrentUsagePeriodStart(opts ...sql.OrderTermOption) OrderOption", + "line": 301 + }, + { + "kind": "func", + "name": "ByCurrentUsagePeriodEnd", + "signature": "func ByCurrentUsagePeriodEnd(opts ...sql.OrderTermOption) OrderOption", + "line": 306 + }, + { + "kind": "func", + "name": "ByAnnotations", + "signature": "func ByAnnotations(opts ...sql.OrderTermOption) OrderOption", + "line": 311 + }, + { + "kind": "func", + "name": "ByUsageResetCount", + "signature": "func ByUsageResetCount(opts ...sql.OrderTermOption) OrderOption", + "line": 316 + }, + { + "kind": "func", + "name": "ByUsageReset", + "signature": "func ByUsageReset(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 323 + }, + { + "kind": "func", + "name": "ByGrantCount", + "signature": "func ByGrantCount(opts ...sql.OrderTermOption) OrderOption", + "line": 330 + }, + { + "kind": "func", + "name": "ByGrant", + "signature": "func ByGrant(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 337 + }, + { + "kind": "func", + "name": "ByBalanceSnapshotCount", + "signature": "func ByBalanceSnapshotCount(opts ...sql.OrderTermOption) OrderOption", + "line": 344 + }, + { + "kind": "func", + "name": "ByBalanceSnapshot", + "signature": "func ByBalanceSnapshot(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 351 + }, + { + "kind": "func", + "name": "BySubscriptionItemCount", + "signature": "func BySubscriptionItemCount(opts ...sql.OrderTermOption) OrderOption", + "line": 358 + }, + { + "kind": "func", + "name": "BySubscriptionItem", + "signature": "func BySubscriptionItem(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 365 + }, + { + "kind": "func", + "name": "ByFeatureField", + "signature": "func ByFeatureField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 372 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 379 + }, + { + "kind": "func", + "name": "newUsageResetStep", + "signature": "func newUsageResetStep() *sqlgraph.Step", + "line": 384 + }, + { + "kind": "func", + "name": "newGrantStep", + "signature": "func newGrantStep() *sqlgraph.Step", + "line": 391 + }, + { + "kind": "func", + "name": "newBalanceSnapshotStep", + "signature": "func newBalanceSnapshotStep() *sqlgraph.Step", + "line": 398 + }, + { + "kind": "func", + "name": "newSubscriptionItemStep", + "signature": "func newSubscriptionItemStep() *sqlgraph.Step", + "line": 405 + }, + { + "kind": "func", + "name": "newFeatureStep", + "signature": "func newFeatureStep() *sqlgraph.Step", + "line": 412 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 419 + } + ], + "line_count": 425 + }, + "openmeter/ent/db/entitlement/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Entitlement", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Entitlement", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Entitlement", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Entitlement", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Entitlement", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Entitlement", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Entitlement", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Entitlement", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Entitlement", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Entitlement", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Entitlement", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Entitlement", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Entitlement", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Entitlement", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Entitlement", + "line": 85 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.Entitlement", + "line": 90 + }, + { + "kind": "func", + "name": "ActiveFrom", + "signature": "func ActiveFrom(v time.Time) predicate.Entitlement", + "line": 95 + }, + { + "kind": "func", + "name": "ActiveTo", + "signature": "func ActiveTo(v time.Time) predicate.Entitlement", + "line": 100 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.Entitlement", + "line": 105 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.Entitlement", + "line": 110 + }, + { + "kind": "func", + "name": "MeasureUsageFrom", + "signature": "func MeasureUsageFrom(v time.Time) predicate.Entitlement", + "line": 115 + }, + { + "kind": "func", + "name": "IssueAfterReset", + "signature": "func IssueAfterReset(v float64) predicate.Entitlement", + "line": 120 + }, + { + "kind": "func", + "name": "IssueAfterResetPriority", + "signature": "func IssueAfterResetPriority(v uint8) predicate.Entitlement", + "line": 125 + }, + { + "kind": "func", + "name": "IsSoftLimit", + "signature": "func IsSoftLimit(v bool) predicate.Entitlement", + "line": 130 + }, + { + "kind": "func", + "name": "PreserveOverageAtReset", + "signature": "func PreserveOverageAtReset(v bool) predicate.Entitlement", + "line": 135 + }, + { + "kind": "func", + "name": "Config", + "signature": "func Config(v string) predicate.Entitlement", + "line": 140 + }, + { + "kind": "func", + "name": "UsagePeriodInterval", + "signature": "func UsagePeriodInterval(v datetime.ISODurationString) predicate.Entitlement", + "line": 145 + }, + { + "kind": "func", + "name": "UsagePeriodAnchor", + "signature": "func UsagePeriodAnchor(v time.Time) predicate.Entitlement", + "line": 151 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStart", + "signature": "func CurrentUsagePeriodStart(v time.Time) predicate.Entitlement", + "line": 156 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEnd", + "signature": "func CurrentUsagePeriodEnd(v time.Time) predicate.Entitlement", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Entitlement", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Entitlement", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Entitlement", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Entitlement", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Entitlement", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Entitlement", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Entitlement", + "line": 196 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Entitlement", + "line": 201 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Entitlement", + "line": 206 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Entitlement", + "line": 211 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Entitlement", + "line": 216 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Entitlement", + "line": 221 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Entitlement", + "line": 226 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Entitlement", + "line": 231 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Entitlement", + "line": 236 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Entitlement", + "line": 241 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Entitlement", + "line": 246 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Entitlement", + "line": 251 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Entitlement", + "line": 256 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Entitlement", + "line": 261 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Entitlement", + "line": 266 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Entitlement", + "line": 271 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Entitlement", + "line": 276 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Entitlement", + "line": 281 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Entitlement", + "line": 286 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Entitlement", + "line": 291 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Entitlement", + "line": 296 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Entitlement", + "line": 301 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Entitlement", + "line": 306 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Entitlement", + "line": 311 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Entitlement", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Entitlement", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Entitlement", + "line": 326 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Entitlement", + "line": 331 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Entitlement", + "line": 336 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Entitlement", + "line": 341 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Entitlement", + "line": 346 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Entitlement", + "line": 351 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Entitlement", + "line": 356 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Entitlement", + "line": 361 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Entitlement", + "line": 366 + }, + { + "kind": "func", + "name": "EntitlementTypeEQ", + "signature": "func EntitlementTypeEQ(v EntitlementType) predicate.Entitlement", + "line": 371 + }, + { + "kind": "func", + "name": "EntitlementTypeNEQ", + "signature": "func EntitlementTypeNEQ(v EntitlementType) predicate.Entitlement", + "line": 376 + }, + { + "kind": "func", + "name": "EntitlementTypeIn", + "signature": "func EntitlementTypeIn(vs ...EntitlementType) predicate.Entitlement", + "line": 381 + }, + { + "kind": "func", + "name": "EntitlementTypeNotIn", + "signature": "func EntitlementTypeNotIn(vs ...EntitlementType) predicate.Entitlement", + "line": 386 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.Entitlement", + "line": 391 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.Entitlement", + "line": 396 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.Entitlement", + "line": 401 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.Entitlement", + "line": 406 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.Entitlement", + "line": 411 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.Entitlement", + "line": 416 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.Entitlement", + "line": 421 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.Entitlement", + "line": 426 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.Entitlement", + "line": 431 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.Entitlement", + "line": 436 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.Entitlement", + "line": 441 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.Entitlement", + "line": 446 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.Entitlement", + "line": 451 + }, + { + "kind": "func", + "name": "ActiveFromEQ", + "signature": "func ActiveFromEQ(v time.Time) predicate.Entitlement", + "line": 456 + }, + { + "kind": "func", + "name": "ActiveFromNEQ", + "signature": "func ActiveFromNEQ(v time.Time) predicate.Entitlement", + "line": 461 + }, + { + "kind": "func", + "name": "ActiveFromIn", + "signature": "func ActiveFromIn(vs ...time.Time) predicate.Entitlement", + "line": 466 + }, + { + "kind": "func", + "name": "ActiveFromNotIn", + "signature": "func ActiveFromNotIn(vs ...time.Time) predicate.Entitlement", + "line": 471 + }, + { + "kind": "func", + "name": "ActiveFromGT", + "signature": "func ActiveFromGT(v time.Time) predicate.Entitlement", + "line": 476 + }, + { + "kind": "func", + "name": "ActiveFromGTE", + "signature": "func ActiveFromGTE(v time.Time) predicate.Entitlement", + "line": 481 + }, + { + "kind": "func", + "name": "ActiveFromLT", + "signature": "func ActiveFromLT(v time.Time) predicate.Entitlement", + "line": 486 + }, + { + "kind": "func", + "name": "ActiveFromLTE", + "signature": "func ActiveFromLTE(v time.Time) predicate.Entitlement", + "line": 491 + }, + { + "kind": "func", + "name": "ActiveFromIsNil", + "signature": "func ActiveFromIsNil() predicate.Entitlement", + "line": 496 + }, + { + "kind": "func", + "name": "ActiveFromNotNil", + "signature": "func ActiveFromNotNil() predicate.Entitlement", + "line": 501 + }, + { + "kind": "func", + "name": "ActiveToEQ", + "signature": "func ActiveToEQ(v time.Time) predicate.Entitlement", + "line": 506 + }, + { + "kind": "func", + "name": "ActiveToNEQ", + "signature": "func ActiveToNEQ(v time.Time) predicate.Entitlement", + "line": 511 + }, + { + "kind": "func", + "name": "ActiveToIn", + "signature": "func ActiveToIn(vs ...time.Time) predicate.Entitlement", + "line": 516 + }, + { + "kind": "func", + "name": "ActiveToNotIn", + "signature": "func ActiveToNotIn(vs ...time.Time) predicate.Entitlement", + "line": 521 + }, + { + "kind": "func", + "name": "ActiveToGT", + "signature": "func ActiveToGT(v time.Time) predicate.Entitlement", + "line": 526 + }, + { + "kind": "func", + "name": "ActiveToGTE", + "signature": "func ActiveToGTE(v time.Time) predicate.Entitlement", + "line": 531 + }, + { + "kind": "func", + "name": "ActiveToLT", + "signature": "func ActiveToLT(v time.Time) predicate.Entitlement", + "line": 536 + }, + { + "kind": "func", + "name": "ActiveToLTE", + "signature": "func ActiveToLTE(v time.Time) predicate.Entitlement", + "line": 541 + }, + { + "kind": "func", + "name": "ActiveToIsNil", + "signature": "func ActiveToIsNil() predicate.Entitlement", + "line": 546 + }, + { + "kind": "func", + "name": "ActiveToNotNil", + "signature": "func ActiveToNotNil() predicate.Entitlement", + "line": 551 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.Entitlement", + "line": 556 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.Entitlement", + "line": 561 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.Entitlement", + "line": 566 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.Entitlement", + "line": 571 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.Entitlement", + "line": 576 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.Entitlement", + "line": 581 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.Entitlement", + "line": 586 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.Entitlement", + "line": 591 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.Entitlement", + "line": 596 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.Entitlement", + "line": 601 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.Entitlement", + "line": 606 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.Entitlement", + "line": 611 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.Entitlement", + "line": 616 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.Entitlement", + "line": 621 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.Entitlement", + "line": 626 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.Entitlement", + "line": 631 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.Entitlement", + "line": 636 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.Entitlement", + "line": 641 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.Entitlement", + "line": 646 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.Entitlement", + "line": 651 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.Entitlement", + "line": 656 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.Entitlement", + "line": 661 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.Entitlement", + "line": 666 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.Entitlement", + "line": 671 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.Entitlement", + "line": 676 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.Entitlement", + "line": 681 + }, + { + "kind": "func", + "name": "MeasureUsageFromEQ", + "signature": "func MeasureUsageFromEQ(v time.Time) predicate.Entitlement", + "line": 686 + }, + { + "kind": "func", + "name": "MeasureUsageFromNEQ", + "signature": "func MeasureUsageFromNEQ(v time.Time) predicate.Entitlement", + "line": 691 + }, + { + "kind": "func", + "name": "MeasureUsageFromIn", + "signature": "func MeasureUsageFromIn(vs ...time.Time) predicate.Entitlement", + "line": 696 + }, + { + "kind": "func", + "name": "MeasureUsageFromNotIn", + "signature": "func MeasureUsageFromNotIn(vs ...time.Time) predicate.Entitlement", + "line": 701 + }, + { + "kind": "func", + "name": "MeasureUsageFromGT", + "signature": "func MeasureUsageFromGT(v time.Time) predicate.Entitlement", + "line": 706 + }, + { + "kind": "func", + "name": "MeasureUsageFromGTE", + "signature": "func MeasureUsageFromGTE(v time.Time) predicate.Entitlement", + "line": 711 + }, + { + "kind": "func", + "name": "MeasureUsageFromLT", + "signature": "func MeasureUsageFromLT(v time.Time) predicate.Entitlement", + "line": 716 + }, + { + "kind": "func", + "name": "MeasureUsageFromLTE", + "signature": "func MeasureUsageFromLTE(v time.Time) predicate.Entitlement", + "line": 721 + }, + { + "kind": "func", + "name": "MeasureUsageFromIsNil", + "signature": "func MeasureUsageFromIsNil() predicate.Entitlement", + "line": 726 + }, + { + "kind": "func", + "name": "MeasureUsageFromNotNil", + "signature": "func MeasureUsageFromNotNil() predicate.Entitlement", + "line": 731 + }, + { + "kind": "func", + "name": "IssueAfterResetEQ", + "signature": "func IssueAfterResetEQ(v float64) predicate.Entitlement", + "line": 736 + }, + { + "kind": "func", + "name": "IssueAfterResetNEQ", + "signature": "func IssueAfterResetNEQ(v float64) predicate.Entitlement", + "line": 741 + }, + { + "kind": "func", + "name": "IssueAfterResetIn", + "signature": "func IssueAfterResetIn(vs ...float64) predicate.Entitlement", + "line": 746 + }, + { + "kind": "func", + "name": "IssueAfterResetNotIn", + "signature": "func IssueAfterResetNotIn(vs ...float64) predicate.Entitlement", + "line": 751 + }, + { + "kind": "func", + "name": "IssueAfterResetGT", + "signature": "func IssueAfterResetGT(v float64) predicate.Entitlement", + "line": 756 + }, + { + "kind": "func", + "name": "IssueAfterResetGTE", + "signature": "func IssueAfterResetGTE(v float64) predicate.Entitlement", + "line": 761 + }, + { + "kind": "func", + "name": "IssueAfterResetLT", + "signature": "func IssueAfterResetLT(v float64) predicate.Entitlement", + "line": 766 + }, + { + "kind": "func", + "name": "IssueAfterResetLTE", + "signature": "func IssueAfterResetLTE(v float64) predicate.Entitlement", + "line": 771 + }, + { + "kind": "func", + "name": "IssueAfterResetIsNil", + "signature": "func IssueAfterResetIsNil() predicate.Entitlement", + "line": 776 + }, + { + "kind": "func", + "name": "IssueAfterResetNotNil", + "signature": "func IssueAfterResetNotNil() predicate.Entitlement", + "line": 781 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityEQ", + "signature": "func IssueAfterResetPriorityEQ(v uint8) predicate.Entitlement", + "line": 786 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityNEQ", + "signature": "func IssueAfterResetPriorityNEQ(v uint8) predicate.Entitlement", + "line": 791 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityIn", + "signature": "func IssueAfterResetPriorityIn(vs ...uint8) predicate.Entitlement", + "line": 796 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityNotIn", + "signature": "func IssueAfterResetPriorityNotIn(vs ...uint8) predicate.Entitlement", + "line": 801 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityGT", + "signature": "func IssueAfterResetPriorityGT(v uint8) predicate.Entitlement", + "line": 806 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityGTE", + "signature": "func IssueAfterResetPriorityGTE(v uint8) predicate.Entitlement", + "line": 811 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityLT", + "signature": "func IssueAfterResetPriorityLT(v uint8) predicate.Entitlement", + "line": 816 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityLTE", + "signature": "func IssueAfterResetPriorityLTE(v uint8) predicate.Entitlement", + "line": 821 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityIsNil", + "signature": "func IssueAfterResetPriorityIsNil() predicate.Entitlement", + "line": 826 + }, + { + "kind": "func", + "name": "IssueAfterResetPriorityNotNil", + "signature": "func IssueAfterResetPriorityNotNil() predicate.Entitlement", + "line": 831 + }, + { + "kind": "func", + "name": "IsSoftLimitEQ", + "signature": "func IsSoftLimitEQ(v bool) predicate.Entitlement", + "line": 836 + }, + { + "kind": "func", + "name": "IsSoftLimitNEQ", + "signature": "func IsSoftLimitNEQ(v bool) predicate.Entitlement", + "line": 841 + }, + { + "kind": "func", + "name": "IsSoftLimitIsNil", + "signature": "func IsSoftLimitIsNil() predicate.Entitlement", + "line": 846 + }, + { + "kind": "func", + "name": "IsSoftLimitNotNil", + "signature": "func IsSoftLimitNotNil() predicate.Entitlement", + "line": 851 + }, + { + "kind": "func", + "name": "PreserveOverageAtResetEQ", + "signature": "func PreserveOverageAtResetEQ(v bool) predicate.Entitlement", + "line": 856 + }, + { + "kind": "func", + "name": "PreserveOverageAtResetNEQ", + "signature": "func PreserveOverageAtResetNEQ(v bool) predicate.Entitlement", + "line": 861 + }, + { + "kind": "func", + "name": "PreserveOverageAtResetIsNil", + "signature": "func PreserveOverageAtResetIsNil() predicate.Entitlement", + "line": 866 + }, + { + "kind": "func", + "name": "PreserveOverageAtResetNotNil", + "signature": "func PreserveOverageAtResetNotNil() predicate.Entitlement", + "line": 871 + }, + { + "kind": "func", + "name": "ConfigEQ", + "signature": "func ConfigEQ(v string) predicate.Entitlement", + "line": 876 + }, + { + "kind": "func", + "name": "ConfigNEQ", + "signature": "func ConfigNEQ(v string) predicate.Entitlement", + "line": 881 + }, + { + "kind": "func", + "name": "ConfigIn", + "signature": "func ConfigIn(vs ...string) predicate.Entitlement", + "line": 886 + }, + { + "kind": "func", + "name": "ConfigNotIn", + "signature": "func ConfigNotIn(vs ...string) predicate.Entitlement", + "line": 891 + }, + { + "kind": "func", + "name": "ConfigGT", + "signature": "func ConfigGT(v string) predicate.Entitlement", + "line": 896 + }, + { + "kind": "func", + "name": "ConfigGTE", + "signature": "func ConfigGTE(v string) predicate.Entitlement", + "line": 901 + }, + { + "kind": "func", + "name": "ConfigLT", + "signature": "func ConfigLT(v string) predicate.Entitlement", + "line": 906 + }, + { + "kind": "func", + "name": "ConfigLTE", + "signature": "func ConfigLTE(v string) predicate.Entitlement", + "line": 911 + }, + { + "kind": "func", + "name": "ConfigContains", + "signature": "func ConfigContains(v string) predicate.Entitlement", + "line": 916 + }, + { + "kind": "func", + "name": "ConfigHasPrefix", + "signature": "func ConfigHasPrefix(v string) predicate.Entitlement", + "line": 921 + }, + { + "kind": "func", + "name": "ConfigHasSuffix", + "signature": "func ConfigHasSuffix(v string) predicate.Entitlement", + "line": 926 + }, + { + "kind": "func", + "name": "ConfigIsNil", + "signature": "func ConfigIsNil() predicate.Entitlement", + "line": 931 + }, + { + "kind": "func", + "name": "ConfigNotNil", + "signature": "func ConfigNotNil() predicate.Entitlement", + "line": 936 + }, + { + "kind": "func", + "name": "ConfigEqualFold", + "signature": "func ConfigEqualFold(v string) predicate.Entitlement", + "line": 941 + }, + { + "kind": "func", + "name": "ConfigContainsFold", + "signature": "func ConfigContainsFold(v string) predicate.Entitlement", + "line": 946 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalEQ", + "signature": "func UsagePeriodIntervalEQ(v datetime.ISODurationString) predicate.Entitlement", + "line": 951 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalNEQ", + "signature": "func UsagePeriodIntervalNEQ(v datetime.ISODurationString) predicate.Entitlement", + "line": 957 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalIn", + "signature": "func UsagePeriodIntervalIn(vs ...datetime.ISODurationString) predicate.Entitlement", + "line": 963 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalNotIn", + "signature": "func UsagePeriodIntervalNotIn(vs ...datetime.ISODurationString) predicate.Entitlement", + "line": 972 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalGT", + "signature": "func UsagePeriodIntervalGT(v datetime.ISODurationString) predicate.Entitlement", + "line": 981 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalGTE", + "signature": "func UsagePeriodIntervalGTE(v datetime.ISODurationString) predicate.Entitlement", + "line": 987 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalLT", + "signature": "func UsagePeriodIntervalLT(v datetime.ISODurationString) predicate.Entitlement", + "line": 993 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalLTE", + "signature": "func UsagePeriodIntervalLTE(v datetime.ISODurationString) predicate.Entitlement", + "line": 999 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalContains", + "signature": "func UsagePeriodIntervalContains(v datetime.ISODurationString) predicate.Entitlement", + "line": 1005 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalHasPrefix", + "signature": "func UsagePeriodIntervalHasPrefix(v datetime.ISODurationString) predicate.Entitlement", + "line": 1011 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalHasSuffix", + "signature": "func UsagePeriodIntervalHasSuffix(v datetime.ISODurationString) predicate.Entitlement", + "line": 1017 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalIsNil", + "signature": "func UsagePeriodIntervalIsNil() predicate.Entitlement", + "line": 1023 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalNotNil", + "signature": "func UsagePeriodIntervalNotNil() predicate.Entitlement", + "line": 1028 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalEqualFold", + "signature": "func UsagePeriodIntervalEqualFold(v datetime.ISODurationString) predicate.Entitlement", + "line": 1033 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalContainsFold", + "signature": "func UsagePeriodIntervalContainsFold(v datetime.ISODurationString) predicate.Entitlement", + "line": 1039 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorEQ", + "signature": "func UsagePeriodAnchorEQ(v time.Time) predicate.Entitlement", + "line": 1045 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorNEQ", + "signature": "func UsagePeriodAnchorNEQ(v time.Time) predicate.Entitlement", + "line": 1050 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorIn", + "signature": "func UsagePeriodAnchorIn(vs ...time.Time) predicate.Entitlement", + "line": 1055 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorNotIn", + "signature": "func UsagePeriodAnchorNotIn(vs ...time.Time) predicate.Entitlement", + "line": 1060 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorGT", + "signature": "func UsagePeriodAnchorGT(v time.Time) predicate.Entitlement", + "line": 1065 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorGTE", + "signature": "func UsagePeriodAnchorGTE(v time.Time) predicate.Entitlement", + "line": 1070 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorLT", + "signature": "func UsagePeriodAnchorLT(v time.Time) predicate.Entitlement", + "line": 1075 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorLTE", + "signature": "func UsagePeriodAnchorLTE(v time.Time) predicate.Entitlement", + "line": 1080 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorIsNil", + "signature": "func UsagePeriodAnchorIsNil() predicate.Entitlement", + "line": 1085 + }, + { + "kind": "func", + "name": "UsagePeriodAnchorNotNil", + "signature": "func UsagePeriodAnchorNotNil() predicate.Entitlement", + "line": 1090 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartEQ", + "signature": "func CurrentUsagePeriodStartEQ(v time.Time) predicate.Entitlement", + "line": 1095 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartNEQ", + "signature": "func CurrentUsagePeriodStartNEQ(v time.Time) predicate.Entitlement", + "line": 1100 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartIn", + "signature": "func CurrentUsagePeriodStartIn(vs ...time.Time) predicate.Entitlement", + "line": 1105 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartNotIn", + "signature": "func CurrentUsagePeriodStartNotIn(vs ...time.Time) predicate.Entitlement", + "line": 1110 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartGT", + "signature": "func CurrentUsagePeriodStartGT(v time.Time) predicate.Entitlement", + "line": 1115 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartGTE", + "signature": "func CurrentUsagePeriodStartGTE(v time.Time) predicate.Entitlement", + "line": 1120 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartLT", + "signature": "func CurrentUsagePeriodStartLT(v time.Time) predicate.Entitlement", + "line": 1125 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartLTE", + "signature": "func CurrentUsagePeriodStartLTE(v time.Time) predicate.Entitlement", + "line": 1130 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartIsNil", + "signature": "func CurrentUsagePeriodStartIsNil() predicate.Entitlement", + "line": 1135 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodStartNotNil", + "signature": "func CurrentUsagePeriodStartNotNil() predicate.Entitlement", + "line": 1140 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndEQ", + "signature": "func CurrentUsagePeriodEndEQ(v time.Time) predicate.Entitlement", + "line": 1145 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndNEQ", + "signature": "func CurrentUsagePeriodEndNEQ(v time.Time) predicate.Entitlement", + "line": 1150 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndIn", + "signature": "func CurrentUsagePeriodEndIn(vs ...time.Time) predicate.Entitlement", + "line": 1155 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndNotIn", + "signature": "func CurrentUsagePeriodEndNotIn(vs ...time.Time) predicate.Entitlement", + "line": 1160 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndGT", + "signature": "func CurrentUsagePeriodEndGT(v time.Time) predicate.Entitlement", + "line": 1165 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndGTE", + "signature": "func CurrentUsagePeriodEndGTE(v time.Time) predicate.Entitlement", + "line": 1170 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndLT", + "signature": "func CurrentUsagePeriodEndLT(v time.Time) predicate.Entitlement", + "line": 1175 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndLTE", + "signature": "func CurrentUsagePeriodEndLTE(v time.Time) predicate.Entitlement", + "line": 1180 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndIsNil", + "signature": "func CurrentUsagePeriodEndIsNil() predicate.Entitlement", + "line": 1185 + }, + { + "kind": "func", + "name": "CurrentUsagePeriodEndNotNil", + "signature": "func CurrentUsagePeriodEndNotNil() predicate.Entitlement", + "line": 1190 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Entitlement", + "line": 1195 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Entitlement", + "line": 1200 + }, + { + "kind": "func", + "name": "HasUsageReset", + "signature": "func HasUsageReset() predicate.Entitlement", + "line": 1205 + }, + { + "kind": "func", + "name": "HasUsageResetWith", + "signature": "func HasUsageResetWith(preds ...predicate.UsageReset) predicate.Entitlement", + "line": 1216 + }, + { + "kind": "func", + "name": "HasGrant", + "signature": "func HasGrant() predicate.Entitlement", + "line": 1228 + }, + { + "kind": "func", + "name": "HasGrantWith", + "signature": "func HasGrantWith(preds ...predicate.Grant) predicate.Entitlement", + "line": 1239 + }, + { + "kind": "func", + "name": "HasBalanceSnapshot", + "signature": "func HasBalanceSnapshot() predicate.Entitlement", + "line": 1251 + }, + { + "kind": "func", + "name": "HasBalanceSnapshotWith", + "signature": "func HasBalanceSnapshotWith(preds ...predicate.BalanceSnapshot) predicate.Entitlement", + "line": 1262 + }, + { + "kind": "func", + "name": "HasSubscriptionItem", + "signature": "func HasSubscriptionItem() predicate.Entitlement", + "line": 1274 + }, + { + "kind": "func", + "name": "HasSubscriptionItemWith", + "signature": "func HasSubscriptionItemWith(preds ...predicate.SubscriptionItem) predicate.Entitlement", + "line": 1285 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func HasFeature() predicate.Entitlement", + "line": 1297 + }, + { + "kind": "func", + "name": "HasFeatureWith", + "signature": "func HasFeatureWith(preds ...predicate.Feature) predicate.Entitlement", + "line": 1308 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.Entitlement", + "line": 1320 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.Entitlement", + "line": 1331 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Entitlement) predicate.Entitlement", + "line": 1343 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Entitlement) predicate.Entitlement", + "line": 1348 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Entitlement) predicate.Entitlement", + "line": 1353 + } + ], + "line_count": 1355 + }, + "openmeter/ent/db/entitlement_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementCreate", + "signature": "type EntitlementCreate struct", + "line": 27 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *EntitlementCreate) SetNamespace(v string) *EntitlementCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *EntitlementCreate) SetMetadata(v map[string]string) *EntitlementCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *EntitlementCreate) SetCreatedAt(v time.Time) *EntitlementCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *EntitlementCreate) SetNillableCreatedAt(v *time.Time) *EntitlementCreate", + "line": 53 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *EntitlementCreate) SetUpdatedAt(v time.Time) *EntitlementCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *EntitlementCreate) SetNillableUpdatedAt(v *time.Time) *EntitlementCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *EntitlementCreate) SetDeletedAt(v time.Time) *EntitlementCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *EntitlementCreate) SetNillableDeletedAt(v *time.Time) *EntitlementCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetEntitlementType", + "signature": "func (_c *EntitlementCreate) SetEntitlementType(v entitlement.EntitlementType) *EntitlementCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *EntitlementCreate) SetFeatureID(v string) *EntitlementCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_c *EntitlementCreate) SetActiveFrom(v time.Time) *EntitlementCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetNillableActiveFrom", + "signature": "func (_c *EntitlementCreate) SetNillableActiveFrom(v *time.Time) *EntitlementCreate", + "line": 107 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_c *EntitlementCreate) SetActiveTo(v time.Time) *EntitlementCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_c *EntitlementCreate) SetNillableActiveTo(v *time.Time) *EntitlementCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *EntitlementCreate) SetFeatureKey(v string) *EntitlementCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *EntitlementCreate) SetCustomerID(v string) *EntitlementCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetMeasureUsageFrom", + "signature": "func (_c *EntitlementCreate) SetMeasureUsageFrom(v time.Time) *EntitlementCreate", + "line": 141 + }, + { + "kind": "func", + "name": "SetNillableMeasureUsageFrom", + "signature": "func (_c *EntitlementCreate) SetNillableMeasureUsageFrom(v *time.Time) *EntitlementCreate", + "line": 147 + }, + { + "kind": "func", + "name": "SetIssueAfterReset", + "signature": "func (_c *EntitlementCreate) SetIssueAfterReset(v float64) *EntitlementCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableIssueAfterReset", + "signature": "func (_c *EntitlementCreate) SetNillableIssueAfterReset(v *float64) *EntitlementCreate", + "line": 161 + }, + { + "kind": "func", + "name": "SetIssueAfterResetPriority", + "signature": "func (_c *EntitlementCreate) SetIssueAfterResetPriority(v uint8) *EntitlementCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetNillableIssueAfterResetPriority", + "signature": "func (_c *EntitlementCreate) SetNillableIssueAfterResetPriority(v *uint8) *EntitlementCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetIsSoftLimit", + "signature": "func (_c *EntitlementCreate) SetIsSoftLimit(v bool) *EntitlementCreate", + "line": 183 + }, + { + "kind": "func", + "name": "SetNillableIsSoftLimit", + "signature": "func (_c *EntitlementCreate) SetNillableIsSoftLimit(v *bool) *EntitlementCreate", + "line": 189 + }, + { + "kind": "func", + "name": "SetPreserveOverageAtReset", + "signature": "func (_c *EntitlementCreate) SetPreserveOverageAtReset(v bool) *EntitlementCreate", + "line": 197 + }, + { + "kind": "func", + "name": "SetNillablePreserveOverageAtReset", + "signature": "func (_c *EntitlementCreate) SetNillablePreserveOverageAtReset(v *bool) *EntitlementCreate", + "line": 203 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_c *EntitlementCreate) SetConfig(v string) *EntitlementCreate", + "line": 211 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_c *EntitlementCreate) SetNillableConfig(v *string) *EntitlementCreate", + "line": 217 + }, + { + "kind": "func", + "name": "SetUsagePeriodInterval", + "signature": "func (_c *EntitlementCreate) SetUsagePeriodInterval(v datetime.ISODurationString) *EntitlementCreate", + "line": 225 + }, + { + "kind": "func", + "name": "SetNillableUsagePeriodInterval", + "signature": "func (_c *EntitlementCreate) SetNillableUsagePeriodInterval(v *datetime.ISODurationString) *EntitlementCreate", + "line": 231 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (_c *EntitlementCreate) SetUsagePeriodAnchor(v time.Time) *EntitlementCreate", + "line": 239 + }, + { + "kind": "func", + "name": "SetNillableUsagePeriodAnchor", + "signature": "func (_c *EntitlementCreate) SetNillableUsagePeriodAnchor(v *time.Time) *EntitlementCreate", + "line": 245 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (_c *EntitlementCreate) SetCurrentUsagePeriodStart(v time.Time) *EntitlementCreate", + "line": 253 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodStart", + "signature": "func (_c *EntitlementCreate) SetNillableCurrentUsagePeriodStart(v *time.Time) *EntitlementCreate", + "line": 259 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (_c *EntitlementCreate) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementCreate", + "line": 267 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodEnd", + "signature": "func (_c *EntitlementCreate) SetNillableCurrentUsagePeriodEnd(v *time.Time) *EntitlementCreate", + "line": 273 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *EntitlementCreate) SetAnnotations(v models.Annotations) *EntitlementCreate", + "line": 281 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *EntitlementCreate) SetID(v string) *EntitlementCreate", + "line": 287 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *EntitlementCreate) SetNillableID(v *string) *EntitlementCreate", + "line": 293 + }, + { + "kind": "func", + "name": "AddUsageResetIDs", + "signature": "func (_c *EntitlementCreate) AddUsageResetIDs(ids ...string) *EntitlementCreate", + "line": 301 + }, + { + "kind": "func", + "name": "AddUsageReset", + "signature": "func (_c *EntitlementCreate) AddUsageReset(v ...*UsageReset) *EntitlementCreate", + "line": 307 + }, + { + "kind": "func", + "name": "AddGrantIDs", + "signature": "func (_c *EntitlementCreate) AddGrantIDs(ids ...string) *EntitlementCreate", + "line": 316 + }, + { + "kind": "func", + "name": "AddGrant", + "signature": "func (_c *EntitlementCreate) AddGrant(v ...*Grant) *EntitlementCreate", + "line": 322 + }, + { + "kind": "func", + "name": "AddBalanceSnapshotIDs", + "signature": "func (_c *EntitlementCreate) AddBalanceSnapshotIDs(ids ...int) *EntitlementCreate", + "line": 331 + }, + { + "kind": "func", + "name": "AddBalanceSnapshot", + "signature": "func (_c *EntitlementCreate) AddBalanceSnapshot(v ...*BalanceSnapshot) *EntitlementCreate", + "line": 337 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_c *EntitlementCreate) AddSubscriptionItemIDs(ids ...string) *EntitlementCreate", + "line": 346 + }, + { + "kind": "func", + "name": "AddSubscriptionItem", + "signature": "func (_c *EntitlementCreate) AddSubscriptionItem(v ...*SubscriptionItem) *EntitlementCreate", + "line": 352 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (_c *EntitlementCreate) SetFeature(v *Feature) *EntitlementCreate", + "line": 361 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *EntitlementCreate) SetCustomer(v *Customer) *EntitlementCreate", + "line": 366 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *EntitlementCreate) Mutation() *EntitlementMutation", + "line": 371 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *EntitlementCreate) Save(ctx context.Context) (*Entitlement, error)", + "line": 376 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *EntitlementCreate) SaveX(ctx context.Context) *Entitlement", + "line": 382 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *EntitlementCreate) Exec(ctx context.Context) error", + "line": 391 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *EntitlementCreate) ExecX(ctx context.Context)", + "line": 397 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *EntitlementCreate) defaults()", + "line": 404 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *EntitlementCreate) check() error", + "line": 420 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *EntitlementCreate) sqlSave(ctx context.Context) (*Entitlement, error)", + "line": 466 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *EntitlementCreate) createSpec() (*Entitlement, *sqlgraph.CreateSpec, error)", + "line": 492 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *EntitlementCreate) OnConflict(opts ...sql.ConflictOption) *EntitlementUpsertOne", + "line": 703 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *EntitlementCreate) OnConflictColumns(columns ...string) *EntitlementUpsertOne", + "line": 716 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *EntitlementUpsert) SetMetadata(v map[string]string) *EntitlementUpsert", + "line": 737 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *EntitlementUpsert) UpdateMetadata() *EntitlementUpsert", + "line": 743 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *EntitlementUpsert) ClearMetadata() *EntitlementUpsert", + "line": 749 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *EntitlementUpsert) SetUpdatedAt(v time.Time) *EntitlementUpsert", + "line": 755 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *EntitlementUpsert) UpdateUpdatedAt() *EntitlementUpsert", + "line": 761 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *EntitlementUpsert) SetDeletedAt(v time.Time) *EntitlementUpsert", + "line": 767 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *EntitlementUpsert) UpdateDeletedAt() *EntitlementUpsert", + "line": 773 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *EntitlementUpsert) ClearDeletedAt() *EntitlementUpsert", + "line": 779 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *EntitlementUpsert) SetActiveTo(v time.Time) *EntitlementUpsert", + "line": 785 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *EntitlementUpsert) UpdateActiveTo() *EntitlementUpsert", + "line": 791 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *EntitlementUpsert) ClearActiveTo() *EntitlementUpsert", + "line": 797 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *EntitlementUpsert) SetConfig(v string) *EntitlementUpsert", + "line": 803 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *EntitlementUpsert) UpdateConfig() *EntitlementUpsert", + "line": 809 + }, + { + "kind": "func", + "name": "ClearConfig", + "signature": "func (u *EntitlementUpsert) ClearConfig() *EntitlementUpsert", + "line": 815 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsert) SetUsagePeriodAnchor(v time.Time) *EntitlementUpsert", + "line": 821 + }, + { + "kind": "func", + "name": "UpdateUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsert) UpdateUsagePeriodAnchor() *EntitlementUpsert", + "line": 827 + }, + { + "kind": "func", + "name": "ClearUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsert) ClearUsagePeriodAnchor() *EntitlementUpsert", + "line": 833 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsert) SetCurrentUsagePeriodStart(v time.Time) *EntitlementUpsert", + "line": 839 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsert) UpdateCurrentUsagePeriodStart() *EntitlementUpsert", + "line": 845 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsert) ClearCurrentUsagePeriodStart() *EntitlementUpsert", + "line": 851 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsert) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementUpsert", + "line": 857 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsert) UpdateCurrentUsagePeriodEnd() *EntitlementUpsert", + "line": 863 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsert) ClearCurrentUsagePeriodEnd() *EntitlementUpsert", + "line": 869 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *EntitlementUpsert) SetAnnotations(v models.Annotations) *EntitlementUpsert", + "line": 875 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *EntitlementUpsert) UpdateAnnotations() *EntitlementUpsert", + "line": 881 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *EntitlementUpsert) ClearAnnotations() *EntitlementUpsert", + "line": 887 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *EntitlementUpsertOne) UpdateNewValues() *EntitlementUpsertOne", + "line": 903 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *EntitlementUpsertOne) Ignore() *EntitlementUpsertOne", + "line": 958 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *EntitlementUpsertOne) DoNothing() *EntitlementUpsertOne", + "line": 965 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *EntitlementUpsertOne) Update(set func(*EntitlementUpsert)) *EntitlementUpsertOne", + "line": 972 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *EntitlementUpsertOne) SetMetadata(v map[string]string) *EntitlementUpsertOne", + "line": 980 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *EntitlementUpsertOne) UpdateMetadata() *EntitlementUpsertOne", + "line": 987 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *EntitlementUpsertOne) ClearMetadata() *EntitlementUpsertOne", + "line": 994 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *EntitlementUpsertOne) SetUpdatedAt(v time.Time) *EntitlementUpsertOne", + "line": 1001 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *EntitlementUpsertOne) UpdateUpdatedAt() *EntitlementUpsertOne", + "line": 1008 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *EntitlementUpsertOne) SetDeletedAt(v time.Time) *EntitlementUpsertOne", + "line": 1015 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *EntitlementUpsertOne) UpdateDeletedAt() *EntitlementUpsertOne", + "line": 1022 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *EntitlementUpsertOne) ClearDeletedAt() *EntitlementUpsertOne", + "line": 1029 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *EntitlementUpsertOne) SetActiveTo(v time.Time) *EntitlementUpsertOne", + "line": 1036 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *EntitlementUpsertOne) UpdateActiveTo() *EntitlementUpsertOne", + "line": 1043 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *EntitlementUpsertOne) ClearActiveTo() *EntitlementUpsertOne", + "line": 1050 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *EntitlementUpsertOne) SetConfig(v string) *EntitlementUpsertOne", + "line": 1057 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *EntitlementUpsertOne) UpdateConfig() *EntitlementUpsertOne", + "line": 1064 + }, + { + "kind": "func", + "name": "ClearConfig", + "signature": "func (u *EntitlementUpsertOne) ClearConfig() *EntitlementUpsertOne", + "line": 1071 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertOne) SetUsagePeriodAnchor(v time.Time) *EntitlementUpsertOne", + "line": 1078 + }, + { + "kind": "func", + "name": "UpdateUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertOne) UpdateUsagePeriodAnchor() *EntitlementUpsertOne", + "line": 1085 + }, + { + "kind": "func", + "name": "ClearUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertOne) ClearUsagePeriodAnchor() *EntitlementUpsertOne", + "line": 1092 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertOne) SetCurrentUsagePeriodStart(v time.Time) *EntitlementUpsertOne", + "line": 1099 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertOne) UpdateCurrentUsagePeriodStart() *EntitlementUpsertOne", + "line": 1106 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertOne) ClearCurrentUsagePeriodStart() *EntitlementUpsertOne", + "line": 1113 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertOne) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementUpsertOne", + "line": 1120 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertOne) UpdateCurrentUsagePeriodEnd() *EntitlementUpsertOne", + "line": 1127 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertOne) ClearCurrentUsagePeriodEnd() *EntitlementUpsertOne", + "line": 1134 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *EntitlementUpsertOne) SetAnnotations(v models.Annotations) *EntitlementUpsertOne", + "line": 1141 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *EntitlementUpsertOne) UpdateAnnotations() *EntitlementUpsertOne", + "line": 1148 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *EntitlementUpsertOne) ClearAnnotations() *EntitlementUpsertOne", + "line": 1155 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *EntitlementUpsertOne) Exec(ctx context.Context) error", + "line": 1162 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *EntitlementUpsertOne) ExecX(ctx context.Context)", + "line": 1170 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *EntitlementUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1177 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *EntitlementUpsertOne) IDX(ctx context.Context) string", + "line": 1191 + }, + { + "kind": "struct", + "name": "EntitlementCreateBulk", + "signature": "type EntitlementCreateBulk struct", + "line": 1200 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *EntitlementCreateBulk) Save(ctx context.Context) ([]*Entitlement, error)", + "line": 1208 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *EntitlementCreateBulk) SaveX(ctx context.Context) []*Entitlement", + "line": 1267 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *EntitlementCreateBulk) Exec(ctx context.Context) error", + "line": 1276 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *EntitlementCreateBulk) ExecX(ctx context.Context)", + "line": 1282 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *EntitlementCreateBulk) OnConflict(opts ...sql.ConflictOption) *EntitlementUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *EntitlementCreateBulk) OnConflictColumns(columns ...string) *EntitlementUpsertBulk", + "line": 1316 + }, + { + "kind": "struct", + "name": "EntitlementUpsertBulk", + "signature": "type EntitlementUpsertBulk struct", + "line": 1325 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *EntitlementUpsertBulk) UpdateNewValues() *EntitlementUpsertBulk", + "line": 1340 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *EntitlementUpsertBulk) Ignore() *EntitlementUpsertBulk", + "line": 1397 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *EntitlementUpsertBulk) DoNothing() *EntitlementUpsertBulk", + "line": 1404 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *EntitlementUpsertBulk) Update(set func(*EntitlementUpsert)) *EntitlementUpsertBulk", + "line": 1411 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *EntitlementUpsertBulk) SetMetadata(v map[string]string) *EntitlementUpsertBulk", + "line": 1419 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *EntitlementUpsertBulk) UpdateMetadata() *EntitlementUpsertBulk", + "line": 1426 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *EntitlementUpsertBulk) ClearMetadata() *EntitlementUpsertBulk", + "line": 1433 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *EntitlementUpsertBulk) SetUpdatedAt(v time.Time) *EntitlementUpsertBulk", + "line": 1440 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *EntitlementUpsertBulk) UpdateUpdatedAt() *EntitlementUpsertBulk", + "line": 1447 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *EntitlementUpsertBulk) SetDeletedAt(v time.Time) *EntitlementUpsertBulk", + "line": 1454 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *EntitlementUpsertBulk) UpdateDeletedAt() *EntitlementUpsertBulk", + "line": 1461 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *EntitlementUpsertBulk) ClearDeletedAt() *EntitlementUpsertBulk", + "line": 1468 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *EntitlementUpsertBulk) SetActiveTo(v time.Time) *EntitlementUpsertBulk", + "line": 1475 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *EntitlementUpsertBulk) UpdateActiveTo() *EntitlementUpsertBulk", + "line": 1482 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *EntitlementUpsertBulk) ClearActiveTo() *EntitlementUpsertBulk", + "line": 1489 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *EntitlementUpsertBulk) SetConfig(v string) *EntitlementUpsertBulk", + "line": 1496 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *EntitlementUpsertBulk) UpdateConfig() *EntitlementUpsertBulk", + "line": 1503 + }, + { + "kind": "func", + "name": "ClearConfig", + "signature": "func (u *EntitlementUpsertBulk) ClearConfig() *EntitlementUpsertBulk", + "line": 1510 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertBulk) SetUsagePeriodAnchor(v time.Time) *EntitlementUpsertBulk", + "line": 1517 + }, + { + "kind": "func", + "name": "UpdateUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertBulk) UpdateUsagePeriodAnchor() *EntitlementUpsertBulk", + "line": 1524 + }, + { + "kind": "func", + "name": "ClearUsagePeriodAnchor", + "signature": "func (u *EntitlementUpsertBulk) ClearUsagePeriodAnchor() *EntitlementUpsertBulk", + "line": 1531 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertBulk) SetCurrentUsagePeriodStart(v time.Time) *EntitlementUpsertBulk", + "line": 1538 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertBulk) UpdateCurrentUsagePeriodStart() *EntitlementUpsertBulk", + "line": 1545 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpsertBulk) ClearCurrentUsagePeriodStart() *EntitlementUpsertBulk", + "line": 1552 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertBulk) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementUpsertBulk", + "line": 1559 + }, + { + "kind": "func", + "name": "UpdateCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertBulk) UpdateCurrentUsagePeriodEnd() *EntitlementUpsertBulk", + "line": 1566 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpsertBulk) ClearCurrentUsagePeriodEnd() *EntitlementUpsertBulk", + "line": 1573 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *EntitlementUpsertBulk) SetAnnotations(v models.Annotations) *EntitlementUpsertBulk", + "line": 1580 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *EntitlementUpsertBulk) UpdateAnnotations() *EntitlementUpsertBulk", + "line": 1587 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *EntitlementUpsertBulk) ClearAnnotations() *EntitlementUpsertBulk", + "line": 1594 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *EntitlementUpsertBulk) Exec(ctx context.Context) error", + "line": 1601 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *EntitlementUpsertBulk) ExecX(ctx context.Context)", + "line": 1617 + } + ], + "line_count": 1621 + }, + "openmeter/ent/db/entitlement_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementDelete", + "signature": "type EntitlementDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *EntitlementDelete) Where(ps ...predicate.Entitlement) *EntitlementDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *EntitlementDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *EntitlementDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *EntitlementDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "EntitlementDeleteOne", + "signature": "type EntitlementDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *EntitlementDeleteOne) Where(ps ...predicate.Entitlement) *EntitlementDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *EntitlementDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *EntitlementDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/entitlement_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementQuery", + "signature": "type EntitlementQuery struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *EntitlementQuery) Where(ps ...predicate.Entitlement) *EntitlementQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *EntitlementQuery) Limit(limit int) *EntitlementQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *EntitlementQuery) Offset(offset int) *EntitlementQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *EntitlementQuery) Unique(unique bool) *EntitlementQuery", + "line": 65 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *EntitlementQuery) Order(o ...entitlement.OrderOption) *EntitlementQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryUsageReset", + "signature": "func (_q *EntitlementQuery) QueryUsageReset() *UsageResetQuery", + "line": 77 + }, + { + "kind": "func", + "name": "QueryGrant", + "signature": "func (_q *EntitlementQuery) QueryGrant() *GrantQuery", + "line": 99 + }, + { + "kind": "func", + "name": "QueryBalanceSnapshot", + "signature": "func (_q *EntitlementQuery) QueryBalanceSnapshot() *BalanceSnapshotQuery", + "line": 121 + }, + { + "kind": "func", + "name": "QuerySubscriptionItem", + "signature": "func (_q *EntitlementQuery) QuerySubscriptionItem() *SubscriptionItemQuery", + "line": 143 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_q *EntitlementQuery) QueryFeature() *FeatureQuery", + "line": 165 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *EntitlementQuery) QueryCustomer() *CustomerQuery", + "line": 187 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *EntitlementQuery) First(ctx context.Context) (*Entitlement, error)", + "line": 210 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *EntitlementQuery) FirstX(ctx context.Context) *Entitlement", + "line": 222 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *EntitlementQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *EntitlementQuery) FirstIDX(ctx context.Context) string", + "line": 245 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *EntitlementQuery) Only(ctx context.Context) (*Entitlement, error)", + "line": 256 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *EntitlementQuery) OnlyX(ctx context.Context) *Entitlement", + "line": 272 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *EntitlementQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 283 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *EntitlementQuery) OnlyIDX(ctx context.Context) string", + "line": 300 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *EntitlementQuery) All(ctx context.Context) ([]*Entitlement, error)", + "line": 309 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *EntitlementQuery) AllX(ctx context.Context) []*Entitlement", + "line": 319 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *EntitlementQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 328 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *EntitlementQuery) IDsX(ctx context.Context) []string", + "line": 340 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *EntitlementQuery) Count(ctx context.Context) (int, error)", + "line": 349 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *EntitlementQuery) CountX(ctx context.Context) int", + "line": 358 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *EntitlementQuery) Exist(ctx context.Context) (bool, error)", + "line": 367 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *EntitlementQuery) ExistX(ctx context.Context) bool", + "line": 380 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *EntitlementQuery) Clone() *EntitlementQuery", + "line": 390 + }, + { + "kind": "func", + "name": "WithUsageReset", + "signature": "func (_q *EntitlementQuery) WithUsageReset(opts ...func(*UsageResetQuery)) *EntitlementQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithGrant", + "signature": "func (_q *EntitlementQuery) WithGrant(opts ...func(*GrantQuery)) *EntitlementQuery", + "line": 425 + }, + { + "kind": "func", + "name": "WithBalanceSnapshot", + "signature": "func (_q *EntitlementQuery) WithBalanceSnapshot(opts ...func(*BalanceSnapshotQuery)) *EntitlementQuery", + "line": 436 + }, + { + "kind": "func", + "name": "WithSubscriptionItem", + "signature": "func (_q *EntitlementQuery) WithSubscriptionItem(opts ...func(*SubscriptionItemQuery)) *EntitlementQuery", + "line": 447 + }, + { + "kind": "func", + "name": "WithFeature", + "signature": "func (_q *EntitlementQuery) WithFeature(opts ...func(*FeatureQuery)) *EntitlementQuery", + "line": 458 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *EntitlementQuery) WithCustomer(opts ...func(*CustomerQuery)) *EntitlementQuery", + "line": 469 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *EntitlementQuery) GroupBy(field string, fields ...string) *EntitlementGroupBy", + "line": 492 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *EntitlementQuery) Select(fields ...string) *EntitlementSelect", + "line": 513 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *EntitlementQuery) Aggregate(fns ...AggregateFunc) *EntitlementSelect", + "line": 522 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *EntitlementQuery) prepareQuery(ctx context.Context) error", + "line": 526 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *EntitlementQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Entitlement, error)", + "line": 552 + }, + { + "kind": "func", + "name": "loadUsageReset", + "signature": "func (_q *EntitlementQuery) loadUsageReset(ctx context.Context, query *UsageResetQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *UsageReset)) error", + "line": 631 + }, + { + "kind": "func", + "name": "loadGrant", + "signature": "func (_q *EntitlementQuery) loadGrant(ctx context.Context, query *GrantQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *Grant)) error", + "line": 661 + }, + { + "kind": "func", + "name": "loadBalanceSnapshot", + "signature": "func (_q *EntitlementQuery) loadBalanceSnapshot(ctx context.Context, query *BalanceSnapshotQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *BalanceSnapshot)) error", + "line": 691 + }, + { + "kind": "func", + "name": "loadSubscriptionItem", + "signature": "func (_q *EntitlementQuery) loadSubscriptionItem(ctx context.Context, query *SubscriptionItemQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *SubscriptionItem)) error", + "line": 721 + }, + { + "kind": "func", + "name": "loadFeature", + "signature": "func (_q *EntitlementQuery) loadFeature(ctx context.Context, query *FeatureQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *Feature)) error", + "line": 754 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *EntitlementQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*Entitlement, init func(*Entitlement), assign func(*Entitlement, *Customer)) error", + "line": 783 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *EntitlementQuery) sqlCount(ctx context.Context) (int, error)", + "line": 813 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *EntitlementQuery) querySpec() *sqlgraph.QuerySpec", + "line": 825 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *EntitlementQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 871 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *EntitlementQuery) ForUpdate(opts ...sql.LockOption) *EntitlementQuery", + "line": 909 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *EntitlementQuery) ForShare(opts ...sql.LockOption) *EntitlementQuery", + "line": 922 + }, + { + "kind": "struct", + "name": "EntitlementGroupBy", + "signature": "type EntitlementGroupBy struct", + "line": 933 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *EntitlementGroupBy) Aggregate(fns ...AggregateFunc) *EntitlementGroupBy", + "line": 939 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *EntitlementGroupBy) Scan(ctx context.Context, v any) error", + "line": 945 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *EntitlementGroupBy) sqlScan(ctx context.Context, root *EntitlementQuery, v any) error", + "line": 953 + }, + { + "kind": "struct", + "name": "EntitlementSelect", + "signature": "type EntitlementSelect struct", + "line": 981 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *EntitlementSelect) Aggregate(fns ...AggregateFunc) *EntitlementSelect", + "line": 987 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *EntitlementSelect) Scan(ctx context.Context, v any) error", + "line": 993 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *EntitlementSelect) sqlScan(ctx context.Context, root *EntitlementQuery, v any) error", + "line": 1001 + } + ], + "line_count": 1020 + }, + "openmeter/ent/db/entitlement_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementUpdate", + "signature": "type EntitlementUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *EntitlementUpdate) Where(ps ...predicate.Entitlement) *EntitlementUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *EntitlementUpdate) SetMetadata(v map[string]string) *EntitlementUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *EntitlementUpdate) ClearMetadata() *EntitlementUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *EntitlementUpdate) SetUpdatedAt(v time.Time) *EntitlementUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *EntitlementUpdate) SetDeletedAt(v time.Time) *EntitlementUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *EntitlementUpdate) SetNillableDeletedAt(v *time.Time) *EntitlementUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *EntitlementUpdate) ClearDeletedAt() *EntitlementUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *EntitlementUpdate) SetActiveTo(v time.Time) *EntitlementUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *EntitlementUpdate) SetNillableActiveTo(v *time.Time) *EntitlementUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *EntitlementUpdate) ClearActiveTo() *EntitlementUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *EntitlementUpdate) SetConfig(v string) *EntitlementUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *EntitlementUpdate) SetNillableConfig(v *string) *EntitlementUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "ClearConfig", + "signature": "func (_u *EntitlementUpdate) ClearConfig() *EntitlementUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdate) SetUsagePeriodAnchor(v time.Time) *EntitlementUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdate) SetNillableUsagePeriodAnchor(v *time.Time) *EntitlementUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "ClearUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdate) ClearUsagePeriodAnchor() *EntitlementUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdate) SetCurrentUsagePeriodStart(v time.Time) *EntitlementUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdate) SetNillableCurrentUsagePeriodStart(v *time.Time) *EntitlementUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdate) ClearCurrentUsagePeriodStart() *EntitlementUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdate) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdate) SetNillableCurrentUsagePeriodEnd(v *time.Time) *EntitlementUpdate", + "line": 161 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdate) ClearCurrentUsagePeriodEnd() *EntitlementUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *EntitlementUpdate) SetAnnotations(v models.Annotations) *EntitlementUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *EntitlementUpdate) ClearAnnotations() *EntitlementUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "AddUsageResetIDs", + "signature": "func (_u *EntitlementUpdate) AddUsageResetIDs(ids ...string) *EntitlementUpdate", + "line": 187 + }, + { + "kind": "func", + "name": "AddUsageReset", + "signature": "func (_u *EntitlementUpdate) AddUsageReset(v ...*UsageReset) *EntitlementUpdate", + "line": 193 + }, + { + "kind": "func", + "name": "AddGrantIDs", + "signature": "func (_u *EntitlementUpdate) AddGrantIDs(ids ...string) *EntitlementUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "AddGrant", + "signature": "func (_u *EntitlementUpdate) AddGrant(v ...*Grant) *EntitlementUpdate", + "line": 208 + }, + { + "kind": "func", + "name": "AddBalanceSnapshotIDs", + "signature": "func (_u *EntitlementUpdate) AddBalanceSnapshotIDs(ids ...int) *EntitlementUpdate", + "line": 217 + }, + { + "kind": "func", + "name": "AddBalanceSnapshot", + "signature": "func (_u *EntitlementUpdate) AddBalanceSnapshot(v ...*BalanceSnapshot) *EntitlementUpdate", + "line": 223 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_u *EntitlementUpdate) AddSubscriptionItemIDs(ids ...string) *EntitlementUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "AddSubscriptionItem", + "signature": "func (_u *EntitlementUpdate) AddSubscriptionItem(v ...*SubscriptionItem) *EntitlementUpdate", + "line": 238 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *EntitlementUpdate) Mutation() *EntitlementMutation", + "line": 247 + }, + { + "kind": "func", + "name": "ClearUsageReset", + "signature": "func (_u *EntitlementUpdate) ClearUsageReset() *EntitlementUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "RemoveUsageResetIDs", + "signature": "func (_u *EntitlementUpdate) RemoveUsageResetIDs(ids ...string) *EntitlementUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "RemoveUsageReset", + "signature": "func (_u *EntitlementUpdate) RemoveUsageReset(v ...*UsageReset) *EntitlementUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "ClearGrant", + "signature": "func (_u *EntitlementUpdate) ClearGrant() *EntitlementUpdate", + "line": 273 + }, + { + "kind": "func", + "name": "RemoveGrantIDs", + "signature": "func (_u *EntitlementUpdate) RemoveGrantIDs(ids ...string) *EntitlementUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "RemoveGrant", + "signature": "func (_u *EntitlementUpdate) RemoveGrant(v ...*Grant) *EntitlementUpdate", + "line": 285 + }, + { + "kind": "func", + "name": "ClearBalanceSnapshot", + "signature": "func (_u *EntitlementUpdate) ClearBalanceSnapshot() *EntitlementUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "RemoveBalanceSnapshotIDs", + "signature": "func (_u *EntitlementUpdate) RemoveBalanceSnapshotIDs(ids ...int) *EntitlementUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "RemoveBalanceSnapshot", + "signature": "func (_u *EntitlementUpdate) RemoveBalanceSnapshot(v ...*BalanceSnapshot) *EntitlementUpdate", + "line": 306 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *EntitlementUpdate) ClearSubscriptionItem() *EntitlementUpdate", + "line": 315 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItemIDs", + "signature": "func (_u *EntitlementUpdate) RemoveSubscriptionItemIDs(ids ...string) *EntitlementUpdate", + "line": 321 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItem", + "signature": "func (_u *EntitlementUpdate) RemoveSubscriptionItem(v ...*SubscriptionItem) *EntitlementUpdate", + "line": 327 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *EntitlementUpdate) Save(ctx context.Context) (int, error)", + "line": 336 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *EntitlementUpdate) SaveX(ctx context.Context) int", + "line": 342 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *EntitlementUpdate) Exec(ctx context.Context) error", + "line": 351 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *EntitlementUpdate) ExecX(ctx context.Context)", + "line": 357 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *EntitlementUpdate) defaults()", + "line": 364 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *EntitlementUpdate) check() error", + "line": 372 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *EntitlementUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 382 + }, + { + "kind": "struct", + "name": "EntitlementUpdateOne", + "signature": "type EntitlementUpdateOne struct", + "line": 663 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *EntitlementUpdateOne) SetMetadata(v map[string]string) *EntitlementUpdateOne", + "line": 671 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *EntitlementUpdateOne) ClearMetadata() *EntitlementUpdateOne", + "line": 677 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *EntitlementUpdateOne) SetUpdatedAt(v time.Time) *EntitlementUpdateOne", + "line": 683 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *EntitlementUpdateOne) SetDeletedAt(v time.Time) *EntitlementUpdateOne", + "line": 689 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *EntitlementUpdateOne) SetNillableDeletedAt(v *time.Time) *EntitlementUpdateOne", + "line": 695 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *EntitlementUpdateOne) ClearDeletedAt() *EntitlementUpdateOne", + "line": 703 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *EntitlementUpdateOne) SetActiveTo(v time.Time) *EntitlementUpdateOne", + "line": 709 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *EntitlementUpdateOne) SetNillableActiveTo(v *time.Time) *EntitlementUpdateOne", + "line": 715 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *EntitlementUpdateOne) ClearActiveTo() *EntitlementUpdateOne", + "line": 723 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *EntitlementUpdateOne) SetConfig(v string) *EntitlementUpdateOne", + "line": 729 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *EntitlementUpdateOne) SetNillableConfig(v *string) *EntitlementUpdateOne", + "line": 735 + }, + { + "kind": "func", + "name": "ClearConfig", + "signature": "func (_u *EntitlementUpdateOne) ClearConfig() *EntitlementUpdateOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdateOne) SetUsagePeriodAnchor(v time.Time) *EntitlementUpdateOne", + "line": 749 + }, + { + "kind": "func", + "name": "SetNillableUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdateOne) SetNillableUsagePeriodAnchor(v *time.Time) *EntitlementUpdateOne", + "line": 755 + }, + { + "kind": "func", + "name": "ClearUsagePeriodAnchor", + "signature": "func (_u *EntitlementUpdateOne) ClearUsagePeriodAnchor() *EntitlementUpdateOne", + "line": 763 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdateOne) SetCurrentUsagePeriodStart(v time.Time) *EntitlementUpdateOne", + "line": 769 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdateOne) SetNillableCurrentUsagePeriodStart(v *time.Time) *EntitlementUpdateOne", + "line": 775 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodStart", + "signature": "func (_u *EntitlementUpdateOne) ClearCurrentUsagePeriodStart() *EntitlementUpdateOne", + "line": 783 + }, + { + "kind": "func", + "name": "SetCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdateOne) SetCurrentUsagePeriodEnd(v time.Time) *EntitlementUpdateOne", + "line": 789 + }, + { + "kind": "func", + "name": "SetNillableCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdateOne) SetNillableCurrentUsagePeriodEnd(v *time.Time) *EntitlementUpdateOne", + "line": 795 + }, + { + "kind": "func", + "name": "ClearCurrentUsagePeriodEnd", + "signature": "func (_u *EntitlementUpdateOne) ClearCurrentUsagePeriodEnd() *EntitlementUpdateOne", + "line": 803 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *EntitlementUpdateOne) SetAnnotations(v models.Annotations) *EntitlementUpdateOne", + "line": 809 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *EntitlementUpdateOne) ClearAnnotations() *EntitlementUpdateOne", + "line": 815 + }, + { + "kind": "func", + "name": "AddUsageResetIDs", + "signature": "func (_u *EntitlementUpdateOne) AddUsageResetIDs(ids ...string) *EntitlementUpdateOne", + "line": 821 + }, + { + "kind": "func", + "name": "AddUsageReset", + "signature": "func (_u *EntitlementUpdateOne) AddUsageReset(v ...*UsageReset) *EntitlementUpdateOne", + "line": 827 + }, + { + "kind": "func", + "name": "AddGrantIDs", + "signature": "func (_u *EntitlementUpdateOne) AddGrantIDs(ids ...string) *EntitlementUpdateOne", + "line": 836 + }, + { + "kind": "func", + "name": "AddGrant", + "signature": "func (_u *EntitlementUpdateOne) AddGrant(v ...*Grant) *EntitlementUpdateOne", + "line": 842 + }, + { + "kind": "func", + "name": "AddBalanceSnapshotIDs", + "signature": "func (_u *EntitlementUpdateOne) AddBalanceSnapshotIDs(ids ...int) *EntitlementUpdateOne", + "line": 851 + }, + { + "kind": "func", + "name": "AddBalanceSnapshot", + "signature": "func (_u *EntitlementUpdateOne) AddBalanceSnapshot(v ...*BalanceSnapshot) *EntitlementUpdateOne", + "line": 857 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_u *EntitlementUpdateOne) AddSubscriptionItemIDs(ids ...string) *EntitlementUpdateOne", + "line": 866 + }, + { + "kind": "func", + "name": "AddSubscriptionItem", + "signature": "func (_u *EntitlementUpdateOne) AddSubscriptionItem(v ...*SubscriptionItem) *EntitlementUpdateOne", + "line": 872 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *EntitlementUpdateOne) Mutation() *EntitlementMutation", + "line": 881 + }, + { + "kind": "func", + "name": "ClearUsageReset", + "signature": "func (_u *EntitlementUpdateOne) ClearUsageReset() *EntitlementUpdateOne", + "line": 886 + }, + { + "kind": "func", + "name": "RemoveUsageResetIDs", + "signature": "func (_u *EntitlementUpdateOne) RemoveUsageResetIDs(ids ...string) *EntitlementUpdateOne", + "line": 892 + }, + { + "kind": "func", + "name": "RemoveUsageReset", + "signature": "func (_u *EntitlementUpdateOne) RemoveUsageReset(v ...*UsageReset) *EntitlementUpdateOne", + "line": 898 + }, + { + "kind": "func", + "name": "ClearGrant", + "signature": "func (_u *EntitlementUpdateOne) ClearGrant() *EntitlementUpdateOne", + "line": 907 + }, + { + "kind": "func", + "name": "RemoveGrantIDs", + "signature": "func (_u *EntitlementUpdateOne) RemoveGrantIDs(ids ...string) *EntitlementUpdateOne", + "line": 913 + }, + { + "kind": "func", + "name": "RemoveGrant", + "signature": "func (_u *EntitlementUpdateOne) RemoveGrant(v ...*Grant) *EntitlementUpdateOne", + "line": 919 + }, + { + "kind": "func", + "name": "ClearBalanceSnapshot", + "signature": "func (_u *EntitlementUpdateOne) ClearBalanceSnapshot() *EntitlementUpdateOne", + "line": 928 + }, + { + "kind": "func", + "name": "RemoveBalanceSnapshotIDs", + "signature": "func (_u *EntitlementUpdateOne) RemoveBalanceSnapshotIDs(ids ...int) *EntitlementUpdateOne", + "line": 934 + }, + { + "kind": "func", + "name": "RemoveBalanceSnapshot", + "signature": "func (_u *EntitlementUpdateOne) RemoveBalanceSnapshot(v ...*BalanceSnapshot) *EntitlementUpdateOne", + "line": 940 + }, + { + "kind": "func", + "name": "ClearSubscriptionItem", + "signature": "func (_u *EntitlementUpdateOne) ClearSubscriptionItem() *EntitlementUpdateOne", + "line": 949 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItemIDs", + "signature": "func (_u *EntitlementUpdateOne) RemoveSubscriptionItemIDs(ids ...string) *EntitlementUpdateOne", + "line": 955 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItem", + "signature": "func (_u *EntitlementUpdateOne) RemoveSubscriptionItem(v ...*SubscriptionItem) *EntitlementUpdateOne", + "line": 961 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *EntitlementUpdateOne) Where(ps ...predicate.Entitlement) *EntitlementUpdateOne", + "line": 970 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *EntitlementUpdateOne) Select(field string, fields ...string) *EntitlementUpdateOne", + "line": 977 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *EntitlementUpdateOne) Save(ctx context.Context) (*Entitlement, error)", + "line": 983 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *EntitlementUpdateOne) SaveX(ctx context.Context) *Entitlement", + "line": 989 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *EntitlementUpdateOne) Exec(ctx context.Context) error", + "line": 998 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *EntitlementUpdateOne) ExecX(ctx context.Context)", + "line": 1004 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *EntitlementUpdateOne) defaults()", + "line": 1011 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *EntitlementUpdateOne) check() error", + "line": 1019 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *EntitlementUpdateOne) sqlSave(ctx context.Context) (_node *Entitlement, err error)", + "line": 1029 + } + ], + "line_count": 1327 + }, + "openmeter/ent/db/entmixinaccessor.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Addon) GetID() string", + "line": 20 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Addon) GetNamespace() string", + "line": 24 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Addon) GetMetadata() map[string]string", + "line": 28 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Addon) GetCreatedAt() time.Time", + "line": 32 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Addon) GetUpdatedAt() time.Time", + "line": 36 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Addon) GetDeletedAt() *time.Time", + "line": 40 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *Addon) GetName() string", + "line": 44 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *Addon) GetDescription() *string", + "line": 48 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *Addon) GetKey() string", + "line": 52 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *AddonRateCard) GetID() string", + "line": 56 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AddonRateCard) GetNamespace() string", + "line": 60 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *AddonRateCard) GetMetadata() map[string]string", + "line": 64 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AddonRateCard) GetCreatedAt() time.Time", + "line": 68 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AddonRateCard) GetUpdatedAt() time.Time", + "line": 72 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AddonRateCard) GetDeletedAt() *time.Time", + "line": 76 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *AddonRateCard) GetName() string", + "line": 80 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *AddonRateCard) GetDescription() *string", + "line": 84 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *AddonRateCard) GetKey() string", + "line": 88 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *AddonRateCard) GetTaxCodeID() *string", + "line": 92 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *AddonRateCard) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 96 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *App) GetID() string", + "line": 100 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *App) GetNamespace() string", + "line": 104 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *App) GetMetadata() map[string]string", + "line": 108 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *App) GetCreatedAt() time.Time", + "line": 112 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *App) GetUpdatedAt() time.Time", + "line": 116 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *App) GetDeletedAt() *time.Time", + "line": 120 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *App) GetName() string", + "line": 124 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *App) GetDescription() *string", + "line": 128 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *AppCustomInvoicing) GetID() string", + "line": 132 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AppCustomInvoicing) GetNamespace() string", + "line": 136 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AppCustomInvoicing) GetCreatedAt() time.Time", + "line": 140 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AppCustomInvoicing) GetUpdatedAt() time.Time", + "line": 144 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AppCustomInvoicing) GetDeletedAt() *time.Time", + "line": 148 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AppCustomInvoicingCustomer) GetNamespace() string", + "line": 152 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AppCustomInvoicingCustomer) GetCreatedAt() time.Time", + "line": 156 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AppCustomInvoicingCustomer) GetUpdatedAt() time.Time", + "line": 160 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AppCustomInvoicingCustomer) GetDeletedAt() *time.Time", + "line": 164 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *AppCustomInvoicingCustomer) GetMetadata() map[string]string", + "line": 168 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AppCustomer) GetNamespace() string", + "line": 172 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AppCustomer) GetCreatedAt() time.Time", + "line": 176 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AppCustomer) GetUpdatedAt() time.Time", + "line": 180 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AppCustomer) GetDeletedAt() *time.Time", + "line": 184 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *AppStripe) GetID() string", + "line": 188 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AppStripe) GetNamespace() string", + "line": 192 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AppStripe) GetCreatedAt() time.Time", + "line": 196 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AppStripe) GetUpdatedAt() time.Time", + "line": 200 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AppStripe) GetDeletedAt() *time.Time", + "line": 204 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *AppStripeCustomer) GetNamespace() string", + "line": 208 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *AppStripeCustomer) GetCreatedAt() time.Time", + "line": 212 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *AppStripeCustomer) GetUpdatedAt() time.Time", + "line": 216 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *AppStripeCustomer) GetDeletedAt() *time.Time", + "line": 220 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BalanceSnapshot) GetNamespace() string", + "line": 224 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BalanceSnapshot) GetCreatedAt() time.Time", + "line": 228 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BalanceSnapshot) GetUpdatedAt() time.Time", + "line": 232 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BalanceSnapshot) GetDeletedAt() *time.Time", + "line": 236 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingCustomerLock) GetID() string", + "line": 240 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingCustomerLock) GetNamespace() string", + "line": 244 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingCustomerOverride) GetID() string", + "line": 248 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingCustomerOverride) GetNamespace() string", + "line": 252 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingCustomerOverride) GetCreatedAt() time.Time", + "line": 256 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingCustomerOverride) GetUpdatedAt() time.Time", + "line": 260 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingCustomerOverride) GetDeletedAt() *time.Time", + "line": 264 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *BillingCustomerOverride) GetTaxCodeID() *string", + "line": 268 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *BillingCustomerOverride) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 272 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoice) GetID() string", + "line": 276 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoice) GetNamespace() string", + "line": 280 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *BillingInvoice) GetMetadata() map[string]string", + "line": 284 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoice) GetCreatedAt() time.Time", + "line": 288 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoice) GetUpdatedAt() time.Time", + "line": 292 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoice) GetDeletedAt() *time.Time", + "line": 296 + }, + { + "kind": "func", + "name": "GetSupplierAddressCountry", + "signature": "func (e *BillingInvoice) GetSupplierAddressCountry() *models.CountryCode", + "line": 300 + }, + { + "kind": "func", + "name": "GetSupplierAddressPostalCode", + "signature": "func (e *BillingInvoice) GetSupplierAddressPostalCode() *string", + "line": 304 + }, + { + "kind": "func", + "name": "GetSupplierAddressState", + "signature": "func (e *BillingInvoice) GetSupplierAddressState() *string", + "line": 308 + }, + { + "kind": "func", + "name": "GetSupplierAddressCity", + "signature": "func (e *BillingInvoice) GetSupplierAddressCity() *string", + "line": 312 + }, + { + "kind": "func", + "name": "GetSupplierAddressLine1", + "signature": "func (e *BillingInvoice) GetSupplierAddressLine1() *string", + "line": 316 + }, + { + "kind": "func", + "name": "GetSupplierAddressLine2", + "signature": "func (e *BillingInvoice) GetSupplierAddressLine2() *string", + "line": 320 + }, + { + "kind": "func", + "name": "GetSupplierAddressPhoneNumber", + "signature": "func (e *BillingInvoice) GetSupplierAddressPhoneNumber() *string", + "line": 324 + }, + { + "kind": "func", + "name": "GetCustomerAddressCountry", + "signature": "func (e *BillingInvoice) GetCustomerAddressCountry() *models.CountryCode", + "line": 328 + }, + { + "kind": "func", + "name": "GetCustomerAddressPostalCode", + "signature": "func (e *BillingInvoice) GetCustomerAddressPostalCode() *string", + "line": 332 + }, + { + "kind": "func", + "name": "GetCustomerAddressState", + "signature": "func (e *BillingInvoice) GetCustomerAddressState() *string", + "line": 336 + }, + { + "kind": "func", + "name": "GetCustomerAddressCity", + "signature": "func (e *BillingInvoice) GetCustomerAddressCity() *string", + "line": 340 + }, + { + "kind": "func", + "name": "GetCustomerAddressLine1", + "signature": "func (e *BillingInvoice) GetCustomerAddressLine1() *string", + "line": 344 + }, + { + "kind": "func", + "name": "GetCustomerAddressLine2", + "signature": "func (e *BillingInvoice) GetCustomerAddressLine2() *string", + "line": 348 + }, + { + "kind": "func", + "name": "GetCustomerAddressPhoneNumber", + "signature": "func (e *BillingInvoice) GetCustomerAddressPhoneNumber() *string", + "line": 352 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *BillingInvoice) GetAmount() alpacadecimal.Decimal", + "line": 356 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *BillingInvoice) GetTaxesTotal() alpacadecimal.Decimal", + "line": 360 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *BillingInvoice) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 364 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *BillingInvoice) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 368 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *BillingInvoice) GetChargesTotal() alpacadecimal.Decimal", + "line": 372 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *BillingInvoice) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 376 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *BillingInvoice) GetCreditsTotal() alpacadecimal.Decimal", + "line": 380 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *BillingInvoice) GetTotal() alpacadecimal.Decimal", + "line": 384 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingInvoice) GetInvoicingAppExternalID() *string", + "line": 388 + }, + { + "kind": "func", + "name": "GetPaymentAppExternalID", + "signature": "func (e *BillingInvoice) GetPaymentAppExternalID() *string", + "line": 392 + }, + { + "kind": "func", + "name": "GetTaxAppExternalID", + "signature": "func (e *BillingInvoice) GetTaxAppExternalID() *string", + "line": 396 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceFlatFeeLineConfig) GetID() string", + "line": 400 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceFlatFeeLineConfig) GetNamespace() string", + "line": 404 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceLine) GetID() string", + "line": 408 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *BillingInvoiceLine) GetAnnotations() models.Annotations", + "line": 412 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceLine) GetNamespace() string", + "line": 416 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *BillingInvoiceLine) GetMetadata() map[string]string", + "line": 420 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoiceLine) GetCreatedAt() time.Time", + "line": 424 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoiceLine) GetUpdatedAt() time.Time", + "line": 428 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoiceLine) GetDeletedAt() *time.Time", + "line": 432 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *BillingInvoiceLine) GetName() string", + "line": 436 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingInvoiceLine) GetDescription() *string", + "line": 440 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *BillingInvoiceLine) GetCurrency() currencyx.Code", + "line": 444 + }, + { + "kind": "func", + "name": "GetTaxConfig", + "signature": "func (e *BillingInvoiceLine) GetTaxConfig() billing.TaxConfig", + "line": 448 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *BillingInvoiceLine) GetTaxCodeID() *string", + "line": 452 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *BillingInvoiceLine) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 456 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *BillingInvoiceLine) GetAmount() alpacadecimal.Decimal", + "line": 460 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *BillingInvoiceLine) GetTaxesTotal() alpacadecimal.Decimal", + "line": 464 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *BillingInvoiceLine) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 468 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *BillingInvoiceLine) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 472 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *BillingInvoiceLine) GetChargesTotal() alpacadecimal.Decimal", + "line": 476 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *BillingInvoiceLine) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 480 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *BillingInvoiceLine) GetCreditsTotal() alpacadecimal.Decimal", + "line": 484 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *BillingInvoiceLine) GetTotal() alpacadecimal.Decimal", + "line": 488 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingInvoiceLine) GetInvoicingAppExternalID() *string", + "line": 492 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceLineDiscount) GetID() string", + "line": 496 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceLineDiscount) GetNamespace() string", + "line": 500 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoiceLineDiscount) GetCreatedAt() time.Time", + "line": 504 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoiceLineDiscount) GetUpdatedAt() time.Time", + "line": 508 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoiceLineDiscount) GetDeletedAt() *time.Time", + "line": 512 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingInvoiceLineDiscount) GetInvoicingAppExternalID() *string", + "line": 516 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *BillingInvoiceLineDiscount) GetLineID() string", + "line": 520 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *BillingInvoiceLineDiscount) GetChildUniqueReferenceID() *string", + "line": 524 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingInvoiceLineDiscount) GetDescription() *string", + "line": 528 + }, + { + "kind": "func", + "name": "GetReason", + "signature": "func (e *BillingInvoiceLineDiscount) GetReason() billing.DiscountReasonType", + "line": 532 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetID() string", + "line": 536 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetNamespace() string", + "line": 540 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetCreatedAt() time.Time", + "line": 544 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetUpdatedAt() time.Time", + "line": 548 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetDeletedAt() *time.Time", + "line": 552 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetInvoicingAppExternalID() *string", + "line": 556 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetLineID() string", + "line": 560 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetChildUniqueReferenceID() *string", + "line": 564 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetDescription() *string", + "line": 568 + }, + { + "kind": "func", + "name": "GetReason", + "signature": "func (e *BillingInvoiceLineUsageDiscount) GetReason() billing.DiscountReasonType", + "line": 572 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetID() string", + "line": 576 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetNamespace() string", + "line": 580 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetMetadata() map[string]string", + "line": 584 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetCreatedAt() time.Time", + "line": 588 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetUpdatedAt() time.Time", + "line": 592 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetDeletedAt() *time.Time", + "line": 596 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetName() string", + "line": 600 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingInvoiceSplitLineGroup) GetDescription() *string", + "line": 604 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceUsageBasedLineConfig) GetID() string", + "line": 608 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceUsageBasedLineConfig) GetNamespace() string", + "line": 612 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingInvoiceValidationIssue) GetID() string", + "line": 616 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingInvoiceValidationIssue) GetNamespace() string", + "line": 620 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingInvoiceValidationIssue) GetCreatedAt() time.Time", + "line": 624 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingInvoiceValidationIssue) GetUpdatedAt() time.Time", + "line": 628 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingInvoiceValidationIssue) GetDeletedAt() *time.Time", + "line": 632 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingProfile) GetID() string", + "line": 636 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingProfile) GetNamespace() string", + "line": 640 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *BillingProfile) GetMetadata() map[string]string", + "line": 644 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingProfile) GetCreatedAt() time.Time", + "line": 648 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingProfile) GetUpdatedAt() time.Time", + "line": 652 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingProfile) GetDeletedAt() *time.Time", + "line": 656 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *BillingProfile) GetName() string", + "line": 660 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingProfile) GetDescription() *string", + "line": 664 + }, + { + "kind": "func", + "name": "GetSupplierAddressCountry", + "signature": "func (e *BillingProfile) GetSupplierAddressCountry() *models.CountryCode", + "line": 668 + }, + { + "kind": "func", + "name": "GetSupplierAddressPostalCode", + "signature": "func (e *BillingProfile) GetSupplierAddressPostalCode() *string", + "line": 672 + }, + { + "kind": "func", + "name": "GetSupplierAddressState", + "signature": "func (e *BillingProfile) GetSupplierAddressState() *string", + "line": 676 + }, + { + "kind": "func", + "name": "GetSupplierAddressCity", + "signature": "func (e *BillingProfile) GetSupplierAddressCity() *string", + "line": 680 + }, + { + "kind": "func", + "name": "GetSupplierAddressLine1", + "signature": "func (e *BillingProfile) GetSupplierAddressLine1() *string", + "line": 684 + }, + { + "kind": "func", + "name": "GetSupplierAddressLine2", + "signature": "func (e *BillingProfile) GetSupplierAddressLine2() *string", + "line": 688 + }, + { + "kind": "func", + "name": "GetSupplierAddressPhoneNumber", + "signature": "func (e *BillingProfile) GetSupplierAddressPhoneNumber() *string", + "line": 692 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingSequenceNumbers) GetNamespace() string", + "line": 696 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetID() string", + "line": 700 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetCurrency() currencyx.Code", + "line": 704 + }, + { + "kind": "func", + "name": "GetTaxConfig", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxConfig() productcatalog.TaxConfig", + "line": 708 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxCodeID() *string", + "line": 712 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 716 + }, + { + "kind": "func", + "name": "GetServicePeriodStart", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetServicePeriodStart() time.Time", + "line": 720 + }, + { + "kind": "func", + "name": "GetServicePeriodEnd", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetServicePeriodEnd() time.Time", + "line": 724 + }, + { + "kind": "func", + "name": "GetQuantity", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetQuantity() alpacadecimal.Decimal", + "line": 728 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetInvoicingAppExternalID() *string", + "line": 732 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetChildUniqueReferenceID() string", + "line": 736 + }, + { + "kind": "func", + "name": "GetPerUnitAmount", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetPerUnitAmount() alpacadecimal.Decimal", + "line": 740 + }, + { + "kind": "func", + "name": "GetCategory", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetCategory() stddetailedline.Category", + "line": 744 + }, + { + "kind": "func", + "name": "GetPaymentTerm", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetPaymentTerm() productcatalog.PaymentTermType", + "line": 748 + }, + { + "kind": "func", + "name": "GetIndex", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetIndex() *int", + "line": 752 + }, + { + "kind": "func", + "name": "GetCreditsApplied", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetCreditsApplied() *creditsapplied.CreditsApplied", + "line": 756 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetAnnotations() models.Annotations", + "line": 760 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetNamespace() string", + "line": 764 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetMetadata() map[string]string", + "line": 768 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetCreatedAt() time.Time", + "line": 772 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetUpdatedAt() time.Time", + "line": 776 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetDeletedAt() *time.Time", + "line": 780 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetName() string", + "line": 784 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetDescription() *string", + "line": 788 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetAmount() alpacadecimal.Decimal", + "line": 792 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxesTotal() alpacadecimal.Decimal", + "line": 796 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 800 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 804 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetChargesTotal() alpacadecimal.Decimal", + "line": 808 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 812 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetCreditsTotal() alpacadecimal.Decimal", + "line": 816 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *BillingStandardInvoiceDetailedLine) GetTotal() alpacadecimal.Decimal", + "line": 820 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetID() string", + "line": 824 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetNamespace() string", + "line": 828 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetCreatedAt() time.Time", + "line": 832 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetUpdatedAt() time.Time", + "line": 836 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetDeletedAt() *time.Time", + "line": 840 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetInvoicingAppExternalID() *string", + "line": 844 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetLineID() string", + "line": 848 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetChildUniqueReferenceID() *string", + "line": 852 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetDescription() *string", + "line": 856 + }, + { + "kind": "func", + "name": "GetReason", + "signature": "func (e *BillingStandardInvoiceDetailedLineAmountDiscount) GetReason() billing.DiscountReasonType", + "line": 860 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *BillingWorkflowConfig) GetID() string", + "line": 864 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *BillingWorkflowConfig) GetNamespace() string", + "line": 868 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *BillingWorkflowConfig) GetCreatedAt() time.Time", + "line": 872 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *BillingWorkflowConfig) GetUpdatedAt() time.Time", + "line": 876 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *BillingWorkflowConfig) GetDeletedAt() *time.Time", + "line": 880 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *BillingWorkflowConfig) GetTaxCodeID() *string", + "line": 884 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *BillingWorkflowConfig) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 888 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Charge) GetID() string", + "line": 892 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Charge) GetNamespace() string", + "line": 896 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeCreditPurchase) GetID() string", + "line": 900 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (e *ChargeCreditPurchase) GetCustomerID() string", + "line": 904 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeCreditPurchase) GetServicePeriodFrom() time.Time", + "line": 908 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeCreditPurchase) GetServicePeriodTo() time.Time", + "line": 912 + }, + { + "kind": "func", + "name": "GetBillingPeriodFrom", + "signature": "func (e *ChargeCreditPurchase) GetBillingPeriodFrom() time.Time", + "line": 916 + }, + { + "kind": "func", + "name": "GetBillingPeriodTo", + "signature": "func (e *ChargeCreditPurchase) GetBillingPeriodTo() time.Time", + "line": 920 + }, + { + "kind": "func", + "name": "GetFullServicePeriodFrom", + "signature": "func (e *ChargeCreditPurchase) GetFullServicePeriodFrom() time.Time", + "line": 924 + }, + { + "kind": "func", + "name": "GetFullServicePeriodTo", + "signature": "func (e *ChargeCreditPurchase) GetFullServicePeriodTo() time.Time", + "line": 928 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeCreditPurchase) GetStatus() meta.ChargeStatus", + "line": 932 + }, + { + "kind": "func", + "name": "GetUniqueReferenceID", + "signature": "func (e *ChargeCreditPurchase) GetUniqueReferenceID() *string", + "line": 936 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *ChargeCreditPurchase) GetCurrency() currencyx.Code", + "line": 940 + }, + { + "kind": "func", + "name": "GetManagedBy", + "signature": "func (e *ChargeCreditPurchase) GetManagedBy() billing.InvoiceLineManagedBy", + "line": 944 + }, + { + "kind": "func", + "name": "GetSubscriptionID", + "signature": "func (e *ChargeCreditPurchase) GetSubscriptionID() *string", + "line": 948 + }, + { + "kind": "func", + "name": "GetSubscriptionPhaseID", + "signature": "func (e *ChargeCreditPurchase) GetSubscriptionPhaseID() *string", + "line": 952 + }, + { + "kind": "func", + "name": "GetSubscriptionItemID", + "signature": "func (e *ChargeCreditPurchase) GetSubscriptionItemID() *string", + "line": 956 + }, + { + "kind": "func", + "name": "GetAdvanceAfter", + "signature": "func (e *ChargeCreditPurchase) GetAdvanceAfter() *time.Time", + "line": 960 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *ChargeCreditPurchase) GetTaxCodeID() *string", + "line": 964 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *ChargeCreditPurchase) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 968 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeCreditPurchase) GetAnnotations() models.Annotations", + "line": 972 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeCreditPurchase) GetNamespace() string", + "line": 976 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *ChargeCreditPurchase) GetMetadata() map[string]string", + "line": 980 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeCreditPurchase) GetCreatedAt() time.Time", + "line": 984 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeCreditPurchase) GetUpdatedAt() time.Time", + "line": 988 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeCreditPurchase) GetDeletedAt() *time.Time", + "line": 992 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *ChargeCreditPurchase) GetName() string", + "line": 996 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *ChargeCreditPurchase) GetDescription() *string", + "line": 1000 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeCreditPurchaseCreditGrant) GetID() string", + "line": 1004 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeCreditPurchaseCreditGrant) GetNamespace() string", + "line": 1008 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeCreditPurchaseCreditGrant) GetCreatedAt() time.Time", + "line": 1012 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeCreditPurchaseCreditGrant) GetUpdatedAt() time.Time", + "line": 1016 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeCreditPurchaseCreditGrant) GetDeletedAt() *time.Time", + "line": 1020 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetID() string", + "line": 1024 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetServicePeriodFrom() time.Time", + "line": 1028 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetServicePeriodTo() time.Time", + "line": 1032 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetStatus() payment.Status", + "line": 1036 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetAmount() alpacadecimal.Decimal", + "line": 1040 + }, + { + "kind": "func", + "name": "GetAuthorizedTransactionGroupID", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetAuthorizedTransactionGroupID() *string", + "line": 1044 + }, + { + "kind": "func", + "name": "GetAuthorizedAt", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetAuthorizedAt() *time.Time", + "line": 1048 + }, + { + "kind": "func", + "name": "GetSettledTransactionGroupID", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetSettledTransactionGroupID() *string", + "line": 1052 + }, + { + "kind": "func", + "name": "GetSettledAt", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetSettledAt() *time.Time", + "line": 1056 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetNamespace() string", + "line": 1060 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetCreatedAt() time.Time", + "line": 1064 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetUpdatedAt() time.Time", + "line": 1068 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetDeletedAt() *time.Time", + "line": 1072 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeCreditPurchaseExternalPayment) GetAnnotations() models.Annotations", + "line": 1076 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetID() string", + "line": 1080 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetLineID() string", + "line": 1084 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetInvoiceID() string", + "line": 1088 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetServicePeriodFrom() time.Time", + "line": 1092 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetServicePeriodTo() time.Time", + "line": 1096 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetStatus() payment.Status", + "line": 1100 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetAmount() alpacadecimal.Decimal", + "line": 1104 + }, + { + "kind": "func", + "name": "GetAuthorizedTransactionGroupID", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetAuthorizedTransactionGroupID() *string", + "line": 1108 + }, + { + "kind": "func", + "name": "GetAuthorizedAt", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetAuthorizedAt() *time.Time", + "line": 1112 + }, + { + "kind": "func", + "name": "GetSettledTransactionGroupID", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetSettledTransactionGroupID() *string", + "line": 1116 + }, + { + "kind": "func", + "name": "GetSettledAt", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetSettledAt() *time.Time", + "line": 1120 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetNamespace() string", + "line": 1124 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetCreatedAt() time.Time", + "line": 1128 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetUpdatedAt() time.Time", + "line": 1132 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetDeletedAt() *time.Time", + "line": 1136 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeCreditPurchaseInvoicedPayment) GetAnnotations() models.Annotations", + "line": 1140 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFee) GetID() string", + "line": 1144 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (e *ChargeFlatFee) GetCustomerID() string", + "line": 1148 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeFlatFee) GetServicePeriodFrom() time.Time", + "line": 1152 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeFlatFee) GetServicePeriodTo() time.Time", + "line": 1156 + }, + { + "kind": "func", + "name": "GetBillingPeriodFrom", + "signature": "func (e *ChargeFlatFee) GetBillingPeriodFrom() time.Time", + "line": 1160 + }, + { + "kind": "func", + "name": "GetBillingPeriodTo", + "signature": "func (e *ChargeFlatFee) GetBillingPeriodTo() time.Time", + "line": 1164 + }, + { + "kind": "func", + "name": "GetFullServicePeriodFrom", + "signature": "func (e *ChargeFlatFee) GetFullServicePeriodFrom() time.Time", + "line": 1168 + }, + { + "kind": "func", + "name": "GetFullServicePeriodTo", + "signature": "func (e *ChargeFlatFee) GetFullServicePeriodTo() time.Time", + "line": 1172 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeFlatFee) GetStatus() meta.ChargeStatus", + "line": 1176 + }, + { + "kind": "func", + "name": "GetUniqueReferenceID", + "signature": "func (e *ChargeFlatFee) GetUniqueReferenceID() *string", + "line": 1180 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *ChargeFlatFee) GetCurrency() currencyx.Code", + "line": 1184 + }, + { + "kind": "func", + "name": "GetManagedBy", + "signature": "func (e *ChargeFlatFee) GetManagedBy() billing.InvoiceLineManagedBy", + "line": 1188 + }, + { + "kind": "func", + "name": "GetSubscriptionID", + "signature": "func (e *ChargeFlatFee) GetSubscriptionID() *string", + "line": 1192 + }, + { + "kind": "func", + "name": "GetSubscriptionPhaseID", + "signature": "func (e *ChargeFlatFee) GetSubscriptionPhaseID() *string", + "line": 1196 + }, + { + "kind": "func", + "name": "GetSubscriptionItemID", + "signature": "func (e *ChargeFlatFee) GetSubscriptionItemID() *string", + "line": 1200 + }, + { + "kind": "func", + "name": "GetAdvanceAfter", + "signature": "func (e *ChargeFlatFee) GetAdvanceAfter() *time.Time", + "line": 1204 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *ChargeFlatFee) GetTaxCodeID() *string", + "line": 1208 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *ChargeFlatFee) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 1212 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeFlatFee) GetAnnotations() models.Annotations", + "line": 1216 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFee) GetNamespace() string", + "line": 1220 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *ChargeFlatFee) GetMetadata() map[string]string", + "line": 1224 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFee) GetCreatedAt() time.Time", + "line": 1228 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFee) GetUpdatedAt() time.Time", + "line": 1232 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFee) GetDeletedAt() *time.Time", + "line": 1236 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *ChargeFlatFee) GetName() string", + "line": 1240 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *ChargeFlatFee) GetDescription() *string", + "line": 1244 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFeeRun) GetID() string", + "line": 1248 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFeeRun) GetNamespace() string", + "line": 1252 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFeeRun) GetCreatedAt() time.Time", + "line": 1256 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFeeRun) GetUpdatedAt() time.Time", + "line": 1260 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFeeRun) GetDeletedAt() *time.Time", + "line": 1264 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeFlatFeeRun) GetAmount() alpacadecimal.Decimal", + "line": 1268 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeFlatFeeRun) GetTaxesTotal() alpacadecimal.Decimal", + "line": 1272 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeFlatFeeRun) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 1276 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeFlatFeeRun) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 1280 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeFlatFeeRun) GetChargesTotal() alpacadecimal.Decimal", + "line": 1284 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeFlatFeeRun) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 1288 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeFlatFeeRun) GetCreditsTotal() alpacadecimal.Decimal", + "line": 1292 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeFlatFeeRun) GetTotal() alpacadecimal.Decimal", + "line": 1296 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetID() string", + "line": 1300 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetLineID() *string", + "line": 1304 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetAmount() alpacadecimal.Decimal", + "line": 1308 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetServicePeriodFrom() time.Time", + "line": 1312 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetServicePeriodTo() time.Time", + "line": 1316 + }, + { + "kind": "func", + "name": "GetLedgerTransactionGroupID", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetLedgerTransactionGroupID() string", + "line": 1320 + }, + { + "kind": "func", + "name": "GetSortHint", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetSortHint() int", + "line": 1324 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetType() creditrealization.Type", + "line": 1328 + }, + { + "kind": "func", + "name": "GetCorrectsRealizationID", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetCorrectsRealizationID() *string", + "line": 1332 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetNamespace() string", + "line": 1336 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetCreatedAt() time.Time", + "line": 1340 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetUpdatedAt() time.Time", + "line": 1344 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetDeletedAt() *time.Time", + "line": 1348 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeFlatFeeRunCreditAllocations) GetAnnotations() models.Annotations", + "line": 1352 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetID() string", + "line": 1356 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetCurrency() currencyx.Code", + "line": 1360 + }, + { + "kind": "func", + "name": "GetTaxConfig", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxConfig() productcatalog.TaxConfig", + "line": 1364 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxCodeID() *string", + "line": 1368 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 1372 + }, + { + "kind": "func", + "name": "GetServicePeriodStart", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetServicePeriodStart() time.Time", + "line": 1376 + }, + { + "kind": "func", + "name": "GetServicePeriodEnd", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetServicePeriodEnd() time.Time", + "line": 1380 + }, + { + "kind": "func", + "name": "GetQuantity", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetQuantity() alpacadecimal.Decimal", + "line": 1384 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetInvoicingAppExternalID() *string", + "line": 1388 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetChildUniqueReferenceID() string", + "line": 1392 + }, + { + "kind": "func", + "name": "GetPerUnitAmount", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetPerUnitAmount() alpacadecimal.Decimal", + "line": 1396 + }, + { + "kind": "func", + "name": "GetCategory", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetCategory() stddetailedline.Category", + "line": 1400 + }, + { + "kind": "func", + "name": "GetPaymentTerm", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetPaymentTerm() productcatalog.PaymentTermType", + "line": 1404 + }, + { + "kind": "func", + "name": "GetIndex", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetIndex() *int", + "line": 1408 + }, + { + "kind": "func", + "name": "GetCreditsApplied", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetCreditsApplied() *creditsapplied.CreditsApplied", + "line": 1412 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetAnnotations() models.Annotations", + "line": 1416 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetNamespace() string", + "line": 1420 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetMetadata() map[string]string", + "line": 1424 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetCreatedAt() time.Time", + "line": 1428 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetUpdatedAt() time.Time", + "line": 1432 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetDeletedAt() *time.Time", + "line": 1436 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetName() string", + "line": 1440 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetDescription() *string", + "line": 1444 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetAmount() alpacadecimal.Decimal", + "line": 1448 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxesTotal() alpacadecimal.Decimal", + "line": 1452 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 1456 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 1460 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetChargesTotal() alpacadecimal.Decimal", + "line": 1464 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 1468 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetCreditsTotal() alpacadecimal.Decimal", + "line": 1472 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeFlatFeeRunDetailedLine) GetTotal() alpacadecimal.Decimal", + "line": 1476 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetID() string", + "line": 1480 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetServicePeriodFrom() time.Time", + "line": 1484 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetServicePeriodTo() time.Time", + "line": 1488 + }, + { + "kind": "func", + "name": "GetLedgerTransactionGroupID", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetLedgerTransactionGroupID() *string", + "line": 1492 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetNamespace() string", + "line": 1496 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetCreatedAt() time.Time", + "line": 1500 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetUpdatedAt() time.Time", + "line": 1504 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetDeletedAt() *time.Time", + "line": 1508 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetAnnotations() models.Annotations", + "line": 1512 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetAmount() alpacadecimal.Decimal", + "line": 1516 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetTaxesTotal() alpacadecimal.Decimal", + "line": 1520 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 1524 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 1528 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetChargesTotal() alpacadecimal.Decimal", + "line": 1532 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 1536 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetCreditsTotal() alpacadecimal.Decimal", + "line": 1540 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeFlatFeeRunInvoicedUsage) GetTotal() alpacadecimal.Decimal", + "line": 1544 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeFlatFeeRunPayment) GetID() string", + "line": 1548 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *ChargeFlatFeeRunPayment) GetLineID() string", + "line": 1552 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (e *ChargeFlatFeeRunPayment) GetInvoiceID() string", + "line": 1556 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeFlatFeeRunPayment) GetServicePeriodFrom() time.Time", + "line": 1560 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeFlatFeeRunPayment) GetServicePeriodTo() time.Time", + "line": 1564 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeFlatFeeRunPayment) GetStatus() payment.Status", + "line": 1568 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeFlatFeeRunPayment) GetAmount() alpacadecimal.Decimal", + "line": 1572 + }, + { + "kind": "func", + "name": "GetAuthorizedTransactionGroupID", + "signature": "func (e *ChargeFlatFeeRunPayment) GetAuthorizedTransactionGroupID() *string", + "line": 1576 + }, + { + "kind": "func", + "name": "GetAuthorizedAt", + "signature": "func (e *ChargeFlatFeeRunPayment) GetAuthorizedAt() *time.Time", + "line": 1580 + }, + { + "kind": "func", + "name": "GetSettledTransactionGroupID", + "signature": "func (e *ChargeFlatFeeRunPayment) GetSettledTransactionGroupID() *string", + "line": 1584 + }, + { + "kind": "func", + "name": "GetSettledAt", + "signature": "func (e *ChargeFlatFeeRunPayment) GetSettledAt() *time.Time", + "line": 1588 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeFlatFeeRunPayment) GetNamespace() string", + "line": 1592 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeFlatFeeRunPayment) GetCreatedAt() time.Time", + "line": 1596 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeFlatFeeRunPayment) GetUpdatedAt() time.Time", + "line": 1600 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeFlatFeeRunPayment) GetDeletedAt() *time.Time", + "line": 1604 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeFlatFeeRunPayment) GetAnnotations() models.Annotations", + "line": 1608 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBased) GetID() string", + "line": 1612 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (e *ChargeUsageBased) GetCustomerID() string", + "line": 1616 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeUsageBased) GetServicePeriodFrom() time.Time", + "line": 1620 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeUsageBased) GetServicePeriodTo() time.Time", + "line": 1624 + }, + { + "kind": "func", + "name": "GetBillingPeriodFrom", + "signature": "func (e *ChargeUsageBased) GetBillingPeriodFrom() time.Time", + "line": 1628 + }, + { + "kind": "func", + "name": "GetBillingPeriodTo", + "signature": "func (e *ChargeUsageBased) GetBillingPeriodTo() time.Time", + "line": 1632 + }, + { + "kind": "func", + "name": "GetFullServicePeriodFrom", + "signature": "func (e *ChargeUsageBased) GetFullServicePeriodFrom() time.Time", + "line": 1636 + }, + { + "kind": "func", + "name": "GetFullServicePeriodTo", + "signature": "func (e *ChargeUsageBased) GetFullServicePeriodTo() time.Time", + "line": 1640 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeUsageBased) GetStatus() meta.ChargeStatus", + "line": 1644 + }, + { + "kind": "func", + "name": "GetUniqueReferenceID", + "signature": "func (e *ChargeUsageBased) GetUniqueReferenceID() *string", + "line": 1648 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *ChargeUsageBased) GetCurrency() currencyx.Code", + "line": 1652 + }, + { + "kind": "func", + "name": "GetManagedBy", + "signature": "func (e *ChargeUsageBased) GetManagedBy() billing.InvoiceLineManagedBy", + "line": 1656 + }, + { + "kind": "func", + "name": "GetSubscriptionID", + "signature": "func (e *ChargeUsageBased) GetSubscriptionID() *string", + "line": 1660 + }, + { + "kind": "func", + "name": "GetSubscriptionPhaseID", + "signature": "func (e *ChargeUsageBased) GetSubscriptionPhaseID() *string", + "line": 1664 + }, + { + "kind": "func", + "name": "GetSubscriptionItemID", + "signature": "func (e *ChargeUsageBased) GetSubscriptionItemID() *string", + "line": 1668 + }, + { + "kind": "func", + "name": "GetAdvanceAfter", + "signature": "func (e *ChargeUsageBased) GetAdvanceAfter() *time.Time", + "line": 1672 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *ChargeUsageBased) GetTaxCodeID() *string", + "line": 1676 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *ChargeUsageBased) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 1680 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeUsageBased) GetAnnotations() models.Annotations", + "line": 1684 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBased) GetNamespace() string", + "line": 1688 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *ChargeUsageBased) GetMetadata() map[string]string", + "line": 1692 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBased) GetCreatedAt() time.Time", + "line": 1696 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBased) GetUpdatedAt() time.Time", + "line": 1700 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBased) GetDeletedAt() *time.Time", + "line": 1704 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *ChargeUsageBased) GetName() string", + "line": 1708 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *ChargeUsageBased) GetDescription() *string", + "line": 1712 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetID() string", + "line": 1716 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetLineID() *string", + "line": 1720 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetAmount() alpacadecimal.Decimal", + "line": 1724 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetServicePeriodFrom() time.Time", + "line": 1728 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetServicePeriodTo() time.Time", + "line": 1732 + }, + { + "kind": "func", + "name": "GetLedgerTransactionGroupID", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetLedgerTransactionGroupID() string", + "line": 1736 + }, + { + "kind": "func", + "name": "GetSortHint", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetSortHint() int", + "line": 1740 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetType() creditrealization.Type", + "line": 1744 + }, + { + "kind": "func", + "name": "GetCorrectsRealizationID", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetCorrectsRealizationID() *string", + "line": 1748 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetNamespace() string", + "line": 1752 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetCreatedAt() time.Time", + "line": 1756 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetUpdatedAt() time.Time", + "line": 1760 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetDeletedAt() *time.Time", + "line": 1764 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeUsageBasedRunCreditAllocations) GetAnnotations() models.Annotations", + "line": 1768 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetID() string", + "line": 1772 + }, + { + "kind": "func", + "name": "GetCurrency", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetCurrency() currencyx.Code", + "line": 1776 + }, + { + "kind": "func", + "name": "GetTaxConfig", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxConfig() productcatalog.TaxConfig", + "line": 1780 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxCodeID() *string", + "line": 1784 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 1788 + }, + { + "kind": "func", + "name": "GetServicePeriodStart", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetServicePeriodStart() time.Time", + "line": 1792 + }, + { + "kind": "func", + "name": "GetServicePeriodEnd", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetServicePeriodEnd() time.Time", + "line": 1796 + }, + { + "kind": "func", + "name": "GetQuantity", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetQuantity() alpacadecimal.Decimal", + "line": 1800 + }, + { + "kind": "func", + "name": "GetInvoicingAppExternalID", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetInvoicingAppExternalID() *string", + "line": 1804 + }, + { + "kind": "func", + "name": "GetChildUniqueReferenceID", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetChildUniqueReferenceID() string", + "line": 1808 + }, + { + "kind": "func", + "name": "GetPerUnitAmount", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetPerUnitAmount() alpacadecimal.Decimal", + "line": 1812 + }, + { + "kind": "func", + "name": "GetCategory", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetCategory() stddetailedline.Category", + "line": 1816 + }, + { + "kind": "func", + "name": "GetPaymentTerm", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetPaymentTerm() productcatalog.PaymentTermType", + "line": 1820 + }, + { + "kind": "func", + "name": "GetIndex", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetIndex() *int", + "line": 1824 + }, + { + "kind": "func", + "name": "GetCreditsApplied", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetCreditsApplied() *creditsapplied.CreditsApplied", + "line": 1828 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetAnnotations() models.Annotations", + "line": 1832 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetNamespace() string", + "line": 1836 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetMetadata() map[string]string", + "line": 1840 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetCreatedAt() time.Time", + "line": 1844 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetUpdatedAt() time.Time", + "line": 1848 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetDeletedAt() *time.Time", + "line": 1852 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetName() string", + "line": 1856 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetDescription() *string", + "line": 1860 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetAmount() alpacadecimal.Decimal", + "line": 1864 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxesTotal() alpacadecimal.Decimal", + "line": 1868 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 1872 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 1876 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetChargesTotal() alpacadecimal.Decimal", + "line": 1880 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 1884 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetCreditsTotal() alpacadecimal.Decimal", + "line": 1888 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeUsageBasedRunDetailedLine) GetTotal() alpacadecimal.Decimal", + "line": 1892 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetID() string", + "line": 1896 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetServicePeriodFrom() time.Time", + "line": 1900 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetServicePeriodTo() time.Time", + "line": 1904 + }, + { + "kind": "func", + "name": "GetLedgerTransactionGroupID", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetLedgerTransactionGroupID() *string", + "line": 1908 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetNamespace() string", + "line": 1912 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetCreatedAt() time.Time", + "line": 1916 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetUpdatedAt() time.Time", + "line": 1920 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetDeletedAt() *time.Time", + "line": 1924 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetAnnotations() models.Annotations", + "line": 1928 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetAmount() alpacadecimal.Decimal", + "line": 1932 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetTaxesTotal() alpacadecimal.Decimal", + "line": 1936 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 1940 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 1944 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetChargesTotal() alpacadecimal.Decimal", + "line": 1948 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 1952 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetCreditsTotal() alpacadecimal.Decimal", + "line": 1956 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeUsageBasedRunInvoicedUsage) GetTotal() alpacadecimal.Decimal", + "line": 1960 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBasedRunPayment) GetID() string", + "line": 1964 + }, + { + "kind": "func", + "name": "GetLineID", + "signature": "func (e *ChargeUsageBasedRunPayment) GetLineID() string", + "line": 1968 + }, + { + "kind": "func", + "name": "GetInvoiceID", + "signature": "func (e *ChargeUsageBasedRunPayment) GetInvoiceID() string", + "line": 1972 + }, + { + "kind": "func", + "name": "GetServicePeriodFrom", + "signature": "func (e *ChargeUsageBasedRunPayment) GetServicePeriodFrom() time.Time", + "line": 1976 + }, + { + "kind": "func", + "name": "GetServicePeriodTo", + "signature": "func (e *ChargeUsageBasedRunPayment) GetServicePeriodTo() time.Time", + "line": 1980 + }, + { + "kind": "func", + "name": "GetStatus", + "signature": "func (e *ChargeUsageBasedRunPayment) GetStatus() payment.Status", + "line": 1984 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeUsageBasedRunPayment) GetAmount() alpacadecimal.Decimal", + "line": 1988 + }, + { + "kind": "func", + "name": "GetAuthorizedTransactionGroupID", + "signature": "func (e *ChargeUsageBasedRunPayment) GetAuthorizedTransactionGroupID() *string", + "line": 1992 + }, + { + "kind": "func", + "name": "GetAuthorizedAt", + "signature": "func (e *ChargeUsageBasedRunPayment) GetAuthorizedAt() *time.Time", + "line": 1996 + }, + { + "kind": "func", + "name": "GetSettledTransactionGroupID", + "signature": "func (e *ChargeUsageBasedRunPayment) GetSettledTransactionGroupID() *string", + "line": 2000 + }, + { + "kind": "func", + "name": "GetSettledAt", + "signature": "func (e *ChargeUsageBasedRunPayment) GetSettledAt() *time.Time", + "line": 2004 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBasedRunPayment) GetNamespace() string", + "line": 2008 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBasedRunPayment) GetCreatedAt() time.Time", + "line": 2012 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBasedRunPayment) GetUpdatedAt() time.Time", + "line": 2016 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBasedRunPayment) GetDeletedAt() *time.Time", + "line": 2020 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *ChargeUsageBasedRunPayment) GetAnnotations() models.Annotations", + "line": 2024 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *ChargeUsageBasedRuns) GetID() string", + "line": 2028 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *ChargeUsageBasedRuns) GetNamespace() string", + "line": 2032 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *ChargeUsageBasedRuns) GetCreatedAt() time.Time", + "line": 2036 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *ChargeUsageBasedRuns) GetUpdatedAt() time.Time", + "line": 2040 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *ChargeUsageBasedRuns) GetDeletedAt() *time.Time", + "line": 2044 + }, + { + "kind": "func", + "name": "GetAmount", + "signature": "func (e *ChargeUsageBasedRuns) GetAmount() alpacadecimal.Decimal", + "line": 2048 + }, + { + "kind": "func", + "name": "GetTaxesTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetTaxesTotal() alpacadecimal.Decimal", + "line": 2052 + }, + { + "kind": "func", + "name": "GetTaxesInclusiveTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetTaxesInclusiveTotal() alpacadecimal.Decimal", + "line": 2056 + }, + { + "kind": "func", + "name": "GetTaxesExclusiveTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetTaxesExclusiveTotal() alpacadecimal.Decimal", + "line": 2060 + }, + { + "kind": "func", + "name": "GetChargesTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetChargesTotal() alpacadecimal.Decimal", + "line": 2064 + }, + { + "kind": "func", + "name": "GetDiscountsTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetDiscountsTotal() alpacadecimal.Decimal", + "line": 2068 + }, + { + "kind": "func", + "name": "GetCreditsTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetCreditsTotal() alpacadecimal.Decimal", + "line": 2072 + }, + { + "kind": "func", + "name": "GetTotal", + "signature": "func (e *ChargeUsageBasedRuns) GetTotal() alpacadecimal.Decimal", + "line": 2076 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *CreditRealizationLineage) GetID() string", + "line": 2080 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *CreditRealizationLineage) GetNamespace() string", + "line": 2084 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *CreditRealizationLineageSegment) GetID() string", + "line": 2088 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *CurrencyCostBasis) GetID() string", + "line": 2092 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *CurrencyCostBasis) GetNamespace() string", + "line": 2096 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *CurrencyCostBasis) GetCreatedAt() time.Time", + "line": 2100 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *CurrencyCostBasis) GetUpdatedAt() time.Time", + "line": 2104 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *CurrencyCostBasis) GetDeletedAt() *time.Time", + "line": 2108 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *CustomCurrency) GetID() string", + "line": 2112 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *CustomCurrency) GetNamespace() string", + "line": 2116 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *CustomCurrency) GetCreatedAt() time.Time", + "line": 2120 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *CustomCurrency) GetUpdatedAt() time.Time", + "line": 2124 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *CustomCurrency) GetDeletedAt() *time.Time", + "line": 2128 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Customer) GetID() string", + "line": 2132 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Customer) GetNamespace() string", + "line": 2136 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Customer) GetMetadata() map[string]string", + "line": 2140 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Customer) GetCreatedAt() time.Time", + "line": 2144 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Customer) GetUpdatedAt() time.Time", + "line": 2148 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Customer) GetDeletedAt() *time.Time", + "line": 2152 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *Customer) GetName() string", + "line": 2156 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *Customer) GetDescription() *string", + "line": 2160 + }, + { + "kind": "func", + "name": "GetBillingAddressCountry", + "signature": "func (e *Customer) GetBillingAddressCountry() *models.CountryCode", + "line": 2164 + }, + { + "kind": "func", + "name": "GetBillingAddressPostalCode", + "signature": "func (e *Customer) GetBillingAddressPostalCode() *string", + "line": 2168 + }, + { + "kind": "func", + "name": "GetBillingAddressState", + "signature": "func (e *Customer) GetBillingAddressState() *string", + "line": 2172 + }, + { + "kind": "func", + "name": "GetBillingAddressCity", + "signature": "func (e *Customer) GetBillingAddressCity() *string", + "line": 2176 + }, + { + "kind": "func", + "name": "GetBillingAddressLine1", + "signature": "func (e *Customer) GetBillingAddressLine1() *string", + "line": 2180 + }, + { + "kind": "func", + "name": "GetBillingAddressLine2", + "signature": "func (e *Customer) GetBillingAddressLine2() *string", + "line": 2184 + }, + { + "kind": "func", + "name": "GetBillingAddressPhoneNumber", + "signature": "func (e *Customer) GetBillingAddressPhoneNumber() *string", + "line": 2188 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *Customer) GetAnnotations() models.Annotations", + "line": 2192 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *CustomerSubjects) GetNamespace() string", + "line": 2196 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Entitlement) GetID() string", + "line": 2200 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Entitlement) GetNamespace() string", + "line": 2204 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Entitlement) GetMetadata() map[string]string", + "line": 2208 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Entitlement) GetCreatedAt() time.Time", + "line": 2212 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Entitlement) GetUpdatedAt() time.Time", + "line": 2216 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Entitlement) GetDeletedAt() *time.Time", + "line": 2220 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Feature) GetID() string", + "line": 2224 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Feature) GetCreatedAt() time.Time", + "line": 2228 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Feature) GetUpdatedAt() time.Time", + "line": 2232 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Feature) GetDeletedAt() *time.Time", + "line": 2236 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Feature) GetMetadata() map[string]string", + "line": 2240 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Grant) GetID() string", + "line": 2244 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Grant) GetNamespace() string", + "line": 2248 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *Grant) GetAnnotations() models.Annotations", + "line": 2252 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Grant) GetCreatedAt() time.Time", + "line": 2256 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Grant) GetUpdatedAt() time.Time", + "line": 2260 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Grant) GetDeletedAt() *time.Time", + "line": 2264 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LLMCostPrice) GetID() string", + "line": 2268 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *LLMCostPrice) GetMetadata() map[string]string", + "line": 2272 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LLMCostPrice) GetCreatedAt() time.Time", + "line": 2276 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LLMCostPrice) GetUpdatedAt() time.Time", + "line": 2280 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LLMCostPrice) GetDeletedAt() *time.Time", + "line": 2284 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerAccount) GetID() string", + "line": 2288 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerAccount) GetNamespace() string", + "line": 2292 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerAccount) GetAnnotations() models.Annotations", + "line": 2296 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerAccount) GetCreatedAt() time.Time", + "line": 2300 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerAccount) GetUpdatedAt() time.Time", + "line": 2304 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerAccount) GetDeletedAt() *time.Time", + "line": 2308 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerBreakageRecord) GetID() string", + "line": 2312 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerBreakageRecord) GetNamespace() string", + "line": 2316 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerBreakageRecord) GetAnnotations() models.Annotations", + "line": 2320 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerBreakageRecord) GetCreatedAt() time.Time", + "line": 2324 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerBreakageRecord) GetUpdatedAt() time.Time", + "line": 2328 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerBreakageRecord) GetDeletedAt() *time.Time", + "line": 2332 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerCustomerAccount) GetID() string", + "line": 2336 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerCustomerAccount) GetNamespace() string", + "line": 2340 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerCustomerAccount) GetCreatedAt() time.Time", + "line": 2344 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerCustomerAccount) GetUpdatedAt() time.Time", + "line": 2348 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerCustomerAccount) GetDeletedAt() *time.Time", + "line": 2352 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerEntry) GetID() string", + "line": 2356 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerEntry) GetNamespace() string", + "line": 2360 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerEntry) GetAnnotations() models.Annotations", + "line": 2364 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerEntry) GetCreatedAt() time.Time", + "line": 2368 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerEntry) GetUpdatedAt() time.Time", + "line": 2372 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerEntry) GetDeletedAt() *time.Time", + "line": 2376 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerSubAccount) GetID() string", + "line": 2380 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerSubAccount) GetNamespace() string", + "line": 2384 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerSubAccount) GetAnnotations() models.Annotations", + "line": 2388 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerSubAccount) GetCreatedAt() time.Time", + "line": 2392 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerSubAccount) GetUpdatedAt() time.Time", + "line": 2396 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerSubAccount) GetDeletedAt() *time.Time", + "line": 2400 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerSubAccountRoute) GetID() string", + "line": 2404 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerSubAccountRoute) GetNamespace() string", + "line": 2408 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerSubAccountRoute) GetCreatedAt() time.Time", + "line": 2412 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerSubAccountRoute) GetUpdatedAt() time.Time", + "line": 2416 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerSubAccountRoute) GetDeletedAt() *time.Time", + "line": 2420 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerTransaction) GetID() string", + "line": 2424 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerTransaction) GetNamespace() string", + "line": 2428 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerTransaction) GetAnnotations() models.Annotations", + "line": 2432 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerTransaction) GetCreatedAt() time.Time", + "line": 2436 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerTransaction) GetUpdatedAt() time.Time", + "line": 2440 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerTransaction) GetDeletedAt() *time.Time", + "line": 2444 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *LedgerTransactionGroup) GetID() string", + "line": 2448 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *LedgerTransactionGroup) GetNamespace() string", + "line": 2452 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *LedgerTransactionGroup) GetAnnotations() models.Annotations", + "line": 2456 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *LedgerTransactionGroup) GetCreatedAt() time.Time", + "line": 2460 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *LedgerTransactionGroup) GetUpdatedAt() time.Time", + "line": 2464 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *LedgerTransactionGroup) GetDeletedAt() *time.Time", + "line": 2468 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Meter) GetID() string", + "line": 2472 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Meter) GetNamespace() string", + "line": 2476 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Meter) GetMetadata() map[string]string", + "line": 2480 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Meter) GetCreatedAt() time.Time", + "line": 2484 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Meter) GetUpdatedAt() time.Time", + "line": 2488 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Meter) GetDeletedAt() *time.Time", + "line": 2492 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *Meter) GetName() string", + "line": 2496 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *Meter) GetDescription() *string", + "line": 2500 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *Meter) GetKey() string", + "line": 2504 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *Meter) GetAnnotations() models.Annotations", + "line": 2508 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *NotificationChannel) GetID() string", + "line": 2512 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *NotificationChannel) GetNamespace() string", + "line": 2516 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *NotificationChannel) GetCreatedAt() time.Time", + "line": 2520 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *NotificationChannel) GetUpdatedAt() time.Time", + "line": 2524 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *NotificationChannel) GetDeletedAt() *time.Time", + "line": 2528 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *NotificationChannel) GetAnnotations() models.Annotations", + "line": 2532 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *NotificationChannel) GetMetadata() map[string]string", + "line": 2536 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *NotificationEvent) GetID() string", + "line": 2540 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *NotificationEvent) GetNamespace() string", + "line": 2544 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *NotificationEvent) GetAnnotations() models.Annotations", + "line": 2548 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *NotificationEventDeliveryStatus) GetID() string", + "line": 2552 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *NotificationEventDeliveryStatus) GetNamespace() string", + "line": 2556 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *NotificationEventDeliveryStatus) GetAnnotations() models.Annotations", + "line": 2560 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *NotificationRule) GetID() string", + "line": 2564 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *NotificationRule) GetNamespace() string", + "line": 2568 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *NotificationRule) GetCreatedAt() time.Time", + "line": 2572 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *NotificationRule) GetUpdatedAt() time.Time", + "line": 2576 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *NotificationRule) GetDeletedAt() *time.Time", + "line": 2580 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *NotificationRule) GetAnnotations() models.Annotations", + "line": 2584 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *NotificationRule) GetMetadata() map[string]string", + "line": 2588 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *OrganizationDefaultTaxCodes) GetID() string", + "line": 2592 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *OrganizationDefaultTaxCodes) GetCreatedAt() time.Time", + "line": 2596 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *OrganizationDefaultTaxCodes) GetUpdatedAt() time.Time", + "line": 2600 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *OrganizationDefaultTaxCodes) GetDeletedAt() *time.Time", + "line": 2604 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Plan) GetID() string", + "line": 2608 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Plan) GetNamespace() string", + "line": 2612 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Plan) GetMetadata() map[string]string", + "line": 2616 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Plan) GetCreatedAt() time.Time", + "line": 2620 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Plan) GetUpdatedAt() time.Time", + "line": 2624 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Plan) GetDeletedAt() *time.Time", + "line": 2628 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *Plan) GetName() string", + "line": 2632 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *Plan) GetDescription() *string", + "line": 2636 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *Plan) GetKey() string", + "line": 2640 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *PlanAddon) GetID() string", + "line": 2644 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *PlanAddon) GetNamespace() string", + "line": 2648 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *PlanAddon) GetMetadata() map[string]string", + "line": 2652 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *PlanAddon) GetAnnotations() models.Annotations", + "line": 2656 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *PlanAddon) GetCreatedAt() time.Time", + "line": 2660 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *PlanAddon) GetUpdatedAt() time.Time", + "line": 2664 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *PlanAddon) GetDeletedAt() *time.Time", + "line": 2668 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *PlanPhase) GetID() string", + "line": 2672 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *PlanPhase) GetNamespace() string", + "line": 2676 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *PlanPhase) GetMetadata() map[string]string", + "line": 2680 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *PlanPhase) GetCreatedAt() time.Time", + "line": 2684 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *PlanPhase) GetUpdatedAt() time.Time", + "line": 2688 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *PlanPhase) GetDeletedAt() *time.Time", + "line": 2692 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *PlanPhase) GetName() string", + "line": 2696 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *PlanPhase) GetDescription() *string", + "line": 2700 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *PlanPhase) GetKey() string", + "line": 2704 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *PlanRateCard) GetID() string", + "line": 2708 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *PlanRateCard) GetNamespace() string", + "line": 2712 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *PlanRateCard) GetMetadata() map[string]string", + "line": 2716 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *PlanRateCard) GetCreatedAt() time.Time", + "line": 2720 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *PlanRateCard) GetUpdatedAt() time.Time", + "line": 2724 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *PlanRateCard) GetDeletedAt() *time.Time", + "line": 2728 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *PlanRateCard) GetName() string", + "line": 2732 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *PlanRateCard) GetDescription() *string", + "line": 2736 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *PlanRateCard) GetKey() string", + "line": 2740 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *PlanRateCard) GetTaxCodeID() *string", + "line": 2744 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *PlanRateCard) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 2748 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Subject) GetID() string", + "line": 2752 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Subject) GetNamespace() string", + "line": 2756 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Subject) GetCreatedAt() time.Time", + "line": 2760 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Subject) GetUpdatedAt() time.Time", + "line": 2764 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Subject) GetDeletedAt() *time.Time", + "line": 2768 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *Subscription) GetID() string", + "line": 2772 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *Subscription) GetNamespace() string", + "line": 2776 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *Subscription) GetAnnotations() models.Annotations", + "line": 2780 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *Subscription) GetCreatedAt() time.Time", + "line": 2784 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *Subscription) GetUpdatedAt() time.Time", + "line": 2788 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *Subscription) GetDeletedAt() *time.Time", + "line": 2792 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *Subscription) GetMetadata() map[string]string", + "line": 2796 + }, + { + "kind": "func", + "name": "GetActiveFrom", + "signature": "func (e *Subscription) GetActiveFrom() time.Time", + "line": 2800 + }, + { + "kind": "func", + "name": "GetActiveTo", + "signature": "func (e *Subscription) GetActiveTo() *time.Time", + "line": 2804 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *SubscriptionAddon) GetID() string", + "line": 2808 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *SubscriptionAddon) GetNamespace() string", + "line": 2812 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *SubscriptionAddon) GetMetadata() map[string]string", + "line": 2816 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *SubscriptionAddon) GetCreatedAt() time.Time", + "line": 2820 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *SubscriptionAddon) GetUpdatedAt() time.Time", + "line": 2824 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *SubscriptionAddon) GetDeletedAt() *time.Time", + "line": 2828 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *SubscriptionAddonQuantity) GetID() string", + "line": 2832 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *SubscriptionAddonQuantity) GetNamespace() string", + "line": 2836 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *SubscriptionAddonQuantity) GetCreatedAt() time.Time", + "line": 2840 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *SubscriptionAddonQuantity) GetUpdatedAt() time.Time", + "line": 2844 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *SubscriptionAddonQuantity) GetDeletedAt() *time.Time", + "line": 2848 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *SubscriptionBillingSyncState) GetID() string", + "line": 2852 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *SubscriptionBillingSyncState) GetNamespace() string", + "line": 2856 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *SubscriptionItem) GetID() string", + "line": 2860 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *SubscriptionItem) GetNamespace() string", + "line": 2864 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *SubscriptionItem) GetCreatedAt() time.Time", + "line": 2868 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *SubscriptionItem) GetUpdatedAt() time.Time", + "line": 2872 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *SubscriptionItem) GetDeletedAt() *time.Time", + "line": 2876 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *SubscriptionItem) GetMetadata() map[string]string", + "line": 2880 + }, + { + "kind": "func", + "name": "GetTaxCodeID", + "signature": "func (e *SubscriptionItem) GetTaxCodeID() *string", + "line": 2884 + }, + { + "kind": "func", + "name": "GetTaxBehavior", + "signature": "func (e *SubscriptionItem) GetTaxBehavior() *productcatalog.TaxBehavior", + "line": 2888 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *SubscriptionPhase) GetID() string", + "line": 2892 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *SubscriptionPhase) GetNamespace() string", + "line": 2896 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *SubscriptionPhase) GetCreatedAt() time.Time", + "line": 2900 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *SubscriptionPhase) GetUpdatedAt() time.Time", + "line": 2904 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *SubscriptionPhase) GetDeletedAt() *time.Time", + "line": 2908 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *SubscriptionPhase) GetMetadata() map[string]string", + "line": 2912 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *TaxCode) GetID() string", + "line": 2916 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *TaxCode) GetNamespace() string", + "line": 2920 + }, + { + "kind": "func", + "name": "GetMetadata", + "signature": "func (e *TaxCode) GetMetadata() map[string]string", + "line": 2924 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *TaxCode) GetCreatedAt() time.Time", + "line": 2928 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *TaxCode) GetUpdatedAt() time.Time", + "line": 2932 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *TaxCode) GetDeletedAt() *time.Time", + "line": 2936 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (e *TaxCode) GetName() string", + "line": 2940 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (e *TaxCode) GetDescription() *string", + "line": 2944 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (e *TaxCode) GetKey() string", + "line": 2948 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *TaxCode) GetAnnotations() models.Annotations", + "line": 2952 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (e *UsageReset) GetID() string", + "line": 2956 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (e *UsageReset) GetNamespace() string", + "line": 2960 + }, + { + "kind": "func", + "name": "GetAnnotations", + "signature": "func (e *UsageReset) GetAnnotations() models.Annotations", + "line": 2964 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (e *UsageReset) GetCreatedAt() time.Time", + "line": 2968 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (e *UsageReset) GetUpdatedAt() time.Time", + "line": 2972 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (e *UsageReset) GetDeletedAt() *time.Time", + "line": 2976 + } + ], + "line_count": 2978 + }, + "openmeter/ent/db/enttest/enttest.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\t_ \"github.com/openmeterio/openmeter/openmeter/ent/db/runtime\"", + "symbols": [ + { + "kind": "func", + "name": "WithOptions", + "signature": "func WithOptions(opts ...db.Option) Option", + "line": 34 + }, + { + "kind": "func", + "name": "WithMigrateOptions", + "signature": "func WithMigrateOptions(opts ...schema.MigrateOption) Option", + "line": 41 + }, + { + "kind": "func", + "name": "newOptions", + "signature": "func newOptions(opts []Option) *options", + "line": 47 + }, + { + "kind": "func", + "name": "Open", + "signature": "func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *db.Client", + "line": 56 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(t TestingT, opts ...Option) *db.Client", + "line": 68 + }, + { + "kind": "func", + "name": "migrateSchema", + "signature": "func migrateSchema(t TestingT, c *db.Client, o *options)", + "line": 74 + } + ], + "line_count": 84 + }, + "openmeter/ent/db/expose.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetConfig", + "signature": "func (c *Client) GetConfig() *entutils.RawEntConfig", + "line": 15 + }, + { + "kind": "struct", + "name": "ExposedTxDriver", + "signature": "type ExposedTxDriver struct", + "line": 24 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (d *ExposedTxDriver) Rollback() error", + "line": 30 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (d *ExposedTxDriver) Commit() error", + "line": 34 + }, + { + "kind": "func", + "name": "SavePoint", + "signature": "func (d *ExposedTxDriver) SavePoint(name string) error", + "line": 38 + }, + { + "kind": "func", + "name": "RollbackTo", + "signature": "func (d *ExposedTxDriver) RollbackTo(name string) error", + "line": 43 + }, + { + "kind": "func", + "name": "Release", + "signature": "func (d *ExposedTxDriver) Release(name string) error", + "line": 48 + }, + { + "kind": "func", + "name": "HijackTx", + "signature": "func (c *Client) HijackTx(ctx context.Context, opts *sql.TxOptions) (context.Context, *entutils.RawEntConfig, *ExposedTxDriver, error)", + "line": 55 + }, + { + "kind": "func", + "name": "NewTxClientFromRawConfig", + "signature": "func NewTxClientFromRawConfig(ctx context.Context, cfg entutils.RawEntConfig) *Tx", + "line": 78 + } + ], + "line_count": 252 + }, + "openmeter/ent/db/feature.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Feature", + "signature": "type Feature struct", + "line": 20 + }, + { + "kind": "struct", + "name": "FeatureEdges", + "signature": "type FeatureEdges struct", + "line": 73 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func (e FeatureEdges) EntitlementOrErr() ([]*Entitlement, error)", + "line": 95 + }, + { + "kind": "func", + "name": "RatecardOrErr", + "signature": "func (e FeatureEdges) RatecardOrErr() ([]*PlanRateCard, error)", + "line": 104 + }, + { + "kind": "func", + "name": "AddonRatecardOrErr", + "signature": "func (e FeatureEdges) AddonRatecardOrErr() ([]*AddonRateCard, error)", + "line": 113 + }, + { + "kind": "func", + "name": "UsageBasedChargesOrErr", + "signature": "func (e FeatureEdges) UsageBasedChargesOrErr() ([]*ChargeUsageBased, error)", + "line": 122 + }, + { + "kind": "func", + "name": "UsageBasedRunsOrErr", + "signature": "func (e FeatureEdges) UsageBasedRunsOrErr() ([]*ChargeUsageBasedRuns, error)", + "line": 131 + }, + { + "kind": "func", + "name": "FlatFeeChargesOrErr", + "signature": "func (e FeatureEdges) FlatFeeChargesOrErr() ([]*ChargeFlatFee, error)", + "line": 140 + }, + { + "kind": "func", + "name": "MeterOrErr", + "signature": "func (e FeatureEdges) MeterOrErr() (*Meter, error)", + "line": 149 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Feature) assignValues(columns []string, values []any) error", + "line": 180 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Feature) Value(name string) (ent.Value, error)", + "line": 346 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_m *Feature) QueryEntitlement() *EntitlementQuery", + "line": 351 + }, + { + "kind": "func", + "name": "QueryRatecard", + "signature": "func (_m *Feature) QueryRatecard() *PlanRateCardQuery", + "line": 356 + }, + { + "kind": "func", + "name": "QueryAddonRatecard", + "signature": "func (_m *Feature) QueryAddonRatecard() *AddonRateCardQuery", + "line": 361 + }, + { + "kind": "func", + "name": "QueryUsageBasedCharges", + "signature": "func (_m *Feature) QueryUsageBasedCharges() *ChargeUsageBasedQuery", + "line": 366 + }, + { + "kind": "func", + "name": "QueryUsageBasedRuns", + "signature": "func (_m *Feature) QueryUsageBasedRuns() *ChargeUsageBasedRunsQuery", + "line": 371 + }, + { + "kind": "func", + "name": "QueryFlatFeeCharges", + "signature": "func (_m *Feature) QueryFlatFeeCharges() *ChargeFlatFeeQuery", + "line": 376 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (_m *Feature) QueryMeter() *MeterQuery", + "line": 381 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Feature) Update() *FeatureUpdateOne", + "line": 388 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Feature) Unwrap() *Feature", + "line": 394 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Feature) String() string", + "line": 404 + } + ], + "line_count": 501 + }, + "openmeter/ent/db/feature/feature.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 153 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 205 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 210 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 215 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 220 + }, + { + "kind": "func", + "name": "ByMeterSlug", + "signature": "func ByMeterSlug(opts ...sql.OrderTermOption) OrderOption", + "line": 225 + }, + { + "kind": "func", + "name": "ByMeterID", + "signature": "func ByMeterID(opts ...sql.OrderTermOption) OrderOption", + "line": 230 + }, + { + "kind": "func", + "name": "ByUnitCostType", + "signature": "func ByUnitCostType(opts ...sql.OrderTermOption) OrderOption", + "line": 235 + }, + { + "kind": "func", + "name": "ByUnitCostManualAmount", + "signature": "func ByUnitCostManualAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 240 + }, + { + "kind": "func", + "name": "ByUnitCostLlmProviderProperty", + "signature": "func ByUnitCostLlmProviderProperty(opts ...sql.OrderTermOption) OrderOption", + "line": 245 + }, + { + "kind": "func", + "name": "ByUnitCostLlmProvider", + "signature": "func ByUnitCostLlmProvider(opts ...sql.OrderTermOption) OrderOption", + "line": 250 + }, + { + "kind": "func", + "name": "ByUnitCostLlmModelProperty", + "signature": "func ByUnitCostLlmModelProperty(opts ...sql.OrderTermOption) OrderOption", + "line": 255 + }, + { + "kind": "func", + "name": "ByUnitCostLlmModel", + "signature": "func ByUnitCostLlmModel(opts ...sql.OrderTermOption) OrderOption", + "line": 260 + }, + { + "kind": "func", + "name": "ByUnitCostLlmTokenTypeProperty", + "signature": "func ByUnitCostLlmTokenTypeProperty(opts ...sql.OrderTermOption) OrderOption", + "line": 265 + }, + { + "kind": "func", + "name": "ByUnitCostLlmTokenType", + "signature": "func ByUnitCostLlmTokenType(opts ...sql.OrderTermOption) OrderOption", + "line": 270 + }, + { + "kind": "func", + "name": "ByArchivedAt", + "signature": "func ByArchivedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 275 + }, + { + "kind": "func", + "name": "ByEntitlementCount", + "signature": "func ByEntitlementCount(opts ...sql.OrderTermOption) OrderOption", + "line": 280 + }, + { + "kind": "func", + "name": "ByEntitlement", + "signature": "func ByEntitlement(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 287 + }, + { + "kind": "func", + "name": "ByRatecardCount", + "signature": "func ByRatecardCount(opts ...sql.OrderTermOption) OrderOption", + "line": 294 + }, + { + "kind": "func", + "name": "ByRatecard", + "signature": "func ByRatecard(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 301 + }, + { + "kind": "func", + "name": "ByAddonRatecardCount", + "signature": "func ByAddonRatecardCount(opts ...sql.OrderTermOption) OrderOption", + "line": 308 + }, + { + "kind": "func", + "name": "ByAddonRatecard", + "signature": "func ByAddonRatecard(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 315 + }, + { + "kind": "func", + "name": "ByUsageBasedChargesCount", + "signature": "func ByUsageBasedChargesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 322 + }, + { + "kind": "func", + "name": "ByUsageBasedCharges", + "signature": "func ByUsageBasedCharges(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 329 + }, + { + "kind": "func", + "name": "ByUsageBasedRunsCount", + "signature": "func ByUsageBasedRunsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 336 + }, + { + "kind": "func", + "name": "ByUsageBasedRuns", + "signature": "func ByUsageBasedRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 343 + }, + { + "kind": "func", + "name": "ByFlatFeeChargesCount", + "signature": "func ByFlatFeeChargesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 350 + }, + { + "kind": "func", + "name": "ByFlatFeeCharges", + "signature": "func ByFlatFeeCharges(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 357 + }, + { + "kind": "func", + "name": "ByMeterField", + "signature": "func ByMeterField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 364 + }, + { + "kind": "func", + "name": "newEntitlementStep", + "signature": "func newEntitlementStep() *sqlgraph.Step", + "line": 369 + }, + { + "kind": "func", + "name": "newRatecardStep", + "signature": "func newRatecardStep() *sqlgraph.Step", + "line": 376 + }, + { + "kind": "func", + "name": "newAddonRatecardStep", + "signature": "func newAddonRatecardStep() *sqlgraph.Step", + "line": 383 + }, + { + "kind": "func", + "name": "newUsageBasedChargesStep", + "signature": "func newUsageBasedChargesStep() *sqlgraph.Step", + "line": 390 + }, + { + "kind": "func", + "name": "newUsageBasedRunsStep", + "signature": "func newUsageBasedRunsStep() *sqlgraph.Step", + "line": 397 + }, + { + "kind": "func", + "name": "newFlatFeeChargesStep", + "signature": "func newFlatFeeChargesStep() *sqlgraph.Step", + "line": 404 + }, + { + "kind": "func", + "name": "newMeterStep", + "signature": "func newMeterStep() *sqlgraph.Step", + "line": 411 + } + ], + "line_count": 417 + }, + "openmeter/ent/db/feature/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Feature", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Feature", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Feature", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Feature", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Feature", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Feature", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Feature", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Feature", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Feature", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Feature", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Feature", + "line": 65 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Feature", + "line": 70 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Feature", + "line": 75 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Feature", + "line": 80 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Feature", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Feature", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Feature", + "line": 95 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Feature", + "line": 100 + }, + { + "kind": "func", + "name": "MeterSlug", + "signature": "func MeterSlug(v string) predicate.Feature", + "line": 105 + }, + { + "kind": "func", + "name": "MeterID", + "signature": "func MeterID(v string) predicate.Feature", + "line": 110 + }, + { + "kind": "func", + "name": "UnitCostType", + "signature": "func UnitCostType(v string) predicate.Feature", + "line": 115 + }, + { + "kind": "func", + "name": "UnitCostManualAmount", + "signature": "func UnitCostManualAmount(v alpacadecimal.Decimal) predicate.Feature", + "line": 120 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderProperty", + "signature": "func UnitCostLlmProviderProperty(v string) predicate.Feature", + "line": 125 + }, + { + "kind": "func", + "name": "UnitCostLlmProvider", + "signature": "func UnitCostLlmProvider(v string) predicate.Feature", + "line": 130 + }, + { + "kind": "func", + "name": "UnitCostLlmModelProperty", + "signature": "func UnitCostLlmModelProperty(v string) predicate.Feature", + "line": 135 + }, + { + "kind": "func", + "name": "UnitCostLlmModel", + "signature": "func UnitCostLlmModel(v string) predicate.Feature", + "line": 140 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeProperty", + "signature": "func UnitCostLlmTokenTypeProperty(v string) predicate.Feature", + "line": 145 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenType", + "signature": "func UnitCostLlmTokenType(v string) predicate.Feature", + "line": 150 + }, + { + "kind": "func", + "name": "ArchivedAt", + "signature": "func ArchivedAt(v time.Time) predicate.Feature", + "line": 155 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Feature", + "line": 160 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Feature", + "line": 165 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Feature", + "line": 170 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Feature", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Feature", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Feature", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Feature", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Feature", + "line": 195 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Feature", + "line": 200 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Feature", + "line": 205 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Feature", + "line": 210 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Feature", + "line": 215 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Feature", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Feature", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Feature", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Feature", + "line": 235 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Feature", + "line": 240 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Feature", + "line": 245 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Feature", + "line": 250 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Feature", + "line": 255 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Feature", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Feature", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Feature", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Feature", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Feature", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Feature", + "line": 285 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Feature", + "line": 290 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Feature", + "line": 295 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Feature", + "line": 300 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Feature", + "line": 305 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Feature", + "line": 310 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Feature", + "line": 315 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Feature", + "line": 320 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Feature", + "line": 325 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Feature", + "line": 330 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Feature", + "line": 335 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Feature", + "line": 340 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Feature", + "line": 345 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Feature", + "line": 350 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Feature", + "line": 355 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Feature", + "line": 360 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Feature", + "line": 365 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Feature", + "line": 370 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Feature", + "line": 375 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Feature", + "line": 380 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Feature", + "line": 385 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Feature", + "line": 390 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Feature", + "line": 395 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Feature", + "line": 400 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Feature", + "line": 405 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Feature", + "line": 410 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Feature", + "line": 415 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Feature", + "line": 420 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Feature", + "line": 425 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Feature", + "line": 430 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Feature", + "line": 435 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Feature", + "line": 440 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Feature", + "line": 445 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Feature", + "line": 450 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Feature", + "line": 455 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Feature", + "line": 460 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Feature", + "line": 465 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Feature", + "line": 470 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Feature", + "line": 475 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Feature", + "line": 480 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Feature", + "line": 485 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Feature", + "line": 490 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Feature", + "line": 495 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Feature", + "line": 500 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Feature", + "line": 505 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Feature", + "line": 510 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Feature", + "line": 515 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Feature", + "line": 520 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Feature", + "line": 525 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Feature", + "line": 530 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Feature", + "line": 535 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Feature", + "line": 540 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Feature", + "line": 545 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Feature", + "line": 550 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Feature", + "line": 555 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Feature", + "line": 560 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Feature", + "line": 565 + }, + { + "kind": "func", + "name": "MeterSlugEQ", + "signature": "func MeterSlugEQ(v string) predicate.Feature", + "line": 570 + }, + { + "kind": "func", + "name": "MeterSlugNEQ", + "signature": "func MeterSlugNEQ(v string) predicate.Feature", + "line": 575 + }, + { + "kind": "func", + "name": "MeterSlugIn", + "signature": "func MeterSlugIn(vs ...string) predicate.Feature", + "line": 580 + }, + { + "kind": "func", + "name": "MeterSlugNotIn", + "signature": "func MeterSlugNotIn(vs ...string) predicate.Feature", + "line": 585 + }, + { + "kind": "func", + "name": "MeterSlugGT", + "signature": "func MeterSlugGT(v string) predicate.Feature", + "line": 590 + }, + { + "kind": "func", + "name": "MeterSlugGTE", + "signature": "func MeterSlugGTE(v string) predicate.Feature", + "line": 595 + }, + { + "kind": "func", + "name": "MeterSlugLT", + "signature": "func MeterSlugLT(v string) predicate.Feature", + "line": 600 + }, + { + "kind": "func", + "name": "MeterSlugLTE", + "signature": "func MeterSlugLTE(v string) predicate.Feature", + "line": 605 + }, + { + "kind": "func", + "name": "MeterSlugContains", + "signature": "func MeterSlugContains(v string) predicate.Feature", + "line": 610 + }, + { + "kind": "func", + "name": "MeterSlugHasPrefix", + "signature": "func MeterSlugHasPrefix(v string) predicate.Feature", + "line": 615 + }, + { + "kind": "func", + "name": "MeterSlugHasSuffix", + "signature": "func MeterSlugHasSuffix(v string) predicate.Feature", + "line": 620 + }, + { + "kind": "func", + "name": "MeterSlugIsNil", + "signature": "func MeterSlugIsNil() predicate.Feature", + "line": 625 + }, + { + "kind": "func", + "name": "MeterSlugNotNil", + "signature": "func MeterSlugNotNil() predicate.Feature", + "line": 630 + }, + { + "kind": "func", + "name": "MeterSlugEqualFold", + "signature": "func MeterSlugEqualFold(v string) predicate.Feature", + "line": 635 + }, + { + "kind": "func", + "name": "MeterSlugContainsFold", + "signature": "func MeterSlugContainsFold(v string) predicate.Feature", + "line": 640 + }, + { + "kind": "func", + "name": "MeterIDEQ", + "signature": "func MeterIDEQ(v string) predicate.Feature", + "line": 645 + }, + { + "kind": "func", + "name": "MeterIDNEQ", + "signature": "func MeterIDNEQ(v string) predicate.Feature", + "line": 650 + }, + { + "kind": "func", + "name": "MeterIDIn", + "signature": "func MeterIDIn(vs ...string) predicate.Feature", + "line": 655 + }, + { + "kind": "func", + "name": "MeterIDNotIn", + "signature": "func MeterIDNotIn(vs ...string) predicate.Feature", + "line": 660 + }, + { + "kind": "func", + "name": "MeterIDGT", + "signature": "func MeterIDGT(v string) predicate.Feature", + "line": 665 + }, + { + "kind": "func", + "name": "MeterIDGTE", + "signature": "func MeterIDGTE(v string) predicate.Feature", + "line": 670 + }, + { + "kind": "func", + "name": "MeterIDLT", + "signature": "func MeterIDLT(v string) predicate.Feature", + "line": 675 + }, + { + "kind": "func", + "name": "MeterIDLTE", + "signature": "func MeterIDLTE(v string) predicate.Feature", + "line": 680 + }, + { + "kind": "func", + "name": "MeterIDContains", + "signature": "func MeterIDContains(v string) predicate.Feature", + "line": 685 + }, + { + "kind": "func", + "name": "MeterIDHasPrefix", + "signature": "func MeterIDHasPrefix(v string) predicate.Feature", + "line": 690 + }, + { + "kind": "func", + "name": "MeterIDHasSuffix", + "signature": "func MeterIDHasSuffix(v string) predicate.Feature", + "line": 695 + }, + { + "kind": "func", + "name": "MeterIDIsNil", + "signature": "func MeterIDIsNil() predicate.Feature", + "line": 700 + }, + { + "kind": "func", + "name": "MeterIDNotNil", + "signature": "func MeterIDNotNil() predicate.Feature", + "line": 705 + }, + { + "kind": "func", + "name": "MeterIDEqualFold", + "signature": "func MeterIDEqualFold(v string) predicate.Feature", + "line": 710 + }, + { + "kind": "func", + "name": "MeterIDContainsFold", + "signature": "func MeterIDContainsFold(v string) predicate.Feature", + "line": 715 + }, + { + "kind": "func", + "name": "MeterGroupByFiltersIsNil", + "signature": "func MeterGroupByFiltersIsNil() predicate.Feature", + "line": 720 + }, + { + "kind": "func", + "name": "MeterGroupByFiltersNotNil", + "signature": "func MeterGroupByFiltersNotNil() predicate.Feature", + "line": 725 + }, + { + "kind": "func", + "name": "AdvancedMeterGroupByFiltersIsNil", + "signature": "func AdvancedMeterGroupByFiltersIsNil() predicate.Feature", + "line": 730 + }, + { + "kind": "func", + "name": "AdvancedMeterGroupByFiltersNotNil", + "signature": "func AdvancedMeterGroupByFiltersNotNil() predicate.Feature", + "line": 735 + }, + { + "kind": "func", + "name": "UnitCostTypeEQ", + "signature": "func UnitCostTypeEQ(v string) predicate.Feature", + "line": 740 + }, + { + "kind": "func", + "name": "UnitCostTypeNEQ", + "signature": "func UnitCostTypeNEQ(v string) predicate.Feature", + "line": 745 + }, + { + "kind": "func", + "name": "UnitCostTypeIn", + "signature": "func UnitCostTypeIn(vs ...string) predicate.Feature", + "line": 750 + }, + { + "kind": "func", + "name": "UnitCostTypeNotIn", + "signature": "func UnitCostTypeNotIn(vs ...string) predicate.Feature", + "line": 755 + }, + { + "kind": "func", + "name": "UnitCostTypeGT", + "signature": "func UnitCostTypeGT(v string) predicate.Feature", + "line": 760 + }, + { + "kind": "func", + "name": "UnitCostTypeGTE", + "signature": "func UnitCostTypeGTE(v string) predicate.Feature", + "line": 765 + }, + { + "kind": "func", + "name": "UnitCostTypeLT", + "signature": "func UnitCostTypeLT(v string) predicate.Feature", + "line": 770 + }, + { + "kind": "func", + "name": "UnitCostTypeLTE", + "signature": "func UnitCostTypeLTE(v string) predicate.Feature", + "line": 775 + }, + { + "kind": "func", + "name": "UnitCostTypeContains", + "signature": "func UnitCostTypeContains(v string) predicate.Feature", + "line": 780 + }, + { + "kind": "func", + "name": "UnitCostTypeHasPrefix", + "signature": "func UnitCostTypeHasPrefix(v string) predicate.Feature", + "line": 785 + }, + { + "kind": "func", + "name": "UnitCostTypeHasSuffix", + "signature": "func UnitCostTypeHasSuffix(v string) predicate.Feature", + "line": 790 + }, + { + "kind": "func", + "name": "UnitCostTypeIsNil", + "signature": "func UnitCostTypeIsNil() predicate.Feature", + "line": 795 + }, + { + "kind": "func", + "name": "UnitCostTypeNotNil", + "signature": "func UnitCostTypeNotNil() predicate.Feature", + "line": 800 + }, + { + "kind": "func", + "name": "UnitCostTypeEqualFold", + "signature": "func UnitCostTypeEqualFold(v string) predicate.Feature", + "line": 805 + }, + { + "kind": "func", + "name": "UnitCostTypeContainsFold", + "signature": "func UnitCostTypeContainsFold(v string) predicate.Feature", + "line": 810 + }, + { + "kind": "func", + "name": "UnitCostManualAmountEQ", + "signature": "func UnitCostManualAmountEQ(v alpacadecimal.Decimal) predicate.Feature", + "line": 815 + }, + { + "kind": "func", + "name": "UnitCostManualAmountNEQ", + "signature": "func UnitCostManualAmountNEQ(v alpacadecimal.Decimal) predicate.Feature", + "line": 820 + }, + { + "kind": "func", + "name": "UnitCostManualAmountIn", + "signature": "func UnitCostManualAmountIn(vs ...alpacadecimal.Decimal) predicate.Feature", + "line": 825 + }, + { + "kind": "func", + "name": "UnitCostManualAmountNotIn", + "signature": "func UnitCostManualAmountNotIn(vs ...alpacadecimal.Decimal) predicate.Feature", + "line": 830 + }, + { + "kind": "func", + "name": "UnitCostManualAmountGT", + "signature": "func UnitCostManualAmountGT(v alpacadecimal.Decimal) predicate.Feature", + "line": 835 + }, + { + "kind": "func", + "name": "UnitCostManualAmountGTE", + "signature": "func UnitCostManualAmountGTE(v alpacadecimal.Decimal) predicate.Feature", + "line": 840 + }, + { + "kind": "func", + "name": "UnitCostManualAmountLT", + "signature": "func UnitCostManualAmountLT(v alpacadecimal.Decimal) predicate.Feature", + "line": 845 + }, + { + "kind": "func", + "name": "UnitCostManualAmountLTE", + "signature": "func UnitCostManualAmountLTE(v alpacadecimal.Decimal) predicate.Feature", + "line": 850 + }, + { + "kind": "func", + "name": "UnitCostManualAmountIsNil", + "signature": "func UnitCostManualAmountIsNil() predicate.Feature", + "line": 855 + }, + { + "kind": "func", + "name": "UnitCostManualAmountNotNil", + "signature": "func UnitCostManualAmountNotNil() predicate.Feature", + "line": 860 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyEQ", + "signature": "func UnitCostLlmProviderPropertyEQ(v string) predicate.Feature", + "line": 865 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyNEQ", + "signature": "func UnitCostLlmProviderPropertyNEQ(v string) predicate.Feature", + "line": 870 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyIn", + "signature": "func UnitCostLlmProviderPropertyIn(vs ...string) predicate.Feature", + "line": 875 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyNotIn", + "signature": "func UnitCostLlmProviderPropertyNotIn(vs ...string) predicate.Feature", + "line": 880 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyGT", + "signature": "func UnitCostLlmProviderPropertyGT(v string) predicate.Feature", + "line": 885 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyGTE", + "signature": "func UnitCostLlmProviderPropertyGTE(v string) predicate.Feature", + "line": 890 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyLT", + "signature": "func UnitCostLlmProviderPropertyLT(v string) predicate.Feature", + "line": 895 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyLTE", + "signature": "func UnitCostLlmProviderPropertyLTE(v string) predicate.Feature", + "line": 900 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyContains", + "signature": "func UnitCostLlmProviderPropertyContains(v string) predicate.Feature", + "line": 905 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyHasPrefix", + "signature": "func UnitCostLlmProviderPropertyHasPrefix(v string) predicate.Feature", + "line": 910 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyHasSuffix", + "signature": "func UnitCostLlmProviderPropertyHasSuffix(v string) predicate.Feature", + "line": 915 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyIsNil", + "signature": "func UnitCostLlmProviderPropertyIsNil() predicate.Feature", + "line": 920 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyNotNil", + "signature": "func UnitCostLlmProviderPropertyNotNil() predicate.Feature", + "line": 925 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyEqualFold", + "signature": "func UnitCostLlmProviderPropertyEqualFold(v string) predicate.Feature", + "line": 930 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderPropertyContainsFold", + "signature": "func UnitCostLlmProviderPropertyContainsFold(v string) predicate.Feature", + "line": 935 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderEQ", + "signature": "func UnitCostLlmProviderEQ(v string) predicate.Feature", + "line": 940 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderNEQ", + "signature": "func UnitCostLlmProviderNEQ(v string) predicate.Feature", + "line": 945 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderIn", + "signature": "func UnitCostLlmProviderIn(vs ...string) predicate.Feature", + "line": 950 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderNotIn", + "signature": "func UnitCostLlmProviderNotIn(vs ...string) predicate.Feature", + "line": 955 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderGT", + "signature": "func UnitCostLlmProviderGT(v string) predicate.Feature", + "line": 960 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderGTE", + "signature": "func UnitCostLlmProviderGTE(v string) predicate.Feature", + "line": 965 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderLT", + "signature": "func UnitCostLlmProviderLT(v string) predicate.Feature", + "line": 970 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderLTE", + "signature": "func UnitCostLlmProviderLTE(v string) predicate.Feature", + "line": 975 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderContains", + "signature": "func UnitCostLlmProviderContains(v string) predicate.Feature", + "line": 980 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderHasPrefix", + "signature": "func UnitCostLlmProviderHasPrefix(v string) predicate.Feature", + "line": 985 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderHasSuffix", + "signature": "func UnitCostLlmProviderHasSuffix(v string) predicate.Feature", + "line": 990 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderIsNil", + "signature": "func UnitCostLlmProviderIsNil() predicate.Feature", + "line": 995 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderNotNil", + "signature": "func UnitCostLlmProviderNotNil() predicate.Feature", + "line": 1000 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderEqualFold", + "signature": "func UnitCostLlmProviderEqualFold(v string) predicate.Feature", + "line": 1005 + }, + { + "kind": "func", + "name": "UnitCostLlmProviderContainsFold", + "signature": "func UnitCostLlmProviderContainsFold(v string) predicate.Feature", + "line": 1010 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyEQ", + "signature": "func UnitCostLlmModelPropertyEQ(v string) predicate.Feature", + "line": 1015 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyNEQ", + "signature": "func UnitCostLlmModelPropertyNEQ(v string) predicate.Feature", + "line": 1020 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyIn", + "signature": "func UnitCostLlmModelPropertyIn(vs ...string) predicate.Feature", + "line": 1025 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyNotIn", + "signature": "func UnitCostLlmModelPropertyNotIn(vs ...string) predicate.Feature", + "line": 1030 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyGT", + "signature": "func UnitCostLlmModelPropertyGT(v string) predicate.Feature", + "line": 1035 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyGTE", + "signature": "func UnitCostLlmModelPropertyGTE(v string) predicate.Feature", + "line": 1040 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyLT", + "signature": "func UnitCostLlmModelPropertyLT(v string) predicate.Feature", + "line": 1045 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyLTE", + "signature": "func UnitCostLlmModelPropertyLTE(v string) predicate.Feature", + "line": 1050 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyContains", + "signature": "func UnitCostLlmModelPropertyContains(v string) predicate.Feature", + "line": 1055 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyHasPrefix", + "signature": "func UnitCostLlmModelPropertyHasPrefix(v string) predicate.Feature", + "line": 1060 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyHasSuffix", + "signature": "func UnitCostLlmModelPropertyHasSuffix(v string) predicate.Feature", + "line": 1065 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyIsNil", + "signature": "func UnitCostLlmModelPropertyIsNil() predicate.Feature", + "line": 1070 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyNotNil", + "signature": "func UnitCostLlmModelPropertyNotNil() predicate.Feature", + "line": 1075 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyEqualFold", + "signature": "func UnitCostLlmModelPropertyEqualFold(v string) predicate.Feature", + "line": 1080 + }, + { + "kind": "func", + "name": "UnitCostLlmModelPropertyContainsFold", + "signature": "func UnitCostLlmModelPropertyContainsFold(v string) predicate.Feature", + "line": 1085 + }, + { + "kind": "func", + "name": "UnitCostLlmModelEQ", + "signature": "func UnitCostLlmModelEQ(v string) predicate.Feature", + "line": 1090 + }, + { + "kind": "func", + "name": "UnitCostLlmModelNEQ", + "signature": "func UnitCostLlmModelNEQ(v string) predicate.Feature", + "line": 1095 + }, + { + "kind": "func", + "name": "UnitCostLlmModelIn", + "signature": "func UnitCostLlmModelIn(vs ...string) predicate.Feature", + "line": 1100 + }, + { + "kind": "func", + "name": "UnitCostLlmModelNotIn", + "signature": "func UnitCostLlmModelNotIn(vs ...string) predicate.Feature", + "line": 1105 + }, + { + "kind": "func", + "name": "UnitCostLlmModelGT", + "signature": "func UnitCostLlmModelGT(v string) predicate.Feature", + "line": 1110 + }, + { + "kind": "func", + "name": "UnitCostLlmModelGTE", + "signature": "func UnitCostLlmModelGTE(v string) predicate.Feature", + "line": 1115 + }, + { + "kind": "func", + "name": "UnitCostLlmModelLT", + "signature": "func UnitCostLlmModelLT(v string) predicate.Feature", + "line": 1120 + }, + { + "kind": "func", + "name": "UnitCostLlmModelLTE", + "signature": "func UnitCostLlmModelLTE(v string) predicate.Feature", + "line": 1125 + }, + { + "kind": "func", + "name": "UnitCostLlmModelContains", + "signature": "func UnitCostLlmModelContains(v string) predicate.Feature", + "line": 1130 + }, + { + "kind": "func", + "name": "UnitCostLlmModelHasPrefix", + "signature": "func UnitCostLlmModelHasPrefix(v string) predicate.Feature", + "line": 1135 + }, + { + "kind": "func", + "name": "UnitCostLlmModelHasSuffix", + "signature": "func UnitCostLlmModelHasSuffix(v string) predicate.Feature", + "line": 1140 + }, + { + "kind": "func", + "name": "UnitCostLlmModelIsNil", + "signature": "func UnitCostLlmModelIsNil() predicate.Feature", + "line": 1145 + }, + { + "kind": "func", + "name": "UnitCostLlmModelNotNil", + "signature": "func UnitCostLlmModelNotNil() predicate.Feature", + "line": 1150 + }, + { + "kind": "func", + "name": "UnitCostLlmModelEqualFold", + "signature": "func UnitCostLlmModelEqualFold(v string) predicate.Feature", + "line": 1155 + }, + { + "kind": "func", + "name": "UnitCostLlmModelContainsFold", + "signature": "func UnitCostLlmModelContainsFold(v string) predicate.Feature", + "line": 1160 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyEQ", + "signature": "func UnitCostLlmTokenTypePropertyEQ(v string) predicate.Feature", + "line": 1165 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyNEQ", + "signature": "func UnitCostLlmTokenTypePropertyNEQ(v string) predicate.Feature", + "line": 1170 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyIn", + "signature": "func UnitCostLlmTokenTypePropertyIn(vs ...string) predicate.Feature", + "line": 1175 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyNotIn", + "signature": "func UnitCostLlmTokenTypePropertyNotIn(vs ...string) predicate.Feature", + "line": 1180 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyGT", + "signature": "func UnitCostLlmTokenTypePropertyGT(v string) predicate.Feature", + "line": 1185 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyGTE", + "signature": "func UnitCostLlmTokenTypePropertyGTE(v string) predicate.Feature", + "line": 1190 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyLT", + "signature": "func UnitCostLlmTokenTypePropertyLT(v string) predicate.Feature", + "line": 1195 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyLTE", + "signature": "func UnitCostLlmTokenTypePropertyLTE(v string) predicate.Feature", + "line": 1200 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyContains", + "signature": "func UnitCostLlmTokenTypePropertyContains(v string) predicate.Feature", + "line": 1205 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyHasPrefix", + "signature": "func UnitCostLlmTokenTypePropertyHasPrefix(v string) predicate.Feature", + "line": 1210 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyHasSuffix", + "signature": "func UnitCostLlmTokenTypePropertyHasSuffix(v string) predicate.Feature", + "line": 1215 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyIsNil", + "signature": "func UnitCostLlmTokenTypePropertyIsNil() predicate.Feature", + "line": 1220 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyNotNil", + "signature": "func UnitCostLlmTokenTypePropertyNotNil() predicate.Feature", + "line": 1225 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyEqualFold", + "signature": "func UnitCostLlmTokenTypePropertyEqualFold(v string) predicate.Feature", + "line": 1230 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypePropertyContainsFold", + "signature": "func UnitCostLlmTokenTypePropertyContainsFold(v string) predicate.Feature", + "line": 1235 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeEQ", + "signature": "func UnitCostLlmTokenTypeEQ(v string) predicate.Feature", + "line": 1240 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeNEQ", + "signature": "func UnitCostLlmTokenTypeNEQ(v string) predicate.Feature", + "line": 1245 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeIn", + "signature": "func UnitCostLlmTokenTypeIn(vs ...string) predicate.Feature", + "line": 1250 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeNotIn", + "signature": "func UnitCostLlmTokenTypeNotIn(vs ...string) predicate.Feature", + "line": 1255 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeGT", + "signature": "func UnitCostLlmTokenTypeGT(v string) predicate.Feature", + "line": 1260 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeGTE", + "signature": "func UnitCostLlmTokenTypeGTE(v string) predicate.Feature", + "line": 1265 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeLT", + "signature": "func UnitCostLlmTokenTypeLT(v string) predicate.Feature", + "line": 1270 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeLTE", + "signature": "func UnitCostLlmTokenTypeLTE(v string) predicate.Feature", + "line": 1275 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeContains", + "signature": "func UnitCostLlmTokenTypeContains(v string) predicate.Feature", + "line": 1280 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeHasPrefix", + "signature": "func UnitCostLlmTokenTypeHasPrefix(v string) predicate.Feature", + "line": 1285 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeHasSuffix", + "signature": "func UnitCostLlmTokenTypeHasSuffix(v string) predicate.Feature", + "line": 1290 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeIsNil", + "signature": "func UnitCostLlmTokenTypeIsNil() predicate.Feature", + "line": 1295 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeNotNil", + "signature": "func UnitCostLlmTokenTypeNotNil() predicate.Feature", + "line": 1300 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeEqualFold", + "signature": "func UnitCostLlmTokenTypeEqualFold(v string) predicate.Feature", + "line": 1305 + }, + { + "kind": "func", + "name": "UnitCostLlmTokenTypeContainsFold", + "signature": "func UnitCostLlmTokenTypeContainsFold(v string) predicate.Feature", + "line": 1310 + }, + { + "kind": "func", + "name": "ArchivedAtEQ", + "signature": "func ArchivedAtEQ(v time.Time) predicate.Feature", + "line": 1315 + }, + { + "kind": "func", + "name": "ArchivedAtNEQ", + "signature": "func ArchivedAtNEQ(v time.Time) predicate.Feature", + "line": 1320 + }, + { + "kind": "func", + "name": "ArchivedAtIn", + "signature": "func ArchivedAtIn(vs ...time.Time) predicate.Feature", + "line": 1325 + }, + { + "kind": "func", + "name": "ArchivedAtNotIn", + "signature": "func ArchivedAtNotIn(vs ...time.Time) predicate.Feature", + "line": 1330 + }, + { + "kind": "func", + "name": "ArchivedAtGT", + "signature": "func ArchivedAtGT(v time.Time) predicate.Feature", + "line": 1335 + }, + { + "kind": "func", + "name": "ArchivedAtGTE", + "signature": "func ArchivedAtGTE(v time.Time) predicate.Feature", + "line": 1340 + }, + { + "kind": "func", + "name": "ArchivedAtLT", + "signature": "func ArchivedAtLT(v time.Time) predicate.Feature", + "line": 1345 + }, + { + "kind": "func", + "name": "ArchivedAtLTE", + "signature": "func ArchivedAtLTE(v time.Time) predicate.Feature", + "line": 1350 + }, + { + "kind": "func", + "name": "ArchivedAtIsNil", + "signature": "func ArchivedAtIsNil() predicate.Feature", + "line": 1355 + }, + { + "kind": "func", + "name": "ArchivedAtNotNil", + "signature": "func ArchivedAtNotNil() predicate.Feature", + "line": 1360 + }, + { + "kind": "func", + "name": "HasEntitlement", + "signature": "func HasEntitlement() predicate.Feature", + "line": 1365 + }, + { + "kind": "func", + "name": "HasEntitlementWith", + "signature": "func HasEntitlementWith(preds ...predicate.Entitlement) predicate.Feature", + "line": 1376 + }, + { + "kind": "func", + "name": "HasRatecard", + "signature": "func HasRatecard() predicate.Feature", + "line": 1388 + }, + { + "kind": "func", + "name": "HasRatecardWith", + "signature": "func HasRatecardWith(preds ...predicate.PlanRateCard) predicate.Feature", + "line": 1399 + }, + { + "kind": "func", + "name": "HasAddonRatecard", + "signature": "func HasAddonRatecard() predicate.Feature", + "line": 1411 + }, + { + "kind": "func", + "name": "HasAddonRatecardWith", + "signature": "func HasAddonRatecardWith(preds ...predicate.AddonRateCard) predicate.Feature", + "line": 1422 + }, + { + "kind": "func", + "name": "HasUsageBasedCharges", + "signature": "func HasUsageBasedCharges() predicate.Feature", + "line": 1434 + }, + { + "kind": "func", + "name": "HasUsageBasedChargesWith", + "signature": "func HasUsageBasedChargesWith(preds ...predicate.ChargeUsageBased) predicate.Feature", + "line": 1445 + }, + { + "kind": "func", + "name": "HasUsageBasedRuns", + "signature": "func HasUsageBasedRuns() predicate.Feature", + "line": 1457 + }, + { + "kind": "func", + "name": "HasUsageBasedRunsWith", + "signature": "func HasUsageBasedRunsWith(preds ...predicate.ChargeUsageBasedRuns) predicate.Feature", + "line": 1468 + }, + { + "kind": "func", + "name": "HasFlatFeeCharges", + "signature": "func HasFlatFeeCharges() predicate.Feature", + "line": 1480 + }, + { + "kind": "func", + "name": "HasFlatFeeChargesWith", + "signature": "func HasFlatFeeChargesWith(preds ...predicate.ChargeFlatFee) predicate.Feature", + "line": 1491 + }, + { + "kind": "func", + "name": "HasMeter", + "signature": "func HasMeter() predicate.Feature", + "line": 1503 + }, + { + "kind": "func", + "name": "HasMeterWith", + "signature": "func HasMeterWith(preds ...predicate.Meter) predicate.Feature", + "line": 1514 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Feature) predicate.Feature", + "line": 1526 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Feature) predicate.Feature", + "line": 1531 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Feature) predicate.Feature", + "line": 1536 + } + ], + "line_count": 1538 + }, + "openmeter/ent/db/feature_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureCreate", + "signature": "type FeatureCreate struct", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *FeatureCreate) SetCreatedAt(v time.Time) *FeatureCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *FeatureCreate) SetNillableCreatedAt(v *time.Time) *FeatureCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *FeatureCreate) SetUpdatedAt(v time.Time) *FeatureCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *FeatureCreate) SetNillableUpdatedAt(v *time.Time) *FeatureCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *FeatureCreate) SetDeletedAt(v time.Time) *FeatureCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *FeatureCreate) SetNillableDeletedAt(v *time.Time) *FeatureCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *FeatureCreate) SetMetadata(v map[string]string) *FeatureCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *FeatureCreate) SetNamespace(v string) *FeatureCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *FeatureCreate) SetName(v string) *FeatureCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *FeatureCreate) SetDescription(v string) *FeatureCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *FeatureCreate) SetNillableDescription(v *string) *FeatureCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *FeatureCreate) SetKey(v string) *FeatureCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetMeterSlug", + "signature": "func (_c *FeatureCreate) SetMeterSlug(v string) *FeatureCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetNillableMeterSlug", + "signature": "func (_c *FeatureCreate) SetNillableMeterSlug(v *string) *FeatureCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetMeterID", + "signature": "func (_c *FeatureCreate) SetMeterID(v string) *FeatureCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableMeterID", + "signature": "func (_c *FeatureCreate) SetNillableMeterID(v *string) *FeatureCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (_c *FeatureCreate) SetMeterGroupByFilters(v map[string]string) *FeatureCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (_c *FeatureCreate) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureCreate", + "line": 150 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (_c *FeatureCreate) SetUnitCostType(v string) *FeatureCreate", + "line": 156 + }, + { + "kind": "func", + "name": "SetNillableUnitCostType", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostType(v *string) *FeatureCreate", + "line": 162 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (_c *FeatureCreate) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureCreate", + "line": 170 + }, + { + "kind": "func", + "name": "SetNillableUnitCostManualAmount", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostManualAmount(v *alpacadecimal.Decimal) *FeatureCreate", + "line": 176 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmProviderProperty(v string) *FeatureCreate", + "line": 184 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProviderProperty", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmProviderProperty(v *string) *FeatureCreate", + "line": 190 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmProvider(v string) *FeatureCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProvider", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmProvider(v *string) *FeatureCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmModelProperty(v string) *FeatureCreate", + "line": 212 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModelProperty", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmModelProperty(v *string) *FeatureCreate", + "line": 218 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmModel(v string) *FeatureCreate", + "line": 226 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModel", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmModel(v *string) *FeatureCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmTokenTypeProperty(v string) *FeatureCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenTypeProperty", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmTokenTypeProperty(v *string) *FeatureCreate", + "line": 246 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (_c *FeatureCreate) SetUnitCostLlmTokenType(v string) *FeatureCreate", + "line": 254 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenType", + "signature": "func (_c *FeatureCreate) SetNillableUnitCostLlmTokenType(v *string) *FeatureCreate", + "line": 260 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (_c *FeatureCreate) SetArchivedAt(v time.Time) *FeatureCreate", + "line": 268 + }, + { + "kind": "func", + "name": "SetNillableArchivedAt", + "signature": "func (_c *FeatureCreate) SetNillableArchivedAt(v *time.Time) *FeatureCreate", + "line": 274 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *FeatureCreate) SetID(v string) *FeatureCreate", + "line": 282 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *FeatureCreate) SetNillableID(v *string) *FeatureCreate", + "line": 288 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_c *FeatureCreate) AddEntitlementIDs(ids ...string) *FeatureCreate", + "line": 296 + }, + { + "kind": "func", + "name": "AddEntitlement", + "signature": "func (_c *FeatureCreate) AddEntitlement(v ...*Entitlement) *FeatureCreate", + "line": 302 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_c *FeatureCreate) AddRatecardIDs(ids ...string) *FeatureCreate", + "line": 311 + }, + { + "kind": "func", + "name": "AddRatecard", + "signature": "func (_c *FeatureCreate) AddRatecard(v ...*PlanRateCard) *FeatureCreate", + "line": 317 + }, + { + "kind": "func", + "name": "AddAddonRatecardIDs", + "signature": "func (_c *FeatureCreate) AddAddonRatecardIDs(ids ...string) *FeatureCreate", + "line": 326 + }, + { + "kind": "func", + "name": "AddAddonRatecard", + "signature": "func (_c *FeatureCreate) AddAddonRatecard(v ...*AddonRateCard) *FeatureCreate", + "line": 332 + }, + { + "kind": "func", + "name": "AddUsageBasedChargeIDs", + "signature": "func (_c *FeatureCreate) AddUsageBasedChargeIDs(ids ...string) *FeatureCreate", + "line": 341 + }, + { + "kind": "func", + "name": "AddUsageBasedCharges", + "signature": "func (_c *FeatureCreate) AddUsageBasedCharges(v ...*ChargeUsageBased) *FeatureCreate", + "line": 347 + }, + { + "kind": "func", + "name": "AddUsageBasedRunIDs", + "signature": "func (_c *FeatureCreate) AddUsageBasedRunIDs(ids ...string) *FeatureCreate", + "line": 356 + }, + { + "kind": "func", + "name": "AddUsageBasedRuns", + "signature": "func (_c *FeatureCreate) AddUsageBasedRuns(v ...*ChargeUsageBasedRuns) *FeatureCreate", + "line": 362 + }, + { + "kind": "func", + "name": "AddFlatFeeChargeIDs", + "signature": "func (_c *FeatureCreate) AddFlatFeeChargeIDs(ids ...string) *FeatureCreate", + "line": 371 + }, + { + "kind": "func", + "name": "AddFlatFeeCharges", + "signature": "func (_c *FeatureCreate) AddFlatFeeCharges(v ...*ChargeFlatFee) *FeatureCreate", + "line": 377 + }, + { + "kind": "func", + "name": "SetMeter", + "signature": "func (_c *FeatureCreate) SetMeter(v *Meter) *FeatureCreate", + "line": 386 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *FeatureCreate) Mutation() *FeatureMutation", + "line": 391 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *FeatureCreate) Save(ctx context.Context) (*Feature, error)", + "line": 396 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *FeatureCreate) SaveX(ctx context.Context) *Feature", + "line": 402 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *FeatureCreate) Exec(ctx context.Context) error", + "line": 411 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *FeatureCreate) ExecX(ctx context.Context)", + "line": 417 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *FeatureCreate) defaults()", + "line": 424 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *FeatureCreate) check() error", + "line": 440 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *FeatureCreate) sqlSave(ctx context.Context) (*Feature, error)", + "line": 479 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *FeatureCreate) createSpec() (*Feature, *sqlgraph.CreateSpec)", + "line": 502 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *FeatureCreate) OnConflict(opts ...sql.ConflictOption) *FeatureUpsertOne", + "line": 724 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *FeatureCreate) OnConflictColumns(columns ...string) *FeatureUpsertOne", + "line": 737 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *FeatureUpsert) SetUpdatedAt(v time.Time) *FeatureUpsert", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *FeatureUpsert) UpdateUpdatedAt() *FeatureUpsert", + "line": 764 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *FeatureUpsert) SetDeletedAt(v time.Time) *FeatureUpsert", + "line": 770 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *FeatureUpsert) UpdateDeletedAt() *FeatureUpsert", + "line": 776 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *FeatureUpsert) ClearDeletedAt() *FeatureUpsert", + "line": 782 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *FeatureUpsert) SetMetadata(v map[string]string) *FeatureUpsert", + "line": 788 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *FeatureUpsert) UpdateMetadata() *FeatureUpsert", + "line": 794 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *FeatureUpsert) ClearMetadata() *FeatureUpsert", + "line": 800 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *FeatureUpsert) SetName(v string) *FeatureUpsert", + "line": 806 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *FeatureUpsert) UpdateName() *FeatureUpsert", + "line": 812 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *FeatureUpsert) SetDescription(v string) *FeatureUpsert", + "line": 818 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *FeatureUpsert) UpdateDescription() *FeatureUpsert", + "line": 824 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *FeatureUpsert) ClearDescription() *FeatureUpsert", + "line": 830 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) SetMeterGroupByFilters(v map[string]string) *FeatureUpsert", + "line": 836 + }, + { + "kind": "func", + "name": "UpdateMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) UpdateMeterGroupByFilters() *FeatureUpsert", + "line": 842 + }, + { + "kind": "func", + "name": "ClearMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) ClearMeterGroupByFilters() *FeatureUpsert", + "line": 848 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureUpsert", + "line": 854 + }, + { + "kind": "func", + "name": "UpdateAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) UpdateAdvancedMeterGroupByFilters() *FeatureUpsert", + "line": 860 + }, + { + "kind": "func", + "name": "ClearAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsert) ClearAdvancedMeterGroupByFilters() *FeatureUpsert", + "line": 866 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (u *FeatureUpsert) SetUnitCostType(v string) *FeatureUpsert", + "line": 872 + }, + { + "kind": "func", + "name": "UpdateUnitCostType", + "signature": "func (u *FeatureUpsert) UpdateUnitCostType() *FeatureUpsert", + "line": 878 + }, + { + "kind": "func", + "name": "ClearUnitCostType", + "signature": "func (u *FeatureUpsert) ClearUnitCostType() *FeatureUpsert", + "line": 884 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (u *FeatureUpsert) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureUpsert", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateUnitCostManualAmount", + "signature": "func (u *FeatureUpsert) UpdateUnitCostManualAmount() *FeatureUpsert", + "line": 896 + }, + { + "kind": "func", + "name": "ClearUnitCostManualAmount", + "signature": "func (u *FeatureUpsert) ClearUnitCostManualAmount() *FeatureUpsert", + "line": 902 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmProviderProperty(v string) *FeatureUpsert", + "line": 908 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmProviderProperty() *FeatureUpsert", + "line": 914 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmProviderProperty() *FeatureUpsert", + "line": 920 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmProvider(v string) *FeatureUpsert", + "line": 926 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProvider", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmProvider() *FeatureUpsert", + "line": 932 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProvider", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmProvider() *FeatureUpsert", + "line": 938 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmModelProperty(v string) *FeatureUpsert", + "line": 944 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmModelProperty() *FeatureUpsert", + "line": 950 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmModelProperty() *FeatureUpsert", + "line": 956 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmModel(v string) *FeatureUpsert", + "line": 962 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModel", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmModel() *FeatureUpsert", + "line": 968 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModel", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmModel() *FeatureUpsert", + "line": 974 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmTokenTypeProperty(v string) *FeatureUpsert", + "line": 980 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmTokenTypeProperty() *FeatureUpsert", + "line": 986 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmTokenTypeProperty() *FeatureUpsert", + "line": 992 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsert) SetUnitCostLlmTokenType(v string) *FeatureUpsert", + "line": 998 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsert) UpdateUnitCostLlmTokenType() *FeatureUpsert", + "line": 1004 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsert) ClearUnitCostLlmTokenType() *FeatureUpsert", + "line": 1010 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (u *FeatureUpsert) SetArchivedAt(v time.Time) *FeatureUpsert", + "line": 1016 + }, + { + "kind": "func", + "name": "UpdateArchivedAt", + "signature": "func (u *FeatureUpsert) UpdateArchivedAt() *FeatureUpsert", + "line": 1022 + }, + { + "kind": "func", + "name": "ClearArchivedAt", + "signature": "func (u *FeatureUpsert) ClearArchivedAt() *FeatureUpsert", + "line": 1028 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *FeatureUpsertOne) UpdateNewValues() *FeatureUpsertOne", + "line": 1044 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *FeatureUpsertOne) Ignore() *FeatureUpsertOne", + "line": 1075 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *FeatureUpsertOne) DoNothing() *FeatureUpsertOne", + "line": 1082 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *FeatureUpsertOne) Update(set func(*FeatureUpsert)) *FeatureUpsertOne", + "line": 1089 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *FeatureUpsertOne) SetUpdatedAt(v time.Time) *FeatureUpsertOne", + "line": 1097 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *FeatureUpsertOne) UpdateUpdatedAt() *FeatureUpsertOne", + "line": 1104 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *FeatureUpsertOne) SetDeletedAt(v time.Time) *FeatureUpsertOne", + "line": 1111 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *FeatureUpsertOne) UpdateDeletedAt() *FeatureUpsertOne", + "line": 1118 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *FeatureUpsertOne) ClearDeletedAt() *FeatureUpsertOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *FeatureUpsertOne) SetMetadata(v map[string]string) *FeatureUpsertOne", + "line": 1132 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *FeatureUpsertOne) UpdateMetadata() *FeatureUpsertOne", + "line": 1139 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *FeatureUpsertOne) ClearMetadata() *FeatureUpsertOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *FeatureUpsertOne) SetName(v string) *FeatureUpsertOne", + "line": 1153 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *FeatureUpsertOne) UpdateName() *FeatureUpsertOne", + "line": 1160 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *FeatureUpsertOne) SetDescription(v string) *FeatureUpsertOne", + "line": 1167 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *FeatureUpsertOne) UpdateDescription() *FeatureUpsertOne", + "line": 1174 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *FeatureUpsertOne) ClearDescription() *FeatureUpsertOne", + "line": 1181 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) SetMeterGroupByFilters(v map[string]string) *FeatureUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "UpdateMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) UpdateMeterGroupByFilters() *FeatureUpsertOne", + "line": 1195 + }, + { + "kind": "func", + "name": "ClearMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) ClearMeterGroupByFilters() *FeatureUpsertOne", + "line": 1202 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureUpsertOne", + "line": 1209 + }, + { + "kind": "func", + "name": "UpdateAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) UpdateAdvancedMeterGroupByFilters() *FeatureUpsertOne", + "line": 1216 + }, + { + "kind": "func", + "name": "ClearAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertOne) ClearAdvancedMeterGroupByFilters() *FeatureUpsertOne", + "line": 1223 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (u *FeatureUpsertOne) SetUnitCostType(v string) *FeatureUpsertOne", + "line": 1230 + }, + { + "kind": "func", + "name": "UpdateUnitCostType", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostType() *FeatureUpsertOne", + "line": 1237 + }, + { + "kind": "func", + "name": "ClearUnitCostType", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostType() *FeatureUpsertOne", + "line": 1244 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (u *FeatureUpsertOne) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureUpsertOne", + "line": 1251 + }, + { + "kind": "func", + "name": "UpdateUnitCostManualAmount", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostManualAmount() *FeatureUpsertOne", + "line": 1258 + }, + { + "kind": "func", + "name": "ClearUnitCostManualAmount", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostManualAmount() *FeatureUpsertOne", + "line": 1265 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmProviderProperty(v string) *FeatureUpsertOne", + "line": 1272 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmProviderProperty() *FeatureUpsertOne", + "line": 1279 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmProviderProperty() *FeatureUpsertOne", + "line": 1286 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmProvider(v string) *FeatureUpsertOne", + "line": 1293 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmProvider() *FeatureUpsertOne", + "line": 1300 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmProvider() *FeatureUpsertOne", + "line": 1307 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmModelProperty(v string) *FeatureUpsertOne", + "line": 1314 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmModelProperty() *FeatureUpsertOne", + "line": 1321 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmModelProperty() *FeatureUpsertOne", + "line": 1328 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmModel(v string) *FeatureUpsertOne", + "line": 1335 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModel", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmModel() *FeatureUpsertOne", + "line": 1342 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModel", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmModel() *FeatureUpsertOne", + "line": 1349 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmTokenTypeProperty(v string) *FeatureUpsertOne", + "line": 1356 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmTokenTypeProperty() *FeatureUpsertOne", + "line": 1363 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmTokenTypeProperty() *FeatureUpsertOne", + "line": 1370 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertOne) SetUnitCostLlmTokenType(v string) *FeatureUpsertOne", + "line": 1377 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertOne) UpdateUnitCostLlmTokenType() *FeatureUpsertOne", + "line": 1384 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertOne) ClearUnitCostLlmTokenType() *FeatureUpsertOne", + "line": 1391 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (u *FeatureUpsertOne) SetArchivedAt(v time.Time) *FeatureUpsertOne", + "line": 1398 + }, + { + "kind": "func", + "name": "UpdateArchivedAt", + "signature": "func (u *FeatureUpsertOne) UpdateArchivedAt() *FeatureUpsertOne", + "line": 1405 + }, + { + "kind": "func", + "name": "ClearArchivedAt", + "signature": "func (u *FeatureUpsertOne) ClearArchivedAt() *FeatureUpsertOne", + "line": 1412 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *FeatureUpsertOne) Exec(ctx context.Context) error", + "line": 1419 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *FeatureUpsertOne) ExecX(ctx context.Context)", + "line": 1427 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *FeatureUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1434 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *FeatureUpsertOne) IDX(ctx context.Context) string", + "line": 1448 + }, + { + "kind": "struct", + "name": "FeatureCreateBulk", + "signature": "type FeatureCreateBulk struct", + "line": 1457 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *FeatureCreateBulk) Save(ctx context.Context) ([]*Feature, error)", + "line": 1465 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *FeatureCreateBulk) SaveX(ctx context.Context) []*Feature", + "line": 1521 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *FeatureCreateBulk) Exec(ctx context.Context) error", + "line": 1530 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *FeatureCreateBulk) ExecX(ctx context.Context)", + "line": 1536 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *FeatureCreateBulk) OnConflict(opts ...sql.ConflictOption) *FeatureUpsertBulk", + "line": 1557 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *FeatureCreateBulk) OnConflictColumns(columns ...string) *FeatureUpsertBulk", + "line": 1570 + }, + { + "kind": "struct", + "name": "FeatureUpsertBulk", + "signature": "type FeatureUpsertBulk struct", + "line": 1579 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *FeatureUpsertBulk) UpdateNewValues() *FeatureUpsertBulk", + "line": 1594 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *FeatureUpsertBulk) Ignore() *FeatureUpsertBulk", + "line": 1627 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *FeatureUpsertBulk) DoNothing() *FeatureUpsertBulk", + "line": 1634 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *FeatureUpsertBulk) Update(set func(*FeatureUpsert)) *FeatureUpsertBulk", + "line": 1641 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *FeatureUpsertBulk) SetUpdatedAt(v time.Time) *FeatureUpsertBulk", + "line": 1649 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *FeatureUpsertBulk) UpdateUpdatedAt() *FeatureUpsertBulk", + "line": 1656 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *FeatureUpsertBulk) SetDeletedAt(v time.Time) *FeatureUpsertBulk", + "line": 1663 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *FeatureUpsertBulk) UpdateDeletedAt() *FeatureUpsertBulk", + "line": 1670 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *FeatureUpsertBulk) ClearDeletedAt() *FeatureUpsertBulk", + "line": 1677 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *FeatureUpsertBulk) SetMetadata(v map[string]string) *FeatureUpsertBulk", + "line": 1684 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *FeatureUpsertBulk) UpdateMetadata() *FeatureUpsertBulk", + "line": 1691 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *FeatureUpsertBulk) ClearMetadata() *FeatureUpsertBulk", + "line": 1698 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *FeatureUpsertBulk) SetName(v string) *FeatureUpsertBulk", + "line": 1705 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *FeatureUpsertBulk) UpdateName() *FeatureUpsertBulk", + "line": 1712 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *FeatureUpsertBulk) SetDescription(v string) *FeatureUpsertBulk", + "line": 1719 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *FeatureUpsertBulk) UpdateDescription() *FeatureUpsertBulk", + "line": 1726 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *FeatureUpsertBulk) ClearDescription() *FeatureUpsertBulk", + "line": 1733 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) SetMeterGroupByFilters(v map[string]string) *FeatureUpsertBulk", + "line": 1740 + }, + { + "kind": "func", + "name": "UpdateMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) UpdateMeterGroupByFilters() *FeatureUpsertBulk", + "line": 1747 + }, + { + "kind": "func", + "name": "ClearMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) ClearMeterGroupByFilters() *FeatureUpsertBulk", + "line": 1754 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureUpsertBulk", + "line": 1761 + }, + { + "kind": "func", + "name": "UpdateAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) UpdateAdvancedMeterGroupByFilters() *FeatureUpsertBulk", + "line": 1768 + }, + { + "kind": "func", + "name": "ClearAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpsertBulk) ClearAdvancedMeterGroupByFilters() *FeatureUpsertBulk", + "line": 1775 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostType(v string) *FeatureUpsertBulk", + "line": 1782 + }, + { + "kind": "func", + "name": "UpdateUnitCostType", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostType() *FeatureUpsertBulk", + "line": 1789 + }, + { + "kind": "func", + "name": "ClearUnitCostType", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostType() *FeatureUpsertBulk", + "line": 1796 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureUpsertBulk", + "line": 1803 + }, + { + "kind": "func", + "name": "UpdateUnitCostManualAmount", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostManualAmount() *FeatureUpsertBulk", + "line": 1810 + }, + { + "kind": "func", + "name": "ClearUnitCostManualAmount", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostManualAmount() *FeatureUpsertBulk", + "line": 1817 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmProviderProperty(v string) *FeatureUpsertBulk", + "line": 1824 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmProviderProperty() *FeatureUpsertBulk", + "line": 1831 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmProviderProperty() *FeatureUpsertBulk", + "line": 1838 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmProvider(v string) *FeatureUpsertBulk", + "line": 1845 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmProvider() *FeatureUpsertBulk", + "line": 1852 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProvider", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmProvider() *FeatureUpsertBulk", + "line": 1859 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmModelProperty(v string) *FeatureUpsertBulk", + "line": 1866 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmModelProperty() *FeatureUpsertBulk", + "line": 1873 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmModelProperty() *FeatureUpsertBulk", + "line": 1880 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmModel(v string) *FeatureUpsertBulk", + "line": 1887 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmModel", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmModel() *FeatureUpsertBulk", + "line": 1894 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModel", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmModel() *FeatureUpsertBulk", + "line": 1901 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmTokenTypeProperty(v string) *FeatureUpsertBulk", + "line": 1908 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmTokenTypeProperty() *FeatureUpsertBulk", + "line": 1915 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmTokenTypeProperty() *FeatureUpsertBulk", + "line": 1922 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertBulk) SetUnitCostLlmTokenType(v string) *FeatureUpsertBulk", + "line": 1929 + }, + { + "kind": "func", + "name": "UpdateUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertBulk) UpdateUnitCostLlmTokenType() *FeatureUpsertBulk", + "line": 1936 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenType", + "signature": "func (u *FeatureUpsertBulk) ClearUnitCostLlmTokenType() *FeatureUpsertBulk", + "line": 1943 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (u *FeatureUpsertBulk) SetArchivedAt(v time.Time) *FeatureUpsertBulk", + "line": 1950 + }, + { + "kind": "func", + "name": "UpdateArchivedAt", + "signature": "func (u *FeatureUpsertBulk) UpdateArchivedAt() *FeatureUpsertBulk", + "line": 1957 + }, + { + "kind": "func", + "name": "ClearArchivedAt", + "signature": "func (u *FeatureUpsertBulk) ClearArchivedAt() *FeatureUpsertBulk", + "line": 1964 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *FeatureUpsertBulk) Exec(ctx context.Context) error", + "line": 1971 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *FeatureUpsertBulk) ExecX(ctx context.Context)", + "line": 1987 + } + ], + "line_count": 1991 + }, + "openmeter/ent/db/feature_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureDelete", + "signature": "type FeatureDelete struct", + "line": 17 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *FeatureDelete) Where(ps ...predicate.Feature) *FeatureDelete", + "line": 24 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *FeatureDelete) Exec(ctx context.Context) (int, error)", + "line": 30 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *FeatureDelete) ExecX(ctx context.Context) int", + "line": 35 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *FeatureDelete) sqlExec(ctx context.Context) (int, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "FeatureDeleteOne", + "signature": "type FeatureDeleteOne struct", + "line": 61 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *FeatureDeleteOne) Where(ps ...predicate.Feature) *FeatureDeleteOne", + "line": 66 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *FeatureDeleteOne) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *FeatureDeleteOne) ExecX(ctx context.Context)", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/ent/db/feature_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureQuery", + "signature": "type FeatureQuery struct", + "line": 28 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *FeatureQuery) Where(ps ...predicate.Feature) *FeatureQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *FeatureQuery) Limit(limit int) *FeatureQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *FeatureQuery) Offset(offset int) *FeatureQuery", + "line": 60 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *FeatureQuery) Unique(unique bool) *FeatureQuery", + "line": 67 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *FeatureQuery) Order(o ...dbfeature.OrderOption) *FeatureQuery", + "line": 73 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_q *FeatureQuery) QueryEntitlement() *EntitlementQuery", + "line": 79 + }, + { + "kind": "func", + "name": "QueryRatecard", + "signature": "func (_q *FeatureQuery) QueryRatecard() *PlanRateCardQuery", + "line": 101 + }, + { + "kind": "func", + "name": "QueryAddonRatecard", + "signature": "func (_q *FeatureQuery) QueryAddonRatecard() *AddonRateCardQuery", + "line": 123 + }, + { + "kind": "func", + "name": "QueryUsageBasedCharges", + "signature": "func (_q *FeatureQuery) QueryUsageBasedCharges() *ChargeUsageBasedQuery", + "line": 145 + }, + { + "kind": "func", + "name": "QueryUsageBasedRuns", + "signature": "func (_q *FeatureQuery) QueryUsageBasedRuns() *ChargeUsageBasedRunsQuery", + "line": 167 + }, + { + "kind": "func", + "name": "QueryFlatFeeCharges", + "signature": "func (_q *FeatureQuery) QueryFlatFeeCharges() *ChargeFlatFeeQuery", + "line": 189 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (_q *FeatureQuery) QueryMeter() *MeterQuery", + "line": 211 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *FeatureQuery) First(ctx context.Context) (*Feature, error)", + "line": 234 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *FeatureQuery) FirstX(ctx context.Context) *Feature", + "line": 246 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *FeatureQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *FeatureQuery) FirstIDX(ctx context.Context) string", + "line": 269 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *FeatureQuery) Only(ctx context.Context) (*Feature, error)", + "line": 280 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *FeatureQuery) OnlyX(ctx context.Context) *Feature", + "line": 296 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *FeatureQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 307 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *FeatureQuery) OnlyIDX(ctx context.Context) string", + "line": 324 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *FeatureQuery) All(ctx context.Context) ([]*Feature, error)", + "line": 333 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *FeatureQuery) AllX(ctx context.Context) []*Feature", + "line": 343 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *FeatureQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 352 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *FeatureQuery) IDsX(ctx context.Context) []string", + "line": 364 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *FeatureQuery) Count(ctx context.Context) (int, error)", + "line": 373 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *FeatureQuery) CountX(ctx context.Context) int", + "line": 382 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *FeatureQuery) Exist(ctx context.Context) (bool, error)", + "line": 391 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *FeatureQuery) ExistX(ctx context.Context) bool", + "line": 404 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *FeatureQuery) Clone() *FeatureQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithEntitlement", + "signature": "func (_q *FeatureQuery) WithEntitlement(opts ...func(*EntitlementQuery)) *FeatureQuery", + "line": 439 + }, + { + "kind": "func", + "name": "WithRatecard", + "signature": "func (_q *FeatureQuery) WithRatecard(opts ...func(*PlanRateCardQuery)) *FeatureQuery", + "line": 450 + }, + { + "kind": "func", + "name": "WithAddonRatecard", + "signature": "func (_q *FeatureQuery) WithAddonRatecard(opts ...func(*AddonRateCardQuery)) *FeatureQuery", + "line": 461 + }, + { + "kind": "func", + "name": "WithUsageBasedCharges", + "signature": "func (_q *FeatureQuery) WithUsageBasedCharges(opts ...func(*ChargeUsageBasedQuery)) *FeatureQuery", + "line": 472 + }, + { + "kind": "func", + "name": "WithUsageBasedRuns", + "signature": "func (_q *FeatureQuery) WithUsageBasedRuns(opts ...func(*ChargeUsageBasedRunsQuery)) *FeatureQuery", + "line": 483 + }, + { + "kind": "func", + "name": "WithFlatFeeCharges", + "signature": "func (_q *FeatureQuery) WithFlatFeeCharges(opts ...func(*ChargeFlatFeeQuery)) *FeatureQuery", + "line": 494 + }, + { + "kind": "func", + "name": "WithMeter", + "signature": "func (_q *FeatureQuery) WithMeter(opts ...func(*MeterQuery)) *FeatureQuery", + "line": 505 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *FeatureQuery) GroupBy(field string, fields ...string) *FeatureGroupBy", + "line": 528 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *FeatureQuery) Select(fields ...string) *FeatureSelect", + "line": 549 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *FeatureQuery) Aggregate(fns ...AggregateFunc) *FeatureSelect", + "line": 558 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *FeatureQuery) prepareQuery(ctx context.Context) error", + "line": 562 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *FeatureQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Feature, error)", + "line": 588 + }, + { + "kind": "func", + "name": "loadEntitlement", + "signature": "func (_q *FeatureQuery) loadEntitlement(ctx context.Context, query *EntitlementQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *Entitlement)) error", + "line": 676 + }, + { + "kind": "func", + "name": "loadRatecard", + "signature": "func (_q *FeatureQuery) loadRatecard(ctx context.Context, query *PlanRateCardQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *PlanRateCard)) error", + "line": 706 + }, + { + "kind": "func", + "name": "loadAddonRatecard", + "signature": "func (_q *FeatureQuery) loadAddonRatecard(ctx context.Context, query *AddonRateCardQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *AddonRateCard)) error", + "line": 739 + }, + { + "kind": "func", + "name": "loadUsageBasedCharges", + "signature": "func (_q *FeatureQuery) loadUsageBasedCharges(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *ChargeUsageBased)) error", + "line": 772 + }, + { + "kind": "func", + "name": "loadUsageBasedRuns", + "signature": "func (_q *FeatureQuery) loadUsageBasedRuns(ctx context.Context, query *ChargeUsageBasedRunsQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *ChargeUsageBasedRuns)) error", + "line": 802 + }, + { + "kind": "func", + "name": "loadFlatFeeCharges", + "signature": "func (_q *FeatureQuery) loadFlatFeeCharges(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *ChargeFlatFee)) error", + "line": 832 + }, + { + "kind": "func", + "name": "loadMeter", + "signature": "func (_q *FeatureQuery) loadMeter(ctx context.Context, query *MeterQuery, nodes []*Feature, init func(*Feature), assign func(*Feature, *Meter)) error", + "line": 865 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *FeatureQuery) sqlCount(ctx context.Context) (int, error)", + "line": 898 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *FeatureQuery) querySpec() *sqlgraph.QuerySpec", + "line": 910 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *FeatureQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 953 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *FeatureQuery) ForUpdate(opts ...sql.LockOption) *FeatureQuery", + "line": 991 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *FeatureQuery) ForShare(opts ...sql.LockOption) *FeatureQuery", + "line": 1004 + }, + { + "kind": "struct", + "name": "FeatureGroupBy", + "signature": "type FeatureGroupBy struct", + "line": 1015 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *FeatureGroupBy) Aggregate(fns ...AggregateFunc) *FeatureGroupBy", + "line": 1021 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *FeatureGroupBy) Scan(ctx context.Context, v any) error", + "line": 1027 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *FeatureGroupBy) sqlScan(ctx context.Context, root *FeatureQuery, v any) error", + "line": 1035 + }, + { + "kind": "struct", + "name": "FeatureSelect", + "signature": "type FeatureSelect struct", + "line": 1063 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *FeatureSelect) Aggregate(fns ...AggregateFunc) *FeatureSelect", + "line": 1069 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *FeatureSelect) Scan(ctx context.Context, v any) error", + "line": 1075 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *FeatureSelect) sqlScan(ctx context.Context, root *FeatureQuery, v any) error", + "line": 1083 + } + ], + "line_count": 1102 + }, + "openmeter/ent/db/feature_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureUpdate", + "signature": "type FeatureUpdate struct", + "line": 27 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *FeatureUpdate) Where(ps ...predicate.Feature) *FeatureUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *FeatureUpdate) SetUpdatedAt(v time.Time) *FeatureUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *FeatureUpdate) SetDeletedAt(v time.Time) *FeatureUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *FeatureUpdate) SetNillableDeletedAt(v *time.Time) *FeatureUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *FeatureUpdate) ClearDeletedAt() *FeatureUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *FeatureUpdate) SetMetadata(v map[string]string) *FeatureUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *FeatureUpdate) ClearMetadata() *FeatureUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *FeatureUpdate) SetName(v string) *FeatureUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *FeatureUpdate) SetNillableName(v *string) *FeatureUpdate", + "line": 84 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *FeatureUpdate) SetDescription(v string) *FeatureUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *FeatureUpdate) SetNillableDescription(v *string) *FeatureUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *FeatureUpdate) ClearDescription() *FeatureUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (_u *FeatureUpdate) SetMeterGroupByFilters(v map[string]string) *FeatureUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "ClearMeterGroupByFilters", + "signature": "func (_u *FeatureUpdate) ClearMeterGroupByFilters() *FeatureUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (_u *FeatureUpdate) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "ClearAdvancedMeterGroupByFilters", + "signature": "func (_u *FeatureUpdate) ClearAdvancedMeterGroupByFilters() *FeatureUpdate", + "line": 130 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (_u *FeatureUpdate) SetUnitCostType(v string) *FeatureUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetNillableUnitCostType", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostType(v *string) *FeatureUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "ClearUnitCostType", + "signature": "func (_u *FeatureUpdate) ClearUnitCostType() *FeatureUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (_u *FeatureUpdate) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "SetNillableUnitCostManualAmount", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostManualAmount(v *alpacadecimal.Decimal) *FeatureUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "ClearUnitCostManualAmount", + "signature": "func (_u *FeatureUpdate) ClearUnitCostManualAmount() *FeatureUpdate", + "line": 170 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmProviderProperty(v string) *FeatureUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmProviderProperty(v *string) *FeatureUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmProviderProperty() *FeatureUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmProvider(v string) *FeatureUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmProvider(v *string) *FeatureUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmProvider() *FeatureUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmModelProperty(v string) *FeatureUpdate", + "line": 216 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmModelProperty(v *string) *FeatureUpdate", + "line": 222 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmModelProperty() *FeatureUpdate", + "line": 230 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmModel(v string) *FeatureUpdate", + "line": 236 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModel", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmModel(v *string) *FeatureUpdate", + "line": 242 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModel", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmModel() *FeatureUpdate", + "line": 250 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmTokenTypeProperty(v string) *FeatureUpdate", + "line": 256 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmTokenTypeProperty(v *string) *FeatureUpdate", + "line": 262 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmTokenTypeProperty() *FeatureUpdate", + "line": 270 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdate) SetUnitCostLlmTokenType(v string) *FeatureUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdate) SetNillableUnitCostLlmTokenType(v *string) *FeatureUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdate) ClearUnitCostLlmTokenType() *FeatureUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (_u *FeatureUpdate) SetArchivedAt(v time.Time) *FeatureUpdate", + "line": 296 + }, + { + "kind": "func", + "name": "SetNillableArchivedAt", + "signature": "func (_u *FeatureUpdate) SetNillableArchivedAt(v *time.Time) *FeatureUpdate", + "line": 302 + }, + { + "kind": "func", + "name": "ClearArchivedAt", + "signature": "func (_u *FeatureUpdate) ClearArchivedAt() *FeatureUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_u *FeatureUpdate) AddEntitlementIDs(ids ...string) *FeatureUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "AddEntitlement", + "signature": "func (_u *FeatureUpdate) AddEntitlement(v ...*Entitlement) *FeatureUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *FeatureUpdate) AddRatecardIDs(ids ...string) *FeatureUpdate", + "line": 331 + }, + { + "kind": "func", + "name": "AddRatecard", + "signature": "func (_u *FeatureUpdate) AddRatecard(v ...*PlanRateCard) *FeatureUpdate", + "line": 337 + }, + { + "kind": "func", + "name": "AddAddonRatecardIDs", + "signature": "func (_u *FeatureUpdate) AddAddonRatecardIDs(ids ...string) *FeatureUpdate", + "line": 346 + }, + { + "kind": "func", + "name": "AddAddonRatecard", + "signature": "func (_u *FeatureUpdate) AddAddonRatecard(v ...*AddonRateCard) *FeatureUpdate", + "line": 352 + }, + { + "kind": "func", + "name": "AddUsageBasedChargeIDs", + "signature": "func (_u *FeatureUpdate) AddUsageBasedChargeIDs(ids ...string) *FeatureUpdate", + "line": 361 + }, + { + "kind": "func", + "name": "AddUsageBasedCharges", + "signature": "func (_u *FeatureUpdate) AddUsageBasedCharges(v ...*ChargeUsageBased) *FeatureUpdate", + "line": 367 + }, + { + "kind": "func", + "name": "AddUsageBasedRunIDs", + "signature": "func (_u *FeatureUpdate) AddUsageBasedRunIDs(ids ...string) *FeatureUpdate", + "line": 376 + }, + { + "kind": "func", + "name": "AddUsageBasedRuns", + "signature": "func (_u *FeatureUpdate) AddUsageBasedRuns(v ...*ChargeUsageBasedRuns) *FeatureUpdate", + "line": 382 + }, + { + "kind": "func", + "name": "AddFlatFeeChargeIDs", + "signature": "func (_u *FeatureUpdate) AddFlatFeeChargeIDs(ids ...string) *FeatureUpdate", + "line": 391 + }, + { + "kind": "func", + "name": "AddFlatFeeCharges", + "signature": "func (_u *FeatureUpdate) AddFlatFeeCharges(v ...*ChargeFlatFee) *FeatureUpdate", + "line": 397 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *FeatureUpdate) Mutation() *FeatureMutation", + "line": 406 + }, + { + "kind": "func", + "name": "ClearEntitlement", + "signature": "func (_u *FeatureUpdate) ClearEntitlement() *FeatureUpdate", + "line": 411 + }, + { + "kind": "func", + "name": "RemoveEntitlementIDs", + "signature": "func (_u *FeatureUpdate) RemoveEntitlementIDs(ids ...string) *FeatureUpdate", + "line": 417 + }, + { + "kind": "func", + "name": "RemoveEntitlement", + "signature": "func (_u *FeatureUpdate) RemoveEntitlement(v ...*Entitlement) *FeatureUpdate", + "line": 423 + }, + { + "kind": "func", + "name": "ClearRatecard", + "signature": "func (_u *FeatureUpdate) ClearRatecard() *FeatureUpdate", + "line": 432 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *FeatureUpdate) RemoveRatecardIDs(ids ...string) *FeatureUpdate", + "line": 438 + }, + { + "kind": "func", + "name": "RemoveRatecard", + "signature": "func (_u *FeatureUpdate) RemoveRatecard(v ...*PlanRateCard) *FeatureUpdate", + "line": 444 + }, + { + "kind": "func", + "name": "ClearAddonRatecard", + "signature": "func (_u *FeatureUpdate) ClearAddonRatecard() *FeatureUpdate", + "line": 453 + }, + { + "kind": "func", + "name": "RemoveAddonRatecardIDs", + "signature": "func (_u *FeatureUpdate) RemoveAddonRatecardIDs(ids ...string) *FeatureUpdate", + "line": 459 + }, + { + "kind": "func", + "name": "RemoveAddonRatecard", + "signature": "func (_u *FeatureUpdate) RemoveAddonRatecard(v ...*AddonRateCard) *FeatureUpdate", + "line": 465 + }, + { + "kind": "func", + "name": "ClearUsageBasedCharges", + "signature": "func (_u *FeatureUpdate) ClearUsageBasedCharges() *FeatureUpdate", + "line": 474 + }, + { + "kind": "func", + "name": "RemoveUsageBasedChargeIDs", + "signature": "func (_u *FeatureUpdate) RemoveUsageBasedChargeIDs(ids ...string) *FeatureUpdate", + "line": 480 + }, + { + "kind": "func", + "name": "RemoveUsageBasedCharges", + "signature": "func (_u *FeatureUpdate) RemoveUsageBasedCharges(v ...*ChargeUsageBased) *FeatureUpdate", + "line": 486 + }, + { + "kind": "func", + "name": "ClearUsageBasedRuns", + "signature": "func (_u *FeatureUpdate) ClearUsageBasedRuns() *FeatureUpdate", + "line": 495 + }, + { + "kind": "func", + "name": "RemoveUsageBasedRunIDs", + "signature": "func (_u *FeatureUpdate) RemoveUsageBasedRunIDs(ids ...string) *FeatureUpdate", + "line": 501 + }, + { + "kind": "func", + "name": "RemoveUsageBasedRuns", + "signature": "func (_u *FeatureUpdate) RemoveUsageBasedRuns(v ...*ChargeUsageBasedRuns) *FeatureUpdate", + "line": 507 + }, + { + "kind": "func", + "name": "ClearFlatFeeCharges", + "signature": "func (_u *FeatureUpdate) ClearFlatFeeCharges() *FeatureUpdate", + "line": 516 + }, + { + "kind": "func", + "name": "RemoveFlatFeeChargeIDs", + "signature": "func (_u *FeatureUpdate) RemoveFlatFeeChargeIDs(ids ...string) *FeatureUpdate", + "line": 522 + }, + { + "kind": "func", + "name": "RemoveFlatFeeCharges", + "signature": "func (_u *FeatureUpdate) RemoveFlatFeeCharges(v ...*ChargeFlatFee) *FeatureUpdate", + "line": 528 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *FeatureUpdate) Save(ctx context.Context) (int, error)", + "line": 537 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *FeatureUpdate) SaveX(ctx context.Context) int", + "line": 543 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *FeatureUpdate) Exec(ctx context.Context) error", + "line": 552 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *FeatureUpdate) ExecX(ctx context.Context)", + "line": 558 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *FeatureUpdate) defaults()", + "line": 565 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *FeatureUpdate) check() error", + "line": 573 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *FeatureUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 587 + }, + { + "kind": "struct", + "name": "FeatureUpdateOne", + "signature": "type FeatureUpdateOne struct", + "line": 975 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *FeatureUpdateOne) SetUpdatedAt(v time.Time) *FeatureUpdateOne", + "line": 983 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *FeatureUpdateOne) SetDeletedAt(v time.Time) *FeatureUpdateOne", + "line": 989 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *FeatureUpdateOne) SetNillableDeletedAt(v *time.Time) *FeatureUpdateOne", + "line": 995 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *FeatureUpdateOne) ClearDeletedAt() *FeatureUpdateOne", + "line": 1003 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *FeatureUpdateOne) SetMetadata(v map[string]string) *FeatureUpdateOne", + "line": 1009 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *FeatureUpdateOne) ClearMetadata() *FeatureUpdateOne", + "line": 1015 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *FeatureUpdateOne) SetName(v string) *FeatureUpdateOne", + "line": 1021 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *FeatureUpdateOne) SetNillableName(v *string) *FeatureUpdateOne", + "line": 1027 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *FeatureUpdateOne) SetDescription(v string) *FeatureUpdateOne", + "line": 1035 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *FeatureUpdateOne) SetNillableDescription(v *string) *FeatureUpdateOne", + "line": 1041 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *FeatureUpdateOne) ClearDescription() *FeatureUpdateOne", + "line": 1049 + }, + { + "kind": "func", + "name": "SetMeterGroupByFilters", + "signature": "func (_u *FeatureUpdateOne) SetMeterGroupByFilters(v map[string]string) *FeatureUpdateOne", + "line": 1055 + }, + { + "kind": "func", + "name": "ClearMeterGroupByFilters", + "signature": "func (_u *FeatureUpdateOne) ClearMeterGroupByFilters() *FeatureUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "SetAdvancedMeterGroupByFilters", + "signature": "func (_u *FeatureUpdateOne) SetAdvancedMeterGroupByFilters(v feature.MeterGroupByFilters) *FeatureUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "ClearAdvancedMeterGroupByFilters", + "signature": "func (_u *FeatureUpdateOne) ClearAdvancedMeterGroupByFilters() *FeatureUpdateOne", + "line": 1073 + }, + { + "kind": "func", + "name": "SetUnitCostType", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostType(v string) *FeatureUpdateOne", + "line": 1079 + }, + { + "kind": "func", + "name": "SetNillableUnitCostType", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostType(v *string) *FeatureUpdateOne", + "line": 1085 + }, + { + "kind": "func", + "name": "ClearUnitCostType", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostType() *FeatureUpdateOne", + "line": 1093 + }, + { + "kind": "func", + "name": "SetUnitCostManualAmount", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostManualAmount(v alpacadecimal.Decimal) *FeatureUpdateOne", + "line": 1099 + }, + { + "kind": "func", + "name": "SetNillableUnitCostManualAmount", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostManualAmount(v *alpacadecimal.Decimal) *FeatureUpdateOne", + "line": 1105 + }, + { + "kind": "func", + "name": "ClearUnitCostManualAmount", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostManualAmount() *FeatureUpdateOne", + "line": 1113 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmProviderProperty(v string) *FeatureUpdateOne", + "line": 1119 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmProviderProperty(v *string) *FeatureUpdateOne", + "line": 1125 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProviderProperty", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmProviderProperty() *FeatureUpdateOne", + "line": 1133 + }, + { + "kind": "func", + "name": "SetUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmProvider(v string) *FeatureUpdateOne", + "line": 1139 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmProvider(v *string) *FeatureUpdateOne", + "line": 1145 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmProvider", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmProvider() *FeatureUpdateOne", + "line": 1153 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmModelProperty(v string) *FeatureUpdateOne", + "line": 1159 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmModelProperty(v *string) *FeatureUpdateOne", + "line": 1165 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModelProperty", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmModelProperty() *FeatureUpdateOne", + "line": 1173 + }, + { + "kind": "func", + "name": "SetUnitCostLlmModel", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmModel(v string) *FeatureUpdateOne", + "line": 1179 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmModel", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmModel(v *string) *FeatureUpdateOne", + "line": 1185 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmModel", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmModel() *FeatureUpdateOne", + "line": 1193 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmTokenTypeProperty(v string) *FeatureUpdateOne", + "line": 1199 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmTokenTypeProperty(v *string) *FeatureUpdateOne", + "line": 1205 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenTypeProperty", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmTokenTypeProperty() *FeatureUpdateOne", + "line": 1213 + }, + { + "kind": "func", + "name": "SetUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdateOne) SetUnitCostLlmTokenType(v string) *FeatureUpdateOne", + "line": 1219 + }, + { + "kind": "func", + "name": "SetNillableUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdateOne) SetNillableUnitCostLlmTokenType(v *string) *FeatureUpdateOne", + "line": 1225 + }, + { + "kind": "func", + "name": "ClearUnitCostLlmTokenType", + "signature": "func (_u *FeatureUpdateOne) ClearUnitCostLlmTokenType() *FeatureUpdateOne", + "line": 1233 + }, + { + "kind": "func", + "name": "SetArchivedAt", + "signature": "func (_u *FeatureUpdateOne) SetArchivedAt(v time.Time) *FeatureUpdateOne", + "line": 1239 + }, + { + "kind": "func", + "name": "SetNillableArchivedAt", + "signature": "func (_u *FeatureUpdateOne) SetNillableArchivedAt(v *time.Time) *FeatureUpdateOne", + "line": 1245 + }, + { + "kind": "func", + "name": "ClearArchivedAt", + "signature": "func (_u *FeatureUpdateOne) ClearArchivedAt() *FeatureUpdateOne", + "line": 1253 + }, + { + "kind": "func", + "name": "AddEntitlementIDs", + "signature": "func (_u *FeatureUpdateOne) AddEntitlementIDs(ids ...string) *FeatureUpdateOne", + "line": 1259 + }, + { + "kind": "func", + "name": "AddEntitlement", + "signature": "func (_u *FeatureUpdateOne) AddEntitlement(v ...*Entitlement) *FeatureUpdateOne", + "line": 1265 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *FeatureUpdateOne) AddRatecardIDs(ids ...string) *FeatureUpdateOne", + "line": 1274 + }, + { + "kind": "func", + "name": "AddRatecard", + "signature": "func (_u *FeatureUpdateOne) AddRatecard(v ...*PlanRateCard) *FeatureUpdateOne", + "line": 1280 + }, + { + "kind": "func", + "name": "AddAddonRatecardIDs", + "signature": "func (_u *FeatureUpdateOne) AddAddonRatecardIDs(ids ...string) *FeatureUpdateOne", + "line": 1289 + }, + { + "kind": "func", + "name": "AddAddonRatecard", + "signature": "func (_u *FeatureUpdateOne) AddAddonRatecard(v ...*AddonRateCard) *FeatureUpdateOne", + "line": 1295 + }, + { + "kind": "func", + "name": "AddUsageBasedChargeIDs", + "signature": "func (_u *FeatureUpdateOne) AddUsageBasedChargeIDs(ids ...string) *FeatureUpdateOne", + "line": 1304 + }, + { + "kind": "func", + "name": "AddUsageBasedCharges", + "signature": "func (_u *FeatureUpdateOne) AddUsageBasedCharges(v ...*ChargeUsageBased) *FeatureUpdateOne", + "line": 1310 + }, + { + "kind": "func", + "name": "AddUsageBasedRunIDs", + "signature": "func (_u *FeatureUpdateOne) AddUsageBasedRunIDs(ids ...string) *FeatureUpdateOne", + "line": 1319 + }, + { + "kind": "func", + "name": "AddUsageBasedRuns", + "signature": "func (_u *FeatureUpdateOne) AddUsageBasedRuns(v ...*ChargeUsageBasedRuns) *FeatureUpdateOne", + "line": 1325 + }, + { + "kind": "func", + "name": "AddFlatFeeChargeIDs", + "signature": "func (_u *FeatureUpdateOne) AddFlatFeeChargeIDs(ids ...string) *FeatureUpdateOne", + "line": 1334 + }, + { + "kind": "func", + "name": "AddFlatFeeCharges", + "signature": "func (_u *FeatureUpdateOne) AddFlatFeeCharges(v ...*ChargeFlatFee) *FeatureUpdateOne", + "line": 1340 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *FeatureUpdateOne) Mutation() *FeatureMutation", + "line": 1349 + }, + { + "kind": "func", + "name": "ClearEntitlement", + "signature": "func (_u *FeatureUpdateOne) ClearEntitlement() *FeatureUpdateOne", + "line": 1354 + }, + { + "kind": "func", + "name": "RemoveEntitlementIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveEntitlementIDs(ids ...string) *FeatureUpdateOne", + "line": 1360 + }, + { + "kind": "func", + "name": "RemoveEntitlement", + "signature": "func (_u *FeatureUpdateOne) RemoveEntitlement(v ...*Entitlement) *FeatureUpdateOne", + "line": 1366 + }, + { + "kind": "func", + "name": "ClearRatecard", + "signature": "func (_u *FeatureUpdateOne) ClearRatecard() *FeatureUpdateOne", + "line": 1375 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveRatecardIDs(ids ...string) *FeatureUpdateOne", + "line": 1381 + }, + { + "kind": "func", + "name": "RemoveRatecard", + "signature": "func (_u *FeatureUpdateOne) RemoveRatecard(v ...*PlanRateCard) *FeatureUpdateOne", + "line": 1387 + }, + { + "kind": "func", + "name": "ClearAddonRatecard", + "signature": "func (_u *FeatureUpdateOne) ClearAddonRatecard() *FeatureUpdateOne", + "line": 1396 + }, + { + "kind": "func", + "name": "RemoveAddonRatecardIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveAddonRatecardIDs(ids ...string) *FeatureUpdateOne", + "line": 1402 + }, + { + "kind": "func", + "name": "RemoveAddonRatecard", + "signature": "func (_u *FeatureUpdateOne) RemoveAddonRatecard(v ...*AddonRateCard) *FeatureUpdateOne", + "line": 1408 + }, + { + "kind": "func", + "name": "ClearUsageBasedCharges", + "signature": "func (_u *FeatureUpdateOne) ClearUsageBasedCharges() *FeatureUpdateOne", + "line": 1417 + }, + { + "kind": "func", + "name": "RemoveUsageBasedChargeIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveUsageBasedChargeIDs(ids ...string) *FeatureUpdateOne", + "line": 1423 + }, + { + "kind": "func", + "name": "RemoveUsageBasedCharges", + "signature": "func (_u *FeatureUpdateOne) RemoveUsageBasedCharges(v ...*ChargeUsageBased) *FeatureUpdateOne", + "line": 1429 + }, + { + "kind": "func", + "name": "ClearUsageBasedRuns", + "signature": "func (_u *FeatureUpdateOne) ClearUsageBasedRuns() *FeatureUpdateOne", + "line": 1438 + }, + { + "kind": "func", + "name": "RemoveUsageBasedRunIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveUsageBasedRunIDs(ids ...string) *FeatureUpdateOne", + "line": 1444 + }, + { + "kind": "func", + "name": "RemoveUsageBasedRuns", + "signature": "func (_u *FeatureUpdateOne) RemoveUsageBasedRuns(v ...*ChargeUsageBasedRuns) *FeatureUpdateOne", + "line": 1450 + }, + { + "kind": "func", + "name": "ClearFlatFeeCharges", + "signature": "func (_u *FeatureUpdateOne) ClearFlatFeeCharges() *FeatureUpdateOne", + "line": 1459 + }, + { + "kind": "func", + "name": "RemoveFlatFeeChargeIDs", + "signature": "func (_u *FeatureUpdateOne) RemoveFlatFeeChargeIDs(ids ...string) *FeatureUpdateOne", + "line": 1465 + }, + { + "kind": "func", + "name": "RemoveFlatFeeCharges", + "signature": "func (_u *FeatureUpdateOne) RemoveFlatFeeCharges(v ...*ChargeFlatFee) *FeatureUpdateOne", + "line": 1471 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *FeatureUpdateOne) Where(ps ...predicate.Feature) *FeatureUpdateOne", + "line": 1480 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *FeatureUpdateOne) Select(field string, fields ...string) *FeatureUpdateOne", + "line": 1487 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *FeatureUpdateOne) Save(ctx context.Context) (*Feature, error)", + "line": 1493 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *FeatureUpdateOne) SaveX(ctx context.Context) *Feature", + "line": 1499 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *FeatureUpdateOne) Exec(ctx context.Context) error", + "line": 1508 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *FeatureUpdateOne) ExecX(ctx context.Context)", + "line": 1514 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *FeatureUpdateOne) defaults()", + "line": 1521 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *FeatureUpdateOne) check() error", + "line": 1529 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *FeatureUpdateOne) sqlSave(ctx context.Context) (_node *Feature, err error)", + "line": 1543 + } + ], + "line_count": 1948 + }, + "openmeter/ent/db/grant.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Grant", + "signature": "type Grant struct", + "line": 21 + }, + { + "kind": "struct", + "name": "GrantEdges", + "signature": "type GrantEdges struct", + "line": 66 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func (e GrantEdges) EntitlementOrErr() (*Entitlement, error)", + "line": 76 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Grant) assignValues(columns []string, values []any) error", + "line": 109 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Grant) Value(name string) (ent.Value, error)", + "line": 243 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_m *Grant) QueryEntitlement() *EntitlementQuery", + "line": 248 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Grant) Update() *GrantUpdateOne", + "line": 255 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Grant) Unwrap() *Grant", + "line": 261 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Grant) String() string", + "line": 271 + } + ], + "line_count": 340 + }, + "openmeter/ent/db/grant/grant.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 87 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByOwnerID", + "signature": "func ByOwnerID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByPriority", + "signature": "func ByPriority(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByEffectiveAt", + "signature": "func ByEffectiveAt(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByExpiresAt", + "signature": "func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByVoidedAt", + "signature": "func ByVoidedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByResetMaxRollover", + "signature": "func ByResetMaxRollover(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByResetMinRollover", + "signature": "func ByResetMinRollover(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByRecurrencePeriod", + "signature": "func ByRecurrencePeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByRecurrenceAnchor", + "signature": "func ByRecurrenceAnchor(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByEntitlementField", + "signature": "func ByEntitlementField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "newEntitlementStep", + "signature": "func newEntitlementStep() *sqlgraph.Step", + "line": 195 + } + ], + "line_count": 201 + }, + "openmeter/ent/db/grant/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Grant", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Grant", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Grant", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Grant", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Grant", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Grant", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Grant", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Grant", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Grant", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Grant", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Grant", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Grant", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Grant", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Grant", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Grant", + "line": 85 + }, + { + "kind": "func", + "name": "OwnerID", + "signature": "func OwnerID(v string) predicate.Grant", + "line": 90 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v float64) predicate.Grant", + "line": 95 + }, + { + "kind": "func", + "name": "Priority", + "signature": "func Priority(v uint8) predicate.Grant", + "line": 100 + }, + { + "kind": "func", + "name": "EffectiveAt", + "signature": "func EffectiveAt(v time.Time) predicate.Grant", + "line": 105 + }, + { + "kind": "func", + "name": "ExpiresAt", + "signature": "func ExpiresAt(v time.Time) predicate.Grant", + "line": 110 + }, + { + "kind": "func", + "name": "VoidedAt", + "signature": "func VoidedAt(v time.Time) predicate.Grant", + "line": 115 + }, + { + "kind": "func", + "name": "ResetMaxRollover", + "signature": "func ResetMaxRollover(v float64) predicate.Grant", + "line": 120 + }, + { + "kind": "func", + "name": "ResetMinRollover", + "signature": "func ResetMinRollover(v float64) predicate.Grant", + "line": 125 + }, + { + "kind": "func", + "name": "RecurrencePeriod", + "signature": "func RecurrencePeriod(v datetime.ISODurationString) predicate.Grant", + "line": 130 + }, + { + "kind": "func", + "name": "RecurrenceAnchor", + "signature": "func RecurrenceAnchor(v time.Time) predicate.Grant", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Grant", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Grant", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Grant", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Grant", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Grant", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Grant", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Grant", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Grant", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Grant", + "line": 181 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Grant", + "line": 186 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Grant", + "line": 191 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Grant", + "line": 196 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Grant", + "line": 201 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Grant", + "line": 206 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Grant", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Grant", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Grant", + "line": 221 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Grant", + "line": 226 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Grant", + "line": 231 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Grant", + "line": 236 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Grant", + "line": 241 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Grant", + "line": 246 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Grant", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Grant", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Grant", + "line": 261 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Grant", + "line": 266 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Grant", + "line": 271 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Grant", + "line": 276 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Grant", + "line": 281 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Grant", + "line": 286 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Grant", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Grant", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Grant", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Grant", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Grant", + "line": 311 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Grant", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Grant", + "line": 321 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Grant", + "line": 326 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Grant", + "line": 331 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Grant", + "line": 336 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Grant", + "line": 341 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Grant", + "line": 346 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Grant", + "line": 351 + }, + { + "kind": "func", + "name": "OwnerIDEQ", + "signature": "func OwnerIDEQ(v string) predicate.Grant", + "line": 356 + }, + { + "kind": "func", + "name": "OwnerIDNEQ", + "signature": "func OwnerIDNEQ(v string) predicate.Grant", + "line": 361 + }, + { + "kind": "func", + "name": "OwnerIDIn", + "signature": "func OwnerIDIn(vs ...string) predicate.Grant", + "line": 366 + }, + { + "kind": "func", + "name": "OwnerIDNotIn", + "signature": "func OwnerIDNotIn(vs ...string) predicate.Grant", + "line": 371 + }, + { + "kind": "func", + "name": "OwnerIDGT", + "signature": "func OwnerIDGT(v string) predicate.Grant", + "line": 376 + }, + { + "kind": "func", + "name": "OwnerIDGTE", + "signature": "func OwnerIDGTE(v string) predicate.Grant", + "line": 381 + }, + { + "kind": "func", + "name": "OwnerIDLT", + "signature": "func OwnerIDLT(v string) predicate.Grant", + "line": 386 + }, + { + "kind": "func", + "name": "OwnerIDLTE", + "signature": "func OwnerIDLTE(v string) predicate.Grant", + "line": 391 + }, + { + "kind": "func", + "name": "OwnerIDContains", + "signature": "func OwnerIDContains(v string) predicate.Grant", + "line": 396 + }, + { + "kind": "func", + "name": "OwnerIDHasPrefix", + "signature": "func OwnerIDHasPrefix(v string) predicate.Grant", + "line": 401 + }, + { + "kind": "func", + "name": "OwnerIDHasSuffix", + "signature": "func OwnerIDHasSuffix(v string) predicate.Grant", + "line": 406 + }, + { + "kind": "func", + "name": "OwnerIDEqualFold", + "signature": "func OwnerIDEqualFold(v string) predicate.Grant", + "line": 411 + }, + { + "kind": "func", + "name": "OwnerIDContainsFold", + "signature": "func OwnerIDContainsFold(v string) predicate.Grant", + "line": 416 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v float64) predicate.Grant", + "line": 421 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v float64) predicate.Grant", + "line": 426 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...float64) predicate.Grant", + "line": 431 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...float64) predicate.Grant", + "line": 436 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v float64) predicate.Grant", + "line": 441 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v float64) predicate.Grant", + "line": 446 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v float64) predicate.Grant", + "line": 451 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v float64) predicate.Grant", + "line": 456 + }, + { + "kind": "func", + "name": "PriorityEQ", + "signature": "func PriorityEQ(v uint8) predicate.Grant", + "line": 461 + }, + { + "kind": "func", + "name": "PriorityNEQ", + "signature": "func PriorityNEQ(v uint8) predicate.Grant", + "line": 466 + }, + { + "kind": "func", + "name": "PriorityIn", + "signature": "func PriorityIn(vs ...uint8) predicate.Grant", + "line": 471 + }, + { + "kind": "func", + "name": "PriorityNotIn", + "signature": "func PriorityNotIn(vs ...uint8) predicate.Grant", + "line": 476 + }, + { + "kind": "func", + "name": "PriorityGT", + "signature": "func PriorityGT(v uint8) predicate.Grant", + "line": 481 + }, + { + "kind": "func", + "name": "PriorityGTE", + "signature": "func PriorityGTE(v uint8) predicate.Grant", + "line": 486 + }, + { + "kind": "func", + "name": "PriorityLT", + "signature": "func PriorityLT(v uint8) predicate.Grant", + "line": 491 + }, + { + "kind": "func", + "name": "PriorityLTE", + "signature": "func PriorityLTE(v uint8) predicate.Grant", + "line": 496 + }, + { + "kind": "func", + "name": "EffectiveAtEQ", + "signature": "func EffectiveAtEQ(v time.Time) predicate.Grant", + "line": 501 + }, + { + "kind": "func", + "name": "EffectiveAtNEQ", + "signature": "func EffectiveAtNEQ(v time.Time) predicate.Grant", + "line": 506 + }, + { + "kind": "func", + "name": "EffectiveAtIn", + "signature": "func EffectiveAtIn(vs ...time.Time) predicate.Grant", + "line": 511 + }, + { + "kind": "func", + "name": "EffectiveAtNotIn", + "signature": "func EffectiveAtNotIn(vs ...time.Time) predicate.Grant", + "line": 516 + }, + { + "kind": "func", + "name": "EffectiveAtGT", + "signature": "func EffectiveAtGT(v time.Time) predicate.Grant", + "line": 521 + }, + { + "kind": "func", + "name": "EffectiveAtGTE", + "signature": "func EffectiveAtGTE(v time.Time) predicate.Grant", + "line": 526 + }, + { + "kind": "func", + "name": "EffectiveAtLT", + "signature": "func EffectiveAtLT(v time.Time) predicate.Grant", + "line": 531 + }, + { + "kind": "func", + "name": "EffectiveAtLTE", + "signature": "func EffectiveAtLTE(v time.Time) predicate.Grant", + "line": 536 + }, + { + "kind": "func", + "name": "ExpirationIsNil", + "signature": "func ExpirationIsNil() predicate.Grant", + "line": 541 + }, + { + "kind": "func", + "name": "ExpirationNotNil", + "signature": "func ExpirationNotNil() predicate.Grant", + "line": 546 + }, + { + "kind": "func", + "name": "ExpiresAtEQ", + "signature": "func ExpiresAtEQ(v time.Time) predicate.Grant", + "line": 551 + }, + { + "kind": "func", + "name": "ExpiresAtNEQ", + "signature": "func ExpiresAtNEQ(v time.Time) predicate.Grant", + "line": 556 + }, + { + "kind": "func", + "name": "ExpiresAtIn", + "signature": "func ExpiresAtIn(vs ...time.Time) predicate.Grant", + "line": 561 + }, + { + "kind": "func", + "name": "ExpiresAtNotIn", + "signature": "func ExpiresAtNotIn(vs ...time.Time) predicate.Grant", + "line": 566 + }, + { + "kind": "func", + "name": "ExpiresAtGT", + "signature": "func ExpiresAtGT(v time.Time) predicate.Grant", + "line": 571 + }, + { + "kind": "func", + "name": "ExpiresAtGTE", + "signature": "func ExpiresAtGTE(v time.Time) predicate.Grant", + "line": 576 + }, + { + "kind": "func", + "name": "ExpiresAtLT", + "signature": "func ExpiresAtLT(v time.Time) predicate.Grant", + "line": 581 + }, + { + "kind": "func", + "name": "ExpiresAtLTE", + "signature": "func ExpiresAtLTE(v time.Time) predicate.Grant", + "line": 586 + }, + { + "kind": "func", + "name": "ExpiresAtIsNil", + "signature": "func ExpiresAtIsNil() predicate.Grant", + "line": 591 + }, + { + "kind": "func", + "name": "ExpiresAtNotNil", + "signature": "func ExpiresAtNotNil() predicate.Grant", + "line": 596 + }, + { + "kind": "func", + "name": "VoidedAtEQ", + "signature": "func VoidedAtEQ(v time.Time) predicate.Grant", + "line": 601 + }, + { + "kind": "func", + "name": "VoidedAtNEQ", + "signature": "func VoidedAtNEQ(v time.Time) predicate.Grant", + "line": 606 + }, + { + "kind": "func", + "name": "VoidedAtIn", + "signature": "func VoidedAtIn(vs ...time.Time) predicate.Grant", + "line": 611 + }, + { + "kind": "func", + "name": "VoidedAtNotIn", + "signature": "func VoidedAtNotIn(vs ...time.Time) predicate.Grant", + "line": 616 + }, + { + "kind": "func", + "name": "VoidedAtGT", + "signature": "func VoidedAtGT(v time.Time) predicate.Grant", + "line": 621 + }, + { + "kind": "func", + "name": "VoidedAtGTE", + "signature": "func VoidedAtGTE(v time.Time) predicate.Grant", + "line": 626 + }, + { + "kind": "func", + "name": "VoidedAtLT", + "signature": "func VoidedAtLT(v time.Time) predicate.Grant", + "line": 631 + }, + { + "kind": "func", + "name": "VoidedAtLTE", + "signature": "func VoidedAtLTE(v time.Time) predicate.Grant", + "line": 636 + }, + { + "kind": "func", + "name": "VoidedAtIsNil", + "signature": "func VoidedAtIsNil() predicate.Grant", + "line": 641 + }, + { + "kind": "func", + "name": "VoidedAtNotNil", + "signature": "func VoidedAtNotNil() predicate.Grant", + "line": 646 + }, + { + "kind": "func", + "name": "ResetMaxRolloverEQ", + "signature": "func ResetMaxRolloverEQ(v float64) predicate.Grant", + "line": 651 + }, + { + "kind": "func", + "name": "ResetMaxRolloverNEQ", + "signature": "func ResetMaxRolloverNEQ(v float64) predicate.Grant", + "line": 656 + }, + { + "kind": "func", + "name": "ResetMaxRolloverIn", + "signature": "func ResetMaxRolloverIn(vs ...float64) predicate.Grant", + "line": 661 + }, + { + "kind": "func", + "name": "ResetMaxRolloverNotIn", + "signature": "func ResetMaxRolloverNotIn(vs ...float64) predicate.Grant", + "line": 666 + }, + { + "kind": "func", + "name": "ResetMaxRolloverGT", + "signature": "func ResetMaxRolloverGT(v float64) predicate.Grant", + "line": 671 + }, + { + "kind": "func", + "name": "ResetMaxRolloverGTE", + "signature": "func ResetMaxRolloverGTE(v float64) predicate.Grant", + "line": 676 + }, + { + "kind": "func", + "name": "ResetMaxRolloverLT", + "signature": "func ResetMaxRolloverLT(v float64) predicate.Grant", + "line": 681 + }, + { + "kind": "func", + "name": "ResetMaxRolloverLTE", + "signature": "func ResetMaxRolloverLTE(v float64) predicate.Grant", + "line": 686 + }, + { + "kind": "func", + "name": "ResetMinRolloverEQ", + "signature": "func ResetMinRolloverEQ(v float64) predicate.Grant", + "line": 691 + }, + { + "kind": "func", + "name": "ResetMinRolloverNEQ", + "signature": "func ResetMinRolloverNEQ(v float64) predicate.Grant", + "line": 696 + }, + { + "kind": "func", + "name": "ResetMinRolloverIn", + "signature": "func ResetMinRolloverIn(vs ...float64) predicate.Grant", + "line": 701 + }, + { + "kind": "func", + "name": "ResetMinRolloverNotIn", + "signature": "func ResetMinRolloverNotIn(vs ...float64) predicate.Grant", + "line": 706 + }, + { + "kind": "func", + "name": "ResetMinRolloverGT", + "signature": "func ResetMinRolloverGT(v float64) predicate.Grant", + "line": 711 + }, + { + "kind": "func", + "name": "ResetMinRolloverGTE", + "signature": "func ResetMinRolloverGTE(v float64) predicate.Grant", + "line": 716 + }, + { + "kind": "func", + "name": "ResetMinRolloverLT", + "signature": "func ResetMinRolloverLT(v float64) predicate.Grant", + "line": 721 + }, + { + "kind": "func", + "name": "ResetMinRolloverLTE", + "signature": "func ResetMinRolloverLTE(v float64) predicate.Grant", + "line": 726 + }, + { + "kind": "func", + "name": "RecurrencePeriodEQ", + "signature": "func RecurrencePeriodEQ(v datetime.ISODurationString) predicate.Grant", + "line": 731 + }, + { + "kind": "func", + "name": "RecurrencePeriodNEQ", + "signature": "func RecurrencePeriodNEQ(v datetime.ISODurationString) predicate.Grant", + "line": 737 + }, + { + "kind": "func", + "name": "RecurrencePeriodIn", + "signature": "func RecurrencePeriodIn(vs ...datetime.ISODurationString) predicate.Grant", + "line": 743 + }, + { + "kind": "func", + "name": "RecurrencePeriodNotIn", + "signature": "func RecurrencePeriodNotIn(vs ...datetime.ISODurationString) predicate.Grant", + "line": 752 + }, + { + "kind": "func", + "name": "RecurrencePeriodGT", + "signature": "func RecurrencePeriodGT(v datetime.ISODurationString) predicate.Grant", + "line": 761 + }, + { + "kind": "func", + "name": "RecurrencePeriodGTE", + "signature": "func RecurrencePeriodGTE(v datetime.ISODurationString) predicate.Grant", + "line": 767 + }, + { + "kind": "func", + "name": "RecurrencePeriodLT", + "signature": "func RecurrencePeriodLT(v datetime.ISODurationString) predicate.Grant", + "line": 773 + }, + { + "kind": "func", + "name": "RecurrencePeriodLTE", + "signature": "func RecurrencePeriodLTE(v datetime.ISODurationString) predicate.Grant", + "line": 779 + }, + { + "kind": "func", + "name": "RecurrencePeriodContains", + "signature": "func RecurrencePeriodContains(v datetime.ISODurationString) predicate.Grant", + "line": 785 + }, + { + "kind": "func", + "name": "RecurrencePeriodHasPrefix", + "signature": "func RecurrencePeriodHasPrefix(v datetime.ISODurationString) predicate.Grant", + "line": 791 + }, + { + "kind": "func", + "name": "RecurrencePeriodHasSuffix", + "signature": "func RecurrencePeriodHasSuffix(v datetime.ISODurationString) predicate.Grant", + "line": 797 + }, + { + "kind": "func", + "name": "RecurrencePeriodIsNil", + "signature": "func RecurrencePeriodIsNil() predicate.Grant", + "line": 803 + }, + { + "kind": "func", + "name": "RecurrencePeriodNotNil", + "signature": "func RecurrencePeriodNotNil() predicate.Grant", + "line": 808 + }, + { + "kind": "func", + "name": "RecurrencePeriodEqualFold", + "signature": "func RecurrencePeriodEqualFold(v datetime.ISODurationString) predicate.Grant", + "line": 813 + }, + { + "kind": "func", + "name": "RecurrencePeriodContainsFold", + "signature": "func RecurrencePeriodContainsFold(v datetime.ISODurationString) predicate.Grant", + "line": 819 + }, + { + "kind": "func", + "name": "RecurrenceAnchorEQ", + "signature": "func RecurrenceAnchorEQ(v time.Time) predicate.Grant", + "line": 825 + }, + { + "kind": "func", + "name": "RecurrenceAnchorNEQ", + "signature": "func RecurrenceAnchorNEQ(v time.Time) predicate.Grant", + "line": 830 + }, + { + "kind": "func", + "name": "RecurrenceAnchorIn", + "signature": "func RecurrenceAnchorIn(vs ...time.Time) predicate.Grant", + "line": 835 + }, + { + "kind": "func", + "name": "RecurrenceAnchorNotIn", + "signature": "func RecurrenceAnchorNotIn(vs ...time.Time) predicate.Grant", + "line": 840 + }, + { + "kind": "func", + "name": "RecurrenceAnchorGT", + "signature": "func RecurrenceAnchorGT(v time.Time) predicate.Grant", + "line": 845 + }, + { + "kind": "func", + "name": "RecurrenceAnchorGTE", + "signature": "func RecurrenceAnchorGTE(v time.Time) predicate.Grant", + "line": 850 + }, + { + "kind": "func", + "name": "RecurrenceAnchorLT", + "signature": "func RecurrenceAnchorLT(v time.Time) predicate.Grant", + "line": 855 + }, + { + "kind": "func", + "name": "RecurrenceAnchorLTE", + "signature": "func RecurrenceAnchorLTE(v time.Time) predicate.Grant", + "line": 860 + }, + { + "kind": "func", + "name": "RecurrenceAnchorIsNil", + "signature": "func RecurrenceAnchorIsNil() predicate.Grant", + "line": 865 + }, + { + "kind": "func", + "name": "RecurrenceAnchorNotNil", + "signature": "func RecurrenceAnchorNotNil() predicate.Grant", + "line": 870 + }, + { + "kind": "func", + "name": "HasEntitlement", + "signature": "func HasEntitlement() predicate.Grant", + "line": 875 + }, + { + "kind": "func", + "name": "HasEntitlementWith", + "signature": "func HasEntitlementWith(preds ...predicate.Entitlement) predicate.Grant", + "line": 886 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Grant) predicate.Grant", + "line": 898 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Grant) predicate.Grant", + "line": 903 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Grant) predicate.Grant", + "line": 908 + } + ], + "line_count": 910 + }, + "openmeter/ent/db/grant_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "GrantCreate", + "signature": "type GrantCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *GrantCreate) SetNamespace(v string) *GrantCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *GrantCreate) SetAnnotations(v models.Annotations) *GrantCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *GrantCreate) SetCreatedAt(v time.Time) *GrantCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *GrantCreate) SetNillableCreatedAt(v *time.Time) *GrantCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *GrantCreate) SetUpdatedAt(v time.Time) *GrantCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *GrantCreate) SetNillableUpdatedAt(v *time.Time) *GrantCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *GrantCreate) SetDeletedAt(v time.Time) *GrantCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *GrantCreate) SetNillableDeletedAt(v *time.Time) *GrantCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *GrantCreate) SetMetadata(v map[string]string) *GrantCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetOwnerID", + "signature": "func (_c *GrantCreate) SetOwnerID(v string) *GrantCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *GrantCreate) SetAmount(v float64) *GrantCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetPriority", + "signature": "func (_c *GrantCreate) SetPriority(v uint8) *GrantCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillablePriority", + "signature": "func (_c *GrantCreate) SetNillablePriority(v *uint8) *GrantCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetEffectiveAt", + "signature": "func (_c *GrantCreate) SetEffectiveAt(v time.Time) *GrantCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetExpiration", + "signature": "func (_c *GrantCreate) SetExpiration(v *grant.ExpirationPeriod) *GrantCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetExpiresAt", + "signature": "func (_c *GrantCreate) SetExpiresAt(v time.Time) *GrantCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableExpiresAt", + "signature": "func (_c *GrantCreate) SetNillableExpiresAt(v *time.Time) *GrantCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_c *GrantCreate) SetVoidedAt(v time.Time) *GrantCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_c *GrantCreate) SetNillableVoidedAt(v *time.Time) *GrantCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetResetMaxRollover", + "signature": "func (_c *GrantCreate) SetResetMaxRollover(v float64) *GrantCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetResetMinRollover", + "signature": "func (_c *GrantCreate) SetResetMinRollover(v float64) *GrantCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetRecurrencePeriod", + "signature": "func (_c *GrantCreate) SetRecurrencePeriod(v datetime.ISODurationString) *GrantCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetNillableRecurrencePeriod", + "signature": "func (_c *GrantCreate) SetNillableRecurrencePeriod(v *datetime.ISODurationString) *GrantCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetRecurrenceAnchor", + "signature": "func (_c *GrantCreate) SetRecurrenceAnchor(v time.Time) *GrantCreate", + "line": 183 + }, + { + "kind": "func", + "name": "SetNillableRecurrenceAnchor", + "signature": "func (_c *GrantCreate) SetNillableRecurrenceAnchor(v *time.Time) *GrantCreate", + "line": 189 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *GrantCreate) SetID(v string) *GrantCreate", + "line": 197 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *GrantCreate) SetNillableID(v *string) *GrantCreate", + "line": 203 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_c *GrantCreate) SetEntitlementID(id string) *GrantCreate", + "line": 211 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_c *GrantCreate) SetEntitlement(v *Entitlement) *GrantCreate", + "line": 217 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *GrantCreate) Mutation() *GrantMutation", + "line": 222 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *GrantCreate) Save(ctx context.Context) (*Grant, error)", + "line": 227 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *GrantCreate) SaveX(ctx context.Context) *Grant", + "line": 233 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *GrantCreate) Exec(ctx context.Context) error", + "line": 242 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *GrantCreate) ExecX(ctx context.Context)", + "line": 248 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *GrantCreate) defaults()", + "line": 255 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *GrantCreate) check() error", + "line": 275 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *GrantCreate) sqlSave(ctx context.Context) (*Grant, error)", + "line": 314 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *GrantCreate) createSpec() (*Grant, *sqlgraph.CreateSpec)", + "line": 337 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *GrantCreate) OnConflict(opts ...sql.ConflictOption) *GrantUpsertOne", + "line": 447 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *GrantCreate) OnConflictColumns(columns ...string) *GrantUpsertOne", + "line": 460 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *GrantUpsert) SetAnnotations(v models.Annotations) *GrantUpsert", + "line": 481 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *GrantUpsert) UpdateAnnotations() *GrantUpsert", + "line": 487 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *GrantUpsert) ClearAnnotations() *GrantUpsert", + "line": 493 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *GrantUpsert) SetUpdatedAt(v time.Time) *GrantUpsert", + "line": 499 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *GrantUpsert) UpdateUpdatedAt() *GrantUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *GrantUpsert) SetDeletedAt(v time.Time) *GrantUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *GrantUpsert) UpdateDeletedAt() *GrantUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *GrantUpsert) ClearDeletedAt() *GrantUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *GrantUpsert) SetMetadata(v map[string]string) *GrantUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *GrantUpsert) UpdateMetadata() *GrantUpsert", + "line": 535 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *GrantUpsert) ClearMetadata() *GrantUpsert", + "line": 541 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *GrantUpsert) SetVoidedAt(v time.Time) *GrantUpsert", + "line": 547 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *GrantUpsert) UpdateVoidedAt() *GrantUpsert", + "line": 553 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *GrantUpsert) ClearVoidedAt() *GrantUpsert", + "line": 559 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *GrantUpsertOne) UpdateNewValues() *GrantUpsertOne", + "line": 575 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *GrantUpsertOne) Ignore() *GrantUpsertOne", + "line": 627 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *GrantUpsertOne) DoNothing() *GrantUpsertOne", + "line": 634 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *GrantUpsertOne) Update(set func(*GrantUpsert)) *GrantUpsertOne", + "line": 641 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *GrantUpsertOne) SetAnnotations(v models.Annotations) *GrantUpsertOne", + "line": 649 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *GrantUpsertOne) UpdateAnnotations() *GrantUpsertOne", + "line": 656 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *GrantUpsertOne) ClearAnnotations() *GrantUpsertOne", + "line": 663 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *GrantUpsertOne) SetUpdatedAt(v time.Time) *GrantUpsertOne", + "line": 670 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *GrantUpsertOne) UpdateUpdatedAt() *GrantUpsertOne", + "line": 677 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *GrantUpsertOne) SetDeletedAt(v time.Time) *GrantUpsertOne", + "line": 684 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *GrantUpsertOne) UpdateDeletedAt() *GrantUpsertOne", + "line": 691 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *GrantUpsertOne) ClearDeletedAt() *GrantUpsertOne", + "line": 698 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *GrantUpsertOne) SetMetadata(v map[string]string) *GrantUpsertOne", + "line": 705 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *GrantUpsertOne) UpdateMetadata() *GrantUpsertOne", + "line": 712 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *GrantUpsertOne) ClearMetadata() *GrantUpsertOne", + "line": 719 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *GrantUpsertOne) SetVoidedAt(v time.Time) *GrantUpsertOne", + "line": 726 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *GrantUpsertOne) UpdateVoidedAt() *GrantUpsertOne", + "line": 733 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *GrantUpsertOne) ClearVoidedAt() *GrantUpsertOne", + "line": 740 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *GrantUpsertOne) Exec(ctx context.Context) error", + "line": 747 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *GrantUpsertOne) ExecX(ctx context.Context)", + "line": 755 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *GrantUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 762 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *GrantUpsertOne) IDX(ctx context.Context) string", + "line": 776 + }, + { + "kind": "struct", + "name": "GrantCreateBulk", + "signature": "type GrantCreateBulk struct", + "line": 785 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *GrantCreateBulk) Save(ctx context.Context) ([]*Grant, error)", + "line": 793 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *GrantCreateBulk) SaveX(ctx context.Context) []*Grant", + "line": 849 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *GrantCreateBulk) Exec(ctx context.Context) error", + "line": 858 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *GrantCreateBulk) ExecX(ctx context.Context)", + "line": 864 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *GrantCreateBulk) OnConflict(opts ...sql.ConflictOption) *GrantUpsertBulk", + "line": 885 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *GrantCreateBulk) OnConflictColumns(columns ...string) *GrantUpsertBulk", + "line": 898 + }, + { + "kind": "struct", + "name": "GrantUpsertBulk", + "signature": "type GrantUpsertBulk struct", + "line": 907 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *GrantUpsertBulk) UpdateNewValues() *GrantUpsertBulk", + "line": 922 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *GrantUpsertBulk) Ignore() *GrantUpsertBulk", + "line": 976 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *GrantUpsertBulk) DoNothing() *GrantUpsertBulk", + "line": 983 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *GrantUpsertBulk) Update(set func(*GrantUpsert)) *GrantUpsertBulk", + "line": 990 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *GrantUpsertBulk) SetAnnotations(v models.Annotations) *GrantUpsertBulk", + "line": 998 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *GrantUpsertBulk) UpdateAnnotations() *GrantUpsertBulk", + "line": 1005 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *GrantUpsertBulk) ClearAnnotations() *GrantUpsertBulk", + "line": 1012 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *GrantUpsertBulk) SetUpdatedAt(v time.Time) *GrantUpsertBulk", + "line": 1019 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *GrantUpsertBulk) UpdateUpdatedAt() *GrantUpsertBulk", + "line": 1026 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *GrantUpsertBulk) SetDeletedAt(v time.Time) *GrantUpsertBulk", + "line": 1033 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *GrantUpsertBulk) UpdateDeletedAt() *GrantUpsertBulk", + "line": 1040 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *GrantUpsertBulk) ClearDeletedAt() *GrantUpsertBulk", + "line": 1047 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *GrantUpsertBulk) SetMetadata(v map[string]string) *GrantUpsertBulk", + "line": 1054 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *GrantUpsertBulk) UpdateMetadata() *GrantUpsertBulk", + "line": 1061 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *GrantUpsertBulk) ClearMetadata() *GrantUpsertBulk", + "line": 1068 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (u *GrantUpsertBulk) SetVoidedAt(v time.Time) *GrantUpsertBulk", + "line": 1075 + }, + { + "kind": "func", + "name": "UpdateVoidedAt", + "signature": "func (u *GrantUpsertBulk) UpdateVoidedAt() *GrantUpsertBulk", + "line": 1082 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (u *GrantUpsertBulk) ClearVoidedAt() *GrantUpsertBulk", + "line": 1089 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *GrantUpsertBulk) Exec(ctx context.Context) error", + "line": 1096 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *GrantUpsertBulk) ExecX(ctx context.Context)", + "line": 1112 + } + ], + "line_count": 1116 + }, + "openmeter/ent/db/grant_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "GrantDelete", + "signature": "type GrantDelete struct", + "line": 17 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *GrantDelete) Where(ps ...predicate.Grant) *GrantDelete", + "line": 24 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *GrantDelete) Exec(ctx context.Context) (int, error)", + "line": 30 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *GrantDelete) ExecX(ctx context.Context) int", + "line": 35 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *GrantDelete) sqlExec(ctx context.Context) (int, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "GrantDeleteOne", + "signature": "type GrantDeleteOne struct", + "line": 61 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *GrantDeleteOne) Where(ps ...predicate.Grant) *GrantDeleteOne", + "line": 66 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *GrantDeleteOne) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *GrantDeleteOne) ExecX(ctx context.Context)", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/ent/db/grant_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "GrantQuery", + "signature": "type GrantQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *GrantQuery) Where(ps ...predicate.Grant) *GrantQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *GrantQuery) Limit(limit int) *GrantQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *GrantQuery) Offset(offset int) *GrantQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *GrantQuery) Unique(unique bool) *GrantQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *GrantQuery) Order(o ...dbgrant.OrderOption) *GrantQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_q *GrantQuery) QueryEntitlement() *EntitlementQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *GrantQuery) First(ctx context.Context) (*Grant, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *GrantQuery) FirstX(ctx context.Context) *Grant", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *GrantQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *GrantQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *GrantQuery) Only(ctx context.Context) (*Grant, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *GrantQuery) OnlyX(ctx context.Context) *Grant", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *GrantQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *GrantQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *GrantQuery) All(ctx context.Context) ([]*Grant, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *GrantQuery) AllX(ctx context.Context) []*Grant", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *GrantQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *GrantQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *GrantQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *GrantQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *GrantQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *GrantQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *GrantQuery) Clone() *GrantQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithEntitlement", + "signature": "func (_q *GrantQuery) WithEntitlement(opts ...func(*EntitlementQuery)) *GrantQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *GrantQuery) GroupBy(field string, fields ...string) *GrantGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *GrantQuery) Select(fields ...string) *GrantSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *GrantQuery) Aggregate(fns ...AggregateFunc) *GrantSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *GrantQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *GrantQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Grant, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadEntitlement", + "signature": "func (_q *GrantQuery) loadEntitlement(ctx context.Context, query *EntitlementQuery, nodes []*Grant, init func(*Grant), assign func(*Grant, *Entitlement)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *GrantQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *GrantQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *GrantQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *GrantQuery) ForUpdate(opts ...sql.LockOption) *GrantQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *GrantQuery) ForShare(opts ...sql.LockOption) *GrantQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "GrantGroupBy", + "signature": "type GrantGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *GrantGroupBy) Aggregate(fns ...AggregateFunc) *GrantGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *GrantGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *GrantGroupBy) sqlScan(ctx context.Context, root *GrantQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "GrantSelect", + "signature": "type GrantSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *GrantSelect) Aggregate(fns ...AggregateFunc) *GrantSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *GrantSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *GrantSelect) sqlScan(ctx context.Context, root *GrantQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/grant_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "GrantUpdate", + "signature": "type GrantUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *GrantUpdate) Where(ps ...predicate.Grant) *GrantUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *GrantUpdate) SetAnnotations(v models.Annotations) *GrantUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *GrantUpdate) ClearAnnotations() *GrantUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *GrantUpdate) SetUpdatedAt(v time.Time) *GrantUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *GrantUpdate) SetDeletedAt(v time.Time) *GrantUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *GrantUpdate) SetNillableDeletedAt(v *time.Time) *GrantUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *GrantUpdate) ClearDeletedAt() *GrantUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *GrantUpdate) SetMetadata(v map[string]string) *GrantUpdate", + "line": 71 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *GrantUpdate) ClearMetadata() *GrantUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_u *GrantUpdate) SetVoidedAt(v time.Time) *GrantUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_u *GrantUpdate) SetNillableVoidedAt(v *time.Time) *GrantUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (_u *GrantUpdate) ClearVoidedAt() *GrantUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *GrantUpdate) Mutation() *GrantMutation", + "line": 103 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *GrantUpdate) Save(ctx context.Context) (int, error)", + "line": 108 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *GrantUpdate) SaveX(ctx context.Context) int", + "line": 114 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *GrantUpdate) Exec(ctx context.Context) error", + "line": 123 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *GrantUpdate) ExecX(ctx context.Context)", + "line": 129 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *GrantUpdate) defaults()", + "line": 136 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *GrantUpdate) check() error", + "line": 144 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *GrantUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 151 + }, + { + "kind": "struct", + "name": "GrantUpdateOne", + "signature": "type GrantUpdateOne struct", + "line": 215 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *GrantUpdateOne) SetAnnotations(v models.Annotations) *GrantUpdateOne", + "line": 223 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *GrantUpdateOne) ClearAnnotations() *GrantUpdateOne", + "line": 229 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *GrantUpdateOne) SetUpdatedAt(v time.Time) *GrantUpdateOne", + "line": 235 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *GrantUpdateOne) SetDeletedAt(v time.Time) *GrantUpdateOne", + "line": 241 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *GrantUpdateOne) SetNillableDeletedAt(v *time.Time) *GrantUpdateOne", + "line": 247 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *GrantUpdateOne) ClearDeletedAt() *GrantUpdateOne", + "line": 255 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *GrantUpdateOne) SetMetadata(v map[string]string) *GrantUpdateOne", + "line": 261 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *GrantUpdateOne) ClearMetadata() *GrantUpdateOne", + "line": 267 + }, + { + "kind": "func", + "name": "SetVoidedAt", + "signature": "func (_u *GrantUpdateOne) SetVoidedAt(v time.Time) *GrantUpdateOne", + "line": 273 + }, + { + "kind": "func", + "name": "SetNillableVoidedAt", + "signature": "func (_u *GrantUpdateOne) SetNillableVoidedAt(v *time.Time) *GrantUpdateOne", + "line": 279 + }, + { + "kind": "func", + "name": "ClearVoidedAt", + "signature": "func (_u *GrantUpdateOne) ClearVoidedAt() *GrantUpdateOne", + "line": 287 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *GrantUpdateOne) Mutation() *GrantMutation", + "line": 293 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *GrantUpdateOne) Where(ps ...predicate.Grant) *GrantUpdateOne", + "line": 298 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *GrantUpdateOne) Select(field string, fields ...string) *GrantUpdateOne", + "line": 305 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *GrantUpdateOne) Save(ctx context.Context) (*Grant, error)", + "line": 311 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *GrantUpdateOne) SaveX(ctx context.Context) *Grant", + "line": 317 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *GrantUpdateOne) Exec(ctx context.Context) error", + "line": 326 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *GrantUpdateOne) ExecX(ctx context.Context)", + "line": 332 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *GrantUpdateOne) defaults()", + "line": 339 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *GrantUpdateOne) check() error", + "line": 347 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *GrantUpdateOne) sqlSave(ctx context.Context) (_node *Grant, err error)", + "line": 354 + } + ], + "line_count": 435 + }, + "openmeter/ent/db/hook/hook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AddonFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 17 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AddonRateCardFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 29 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 41 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppCustomInvoicingFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 53 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppCustomInvoicingCustomerFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 65 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppCustomerFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 77 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppStripeFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 89 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f AppStripeCustomerFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 101 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BalanceSnapshotFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 113 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingCustomerLockFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 125 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingCustomerOverrideFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 137 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 149 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceFlatFeeLineConfigFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 161 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceLineFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 173 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceLineDiscountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 185 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceLineUsageDiscountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 197 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceSplitLineGroupFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 209 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceUsageBasedLineConfigFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 221 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceValidationIssueFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 233 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingInvoiceWriteSchemaLevelFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 245 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingProfileFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 257 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingSequenceNumbersFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 269 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingStandardInvoiceDetailedLineFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 281 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingStandardInvoiceDetailedLineAmountDiscountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 293 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f BillingWorkflowConfigFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 305 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 317 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeCreditPurchaseFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 329 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeCreditPurchaseCreditGrantFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 341 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeCreditPurchaseExternalPaymentFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 353 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeCreditPurchaseInvoicedPaymentFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 365 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 377 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeRunFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 389 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeRunCreditAllocationsFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 401 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeRunDetailedLineFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 413 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeRunInvoicedUsageFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 425 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeFlatFeeRunPaymentFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 437 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 449 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedRunCreditAllocationsFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 461 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedRunDetailedLineFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 473 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedRunInvoicedUsageFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 485 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedRunPaymentFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 497 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f ChargeUsageBasedRunsFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 509 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CreditRealizationLineageFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 521 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CreditRealizationLineageSegmentFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 533 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CurrencyCostBasisFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 545 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CustomCurrencyFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 557 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CustomerFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 569 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f CustomerSubjectsFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 581 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f EntitlementFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 593 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f FeatureFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 605 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f GrantFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 617 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LLMCostPriceFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 629 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerAccountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 641 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerBreakageRecordFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 653 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerCustomerAccountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 665 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerEntryFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 677 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerSubAccountFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 689 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerSubAccountRouteFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 701 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerTransactionFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 713 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f LedgerTransactionGroupFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 725 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f MeterFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 737 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f NotificationChannelFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 749 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f NotificationEventFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 761 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f NotificationEventDeliveryStatusFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 773 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f NotificationRuleFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 785 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f OrganizationDefaultTaxCodesFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 797 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f PlanFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 809 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f PlanAddonFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 821 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f PlanPhaseFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 833 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f PlanRateCardFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 845 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubjectFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 857 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 869 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionAddonFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 881 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionAddonQuantityFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 893 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionBillingSyncStateFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 905 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionItemFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 917 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f SubscriptionPhaseFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 929 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f TaxCodeFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 941 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (f UsageResetFunc) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 953 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(first, second Condition, rest ...Condition) Condition", + "line": 964 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(first, second Condition, rest ...Condition) Condition", + "line": 979 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(cond Condition) Condition", + "line": 994 + }, + { + "kind": "func", + "name": "HasOp", + "signature": "func HasOp(op db.Op) Condition", + "line": 1001 + }, + { + "kind": "func", + "name": "HasAddedFields", + "signature": "func HasAddedFields(field string, fields ...string) Condition", + "line": 1008 + }, + { + "kind": "func", + "name": "HasClearedFields", + "signature": "func HasClearedFields(field string, fields ...string) Condition", + "line": 1023 + }, + { + "kind": "func", + "name": "HasFields", + "signature": "func HasFields(field string, fields ...string) Condition", + "line": 1038 + }, + { + "kind": "func", + "name": "If", + "signature": "func If(hk db.Hook, cond Condition) db.Hook", + "line": 1055 + }, + { + "kind": "func", + "name": "On", + "signature": "func On(hk db.Hook, op db.Op) db.Hook", + "line": 1069 + }, + { + "kind": "func", + "name": "Unless", + "signature": "func Unless(hk db.Hook, op db.Op) db.Hook", + "line": 1076 + }, + { + "kind": "func", + "name": "FixedError", + "signature": "func FixedError(err error) db.Hook", + "line": 1081 + }, + { + "kind": "func", + "name": "Reject", + "signature": "func Reject(op db.Op) db.Hook", + "line": 1096 + }, + { + "kind": "struct", + "name": "Chain", + "signature": "type Chain struct", + "line": 1103 + }, + { + "kind": "func", + "name": "NewChain", + "signature": "func NewChain(hooks ...db.Hook) Chain", + "line": 1108 + }, + { + "kind": "func", + "name": "Hook", + "signature": "func (c Chain) Hook() db.Hook", + "line": 1113 + }, + { + "kind": "func", + "name": "Append", + "signature": "func (c Chain) Append(hooks ...db.Hook) Chain", + "line": 1124 + }, + { + "kind": "func", + "name": "Extend", + "signature": "func (c Chain) Extend(chain Chain) Chain", + "line": 1133 + } + ], + "line_count": 1135 + }, + "openmeter/ent/db/ledgeraccount.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccount", + "signature": "type LedgerAccount struct", + "line": 19 + }, + { + "kind": "struct", + "name": "LedgerAccountEdges", + "signature": "type LedgerAccountEdges struct", + "line": 42 + }, + { + "kind": "func", + "name": "SubAccountsOrErr", + "signature": "func (e LedgerAccountEdges) SubAccountsOrErr() ([]*LedgerSubAccount, error)", + "line": 54 + }, + { + "kind": "func", + "name": "SubAccountRoutesOrErr", + "signature": "func (e LedgerAccountEdges) SubAccountRoutesOrErr() ([]*LedgerSubAccountRoute, error)", + "line": 63 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerAccount) assignValues(columns []string, values []any) error", + "line": 90 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerAccount) Value(name string) (ent.Value, error)", + "line": 150 + }, + { + "kind": "func", + "name": "QuerySubAccounts", + "signature": "func (_m *LedgerAccount) QuerySubAccounts() *LedgerSubAccountQuery", + "line": 155 + }, + { + "kind": "func", + "name": "QuerySubAccountRoutes", + "signature": "func (_m *LedgerAccount) QuerySubAccountRoutes() *LedgerSubAccountRouteQuery", + "line": 160 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerAccount) Update() *LedgerAccountUpdateOne", + "line": 167 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerAccount) Unwrap() *LedgerAccount", + "line": 173 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerAccount) String() string", + "line": 183 + } + ], + "line_count": 211 + }, + "openmeter/ent/db/ledgeraccount/ledgeraccount.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 63 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 89 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 94 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByAccountType", + "signature": "func ByAccountType(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "BySubAccountsCount", + "signature": "func BySubAccountsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "BySubAccounts", + "signature": "func BySubAccounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "BySubAccountRoutesCount", + "signature": "func BySubAccountRoutesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "BySubAccountRoutes", + "signature": "func BySubAccountRoutes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "newSubAccountsStep", + "signature": "func newSubAccountsStep() *sqlgraph.Step", + "line": 145 + }, + { + "kind": "func", + "name": "newSubAccountRoutesStep", + "signature": "func newSubAccountRoutesStep() *sqlgraph.Step", + "line": 152 + } + ], + "line_count": 158 + }, + "openmeter/ent/db/ledgeraccount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerAccount", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerAccount", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerAccount", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerAccount", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerAccount", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerAccount", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerAccount", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerAccount", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerAccount", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerAccount", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerAccount", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerAccount", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerAccount", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerAccount", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerAccount", + "line": 85 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func AccountType(v ledger.AccountType) predicate.LedgerAccount", + "line": 90 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerAccount", + "line": 96 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerAccount", + "line": 101 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerAccount", + "line": 106 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerAccount", + "line": 111 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerAccount", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerAccount", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerAccount", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerAccount", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerAccount", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerAccount", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerAccount", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerAccount", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerAccount", + "line": 156 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerAccount", + "line": 161 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerAccount", + "line": 166 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerAccount", + "line": 171 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerAccount", + "line": 176 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerAccount", + "line": 181 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerAccount", + "line": 186 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerAccount", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerAccount", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerAccount", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerAccount", + "line": 206 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerAccount", + "line": 211 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerAccount", + "line": 216 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerAccount", + "line": 221 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerAccount", + "line": 226 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerAccount", + "line": 231 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerAccount", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerAccount", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerAccount", + "line": 246 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerAccount", + "line": 251 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerAccount", + "line": 256 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerAccount", + "line": 261 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerAccount", + "line": 266 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerAccount", + "line": 271 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerAccount", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerAccount", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerAccount", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerAccount", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerAccount", + "line": 296 + }, + { + "kind": "func", + "name": "AccountTypeEQ", + "signature": "func AccountTypeEQ(v ledger.AccountType) predicate.LedgerAccount", + "line": 301 + }, + { + "kind": "func", + "name": "AccountTypeNEQ", + "signature": "func AccountTypeNEQ(v ledger.AccountType) predicate.LedgerAccount", + "line": 307 + }, + { + "kind": "func", + "name": "AccountTypeIn", + "signature": "func AccountTypeIn(vs ...ledger.AccountType) predicate.LedgerAccount", + "line": 313 + }, + { + "kind": "func", + "name": "AccountTypeNotIn", + "signature": "func AccountTypeNotIn(vs ...ledger.AccountType) predicate.LedgerAccount", + "line": 322 + }, + { + "kind": "func", + "name": "AccountTypeGT", + "signature": "func AccountTypeGT(v ledger.AccountType) predicate.LedgerAccount", + "line": 331 + }, + { + "kind": "func", + "name": "AccountTypeGTE", + "signature": "func AccountTypeGTE(v ledger.AccountType) predicate.LedgerAccount", + "line": 337 + }, + { + "kind": "func", + "name": "AccountTypeLT", + "signature": "func AccountTypeLT(v ledger.AccountType) predicate.LedgerAccount", + "line": 343 + }, + { + "kind": "func", + "name": "AccountTypeLTE", + "signature": "func AccountTypeLTE(v ledger.AccountType) predicate.LedgerAccount", + "line": 349 + }, + { + "kind": "func", + "name": "AccountTypeContains", + "signature": "func AccountTypeContains(v ledger.AccountType) predicate.LedgerAccount", + "line": 355 + }, + { + "kind": "func", + "name": "AccountTypeHasPrefix", + "signature": "func AccountTypeHasPrefix(v ledger.AccountType) predicate.LedgerAccount", + "line": 361 + }, + { + "kind": "func", + "name": "AccountTypeHasSuffix", + "signature": "func AccountTypeHasSuffix(v ledger.AccountType) predicate.LedgerAccount", + "line": 367 + }, + { + "kind": "func", + "name": "AccountTypeEqualFold", + "signature": "func AccountTypeEqualFold(v ledger.AccountType) predicate.LedgerAccount", + "line": 373 + }, + { + "kind": "func", + "name": "AccountTypeContainsFold", + "signature": "func AccountTypeContainsFold(v ledger.AccountType) predicate.LedgerAccount", + "line": 379 + }, + { + "kind": "func", + "name": "HasSubAccounts", + "signature": "func HasSubAccounts() predicate.LedgerAccount", + "line": 385 + }, + { + "kind": "func", + "name": "HasSubAccountsWith", + "signature": "func HasSubAccountsWith(preds ...predicate.LedgerSubAccount) predicate.LedgerAccount", + "line": 396 + }, + { + "kind": "func", + "name": "HasSubAccountRoutes", + "signature": "func HasSubAccountRoutes() predicate.LedgerAccount", + "line": 408 + }, + { + "kind": "func", + "name": "HasSubAccountRoutesWith", + "signature": "func HasSubAccountRoutesWith(preds ...predicate.LedgerSubAccountRoute) predicate.LedgerAccount", + "line": 419 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerAccount) predicate.LedgerAccount", + "line": 431 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerAccount) predicate.LedgerAccount", + "line": 436 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerAccount) predicate.LedgerAccount", + "line": 441 + } + ], + "line_count": 443 + }, + "openmeter/ent/db/ledgeraccount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccountCreate", + "signature": "type LedgerAccountCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerAccountCreate) SetNamespace(v string) *LedgerAccountCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerAccountCreate) SetAnnotations(v models.Annotations) *LedgerAccountCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerAccountCreate) SetCreatedAt(v time.Time) *LedgerAccountCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerAccountCreate) SetNillableCreatedAt(v *time.Time) *LedgerAccountCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerAccountCreate) SetUpdatedAt(v time.Time) *LedgerAccountCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerAccountCreate) SetNillableUpdatedAt(v *time.Time) *LedgerAccountCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerAccountCreate) SetDeletedAt(v time.Time) *LedgerAccountCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerAccountCreate) SetNillableDeletedAt(v *time.Time) *LedgerAccountCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetAccountType", + "signature": "func (_c *LedgerAccountCreate) SetAccountType(v ledger.AccountType) *LedgerAccountCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerAccountCreate) SetID(v string) *LedgerAccountCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerAccountCreate) SetNillableID(v *string) *LedgerAccountCreate", + "line": 97 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_c *LedgerAccountCreate) AddSubAccountIDs(ids ...string) *LedgerAccountCreate", + "line": 105 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_c *LedgerAccountCreate) AddSubAccounts(v ...*LedgerSubAccount) *LedgerAccountCreate", + "line": 111 + }, + { + "kind": "func", + "name": "AddSubAccountRouteIDs", + "signature": "func (_c *LedgerAccountCreate) AddSubAccountRouteIDs(ids ...string) *LedgerAccountCreate", + "line": 120 + }, + { + "kind": "func", + "name": "AddSubAccountRoutes", + "signature": "func (_c *LedgerAccountCreate) AddSubAccountRoutes(v ...*LedgerSubAccountRoute) *LedgerAccountCreate", + "line": 126 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerAccountCreate) Mutation() *LedgerAccountMutation", + "line": 135 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerAccountCreate) Save(ctx context.Context) (*LedgerAccount, error)", + "line": 140 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerAccountCreate) SaveX(ctx context.Context) *LedgerAccount", + "line": 146 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerAccountCreate) Exec(ctx context.Context) error", + "line": 155 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerAccountCreate) ExecX(ctx context.Context)", + "line": 161 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerAccountCreate) defaults()", + "line": 168 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerAccountCreate) check() error", + "line": 184 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerAccountCreate) sqlSave(ctx context.Context) (*LedgerAccount, error)", + "line": 210 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerAccountCreate) createSpec() (*LedgerAccount, *sqlgraph.CreateSpec)", + "line": 233 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerAccountCreate) OnConflict(opts ...sql.ConflictOption) *LedgerAccountUpsertOne", + "line": 318 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerAccountCreate) OnConflictColumns(columns ...string) *LedgerAccountUpsertOne", + "line": 331 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerAccountUpsert) SetAnnotations(v models.Annotations) *LedgerAccountUpsert", + "line": 352 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerAccountUpsert) UpdateAnnotations() *LedgerAccountUpsert", + "line": 358 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerAccountUpsert) ClearAnnotations() *LedgerAccountUpsert", + "line": 364 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerAccountUpsert) SetUpdatedAt(v time.Time) *LedgerAccountUpsert", + "line": 370 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerAccountUpsert) UpdateUpdatedAt() *LedgerAccountUpsert", + "line": 376 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerAccountUpsert) SetDeletedAt(v time.Time) *LedgerAccountUpsert", + "line": 382 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerAccountUpsert) UpdateDeletedAt() *LedgerAccountUpsert", + "line": 388 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerAccountUpsert) ClearDeletedAt() *LedgerAccountUpsert", + "line": 394 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerAccountUpsertOne) UpdateNewValues() *LedgerAccountUpsertOne", + "line": 410 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerAccountUpsertOne) Ignore() *LedgerAccountUpsertOne", + "line": 435 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerAccountUpsertOne) DoNothing() *LedgerAccountUpsertOne", + "line": 442 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerAccountUpsertOne) Update(set func(*LedgerAccountUpsert)) *LedgerAccountUpsertOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerAccountUpsertOne) SetAnnotations(v models.Annotations) *LedgerAccountUpsertOne", + "line": 457 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerAccountUpsertOne) UpdateAnnotations() *LedgerAccountUpsertOne", + "line": 464 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerAccountUpsertOne) ClearAnnotations() *LedgerAccountUpsertOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerAccountUpsertOne) SetUpdatedAt(v time.Time) *LedgerAccountUpsertOne", + "line": 478 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerAccountUpsertOne) UpdateUpdatedAt() *LedgerAccountUpsertOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerAccountUpsertOne) SetDeletedAt(v time.Time) *LedgerAccountUpsertOne", + "line": 492 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerAccountUpsertOne) UpdateDeletedAt() *LedgerAccountUpsertOne", + "line": 499 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerAccountUpsertOne) ClearDeletedAt() *LedgerAccountUpsertOne", + "line": 506 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerAccountUpsertOne) Exec(ctx context.Context) error", + "line": 513 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerAccountUpsertOne) ExecX(ctx context.Context)", + "line": 521 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerAccountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 528 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerAccountUpsertOne) IDX(ctx context.Context) string", + "line": 542 + }, + { + "kind": "struct", + "name": "LedgerAccountCreateBulk", + "signature": "type LedgerAccountCreateBulk struct", + "line": 551 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerAccountCreateBulk) Save(ctx context.Context) ([]*LedgerAccount, error)", + "line": 559 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerAccountCreateBulk) SaveX(ctx context.Context) []*LedgerAccount", + "line": 615 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerAccountCreateBulk) Exec(ctx context.Context) error", + "line": 624 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerAccountCreateBulk) ExecX(ctx context.Context)", + "line": 630 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerAccountUpsertBulk", + "line": 651 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerAccountCreateBulk) OnConflictColumns(columns ...string) *LedgerAccountUpsertBulk", + "line": 664 + }, + { + "kind": "struct", + "name": "LedgerAccountUpsertBulk", + "signature": "type LedgerAccountUpsertBulk struct", + "line": 673 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerAccountUpsertBulk) UpdateNewValues() *LedgerAccountUpsertBulk", + "line": 688 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerAccountUpsertBulk) Ignore() *LedgerAccountUpsertBulk", + "line": 715 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerAccountUpsertBulk) DoNothing() *LedgerAccountUpsertBulk", + "line": 722 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerAccountUpsertBulk) Update(set func(*LedgerAccountUpsert)) *LedgerAccountUpsertBulk", + "line": 729 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerAccountUpsertBulk) SetAnnotations(v models.Annotations) *LedgerAccountUpsertBulk", + "line": 737 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerAccountUpsertBulk) UpdateAnnotations() *LedgerAccountUpsertBulk", + "line": 744 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerAccountUpsertBulk) ClearAnnotations() *LedgerAccountUpsertBulk", + "line": 751 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerAccountUpsertBulk) SetUpdatedAt(v time.Time) *LedgerAccountUpsertBulk", + "line": 758 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerAccountUpsertBulk) UpdateUpdatedAt() *LedgerAccountUpsertBulk", + "line": 765 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerAccountUpsertBulk) SetDeletedAt(v time.Time) *LedgerAccountUpsertBulk", + "line": 772 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerAccountUpsertBulk) UpdateDeletedAt() *LedgerAccountUpsertBulk", + "line": 779 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerAccountUpsertBulk) ClearDeletedAt() *LedgerAccountUpsertBulk", + "line": 786 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerAccountUpsertBulk) Exec(ctx context.Context) error", + "line": 793 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerAccountUpsertBulk) ExecX(ctx context.Context)", + "line": 809 + } + ], + "line_count": 813 + }, + "openmeter/ent/db/ledgeraccount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccountDelete", + "signature": "type LedgerAccountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerAccountDelete) Where(ps ...predicate.LedgerAccount) *LedgerAccountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerAccountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerAccountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerAccountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerAccountDeleteOne", + "signature": "type LedgerAccountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerAccountDeleteOne) Where(ps ...predicate.LedgerAccount) *LedgerAccountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerAccountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerAccountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgeraccount_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccountQuery", + "signature": "type LedgerAccountQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerAccountQuery) Where(ps ...predicate.LedgerAccount) *LedgerAccountQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerAccountQuery) Limit(limit int) *LedgerAccountQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerAccountQuery) Offset(offset int) *LedgerAccountQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerAccountQuery) Unique(unique bool) *LedgerAccountQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerAccountQuery) Order(o ...ledgeraccount.OrderOption) *LedgerAccountQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QuerySubAccounts", + "signature": "func (_q *LedgerAccountQuery) QuerySubAccounts() *LedgerSubAccountQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QuerySubAccountRoutes", + "signature": "func (_q *LedgerAccountQuery) QuerySubAccountRoutes() *LedgerSubAccountRouteQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerAccountQuery) First(ctx context.Context) (*LedgerAccount, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerAccountQuery) FirstX(ctx context.Context) *LedgerAccount", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerAccountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerAccountQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerAccountQuery) Only(ctx context.Context) (*LedgerAccount, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerAccountQuery) OnlyX(ctx context.Context) *LedgerAccount", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerAccountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerAccountQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerAccountQuery) All(ctx context.Context) ([]*LedgerAccount, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerAccountQuery) AllX(ctx context.Context) []*LedgerAccount", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerAccountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerAccountQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerAccountQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerAccountQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerAccountQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerAccountQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerAccountQuery) Clone() *LedgerAccountQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithSubAccounts", + "signature": "func (_q *LedgerAccountQuery) WithSubAccounts(opts ...func(*LedgerSubAccountQuery)) *LedgerAccountQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithSubAccountRoutes", + "signature": "func (_q *LedgerAccountQuery) WithSubAccountRoutes(opts ...func(*LedgerSubAccountRouteQuery)) *LedgerAccountQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerAccountQuery) GroupBy(field string, fields ...string) *LedgerAccountGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerAccountQuery) Select(fields ...string) *LedgerAccountSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerAccountQuery) Aggregate(fns ...AggregateFunc) *LedgerAccountSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerAccountQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerAccountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerAccount, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadSubAccounts", + "signature": "func (_q *LedgerAccountQuery) loadSubAccounts(ctx context.Context, query *LedgerSubAccountQuery, nodes []*LedgerAccount, init func(*LedgerAccount), assign func(*LedgerAccount, *LedgerSubAccount)) error", + "line": 457 + }, + { + "kind": "func", + "name": "loadSubAccountRoutes", + "signature": "func (_q *LedgerAccountQuery) loadSubAccountRoutes(ctx context.Context, query *LedgerSubAccountRouteQuery, nodes []*LedgerAccount, init func(*LedgerAccount), assign func(*LedgerAccount, *LedgerSubAccountRoute)) error", + "line": 487 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerAccountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 518 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerAccountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 530 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerAccountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 570 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerAccountQuery) ForUpdate(opts ...sql.LockOption) *LedgerAccountQuery", + "line": 608 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerAccountQuery) ForShare(opts ...sql.LockOption) *LedgerAccountQuery", + "line": 621 + }, + { + "kind": "struct", + "name": "LedgerAccountGroupBy", + "signature": "type LedgerAccountGroupBy struct", + "line": 632 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerAccountGroupBy) Aggregate(fns ...AggregateFunc) *LedgerAccountGroupBy", + "line": 638 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerAccountGroupBy) Scan(ctx context.Context, v any) error", + "line": 644 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerAccountGroupBy) sqlScan(ctx context.Context, root *LedgerAccountQuery, v any) error", + "line": 652 + }, + { + "kind": "struct", + "name": "LedgerAccountSelect", + "signature": "type LedgerAccountSelect struct", + "line": 680 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerAccountSelect) Aggregate(fns ...AggregateFunc) *LedgerAccountSelect", + "line": 686 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerAccountSelect) Scan(ctx context.Context, v any) error", + "line": 692 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerAccountSelect) sqlScan(ctx context.Context, root *LedgerAccountQuery, v any) error", + "line": 700 + } + ], + "line_count": 719 + }, + "openmeter/ent/db/ledgeraccount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccountUpdate", + "signature": "type LedgerAccountUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerAccountUpdate) Where(ps ...predicate.LedgerAccount) *LedgerAccountUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerAccountUpdate) SetAnnotations(v models.Annotations) *LedgerAccountUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerAccountUpdate) ClearAnnotations() *LedgerAccountUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerAccountUpdate) SetUpdatedAt(v time.Time) *LedgerAccountUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerAccountUpdate) SetDeletedAt(v time.Time) *LedgerAccountUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerAccountUpdate) SetNillableDeletedAt(v *time.Time) *LedgerAccountUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerAccountUpdate) ClearDeletedAt() *LedgerAccountUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_u *LedgerAccountUpdate) AddSubAccountIDs(ids ...string) *LedgerAccountUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_u *LedgerAccountUpdate) AddSubAccounts(v ...*LedgerSubAccount) *LedgerAccountUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "AddSubAccountRouteIDs", + "signature": "func (_u *LedgerAccountUpdate) AddSubAccountRouteIDs(ids ...string) *LedgerAccountUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "AddSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdate) AddSubAccountRoutes(v ...*LedgerSubAccountRoute) *LedgerAccountUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerAccountUpdate) Mutation() *LedgerAccountMutation", + "line": 103 + }, + { + "kind": "func", + "name": "ClearSubAccounts", + "signature": "func (_u *LedgerAccountUpdate) ClearSubAccounts() *LedgerAccountUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "RemoveSubAccountIDs", + "signature": "func (_u *LedgerAccountUpdate) RemoveSubAccountIDs(ids ...string) *LedgerAccountUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "RemoveSubAccounts", + "signature": "func (_u *LedgerAccountUpdate) RemoveSubAccounts(v ...*LedgerSubAccount) *LedgerAccountUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "ClearSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdate) ClearSubAccountRoutes() *LedgerAccountUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "RemoveSubAccountRouteIDs", + "signature": "func (_u *LedgerAccountUpdate) RemoveSubAccountRouteIDs(ids ...string) *LedgerAccountUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "RemoveSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdate) RemoveSubAccountRoutes(v ...*LedgerSubAccountRoute) *LedgerAccountUpdate", + "line": 141 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerAccountUpdate) Save(ctx context.Context) (int, error)", + "line": 150 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerAccountUpdate) SaveX(ctx context.Context) int", + "line": 156 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerAccountUpdate) Exec(ctx context.Context) error", + "line": 165 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerAccountUpdate) ExecX(ctx context.Context)", + "line": 171 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerAccountUpdate) defaults()", + "line": 178 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerAccountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 185 + }, + { + "kind": "struct", + "name": "LedgerAccountUpdateOne", + "signature": "type LedgerAccountUpdateOne struct", + "line": 312 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerAccountUpdateOne) SetAnnotations(v models.Annotations) *LedgerAccountUpdateOne", + "line": 320 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerAccountUpdateOne) ClearAnnotations() *LedgerAccountUpdateOne", + "line": 326 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerAccountUpdateOne) SetUpdatedAt(v time.Time) *LedgerAccountUpdateOne", + "line": 332 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerAccountUpdateOne) SetDeletedAt(v time.Time) *LedgerAccountUpdateOne", + "line": 338 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerAccountUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerAccountUpdateOne", + "line": 344 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerAccountUpdateOne) ClearDeletedAt() *LedgerAccountUpdateOne", + "line": 352 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_u *LedgerAccountUpdateOne) AddSubAccountIDs(ids ...string) *LedgerAccountUpdateOne", + "line": 358 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_u *LedgerAccountUpdateOne) AddSubAccounts(v ...*LedgerSubAccount) *LedgerAccountUpdateOne", + "line": 364 + }, + { + "kind": "func", + "name": "AddSubAccountRouteIDs", + "signature": "func (_u *LedgerAccountUpdateOne) AddSubAccountRouteIDs(ids ...string) *LedgerAccountUpdateOne", + "line": 373 + }, + { + "kind": "func", + "name": "AddSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdateOne) AddSubAccountRoutes(v ...*LedgerSubAccountRoute) *LedgerAccountUpdateOne", + "line": 379 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerAccountUpdateOne) Mutation() *LedgerAccountMutation", + "line": 388 + }, + { + "kind": "func", + "name": "ClearSubAccounts", + "signature": "func (_u *LedgerAccountUpdateOne) ClearSubAccounts() *LedgerAccountUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "RemoveSubAccountIDs", + "signature": "func (_u *LedgerAccountUpdateOne) RemoveSubAccountIDs(ids ...string) *LedgerAccountUpdateOne", + "line": 399 + }, + { + "kind": "func", + "name": "RemoveSubAccounts", + "signature": "func (_u *LedgerAccountUpdateOne) RemoveSubAccounts(v ...*LedgerSubAccount) *LedgerAccountUpdateOne", + "line": 405 + }, + { + "kind": "func", + "name": "ClearSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdateOne) ClearSubAccountRoutes() *LedgerAccountUpdateOne", + "line": 414 + }, + { + "kind": "func", + "name": "RemoveSubAccountRouteIDs", + "signature": "func (_u *LedgerAccountUpdateOne) RemoveSubAccountRouteIDs(ids ...string) *LedgerAccountUpdateOne", + "line": 420 + }, + { + "kind": "func", + "name": "RemoveSubAccountRoutes", + "signature": "func (_u *LedgerAccountUpdateOne) RemoveSubAccountRoutes(v ...*LedgerSubAccountRoute) *LedgerAccountUpdateOne", + "line": 426 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerAccountUpdateOne) Where(ps ...predicate.LedgerAccount) *LedgerAccountUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerAccountUpdateOne) Select(field string, fields ...string) *LedgerAccountUpdateOne", + "line": 442 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerAccountUpdateOne) Save(ctx context.Context) (*LedgerAccount, error)", + "line": 448 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerAccountUpdateOne) SaveX(ctx context.Context) *LedgerAccount", + "line": 454 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerAccountUpdateOne) Exec(ctx context.Context) error", + "line": 463 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerAccountUpdateOne) ExecX(ctx context.Context)", + "line": 469 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerAccountUpdateOne) defaults()", + "line": 476 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerAccountUpdateOne) sqlSave(ctx context.Context) (_node *LedgerAccount, err error)", + "line": 483 + } + ], + "line_count": 627 + }, + "openmeter/ent/db/ledgerbreakagerecord.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecord", + "signature": "type LedgerBreakageRecord struct", + "line": 21 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerBreakageRecord) assignValues(columns []string, values []any) error", + "line": 94 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerBreakageRecord) Value(name string) (ent.Value, error)", + "line": 249 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerBreakageRecord) Update() *LedgerBreakageRecordUpdateOne", + "line": 256 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerBreakageRecord) Unwrap() *LedgerBreakageRecord", + "line": 262 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerBreakageRecord) String() string", + "line": 272 + } + ], + "line_count": 355 + }, + "openmeter/ent/db/ledgerbreakagerecord/ledgerbreakagerecord.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 91 + }, + { + "kind": "func", + "name": "KindValidator", + "signature": "func KindValidator(k ledger.BreakageKind) error", + "line": 126 + }, + { + "kind": "func", + "name": "SourceKindValidator", + "signature": "func SourceKindValidator(sk ledger.BreakageSourceKind) error", + "line": 136 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByKind", + "signature": "func ByKind(opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 179 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 184 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 189 + }, + { + "kind": "func", + "name": "ByCreditPriority", + "signature": "func ByCreditPriority(opts ...sql.OrderTermOption) OrderOption", + "line": 194 + }, + { + "kind": "func", + "name": "ByExpiresAt", + "signature": "func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "BySourceKind", + "signature": "func BySourceKind(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "BySourceTransactionGroupID", + "signature": "func BySourceTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "BySourceTransactionID", + "signature": "func BySourceTransactionID(opts ...sql.OrderTermOption) OrderOption", + "line": 214 + }, + { + "kind": "func", + "name": "BySourceEntryID", + "signature": "func BySourceEntryID(opts ...sql.OrderTermOption) OrderOption", + "line": 219 + }, + { + "kind": "func", + "name": "ByBreakageTransactionGroupID", + "signature": "func ByBreakageTransactionGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 224 + }, + { + "kind": "func", + "name": "ByBreakageTransactionID", + "signature": "func ByBreakageTransactionID(opts ...sql.OrderTermOption) OrderOption", + "line": 229 + }, + { + "kind": "func", + "name": "ByFboSubAccountID", + "signature": "func ByFboSubAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 234 + }, + { + "kind": "func", + "name": "ByBreakageSubAccountID", + "signature": "func ByBreakageSubAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 239 + }, + { + "kind": "func", + "name": "ByPlanID", + "signature": "func ByPlanID(opts ...sql.OrderTermOption) OrderOption", + "line": 244 + }, + { + "kind": "func", + "name": "ByReleaseID", + "signature": "func ByReleaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 249 + } + ], + "line_count": 251 + }, + "openmeter/ent/db/ledgerbreakagerecord/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerBreakageRecord", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerBreakageRecord", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerBreakageRecord", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerBreakageRecord", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerBreakageRecord", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerBreakageRecord", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerBreakageRecord", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerBreakageRecord", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerBreakageRecord", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerBreakageRecord", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerBreakageRecord", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerBreakageRecord", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerBreakageRecord", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerBreakageRecord", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerBreakageRecord", + "line": 86 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 91 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.LedgerBreakageRecord", + "line": 96 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 101 + }, + { + "kind": "func", + "name": "CreditPriority", + "signature": "func CreditPriority(v int) predicate.LedgerBreakageRecord", + "line": 107 + }, + { + "kind": "func", + "name": "ExpiresAt", + "signature": "func ExpiresAt(v time.Time) predicate.LedgerBreakageRecord", + "line": 112 + }, + { + "kind": "func", + "name": "SourceTransactionGroupID", + "signature": "func SourceTransactionGroupID(v string) predicate.LedgerBreakageRecord", + "line": 117 + }, + { + "kind": "func", + "name": "SourceTransactionID", + "signature": "func SourceTransactionID(v string) predicate.LedgerBreakageRecord", + "line": 122 + }, + { + "kind": "func", + "name": "SourceEntryID", + "signature": "func SourceEntryID(v string) predicate.LedgerBreakageRecord", + "line": 127 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupID", + "signature": "func BreakageTransactionGroupID(v string) predicate.LedgerBreakageRecord", + "line": 132 + }, + { + "kind": "func", + "name": "BreakageTransactionID", + "signature": "func BreakageTransactionID(v string) predicate.LedgerBreakageRecord", + "line": 137 + }, + { + "kind": "func", + "name": "FboSubAccountID", + "signature": "func FboSubAccountID(v string) predicate.LedgerBreakageRecord", + "line": 142 + }, + { + "kind": "func", + "name": "BreakageSubAccountID", + "signature": "func BreakageSubAccountID(v string) predicate.LedgerBreakageRecord", + "line": 147 + }, + { + "kind": "func", + "name": "PlanID", + "signature": "func PlanID(v string) predicate.LedgerBreakageRecord", + "line": 152 + }, + { + "kind": "func", + "name": "ReleaseID", + "signature": "func ReleaseID(v string) predicate.LedgerBreakageRecord", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerBreakageRecord", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerBreakageRecord", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 172 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 177 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerBreakageRecord", + "line": 182 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerBreakageRecord", + "line": 187 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerBreakageRecord", + "line": 192 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerBreakageRecord", + "line": 197 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerBreakageRecord", + "line": 202 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 207 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 212 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 217 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 222 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerBreakageRecord", + "line": 227 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerBreakageRecord", + "line": 232 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 237 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 242 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 247 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 252 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerBreakageRecord", + "line": 257 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 262 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerBreakageRecord", + "line": 267 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 272 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 277 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 282 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 287 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 292 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerBreakageRecord", + "line": 297 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 302 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerBreakageRecord", + "line": 307 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 312 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 317 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 322 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 327 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 332 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerBreakageRecord", + "line": 337 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 342 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerBreakageRecord", + "line": 347 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 352 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerBreakageRecord", + "line": 357 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerBreakageRecord", + "line": 362 + }, + { + "kind": "func", + "name": "KindEQ", + "signature": "func KindEQ(v ledger.BreakageKind) predicate.LedgerBreakageRecord", + "line": 367 + }, + { + "kind": "func", + "name": "KindNEQ", + "signature": "func KindNEQ(v ledger.BreakageKind) predicate.LedgerBreakageRecord", + "line": 373 + }, + { + "kind": "func", + "name": "KindIn", + "signature": "func KindIn(vs ...ledger.BreakageKind) predicate.LedgerBreakageRecord", + "line": 379 + }, + { + "kind": "func", + "name": "KindNotIn", + "signature": "func KindNotIn(vs ...ledger.BreakageKind) predicate.LedgerBreakageRecord", + "line": 388 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 397 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 402 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 407 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 412 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 417 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 422 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 427 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.LedgerBreakageRecord", + "line": 432 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 437 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 442 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 447 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 452 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.LedgerBreakageRecord", + "line": 457 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 462 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.LedgerBreakageRecord", + "line": 467 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 472 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.LedgerBreakageRecord", + "line": 477 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 482 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 487 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 492 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 497 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 502 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 508 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.LedgerBreakageRecord", + "line": 514 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.LedgerBreakageRecord", + "line": 523 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 532 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 538 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 544 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 550 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 556 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 562 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 568 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 574 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.LedgerBreakageRecord", + "line": 580 + }, + { + "kind": "func", + "name": "CreditPriorityEQ", + "signature": "func CreditPriorityEQ(v int) predicate.LedgerBreakageRecord", + "line": 586 + }, + { + "kind": "func", + "name": "CreditPriorityNEQ", + "signature": "func CreditPriorityNEQ(v int) predicate.LedgerBreakageRecord", + "line": 591 + }, + { + "kind": "func", + "name": "CreditPriorityIn", + "signature": "func CreditPriorityIn(vs ...int) predicate.LedgerBreakageRecord", + "line": 596 + }, + { + "kind": "func", + "name": "CreditPriorityNotIn", + "signature": "func CreditPriorityNotIn(vs ...int) predicate.LedgerBreakageRecord", + "line": 601 + }, + { + "kind": "func", + "name": "CreditPriorityGT", + "signature": "func CreditPriorityGT(v int) predicate.LedgerBreakageRecord", + "line": 606 + }, + { + "kind": "func", + "name": "CreditPriorityGTE", + "signature": "func CreditPriorityGTE(v int) predicate.LedgerBreakageRecord", + "line": 611 + }, + { + "kind": "func", + "name": "CreditPriorityLT", + "signature": "func CreditPriorityLT(v int) predicate.LedgerBreakageRecord", + "line": 616 + }, + { + "kind": "func", + "name": "CreditPriorityLTE", + "signature": "func CreditPriorityLTE(v int) predicate.LedgerBreakageRecord", + "line": 621 + }, + { + "kind": "func", + "name": "ExpiresAtEQ", + "signature": "func ExpiresAtEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 626 + }, + { + "kind": "func", + "name": "ExpiresAtNEQ", + "signature": "func ExpiresAtNEQ(v time.Time) predicate.LedgerBreakageRecord", + "line": 631 + }, + { + "kind": "func", + "name": "ExpiresAtIn", + "signature": "func ExpiresAtIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 636 + }, + { + "kind": "func", + "name": "ExpiresAtNotIn", + "signature": "func ExpiresAtNotIn(vs ...time.Time) predicate.LedgerBreakageRecord", + "line": 641 + }, + { + "kind": "func", + "name": "ExpiresAtGT", + "signature": "func ExpiresAtGT(v time.Time) predicate.LedgerBreakageRecord", + "line": 646 + }, + { + "kind": "func", + "name": "ExpiresAtGTE", + "signature": "func ExpiresAtGTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 651 + }, + { + "kind": "func", + "name": "ExpiresAtLT", + "signature": "func ExpiresAtLT(v time.Time) predicate.LedgerBreakageRecord", + "line": 656 + }, + { + "kind": "func", + "name": "ExpiresAtLTE", + "signature": "func ExpiresAtLTE(v time.Time) predicate.LedgerBreakageRecord", + "line": 661 + }, + { + "kind": "func", + "name": "SourceKindEQ", + "signature": "func SourceKindEQ(v ledger.BreakageSourceKind) predicate.LedgerBreakageRecord", + "line": 666 + }, + { + "kind": "func", + "name": "SourceKindNEQ", + "signature": "func SourceKindNEQ(v ledger.BreakageSourceKind) predicate.LedgerBreakageRecord", + "line": 672 + }, + { + "kind": "func", + "name": "SourceKindIn", + "signature": "func SourceKindIn(vs ...ledger.BreakageSourceKind) predicate.LedgerBreakageRecord", + "line": 678 + }, + { + "kind": "func", + "name": "SourceKindNotIn", + "signature": "func SourceKindNotIn(vs ...ledger.BreakageSourceKind) predicate.LedgerBreakageRecord", + "line": 687 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDEQ", + "signature": "func SourceTransactionGroupIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 696 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDNEQ", + "signature": "func SourceTransactionGroupIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 701 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDIn", + "signature": "func SourceTransactionGroupIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 706 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDNotIn", + "signature": "func SourceTransactionGroupIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 711 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDGT", + "signature": "func SourceTransactionGroupIDGT(v string) predicate.LedgerBreakageRecord", + "line": 716 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDGTE", + "signature": "func SourceTransactionGroupIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 721 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDLT", + "signature": "func SourceTransactionGroupIDLT(v string) predicate.LedgerBreakageRecord", + "line": 726 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDLTE", + "signature": "func SourceTransactionGroupIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 731 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDContains", + "signature": "func SourceTransactionGroupIDContains(v string) predicate.LedgerBreakageRecord", + "line": 736 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDHasPrefix", + "signature": "func SourceTransactionGroupIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 741 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDHasSuffix", + "signature": "func SourceTransactionGroupIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 746 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDIsNil", + "signature": "func SourceTransactionGroupIDIsNil() predicate.LedgerBreakageRecord", + "line": 751 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDNotNil", + "signature": "func SourceTransactionGroupIDNotNil() predicate.LedgerBreakageRecord", + "line": 756 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDEqualFold", + "signature": "func SourceTransactionGroupIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 761 + }, + { + "kind": "func", + "name": "SourceTransactionGroupIDContainsFold", + "signature": "func SourceTransactionGroupIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 766 + }, + { + "kind": "func", + "name": "SourceTransactionIDEQ", + "signature": "func SourceTransactionIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 771 + }, + { + "kind": "func", + "name": "SourceTransactionIDNEQ", + "signature": "func SourceTransactionIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 776 + }, + { + "kind": "func", + "name": "SourceTransactionIDIn", + "signature": "func SourceTransactionIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 781 + }, + { + "kind": "func", + "name": "SourceTransactionIDNotIn", + "signature": "func SourceTransactionIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 786 + }, + { + "kind": "func", + "name": "SourceTransactionIDGT", + "signature": "func SourceTransactionIDGT(v string) predicate.LedgerBreakageRecord", + "line": 791 + }, + { + "kind": "func", + "name": "SourceTransactionIDGTE", + "signature": "func SourceTransactionIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 796 + }, + { + "kind": "func", + "name": "SourceTransactionIDLT", + "signature": "func SourceTransactionIDLT(v string) predicate.LedgerBreakageRecord", + "line": 801 + }, + { + "kind": "func", + "name": "SourceTransactionIDLTE", + "signature": "func SourceTransactionIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 806 + }, + { + "kind": "func", + "name": "SourceTransactionIDContains", + "signature": "func SourceTransactionIDContains(v string) predicate.LedgerBreakageRecord", + "line": 811 + }, + { + "kind": "func", + "name": "SourceTransactionIDHasPrefix", + "signature": "func SourceTransactionIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 816 + }, + { + "kind": "func", + "name": "SourceTransactionIDHasSuffix", + "signature": "func SourceTransactionIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 821 + }, + { + "kind": "func", + "name": "SourceTransactionIDIsNil", + "signature": "func SourceTransactionIDIsNil() predicate.LedgerBreakageRecord", + "line": 826 + }, + { + "kind": "func", + "name": "SourceTransactionIDNotNil", + "signature": "func SourceTransactionIDNotNil() predicate.LedgerBreakageRecord", + "line": 831 + }, + { + "kind": "func", + "name": "SourceTransactionIDEqualFold", + "signature": "func SourceTransactionIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 836 + }, + { + "kind": "func", + "name": "SourceTransactionIDContainsFold", + "signature": "func SourceTransactionIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 841 + }, + { + "kind": "func", + "name": "SourceEntryIDEQ", + "signature": "func SourceEntryIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 846 + }, + { + "kind": "func", + "name": "SourceEntryIDNEQ", + "signature": "func SourceEntryIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 851 + }, + { + "kind": "func", + "name": "SourceEntryIDIn", + "signature": "func SourceEntryIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 856 + }, + { + "kind": "func", + "name": "SourceEntryIDNotIn", + "signature": "func SourceEntryIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 861 + }, + { + "kind": "func", + "name": "SourceEntryIDGT", + "signature": "func SourceEntryIDGT(v string) predicate.LedgerBreakageRecord", + "line": 866 + }, + { + "kind": "func", + "name": "SourceEntryIDGTE", + "signature": "func SourceEntryIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 871 + }, + { + "kind": "func", + "name": "SourceEntryIDLT", + "signature": "func SourceEntryIDLT(v string) predicate.LedgerBreakageRecord", + "line": 876 + }, + { + "kind": "func", + "name": "SourceEntryIDLTE", + "signature": "func SourceEntryIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 881 + }, + { + "kind": "func", + "name": "SourceEntryIDContains", + "signature": "func SourceEntryIDContains(v string) predicate.LedgerBreakageRecord", + "line": 886 + }, + { + "kind": "func", + "name": "SourceEntryIDHasPrefix", + "signature": "func SourceEntryIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 891 + }, + { + "kind": "func", + "name": "SourceEntryIDHasSuffix", + "signature": "func SourceEntryIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 896 + }, + { + "kind": "func", + "name": "SourceEntryIDIsNil", + "signature": "func SourceEntryIDIsNil() predicate.LedgerBreakageRecord", + "line": 901 + }, + { + "kind": "func", + "name": "SourceEntryIDNotNil", + "signature": "func SourceEntryIDNotNil() predicate.LedgerBreakageRecord", + "line": 906 + }, + { + "kind": "func", + "name": "SourceEntryIDEqualFold", + "signature": "func SourceEntryIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 911 + }, + { + "kind": "func", + "name": "SourceEntryIDContainsFold", + "signature": "func SourceEntryIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 916 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDEQ", + "signature": "func BreakageTransactionGroupIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 921 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDNEQ", + "signature": "func BreakageTransactionGroupIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 926 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDIn", + "signature": "func BreakageTransactionGroupIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 931 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDNotIn", + "signature": "func BreakageTransactionGroupIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 936 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDGT", + "signature": "func BreakageTransactionGroupIDGT(v string) predicate.LedgerBreakageRecord", + "line": 941 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDGTE", + "signature": "func BreakageTransactionGroupIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 946 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDLT", + "signature": "func BreakageTransactionGroupIDLT(v string) predicate.LedgerBreakageRecord", + "line": 951 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDLTE", + "signature": "func BreakageTransactionGroupIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 956 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDContains", + "signature": "func BreakageTransactionGroupIDContains(v string) predicate.LedgerBreakageRecord", + "line": 961 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDHasPrefix", + "signature": "func BreakageTransactionGroupIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 966 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDHasSuffix", + "signature": "func BreakageTransactionGroupIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 971 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDEqualFold", + "signature": "func BreakageTransactionGroupIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 976 + }, + { + "kind": "func", + "name": "BreakageTransactionGroupIDContainsFold", + "signature": "func BreakageTransactionGroupIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 981 + }, + { + "kind": "func", + "name": "BreakageTransactionIDEQ", + "signature": "func BreakageTransactionIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 986 + }, + { + "kind": "func", + "name": "BreakageTransactionIDNEQ", + "signature": "func BreakageTransactionIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 991 + }, + { + "kind": "func", + "name": "BreakageTransactionIDIn", + "signature": "func BreakageTransactionIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 996 + }, + { + "kind": "func", + "name": "BreakageTransactionIDNotIn", + "signature": "func BreakageTransactionIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1001 + }, + { + "kind": "func", + "name": "BreakageTransactionIDGT", + "signature": "func BreakageTransactionIDGT(v string) predicate.LedgerBreakageRecord", + "line": 1006 + }, + { + "kind": "func", + "name": "BreakageTransactionIDGTE", + "signature": "func BreakageTransactionIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 1011 + }, + { + "kind": "func", + "name": "BreakageTransactionIDLT", + "signature": "func BreakageTransactionIDLT(v string) predicate.LedgerBreakageRecord", + "line": 1016 + }, + { + "kind": "func", + "name": "BreakageTransactionIDLTE", + "signature": "func BreakageTransactionIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 1021 + }, + { + "kind": "func", + "name": "BreakageTransactionIDContains", + "signature": "func BreakageTransactionIDContains(v string) predicate.LedgerBreakageRecord", + "line": 1026 + }, + { + "kind": "func", + "name": "BreakageTransactionIDHasPrefix", + "signature": "func BreakageTransactionIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 1031 + }, + { + "kind": "func", + "name": "BreakageTransactionIDHasSuffix", + "signature": "func BreakageTransactionIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 1036 + }, + { + "kind": "func", + "name": "BreakageTransactionIDEqualFold", + "signature": "func BreakageTransactionIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 1041 + }, + { + "kind": "func", + "name": "BreakageTransactionIDContainsFold", + "signature": "func BreakageTransactionIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 1046 + }, + { + "kind": "func", + "name": "FboSubAccountIDEQ", + "signature": "func FboSubAccountIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 1051 + }, + { + "kind": "func", + "name": "FboSubAccountIDNEQ", + "signature": "func FboSubAccountIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 1056 + }, + { + "kind": "func", + "name": "FboSubAccountIDIn", + "signature": "func FboSubAccountIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1061 + }, + { + "kind": "func", + "name": "FboSubAccountIDNotIn", + "signature": "func FboSubAccountIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1066 + }, + { + "kind": "func", + "name": "FboSubAccountIDGT", + "signature": "func FboSubAccountIDGT(v string) predicate.LedgerBreakageRecord", + "line": 1071 + }, + { + "kind": "func", + "name": "FboSubAccountIDGTE", + "signature": "func FboSubAccountIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 1076 + }, + { + "kind": "func", + "name": "FboSubAccountIDLT", + "signature": "func FboSubAccountIDLT(v string) predicate.LedgerBreakageRecord", + "line": 1081 + }, + { + "kind": "func", + "name": "FboSubAccountIDLTE", + "signature": "func FboSubAccountIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 1086 + }, + { + "kind": "func", + "name": "FboSubAccountIDContains", + "signature": "func FboSubAccountIDContains(v string) predicate.LedgerBreakageRecord", + "line": 1091 + }, + { + "kind": "func", + "name": "FboSubAccountIDHasPrefix", + "signature": "func FboSubAccountIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 1096 + }, + { + "kind": "func", + "name": "FboSubAccountIDHasSuffix", + "signature": "func FboSubAccountIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 1101 + }, + { + "kind": "func", + "name": "FboSubAccountIDEqualFold", + "signature": "func FboSubAccountIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 1106 + }, + { + "kind": "func", + "name": "FboSubAccountIDContainsFold", + "signature": "func FboSubAccountIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 1111 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDEQ", + "signature": "func BreakageSubAccountIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 1116 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDNEQ", + "signature": "func BreakageSubAccountIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 1121 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDIn", + "signature": "func BreakageSubAccountIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1126 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDNotIn", + "signature": "func BreakageSubAccountIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1131 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDGT", + "signature": "func BreakageSubAccountIDGT(v string) predicate.LedgerBreakageRecord", + "line": 1136 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDGTE", + "signature": "func BreakageSubAccountIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 1141 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDLT", + "signature": "func BreakageSubAccountIDLT(v string) predicate.LedgerBreakageRecord", + "line": 1146 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDLTE", + "signature": "func BreakageSubAccountIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 1151 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDContains", + "signature": "func BreakageSubAccountIDContains(v string) predicate.LedgerBreakageRecord", + "line": 1156 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDHasPrefix", + "signature": "func BreakageSubAccountIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 1161 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDHasSuffix", + "signature": "func BreakageSubAccountIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 1166 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDEqualFold", + "signature": "func BreakageSubAccountIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 1171 + }, + { + "kind": "func", + "name": "BreakageSubAccountIDContainsFold", + "signature": "func BreakageSubAccountIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 1176 + }, + { + "kind": "func", + "name": "PlanIDEQ", + "signature": "func PlanIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 1181 + }, + { + "kind": "func", + "name": "PlanIDNEQ", + "signature": "func PlanIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 1186 + }, + { + "kind": "func", + "name": "PlanIDIn", + "signature": "func PlanIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1191 + }, + { + "kind": "func", + "name": "PlanIDNotIn", + "signature": "func PlanIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1196 + }, + { + "kind": "func", + "name": "PlanIDGT", + "signature": "func PlanIDGT(v string) predicate.LedgerBreakageRecord", + "line": 1201 + }, + { + "kind": "func", + "name": "PlanIDGTE", + "signature": "func PlanIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 1206 + }, + { + "kind": "func", + "name": "PlanIDLT", + "signature": "func PlanIDLT(v string) predicate.LedgerBreakageRecord", + "line": 1211 + }, + { + "kind": "func", + "name": "PlanIDLTE", + "signature": "func PlanIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 1216 + }, + { + "kind": "func", + "name": "PlanIDContains", + "signature": "func PlanIDContains(v string) predicate.LedgerBreakageRecord", + "line": 1221 + }, + { + "kind": "func", + "name": "PlanIDHasPrefix", + "signature": "func PlanIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 1226 + }, + { + "kind": "func", + "name": "PlanIDHasSuffix", + "signature": "func PlanIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 1231 + }, + { + "kind": "func", + "name": "PlanIDIsNil", + "signature": "func PlanIDIsNil() predicate.LedgerBreakageRecord", + "line": 1236 + }, + { + "kind": "func", + "name": "PlanIDNotNil", + "signature": "func PlanIDNotNil() predicate.LedgerBreakageRecord", + "line": 1241 + }, + { + "kind": "func", + "name": "PlanIDEqualFold", + "signature": "func PlanIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 1246 + }, + { + "kind": "func", + "name": "PlanIDContainsFold", + "signature": "func PlanIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 1251 + }, + { + "kind": "func", + "name": "ReleaseIDEQ", + "signature": "func ReleaseIDEQ(v string) predicate.LedgerBreakageRecord", + "line": 1256 + }, + { + "kind": "func", + "name": "ReleaseIDNEQ", + "signature": "func ReleaseIDNEQ(v string) predicate.LedgerBreakageRecord", + "line": 1261 + }, + { + "kind": "func", + "name": "ReleaseIDIn", + "signature": "func ReleaseIDIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1266 + }, + { + "kind": "func", + "name": "ReleaseIDNotIn", + "signature": "func ReleaseIDNotIn(vs ...string) predicate.LedgerBreakageRecord", + "line": 1271 + }, + { + "kind": "func", + "name": "ReleaseIDGT", + "signature": "func ReleaseIDGT(v string) predicate.LedgerBreakageRecord", + "line": 1276 + }, + { + "kind": "func", + "name": "ReleaseIDGTE", + "signature": "func ReleaseIDGTE(v string) predicate.LedgerBreakageRecord", + "line": 1281 + }, + { + "kind": "func", + "name": "ReleaseIDLT", + "signature": "func ReleaseIDLT(v string) predicate.LedgerBreakageRecord", + "line": 1286 + }, + { + "kind": "func", + "name": "ReleaseIDLTE", + "signature": "func ReleaseIDLTE(v string) predicate.LedgerBreakageRecord", + "line": 1291 + }, + { + "kind": "func", + "name": "ReleaseIDContains", + "signature": "func ReleaseIDContains(v string) predicate.LedgerBreakageRecord", + "line": 1296 + }, + { + "kind": "func", + "name": "ReleaseIDHasPrefix", + "signature": "func ReleaseIDHasPrefix(v string) predicate.LedgerBreakageRecord", + "line": 1301 + }, + { + "kind": "func", + "name": "ReleaseIDHasSuffix", + "signature": "func ReleaseIDHasSuffix(v string) predicate.LedgerBreakageRecord", + "line": 1306 + }, + { + "kind": "func", + "name": "ReleaseIDIsNil", + "signature": "func ReleaseIDIsNil() predicate.LedgerBreakageRecord", + "line": 1311 + }, + { + "kind": "func", + "name": "ReleaseIDNotNil", + "signature": "func ReleaseIDNotNil() predicate.LedgerBreakageRecord", + "line": 1316 + }, + { + "kind": "func", + "name": "ReleaseIDEqualFold", + "signature": "func ReleaseIDEqualFold(v string) predicate.LedgerBreakageRecord", + "line": 1321 + }, + { + "kind": "func", + "name": "ReleaseIDContainsFold", + "signature": "func ReleaseIDContainsFold(v string) predicate.LedgerBreakageRecord", + "line": 1326 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerBreakageRecord) predicate.LedgerBreakageRecord", + "line": 1331 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerBreakageRecord) predicate.LedgerBreakageRecord", + "line": 1336 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerBreakageRecord) predicate.LedgerBreakageRecord", + "line": 1341 + } + ], + "line_count": 1343 + }, + "openmeter/ent/db/ledgerbreakagerecord_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecordCreate", + "signature": "type LedgerBreakageRecordCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNamespace(v string) *LedgerBreakageRecordCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerBreakageRecordCreate) SetAnnotations(v models.Annotations) *LedgerBreakageRecordCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetCreatedAt(v time.Time) *LedgerBreakageRecordCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableCreatedAt(v *time.Time) *LedgerBreakageRecordCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetUpdatedAt(v time.Time) *LedgerBreakageRecordCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableUpdatedAt(v *time.Time) *LedgerBreakageRecordCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetDeletedAt(v time.Time) *LedgerBreakageRecordCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableDeletedAt(v *time.Time) *LedgerBreakageRecordCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetKind", + "signature": "func (_c *LedgerBreakageRecordCreate) SetKind(v ledger.BreakageKind) *LedgerBreakageRecordCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *LedgerBreakageRecordCreate) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetCustomerID(v string) *LedgerBreakageRecordCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *LedgerBreakageRecordCreate) SetCurrency(v currencyx.Code) *LedgerBreakageRecordCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetCreditPriority", + "signature": "func (_c *LedgerBreakageRecordCreate) SetCreditPriority(v int) *LedgerBreakageRecordCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetExpiresAt", + "signature": "func (_c *LedgerBreakageRecordCreate) SetExpiresAt(v time.Time) *LedgerBreakageRecordCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetSourceKind", + "signature": "func (_c *LedgerBreakageRecordCreate) SetSourceKind(v ledger.BreakageSourceKind) *LedgerBreakageRecordCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetSourceTransactionGroupID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetSourceTransactionGroupID(v string) *LedgerBreakageRecordCreate", + "line": 127 + }, + { + "kind": "func", + "name": "SetNillableSourceTransactionGroupID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableSourceTransactionGroupID(v *string) *LedgerBreakageRecordCreate", + "line": 133 + }, + { + "kind": "func", + "name": "SetSourceTransactionID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetSourceTransactionID(v string) *LedgerBreakageRecordCreate", + "line": 141 + }, + { + "kind": "func", + "name": "SetNillableSourceTransactionID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableSourceTransactionID(v *string) *LedgerBreakageRecordCreate", + "line": 147 + }, + { + "kind": "func", + "name": "SetSourceEntryID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetSourceEntryID(v string) *LedgerBreakageRecordCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetNillableSourceEntryID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableSourceEntryID(v *string) *LedgerBreakageRecordCreate", + "line": 161 + }, + { + "kind": "func", + "name": "SetBreakageTransactionGroupID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetBreakageTransactionGroupID(v string) *LedgerBreakageRecordCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetBreakageTransactionID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetBreakageTransactionID(v string) *LedgerBreakageRecordCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetFboSubAccountID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetFboSubAccountID(v string) *LedgerBreakageRecordCreate", + "line": 181 + }, + { + "kind": "func", + "name": "SetBreakageSubAccountID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetBreakageSubAccountID(v string) *LedgerBreakageRecordCreate", + "line": 187 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetPlanID(v string) *LedgerBreakageRecordCreate", + "line": 193 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillablePlanID(v *string) *LedgerBreakageRecordCreate", + "line": 199 + }, + { + "kind": "func", + "name": "SetReleaseID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetReleaseID(v string) *LedgerBreakageRecordCreate", + "line": 207 + }, + { + "kind": "func", + "name": "SetNillableReleaseID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableReleaseID(v *string) *LedgerBreakageRecordCreate", + "line": 213 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetID(v string) *LedgerBreakageRecordCreate", + "line": 221 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerBreakageRecordCreate) SetNillableID(v *string) *LedgerBreakageRecordCreate", + "line": 227 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerBreakageRecordCreate) Mutation() *LedgerBreakageRecordMutation", + "line": 235 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerBreakageRecordCreate) Save(ctx context.Context) (*LedgerBreakageRecord, error)", + "line": 240 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerBreakageRecordCreate) SaveX(ctx context.Context) *LedgerBreakageRecord", + "line": 246 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerBreakageRecordCreate) Exec(ctx context.Context) error", + "line": 255 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerBreakageRecordCreate) ExecX(ctx context.Context)", + "line": 261 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerBreakageRecordCreate) defaults()", + "line": 268 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerBreakageRecordCreate) check() error", + "line": 284 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerBreakageRecordCreate) sqlSave(ctx context.Context) (*LedgerBreakageRecord, error)", + "line": 375 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerBreakageRecordCreate) createSpec() (*LedgerBreakageRecord, *sqlgraph.CreateSpec)", + "line": 398 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerBreakageRecordCreate) OnConflict(opts ...sql.ConflictOption) *LedgerBreakageRecordUpsertOne", + "line": 511 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerBreakageRecordCreate) OnConflictColumns(columns ...string) *LedgerBreakageRecordUpsertOne", + "line": 524 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsert) SetAnnotations(v models.Annotations) *LedgerBreakageRecordUpsert", + "line": 545 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsert) UpdateAnnotations() *LedgerBreakageRecordUpsert", + "line": 551 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsert) ClearAnnotations() *LedgerBreakageRecordUpsert", + "line": 557 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsert) SetUpdatedAt(v time.Time) *LedgerBreakageRecordUpsert", + "line": 563 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsert) UpdateUpdatedAt() *LedgerBreakageRecordUpsert", + "line": 569 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsert) SetDeletedAt(v time.Time) *LedgerBreakageRecordUpsert", + "line": 575 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsert) UpdateDeletedAt() *LedgerBreakageRecordUpsert", + "line": 581 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsert) ClearDeletedAt() *LedgerBreakageRecordUpsert", + "line": 587 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *LedgerBreakageRecordUpsert) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordUpsert", + "line": 593 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *LedgerBreakageRecordUpsert) UpdateAmount() *LedgerBreakageRecordUpsert", + "line": 599 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerBreakageRecordUpsertOne) UpdateNewValues() *LedgerBreakageRecordUpsertOne", + "line": 615 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerBreakageRecordUpsertOne) Ignore() *LedgerBreakageRecordUpsertOne", + "line": 682 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerBreakageRecordUpsertOne) DoNothing() *LedgerBreakageRecordUpsertOne", + "line": 689 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerBreakageRecordUpsertOne) Update(set func(*LedgerBreakageRecordUpsert)) *LedgerBreakageRecordUpsertOne", + "line": 696 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertOne) SetAnnotations(v models.Annotations) *LedgerBreakageRecordUpsertOne", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertOne) UpdateAnnotations() *LedgerBreakageRecordUpsertOne", + "line": 711 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertOne) ClearAnnotations() *LedgerBreakageRecordUpsertOne", + "line": 718 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsertOne) SetUpdatedAt(v time.Time) *LedgerBreakageRecordUpsertOne", + "line": 725 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsertOne) UpdateUpdatedAt() *LedgerBreakageRecordUpsertOne", + "line": 732 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertOne) SetDeletedAt(v time.Time) *LedgerBreakageRecordUpsertOne", + "line": 739 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertOne) UpdateDeletedAt() *LedgerBreakageRecordUpsertOne", + "line": 746 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertOne) ClearDeletedAt() *LedgerBreakageRecordUpsertOne", + "line": 753 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *LedgerBreakageRecordUpsertOne) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordUpsertOne", + "line": 760 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *LedgerBreakageRecordUpsertOne) UpdateAmount() *LedgerBreakageRecordUpsertOne", + "line": 767 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerBreakageRecordUpsertOne) Exec(ctx context.Context) error", + "line": 774 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerBreakageRecordUpsertOne) ExecX(ctx context.Context)", + "line": 782 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerBreakageRecordUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 789 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerBreakageRecordUpsertOne) IDX(ctx context.Context) string", + "line": 803 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordCreateBulk", + "signature": "type LedgerBreakageRecordCreateBulk struct", + "line": 812 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) Save(ctx context.Context) ([]*LedgerBreakageRecord, error)", + "line": 820 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) SaveX(ctx context.Context) []*LedgerBreakageRecord", + "line": 876 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) Exec(ctx context.Context) error", + "line": 885 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) ExecX(ctx context.Context)", + "line": 891 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerBreakageRecordUpsertBulk", + "line": 912 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerBreakageRecordCreateBulk) OnConflictColumns(columns ...string) *LedgerBreakageRecordUpsertBulk", + "line": 925 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordUpsertBulk", + "signature": "type LedgerBreakageRecordUpsertBulk struct", + "line": 934 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) UpdateNewValues() *LedgerBreakageRecordUpsertBulk", + "line": 949 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) Ignore() *LedgerBreakageRecordUpsertBulk", + "line": 1018 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) DoNothing() *LedgerBreakageRecordUpsertBulk", + "line": 1025 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) Update(set func(*LedgerBreakageRecordUpsert)) *LedgerBreakageRecordUpsertBulk", + "line": 1032 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) SetAnnotations(v models.Annotations) *LedgerBreakageRecordUpsertBulk", + "line": 1040 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) UpdateAnnotations() *LedgerBreakageRecordUpsertBulk", + "line": 1047 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) ClearAnnotations() *LedgerBreakageRecordUpsertBulk", + "line": 1054 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) SetUpdatedAt(v time.Time) *LedgerBreakageRecordUpsertBulk", + "line": 1061 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) UpdateUpdatedAt() *LedgerBreakageRecordUpsertBulk", + "line": 1068 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) SetDeletedAt(v time.Time) *LedgerBreakageRecordUpsertBulk", + "line": 1075 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) UpdateDeletedAt() *LedgerBreakageRecordUpsertBulk", + "line": 1082 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) ClearDeletedAt() *LedgerBreakageRecordUpsertBulk", + "line": 1089 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordUpsertBulk", + "line": 1096 + }, + { + "kind": "func", + "name": "UpdateAmount", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) UpdateAmount() *LedgerBreakageRecordUpsertBulk", + "line": 1103 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) Exec(ctx context.Context) error", + "line": 1110 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerBreakageRecordUpsertBulk) ExecX(ctx context.Context)", + "line": 1126 + } + ], + "line_count": 1130 + }, + "openmeter/ent/db/ledgerbreakagerecord_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecordDelete", + "signature": "type LedgerBreakageRecordDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerBreakageRecordDelete) Where(ps ...predicate.LedgerBreakageRecord) *LedgerBreakageRecordDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerBreakageRecordDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerBreakageRecordDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerBreakageRecordDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordDeleteOne", + "signature": "type LedgerBreakageRecordDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerBreakageRecordDeleteOne) Where(ps ...predicate.LedgerBreakageRecord) *LedgerBreakageRecordDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerBreakageRecordDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerBreakageRecordDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgerbreakagerecord_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecordQuery", + "signature": "type LedgerBreakageRecordQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerBreakageRecordQuery) Where(ps ...predicate.LedgerBreakageRecord) *LedgerBreakageRecordQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerBreakageRecordQuery) Limit(limit int) *LedgerBreakageRecordQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerBreakageRecordQuery) Offset(offset int) *LedgerBreakageRecordQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerBreakageRecordQuery) Unique(unique bool) *LedgerBreakageRecordQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerBreakageRecordQuery) Order(o ...ledgerbreakagerecord.OrderOption) *LedgerBreakageRecordQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerBreakageRecordQuery) First(ctx context.Context) (*LedgerBreakageRecord, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerBreakageRecordQuery) FirstX(ctx context.Context) *LedgerBreakageRecord", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerBreakageRecordQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerBreakageRecordQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerBreakageRecordQuery) Only(ctx context.Context) (*LedgerBreakageRecord, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerBreakageRecordQuery) OnlyX(ctx context.Context) *LedgerBreakageRecord", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerBreakageRecordQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerBreakageRecordQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerBreakageRecordQuery) All(ctx context.Context) ([]*LedgerBreakageRecord, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerBreakageRecordQuery) AllX(ctx context.Context) []*LedgerBreakageRecord", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerBreakageRecordQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerBreakageRecordQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerBreakageRecordQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerBreakageRecordQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerBreakageRecordQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerBreakageRecordQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerBreakageRecordQuery) Clone() *LedgerBreakageRecordQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerBreakageRecordQuery) GroupBy(field string, fields ...string) *LedgerBreakageRecordGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerBreakageRecordQuery) Select(fields ...string) *LedgerBreakageRecordSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerBreakageRecordQuery) Aggregate(fns ...AggregateFunc) *LedgerBreakageRecordSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerBreakageRecordQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerBreakageRecordQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerBreakageRecord, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerBreakageRecordQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerBreakageRecordQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerBreakageRecordQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerBreakageRecordQuery) ForUpdate(opts ...sql.LockOption) *LedgerBreakageRecordQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerBreakageRecordQuery) ForShare(opts ...sql.LockOption) *LedgerBreakageRecordQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordGroupBy", + "signature": "type LedgerBreakageRecordGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerBreakageRecordGroupBy) Aggregate(fns ...AggregateFunc) *LedgerBreakageRecordGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerBreakageRecordGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerBreakageRecordGroupBy) sqlScan(ctx context.Context, root *LedgerBreakageRecordQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordSelect", + "signature": "type LedgerBreakageRecordSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerBreakageRecordSelect) Aggregate(fns ...AggregateFunc) *LedgerBreakageRecordSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerBreakageRecordSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerBreakageRecordSelect) sqlScan(ctx context.Context, root *LedgerBreakageRecordQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/ledgerbreakagerecord_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecordUpdate", + "signature": "type LedgerBreakageRecordUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerBreakageRecordUpdate) Where(ps ...predicate.LedgerBreakageRecord) *LedgerBreakageRecordUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetAnnotations(v models.Annotations) *LedgerBreakageRecordUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerBreakageRecordUpdate) ClearAnnotations() *LedgerBreakageRecordUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetUpdatedAt(v time.Time) *LedgerBreakageRecordUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetDeletedAt(v time.Time) *LedgerBreakageRecordUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetNillableDeletedAt(v *time.Time) *LedgerBreakageRecordUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdate) ClearDeletedAt() *LedgerBreakageRecordUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *LedgerBreakageRecordUpdate) SetNillableAmount(v *alpacadecimal.Decimal) *LedgerBreakageRecordUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerBreakageRecordUpdate) Mutation() *LedgerBreakageRecordMutation", + "line": 86 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerBreakageRecordUpdate) Save(ctx context.Context) (int, error)", + "line": 91 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerBreakageRecordUpdate) SaveX(ctx context.Context) int", + "line": 97 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerBreakageRecordUpdate) Exec(ctx context.Context) error", + "line": 106 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerBreakageRecordUpdate) ExecX(ctx context.Context)", + "line": 112 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerBreakageRecordUpdate) defaults()", + "line": 119 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerBreakageRecordUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 126 + }, + { + "kind": "struct", + "name": "LedgerBreakageRecordUpdateOne", + "signature": "type LedgerBreakageRecordUpdateOne struct", + "line": 181 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetAnnotations(v models.Annotations) *LedgerBreakageRecordUpdateOne", + "line": 189 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) ClearAnnotations() *LedgerBreakageRecordUpdateOne", + "line": 195 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetUpdatedAt(v time.Time) *LedgerBreakageRecordUpdateOne", + "line": 201 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetDeletedAt(v time.Time) *LedgerBreakageRecordUpdateOne", + "line": 207 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerBreakageRecordUpdateOne", + "line": 213 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) ClearDeletedAt() *LedgerBreakageRecordUpdateOne", + "line": 221 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetAmount(v alpacadecimal.Decimal) *LedgerBreakageRecordUpdateOne", + "line": 227 + }, + { + "kind": "func", + "name": "SetNillableAmount", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SetNillableAmount(v *alpacadecimal.Decimal) *LedgerBreakageRecordUpdateOne", + "line": 233 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) Mutation() *LedgerBreakageRecordMutation", + "line": 241 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) Where(ps ...predicate.LedgerBreakageRecord) *LedgerBreakageRecordUpdateOne", + "line": 246 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) Select(field string, fields ...string) *LedgerBreakageRecordUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) Save(ctx context.Context) (*LedgerBreakageRecord, error)", + "line": 259 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) SaveX(ctx context.Context) *LedgerBreakageRecord", + "line": 265 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) Exec(ctx context.Context) error", + "line": 274 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) ExecX(ctx context.Context)", + "line": 280 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) defaults()", + "line": 287 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerBreakageRecordUpdateOne) sqlSave(ctx context.Context) (_node *LedgerBreakageRecord, err error)", + "line": 294 + } + ], + "line_count": 366 + }, + "openmeter/ent/db/ledgercustomeraccount.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccount", + "signature": "type LedgerCustomerAccount struct", + "line": 17 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerCustomerAccount) assignValues(columns []string, values []any) error", + "line": 56 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerCustomerAccount) Value(name string) (ent.Value, error)", + "line": 120 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerCustomerAccount) Update() *LedgerCustomerAccountUpdateOne", + "line": 127 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerCustomerAccount) Unwrap() *LedgerCustomerAccount", + "line": 133 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerCustomerAccount) String() string", + "line": 143 + } + ], + "line_count": 174 + }, + "openmeter/ent/db/ledgercustomeraccount/ledgercustomeraccount.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 47 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 73 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 78 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 83 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 88 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 93 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 98 + }, + { + "kind": "func", + "name": "ByAccountType", + "signature": "func ByAccountType(opts ...sql.OrderTermOption) OrderOption", + "line": 103 + }, + { + "kind": "func", + "name": "ByAccountID", + "signature": "func ByAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + } + ], + "line_count": 110 + }, + "openmeter/ent/db/ledgercustomeraccount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerCustomerAccount", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerCustomerAccount", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerCustomerAccount", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerCustomerAccount", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerCustomerAccount", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerCustomerAccount", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerCustomerAccount", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerCustomerAccount", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerCustomerAccount", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerCustomerAccount", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerCustomerAccount", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerCustomerAccount", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerCustomerAccount", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerCustomerAccount", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerCustomerAccount", + "line": 84 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.LedgerCustomerAccount", + "line": 89 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func AccountType(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 94 + }, + { + "kind": "func", + "name": "AccountID", + "signature": "func AccountID(v string) predicate.LedgerCustomerAccount", + "line": 100 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerCustomerAccount", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerCustomerAccount", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerCustomerAccount", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerCustomerAccount", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerCustomerAccount", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerCustomerAccount", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerCustomerAccount", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerCustomerAccount", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerCustomerAccount", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerCustomerAccount", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerCustomerAccount", + "line": 165 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 170 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerCustomerAccount", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerCustomerAccount", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 205 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 210 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 215 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerCustomerAccount", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerCustomerAccount", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 245 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 250 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerCustomerAccount", + "line": 255 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerCustomerAccount", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerCustomerAccount", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerCustomerAccount", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerCustomerAccount", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerCustomerAccount", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerCustomerAccount", + "line": 295 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.LedgerCustomerAccount", + "line": 300 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.LedgerCustomerAccount", + "line": 305 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 310 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 315 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.LedgerCustomerAccount", + "line": 320 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.LedgerCustomerAccount", + "line": 325 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.LedgerCustomerAccount", + "line": 330 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.LedgerCustomerAccount", + "line": 335 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.LedgerCustomerAccount", + "line": 340 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.LedgerCustomerAccount", + "line": 345 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.LedgerCustomerAccount", + "line": 350 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.LedgerCustomerAccount", + "line": 355 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.LedgerCustomerAccount", + "line": 360 + }, + { + "kind": "func", + "name": "AccountTypeEQ", + "signature": "func AccountTypeEQ(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 365 + }, + { + "kind": "func", + "name": "AccountTypeNEQ", + "signature": "func AccountTypeNEQ(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 371 + }, + { + "kind": "func", + "name": "AccountTypeIn", + "signature": "func AccountTypeIn(vs ...ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 377 + }, + { + "kind": "func", + "name": "AccountTypeNotIn", + "signature": "func AccountTypeNotIn(vs ...ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 386 + }, + { + "kind": "func", + "name": "AccountTypeGT", + "signature": "func AccountTypeGT(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 395 + }, + { + "kind": "func", + "name": "AccountTypeGTE", + "signature": "func AccountTypeGTE(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 401 + }, + { + "kind": "func", + "name": "AccountTypeLT", + "signature": "func AccountTypeLT(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 407 + }, + { + "kind": "func", + "name": "AccountTypeLTE", + "signature": "func AccountTypeLTE(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 413 + }, + { + "kind": "func", + "name": "AccountTypeContains", + "signature": "func AccountTypeContains(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 419 + }, + { + "kind": "func", + "name": "AccountTypeHasPrefix", + "signature": "func AccountTypeHasPrefix(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 425 + }, + { + "kind": "func", + "name": "AccountTypeHasSuffix", + "signature": "func AccountTypeHasSuffix(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 431 + }, + { + "kind": "func", + "name": "AccountTypeEqualFold", + "signature": "func AccountTypeEqualFold(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 437 + }, + { + "kind": "func", + "name": "AccountTypeContainsFold", + "signature": "func AccountTypeContainsFold(v ledger.AccountType) predicate.LedgerCustomerAccount", + "line": 443 + }, + { + "kind": "func", + "name": "AccountIDEQ", + "signature": "func AccountIDEQ(v string) predicate.LedgerCustomerAccount", + "line": 449 + }, + { + "kind": "func", + "name": "AccountIDNEQ", + "signature": "func AccountIDNEQ(v string) predicate.LedgerCustomerAccount", + "line": 454 + }, + { + "kind": "func", + "name": "AccountIDIn", + "signature": "func AccountIDIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 459 + }, + { + "kind": "func", + "name": "AccountIDNotIn", + "signature": "func AccountIDNotIn(vs ...string) predicate.LedgerCustomerAccount", + "line": 464 + }, + { + "kind": "func", + "name": "AccountIDGT", + "signature": "func AccountIDGT(v string) predicate.LedgerCustomerAccount", + "line": 469 + }, + { + "kind": "func", + "name": "AccountIDGTE", + "signature": "func AccountIDGTE(v string) predicate.LedgerCustomerAccount", + "line": 474 + }, + { + "kind": "func", + "name": "AccountIDLT", + "signature": "func AccountIDLT(v string) predicate.LedgerCustomerAccount", + "line": 479 + }, + { + "kind": "func", + "name": "AccountIDLTE", + "signature": "func AccountIDLTE(v string) predicate.LedgerCustomerAccount", + "line": 484 + }, + { + "kind": "func", + "name": "AccountIDContains", + "signature": "func AccountIDContains(v string) predicate.LedgerCustomerAccount", + "line": 489 + }, + { + "kind": "func", + "name": "AccountIDHasPrefix", + "signature": "func AccountIDHasPrefix(v string) predicate.LedgerCustomerAccount", + "line": 494 + }, + { + "kind": "func", + "name": "AccountIDHasSuffix", + "signature": "func AccountIDHasSuffix(v string) predicate.LedgerCustomerAccount", + "line": 499 + }, + { + "kind": "func", + "name": "AccountIDEqualFold", + "signature": "func AccountIDEqualFold(v string) predicate.LedgerCustomerAccount", + "line": 504 + }, + { + "kind": "func", + "name": "AccountIDContainsFold", + "signature": "func AccountIDContainsFold(v string) predicate.LedgerCustomerAccount", + "line": 509 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerCustomerAccount) predicate.LedgerCustomerAccount", + "line": 514 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerCustomerAccount) predicate.LedgerCustomerAccount", + "line": 519 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerCustomerAccount) predicate.LedgerCustomerAccount", + "line": 524 + } + ], + "line_count": 526 + }, + "openmeter/ent/db/ledgercustomeraccount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccountCreate", + "signature": "type LedgerCustomerAccountCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerCustomerAccountCreate) SetNamespace(v string) *LedgerCustomerAccountCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetCreatedAt(v time.Time) *LedgerCustomerAccountCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetNillableCreatedAt(v *time.Time) *LedgerCustomerAccountCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetUpdatedAt(v time.Time) *LedgerCustomerAccountCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetNillableUpdatedAt(v *time.Time) *LedgerCustomerAccountCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetDeletedAt(v time.Time) *LedgerCustomerAccountCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerCustomerAccountCreate) SetNillableDeletedAt(v *time.Time) *LedgerCustomerAccountCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *LedgerCustomerAccountCreate) SetCustomerID(v string) *LedgerCustomerAccountCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetAccountType", + "signature": "func (_c *LedgerCustomerAccountCreate) SetAccountType(v ledger.AccountType) *LedgerCustomerAccountCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetAccountID", + "signature": "func (_c *LedgerCustomerAccountCreate) SetAccountID(v string) *LedgerCustomerAccountCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerCustomerAccountCreate) SetID(v string) *LedgerCustomerAccountCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerCustomerAccountCreate) SetNillableID(v *string) *LedgerCustomerAccountCreate", + "line": 100 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerCustomerAccountCreate) Mutation() *LedgerCustomerAccountMutation", + "line": 108 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerCustomerAccountCreate) Save(ctx context.Context) (*LedgerCustomerAccount, error)", + "line": 113 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerCustomerAccountCreate) SaveX(ctx context.Context) *LedgerCustomerAccount", + "line": 119 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerCustomerAccountCreate) Exec(ctx context.Context) error", + "line": 128 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerCustomerAccountCreate) ExecX(ctx context.Context)", + "line": 134 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerCustomerAccountCreate) defaults()", + "line": 141 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerCustomerAccountCreate) check() error", + "line": 157 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerCustomerAccountCreate) sqlSave(ctx context.Context) (*LedgerCustomerAccount, error)", + "line": 189 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerCustomerAccountCreate) createSpec() (*LedgerCustomerAccount, *sqlgraph.CreateSpec)", + "line": 212 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerCustomerAccountCreate) OnConflict(opts ...sql.ConflictOption) *LedgerCustomerAccountUpsertOne", + "line": 269 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerCustomerAccountCreate) OnConflictColumns(columns ...string) *LedgerCustomerAccountUpsertOne", + "line": 282 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsert) SetUpdatedAt(v time.Time) *LedgerCustomerAccountUpsert", + "line": 303 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsert) UpdateUpdatedAt() *LedgerCustomerAccountUpsert", + "line": 309 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsert) SetDeletedAt(v time.Time) *LedgerCustomerAccountUpsert", + "line": 315 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsert) UpdateDeletedAt() *LedgerCustomerAccountUpsert", + "line": 321 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsert) ClearDeletedAt() *LedgerCustomerAccountUpsert", + "line": 327 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerCustomerAccountUpsertOne) UpdateNewValues() *LedgerCustomerAccountUpsertOne", + "line": 343 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerCustomerAccountUpsertOne) Ignore() *LedgerCustomerAccountUpsertOne", + "line": 374 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerCustomerAccountUpsertOne) DoNothing() *LedgerCustomerAccountUpsertOne", + "line": 381 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerCustomerAccountUpsertOne) Update(set func(*LedgerCustomerAccountUpsert)) *LedgerCustomerAccountUpsertOne", + "line": 388 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsertOne) SetUpdatedAt(v time.Time) *LedgerCustomerAccountUpsertOne", + "line": 396 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsertOne) UpdateUpdatedAt() *LedgerCustomerAccountUpsertOne", + "line": 403 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertOne) SetDeletedAt(v time.Time) *LedgerCustomerAccountUpsertOne", + "line": 410 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertOne) UpdateDeletedAt() *LedgerCustomerAccountUpsertOne", + "line": 417 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertOne) ClearDeletedAt() *LedgerCustomerAccountUpsertOne", + "line": 424 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerCustomerAccountUpsertOne) Exec(ctx context.Context) error", + "line": 431 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerCustomerAccountUpsertOne) ExecX(ctx context.Context)", + "line": 439 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerCustomerAccountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 446 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerCustomerAccountUpsertOne) IDX(ctx context.Context) string", + "line": 460 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountCreateBulk", + "signature": "type LedgerCustomerAccountCreateBulk struct", + "line": 469 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) Save(ctx context.Context) ([]*LedgerCustomerAccount, error)", + "line": 477 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) SaveX(ctx context.Context) []*LedgerCustomerAccount", + "line": 533 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) Exec(ctx context.Context) error", + "line": 542 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) ExecX(ctx context.Context)", + "line": 548 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerCustomerAccountUpsertBulk", + "line": 569 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerCustomerAccountCreateBulk) OnConflictColumns(columns ...string) *LedgerCustomerAccountUpsertBulk", + "line": 582 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountUpsertBulk", + "signature": "type LedgerCustomerAccountUpsertBulk struct", + "line": 591 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) UpdateNewValues() *LedgerCustomerAccountUpsertBulk", + "line": 606 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) Ignore() *LedgerCustomerAccountUpsertBulk", + "line": 639 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) DoNothing() *LedgerCustomerAccountUpsertBulk", + "line": 646 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) Update(set func(*LedgerCustomerAccountUpsert)) *LedgerCustomerAccountUpsertBulk", + "line": 653 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) SetUpdatedAt(v time.Time) *LedgerCustomerAccountUpsertBulk", + "line": 661 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) UpdateUpdatedAt() *LedgerCustomerAccountUpsertBulk", + "line": 668 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) SetDeletedAt(v time.Time) *LedgerCustomerAccountUpsertBulk", + "line": 675 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) UpdateDeletedAt() *LedgerCustomerAccountUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) ClearDeletedAt() *LedgerCustomerAccountUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) Exec(ctx context.Context) error", + "line": 696 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerCustomerAccountUpsertBulk) ExecX(ctx context.Context)", + "line": 712 + } + ], + "line_count": 716 + }, + "openmeter/ent/db/ledgercustomeraccount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccountDelete", + "signature": "type LedgerCustomerAccountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerCustomerAccountDelete) Where(ps ...predicate.LedgerCustomerAccount) *LedgerCustomerAccountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerCustomerAccountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerCustomerAccountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerCustomerAccountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountDeleteOne", + "signature": "type LedgerCustomerAccountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerCustomerAccountDeleteOne) Where(ps ...predicate.LedgerCustomerAccount) *LedgerCustomerAccountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerCustomerAccountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerCustomerAccountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgercustomeraccount_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccountQuery", + "signature": "type LedgerCustomerAccountQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerCustomerAccountQuery) Where(ps ...predicate.LedgerCustomerAccount) *LedgerCustomerAccountQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerCustomerAccountQuery) Limit(limit int) *LedgerCustomerAccountQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerCustomerAccountQuery) Offset(offset int) *LedgerCustomerAccountQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerCustomerAccountQuery) Unique(unique bool) *LedgerCustomerAccountQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerCustomerAccountQuery) Order(o ...ledgercustomeraccount.OrderOption) *LedgerCustomerAccountQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerCustomerAccountQuery) First(ctx context.Context) (*LedgerCustomerAccount, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerCustomerAccountQuery) FirstX(ctx context.Context) *LedgerCustomerAccount", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerCustomerAccountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerCustomerAccountQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerCustomerAccountQuery) Only(ctx context.Context) (*LedgerCustomerAccount, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerCustomerAccountQuery) OnlyX(ctx context.Context) *LedgerCustomerAccount", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerCustomerAccountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerCustomerAccountQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerCustomerAccountQuery) All(ctx context.Context) ([]*LedgerCustomerAccount, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerCustomerAccountQuery) AllX(ctx context.Context) []*LedgerCustomerAccount", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerCustomerAccountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerCustomerAccountQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerCustomerAccountQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerCustomerAccountQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerCustomerAccountQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerCustomerAccountQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerCustomerAccountQuery) Clone() *LedgerCustomerAccountQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerCustomerAccountQuery) GroupBy(field string, fields ...string) *LedgerCustomerAccountGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerCustomerAccountQuery) Select(fields ...string) *LedgerCustomerAccountSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerCustomerAccountQuery) Aggregate(fns ...AggregateFunc) *LedgerCustomerAccountSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerCustomerAccountQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerCustomerAccountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerCustomerAccount, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerCustomerAccountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerCustomerAccountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerCustomerAccountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerCustomerAccountQuery) ForUpdate(opts ...sql.LockOption) *LedgerCustomerAccountQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerCustomerAccountQuery) ForShare(opts ...sql.LockOption) *LedgerCustomerAccountQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountGroupBy", + "signature": "type LedgerCustomerAccountGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerCustomerAccountGroupBy) Aggregate(fns ...AggregateFunc) *LedgerCustomerAccountGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerCustomerAccountGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerCustomerAccountGroupBy) sqlScan(ctx context.Context, root *LedgerCustomerAccountQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountSelect", + "signature": "type LedgerCustomerAccountSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerCustomerAccountSelect) Aggregate(fns ...AggregateFunc) *LedgerCustomerAccountSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerCustomerAccountSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerCustomerAccountSelect) sqlScan(ctx context.Context, root *LedgerCustomerAccountQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/ledgercustomeraccount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccountUpdate", + "signature": "type LedgerCustomerAccountUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerCustomerAccountUpdate) Where(ps ...predicate.LedgerCustomerAccount) *LedgerCustomerAccountUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerCustomerAccountUpdate) SetUpdatedAt(v time.Time) *LedgerCustomerAccountUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdate) SetDeletedAt(v time.Time) *LedgerCustomerAccountUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdate) SetNillableDeletedAt(v *time.Time) *LedgerCustomerAccountUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdate) ClearDeletedAt() *LedgerCustomerAccountUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerCustomerAccountUpdate) Mutation() *LedgerCustomerAccountMutation", + "line": 58 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerCustomerAccountUpdate) Save(ctx context.Context) (int, error)", + "line": 63 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerCustomerAccountUpdate) SaveX(ctx context.Context) int", + "line": 69 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerCustomerAccountUpdate) Exec(ctx context.Context) error", + "line": 78 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerCustomerAccountUpdate) ExecX(ctx context.Context)", + "line": 84 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerCustomerAccountUpdate) defaults()", + "line": 91 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerCustomerAccountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 98 + }, + { + "kind": "struct", + "name": "LedgerCustomerAccountUpdateOne", + "signature": "type LedgerCustomerAccountUpdateOne struct", + "line": 129 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) SetUpdatedAt(v time.Time) *LedgerCustomerAccountUpdateOne", + "line": 137 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) SetDeletedAt(v time.Time) *LedgerCustomerAccountUpdateOne", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerCustomerAccountUpdateOne", + "line": 149 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) ClearDeletedAt() *LedgerCustomerAccountUpdateOne", + "line": 157 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) Mutation() *LedgerCustomerAccountMutation", + "line": 163 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) Where(ps ...predicate.LedgerCustomerAccount) *LedgerCustomerAccountUpdateOne", + "line": 168 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) Select(field string, fields ...string) *LedgerCustomerAccountUpdateOne", + "line": 175 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) Save(ctx context.Context) (*LedgerCustomerAccount, error)", + "line": 181 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) SaveX(ctx context.Context) *LedgerCustomerAccount", + "line": 187 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) Exec(ctx context.Context) error", + "line": 196 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) ExecX(ctx context.Context)", + "line": 202 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) defaults()", + "line": 209 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerCustomerAccountUpdateOne) sqlSave(ctx context.Context) (_node *LedgerCustomerAccount, err error)", + "line": 216 + } + ], + "line_count": 264 + }, + "openmeter/ent/db/ledgerentry.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntry", + "signature": "type LedgerEntry struct", + "line": 21 + }, + { + "kind": "struct", + "name": "LedgerEntryEdges", + "signature": "type LedgerEntryEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "TransactionOrErr", + "signature": "func (e LedgerEntryEdges) TransactionOrErr() (*LedgerTransaction, error)", + "line": 62 + }, + { + "kind": "func", + "name": "SubAccountOrErr", + "signature": "func (e LedgerEntryEdges) SubAccountOrErr() (*LedgerSubAccount, error)", + "line": 73 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerEntry) assignValues(columns []string, values []any) error", + "line": 104 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerEntry) Value(name string) (ent.Value, error)", + "line": 182 + }, + { + "kind": "func", + "name": "QueryTransaction", + "signature": "func (_m *LedgerEntry) QueryTransaction() *LedgerTransactionQuery", + "line": 187 + }, + { + "kind": "func", + "name": "QuerySubAccount", + "signature": "func (_m *LedgerEntry) QuerySubAccount() *LedgerSubAccountQuery", + "line": 192 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerEntry) Update() *LedgerEntryUpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerEntry) Unwrap() *LedgerEntry", + "line": 205 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerEntry) String() string", + "line": 215 + } + ], + "line_count": 252 + }, + "openmeter/ent/db/ledgerentry/ledgerentry.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 72 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 100 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 110 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "BySubAccountID", + "signature": "func BySubAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByIdentityKey", + "signature": "func ByIdentityKey(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByAmount", + "signature": "func ByAmount(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByTransactionID", + "signature": "func ByTransactionID(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByTransactionField", + "signature": "func ByTransactionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "BySubAccountField", + "signature": "func BySubAccountField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 152 + }, + { + "kind": "func", + "name": "newTransactionStep", + "signature": "func newTransactionStep() *sqlgraph.Step", + "line": 157 + }, + { + "kind": "func", + "name": "newSubAccountStep", + "signature": "func newSubAccountStep() *sqlgraph.Step", + "line": 164 + } + ], + "line_count": 170 + }, + "openmeter/ent/db/ledgerentry/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerEntry", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerEntry", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerEntry", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerEntry", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerEntry", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerEntry", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerEntry", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerEntry", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerEntry", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerEntry", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerEntry", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerEntry", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerEntry", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerEntry", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerEntry", + "line": 85 + }, + { + "kind": "func", + "name": "SubAccountID", + "signature": "func SubAccountID(v string) predicate.LedgerEntry", + "line": 90 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func IdentityKey(v string) predicate.LedgerEntry", + "line": 95 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func Amount(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 100 + }, + { + "kind": "func", + "name": "TransactionID", + "signature": "func TransactionID(v string) predicate.LedgerEntry", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerEntry", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerEntry", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerEntry", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerEntry", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerEntry", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerEntry", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerEntry", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerEntry", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerEntry", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerEntry", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerEntry", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerEntry", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerEntry", + "line": 170 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerEntry", + "line": 175 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerEntry", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerEntry", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerEntry", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerEntry", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerEntry", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerEntry", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerEntry", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerEntry", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerEntry", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerEntry", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerEntry", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerEntry", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerEntry", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerEntry", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerEntry", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerEntry", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerEntry", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerEntry", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerEntry", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerEntry", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerEntry", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerEntry", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerEntry", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerEntry", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerEntry", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerEntry", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerEntry", + "line": 310 + }, + { + "kind": "func", + "name": "SubAccountIDEQ", + "signature": "func SubAccountIDEQ(v string) predicate.LedgerEntry", + "line": 315 + }, + { + "kind": "func", + "name": "SubAccountIDNEQ", + "signature": "func SubAccountIDNEQ(v string) predicate.LedgerEntry", + "line": 320 + }, + { + "kind": "func", + "name": "SubAccountIDIn", + "signature": "func SubAccountIDIn(vs ...string) predicate.LedgerEntry", + "line": 325 + }, + { + "kind": "func", + "name": "SubAccountIDNotIn", + "signature": "func SubAccountIDNotIn(vs ...string) predicate.LedgerEntry", + "line": 330 + }, + { + "kind": "func", + "name": "SubAccountIDGT", + "signature": "func SubAccountIDGT(v string) predicate.LedgerEntry", + "line": 335 + }, + { + "kind": "func", + "name": "SubAccountIDGTE", + "signature": "func SubAccountIDGTE(v string) predicate.LedgerEntry", + "line": 340 + }, + { + "kind": "func", + "name": "SubAccountIDLT", + "signature": "func SubAccountIDLT(v string) predicate.LedgerEntry", + "line": 345 + }, + { + "kind": "func", + "name": "SubAccountIDLTE", + "signature": "func SubAccountIDLTE(v string) predicate.LedgerEntry", + "line": 350 + }, + { + "kind": "func", + "name": "SubAccountIDContains", + "signature": "func SubAccountIDContains(v string) predicate.LedgerEntry", + "line": 355 + }, + { + "kind": "func", + "name": "SubAccountIDHasPrefix", + "signature": "func SubAccountIDHasPrefix(v string) predicate.LedgerEntry", + "line": 360 + }, + { + "kind": "func", + "name": "SubAccountIDHasSuffix", + "signature": "func SubAccountIDHasSuffix(v string) predicate.LedgerEntry", + "line": 365 + }, + { + "kind": "func", + "name": "SubAccountIDEqualFold", + "signature": "func SubAccountIDEqualFold(v string) predicate.LedgerEntry", + "line": 370 + }, + { + "kind": "func", + "name": "SubAccountIDContainsFold", + "signature": "func SubAccountIDContainsFold(v string) predicate.LedgerEntry", + "line": 375 + }, + { + "kind": "func", + "name": "IdentityKeyEQ", + "signature": "func IdentityKeyEQ(v string) predicate.LedgerEntry", + "line": 380 + }, + { + "kind": "func", + "name": "IdentityKeyNEQ", + "signature": "func IdentityKeyNEQ(v string) predicate.LedgerEntry", + "line": 385 + }, + { + "kind": "func", + "name": "IdentityKeyIn", + "signature": "func IdentityKeyIn(vs ...string) predicate.LedgerEntry", + "line": 390 + }, + { + "kind": "func", + "name": "IdentityKeyNotIn", + "signature": "func IdentityKeyNotIn(vs ...string) predicate.LedgerEntry", + "line": 395 + }, + { + "kind": "func", + "name": "IdentityKeyGT", + "signature": "func IdentityKeyGT(v string) predicate.LedgerEntry", + "line": 400 + }, + { + "kind": "func", + "name": "IdentityKeyGTE", + "signature": "func IdentityKeyGTE(v string) predicate.LedgerEntry", + "line": 405 + }, + { + "kind": "func", + "name": "IdentityKeyLT", + "signature": "func IdentityKeyLT(v string) predicate.LedgerEntry", + "line": 410 + }, + { + "kind": "func", + "name": "IdentityKeyLTE", + "signature": "func IdentityKeyLTE(v string) predicate.LedgerEntry", + "line": 415 + }, + { + "kind": "func", + "name": "IdentityKeyContains", + "signature": "func IdentityKeyContains(v string) predicate.LedgerEntry", + "line": 420 + }, + { + "kind": "func", + "name": "IdentityKeyHasPrefix", + "signature": "func IdentityKeyHasPrefix(v string) predicate.LedgerEntry", + "line": 425 + }, + { + "kind": "func", + "name": "IdentityKeyHasSuffix", + "signature": "func IdentityKeyHasSuffix(v string) predicate.LedgerEntry", + "line": 430 + }, + { + "kind": "func", + "name": "IdentityKeyEqualFold", + "signature": "func IdentityKeyEqualFold(v string) predicate.LedgerEntry", + "line": 435 + }, + { + "kind": "func", + "name": "IdentityKeyContainsFold", + "signature": "func IdentityKeyContainsFold(v string) predicate.LedgerEntry", + "line": 440 + }, + { + "kind": "func", + "name": "AmountEQ", + "signature": "func AmountEQ(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 445 + }, + { + "kind": "func", + "name": "AmountNEQ", + "signature": "func AmountNEQ(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 450 + }, + { + "kind": "func", + "name": "AmountIn", + "signature": "func AmountIn(vs ...alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 455 + }, + { + "kind": "func", + "name": "AmountNotIn", + "signature": "func AmountNotIn(vs ...alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 460 + }, + { + "kind": "func", + "name": "AmountGT", + "signature": "func AmountGT(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 465 + }, + { + "kind": "func", + "name": "AmountGTE", + "signature": "func AmountGTE(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 470 + }, + { + "kind": "func", + "name": "AmountLT", + "signature": "func AmountLT(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 475 + }, + { + "kind": "func", + "name": "AmountLTE", + "signature": "func AmountLTE(v alpacadecimal.Decimal) predicate.LedgerEntry", + "line": 480 + }, + { + "kind": "func", + "name": "TransactionIDEQ", + "signature": "func TransactionIDEQ(v string) predicate.LedgerEntry", + "line": 485 + }, + { + "kind": "func", + "name": "TransactionIDNEQ", + "signature": "func TransactionIDNEQ(v string) predicate.LedgerEntry", + "line": 490 + }, + { + "kind": "func", + "name": "TransactionIDIn", + "signature": "func TransactionIDIn(vs ...string) predicate.LedgerEntry", + "line": 495 + }, + { + "kind": "func", + "name": "TransactionIDNotIn", + "signature": "func TransactionIDNotIn(vs ...string) predicate.LedgerEntry", + "line": 500 + }, + { + "kind": "func", + "name": "TransactionIDGT", + "signature": "func TransactionIDGT(v string) predicate.LedgerEntry", + "line": 505 + }, + { + "kind": "func", + "name": "TransactionIDGTE", + "signature": "func TransactionIDGTE(v string) predicate.LedgerEntry", + "line": 510 + }, + { + "kind": "func", + "name": "TransactionIDLT", + "signature": "func TransactionIDLT(v string) predicate.LedgerEntry", + "line": 515 + }, + { + "kind": "func", + "name": "TransactionIDLTE", + "signature": "func TransactionIDLTE(v string) predicate.LedgerEntry", + "line": 520 + }, + { + "kind": "func", + "name": "TransactionIDContains", + "signature": "func TransactionIDContains(v string) predicate.LedgerEntry", + "line": 525 + }, + { + "kind": "func", + "name": "TransactionIDHasPrefix", + "signature": "func TransactionIDHasPrefix(v string) predicate.LedgerEntry", + "line": 530 + }, + { + "kind": "func", + "name": "TransactionIDHasSuffix", + "signature": "func TransactionIDHasSuffix(v string) predicate.LedgerEntry", + "line": 535 + }, + { + "kind": "func", + "name": "TransactionIDEqualFold", + "signature": "func TransactionIDEqualFold(v string) predicate.LedgerEntry", + "line": 540 + }, + { + "kind": "func", + "name": "TransactionIDContainsFold", + "signature": "func TransactionIDContainsFold(v string) predicate.LedgerEntry", + "line": 545 + }, + { + "kind": "func", + "name": "HasTransaction", + "signature": "func HasTransaction() predicate.LedgerEntry", + "line": 550 + }, + { + "kind": "func", + "name": "HasTransactionWith", + "signature": "func HasTransactionWith(preds ...predicate.LedgerTransaction) predicate.LedgerEntry", + "line": 561 + }, + { + "kind": "func", + "name": "HasSubAccount", + "signature": "func HasSubAccount() predicate.LedgerEntry", + "line": 573 + }, + { + "kind": "func", + "name": "HasSubAccountWith", + "signature": "func HasSubAccountWith(preds ...predicate.LedgerSubAccount) predicate.LedgerEntry", + "line": 584 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerEntry) predicate.LedgerEntry", + "line": 596 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerEntry) predicate.LedgerEntry", + "line": 601 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerEntry) predicate.LedgerEntry", + "line": 606 + } + ], + "line_count": 608 + }, + "openmeter/ent/db/ledgerentry_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntryCreate", + "signature": "type LedgerEntryCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerEntryCreate) SetNamespace(v string) *LedgerEntryCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerEntryCreate) SetAnnotations(v models.Annotations) *LedgerEntryCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerEntryCreate) SetCreatedAt(v time.Time) *LedgerEntryCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerEntryCreate) SetNillableCreatedAt(v *time.Time) *LedgerEntryCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerEntryCreate) SetUpdatedAt(v time.Time) *LedgerEntryCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerEntryCreate) SetNillableUpdatedAt(v *time.Time) *LedgerEntryCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerEntryCreate) SetDeletedAt(v time.Time) *LedgerEntryCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerEntryCreate) SetNillableDeletedAt(v *time.Time) *LedgerEntryCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetSubAccountID", + "signature": "func (_c *LedgerEntryCreate) SetSubAccountID(v string) *LedgerEntryCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetIdentityKey", + "signature": "func (_c *LedgerEntryCreate) SetIdentityKey(v string) *LedgerEntryCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetNillableIdentityKey", + "signature": "func (_c *LedgerEntryCreate) SetNillableIdentityKey(v *string) *LedgerEntryCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetAmount", + "signature": "func (_c *LedgerEntryCreate) SetAmount(v alpacadecimal.Decimal) *LedgerEntryCreate", + "line": 105 + }, + { + "kind": "func", + "name": "SetTransactionID", + "signature": "func (_c *LedgerEntryCreate) SetTransactionID(v string) *LedgerEntryCreate", + "line": 111 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerEntryCreate) SetID(v string) *LedgerEntryCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerEntryCreate) SetNillableID(v *string) *LedgerEntryCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetTransaction", + "signature": "func (_c *LedgerEntryCreate) SetTransaction(v *LedgerTransaction) *LedgerEntryCreate", + "line": 131 + }, + { + "kind": "func", + "name": "SetSubAccount", + "signature": "func (_c *LedgerEntryCreate) SetSubAccount(v *LedgerSubAccount) *LedgerEntryCreate", + "line": 136 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerEntryCreate) Mutation() *LedgerEntryMutation", + "line": 141 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerEntryCreate) Save(ctx context.Context) (*LedgerEntry, error)", + "line": 146 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerEntryCreate) SaveX(ctx context.Context) *LedgerEntry", + "line": 152 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerEntryCreate) Exec(ctx context.Context) error", + "line": 161 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerEntryCreate) ExecX(ctx context.Context)", + "line": 167 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerEntryCreate) defaults()", + "line": 174 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerEntryCreate) check() error", + "line": 194 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerEntryCreate) sqlSave(ctx context.Context) (*LedgerEntry, error)", + "line": 230 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerEntryCreate) createSpec() (*LedgerEntry, *sqlgraph.CreateSpec)", + "line": 253 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerEntryCreate) OnConflict(opts ...sql.ConflictOption) *LedgerEntryUpsertOne", + "line": 344 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerEntryCreate) OnConflictColumns(columns ...string) *LedgerEntryUpsertOne", + "line": 357 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerEntryUpsert) SetAnnotations(v models.Annotations) *LedgerEntryUpsert", + "line": 378 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerEntryUpsert) UpdateAnnotations() *LedgerEntryUpsert", + "line": 384 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerEntryUpsert) ClearAnnotations() *LedgerEntryUpsert", + "line": 390 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerEntryUpsert) SetUpdatedAt(v time.Time) *LedgerEntryUpsert", + "line": 396 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerEntryUpsert) UpdateUpdatedAt() *LedgerEntryUpsert", + "line": 402 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerEntryUpsert) SetDeletedAt(v time.Time) *LedgerEntryUpsert", + "line": 408 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerEntryUpsert) UpdateDeletedAt() *LedgerEntryUpsert", + "line": 414 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerEntryUpsert) ClearDeletedAt() *LedgerEntryUpsert", + "line": 420 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerEntryUpsertOne) UpdateNewValues() *LedgerEntryUpsertOne", + "line": 436 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerEntryUpsertOne) Ignore() *LedgerEntryUpsertOne", + "line": 470 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerEntryUpsertOne) DoNothing() *LedgerEntryUpsertOne", + "line": 477 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerEntryUpsertOne) Update(set func(*LedgerEntryUpsert)) *LedgerEntryUpsertOne", + "line": 484 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerEntryUpsertOne) SetAnnotations(v models.Annotations) *LedgerEntryUpsertOne", + "line": 492 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerEntryUpsertOne) UpdateAnnotations() *LedgerEntryUpsertOne", + "line": 499 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerEntryUpsertOne) ClearAnnotations() *LedgerEntryUpsertOne", + "line": 506 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerEntryUpsertOne) SetUpdatedAt(v time.Time) *LedgerEntryUpsertOne", + "line": 513 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerEntryUpsertOne) UpdateUpdatedAt() *LedgerEntryUpsertOne", + "line": 520 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerEntryUpsertOne) SetDeletedAt(v time.Time) *LedgerEntryUpsertOne", + "line": 527 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerEntryUpsertOne) UpdateDeletedAt() *LedgerEntryUpsertOne", + "line": 534 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerEntryUpsertOne) ClearDeletedAt() *LedgerEntryUpsertOne", + "line": 541 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerEntryUpsertOne) Exec(ctx context.Context) error", + "line": 548 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerEntryUpsertOne) ExecX(ctx context.Context)", + "line": 556 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerEntryUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 563 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerEntryUpsertOne) IDX(ctx context.Context) string", + "line": 577 + }, + { + "kind": "struct", + "name": "LedgerEntryCreateBulk", + "signature": "type LedgerEntryCreateBulk struct", + "line": 586 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerEntryCreateBulk) Save(ctx context.Context) ([]*LedgerEntry, error)", + "line": 594 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerEntryCreateBulk) SaveX(ctx context.Context) []*LedgerEntry", + "line": 650 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerEntryCreateBulk) Exec(ctx context.Context) error", + "line": 659 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerEntryCreateBulk) ExecX(ctx context.Context)", + "line": 665 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerEntryCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerEntryUpsertBulk", + "line": 686 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerEntryCreateBulk) OnConflictColumns(columns ...string) *LedgerEntryUpsertBulk", + "line": 699 + }, + { + "kind": "struct", + "name": "LedgerEntryUpsertBulk", + "signature": "type LedgerEntryUpsertBulk struct", + "line": 708 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerEntryUpsertBulk) UpdateNewValues() *LedgerEntryUpsertBulk", + "line": 723 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerEntryUpsertBulk) Ignore() *LedgerEntryUpsertBulk", + "line": 759 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerEntryUpsertBulk) DoNothing() *LedgerEntryUpsertBulk", + "line": 766 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerEntryUpsertBulk) Update(set func(*LedgerEntryUpsert)) *LedgerEntryUpsertBulk", + "line": 773 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerEntryUpsertBulk) SetAnnotations(v models.Annotations) *LedgerEntryUpsertBulk", + "line": 781 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerEntryUpsertBulk) UpdateAnnotations() *LedgerEntryUpsertBulk", + "line": 788 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerEntryUpsertBulk) ClearAnnotations() *LedgerEntryUpsertBulk", + "line": 795 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerEntryUpsertBulk) SetUpdatedAt(v time.Time) *LedgerEntryUpsertBulk", + "line": 802 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerEntryUpsertBulk) UpdateUpdatedAt() *LedgerEntryUpsertBulk", + "line": 809 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerEntryUpsertBulk) SetDeletedAt(v time.Time) *LedgerEntryUpsertBulk", + "line": 816 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerEntryUpsertBulk) UpdateDeletedAt() *LedgerEntryUpsertBulk", + "line": 823 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerEntryUpsertBulk) ClearDeletedAt() *LedgerEntryUpsertBulk", + "line": 830 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerEntryUpsertBulk) Exec(ctx context.Context) error", + "line": 837 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerEntryUpsertBulk) ExecX(ctx context.Context)", + "line": 853 + } + ], + "line_count": 857 + }, + "openmeter/ent/db/ledgerentry_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntryDelete", + "signature": "type LedgerEntryDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerEntryDelete) Where(ps ...predicate.LedgerEntry) *LedgerEntryDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerEntryDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerEntryDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerEntryDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerEntryDeleteOne", + "signature": "type LedgerEntryDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerEntryDeleteOne) Where(ps ...predicate.LedgerEntry) *LedgerEntryDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerEntryDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerEntryDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgerentry_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntryQuery", + "signature": "type LedgerEntryQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerEntryQuery) Where(ps ...predicate.LedgerEntry) *LedgerEntryQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerEntryQuery) Limit(limit int) *LedgerEntryQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerEntryQuery) Offset(offset int) *LedgerEntryQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerEntryQuery) Unique(unique bool) *LedgerEntryQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerEntryQuery) Order(o ...ledgerentry.OrderOption) *LedgerEntryQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryTransaction", + "signature": "func (_q *LedgerEntryQuery) QueryTransaction() *LedgerTransactionQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QuerySubAccount", + "signature": "func (_q *LedgerEntryQuery) QuerySubAccount() *LedgerSubAccountQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerEntryQuery) First(ctx context.Context) (*LedgerEntry, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerEntryQuery) FirstX(ctx context.Context) *LedgerEntry", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerEntryQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerEntryQuery) FirstIDX(ctx context.Context) string", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerEntryQuery) Only(ctx context.Context) (*LedgerEntry, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerEntryQuery) OnlyX(ctx context.Context) *LedgerEntry", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerEntryQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerEntryQuery) OnlyIDX(ctx context.Context) string", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerEntryQuery) All(ctx context.Context) ([]*LedgerEntry, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerEntryQuery) AllX(ctx context.Context) []*LedgerEntry", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerEntryQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerEntryQuery) IDsX(ctx context.Context) []string", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerEntryQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerEntryQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerEntryQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerEntryQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerEntryQuery) Clone() *LedgerEntryQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithTransaction", + "signature": "func (_q *LedgerEntryQuery) WithTransaction(opts ...func(*LedgerTransactionQuery)) *LedgerEntryQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithSubAccount", + "signature": "func (_q *LedgerEntryQuery) WithSubAccount(opts ...func(*LedgerSubAccountQuery)) *LedgerEntryQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerEntryQuery) GroupBy(field string, fields ...string) *LedgerEntryGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerEntryQuery) Select(fields ...string) *LedgerEntrySelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerEntryQuery) Aggregate(fns ...AggregateFunc) *LedgerEntrySelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerEntryQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerEntryQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerEntry, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadTransaction", + "signature": "func (_q *LedgerEntryQuery) loadTransaction(ctx context.Context, query *LedgerTransactionQuery, nodes []*LedgerEntry, init func(*LedgerEntry), assign func(*LedgerEntry, *LedgerTransaction)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadSubAccount", + "signature": "func (_q *LedgerEntryQuery) loadSubAccount(ctx context.Context, query *LedgerSubAccountQuery, nodes []*LedgerEntry, init func(*LedgerEntry), assign func(*LedgerEntry, *LedgerSubAccount)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerEntryQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerEntryQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerEntryQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerEntryQuery) ForUpdate(opts ...sql.LockOption) *LedgerEntryQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerEntryQuery) ForShare(opts ...sql.LockOption) *LedgerEntryQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "LedgerEntryGroupBy", + "signature": "type LedgerEntryGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerEntryGroupBy) Aggregate(fns ...AggregateFunc) *LedgerEntryGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerEntryGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerEntryGroupBy) sqlScan(ctx context.Context, root *LedgerEntryQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "LedgerEntrySelect", + "signature": "type LedgerEntrySelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerEntrySelect) Aggregate(fns ...AggregateFunc) *LedgerEntrySelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerEntrySelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerEntrySelect) sqlScan(ctx context.Context, root *LedgerEntryQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/ledgerentry_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntryUpdate", + "signature": "type LedgerEntryUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerEntryUpdate) Where(ps ...predicate.LedgerEntry) *LedgerEntryUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerEntryUpdate) SetAnnotations(v models.Annotations) *LedgerEntryUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerEntryUpdate) ClearAnnotations() *LedgerEntryUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerEntryUpdate) SetUpdatedAt(v time.Time) *LedgerEntryUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerEntryUpdate) SetDeletedAt(v time.Time) *LedgerEntryUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerEntryUpdate) SetNillableDeletedAt(v *time.Time) *LedgerEntryUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerEntryUpdate) ClearDeletedAt() *LedgerEntryUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerEntryUpdate) Mutation() *LedgerEntryMutation", + "line": 71 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerEntryUpdate) Save(ctx context.Context) (int, error)", + "line": 76 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerEntryUpdate) SaveX(ctx context.Context) int", + "line": 82 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerEntryUpdate) Exec(ctx context.Context) error", + "line": 91 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerEntryUpdate) ExecX(ctx context.Context)", + "line": 97 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerEntryUpdate) defaults()", + "line": 104 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerEntryUpdate) check() error", + "line": 112 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerEntryUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 122 + }, + { + "kind": "struct", + "name": "LedgerEntryUpdateOne", + "signature": "type LedgerEntryUpdateOne struct", + "line": 162 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerEntryUpdateOne) SetAnnotations(v models.Annotations) *LedgerEntryUpdateOne", + "line": 170 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerEntryUpdateOne) ClearAnnotations() *LedgerEntryUpdateOne", + "line": 176 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerEntryUpdateOne) SetUpdatedAt(v time.Time) *LedgerEntryUpdateOne", + "line": 182 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerEntryUpdateOne) SetDeletedAt(v time.Time) *LedgerEntryUpdateOne", + "line": 188 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerEntryUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerEntryUpdateOne", + "line": 194 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerEntryUpdateOne) ClearDeletedAt() *LedgerEntryUpdateOne", + "line": 202 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerEntryUpdateOne) Mutation() *LedgerEntryMutation", + "line": 208 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerEntryUpdateOne) Where(ps ...predicate.LedgerEntry) *LedgerEntryUpdateOne", + "line": 213 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerEntryUpdateOne) Select(field string, fields ...string) *LedgerEntryUpdateOne", + "line": 220 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerEntryUpdateOne) Save(ctx context.Context) (*LedgerEntry, error)", + "line": 226 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerEntryUpdateOne) SaveX(ctx context.Context) *LedgerEntry", + "line": 232 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerEntryUpdateOne) Exec(ctx context.Context) error", + "line": 241 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerEntryUpdateOne) ExecX(ctx context.Context)", + "line": 247 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerEntryUpdateOne) defaults()", + "line": 254 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerEntryUpdateOne) check() error", + "line": 262 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerEntryUpdateOne) sqlSave(ctx context.Context) (_node *LedgerEntry, err error)", + "line": 272 + } + ], + "line_count": 329 + }, + "openmeter/ent/db/ledgersubaccount.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccount", + "signature": "type LedgerSubAccount struct", + "line": 20 + }, + { + "kind": "struct", + "name": "LedgerSubAccountEdges", + "signature": "type LedgerSubAccountEdges struct", + "line": 45 + }, + { + "kind": "func", + "name": "AccountOrErr", + "signature": "func (e LedgerSubAccountEdges) AccountOrErr() (*LedgerAccount, error)", + "line": 59 + }, + { + "kind": "func", + "name": "RouteOrErr", + "signature": "func (e LedgerSubAccountEdges) RouteOrErr() (*LedgerSubAccountRoute, error)", + "line": 70 + }, + { + "kind": "func", + "name": "EntriesOrErr", + "signature": "func (e LedgerSubAccountEdges) EntriesOrErr() ([]*LedgerEntry, error)", + "line": 81 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerSubAccount) assignValues(columns []string, values []any) error", + "line": 108 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerSubAccount) Value(name string) (ent.Value, error)", + "line": 174 + }, + { + "kind": "func", + "name": "QueryAccount", + "signature": "func (_m *LedgerSubAccount) QueryAccount() *LedgerAccountQuery", + "line": 179 + }, + { + "kind": "func", + "name": "QueryRoute", + "signature": "func (_m *LedgerSubAccount) QueryRoute() *LedgerSubAccountRouteQuery", + "line": 184 + }, + { + "kind": "func", + "name": "QueryEntries", + "signature": "func (_m *LedgerSubAccount) QueryEntries() *LedgerEntryQuery", + "line": 189 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerSubAccount) Update() *LedgerSubAccountUpdateOne", + "line": 196 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerSubAccount) Unwrap() *LedgerSubAccount", + "line": 202 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerSubAccount) String() string", + "line": 212 + } + ], + "line_count": 243 + }, + "openmeter/ent/db/ledgersubaccount/ledgersubaccount.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 101 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 106 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 111 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 116 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 121 + }, + { + "kind": "func", + "name": "ByAccountID", + "signature": "func ByAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByRouteID", + "signature": "func ByRouteID(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByAccountField", + "signature": "func ByAccountField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "ByRouteField", + "signature": "func ByRouteField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByEntriesCount", + "signature": "func ByEntriesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByEntries", + "signature": "func ByEntries(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 157 + }, + { + "kind": "func", + "name": "newAccountStep", + "signature": "func newAccountStep() *sqlgraph.Step", + "line": 162 + }, + { + "kind": "func", + "name": "newRouteStep", + "signature": "func newRouteStep() *sqlgraph.Step", + "line": 169 + }, + { + "kind": "func", + "name": "newEntriesStep", + "signature": "func newEntriesStep() *sqlgraph.Step", + "line": 176 + } + ], + "line_count": 182 + }, + "openmeter/ent/db/ledgersubaccount/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerSubAccount", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerSubAccount", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerSubAccount", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerSubAccount", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerSubAccount", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerSubAccount", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerSubAccount", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerSubAccount", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerSubAccount", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerSubAccount", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerSubAccount", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerSubAccount", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerSubAccount", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerSubAccount", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerSubAccount", + "line": 84 + }, + { + "kind": "func", + "name": "AccountID", + "signature": "func AccountID(v string) predicate.LedgerSubAccount", + "line": 89 + }, + { + "kind": "func", + "name": "RouteID", + "signature": "func RouteID(v string) predicate.LedgerSubAccount", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerSubAccount", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerSubAccount", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerSubAccount", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerSubAccount", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerSubAccount", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerSubAccount", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerSubAccount", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerSubAccount", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerSubAccount", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerSubAccount", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerSubAccount", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerSubAccount", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerSubAccount", + "line": 159 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerSubAccount", + "line": 164 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerSubAccount", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerSubAccount", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerSubAccount", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerSubAccount", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerSubAccount", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerSubAccount", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerSubAccount", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerSubAccount", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerSubAccount", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerSubAccount", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerSubAccount", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerSubAccount", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerSubAccount", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerSubAccount", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerSubAccount", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerSubAccount", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerSubAccount", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerSubAccount", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerSubAccount", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerSubAccount", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerSubAccount", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerSubAccount", + "line": 299 + }, + { + "kind": "func", + "name": "AccountIDEQ", + "signature": "func AccountIDEQ(v string) predicate.LedgerSubAccount", + "line": 304 + }, + { + "kind": "func", + "name": "AccountIDNEQ", + "signature": "func AccountIDNEQ(v string) predicate.LedgerSubAccount", + "line": 309 + }, + { + "kind": "func", + "name": "AccountIDIn", + "signature": "func AccountIDIn(vs ...string) predicate.LedgerSubAccount", + "line": 314 + }, + { + "kind": "func", + "name": "AccountIDNotIn", + "signature": "func AccountIDNotIn(vs ...string) predicate.LedgerSubAccount", + "line": 319 + }, + { + "kind": "func", + "name": "AccountIDGT", + "signature": "func AccountIDGT(v string) predicate.LedgerSubAccount", + "line": 324 + }, + { + "kind": "func", + "name": "AccountIDGTE", + "signature": "func AccountIDGTE(v string) predicate.LedgerSubAccount", + "line": 329 + }, + { + "kind": "func", + "name": "AccountIDLT", + "signature": "func AccountIDLT(v string) predicate.LedgerSubAccount", + "line": 334 + }, + { + "kind": "func", + "name": "AccountIDLTE", + "signature": "func AccountIDLTE(v string) predicate.LedgerSubAccount", + "line": 339 + }, + { + "kind": "func", + "name": "AccountIDContains", + "signature": "func AccountIDContains(v string) predicate.LedgerSubAccount", + "line": 344 + }, + { + "kind": "func", + "name": "AccountIDHasPrefix", + "signature": "func AccountIDHasPrefix(v string) predicate.LedgerSubAccount", + "line": 349 + }, + { + "kind": "func", + "name": "AccountIDHasSuffix", + "signature": "func AccountIDHasSuffix(v string) predicate.LedgerSubAccount", + "line": 354 + }, + { + "kind": "func", + "name": "AccountIDEqualFold", + "signature": "func AccountIDEqualFold(v string) predicate.LedgerSubAccount", + "line": 359 + }, + { + "kind": "func", + "name": "AccountIDContainsFold", + "signature": "func AccountIDContainsFold(v string) predicate.LedgerSubAccount", + "line": 364 + }, + { + "kind": "func", + "name": "RouteIDEQ", + "signature": "func RouteIDEQ(v string) predicate.LedgerSubAccount", + "line": 369 + }, + { + "kind": "func", + "name": "RouteIDNEQ", + "signature": "func RouteIDNEQ(v string) predicate.LedgerSubAccount", + "line": 374 + }, + { + "kind": "func", + "name": "RouteIDIn", + "signature": "func RouteIDIn(vs ...string) predicate.LedgerSubAccount", + "line": 379 + }, + { + "kind": "func", + "name": "RouteIDNotIn", + "signature": "func RouteIDNotIn(vs ...string) predicate.LedgerSubAccount", + "line": 384 + }, + { + "kind": "func", + "name": "RouteIDGT", + "signature": "func RouteIDGT(v string) predicate.LedgerSubAccount", + "line": 389 + }, + { + "kind": "func", + "name": "RouteIDGTE", + "signature": "func RouteIDGTE(v string) predicate.LedgerSubAccount", + "line": 394 + }, + { + "kind": "func", + "name": "RouteIDLT", + "signature": "func RouteIDLT(v string) predicate.LedgerSubAccount", + "line": 399 + }, + { + "kind": "func", + "name": "RouteIDLTE", + "signature": "func RouteIDLTE(v string) predicate.LedgerSubAccount", + "line": 404 + }, + { + "kind": "func", + "name": "RouteIDContains", + "signature": "func RouteIDContains(v string) predicate.LedgerSubAccount", + "line": 409 + }, + { + "kind": "func", + "name": "RouteIDHasPrefix", + "signature": "func RouteIDHasPrefix(v string) predicate.LedgerSubAccount", + "line": 414 + }, + { + "kind": "func", + "name": "RouteIDHasSuffix", + "signature": "func RouteIDHasSuffix(v string) predicate.LedgerSubAccount", + "line": 419 + }, + { + "kind": "func", + "name": "RouteIDEqualFold", + "signature": "func RouteIDEqualFold(v string) predicate.LedgerSubAccount", + "line": 424 + }, + { + "kind": "func", + "name": "RouteIDContainsFold", + "signature": "func RouteIDContainsFold(v string) predicate.LedgerSubAccount", + "line": 429 + }, + { + "kind": "func", + "name": "HasAccount", + "signature": "func HasAccount() predicate.LedgerSubAccount", + "line": 434 + }, + { + "kind": "func", + "name": "HasAccountWith", + "signature": "func HasAccountWith(preds ...predicate.LedgerAccount) predicate.LedgerSubAccount", + "line": 445 + }, + { + "kind": "func", + "name": "HasRoute", + "signature": "func HasRoute() predicate.LedgerSubAccount", + "line": 457 + }, + { + "kind": "func", + "name": "HasRouteWith", + "signature": "func HasRouteWith(preds ...predicate.LedgerSubAccountRoute) predicate.LedgerSubAccount", + "line": 468 + }, + { + "kind": "func", + "name": "HasEntries", + "signature": "func HasEntries() predicate.LedgerSubAccount", + "line": 480 + }, + { + "kind": "func", + "name": "HasEntriesWith", + "signature": "func HasEntriesWith(preds ...predicate.LedgerEntry) predicate.LedgerSubAccount", + "line": 491 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerSubAccount) predicate.LedgerSubAccount", + "line": 503 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerSubAccount) predicate.LedgerSubAccount", + "line": 508 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerSubAccount) predicate.LedgerSubAccount", + "line": 513 + } + ], + "line_count": 515 + }, + "openmeter/ent/db/ledgersubaccount_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountCreate", + "signature": "type LedgerSubAccountCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerSubAccountCreate) SetNamespace(v string) *LedgerSubAccountCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerSubAccountCreate) SetAnnotations(v models.Annotations) *LedgerSubAccountCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetCreatedAt(v time.Time) *LedgerSubAccountCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetNillableCreatedAt(v *time.Time) *LedgerSubAccountCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetUpdatedAt(v time.Time) *LedgerSubAccountCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetNillableUpdatedAt(v *time.Time) *LedgerSubAccountCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetDeletedAt(v time.Time) *LedgerSubAccountCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerSubAccountCreate) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetAccountID", + "signature": "func (_c *LedgerSubAccountCreate) SetAccountID(v string) *LedgerSubAccountCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetRouteID", + "signature": "func (_c *LedgerSubAccountCreate) SetRouteID(v string) *LedgerSubAccountCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerSubAccountCreate) SetID(v string) *LedgerSubAccountCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerSubAccountCreate) SetNillableID(v *string) *LedgerSubAccountCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetAccount", + "signature": "func (_c *LedgerSubAccountCreate) SetAccount(v *LedgerAccount) *LedgerSubAccountCreate", + "line": 111 + }, + { + "kind": "func", + "name": "SetRoute", + "signature": "func (_c *LedgerSubAccountCreate) SetRoute(v *LedgerSubAccountRoute) *LedgerSubAccountCreate", + "line": 116 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_c *LedgerSubAccountCreate) AddEntryIDs(ids ...string) *LedgerSubAccountCreate", + "line": 121 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_c *LedgerSubAccountCreate) AddEntries(v ...*LedgerEntry) *LedgerSubAccountCreate", + "line": 127 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerSubAccountCreate) Mutation() *LedgerSubAccountMutation", + "line": 136 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerSubAccountCreate) Save(ctx context.Context) (*LedgerSubAccount, error)", + "line": 141 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerSubAccountCreate) SaveX(ctx context.Context) *LedgerSubAccount", + "line": 147 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerSubAccountCreate) Exec(ctx context.Context) error", + "line": 156 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerSubAccountCreate) ExecX(ctx context.Context)", + "line": 162 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerSubAccountCreate) defaults()", + "line": 169 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerSubAccountCreate) check() error", + "line": 185 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerSubAccountCreate) sqlSave(ctx context.Context) (*LedgerSubAccount, error)", + "line": 215 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerSubAccountCreate) createSpec() (*LedgerSubAccount, *sqlgraph.CreateSpec)", + "line": 238 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerSubAccountCreate) OnConflict(opts ...sql.ConflictOption) *LedgerSubAccountUpsertOne", + "line": 337 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerSubAccountCreate) OnConflictColumns(columns ...string) *LedgerSubAccountUpsertOne", + "line": 350 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerSubAccountUpsert) SetAnnotations(v models.Annotations) *LedgerSubAccountUpsert", + "line": 371 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerSubAccountUpsert) UpdateAnnotations() *LedgerSubAccountUpsert", + "line": 377 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerSubAccountUpsert) ClearAnnotations() *LedgerSubAccountUpsert", + "line": 383 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsert) SetUpdatedAt(v time.Time) *LedgerSubAccountUpsert", + "line": 389 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsert) UpdateUpdatedAt() *LedgerSubAccountUpsert", + "line": 395 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountUpsert) SetDeletedAt(v time.Time) *LedgerSubAccountUpsert", + "line": 401 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountUpsert) UpdateDeletedAt() *LedgerSubAccountUpsert", + "line": 407 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountUpsert) ClearDeletedAt() *LedgerSubAccountUpsert", + "line": 413 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerSubAccountUpsertOne) UpdateNewValues() *LedgerSubAccountUpsertOne", + "line": 429 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerSubAccountUpsertOne) Ignore() *LedgerSubAccountUpsertOne", + "line": 457 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerSubAccountUpsertOne) DoNothing() *LedgerSubAccountUpsertOne", + "line": 464 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerSubAccountUpsertOne) Update(set func(*LedgerSubAccountUpsert)) *LedgerSubAccountUpsertOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerSubAccountUpsertOne) SetAnnotations(v models.Annotations) *LedgerSubAccountUpsertOne", + "line": 479 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerSubAccountUpsertOne) UpdateAnnotations() *LedgerSubAccountUpsertOne", + "line": 486 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerSubAccountUpsertOne) ClearAnnotations() *LedgerSubAccountUpsertOne", + "line": 493 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsertOne) SetUpdatedAt(v time.Time) *LedgerSubAccountUpsertOne", + "line": 500 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsertOne) UpdateUpdatedAt() *LedgerSubAccountUpsertOne", + "line": 507 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertOne) SetDeletedAt(v time.Time) *LedgerSubAccountUpsertOne", + "line": 514 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertOne) UpdateDeletedAt() *LedgerSubAccountUpsertOne", + "line": 521 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertOne) ClearDeletedAt() *LedgerSubAccountUpsertOne", + "line": 528 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerSubAccountUpsertOne) Exec(ctx context.Context) error", + "line": 535 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerSubAccountUpsertOne) ExecX(ctx context.Context)", + "line": 543 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerSubAccountUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 550 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerSubAccountUpsertOne) IDX(ctx context.Context) string", + "line": 564 + }, + { + "kind": "struct", + "name": "LedgerSubAccountCreateBulk", + "signature": "type LedgerSubAccountCreateBulk struct", + "line": 573 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerSubAccountCreateBulk) Save(ctx context.Context) ([]*LedgerSubAccount, error)", + "line": 581 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerSubAccountCreateBulk) SaveX(ctx context.Context) []*LedgerSubAccount", + "line": 637 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerSubAccountCreateBulk) Exec(ctx context.Context) error", + "line": 646 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerSubAccountCreateBulk) ExecX(ctx context.Context)", + "line": 652 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerSubAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerSubAccountUpsertBulk", + "line": 673 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerSubAccountCreateBulk) OnConflictColumns(columns ...string) *LedgerSubAccountUpsertBulk", + "line": 686 + }, + { + "kind": "struct", + "name": "LedgerSubAccountUpsertBulk", + "signature": "type LedgerSubAccountUpsertBulk struct", + "line": 695 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerSubAccountUpsertBulk) UpdateNewValues() *LedgerSubAccountUpsertBulk", + "line": 710 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerSubAccountUpsertBulk) Ignore() *LedgerSubAccountUpsertBulk", + "line": 740 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerSubAccountUpsertBulk) DoNothing() *LedgerSubAccountUpsertBulk", + "line": 747 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerSubAccountUpsertBulk) Update(set func(*LedgerSubAccountUpsert)) *LedgerSubAccountUpsertBulk", + "line": 754 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerSubAccountUpsertBulk) SetAnnotations(v models.Annotations) *LedgerSubAccountUpsertBulk", + "line": 762 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerSubAccountUpsertBulk) UpdateAnnotations() *LedgerSubAccountUpsertBulk", + "line": 769 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerSubAccountUpsertBulk) ClearAnnotations() *LedgerSubAccountUpsertBulk", + "line": 776 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsertBulk) SetUpdatedAt(v time.Time) *LedgerSubAccountUpsertBulk", + "line": 783 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountUpsertBulk) UpdateUpdatedAt() *LedgerSubAccountUpsertBulk", + "line": 790 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertBulk) SetDeletedAt(v time.Time) *LedgerSubAccountUpsertBulk", + "line": 797 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertBulk) UpdateDeletedAt() *LedgerSubAccountUpsertBulk", + "line": 804 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountUpsertBulk) ClearDeletedAt() *LedgerSubAccountUpsertBulk", + "line": 811 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerSubAccountUpsertBulk) Exec(ctx context.Context) error", + "line": 818 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerSubAccountUpsertBulk) ExecX(ctx context.Context)", + "line": 834 + } + ], + "line_count": 838 + }, + "openmeter/ent/db/ledgersubaccount_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountDelete", + "signature": "type LedgerSubAccountDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerSubAccountDelete) Where(ps ...predicate.LedgerSubAccount) *LedgerSubAccountDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerSubAccountDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerSubAccountDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerSubAccountDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerSubAccountDeleteOne", + "signature": "type LedgerSubAccountDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerSubAccountDeleteOne) Where(ps ...predicate.LedgerSubAccount) *LedgerSubAccountDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerSubAccountDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerSubAccountDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgersubaccount_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountQuery", + "signature": "type LedgerSubAccountQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerSubAccountQuery) Where(ps ...predicate.LedgerSubAccount) *LedgerSubAccountQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerSubAccountQuery) Limit(limit int) *LedgerSubAccountQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerSubAccountQuery) Offset(offset int) *LedgerSubAccountQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerSubAccountQuery) Unique(unique bool) *LedgerSubAccountQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerSubAccountQuery) Order(o ...ledgersubaccount.OrderOption) *LedgerSubAccountQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryAccount", + "signature": "func (_q *LedgerSubAccountQuery) QueryAccount() *LedgerAccountQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryRoute", + "signature": "func (_q *LedgerSubAccountQuery) QueryRoute() *LedgerSubAccountRouteQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QueryEntries", + "signature": "func (_q *LedgerSubAccountQuery) QueryEntries() *LedgerEntryQuery", + "line": 115 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerSubAccountQuery) First(ctx context.Context) (*LedgerSubAccount, error)", + "line": 138 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerSubAccountQuery) FirstX(ctx context.Context) *LedgerSubAccount", + "line": 150 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerSubAccountQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerSubAccountQuery) FirstIDX(ctx context.Context) string", + "line": 173 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerSubAccountQuery) Only(ctx context.Context) (*LedgerSubAccount, error)", + "line": 184 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerSubAccountQuery) OnlyX(ctx context.Context) *LedgerSubAccount", + "line": 200 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerSubAccountQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerSubAccountQuery) OnlyIDX(ctx context.Context) string", + "line": 228 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerSubAccountQuery) All(ctx context.Context) ([]*LedgerSubAccount, error)", + "line": 237 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerSubAccountQuery) AllX(ctx context.Context) []*LedgerSubAccount", + "line": 247 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerSubAccountQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerSubAccountQuery) IDsX(ctx context.Context) []string", + "line": 268 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerSubAccountQuery) Count(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerSubAccountQuery) CountX(ctx context.Context) int", + "line": 286 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerSubAccountQuery) Exist(ctx context.Context) (bool, error)", + "line": 295 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerSubAccountQuery) ExistX(ctx context.Context) bool", + "line": 308 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerSubAccountQuery) Clone() *LedgerSubAccountQuery", + "line": 318 + }, + { + "kind": "func", + "name": "WithAccount", + "signature": "func (_q *LedgerSubAccountQuery) WithAccount(opts ...func(*LedgerAccountQuery)) *LedgerSubAccountQuery", + "line": 339 + }, + { + "kind": "func", + "name": "WithRoute", + "signature": "func (_q *LedgerSubAccountQuery) WithRoute(opts ...func(*LedgerSubAccountRouteQuery)) *LedgerSubAccountQuery", + "line": 350 + }, + { + "kind": "func", + "name": "WithEntries", + "signature": "func (_q *LedgerSubAccountQuery) WithEntries(opts ...func(*LedgerEntryQuery)) *LedgerSubAccountQuery", + "line": 361 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerSubAccountQuery) GroupBy(field string, fields ...string) *LedgerSubAccountGroupBy", + "line": 384 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerSubAccountQuery) Select(fields ...string) *LedgerSubAccountSelect", + "line": 405 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerSubAccountQuery) Aggregate(fns ...AggregateFunc) *LedgerSubAccountSelect", + "line": 414 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerSubAccountQuery) prepareQuery(ctx context.Context) error", + "line": 418 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerSubAccountQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerSubAccount, error)", + "line": 444 + }, + { + "kind": "func", + "name": "loadAccount", + "signature": "func (_q *LedgerSubAccountQuery) loadAccount(ctx context.Context, query *LedgerAccountQuery, nodes []*LedgerSubAccount, init func(*LedgerSubAccount), assign func(*LedgerSubAccount, *LedgerAccount)) error", + "line": 497 + }, + { + "kind": "func", + "name": "loadRoute", + "signature": "func (_q *LedgerSubAccountQuery) loadRoute(ctx context.Context, query *LedgerSubAccountRouteQuery, nodes []*LedgerSubAccount, init func(*LedgerSubAccount), assign func(*LedgerSubAccount, *LedgerSubAccountRoute)) error", + "line": 526 + }, + { + "kind": "func", + "name": "loadEntries", + "signature": "func (_q *LedgerSubAccountQuery) loadEntries(ctx context.Context, query *LedgerEntryQuery, nodes []*LedgerSubAccount, init func(*LedgerSubAccount), assign func(*LedgerSubAccount, *LedgerEntry)) error", + "line": 555 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerSubAccountQuery) sqlCount(ctx context.Context) (int, error)", + "line": 586 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerSubAccountQuery) querySpec() *sqlgraph.QuerySpec", + "line": 598 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerSubAccountQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 644 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerSubAccountQuery) ForUpdate(opts ...sql.LockOption) *LedgerSubAccountQuery", + "line": 682 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerSubAccountQuery) ForShare(opts ...sql.LockOption) *LedgerSubAccountQuery", + "line": 695 + }, + { + "kind": "struct", + "name": "LedgerSubAccountGroupBy", + "signature": "type LedgerSubAccountGroupBy struct", + "line": 706 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerSubAccountGroupBy) Aggregate(fns ...AggregateFunc) *LedgerSubAccountGroupBy", + "line": 712 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerSubAccountGroupBy) Scan(ctx context.Context, v any) error", + "line": 718 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerSubAccountGroupBy) sqlScan(ctx context.Context, root *LedgerSubAccountQuery, v any) error", + "line": 726 + }, + { + "kind": "struct", + "name": "LedgerSubAccountSelect", + "signature": "type LedgerSubAccountSelect struct", + "line": 754 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerSubAccountSelect) Aggregate(fns ...AggregateFunc) *LedgerSubAccountSelect", + "line": 760 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerSubAccountSelect) Scan(ctx context.Context, v any) error", + "line": 766 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerSubAccountSelect) sqlScan(ctx context.Context, root *LedgerSubAccountQuery, v any) error", + "line": 774 + } + ], + "line_count": 793 + }, + "openmeter/ent/db/ledgersubaccount_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountUpdate", + "signature": "type LedgerSubAccountUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerSubAccountUpdate) Where(ps ...predicate.LedgerSubAccount) *LedgerSubAccountUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerSubAccountUpdate) SetAnnotations(v models.Annotations) *LedgerSubAccountUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerSubAccountUpdate) ClearAnnotations() *LedgerSubAccountUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerSubAccountUpdate) SetUpdatedAt(v time.Time) *LedgerSubAccountUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdate) SetDeletedAt(v time.Time) *LedgerSubAccountUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdate) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdate) ClearDeletedAt() *LedgerSubAccountUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_u *LedgerSubAccountUpdate) AddEntryIDs(ids ...string) *LedgerSubAccountUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_u *LedgerSubAccountUpdate) AddEntries(v ...*LedgerEntry) *LedgerSubAccountUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerSubAccountUpdate) Mutation() *LedgerSubAccountMutation", + "line": 87 + }, + { + "kind": "func", + "name": "ClearEntries", + "signature": "func (_u *LedgerSubAccountUpdate) ClearEntries() *LedgerSubAccountUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "RemoveEntryIDs", + "signature": "func (_u *LedgerSubAccountUpdate) RemoveEntryIDs(ids ...string) *LedgerSubAccountUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "RemoveEntries", + "signature": "func (_u *LedgerSubAccountUpdate) RemoveEntries(v ...*LedgerEntry) *LedgerSubAccountUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerSubAccountUpdate) Save(ctx context.Context) (int, error)", + "line": 113 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerSubAccountUpdate) SaveX(ctx context.Context) int", + "line": 119 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerSubAccountUpdate) Exec(ctx context.Context) error", + "line": 128 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerSubAccountUpdate) ExecX(ctx context.Context)", + "line": 134 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerSubAccountUpdate) defaults()", + "line": 141 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerSubAccountUpdate) check() error", + "line": 149 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerSubAccountUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 159 + }, + { + "kind": "struct", + "name": "LedgerSubAccountUpdateOne", + "signature": "type LedgerSubAccountUpdateOne struct", + "line": 244 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerSubAccountUpdateOne) SetAnnotations(v models.Annotations) *LedgerSubAccountUpdateOne", + "line": 252 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerSubAccountUpdateOne) ClearAnnotations() *LedgerSubAccountUpdateOne", + "line": 258 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerSubAccountUpdateOne) SetUpdatedAt(v time.Time) *LedgerSubAccountUpdateOne", + "line": 264 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdateOne) SetDeletedAt(v time.Time) *LedgerSubAccountUpdateOne", + "line": 270 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountUpdateOne", + "line": 276 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerSubAccountUpdateOne) ClearDeletedAt() *LedgerSubAccountUpdateOne", + "line": 284 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_u *LedgerSubAccountUpdateOne) AddEntryIDs(ids ...string) *LedgerSubAccountUpdateOne", + "line": 290 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_u *LedgerSubAccountUpdateOne) AddEntries(v ...*LedgerEntry) *LedgerSubAccountUpdateOne", + "line": 296 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerSubAccountUpdateOne) Mutation() *LedgerSubAccountMutation", + "line": 305 + }, + { + "kind": "func", + "name": "ClearEntries", + "signature": "func (_u *LedgerSubAccountUpdateOne) ClearEntries() *LedgerSubAccountUpdateOne", + "line": 310 + }, + { + "kind": "func", + "name": "RemoveEntryIDs", + "signature": "func (_u *LedgerSubAccountUpdateOne) RemoveEntryIDs(ids ...string) *LedgerSubAccountUpdateOne", + "line": 316 + }, + { + "kind": "func", + "name": "RemoveEntries", + "signature": "func (_u *LedgerSubAccountUpdateOne) RemoveEntries(v ...*LedgerEntry) *LedgerSubAccountUpdateOne", + "line": 322 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerSubAccountUpdateOne) Where(ps ...predicate.LedgerSubAccount) *LedgerSubAccountUpdateOne", + "line": 331 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerSubAccountUpdateOne) Select(field string, fields ...string) *LedgerSubAccountUpdateOne", + "line": 338 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerSubAccountUpdateOne) Save(ctx context.Context) (*LedgerSubAccount, error)", + "line": 344 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerSubAccountUpdateOne) SaveX(ctx context.Context) *LedgerSubAccount", + "line": 350 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerSubAccountUpdateOne) Exec(ctx context.Context) error", + "line": 359 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerSubAccountUpdateOne) ExecX(ctx context.Context)", + "line": 365 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerSubAccountUpdateOne) defaults()", + "line": 372 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerSubAccountUpdateOne) check() error", + "line": 380 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerSubAccountUpdateOne) sqlSave(ctx context.Context) (_node *LedgerSubAccount, err error)", + "line": 390 + } + ], + "line_count": 492 + }, + "openmeter/ent/db/ledgersubaccountroute.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountRoute", + "signature": "type LedgerSubAccountRoute struct", + "line": 20 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteEdges", + "signature": "type LedgerSubAccountRouteEdges struct", + "line": 59 + }, + { + "kind": "func", + "name": "AccountOrErr", + "signature": "func (e LedgerSubAccountRouteEdges) AccountOrErr() (*LedgerAccount, error)", + "line": 71 + }, + { + "kind": "func", + "name": "SubAccountsOrErr", + "signature": "func (e LedgerSubAccountRouteEdges) SubAccountsOrErr() ([]*LedgerSubAccount, error)", + "line": 82 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerSubAccountRoute) assignValues(columns []string, values []any) error", + "line": 113 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerSubAccountRoute) Value(name string) (ent.Value, error)", + "line": 224 + }, + { + "kind": "func", + "name": "QueryAccount", + "signature": "func (_m *LedgerSubAccountRoute) QueryAccount() *LedgerAccountQuery", + "line": 229 + }, + { + "kind": "func", + "name": "QuerySubAccounts", + "signature": "func (_m *LedgerSubAccountRoute) QuerySubAccounts() *LedgerSubAccountQuery", + "line": 234 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerSubAccountRoute) Update() *LedgerSubAccountRouteUpdateOne", + "line": 241 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerSubAccountRoute) Unwrap() *LedgerSubAccountRoute", + "line": 247 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerSubAccountRoute) String() string", + "line": 257 + } + ], + "line_count": 319 + }, + "openmeter/ent/db/ledgersubaccountroute/ledgersubaccountroute.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 87 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "ByAccountID", + "signature": "func ByAccountID(opts ...sql.OrderTermOption) OrderOption", + "line": 138 + }, + { + "kind": "func", + "name": "ByRoutingKeyVersion", + "signature": "func ByRoutingKeyVersion(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByRoutingKey", + "signature": "func ByRoutingKey(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "ByTaxCode", + "signature": "func ByTaxCode(opts ...sql.OrderTermOption) OrderOption", + "line": 158 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "ByFeatures", + "signature": "func ByFeatures(opts ...sql.OrderTermOption) OrderOption", + "line": 168 + }, + { + "kind": "func", + "name": "ByCostBasis", + "signature": "func ByCostBasis(opts ...sql.OrderTermOption) OrderOption", + "line": 173 + }, + { + "kind": "func", + "name": "ByCreditPriority", + "signature": "func ByCreditPriority(opts ...sql.OrderTermOption) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByTransactionAuthorizationStatus", + "signature": "func ByTransactionAuthorizationStatus(opts ...sql.OrderTermOption) OrderOption", + "line": 183 + }, + { + "kind": "func", + "name": "ByAccountField", + "signature": "func ByAccountField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 188 + }, + { + "kind": "func", + "name": "BySubAccountsCount", + "signature": "func BySubAccountsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "BySubAccounts", + "signature": "func BySubAccounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 202 + }, + { + "kind": "func", + "name": "newAccountStep", + "signature": "func newAccountStep() *sqlgraph.Step", + "line": 207 + }, + { + "kind": "func", + "name": "newSubAccountsStep", + "signature": "func newSubAccountsStep() *sqlgraph.Step", + "line": 214 + } + ], + "line_count": 220 + }, + "openmeter/ent/db/ledgersubaccountroute/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerSubAccountRoute", + "line": 17 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerSubAccountRoute", + "line": 22 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerSubAccountRoute", + "line": 27 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerSubAccountRoute", + "line": 32 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerSubAccountRoute", + "line": 37 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerSubAccountRoute", + "line": 42 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerSubAccountRoute", + "line": 47 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerSubAccountRoute", + "line": 52 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerSubAccountRoute", + "line": 57 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerSubAccountRoute", + "line": 62 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerSubAccountRoute", + "line": 67 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerSubAccountRoute", + "line": 72 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerSubAccountRoute", + "line": 77 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerSubAccountRoute", + "line": 82 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerSubAccountRoute", + "line": 87 + }, + { + "kind": "func", + "name": "AccountID", + "signature": "func AccountID(v string) predicate.LedgerSubAccountRoute", + "line": 92 + }, + { + "kind": "func", + "name": "RoutingKeyVersion", + "signature": "func RoutingKeyVersion(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 97 + }, + { + "kind": "func", + "name": "RoutingKey", + "signature": "func RoutingKey(v string) predicate.LedgerSubAccountRoute", + "line": 103 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v string) predicate.LedgerSubAccountRoute", + "line": 108 + }, + { + "kind": "func", + "name": "TaxCode", + "signature": "func TaxCode(v string) predicate.LedgerSubAccountRoute", + "line": 113 + }, + { + "kind": "func", + "name": "TaxBehavior", + "signature": "func TaxBehavior(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 118 + }, + { + "kind": "func", + "name": "Features", + "signature": "func Features(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 124 + }, + { + "kind": "func", + "name": "CostBasis", + "signature": "func CostBasis(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 129 + }, + { + "kind": "func", + "name": "CreditPriority", + "signature": "func CreditPriority(v int) predicate.LedgerSubAccountRoute", + "line": 134 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatus", + "signature": "func TransactionAuthorizationStatus(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerSubAccountRoute", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerSubAccountRoute", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerSubAccountRoute", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerSubAccountRoute", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerSubAccountRoute", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerSubAccountRoute", + "line": 180 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerSubAccountRoute", + "line": 185 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerSubAccountRoute", + "line": 190 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerSubAccountRoute", + "line": 195 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerSubAccountRoute", + "line": 200 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerSubAccountRoute", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 220 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 225 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 230 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 235 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 240 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 265 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 270 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 275 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 280 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerSubAccountRoute", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerSubAccountRoute", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 310 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 315 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerSubAccountRoute", + "line": 320 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerSubAccountRoute", + "line": 325 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerSubAccountRoute", + "line": 330 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerSubAccountRoute", + "line": 335 + }, + { + "kind": "func", + "name": "AccountIDEQ", + "signature": "func AccountIDEQ(v string) predicate.LedgerSubAccountRoute", + "line": 340 + }, + { + "kind": "func", + "name": "AccountIDNEQ", + "signature": "func AccountIDNEQ(v string) predicate.LedgerSubAccountRoute", + "line": 345 + }, + { + "kind": "func", + "name": "AccountIDIn", + "signature": "func AccountIDIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 350 + }, + { + "kind": "func", + "name": "AccountIDNotIn", + "signature": "func AccountIDNotIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 355 + }, + { + "kind": "func", + "name": "AccountIDGT", + "signature": "func AccountIDGT(v string) predicate.LedgerSubAccountRoute", + "line": 360 + }, + { + "kind": "func", + "name": "AccountIDGTE", + "signature": "func AccountIDGTE(v string) predicate.LedgerSubAccountRoute", + "line": 365 + }, + { + "kind": "func", + "name": "AccountIDLT", + "signature": "func AccountIDLT(v string) predicate.LedgerSubAccountRoute", + "line": 370 + }, + { + "kind": "func", + "name": "AccountIDLTE", + "signature": "func AccountIDLTE(v string) predicate.LedgerSubAccountRoute", + "line": 375 + }, + { + "kind": "func", + "name": "AccountIDContains", + "signature": "func AccountIDContains(v string) predicate.LedgerSubAccountRoute", + "line": 380 + }, + { + "kind": "func", + "name": "AccountIDHasPrefix", + "signature": "func AccountIDHasPrefix(v string) predicate.LedgerSubAccountRoute", + "line": 385 + }, + { + "kind": "func", + "name": "AccountIDHasSuffix", + "signature": "func AccountIDHasSuffix(v string) predicate.LedgerSubAccountRoute", + "line": 390 + }, + { + "kind": "func", + "name": "AccountIDEqualFold", + "signature": "func AccountIDEqualFold(v string) predicate.LedgerSubAccountRoute", + "line": 395 + }, + { + "kind": "func", + "name": "AccountIDContainsFold", + "signature": "func AccountIDContainsFold(v string) predicate.LedgerSubAccountRoute", + "line": 400 + }, + { + "kind": "func", + "name": "RoutingKeyVersionEQ", + "signature": "func RoutingKeyVersionEQ(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 405 + }, + { + "kind": "func", + "name": "RoutingKeyVersionNEQ", + "signature": "func RoutingKeyVersionNEQ(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 411 + }, + { + "kind": "func", + "name": "RoutingKeyVersionIn", + "signature": "func RoutingKeyVersionIn(vs ...ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 417 + }, + { + "kind": "func", + "name": "RoutingKeyVersionNotIn", + "signature": "func RoutingKeyVersionNotIn(vs ...ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 426 + }, + { + "kind": "func", + "name": "RoutingKeyVersionGT", + "signature": "func RoutingKeyVersionGT(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 435 + }, + { + "kind": "func", + "name": "RoutingKeyVersionGTE", + "signature": "func RoutingKeyVersionGTE(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 441 + }, + { + "kind": "func", + "name": "RoutingKeyVersionLT", + "signature": "func RoutingKeyVersionLT(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 447 + }, + { + "kind": "func", + "name": "RoutingKeyVersionLTE", + "signature": "func RoutingKeyVersionLTE(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 453 + }, + { + "kind": "func", + "name": "RoutingKeyVersionContains", + "signature": "func RoutingKeyVersionContains(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 459 + }, + { + "kind": "func", + "name": "RoutingKeyVersionHasPrefix", + "signature": "func RoutingKeyVersionHasPrefix(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 465 + }, + { + "kind": "func", + "name": "RoutingKeyVersionHasSuffix", + "signature": "func RoutingKeyVersionHasSuffix(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 471 + }, + { + "kind": "func", + "name": "RoutingKeyVersionEqualFold", + "signature": "func RoutingKeyVersionEqualFold(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 477 + }, + { + "kind": "func", + "name": "RoutingKeyVersionContainsFold", + "signature": "func RoutingKeyVersionContainsFold(v ledger.RoutingKeyVersion) predicate.LedgerSubAccountRoute", + "line": 483 + }, + { + "kind": "func", + "name": "RoutingKeyEQ", + "signature": "func RoutingKeyEQ(v string) predicate.LedgerSubAccountRoute", + "line": 489 + }, + { + "kind": "func", + "name": "RoutingKeyNEQ", + "signature": "func RoutingKeyNEQ(v string) predicate.LedgerSubAccountRoute", + "line": 494 + }, + { + "kind": "func", + "name": "RoutingKeyIn", + "signature": "func RoutingKeyIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 499 + }, + { + "kind": "func", + "name": "RoutingKeyNotIn", + "signature": "func RoutingKeyNotIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 504 + }, + { + "kind": "func", + "name": "RoutingKeyGT", + "signature": "func RoutingKeyGT(v string) predicate.LedgerSubAccountRoute", + "line": 509 + }, + { + "kind": "func", + "name": "RoutingKeyGTE", + "signature": "func RoutingKeyGTE(v string) predicate.LedgerSubAccountRoute", + "line": 514 + }, + { + "kind": "func", + "name": "RoutingKeyLT", + "signature": "func RoutingKeyLT(v string) predicate.LedgerSubAccountRoute", + "line": 519 + }, + { + "kind": "func", + "name": "RoutingKeyLTE", + "signature": "func RoutingKeyLTE(v string) predicate.LedgerSubAccountRoute", + "line": 524 + }, + { + "kind": "func", + "name": "RoutingKeyContains", + "signature": "func RoutingKeyContains(v string) predicate.LedgerSubAccountRoute", + "line": 529 + }, + { + "kind": "func", + "name": "RoutingKeyHasPrefix", + "signature": "func RoutingKeyHasPrefix(v string) predicate.LedgerSubAccountRoute", + "line": 534 + }, + { + "kind": "func", + "name": "RoutingKeyHasSuffix", + "signature": "func RoutingKeyHasSuffix(v string) predicate.LedgerSubAccountRoute", + "line": 539 + }, + { + "kind": "func", + "name": "RoutingKeyEqualFold", + "signature": "func RoutingKeyEqualFold(v string) predicate.LedgerSubAccountRoute", + "line": 544 + }, + { + "kind": "func", + "name": "RoutingKeyContainsFold", + "signature": "func RoutingKeyContainsFold(v string) predicate.LedgerSubAccountRoute", + "line": 549 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v string) predicate.LedgerSubAccountRoute", + "line": 554 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v string) predicate.LedgerSubAccountRoute", + "line": 559 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 564 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 569 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v string) predicate.LedgerSubAccountRoute", + "line": 574 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v string) predicate.LedgerSubAccountRoute", + "line": 579 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v string) predicate.LedgerSubAccountRoute", + "line": 584 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v string) predicate.LedgerSubAccountRoute", + "line": 589 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v string) predicate.LedgerSubAccountRoute", + "line": 594 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v string) predicate.LedgerSubAccountRoute", + "line": 599 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v string) predicate.LedgerSubAccountRoute", + "line": 604 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v string) predicate.LedgerSubAccountRoute", + "line": 609 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v string) predicate.LedgerSubAccountRoute", + "line": 614 + }, + { + "kind": "func", + "name": "TaxCodeEQ", + "signature": "func TaxCodeEQ(v string) predicate.LedgerSubAccountRoute", + "line": 619 + }, + { + "kind": "func", + "name": "TaxCodeNEQ", + "signature": "func TaxCodeNEQ(v string) predicate.LedgerSubAccountRoute", + "line": 624 + }, + { + "kind": "func", + "name": "TaxCodeIn", + "signature": "func TaxCodeIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 629 + }, + { + "kind": "func", + "name": "TaxCodeNotIn", + "signature": "func TaxCodeNotIn(vs ...string) predicate.LedgerSubAccountRoute", + "line": 634 + }, + { + "kind": "func", + "name": "TaxCodeGT", + "signature": "func TaxCodeGT(v string) predicate.LedgerSubAccountRoute", + "line": 639 + }, + { + "kind": "func", + "name": "TaxCodeGTE", + "signature": "func TaxCodeGTE(v string) predicate.LedgerSubAccountRoute", + "line": 644 + }, + { + "kind": "func", + "name": "TaxCodeLT", + "signature": "func TaxCodeLT(v string) predicate.LedgerSubAccountRoute", + "line": 649 + }, + { + "kind": "func", + "name": "TaxCodeLTE", + "signature": "func TaxCodeLTE(v string) predicate.LedgerSubAccountRoute", + "line": 654 + }, + { + "kind": "func", + "name": "TaxCodeContains", + "signature": "func TaxCodeContains(v string) predicate.LedgerSubAccountRoute", + "line": 659 + }, + { + "kind": "func", + "name": "TaxCodeHasPrefix", + "signature": "func TaxCodeHasPrefix(v string) predicate.LedgerSubAccountRoute", + "line": 664 + }, + { + "kind": "func", + "name": "TaxCodeHasSuffix", + "signature": "func TaxCodeHasSuffix(v string) predicate.LedgerSubAccountRoute", + "line": 669 + }, + { + "kind": "func", + "name": "TaxCodeIsNil", + "signature": "func TaxCodeIsNil() predicate.LedgerSubAccountRoute", + "line": 674 + }, + { + "kind": "func", + "name": "TaxCodeNotNil", + "signature": "func TaxCodeNotNil() predicate.LedgerSubAccountRoute", + "line": 679 + }, + { + "kind": "func", + "name": "TaxCodeEqualFold", + "signature": "func TaxCodeEqualFold(v string) predicate.LedgerSubAccountRoute", + "line": 684 + }, + { + "kind": "func", + "name": "TaxCodeContainsFold", + "signature": "func TaxCodeContainsFold(v string) predicate.LedgerSubAccountRoute", + "line": 689 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 694 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 700 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 706 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 715 + }, + { + "kind": "func", + "name": "TaxBehaviorGT", + "signature": "func TaxBehaviorGT(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 724 + }, + { + "kind": "func", + "name": "TaxBehaviorGTE", + "signature": "func TaxBehaviorGTE(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 730 + }, + { + "kind": "func", + "name": "TaxBehaviorLT", + "signature": "func TaxBehaviorLT(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 736 + }, + { + "kind": "func", + "name": "TaxBehaviorLTE", + "signature": "func TaxBehaviorLTE(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 742 + }, + { + "kind": "func", + "name": "TaxBehaviorContains", + "signature": "func TaxBehaviorContains(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 748 + }, + { + "kind": "func", + "name": "TaxBehaviorHasPrefix", + "signature": "func TaxBehaviorHasPrefix(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 754 + }, + { + "kind": "func", + "name": "TaxBehaviorHasSuffix", + "signature": "func TaxBehaviorHasSuffix(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 760 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.LedgerSubAccountRoute", + "line": 766 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.LedgerSubAccountRoute", + "line": 771 + }, + { + "kind": "func", + "name": "TaxBehaviorEqualFold", + "signature": "func TaxBehaviorEqualFold(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 776 + }, + { + "kind": "func", + "name": "TaxBehaviorContainsFold", + "signature": "func TaxBehaviorContainsFold(v ledger.TaxBehavior) predicate.LedgerSubAccountRoute", + "line": 782 + }, + { + "kind": "func", + "name": "FeaturesEQ", + "signature": "func FeaturesEQ(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 788 + }, + { + "kind": "func", + "name": "FeaturesNEQ", + "signature": "func FeaturesNEQ(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 793 + }, + { + "kind": "func", + "name": "FeaturesIn", + "signature": "func FeaturesIn(vs ...pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 798 + }, + { + "kind": "func", + "name": "FeaturesNotIn", + "signature": "func FeaturesNotIn(vs ...pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 803 + }, + { + "kind": "func", + "name": "FeaturesGT", + "signature": "func FeaturesGT(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 808 + }, + { + "kind": "func", + "name": "FeaturesGTE", + "signature": "func FeaturesGTE(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 813 + }, + { + "kind": "func", + "name": "FeaturesLT", + "signature": "func FeaturesLT(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 818 + }, + { + "kind": "func", + "name": "FeaturesLTE", + "signature": "func FeaturesLTE(v pq.StringArray) predicate.LedgerSubAccountRoute", + "line": 823 + }, + { + "kind": "func", + "name": "FeaturesIsNil", + "signature": "func FeaturesIsNil() predicate.LedgerSubAccountRoute", + "line": 828 + }, + { + "kind": "func", + "name": "FeaturesNotNil", + "signature": "func FeaturesNotNil() predicate.LedgerSubAccountRoute", + "line": 833 + }, + { + "kind": "func", + "name": "CostBasisEQ", + "signature": "func CostBasisEQ(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 838 + }, + { + "kind": "func", + "name": "CostBasisNEQ", + "signature": "func CostBasisNEQ(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 843 + }, + { + "kind": "func", + "name": "CostBasisIn", + "signature": "func CostBasisIn(vs ...alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 848 + }, + { + "kind": "func", + "name": "CostBasisNotIn", + "signature": "func CostBasisNotIn(vs ...alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 853 + }, + { + "kind": "func", + "name": "CostBasisGT", + "signature": "func CostBasisGT(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 858 + }, + { + "kind": "func", + "name": "CostBasisGTE", + "signature": "func CostBasisGTE(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 863 + }, + { + "kind": "func", + "name": "CostBasisLT", + "signature": "func CostBasisLT(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 868 + }, + { + "kind": "func", + "name": "CostBasisLTE", + "signature": "func CostBasisLTE(v alpacadecimal.Decimal) predicate.LedgerSubAccountRoute", + "line": 873 + }, + { + "kind": "func", + "name": "CostBasisIsNil", + "signature": "func CostBasisIsNil() predicate.LedgerSubAccountRoute", + "line": 878 + }, + { + "kind": "func", + "name": "CostBasisNotNil", + "signature": "func CostBasisNotNil() predicate.LedgerSubAccountRoute", + "line": 883 + }, + { + "kind": "func", + "name": "CreditPriorityEQ", + "signature": "func CreditPriorityEQ(v int) predicate.LedgerSubAccountRoute", + "line": 888 + }, + { + "kind": "func", + "name": "CreditPriorityNEQ", + "signature": "func CreditPriorityNEQ(v int) predicate.LedgerSubAccountRoute", + "line": 893 + }, + { + "kind": "func", + "name": "CreditPriorityIn", + "signature": "func CreditPriorityIn(vs ...int) predicate.LedgerSubAccountRoute", + "line": 898 + }, + { + "kind": "func", + "name": "CreditPriorityNotIn", + "signature": "func CreditPriorityNotIn(vs ...int) predicate.LedgerSubAccountRoute", + "line": 903 + }, + { + "kind": "func", + "name": "CreditPriorityGT", + "signature": "func CreditPriorityGT(v int) predicate.LedgerSubAccountRoute", + "line": 908 + }, + { + "kind": "func", + "name": "CreditPriorityGTE", + "signature": "func CreditPriorityGTE(v int) predicate.LedgerSubAccountRoute", + "line": 913 + }, + { + "kind": "func", + "name": "CreditPriorityLT", + "signature": "func CreditPriorityLT(v int) predicate.LedgerSubAccountRoute", + "line": 918 + }, + { + "kind": "func", + "name": "CreditPriorityLTE", + "signature": "func CreditPriorityLTE(v int) predicate.LedgerSubAccountRoute", + "line": 923 + }, + { + "kind": "func", + "name": "CreditPriorityIsNil", + "signature": "func CreditPriorityIsNil() predicate.LedgerSubAccountRoute", + "line": 928 + }, + { + "kind": "func", + "name": "CreditPriorityNotNil", + "signature": "func CreditPriorityNotNil() predicate.LedgerSubAccountRoute", + "line": 933 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusEQ", + "signature": "func TransactionAuthorizationStatusEQ(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 938 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusNEQ", + "signature": "func TransactionAuthorizationStatusNEQ(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 944 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusIn", + "signature": "func TransactionAuthorizationStatusIn(vs ...ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 950 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusNotIn", + "signature": "func TransactionAuthorizationStatusNotIn(vs ...ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 959 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusGT", + "signature": "func TransactionAuthorizationStatusGT(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 968 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusGTE", + "signature": "func TransactionAuthorizationStatusGTE(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 974 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusLT", + "signature": "func TransactionAuthorizationStatusLT(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 980 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusLTE", + "signature": "func TransactionAuthorizationStatusLTE(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 986 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusContains", + "signature": "func TransactionAuthorizationStatusContains(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 992 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusHasPrefix", + "signature": "func TransactionAuthorizationStatusHasPrefix(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 998 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusHasSuffix", + "signature": "func TransactionAuthorizationStatusHasSuffix(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 1004 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusIsNil", + "signature": "func TransactionAuthorizationStatusIsNil() predicate.LedgerSubAccountRoute", + "line": 1010 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusNotNil", + "signature": "func TransactionAuthorizationStatusNotNil() predicate.LedgerSubAccountRoute", + "line": 1015 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusEqualFold", + "signature": "func TransactionAuthorizationStatusEqualFold(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 1020 + }, + { + "kind": "func", + "name": "TransactionAuthorizationStatusContainsFold", + "signature": "func TransactionAuthorizationStatusContainsFold(v ledger.TransactionAuthorizationStatus) predicate.LedgerSubAccountRoute", + "line": 1026 + }, + { + "kind": "func", + "name": "HasAccount", + "signature": "func HasAccount() predicate.LedgerSubAccountRoute", + "line": 1032 + }, + { + "kind": "func", + "name": "HasAccountWith", + "signature": "func HasAccountWith(preds ...predicate.LedgerAccount) predicate.LedgerSubAccountRoute", + "line": 1043 + }, + { + "kind": "func", + "name": "HasSubAccounts", + "signature": "func HasSubAccounts() predicate.LedgerSubAccountRoute", + "line": 1055 + }, + { + "kind": "func", + "name": "HasSubAccountsWith", + "signature": "func HasSubAccountsWith(preds ...predicate.LedgerSubAccount) predicate.LedgerSubAccountRoute", + "line": 1066 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerSubAccountRoute) predicate.LedgerSubAccountRoute", + "line": 1078 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerSubAccountRoute) predicate.LedgerSubAccountRoute", + "line": 1083 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerSubAccountRoute) predicate.LedgerSubAccountRoute", + "line": 1088 + } + ], + "line_count": 1090 + }, + "openmeter/ent/db/ledgersubaccountroute_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountRouteCreate", + "signature": "type LedgerSubAccountRouteCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNamespace(v string) *LedgerSubAccountRouteCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetCreatedAt(v time.Time) *LedgerSubAccountRouteCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableCreatedAt(v *time.Time) *LedgerSubAccountRouteCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteCreate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableUpdatedAt(v *time.Time) *LedgerSubAccountRouteCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetDeletedAt(v time.Time) *LedgerSubAccountRouteCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountRouteCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetAccountID", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetAccountID(v string) *LedgerSubAccountRouteCreate", + "line": 80 + }, + { + "kind": "func", + "name": "SetRoutingKeyVersion", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetRoutingKeyVersion(v ledger.RoutingKeyVersion) *LedgerSubAccountRouteCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetRoutingKey", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetRoutingKey(v string) *LedgerSubAccountRouteCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetCurrency(v string) *LedgerSubAccountRouteCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetTaxCode(v string) *LedgerSubAccountRouteCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetNillableTaxCode", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableTaxCode(v *string) *LedgerSubAccountRouteCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetTaxBehavior(v ledger.TaxBehavior) *LedgerSubAccountRouteCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableTaxBehavior(v *ledger.TaxBehavior) *LedgerSubAccountRouteCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetFeatures(v pq.StringArray) *LedgerSubAccountRouteCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetCostBasis", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetCostBasis(v alpacadecimal.Decimal) *LedgerSubAccountRouteCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillableCostBasis", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableCostBasis(v *alpacadecimal.Decimal) *LedgerSubAccountRouteCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetCreditPriority", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetCreditPriority(v int) *LedgerSubAccountRouteCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetNillableCreditPriority", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableCreditPriority(v *int) *LedgerSubAccountRouteCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetTransactionAuthorizationStatus", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetTransactionAuthorizationStatus(v ledger.TransactionAuthorizationStatus) *LedgerSubAccountRouteCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetNillableTransactionAuthorizationStatus", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableTransactionAuthorizationStatus(v *ledger.TransactionAuthorizationStatus) *LedgerSubAccountRouteCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetID(v string) *LedgerSubAccountRouteCreate", + "line": 180 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetNillableID(v *string) *LedgerSubAccountRouteCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetAccount", + "signature": "func (_c *LedgerSubAccountRouteCreate) SetAccount(v *LedgerAccount) *LedgerSubAccountRouteCreate", + "line": 194 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_c *LedgerSubAccountRouteCreate) AddSubAccountIDs(ids ...string) *LedgerSubAccountRouteCreate", + "line": 199 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_c *LedgerSubAccountRouteCreate) AddSubAccounts(v ...*LedgerSubAccount) *LedgerSubAccountRouteCreate", + "line": 205 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerSubAccountRouteCreate) Mutation() *LedgerSubAccountRouteMutation", + "line": 214 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerSubAccountRouteCreate) Save(ctx context.Context) (*LedgerSubAccountRoute, error)", + "line": 219 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerSubAccountRouteCreate) SaveX(ctx context.Context) *LedgerSubAccountRoute", + "line": 225 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerSubAccountRouteCreate) Exec(ctx context.Context) error", + "line": 234 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerSubAccountRouteCreate) ExecX(ctx context.Context)", + "line": 240 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerSubAccountRouteCreate) defaults()", + "line": 247 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerSubAccountRouteCreate) check() error", + "line": 263 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerSubAccountRouteCreate) sqlSave(ctx context.Context) (*LedgerSubAccountRoute, error)", + "line": 311 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerSubAccountRouteCreate) createSpec() (*LedgerSubAccountRoute, *sqlgraph.CreateSpec)", + "line": 334 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerSubAccountRouteCreate) OnConflict(opts ...sql.ConflictOption) *LedgerSubAccountRouteUpsertOne", + "line": 448 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerSubAccountRouteCreate) OnConflictColumns(columns ...string) *LedgerSubAccountRouteUpsertOne", + "line": 461 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsert) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteUpsert", + "line": 482 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsert) UpdateUpdatedAt() *LedgerSubAccountRouteUpsert", + "line": 488 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsert) SetDeletedAt(v time.Time) *LedgerSubAccountRouteUpsert", + "line": 494 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsert) UpdateDeletedAt() *LedgerSubAccountRouteUpsert", + "line": 500 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsert) ClearDeletedAt() *LedgerSubAccountRouteUpsert", + "line": 506 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) UpdateNewValues() *LedgerSubAccountRouteUpsertOne", + "line": 522 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) Ignore() *LedgerSubAccountRouteUpsertOne", + "line": 574 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) DoNothing() *LedgerSubAccountRouteUpsertOne", + "line": 581 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) Update(set func(*LedgerSubAccountRouteUpsert)) *LedgerSubAccountRouteUpsertOne", + "line": 588 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteUpsertOne", + "line": 596 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) UpdateUpdatedAt() *LedgerSubAccountRouteUpsertOne", + "line": 603 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) SetDeletedAt(v time.Time) *LedgerSubAccountRouteUpsertOne", + "line": 610 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) UpdateDeletedAt() *LedgerSubAccountRouteUpsertOne", + "line": 617 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) ClearDeletedAt() *LedgerSubAccountRouteUpsertOne", + "line": 624 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) Exec(ctx context.Context) error", + "line": 631 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) ExecX(ctx context.Context)", + "line": 639 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 646 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerSubAccountRouteUpsertOne) IDX(ctx context.Context) string", + "line": 660 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteCreateBulk", + "signature": "type LedgerSubAccountRouteCreateBulk struct", + "line": 669 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) Save(ctx context.Context) ([]*LedgerSubAccountRoute, error)", + "line": 677 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) SaveX(ctx context.Context) []*LedgerSubAccountRoute", + "line": 733 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) Exec(ctx context.Context) error", + "line": 742 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) ExecX(ctx context.Context)", + "line": 748 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerSubAccountRouteUpsertBulk", + "line": 769 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerSubAccountRouteCreateBulk) OnConflictColumns(columns ...string) *LedgerSubAccountRouteUpsertBulk", + "line": 782 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteUpsertBulk", + "signature": "type LedgerSubAccountRouteUpsertBulk struct", + "line": 791 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) UpdateNewValues() *LedgerSubAccountRouteUpsertBulk", + "line": 806 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) Ignore() *LedgerSubAccountRouteUpsertBulk", + "line": 860 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) DoNothing() *LedgerSubAccountRouteUpsertBulk", + "line": 867 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) Update(set func(*LedgerSubAccountRouteUpsert)) *LedgerSubAccountRouteUpsertBulk", + "line": 874 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteUpsertBulk", + "line": 882 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) UpdateUpdatedAt() *LedgerSubAccountRouteUpsertBulk", + "line": 889 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) SetDeletedAt(v time.Time) *LedgerSubAccountRouteUpsertBulk", + "line": 896 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) UpdateDeletedAt() *LedgerSubAccountRouteUpsertBulk", + "line": 903 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) ClearDeletedAt() *LedgerSubAccountRouteUpsertBulk", + "line": 910 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) Exec(ctx context.Context) error", + "line": 917 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerSubAccountRouteUpsertBulk) ExecX(ctx context.Context)", + "line": 933 + } + ], + "line_count": 937 + }, + "openmeter/ent/db/ledgersubaccountroute_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountRouteDelete", + "signature": "type LedgerSubAccountRouteDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerSubAccountRouteDelete) Where(ps ...predicate.LedgerSubAccountRoute) *LedgerSubAccountRouteDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerSubAccountRouteDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerSubAccountRouteDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerSubAccountRouteDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteDeleteOne", + "signature": "type LedgerSubAccountRouteDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerSubAccountRouteDeleteOne) Where(ps ...predicate.LedgerSubAccountRoute) *LedgerSubAccountRouteDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerSubAccountRouteDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerSubAccountRouteDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgersubaccountroute_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountRouteQuery", + "signature": "type LedgerSubAccountRouteQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerSubAccountRouteQuery) Where(ps ...predicate.LedgerSubAccountRoute) *LedgerSubAccountRouteQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerSubAccountRouteQuery) Limit(limit int) *LedgerSubAccountRouteQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerSubAccountRouteQuery) Offset(offset int) *LedgerSubAccountRouteQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerSubAccountRouteQuery) Unique(unique bool) *LedgerSubAccountRouteQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerSubAccountRouteQuery) Order(o ...ledgersubaccountroute.OrderOption) *LedgerSubAccountRouteQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryAccount", + "signature": "func (_q *LedgerSubAccountRouteQuery) QueryAccount() *LedgerAccountQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QuerySubAccounts", + "signature": "func (_q *LedgerSubAccountRouteQuery) QuerySubAccounts() *LedgerSubAccountQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerSubAccountRouteQuery) First(ctx context.Context) (*LedgerSubAccountRoute, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerSubAccountRouteQuery) FirstX(ctx context.Context) *LedgerSubAccountRoute", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerSubAccountRouteQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerSubAccountRouteQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerSubAccountRouteQuery) Only(ctx context.Context) (*LedgerSubAccountRoute, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerSubAccountRouteQuery) OnlyX(ctx context.Context) *LedgerSubAccountRoute", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerSubAccountRouteQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerSubAccountRouteQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerSubAccountRouteQuery) All(ctx context.Context) ([]*LedgerSubAccountRoute, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerSubAccountRouteQuery) AllX(ctx context.Context) []*LedgerSubAccountRoute", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerSubAccountRouteQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerSubAccountRouteQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerSubAccountRouteQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerSubAccountRouteQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerSubAccountRouteQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerSubAccountRouteQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerSubAccountRouteQuery) Clone() *LedgerSubAccountRouteQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithAccount", + "signature": "func (_q *LedgerSubAccountRouteQuery) WithAccount(opts ...func(*LedgerAccountQuery)) *LedgerSubAccountRouteQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithSubAccounts", + "signature": "func (_q *LedgerSubAccountRouteQuery) WithSubAccounts(opts ...func(*LedgerSubAccountQuery)) *LedgerSubAccountRouteQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerSubAccountRouteQuery) GroupBy(field string, fields ...string) *LedgerSubAccountRouteGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerSubAccountRouteQuery) Select(fields ...string) *LedgerSubAccountRouteSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerSubAccountRouteQuery) Aggregate(fns ...AggregateFunc) *LedgerSubAccountRouteSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerSubAccountRouteQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerSubAccountRouteQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerSubAccountRoute, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadAccount", + "signature": "func (_q *LedgerSubAccountRouteQuery) loadAccount(ctx context.Context, query *LedgerAccountQuery, nodes []*LedgerSubAccountRoute, init func(*LedgerSubAccountRoute), assign func(*LedgerSubAccountRoute, *LedgerAccount)) error", + "line": 456 + }, + { + "kind": "func", + "name": "loadSubAccounts", + "signature": "func (_q *LedgerSubAccountRouteQuery) loadSubAccounts(ctx context.Context, query *LedgerSubAccountQuery, nodes []*LedgerSubAccountRoute, init func(*LedgerSubAccountRoute), assign func(*LedgerSubAccountRoute, *LedgerSubAccount)) error", + "line": 485 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerSubAccountRouteQuery) sqlCount(ctx context.Context) (int, error)", + "line": 516 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerSubAccountRouteQuery) querySpec() *sqlgraph.QuerySpec", + "line": 528 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerSubAccountRouteQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 571 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerSubAccountRouteQuery) ForUpdate(opts ...sql.LockOption) *LedgerSubAccountRouteQuery", + "line": 609 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerSubAccountRouteQuery) ForShare(opts ...sql.LockOption) *LedgerSubAccountRouteQuery", + "line": 622 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteGroupBy", + "signature": "type LedgerSubAccountRouteGroupBy struct", + "line": 633 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerSubAccountRouteGroupBy) Aggregate(fns ...AggregateFunc) *LedgerSubAccountRouteGroupBy", + "line": 639 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerSubAccountRouteGroupBy) Scan(ctx context.Context, v any) error", + "line": 645 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerSubAccountRouteGroupBy) sqlScan(ctx context.Context, root *LedgerSubAccountRouteQuery, v any) error", + "line": 653 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteSelect", + "signature": "type LedgerSubAccountRouteSelect struct", + "line": 681 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerSubAccountRouteSelect) Aggregate(fns ...AggregateFunc) *LedgerSubAccountRouteSelect", + "line": 687 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerSubAccountRouteSelect) Scan(ctx context.Context, v any) error", + "line": 693 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerSubAccountRouteSelect) sqlScan(ctx context.Context, root *LedgerSubAccountRouteQuery, v any) error", + "line": 701 + } + ], + "line_count": 720 + }, + "openmeter/ent/db/ledgersubaccountroute_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerSubAccountRouteUpdate", + "signature": "type LedgerSubAccountRouteUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerSubAccountRouteUpdate) Where(ps ...predicate.LedgerSubAccountRoute) *LedgerSubAccountRouteUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdate) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdate) SetDeletedAt(v time.Time) *LedgerSubAccountRouteUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdate) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountRouteUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdate) ClearDeletedAt() *LedgerSubAccountRouteUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_u *LedgerSubAccountRouteUpdate) AddSubAccountIDs(ids ...string) *LedgerSubAccountRouteUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdate) AddSubAccounts(v ...*LedgerSubAccount) *LedgerSubAccountRouteUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerSubAccountRouteUpdate) Mutation() *LedgerSubAccountRouteMutation", + "line": 74 + }, + { + "kind": "func", + "name": "ClearSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdate) ClearSubAccounts() *LedgerSubAccountRouteUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "RemoveSubAccountIDs", + "signature": "func (_u *LedgerSubAccountRouteUpdate) RemoveSubAccountIDs(ids ...string) *LedgerSubAccountRouteUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "RemoveSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdate) RemoveSubAccounts(v ...*LedgerSubAccount) *LedgerSubAccountRouteUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerSubAccountRouteUpdate) Save(ctx context.Context) (int, error)", + "line": 100 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerSubAccountRouteUpdate) SaveX(ctx context.Context) int", + "line": 106 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerSubAccountRouteUpdate) Exec(ctx context.Context) error", + "line": 115 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerSubAccountRouteUpdate) ExecX(ctx context.Context)", + "line": 121 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerSubAccountRouteUpdate) defaults()", + "line": 128 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerSubAccountRouteUpdate) check() error", + "line": 136 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerSubAccountRouteUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 143 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRouteUpdateOne", + "signature": "type LedgerSubAccountRouteUpdateOne struct", + "line": 240 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) SetUpdatedAt(v time.Time) *LedgerSubAccountRouteUpdateOne", + "line": 248 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) SetDeletedAt(v time.Time) *LedgerSubAccountRouteUpdateOne", + "line": 254 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerSubAccountRouteUpdateOne", + "line": 260 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) ClearDeletedAt() *LedgerSubAccountRouteUpdateOne", + "line": 268 + }, + { + "kind": "func", + "name": "AddSubAccountIDs", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) AddSubAccountIDs(ids ...string) *LedgerSubAccountRouteUpdateOne", + "line": 274 + }, + { + "kind": "func", + "name": "AddSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) AddSubAccounts(v ...*LedgerSubAccount) *LedgerSubAccountRouteUpdateOne", + "line": 280 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) Mutation() *LedgerSubAccountRouteMutation", + "line": 289 + }, + { + "kind": "func", + "name": "ClearSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) ClearSubAccounts() *LedgerSubAccountRouteUpdateOne", + "line": 294 + }, + { + "kind": "func", + "name": "RemoveSubAccountIDs", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) RemoveSubAccountIDs(ids ...string) *LedgerSubAccountRouteUpdateOne", + "line": 300 + }, + { + "kind": "func", + "name": "RemoveSubAccounts", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) RemoveSubAccounts(v ...*LedgerSubAccount) *LedgerSubAccountRouteUpdateOne", + "line": 306 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) Where(ps ...predicate.LedgerSubAccountRoute) *LedgerSubAccountRouteUpdateOne", + "line": 315 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) Select(field string, fields ...string) *LedgerSubAccountRouteUpdateOne", + "line": 322 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) Save(ctx context.Context) (*LedgerSubAccountRoute, error)", + "line": 328 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) SaveX(ctx context.Context) *LedgerSubAccountRoute", + "line": 334 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) Exec(ctx context.Context) error", + "line": 343 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) ExecX(ctx context.Context)", + "line": 349 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) defaults()", + "line": 356 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) check() error", + "line": 364 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerSubAccountRouteUpdateOne) sqlSave(ctx context.Context) (_node *LedgerSubAccountRoute, err error)", + "line": 371 + } + ], + "line_count": 485 + }, + "openmeter/ent/db/ledgertransaction.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransaction", + "signature": "type LedgerTransaction struct", + "line": 19 + }, + { + "kind": "struct", + "name": "LedgerTransactionEdges", + "signature": "type LedgerTransactionEdges struct", + "line": 44 + }, + { + "kind": "func", + "name": "GroupOrErr", + "signature": "func (e LedgerTransactionEdges) GroupOrErr() (*LedgerTransactionGroup, error)", + "line": 56 + }, + { + "kind": "func", + "name": "EntriesOrErr", + "signature": "func (e LedgerTransactionEdges) EntriesOrErr() ([]*LedgerEntry, error)", + "line": 67 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerTransaction) assignValues(columns []string, values []any) error", + "line": 94 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerTransaction) Value(name string) (ent.Value, error)", + "line": 160 + }, + { + "kind": "func", + "name": "QueryGroup", + "signature": "func (_m *LedgerTransaction) QueryGroup() *LedgerTransactionGroupQuery", + "line": 165 + }, + { + "kind": "func", + "name": "QueryEntries", + "signature": "func (_m *LedgerTransaction) QueryEntries() *LedgerEntryQuery", + "line": 170 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerTransaction) Update() *LedgerTransactionUpdateOne", + "line": 177 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerTransaction) Unwrap() *LedgerTransaction", + "line": 183 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerTransaction) String() string", + "line": 193 + } + ], + "line_count": 224 + }, + "openmeter/ent/db/ledgertransaction/ledgertransaction.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 66 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 92 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 97 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 102 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 107 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 112 + }, + { + "kind": "func", + "name": "ByGroupID", + "signature": "func ByGroupID(opts ...sql.OrderTermOption) OrderOption", + "line": 117 + }, + { + "kind": "func", + "name": "ByBookedAt", + "signature": "func ByBookedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 122 + }, + { + "kind": "func", + "name": "ByGroupField", + "signature": "func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 127 + }, + { + "kind": "func", + "name": "ByEntriesCount", + "signature": "func ByEntriesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByEntries", + "signature": "func ByEntries(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 141 + }, + { + "kind": "func", + "name": "newGroupStep", + "signature": "func newGroupStep() *sqlgraph.Step", + "line": 146 + }, + { + "kind": "func", + "name": "newEntriesStep", + "signature": "func newEntriesStep() *sqlgraph.Step", + "line": 153 + } + ], + "line_count": 159 + }, + "openmeter/ent/db/ledgertransaction/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerTransaction", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerTransaction", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerTransaction", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerTransaction", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerTransaction", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerTransaction", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerTransaction", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerTransaction", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerTransaction", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerTransaction", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerTransaction", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerTransaction", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerTransaction", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerTransaction", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerTransaction", + "line": 84 + }, + { + "kind": "func", + "name": "GroupID", + "signature": "func GroupID(v string) predicate.LedgerTransaction", + "line": 89 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func BookedAt(v time.Time) predicate.LedgerTransaction", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerTransaction", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerTransaction", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerTransaction", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerTransaction", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerTransaction", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerTransaction", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerTransaction", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerTransaction", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerTransaction", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerTransaction", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerTransaction", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerTransaction", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerTransaction", + "line": 159 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerTransaction", + "line": 164 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerTransaction", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerTransaction", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerTransaction", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerTransaction", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerTransaction", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerTransaction", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerTransaction", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerTransaction", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerTransaction", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerTransaction", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerTransaction", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerTransaction", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerTransaction", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerTransaction", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerTransaction", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerTransaction", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerTransaction", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerTransaction", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerTransaction", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerTransaction", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerTransaction", + "line": 299 + }, + { + "kind": "func", + "name": "GroupIDEQ", + "signature": "func GroupIDEQ(v string) predicate.LedgerTransaction", + "line": 304 + }, + { + "kind": "func", + "name": "GroupIDNEQ", + "signature": "func GroupIDNEQ(v string) predicate.LedgerTransaction", + "line": 309 + }, + { + "kind": "func", + "name": "GroupIDIn", + "signature": "func GroupIDIn(vs ...string) predicate.LedgerTransaction", + "line": 314 + }, + { + "kind": "func", + "name": "GroupIDNotIn", + "signature": "func GroupIDNotIn(vs ...string) predicate.LedgerTransaction", + "line": 319 + }, + { + "kind": "func", + "name": "GroupIDGT", + "signature": "func GroupIDGT(v string) predicate.LedgerTransaction", + "line": 324 + }, + { + "kind": "func", + "name": "GroupIDGTE", + "signature": "func GroupIDGTE(v string) predicate.LedgerTransaction", + "line": 329 + }, + { + "kind": "func", + "name": "GroupIDLT", + "signature": "func GroupIDLT(v string) predicate.LedgerTransaction", + "line": 334 + }, + { + "kind": "func", + "name": "GroupIDLTE", + "signature": "func GroupIDLTE(v string) predicate.LedgerTransaction", + "line": 339 + }, + { + "kind": "func", + "name": "GroupIDContains", + "signature": "func GroupIDContains(v string) predicate.LedgerTransaction", + "line": 344 + }, + { + "kind": "func", + "name": "GroupIDHasPrefix", + "signature": "func GroupIDHasPrefix(v string) predicate.LedgerTransaction", + "line": 349 + }, + { + "kind": "func", + "name": "GroupIDHasSuffix", + "signature": "func GroupIDHasSuffix(v string) predicate.LedgerTransaction", + "line": 354 + }, + { + "kind": "func", + "name": "GroupIDEqualFold", + "signature": "func GroupIDEqualFold(v string) predicate.LedgerTransaction", + "line": 359 + }, + { + "kind": "func", + "name": "GroupIDContainsFold", + "signature": "func GroupIDContainsFold(v string) predicate.LedgerTransaction", + "line": 364 + }, + { + "kind": "func", + "name": "BookedAtEQ", + "signature": "func BookedAtEQ(v time.Time) predicate.LedgerTransaction", + "line": 369 + }, + { + "kind": "func", + "name": "BookedAtNEQ", + "signature": "func BookedAtNEQ(v time.Time) predicate.LedgerTransaction", + "line": 374 + }, + { + "kind": "func", + "name": "BookedAtIn", + "signature": "func BookedAtIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 379 + }, + { + "kind": "func", + "name": "BookedAtNotIn", + "signature": "func BookedAtNotIn(vs ...time.Time) predicate.LedgerTransaction", + "line": 384 + }, + { + "kind": "func", + "name": "BookedAtGT", + "signature": "func BookedAtGT(v time.Time) predicate.LedgerTransaction", + "line": 389 + }, + { + "kind": "func", + "name": "BookedAtGTE", + "signature": "func BookedAtGTE(v time.Time) predicate.LedgerTransaction", + "line": 394 + }, + { + "kind": "func", + "name": "BookedAtLT", + "signature": "func BookedAtLT(v time.Time) predicate.LedgerTransaction", + "line": 399 + }, + { + "kind": "func", + "name": "BookedAtLTE", + "signature": "func BookedAtLTE(v time.Time) predicate.LedgerTransaction", + "line": 404 + }, + { + "kind": "func", + "name": "HasGroup", + "signature": "func HasGroup() predicate.LedgerTransaction", + "line": 409 + }, + { + "kind": "func", + "name": "HasGroupWith", + "signature": "func HasGroupWith(preds ...predicate.LedgerTransactionGroup) predicate.LedgerTransaction", + "line": 420 + }, + { + "kind": "func", + "name": "HasEntries", + "signature": "func HasEntries() predicate.LedgerTransaction", + "line": 432 + }, + { + "kind": "func", + "name": "HasEntriesWith", + "signature": "func HasEntriesWith(preds ...predicate.LedgerEntry) predicate.LedgerTransaction", + "line": 443 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerTransaction) predicate.LedgerTransaction", + "line": 455 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerTransaction) predicate.LedgerTransaction", + "line": 460 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerTransaction) predicate.LedgerTransaction", + "line": 465 + } + ], + "line_count": 467 + }, + "openmeter/ent/db/ledgertransaction_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionCreate", + "signature": "type LedgerTransactionCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerTransactionCreate) SetNamespace(v string) *LedgerTransactionCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerTransactionCreate) SetAnnotations(v models.Annotations) *LedgerTransactionCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerTransactionCreate) SetCreatedAt(v time.Time) *LedgerTransactionCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerTransactionCreate) SetNillableCreatedAt(v *time.Time) *LedgerTransactionCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerTransactionCreate) SetUpdatedAt(v time.Time) *LedgerTransactionCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerTransactionCreate) SetNillableUpdatedAt(v *time.Time) *LedgerTransactionCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerTransactionCreate) SetDeletedAt(v time.Time) *LedgerTransactionCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerTransactionCreate) SetNillableDeletedAt(v *time.Time) *LedgerTransactionCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetGroupID", + "signature": "func (_c *LedgerTransactionCreate) SetGroupID(v string) *LedgerTransactionCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetBookedAt", + "signature": "func (_c *LedgerTransactionCreate) SetBookedAt(v time.Time) *LedgerTransactionCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerTransactionCreate) SetID(v string) *LedgerTransactionCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerTransactionCreate) SetNillableID(v *string) *LedgerTransactionCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetGroup", + "signature": "func (_c *LedgerTransactionCreate) SetGroup(v *LedgerTransactionGroup) *LedgerTransactionCreate", + "line": 110 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_c *LedgerTransactionCreate) AddEntryIDs(ids ...string) *LedgerTransactionCreate", + "line": 115 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_c *LedgerTransactionCreate) AddEntries(v ...*LedgerEntry) *LedgerTransactionCreate", + "line": 121 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerTransactionCreate) Mutation() *LedgerTransactionMutation", + "line": 130 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerTransactionCreate) Save(ctx context.Context) (*LedgerTransaction, error)", + "line": 135 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerTransactionCreate) SaveX(ctx context.Context) *LedgerTransaction", + "line": 141 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerTransactionCreate) Exec(ctx context.Context) error", + "line": 150 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerTransactionCreate) ExecX(ctx context.Context)", + "line": 156 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerTransactionCreate) defaults()", + "line": 163 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerTransactionCreate) check() error", + "line": 179 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerTransactionCreate) sqlSave(ctx context.Context) (*LedgerTransaction, error)", + "line": 206 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerTransactionCreate) createSpec() (*LedgerTransaction, *sqlgraph.CreateSpec)", + "line": 229 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerTransactionCreate) OnConflict(opts ...sql.ConflictOption) *LedgerTransactionUpsertOne", + "line": 315 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerTransactionCreate) OnConflictColumns(columns ...string) *LedgerTransactionUpsertOne", + "line": 328 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionUpsert) SetAnnotations(v models.Annotations) *LedgerTransactionUpsert", + "line": 349 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionUpsert) UpdateAnnotations() *LedgerTransactionUpsert", + "line": 355 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionUpsert) ClearAnnotations() *LedgerTransactionUpsert", + "line": 361 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionUpsert) SetUpdatedAt(v time.Time) *LedgerTransactionUpsert", + "line": 367 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionUpsert) UpdateUpdatedAt() *LedgerTransactionUpsert", + "line": 373 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionUpsert) SetDeletedAt(v time.Time) *LedgerTransactionUpsert", + "line": 379 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionUpsert) UpdateDeletedAt() *LedgerTransactionUpsert", + "line": 385 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionUpsert) ClearDeletedAt() *LedgerTransactionUpsert", + "line": 391 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerTransactionUpsertOne) UpdateNewValues() *LedgerTransactionUpsertOne", + "line": 407 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerTransactionUpsertOne) Ignore() *LedgerTransactionUpsertOne", + "line": 435 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerTransactionUpsertOne) DoNothing() *LedgerTransactionUpsertOne", + "line": 442 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerTransactionUpsertOne) Update(set func(*LedgerTransactionUpsert)) *LedgerTransactionUpsertOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionUpsertOne) SetAnnotations(v models.Annotations) *LedgerTransactionUpsertOne", + "line": 457 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionUpsertOne) UpdateAnnotations() *LedgerTransactionUpsertOne", + "line": 464 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionUpsertOne) ClearAnnotations() *LedgerTransactionUpsertOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionUpsertOne) SetUpdatedAt(v time.Time) *LedgerTransactionUpsertOne", + "line": 478 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionUpsertOne) UpdateUpdatedAt() *LedgerTransactionUpsertOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionUpsertOne) SetDeletedAt(v time.Time) *LedgerTransactionUpsertOne", + "line": 492 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionUpsertOne) UpdateDeletedAt() *LedgerTransactionUpsertOne", + "line": 499 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionUpsertOne) ClearDeletedAt() *LedgerTransactionUpsertOne", + "line": 506 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerTransactionUpsertOne) Exec(ctx context.Context) error", + "line": 513 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerTransactionUpsertOne) ExecX(ctx context.Context)", + "line": 521 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerTransactionUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 528 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerTransactionUpsertOne) IDX(ctx context.Context) string", + "line": 542 + }, + { + "kind": "struct", + "name": "LedgerTransactionCreateBulk", + "signature": "type LedgerTransactionCreateBulk struct", + "line": 551 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerTransactionCreateBulk) Save(ctx context.Context) ([]*LedgerTransaction, error)", + "line": 559 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerTransactionCreateBulk) SaveX(ctx context.Context) []*LedgerTransaction", + "line": 615 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerTransactionCreateBulk) Exec(ctx context.Context) error", + "line": 624 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerTransactionCreateBulk) ExecX(ctx context.Context)", + "line": 630 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerTransactionCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerTransactionUpsertBulk", + "line": 651 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerTransactionCreateBulk) OnConflictColumns(columns ...string) *LedgerTransactionUpsertBulk", + "line": 664 + }, + { + "kind": "struct", + "name": "LedgerTransactionUpsertBulk", + "signature": "type LedgerTransactionUpsertBulk struct", + "line": 673 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerTransactionUpsertBulk) UpdateNewValues() *LedgerTransactionUpsertBulk", + "line": 688 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerTransactionUpsertBulk) Ignore() *LedgerTransactionUpsertBulk", + "line": 718 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerTransactionUpsertBulk) DoNothing() *LedgerTransactionUpsertBulk", + "line": 725 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerTransactionUpsertBulk) Update(set func(*LedgerTransactionUpsert)) *LedgerTransactionUpsertBulk", + "line": 732 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionUpsertBulk) SetAnnotations(v models.Annotations) *LedgerTransactionUpsertBulk", + "line": 740 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionUpsertBulk) UpdateAnnotations() *LedgerTransactionUpsertBulk", + "line": 747 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionUpsertBulk) ClearAnnotations() *LedgerTransactionUpsertBulk", + "line": 754 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionUpsertBulk) SetUpdatedAt(v time.Time) *LedgerTransactionUpsertBulk", + "line": 761 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionUpsertBulk) UpdateUpdatedAt() *LedgerTransactionUpsertBulk", + "line": 768 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionUpsertBulk) SetDeletedAt(v time.Time) *LedgerTransactionUpsertBulk", + "line": 775 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionUpsertBulk) UpdateDeletedAt() *LedgerTransactionUpsertBulk", + "line": 782 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionUpsertBulk) ClearDeletedAt() *LedgerTransactionUpsertBulk", + "line": 789 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerTransactionUpsertBulk) Exec(ctx context.Context) error", + "line": 796 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerTransactionUpsertBulk) ExecX(ctx context.Context)", + "line": 812 + } + ], + "line_count": 816 + }, + "openmeter/ent/db/ledgertransaction_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionDelete", + "signature": "type LedgerTransactionDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerTransactionDelete) Where(ps ...predicate.LedgerTransaction) *LedgerTransactionDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerTransactionDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerTransactionDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerTransactionDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerTransactionDeleteOne", + "signature": "type LedgerTransactionDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerTransactionDeleteOne) Where(ps ...predicate.LedgerTransaction) *LedgerTransactionDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerTransactionDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerTransactionDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgertransaction_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionQuery", + "signature": "type LedgerTransactionQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerTransactionQuery) Where(ps ...predicate.LedgerTransaction) *LedgerTransactionQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerTransactionQuery) Limit(limit int) *LedgerTransactionQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerTransactionQuery) Offset(offset int) *LedgerTransactionQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerTransactionQuery) Unique(unique bool) *LedgerTransactionQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerTransactionQuery) Order(o ...ledgertransaction.OrderOption) *LedgerTransactionQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryGroup", + "signature": "func (_q *LedgerTransactionQuery) QueryGroup() *LedgerTransactionGroupQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryEntries", + "signature": "func (_q *LedgerTransactionQuery) QueryEntries() *LedgerEntryQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerTransactionQuery) First(ctx context.Context) (*LedgerTransaction, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerTransactionQuery) FirstX(ctx context.Context) *LedgerTransaction", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerTransactionQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerTransactionQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerTransactionQuery) Only(ctx context.Context) (*LedgerTransaction, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerTransactionQuery) OnlyX(ctx context.Context) *LedgerTransaction", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerTransactionQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerTransactionQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerTransactionQuery) All(ctx context.Context) ([]*LedgerTransaction, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerTransactionQuery) AllX(ctx context.Context) []*LedgerTransaction", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerTransactionQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerTransactionQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerTransactionQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerTransactionQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerTransactionQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerTransactionQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerTransactionQuery) Clone() *LedgerTransactionQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (_q *LedgerTransactionQuery) WithGroup(opts ...func(*LedgerTransactionGroupQuery)) *LedgerTransactionQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithEntries", + "signature": "func (_q *LedgerTransactionQuery) WithEntries(opts ...func(*LedgerEntryQuery)) *LedgerTransactionQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerTransactionQuery) GroupBy(field string, fields ...string) *LedgerTransactionGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerTransactionQuery) Select(fields ...string) *LedgerTransactionSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerTransactionQuery) Aggregate(fns ...AggregateFunc) *LedgerTransactionSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerTransactionQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerTransactionQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerTransaction, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadGroup", + "signature": "func (_q *LedgerTransactionQuery) loadGroup(ctx context.Context, query *LedgerTransactionGroupQuery, nodes []*LedgerTransaction, init func(*LedgerTransaction), assign func(*LedgerTransaction, *LedgerTransactionGroup)) error", + "line": 454 + }, + { + "kind": "func", + "name": "loadEntries", + "signature": "func (_q *LedgerTransactionQuery) loadEntries(ctx context.Context, query *LedgerEntryQuery, nodes []*LedgerTransaction, init func(*LedgerTransaction), assign func(*LedgerTransaction, *LedgerEntry)) error", + "line": 483 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerTransactionQuery) sqlCount(ctx context.Context) (int, error)", + "line": 514 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerTransactionQuery) querySpec() *sqlgraph.QuerySpec", + "line": 526 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerTransactionQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerTransactionQuery) ForUpdate(opts ...sql.LockOption) *LedgerTransactionQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerTransactionQuery) ForShare(opts ...sql.LockOption) *LedgerTransactionQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupBy", + "signature": "type LedgerTransactionGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerTransactionGroupBy) Aggregate(fns ...AggregateFunc) *LedgerTransactionGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerTransactionGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerTransactionGroupBy) sqlScan(ctx context.Context, root *LedgerTransactionQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "LedgerTransactionSelect", + "signature": "type LedgerTransactionSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerTransactionSelect) Aggregate(fns ...AggregateFunc) *LedgerTransactionSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerTransactionSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerTransactionSelect) sqlScan(ctx context.Context, root *LedgerTransactionQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/ledgertransaction_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionUpdate", + "signature": "type LedgerTransactionUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerTransactionUpdate) Where(ps ...predicate.LedgerTransaction) *LedgerTransactionUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerTransactionUpdate) SetAnnotations(v models.Annotations) *LedgerTransactionUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerTransactionUpdate) ClearAnnotations() *LedgerTransactionUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerTransactionUpdate) SetUpdatedAt(v time.Time) *LedgerTransactionUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerTransactionUpdate) SetDeletedAt(v time.Time) *LedgerTransactionUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerTransactionUpdate) SetNillableDeletedAt(v *time.Time) *LedgerTransactionUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerTransactionUpdate) ClearDeletedAt() *LedgerTransactionUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_u *LedgerTransactionUpdate) AddEntryIDs(ids ...string) *LedgerTransactionUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_u *LedgerTransactionUpdate) AddEntries(v ...*LedgerEntry) *LedgerTransactionUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerTransactionUpdate) Mutation() *LedgerTransactionMutation", + "line": 87 + }, + { + "kind": "func", + "name": "ClearEntries", + "signature": "func (_u *LedgerTransactionUpdate) ClearEntries() *LedgerTransactionUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "RemoveEntryIDs", + "signature": "func (_u *LedgerTransactionUpdate) RemoveEntryIDs(ids ...string) *LedgerTransactionUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "RemoveEntries", + "signature": "func (_u *LedgerTransactionUpdate) RemoveEntries(v ...*LedgerEntry) *LedgerTransactionUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerTransactionUpdate) Save(ctx context.Context) (int, error)", + "line": 113 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerTransactionUpdate) SaveX(ctx context.Context) int", + "line": 119 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerTransactionUpdate) Exec(ctx context.Context) error", + "line": 128 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerTransactionUpdate) ExecX(ctx context.Context)", + "line": 134 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerTransactionUpdate) defaults()", + "line": 141 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerTransactionUpdate) check() error", + "line": 149 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerTransactionUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 156 + }, + { + "kind": "struct", + "name": "LedgerTransactionUpdateOne", + "signature": "type LedgerTransactionUpdateOne struct", + "line": 241 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerTransactionUpdateOne) SetAnnotations(v models.Annotations) *LedgerTransactionUpdateOne", + "line": 249 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerTransactionUpdateOne) ClearAnnotations() *LedgerTransactionUpdateOne", + "line": 255 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerTransactionUpdateOne) SetUpdatedAt(v time.Time) *LedgerTransactionUpdateOne", + "line": 261 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerTransactionUpdateOne) SetDeletedAt(v time.Time) *LedgerTransactionUpdateOne", + "line": 267 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerTransactionUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerTransactionUpdateOne", + "line": 273 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerTransactionUpdateOne) ClearDeletedAt() *LedgerTransactionUpdateOne", + "line": 281 + }, + { + "kind": "func", + "name": "AddEntryIDs", + "signature": "func (_u *LedgerTransactionUpdateOne) AddEntryIDs(ids ...string) *LedgerTransactionUpdateOne", + "line": 287 + }, + { + "kind": "func", + "name": "AddEntries", + "signature": "func (_u *LedgerTransactionUpdateOne) AddEntries(v ...*LedgerEntry) *LedgerTransactionUpdateOne", + "line": 293 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerTransactionUpdateOne) Mutation() *LedgerTransactionMutation", + "line": 302 + }, + { + "kind": "func", + "name": "ClearEntries", + "signature": "func (_u *LedgerTransactionUpdateOne) ClearEntries() *LedgerTransactionUpdateOne", + "line": 307 + }, + { + "kind": "func", + "name": "RemoveEntryIDs", + "signature": "func (_u *LedgerTransactionUpdateOne) RemoveEntryIDs(ids ...string) *LedgerTransactionUpdateOne", + "line": 313 + }, + { + "kind": "func", + "name": "RemoveEntries", + "signature": "func (_u *LedgerTransactionUpdateOne) RemoveEntries(v ...*LedgerEntry) *LedgerTransactionUpdateOne", + "line": 319 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerTransactionUpdateOne) Where(ps ...predicate.LedgerTransaction) *LedgerTransactionUpdateOne", + "line": 328 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerTransactionUpdateOne) Select(field string, fields ...string) *LedgerTransactionUpdateOne", + "line": 335 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerTransactionUpdateOne) Save(ctx context.Context) (*LedgerTransaction, error)", + "line": 341 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerTransactionUpdateOne) SaveX(ctx context.Context) *LedgerTransaction", + "line": 347 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerTransactionUpdateOne) Exec(ctx context.Context) error", + "line": 356 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerTransactionUpdateOne) ExecX(ctx context.Context)", + "line": 362 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerTransactionUpdateOne) defaults()", + "line": 369 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LedgerTransactionUpdateOne) check() error", + "line": 377 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerTransactionUpdateOne) sqlSave(ctx context.Context) (_node *LedgerTransaction, err error)", + "line": 384 + } + ], + "line_count": 486 + }, + "openmeter/ent/db/ledgertransactiongroup.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroup", + "signature": "type LedgerTransactionGroup struct", + "line": 18 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupEdges", + "signature": "type LedgerTransactionGroupEdges struct", + "line": 39 + }, + { + "kind": "func", + "name": "TransactionsOrErr", + "signature": "func (e LedgerTransactionGroupEdges) TransactionsOrErr() ([]*LedgerTransaction, error)", + "line": 49 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LedgerTransactionGroup) assignValues(columns []string, values []any) error", + "line": 76 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LedgerTransactionGroup) Value(name string) (ent.Value, error)", + "line": 130 + }, + { + "kind": "func", + "name": "QueryTransactions", + "signature": "func (_m *LedgerTransactionGroup) QueryTransactions() *LedgerTransactionQuery", + "line": 135 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LedgerTransactionGroup) Update() *LedgerTransactionGroupUpdateOne", + "line": 142 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LedgerTransactionGroup) Unwrap() *LedgerTransactionGroup", + "line": 148 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LedgerTransactionGroup) String() string", + "line": 158 + } + ], + "line_count": 183 + }, + "openmeter/ent/db/ledgertransactiongroup/ledgertransactiongroup.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 51 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 77 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 82 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 87 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 92 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 97 + }, + { + "kind": "func", + "name": "ByTransactionsCount", + "signature": "func ByTransactionsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 102 + }, + { + "kind": "func", + "name": "ByTransactions", + "signature": "func ByTransactions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "newTransactionsStep", + "signature": "func newTransactionsStep() *sqlgraph.Step", + "line": 114 + } + ], + "line_count": 120 + }, + "openmeter/ent/db/ledgertransactiongroup/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LedgerTransactionGroup", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LedgerTransactionGroup", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LedgerTransactionGroup", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LedgerTransactionGroup", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LedgerTransactionGroup", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LedgerTransactionGroup", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LedgerTransactionGroup", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LedgerTransactionGroup", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LedgerTransactionGroup", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LedgerTransactionGroup", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LedgerTransactionGroup", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LedgerTransactionGroup", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LedgerTransactionGroup", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LedgerTransactionGroup", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LedgerTransactionGroup", + "line": 84 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LedgerTransactionGroup", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LedgerTransactionGroup", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LedgerTransactionGroup", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LedgerTransactionGroup", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LedgerTransactionGroup", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LedgerTransactionGroup", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LedgerTransactionGroup", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LedgerTransactionGroup", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LedgerTransactionGroup", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LedgerTransactionGroup", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LedgerTransactionGroup", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LedgerTransactionGroup", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LedgerTransactionGroup", + "line": 149 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.LedgerTransactionGroup", + "line": 154 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.LedgerTransactionGroup", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LedgerTransactionGroup", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LedgerTransactionGroup", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LedgerTransactionGroup", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LedgerTransactionGroup", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LedgerTransactionGroup", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LedgerTransactionGroup", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LedgerTransactionGroup", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LedgerTransactionGroup", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LedgerTransactionGroup", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LedgerTransactionGroup", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LedgerTransactionGroup", + "line": 289 + }, + { + "kind": "func", + "name": "HasTransactions", + "signature": "func HasTransactions() predicate.LedgerTransactionGroup", + "line": 294 + }, + { + "kind": "func", + "name": "HasTransactionsWith", + "signature": "func HasTransactionsWith(preds ...predicate.LedgerTransaction) predicate.LedgerTransactionGroup", + "line": 305 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LedgerTransactionGroup) predicate.LedgerTransactionGroup", + "line": 317 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LedgerTransactionGroup) predicate.LedgerTransactionGroup", + "line": 322 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LedgerTransactionGroup) predicate.LedgerTransactionGroup", + "line": 327 + } + ], + "line_count": 329 + }, + "openmeter/ent/db/ledgertransactiongroup_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroupCreate", + "signature": "type LedgerTransactionGroupCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LedgerTransactionGroupCreate) SetNamespace(v string) *LedgerTransactionGroupCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *LedgerTransactionGroupCreate) SetAnnotations(v models.Annotations) *LedgerTransactionGroupCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetCreatedAt(v time.Time) *LedgerTransactionGroupCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetNillableCreatedAt(v *time.Time) *LedgerTransactionGroupCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetUpdatedAt(v time.Time) *LedgerTransactionGroupCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetNillableUpdatedAt(v *time.Time) *LedgerTransactionGroupCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetDeletedAt(v time.Time) *LedgerTransactionGroupCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LedgerTransactionGroupCreate) SetNillableDeletedAt(v *time.Time) *LedgerTransactionGroupCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LedgerTransactionGroupCreate) SetID(v string) *LedgerTransactionGroupCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LedgerTransactionGroupCreate) SetNillableID(v *string) *LedgerTransactionGroupCreate", + "line": 89 + }, + { + "kind": "func", + "name": "AddTransactionIDs", + "signature": "func (_c *LedgerTransactionGroupCreate) AddTransactionIDs(ids ...string) *LedgerTransactionGroupCreate", + "line": 97 + }, + { + "kind": "func", + "name": "AddTransactions", + "signature": "func (_c *LedgerTransactionGroupCreate) AddTransactions(v ...*LedgerTransaction) *LedgerTransactionGroupCreate", + "line": 103 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LedgerTransactionGroupCreate) Mutation() *LedgerTransactionGroupMutation", + "line": 112 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerTransactionGroupCreate) Save(ctx context.Context) (*LedgerTransactionGroup, error)", + "line": 117 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerTransactionGroupCreate) SaveX(ctx context.Context) *LedgerTransactionGroup", + "line": 123 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerTransactionGroupCreate) Exec(ctx context.Context) error", + "line": 132 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerTransactionGroupCreate) ExecX(ctx context.Context)", + "line": 138 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LedgerTransactionGroupCreate) defaults()", + "line": 145 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LedgerTransactionGroupCreate) check() error", + "line": 161 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LedgerTransactionGroupCreate) sqlSave(ctx context.Context) (*LedgerTransactionGroup, error)", + "line": 179 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LedgerTransactionGroupCreate) createSpec() (*LedgerTransactionGroup, *sqlgraph.CreateSpec)", + "line": 202 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerTransactionGroupCreate) OnConflict(opts ...sql.ConflictOption) *LedgerTransactionGroupUpsertOne", + "line": 267 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerTransactionGroupCreate) OnConflictColumns(columns ...string) *LedgerTransactionGroupUpsertOne", + "line": 280 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsert) SetAnnotations(v models.Annotations) *LedgerTransactionGroupUpsert", + "line": 301 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsert) UpdateAnnotations() *LedgerTransactionGroupUpsert", + "line": 307 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsert) ClearAnnotations() *LedgerTransactionGroupUpsert", + "line": 313 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsert) SetUpdatedAt(v time.Time) *LedgerTransactionGroupUpsert", + "line": 319 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsert) UpdateUpdatedAt() *LedgerTransactionGroupUpsert", + "line": 325 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsert) SetDeletedAt(v time.Time) *LedgerTransactionGroupUpsert", + "line": 331 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsert) UpdateDeletedAt() *LedgerTransactionGroupUpsert", + "line": 337 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsert) ClearDeletedAt() *LedgerTransactionGroupUpsert", + "line": 343 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerTransactionGroupUpsertOne) UpdateNewValues() *LedgerTransactionGroupUpsertOne", + "line": 359 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerTransactionGroupUpsertOne) Ignore() *LedgerTransactionGroupUpsertOne", + "line": 381 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerTransactionGroupUpsertOne) DoNothing() *LedgerTransactionGroupUpsertOne", + "line": 388 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerTransactionGroupUpsertOne) Update(set func(*LedgerTransactionGroupUpsert)) *LedgerTransactionGroupUpsertOne", + "line": 395 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertOne) SetAnnotations(v models.Annotations) *LedgerTransactionGroupUpsertOne", + "line": 403 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertOne) UpdateAnnotations() *LedgerTransactionGroupUpsertOne", + "line": 410 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertOne) ClearAnnotations() *LedgerTransactionGroupUpsertOne", + "line": 417 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsertOne) SetUpdatedAt(v time.Time) *LedgerTransactionGroupUpsertOne", + "line": 424 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsertOne) UpdateUpdatedAt() *LedgerTransactionGroupUpsertOne", + "line": 431 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertOne) SetDeletedAt(v time.Time) *LedgerTransactionGroupUpsertOne", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertOne) UpdateDeletedAt() *LedgerTransactionGroupUpsertOne", + "line": 445 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertOne) ClearDeletedAt() *LedgerTransactionGroupUpsertOne", + "line": 452 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerTransactionGroupUpsertOne) Exec(ctx context.Context) error", + "line": 459 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerTransactionGroupUpsertOne) ExecX(ctx context.Context)", + "line": 467 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LedgerTransactionGroupUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 474 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LedgerTransactionGroupUpsertOne) IDX(ctx context.Context) string", + "line": 488 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupCreateBulk", + "signature": "type LedgerTransactionGroupCreateBulk struct", + "line": 497 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) Save(ctx context.Context) ([]*LedgerTransactionGroup, error)", + "line": 505 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) SaveX(ctx context.Context) []*LedgerTransactionGroup", + "line": 561 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) Exec(ctx context.Context) error", + "line": 570 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) ExecX(ctx context.Context)", + "line": 576 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *LedgerTransactionGroupUpsertBulk", + "line": 597 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LedgerTransactionGroupCreateBulk) OnConflictColumns(columns ...string) *LedgerTransactionGroupUpsertBulk", + "line": 610 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupUpsertBulk", + "signature": "type LedgerTransactionGroupUpsertBulk struct", + "line": 619 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) UpdateNewValues() *LedgerTransactionGroupUpsertBulk", + "line": 634 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) Ignore() *LedgerTransactionGroupUpsertBulk", + "line": 658 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) DoNothing() *LedgerTransactionGroupUpsertBulk", + "line": 665 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) Update(set func(*LedgerTransactionGroupUpsert)) *LedgerTransactionGroupUpsertBulk", + "line": 672 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) SetAnnotations(v models.Annotations) *LedgerTransactionGroupUpsertBulk", + "line": 680 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) UpdateAnnotations() *LedgerTransactionGroupUpsertBulk", + "line": 687 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) ClearAnnotations() *LedgerTransactionGroupUpsertBulk", + "line": 694 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) SetUpdatedAt(v time.Time) *LedgerTransactionGroupUpsertBulk", + "line": 701 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) UpdateUpdatedAt() *LedgerTransactionGroupUpsertBulk", + "line": 708 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) SetDeletedAt(v time.Time) *LedgerTransactionGroupUpsertBulk", + "line": 715 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) UpdateDeletedAt() *LedgerTransactionGroupUpsertBulk", + "line": 722 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) ClearDeletedAt() *LedgerTransactionGroupUpsertBulk", + "line": 729 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) Exec(ctx context.Context) error", + "line": 736 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LedgerTransactionGroupUpsertBulk) ExecX(ctx context.Context)", + "line": 752 + } + ], + "line_count": 756 + }, + "openmeter/ent/db/ledgertransactiongroup_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroupDelete", + "signature": "type LedgerTransactionGroupDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerTransactionGroupDelete) Where(ps ...predicate.LedgerTransactionGroup) *LedgerTransactionGroupDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerTransactionGroupDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerTransactionGroupDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LedgerTransactionGroupDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupDeleteOne", + "signature": "type LedgerTransactionGroupDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LedgerTransactionGroupDeleteOne) Where(ps ...predicate.LedgerTransactionGroup) *LedgerTransactionGroupDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LedgerTransactionGroupDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LedgerTransactionGroupDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/ledgertransactiongroup_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroupQuery", + "signature": "type LedgerTransactionGroupQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LedgerTransactionGroupQuery) Where(ps ...predicate.LedgerTransactionGroup) *LedgerTransactionGroupQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LedgerTransactionGroupQuery) Limit(limit int) *LedgerTransactionGroupQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LedgerTransactionGroupQuery) Offset(offset int) *LedgerTransactionGroupQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LedgerTransactionGroupQuery) Unique(unique bool) *LedgerTransactionGroupQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LedgerTransactionGroupQuery) Order(o ...ledgertransactiongroup.OrderOption) *LedgerTransactionGroupQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryTransactions", + "signature": "func (_q *LedgerTransactionGroupQuery) QueryTransactions() *LedgerTransactionQuery", + "line": 67 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LedgerTransactionGroupQuery) First(ctx context.Context) (*LedgerTransactionGroup, error)", + "line": 90 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LedgerTransactionGroupQuery) FirstX(ctx context.Context) *LedgerTransactionGroup", + "line": 102 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LedgerTransactionGroupQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LedgerTransactionGroupQuery) FirstIDX(ctx context.Context) string", + "line": 125 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LedgerTransactionGroupQuery) Only(ctx context.Context) (*LedgerTransactionGroup, error)", + "line": 136 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LedgerTransactionGroupQuery) OnlyX(ctx context.Context) *LedgerTransactionGroup", + "line": 152 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LedgerTransactionGroupQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 163 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LedgerTransactionGroupQuery) OnlyIDX(ctx context.Context) string", + "line": 180 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LedgerTransactionGroupQuery) All(ctx context.Context) ([]*LedgerTransactionGroup, error)", + "line": 189 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LedgerTransactionGroupQuery) AllX(ctx context.Context) []*LedgerTransactionGroup", + "line": 199 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LedgerTransactionGroupQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 208 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LedgerTransactionGroupQuery) IDsX(ctx context.Context) []string", + "line": 220 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LedgerTransactionGroupQuery) Count(ctx context.Context) (int, error)", + "line": 229 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LedgerTransactionGroupQuery) CountX(ctx context.Context) int", + "line": 238 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LedgerTransactionGroupQuery) Exist(ctx context.Context) (bool, error)", + "line": 247 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LedgerTransactionGroupQuery) ExistX(ctx context.Context) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LedgerTransactionGroupQuery) Clone() *LedgerTransactionGroupQuery", + "line": 270 + }, + { + "kind": "func", + "name": "WithTransactions", + "signature": "func (_q *LedgerTransactionGroupQuery) WithTransactions(opts ...func(*LedgerTransactionQuery)) *LedgerTransactionGroupQuery", + "line": 289 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LedgerTransactionGroupQuery) GroupBy(field string, fields ...string) *LedgerTransactionGroupGroupBy", + "line": 312 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LedgerTransactionGroupQuery) Select(fields ...string) *LedgerTransactionGroupSelect", + "line": 333 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LedgerTransactionGroupQuery) Aggregate(fns ...AggregateFunc) *LedgerTransactionGroupSelect", + "line": 342 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LedgerTransactionGroupQuery) prepareQuery(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LedgerTransactionGroupQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LedgerTransactionGroup, error)", + "line": 372 + }, + { + "kind": "func", + "name": "loadTransactions", + "signature": "func (_q *LedgerTransactionGroupQuery) loadTransactions(ctx context.Context, query *LedgerTransactionQuery, nodes []*LedgerTransactionGroup, init func(*LedgerTransactionGroup), assign func(*LedgerTransactionGroup, *LedgerTransaction)) error", + "line": 413 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LedgerTransactionGroupQuery) sqlCount(ctx context.Context) (int, error)", + "line": 444 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LedgerTransactionGroupQuery) querySpec() *sqlgraph.QuerySpec", + "line": 456 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LedgerTransactionGroupQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 496 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LedgerTransactionGroupQuery) ForUpdate(opts ...sql.LockOption) *LedgerTransactionGroupQuery", + "line": 534 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LedgerTransactionGroupQuery) ForShare(opts ...sql.LockOption) *LedgerTransactionGroupQuery", + "line": 547 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupGroupBy", + "signature": "type LedgerTransactionGroupGroupBy struct", + "line": 558 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LedgerTransactionGroupGroupBy) Aggregate(fns ...AggregateFunc) *LedgerTransactionGroupGroupBy", + "line": 564 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LedgerTransactionGroupGroupBy) Scan(ctx context.Context, v any) error", + "line": 570 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LedgerTransactionGroupGroupBy) sqlScan(ctx context.Context, root *LedgerTransactionGroupQuery, v any) error", + "line": 578 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupSelect", + "signature": "type LedgerTransactionGroupSelect struct", + "line": 606 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LedgerTransactionGroupSelect) Aggregate(fns ...AggregateFunc) *LedgerTransactionGroupSelect", + "line": 612 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LedgerTransactionGroupSelect) Scan(ctx context.Context, v any) error", + "line": 618 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LedgerTransactionGroupSelect) sqlScan(ctx context.Context, root *LedgerTransactionGroupQuery, v any) error", + "line": 626 + } + ], + "line_count": 645 + }, + "openmeter/ent/db/ledgertransactiongroup_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroupUpdate", + "signature": "type LedgerTransactionGroupUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerTransactionGroupUpdate) Where(ps ...predicate.LedgerTransactionGroup) *LedgerTransactionGroupUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerTransactionGroupUpdate) SetAnnotations(v models.Annotations) *LedgerTransactionGroupUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerTransactionGroupUpdate) ClearAnnotations() *LedgerTransactionGroupUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerTransactionGroupUpdate) SetUpdatedAt(v time.Time) *LedgerTransactionGroupUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdate) SetDeletedAt(v time.Time) *LedgerTransactionGroupUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdate) SetNillableDeletedAt(v *time.Time) *LedgerTransactionGroupUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdate) ClearDeletedAt() *LedgerTransactionGroupUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "AddTransactionIDs", + "signature": "func (_u *LedgerTransactionGroupUpdate) AddTransactionIDs(ids ...string) *LedgerTransactionGroupUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "AddTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdate) AddTransactions(v ...*LedgerTransaction) *LedgerTransactionGroupUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerTransactionGroupUpdate) Mutation() *LedgerTransactionGroupMutation", + "line": 87 + }, + { + "kind": "func", + "name": "ClearTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdate) ClearTransactions() *LedgerTransactionGroupUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "RemoveTransactionIDs", + "signature": "func (_u *LedgerTransactionGroupUpdate) RemoveTransactionIDs(ids ...string) *LedgerTransactionGroupUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "RemoveTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdate) RemoveTransactions(v ...*LedgerTransaction) *LedgerTransactionGroupUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerTransactionGroupUpdate) Save(ctx context.Context) (int, error)", + "line": 113 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerTransactionGroupUpdate) SaveX(ctx context.Context) int", + "line": 119 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerTransactionGroupUpdate) Exec(ctx context.Context) error", + "line": 128 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerTransactionGroupUpdate) ExecX(ctx context.Context)", + "line": 134 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerTransactionGroupUpdate) defaults()", + "line": 141 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerTransactionGroupUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 148 + }, + { + "kind": "struct", + "name": "LedgerTransactionGroupUpdateOne", + "signature": "type LedgerTransactionGroupUpdateOne struct", + "line": 230 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) SetAnnotations(v models.Annotations) *LedgerTransactionGroupUpdateOne", + "line": 238 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) ClearAnnotations() *LedgerTransactionGroupUpdateOne", + "line": 244 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) SetUpdatedAt(v time.Time) *LedgerTransactionGroupUpdateOne", + "line": 250 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) SetDeletedAt(v time.Time) *LedgerTransactionGroupUpdateOne", + "line": 256 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) SetNillableDeletedAt(v *time.Time) *LedgerTransactionGroupUpdateOne", + "line": 262 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) ClearDeletedAt() *LedgerTransactionGroupUpdateOne", + "line": 270 + }, + { + "kind": "func", + "name": "AddTransactionIDs", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) AddTransactionIDs(ids ...string) *LedgerTransactionGroupUpdateOne", + "line": 276 + }, + { + "kind": "func", + "name": "AddTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) AddTransactions(v ...*LedgerTransaction) *LedgerTransactionGroupUpdateOne", + "line": 282 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) Mutation() *LedgerTransactionGroupMutation", + "line": 291 + }, + { + "kind": "func", + "name": "ClearTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) ClearTransactions() *LedgerTransactionGroupUpdateOne", + "line": 296 + }, + { + "kind": "func", + "name": "RemoveTransactionIDs", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) RemoveTransactionIDs(ids ...string) *LedgerTransactionGroupUpdateOne", + "line": 302 + }, + { + "kind": "func", + "name": "RemoveTransactions", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) RemoveTransactions(v ...*LedgerTransaction) *LedgerTransactionGroupUpdateOne", + "line": 308 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) Where(ps ...predicate.LedgerTransactionGroup) *LedgerTransactionGroupUpdateOne", + "line": 317 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) Select(field string, fields ...string) *LedgerTransactionGroupUpdateOne", + "line": 324 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) Save(ctx context.Context) (*LedgerTransactionGroup, error)", + "line": 330 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) SaveX(ctx context.Context) *LedgerTransactionGroup", + "line": 336 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) Exec(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) ExecX(ctx context.Context)", + "line": 351 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) defaults()", + "line": 358 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LedgerTransactionGroupUpdateOne) sqlSave(ctx context.Context) (_node *LedgerTransactionGroup, err error)", + "line": 365 + } + ], + "line_count": 464 + }, + "openmeter/ent/db/llmcostprice.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPrice", + "signature": "type LLMCostPrice struct", + "line": 19 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *LLMCostPrice) assignValues(columns []string, values []any) error", + "line": 86 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *LLMCostPrice) Value(name string) (ent.Value, error)", + "line": 220 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *LLMCostPrice) Update() *LLMCostPriceUpdateOne", + "line": 227 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *LLMCostPrice) Unwrap() *LLMCostPrice", + "line": 233 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *LLMCostPrice) String() string", + "line": 243 + } + ], + "line_count": 311 + }, + "openmeter/ent/db/llmcostprice/llmcostprice.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 83 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByProvider", + "signature": "func ByProvider(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByModelID", + "signature": "func ByModelID(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByModelName", + "signature": "func ByModelName(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByInputPerToken", + "signature": "func ByInputPerToken(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByOutputPerToken", + "signature": "func ByOutputPerToken(opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByCacheReadPerToken", + "signature": "func ByCacheReadPerToken(opts ...sql.OrderTermOption) OrderOption", + "line": 179 + }, + { + "kind": "func", + "name": "ByReasoningPerToken", + "signature": "func ByReasoningPerToken(opts ...sql.OrderTermOption) OrderOption", + "line": 184 + }, + { + "kind": "func", + "name": "ByCacheWritePerToken", + "signature": "func ByCacheWritePerToken(opts ...sql.OrderTermOption) OrderOption", + "line": 189 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 194 + }, + { + "kind": "func", + "name": "BySource", + "signature": "func BySource(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "BySourcePrices", + "signature": "func BySourcePrices(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "ByEffectiveFrom", + "signature": "func ByEffectiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByEffectiveTo", + "signature": "func ByEffectiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 214 + } + ], + "line_count": 216 + }, + "openmeter/ent/db/llmcostprice/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.LLMCostPrice", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.LLMCostPrice", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.LLMCostPrice", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.LLMCostPrice", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.LLMCostPrice", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.LLMCostPrice", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.LLMCostPrice", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.LLMCostPrice", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.LLMCostPrice", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.LLMCostPrice", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.LLMCostPrice", + "line": 64 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.LLMCostPrice", + "line": 69 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.LLMCostPrice", + "line": 74 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.LLMCostPrice", + "line": 79 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.LLMCostPrice", + "line": 84 + }, + { + "kind": "func", + "name": "Provider", + "signature": "func Provider(v string) predicate.LLMCostPrice", + "line": 89 + }, + { + "kind": "func", + "name": "ModelID", + "signature": "func ModelID(v string) predicate.LLMCostPrice", + "line": 94 + }, + { + "kind": "func", + "name": "ModelName", + "signature": "func ModelName(v string) predicate.LLMCostPrice", + "line": 99 + }, + { + "kind": "func", + "name": "InputPerToken", + "signature": "func InputPerToken(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 104 + }, + { + "kind": "func", + "name": "OutputPerToken", + "signature": "func OutputPerToken(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 109 + }, + { + "kind": "func", + "name": "CacheReadPerToken", + "signature": "func CacheReadPerToken(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 114 + }, + { + "kind": "func", + "name": "ReasoningPerToken", + "signature": "func ReasoningPerToken(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 119 + }, + { + "kind": "func", + "name": "CacheWritePerToken", + "signature": "func CacheWritePerToken(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 124 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v string) predicate.LLMCostPrice", + "line": 129 + }, + { + "kind": "func", + "name": "Source", + "signature": "func Source(v string) predicate.LLMCostPrice", + "line": 134 + }, + { + "kind": "func", + "name": "EffectiveFrom", + "signature": "func EffectiveFrom(v time.Time) predicate.LLMCostPrice", + "line": 139 + }, + { + "kind": "func", + "name": "EffectiveTo", + "signature": "func EffectiveTo(v time.Time) predicate.LLMCostPrice", + "line": 144 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.LLMCostPrice", + "line": 149 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.LLMCostPrice", + "line": 154 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.LLMCostPrice", + "line": 159 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.LLMCostPrice", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.LLMCostPrice", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.LLMCostPrice", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.LLMCostPrice", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.LLMCostPrice", + "line": 194 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.LLMCostPrice", + "line": 199 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.LLMCostPrice", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.LLMCostPrice", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.LLMCostPrice", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.LLMCostPrice", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.LLMCostPrice", + "line": 234 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.LLMCostPrice", + "line": 239 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.LLMCostPrice", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.LLMCostPrice", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.LLMCostPrice", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.LLMCostPrice", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.LLMCostPrice", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.LLMCostPrice", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.LLMCostPrice", + "line": 284 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.LLMCostPrice", + "line": 289 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.LLMCostPrice", + "line": 294 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.LLMCostPrice", + "line": 299 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.LLMCostPrice", + "line": 304 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.LLMCostPrice", + "line": 309 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.LLMCostPrice", + "line": 314 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.LLMCostPrice", + "line": 319 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.LLMCostPrice", + "line": 324 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.LLMCostPrice", + "line": 329 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.LLMCostPrice", + "line": 334 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.LLMCostPrice", + "line": 339 + }, + { + "kind": "func", + "name": "NamespaceIsNil", + "signature": "func NamespaceIsNil() predicate.LLMCostPrice", + "line": 344 + }, + { + "kind": "func", + "name": "NamespaceNotNil", + "signature": "func NamespaceNotNil() predicate.LLMCostPrice", + "line": 349 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.LLMCostPrice", + "line": 354 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.LLMCostPrice", + "line": 359 + }, + { + "kind": "func", + "name": "ProviderEQ", + "signature": "func ProviderEQ(v string) predicate.LLMCostPrice", + "line": 364 + }, + { + "kind": "func", + "name": "ProviderNEQ", + "signature": "func ProviderNEQ(v string) predicate.LLMCostPrice", + "line": 369 + }, + { + "kind": "func", + "name": "ProviderIn", + "signature": "func ProviderIn(vs ...string) predicate.LLMCostPrice", + "line": 374 + }, + { + "kind": "func", + "name": "ProviderNotIn", + "signature": "func ProviderNotIn(vs ...string) predicate.LLMCostPrice", + "line": 379 + }, + { + "kind": "func", + "name": "ProviderGT", + "signature": "func ProviderGT(v string) predicate.LLMCostPrice", + "line": 384 + }, + { + "kind": "func", + "name": "ProviderGTE", + "signature": "func ProviderGTE(v string) predicate.LLMCostPrice", + "line": 389 + }, + { + "kind": "func", + "name": "ProviderLT", + "signature": "func ProviderLT(v string) predicate.LLMCostPrice", + "line": 394 + }, + { + "kind": "func", + "name": "ProviderLTE", + "signature": "func ProviderLTE(v string) predicate.LLMCostPrice", + "line": 399 + }, + { + "kind": "func", + "name": "ProviderContains", + "signature": "func ProviderContains(v string) predicate.LLMCostPrice", + "line": 404 + }, + { + "kind": "func", + "name": "ProviderHasPrefix", + "signature": "func ProviderHasPrefix(v string) predicate.LLMCostPrice", + "line": 409 + }, + { + "kind": "func", + "name": "ProviderHasSuffix", + "signature": "func ProviderHasSuffix(v string) predicate.LLMCostPrice", + "line": 414 + }, + { + "kind": "func", + "name": "ProviderEqualFold", + "signature": "func ProviderEqualFold(v string) predicate.LLMCostPrice", + "line": 419 + }, + { + "kind": "func", + "name": "ProviderContainsFold", + "signature": "func ProviderContainsFold(v string) predicate.LLMCostPrice", + "line": 424 + }, + { + "kind": "func", + "name": "ModelIDEQ", + "signature": "func ModelIDEQ(v string) predicate.LLMCostPrice", + "line": 429 + }, + { + "kind": "func", + "name": "ModelIDNEQ", + "signature": "func ModelIDNEQ(v string) predicate.LLMCostPrice", + "line": 434 + }, + { + "kind": "func", + "name": "ModelIDIn", + "signature": "func ModelIDIn(vs ...string) predicate.LLMCostPrice", + "line": 439 + }, + { + "kind": "func", + "name": "ModelIDNotIn", + "signature": "func ModelIDNotIn(vs ...string) predicate.LLMCostPrice", + "line": 444 + }, + { + "kind": "func", + "name": "ModelIDGT", + "signature": "func ModelIDGT(v string) predicate.LLMCostPrice", + "line": 449 + }, + { + "kind": "func", + "name": "ModelIDGTE", + "signature": "func ModelIDGTE(v string) predicate.LLMCostPrice", + "line": 454 + }, + { + "kind": "func", + "name": "ModelIDLT", + "signature": "func ModelIDLT(v string) predicate.LLMCostPrice", + "line": 459 + }, + { + "kind": "func", + "name": "ModelIDLTE", + "signature": "func ModelIDLTE(v string) predicate.LLMCostPrice", + "line": 464 + }, + { + "kind": "func", + "name": "ModelIDContains", + "signature": "func ModelIDContains(v string) predicate.LLMCostPrice", + "line": 469 + }, + { + "kind": "func", + "name": "ModelIDHasPrefix", + "signature": "func ModelIDHasPrefix(v string) predicate.LLMCostPrice", + "line": 474 + }, + { + "kind": "func", + "name": "ModelIDHasSuffix", + "signature": "func ModelIDHasSuffix(v string) predicate.LLMCostPrice", + "line": 479 + }, + { + "kind": "func", + "name": "ModelIDEqualFold", + "signature": "func ModelIDEqualFold(v string) predicate.LLMCostPrice", + "line": 484 + }, + { + "kind": "func", + "name": "ModelIDContainsFold", + "signature": "func ModelIDContainsFold(v string) predicate.LLMCostPrice", + "line": 489 + }, + { + "kind": "func", + "name": "ModelNameEQ", + "signature": "func ModelNameEQ(v string) predicate.LLMCostPrice", + "line": 494 + }, + { + "kind": "func", + "name": "ModelNameNEQ", + "signature": "func ModelNameNEQ(v string) predicate.LLMCostPrice", + "line": 499 + }, + { + "kind": "func", + "name": "ModelNameIn", + "signature": "func ModelNameIn(vs ...string) predicate.LLMCostPrice", + "line": 504 + }, + { + "kind": "func", + "name": "ModelNameNotIn", + "signature": "func ModelNameNotIn(vs ...string) predicate.LLMCostPrice", + "line": 509 + }, + { + "kind": "func", + "name": "ModelNameGT", + "signature": "func ModelNameGT(v string) predicate.LLMCostPrice", + "line": 514 + }, + { + "kind": "func", + "name": "ModelNameGTE", + "signature": "func ModelNameGTE(v string) predicate.LLMCostPrice", + "line": 519 + }, + { + "kind": "func", + "name": "ModelNameLT", + "signature": "func ModelNameLT(v string) predicate.LLMCostPrice", + "line": 524 + }, + { + "kind": "func", + "name": "ModelNameLTE", + "signature": "func ModelNameLTE(v string) predicate.LLMCostPrice", + "line": 529 + }, + { + "kind": "func", + "name": "ModelNameContains", + "signature": "func ModelNameContains(v string) predicate.LLMCostPrice", + "line": 534 + }, + { + "kind": "func", + "name": "ModelNameHasPrefix", + "signature": "func ModelNameHasPrefix(v string) predicate.LLMCostPrice", + "line": 539 + }, + { + "kind": "func", + "name": "ModelNameHasSuffix", + "signature": "func ModelNameHasSuffix(v string) predicate.LLMCostPrice", + "line": 544 + }, + { + "kind": "func", + "name": "ModelNameEqualFold", + "signature": "func ModelNameEqualFold(v string) predicate.LLMCostPrice", + "line": 549 + }, + { + "kind": "func", + "name": "ModelNameContainsFold", + "signature": "func ModelNameContainsFold(v string) predicate.LLMCostPrice", + "line": 554 + }, + { + "kind": "func", + "name": "InputPerTokenEQ", + "signature": "func InputPerTokenEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 559 + }, + { + "kind": "func", + "name": "InputPerTokenNEQ", + "signature": "func InputPerTokenNEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 564 + }, + { + "kind": "func", + "name": "InputPerTokenIn", + "signature": "func InputPerTokenIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 569 + }, + { + "kind": "func", + "name": "InputPerTokenNotIn", + "signature": "func InputPerTokenNotIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 574 + }, + { + "kind": "func", + "name": "InputPerTokenGT", + "signature": "func InputPerTokenGT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 579 + }, + { + "kind": "func", + "name": "InputPerTokenGTE", + "signature": "func InputPerTokenGTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 584 + }, + { + "kind": "func", + "name": "InputPerTokenLT", + "signature": "func InputPerTokenLT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 589 + }, + { + "kind": "func", + "name": "InputPerTokenLTE", + "signature": "func InputPerTokenLTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 594 + }, + { + "kind": "func", + "name": "OutputPerTokenEQ", + "signature": "func OutputPerTokenEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 599 + }, + { + "kind": "func", + "name": "OutputPerTokenNEQ", + "signature": "func OutputPerTokenNEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 604 + }, + { + "kind": "func", + "name": "OutputPerTokenIn", + "signature": "func OutputPerTokenIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 609 + }, + { + "kind": "func", + "name": "OutputPerTokenNotIn", + "signature": "func OutputPerTokenNotIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 614 + }, + { + "kind": "func", + "name": "OutputPerTokenGT", + "signature": "func OutputPerTokenGT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 619 + }, + { + "kind": "func", + "name": "OutputPerTokenGTE", + "signature": "func OutputPerTokenGTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 624 + }, + { + "kind": "func", + "name": "OutputPerTokenLT", + "signature": "func OutputPerTokenLT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 629 + }, + { + "kind": "func", + "name": "OutputPerTokenLTE", + "signature": "func OutputPerTokenLTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 634 + }, + { + "kind": "func", + "name": "CacheReadPerTokenEQ", + "signature": "func CacheReadPerTokenEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 639 + }, + { + "kind": "func", + "name": "CacheReadPerTokenNEQ", + "signature": "func CacheReadPerTokenNEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 644 + }, + { + "kind": "func", + "name": "CacheReadPerTokenIn", + "signature": "func CacheReadPerTokenIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 649 + }, + { + "kind": "func", + "name": "CacheReadPerTokenNotIn", + "signature": "func CacheReadPerTokenNotIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 654 + }, + { + "kind": "func", + "name": "CacheReadPerTokenGT", + "signature": "func CacheReadPerTokenGT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 659 + }, + { + "kind": "func", + "name": "CacheReadPerTokenGTE", + "signature": "func CacheReadPerTokenGTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 664 + }, + { + "kind": "func", + "name": "CacheReadPerTokenLT", + "signature": "func CacheReadPerTokenLT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 669 + }, + { + "kind": "func", + "name": "CacheReadPerTokenLTE", + "signature": "func CacheReadPerTokenLTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 674 + }, + { + "kind": "func", + "name": "ReasoningPerTokenEQ", + "signature": "func ReasoningPerTokenEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 679 + }, + { + "kind": "func", + "name": "ReasoningPerTokenNEQ", + "signature": "func ReasoningPerTokenNEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 684 + }, + { + "kind": "func", + "name": "ReasoningPerTokenIn", + "signature": "func ReasoningPerTokenIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 689 + }, + { + "kind": "func", + "name": "ReasoningPerTokenNotIn", + "signature": "func ReasoningPerTokenNotIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 694 + }, + { + "kind": "func", + "name": "ReasoningPerTokenGT", + "signature": "func ReasoningPerTokenGT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 699 + }, + { + "kind": "func", + "name": "ReasoningPerTokenGTE", + "signature": "func ReasoningPerTokenGTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 704 + }, + { + "kind": "func", + "name": "ReasoningPerTokenLT", + "signature": "func ReasoningPerTokenLT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 709 + }, + { + "kind": "func", + "name": "ReasoningPerTokenLTE", + "signature": "func ReasoningPerTokenLTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 714 + }, + { + "kind": "func", + "name": "CacheWritePerTokenEQ", + "signature": "func CacheWritePerTokenEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 719 + }, + { + "kind": "func", + "name": "CacheWritePerTokenNEQ", + "signature": "func CacheWritePerTokenNEQ(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 724 + }, + { + "kind": "func", + "name": "CacheWritePerTokenIn", + "signature": "func CacheWritePerTokenIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 729 + }, + { + "kind": "func", + "name": "CacheWritePerTokenNotIn", + "signature": "func CacheWritePerTokenNotIn(vs ...alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 734 + }, + { + "kind": "func", + "name": "CacheWritePerTokenGT", + "signature": "func CacheWritePerTokenGT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 739 + }, + { + "kind": "func", + "name": "CacheWritePerTokenGTE", + "signature": "func CacheWritePerTokenGTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 744 + }, + { + "kind": "func", + "name": "CacheWritePerTokenLT", + "signature": "func CacheWritePerTokenLT(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 749 + }, + { + "kind": "func", + "name": "CacheWritePerTokenLTE", + "signature": "func CacheWritePerTokenLTE(v alpacadecimal.Decimal) predicate.LLMCostPrice", + "line": 754 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v string) predicate.LLMCostPrice", + "line": 759 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v string) predicate.LLMCostPrice", + "line": 764 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...string) predicate.LLMCostPrice", + "line": 769 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...string) predicate.LLMCostPrice", + "line": 774 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v string) predicate.LLMCostPrice", + "line": 779 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v string) predicate.LLMCostPrice", + "line": 784 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v string) predicate.LLMCostPrice", + "line": 789 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v string) predicate.LLMCostPrice", + "line": 794 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v string) predicate.LLMCostPrice", + "line": 799 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v string) predicate.LLMCostPrice", + "line": 804 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v string) predicate.LLMCostPrice", + "line": 809 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v string) predicate.LLMCostPrice", + "line": 814 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v string) predicate.LLMCostPrice", + "line": 819 + }, + { + "kind": "func", + "name": "SourceEQ", + "signature": "func SourceEQ(v string) predicate.LLMCostPrice", + "line": 824 + }, + { + "kind": "func", + "name": "SourceNEQ", + "signature": "func SourceNEQ(v string) predicate.LLMCostPrice", + "line": 829 + }, + { + "kind": "func", + "name": "SourceIn", + "signature": "func SourceIn(vs ...string) predicate.LLMCostPrice", + "line": 834 + }, + { + "kind": "func", + "name": "SourceNotIn", + "signature": "func SourceNotIn(vs ...string) predicate.LLMCostPrice", + "line": 839 + }, + { + "kind": "func", + "name": "SourceGT", + "signature": "func SourceGT(v string) predicate.LLMCostPrice", + "line": 844 + }, + { + "kind": "func", + "name": "SourceGTE", + "signature": "func SourceGTE(v string) predicate.LLMCostPrice", + "line": 849 + }, + { + "kind": "func", + "name": "SourceLT", + "signature": "func SourceLT(v string) predicate.LLMCostPrice", + "line": 854 + }, + { + "kind": "func", + "name": "SourceLTE", + "signature": "func SourceLTE(v string) predicate.LLMCostPrice", + "line": 859 + }, + { + "kind": "func", + "name": "SourceContains", + "signature": "func SourceContains(v string) predicate.LLMCostPrice", + "line": 864 + }, + { + "kind": "func", + "name": "SourceHasPrefix", + "signature": "func SourceHasPrefix(v string) predicate.LLMCostPrice", + "line": 869 + }, + { + "kind": "func", + "name": "SourceHasSuffix", + "signature": "func SourceHasSuffix(v string) predicate.LLMCostPrice", + "line": 874 + }, + { + "kind": "func", + "name": "SourceEqualFold", + "signature": "func SourceEqualFold(v string) predicate.LLMCostPrice", + "line": 879 + }, + { + "kind": "func", + "name": "SourceContainsFold", + "signature": "func SourceContainsFold(v string) predicate.LLMCostPrice", + "line": 884 + }, + { + "kind": "func", + "name": "SourcePricesIsNil", + "signature": "func SourcePricesIsNil() predicate.LLMCostPrice", + "line": 889 + }, + { + "kind": "func", + "name": "SourcePricesNotNil", + "signature": "func SourcePricesNotNil() predicate.LLMCostPrice", + "line": 894 + }, + { + "kind": "func", + "name": "EffectiveFromEQ", + "signature": "func EffectiveFromEQ(v time.Time) predicate.LLMCostPrice", + "line": 899 + }, + { + "kind": "func", + "name": "EffectiveFromNEQ", + "signature": "func EffectiveFromNEQ(v time.Time) predicate.LLMCostPrice", + "line": 904 + }, + { + "kind": "func", + "name": "EffectiveFromIn", + "signature": "func EffectiveFromIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 909 + }, + { + "kind": "func", + "name": "EffectiveFromNotIn", + "signature": "func EffectiveFromNotIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 914 + }, + { + "kind": "func", + "name": "EffectiveFromGT", + "signature": "func EffectiveFromGT(v time.Time) predicate.LLMCostPrice", + "line": 919 + }, + { + "kind": "func", + "name": "EffectiveFromGTE", + "signature": "func EffectiveFromGTE(v time.Time) predicate.LLMCostPrice", + "line": 924 + }, + { + "kind": "func", + "name": "EffectiveFromLT", + "signature": "func EffectiveFromLT(v time.Time) predicate.LLMCostPrice", + "line": 929 + }, + { + "kind": "func", + "name": "EffectiveFromLTE", + "signature": "func EffectiveFromLTE(v time.Time) predicate.LLMCostPrice", + "line": 934 + }, + { + "kind": "func", + "name": "EffectiveToEQ", + "signature": "func EffectiveToEQ(v time.Time) predicate.LLMCostPrice", + "line": 939 + }, + { + "kind": "func", + "name": "EffectiveToNEQ", + "signature": "func EffectiveToNEQ(v time.Time) predicate.LLMCostPrice", + "line": 944 + }, + { + "kind": "func", + "name": "EffectiveToIn", + "signature": "func EffectiveToIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 949 + }, + { + "kind": "func", + "name": "EffectiveToNotIn", + "signature": "func EffectiveToNotIn(vs ...time.Time) predicate.LLMCostPrice", + "line": 954 + }, + { + "kind": "func", + "name": "EffectiveToGT", + "signature": "func EffectiveToGT(v time.Time) predicate.LLMCostPrice", + "line": 959 + }, + { + "kind": "func", + "name": "EffectiveToGTE", + "signature": "func EffectiveToGTE(v time.Time) predicate.LLMCostPrice", + "line": 964 + }, + { + "kind": "func", + "name": "EffectiveToLT", + "signature": "func EffectiveToLT(v time.Time) predicate.LLMCostPrice", + "line": 969 + }, + { + "kind": "func", + "name": "EffectiveToLTE", + "signature": "func EffectiveToLTE(v time.Time) predicate.LLMCostPrice", + "line": 974 + }, + { + "kind": "func", + "name": "EffectiveToIsNil", + "signature": "func EffectiveToIsNil() predicate.LLMCostPrice", + "line": 979 + }, + { + "kind": "func", + "name": "EffectiveToNotNil", + "signature": "func EffectiveToNotNil() predicate.LLMCostPrice", + "line": 984 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.LLMCostPrice) predicate.LLMCostPrice", + "line": 989 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.LLMCostPrice) predicate.LLMCostPrice", + "line": 994 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.LLMCostPrice) predicate.LLMCostPrice", + "line": 999 + } + ], + "line_count": 1001 + }, + "openmeter/ent/db/llmcostprice_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPriceCreate", + "signature": "type LLMCostPriceCreate struct", + "line": 21 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *LLMCostPriceCreate) SetMetadata(v map[string]string) *LLMCostPriceCreate", + "line": 29 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *LLMCostPriceCreate) SetCreatedAt(v time.Time) *LLMCostPriceCreate", + "line": 35 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *LLMCostPriceCreate) SetNillableCreatedAt(v *time.Time) *LLMCostPriceCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *LLMCostPriceCreate) SetUpdatedAt(v time.Time) *LLMCostPriceCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *LLMCostPriceCreate) SetNillableUpdatedAt(v *time.Time) *LLMCostPriceCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *LLMCostPriceCreate) SetDeletedAt(v time.Time) *LLMCostPriceCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *LLMCostPriceCreate) SetNillableDeletedAt(v *time.Time) *LLMCostPriceCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *LLMCostPriceCreate) SetNamespace(v string) *LLMCostPriceCreate", + "line": 77 + }, + { + "kind": "func", + "name": "SetNillableNamespace", + "signature": "func (_c *LLMCostPriceCreate) SetNillableNamespace(v *string) *LLMCostPriceCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (_c *LLMCostPriceCreate) SetProvider(v string) *LLMCostPriceCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (_c *LLMCostPriceCreate) SetModelID(v string) *LLMCostPriceCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (_c *LLMCostPriceCreate) SetModelName(v string) *LLMCostPriceCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillableModelName", + "signature": "func (_c *LLMCostPriceCreate) SetNillableModelName(v *string) *LLMCostPriceCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableCacheReadPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetNillableCacheReadPerToken(v *alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 143 + }, + { + "kind": "func", + "name": "SetNillableReasoningPerToken", + "signature": "func (_c *LLMCostPriceCreate) SetNillableReasoningPerToken(v *alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (_c *LLMCostPriceCreate) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 157 + }, + { + "kind": "func", + "name": "SetNillableCacheWritePerToken", + "signature": "func (_c *LLMCostPriceCreate) SetNillableCacheWritePerToken(v *alpacadecimal.Decimal) *LLMCostPriceCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *LLMCostPriceCreate) SetCurrency(v string) *LLMCostPriceCreate", + "line": 171 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_c *LLMCostPriceCreate) SetNillableCurrency(v *string) *LLMCostPriceCreate", + "line": 177 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (_c *LLMCostPriceCreate) SetSource(v string) *LLMCostPriceCreate", + "line": 185 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (_c *LLMCostPriceCreate) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceCreate", + "line": 191 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_c *LLMCostPriceCreate) SetEffectiveFrom(v time.Time) *LLMCostPriceCreate", + "line": 197 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_c *LLMCostPriceCreate) SetEffectiveTo(v time.Time) *LLMCostPriceCreate", + "line": 203 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_c *LLMCostPriceCreate) SetNillableEffectiveTo(v *time.Time) *LLMCostPriceCreate", + "line": 209 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *LLMCostPriceCreate) SetID(v string) *LLMCostPriceCreate", + "line": 217 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *LLMCostPriceCreate) SetNillableID(v *string) *LLMCostPriceCreate", + "line": 223 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *LLMCostPriceCreate) Mutation() *LLMCostPriceMutation", + "line": 231 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LLMCostPriceCreate) Save(ctx context.Context) (*LLMCostPrice, error)", + "line": 236 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LLMCostPriceCreate) SaveX(ctx context.Context) *LLMCostPrice", + "line": 242 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LLMCostPriceCreate) Exec(ctx context.Context) error", + "line": 251 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LLMCostPriceCreate) ExecX(ctx context.Context)", + "line": 257 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *LLMCostPriceCreate) defaults()", + "line": 264 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *LLMCostPriceCreate) check() error", + "line": 300 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *LLMCostPriceCreate) sqlSave(ctx context.Context) (*LLMCostPrice, error)", + "line": 363 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *LLMCostPriceCreate) createSpec() (*LLMCostPrice, *sqlgraph.CreateSpec, error)", + "line": 389 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LLMCostPriceCreate) OnConflict(opts ...sql.ConflictOption) *LLMCostPriceUpsertOne", + "line": 494 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LLMCostPriceCreate) OnConflictColumns(columns ...string) *LLMCostPriceUpsertOne", + "line": 507 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *LLMCostPriceUpsert) SetMetadata(v map[string]string) *LLMCostPriceUpsert", + "line": 528 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *LLMCostPriceUpsert) UpdateMetadata() *LLMCostPriceUpsert", + "line": 534 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *LLMCostPriceUpsert) ClearMetadata() *LLMCostPriceUpsert", + "line": 540 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LLMCostPriceUpsert) SetUpdatedAt(v time.Time) *LLMCostPriceUpsert", + "line": 546 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LLMCostPriceUpsert) UpdateUpdatedAt() *LLMCostPriceUpsert", + "line": 552 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LLMCostPriceUpsert) SetDeletedAt(v time.Time) *LLMCostPriceUpsert", + "line": 558 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LLMCostPriceUpsert) UpdateDeletedAt() *LLMCostPriceUpsert", + "line": 564 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LLMCostPriceUpsert) ClearDeletedAt() *LLMCostPriceUpsert", + "line": 570 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (u *LLMCostPriceUpsert) SetNamespace(v string) *LLMCostPriceUpsert", + "line": 576 + }, + { + "kind": "func", + "name": "UpdateNamespace", + "signature": "func (u *LLMCostPriceUpsert) UpdateNamespace() *LLMCostPriceUpsert", + "line": 582 + }, + { + "kind": "func", + "name": "ClearNamespace", + "signature": "func (u *LLMCostPriceUpsert) ClearNamespace() *LLMCostPriceUpsert", + "line": 588 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (u *LLMCostPriceUpsert) SetProvider(v string) *LLMCostPriceUpsert", + "line": 594 + }, + { + "kind": "func", + "name": "UpdateProvider", + "signature": "func (u *LLMCostPriceUpsert) UpdateProvider() *LLMCostPriceUpsert", + "line": 600 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (u *LLMCostPriceUpsert) SetModelID(v string) *LLMCostPriceUpsert", + "line": 606 + }, + { + "kind": "func", + "name": "UpdateModelID", + "signature": "func (u *LLMCostPriceUpsert) UpdateModelID() *LLMCostPriceUpsert", + "line": 612 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (u *LLMCostPriceUpsert) SetModelName(v string) *LLMCostPriceUpsert", + "line": 618 + }, + { + "kind": "func", + "name": "UpdateModelName", + "signature": "func (u *LLMCostPriceUpsert) UpdateModelName() *LLMCostPriceUpsert", + "line": 624 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (u *LLMCostPriceUpsert) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsert", + "line": 630 + }, + { + "kind": "func", + "name": "UpdateInputPerToken", + "signature": "func (u *LLMCostPriceUpsert) UpdateInputPerToken() *LLMCostPriceUpsert", + "line": 636 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (u *LLMCostPriceUpsert) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsert", + "line": 642 + }, + { + "kind": "func", + "name": "UpdateOutputPerToken", + "signature": "func (u *LLMCostPriceUpsert) UpdateOutputPerToken() *LLMCostPriceUpsert", + "line": 648 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsert) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsert", + "line": 654 + }, + { + "kind": "func", + "name": "UpdateCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsert) UpdateCacheReadPerToken() *LLMCostPriceUpsert", + "line": 660 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsert) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsert", + "line": 666 + }, + { + "kind": "func", + "name": "UpdateReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsert) UpdateReasoningPerToken() *LLMCostPriceUpsert", + "line": 672 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsert) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsert", + "line": 678 + }, + { + "kind": "func", + "name": "UpdateCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsert) UpdateCacheWritePerToken() *LLMCostPriceUpsert", + "line": 684 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *LLMCostPriceUpsert) SetCurrency(v string) *LLMCostPriceUpsert", + "line": 690 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *LLMCostPriceUpsert) UpdateCurrency() *LLMCostPriceUpsert", + "line": 696 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (u *LLMCostPriceUpsert) SetSource(v string) *LLMCostPriceUpsert", + "line": 702 + }, + { + "kind": "func", + "name": "UpdateSource", + "signature": "func (u *LLMCostPriceUpsert) UpdateSource() *LLMCostPriceUpsert", + "line": 708 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (u *LLMCostPriceUpsert) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceUpsert", + "line": 714 + }, + { + "kind": "func", + "name": "UpdateSourcePrices", + "signature": "func (u *LLMCostPriceUpsert) UpdateSourcePrices() *LLMCostPriceUpsert", + "line": 720 + }, + { + "kind": "func", + "name": "ClearSourcePrices", + "signature": "func (u *LLMCostPriceUpsert) ClearSourcePrices() *LLMCostPriceUpsert", + "line": 726 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsert) SetEffectiveFrom(v time.Time) *LLMCostPriceUpsert", + "line": 732 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsert) UpdateEffectiveFrom() *LLMCostPriceUpsert", + "line": 738 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *LLMCostPriceUpsert) SetEffectiveTo(v time.Time) *LLMCostPriceUpsert", + "line": 744 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *LLMCostPriceUpsert) UpdateEffectiveTo() *LLMCostPriceUpsert", + "line": 750 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *LLMCostPriceUpsert) ClearEffectiveTo() *LLMCostPriceUpsert", + "line": 756 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateNewValues() *LLMCostPriceUpsertOne", + "line": 772 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LLMCostPriceUpsertOne) Ignore() *LLMCostPriceUpsertOne", + "line": 791 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LLMCostPriceUpsertOne) DoNothing() *LLMCostPriceUpsertOne", + "line": 798 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LLMCostPriceUpsertOne) Update(set func(*LLMCostPriceUpsert)) *LLMCostPriceUpsertOne", + "line": 805 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *LLMCostPriceUpsertOne) SetMetadata(v map[string]string) *LLMCostPriceUpsertOne", + "line": 813 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateMetadata() *LLMCostPriceUpsertOne", + "line": 820 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *LLMCostPriceUpsertOne) ClearMetadata() *LLMCostPriceUpsertOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LLMCostPriceUpsertOne) SetUpdatedAt(v time.Time) *LLMCostPriceUpsertOne", + "line": 834 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateUpdatedAt() *LLMCostPriceUpsertOne", + "line": 841 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LLMCostPriceUpsertOne) SetDeletedAt(v time.Time) *LLMCostPriceUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateDeletedAt() *LLMCostPriceUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LLMCostPriceUpsertOne) ClearDeletedAt() *LLMCostPriceUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (u *LLMCostPriceUpsertOne) SetNamespace(v string) *LLMCostPriceUpsertOne", + "line": 869 + }, + { + "kind": "func", + "name": "UpdateNamespace", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateNamespace() *LLMCostPriceUpsertOne", + "line": 876 + }, + { + "kind": "func", + "name": "ClearNamespace", + "signature": "func (u *LLMCostPriceUpsertOne) ClearNamespace() *LLMCostPriceUpsertOne", + "line": 883 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (u *LLMCostPriceUpsertOne) SetProvider(v string) *LLMCostPriceUpsertOne", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateProvider", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateProvider() *LLMCostPriceUpsertOne", + "line": 897 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (u *LLMCostPriceUpsertOne) SetModelID(v string) *LLMCostPriceUpsertOne", + "line": 904 + }, + { + "kind": "func", + "name": "UpdateModelID", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateModelID() *LLMCostPriceUpsertOne", + "line": 911 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (u *LLMCostPriceUpsertOne) SetModelName(v string) *LLMCostPriceUpsertOne", + "line": 918 + }, + { + "kind": "func", + "name": "UpdateModelName", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateModelName() *LLMCostPriceUpsertOne", + "line": 925 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertOne", + "line": 932 + }, + { + "kind": "func", + "name": "UpdateInputPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateInputPerToken() *LLMCostPriceUpsertOne", + "line": 939 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertOne", + "line": 946 + }, + { + "kind": "func", + "name": "UpdateOutputPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateOutputPerToken() *LLMCostPriceUpsertOne", + "line": 953 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertOne", + "line": 960 + }, + { + "kind": "func", + "name": "UpdateCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateCacheReadPerToken() *LLMCostPriceUpsertOne", + "line": 967 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertOne", + "line": 974 + }, + { + "kind": "func", + "name": "UpdateReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateReasoningPerToken() *LLMCostPriceUpsertOne", + "line": 981 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsertOne) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertOne", + "line": 988 + }, + { + "kind": "func", + "name": "UpdateCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateCacheWritePerToken() *LLMCostPriceUpsertOne", + "line": 995 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *LLMCostPriceUpsertOne) SetCurrency(v string) *LLMCostPriceUpsertOne", + "line": 1002 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateCurrency() *LLMCostPriceUpsertOne", + "line": 1009 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (u *LLMCostPriceUpsertOne) SetSource(v string) *LLMCostPriceUpsertOne", + "line": 1016 + }, + { + "kind": "func", + "name": "UpdateSource", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateSource() *LLMCostPriceUpsertOne", + "line": 1023 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (u *LLMCostPriceUpsertOne) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceUpsertOne", + "line": 1030 + }, + { + "kind": "func", + "name": "UpdateSourcePrices", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateSourcePrices() *LLMCostPriceUpsertOne", + "line": 1037 + }, + { + "kind": "func", + "name": "ClearSourcePrices", + "signature": "func (u *LLMCostPriceUpsertOne) ClearSourcePrices() *LLMCostPriceUpsertOne", + "line": 1044 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsertOne) SetEffectiveFrom(v time.Time) *LLMCostPriceUpsertOne", + "line": 1051 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateEffectiveFrom() *LLMCostPriceUpsertOne", + "line": 1058 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertOne) SetEffectiveTo(v time.Time) *LLMCostPriceUpsertOne", + "line": 1065 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertOne) UpdateEffectiveTo() *LLMCostPriceUpsertOne", + "line": 1072 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertOne) ClearEffectiveTo() *LLMCostPriceUpsertOne", + "line": 1079 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LLMCostPriceUpsertOne) Exec(ctx context.Context) error", + "line": 1086 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LLMCostPriceUpsertOne) ExecX(ctx context.Context)", + "line": 1094 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *LLMCostPriceUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1101 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *LLMCostPriceUpsertOne) IDX(ctx context.Context) string", + "line": 1115 + }, + { + "kind": "struct", + "name": "LLMCostPriceCreateBulk", + "signature": "type LLMCostPriceCreateBulk struct", + "line": 1124 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *LLMCostPriceCreateBulk) Save(ctx context.Context) ([]*LLMCostPrice, error)", + "line": 1132 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *LLMCostPriceCreateBulk) SaveX(ctx context.Context) []*LLMCostPrice", + "line": 1191 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *LLMCostPriceCreateBulk) Exec(ctx context.Context) error", + "line": 1200 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *LLMCostPriceCreateBulk) ExecX(ctx context.Context)", + "line": 1206 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *LLMCostPriceCreateBulk) OnConflict(opts ...sql.ConflictOption) *LLMCostPriceUpsertBulk", + "line": 1227 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *LLMCostPriceCreateBulk) OnConflictColumns(columns ...string) *LLMCostPriceUpsertBulk", + "line": 1240 + }, + { + "kind": "struct", + "name": "LLMCostPriceUpsertBulk", + "signature": "type LLMCostPriceUpsertBulk struct", + "line": 1249 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateNewValues() *LLMCostPriceUpsertBulk", + "line": 1264 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *LLMCostPriceUpsertBulk) Ignore() *LLMCostPriceUpsertBulk", + "line": 1285 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *LLMCostPriceUpsertBulk) DoNothing() *LLMCostPriceUpsertBulk", + "line": 1292 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *LLMCostPriceUpsertBulk) Update(set func(*LLMCostPriceUpsert)) *LLMCostPriceUpsertBulk", + "line": 1299 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *LLMCostPriceUpsertBulk) SetMetadata(v map[string]string) *LLMCostPriceUpsertBulk", + "line": 1307 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateMetadata() *LLMCostPriceUpsertBulk", + "line": 1314 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *LLMCostPriceUpsertBulk) ClearMetadata() *LLMCostPriceUpsertBulk", + "line": 1321 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *LLMCostPriceUpsertBulk) SetUpdatedAt(v time.Time) *LLMCostPriceUpsertBulk", + "line": 1328 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateUpdatedAt() *LLMCostPriceUpsertBulk", + "line": 1335 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *LLMCostPriceUpsertBulk) SetDeletedAt(v time.Time) *LLMCostPriceUpsertBulk", + "line": 1342 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateDeletedAt() *LLMCostPriceUpsertBulk", + "line": 1349 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *LLMCostPriceUpsertBulk) ClearDeletedAt() *LLMCostPriceUpsertBulk", + "line": 1356 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (u *LLMCostPriceUpsertBulk) SetNamespace(v string) *LLMCostPriceUpsertBulk", + "line": 1363 + }, + { + "kind": "func", + "name": "UpdateNamespace", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateNamespace() *LLMCostPriceUpsertBulk", + "line": 1370 + }, + { + "kind": "func", + "name": "ClearNamespace", + "signature": "func (u *LLMCostPriceUpsertBulk) ClearNamespace() *LLMCostPriceUpsertBulk", + "line": 1377 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (u *LLMCostPriceUpsertBulk) SetProvider(v string) *LLMCostPriceUpsertBulk", + "line": 1384 + }, + { + "kind": "func", + "name": "UpdateProvider", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateProvider() *LLMCostPriceUpsertBulk", + "line": 1391 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (u *LLMCostPriceUpsertBulk) SetModelID(v string) *LLMCostPriceUpsertBulk", + "line": 1398 + }, + { + "kind": "func", + "name": "UpdateModelID", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateModelID() *LLMCostPriceUpsertBulk", + "line": 1405 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (u *LLMCostPriceUpsertBulk) SetModelName(v string) *LLMCostPriceUpsertBulk", + "line": 1412 + }, + { + "kind": "func", + "name": "UpdateModelName", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateModelName() *LLMCostPriceUpsertBulk", + "line": 1419 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertBulk", + "line": 1426 + }, + { + "kind": "func", + "name": "UpdateInputPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateInputPerToken() *LLMCostPriceUpsertBulk", + "line": 1433 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertBulk", + "line": 1440 + }, + { + "kind": "func", + "name": "UpdateOutputPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateOutputPerToken() *LLMCostPriceUpsertBulk", + "line": 1447 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertBulk", + "line": 1454 + }, + { + "kind": "func", + "name": "UpdateCacheReadPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateCacheReadPerToken() *LLMCostPriceUpsertBulk", + "line": 1461 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertBulk", + "line": 1468 + }, + { + "kind": "func", + "name": "UpdateReasoningPerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateReasoningPerToken() *LLMCostPriceUpsertBulk", + "line": 1475 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceUpsertBulk", + "line": 1482 + }, + { + "kind": "func", + "name": "UpdateCacheWritePerToken", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateCacheWritePerToken() *LLMCostPriceUpsertBulk", + "line": 1489 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (u *LLMCostPriceUpsertBulk) SetCurrency(v string) *LLMCostPriceUpsertBulk", + "line": 1496 + }, + { + "kind": "func", + "name": "UpdateCurrency", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateCurrency() *LLMCostPriceUpsertBulk", + "line": 1503 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (u *LLMCostPriceUpsertBulk) SetSource(v string) *LLMCostPriceUpsertBulk", + "line": 1510 + }, + { + "kind": "func", + "name": "UpdateSource", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateSource() *LLMCostPriceUpsertBulk", + "line": 1517 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (u *LLMCostPriceUpsertBulk) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceUpsertBulk", + "line": 1524 + }, + { + "kind": "func", + "name": "UpdateSourcePrices", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateSourcePrices() *LLMCostPriceUpsertBulk", + "line": 1531 + }, + { + "kind": "func", + "name": "ClearSourcePrices", + "signature": "func (u *LLMCostPriceUpsertBulk) ClearSourcePrices() *LLMCostPriceUpsertBulk", + "line": 1538 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsertBulk) SetEffectiveFrom(v time.Time) *LLMCostPriceUpsertBulk", + "line": 1545 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateEffectiveFrom() *LLMCostPriceUpsertBulk", + "line": 1552 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertBulk) SetEffectiveTo(v time.Time) *LLMCostPriceUpsertBulk", + "line": 1559 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertBulk) UpdateEffectiveTo() *LLMCostPriceUpsertBulk", + "line": 1566 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *LLMCostPriceUpsertBulk) ClearEffectiveTo() *LLMCostPriceUpsertBulk", + "line": 1573 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *LLMCostPriceUpsertBulk) Exec(ctx context.Context) error", + "line": 1580 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *LLMCostPriceUpsertBulk) ExecX(ctx context.Context)", + "line": 1596 + } + ], + "line_count": 1600 + }, + "openmeter/ent/db/llmcostprice_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPriceDelete", + "signature": "type LLMCostPriceDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LLMCostPriceDelete) Where(ps ...predicate.LLMCostPrice) *LLMCostPriceDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LLMCostPriceDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LLMCostPriceDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *LLMCostPriceDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "LLMCostPriceDeleteOne", + "signature": "type LLMCostPriceDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *LLMCostPriceDeleteOne) Where(ps ...predicate.LLMCostPrice) *LLMCostPriceDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *LLMCostPriceDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *LLMCostPriceDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/llmcostprice_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPriceQuery", + "signature": "type LLMCostPriceQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *LLMCostPriceQuery) Where(ps ...predicate.LLMCostPrice) *LLMCostPriceQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *LLMCostPriceQuery) Limit(limit int) *LLMCostPriceQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *LLMCostPriceQuery) Offset(offset int) *LLMCostPriceQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *LLMCostPriceQuery) Unique(unique bool) *LLMCostPriceQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *LLMCostPriceQuery) Order(o ...llmcostprice.OrderOption) *LLMCostPriceQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *LLMCostPriceQuery) First(ctx context.Context) (*LLMCostPrice, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *LLMCostPriceQuery) FirstX(ctx context.Context) *LLMCostPrice", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *LLMCostPriceQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *LLMCostPriceQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *LLMCostPriceQuery) Only(ctx context.Context) (*LLMCostPrice, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *LLMCostPriceQuery) OnlyX(ctx context.Context) *LLMCostPrice", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *LLMCostPriceQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *LLMCostPriceQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *LLMCostPriceQuery) All(ctx context.Context) ([]*LLMCostPrice, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *LLMCostPriceQuery) AllX(ctx context.Context) []*LLMCostPrice", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *LLMCostPriceQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *LLMCostPriceQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *LLMCostPriceQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *LLMCostPriceQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *LLMCostPriceQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *LLMCostPriceQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *LLMCostPriceQuery) Clone() *LLMCostPriceQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *LLMCostPriceQuery) GroupBy(field string, fields ...string) *LLMCostPriceGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *LLMCostPriceQuery) Select(fields ...string) *LLMCostPriceSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *LLMCostPriceQuery) Aggregate(fns ...AggregateFunc) *LLMCostPriceSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *LLMCostPriceQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *LLMCostPriceQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*LLMCostPrice, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *LLMCostPriceQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *LLMCostPriceQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *LLMCostPriceQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *LLMCostPriceQuery) ForUpdate(opts ...sql.LockOption) *LLMCostPriceQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *LLMCostPriceQuery) ForShare(opts ...sql.LockOption) *LLMCostPriceQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "LLMCostPriceGroupBy", + "signature": "type LLMCostPriceGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *LLMCostPriceGroupBy) Aggregate(fns ...AggregateFunc) *LLMCostPriceGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *LLMCostPriceGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *LLMCostPriceGroupBy) sqlScan(ctx context.Context, root *LLMCostPriceQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "LLMCostPriceSelect", + "signature": "type LLMCostPriceSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *LLMCostPriceSelect) Aggregate(fns ...AggregateFunc) *LLMCostPriceSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *LLMCostPriceSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *LLMCostPriceSelect) sqlScan(ctx context.Context, root *LLMCostPriceQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/llmcostprice_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPriceUpdate", + "signature": "type LLMCostPriceUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LLMCostPriceUpdate) Where(ps ...predicate.LLMCostPrice) *LLMCostPriceUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *LLMCostPriceUpdate) SetMetadata(v map[string]string) *LLMCostPriceUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *LLMCostPriceUpdate) ClearMetadata() *LLMCostPriceUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LLMCostPriceUpdate) SetUpdatedAt(v time.Time) *LLMCostPriceUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LLMCostPriceUpdate) SetDeletedAt(v time.Time) *LLMCostPriceUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableDeletedAt(v *time.Time) *LLMCostPriceUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LLMCostPriceUpdate) ClearDeletedAt() *LLMCostPriceUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_u *LLMCostPriceUpdate) SetNamespace(v string) *LLMCostPriceUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableNamespace", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableNamespace(v *string) *LLMCostPriceUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "ClearNamespace", + "signature": "func (_u *LLMCostPriceUpdate) ClearNamespace() *LLMCostPriceUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (_u *LLMCostPriceUpdate) SetProvider(v string) *LLMCostPriceUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableProvider", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableProvider(v *string) *LLMCostPriceUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (_u *LLMCostPriceUpdate) SetModelID(v string) *LLMCostPriceUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "SetNillableModelID", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableModelID(v *string) *LLMCostPriceUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (_u *LLMCostPriceUpdate) SetModelName(v string) *LLMCostPriceUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetNillableModelName", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableModelName(v *string) *LLMCostPriceUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "SetNillableInputPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableInputPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableOutputPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableOutputPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableCacheReadPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableCacheReadPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetNillableReasoningPerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableReasoningPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetNillableCacheWritePerToken", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableCacheWritePerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_u *LLMCostPriceUpdate) SetCurrency(v string) *LLMCostPriceUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableCurrency(v *string) *LLMCostPriceUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (_u *LLMCostPriceUpdate) SetSource(v string) *LLMCostPriceUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableSource", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableSource(v *string) *LLMCostPriceUpdate", + "line": 224 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (_u *LLMCostPriceUpdate) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "ClearSourcePrices", + "signature": "func (_u *LLMCostPriceUpdate) ClearSourcePrices() *LLMCostPriceUpdate", + "line": 238 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *LLMCostPriceUpdate) SetEffectiveFrom(v time.Time) *LLMCostPriceUpdate", + "line": 244 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableEffectiveFrom(v *time.Time) *LLMCostPriceUpdate", + "line": 250 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdate) SetEffectiveTo(v time.Time) *LLMCostPriceUpdate", + "line": 258 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdate) SetNillableEffectiveTo(v *time.Time) *LLMCostPriceUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdate) ClearEffectiveTo() *LLMCostPriceUpdate", + "line": 272 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LLMCostPriceUpdate) Mutation() *LLMCostPriceMutation", + "line": 278 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LLMCostPriceUpdate) Save(ctx context.Context) (int, error)", + "line": 283 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LLMCostPriceUpdate) SaveX(ctx context.Context) int", + "line": 289 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LLMCostPriceUpdate) Exec(ctx context.Context) error", + "line": 298 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LLMCostPriceUpdate) ExecX(ctx context.Context)", + "line": 304 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LLMCostPriceUpdate) defaults()", + "line": 311 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LLMCostPriceUpdate) check() error", + "line": 319 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LLMCostPriceUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 343 + }, + { + "kind": "struct", + "name": "LLMCostPriceUpdateOne", + "signature": "type LLMCostPriceUpdateOne struct", + "line": 438 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *LLMCostPriceUpdateOne) SetMetadata(v map[string]string) *LLMCostPriceUpdateOne", + "line": 446 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *LLMCostPriceUpdateOne) ClearMetadata() *LLMCostPriceUpdateOne", + "line": 452 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *LLMCostPriceUpdateOne) SetUpdatedAt(v time.Time) *LLMCostPriceUpdateOne", + "line": 458 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *LLMCostPriceUpdateOne) SetDeletedAt(v time.Time) *LLMCostPriceUpdateOne", + "line": 464 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableDeletedAt(v *time.Time) *LLMCostPriceUpdateOne", + "line": 470 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *LLMCostPriceUpdateOne) ClearDeletedAt() *LLMCostPriceUpdateOne", + "line": 478 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNamespace(v string) *LLMCostPriceUpdateOne", + "line": 484 + }, + { + "kind": "func", + "name": "SetNillableNamespace", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableNamespace(v *string) *LLMCostPriceUpdateOne", + "line": 490 + }, + { + "kind": "func", + "name": "ClearNamespace", + "signature": "func (_u *LLMCostPriceUpdateOne) ClearNamespace() *LLMCostPriceUpdateOne", + "line": 498 + }, + { + "kind": "func", + "name": "SetProvider", + "signature": "func (_u *LLMCostPriceUpdateOne) SetProvider(v string) *LLMCostPriceUpdateOne", + "line": 504 + }, + { + "kind": "func", + "name": "SetNillableProvider", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableProvider(v *string) *LLMCostPriceUpdateOne", + "line": 510 + }, + { + "kind": "func", + "name": "SetModelID", + "signature": "func (_u *LLMCostPriceUpdateOne) SetModelID(v string) *LLMCostPriceUpdateOne", + "line": 518 + }, + { + "kind": "func", + "name": "SetNillableModelID", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableModelID(v *string) *LLMCostPriceUpdateOne", + "line": 524 + }, + { + "kind": "func", + "name": "SetModelName", + "signature": "func (_u *LLMCostPriceUpdateOne) SetModelName(v string) *LLMCostPriceUpdateOne", + "line": 532 + }, + { + "kind": "func", + "name": "SetNillableModelName", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableModelName(v *string) *LLMCostPriceUpdateOne", + "line": 538 + }, + { + "kind": "func", + "name": "SetInputPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetInputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 546 + }, + { + "kind": "func", + "name": "SetNillableInputPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableInputPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 552 + }, + { + "kind": "func", + "name": "SetOutputPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetOutputPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 560 + }, + { + "kind": "func", + "name": "SetNillableOutputPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableOutputPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 566 + }, + { + "kind": "func", + "name": "SetCacheReadPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetCacheReadPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 574 + }, + { + "kind": "func", + "name": "SetNillableCacheReadPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableCacheReadPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 580 + }, + { + "kind": "func", + "name": "SetReasoningPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetReasoningPerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 588 + }, + { + "kind": "func", + "name": "SetNillableReasoningPerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableReasoningPerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 594 + }, + { + "kind": "func", + "name": "SetCacheWritePerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetCacheWritePerToken(v alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 602 + }, + { + "kind": "func", + "name": "SetNillableCacheWritePerToken", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableCacheWritePerToken(v *alpacadecimal.Decimal) *LLMCostPriceUpdateOne", + "line": 608 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_u *LLMCostPriceUpdateOne) SetCurrency(v string) *LLMCostPriceUpdateOne", + "line": 616 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableCurrency(v *string) *LLMCostPriceUpdateOne", + "line": 622 + }, + { + "kind": "func", + "name": "SetSource", + "signature": "func (_u *LLMCostPriceUpdateOne) SetSource(v string) *LLMCostPriceUpdateOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetNillableSource", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableSource(v *string) *LLMCostPriceUpdateOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetSourcePrices", + "signature": "func (_u *LLMCostPriceUpdateOne) SetSourcePrices(v llmcost.SourcePricesMap) *LLMCostPriceUpdateOne", + "line": 644 + }, + { + "kind": "func", + "name": "ClearSourcePrices", + "signature": "func (_u *LLMCostPriceUpdateOne) ClearSourcePrices() *LLMCostPriceUpdateOne", + "line": 650 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *LLMCostPriceUpdateOne) SetEffectiveFrom(v time.Time) *LLMCostPriceUpdateOne", + "line": 656 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableEffectiveFrom(v *time.Time) *LLMCostPriceUpdateOne", + "line": 662 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdateOne) SetEffectiveTo(v time.Time) *LLMCostPriceUpdateOne", + "line": 670 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdateOne) SetNillableEffectiveTo(v *time.Time) *LLMCostPriceUpdateOne", + "line": 676 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *LLMCostPriceUpdateOne) ClearEffectiveTo() *LLMCostPriceUpdateOne", + "line": 684 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *LLMCostPriceUpdateOne) Mutation() *LLMCostPriceMutation", + "line": 690 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *LLMCostPriceUpdateOne) Where(ps ...predicate.LLMCostPrice) *LLMCostPriceUpdateOne", + "line": 695 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *LLMCostPriceUpdateOne) Select(field string, fields ...string) *LLMCostPriceUpdateOne", + "line": 702 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *LLMCostPriceUpdateOne) Save(ctx context.Context) (*LLMCostPrice, error)", + "line": 708 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *LLMCostPriceUpdateOne) SaveX(ctx context.Context) *LLMCostPrice", + "line": 714 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *LLMCostPriceUpdateOne) Exec(ctx context.Context) error", + "line": 723 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *LLMCostPriceUpdateOne) ExecX(ctx context.Context)", + "line": 729 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *LLMCostPriceUpdateOne) defaults()", + "line": 736 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *LLMCostPriceUpdateOne) check() error", + "line": 744 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *LLMCostPriceUpdateOne) sqlSave(ctx context.Context) (_node *LLMCostPrice, err error)", + "line": 768 + } + ], + "line_count": 880 + }, + "openmeter/ent/db/meter.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Meter", + "signature": "type Meter struct", + "line": 19 + }, + { + "kind": "struct", + "name": "MeterEdges", + "signature": "type MeterEdges struct", + "line": 58 + }, + { + "kind": "func", + "name": "FeatureOrErr", + "signature": "func (e MeterEdges) FeatureOrErr() ([]*Feature, error)", + "line": 68 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Meter) assignValues(columns []string, values []any) error", + "line": 95 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Meter) Value(name string) (ent.Value, error)", + "line": 210 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_m *Meter) QueryFeature() *FeatureQuery", + "line": 215 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Meter) Update() *MeterUpdateOne", + "line": 222 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Meter) Unwrap() *Meter", + "line": 228 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Meter) String() string", + "line": 238 + } + ], + "line_count": 296 + }, + "openmeter/ent/db/meter/meter.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 80 + }, + { + "kind": "func", + "name": "AggregationValidator", + "signature": "func AggregationValidator(a meter.MeterAggregation) error", + "line": 107 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByEventType", + "signature": "func ByEventType(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByValueProperty", + "signature": "func ByValueProperty(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByAggregation", + "signature": "func ByAggregation(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByEventFrom", + "signature": "func ByEventFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "ByFeatureCount", + "signature": "func ByFeatureCount(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByFeature", + "signature": "func ByFeature(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 187 + }, + { + "kind": "func", + "name": "newFeatureStep", + "signature": "func newFeatureStep() *sqlgraph.Step", + "line": 192 + } + ], + "line_count": 198 + }, + "openmeter/ent/db/meter/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Meter", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Meter", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Meter", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Meter", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Meter", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Meter", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Meter", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Meter", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Meter", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Meter", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Meter", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Meter", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Meter", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Meter", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Meter", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Meter", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Meter", + "line": 95 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Meter", + "line": 100 + }, + { + "kind": "func", + "name": "EventType", + "signature": "func EventType(v string) predicate.Meter", + "line": 105 + }, + { + "kind": "func", + "name": "ValueProperty", + "signature": "func ValueProperty(v string) predicate.Meter", + "line": 110 + }, + { + "kind": "func", + "name": "EventFrom", + "signature": "func EventFrom(v time.Time) predicate.Meter", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Meter", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Meter", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Meter", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Meter", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Meter", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Meter", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Meter", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Meter", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Meter", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Meter", + "line": 165 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Meter", + "line": 170 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Meter", + "line": 175 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Meter", + "line": 180 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Meter", + "line": 185 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Meter", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Meter", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Meter", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Meter", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Meter", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Meter", + "line": 215 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Meter", + "line": 220 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Meter", + "line": 225 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Meter", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Meter", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Meter", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Meter", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Meter", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Meter", + "line": 255 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Meter", + "line": 260 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Meter", + "line": 265 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Meter", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Meter", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Meter", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Meter", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Meter", + "line": 290 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Meter", + "line": 295 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Meter", + "line": 300 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Meter", + "line": 305 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Meter", + "line": 310 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Meter", + "line": 315 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Meter", + "line": 320 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Meter", + "line": 325 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Meter", + "line": 330 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Meter", + "line": 335 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Meter", + "line": 340 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Meter", + "line": 345 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Meter", + "line": 350 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Meter", + "line": 355 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Meter", + "line": 360 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Meter", + "line": 365 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Meter", + "line": 370 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Meter", + "line": 375 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Meter", + "line": 380 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Meter", + "line": 385 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Meter", + "line": 390 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Meter", + "line": 395 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Meter", + "line": 400 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Meter", + "line": 405 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Meter", + "line": 410 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Meter", + "line": 415 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Meter", + "line": 420 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Meter", + "line": 425 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Meter", + "line": 430 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Meter", + "line": 435 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Meter", + "line": 440 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Meter", + "line": 445 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Meter", + "line": 450 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Meter", + "line": 455 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Meter", + "line": 460 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Meter", + "line": 465 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Meter", + "line": 470 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Meter", + "line": 475 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Meter", + "line": 480 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Meter", + "line": 485 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Meter", + "line": 490 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Meter", + "line": 495 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Meter", + "line": 500 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Meter", + "line": 505 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Meter", + "line": 510 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Meter", + "line": 515 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Meter", + "line": 520 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Meter", + "line": 525 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Meter", + "line": 530 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Meter", + "line": 535 + }, + { + "kind": "func", + "name": "EventTypeEQ", + "signature": "func EventTypeEQ(v string) predicate.Meter", + "line": 540 + }, + { + "kind": "func", + "name": "EventTypeNEQ", + "signature": "func EventTypeNEQ(v string) predicate.Meter", + "line": 545 + }, + { + "kind": "func", + "name": "EventTypeIn", + "signature": "func EventTypeIn(vs ...string) predicate.Meter", + "line": 550 + }, + { + "kind": "func", + "name": "EventTypeNotIn", + "signature": "func EventTypeNotIn(vs ...string) predicate.Meter", + "line": 555 + }, + { + "kind": "func", + "name": "EventTypeGT", + "signature": "func EventTypeGT(v string) predicate.Meter", + "line": 560 + }, + { + "kind": "func", + "name": "EventTypeGTE", + "signature": "func EventTypeGTE(v string) predicate.Meter", + "line": 565 + }, + { + "kind": "func", + "name": "EventTypeLT", + "signature": "func EventTypeLT(v string) predicate.Meter", + "line": 570 + }, + { + "kind": "func", + "name": "EventTypeLTE", + "signature": "func EventTypeLTE(v string) predicate.Meter", + "line": 575 + }, + { + "kind": "func", + "name": "EventTypeContains", + "signature": "func EventTypeContains(v string) predicate.Meter", + "line": 580 + }, + { + "kind": "func", + "name": "EventTypeHasPrefix", + "signature": "func EventTypeHasPrefix(v string) predicate.Meter", + "line": 585 + }, + { + "kind": "func", + "name": "EventTypeHasSuffix", + "signature": "func EventTypeHasSuffix(v string) predicate.Meter", + "line": 590 + }, + { + "kind": "func", + "name": "EventTypeEqualFold", + "signature": "func EventTypeEqualFold(v string) predicate.Meter", + "line": 595 + }, + { + "kind": "func", + "name": "EventTypeContainsFold", + "signature": "func EventTypeContainsFold(v string) predicate.Meter", + "line": 600 + }, + { + "kind": "func", + "name": "ValuePropertyEQ", + "signature": "func ValuePropertyEQ(v string) predicate.Meter", + "line": 605 + }, + { + "kind": "func", + "name": "ValuePropertyNEQ", + "signature": "func ValuePropertyNEQ(v string) predicate.Meter", + "line": 610 + }, + { + "kind": "func", + "name": "ValuePropertyIn", + "signature": "func ValuePropertyIn(vs ...string) predicate.Meter", + "line": 615 + }, + { + "kind": "func", + "name": "ValuePropertyNotIn", + "signature": "func ValuePropertyNotIn(vs ...string) predicate.Meter", + "line": 620 + }, + { + "kind": "func", + "name": "ValuePropertyGT", + "signature": "func ValuePropertyGT(v string) predicate.Meter", + "line": 625 + }, + { + "kind": "func", + "name": "ValuePropertyGTE", + "signature": "func ValuePropertyGTE(v string) predicate.Meter", + "line": 630 + }, + { + "kind": "func", + "name": "ValuePropertyLT", + "signature": "func ValuePropertyLT(v string) predicate.Meter", + "line": 635 + }, + { + "kind": "func", + "name": "ValuePropertyLTE", + "signature": "func ValuePropertyLTE(v string) predicate.Meter", + "line": 640 + }, + { + "kind": "func", + "name": "ValuePropertyContains", + "signature": "func ValuePropertyContains(v string) predicate.Meter", + "line": 645 + }, + { + "kind": "func", + "name": "ValuePropertyHasPrefix", + "signature": "func ValuePropertyHasPrefix(v string) predicate.Meter", + "line": 650 + }, + { + "kind": "func", + "name": "ValuePropertyHasSuffix", + "signature": "func ValuePropertyHasSuffix(v string) predicate.Meter", + "line": 655 + }, + { + "kind": "func", + "name": "ValuePropertyIsNil", + "signature": "func ValuePropertyIsNil() predicate.Meter", + "line": 660 + }, + { + "kind": "func", + "name": "ValuePropertyNotNil", + "signature": "func ValuePropertyNotNil() predicate.Meter", + "line": 665 + }, + { + "kind": "func", + "name": "ValuePropertyEqualFold", + "signature": "func ValuePropertyEqualFold(v string) predicate.Meter", + "line": 670 + }, + { + "kind": "func", + "name": "ValuePropertyContainsFold", + "signature": "func ValuePropertyContainsFold(v string) predicate.Meter", + "line": 675 + }, + { + "kind": "func", + "name": "GroupByIsNil", + "signature": "func GroupByIsNil() predicate.Meter", + "line": 680 + }, + { + "kind": "func", + "name": "GroupByNotNil", + "signature": "func GroupByNotNil() predicate.Meter", + "line": 685 + }, + { + "kind": "func", + "name": "AggregationEQ", + "signature": "func AggregationEQ(v meter.MeterAggregation) predicate.Meter", + "line": 690 + }, + { + "kind": "func", + "name": "AggregationNEQ", + "signature": "func AggregationNEQ(v meter.MeterAggregation) predicate.Meter", + "line": 696 + }, + { + "kind": "func", + "name": "AggregationIn", + "signature": "func AggregationIn(vs ...meter.MeterAggregation) predicate.Meter", + "line": 702 + }, + { + "kind": "func", + "name": "AggregationNotIn", + "signature": "func AggregationNotIn(vs ...meter.MeterAggregation) predicate.Meter", + "line": 711 + }, + { + "kind": "func", + "name": "EventFromEQ", + "signature": "func EventFromEQ(v time.Time) predicate.Meter", + "line": 720 + }, + { + "kind": "func", + "name": "EventFromNEQ", + "signature": "func EventFromNEQ(v time.Time) predicate.Meter", + "line": 725 + }, + { + "kind": "func", + "name": "EventFromIn", + "signature": "func EventFromIn(vs ...time.Time) predicate.Meter", + "line": 730 + }, + { + "kind": "func", + "name": "EventFromNotIn", + "signature": "func EventFromNotIn(vs ...time.Time) predicate.Meter", + "line": 735 + }, + { + "kind": "func", + "name": "EventFromGT", + "signature": "func EventFromGT(v time.Time) predicate.Meter", + "line": 740 + }, + { + "kind": "func", + "name": "EventFromGTE", + "signature": "func EventFromGTE(v time.Time) predicate.Meter", + "line": 745 + }, + { + "kind": "func", + "name": "EventFromLT", + "signature": "func EventFromLT(v time.Time) predicate.Meter", + "line": 750 + }, + { + "kind": "func", + "name": "EventFromLTE", + "signature": "func EventFromLTE(v time.Time) predicate.Meter", + "line": 755 + }, + { + "kind": "func", + "name": "EventFromIsNil", + "signature": "func EventFromIsNil() predicate.Meter", + "line": 760 + }, + { + "kind": "func", + "name": "EventFromNotNil", + "signature": "func EventFromNotNil() predicate.Meter", + "line": 765 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func HasFeature() predicate.Meter", + "line": 770 + }, + { + "kind": "func", + "name": "HasFeatureWith", + "signature": "func HasFeatureWith(preds ...predicate.Feature) predicate.Meter", + "line": 781 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Meter) predicate.Meter", + "line": 793 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Meter) predicate.Meter", + "line": 798 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Meter) predicate.Meter", + "line": 803 + } + ], + "line_count": 805 + }, + "openmeter/ent/db/meter_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "MeterCreate", + "signature": "type MeterCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *MeterCreate) SetNamespace(v string) *MeterCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *MeterCreate) SetMetadata(v map[string]string) *MeterCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *MeterCreate) SetCreatedAt(v time.Time) *MeterCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *MeterCreate) SetNillableCreatedAt(v *time.Time) *MeterCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *MeterCreate) SetUpdatedAt(v time.Time) *MeterCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *MeterCreate) SetNillableUpdatedAt(v *time.Time) *MeterCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *MeterCreate) SetDeletedAt(v time.Time) *MeterCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *MeterCreate) SetNillableDeletedAt(v *time.Time) *MeterCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *MeterCreate) SetName(v string) *MeterCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *MeterCreate) SetDescription(v string) *MeterCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *MeterCreate) SetNillableDescription(v *string) *MeterCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *MeterCreate) SetKey(v string) *MeterCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *MeterCreate) SetAnnotations(v models.Annotations) *MeterCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetEventType", + "signature": "func (_c *MeterCreate) SetEventType(v string) *MeterCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (_c *MeterCreate) SetValueProperty(v string) *MeterCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableValueProperty", + "signature": "func (_c *MeterCreate) SetNillableValueProperty(v *string) *MeterCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (_c *MeterCreate) SetGroupBy(v map[string]string) *MeterCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetAggregation", + "signature": "func (_c *MeterCreate) SetAggregation(v meter.MeterAggregation) *MeterCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (_c *MeterCreate) SetEventFrom(v time.Time) *MeterCreate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillableEventFrom", + "signature": "func (_c *MeterCreate) SetNillableEventFrom(v *time.Time) *MeterCreate", + "line": 154 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *MeterCreate) SetID(v string) *MeterCreate", + "line": 162 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *MeterCreate) SetNillableID(v *string) *MeterCreate", + "line": 168 + }, + { + "kind": "func", + "name": "AddFeatureIDs", + "signature": "func (_c *MeterCreate) AddFeatureIDs(ids ...string) *MeterCreate", + "line": 176 + }, + { + "kind": "func", + "name": "AddFeature", + "signature": "func (_c *MeterCreate) AddFeature(v ...*Feature) *MeterCreate", + "line": 182 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *MeterCreate) Mutation() *MeterMutation", + "line": 191 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *MeterCreate) Save(ctx context.Context) (*Meter, error)", + "line": 196 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *MeterCreate) SaveX(ctx context.Context) *Meter", + "line": 202 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *MeterCreate) Exec(ctx context.Context) error", + "line": 211 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *MeterCreate) ExecX(ctx context.Context)", + "line": 217 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *MeterCreate) defaults()", + "line": 224 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *MeterCreate) check() error", + "line": 240 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *MeterCreate) sqlSave(ctx context.Context) (*Meter, error)", + "line": 285 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *MeterCreate) createSpec() (*Meter, *sqlgraph.CreateSpec)", + "line": 308 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *MeterCreate) OnConflict(opts ...sql.ConflictOption) *MeterUpsertOne", + "line": 409 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *MeterCreate) OnConflictColumns(columns ...string) *MeterUpsertOne", + "line": 422 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *MeterUpsert) SetMetadata(v map[string]string) *MeterUpsert", + "line": 443 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *MeterUpsert) UpdateMetadata() *MeterUpsert", + "line": 449 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *MeterUpsert) ClearMetadata() *MeterUpsert", + "line": 455 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *MeterUpsert) SetUpdatedAt(v time.Time) *MeterUpsert", + "line": 461 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *MeterUpsert) UpdateUpdatedAt() *MeterUpsert", + "line": 467 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *MeterUpsert) SetDeletedAt(v time.Time) *MeterUpsert", + "line": 473 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *MeterUpsert) UpdateDeletedAt() *MeterUpsert", + "line": 479 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *MeterUpsert) ClearDeletedAt() *MeterUpsert", + "line": 485 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *MeterUpsert) SetName(v string) *MeterUpsert", + "line": 491 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *MeterUpsert) UpdateName() *MeterUpsert", + "line": 497 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *MeterUpsert) SetDescription(v string) *MeterUpsert", + "line": 503 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *MeterUpsert) UpdateDescription() *MeterUpsert", + "line": 509 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *MeterUpsert) ClearDescription() *MeterUpsert", + "line": 515 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *MeterUpsert) SetAnnotations(v models.Annotations) *MeterUpsert", + "line": 521 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *MeterUpsert) UpdateAnnotations() *MeterUpsert", + "line": 527 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *MeterUpsert) ClearAnnotations() *MeterUpsert", + "line": 533 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (u *MeterUpsert) SetValueProperty(v string) *MeterUpsert", + "line": 539 + }, + { + "kind": "func", + "name": "UpdateValueProperty", + "signature": "func (u *MeterUpsert) UpdateValueProperty() *MeterUpsert", + "line": 545 + }, + { + "kind": "func", + "name": "ClearValueProperty", + "signature": "func (u *MeterUpsert) ClearValueProperty() *MeterUpsert", + "line": 551 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (u *MeterUpsert) SetGroupBy(v map[string]string) *MeterUpsert", + "line": 557 + }, + { + "kind": "func", + "name": "UpdateGroupBy", + "signature": "func (u *MeterUpsert) UpdateGroupBy() *MeterUpsert", + "line": 563 + }, + { + "kind": "func", + "name": "ClearGroupBy", + "signature": "func (u *MeterUpsert) ClearGroupBy() *MeterUpsert", + "line": 569 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (u *MeterUpsert) SetEventFrom(v time.Time) *MeterUpsert", + "line": 575 + }, + { + "kind": "func", + "name": "UpdateEventFrom", + "signature": "func (u *MeterUpsert) UpdateEventFrom() *MeterUpsert", + "line": 581 + }, + { + "kind": "func", + "name": "ClearEventFrom", + "signature": "func (u *MeterUpsert) ClearEventFrom() *MeterUpsert", + "line": 587 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *MeterUpsertOne) UpdateNewValues() *MeterUpsertOne", + "line": 603 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *MeterUpsertOne) Ignore() *MeterUpsertOne", + "line": 634 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *MeterUpsertOne) DoNothing() *MeterUpsertOne", + "line": 641 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *MeterUpsertOne) Update(set func(*MeterUpsert)) *MeterUpsertOne", + "line": 648 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *MeterUpsertOne) SetMetadata(v map[string]string) *MeterUpsertOne", + "line": 656 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *MeterUpsertOne) UpdateMetadata() *MeterUpsertOne", + "line": 663 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *MeterUpsertOne) ClearMetadata() *MeterUpsertOne", + "line": 670 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *MeterUpsertOne) SetUpdatedAt(v time.Time) *MeterUpsertOne", + "line": 677 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *MeterUpsertOne) UpdateUpdatedAt() *MeterUpsertOne", + "line": 684 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *MeterUpsertOne) SetDeletedAt(v time.Time) *MeterUpsertOne", + "line": 691 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *MeterUpsertOne) UpdateDeletedAt() *MeterUpsertOne", + "line": 698 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *MeterUpsertOne) ClearDeletedAt() *MeterUpsertOne", + "line": 705 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *MeterUpsertOne) SetName(v string) *MeterUpsertOne", + "line": 712 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *MeterUpsertOne) UpdateName() *MeterUpsertOne", + "line": 719 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *MeterUpsertOne) SetDescription(v string) *MeterUpsertOne", + "line": 726 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *MeterUpsertOne) UpdateDescription() *MeterUpsertOne", + "line": 733 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *MeterUpsertOne) ClearDescription() *MeterUpsertOne", + "line": 740 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *MeterUpsertOne) SetAnnotations(v models.Annotations) *MeterUpsertOne", + "line": 747 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *MeterUpsertOne) UpdateAnnotations() *MeterUpsertOne", + "line": 754 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *MeterUpsertOne) ClearAnnotations() *MeterUpsertOne", + "line": 761 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (u *MeterUpsertOne) SetValueProperty(v string) *MeterUpsertOne", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateValueProperty", + "signature": "func (u *MeterUpsertOne) UpdateValueProperty() *MeterUpsertOne", + "line": 775 + }, + { + "kind": "func", + "name": "ClearValueProperty", + "signature": "func (u *MeterUpsertOne) ClearValueProperty() *MeterUpsertOne", + "line": 782 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (u *MeterUpsertOne) SetGroupBy(v map[string]string) *MeterUpsertOne", + "line": 789 + }, + { + "kind": "func", + "name": "UpdateGroupBy", + "signature": "func (u *MeterUpsertOne) UpdateGroupBy() *MeterUpsertOne", + "line": 796 + }, + { + "kind": "func", + "name": "ClearGroupBy", + "signature": "func (u *MeterUpsertOne) ClearGroupBy() *MeterUpsertOne", + "line": 803 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (u *MeterUpsertOne) SetEventFrom(v time.Time) *MeterUpsertOne", + "line": 810 + }, + { + "kind": "func", + "name": "UpdateEventFrom", + "signature": "func (u *MeterUpsertOne) UpdateEventFrom() *MeterUpsertOne", + "line": 817 + }, + { + "kind": "func", + "name": "ClearEventFrom", + "signature": "func (u *MeterUpsertOne) ClearEventFrom() *MeterUpsertOne", + "line": 824 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *MeterUpsertOne) Exec(ctx context.Context) error", + "line": 831 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *MeterUpsertOne) ExecX(ctx context.Context)", + "line": 839 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *MeterUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 846 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *MeterUpsertOne) IDX(ctx context.Context) string", + "line": 860 + }, + { + "kind": "struct", + "name": "MeterCreateBulk", + "signature": "type MeterCreateBulk struct", + "line": 869 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *MeterCreateBulk) Save(ctx context.Context) ([]*Meter, error)", + "line": 877 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *MeterCreateBulk) SaveX(ctx context.Context) []*Meter", + "line": 933 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *MeterCreateBulk) Exec(ctx context.Context) error", + "line": 942 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *MeterCreateBulk) ExecX(ctx context.Context)", + "line": 948 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *MeterCreateBulk) OnConflict(opts ...sql.ConflictOption) *MeterUpsertBulk", + "line": 969 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *MeterCreateBulk) OnConflictColumns(columns ...string) *MeterUpsertBulk", + "line": 982 + }, + { + "kind": "struct", + "name": "MeterUpsertBulk", + "signature": "type MeterUpsertBulk struct", + "line": 991 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *MeterUpsertBulk) UpdateNewValues() *MeterUpsertBulk", + "line": 1006 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *MeterUpsertBulk) Ignore() *MeterUpsertBulk", + "line": 1039 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *MeterUpsertBulk) DoNothing() *MeterUpsertBulk", + "line": 1046 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *MeterUpsertBulk) Update(set func(*MeterUpsert)) *MeterUpsertBulk", + "line": 1053 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *MeterUpsertBulk) SetMetadata(v map[string]string) *MeterUpsertBulk", + "line": 1061 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *MeterUpsertBulk) UpdateMetadata() *MeterUpsertBulk", + "line": 1068 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *MeterUpsertBulk) ClearMetadata() *MeterUpsertBulk", + "line": 1075 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *MeterUpsertBulk) SetUpdatedAt(v time.Time) *MeterUpsertBulk", + "line": 1082 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *MeterUpsertBulk) UpdateUpdatedAt() *MeterUpsertBulk", + "line": 1089 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *MeterUpsertBulk) SetDeletedAt(v time.Time) *MeterUpsertBulk", + "line": 1096 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *MeterUpsertBulk) UpdateDeletedAt() *MeterUpsertBulk", + "line": 1103 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *MeterUpsertBulk) ClearDeletedAt() *MeterUpsertBulk", + "line": 1110 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *MeterUpsertBulk) SetName(v string) *MeterUpsertBulk", + "line": 1117 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *MeterUpsertBulk) UpdateName() *MeterUpsertBulk", + "line": 1124 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *MeterUpsertBulk) SetDescription(v string) *MeterUpsertBulk", + "line": 1131 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *MeterUpsertBulk) UpdateDescription() *MeterUpsertBulk", + "line": 1138 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *MeterUpsertBulk) ClearDescription() *MeterUpsertBulk", + "line": 1145 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *MeterUpsertBulk) SetAnnotations(v models.Annotations) *MeterUpsertBulk", + "line": 1152 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *MeterUpsertBulk) UpdateAnnotations() *MeterUpsertBulk", + "line": 1159 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *MeterUpsertBulk) ClearAnnotations() *MeterUpsertBulk", + "line": 1166 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (u *MeterUpsertBulk) SetValueProperty(v string) *MeterUpsertBulk", + "line": 1173 + }, + { + "kind": "func", + "name": "UpdateValueProperty", + "signature": "func (u *MeterUpsertBulk) UpdateValueProperty() *MeterUpsertBulk", + "line": 1180 + }, + { + "kind": "func", + "name": "ClearValueProperty", + "signature": "func (u *MeterUpsertBulk) ClearValueProperty() *MeterUpsertBulk", + "line": 1187 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (u *MeterUpsertBulk) SetGroupBy(v map[string]string) *MeterUpsertBulk", + "line": 1194 + }, + { + "kind": "func", + "name": "UpdateGroupBy", + "signature": "func (u *MeterUpsertBulk) UpdateGroupBy() *MeterUpsertBulk", + "line": 1201 + }, + { + "kind": "func", + "name": "ClearGroupBy", + "signature": "func (u *MeterUpsertBulk) ClearGroupBy() *MeterUpsertBulk", + "line": 1208 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (u *MeterUpsertBulk) SetEventFrom(v time.Time) *MeterUpsertBulk", + "line": 1215 + }, + { + "kind": "func", + "name": "UpdateEventFrom", + "signature": "func (u *MeterUpsertBulk) UpdateEventFrom() *MeterUpsertBulk", + "line": 1222 + }, + { + "kind": "func", + "name": "ClearEventFrom", + "signature": "func (u *MeterUpsertBulk) ClearEventFrom() *MeterUpsertBulk", + "line": 1229 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *MeterUpsertBulk) Exec(ctx context.Context) error", + "line": 1236 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *MeterUpsertBulk) ExecX(ctx context.Context)", + "line": 1252 + } + ], + "line_count": 1256 + }, + "openmeter/ent/db/meter_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "MeterDelete", + "signature": "type MeterDelete struct", + "line": 17 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *MeterDelete) Where(ps ...predicate.Meter) *MeterDelete", + "line": 24 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *MeterDelete) Exec(ctx context.Context) (int, error)", + "line": 30 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *MeterDelete) ExecX(ctx context.Context) int", + "line": 35 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *MeterDelete) sqlExec(ctx context.Context) (int, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "MeterDeleteOne", + "signature": "type MeterDeleteOne struct", + "line": 61 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *MeterDeleteOne) Where(ps ...predicate.Meter) *MeterDeleteOne", + "line": 66 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *MeterDeleteOne) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *MeterDeleteOne) ExecX(ctx context.Context)", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/ent/db/meter_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "MeterQuery", + "signature": "type MeterQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *MeterQuery) Where(ps ...predicate.Meter) *MeterQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *MeterQuery) Limit(limit int) *MeterQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *MeterQuery) Offset(offset int) *MeterQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *MeterQuery) Unique(unique bool) *MeterQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *MeterQuery) Order(o ...dbmeter.OrderOption) *MeterQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryFeature", + "signature": "func (_q *MeterQuery) QueryFeature() *FeatureQuery", + "line": 67 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *MeterQuery) First(ctx context.Context) (*Meter, error)", + "line": 90 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *MeterQuery) FirstX(ctx context.Context) *Meter", + "line": 102 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *MeterQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *MeterQuery) FirstIDX(ctx context.Context) string", + "line": 125 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *MeterQuery) Only(ctx context.Context) (*Meter, error)", + "line": 136 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *MeterQuery) OnlyX(ctx context.Context) *Meter", + "line": 152 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *MeterQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 163 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *MeterQuery) OnlyIDX(ctx context.Context) string", + "line": 180 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *MeterQuery) All(ctx context.Context) ([]*Meter, error)", + "line": 189 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *MeterQuery) AllX(ctx context.Context) []*Meter", + "line": 199 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *MeterQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 208 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *MeterQuery) IDsX(ctx context.Context) []string", + "line": 220 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *MeterQuery) Count(ctx context.Context) (int, error)", + "line": 229 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *MeterQuery) CountX(ctx context.Context) int", + "line": 238 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *MeterQuery) Exist(ctx context.Context) (bool, error)", + "line": 247 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *MeterQuery) ExistX(ctx context.Context) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *MeterQuery) Clone() *MeterQuery", + "line": 270 + }, + { + "kind": "func", + "name": "WithFeature", + "signature": "func (_q *MeterQuery) WithFeature(opts ...func(*FeatureQuery)) *MeterQuery", + "line": 289 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *MeterQuery) GroupBy(field string, fields ...string) *MeterGroupBy", + "line": 312 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *MeterQuery) Select(fields ...string) *MeterSelect", + "line": 333 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *MeterQuery) Aggregate(fns ...AggregateFunc) *MeterSelect", + "line": 342 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *MeterQuery) prepareQuery(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *MeterQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Meter, error)", + "line": 372 + }, + { + "kind": "func", + "name": "loadFeature", + "signature": "func (_q *MeterQuery) loadFeature(ctx context.Context, query *FeatureQuery, nodes []*Meter, init func(*Meter), assign func(*Meter, *Feature)) error", + "line": 411 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *MeterQuery) sqlCount(ctx context.Context) (int, error)", + "line": 445 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *MeterQuery) querySpec() *sqlgraph.QuerySpec", + "line": 457 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *MeterQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 497 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *MeterQuery) ForUpdate(opts ...sql.LockOption) *MeterQuery", + "line": 535 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *MeterQuery) ForShare(opts ...sql.LockOption) *MeterQuery", + "line": 548 + }, + { + "kind": "struct", + "name": "MeterGroupBy", + "signature": "type MeterGroupBy struct", + "line": 559 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *MeterGroupBy) Aggregate(fns ...AggregateFunc) *MeterGroupBy", + "line": 565 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *MeterGroupBy) Scan(ctx context.Context, v any) error", + "line": 571 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *MeterGroupBy) sqlScan(ctx context.Context, root *MeterQuery, v any) error", + "line": 579 + }, + { + "kind": "struct", + "name": "MeterSelect", + "signature": "type MeterSelect struct", + "line": 607 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *MeterSelect) Aggregate(fns ...AggregateFunc) *MeterSelect", + "line": 613 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *MeterSelect) Scan(ctx context.Context, v any) error", + "line": 619 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *MeterSelect) sqlScan(ctx context.Context, root *MeterQuery, v any) error", + "line": 627 + } + ], + "line_count": 646 + }, + "openmeter/ent/db/meter_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "MeterUpdate", + "signature": "type MeterUpdate struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *MeterUpdate) Where(ps ...predicate.Meter) *MeterUpdate", + "line": 28 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *MeterUpdate) SetMetadata(v map[string]string) *MeterUpdate", + "line": 34 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *MeterUpdate) ClearMetadata() *MeterUpdate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *MeterUpdate) SetUpdatedAt(v time.Time) *MeterUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *MeterUpdate) SetDeletedAt(v time.Time) *MeterUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *MeterUpdate) SetNillableDeletedAt(v *time.Time) *MeterUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *MeterUpdate) ClearDeletedAt() *MeterUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *MeterUpdate) SetName(v string) *MeterUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *MeterUpdate) SetNillableName(v *string) *MeterUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *MeterUpdate) SetDescription(v string) *MeterUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *MeterUpdate) SetNillableDescription(v *string) *MeterUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *MeterUpdate) ClearDescription() *MeterUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *MeterUpdate) SetAnnotations(v models.Annotations) *MeterUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *MeterUpdate) ClearAnnotations() *MeterUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (_u *MeterUpdate) SetValueProperty(v string) *MeterUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableValueProperty", + "signature": "func (_u *MeterUpdate) SetNillableValueProperty(v *string) *MeterUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "ClearValueProperty", + "signature": "func (_u *MeterUpdate) ClearValueProperty() *MeterUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (_u *MeterUpdate) SetGroupBy(v map[string]string) *MeterUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "ClearGroupBy", + "signature": "func (_u *MeterUpdate) ClearGroupBy() *MeterUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (_u *MeterUpdate) SetEventFrom(v time.Time) *MeterUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "SetNillableEventFrom", + "signature": "func (_u *MeterUpdate) SetNillableEventFrom(v *time.Time) *MeterUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "ClearEventFrom", + "signature": "func (_u *MeterUpdate) ClearEventFrom() *MeterUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "AddFeatureIDs", + "signature": "func (_u *MeterUpdate) AddFeatureIDs(ids ...string) *MeterUpdate", + "line": 170 + }, + { + "kind": "func", + "name": "AddFeature", + "signature": "func (_u *MeterUpdate) AddFeature(v ...*Feature) *MeterUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *MeterUpdate) Mutation() *MeterMutation", + "line": 185 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *MeterUpdate) ClearFeature() *MeterUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "RemoveFeatureIDs", + "signature": "func (_u *MeterUpdate) RemoveFeatureIDs(ids ...string) *MeterUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "RemoveFeature", + "signature": "func (_u *MeterUpdate) RemoveFeature(v ...*Feature) *MeterUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *MeterUpdate) Save(ctx context.Context) (int, error)", + "line": 211 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *MeterUpdate) SaveX(ctx context.Context) int", + "line": 217 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *MeterUpdate) Exec(ctx context.Context) error", + "line": 226 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *MeterUpdate) ExecX(ctx context.Context)", + "line": 232 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *MeterUpdate) defaults()", + "line": 239 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *MeterUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 246 + }, + { + "kind": "struct", + "name": "MeterUpdateOne", + "signature": "type MeterUpdateOne struct", + "line": 361 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *MeterUpdateOne) SetMetadata(v map[string]string) *MeterUpdateOne", + "line": 369 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *MeterUpdateOne) ClearMetadata() *MeterUpdateOne", + "line": 375 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *MeterUpdateOne) SetUpdatedAt(v time.Time) *MeterUpdateOne", + "line": 381 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *MeterUpdateOne) SetDeletedAt(v time.Time) *MeterUpdateOne", + "line": 387 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *MeterUpdateOne) SetNillableDeletedAt(v *time.Time) *MeterUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *MeterUpdateOne) ClearDeletedAt() *MeterUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *MeterUpdateOne) SetName(v string) *MeterUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *MeterUpdateOne) SetNillableName(v *string) *MeterUpdateOne", + "line": 413 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *MeterUpdateOne) SetDescription(v string) *MeterUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *MeterUpdateOne) SetNillableDescription(v *string) *MeterUpdateOne", + "line": 427 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *MeterUpdateOne) ClearDescription() *MeterUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *MeterUpdateOne) SetAnnotations(v models.Annotations) *MeterUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *MeterUpdateOne) ClearAnnotations() *MeterUpdateOne", + "line": 447 + }, + { + "kind": "func", + "name": "SetValueProperty", + "signature": "func (_u *MeterUpdateOne) SetValueProperty(v string) *MeterUpdateOne", + "line": 453 + }, + { + "kind": "func", + "name": "SetNillableValueProperty", + "signature": "func (_u *MeterUpdateOne) SetNillableValueProperty(v *string) *MeterUpdateOne", + "line": 459 + }, + { + "kind": "func", + "name": "ClearValueProperty", + "signature": "func (_u *MeterUpdateOne) ClearValueProperty() *MeterUpdateOne", + "line": 467 + }, + { + "kind": "func", + "name": "SetGroupBy", + "signature": "func (_u *MeterUpdateOne) SetGroupBy(v map[string]string) *MeterUpdateOne", + "line": 473 + }, + { + "kind": "func", + "name": "ClearGroupBy", + "signature": "func (_u *MeterUpdateOne) ClearGroupBy() *MeterUpdateOne", + "line": 479 + }, + { + "kind": "func", + "name": "SetEventFrom", + "signature": "func (_u *MeterUpdateOne) SetEventFrom(v time.Time) *MeterUpdateOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetNillableEventFrom", + "signature": "func (_u *MeterUpdateOne) SetNillableEventFrom(v *time.Time) *MeterUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "ClearEventFrom", + "signature": "func (_u *MeterUpdateOne) ClearEventFrom() *MeterUpdateOne", + "line": 499 + }, + { + "kind": "func", + "name": "AddFeatureIDs", + "signature": "func (_u *MeterUpdateOne) AddFeatureIDs(ids ...string) *MeterUpdateOne", + "line": 505 + }, + { + "kind": "func", + "name": "AddFeature", + "signature": "func (_u *MeterUpdateOne) AddFeature(v ...*Feature) *MeterUpdateOne", + "line": 511 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *MeterUpdateOne) Mutation() *MeterMutation", + "line": 520 + }, + { + "kind": "func", + "name": "ClearFeature", + "signature": "func (_u *MeterUpdateOne) ClearFeature() *MeterUpdateOne", + "line": 525 + }, + { + "kind": "func", + "name": "RemoveFeatureIDs", + "signature": "func (_u *MeterUpdateOne) RemoveFeatureIDs(ids ...string) *MeterUpdateOne", + "line": 531 + }, + { + "kind": "func", + "name": "RemoveFeature", + "signature": "func (_u *MeterUpdateOne) RemoveFeature(v ...*Feature) *MeterUpdateOne", + "line": 537 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *MeterUpdateOne) Where(ps ...predicate.Meter) *MeterUpdateOne", + "line": 546 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *MeterUpdateOne) Select(field string, fields ...string) *MeterUpdateOne", + "line": 553 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *MeterUpdateOne) Save(ctx context.Context) (*Meter, error)", + "line": 559 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *MeterUpdateOne) SaveX(ctx context.Context) *Meter", + "line": 565 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *MeterUpdateOne) Exec(ctx context.Context) error", + "line": 574 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *MeterUpdateOne) ExecX(ctx context.Context)", + "line": 580 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *MeterUpdateOne) defaults()", + "line": 587 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *MeterUpdateOne) sqlSave(ctx context.Context) (_node *Meter, err error)", + "line": 594 + } + ], + "line_count": 726 + }, + "openmeter/ent/db/migrate/migrate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"io\"", + "symbols": [ + { + "kind": "struct", + "name": "Schema", + "signature": "type Schema struct", + "line": 36 + }, + { + "kind": "func", + "name": "NewSchema", + "signature": "func NewSchema(drv dialect.Driver) *Schema", + "line": 41 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 44 + }, + { + "kind": "func", + "name": "Create", + "signature": "func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error", + "line": 49 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func Diff(ctx context.Context, url string, opts ...schema.MigrateOption) error", + "line": 59 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func NamedDiff(ctx context.Context, url, name string, opts ...schema.MigrateOption) error", + "line": 65 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func (s *Schema) Diff(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 71 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func (s *Schema) NamedDiff(ctx context.Context, name string, opts ...schema.MigrateOption) error", + "line": 81 + }, + { + "kind": "func", + "name": "WriteTo", + "signature": "func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error", + "line": 94 + } + ], + "line_count": 96 + }, + "openmeter/ent/db/migrate/schema.go": { + "header": "\t\"entgo.io/ent/dialect/entsql\"\n\t\"entgo.io/ent/dialect/sql/schema\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 5267 + } + ], + "line_count": 5426 + }, + "openmeter/ent/db/notificationchannel.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannel", + "signature": "type NotificationChannel struct", + "line": 19 + }, + { + "kind": "struct", + "name": "NotificationChannelEdges", + "signature": "type NotificationChannelEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "RulesOrErr", + "signature": "func (e NotificationChannelEdges) RulesOrErr() ([]*NotificationRule, error)", + "line": 60 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *NotificationChannel) assignValues(columns []string, values []any) error", + "line": 91 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *NotificationChannel) Value(name string) (ent.Value, error)", + "line": 177 + }, + { + "kind": "func", + "name": "QueryRules", + "signature": "func (_m *NotificationChannel) QueryRules() *NotificationRuleQuery", + "line": 182 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *NotificationChannel) Update() *NotificationChannelUpdateOne", + "line": 189 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *NotificationChannel) Unwrap() *NotificationChannel", + "line": 195 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *NotificationChannel) String() string", + "line": 205 + } + ], + "line_count": 245 + }, + "openmeter/ent/db/notificationchannel/notificationchannel.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 73 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type notification.ChannelType) error", + "line": 104 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 117 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 122 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 127 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 132 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 137 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 142 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 147 + }, + { + "kind": "func", + "name": "ByDisabled", + "signature": "func ByDisabled(opts ...sql.OrderTermOption) OrderOption", + "line": 152 + }, + { + "kind": "func", + "name": "ByConfig", + "signature": "func ByConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 157 + }, + { + "kind": "func", + "name": "ByRulesCount", + "signature": "func ByRulesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 162 + }, + { + "kind": "func", + "name": "ByRules", + "signature": "func ByRules(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "newRulesStep", + "signature": "func newRulesStep() *sqlgraph.Step", + "line": 174 + } + ], + "line_count": 180 + }, + "openmeter/ent/db/notificationchannel/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.NotificationChannel", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.NotificationChannel", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.NotificationChannel", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.NotificationChannel", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.NotificationChannel", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.NotificationChannel", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.NotificationChannel", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.NotificationChannel", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.NotificationChannel", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.NotificationChannel", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.NotificationChannel", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.NotificationChannel", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.NotificationChannel", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.NotificationChannel", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.NotificationChannel", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.NotificationChannel", + "line": 90 + }, + { + "kind": "func", + "name": "Disabled", + "signature": "func Disabled(v bool) predicate.NotificationChannel", + "line": 95 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.NotificationChannel", + "line": 100 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.NotificationChannel", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.NotificationChannel", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.NotificationChannel", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.NotificationChannel", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.NotificationChannel", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.NotificationChannel", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.NotificationChannel", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.NotificationChannel", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.NotificationChannel", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.NotificationChannel", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.NotificationChannel", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.NotificationChannel", + "line": 160 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.NotificationChannel", + "line": 165 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.NotificationChannel", + "line": 170 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.NotificationChannel", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.NotificationChannel", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.NotificationChannel", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.NotificationChannel", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.NotificationChannel", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.NotificationChannel", + "line": 200 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.NotificationChannel", + "line": 205 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.NotificationChannel", + "line": 210 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.NotificationChannel", + "line": 215 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.NotificationChannel", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.NotificationChannel", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.NotificationChannel", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.NotificationChannel", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.NotificationChannel", + "line": 240 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.NotificationChannel", + "line": 245 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.NotificationChannel", + "line": 250 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.NotificationChannel", + "line": 255 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.NotificationChannel", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.NotificationChannel", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.NotificationChannel", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.NotificationChannel", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.NotificationChannel", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.NotificationChannel", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.NotificationChannel", + "line": 290 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.NotificationChannel", + "line": 295 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.NotificationChannel", + "line": 300 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.NotificationChannel", + "line": 305 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.NotificationChannel", + "line": 310 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v notification.ChannelType) predicate.NotificationChannel", + "line": 315 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v notification.ChannelType) predicate.NotificationChannel", + "line": 321 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...notification.ChannelType) predicate.NotificationChannel", + "line": 327 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...notification.ChannelType) predicate.NotificationChannel", + "line": 336 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.NotificationChannel", + "line": 345 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.NotificationChannel", + "line": 350 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.NotificationChannel", + "line": 355 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.NotificationChannel", + "line": 360 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.NotificationChannel", + "line": 365 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.NotificationChannel", + "line": 370 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.NotificationChannel", + "line": 375 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.NotificationChannel", + "line": 380 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.NotificationChannel", + "line": 385 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.NotificationChannel", + "line": 390 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.NotificationChannel", + "line": 395 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.NotificationChannel", + "line": 400 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.NotificationChannel", + "line": 405 + }, + { + "kind": "func", + "name": "DisabledEQ", + "signature": "func DisabledEQ(v bool) predicate.NotificationChannel", + "line": 410 + }, + { + "kind": "func", + "name": "DisabledNEQ", + "signature": "func DisabledNEQ(v bool) predicate.NotificationChannel", + "line": 415 + }, + { + "kind": "func", + "name": "DisabledIsNil", + "signature": "func DisabledIsNil() predicate.NotificationChannel", + "line": 420 + }, + { + "kind": "func", + "name": "DisabledNotNil", + "signature": "func DisabledNotNil() predicate.NotificationChannel", + "line": 425 + }, + { + "kind": "func", + "name": "HasRules", + "signature": "func HasRules() predicate.NotificationChannel", + "line": 430 + }, + { + "kind": "func", + "name": "HasRulesWith", + "signature": "func HasRulesWith(preds ...predicate.NotificationRule) predicate.NotificationChannel", + "line": 441 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.NotificationChannel) predicate.NotificationChannel", + "line": 453 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.NotificationChannel) predicate.NotificationChannel", + "line": 458 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.NotificationChannel) predicate.NotificationChannel", + "line": 463 + } + ], + "line_count": 465 + }, + "openmeter/ent/db/notificationchannel_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannelCreate", + "signature": "type NotificationChannelCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *NotificationChannelCreate) SetNamespace(v string) *NotificationChannelCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *NotificationChannelCreate) SetCreatedAt(v time.Time) *NotificationChannelCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *NotificationChannelCreate) SetNillableCreatedAt(v *time.Time) *NotificationChannelCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *NotificationChannelCreate) SetUpdatedAt(v time.Time) *NotificationChannelCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *NotificationChannelCreate) SetNillableUpdatedAt(v *time.Time) *NotificationChannelCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *NotificationChannelCreate) SetDeletedAt(v time.Time) *NotificationChannelCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *NotificationChannelCreate) SetNillableDeletedAt(v *time.Time) *NotificationChannelCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *NotificationChannelCreate) SetAnnotations(v models.Annotations) *NotificationChannelCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *NotificationChannelCreate) SetMetadata(v map[string]string) *NotificationChannelCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *NotificationChannelCreate) SetType(v notification.ChannelType) *NotificationChannelCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *NotificationChannelCreate) SetName(v string) *NotificationChannelCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_c *NotificationChannelCreate) SetDisabled(v bool) *NotificationChannelCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_c *NotificationChannelCreate) SetNillableDisabled(v *bool) *NotificationChannelCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_c *NotificationChannelCreate) SetConfig(v notification.ChannelConfig) *NotificationChannelCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *NotificationChannelCreate) SetID(v string) *NotificationChannelCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *NotificationChannelCreate) SetNillableID(v *string) *NotificationChannelCreate", + "line": 128 + }, + { + "kind": "func", + "name": "AddRuleIDs", + "signature": "func (_c *NotificationChannelCreate) AddRuleIDs(ids ...string) *NotificationChannelCreate", + "line": 136 + }, + { + "kind": "func", + "name": "AddRules", + "signature": "func (_c *NotificationChannelCreate) AddRules(v ...*NotificationRule) *NotificationChannelCreate", + "line": 142 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *NotificationChannelCreate) Mutation() *NotificationChannelMutation", + "line": 151 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationChannelCreate) Save(ctx context.Context) (*NotificationChannel, error)", + "line": 156 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationChannelCreate) SaveX(ctx context.Context) *NotificationChannel", + "line": 162 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationChannelCreate) Exec(ctx context.Context) error", + "line": 171 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationChannelCreate) ExecX(ctx context.Context)", + "line": 177 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *NotificationChannelCreate) defaults()", + "line": 184 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *NotificationChannelCreate) check() error", + "line": 204 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *NotificationChannelCreate) sqlSave(ctx context.Context) (*NotificationChannel, error)", + "line": 246 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *NotificationChannelCreate) createSpec() (*NotificationChannel, *sqlgraph.CreateSpec, error)", + "line": 272 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationChannelCreate) OnConflict(opts ...sql.ConflictOption) *NotificationChannelUpsertOne", + "line": 361 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationChannelCreate) OnConflictColumns(columns ...string) *NotificationChannelUpsertOne", + "line": 374 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationChannelUpsert) SetUpdatedAt(v time.Time) *NotificationChannelUpsert", + "line": 395 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationChannelUpsert) UpdateUpdatedAt() *NotificationChannelUpsert", + "line": 401 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationChannelUpsert) SetDeletedAt(v time.Time) *NotificationChannelUpsert", + "line": 407 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationChannelUpsert) UpdateDeletedAt() *NotificationChannelUpsert", + "line": 413 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationChannelUpsert) ClearDeletedAt() *NotificationChannelUpsert", + "line": 419 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationChannelUpsert) SetAnnotations(v models.Annotations) *NotificationChannelUpsert", + "line": 425 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationChannelUpsert) UpdateAnnotations() *NotificationChannelUpsert", + "line": 431 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationChannelUpsert) ClearAnnotations() *NotificationChannelUpsert", + "line": 437 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationChannelUpsert) SetMetadata(v map[string]string) *NotificationChannelUpsert", + "line": 443 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationChannelUpsert) UpdateMetadata() *NotificationChannelUpsert", + "line": 449 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationChannelUpsert) ClearMetadata() *NotificationChannelUpsert", + "line": 455 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationChannelUpsert) SetName(v string) *NotificationChannelUpsert", + "line": 461 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationChannelUpsert) UpdateName() *NotificationChannelUpsert", + "line": 467 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationChannelUpsert) SetDisabled(v bool) *NotificationChannelUpsert", + "line": 473 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationChannelUpsert) UpdateDisabled() *NotificationChannelUpsert", + "line": 479 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationChannelUpsert) ClearDisabled() *NotificationChannelUpsert", + "line": 485 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationChannelUpsert) SetConfig(v notification.ChannelConfig) *NotificationChannelUpsert", + "line": 491 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationChannelUpsert) UpdateConfig() *NotificationChannelUpsert", + "line": 497 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationChannelUpsertOne) UpdateNewValues() *NotificationChannelUpsertOne", + "line": 513 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationChannelUpsertOne) Ignore() *NotificationChannelUpsertOne", + "line": 538 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationChannelUpsertOne) DoNothing() *NotificationChannelUpsertOne", + "line": 545 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationChannelUpsertOne) Update(set func(*NotificationChannelUpsert)) *NotificationChannelUpsertOne", + "line": 552 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationChannelUpsertOne) SetUpdatedAt(v time.Time) *NotificationChannelUpsertOne", + "line": 560 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationChannelUpsertOne) UpdateUpdatedAt() *NotificationChannelUpsertOne", + "line": 567 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationChannelUpsertOne) SetDeletedAt(v time.Time) *NotificationChannelUpsertOne", + "line": 574 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationChannelUpsertOne) UpdateDeletedAt() *NotificationChannelUpsertOne", + "line": 581 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationChannelUpsertOne) ClearDeletedAt() *NotificationChannelUpsertOne", + "line": 588 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationChannelUpsertOne) SetAnnotations(v models.Annotations) *NotificationChannelUpsertOne", + "line": 595 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationChannelUpsertOne) UpdateAnnotations() *NotificationChannelUpsertOne", + "line": 602 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationChannelUpsertOne) ClearAnnotations() *NotificationChannelUpsertOne", + "line": 609 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationChannelUpsertOne) SetMetadata(v map[string]string) *NotificationChannelUpsertOne", + "line": 616 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationChannelUpsertOne) UpdateMetadata() *NotificationChannelUpsertOne", + "line": 623 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationChannelUpsertOne) ClearMetadata() *NotificationChannelUpsertOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationChannelUpsertOne) SetName(v string) *NotificationChannelUpsertOne", + "line": 637 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationChannelUpsertOne) UpdateName() *NotificationChannelUpsertOne", + "line": 644 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationChannelUpsertOne) SetDisabled(v bool) *NotificationChannelUpsertOne", + "line": 651 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationChannelUpsertOne) UpdateDisabled() *NotificationChannelUpsertOne", + "line": 658 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationChannelUpsertOne) ClearDisabled() *NotificationChannelUpsertOne", + "line": 665 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationChannelUpsertOne) SetConfig(v notification.ChannelConfig) *NotificationChannelUpsertOne", + "line": 672 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationChannelUpsertOne) UpdateConfig() *NotificationChannelUpsertOne", + "line": 679 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationChannelUpsertOne) Exec(ctx context.Context) error", + "line": 686 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationChannelUpsertOne) ExecX(ctx context.Context)", + "line": 694 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *NotificationChannelUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 701 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *NotificationChannelUpsertOne) IDX(ctx context.Context) string", + "line": 715 + }, + { + "kind": "struct", + "name": "NotificationChannelCreateBulk", + "signature": "type NotificationChannelCreateBulk struct", + "line": 724 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationChannelCreateBulk) Save(ctx context.Context) ([]*NotificationChannel, error)", + "line": 732 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationChannelCreateBulk) SaveX(ctx context.Context) []*NotificationChannel", + "line": 791 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationChannelCreateBulk) Exec(ctx context.Context) error", + "line": 800 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationChannelCreateBulk) ExecX(ctx context.Context)", + "line": 806 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationChannelCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationChannelUpsertBulk", + "line": 827 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationChannelCreateBulk) OnConflictColumns(columns ...string) *NotificationChannelUpsertBulk", + "line": 840 + }, + { + "kind": "struct", + "name": "NotificationChannelUpsertBulk", + "signature": "type NotificationChannelUpsertBulk struct", + "line": 849 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateNewValues() *NotificationChannelUpsertBulk", + "line": 864 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationChannelUpsertBulk) Ignore() *NotificationChannelUpsertBulk", + "line": 891 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationChannelUpsertBulk) DoNothing() *NotificationChannelUpsertBulk", + "line": 898 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationChannelUpsertBulk) Update(set func(*NotificationChannelUpsert)) *NotificationChannelUpsertBulk", + "line": 905 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationChannelUpsertBulk) SetUpdatedAt(v time.Time) *NotificationChannelUpsertBulk", + "line": 913 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateUpdatedAt() *NotificationChannelUpsertBulk", + "line": 920 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationChannelUpsertBulk) SetDeletedAt(v time.Time) *NotificationChannelUpsertBulk", + "line": 927 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateDeletedAt() *NotificationChannelUpsertBulk", + "line": 934 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationChannelUpsertBulk) ClearDeletedAt() *NotificationChannelUpsertBulk", + "line": 941 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationChannelUpsertBulk) SetAnnotations(v models.Annotations) *NotificationChannelUpsertBulk", + "line": 948 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateAnnotations() *NotificationChannelUpsertBulk", + "line": 955 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationChannelUpsertBulk) ClearAnnotations() *NotificationChannelUpsertBulk", + "line": 962 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationChannelUpsertBulk) SetMetadata(v map[string]string) *NotificationChannelUpsertBulk", + "line": 969 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateMetadata() *NotificationChannelUpsertBulk", + "line": 976 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationChannelUpsertBulk) ClearMetadata() *NotificationChannelUpsertBulk", + "line": 983 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationChannelUpsertBulk) SetName(v string) *NotificationChannelUpsertBulk", + "line": 990 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateName() *NotificationChannelUpsertBulk", + "line": 997 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationChannelUpsertBulk) SetDisabled(v bool) *NotificationChannelUpsertBulk", + "line": 1004 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateDisabled() *NotificationChannelUpsertBulk", + "line": 1011 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationChannelUpsertBulk) ClearDisabled() *NotificationChannelUpsertBulk", + "line": 1018 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationChannelUpsertBulk) SetConfig(v notification.ChannelConfig) *NotificationChannelUpsertBulk", + "line": 1025 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationChannelUpsertBulk) UpdateConfig() *NotificationChannelUpsertBulk", + "line": 1032 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationChannelUpsertBulk) Exec(ctx context.Context) error", + "line": 1039 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationChannelUpsertBulk) ExecX(ctx context.Context)", + "line": 1055 + } + ], + "line_count": 1059 + }, + "openmeter/ent/db/notificationchannel_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannelDelete", + "signature": "type NotificationChannelDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationChannelDelete) Where(ps ...predicate.NotificationChannel) *NotificationChannelDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationChannelDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationChannelDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *NotificationChannelDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "NotificationChannelDeleteOne", + "signature": "type NotificationChannelDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationChannelDeleteOne) Where(ps ...predicate.NotificationChannel) *NotificationChannelDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationChannelDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationChannelDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/notificationchannel_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannelQuery", + "signature": "type NotificationChannelQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *NotificationChannelQuery) Where(ps ...predicate.NotificationChannel) *NotificationChannelQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *NotificationChannelQuery) Limit(limit int) *NotificationChannelQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *NotificationChannelQuery) Offset(offset int) *NotificationChannelQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *NotificationChannelQuery) Unique(unique bool) *NotificationChannelQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *NotificationChannelQuery) Order(o ...notificationchannel.OrderOption) *NotificationChannelQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryRules", + "signature": "func (_q *NotificationChannelQuery) QueryRules() *NotificationRuleQuery", + "line": 67 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *NotificationChannelQuery) First(ctx context.Context) (*NotificationChannel, error)", + "line": 90 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *NotificationChannelQuery) FirstX(ctx context.Context) *NotificationChannel", + "line": 102 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *NotificationChannelQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *NotificationChannelQuery) FirstIDX(ctx context.Context) string", + "line": 125 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *NotificationChannelQuery) Only(ctx context.Context) (*NotificationChannel, error)", + "line": 136 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *NotificationChannelQuery) OnlyX(ctx context.Context) *NotificationChannel", + "line": 152 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *NotificationChannelQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 163 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *NotificationChannelQuery) OnlyIDX(ctx context.Context) string", + "line": 180 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *NotificationChannelQuery) All(ctx context.Context) ([]*NotificationChannel, error)", + "line": 189 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *NotificationChannelQuery) AllX(ctx context.Context) []*NotificationChannel", + "line": 199 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *NotificationChannelQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 208 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *NotificationChannelQuery) IDsX(ctx context.Context) []string", + "line": 220 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *NotificationChannelQuery) Count(ctx context.Context) (int, error)", + "line": 229 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *NotificationChannelQuery) CountX(ctx context.Context) int", + "line": 238 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *NotificationChannelQuery) Exist(ctx context.Context) (bool, error)", + "line": 247 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *NotificationChannelQuery) ExistX(ctx context.Context) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *NotificationChannelQuery) Clone() *NotificationChannelQuery", + "line": 270 + }, + { + "kind": "func", + "name": "WithRules", + "signature": "func (_q *NotificationChannelQuery) WithRules(opts ...func(*NotificationRuleQuery)) *NotificationChannelQuery", + "line": 289 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *NotificationChannelQuery) GroupBy(field string, fields ...string) *NotificationChannelGroupBy", + "line": 312 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *NotificationChannelQuery) Select(fields ...string) *NotificationChannelSelect", + "line": 333 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *NotificationChannelQuery) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect", + "line": 342 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *NotificationChannelQuery) prepareQuery(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *NotificationChannelQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*NotificationChannel, error)", + "line": 372 + }, + { + "kind": "func", + "name": "loadRules", + "signature": "func (_q *NotificationChannelQuery) loadRules(ctx context.Context, query *NotificationRuleQuery, nodes []*NotificationChannel, init func(*NotificationChannel), assign func(*NotificationChannel, *NotificationRule)) error", + "line": 411 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *NotificationChannelQuery) sqlCount(ctx context.Context) (int, error)", + "line": 473 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *NotificationChannelQuery) querySpec() *sqlgraph.QuerySpec", + "line": 485 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *NotificationChannelQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 525 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *NotificationChannelQuery) ForUpdate(opts ...sql.LockOption) *NotificationChannelQuery", + "line": 563 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *NotificationChannelQuery) ForShare(opts ...sql.LockOption) *NotificationChannelQuery", + "line": 576 + }, + { + "kind": "struct", + "name": "NotificationChannelGroupBy", + "signature": "type NotificationChannelGroupBy struct", + "line": 587 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *NotificationChannelGroupBy) Aggregate(fns ...AggregateFunc) *NotificationChannelGroupBy", + "line": 593 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *NotificationChannelGroupBy) Scan(ctx context.Context, v any) error", + "line": 599 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *NotificationChannelGroupBy) sqlScan(ctx context.Context, root *NotificationChannelQuery, v any) error", + "line": 607 + }, + { + "kind": "struct", + "name": "NotificationChannelSelect", + "signature": "type NotificationChannelSelect struct", + "line": 635 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *NotificationChannelSelect) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect", + "line": 641 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *NotificationChannelSelect) Scan(ctx context.Context, v any) error", + "line": 647 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *NotificationChannelSelect) sqlScan(ctx context.Context, root *NotificationChannelQuery, v any) error", + "line": 655 + } + ], + "line_count": 674 + }, + "openmeter/ent/db/notificationchannel_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannelUpdate", + "signature": "type NotificationChannelUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationChannelUpdate) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationChannelUpdate) SetUpdatedAt(v time.Time) *NotificationChannelUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *NotificationChannelUpdate) SetDeletedAt(v time.Time) *NotificationChannelUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *NotificationChannelUpdate) SetNillableDeletedAt(v *time.Time) *NotificationChannelUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *NotificationChannelUpdate) ClearDeletedAt() *NotificationChannelUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationChannelUpdate) SetAnnotations(v models.Annotations) *NotificationChannelUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationChannelUpdate) ClearAnnotations() *NotificationChannelUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *NotificationChannelUpdate) SetMetadata(v map[string]string) *NotificationChannelUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *NotificationChannelUpdate) ClearMetadata() *NotificationChannelUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *NotificationChannelUpdate) SetName(v string) *NotificationChannelUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *NotificationChannelUpdate) SetNillableName(v *string) *NotificationChannelUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_u *NotificationChannelUpdate) SetDisabled(v bool) *NotificationChannelUpdate", + "line": 99 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_u *NotificationChannelUpdate) SetNillableDisabled(v *bool) *NotificationChannelUpdate", + "line": 105 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (_u *NotificationChannelUpdate) ClearDisabled() *NotificationChannelUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *NotificationChannelUpdate) SetConfig(v notification.ChannelConfig) *NotificationChannelUpdate", + "line": 119 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *NotificationChannelUpdate) SetNillableConfig(v *notification.ChannelConfig) *NotificationChannelUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "AddRuleIDs", + "signature": "func (_u *NotificationChannelUpdate) AddRuleIDs(ids ...string) *NotificationChannelUpdate", + "line": 133 + }, + { + "kind": "func", + "name": "AddRules", + "signature": "func (_u *NotificationChannelUpdate) AddRules(v ...*NotificationRule) *NotificationChannelUpdate", + "line": 139 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationChannelUpdate) Mutation() *NotificationChannelMutation", + "line": 148 + }, + { + "kind": "func", + "name": "ClearRules", + "signature": "func (_u *NotificationChannelUpdate) ClearRules() *NotificationChannelUpdate", + "line": 153 + }, + { + "kind": "func", + "name": "RemoveRuleIDs", + "signature": "func (_u *NotificationChannelUpdate) RemoveRuleIDs(ids ...string) *NotificationChannelUpdate", + "line": 159 + }, + { + "kind": "func", + "name": "RemoveRules", + "signature": "func (_u *NotificationChannelUpdate) RemoveRules(v ...*NotificationRule) *NotificationChannelUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationChannelUpdate) Save(ctx context.Context) (int, error)", + "line": 174 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationChannelUpdate) SaveX(ctx context.Context) int", + "line": 180 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationChannelUpdate) Exec(ctx context.Context) error", + "line": 189 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationChannelUpdate) ExecX(ctx context.Context)", + "line": 195 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationChannelUpdate) defaults()", + "line": 202 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationChannelUpdate) check() error", + "line": 210 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationChannelUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 224 + }, + { + "kind": "struct", + "name": "NotificationChannelUpdateOne", + "signature": "type NotificationChannelUpdateOne struct", + "line": 331 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationChannelUpdateOne) SetUpdatedAt(v time.Time) *NotificationChannelUpdateOne", + "line": 339 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *NotificationChannelUpdateOne) SetDeletedAt(v time.Time) *NotificationChannelUpdateOne", + "line": 345 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *NotificationChannelUpdateOne) SetNillableDeletedAt(v *time.Time) *NotificationChannelUpdateOne", + "line": 351 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *NotificationChannelUpdateOne) ClearDeletedAt() *NotificationChannelUpdateOne", + "line": 359 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationChannelUpdateOne) SetAnnotations(v models.Annotations) *NotificationChannelUpdateOne", + "line": 365 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationChannelUpdateOne) ClearAnnotations() *NotificationChannelUpdateOne", + "line": 371 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *NotificationChannelUpdateOne) SetMetadata(v map[string]string) *NotificationChannelUpdateOne", + "line": 377 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *NotificationChannelUpdateOne) ClearMetadata() *NotificationChannelUpdateOne", + "line": 383 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *NotificationChannelUpdateOne) SetName(v string) *NotificationChannelUpdateOne", + "line": 389 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *NotificationChannelUpdateOne) SetNillableName(v *string) *NotificationChannelUpdateOne", + "line": 395 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_u *NotificationChannelUpdateOne) SetDisabled(v bool) *NotificationChannelUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_u *NotificationChannelUpdateOne) SetNillableDisabled(v *bool) *NotificationChannelUpdateOne", + "line": 409 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (_u *NotificationChannelUpdateOne) ClearDisabled() *NotificationChannelUpdateOne", + "line": 417 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *NotificationChannelUpdateOne) SetConfig(v notification.ChannelConfig) *NotificationChannelUpdateOne", + "line": 423 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *NotificationChannelUpdateOne) SetNillableConfig(v *notification.ChannelConfig) *NotificationChannelUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "AddRuleIDs", + "signature": "func (_u *NotificationChannelUpdateOne) AddRuleIDs(ids ...string) *NotificationChannelUpdateOne", + "line": 437 + }, + { + "kind": "func", + "name": "AddRules", + "signature": "func (_u *NotificationChannelUpdateOne) AddRules(v ...*NotificationRule) *NotificationChannelUpdateOne", + "line": 443 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationChannelUpdateOne) Mutation() *NotificationChannelMutation", + "line": 452 + }, + { + "kind": "func", + "name": "ClearRules", + "signature": "func (_u *NotificationChannelUpdateOne) ClearRules() *NotificationChannelUpdateOne", + "line": 457 + }, + { + "kind": "func", + "name": "RemoveRuleIDs", + "signature": "func (_u *NotificationChannelUpdateOne) RemoveRuleIDs(ids ...string) *NotificationChannelUpdateOne", + "line": 463 + }, + { + "kind": "func", + "name": "RemoveRules", + "signature": "func (_u *NotificationChannelUpdateOne) RemoveRules(v ...*NotificationRule) *NotificationChannelUpdateOne", + "line": 469 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationChannelUpdateOne) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdateOne", + "line": 478 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *NotificationChannelUpdateOne) Select(field string, fields ...string) *NotificationChannelUpdateOne", + "line": 485 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationChannelUpdateOne) Save(ctx context.Context) (*NotificationChannel, error)", + "line": 491 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationChannelUpdateOne) SaveX(ctx context.Context) *NotificationChannel", + "line": 497 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationChannelUpdateOne) Exec(ctx context.Context) error", + "line": 506 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationChannelUpdateOne) ExecX(ctx context.Context)", + "line": 512 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationChannelUpdateOne) defaults()", + "line": 519 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationChannelUpdateOne) check() error", + "line": 527 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationChannelUpdateOne) sqlSave(ctx context.Context) (_node *NotificationChannel, err error)", + "line": 541 + } + ], + "line_count": 665 + }, + "openmeter/ent/db/notificationevent.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEvent", + "signature": "type NotificationEvent struct", + "line": 20 + }, + { + "kind": "struct", + "name": "NotificationEventEdges", + "signature": "type NotificationEventEdges struct", + "line": 43 + }, + { + "kind": "func", + "name": "DeliveryStatusesOrErr", + "signature": "func (e NotificationEventEdges) DeliveryStatusesOrErr() ([]*NotificationEventDeliveryStatus, error)", + "line": 55 + }, + { + "kind": "func", + "name": "RulesOrErr", + "signature": "func (e NotificationEventEdges) RulesOrErr() (*NotificationRule, error)", + "line": 64 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *NotificationEvent) assignValues(columns []string, values []any) error", + "line": 93 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *NotificationEvent) Value(name string) (ent.Value, error)", + "line": 152 + }, + { + "kind": "func", + "name": "QueryDeliveryStatuses", + "signature": "func (_m *NotificationEvent) QueryDeliveryStatuses() *NotificationEventDeliveryStatusQuery", + "line": 157 + }, + { + "kind": "func", + "name": "QueryRules", + "signature": "func (_m *NotificationEvent) QueryRules() *NotificationRuleQuery", + "line": 162 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *NotificationEvent) Update() *NotificationEventUpdateOne", + "line": 169 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *NotificationEvent) Unwrap() *NotificationEvent", + "line": 175 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *NotificationEvent) String() string", + "line": 185 + } + ], + "line_count": 211 + }, + "openmeter/ent/db/notificationevent/notificationevent.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 69 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type notification.EventType) error", + "line": 88 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 101 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 106 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 111 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 116 + }, + { + "kind": "func", + "name": "ByRuleID", + "signature": "func ByRuleID(opts ...sql.OrderTermOption) OrderOption", + "line": 121 + }, + { + "kind": "func", + "name": "ByPayload", + "signature": "func ByPayload(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByDeliveryStatusesCount", + "signature": "func ByDeliveryStatusesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByDeliveryStatuses", + "signature": "func ByDeliveryStatuses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 138 + }, + { + "kind": "func", + "name": "ByRulesField", + "signature": "func ByRulesField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "newDeliveryStatusesStep", + "signature": "func newDeliveryStatusesStep() *sqlgraph.Step", + "line": 150 + }, + { + "kind": "func", + "name": "newRulesStep", + "signature": "func newRulesStep() *sqlgraph.Step", + "line": 157 + } + ], + "line_count": 163 + }, + "openmeter/ent/db/notificationevent/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.NotificationEvent", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.NotificationEvent", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.NotificationEvent", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.NotificationEvent", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.NotificationEvent", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.NotificationEvent", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.NotificationEvent", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.NotificationEvent", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.NotificationEvent", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.NotificationEvent", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.NotificationEvent", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.NotificationEvent", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.NotificationEvent", + "line": 75 + }, + { + "kind": "func", + "name": "RuleID", + "signature": "func RuleID(v string) predicate.NotificationEvent", + "line": 80 + }, + { + "kind": "func", + "name": "Payload", + "signature": "func Payload(v string) predicate.NotificationEvent", + "line": 85 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.NotificationEvent", + "line": 90 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.NotificationEvent", + "line": 95 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.NotificationEvent", + "line": 100 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.NotificationEvent", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.NotificationEvent", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.NotificationEvent", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.NotificationEvent", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.NotificationEvent", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.NotificationEvent", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.NotificationEvent", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.NotificationEvent", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.NotificationEvent", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.NotificationEvent", + "line": 150 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.NotificationEvent", + "line": 155 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.NotificationEvent", + "line": 160 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.NotificationEvent", + "line": 165 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.NotificationEvent", + "line": 170 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.NotificationEvent", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.NotificationEvent", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.NotificationEvent", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.NotificationEvent", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.NotificationEvent", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.NotificationEvent", + "line": 200 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v notification.EventType) predicate.NotificationEvent", + "line": 205 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v notification.EventType) predicate.NotificationEvent", + "line": 211 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...notification.EventType) predicate.NotificationEvent", + "line": 217 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...notification.EventType) predicate.NotificationEvent", + "line": 226 + }, + { + "kind": "func", + "name": "RuleIDEQ", + "signature": "func RuleIDEQ(v string) predicate.NotificationEvent", + "line": 235 + }, + { + "kind": "func", + "name": "RuleIDNEQ", + "signature": "func RuleIDNEQ(v string) predicate.NotificationEvent", + "line": 240 + }, + { + "kind": "func", + "name": "RuleIDIn", + "signature": "func RuleIDIn(vs ...string) predicate.NotificationEvent", + "line": 245 + }, + { + "kind": "func", + "name": "RuleIDNotIn", + "signature": "func RuleIDNotIn(vs ...string) predicate.NotificationEvent", + "line": 250 + }, + { + "kind": "func", + "name": "RuleIDGT", + "signature": "func RuleIDGT(v string) predicate.NotificationEvent", + "line": 255 + }, + { + "kind": "func", + "name": "RuleIDGTE", + "signature": "func RuleIDGTE(v string) predicate.NotificationEvent", + "line": 260 + }, + { + "kind": "func", + "name": "RuleIDLT", + "signature": "func RuleIDLT(v string) predicate.NotificationEvent", + "line": 265 + }, + { + "kind": "func", + "name": "RuleIDLTE", + "signature": "func RuleIDLTE(v string) predicate.NotificationEvent", + "line": 270 + }, + { + "kind": "func", + "name": "RuleIDContains", + "signature": "func RuleIDContains(v string) predicate.NotificationEvent", + "line": 275 + }, + { + "kind": "func", + "name": "RuleIDHasPrefix", + "signature": "func RuleIDHasPrefix(v string) predicate.NotificationEvent", + "line": 280 + }, + { + "kind": "func", + "name": "RuleIDHasSuffix", + "signature": "func RuleIDHasSuffix(v string) predicate.NotificationEvent", + "line": 285 + }, + { + "kind": "func", + "name": "RuleIDEqualFold", + "signature": "func RuleIDEqualFold(v string) predicate.NotificationEvent", + "line": 290 + }, + { + "kind": "func", + "name": "RuleIDContainsFold", + "signature": "func RuleIDContainsFold(v string) predicate.NotificationEvent", + "line": 295 + }, + { + "kind": "func", + "name": "PayloadEQ", + "signature": "func PayloadEQ(v string) predicate.NotificationEvent", + "line": 300 + }, + { + "kind": "func", + "name": "PayloadNEQ", + "signature": "func PayloadNEQ(v string) predicate.NotificationEvent", + "line": 305 + }, + { + "kind": "func", + "name": "PayloadIn", + "signature": "func PayloadIn(vs ...string) predicate.NotificationEvent", + "line": 310 + }, + { + "kind": "func", + "name": "PayloadNotIn", + "signature": "func PayloadNotIn(vs ...string) predicate.NotificationEvent", + "line": 315 + }, + { + "kind": "func", + "name": "PayloadGT", + "signature": "func PayloadGT(v string) predicate.NotificationEvent", + "line": 320 + }, + { + "kind": "func", + "name": "PayloadGTE", + "signature": "func PayloadGTE(v string) predicate.NotificationEvent", + "line": 325 + }, + { + "kind": "func", + "name": "PayloadLT", + "signature": "func PayloadLT(v string) predicate.NotificationEvent", + "line": 330 + }, + { + "kind": "func", + "name": "PayloadLTE", + "signature": "func PayloadLTE(v string) predicate.NotificationEvent", + "line": 335 + }, + { + "kind": "func", + "name": "PayloadContains", + "signature": "func PayloadContains(v string) predicate.NotificationEvent", + "line": 340 + }, + { + "kind": "func", + "name": "PayloadHasPrefix", + "signature": "func PayloadHasPrefix(v string) predicate.NotificationEvent", + "line": 345 + }, + { + "kind": "func", + "name": "PayloadHasSuffix", + "signature": "func PayloadHasSuffix(v string) predicate.NotificationEvent", + "line": 350 + }, + { + "kind": "func", + "name": "PayloadEqualFold", + "signature": "func PayloadEqualFold(v string) predicate.NotificationEvent", + "line": 355 + }, + { + "kind": "func", + "name": "PayloadContainsFold", + "signature": "func PayloadContainsFold(v string) predicate.NotificationEvent", + "line": 360 + }, + { + "kind": "func", + "name": "HasDeliveryStatuses", + "signature": "func HasDeliveryStatuses() predicate.NotificationEvent", + "line": 365 + }, + { + "kind": "func", + "name": "HasDeliveryStatusesWith", + "signature": "func HasDeliveryStatusesWith(preds ...predicate.NotificationEventDeliveryStatus) predicate.NotificationEvent", + "line": 376 + }, + { + "kind": "func", + "name": "HasRules", + "signature": "func HasRules() predicate.NotificationEvent", + "line": 388 + }, + { + "kind": "func", + "name": "HasRulesWith", + "signature": "func HasRulesWith(preds ...predicate.NotificationRule) predicate.NotificationEvent", + "line": 399 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.NotificationEvent) predicate.NotificationEvent", + "line": 411 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.NotificationEvent) predicate.NotificationEvent", + "line": 416 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.NotificationEvent) predicate.NotificationEvent", + "line": 421 + } + ], + "line_count": 423 + }, + "openmeter/ent/db/notificationevent_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventCreate", + "signature": "type NotificationEventCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *NotificationEventCreate) SetNamespace(v string) *NotificationEventCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *NotificationEventCreate) SetAnnotations(v models.Annotations) *NotificationEventCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *NotificationEventCreate) SetCreatedAt(v time.Time) *NotificationEventCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *NotificationEventCreate) SetNillableCreatedAt(v *time.Time) *NotificationEventCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *NotificationEventCreate) SetType(v notification.EventType) *NotificationEventCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetRuleID", + "signature": "func (_c *NotificationEventCreate) SetRuleID(v string) *NotificationEventCreate", + "line": 63 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (_c *NotificationEventCreate) SetPayload(v string) *NotificationEventCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *NotificationEventCreate) SetID(v string) *NotificationEventCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *NotificationEventCreate) SetNillableID(v *string) *NotificationEventCreate", + "line": 81 + }, + { + "kind": "func", + "name": "AddDeliveryStatusIDs", + "signature": "func (_c *NotificationEventCreate) AddDeliveryStatusIDs(ids ...string) *NotificationEventCreate", + "line": 89 + }, + { + "kind": "func", + "name": "AddDeliveryStatuses", + "signature": "func (_c *NotificationEventCreate) AddDeliveryStatuses(v ...*NotificationEventDeliveryStatus) *NotificationEventCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetRulesID", + "signature": "func (_c *NotificationEventCreate) SetRulesID(id string) *NotificationEventCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetRules", + "signature": "func (_c *NotificationEventCreate) SetRules(v *NotificationRule) *NotificationEventCreate", + "line": 110 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *NotificationEventCreate) Mutation() *NotificationEventMutation", + "line": 115 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationEventCreate) Save(ctx context.Context) (*NotificationEvent, error)", + "line": 120 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationEventCreate) SaveX(ctx context.Context) *NotificationEvent", + "line": 126 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationEventCreate) Exec(ctx context.Context) error", + "line": 135 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationEventCreate) ExecX(ctx context.Context)", + "line": 141 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *NotificationEventCreate) defaults()", + "line": 148 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *NotificationEventCreate) check() error", + "line": 160 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *NotificationEventCreate) sqlSave(ctx context.Context) (*NotificationEvent, error)", + "line": 192 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *NotificationEventCreate) createSpec() (*NotificationEvent, *sqlgraph.CreateSpec)", + "line": 215 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationEventCreate) OnConflict(opts ...sql.ConflictOption) *NotificationEventUpsertOne", + "line": 297 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationEventCreate) OnConflictColumns(columns ...string) *NotificationEventUpsertOne", + "line": 310 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventUpsert) SetAnnotations(v models.Annotations) *NotificationEventUpsert", + "line": 331 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventUpsert) UpdateAnnotations() *NotificationEventUpsert", + "line": 337 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventUpsert) ClearAnnotations() *NotificationEventUpsert", + "line": 343 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (u *NotificationEventUpsert) SetPayload(v string) *NotificationEventUpsert", + "line": 349 + }, + { + "kind": "func", + "name": "UpdatePayload", + "signature": "func (u *NotificationEventUpsert) UpdatePayload() *NotificationEventUpsert", + "line": 355 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationEventUpsertOne) UpdateNewValues() *NotificationEventUpsertOne", + "line": 371 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationEventUpsertOne) Ignore() *NotificationEventUpsertOne", + "line": 399 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationEventUpsertOne) DoNothing() *NotificationEventUpsertOne", + "line": 406 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationEventUpsertOne) Update(set func(*NotificationEventUpsert)) *NotificationEventUpsertOne", + "line": 413 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventUpsertOne) SetAnnotations(v models.Annotations) *NotificationEventUpsertOne", + "line": 421 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventUpsertOne) UpdateAnnotations() *NotificationEventUpsertOne", + "line": 428 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventUpsertOne) ClearAnnotations() *NotificationEventUpsertOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (u *NotificationEventUpsertOne) SetPayload(v string) *NotificationEventUpsertOne", + "line": 442 + }, + { + "kind": "func", + "name": "UpdatePayload", + "signature": "func (u *NotificationEventUpsertOne) UpdatePayload() *NotificationEventUpsertOne", + "line": 449 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationEventUpsertOne) Exec(ctx context.Context) error", + "line": 456 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationEventUpsertOne) ExecX(ctx context.Context)", + "line": 464 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *NotificationEventUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 471 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *NotificationEventUpsertOne) IDX(ctx context.Context) string", + "line": 485 + }, + { + "kind": "struct", + "name": "NotificationEventCreateBulk", + "signature": "type NotificationEventCreateBulk struct", + "line": 494 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationEventCreateBulk) Save(ctx context.Context) ([]*NotificationEvent, error)", + "line": 502 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationEventCreateBulk) SaveX(ctx context.Context) []*NotificationEvent", + "line": 558 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationEventCreateBulk) Exec(ctx context.Context) error", + "line": 567 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationEventCreateBulk) ExecX(ctx context.Context)", + "line": 573 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationEventUpsertBulk", + "line": 594 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationEventCreateBulk) OnConflictColumns(columns ...string) *NotificationEventUpsertBulk", + "line": 607 + }, + { + "kind": "struct", + "name": "NotificationEventUpsertBulk", + "signature": "type NotificationEventUpsertBulk struct", + "line": 616 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationEventUpsertBulk) UpdateNewValues() *NotificationEventUpsertBulk", + "line": 631 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationEventUpsertBulk) Ignore() *NotificationEventUpsertBulk", + "line": 661 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationEventUpsertBulk) DoNothing() *NotificationEventUpsertBulk", + "line": 668 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationEventUpsertBulk) Update(set func(*NotificationEventUpsert)) *NotificationEventUpsertBulk", + "line": 675 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventUpsertBulk) SetAnnotations(v models.Annotations) *NotificationEventUpsertBulk", + "line": 683 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventUpsertBulk) UpdateAnnotations() *NotificationEventUpsertBulk", + "line": 690 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventUpsertBulk) ClearAnnotations() *NotificationEventUpsertBulk", + "line": 697 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (u *NotificationEventUpsertBulk) SetPayload(v string) *NotificationEventUpsertBulk", + "line": 704 + }, + { + "kind": "func", + "name": "UpdatePayload", + "signature": "func (u *NotificationEventUpsertBulk) UpdatePayload() *NotificationEventUpsertBulk", + "line": 711 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationEventUpsertBulk) Exec(ctx context.Context) error", + "line": 718 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationEventUpsertBulk) ExecX(ctx context.Context)", + "line": 734 + } + ], + "line_count": 738 + }, + "openmeter/ent/db/notificationevent_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDelete", + "signature": "type NotificationEventDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationEventDelete) Where(ps ...predicate.NotificationEvent) *NotificationEventDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationEventDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationEventDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *NotificationEventDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "NotificationEventDeleteOne", + "signature": "type NotificationEventDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationEventDeleteOne) Where(ps ...predicate.NotificationEvent) *NotificationEventDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationEventDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationEventDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/notificationevent_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventQuery", + "signature": "type NotificationEventQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *NotificationEventQuery) Where(ps ...predicate.NotificationEvent) *NotificationEventQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *NotificationEventQuery) Limit(limit int) *NotificationEventQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *NotificationEventQuery) Offset(offset int) *NotificationEventQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *NotificationEventQuery) Unique(unique bool) *NotificationEventQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *NotificationEventQuery) Order(o ...notificationevent.OrderOption) *NotificationEventQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryDeliveryStatuses", + "signature": "func (_q *NotificationEventQuery) QueryDeliveryStatuses() *NotificationEventDeliveryStatusQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryRules", + "signature": "func (_q *NotificationEventQuery) QueryRules() *NotificationRuleQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *NotificationEventQuery) First(ctx context.Context) (*NotificationEvent, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *NotificationEventQuery) FirstX(ctx context.Context) *NotificationEvent", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *NotificationEventQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *NotificationEventQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *NotificationEventQuery) Only(ctx context.Context) (*NotificationEvent, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *NotificationEventQuery) OnlyX(ctx context.Context) *NotificationEvent", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *NotificationEventQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *NotificationEventQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *NotificationEventQuery) All(ctx context.Context) ([]*NotificationEvent, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *NotificationEventQuery) AllX(ctx context.Context) []*NotificationEvent", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *NotificationEventQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *NotificationEventQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *NotificationEventQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *NotificationEventQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *NotificationEventQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *NotificationEventQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *NotificationEventQuery) Clone() *NotificationEventQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithDeliveryStatuses", + "signature": "func (_q *NotificationEventQuery) WithDeliveryStatuses(opts ...func(*NotificationEventDeliveryStatusQuery)) *NotificationEventQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithRules", + "signature": "func (_q *NotificationEventQuery) WithRules(opts ...func(*NotificationRuleQuery)) *NotificationEventQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *NotificationEventQuery) GroupBy(field string, fields ...string) *NotificationEventGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *NotificationEventQuery) Select(fields ...string) *NotificationEventSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *NotificationEventQuery) Aggregate(fns ...AggregateFunc) *NotificationEventSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *NotificationEventQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *NotificationEventQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*NotificationEvent, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadDeliveryStatuses", + "signature": "func (_q *NotificationEventQuery) loadDeliveryStatuses(ctx context.Context, query *NotificationEventDeliveryStatusQuery, nodes []*NotificationEvent, init func(*NotificationEvent), assign func(*NotificationEvent, *NotificationEventDeliveryStatus)) error", + "line": 456 + }, + { + "kind": "func", + "name": "loadRules", + "signature": "func (_q *NotificationEventQuery) loadRules(ctx context.Context, query *NotificationRuleQuery, nodes []*NotificationEvent, init func(*NotificationEvent), assign func(*NotificationEvent, *NotificationRule)) error", + "line": 517 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *NotificationEventQuery) sqlCount(ctx context.Context) (int, error)", + "line": 547 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *NotificationEventQuery) querySpec() *sqlgraph.QuerySpec", + "line": 559 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *NotificationEventQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 602 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *NotificationEventQuery) ForUpdate(opts ...sql.LockOption) *NotificationEventQuery", + "line": 640 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *NotificationEventQuery) ForShare(opts ...sql.LockOption) *NotificationEventQuery", + "line": 653 + }, + { + "kind": "struct", + "name": "NotificationEventGroupBy", + "signature": "type NotificationEventGroupBy struct", + "line": 664 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *NotificationEventGroupBy) Aggregate(fns ...AggregateFunc) *NotificationEventGroupBy", + "line": 670 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *NotificationEventGroupBy) Scan(ctx context.Context, v any) error", + "line": 676 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *NotificationEventGroupBy) sqlScan(ctx context.Context, root *NotificationEventQuery, v any) error", + "line": 684 + }, + { + "kind": "struct", + "name": "NotificationEventSelect", + "signature": "type NotificationEventSelect struct", + "line": 712 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *NotificationEventSelect) Aggregate(fns ...AggregateFunc) *NotificationEventSelect", + "line": 718 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *NotificationEventSelect) Scan(ctx context.Context, v any) error", + "line": 724 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *NotificationEventSelect) sqlScan(ctx context.Context, root *NotificationEventQuery, v any) error", + "line": 732 + } + ], + "line_count": 751 + }, + "openmeter/ent/db/notificationevent_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventUpdate", + "signature": "type NotificationEventUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationEventUpdate) Where(ps ...predicate.NotificationEvent) *NotificationEventUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationEventUpdate) SetAnnotations(v models.Annotations) *NotificationEventUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationEventUpdate) ClearAnnotations() *NotificationEventUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (_u *NotificationEventUpdate) SetPayload(v string) *NotificationEventUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetNillablePayload", + "signature": "func (_u *NotificationEventUpdate) SetNillablePayload(v *string) *NotificationEventUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "AddDeliveryStatusIDs", + "signature": "func (_u *NotificationEventUpdate) AddDeliveryStatusIDs(ids ...string) *NotificationEventUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "AddDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdate) AddDeliveryStatuses(v ...*NotificationEventDeliveryStatus) *NotificationEventUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationEventUpdate) Mutation() *NotificationEventMutation", + "line": 74 + }, + { + "kind": "func", + "name": "ClearDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdate) ClearDeliveryStatuses() *NotificationEventUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "RemoveDeliveryStatusIDs", + "signature": "func (_u *NotificationEventUpdate) RemoveDeliveryStatusIDs(ids ...string) *NotificationEventUpdate", + "line": 85 + }, + { + "kind": "func", + "name": "RemoveDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdate) RemoveDeliveryStatuses(v ...*NotificationEventDeliveryStatus) *NotificationEventUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationEventUpdate) Save(ctx context.Context) (int, error)", + "line": 100 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationEventUpdate) SaveX(ctx context.Context) int", + "line": 105 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationEventUpdate) Exec(ctx context.Context) error", + "line": 114 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationEventUpdate) ExecX(ctx context.Context)", + "line": 120 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationEventUpdate) check() error", + "line": 127 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationEventUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 134 + }, + { + "kind": "struct", + "name": "NotificationEventUpdateOne", + "signature": "type NotificationEventUpdateOne struct", + "line": 213 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationEventUpdateOne) SetAnnotations(v models.Annotations) *NotificationEventUpdateOne", + "line": 221 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationEventUpdateOne) ClearAnnotations() *NotificationEventUpdateOne", + "line": 227 + }, + { + "kind": "func", + "name": "SetPayload", + "signature": "func (_u *NotificationEventUpdateOne) SetPayload(v string) *NotificationEventUpdateOne", + "line": 233 + }, + { + "kind": "func", + "name": "SetNillablePayload", + "signature": "func (_u *NotificationEventUpdateOne) SetNillablePayload(v *string) *NotificationEventUpdateOne", + "line": 239 + }, + { + "kind": "func", + "name": "AddDeliveryStatusIDs", + "signature": "func (_u *NotificationEventUpdateOne) AddDeliveryStatusIDs(ids ...string) *NotificationEventUpdateOne", + "line": 247 + }, + { + "kind": "func", + "name": "AddDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdateOne) AddDeliveryStatuses(v ...*NotificationEventDeliveryStatus) *NotificationEventUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationEventUpdateOne) Mutation() *NotificationEventMutation", + "line": 262 + }, + { + "kind": "func", + "name": "ClearDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdateOne) ClearDeliveryStatuses() *NotificationEventUpdateOne", + "line": 267 + }, + { + "kind": "func", + "name": "RemoveDeliveryStatusIDs", + "signature": "func (_u *NotificationEventUpdateOne) RemoveDeliveryStatusIDs(ids ...string) *NotificationEventUpdateOne", + "line": 273 + }, + { + "kind": "func", + "name": "RemoveDeliveryStatuses", + "signature": "func (_u *NotificationEventUpdateOne) RemoveDeliveryStatuses(v ...*NotificationEventDeliveryStatus) *NotificationEventUpdateOne", + "line": 279 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationEventUpdateOne) Where(ps ...predicate.NotificationEvent) *NotificationEventUpdateOne", + "line": 288 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *NotificationEventUpdateOne) Select(field string, fields ...string) *NotificationEventUpdateOne", + "line": 295 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationEventUpdateOne) Save(ctx context.Context) (*NotificationEvent, error)", + "line": 301 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationEventUpdateOne) SaveX(ctx context.Context) *NotificationEvent", + "line": 306 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationEventUpdateOne) Exec(ctx context.Context) error", + "line": 315 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationEventUpdateOne) ExecX(ctx context.Context)", + "line": 321 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationEventUpdateOne) check() error", + "line": 328 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationEventUpdateOne) sqlSave(ctx context.Context) (_node *NotificationEvent, err error)", + "line": 335 + } + ], + "line_count": 431 + }, + "openmeter/ent/db/notificationeventdeliverystatus.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDeliveryStatus", + "signature": "type NotificationEventDeliveryStatus struct", + "line": 19 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusEdges", + "signature": "type NotificationEventDeliveryStatusEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "EventsOrErr", + "signature": "func (e NotificationEventDeliveryStatusEdges) EventsOrErr() ([]*NotificationEvent, error)", + "line": 60 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *NotificationEventDeliveryStatus) assignValues(columns []string, values []any) error", + "line": 87 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *NotificationEventDeliveryStatus) Value(name string) (ent.Value, error)", + "line": 173 + }, + { + "kind": "func", + "name": "QueryEvents", + "signature": "func (_m *NotificationEventDeliveryStatus) QueryEvents() *NotificationEventQuery", + "line": 178 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *NotificationEventDeliveryStatus) Update() *NotificationEventDeliveryStatusUpdateOne", + "line": 185 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *NotificationEventDeliveryStatus) Unwrap() *NotificationEventDeliveryStatus", + "line": 191 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *NotificationEventDeliveryStatus) String() string", + "line": 201 + } + ], + "line_count": 241 + }, + "openmeter/ent/db/notificationeventdeliverystatus/notificationeventdeliverystatus.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 72 + }, + { + "kind": "func", + "name": "StateValidator", + "signature": "func StateValidator(s notification.EventDeliveryStatusState) error", + "line": 101 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByEventID", + "signature": "func ByEventID(opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "ByChannelID", + "signature": "func ByChannelID(opts ...sql.OrderTermOption) OrderOption", + "line": 139 + }, + { + "kind": "func", + "name": "ByState", + "signature": "func ByState(opts ...sql.OrderTermOption) OrderOption", + "line": 144 + }, + { + "kind": "func", + "name": "ByReason", + "signature": "func ByReason(opts ...sql.OrderTermOption) OrderOption", + "line": 149 + }, + { + "kind": "func", + "name": "ByNextAttemptAt", + "signature": "func ByNextAttemptAt(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByEventsCount", + "signature": "func ByEventsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByEvents", + "signature": "func ByEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 166 + }, + { + "kind": "func", + "name": "newEventsStep", + "signature": "func newEventsStep() *sqlgraph.Step", + "line": 171 + } + ], + "line_count": 177 + }, + "openmeter/ent/db/notificationeventdeliverystatus/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.NotificationEventDeliveryStatus", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.NotificationEventDeliveryStatus", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.NotificationEventDeliveryStatus", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.NotificationEventDeliveryStatus", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.NotificationEventDeliveryStatus", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.NotificationEventDeliveryStatus", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.NotificationEventDeliveryStatus", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.NotificationEventDeliveryStatus", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.NotificationEventDeliveryStatus", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.NotificationEventDeliveryStatus", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.NotificationEventDeliveryStatus", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.NotificationEventDeliveryStatus", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 80 + }, + { + "kind": "func", + "name": "EventID", + "signature": "func EventID(v string) predicate.NotificationEventDeliveryStatus", + "line": 85 + }, + { + "kind": "func", + "name": "ChannelID", + "signature": "func ChannelID(v string) predicate.NotificationEventDeliveryStatus", + "line": 90 + }, + { + "kind": "func", + "name": "Reason", + "signature": "func Reason(v string) predicate.NotificationEventDeliveryStatus", + "line": 95 + }, + { + "kind": "func", + "name": "NextAttemptAt", + "signature": "func NextAttemptAt(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 100 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.NotificationEventDeliveryStatus", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.NotificationEventDeliveryStatus", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.NotificationEventDeliveryStatus", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.NotificationEventDeliveryStatus", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.NotificationEventDeliveryStatus", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 160 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 165 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.NotificationEventDeliveryStatus", + "line": 170 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.NotificationEventDeliveryStatus", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 200 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 205 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 210 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 215 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 240 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 245 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 250 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 255 + }, + { + "kind": "func", + "name": "EventIDEQ", + "signature": "func EventIDEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 260 + }, + { + "kind": "func", + "name": "EventIDNEQ", + "signature": "func EventIDNEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 265 + }, + { + "kind": "func", + "name": "EventIDIn", + "signature": "func EventIDIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 270 + }, + { + "kind": "func", + "name": "EventIDNotIn", + "signature": "func EventIDNotIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 275 + }, + { + "kind": "func", + "name": "EventIDGT", + "signature": "func EventIDGT(v string) predicate.NotificationEventDeliveryStatus", + "line": 280 + }, + { + "kind": "func", + "name": "EventIDGTE", + "signature": "func EventIDGTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 285 + }, + { + "kind": "func", + "name": "EventIDLT", + "signature": "func EventIDLT(v string) predicate.NotificationEventDeliveryStatus", + "line": 290 + }, + { + "kind": "func", + "name": "EventIDLTE", + "signature": "func EventIDLTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 295 + }, + { + "kind": "func", + "name": "EventIDContains", + "signature": "func EventIDContains(v string) predicate.NotificationEventDeliveryStatus", + "line": 300 + }, + { + "kind": "func", + "name": "EventIDHasPrefix", + "signature": "func EventIDHasPrefix(v string) predicate.NotificationEventDeliveryStatus", + "line": 305 + }, + { + "kind": "func", + "name": "EventIDHasSuffix", + "signature": "func EventIDHasSuffix(v string) predicate.NotificationEventDeliveryStatus", + "line": 310 + }, + { + "kind": "func", + "name": "EventIDEqualFold", + "signature": "func EventIDEqualFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 315 + }, + { + "kind": "func", + "name": "EventIDContainsFold", + "signature": "func EventIDContainsFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 320 + }, + { + "kind": "func", + "name": "ChannelIDEQ", + "signature": "func ChannelIDEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 325 + }, + { + "kind": "func", + "name": "ChannelIDNEQ", + "signature": "func ChannelIDNEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 330 + }, + { + "kind": "func", + "name": "ChannelIDIn", + "signature": "func ChannelIDIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 335 + }, + { + "kind": "func", + "name": "ChannelIDNotIn", + "signature": "func ChannelIDNotIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 340 + }, + { + "kind": "func", + "name": "ChannelIDGT", + "signature": "func ChannelIDGT(v string) predicate.NotificationEventDeliveryStatus", + "line": 345 + }, + { + "kind": "func", + "name": "ChannelIDGTE", + "signature": "func ChannelIDGTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 350 + }, + { + "kind": "func", + "name": "ChannelIDLT", + "signature": "func ChannelIDLT(v string) predicate.NotificationEventDeliveryStatus", + "line": 355 + }, + { + "kind": "func", + "name": "ChannelIDLTE", + "signature": "func ChannelIDLTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 360 + }, + { + "kind": "func", + "name": "ChannelIDContains", + "signature": "func ChannelIDContains(v string) predicate.NotificationEventDeliveryStatus", + "line": 365 + }, + { + "kind": "func", + "name": "ChannelIDHasPrefix", + "signature": "func ChannelIDHasPrefix(v string) predicate.NotificationEventDeliveryStatus", + "line": 370 + }, + { + "kind": "func", + "name": "ChannelIDHasSuffix", + "signature": "func ChannelIDHasSuffix(v string) predicate.NotificationEventDeliveryStatus", + "line": 375 + }, + { + "kind": "func", + "name": "ChannelIDEqualFold", + "signature": "func ChannelIDEqualFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 380 + }, + { + "kind": "func", + "name": "ChannelIDContainsFold", + "signature": "func ChannelIDContainsFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 385 + }, + { + "kind": "func", + "name": "StateEQ", + "signature": "func StateEQ(v notification.EventDeliveryStatusState) predicate.NotificationEventDeliveryStatus", + "line": 390 + }, + { + "kind": "func", + "name": "StateNEQ", + "signature": "func StateNEQ(v notification.EventDeliveryStatusState) predicate.NotificationEventDeliveryStatus", + "line": 396 + }, + { + "kind": "func", + "name": "StateIn", + "signature": "func StateIn(vs ...notification.EventDeliveryStatusState) predicate.NotificationEventDeliveryStatus", + "line": 402 + }, + { + "kind": "func", + "name": "StateNotIn", + "signature": "func StateNotIn(vs ...notification.EventDeliveryStatusState) predicate.NotificationEventDeliveryStatus", + "line": 411 + }, + { + "kind": "func", + "name": "ReasonEQ", + "signature": "func ReasonEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 420 + }, + { + "kind": "func", + "name": "ReasonNEQ", + "signature": "func ReasonNEQ(v string) predicate.NotificationEventDeliveryStatus", + "line": 425 + }, + { + "kind": "func", + "name": "ReasonIn", + "signature": "func ReasonIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 430 + }, + { + "kind": "func", + "name": "ReasonNotIn", + "signature": "func ReasonNotIn(vs ...string) predicate.NotificationEventDeliveryStatus", + "line": 435 + }, + { + "kind": "func", + "name": "ReasonGT", + "signature": "func ReasonGT(v string) predicate.NotificationEventDeliveryStatus", + "line": 440 + }, + { + "kind": "func", + "name": "ReasonGTE", + "signature": "func ReasonGTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 445 + }, + { + "kind": "func", + "name": "ReasonLT", + "signature": "func ReasonLT(v string) predicate.NotificationEventDeliveryStatus", + "line": 450 + }, + { + "kind": "func", + "name": "ReasonLTE", + "signature": "func ReasonLTE(v string) predicate.NotificationEventDeliveryStatus", + "line": 455 + }, + { + "kind": "func", + "name": "ReasonContains", + "signature": "func ReasonContains(v string) predicate.NotificationEventDeliveryStatus", + "line": 460 + }, + { + "kind": "func", + "name": "ReasonHasPrefix", + "signature": "func ReasonHasPrefix(v string) predicate.NotificationEventDeliveryStatus", + "line": 465 + }, + { + "kind": "func", + "name": "ReasonHasSuffix", + "signature": "func ReasonHasSuffix(v string) predicate.NotificationEventDeliveryStatus", + "line": 470 + }, + { + "kind": "func", + "name": "ReasonIsNil", + "signature": "func ReasonIsNil() predicate.NotificationEventDeliveryStatus", + "line": 475 + }, + { + "kind": "func", + "name": "ReasonNotNil", + "signature": "func ReasonNotNil() predicate.NotificationEventDeliveryStatus", + "line": 480 + }, + { + "kind": "func", + "name": "ReasonEqualFold", + "signature": "func ReasonEqualFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 485 + }, + { + "kind": "func", + "name": "ReasonContainsFold", + "signature": "func ReasonContainsFold(v string) predicate.NotificationEventDeliveryStatus", + "line": 490 + }, + { + "kind": "func", + "name": "NextAttemptAtEQ", + "signature": "func NextAttemptAtEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 495 + }, + { + "kind": "func", + "name": "NextAttemptAtNEQ", + "signature": "func NextAttemptAtNEQ(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 500 + }, + { + "kind": "func", + "name": "NextAttemptAtIn", + "signature": "func NextAttemptAtIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 505 + }, + { + "kind": "func", + "name": "NextAttemptAtNotIn", + "signature": "func NextAttemptAtNotIn(vs ...time.Time) predicate.NotificationEventDeliveryStatus", + "line": 510 + }, + { + "kind": "func", + "name": "NextAttemptAtGT", + "signature": "func NextAttemptAtGT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 515 + }, + { + "kind": "func", + "name": "NextAttemptAtGTE", + "signature": "func NextAttemptAtGTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 520 + }, + { + "kind": "func", + "name": "NextAttemptAtLT", + "signature": "func NextAttemptAtLT(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 525 + }, + { + "kind": "func", + "name": "NextAttemptAtLTE", + "signature": "func NextAttemptAtLTE(v time.Time) predicate.NotificationEventDeliveryStatus", + "line": 530 + }, + { + "kind": "func", + "name": "NextAttemptAtIsNil", + "signature": "func NextAttemptAtIsNil() predicate.NotificationEventDeliveryStatus", + "line": 535 + }, + { + "kind": "func", + "name": "NextAttemptAtNotNil", + "signature": "func NextAttemptAtNotNil() predicate.NotificationEventDeliveryStatus", + "line": 540 + }, + { + "kind": "func", + "name": "AttemptsIsNil", + "signature": "func AttemptsIsNil() predicate.NotificationEventDeliveryStatus", + "line": 545 + }, + { + "kind": "func", + "name": "AttemptsNotNil", + "signature": "func AttemptsNotNil() predicate.NotificationEventDeliveryStatus", + "line": 550 + }, + { + "kind": "func", + "name": "HasEvents", + "signature": "func HasEvents() predicate.NotificationEventDeliveryStatus", + "line": 555 + }, + { + "kind": "func", + "name": "HasEventsWith", + "signature": "func HasEventsWith(preds ...predicate.NotificationEvent) predicate.NotificationEventDeliveryStatus", + "line": 566 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.NotificationEventDeliveryStatus) predicate.NotificationEventDeliveryStatus", + "line": 578 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.NotificationEventDeliveryStatus) predicate.NotificationEventDeliveryStatus", + "line": 583 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.NotificationEventDeliveryStatus) predicate.NotificationEventDeliveryStatus", + "line": 588 + } + ], + "line_count": 590 + }, + "openmeter/ent/db/notificationeventdeliverystatus_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusCreate", + "signature": "type NotificationEventDeliveryStatusCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNamespace(v string) *NotificationEventDeliveryStatusCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetCreatedAt(v time.Time) *NotificationEventDeliveryStatusCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableCreatedAt(v *time.Time) *NotificationEventDeliveryStatusCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableUpdatedAt(v *time.Time) *NotificationEventDeliveryStatusCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetEventID", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetEventID(v string) *NotificationEventDeliveryStatusCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetChannelID", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetChannelID(v string) *NotificationEventDeliveryStatusCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNillableState", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableState(v *notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetReason(v string) *NotificationEventDeliveryStatusCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableReason(v *string) *NotificationEventDeliveryStatusCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetNillableNextAttemptAt", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableNextAttemptAt(v *time.Time) *NotificationEventDeliveryStatusCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetID(v string) *NotificationEventDeliveryStatusCreate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SetNillableID(v *string) *NotificationEventDeliveryStatusCreate", + "line": 136 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) AddEventIDs(ids ...string) *NotificationEventDeliveryStatusCreate", + "line": 144 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) AddEvents(v ...*NotificationEvent) *NotificationEventDeliveryStatusCreate", + "line": 150 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) Mutation() *NotificationEventDeliveryStatusMutation", + "line": 159 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) Save(ctx context.Context) (*NotificationEventDeliveryStatus, error)", + "line": 164 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) SaveX(ctx context.Context) *NotificationEventDeliveryStatus", + "line": 170 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) Exec(ctx context.Context) error", + "line": 179 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) ExecX(ctx context.Context)", + "line": 185 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) defaults()", + "line": 192 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) check() error", + "line": 212 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) sqlSave(ctx context.Context) (*NotificationEventDeliveryStatus, error)", + "line": 254 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) createSpec() (*NotificationEventDeliveryStatus, *sqlgraph.CreateSpec)", + "line": 277 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) OnConflict(opts ...sql.ConflictOption) *NotificationEventDeliveryStatusUpsertOne", + "line": 362 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationEventDeliveryStatusCreate) OnConflictColumns(columns ...string) *NotificationEventDeliveryStatusUpsertOne", + "line": 375 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusUpsert", + "line": 396 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateAnnotations() *NotificationEventDeliveryStatusUpsert", + "line": 402 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) ClearAnnotations() *NotificationEventDeliveryStatusUpsert", + "line": 408 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusUpsert", + "line": 414 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateUpdatedAt() *NotificationEventDeliveryStatusUpsert", + "line": 420 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpsert", + "line": 426 + }, + { + "kind": "func", + "name": "UpdateState", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateState() *NotificationEventDeliveryStatusUpsert", + "line": 432 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetReason(v string) *NotificationEventDeliveryStatusUpsert", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateReason() *NotificationEventDeliveryStatusUpsert", + "line": 444 + }, + { + "kind": "func", + "name": "ClearReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) ClearReason() *NotificationEventDeliveryStatusUpsert", + "line": 450 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusUpsert", + "line": 456 + }, + { + "kind": "func", + "name": "UpdateNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateNextAttemptAt() *NotificationEventDeliveryStatusUpsert", + "line": 462 + }, + { + "kind": "func", + "name": "ClearNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) ClearNextAttemptAt() *NotificationEventDeliveryStatusUpsert", + "line": 468 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpsert", + "line": 474 + }, + { + "kind": "func", + "name": "UpdateAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) UpdateAttempts() *NotificationEventDeliveryStatusUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "ClearAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsert) ClearAttempts() *NotificationEventDeliveryStatusUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateNewValues() *NotificationEventDeliveryStatusUpsertOne", + "line": 502 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) Ignore() *NotificationEventDeliveryStatusUpsertOne", + "line": 530 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) DoNothing() *NotificationEventDeliveryStatusUpsertOne", + "line": 537 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) Update(set func(*NotificationEventDeliveryStatusUpsert)) *NotificationEventDeliveryStatusUpsertOne", + "line": 544 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusUpsertOne", + "line": 552 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateAnnotations() *NotificationEventDeliveryStatusUpsertOne", + "line": 559 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ClearAnnotations() *NotificationEventDeliveryStatusUpsertOne", + "line": 566 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusUpsertOne", + "line": 573 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateUpdatedAt() *NotificationEventDeliveryStatusUpsertOne", + "line": 580 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpsertOne", + "line": 587 + }, + { + "kind": "func", + "name": "UpdateState", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateState() *NotificationEventDeliveryStatusUpsertOne", + "line": 594 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetReason(v string) *NotificationEventDeliveryStatusUpsertOne", + "line": 601 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateReason() *NotificationEventDeliveryStatusUpsertOne", + "line": 608 + }, + { + "kind": "func", + "name": "ClearReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ClearReason() *NotificationEventDeliveryStatusUpsertOne", + "line": 615 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusUpsertOne", + "line": 622 + }, + { + "kind": "func", + "name": "UpdateNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateNextAttemptAt() *NotificationEventDeliveryStatusUpsertOne", + "line": 629 + }, + { + "kind": "func", + "name": "ClearNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ClearNextAttemptAt() *NotificationEventDeliveryStatusUpsertOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpsertOne", + "line": 643 + }, + { + "kind": "func", + "name": "UpdateAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) UpdateAttempts() *NotificationEventDeliveryStatusUpsertOne", + "line": 650 + }, + { + "kind": "func", + "name": "ClearAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ClearAttempts() *NotificationEventDeliveryStatusUpsertOne", + "line": 657 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) Exec(ctx context.Context) error", + "line": 664 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ExecX(ctx context.Context)", + "line": 672 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 679 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *NotificationEventDeliveryStatusUpsertOne) IDX(ctx context.Context) string", + "line": 693 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusCreateBulk", + "signature": "type NotificationEventDeliveryStatusCreateBulk struct", + "line": 702 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) Save(ctx context.Context) ([]*NotificationEventDeliveryStatus, error)", + "line": 710 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) SaveX(ctx context.Context) []*NotificationEventDeliveryStatus", + "line": 766 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) Exec(ctx context.Context) error", + "line": 775 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) ExecX(ctx context.Context)", + "line": 781 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationEventDeliveryStatusUpsertBulk", + "line": 802 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationEventDeliveryStatusCreateBulk) OnConflictColumns(columns ...string) *NotificationEventDeliveryStatusUpsertBulk", + "line": 815 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusUpsertBulk", + "signature": "type NotificationEventDeliveryStatusUpsertBulk struct", + "line": 824 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateNewValues() *NotificationEventDeliveryStatusUpsertBulk", + "line": 839 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) Ignore() *NotificationEventDeliveryStatusUpsertBulk", + "line": 869 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) DoNothing() *NotificationEventDeliveryStatusUpsertBulk", + "line": 876 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) Update(set func(*NotificationEventDeliveryStatusUpsert)) *NotificationEventDeliveryStatusUpsertBulk", + "line": 883 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusUpsertBulk", + "line": 891 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateAnnotations() *NotificationEventDeliveryStatusUpsertBulk", + "line": 898 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) ClearAnnotations() *NotificationEventDeliveryStatusUpsertBulk", + "line": 905 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusUpsertBulk", + "line": 912 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateUpdatedAt() *NotificationEventDeliveryStatusUpsertBulk", + "line": 919 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpsertBulk", + "line": 926 + }, + { + "kind": "func", + "name": "UpdateState", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateState() *NotificationEventDeliveryStatusUpsertBulk", + "line": 933 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetReason(v string) *NotificationEventDeliveryStatusUpsertBulk", + "line": 940 + }, + { + "kind": "func", + "name": "UpdateReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateReason() *NotificationEventDeliveryStatusUpsertBulk", + "line": 947 + }, + { + "kind": "func", + "name": "ClearReason", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) ClearReason() *NotificationEventDeliveryStatusUpsertBulk", + "line": 954 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusUpsertBulk", + "line": 961 + }, + { + "kind": "func", + "name": "UpdateNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateNextAttemptAt() *NotificationEventDeliveryStatusUpsertBulk", + "line": 968 + }, + { + "kind": "func", + "name": "ClearNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) ClearNextAttemptAt() *NotificationEventDeliveryStatusUpsertBulk", + "line": 975 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpsertBulk", + "line": 982 + }, + { + "kind": "func", + "name": "UpdateAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) UpdateAttempts() *NotificationEventDeliveryStatusUpsertBulk", + "line": 989 + }, + { + "kind": "func", + "name": "ClearAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) ClearAttempts() *NotificationEventDeliveryStatusUpsertBulk", + "line": 996 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) Exec(ctx context.Context) error", + "line": 1003 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationEventDeliveryStatusUpsertBulk) ExecX(ctx context.Context)", + "line": 1019 + } + ], + "line_count": 1023 + }, + "openmeter/ent/db/notificationeventdeliverystatus_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusDelete", + "signature": "type NotificationEventDeliveryStatusDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationEventDeliveryStatusDelete) Where(ps ...predicate.NotificationEventDeliveryStatus) *NotificationEventDeliveryStatusDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationEventDeliveryStatusDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationEventDeliveryStatusDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *NotificationEventDeliveryStatusDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusDeleteOne", + "signature": "type NotificationEventDeliveryStatusDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationEventDeliveryStatusDeleteOne) Where(ps ...predicate.NotificationEventDeliveryStatus) *NotificationEventDeliveryStatusDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationEventDeliveryStatusDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationEventDeliveryStatusDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/notificationeventdeliverystatus_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusQuery", + "signature": "type NotificationEventDeliveryStatusQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Where(ps ...predicate.NotificationEventDeliveryStatus) *NotificationEventDeliveryStatusQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Limit(limit int) *NotificationEventDeliveryStatusQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Offset(offset int) *NotificationEventDeliveryStatusQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Unique(unique bool) *NotificationEventDeliveryStatusQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Order(o ...notificationeventdeliverystatus.OrderOption) *NotificationEventDeliveryStatusQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryEvents", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) QueryEvents() *NotificationEventQuery", + "line": 67 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) First(ctx context.Context) (*NotificationEventDeliveryStatus, error)", + "line": 90 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) FirstX(ctx context.Context) *NotificationEventDeliveryStatus", + "line": 102 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) FirstIDX(ctx context.Context) string", + "line": 125 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Only(ctx context.Context) (*NotificationEventDeliveryStatus, error)", + "line": 136 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) OnlyX(ctx context.Context) *NotificationEventDeliveryStatus", + "line": 152 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 163 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) OnlyIDX(ctx context.Context) string", + "line": 180 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) All(ctx context.Context) ([]*NotificationEventDeliveryStatus, error)", + "line": 189 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) AllX(ctx context.Context) []*NotificationEventDeliveryStatus", + "line": 199 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 208 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) IDsX(ctx context.Context) []string", + "line": 220 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Count(ctx context.Context) (int, error)", + "line": 229 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) CountX(ctx context.Context) int", + "line": 238 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Exist(ctx context.Context) (bool, error)", + "line": 247 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) ExistX(ctx context.Context) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Clone() *NotificationEventDeliveryStatusQuery", + "line": 270 + }, + { + "kind": "func", + "name": "WithEvents", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) WithEvents(opts ...func(*NotificationEventQuery)) *NotificationEventDeliveryStatusQuery", + "line": 289 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) GroupBy(field string, fields ...string) *NotificationEventDeliveryStatusGroupBy", + "line": 312 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Select(fields ...string) *NotificationEventDeliveryStatusSelect", + "line": 333 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) Aggregate(fns ...AggregateFunc) *NotificationEventDeliveryStatusSelect", + "line": 342 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) prepareQuery(ctx context.Context) error", + "line": 346 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*NotificationEventDeliveryStatus, error)", + "line": 372 + }, + { + "kind": "func", + "name": "loadEvents", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) loadEvents(ctx context.Context, query *NotificationEventQuery, nodes []*NotificationEventDeliveryStatus, init func(*NotificationEventDeliveryStatus), assign func(*NotificationEventDeliveryStatus, *NotificationEvent)) error", + "line": 413 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) sqlCount(ctx context.Context) (int, error)", + "line": 475 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) querySpec() *sqlgraph.QuerySpec", + "line": 487 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 527 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) ForUpdate(opts ...sql.LockOption) *NotificationEventDeliveryStatusQuery", + "line": 565 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *NotificationEventDeliveryStatusQuery) ForShare(opts ...sql.LockOption) *NotificationEventDeliveryStatusQuery", + "line": 578 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusGroupBy", + "signature": "type NotificationEventDeliveryStatusGroupBy struct", + "line": 589 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *NotificationEventDeliveryStatusGroupBy) Aggregate(fns ...AggregateFunc) *NotificationEventDeliveryStatusGroupBy", + "line": 595 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *NotificationEventDeliveryStatusGroupBy) Scan(ctx context.Context, v any) error", + "line": 601 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *NotificationEventDeliveryStatusGroupBy) sqlScan(ctx context.Context, root *NotificationEventDeliveryStatusQuery, v any) error", + "line": 609 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusSelect", + "signature": "type NotificationEventDeliveryStatusSelect struct", + "line": 637 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *NotificationEventDeliveryStatusSelect) Aggregate(fns ...AggregateFunc) *NotificationEventDeliveryStatusSelect", + "line": 643 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *NotificationEventDeliveryStatusSelect) Scan(ctx context.Context, v any) error", + "line": 649 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *NotificationEventDeliveryStatusSelect) sqlScan(ctx context.Context, root *NotificationEventDeliveryStatusQuery, v any) error", + "line": 657 + } + ], + "line_count": 676 + }, + "openmeter/ent/db/notificationeventdeliverystatus_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusUpdate", + "signature": "type NotificationEventDeliveryStatusUpdate struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) Where(ps ...predicate.NotificationEventDeliveryStatus) *NotificationEventDeliveryStatusUpdate", + "line": 30 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ClearAnnotations() *NotificationEventDeliveryStatusUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableState", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetNillableState(v *notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetReason(v string) *NotificationEventDeliveryStatusUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetNillableReason(v *string) *NotificationEventDeliveryStatusUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "ClearReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ClearReason() *NotificationEventDeliveryStatusUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetNillableNextAttemptAt(v *time.Time) *NotificationEventDeliveryStatusUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "ClearNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ClearNextAttemptAt() *NotificationEventDeliveryStatusUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "AppendAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) AppendAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "ClearAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ClearAttempts() *NotificationEventDeliveryStatusUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) AddEventIDs(ids ...string) *NotificationEventDeliveryStatusUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) AddEvents(v ...*NotificationEvent) *NotificationEventDeliveryStatusUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) Mutation() *NotificationEventDeliveryStatusMutation", + "line": 141 + }, + { + "kind": "func", + "name": "ClearEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ClearEvents() *NotificationEventDeliveryStatusUpdate", + "line": 146 + }, + { + "kind": "func", + "name": "RemoveEventIDs", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) RemoveEventIDs(ids ...string) *NotificationEventDeliveryStatusUpdate", + "line": 152 + }, + { + "kind": "func", + "name": "RemoveEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) RemoveEvents(v ...*NotificationEvent) *NotificationEventDeliveryStatusUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) Save(ctx context.Context) (int, error)", + "line": 167 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) SaveX(ctx context.Context) int", + "line": 173 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) Exec(ctx context.Context) error", + "line": 182 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) ExecX(ctx context.Context)", + "line": 188 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) defaults()", + "line": 195 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) check() error", + "line": 203 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationEventDeliveryStatusUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 212 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatusUpdateOne", + "signature": "type NotificationEventDeliveryStatusUpdateOne struct", + "line": 317 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetAnnotations(v models.Annotations) *NotificationEventDeliveryStatusUpdateOne", + "line": 325 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ClearAnnotations() *NotificationEventDeliveryStatusUpdateOne", + "line": 331 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetUpdatedAt(v time.Time) *NotificationEventDeliveryStatusUpdateOne", + "line": 337 + }, + { + "kind": "func", + "name": "SetState", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetState(v notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpdateOne", + "line": 343 + }, + { + "kind": "func", + "name": "SetNillableState", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetNillableState(v *notification.EventDeliveryStatusState) *NotificationEventDeliveryStatusUpdateOne", + "line": 349 + }, + { + "kind": "func", + "name": "SetReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetReason(v string) *NotificationEventDeliveryStatusUpdateOne", + "line": 357 + }, + { + "kind": "func", + "name": "SetNillableReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetNillableReason(v *string) *NotificationEventDeliveryStatusUpdateOne", + "line": 363 + }, + { + "kind": "func", + "name": "ClearReason", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ClearReason() *NotificationEventDeliveryStatusUpdateOne", + "line": 371 + }, + { + "kind": "func", + "name": "SetNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetNextAttemptAt(v time.Time) *NotificationEventDeliveryStatusUpdateOne", + "line": 377 + }, + { + "kind": "func", + "name": "SetNillableNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetNillableNextAttemptAt(v *time.Time) *NotificationEventDeliveryStatusUpdateOne", + "line": 383 + }, + { + "kind": "func", + "name": "ClearNextAttemptAt", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ClearNextAttemptAt() *NotificationEventDeliveryStatusUpdateOne", + "line": 391 + }, + { + "kind": "func", + "name": "SetAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SetAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdateOne", + "line": 397 + }, + { + "kind": "func", + "name": "AppendAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) AppendAttempts(v []notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdateOne", + "line": 403 + }, + { + "kind": "func", + "name": "ClearAttempts", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ClearAttempts() *NotificationEventDeliveryStatusUpdateOne", + "line": 409 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) AddEventIDs(ids ...string) *NotificationEventDeliveryStatusUpdateOne", + "line": 415 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) AddEvents(v ...*NotificationEvent) *NotificationEventDeliveryStatusUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) Mutation() *NotificationEventDeliveryStatusMutation", + "line": 430 + }, + { + "kind": "func", + "name": "ClearEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ClearEvents() *NotificationEventDeliveryStatusUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "RemoveEventIDs", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) RemoveEventIDs(ids ...string) *NotificationEventDeliveryStatusUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "RemoveEvents", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) RemoveEvents(v ...*NotificationEvent) *NotificationEventDeliveryStatusUpdateOne", + "line": 447 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) Where(ps ...predicate.NotificationEventDeliveryStatus) *NotificationEventDeliveryStatusUpdateOne", + "line": 456 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) Select(field string, fields ...string) *NotificationEventDeliveryStatusUpdateOne", + "line": 463 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) Save(ctx context.Context) (*NotificationEventDeliveryStatus, error)", + "line": 469 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) SaveX(ctx context.Context) *NotificationEventDeliveryStatus", + "line": 475 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) Exec(ctx context.Context) error", + "line": 484 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) ExecX(ctx context.Context)", + "line": 490 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) defaults()", + "line": 497 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) check() error", + "line": 505 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationEventDeliveryStatusUpdateOne) sqlSave(ctx context.Context) (_node *NotificationEventDeliveryStatus, err error)", + "line": 514 + } + ], + "line_count": 636 + }, + "openmeter/ent/db/notificationrule.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationRule", + "signature": "type NotificationRule struct", + "line": 19 + }, + { + "kind": "struct", + "name": "NotificationRuleEdges", + "signature": "type NotificationRuleEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "ChannelsOrErr", + "signature": "func (e NotificationRuleEdges) ChannelsOrErr() ([]*NotificationChannel, error)", + "line": 62 + }, + { + "kind": "func", + "name": "EventsOrErr", + "signature": "func (e NotificationRuleEdges) EventsOrErr() ([]*NotificationEvent, error)", + "line": 71 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *NotificationRule) assignValues(columns []string, values []any) error", + "line": 102 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *NotificationRule) Value(name string) (ent.Value, error)", + "line": 188 + }, + { + "kind": "func", + "name": "QueryChannels", + "signature": "func (_m *NotificationRule) QueryChannels() *NotificationChannelQuery", + "line": 193 + }, + { + "kind": "func", + "name": "QueryEvents", + "signature": "func (_m *NotificationRule) QueryEvents() *NotificationEventQuery", + "line": 198 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *NotificationRule) Update() *NotificationRuleUpdateOne", + "line": 205 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *NotificationRule) Unwrap() *NotificationRule", + "line": 211 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *NotificationRule) String() string", + "line": 221 + } + ], + "line_count": 261 + }, + "openmeter/ent/db/notificationrule/notificationrule.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 82 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type notification.EventType) error", + "line": 113 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 136 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 141 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 146 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 151 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 156 + }, + { + "kind": "func", + "name": "ByDisabled", + "signature": "func ByDisabled(opts ...sql.OrderTermOption) OrderOption", + "line": 161 + }, + { + "kind": "func", + "name": "ByConfig", + "signature": "func ByConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 166 + }, + { + "kind": "func", + "name": "ByChannelsCount", + "signature": "func ByChannelsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "ByChannels", + "signature": "func ByChannels(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 178 + }, + { + "kind": "func", + "name": "ByEventsCount", + "signature": "func ByEventsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByEvents", + "signature": "func ByEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 192 + }, + { + "kind": "func", + "name": "newChannelsStep", + "signature": "func newChannelsStep() *sqlgraph.Step", + "line": 197 + }, + { + "kind": "func", + "name": "newEventsStep", + "signature": "func newEventsStep() *sqlgraph.Step", + "line": 204 + } + ], + "line_count": 210 + }, + "openmeter/ent/db/notificationrule/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.NotificationRule", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.NotificationRule", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.NotificationRule", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.NotificationRule", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.NotificationRule", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.NotificationRule", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.NotificationRule", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.NotificationRule", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.NotificationRule", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.NotificationRule", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.NotificationRule", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.NotificationRule", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.NotificationRule", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.NotificationRule", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.NotificationRule", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.NotificationRule", + "line": 90 + }, + { + "kind": "func", + "name": "Disabled", + "signature": "func Disabled(v bool) predicate.NotificationRule", + "line": 95 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.NotificationRule", + "line": 100 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.NotificationRule", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.NotificationRule", + "line": 110 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.NotificationRule", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.NotificationRule", + "line": 120 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.NotificationRule", + "line": 125 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.NotificationRule", + "line": 130 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.NotificationRule", + "line": 135 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.NotificationRule", + "line": 140 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.NotificationRule", + "line": 145 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.NotificationRule", + "line": 150 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.NotificationRule", + "line": 155 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.NotificationRule", + "line": 160 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.NotificationRule", + "line": 165 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.NotificationRule", + "line": 170 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.NotificationRule", + "line": 175 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.NotificationRule", + "line": 180 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.NotificationRule", + "line": 185 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.NotificationRule", + "line": 190 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.NotificationRule", + "line": 195 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.NotificationRule", + "line": 200 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.NotificationRule", + "line": 205 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.NotificationRule", + "line": 210 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.NotificationRule", + "line": 215 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.NotificationRule", + "line": 220 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.NotificationRule", + "line": 225 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.NotificationRule", + "line": 230 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.NotificationRule", + "line": 235 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.NotificationRule", + "line": 240 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.NotificationRule", + "line": 245 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.NotificationRule", + "line": 250 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.NotificationRule", + "line": 255 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.NotificationRule", + "line": 260 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.NotificationRule", + "line": 265 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.NotificationRule", + "line": 270 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.NotificationRule", + "line": 275 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.NotificationRule", + "line": 280 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.NotificationRule", + "line": 285 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.NotificationRule", + "line": 290 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.NotificationRule", + "line": 295 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.NotificationRule", + "line": 300 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.NotificationRule", + "line": 305 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.NotificationRule", + "line": 310 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v notification.EventType) predicate.NotificationRule", + "line": 315 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v notification.EventType) predicate.NotificationRule", + "line": 321 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...notification.EventType) predicate.NotificationRule", + "line": 327 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...notification.EventType) predicate.NotificationRule", + "line": 336 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.NotificationRule", + "line": 345 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.NotificationRule", + "line": 350 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.NotificationRule", + "line": 355 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.NotificationRule", + "line": 360 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.NotificationRule", + "line": 365 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.NotificationRule", + "line": 370 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.NotificationRule", + "line": 375 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.NotificationRule", + "line": 380 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.NotificationRule", + "line": 385 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.NotificationRule", + "line": 390 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.NotificationRule", + "line": 395 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.NotificationRule", + "line": 400 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.NotificationRule", + "line": 405 + }, + { + "kind": "func", + "name": "DisabledEQ", + "signature": "func DisabledEQ(v bool) predicate.NotificationRule", + "line": 410 + }, + { + "kind": "func", + "name": "DisabledNEQ", + "signature": "func DisabledNEQ(v bool) predicate.NotificationRule", + "line": 415 + }, + { + "kind": "func", + "name": "DisabledIsNil", + "signature": "func DisabledIsNil() predicate.NotificationRule", + "line": 420 + }, + { + "kind": "func", + "name": "DisabledNotNil", + "signature": "func DisabledNotNil() predicate.NotificationRule", + "line": 425 + }, + { + "kind": "func", + "name": "HasChannels", + "signature": "func HasChannels() predicate.NotificationRule", + "line": 430 + }, + { + "kind": "func", + "name": "HasChannelsWith", + "signature": "func HasChannelsWith(preds ...predicate.NotificationChannel) predicate.NotificationRule", + "line": 441 + }, + { + "kind": "func", + "name": "HasEvents", + "signature": "func HasEvents() predicate.NotificationRule", + "line": 453 + }, + { + "kind": "func", + "name": "HasEventsWith", + "signature": "func HasEventsWith(preds ...predicate.NotificationEvent) predicate.NotificationRule", + "line": 464 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.NotificationRule) predicate.NotificationRule", + "line": 476 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.NotificationRule) predicate.NotificationRule", + "line": 481 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.NotificationRule) predicate.NotificationRule", + "line": 486 + } + ], + "line_count": 488 + }, + "openmeter/ent/db/notificationrule_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationRuleCreate", + "signature": "type NotificationRuleCreate struct", + "line": 23 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *NotificationRuleCreate) SetNamespace(v string) *NotificationRuleCreate", + "line": 31 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *NotificationRuleCreate) SetCreatedAt(v time.Time) *NotificationRuleCreate", + "line": 37 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *NotificationRuleCreate) SetNillableCreatedAt(v *time.Time) *NotificationRuleCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *NotificationRuleCreate) SetUpdatedAt(v time.Time) *NotificationRuleCreate", + "line": 51 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *NotificationRuleCreate) SetNillableUpdatedAt(v *time.Time) *NotificationRuleCreate", + "line": 57 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *NotificationRuleCreate) SetDeletedAt(v time.Time) *NotificationRuleCreate", + "line": 65 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *NotificationRuleCreate) SetNillableDeletedAt(v *time.Time) *NotificationRuleCreate", + "line": 71 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *NotificationRuleCreate) SetAnnotations(v models.Annotations) *NotificationRuleCreate", + "line": 79 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *NotificationRuleCreate) SetMetadata(v map[string]string) *NotificationRuleCreate", + "line": 85 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *NotificationRuleCreate) SetType(v notification.EventType) *NotificationRuleCreate", + "line": 91 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *NotificationRuleCreate) SetName(v string) *NotificationRuleCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_c *NotificationRuleCreate) SetDisabled(v bool) *NotificationRuleCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_c *NotificationRuleCreate) SetNillableDisabled(v *bool) *NotificationRuleCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_c *NotificationRuleCreate) SetConfig(v notification.RuleConfig) *NotificationRuleCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *NotificationRuleCreate) SetID(v string) *NotificationRuleCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *NotificationRuleCreate) SetNillableID(v *string) *NotificationRuleCreate", + "line": 129 + }, + { + "kind": "func", + "name": "AddChannelIDs", + "signature": "func (_c *NotificationRuleCreate) AddChannelIDs(ids ...string) *NotificationRuleCreate", + "line": 137 + }, + { + "kind": "func", + "name": "AddChannels", + "signature": "func (_c *NotificationRuleCreate) AddChannels(v ...*NotificationChannel) *NotificationRuleCreate", + "line": 143 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_c *NotificationRuleCreate) AddEventIDs(ids ...string) *NotificationRuleCreate", + "line": 152 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_c *NotificationRuleCreate) AddEvents(v ...*NotificationEvent) *NotificationRuleCreate", + "line": 158 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *NotificationRuleCreate) Mutation() *NotificationRuleMutation", + "line": 167 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationRuleCreate) Save(ctx context.Context) (*NotificationRule, error)", + "line": 172 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationRuleCreate) SaveX(ctx context.Context) *NotificationRule", + "line": 178 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationRuleCreate) Exec(ctx context.Context) error", + "line": 187 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationRuleCreate) ExecX(ctx context.Context)", + "line": 193 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *NotificationRuleCreate) defaults()", + "line": 200 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *NotificationRuleCreate) check() error", + "line": 220 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *NotificationRuleCreate) sqlSave(ctx context.Context) (*NotificationRule, error)", + "line": 262 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *NotificationRuleCreate) createSpec() (*NotificationRule, *sqlgraph.CreateSpec, error)", + "line": 288 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationRuleCreate) OnConflict(opts ...sql.ConflictOption) *NotificationRuleUpsertOne", + "line": 393 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationRuleCreate) OnConflictColumns(columns ...string) *NotificationRuleUpsertOne", + "line": 406 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationRuleUpsert) SetUpdatedAt(v time.Time) *NotificationRuleUpsert", + "line": 427 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationRuleUpsert) UpdateUpdatedAt() *NotificationRuleUpsert", + "line": 433 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationRuleUpsert) SetDeletedAt(v time.Time) *NotificationRuleUpsert", + "line": 439 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationRuleUpsert) UpdateDeletedAt() *NotificationRuleUpsert", + "line": 445 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationRuleUpsert) ClearDeletedAt() *NotificationRuleUpsert", + "line": 451 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationRuleUpsert) SetAnnotations(v models.Annotations) *NotificationRuleUpsert", + "line": 457 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationRuleUpsert) UpdateAnnotations() *NotificationRuleUpsert", + "line": 463 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationRuleUpsert) ClearAnnotations() *NotificationRuleUpsert", + "line": 469 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationRuleUpsert) SetMetadata(v map[string]string) *NotificationRuleUpsert", + "line": 475 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationRuleUpsert) UpdateMetadata() *NotificationRuleUpsert", + "line": 481 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationRuleUpsert) ClearMetadata() *NotificationRuleUpsert", + "line": 487 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationRuleUpsert) SetName(v string) *NotificationRuleUpsert", + "line": 493 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationRuleUpsert) UpdateName() *NotificationRuleUpsert", + "line": 499 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationRuleUpsert) SetDisabled(v bool) *NotificationRuleUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationRuleUpsert) UpdateDisabled() *NotificationRuleUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationRuleUpsert) ClearDisabled() *NotificationRuleUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationRuleUpsert) SetConfig(v notification.RuleConfig) *NotificationRuleUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationRuleUpsert) UpdateConfig() *NotificationRuleUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationRuleUpsertOne) UpdateNewValues() *NotificationRuleUpsertOne", + "line": 545 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationRuleUpsertOne) Ignore() *NotificationRuleUpsertOne", + "line": 570 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationRuleUpsertOne) DoNothing() *NotificationRuleUpsertOne", + "line": 577 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationRuleUpsertOne) Update(set func(*NotificationRuleUpsert)) *NotificationRuleUpsertOne", + "line": 584 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationRuleUpsertOne) SetUpdatedAt(v time.Time) *NotificationRuleUpsertOne", + "line": 592 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationRuleUpsertOne) UpdateUpdatedAt() *NotificationRuleUpsertOne", + "line": 599 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationRuleUpsertOne) SetDeletedAt(v time.Time) *NotificationRuleUpsertOne", + "line": 606 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationRuleUpsertOne) UpdateDeletedAt() *NotificationRuleUpsertOne", + "line": 613 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationRuleUpsertOne) ClearDeletedAt() *NotificationRuleUpsertOne", + "line": 620 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationRuleUpsertOne) SetAnnotations(v models.Annotations) *NotificationRuleUpsertOne", + "line": 627 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationRuleUpsertOne) UpdateAnnotations() *NotificationRuleUpsertOne", + "line": 634 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationRuleUpsertOne) ClearAnnotations() *NotificationRuleUpsertOne", + "line": 641 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationRuleUpsertOne) SetMetadata(v map[string]string) *NotificationRuleUpsertOne", + "line": 648 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationRuleUpsertOne) UpdateMetadata() *NotificationRuleUpsertOne", + "line": 655 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationRuleUpsertOne) ClearMetadata() *NotificationRuleUpsertOne", + "line": 662 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationRuleUpsertOne) SetName(v string) *NotificationRuleUpsertOne", + "line": 669 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationRuleUpsertOne) UpdateName() *NotificationRuleUpsertOne", + "line": 676 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationRuleUpsertOne) SetDisabled(v bool) *NotificationRuleUpsertOne", + "line": 683 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationRuleUpsertOne) UpdateDisabled() *NotificationRuleUpsertOne", + "line": 690 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationRuleUpsertOne) ClearDisabled() *NotificationRuleUpsertOne", + "line": 697 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationRuleUpsertOne) SetConfig(v notification.RuleConfig) *NotificationRuleUpsertOne", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationRuleUpsertOne) UpdateConfig() *NotificationRuleUpsertOne", + "line": 711 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationRuleUpsertOne) Exec(ctx context.Context) error", + "line": 718 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationRuleUpsertOne) ExecX(ctx context.Context)", + "line": 726 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *NotificationRuleUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 733 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *NotificationRuleUpsertOne) IDX(ctx context.Context) string", + "line": 747 + }, + { + "kind": "struct", + "name": "NotificationRuleCreateBulk", + "signature": "type NotificationRuleCreateBulk struct", + "line": 756 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *NotificationRuleCreateBulk) Save(ctx context.Context) ([]*NotificationRule, error)", + "line": 764 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *NotificationRuleCreateBulk) SaveX(ctx context.Context) []*NotificationRule", + "line": 823 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *NotificationRuleCreateBulk) Exec(ctx context.Context) error", + "line": 832 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *NotificationRuleCreateBulk) ExecX(ctx context.Context)", + "line": 838 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *NotificationRuleCreateBulk) OnConflict(opts ...sql.ConflictOption) *NotificationRuleUpsertBulk", + "line": 859 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *NotificationRuleCreateBulk) OnConflictColumns(columns ...string) *NotificationRuleUpsertBulk", + "line": 872 + }, + { + "kind": "struct", + "name": "NotificationRuleUpsertBulk", + "signature": "type NotificationRuleUpsertBulk struct", + "line": 881 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateNewValues() *NotificationRuleUpsertBulk", + "line": 896 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *NotificationRuleUpsertBulk) Ignore() *NotificationRuleUpsertBulk", + "line": 923 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *NotificationRuleUpsertBulk) DoNothing() *NotificationRuleUpsertBulk", + "line": 930 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *NotificationRuleUpsertBulk) Update(set func(*NotificationRuleUpsert)) *NotificationRuleUpsertBulk", + "line": 937 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *NotificationRuleUpsertBulk) SetUpdatedAt(v time.Time) *NotificationRuleUpsertBulk", + "line": 945 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateUpdatedAt() *NotificationRuleUpsertBulk", + "line": 952 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *NotificationRuleUpsertBulk) SetDeletedAt(v time.Time) *NotificationRuleUpsertBulk", + "line": 959 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateDeletedAt() *NotificationRuleUpsertBulk", + "line": 966 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *NotificationRuleUpsertBulk) ClearDeletedAt() *NotificationRuleUpsertBulk", + "line": 973 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *NotificationRuleUpsertBulk) SetAnnotations(v models.Annotations) *NotificationRuleUpsertBulk", + "line": 980 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateAnnotations() *NotificationRuleUpsertBulk", + "line": 987 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *NotificationRuleUpsertBulk) ClearAnnotations() *NotificationRuleUpsertBulk", + "line": 994 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *NotificationRuleUpsertBulk) SetMetadata(v map[string]string) *NotificationRuleUpsertBulk", + "line": 1001 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateMetadata() *NotificationRuleUpsertBulk", + "line": 1008 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *NotificationRuleUpsertBulk) ClearMetadata() *NotificationRuleUpsertBulk", + "line": 1015 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *NotificationRuleUpsertBulk) SetName(v string) *NotificationRuleUpsertBulk", + "line": 1022 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateName() *NotificationRuleUpsertBulk", + "line": 1029 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (u *NotificationRuleUpsertBulk) SetDisabled(v bool) *NotificationRuleUpsertBulk", + "line": 1036 + }, + { + "kind": "func", + "name": "UpdateDisabled", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateDisabled() *NotificationRuleUpsertBulk", + "line": 1043 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (u *NotificationRuleUpsertBulk) ClearDisabled() *NotificationRuleUpsertBulk", + "line": 1050 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (u *NotificationRuleUpsertBulk) SetConfig(v notification.RuleConfig) *NotificationRuleUpsertBulk", + "line": 1057 + }, + { + "kind": "func", + "name": "UpdateConfig", + "signature": "func (u *NotificationRuleUpsertBulk) UpdateConfig() *NotificationRuleUpsertBulk", + "line": 1064 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *NotificationRuleUpsertBulk) Exec(ctx context.Context) error", + "line": 1071 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *NotificationRuleUpsertBulk) ExecX(ctx context.Context)", + "line": 1087 + } + ], + "line_count": 1091 + }, + "openmeter/ent/db/notificationrule_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationRuleDelete", + "signature": "type NotificationRuleDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationRuleDelete) Where(ps ...predicate.NotificationRule) *NotificationRuleDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationRuleDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationRuleDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *NotificationRuleDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "NotificationRuleDeleteOne", + "signature": "type NotificationRuleDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *NotificationRuleDeleteOne) Where(ps ...predicate.NotificationRule) *NotificationRuleDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *NotificationRuleDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *NotificationRuleDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/notificationrule_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationRuleQuery", + "signature": "type NotificationRuleQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *NotificationRuleQuery) Where(ps ...predicate.NotificationRule) *NotificationRuleQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *NotificationRuleQuery) Limit(limit int) *NotificationRuleQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *NotificationRuleQuery) Offset(offset int) *NotificationRuleQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *NotificationRuleQuery) Unique(unique bool) *NotificationRuleQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *NotificationRuleQuery) Order(o ...notificationrule.OrderOption) *NotificationRuleQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryChannels", + "signature": "func (_q *NotificationRuleQuery) QueryChannels() *NotificationChannelQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryEvents", + "signature": "func (_q *NotificationRuleQuery) QueryEvents() *NotificationEventQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *NotificationRuleQuery) First(ctx context.Context) (*NotificationRule, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *NotificationRuleQuery) FirstX(ctx context.Context) *NotificationRule", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *NotificationRuleQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *NotificationRuleQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *NotificationRuleQuery) Only(ctx context.Context) (*NotificationRule, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *NotificationRuleQuery) OnlyX(ctx context.Context) *NotificationRule", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *NotificationRuleQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *NotificationRuleQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *NotificationRuleQuery) All(ctx context.Context) ([]*NotificationRule, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *NotificationRuleQuery) AllX(ctx context.Context) []*NotificationRule", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *NotificationRuleQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *NotificationRuleQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *NotificationRuleQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *NotificationRuleQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *NotificationRuleQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *NotificationRuleQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *NotificationRuleQuery) Clone() *NotificationRuleQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithChannels", + "signature": "func (_q *NotificationRuleQuery) WithChannels(opts ...func(*NotificationChannelQuery)) *NotificationRuleQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithEvents", + "signature": "func (_q *NotificationRuleQuery) WithEvents(opts ...func(*NotificationEventQuery)) *NotificationRuleQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *NotificationRuleQuery) GroupBy(field string, fields ...string) *NotificationRuleGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *NotificationRuleQuery) Select(fields ...string) *NotificationRuleSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *NotificationRuleQuery) Aggregate(fns ...AggregateFunc) *NotificationRuleSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *NotificationRuleQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *NotificationRuleQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*NotificationRule, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadChannels", + "signature": "func (_q *NotificationRuleQuery) loadChannels(ctx context.Context, query *NotificationChannelQuery, nodes []*NotificationRule, init func(*NotificationRule), assign func(*NotificationRule, *NotificationChannel)) error", + "line": 455 + }, + { + "kind": "func", + "name": "loadEvents", + "signature": "func (_q *NotificationRuleQuery) loadEvents(ctx context.Context, query *NotificationEventQuery, nodes []*NotificationRule, init func(*NotificationRule), assign func(*NotificationRule, *NotificationEvent)) error", + "line": 516 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *NotificationRuleQuery) sqlCount(ctx context.Context) (int, error)", + "line": 547 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *NotificationRuleQuery) querySpec() *sqlgraph.QuerySpec", + "line": 559 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *NotificationRuleQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 599 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *NotificationRuleQuery) ForUpdate(opts ...sql.LockOption) *NotificationRuleQuery", + "line": 637 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *NotificationRuleQuery) ForShare(opts ...sql.LockOption) *NotificationRuleQuery", + "line": 650 + }, + { + "kind": "struct", + "name": "NotificationRuleGroupBy", + "signature": "type NotificationRuleGroupBy struct", + "line": 661 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *NotificationRuleGroupBy) Aggregate(fns ...AggregateFunc) *NotificationRuleGroupBy", + "line": 667 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *NotificationRuleGroupBy) Scan(ctx context.Context, v any) error", + "line": 673 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *NotificationRuleGroupBy) sqlScan(ctx context.Context, root *NotificationRuleQuery, v any) error", + "line": 681 + }, + { + "kind": "struct", + "name": "NotificationRuleSelect", + "signature": "type NotificationRuleSelect struct", + "line": 709 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *NotificationRuleSelect) Aggregate(fns ...AggregateFunc) *NotificationRuleSelect", + "line": 715 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *NotificationRuleSelect) Scan(ctx context.Context, v any) error", + "line": 721 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *NotificationRuleSelect) sqlScan(ctx context.Context, root *NotificationRuleQuery, v any) error", + "line": 729 + } + ], + "line_count": 748 + }, + "openmeter/ent/db/notificationrule_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationRuleUpdate", + "signature": "type NotificationRuleUpdate struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationRuleUpdate) Where(ps ...predicate.NotificationRule) *NotificationRuleUpdate", + "line": 30 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationRuleUpdate) SetUpdatedAt(v time.Time) *NotificationRuleUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *NotificationRuleUpdate) SetDeletedAt(v time.Time) *NotificationRuleUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *NotificationRuleUpdate) SetNillableDeletedAt(v *time.Time) *NotificationRuleUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *NotificationRuleUpdate) ClearDeletedAt() *NotificationRuleUpdate", + "line": 56 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationRuleUpdate) SetAnnotations(v models.Annotations) *NotificationRuleUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationRuleUpdate) ClearAnnotations() *NotificationRuleUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *NotificationRuleUpdate) SetMetadata(v map[string]string) *NotificationRuleUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *NotificationRuleUpdate) ClearMetadata() *NotificationRuleUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *NotificationRuleUpdate) SetName(v string) *NotificationRuleUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *NotificationRuleUpdate) SetNillableName(v *string) *NotificationRuleUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_u *NotificationRuleUpdate) SetDisabled(v bool) *NotificationRuleUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_u *NotificationRuleUpdate) SetNillableDisabled(v *bool) *NotificationRuleUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (_u *NotificationRuleUpdate) ClearDisabled() *NotificationRuleUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *NotificationRuleUpdate) SetConfig(v notification.RuleConfig) *NotificationRuleUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *NotificationRuleUpdate) SetNillableConfig(v *notification.RuleConfig) *NotificationRuleUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "AddChannelIDs", + "signature": "func (_u *NotificationRuleUpdate) AddChannelIDs(ids ...string) *NotificationRuleUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "AddChannels", + "signature": "func (_u *NotificationRuleUpdate) AddChannels(v ...*NotificationChannel) *NotificationRuleUpdate", + "line": 140 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_u *NotificationRuleUpdate) AddEventIDs(ids ...string) *NotificationRuleUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_u *NotificationRuleUpdate) AddEvents(v ...*NotificationEvent) *NotificationRuleUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationRuleUpdate) Mutation() *NotificationRuleMutation", + "line": 164 + }, + { + "kind": "func", + "name": "ClearChannels", + "signature": "func (_u *NotificationRuleUpdate) ClearChannels() *NotificationRuleUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "RemoveChannelIDs", + "signature": "func (_u *NotificationRuleUpdate) RemoveChannelIDs(ids ...string) *NotificationRuleUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "RemoveChannels", + "signature": "func (_u *NotificationRuleUpdate) RemoveChannels(v ...*NotificationChannel) *NotificationRuleUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearEvents", + "signature": "func (_u *NotificationRuleUpdate) ClearEvents() *NotificationRuleUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "RemoveEventIDs", + "signature": "func (_u *NotificationRuleUpdate) RemoveEventIDs(ids ...string) *NotificationRuleUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "RemoveEvents", + "signature": "func (_u *NotificationRuleUpdate) RemoveEvents(v ...*NotificationEvent) *NotificationRuleUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationRuleUpdate) Save(ctx context.Context) (int, error)", + "line": 211 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationRuleUpdate) SaveX(ctx context.Context) int", + "line": 217 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationRuleUpdate) Exec(ctx context.Context) error", + "line": 226 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationRuleUpdate) ExecX(ctx context.Context)", + "line": 232 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationRuleUpdate) defaults()", + "line": 239 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationRuleUpdate) check() error", + "line": 247 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationRuleUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 261 + }, + { + "kind": "struct", + "name": "NotificationRuleUpdateOne", + "signature": "type NotificationRuleUpdateOne struct", + "line": 413 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *NotificationRuleUpdateOne) SetUpdatedAt(v time.Time) *NotificationRuleUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *NotificationRuleUpdateOne) SetDeletedAt(v time.Time) *NotificationRuleUpdateOne", + "line": 427 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *NotificationRuleUpdateOne) SetNillableDeletedAt(v *time.Time) *NotificationRuleUpdateOne", + "line": 433 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *NotificationRuleUpdateOne) ClearDeletedAt() *NotificationRuleUpdateOne", + "line": 441 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *NotificationRuleUpdateOne) SetAnnotations(v models.Annotations) *NotificationRuleUpdateOne", + "line": 447 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *NotificationRuleUpdateOne) ClearAnnotations() *NotificationRuleUpdateOne", + "line": 453 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *NotificationRuleUpdateOne) SetMetadata(v map[string]string) *NotificationRuleUpdateOne", + "line": 459 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *NotificationRuleUpdateOne) ClearMetadata() *NotificationRuleUpdateOne", + "line": 465 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *NotificationRuleUpdateOne) SetName(v string) *NotificationRuleUpdateOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *NotificationRuleUpdateOne) SetNillableName(v *string) *NotificationRuleUpdateOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetDisabled", + "signature": "func (_u *NotificationRuleUpdateOne) SetDisabled(v bool) *NotificationRuleUpdateOne", + "line": 485 + }, + { + "kind": "func", + "name": "SetNillableDisabled", + "signature": "func (_u *NotificationRuleUpdateOne) SetNillableDisabled(v *bool) *NotificationRuleUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "ClearDisabled", + "signature": "func (_u *NotificationRuleUpdateOne) ClearDisabled() *NotificationRuleUpdateOne", + "line": 499 + }, + { + "kind": "func", + "name": "SetConfig", + "signature": "func (_u *NotificationRuleUpdateOne) SetConfig(v notification.RuleConfig) *NotificationRuleUpdateOne", + "line": 505 + }, + { + "kind": "func", + "name": "SetNillableConfig", + "signature": "func (_u *NotificationRuleUpdateOne) SetNillableConfig(v *notification.RuleConfig) *NotificationRuleUpdateOne", + "line": 511 + }, + { + "kind": "func", + "name": "AddChannelIDs", + "signature": "func (_u *NotificationRuleUpdateOne) AddChannelIDs(ids ...string) *NotificationRuleUpdateOne", + "line": 519 + }, + { + "kind": "func", + "name": "AddChannels", + "signature": "func (_u *NotificationRuleUpdateOne) AddChannels(v ...*NotificationChannel) *NotificationRuleUpdateOne", + "line": 525 + }, + { + "kind": "func", + "name": "AddEventIDs", + "signature": "func (_u *NotificationRuleUpdateOne) AddEventIDs(ids ...string) *NotificationRuleUpdateOne", + "line": 534 + }, + { + "kind": "func", + "name": "AddEvents", + "signature": "func (_u *NotificationRuleUpdateOne) AddEvents(v ...*NotificationEvent) *NotificationRuleUpdateOne", + "line": 540 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *NotificationRuleUpdateOne) Mutation() *NotificationRuleMutation", + "line": 549 + }, + { + "kind": "func", + "name": "ClearChannels", + "signature": "func (_u *NotificationRuleUpdateOne) ClearChannels() *NotificationRuleUpdateOne", + "line": 554 + }, + { + "kind": "func", + "name": "RemoveChannelIDs", + "signature": "func (_u *NotificationRuleUpdateOne) RemoveChannelIDs(ids ...string) *NotificationRuleUpdateOne", + "line": 560 + }, + { + "kind": "func", + "name": "RemoveChannels", + "signature": "func (_u *NotificationRuleUpdateOne) RemoveChannels(v ...*NotificationChannel) *NotificationRuleUpdateOne", + "line": 566 + }, + { + "kind": "func", + "name": "ClearEvents", + "signature": "func (_u *NotificationRuleUpdateOne) ClearEvents() *NotificationRuleUpdateOne", + "line": 575 + }, + { + "kind": "func", + "name": "RemoveEventIDs", + "signature": "func (_u *NotificationRuleUpdateOne) RemoveEventIDs(ids ...string) *NotificationRuleUpdateOne", + "line": 581 + }, + { + "kind": "func", + "name": "RemoveEvents", + "signature": "func (_u *NotificationRuleUpdateOne) RemoveEvents(v ...*NotificationEvent) *NotificationRuleUpdateOne", + "line": 587 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *NotificationRuleUpdateOne) Where(ps ...predicate.NotificationRule) *NotificationRuleUpdateOne", + "line": 596 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *NotificationRuleUpdateOne) Select(field string, fields ...string) *NotificationRuleUpdateOne", + "line": 603 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *NotificationRuleUpdateOne) Save(ctx context.Context) (*NotificationRule, error)", + "line": 609 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *NotificationRuleUpdateOne) SaveX(ctx context.Context) *NotificationRule", + "line": 615 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *NotificationRuleUpdateOne) Exec(ctx context.Context) error", + "line": 624 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *NotificationRuleUpdateOne) ExecX(ctx context.Context)", + "line": 630 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *NotificationRuleUpdateOne) defaults()", + "line": 637 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *NotificationRuleUpdateOne) check() error", + "line": 645 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *NotificationRuleUpdateOne) sqlSave(ctx context.Context) (_node *NotificationRule, err error)", + "line": 659 + } + ], + "line_count": 828 + }, + "openmeter/ent/db/organizationdefaulttaxcodes.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodes", + "signature": "type OrganizationDefaultTaxCodes struct", + "line": 17 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesEdges", + "signature": "type OrganizationDefaultTaxCodesEdges struct", + "line": 40 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeOrErr", + "signature": "func (e OrganizationDefaultTaxCodesEdges) InvoicingTaxCodeOrErr() (*TaxCode, error)", + "line": 52 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeOrErr", + "signature": "func (e OrganizationDefaultTaxCodesEdges) CreditGrantTaxCodeOrErr() (*TaxCode, error)", + "line": 63 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *OrganizationDefaultTaxCodes) assignValues(columns []string, values []any) error", + "line": 90 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *OrganizationDefaultTaxCodes) Value(name string) (ent.Value, error)", + "line": 148 + }, + { + "kind": "func", + "name": "QueryInvoicingTaxCode", + "signature": "func (_m *OrganizationDefaultTaxCodes) QueryInvoicingTaxCode() *TaxCodeQuery", + "line": 153 + }, + { + "kind": "func", + "name": "QueryCreditGrantTaxCode", + "signature": "func (_m *OrganizationDefaultTaxCodes) QueryCreditGrantTaxCode() *TaxCodeQuery", + "line": 158 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *OrganizationDefaultTaxCodes) Update() *OrganizationDefaultTaxCodesUpdateOne", + "line": 165 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *OrganizationDefaultTaxCodes) Unwrap() *OrganizationDefaultTaxCodes", + "line": 171 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *OrganizationDefaultTaxCodes) String() string", + "line": 181 + } + ], + "line_count": 209 + }, + "openmeter/ent/db/organizationdefaulttaxcodes/organizationdefaulttaxcodes.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 63 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 89 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 94 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByInvoicingTaxCodeID", + "signature": "func ByInvoicingTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByCreditGrantTaxCodeID", + "signature": "func ByCreditGrantTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByInvoicingTaxCodeField", + "signature": "func ByInvoicingTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByCreditGrantTaxCodeField", + "signature": "func ByCreditGrantTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "newInvoicingTaxCodeStep", + "signature": "func newInvoicingTaxCodeStep() *sqlgraph.Step", + "line": 136 + }, + { + "kind": "func", + "name": "newCreditGrantTaxCodeStep", + "signature": "func newCreditGrantTaxCodeStep() *sqlgraph.Step", + "line": 143 + } + ], + "line_count": 149 + }, + "openmeter/ent/db/organizationdefaulttaxcodes/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.OrganizationDefaultTaxCodes", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.OrganizationDefaultTaxCodes", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.OrganizationDefaultTaxCodes", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.OrganizationDefaultTaxCodes", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.OrganizationDefaultTaxCodes", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.OrganizationDefaultTaxCodes", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.OrganizationDefaultTaxCodes", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.OrganizationDefaultTaxCodes", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.OrganizationDefaultTaxCodes", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.OrganizationDefaultTaxCodes", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.OrganizationDefaultTaxCodes", + "line": 64 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 69 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 74 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 79 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.OrganizationDefaultTaxCodes", + "line": 84 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeID", + "signature": "func InvoicingTaxCodeID(v string) predicate.OrganizationDefaultTaxCodes", + "line": 89 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeID", + "signature": "func CreditGrantTaxCodeID(v string) predicate.OrganizationDefaultTaxCodes", + "line": 94 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 99 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 104 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 109 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 114 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 119 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 124 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 129 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 134 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 139 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 144 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 149 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 154 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 159 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 164 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 169 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 174 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 179 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 184 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 189 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 194 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 199 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 204 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 209 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.OrganizationDefaultTaxCodes", + "line": 214 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.OrganizationDefaultTaxCodes", + "line": 219 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.OrganizationDefaultTaxCodes", + "line": 224 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 229 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 234 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 239 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 244 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 249 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 254 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 259 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 264 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.OrganizationDefaultTaxCodes", + "line": 269 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 274 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 279 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 284 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 289 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDEQ", + "signature": "func InvoicingTaxCodeIDEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 294 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDNEQ", + "signature": "func InvoicingTaxCodeIDNEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 299 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDIn", + "signature": "func InvoicingTaxCodeIDIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 304 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDNotIn", + "signature": "func InvoicingTaxCodeIDNotIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 309 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDGT", + "signature": "func InvoicingTaxCodeIDGT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 314 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDGTE", + "signature": "func InvoicingTaxCodeIDGTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 319 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDLT", + "signature": "func InvoicingTaxCodeIDLT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 324 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDLTE", + "signature": "func InvoicingTaxCodeIDLTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 329 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDContains", + "signature": "func InvoicingTaxCodeIDContains(v string) predicate.OrganizationDefaultTaxCodes", + "line": 334 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDHasPrefix", + "signature": "func InvoicingTaxCodeIDHasPrefix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 339 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDHasSuffix", + "signature": "func InvoicingTaxCodeIDHasSuffix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 344 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDEqualFold", + "signature": "func InvoicingTaxCodeIDEqualFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 349 + }, + { + "kind": "func", + "name": "InvoicingTaxCodeIDContainsFold", + "signature": "func InvoicingTaxCodeIDContainsFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 354 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDEQ", + "signature": "func CreditGrantTaxCodeIDEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 359 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDNEQ", + "signature": "func CreditGrantTaxCodeIDNEQ(v string) predicate.OrganizationDefaultTaxCodes", + "line": 364 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDIn", + "signature": "func CreditGrantTaxCodeIDIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 369 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDNotIn", + "signature": "func CreditGrantTaxCodeIDNotIn(vs ...string) predicate.OrganizationDefaultTaxCodes", + "line": 374 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDGT", + "signature": "func CreditGrantTaxCodeIDGT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 379 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDGTE", + "signature": "func CreditGrantTaxCodeIDGTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 384 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDLT", + "signature": "func CreditGrantTaxCodeIDLT(v string) predicate.OrganizationDefaultTaxCodes", + "line": 389 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDLTE", + "signature": "func CreditGrantTaxCodeIDLTE(v string) predicate.OrganizationDefaultTaxCodes", + "line": 394 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDContains", + "signature": "func CreditGrantTaxCodeIDContains(v string) predicate.OrganizationDefaultTaxCodes", + "line": 399 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDHasPrefix", + "signature": "func CreditGrantTaxCodeIDHasPrefix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 404 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDHasSuffix", + "signature": "func CreditGrantTaxCodeIDHasSuffix(v string) predicate.OrganizationDefaultTaxCodes", + "line": 409 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDEqualFold", + "signature": "func CreditGrantTaxCodeIDEqualFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 414 + }, + { + "kind": "func", + "name": "CreditGrantTaxCodeIDContainsFold", + "signature": "func CreditGrantTaxCodeIDContainsFold(v string) predicate.OrganizationDefaultTaxCodes", + "line": 419 + }, + { + "kind": "func", + "name": "HasInvoicingTaxCode", + "signature": "func HasInvoicingTaxCode() predicate.OrganizationDefaultTaxCodes", + "line": 424 + }, + { + "kind": "func", + "name": "HasInvoicingTaxCodeWith", + "signature": "func HasInvoicingTaxCodeWith(preds ...predicate.TaxCode) predicate.OrganizationDefaultTaxCodes", + "line": 435 + }, + { + "kind": "func", + "name": "HasCreditGrantTaxCode", + "signature": "func HasCreditGrantTaxCode() predicate.OrganizationDefaultTaxCodes", + "line": 447 + }, + { + "kind": "func", + "name": "HasCreditGrantTaxCodeWith", + "signature": "func HasCreditGrantTaxCodeWith(preds ...predicate.TaxCode) predicate.OrganizationDefaultTaxCodes", + "line": 458 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.OrganizationDefaultTaxCodes) predicate.OrganizationDefaultTaxCodes", + "line": 470 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.OrganizationDefaultTaxCodes) predicate.OrganizationDefaultTaxCodes", + "line": 475 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.OrganizationDefaultTaxCodes) predicate.OrganizationDefaultTaxCodes", + "line": 480 + } + ], + "line_count": 482 + }, + "openmeter/ent/db/organizationdefaulttaxcodes_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesCreate", + "signature": "type OrganizationDefaultTaxCodesCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetCreatedAt(v time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetNillableCreatedAt(v *time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetNillableUpdatedAt(v *time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetNillableDeletedAt(v *time.Time) *OrganizationDefaultTaxCodesCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetNamespace(v string) *OrganizationDefaultTaxCodesCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetID(v string) *OrganizationDefaultTaxCodesCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetNillableID(v *string) *OrganizationDefaultTaxCodesCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCode", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetInvoicingTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCode", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SetCreditGrantTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesCreate", + "line": 107 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) Mutation() *OrganizationDefaultTaxCodesMutation", + "line": 112 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) Save(ctx context.Context) (*OrganizationDefaultTaxCodes, error)", + "line": 117 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) SaveX(ctx context.Context) *OrganizationDefaultTaxCodes", + "line": 123 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) Exec(ctx context.Context) error", + "line": 132 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) ExecX(ctx context.Context)", + "line": 138 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) defaults()", + "line": 145 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) check() error", + "line": 161 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) sqlSave(ctx context.Context) (*OrganizationDefaultTaxCodes, error)", + "line": 191 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) createSpec() (*OrganizationDefaultTaxCodes, *sqlgraph.CreateSpec)", + "line": 214 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) OnConflict(opts ...sql.ConflictOption) *OrganizationDefaultTaxCodesUpsertOne", + "line": 293 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *OrganizationDefaultTaxCodesCreate) OnConflictColumns(columns ...string) *OrganizationDefaultTaxCodesUpsertOne", + "line": 306 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesUpsert", + "line": 327 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) UpdateUpdatedAt() *OrganizationDefaultTaxCodesUpsert", + "line": 333 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesUpsert", + "line": 339 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) UpdateDeletedAt() *OrganizationDefaultTaxCodesUpsert", + "line": 345 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) ClearDeletedAt() *OrganizationDefaultTaxCodesUpsert", + "line": 351 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsert", + "line": 357 + }, + { + "kind": "func", + "name": "UpdateInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) UpdateInvoicingTaxCodeID() *OrganizationDefaultTaxCodesUpsert", + "line": 363 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsert", + "line": 369 + }, + { + "kind": "func", + "name": "UpdateCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsert) UpdateCreditGrantTaxCodeID() *OrganizationDefaultTaxCodesUpsert", + "line": 375 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) UpdateNewValues() *OrganizationDefaultTaxCodesUpsertOne", + "line": 391 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) Ignore() *OrganizationDefaultTaxCodesUpsertOne", + "line": 413 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) DoNothing() *OrganizationDefaultTaxCodesUpsertOne", + "line": 420 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) Update(set func(*OrganizationDefaultTaxCodesUpsert)) *OrganizationDefaultTaxCodesUpsertOne", + "line": 427 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesUpsertOne", + "line": 435 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) UpdateUpdatedAt() *OrganizationDefaultTaxCodesUpsertOne", + "line": 442 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesUpsertOne", + "line": 449 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) UpdateDeletedAt() *OrganizationDefaultTaxCodesUpsertOne", + "line": 456 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) ClearDeletedAt() *OrganizationDefaultTaxCodesUpsertOne", + "line": 463 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsertOne", + "line": 470 + }, + { + "kind": "func", + "name": "UpdateInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) UpdateInvoicingTaxCodeID() *OrganizationDefaultTaxCodesUpsertOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsertOne", + "line": 484 + }, + { + "kind": "func", + "name": "UpdateCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) UpdateCreditGrantTaxCodeID() *OrganizationDefaultTaxCodesUpsertOne", + "line": 491 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) Exec(ctx context.Context) error", + "line": 498 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) ExecX(ctx context.Context)", + "line": 506 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 513 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertOne) IDX(ctx context.Context) string", + "line": 527 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesCreateBulk", + "signature": "type OrganizationDefaultTaxCodesCreateBulk struct", + "line": 536 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) Save(ctx context.Context) ([]*OrganizationDefaultTaxCodes, error)", + "line": 544 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) SaveX(ctx context.Context) []*OrganizationDefaultTaxCodes", + "line": 600 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) Exec(ctx context.Context) error", + "line": 609 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) ExecX(ctx context.Context)", + "line": 615 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 636 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *OrganizationDefaultTaxCodesCreateBulk) OnConflictColumns(columns ...string) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 649 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesUpsertBulk", + "signature": "type OrganizationDefaultTaxCodesUpsertBulk struct", + "line": 658 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) UpdateNewValues() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 673 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) Ignore() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 697 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) DoNothing() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 704 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) Update(set func(*OrganizationDefaultTaxCodesUpsert)) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 711 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 719 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) UpdateUpdatedAt() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 726 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 733 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) UpdateDeletedAt() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 740 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) ClearDeletedAt() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 747 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 754 + }, + { + "kind": "func", + "name": "UpdateInvoicingTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) UpdateInvoicingTaxCodeID() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 761 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesUpsertBulk", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateCreditGrantTaxCodeID", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) UpdateCreditGrantTaxCodeID() *OrganizationDefaultTaxCodesUpsertBulk", + "line": 775 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) Exec(ctx context.Context) error", + "line": 782 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *OrganizationDefaultTaxCodesUpsertBulk) ExecX(ctx context.Context)", + "line": 798 + } + ], + "line_count": 802 + }, + "openmeter/ent/db/organizationdefaulttaxcodes_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesDelete", + "signature": "type OrganizationDefaultTaxCodesDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *OrganizationDefaultTaxCodesDelete) Where(ps ...predicate.OrganizationDefaultTaxCodes) *OrganizationDefaultTaxCodesDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *OrganizationDefaultTaxCodesDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *OrganizationDefaultTaxCodesDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *OrganizationDefaultTaxCodesDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesDeleteOne", + "signature": "type OrganizationDefaultTaxCodesDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *OrganizationDefaultTaxCodesDeleteOne) Where(ps ...predicate.OrganizationDefaultTaxCodes) *OrganizationDefaultTaxCodesDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *OrganizationDefaultTaxCodesDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *OrganizationDefaultTaxCodesDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/organizationdefaulttaxcodes_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesQuery", + "signature": "type OrganizationDefaultTaxCodesQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Where(ps ...predicate.OrganizationDefaultTaxCodes) *OrganizationDefaultTaxCodesQuery", + "line": 36 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Limit(limit int) *OrganizationDefaultTaxCodesQuery", + "line": 42 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Offset(offset int) *OrganizationDefaultTaxCodesQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Unique(unique bool) *OrganizationDefaultTaxCodesQuery", + "line": 55 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Order(o ...organizationdefaulttaxcodes.OrderOption) *OrganizationDefaultTaxCodesQuery", + "line": 61 + }, + { + "kind": "func", + "name": "QueryInvoicingTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) QueryInvoicingTaxCode() *TaxCodeQuery", + "line": 67 + }, + { + "kind": "func", + "name": "QueryCreditGrantTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) QueryCreditGrantTaxCode() *TaxCodeQuery", + "line": 89 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) First(ctx context.Context) (*OrganizationDefaultTaxCodes, error)", + "line": 112 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) FirstX(ctx context.Context) *OrganizationDefaultTaxCodes", + "line": 124 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 134 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) FirstIDX(ctx context.Context) string", + "line": 147 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Only(ctx context.Context) (*OrganizationDefaultTaxCodes, error)", + "line": 158 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) OnlyX(ctx context.Context) *OrganizationDefaultTaxCodes", + "line": 174 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 185 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) OnlyIDX(ctx context.Context) string", + "line": 202 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) All(ctx context.Context) ([]*OrganizationDefaultTaxCodes, error)", + "line": 211 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) AllX(ctx context.Context) []*OrganizationDefaultTaxCodes", + "line": 221 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 230 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) IDsX(ctx context.Context) []string", + "line": 242 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Count(ctx context.Context) (int, error)", + "line": 251 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) CountX(ctx context.Context) int", + "line": 260 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Exist(ctx context.Context) (bool, error)", + "line": 269 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) ExistX(ctx context.Context) bool", + "line": 282 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Clone() *OrganizationDefaultTaxCodesQuery", + "line": 292 + }, + { + "kind": "func", + "name": "WithInvoicingTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) WithInvoicingTaxCode(opts ...func(*TaxCodeQuery)) *OrganizationDefaultTaxCodesQuery", + "line": 312 + }, + { + "kind": "func", + "name": "WithCreditGrantTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) WithCreditGrantTaxCode(opts ...func(*TaxCodeQuery)) *OrganizationDefaultTaxCodesQuery", + "line": 323 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) GroupBy(field string, fields ...string) *OrganizationDefaultTaxCodesGroupBy", + "line": 346 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Select(fields ...string) *OrganizationDefaultTaxCodesSelect", + "line": 367 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) Aggregate(fns ...AggregateFunc) *OrganizationDefaultTaxCodesSelect", + "line": 376 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) prepareQuery(ctx context.Context) error", + "line": 380 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*OrganizationDefaultTaxCodes, error)", + "line": 406 + }, + { + "kind": "func", + "name": "loadInvoicingTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) loadInvoicingTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*OrganizationDefaultTaxCodes, init func(*OrganizationDefaultTaxCodes), assign func(*OrganizationDefaultTaxCodes, *TaxCode)) error", + "line": 451 + }, + { + "kind": "func", + "name": "loadCreditGrantTaxCode", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) loadCreditGrantTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*OrganizationDefaultTaxCodes, init func(*OrganizationDefaultTaxCodes), assign func(*OrganizationDefaultTaxCodes, *TaxCode)) error", + "line": 480 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) sqlCount(ctx context.Context) (int, error)", + "line": 510 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) querySpec() *sqlgraph.QuerySpec", + "line": 522 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 568 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) ForUpdate(opts ...sql.LockOption) *OrganizationDefaultTaxCodesQuery", + "line": 606 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *OrganizationDefaultTaxCodesQuery) ForShare(opts ...sql.LockOption) *OrganizationDefaultTaxCodesQuery", + "line": 619 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesGroupBy", + "signature": "type OrganizationDefaultTaxCodesGroupBy struct", + "line": 630 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *OrganizationDefaultTaxCodesGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationDefaultTaxCodesGroupBy", + "line": 636 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *OrganizationDefaultTaxCodesGroupBy) Scan(ctx context.Context, v any) error", + "line": 642 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *OrganizationDefaultTaxCodesGroupBy) sqlScan(ctx context.Context, root *OrganizationDefaultTaxCodesQuery, v any) error", + "line": 650 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesSelect", + "signature": "type OrganizationDefaultTaxCodesSelect struct", + "line": 678 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *OrganizationDefaultTaxCodesSelect) Aggregate(fns ...AggregateFunc) *OrganizationDefaultTaxCodesSelect", + "line": 684 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *OrganizationDefaultTaxCodesSelect) Scan(ctx context.Context, v any) error", + "line": 690 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *OrganizationDefaultTaxCodesSelect) sqlScan(ctx context.Context, root *OrganizationDefaultTaxCodesQuery, v any) error", + "line": 698 + } + ], + "line_count": 717 + }, + "openmeter/ent/db/organizationdefaulttaxcodes_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesUpdate", + "signature": "type OrganizationDefaultTaxCodesUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) Where(ps ...predicate.OrganizationDefaultTaxCodes) *OrganizationDefaultTaxCodesUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetNillableDeletedAt(v *time.Time) *OrganizationDefaultTaxCodesUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) ClearDeletedAt() *OrganizationDefaultTaxCodesUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "SetNillableInvoicingTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetNillableInvoicingTaxCodeID(v *string) *OrganizationDefaultTaxCodesUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableCreditGrantTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetNillableCreditGrantTaxCodeID(v *string) *OrganizationDefaultTaxCodesUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetInvoicingTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SetCreditGrantTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) Mutation() *OrganizationDefaultTaxCodesMutation", + "line": 97 + }, + { + "kind": "func", + "name": "ClearInvoicingTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) ClearInvoicingTaxCode() *OrganizationDefaultTaxCodesUpdate", + "line": 102 + }, + { + "kind": "func", + "name": "ClearCreditGrantTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) ClearCreditGrantTaxCode() *OrganizationDefaultTaxCodesUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) Save(ctx context.Context) (int, error)", + "line": 114 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) SaveX(ctx context.Context) int", + "line": 120 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) Exec(ctx context.Context) error", + "line": 129 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) ExecX(ctx context.Context)", + "line": 135 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) defaults()", + "line": 142 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) check() error", + "line": 150 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 160 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesUpdateOne", + "signature": "type OrganizationDefaultTaxCodesUpdateOne struct", + "line": 252 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetUpdatedAt(v time.Time) *OrganizationDefaultTaxCodesUpdateOne", + "line": 260 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetDeletedAt(v time.Time) *OrganizationDefaultTaxCodesUpdateOne", + "line": 266 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetNillableDeletedAt(v *time.Time) *OrganizationDefaultTaxCodesUpdateOne", + "line": 272 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) ClearDeletedAt() *OrganizationDefaultTaxCodesUpdateOne", + "line": 280 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetInvoicingTaxCodeID(v string) *OrganizationDefaultTaxCodesUpdateOne", + "line": 286 + }, + { + "kind": "func", + "name": "SetNillableInvoicingTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetNillableInvoicingTaxCodeID(v *string) *OrganizationDefaultTaxCodesUpdateOne", + "line": 292 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetCreditGrantTaxCodeID(v string) *OrganizationDefaultTaxCodesUpdateOne", + "line": 300 + }, + { + "kind": "func", + "name": "SetNillableCreditGrantTaxCodeID", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetNillableCreditGrantTaxCodeID(v *string) *OrganizationDefaultTaxCodesUpdateOne", + "line": 306 + }, + { + "kind": "func", + "name": "SetInvoicingTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetInvoicingTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesUpdateOne", + "line": 314 + }, + { + "kind": "func", + "name": "SetCreditGrantTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SetCreditGrantTaxCode(v *TaxCode) *OrganizationDefaultTaxCodesUpdateOne", + "line": 319 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) Mutation() *OrganizationDefaultTaxCodesMutation", + "line": 324 + }, + { + "kind": "func", + "name": "ClearInvoicingTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) ClearInvoicingTaxCode() *OrganizationDefaultTaxCodesUpdateOne", + "line": 329 + }, + { + "kind": "func", + "name": "ClearCreditGrantTaxCode", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) ClearCreditGrantTaxCode() *OrganizationDefaultTaxCodesUpdateOne", + "line": 335 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) Where(ps ...predicate.OrganizationDefaultTaxCodes) *OrganizationDefaultTaxCodesUpdateOne", + "line": 341 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) Select(field string, fields ...string) *OrganizationDefaultTaxCodesUpdateOne", + "line": 348 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) Save(ctx context.Context) (*OrganizationDefaultTaxCodes, error)", + "line": 354 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) SaveX(ctx context.Context) *OrganizationDefaultTaxCodes", + "line": 360 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) Exec(ctx context.Context) error", + "line": 369 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) ExecX(ctx context.Context)", + "line": 375 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) defaults()", + "line": 382 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) check() error", + "line": 390 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *OrganizationDefaultTaxCodesUpdateOne) sqlSave(ctx context.Context) (_node *OrganizationDefaultTaxCodes, err error)", + "line": 400 + } + ], + "line_count": 509 + }, + "openmeter/ent/db/paginate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AddonQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Addon], error)", + "line": 14 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AddonRateCardQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AddonRateCard], error)", + "line": 72 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*App], error)", + "line": 130 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppCustomInvoicingQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AppCustomInvoicing], error)", + "line": 188 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppCustomInvoicingCustomerQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AppCustomInvoicingCustomer], error)", + "line": 246 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppCustomerQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AppCustomer], error)", + "line": 304 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppStripeQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AppStripe], error)", + "line": 362 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *AppStripeCustomerQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*AppStripeCustomer], error)", + "line": 420 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BalanceSnapshotQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BalanceSnapshot], error)", + "line": 478 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingCustomerLockQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingCustomerLock], error)", + "line": 536 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingCustomerOverrideQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingCustomerOverride], error)", + "line": 594 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoice], error)", + "line": 652 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceFlatFeeLineConfigQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceFlatFeeLineConfig], error)", + "line": 710 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceLineQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceLine], error)", + "line": 768 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceLineDiscountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceLineDiscount], error)", + "line": 826 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceLineUsageDiscountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceLineUsageDiscount], error)", + "line": 884 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceSplitLineGroupQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceSplitLineGroup], error)", + "line": 942 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceUsageBasedLineConfigQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceUsageBasedLineConfig], error)", + "line": 1000 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceValidationIssueQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceValidationIssue], error)", + "line": 1058 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingInvoiceWriteSchemaLevelQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingInvoiceWriteSchemaLevel], error)", + "line": 1116 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingProfileQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingProfile], error)", + "line": 1174 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingSequenceNumbersQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingSequenceNumbers], error)", + "line": 1232 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingStandardInvoiceDetailedLineQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingStandardInvoiceDetailedLine], error)", + "line": 1290 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingStandardInvoiceDetailedLineAmountDiscountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingStandardInvoiceDetailedLineAmountDiscount], error)", + "line": 1348 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *BillingWorkflowConfigQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*BillingWorkflowConfig], error)", + "line": 1406 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Charge], error)", + "line": 1464 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeCreditPurchaseQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeCreditPurchase], error)", + "line": 1522 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeCreditPurchaseCreditGrantQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeCreditPurchaseCreditGrant], error)", + "line": 1580 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeCreditPurchaseExternalPaymentQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeCreditPurchaseExternalPayment], error)", + "line": 1638 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeCreditPurchaseInvoicedPaymentQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeCreditPurchaseInvoicedPayment], error)", + "line": 1696 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFee], error)", + "line": 1754 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeRunQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFeeRun], error)", + "line": 1812 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeRunCreditAllocationsQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFeeRunCreditAllocations], error)", + "line": 1870 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeRunDetailedLineQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFeeRunDetailedLine], error)", + "line": 1928 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeRunInvoicedUsageQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFeeRunInvoicedUsage], error)", + "line": 1986 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeFlatFeeRunPaymentQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeFlatFeeRunPayment], error)", + "line": 2044 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBased], error)", + "line": 2102 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedRunCreditAllocationsQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBasedRunCreditAllocations], error)", + "line": 2160 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedRunDetailedLineQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBasedRunDetailedLine], error)", + "line": 2218 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedRunInvoicedUsageQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBasedRunInvoicedUsage], error)", + "line": 2276 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedRunPaymentQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBasedRunPayment], error)", + "line": 2334 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargeUsageBasedRunsQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargeUsageBasedRuns], error)", + "line": 2392 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *ChargesSearchV1Query) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*ChargesSearchV1], error)", + "line": 2450 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CreditRealizationLineageQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*CreditRealizationLineage], error)", + "line": 2508 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CreditRealizationLineageSegmentQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*CreditRealizationLineageSegment], error)", + "line": 2566 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CurrencyCostBasisQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*CurrencyCostBasis], error)", + "line": 2624 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CustomCurrencyQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*CustomCurrency], error)", + "line": 2682 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CustomerQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Customer], error)", + "line": 2740 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *CustomerSubjectsQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*CustomerSubjects], error)", + "line": 2798 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *EntitlementQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Entitlement], error)", + "line": 2856 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *FeatureQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Feature], error)", + "line": 2914 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *GrantQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Grant], error)", + "line": 2972 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LLMCostPriceQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LLMCostPrice], error)", + "line": 3030 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerAccountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerAccount], error)", + "line": 3088 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerBreakageRecordQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerBreakageRecord], error)", + "line": 3146 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerCustomerAccountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerCustomerAccount], error)", + "line": 3204 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerEntryQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerEntry], error)", + "line": 3262 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerSubAccountQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerSubAccount], error)", + "line": 3320 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerSubAccountRouteQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerSubAccountRoute], error)", + "line": 3378 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerTransactionQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerTransaction], error)", + "line": 3436 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *LedgerTransactionGroupQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*LedgerTransactionGroup], error)", + "line": 3494 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *MeterQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Meter], error)", + "line": 3552 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *NotificationChannelQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*NotificationChannel], error)", + "line": 3610 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *NotificationEventQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*NotificationEvent], error)", + "line": 3668 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *NotificationEventDeliveryStatusQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*NotificationEventDeliveryStatus], error)", + "line": 3726 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *NotificationRuleQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*NotificationRule], error)", + "line": 3784 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *OrganizationDefaultTaxCodesQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*OrganizationDefaultTaxCodes], error)", + "line": 3842 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *PlanQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Plan], error)", + "line": 3900 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *PlanAddonQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*PlanAddon], error)", + "line": 3958 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *PlanPhaseQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*PlanPhase], error)", + "line": 4016 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *PlanRateCardQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*PlanRateCard], error)", + "line": 4074 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubjectQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Subject], error)", + "line": 4132 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Subscription], error)", + "line": 4190 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionAddonQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*SubscriptionAddon], error)", + "line": 4248 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionAddonQuantityQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*SubscriptionAddonQuantity], error)", + "line": 4306 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionBillingSyncStateQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*SubscriptionBillingSyncState], error)", + "line": 4364 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionItemQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*SubscriptionItem], error)", + "line": 4422 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *SubscriptionPhaseQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*SubscriptionPhase], error)", + "line": 4480 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *TaxCodeQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*TaxCode], error)", + "line": 4538 + }, + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *UsageResetQuery) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*UsageReset], error)", + "line": 4596 + } + ], + "line_count": 4650 + }, + "openmeter/ent/db/plan.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 19 + }, + { + "kind": "struct", + "name": "PlanEdges", + "signature": "type PlanEdges struct", + "line": 60 + }, + { + "kind": "func", + "name": "PhasesOrErr", + "signature": "func (e PlanEdges) PhasesOrErr() ([]*PlanPhase, error)", + "line": 74 + }, + { + "kind": "func", + "name": "AddonsOrErr", + "signature": "func (e PlanEdges) AddonsOrErr() ([]*PlanAddon, error)", + "line": 83 + }, + { + "kind": "func", + "name": "SubscriptionsOrErr", + "signature": "func (e PlanEdges) SubscriptionsOrErr() ([]*Subscription, error)", + "line": 92 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Plan) assignValues(columns []string, values []any) error", + "line": 123 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Plan) Value(name string) (ent.Value, error)", + "line": 240 + }, + { + "kind": "func", + "name": "QueryPhases", + "signature": "func (_m *Plan) QueryPhases() *PlanPhaseQuery", + "line": 245 + }, + { + "kind": "func", + "name": "QueryAddons", + "signature": "func (_m *Plan) QueryAddons() *PlanAddonQuery", + "line": 250 + }, + { + "kind": "func", + "name": "QuerySubscriptions", + "signature": "func (_m *Plan) QuerySubscriptions() *SubscriptionQuery", + "line": 255 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Plan) Update() *PlanUpdateOne", + "line": 262 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Plan) Unwrap() *Plan", + "line": 268 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Plan) String() string", + "line": 278 + } + ], + "line_count": 339 + }, + "openmeter/ent/db/plan/plan.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 102 + }, + { + "kind": "func", + "name": "SettlementModeValidator", + "signature": "func SettlementModeValidator(sm productcatalog.SettlementMode) error", + "line": 141 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 159 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 164 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 169 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 174 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 179 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 184 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 189 + }, + { + "kind": "func", + "name": "ByVersion", + "signature": "func ByVersion(opts ...sql.OrderTermOption) OrderOption", + "line": 194 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 199 + }, + { + "kind": "func", + "name": "ByBillingCadence", + "signature": "func ByBillingCadence(opts ...sql.OrderTermOption) OrderOption", + "line": 204 + }, + { + "kind": "func", + "name": "ByProRatingConfig", + "signature": "func ByProRatingConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 209 + }, + { + "kind": "func", + "name": "ByEffectiveFrom", + "signature": "func ByEffectiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 214 + }, + { + "kind": "func", + "name": "ByEffectiveTo", + "signature": "func ByEffectiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 219 + }, + { + "kind": "func", + "name": "BySettlementMode", + "signature": "func BySettlementMode(opts ...sql.OrderTermOption) OrderOption", + "line": 224 + }, + { + "kind": "func", + "name": "ByPhasesCount", + "signature": "func ByPhasesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 229 + }, + { + "kind": "func", + "name": "ByPhases", + "signature": "func ByPhases(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByAddonsCount", + "signature": "func ByAddonsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByAddons", + "signature": "func ByAddons(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 250 + }, + { + "kind": "func", + "name": "BySubscriptionsCount", + "signature": "func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 257 + }, + { + "kind": "func", + "name": "BySubscriptions", + "signature": "func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 264 + }, + { + "kind": "func", + "name": "newPhasesStep", + "signature": "func newPhasesStep() *sqlgraph.Step", + "line": 269 + }, + { + "kind": "func", + "name": "newAddonsStep", + "signature": "func newAddonsStep() *sqlgraph.Step", + "line": 276 + }, + { + "kind": "func", + "name": "newSubscriptionsStep", + "signature": "func newSubscriptionsStep() *sqlgraph.Step", + "line": 283 + } + ], + "line_count": 289 + }, + "openmeter/ent/db/plan/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Plan", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Plan", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Plan", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Plan", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Plan", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Plan", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Plan", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Plan", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Plan", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Plan", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Plan", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Plan", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Plan", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Plan", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Plan", + "line": 86 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Plan", + "line": 91 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Plan", + "line": 96 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Plan", + "line": 101 + }, + { + "kind": "func", + "name": "Version", + "signature": "func Version(v int) predicate.Plan", + "line": 106 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v string) predicate.Plan", + "line": 111 + }, + { + "kind": "func", + "name": "BillingCadence", + "signature": "func BillingCadence(v datetime.ISODurationString) predicate.Plan", + "line": 116 + }, + { + "kind": "func", + "name": "EffectiveFrom", + "signature": "func EffectiveFrom(v time.Time) predicate.Plan", + "line": 122 + }, + { + "kind": "func", + "name": "EffectiveTo", + "signature": "func EffectiveTo(v time.Time) predicate.Plan", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Plan", + "line": 132 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Plan", + "line": 137 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Plan", + "line": 142 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Plan", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Plan", + "line": 152 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Plan", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Plan", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Plan", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Plan", + "line": 172 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Plan", + "line": 177 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Plan", + "line": 182 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Plan", + "line": 187 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Plan", + "line": 192 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Plan", + "line": 197 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Plan", + "line": 202 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Plan", + "line": 207 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Plan", + "line": 212 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Plan", + "line": 217 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Plan", + "line": 222 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Plan", + "line": 227 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Plan", + "line": 232 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Plan", + "line": 237 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Plan", + "line": 242 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Plan", + "line": 247 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Plan", + "line": 252 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Plan", + "line": 257 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Plan", + "line": 262 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Plan", + "line": 267 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Plan", + "line": 272 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Plan", + "line": 277 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Plan", + "line": 282 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Plan", + "line": 287 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Plan", + "line": 292 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Plan", + "line": 297 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Plan", + "line": 302 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Plan", + "line": 307 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Plan", + "line": 312 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Plan", + "line": 317 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Plan", + "line": 322 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Plan", + "line": 327 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Plan", + "line": 332 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Plan", + "line": 337 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Plan", + "line": 342 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Plan", + "line": 347 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Plan", + "line": 352 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Plan", + "line": 357 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Plan", + "line": 362 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Plan", + "line": 367 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Plan", + "line": 372 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Plan", + "line": 377 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Plan", + "line": 382 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Plan", + "line": 387 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Plan", + "line": 392 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Plan", + "line": 397 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Plan", + "line": 402 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Plan", + "line": 407 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Plan", + "line": 412 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Plan", + "line": 417 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Plan", + "line": 422 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Plan", + "line": 427 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Plan", + "line": 432 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Plan", + "line": 437 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Plan", + "line": 442 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Plan", + "line": 447 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Plan", + "line": 452 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Plan", + "line": 457 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Plan", + "line": 462 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Plan", + "line": 467 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Plan", + "line": 472 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Plan", + "line": 477 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Plan", + "line": 482 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Plan", + "line": 487 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Plan", + "line": 492 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Plan", + "line": 497 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Plan", + "line": 502 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Plan", + "line": 507 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Plan", + "line": 512 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Plan", + "line": 517 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Plan", + "line": 522 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Plan", + "line": 527 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Plan", + "line": 532 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Plan", + "line": 537 + }, + { + "kind": "func", + "name": "VersionEQ", + "signature": "func VersionEQ(v int) predicate.Plan", + "line": 542 + }, + { + "kind": "func", + "name": "VersionNEQ", + "signature": "func VersionNEQ(v int) predicate.Plan", + "line": 547 + }, + { + "kind": "func", + "name": "VersionIn", + "signature": "func VersionIn(vs ...int) predicate.Plan", + "line": 552 + }, + { + "kind": "func", + "name": "VersionNotIn", + "signature": "func VersionNotIn(vs ...int) predicate.Plan", + "line": 557 + }, + { + "kind": "func", + "name": "VersionGT", + "signature": "func VersionGT(v int) predicate.Plan", + "line": 562 + }, + { + "kind": "func", + "name": "VersionGTE", + "signature": "func VersionGTE(v int) predicate.Plan", + "line": 567 + }, + { + "kind": "func", + "name": "VersionLT", + "signature": "func VersionLT(v int) predicate.Plan", + "line": 572 + }, + { + "kind": "func", + "name": "VersionLTE", + "signature": "func VersionLTE(v int) predicate.Plan", + "line": 577 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v string) predicate.Plan", + "line": 582 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v string) predicate.Plan", + "line": 587 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...string) predicate.Plan", + "line": 592 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...string) predicate.Plan", + "line": 597 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v string) predicate.Plan", + "line": 602 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v string) predicate.Plan", + "line": 607 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v string) predicate.Plan", + "line": 612 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v string) predicate.Plan", + "line": 617 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v string) predicate.Plan", + "line": 622 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v string) predicate.Plan", + "line": 627 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v string) predicate.Plan", + "line": 632 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v string) predicate.Plan", + "line": 637 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v string) predicate.Plan", + "line": 642 + }, + { + "kind": "func", + "name": "BillingCadenceEQ", + "signature": "func BillingCadenceEQ(v datetime.ISODurationString) predicate.Plan", + "line": 647 + }, + { + "kind": "func", + "name": "BillingCadenceNEQ", + "signature": "func BillingCadenceNEQ(v datetime.ISODurationString) predicate.Plan", + "line": 653 + }, + { + "kind": "func", + "name": "BillingCadenceIn", + "signature": "func BillingCadenceIn(vs ...datetime.ISODurationString) predicate.Plan", + "line": 659 + }, + { + "kind": "func", + "name": "BillingCadenceNotIn", + "signature": "func BillingCadenceNotIn(vs ...datetime.ISODurationString) predicate.Plan", + "line": 668 + }, + { + "kind": "func", + "name": "BillingCadenceGT", + "signature": "func BillingCadenceGT(v datetime.ISODurationString) predicate.Plan", + "line": 677 + }, + { + "kind": "func", + "name": "BillingCadenceGTE", + "signature": "func BillingCadenceGTE(v datetime.ISODurationString) predicate.Plan", + "line": 683 + }, + { + "kind": "func", + "name": "BillingCadenceLT", + "signature": "func BillingCadenceLT(v datetime.ISODurationString) predicate.Plan", + "line": 689 + }, + { + "kind": "func", + "name": "BillingCadenceLTE", + "signature": "func BillingCadenceLTE(v datetime.ISODurationString) predicate.Plan", + "line": 695 + }, + { + "kind": "func", + "name": "BillingCadenceContains", + "signature": "func BillingCadenceContains(v datetime.ISODurationString) predicate.Plan", + "line": 701 + }, + { + "kind": "func", + "name": "BillingCadenceHasPrefix", + "signature": "func BillingCadenceHasPrefix(v datetime.ISODurationString) predicate.Plan", + "line": 707 + }, + { + "kind": "func", + "name": "BillingCadenceHasSuffix", + "signature": "func BillingCadenceHasSuffix(v datetime.ISODurationString) predicate.Plan", + "line": 713 + }, + { + "kind": "func", + "name": "BillingCadenceEqualFold", + "signature": "func BillingCadenceEqualFold(v datetime.ISODurationString) predicate.Plan", + "line": 719 + }, + { + "kind": "func", + "name": "BillingCadenceContainsFold", + "signature": "func BillingCadenceContainsFold(v datetime.ISODurationString) predicate.Plan", + "line": 725 + }, + { + "kind": "func", + "name": "EffectiveFromEQ", + "signature": "func EffectiveFromEQ(v time.Time) predicate.Plan", + "line": 731 + }, + { + "kind": "func", + "name": "EffectiveFromNEQ", + "signature": "func EffectiveFromNEQ(v time.Time) predicate.Plan", + "line": 736 + }, + { + "kind": "func", + "name": "EffectiveFromIn", + "signature": "func EffectiveFromIn(vs ...time.Time) predicate.Plan", + "line": 741 + }, + { + "kind": "func", + "name": "EffectiveFromNotIn", + "signature": "func EffectiveFromNotIn(vs ...time.Time) predicate.Plan", + "line": 746 + }, + { + "kind": "func", + "name": "EffectiveFromGT", + "signature": "func EffectiveFromGT(v time.Time) predicate.Plan", + "line": 751 + }, + { + "kind": "func", + "name": "EffectiveFromGTE", + "signature": "func EffectiveFromGTE(v time.Time) predicate.Plan", + "line": 756 + }, + { + "kind": "func", + "name": "EffectiveFromLT", + "signature": "func EffectiveFromLT(v time.Time) predicate.Plan", + "line": 761 + }, + { + "kind": "func", + "name": "EffectiveFromLTE", + "signature": "func EffectiveFromLTE(v time.Time) predicate.Plan", + "line": 766 + }, + { + "kind": "func", + "name": "EffectiveFromIsNil", + "signature": "func EffectiveFromIsNil() predicate.Plan", + "line": 771 + }, + { + "kind": "func", + "name": "EffectiveFromNotNil", + "signature": "func EffectiveFromNotNil() predicate.Plan", + "line": 776 + }, + { + "kind": "func", + "name": "EffectiveToEQ", + "signature": "func EffectiveToEQ(v time.Time) predicate.Plan", + "line": 781 + }, + { + "kind": "func", + "name": "EffectiveToNEQ", + "signature": "func EffectiveToNEQ(v time.Time) predicate.Plan", + "line": 786 + }, + { + "kind": "func", + "name": "EffectiveToIn", + "signature": "func EffectiveToIn(vs ...time.Time) predicate.Plan", + "line": 791 + }, + { + "kind": "func", + "name": "EffectiveToNotIn", + "signature": "func EffectiveToNotIn(vs ...time.Time) predicate.Plan", + "line": 796 + }, + { + "kind": "func", + "name": "EffectiveToGT", + "signature": "func EffectiveToGT(v time.Time) predicate.Plan", + "line": 801 + }, + { + "kind": "func", + "name": "EffectiveToGTE", + "signature": "func EffectiveToGTE(v time.Time) predicate.Plan", + "line": 806 + }, + { + "kind": "func", + "name": "EffectiveToLT", + "signature": "func EffectiveToLT(v time.Time) predicate.Plan", + "line": 811 + }, + { + "kind": "func", + "name": "EffectiveToLTE", + "signature": "func EffectiveToLTE(v time.Time) predicate.Plan", + "line": 816 + }, + { + "kind": "func", + "name": "EffectiveToIsNil", + "signature": "func EffectiveToIsNil() predicate.Plan", + "line": 821 + }, + { + "kind": "func", + "name": "EffectiveToNotNil", + "signature": "func EffectiveToNotNil() predicate.Plan", + "line": 826 + }, + { + "kind": "func", + "name": "SettlementModeEQ", + "signature": "func SettlementModeEQ(v productcatalog.SettlementMode) predicate.Plan", + "line": 831 + }, + { + "kind": "func", + "name": "SettlementModeNEQ", + "signature": "func SettlementModeNEQ(v productcatalog.SettlementMode) predicate.Plan", + "line": 837 + }, + { + "kind": "func", + "name": "SettlementModeIn", + "signature": "func SettlementModeIn(vs ...productcatalog.SettlementMode) predicate.Plan", + "line": 843 + }, + { + "kind": "func", + "name": "SettlementModeNotIn", + "signature": "func SettlementModeNotIn(vs ...productcatalog.SettlementMode) predicate.Plan", + "line": 852 + }, + { + "kind": "func", + "name": "HasPhases", + "signature": "func HasPhases() predicate.Plan", + "line": 861 + }, + { + "kind": "func", + "name": "HasPhasesWith", + "signature": "func HasPhasesWith(preds ...predicate.PlanPhase) predicate.Plan", + "line": 872 + }, + { + "kind": "func", + "name": "HasAddons", + "signature": "func HasAddons() predicate.Plan", + "line": 884 + }, + { + "kind": "func", + "name": "HasAddonsWith", + "signature": "func HasAddonsWith(preds ...predicate.PlanAddon) predicate.Plan", + "line": 895 + }, + { + "kind": "func", + "name": "HasSubscriptions", + "signature": "func HasSubscriptions() predicate.Plan", + "line": 907 + }, + { + "kind": "func", + "name": "HasSubscriptionsWith", + "signature": "func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.Plan", + "line": 918 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Plan) predicate.Plan", + "line": 930 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Plan) predicate.Plan", + "line": 935 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Plan) predicate.Plan", + "line": 940 + } + ], + "line_count": 942 + }, + "openmeter/ent/db/plan_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanCreate", + "signature": "type PlanCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *PlanCreate) SetNamespace(v string) *PlanCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *PlanCreate) SetMetadata(v map[string]string) *PlanCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *PlanCreate) SetCreatedAt(v time.Time) *PlanCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *PlanCreate) SetNillableCreatedAt(v *time.Time) *PlanCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *PlanCreate) SetUpdatedAt(v time.Time) *PlanCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *PlanCreate) SetNillableUpdatedAt(v *time.Time) *PlanCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *PlanCreate) SetDeletedAt(v time.Time) *PlanCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *PlanCreate) SetNillableDeletedAt(v *time.Time) *PlanCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *PlanCreate) SetName(v string) *PlanCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *PlanCreate) SetDescription(v string) *PlanCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *PlanCreate) SetNillableDescription(v *string) *PlanCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *PlanCreate) SetKey(v string) *PlanCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_c *PlanCreate) SetVersion(v int) *PlanCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *PlanCreate) SetCurrency(v string) *PlanCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetNillableCurrency", + "signature": "func (_c *PlanCreate) SetNillableCurrency(v *string) *PlanCreate", + "line": 124 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_c *PlanCreate) SetBillingCadence(v datetime.ISODurationString) *PlanCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_c *PlanCreate) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_c *PlanCreate) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *PlanCreate", + "line": 144 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_c *PlanCreate) SetEffectiveFrom(v time.Time) *PlanCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_c *PlanCreate) SetNillableEffectiveFrom(v *time.Time) *PlanCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_c *PlanCreate) SetEffectiveTo(v time.Time) *PlanCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_c *PlanCreate) SetNillableEffectiveTo(v *time.Time) *PlanCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_c *PlanCreate) SetSettlementMode(v productcatalog.SettlementMode) *PlanCreate", + "line": 180 + }, + { + "kind": "func", + "name": "SetNillableSettlementMode", + "signature": "func (_c *PlanCreate) SetNillableSettlementMode(v *productcatalog.SettlementMode) *PlanCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *PlanCreate) SetID(v string) *PlanCreate", + "line": 194 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *PlanCreate) SetNillableID(v *string) *PlanCreate", + "line": 200 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_c *PlanCreate) AddPhaseIDs(ids ...string) *PlanCreate", + "line": 208 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_c *PlanCreate) AddPhases(v ...*PlanPhase) *PlanCreate", + "line": 214 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_c *PlanCreate) AddAddonIDs(ids ...string) *PlanCreate", + "line": 223 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_c *PlanCreate) AddAddons(v ...*PlanAddon) *PlanCreate", + "line": 229 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_c *PlanCreate) AddSubscriptionIDs(ids ...string) *PlanCreate", + "line": 238 + }, + { + "kind": "func", + "name": "AddSubscriptions", + "signature": "func (_c *PlanCreate) AddSubscriptions(v ...*Subscription) *PlanCreate", + "line": 244 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *PlanCreate) Mutation() *PlanMutation", + "line": 253 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanCreate) Save(ctx context.Context) (*Plan, error)", + "line": 258 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanCreate) SaveX(ctx context.Context) *Plan", + "line": 264 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanCreate) Exec(ctx context.Context) error", + "line": 273 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanCreate) ExecX(ctx context.Context)", + "line": 279 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *PlanCreate) defaults()", + "line": 286 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *PlanCreate) check() error", + "line": 314 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *PlanCreate) sqlSave(ctx context.Context) (*Plan, error)", + "line": 378 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *PlanCreate) createSpec() (*Plan, *sqlgraph.CreateSpec, error)", + "line": 404 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanCreate) OnConflict(opts ...sql.ConflictOption) *PlanUpsertOne", + "line": 545 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanCreate) OnConflictColumns(columns ...string) *PlanUpsertOne", + "line": 558 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanUpsert) SetMetadata(v map[string]string) *PlanUpsert", + "line": 579 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanUpsert) UpdateMetadata() *PlanUpsert", + "line": 585 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanUpsert) ClearMetadata() *PlanUpsert", + "line": 591 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanUpsert) SetUpdatedAt(v time.Time) *PlanUpsert", + "line": 597 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanUpsert) UpdateUpdatedAt() *PlanUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanUpsert) SetDeletedAt(v time.Time) *PlanUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanUpsert) UpdateDeletedAt() *PlanUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanUpsert) ClearDeletedAt() *PlanUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanUpsert) SetName(v string) *PlanUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanUpsert) UpdateName() *PlanUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanUpsert) SetDescription(v string) *PlanUpsert", + "line": 639 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanUpsert) UpdateDescription() *PlanUpsert", + "line": 645 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanUpsert) ClearDescription() *PlanUpsert", + "line": 651 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *PlanUpsert) SetVersion(v int) *PlanUpsert", + "line": 657 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *PlanUpsert) UpdateVersion() *PlanUpsert", + "line": 663 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *PlanUpsert) AddVersion(v int) *PlanUpsert", + "line": 669 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanUpsert) SetBillingCadence(v datetime.ISODurationString) *PlanUpsert", + "line": 675 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanUpsert) UpdateBillingCadence() *PlanUpsert", + "line": 681 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *PlanUpsert) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanUpsert", + "line": 687 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *PlanUpsert) UpdateProRatingConfig() *PlanUpsert", + "line": 693 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *PlanUpsert) SetEffectiveFrom(v time.Time) *PlanUpsert", + "line": 699 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *PlanUpsert) UpdateEffectiveFrom() *PlanUpsert", + "line": 705 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *PlanUpsert) ClearEffectiveFrom() *PlanUpsert", + "line": 711 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *PlanUpsert) SetEffectiveTo(v time.Time) *PlanUpsert", + "line": 717 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *PlanUpsert) UpdateEffectiveTo() *PlanUpsert", + "line": 723 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *PlanUpsert) ClearEffectiveTo() *PlanUpsert", + "line": 729 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (u *PlanUpsert) SetSettlementMode(v productcatalog.SettlementMode) *PlanUpsert", + "line": 735 + }, + { + "kind": "func", + "name": "UpdateSettlementMode", + "signature": "func (u *PlanUpsert) UpdateSettlementMode() *PlanUpsert", + "line": 741 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanUpsertOne) UpdateNewValues() *PlanUpsertOne", + "line": 757 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanUpsertOne) Ignore() *PlanUpsertOne", + "line": 785 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanUpsertOne) DoNothing() *PlanUpsertOne", + "line": 792 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanUpsertOne) Update(set func(*PlanUpsert)) *PlanUpsertOne", + "line": 799 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanUpsertOne) SetMetadata(v map[string]string) *PlanUpsertOne", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanUpsertOne) UpdateMetadata() *PlanUpsertOne", + "line": 814 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanUpsertOne) ClearMetadata() *PlanUpsertOne", + "line": 821 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanUpsertOne) SetUpdatedAt(v time.Time) *PlanUpsertOne", + "line": 828 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanUpsertOne) UpdateUpdatedAt() *PlanUpsertOne", + "line": 835 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanUpsertOne) SetDeletedAt(v time.Time) *PlanUpsertOne", + "line": 842 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanUpsertOne) UpdateDeletedAt() *PlanUpsertOne", + "line": 849 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanUpsertOne) ClearDeletedAt() *PlanUpsertOne", + "line": 856 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanUpsertOne) SetName(v string) *PlanUpsertOne", + "line": 863 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanUpsertOne) UpdateName() *PlanUpsertOne", + "line": 870 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanUpsertOne) SetDescription(v string) *PlanUpsertOne", + "line": 877 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanUpsertOne) UpdateDescription() *PlanUpsertOne", + "line": 884 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanUpsertOne) ClearDescription() *PlanUpsertOne", + "line": 891 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *PlanUpsertOne) SetVersion(v int) *PlanUpsertOne", + "line": 898 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *PlanUpsertOne) AddVersion(v int) *PlanUpsertOne", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *PlanUpsertOne) UpdateVersion() *PlanUpsertOne", + "line": 912 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanUpsertOne) SetBillingCadence(v datetime.ISODurationString) *PlanUpsertOne", + "line": 919 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanUpsertOne) UpdateBillingCadence() *PlanUpsertOne", + "line": 926 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *PlanUpsertOne) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanUpsertOne", + "line": 933 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *PlanUpsertOne) UpdateProRatingConfig() *PlanUpsertOne", + "line": 940 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *PlanUpsertOne) SetEffectiveFrom(v time.Time) *PlanUpsertOne", + "line": 947 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *PlanUpsertOne) UpdateEffectiveFrom() *PlanUpsertOne", + "line": 954 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *PlanUpsertOne) ClearEffectiveFrom() *PlanUpsertOne", + "line": 961 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *PlanUpsertOne) SetEffectiveTo(v time.Time) *PlanUpsertOne", + "line": 968 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *PlanUpsertOne) UpdateEffectiveTo() *PlanUpsertOne", + "line": 975 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *PlanUpsertOne) ClearEffectiveTo() *PlanUpsertOne", + "line": 982 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (u *PlanUpsertOne) SetSettlementMode(v productcatalog.SettlementMode) *PlanUpsertOne", + "line": 989 + }, + { + "kind": "func", + "name": "UpdateSettlementMode", + "signature": "func (u *PlanUpsertOne) UpdateSettlementMode() *PlanUpsertOne", + "line": 996 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanUpsertOne) Exec(ctx context.Context) error", + "line": 1003 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanUpsertOne) ExecX(ctx context.Context)", + "line": 1011 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *PlanUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1018 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *PlanUpsertOne) IDX(ctx context.Context) string", + "line": 1032 + }, + { + "kind": "struct", + "name": "PlanCreateBulk", + "signature": "type PlanCreateBulk struct", + "line": 1041 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanCreateBulk) Save(ctx context.Context) ([]*Plan, error)", + "line": 1049 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanCreateBulk) SaveX(ctx context.Context) []*Plan", + "line": 1108 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanCreateBulk) Exec(ctx context.Context) error", + "line": 1117 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanCreateBulk) ExecX(ctx context.Context)", + "line": 1123 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlanUpsertBulk", + "line": 1144 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanCreateBulk) OnConflictColumns(columns ...string) *PlanUpsertBulk", + "line": 1157 + }, + { + "kind": "struct", + "name": "PlanUpsertBulk", + "signature": "type PlanUpsertBulk struct", + "line": 1166 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanUpsertBulk) UpdateNewValues() *PlanUpsertBulk", + "line": 1181 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanUpsertBulk) Ignore() *PlanUpsertBulk", + "line": 1211 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanUpsertBulk) DoNothing() *PlanUpsertBulk", + "line": 1218 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanUpsertBulk) Update(set func(*PlanUpsert)) *PlanUpsertBulk", + "line": 1225 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanUpsertBulk) SetMetadata(v map[string]string) *PlanUpsertBulk", + "line": 1233 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanUpsertBulk) UpdateMetadata() *PlanUpsertBulk", + "line": 1240 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanUpsertBulk) ClearMetadata() *PlanUpsertBulk", + "line": 1247 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanUpsertBulk) SetUpdatedAt(v time.Time) *PlanUpsertBulk", + "line": 1254 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanUpsertBulk) UpdateUpdatedAt() *PlanUpsertBulk", + "line": 1261 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanUpsertBulk) SetDeletedAt(v time.Time) *PlanUpsertBulk", + "line": 1268 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanUpsertBulk) UpdateDeletedAt() *PlanUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanUpsertBulk) ClearDeletedAt() *PlanUpsertBulk", + "line": 1282 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanUpsertBulk) SetName(v string) *PlanUpsertBulk", + "line": 1289 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanUpsertBulk) UpdateName() *PlanUpsertBulk", + "line": 1296 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanUpsertBulk) SetDescription(v string) *PlanUpsertBulk", + "line": 1303 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanUpsertBulk) UpdateDescription() *PlanUpsertBulk", + "line": 1310 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanUpsertBulk) ClearDescription() *PlanUpsertBulk", + "line": 1317 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (u *PlanUpsertBulk) SetVersion(v int) *PlanUpsertBulk", + "line": 1324 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (u *PlanUpsertBulk) AddVersion(v int) *PlanUpsertBulk", + "line": 1331 + }, + { + "kind": "func", + "name": "UpdateVersion", + "signature": "func (u *PlanUpsertBulk) UpdateVersion() *PlanUpsertBulk", + "line": 1338 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanUpsertBulk) SetBillingCadence(v datetime.ISODurationString) *PlanUpsertBulk", + "line": 1345 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanUpsertBulk) UpdateBillingCadence() *PlanUpsertBulk", + "line": 1352 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *PlanUpsertBulk) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanUpsertBulk", + "line": 1359 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *PlanUpsertBulk) UpdateProRatingConfig() *PlanUpsertBulk", + "line": 1366 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (u *PlanUpsertBulk) SetEffectiveFrom(v time.Time) *PlanUpsertBulk", + "line": 1373 + }, + { + "kind": "func", + "name": "UpdateEffectiveFrom", + "signature": "func (u *PlanUpsertBulk) UpdateEffectiveFrom() *PlanUpsertBulk", + "line": 1380 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (u *PlanUpsertBulk) ClearEffectiveFrom() *PlanUpsertBulk", + "line": 1387 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (u *PlanUpsertBulk) SetEffectiveTo(v time.Time) *PlanUpsertBulk", + "line": 1394 + }, + { + "kind": "func", + "name": "UpdateEffectiveTo", + "signature": "func (u *PlanUpsertBulk) UpdateEffectiveTo() *PlanUpsertBulk", + "line": 1401 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (u *PlanUpsertBulk) ClearEffectiveTo() *PlanUpsertBulk", + "line": 1408 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (u *PlanUpsertBulk) SetSettlementMode(v productcatalog.SettlementMode) *PlanUpsertBulk", + "line": 1415 + }, + { + "kind": "func", + "name": "UpdateSettlementMode", + "signature": "func (u *PlanUpsertBulk) UpdateSettlementMode() *PlanUpsertBulk", + "line": 1422 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanUpsertBulk) Exec(ctx context.Context) error", + "line": 1429 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanUpsertBulk) ExecX(ctx context.Context)", + "line": 1445 + } + ], + "line_count": 1449 + }, + "openmeter/ent/db/plan_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanDelete", + "signature": "type PlanDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanDelete) Where(ps ...predicate.Plan) *PlanDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *PlanDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "PlanDeleteOne", + "signature": "type PlanDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanDeleteOne) Where(ps ...predicate.Plan) *PlanDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/plan_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanQuery", + "signature": "type PlanQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *PlanQuery) Where(ps ...predicate.Plan) *PlanQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *PlanQuery) Limit(limit int) *PlanQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *PlanQuery) Offset(offset int) *PlanQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *PlanQuery) Unique(unique bool) *PlanQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *PlanQuery) Order(o ...plan.OrderOption) *PlanQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QueryPhases", + "signature": "func (_q *PlanQuery) QueryPhases() *PlanPhaseQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryAddons", + "signature": "func (_q *PlanQuery) QueryAddons() *PlanAddonQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QuerySubscriptions", + "signature": "func (_q *PlanQuery) QuerySubscriptions() *SubscriptionQuery", + "line": 115 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *PlanQuery) First(ctx context.Context) (*Plan, error)", + "line": 138 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *PlanQuery) FirstX(ctx context.Context) *Plan", + "line": 150 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *PlanQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *PlanQuery) FirstIDX(ctx context.Context) string", + "line": 173 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *PlanQuery) Only(ctx context.Context) (*Plan, error)", + "line": 184 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *PlanQuery) OnlyX(ctx context.Context) *Plan", + "line": 200 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *PlanQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *PlanQuery) OnlyIDX(ctx context.Context) string", + "line": 228 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *PlanQuery) All(ctx context.Context) ([]*Plan, error)", + "line": 237 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *PlanQuery) AllX(ctx context.Context) []*Plan", + "line": 247 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *PlanQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *PlanQuery) IDsX(ctx context.Context) []string", + "line": 268 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *PlanQuery) Count(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *PlanQuery) CountX(ctx context.Context) int", + "line": 286 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *PlanQuery) Exist(ctx context.Context) (bool, error)", + "line": 295 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *PlanQuery) ExistX(ctx context.Context) bool", + "line": 308 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *PlanQuery) Clone() *PlanQuery", + "line": 318 + }, + { + "kind": "func", + "name": "WithPhases", + "signature": "func (_q *PlanQuery) WithPhases(opts ...func(*PlanPhaseQuery)) *PlanQuery", + "line": 339 + }, + { + "kind": "func", + "name": "WithAddons", + "signature": "func (_q *PlanQuery) WithAddons(opts ...func(*PlanAddonQuery)) *PlanQuery", + "line": 350 + }, + { + "kind": "func", + "name": "WithSubscriptions", + "signature": "func (_q *PlanQuery) WithSubscriptions(opts ...func(*SubscriptionQuery)) *PlanQuery", + "line": 361 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *PlanQuery) GroupBy(field string, fields ...string) *PlanGroupBy", + "line": 384 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *PlanQuery) Select(fields ...string) *PlanSelect", + "line": 405 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *PlanQuery) Aggregate(fns ...AggregateFunc) *PlanSelect", + "line": 414 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *PlanQuery) prepareQuery(ctx context.Context) error", + "line": 418 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *PlanQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Plan, error)", + "line": 444 + }, + { + "kind": "func", + "name": "loadPhases", + "signature": "func (_q *PlanQuery) loadPhases(ctx context.Context, query *PlanPhaseQuery, nodes []*Plan, init func(*Plan), assign func(*Plan, *PlanPhase)) error", + "line": 499 + }, + { + "kind": "func", + "name": "loadAddons", + "signature": "func (_q *PlanQuery) loadAddons(ctx context.Context, query *PlanAddonQuery, nodes []*Plan, init func(*Plan), assign func(*Plan, *PlanAddon)) error", + "line": 529 + }, + { + "kind": "func", + "name": "loadSubscriptions", + "signature": "func (_q *PlanQuery) loadSubscriptions(ctx context.Context, query *SubscriptionQuery, nodes []*Plan, init func(*Plan), assign func(*Plan, *Subscription)) error", + "line": 559 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *PlanQuery) sqlCount(ctx context.Context) (int, error)", + "line": 593 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *PlanQuery) querySpec() *sqlgraph.QuerySpec", + "line": 605 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *PlanQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 645 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *PlanQuery) ForUpdate(opts ...sql.LockOption) *PlanQuery", + "line": 683 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *PlanQuery) ForShare(opts ...sql.LockOption) *PlanQuery", + "line": 696 + }, + { + "kind": "struct", + "name": "PlanGroupBy", + "signature": "type PlanGroupBy struct", + "line": 707 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *PlanGroupBy) Aggregate(fns ...AggregateFunc) *PlanGroupBy", + "line": 713 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *PlanGroupBy) Scan(ctx context.Context, v any) error", + "line": 719 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *PlanGroupBy) sqlScan(ctx context.Context, root *PlanQuery, v any) error", + "line": 727 + }, + { + "kind": "struct", + "name": "PlanSelect", + "signature": "type PlanSelect struct", + "line": 755 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *PlanSelect) Aggregate(fns ...AggregateFunc) *PlanSelect", + "line": 761 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *PlanSelect) Scan(ctx context.Context, v any) error", + "line": 767 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *PlanSelect) sqlScan(ctx context.Context, root *PlanQuery, v any) error", + "line": 775 + } + ], + "line_count": 794 + }, + "openmeter/ent/db/plan_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanUpdate", + "signature": "type PlanUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanUpdate) Where(ps ...predicate.Plan) *PlanUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanUpdate) SetMetadata(v map[string]string) *PlanUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanUpdate) ClearMetadata() *PlanUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanUpdate) SetUpdatedAt(v time.Time) *PlanUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanUpdate) SetDeletedAt(v time.Time) *PlanUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanUpdate) SetNillableDeletedAt(v *time.Time) *PlanUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanUpdate) ClearDeletedAt() *PlanUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanUpdate) SetName(v string) *PlanUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanUpdate) SetNillableName(v *string) *PlanUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanUpdate) SetDescription(v string) *PlanUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanUpdate) SetNillableDescription(v *string) *PlanUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanUpdate) ClearDescription() *PlanUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_u *PlanUpdate) SetVersion(v int) *PlanUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableVersion", + "signature": "func (_u *PlanUpdate) SetNillableVersion(v *int) *PlanUpdate", + "line": 116 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (_u *PlanUpdate) AddVersion(v int) *PlanUpdate", + "line": 124 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *PlanUpdate) SetBillingCadence(v datetime.ISODurationString) *PlanUpdate", + "line": 130 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *PlanUpdate) SetNillableBillingCadence(v *datetime.ISODurationString) *PlanUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_u *PlanUpdate) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_u *PlanUpdate) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *PlanUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *PlanUpdate) SetEffectiveFrom(v time.Time) *PlanUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *PlanUpdate) SetNillableEffectiveFrom(v *time.Time) *PlanUpdate", + "line": 164 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (_u *PlanUpdate) ClearEffectiveFrom() *PlanUpdate", + "line": 172 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *PlanUpdate) SetEffectiveTo(v time.Time) *PlanUpdate", + "line": 178 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *PlanUpdate) SetNillableEffectiveTo(v *time.Time) *PlanUpdate", + "line": 184 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *PlanUpdate) ClearEffectiveTo() *PlanUpdate", + "line": 192 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_u *PlanUpdate) SetSettlementMode(v productcatalog.SettlementMode) *PlanUpdate", + "line": 198 + }, + { + "kind": "func", + "name": "SetNillableSettlementMode", + "signature": "func (_u *PlanUpdate) SetNillableSettlementMode(v *productcatalog.SettlementMode) *PlanUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_u *PlanUpdate) AddPhaseIDs(ids ...string) *PlanUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_u *PlanUpdate) AddPhases(v ...*PlanPhase) *PlanUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_u *PlanUpdate) AddAddonIDs(ids ...string) *PlanUpdate", + "line": 227 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_u *PlanUpdate) AddAddons(v ...*PlanAddon) *PlanUpdate", + "line": 233 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_u *PlanUpdate) AddSubscriptionIDs(ids ...string) *PlanUpdate", + "line": 242 + }, + { + "kind": "func", + "name": "AddSubscriptions", + "signature": "func (_u *PlanUpdate) AddSubscriptions(v ...*Subscription) *PlanUpdate", + "line": 248 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanUpdate) Mutation() *PlanMutation", + "line": 257 + }, + { + "kind": "func", + "name": "ClearPhases", + "signature": "func (_u *PlanUpdate) ClearPhases() *PlanUpdate", + "line": 262 + }, + { + "kind": "func", + "name": "RemovePhaseIDs", + "signature": "func (_u *PlanUpdate) RemovePhaseIDs(ids ...string) *PlanUpdate", + "line": 268 + }, + { + "kind": "func", + "name": "RemovePhases", + "signature": "func (_u *PlanUpdate) RemovePhases(v ...*PlanPhase) *PlanUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "ClearAddons", + "signature": "func (_u *PlanUpdate) ClearAddons() *PlanUpdate", + "line": 283 + }, + { + "kind": "func", + "name": "RemoveAddonIDs", + "signature": "func (_u *PlanUpdate) RemoveAddonIDs(ids ...string) *PlanUpdate", + "line": 289 + }, + { + "kind": "func", + "name": "RemoveAddons", + "signature": "func (_u *PlanUpdate) RemoveAddons(v ...*PlanAddon) *PlanUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "ClearSubscriptions", + "signature": "func (_u *PlanUpdate) ClearSubscriptions() *PlanUpdate", + "line": 304 + }, + { + "kind": "func", + "name": "RemoveSubscriptionIDs", + "signature": "func (_u *PlanUpdate) RemoveSubscriptionIDs(ids ...string) *PlanUpdate", + "line": 310 + }, + { + "kind": "func", + "name": "RemoveSubscriptions", + "signature": "func (_u *PlanUpdate) RemoveSubscriptions(v ...*Subscription) *PlanUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanUpdate) Save(ctx context.Context) (int, error)", + "line": 325 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanUpdate) SaveX(ctx context.Context) int", + "line": 331 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanUpdate) Exec(ctx context.Context) error", + "line": 340 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanUpdate) ExecX(ctx context.Context)", + "line": 346 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanUpdate) defaults()", + "line": 353 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanUpdate) check() error", + "line": 361 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 380 + }, + { + "kind": "struct", + "name": "PlanUpdateOne", + "signature": "type PlanUpdateOne struct", + "line": 595 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanUpdateOne) SetMetadata(v map[string]string) *PlanUpdateOne", + "line": 603 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanUpdateOne) ClearMetadata() *PlanUpdateOne", + "line": 609 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanUpdateOne) SetUpdatedAt(v time.Time) *PlanUpdateOne", + "line": 615 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanUpdateOne) SetDeletedAt(v time.Time) *PlanUpdateOne", + "line": 621 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanUpdateOne) SetNillableDeletedAt(v *time.Time) *PlanUpdateOne", + "line": 627 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanUpdateOne) ClearDeletedAt() *PlanUpdateOne", + "line": 635 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanUpdateOne) SetName(v string) *PlanUpdateOne", + "line": 641 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanUpdateOne) SetNillableName(v *string) *PlanUpdateOne", + "line": 647 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanUpdateOne) SetDescription(v string) *PlanUpdateOne", + "line": 655 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanUpdateOne) SetNillableDescription(v *string) *PlanUpdateOne", + "line": 661 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanUpdateOne) ClearDescription() *PlanUpdateOne", + "line": 669 + }, + { + "kind": "func", + "name": "SetVersion", + "signature": "func (_u *PlanUpdateOne) SetVersion(v int) *PlanUpdateOne", + "line": 675 + }, + { + "kind": "func", + "name": "SetNillableVersion", + "signature": "func (_u *PlanUpdateOne) SetNillableVersion(v *int) *PlanUpdateOne", + "line": 682 + }, + { + "kind": "func", + "name": "AddVersion", + "signature": "func (_u *PlanUpdateOne) AddVersion(v int) *PlanUpdateOne", + "line": 690 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *PlanUpdateOne) SetBillingCadence(v datetime.ISODurationString) *PlanUpdateOne", + "line": 696 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *PlanUpdateOne) SetNillableBillingCadence(v *datetime.ISODurationString) *PlanUpdateOne", + "line": 702 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_u *PlanUpdateOne) SetProRatingConfig(v productcatalog.ProRatingConfig) *PlanUpdateOne", + "line": 710 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_u *PlanUpdateOne) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *PlanUpdateOne", + "line": 716 + }, + { + "kind": "func", + "name": "SetEffectiveFrom", + "signature": "func (_u *PlanUpdateOne) SetEffectiveFrom(v time.Time) *PlanUpdateOne", + "line": 724 + }, + { + "kind": "func", + "name": "SetNillableEffectiveFrom", + "signature": "func (_u *PlanUpdateOne) SetNillableEffectiveFrom(v *time.Time) *PlanUpdateOne", + "line": 730 + }, + { + "kind": "func", + "name": "ClearEffectiveFrom", + "signature": "func (_u *PlanUpdateOne) ClearEffectiveFrom() *PlanUpdateOne", + "line": 738 + }, + { + "kind": "func", + "name": "SetEffectiveTo", + "signature": "func (_u *PlanUpdateOne) SetEffectiveTo(v time.Time) *PlanUpdateOne", + "line": 744 + }, + { + "kind": "func", + "name": "SetNillableEffectiveTo", + "signature": "func (_u *PlanUpdateOne) SetNillableEffectiveTo(v *time.Time) *PlanUpdateOne", + "line": 750 + }, + { + "kind": "func", + "name": "ClearEffectiveTo", + "signature": "func (_u *PlanUpdateOne) ClearEffectiveTo() *PlanUpdateOne", + "line": 758 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_u *PlanUpdateOne) SetSettlementMode(v productcatalog.SettlementMode) *PlanUpdateOne", + "line": 764 + }, + { + "kind": "func", + "name": "SetNillableSettlementMode", + "signature": "func (_u *PlanUpdateOne) SetNillableSettlementMode(v *productcatalog.SettlementMode) *PlanUpdateOne", + "line": 770 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_u *PlanUpdateOne) AddPhaseIDs(ids ...string) *PlanUpdateOne", + "line": 778 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_u *PlanUpdateOne) AddPhases(v ...*PlanPhase) *PlanUpdateOne", + "line": 784 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_u *PlanUpdateOne) AddAddonIDs(ids ...string) *PlanUpdateOne", + "line": 793 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_u *PlanUpdateOne) AddAddons(v ...*PlanAddon) *PlanUpdateOne", + "line": 799 + }, + { + "kind": "func", + "name": "AddSubscriptionIDs", + "signature": "func (_u *PlanUpdateOne) AddSubscriptionIDs(ids ...string) *PlanUpdateOne", + "line": 808 + }, + { + "kind": "func", + "name": "AddSubscriptions", + "signature": "func (_u *PlanUpdateOne) AddSubscriptions(v ...*Subscription) *PlanUpdateOne", + "line": 814 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanUpdateOne) Mutation() *PlanMutation", + "line": 823 + }, + { + "kind": "func", + "name": "ClearPhases", + "signature": "func (_u *PlanUpdateOne) ClearPhases() *PlanUpdateOne", + "line": 828 + }, + { + "kind": "func", + "name": "RemovePhaseIDs", + "signature": "func (_u *PlanUpdateOne) RemovePhaseIDs(ids ...string) *PlanUpdateOne", + "line": 834 + }, + { + "kind": "func", + "name": "RemovePhases", + "signature": "func (_u *PlanUpdateOne) RemovePhases(v ...*PlanPhase) *PlanUpdateOne", + "line": 840 + }, + { + "kind": "func", + "name": "ClearAddons", + "signature": "func (_u *PlanUpdateOne) ClearAddons() *PlanUpdateOne", + "line": 849 + }, + { + "kind": "func", + "name": "RemoveAddonIDs", + "signature": "func (_u *PlanUpdateOne) RemoveAddonIDs(ids ...string) *PlanUpdateOne", + "line": 855 + }, + { + "kind": "func", + "name": "RemoveAddons", + "signature": "func (_u *PlanUpdateOne) RemoveAddons(v ...*PlanAddon) *PlanUpdateOne", + "line": 861 + }, + { + "kind": "func", + "name": "ClearSubscriptions", + "signature": "func (_u *PlanUpdateOne) ClearSubscriptions() *PlanUpdateOne", + "line": 870 + }, + { + "kind": "func", + "name": "RemoveSubscriptionIDs", + "signature": "func (_u *PlanUpdateOne) RemoveSubscriptionIDs(ids ...string) *PlanUpdateOne", + "line": 876 + }, + { + "kind": "func", + "name": "RemoveSubscriptions", + "signature": "func (_u *PlanUpdateOne) RemoveSubscriptions(v ...*Subscription) *PlanUpdateOne", + "line": 882 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanUpdateOne) Where(ps ...predicate.Plan) *PlanUpdateOne", + "line": 891 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *PlanUpdateOne) Select(field string, fields ...string) *PlanUpdateOne", + "line": 898 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanUpdateOne) Save(ctx context.Context) (*Plan, error)", + "line": 904 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanUpdateOne) SaveX(ctx context.Context) *Plan", + "line": 910 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanUpdateOne) Exec(ctx context.Context) error", + "line": 919 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanUpdateOne) ExecX(ctx context.Context)", + "line": 925 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanUpdateOne) defaults()", + "line": 932 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanUpdateOne) check() error", + "line": 940 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanUpdateOne) sqlSave(ctx context.Context) (_node *Plan, err error)", + "line": 959 + } + ], + "line_count": 1191 + }, + "openmeter/ent/db/planaddon.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddon", + "signature": "type PlanAddon struct", + "line": 20 + }, + { + "kind": "struct", + "name": "PlanAddonEdges", + "signature": "type PlanAddonEdges struct", + "line": 51 + }, + { + "kind": "func", + "name": "PlanOrErr", + "signature": "func (e PlanAddonEdges) PlanOrErr() (*Plan, error)", + "line": 63 + }, + { + "kind": "func", + "name": "AddonOrErr", + "signature": "func (e PlanAddonEdges) AddonOrErr() (*Addon, error)", + "line": 74 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *PlanAddon) assignValues(columns []string, values []any) error", + "line": 105 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *PlanAddon) Value(name string) (ent.Value, error)", + "line": 192 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_m *PlanAddon) QueryPlan() *PlanQuery", + "line": 197 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_m *PlanAddon) QueryAddon() *AddonQuery", + "line": 202 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *PlanAddon) Update() *PlanAddonUpdateOne", + "line": 209 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *PlanAddon) Unwrap() *PlanAddon", + "line": 215 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *PlanAddon) String() string", + "line": 225 + } + ], + "line_count": 267 + }, + "openmeter/ent/db/planaddon/planaddon.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 110 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByPlanID", + "signature": "func ByPlanID(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "ByAddonID", + "signature": "func ByAddonID(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "ByFromPlanPhase", + "signature": "func ByFromPlanPhase(opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByMaxQuantity", + "signature": "func ByMaxQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 145 + }, + { + "kind": "func", + "name": "ByPlanField", + "signature": "func ByPlanField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 150 + }, + { + "kind": "func", + "name": "ByAddonField", + "signature": "func ByAddonField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 157 + }, + { + "kind": "func", + "name": "newPlanStep", + "signature": "func newPlanStep() *sqlgraph.Step", + "line": 162 + }, + { + "kind": "func", + "name": "newAddonStep", + "signature": "func newAddonStep() *sqlgraph.Step", + "line": 169 + } + ], + "line_count": 175 + }, + "openmeter/ent/db/planaddon/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.PlanAddon", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.PlanAddon", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.PlanAddon", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.PlanAddon", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.PlanAddon", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.PlanAddon", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.PlanAddon", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.PlanAddon", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.PlanAddon", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.PlanAddon", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.PlanAddon", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.PlanAddon", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.PlanAddon", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.PlanAddon", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.PlanAddon", + "line": 84 + }, + { + "kind": "func", + "name": "PlanID", + "signature": "func PlanID(v string) predicate.PlanAddon", + "line": 89 + }, + { + "kind": "func", + "name": "AddonID", + "signature": "func AddonID(v string) predicate.PlanAddon", + "line": 94 + }, + { + "kind": "func", + "name": "FromPlanPhase", + "signature": "func FromPlanPhase(v string) predicate.PlanAddon", + "line": 99 + }, + { + "kind": "func", + "name": "MaxQuantity", + "signature": "func MaxQuantity(v int) predicate.PlanAddon", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.PlanAddon", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.PlanAddon", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.PlanAddon", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.PlanAddon", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.PlanAddon", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.PlanAddon", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.PlanAddon", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.PlanAddon", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.PlanAddon", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.PlanAddon", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.PlanAddon", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.PlanAddon", + "line": 164 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.PlanAddon", + "line": 169 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.PlanAddon", + "line": 174 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.PlanAddon", + "line": 179 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.PlanAddon", + "line": 184 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.PlanAddon", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.PlanAddon", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.PlanAddon", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.PlanAddon", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.PlanAddon", + "line": 209 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.PlanAddon", + "line": 214 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.PlanAddon", + "line": 219 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.PlanAddon", + "line": 224 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.PlanAddon", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.PlanAddon", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.PlanAddon", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.PlanAddon", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.PlanAddon", + "line": 249 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.PlanAddon", + "line": 254 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.PlanAddon", + "line": 259 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.PlanAddon", + "line": 264 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.PlanAddon", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.PlanAddon", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.PlanAddon", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.PlanAddon", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.PlanAddon", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.PlanAddon", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.PlanAddon", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.PlanAddon", + "line": 304 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.PlanAddon", + "line": 309 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.PlanAddon", + "line": 314 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.PlanAddon", + "line": 319 + }, + { + "kind": "func", + "name": "PlanIDEQ", + "signature": "func PlanIDEQ(v string) predicate.PlanAddon", + "line": 324 + }, + { + "kind": "func", + "name": "PlanIDNEQ", + "signature": "func PlanIDNEQ(v string) predicate.PlanAddon", + "line": 329 + }, + { + "kind": "func", + "name": "PlanIDIn", + "signature": "func PlanIDIn(vs ...string) predicate.PlanAddon", + "line": 334 + }, + { + "kind": "func", + "name": "PlanIDNotIn", + "signature": "func PlanIDNotIn(vs ...string) predicate.PlanAddon", + "line": 339 + }, + { + "kind": "func", + "name": "PlanIDGT", + "signature": "func PlanIDGT(v string) predicate.PlanAddon", + "line": 344 + }, + { + "kind": "func", + "name": "PlanIDGTE", + "signature": "func PlanIDGTE(v string) predicate.PlanAddon", + "line": 349 + }, + { + "kind": "func", + "name": "PlanIDLT", + "signature": "func PlanIDLT(v string) predicate.PlanAddon", + "line": 354 + }, + { + "kind": "func", + "name": "PlanIDLTE", + "signature": "func PlanIDLTE(v string) predicate.PlanAddon", + "line": 359 + }, + { + "kind": "func", + "name": "PlanIDContains", + "signature": "func PlanIDContains(v string) predicate.PlanAddon", + "line": 364 + }, + { + "kind": "func", + "name": "PlanIDHasPrefix", + "signature": "func PlanIDHasPrefix(v string) predicate.PlanAddon", + "line": 369 + }, + { + "kind": "func", + "name": "PlanIDHasSuffix", + "signature": "func PlanIDHasSuffix(v string) predicate.PlanAddon", + "line": 374 + }, + { + "kind": "func", + "name": "PlanIDEqualFold", + "signature": "func PlanIDEqualFold(v string) predicate.PlanAddon", + "line": 379 + }, + { + "kind": "func", + "name": "PlanIDContainsFold", + "signature": "func PlanIDContainsFold(v string) predicate.PlanAddon", + "line": 384 + }, + { + "kind": "func", + "name": "AddonIDEQ", + "signature": "func AddonIDEQ(v string) predicate.PlanAddon", + "line": 389 + }, + { + "kind": "func", + "name": "AddonIDNEQ", + "signature": "func AddonIDNEQ(v string) predicate.PlanAddon", + "line": 394 + }, + { + "kind": "func", + "name": "AddonIDIn", + "signature": "func AddonIDIn(vs ...string) predicate.PlanAddon", + "line": 399 + }, + { + "kind": "func", + "name": "AddonIDNotIn", + "signature": "func AddonIDNotIn(vs ...string) predicate.PlanAddon", + "line": 404 + }, + { + "kind": "func", + "name": "AddonIDGT", + "signature": "func AddonIDGT(v string) predicate.PlanAddon", + "line": 409 + }, + { + "kind": "func", + "name": "AddonIDGTE", + "signature": "func AddonIDGTE(v string) predicate.PlanAddon", + "line": 414 + }, + { + "kind": "func", + "name": "AddonIDLT", + "signature": "func AddonIDLT(v string) predicate.PlanAddon", + "line": 419 + }, + { + "kind": "func", + "name": "AddonIDLTE", + "signature": "func AddonIDLTE(v string) predicate.PlanAddon", + "line": 424 + }, + { + "kind": "func", + "name": "AddonIDContains", + "signature": "func AddonIDContains(v string) predicate.PlanAddon", + "line": 429 + }, + { + "kind": "func", + "name": "AddonIDHasPrefix", + "signature": "func AddonIDHasPrefix(v string) predicate.PlanAddon", + "line": 434 + }, + { + "kind": "func", + "name": "AddonIDHasSuffix", + "signature": "func AddonIDHasSuffix(v string) predicate.PlanAddon", + "line": 439 + }, + { + "kind": "func", + "name": "AddonIDEqualFold", + "signature": "func AddonIDEqualFold(v string) predicate.PlanAddon", + "line": 444 + }, + { + "kind": "func", + "name": "AddonIDContainsFold", + "signature": "func AddonIDContainsFold(v string) predicate.PlanAddon", + "line": 449 + }, + { + "kind": "func", + "name": "FromPlanPhaseEQ", + "signature": "func FromPlanPhaseEQ(v string) predicate.PlanAddon", + "line": 454 + }, + { + "kind": "func", + "name": "FromPlanPhaseNEQ", + "signature": "func FromPlanPhaseNEQ(v string) predicate.PlanAddon", + "line": 459 + }, + { + "kind": "func", + "name": "FromPlanPhaseIn", + "signature": "func FromPlanPhaseIn(vs ...string) predicate.PlanAddon", + "line": 464 + }, + { + "kind": "func", + "name": "FromPlanPhaseNotIn", + "signature": "func FromPlanPhaseNotIn(vs ...string) predicate.PlanAddon", + "line": 469 + }, + { + "kind": "func", + "name": "FromPlanPhaseGT", + "signature": "func FromPlanPhaseGT(v string) predicate.PlanAddon", + "line": 474 + }, + { + "kind": "func", + "name": "FromPlanPhaseGTE", + "signature": "func FromPlanPhaseGTE(v string) predicate.PlanAddon", + "line": 479 + }, + { + "kind": "func", + "name": "FromPlanPhaseLT", + "signature": "func FromPlanPhaseLT(v string) predicate.PlanAddon", + "line": 484 + }, + { + "kind": "func", + "name": "FromPlanPhaseLTE", + "signature": "func FromPlanPhaseLTE(v string) predicate.PlanAddon", + "line": 489 + }, + { + "kind": "func", + "name": "FromPlanPhaseContains", + "signature": "func FromPlanPhaseContains(v string) predicate.PlanAddon", + "line": 494 + }, + { + "kind": "func", + "name": "FromPlanPhaseHasPrefix", + "signature": "func FromPlanPhaseHasPrefix(v string) predicate.PlanAddon", + "line": 499 + }, + { + "kind": "func", + "name": "FromPlanPhaseHasSuffix", + "signature": "func FromPlanPhaseHasSuffix(v string) predicate.PlanAddon", + "line": 504 + }, + { + "kind": "func", + "name": "FromPlanPhaseEqualFold", + "signature": "func FromPlanPhaseEqualFold(v string) predicate.PlanAddon", + "line": 509 + }, + { + "kind": "func", + "name": "FromPlanPhaseContainsFold", + "signature": "func FromPlanPhaseContainsFold(v string) predicate.PlanAddon", + "line": 514 + }, + { + "kind": "func", + "name": "MaxQuantityEQ", + "signature": "func MaxQuantityEQ(v int) predicate.PlanAddon", + "line": 519 + }, + { + "kind": "func", + "name": "MaxQuantityNEQ", + "signature": "func MaxQuantityNEQ(v int) predicate.PlanAddon", + "line": 524 + }, + { + "kind": "func", + "name": "MaxQuantityIn", + "signature": "func MaxQuantityIn(vs ...int) predicate.PlanAddon", + "line": 529 + }, + { + "kind": "func", + "name": "MaxQuantityNotIn", + "signature": "func MaxQuantityNotIn(vs ...int) predicate.PlanAddon", + "line": 534 + }, + { + "kind": "func", + "name": "MaxQuantityGT", + "signature": "func MaxQuantityGT(v int) predicate.PlanAddon", + "line": 539 + }, + { + "kind": "func", + "name": "MaxQuantityGTE", + "signature": "func MaxQuantityGTE(v int) predicate.PlanAddon", + "line": 544 + }, + { + "kind": "func", + "name": "MaxQuantityLT", + "signature": "func MaxQuantityLT(v int) predicate.PlanAddon", + "line": 549 + }, + { + "kind": "func", + "name": "MaxQuantityLTE", + "signature": "func MaxQuantityLTE(v int) predicate.PlanAddon", + "line": 554 + }, + { + "kind": "func", + "name": "MaxQuantityIsNil", + "signature": "func MaxQuantityIsNil() predicate.PlanAddon", + "line": 559 + }, + { + "kind": "func", + "name": "MaxQuantityNotNil", + "signature": "func MaxQuantityNotNil() predicate.PlanAddon", + "line": 564 + }, + { + "kind": "func", + "name": "HasPlan", + "signature": "func HasPlan() predicate.PlanAddon", + "line": 569 + }, + { + "kind": "func", + "name": "HasPlanWith", + "signature": "func HasPlanWith(preds ...predicate.Plan) predicate.PlanAddon", + "line": 580 + }, + { + "kind": "func", + "name": "HasAddon", + "signature": "func HasAddon() predicate.PlanAddon", + "line": 592 + }, + { + "kind": "func", + "name": "HasAddonWith", + "signature": "func HasAddonWith(preds ...predicate.Addon) predicate.PlanAddon", + "line": 603 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.PlanAddon) predicate.PlanAddon", + "line": 615 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.PlanAddon) predicate.PlanAddon", + "line": 620 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.PlanAddon) predicate.PlanAddon", + "line": 625 + } + ], + "line_count": 627 + }, + "openmeter/ent/db/planaddon_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddonCreate", + "signature": "type PlanAddonCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *PlanAddonCreate) SetNamespace(v string) *PlanAddonCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *PlanAddonCreate) SetMetadata(v map[string]string) *PlanAddonCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *PlanAddonCreate) SetAnnotations(v models.Annotations) *PlanAddonCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *PlanAddonCreate) SetCreatedAt(v time.Time) *PlanAddonCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *PlanAddonCreate) SetNillableCreatedAt(v *time.Time) *PlanAddonCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *PlanAddonCreate) SetUpdatedAt(v time.Time) *PlanAddonCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *PlanAddonCreate) SetNillableUpdatedAt(v *time.Time) *PlanAddonCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *PlanAddonCreate) SetDeletedAt(v time.Time) *PlanAddonCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *PlanAddonCreate) SetNillableDeletedAt(v *time.Time) *PlanAddonCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_c *PlanAddonCreate) SetPlanID(v string) *PlanAddonCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (_c *PlanAddonCreate) SetAddonID(v string) *PlanAddonCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (_c *PlanAddonCreate) SetFromPlanPhase(v string) *PlanAddonCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (_c *PlanAddonCreate) SetMaxQuantity(v int) *PlanAddonCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableMaxQuantity", + "signature": "func (_c *PlanAddonCreate) SetNillableMaxQuantity(v *int) *PlanAddonCreate", + "line": 114 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *PlanAddonCreate) SetID(v string) *PlanAddonCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *PlanAddonCreate) SetNillableID(v *string) *PlanAddonCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_c *PlanAddonCreate) SetPlan(v *Plan) *PlanAddonCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetAddon", + "signature": "func (_c *PlanAddonCreate) SetAddon(v *Addon) *PlanAddonCreate", + "line": 141 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *PlanAddonCreate) Mutation() *PlanAddonMutation", + "line": 146 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanAddonCreate) Save(ctx context.Context) (*PlanAddon, error)", + "line": 151 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanAddonCreate) SaveX(ctx context.Context) *PlanAddon", + "line": 157 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanAddonCreate) Exec(ctx context.Context) error", + "line": 166 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanAddonCreate) ExecX(ctx context.Context)", + "line": 172 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *PlanAddonCreate) defaults()", + "line": 179 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *PlanAddonCreate) check() error", + "line": 195 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *PlanAddonCreate) sqlSave(ctx context.Context) (*PlanAddon, error)", + "line": 238 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *PlanAddonCreate) createSpec() (*PlanAddon, *sqlgraph.CreateSpec)", + "line": 261 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanAddonCreate) OnConflict(opts ...sql.ConflictOption) *PlanAddonUpsertOne", + "line": 356 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanAddonCreate) OnConflictColumns(columns ...string) *PlanAddonUpsertOne", + "line": 369 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanAddonUpsert) SetMetadata(v map[string]string) *PlanAddonUpsert", + "line": 390 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanAddonUpsert) UpdateMetadata() *PlanAddonUpsert", + "line": 396 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanAddonUpsert) ClearMetadata() *PlanAddonUpsert", + "line": 402 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *PlanAddonUpsert) SetAnnotations(v models.Annotations) *PlanAddonUpsert", + "line": 408 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *PlanAddonUpsert) UpdateAnnotations() *PlanAddonUpsert", + "line": 414 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *PlanAddonUpsert) ClearAnnotations() *PlanAddonUpsert", + "line": 420 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanAddonUpsert) SetUpdatedAt(v time.Time) *PlanAddonUpsert", + "line": 426 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanAddonUpsert) UpdateUpdatedAt() *PlanAddonUpsert", + "line": 432 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanAddonUpsert) SetDeletedAt(v time.Time) *PlanAddonUpsert", + "line": 438 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanAddonUpsert) UpdateDeletedAt() *PlanAddonUpsert", + "line": 444 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanAddonUpsert) ClearDeletedAt() *PlanAddonUpsert", + "line": 450 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (u *PlanAddonUpsert) SetFromPlanPhase(v string) *PlanAddonUpsert", + "line": 456 + }, + { + "kind": "func", + "name": "UpdateFromPlanPhase", + "signature": "func (u *PlanAddonUpsert) UpdateFromPlanPhase() *PlanAddonUpsert", + "line": 462 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (u *PlanAddonUpsert) SetMaxQuantity(v int) *PlanAddonUpsert", + "line": 468 + }, + { + "kind": "func", + "name": "UpdateMaxQuantity", + "signature": "func (u *PlanAddonUpsert) UpdateMaxQuantity() *PlanAddonUpsert", + "line": 474 + }, + { + "kind": "func", + "name": "AddMaxQuantity", + "signature": "func (u *PlanAddonUpsert) AddMaxQuantity(v int) *PlanAddonUpsert", + "line": 480 + }, + { + "kind": "func", + "name": "ClearMaxQuantity", + "signature": "func (u *PlanAddonUpsert) ClearMaxQuantity() *PlanAddonUpsert", + "line": 486 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanAddonUpsertOne) UpdateNewValues() *PlanAddonUpsertOne", + "line": 502 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanAddonUpsertOne) Ignore() *PlanAddonUpsertOne", + "line": 530 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanAddonUpsertOne) DoNothing() *PlanAddonUpsertOne", + "line": 537 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanAddonUpsertOne) Update(set func(*PlanAddonUpsert)) *PlanAddonUpsertOne", + "line": 544 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanAddonUpsertOne) SetMetadata(v map[string]string) *PlanAddonUpsertOne", + "line": 552 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanAddonUpsertOne) UpdateMetadata() *PlanAddonUpsertOne", + "line": 559 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanAddonUpsertOne) ClearMetadata() *PlanAddonUpsertOne", + "line": 566 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *PlanAddonUpsertOne) SetAnnotations(v models.Annotations) *PlanAddonUpsertOne", + "line": 573 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *PlanAddonUpsertOne) UpdateAnnotations() *PlanAddonUpsertOne", + "line": 580 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *PlanAddonUpsertOne) ClearAnnotations() *PlanAddonUpsertOne", + "line": 587 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanAddonUpsertOne) SetUpdatedAt(v time.Time) *PlanAddonUpsertOne", + "line": 594 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanAddonUpsertOne) UpdateUpdatedAt() *PlanAddonUpsertOne", + "line": 601 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanAddonUpsertOne) SetDeletedAt(v time.Time) *PlanAddonUpsertOne", + "line": 608 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanAddonUpsertOne) UpdateDeletedAt() *PlanAddonUpsertOne", + "line": 615 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanAddonUpsertOne) ClearDeletedAt() *PlanAddonUpsertOne", + "line": 622 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (u *PlanAddonUpsertOne) SetFromPlanPhase(v string) *PlanAddonUpsertOne", + "line": 629 + }, + { + "kind": "func", + "name": "UpdateFromPlanPhase", + "signature": "func (u *PlanAddonUpsertOne) UpdateFromPlanPhase() *PlanAddonUpsertOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (u *PlanAddonUpsertOne) SetMaxQuantity(v int) *PlanAddonUpsertOne", + "line": 643 + }, + { + "kind": "func", + "name": "AddMaxQuantity", + "signature": "func (u *PlanAddonUpsertOne) AddMaxQuantity(v int) *PlanAddonUpsertOne", + "line": 650 + }, + { + "kind": "func", + "name": "UpdateMaxQuantity", + "signature": "func (u *PlanAddonUpsertOne) UpdateMaxQuantity() *PlanAddonUpsertOne", + "line": 657 + }, + { + "kind": "func", + "name": "ClearMaxQuantity", + "signature": "func (u *PlanAddonUpsertOne) ClearMaxQuantity() *PlanAddonUpsertOne", + "line": 664 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanAddonUpsertOne) Exec(ctx context.Context) error", + "line": 671 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanAddonUpsertOne) ExecX(ctx context.Context)", + "line": 679 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *PlanAddonUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 686 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *PlanAddonUpsertOne) IDX(ctx context.Context) string", + "line": 700 + }, + { + "kind": "struct", + "name": "PlanAddonCreateBulk", + "signature": "type PlanAddonCreateBulk struct", + "line": 709 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanAddonCreateBulk) Save(ctx context.Context) ([]*PlanAddon, error)", + "line": 717 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanAddonCreateBulk) SaveX(ctx context.Context) []*PlanAddon", + "line": 773 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanAddonCreateBulk) Exec(ctx context.Context) error", + "line": 782 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanAddonCreateBulk) ExecX(ctx context.Context)", + "line": 788 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanAddonCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlanAddonUpsertBulk", + "line": 809 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanAddonCreateBulk) OnConflictColumns(columns ...string) *PlanAddonUpsertBulk", + "line": 822 + }, + { + "kind": "struct", + "name": "PlanAddonUpsertBulk", + "signature": "type PlanAddonUpsertBulk struct", + "line": 831 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanAddonUpsertBulk) UpdateNewValues() *PlanAddonUpsertBulk", + "line": 846 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanAddonUpsertBulk) Ignore() *PlanAddonUpsertBulk", + "line": 876 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanAddonUpsertBulk) DoNothing() *PlanAddonUpsertBulk", + "line": 883 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanAddonUpsertBulk) Update(set func(*PlanAddonUpsert)) *PlanAddonUpsertBulk", + "line": 890 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanAddonUpsertBulk) SetMetadata(v map[string]string) *PlanAddonUpsertBulk", + "line": 898 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanAddonUpsertBulk) UpdateMetadata() *PlanAddonUpsertBulk", + "line": 905 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanAddonUpsertBulk) ClearMetadata() *PlanAddonUpsertBulk", + "line": 912 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *PlanAddonUpsertBulk) SetAnnotations(v models.Annotations) *PlanAddonUpsertBulk", + "line": 919 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *PlanAddonUpsertBulk) UpdateAnnotations() *PlanAddonUpsertBulk", + "line": 926 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *PlanAddonUpsertBulk) ClearAnnotations() *PlanAddonUpsertBulk", + "line": 933 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanAddonUpsertBulk) SetUpdatedAt(v time.Time) *PlanAddonUpsertBulk", + "line": 940 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanAddonUpsertBulk) UpdateUpdatedAt() *PlanAddonUpsertBulk", + "line": 947 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanAddonUpsertBulk) SetDeletedAt(v time.Time) *PlanAddonUpsertBulk", + "line": 954 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanAddonUpsertBulk) UpdateDeletedAt() *PlanAddonUpsertBulk", + "line": 961 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanAddonUpsertBulk) ClearDeletedAt() *PlanAddonUpsertBulk", + "line": 968 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (u *PlanAddonUpsertBulk) SetFromPlanPhase(v string) *PlanAddonUpsertBulk", + "line": 975 + }, + { + "kind": "func", + "name": "UpdateFromPlanPhase", + "signature": "func (u *PlanAddonUpsertBulk) UpdateFromPlanPhase() *PlanAddonUpsertBulk", + "line": 982 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (u *PlanAddonUpsertBulk) SetMaxQuantity(v int) *PlanAddonUpsertBulk", + "line": 989 + }, + { + "kind": "func", + "name": "AddMaxQuantity", + "signature": "func (u *PlanAddonUpsertBulk) AddMaxQuantity(v int) *PlanAddonUpsertBulk", + "line": 996 + }, + { + "kind": "func", + "name": "UpdateMaxQuantity", + "signature": "func (u *PlanAddonUpsertBulk) UpdateMaxQuantity() *PlanAddonUpsertBulk", + "line": 1003 + }, + { + "kind": "func", + "name": "ClearMaxQuantity", + "signature": "func (u *PlanAddonUpsertBulk) ClearMaxQuantity() *PlanAddonUpsertBulk", + "line": 1010 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanAddonUpsertBulk) Exec(ctx context.Context) error", + "line": 1017 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanAddonUpsertBulk) ExecX(ctx context.Context)", + "line": 1033 + } + ], + "line_count": 1037 + }, + "openmeter/ent/db/planaddon_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddonDelete", + "signature": "type PlanAddonDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanAddonDelete) Where(ps ...predicate.PlanAddon) *PlanAddonDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanAddonDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanAddonDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *PlanAddonDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "PlanAddonDeleteOne", + "signature": "type PlanAddonDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanAddonDeleteOne) Where(ps ...predicate.PlanAddon) *PlanAddonDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanAddonDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanAddonDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/planaddon_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddonQuery", + "signature": "type PlanAddonQuery struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *PlanAddonQuery) Where(ps ...predicate.PlanAddon) *PlanAddonQuery", + "line": 37 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *PlanAddonQuery) Limit(limit int) *PlanAddonQuery", + "line": 43 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *PlanAddonQuery) Offset(offset int) *PlanAddonQuery", + "line": 49 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *PlanAddonQuery) Unique(unique bool) *PlanAddonQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *PlanAddonQuery) Order(o ...planaddon.OrderOption) *PlanAddonQuery", + "line": 62 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_q *PlanAddonQuery) QueryPlan() *PlanQuery", + "line": 68 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_q *PlanAddonQuery) QueryAddon() *AddonQuery", + "line": 90 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *PlanAddonQuery) First(ctx context.Context) (*PlanAddon, error)", + "line": 113 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *PlanAddonQuery) FirstX(ctx context.Context) *PlanAddon", + "line": 125 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *PlanAddonQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 135 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *PlanAddonQuery) FirstIDX(ctx context.Context) string", + "line": 148 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *PlanAddonQuery) Only(ctx context.Context) (*PlanAddon, error)", + "line": 159 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *PlanAddonQuery) OnlyX(ctx context.Context) *PlanAddon", + "line": 175 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *PlanAddonQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 186 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *PlanAddonQuery) OnlyIDX(ctx context.Context) string", + "line": 203 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *PlanAddonQuery) All(ctx context.Context) ([]*PlanAddon, error)", + "line": 212 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *PlanAddonQuery) AllX(ctx context.Context) []*PlanAddon", + "line": 222 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *PlanAddonQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 231 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *PlanAddonQuery) IDsX(ctx context.Context) []string", + "line": 243 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *PlanAddonQuery) Count(ctx context.Context) (int, error)", + "line": 252 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *PlanAddonQuery) CountX(ctx context.Context) int", + "line": 261 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *PlanAddonQuery) Exist(ctx context.Context) (bool, error)", + "line": 270 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *PlanAddonQuery) ExistX(ctx context.Context) bool", + "line": 283 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *PlanAddonQuery) Clone() *PlanAddonQuery", + "line": 293 + }, + { + "kind": "func", + "name": "WithPlan", + "signature": "func (_q *PlanAddonQuery) WithPlan(opts ...func(*PlanQuery)) *PlanAddonQuery", + "line": 313 + }, + { + "kind": "func", + "name": "WithAddon", + "signature": "func (_q *PlanAddonQuery) WithAddon(opts ...func(*AddonQuery)) *PlanAddonQuery", + "line": 324 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *PlanAddonQuery) GroupBy(field string, fields ...string) *PlanAddonGroupBy", + "line": 347 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *PlanAddonQuery) Select(fields ...string) *PlanAddonSelect", + "line": 368 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *PlanAddonQuery) Aggregate(fns ...AggregateFunc) *PlanAddonSelect", + "line": 377 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *PlanAddonQuery) prepareQuery(ctx context.Context) error", + "line": 381 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *PlanAddonQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*PlanAddon, error)", + "line": 407 + }, + { + "kind": "func", + "name": "loadPlan", + "signature": "func (_q *PlanAddonQuery) loadPlan(ctx context.Context, query *PlanQuery, nodes []*PlanAddon, init func(*PlanAddon), assign func(*PlanAddon, *Plan)) error", + "line": 452 + }, + { + "kind": "func", + "name": "loadAddon", + "signature": "func (_q *PlanAddonQuery) loadAddon(ctx context.Context, query *AddonQuery, nodes []*PlanAddon, init func(*PlanAddon), assign func(*PlanAddon, *Addon)) error", + "line": 481 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *PlanAddonQuery) sqlCount(ctx context.Context) (int, error)", + "line": 511 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *PlanAddonQuery) querySpec() *sqlgraph.QuerySpec", + "line": 523 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *PlanAddonQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *PlanAddonQuery) ForUpdate(opts ...sql.LockOption) *PlanAddonQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *PlanAddonQuery) ForShare(opts ...sql.LockOption) *PlanAddonQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "PlanAddonGroupBy", + "signature": "type PlanAddonGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *PlanAddonGroupBy) Aggregate(fns ...AggregateFunc) *PlanAddonGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *PlanAddonGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *PlanAddonGroupBy) sqlScan(ctx context.Context, root *PlanAddonQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "PlanAddonSelect", + "signature": "type PlanAddonSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *PlanAddonSelect) Aggregate(fns ...AggregateFunc) *PlanAddonSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *PlanAddonSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *PlanAddonSelect) sqlScan(ctx context.Context, root *PlanAddonQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/planaddon_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddonUpdate", + "signature": "type PlanAddonUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanAddonUpdate) Where(ps ...predicate.PlanAddon) *PlanAddonUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanAddonUpdate) SetMetadata(v map[string]string) *PlanAddonUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanAddonUpdate) ClearMetadata() *PlanAddonUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *PlanAddonUpdate) SetAnnotations(v models.Annotations) *PlanAddonUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *PlanAddonUpdate) ClearAnnotations() *PlanAddonUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanAddonUpdate) SetUpdatedAt(v time.Time) *PlanAddonUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanAddonUpdate) SetDeletedAt(v time.Time) *PlanAddonUpdate", + "line": 63 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanAddonUpdate) SetNillableDeletedAt(v *time.Time) *PlanAddonUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanAddonUpdate) ClearDeletedAt() *PlanAddonUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (_u *PlanAddonUpdate) SetFromPlanPhase(v string) *PlanAddonUpdate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableFromPlanPhase", + "signature": "func (_u *PlanAddonUpdate) SetNillableFromPlanPhase(v *string) *PlanAddonUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (_u *PlanAddonUpdate) SetMaxQuantity(v int) *PlanAddonUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "SetNillableMaxQuantity", + "signature": "func (_u *PlanAddonUpdate) SetNillableMaxQuantity(v *int) *PlanAddonUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "AddMaxQuantity", + "signature": "func (_u *PlanAddonUpdate) AddMaxQuantity(v int) *PlanAddonUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "ClearMaxQuantity", + "signature": "func (_u *PlanAddonUpdate) ClearMaxQuantity() *PlanAddonUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanAddonUpdate) Mutation() *PlanAddonMutation", + "line": 124 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanAddonUpdate) Save(ctx context.Context) (int, error)", + "line": 129 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanAddonUpdate) SaveX(ctx context.Context) int", + "line": 135 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanAddonUpdate) Exec(ctx context.Context) error", + "line": 144 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanAddonUpdate) ExecX(ctx context.Context)", + "line": 150 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanAddonUpdate) defaults()", + "line": 157 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanAddonUpdate) check() error", + "line": 165 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanAddonUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 175 + }, + { + "kind": "struct", + "name": "PlanAddonUpdateOne", + "signature": "type PlanAddonUpdateOne struct", + "line": 233 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanAddonUpdateOne) SetMetadata(v map[string]string) *PlanAddonUpdateOne", + "line": 241 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanAddonUpdateOne) ClearMetadata() *PlanAddonUpdateOne", + "line": 247 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *PlanAddonUpdateOne) SetAnnotations(v models.Annotations) *PlanAddonUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *PlanAddonUpdateOne) ClearAnnotations() *PlanAddonUpdateOne", + "line": 259 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanAddonUpdateOne) SetUpdatedAt(v time.Time) *PlanAddonUpdateOne", + "line": 265 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanAddonUpdateOne) SetDeletedAt(v time.Time) *PlanAddonUpdateOne", + "line": 271 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanAddonUpdateOne) SetNillableDeletedAt(v *time.Time) *PlanAddonUpdateOne", + "line": 277 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanAddonUpdateOne) ClearDeletedAt() *PlanAddonUpdateOne", + "line": 285 + }, + { + "kind": "func", + "name": "SetFromPlanPhase", + "signature": "func (_u *PlanAddonUpdateOne) SetFromPlanPhase(v string) *PlanAddonUpdateOne", + "line": 291 + }, + { + "kind": "func", + "name": "SetNillableFromPlanPhase", + "signature": "func (_u *PlanAddonUpdateOne) SetNillableFromPlanPhase(v *string) *PlanAddonUpdateOne", + "line": 297 + }, + { + "kind": "func", + "name": "SetMaxQuantity", + "signature": "func (_u *PlanAddonUpdateOne) SetMaxQuantity(v int) *PlanAddonUpdateOne", + "line": 305 + }, + { + "kind": "func", + "name": "SetNillableMaxQuantity", + "signature": "func (_u *PlanAddonUpdateOne) SetNillableMaxQuantity(v *int) *PlanAddonUpdateOne", + "line": 312 + }, + { + "kind": "func", + "name": "AddMaxQuantity", + "signature": "func (_u *PlanAddonUpdateOne) AddMaxQuantity(v int) *PlanAddonUpdateOne", + "line": 320 + }, + { + "kind": "func", + "name": "ClearMaxQuantity", + "signature": "func (_u *PlanAddonUpdateOne) ClearMaxQuantity() *PlanAddonUpdateOne", + "line": 326 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanAddonUpdateOne) Mutation() *PlanAddonMutation", + "line": 332 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanAddonUpdateOne) Where(ps ...predicate.PlanAddon) *PlanAddonUpdateOne", + "line": 337 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *PlanAddonUpdateOne) Select(field string, fields ...string) *PlanAddonUpdateOne", + "line": 344 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanAddonUpdateOne) Save(ctx context.Context) (*PlanAddon, error)", + "line": 350 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanAddonUpdateOne) SaveX(ctx context.Context) *PlanAddon", + "line": 356 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanAddonUpdateOne) Exec(ctx context.Context) error", + "line": 365 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanAddonUpdateOne) ExecX(ctx context.Context)", + "line": 371 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanAddonUpdateOne) defaults()", + "line": 378 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanAddonUpdateOne) check() error", + "line": 386 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanAddonUpdateOne) sqlSave(ctx context.Context) (_node *PlanAddon, err error)", + "line": 396 + } + ], + "line_count": 471 + }, + "openmeter/ent/db/planphase.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanPhase", + "signature": "type PlanPhase struct", + "line": 19 + }, + { + "kind": "struct", + "name": "PlanPhaseEdges", + "signature": "type PlanPhaseEdges struct", + "line": 52 + }, + { + "kind": "func", + "name": "PlanOrErr", + "signature": "func (e PlanPhaseEdges) PlanOrErr() (*Plan, error)", + "line": 64 + }, + { + "kind": "func", + "name": "RatecardsOrErr", + "signature": "func (e PlanPhaseEdges) RatecardsOrErr() ([]*PlanRateCard, error)", + "line": 75 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *PlanPhase) assignValues(columns []string, values []any) error", + "line": 104 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *PlanPhase) Value(name string) (ent.Value, error)", + "line": 196 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_m *PlanPhase) QueryPlan() *PlanQuery", + "line": 201 + }, + { + "kind": "func", + "name": "QueryRatecards", + "signature": "func (_m *PlanPhase) QueryRatecards() *PlanRateCardQuery", + "line": 206 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *PlanPhase) Update() *PlanPhaseUpdateOne", + "line": 213 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *PlanPhase) Unwrap() *PlanPhase", + "line": 219 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *PlanPhase) String() string", + "line": 229 + } + ], + "line_count": 276 + }, + "openmeter/ent/db/planphase/planphase.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 78 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 118 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 123 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 128 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 133 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 138 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 143 + }, + { + "kind": "func", + "name": "ByPlanID", + "signature": "func ByPlanID(opts ...sql.OrderTermOption) OrderOption", + "line": 148 + }, + { + "kind": "func", + "name": "ByIndex", + "signature": "func ByIndex(opts ...sql.OrderTermOption) OrderOption", + "line": 153 + }, + { + "kind": "func", + "name": "ByDuration", + "signature": "func ByDuration(opts ...sql.OrderTermOption) OrderOption", + "line": 158 + }, + { + "kind": "func", + "name": "ByPlanField", + "signature": "func ByPlanField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 163 + }, + { + "kind": "func", + "name": "ByRatecardsCount", + "signature": "func ByRatecardsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByRatecards", + "signature": "func ByRatecards(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 177 + }, + { + "kind": "func", + "name": "newPlanStep", + "signature": "func newPlanStep() *sqlgraph.Step", + "line": 182 + }, + { + "kind": "func", + "name": "newRatecardsStep", + "signature": "func newRatecardsStep() *sqlgraph.Step", + "line": 189 + } + ], + "line_count": 195 + }, + "openmeter/ent/db/planphase/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.PlanPhase", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.PlanPhase", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.PlanPhase", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.PlanPhase", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.PlanPhase", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.PlanPhase", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.PlanPhase", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.PlanPhase", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.PlanPhase", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.PlanPhase", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.PlanPhase", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.PlanPhase", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.PlanPhase", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.PlanPhase", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.PlanPhase", + "line": 85 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.PlanPhase", + "line": 90 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.PlanPhase", + "line": 95 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.PlanPhase", + "line": 100 + }, + { + "kind": "func", + "name": "PlanID", + "signature": "func PlanID(v string) predicate.PlanPhase", + "line": 105 + }, + { + "kind": "func", + "name": "Index", + "signature": "func Index(v uint8) predicate.PlanPhase", + "line": 110 + }, + { + "kind": "func", + "name": "Duration", + "signature": "func Duration(v datetime.ISODurationString) predicate.PlanPhase", + "line": 115 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.PlanPhase", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.PlanPhase", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.PlanPhase", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.PlanPhase", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.PlanPhase", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.PlanPhase", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.PlanPhase", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.PlanPhase", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.PlanPhase", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.PlanPhase", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.PlanPhase", + "line": 171 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.PlanPhase", + "line": 176 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.PlanPhase", + "line": 181 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.PlanPhase", + "line": 186 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.PlanPhase", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.PlanPhase", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.PlanPhase", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.PlanPhase", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.PlanPhase", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.PlanPhase", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.PlanPhase", + "line": 221 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.PlanPhase", + "line": 226 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.PlanPhase", + "line": 231 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.PlanPhase", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.PlanPhase", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.PlanPhase", + "line": 246 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.PlanPhase", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.PlanPhase", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.PlanPhase", + "line": 261 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.PlanPhase", + "line": 266 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.PlanPhase", + "line": 271 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.PlanPhase", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.PlanPhase", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.PlanPhase", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.PlanPhase", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.PlanPhase", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.PlanPhase", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.PlanPhase", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.PlanPhase", + "line": 311 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.PlanPhase", + "line": 316 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.PlanPhase", + "line": 321 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.PlanPhase", + "line": 326 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.PlanPhase", + "line": 331 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.PlanPhase", + "line": 336 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.PlanPhase", + "line": 341 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.PlanPhase", + "line": 346 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.PlanPhase", + "line": 351 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.PlanPhase", + "line": 356 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.PlanPhase", + "line": 361 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.PlanPhase", + "line": 366 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.PlanPhase", + "line": 371 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.PlanPhase", + "line": 376 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.PlanPhase", + "line": 381 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.PlanPhase", + "line": 386 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.PlanPhase", + "line": 391 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.PlanPhase", + "line": 396 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.PlanPhase", + "line": 401 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.PlanPhase", + "line": 406 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.PlanPhase", + "line": 411 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.PlanPhase", + "line": 416 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.PlanPhase", + "line": 421 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.PlanPhase", + "line": 426 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.PlanPhase", + "line": 431 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.PlanPhase", + "line": 436 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.PlanPhase", + "line": 441 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.PlanPhase", + "line": 446 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.PlanPhase", + "line": 451 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.PlanPhase", + "line": 456 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.PlanPhase", + "line": 461 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.PlanPhase", + "line": 466 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.PlanPhase", + "line": 471 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.PlanPhase", + "line": 476 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.PlanPhase", + "line": 481 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.PlanPhase", + "line": 486 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.PlanPhase", + "line": 491 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.PlanPhase", + "line": 496 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.PlanPhase", + "line": 501 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.PlanPhase", + "line": 506 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.PlanPhase", + "line": 511 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.PlanPhase", + "line": 516 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.PlanPhase", + "line": 521 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.PlanPhase", + "line": 526 + }, + { + "kind": "func", + "name": "PlanIDEQ", + "signature": "func PlanIDEQ(v string) predicate.PlanPhase", + "line": 531 + }, + { + "kind": "func", + "name": "PlanIDNEQ", + "signature": "func PlanIDNEQ(v string) predicate.PlanPhase", + "line": 536 + }, + { + "kind": "func", + "name": "PlanIDIn", + "signature": "func PlanIDIn(vs ...string) predicate.PlanPhase", + "line": 541 + }, + { + "kind": "func", + "name": "PlanIDNotIn", + "signature": "func PlanIDNotIn(vs ...string) predicate.PlanPhase", + "line": 546 + }, + { + "kind": "func", + "name": "PlanIDGT", + "signature": "func PlanIDGT(v string) predicate.PlanPhase", + "line": 551 + }, + { + "kind": "func", + "name": "PlanIDGTE", + "signature": "func PlanIDGTE(v string) predicate.PlanPhase", + "line": 556 + }, + { + "kind": "func", + "name": "PlanIDLT", + "signature": "func PlanIDLT(v string) predicate.PlanPhase", + "line": 561 + }, + { + "kind": "func", + "name": "PlanIDLTE", + "signature": "func PlanIDLTE(v string) predicate.PlanPhase", + "line": 566 + }, + { + "kind": "func", + "name": "PlanIDContains", + "signature": "func PlanIDContains(v string) predicate.PlanPhase", + "line": 571 + }, + { + "kind": "func", + "name": "PlanIDHasPrefix", + "signature": "func PlanIDHasPrefix(v string) predicate.PlanPhase", + "line": 576 + }, + { + "kind": "func", + "name": "PlanIDHasSuffix", + "signature": "func PlanIDHasSuffix(v string) predicate.PlanPhase", + "line": 581 + }, + { + "kind": "func", + "name": "PlanIDEqualFold", + "signature": "func PlanIDEqualFold(v string) predicate.PlanPhase", + "line": 586 + }, + { + "kind": "func", + "name": "PlanIDContainsFold", + "signature": "func PlanIDContainsFold(v string) predicate.PlanPhase", + "line": 591 + }, + { + "kind": "func", + "name": "IndexEQ", + "signature": "func IndexEQ(v uint8) predicate.PlanPhase", + "line": 596 + }, + { + "kind": "func", + "name": "IndexNEQ", + "signature": "func IndexNEQ(v uint8) predicate.PlanPhase", + "line": 601 + }, + { + "kind": "func", + "name": "IndexIn", + "signature": "func IndexIn(vs ...uint8) predicate.PlanPhase", + "line": 606 + }, + { + "kind": "func", + "name": "IndexNotIn", + "signature": "func IndexNotIn(vs ...uint8) predicate.PlanPhase", + "line": 611 + }, + { + "kind": "func", + "name": "IndexGT", + "signature": "func IndexGT(v uint8) predicate.PlanPhase", + "line": 616 + }, + { + "kind": "func", + "name": "IndexGTE", + "signature": "func IndexGTE(v uint8) predicate.PlanPhase", + "line": 621 + }, + { + "kind": "func", + "name": "IndexLT", + "signature": "func IndexLT(v uint8) predicate.PlanPhase", + "line": 626 + }, + { + "kind": "func", + "name": "IndexLTE", + "signature": "func IndexLTE(v uint8) predicate.PlanPhase", + "line": 631 + }, + { + "kind": "func", + "name": "DurationEQ", + "signature": "func DurationEQ(v datetime.ISODurationString) predicate.PlanPhase", + "line": 636 + }, + { + "kind": "func", + "name": "DurationNEQ", + "signature": "func DurationNEQ(v datetime.ISODurationString) predicate.PlanPhase", + "line": 642 + }, + { + "kind": "func", + "name": "DurationIn", + "signature": "func DurationIn(vs ...datetime.ISODurationString) predicate.PlanPhase", + "line": 648 + }, + { + "kind": "func", + "name": "DurationNotIn", + "signature": "func DurationNotIn(vs ...datetime.ISODurationString) predicate.PlanPhase", + "line": 657 + }, + { + "kind": "func", + "name": "DurationGT", + "signature": "func DurationGT(v datetime.ISODurationString) predicate.PlanPhase", + "line": 666 + }, + { + "kind": "func", + "name": "DurationGTE", + "signature": "func DurationGTE(v datetime.ISODurationString) predicate.PlanPhase", + "line": 672 + }, + { + "kind": "func", + "name": "DurationLT", + "signature": "func DurationLT(v datetime.ISODurationString) predicate.PlanPhase", + "line": 678 + }, + { + "kind": "func", + "name": "DurationLTE", + "signature": "func DurationLTE(v datetime.ISODurationString) predicate.PlanPhase", + "line": 684 + }, + { + "kind": "func", + "name": "DurationContains", + "signature": "func DurationContains(v datetime.ISODurationString) predicate.PlanPhase", + "line": 690 + }, + { + "kind": "func", + "name": "DurationHasPrefix", + "signature": "func DurationHasPrefix(v datetime.ISODurationString) predicate.PlanPhase", + "line": 696 + }, + { + "kind": "func", + "name": "DurationHasSuffix", + "signature": "func DurationHasSuffix(v datetime.ISODurationString) predicate.PlanPhase", + "line": 702 + }, + { + "kind": "func", + "name": "DurationIsNil", + "signature": "func DurationIsNil() predicate.PlanPhase", + "line": 708 + }, + { + "kind": "func", + "name": "DurationNotNil", + "signature": "func DurationNotNil() predicate.PlanPhase", + "line": 713 + }, + { + "kind": "func", + "name": "DurationEqualFold", + "signature": "func DurationEqualFold(v datetime.ISODurationString) predicate.PlanPhase", + "line": 718 + }, + { + "kind": "func", + "name": "DurationContainsFold", + "signature": "func DurationContainsFold(v datetime.ISODurationString) predicate.PlanPhase", + "line": 724 + }, + { + "kind": "func", + "name": "HasPlan", + "signature": "func HasPlan() predicate.PlanPhase", + "line": 730 + }, + { + "kind": "func", + "name": "HasPlanWith", + "signature": "func HasPlanWith(preds ...predicate.Plan) predicate.PlanPhase", + "line": 741 + }, + { + "kind": "func", + "name": "HasRatecards", + "signature": "func HasRatecards() predicate.PlanPhase", + "line": 753 + }, + { + "kind": "func", + "name": "HasRatecardsWith", + "signature": "func HasRatecardsWith(preds ...predicate.PlanRateCard) predicate.PlanPhase", + "line": 764 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.PlanPhase) predicate.PlanPhase", + "line": 776 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.PlanPhase) predicate.PlanPhase", + "line": 781 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.PlanPhase) predicate.PlanPhase", + "line": 786 + } + ], + "line_count": 788 + }, + "openmeter/ent/db/planphase_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanPhaseCreate", + "signature": "type PlanPhaseCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *PlanPhaseCreate) SetNamespace(v string) *PlanPhaseCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *PlanPhaseCreate) SetMetadata(v map[string]string) *PlanPhaseCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *PlanPhaseCreate) SetCreatedAt(v time.Time) *PlanPhaseCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *PlanPhaseCreate) SetNillableCreatedAt(v *time.Time) *PlanPhaseCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *PlanPhaseCreate) SetUpdatedAt(v time.Time) *PlanPhaseCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *PlanPhaseCreate) SetNillableUpdatedAt(v *time.Time) *PlanPhaseCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *PlanPhaseCreate) SetDeletedAt(v time.Time) *PlanPhaseCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *PlanPhaseCreate) SetNillableDeletedAt(v *time.Time) *PlanPhaseCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *PlanPhaseCreate) SetName(v string) *PlanPhaseCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *PlanPhaseCreate) SetDescription(v string) *PlanPhaseCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *PlanPhaseCreate) SetNillableDescription(v *string) *PlanPhaseCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *PlanPhaseCreate) SetKey(v string) *PlanPhaseCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_c *PlanPhaseCreate) SetPlanID(v string) *PlanPhaseCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_c *PlanPhaseCreate) SetIndex(v uint8) *PlanPhaseCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (_c *PlanPhaseCreate) SetDuration(v datetime.ISODurationString) *PlanPhaseCreate", + "line": 122 + }, + { + "kind": "func", + "name": "SetNillableDuration", + "signature": "func (_c *PlanPhaseCreate) SetNillableDuration(v *datetime.ISODurationString) *PlanPhaseCreate", + "line": 128 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *PlanPhaseCreate) SetID(v string) *PlanPhaseCreate", + "line": 136 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *PlanPhaseCreate) SetNillableID(v *string) *PlanPhaseCreate", + "line": 142 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_c *PlanPhaseCreate) SetPlan(v *Plan) *PlanPhaseCreate", + "line": 150 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_c *PlanPhaseCreate) AddRatecardIDs(ids ...string) *PlanPhaseCreate", + "line": 155 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_c *PlanPhaseCreate) AddRatecards(v ...*PlanRateCard) *PlanPhaseCreate", + "line": 161 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *PlanPhaseCreate) Mutation() *PlanPhaseMutation", + "line": 170 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanPhaseCreate) Save(ctx context.Context) (*PlanPhase, error)", + "line": 175 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanPhaseCreate) SaveX(ctx context.Context) *PlanPhase", + "line": 181 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanPhaseCreate) Exec(ctx context.Context) error", + "line": 190 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanPhaseCreate) ExecX(ctx context.Context)", + "line": 196 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *PlanPhaseCreate) defaults()", + "line": 203 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *PlanPhaseCreate) check() error", + "line": 219 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *PlanPhaseCreate) sqlSave(ctx context.Context) (*PlanPhase, error)", + "line": 262 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *PlanPhaseCreate) createSpec() (*PlanPhase, *sqlgraph.CreateSpec)", + "line": 285 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanPhaseCreate) OnConflict(opts ...sql.ConflictOption) *PlanPhaseUpsertOne", + "line": 387 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanPhaseCreate) OnConflictColumns(columns ...string) *PlanPhaseUpsertOne", + "line": 400 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanPhaseUpsert) SetMetadata(v map[string]string) *PlanPhaseUpsert", + "line": 421 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanPhaseUpsert) UpdateMetadata() *PlanPhaseUpsert", + "line": 427 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanPhaseUpsert) ClearMetadata() *PlanPhaseUpsert", + "line": 433 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanPhaseUpsert) SetUpdatedAt(v time.Time) *PlanPhaseUpsert", + "line": 439 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanPhaseUpsert) UpdateUpdatedAt() *PlanPhaseUpsert", + "line": 445 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanPhaseUpsert) SetDeletedAt(v time.Time) *PlanPhaseUpsert", + "line": 451 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanPhaseUpsert) UpdateDeletedAt() *PlanPhaseUpsert", + "line": 457 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanPhaseUpsert) ClearDeletedAt() *PlanPhaseUpsert", + "line": 463 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanPhaseUpsert) SetName(v string) *PlanPhaseUpsert", + "line": 469 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanPhaseUpsert) UpdateName() *PlanPhaseUpsert", + "line": 475 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanPhaseUpsert) SetDescription(v string) *PlanPhaseUpsert", + "line": 481 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanPhaseUpsert) UpdateDescription() *PlanPhaseUpsert", + "line": 487 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanPhaseUpsert) ClearDescription() *PlanPhaseUpsert", + "line": 493 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *PlanPhaseUpsert) SetPlanID(v string) *PlanPhaseUpsert", + "line": 499 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *PlanPhaseUpsert) UpdatePlanID() *PlanPhaseUpsert", + "line": 505 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *PlanPhaseUpsert) SetIndex(v uint8) *PlanPhaseUpsert", + "line": 511 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *PlanPhaseUpsert) UpdateIndex() *PlanPhaseUpsert", + "line": 517 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *PlanPhaseUpsert) AddIndex(v uint8) *PlanPhaseUpsert", + "line": 523 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (u *PlanPhaseUpsert) SetDuration(v datetime.ISODurationString) *PlanPhaseUpsert", + "line": 529 + }, + { + "kind": "func", + "name": "UpdateDuration", + "signature": "func (u *PlanPhaseUpsert) UpdateDuration() *PlanPhaseUpsert", + "line": 535 + }, + { + "kind": "func", + "name": "ClearDuration", + "signature": "func (u *PlanPhaseUpsert) ClearDuration() *PlanPhaseUpsert", + "line": 541 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanPhaseUpsertOne) UpdateNewValues() *PlanPhaseUpsertOne", + "line": 557 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanPhaseUpsertOne) Ignore() *PlanPhaseUpsertOne", + "line": 582 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanPhaseUpsertOne) DoNothing() *PlanPhaseUpsertOne", + "line": 589 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanPhaseUpsertOne) Update(set func(*PlanPhaseUpsert)) *PlanPhaseUpsertOne", + "line": 596 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanPhaseUpsertOne) SetMetadata(v map[string]string) *PlanPhaseUpsertOne", + "line": 604 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanPhaseUpsertOne) UpdateMetadata() *PlanPhaseUpsertOne", + "line": 611 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanPhaseUpsertOne) ClearMetadata() *PlanPhaseUpsertOne", + "line": 618 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanPhaseUpsertOne) SetUpdatedAt(v time.Time) *PlanPhaseUpsertOne", + "line": 625 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanPhaseUpsertOne) UpdateUpdatedAt() *PlanPhaseUpsertOne", + "line": 632 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanPhaseUpsertOne) SetDeletedAt(v time.Time) *PlanPhaseUpsertOne", + "line": 639 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanPhaseUpsertOne) UpdateDeletedAt() *PlanPhaseUpsertOne", + "line": 646 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanPhaseUpsertOne) ClearDeletedAt() *PlanPhaseUpsertOne", + "line": 653 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanPhaseUpsertOne) SetName(v string) *PlanPhaseUpsertOne", + "line": 660 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanPhaseUpsertOne) UpdateName() *PlanPhaseUpsertOne", + "line": 667 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanPhaseUpsertOne) SetDescription(v string) *PlanPhaseUpsertOne", + "line": 674 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanPhaseUpsertOne) UpdateDescription() *PlanPhaseUpsertOne", + "line": 681 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanPhaseUpsertOne) ClearDescription() *PlanPhaseUpsertOne", + "line": 688 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *PlanPhaseUpsertOne) SetPlanID(v string) *PlanPhaseUpsertOne", + "line": 695 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *PlanPhaseUpsertOne) UpdatePlanID() *PlanPhaseUpsertOne", + "line": 702 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *PlanPhaseUpsertOne) SetIndex(v uint8) *PlanPhaseUpsertOne", + "line": 709 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *PlanPhaseUpsertOne) AddIndex(v uint8) *PlanPhaseUpsertOne", + "line": 716 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *PlanPhaseUpsertOne) UpdateIndex() *PlanPhaseUpsertOne", + "line": 723 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (u *PlanPhaseUpsertOne) SetDuration(v datetime.ISODurationString) *PlanPhaseUpsertOne", + "line": 730 + }, + { + "kind": "func", + "name": "UpdateDuration", + "signature": "func (u *PlanPhaseUpsertOne) UpdateDuration() *PlanPhaseUpsertOne", + "line": 737 + }, + { + "kind": "func", + "name": "ClearDuration", + "signature": "func (u *PlanPhaseUpsertOne) ClearDuration() *PlanPhaseUpsertOne", + "line": 744 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanPhaseUpsertOne) Exec(ctx context.Context) error", + "line": 751 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanPhaseUpsertOne) ExecX(ctx context.Context)", + "line": 759 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *PlanPhaseUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 766 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *PlanPhaseUpsertOne) IDX(ctx context.Context) string", + "line": 780 + }, + { + "kind": "struct", + "name": "PlanPhaseCreateBulk", + "signature": "type PlanPhaseCreateBulk struct", + "line": 789 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanPhaseCreateBulk) Save(ctx context.Context) ([]*PlanPhase, error)", + "line": 797 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanPhaseCreateBulk) SaveX(ctx context.Context) []*PlanPhase", + "line": 853 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanPhaseCreateBulk) Exec(ctx context.Context) error", + "line": 862 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanPhaseCreateBulk) ExecX(ctx context.Context)", + "line": 868 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanPhaseCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlanPhaseUpsertBulk", + "line": 889 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanPhaseCreateBulk) OnConflictColumns(columns ...string) *PlanPhaseUpsertBulk", + "line": 902 + }, + { + "kind": "struct", + "name": "PlanPhaseUpsertBulk", + "signature": "type PlanPhaseUpsertBulk struct", + "line": 911 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateNewValues() *PlanPhaseUpsertBulk", + "line": 926 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanPhaseUpsertBulk) Ignore() *PlanPhaseUpsertBulk", + "line": 953 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanPhaseUpsertBulk) DoNothing() *PlanPhaseUpsertBulk", + "line": 960 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanPhaseUpsertBulk) Update(set func(*PlanPhaseUpsert)) *PlanPhaseUpsertBulk", + "line": 967 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanPhaseUpsertBulk) SetMetadata(v map[string]string) *PlanPhaseUpsertBulk", + "line": 975 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateMetadata() *PlanPhaseUpsertBulk", + "line": 982 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanPhaseUpsertBulk) ClearMetadata() *PlanPhaseUpsertBulk", + "line": 989 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanPhaseUpsertBulk) SetUpdatedAt(v time.Time) *PlanPhaseUpsertBulk", + "line": 996 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateUpdatedAt() *PlanPhaseUpsertBulk", + "line": 1003 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanPhaseUpsertBulk) SetDeletedAt(v time.Time) *PlanPhaseUpsertBulk", + "line": 1010 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateDeletedAt() *PlanPhaseUpsertBulk", + "line": 1017 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanPhaseUpsertBulk) ClearDeletedAt() *PlanPhaseUpsertBulk", + "line": 1024 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanPhaseUpsertBulk) SetName(v string) *PlanPhaseUpsertBulk", + "line": 1031 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateName() *PlanPhaseUpsertBulk", + "line": 1038 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanPhaseUpsertBulk) SetDescription(v string) *PlanPhaseUpsertBulk", + "line": 1045 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateDescription() *PlanPhaseUpsertBulk", + "line": 1052 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanPhaseUpsertBulk) ClearDescription() *PlanPhaseUpsertBulk", + "line": 1059 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *PlanPhaseUpsertBulk) SetPlanID(v string) *PlanPhaseUpsertBulk", + "line": 1066 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *PlanPhaseUpsertBulk) UpdatePlanID() *PlanPhaseUpsertBulk", + "line": 1073 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (u *PlanPhaseUpsertBulk) SetIndex(v uint8) *PlanPhaseUpsertBulk", + "line": 1080 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (u *PlanPhaseUpsertBulk) AddIndex(v uint8) *PlanPhaseUpsertBulk", + "line": 1087 + }, + { + "kind": "func", + "name": "UpdateIndex", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateIndex() *PlanPhaseUpsertBulk", + "line": 1094 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (u *PlanPhaseUpsertBulk) SetDuration(v datetime.ISODurationString) *PlanPhaseUpsertBulk", + "line": 1101 + }, + { + "kind": "func", + "name": "UpdateDuration", + "signature": "func (u *PlanPhaseUpsertBulk) UpdateDuration() *PlanPhaseUpsertBulk", + "line": 1108 + }, + { + "kind": "func", + "name": "ClearDuration", + "signature": "func (u *PlanPhaseUpsertBulk) ClearDuration() *PlanPhaseUpsertBulk", + "line": 1115 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanPhaseUpsertBulk) Exec(ctx context.Context) error", + "line": 1122 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanPhaseUpsertBulk) ExecX(ctx context.Context)", + "line": 1138 + } + ], + "line_count": 1142 + }, + "openmeter/ent/db/planphase_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanPhaseDelete", + "signature": "type PlanPhaseDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanPhaseDelete) Where(ps ...predicate.PlanPhase) *PlanPhaseDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanPhaseDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanPhaseDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *PlanPhaseDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "PlanPhaseDeleteOne", + "signature": "type PlanPhaseDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanPhaseDeleteOne) Where(ps ...predicate.PlanPhase) *PlanPhaseDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanPhaseDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanPhaseDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/planphase_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanPhaseQuery", + "signature": "type PlanPhaseQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *PlanPhaseQuery) Where(ps ...predicate.PlanPhase) *PlanPhaseQuery", + "line": 38 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *PlanPhaseQuery) Limit(limit int) *PlanPhaseQuery", + "line": 44 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *PlanPhaseQuery) Offset(offset int) *PlanPhaseQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *PlanPhaseQuery) Unique(unique bool) *PlanPhaseQuery", + "line": 57 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *PlanPhaseQuery) Order(o ...planphase.OrderOption) *PlanPhaseQuery", + "line": 63 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_q *PlanPhaseQuery) QueryPlan() *PlanQuery", + "line": 69 + }, + { + "kind": "func", + "name": "QueryRatecards", + "signature": "func (_q *PlanPhaseQuery) QueryRatecards() *PlanRateCardQuery", + "line": 91 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *PlanPhaseQuery) First(ctx context.Context) (*PlanPhase, error)", + "line": 114 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *PlanPhaseQuery) FirstX(ctx context.Context) *PlanPhase", + "line": 126 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *PlanPhaseQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 136 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *PlanPhaseQuery) FirstIDX(ctx context.Context) string", + "line": 149 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *PlanPhaseQuery) Only(ctx context.Context) (*PlanPhase, error)", + "line": 160 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *PlanPhaseQuery) OnlyX(ctx context.Context) *PlanPhase", + "line": 176 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *PlanPhaseQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 187 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *PlanPhaseQuery) OnlyIDX(ctx context.Context) string", + "line": 204 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *PlanPhaseQuery) All(ctx context.Context) ([]*PlanPhase, error)", + "line": 213 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *PlanPhaseQuery) AllX(ctx context.Context) []*PlanPhase", + "line": 223 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *PlanPhaseQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 232 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *PlanPhaseQuery) IDsX(ctx context.Context) []string", + "line": 244 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *PlanPhaseQuery) Count(ctx context.Context) (int, error)", + "line": 253 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *PlanPhaseQuery) CountX(ctx context.Context) int", + "line": 262 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *PlanPhaseQuery) Exist(ctx context.Context) (bool, error)", + "line": 271 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *PlanPhaseQuery) ExistX(ctx context.Context) bool", + "line": 284 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *PlanPhaseQuery) Clone() *PlanPhaseQuery", + "line": 294 + }, + { + "kind": "func", + "name": "WithPlan", + "signature": "func (_q *PlanPhaseQuery) WithPlan(opts ...func(*PlanQuery)) *PlanPhaseQuery", + "line": 314 + }, + { + "kind": "func", + "name": "WithRatecards", + "signature": "func (_q *PlanPhaseQuery) WithRatecards(opts ...func(*PlanRateCardQuery)) *PlanPhaseQuery", + "line": 325 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *PlanPhaseQuery) GroupBy(field string, fields ...string) *PlanPhaseGroupBy", + "line": 348 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *PlanPhaseQuery) Select(fields ...string) *PlanPhaseSelect", + "line": 369 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *PlanPhaseQuery) Aggregate(fns ...AggregateFunc) *PlanPhaseSelect", + "line": 378 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *PlanPhaseQuery) prepareQuery(ctx context.Context) error", + "line": 382 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *PlanPhaseQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*PlanPhase, error)", + "line": 408 + }, + { + "kind": "func", + "name": "loadPlan", + "signature": "func (_q *PlanPhaseQuery) loadPlan(ctx context.Context, query *PlanQuery, nodes []*PlanPhase, init func(*PlanPhase), assign func(*PlanPhase, *Plan)) error", + "line": 454 + }, + { + "kind": "func", + "name": "loadRatecards", + "signature": "func (_q *PlanPhaseQuery) loadRatecards(ctx context.Context, query *PlanRateCardQuery, nodes []*PlanPhase, init func(*PlanPhase), assign func(*PlanPhase, *PlanRateCard)) error", + "line": 483 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *PlanPhaseQuery) sqlCount(ctx context.Context) (int, error)", + "line": 514 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *PlanPhaseQuery) querySpec() *sqlgraph.QuerySpec", + "line": 526 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *PlanPhaseQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 569 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *PlanPhaseQuery) ForUpdate(opts ...sql.LockOption) *PlanPhaseQuery", + "line": 607 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *PlanPhaseQuery) ForShare(opts ...sql.LockOption) *PlanPhaseQuery", + "line": 620 + }, + { + "kind": "struct", + "name": "PlanPhaseGroupBy", + "signature": "type PlanPhaseGroupBy struct", + "line": 631 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *PlanPhaseGroupBy) Aggregate(fns ...AggregateFunc) *PlanPhaseGroupBy", + "line": 637 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *PlanPhaseGroupBy) Scan(ctx context.Context, v any) error", + "line": 643 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *PlanPhaseGroupBy) sqlScan(ctx context.Context, root *PlanPhaseQuery, v any) error", + "line": 651 + }, + { + "kind": "struct", + "name": "PlanPhaseSelect", + "signature": "type PlanPhaseSelect struct", + "line": 679 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *PlanPhaseSelect) Aggregate(fns ...AggregateFunc) *PlanPhaseSelect", + "line": 685 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *PlanPhaseSelect) Scan(ctx context.Context, v any) error", + "line": 691 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *PlanPhaseSelect) sqlScan(ctx context.Context, root *PlanPhaseQuery, v any) error", + "line": 699 + } + ], + "line_count": 718 + }, + "openmeter/ent/db/planphase_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanPhaseUpdate", + "signature": "type PlanPhaseUpdate struct", + "line": 22 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanPhaseUpdate) Where(ps ...predicate.PlanPhase) *PlanPhaseUpdate", + "line": 29 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanPhaseUpdate) SetMetadata(v map[string]string) *PlanPhaseUpdate", + "line": 35 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanPhaseUpdate) ClearMetadata() *PlanPhaseUpdate", + "line": 41 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanPhaseUpdate) SetUpdatedAt(v time.Time) *PlanPhaseUpdate", + "line": 47 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanPhaseUpdate) SetDeletedAt(v time.Time) *PlanPhaseUpdate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanPhaseUpdate) SetNillableDeletedAt(v *time.Time) *PlanPhaseUpdate", + "line": 59 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanPhaseUpdate) ClearDeletedAt() *PlanPhaseUpdate", + "line": 67 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanPhaseUpdate) SetName(v string) *PlanPhaseUpdate", + "line": 73 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanPhaseUpdate) SetNillableName(v *string) *PlanPhaseUpdate", + "line": 79 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanPhaseUpdate) SetDescription(v string) *PlanPhaseUpdate", + "line": 87 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanPhaseUpdate) SetNillableDescription(v *string) *PlanPhaseUpdate", + "line": 93 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanPhaseUpdate) ClearDescription() *PlanPhaseUpdate", + "line": 101 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_u *PlanPhaseUpdate) SetPlanID(v string) *PlanPhaseUpdate", + "line": 107 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_u *PlanPhaseUpdate) SetNillablePlanID(v *string) *PlanPhaseUpdate", + "line": 113 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *PlanPhaseUpdate) SetIndex(v uint8) *PlanPhaseUpdate", + "line": 121 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *PlanPhaseUpdate) SetNillableIndex(v *uint8) *PlanPhaseUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *PlanPhaseUpdate) AddIndex(v int8) *PlanPhaseUpdate", + "line": 136 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (_u *PlanPhaseUpdate) SetDuration(v datetime.ISODurationString) *PlanPhaseUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetNillableDuration", + "signature": "func (_u *PlanPhaseUpdate) SetNillableDuration(v *datetime.ISODurationString) *PlanPhaseUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "ClearDuration", + "signature": "func (_u *PlanPhaseUpdate) ClearDuration() *PlanPhaseUpdate", + "line": 156 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_u *PlanPhaseUpdate) SetPlan(v *Plan) *PlanPhaseUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *PlanPhaseUpdate) AddRatecardIDs(ids ...string) *PlanPhaseUpdate", + "line": 167 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_u *PlanPhaseUpdate) AddRatecards(v ...*PlanRateCard) *PlanPhaseUpdate", + "line": 173 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanPhaseUpdate) Mutation() *PlanPhaseMutation", + "line": 182 + }, + { + "kind": "func", + "name": "ClearPlan", + "signature": "func (_u *PlanPhaseUpdate) ClearPlan() *PlanPhaseUpdate", + "line": 187 + }, + { + "kind": "func", + "name": "ClearRatecards", + "signature": "func (_u *PlanPhaseUpdate) ClearRatecards() *PlanPhaseUpdate", + "line": 193 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *PlanPhaseUpdate) RemoveRatecardIDs(ids ...string) *PlanPhaseUpdate", + "line": 199 + }, + { + "kind": "func", + "name": "RemoveRatecards", + "signature": "func (_u *PlanPhaseUpdate) RemoveRatecards(v ...*PlanRateCard) *PlanPhaseUpdate", + "line": 205 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanPhaseUpdate) Save(ctx context.Context) (int, error)", + "line": 214 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanPhaseUpdate) SaveX(ctx context.Context) int", + "line": 220 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanPhaseUpdate) Exec(ctx context.Context) error", + "line": 229 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanPhaseUpdate) ExecX(ctx context.Context)", + "line": 235 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanPhaseUpdate) defaults()", + "line": 242 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanPhaseUpdate) check() error", + "line": 250 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanPhaseUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 262 + }, + { + "kind": "struct", + "name": "PlanPhaseUpdateOne", + "signature": "type PlanPhaseUpdateOne struct", + "line": 397 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanPhaseUpdateOne) SetMetadata(v map[string]string) *PlanPhaseUpdateOne", + "line": 405 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanPhaseUpdateOne) ClearMetadata() *PlanPhaseUpdateOne", + "line": 411 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanPhaseUpdateOne) SetUpdatedAt(v time.Time) *PlanPhaseUpdateOne", + "line": 417 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanPhaseUpdateOne) SetDeletedAt(v time.Time) *PlanPhaseUpdateOne", + "line": 423 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillableDeletedAt(v *time.Time) *PlanPhaseUpdateOne", + "line": 429 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanPhaseUpdateOne) ClearDeletedAt() *PlanPhaseUpdateOne", + "line": 437 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanPhaseUpdateOne) SetName(v string) *PlanPhaseUpdateOne", + "line": 443 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillableName(v *string) *PlanPhaseUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanPhaseUpdateOne) SetDescription(v string) *PlanPhaseUpdateOne", + "line": 457 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillableDescription(v *string) *PlanPhaseUpdateOne", + "line": 463 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanPhaseUpdateOne) ClearDescription() *PlanPhaseUpdateOne", + "line": 471 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_u *PlanPhaseUpdateOne) SetPlanID(v string) *PlanPhaseUpdateOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillablePlanID(v *string) *PlanPhaseUpdateOne", + "line": 483 + }, + { + "kind": "func", + "name": "SetIndex", + "signature": "func (_u *PlanPhaseUpdateOne) SetIndex(v uint8) *PlanPhaseUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "SetNillableIndex", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillableIndex(v *uint8) *PlanPhaseUpdateOne", + "line": 498 + }, + { + "kind": "func", + "name": "AddIndex", + "signature": "func (_u *PlanPhaseUpdateOne) AddIndex(v int8) *PlanPhaseUpdateOne", + "line": 506 + }, + { + "kind": "func", + "name": "SetDuration", + "signature": "func (_u *PlanPhaseUpdateOne) SetDuration(v datetime.ISODurationString) *PlanPhaseUpdateOne", + "line": 512 + }, + { + "kind": "func", + "name": "SetNillableDuration", + "signature": "func (_u *PlanPhaseUpdateOne) SetNillableDuration(v *datetime.ISODurationString) *PlanPhaseUpdateOne", + "line": 518 + }, + { + "kind": "func", + "name": "ClearDuration", + "signature": "func (_u *PlanPhaseUpdateOne) ClearDuration() *PlanPhaseUpdateOne", + "line": 526 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_u *PlanPhaseUpdateOne) SetPlan(v *Plan) *PlanPhaseUpdateOne", + "line": 532 + }, + { + "kind": "func", + "name": "AddRatecardIDs", + "signature": "func (_u *PlanPhaseUpdateOne) AddRatecardIDs(ids ...string) *PlanPhaseUpdateOne", + "line": 537 + }, + { + "kind": "func", + "name": "AddRatecards", + "signature": "func (_u *PlanPhaseUpdateOne) AddRatecards(v ...*PlanRateCard) *PlanPhaseUpdateOne", + "line": 543 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanPhaseUpdateOne) Mutation() *PlanPhaseMutation", + "line": 552 + }, + { + "kind": "func", + "name": "ClearPlan", + "signature": "func (_u *PlanPhaseUpdateOne) ClearPlan() *PlanPhaseUpdateOne", + "line": 557 + }, + { + "kind": "func", + "name": "ClearRatecards", + "signature": "func (_u *PlanPhaseUpdateOne) ClearRatecards() *PlanPhaseUpdateOne", + "line": 563 + }, + { + "kind": "func", + "name": "RemoveRatecardIDs", + "signature": "func (_u *PlanPhaseUpdateOne) RemoveRatecardIDs(ids ...string) *PlanPhaseUpdateOne", + "line": 569 + }, + { + "kind": "func", + "name": "RemoveRatecards", + "signature": "func (_u *PlanPhaseUpdateOne) RemoveRatecards(v ...*PlanRateCard) *PlanPhaseUpdateOne", + "line": 575 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanPhaseUpdateOne) Where(ps ...predicate.PlanPhase) *PlanPhaseUpdateOne", + "line": 584 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *PlanPhaseUpdateOne) Select(field string, fields ...string) *PlanPhaseUpdateOne", + "line": 591 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanPhaseUpdateOne) Save(ctx context.Context) (*PlanPhase, error)", + "line": 597 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanPhaseUpdateOne) SaveX(ctx context.Context) *PlanPhase", + "line": 603 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanPhaseUpdateOne) Exec(ctx context.Context) error", + "line": 612 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanPhaseUpdateOne) ExecX(ctx context.Context)", + "line": 618 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanPhaseUpdateOne) defaults()", + "line": 625 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanPhaseUpdateOne) check() error", + "line": 633 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanPhaseUpdateOne) sqlSave(ctx context.Context) (_node *PlanPhase, err error)", + "line": 645 + } + ], + "line_count": 797 + }, + "openmeter/ent/db/planratecard.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRateCard", + "signature": "type PlanRateCard struct", + "line": 22 + }, + { + "kind": "struct", + "name": "PlanRateCardEdges", + "signature": "type PlanRateCardEdges struct", + "line": 71 + }, + { + "kind": "func", + "name": "PhaseOrErr", + "signature": "func (e PlanRateCardEdges) PhaseOrErr() (*PlanPhase, error)", + "line": 85 + }, + { + "kind": "func", + "name": "FeaturesOrErr", + "signature": "func (e PlanRateCardEdges) FeaturesOrErr() (*Feature, error)", + "line": 96 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e PlanRateCardEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 107 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *PlanRateCard) assignValues(columns []string, values []any) error", + "line": 144 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *PlanRateCard) Value(name string) (ent.Value, error)", + "line": 288 + }, + { + "kind": "func", + "name": "QueryPhase", + "signature": "func (_m *PlanRateCard) QueryPhase() *PlanPhaseQuery", + "line": 293 + }, + { + "kind": "func", + "name": "QueryFeatures", + "signature": "func (_m *PlanRateCard) QueryFeatures() *FeatureQuery", + "line": 298 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *PlanRateCard) QueryTaxCode() *TaxCodeQuery", + "line": 303 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *PlanRateCard) Update() *PlanRateCardUpdateOne", + "line": 310 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *PlanRateCard) Unwrap() *PlanRateCard", + "line": 316 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *PlanRateCard) String() string", + "line": 326 + } + ], + "line_count": 413 + }, + "openmeter/ent/db/planratecard/planratecard.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 114 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 148 + }, + { + "kind": "func", + "name": "TypeValidator", + "signature": "func TypeValidator(_type productcatalog.RateCardType) error", + "line": 158 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 171 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 176 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 181 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 186 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 191 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 196 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 201 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 206 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 211 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 216 + }, + { + "kind": "func", + "name": "ByType", + "signature": "func ByType(opts ...sql.OrderTermOption) OrderOption", + "line": 221 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 226 + }, + { + "kind": "func", + "name": "ByEntitlementTemplate", + "signature": "func ByEntitlementTemplate(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByTaxConfig", + "signature": "func ByTaxConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByBillingCadence", + "signature": "func ByBillingCadence(opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 246 + }, + { + "kind": "func", + "name": "ByDiscounts", + "signature": "func ByDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByPhaseID", + "signature": "func ByPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 256 + }, + { + "kind": "func", + "name": "ByFeatureID", + "signature": "func ByFeatureID(opts ...sql.OrderTermOption) OrderOption", + "line": 261 + }, + { + "kind": "func", + "name": "ByPhaseField", + "signature": "func ByPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByFeaturesField", + "signature": "func ByFeaturesField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 280 + }, + { + "kind": "func", + "name": "newPhaseStep", + "signature": "func newPhaseStep() *sqlgraph.Step", + "line": 285 + }, + { + "kind": "func", + "name": "newFeaturesStep", + "signature": "func newFeaturesStep() *sqlgraph.Step", + "line": 292 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 299 + } + ], + "line_count": 305 + }, + "openmeter/ent/db/planratecard/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.PlanRateCard", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.PlanRateCard", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.PlanRateCard", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.PlanRateCard", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.PlanRateCard", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.PlanRateCard", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.PlanRateCard", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.PlanRateCard", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.PlanRateCard", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.PlanRateCard", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.PlanRateCard", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.PlanRateCard", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.PlanRateCard", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.PlanRateCard", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.PlanRateCard", + "line": 86 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.PlanRateCard", + "line": 91 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.PlanRateCard", + "line": 96 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.PlanRateCard", + "line": 101 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.PlanRateCard", + "line": 106 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.PlanRateCard", + "line": 111 + }, + { + "kind": "func", + "name": "BillingCadence", + "signature": "func BillingCadence(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 116 + }, + { + "kind": "func", + "name": "PhaseID", + "signature": "func PhaseID(v string) predicate.PlanRateCard", + "line": 122 + }, + { + "kind": "func", + "name": "FeatureID", + "signature": "func FeatureID(v string) predicate.PlanRateCard", + "line": 127 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.PlanRateCard", + "line": 132 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.PlanRateCard", + "line": 137 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.PlanRateCard", + "line": 142 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.PlanRateCard", + "line": 147 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.PlanRateCard", + "line": 152 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.PlanRateCard", + "line": 157 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.PlanRateCard", + "line": 162 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.PlanRateCard", + "line": 167 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.PlanRateCard", + "line": 172 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.PlanRateCard", + "line": 177 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.PlanRateCard", + "line": 182 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.PlanRateCard", + "line": 187 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.PlanRateCard", + "line": 192 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.PlanRateCard", + "line": 197 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.PlanRateCard", + "line": 202 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.PlanRateCard", + "line": 207 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.PlanRateCard", + "line": 212 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.PlanRateCard", + "line": 217 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.PlanRateCard", + "line": 222 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.PlanRateCard", + "line": 227 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.PlanRateCard", + "line": 232 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.PlanRateCard", + "line": 237 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.PlanRateCard", + "line": 242 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.PlanRateCard", + "line": 247 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.PlanRateCard", + "line": 252 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.PlanRateCard", + "line": 257 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.PlanRateCard", + "line": 262 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.PlanRateCard", + "line": 267 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.PlanRateCard", + "line": 272 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.PlanRateCard", + "line": 277 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.PlanRateCard", + "line": 282 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.PlanRateCard", + "line": 287 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.PlanRateCard", + "line": 292 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.PlanRateCard", + "line": 297 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.PlanRateCard", + "line": 302 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.PlanRateCard", + "line": 307 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.PlanRateCard", + "line": 312 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.PlanRateCard", + "line": 317 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.PlanRateCard", + "line": 322 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.PlanRateCard", + "line": 327 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.PlanRateCard", + "line": 332 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.PlanRateCard", + "line": 337 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.PlanRateCard", + "line": 342 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.PlanRateCard", + "line": 347 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.PlanRateCard", + "line": 352 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.PlanRateCard", + "line": 357 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.PlanRateCard", + "line": 362 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.PlanRateCard", + "line": 367 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.PlanRateCard", + "line": 372 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.PlanRateCard", + "line": 377 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.PlanRateCard", + "line": 382 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.PlanRateCard", + "line": 387 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.PlanRateCard", + "line": 392 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.PlanRateCard", + "line": 397 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.PlanRateCard", + "line": 402 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.PlanRateCard", + "line": 407 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.PlanRateCard", + "line": 412 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.PlanRateCard", + "line": 417 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.PlanRateCard", + "line": 422 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.PlanRateCard", + "line": 427 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.PlanRateCard", + "line": 432 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.PlanRateCard", + "line": 437 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.PlanRateCard", + "line": 442 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.PlanRateCard", + "line": 447 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.PlanRateCard", + "line": 452 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.PlanRateCard", + "line": 457 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.PlanRateCard", + "line": 462 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.PlanRateCard", + "line": 467 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.PlanRateCard", + "line": 472 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.PlanRateCard", + "line": 477 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.PlanRateCard", + "line": 482 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.PlanRateCard", + "line": 487 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.PlanRateCard", + "line": 492 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.PlanRateCard", + "line": 497 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.PlanRateCard", + "line": 502 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.PlanRateCard", + "line": 507 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.PlanRateCard", + "line": 512 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.PlanRateCard", + "line": 517 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.PlanRateCard", + "line": 522 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.PlanRateCard", + "line": 527 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.PlanRateCard", + "line": 532 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.PlanRateCard", + "line": 537 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.PlanRateCard", + "line": 542 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.PlanRateCard", + "line": 547 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.PlanRateCard", + "line": 552 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.PlanRateCard", + "line": 557 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.PlanRateCard", + "line": 562 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.PlanRateCard", + "line": 567 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.PlanRateCard", + "line": 572 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.PlanRateCard", + "line": 577 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.PlanRateCard", + "line": 582 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.PlanRateCard", + "line": 587 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.PlanRateCard", + "line": 592 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.PlanRateCard", + "line": 597 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.PlanRateCard", + "line": 602 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.PlanRateCard", + "line": 607 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.PlanRateCard", + "line": 612 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.PlanRateCard", + "line": 617 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.PlanRateCard", + "line": 623 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.PlanRateCard", + "line": 629 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.PlanRateCard", + "line": 638 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.PlanRateCard", + "line": 647 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.PlanRateCard", + "line": 652 + }, + { + "kind": "func", + "name": "TypeEQ", + "signature": "func TypeEQ(v productcatalog.RateCardType) predicate.PlanRateCard", + "line": 657 + }, + { + "kind": "func", + "name": "TypeNEQ", + "signature": "func TypeNEQ(v productcatalog.RateCardType) predicate.PlanRateCard", + "line": 663 + }, + { + "kind": "func", + "name": "TypeIn", + "signature": "func TypeIn(vs ...productcatalog.RateCardType) predicate.PlanRateCard", + "line": 669 + }, + { + "kind": "func", + "name": "TypeNotIn", + "signature": "func TypeNotIn(vs ...productcatalog.RateCardType) predicate.PlanRateCard", + "line": 678 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.PlanRateCard", + "line": 687 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.PlanRateCard", + "line": 692 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.PlanRateCard", + "line": 697 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.PlanRateCard", + "line": 702 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.PlanRateCard", + "line": 707 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.PlanRateCard", + "line": 712 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.PlanRateCard", + "line": 717 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.PlanRateCard", + "line": 722 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.PlanRateCard", + "line": 727 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.PlanRateCard", + "line": 732 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.PlanRateCard", + "line": 737 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.PlanRateCard", + "line": 742 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.PlanRateCard", + "line": 747 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.PlanRateCard", + "line": 752 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.PlanRateCard", + "line": 757 + }, + { + "kind": "func", + "name": "EntitlementTemplateIsNil", + "signature": "func EntitlementTemplateIsNil() predicate.PlanRateCard", + "line": 762 + }, + { + "kind": "func", + "name": "EntitlementTemplateNotNil", + "signature": "func EntitlementTemplateNotNil() predicate.PlanRateCard", + "line": 767 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.PlanRateCard", + "line": 772 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.PlanRateCard", + "line": 777 + }, + { + "kind": "func", + "name": "BillingCadenceEQ", + "signature": "func BillingCadenceEQ(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 782 + }, + { + "kind": "func", + "name": "BillingCadenceNEQ", + "signature": "func BillingCadenceNEQ(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 788 + }, + { + "kind": "func", + "name": "BillingCadenceIn", + "signature": "func BillingCadenceIn(vs ...datetime.ISODurationString) predicate.PlanRateCard", + "line": 794 + }, + { + "kind": "func", + "name": "BillingCadenceNotIn", + "signature": "func BillingCadenceNotIn(vs ...datetime.ISODurationString) predicate.PlanRateCard", + "line": 803 + }, + { + "kind": "func", + "name": "BillingCadenceGT", + "signature": "func BillingCadenceGT(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 812 + }, + { + "kind": "func", + "name": "BillingCadenceGTE", + "signature": "func BillingCadenceGTE(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 818 + }, + { + "kind": "func", + "name": "BillingCadenceLT", + "signature": "func BillingCadenceLT(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 824 + }, + { + "kind": "func", + "name": "BillingCadenceLTE", + "signature": "func BillingCadenceLTE(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 830 + }, + { + "kind": "func", + "name": "BillingCadenceContains", + "signature": "func BillingCadenceContains(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 836 + }, + { + "kind": "func", + "name": "BillingCadenceHasPrefix", + "signature": "func BillingCadenceHasPrefix(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 842 + }, + { + "kind": "func", + "name": "BillingCadenceHasSuffix", + "signature": "func BillingCadenceHasSuffix(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 848 + }, + { + "kind": "func", + "name": "BillingCadenceIsNil", + "signature": "func BillingCadenceIsNil() predicate.PlanRateCard", + "line": 854 + }, + { + "kind": "func", + "name": "BillingCadenceNotNil", + "signature": "func BillingCadenceNotNil() predicate.PlanRateCard", + "line": 859 + }, + { + "kind": "func", + "name": "BillingCadenceEqualFold", + "signature": "func BillingCadenceEqualFold(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 864 + }, + { + "kind": "func", + "name": "BillingCadenceContainsFold", + "signature": "func BillingCadenceContainsFold(v datetime.ISODurationString) predicate.PlanRateCard", + "line": 870 + }, + { + "kind": "func", + "name": "PriceIsNil", + "signature": "func PriceIsNil() predicate.PlanRateCard", + "line": 876 + }, + { + "kind": "func", + "name": "PriceNotNil", + "signature": "func PriceNotNil() predicate.PlanRateCard", + "line": 881 + }, + { + "kind": "func", + "name": "DiscountsIsNil", + "signature": "func DiscountsIsNil() predicate.PlanRateCard", + "line": 886 + }, + { + "kind": "func", + "name": "DiscountsNotNil", + "signature": "func DiscountsNotNil() predicate.PlanRateCard", + "line": 891 + }, + { + "kind": "func", + "name": "PhaseIDEQ", + "signature": "func PhaseIDEQ(v string) predicate.PlanRateCard", + "line": 896 + }, + { + "kind": "func", + "name": "PhaseIDNEQ", + "signature": "func PhaseIDNEQ(v string) predicate.PlanRateCard", + "line": 901 + }, + { + "kind": "func", + "name": "PhaseIDIn", + "signature": "func PhaseIDIn(vs ...string) predicate.PlanRateCard", + "line": 906 + }, + { + "kind": "func", + "name": "PhaseIDNotIn", + "signature": "func PhaseIDNotIn(vs ...string) predicate.PlanRateCard", + "line": 911 + }, + { + "kind": "func", + "name": "PhaseIDGT", + "signature": "func PhaseIDGT(v string) predicate.PlanRateCard", + "line": 916 + }, + { + "kind": "func", + "name": "PhaseIDGTE", + "signature": "func PhaseIDGTE(v string) predicate.PlanRateCard", + "line": 921 + }, + { + "kind": "func", + "name": "PhaseIDLT", + "signature": "func PhaseIDLT(v string) predicate.PlanRateCard", + "line": 926 + }, + { + "kind": "func", + "name": "PhaseIDLTE", + "signature": "func PhaseIDLTE(v string) predicate.PlanRateCard", + "line": 931 + }, + { + "kind": "func", + "name": "PhaseIDContains", + "signature": "func PhaseIDContains(v string) predicate.PlanRateCard", + "line": 936 + }, + { + "kind": "func", + "name": "PhaseIDHasPrefix", + "signature": "func PhaseIDHasPrefix(v string) predicate.PlanRateCard", + "line": 941 + }, + { + "kind": "func", + "name": "PhaseIDHasSuffix", + "signature": "func PhaseIDHasSuffix(v string) predicate.PlanRateCard", + "line": 946 + }, + { + "kind": "func", + "name": "PhaseIDEqualFold", + "signature": "func PhaseIDEqualFold(v string) predicate.PlanRateCard", + "line": 951 + }, + { + "kind": "func", + "name": "PhaseIDContainsFold", + "signature": "func PhaseIDContainsFold(v string) predicate.PlanRateCard", + "line": 956 + }, + { + "kind": "func", + "name": "FeatureIDEQ", + "signature": "func FeatureIDEQ(v string) predicate.PlanRateCard", + "line": 961 + }, + { + "kind": "func", + "name": "FeatureIDNEQ", + "signature": "func FeatureIDNEQ(v string) predicate.PlanRateCard", + "line": 966 + }, + { + "kind": "func", + "name": "FeatureIDIn", + "signature": "func FeatureIDIn(vs ...string) predicate.PlanRateCard", + "line": 971 + }, + { + "kind": "func", + "name": "FeatureIDNotIn", + "signature": "func FeatureIDNotIn(vs ...string) predicate.PlanRateCard", + "line": 976 + }, + { + "kind": "func", + "name": "FeatureIDGT", + "signature": "func FeatureIDGT(v string) predicate.PlanRateCard", + "line": 981 + }, + { + "kind": "func", + "name": "FeatureIDGTE", + "signature": "func FeatureIDGTE(v string) predicate.PlanRateCard", + "line": 986 + }, + { + "kind": "func", + "name": "FeatureIDLT", + "signature": "func FeatureIDLT(v string) predicate.PlanRateCard", + "line": 991 + }, + { + "kind": "func", + "name": "FeatureIDLTE", + "signature": "func FeatureIDLTE(v string) predicate.PlanRateCard", + "line": 996 + }, + { + "kind": "func", + "name": "FeatureIDContains", + "signature": "func FeatureIDContains(v string) predicate.PlanRateCard", + "line": 1001 + }, + { + "kind": "func", + "name": "FeatureIDHasPrefix", + "signature": "func FeatureIDHasPrefix(v string) predicate.PlanRateCard", + "line": 1006 + }, + { + "kind": "func", + "name": "FeatureIDHasSuffix", + "signature": "func FeatureIDHasSuffix(v string) predicate.PlanRateCard", + "line": 1011 + }, + { + "kind": "func", + "name": "FeatureIDIsNil", + "signature": "func FeatureIDIsNil() predicate.PlanRateCard", + "line": 1016 + }, + { + "kind": "func", + "name": "FeatureIDNotNil", + "signature": "func FeatureIDNotNil() predicate.PlanRateCard", + "line": 1021 + }, + { + "kind": "func", + "name": "FeatureIDEqualFold", + "signature": "func FeatureIDEqualFold(v string) predicate.PlanRateCard", + "line": 1026 + }, + { + "kind": "func", + "name": "FeatureIDContainsFold", + "signature": "func FeatureIDContainsFold(v string) predicate.PlanRateCard", + "line": 1031 + }, + { + "kind": "func", + "name": "HasPhase", + "signature": "func HasPhase() predicate.PlanRateCard", + "line": 1036 + }, + { + "kind": "func", + "name": "HasPhaseWith", + "signature": "func HasPhaseWith(preds ...predicate.PlanPhase) predicate.PlanRateCard", + "line": 1047 + }, + { + "kind": "func", + "name": "HasFeatures", + "signature": "func HasFeatures() predicate.PlanRateCard", + "line": 1059 + }, + { + "kind": "func", + "name": "HasFeaturesWith", + "signature": "func HasFeaturesWith(preds ...predicate.Feature) predicate.PlanRateCard", + "line": 1070 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.PlanRateCard", + "line": 1082 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.PlanRateCard", + "line": 1093 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.PlanRateCard) predicate.PlanRateCard", + "line": 1105 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.PlanRateCard) predicate.PlanRateCard", + "line": 1110 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.PlanRateCard) predicate.PlanRateCard", + "line": 1115 + } + ], + "line_count": 1117 + }, + "openmeter/ent/db/planratecard_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRateCardCreate", + "signature": "type PlanRateCardCreate struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *PlanRateCardCreate) SetNamespace(v string) *PlanRateCardCreate", + "line": 32 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *PlanRateCardCreate) SetMetadata(v map[string]string) *PlanRateCardCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *PlanRateCardCreate) SetCreatedAt(v time.Time) *PlanRateCardCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *PlanRateCardCreate) SetNillableCreatedAt(v *time.Time) *PlanRateCardCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *PlanRateCardCreate) SetUpdatedAt(v time.Time) *PlanRateCardCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *PlanRateCardCreate) SetNillableUpdatedAt(v *time.Time) *PlanRateCardCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *PlanRateCardCreate) SetDeletedAt(v time.Time) *PlanRateCardCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *PlanRateCardCreate) SetNillableDeletedAt(v *time.Time) *PlanRateCardCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *PlanRateCardCreate) SetName(v string) *PlanRateCardCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *PlanRateCardCreate) SetDescription(v string) *PlanRateCardCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *PlanRateCardCreate) SetNillableDescription(v *string) *PlanRateCardCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *PlanRateCardCreate) SetKey(v string) *PlanRateCardCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *PlanRateCardCreate) SetTaxCodeID(v string) *PlanRateCardCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *PlanRateCardCreate) SetNillableTaxCodeID(v *string) *PlanRateCardCreate", + "line": 118 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *PlanRateCardCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *PlanRateCardCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *PlanRateCardCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetType", + "signature": "func (_c *PlanRateCardCreate) SetType(v productcatalog.RateCardType) *PlanRateCardCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *PlanRateCardCreate) SetFeatureKey(v string) *PlanRateCardCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *PlanRateCardCreate) SetNillableFeatureKey(v *string) *PlanRateCardCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_c *PlanRateCardCreate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardCreate", + "line": 160 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *PlanRateCardCreate) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardCreate", + "line": 166 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_c *PlanRateCardCreate) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_c *PlanRateCardCreate) SetNillableBillingCadence(v *datetime.ISODurationString) *PlanRateCardCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *PlanRateCardCreate) SetPrice(v *productcatalog.Price) *PlanRateCardCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_c *PlanRateCardCreate) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (_c *PlanRateCardCreate) SetPhaseID(v string) *PlanRateCardCreate", + "line": 198 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_c *PlanRateCardCreate) SetFeatureID(v string) *PlanRateCardCreate", + "line": 204 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_c *PlanRateCardCreate) SetNillableFeatureID(v *string) *PlanRateCardCreate", + "line": 210 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *PlanRateCardCreate) SetID(v string) *PlanRateCardCreate", + "line": 218 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *PlanRateCardCreate) SetNillableID(v *string) *PlanRateCardCreate", + "line": 224 + }, + { + "kind": "func", + "name": "SetPhase", + "signature": "func (_c *PlanRateCardCreate) SetPhase(v *PlanPhase) *PlanRateCardCreate", + "line": 232 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_c *PlanRateCardCreate) SetFeaturesID(id string) *PlanRateCardCreate", + "line": 237 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_c *PlanRateCardCreate) SetNillableFeaturesID(id *string) *PlanRateCardCreate", + "line": 243 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_c *PlanRateCardCreate) SetFeatures(v *Feature) *PlanRateCardCreate", + "line": 251 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *PlanRateCardCreate) SetTaxCode(v *TaxCode) *PlanRateCardCreate", + "line": 256 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *PlanRateCardCreate) Mutation() *PlanRateCardMutation", + "line": 261 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanRateCardCreate) Save(ctx context.Context) (*PlanRateCard, error)", + "line": 266 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanRateCardCreate) SaveX(ctx context.Context) *PlanRateCard", + "line": 272 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanRateCardCreate) Exec(ctx context.Context) error", + "line": 281 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanRateCardCreate) ExecX(ctx context.Context)", + "line": 287 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *PlanRateCardCreate) defaults()", + "line": 294 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *PlanRateCardCreate) check() error", + "line": 310 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *PlanRateCardCreate) sqlSave(ctx context.Context) (*PlanRateCard, error)", + "line": 383 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *PlanRateCardCreate) createSpec() (*PlanRateCard, *sqlgraph.CreateSpec, error)", + "line": 409 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanRateCardCreate) OnConflict(opts ...sql.ConflictOption) *PlanRateCardUpsertOne", + "line": 569 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanRateCardCreate) OnConflictColumns(columns ...string) *PlanRateCardUpsertOne", + "line": 582 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanRateCardUpsert) SetMetadata(v map[string]string) *PlanRateCardUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanRateCardUpsert) UpdateMetadata() *PlanRateCardUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanRateCardUpsert) ClearMetadata() *PlanRateCardUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanRateCardUpsert) SetUpdatedAt(v time.Time) *PlanRateCardUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanRateCardUpsert) UpdateUpdatedAt() *PlanRateCardUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanRateCardUpsert) SetDeletedAt(v time.Time) *PlanRateCardUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanRateCardUpsert) UpdateDeletedAt() *PlanRateCardUpsert", + "line": 639 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanRateCardUpsert) ClearDeletedAt() *PlanRateCardUpsert", + "line": 645 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanRateCardUpsert) SetName(v string) *PlanRateCardUpsert", + "line": 651 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanRateCardUpsert) UpdateName() *PlanRateCardUpsert", + "line": 657 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanRateCardUpsert) SetDescription(v string) *PlanRateCardUpsert", + "line": 663 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanRateCardUpsert) UpdateDescription() *PlanRateCardUpsert", + "line": 669 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanRateCardUpsert) ClearDescription() *PlanRateCardUpsert", + "line": 675 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *PlanRateCardUpsert) SetTaxCodeID(v string) *PlanRateCardUpsert", + "line": 681 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *PlanRateCardUpsert) UpdateTaxCodeID() *PlanRateCardUpsert", + "line": 687 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *PlanRateCardUpsert) ClearTaxCodeID() *PlanRateCardUpsert", + "line": 693 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *PlanRateCardUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardUpsert", + "line": 699 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *PlanRateCardUpsert) UpdateTaxBehavior() *PlanRateCardUpsert", + "line": 705 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *PlanRateCardUpsert) ClearTaxBehavior() *PlanRateCardUpsert", + "line": 711 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *PlanRateCardUpsert) SetFeatureKey(v string) *PlanRateCardUpsert", + "line": 717 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *PlanRateCardUpsert) UpdateFeatureKey() *PlanRateCardUpsert", + "line": 723 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *PlanRateCardUpsert) ClearFeatureKey() *PlanRateCardUpsert", + "line": 729 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsert) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardUpsert", + "line": 735 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsert) UpdateEntitlementTemplate() *PlanRateCardUpsert", + "line": 741 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsert) ClearEntitlementTemplate() *PlanRateCardUpsert", + "line": 747 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *PlanRateCardUpsert) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardUpsert", + "line": 753 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *PlanRateCardUpsert) UpdateTaxConfig() *PlanRateCardUpsert", + "line": 759 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *PlanRateCardUpsert) ClearTaxConfig() *PlanRateCardUpsert", + "line": 765 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanRateCardUpsert) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardUpsert", + "line": 771 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanRateCardUpsert) UpdateBillingCadence() *PlanRateCardUpsert", + "line": 777 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *PlanRateCardUpsert) ClearBillingCadence() *PlanRateCardUpsert", + "line": 783 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *PlanRateCardUpsert) SetPrice(v *productcatalog.Price) *PlanRateCardUpsert", + "line": 789 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *PlanRateCardUpsert) UpdatePrice() *PlanRateCardUpsert", + "line": 795 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *PlanRateCardUpsert) ClearPrice() *PlanRateCardUpsert", + "line": 801 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *PlanRateCardUpsert) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardUpsert", + "line": 807 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *PlanRateCardUpsert) UpdateDiscounts() *PlanRateCardUpsert", + "line": 813 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *PlanRateCardUpsert) ClearDiscounts() *PlanRateCardUpsert", + "line": 819 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (u *PlanRateCardUpsert) SetPhaseID(v string) *PlanRateCardUpsert", + "line": 825 + }, + { + "kind": "func", + "name": "UpdatePhaseID", + "signature": "func (u *PlanRateCardUpsert) UpdatePhaseID() *PlanRateCardUpsert", + "line": 831 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *PlanRateCardUpsert) SetFeatureID(v string) *PlanRateCardUpsert", + "line": 837 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *PlanRateCardUpsert) UpdateFeatureID() *PlanRateCardUpsert", + "line": 843 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *PlanRateCardUpsert) ClearFeatureID() *PlanRateCardUpsert", + "line": 849 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanRateCardUpsertOne) UpdateNewValues() *PlanRateCardUpsertOne", + "line": 865 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanRateCardUpsertOne) Ignore() *PlanRateCardUpsertOne", + "line": 893 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanRateCardUpsertOne) DoNothing() *PlanRateCardUpsertOne", + "line": 900 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanRateCardUpsertOne) Update(set func(*PlanRateCardUpsert)) *PlanRateCardUpsertOne", + "line": 907 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanRateCardUpsertOne) SetMetadata(v map[string]string) *PlanRateCardUpsertOne", + "line": 915 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanRateCardUpsertOne) UpdateMetadata() *PlanRateCardUpsertOne", + "line": 922 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanRateCardUpsertOne) ClearMetadata() *PlanRateCardUpsertOne", + "line": 929 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanRateCardUpsertOne) SetUpdatedAt(v time.Time) *PlanRateCardUpsertOne", + "line": 936 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanRateCardUpsertOne) UpdateUpdatedAt() *PlanRateCardUpsertOne", + "line": 943 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanRateCardUpsertOne) SetDeletedAt(v time.Time) *PlanRateCardUpsertOne", + "line": 950 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanRateCardUpsertOne) UpdateDeletedAt() *PlanRateCardUpsertOne", + "line": 957 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanRateCardUpsertOne) ClearDeletedAt() *PlanRateCardUpsertOne", + "line": 964 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanRateCardUpsertOne) SetName(v string) *PlanRateCardUpsertOne", + "line": 971 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanRateCardUpsertOne) UpdateName() *PlanRateCardUpsertOne", + "line": 978 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanRateCardUpsertOne) SetDescription(v string) *PlanRateCardUpsertOne", + "line": 985 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanRateCardUpsertOne) UpdateDescription() *PlanRateCardUpsertOne", + "line": 992 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanRateCardUpsertOne) ClearDescription() *PlanRateCardUpsertOne", + "line": 999 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *PlanRateCardUpsertOne) SetTaxCodeID(v string) *PlanRateCardUpsertOne", + "line": 1006 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *PlanRateCardUpsertOne) UpdateTaxCodeID() *PlanRateCardUpsertOne", + "line": 1013 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *PlanRateCardUpsertOne) ClearTaxCodeID() *PlanRateCardUpsertOne", + "line": 1020 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *PlanRateCardUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardUpsertOne", + "line": 1027 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *PlanRateCardUpsertOne) UpdateTaxBehavior() *PlanRateCardUpsertOne", + "line": 1034 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *PlanRateCardUpsertOne) ClearTaxBehavior() *PlanRateCardUpsertOne", + "line": 1041 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *PlanRateCardUpsertOne) SetFeatureKey(v string) *PlanRateCardUpsertOne", + "line": 1048 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *PlanRateCardUpsertOne) UpdateFeatureKey() *PlanRateCardUpsertOne", + "line": 1055 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *PlanRateCardUpsertOne) ClearFeatureKey() *PlanRateCardUpsertOne", + "line": 1062 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardUpsertOne", + "line": 1069 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertOne) UpdateEntitlementTemplate() *PlanRateCardUpsertOne", + "line": 1076 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertOne) ClearEntitlementTemplate() *PlanRateCardUpsertOne", + "line": 1083 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *PlanRateCardUpsertOne) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardUpsertOne", + "line": 1090 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *PlanRateCardUpsertOne) UpdateTaxConfig() *PlanRateCardUpsertOne", + "line": 1097 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *PlanRateCardUpsertOne) ClearTaxConfig() *PlanRateCardUpsertOne", + "line": 1104 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanRateCardUpsertOne) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardUpsertOne", + "line": 1111 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanRateCardUpsertOne) UpdateBillingCadence() *PlanRateCardUpsertOne", + "line": 1118 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *PlanRateCardUpsertOne) ClearBillingCadence() *PlanRateCardUpsertOne", + "line": 1125 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *PlanRateCardUpsertOne) SetPrice(v *productcatalog.Price) *PlanRateCardUpsertOne", + "line": 1132 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *PlanRateCardUpsertOne) UpdatePrice() *PlanRateCardUpsertOne", + "line": 1139 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *PlanRateCardUpsertOne) ClearPrice() *PlanRateCardUpsertOne", + "line": 1146 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *PlanRateCardUpsertOne) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardUpsertOne", + "line": 1153 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *PlanRateCardUpsertOne) UpdateDiscounts() *PlanRateCardUpsertOne", + "line": 1160 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *PlanRateCardUpsertOne) ClearDiscounts() *PlanRateCardUpsertOne", + "line": 1167 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (u *PlanRateCardUpsertOne) SetPhaseID(v string) *PlanRateCardUpsertOne", + "line": 1174 + }, + { + "kind": "func", + "name": "UpdatePhaseID", + "signature": "func (u *PlanRateCardUpsertOne) UpdatePhaseID() *PlanRateCardUpsertOne", + "line": 1181 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *PlanRateCardUpsertOne) SetFeatureID(v string) *PlanRateCardUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *PlanRateCardUpsertOne) UpdateFeatureID() *PlanRateCardUpsertOne", + "line": 1195 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *PlanRateCardUpsertOne) ClearFeatureID() *PlanRateCardUpsertOne", + "line": 1202 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanRateCardUpsertOne) Exec(ctx context.Context) error", + "line": 1209 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanRateCardUpsertOne) ExecX(ctx context.Context)", + "line": 1217 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *PlanRateCardUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1224 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *PlanRateCardUpsertOne) IDX(ctx context.Context) string", + "line": 1238 + }, + { + "kind": "struct", + "name": "PlanRateCardCreateBulk", + "signature": "type PlanRateCardCreateBulk struct", + "line": 1247 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *PlanRateCardCreateBulk) Save(ctx context.Context) ([]*PlanRateCard, error)", + "line": 1255 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *PlanRateCardCreateBulk) SaveX(ctx context.Context) []*PlanRateCard", + "line": 1314 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *PlanRateCardCreateBulk) Exec(ctx context.Context) error", + "line": 1323 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *PlanRateCardCreateBulk) ExecX(ctx context.Context)", + "line": 1329 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *PlanRateCardCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlanRateCardUpsertBulk", + "line": 1350 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *PlanRateCardCreateBulk) OnConflictColumns(columns ...string) *PlanRateCardUpsertBulk", + "line": 1363 + }, + { + "kind": "struct", + "name": "PlanRateCardUpsertBulk", + "signature": "type PlanRateCardUpsertBulk struct", + "line": 1372 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateNewValues() *PlanRateCardUpsertBulk", + "line": 1387 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *PlanRateCardUpsertBulk) Ignore() *PlanRateCardUpsertBulk", + "line": 1417 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *PlanRateCardUpsertBulk) DoNothing() *PlanRateCardUpsertBulk", + "line": 1424 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *PlanRateCardUpsertBulk) Update(set func(*PlanRateCardUpsert)) *PlanRateCardUpsertBulk", + "line": 1431 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *PlanRateCardUpsertBulk) SetMetadata(v map[string]string) *PlanRateCardUpsertBulk", + "line": 1439 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateMetadata() *PlanRateCardUpsertBulk", + "line": 1446 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *PlanRateCardUpsertBulk) ClearMetadata() *PlanRateCardUpsertBulk", + "line": 1453 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *PlanRateCardUpsertBulk) SetUpdatedAt(v time.Time) *PlanRateCardUpsertBulk", + "line": 1460 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateUpdatedAt() *PlanRateCardUpsertBulk", + "line": 1467 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *PlanRateCardUpsertBulk) SetDeletedAt(v time.Time) *PlanRateCardUpsertBulk", + "line": 1474 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateDeletedAt() *PlanRateCardUpsertBulk", + "line": 1481 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *PlanRateCardUpsertBulk) ClearDeletedAt() *PlanRateCardUpsertBulk", + "line": 1488 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *PlanRateCardUpsertBulk) SetName(v string) *PlanRateCardUpsertBulk", + "line": 1495 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateName() *PlanRateCardUpsertBulk", + "line": 1502 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *PlanRateCardUpsertBulk) SetDescription(v string) *PlanRateCardUpsertBulk", + "line": 1509 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateDescription() *PlanRateCardUpsertBulk", + "line": 1516 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *PlanRateCardUpsertBulk) ClearDescription() *PlanRateCardUpsertBulk", + "line": 1523 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *PlanRateCardUpsertBulk) SetTaxCodeID(v string) *PlanRateCardUpsertBulk", + "line": 1530 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateTaxCodeID() *PlanRateCardUpsertBulk", + "line": 1537 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *PlanRateCardUpsertBulk) ClearTaxCodeID() *PlanRateCardUpsertBulk", + "line": 1544 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *PlanRateCardUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardUpsertBulk", + "line": 1551 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateTaxBehavior() *PlanRateCardUpsertBulk", + "line": 1558 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *PlanRateCardUpsertBulk) ClearTaxBehavior() *PlanRateCardUpsertBulk", + "line": 1565 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *PlanRateCardUpsertBulk) SetFeatureKey(v string) *PlanRateCardUpsertBulk", + "line": 1572 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateFeatureKey() *PlanRateCardUpsertBulk", + "line": 1579 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *PlanRateCardUpsertBulk) ClearFeatureKey() *PlanRateCardUpsertBulk", + "line": 1586 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertBulk) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardUpsertBulk", + "line": 1593 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateEntitlementTemplate() *PlanRateCardUpsertBulk", + "line": 1600 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *PlanRateCardUpsertBulk) ClearEntitlementTemplate() *PlanRateCardUpsertBulk", + "line": 1607 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *PlanRateCardUpsertBulk) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardUpsertBulk", + "line": 1614 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateTaxConfig() *PlanRateCardUpsertBulk", + "line": 1621 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *PlanRateCardUpsertBulk) ClearTaxConfig() *PlanRateCardUpsertBulk", + "line": 1628 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *PlanRateCardUpsertBulk) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardUpsertBulk", + "line": 1635 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateBillingCadence() *PlanRateCardUpsertBulk", + "line": 1642 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *PlanRateCardUpsertBulk) ClearBillingCadence() *PlanRateCardUpsertBulk", + "line": 1649 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *PlanRateCardUpsertBulk) SetPrice(v *productcatalog.Price) *PlanRateCardUpsertBulk", + "line": 1656 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *PlanRateCardUpsertBulk) UpdatePrice() *PlanRateCardUpsertBulk", + "line": 1663 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *PlanRateCardUpsertBulk) ClearPrice() *PlanRateCardUpsertBulk", + "line": 1670 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *PlanRateCardUpsertBulk) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardUpsertBulk", + "line": 1677 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateDiscounts() *PlanRateCardUpsertBulk", + "line": 1684 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *PlanRateCardUpsertBulk) ClearDiscounts() *PlanRateCardUpsertBulk", + "line": 1691 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (u *PlanRateCardUpsertBulk) SetPhaseID(v string) *PlanRateCardUpsertBulk", + "line": 1698 + }, + { + "kind": "func", + "name": "UpdatePhaseID", + "signature": "func (u *PlanRateCardUpsertBulk) UpdatePhaseID() *PlanRateCardUpsertBulk", + "line": 1705 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (u *PlanRateCardUpsertBulk) SetFeatureID(v string) *PlanRateCardUpsertBulk", + "line": 1712 + }, + { + "kind": "func", + "name": "UpdateFeatureID", + "signature": "func (u *PlanRateCardUpsertBulk) UpdateFeatureID() *PlanRateCardUpsertBulk", + "line": 1719 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (u *PlanRateCardUpsertBulk) ClearFeatureID() *PlanRateCardUpsertBulk", + "line": 1726 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *PlanRateCardUpsertBulk) Exec(ctx context.Context) error", + "line": 1733 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *PlanRateCardUpsertBulk) ExecX(ctx context.Context)", + "line": 1749 + } + ], + "line_count": 1753 + }, + "openmeter/ent/db/planratecard_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRateCardDelete", + "signature": "type PlanRateCardDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanRateCardDelete) Where(ps ...predicate.PlanRateCard) *PlanRateCardDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanRateCardDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanRateCardDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *PlanRateCardDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "PlanRateCardDeleteOne", + "signature": "type PlanRateCardDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *PlanRateCardDeleteOne) Where(ps ...predicate.PlanRateCard) *PlanRateCardDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *PlanRateCardDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *PlanRateCardDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/planratecard_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRateCardQuery", + "signature": "type PlanRateCardQuery struct", + "line": 23 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *PlanRateCardQuery) Where(ps ...predicate.PlanRateCard) *PlanRateCardQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *PlanRateCardQuery) Limit(limit int) *PlanRateCardQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *PlanRateCardQuery) Offset(offset int) *PlanRateCardQuery", + "line": 51 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *PlanRateCardQuery) Unique(unique bool) *PlanRateCardQuery", + "line": 58 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *PlanRateCardQuery) Order(o ...planratecard.OrderOption) *PlanRateCardQuery", + "line": 64 + }, + { + "kind": "func", + "name": "QueryPhase", + "signature": "func (_q *PlanRateCardQuery) QueryPhase() *PlanPhaseQuery", + "line": 70 + }, + { + "kind": "func", + "name": "QueryFeatures", + "signature": "func (_q *PlanRateCardQuery) QueryFeatures() *FeatureQuery", + "line": 92 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *PlanRateCardQuery) QueryTaxCode() *TaxCodeQuery", + "line": 114 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *PlanRateCardQuery) First(ctx context.Context) (*PlanRateCard, error)", + "line": 137 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *PlanRateCardQuery) FirstX(ctx context.Context) *PlanRateCard", + "line": 149 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *PlanRateCardQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 159 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *PlanRateCardQuery) FirstIDX(ctx context.Context) string", + "line": 172 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *PlanRateCardQuery) Only(ctx context.Context) (*PlanRateCard, error)", + "line": 183 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *PlanRateCardQuery) OnlyX(ctx context.Context) *PlanRateCard", + "line": 199 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *PlanRateCardQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 210 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *PlanRateCardQuery) OnlyIDX(ctx context.Context) string", + "line": 227 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *PlanRateCardQuery) All(ctx context.Context) ([]*PlanRateCard, error)", + "line": 236 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *PlanRateCardQuery) AllX(ctx context.Context) []*PlanRateCard", + "line": 246 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *PlanRateCardQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 255 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *PlanRateCardQuery) IDsX(ctx context.Context) []string", + "line": 267 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *PlanRateCardQuery) Count(ctx context.Context) (int, error)", + "line": 276 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *PlanRateCardQuery) CountX(ctx context.Context) int", + "line": 285 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *PlanRateCardQuery) Exist(ctx context.Context) (bool, error)", + "line": 294 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *PlanRateCardQuery) ExistX(ctx context.Context) bool", + "line": 307 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *PlanRateCardQuery) Clone() *PlanRateCardQuery", + "line": 317 + }, + { + "kind": "func", + "name": "WithPhase", + "signature": "func (_q *PlanRateCardQuery) WithPhase(opts ...func(*PlanPhaseQuery)) *PlanRateCardQuery", + "line": 338 + }, + { + "kind": "func", + "name": "WithFeatures", + "signature": "func (_q *PlanRateCardQuery) WithFeatures(opts ...func(*FeatureQuery)) *PlanRateCardQuery", + "line": 349 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *PlanRateCardQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *PlanRateCardQuery", + "line": 360 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *PlanRateCardQuery) GroupBy(field string, fields ...string) *PlanRateCardGroupBy", + "line": 383 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *PlanRateCardQuery) Select(fields ...string) *PlanRateCardSelect", + "line": 404 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *PlanRateCardQuery) Aggregate(fns ...AggregateFunc) *PlanRateCardSelect", + "line": 413 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *PlanRateCardQuery) prepareQuery(ctx context.Context) error", + "line": 417 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *PlanRateCardQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*PlanRateCard, error)", + "line": 443 + }, + { + "kind": "func", + "name": "loadPhase", + "signature": "func (_q *PlanRateCardQuery) loadPhase(ctx context.Context, query *PlanPhaseQuery, nodes []*PlanRateCard, init func(*PlanRateCard), assign func(*PlanRateCard, *PlanPhase)) error", + "line": 495 + }, + { + "kind": "func", + "name": "loadFeatures", + "signature": "func (_q *PlanRateCardQuery) loadFeatures(ctx context.Context, query *FeatureQuery, nodes []*PlanRateCard, init func(*PlanRateCard), assign func(*PlanRateCard, *Feature)) error", + "line": 524 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *PlanRateCardQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*PlanRateCard, init func(*PlanRateCard), assign func(*PlanRateCard, *TaxCode)) error", + "line": 556 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *PlanRateCardQuery) sqlCount(ctx context.Context) (int, error)", + "line": 589 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *PlanRateCardQuery) querySpec() *sqlgraph.QuerySpec", + "line": 601 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *PlanRateCardQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 650 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *PlanRateCardQuery) ForUpdate(opts ...sql.LockOption) *PlanRateCardQuery", + "line": 688 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *PlanRateCardQuery) ForShare(opts ...sql.LockOption) *PlanRateCardQuery", + "line": 701 + }, + { + "kind": "struct", + "name": "PlanRateCardGroupBy", + "signature": "type PlanRateCardGroupBy struct", + "line": 712 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *PlanRateCardGroupBy) Aggregate(fns ...AggregateFunc) *PlanRateCardGroupBy", + "line": 718 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *PlanRateCardGroupBy) Scan(ctx context.Context, v any) error", + "line": 724 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *PlanRateCardGroupBy) sqlScan(ctx context.Context, root *PlanRateCardQuery, v any) error", + "line": 732 + }, + { + "kind": "struct", + "name": "PlanRateCardSelect", + "signature": "type PlanRateCardSelect struct", + "line": 760 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *PlanRateCardSelect) Aggregate(fns ...AggregateFunc) *PlanRateCardSelect", + "line": 766 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *PlanRateCardSelect) Scan(ctx context.Context, v any) error", + "line": 772 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *PlanRateCardSelect) sqlScan(ctx context.Context, root *PlanRateCardQuery, v any) error", + "line": 780 + } + ], + "line_count": 799 + }, + "openmeter/ent/db/planratecard_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRateCardUpdate", + "signature": "type PlanRateCardUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanRateCardUpdate) Where(ps ...predicate.PlanRateCard) *PlanRateCardUpdate", + "line": 31 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanRateCardUpdate) SetMetadata(v map[string]string) *PlanRateCardUpdate", + "line": 37 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanRateCardUpdate) ClearMetadata() *PlanRateCardUpdate", + "line": 43 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanRateCardUpdate) SetUpdatedAt(v time.Time) *PlanRateCardUpdate", + "line": 49 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanRateCardUpdate) SetDeletedAt(v time.Time) *PlanRateCardUpdate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanRateCardUpdate) SetNillableDeletedAt(v *time.Time) *PlanRateCardUpdate", + "line": 61 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanRateCardUpdate) ClearDeletedAt() *PlanRateCardUpdate", + "line": 69 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanRateCardUpdate) SetName(v string) *PlanRateCardUpdate", + "line": 75 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanRateCardUpdate) SetNillableName(v *string) *PlanRateCardUpdate", + "line": 81 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanRateCardUpdate) SetDescription(v string) *PlanRateCardUpdate", + "line": 89 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanRateCardUpdate) SetNillableDescription(v *string) *PlanRateCardUpdate", + "line": 95 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanRateCardUpdate) ClearDescription() *PlanRateCardUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *PlanRateCardUpdate) SetTaxCodeID(v string) *PlanRateCardUpdate", + "line": 109 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *PlanRateCardUpdate) SetNillableTaxCodeID(v *string) *PlanRateCardUpdate", + "line": 115 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *PlanRateCardUpdate) ClearTaxCodeID() *PlanRateCardUpdate", + "line": 123 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *PlanRateCardUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardUpdate", + "line": 129 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *PlanRateCardUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *PlanRateCardUpdate", + "line": 135 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *PlanRateCardUpdate) ClearTaxBehavior() *PlanRateCardUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *PlanRateCardUpdate) SetFeatureKey(v string) *PlanRateCardUpdate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *PlanRateCardUpdate) SetNillableFeatureKey(v *string) *PlanRateCardUpdate", + "line": 155 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *PlanRateCardUpdate) ClearFeatureKey() *PlanRateCardUpdate", + "line": 163 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *PlanRateCardUpdate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardUpdate", + "line": 169 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *PlanRateCardUpdate) ClearEntitlementTemplate() *PlanRateCardUpdate", + "line": 175 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *PlanRateCardUpdate) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardUpdate", + "line": 181 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *PlanRateCardUpdate) ClearTaxConfig() *PlanRateCardUpdate", + "line": 187 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *PlanRateCardUpdate) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardUpdate", + "line": 193 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *PlanRateCardUpdate) SetNillableBillingCadence(v *datetime.ISODurationString) *PlanRateCardUpdate", + "line": 199 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *PlanRateCardUpdate) ClearBillingCadence() *PlanRateCardUpdate", + "line": 207 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *PlanRateCardUpdate) SetPrice(v *productcatalog.Price) *PlanRateCardUpdate", + "line": 213 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *PlanRateCardUpdate) ClearPrice() *PlanRateCardUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *PlanRateCardUpdate) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *PlanRateCardUpdate) ClearDiscounts() *PlanRateCardUpdate", + "line": 231 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (_u *PlanRateCardUpdate) SetPhaseID(v string) *PlanRateCardUpdate", + "line": 237 + }, + { + "kind": "func", + "name": "SetNillablePhaseID", + "signature": "func (_u *PlanRateCardUpdate) SetNillablePhaseID(v *string) *PlanRateCardUpdate", + "line": 243 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *PlanRateCardUpdate) SetFeatureID(v string) *PlanRateCardUpdate", + "line": 251 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *PlanRateCardUpdate) SetNillableFeatureID(v *string) *PlanRateCardUpdate", + "line": 257 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *PlanRateCardUpdate) ClearFeatureID() *PlanRateCardUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "SetPhase", + "signature": "func (_u *PlanRateCardUpdate) SetPhase(v *PlanPhase) *PlanRateCardUpdate", + "line": 271 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_u *PlanRateCardUpdate) SetFeaturesID(id string) *PlanRateCardUpdate", + "line": 276 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_u *PlanRateCardUpdate) SetNillableFeaturesID(id *string) *PlanRateCardUpdate", + "line": 282 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_u *PlanRateCardUpdate) SetFeatures(v *Feature) *PlanRateCardUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *PlanRateCardUpdate) SetTaxCode(v *TaxCode) *PlanRateCardUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanRateCardUpdate) Mutation() *PlanRateCardMutation", + "line": 300 + }, + { + "kind": "func", + "name": "ClearPhase", + "signature": "func (_u *PlanRateCardUpdate) ClearPhase() *PlanRateCardUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "ClearFeatures", + "signature": "func (_u *PlanRateCardUpdate) ClearFeatures() *PlanRateCardUpdate", + "line": 311 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *PlanRateCardUpdate) ClearTaxCode() *PlanRateCardUpdate", + "line": 317 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanRateCardUpdate) Save(ctx context.Context) (int, error)", + "line": 323 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanRateCardUpdate) SaveX(ctx context.Context) int", + "line": 329 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanRateCardUpdate) Exec(ctx context.Context) error", + "line": 338 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanRateCardUpdate) ExecX(ctx context.Context)", + "line": 344 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanRateCardUpdate) defaults()", + "line": 351 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanRateCardUpdate) check() error", + "line": 359 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanRateCardUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 396 + }, + { + "kind": "struct", + "name": "PlanRateCardUpdateOne", + "signature": "type PlanRateCardUpdateOne struct", + "line": 590 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *PlanRateCardUpdateOne) SetMetadata(v map[string]string) *PlanRateCardUpdateOne", + "line": 598 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *PlanRateCardUpdateOne) ClearMetadata() *PlanRateCardUpdateOne", + "line": 604 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *PlanRateCardUpdateOne) SetUpdatedAt(v time.Time) *PlanRateCardUpdateOne", + "line": 610 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *PlanRateCardUpdateOne) SetDeletedAt(v time.Time) *PlanRateCardUpdateOne", + "line": 616 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableDeletedAt(v *time.Time) *PlanRateCardUpdateOne", + "line": 622 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *PlanRateCardUpdateOne) ClearDeletedAt() *PlanRateCardUpdateOne", + "line": 630 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *PlanRateCardUpdateOne) SetName(v string) *PlanRateCardUpdateOne", + "line": 636 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableName(v *string) *PlanRateCardUpdateOne", + "line": 642 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *PlanRateCardUpdateOne) SetDescription(v string) *PlanRateCardUpdateOne", + "line": 650 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableDescription(v *string) *PlanRateCardUpdateOne", + "line": 656 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *PlanRateCardUpdateOne) ClearDescription() *PlanRateCardUpdateOne", + "line": 664 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *PlanRateCardUpdateOne) SetTaxCodeID(v string) *PlanRateCardUpdateOne", + "line": 670 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableTaxCodeID(v *string) *PlanRateCardUpdateOne", + "line": 676 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *PlanRateCardUpdateOne) ClearTaxCodeID() *PlanRateCardUpdateOne", + "line": 684 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *PlanRateCardUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *PlanRateCardUpdateOne", + "line": 690 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *PlanRateCardUpdateOne", + "line": 696 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *PlanRateCardUpdateOne) ClearTaxBehavior() *PlanRateCardUpdateOne", + "line": 704 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *PlanRateCardUpdateOne) SetFeatureKey(v string) *PlanRateCardUpdateOne", + "line": 710 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableFeatureKey(v *string) *PlanRateCardUpdateOne", + "line": 716 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *PlanRateCardUpdateOne) ClearFeatureKey() *PlanRateCardUpdateOne", + "line": 724 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *PlanRateCardUpdateOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *PlanRateCardUpdateOne", + "line": 730 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *PlanRateCardUpdateOne) ClearEntitlementTemplate() *PlanRateCardUpdateOne", + "line": 736 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *PlanRateCardUpdateOne) SetTaxConfig(v *productcatalog.TaxConfig) *PlanRateCardUpdateOne", + "line": 742 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *PlanRateCardUpdateOne) ClearTaxConfig() *PlanRateCardUpdateOne", + "line": 748 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *PlanRateCardUpdateOne) SetBillingCadence(v datetime.ISODurationString) *PlanRateCardUpdateOne", + "line": 754 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableBillingCadence(v *datetime.ISODurationString) *PlanRateCardUpdateOne", + "line": 760 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *PlanRateCardUpdateOne) ClearBillingCadence() *PlanRateCardUpdateOne", + "line": 768 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *PlanRateCardUpdateOne) SetPrice(v *productcatalog.Price) *PlanRateCardUpdateOne", + "line": 774 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *PlanRateCardUpdateOne) ClearPrice() *PlanRateCardUpdateOne", + "line": 780 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *PlanRateCardUpdateOne) SetDiscounts(v *productcatalog.Discounts) *PlanRateCardUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *PlanRateCardUpdateOne) ClearDiscounts() *PlanRateCardUpdateOne", + "line": 792 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (_u *PlanRateCardUpdateOne) SetPhaseID(v string) *PlanRateCardUpdateOne", + "line": 798 + }, + { + "kind": "func", + "name": "SetNillablePhaseID", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillablePhaseID(v *string) *PlanRateCardUpdateOne", + "line": 804 + }, + { + "kind": "func", + "name": "SetFeatureID", + "signature": "func (_u *PlanRateCardUpdateOne) SetFeatureID(v string) *PlanRateCardUpdateOne", + "line": 812 + }, + { + "kind": "func", + "name": "SetNillableFeatureID", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableFeatureID(v *string) *PlanRateCardUpdateOne", + "line": 818 + }, + { + "kind": "func", + "name": "ClearFeatureID", + "signature": "func (_u *PlanRateCardUpdateOne) ClearFeatureID() *PlanRateCardUpdateOne", + "line": 826 + }, + { + "kind": "func", + "name": "SetPhase", + "signature": "func (_u *PlanRateCardUpdateOne) SetPhase(v *PlanPhase) *PlanRateCardUpdateOne", + "line": 832 + }, + { + "kind": "func", + "name": "SetFeaturesID", + "signature": "func (_u *PlanRateCardUpdateOne) SetFeaturesID(id string) *PlanRateCardUpdateOne", + "line": 837 + }, + { + "kind": "func", + "name": "SetNillableFeaturesID", + "signature": "func (_u *PlanRateCardUpdateOne) SetNillableFeaturesID(id *string) *PlanRateCardUpdateOne", + "line": 843 + }, + { + "kind": "func", + "name": "SetFeatures", + "signature": "func (_u *PlanRateCardUpdateOne) SetFeatures(v *Feature) *PlanRateCardUpdateOne", + "line": 851 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *PlanRateCardUpdateOne) SetTaxCode(v *TaxCode) *PlanRateCardUpdateOne", + "line": 856 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *PlanRateCardUpdateOne) Mutation() *PlanRateCardMutation", + "line": 861 + }, + { + "kind": "func", + "name": "ClearPhase", + "signature": "func (_u *PlanRateCardUpdateOne) ClearPhase() *PlanRateCardUpdateOne", + "line": 866 + }, + { + "kind": "func", + "name": "ClearFeatures", + "signature": "func (_u *PlanRateCardUpdateOne) ClearFeatures() *PlanRateCardUpdateOne", + "line": 872 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *PlanRateCardUpdateOne) ClearTaxCode() *PlanRateCardUpdateOne", + "line": 878 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *PlanRateCardUpdateOne) Where(ps ...predicate.PlanRateCard) *PlanRateCardUpdateOne", + "line": 884 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *PlanRateCardUpdateOne) Select(field string, fields ...string) *PlanRateCardUpdateOne", + "line": 891 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *PlanRateCardUpdateOne) Save(ctx context.Context) (*PlanRateCard, error)", + "line": 897 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *PlanRateCardUpdateOne) SaveX(ctx context.Context) *PlanRateCard", + "line": 903 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *PlanRateCardUpdateOne) Exec(ctx context.Context) error", + "line": 912 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *PlanRateCardUpdateOne) ExecX(ctx context.Context)", + "line": 918 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *PlanRateCardUpdateOne) defaults()", + "line": 925 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *PlanRateCardUpdateOne) check() error", + "line": 933 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *PlanRateCardUpdateOne) sqlSave(ctx context.Context) (_node *PlanRateCard, err error)", + "line": 970 + } + ], + "line_count": 1181 + }, + "openmeter/ent/db/predicate/predicate.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\ntype Addon func(*sql.Selector)", + "symbols": [ + { + "kind": "func", + "name": "AddonOrErr", + "signature": "func AddonOrErr(p Addon, err error) Addon", + "line": 13 + }, + { + "kind": "func", + "name": "AddonRateCardOrErr", + "signature": "func AddonRateCardOrErr(p AddonRateCard, err error) AddonRateCard", + "line": 27 + }, + { + "kind": "func", + "name": "BillingInvoiceLineOrErr", + "signature": "func BillingInvoiceLineOrErr(p BillingInvoiceLine, err error) BillingInvoiceLine", + "line": 74 + }, + { + "kind": "func", + "name": "BillingInvoiceLineDiscountOrErr", + "signature": "func BillingInvoiceLineDiscountOrErr(p BillingInvoiceLineDiscount, err error) BillingInvoiceLineDiscount", + "line": 88 + }, + { + "kind": "func", + "name": "BillingInvoiceLineUsageDiscountOrErr", + "signature": "func BillingInvoiceLineUsageDiscountOrErr(p BillingInvoiceLineUsageDiscount, err error) BillingInvoiceLineUsageDiscount", + "line": 102 + }, + { + "kind": "func", + "name": "BillingInvoiceSplitLineGroupOrErr", + "signature": "func BillingInvoiceSplitLineGroupOrErr(p BillingInvoiceSplitLineGroup, err error) BillingInvoiceSplitLineGroup", + "line": 116 + }, + { + "kind": "func", + "name": "BillingInvoiceUsageBasedLineConfigOrErr", + "signature": "func BillingInvoiceUsageBasedLineConfigOrErr(p BillingInvoiceUsageBasedLineConfig, err error) BillingInvoiceUsageBasedLineConfig", + "line": 130 + }, + { + "kind": "func", + "name": "BillingStandardInvoiceDetailedLineAmountDiscountOrErr", + "signature": "func BillingStandardInvoiceDetailedLineAmountDiscountOrErr(p BillingStandardInvoiceDetailedLineAmountDiscount, err error) BillingStandardInvoiceDetailedLineAmountDiscount", + "line": 159 + }, + { + "kind": "func", + "name": "ChargeCreditPurchaseOrErr", + "signature": "func ChargeCreditPurchaseOrErr(p ChargeCreditPurchase, err error) ChargeCreditPurchase", + "line": 179 + }, + { + "kind": "func", + "name": "ChargeFlatFeeOrErr", + "signature": "func ChargeFlatFeeOrErr(p ChargeFlatFee, err error) ChargeFlatFee", + "line": 202 + }, + { + "kind": "func", + "name": "ChargeUsageBasedOrErr", + "signature": "func ChargeUsageBasedOrErr(p ChargeUsageBased, err error) ChargeUsageBased", + "line": 231 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func EntitlementOrErr(p Entitlement, err error) Entitlement", + "line": 281 + }, + { + "kind": "func", + "name": "LLMCostPriceOrErr", + "signature": "func LLMCostPriceOrErr(p LLMCostPrice, err error) LLMCostPrice", + "line": 301 + }, + { + "kind": "func", + "name": "NotificationChannelOrErr", + "signature": "func NotificationChannelOrErr(p NotificationChannel, err error) NotificationChannel", + "line": 342 + }, + { + "kind": "func", + "name": "NotificationRuleOrErr", + "signature": "func NotificationRuleOrErr(p NotificationRule, err error) NotificationRule", + "line": 362 + }, + { + "kind": "func", + "name": "PlanOrErr", + "signature": "func PlanOrErr(p Plan, err error) Plan", + "line": 379 + }, + { + "kind": "func", + "name": "PlanRateCardOrErr", + "signature": "func PlanRateCardOrErr(p PlanRateCard, err error) PlanRateCard", + "line": 399 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func SubscriptionOrErr(p Subscription, err error) Subscription", + "line": 416 + }, + { + "kind": "func", + "name": "SubscriptionItemOrErr", + "signature": "func SubscriptionItemOrErr(p SubscriptionItem, err error) SubscriptionItem", + "line": 439 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func TaxCodeOrErr(p TaxCode, err error) TaxCode", + "line": 456 + } + ], + "line_count": 467 + }, + "openmeter/ent/db/runtime.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 105 + } + ], + "line_count": 2831 + }, + "openmeter/ent/db/runtime/runtime.go": { + "header": "const (\n\tVersion = \"v0.14.6\" // Version of ent codegen.\n\tSum = \"h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=\" // Sum of ent codegen.", + "symbols": [], + "line_count": 10 + }, + "openmeter/ent/db/setorclear.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AddonUpdate) SetOrClearMetadata(value *map[string]string) *AddonUpdate", + "line": 22 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AddonUpdateOne) SetOrClearMetadata(value *map[string]string) *AddonUpdateOne", + "line": 29 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AddonUpdate) SetOrClearDeletedAt(value *time.Time) *AddonUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AddonUpdateOne) SetOrClearDeletedAt(value *time.Time) *AddonUpdateOne", + "line": 43 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AddonUpdate) SetOrClearDescription(value *string) *AddonUpdate", + "line": 50 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AddonUpdateOne) SetOrClearDescription(value *string) *AddonUpdateOne", + "line": 57 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveFrom", + "signature": "func (u *AddonUpdate) SetOrClearEffectiveFrom(value *time.Time) *AddonUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveFrom", + "signature": "func (u *AddonUpdateOne) SetOrClearEffectiveFrom(value *time.Time) *AddonUpdateOne", + "line": 71 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *AddonUpdate) SetOrClearEffectiveTo(value *time.Time) *AddonUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *AddonUpdateOne) SetOrClearEffectiveTo(value *time.Time) *AddonUpdateOne", + "line": 85 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *AddonUpdate) SetOrClearAnnotations(value *models.Annotations) *AddonUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *AddonUpdateOne) SetOrClearAnnotations(value *models.Annotations) *AddonUpdateOne", + "line": 99 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AddonRateCardUpdate) SetOrClearMetadata(value *map[string]string) *AddonRateCardUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearMetadata(value *map[string]string) *AddonRateCardUpdateOne", + "line": 113 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AddonRateCardUpdate) SetOrClearDeletedAt(value *time.Time) *AddonRateCardUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearDeletedAt(value *time.Time) *AddonRateCardUpdateOne", + "line": 127 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AddonRateCardUpdate) SetOrClearDescription(value *string) *AddonRateCardUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearDescription(value *string) *AddonRateCardUpdateOne", + "line": 141 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *AddonRateCardUpdate) SetOrClearTaxCodeID(value *string) *AddonRateCardUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearTaxCodeID(value *string) *AddonRateCardUpdateOne", + "line": 155 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *AddonRateCardUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *AddonRateCardUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *AddonRateCardUpdateOne", + "line": 169 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *AddonRateCardUpdate) SetOrClearFeatureKey(value *string) *AddonRateCardUpdate", + "line": 176 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearFeatureKey(value *string) *AddonRateCardUpdateOne", + "line": 183 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *AddonRateCardUpdate) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *AddonRateCardUpdate", + "line": 190 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *AddonRateCardUpdateOne", + "line": 197 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *AddonRateCardUpdate) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *AddonRateCardUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *AddonRateCardUpdateOne", + "line": 211 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *AddonRateCardUpdate) SetOrClearBillingCadence(value *datetime.ISODurationString) *AddonRateCardUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearBillingCadence(value *datetime.ISODurationString) *AddonRateCardUpdateOne", + "line": 225 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *AddonRateCardUpdate) SetOrClearPrice(value **productcatalog.Price) *AddonRateCardUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearPrice(value **productcatalog.Price) *AddonRateCardUpdateOne", + "line": 239 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *AddonRateCardUpdate) SetOrClearDiscounts(value **productcatalog.Discounts) *AddonRateCardUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearDiscounts(value **productcatalog.Discounts) *AddonRateCardUpdateOne", + "line": 253 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *AddonRateCardUpdate) SetOrClearFeatureID(value *string) *AddonRateCardUpdate", + "line": 260 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *AddonRateCardUpdateOne) SetOrClearFeatureID(value *string) *AddonRateCardUpdateOne", + "line": 267 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AppUpdate) SetOrClearMetadata(value *map[string]string) *AppUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AppUpdateOne) SetOrClearMetadata(value *map[string]string) *AppUpdateOne", + "line": 281 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppUpdate) SetOrClearDeletedAt(value *time.Time) *AppUpdate", + "line": 288 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppUpdateOne", + "line": 295 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AppUpdate) SetOrClearDescription(value *string) *AppUpdate", + "line": 302 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *AppUpdateOne) SetOrClearDescription(value *string) *AppUpdateOne", + "line": 309 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomInvoicingUpdate) SetOrClearDeletedAt(value *time.Time) *AppCustomInvoicingUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomInvoicingUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppCustomInvoicingUpdateOne", + "line": 323 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpdate) SetOrClearDeletedAt(value *time.Time) *AppCustomInvoicingCustomerUpdate", + "line": 330 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomInvoicingCustomerUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppCustomInvoicingCustomerUpdateOne", + "line": 337 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpdate) SetOrClearMetadata(value *map[string]string) *AppCustomInvoicingCustomerUpdate", + "line": 344 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *AppCustomInvoicingCustomerUpdateOne) SetOrClearMetadata(value *map[string]string) *AppCustomInvoicingCustomerUpdateOne", + "line": 351 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomerUpdate) SetOrClearDeletedAt(value *time.Time) *AppCustomerUpdate", + "line": 358 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppCustomerUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppCustomerUpdateOne", + "line": 365 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppStripeUpdate) SetOrClearDeletedAt(value *time.Time) *AppStripeUpdate", + "line": 372 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppStripeUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppStripeUpdateOne", + "line": 379 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppStripeCustomerUpdate) SetOrClearDeletedAt(value *time.Time) *AppStripeCustomerUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *AppStripeCustomerUpdateOne) SetOrClearDeletedAt(value *time.Time) *AppStripeCustomerUpdateOne", + "line": 393 + }, + { + "kind": "func", + "name": "SetOrClearStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpdate) SetOrClearStripeDefaultPaymentMethodID(value *string) *AppStripeCustomerUpdate", + "line": 400 + }, + { + "kind": "func", + "name": "SetOrClearStripeDefaultPaymentMethodID", + "signature": "func (u *AppStripeCustomerUpdateOne) SetOrClearStripeDefaultPaymentMethodID(value *string) *AppStripeCustomerUpdateOne", + "line": 407 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BalanceSnapshotUpdate) SetOrClearDeletedAt(value *time.Time) *BalanceSnapshotUpdate", + "line": 414 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BalanceSnapshotUpdateOne) SetOrClearDeletedAt(value *time.Time) *BalanceSnapshotUpdateOne", + "line": 421 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearDeletedAt(value *time.Time) *BillingCustomerOverrideUpdate", + "line": 428 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingCustomerOverrideUpdateOne", + "line": 435 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearTaxCodeID(value *string) *BillingCustomerOverrideUpdate", + "line": 442 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearTaxCodeID(value *string) *BillingCustomerOverrideUpdateOne", + "line": 449 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingCustomerOverrideUpdate", + "line": 456 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingCustomerOverrideUpdateOne", + "line": 463 + }, + { + "kind": "func", + "name": "SetOrClearBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearBillingProfileID(value *string) *BillingCustomerOverrideUpdate", + "line": 470 + }, + { + "kind": "func", + "name": "SetOrClearBillingProfileID", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearBillingProfileID(value *string) *BillingCustomerOverrideUpdateOne", + "line": 477 + }, + { + "kind": "func", + "name": "SetOrClearCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearCollectionAlignment(value *billing.AlignmentKind) *BillingCustomerOverrideUpdate", + "line": 484 + }, + { + "kind": "func", + "name": "SetOrClearCollectionAlignment", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearCollectionAlignment(value *billing.AlignmentKind) *BillingCustomerOverrideUpdateOne", + "line": 491 + }, + { + "kind": "func", + "name": "SetOrClearAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearAnchoredAlignmentDetail(value **billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpdate", + "line": 498 + }, + { + "kind": "func", + "name": "SetOrClearAnchoredAlignmentDetail", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearAnchoredAlignmentDetail(value **billing.AnchoredAlignmentDetail) *BillingCustomerOverrideUpdateOne", + "line": 505 + }, + { + "kind": "func", + "name": "SetOrClearLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearLineCollectionPeriod(value *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 512 + }, + { + "kind": "func", + "name": "SetOrClearLineCollectionPeriod", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearLineCollectionPeriod(value *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 519 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceAutoAdvance(value *bool) *BillingCustomerOverrideUpdate", + "line": 526 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceAutoAdvance", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceAutoAdvance(value *bool) *BillingCustomerOverrideUpdateOne", + "line": 533 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceDraftPeriod(value *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 540 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDraftPeriod", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceDraftPeriod(value *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 547 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceDueAfter(value *datetime.ISODurationString) *BillingCustomerOverrideUpdate", + "line": 554 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDueAfter", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceDueAfter(value *datetime.ISODurationString) *BillingCustomerOverrideUpdateOne", + "line": 561 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceCollectionMethod(value *billing.CollectionMethod) *BillingCustomerOverrideUpdate", + "line": 568 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceCollectionMethod", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceCollectionMethod(value *billing.CollectionMethod) *BillingCustomerOverrideUpdateOne", + "line": 575 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceProgressiveBilling(value *bool) *BillingCustomerOverrideUpdate", + "line": 582 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceProgressiveBilling", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceProgressiveBilling(value *bool) *BillingCustomerOverrideUpdateOne", + "line": 589 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpdate) SetOrClearInvoiceDefaultTaxConfig(value *productcatalog.TaxConfig) *BillingCustomerOverrideUpdate", + "line": 596 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDefaultTaxConfig", + "signature": "func (u *BillingCustomerOverrideUpdateOne) SetOrClearInvoiceDefaultTaxConfig(value *productcatalog.TaxConfig) *BillingCustomerOverrideUpdateOne", + "line": 603 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearMetadata(value *map[string]string) *BillingInvoiceUpdate", + "line": 610 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearMetadata(value *map[string]string) *BillingInvoiceUpdateOne", + "line": 617 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceUpdate", + "line": 624 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 631 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressCountry(value *models.CountryCode) *BillingInvoiceUpdate", + "line": 638 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCountry", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressCountry(value *models.CountryCode) *BillingInvoiceUpdateOne", + "line": 645 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressPostalCode(value *string) *BillingInvoiceUpdate", + "line": 652 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPostalCode", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressPostalCode(value *string) *BillingInvoiceUpdateOne", + "line": 659 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressState", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressState(value *string) *BillingInvoiceUpdate", + "line": 666 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressState", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressState(value *string) *BillingInvoiceUpdateOne", + "line": 673 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressCity(value *string) *BillingInvoiceUpdate", + "line": 680 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCity", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressCity(value *string) *BillingInvoiceUpdateOne", + "line": 687 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressLine1(value *string) *BillingInvoiceUpdate", + "line": 694 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine1", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressLine1(value *string) *BillingInvoiceUpdateOne", + "line": 701 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressLine2(value *string) *BillingInvoiceUpdate", + "line": 708 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine2", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressLine2(value *string) *BillingInvoiceUpdateOne", + "line": 715 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierAddressPhoneNumber(value *string) *BillingInvoiceUpdate", + "line": 722 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierAddressPhoneNumber(value *string) *BillingInvoiceUpdateOne", + "line": 729 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressCountry(value *models.CountryCode) *BillingInvoiceUpdate", + "line": 736 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressCountry", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressCountry(value *models.CountryCode) *BillingInvoiceUpdateOne", + "line": 743 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressPostalCode(value *string) *BillingInvoiceUpdate", + "line": 750 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressPostalCode", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressPostalCode(value *string) *BillingInvoiceUpdateOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressState", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressState(value *string) *BillingInvoiceUpdate", + "line": 764 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressState", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressState(value *string) *BillingInvoiceUpdateOne", + "line": 771 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressCity(value *string) *BillingInvoiceUpdate", + "line": 778 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressCity", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressCity(value *string) *BillingInvoiceUpdateOne", + "line": 785 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressLine1(value *string) *BillingInvoiceUpdate", + "line": 792 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressLine1", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressLine1(value *string) *BillingInvoiceUpdateOne", + "line": 799 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressLine2(value *string) *BillingInvoiceUpdate", + "line": 806 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressLine2", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressLine2(value *string) *BillingInvoiceUpdateOne", + "line": 813 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerAddressPhoneNumber(value *string) *BillingInvoiceUpdate", + "line": 820 + }, + { + "kind": "func", + "name": "SetOrClearCustomerAddressPhoneNumber", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerAddressPhoneNumber(value *string) *BillingInvoiceUpdateOne", + "line": 827 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceUpdate", + "line": 834 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceUpdateOne", + "line": 841 + }, + { + "kind": "func", + "name": "SetOrClearPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearPaymentAppExternalID(value *string) *BillingInvoiceUpdate", + "line": 848 + }, + { + "kind": "func", + "name": "SetOrClearPaymentAppExternalID", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearPaymentAppExternalID(value *string) *BillingInvoiceUpdateOne", + "line": 855 + }, + { + "kind": "func", + "name": "SetOrClearTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearTaxAppExternalID(value *string) *BillingInvoiceUpdate", + "line": 862 + }, + { + "kind": "func", + "name": "SetOrClearTaxAppExternalID", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearTaxAppExternalID(value *string) *BillingInvoiceUpdateOne", + "line": 869 + }, + { + "kind": "func", + "name": "SetOrClearSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSupplierTaxCode(value *string) *BillingInvoiceUpdate", + "line": 876 + }, + { + "kind": "func", + "name": "SetOrClearSupplierTaxCode", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSupplierTaxCode(value *string) *BillingInvoiceUpdateOne", + "line": 883 + }, + { + "kind": "func", + "name": "SetOrClearCustomerKey", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerKey(value *string) *BillingInvoiceUpdate", + "line": 890 + }, + { + "kind": "func", + "name": "SetOrClearCustomerKey", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerKey(value *string) *BillingInvoiceUpdateOne", + "line": 897 + }, + { + "kind": "func", + "name": "SetOrClearCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCustomerUsageAttribution(value **billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpdate", + "line": 904 + }, + { + "kind": "func", + "name": "SetOrClearCustomerUsageAttribution", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCustomerUsageAttribution(value **billing.VersionedCustomerUsageAttribution) *BillingInvoiceUpdateOne", + "line": 911 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearDescription(value *string) *BillingInvoiceUpdate", + "line": 918 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearDescription(value *string) *BillingInvoiceUpdateOne", + "line": 925 + }, + { + "kind": "func", + "name": "SetOrClearVoidedAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearVoidedAt(value *time.Time) *BillingInvoiceUpdate", + "line": 932 + }, + { + "kind": "func", + "name": "SetOrClearVoidedAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearVoidedAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 939 + }, + { + "kind": "func", + "name": "SetOrClearIssuedAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearIssuedAt(value *time.Time) *BillingInvoiceUpdate", + "line": 946 + }, + { + "kind": "func", + "name": "SetOrClearIssuedAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearIssuedAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 953 + }, + { + "kind": "func", + "name": "SetOrClearSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearSentToCustomerAt(value *time.Time) *BillingInvoiceUpdate", + "line": 960 + }, + { + "kind": "func", + "name": "SetOrClearSentToCustomerAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearSentToCustomerAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 967 + }, + { + "kind": "func", + "name": "SetOrClearDraftUntil", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearDraftUntil(value *time.Time) *BillingInvoiceUpdate", + "line": 974 + }, + { + "kind": "func", + "name": "SetOrClearDraftUntil", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearDraftUntil(value *time.Time) *BillingInvoiceUpdateOne", + "line": 981 + }, + { + "kind": "func", + "name": "SetOrClearQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearQuantitySnapshotedAt(value *time.Time) *BillingInvoiceUpdate", + "line": 988 + }, + { + "kind": "func", + "name": "SetOrClearQuantitySnapshotedAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearQuantitySnapshotedAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 995 + }, + { + "kind": "func", + "name": "SetOrClearDueAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearDueAt(value *time.Time) *BillingInvoiceUpdate", + "line": 1002 + }, + { + "kind": "func", + "name": "SetOrClearDueAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearDueAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 1009 + }, + { + "kind": "func", + "name": "SetOrClearStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearStatusDetailsCache(value *billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdate", + "line": 1016 + }, + { + "kind": "func", + "name": "SetOrClearStatusDetailsCache", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearStatusDetailsCache(value *billing.StandardInvoiceStatusDetails) *BillingInvoiceUpdateOne", + "line": 1023 + }, + { + "kind": "func", + "name": "SetOrClearPeriodStart", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearPeriodStart(value *time.Time) *BillingInvoiceUpdate", + "line": 1030 + }, + { + "kind": "func", + "name": "SetOrClearPeriodStart", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearPeriodStart(value *time.Time) *BillingInvoiceUpdateOne", + "line": 1037 + }, + { + "kind": "func", + "name": "SetOrClearPeriodEnd", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearPeriodEnd(value *time.Time) *BillingInvoiceUpdate", + "line": 1044 + }, + { + "kind": "func", + "name": "SetOrClearPeriodEnd", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearPeriodEnd(value *time.Time) *BillingInvoiceUpdateOne", + "line": 1051 + }, + { + "kind": "func", + "name": "SetOrClearCollectionAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearCollectionAt(value *time.Time) *BillingInvoiceUpdate", + "line": 1058 + }, + { + "kind": "func", + "name": "SetOrClearCollectionAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearCollectionAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 1065 + }, + { + "kind": "func", + "name": "SetOrClearPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpdate) SetOrClearPaymentProcessingEnteredAt(value *time.Time) *BillingInvoiceUpdate", + "line": 1072 + }, + { + "kind": "func", + "name": "SetOrClearPaymentProcessingEnteredAt", + "signature": "func (u *BillingInvoiceUpdateOne) SetOrClearPaymentProcessingEnteredAt(value *time.Time) *BillingInvoiceUpdateOne", + "line": 1079 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpdate) SetOrClearIndex(value *int) *BillingInvoiceFlatFeeLineConfigUpdate", + "line": 1086 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *BillingInvoiceFlatFeeLineConfigUpdateOne) SetOrClearIndex(value *int) *BillingInvoiceFlatFeeLineConfigUpdateOne", + "line": 1093 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearAnnotations(value *models.Annotations) *BillingInvoiceLineUpdate", + "line": 1100 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearAnnotations(value *models.Annotations) *BillingInvoiceLineUpdateOne", + "line": 1107 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearMetadata(value *map[string]string) *BillingInvoiceLineUpdate", + "line": 1114 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearMetadata(value *map[string]string) *BillingInvoiceLineUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineUpdate", + "line": 1128 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineUpdateOne", + "line": 1135 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearDescription(value *string) *BillingInvoiceLineUpdate", + "line": 1142 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearDescription(value *string) *BillingInvoiceLineUpdateOne", + "line": 1149 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearTaxConfig(value *billing.TaxConfig) *BillingInvoiceLineUpdate", + "line": 1156 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearTaxConfig(value *billing.TaxConfig) *BillingInvoiceLineUpdateOne", + "line": 1163 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearTaxCodeID(value *string) *BillingInvoiceLineUpdate", + "line": 1170 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearTaxCodeID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1177 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingInvoiceLineUpdate", + "line": 1184 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingInvoiceLineUpdateOne", + "line": 1191 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineUpdate", + "line": 1198 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1205 + }, + { + "kind": "func", + "name": "SetOrClearParentLineID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearParentLineID(value *string) *BillingInvoiceLineUpdate", + "line": 1212 + }, + { + "kind": "func", + "name": "SetOrClearParentLineID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearParentLineID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1219 + }, + { + "kind": "func", + "name": "SetOrClearOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearOverrideCollectionPeriodEnd(value *time.Time) *BillingInvoiceLineUpdate", + "line": 1226 + }, + { + "kind": "func", + "name": "SetOrClearOverrideCollectionPeriodEnd", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearOverrideCollectionPeriodEnd(value *time.Time) *BillingInvoiceLineUpdateOne", + "line": 1233 + }, + { + "kind": "func", + "name": "SetOrClearQuantity", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineUpdate", + "line": 1240 + }, + { + "kind": "func", + "name": "SetOrClearQuantity", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineUpdateOne", + "line": 1247 + }, + { + "kind": "func", + "name": "SetOrClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearRatecardDiscounts(value **billing.Discounts) *BillingInvoiceLineUpdate", + "line": 1254 + }, + { + "kind": "func", + "name": "SetOrClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearRatecardDiscounts(value **billing.Discounts) *BillingInvoiceLineUpdateOne", + "line": 1261 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineUpdate", + "line": 1268 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1275 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSubscriptionID(value *string) *BillingInvoiceLineUpdate", + "line": 1282 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSubscriptionID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1289 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSubscriptionPhaseID(value *string) *BillingInvoiceLineUpdate", + "line": 1296 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionPhaseID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSubscriptionPhaseID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1303 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSubscriptionItemID(value *string) *BillingInvoiceLineUpdate", + "line": 1310 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSubscriptionItemID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1317 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSubscriptionBillingPeriodFrom(value *time.Time) *BillingInvoiceLineUpdate", + "line": 1324 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSubscriptionBillingPeriodFrom(value *time.Time) *BillingInvoiceLineUpdateOne", + "line": 1331 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSubscriptionBillingPeriodTo(value *time.Time) *BillingInvoiceLineUpdate", + "line": 1338 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSubscriptionBillingPeriodTo(value *time.Time) *BillingInvoiceLineUpdateOne", + "line": 1345 + }, + { + "kind": "func", + "name": "SetOrClearSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearSplitLineGroupID(value *string) *BillingInvoiceLineUpdate", + "line": 1352 + }, + { + "kind": "func", + "name": "SetOrClearSplitLineGroupID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearSplitLineGroupID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1359 + }, + { + "kind": "func", + "name": "SetOrClearChargeID", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearChargeID(value *string) *BillingInvoiceLineUpdate", + "line": 1366 + }, + { + "kind": "func", + "name": "SetOrClearChargeID", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearChargeID(value *string) *BillingInvoiceLineUpdateOne", + "line": 1373 + }, + { + "kind": "func", + "name": "SetOrClearLineIds", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearLineIds(value *string) *BillingInvoiceLineUpdate", + "line": 1380 + }, + { + "kind": "func", + "name": "SetOrClearLineIds", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearLineIds(value *string) *BillingInvoiceLineUpdateOne", + "line": 1387 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpdate) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *BillingInvoiceLineUpdate", + "line": 1394 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *BillingInvoiceLineUpdateOne) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *BillingInvoiceLineUpdateOne", + "line": 1401 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineDiscountUpdate", + "line": 1408 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineDiscountUpdateOne", + "line": 1415 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineDiscountUpdate", + "line": 1422 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 1429 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineDiscountUpdate", + "line": 1436 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 1443 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearDescription(value *string) *BillingInvoiceLineDiscountUpdate", + "line": 1450 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearDescription(value *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 1457 + }, + { + "kind": "func", + "name": "SetOrClearRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearRoundingAmount(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 1464 + }, + { + "kind": "func", + "name": "SetOrClearRoundingAmount", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearRoundingAmount(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 1471 + }, + { + "kind": "func", + "name": "SetOrClearSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearSourceDiscount(value **billing.DiscountReason) *BillingInvoiceLineDiscountUpdate", + "line": 1478 + }, + { + "kind": "func", + "name": "SetOrClearSourceDiscount", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearSourceDiscount(value **billing.DiscountReason) *BillingInvoiceLineDiscountUpdateOne", + "line": 1485 + }, + { + "kind": "func", + "name": "SetOrClearType", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearType(value *string) *BillingInvoiceLineDiscountUpdate", + "line": 1492 + }, + { + "kind": "func", + "name": "SetOrClearType", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearType(value *string) *BillingInvoiceLineDiscountUpdateOne", + "line": 1499 + }, + { + "kind": "func", + "name": "SetOrClearQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 1506 + }, + { + "kind": "func", + "name": "SetOrClearQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 1513 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpdate) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdate", + "line": 1520 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineDiscountUpdateOne) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineDiscountUpdateOne", + "line": 1527 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1534 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1541 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1548 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1555 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1562 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearChildUniqueReferenceID(value *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1569 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearDescription(value *string) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1576 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearDescription(value *string) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1583 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1590 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1597 + }, + { + "kind": "func", + "name": "SetOrClearReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdate) SetOrClearReasonDetails(value **billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpdate", + "line": 1604 + }, + { + "kind": "func", + "name": "SetOrClearReasonDetails", + "signature": "func (u *BillingInvoiceLineUsageDiscountUpdateOne) SetOrClearReasonDetails(value **billing.DiscountReason) *BillingInvoiceLineUsageDiscountUpdateOne", + "line": 1611 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearMetadata(value *map[string]string) *BillingInvoiceSplitLineGroupUpdate", + "line": 1618 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearMetadata(value *map[string]string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1625 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 1632 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1639 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearDescription(value *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 1646 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearDescription(value *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1653 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdate", + "line": 1660 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1667 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearTaxCodeID(value *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 1674 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearTaxCodeID(value *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1681 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdate", + "line": 1688 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1695 + }, + { + "kind": "func", + "name": "SetOrClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearRatecardDiscounts(value **billing.Discounts) *BillingInvoiceSplitLineGroupUpdate", + "line": 1702 + }, + { + "kind": "func", + "name": "SetOrClearRatecardDiscounts", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearRatecardDiscounts(value **billing.Discounts) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1709 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearSubscriptionBillingPeriodFrom(value *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 1716 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodFrom", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearSubscriptionBillingPeriodFrom(value *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1723 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearSubscriptionBillingPeriodTo(value *time.Time) *BillingInvoiceSplitLineGroupUpdate", + "line": 1730 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionBillingPeriodTo", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearSubscriptionBillingPeriodTo(value *time.Time) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1737 + }, + { + "kind": "func", + "name": "SetOrClearChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdate) SetOrClearChargeID(value *string) *BillingInvoiceSplitLineGroupUpdate", + "line": 1744 + }, + { + "kind": "func", + "name": "SetOrClearChargeID", + "signature": "func (u *BillingInvoiceSplitLineGroupUpdateOne) SetOrClearChargeID(value *string) *BillingInvoiceSplitLineGroupUpdateOne", + "line": 1751 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdate) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 1758 + }, + { + "kind": "func", + "name": "SetOrClearPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetOrClearPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 1765 + }, + { + "kind": "func", + "name": "SetOrClearMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdate) SetOrClearMeteredPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 1772 + }, + { + "kind": "func", + "name": "SetOrClearMeteredPreLinePeriodQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetOrClearMeteredPreLinePeriodQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 1779 + }, + { + "kind": "func", + "name": "SetOrClearMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdate) SetOrClearMeteredQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdate", + "line": 1786 + }, + { + "kind": "func", + "name": "SetOrClearMeteredQuantity", + "signature": "func (u *BillingInvoiceUsageBasedLineConfigUpdateOne) SetOrClearMeteredQuantity(value *alpacadecimal.Decimal) *BillingInvoiceUsageBasedLineConfigUpdateOne", + "line": 1793 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpdate) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceValidationIssueUpdate", + "line": 1800 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingInvoiceValidationIssueUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingInvoiceValidationIssueUpdateOne", + "line": 1807 + }, + { + "kind": "func", + "name": "SetOrClearCode", + "signature": "func (u *BillingInvoiceValidationIssueUpdate) SetOrClearCode(value *string) *BillingInvoiceValidationIssueUpdate", + "line": 1814 + }, + { + "kind": "func", + "name": "SetOrClearCode", + "signature": "func (u *BillingInvoiceValidationIssueUpdateOne) SetOrClearCode(value *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 1821 + }, + { + "kind": "func", + "name": "SetOrClearPath", + "signature": "func (u *BillingInvoiceValidationIssueUpdate) SetOrClearPath(value *string) *BillingInvoiceValidationIssueUpdate", + "line": 1828 + }, + { + "kind": "func", + "name": "SetOrClearPath", + "signature": "func (u *BillingInvoiceValidationIssueUpdateOne) SetOrClearPath(value *string) *BillingInvoiceValidationIssueUpdateOne", + "line": 1835 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingProfileUpdate) SetOrClearMetadata(value *map[string]string) *BillingProfileUpdate", + "line": 1842 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearMetadata(value *map[string]string) *BillingProfileUpdateOne", + "line": 1849 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingProfileUpdate) SetOrClearDeletedAt(value *time.Time) *BillingProfileUpdate", + "line": 1856 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingProfileUpdateOne", + "line": 1863 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingProfileUpdate) SetOrClearDescription(value *string) *BillingProfileUpdate", + "line": 1870 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearDescription(value *string) *BillingProfileUpdateOne", + "line": 1877 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCountry", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressCountry(value *models.CountryCode) *BillingProfileUpdate", + "line": 1884 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCountry", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressCountry(value *models.CountryCode) *BillingProfileUpdateOne", + "line": 1891 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressPostalCode(value *string) *BillingProfileUpdate", + "line": 1898 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPostalCode", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressPostalCode(value *string) *BillingProfileUpdateOne", + "line": 1905 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressState", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressState(value *string) *BillingProfileUpdate", + "line": 1912 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressState", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressState(value *string) *BillingProfileUpdateOne", + "line": 1919 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCity", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressCity(value *string) *BillingProfileUpdate", + "line": 1926 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressCity", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressCity(value *string) *BillingProfileUpdateOne", + "line": 1933 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine1", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressLine1(value *string) *BillingProfileUpdate", + "line": 1940 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine1", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressLine1(value *string) *BillingProfileUpdateOne", + "line": 1947 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine2", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressLine2(value *string) *BillingProfileUpdate", + "line": 1954 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressLine2", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressLine2(value *string) *BillingProfileUpdateOne", + "line": 1961 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierAddressPhoneNumber(value *string) *BillingProfileUpdate", + "line": 1968 + }, + { + "kind": "func", + "name": "SetOrClearSupplierAddressPhoneNumber", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierAddressPhoneNumber(value *string) *BillingProfileUpdateOne", + "line": 1975 + }, + { + "kind": "func", + "name": "SetOrClearSupplierTaxCode", + "signature": "func (u *BillingProfileUpdate) SetOrClearSupplierTaxCode(value *string) *BillingProfileUpdate", + "line": 1982 + }, + { + "kind": "func", + "name": "SetOrClearSupplierTaxCode", + "signature": "func (u *BillingProfileUpdateOne) SetOrClearSupplierTaxCode(value *string) *BillingProfileUpdateOne", + "line": 1989 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdate", + "line": 1996 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2003 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearTaxCodeID(value *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2010 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearTaxCodeID(value *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2017 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2024 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2031 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2038 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2045 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearIndex(value *int) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2052 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearIndex(value *int) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2059 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2066 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2073 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearAnnotations(value *models.Annotations) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2080 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearAnnotations(value *models.Annotations) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2087 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearMetadata(value *map[string]string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2094 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearMetadata(value *map[string]string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2101 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearDeletedAt(value *time.Time) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2108 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2115 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdate) SetOrClearDescription(value *string) *BillingStandardInvoiceDetailedLineUpdate", + "line": 2122 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineUpdateOne) SetOrClearDescription(value *string) *BillingStandardInvoiceDetailedLineUpdateOne", + "line": 2129 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearDeletedAt(value *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2136 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2143 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearInvoicingAppExternalID(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2150 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2157 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearChildUniqueReferenceID(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2164 + }, + { + "kind": "func", + "name": "SetOrClearChildUniqueReferenceID", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearChildUniqueReferenceID(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2171 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearDescription(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2178 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearDescription(value *string) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2185 + }, + { + "kind": "func", + "name": "SetOrClearRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearRoundingAmount(value *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2192 + }, + { + "kind": "func", + "name": "SetOrClearRoundingAmount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearRoundingAmount(value *alpacadecimal.Decimal) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2199 + }, + { + "kind": "func", + "name": "SetOrClearSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdate) SetOrClearSourceDiscount(value **billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpdate", + "line": 2206 + }, + { + "kind": "func", + "name": "SetOrClearSourceDiscount", + "signature": "func (u *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne) SetOrClearSourceDiscount(value **billing.DiscountReason) *BillingStandardInvoiceDetailedLineAmountDiscountUpdateOne", + "line": 2213 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpdate) SetOrClearDeletedAt(value *time.Time) *BillingWorkflowConfigUpdate", + "line": 2220 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *BillingWorkflowConfigUpdateOne) SetOrClearDeletedAt(value *time.Time) *BillingWorkflowConfigUpdateOne", + "line": 2227 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpdate) SetOrClearTaxCodeID(value *string) *BillingWorkflowConfigUpdate", + "line": 2234 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *BillingWorkflowConfigUpdateOne) SetOrClearTaxCodeID(value *string) *BillingWorkflowConfigUpdateOne", + "line": 2241 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingWorkflowConfigUpdate", + "line": 2248 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *BillingWorkflowConfigUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *BillingWorkflowConfigUpdateOne", + "line": 2255 + }, + { + "kind": "func", + "name": "SetOrClearAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpdate) SetOrClearAnchoredAlignmentDetail(value **billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpdate", + "line": 2262 + }, + { + "kind": "func", + "name": "SetOrClearAnchoredAlignmentDetail", + "signature": "func (u *BillingWorkflowConfigUpdateOne) SetOrClearAnchoredAlignmentDetail(value **billing.AnchoredAlignmentDetail) *BillingWorkflowConfigUpdateOne", + "line": 2269 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpdate) SetOrClearInvoiceDefaultTaxSettings(value *productcatalog.TaxConfig) *BillingWorkflowConfigUpdate", + "line": 2276 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceDefaultTaxSettings", + "signature": "func (u *BillingWorkflowConfigUpdateOne) SetOrClearInvoiceDefaultTaxSettings(value *productcatalog.TaxConfig) *BillingWorkflowConfigUpdateOne", + "line": 2283 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUpdate", + "line": 2290 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUpdateOne", + "line": 2297 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearSubscriptionItemID(value *string) *ChargeCreditPurchaseUpdate", + "line": 2304 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearSubscriptionItemID(value *string) *ChargeCreditPurchaseUpdateOne", + "line": 2311 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearAdvanceAfter(value *time.Time) *ChargeCreditPurchaseUpdate", + "line": 2318 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearAdvanceAfter(value *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 2325 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearTaxCodeID(value *string) *ChargeCreditPurchaseUpdate", + "line": 2332 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearTaxCodeID(value *string) *ChargeCreditPurchaseUpdateOne", + "line": 2339 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdate", + "line": 2346 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeCreditPurchaseUpdateOne", + "line": 2353 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseUpdate", + "line": 2360 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseUpdateOne", + "line": 2367 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearMetadata(value *map[string]string) *ChargeCreditPurchaseUpdate", + "line": 2374 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearMetadata(value *map[string]string) *ChargeCreditPurchaseUpdateOne", + "line": 2381 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseUpdate", + "line": 2388 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseUpdateOne", + "line": 2395 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeCreditPurchaseUpdate) SetOrClearDescription(value *string) *ChargeCreditPurchaseUpdate", + "line": 2402 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeCreditPurchaseUpdateOne) SetOrClearDescription(value *string) *ChargeCreditPurchaseUpdateOne", + "line": 2409 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseCreditGrantUpdate", + "line": 2416 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseCreditGrantUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseCreditGrantUpdateOne", + "line": 2423 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2430 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2437 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearAuthorizedAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2444 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearAuthorizedAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2451 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearSettledTransactionGroupID(value *string) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2458 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearSettledTransactionGroupID(value *string) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2465 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearSettledAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2472 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearSettledAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2479 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2486 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2493 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseExternalPaymentUpdate", + "line": 2500 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseExternalPaymentUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseExternalPaymentUpdateOne", + "line": 2507 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2514 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2521 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearAuthorizedAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2528 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearAuthorizedAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2535 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearSettledTransactionGroupID(value *string) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2542 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearSettledTransactionGroupID(value *string) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2549 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearSettledAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2556 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearSettledAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2563 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2570 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2577 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpdate", + "line": 2584 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeCreditPurchaseInvoicedPaymentUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeCreditPurchaseInvoicedPaymentUpdateOne", + "line": 2591 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearSubscriptionItemID(value *string) *ChargeFlatFeeUpdate", + "line": 2598 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearSubscriptionItemID(value *string) *ChargeFlatFeeUpdateOne", + "line": 2605 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearAdvanceAfter(value *time.Time) *ChargeFlatFeeUpdate", + "line": 2612 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearAdvanceAfter(value *time.Time) *ChargeFlatFeeUpdateOne", + "line": 2619 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearTaxCodeID(value *string) *ChargeFlatFeeUpdate", + "line": 2626 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearTaxCodeID(value *string) *ChargeFlatFeeUpdateOne", + "line": 2633 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeFlatFeeUpdate", + "line": 2640 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeFlatFeeUpdateOne", + "line": 2647 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeUpdate", + "line": 2654 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeUpdateOne", + "line": 2661 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearMetadata(value *map[string]string) *ChargeFlatFeeUpdate", + "line": 2668 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearMetadata(value *map[string]string) *ChargeFlatFeeUpdateOne", + "line": 2675 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeUpdate", + "line": 2682 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeUpdateOne", + "line": 2689 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearDescription(value *string) *ChargeFlatFeeUpdate", + "line": 2696 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearDescription(value *string) *ChargeFlatFeeUpdateOne", + "line": 2703 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearDiscounts(value **productcatalog.Discounts) *ChargeFlatFeeUpdate", + "line": 2710 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearDiscounts(value **productcatalog.Discounts) *ChargeFlatFeeUpdateOne", + "line": 2717 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearFeatureKey(value *string) *ChargeFlatFeeUpdate", + "line": 2724 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearFeatureKey(value *string) *ChargeFlatFeeUpdateOne", + "line": 2731 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearFeatureID(value *string) *ChargeFlatFeeUpdate", + "line": 2738 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearFeatureID(value *string) *ChargeFlatFeeUpdateOne", + "line": 2745 + }, + { + "kind": "func", + "name": "SetOrClearCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpdate) SetOrClearCurrentRealizationRunID(value *string) *ChargeFlatFeeUpdate", + "line": 2752 + }, + { + "kind": "func", + "name": "SetOrClearCurrentRealizationRunID", + "signature": "func (u *ChargeFlatFeeUpdateOne) SetOrClearCurrentRealizationRunID(value *string) *ChargeFlatFeeUpdateOne", + "line": 2759 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunUpdate", + "line": 2766 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunUpdateOne", + "line": 2773 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeFlatFeeRunUpdate) SetOrClearLineID(value *string) *ChargeFlatFeeRunUpdate", + "line": 2780 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeFlatFeeRunUpdateOne) SetOrClearLineID(value *string) *ChargeFlatFeeRunUpdateOne", + "line": 2787 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpdate) SetOrClearInvoiceID(value *string) *ChargeFlatFeeRunUpdate", + "line": 2794 + }, + { + "kind": "func", + "name": "SetOrClearInvoiceID", + "signature": "func (u *ChargeFlatFeeRunUpdateOne) SetOrClearInvoiceID(value *string) *ChargeFlatFeeRunUpdateOne", + "line": 2801 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdate) SetOrClearLineID(value *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 2808 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetOrClearLineID(value *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 2815 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdate) SetOrClearCorrectsRealizationID(value *string) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 2822 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRealizationID", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetOrClearCorrectsRealizationID(value *string) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 2829 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 2836 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 2843 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpdate", + "line": 2850 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunCreditAllocationsUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunCreditAllocationsUpdateOne", + "line": 2857 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2864 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2871 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearTaxCodeID(value *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2878 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearTaxCodeID(value *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2885 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2892 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2899 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearInvoicingAppExternalID(value *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2906 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2913 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearIndex(value *int) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2920 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearIndex(value *int) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2927 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2934 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2941 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2948 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2955 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearMetadata(value *map[string]string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2962 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearMetadata(value *map[string]string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2969 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2976 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2983 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdate) SetOrClearDescription(value *string) *ChargeFlatFeeRunDetailedLineUpdate", + "line": 2990 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeFlatFeeRunDetailedLineUpdateOne) SetOrClearDescription(value *string) *ChargeFlatFeeRunDetailedLineUpdateOne", + "line": 2997 + }, + { + "kind": "func", + "name": "SetOrClearLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdate) SetOrClearLedgerTransactionGroupID(value *string) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 3004 + }, + { + "kind": "func", + "name": "SetOrClearLedgerTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetOrClearLedgerTransactionGroupID(value *string) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 3011 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 3018 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 3025 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpdate", + "line": 3032 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunInvoicedUsageUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunInvoicedUsageUpdateOne", + "line": 3039 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeFlatFeeRunPaymentUpdate", + "line": 3046 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3053 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearAuthorizedAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 3060 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearAuthorizedAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3067 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearSettledTransactionGroupID(value *string) *ChargeFlatFeeRunPaymentUpdate", + "line": 3074 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearSettledTransactionGroupID(value *string) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3081 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearSettledAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 3088 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearSettledAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3095 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdate", + "line": 3102 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3109 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunPaymentUpdate", + "line": 3116 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeFlatFeeRunPaymentUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeFlatFeeRunPaymentUpdateOne", + "line": 3123 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearSubscriptionItemID(value *string) *ChargeUsageBasedUpdate", + "line": 3130 + }, + { + "kind": "func", + "name": "SetOrClearSubscriptionItemID", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearSubscriptionItemID(value *string) *ChargeUsageBasedUpdateOne", + "line": 3137 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearAdvanceAfter(value *time.Time) *ChargeUsageBasedUpdate", + "line": 3144 + }, + { + "kind": "func", + "name": "SetOrClearAdvanceAfter", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearAdvanceAfter(value *time.Time) *ChargeUsageBasedUpdateOne", + "line": 3151 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearTaxCodeID(value *string) *ChargeUsageBasedUpdate", + "line": 3158 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearTaxCodeID(value *string) *ChargeUsageBasedUpdateOne", + "line": 3165 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeUsageBasedUpdate", + "line": 3172 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeUsageBasedUpdateOne", + "line": 3179 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedUpdate", + "line": 3186 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedUpdateOne", + "line": 3193 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearMetadata(value *map[string]string) *ChargeUsageBasedUpdate", + "line": 3200 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearMetadata(value *map[string]string) *ChargeUsageBasedUpdateOne", + "line": 3207 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedUpdate", + "line": 3214 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedUpdateOne", + "line": 3221 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearDescription(value *string) *ChargeUsageBasedUpdate", + "line": 3228 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearDescription(value *string) *ChargeUsageBasedUpdateOne", + "line": 3235 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearDiscounts(value **productcatalog.Discounts) *ChargeUsageBasedUpdate", + "line": 3242 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearDiscounts(value **productcatalog.Discounts) *ChargeUsageBasedUpdateOne", + "line": 3249 + }, + { + "kind": "func", + "name": "SetOrClearCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpdate) SetOrClearCurrentRealizationRunID(value *string) *ChargeUsageBasedUpdate", + "line": 3256 + }, + { + "kind": "func", + "name": "SetOrClearCurrentRealizationRunID", + "signature": "func (u *ChargeUsageBasedUpdateOne) SetOrClearCurrentRealizationRunID(value *string) *ChargeUsageBasedUpdateOne", + "line": 3263 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdate) SetOrClearLineID(value *string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 3270 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetOrClearLineID(value *string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 3277 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdate) SetOrClearCorrectsRealizationID(value *string) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 3284 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRealizationID", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetOrClearCorrectsRealizationID(value *string) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 3291 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 3298 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 3305 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpdate", + "line": 3312 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunCreditAllocationsUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunCreditAllocationsUpdateOne", + "line": 3319 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3326 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearTaxConfig(value *productcatalog.TaxConfig) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3333 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearTaxCodeID(value *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3340 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearTaxCodeID(value *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3347 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3354 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3361 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearInvoicingAppExternalID(value *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3368 + }, + { + "kind": "func", + "name": "SetOrClearInvoicingAppExternalID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearInvoicingAppExternalID(value *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3375 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearIndex(value *int) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3382 + }, + { + "kind": "func", + "name": "SetOrClearIndex", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearIndex(value *int) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3389 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3396 + }, + { + "kind": "func", + "name": "SetOrClearCreditsApplied", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearCreditsApplied(value **creditsapplied.CreditsApplied) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3403 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3410 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3417 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearMetadata(value *map[string]string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3424 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearMetadata(value *map[string]string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3431 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3438 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3445 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearDescription(value *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3452 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearDescription(value *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3459 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdate) SetOrClearCorrectsRunID(value *string) *ChargeUsageBasedRunDetailedLineUpdate", + "line": 3466 + }, + { + "kind": "func", + "name": "SetOrClearCorrectsRunID", + "signature": "func (u *ChargeUsageBasedRunDetailedLineUpdateOne) SetOrClearCorrectsRunID(value *string) *ChargeUsageBasedRunDetailedLineUpdateOne", + "line": 3473 + }, + { + "kind": "func", + "name": "SetOrClearLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdate) SetOrClearLedgerTransactionGroupID(value *string) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 3480 + }, + { + "kind": "func", + "name": "SetOrClearLedgerTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetOrClearLedgerTransactionGroupID(value *string) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 3487 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 3494 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 3501 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpdate", + "line": 3508 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunInvoicedUsageUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunInvoicedUsageUpdateOne", + "line": 3515 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeUsageBasedRunPaymentUpdate", + "line": 3522 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearAuthorizedTransactionGroupID(value *string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3529 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearAuthorizedAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 3536 + }, + { + "kind": "func", + "name": "SetOrClearAuthorizedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearAuthorizedAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3543 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearSettledTransactionGroupID(value *string) *ChargeUsageBasedRunPaymentUpdate", + "line": 3550 + }, + { + "kind": "func", + "name": "SetOrClearSettledTransactionGroupID", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearSettledTransactionGroupID(value *string) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3557 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearSettledAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 3564 + }, + { + "kind": "func", + "name": "SetOrClearSettledAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearSettledAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3571 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdate", + "line": 3578 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3585 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdate) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunPaymentUpdate", + "line": 3592 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *ChargeUsageBasedRunPaymentUpdateOne) SetOrClearAnnotations(value *models.Annotations) *ChargeUsageBasedRunPaymentUpdateOne", + "line": 3599 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpdate) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunsUpdate", + "line": 3606 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *ChargeUsageBasedRunsUpdateOne) SetOrClearDeletedAt(value *time.Time) *ChargeUsageBasedRunsUpdateOne", + "line": 3613 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeUsageBasedRunsUpdate) SetOrClearLineID(value *string) *ChargeUsageBasedRunsUpdate", + "line": 3620 + }, + { + "kind": "func", + "name": "SetOrClearLineID", + "signature": "func (u *ChargeUsageBasedRunsUpdateOne) SetOrClearLineID(value *string) *ChargeUsageBasedRunsUpdateOne", + "line": 3627 + }, + { + "kind": "func", + "name": "SetOrClearBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpdate) SetOrClearBackingTransactionGroupID(value *string) *CreditRealizationLineageSegmentUpdate", + "line": 3634 + }, + { + "kind": "func", + "name": "SetOrClearBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpdateOne) SetOrClearBackingTransactionGroupID(value *string) *CreditRealizationLineageSegmentUpdateOne", + "line": 3641 + }, + { + "kind": "func", + "name": "SetOrClearSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpdate) SetOrClearSourceState(value *creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdate", + "line": 3648 + }, + { + "kind": "func", + "name": "SetOrClearSourceState", + "signature": "func (u *CreditRealizationLineageSegmentUpdateOne) SetOrClearSourceState(value *creditrealization.LineageSegmentState) *CreditRealizationLineageSegmentUpdateOne", + "line": 3655 + }, + { + "kind": "func", + "name": "SetOrClearSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpdate) SetOrClearSourceBackingTransactionGroupID(value *string) *CreditRealizationLineageSegmentUpdate", + "line": 3662 + }, + { + "kind": "func", + "name": "SetOrClearSourceBackingTransactionGroupID", + "signature": "func (u *CreditRealizationLineageSegmentUpdateOne) SetOrClearSourceBackingTransactionGroupID(value *string) *CreditRealizationLineageSegmentUpdateOne", + "line": 3669 + }, + { + "kind": "func", + "name": "SetOrClearClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpdate) SetOrClearClosedAt(value *time.Time) *CreditRealizationLineageSegmentUpdate", + "line": 3676 + }, + { + "kind": "func", + "name": "SetOrClearClosedAt", + "signature": "func (u *CreditRealizationLineageSegmentUpdateOne) SetOrClearClosedAt(value *time.Time) *CreditRealizationLineageSegmentUpdateOne", + "line": 3683 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CurrencyCostBasisUpdate) SetOrClearDeletedAt(value *time.Time) *CurrencyCostBasisUpdate", + "line": 3690 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CurrencyCostBasisUpdateOne) SetOrClearDeletedAt(value *time.Time) *CurrencyCostBasisUpdateOne", + "line": 3697 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomCurrencyUpdate) SetOrClearDeletedAt(value *time.Time) *CustomCurrencyUpdate", + "line": 3704 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomCurrencyUpdateOne) SetOrClearDeletedAt(value *time.Time) *CustomCurrencyUpdateOne", + "line": 3711 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *CustomerUpdate) SetOrClearMetadata(value *map[string]string) *CustomerUpdate", + "line": 3718 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *CustomerUpdateOne) SetOrClearMetadata(value *map[string]string) *CustomerUpdateOne", + "line": 3725 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomerUpdate) SetOrClearDeletedAt(value *time.Time) *CustomerUpdate", + "line": 3732 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomerUpdateOne) SetOrClearDeletedAt(value *time.Time) *CustomerUpdateOne", + "line": 3739 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *CustomerUpdate) SetOrClearDescription(value *string) *CustomerUpdate", + "line": 3746 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *CustomerUpdateOne) SetOrClearDescription(value *string) *CustomerUpdateOne", + "line": 3753 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressCountry", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressCountry(value *models.CountryCode) *CustomerUpdate", + "line": 3760 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressCountry", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressCountry(value *models.CountryCode) *CustomerUpdateOne", + "line": 3767 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressPostalCode", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressPostalCode(value *string) *CustomerUpdate", + "line": 3774 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressPostalCode", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressPostalCode(value *string) *CustomerUpdateOne", + "line": 3781 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressState", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressState(value *string) *CustomerUpdate", + "line": 3788 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressState", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressState(value *string) *CustomerUpdateOne", + "line": 3795 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressCity", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressCity(value *string) *CustomerUpdate", + "line": 3802 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressCity", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressCity(value *string) *CustomerUpdateOne", + "line": 3809 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressLine1", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressLine1(value *string) *CustomerUpdate", + "line": 3816 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressLine1", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressLine1(value *string) *CustomerUpdateOne", + "line": 3823 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressLine2", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressLine2(value *string) *CustomerUpdate", + "line": 3830 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressLine2", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressLine2(value *string) *CustomerUpdateOne", + "line": 3837 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpdate) SetOrClearBillingAddressPhoneNumber(value *string) *CustomerUpdate", + "line": 3844 + }, + { + "kind": "func", + "name": "SetOrClearBillingAddressPhoneNumber", + "signature": "func (u *CustomerUpdateOne) SetOrClearBillingAddressPhoneNumber(value *string) *CustomerUpdateOne", + "line": 3851 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *CustomerUpdate) SetOrClearAnnotations(value *models.Annotations) *CustomerUpdate", + "line": 3858 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *CustomerUpdateOne) SetOrClearAnnotations(value *models.Annotations) *CustomerUpdateOne", + "line": 3865 + }, + { + "kind": "func", + "name": "SetOrClearKey", + "signature": "func (u *CustomerUpdate) SetOrClearKey(value *string) *CustomerUpdate", + "line": 3872 + }, + { + "kind": "func", + "name": "SetOrClearKey", + "signature": "func (u *CustomerUpdateOne) SetOrClearKey(value *string) *CustomerUpdateOne", + "line": 3879 + }, + { + "kind": "func", + "name": "SetOrClearPrimaryEmail", + "signature": "func (u *CustomerUpdate) SetOrClearPrimaryEmail(value *string) *CustomerUpdate", + "line": 3886 + }, + { + "kind": "func", + "name": "SetOrClearPrimaryEmail", + "signature": "func (u *CustomerUpdateOne) SetOrClearPrimaryEmail(value *string) *CustomerUpdateOne", + "line": 3893 + }, + { + "kind": "func", + "name": "SetOrClearCurrency", + "signature": "func (u *CustomerUpdate) SetOrClearCurrency(value *currencyx.Code) *CustomerUpdate", + "line": 3900 + }, + { + "kind": "func", + "name": "SetOrClearCurrency", + "signature": "func (u *CustomerUpdateOne) SetOrClearCurrency(value *currencyx.Code) *CustomerUpdateOne", + "line": 3907 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomerSubjectsUpdate) SetOrClearDeletedAt(value *time.Time) *CustomerSubjectsUpdate", + "line": 3914 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *CustomerSubjectsUpdateOne) SetOrClearDeletedAt(value *time.Time) *CustomerSubjectsUpdateOne", + "line": 3921 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *EntitlementUpdate) SetOrClearMetadata(value *map[string]string) *EntitlementUpdate", + "line": 3928 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *EntitlementUpdateOne) SetOrClearMetadata(value *map[string]string) *EntitlementUpdateOne", + "line": 3935 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *EntitlementUpdate) SetOrClearDeletedAt(value *time.Time) *EntitlementUpdate", + "line": 3942 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *EntitlementUpdateOne) SetOrClearDeletedAt(value *time.Time) *EntitlementUpdateOne", + "line": 3949 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *EntitlementUpdate) SetOrClearActiveTo(value *time.Time) *EntitlementUpdate", + "line": 3956 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *EntitlementUpdateOne) SetOrClearActiveTo(value *time.Time) *EntitlementUpdateOne", + "line": 3963 + }, + { + "kind": "func", + "name": "SetOrClearConfig", + "signature": "func (u *EntitlementUpdate) SetOrClearConfig(value *string) *EntitlementUpdate", + "line": 3970 + }, + { + "kind": "func", + "name": "SetOrClearConfig", + "signature": "func (u *EntitlementUpdateOne) SetOrClearConfig(value *string) *EntitlementUpdateOne", + "line": 3977 + }, + { + "kind": "func", + "name": "SetOrClearUsagePeriodAnchor", + "signature": "func (u *EntitlementUpdate) SetOrClearUsagePeriodAnchor(value *time.Time) *EntitlementUpdate", + "line": 3984 + }, + { + "kind": "func", + "name": "SetOrClearUsagePeriodAnchor", + "signature": "func (u *EntitlementUpdateOne) SetOrClearUsagePeriodAnchor(value *time.Time) *EntitlementUpdateOne", + "line": 3991 + }, + { + "kind": "func", + "name": "SetOrClearCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpdate) SetOrClearCurrentUsagePeriodStart(value *time.Time) *EntitlementUpdate", + "line": 3998 + }, + { + "kind": "func", + "name": "SetOrClearCurrentUsagePeriodStart", + "signature": "func (u *EntitlementUpdateOne) SetOrClearCurrentUsagePeriodStart(value *time.Time) *EntitlementUpdateOne", + "line": 4005 + }, + { + "kind": "func", + "name": "SetOrClearCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpdate) SetOrClearCurrentUsagePeriodEnd(value *time.Time) *EntitlementUpdate", + "line": 4012 + }, + { + "kind": "func", + "name": "SetOrClearCurrentUsagePeriodEnd", + "signature": "func (u *EntitlementUpdateOne) SetOrClearCurrentUsagePeriodEnd(value *time.Time) *EntitlementUpdateOne", + "line": 4019 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *EntitlementUpdate) SetOrClearAnnotations(value *models.Annotations) *EntitlementUpdate", + "line": 4026 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *EntitlementUpdateOne) SetOrClearAnnotations(value *models.Annotations) *EntitlementUpdateOne", + "line": 4033 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *FeatureUpdate) SetOrClearDeletedAt(value *time.Time) *FeatureUpdate", + "line": 4040 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *FeatureUpdateOne) SetOrClearDeletedAt(value *time.Time) *FeatureUpdateOne", + "line": 4047 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *FeatureUpdate) SetOrClearMetadata(value *map[string]string) *FeatureUpdate", + "line": 4054 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *FeatureUpdateOne) SetOrClearMetadata(value *map[string]string) *FeatureUpdateOne", + "line": 4061 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *FeatureUpdate) SetOrClearDescription(value *string) *FeatureUpdate", + "line": 4068 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *FeatureUpdateOne) SetOrClearDescription(value *string) *FeatureUpdateOne", + "line": 4075 + }, + { + "kind": "func", + "name": "SetOrClearMeterGroupByFilters", + "signature": "func (u *FeatureUpdate) SetOrClearMeterGroupByFilters(value *map[string]string) *FeatureUpdate", + "line": 4082 + }, + { + "kind": "func", + "name": "SetOrClearMeterGroupByFilters", + "signature": "func (u *FeatureUpdateOne) SetOrClearMeterGroupByFilters(value *map[string]string) *FeatureUpdateOne", + "line": 4089 + }, + { + "kind": "func", + "name": "SetOrClearAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpdate) SetOrClearAdvancedMeterGroupByFilters(value *feature.MeterGroupByFilters) *FeatureUpdate", + "line": 4096 + }, + { + "kind": "func", + "name": "SetOrClearAdvancedMeterGroupByFilters", + "signature": "func (u *FeatureUpdateOne) SetOrClearAdvancedMeterGroupByFilters(value *feature.MeterGroupByFilters) *FeatureUpdateOne", + "line": 4103 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostType", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostType(value *string) *FeatureUpdate", + "line": 4110 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostType", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostType(value *string) *FeatureUpdateOne", + "line": 4117 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostManualAmount", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostManualAmount(value *alpacadecimal.Decimal) *FeatureUpdate", + "line": 4124 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostManualAmount", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostManualAmount(value *alpacadecimal.Decimal) *FeatureUpdateOne", + "line": 4131 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmProviderProperty(value *string) *FeatureUpdate", + "line": 4138 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmProviderProperty", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmProviderProperty(value *string) *FeatureUpdateOne", + "line": 4145 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmProvider", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmProvider(value *string) *FeatureUpdate", + "line": 4152 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmProvider", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmProvider(value *string) *FeatureUpdateOne", + "line": 4159 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmModelProperty(value *string) *FeatureUpdate", + "line": 4166 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmModelProperty", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmModelProperty(value *string) *FeatureUpdateOne", + "line": 4173 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmModel", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmModel(value *string) *FeatureUpdate", + "line": 4180 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmModel", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmModel(value *string) *FeatureUpdateOne", + "line": 4187 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmTokenTypeProperty(value *string) *FeatureUpdate", + "line": 4194 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmTokenTypeProperty", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmTokenTypeProperty(value *string) *FeatureUpdateOne", + "line": 4201 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmTokenType", + "signature": "func (u *FeatureUpdate) SetOrClearUnitCostLlmTokenType(value *string) *FeatureUpdate", + "line": 4208 + }, + { + "kind": "func", + "name": "SetOrClearUnitCostLlmTokenType", + "signature": "func (u *FeatureUpdateOne) SetOrClearUnitCostLlmTokenType(value *string) *FeatureUpdateOne", + "line": 4215 + }, + { + "kind": "func", + "name": "SetOrClearArchivedAt", + "signature": "func (u *FeatureUpdate) SetOrClearArchivedAt(value *time.Time) *FeatureUpdate", + "line": 4222 + }, + { + "kind": "func", + "name": "SetOrClearArchivedAt", + "signature": "func (u *FeatureUpdateOne) SetOrClearArchivedAt(value *time.Time) *FeatureUpdateOne", + "line": 4229 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *GrantUpdate) SetOrClearAnnotations(value *models.Annotations) *GrantUpdate", + "line": 4236 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *GrantUpdateOne) SetOrClearAnnotations(value *models.Annotations) *GrantUpdateOne", + "line": 4243 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *GrantUpdate) SetOrClearDeletedAt(value *time.Time) *GrantUpdate", + "line": 4250 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *GrantUpdateOne) SetOrClearDeletedAt(value *time.Time) *GrantUpdateOne", + "line": 4257 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *GrantUpdate) SetOrClearMetadata(value *map[string]string) *GrantUpdate", + "line": 4264 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *GrantUpdateOne) SetOrClearMetadata(value *map[string]string) *GrantUpdateOne", + "line": 4271 + }, + { + "kind": "func", + "name": "SetOrClearVoidedAt", + "signature": "func (u *GrantUpdate) SetOrClearVoidedAt(value *time.Time) *GrantUpdate", + "line": 4278 + }, + { + "kind": "func", + "name": "SetOrClearVoidedAt", + "signature": "func (u *GrantUpdateOne) SetOrClearVoidedAt(value *time.Time) *GrantUpdateOne", + "line": 4285 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *LLMCostPriceUpdate) SetOrClearMetadata(value *map[string]string) *LLMCostPriceUpdate", + "line": 4292 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *LLMCostPriceUpdateOne) SetOrClearMetadata(value *map[string]string) *LLMCostPriceUpdateOne", + "line": 4299 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LLMCostPriceUpdate) SetOrClearDeletedAt(value *time.Time) *LLMCostPriceUpdate", + "line": 4306 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LLMCostPriceUpdateOne) SetOrClearDeletedAt(value *time.Time) *LLMCostPriceUpdateOne", + "line": 4313 + }, + { + "kind": "func", + "name": "SetOrClearNamespace", + "signature": "func (u *LLMCostPriceUpdate) SetOrClearNamespace(value *string) *LLMCostPriceUpdate", + "line": 4320 + }, + { + "kind": "func", + "name": "SetOrClearNamespace", + "signature": "func (u *LLMCostPriceUpdateOne) SetOrClearNamespace(value *string) *LLMCostPriceUpdateOne", + "line": 4327 + }, + { + "kind": "func", + "name": "SetOrClearSourcePrices", + "signature": "func (u *LLMCostPriceUpdate) SetOrClearSourcePrices(value *llmcost.SourcePricesMap) *LLMCostPriceUpdate", + "line": 4334 + }, + { + "kind": "func", + "name": "SetOrClearSourcePrices", + "signature": "func (u *LLMCostPriceUpdateOne) SetOrClearSourcePrices(value *llmcost.SourcePricesMap) *LLMCostPriceUpdateOne", + "line": 4341 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *LLMCostPriceUpdate) SetOrClearEffectiveTo(value *time.Time) *LLMCostPriceUpdate", + "line": 4348 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *LLMCostPriceUpdateOne) SetOrClearEffectiveTo(value *time.Time) *LLMCostPriceUpdateOne", + "line": 4355 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerAccountUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerAccountUpdate", + "line": 4362 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerAccountUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerAccountUpdateOne", + "line": 4369 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerAccountUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerAccountUpdate", + "line": 4376 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerAccountUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerAccountUpdateOne", + "line": 4383 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerBreakageRecordUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerBreakageRecordUpdate", + "line": 4390 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerBreakageRecordUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerBreakageRecordUpdateOne", + "line": 4397 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerBreakageRecordUpdate", + "line": 4404 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerBreakageRecordUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerBreakageRecordUpdateOne", + "line": 4411 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerCustomerAccountUpdate", + "line": 4418 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerCustomerAccountUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerCustomerAccountUpdateOne", + "line": 4425 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerEntryUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerEntryUpdate", + "line": 4432 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerEntryUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerEntryUpdateOne", + "line": 4439 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerEntryUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerEntryUpdate", + "line": 4446 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerEntryUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerEntryUpdateOne", + "line": 4453 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerSubAccountUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerSubAccountUpdate", + "line": 4460 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerSubAccountUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerSubAccountUpdateOne", + "line": 4467 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerSubAccountUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerSubAccountUpdate", + "line": 4474 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerSubAccountUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerSubAccountUpdateOne", + "line": 4481 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerSubAccountRouteUpdate", + "line": 4488 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerSubAccountRouteUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerSubAccountRouteUpdateOne", + "line": 4495 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerTransactionUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerTransactionUpdate", + "line": 4502 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerTransactionUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerTransactionUpdateOne", + "line": 4509 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerTransactionUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerTransactionUpdate", + "line": 4516 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerTransactionUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerTransactionUpdateOne", + "line": 4523 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerTransactionGroupUpdate) SetOrClearAnnotations(value *models.Annotations) *LedgerTransactionGroupUpdate", + "line": 4530 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *LedgerTransactionGroupUpdateOne) SetOrClearAnnotations(value *models.Annotations) *LedgerTransactionGroupUpdateOne", + "line": 4537 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpdate) SetOrClearDeletedAt(value *time.Time) *LedgerTransactionGroupUpdate", + "line": 4544 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *LedgerTransactionGroupUpdateOne) SetOrClearDeletedAt(value *time.Time) *LedgerTransactionGroupUpdateOne", + "line": 4551 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *MeterUpdate) SetOrClearMetadata(value *map[string]string) *MeterUpdate", + "line": 4558 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *MeterUpdateOne) SetOrClearMetadata(value *map[string]string) *MeterUpdateOne", + "line": 4565 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *MeterUpdate) SetOrClearDeletedAt(value *time.Time) *MeterUpdate", + "line": 4572 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *MeterUpdateOne) SetOrClearDeletedAt(value *time.Time) *MeterUpdateOne", + "line": 4579 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *MeterUpdate) SetOrClearDescription(value *string) *MeterUpdate", + "line": 4586 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *MeterUpdateOne) SetOrClearDescription(value *string) *MeterUpdateOne", + "line": 4593 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *MeterUpdate) SetOrClearAnnotations(value *models.Annotations) *MeterUpdate", + "line": 4600 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *MeterUpdateOne) SetOrClearAnnotations(value *models.Annotations) *MeterUpdateOne", + "line": 4607 + }, + { + "kind": "func", + "name": "SetOrClearValueProperty", + "signature": "func (u *MeterUpdate) SetOrClearValueProperty(value *string) *MeterUpdate", + "line": 4614 + }, + { + "kind": "func", + "name": "SetOrClearValueProperty", + "signature": "func (u *MeterUpdateOne) SetOrClearValueProperty(value *string) *MeterUpdateOne", + "line": 4621 + }, + { + "kind": "func", + "name": "SetOrClearGroupBy", + "signature": "func (u *MeterUpdate) SetOrClearGroupBy(value *map[string]string) *MeterUpdate", + "line": 4628 + }, + { + "kind": "func", + "name": "SetOrClearGroupBy", + "signature": "func (u *MeterUpdateOne) SetOrClearGroupBy(value *map[string]string) *MeterUpdateOne", + "line": 4635 + }, + { + "kind": "func", + "name": "SetOrClearEventFrom", + "signature": "func (u *MeterUpdate) SetOrClearEventFrom(value *time.Time) *MeterUpdate", + "line": 4642 + }, + { + "kind": "func", + "name": "SetOrClearEventFrom", + "signature": "func (u *MeterUpdateOne) SetOrClearEventFrom(value *time.Time) *MeterUpdateOne", + "line": 4649 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *NotificationChannelUpdate) SetOrClearDeletedAt(value *time.Time) *NotificationChannelUpdate", + "line": 4656 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *NotificationChannelUpdateOne) SetOrClearDeletedAt(value *time.Time) *NotificationChannelUpdateOne", + "line": 4663 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationChannelUpdate) SetOrClearAnnotations(value *models.Annotations) *NotificationChannelUpdate", + "line": 4670 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationChannelUpdateOne) SetOrClearAnnotations(value *models.Annotations) *NotificationChannelUpdateOne", + "line": 4677 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *NotificationChannelUpdate) SetOrClearMetadata(value *map[string]string) *NotificationChannelUpdate", + "line": 4684 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *NotificationChannelUpdateOne) SetOrClearMetadata(value *map[string]string) *NotificationChannelUpdateOne", + "line": 4691 + }, + { + "kind": "func", + "name": "SetOrClearDisabled", + "signature": "func (u *NotificationChannelUpdate) SetOrClearDisabled(value *bool) *NotificationChannelUpdate", + "line": 4698 + }, + { + "kind": "func", + "name": "SetOrClearDisabled", + "signature": "func (u *NotificationChannelUpdateOne) SetOrClearDisabled(value *bool) *NotificationChannelUpdateOne", + "line": 4705 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationEventUpdate) SetOrClearAnnotations(value *models.Annotations) *NotificationEventUpdate", + "line": 4712 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationEventUpdateOne) SetOrClearAnnotations(value *models.Annotations) *NotificationEventUpdateOne", + "line": 4719 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpdate) SetOrClearAnnotations(value *models.Annotations) *NotificationEventDeliveryStatusUpdate", + "line": 4726 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationEventDeliveryStatusUpdateOne) SetOrClearAnnotations(value *models.Annotations) *NotificationEventDeliveryStatusUpdateOne", + "line": 4733 + }, + { + "kind": "func", + "name": "SetOrClearReason", + "signature": "func (u *NotificationEventDeliveryStatusUpdate) SetOrClearReason(value *string) *NotificationEventDeliveryStatusUpdate", + "line": 4740 + }, + { + "kind": "func", + "name": "SetOrClearReason", + "signature": "func (u *NotificationEventDeliveryStatusUpdateOne) SetOrClearReason(value *string) *NotificationEventDeliveryStatusUpdateOne", + "line": 4747 + }, + { + "kind": "func", + "name": "SetOrClearNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpdate) SetOrClearNextAttemptAt(value *time.Time) *NotificationEventDeliveryStatusUpdate", + "line": 4754 + }, + { + "kind": "func", + "name": "SetOrClearNextAttemptAt", + "signature": "func (u *NotificationEventDeliveryStatusUpdateOne) SetOrClearNextAttemptAt(value *time.Time) *NotificationEventDeliveryStatusUpdateOne", + "line": 4761 + }, + { + "kind": "func", + "name": "SetOrClearAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpdate) SetOrClearAttempts(value *[]notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdate", + "line": 4768 + }, + { + "kind": "func", + "name": "SetOrClearAttempts", + "signature": "func (u *NotificationEventDeliveryStatusUpdateOne) SetOrClearAttempts(value *[]notification.EventDeliveryAttempt) *NotificationEventDeliveryStatusUpdateOne", + "line": 4775 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *NotificationRuleUpdate) SetOrClearDeletedAt(value *time.Time) *NotificationRuleUpdate", + "line": 4782 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *NotificationRuleUpdateOne) SetOrClearDeletedAt(value *time.Time) *NotificationRuleUpdateOne", + "line": 4789 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationRuleUpdate) SetOrClearAnnotations(value *models.Annotations) *NotificationRuleUpdate", + "line": 4796 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *NotificationRuleUpdateOne) SetOrClearAnnotations(value *models.Annotations) *NotificationRuleUpdateOne", + "line": 4803 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *NotificationRuleUpdate) SetOrClearMetadata(value *map[string]string) *NotificationRuleUpdate", + "line": 4810 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *NotificationRuleUpdateOne) SetOrClearMetadata(value *map[string]string) *NotificationRuleUpdateOne", + "line": 4817 + }, + { + "kind": "func", + "name": "SetOrClearDisabled", + "signature": "func (u *NotificationRuleUpdate) SetOrClearDisabled(value *bool) *NotificationRuleUpdate", + "line": 4824 + }, + { + "kind": "func", + "name": "SetOrClearDisabled", + "signature": "func (u *NotificationRuleUpdateOne) SetOrClearDisabled(value *bool) *NotificationRuleUpdateOne", + "line": 4831 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpdate) SetOrClearDeletedAt(value *time.Time) *OrganizationDefaultTaxCodesUpdate", + "line": 4838 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *OrganizationDefaultTaxCodesUpdateOne) SetOrClearDeletedAt(value *time.Time) *OrganizationDefaultTaxCodesUpdateOne", + "line": 4845 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanUpdate) SetOrClearMetadata(value *map[string]string) *PlanUpdate", + "line": 4852 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanUpdateOne) SetOrClearMetadata(value *map[string]string) *PlanUpdateOne", + "line": 4859 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanUpdate) SetOrClearDeletedAt(value *time.Time) *PlanUpdate", + "line": 4866 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanUpdateOne) SetOrClearDeletedAt(value *time.Time) *PlanUpdateOne", + "line": 4873 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanUpdate) SetOrClearDescription(value *string) *PlanUpdate", + "line": 4880 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanUpdateOne) SetOrClearDescription(value *string) *PlanUpdateOne", + "line": 4887 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveFrom", + "signature": "func (u *PlanUpdate) SetOrClearEffectiveFrom(value *time.Time) *PlanUpdate", + "line": 4894 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveFrom", + "signature": "func (u *PlanUpdateOne) SetOrClearEffectiveFrom(value *time.Time) *PlanUpdateOne", + "line": 4901 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *PlanUpdate) SetOrClearEffectiveTo(value *time.Time) *PlanUpdate", + "line": 4908 + }, + { + "kind": "func", + "name": "SetOrClearEffectiveTo", + "signature": "func (u *PlanUpdateOne) SetOrClearEffectiveTo(value *time.Time) *PlanUpdateOne", + "line": 4915 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanAddonUpdate) SetOrClearMetadata(value *map[string]string) *PlanAddonUpdate", + "line": 4922 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanAddonUpdateOne) SetOrClearMetadata(value *map[string]string) *PlanAddonUpdateOne", + "line": 4929 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *PlanAddonUpdate) SetOrClearAnnotations(value *models.Annotations) *PlanAddonUpdate", + "line": 4936 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *PlanAddonUpdateOne) SetOrClearAnnotations(value *models.Annotations) *PlanAddonUpdateOne", + "line": 4943 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanAddonUpdate) SetOrClearDeletedAt(value *time.Time) *PlanAddonUpdate", + "line": 4950 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanAddonUpdateOne) SetOrClearDeletedAt(value *time.Time) *PlanAddonUpdateOne", + "line": 4957 + }, + { + "kind": "func", + "name": "SetOrClearMaxQuantity", + "signature": "func (u *PlanAddonUpdate) SetOrClearMaxQuantity(value *int) *PlanAddonUpdate", + "line": 4964 + }, + { + "kind": "func", + "name": "SetOrClearMaxQuantity", + "signature": "func (u *PlanAddonUpdateOne) SetOrClearMaxQuantity(value *int) *PlanAddonUpdateOne", + "line": 4971 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanPhaseUpdate) SetOrClearMetadata(value *map[string]string) *PlanPhaseUpdate", + "line": 4978 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanPhaseUpdateOne) SetOrClearMetadata(value *map[string]string) *PlanPhaseUpdateOne", + "line": 4985 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanPhaseUpdate) SetOrClearDeletedAt(value *time.Time) *PlanPhaseUpdate", + "line": 4992 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanPhaseUpdateOne) SetOrClearDeletedAt(value *time.Time) *PlanPhaseUpdateOne", + "line": 4999 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanPhaseUpdate) SetOrClearDescription(value *string) *PlanPhaseUpdate", + "line": 5006 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanPhaseUpdateOne) SetOrClearDescription(value *string) *PlanPhaseUpdateOne", + "line": 5013 + }, + { + "kind": "func", + "name": "SetOrClearDuration", + "signature": "func (u *PlanPhaseUpdate) SetOrClearDuration(value *datetime.ISODurationString) *PlanPhaseUpdate", + "line": 5020 + }, + { + "kind": "func", + "name": "SetOrClearDuration", + "signature": "func (u *PlanPhaseUpdateOne) SetOrClearDuration(value *datetime.ISODurationString) *PlanPhaseUpdateOne", + "line": 5027 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanRateCardUpdate) SetOrClearMetadata(value *map[string]string) *PlanRateCardUpdate", + "line": 5034 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearMetadata(value *map[string]string) *PlanRateCardUpdateOne", + "line": 5041 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanRateCardUpdate) SetOrClearDeletedAt(value *time.Time) *PlanRateCardUpdate", + "line": 5048 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearDeletedAt(value *time.Time) *PlanRateCardUpdateOne", + "line": 5055 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanRateCardUpdate) SetOrClearDescription(value *string) *PlanRateCardUpdate", + "line": 5062 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearDescription(value *string) *PlanRateCardUpdateOne", + "line": 5069 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *PlanRateCardUpdate) SetOrClearTaxCodeID(value *string) *PlanRateCardUpdate", + "line": 5076 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearTaxCodeID(value *string) *PlanRateCardUpdateOne", + "line": 5083 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *PlanRateCardUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *PlanRateCardUpdate", + "line": 5090 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *PlanRateCardUpdateOne", + "line": 5097 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *PlanRateCardUpdate) SetOrClearFeatureKey(value *string) *PlanRateCardUpdate", + "line": 5104 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearFeatureKey(value *string) *PlanRateCardUpdateOne", + "line": 5111 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *PlanRateCardUpdate) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *PlanRateCardUpdate", + "line": 5118 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *PlanRateCardUpdateOne", + "line": 5125 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *PlanRateCardUpdate) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *PlanRateCardUpdate", + "line": 5132 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *PlanRateCardUpdateOne", + "line": 5139 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *PlanRateCardUpdate) SetOrClearBillingCadence(value *datetime.ISODurationString) *PlanRateCardUpdate", + "line": 5146 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearBillingCadence(value *datetime.ISODurationString) *PlanRateCardUpdateOne", + "line": 5153 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *PlanRateCardUpdate) SetOrClearPrice(value **productcatalog.Price) *PlanRateCardUpdate", + "line": 5160 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearPrice(value **productcatalog.Price) *PlanRateCardUpdateOne", + "line": 5167 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *PlanRateCardUpdate) SetOrClearDiscounts(value **productcatalog.Discounts) *PlanRateCardUpdate", + "line": 5174 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearDiscounts(value **productcatalog.Discounts) *PlanRateCardUpdateOne", + "line": 5181 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *PlanRateCardUpdate) SetOrClearFeatureID(value *string) *PlanRateCardUpdate", + "line": 5188 + }, + { + "kind": "func", + "name": "SetOrClearFeatureID", + "signature": "func (u *PlanRateCardUpdateOne) SetOrClearFeatureID(value *string) *PlanRateCardUpdateOne", + "line": 5195 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubjectUpdate) SetOrClearDeletedAt(value *time.Time) *SubjectUpdate", + "line": 5202 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubjectUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubjectUpdateOne", + "line": 5209 + }, + { + "kind": "func", + "name": "SetOrClearDisplayName", + "signature": "func (u *SubjectUpdate) SetOrClearDisplayName(value *string) *SubjectUpdate", + "line": 5216 + }, + { + "kind": "func", + "name": "SetOrClearDisplayName", + "signature": "func (u *SubjectUpdateOne) SetOrClearDisplayName(value *string) *SubjectUpdateOne", + "line": 5223 + }, + { + "kind": "func", + "name": "SetOrClearStripeCustomerID", + "signature": "func (u *SubjectUpdate) SetOrClearStripeCustomerID(value *string) *SubjectUpdate", + "line": 5230 + }, + { + "kind": "func", + "name": "SetOrClearStripeCustomerID", + "signature": "func (u *SubjectUpdateOne) SetOrClearStripeCustomerID(value *string) *SubjectUpdateOne", + "line": 5237 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubjectUpdate) SetOrClearMetadata(value *map[string]interface{}) *SubjectUpdate", + "line": 5244 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubjectUpdateOne) SetOrClearMetadata(value *map[string]interface{}) *SubjectUpdateOne", + "line": 5251 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *SubscriptionUpdate) SetOrClearAnnotations(value *models.Annotations) *SubscriptionUpdate", + "line": 5258 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearAnnotations(value *models.Annotations) *SubscriptionUpdateOne", + "line": 5265 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionUpdate) SetOrClearDeletedAt(value *time.Time) *SubscriptionUpdate", + "line": 5272 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubscriptionUpdateOne", + "line": 5279 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionUpdate) SetOrClearMetadata(value *map[string]string) *SubscriptionUpdate", + "line": 5286 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearMetadata(value *map[string]string) *SubscriptionUpdateOne", + "line": 5293 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *SubscriptionUpdate) SetOrClearActiveTo(value *time.Time) *SubscriptionUpdate", + "line": 5300 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearActiveTo(value *time.Time) *SubscriptionUpdateOne", + "line": 5307 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionUpdate) SetOrClearDescription(value *string) *SubscriptionUpdate", + "line": 5314 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearDescription(value *string) *SubscriptionUpdateOne", + "line": 5321 + }, + { + "kind": "func", + "name": "SetOrClearPlanID", + "signature": "func (u *SubscriptionUpdate) SetOrClearPlanID(value *string) *SubscriptionUpdate", + "line": 5328 + }, + { + "kind": "func", + "name": "SetOrClearPlanID", + "signature": "func (u *SubscriptionUpdateOne) SetOrClearPlanID(value *string) *SubscriptionUpdateOne", + "line": 5335 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionAddonUpdate) SetOrClearMetadata(value *map[string]string) *SubscriptionAddonUpdate", + "line": 5342 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionAddonUpdateOne) SetOrClearMetadata(value *map[string]string) *SubscriptionAddonUpdateOne", + "line": 5349 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionAddonUpdate) SetOrClearDeletedAt(value *time.Time) *SubscriptionAddonUpdate", + "line": 5356 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionAddonUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubscriptionAddonUpdateOne", + "line": 5363 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpdate) SetOrClearDeletedAt(value *time.Time) *SubscriptionAddonQuantityUpdate", + "line": 5370 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubscriptionAddonQuantityUpdateOne", + "line": 5377 + }, + { + "kind": "func", + "name": "SetOrClearNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpdate) SetOrClearNextSyncAfter(value *time.Time) *SubscriptionBillingSyncStateUpdate", + "line": 5384 + }, + { + "kind": "func", + "name": "SetOrClearNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpdateOne) SetOrClearNextSyncAfter(value *time.Time) *SubscriptionBillingSyncStateUpdateOne", + "line": 5391 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearDeletedAt(value *time.Time) *SubscriptionItemUpdate", + "line": 5398 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubscriptionItemUpdateOne", + "line": 5405 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearMetadata(value *map[string]string) *SubscriptionItemUpdate", + "line": 5412 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearMetadata(value *map[string]string) *SubscriptionItemUpdateOne", + "line": 5419 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearTaxCodeID(value *string) *SubscriptionItemUpdate", + "line": 5426 + }, + { + "kind": "func", + "name": "SetOrClearTaxCodeID", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearTaxCodeID(value *string) *SubscriptionItemUpdateOne", + "line": 5433 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *SubscriptionItemUpdate", + "line": 5440 + }, + { + "kind": "func", + "name": "SetOrClearTaxBehavior", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearTaxBehavior(value *productcatalog.TaxBehavior) *SubscriptionItemUpdateOne", + "line": 5447 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearAnnotations(value *models.Annotations) *SubscriptionItemUpdate", + "line": 5454 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearAnnotations(value *models.Annotations) *SubscriptionItemUpdateOne", + "line": 5461 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearActiveTo(value *time.Time) *SubscriptionItemUpdate", + "line": 5468 + }, + { + "kind": "func", + "name": "SetOrClearActiveTo", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearActiveTo(value *time.Time) *SubscriptionItemUpdateOne", + "line": 5475 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementID", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearEntitlementID(value *string) *SubscriptionItemUpdate", + "line": 5482 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementID", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearEntitlementID(value *string) *SubscriptionItemUpdateOne", + "line": 5489 + }, + { + "kind": "func", + "name": "SetOrClearRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearRestartsBillingPeriod(value *bool) *SubscriptionItemUpdate", + "line": 5496 + }, + { + "kind": "func", + "name": "SetOrClearRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearRestartsBillingPeriod(value *bool) *SubscriptionItemUpdateOne", + "line": 5503 + }, + { + "kind": "func", + "name": "SetOrClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearActiveFromOverrideRelativeToPhaseStart(value *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 5510 + }, + { + "kind": "func", + "name": "SetOrClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearActiveFromOverrideRelativeToPhaseStart(value *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 5517 + }, + { + "kind": "func", + "name": "SetOrClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearActiveToOverrideRelativeToPhaseStart(value *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 5524 + }, + { + "kind": "func", + "name": "SetOrClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearActiveToOverrideRelativeToPhaseStart(value *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 5531 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearDescription(value *string) *SubscriptionItemUpdate", + "line": 5538 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearDescription(value *string) *SubscriptionItemUpdateOne", + "line": 5545 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearFeatureKey(value *string) *SubscriptionItemUpdate", + "line": 5552 + }, + { + "kind": "func", + "name": "SetOrClearFeatureKey", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearFeatureKey(value *string) *SubscriptionItemUpdateOne", + "line": 5559 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *SubscriptionItemUpdate", + "line": 5566 + }, + { + "kind": "func", + "name": "SetOrClearEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearEntitlementTemplate(value **productcatalog.EntitlementTemplate) *SubscriptionItemUpdateOne", + "line": 5573 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *SubscriptionItemUpdate", + "line": 5580 + }, + { + "kind": "func", + "name": "SetOrClearTaxConfig", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearTaxConfig(value **productcatalog.TaxConfig) *SubscriptionItemUpdateOne", + "line": 5587 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearBillingCadence(value *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 5594 + }, + { + "kind": "func", + "name": "SetOrClearBillingCadence", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearBillingCadence(value *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 5601 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearPrice(value **productcatalog.Price) *SubscriptionItemUpdate", + "line": 5608 + }, + { + "kind": "func", + "name": "SetOrClearPrice", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearPrice(value **productcatalog.Price) *SubscriptionItemUpdateOne", + "line": 5615 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *SubscriptionItemUpdate) SetOrClearDiscounts(value **productcatalog.Discounts) *SubscriptionItemUpdate", + "line": 5622 + }, + { + "kind": "func", + "name": "SetOrClearDiscounts", + "signature": "func (u *SubscriptionItemUpdateOne) SetOrClearDiscounts(value **productcatalog.Discounts) *SubscriptionItemUpdateOne", + "line": 5629 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionPhaseUpdate) SetOrClearDeletedAt(value *time.Time) *SubscriptionPhaseUpdate", + "line": 5636 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *SubscriptionPhaseUpdateOne) SetOrClearDeletedAt(value *time.Time) *SubscriptionPhaseUpdateOne", + "line": 5643 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionPhaseUpdate) SetOrClearMetadata(value *map[string]string) *SubscriptionPhaseUpdate", + "line": 5650 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *SubscriptionPhaseUpdateOne) SetOrClearMetadata(value *map[string]string) *SubscriptionPhaseUpdateOne", + "line": 5657 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionPhaseUpdate) SetOrClearDescription(value *string) *SubscriptionPhaseUpdate", + "line": 5664 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *SubscriptionPhaseUpdateOne) SetOrClearDescription(value *string) *SubscriptionPhaseUpdateOne", + "line": 5671 + }, + { + "kind": "func", + "name": "SetOrClearSortHint", + "signature": "func (u *SubscriptionPhaseUpdate) SetOrClearSortHint(value *uint8) *SubscriptionPhaseUpdate", + "line": 5678 + }, + { + "kind": "func", + "name": "SetOrClearSortHint", + "signature": "func (u *SubscriptionPhaseUpdateOne) SetOrClearSortHint(value *uint8) *SubscriptionPhaseUpdateOne", + "line": 5685 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *TaxCodeUpdate) SetOrClearMetadata(value *map[string]string) *TaxCodeUpdate", + "line": 5692 + }, + { + "kind": "func", + "name": "SetOrClearMetadata", + "signature": "func (u *TaxCodeUpdateOne) SetOrClearMetadata(value *map[string]string) *TaxCodeUpdateOne", + "line": 5699 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *TaxCodeUpdate) SetOrClearDeletedAt(value *time.Time) *TaxCodeUpdate", + "line": 5706 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *TaxCodeUpdateOne) SetOrClearDeletedAt(value *time.Time) *TaxCodeUpdateOne", + "line": 5713 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *TaxCodeUpdate) SetOrClearDescription(value *string) *TaxCodeUpdate", + "line": 5720 + }, + { + "kind": "func", + "name": "SetOrClearDescription", + "signature": "func (u *TaxCodeUpdateOne) SetOrClearDescription(value *string) *TaxCodeUpdateOne", + "line": 5727 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *TaxCodeUpdate) SetOrClearAnnotations(value *models.Annotations) *TaxCodeUpdate", + "line": 5734 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *TaxCodeUpdateOne) SetOrClearAnnotations(value *models.Annotations) *TaxCodeUpdateOne", + "line": 5741 + }, + { + "kind": "func", + "name": "SetOrClearAppMappings", + "signature": "func (u *TaxCodeUpdate) SetOrClearAppMappings(value **taxcode.TaxCodeAppMappings) *TaxCodeUpdate", + "line": 5748 + }, + { + "kind": "func", + "name": "SetOrClearAppMappings", + "signature": "func (u *TaxCodeUpdateOne) SetOrClearAppMappings(value **taxcode.TaxCodeAppMappings) *TaxCodeUpdateOne", + "line": 5755 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *UsageResetUpdate) SetOrClearAnnotations(value *models.Annotations) *UsageResetUpdate", + "line": 5762 + }, + { + "kind": "func", + "name": "SetOrClearAnnotations", + "signature": "func (u *UsageResetUpdateOne) SetOrClearAnnotations(value *models.Annotations) *UsageResetUpdateOne", + "line": 5769 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *UsageResetUpdate) SetOrClearDeletedAt(value *time.Time) *UsageResetUpdate", + "line": 5776 + }, + { + "kind": "func", + "name": "SetOrClearDeletedAt", + "signature": "func (u *UsageResetUpdateOne) SetOrClearDeletedAt(value *time.Time) *UsageResetUpdateOne", + "line": 5783 + } + ], + "line_count": 5788 + }, + "openmeter/ent/db/subject.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Subject", + "signature": "type Subject struct", + "line": 17 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Subject) assignValues(columns []string, values []any) error", + "line": 60 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Subject) Value(name string) (ent.Value, error)", + "line": 134 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Subject) Update() *SubjectUpdateOne", + "line": 141 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Subject) Unwrap() *Subject", + "line": 147 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Subject) String() string", + "line": 157 + } + ], + "line_count": 195 + }, + "openmeter/ent/db/subject/subject.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 50 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 78 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 83 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 88 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 93 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 98 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 103 + }, + { + "kind": "func", + "name": "ByDisplayName", + "signature": "func ByDisplayName(opts ...sql.OrderTermOption) OrderOption", + "line": 108 + }, + { + "kind": "func", + "name": "ByStripeCustomerID", + "signature": "func ByStripeCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 113 + } + ], + "line_count": 115 + }, + "openmeter/ent/db/subject/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Subject", + "line": 13 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Subject", + "line": 18 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Subject", + "line": 23 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Subject", + "line": 28 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Subject", + "line": 33 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Subject", + "line": 38 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Subject", + "line": 43 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Subject", + "line": 48 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Subject", + "line": 53 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Subject", + "line": 58 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Subject", + "line": 63 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Subject", + "line": 68 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Subject", + "line": 73 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Subject", + "line": 78 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Subject", + "line": 83 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.Subject", + "line": 88 + }, + { + "kind": "func", + "name": "DisplayName", + "signature": "func DisplayName(v string) predicate.Subject", + "line": 93 + }, + { + "kind": "func", + "name": "StripeCustomerID", + "signature": "func StripeCustomerID(v string) predicate.Subject", + "line": 98 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Subject", + "line": 103 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Subject", + "line": 108 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Subject", + "line": 113 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Subject", + "line": 118 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Subject", + "line": 123 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Subject", + "line": 128 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Subject", + "line": 133 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Subject", + "line": 138 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Subject", + "line": 143 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Subject", + "line": 148 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Subject", + "line": 153 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Subject", + "line": 158 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Subject", + "line": 163 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Subject", + "line": 168 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Subject", + "line": 173 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Subject", + "line": 178 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Subject", + "line": 183 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Subject", + "line": 188 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Subject", + "line": 193 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Subject", + "line": 198 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Subject", + "line": 203 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Subject", + "line": 208 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Subject", + "line": 213 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Subject", + "line": 218 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Subject", + "line": 223 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Subject", + "line": 228 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Subject", + "line": 233 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Subject", + "line": 238 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Subject", + "line": 243 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Subject", + "line": 248 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Subject", + "line": 253 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Subject", + "line": 258 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Subject", + "line": 263 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Subject", + "line": 268 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Subject", + "line": 273 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Subject", + "line": 278 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Subject", + "line": 283 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Subject", + "line": 288 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Subject", + "line": 293 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.Subject", + "line": 298 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.Subject", + "line": 303 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.Subject", + "line": 308 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.Subject", + "line": 313 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.Subject", + "line": 318 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.Subject", + "line": 323 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.Subject", + "line": 328 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.Subject", + "line": 333 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.Subject", + "line": 338 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.Subject", + "line": 343 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.Subject", + "line": 348 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.Subject", + "line": 353 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.Subject", + "line": 358 + }, + { + "kind": "func", + "name": "DisplayNameEQ", + "signature": "func DisplayNameEQ(v string) predicate.Subject", + "line": 363 + }, + { + "kind": "func", + "name": "DisplayNameNEQ", + "signature": "func DisplayNameNEQ(v string) predicate.Subject", + "line": 368 + }, + { + "kind": "func", + "name": "DisplayNameIn", + "signature": "func DisplayNameIn(vs ...string) predicate.Subject", + "line": 373 + }, + { + "kind": "func", + "name": "DisplayNameNotIn", + "signature": "func DisplayNameNotIn(vs ...string) predicate.Subject", + "line": 378 + }, + { + "kind": "func", + "name": "DisplayNameGT", + "signature": "func DisplayNameGT(v string) predicate.Subject", + "line": 383 + }, + { + "kind": "func", + "name": "DisplayNameGTE", + "signature": "func DisplayNameGTE(v string) predicate.Subject", + "line": 388 + }, + { + "kind": "func", + "name": "DisplayNameLT", + "signature": "func DisplayNameLT(v string) predicate.Subject", + "line": 393 + }, + { + "kind": "func", + "name": "DisplayNameLTE", + "signature": "func DisplayNameLTE(v string) predicate.Subject", + "line": 398 + }, + { + "kind": "func", + "name": "DisplayNameContains", + "signature": "func DisplayNameContains(v string) predicate.Subject", + "line": 403 + }, + { + "kind": "func", + "name": "DisplayNameHasPrefix", + "signature": "func DisplayNameHasPrefix(v string) predicate.Subject", + "line": 408 + }, + { + "kind": "func", + "name": "DisplayNameHasSuffix", + "signature": "func DisplayNameHasSuffix(v string) predicate.Subject", + "line": 413 + }, + { + "kind": "func", + "name": "DisplayNameIsNil", + "signature": "func DisplayNameIsNil() predicate.Subject", + "line": 418 + }, + { + "kind": "func", + "name": "DisplayNameNotNil", + "signature": "func DisplayNameNotNil() predicate.Subject", + "line": 423 + }, + { + "kind": "func", + "name": "DisplayNameEqualFold", + "signature": "func DisplayNameEqualFold(v string) predicate.Subject", + "line": 428 + }, + { + "kind": "func", + "name": "DisplayNameContainsFold", + "signature": "func DisplayNameContainsFold(v string) predicate.Subject", + "line": 433 + }, + { + "kind": "func", + "name": "StripeCustomerIDEQ", + "signature": "func StripeCustomerIDEQ(v string) predicate.Subject", + "line": 438 + }, + { + "kind": "func", + "name": "StripeCustomerIDNEQ", + "signature": "func StripeCustomerIDNEQ(v string) predicate.Subject", + "line": 443 + }, + { + "kind": "func", + "name": "StripeCustomerIDIn", + "signature": "func StripeCustomerIDIn(vs ...string) predicate.Subject", + "line": 448 + }, + { + "kind": "func", + "name": "StripeCustomerIDNotIn", + "signature": "func StripeCustomerIDNotIn(vs ...string) predicate.Subject", + "line": 453 + }, + { + "kind": "func", + "name": "StripeCustomerIDGT", + "signature": "func StripeCustomerIDGT(v string) predicate.Subject", + "line": 458 + }, + { + "kind": "func", + "name": "StripeCustomerIDGTE", + "signature": "func StripeCustomerIDGTE(v string) predicate.Subject", + "line": 463 + }, + { + "kind": "func", + "name": "StripeCustomerIDLT", + "signature": "func StripeCustomerIDLT(v string) predicate.Subject", + "line": 468 + }, + { + "kind": "func", + "name": "StripeCustomerIDLTE", + "signature": "func StripeCustomerIDLTE(v string) predicate.Subject", + "line": 473 + }, + { + "kind": "func", + "name": "StripeCustomerIDContains", + "signature": "func StripeCustomerIDContains(v string) predicate.Subject", + "line": 478 + }, + { + "kind": "func", + "name": "StripeCustomerIDHasPrefix", + "signature": "func StripeCustomerIDHasPrefix(v string) predicate.Subject", + "line": 483 + }, + { + "kind": "func", + "name": "StripeCustomerIDHasSuffix", + "signature": "func StripeCustomerIDHasSuffix(v string) predicate.Subject", + "line": 488 + }, + { + "kind": "func", + "name": "StripeCustomerIDIsNil", + "signature": "func StripeCustomerIDIsNil() predicate.Subject", + "line": 493 + }, + { + "kind": "func", + "name": "StripeCustomerIDNotNil", + "signature": "func StripeCustomerIDNotNil() predicate.Subject", + "line": 498 + }, + { + "kind": "func", + "name": "StripeCustomerIDEqualFold", + "signature": "func StripeCustomerIDEqualFold(v string) predicate.Subject", + "line": 503 + }, + { + "kind": "func", + "name": "StripeCustomerIDContainsFold", + "signature": "func StripeCustomerIDContainsFold(v string) predicate.Subject", + "line": 508 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Subject", + "line": 513 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Subject", + "line": 518 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Subject) predicate.Subject", + "line": 523 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Subject) predicate.Subject", + "line": 528 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Subject) predicate.Subject", + "line": 533 + } + ], + "line_count": 535 + }, + "openmeter/ent/db/subject_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubjectCreate", + "signature": "type SubjectCreate struct", + "line": 19 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubjectCreate) SetNamespace(v string) *SubjectCreate", + "line": 27 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubjectCreate) SetCreatedAt(v time.Time) *SubjectCreate", + "line": 33 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubjectCreate) SetNillableCreatedAt(v *time.Time) *SubjectCreate", + "line": 39 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubjectCreate) SetUpdatedAt(v time.Time) *SubjectCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubjectCreate) SetNillableUpdatedAt(v *time.Time) *SubjectCreate", + "line": 53 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubjectCreate) SetDeletedAt(v time.Time) *SubjectCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubjectCreate) SetNillableDeletedAt(v *time.Time) *SubjectCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *SubjectCreate) SetKey(v string) *SubjectCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (_c *SubjectCreate) SetDisplayName(v string) *SubjectCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableDisplayName", + "signature": "func (_c *SubjectCreate) SetNillableDisplayName(v *string) *SubjectCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_c *SubjectCreate) SetStripeCustomerID(v string) *SubjectCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetNillableStripeCustomerID", + "signature": "func (_c *SubjectCreate) SetNillableStripeCustomerID(v *string) *SubjectCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *SubjectCreate) SetMetadata(v map[string]interface{}) *SubjectCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubjectCreate) SetID(v string) *SubjectCreate", + "line": 115 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubjectCreate) SetNillableID(v *string) *SubjectCreate", + "line": 121 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubjectCreate) Mutation() *SubjectMutation", + "line": 129 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubjectCreate) Save(ctx context.Context) (*Subject, error)", + "line": 134 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubjectCreate) SaveX(ctx context.Context) *Subject", + "line": 140 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubjectCreate) Exec(ctx context.Context) error", + "line": 149 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubjectCreate) ExecX(ctx context.Context)", + "line": 155 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubjectCreate) defaults()", + "line": 162 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubjectCreate) check() error", + "line": 178 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubjectCreate) sqlSave(ctx context.Context) (*Subject, error)", + "line": 204 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubjectCreate) createSpec() (*Subject, *sqlgraph.CreateSpec)", + "line": 227 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubjectCreate) OnConflict(opts ...sql.ConflictOption) *SubjectUpsertOne", + "line": 288 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubjectCreate) OnConflictColumns(columns ...string) *SubjectUpsertOne", + "line": 301 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubjectUpsert) SetUpdatedAt(v time.Time) *SubjectUpsert", + "line": 322 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubjectUpsert) UpdateUpdatedAt() *SubjectUpsert", + "line": 328 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubjectUpsert) SetDeletedAt(v time.Time) *SubjectUpsert", + "line": 334 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubjectUpsert) UpdateDeletedAt() *SubjectUpsert", + "line": 340 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubjectUpsert) ClearDeletedAt() *SubjectUpsert", + "line": 346 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *SubjectUpsert) SetKey(v string) *SubjectUpsert", + "line": 352 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *SubjectUpsert) UpdateKey() *SubjectUpsert", + "line": 358 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (u *SubjectUpsert) SetDisplayName(v string) *SubjectUpsert", + "line": 364 + }, + { + "kind": "func", + "name": "UpdateDisplayName", + "signature": "func (u *SubjectUpsert) UpdateDisplayName() *SubjectUpsert", + "line": 370 + }, + { + "kind": "func", + "name": "ClearDisplayName", + "signature": "func (u *SubjectUpsert) ClearDisplayName() *SubjectUpsert", + "line": 376 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *SubjectUpsert) SetStripeCustomerID(v string) *SubjectUpsert", + "line": 382 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *SubjectUpsert) UpdateStripeCustomerID() *SubjectUpsert", + "line": 388 + }, + { + "kind": "func", + "name": "ClearStripeCustomerID", + "signature": "func (u *SubjectUpsert) ClearStripeCustomerID() *SubjectUpsert", + "line": 394 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubjectUpsert) SetMetadata(v map[string]interface{}) *SubjectUpsert", + "line": 400 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubjectUpsert) UpdateMetadata() *SubjectUpsert", + "line": 406 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubjectUpsert) ClearMetadata() *SubjectUpsert", + "line": 412 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubjectUpsertOne) UpdateNewValues() *SubjectUpsertOne", + "line": 428 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubjectUpsertOne) Ignore() *SubjectUpsertOne", + "line": 450 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubjectUpsertOne) DoNothing() *SubjectUpsertOne", + "line": 457 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubjectUpsertOne) Update(set func(*SubjectUpsert)) *SubjectUpsertOne", + "line": 464 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubjectUpsertOne) SetUpdatedAt(v time.Time) *SubjectUpsertOne", + "line": 472 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubjectUpsertOne) UpdateUpdatedAt() *SubjectUpsertOne", + "line": 479 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubjectUpsertOne) SetDeletedAt(v time.Time) *SubjectUpsertOne", + "line": 486 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubjectUpsertOne) UpdateDeletedAt() *SubjectUpsertOne", + "line": 493 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubjectUpsertOne) ClearDeletedAt() *SubjectUpsertOne", + "line": 500 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *SubjectUpsertOne) SetKey(v string) *SubjectUpsertOne", + "line": 507 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *SubjectUpsertOne) UpdateKey() *SubjectUpsertOne", + "line": 514 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (u *SubjectUpsertOne) SetDisplayName(v string) *SubjectUpsertOne", + "line": 521 + }, + { + "kind": "func", + "name": "UpdateDisplayName", + "signature": "func (u *SubjectUpsertOne) UpdateDisplayName() *SubjectUpsertOne", + "line": 528 + }, + { + "kind": "func", + "name": "ClearDisplayName", + "signature": "func (u *SubjectUpsertOne) ClearDisplayName() *SubjectUpsertOne", + "line": 535 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *SubjectUpsertOne) SetStripeCustomerID(v string) *SubjectUpsertOne", + "line": 542 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *SubjectUpsertOne) UpdateStripeCustomerID() *SubjectUpsertOne", + "line": 549 + }, + { + "kind": "func", + "name": "ClearStripeCustomerID", + "signature": "func (u *SubjectUpsertOne) ClearStripeCustomerID() *SubjectUpsertOne", + "line": 556 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubjectUpsertOne) SetMetadata(v map[string]interface{}) *SubjectUpsertOne", + "line": 563 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubjectUpsertOne) UpdateMetadata() *SubjectUpsertOne", + "line": 570 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubjectUpsertOne) ClearMetadata() *SubjectUpsertOne", + "line": 577 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubjectUpsertOne) Exec(ctx context.Context) error", + "line": 584 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubjectUpsertOne) ExecX(ctx context.Context)", + "line": 592 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubjectUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 599 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubjectUpsertOne) IDX(ctx context.Context) string", + "line": 613 + }, + { + "kind": "struct", + "name": "SubjectCreateBulk", + "signature": "type SubjectCreateBulk struct", + "line": 622 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubjectCreateBulk) Save(ctx context.Context) ([]*Subject, error)", + "line": 630 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubjectCreateBulk) SaveX(ctx context.Context) []*Subject", + "line": 686 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubjectCreateBulk) Exec(ctx context.Context) error", + "line": 695 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubjectCreateBulk) ExecX(ctx context.Context)", + "line": 701 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubjectCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubjectUpsertBulk", + "line": 722 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubjectCreateBulk) OnConflictColumns(columns ...string) *SubjectUpsertBulk", + "line": 735 + }, + { + "kind": "struct", + "name": "SubjectUpsertBulk", + "signature": "type SubjectUpsertBulk struct", + "line": 744 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubjectUpsertBulk) UpdateNewValues() *SubjectUpsertBulk", + "line": 759 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubjectUpsertBulk) Ignore() *SubjectUpsertBulk", + "line": 783 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubjectUpsertBulk) DoNothing() *SubjectUpsertBulk", + "line": 790 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubjectUpsertBulk) Update(set func(*SubjectUpsert)) *SubjectUpsertBulk", + "line": 797 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubjectUpsertBulk) SetUpdatedAt(v time.Time) *SubjectUpsertBulk", + "line": 805 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubjectUpsertBulk) UpdateUpdatedAt() *SubjectUpsertBulk", + "line": 812 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubjectUpsertBulk) SetDeletedAt(v time.Time) *SubjectUpsertBulk", + "line": 819 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubjectUpsertBulk) UpdateDeletedAt() *SubjectUpsertBulk", + "line": 826 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubjectUpsertBulk) ClearDeletedAt() *SubjectUpsertBulk", + "line": 833 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (u *SubjectUpsertBulk) SetKey(v string) *SubjectUpsertBulk", + "line": 840 + }, + { + "kind": "func", + "name": "UpdateKey", + "signature": "func (u *SubjectUpsertBulk) UpdateKey() *SubjectUpsertBulk", + "line": 847 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (u *SubjectUpsertBulk) SetDisplayName(v string) *SubjectUpsertBulk", + "line": 854 + }, + { + "kind": "func", + "name": "UpdateDisplayName", + "signature": "func (u *SubjectUpsertBulk) UpdateDisplayName() *SubjectUpsertBulk", + "line": 861 + }, + { + "kind": "func", + "name": "ClearDisplayName", + "signature": "func (u *SubjectUpsertBulk) ClearDisplayName() *SubjectUpsertBulk", + "line": 868 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (u *SubjectUpsertBulk) SetStripeCustomerID(v string) *SubjectUpsertBulk", + "line": 875 + }, + { + "kind": "func", + "name": "UpdateStripeCustomerID", + "signature": "func (u *SubjectUpsertBulk) UpdateStripeCustomerID() *SubjectUpsertBulk", + "line": 882 + }, + { + "kind": "func", + "name": "ClearStripeCustomerID", + "signature": "func (u *SubjectUpsertBulk) ClearStripeCustomerID() *SubjectUpsertBulk", + "line": 889 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubjectUpsertBulk) SetMetadata(v map[string]interface{}) *SubjectUpsertBulk", + "line": 896 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubjectUpsertBulk) UpdateMetadata() *SubjectUpsertBulk", + "line": 903 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubjectUpsertBulk) ClearMetadata() *SubjectUpsertBulk", + "line": 910 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubjectUpsertBulk) Exec(ctx context.Context) error", + "line": 917 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubjectUpsertBulk) ExecX(ctx context.Context)", + "line": 933 + } + ], + "line_count": 937 + }, + "openmeter/ent/db/subject_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubjectDelete", + "signature": "type SubjectDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubjectDelete) Where(ps ...predicate.Subject) *SubjectDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubjectDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubjectDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubjectDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubjectDeleteOne", + "signature": "type SubjectDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubjectDeleteOne) Where(ps ...predicate.Subject) *SubjectDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubjectDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubjectDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subject_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "SubjectQuery", + "signature": "type SubjectQuery struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubjectQuery) Where(ps ...predicate.Subject) *SubjectQuery", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubjectQuery) Limit(limit int) *SubjectQuery", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubjectQuery) Offset(offset int) *SubjectQuery", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubjectQuery) Unique(unique bool) *SubjectQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubjectQuery) Order(o ...subject.OrderOption) *SubjectQuery", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubjectQuery) First(ctx context.Context) (*Subject, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubjectQuery) FirstX(ctx context.Context) *Subject", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubjectQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubjectQuery) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubjectQuery) Only(ctx context.Context) (*Subject, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubjectQuery) OnlyX(ctx context.Context) *Subject", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubjectQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubjectQuery) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubjectQuery) All(ctx context.Context) ([]*Subject, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubjectQuery) AllX(ctx context.Context) []*Subject", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubjectQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubjectQuery) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubjectQuery) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubjectQuery) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubjectQuery) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubjectQuery) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubjectQuery) Clone() *SubjectQuery", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubjectQuery) GroupBy(field string, fields ...string) *SubjectGroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubjectQuery) Select(fields ...string) *SubjectSelect", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubjectQuery) Aggregate(fns ...AggregateFunc) *SubjectSelect", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubjectQuery) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubjectQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Subject, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubjectQuery) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubjectQuery) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubjectQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubjectQuery) ForUpdate(opts ...sql.LockOption) *SubjectQuery", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubjectQuery) ForShare(opts ...sql.LockOption) *SubjectQuery", + "line": 466 + }, + { + "kind": "struct", + "name": "SubjectGroupBy", + "signature": "type SubjectGroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubjectGroupBy) Aggregate(fns ...AggregateFunc) *SubjectGroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubjectGroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubjectGroupBy) sqlScan(ctx context.Context, root *SubjectQuery, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "SubjectSelect", + "signature": "type SubjectSelect struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubjectSelect) Aggregate(fns ...AggregateFunc) *SubjectSelect", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubjectSelect) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubjectSelect) sqlScan(ctx context.Context, root *SubjectQuery, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "openmeter/ent/db/subject_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubjectUpdate", + "signature": "type SubjectUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubjectUpdate) Where(ps ...predicate.Subject) *SubjectUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubjectUpdate) SetUpdatedAt(v time.Time) *SubjectUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubjectUpdate) SetDeletedAt(v time.Time) *SubjectUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubjectUpdate) SetNillableDeletedAt(v *time.Time) *SubjectUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubjectUpdate) ClearDeletedAt() *SubjectUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_u *SubjectUpdate) SetKey(v string) *SubjectUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableKey", + "signature": "func (_u *SubjectUpdate) SetNillableKey(v *string) *SubjectUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (_u *SubjectUpdate) SetDisplayName(v string) *SubjectUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDisplayName", + "signature": "func (_u *SubjectUpdate) SetNillableDisplayName(v *string) *SubjectUpdate", + "line": 78 + }, + { + "kind": "func", + "name": "ClearDisplayName", + "signature": "func (_u *SubjectUpdate) ClearDisplayName() *SubjectUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_u *SubjectUpdate) SetStripeCustomerID(v string) *SubjectUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableStripeCustomerID", + "signature": "func (_u *SubjectUpdate) SetNillableStripeCustomerID(v *string) *SubjectUpdate", + "line": 98 + }, + { + "kind": "func", + "name": "ClearStripeCustomerID", + "signature": "func (_u *SubjectUpdate) ClearStripeCustomerID() *SubjectUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubjectUpdate) SetMetadata(v map[string]interface{}) *SubjectUpdate", + "line": 112 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubjectUpdate) ClearMetadata() *SubjectUpdate", + "line": 118 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubjectUpdate) Mutation() *SubjectMutation", + "line": 124 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubjectUpdate) Save(ctx context.Context) (int, error)", + "line": 129 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubjectUpdate) SaveX(ctx context.Context) int", + "line": 135 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubjectUpdate) Exec(ctx context.Context) error", + "line": 144 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubjectUpdate) ExecX(ctx context.Context)", + "line": 150 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubjectUpdate) defaults()", + "line": 157 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubjectUpdate) check() error", + "line": 165 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubjectUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 174 + }, + { + "kind": "struct", + "name": "SubjectUpdateOne", + "signature": "type SubjectUpdateOne struct", + "line": 229 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubjectUpdateOne) SetUpdatedAt(v time.Time) *SubjectUpdateOne", + "line": 237 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubjectUpdateOne) SetDeletedAt(v time.Time) *SubjectUpdateOne", + "line": 243 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubjectUpdateOne) SetNillableDeletedAt(v *time.Time) *SubjectUpdateOne", + "line": 249 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubjectUpdateOne) ClearDeletedAt() *SubjectUpdateOne", + "line": 257 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_u *SubjectUpdateOne) SetKey(v string) *SubjectUpdateOne", + "line": 263 + }, + { + "kind": "func", + "name": "SetNillableKey", + "signature": "func (_u *SubjectUpdateOne) SetNillableKey(v *string) *SubjectUpdateOne", + "line": 269 + }, + { + "kind": "func", + "name": "SetDisplayName", + "signature": "func (_u *SubjectUpdateOne) SetDisplayName(v string) *SubjectUpdateOne", + "line": 277 + }, + { + "kind": "func", + "name": "SetNillableDisplayName", + "signature": "func (_u *SubjectUpdateOne) SetNillableDisplayName(v *string) *SubjectUpdateOne", + "line": 283 + }, + { + "kind": "func", + "name": "ClearDisplayName", + "signature": "func (_u *SubjectUpdateOne) ClearDisplayName() *SubjectUpdateOne", + "line": 291 + }, + { + "kind": "func", + "name": "SetStripeCustomerID", + "signature": "func (_u *SubjectUpdateOne) SetStripeCustomerID(v string) *SubjectUpdateOne", + "line": 297 + }, + { + "kind": "func", + "name": "SetNillableStripeCustomerID", + "signature": "func (_u *SubjectUpdateOne) SetNillableStripeCustomerID(v *string) *SubjectUpdateOne", + "line": 303 + }, + { + "kind": "func", + "name": "ClearStripeCustomerID", + "signature": "func (_u *SubjectUpdateOne) ClearStripeCustomerID() *SubjectUpdateOne", + "line": 311 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubjectUpdateOne) SetMetadata(v map[string]interface{}) *SubjectUpdateOne", + "line": 317 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubjectUpdateOne) ClearMetadata() *SubjectUpdateOne", + "line": 323 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubjectUpdateOne) Mutation() *SubjectMutation", + "line": 329 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubjectUpdateOne) Where(ps ...predicate.Subject) *SubjectUpdateOne", + "line": 334 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubjectUpdateOne) Select(field string, fields ...string) *SubjectUpdateOne", + "line": 341 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubjectUpdateOne) Save(ctx context.Context) (*Subject, error)", + "line": 347 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubjectUpdateOne) SaveX(ctx context.Context) *Subject", + "line": 353 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubjectUpdateOne) Exec(ctx context.Context) error", + "line": 362 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubjectUpdateOne) ExecX(ctx context.Context)", + "line": 368 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubjectUpdateOne) defaults()", + "line": 375 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubjectUpdateOne) check() error", + "line": 383 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubjectUpdateOne) sqlSave(ctx context.Context) (_node *Subject, err error)", + "line": 392 + } + ], + "line_count": 464 + }, + "openmeter/ent/db/subscription.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "Subscription", + "signature": "type Subscription struct", + "line": 24 + }, + { + "kind": "struct", + "name": "SubscriptionEdges", + "signature": "type SubscriptionEdges struct", + "line": 69 + }, + { + "kind": "func", + "name": "PlanOrErr", + "signature": "func (e SubscriptionEdges) PlanOrErr() (*Plan, error)", + "line": 97 + }, + { + "kind": "func", + "name": "CustomerOrErr", + "signature": "func (e SubscriptionEdges) CustomerOrErr() (*Customer, error)", + "line": 108 + }, + { + "kind": "func", + "name": "PhasesOrErr", + "signature": "func (e SubscriptionEdges) PhasesOrErr() ([]*SubscriptionPhase, error)", + "line": 119 + }, + { + "kind": "func", + "name": "BillingLinesOrErr", + "signature": "func (e SubscriptionEdges) BillingLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 128 + }, + { + "kind": "func", + "name": "BillingSplitLineGroupsOrErr", + "signature": "func (e SubscriptionEdges) BillingSplitLineGroupsOrErr() ([]*BillingInvoiceSplitLineGroup, error)", + "line": 137 + }, + { + "kind": "func", + "name": "ChargesUsageBasedOrErr", + "signature": "func (e SubscriptionEdges) ChargesUsageBasedOrErr() ([]*ChargeUsageBased, error)", + "line": 146 + }, + { + "kind": "func", + "name": "ChargesCreditPurchaseOrErr", + "signature": "func (e SubscriptionEdges) ChargesCreditPurchaseOrErr() ([]*ChargeCreditPurchase, error)", + "line": 155 + }, + { + "kind": "func", + "name": "ChargesFlatFeeOrErr", + "signature": "func (e SubscriptionEdges) ChargesFlatFeeOrErr() ([]*ChargeFlatFee, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AddonsOrErr", + "signature": "func (e SubscriptionEdges) AddonsOrErr() ([]*SubscriptionAddon, error)", + "line": 173 + }, + { + "kind": "func", + "name": "BillingSyncStateOrErr", + "signature": "func (e SubscriptionEdges) BillingSyncStateOrErr() (*SubscriptionBillingSyncState, error)", + "line": 182 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Subscription) assignValues(columns []string, values []any) error", + "line": 213 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Subscription) Value(name string) (ent.Value, error)", + "line": 344 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_m *Subscription) QueryPlan() *PlanQuery", + "line": 349 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_m *Subscription) QueryCustomer() *CustomerQuery", + "line": 354 + }, + { + "kind": "func", + "name": "QueryPhases", + "signature": "func (_m *Subscription) QueryPhases() *SubscriptionPhaseQuery", + "line": 359 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_m *Subscription) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 364 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_m *Subscription) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 369 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_m *Subscription) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 374 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_m *Subscription) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 379 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_m *Subscription) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 384 + }, + { + "kind": "func", + "name": "QueryAddons", + "signature": "func (_m *Subscription) QueryAddons() *SubscriptionAddonQuery", + "line": 389 + }, + { + "kind": "func", + "name": "QueryBillingSyncState", + "signature": "func (_m *Subscription) QueryBillingSyncState() *SubscriptionBillingSyncStateQuery", + "line": 394 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Subscription) Update() *SubscriptionUpdateOne", + "line": 401 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Subscription) Unwrap() *Subscription", + "line": 407 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Subscription) String() string", + "line": 417 + } + ], + "line_count": 484 + }, + "openmeter/ent/db/subscription/subscription.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 171 + }, + { + "kind": "func", + "name": "SettlementModeValidator", + "signature": "func SettlementModeValidator(sm productcatalog.SettlementMode) error", + "line": 210 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 223 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 228 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 233 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 243 + }, + { + "kind": "func", + "name": "ByActiveFrom", + "signature": "func ByActiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 248 + }, + { + "kind": "func", + "name": "ByActiveTo", + "signature": "func ByActiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 253 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 258 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 263 + }, + { + "kind": "func", + "name": "ByPlanID", + "signature": "func ByPlanID(opts ...sql.OrderTermOption) OrderOption", + "line": 268 + }, + { + "kind": "func", + "name": "ByCustomerID", + "signature": "func ByCustomerID(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByCurrency", + "signature": "func ByCurrency(opts ...sql.OrderTermOption) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByBillingAnchor", + "signature": "func ByBillingAnchor(opts ...sql.OrderTermOption) OrderOption", + "line": 283 + }, + { + "kind": "func", + "name": "ByBillingCadence", + "signature": "func ByBillingCadence(opts ...sql.OrderTermOption) OrderOption", + "line": 288 + }, + { + "kind": "func", + "name": "ByProRatingConfig", + "signature": "func ByProRatingConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 293 + }, + { + "kind": "func", + "name": "BySettlementMode", + "signature": "func BySettlementMode(opts ...sql.OrderTermOption) OrderOption", + "line": 298 + }, + { + "kind": "func", + "name": "ByPlanField", + "signature": "func ByPlanField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 303 + }, + { + "kind": "func", + "name": "ByCustomerField", + "signature": "func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 310 + }, + { + "kind": "func", + "name": "ByPhasesCount", + "signature": "func ByPhasesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 317 + }, + { + "kind": "func", + "name": "ByPhases", + "signature": "func ByPhases(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 324 + }, + { + "kind": "func", + "name": "ByBillingLinesCount", + "signature": "func ByBillingLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 331 + }, + { + "kind": "func", + "name": "ByBillingLines", + "signature": "func ByBillingLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 338 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroupsCount", + "signature": "func ByBillingSplitLineGroupsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 345 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroups", + "signature": "func ByBillingSplitLineGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 352 + }, + { + "kind": "func", + "name": "ByChargesUsageBasedCount", + "signature": "func ByChargesUsageBasedCount(opts ...sql.OrderTermOption) OrderOption", + "line": 359 + }, + { + "kind": "func", + "name": "ByChargesUsageBased", + "signature": "func ByChargesUsageBased(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 366 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchaseCount", + "signature": "func ByChargesCreditPurchaseCount(opts ...sql.OrderTermOption) OrderOption", + "line": 373 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchase", + "signature": "func ByChargesCreditPurchase(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 380 + }, + { + "kind": "func", + "name": "ByChargesFlatFeeCount", + "signature": "func ByChargesFlatFeeCount(opts ...sql.OrderTermOption) OrderOption", + "line": 387 + }, + { + "kind": "func", + "name": "ByChargesFlatFee", + "signature": "func ByChargesFlatFee(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "ByAddonsCount", + "signature": "func ByAddonsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 401 + }, + { + "kind": "func", + "name": "ByAddons", + "signature": "func ByAddons(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 408 + }, + { + "kind": "func", + "name": "ByBillingSyncStateField", + "signature": "func ByBillingSyncStateField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 415 + }, + { + "kind": "func", + "name": "newPlanStep", + "signature": "func newPlanStep() *sqlgraph.Step", + "line": 420 + }, + { + "kind": "func", + "name": "newCustomerStep", + "signature": "func newCustomerStep() *sqlgraph.Step", + "line": 427 + }, + { + "kind": "func", + "name": "newPhasesStep", + "signature": "func newPhasesStep() *sqlgraph.Step", + "line": 434 + }, + { + "kind": "func", + "name": "newBillingLinesStep", + "signature": "func newBillingLinesStep() *sqlgraph.Step", + "line": 441 + }, + { + "kind": "func", + "name": "newBillingSplitLineGroupsStep", + "signature": "func newBillingSplitLineGroupsStep() *sqlgraph.Step", + "line": 448 + }, + { + "kind": "func", + "name": "newChargesUsageBasedStep", + "signature": "func newChargesUsageBasedStep() *sqlgraph.Step", + "line": 455 + }, + { + "kind": "func", + "name": "newChargesCreditPurchaseStep", + "signature": "func newChargesCreditPurchaseStep() *sqlgraph.Step", + "line": 462 + }, + { + "kind": "func", + "name": "newChargesFlatFeeStep", + "signature": "func newChargesFlatFeeStep() *sqlgraph.Step", + "line": 469 + }, + { + "kind": "func", + "name": "newAddonsStep", + "signature": "func newAddonsStep() *sqlgraph.Step", + "line": 476 + }, + { + "kind": "func", + "name": "newBillingSyncStateStep", + "signature": "func newBillingSyncStateStep() *sqlgraph.Step", + "line": 483 + } + ], + "line_count": 489 + }, + "openmeter/ent/db/subscription/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Subscription", + "line": 17 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Subscription", + "line": 22 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Subscription", + "line": 27 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Subscription", + "line": 32 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Subscription", + "line": 37 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Subscription", + "line": 42 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Subscription", + "line": 47 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Subscription", + "line": 52 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Subscription", + "line": 57 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Subscription", + "line": 62 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Subscription", + "line": 67 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.Subscription", + "line": 72 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Subscription", + "line": 77 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Subscription", + "line": 82 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Subscription", + "line": 87 + }, + { + "kind": "func", + "name": "ActiveFrom", + "signature": "func ActiveFrom(v time.Time) predicate.Subscription", + "line": 92 + }, + { + "kind": "func", + "name": "ActiveTo", + "signature": "func ActiveTo(v time.Time) predicate.Subscription", + "line": 97 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.Subscription", + "line": 102 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.Subscription", + "line": 107 + }, + { + "kind": "func", + "name": "PlanID", + "signature": "func PlanID(v string) predicate.Subscription", + "line": 112 + }, + { + "kind": "func", + "name": "CustomerID", + "signature": "func CustomerID(v string) predicate.Subscription", + "line": 117 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func Currency(v currencyx.Code) predicate.Subscription", + "line": 122 + }, + { + "kind": "func", + "name": "BillingAnchor", + "signature": "func BillingAnchor(v time.Time) predicate.Subscription", + "line": 128 + }, + { + "kind": "func", + "name": "BillingCadence", + "signature": "func BillingCadence(v datetime.ISODurationString) predicate.Subscription", + "line": 133 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.Subscription", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.Subscription", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.Subscription", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.Subscription", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.Subscription", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.Subscription", + "line": 164 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.Subscription", + "line": 169 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.Subscription", + "line": 174 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.Subscription", + "line": 179 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.Subscription", + "line": 184 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.Subscription", + "line": 189 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.Subscription", + "line": 194 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.Subscription", + "line": 199 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.Subscription", + "line": 204 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.Subscription", + "line": 209 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Subscription", + "line": 214 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Subscription", + "line": 219 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Subscription", + "line": 224 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Subscription", + "line": 229 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Subscription", + "line": 234 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Subscription", + "line": 239 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Subscription", + "line": 244 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Subscription", + "line": 249 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Subscription", + "line": 254 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Subscription", + "line": 259 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Subscription", + "line": 264 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Subscription", + "line": 269 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Subscription", + "line": 274 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Subscription", + "line": 279 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Subscription", + "line": 284 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Subscription", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Subscription", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Subscription", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Subscription", + "line": 304 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Subscription", + "line": 309 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Subscription", + "line": 314 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Subscription", + "line": 319 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Subscription", + "line": 324 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Subscription", + "line": 329 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Subscription", + "line": 334 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Subscription", + "line": 339 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.Subscription", + "line": 344 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.Subscription", + "line": 349 + }, + { + "kind": "func", + "name": "ActiveFromEQ", + "signature": "func ActiveFromEQ(v time.Time) predicate.Subscription", + "line": 354 + }, + { + "kind": "func", + "name": "ActiveFromNEQ", + "signature": "func ActiveFromNEQ(v time.Time) predicate.Subscription", + "line": 359 + }, + { + "kind": "func", + "name": "ActiveFromIn", + "signature": "func ActiveFromIn(vs ...time.Time) predicate.Subscription", + "line": 364 + }, + { + "kind": "func", + "name": "ActiveFromNotIn", + "signature": "func ActiveFromNotIn(vs ...time.Time) predicate.Subscription", + "line": 369 + }, + { + "kind": "func", + "name": "ActiveFromGT", + "signature": "func ActiveFromGT(v time.Time) predicate.Subscription", + "line": 374 + }, + { + "kind": "func", + "name": "ActiveFromGTE", + "signature": "func ActiveFromGTE(v time.Time) predicate.Subscription", + "line": 379 + }, + { + "kind": "func", + "name": "ActiveFromLT", + "signature": "func ActiveFromLT(v time.Time) predicate.Subscription", + "line": 384 + }, + { + "kind": "func", + "name": "ActiveFromLTE", + "signature": "func ActiveFromLTE(v time.Time) predicate.Subscription", + "line": 389 + }, + { + "kind": "func", + "name": "ActiveToEQ", + "signature": "func ActiveToEQ(v time.Time) predicate.Subscription", + "line": 394 + }, + { + "kind": "func", + "name": "ActiveToNEQ", + "signature": "func ActiveToNEQ(v time.Time) predicate.Subscription", + "line": 399 + }, + { + "kind": "func", + "name": "ActiveToIn", + "signature": "func ActiveToIn(vs ...time.Time) predicate.Subscription", + "line": 404 + }, + { + "kind": "func", + "name": "ActiveToNotIn", + "signature": "func ActiveToNotIn(vs ...time.Time) predicate.Subscription", + "line": 409 + }, + { + "kind": "func", + "name": "ActiveToGT", + "signature": "func ActiveToGT(v time.Time) predicate.Subscription", + "line": 414 + }, + { + "kind": "func", + "name": "ActiveToGTE", + "signature": "func ActiveToGTE(v time.Time) predicate.Subscription", + "line": 419 + }, + { + "kind": "func", + "name": "ActiveToLT", + "signature": "func ActiveToLT(v time.Time) predicate.Subscription", + "line": 424 + }, + { + "kind": "func", + "name": "ActiveToLTE", + "signature": "func ActiveToLTE(v time.Time) predicate.Subscription", + "line": 429 + }, + { + "kind": "func", + "name": "ActiveToIsNil", + "signature": "func ActiveToIsNil() predicate.Subscription", + "line": 434 + }, + { + "kind": "func", + "name": "ActiveToNotNil", + "signature": "func ActiveToNotNil() predicate.Subscription", + "line": 439 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.Subscription", + "line": 444 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.Subscription", + "line": 449 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.Subscription", + "line": 454 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.Subscription", + "line": 459 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.Subscription", + "line": 464 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.Subscription", + "line": 469 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.Subscription", + "line": 474 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.Subscription", + "line": 479 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.Subscription", + "line": 484 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.Subscription", + "line": 489 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.Subscription", + "line": 494 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.Subscription", + "line": 499 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.Subscription", + "line": 504 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.Subscription", + "line": 509 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.Subscription", + "line": 514 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.Subscription", + "line": 519 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.Subscription", + "line": 524 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.Subscription", + "line": 529 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.Subscription", + "line": 534 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.Subscription", + "line": 539 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.Subscription", + "line": 544 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.Subscription", + "line": 549 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.Subscription", + "line": 554 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.Subscription", + "line": 559 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.Subscription", + "line": 564 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.Subscription", + "line": 569 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.Subscription", + "line": 574 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.Subscription", + "line": 579 + }, + { + "kind": "func", + "name": "PlanIDEQ", + "signature": "func PlanIDEQ(v string) predicate.Subscription", + "line": 584 + }, + { + "kind": "func", + "name": "PlanIDNEQ", + "signature": "func PlanIDNEQ(v string) predicate.Subscription", + "line": 589 + }, + { + "kind": "func", + "name": "PlanIDIn", + "signature": "func PlanIDIn(vs ...string) predicate.Subscription", + "line": 594 + }, + { + "kind": "func", + "name": "PlanIDNotIn", + "signature": "func PlanIDNotIn(vs ...string) predicate.Subscription", + "line": 599 + }, + { + "kind": "func", + "name": "PlanIDGT", + "signature": "func PlanIDGT(v string) predicate.Subscription", + "line": 604 + }, + { + "kind": "func", + "name": "PlanIDGTE", + "signature": "func PlanIDGTE(v string) predicate.Subscription", + "line": 609 + }, + { + "kind": "func", + "name": "PlanIDLT", + "signature": "func PlanIDLT(v string) predicate.Subscription", + "line": 614 + }, + { + "kind": "func", + "name": "PlanIDLTE", + "signature": "func PlanIDLTE(v string) predicate.Subscription", + "line": 619 + }, + { + "kind": "func", + "name": "PlanIDContains", + "signature": "func PlanIDContains(v string) predicate.Subscription", + "line": 624 + }, + { + "kind": "func", + "name": "PlanIDHasPrefix", + "signature": "func PlanIDHasPrefix(v string) predicate.Subscription", + "line": 629 + }, + { + "kind": "func", + "name": "PlanIDHasSuffix", + "signature": "func PlanIDHasSuffix(v string) predicate.Subscription", + "line": 634 + }, + { + "kind": "func", + "name": "PlanIDIsNil", + "signature": "func PlanIDIsNil() predicate.Subscription", + "line": 639 + }, + { + "kind": "func", + "name": "PlanIDNotNil", + "signature": "func PlanIDNotNil() predicate.Subscription", + "line": 644 + }, + { + "kind": "func", + "name": "PlanIDEqualFold", + "signature": "func PlanIDEqualFold(v string) predicate.Subscription", + "line": 649 + }, + { + "kind": "func", + "name": "PlanIDContainsFold", + "signature": "func PlanIDContainsFold(v string) predicate.Subscription", + "line": 654 + }, + { + "kind": "func", + "name": "CustomerIDEQ", + "signature": "func CustomerIDEQ(v string) predicate.Subscription", + "line": 659 + }, + { + "kind": "func", + "name": "CustomerIDNEQ", + "signature": "func CustomerIDNEQ(v string) predicate.Subscription", + "line": 664 + }, + { + "kind": "func", + "name": "CustomerIDIn", + "signature": "func CustomerIDIn(vs ...string) predicate.Subscription", + "line": 669 + }, + { + "kind": "func", + "name": "CustomerIDNotIn", + "signature": "func CustomerIDNotIn(vs ...string) predicate.Subscription", + "line": 674 + }, + { + "kind": "func", + "name": "CustomerIDGT", + "signature": "func CustomerIDGT(v string) predicate.Subscription", + "line": 679 + }, + { + "kind": "func", + "name": "CustomerIDGTE", + "signature": "func CustomerIDGTE(v string) predicate.Subscription", + "line": 684 + }, + { + "kind": "func", + "name": "CustomerIDLT", + "signature": "func CustomerIDLT(v string) predicate.Subscription", + "line": 689 + }, + { + "kind": "func", + "name": "CustomerIDLTE", + "signature": "func CustomerIDLTE(v string) predicate.Subscription", + "line": 694 + }, + { + "kind": "func", + "name": "CustomerIDContains", + "signature": "func CustomerIDContains(v string) predicate.Subscription", + "line": 699 + }, + { + "kind": "func", + "name": "CustomerIDHasPrefix", + "signature": "func CustomerIDHasPrefix(v string) predicate.Subscription", + "line": 704 + }, + { + "kind": "func", + "name": "CustomerIDHasSuffix", + "signature": "func CustomerIDHasSuffix(v string) predicate.Subscription", + "line": 709 + }, + { + "kind": "func", + "name": "CustomerIDEqualFold", + "signature": "func CustomerIDEqualFold(v string) predicate.Subscription", + "line": 714 + }, + { + "kind": "func", + "name": "CustomerIDContainsFold", + "signature": "func CustomerIDContainsFold(v string) predicate.Subscription", + "line": 719 + }, + { + "kind": "func", + "name": "CurrencyEQ", + "signature": "func CurrencyEQ(v currencyx.Code) predicate.Subscription", + "line": 724 + }, + { + "kind": "func", + "name": "CurrencyNEQ", + "signature": "func CurrencyNEQ(v currencyx.Code) predicate.Subscription", + "line": 730 + }, + { + "kind": "func", + "name": "CurrencyIn", + "signature": "func CurrencyIn(vs ...currencyx.Code) predicate.Subscription", + "line": 736 + }, + { + "kind": "func", + "name": "CurrencyNotIn", + "signature": "func CurrencyNotIn(vs ...currencyx.Code) predicate.Subscription", + "line": 745 + }, + { + "kind": "func", + "name": "CurrencyGT", + "signature": "func CurrencyGT(v currencyx.Code) predicate.Subscription", + "line": 754 + }, + { + "kind": "func", + "name": "CurrencyGTE", + "signature": "func CurrencyGTE(v currencyx.Code) predicate.Subscription", + "line": 760 + }, + { + "kind": "func", + "name": "CurrencyLT", + "signature": "func CurrencyLT(v currencyx.Code) predicate.Subscription", + "line": 766 + }, + { + "kind": "func", + "name": "CurrencyLTE", + "signature": "func CurrencyLTE(v currencyx.Code) predicate.Subscription", + "line": 772 + }, + { + "kind": "func", + "name": "CurrencyContains", + "signature": "func CurrencyContains(v currencyx.Code) predicate.Subscription", + "line": 778 + }, + { + "kind": "func", + "name": "CurrencyHasPrefix", + "signature": "func CurrencyHasPrefix(v currencyx.Code) predicate.Subscription", + "line": 784 + }, + { + "kind": "func", + "name": "CurrencyHasSuffix", + "signature": "func CurrencyHasSuffix(v currencyx.Code) predicate.Subscription", + "line": 790 + }, + { + "kind": "func", + "name": "CurrencyEqualFold", + "signature": "func CurrencyEqualFold(v currencyx.Code) predicate.Subscription", + "line": 796 + }, + { + "kind": "func", + "name": "CurrencyContainsFold", + "signature": "func CurrencyContainsFold(v currencyx.Code) predicate.Subscription", + "line": 802 + }, + { + "kind": "func", + "name": "BillingAnchorEQ", + "signature": "func BillingAnchorEQ(v time.Time) predicate.Subscription", + "line": 808 + }, + { + "kind": "func", + "name": "BillingAnchorNEQ", + "signature": "func BillingAnchorNEQ(v time.Time) predicate.Subscription", + "line": 813 + }, + { + "kind": "func", + "name": "BillingAnchorIn", + "signature": "func BillingAnchorIn(vs ...time.Time) predicate.Subscription", + "line": 818 + }, + { + "kind": "func", + "name": "BillingAnchorNotIn", + "signature": "func BillingAnchorNotIn(vs ...time.Time) predicate.Subscription", + "line": 823 + }, + { + "kind": "func", + "name": "BillingAnchorGT", + "signature": "func BillingAnchorGT(v time.Time) predicate.Subscription", + "line": 828 + }, + { + "kind": "func", + "name": "BillingAnchorGTE", + "signature": "func BillingAnchorGTE(v time.Time) predicate.Subscription", + "line": 833 + }, + { + "kind": "func", + "name": "BillingAnchorLT", + "signature": "func BillingAnchorLT(v time.Time) predicate.Subscription", + "line": 838 + }, + { + "kind": "func", + "name": "BillingAnchorLTE", + "signature": "func BillingAnchorLTE(v time.Time) predicate.Subscription", + "line": 843 + }, + { + "kind": "func", + "name": "BillingCadenceEQ", + "signature": "func BillingCadenceEQ(v datetime.ISODurationString) predicate.Subscription", + "line": 848 + }, + { + "kind": "func", + "name": "BillingCadenceNEQ", + "signature": "func BillingCadenceNEQ(v datetime.ISODurationString) predicate.Subscription", + "line": 854 + }, + { + "kind": "func", + "name": "BillingCadenceIn", + "signature": "func BillingCadenceIn(vs ...datetime.ISODurationString) predicate.Subscription", + "line": 860 + }, + { + "kind": "func", + "name": "BillingCadenceNotIn", + "signature": "func BillingCadenceNotIn(vs ...datetime.ISODurationString) predicate.Subscription", + "line": 869 + }, + { + "kind": "func", + "name": "BillingCadenceGT", + "signature": "func BillingCadenceGT(v datetime.ISODurationString) predicate.Subscription", + "line": 878 + }, + { + "kind": "func", + "name": "BillingCadenceGTE", + "signature": "func BillingCadenceGTE(v datetime.ISODurationString) predicate.Subscription", + "line": 884 + }, + { + "kind": "func", + "name": "BillingCadenceLT", + "signature": "func BillingCadenceLT(v datetime.ISODurationString) predicate.Subscription", + "line": 890 + }, + { + "kind": "func", + "name": "BillingCadenceLTE", + "signature": "func BillingCadenceLTE(v datetime.ISODurationString) predicate.Subscription", + "line": 896 + }, + { + "kind": "func", + "name": "BillingCadenceContains", + "signature": "func BillingCadenceContains(v datetime.ISODurationString) predicate.Subscription", + "line": 902 + }, + { + "kind": "func", + "name": "BillingCadenceHasPrefix", + "signature": "func BillingCadenceHasPrefix(v datetime.ISODurationString) predicate.Subscription", + "line": 908 + }, + { + "kind": "func", + "name": "BillingCadenceHasSuffix", + "signature": "func BillingCadenceHasSuffix(v datetime.ISODurationString) predicate.Subscription", + "line": 914 + }, + { + "kind": "func", + "name": "BillingCadenceEqualFold", + "signature": "func BillingCadenceEqualFold(v datetime.ISODurationString) predicate.Subscription", + "line": 920 + }, + { + "kind": "func", + "name": "BillingCadenceContainsFold", + "signature": "func BillingCadenceContainsFold(v datetime.ISODurationString) predicate.Subscription", + "line": 926 + }, + { + "kind": "func", + "name": "SettlementModeEQ", + "signature": "func SettlementModeEQ(v productcatalog.SettlementMode) predicate.Subscription", + "line": 932 + }, + { + "kind": "func", + "name": "SettlementModeNEQ", + "signature": "func SettlementModeNEQ(v productcatalog.SettlementMode) predicate.Subscription", + "line": 938 + }, + { + "kind": "func", + "name": "SettlementModeIn", + "signature": "func SettlementModeIn(vs ...productcatalog.SettlementMode) predicate.Subscription", + "line": 944 + }, + { + "kind": "func", + "name": "SettlementModeNotIn", + "signature": "func SettlementModeNotIn(vs ...productcatalog.SettlementMode) predicate.Subscription", + "line": 953 + }, + { + "kind": "func", + "name": "HasPlan", + "signature": "func HasPlan() predicate.Subscription", + "line": 962 + }, + { + "kind": "func", + "name": "HasPlanWith", + "signature": "func HasPlanWith(preds ...predicate.Plan) predicate.Subscription", + "line": 973 + }, + { + "kind": "func", + "name": "HasCustomer", + "signature": "func HasCustomer() predicate.Subscription", + "line": 985 + }, + { + "kind": "func", + "name": "HasCustomerWith", + "signature": "func HasCustomerWith(preds ...predicate.Customer) predicate.Subscription", + "line": 996 + }, + { + "kind": "func", + "name": "HasPhases", + "signature": "func HasPhases() predicate.Subscription", + "line": 1008 + }, + { + "kind": "func", + "name": "HasPhasesWith", + "signature": "func HasPhasesWith(preds ...predicate.SubscriptionPhase) predicate.Subscription", + "line": 1019 + }, + { + "kind": "func", + "name": "HasBillingLines", + "signature": "func HasBillingLines() predicate.Subscription", + "line": 1031 + }, + { + "kind": "func", + "name": "HasBillingLinesWith", + "signature": "func HasBillingLinesWith(preds ...predicate.BillingInvoiceLine) predicate.Subscription", + "line": 1042 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroups", + "signature": "func HasBillingSplitLineGroups() predicate.Subscription", + "line": 1054 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroupsWith", + "signature": "func HasBillingSplitLineGroupsWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.Subscription", + "line": 1065 + }, + { + "kind": "func", + "name": "HasChargesUsageBased", + "signature": "func HasChargesUsageBased() predicate.Subscription", + "line": 1077 + }, + { + "kind": "func", + "name": "HasChargesUsageBasedWith", + "signature": "func HasChargesUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.Subscription", + "line": 1088 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchase", + "signature": "func HasChargesCreditPurchase() predicate.Subscription", + "line": 1100 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchaseWith", + "signature": "func HasChargesCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.Subscription", + "line": 1111 + }, + { + "kind": "func", + "name": "HasChargesFlatFee", + "signature": "func HasChargesFlatFee() predicate.Subscription", + "line": 1123 + }, + { + "kind": "func", + "name": "HasChargesFlatFeeWith", + "signature": "func HasChargesFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.Subscription", + "line": 1134 + }, + { + "kind": "func", + "name": "HasAddons", + "signature": "func HasAddons() predicate.Subscription", + "line": 1146 + }, + { + "kind": "func", + "name": "HasAddonsWith", + "signature": "func HasAddonsWith(preds ...predicate.SubscriptionAddon) predicate.Subscription", + "line": 1157 + }, + { + "kind": "func", + "name": "HasBillingSyncState", + "signature": "func HasBillingSyncState() predicate.Subscription", + "line": 1169 + }, + { + "kind": "func", + "name": "HasBillingSyncStateWith", + "signature": "func HasBillingSyncStateWith(preds ...predicate.SubscriptionBillingSyncState) predicate.Subscription", + "line": 1180 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Subscription) predicate.Subscription", + "line": 1192 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Subscription) predicate.Subscription", + "line": 1197 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Subscription) predicate.Subscription", + "line": 1202 + } + ], + "line_count": 1204 + }, + "openmeter/ent/db/subscription_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionCreate", + "signature": "type SubscriptionCreate struct", + "line": 33 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionCreate) SetNamespace(v string) *SubscriptionCreate", + "line": 41 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *SubscriptionCreate) SetAnnotations(v models.Annotations) *SubscriptionCreate", + "line": 47 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubscriptionCreate) SetCreatedAt(v time.Time) *SubscriptionCreate", + "line": 53 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubscriptionCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionCreate", + "line": 59 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubscriptionCreate) SetUpdatedAt(v time.Time) *SubscriptionCreate", + "line": 67 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubscriptionCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionCreate", + "line": 73 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubscriptionCreate) SetDeletedAt(v time.Time) *SubscriptionCreate", + "line": 81 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubscriptionCreate) SetNillableDeletedAt(v *time.Time) *SubscriptionCreate", + "line": 87 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *SubscriptionCreate) SetMetadata(v map[string]string) *SubscriptionCreate", + "line": 95 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_c *SubscriptionCreate) SetActiveFrom(v time.Time) *SubscriptionCreate", + "line": 101 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_c *SubscriptionCreate) SetActiveTo(v time.Time) *SubscriptionCreate", + "line": 107 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_c *SubscriptionCreate) SetNillableActiveTo(v *time.Time) *SubscriptionCreate", + "line": 113 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *SubscriptionCreate) SetName(v string) *SubscriptionCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_c *SubscriptionCreate) SetNillableName(v *string) *SubscriptionCreate", + "line": 127 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *SubscriptionCreate) SetDescription(v string) *SubscriptionCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *SubscriptionCreate) SetNillableDescription(v *string) *SubscriptionCreate", + "line": 141 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_c *SubscriptionCreate) SetPlanID(v string) *SubscriptionCreate", + "line": 149 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_c *SubscriptionCreate) SetNillablePlanID(v *string) *SubscriptionCreate", + "line": 155 + }, + { + "kind": "func", + "name": "SetCustomerID", + "signature": "func (_c *SubscriptionCreate) SetCustomerID(v string) *SubscriptionCreate", + "line": 163 + }, + { + "kind": "func", + "name": "SetCurrency", + "signature": "func (_c *SubscriptionCreate) SetCurrency(v currencyx.Code) *SubscriptionCreate", + "line": 169 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (_c *SubscriptionCreate) SetBillingAnchor(v time.Time) *SubscriptionCreate", + "line": 175 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_c *SubscriptionCreate) SetBillingCadence(v datetime.ISODurationString) *SubscriptionCreate", + "line": 181 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_c *SubscriptionCreate) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionCreate", + "line": 187 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_c *SubscriptionCreate) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *SubscriptionCreate", + "line": 193 + }, + { + "kind": "func", + "name": "SetSettlementMode", + "signature": "func (_c *SubscriptionCreate) SetSettlementMode(v productcatalog.SettlementMode) *SubscriptionCreate", + "line": 201 + }, + { + "kind": "func", + "name": "SetNillableSettlementMode", + "signature": "func (_c *SubscriptionCreate) SetNillableSettlementMode(v *productcatalog.SettlementMode) *SubscriptionCreate", + "line": 207 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionCreate) SetID(v string) *SubscriptionCreate", + "line": 215 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionCreate) SetNillableID(v *string) *SubscriptionCreate", + "line": 221 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_c *SubscriptionCreate) SetPlan(v *Plan) *SubscriptionCreate", + "line": 229 + }, + { + "kind": "func", + "name": "SetCustomer", + "signature": "func (_c *SubscriptionCreate) SetCustomer(v *Customer) *SubscriptionCreate", + "line": 234 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_c *SubscriptionCreate) AddPhaseIDs(ids ...string) *SubscriptionCreate", + "line": 239 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_c *SubscriptionCreate) AddPhases(v ...*SubscriptionPhase) *SubscriptionCreate", + "line": 245 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_c *SubscriptionCreate) AddBillingLineIDs(ids ...string) *SubscriptionCreate", + "line": 254 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_c *SubscriptionCreate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionCreate", + "line": 260 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_c *SubscriptionCreate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionCreate", + "line": 269 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_c *SubscriptionCreate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionCreate", + "line": 275 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_c *SubscriptionCreate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionCreate", + "line": 284 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_c *SubscriptionCreate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionCreate", + "line": 290 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_c *SubscriptionCreate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionCreate", + "line": 299 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_c *SubscriptionCreate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionCreate", + "line": 305 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_c *SubscriptionCreate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionCreate", + "line": 314 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_c *SubscriptionCreate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionCreate", + "line": 320 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_c *SubscriptionCreate) AddAddonIDs(ids ...string) *SubscriptionCreate", + "line": 329 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_c *SubscriptionCreate) AddAddons(v ...*SubscriptionAddon) *SubscriptionCreate", + "line": 335 + }, + { + "kind": "func", + "name": "SetBillingSyncStateID", + "signature": "func (_c *SubscriptionCreate) SetBillingSyncStateID(id string) *SubscriptionCreate", + "line": 344 + }, + { + "kind": "func", + "name": "SetNillableBillingSyncStateID", + "signature": "func (_c *SubscriptionCreate) SetNillableBillingSyncStateID(id *string) *SubscriptionCreate", + "line": 350 + }, + { + "kind": "func", + "name": "SetBillingSyncState", + "signature": "func (_c *SubscriptionCreate) SetBillingSyncState(v *SubscriptionBillingSyncState) *SubscriptionCreate", + "line": 358 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionCreate) Mutation() *SubscriptionMutation", + "line": 363 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)", + "line": 368 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionCreate) SaveX(ctx context.Context) *Subscription", + "line": 374 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionCreate) Exec(ctx context.Context) error", + "line": 383 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionCreate) ExecX(ctx context.Context)", + "line": 389 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionCreate) defaults()", + "line": 396 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionCreate) check() error", + "line": 424 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionCreate) sqlSave(ctx context.Context) (*Subscription, error)", + "line": 494 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionCreate) createSpec() (*Subscription, *sqlgraph.CreateSpec, error)", + "line": 520 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertOne", + "line": 775 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionCreate) OnConflictColumns(columns ...string) *SubscriptionUpsertOne", + "line": 788 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionUpsert) SetAnnotations(v models.Annotations) *SubscriptionUpsert", + "line": 809 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionUpsert) UpdateAnnotations() *SubscriptionUpsert", + "line": 815 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionUpsert) ClearAnnotations() *SubscriptionUpsert", + "line": 821 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionUpsert) SetUpdatedAt(v time.Time) *SubscriptionUpsert", + "line": 827 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionUpsert) UpdateUpdatedAt() *SubscriptionUpsert", + "line": 833 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionUpsert) SetDeletedAt(v time.Time) *SubscriptionUpsert", + "line": 839 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionUpsert) UpdateDeletedAt() *SubscriptionUpsert", + "line": 845 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionUpsert) ClearDeletedAt() *SubscriptionUpsert", + "line": 851 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionUpsert) SetMetadata(v map[string]string) *SubscriptionUpsert", + "line": 857 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionUpsert) UpdateMetadata() *SubscriptionUpsert", + "line": 863 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionUpsert) ClearMetadata() *SubscriptionUpsert", + "line": 869 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionUpsert) SetActiveTo(v time.Time) *SubscriptionUpsert", + "line": 875 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionUpsert) UpdateActiveTo() *SubscriptionUpsert", + "line": 881 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionUpsert) ClearActiveTo() *SubscriptionUpsert", + "line": 887 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionUpsert) SetName(v string) *SubscriptionUpsert", + "line": 893 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionUpsert) UpdateName() *SubscriptionUpsert", + "line": 899 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionUpsert) SetDescription(v string) *SubscriptionUpsert", + "line": 905 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionUpsert) UpdateDescription() *SubscriptionUpsert", + "line": 911 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionUpsert) ClearDescription() *SubscriptionUpsert", + "line": 917 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *SubscriptionUpsert) SetPlanID(v string) *SubscriptionUpsert", + "line": 923 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *SubscriptionUpsert) UpdatePlanID() *SubscriptionUpsert", + "line": 929 + }, + { + "kind": "func", + "name": "ClearPlanID", + "signature": "func (u *SubscriptionUpsert) ClearPlanID() *SubscriptionUpsert", + "line": 935 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (u *SubscriptionUpsert) SetBillingAnchor(v time.Time) *SubscriptionUpsert", + "line": 941 + }, + { + "kind": "func", + "name": "UpdateBillingAnchor", + "signature": "func (u *SubscriptionUpsert) UpdateBillingAnchor() *SubscriptionUpsert", + "line": 947 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionUpsert) SetBillingCadence(v datetime.ISODurationString) *SubscriptionUpsert", + "line": 953 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionUpsert) UpdateBillingCadence() *SubscriptionUpsert", + "line": 959 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *SubscriptionUpsert) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionUpsert", + "line": 965 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *SubscriptionUpsert) UpdateProRatingConfig() *SubscriptionUpsert", + "line": 971 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionUpsertOne) UpdateNewValues() *SubscriptionUpsertOne", + "line": 987 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionUpsertOne) Ignore() *SubscriptionUpsertOne", + "line": 1021 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionUpsertOne) DoNothing() *SubscriptionUpsertOne", + "line": 1028 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionUpsertOne) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertOne", + "line": 1035 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionUpsertOne) SetAnnotations(v models.Annotations) *SubscriptionUpsertOne", + "line": 1043 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionUpsertOne) UpdateAnnotations() *SubscriptionUpsertOne", + "line": 1050 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionUpsertOne) ClearAnnotations() *SubscriptionUpsertOne", + "line": 1057 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionUpsertOne) SetUpdatedAt(v time.Time) *SubscriptionUpsertOne", + "line": 1064 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionUpsertOne) UpdateUpdatedAt() *SubscriptionUpsertOne", + "line": 1071 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionUpsertOne) SetDeletedAt(v time.Time) *SubscriptionUpsertOne", + "line": 1078 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionUpsertOne) UpdateDeletedAt() *SubscriptionUpsertOne", + "line": 1085 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionUpsertOne) ClearDeletedAt() *SubscriptionUpsertOne", + "line": 1092 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionUpsertOne) SetMetadata(v map[string]string) *SubscriptionUpsertOne", + "line": 1099 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionUpsertOne) UpdateMetadata() *SubscriptionUpsertOne", + "line": 1106 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionUpsertOne) ClearMetadata() *SubscriptionUpsertOne", + "line": 1113 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionUpsertOne) SetActiveTo(v time.Time) *SubscriptionUpsertOne", + "line": 1120 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionUpsertOne) UpdateActiveTo() *SubscriptionUpsertOne", + "line": 1127 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionUpsertOne) ClearActiveTo() *SubscriptionUpsertOne", + "line": 1134 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionUpsertOne) SetName(v string) *SubscriptionUpsertOne", + "line": 1141 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionUpsertOne) UpdateName() *SubscriptionUpsertOne", + "line": 1148 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionUpsertOne) SetDescription(v string) *SubscriptionUpsertOne", + "line": 1155 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionUpsertOne) UpdateDescription() *SubscriptionUpsertOne", + "line": 1162 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionUpsertOne) ClearDescription() *SubscriptionUpsertOne", + "line": 1169 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *SubscriptionUpsertOne) SetPlanID(v string) *SubscriptionUpsertOne", + "line": 1176 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *SubscriptionUpsertOne) UpdatePlanID() *SubscriptionUpsertOne", + "line": 1183 + }, + { + "kind": "func", + "name": "ClearPlanID", + "signature": "func (u *SubscriptionUpsertOne) ClearPlanID() *SubscriptionUpsertOne", + "line": 1190 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (u *SubscriptionUpsertOne) SetBillingAnchor(v time.Time) *SubscriptionUpsertOne", + "line": 1197 + }, + { + "kind": "func", + "name": "UpdateBillingAnchor", + "signature": "func (u *SubscriptionUpsertOne) UpdateBillingAnchor() *SubscriptionUpsertOne", + "line": 1204 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionUpsertOne) SetBillingCadence(v datetime.ISODurationString) *SubscriptionUpsertOne", + "line": 1211 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionUpsertOne) UpdateBillingCadence() *SubscriptionUpsertOne", + "line": 1218 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *SubscriptionUpsertOne) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionUpsertOne", + "line": 1225 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *SubscriptionUpsertOne) UpdateProRatingConfig() *SubscriptionUpsertOne", + "line": 1232 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionUpsertOne) Exec(ctx context.Context) error", + "line": 1239 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionUpsertOne) ExecX(ctx context.Context)", + "line": 1247 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1254 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionUpsertOne) IDX(ctx context.Context) string", + "line": 1268 + }, + { + "kind": "struct", + "name": "SubscriptionCreateBulk", + "signature": "type SubscriptionCreateBulk struct", + "line": 1277 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)", + "line": 1285 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription", + "line": 1344 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionCreateBulk) Exec(ctx context.Context) error", + "line": 1353 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionCreateBulk) ExecX(ctx context.Context)", + "line": 1359 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionUpsertBulk", + "line": 1380 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionCreateBulk) OnConflictColumns(columns ...string) *SubscriptionUpsertBulk", + "line": 1393 + }, + { + "kind": "struct", + "name": "SubscriptionUpsertBulk", + "signature": "type SubscriptionUpsertBulk struct", + "line": 1402 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionUpsertBulk) UpdateNewValues() *SubscriptionUpsertBulk", + "line": 1417 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionUpsertBulk) Ignore() *SubscriptionUpsertBulk", + "line": 1453 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionUpsertBulk) DoNothing() *SubscriptionUpsertBulk", + "line": 1460 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionUpsertBulk) Update(set func(*SubscriptionUpsert)) *SubscriptionUpsertBulk", + "line": 1467 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionUpsertBulk) SetAnnotations(v models.Annotations) *SubscriptionUpsertBulk", + "line": 1475 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionUpsertBulk) UpdateAnnotations() *SubscriptionUpsertBulk", + "line": 1482 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionUpsertBulk) ClearAnnotations() *SubscriptionUpsertBulk", + "line": 1489 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionUpsertBulk) SetUpdatedAt(v time.Time) *SubscriptionUpsertBulk", + "line": 1496 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionUpsertBulk) UpdateUpdatedAt() *SubscriptionUpsertBulk", + "line": 1503 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionUpsertBulk) SetDeletedAt(v time.Time) *SubscriptionUpsertBulk", + "line": 1510 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionUpsertBulk) UpdateDeletedAt() *SubscriptionUpsertBulk", + "line": 1517 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionUpsertBulk) ClearDeletedAt() *SubscriptionUpsertBulk", + "line": 1524 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionUpsertBulk) SetMetadata(v map[string]string) *SubscriptionUpsertBulk", + "line": 1531 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionUpsertBulk) UpdateMetadata() *SubscriptionUpsertBulk", + "line": 1538 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionUpsertBulk) ClearMetadata() *SubscriptionUpsertBulk", + "line": 1545 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionUpsertBulk) SetActiveTo(v time.Time) *SubscriptionUpsertBulk", + "line": 1552 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionUpsertBulk) UpdateActiveTo() *SubscriptionUpsertBulk", + "line": 1559 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionUpsertBulk) ClearActiveTo() *SubscriptionUpsertBulk", + "line": 1566 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionUpsertBulk) SetName(v string) *SubscriptionUpsertBulk", + "line": 1573 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionUpsertBulk) UpdateName() *SubscriptionUpsertBulk", + "line": 1580 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionUpsertBulk) SetDescription(v string) *SubscriptionUpsertBulk", + "line": 1587 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionUpsertBulk) UpdateDescription() *SubscriptionUpsertBulk", + "line": 1594 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionUpsertBulk) ClearDescription() *SubscriptionUpsertBulk", + "line": 1601 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (u *SubscriptionUpsertBulk) SetPlanID(v string) *SubscriptionUpsertBulk", + "line": 1608 + }, + { + "kind": "func", + "name": "UpdatePlanID", + "signature": "func (u *SubscriptionUpsertBulk) UpdatePlanID() *SubscriptionUpsertBulk", + "line": 1615 + }, + { + "kind": "func", + "name": "ClearPlanID", + "signature": "func (u *SubscriptionUpsertBulk) ClearPlanID() *SubscriptionUpsertBulk", + "line": 1622 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (u *SubscriptionUpsertBulk) SetBillingAnchor(v time.Time) *SubscriptionUpsertBulk", + "line": 1629 + }, + { + "kind": "func", + "name": "UpdateBillingAnchor", + "signature": "func (u *SubscriptionUpsertBulk) UpdateBillingAnchor() *SubscriptionUpsertBulk", + "line": 1636 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionUpsertBulk) SetBillingCadence(v datetime.ISODurationString) *SubscriptionUpsertBulk", + "line": 1643 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionUpsertBulk) UpdateBillingCadence() *SubscriptionUpsertBulk", + "line": 1650 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (u *SubscriptionUpsertBulk) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionUpsertBulk", + "line": 1657 + }, + { + "kind": "func", + "name": "UpdateProRatingConfig", + "signature": "func (u *SubscriptionUpsertBulk) UpdateProRatingConfig() *SubscriptionUpsertBulk", + "line": 1664 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionUpsertBulk) Exec(ctx context.Context) error", + "line": 1671 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionUpsertBulk) ExecX(ctx context.Context)", + "line": 1687 + } + ], + "line_count": 1691 + }, + "openmeter/ent/db/subscription_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionDelete", + "signature": "type SubscriptionDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionDelete) Where(ps ...predicate.Subscription) *SubscriptionDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionDeleteOne", + "signature": "type SubscriptionDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionDeleteOne) Where(ps ...predicate.Subscription) *SubscriptionDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscription_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionQuery", + "signature": "type SubscriptionQuery struct", + "line": 31 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionQuery) Limit(limit int) *SubscriptionQuery", + "line": 60 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionQuery) Offset(offset int) *SubscriptionQuery", + "line": 66 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery", + "line": 73 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionQuery) Order(o ...subscription.OrderOption) *SubscriptionQuery", + "line": 79 + }, + { + "kind": "func", + "name": "QueryPlan", + "signature": "func (_q *SubscriptionQuery) QueryPlan() *PlanQuery", + "line": 85 + }, + { + "kind": "func", + "name": "QueryCustomer", + "signature": "func (_q *SubscriptionQuery) QueryCustomer() *CustomerQuery", + "line": 107 + }, + { + "kind": "func", + "name": "QueryPhases", + "signature": "func (_q *SubscriptionQuery) QueryPhases() *SubscriptionPhaseQuery", + "line": 129 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_q *SubscriptionQuery) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 151 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_q *SubscriptionQuery) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 173 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_q *SubscriptionQuery) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 195 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_q *SubscriptionQuery) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 217 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_q *SubscriptionQuery) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 239 + }, + { + "kind": "func", + "name": "QueryAddons", + "signature": "func (_q *SubscriptionQuery) QueryAddons() *SubscriptionAddonQuery", + "line": 261 + }, + { + "kind": "func", + "name": "QueryBillingSyncState", + "signature": "func (_q *SubscriptionQuery) QueryBillingSyncState() *SubscriptionBillingSyncStateQuery", + "line": 283 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)", + "line": 306 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionQuery) FirstX(ctx context.Context) *Subscription", + "line": 318 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 328 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionQuery) FirstIDX(ctx context.Context) string", + "line": 341 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)", + "line": 352 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription", + "line": 368 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 379 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionQuery) OnlyIDX(ctx context.Context) string", + "line": 396 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)", + "line": 405 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionQuery) AllX(ctx context.Context) []*Subscription", + "line": 415 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 424 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionQuery) IDsX(ctx context.Context) []string", + "line": 436 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionQuery) Count(ctx context.Context) (int, error)", + "line": 445 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionQuery) CountX(ctx context.Context) int", + "line": 454 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionQuery) Exist(ctx context.Context) (bool, error)", + "line": 463 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionQuery) ExistX(ctx context.Context) bool", + "line": 476 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionQuery) Clone() *SubscriptionQuery", + "line": 486 + }, + { + "kind": "func", + "name": "WithPlan", + "signature": "func (_q *SubscriptionQuery) WithPlan(opts ...func(*PlanQuery)) *SubscriptionQuery", + "line": 514 + }, + { + "kind": "func", + "name": "WithCustomer", + "signature": "func (_q *SubscriptionQuery) WithCustomer(opts ...func(*CustomerQuery)) *SubscriptionQuery", + "line": 525 + }, + { + "kind": "func", + "name": "WithPhases", + "signature": "func (_q *SubscriptionQuery) WithPhases(opts ...func(*SubscriptionPhaseQuery)) *SubscriptionQuery", + "line": 536 + }, + { + "kind": "func", + "name": "WithBillingLines", + "signature": "func (_q *SubscriptionQuery) WithBillingLines(opts ...func(*BillingInvoiceLineQuery)) *SubscriptionQuery", + "line": 547 + }, + { + "kind": "func", + "name": "WithBillingSplitLineGroups", + "signature": "func (_q *SubscriptionQuery) WithBillingSplitLineGroups(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *SubscriptionQuery", + "line": 558 + }, + { + "kind": "func", + "name": "WithChargesUsageBased", + "signature": "func (_q *SubscriptionQuery) WithChargesUsageBased(opts ...func(*ChargeUsageBasedQuery)) *SubscriptionQuery", + "line": 569 + }, + { + "kind": "func", + "name": "WithChargesCreditPurchase", + "signature": "func (_q *SubscriptionQuery) WithChargesCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *SubscriptionQuery", + "line": 580 + }, + { + "kind": "func", + "name": "WithChargesFlatFee", + "signature": "func (_q *SubscriptionQuery) WithChargesFlatFee(opts ...func(*ChargeFlatFeeQuery)) *SubscriptionQuery", + "line": 591 + }, + { + "kind": "func", + "name": "WithAddons", + "signature": "func (_q *SubscriptionQuery) WithAddons(opts ...func(*SubscriptionAddonQuery)) *SubscriptionQuery", + "line": 602 + }, + { + "kind": "func", + "name": "WithBillingSyncState", + "signature": "func (_q *SubscriptionQuery) WithBillingSyncState(opts ...func(*SubscriptionBillingSyncStateQuery)) *SubscriptionQuery", + "line": 613 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy", + "line": 636 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect", + "line": 657 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionQuery) Aggregate(fns ...AggregateFunc) *SubscriptionSelect", + "line": 666 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionQuery) prepareQuery(ctx context.Context) error", + "line": 670 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Subscription, error)", + "line": 696 + }, + { + "kind": "func", + "name": "loadPlan", + "signature": "func (_q *SubscriptionQuery) loadPlan(ctx context.Context, query *PlanQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *Plan)) error", + "line": 810 + }, + { + "kind": "func", + "name": "loadCustomer", + "signature": "func (_q *SubscriptionQuery) loadCustomer(ctx context.Context, query *CustomerQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *Customer)) error", + "line": 842 + }, + { + "kind": "func", + "name": "loadPhases", + "signature": "func (_q *SubscriptionQuery) loadPhases(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *SubscriptionPhase)) error", + "line": 871 + }, + { + "kind": "func", + "name": "loadBillingLines", + "signature": "func (_q *SubscriptionQuery) loadBillingLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *BillingInvoiceLine)) error", + "line": 901 + }, + { + "kind": "func", + "name": "loadBillingSplitLineGroups", + "signature": "func (_q *SubscriptionQuery) loadBillingSplitLineGroups(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *BillingInvoiceSplitLineGroup)) error", + "line": 935 + }, + { + "kind": "func", + "name": "loadChargesUsageBased", + "signature": "func (_q *SubscriptionQuery) loadChargesUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *ChargeUsageBased)) error", + "line": 968 + }, + { + "kind": "func", + "name": "loadChargesCreditPurchase", + "signature": "func (_q *SubscriptionQuery) loadChargesCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *ChargeCreditPurchase)) error", + "line": 1001 + }, + { + "kind": "func", + "name": "loadChargesFlatFee", + "signature": "func (_q *SubscriptionQuery) loadChargesFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *ChargeFlatFee)) error", + "line": 1034 + }, + { + "kind": "func", + "name": "loadAddons", + "signature": "func (_q *SubscriptionQuery) loadAddons(ctx context.Context, query *SubscriptionAddonQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *SubscriptionAddon)) error", + "line": 1067 + }, + { + "kind": "func", + "name": "loadBillingSyncState", + "signature": "func (_q *SubscriptionQuery) loadBillingSyncState(ctx context.Context, query *SubscriptionBillingSyncStateQuery, nodes []*Subscription, init func(*Subscription), assign func(*Subscription, *SubscriptionBillingSyncState)) error", + "line": 1097 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1125 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1137 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1183 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionQuery", + "line": 1221 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionQuery) ForShare(opts ...sql.LockOption) *SubscriptionQuery", + "line": 1234 + }, + { + "kind": "struct", + "name": "SubscriptionGroupBy", + "signature": "type SubscriptionGroupBy struct", + "line": 1245 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy", + "line": 1251 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionGroupBy) Scan(ctx context.Context, v any) error", + "line": 1257 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionGroupBy) sqlScan(ctx context.Context, root *SubscriptionQuery, v any) error", + "line": 1265 + }, + { + "kind": "struct", + "name": "SubscriptionSelect", + "signature": "type SubscriptionSelect struct", + "line": 1293 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionSelect) Aggregate(fns ...AggregateFunc) *SubscriptionSelect", + "line": 1299 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionSelect) Scan(ctx context.Context, v any) error", + "line": 1305 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionSelect) sqlScan(ctx context.Context, root *SubscriptionQuery, v any) error", + "line": 1313 + } + ], + "line_count": 1332 + }, + "openmeter/ent/db/subscription_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionUpdate", + "signature": "type SubscriptionUpdate struct", + "line": 31 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *SubscriptionUpdate) SetAnnotations(v models.Annotations) *SubscriptionUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *SubscriptionUpdate) ClearAnnotations() *SubscriptionUpdate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionUpdate) SetUpdatedAt(v time.Time) *SubscriptionUpdate", + "line": 56 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionUpdate) SetDeletedAt(v time.Time) *SubscriptionUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionUpdate) SetNillableDeletedAt(v *time.Time) *SubscriptionUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionUpdate) ClearDeletedAt() *SubscriptionUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionUpdate) SetMetadata(v map[string]string) *SubscriptionUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionUpdate) ClearMetadata() *SubscriptionUpdate", + "line": 88 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *SubscriptionUpdate) SetActiveTo(v time.Time) *SubscriptionUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *SubscriptionUpdate) SetNillableActiveTo(v *time.Time) *SubscriptionUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *SubscriptionUpdate) ClearActiveTo() *SubscriptionUpdate", + "line": 108 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionUpdate) SetName(v string) *SubscriptionUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionUpdate) SetNillableName(v *string) *SubscriptionUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionUpdate) SetDescription(v string) *SubscriptionUpdate", + "line": 128 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionUpdate) SetNillableDescription(v *string) *SubscriptionUpdate", + "line": 134 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionUpdate) ClearDescription() *SubscriptionUpdate", + "line": 142 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_u *SubscriptionUpdate) SetPlanID(v string) *SubscriptionUpdate", + "line": 148 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_u *SubscriptionUpdate) SetNillablePlanID(v *string) *SubscriptionUpdate", + "line": 154 + }, + { + "kind": "func", + "name": "ClearPlanID", + "signature": "func (_u *SubscriptionUpdate) ClearPlanID() *SubscriptionUpdate", + "line": 162 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (_u *SubscriptionUpdate) SetBillingAnchor(v time.Time) *SubscriptionUpdate", + "line": 168 + }, + { + "kind": "func", + "name": "SetNillableBillingAnchor", + "signature": "func (_u *SubscriptionUpdate) SetNillableBillingAnchor(v *time.Time) *SubscriptionUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *SubscriptionUpdate) SetBillingCadence(v datetime.ISODurationString) *SubscriptionUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *SubscriptionUpdate) SetNillableBillingCadence(v *datetime.ISODurationString) *SubscriptionUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_u *SubscriptionUpdate) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionUpdate", + "line": 196 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_u *SubscriptionUpdate) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *SubscriptionUpdate", + "line": 202 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_u *SubscriptionUpdate) SetPlan(v *Plan) *SubscriptionUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_u *SubscriptionUpdate) AddPhaseIDs(ids ...string) *SubscriptionUpdate", + "line": 215 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_u *SubscriptionUpdate) AddPhases(v ...*SubscriptionPhase) *SubscriptionUpdate", + "line": 221 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionUpdate) AddBillingLineIDs(ids ...string) *SubscriptionUpdate", + "line": 230 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionUpdate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionUpdate", + "line": 236 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionUpdate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionUpdate", + "line": 245 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionUpdate", + "line": 251 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionUpdate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionUpdate", + "line": 260 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionUpdate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionUpdate", + "line": 266 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionUpdate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionUpdate", + "line": 275 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionUpdate", + "line": 281 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionUpdate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionUpdate", + "line": 290 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionUpdate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionUpdate", + "line": 296 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_u *SubscriptionUpdate) AddAddonIDs(ids ...string) *SubscriptionUpdate", + "line": 305 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_u *SubscriptionUpdate) AddAddons(v ...*SubscriptionAddon) *SubscriptionUpdate", + "line": 311 + }, + { + "kind": "func", + "name": "SetBillingSyncStateID", + "signature": "func (_u *SubscriptionUpdate) SetBillingSyncStateID(id string) *SubscriptionUpdate", + "line": 320 + }, + { + "kind": "func", + "name": "SetNillableBillingSyncStateID", + "signature": "func (_u *SubscriptionUpdate) SetNillableBillingSyncStateID(id *string) *SubscriptionUpdate", + "line": 326 + }, + { + "kind": "func", + "name": "SetBillingSyncState", + "signature": "func (_u *SubscriptionUpdate) SetBillingSyncState(v *SubscriptionBillingSyncState) *SubscriptionUpdate", + "line": 334 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionUpdate) Mutation() *SubscriptionMutation", + "line": 339 + }, + { + "kind": "func", + "name": "ClearPlan", + "signature": "func (_u *SubscriptionUpdate) ClearPlan() *SubscriptionUpdate", + "line": 344 + }, + { + "kind": "func", + "name": "ClearPhases", + "signature": "func (_u *SubscriptionUpdate) ClearPhases() *SubscriptionUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "RemovePhaseIDs", + "signature": "func (_u *SubscriptionUpdate) RemovePhaseIDs(ids ...string) *SubscriptionUpdate", + "line": 356 + }, + { + "kind": "func", + "name": "RemovePhases", + "signature": "func (_u *SubscriptionUpdate) RemovePhases(v ...*SubscriptionPhase) *SubscriptionUpdate", + "line": 362 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionUpdate) ClearBillingLines() *SubscriptionUpdate", + "line": 371 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveBillingLineIDs(ids ...string) *SubscriptionUpdate", + "line": 377 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionUpdate) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionUpdate", + "line": 383 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdate) ClearBillingSplitLineGroups() *SubscriptionUpdate", + "line": 392 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionUpdate", + "line": 398 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdate) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionUpdate", + "line": 404 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionUpdate) ClearChargesUsageBased() *SubscriptionUpdate", + "line": 413 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionUpdate", + "line": 419 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionUpdate", + "line": 425 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdate) ClearChargesCreditPurchase() *SubscriptionUpdate", + "line": 434 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionUpdate", + "line": 440 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionUpdate", + "line": 446 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionUpdate) ClearChargesFlatFee() *SubscriptionUpdate", + "line": 455 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionUpdate", + "line": 461 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionUpdate) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionUpdate", + "line": 467 + }, + { + "kind": "func", + "name": "ClearAddons", + "signature": "func (_u *SubscriptionUpdate) ClearAddons() *SubscriptionUpdate", + "line": 476 + }, + { + "kind": "func", + "name": "RemoveAddonIDs", + "signature": "func (_u *SubscriptionUpdate) RemoveAddonIDs(ids ...string) *SubscriptionUpdate", + "line": 482 + }, + { + "kind": "func", + "name": "RemoveAddons", + "signature": "func (_u *SubscriptionUpdate) RemoveAddons(v ...*SubscriptionAddon) *SubscriptionUpdate", + "line": 488 + }, + { + "kind": "func", + "name": "ClearBillingSyncState", + "signature": "func (_u *SubscriptionUpdate) ClearBillingSyncState() *SubscriptionUpdate", + "line": 497 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionUpdate) Save(ctx context.Context) (int, error)", + "line": 503 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionUpdate) SaveX(ctx context.Context) int", + "line": 509 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionUpdate) Exec(ctx context.Context) error", + "line": 518 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionUpdate) ExecX(ctx context.Context)", + "line": 524 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionUpdate) defaults()", + "line": 531 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionUpdate) check() error", + "line": 539 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 556 + }, + { + "kind": "struct", + "name": "SubscriptionUpdateOne", + "signature": "type SubscriptionUpdateOne struct", + "line": 1003 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *SubscriptionUpdateOne) SetAnnotations(v models.Annotations) *SubscriptionUpdateOne", + "line": 1011 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *SubscriptionUpdateOne) ClearAnnotations() *SubscriptionUpdateOne", + "line": 1017 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionUpdateOne", + "line": 1023 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionUpdateOne) SetDeletedAt(v time.Time) *SubscriptionUpdateOne", + "line": 1029 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableDeletedAt(v *time.Time) *SubscriptionUpdateOne", + "line": 1035 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionUpdateOne) ClearDeletedAt() *SubscriptionUpdateOne", + "line": 1043 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionUpdateOne) SetMetadata(v map[string]string) *SubscriptionUpdateOne", + "line": 1049 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionUpdateOne) ClearMetadata() *SubscriptionUpdateOne", + "line": 1055 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *SubscriptionUpdateOne) SetActiveTo(v time.Time) *SubscriptionUpdateOne", + "line": 1061 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableActiveTo(v *time.Time) *SubscriptionUpdateOne", + "line": 1067 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *SubscriptionUpdateOne) ClearActiveTo() *SubscriptionUpdateOne", + "line": 1075 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionUpdateOne) SetName(v string) *SubscriptionUpdateOne", + "line": 1081 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableName(v *string) *SubscriptionUpdateOne", + "line": 1087 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionUpdateOne) SetDescription(v string) *SubscriptionUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableDescription(v *string) *SubscriptionUpdateOne", + "line": 1101 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionUpdateOne) ClearDescription() *SubscriptionUpdateOne", + "line": 1109 + }, + { + "kind": "func", + "name": "SetPlanID", + "signature": "func (_u *SubscriptionUpdateOne) SetPlanID(v string) *SubscriptionUpdateOne", + "line": 1115 + }, + { + "kind": "func", + "name": "SetNillablePlanID", + "signature": "func (_u *SubscriptionUpdateOne) SetNillablePlanID(v *string) *SubscriptionUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "ClearPlanID", + "signature": "func (_u *SubscriptionUpdateOne) ClearPlanID() *SubscriptionUpdateOne", + "line": 1129 + }, + { + "kind": "func", + "name": "SetBillingAnchor", + "signature": "func (_u *SubscriptionUpdateOne) SetBillingAnchor(v time.Time) *SubscriptionUpdateOne", + "line": 1135 + }, + { + "kind": "func", + "name": "SetNillableBillingAnchor", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableBillingAnchor(v *time.Time) *SubscriptionUpdateOne", + "line": 1141 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *SubscriptionUpdateOne) SetBillingCadence(v datetime.ISODurationString) *SubscriptionUpdateOne", + "line": 1149 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableBillingCadence(v *datetime.ISODurationString) *SubscriptionUpdateOne", + "line": 1155 + }, + { + "kind": "func", + "name": "SetProRatingConfig", + "signature": "func (_u *SubscriptionUpdateOne) SetProRatingConfig(v productcatalog.ProRatingConfig) *SubscriptionUpdateOne", + "line": 1163 + }, + { + "kind": "func", + "name": "SetNillableProRatingConfig", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableProRatingConfig(v *productcatalog.ProRatingConfig) *SubscriptionUpdateOne", + "line": 1169 + }, + { + "kind": "func", + "name": "SetPlan", + "signature": "func (_u *SubscriptionUpdateOne) SetPlan(v *Plan) *SubscriptionUpdateOne", + "line": 1177 + }, + { + "kind": "func", + "name": "AddPhaseIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddPhaseIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1182 + }, + { + "kind": "func", + "name": "AddPhases", + "signature": "func (_u *SubscriptionUpdateOne) AddPhases(v ...*SubscriptionPhase) *SubscriptionUpdateOne", + "line": 1188 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddBillingLineIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1197 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionUpdateOne) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionUpdateOne", + "line": 1203 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1212 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdateOne) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionUpdateOne", + "line": 1218 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesUsageBasedIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1227 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionUpdateOne", + "line": 1233 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1242 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionUpdateOne", + "line": 1248 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesFlatFeeIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1257 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionUpdateOne) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionUpdateOne", + "line": 1263 + }, + { + "kind": "func", + "name": "AddAddonIDs", + "signature": "func (_u *SubscriptionUpdateOne) AddAddonIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1272 + }, + { + "kind": "func", + "name": "AddAddons", + "signature": "func (_u *SubscriptionUpdateOne) AddAddons(v ...*SubscriptionAddon) *SubscriptionUpdateOne", + "line": 1278 + }, + { + "kind": "func", + "name": "SetBillingSyncStateID", + "signature": "func (_u *SubscriptionUpdateOne) SetBillingSyncStateID(id string) *SubscriptionUpdateOne", + "line": 1287 + }, + { + "kind": "func", + "name": "SetNillableBillingSyncStateID", + "signature": "func (_u *SubscriptionUpdateOne) SetNillableBillingSyncStateID(id *string) *SubscriptionUpdateOne", + "line": 1293 + }, + { + "kind": "func", + "name": "SetBillingSyncState", + "signature": "func (_u *SubscriptionUpdateOne) SetBillingSyncState(v *SubscriptionBillingSyncState) *SubscriptionUpdateOne", + "line": 1301 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionUpdateOne) Mutation() *SubscriptionMutation", + "line": 1306 + }, + { + "kind": "func", + "name": "ClearPlan", + "signature": "func (_u *SubscriptionUpdateOne) ClearPlan() *SubscriptionUpdateOne", + "line": 1311 + }, + { + "kind": "func", + "name": "ClearPhases", + "signature": "func (_u *SubscriptionUpdateOne) ClearPhases() *SubscriptionUpdateOne", + "line": 1317 + }, + { + "kind": "func", + "name": "RemovePhaseIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemovePhaseIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1323 + }, + { + "kind": "func", + "name": "RemovePhases", + "signature": "func (_u *SubscriptionUpdateOne) RemovePhases(v ...*SubscriptionPhase) *SubscriptionUpdateOne", + "line": 1329 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionUpdateOne) ClearBillingLines() *SubscriptionUpdateOne", + "line": 1338 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveBillingLineIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1344 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionUpdateOne) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionUpdateOne", + "line": 1350 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdateOne) ClearBillingSplitLineGroups() *SubscriptionUpdateOne", + "line": 1359 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1365 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionUpdateOne) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionUpdateOne", + "line": 1371 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionUpdateOne) ClearChargesUsageBased() *SubscriptionUpdateOne", + "line": 1380 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1386 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionUpdateOne", + "line": 1392 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdateOne) ClearChargesCreditPurchase() *SubscriptionUpdateOne", + "line": 1401 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1407 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionUpdateOne", + "line": 1413 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionUpdateOne) ClearChargesFlatFee() *SubscriptionUpdateOne", + "line": 1422 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1428 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionUpdateOne) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionUpdateOne", + "line": 1434 + }, + { + "kind": "func", + "name": "ClearAddons", + "signature": "func (_u *SubscriptionUpdateOne) ClearAddons() *SubscriptionUpdateOne", + "line": 1443 + }, + { + "kind": "func", + "name": "RemoveAddonIDs", + "signature": "func (_u *SubscriptionUpdateOne) RemoveAddonIDs(ids ...string) *SubscriptionUpdateOne", + "line": 1449 + }, + { + "kind": "func", + "name": "RemoveAddons", + "signature": "func (_u *SubscriptionUpdateOne) RemoveAddons(v ...*SubscriptionAddon) *SubscriptionUpdateOne", + "line": 1455 + }, + { + "kind": "func", + "name": "ClearBillingSyncState", + "signature": "func (_u *SubscriptionUpdateOne) ClearBillingSyncState() *SubscriptionUpdateOne", + "line": 1464 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionUpdateOne) Where(ps ...predicate.Subscription) *SubscriptionUpdateOne", + "line": 1470 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne", + "line": 1477 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)", + "line": 1483 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription", + "line": 1489 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionUpdateOne) Exec(ctx context.Context) error", + "line": 1498 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionUpdateOne) ExecX(ctx context.Context)", + "line": 1504 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionUpdateOne) defaults()", + "line": 1511 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionUpdateOne) check() error", + "line": 1519 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionUpdateOne) sqlSave(ctx context.Context) (_node *Subscription, err error)", + "line": 1536 + } + ], + "line_count": 2000 + }, + "openmeter/ent/db/subscriptionaddon.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddon", + "signature": "type SubscriptionAddon struct", + "line": 19 + }, + { + "kind": "struct", + "name": "SubscriptionAddonEdges", + "signature": "type SubscriptionAddonEdges struct", + "line": 44 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e SubscriptionAddonEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 58 + }, + { + "kind": "func", + "name": "QuantitiesOrErr", + "signature": "func (e SubscriptionAddonEdges) QuantitiesOrErr() ([]*SubscriptionAddonQuantity, error)", + "line": 69 + }, + { + "kind": "func", + "name": "AddonOrErr", + "signature": "func (e SubscriptionAddonEdges) AddonOrErr() (*Addon, error)", + "line": 78 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *SubscriptionAddon) assignValues(columns []string, values []any) error", + "line": 107 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *SubscriptionAddon) Value(name string) (ent.Value, error)", + "line": 173 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *SubscriptionAddon) QuerySubscription() *SubscriptionQuery", + "line": 178 + }, + { + "kind": "func", + "name": "QueryQuantities", + "signature": "func (_m *SubscriptionAddon) QueryQuantities() *SubscriptionAddonQuantityQuery", + "line": 183 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_m *SubscriptionAddon) QueryAddon() *AddonQuery", + "line": 188 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *SubscriptionAddon) Update() *SubscriptionAddonUpdateOne", + "line": 195 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *SubscriptionAddon) Unwrap() *SubscriptionAddon", + "line": 201 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *SubscriptionAddon) String() string", + "line": 211 + } + ], + "line_count": 242 + }, + "openmeter/ent/db/subscriptionaddon/subscriptionaddon.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 75 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 105 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 110 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 115 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 120 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 125 + }, + { + "kind": "func", + "name": "ByAddonID", + "signature": "func ByAddonID(opts ...sql.OrderTermOption) OrderOption", + "line": 130 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 135 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 140 + }, + { + "kind": "func", + "name": "ByQuantitiesCount", + "signature": "func ByQuantitiesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 147 + }, + { + "kind": "func", + "name": "ByQuantities", + "signature": "func ByQuantities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 154 + }, + { + "kind": "func", + "name": "ByAddonField", + "signature": "func ByAddonField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 161 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 166 + }, + { + "kind": "func", + "name": "newQuantitiesStep", + "signature": "func newQuantitiesStep() *sqlgraph.Step", + "line": 173 + }, + { + "kind": "func", + "name": "newAddonStep", + "signature": "func newAddonStep() *sqlgraph.Step", + "line": 180 + } + ], + "line_count": 186 + }, + "openmeter/ent/db/subscriptionaddon/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.SubscriptionAddon", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.SubscriptionAddon", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.SubscriptionAddon", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.SubscriptionAddon", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.SubscriptionAddon", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.SubscriptionAddon", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.SubscriptionAddon", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.SubscriptionAddon", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.SubscriptionAddon", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.SubscriptionAddon", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.SubscriptionAddon", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.SubscriptionAddon", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.SubscriptionAddon", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.SubscriptionAddon", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.SubscriptionAddon", + "line": 84 + }, + { + "kind": "func", + "name": "AddonID", + "signature": "func AddonID(v string) predicate.SubscriptionAddon", + "line": 89 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.SubscriptionAddon", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.SubscriptionAddon", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.SubscriptionAddon", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.SubscriptionAddon", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.SubscriptionAddon", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.SubscriptionAddon", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.SubscriptionAddon", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.SubscriptionAddon", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.SubscriptionAddon", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.SubscriptionAddon", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.SubscriptionAddon", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.SubscriptionAddon", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.SubscriptionAddon", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.SubscriptionAddon", + "line": 159 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.SubscriptionAddon", + "line": 164 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.SubscriptionAddon", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.SubscriptionAddon", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.SubscriptionAddon", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.SubscriptionAddon", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.SubscriptionAddon", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.SubscriptionAddon", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.SubscriptionAddon", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.SubscriptionAddon", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.SubscriptionAddon", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.SubscriptionAddon", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.SubscriptionAddon", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.SubscriptionAddon", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.SubscriptionAddon", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.SubscriptionAddon", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.SubscriptionAddon", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.SubscriptionAddon", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.SubscriptionAddon", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.SubscriptionAddon", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.SubscriptionAddon", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.SubscriptionAddon", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.SubscriptionAddon", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.SubscriptionAddon", + "line": 299 + }, + { + "kind": "func", + "name": "AddonIDEQ", + "signature": "func AddonIDEQ(v string) predicate.SubscriptionAddon", + "line": 304 + }, + { + "kind": "func", + "name": "AddonIDNEQ", + "signature": "func AddonIDNEQ(v string) predicate.SubscriptionAddon", + "line": 309 + }, + { + "kind": "func", + "name": "AddonIDIn", + "signature": "func AddonIDIn(vs ...string) predicate.SubscriptionAddon", + "line": 314 + }, + { + "kind": "func", + "name": "AddonIDNotIn", + "signature": "func AddonIDNotIn(vs ...string) predicate.SubscriptionAddon", + "line": 319 + }, + { + "kind": "func", + "name": "AddonIDGT", + "signature": "func AddonIDGT(v string) predicate.SubscriptionAddon", + "line": 324 + }, + { + "kind": "func", + "name": "AddonIDGTE", + "signature": "func AddonIDGTE(v string) predicate.SubscriptionAddon", + "line": 329 + }, + { + "kind": "func", + "name": "AddonIDLT", + "signature": "func AddonIDLT(v string) predicate.SubscriptionAddon", + "line": 334 + }, + { + "kind": "func", + "name": "AddonIDLTE", + "signature": "func AddonIDLTE(v string) predicate.SubscriptionAddon", + "line": 339 + }, + { + "kind": "func", + "name": "AddonIDContains", + "signature": "func AddonIDContains(v string) predicate.SubscriptionAddon", + "line": 344 + }, + { + "kind": "func", + "name": "AddonIDHasPrefix", + "signature": "func AddonIDHasPrefix(v string) predicate.SubscriptionAddon", + "line": 349 + }, + { + "kind": "func", + "name": "AddonIDHasSuffix", + "signature": "func AddonIDHasSuffix(v string) predicate.SubscriptionAddon", + "line": 354 + }, + { + "kind": "func", + "name": "AddonIDEqualFold", + "signature": "func AddonIDEqualFold(v string) predicate.SubscriptionAddon", + "line": 359 + }, + { + "kind": "func", + "name": "AddonIDContainsFold", + "signature": "func AddonIDContainsFold(v string) predicate.SubscriptionAddon", + "line": 364 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.SubscriptionAddon", + "line": 369 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.SubscriptionAddon", + "line": 374 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.SubscriptionAddon", + "line": 379 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.SubscriptionAddon", + "line": 384 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.SubscriptionAddon", + "line": 389 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.SubscriptionAddon", + "line": 394 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.SubscriptionAddon", + "line": 399 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.SubscriptionAddon", + "line": 404 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.SubscriptionAddon", + "line": 409 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.SubscriptionAddon", + "line": 414 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.SubscriptionAddon", + "line": 419 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.SubscriptionAddon", + "line": 424 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.SubscriptionAddon", + "line": 429 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.SubscriptionAddon", + "line": 434 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.SubscriptionAddon", + "line": 445 + }, + { + "kind": "func", + "name": "HasQuantities", + "signature": "func HasQuantities() predicate.SubscriptionAddon", + "line": 457 + }, + { + "kind": "func", + "name": "HasQuantitiesWith", + "signature": "func HasQuantitiesWith(preds ...predicate.SubscriptionAddonQuantity) predicate.SubscriptionAddon", + "line": 468 + }, + { + "kind": "func", + "name": "HasAddon", + "signature": "func HasAddon() predicate.SubscriptionAddon", + "line": 480 + }, + { + "kind": "func", + "name": "HasAddonWith", + "signature": "func HasAddonWith(preds ...predicate.Addon) predicate.SubscriptionAddon", + "line": 491 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.SubscriptionAddon) predicate.SubscriptionAddon", + "line": 503 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.SubscriptionAddon) predicate.SubscriptionAddon", + "line": 508 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.SubscriptionAddon) predicate.SubscriptionAddon", + "line": 513 + } + ], + "line_count": 515 + }, + "openmeter/ent/db/subscriptionaddon_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonCreate", + "signature": "type SubscriptionAddonCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionAddonCreate) SetNamespace(v string) *SubscriptionAddonCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *SubscriptionAddonCreate) SetMetadata(v map[string]string) *SubscriptionAddonCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetCreatedAt(v time.Time) *SubscriptionAddonCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionAddonCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetUpdatedAt(v time.Time) *SubscriptionAddonCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionAddonCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetDeletedAt(v time.Time) *SubscriptionAddonCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubscriptionAddonCreate) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetAddonID", + "signature": "func (_c *SubscriptionAddonCreate) SetAddonID(v string) *SubscriptionAddonCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *SubscriptionAddonCreate) SetSubscriptionID(v string) *SubscriptionAddonCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionAddonCreate) SetID(v string) *SubscriptionAddonCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionAddonCreate) SetNillableID(v *string) *SubscriptionAddonCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *SubscriptionAddonCreate) SetSubscription(v *Subscription) *SubscriptionAddonCreate", + "line": 110 + }, + { + "kind": "func", + "name": "AddQuantityIDs", + "signature": "func (_c *SubscriptionAddonCreate) AddQuantityIDs(ids ...string) *SubscriptionAddonCreate", + "line": 115 + }, + { + "kind": "func", + "name": "AddQuantities", + "signature": "func (_c *SubscriptionAddonCreate) AddQuantities(v ...*SubscriptionAddonQuantity) *SubscriptionAddonCreate", + "line": 121 + }, + { + "kind": "func", + "name": "SetAddon", + "signature": "func (_c *SubscriptionAddonCreate) SetAddon(v *Addon) *SubscriptionAddonCreate", + "line": 130 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionAddonCreate) Mutation() *SubscriptionAddonMutation", + "line": 135 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionAddonCreate) Save(ctx context.Context) (*SubscriptionAddon, error)", + "line": 140 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionAddonCreate) SaveX(ctx context.Context) *SubscriptionAddon", + "line": 146 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionAddonCreate) Exec(ctx context.Context) error", + "line": 155 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionAddonCreate) ExecX(ctx context.Context)", + "line": 161 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionAddonCreate) defaults()", + "line": 168 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionAddonCreate) check() error", + "line": 184 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionAddonCreate) sqlSave(ctx context.Context) (*SubscriptionAddon, error)", + "line": 224 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionAddonCreate) createSpec() (*SubscriptionAddon, *sqlgraph.CreateSpec)", + "line": 247 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionAddonCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionAddonUpsertOne", + "line": 346 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionAddonCreate) OnConflictColumns(columns ...string) *SubscriptionAddonUpsertOne", + "line": 359 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionAddonUpsert) SetMetadata(v map[string]string) *SubscriptionAddonUpsert", + "line": 380 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionAddonUpsert) UpdateMetadata() *SubscriptionAddonUpsert", + "line": 386 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionAddonUpsert) ClearMetadata() *SubscriptionAddonUpsert", + "line": 392 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsert) SetUpdatedAt(v time.Time) *SubscriptionAddonUpsert", + "line": 398 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsert) UpdateUpdatedAt() *SubscriptionAddonUpsert", + "line": 404 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonUpsert) SetDeletedAt(v time.Time) *SubscriptionAddonUpsert", + "line": 410 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonUpsert) UpdateDeletedAt() *SubscriptionAddonUpsert", + "line": 416 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonUpsert) ClearDeletedAt() *SubscriptionAddonUpsert", + "line": 422 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionAddonUpsertOne) UpdateNewValues() *SubscriptionAddonUpsertOne", + "line": 438 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionAddonUpsertOne) Ignore() *SubscriptionAddonUpsertOne", + "line": 466 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionAddonUpsertOne) DoNothing() *SubscriptionAddonUpsertOne", + "line": 473 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionAddonUpsertOne) Update(set func(*SubscriptionAddonUpsert)) *SubscriptionAddonUpsertOne", + "line": 480 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionAddonUpsertOne) SetMetadata(v map[string]string) *SubscriptionAddonUpsertOne", + "line": 488 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionAddonUpsertOne) UpdateMetadata() *SubscriptionAddonUpsertOne", + "line": 495 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionAddonUpsertOne) ClearMetadata() *SubscriptionAddonUpsertOne", + "line": 502 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsertOne) SetUpdatedAt(v time.Time) *SubscriptionAddonUpsertOne", + "line": 509 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsertOne) UpdateUpdatedAt() *SubscriptionAddonUpsertOne", + "line": 516 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertOne) SetDeletedAt(v time.Time) *SubscriptionAddonUpsertOne", + "line": 523 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertOne) UpdateDeletedAt() *SubscriptionAddonUpsertOne", + "line": 530 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertOne) ClearDeletedAt() *SubscriptionAddonUpsertOne", + "line": 537 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionAddonUpsertOne) Exec(ctx context.Context) error", + "line": 544 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionAddonUpsertOne) ExecX(ctx context.Context)", + "line": 552 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionAddonUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 559 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionAddonUpsertOne) IDX(ctx context.Context) string", + "line": 573 + }, + { + "kind": "struct", + "name": "SubscriptionAddonCreateBulk", + "signature": "type SubscriptionAddonCreateBulk struct", + "line": 582 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionAddonCreateBulk) Save(ctx context.Context) ([]*SubscriptionAddon, error)", + "line": 590 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionAddonCreateBulk) SaveX(ctx context.Context) []*SubscriptionAddon", + "line": 646 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionAddonCreateBulk) Exec(ctx context.Context) error", + "line": 655 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionAddonCreateBulk) ExecX(ctx context.Context)", + "line": 661 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionAddonCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionAddonUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionAddonCreateBulk) OnConflictColumns(columns ...string) *SubscriptionAddonUpsertBulk", + "line": 695 + }, + { + "kind": "struct", + "name": "SubscriptionAddonUpsertBulk", + "signature": "type SubscriptionAddonUpsertBulk struct", + "line": 704 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionAddonUpsertBulk) UpdateNewValues() *SubscriptionAddonUpsertBulk", + "line": 719 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionAddonUpsertBulk) Ignore() *SubscriptionAddonUpsertBulk", + "line": 749 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionAddonUpsertBulk) DoNothing() *SubscriptionAddonUpsertBulk", + "line": 756 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionAddonUpsertBulk) Update(set func(*SubscriptionAddonUpsert)) *SubscriptionAddonUpsertBulk", + "line": 763 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionAddonUpsertBulk) SetMetadata(v map[string]string) *SubscriptionAddonUpsertBulk", + "line": 771 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionAddonUpsertBulk) UpdateMetadata() *SubscriptionAddonUpsertBulk", + "line": 778 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionAddonUpsertBulk) ClearMetadata() *SubscriptionAddonUpsertBulk", + "line": 785 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsertBulk) SetUpdatedAt(v time.Time) *SubscriptionAddonUpsertBulk", + "line": 792 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonUpsertBulk) UpdateUpdatedAt() *SubscriptionAddonUpsertBulk", + "line": 799 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertBulk) SetDeletedAt(v time.Time) *SubscriptionAddonUpsertBulk", + "line": 806 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertBulk) UpdateDeletedAt() *SubscriptionAddonUpsertBulk", + "line": 813 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonUpsertBulk) ClearDeletedAt() *SubscriptionAddonUpsertBulk", + "line": 820 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionAddonUpsertBulk) Exec(ctx context.Context) error", + "line": 827 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionAddonUpsertBulk) ExecX(ctx context.Context)", + "line": 843 + } + ], + "line_count": 847 + }, + "openmeter/ent/db/subscriptionaddon_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonDelete", + "signature": "type SubscriptionAddonDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionAddonDelete) Where(ps ...predicate.SubscriptionAddon) *SubscriptionAddonDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionAddonDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionAddonDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionAddonDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionAddonDeleteOne", + "signature": "type SubscriptionAddonDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionAddonDeleteOne) Where(ps ...predicate.SubscriptionAddon) *SubscriptionAddonDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionAddonDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionAddonDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscriptionaddon_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuery", + "signature": "type SubscriptionAddonQuery struct", + "line": 24 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionAddonQuery) Where(ps ...predicate.SubscriptionAddon) *SubscriptionAddonQuery", + "line": 40 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionAddonQuery) Limit(limit int) *SubscriptionAddonQuery", + "line": 46 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionAddonQuery) Offset(offset int) *SubscriptionAddonQuery", + "line": 52 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionAddonQuery) Unique(unique bool) *SubscriptionAddonQuery", + "line": 59 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionAddonQuery) Order(o ...subscriptionaddon.OrderOption) *SubscriptionAddonQuery", + "line": 65 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *SubscriptionAddonQuery) QuerySubscription() *SubscriptionQuery", + "line": 71 + }, + { + "kind": "func", + "name": "QueryQuantities", + "signature": "func (_q *SubscriptionAddonQuery) QueryQuantities() *SubscriptionAddonQuantityQuery", + "line": 93 + }, + { + "kind": "func", + "name": "QueryAddon", + "signature": "func (_q *SubscriptionAddonQuery) QueryAddon() *AddonQuery", + "line": 115 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionAddonQuery) First(ctx context.Context) (*SubscriptionAddon, error)", + "line": 138 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionAddonQuery) FirstX(ctx context.Context) *SubscriptionAddon", + "line": 150 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionAddonQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 160 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionAddonQuery) FirstIDX(ctx context.Context) string", + "line": 173 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionAddonQuery) Only(ctx context.Context) (*SubscriptionAddon, error)", + "line": 184 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionAddonQuery) OnlyX(ctx context.Context) *SubscriptionAddon", + "line": 200 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionAddonQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 211 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionAddonQuery) OnlyIDX(ctx context.Context) string", + "line": 228 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionAddonQuery) All(ctx context.Context) ([]*SubscriptionAddon, error)", + "line": 237 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionAddonQuery) AllX(ctx context.Context) []*SubscriptionAddon", + "line": 247 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionAddonQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionAddonQuery) IDsX(ctx context.Context) []string", + "line": 268 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionAddonQuery) Count(ctx context.Context) (int, error)", + "line": 277 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionAddonQuery) CountX(ctx context.Context) int", + "line": 286 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionAddonQuery) Exist(ctx context.Context) (bool, error)", + "line": 295 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionAddonQuery) ExistX(ctx context.Context) bool", + "line": 308 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionAddonQuery) Clone() *SubscriptionAddonQuery", + "line": 318 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *SubscriptionAddonQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *SubscriptionAddonQuery", + "line": 339 + }, + { + "kind": "func", + "name": "WithQuantities", + "signature": "func (_q *SubscriptionAddonQuery) WithQuantities(opts ...func(*SubscriptionAddonQuantityQuery)) *SubscriptionAddonQuery", + "line": 350 + }, + { + "kind": "func", + "name": "WithAddon", + "signature": "func (_q *SubscriptionAddonQuery) WithAddon(opts ...func(*AddonQuery)) *SubscriptionAddonQuery", + "line": 361 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionAddonQuery) GroupBy(field string, fields ...string) *SubscriptionAddonGroupBy", + "line": 384 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionAddonQuery) Select(fields ...string) *SubscriptionAddonSelect", + "line": 405 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionAddonQuery) Aggregate(fns ...AggregateFunc) *SubscriptionAddonSelect", + "line": 414 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionAddonQuery) prepareQuery(ctx context.Context) error", + "line": 418 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionAddonQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*SubscriptionAddon, error)", + "line": 444 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *SubscriptionAddonQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*SubscriptionAddon, init func(*SubscriptionAddon), assign func(*SubscriptionAddon, *Subscription)) error", + "line": 499 + }, + { + "kind": "func", + "name": "loadQuantities", + "signature": "func (_q *SubscriptionAddonQuery) loadQuantities(ctx context.Context, query *SubscriptionAddonQuantityQuery, nodes []*SubscriptionAddon, init func(*SubscriptionAddon), assign func(*SubscriptionAddon, *SubscriptionAddonQuantity)) error", + "line": 528 + }, + { + "kind": "func", + "name": "loadAddon", + "signature": "func (_q *SubscriptionAddonQuery) loadAddon(ctx context.Context, query *AddonQuery, nodes []*SubscriptionAddon, init func(*SubscriptionAddon), assign func(*SubscriptionAddon, *Addon)) error", + "line": 558 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionAddonQuery) sqlCount(ctx context.Context) (int, error)", + "line": 588 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionAddonQuery) querySpec() *sqlgraph.QuerySpec", + "line": 600 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionAddonQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 646 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionAddonQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionAddonQuery", + "line": 684 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionAddonQuery) ForShare(opts ...sql.LockOption) *SubscriptionAddonQuery", + "line": 697 + }, + { + "kind": "struct", + "name": "SubscriptionAddonGroupBy", + "signature": "type SubscriptionAddonGroupBy struct", + "line": 708 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionAddonGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionAddonGroupBy", + "line": 714 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionAddonGroupBy) Scan(ctx context.Context, v any) error", + "line": 720 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionAddonGroupBy) sqlScan(ctx context.Context, root *SubscriptionAddonQuery, v any) error", + "line": 728 + }, + { + "kind": "struct", + "name": "SubscriptionAddonSelect", + "signature": "type SubscriptionAddonSelect struct", + "line": 756 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionAddonSelect) Aggregate(fns ...AggregateFunc) *SubscriptionAddonSelect", + "line": 762 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionAddonSelect) Scan(ctx context.Context, v any) error", + "line": 768 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionAddonSelect) sqlScan(ctx context.Context, root *SubscriptionAddonQuery, v any) error", + "line": 776 + } + ], + "line_count": 795 + }, + "openmeter/ent/db/subscriptionaddon_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonUpdate", + "signature": "type SubscriptionAddonUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionAddonUpdate) Where(ps ...predicate.SubscriptionAddon) *SubscriptionAddonUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionAddonUpdate) SetMetadata(v map[string]string) *SubscriptionAddonUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionAddonUpdate) ClearMetadata() *SubscriptionAddonUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionAddonUpdate) SetUpdatedAt(v time.Time) *SubscriptionAddonUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdate) SetDeletedAt(v time.Time) *SubscriptionAddonUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdate) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdate) ClearDeletedAt() *SubscriptionAddonUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "AddQuantityIDs", + "signature": "func (_u *SubscriptionAddonUpdate) AddQuantityIDs(ids ...string) *SubscriptionAddonUpdate", + "line": 71 + }, + { + "kind": "func", + "name": "AddQuantities", + "signature": "func (_u *SubscriptionAddonUpdate) AddQuantities(v ...*SubscriptionAddonQuantity) *SubscriptionAddonUpdate", + "line": 77 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionAddonUpdate) Mutation() *SubscriptionAddonMutation", + "line": 86 + }, + { + "kind": "func", + "name": "ClearQuantities", + "signature": "func (_u *SubscriptionAddonUpdate) ClearQuantities() *SubscriptionAddonUpdate", + "line": 91 + }, + { + "kind": "func", + "name": "RemoveQuantityIDs", + "signature": "func (_u *SubscriptionAddonUpdate) RemoveQuantityIDs(ids ...string) *SubscriptionAddonUpdate", + "line": 97 + }, + { + "kind": "func", + "name": "RemoveQuantities", + "signature": "func (_u *SubscriptionAddonUpdate) RemoveQuantities(v ...*SubscriptionAddonQuantity) *SubscriptionAddonUpdate", + "line": 103 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionAddonUpdate) Save(ctx context.Context) (int, error)", + "line": 112 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionAddonUpdate) SaveX(ctx context.Context) int", + "line": 118 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionAddonUpdate) Exec(ctx context.Context) error", + "line": 127 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionAddonUpdate) ExecX(ctx context.Context)", + "line": 133 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionAddonUpdate) defaults()", + "line": 140 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionAddonUpdate) check() error", + "line": 148 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionAddonUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 158 + }, + { + "kind": "struct", + "name": "SubscriptionAddonUpdateOne", + "signature": "type SubscriptionAddonUpdateOne struct", + "line": 243 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionAddonUpdateOne) SetMetadata(v map[string]string) *SubscriptionAddonUpdateOne", + "line": 251 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionAddonUpdateOne) ClearMetadata() *SubscriptionAddonUpdateOne", + "line": 257 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionAddonUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionAddonUpdateOne", + "line": 263 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdateOne) SetDeletedAt(v time.Time) *SubscriptionAddonUpdateOne", + "line": 269 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdateOne) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonUpdateOne", + "line": 275 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionAddonUpdateOne) ClearDeletedAt() *SubscriptionAddonUpdateOne", + "line": 283 + }, + { + "kind": "func", + "name": "AddQuantityIDs", + "signature": "func (_u *SubscriptionAddonUpdateOne) AddQuantityIDs(ids ...string) *SubscriptionAddonUpdateOne", + "line": 289 + }, + { + "kind": "func", + "name": "AddQuantities", + "signature": "func (_u *SubscriptionAddonUpdateOne) AddQuantities(v ...*SubscriptionAddonQuantity) *SubscriptionAddonUpdateOne", + "line": 295 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionAddonUpdateOne) Mutation() *SubscriptionAddonMutation", + "line": 304 + }, + { + "kind": "func", + "name": "ClearQuantities", + "signature": "func (_u *SubscriptionAddonUpdateOne) ClearQuantities() *SubscriptionAddonUpdateOne", + "line": 309 + }, + { + "kind": "func", + "name": "RemoveQuantityIDs", + "signature": "func (_u *SubscriptionAddonUpdateOne) RemoveQuantityIDs(ids ...string) *SubscriptionAddonUpdateOne", + "line": 315 + }, + { + "kind": "func", + "name": "RemoveQuantities", + "signature": "func (_u *SubscriptionAddonUpdateOne) RemoveQuantities(v ...*SubscriptionAddonQuantity) *SubscriptionAddonUpdateOne", + "line": 321 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionAddonUpdateOne) Where(ps ...predicate.SubscriptionAddon) *SubscriptionAddonUpdateOne", + "line": 330 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionAddonUpdateOne) Select(field string, fields ...string) *SubscriptionAddonUpdateOne", + "line": 337 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionAddonUpdateOne) Save(ctx context.Context) (*SubscriptionAddon, error)", + "line": 343 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionAddonUpdateOne) SaveX(ctx context.Context) *SubscriptionAddon", + "line": 349 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionAddonUpdateOne) Exec(ctx context.Context) error", + "line": 358 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionAddonUpdateOne) ExecX(ctx context.Context)", + "line": 364 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionAddonUpdateOne) defaults()", + "line": 371 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionAddonUpdateOne) check() error", + "line": 379 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionAddonUpdateOne) sqlSave(ctx context.Context) (_node *SubscriptionAddon, err error)", + "line": 389 + } + ], + "line_count": 491 + }, + "openmeter/ent/db/subscriptionaddonquantity.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantity", + "signature": "type SubscriptionAddonQuantity struct", + "line": 17 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityEdges", + "signature": "type SubscriptionAddonQuantityEdges struct", + "line": 42 + }, + { + "kind": "func", + "name": "SubscriptionAddonOrErr", + "signature": "func (e SubscriptionAddonQuantityEdges) SubscriptionAddonOrErr() (*SubscriptionAddon, error)", + "line": 52 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *SubscriptionAddonQuantity) assignValues(columns []string, values []any) error", + "line": 81 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *SubscriptionAddonQuantity) Value(name string) (ent.Value, error)", + "line": 145 + }, + { + "kind": "func", + "name": "QuerySubscriptionAddon", + "signature": "func (_m *SubscriptionAddonQuantity) QuerySubscriptionAddon() *SubscriptionAddonQuery", + "line": 150 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *SubscriptionAddonQuantity) Update() *SubscriptionAddonQuantityUpdateOne", + "line": 157 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *SubscriptionAddonQuantity) Unwrap() *SubscriptionAddonQuantity", + "line": 163 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *SubscriptionAddonQuantity) String() string", + "line": 173 + } + ], + "line_count": 204 + }, + "openmeter/ent/db/subscriptionaddonquantity/subscriptionaddonquantity.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 57 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 91 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 96 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 101 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 106 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 111 + }, + { + "kind": "func", + "name": "ByActiveFrom", + "signature": "func ByActiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 116 + }, + { + "kind": "func", + "name": "ByQuantity", + "signature": "func ByQuantity(opts ...sql.OrderTermOption) OrderOption", + "line": 121 + }, + { + "kind": "func", + "name": "BySubscriptionAddonID", + "signature": "func BySubscriptionAddonID(opts ...sql.OrderTermOption) OrderOption", + "line": 126 + }, + { + "kind": "func", + "name": "BySubscriptionAddonField", + "signature": "func BySubscriptionAddonField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 131 + }, + { + "kind": "func", + "name": "newSubscriptionAddonStep", + "signature": "func newSubscriptionAddonStep() *sqlgraph.Step", + "line": 136 + } + ], + "line_count": 142 + }, + "openmeter/ent/db/subscriptionaddonquantity/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.SubscriptionAddonQuantity", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.SubscriptionAddonQuantity", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.SubscriptionAddonQuantity", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.SubscriptionAddonQuantity", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.SubscriptionAddonQuantity", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.SubscriptionAddonQuantity", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.SubscriptionAddonQuantity", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.SubscriptionAddonQuantity", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.SubscriptionAddonQuantity", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.SubscriptionAddonQuantity", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.SubscriptionAddonQuantity", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.SubscriptionAddonQuantity", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 84 + }, + { + "kind": "func", + "name": "ActiveFrom", + "signature": "func ActiveFrom(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 89 + }, + { + "kind": "func", + "name": "Quantity", + "signature": "func Quantity(v int) predicate.SubscriptionAddonQuantity", + "line": 94 + }, + { + "kind": "func", + "name": "SubscriptionAddonID", + "signature": "func SubscriptionAddonID(v string) predicate.SubscriptionAddonQuantity", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.SubscriptionAddonQuantity", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.SubscriptionAddonQuantity", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.SubscriptionAddonQuantity", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.SubscriptionAddonQuantity", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.SubscriptionAddonQuantity", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.SubscriptionAddonQuantity", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.SubscriptionAddonQuantity", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.SubscriptionAddonQuantity", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.SubscriptionAddonQuantity", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.SubscriptionAddonQuantity", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.SubscriptionAddonQuantity", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.SubscriptionAddonQuantity", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.SubscriptionAddonQuantity", + "line": 164 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 169 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 204 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 209 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 244 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 249 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.SubscriptionAddonQuantity", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.SubscriptionAddonQuantity", + "line": 294 + }, + { + "kind": "func", + "name": "ActiveFromEQ", + "signature": "func ActiveFromEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 299 + }, + { + "kind": "func", + "name": "ActiveFromNEQ", + "signature": "func ActiveFromNEQ(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 304 + }, + { + "kind": "func", + "name": "ActiveFromIn", + "signature": "func ActiveFromIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 309 + }, + { + "kind": "func", + "name": "ActiveFromNotIn", + "signature": "func ActiveFromNotIn(vs ...time.Time) predicate.SubscriptionAddonQuantity", + "line": 314 + }, + { + "kind": "func", + "name": "ActiveFromGT", + "signature": "func ActiveFromGT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 319 + }, + { + "kind": "func", + "name": "ActiveFromGTE", + "signature": "func ActiveFromGTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 324 + }, + { + "kind": "func", + "name": "ActiveFromLT", + "signature": "func ActiveFromLT(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 329 + }, + { + "kind": "func", + "name": "ActiveFromLTE", + "signature": "func ActiveFromLTE(v time.Time) predicate.SubscriptionAddonQuantity", + "line": 334 + }, + { + "kind": "func", + "name": "QuantityEQ", + "signature": "func QuantityEQ(v int) predicate.SubscriptionAddonQuantity", + "line": 339 + }, + { + "kind": "func", + "name": "QuantityNEQ", + "signature": "func QuantityNEQ(v int) predicate.SubscriptionAddonQuantity", + "line": 344 + }, + { + "kind": "func", + "name": "QuantityIn", + "signature": "func QuantityIn(vs ...int) predicate.SubscriptionAddonQuantity", + "line": 349 + }, + { + "kind": "func", + "name": "QuantityNotIn", + "signature": "func QuantityNotIn(vs ...int) predicate.SubscriptionAddonQuantity", + "line": 354 + }, + { + "kind": "func", + "name": "QuantityGT", + "signature": "func QuantityGT(v int) predicate.SubscriptionAddonQuantity", + "line": 359 + }, + { + "kind": "func", + "name": "QuantityGTE", + "signature": "func QuantityGTE(v int) predicate.SubscriptionAddonQuantity", + "line": 364 + }, + { + "kind": "func", + "name": "QuantityLT", + "signature": "func QuantityLT(v int) predicate.SubscriptionAddonQuantity", + "line": 369 + }, + { + "kind": "func", + "name": "QuantityLTE", + "signature": "func QuantityLTE(v int) predicate.SubscriptionAddonQuantity", + "line": 374 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDEQ", + "signature": "func SubscriptionAddonIDEQ(v string) predicate.SubscriptionAddonQuantity", + "line": 379 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDNEQ", + "signature": "func SubscriptionAddonIDNEQ(v string) predicate.SubscriptionAddonQuantity", + "line": 384 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDIn", + "signature": "func SubscriptionAddonIDIn(vs ...string) predicate.SubscriptionAddonQuantity", + "line": 389 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDNotIn", + "signature": "func SubscriptionAddonIDNotIn(vs ...string) predicate.SubscriptionAddonQuantity", + "line": 394 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDGT", + "signature": "func SubscriptionAddonIDGT(v string) predicate.SubscriptionAddonQuantity", + "line": 399 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDGTE", + "signature": "func SubscriptionAddonIDGTE(v string) predicate.SubscriptionAddonQuantity", + "line": 404 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDLT", + "signature": "func SubscriptionAddonIDLT(v string) predicate.SubscriptionAddonQuantity", + "line": 409 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDLTE", + "signature": "func SubscriptionAddonIDLTE(v string) predicate.SubscriptionAddonQuantity", + "line": 414 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDContains", + "signature": "func SubscriptionAddonIDContains(v string) predicate.SubscriptionAddonQuantity", + "line": 419 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDHasPrefix", + "signature": "func SubscriptionAddonIDHasPrefix(v string) predicate.SubscriptionAddonQuantity", + "line": 424 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDHasSuffix", + "signature": "func SubscriptionAddonIDHasSuffix(v string) predicate.SubscriptionAddonQuantity", + "line": 429 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDEqualFold", + "signature": "func SubscriptionAddonIDEqualFold(v string) predicate.SubscriptionAddonQuantity", + "line": 434 + }, + { + "kind": "func", + "name": "SubscriptionAddonIDContainsFold", + "signature": "func SubscriptionAddonIDContainsFold(v string) predicate.SubscriptionAddonQuantity", + "line": 439 + }, + { + "kind": "func", + "name": "HasSubscriptionAddon", + "signature": "func HasSubscriptionAddon() predicate.SubscriptionAddonQuantity", + "line": 444 + }, + { + "kind": "func", + "name": "HasSubscriptionAddonWith", + "signature": "func HasSubscriptionAddonWith(preds ...predicate.SubscriptionAddon) predicate.SubscriptionAddonQuantity", + "line": 455 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.SubscriptionAddonQuantity) predicate.SubscriptionAddonQuantity", + "line": 467 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.SubscriptionAddonQuantity) predicate.SubscriptionAddonQuantity", + "line": 472 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.SubscriptionAddonQuantity) predicate.SubscriptionAddonQuantity", + "line": 477 + } + ], + "line_count": 479 + }, + "openmeter/ent/db/subscriptionaddonquantity_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantityCreate", + "signature": "type SubscriptionAddonQuantityCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNamespace(v string) *SubscriptionAddonQuantityCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetCreatedAt(v time.Time) *SubscriptionAddonQuantityCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionAddonQuantityCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionAddonQuantityCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonQuantityCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetActiveFrom(v time.Time) *SubscriptionAddonQuantityCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableActiveFrom", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableActiveFrom(v *time.Time) *SubscriptionAddonQuantityCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetQuantity", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetQuantity(v int) *SubscriptionAddonQuantityCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableQuantity", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableQuantity(v *int) *SubscriptionAddonQuantityCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetSubscriptionAddonID", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetSubscriptionAddonID(v string) *SubscriptionAddonQuantityCreate", + "line": 104 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetID(v string) *SubscriptionAddonQuantityCreate", + "line": 110 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetNillableID(v *string) *SubscriptionAddonQuantityCreate", + "line": 116 + }, + { + "kind": "func", + "name": "SetSubscriptionAddon", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SetSubscriptionAddon(v *SubscriptionAddon) *SubscriptionAddonQuantityCreate", + "line": 124 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionAddonQuantityCreate) Mutation() *SubscriptionAddonQuantityMutation", + "line": 129 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionAddonQuantityCreate) Save(ctx context.Context) (*SubscriptionAddonQuantity, error)", + "line": 134 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionAddonQuantityCreate) SaveX(ctx context.Context) *SubscriptionAddonQuantity", + "line": 140 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionAddonQuantityCreate) Exec(ctx context.Context) error", + "line": 149 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionAddonQuantityCreate) ExecX(ctx context.Context)", + "line": 155 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionAddonQuantityCreate) defaults()", + "line": 162 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionAddonQuantityCreate) check() error", + "line": 186 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionAddonQuantityCreate) sqlSave(ctx context.Context) (*SubscriptionAddonQuantity, error)", + "line": 226 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionAddonQuantityCreate) createSpec() (*SubscriptionAddonQuantity, *sqlgraph.CreateSpec)", + "line": 249 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionAddonQuantityCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionAddonQuantityUpsertOne", + "line": 319 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionAddonQuantityCreate) OnConflictColumns(columns ...string) *SubscriptionAddonQuantityUpsertOne", + "line": 332 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsert) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityUpsert", + "line": 353 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsert) UpdateUpdatedAt() *SubscriptionAddonQuantityUpsert", + "line": 359 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsert) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityUpsert", + "line": 365 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsert) UpdateDeletedAt() *SubscriptionAddonQuantityUpsert", + "line": 371 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsert) ClearDeletedAt() *SubscriptionAddonQuantityUpsert", + "line": 377 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) UpdateNewValues() *SubscriptionAddonQuantityUpsertOne", + "line": 393 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) Ignore() *SubscriptionAddonQuantityUpsertOne", + "line": 424 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) DoNothing() *SubscriptionAddonQuantityUpsertOne", + "line": 431 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) Update(set func(*SubscriptionAddonQuantityUpsert)) *SubscriptionAddonQuantityUpsertOne", + "line": 438 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityUpsertOne", + "line": 446 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) UpdateUpdatedAt() *SubscriptionAddonQuantityUpsertOne", + "line": 453 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityUpsertOne", + "line": 460 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) UpdateDeletedAt() *SubscriptionAddonQuantityUpsertOne", + "line": 467 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) ClearDeletedAt() *SubscriptionAddonQuantityUpsertOne", + "line": 474 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) Exec(ctx context.Context) error", + "line": 481 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) ExecX(ctx context.Context)", + "line": 489 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 496 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionAddonQuantityUpsertOne) IDX(ctx context.Context) string", + "line": 510 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityCreateBulk", + "signature": "type SubscriptionAddonQuantityCreateBulk struct", + "line": 519 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) Save(ctx context.Context) ([]*SubscriptionAddonQuantity, error)", + "line": 527 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) SaveX(ctx context.Context) []*SubscriptionAddonQuantity", + "line": 583 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) Exec(ctx context.Context) error", + "line": 592 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) ExecX(ctx context.Context)", + "line": 598 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionAddonQuantityUpsertBulk", + "line": 619 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionAddonQuantityCreateBulk) OnConflictColumns(columns ...string) *SubscriptionAddonQuantityUpsertBulk", + "line": 632 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityUpsertBulk", + "signature": "type SubscriptionAddonQuantityUpsertBulk struct", + "line": 641 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) UpdateNewValues() *SubscriptionAddonQuantityUpsertBulk", + "line": 656 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) Ignore() *SubscriptionAddonQuantityUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) DoNothing() *SubscriptionAddonQuantityUpsertBulk", + "line": 696 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) Update(set func(*SubscriptionAddonQuantityUpsert)) *SubscriptionAddonQuantityUpsertBulk", + "line": 703 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityUpsertBulk", + "line": 711 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) UpdateUpdatedAt() *SubscriptionAddonQuantityUpsertBulk", + "line": 718 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityUpsertBulk", + "line": 725 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) UpdateDeletedAt() *SubscriptionAddonQuantityUpsertBulk", + "line": 732 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) ClearDeletedAt() *SubscriptionAddonQuantityUpsertBulk", + "line": 739 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) Exec(ctx context.Context) error", + "line": 746 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionAddonQuantityUpsertBulk) ExecX(ctx context.Context)", + "line": 762 + } + ], + "line_count": 766 + }, + "openmeter/ent/db/subscriptionaddonquantity_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantityDelete", + "signature": "type SubscriptionAddonQuantityDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionAddonQuantityDelete) Where(ps ...predicate.SubscriptionAddonQuantity) *SubscriptionAddonQuantityDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionAddonQuantityDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionAddonQuantityDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionAddonQuantityDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityDeleteOne", + "signature": "type SubscriptionAddonQuantityDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionAddonQuantityDeleteOne) Where(ps ...predicate.SubscriptionAddonQuantity) *SubscriptionAddonQuantityDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionAddonQuantityDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionAddonQuantityDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscriptionaddonquantity_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantityQuery", + "signature": "type SubscriptionAddonQuantityQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Where(ps ...predicate.SubscriptionAddonQuantity) *SubscriptionAddonQuantityQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Limit(limit int) *SubscriptionAddonQuantityQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Offset(offset int) *SubscriptionAddonQuantityQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Unique(unique bool) *SubscriptionAddonQuantityQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Order(o ...subscriptionaddonquantity.OrderOption) *SubscriptionAddonQuantityQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QuerySubscriptionAddon", + "signature": "func (_q *SubscriptionAddonQuantityQuery) QuerySubscriptionAddon() *SubscriptionAddonQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionAddonQuantityQuery) First(ctx context.Context) (*SubscriptionAddonQuantity, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) FirstX(ctx context.Context) *SubscriptionAddonQuantity", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionAddonQuantityQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Only(ctx context.Context) (*SubscriptionAddonQuantity, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) OnlyX(ctx context.Context) *SubscriptionAddonQuantity", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionAddonQuantityQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionAddonQuantityQuery) All(ctx context.Context) ([]*SubscriptionAddonQuantity, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) AllX(ctx context.Context) []*SubscriptionAddonQuantity", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionAddonQuantityQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionAddonQuantityQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Clone() *SubscriptionAddonQuantityQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithSubscriptionAddon", + "signature": "func (_q *SubscriptionAddonQuantityQuery) WithSubscriptionAddon(opts ...func(*SubscriptionAddonQuery)) *SubscriptionAddonQuantityQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionAddonQuantityQuery) GroupBy(field string, fields ...string) *SubscriptionAddonQuantityGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Select(fields ...string) *SubscriptionAddonQuantitySelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionAddonQuantityQuery) Aggregate(fns ...AggregateFunc) *SubscriptionAddonQuantitySelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionAddonQuantityQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionAddonQuantityQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*SubscriptionAddonQuantity, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadSubscriptionAddon", + "signature": "func (_q *SubscriptionAddonQuantityQuery) loadSubscriptionAddon(ctx context.Context, query *SubscriptionAddonQuery, nodes []*SubscriptionAddonQuantity, init func(*SubscriptionAddonQuantity), assign func(*SubscriptionAddonQuantity, *SubscriptionAddon)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionAddonQuantityQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionAddonQuantityQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionAddonQuantityQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionAddonQuantityQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionAddonQuantityQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionAddonQuantityQuery) ForShare(opts ...sql.LockOption) *SubscriptionAddonQuantityQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityGroupBy", + "signature": "type SubscriptionAddonQuantityGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionAddonQuantityGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionAddonQuantityGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionAddonQuantityGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionAddonQuantityGroupBy) sqlScan(ctx context.Context, root *SubscriptionAddonQuantityQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantitySelect", + "signature": "type SubscriptionAddonQuantitySelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionAddonQuantitySelect) Aggregate(fns ...AggregateFunc) *SubscriptionAddonQuantitySelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionAddonQuantitySelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionAddonQuantitySelect) sqlScan(ctx context.Context, root *SubscriptionAddonQuantityQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/subscriptionaddonquantity_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantityUpdate", + "signature": "type SubscriptionAddonQuantityUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) Where(ps ...predicate.SubscriptionAddonQuantity) *SubscriptionAddonQuantityUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonQuantityUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) ClearDeletedAt() *SubscriptionAddonQuantityUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) Mutation() *SubscriptionAddonQuantityMutation", + "line": 58 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) Save(ctx context.Context) (int, error)", + "line": 63 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) SaveX(ctx context.Context) int", + "line": 69 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) Exec(ctx context.Context) error", + "line": 78 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) ExecX(ctx context.Context)", + "line": 84 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) defaults()", + "line": 91 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) check() error", + "line": 99 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionAddonQuantityUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 106 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantityUpdateOne", + "signature": "type SubscriptionAddonQuantityUpdateOne struct", + "line": 140 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionAddonQuantityUpdateOne", + "line": 148 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) SetDeletedAt(v time.Time) *SubscriptionAddonQuantityUpdateOne", + "line": 154 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) SetNillableDeletedAt(v *time.Time) *SubscriptionAddonQuantityUpdateOne", + "line": 160 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) ClearDeletedAt() *SubscriptionAddonQuantityUpdateOne", + "line": 168 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) Mutation() *SubscriptionAddonQuantityMutation", + "line": 174 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) Where(ps ...predicate.SubscriptionAddonQuantity) *SubscriptionAddonQuantityUpdateOne", + "line": 179 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) Select(field string, fields ...string) *SubscriptionAddonQuantityUpdateOne", + "line": 186 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) Save(ctx context.Context) (*SubscriptionAddonQuantity, error)", + "line": 192 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) SaveX(ctx context.Context) *SubscriptionAddonQuantity", + "line": 198 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) Exec(ctx context.Context) error", + "line": 207 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) ExecX(ctx context.Context)", + "line": 213 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) defaults()", + "line": 220 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) check() error", + "line": 228 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionAddonQuantityUpdateOne) sqlSave(ctx context.Context) (_node *SubscriptionAddonQuantity, err error)", + "line": 235 + } + ], + "line_count": 286 + }, + "openmeter/ent/db/subscriptionbillingsyncstate.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncState", + "signature": "type SubscriptionBillingSyncState struct", + "line": 17 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateEdges", + "signature": "type SubscriptionBillingSyncStateEdges struct", + "line": 38 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e SubscriptionBillingSyncStateEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 48 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *SubscriptionBillingSyncState) assignValues(columns []string, values []any) error", + "line": 77 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *SubscriptionBillingSyncState) Value(name string) (ent.Value, error)", + "line": 129 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *SubscriptionBillingSyncState) QuerySubscription() *SubscriptionQuery", + "line": 134 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *SubscriptionBillingSyncState) Update() *SubscriptionBillingSyncStateUpdateOne", + "line": 141 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *SubscriptionBillingSyncState) Unwrap() *SubscriptionBillingSyncState", + "line": 147 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *SubscriptionBillingSyncState) String() string", + "line": 157 + } + ], + "line_count": 182 + }, + "openmeter/ent/db/subscriptionbillingsyncstate/subscriptionbillingsyncstate.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 49 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 71 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 76 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 81 + }, + { + "kind": "func", + "name": "ByHasBillables", + "signature": "func ByHasBillables(opts ...sql.OrderTermOption) OrderOption", + "line": 86 + }, + { + "kind": "func", + "name": "BySyncedAt", + "signature": "func BySyncedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 91 + }, + { + "kind": "func", + "name": "ByNextSyncAfter", + "signature": "func ByNextSyncAfter(opts ...sql.OrderTermOption) OrderOption", + "line": 96 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 101 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 106 + } + ], + "line_count": 112 + }, + "openmeter/ent/db/subscriptionbillingsyncstate/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.SubscriptionBillingSyncState", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.SubscriptionBillingSyncState", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.SubscriptionBillingSyncState", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.SubscriptionBillingSyncState", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.SubscriptionBillingSyncState", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.SubscriptionBillingSyncState", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.SubscriptionBillingSyncState", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.SubscriptionBillingSyncState", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.SubscriptionBillingSyncState", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.SubscriptionBillingSyncState", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.SubscriptionBillingSyncState", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.SubscriptionBillingSyncState", + "line": 69 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.SubscriptionBillingSyncState", + "line": 74 + }, + { + "kind": "func", + "name": "HasBillables", + "signature": "func HasBillables(v bool) predicate.SubscriptionBillingSyncState", + "line": 79 + }, + { + "kind": "func", + "name": "SyncedAt", + "signature": "func SyncedAt(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 84 + }, + { + "kind": "func", + "name": "NextSyncAfter", + "signature": "func NextSyncAfter(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 89 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.SubscriptionBillingSyncState", + "line": 94 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.SubscriptionBillingSyncState", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.SubscriptionBillingSyncState", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.SubscriptionBillingSyncState", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.SubscriptionBillingSyncState", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.SubscriptionBillingSyncState", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.SubscriptionBillingSyncState", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.SubscriptionBillingSyncState", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.SubscriptionBillingSyncState", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.SubscriptionBillingSyncState", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.SubscriptionBillingSyncState", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.SubscriptionBillingSyncState", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.SubscriptionBillingSyncState", + "line": 154 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.SubscriptionBillingSyncState", + "line": 159 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.SubscriptionBillingSyncState", + "line": 164 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.SubscriptionBillingSyncState", + "line": 169 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.SubscriptionBillingSyncState", + "line": 174 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.SubscriptionBillingSyncState", + "line": 179 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.SubscriptionBillingSyncState", + "line": 184 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.SubscriptionBillingSyncState", + "line": 189 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.SubscriptionBillingSyncState", + "line": 194 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.SubscriptionBillingSyncState", + "line": 199 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.SubscriptionBillingSyncState", + "line": 204 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.SubscriptionBillingSyncState", + "line": 209 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.SubscriptionBillingSyncState", + "line": 214 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.SubscriptionBillingSyncState", + "line": 219 + }, + { + "kind": "func", + "name": "HasBillablesEQ", + "signature": "func HasBillablesEQ(v bool) predicate.SubscriptionBillingSyncState", + "line": 224 + }, + { + "kind": "func", + "name": "HasBillablesNEQ", + "signature": "func HasBillablesNEQ(v bool) predicate.SubscriptionBillingSyncState", + "line": 229 + }, + { + "kind": "func", + "name": "SyncedAtEQ", + "signature": "func SyncedAtEQ(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 234 + }, + { + "kind": "func", + "name": "SyncedAtNEQ", + "signature": "func SyncedAtNEQ(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 239 + }, + { + "kind": "func", + "name": "SyncedAtIn", + "signature": "func SyncedAtIn(vs ...time.Time) predicate.SubscriptionBillingSyncState", + "line": 244 + }, + { + "kind": "func", + "name": "SyncedAtNotIn", + "signature": "func SyncedAtNotIn(vs ...time.Time) predicate.SubscriptionBillingSyncState", + "line": 249 + }, + { + "kind": "func", + "name": "SyncedAtGT", + "signature": "func SyncedAtGT(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 254 + }, + { + "kind": "func", + "name": "SyncedAtGTE", + "signature": "func SyncedAtGTE(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 259 + }, + { + "kind": "func", + "name": "SyncedAtLT", + "signature": "func SyncedAtLT(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 264 + }, + { + "kind": "func", + "name": "SyncedAtLTE", + "signature": "func SyncedAtLTE(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 269 + }, + { + "kind": "func", + "name": "NextSyncAfterEQ", + "signature": "func NextSyncAfterEQ(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 274 + }, + { + "kind": "func", + "name": "NextSyncAfterNEQ", + "signature": "func NextSyncAfterNEQ(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 279 + }, + { + "kind": "func", + "name": "NextSyncAfterIn", + "signature": "func NextSyncAfterIn(vs ...time.Time) predicate.SubscriptionBillingSyncState", + "line": 284 + }, + { + "kind": "func", + "name": "NextSyncAfterNotIn", + "signature": "func NextSyncAfterNotIn(vs ...time.Time) predicate.SubscriptionBillingSyncState", + "line": 289 + }, + { + "kind": "func", + "name": "NextSyncAfterGT", + "signature": "func NextSyncAfterGT(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 294 + }, + { + "kind": "func", + "name": "NextSyncAfterGTE", + "signature": "func NextSyncAfterGTE(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 299 + }, + { + "kind": "func", + "name": "NextSyncAfterLT", + "signature": "func NextSyncAfterLT(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 304 + }, + { + "kind": "func", + "name": "NextSyncAfterLTE", + "signature": "func NextSyncAfterLTE(v time.Time) predicate.SubscriptionBillingSyncState", + "line": 309 + }, + { + "kind": "func", + "name": "NextSyncAfterIsNil", + "signature": "func NextSyncAfterIsNil() predicate.SubscriptionBillingSyncState", + "line": 314 + }, + { + "kind": "func", + "name": "NextSyncAfterNotNil", + "signature": "func NextSyncAfterNotNil() predicate.SubscriptionBillingSyncState", + "line": 319 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.SubscriptionBillingSyncState", + "line": 324 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.SubscriptionBillingSyncState", + "line": 335 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.SubscriptionBillingSyncState) predicate.SubscriptionBillingSyncState", + "line": 347 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.SubscriptionBillingSyncState) predicate.SubscriptionBillingSyncState", + "line": 352 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.SubscriptionBillingSyncState) predicate.SubscriptionBillingSyncState", + "line": 357 + } + ], + "line_count": 359 + }, + "openmeter/ent/db/subscriptionbillingsyncstate_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateCreate", + "signature": "type SubscriptionBillingSyncStateCreate struct", + "line": 20 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetNamespace(v string) *SubscriptionBillingSyncStateCreate", + "line": 28 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetSubscriptionID(v string) *SubscriptionBillingSyncStateCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetHasBillables(v bool) *SubscriptionBillingSyncStateCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateCreate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNillableNextSyncAfter", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetNillableNextSyncAfter(v *time.Time) *SubscriptionBillingSyncStateCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetID(v string) *SubscriptionBillingSyncStateCreate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetNillableID(v *string) *SubscriptionBillingSyncStateCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SetSubscription(v *Subscription) *SubscriptionBillingSyncStateCreate", + "line": 80 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) Mutation() *SubscriptionBillingSyncStateMutation", + "line": 85 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) Save(ctx context.Context) (*SubscriptionBillingSyncState, error)", + "line": 90 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) SaveX(ctx context.Context) *SubscriptionBillingSyncState", + "line": 96 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) Exec(ctx context.Context) error", + "line": 105 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) ExecX(ctx context.Context)", + "line": 111 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) defaults()", + "line": 118 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) check() error", + "line": 126 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) sqlSave(ctx context.Context) (*SubscriptionBillingSyncState, error)", + "line": 155 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) createSpec() (*SubscriptionBillingSyncState, *sqlgraph.CreateSpec)", + "line": 178 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionBillingSyncStateUpsertOne", + "line": 240 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionBillingSyncStateCreate) OnConflictColumns(columns ...string) *SubscriptionBillingSyncStateUpsertOne", + "line": 253 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) SetHasBillables(v bool) *SubscriptionBillingSyncStateUpsert", + "line": 274 + }, + { + "kind": "func", + "name": "UpdateHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) UpdateHasBillables() *SubscriptionBillingSyncStateUpsert", + "line": 280 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateUpsert", + "line": 286 + }, + { + "kind": "func", + "name": "UpdateSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) UpdateSyncedAt() *SubscriptionBillingSyncStateUpsert", + "line": 292 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateUpsert", + "line": 298 + }, + { + "kind": "func", + "name": "UpdateNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) UpdateNextSyncAfter() *SubscriptionBillingSyncStateUpsert", + "line": 304 + }, + { + "kind": "func", + "name": "ClearNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsert) ClearNextSyncAfter() *SubscriptionBillingSyncStateUpsert", + "line": 310 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) UpdateNewValues() *SubscriptionBillingSyncStateUpsertOne", + "line": 326 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) Ignore() *SubscriptionBillingSyncStateUpsertOne", + "line": 348 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) DoNothing() *SubscriptionBillingSyncStateUpsertOne", + "line": 355 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) Update(set func(*SubscriptionBillingSyncStateUpsert)) *SubscriptionBillingSyncStateUpsertOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) SetHasBillables(v bool) *SubscriptionBillingSyncStateUpsertOne", + "line": 370 + }, + { + "kind": "func", + "name": "UpdateHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) UpdateHasBillables() *SubscriptionBillingSyncStateUpsertOne", + "line": 377 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateUpsertOne", + "line": 384 + }, + { + "kind": "func", + "name": "UpdateSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) UpdateSyncedAt() *SubscriptionBillingSyncStateUpsertOne", + "line": 391 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateUpsertOne", + "line": 398 + }, + { + "kind": "func", + "name": "UpdateNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) UpdateNextSyncAfter() *SubscriptionBillingSyncStateUpsertOne", + "line": 405 + }, + { + "kind": "func", + "name": "ClearNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) ClearNextSyncAfter() *SubscriptionBillingSyncStateUpsertOne", + "line": 412 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) Exec(ctx context.Context) error", + "line": 419 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) ExecX(ctx context.Context)", + "line": 427 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 434 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionBillingSyncStateUpsertOne) IDX(ctx context.Context) string", + "line": 448 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateCreateBulk", + "signature": "type SubscriptionBillingSyncStateCreateBulk struct", + "line": 457 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) Save(ctx context.Context) ([]*SubscriptionBillingSyncState, error)", + "line": 465 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) SaveX(ctx context.Context) []*SubscriptionBillingSyncState", + "line": 521 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) Exec(ctx context.Context) error", + "line": 530 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) ExecX(ctx context.Context)", + "line": 536 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionBillingSyncStateUpsertBulk", + "line": 557 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionBillingSyncStateCreateBulk) OnConflictColumns(columns ...string) *SubscriptionBillingSyncStateUpsertBulk", + "line": 570 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateUpsertBulk", + "signature": "type SubscriptionBillingSyncStateUpsertBulk struct", + "line": 579 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) UpdateNewValues() *SubscriptionBillingSyncStateUpsertBulk", + "line": 594 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) Ignore() *SubscriptionBillingSyncStateUpsertBulk", + "line": 618 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) DoNothing() *SubscriptionBillingSyncStateUpsertBulk", + "line": 625 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) Update(set func(*SubscriptionBillingSyncStateUpsert)) *SubscriptionBillingSyncStateUpsertBulk", + "line": 632 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) SetHasBillables(v bool) *SubscriptionBillingSyncStateUpsertBulk", + "line": 640 + }, + { + "kind": "func", + "name": "UpdateHasBillables", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) UpdateHasBillables() *SubscriptionBillingSyncStateUpsertBulk", + "line": 647 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateUpsertBulk", + "line": 654 + }, + { + "kind": "func", + "name": "UpdateSyncedAt", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) UpdateSyncedAt() *SubscriptionBillingSyncStateUpsertBulk", + "line": 661 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateUpsertBulk", + "line": 668 + }, + { + "kind": "func", + "name": "UpdateNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) UpdateNextSyncAfter() *SubscriptionBillingSyncStateUpsertBulk", + "line": 675 + }, + { + "kind": "func", + "name": "ClearNextSyncAfter", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) ClearNextSyncAfter() *SubscriptionBillingSyncStateUpsertBulk", + "line": 682 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) Exec(ctx context.Context) error", + "line": 689 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionBillingSyncStateUpsertBulk) ExecX(ctx context.Context)", + "line": 705 + } + ], + "line_count": 709 + }, + "openmeter/ent/db/subscriptionbillingsyncstate_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateDelete", + "signature": "type SubscriptionBillingSyncStateDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionBillingSyncStateDelete) Where(ps ...predicate.SubscriptionBillingSyncState) *SubscriptionBillingSyncStateDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionBillingSyncStateDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionBillingSyncStateDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionBillingSyncStateDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateDeleteOne", + "signature": "type SubscriptionBillingSyncStateDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionBillingSyncStateDeleteOne) Where(ps ...predicate.SubscriptionBillingSyncState) *SubscriptionBillingSyncStateDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionBillingSyncStateDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionBillingSyncStateDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscriptionbillingsyncstate_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateQuery", + "signature": "type SubscriptionBillingSyncStateQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Where(ps ...predicate.SubscriptionBillingSyncState) *SubscriptionBillingSyncStateQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Limit(limit int) *SubscriptionBillingSyncStateQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Offset(offset int) *SubscriptionBillingSyncStateQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Unique(unique bool) *SubscriptionBillingSyncStateQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Order(o ...subscriptionbillingsyncstate.OrderOption) *SubscriptionBillingSyncStateQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) QuerySubscription() *SubscriptionQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) First(ctx context.Context) (*SubscriptionBillingSyncState, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) FirstX(ctx context.Context) *SubscriptionBillingSyncState", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Only(ctx context.Context) (*SubscriptionBillingSyncState, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) OnlyX(ctx context.Context) *SubscriptionBillingSyncState", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) All(ctx context.Context) ([]*SubscriptionBillingSyncState, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) AllX(ctx context.Context) []*SubscriptionBillingSyncState", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Clone() *SubscriptionBillingSyncStateQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *SubscriptionBillingSyncStateQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) GroupBy(field string, fields ...string) *SubscriptionBillingSyncStateGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Select(fields ...string) *SubscriptionBillingSyncStateSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) Aggregate(fns ...AggregateFunc) *SubscriptionBillingSyncStateSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*SubscriptionBillingSyncState, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*SubscriptionBillingSyncState, init func(*SubscriptionBillingSyncState), assign func(*SubscriptionBillingSyncState, *Subscription)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionBillingSyncStateQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionBillingSyncStateQuery) ForShare(opts ...sql.LockOption) *SubscriptionBillingSyncStateQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateGroupBy", + "signature": "type SubscriptionBillingSyncStateGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionBillingSyncStateGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionBillingSyncStateGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionBillingSyncStateGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionBillingSyncStateGroupBy) sqlScan(ctx context.Context, root *SubscriptionBillingSyncStateQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateSelect", + "signature": "type SubscriptionBillingSyncStateSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionBillingSyncStateSelect) Aggregate(fns ...AggregateFunc) *SubscriptionBillingSyncStateSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionBillingSyncStateSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionBillingSyncStateSelect) sqlScan(ctx context.Context, root *SubscriptionBillingSyncStateQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/subscriptionbillingsyncstate_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateUpdate", + "signature": "type SubscriptionBillingSyncStateUpdate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) Where(ps ...predicate.SubscriptionBillingSyncState) *SubscriptionBillingSyncStateUpdate", + "line": 26 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetHasBillables(v bool) *SubscriptionBillingSyncStateUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetNillableHasBillables", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetNillableHasBillables(v *bool) *SubscriptionBillingSyncStateUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateUpdate", + "line": 46 + }, + { + "kind": "func", + "name": "SetNillableSyncedAt", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetNillableSyncedAt(v *time.Time) *SubscriptionBillingSyncStateUpdate", + "line": 52 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetNillableNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SetNillableNextSyncAfter(v *time.Time) *SubscriptionBillingSyncStateUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "ClearNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) ClearNextSyncAfter() *SubscriptionBillingSyncStateUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) Mutation() *SubscriptionBillingSyncStateMutation", + "line": 80 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) Save(ctx context.Context) (int, error)", + "line": 85 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) SaveX(ctx context.Context) int", + "line": 90 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) Exec(ctx context.Context) error", + "line": 99 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) ExecX(ctx context.Context)", + "line": 105 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) check() error", + "line": 112 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionBillingSyncStateUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 119 + }, + { + "kind": "struct", + "name": "SubscriptionBillingSyncStateUpdateOne", + "signature": "type SubscriptionBillingSyncStateUpdateOne struct", + "line": 156 + }, + { + "kind": "func", + "name": "SetHasBillables", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetHasBillables(v bool) *SubscriptionBillingSyncStateUpdateOne", + "line": 164 + }, + { + "kind": "func", + "name": "SetNillableHasBillables", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetNillableHasBillables(v *bool) *SubscriptionBillingSyncStateUpdateOne", + "line": 170 + }, + { + "kind": "func", + "name": "SetSyncedAt", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetSyncedAt(v time.Time) *SubscriptionBillingSyncStateUpdateOne", + "line": 178 + }, + { + "kind": "func", + "name": "SetNillableSyncedAt", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetNillableSyncedAt(v *time.Time) *SubscriptionBillingSyncStateUpdateOne", + "line": 184 + }, + { + "kind": "func", + "name": "SetNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetNextSyncAfter(v time.Time) *SubscriptionBillingSyncStateUpdateOne", + "line": 192 + }, + { + "kind": "func", + "name": "SetNillableNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SetNillableNextSyncAfter(v *time.Time) *SubscriptionBillingSyncStateUpdateOne", + "line": 198 + }, + { + "kind": "func", + "name": "ClearNextSyncAfter", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) ClearNextSyncAfter() *SubscriptionBillingSyncStateUpdateOne", + "line": 206 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) Mutation() *SubscriptionBillingSyncStateMutation", + "line": 212 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) Where(ps ...predicate.SubscriptionBillingSyncState) *SubscriptionBillingSyncStateUpdateOne", + "line": 217 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) Select(field string, fields ...string) *SubscriptionBillingSyncStateUpdateOne", + "line": 224 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) Save(ctx context.Context) (*SubscriptionBillingSyncState, error)", + "line": 230 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) SaveX(ctx context.Context) *SubscriptionBillingSyncState", + "line": 235 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) Exec(ctx context.Context) error", + "line": 244 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) ExecX(ctx context.Context)", + "line": 250 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) check() error", + "line": 257 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionBillingSyncStateUpdateOne) sqlSave(ctx context.Context) (_node *SubscriptionBillingSyncState, err error)", + "line": 264 + } + ], + "line_count": 318 + }, + "openmeter/ent/db/subscriptionitem.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItem", + "signature": "type SubscriptionItem struct", + "line": 23 + }, + { + "kind": "struct", + "name": "SubscriptionItemEdges", + "signature": "type SubscriptionItemEdges struct", + "line": 82 + }, + { + "kind": "func", + "name": "PhaseOrErr", + "signature": "func (e SubscriptionItemEdges) PhaseOrErr() (*SubscriptionPhase, error)", + "line": 106 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func (e SubscriptionItemEdges) EntitlementOrErr() (*Entitlement, error)", + "line": 117 + }, + { + "kind": "func", + "name": "BillingLinesOrErr", + "signature": "func (e SubscriptionItemEdges) BillingLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 128 + }, + { + "kind": "func", + "name": "BillingSplitLineGroupsOrErr", + "signature": "func (e SubscriptionItemEdges) BillingSplitLineGroupsOrErr() ([]*BillingInvoiceSplitLineGroup, error)", + "line": 137 + }, + { + "kind": "func", + "name": "ChargesUsageBasedOrErr", + "signature": "func (e SubscriptionItemEdges) ChargesUsageBasedOrErr() ([]*ChargeUsageBased, error)", + "line": 146 + }, + { + "kind": "func", + "name": "ChargesCreditPurchaseOrErr", + "signature": "func (e SubscriptionItemEdges) ChargesCreditPurchaseOrErr() ([]*ChargeCreditPurchase, error)", + "line": 155 + }, + { + "kind": "func", + "name": "ChargesFlatFeeOrErr", + "signature": "func (e SubscriptionItemEdges) ChargesFlatFeeOrErr() ([]*ChargeFlatFee, error)", + "line": 164 + }, + { + "kind": "func", + "name": "TaxCodeOrErr", + "signature": "func (e SubscriptionItemEdges) TaxCodeOrErr() (*TaxCode, error)", + "line": 173 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *SubscriptionItem) assignValues(columns []string, values []any) error", + "line": 214 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *SubscriptionItem) Value(name string) (ent.Value, error)", + "line": 392 + }, + { + "kind": "func", + "name": "QueryPhase", + "signature": "func (_m *SubscriptionItem) QueryPhase() *SubscriptionPhaseQuery", + "line": 397 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_m *SubscriptionItem) QueryEntitlement() *EntitlementQuery", + "line": 402 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_m *SubscriptionItem) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 407 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_m *SubscriptionItem) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 412 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_m *SubscriptionItem) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 417 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_m *SubscriptionItem) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 422 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_m *SubscriptionItem) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 427 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_m *SubscriptionItem) QueryTaxCode() *TaxCodeQuery", + "line": 432 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *SubscriptionItem) Update() *SubscriptionItemUpdateOne", + "line": 439 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *SubscriptionItem) Unwrap() *SubscriptionItem", + "line": 445 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *SubscriptionItem) String() string", + "line": 455 + } + ], + "line_count": 565 + }, + "openmeter/ent/db/subscriptionitem/subscriptionitem.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 175 + }, + { + "kind": "func", + "name": "TaxBehaviorValidator", + "signature": "func TaxBehaviorValidator(tb productcatalog.TaxBehavior) error", + "line": 212 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 225 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 230 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 235 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 240 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 245 + }, + { + "kind": "func", + "name": "ByTaxCodeID", + "signature": "func ByTaxCodeID(opts ...sql.OrderTermOption) OrderOption", + "line": 250 + }, + { + "kind": "func", + "name": "ByTaxBehavior", + "signature": "func ByTaxBehavior(opts ...sql.OrderTermOption) OrderOption", + "line": 255 + }, + { + "kind": "func", + "name": "ByAnnotations", + "signature": "func ByAnnotations(opts ...sql.OrderTermOption) OrderOption", + "line": 260 + }, + { + "kind": "func", + "name": "ByActiveFrom", + "signature": "func ByActiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 265 + }, + { + "kind": "func", + "name": "ByActiveTo", + "signature": "func ByActiveTo(opts ...sql.OrderTermOption) OrderOption", + "line": 270 + }, + { + "kind": "func", + "name": "ByPhaseID", + "signature": "func ByPhaseID(opts ...sql.OrderTermOption) OrderOption", + "line": 275 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 280 + }, + { + "kind": "func", + "name": "ByEntitlementID", + "signature": "func ByEntitlementID(opts ...sql.OrderTermOption) OrderOption", + "line": 285 + }, + { + "kind": "func", + "name": "ByRestartsBillingPeriod", + "signature": "func ByRestartsBillingPeriod(opts ...sql.OrderTermOption) OrderOption", + "line": 290 + }, + { + "kind": "func", + "name": "ByActiveFromOverrideRelativeToPhaseStart", + "signature": "func ByActiveFromOverrideRelativeToPhaseStart(opts ...sql.OrderTermOption) OrderOption", + "line": 295 + }, + { + "kind": "func", + "name": "ByActiveToOverrideRelativeToPhaseStart", + "signature": "func ByActiveToOverrideRelativeToPhaseStart(opts ...sql.OrderTermOption) OrderOption", + "line": 300 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 305 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 310 + }, + { + "kind": "func", + "name": "ByFeatureKey", + "signature": "func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption", + "line": 315 + }, + { + "kind": "func", + "name": "ByEntitlementTemplate", + "signature": "func ByEntitlementTemplate(opts ...sql.OrderTermOption) OrderOption", + "line": 320 + }, + { + "kind": "func", + "name": "ByTaxConfig", + "signature": "func ByTaxConfig(opts ...sql.OrderTermOption) OrderOption", + "line": 325 + }, + { + "kind": "func", + "name": "ByBillingCadence", + "signature": "func ByBillingCadence(opts ...sql.OrderTermOption) OrderOption", + "line": 330 + }, + { + "kind": "func", + "name": "ByPrice", + "signature": "func ByPrice(opts ...sql.OrderTermOption) OrderOption", + "line": 335 + }, + { + "kind": "func", + "name": "ByDiscounts", + "signature": "func ByDiscounts(opts ...sql.OrderTermOption) OrderOption", + "line": 340 + }, + { + "kind": "func", + "name": "ByPhaseField", + "signature": "func ByPhaseField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 345 + }, + { + "kind": "func", + "name": "ByEntitlementField", + "signature": "func ByEntitlementField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 352 + }, + { + "kind": "func", + "name": "ByBillingLinesCount", + "signature": "func ByBillingLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 359 + }, + { + "kind": "func", + "name": "ByBillingLines", + "signature": "func ByBillingLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 366 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroupsCount", + "signature": "func ByBillingSplitLineGroupsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 373 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroups", + "signature": "func ByBillingSplitLineGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 380 + }, + { + "kind": "func", + "name": "ByChargesUsageBasedCount", + "signature": "func ByChargesUsageBasedCount(opts ...sql.OrderTermOption) OrderOption", + "line": 387 + }, + { + "kind": "func", + "name": "ByChargesUsageBased", + "signature": "func ByChargesUsageBased(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 394 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchaseCount", + "signature": "func ByChargesCreditPurchaseCount(opts ...sql.OrderTermOption) OrderOption", + "line": 401 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchase", + "signature": "func ByChargesCreditPurchase(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 408 + }, + { + "kind": "func", + "name": "ByChargesFlatFeeCount", + "signature": "func ByChargesFlatFeeCount(opts ...sql.OrderTermOption) OrderOption", + "line": 415 + }, + { + "kind": "func", + "name": "ByChargesFlatFee", + "signature": "func ByChargesFlatFee(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 422 + }, + { + "kind": "func", + "name": "ByTaxCodeField", + "signature": "func ByTaxCodeField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 429 + }, + { + "kind": "func", + "name": "newPhaseStep", + "signature": "func newPhaseStep() *sqlgraph.Step", + "line": 434 + }, + { + "kind": "func", + "name": "newEntitlementStep", + "signature": "func newEntitlementStep() *sqlgraph.Step", + "line": 441 + }, + { + "kind": "func", + "name": "newBillingLinesStep", + "signature": "func newBillingLinesStep() *sqlgraph.Step", + "line": 448 + }, + { + "kind": "func", + "name": "newBillingSplitLineGroupsStep", + "signature": "func newBillingSplitLineGroupsStep() *sqlgraph.Step", + "line": 455 + }, + { + "kind": "func", + "name": "newChargesUsageBasedStep", + "signature": "func newChargesUsageBasedStep() *sqlgraph.Step", + "line": 462 + }, + { + "kind": "func", + "name": "newChargesCreditPurchaseStep", + "signature": "func newChargesCreditPurchaseStep() *sqlgraph.Step", + "line": 469 + }, + { + "kind": "func", + "name": "newChargesFlatFeeStep", + "signature": "func newChargesFlatFeeStep() *sqlgraph.Step", + "line": 476 + }, + { + "kind": "func", + "name": "newTaxCodeStep", + "signature": "func newTaxCodeStep() *sqlgraph.Step", + "line": 483 + } + ], + "line_count": 489 + }, + "openmeter/ent/db/subscriptionitem/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.SubscriptionItem", + "line": 16 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.SubscriptionItem", + "line": 21 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.SubscriptionItem", + "line": 26 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.SubscriptionItem", + "line": 31 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.SubscriptionItem", + "line": 36 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.SubscriptionItem", + "line": 41 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.SubscriptionItem", + "line": 46 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.SubscriptionItem", + "line": 51 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.SubscriptionItem", + "line": 56 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.SubscriptionItem", + "line": 61 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.SubscriptionItem", + "line": 66 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.SubscriptionItem", + "line": 71 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.SubscriptionItem", + "line": 76 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.SubscriptionItem", + "line": 81 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.SubscriptionItem", + "line": 86 + }, + { + "kind": "func", + "name": "TaxCodeID", + "signature": "func TaxCodeID(v string) predicate.SubscriptionItem", + "line": 91 + }, + { + "kind": "func", + "name": "ActiveFrom", + "signature": "func ActiveFrom(v time.Time) predicate.SubscriptionItem", + "line": 96 + }, + { + "kind": "func", + "name": "ActiveTo", + "signature": "func ActiveTo(v time.Time) predicate.SubscriptionItem", + "line": 101 + }, + { + "kind": "func", + "name": "PhaseID", + "signature": "func PhaseID(v string) predicate.SubscriptionItem", + "line": 106 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.SubscriptionItem", + "line": 111 + }, + { + "kind": "func", + "name": "EntitlementID", + "signature": "func EntitlementID(v string) predicate.SubscriptionItem", + "line": 116 + }, + { + "kind": "func", + "name": "RestartsBillingPeriod", + "signature": "func RestartsBillingPeriod(v bool) predicate.SubscriptionItem", + "line": 121 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStart", + "signature": "func ActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 126 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStart", + "signature": "func ActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 132 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.SubscriptionItem", + "line": 138 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.SubscriptionItem", + "line": 143 + }, + { + "kind": "func", + "name": "FeatureKey", + "signature": "func FeatureKey(v string) predicate.SubscriptionItem", + "line": 148 + }, + { + "kind": "func", + "name": "BillingCadence", + "signature": "func BillingCadence(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 153 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.SubscriptionItem", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.SubscriptionItem", + "line": 164 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.SubscriptionItem", + "line": 169 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.SubscriptionItem", + "line": 174 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.SubscriptionItem", + "line": 179 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.SubscriptionItem", + "line": 184 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.SubscriptionItem", + "line": 189 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.SubscriptionItem", + "line": 194 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.SubscriptionItem", + "line": 199 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.SubscriptionItem", + "line": 204 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.SubscriptionItem", + "line": 209 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.SubscriptionItem", + "line": 214 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.SubscriptionItem", + "line": 219 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.SubscriptionItem", + "line": 224 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.SubscriptionItem", + "line": 229 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 234 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 239 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.SubscriptionItem", + "line": 244 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.SubscriptionItem", + "line": 249 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.SubscriptionItem", + "line": 254 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.SubscriptionItem", + "line": 259 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.SubscriptionItem", + "line": 264 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.SubscriptionItem", + "line": 269 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 274 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 279 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.SubscriptionItem", + "line": 284 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.SubscriptionItem", + "line": 289 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.SubscriptionItem", + "line": 294 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.SubscriptionItem", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.SubscriptionItem", + "line": 304 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.SubscriptionItem", + "line": 309 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 314 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 319 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.SubscriptionItem", + "line": 324 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.SubscriptionItem", + "line": 329 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.SubscriptionItem", + "line": 334 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.SubscriptionItem", + "line": 339 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.SubscriptionItem", + "line": 344 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.SubscriptionItem", + "line": 349 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.SubscriptionItem", + "line": 354 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.SubscriptionItem", + "line": 359 + }, + { + "kind": "func", + "name": "TaxCodeIDEQ", + "signature": "func TaxCodeIDEQ(v string) predicate.SubscriptionItem", + "line": 364 + }, + { + "kind": "func", + "name": "TaxCodeIDNEQ", + "signature": "func TaxCodeIDNEQ(v string) predicate.SubscriptionItem", + "line": 369 + }, + { + "kind": "func", + "name": "TaxCodeIDIn", + "signature": "func TaxCodeIDIn(vs ...string) predicate.SubscriptionItem", + "line": 374 + }, + { + "kind": "func", + "name": "TaxCodeIDNotIn", + "signature": "func TaxCodeIDNotIn(vs ...string) predicate.SubscriptionItem", + "line": 379 + }, + { + "kind": "func", + "name": "TaxCodeIDGT", + "signature": "func TaxCodeIDGT(v string) predicate.SubscriptionItem", + "line": 384 + }, + { + "kind": "func", + "name": "TaxCodeIDGTE", + "signature": "func TaxCodeIDGTE(v string) predicate.SubscriptionItem", + "line": 389 + }, + { + "kind": "func", + "name": "TaxCodeIDLT", + "signature": "func TaxCodeIDLT(v string) predicate.SubscriptionItem", + "line": 394 + }, + { + "kind": "func", + "name": "TaxCodeIDLTE", + "signature": "func TaxCodeIDLTE(v string) predicate.SubscriptionItem", + "line": 399 + }, + { + "kind": "func", + "name": "TaxCodeIDContains", + "signature": "func TaxCodeIDContains(v string) predicate.SubscriptionItem", + "line": 404 + }, + { + "kind": "func", + "name": "TaxCodeIDHasPrefix", + "signature": "func TaxCodeIDHasPrefix(v string) predicate.SubscriptionItem", + "line": 409 + }, + { + "kind": "func", + "name": "TaxCodeIDHasSuffix", + "signature": "func TaxCodeIDHasSuffix(v string) predicate.SubscriptionItem", + "line": 414 + }, + { + "kind": "func", + "name": "TaxCodeIDIsNil", + "signature": "func TaxCodeIDIsNil() predicate.SubscriptionItem", + "line": 419 + }, + { + "kind": "func", + "name": "TaxCodeIDNotNil", + "signature": "func TaxCodeIDNotNil() predicate.SubscriptionItem", + "line": 424 + }, + { + "kind": "func", + "name": "TaxCodeIDEqualFold", + "signature": "func TaxCodeIDEqualFold(v string) predicate.SubscriptionItem", + "line": 429 + }, + { + "kind": "func", + "name": "TaxCodeIDContainsFold", + "signature": "func TaxCodeIDContainsFold(v string) predicate.SubscriptionItem", + "line": 434 + }, + { + "kind": "func", + "name": "TaxBehaviorEQ", + "signature": "func TaxBehaviorEQ(v productcatalog.TaxBehavior) predicate.SubscriptionItem", + "line": 439 + }, + { + "kind": "func", + "name": "TaxBehaviorNEQ", + "signature": "func TaxBehaviorNEQ(v productcatalog.TaxBehavior) predicate.SubscriptionItem", + "line": 445 + }, + { + "kind": "func", + "name": "TaxBehaviorIn", + "signature": "func TaxBehaviorIn(vs ...productcatalog.TaxBehavior) predicate.SubscriptionItem", + "line": 451 + }, + { + "kind": "func", + "name": "TaxBehaviorNotIn", + "signature": "func TaxBehaviorNotIn(vs ...productcatalog.TaxBehavior) predicate.SubscriptionItem", + "line": 460 + }, + { + "kind": "func", + "name": "TaxBehaviorIsNil", + "signature": "func TaxBehaviorIsNil() predicate.SubscriptionItem", + "line": 469 + }, + { + "kind": "func", + "name": "TaxBehaviorNotNil", + "signature": "func TaxBehaviorNotNil() predicate.SubscriptionItem", + "line": 474 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.SubscriptionItem", + "line": 479 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.SubscriptionItem", + "line": 484 + }, + { + "kind": "func", + "name": "ActiveFromEQ", + "signature": "func ActiveFromEQ(v time.Time) predicate.SubscriptionItem", + "line": 489 + }, + { + "kind": "func", + "name": "ActiveFromNEQ", + "signature": "func ActiveFromNEQ(v time.Time) predicate.SubscriptionItem", + "line": 494 + }, + { + "kind": "func", + "name": "ActiveFromIn", + "signature": "func ActiveFromIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 499 + }, + { + "kind": "func", + "name": "ActiveFromNotIn", + "signature": "func ActiveFromNotIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 504 + }, + { + "kind": "func", + "name": "ActiveFromGT", + "signature": "func ActiveFromGT(v time.Time) predicate.SubscriptionItem", + "line": 509 + }, + { + "kind": "func", + "name": "ActiveFromGTE", + "signature": "func ActiveFromGTE(v time.Time) predicate.SubscriptionItem", + "line": 514 + }, + { + "kind": "func", + "name": "ActiveFromLT", + "signature": "func ActiveFromLT(v time.Time) predicate.SubscriptionItem", + "line": 519 + }, + { + "kind": "func", + "name": "ActiveFromLTE", + "signature": "func ActiveFromLTE(v time.Time) predicate.SubscriptionItem", + "line": 524 + }, + { + "kind": "func", + "name": "ActiveToEQ", + "signature": "func ActiveToEQ(v time.Time) predicate.SubscriptionItem", + "line": 529 + }, + { + "kind": "func", + "name": "ActiveToNEQ", + "signature": "func ActiveToNEQ(v time.Time) predicate.SubscriptionItem", + "line": 534 + }, + { + "kind": "func", + "name": "ActiveToIn", + "signature": "func ActiveToIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 539 + }, + { + "kind": "func", + "name": "ActiveToNotIn", + "signature": "func ActiveToNotIn(vs ...time.Time) predicate.SubscriptionItem", + "line": 544 + }, + { + "kind": "func", + "name": "ActiveToGT", + "signature": "func ActiveToGT(v time.Time) predicate.SubscriptionItem", + "line": 549 + }, + { + "kind": "func", + "name": "ActiveToGTE", + "signature": "func ActiveToGTE(v time.Time) predicate.SubscriptionItem", + "line": 554 + }, + { + "kind": "func", + "name": "ActiveToLT", + "signature": "func ActiveToLT(v time.Time) predicate.SubscriptionItem", + "line": 559 + }, + { + "kind": "func", + "name": "ActiveToLTE", + "signature": "func ActiveToLTE(v time.Time) predicate.SubscriptionItem", + "line": 564 + }, + { + "kind": "func", + "name": "ActiveToIsNil", + "signature": "func ActiveToIsNil() predicate.SubscriptionItem", + "line": 569 + }, + { + "kind": "func", + "name": "ActiveToNotNil", + "signature": "func ActiveToNotNil() predicate.SubscriptionItem", + "line": 574 + }, + { + "kind": "func", + "name": "PhaseIDEQ", + "signature": "func PhaseIDEQ(v string) predicate.SubscriptionItem", + "line": 579 + }, + { + "kind": "func", + "name": "PhaseIDNEQ", + "signature": "func PhaseIDNEQ(v string) predicate.SubscriptionItem", + "line": 584 + }, + { + "kind": "func", + "name": "PhaseIDIn", + "signature": "func PhaseIDIn(vs ...string) predicate.SubscriptionItem", + "line": 589 + }, + { + "kind": "func", + "name": "PhaseIDNotIn", + "signature": "func PhaseIDNotIn(vs ...string) predicate.SubscriptionItem", + "line": 594 + }, + { + "kind": "func", + "name": "PhaseIDGT", + "signature": "func PhaseIDGT(v string) predicate.SubscriptionItem", + "line": 599 + }, + { + "kind": "func", + "name": "PhaseIDGTE", + "signature": "func PhaseIDGTE(v string) predicate.SubscriptionItem", + "line": 604 + }, + { + "kind": "func", + "name": "PhaseIDLT", + "signature": "func PhaseIDLT(v string) predicate.SubscriptionItem", + "line": 609 + }, + { + "kind": "func", + "name": "PhaseIDLTE", + "signature": "func PhaseIDLTE(v string) predicate.SubscriptionItem", + "line": 614 + }, + { + "kind": "func", + "name": "PhaseIDContains", + "signature": "func PhaseIDContains(v string) predicate.SubscriptionItem", + "line": 619 + }, + { + "kind": "func", + "name": "PhaseIDHasPrefix", + "signature": "func PhaseIDHasPrefix(v string) predicate.SubscriptionItem", + "line": 624 + }, + { + "kind": "func", + "name": "PhaseIDHasSuffix", + "signature": "func PhaseIDHasSuffix(v string) predicate.SubscriptionItem", + "line": 629 + }, + { + "kind": "func", + "name": "PhaseIDEqualFold", + "signature": "func PhaseIDEqualFold(v string) predicate.SubscriptionItem", + "line": 634 + }, + { + "kind": "func", + "name": "PhaseIDContainsFold", + "signature": "func PhaseIDContainsFold(v string) predicate.SubscriptionItem", + "line": 639 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.SubscriptionItem", + "line": 644 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.SubscriptionItem", + "line": 649 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.SubscriptionItem", + "line": 654 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.SubscriptionItem", + "line": 659 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.SubscriptionItem", + "line": 664 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.SubscriptionItem", + "line": 669 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.SubscriptionItem", + "line": 674 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.SubscriptionItem", + "line": 679 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.SubscriptionItem", + "line": 684 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.SubscriptionItem", + "line": 689 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.SubscriptionItem", + "line": 694 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.SubscriptionItem", + "line": 699 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.SubscriptionItem", + "line": 704 + }, + { + "kind": "func", + "name": "EntitlementIDEQ", + "signature": "func EntitlementIDEQ(v string) predicate.SubscriptionItem", + "line": 709 + }, + { + "kind": "func", + "name": "EntitlementIDNEQ", + "signature": "func EntitlementIDNEQ(v string) predicate.SubscriptionItem", + "line": 714 + }, + { + "kind": "func", + "name": "EntitlementIDIn", + "signature": "func EntitlementIDIn(vs ...string) predicate.SubscriptionItem", + "line": 719 + }, + { + "kind": "func", + "name": "EntitlementIDNotIn", + "signature": "func EntitlementIDNotIn(vs ...string) predicate.SubscriptionItem", + "line": 724 + }, + { + "kind": "func", + "name": "EntitlementIDGT", + "signature": "func EntitlementIDGT(v string) predicate.SubscriptionItem", + "line": 729 + }, + { + "kind": "func", + "name": "EntitlementIDGTE", + "signature": "func EntitlementIDGTE(v string) predicate.SubscriptionItem", + "line": 734 + }, + { + "kind": "func", + "name": "EntitlementIDLT", + "signature": "func EntitlementIDLT(v string) predicate.SubscriptionItem", + "line": 739 + }, + { + "kind": "func", + "name": "EntitlementIDLTE", + "signature": "func EntitlementIDLTE(v string) predicate.SubscriptionItem", + "line": 744 + }, + { + "kind": "func", + "name": "EntitlementIDContains", + "signature": "func EntitlementIDContains(v string) predicate.SubscriptionItem", + "line": 749 + }, + { + "kind": "func", + "name": "EntitlementIDHasPrefix", + "signature": "func EntitlementIDHasPrefix(v string) predicate.SubscriptionItem", + "line": 754 + }, + { + "kind": "func", + "name": "EntitlementIDHasSuffix", + "signature": "func EntitlementIDHasSuffix(v string) predicate.SubscriptionItem", + "line": 759 + }, + { + "kind": "func", + "name": "EntitlementIDIsNil", + "signature": "func EntitlementIDIsNil() predicate.SubscriptionItem", + "line": 764 + }, + { + "kind": "func", + "name": "EntitlementIDNotNil", + "signature": "func EntitlementIDNotNil() predicate.SubscriptionItem", + "line": 769 + }, + { + "kind": "func", + "name": "EntitlementIDEqualFold", + "signature": "func EntitlementIDEqualFold(v string) predicate.SubscriptionItem", + "line": 774 + }, + { + "kind": "func", + "name": "EntitlementIDContainsFold", + "signature": "func EntitlementIDContainsFold(v string) predicate.SubscriptionItem", + "line": 779 + }, + { + "kind": "func", + "name": "RestartsBillingPeriodEQ", + "signature": "func RestartsBillingPeriodEQ(v bool) predicate.SubscriptionItem", + "line": 784 + }, + { + "kind": "func", + "name": "RestartsBillingPeriodNEQ", + "signature": "func RestartsBillingPeriodNEQ(v bool) predicate.SubscriptionItem", + "line": 789 + }, + { + "kind": "func", + "name": "RestartsBillingPeriodIsNil", + "signature": "func RestartsBillingPeriodIsNil() predicate.SubscriptionItem", + "line": 794 + }, + { + "kind": "func", + "name": "RestartsBillingPeriodNotNil", + "signature": "func RestartsBillingPeriodNotNil() predicate.SubscriptionItem", + "line": 799 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartEQ", + "signature": "func ActiveFromOverrideRelativeToPhaseStartEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 804 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartNEQ", + "signature": "func ActiveFromOverrideRelativeToPhaseStartNEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 810 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartIn", + "signature": "func ActiveFromOverrideRelativeToPhaseStartIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 816 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartNotIn", + "signature": "func ActiveFromOverrideRelativeToPhaseStartNotIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 825 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartGT", + "signature": "func ActiveFromOverrideRelativeToPhaseStartGT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 834 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartGTE", + "signature": "func ActiveFromOverrideRelativeToPhaseStartGTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 840 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartLT", + "signature": "func ActiveFromOverrideRelativeToPhaseStartLT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 846 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartLTE", + "signature": "func ActiveFromOverrideRelativeToPhaseStartLTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 852 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartContains", + "signature": "func ActiveFromOverrideRelativeToPhaseStartContains(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 858 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartHasPrefix", + "signature": "func ActiveFromOverrideRelativeToPhaseStartHasPrefix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 864 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartHasSuffix", + "signature": "func ActiveFromOverrideRelativeToPhaseStartHasSuffix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 870 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartIsNil", + "signature": "func ActiveFromOverrideRelativeToPhaseStartIsNil() predicate.SubscriptionItem", + "line": 876 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartNotNil", + "signature": "func ActiveFromOverrideRelativeToPhaseStartNotNil() predicate.SubscriptionItem", + "line": 881 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartEqualFold", + "signature": "func ActiveFromOverrideRelativeToPhaseStartEqualFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 886 + }, + { + "kind": "func", + "name": "ActiveFromOverrideRelativeToPhaseStartContainsFold", + "signature": "func ActiveFromOverrideRelativeToPhaseStartContainsFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 892 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartEQ", + "signature": "func ActiveToOverrideRelativeToPhaseStartEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 898 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartNEQ", + "signature": "func ActiveToOverrideRelativeToPhaseStartNEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 904 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartIn", + "signature": "func ActiveToOverrideRelativeToPhaseStartIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 910 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartNotIn", + "signature": "func ActiveToOverrideRelativeToPhaseStartNotIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 919 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartGT", + "signature": "func ActiveToOverrideRelativeToPhaseStartGT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 928 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartGTE", + "signature": "func ActiveToOverrideRelativeToPhaseStartGTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 934 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartLT", + "signature": "func ActiveToOverrideRelativeToPhaseStartLT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 940 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartLTE", + "signature": "func ActiveToOverrideRelativeToPhaseStartLTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 946 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartContains", + "signature": "func ActiveToOverrideRelativeToPhaseStartContains(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 952 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartHasPrefix", + "signature": "func ActiveToOverrideRelativeToPhaseStartHasPrefix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 958 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartHasSuffix", + "signature": "func ActiveToOverrideRelativeToPhaseStartHasSuffix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 964 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartIsNil", + "signature": "func ActiveToOverrideRelativeToPhaseStartIsNil() predicate.SubscriptionItem", + "line": 970 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartNotNil", + "signature": "func ActiveToOverrideRelativeToPhaseStartNotNil() predicate.SubscriptionItem", + "line": 975 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartEqualFold", + "signature": "func ActiveToOverrideRelativeToPhaseStartEqualFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 980 + }, + { + "kind": "func", + "name": "ActiveToOverrideRelativeToPhaseStartContainsFold", + "signature": "func ActiveToOverrideRelativeToPhaseStartContainsFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 986 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.SubscriptionItem", + "line": 992 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.SubscriptionItem", + "line": 997 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.SubscriptionItem", + "line": 1002 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.SubscriptionItem", + "line": 1007 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.SubscriptionItem", + "line": 1012 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.SubscriptionItem", + "line": 1017 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.SubscriptionItem", + "line": 1022 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.SubscriptionItem", + "line": 1027 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.SubscriptionItem", + "line": 1032 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.SubscriptionItem", + "line": 1037 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.SubscriptionItem", + "line": 1042 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.SubscriptionItem", + "line": 1047 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.SubscriptionItem", + "line": 1052 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.SubscriptionItem", + "line": 1057 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.SubscriptionItem", + "line": 1062 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.SubscriptionItem", + "line": 1067 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.SubscriptionItem", + "line": 1072 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.SubscriptionItem", + "line": 1077 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.SubscriptionItem", + "line": 1082 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.SubscriptionItem", + "line": 1087 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.SubscriptionItem", + "line": 1092 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.SubscriptionItem", + "line": 1097 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.SubscriptionItem", + "line": 1102 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.SubscriptionItem", + "line": 1107 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.SubscriptionItem", + "line": 1112 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.SubscriptionItem", + "line": 1117 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.SubscriptionItem", + "line": 1122 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.SubscriptionItem", + "line": 1127 + }, + { + "kind": "func", + "name": "FeatureKeyEQ", + "signature": "func FeatureKeyEQ(v string) predicate.SubscriptionItem", + "line": 1132 + }, + { + "kind": "func", + "name": "FeatureKeyNEQ", + "signature": "func FeatureKeyNEQ(v string) predicate.SubscriptionItem", + "line": 1137 + }, + { + "kind": "func", + "name": "FeatureKeyIn", + "signature": "func FeatureKeyIn(vs ...string) predicate.SubscriptionItem", + "line": 1142 + }, + { + "kind": "func", + "name": "FeatureKeyNotIn", + "signature": "func FeatureKeyNotIn(vs ...string) predicate.SubscriptionItem", + "line": 1147 + }, + { + "kind": "func", + "name": "FeatureKeyGT", + "signature": "func FeatureKeyGT(v string) predicate.SubscriptionItem", + "line": 1152 + }, + { + "kind": "func", + "name": "FeatureKeyGTE", + "signature": "func FeatureKeyGTE(v string) predicate.SubscriptionItem", + "line": 1157 + }, + { + "kind": "func", + "name": "FeatureKeyLT", + "signature": "func FeatureKeyLT(v string) predicate.SubscriptionItem", + "line": 1162 + }, + { + "kind": "func", + "name": "FeatureKeyLTE", + "signature": "func FeatureKeyLTE(v string) predicate.SubscriptionItem", + "line": 1167 + }, + { + "kind": "func", + "name": "FeatureKeyContains", + "signature": "func FeatureKeyContains(v string) predicate.SubscriptionItem", + "line": 1172 + }, + { + "kind": "func", + "name": "FeatureKeyHasPrefix", + "signature": "func FeatureKeyHasPrefix(v string) predicate.SubscriptionItem", + "line": 1177 + }, + { + "kind": "func", + "name": "FeatureKeyHasSuffix", + "signature": "func FeatureKeyHasSuffix(v string) predicate.SubscriptionItem", + "line": 1182 + }, + { + "kind": "func", + "name": "FeatureKeyIsNil", + "signature": "func FeatureKeyIsNil() predicate.SubscriptionItem", + "line": 1187 + }, + { + "kind": "func", + "name": "FeatureKeyNotNil", + "signature": "func FeatureKeyNotNil() predicate.SubscriptionItem", + "line": 1192 + }, + { + "kind": "func", + "name": "FeatureKeyEqualFold", + "signature": "func FeatureKeyEqualFold(v string) predicate.SubscriptionItem", + "line": 1197 + }, + { + "kind": "func", + "name": "FeatureKeyContainsFold", + "signature": "func FeatureKeyContainsFold(v string) predicate.SubscriptionItem", + "line": 1202 + }, + { + "kind": "func", + "name": "EntitlementTemplateIsNil", + "signature": "func EntitlementTemplateIsNil() predicate.SubscriptionItem", + "line": 1207 + }, + { + "kind": "func", + "name": "EntitlementTemplateNotNil", + "signature": "func EntitlementTemplateNotNil() predicate.SubscriptionItem", + "line": 1212 + }, + { + "kind": "func", + "name": "TaxConfigIsNil", + "signature": "func TaxConfigIsNil() predicate.SubscriptionItem", + "line": 1217 + }, + { + "kind": "func", + "name": "TaxConfigNotNil", + "signature": "func TaxConfigNotNil() predicate.SubscriptionItem", + "line": 1222 + }, + { + "kind": "func", + "name": "BillingCadenceEQ", + "signature": "func BillingCadenceEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1227 + }, + { + "kind": "func", + "name": "BillingCadenceNEQ", + "signature": "func BillingCadenceNEQ(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1233 + }, + { + "kind": "func", + "name": "BillingCadenceIn", + "signature": "func BillingCadenceIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1239 + }, + { + "kind": "func", + "name": "BillingCadenceNotIn", + "signature": "func BillingCadenceNotIn(vs ...datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1248 + }, + { + "kind": "func", + "name": "BillingCadenceGT", + "signature": "func BillingCadenceGT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1257 + }, + { + "kind": "func", + "name": "BillingCadenceGTE", + "signature": "func BillingCadenceGTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1263 + }, + { + "kind": "func", + "name": "BillingCadenceLT", + "signature": "func BillingCadenceLT(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1269 + }, + { + "kind": "func", + "name": "BillingCadenceLTE", + "signature": "func BillingCadenceLTE(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1275 + }, + { + "kind": "func", + "name": "BillingCadenceContains", + "signature": "func BillingCadenceContains(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1281 + }, + { + "kind": "func", + "name": "BillingCadenceHasPrefix", + "signature": "func BillingCadenceHasPrefix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1287 + }, + { + "kind": "func", + "name": "BillingCadenceHasSuffix", + "signature": "func BillingCadenceHasSuffix(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1293 + }, + { + "kind": "func", + "name": "BillingCadenceIsNil", + "signature": "func BillingCadenceIsNil() predicate.SubscriptionItem", + "line": 1299 + }, + { + "kind": "func", + "name": "BillingCadenceNotNil", + "signature": "func BillingCadenceNotNil() predicate.SubscriptionItem", + "line": 1304 + }, + { + "kind": "func", + "name": "BillingCadenceEqualFold", + "signature": "func BillingCadenceEqualFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1309 + }, + { + "kind": "func", + "name": "BillingCadenceContainsFold", + "signature": "func BillingCadenceContainsFold(v datetime.ISODurationString) predicate.SubscriptionItem", + "line": 1315 + }, + { + "kind": "func", + "name": "PriceIsNil", + "signature": "func PriceIsNil() predicate.SubscriptionItem", + "line": 1321 + }, + { + "kind": "func", + "name": "PriceNotNil", + "signature": "func PriceNotNil() predicate.SubscriptionItem", + "line": 1326 + }, + { + "kind": "func", + "name": "DiscountsIsNil", + "signature": "func DiscountsIsNil() predicate.SubscriptionItem", + "line": 1331 + }, + { + "kind": "func", + "name": "DiscountsNotNil", + "signature": "func DiscountsNotNil() predicate.SubscriptionItem", + "line": 1336 + }, + { + "kind": "func", + "name": "HasPhase", + "signature": "func HasPhase() predicate.SubscriptionItem", + "line": 1341 + }, + { + "kind": "func", + "name": "HasPhaseWith", + "signature": "func HasPhaseWith(preds ...predicate.SubscriptionPhase) predicate.SubscriptionItem", + "line": 1352 + }, + { + "kind": "func", + "name": "HasEntitlement", + "signature": "func HasEntitlement() predicate.SubscriptionItem", + "line": 1364 + }, + { + "kind": "func", + "name": "HasEntitlementWith", + "signature": "func HasEntitlementWith(preds ...predicate.Entitlement) predicate.SubscriptionItem", + "line": 1375 + }, + { + "kind": "func", + "name": "HasBillingLines", + "signature": "func HasBillingLines() predicate.SubscriptionItem", + "line": 1387 + }, + { + "kind": "func", + "name": "HasBillingLinesWith", + "signature": "func HasBillingLinesWith(preds ...predicate.BillingInvoiceLine) predicate.SubscriptionItem", + "line": 1398 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroups", + "signature": "func HasBillingSplitLineGroups() predicate.SubscriptionItem", + "line": 1410 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroupsWith", + "signature": "func HasBillingSplitLineGroupsWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.SubscriptionItem", + "line": 1421 + }, + { + "kind": "func", + "name": "HasChargesUsageBased", + "signature": "func HasChargesUsageBased() predicate.SubscriptionItem", + "line": 1433 + }, + { + "kind": "func", + "name": "HasChargesUsageBasedWith", + "signature": "func HasChargesUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.SubscriptionItem", + "line": 1444 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchase", + "signature": "func HasChargesCreditPurchase() predicate.SubscriptionItem", + "line": 1456 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchaseWith", + "signature": "func HasChargesCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.SubscriptionItem", + "line": 1467 + }, + { + "kind": "func", + "name": "HasChargesFlatFee", + "signature": "func HasChargesFlatFee() predicate.SubscriptionItem", + "line": 1479 + }, + { + "kind": "func", + "name": "HasChargesFlatFeeWith", + "signature": "func HasChargesFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.SubscriptionItem", + "line": 1490 + }, + { + "kind": "func", + "name": "HasTaxCode", + "signature": "func HasTaxCode() predicate.SubscriptionItem", + "line": 1502 + }, + { + "kind": "func", + "name": "HasTaxCodeWith", + "signature": "func HasTaxCodeWith(preds ...predicate.TaxCode) predicate.SubscriptionItem", + "line": 1513 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.SubscriptionItem) predicate.SubscriptionItem", + "line": 1525 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.SubscriptionItem) predicate.SubscriptionItem", + "line": 1530 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.SubscriptionItem) predicate.SubscriptionItem", + "line": 1535 + } + ], + "line_count": 1537 + }, + "openmeter/ent/db/subscriptionitem_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItemCreate", + "signature": "type SubscriptionItemCreate struct", + "line": 30 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionItemCreate) SetNamespace(v string) *SubscriptionItemCreate", + "line": 38 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubscriptionItemCreate) SetCreatedAt(v time.Time) *SubscriptionItemCreate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubscriptionItemCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionItemCreate", + "line": 50 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubscriptionItemCreate) SetUpdatedAt(v time.Time) *SubscriptionItemCreate", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubscriptionItemCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionItemCreate", + "line": 64 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubscriptionItemCreate) SetDeletedAt(v time.Time) *SubscriptionItemCreate", + "line": 72 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubscriptionItemCreate) SetNillableDeletedAt(v *time.Time) *SubscriptionItemCreate", + "line": 78 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *SubscriptionItemCreate) SetMetadata(v map[string]string) *SubscriptionItemCreate", + "line": 86 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_c *SubscriptionItemCreate) SetTaxCodeID(v string) *SubscriptionItemCreate", + "line": 92 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_c *SubscriptionItemCreate) SetNillableTaxCodeID(v *string) *SubscriptionItemCreate", + "line": 98 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_c *SubscriptionItemCreate) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_c *SubscriptionItemCreate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *SubscriptionItemCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *SubscriptionItemCreate) SetAnnotations(v models.Annotations) *SubscriptionItemCreate", + "line": 120 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_c *SubscriptionItemCreate) SetActiveFrom(v time.Time) *SubscriptionItemCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_c *SubscriptionItemCreate) SetActiveTo(v time.Time) *SubscriptionItemCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_c *SubscriptionItemCreate) SetNillableActiveTo(v *time.Time) *SubscriptionItemCreate", + "line": 138 + }, + { + "kind": "func", + "name": "SetPhaseID", + "signature": "func (_c *SubscriptionItemCreate) SetPhaseID(v string) *SubscriptionItemCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *SubscriptionItemCreate) SetKey(v string) *SubscriptionItemCreate", + "line": 152 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_c *SubscriptionItemCreate) SetEntitlementID(v string) *SubscriptionItemCreate", + "line": 158 + }, + { + "kind": "func", + "name": "SetNillableEntitlementID", + "signature": "func (_c *SubscriptionItemCreate) SetNillableEntitlementID(v *string) *SubscriptionItemCreate", + "line": 164 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (_c *SubscriptionItemCreate) SetRestartsBillingPeriod(v bool) *SubscriptionItemCreate", + "line": 172 + }, + { + "kind": "func", + "name": "SetNillableRestartsBillingPeriod", + "signature": "func (_c *SubscriptionItemCreate) SetNillableRestartsBillingPeriod(v *bool) *SubscriptionItemCreate", + "line": 178 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_c *SubscriptionItemCreate) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemCreate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillableActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_c *SubscriptionItemCreate) SetNillableActiveFromOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemCreate", + "line": 192 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (_c *SubscriptionItemCreate) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemCreate", + "line": 200 + }, + { + "kind": "func", + "name": "SetNillableActiveToOverrideRelativeToPhaseStart", + "signature": "func (_c *SubscriptionItemCreate) SetNillableActiveToOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemCreate", + "line": 206 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *SubscriptionItemCreate) SetName(v string) *SubscriptionItemCreate", + "line": 214 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *SubscriptionItemCreate) SetDescription(v string) *SubscriptionItemCreate", + "line": 220 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *SubscriptionItemCreate) SetNillableDescription(v *string) *SubscriptionItemCreate", + "line": 226 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_c *SubscriptionItemCreate) SetFeatureKey(v string) *SubscriptionItemCreate", + "line": 234 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_c *SubscriptionItemCreate) SetNillableFeatureKey(v *string) *SubscriptionItemCreate", + "line": 240 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_c *SubscriptionItemCreate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemCreate", + "line": 248 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_c *SubscriptionItemCreate) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemCreate", + "line": 254 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_c *SubscriptionItemCreate) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemCreate", + "line": 260 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_c *SubscriptionItemCreate) SetNillableBillingCadence(v *datetime.ISODurationString) *SubscriptionItemCreate", + "line": 266 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_c *SubscriptionItemCreate) SetPrice(v *productcatalog.Price) *SubscriptionItemCreate", + "line": 274 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_c *SubscriptionItemCreate) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemCreate", + "line": 280 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionItemCreate) SetID(v string) *SubscriptionItemCreate", + "line": 286 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionItemCreate) SetNillableID(v *string) *SubscriptionItemCreate", + "line": 292 + }, + { + "kind": "func", + "name": "SetPhase", + "signature": "func (_c *SubscriptionItemCreate) SetPhase(v *SubscriptionPhase) *SubscriptionItemCreate", + "line": 300 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_c *SubscriptionItemCreate) SetEntitlement(v *Entitlement) *SubscriptionItemCreate", + "line": 305 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_c *SubscriptionItemCreate) AddBillingLineIDs(ids ...string) *SubscriptionItemCreate", + "line": 310 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_c *SubscriptionItemCreate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionItemCreate", + "line": 316 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_c *SubscriptionItemCreate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionItemCreate", + "line": 325 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_c *SubscriptionItemCreate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionItemCreate", + "line": 331 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_c *SubscriptionItemCreate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionItemCreate", + "line": 340 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_c *SubscriptionItemCreate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionItemCreate", + "line": 346 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_c *SubscriptionItemCreate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionItemCreate", + "line": 355 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_c *SubscriptionItemCreate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionItemCreate", + "line": 361 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_c *SubscriptionItemCreate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionItemCreate", + "line": 370 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_c *SubscriptionItemCreate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionItemCreate", + "line": 376 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_c *SubscriptionItemCreate) SetTaxCode(v *TaxCode) *SubscriptionItemCreate", + "line": 385 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionItemCreate) Mutation() *SubscriptionItemMutation", + "line": 390 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionItemCreate) Save(ctx context.Context) (*SubscriptionItem, error)", + "line": 395 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionItemCreate) SaveX(ctx context.Context) *SubscriptionItem", + "line": 401 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionItemCreate) Exec(ctx context.Context) error", + "line": 410 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionItemCreate) ExecX(ctx context.Context)", + "line": 416 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionItemCreate) defaults()", + "line": 423 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionItemCreate) check() error", + "line": 439 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionItemCreate) sqlSave(ctx context.Context) (*SubscriptionItem, error)", + "line": 512 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionItemCreate) createSpec() (*SubscriptionItem, *sqlgraph.CreateSpec, error)", + "line": 538 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionItemCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionItemUpsertOne", + "line": 802 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionItemCreate) OnConflictColumns(columns ...string) *SubscriptionItemUpsertOne", + "line": 815 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionItemUpsert) SetUpdatedAt(v time.Time) *SubscriptionItemUpsert", + "line": 836 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionItemUpsert) UpdateUpdatedAt() *SubscriptionItemUpsert", + "line": 842 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionItemUpsert) SetDeletedAt(v time.Time) *SubscriptionItemUpsert", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionItemUpsert) UpdateDeletedAt() *SubscriptionItemUpsert", + "line": 854 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionItemUpsert) ClearDeletedAt() *SubscriptionItemUpsert", + "line": 860 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionItemUpsert) SetMetadata(v map[string]string) *SubscriptionItemUpsert", + "line": 866 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionItemUpsert) UpdateMetadata() *SubscriptionItemUpsert", + "line": 872 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionItemUpsert) ClearMetadata() *SubscriptionItemUpsert", + "line": 878 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *SubscriptionItemUpsert) SetTaxCodeID(v string) *SubscriptionItemUpsert", + "line": 884 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *SubscriptionItemUpsert) UpdateTaxCodeID() *SubscriptionItemUpsert", + "line": 890 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *SubscriptionItemUpsert) ClearTaxCodeID() *SubscriptionItemUpsert", + "line": 896 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *SubscriptionItemUpsert) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemUpsert", + "line": 902 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *SubscriptionItemUpsert) UpdateTaxBehavior() *SubscriptionItemUpsert", + "line": 908 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *SubscriptionItemUpsert) ClearTaxBehavior() *SubscriptionItemUpsert", + "line": 914 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionItemUpsert) SetAnnotations(v models.Annotations) *SubscriptionItemUpsert", + "line": 920 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionItemUpsert) UpdateAnnotations() *SubscriptionItemUpsert", + "line": 926 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionItemUpsert) ClearAnnotations() *SubscriptionItemUpsert", + "line": 932 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (u *SubscriptionItemUpsert) SetActiveFrom(v time.Time) *SubscriptionItemUpsert", + "line": 938 + }, + { + "kind": "func", + "name": "UpdateActiveFrom", + "signature": "func (u *SubscriptionItemUpsert) UpdateActiveFrom() *SubscriptionItemUpsert", + "line": 944 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionItemUpsert) SetActiveTo(v time.Time) *SubscriptionItemUpsert", + "line": 950 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionItemUpsert) UpdateActiveTo() *SubscriptionItemUpsert", + "line": 956 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionItemUpsert) ClearActiveTo() *SubscriptionItemUpsert", + "line": 962 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (u *SubscriptionItemUpsert) SetEntitlementID(v string) *SubscriptionItemUpsert", + "line": 968 + }, + { + "kind": "func", + "name": "UpdateEntitlementID", + "signature": "func (u *SubscriptionItemUpsert) UpdateEntitlementID() *SubscriptionItemUpsert", + "line": 974 + }, + { + "kind": "func", + "name": "ClearEntitlementID", + "signature": "func (u *SubscriptionItemUpsert) ClearEntitlementID() *SubscriptionItemUpsert", + "line": 980 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsert) SetRestartsBillingPeriod(v bool) *SubscriptionItemUpsert", + "line": 986 + }, + { + "kind": "func", + "name": "UpdateRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsert) UpdateRestartsBillingPeriod() *SubscriptionItemUpsert", + "line": 992 + }, + { + "kind": "func", + "name": "ClearRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsert) ClearRestartsBillingPeriod() *SubscriptionItemUpsert", + "line": 998 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsert", + "line": 1004 + }, + { + "kind": "func", + "name": "UpdateActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) UpdateActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsert", + "line": 1010 + }, + { + "kind": "func", + "name": "ClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) ClearActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsert", + "line": 1016 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsert", + "line": 1022 + }, + { + "kind": "func", + "name": "UpdateActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) UpdateActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsert", + "line": 1028 + }, + { + "kind": "func", + "name": "ClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsert) ClearActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsert", + "line": 1034 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionItemUpsert) SetName(v string) *SubscriptionItemUpsert", + "line": 1040 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionItemUpsert) UpdateName() *SubscriptionItemUpsert", + "line": 1046 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionItemUpsert) SetDescription(v string) *SubscriptionItemUpsert", + "line": 1052 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionItemUpsert) UpdateDescription() *SubscriptionItemUpsert", + "line": 1058 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionItemUpsert) ClearDescription() *SubscriptionItemUpsert", + "line": 1064 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *SubscriptionItemUpsert) SetFeatureKey(v string) *SubscriptionItemUpsert", + "line": 1070 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *SubscriptionItemUpsert) UpdateFeatureKey() *SubscriptionItemUpsert", + "line": 1076 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *SubscriptionItemUpsert) ClearFeatureKey() *SubscriptionItemUpsert", + "line": 1082 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsert) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemUpsert", + "line": 1088 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsert) UpdateEntitlementTemplate() *SubscriptionItemUpsert", + "line": 1094 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsert) ClearEntitlementTemplate() *SubscriptionItemUpsert", + "line": 1100 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *SubscriptionItemUpsert) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemUpsert", + "line": 1106 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *SubscriptionItemUpsert) UpdateTaxConfig() *SubscriptionItemUpsert", + "line": 1112 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *SubscriptionItemUpsert) ClearTaxConfig() *SubscriptionItemUpsert", + "line": 1118 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionItemUpsert) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemUpsert", + "line": 1124 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionItemUpsert) UpdateBillingCadence() *SubscriptionItemUpsert", + "line": 1130 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *SubscriptionItemUpsert) ClearBillingCadence() *SubscriptionItemUpsert", + "line": 1136 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *SubscriptionItemUpsert) SetPrice(v *productcatalog.Price) *SubscriptionItemUpsert", + "line": 1142 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *SubscriptionItemUpsert) UpdatePrice() *SubscriptionItemUpsert", + "line": 1148 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *SubscriptionItemUpsert) ClearPrice() *SubscriptionItemUpsert", + "line": 1154 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *SubscriptionItemUpsert) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemUpsert", + "line": 1160 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *SubscriptionItemUpsert) UpdateDiscounts() *SubscriptionItemUpsert", + "line": 1166 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *SubscriptionItemUpsert) ClearDiscounts() *SubscriptionItemUpsert", + "line": 1172 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateNewValues() *SubscriptionItemUpsertOne", + "line": 1188 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionItemUpsertOne) Ignore() *SubscriptionItemUpsertOne", + "line": 1216 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionItemUpsertOne) DoNothing() *SubscriptionItemUpsertOne", + "line": 1223 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionItemUpsertOne) Update(set func(*SubscriptionItemUpsert)) *SubscriptionItemUpsertOne", + "line": 1230 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionItemUpsertOne) SetUpdatedAt(v time.Time) *SubscriptionItemUpsertOne", + "line": 1238 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateUpdatedAt() *SubscriptionItemUpsertOne", + "line": 1245 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionItemUpsertOne) SetDeletedAt(v time.Time) *SubscriptionItemUpsertOne", + "line": 1252 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateDeletedAt() *SubscriptionItemUpsertOne", + "line": 1259 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionItemUpsertOne) ClearDeletedAt() *SubscriptionItemUpsertOne", + "line": 1266 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionItemUpsertOne) SetMetadata(v map[string]string) *SubscriptionItemUpsertOne", + "line": 1273 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateMetadata() *SubscriptionItemUpsertOne", + "line": 1280 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionItemUpsertOne) ClearMetadata() *SubscriptionItemUpsertOne", + "line": 1287 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertOne) SetTaxCodeID(v string) *SubscriptionItemUpsertOne", + "line": 1294 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateTaxCodeID() *SubscriptionItemUpsertOne", + "line": 1301 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertOne) ClearTaxCodeID() *SubscriptionItemUpsertOne", + "line": 1308 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertOne) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemUpsertOne", + "line": 1315 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateTaxBehavior() *SubscriptionItemUpsertOne", + "line": 1322 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertOne) ClearTaxBehavior() *SubscriptionItemUpsertOne", + "line": 1329 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionItemUpsertOne) SetAnnotations(v models.Annotations) *SubscriptionItemUpsertOne", + "line": 1336 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateAnnotations() *SubscriptionItemUpsertOne", + "line": 1343 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionItemUpsertOne) ClearAnnotations() *SubscriptionItemUpsertOne", + "line": 1350 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (u *SubscriptionItemUpsertOne) SetActiveFrom(v time.Time) *SubscriptionItemUpsertOne", + "line": 1357 + }, + { + "kind": "func", + "name": "UpdateActiveFrom", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateActiveFrom() *SubscriptionItemUpsertOne", + "line": 1364 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionItemUpsertOne) SetActiveTo(v time.Time) *SubscriptionItemUpsertOne", + "line": 1371 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateActiveTo() *SubscriptionItemUpsertOne", + "line": 1378 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionItemUpsertOne) ClearActiveTo() *SubscriptionItemUpsertOne", + "line": 1385 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (u *SubscriptionItemUpsertOne) SetEntitlementID(v string) *SubscriptionItemUpsertOne", + "line": 1392 + }, + { + "kind": "func", + "name": "UpdateEntitlementID", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateEntitlementID() *SubscriptionItemUpsertOne", + "line": 1399 + }, + { + "kind": "func", + "name": "ClearEntitlementID", + "signature": "func (u *SubscriptionItemUpsertOne) ClearEntitlementID() *SubscriptionItemUpsertOne", + "line": 1406 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertOne) SetRestartsBillingPeriod(v bool) *SubscriptionItemUpsertOne", + "line": 1413 + }, + { + "kind": "func", + "name": "UpdateRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateRestartsBillingPeriod() *SubscriptionItemUpsertOne", + "line": 1420 + }, + { + "kind": "func", + "name": "ClearRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertOne) ClearRestartsBillingPeriod() *SubscriptionItemUpsertOne", + "line": 1427 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsertOne", + "line": 1434 + }, + { + "kind": "func", + "name": "UpdateActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsertOne", + "line": 1441 + }, + { + "kind": "func", + "name": "ClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) ClearActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsertOne", + "line": 1448 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsertOne", + "line": 1455 + }, + { + "kind": "func", + "name": "UpdateActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsertOne", + "line": 1462 + }, + { + "kind": "func", + "name": "ClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertOne) ClearActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsertOne", + "line": 1469 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionItemUpsertOne) SetName(v string) *SubscriptionItemUpsertOne", + "line": 1476 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateName() *SubscriptionItemUpsertOne", + "line": 1483 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionItemUpsertOne) SetDescription(v string) *SubscriptionItemUpsertOne", + "line": 1490 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateDescription() *SubscriptionItemUpsertOne", + "line": 1497 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionItemUpsertOne) ClearDescription() *SubscriptionItemUpsertOne", + "line": 1504 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *SubscriptionItemUpsertOne) SetFeatureKey(v string) *SubscriptionItemUpsertOne", + "line": 1511 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateFeatureKey() *SubscriptionItemUpsertOne", + "line": 1518 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *SubscriptionItemUpsertOne) ClearFeatureKey() *SubscriptionItemUpsertOne", + "line": 1525 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemUpsertOne", + "line": 1532 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateEntitlementTemplate() *SubscriptionItemUpsertOne", + "line": 1539 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertOne) ClearEntitlementTemplate() *SubscriptionItemUpsertOne", + "line": 1546 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *SubscriptionItemUpsertOne) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemUpsertOne", + "line": 1553 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateTaxConfig() *SubscriptionItemUpsertOne", + "line": 1560 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *SubscriptionItemUpsertOne) ClearTaxConfig() *SubscriptionItemUpsertOne", + "line": 1567 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionItemUpsertOne) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemUpsertOne", + "line": 1574 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateBillingCadence() *SubscriptionItemUpsertOne", + "line": 1581 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *SubscriptionItemUpsertOne) ClearBillingCadence() *SubscriptionItemUpsertOne", + "line": 1588 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *SubscriptionItemUpsertOne) SetPrice(v *productcatalog.Price) *SubscriptionItemUpsertOne", + "line": 1595 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *SubscriptionItemUpsertOne) UpdatePrice() *SubscriptionItemUpsertOne", + "line": 1602 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *SubscriptionItemUpsertOne) ClearPrice() *SubscriptionItemUpsertOne", + "line": 1609 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *SubscriptionItemUpsertOne) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemUpsertOne", + "line": 1616 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *SubscriptionItemUpsertOne) UpdateDiscounts() *SubscriptionItemUpsertOne", + "line": 1623 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *SubscriptionItemUpsertOne) ClearDiscounts() *SubscriptionItemUpsertOne", + "line": 1630 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionItemUpsertOne) Exec(ctx context.Context) error", + "line": 1637 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionItemUpsertOne) ExecX(ctx context.Context)", + "line": 1645 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionItemUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1652 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionItemUpsertOne) IDX(ctx context.Context) string", + "line": 1666 + }, + { + "kind": "struct", + "name": "SubscriptionItemCreateBulk", + "signature": "type SubscriptionItemCreateBulk struct", + "line": 1675 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionItemCreateBulk) Save(ctx context.Context) ([]*SubscriptionItem, error)", + "line": 1683 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionItemCreateBulk) SaveX(ctx context.Context) []*SubscriptionItem", + "line": 1742 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionItemCreateBulk) Exec(ctx context.Context) error", + "line": 1751 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionItemCreateBulk) ExecX(ctx context.Context)", + "line": 1757 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionItemUpsertBulk", + "line": 1778 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionItemCreateBulk) OnConflictColumns(columns ...string) *SubscriptionItemUpsertBulk", + "line": 1791 + }, + { + "kind": "struct", + "name": "SubscriptionItemUpsertBulk", + "signature": "type SubscriptionItemUpsertBulk struct", + "line": 1800 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateNewValues() *SubscriptionItemUpsertBulk", + "line": 1815 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionItemUpsertBulk) Ignore() *SubscriptionItemUpsertBulk", + "line": 1845 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionItemUpsertBulk) DoNothing() *SubscriptionItemUpsertBulk", + "line": 1852 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionItemUpsertBulk) Update(set func(*SubscriptionItemUpsert)) *SubscriptionItemUpsertBulk", + "line": 1859 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionItemUpsertBulk) SetUpdatedAt(v time.Time) *SubscriptionItemUpsertBulk", + "line": 1867 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateUpdatedAt() *SubscriptionItemUpsertBulk", + "line": 1874 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionItemUpsertBulk) SetDeletedAt(v time.Time) *SubscriptionItemUpsertBulk", + "line": 1881 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateDeletedAt() *SubscriptionItemUpsertBulk", + "line": 1888 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearDeletedAt() *SubscriptionItemUpsertBulk", + "line": 1895 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionItemUpsertBulk) SetMetadata(v map[string]string) *SubscriptionItemUpsertBulk", + "line": 1902 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateMetadata() *SubscriptionItemUpsertBulk", + "line": 1909 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearMetadata() *SubscriptionItemUpsertBulk", + "line": 1916 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertBulk) SetTaxCodeID(v string) *SubscriptionItemUpsertBulk", + "line": 1923 + }, + { + "kind": "func", + "name": "UpdateTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateTaxCodeID() *SubscriptionItemUpsertBulk", + "line": 1930 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearTaxCodeID() *SubscriptionItemUpsertBulk", + "line": 1937 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertBulk) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemUpsertBulk", + "line": 1944 + }, + { + "kind": "func", + "name": "UpdateTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateTaxBehavior() *SubscriptionItemUpsertBulk", + "line": 1951 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearTaxBehavior() *SubscriptionItemUpsertBulk", + "line": 1958 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *SubscriptionItemUpsertBulk) SetAnnotations(v models.Annotations) *SubscriptionItemUpsertBulk", + "line": 1965 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateAnnotations() *SubscriptionItemUpsertBulk", + "line": 1972 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearAnnotations() *SubscriptionItemUpsertBulk", + "line": 1979 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (u *SubscriptionItemUpsertBulk) SetActiveFrom(v time.Time) *SubscriptionItemUpsertBulk", + "line": 1986 + }, + { + "kind": "func", + "name": "UpdateActiveFrom", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateActiveFrom() *SubscriptionItemUpsertBulk", + "line": 1993 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (u *SubscriptionItemUpsertBulk) SetActiveTo(v time.Time) *SubscriptionItemUpsertBulk", + "line": 2000 + }, + { + "kind": "func", + "name": "UpdateActiveTo", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateActiveTo() *SubscriptionItemUpsertBulk", + "line": 2007 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearActiveTo() *SubscriptionItemUpsertBulk", + "line": 2014 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (u *SubscriptionItemUpsertBulk) SetEntitlementID(v string) *SubscriptionItemUpsertBulk", + "line": 2021 + }, + { + "kind": "func", + "name": "UpdateEntitlementID", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateEntitlementID() *SubscriptionItemUpsertBulk", + "line": 2028 + }, + { + "kind": "func", + "name": "ClearEntitlementID", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearEntitlementID() *SubscriptionItemUpsertBulk", + "line": 2035 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertBulk) SetRestartsBillingPeriod(v bool) *SubscriptionItemUpsertBulk", + "line": 2042 + }, + { + "kind": "func", + "name": "UpdateRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateRestartsBillingPeriod() *SubscriptionItemUpsertBulk", + "line": 2049 + }, + { + "kind": "func", + "name": "ClearRestartsBillingPeriod", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearRestartsBillingPeriod() *SubscriptionItemUpsertBulk", + "line": 2056 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsertBulk", + "line": 2063 + }, + { + "kind": "func", + "name": "UpdateActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsertBulk", + "line": 2070 + }, + { + "kind": "func", + "name": "ClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpsertBulk", + "line": 2077 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpsertBulk", + "line": 2084 + }, + { + "kind": "func", + "name": "UpdateActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsertBulk", + "line": 2091 + }, + { + "kind": "func", + "name": "ClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpsertBulk", + "line": 2098 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionItemUpsertBulk) SetName(v string) *SubscriptionItemUpsertBulk", + "line": 2105 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateName() *SubscriptionItemUpsertBulk", + "line": 2112 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionItemUpsertBulk) SetDescription(v string) *SubscriptionItemUpsertBulk", + "line": 2119 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateDescription() *SubscriptionItemUpsertBulk", + "line": 2126 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearDescription() *SubscriptionItemUpsertBulk", + "line": 2133 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (u *SubscriptionItemUpsertBulk) SetFeatureKey(v string) *SubscriptionItemUpsertBulk", + "line": 2140 + }, + { + "kind": "func", + "name": "UpdateFeatureKey", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateFeatureKey() *SubscriptionItemUpsertBulk", + "line": 2147 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearFeatureKey() *SubscriptionItemUpsertBulk", + "line": 2154 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertBulk) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemUpsertBulk", + "line": 2161 + }, + { + "kind": "func", + "name": "UpdateEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateEntitlementTemplate() *SubscriptionItemUpsertBulk", + "line": 2168 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearEntitlementTemplate() *SubscriptionItemUpsertBulk", + "line": 2175 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (u *SubscriptionItemUpsertBulk) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemUpsertBulk", + "line": 2182 + }, + { + "kind": "func", + "name": "UpdateTaxConfig", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateTaxConfig() *SubscriptionItemUpsertBulk", + "line": 2189 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearTaxConfig() *SubscriptionItemUpsertBulk", + "line": 2196 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (u *SubscriptionItemUpsertBulk) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemUpsertBulk", + "line": 2203 + }, + { + "kind": "func", + "name": "UpdateBillingCadence", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateBillingCadence() *SubscriptionItemUpsertBulk", + "line": 2210 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearBillingCadence() *SubscriptionItemUpsertBulk", + "line": 2217 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (u *SubscriptionItemUpsertBulk) SetPrice(v *productcatalog.Price) *SubscriptionItemUpsertBulk", + "line": 2224 + }, + { + "kind": "func", + "name": "UpdatePrice", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdatePrice() *SubscriptionItemUpsertBulk", + "line": 2231 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearPrice() *SubscriptionItemUpsertBulk", + "line": 2238 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (u *SubscriptionItemUpsertBulk) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemUpsertBulk", + "line": 2245 + }, + { + "kind": "func", + "name": "UpdateDiscounts", + "signature": "func (u *SubscriptionItemUpsertBulk) UpdateDiscounts() *SubscriptionItemUpsertBulk", + "line": 2252 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (u *SubscriptionItemUpsertBulk) ClearDiscounts() *SubscriptionItemUpsertBulk", + "line": 2259 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionItemUpsertBulk) Exec(ctx context.Context) error", + "line": 2266 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionItemUpsertBulk) ExecX(ctx context.Context)", + "line": 2282 + } + ], + "line_count": 2286 + }, + "openmeter/ent/db/subscriptionitem_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItemDelete", + "signature": "type SubscriptionItemDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionItemDelete) Where(ps ...predicate.SubscriptionItem) *SubscriptionItemDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionItemDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionItemDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionItemDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionItemDeleteOne", + "signature": "type SubscriptionItemDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionItemDeleteOne) Where(ps ...predicate.SubscriptionItem) *SubscriptionItemDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionItemDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionItemDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscriptionitem_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItemQuery", + "signature": "type SubscriptionItemQuery struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionItemQuery) Where(ps ...predicate.SubscriptionItem) *SubscriptionItemQuery", + "line": 50 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionItemQuery) Limit(limit int) *SubscriptionItemQuery", + "line": 56 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionItemQuery) Offset(offset int) *SubscriptionItemQuery", + "line": 62 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionItemQuery) Unique(unique bool) *SubscriptionItemQuery", + "line": 69 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionItemQuery) Order(o ...subscriptionitem.OrderOption) *SubscriptionItemQuery", + "line": 75 + }, + { + "kind": "func", + "name": "QueryPhase", + "signature": "func (_q *SubscriptionItemQuery) QueryPhase() *SubscriptionPhaseQuery", + "line": 81 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_q *SubscriptionItemQuery) QueryEntitlement() *EntitlementQuery", + "line": 103 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_q *SubscriptionItemQuery) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 125 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_q *SubscriptionItemQuery) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 147 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_q *SubscriptionItemQuery) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 169 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_q *SubscriptionItemQuery) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 191 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_q *SubscriptionItemQuery) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 213 + }, + { + "kind": "func", + "name": "QueryTaxCode", + "signature": "func (_q *SubscriptionItemQuery) QueryTaxCode() *TaxCodeQuery", + "line": 235 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionItemQuery) First(ctx context.Context) (*SubscriptionItem, error)", + "line": 258 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionItemQuery) FirstX(ctx context.Context) *SubscriptionItem", + "line": 270 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionItemQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 280 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionItemQuery) FirstIDX(ctx context.Context) string", + "line": 293 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionItemQuery) Only(ctx context.Context) (*SubscriptionItem, error)", + "line": 304 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionItemQuery) OnlyX(ctx context.Context) *SubscriptionItem", + "line": 320 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionItemQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 331 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionItemQuery) OnlyIDX(ctx context.Context) string", + "line": 348 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionItemQuery) All(ctx context.Context) ([]*SubscriptionItem, error)", + "line": 357 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionItemQuery) AllX(ctx context.Context) []*SubscriptionItem", + "line": 367 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionItemQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 376 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionItemQuery) IDsX(ctx context.Context) []string", + "line": 388 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionItemQuery) Count(ctx context.Context) (int, error)", + "line": 397 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionItemQuery) CountX(ctx context.Context) int", + "line": 406 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionItemQuery) Exist(ctx context.Context) (bool, error)", + "line": 415 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionItemQuery) ExistX(ctx context.Context) bool", + "line": 428 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionItemQuery) Clone() *SubscriptionItemQuery", + "line": 438 + }, + { + "kind": "func", + "name": "WithPhase", + "signature": "func (_q *SubscriptionItemQuery) WithPhase(opts ...func(*SubscriptionPhaseQuery)) *SubscriptionItemQuery", + "line": 464 + }, + { + "kind": "func", + "name": "WithEntitlement", + "signature": "func (_q *SubscriptionItemQuery) WithEntitlement(opts ...func(*EntitlementQuery)) *SubscriptionItemQuery", + "line": 475 + }, + { + "kind": "func", + "name": "WithBillingLines", + "signature": "func (_q *SubscriptionItemQuery) WithBillingLines(opts ...func(*BillingInvoiceLineQuery)) *SubscriptionItemQuery", + "line": 486 + }, + { + "kind": "func", + "name": "WithBillingSplitLineGroups", + "signature": "func (_q *SubscriptionItemQuery) WithBillingSplitLineGroups(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *SubscriptionItemQuery", + "line": 497 + }, + { + "kind": "func", + "name": "WithChargesUsageBased", + "signature": "func (_q *SubscriptionItemQuery) WithChargesUsageBased(opts ...func(*ChargeUsageBasedQuery)) *SubscriptionItemQuery", + "line": 508 + }, + { + "kind": "func", + "name": "WithChargesCreditPurchase", + "signature": "func (_q *SubscriptionItemQuery) WithChargesCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *SubscriptionItemQuery", + "line": 519 + }, + { + "kind": "func", + "name": "WithChargesFlatFee", + "signature": "func (_q *SubscriptionItemQuery) WithChargesFlatFee(opts ...func(*ChargeFlatFeeQuery)) *SubscriptionItemQuery", + "line": 530 + }, + { + "kind": "func", + "name": "WithTaxCode", + "signature": "func (_q *SubscriptionItemQuery) WithTaxCode(opts ...func(*TaxCodeQuery)) *SubscriptionItemQuery", + "line": 541 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionItemQuery) GroupBy(field string, fields ...string) *SubscriptionItemGroupBy", + "line": 564 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionItemQuery) Select(fields ...string) *SubscriptionItemSelect", + "line": 585 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionItemQuery) Aggregate(fns ...AggregateFunc) *SubscriptionItemSelect", + "line": 594 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionItemQuery) prepareQuery(ctx context.Context) error", + "line": 598 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionItemQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*SubscriptionItem, error)", + "line": 624 + }, + { + "kind": "func", + "name": "loadPhase", + "signature": "func (_q *SubscriptionItemQuery) loadPhase(ctx context.Context, query *SubscriptionPhaseQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *SubscriptionPhase)) error", + "line": 726 + }, + { + "kind": "func", + "name": "loadEntitlement", + "signature": "func (_q *SubscriptionItemQuery) loadEntitlement(ctx context.Context, query *EntitlementQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *Entitlement)) error", + "line": 755 + }, + { + "kind": "func", + "name": "loadBillingLines", + "signature": "func (_q *SubscriptionItemQuery) loadBillingLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *BillingInvoiceLine)) error", + "line": 787 + }, + { + "kind": "func", + "name": "loadBillingSplitLineGroups", + "signature": "func (_q *SubscriptionItemQuery) loadBillingSplitLineGroups(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *BillingInvoiceSplitLineGroup)) error", + "line": 821 + }, + { + "kind": "func", + "name": "loadChargesUsageBased", + "signature": "func (_q *SubscriptionItemQuery) loadChargesUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *ChargeUsageBased)) error", + "line": 854 + }, + { + "kind": "func", + "name": "loadChargesCreditPurchase", + "signature": "func (_q *SubscriptionItemQuery) loadChargesCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *ChargeCreditPurchase)) error", + "line": 887 + }, + { + "kind": "func", + "name": "loadChargesFlatFee", + "signature": "func (_q *SubscriptionItemQuery) loadChargesFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *ChargeFlatFee)) error", + "line": 920 + }, + { + "kind": "func", + "name": "loadTaxCode", + "signature": "func (_q *SubscriptionItemQuery) loadTaxCode(ctx context.Context, query *TaxCodeQuery, nodes []*SubscriptionItem, init func(*SubscriptionItem), assign func(*SubscriptionItem, *TaxCode)) error", + "line": 953 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionItemQuery) sqlCount(ctx context.Context) (int, error)", + "line": 986 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionItemQuery) querySpec() *sqlgraph.QuerySpec", + "line": 998 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionItemQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1047 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionItemQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionItemQuery", + "line": 1085 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionItemQuery) ForShare(opts ...sql.LockOption) *SubscriptionItemQuery", + "line": 1098 + }, + { + "kind": "struct", + "name": "SubscriptionItemGroupBy", + "signature": "type SubscriptionItemGroupBy struct", + "line": 1109 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionItemGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionItemGroupBy", + "line": 1115 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionItemGroupBy) Scan(ctx context.Context, v any) error", + "line": 1121 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionItemGroupBy) sqlScan(ctx context.Context, root *SubscriptionItemQuery, v any) error", + "line": 1129 + }, + { + "kind": "struct", + "name": "SubscriptionItemSelect", + "signature": "type SubscriptionItemSelect struct", + "line": 1157 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionItemSelect) Aggregate(fns ...AggregateFunc) *SubscriptionItemSelect", + "line": 1163 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionItemSelect) Scan(ctx context.Context, v any) error", + "line": 1169 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionItemSelect) sqlScan(ctx context.Context, root *SubscriptionItemQuery, v any) error", + "line": 1177 + } + ], + "line_count": 1196 + }, + "openmeter/ent/db/subscriptionitem_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItemUpdate", + "signature": "type SubscriptionItemUpdate struct", + "line": 29 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionItemUpdate) Where(ps ...predicate.SubscriptionItem) *SubscriptionItemUpdate", + "line": 36 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionItemUpdate) SetUpdatedAt(v time.Time) *SubscriptionItemUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionItemUpdate) SetDeletedAt(v time.Time) *SubscriptionItemUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableDeletedAt(v *time.Time) *SubscriptionItemUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionItemUpdate) ClearDeletedAt() *SubscriptionItemUpdate", + "line": 62 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionItemUpdate) SetMetadata(v map[string]string) *SubscriptionItemUpdate", + "line": 68 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionItemUpdate) ClearMetadata() *SubscriptionItemUpdate", + "line": 74 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdate) SetTaxCodeID(v string) *SubscriptionItemUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableTaxCodeID(v *string) *SubscriptionItemUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdate) ClearTaxCodeID() *SubscriptionItemUpdate", + "line": 94 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdate) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *SubscriptionItemUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdate) ClearTaxBehavior() *SubscriptionItemUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *SubscriptionItemUpdate) SetAnnotations(v models.Annotations) *SubscriptionItemUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *SubscriptionItemUpdate) ClearAnnotations() *SubscriptionItemUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_u *SubscriptionItemUpdate) SetActiveFrom(v time.Time) *SubscriptionItemUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "SetNillableActiveFrom", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableActiveFrom(v *time.Time) *SubscriptionItemUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *SubscriptionItemUpdate) SetActiveTo(v time.Time) *SubscriptionItemUpdate", + "line": 146 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableActiveTo(v *time.Time) *SubscriptionItemUpdate", + "line": 152 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *SubscriptionItemUpdate) ClearActiveTo() *SubscriptionItemUpdate", + "line": 160 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_u *SubscriptionItemUpdate) SetEntitlementID(v string) *SubscriptionItemUpdate", + "line": 166 + }, + { + "kind": "func", + "name": "SetNillableEntitlementID", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableEntitlementID(v *string) *SubscriptionItemUpdate", + "line": 172 + }, + { + "kind": "func", + "name": "ClearEntitlementID", + "signature": "func (_u *SubscriptionItemUpdate) ClearEntitlementID() *SubscriptionItemUpdate", + "line": 180 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdate) SetRestartsBillingPeriod(v bool) *SubscriptionItemUpdate", + "line": 186 + }, + { + "kind": "func", + "name": "SetNillableRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableRestartsBillingPeriod(v *bool) *SubscriptionItemUpdate", + "line": 192 + }, + { + "kind": "func", + "name": "ClearRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdate) ClearRestartsBillingPeriod() *SubscriptionItemUpdate", + "line": 200 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 206 + }, + { + "kind": "func", + "name": "SetNillableActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableActiveFromOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "ClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) ClearActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpdate", + "line": 220 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 226 + }, + { + "kind": "func", + "name": "SetNillableActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableActiveToOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "ClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdate) ClearActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionItemUpdate) SetName(v string) *SubscriptionItemUpdate", + "line": 246 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableName(v *string) *SubscriptionItemUpdate", + "line": 252 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionItemUpdate) SetDescription(v string) *SubscriptionItemUpdate", + "line": 260 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableDescription(v *string) *SubscriptionItemUpdate", + "line": 266 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionItemUpdate) ClearDescription() *SubscriptionItemUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *SubscriptionItemUpdate) SetFeatureKey(v string) *SubscriptionItemUpdate", + "line": 280 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableFeatureKey(v *string) *SubscriptionItemUpdate", + "line": 286 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *SubscriptionItemUpdate) ClearFeatureKey() *SubscriptionItemUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *SubscriptionItemUpdate) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *SubscriptionItemUpdate) ClearEntitlementTemplate() *SubscriptionItemUpdate", + "line": 306 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *SubscriptionItemUpdate) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemUpdate", + "line": 312 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *SubscriptionItemUpdate) ClearTaxConfig() *SubscriptionItemUpdate", + "line": 318 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *SubscriptionItemUpdate) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 324 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *SubscriptionItemUpdate) SetNillableBillingCadence(v *datetime.ISODurationString) *SubscriptionItemUpdate", + "line": 330 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *SubscriptionItemUpdate) ClearBillingCadence() *SubscriptionItemUpdate", + "line": 338 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *SubscriptionItemUpdate) SetPrice(v *productcatalog.Price) *SubscriptionItemUpdate", + "line": 344 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *SubscriptionItemUpdate) ClearPrice() *SubscriptionItemUpdate", + "line": 350 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *SubscriptionItemUpdate) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemUpdate", + "line": 356 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *SubscriptionItemUpdate) ClearDiscounts() *SubscriptionItemUpdate", + "line": 362 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_u *SubscriptionItemUpdate) SetEntitlement(v *Entitlement) *SubscriptionItemUpdate", + "line": 368 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionItemUpdate) AddBillingLineIDs(ids ...string) *SubscriptionItemUpdate", + "line": 373 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionItemUpdate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionItemUpdate", + "line": 379 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionItemUpdate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionItemUpdate", + "line": 388 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionItemUpdate", + "line": 394 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionItemUpdate", + "line": 403 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionItemUpdate", + "line": 409 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionItemUpdate", + "line": 418 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionItemUpdate", + "line": 424 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionItemUpdate", + "line": 433 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionItemUpdate", + "line": 439 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *SubscriptionItemUpdate) SetTaxCode(v *TaxCode) *SubscriptionItemUpdate", + "line": 448 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionItemUpdate) Mutation() *SubscriptionItemMutation", + "line": 453 + }, + { + "kind": "func", + "name": "ClearEntitlement", + "signature": "func (_u *SubscriptionItemUpdate) ClearEntitlement() *SubscriptionItemUpdate", + "line": 458 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionItemUpdate) ClearBillingLines() *SubscriptionItemUpdate", + "line": 464 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionItemUpdate) RemoveBillingLineIDs(ids ...string) *SubscriptionItemUpdate", + "line": 470 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionItemUpdate) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionItemUpdate", + "line": 476 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdate) ClearBillingSplitLineGroups() *SubscriptionItemUpdate", + "line": 485 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionItemUpdate) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionItemUpdate", + "line": 491 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdate) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionItemUpdate", + "line": 497 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdate) ClearChargesUsageBased() *SubscriptionItemUpdate", + "line": 506 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionItemUpdate", + "line": 512 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionItemUpdate", + "line": 518 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdate) ClearChargesCreditPurchase() *SubscriptionItemUpdate", + "line": 527 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionItemUpdate", + "line": 533 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionItemUpdate", + "line": 539 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdate) ClearChargesFlatFee() *SubscriptionItemUpdate", + "line": 548 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionItemUpdate", + "line": 554 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdate) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionItemUpdate", + "line": 560 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *SubscriptionItemUpdate) ClearTaxCode() *SubscriptionItemUpdate", + "line": 569 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionItemUpdate) Save(ctx context.Context) (int, error)", + "line": 575 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionItemUpdate) SaveX(ctx context.Context) int", + "line": 581 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionItemUpdate) Exec(ctx context.Context) error", + "line": 590 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionItemUpdate) ExecX(ctx context.Context)", + "line": 596 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionItemUpdate) defaults()", + "line": 603 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionItemUpdate) check() error", + "line": 611 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionItemUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 648 + }, + { + "kind": "struct", + "name": "SubscriptionItemUpdateOne", + "signature": "type SubscriptionItemUpdateOne struct", + "line": 1075 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionItemUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionItemUpdateOne", + "line": 1083 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionItemUpdateOne) SetDeletedAt(v time.Time) *SubscriptionItemUpdateOne", + "line": 1089 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableDeletedAt(v *time.Time) *SubscriptionItemUpdateOne", + "line": 1095 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearDeletedAt() *SubscriptionItemUpdateOne", + "line": 1103 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionItemUpdateOne) SetMetadata(v map[string]string) *SubscriptionItemUpdateOne", + "line": 1109 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearMetadata() *SubscriptionItemUpdateOne", + "line": 1115 + }, + { + "kind": "func", + "name": "SetTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdateOne) SetTaxCodeID(v string) *SubscriptionItemUpdateOne", + "line": 1121 + }, + { + "kind": "func", + "name": "SetNillableTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableTaxCodeID(v *string) *SubscriptionItemUpdateOne", + "line": 1127 + }, + { + "kind": "func", + "name": "ClearTaxCodeID", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearTaxCodeID() *SubscriptionItemUpdateOne", + "line": 1135 + }, + { + "kind": "func", + "name": "SetTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdateOne) SetTaxBehavior(v productcatalog.TaxBehavior) *SubscriptionItemUpdateOne", + "line": 1141 + }, + { + "kind": "func", + "name": "SetNillableTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableTaxBehavior(v *productcatalog.TaxBehavior) *SubscriptionItemUpdateOne", + "line": 1147 + }, + { + "kind": "func", + "name": "ClearTaxBehavior", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearTaxBehavior() *SubscriptionItemUpdateOne", + "line": 1155 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *SubscriptionItemUpdateOne) SetAnnotations(v models.Annotations) *SubscriptionItemUpdateOne", + "line": 1161 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearAnnotations() *SubscriptionItemUpdateOne", + "line": 1167 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_u *SubscriptionItemUpdateOne) SetActiveFrom(v time.Time) *SubscriptionItemUpdateOne", + "line": 1173 + }, + { + "kind": "func", + "name": "SetNillableActiveFrom", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableActiveFrom(v *time.Time) *SubscriptionItemUpdateOne", + "line": 1179 + }, + { + "kind": "func", + "name": "SetActiveTo", + "signature": "func (_u *SubscriptionItemUpdateOne) SetActiveTo(v time.Time) *SubscriptionItemUpdateOne", + "line": 1187 + }, + { + "kind": "func", + "name": "SetNillableActiveTo", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableActiveTo(v *time.Time) *SubscriptionItemUpdateOne", + "line": 1193 + }, + { + "kind": "func", + "name": "ClearActiveTo", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearActiveTo() *SubscriptionItemUpdateOne", + "line": 1201 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_u *SubscriptionItemUpdateOne) SetEntitlementID(v string) *SubscriptionItemUpdateOne", + "line": 1207 + }, + { + "kind": "func", + "name": "SetNillableEntitlementID", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableEntitlementID(v *string) *SubscriptionItemUpdateOne", + "line": 1213 + }, + { + "kind": "func", + "name": "ClearEntitlementID", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearEntitlementID() *SubscriptionItemUpdateOne", + "line": 1221 + }, + { + "kind": "func", + "name": "SetRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdateOne) SetRestartsBillingPeriod(v bool) *SubscriptionItemUpdateOne", + "line": 1227 + }, + { + "kind": "func", + "name": "SetNillableRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableRestartsBillingPeriod(v *bool) *SubscriptionItemUpdateOne", + "line": 1233 + }, + { + "kind": "func", + "name": "ClearRestartsBillingPeriod", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearRestartsBillingPeriod() *SubscriptionItemUpdateOne", + "line": 1241 + }, + { + "kind": "func", + "name": "SetActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) SetActiveFromOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1247 + }, + { + "kind": "func", + "name": "SetNillableActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableActiveFromOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1253 + }, + { + "kind": "func", + "name": "ClearActiveFromOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearActiveFromOverrideRelativeToPhaseStart() *SubscriptionItemUpdateOne", + "line": 1261 + }, + { + "kind": "func", + "name": "SetActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) SetActiveToOverrideRelativeToPhaseStart(v datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1267 + }, + { + "kind": "func", + "name": "SetNillableActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableActiveToOverrideRelativeToPhaseStart(v *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1273 + }, + { + "kind": "func", + "name": "ClearActiveToOverrideRelativeToPhaseStart", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearActiveToOverrideRelativeToPhaseStart() *SubscriptionItemUpdateOne", + "line": 1281 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionItemUpdateOne) SetName(v string) *SubscriptionItemUpdateOne", + "line": 1287 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableName(v *string) *SubscriptionItemUpdateOne", + "line": 1293 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionItemUpdateOne) SetDescription(v string) *SubscriptionItemUpdateOne", + "line": 1301 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableDescription(v *string) *SubscriptionItemUpdateOne", + "line": 1307 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearDescription() *SubscriptionItemUpdateOne", + "line": 1315 + }, + { + "kind": "func", + "name": "SetFeatureKey", + "signature": "func (_u *SubscriptionItemUpdateOne) SetFeatureKey(v string) *SubscriptionItemUpdateOne", + "line": 1321 + }, + { + "kind": "func", + "name": "SetNillableFeatureKey", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableFeatureKey(v *string) *SubscriptionItemUpdateOne", + "line": 1327 + }, + { + "kind": "func", + "name": "ClearFeatureKey", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearFeatureKey() *SubscriptionItemUpdateOne", + "line": 1335 + }, + { + "kind": "func", + "name": "SetEntitlementTemplate", + "signature": "func (_u *SubscriptionItemUpdateOne) SetEntitlementTemplate(v *productcatalog.EntitlementTemplate) *SubscriptionItemUpdateOne", + "line": 1341 + }, + { + "kind": "func", + "name": "ClearEntitlementTemplate", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearEntitlementTemplate() *SubscriptionItemUpdateOne", + "line": 1347 + }, + { + "kind": "func", + "name": "SetTaxConfig", + "signature": "func (_u *SubscriptionItemUpdateOne) SetTaxConfig(v *productcatalog.TaxConfig) *SubscriptionItemUpdateOne", + "line": 1353 + }, + { + "kind": "func", + "name": "ClearTaxConfig", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearTaxConfig() *SubscriptionItemUpdateOne", + "line": 1359 + }, + { + "kind": "func", + "name": "SetBillingCadence", + "signature": "func (_u *SubscriptionItemUpdateOne) SetBillingCadence(v datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1365 + }, + { + "kind": "func", + "name": "SetNillableBillingCadence", + "signature": "func (_u *SubscriptionItemUpdateOne) SetNillableBillingCadence(v *datetime.ISODurationString) *SubscriptionItemUpdateOne", + "line": 1371 + }, + { + "kind": "func", + "name": "ClearBillingCadence", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearBillingCadence() *SubscriptionItemUpdateOne", + "line": 1379 + }, + { + "kind": "func", + "name": "SetPrice", + "signature": "func (_u *SubscriptionItemUpdateOne) SetPrice(v *productcatalog.Price) *SubscriptionItemUpdateOne", + "line": 1385 + }, + { + "kind": "func", + "name": "ClearPrice", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearPrice() *SubscriptionItemUpdateOne", + "line": 1391 + }, + { + "kind": "func", + "name": "SetDiscounts", + "signature": "func (_u *SubscriptionItemUpdateOne) SetDiscounts(v *productcatalog.Discounts) *SubscriptionItemUpdateOne", + "line": 1397 + }, + { + "kind": "func", + "name": "ClearDiscounts", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearDiscounts() *SubscriptionItemUpdateOne", + "line": 1403 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_u *SubscriptionItemUpdateOne) SetEntitlement(v *Entitlement) *SubscriptionItemUpdateOne", + "line": 1409 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) AddBillingLineIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1414 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionItemUpdateOne) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionItemUpdateOne", + "line": 1420 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1429 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdateOne) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionItemUpdateOne", + "line": 1435 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesUsageBasedIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1444 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionItemUpdateOne", + "line": 1450 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1459 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionItemUpdateOne", + "line": 1465 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesFlatFeeIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1474 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdateOne) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionItemUpdateOne", + "line": 1480 + }, + { + "kind": "func", + "name": "SetTaxCode", + "signature": "func (_u *SubscriptionItemUpdateOne) SetTaxCode(v *TaxCode) *SubscriptionItemUpdateOne", + "line": 1489 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionItemUpdateOne) Mutation() *SubscriptionItemMutation", + "line": 1494 + }, + { + "kind": "func", + "name": "ClearEntitlement", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearEntitlement() *SubscriptionItemUpdateOne", + "line": 1499 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearBillingLines() *SubscriptionItemUpdateOne", + "line": 1505 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveBillingLineIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1511 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionItemUpdateOne", + "line": 1517 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearBillingSplitLineGroups() *SubscriptionItemUpdateOne", + "line": 1526 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1532 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionItemUpdateOne", + "line": 1538 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearChargesUsageBased() *SubscriptionItemUpdateOne", + "line": 1547 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1553 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionItemUpdateOne", + "line": 1559 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearChargesCreditPurchase() *SubscriptionItemUpdateOne", + "line": 1568 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1574 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionItemUpdateOne", + "line": 1580 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearChargesFlatFee() *SubscriptionItemUpdateOne", + "line": 1589 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionItemUpdateOne", + "line": 1595 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionItemUpdateOne) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionItemUpdateOne", + "line": 1601 + }, + { + "kind": "func", + "name": "ClearTaxCode", + "signature": "func (_u *SubscriptionItemUpdateOne) ClearTaxCode() *SubscriptionItemUpdateOne", + "line": 1610 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionItemUpdateOne) Where(ps ...predicate.SubscriptionItem) *SubscriptionItemUpdateOne", + "line": 1616 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionItemUpdateOne) Select(field string, fields ...string) *SubscriptionItemUpdateOne", + "line": 1623 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionItemUpdateOne) Save(ctx context.Context) (*SubscriptionItem, error)", + "line": 1629 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionItemUpdateOne) SaveX(ctx context.Context) *SubscriptionItem", + "line": 1635 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionItemUpdateOne) Exec(ctx context.Context) error", + "line": 1644 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionItemUpdateOne) ExecX(ctx context.Context)", + "line": 1650 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionItemUpdateOne) defaults()", + "line": 1657 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionItemUpdateOne) check() error", + "line": 1665 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionItemUpdateOne) sqlSave(ctx context.Context) (_node *SubscriptionItem, err error)", + "line": 1702 + } + ], + "line_count": 2146 + }, + "openmeter/ent/db/subscriptionphase.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhase", + "signature": "type SubscriptionPhase struct", + "line": 18 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseEdges", + "signature": "type SubscriptionPhaseEdges struct", + "line": 51 + }, + { + "kind": "func", + "name": "SubscriptionOrErr", + "signature": "func (e SubscriptionPhaseEdges) SubscriptionOrErr() (*Subscription, error)", + "line": 73 + }, + { + "kind": "func", + "name": "ItemsOrErr", + "signature": "func (e SubscriptionPhaseEdges) ItemsOrErr() ([]*SubscriptionItem, error)", + "line": 84 + }, + { + "kind": "func", + "name": "BillingLinesOrErr", + "signature": "func (e SubscriptionPhaseEdges) BillingLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 93 + }, + { + "kind": "func", + "name": "BillingSplitLineGroupsOrErr", + "signature": "func (e SubscriptionPhaseEdges) BillingSplitLineGroupsOrErr() ([]*BillingInvoiceSplitLineGroup, error)", + "line": 102 + }, + { + "kind": "func", + "name": "ChargesUsageBasedOrErr", + "signature": "func (e SubscriptionPhaseEdges) ChargesUsageBasedOrErr() ([]*ChargeUsageBased, error)", + "line": 111 + }, + { + "kind": "func", + "name": "ChargesCreditPurchaseOrErr", + "signature": "func (e SubscriptionPhaseEdges) ChargesCreditPurchaseOrErr() ([]*ChargeCreditPurchase, error)", + "line": 120 + }, + { + "kind": "func", + "name": "ChargesFlatFeeOrErr", + "signature": "func (e SubscriptionPhaseEdges) ChargesFlatFeeOrErr() ([]*ChargeFlatFee, error)", + "line": 129 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *SubscriptionPhase) assignValues(columns []string, values []any) error", + "line": 158 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *SubscriptionPhase) Value(name string) (ent.Value, error)", + "line": 250 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_m *SubscriptionPhase) QuerySubscription() *SubscriptionQuery", + "line": 255 + }, + { + "kind": "func", + "name": "QueryItems", + "signature": "func (_m *SubscriptionPhase) QueryItems() *SubscriptionItemQuery", + "line": 260 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_m *SubscriptionPhase) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 265 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_m *SubscriptionPhase) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 270 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_m *SubscriptionPhase) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 275 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_m *SubscriptionPhase) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 280 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_m *SubscriptionPhase) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 285 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *SubscriptionPhase) Update() *SubscriptionPhaseUpdateOne", + "line": 292 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *SubscriptionPhase) Unwrap() *SubscriptionPhase", + "line": 298 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *SubscriptionPhase) String() string", + "line": 308 + } + ], + "line_count": 355 + }, + "openmeter/ent/db/subscriptionphase/subscriptionphase.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 123 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 155 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 160 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 165 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 170 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 175 + }, + { + "kind": "func", + "name": "BySubscriptionID", + "signature": "func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption", + "line": 180 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 185 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 190 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 195 + }, + { + "kind": "func", + "name": "ByActiveFrom", + "signature": "func ByActiveFrom(opts ...sql.OrderTermOption) OrderOption", + "line": 200 + }, + { + "kind": "func", + "name": "BySortHint", + "signature": "func BySortHint(opts ...sql.OrderTermOption) OrderOption", + "line": 205 + }, + { + "kind": "func", + "name": "BySubscriptionField", + "signature": "func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 210 + }, + { + "kind": "func", + "name": "ByItemsCount", + "signature": "func ByItemsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 217 + }, + { + "kind": "func", + "name": "ByItems", + "signature": "func ByItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 224 + }, + { + "kind": "func", + "name": "ByBillingLinesCount", + "signature": "func ByBillingLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByBillingLines", + "signature": "func ByBillingLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 238 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroupsCount", + "signature": "func ByBillingSplitLineGroupsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 245 + }, + { + "kind": "func", + "name": "ByBillingSplitLineGroups", + "signature": "func ByBillingSplitLineGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 252 + }, + { + "kind": "func", + "name": "ByChargesUsageBasedCount", + "signature": "func ByChargesUsageBasedCount(opts ...sql.OrderTermOption) OrderOption", + "line": 259 + }, + { + "kind": "func", + "name": "ByChargesUsageBased", + "signature": "func ByChargesUsageBased(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchaseCount", + "signature": "func ByChargesCreditPurchaseCount(opts ...sql.OrderTermOption) OrderOption", + "line": 273 + }, + { + "kind": "func", + "name": "ByChargesCreditPurchase", + "signature": "func ByChargesCreditPurchase(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 280 + }, + { + "kind": "func", + "name": "ByChargesFlatFeeCount", + "signature": "func ByChargesFlatFeeCount(opts ...sql.OrderTermOption) OrderOption", + "line": 287 + }, + { + "kind": "func", + "name": "ByChargesFlatFee", + "signature": "func ByChargesFlatFee(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 294 + }, + { + "kind": "func", + "name": "newSubscriptionStep", + "signature": "func newSubscriptionStep() *sqlgraph.Step", + "line": 299 + }, + { + "kind": "func", + "name": "newItemsStep", + "signature": "func newItemsStep() *sqlgraph.Step", + "line": 306 + }, + { + "kind": "func", + "name": "newBillingLinesStep", + "signature": "func newBillingLinesStep() *sqlgraph.Step", + "line": 313 + }, + { + "kind": "func", + "name": "newBillingSplitLineGroupsStep", + "signature": "func newBillingSplitLineGroupsStep() *sqlgraph.Step", + "line": 320 + }, + { + "kind": "func", + "name": "newChargesUsageBasedStep", + "signature": "func newChargesUsageBasedStep() *sqlgraph.Step", + "line": 327 + }, + { + "kind": "func", + "name": "newChargesCreditPurchaseStep", + "signature": "func newChargesCreditPurchaseStep() *sqlgraph.Step", + "line": 334 + }, + { + "kind": "func", + "name": "newChargesFlatFeeStep", + "signature": "func newChargesFlatFeeStep() *sqlgraph.Step", + "line": 341 + } + ], + "line_count": 347 + }, + "openmeter/ent/db/subscriptionphase/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.SubscriptionPhase", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.SubscriptionPhase", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.SubscriptionPhase", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.SubscriptionPhase", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.SubscriptionPhase", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.SubscriptionPhase", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.SubscriptionPhase", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.SubscriptionPhase", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.SubscriptionPhase", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.SubscriptionPhase", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.SubscriptionPhase", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.SubscriptionPhase", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.SubscriptionPhase", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.SubscriptionPhase", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.SubscriptionPhase", + "line": 84 + }, + { + "kind": "func", + "name": "SubscriptionID", + "signature": "func SubscriptionID(v string) predicate.SubscriptionPhase", + "line": 89 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.SubscriptionPhase", + "line": 94 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.SubscriptionPhase", + "line": 99 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.SubscriptionPhase", + "line": 104 + }, + { + "kind": "func", + "name": "ActiveFrom", + "signature": "func ActiveFrom(v time.Time) predicate.SubscriptionPhase", + "line": 109 + }, + { + "kind": "func", + "name": "SortHint", + "signature": "func SortHint(v uint8) predicate.SubscriptionPhase", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.SubscriptionPhase", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.SubscriptionPhase", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.SubscriptionPhase", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.SubscriptionPhase", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.SubscriptionPhase", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.SubscriptionPhase", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.SubscriptionPhase", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.SubscriptionPhase", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.SubscriptionPhase", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.SubscriptionPhase", + "line": 164 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.SubscriptionPhase", + "line": 169 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.SubscriptionPhase", + "line": 174 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.SubscriptionPhase", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.SubscriptionPhase", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.SubscriptionPhase", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.SubscriptionPhase", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.SubscriptionPhase", + "line": 209 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.SubscriptionPhase", + "line": 214 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.SubscriptionPhase", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.SubscriptionPhase", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.SubscriptionPhase", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.SubscriptionPhase", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.SubscriptionPhase", + "line": 249 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.SubscriptionPhase", + "line": 254 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.SubscriptionPhase", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.SubscriptionPhase", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.SubscriptionPhase", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.SubscriptionPhase", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.SubscriptionPhase", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.SubscriptionPhase", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.SubscriptionPhase", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.SubscriptionPhase", + "line": 304 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.SubscriptionPhase", + "line": 309 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.SubscriptionPhase", + "line": 314 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.SubscriptionPhase", + "line": 319 + }, + { + "kind": "func", + "name": "SubscriptionIDEQ", + "signature": "func SubscriptionIDEQ(v string) predicate.SubscriptionPhase", + "line": 324 + }, + { + "kind": "func", + "name": "SubscriptionIDNEQ", + "signature": "func SubscriptionIDNEQ(v string) predicate.SubscriptionPhase", + "line": 329 + }, + { + "kind": "func", + "name": "SubscriptionIDIn", + "signature": "func SubscriptionIDIn(vs ...string) predicate.SubscriptionPhase", + "line": 334 + }, + { + "kind": "func", + "name": "SubscriptionIDNotIn", + "signature": "func SubscriptionIDNotIn(vs ...string) predicate.SubscriptionPhase", + "line": 339 + }, + { + "kind": "func", + "name": "SubscriptionIDGT", + "signature": "func SubscriptionIDGT(v string) predicate.SubscriptionPhase", + "line": 344 + }, + { + "kind": "func", + "name": "SubscriptionIDGTE", + "signature": "func SubscriptionIDGTE(v string) predicate.SubscriptionPhase", + "line": 349 + }, + { + "kind": "func", + "name": "SubscriptionIDLT", + "signature": "func SubscriptionIDLT(v string) predicate.SubscriptionPhase", + "line": 354 + }, + { + "kind": "func", + "name": "SubscriptionIDLTE", + "signature": "func SubscriptionIDLTE(v string) predicate.SubscriptionPhase", + "line": 359 + }, + { + "kind": "func", + "name": "SubscriptionIDContains", + "signature": "func SubscriptionIDContains(v string) predicate.SubscriptionPhase", + "line": 364 + }, + { + "kind": "func", + "name": "SubscriptionIDHasPrefix", + "signature": "func SubscriptionIDHasPrefix(v string) predicate.SubscriptionPhase", + "line": 369 + }, + { + "kind": "func", + "name": "SubscriptionIDHasSuffix", + "signature": "func SubscriptionIDHasSuffix(v string) predicate.SubscriptionPhase", + "line": 374 + }, + { + "kind": "func", + "name": "SubscriptionIDEqualFold", + "signature": "func SubscriptionIDEqualFold(v string) predicate.SubscriptionPhase", + "line": 379 + }, + { + "kind": "func", + "name": "SubscriptionIDContainsFold", + "signature": "func SubscriptionIDContainsFold(v string) predicate.SubscriptionPhase", + "line": 384 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.SubscriptionPhase", + "line": 389 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.SubscriptionPhase", + "line": 394 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.SubscriptionPhase", + "line": 399 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.SubscriptionPhase", + "line": 404 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.SubscriptionPhase", + "line": 409 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.SubscriptionPhase", + "line": 414 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.SubscriptionPhase", + "line": 419 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.SubscriptionPhase", + "line": 424 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.SubscriptionPhase", + "line": 429 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.SubscriptionPhase", + "line": 434 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.SubscriptionPhase", + "line": 439 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.SubscriptionPhase", + "line": 444 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.SubscriptionPhase", + "line": 449 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.SubscriptionPhase", + "line": 454 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.SubscriptionPhase", + "line": 459 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.SubscriptionPhase", + "line": 464 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.SubscriptionPhase", + "line": 469 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.SubscriptionPhase", + "line": 474 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.SubscriptionPhase", + "line": 479 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.SubscriptionPhase", + "line": 484 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.SubscriptionPhase", + "line": 489 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.SubscriptionPhase", + "line": 494 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.SubscriptionPhase", + "line": 499 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.SubscriptionPhase", + "line": 504 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.SubscriptionPhase", + "line": 509 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.SubscriptionPhase", + "line": 514 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.SubscriptionPhase", + "line": 519 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.SubscriptionPhase", + "line": 524 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.SubscriptionPhase", + "line": 529 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.SubscriptionPhase", + "line": 534 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.SubscriptionPhase", + "line": 539 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.SubscriptionPhase", + "line": 544 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.SubscriptionPhase", + "line": 549 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.SubscriptionPhase", + "line": 554 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.SubscriptionPhase", + "line": 559 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.SubscriptionPhase", + "line": 564 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.SubscriptionPhase", + "line": 569 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.SubscriptionPhase", + "line": 574 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.SubscriptionPhase", + "line": 579 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.SubscriptionPhase", + "line": 584 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.SubscriptionPhase", + "line": 589 + }, + { + "kind": "func", + "name": "ActiveFromEQ", + "signature": "func ActiveFromEQ(v time.Time) predicate.SubscriptionPhase", + "line": 594 + }, + { + "kind": "func", + "name": "ActiveFromNEQ", + "signature": "func ActiveFromNEQ(v time.Time) predicate.SubscriptionPhase", + "line": 599 + }, + { + "kind": "func", + "name": "ActiveFromIn", + "signature": "func ActiveFromIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 604 + }, + { + "kind": "func", + "name": "ActiveFromNotIn", + "signature": "func ActiveFromNotIn(vs ...time.Time) predicate.SubscriptionPhase", + "line": 609 + }, + { + "kind": "func", + "name": "ActiveFromGT", + "signature": "func ActiveFromGT(v time.Time) predicate.SubscriptionPhase", + "line": 614 + }, + { + "kind": "func", + "name": "ActiveFromGTE", + "signature": "func ActiveFromGTE(v time.Time) predicate.SubscriptionPhase", + "line": 619 + }, + { + "kind": "func", + "name": "ActiveFromLT", + "signature": "func ActiveFromLT(v time.Time) predicate.SubscriptionPhase", + "line": 624 + }, + { + "kind": "func", + "name": "ActiveFromLTE", + "signature": "func ActiveFromLTE(v time.Time) predicate.SubscriptionPhase", + "line": 629 + }, + { + "kind": "func", + "name": "SortHintEQ", + "signature": "func SortHintEQ(v uint8) predicate.SubscriptionPhase", + "line": 634 + }, + { + "kind": "func", + "name": "SortHintNEQ", + "signature": "func SortHintNEQ(v uint8) predicate.SubscriptionPhase", + "line": 639 + }, + { + "kind": "func", + "name": "SortHintIn", + "signature": "func SortHintIn(vs ...uint8) predicate.SubscriptionPhase", + "line": 644 + }, + { + "kind": "func", + "name": "SortHintNotIn", + "signature": "func SortHintNotIn(vs ...uint8) predicate.SubscriptionPhase", + "line": 649 + }, + { + "kind": "func", + "name": "SortHintGT", + "signature": "func SortHintGT(v uint8) predicate.SubscriptionPhase", + "line": 654 + }, + { + "kind": "func", + "name": "SortHintGTE", + "signature": "func SortHintGTE(v uint8) predicate.SubscriptionPhase", + "line": 659 + }, + { + "kind": "func", + "name": "SortHintLT", + "signature": "func SortHintLT(v uint8) predicate.SubscriptionPhase", + "line": 664 + }, + { + "kind": "func", + "name": "SortHintLTE", + "signature": "func SortHintLTE(v uint8) predicate.SubscriptionPhase", + "line": 669 + }, + { + "kind": "func", + "name": "SortHintIsNil", + "signature": "func SortHintIsNil() predicate.SubscriptionPhase", + "line": 674 + }, + { + "kind": "func", + "name": "SortHintNotNil", + "signature": "func SortHintNotNil() predicate.SubscriptionPhase", + "line": 679 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func HasSubscription() predicate.SubscriptionPhase", + "line": 684 + }, + { + "kind": "func", + "name": "HasSubscriptionWith", + "signature": "func HasSubscriptionWith(preds ...predicate.Subscription) predicate.SubscriptionPhase", + "line": 695 + }, + { + "kind": "func", + "name": "HasItems", + "signature": "func HasItems() predicate.SubscriptionPhase", + "line": 707 + }, + { + "kind": "func", + "name": "HasItemsWith", + "signature": "func HasItemsWith(preds ...predicate.SubscriptionItem) predicate.SubscriptionPhase", + "line": 718 + }, + { + "kind": "func", + "name": "HasBillingLines", + "signature": "func HasBillingLines() predicate.SubscriptionPhase", + "line": 730 + }, + { + "kind": "func", + "name": "HasBillingLinesWith", + "signature": "func HasBillingLinesWith(preds ...predicate.BillingInvoiceLine) predicate.SubscriptionPhase", + "line": 741 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroups", + "signature": "func HasBillingSplitLineGroups() predicate.SubscriptionPhase", + "line": 753 + }, + { + "kind": "func", + "name": "HasBillingSplitLineGroupsWith", + "signature": "func HasBillingSplitLineGroupsWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.SubscriptionPhase", + "line": 764 + }, + { + "kind": "func", + "name": "HasChargesUsageBased", + "signature": "func HasChargesUsageBased() predicate.SubscriptionPhase", + "line": 776 + }, + { + "kind": "func", + "name": "HasChargesUsageBasedWith", + "signature": "func HasChargesUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.SubscriptionPhase", + "line": 787 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchase", + "signature": "func HasChargesCreditPurchase() predicate.SubscriptionPhase", + "line": 799 + }, + { + "kind": "func", + "name": "HasChargesCreditPurchaseWith", + "signature": "func HasChargesCreditPurchaseWith(preds ...predicate.ChargeCreditPurchase) predicate.SubscriptionPhase", + "line": 810 + }, + { + "kind": "func", + "name": "HasChargesFlatFee", + "signature": "func HasChargesFlatFee() predicate.SubscriptionPhase", + "line": 822 + }, + { + "kind": "func", + "name": "HasChargesFlatFeeWith", + "signature": "func HasChargesFlatFeeWith(preds ...predicate.ChargeFlatFee) predicate.SubscriptionPhase", + "line": 833 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.SubscriptionPhase) predicate.SubscriptionPhase", + "line": 845 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.SubscriptionPhase) predicate.SubscriptionPhase", + "line": 850 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.SubscriptionPhase) predicate.SubscriptionPhase", + "line": 855 + } + ], + "line_count": 857 + }, + "openmeter/ent/db/subscriptionphase_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhaseCreate", + "signature": "type SubscriptionPhaseCreate struct", + "line": 26 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *SubscriptionPhaseCreate) SetNamespace(v string) *SubscriptionPhaseCreate", + "line": 34 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetCreatedAt(v time.Time) *SubscriptionPhaseCreate", + "line": 40 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableCreatedAt(v *time.Time) *SubscriptionPhaseCreate", + "line": 46 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetUpdatedAt(v time.Time) *SubscriptionPhaseCreate", + "line": 54 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableUpdatedAt(v *time.Time) *SubscriptionPhaseCreate", + "line": 60 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetDeletedAt(v time.Time) *SubscriptionPhaseCreate", + "line": 68 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableDeletedAt(v *time.Time) *SubscriptionPhaseCreate", + "line": 74 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *SubscriptionPhaseCreate) SetMetadata(v map[string]string) *SubscriptionPhaseCreate", + "line": 82 + }, + { + "kind": "func", + "name": "SetSubscriptionID", + "signature": "func (_c *SubscriptionPhaseCreate) SetSubscriptionID(v string) *SubscriptionPhaseCreate", + "line": 88 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *SubscriptionPhaseCreate) SetKey(v string) *SubscriptionPhaseCreate", + "line": 94 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *SubscriptionPhaseCreate) SetName(v string) *SubscriptionPhaseCreate", + "line": 100 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *SubscriptionPhaseCreate) SetDescription(v string) *SubscriptionPhaseCreate", + "line": 106 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableDescription(v *string) *SubscriptionPhaseCreate", + "line": 112 + }, + { + "kind": "func", + "name": "SetActiveFrom", + "signature": "func (_c *SubscriptionPhaseCreate) SetActiveFrom(v time.Time) *SubscriptionPhaseCreate", + "line": 120 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_c *SubscriptionPhaseCreate) SetSortHint(v uint8) *SubscriptionPhaseCreate", + "line": 126 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableSortHint(v *uint8) *SubscriptionPhaseCreate", + "line": 132 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *SubscriptionPhaseCreate) SetID(v string) *SubscriptionPhaseCreate", + "line": 140 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *SubscriptionPhaseCreate) SetNillableID(v *string) *SubscriptionPhaseCreate", + "line": 146 + }, + { + "kind": "func", + "name": "SetSubscription", + "signature": "func (_c *SubscriptionPhaseCreate) SetSubscription(v *Subscription) *SubscriptionPhaseCreate", + "line": 154 + }, + { + "kind": "func", + "name": "AddItemIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddItemIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 159 + }, + { + "kind": "func", + "name": "AddItems", + "signature": "func (_c *SubscriptionPhaseCreate) AddItems(v ...*SubscriptionItem) *SubscriptionPhaseCreate", + "line": 165 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddBillingLineIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 174 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_c *SubscriptionPhaseCreate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionPhaseCreate", + "line": 180 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 189 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_c *SubscriptionPhaseCreate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionPhaseCreate", + "line": 195 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 204 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionPhaseCreate", + "line": 210 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 219 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionPhaseCreate", + "line": 225 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionPhaseCreate", + "line": 234 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_c *SubscriptionPhaseCreate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionPhaseCreate", + "line": 240 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *SubscriptionPhaseCreate) Mutation() *SubscriptionPhaseMutation", + "line": 249 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionPhaseCreate) Save(ctx context.Context) (*SubscriptionPhase, error)", + "line": 254 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionPhaseCreate) SaveX(ctx context.Context) *SubscriptionPhase", + "line": 260 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionPhaseCreate) Exec(ctx context.Context) error", + "line": 269 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionPhaseCreate) ExecX(ctx context.Context)", + "line": 275 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *SubscriptionPhaseCreate) defaults()", + "line": 282 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *SubscriptionPhaseCreate) check() error", + "line": 298 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *SubscriptionPhaseCreate) sqlSave(ctx context.Context) (*SubscriptionPhase, error)", + "line": 346 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *SubscriptionPhaseCreate) createSpec() (*SubscriptionPhase, *sqlgraph.CreateSpec)", + "line": 369 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionPhaseCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionPhaseUpsertOne", + "line": 551 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionPhaseCreate) OnConflictColumns(columns ...string) *SubscriptionPhaseUpsertOne", + "line": 564 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsert) SetUpdatedAt(v time.Time) *SubscriptionPhaseUpsert", + "line": 585 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateUpdatedAt() *SubscriptionPhaseUpsert", + "line": 591 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsert) SetDeletedAt(v time.Time) *SubscriptionPhaseUpsert", + "line": 597 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateDeletedAt() *SubscriptionPhaseUpsert", + "line": 603 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsert) ClearDeletedAt() *SubscriptionPhaseUpsert", + "line": 609 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionPhaseUpsert) SetMetadata(v map[string]string) *SubscriptionPhaseUpsert", + "line": 615 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateMetadata() *SubscriptionPhaseUpsert", + "line": 621 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionPhaseUpsert) ClearMetadata() *SubscriptionPhaseUpsert", + "line": 627 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionPhaseUpsert) SetName(v string) *SubscriptionPhaseUpsert", + "line": 633 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateName() *SubscriptionPhaseUpsert", + "line": 639 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionPhaseUpsert) SetDescription(v string) *SubscriptionPhaseUpsert", + "line": 645 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateDescription() *SubscriptionPhaseUpsert", + "line": 651 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionPhaseUpsert) ClearDescription() *SubscriptionPhaseUpsert", + "line": 657 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *SubscriptionPhaseUpsert) SetSortHint(v uint8) *SubscriptionPhaseUpsert", + "line": 663 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *SubscriptionPhaseUpsert) UpdateSortHint() *SubscriptionPhaseUpsert", + "line": 669 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *SubscriptionPhaseUpsert) AddSortHint(v uint8) *SubscriptionPhaseUpsert", + "line": 675 + }, + { + "kind": "func", + "name": "ClearSortHint", + "signature": "func (u *SubscriptionPhaseUpsert) ClearSortHint() *SubscriptionPhaseUpsert", + "line": 681 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateNewValues() *SubscriptionPhaseUpsertOne", + "line": 697 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionPhaseUpsertOne) Ignore() *SubscriptionPhaseUpsertOne", + "line": 728 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionPhaseUpsertOne) DoNothing() *SubscriptionPhaseUpsertOne", + "line": 735 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionPhaseUpsertOne) Update(set func(*SubscriptionPhaseUpsert)) *SubscriptionPhaseUpsertOne", + "line": 742 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetUpdatedAt(v time.Time) *SubscriptionPhaseUpsertOne", + "line": 750 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateUpdatedAt() *SubscriptionPhaseUpsertOne", + "line": 757 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetDeletedAt(v time.Time) *SubscriptionPhaseUpsertOne", + "line": 764 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateDeletedAt() *SubscriptionPhaseUpsertOne", + "line": 771 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertOne) ClearDeletedAt() *SubscriptionPhaseUpsertOne", + "line": 778 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetMetadata(v map[string]string) *SubscriptionPhaseUpsertOne", + "line": 785 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateMetadata() *SubscriptionPhaseUpsertOne", + "line": 792 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionPhaseUpsertOne) ClearMetadata() *SubscriptionPhaseUpsertOne", + "line": 799 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetName(v string) *SubscriptionPhaseUpsertOne", + "line": 806 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateName() *SubscriptionPhaseUpsertOne", + "line": 813 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetDescription(v string) *SubscriptionPhaseUpsertOne", + "line": 820 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateDescription() *SubscriptionPhaseUpsertOne", + "line": 827 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionPhaseUpsertOne) ClearDescription() *SubscriptionPhaseUpsertOne", + "line": 834 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *SubscriptionPhaseUpsertOne) SetSortHint(v uint8) *SubscriptionPhaseUpsertOne", + "line": 841 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *SubscriptionPhaseUpsertOne) AddSortHint(v uint8) *SubscriptionPhaseUpsertOne", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *SubscriptionPhaseUpsertOne) UpdateSortHint() *SubscriptionPhaseUpsertOne", + "line": 855 + }, + { + "kind": "func", + "name": "ClearSortHint", + "signature": "func (u *SubscriptionPhaseUpsertOne) ClearSortHint() *SubscriptionPhaseUpsertOne", + "line": 862 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionPhaseUpsertOne) Exec(ctx context.Context) error", + "line": 869 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionPhaseUpsertOne) ExecX(ctx context.Context)", + "line": 877 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *SubscriptionPhaseUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 884 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *SubscriptionPhaseUpsertOne) IDX(ctx context.Context) string", + "line": 898 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseCreateBulk", + "signature": "type SubscriptionPhaseCreateBulk struct", + "line": 907 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *SubscriptionPhaseCreateBulk) Save(ctx context.Context) ([]*SubscriptionPhase, error)", + "line": 915 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *SubscriptionPhaseCreateBulk) SaveX(ctx context.Context) []*SubscriptionPhase", + "line": 971 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *SubscriptionPhaseCreateBulk) Exec(ctx context.Context) error", + "line": 980 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *SubscriptionPhaseCreateBulk) ExecX(ctx context.Context)", + "line": 986 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *SubscriptionPhaseCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionPhaseUpsertBulk", + "line": 1007 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *SubscriptionPhaseCreateBulk) OnConflictColumns(columns ...string) *SubscriptionPhaseUpsertBulk", + "line": 1020 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseUpsertBulk", + "signature": "type SubscriptionPhaseUpsertBulk struct", + "line": 1029 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateNewValues() *SubscriptionPhaseUpsertBulk", + "line": 1044 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *SubscriptionPhaseUpsertBulk) Ignore() *SubscriptionPhaseUpsertBulk", + "line": 1077 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *SubscriptionPhaseUpsertBulk) DoNothing() *SubscriptionPhaseUpsertBulk", + "line": 1084 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *SubscriptionPhaseUpsertBulk) Update(set func(*SubscriptionPhaseUpsert)) *SubscriptionPhaseUpsertBulk", + "line": 1091 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetUpdatedAt(v time.Time) *SubscriptionPhaseUpsertBulk", + "line": 1099 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateUpdatedAt() *SubscriptionPhaseUpsertBulk", + "line": 1106 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetDeletedAt(v time.Time) *SubscriptionPhaseUpsertBulk", + "line": 1113 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateDeletedAt() *SubscriptionPhaseUpsertBulk", + "line": 1120 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *SubscriptionPhaseUpsertBulk) ClearDeletedAt() *SubscriptionPhaseUpsertBulk", + "line": 1127 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetMetadata(v map[string]string) *SubscriptionPhaseUpsertBulk", + "line": 1134 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateMetadata() *SubscriptionPhaseUpsertBulk", + "line": 1141 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *SubscriptionPhaseUpsertBulk) ClearMetadata() *SubscriptionPhaseUpsertBulk", + "line": 1148 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetName(v string) *SubscriptionPhaseUpsertBulk", + "line": 1155 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateName() *SubscriptionPhaseUpsertBulk", + "line": 1162 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetDescription(v string) *SubscriptionPhaseUpsertBulk", + "line": 1169 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateDescription() *SubscriptionPhaseUpsertBulk", + "line": 1176 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *SubscriptionPhaseUpsertBulk) ClearDescription() *SubscriptionPhaseUpsertBulk", + "line": 1183 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (u *SubscriptionPhaseUpsertBulk) SetSortHint(v uint8) *SubscriptionPhaseUpsertBulk", + "line": 1190 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (u *SubscriptionPhaseUpsertBulk) AddSortHint(v uint8) *SubscriptionPhaseUpsertBulk", + "line": 1197 + }, + { + "kind": "func", + "name": "UpdateSortHint", + "signature": "func (u *SubscriptionPhaseUpsertBulk) UpdateSortHint() *SubscriptionPhaseUpsertBulk", + "line": 1204 + }, + { + "kind": "func", + "name": "ClearSortHint", + "signature": "func (u *SubscriptionPhaseUpsertBulk) ClearSortHint() *SubscriptionPhaseUpsertBulk", + "line": 1211 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *SubscriptionPhaseUpsertBulk) Exec(ctx context.Context) error", + "line": 1218 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *SubscriptionPhaseUpsertBulk) ExecX(ctx context.Context)", + "line": 1234 + } + ], + "line_count": 1238 + }, + "openmeter/ent/db/subscriptionphase_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhaseDelete", + "signature": "type SubscriptionPhaseDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionPhaseDelete) Where(ps ...predicate.SubscriptionPhase) *SubscriptionPhaseDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionPhaseDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionPhaseDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *SubscriptionPhaseDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseDeleteOne", + "signature": "type SubscriptionPhaseDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *SubscriptionPhaseDeleteOne) Where(ps ...predicate.SubscriptionPhase) *SubscriptionPhaseDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *SubscriptionPhaseDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *SubscriptionPhaseDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/subscriptionphase_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhaseQuery", + "signature": "type SubscriptionPhaseQuery struct", + "line": 28 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *SubscriptionPhaseQuery) Where(ps ...predicate.SubscriptionPhase) *SubscriptionPhaseQuery", + "line": 48 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *SubscriptionPhaseQuery) Limit(limit int) *SubscriptionPhaseQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *SubscriptionPhaseQuery) Offset(offset int) *SubscriptionPhaseQuery", + "line": 60 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *SubscriptionPhaseQuery) Unique(unique bool) *SubscriptionPhaseQuery", + "line": 67 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *SubscriptionPhaseQuery) Order(o ...subscriptionphase.OrderOption) *SubscriptionPhaseQuery", + "line": 73 + }, + { + "kind": "func", + "name": "QuerySubscription", + "signature": "func (_q *SubscriptionPhaseQuery) QuerySubscription() *SubscriptionQuery", + "line": 79 + }, + { + "kind": "func", + "name": "QueryItems", + "signature": "func (_q *SubscriptionPhaseQuery) QueryItems() *SubscriptionItemQuery", + "line": 101 + }, + { + "kind": "func", + "name": "QueryBillingLines", + "signature": "func (_q *SubscriptionPhaseQuery) QueryBillingLines() *BillingInvoiceLineQuery", + "line": 123 + }, + { + "kind": "func", + "name": "QueryBillingSplitLineGroups", + "signature": "func (_q *SubscriptionPhaseQuery) QueryBillingSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 145 + }, + { + "kind": "func", + "name": "QueryChargesUsageBased", + "signature": "func (_q *SubscriptionPhaseQuery) QueryChargesUsageBased() *ChargeUsageBasedQuery", + "line": 167 + }, + { + "kind": "func", + "name": "QueryChargesCreditPurchase", + "signature": "func (_q *SubscriptionPhaseQuery) QueryChargesCreditPurchase() *ChargeCreditPurchaseQuery", + "line": 189 + }, + { + "kind": "func", + "name": "QueryChargesFlatFee", + "signature": "func (_q *SubscriptionPhaseQuery) QueryChargesFlatFee() *ChargeFlatFeeQuery", + "line": 211 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *SubscriptionPhaseQuery) First(ctx context.Context) (*SubscriptionPhase, error)", + "line": 234 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *SubscriptionPhaseQuery) FirstX(ctx context.Context) *SubscriptionPhase", + "line": 246 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *SubscriptionPhaseQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 256 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *SubscriptionPhaseQuery) FirstIDX(ctx context.Context) string", + "line": 269 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *SubscriptionPhaseQuery) Only(ctx context.Context) (*SubscriptionPhase, error)", + "line": 280 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *SubscriptionPhaseQuery) OnlyX(ctx context.Context) *SubscriptionPhase", + "line": 296 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *SubscriptionPhaseQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 307 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *SubscriptionPhaseQuery) OnlyIDX(ctx context.Context) string", + "line": 324 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *SubscriptionPhaseQuery) All(ctx context.Context) ([]*SubscriptionPhase, error)", + "line": 333 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *SubscriptionPhaseQuery) AllX(ctx context.Context) []*SubscriptionPhase", + "line": 343 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *SubscriptionPhaseQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 352 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *SubscriptionPhaseQuery) IDsX(ctx context.Context) []string", + "line": 364 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *SubscriptionPhaseQuery) Count(ctx context.Context) (int, error)", + "line": 373 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *SubscriptionPhaseQuery) CountX(ctx context.Context) int", + "line": 382 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *SubscriptionPhaseQuery) Exist(ctx context.Context) (bool, error)", + "line": 391 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *SubscriptionPhaseQuery) ExistX(ctx context.Context) bool", + "line": 404 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *SubscriptionPhaseQuery) Clone() *SubscriptionPhaseQuery", + "line": 414 + }, + { + "kind": "func", + "name": "WithSubscription", + "signature": "func (_q *SubscriptionPhaseQuery) WithSubscription(opts ...func(*SubscriptionQuery)) *SubscriptionPhaseQuery", + "line": 439 + }, + { + "kind": "func", + "name": "WithItems", + "signature": "func (_q *SubscriptionPhaseQuery) WithItems(opts ...func(*SubscriptionItemQuery)) *SubscriptionPhaseQuery", + "line": 450 + }, + { + "kind": "func", + "name": "WithBillingLines", + "signature": "func (_q *SubscriptionPhaseQuery) WithBillingLines(opts ...func(*BillingInvoiceLineQuery)) *SubscriptionPhaseQuery", + "line": 461 + }, + { + "kind": "func", + "name": "WithBillingSplitLineGroups", + "signature": "func (_q *SubscriptionPhaseQuery) WithBillingSplitLineGroups(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *SubscriptionPhaseQuery", + "line": 472 + }, + { + "kind": "func", + "name": "WithChargesUsageBased", + "signature": "func (_q *SubscriptionPhaseQuery) WithChargesUsageBased(opts ...func(*ChargeUsageBasedQuery)) *SubscriptionPhaseQuery", + "line": 483 + }, + { + "kind": "func", + "name": "WithChargesCreditPurchase", + "signature": "func (_q *SubscriptionPhaseQuery) WithChargesCreditPurchase(opts ...func(*ChargeCreditPurchaseQuery)) *SubscriptionPhaseQuery", + "line": 494 + }, + { + "kind": "func", + "name": "WithChargesFlatFee", + "signature": "func (_q *SubscriptionPhaseQuery) WithChargesFlatFee(opts ...func(*ChargeFlatFeeQuery)) *SubscriptionPhaseQuery", + "line": 505 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *SubscriptionPhaseQuery) GroupBy(field string, fields ...string) *SubscriptionPhaseGroupBy", + "line": 528 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *SubscriptionPhaseQuery) Select(fields ...string) *SubscriptionPhaseSelect", + "line": 549 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *SubscriptionPhaseQuery) Aggregate(fns ...AggregateFunc) *SubscriptionPhaseSelect", + "line": 558 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *SubscriptionPhaseQuery) prepareQuery(ctx context.Context) error", + "line": 562 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *SubscriptionPhaseQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*SubscriptionPhase, error)", + "line": 588 + }, + { + "kind": "func", + "name": "loadSubscription", + "signature": "func (_q *SubscriptionPhaseQuery) loadSubscription(ctx context.Context, query *SubscriptionQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *Subscription)) error", + "line": 684 + }, + { + "kind": "func", + "name": "loadItems", + "signature": "func (_q *SubscriptionPhaseQuery) loadItems(ctx context.Context, query *SubscriptionItemQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *SubscriptionItem)) error", + "line": 713 + }, + { + "kind": "func", + "name": "loadBillingLines", + "signature": "func (_q *SubscriptionPhaseQuery) loadBillingLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *BillingInvoiceLine)) error", + "line": 743 + }, + { + "kind": "func", + "name": "loadBillingSplitLineGroups", + "signature": "func (_q *SubscriptionPhaseQuery) loadBillingSplitLineGroups(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *BillingInvoiceSplitLineGroup)) error", + "line": 777 + }, + { + "kind": "func", + "name": "loadChargesUsageBased", + "signature": "func (_q *SubscriptionPhaseQuery) loadChargesUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *ChargeUsageBased)) error", + "line": 810 + }, + { + "kind": "func", + "name": "loadChargesCreditPurchase", + "signature": "func (_q *SubscriptionPhaseQuery) loadChargesCreditPurchase(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *ChargeCreditPurchase)) error", + "line": 843 + }, + { + "kind": "func", + "name": "loadChargesFlatFee", + "signature": "func (_q *SubscriptionPhaseQuery) loadChargesFlatFee(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*SubscriptionPhase, init func(*SubscriptionPhase), assign func(*SubscriptionPhase, *ChargeFlatFee)) error", + "line": 876 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *SubscriptionPhaseQuery) sqlCount(ctx context.Context) (int, error)", + "line": 910 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *SubscriptionPhaseQuery) querySpec() *sqlgraph.QuerySpec", + "line": 922 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *SubscriptionPhaseQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 965 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *SubscriptionPhaseQuery) ForUpdate(opts ...sql.LockOption) *SubscriptionPhaseQuery", + "line": 1003 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *SubscriptionPhaseQuery) ForShare(opts ...sql.LockOption) *SubscriptionPhaseQuery", + "line": 1016 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseGroupBy", + "signature": "type SubscriptionPhaseGroupBy struct", + "line": 1027 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *SubscriptionPhaseGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionPhaseGroupBy", + "line": 1033 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *SubscriptionPhaseGroupBy) Scan(ctx context.Context, v any) error", + "line": 1039 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *SubscriptionPhaseGroupBy) sqlScan(ctx context.Context, root *SubscriptionPhaseQuery, v any) error", + "line": 1047 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseSelect", + "signature": "type SubscriptionPhaseSelect struct", + "line": 1075 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *SubscriptionPhaseSelect) Aggregate(fns ...AggregateFunc) *SubscriptionPhaseSelect", + "line": 1081 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *SubscriptionPhaseSelect) Scan(ctx context.Context, v any) error", + "line": 1087 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *SubscriptionPhaseSelect) sqlScan(ctx context.Context, root *SubscriptionPhaseQuery, v any) error", + "line": 1095 + } + ], + "line_count": 1114 + }, + "openmeter/ent/db/subscriptionphase_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhaseUpdate", + "signature": "type SubscriptionPhaseUpdate struct", + "line": 25 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionPhaseUpdate) Where(ps ...predicate.SubscriptionPhase) *SubscriptionPhaseUpdate", + "line": 32 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionPhaseUpdate) SetUpdatedAt(v time.Time) *SubscriptionPhaseUpdate", + "line": 38 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdate) SetDeletedAt(v time.Time) *SubscriptionPhaseUpdate", + "line": 44 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdate) SetNillableDeletedAt(v *time.Time) *SubscriptionPhaseUpdate", + "line": 50 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearDeletedAt() *SubscriptionPhaseUpdate", + "line": 58 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionPhaseUpdate) SetMetadata(v map[string]string) *SubscriptionPhaseUpdate", + "line": 64 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearMetadata() *SubscriptionPhaseUpdate", + "line": 70 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionPhaseUpdate) SetName(v string) *SubscriptionPhaseUpdate", + "line": 76 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionPhaseUpdate) SetNillableName(v *string) *SubscriptionPhaseUpdate", + "line": 82 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionPhaseUpdate) SetDescription(v string) *SubscriptionPhaseUpdate", + "line": 90 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionPhaseUpdate) SetNillableDescription(v *string) *SubscriptionPhaseUpdate", + "line": 96 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearDescription() *SubscriptionPhaseUpdate", + "line": 104 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *SubscriptionPhaseUpdate) SetSortHint(v uint8) *SubscriptionPhaseUpdate", + "line": 110 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *SubscriptionPhaseUpdate) SetNillableSortHint(v *uint8) *SubscriptionPhaseUpdate", + "line": 117 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *SubscriptionPhaseUpdate) AddSortHint(v int8) *SubscriptionPhaseUpdate", + "line": 125 + }, + { + "kind": "func", + "name": "ClearSortHint", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearSortHint() *SubscriptionPhaseUpdate", + "line": 131 + }, + { + "kind": "func", + "name": "AddItemIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddItemIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 137 + }, + { + "kind": "func", + "name": "AddItems", + "signature": "func (_u *SubscriptionPhaseUpdate) AddItems(v ...*SubscriptionItem) *SubscriptionPhaseUpdate", + "line": 143 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddBillingLineIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 152 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdate) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionPhaseUpdate", + "line": 158 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 167 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdate) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionPhaseUpdate", + "line": 173 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesUsageBasedIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 182 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionPhaseUpdate", + "line": 188 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 197 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionPhaseUpdate", + "line": 203 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesFlatFeeIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 212 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdate) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionPhaseUpdate", + "line": 218 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionPhaseUpdate) Mutation() *SubscriptionPhaseMutation", + "line": 227 + }, + { + "kind": "func", + "name": "ClearItems", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearItems() *SubscriptionPhaseUpdate", + "line": 232 + }, + { + "kind": "func", + "name": "RemoveItemIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveItemIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 238 + }, + { + "kind": "func", + "name": "RemoveItems", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveItems(v ...*SubscriptionItem) *SubscriptionPhaseUpdate", + "line": 244 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearBillingLines() *SubscriptionPhaseUpdate", + "line": 253 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveBillingLineIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 259 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionPhaseUpdate", + "line": 265 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearBillingSplitLineGroups() *SubscriptionPhaseUpdate", + "line": 274 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 280 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionPhaseUpdate", + "line": 286 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearChargesUsageBased() *SubscriptionPhaseUpdate", + "line": 295 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 301 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionPhaseUpdate", + "line": 307 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearChargesCreditPurchase() *SubscriptionPhaseUpdate", + "line": 316 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 322 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionPhaseUpdate", + "line": 328 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdate) ClearChargesFlatFee() *SubscriptionPhaseUpdate", + "line": 337 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionPhaseUpdate", + "line": 343 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdate) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionPhaseUpdate", + "line": 349 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionPhaseUpdate) Save(ctx context.Context) (int, error)", + "line": 358 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionPhaseUpdate) SaveX(ctx context.Context) int", + "line": 364 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionPhaseUpdate) Exec(ctx context.Context) error", + "line": 373 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionPhaseUpdate) ExecX(ctx context.Context)", + "line": 379 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionPhaseUpdate) defaults()", + "line": 386 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionPhaseUpdate) check() error", + "line": 394 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionPhaseUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 406 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseUpdateOne", + "signature": "type SubscriptionPhaseUpdateOne struct", + "line": 734 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetUpdatedAt(v time.Time) *SubscriptionPhaseUpdateOne", + "line": 742 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetDeletedAt(v time.Time) *SubscriptionPhaseUpdateOne", + "line": 748 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetNillableDeletedAt(v *time.Time) *SubscriptionPhaseUpdateOne", + "line": 754 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearDeletedAt() *SubscriptionPhaseUpdateOne", + "line": 762 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetMetadata(v map[string]string) *SubscriptionPhaseUpdateOne", + "line": 768 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearMetadata() *SubscriptionPhaseUpdateOne", + "line": 774 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetName(v string) *SubscriptionPhaseUpdateOne", + "line": 780 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetNillableName(v *string) *SubscriptionPhaseUpdateOne", + "line": 786 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetDescription(v string) *SubscriptionPhaseUpdateOne", + "line": 794 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetNillableDescription(v *string) *SubscriptionPhaseUpdateOne", + "line": 800 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearDescription() *SubscriptionPhaseUpdateOne", + "line": 808 + }, + { + "kind": "func", + "name": "SetSortHint", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetSortHint(v uint8) *SubscriptionPhaseUpdateOne", + "line": 814 + }, + { + "kind": "func", + "name": "SetNillableSortHint", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SetNillableSortHint(v *uint8) *SubscriptionPhaseUpdateOne", + "line": 821 + }, + { + "kind": "func", + "name": "AddSortHint", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddSortHint(v int8) *SubscriptionPhaseUpdateOne", + "line": 829 + }, + { + "kind": "func", + "name": "ClearSortHint", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearSortHint() *SubscriptionPhaseUpdateOne", + "line": 835 + }, + { + "kind": "func", + "name": "AddItemIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddItemIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 841 + }, + { + "kind": "func", + "name": "AddItems", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddItems(v ...*SubscriptionItem) *SubscriptionPhaseUpdateOne", + "line": 847 + }, + { + "kind": "func", + "name": "AddBillingLineIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddBillingLineIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 856 + }, + { + "kind": "func", + "name": "AddBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddBillingLines(v ...*BillingInvoiceLine) *SubscriptionPhaseUpdateOne", + "line": 862 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddBillingSplitLineGroupIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 871 + }, + { + "kind": "func", + "name": "AddBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionPhaseUpdateOne", + "line": 877 + }, + { + "kind": "func", + "name": "AddChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesUsageBasedIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 886 + }, + { + "kind": "func", + "name": "AddChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionPhaseUpdateOne", + "line": 892 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesCreditPurchaseIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 901 + }, + { + "kind": "func", + "name": "AddChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionPhaseUpdateOne", + "line": 907 + }, + { + "kind": "func", + "name": "AddChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesFlatFeeIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 916 + }, + { + "kind": "func", + "name": "AddChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdateOne) AddChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionPhaseUpdateOne", + "line": 922 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *SubscriptionPhaseUpdateOne) Mutation() *SubscriptionPhaseMutation", + "line": 931 + }, + { + "kind": "func", + "name": "ClearItems", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearItems() *SubscriptionPhaseUpdateOne", + "line": 936 + }, + { + "kind": "func", + "name": "RemoveItemIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveItemIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 942 + }, + { + "kind": "func", + "name": "RemoveItems", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveItems(v ...*SubscriptionItem) *SubscriptionPhaseUpdateOne", + "line": 948 + }, + { + "kind": "func", + "name": "ClearBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearBillingLines() *SubscriptionPhaseUpdateOne", + "line": 957 + }, + { + "kind": "func", + "name": "RemoveBillingLineIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveBillingLineIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 963 + }, + { + "kind": "func", + "name": "RemoveBillingLines", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveBillingLines(v ...*BillingInvoiceLine) *SubscriptionPhaseUpdateOne", + "line": 969 + }, + { + "kind": "func", + "name": "ClearBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearBillingSplitLineGroups() *SubscriptionPhaseUpdateOne", + "line": 978 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroupIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveBillingSplitLineGroupIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 984 + }, + { + "kind": "func", + "name": "RemoveBillingSplitLineGroups", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveBillingSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *SubscriptionPhaseUpdateOne", + "line": 990 + }, + { + "kind": "func", + "name": "ClearChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearChargesUsageBased() *SubscriptionPhaseUpdateOne", + "line": 999 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBasedIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesUsageBasedIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 1005 + }, + { + "kind": "func", + "name": "RemoveChargesUsageBased", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesUsageBased(v ...*ChargeUsageBased) *SubscriptionPhaseUpdateOne", + "line": 1011 + }, + { + "kind": "func", + "name": "ClearChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearChargesCreditPurchase() *SubscriptionPhaseUpdateOne", + "line": 1020 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchaseIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesCreditPurchaseIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 1026 + }, + { + "kind": "func", + "name": "RemoveChargesCreditPurchase", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesCreditPurchase(v ...*ChargeCreditPurchase) *SubscriptionPhaseUpdateOne", + "line": 1032 + }, + { + "kind": "func", + "name": "ClearChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ClearChargesFlatFee() *SubscriptionPhaseUpdateOne", + "line": 1041 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFeeIDs", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesFlatFeeIDs(ids ...string) *SubscriptionPhaseUpdateOne", + "line": 1047 + }, + { + "kind": "func", + "name": "RemoveChargesFlatFee", + "signature": "func (_u *SubscriptionPhaseUpdateOne) RemoveChargesFlatFee(v ...*ChargeFlatFee) *SubscriptionPhaseUpdateOne", + "line": 1053 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *SubscriptionPhaseUpdateOne) Where(ps ...predicate.SubscriptionPhase) *SubscriptionPhaseUpdateOne", + "line": 1062 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *SubscriptionPhaseUpdateOne) Select(field string, fields ...string) *SubscriptionPhaseUpdateOne", + "line": 1069 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *SubscriptionPhaseUpdateOne) Save(ctx context.Context) (*SubscriptionPhase, error)", + "line": 1075 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *SubscriptionPhaseUpdateOne) SaveX(ctx context.Context) *SubscriptionPhase", + "line": 1081 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *SubscriptionPhaseUpdateOne) Exec(ctx context.Context) error", + "line": 1090 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *SubscriptionPhaseUpdateOne) ExecX(ctx context.Context)", + "line": 1096 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *SubscriptionPhaseUpdateOne) defaults()", + "line": 1103 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *SubscriptionPhaseUpdateOne) check() error", + "line": 1111 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *SubscriptionPhaseUpdateOne) sqlSave(ctx context.Context) (_node *SubscriptionPhase, err error)", + "line": 1123 + } + ], + "line_count": 1468 + }, + "openmeter/ent/db/taxcode.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCode", + "signature": "type TaxCode struct", + "line": 19 + }, + { + "kind": "struct", + "name": "TaxCodeEdges", + "signature": "type TaxCodeEdges struct", + "line": 50 + }, + { + "kind": "func", + "name": "BillingWorkflowConfigsOrErr", + "signature": "func (e TaxCodeEdges) BillingWorkflowConfigsOrErr() ([]*BillingWorkflowConfig, error)", + "line": 88 + }, + { + "kind": "func", + "name": "BillingCustomerOverridesOrErr", + "signature": "func (e TaxCodeEdges) BillingCustomerOverridesOrErr() ([]*BillingCustomerOverride, error)", + "line": 97 + }, + { + "kind": "func", + "name": "BillingInvoiceLinesOrErr", + "signature": "func (e TaxCodeEdges) BillingInvoiceLinesOrErr() ([]*BillingInvoiceLine, error)", + "line": 106 + }, + { + "kind": "func", + "name": "BillingInvoiceSplitLineGroupsOrErr", + "signature": "func (e TaxCodeEdges) BillingInvoiceSplitLineGroupsOrErr() ([]*BillingInvoiceSplitLineGroup, error)", + "line": 115 + }, + { + "kind": "func", + "name": "BillingStandardInvoiceDetailedLinesOrErr", + "signature": "func (e TaxCodeEdges) BillingStandardInvoiceDetailedLinesOrErr() ([]*BillingStandardInvoiceDetailedLine, error)", + "line": 124 + }, + { + "kind": "func", + "name": "ChargeUsageBasedRunDetailedLinesOrErr", + "signature": "func (e TaxCodeEdges) ChargeUsageBasedRunDetailedLinesOrErr() ([]*ChargeUsageBasedRunDetailedLine, error)", + "line": 133 + }, + { + "kind": "func", + "name": "ChargeFlatFeeRunDetailedLinesOrErr", + "signature": "func (e TaxCodeEdges) ChargeFlatFeeRunDetailedLinesOrErr() ([]*ChargeFlatFeeRunDetailedLine, error)", + "line": 142 + }, + { + "kind": "func", + "name": "SubscriptionItemsOrErr", + "signature": "func (e TaxCodeEdges) SubscriptionItemsOrErr() ([]*SubscriptionItem, error)", + "line": 151 + }, + { + "kind": "func", + "name": "PlanRateCardsOrErr", + "signature": "func (e TaxCodeEdges) PlanRateCardsOrErr() ([]*PlanRateCard, error)", + "line": 160 + }, + { + "kind": "func", + "name": "AddonRateCardsOrErr", + "signature": "func (e TaxCodeEdges) AddonRateCardsOrErr() ([]*AddonRateCard, error)", + "line": 169 + }, + { + "kind": "func", + "name": "ChargeFlatFeesOrErr", + "signature": "func (e TaxCodeEdges) ChargeFlatFeesOrErr() ([]*ChargeFlatFee, error)", + "line": 178 + }, + { + "kind": "func", + "name": "ChargeUsageBasedOrErr", + "signature": "func (e TaxCodeEdges) ChargeUsageBasedOrErr() ([]*ChargeUsageBased, error)", + "line": 187 + }, + { + "kind": "func", + "name": "ChargeCreditPurchasesOrErr", + "signature": "func (e TaxCodeEdges) ChargeCreditPurchasesOrErr() ([]*ChargeCreditPurchase, error)", + "line": 196 + }, + { + "kind": "func", + "name": "OrganizationDefaultInvoicingOrErr", + "signature": "func (e TaxCodeEdges) OrganizationDefaultInvoicingOrErr() ([]*OrganizationDefaultTaxCodes, error)", + "line": 205 + }, + { + "kind": "func", + "name": "OrganizationDefaultCreditGrantOrErr", + "signature": "func (e TaxCodeEdges) OrganizationDefaultCreditGrantOrErr() ([]*OrganizationDefaultTaxCodes, error)", + "line": 214 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *TaxCode) assignValues(columns []string, values []any) error", + "line": 243 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *TaxCode) Value(name string) (ent.Value, error)", + "line": 330 + }, + { + "kind": "func", + "name": "QueryBillingWorkflowConfigs", + "signature": "func (_m *TaxCode) QueryBillingWorkflowConfigs() *BillingWorkflowConfigQuery", + "line": 335 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverrides", + "signature": "func (_m *TaxCode) QueryBillingCustomerOverrides() *BillingCustomerOverrideQuery", + "line": 340 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_m *TaxCode) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 345 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceSplitLineGroups", + "signature": "func (_m *TaxCode) QueryBillingInvoiceSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 350 + }, + { + "kind": "func", + "name": "QueryBillingStandardInvoiceDetailedLines", + "signature": "func (_m *TaxCode) QueryBillingStandardInvoiceDetailedLines() *BillingStandardInvoiceDetailedLineQuery", + "line": 355 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRunDetailedLines", + "signature": "func (_m *TaxCode) QueryChargeUsageBasedRunDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 360 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunDetailedLines", + "signature": "func (_m *TaxCode) QueryChargeFlatFeeRunDetailedLines() *ChargeFlatFeeRunDetailedLineQuery", + "line": 365 + }, + { + "kind": "func", + "name": "QuerySubscriptionItems", + "signature": "func (_m *TaxCode) QuerySubscriptionItems() *SubscriptionItemQuery", + "line": 370 + }, + { + "kind": "func", + "name": "QueryPlanRateCards", + "signature": "func (_m *TaxCode) QueryPlanRateCards() *PlanRateCardQuery", + "line": 375 + }, + { + "kind": "func", + "name": "QueryAddonRateCards", + "signature": "func (_m *TaxCode) QueryAddonRateCards() *AddonRateCardQuery", + "line": 380 + }, + { + "kind": "func", + "name": "QueryChargeFlatFees", + "signature": "func (_m *TaxCode) QueryChargeFlatFees() *ChargeFlatFeeQuery", + "line": 385 + }, + { + "kind": "func", + "name": "QueryChargeUsageBased", + "signature": "func (_m *TaxCode) QueryChargeUsageBased() *ChargeUsageBasedQuery", + "line": 390 + }, + { + "kind": "func", + "name": "QueryChargeCreditPurchases", + "signature": "func (_m *TaxCode) QueryChargeCreditPurchases() *ChargeCreditPurchaseQuery", + "line": 395 + }, + { + "kind": "func", + "name": "QueryOrganizationDefaultInvoicing", + "signature": "func (_m *TaxCode) QueryOrganizationDefaultInvoicing() *OrganizationDefaultTaxCodesQuery", + "line": 400 + }, + { + "kind": "func", + "name": "QueryOrganizationDefaultCreditGrant", + "signature": "func (_m *TaxCode) QueryOrganizationDefaultCreditGrant() *OrganizationDefaultTaxCodesQuery", + "line": 405 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *TaxCode) Update() *TaxCodeUpdateOne", + "line": 412 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *TaxCode) Unwrap() *TaxCode", + "line": 418 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *TaxCode) String() string", + "line": 428 + } + ], + "line_count": 472 + }, + "openmeter/ent/db/taxcode/taxcode.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 194 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 226 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 231 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 236 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 241 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 246 + }, + { + "kind": "func", + "name": "ByName", + "signature": "func ByName(opts ...sql.OrderTermOption) OrderOption", + "line": 251 + }, + { + "kind": "func", + "name": "ByDescription", + "signature": "func ByDescription(opts ...sql.OrderTermOption) OrderOption", + "line": 256 + }, + { + "kind": "func", + "name": "ByKey", + "signature": "func ByKey(opts ...sql.OrderTermOption) OrderOption", + "line": 261 + }, + { + "kind": "func", + "name": "ByAppMappings", + "signature": "func ByAppMappings(opts ...sql.OrderTermOption) OrderOption", + "line": 266 + }, + { + "kind": "func", + "name": "ByBillingWorkflowConfigsCount", + "signature": "func ByBillingWorkflowConfigsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 271 + }, + { + "kind": "func", + "name": "ByBillingWorkflowConfigs", + "signature": "func ByBillingWorkflowConfigs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 278 + }, + { + "kind": "func", + "name": "ByBillingCustomerOverridesCount", + "signature": "func ByBillingCustomerOverridesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 285 + }, + { + "kind": "func", + "name": "ByBillingCustomerOverrides", + "signature": "func ByBillingCustomerOverrides(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 292 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLinesCount", + "signature": "func ByBillingInvoiceLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 299 + }, + { + "kind": "func", + "name": "ByBillingInvoiceLines", + "signature": "func ByBillingInvoiceLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 306 + }, + { + "kind": "func", + "name": "ByBillingInvoiceSplitLineGroupsCount", + "signature": "func ByBillingInvoiceSplitLineGroupsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 313 + }, + { + "kind": "func", + "name": "ByBillingInvoiceSplitLineGroups", + "signature": "func ByBillingInvoiceSplitLineGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 320 + }, + { + "kind": "func", + "name": "ByBillingStandardInvoiceDetailedLinesCount", + "signature": "func ByBillingStandardInvoiceDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 327 + }, + { + "kind": "func", + "name": "ByBillingStandardInvoiceDetailedLines", + "signature": "func ByBillingStandardInvoiceDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 334 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedRunDetailedLinesCount", + "signature": "func ByChargeUsageBasedRunDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 341 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedRunDetailedLines", + "signature": "func ByChargeUsageBasedRunDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 348 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunDetailedLinesCount", + "signature": "func ByChargeFlatFeeRunDetailedLinesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 355 + }, + { + "kind": "func", + "name": "ByChargeFlatFeeRunDetailedLines", + "signature": "func ByChargeFlatFeeRunDetailedLines(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 362 + }, + { + "kind": "func", + "name": "BySubscriptionItemsCount", + "signature": "func BySubscriptionItemsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 369 + }, + { + "kind": "func", + "name": "BySubscriptionItems", + "signature": "func BySubscriptionItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 376 + }, + { + "kind": "func", + "name": "ByPlanRateCardsCount", + "signature": "func ByPlanRateCardsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 383 + }, + { + "kind": "func", + "name": "ByPlanRateCards", + "signature": "func ByPlanRateCards(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 390 + }, + { + "kind": "func", + "name": "ByAddonRateCardsCount", + "signature": "func ByAddonRateCardsCount(opts ...sql.OrderTermOption) OrderOption", + "line": 397 + }, + { + "kind": "func", + "name": "ByAddonRateCards", + "signature": "func ByAddonRateCards(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 404 + }, + { + "kind": "func", + "name": "ByChargeFlatFeesCount", + "signature": "func ByChargeFlatFeesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 411 + }, + { + "kind": "func", + "name": "ByChargeFlatFees", + "signature": "func ByChargeFlatFees(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 418 + }, + { + "kind": "func", + "name": "ByChargeUsageBasedCount", + "signature": "func ByChargeUsageBasedCount(opts ...sql.OrderTermOption) OrderOption", + "line": 425 + }, + { + "kind": "func", + "name": "ByChargeUsageBased", + "signature": "func ByChargeUsageBased(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 432 + }, + { + "kind": "func", + "name": "ByChargeCreditPurchasesCount", + "signature": "func ByChargeCreditPurchasesCount(opts ...sql.OrderTermOption) OrderOption", + "line": 439 + }, + { + "kind": "func", + "name": "ByChargeCreditPurchases", + "signature": "func ByChargeCreditPurchases(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 446 + }, + { + "kind": "func", + "name": "ByOrganizationDefaultInvoicingCount", + "signature": "func ByOrganizationDefaultInvoicingCount(opts ...sql.OrderTermOption) OrderOption", + "line": 453 + }, + { + "kind": "func", + "name": "ByOrganizationDefaultInvoicing", + "signature": "func ByOrganizationDefaultInvoicing(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 460 + }, + { + "kind": "func", + "name": "ByOrganizationDefaultCreditGrantCount", + "signature": "func ByOrganizationDefaultCreditGrantCount(opts ...sql.OrderTermOption) OrderOption", + "line": 467 + }, + { + "kind": "func", + "name": "ByOrganizationDefaultCreditGrant", + "signature": "func ByOrganizationDefaultCreditGrant(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption", + "line": 474 + }, + { + "kind": "func", + "name": "newBillingWorkflowConfigsStep", + "signature": "func newBillingWorkflowConfigsStep() *sqlgraph.Step", + "line": 479 + }, + { + "kind": "func", + "name": "newBillingCustomerOverridesStep", + "signature": "func newBillingCustomerOverridesStep() *sqlgraph.Step", + "line": 486 + }, + { + "kind": "func", + "name": "newBillingInvoiceLinesStep", + "signature": "func newBillingInvoiceLinesStep() *sqlgraph.Step", + "line": 493 + }, + { + "kind": "func", + "name": "newBillingInvoiceSplitLineGroupsStep", + "signature": "func newBillingInvoiceSplitLineGroupsStep() *sqlgraph.Step", + "line": 500 + }, + { + "kind": "func", + "name": "newBillingStandardInvoiceDetailedLinesStep", + "signature": "func newBillingStandardInvoiceDetailedLinesStep() *sqlgraph.Step", + "line": 507 + }, + { + "kind": "func", + "name": "newChargeUsageBasedRunDetailedLinesStep", + "signature": "func newChargeUsageBasedRunDetailedLinesStep() *sqlgraph.Step", + "line": 514 + }, + { + "kind": "func", + "name": "newChargeFlatFeeRunDetailedLinesStep", + "signature": "func newChargeFlatFeeRunDetailedLinesStep() *sqlgraph.Step", + "line": 521 + }, + { + "kind": "func", + "name": "newSubscriptionItemsStep", + "signature": "func newSubscriptionItemsStep() *sqlgraph.Step", + "line": 528 + }, + { + "kind": "func", + "name": "newPlanRateCardsStep", + "signature": "func newPlanRateCardsStep() *sqlgraph.Step", + "line": 535 + }, + { + "kind": "func", + "name": "newAddonRateCardsStep", + "signature": "func newAddonRateCardsStep() *sqlgraph.Step", + "line": 542 + }, + { + "kind": "func", + "name": "newChargeFlatFeesStep", + "signature": "func newChargeFlatFeesStep() *sqlgraph.Step", + "line": 549 + }, + { + "kind": "func", + "name": "newChargeUsageBasedStep", + "signature": "func newChargeUsageBasedStep() *sqlgraph.Step", + "line": 556 + }, + { + "kind": "func", + "name": "newChargeCreditPurchasesStep", + "signature": "func newChargeCreditPurchasesStep() *sqlgraph.Step", + "line": 563 + }, + { + "kind": "func", + "name": "newOrganizationDefaultInvoicingStep", + "signature": "func newOrganizationDefaultInvoicingStep() *sqlgraph.Step", + "line": 570 + }, + { + "kind": "func", + "name": "newOrganizationDefaultCreditGrantStep", + "signature": "func newOrganizationDefaultCreditGrantStep() *sqlgraph.Step", + "line": 577 + } + ], + "line_count": 583 + }, + "openmeter/ent/db/taxcode/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.TaxCode", + "line": 14 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.TaxCode", + "line": 19 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.TaxCode", + "line": 24 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.TaxCode", + "line": 29 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.TaxCode", + "line": 34 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.TaxCode", + "line": 39 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.TaxCode", + "line": 44 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.TaxCode", + "line": 49 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.TaxCode", + "line": 54 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.TaxCode", + "line": 59 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.TaxCode", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.TaxCode", + "line": 69 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.TaxCode", + "line": 74 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.TaxCode", + "line": 79 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.TaxCode", + "line": 84 + }, + { + "kind": "func", + "name": "Name", + "signature": "func Name(v string) predicate.TaxCode", + "line": 89 + }, + { + "kind": "func", + "name": "Description", + "signature": "func Description(v string) predicate.TaxCode", + "line": 94 + }, + { + "kind": "func", + "name": "Key", + "signature": "func Key(v string) predicate.TaxCode", + "line": 99 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.TaxCode", + "line": 104 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.TaxCode", + "line": 109 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.TaxCode", + "line": 114 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.TaxCode", + "line": 119 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.TaxCode", + "line": 124 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.TaxCode", + "line": 129 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.TaxCode", + "line": 134 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.TaxCode", + "line": 139 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.TaxCode", + "line": 144 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.TaxCode", + "line": 149 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.TaxCode", + "line": 154 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.TaxCode", + "line": 159 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.TaxCode", + "line": 164 + }, + { + "kind": "func", + "name": "MetadataIsNil", + "signature": "func MetadataIsNil() predicate.TaxCode", + "line": 169 + }, + { + "kind": "func", + "name": "MetadataNotNil", + "signature": "func MetadataNotNil() predicate.TaxCode", + "line": 174 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.TaxCode", + "line": 179 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.TaxCode", + "line": 184 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.TaxCode", + "line": 189 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.TaxCode", + "line": 194 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.TaxCode", + "line": 199 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.TaxCode", + "line": 204 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.TaxCode", + "line": 209 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.TaxCode", + "line": 214 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.TaxCode", + "line": 219 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.TaxCode", + "line": 224 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.TaxCode", + "line": 229 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.TaxCode", + "line": 234 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.TaxCode", + "line": 239 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.TaxCode", + "line": 244 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.TaxCode", + "line": 249 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.TaxCode", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.TaxCode", + "line": 259 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.TaxCode", + "line": 264 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.TaxCode", + "line": 269 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.TaxCode", + "line": 274 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.TaxCode", + "line": 279 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.TaxCode", + "line": 284 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.TaxCode", + "line": 289 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.TaxCode", + "line": 294 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.TaxCode", + "line": 299 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.TaxCode", + "line": 304 + }, + { + "kind": "func", + "name": "NameEQ", + "signature": "func NameEQ(v string) predicate.TaxCode", + "line": 309 + }, + { + "kind": "func", + "name": "NameNEQ", + "signature": "func NameNEQ(v string) predicate.TaxCode", + "line": 314 + }, + { + "kind": "func", + "name": "NameIn", + "signature": "func NameIn(vs ...string) predicate.TaxCode", + "line": 319 + }, + { + "kind": "func", + "name": "NameNotIn", + "signature": "func NameNotIn(vs ...string) predicate.TaxCode", + "line": 324 + }, + { + "kind": "func", + "name": "NameGT", + "signature": "func NameGT(v string) predicate.TaxCode", + "line": 329 + }, + { + "kind": "func", + "name": "NameGTE", + "signature": "func NameGTE(v string) predicate.TaxCode", + "line": 334 + }, + { + "kind": "func", + "name": "NameLT", + "signature": "func NameLT(v string) predicate.TaxCode", + "line": 339 + }, + { + "kind": "func", + "name": "NameLTE", + "signature": "func NameLTE(v string) predicate.TaxCode", + "line": 344 + }, + { + "kind": "func", + "name": "NameContains", + "signature": "func NameContains(v string) predicate.TaxCode", + "line": 349 + }, + { + "kind": "func", + "name": "NameHasPrefix", + "signature": "func NameHasPrefix(v string) predicate.TaxCode", + "line": 354 + }, + { + "kind": "func", + "name": "NameHasSuffix", + "signature": "func NameHasSuffix(v string) predicate.TaxCode", + "line": 359 + }, + { + "kind": "func", + "name": "NameEqualFold", + "signature": "func NameEqualFold(v string) predicate.TaxCode", + "line": 364 + }, + { + "kind": "func", + "name": "NameContainsFold", + "signature": "func NameContainsFold(v string) predicate.TaxCode", + "line": 369 + }, + { + "kind": "func", + "name": "DescriptionEQ", + "signature": "func DescriptionEQ(v string) predicate.TaxCode", + "line": 374 + }, + { + "kind": "func", + "name": "DescriptionNEQ", + "signature": "func DescriptionNEQ(v string) predicate.TaxCode", + "line": 379 + }, + { + "kind": "func", + "name": "DescriptionIn", + "signature": "func DescriptionIn(vs ...string) predicate.TaxCode", + "line": 384 + }, + { + "kind": "func", + "name": "DescriptionNotIn", + "signature": "func DescriptionNotIn(vs ...string) predicate.TaxCode", + "line": 389 + }, + { + "kind": "func", + "name": "DescriptionGT", + "signature": "func DescriptionGT(v string) predicate.TaxCode", + "line": 394 + }, + { + "kind": "func", + "name": "DescriptionGTE", + "signature": "func DescriptionGTE(v string) predicate.TaxCode", + "line": 399 + }, + { + "kind": "func", + "name": "DescriptionLT", + "signature": "func DescriptionLT(v string) predicate.TaxCode", + "line": 404 + }, + { + "kind": "func", + "name": "DescriptionLTE", + "signature": "func DescriptionLTE(v string) predicate.TaxCode", + "line": 409 + }, + { + "kind": "func", + "name": "DescriptionContains", + "signature": "func DescriptionContains(v string) predicate.TaxCode", + "line": 414 + }, + { + "kind": "func", + "name": "DescriptionHasPrefix", + "signature": "func DescriptionHasPrefix(v string) predicate.TaxCode", + "line": 419 + }, + { + "kind": "func", + "name": "DescriptionHasSuffix", + "signature": "func DescriptionHasSuffix(v string) predicate.TaxCode", + "line": 424 + }, + { + "kind": "func", + "name": "DescriptionIsNil", + "signature": "func DescriptionIsNil() predicate.TaxCode", + "line": 429 + }, + { + "kind": "func", + "name": "DescriptionNotNil", + "signature": "func DescriptionNotNil() predicate.TaxCode", + "line": 434 + }, + { + "kind": "func", + "name": "DescriptionEqualFold", + "signature": "func DescriptionEqualFold(v string) predicate.TaxCode", + "line": 439 + }, + { + "kind": "func", + "name": "DescriptionContainsFold", + "signature": "func DescriptionContainsFold(v string) predicate.TaxCode", + "line": 444 + }, + { + "kind": "func", + "name": "KeyEQ", + "signature": "func KeyEQ(v string) predicate.TaxCode", + "line": 449 + }, + { + "kind": "func", + "name": "KeyNEQ", + "signature": "func KeyNEQ(v string) predicate.TaxCode", + "line": 454 + }, + { + "kind": "func", + "name": "KeyIn", + "signature": "func KeyIn(vs ...string) predicate.TaxCode", + "line": 459 + }, + { + "kind": "func", + "name": "KeyNotIn", + "signature": "func KeyNotIn(vs ...string) predicate.TaxCode", + "line": 464 + }, + { + "kind": "func", + "name": "KeyGT", + "signature": "func KeyGT(v string) predicate.TaxCode", + "line": 469 + }, + { + "kind": "func", + "name": "KeyGTE", + "signature": "func KeyGTE(v string) predicate.TaxCode", + "line": 474 + }, + { + "kind": "func", + "name": "KeyLT", + "signature": "func KeyLT(v string) predicate.TaxCode", + "line": 479 + }, + { + "kind": "func", + "name": "KeyLTE", + "signature": "func KeyLTE(v string) predicate.TaxCode", + "line": 484 + }, + { + "kind": "func", + "name": "KeyContains", + "signature": "func KeyContains(v string) predicate.TaxCode", + "line": 489 + }, + { + "kind": "func", + "name": "KeyHasPrefix", + "signature": "func KeyHasPrefix(v string) predicate.TaxCode", + "line": 494 + }, + { + "kind": "func", + "name": "KeyHasSuffix", + "signature": "func KeyHasSuffix(v string) predicate.TaxCode", + "line": 499 + }, + { + "kind": "func", + "name": "KeyEqualFold", + "signature": "func KeyEqualFold(v string) predicate.TaxCode", + "line": 504 + }, + { + "kind": "func", + "name": "KeyContainsFold", + "signature": "func KeyContainsFold(v string) predicate.TaxCode", + "line": 509 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.TaxCode", + "line": 514 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.TaxCode", + "line": 519 + }, + { + "kind": "func", + "name": "AppMappingsIsNil", + "signature": "func AppMappingsIsNil() predicate.TaxCode", + "line": 524 + }, + { + "kind": "func", + "name": "AppMappingsNotNil", + "signature": "func AppMappingsNotNil() predicate.TaxCode", + "line": 529 + }, + { + "kind": "func", + "name": "HasBillingWorkflowConfigs", + "signature": "func HasBillingWorkflowConfigs() predicate.TaxCode", + "line": 534 + }, + { + "kind": "func", + "name": "HasBillingWorkflowConfigsWith", + "signature": "func HasBillingWorkflowConfigsWith(preds ...predicate.BillingWorkflowConfig) predicate.TaxCode", + "line": 545 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverrides", + "signature": "func HasBillingCustomerOverrides() predicate.TaxCode", + "line": 557 + }, + { + "kind": "func", + "name": "HasBillingCustomerOverridesWith", + "signature": "func HasBillingCustomerOverridesWith(preds ...predicate.BillingCustomerOverride) predicate.TaxCode", + "line": 568 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLines", + "signature": "func HasBillingInvoiceLines() predicate.TaxCode", + "line": 580 + }, + { + "kind": "func", + "name": "HasBillingInvoiceLinesWith", + "signature": "func HasBillingInvoiceLinesWith(preds ...predicate.BillingInvoiceLine) predicate.TaxCode", + "line": 591 + }, + { + "kind": "func", + "name": "HasBillingInvoiceSplitLineGroups", + "signature": "func HasBillingInvoiceSplitLineGroups() predicate.TaxCode", + "line": 603 + }, + { + "kind": "func", + "name": "HasBillingInvoiceSplitLineGroupsWith", + "signature": "func HasBillingInvoiceSplitLineGroupsWith(preds ...predicate.BillingInvoiceSplitLineGroup) predicate.TaxCode", + "line": 614 + }, + { + "kind": "func", + "name": "HasBillingStandardInvoiceDetailedLines", + "signature": "func HasBillingStandardInvoiceDetailedLines() predicate.TaxCode", + "line": 626 + }, + { + "kind": "func", + "name": "HasBillingStandardInvoiceDetailedLinesWith", + "signature": "func HasBillingStandardInvoiceDetailedLinesWith(preds ...predicate.BillingStandardInvoiceDetailedLine) predicate.TaxCode", + "line": 637 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRunDetailedLines", + "signature": "func HasChargeUsageBasedRunDetailedLines() predicate.TaxCode", + "line": 649 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedRunDetailedLinesWith", + "signature": "func HasChargeUsageBasedRunDetailedLinesWith(preds ...predicate.ChargeUsageBasedRunDetailedLine) predicate.TaxCode", + "line": 660 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunDetailedLines", + "signature": "func HasChargeFlatFeeRunDetailedLines() predicate.TaxCode", + "line": 672 + }, + { + "kind": "func", + "name": "HasChargeFlatFeeRunDetailedLinesWith", + "signature": "func HasChargeFlatFeeRunDetailedLinesWith(preds ...predicate.ChargeFlatFeeRunDetailedLine) predicate.TaxCode", + "line": 683 + }, + { + "kind": "func", + "name": "HasSubscriptionItems", + "signature": "func HasSubscriptionItems() predicate.TaxCode", + "line": 695 + }, + { + "kind": "func", + "name": "HasSubscriptionItemsWith", + "signature": "func HasSubscriptionItemsWith(preds ...predicate.SubscriptionItem) predicate.TaxCode", + "line": 706 + }, + { + "kind": "func", + "name": "HasPlanRateCards", + "signature": "func HasPlanRateCards() predicate.TaxCode", + "line": 718 + }, + { + "kind": "func", + "name": "HasPlanRateCardsWith", + "signature": "func HasPlanRateCardsWith(preds ...predicate.PlanRateCard) predicate.TaxCode", + "line": 729 + }, + { + "kind": "func", + "name": "HasAddonRateCards", + "signature": "func HasAddonRateCards() predicate.TaxCode", + "line": 741 + }, + { + "kind": "func", + "name": "HasAddonRateCardsWith", + "signature": "func HasAddonRateCardsWith(preds ...predicate.AddonRateCard) predicate.TaxCode", + "line": 752 + }, + { + "kind": "func", + "name": "HasChargeFlatFees", + "signature": "func HasChargeFlatFees() predicate.TaxCode", + "line": 764 + }, + { + "kind": "func", + "name": "HasChargeFlatFeesWith", + "signature": "func HasChargeFlatFeesWith(preds ...predicate.ChargeFlatFee) predicate.TaxCode", + "line": 775 + }, + { + "kind": "func", + "name": "HasChargeUsageBased", + "signature": "func HasChargeUsageBased() predicate.TaxCode", + "line": 787 + }, + { + "kind": "func", + "name": "HasChargeUsageBasedWith", + "signature": "func HasChargeUsageBasedWith(preds ...predicate.ChargeUsageBased) predicate.TaxCode", + "line": 798 + }, + { + "kind": "func", + "name": "HasChargeCreditPurchases", + "signature": "func HasChargeCreditPurchases() predicate.TaxCode", + "line": 810 + }, + { + "kind": "func", + "name": "HasChargeCreditPurchasesWith", + "signature": "func HasChargeCreditPurchasesWith(preds ...predicate.ChargeCreditPurchase) predicate.TaxCode", + "line": 821 + }, + { + "kind": "func", + "name": "HasOrganizationDefaultInvoicing", + "signature": "func HasOrganizationDefaultInvoicing() predicate.TaxCode", + "line": 833 + }, + { + "kind": "func", + "name": "HasOrganizationDefaultInvoicingWith", + "signature": "func HasOrganizationDefaultInvoicingWith(preds ...predicate.OrganizationDefaultTaxCodes) predicate.TaxCode", + "line": 844 + }, + { + "kind": "func", + "name": "HasOrganizationDefaultCreditGrant", + "signature": "func HasOrganizationDefaultCreditGrant() predicate.TaxCode", + "line": 856 + }, + { + "kind": "func", + "name": "HasOrganizationDefaultCreditGrantWith", + "signature": "func HasOrganizationDefaultCreditGrantWith(preds ...predicate.OrganizationDefaultTaxCodes) predicate.TaxCode", + "line": 867 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.TaxCode) predicate.TaxCode", + "line": 879 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.TaxCode) predicate.TaxCode", + "line": 884 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.TaxCode) predicate.TaxCode", + "line": 889 + } + ], + "line_count": 891 + }, + "openmeter/ent/db/taxcode_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeCreate", + "signature": "type TaxCodeCreate struct", + "line": 35 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *TaxCodeCreate) SetNamespace(v string) *TaxCodeCreate", + "line": 43 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_c *TaxCodeCreate) SetMetadata(v map[string]string) *TaxCodeCreate", + "line": 49 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *TaxCodeCreate) SetCreatedAt(v time.Time) *TaxCodeCreate", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *TaxCodeCreate) SetNillableCreatedAt(v *time.Time) *TaxCodeCreate", + "line": 61 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *TaxCodeCreate) SetUpdatedAt(v time.Time) *TaxCodeCreate", + "line": 69 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *TaxCodeCreate) SetNillableUpdatedAt(v *time.Time) *TaxCodeCreate", + "line": 75 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *TaxCodeCreate) SetDeletedAt(v time.Time) *TaxCodeCreate", + "line": 83 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *TaxCodeCreate) SetNillableDeletedAt(v *time.Time) *TaxCodeCreate", + "line": 89 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_c *TaxCodeCreate) SetName(v string) *TaxCodeCreate", + "line": 97 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_c *TaxCodeCreate) SetDescription(v string) *TaxCodeCreate", + "line": 103 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_c *TaxCodeCreate) SetNillableDescription(v *string) *TaxCodeCreate", + "line": 109 + }, + { + "kind": "func", + "name": "SetKey", + "signature": "func (_c *TaxCodeCreate) SetKey(v string) *TaxCodeCreate", + "line": 117 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *TaxCodeCreate) SetAnnotations(v models.Annotations) *TaxCodeCreate", + "line": 123 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (_c *TaxCodeCreate) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeCreate", + "line": 129 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *TaxCodeCreate) SetID(v string) *TaxCodeCreate", + "line": 135 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *TaxCodeCreate) SetNillableID(v *string) *TaxCodeCreate", + "line": 141 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigIDs", + "signature": "func (_c *TaxCodeCreate) AddBillingWorkflowConfigIDs(ids ...string) *TaxCodeCreate", + "line": 149 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigs", + "signature": "func (_c *TaxCodeCreate) AddBillingWorkflowConfigs(v ...*BillingWorkflowConfig) *TaxCodeCreate", + "line": 155 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_c *TaxCodeCreate) AddBillingCustomerOverrideIDs(ids ...string) *TaxCodeCreate", + "line": 164 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrides", + "signature": "func (_c *TaxCodeCreate) AddBillingCustomerOverrides(v ...*BillingCustomerOverride) *TaxCodeCreate", + "line": 170 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_c *TaxCodeCreate) AddBillingInvoiceLineIDs(ids ...string) *TaxCodeCreate", + "line": 179 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_c *TaxCodeCreate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *TaxCodeCreate", + "line": 185 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroupIDs", + "signature": "func (_c *TaxCodeCreate) AddBillingInvoiceSplitLineGroupIDs(ids ...string) *TaxCodeCreate", + "line": 194 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroups", + "signature": "func (_c *TaxCodeCreate) AddBillingInvoiceSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *TaxCodeCreate", + "line": 200 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLineIDs", + "signature": "func (_c *TaxCodeCreate) AddBillingStandardInvoiceDetailedLineIDs(ids ...string) *TaxCodeCreate", + "line": 209 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLines", + "signature": "func (_c *TaxCodeCreate) AddBillingStandardInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *TaxCodeCreate", + "line": 215 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLineIDs", + "signature": "func (_c *TaxCodeCreate) AddChargeUsageBasedRunDetailedLineIDs(ids ...string) *TaxCodeCreate", + "line": 224 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLines", + "signature": "func (_c *TaxCodeCreate) AddChargeUsageBasedRunDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *TaxCodeCreate", + "line": 230 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLineIDs", + "signature": "func (_c *TaxCodeCreate) AddChargeFlatFeeRunDetailedLineIDs(ids ...string) *TaxCodeCreate", + "line": 239 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLines", + "signature": "func (_c *TaxCodeCreate) AddChargeFlatFeeRunDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *TaxCodeCreate", + "line": 245 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_c *TaxCodeCreate) AddSubscriptionItemIDs(ids ...string) *TaxCodeCreate", + "line": 254 + }, + { + "kind": "func", + "name": "AddSubscriptionItems", + "signature": "func (_c *TaxCodeCreate) AddSubscriptionItems(v ...*SubscriptionItem) *TaxCodeCreate", + "line": 260 + }, + { + "kind": "func", + "name": "AddPlanRateCardIDs", + "signature": "func (_c *TaxCodeCreate) AddPlanRateCardIDs(ids ...string) *TaxCodeCreate", + "line": 269 + }, + { + "kind": "func", + "name": "AddPlanRateCards", + "signature": "func (_c *TaxCodeCreate) AddPlanRateCards(v ...*PlanRateCard) *TaxCodeCreate", + "line": 275 + }, + { + "kind": "func", + "name": "AddAddonRateCardIDs", + "signature": "func (_c *TaxCodeCreate) AddAddonRateCardIDs(ids ...string) *TaxCodeCreate", + "line": 284 + }, + { + "kind": "func", + "name": "AddAddonRateCards", + "signature": "func (_c *TaxCodeCreate) AddAddonRateCards(v ...*AddonRateCard) *TaxCodeCreate", + "line": 290 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeIDs", + "signature": "func (_c *TaxCodeCreate) AddChargeFlatFeeIDs(ids ...string) *TaxCodeCreate", + "line": 299 + }, + { + "kind": "func", + "name": "AddChargeFlatFees", + "signature": "func (_c *TaxCodeCreate) AddChargeFlatFees(v ...*ChargeFlatFee) *TaxCodeCreate", + "line": 305 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedIDs", + "signature": "func (_c *TaxCodeCreate) AddChargeUsageBasedIDs(ids ...string) *TaxCodeCreate", + "line": 314 + }, + { + "kind": "func", + "name": "AddChargeUsageBased", + "signature": "func (_c *TaxCodeCreate) AddChargeUsageBased(v ...*ChargeUsageBased) *TaxCodeCreate", + "line": 320 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchaseIDs", + "signature": "func (_c *TaxCodeCreate) AddChargeCreditPurchaseIDs(ids ...string) *TaxCodeCreate", + "line": 329 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchases", + "signature": "func (_c *TaxCodeCreate) AddChargeCreditPurchases(v ...*ChargeCreditPurchase) *TaxCodeCreate", + "line": 335 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicingIDs", + "signature": "func (_c *TaxCodeCreate) AddOrganizationDefaultInvoicingIDs(ids ...string) *TaxCodeCreate", + "line": 344 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicing", + "signature": "func (_c *TaxCodeCreate) AddOrganizationDefaultInvoicing(v ...*OrganizationDefaultTaxCodes) *TaxCodeCreate", + "line": 350 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrantIDs", + "signature": "func (_c *TaxCodeCreate) AddOrganizationDefaultCreditGrantIDs(ids ...string) *TaxCodeCreate", + "line": 359 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrant", + "signature": "func (_c *TaxCodeCreate) AddOrganizationDefaultCreditGrant(v ...*OrganizationDefaultTaxCodes) *TaxCodeCreate", + "line": 365 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *TaxCodeCreate) Mutation() *TaxCodeMutation", + "line": 374 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *TaxCodeCreate) Save(ctx context.Context) (*TaxCode, error)", + "line": 379 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *TaxCodeCreate) SaveX(ctx context.Context) *TaxCode", + "line": 385 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *TaxCodeCreate) Exec(ctx context.Context) error", + "line": 394 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *TaxCodeCreate) ExecX(ctx context.Context)", + "line": 400 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *TaxCodeCreate) defaults()", + "line": 407 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *TaxCodeCreate) check() error", + "line": 423 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *TaxCodeCreate) sqlSave(ctx context.Context) (*TaxCode, error)", + "line": 457 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *TaxCodeCreate) createSpec() (*TaxCode, *sqlgraph.CreateSpec, error)", + "line": 483 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *TaxCodeCreate) OnConflict(opts ...sql.ConflictOption) *TaxCodeUpsertOne", + "line": 796 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *TaxCodeCreate) OnConflictColumns(columns ...string) *TaxCodeUpsertOne", + "line": 809 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *TaxCodeUpsert) SetMetadata(v map[string]string) *TaxCodeUpsert", + "line": 830 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *TaxCodeUpsert) UpdateMetadata() *TaxCodeUpsert", + "line": 836 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *TaxCodeUpsert) ClearMetadata() *TaxCodeUpsert", + "line": 842 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *TaxCodeUpsert) SetUpdatedAt(v time.Time) *TaxCodeUpsert", + "line": 848 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *TaxCodeUpsert) UpdateUpdatedAt() *TaxCodeUpsert", + "line": 854 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *TaxCodeUpsert) SetDeletedAt(v time.Time) *TaxCodeUpsert", + "line": 860 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *TaxCodeUpsert) UpdateDeletedAt() *TaxCodeUpsert", + "line": 866 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *TaxCodeUpsert) ClearDeletedAt() *TaxCodeUpsert", + "line": 872 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *TaxCodeUpsert) SetName(v string) *TaxCodeUpsert", + "line": 878 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *TaxCodeUpsert) UpdateName() *TaxCodeUpsert", + "line": 884 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *TaxCodeUpsert) SetDescription(v string) *TaxCodeUpsert", + "line": 890 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *TaxCodeUpsert) UpdateDescription() *TaxCodeUpsert", + "line": 896 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *TaxCodeUpsert) ClearDescription() *TaxCodeUpsert", + "line": 902 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *TaxCodeUpsert) SetAnnotations(v models.Annotations) *TaxCodeUpsert", + "line": 908 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *TaxCodeUpsert) UpdateAnnotations() *TaxCodeUpsert", + "line": 914 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *TaxCodeUpsert) ClearAnnotations() *TaxCodeUpsert", + "line": 920 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (u *TaxCodeUpsert) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeUpsert", + "line": 926 + }, + { + "kind": "func", + "name": "UpdateAppMappings", + "signature": "func (u *TaxCodeUpsert) UpdateAppMappings() *TaxCodeUpsert", + "line": 932 + }, + { + "kind": "func", + "name": "ClearAppMappings", + "signature": "func (u *TaxCodeUpsert) ClearAppMappings() *TaxCodeUpsert", + "line": 938 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *TaxCodeUpsertOne) UpdateNewValues() *TaxCodeUpsertOne", + "line": 954 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *TaxCodeUpsertOne) Ignore() *TaxCodeUpsertOne", + "line": 979 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *TaxCodeUpsertOne) DoNothing() *TaxCodeUpsertOne", + "line": 986 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *TaxCodeUpsertOne) Update(set func(*TaxCodeUpsert)) *TaxCodeUpsertOne", + "line": 993 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *TaxCodeUpsertOne) SetMetadata(v map[string]string) *TaxCodeUpsertOne", + "line": 1001 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *TaxCodeUpsertOne) UpdateMetadata() *TaxCodeUpsertOne", + "line": 1008 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *TaxCodeUpsertOne) ClearMetadata() *TaxCodeUpsertOne", + "line": 1015 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *TaxCodeUpsertOne) SetUpdatedAt(v time.Time) *TaxCodeUpsertOne", + "line": 1022 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *TaxCodeUpsertOne) UpdateUpdatedAt() *TaxCodeUpsertOne", + "line": 1029 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *TaxCodeUpsertOne) SetDeletedAt(v time.Time) *TaxCodeUpsertOne", + "line": 1036 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *TaxCodeUpsertOne) UpdateDeletedAt() *TaxCodeUpsertOne", + "line": 1043 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *TaxCodeUpsertOne) ClearDeletedAt() *TaxCodeUpsertOne", + "line": 1050 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *TaxCodeUpsertOne) SetName(v string) *TaxCodeUpsertOne", + "line": 1057 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *TaxCodeUpsertOne) UpdateName() *TaxCodeUpsertOne", + "line": 1064 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *TaxCodeUpsertOne) SetDescription(v string) *TaxCodeUpsertOne", + "line": 1071 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *TaxCodeUpsertOne) UpdateDescription() *TaxCodeUpsertOne", + "line": 1078 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *TaxCodeUpsertOne) ClearDescription() *TaxCodeUpsertOne", + "line": 1085 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *TaxCodeUpsertOne) SetAnnotations(v models.Annotations) *TaxCodeUpsertOne", + "line": 1092 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *TaxCodeUpsertOne) UpdateAnnotations() *TaxCodeUpsertOne", + "line": 1099 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *TaxCodeUpsertOne) ClearAnnotations() *TaxCodeUpsertOne", + "line": 1106 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (u *TaxCodeUpsertOne) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeUpsertOne", + "line": 1113 + }, + { + "kind": "func", + "name": "UpdateAppMappings", + "signature": "func (u *TaxCodeUpsertOne) UpdateAppMappings() *TaxCodeUpsertOne", + "line": 1120 + }, + { + "kind": "func", + "name": "ClearAppMappings", + "signature": "func (u *TaxCodeUpsertOne) ClearAppMappings() *TaxCodeUpsertOne", + "line": 1127 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *TaxCodeUpsertOne) Exec(ctx context.Context) error", + "line": 1134 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *TaxCodeUpsertOne) ExecX(ctx context.Context)", + "line": 1142 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *TaxCodeUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 1149 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *TaxCodeUpsertOne) IDX(ctx context.Context) string", + "line": 1163 + }, + { + "kind": "struct", + "name": "TaxCodeCreateBulk", + "signature": "type TaxCodeCreateBulk struct", + "line": 1172 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *TaxCodeCreateBulk) Save(ctx context.Context) ([]*TaxCode, error)", + "line": 1180 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *TaxCodeCreateBulk) SaveX(ctx context.Context) []*TaxCode", + "line": 1239 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *TaxCodeCreateBulk) Exec(ctx context.Context) error", + "line": 1248 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *TaxCodeCreateBulk) ExecX(ctx context.Context)", + "line": 1254 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *TaxCodeCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaxCodeUpsertBulk", + "line": 1275 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *TaxCodeCreateBulk) OnConflictColumns(columns ...string) *TaxCodeUpsertBulk", + "line": 1288 + }, + { + "kind": "struct", + "name": "TaxCodeUpsertBulk", + "signature": "type TaxCodeUpsertBulk struct", + "line": 1297 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *TaxCodeUpsertBulk) UpdateNewValues() *TaxCodeUpsertBulk", + "line": 1312 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *TaxCodeUpsertBulk) Ignore() *TaxCodeUpsertBulk", + "line": 1339 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *TaxCodeUpsertBulk) DoNothing() *TaxCodeUpsertBulk", + "line": 1346 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *TaxCodeUpsertBulk) Update(set func(*TaxCodeUpsert)) *TaxCodeUpsertBulk", + "line": 1353 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (u *TaxCodeUpsertBulk) SetMetadata(v map[string]string) *TaxCodeUpsertBulk", + "line": 1361 + }, + { + "kind": "func", + "name": "UpdateMetadata", + "signature": "func (u *TaxCodeUpsertBulk) UpdateMetadata() *TaxCodeUpsertBulk", + "line": 1368 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (u *TaxCodeUpsertBulk) ClearMetadata() *TaxCodeUpsertBulk", + "line": 1375 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *TaxCodeUpsertBulk) SetUpdatedAt(v time.Time) *TaxCodeUpsertBulk", + "line": 1382 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *TaxCodeUpsertBulk) UpdateUpdatedAt() *TaxCodeUpsertBulk", + "line": 1389 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *TaxCodeUpsertBulk) SetDeletedAt(v time.Time) *TaxCodeUpsertBulk", + "line": 1396 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *TaxCodeUpsertBulk) UpdateDeletedAt() *TaxCodeUpsertBulk", + "line": 1403 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *TaxCodeUpsertBulk) ClearDeletedAt() *TaxCodeUpsertBulk", + "line": 1410 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (u *TaxCodeUpsertBulk) SetName(v string) *TaxCodeUpsertBulk", + "line": 1417 + }, + { + "kind": "func", + "name": "UpdateName", + "signature": "func (u *TaxCodeUpsertBulk) UpdateName() *TaxCodeUpsertBulk", + "line": 1424 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (u *TaxCodeUpsertBulk) SetDescription(v string) *TaxCodeUpsertBulk", + "line": 1431 + }, + { + "kind": "func", + "name": "UpdateDescription", + "signature": "func (u *TaxCodeUpsertBulk) UpdateDescription() *TaxCodeUpsertBulk", + "line": 1438 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (u *TaxCodeUpsertBulk) ClearDescription() *TaxCodeUpsertBulk", + "line": 1445 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *TaxCodeUpsertBulk) SetAnnotations(v models.Annotations) *TaxCodeUpsertBulk", + "line": 1452 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *TaxCodeUpsertBulk) UpdateAnnotations() *TaxCodeUpsertBulk", + "line": 1459 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *TaxCodeUpsertBulk) ClearAnnotations() *TaxCodeUpsertBulk", + "line": 1466 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (u *TaxCodeUpsertBulk) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeUpsertBulk", + "line": 1473 + }, + { + "kind": "func", + "name": "UpdateAppMappings", + "signature": "func (u *TaxCodeUpsertBulk) UpdateAppMappings() *TaxCodeUpsertBulk", + "line": 1480 + }, + { + "kind": "func", + "name": "ClearAppMappings", + "signature": "func (u *TaxCodeUpsertBulk) ClearAppMappings() *TaxCodeUpsertBulk", + "line": 1487 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *TaxCodeUpsertBulk) Exec(ctx context.Context) error", + "line": 1494 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *TaxCodeUpsertBulk) ExecX(ctx context.Context)", + "line": 1510 + } + ], + "line_count": 1514 + }, + "openmeter/ent/db/taxcode_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeDelete", + "signature": "type TaxCodeDelete struct", + "line": 17 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *TaxCodeDelete) Where(ps ...predicate.TaxCode) *TaxCodeDelete", + "line": 24 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *TaxCodeDelete) Exec(ctx context.Context) (int, error)", + "line": 30 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *TaxCodeDelete) ExecX(ctx context.Context) int", + "line": 35 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *TaxCodeDelete) sqlExec(ctx context.Context) (int, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "TaxCodeDeleteOne", + "signature": "type TaxCodeDeleteOne struct", + "line": 61 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *TaxCodeDeleteOne) Where(ps ...predicate.TaxCode) *TaxCodeDeleteOne", + "line": 66 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *TaxCodeDeleteOne) Exec(ctx context.Context) error", + "line": 72 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *TaxCodeDeleteOne) ExecX(ctx context.Context)", + "line": 85 + } + ], + "line_count": 89 + }, + "openmeter/ent/db/taxcode_query.go": { + "header": "\t\"context\"\n\t\"database/sql/driver\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeQuery", + "signature": "type TaxCodeQuery struct", + "line": 35 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *TaxCodeQuery) Where(ps ...predicate.TaxCode) *TaxCodeQuery", + "line": 63 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *TaxCodeQuery) Limit(limit int) *TaxCodeQuery", + "line": 69 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *TaxCodeQuery) Offset(offset int) *TaxCodeQuery", + "line": 75 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *TaxCodeQuery) Unique(unique bool) *TaxCodeQuery", + "line": 82 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *TaxCodeQuery) Order(o ...dbtaxcode.OrderOption) *TaxCodeQuery", + "line": 88 + }, + { + "kind": "func", + "name": "QueryBillingWorkflowConfigs", + "signature": "func (_q *TaxCodeQuery) QueryBillingWorkflowConfigs() *BillingWorkflowConfigQuery", + "line": 94 + }, + { + "kind": "func", + "name": "QueryBillingCustomerOverrides", + "signature": "func (_q *TaxCodeQuery) QueryBillingCustomerOverrides() *BillingCustomerOverrideQuery", + "line": 116 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceLines", + "signature": "func (_q *TaxCodeQuery) QueryBillingInvoiceLines() *BillingInvoiceLineQuery", + "line": 138 + }, + { + "kind": "func", + "name": "QueryBillingInvoiceSplitLineGroups", + "signature": "func (_q *TaxCodeQuery) QueryBillingInvoiceSplitLineGroups() *BillingInvoiceSplitLineGroupQuery", + "line": 160 + }, + { + "kind": "func", + "name": "QueryBillingStandardInvoiceDetailedLines", + "signature": "func (_q *TaxCodeQuery) QueryBillingStandardInvoiceDetailedLines() *BillingStandardInvoiceDetailedLineQuery", + "line": 182 + }, + { + "kind": "func", + "name": "QueryChargeUsageBasedRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) QueryChargeUsageBasedRunDetailedLines() *ChargeUsageBasedRunDetailedLineQuery", + "line": 204 + }, + { + "kind": "func", + "name": "QueryChargeFlatFeeRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) QueryChargeFlatFeeRunDetailedLines() *ChargeFlatFeeRunDetailedLineQuery", + "line": 226 + }, + { + "kind": "func", + "name": "QuerySubscriptionItems", + "signature": "func (_q *TaxCodeQuery) QuerySubscriptionItems() *SubscriptionItemQuery", + "line": 248 + }, + { + "kind": "func", + "name": "QueryPlanRateCards", + "signature": "func (_q *TaxCodeQuery) QueryPlanRateCards() *PlanRateCardQuery", + "line": 270 + }, + { + "kind": "func", + "name": "QueryAddonRateCards", + "signature": "func (_q *TaxCodeQuery) QueryAddonRateCards() *AddonRateCardQuery", + "line": 292 + }, + { + "kind": "func", + "name": "QueryChargeFlatFees", + "signature": "func (_q *TaxCodeQuery) QueryChargeFlatFees() *ChargeFlatFeeQuery", + "line": 314 + }, + { + "kind": "func", + "name": "QueryChargeUsageBased", + "signature": "func (_q *TaxCodeQuery) QueryChargeUsageBased() *ChargeUsageBasedQuery", + "line": 336 + }, + { + "kind": "func", + "name": "QueryChargeCreditPurchases", + "signature": "func (_q *TaxCodeQuery) QueryChargeCreditPurchases() *ChargeCreditPurchaseQuery", + "line": 358 + }, + { + "kind": "func", + "name": "QueryOrganizationDefaultInvoicing", + "signature": "func (_q *TaxCodeQuery) QueryOrganizationDefaultInvoicing() *OrganizationDefaultTaxCodesQuery", + "line": 380 + }, + { + "kind": "func", + "name": "QueryOrganizationDefaultCreditGrant", + "signature": "func (_q *TaxCodeQuery) QueryOrganizationDefaultCreditGrant() *OrganizationDefaultTaxCodesQuery", + "line": 402 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *TaxCodeQuery) First(ctx context.Context) (*TaxCode, error)", + "line": 425 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *TaxCodeQuery) FirstX(ctx context.Context) *TaxCode", + "line": 437 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *TaxCodeQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 447 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *TaxCodeQuery) FirstIDX(ctx context.Context) string", + "line": 460 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *TaxCodeQuery) Only(ctx context.Context) (*TaxCode, error)", + "line": 471 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *TaxCodeQuery) OnlyX(ctx context.Context) *TaxCode", + "line": 487 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *TaxCodeQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 498 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *TaxCodeQuery) OnlyIDX(ctx context.Context) string", + "line": 515 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *TaxCodeQuery) All(ctx context.Context) ([]*TaxCode, error)", + "line": 524 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *TaxCodeQuery) AllX(ctx context.Context) []*TaxCode", + "line": 534 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *TaxCodeQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 543 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *TaxCodeQuery) IDsX(ctx context.Context) []string", + "line": 555 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *TaxCodeQuery) Count(ctx context.Context) (int, error)", + "line": 564 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *TaxCodeQuery) CountX(ctx context.Context) int", + "line": 573 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *TaxCodeQuery) Exist(ctx context.Context) (bool, error)", + "line": 582 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *TaxCodeQuery) ExistX(ctx context.Context) bool", + "line": 595 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *TaxCodeQuery) Clone() *TaxCodeQuery", + "line": 605 + }, + { + "kind": "func", + "name": "WithBillingWorkflowConfigs", + "signature": "func (_q *TaxCodeQuery) WithBillingWorkflowConfigs(opts ...func(*BillingWorkflowConfigQuery)) *TaxCodeQuery", + "line": 638 + }, + { + "kind": "func", + "name": "WithBillingCustomerOverrides", + "signature": "func (_q *TaxCodeQuery) WithBillingCustomerOverrides(opts ...func(*BillingCustomerOverrideQuery)) *TaxCodeQuery", + "line": 649 + }, + { + "kind": "func", + "name": "WithBillingInvoiceLines", + "signature": "func (_q *TaxCodeQuery) WithBillingInvoiceLines(opts ...func(*BillingInvoiceLineQuery)) *TaxCodeQuery", + "line": 660 + }, + { + "kind": "func", + "name": "WithBillingInvoiceSplitLineGroups", + "signature": "func (_q *TaxCodeQuery) WithBillingInvoiceSplitLineGroups(opts ...func(*BillingInvoiceSplitLineGroupQuery)) *TaxCodeQuery", + "line": 671 + }, + { + "kind": "func", + "name": "WithBillingStandardInvoiceDetailedLines", + "signature": "func (_q *TaxCodeQuery) WithBillingStandardInvoiceDetailedLines(opts ...func(*BillingStandardInvoiceDetailedLineQuery)) *TaxCodeQuery", + "line": 682 + }, + { + "kind": "func", + "name": "WithChargeUsageBasedRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) WithChargeUsageBasedRunDetailedLines(opts ...func(*ChargeUsageBasedRunDetailedLineQuery)) *TaxCodeQuery", + "line": 693 + }, + { + "kind": "func", + "name": "WithChargeFlatFeeRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) WithChargeFlatFeeRunDetailedLines(opts ...func(*ChargeFlatFeeRunDetailedLineQuery)) *TaxCodeQuery", + "line": 704 + }, + { + "kind": "func", + "name": "WithSubscriptionItems", + "signature": "func (_q *TaxCodeQuery) WithSubscriptionItems(opts ...func(*SubscriptionItemQuery)) *TaxCodeQuery", + "line": 715 + }, + { + "kind": "func", + "name": "WithPlanRateCards", + "signature": "func (_q *TaxCodeQuery) WithPlanRateCards(opts ...func(*PlanRateCardQuery)) *TaxCodeQuery", + "line": 726 + }, + { + "kind": "func", + "name": "WithAddonRateCards", + "signature": "func (_q *TaxCodeQuery) WithAddonRateCards(opts ...func(*AddonRateCardQuery)) *TaxCodeQuery", + "line": 737 + }, + { + "kind": "func", + "name": "WithChargeFlatFees", + "signature": "func (_q *TaxCodeQuery) WithChargeFlatFees(opts ...func(*ChargeFlatFeeQuery)) *TaxCodeQuery", + "line": 748 + }, + { + "kind": "func", + "name": "WithChargeUsageBased", + "signature": "func (_q *TaxCodeQuery) WithChargeUsageBased(opts ...func(*ChargeUsageBasedQuery)) *TaxCodeQuery", + "line": 759 + }, + { + "kind": "func", + "name": "WithChargeCreditPurchases", + "signature": "func (_q *TaxCodeQuery) WithChargeCreditPurchases(opts ...func(*ChargeCreditPurchaseQuery)) *TaxCodeQuery", + "line": 770 + }, + { + "kind": "func", + "name": "WithOrganizationDefaultInvoicing", + "signature": "func (_q *TaxCodeQuery) WithOrganizationDefaultInvoicing(opts ...func(*OrganizationDefaultTaxCodesQuery)) *TaxCodeQuery", + "line": 781 + }, + { + "kind": "func", + "name": "WithOrganizationDefaultCreditGrant", + "signature": "func (_q *TaxCodeQuery) WithOrganizationDefaultCreditGrant(opts ...func(*OrganizationDefaultTaxCodesQuery)) *TaxCodeQuery", + "line": 792 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *TaxCodeQuery) GroupBy(field string, fields ...string) *TaxCodeGroupBy", + "line": 815 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *TaxCodeQuery) Select(fields ...string) *TaxCodeSelect", + "line": 836 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *TaxCodeQuery) Aggregate(fns ...AggregateFunc) *TaxCodeSelect", + "line": 845 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *TaxCodeQuery) prepareQuery(ctx context.Context) error", + "line": 849 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *TaxCodeQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*TaxCode, error)", + "line": 875 + }, + { + "kind": "func", + "name": "loadBillingWorkflowConfigs", + "signature": "func (_q *TaxCodeQuery) loadBillingWorkflowConfigs(ctx context.Context, query *BillingWorkflowConfigQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *BillingWorkflowConfig)) error", + "line": 1050 + }, + { + "kind": "func", + "name": "loadBillingCustomerOverrides", + "signature": "func (_q *TaxCodeQuery) loadBillingCustomerOverrides(ctx context.Context, query *BillingCustomerOverrideQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *BillingCustomerOverride)) error", + "line": 1083 + }, + { + "kind": "func", + "name": "loadBillingInvoiceLines", + "signature": "func (_q *TaxCodeQuery) loadBillingInvoiceLines(ctx context.Context, query *BillingInvoiceLineQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *BillingInvoiceLine)) error", + "line": 1116 + }, + { + "kind": "func", + "name": "loadBillingInvoiceSplitLineGroups", + "signature": "func (_q *TaxCodeQuery) loadBillingInvoiceSplitLineGroups(ctx context.Context, query *BillingInvoiceSplitLineGroupQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *BillingInvoiceSplitLineGroup)) error", + "line": 1150 + }, + { + "kind": "func", + "name": "loadBillingStandardInvoiceDetailedLines", + "signature": "func (_q *TaxCodeQuery) loadBillingStandardInvoiceDetailedLines(ctx context.Context, query *BillingStandardInvoiceDetailedLineQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *BillingStandardInvoiceDetailedLine)) error", + "line": 1183 + }, + { + "kind": "func", + "name": "loadChargeUsageBasedRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) loadChargeUsageBasedRunDetailedLines(ctx context.Context, query *ChargeUsageBasedRunDetailedLineQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *ChargeUsageBasedRunDetailedLine)) error", + "line": 1216 + }, + { + "kind": "func", + "name": "loadChargeFlatFeeRunDetailedLines", + "signature": "func (_q *TaxCodeQuery) loadChargeFlatFeeRunDetailedLines(ctx context.Context, query *ChargeFlatFeeRunDetailedLineQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *ChargeFlatFeeRunDetailedLine)) error", + "line": 1249 + }, + { + "kind": "func", + "name": "loadSubscriptionItems", + "signature": "func (_q *TaxCodeQuery) loadSubscriptionItems(ctx context.Context, query *SubscriptionItemQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *SubscriptionItem)) error", + "line": 1282 + }, + { + "kind": "func", + "name": "loadPlanRateCards", + "signature": "func (_q *TaxCodeQuery) loadPlanRateCards(ctx context.Context, query *PlanRateCardQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *PlanRateCard)) error", + "line": 1315 + }, + { + "kind": "func", + "name": "loadAddonRateCards", + "signature": "func (_q *TaxCodeQuery) loadAddonRateCards(ctx context.Context, query *AddonRateCardQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *AddonRateCard)) error", + "line": 1348 + }, + { + "kind": "func", + "name": "loadChargeFlatFees", + "signature": "func (_q *TaxCodeQuery) loadChargeFlatFees(ctx context.Context, query *ChargeFlatFeeQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *ChargeFlatFee)) error", + "line": 1381 + }, + { + "kind": "func", + "name": "loadChargeUsageBased", + "signature": "func (_q *TaxCodeQuery) loadChargeUsageBased(ctx context.Context, query *ChargeUsageBasedQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *ChargeUsageBased)) error", + "line": 1414 + }, + { + "kind": "func", + "name": "loadChargeCreditPurchases", + "signature": "func (_q *TaxCodeQuery) loadChargeCreditPurchases(ctx context.Context, query *ChargeCreditPurchaseQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *ChargeCreditPurchase)) error", + "line": 1447 + }, + { + "kind": "func", + "name": "loadOrganizationDefaultInvoicing", + "signature": "func (_q *TaxCodeQuery) loadOrganizationDefaultInvoicing(ctx context.Context, query *OrganizationDefaultTaxCodesQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *OrganizationDefaultTaxCodes)) error", + "line": 1480 + }, + { + "kind": "func", + "name": "loadOrganizationDefaultCreditGrant", + "signature": "func (_q *TaxCodeQuery) loadOrganizationDefaultCreditGrant(ctx context.Context, query *OrganizationDefaultTaxCodesQuery, nodes []*TaxCode, init func(*TaxCode), assign func(*TaxCode, *OrganizationDefaultTaxCodes)) error", + "line": 1510 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *TaxCodeQuery) sqlCount(ctx context.Context) (int, error)", + "line": 1541 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *TaxCodeQuery) querySpec() *sqlgraph.QuerySpec", + "line": 1553 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *TaxCodeQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 1593 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *TaxCodeQuery) ForUpdate(opts ...sql.LockOption) *TaxCodeQuery", + "line": 1631 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *TaxCodeQuery) ForShare(opts ...sql.LockOption) *TaxCodeQuery", + "line": 1644 + }, + { + "kind": "struct", + "name": "TaxCodeGroupBy", + "signature": "type TaxCodeGroupBy struct", + "line": 1655 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *TaxCodeGroupBy) Aggregate(fns ...AggregateFunc) *TaxCodeGroupBy", + "line": 1661 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *TaxCodeGroupBy) Scan(ctx context.Context, v any) error", + "line": 1667 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *TaxCodeGroupBy) sqlScan(ctx context.Context, root *TaxCodeQuery, v any) error", + "line": 1675 + }, + { + "kind": "struct", + "name": "TaxCodeSelect", + "signature": "type TaxCodeSelect struct", + "line": 1703 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *TaxCodeSelect) Aggregate(fns ...AggregateFunc) *TaxCodeSelect", + "line": 1709 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *TaxCodeSelect) Scan(ctx context.Context, v any) error", + "line": 1715 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *TaxCodeSelect) sqlScan(ctx context.Context, root *TaxCodeQuery, v any) error", + "line": 1723 + } + ], + "line_count": 1742 + }, + "openmeter/ent/db/taxcode_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeUpdate", + "signature": "type TaxCodeUpdate struct", + "line": 35 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *TaxCodeUpdate) Where(ps ...predicate.TaxCode) *TaxCodeUpdate", + "line": 42 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *TaxCodeUpdate) SetMetadata(v map[string]string) *TaxCodeUpdate", + "line": 48 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *TaxCodeUpdate) ClearMetadata() *TaxCodeUpdate", + "line": 54 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *TaxCodeUpdate) SetUpdatedAt(v time.Time) *TaxCodeUpdate", + "line": 60 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *TaxCodeUpdate) SetDeletedAt(v time.Time) *TaxCodeUpdate", + "line": 66 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *TaxCodeUpdate) SetNillableDeletedAt(v *time.Time) *TaxCodeUpdate", + "line": 72 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *TaxCodeUpdate) ClearDeletedAt() *TaxCodeUpdate", + "line": 80 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *TaxCodeUpdate) SetName(v string) *TaxCodeUpdate", + "line": 86 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *TaxCodeUpdate) SetNillableName(v *string) *TaxCodeUpdate", + "line": 92 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *TaxCodeUpdate) SetDescription(v string) *TaxCodeUpdate", + "line": 100 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *TaxCodeUpdate) SetNillableDescription(v *string) *TaxCodeUpdate", + "line": 106 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *TaxCodeUpdate) ClearDescription() *TaxCodeUpdate", + "line": 114 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *TaxCodeUpdate) SetAnnotations(v models.Annotations) *TaxCodeUpdate", + "line": 120 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *TaxCodeUpdate) ClearAnnotations() *TaxCodeUpdate", + "line": 126 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (_u *TaxCodeUpdate) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeUpdate", + "line": 132 + }, + { + "kind": "func", + "name": "ClearAppMappings", + "signature": "func (_u *TaxCodeUpdate) ClearAppMappings() *TaxCodeUpdate", + "line": 138 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigIDs", + "signature": "func (_u *TaxCodeUpdate) AddBillingWorkflowConfigIDs(ids ...string) *TaxCodeUpdate", + "line": 144 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdate) AddBillingWorkflowConfigs(v ...*BillingWorkflowConfig) *TaxCodeUpdate", + "line": 150 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_u *TaxCodeUpdate) AddBillingCustomerOverrideIDs(ids ...string) *TaxCodeUpdate", + "line": 159 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdate) AddBillingCustomerOverrides(v ...*BillingCustomerOverride) *TaxCodeUpdate", + "line": 165 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *TaxCodeUpdate) AddBillingInvoiceLineIDs(ids ...string) *TaxCodeUpdate", + "line": 174 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdate) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *TaxCodeUpdate", + "line": 180 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroupIDs", + "signature": "func (_u *TaxCodeUpdate) AddBillingInvoiceSplitLineGroupIDs(ids ...string) *TaxCodeUpdate", + "line": 189 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdate) AddBillingInvoiceSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *TaxCodeUpdate", + "line": 195 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) AddBillingStandardInvoiceDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 204 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdate) AddBillingStandardInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *TaxCodeUpdate", + "line": 210 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) AddChargeUsageBasedRunDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 219 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) AddChargeUsageBasedRunDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *TaxCodeUpdate", + "line": 225 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) AddChargeFlatFeeRunDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 234 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) AddChargeFlatFeeRunDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *TaxCodeUpdate", + "line": 240 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_u *TaxCodeUpdate) AddSubscriptionItemIDs(ids ...string) *TaxCodeUpdate", + "line": 249 + }, + { + "kind": "func", + "name": "AddSubscriptionItems", + "signature": "func (_u *TaxCodeUpdate) AddSubscriptionItems(v ...*SubscriptionItem) *TaxCodeUpdate", + "line": 255 + }, + { + "kind": "func", + "name": "AddPlanRateCardIDs", + "signature": "func (_u *TaxCodeUpdate) AddPlanRateCardIDs(ids ...string) *TaxCodeUpdate", + "line": 264 + }, + { + "kind": "func", + "name": "AddPlanRateCards", + "signature": "func (_u *TaxCodeUpdate) AddPlanRateCards(v ...*PlanRateCard) *TaxCodeUpdate", + "line": 270 + }, + { + "kind": "func", + "name": "AddAddonRateCardIDs", + "signature": "func (_u *TaxCodeUpdate) AddAddonRateCardIDs(ids ...string) *TaxCodeUpdate", + "line": 279 + }, + { + "kind": "func", + "name": "AddAddonRateCards", + "signature": "func (_u *TaxCodeUpdate) AddAddonRateCards(v ...*AddonRateCard) *TaxCodeUpdate", + "line": 285 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeIDs", + "signature": "func (_u *TaxCodeUpdate) AddChargeFlatFeeIDs(ids ...string) *TaxCodeUpdate", + "line": 294 + }, + { + "kind": "func", + "name": "AddChargeFlatFees", + "signature": "func (_u *TaxCodeUpdate) AddChargeFlatFees(v ...*ChargeFlatFee) *TaxCodeUpdate", + "line": 300 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedIDs", + "signature": "func (_u *TaxCodeUpdate) AddChargeUsageBasedIDs(ids ...string) *TaxCodeUpdate", + "line": 309 + }, + { + "kind": "func", + "name": "AddChargeUsageBased", + "signature": "func (_u *TaxCodeUpdate) AddChargeUsageBased(v ...*ChargeUsageBased) *TaxCodeUpdate", + "line": 315 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchaseIDs", + "signature": "func (_u *TaxCodeUpdate) AddChargeCreditPurchaseIDs(ids ...string) *TaxCodeUpdate", + "line": 324 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdate) AddChargeCreditPurchases(v ...*ChargeCreditPurchase) *TaxCodeUpdate", + "line": 330 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicingIDs", + "signature": "func (_u *TaxCodeUpdate) AddOrganizationDefaultInvoicingIDs(ids ...string) *TaxCodeUpdate", + "line": 339 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdate) AddOrganizationDefaultInvoicing(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdate", + "line": 345 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrantIDs", + "signature": "func (_u *TaxCodeUpdate) AddOrganizationDefaultCreditGrantIDs(ids ...string) *TaxCodeUpdate", + "line": 354 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdate) AddOrganizationDefaultCreditGrant(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdate", + "line": 360 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *TaxCodeUpdate) Mutation() *TaxCodeMutation", + "line": 369 + }, + { + "kind": "func", + "name": "ClearBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdate) ClearBillingWorkflowConfigs() *TaxCodeUpdate", + "line": 374 + }, + { + "kind": "func", + "name": "RemoveBillingWorkflowConfigIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingWorkflowConfigIDs(ids ...string) *TaxCodeUpdate", + "line": 380 + }, + { + "kind": "func", + "name": "RemoveBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingWorkflowConfigs(v ...*BillingWorkflowConfig) *TaxCodeUpdate", + "line": 386 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdate) ClearBillingCustomerOverrides() *TaxCodeUpdate", + "line": 395 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrideIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingCustomerOverrideIDs(ids ...string) *TaxCodeUpdate", + "line": 401 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingCustomerOverrides(v ...*BillingCustomerOverride) *TaxCodeUpdate", + "line": 407 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdate) ClearBillingInvoiceLines() *TaxCodeUpdate", + "line": 416 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingInvoiceLineIDs(ids ...string) *TaxCodeUpdate", + "line": 422 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *TaxCodeUpdate", + "line": 428 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdate) ClearBillingInvoiceSplitLineGroups() *TaxCodeUpdate", + "line": 437 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceSplitLineGroupIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingInvoiceSplitLineGroupIDs(ids ...string) *TaxCodeUpdate", + "line": 443 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingInvoiceSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *TaxCodeUpdate", + "line": 449 + }, + { + "kind": "func", + "name": "ClearBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdate) ClearBillingStandardInvoiceDetailedLines() *TaxCodeUpdate", + "line": 458 + }, + { + "kind": "func", + "name": "RemoveBillingStandardInvoiceDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingStandardInvoiceDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 464 + }, + { + "kind": "func", + "name": "RemoveBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdate) RemoveBillingStandardInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *TaxCodeUpdate", + "line": 470 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) ClearChargeUsageBasedRunDetailedLines() *TaxCodeUpdate", + "line": 479 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeUsageBasedRunDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 485 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeUsageBasedRunDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *TaxCodeUpdate", + "line": 491 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) ClearChargeFlatFeeRunDetailedLines() *TaxCodeUpdate", + "line": 500 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeFlatFeeRunDetailedLineIDs(ids ...string) *TaxCodeUpdate", + "line": 506 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeFlatFeeRunDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *TaxCodeUpdate", + "line": 512 + }, + { + "kind": "func", + "name": "ClearSubscriptionItems", + "signature": "func (_u *TaxCodeUpdate) ClearSubscriptionItems() *TaxCodeUpdate", + "line": 521 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItemIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveSubscriptionItemIDs(ids ...string) *TaxCodeUpdate", + "line": 527 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItems", + "signature": "func (_u *TaxCodeUpdate) RemoveSubscriptionItems(v ...*SubscriptionItem) *TaxCodeUpdate", + "line": 533 + }, + { + "kind": "func", + "name": "ClearPlanRateCards", + "signature": "func (_u *TaxCodeUpdate) ClearPlanRateCards() *TaxCodeUpdate", + "line": 542 + }, + { + "kind": "func", + "name": "RemovePlanRateCardIDs", + "signature": "func (_u *TaxCodeUpdate) RemovePlanRateCardIDs(ids ...string) *TaxCodeUpdate", + "line": 548 + }, + { + "kind": "func", + "name": "RemovePlanRateCards", + "signature": "func (_u *TaxCodeUpdate) RemovePlanRateCards(v ...*PlanRateCard) *TaxCodeUpdate", + "line": 554 + }, + { + "kind": "func", + "name": "ClearAddonRateCards", + "signature": "func (_u *TaxCodeUpdate) ClearAddonRateCards() *TaxCodeUpdate", + "line": 563 + }, + { + "kind": "func", + "name": "RemoveAddonRateCardIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveAddonRateCardIDs(ids ...string) *TaxCodeUpdate", + "line": 569 + }, + { + "kind": "func", + "name": "RemoveAddonRateCards", + "signature": "func (_u *TaxCodeUpdate) RemoveAddonRateCards(v ...*AddonRateCard) *TaxCodeUpdate", + "line": 575 + }, + { + "kind": "func", + "name": "ClearChargeFlatFees", + "signature": "func (_u *TaxCodeUpdate) ClearChargeFlatFees() *TaxCodeUpdate", + "line": 584 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeFlatFeeIDs(ids ...string) *TaxCodeUpdate", + "line": 590 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFees", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeFlatFees(v ...*ChargeFlatFee) *TaxCodeUpdate", + "line": 596 + }, + { + "kind": "func", + "name": "ClearChargeUsageBased", + "signature": "func (_u *TaxCodeUpdate) ClearChargeUsageBased() *TaxCodeUpdate", + "line": 605 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeUsageBasedIDs(ids ...string) *TaxCodeUpdate", + "line": 611 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBased", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeUsageBased(v ...*ChargeUsageBased) *TaxCodeUpdate", + "line": 617 + }, + { + "kind": "func", + "name": "ClearChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdate) ClearChargeCreditPurchases() *TaxCodeUpdate", + "line": 626 + }, + { + "kind": "func", + "name": "RemoveChargeCreditPurchaseIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeCreditPurchaseIDs(ids ...string) *TaxCodeUpdate", + "line": 632 + }, + { + "kind": "func", + "name": "RemoveChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdate) RemoveChargeCreditPurchases(v ...*ChargeCreditPurchase) *TaxCodeUpdate", + "line": 638 + }, + { + "kind": "func", + "name": "ClearOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdate) ClearOrganizationDefaultInvoicing() *TaxCodeUpdate", + "line": 647 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultInvoicingIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveOrganizationDefaultInvoicingIDs(ids ...string) *TaxCodeUpdate", + "line": 653 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdate) RemoveOrganizationDefaultInvoicing(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdate", + "line": 659 + }, + { + "kind": "func", + "name": "ClearOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdate) ClearOrganizationDefaultCreditGrant() *TaxCodeUpdate", + "line": 668 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultCreditGrantIDs", + "signature": "func (_u *TaxCodeUpdate) RemoveOrganizationDefaultCreditGrantIDs(ids ...string) *TaxCodeUpdate", + "line": 674 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdate) RemoveOrganizationDefaultCreditGrant(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdate", + "line": 680 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *TaxCodeUpdate) Save(ctx context.Context) (int, error)", + "line": 689 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *TaxCodeUpdate) SaveX(ctx context.Context) int", + "line": 695 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *TaxCodeUpdate) Exec(ctx context.Context) error", + "line": 704 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *TaxCodeUpdate) ExecX(ctx context.Context)", + "line": 710 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *TaxCodeUpdate) defaults()", + "line": 717 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *TaxCodeUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 724 + }, + { + "kind": "struct", + "name": "TaxCodeUpdateOne", + "signature": "type TaxCodeUpdateOne struct", + "line": 1461 + }, + { + "kind": "func", + "name": "SetMetadata", + "signature": "func (_u *TaxCodeUpdateOne) SetMetadata(v map[string]string) *TaxCodeUpdateOne", + "line": 1469 + }, + { + "kind": "func", + "name": "ClearMetadata", + "signature": "func (_u *TaxCodeUpdateOne) ClearMetadata() *TaxCodeUpdateOne", + "line": 1475 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *TaxCodeUpdateOne) SetUpdatedAt(v time.Time) *TaxCodeUpdateOne", + "line": 1481 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *TaxCodeUpdateOne) SetDeletedAt(v time.Time) *TaxCodeUpdateOne", + "line": 1487 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *TaxCodeUpdateOne) SetNillableDeletedAt(v *time.Time) *TaxCodeUpdateOne", + "line": 1493 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *TaxCodeUpdateOne) ClearDeletedAt() *TaxCodeUpdateOne", + "line": 1501 + }, + { + "kind": "func", + "name": "SetName", + "signature": "func (_u *TaxCodeUpdateOne) SetName(v string) *TaxCodeUpdateOne", + "line": 1507 + }, + { + "kind": "func", + "name": "SetNillableName", + "signature": "func (_u *TaxCodeUpdateOne) SetNillableName(v *string) *TaxCodeUpdateOne", + "line": 1513 + }, + { + "kind": "func", + "name": "SetDescription", + "signature": "func (_u *TaxCodeUpdateOne) SetDescription(v string) *TaxCodeUpdateOne", + "line": 1521 + }, + { + "kind": "func", + "name": "SetNillableDescription", + "signature": "func (_u *TaxCodeUpdateOne) SetNillableDescription(v *string) *TaxCodeUpdateOne", + "line": 1527 + }, + { + "kind": "func", + "name": "ClearDescription", + "signature": "func (_u *TaxCodeUpdateOne) ClearDescription() *TaxCodeUpdateOne", + "line": 1535 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *TaxCodeUpdateOne) SetAnnotations(v models.Annotations) *TaxCodeUpdateOne", + "line": 1541 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *TaxCodeUpdateOne) ClearAnnotations() *TaxCodeUpdateOne", + "line": 1547 + }, + { + "kind": "func", + "name": "SetAppMappings", + "signature": "func (_u *TaxCodeUpdateOne) SetAppMappings(v *taxcode.TaxCodeAppMappings) *TaxCodeUpdateOne", + "line": 1553 + }, + { + "kind": "func", + "name": "ClearAppMappings", + "signature": "func (_u *TaxCodeUpdateOne) ClearAppMappings() *TaxCodeUpdateOne", + "line": 1559 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingWorkflowConfigIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1565 + }, + { + "kind": "func", + "name": "AddBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingWorkflowConfigs(v ...*BillingWorkflowConfig) *TaxCodeUpdateOne", + "line": 1571 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrideIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingCustomerOverrideIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1580 + }, + { + "kind": "func", + "name": "AddBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingCustomerOverrides(v ...*BillingCustomerOverride) *TaxCodeUpdateOne", + "line": 1586 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingInvoiceLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1595 + }, + { + "kind": "func", + "name": "AddBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingInvoiceLines(v ...*BillingInvoiceLine) *TaxCodeUpdateOne", + "line": 1601 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroupIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingInvoiceSplitLineGroupIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1610 + }, + { + "kind": "func", + "name": "AddBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingInvoiceSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *TaxCodeUpdateOne", + "line": 1616 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingStandardInvoiceDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1625 + }, + { + "kind": "func", + "name": "AddBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) AddBillingStandardInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *TaxCodeUpdateOne", + "line": 1631 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeUsageBasedRunDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1640 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeUsageBasedRunDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *TaxCodeUpdateOne", + "line": 1646 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeFlatFeeRunDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1655 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeFlatFeeRunDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *TaxCodeUpdateOne", + "line": 1661 + }, + { + "kind": "func", + "name": "AddSubscriptionItemIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddSubscriptionItemIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1670 + }, + { + "kind": "func", + "name": "AddSubscriptionItems", + "signature": "func (_u *TaxCodeUpdateOne) AddSubscriptionItems(v ...*SubscriptionItem) *TaxCodeUpdateOne", + "line": 1676 + }, + { + "kind": "func", + "name": "AddPlanRateCardIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddPlanRateCardIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1685 + }, + { + "kind": "func", + "name": "AddPlanRateCards", + "signature": "func (_u *TaxCodeUpdateOne) AddPlanRateCards(v ...*PlanRateCard) *TaxCodeUpdateOne", + "line": 1691 + }, + { + "kind": "func", + "name": "AddAddonRateCardIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddAddonRateCardIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1700 + }, + { + "kind": "func", + "name": "AddAddonRateCards", + "signature": "func (_u *TaxCodeUpdateOne) AddAddonRateCards(v ...*AddonRateCard) *TaxCodeUpdateOne", + "line": 1706 + }, + { + "kind": "func", + "name": "AddChargeFlatFeeIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeFlatFeeIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1715 + }, + { + "kind": "func", + "name": "AddChargeFlatFees", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeFlatFees(v ...*ChargeFlatFee) *TaxCodeUpdateOne", + "line": 1721 + }, + { + "kind": "func", + "name": "AddChargeUsageBasedIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeUsageBasedIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1730 + }, + { + "kind": "func", + "name": "AddChargeUsageBased", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeUsageBased(v ...*ChargeUsageBased) *TaxCodeUpdateOne", + "line": 1736 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchaseIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeCreditPurchaseIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1745 + }, + { + "kind": "func", + "name": "AddChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdateOne) AddChargeCreditPurchases(v ...*ChargeCreditPurchase) *TaxCodeUpdateOne", + "line": 1751 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicingIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddOrganizationDefaultInvoicingIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1760 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdateOne) AddOrganizationDefaultInvoicing(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdateOne", + "line": 1766 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrantIDs", + "signature": "func (_u *TaxCodeUpdateOne) AddOrganizationDefaultCreditGrantIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1775 + }, + { + "kind": "func", + "name": "AddOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdateOne) AddOrganizationDefaultCreditGrant(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdateOne", + "line": 1781 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *TaxCodeUpdateOne) Mutation() *TaxCodeMutation", + "line": 1790 + }, + { + "kind": "func", + "name": "ClearBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdateOne) ClearBillingWorkflowConfigs() *TaxCodeUpdateOne", + "line": 1795 + }, + { + "kind": "func", + "name": "RemoveBillingWorkflowConfigIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingWorkflowConfigIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1801 + }, + { + "kind": "func", + "name": "RemoveBillingWorkflowConfigs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingWorkflowConfigs(v ...*BillingWorkflowConfig) *TaxCodeUpdateOne", + "line": 1807 + }, + { + "kind": "func", + "name": "ClearBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdateOne) ClearBillingCustomerOverrides() *TaxCodeUpdateOne", + "line": 1816 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrideIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingCustomerOverrideIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1822 + }, + { + "kind": "func", + "name": "RemoveBillingCustomerOverrides", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingCustomerOverrides(v ...*BillingCustomerOverride) *TaxCodeUpdateOne", + "line": 1828 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdateOne) ClearBillingInvoiceLines() *TaxCodeUpdateOne", + "line": 1837 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingInvoiceLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1843 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceLines", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingInvoiceLines(v ...*BillingInvoiceLine) *TaxCodeUpdateOne", + "line": 1849 + }, + { + "kind": "func", + "name": "ClearBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdateOne) ClearBillingInvoiceSplitLineGroups() *TaxCodeUpdateOne", + "line": 1858 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceSplitLineGroupIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingInvoiceSplitLineGroupIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1864 + }, + { + "kind": "func", + "name": "RemoveBillingInvoiceSplitLineGroups", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingInvoiceSplitLineGroups(v ...*BillingInvoiceSplitLineGroup) *TaxCodeUpdateOne", + "line": 1870 + }, + { + "kind": "func", + "name": "ClearBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) ClearBillingStandardInvoiceDetailedLines() *TaxCodeUpdateOne", + "line": 1879 + }, + { + "kind": "func", + "name": "RemoveBillingStandardInvoiceDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingStandardInvoiceDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1885 + }, + { + "kind": "func", + "name": "RemoveBillingStandardInvoiceDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) RemoveBillingStandardInvoiceDetailedLines(v ...*BillingStandardInvoiceDetailedLine) *TaxCodeUpdateOne", + "line": 1891 + }, + { + "kind": "func", + "name": "ClearChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) ClearChargeUsageBasedRunDetailedLines() *TaxCodeUpdateOne", + "line": 1900 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeUsageBasedRunDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1906 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeUsageBasedRunDetailedLines(v ...*ChargeUsageBasedRunDetailedLine) *TaxCodeUpdateOne", + "line": 1912 + }, + { + "kind": "func", + "name": "ClearChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) ClearChargeFlatFeeRunDetailedLines() *TaxCodeUpdateOne", + "line": 1921 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunDetailedLineIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeFlatFeeRunDetailedLineIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1927 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeRunDetailedLines", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeFlatFeeRunDetailedLines(v ...*ChargeFlatFeeRunDetailedLine) *TaxCodeUpdateOne", + "line": 1933 + }, + { + "kind": "func", + "name": "ClearSubscriptionItems", + "signature": "func (_u *TaxCodeUpdateOne) ClearSubscriptionItems() *TaxCodeUpdateOne", + "line": 1942 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItemIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveSubscriptionItemIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1948 + }, + { + "kind": "func", + "name": "RemoveSubscriptionItems", + "signature": "func (_u *TaxCodeUpdateOne) RemoveSubscriptionItems(v ...*SubscriptionItem) *TaxCodeUpdateOne", + "line": 1954 + }, + { + "kind": "func", + "name": "ClearPlanRateCards", + "signature": "func (_u *TaxCodeUpdateOne) ClearPlanRateCards() *TaxCodeUpdateOne", + "line": 1963 + }, + { + "kind": "func", + "name": "RemovePlanRateCardIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemovePlanRateCardIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1969 + }, + { + "kind": "func", + "name": "RemovePlanRateCards", + "signature": "func (_u *TaxCodeUpdateOne) RemovePlanRateCards(v ...*PlanRateCard) *TaxCodeUpdateOne", + "line": 1975 + }, + { + "kind": "func", + "name": "ClearAddonRateCards", + "signature": "func (_u *TaxCodeUpdateOne) ClearAddonRateCards() *TaxCodeUpdateOne", + "line": 1984 + }, + { + "kind": "func", + "name": "RemoveAddonRateCardIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveAddonRateCardIDs(ids ...string) *TaxCodeUpdateOne", + "line": 1990 + }, + { + "kind": "func", + "name": "RemoveAddonRateCards", + "signature": "func (_u *TaxCodeUpdateOne) RemoveAddonRateCards(v ...*AddonRateCard) *TaxCodeUpdateOne", + "line": 1996 + }, + { + "kind": "func", + "name": "ClearChargeFlatFees", + "signature": "func (_u *TaxCodeUpdateOne) ClearChargeFlatFees() *TaxCodeUpdateOne", + "line": 2005 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFeeIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeFlatFeeIDs(ids ...string) *TaxCodeUpdateOne", + "line": 2011 + }, + { + "kind": "func", + "name": "RemoveChargeFlatFees", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeFlatFees(v ...*ChargeFlatFee) *TaxCodeUpdateOne", + "line": 2017 + }, + { + "kind": "func", + "name": "ClearChargeUsageBased", + "signature": "func (_u *TaxCodeUpdateOne) ClearChargeUsageBased() *TaxCodeUpdateOne", + "line": 2026 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBasedIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeUsageBasedIDs(ids ...string) *TaxCodeUpdateOne", + "line": 2032 + }, + { + "kind": "func", + "name": "RemoveChargeUsageBased", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeUsageBased(v ...*ChargeUsageBased) *TaxCodeUpdateOne", + "line": 2038 + }, + { + "kind": "func", + "name": "ClearChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdateOne) ClearChargeCreditPurchases() *TaxCodeUpdateOne", + "line": 2047 + }, + { + "kind": "func", + "name": "RemoveChargeCreditPurchaseIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeCreditPurchaseIDs(ids ...string) *TaxCodeUpdateOne", + "line": 2053 + }, + { + "kind": "func", + "name": "RemoveChargeCreditPurchases", + "signature": "func (_u *TaxCodeUpdateOne) RemoveChargeCreditPurchases(v ...*ChargeCreditPurchase) *TaxCodeUpdateOne", + "line": 2059 + }, + { + "kind": "func", + "name": "ClearOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdateOne) ClearOrganizationDefaultInvoicing() *TaxCodeUpdateOne", + "line": 2068 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultInvoicingIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveOrganizationDefaultInvoicingIDs(ids ...string) *TaxCodeUpdateOne", + "line": 2074 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultInvoicing", + "signature": "func (_u *TaxCodeUpdateOne) RemoveOrganizationDefaultInvoicing(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdateOne", + "line": 2080 + }, + { + "kind": "func", + "name": "ClearOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdateOne) ClearOrganizationDefaultCreditGrant() *TaxCodeUpdateOne", + "line": 2089 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultCreditGrantIDs", + "signature": "func (_u *TaxCodeUpdateOne) RemoveOrganizationDefaultCreditGrantIDs(ids ...string) *TaxCodeUpdateOne", + "line": 2095 + }, + { + "kind": "func", + "name": "RemoveOrganizationDefaultCreditGrant", + "signature": "func (_u *TaxCodeUpdateOne) RemoveOrganizationDefaultCreditGrant(v ...*OrganizationDefaultTaxCodes) *TaxCodeUpdateOne", + "line": 2101 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *TaxCodeUpdateOne) Where(ps ...predicate.TaxCode) *TaxCodeUpdateOne", + "line": 2110 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *TaxCodeUpdateOne) Select(field string, fields ...string) *TaxCodeUpdateOne", + "line": 2117 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *TaxCodeUpdateOne) Save(ctx context.Context) (*TaxCode, error)", + "line": 2123 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *TaxCodeUpdateOne) SaveX(ctx context.Context) *TaxCode", + "line": 2129 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *TaxCodeUpdateOne) Exec(ctx context.Context) error", + "line": 2138 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *TaxCodeUpdateOne) ExecX(ctx context.Context)", + "line": 2144 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *TaxCodeUpdateOne) defaults()", + "line": 2151 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *TaxCodeUpdateOne) sqlSave(ctx context.Context) (_node *TaxCode, err error)", + "line": 2158 + } + ], + "line_count": 2912 + }, + "openmeter/ent/db/tx.go": { + "header": "\t\"context\"\n\tstdsql \"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Tx", + "signature": "type Tx struct", + "line": 15 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error", + "line": 215 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (tx *Tx) Commit() error", + "line": 220 + }, + { + "kind": "func", + "name": "OnCommit", + "signature": "func (tx *Tx) OnCommit(f CommitHook)", + "line": 235 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error", + "line": 271 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (tx *Tx) Rollback() error", + "line": 276 + }, + { + "kind": "func", + "name": "OnRollback", + "signature": "func (tx *Tx) OnRollback(f RollbackHook)", + "line": 291 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (tx *Tx) Client() *Client", + "line": 299 + }, + { + "kind": "func", + "name": "init", + "signature": "func (tx *Tx) init()", + "line": 307 + }, + { + "kind": "struct", + "name": "txDriver", + "signature": "type txDriver struct", + "line": 401 + }, + { + "kind": "func", + "name": "newTx", + "signature": "func newTx(ctx context.Context, drv dialect.Driver) (*txDriver, error)", + "line": 413 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (tx *txDriver) Tx(context.Context) (dialect.Tx, error)", + "line": 423 + }, + { + "kind": "func", + "name": "Dialect", + "signature": "func (tx *txDriver) Dialect() string", + "line": 426 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (tx *txDriver) Exec(ctx context.Context, query string, args, v any) error", + "line": 440 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error", + "line": 445 + }, + { + "kind": "func", + "name": "ExecContext", + "signature": "func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)", + "line": 453 + }, + { + "kind": "func", + "name": "QueryContext", + "signature": "func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)", + "line": 465 + } + ], + "line_count": 473 + }, + "openmeter/ent/db/usagereset.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageReset", + "signature": "type UsageReset struct", + "line": 20 + }, + { + "kind": "struct", + "name": "UsageResetEdges", + "signature": "type UsageResetEdges struct", + "line": 49 + }, + { + "kind": "func", + "name": "EntitlementOrErr", + "signature": "func (e UsageResetEdges) EntitlementOrErr() (*Entitlement, error)", + "line": 59 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *UsageReset) assignValues(columns []string, values []any) error", + "line": 88 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *UsageReset) Value(name string) (ent.Value, error)", + "line": 166 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_m *UsageReset) QueryEntitlement() *EntitlementQuery", + "line": 171 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *UsageReset) Update() *UsageResetUpdateOne", + "line": 178 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *UsageReset) Unwrap() *UsageReset", + "line": 184 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *UsageReset) String() string", + "line": 194 + } + ], + "line_count": 231 + }, + "openmeter/ent/db/usagereset/usagereset.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 63 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 89 + }, + { + "kind": "func", + "name": "ByNamespace", + "signature": "func ByNamespace(opts ...sql.OrderTermOption) OrderOption", + "line": 94 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 99 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 104 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 109 + }, + { + "kind": "func", + "name": "ByEntitlementID", + "signature": "func ByEntitlementID(opts ...sql.OrderTermOption) OrderOption", + "line": 114 + }, + { + "kind": "func", + "name": "ByResetTime", + "signature": "func ByResetTime(opts ...sql.OrderTermOption) OrderOption", + "line": 119 + }, + { + "kind": "func", + "name": "ByAnchor", + "signature": "func ByAnchor(opts ...sql.OrderTermOption) OrderOption", + "line": 124 + }, + { + "kind": "func", + "name": "ByUsagePeriodInterval", + "signature": "func ByUsagePeriodInterval(opts ...sql.OrderTermOption) OrderOption", + "line": 129 + }, + { + "kind": "func", + "name": "ByEntitlementField", + "signature": "func ByEntitlementField(field string, opts ...sql.OrderTermOption) OrderOption", + "line": 134 + }, + { + "kind": "func", + "name": "newEntitlementStep", + "signature": "func newEntitlementStep() *sqlgraph.Step", + "line": 139 + } + ], + "line_count": 145 + }, + "openmeter/ent/db/usagereset/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.UsageReset", + "line": 15 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.UsageReset", + "line": 20 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.UsageReset", + "line": 25 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.UsageReset", + "line": 30 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.UsageReset", + "line": 35 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.UsageReset", + "line": 40 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.UsageReset", + "line": 45 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.UsageReset", + "line": 50 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.UsageReset", + "line": 55 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.UsageReset", + "line": 60 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.UsageReset", + "line": 65 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func Namespace(v string) predicate.UsageReset", + "line": 70 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.UsageReset", + "line": 75 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.UsageReset", + "line": 80 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.UsageReset", + "line": 85 + }, + { + "kind": "func", + "name": "EntitlementID", + "signature": "func EntitlementID(v string) predicate.UsageReset", + "line": 90 + }, + { + "kind": "func", + "name": "ResetTime", + "signature": "func ResetTime(v time.Time) predicate.UsageReset", + "line": 95 + }, + { + "kind": "func", + "name": "Anchor", + "signature": "func Anchor(v time.Time) predicate.UsageReset", + "line": 100 + }, + { + "kind": "func", + "name": "UsagePeriodInterval", + "signature": "func UsagePeriodInterval(v datetime.ISODurationString) predicate.UsageReset", + "line": 105 + }, + { + "kind": "func", + "name": "NamespaceEQ", + "signature": "func NamespaceEQ(v string) predicate.UsageReset", + "line": 111 + }, + { + "kind": "func", + "name": "NamespaceNEQ", + "signature": "func NamespaceNEQ(v string) predicate.UsageReset", + "line": 116 + }, + { + "kind": "func", + "name": "NamespaceIn", + "signature": "func NamespaceIn(vs ...string) predicate.UsageReset", + "line": 121 + }, + { + "kind": "func", + "name": "NamespaceNotIn", + "signature": "func NamespaceNotIn(vs ...string) predicate.UsageReset", + "line": 126 + }, + { + "kind": "func", + "name": "NamespaceGT", + "signature": "func NamespaceGT(v string) predicate.UsageReset", + "line": 131 + }, + { + "kind": "func", + "name": "NamespaceGTE", + "signature": "func NamespaceGTE(v string) predicate.UsageReset", + "line": 136 + }, + { + "kind": "func", + "name": "NamespaceLT", + "signature": "func NamespaceLT(v string) predicate.UsageReset", + "line": 141 + }, + { + "kind": "func", + "name": "NamespaceLTE", + "signature": "func NamespaceLTE(v string) predicate.UsageReset", + "line": 146 + }, + { + "kind": "func", + "name": "NamespaceContains", + "signature": "func NamespaceContains(v string) predicate.UsageReset", + "line": 151 + }, + { + "kind": "func", + "name": "NamespaceHasPrefix", + "signature": "func NamespaceHasPrefix(v string) predicate.UsageReset", + "line": 156 + }, + { + "kind": "func", + "name": "NamespaceHasSuffix", + "signature": "func NamespaceHasSuffix(v string) predicate.UsageReset", + "line": 161 + }, + { + "kind": "func", + "name": "NamespaceEqualFold", + "signature": "func NamespaceEqualFold(v string) predicate.UsageReset", + "line": 166 + }, + { + "kind": "func", + "name": "NamespaceContainsFold", + "signature": "func NamespaceContainsFold(v string) predicate.UsageReset", + "line": 171 + }, + { + "kind": "func", + "name": "AnnotationsIsNil", + "signature": "func AnnotationsIsNil() predicate.UsageReset", + "line": 176 + }, + { + "kind": "func", + "name": "AnnotationsNotNil", + "signature": "func AnnotationsNotNil() predicate.UsageReset", + "line": 181 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.UsageReset", + "line": 186 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.UsageReset", + "line": 191 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.UsageReset", + "line": 196 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.UsageReset", + "line": 201 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.UsageReset", + "line": 206 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.UsageReset", + "line": 211 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.UsageReset", + "line": 216 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.UsageReset", + "line": 221 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.UsageReset", + "line": 226 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.UsageReset", + "line": 231 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.UsageReset", + "line": 236 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.UsageReset", + "line": 241 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.UsageReset", + "line": 246 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.UsageReset", + "line": 251 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.UsageReset", + "line": 256 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.UsageReset", + "line": 261 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.UsageReset", + "line": 266 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.UsageReset", + "line": 271 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.UsageReset", + "line": 276 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.UsageReset", + "line": 281 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.UsageReset", + "line": 286 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.UsageReset", + "line": 291 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.UsageReset", + "line": 296 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.UsageReset", + "line": 301 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.UsageReset", + "line": 306 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.UsageReset", + "line": 311 + }, + { + "kind": "func", + "name": "EntitlementIDEQ", + "signature": "func EntitlementIDEQ(v string) predicate.UsageReset", + "line": 316 + }, + { + "kind": "func", + "name": "EntitlementIDNEQ", + "signature": "func EntitlementIDNEQ(v string) predicate.UsageReset", + "line": 321 + }, + { + "kind": "func", + "name": "EntitlementIDIn", + "signature": "func EntitlementIDIn(vs ...string) predicate.UsageReset", + "line": 326 + }, + { + "kind": "func", + "name": "EntitlementIDNotIn", + "signature": "func EntitlementIDNotIn(vs ...string) predicate.UsageReset", + "line": 331 + }, + { + "kind": "func", + "name": "EntitlementIDGT", + "signature": "func EntitlementIDGT(v string) predicate.UsageReset", + "line": 336 + }, + { + "kind": "func", + "name": "EntitlementIDGTE", + "signature": "func EntitlementIDGTE(v string) predicate.UsageReset", + "line": 341 + }, + { + "kind": "func", + "name": "EntitlementIDLT", + "signature": "func EntitlementIDLT(v string) predicate.UsageReset", + "line": 346 + }, + { + "kind": "func", + "name": "EntitlementIDLTE", + "signature": "func EntitlementIDLTE(v string) predicate.UsageReset", + "line": 351 + }, + { + "kind": "func", + "name": "EntitlementIDContains", + "signature": "func EntitlementIDContains(v string) predicate.UsageReset", + "line": 356 + }, + { + "kind": "func", + "name": "EntitlementIDHasPrefix", + "signature": "func EntitlementIDHasPrefix(v string) predicate.UsageReset", + "line": 361 + }, + { + "kind": "func", + "name": "EntitlementIDHasSuffix", + "signature": "func EntitlementIDHasSuffix(v string) predicate.UsageReset", + "line": 366 + }, + { + "kind": "func", + "name": "EntitlementIDEqualFold", + "signature": "func EntitlementIDEqualFold(v string) predicate.UsageReset", + "line": 371 + }, + { + "kind": "func", + "name": "EntitlementIDContainsFold", + "signature": "func EntitlementIDContainsFold(v string) predicate.UsageReset", + "line": 376 + }, + { + "kind": "func", + "name": "ResetTimeEQ", + "signature": "func ResetTimeEQ(v time.Time) predicate.UsageReset", + "line": 381 + }, + { + "kind": "func", + "name": "ResetTimeNEQ", + "signature": "func ResetTimeNEQ(v time.Time) predicate.UsageReset", + "line": 386 + }, + { + "kind": "func", + "name": "ResetTimeIn", + "signature": "func ResetTimeIn(vs ...time.Time) predicate.UsageReset", + "line": 391 + }, + { + "kind": "func", + "name": "ResetTimeNotIn", + "signature": "func ResetTimeNotIn(vs ...time.Time) predicate.UsageReset", + "line": 396 + }, + { + "kind": "func", + "name": "ResetTimeGT", + "signature": "func ResetTimeGT(v time.Time) predicate.UsageReset", + "line": 401 + }, + { + "kind": "func", + "name": "ResetTimeGTE", + "signature": "func ResetTimeGTE(v time.Time) predicate.UsageReset", + "line": 406 + }, + { + "kind": "func", + "name": "ResetTimeLT", + "signature": "func ResetTimeLT(v time.Time) predicate.UsageReset", + "line": 411 + }, + { + "kind": "func", + "name": "ResetTimeLTE", + "signature": "func ResetTimeLTE(v time.Time) predicate.UsageReset", + "line": 416 + }, + { + "kind": "func", + "name": "AnchorEQ", + "signature": "func AnchorEQ(v time.Time) predicate.UsageReset", + "line": 421 + }, + { + "kind": "func", + "name": "AnchorNEQ", + "signature": "func AnchorNEQ(v time.Time) predicate.UsageReset", + "line": 426 + }, + { + "kind": "func", + "name": "AnchorIn", + "signature": "func AnchorIn(vs ...time.Time) predicate.UsageReset", + "line": 431 + }, + { + "kind": "func", + "name": "AnchorNotIn", + "signature": "func AnchorNotIn(vs ...time.Time) predicate.UsageReset", + "line": 436 + }, + { + "kind": "func", + "name": "AnchorGT", + "signature": "func AnchorGT(v time.Time) predicate.UsageReset", + "line": 441 + }, + { + "kind": "func", + "name": "AnchorGTE", + "signature": "func AnchorGTE(v time.Time) predicate.UsageReset", + "line": 446 + }, + { + "kind": "func", + "name": "AnchorLT", + "signature": "func AnchorLT(v time.Time) predicate.UsageReset", + "line": 451 + }, + { + "kind": "func", + "name": "AnchorLTE", + "signature": "func AnchorLTE(v time.Time) predicate.UsageReset", + "line": 456 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalEQ", + "signature": "func UsagePeriodIntervalEQ(v datetime.ISODurationString) predicate.UsageReset", + "line": 461 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalNEQ", + "signature": "func UsagePeriodIntervalNEQ(v datetime.ISODurationString) predicate.UsageReset", + "line": 467 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalIn", + "signature": "func UsagePeriodIntervalIn(vs ...datetime.ISODurationString) predicate.UsageReset", + "line": 473 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalNotIn", + "signature": "func UsagePeriodIntervalNotIn(vs ...datetime.ISODurationString) predicate.UsageReset", + "line": 482 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalGT", + "signature": "func UsagePeriodIntervalGT(v datetime.ISODurationString) predicate.UsageReset", + "line": 491 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalGTE", + "signature": "func UsagePeriodIntervalGTE(v datetime.ISODurationString) predicate.UsageReset", + "line": 497 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalLT", + "signature": "func UsagePeriodIntervalLT(v datetime.ISODurationString) predicate.UsageReset", + "line": 503 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalLTE", + "signature": "func UsagePeriodIntervalLTE(v datetime.ISODurationString) predicate.UsageReset", + "line": 509 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalContains", + "signature": "func UsagePeriodIntervalContains(v datetime.ISODurationString) predicate.UsageReset", + "line": 515 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalHasPrefix", + "signature": "func UsagePeriodIntervalHasPrefix(v datetime.ISODurationString) predicate.UsageReset", + "line": 521 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalHasSuffix", + "signature": "func UsagePeriodIntervalHasSuffix(v datetime.ISODurationString) predicate.UsageReset", + "line": 527 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalEqualFold", + "signature": "func UsagePeriodIntervalEqualFold(v datetime.ISODurationString) predicate.UsageReset", + "line": 533 + }, + { + "kind": "func", + "name": "UsagePeriodIntervalContainsFold", + "signature": "func UsagePeriodIntervalContainsFold(v datetime.ISODurationString) predicate.UsageReset", + "line": 539 + }, + { + "kind": "func", + "name": "HasEntitlement", + "signature": "func HasEntitlement() predicate.UsageReset", + "line": 545 + }, + { + "kind": "func", + "name": "HasEntitlementWith", + "signature": "func HasEntitlementWith(preds ...predicate.Entitlement) predicate.UsageReset", + "line": 556 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.UsageReset) predicate.UsageReset", + "line": 568 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.UsageReset) predicate.UsageReset", + "line": 573 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.UsageReset) predicate.UsageReset", + "line": 578 + } + ], + "line_count": 580 + }, + "openmeter/ent/db/usagereset_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageResetCreate", + "signature": "type UsageResetCreate struct", + "line": 22 + }, + { + "kind": "func", + "name": "SetNamespace", + "signature": "func (_c *UsageResetCreate) SetNamespace(v string) *UsageResetCreate", + "line": 30 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_c *UsageResetCreate) SetAnnotations(v models.Annotations) *UsageResetCreate", + "line": 36 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *UsageResetCreate) SetCreatedAt(v time.Time) *UsageResetCreate", + "line": 42 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *UsageResetCreate) SetNillableCreatedAt(v *time.Time) *UsageResetCreate", + "line": 48 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *UsageResetCreate) SetUpdatedAt(v time.Time) *UsageResetCreate", + "line": 56 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *UsageResetCreate) SetNillableUpdatedAt(v *time.Time) *UsageResetCreate", + "line": 62 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *UsageResetCreate) SetDeletedAt(v time.Time) *UsageResetCreate", + "line": 70 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *UsageResetCreate) SetNillableDeletedAt(v *time.Time) *UsageResetCreate", + "line": 76 + }, + { + "kind": "func", + "name": "SetEntitlementID", + "signature": "func (_c *UsageResetCreate) SetEntitlementID(v string) *UsageResetCreate", + "line": 84 + }, + { + "kind": "func", + "name": "SetResetTime", + "signature": "func (_c *UsageResetCreate) SetResetTime(v time.Time) *UsageResetCreate", + "line": 90 + }, + { + "kind": "func", + "name": "SetAnchor", + "signature": "func (_c *UsageResetCreate) SetAnchor(v time.Time) *UsageResetCreate", + "line": 96 + }, + { + "kind": "func", + "name": "SetUsagePeriodInterval", + "signature": "func (_c *UsageResetCreate) SetUsagePeriodInterval(v datetime.ISODurationString) *UsageResetCreate", + "line": 102 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *UsageResetCreate) SetID(v string) *UsageResetCreate", + "line": 108 + }, + { + "kind": "func", + "name": "SetNillableID", + "signature": "func (_c *UsageResetCreate) SetNillableID(v *string) *UsageResetCreate", + "line": 114 + }, + { + "kind": "func", + "name": "SetEntitlement", + "signature": "func (_c *UsageResetCreate) SetEntitlement(v *Entitlement) *UsageResetCreate", + "line": 122 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *UsageResetCreate) Mutation() *UsageResetMutation", + "line": 127 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *UsageResetCreate) Save(ctx context.Context) (*UsageReset, error)", + "line": 132 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *UsageResetCreate) SaveX(ctx context.Context) *UsageReset", + "line": 138 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *UsageResetCreate) Exec(ctx context.Context) error", + "line": 147 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *UsageResetCreate) ExecX(ctx context.Context)", + "line": 153 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *UsageResetCreate) defaults()", + "line": 160 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *UsageResetCreate) check() error", + "line": 176 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *UsageResetCreate) sqlSave(ctx context.Context) (*UsageReset, error)", + "line": 209 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *UsageResetCreate) createSpec() (*UsageReset, *sqlgraph.CreateSpec)", + "line": 232 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *UsageResetCreate) OnConflict(opts ...sql.ConflictOption) *UsageResetUpsertOne", + "line": 310 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *UsageResetCreate) OnConflictColumns(columns ...string) *UsageResetUpsertOne", + "line": 323 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *UsageResetUpsert) SetAnnotations(v models.Annotations) *UsageResetUpsert", + "line": 344 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *UsageResetUpsert) UpdateAnnotations() *UsageResetUpsert", + "line": 350 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *UsageResetUpsert) ClearAnnotations() *UsageResetUpsert", + "line": 356 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *UsageResetUpsert) SetUpdatedAt(v time.Time) *UsageResetUpsert", + "line": 362 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *UsageResetUpsert) UpdateUpdatedAt() *UsageResetUpsert", + "line": 368 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *UsageResetUpsert) SetDeletedAt(v time.Time) *UsageResetUpsert", + "line": 374 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *UsageResetUpsert) UpdateDeletedAt() *UsageResetUpsert", + "line": 380 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *UsageResetUpsert) ClearDeletedAt() *UsageResetUpsert", + "line": 386 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *UsageResetUpsertOne) UpdateNewValues() *UsageResetUpsertOne", + "line": 402 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *UsageResetUpsertOne) Ignore() *UsageResetUpsertOne", + "line": 436 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *UsageResetUpsertOne) DoNothing() *UsageResetUpsertOne", + "line": 443 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *UsageResetUpsertOne) Update(set func(*UsageResetUpsert)) *UsageResetUpsertOne", + "line": 450 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *UsageResetUpsertOne) SetAnnotations(v models.Annotations) *UsageResetUpsertOne", + "line": 458 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *UsageResetUpsertOne) UpdateAnnotations() *UsageResetUpsertOne", + "line": 465 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *UsageResetUpsertOne) ClearAnnotations() *UsageResetUpsertOne", + "line": 472 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *UsageResetUpsertOne) SetUpdatedAt(v time.Time) *UsageResetUpsertOne", + "line": 479 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *UsageResetUpsertOne) UpdateUpdatedAt() *UsageResetUpsertOne", + "line": 486 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *UsageResetUpsertOne) SetDeletedAt(v time.Time) *UsageResetUpsertOne", + "line": 493 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *UsageResetUpsertOne) UpdateDeletedAt() *UsageResetUpsertOne", + "line": 500 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *UsageResetUpsertOne) ClearDeletedAt() *UsageResetUpsertOne", + "line": 507 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *UsageResetUpsertOne) Exec(ctx context.Context) error", + "line": 514 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *UsageResetUpsertOne) ExecX(ctx context.Context)", + "line": 522 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *UsageResetUpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 529 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *UsageResetUpsertOne) IDX(ctx context.Context) string", + "line": 543 + }, + { + "kind": "struct", + "name": "UsageResetCreateBulk", + "signature": "type UsageResetCreateBulk struct", + "line": 552 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *UsageResetCreateBulk) Save(ctx context.Context) ([]*UsageReset, error)", + "line": 560 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *UsageResetCreateBulk) SaveX(ctx context.Context) []*UsageReset", + "line": 616 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *UsageResetCreateBulk) Exec(ctx context.Context) error", + "line": 625 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *UsageResetCreateBulk) ExecX(ctx context.Context)", + "line": 631 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *UsageResetCreateBulk) OnConflict(opts ...sql.ConflictOption) *UsageResetUpsertBulk", + "line": 652 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *UsageResetCreateBulk) OnConflictColumns(columns ...string) *UsageResetUpsertBulk", + "line": 665 + }, + { + "kind": "struct", + "name": "UsageResetUpsertBulk", + "signature": "type UsageResetUpsertBulk struct", + "line": 674 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *UsageResetUpsertBulk) UpdateNewValues() *UsageResetUpsertBulk", + "line": 689 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *UsageResetUpsertBulk) Ignore() *UsageResetUpsertBulk", + "line": 725 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *UsageResetUpsertBulk) DoNothing() *UsageResetUpsertBulk", + "line": 732 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *UsageResetUpsertBulk) Update(set func(*UsageResetUpsert)) *UsageResetUpsertBulk", + "line": 739 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (u *UsageResetUpsertBulk) SetAnnotations(v models.Annotations) *UsageResetUpsertBulk", + "line": 747 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (u *UsageResetUpsertBulk) UpdateAnnotations() *UsageResetUpsertBulk", + "line": 754 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (u *UsageResetUpsertBulk) ClearAnnotations() *UsageResetUpsertBulk", + "line": 761 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *UsageResetUpsertBulk) SetUpdatedAt(v time.Time) *UsageResetUpsertBulk", + "line": 768 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *UsageResetUpsertBulk) UpdateUpdatedAt() *UsageResetUpsertBulk", + "line": 775 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *UsageResetUpsertBulk) SetDeletedAt(v time.Time) *UsageResetUpsertBulk", + "line": 782 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *UsageResetUpsertBulk) UpdateDeletedAt() *UsageResetUpsertBulk", + "line": 789 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *UsageResetUpsertBulk) ClearDeletedAt() *UsageResetUpsertBulk", + "line": 796 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *UsageResetUpsertBulk) Exec(ctx context.Context) error", + "line": 803 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *UsageResetUpsertBulk) ExecX(ctx context.Context)", + "line": 819 + } + ], + "line_count": 823 + }, + "openmeter/ent/db/usagereset_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageResetDelete", + "signature": "type UsageResetDelete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *UsageResetDelete) Where(ps ...predicate.UsageReset) *UsageResetDelete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *UsageResetDelete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *UsageResetDelete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *UsageResetDelete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "UsageResetDeleteOne", + "signature": "type UsageResetDeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *UsageResetDeleteOne) Where(ps ...predicate.UsageReset) *UsageResetDeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *UsageResetDeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *UsageResetDeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "openmeter/ent/db/usagereset_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageResetQuery", + "signature": "type UsageResetQuery struct", + "line": 21 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *UsageResetQuery) Where(ps ...predicate.UsageReset) *UsageResetQuery", + "line": 35 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *UsageResetQuery) Limit(limit int) *UsageResetQuery", + "line": 41 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *UsageResetQuery) Offset(offset int) *UsageResetQuery", + "line": 47 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *UsageResetQuery) Unique(unique bool) *UsageResetQuery", + "line": 54 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *UsageResetQuery) Order(o ...usagereset.OrderOption) *UsageResetQuery", + "line": 60 + }, + { + "kind": "func", + "name": "QueryEntitlement", + "signature": "func (_q *UsageResetQuery) QueryEntitlement() *EntitlementQuery", + "line": 66 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *UsageResetQuery) First(ctx context.Context) (*UsageReset, error)", + "line": 89 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *UsageResetQuery) FirstX(ctx context.Context) *UsageReset", + "line": 101 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *UsageResetQuery) FirstID(ctx context.Context) (id string, err error)", + "line": 111 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *UsageResetQuery) FirstIDX(ctx context.Context) string", + "line": 124 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *UsageResetQuery) Only(ctx context.Context) (*UsageReset, error)", + "line": 135 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *UsageResetQuery) OnlyX(ctx context.Context) *UsageReset", + "line": 151 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *UsageResetQuery) OnlyID(ctx context.Context) (id string, err error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *UsageResetQuery) OnlyIDX(ctx context.Context) string", + "line": 179 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *UsageResetQuery) All(ctx context.Context) ([]*UsageReset, error)", + "line": 188 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *UsageResetQuery) AllX(ctx context.Context) []*UsageReset", + "line": 198 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *UsageResetQuery) IDs(ctx context.Context) (ids []string, err error)", + "line": 207 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *UsageResetQuery) IDsX(ctx context.Context) []string", + "line": 219 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *UsageResetQuery) Count(ctx context.Context) (int, error)", + "line": 228 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *UsageResetQuery) CountX(ctx context.Context) int", + "line": 237 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *UsageResetQuery) Exist(ctx context.Context) (bool, error)", + "line": 246 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *UsageResetQuery) ExistX(ctx context.Context) bool", + "line": 259 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *UsageResetQuery) Clone() *UsageResetQuery", + "line": 269 + }, + { + "kind": "func", + "name": "WithEntitlement", + "signature": "func (_q *UsageResetQuery) WithEntitlement(opts ...func(*EntitlementQuery)) *UsageResetQuery", + "line": 288 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *UsageResetQuery) GroupBy(field string, fields ...string) *UsageResetGroupBy", + "line": 311 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *UsageResetQuery) Select(fields ...string) *UsageResetSelect", + "line": 332 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *UsageResetQuery) Aggregate(fns ...AggregateFunc) *UsageResetSelect", + "line": 341 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *UsageResetQuery) prepareQuery(ctx context.Context) error", + "line": 345 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *UsageResetQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*UsageReset, error)", + "line": 371 + }, + { + "kind": "func", + "name": "loadEntitlement", + "signature": "func (_q *UsageResetQuery) loadEntitlement(ctx context.Context, query *EntitlementQuery, nodes []*UsageReset, init func(*UsageReset), assign func(*UsageReset, *Entitlement)) error", + "line": 409 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *UsageResetQuery) sqlCount(ctx context.Context) (int, error)", + "line": 439 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *UsageResetQuery) querySpec() *sqlgraph.QuerySpec", + "line": 451 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *UsageResetQuery) sqlQuery(ctx context.Context) *sql.Selector", + "line": 494 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *UsageResetQuery) ForUpdate(opts ...sql.LockOption) *UsageResetQuery", + "line": 532 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *UsageResetQuery) ForShare(opts ...sql.LockOption) *UsageResetQuery", + "line": 545 + }, + { + "kind": "struct", + "name": "UsageResetGroupBy", + "signature": "type UsageResetGroupBy struct", + "line": 556 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *UsageResetGroupBy) Aggregate(fns ...AggregateFunc) *UsageResetGroupBy", + "line": 562 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *UsageResetGroupBy) Scan(ctx context.Context, v any) error", + "line": 568 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *UsageResetGroupBy) sqlScan(ctx context.Context, root *UsageResetQuery, v any) error", + "line": 576 + }, + { + "kind": "struct", + "name": "UsageResetSelect", + "signature": "type UsageResetSelect struct", + "line": 604 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *UsageResetSelect) Aggregate(fns ...AggregateFunc) *UsageResetSelect", + "line": 610 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *UsageResetSelect) Scan(ctx context.Context, v any) error", + "line": 616 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *UsageResetSelect) sqlScan(ctx context.Context, root *UsageResetQuery, v any) error", + "line": 624 + } + ], + "line_count": 643 + }, + "openmeter/ent/db/usagereset_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageResetUpdate", + "signature": "type UsageResetUpdate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *UsageResetUpdate) Where(ps ...predicate.UsageReset) *UsageResetUpdate", + "line": 27 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *UsageResetUpdate) SetAnnotations(v models.Annotations) *UsageResetUpdate", + "line": 33 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *UsageResetUpdate) ClearAnnotations() *UsageResetUpdate", + "line": 39 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *UsageResetUpdate) SetUpdatedAt(v time.Time) *UsageResetUpdate", + "line": 45 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *UsageResetUpdate) SetDeletedAt(v time.Time) *UsageResetUpdate", + "line": 51 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *UsageResetUpdate) SetNillableDeletedAt(v *time.Time) *UsageResetUpdate", + "line": 57 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *UsageResetUpdate) ClearDeletedAt() *UsageResetUpdate", + "line": 65 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *UsageResetUpdate) Mutation() *UsageResetMutation", + "line": 71 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *UsageResetUpdate) Save(ctx context.Context) (int, error)", + "line": 76 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *UsageResetUpdate) SaveX(ctx context.Context) int", + "line": 82 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *UsageResetUpdate) Exec(ctx context.Context) error", + "line": 91 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *UsageResetUpdate) ExecX(ctx context.Context)", + "line": 97 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *UsageResetUpdate) defaults()", + "line": 104 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *UsageResetUpdate) check() error", + "line": 112 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *UsageResetUpdate) sqlSave(ctx context.Context) (_node int, err error)", + "line": 119 + }, + { + "kind": "struct", + "name": "UsageResetUpdateOne", + "signature": "type UsageResetUpdateOne struct", + "line": 159 + }, + { + "kind": "func", + "name": "SetAnnotations", + "signature": "func (_u *UsageResetUpdateOne) SetAnnotations(v models.Annotations) *UsageResetUpdateOne", + "line": 167 + }, + { + "kind": "func", + "name": "ClearAnnotations", + "signature": "func (_u *UsageResetUpdateOne) ClearAnnotations() *UsageResetUpdateOne", + "line": 173 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *UsageResetUpdateOne) SetUpdatedAt(v time.Time) *UsageResetUpdateOne", + "line": 179 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *UsageResetUpdateOne) SetDeletedAt(v time.Time) *UsageResetUpdateOne", + "line": 185 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *UsageResetUpdateOne) SetNillableDeletedAt(v *time.Time) *UsageResetUpdateOne", + "line": 191 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *UsageResetUpdateOne) ClearDeletedAt() *UsageResetUpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *UsageResetUpdateOne) Mutation() *UsageResetMutation", + "line": 205 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *UsageResetUpdateOne) Where(ps ...predicate.UsageReset) *UsageResetUpdateOne", + "line": 210 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *UsageResetUpdateOne) Select(field string, fields ...string) *UsageResetUpdateOne", + "line": 217 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *UsageResetUpdateOne) Save(ctx context.Context) (*UsageReset, error)", + "line": 223 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *UsageResetUpdateOne) SaveX(ctx context.Context) *UsageReset", + "line": 229 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *UsageResetUpdateOne) Exec(ctx context.Context) error", + "line": 238 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *UsageResetUpdateOne) ExecX(ctx context.Context)", + "line": 244 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *UsageResetUpdateOne) defaults()", + "line": 251 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_u *UsageResetUpdateOne) check() error", + "line": 259 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *UsageResetUpdateOne) sqlSave(ctx context.Context) (_node *UsageReset, err error)", + "line": 266 + } + ], + "line_count": 323 + }, + "openmeter/ent/entc.go": { + "header": "\t\"log\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 19 + } + ], + "line_count": 47 + }, + "openmeter/ent/generate.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "openmeter/ent/schema/addon.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 16 + }, + { + "kind": "struct", + "name": "AddonRateCard", + "signature": "type AddonRateCard struct", + "line": 87 + } + ], + "line_count": 145 + }, + "openmeter/ent/schema/app.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "App", + "signature": "type App struct", + "line": 16 + }, + { + "kind": "struct", + "name": "AppCustomer", + "signature": "type AppCustomer struct", + "line": 53 + } + ], + "line_count": 100 + }, + "openmeter/ent/schema/app_stripe.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "AppStripe", + "signature": "type AppStripe struct", + "line": 15 + }, + { + "kind": "struct", + "name": "AppStripeCustomer", + "signature": "type AppStripeCustomer struct", + "line": 62 + } + ], + "line_count": 120 + }, + "openmeter/ent/schema/appcustominvoicing.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "AppCustomInvoicing", + "signature": "type AppCustomInvoicing struct", + "line": 15 + }, + { + "kind": "struct", + "name": "AppCustomInvoicingCustomer", + "signature": "type AppCustomInvoicingCustomer struct", + "line": 54 + } + ], + "line_count": 106 + }, + "openmeter/ent/schema/balance_snapshot.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceSnapshot", + "signature": "type BalanceSnapshot struct", + "line": 15 + } + ], + "line_count": 64 + }, + "openmeter/ent/schema/billing.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingProfile", + "signature": "type BillingProfile struct", + "line": 28 + }, + { + "kind": "struct", + "name": "BillingWorkflowConfig", + "signature": "type BillingWorkflowConfig struct", + "line": 110 + }, + { + "kind": "struct", + "name": "BillingCustomerOverride", + "signature": "type BillingCustomerOverride struct", + "line": 178 + }, + { + "kind": "struct", + "name": "InvoiceLineBaseMixin", + "signature": "type InvoiceLineBaseMixin struct", + "line": 281 + }, + { + "kind": "struct", + "name": "BillingInvoiceLine", + "signature": "type BillingInvoiceLine struct", + "line": 303 + }, + { + "kind": "struct", + "name": "BillingInvoiceFlatFeeLineConfig", + "signature": "type BillingInvoiceFlatFeeLineConfig struct", + "line": 511 + }, + { + "kind": "struct", + "name": "BillingInvoiceUsageBasedLineConfig", + "signature": "type BillingInvoiceUsageBasedLineConfig struct", + "line": 541 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscountBase", + "signature": "type BillingInvoiceLineDiscountBase struct", + "line": 587 + }, + { + "kind": "struct", + "name": "BillingInvoiceSplitLineGroup", + "signature": "type BillingInvoiceSplitLineGroup struct", + "line": 611 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineDiscount", + "signature": "type BillingInvoiceLineDiscount struct", + "line": 755 + }, + { + "kind": "struct", + "name": "BillingInvoiceLineUsageDiscount", + "signature": "type BillingInvoiceLineUsageDiscount struct", + "line": 838 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLine", + "signature": "type BillingStandardInvoiceDetailedLine struct", + "line": 898 + }, + { + "kind": "struct", + "name": "BillingStandardInvoiceDetailedLineAmountDiscount", + "signature": "type BillingStandardInvoiceDetailedLineAmountDiscount struct", + "line": 956 + }, + { + "kind": "struct", + "name": "BillingInvoice", + "signature": "type BillingInvoice struct", + "line": 1018 + }, + { + "kind": "struct", + "name": "BillingInvoiceValidationIssue", + "signature": "type BillingInvoiceValidationIssue struct", + "line": 1249 + }, + { + "kind": "struct", + "name": "BillingSequenceNumbers", + "signature": "type BillingSequenceNumbers struct", + "line": 1308 + }, + { + "kind": "struct", + "name": "BillingCustomerLock", + "signature": "type BillingCustomerLock struct", + "line": 1334 + }, + { + "kind": "struct", + "name": "BillingInvoiceWriteSchemaLevel", + "signature": "type BillingInvoiceWriteSchemaLevel struct", + "line": 1363 + } + ], + "line_count": 1384 + }, + "openmeter/ent/schema/charges.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargesSearchV1", + "signature": "type ChargesSearchV1 struct", + "line": 48 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (v ChargesSearchV1) Annotations() []schema.Annotation", + "line": 57 + }, + { + "kind": "struct", + "name": "Charge", + "signature": "type Charge struct", + "line": 96 + } + ], + "line_count": 173 + }, + "openmeter/ent/schema/chargescreditpurchase.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeCreditPurchase", + "signature": "type ChargeCreditPurchase struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseCreditGrant", + "signature": "type ChargeCreditPurchaseCreditGrant struct", + "line": 119 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseExternalPayment", + "signature": "type ChargeCreditPurchaseExternalPayment struct", + "line": 167 + }, + { + "kind": "struct", + "name": "ChargeCreditPurchaseInvoicedPayment", + "signature": "type ChargeCreditPurchaseInvoicedPayment struct", + "line": 202 + } + ], + "line_count": 244 + }, + "openmeter/ent/schema/chargesflatfee.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeFlatFee", + "signature": "type ChargeFlatFee struct", + "line": 23 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRun", + "signature": "type ChargeFlatFeeRun struct", + "line": 141 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunDetailedLine", + "signature": "type ChargeFlatFeeRunDetailedLine struct", + "line": 237 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunPayment", + "signature": "type ChargeFlatFeeRunPayment struct", + "line": 288 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunInvoicedUsage", + "signature": "type ChargeFlatFeeRunInvoicedUsage struct", + "line": 329 + }, + { + "kind": "struct", + "name": "ChargeFlatFeeRunCreditAllocations", + "signature": "type ChargeFlatFeeRunCreditAllocations struct", + "line": 367 + } + ], + "line_count": 402 + }, + "openmeter/ent/schema/chargesusagebased.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "ChargeUsageBased", + "signature": "type ChargeUsageBased struct", + "line": 24 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRuns", + "signature": "type ChargeUsageBasedRuns struct", + "line": 143 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunDetailedLine", + "signature": "type ChargeUsageBasedRunDetailedLine struct", + "line": 260 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunCreditAllocations", + "signature": "type ChargeUsageBasedRunCreditAllocations struct", + "line": 339 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunInvoicedUsage", + "signature": "type ChargeUsageBasedRunInvoicedUsage struct", + "line": 372 + }, + { + "kind": "struct", + "name": "ChargeUsageBasedRunPayment", + "signature": "type ChargeUsageBasedRunPayment struct", + "line": 403 + } + ], + "line_count": 432 + }, + "openmeter/ent/schema/creditrealizationlineage.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"", + "symbols": [ + { + "kind": "func", + "name": "creditRealizationLineageNow", + "signature": "func creditRealizationLineageNow() time.Time", + "line": 20 + }, + { + "kind": "struct", + "name": "CreditRealizationLineage", + "signature": "type CreditRealizationLineage struct", + "line": 24 + }, + { + "kind": "struct", + "name": "CreditRealizationLineageSegment", + "signature": "type CreditRealizationLineageSegment struct", + "line": 97 + } + ], + "line_count": 165 + }, + "openmeter/ent/schema/custom_currencies.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomCurrency", + "signature": "type CustomCurrency struct", + "line": 16 + }, + { + "kind": "struct", + "name": "CurrencyCostBasis", + "signature": "type CurrencyCostBasis struct", + "line": 61 + } + ], + "line_count": 114 + }, + "openmeter/ent/schema/customer.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Customer", + "signature": "type Customer struct", + "line": 17 + }, + { + "kind": "struct", + "name": "CustomerSubjects", + "signature": "type CustomerSubjects struct", + "line": 90 + } + ], + "line_count": 156 + }, + "openmeter/ent/schema/entitlement.go": { + "header": "\t\"fmt\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"", + "symbols": [ + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 20 + } + ], + "line_count": 114 + }, + "openmeter/ent/schema/feature.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Feature", + "signature": "type Feature struct", + "line": 17 + } + ], + "line_count": 96 + }, + "openmeter/ent/schema/grant.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "Grant", + "signature": "type Grant struct", + "line": 15 + } + ], + "line_count": 75 + }, + "openmeter/ent/schema/ledger_account.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerAccount", + "signature": "type LedgerAccount struct", + "line": 16 + }, + { + "kind": "struct", + "name": "LedgerSubAccount", + "signature": "type LedgerSubAccount struct", + "line": 48 + }, + { + "kind": "struct", + "name": "LedgerSubAccountRoute", + "signature": "type LedgerSubAccountRoute struct", + "line": 96 + } + ], + "line_count": 154 + }, + "openmeter/ent/schema/ledger_breakage_record.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerBreakageRecord", + "signature": "type LedgerBreakageRecord struct", + "line": 15 + } + ], + "line_count": 130 + }, + "openmeter/ent/schema/ledger_customer_account.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\t\"entgo.io/ent/schema/index\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerCustomerAccount", + "signature": "type LedgerCustomerAccount struct", + "line": 14 + } + ], + "line_count": 44 + }, + "openmeter/ent/schema/ledger_entry.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerEntry", + "signature": "type LedgerEntry struct", + "line": 15 + } + ], + "line_count": 72 + }, + "openmeter/ent/schema/ledger_transaction.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransaction", + "signature": "type LedgerTransaction struct", + "line": 13 + } + ], + "line_count": 53 + }, + "openmeter/ent/schema/ledger_transaction_group.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/edge\"\n\t\"entgo.io/ent/schema/index\"", + "symbols": [ + { + "kind": "struct", + "name": "LedgerTransactionGroup", + "signature": "type LedgerTransactionGroup struct", + "line": 11 + } + ], + "line_count": 34 + }, + "openmeter/ent/schema/llmcostprice.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "LLMCostPrice", + "signature": "type LLMCostPrice struct", + "line": 16 + } + ], + "line_count": 95 + }, + "openmeter/ent/schema/meter.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect/entsql\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "Meter", + "signature": "type Meter struct", + "line": 15 + } + ], + "line_count": 57 + }, + "openmeter/ent/schema/notification.go": { + "header": "\t\"database/sql/driver\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationChannel", + "signature": "type NotificationChannel struct", + "line": 21 + }, + { + "kind": "struct", + "name": "NotificationRule", + "signature": "type NotificationRule struct", + "line": 67 + }, + { + "kind": "struct", + "name": "NotificationEvent", + "signature": "type NotificationEvent struct", + "line": 118 + }, + { + "kind": "struct", + "name": "NotificationEventDeliveryStatus", + "signature": "type NotificationEventDeliveryStatus struct", + "line": 170 + } + ], + "line_count": 417 + }, + "openmeter/ent/schema/organizationdefaulttaxcodes.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodes", + "signature": "type OrganizationDefaultTaxCodes struct", + "line": 15 + } + ], + "line_count": 61 + }, + "openmeter/ent/schema/planaddon.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect/entsql\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddon", + "signature": "type PlanAddon struct", + "line": 13 + } + ], + "line_count": 71 + }, + "openmeter/ent/schema/productcatalog.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 16 + }, + { + "kind": "struct", + "name": "PlanPhase", + "signature": "type PlanPhase struct", + "line": 86 + }, + { + "kind": "struct", + "name": "PlanRateCard", + "signature": "type PlanRateCard struct", + "line": 141 + } + ], + "line_count": 207 + }, + "openmeter/ent/schema/ratecard.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/field\"", + "symbols": [ + { + "kind": "struct", + "name": "RateCard", + "signature": "type RateCard struct", + "line": 13 + } + ], + "line_count": 68 + }, + "openmeter/ent/schema/subject.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Subject", + "signature": "type Subject struct", + "line": 14 + } + ], + "line_count": 68 + }, + "openmeter/ent/schema/subscription.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "Subscription", + "signature": "type Subscription struct", + "line": 18 + }, + { + "kind": "struct", + "name": "SubscriptionPhase", + "signature": "type SubscriptionPhase struct", + "line": 95 + }, + { + "kind": "struct", + "name": "SubscriptionItem", + "signature": "type SubscriptionItem struct", + "line": 141 + } + ], + "line_count": 243 + }, + "openmeter/ent/schema/subscription_addon.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect/entsql\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddon", + "signature": "type SubscriptionAddon struct", + "line": 15 + }, + { + "kind": "struct", + "name": "SubscriptionAddonQuantity", + "signature": "type SubscriptionAddonQuantity struct", + "line": 56 + } + ], + "line_count": 91 + }, + "openmeter/ent/schema/subscriptionbillingsync.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionBillingSyncState", + "signature": "type SubscriptionBillingSyncState struct", + "line": 13 + } + ], + "line_count": 54 + }, + "openmeter/ent/schema/taxcode.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/entsql\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCode", + "signature": "type TaxCode struct", + "line": 18 + }, + { + "kind": "struct", + "name": "TaxMixin", + "signature": "type TaxMixin struct", + "line": 77 + } + ], + "line_count": 100 + }, + "openmeter/ent/schema/usage_reset.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/schema/edge\"", + "symbols": [ + { + "kind": "struct", + "name": "UsageReset", + "signature": "type UsageReset struct", + "line": 14 + } + ], + "line_count": 54 + }, + "openmeter/ent/tx/enttx.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "txCreator", + "signature": "type txCreator struct", + "line": 13 + }, + { + "kind": "func", + "name": "NewCreator", + "signature": "func NewCreator(db *db.Client) transaction.Creator", + "line": 18 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (t *txCreator) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 22 + } + ], + "line_count": 30 + }, + "openmeter/entitlement/access.go": { + "header": "type Access struct {\n\tEntitlements map[string]EntitlementValueWithId\n}", + "symbols": [ + { + "kind": "struct", + "name": "Access", + "signature": "type Access struct", + "line": 3 + }, + { + "kind": "struct", + "name": "EntitlementValueWithId", + "signature": "type EntitlementValueWithId struct", + "line": 8 + } + ], + "line_count": 12 + }, + "openmeter/entitlement/adapter/entitlement.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "entitlementDBAdapter", + "signature": "type entitlementDBAdapter struct", + "line": 35 + }, + { + "kind": "interface", + "name": "repo", + "signature": "type repo interface", + "line": 39 + }, + { + "kind": "func", + "name": "NewPostgresEntitlementRepo", + "signature": "func NewPostgresEntitlementRepo(db *db.Client) *entitlementDBAdapter", + "line": 51 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (a *entitlementDBAdapter) GetEntitlement(ctx context.Context, entitlementID models.NamespacedID) (*entitlement.Entitlement, error)", + "line": 57 + }, + { + "kind": "func", + "name": "GetActiveEntitlementOfCustomerAt", + "signature": "func (a *entitlementDBAdapter) GetActiveEntitlementOfCustomerAt(ctx context.Context, namespace string, customerID string, featureKey string, at time.Time) (*entitlement.Entitlement, error)", + "line": 81 + }, + { + "kind": "func", + "name": "CreateEntitlement", + "signature": "func (a *entitlementDBAdapter) CreateEntitlement(ctx context.Context, ent entitlement.CreateEntitlementRepoInputs) (*entitlement.Entitlement, error)", + "line": 115 + }, + { + "kind": "func", + "name": "DeleteEntitlement", + "signature": "func (a *entitlementDBAdapter) DeleteEntitlement(ctx context.Context, entitlementID models.NamespacedID, at time.Time) error", + "line": 199 + }, + { + "kind": "func", + "name": "DeactivateEntitlement", + "signature": "func (a *entitlementDBAdapter) DeactivateEntitlement(ctx context.Context, entitlementID models.NamespacedID, at time.Time) error", + "line": 220 + }, + { + "kind": "func", + "name": "EntitlementsByIngestedEventsQuery", + "signature": "func EntitlementsByIngestedEventsQuery(dialect, ns, subject string, meters ...string) (string, []any)", + "line": 241 + }, + { + "kind": "func", + "name": "ListEntitlementsAffectedByIngestEvents", + "signature": "func (a *entitlementDBAdapter) ListEntitlementsAffectedByIngestEvents(ctx context.Context, eventFilter balanceworker.IngestEventQueryFilter) ([]balanceworker.ListAffectedEntitlementsResponse, error)", + "line": 319 + }, + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (a *entitlementDBAdapter) ListEntitlements(ctx context.Context, params entitlement.ListEntitlementsParams) (pagination.Result[entitlement.Entitlement], error)", + "line": 378 + }, + { + "kind": "func", + "name": "mapEntitlementEntity", + "signature": "func (a *entitlementDBAdapter) mapEntitlementEntity(e *db.Entitlement) (*entitlement.Entitlement, error)", + "line": 558 + }, + { + "kind": "func", + "name": "UpdateEntitlementUsagePeriod", + "signature": "func (a *entitlementDBAdapter) UpdateEntitlementUsagePeriod(ctx context.Context, entitlementID models.NamespacedID, params entitlement.UpdateEntitlementUsagePeriodParams) error", + "line": 663 + }, + { + "kind": "func", + "name": "UpsertEntitlementCurrentPeriods", + "signature": "func (a *entitlementDBAdapter) UpsertEntitlementCurrentPeriods(ctx context.Context, updates []entitlement.UpsertEntitlementCurrentPeriodElement) error", + "line": 680 + }, + { + "kind": "func", + "name": "ListActiveEntitlementsWithExpiredUsagePeriod", + "signature": "func (a *entitlementDBAdapter) ListActiveEntitlementsWithExpiredUsagePeriod(ctx context.Context, params entitlement.ListExpiredEntitlementsParams) ([]entitlement.Entitlement, error)", + "line": 766 + }, + { + "kind": "func", + "name": "LockEntitlementForTx", + "signature": "func (a *entitlementDBAdapter) LockEntitlementForTx(ctx context.Context, tx *entutils.TxDriver, entitlementID models.NamespacedID, wait bool) error", + "line": 842 + }, + { + "kind": "struct", + "name": "namespacesWithCount", + "signature": "type namespacesWithCount struct", + "line": 869 + }, + { + "kind": "func", + "name": "ListNamespacesWithActiveEntitlements", + "signature": "func (a *entitlementDBAdapter) ListNamespacesWithActiveEntitlements(ctx context.Context, includeDeletedAfter time.Time) ([]string, error)", + "line": 874 + }, + { + "kind": "func", + "name": "GetScheduledEntitlements", + "signature": "func (a *entitlementDBAdapter) GetScheduledEntitlements(ctx context.Context, namespace string, customerID string, featureKey string, starting time.Time) ([]entitlement.Entitlement, error)", + "line": 909 + }, + { + "kind": "func", + "name": "entitlementActiveBetween", + "signature": "func entitlementActiveBetween(from, to time.Time) []predicate.Entitlement", + "line": 960 + }, + { + "kind": "func", + "name": "customerNotDeletedAt", + "signature": "func customerNotDeletedAt(at time.Time) predicate.Customer", + "line": 973 + }, + { + "kind": "func", + "name": "EntitlementActiveAt", + "signature": "func EntitlementActiveAt(at time.Time) []predicate.Entitlement", + "line": 981 + }, + { + "kind": "func", + "name": "withAllUsageResets", + "signature": "func withAllUsageResets(q *db.EntitlementQuery, namespaces []string) *db.EntitlementQuery", + "line": 995 + } + ], + "line_count": 1008 + }, + "openmeter/entitlement/adapter/entitlement_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "deps", + "signature": "type deps struct", + "line": 39 + }, + { + "kind": "func", + "name": "setup", + "signature": "func setup(t *testing.T) (deps deps, cleanup func())", + "line": 48 + }, + { + "kind": "func", + "name": "createCustomerWithSubject", + "signature": "func createCustomerWithSubject(t *testing.T, subjectRepo subject.Service, customerRepo customer.Adapter, namespace string, subjectKey string) *customer.Customer", + "line": 110 + }, + { + "kind": "func", + "name": "createCustomerWithSubjectAndKey", + "signature": "func createCustomerWithSubjectAndKey(t *testing.T, subjectRepo subject.Service, customerRepo customer.Adapter, namespace string, subjectKey string, customerKey string) *customer.Customer", + "line": 138 + }, + { + "kind": "func", + "name": "TestUpsertEntitlementCurrentPeriods", + "signature": "func TestUpsertEntitlementCurrentPeriods(t *testing.T)", + "line": 165 + }, + { + "kind": "func", + "name": "TestListActiveEntitlementsWithExpiredUsagePeriod", + "signature": "func TestListActiveEntitlementsWithExpiredUsagePeriod(t *testing.T)", + "line": 330 + }, + { + "kind": "func", + "name": "TestEntitlementLoadsSubjectAndCustomerAndPreservesAcrossTypedMapping", + "signature": "func TestEntitlementLoadsSubjectAndCustomerAndPreservesAcrossTypedMapping(t *testing.T)", + "line": 545 + }, + { + "kind": "func", + "name": "TestListEntitlementsFiltersByCustomerKeysAndFeatureIDsOrKeys", + "signature": "func TestListEntitlementsFiltersByCustomerKeysAndFeatureIDsOrKeys(t *testing.T)", + "line": 627 + }, + { + "kind": "func", + "name": "TestListEntitlementsByIngestedEventsQuery", + "signature": "func TestListEntitlementsByIngestedEventsQuery(t *testing.T)", + "line": 702 + }, + { + "kind": "func", + "name": "TestListEntitlementsByIngestedEvents", + "signature": "func TestListEntitlementsByIngestedEvents(t *testing.T)", + "line": 755 + } + ], + "line_count": 942 + }, + "openmeter/entitlement/adapter/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Tx", + "signature": "func (e *entitlementDBAdapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 16 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (e *entitlementDBAdapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *entitlementDBAdapter", + "line": 26 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (e *entitlementDBAdapter) Self() *entitlementDBAdapter", + "line": 31 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (u *usageResetDBAdapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 35 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (u *usageResetDBAdapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *usageResetDBAdapter", + "line": 45 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (u *usageResetDBAdapter) Self() *usageResetDBAdapter", + "line": 50 + } + ], + "line_count": 52 + }, + "openmeter/entitlement/adapter/usage_reset.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\tmeteredentitlement \"github.com/openmeterio/openmeter/openmeter/entitlement/metered\"", + "symbols": [ + { + "kind": "struct", + "name": "usageResetDBAdapter", + "signature": "type usageResetDBAdapter struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewPostgresUsageResetRepo", + "signature": "func NewPostgresUsageResetRepo(db *db.Client) *usageResetDBAdapter", + "line": 24 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (a *usageResetDBAdapter) Save(ctx context.Context, usageResetTime meteredentitlement.UsageResetUpdate) error", + "line": 30 + } + ], + "line_count": 50 + }, + "openmeter/entitlement/balanceworker/entitlementhandler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "handleEntitlementEventOptions", + "signature": "type handleEntitlementEventOptions struct", + "line": 26 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *handleEntitlementEventOptions) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "WithSource", + "signature": "func WithSource(source string) handleOption", + "line": 49 + }, + { + "kind": "func", + "name": "WithEventAt", + "signature": "func WithEventAt(eventAt time.Time) handleOption", + "line": 55 + }, + { + "kind": "func", + "name": "WithSourceOperation", + "signature": "func WithSourceOperation(sourceOperation snapshot.ValueOperationType) handleOption", + "line": 61 + }, + { + "kind": "func", + "name": "WithRawIngestedEvents", + "signature": "func WithRawIngestedEvents(rawIngestedEvents []serializer.CloudEventsKafkaPayload) handleOption", + "line": 67 + }, + { + "kind": "func", + "name": "getOptions", + "signature": "func getOptions(opts ...handleOption) handleEntitlementEventOptions", + "line": 73 + }, + { + "kind": "func", + "name": "handleEntitlementEvent", + "signature": "func (w *Worker) handleEntitlementEvent(ctx context.Context, entitlementID pkgmodels.NamespacedID, options ...handleOption) (marshaler.Event, error)", + "line": 85 + }, + { + "kind": "func", + "name": "processEntitlementEntity", + "signature": "func (w *Worker) processEntitlementEntity(ctx context.Context, entitlementEntity *entitlement.Entitlement, calculatedAt time.Time, options ...handleOption) (marshaler.Event, error)", + "line": 138 + }, + { + "kind": "struct", + "name": "snapshotToEventInput", + "signature": "type snapshotToEventInput struct", + "line": 206 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *snapshotToEventInput) Validate() error", + "line": 215 + }, + { + "kind": "func", + "name": "snapshotToEvent", + "signature": "func (w *Worker) snapshotToEvent(ctx context.Context, in snapshotToEventInput) (marshaler.Event, error)", + "line": 247 + }, + { + "kind": "func", + "name": "createSnapshotEvent", + "signature": "func (w *Worker) createSnapshotEvent(ctx context.Context, entitlementEntity *entitlement.Entitlement, calculatedAt time.Time, opts handleEntitlementEventOptions) (marshaler.Event, error)", + "line": 274 + }, + { + "kind": "func", + "name": "createDeletedSnapshotEvent", + "signature": "func (w *Worker) createDeletedSnapshotEvent(ctx context.Context, entitlementEntity *entitlement.Entitlement, calculationTime time.Time) (marshaler.Event, error)", + "line": 310 + } + ], + "line_count": 340 + }, + "openmeter/entitlement/balanceworker/events/recalculate.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (o OperationType) Values() []OperationType", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o OperationType) Validate() error", + "line": 46 + }, + { + "kind": "struct", + "name": "RecalculateEvent", + "signature": "type RecalculateEvent struct", + "line": 65 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e RecalculateEvent) EventName() string", + "line": 73 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e RecalculateEvent) EventMetadata() metadata.EventMetadata", + "line": 77 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e RecalculateEvent) Validate() error", + "line": 84 + } + ], + "line_count": 100 + }, + "openmeter/entitlement/balanceworker/filters.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementFiltersConfig", + "signature": "type EntitlementFiltersConfig struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c EntitlementFiltersConfig) Validate() error", + "line": 46 + }, + { + "kind": "struct", + "name": "EntitlementFilters", + "signature": "type EntitlementFilters struct", + "line": 70 + }, + { + "kind": "func", + "name": "NewEntitlementFilters", + "signature": "func NewEntitlementFilters(cfg EntitlementFiltersConfig) (*EntitlementFilters, error)", + "line": 79 + }, + { + "kind": "func", + "name": "WithMetrics", + "signature": "func (f EntitlementFilters) WithMetrics(meter metric.Meter) (*EntitlementFilters, error)", + "line": 103 + }, + { + "kind": "func", + "name": "IsNamespaceInScope", + "signature": "func (f EntitlementFilters) IsNamespaceInScope(ctx context.Context, namespace string) (bool, error)", + "line": 129 + }, + { + "kind": "func", + "name": "IsEntitlementInScope", + "signature": "func (f EntitlementFilters) IsEntitlementInScope(ctx context.Context, req filters.EntitlementFilterRequest) (bool, error)", + "line": 141 + }, + { + "kind": "func", + "name": "executeFilters", + "signature": "func (f EntitlementFilters) executeFilters(ctx context.Context, check func(ctx context.Context, filter filters.Filter) (bool, error), scope FilterScope, additionalAttributes ...attribute.KeyValue) (bool, error)", + "line": 158 + }, + { + "kind": "func", + "name": "RecordLastCalculation", + "signature": "func (f EntitlementFilters) RecordLastCalculation(ctx context.Context, req filters.RecordLastCalculationRequest) error", + "line": 189 + } + ], + "line_count": 201 + }, + "openmeter/entitlement/balanceworker/filters/filter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementFilterRequest", + "signature": "type EntitlementFilterRequest struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r EntitlementFilterRequest) Validate() error", + "line": 19 + }, + { + "kind": "interface", + "name": "Filter", + "signature": "type Filter interface", + "line": 41 + }, + { + "kind": "interface", + "name": "NamedFilter", + "signature": "type NamedFilter interface", + "line": 46 + }, + { + "kind": "struct", + "name": "RecordLastCalculationRequest", + "signature": "type RecordLastCalculationRequest struct", + "line": 52 + }, + { + "kind": "interface", + "name": "CalculationTimeRecorder", + "signature": "type CalculationTimeRecorder interface", + "line": 58 + } + ], + "line_count": 62 + }, + "openmeter/entitlement/balanceworker/filters/highwatermark.go": { + "header": "\t\"context\"\n\t\"time\"\n\tlru \"github.com/hashicorp/golang-lru/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "highWatermarkCacheEntry", + "signature": "type highWatermarkCacheEntry struct", + "line": 23 + }, + { + "kind": "struct", + "name": "HighWatermarkCache", + "signature": "type HighWatermarkCache struct", + "line": 28 + }, + { + "kind": "func", + "name": "NewHighWatermarkCache", + "signature": "func NewHighWatermarkCache(lruCacheSize int) (*HighWatermarkCache, error)", + "line": 32 + }, + { + "kind": "func", + "name": "Name", + "signature": "func (f *HighWatermarkCache) Name() string", + "line": 41 + }, + { + "kind": "func", + "name": "IsNamespaceInScope", + "signature": "func (f *HighWatermarkCache) IsNamespaceInScope(ctx context.Context, namespace string) (bool, error)", + "line": 45 + }, + { + "kind": "func", + "name": "IsEntitlementInScope", + "signature": "func (f *HighWatermarkCache) IsEntitlementInScope(ctx context.Context, req EntitlementFilterRequest) (bool, error)", + "line": 49 + }, + { + "kind": "func", + "name": "RecordLastCalculation", + "signature": "func (f *HighWatermarkCache) RecordLastCalculation(ctx context.Context, req RecordLastCalculationRequest) error", + "line": 83 + }, + { + "kind": "struct", + "name": "highWatermarkBackendGetResult", + "signature": "type highWatermarkBackendGetResult struct", + "line": 89 + }, + { + "kind": "interface", + "name": "HighWatermarkBackend", + "signature": "type HighWatermarkBackend interface", + "line": 94 + }, + { + "kind": "struct", + "name": "HighWatermarkInMemoryBackend", + "signature": "type HighWatermarkInMemoryBackend struct", + "line": 103 + }, + { + "kind": "func", + "name": "NewHighWatermarkInMemoryBackend", + "signature": "func NewHighWatermarkInMemoryBackend(cacheSize int) (*HighWatermarkInMemoryBackend, error)", + "line": 107 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (b *HighWatermarkInMemoryBackend) Get(ctx context.Context, entitlementID string) (highWatermarkBackendGetResult, error)", + "line": 116 + }, + { + "kind": "func", + "name": "Record", + "signature": "func (b *HighWatermarkInMemoryBackend) Record(ctx context.Context, req RecordLastCalculationRequest) error", + "line": 125 + } + ], + "line_count": 132 + }, + "openmeter/entitlement/balanceworker/filters/notifications.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "NotificationsFilterConfig", + "signature": "type NotificationsFilterConfig struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c NotificationsFilterConfig) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "NotificationsFilter", + "signature": "type NotificationsFilter struct", + "line": 41 + }, + { + "kind": "func", + "name": "NewNotificationsFilter", + "signature": "func NewNotificationsFilter(cfg NotificationsFilterConfig) (NamedFilter, error)", + "line": 47 + }, + { + "kind": "func", + "name": "Name", + "signature": "func (f *NotificationsFilter) Name() string", + "line": 66 + }, + { + "kind": "func", + "name": "IsNamespaceInScope", + "signature": "func (f *NotificationsFilter) IsNamespaceInScope(ctx context.Context, namespace string) (bool, error)", + "line": 70 + }, + { + "kind": "func", + "name": "IsEntitlementInScope", + "signature": "func (f *NotificationsFilter) IsEntitlementInScope(ctx context.Context, req EntitlementFilterRequest) (bool, error)", + "line": 79 + }, + { + "kind": "func", + "name": "fetchRulesForNamespace", + "signature": "func (f *NotificationsFilter) fetchRulesForNamespace(ctx context.Context, namespace string) ([]notification.Rule, error)", + "line": 111 + } + ], + "line_count": 123 + }, + "openmeter/entitlement/balanceworker/ingesthandler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "handleBatchedIngestEvent", + "signature": "func (w *Worker) handleBatchedIngestEvent(ctx context.Context, event ingestevents.EventBatchedIngest) error", + "line": 20 + }, + { + "kind": "func", + "name": "GetEntitlementsAffectedByMeterSubject", + "signature": "func (w *Worker) GetEntitlementsAffectedByMeterSubject(ctx context.Context, namespace string, meterSlugs []string, subject string) ([]pkgmodels.NamespacedID, error)", + "line": 81 + } + ], + "line_count": 113 + }, + "openmeter/entitlement/balanceworker/recalculate.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "RecalculatorOptions", + "signature": "type RecalculatorOptions struct", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o RecalculatorOptions) Validate() error", + "line": 61 + }, + { + "kind": "struct", + "name": "Recalculator", + "signature": "type Recalculator struct", + "line": 107 + }, + { + "kind": "func", + "name": "NewRecalculator", + "signature": "func NewRecalculator(opts RecalculatorOptions) (*Recalculator, error)", + "line": 119 + }, + { + "kind": "func", + "name": "GetEntitlementFilters", + "signature": "func (r *Recalculator) GetEntitlementFilters() *EntitlementFilters", + "line": 171 + }, + { + "kind": "func", + "name": "Recalculate", + "signature": "func (r *Recalculator) Recalculate(ctx context.Context, ns string, recalculationStartedAt time.Time) error", + "line": 175 + }, + { + "kind": "func", + "name": "ListInScopeEntitlements", + "signature": "func (r *Recalculator) ListInScopeEntitlements(ctx context.Context, ns string) ([]entitlement.Entitlement, error)", + "line": 184 + }, + { + "kind": "func", + "name": "ProcessEntitlements", + "signature": "func (r *Recalculator) ProcessEntitlements(ctx context.Context, entitlements []entitlement.Entitlement, recalculationStartedAt time.Time) error", + "line": 236 + }, + { + "kind": "struct", + "name": "sendEntitlementEventResult", + "signature": "type sendEntitlementEventResult struct", + "line": 278 + }, + { + "kind": "func", + "name": "sendEntitlementEvent", + "signature": "func (r *Recalculator) sendEntitlementEvent(ctx context.Context, ent entitlement.Entitlement) (sendEntitlementEventResult, error)", + "line": 282 + }, + { + "kind": "func", + "name": "sendEntitlementDeletedEvent", + "signature": "func (r *Recalculator) sendEntitlementDeletedEvent(ctx context.Context, ent entitlement.Entitlement) (sendEntitlementEventResult, error)", + "line": 290 + }, + { + "kind": "func", + "name": "sendEntitlementUpdatedEvent", + "signature": "func (r *Recalculator) sendEntitlementUpdatedEvent(ctx context.Context, ent entitlement.Entitlement) (sendEntitlementEventResult, error)", + "line": 335 + }, + { + "kind": "func", + "name": "getCustomerAndSubject", + "signature": "func (r *Recalculator) getCustomerAndSubject(ctx context.Context, namespacedId pkgmodels.NamespacedID) (customerAndSubject, error)", + "line": 396 + }, + { + "kind": "func", + "name": "getFeature", + "signature": "func (r *Recalculator) getFeature(ctx context.Context, featureID pkgmodels.NamespacedID) (feature.Feature, error)", + "line": 408 + }, + { + "kind": "struct", + "name": "customerAndSubject", + "signature": "type customerAndSubject struct", + "line": 418 + } + ], + "line_count": 422 + }, + "openmeter/entitlement/balanceworker/repository.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "BalanceWorkerRepository", + "signature": "type BalanceWorkerRepository interface", + "line": 14 + }, + { + "kind": "struct", + "name": "IngestEventQueryFilter", + "signature": "type IngestEventQueryFilter struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f IngestEventQueryFilter) Validate() error", + "line": 24 + }, + { + "kind": "struct", + "name": "ListAffectedEntitlementsResponse", + "signature": "type ListAffectedEntitlementsResponse struct", + "line": 42 + }, + { + "kind": "func", + "name": "GetEntitlementActivityPeriod", + "signature": "func (r *ListAffectedEntitlementsResponse) GetEntitlementActivityPeriod() timeutil.StartBoundedPeriod", + "line": 52 + } + ], + "line_count": 75 + }, + "openmeter/entitlement/balanceworker/repository_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetEntitlementActivityPeriod", + "signature": "func TestGetEntitlementActivityPeriod(t *testing.T)", + "line": 13 + } + ], + "line_count": 95 + }, + "openmeter/entitlement/balanceworker/subject_customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "resolveCustomerAndSubject", + "signature": "func resolveCustomerAndSubject(ctx context.Context, customerService customer.Service, subjectService subject.Service, namespace string, customerID string) (customer.Customer, *subject.Subject, error)", + "line": 14 + } + ], + "line_count": 62 + }, + "openmeter/entitlement/balanceworker/worker.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "WorkerOptions", + "signature": "type WorkerOptions struct", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *WorkerOptions) Validate() error", + "line": 60 + }, + { + "kind": "struct", + "name": "Worker", + "signature": "type Worker struct", + "line": 112 + }, + { + "kind": "func", + "name": "initMetrics", + "signature": "func (w *Worker) initMetrics() error", + "line": 124 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(opts WorkerOptions) (*Worker, error)", + "line": 138 + }, + { + "kind": "func", + "name": "AddHandler", + "signature": "func (w *Worker) AddHandler(handler grouphandler.GroupEventHandler)", + "line": 201 + }, + { + "kind": "func", + "name": "eventHandler", + "signature": "func (w *Worker) eventHandler(metricMeter metric.Meter) (message.NoPublishHandlerFunc, error)", + "line": 205 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (w *Worker) Run(ctx context.Context) error", + "line": 352 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (w *Worker) Close() error", + "line": 356 + } + ], + "line_count": 362 + }, + "openmeter/entitlement/boolean/connector.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "interface", + "name": "Connector", + "signature": "type Connector interface", + "line": 13 + }, + { + "kind": "struct", + "name": "connector", + "signature": "type connector struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewBooleanEntitlementConnector", + "signature": "func NewBooleanEntitlementConnector() Connector", + "line": 19 + }, + { + "kind": "func", + "name": "GetValue", + "signature": "func (c *connector) GetValue(ctx context.Context, entitlement *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error)", + "line": 23 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (c *connector) BeforeCreate(model entitlement.CreateEntitlementInputs, feature feature.Feature) (*entitlement.CreateEntitlementRepoInputs, error)", + "line": 32 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (c *connector) AfterCreate(ctx context.Context, entitlement *entitlement.Entitlement) error", + "line": 74 + }, + { + "kind": "struct", + "name": "BooleanEntitlementValue", + "signature": "type BooleanEntitlementValue struct", + "line": 78 + }, + { + "kind": "func", + "name": "HasAccess", + "signature": "func (v *BooleanEntitlementValue) HasAccess() bool", + "line": 82 + } + ], + "line_count": 84 + }, + "openmeter/entitlement/boolean/entitlement.go": { + "header": "type Entitlement struct {\n\tentitlement.GenericProperties\n}", + "symbols": [ + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 5 + }, + { + "kind": "func", + "name": "ParseFromGenericEntitlement", + "signature": "func ParseFromGenericEntitlement(model *entitlement.Entitlement) (*Entitlement, error)", + "line": 9 + } + ], + "line_count": 17 + }, + "openmeter/entitlement/connector.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (o ListEntitlementsOrderBy) Values() []ListEntitlementsOrderBy", + "line": 21 + }, + { + "kind": "func", + "name": "StrValues", + "signature": "func (o ListEntitlementsOrderBy) StrValues() []string", + "line": 28 + }, + { + "kind": "struct", + "name": "ListEntitlementsParams", + "signature": "type ListEntitlementsParams struct", + "line": 34 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 59 + }, + { + "kind": "struct", + "name": "ListEntitlementsWithCustomerResult", + "signature": "type ListEntitlementsWithCustomerResult struct", + "line": 92 + }, + { + "kind": "struct", + "name": "EntitlementWithCustomer", + "signature": "type EntitlementWithCustomer struct", + "line": 97 + } + ], + "line_count": 100 + }, + "openmeter/entitlement/driver/entitlement.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "EntitlementHandler", + "signature": "type EntitlementHandler interface", + "line": 30 + }, + { + "kind": "struct", + "name": "entitlementHandler", + "signature": "type entitlementHandler struct", + "line": 41 + }, + { + "kind": "func", + "name": "NewEntitlementHandler", + "signature": "func NewEntitlementHandler(\n\tconnector entitlement.Service,\n\tcustomerService customer.Service,\n\tsubjectService subject.Service,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\toptions ...httptransport.HandlerOption,\n) EntitlementHandler", + "line": 49 + }, + { + "kind": "func", + "name": "CreateEntitlement", + "signature": "func (h *entitlementHandler) CreateEntitlement() CreateEntitlementHandler", + "line": 77 + }, + { + "kind": "func", + "name": "OverrideEntitlement", + "signature": "func (h *entitlementHandler) OverrideEntitlement() OverrideEntitlementHandler", + "line": 147 + }, + { + "kind": "struct", + "name": "GetEntitlementValueHandlerRequest", + "signature": "type GetEntitlementValueHandlerRequest struct", + "line": 202 + }, + { + "kind": "func", + "name": "GetEntitlementValue", + "signature": "func (h *entitlementHandler) GetEntitlementValue() GetEntitlementValueHandler", + "line": 218 + }, + { + "kind": "func", + "name": "GetEntitlementsOfSubjectHandler", + "signature": "func (h *entitlementHandler) GetEntitlementsOfSubjectHandler() GetEntitlementsOfSubjectHandler", + "line": 275 + }, + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (h *entitlementHandler) ListEntitlements() ListEntitlementsHandler", + "line": 348 + }, + { + "kind": "struct", + "name": "GetEntitlementHandlerRequest", + "signature": "type GetEntitlementHandlerRequest struct", + "line": 457 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (h *entitlementHandler) GetEntitlement() GetEntitlementHandler", + "line": 469 + }, + { + "kind": "struct", + "name": "GetEntitlementByIdHandlerRequest", + "signature": "type GetEntitlementByIdHandlerRequest struct", + "line": 499 + }, + { + "kind": "func", + "name": "GetEntitlementById", + "signature": "func (h *entitlementHandler) GetEntitlementById() GetEntitlementByIdHandler", + "line": 511 + }, + { + "kind": "struct", + "name": "DeleteEntitlementHandlerRequest", + "signature": "type DeleteEntitlementHandlerRequest struct", + "line": 541 + }, + { + "kind": "func", + "name": "DeleteEntitlement", + "signature": "func (h *entitlementHandler) DeleteEntitlement() DeleteEntitlementHandler", + "line": 553 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *entitlementHandler) resolveNamespace(ctx context.Context) (string, error)", + "line": 579 + }, + { + "kind": "func", + "name": "resolveCustomerFromSubject", + "signature": "func (h *entitlementHandler) resolveCustomerFromSubject(ctx context.Context, namespace string, subjectIdOrKey string) (*customer.Customer, error)", + "line": 588 + } + ], + "line_count": 609 + }, + "openmeter/entitlement/driver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "func", + "name": "GetErrorEncoder", + "signature": "func GetErrorEncoder() encoder.ErrorEncoder", + "line": 14 + } + ], + "line_count": 31 + }, + "openmeter/entitlement/driver/metered.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "MeteredEntitlementHandler", + "signature": "type MeteredEntitlementHandler interface", + "line": 30 + }, + { + "kind": "struct", + "name": "meteredEntitlementHandler", + "signature": "type meteredEntitlementHandler struct", + "line": 37 + }, + { + "kind": "func", + "name": "NewMeteredEntitlementHandler", + "signature": "func NewMeteredEntitlementHandler(\n\tentitlementConnector entitlement.Service,\n\tbalanceConnector meteredentitlement.Connector,\n\tcustomerService customer.Service,\n\tsubjectService subject.Service,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\toptions ...httptransport.HandlerOption,\n) MeteredEntitlementHandler", + "line": 46 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (h *meteredEntitlementHandler) CreateGrant() CreateGrantHandler", + "line": 80 + }, + { + "kind": "struct", + "name": "ListEntitlementGrantHandlerRequest", + "signature": "type ListEntitlementGrantHandlerRequest struct", + "line": 155 + }, + { + "kind": "func", + "name": "ListEntitlementGrants", + "signature": "func (h *meteredEntitlementHandler) ListEntitlementGrants() ListEntitlementGrantsHandler", + "line": 170 + }, + { + "kind": "struct", + "name": "ResetEntitlementUsageHandlerRequest", + "signature": "type ResetEntitlementUsageHandlerRequest struct", + "line": 217 + }, + { + "kind": "func", + "name": "ResetEntitlementUsage", + "signature": "func (h *meteredEntitlementHandler) ResetEntitlementUsage() ResetEntitlementUsageHandler", + "line": 234 + }, + { + "kind": "struct", + "name": "GetEntitlementBalanceHistoryHandlerRequest", + "signature": "type GetEntitlementBalanceHistoryHandlerRequest struct", + "line": 276 + }, + { + "kind": "func", + "name": "GetEntitlementBalanceHistory", + "signature": "func (h *meteredEntitlementHandler) GetEntitlementBalanceHistory() GetEntitlementBalanceHistoryHandler", + "line": 290 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *meteredEntitlementHandler) resolveNamespace(ctx context.Context) (string, error)", + "line": 376 + }, + { + "kind": "func", + "name": "resolveCustomerFromSubject", + "signature": "func (h *meteredEntitlementHandler) resolveCustomerFromSubject(ctx context.Context, namespace string, subjectIdOrKey string) (*customer.Customer, error)", + "line": 385 + }, + { + "kind": "func", + "name": "MapEntitlementGrantToAPI", + "signature": "func MapEntitlementGrantToAPI(grant *meteredentitlement.EntitlementGrant) api.EntitlementGrant", + "line": 408 + } + ], + "line_count": 449 + }, + "openmeter/entitlement/driver/parser.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "parser", + "signature": "type parser struct", + "line": 25 + }, + { + "kind": "func", + "name": "ToAPIGeneric", + "signature": "func (p parser) ToAPIGeneric(e *entitlement.EntitlementWithCustomer) (*api.Entitlement, error)", + "line": 147 + }, + { + "kind": "func", + "name": "MapEntitlementValueToAPI", + "signature": "func MapEntitlementValueToAPI(entitlementValue entitlement.EntitlementValue) (api.EntitlementValue, error)", + "line": 185 + }, + { + "kind": "func", + "name": "mapUsagePeriod", + "signature": "func mapUsagePeriod(u *entitlement.UsagePeriod) *api.RecurringPeriod", + "line": 218 + }, + { + "kind": "func", + "name": "mapPeriod", + "signature": "func mapPeriod(u *timeutil.ClosedPeriod) *api.Period", + "line": 232 + }, + { + "kind": "func", + "name": "ParseAPICreateInput", + "signature": "func ParseAPICreateInput(inp *api.EntitlementCreateInputs, ns string, usageAttribution streaming.CustomerUsageAttribution) (entitlement.CreateEntitlementInputs, error)", + "line": 242 + }, + { + "kind": "func", + "name": "MapAPIPeriodIntervalToRecurrence", + "signature": "func MapAPIPeriodIntervalToRecurrence(interval api.RecurringPeriodInterval) (timeutil.RecurrenceInterval, error)", + "line": 382 + }, + { + "kind": "func", + "name": "MapRecurrenceToAPI", + "signature": "func MapRecurrenceToAPI(r timeutil.RecurrenceInterval) api.RecurringPeriodInterval", + "line": 404 + } + ], + "line_count": 428 + }, + "openmeter/entitlement/driver/v2/customer.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateCustomerEntitlement", + "signature": "func (h *entitlementHandler) CreateCustomerEntitlement() CreateCustomerEntitlementHandler", + "line": 35 + }, + { + "kind": "func", + "name": "ListCustomerEntitlements", + "signature": "func (h *entitlementHandler) ListCustomerEntitlements() ListCustomerEntitlementsHandler", + "line": 119 + }, + { + "kind": "func", + "name": "GetCustomerEntitlement", + "signature": "func (h *entitlementHandler) GetCustomerEntitlement() GetCustomerEntitlementHandler", + "line": 215 + }, + { + "kind": "func", + "name": "DeleteCustomerEntitlement", + "signature": "func (h *entitlementHandler) DeleteCustomerEntitlement() DeleteCustomerEntitlementHandler", + "line": 279 + }, + { + "kind": "func", + "name": "OverrideCustomerEntitlement", + "signature": "func (h *entitlementHandler) OverrideCustomerEntitlement() OverrideCustomerEntitlementHandler", + "line": 349 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *entitlementHandler) resolveNamespace(ctx context.Context) (string, error)", + "line": 413 + } + ], + "line_count": 420 + }, + "openmeter/entitlement/driver/v2/customer_metered.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomerEntitlementGrants", + "signature": "func (h *entitlementHandler) ListCustomerEntitlementGrants() ListCustomerEntitlementGrantsHandler", + "line": 40 + }, + { + "kind": "func", + "name": "CreateCustomerEntitlementGrant", + "signature": "func (h *entitlementHandler) CreateCustomerEntitlementGrant() CreateCustomerEntitlementGrantHandler", + "line": 123 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementHistory", + "signature": "func (h *entitlementHandler) GetCustomerEntitlementHistory() GetCustomerEntitlementHistoryHandler", + "line": 202 + }, + { + "kind": "func", + "name": "ResetCustomerEntitlementUsage", + "signature": "func (h *entitlementHandler) ResetCustomerEntitlementUsage() ResetCustomerEntitlementUsageHandler", + "line": 321 + } + ], + "line_count": 382 + }, + "openmeter/entitlement/driver/v2/entitlement.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (h *entitlementHandler) ListEntitlements() ListEntitlementsHandler", + "line": 32 + }, + { + "kind": "struct", + "name": "GetEntitlementHandlerRequest", + "signature": "type GetEntitlementHandlerRequest struct", + "line": 125 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (h *entitlementHandler) GetEntitlement() GetEntitlementHandler", + "line": 137 + } + ], + "line_count": 165 + }, + "openmeter/entitlement/driver/v2/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\tentitlementdriver \"github.com/openmeterio/openmeter/openmeter/entitlement/driver\"", + "symbols": [ + { + "kind": "func", + "name": "getErrorEncoder", + "signature": "func getErrorEncoder() encoder.ErrorEncoder", + "line": 13 + } + ], + "line_count": 22 + }, + "openmeter/entitlement/driver/v2/handler.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n\tmeteredentitlement \"github.com/openmeterio/openmeter/openmeter/entitlement/metered\"", + "symbols": [ + { + "kind": "interface", + "name": "EntitlementHandler", + "signature": "type EntitlementHandler interface", + "line": 12 + }, + { + "kind": "struct", + "name": "entitlementHandler", + "signature": "type entitlementHandler struct", + "line": 26 + }, + { + "kind": "func", + "name": "NewEntitlementHandler", + "signature": "func NewEntitlementHandler(\n\tconnector entitlement.Service,\n\tbalanceConnector meteredentitlement.Connector,\n\tcustomerService customer.Service,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\toptions ...httptransport.HandlerOption,\n) EntitlementHandler", + "line": 34 + } + ], + "line_count": 48 + }, + "openmeter/entitlement/driver/v2/mapping.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "parserV2", + "signature": "type parserV2 struct", + "line": 29 + }, + { + "kind": "func", + "name": "mapUsagePeriodValue", + "signature": "func mapUsagePeriodValue(u *entitlement.UsagePeriod) api.RecurringPeriod", + "line": 173 + }, + { + "kind": "func", + "name": "mapUsagePeriodPtr", + "signature": "func mapUsagePeriodPtr(u *entitlement.UsagePeriod) *api.RecurringPeriod", + "line": 186 + }, + { + "kind": "func", + "name": "mapPeriodPtr", + "signature": "func mapPeriodPtr(p *timeutil.ClosedPeriod) *api.Period", + "line": 194 + }, + { + "kind": "func", + "name": "mapPeriodValue", + "signature": "func mapPeriodValue(p *timeutil.ClosedPeriod) api.Period", + "line": 201 + }, + { + "kind": "func", + "name": "MapEntitlementGrantToAPIV2", + "signature": "func MapEntitlementGrantToAPIV2(grant *meteredentitlement.EntitlementGrant) api.EntitlementGrantV2", + "line": 208 + }, + { + "kind": "func", + "name": "ParseAPICreateInputV2", + "signature": "func ParseAPICreateInputV2(inp *api.EntitlementV2CreateInputs, ns string, usageAttribution streaming.CustomerUsageAttribution) (entitlement.CreateEntitlementInputs, []entitlement.CreateEntitlementGrantInputs, error)", + "line": 245 + }, + { + "kind": "func", + "name": "MapAPIGrantV2ToCreateGrantInput", + "signature": "func MapAPIGrantV2ToCreateGrantInput(g api.EntitlementGrantCreateInputV2) (meteredentitlement.CreateEntitlementGrantInputs, error)", + "line": 416 + } + ], + "line_count": 461 + }, + "openmeter/entitlement/entitlement.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "interface", + "name": "TypedEntitlement", + "signature": "type TypedEntitlement interface", + "line": 20 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e MeasureUsageFromEnum) Values() []MeasureUsageFromEnum", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e MeasureUsageFromEnum) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "MeasureUsageFromInput", + "signature": "type MeasureUsageFromInput struct", + "line": 42 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m MeasureUsageFromInput) Equal(other MeasureUsageFromInput) bool", + "line": 46 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (m MeasureUsageFromInput) Get() time.Time", + "line": 50 + }, + { + "kind": "func", + "name": "FromTime", + "signature": "func (m *MeasureUsageFromInput) FromTime(t time.Time) error", + "line": 54 + }, + { + "kind": "func", + "name": "FromEnum", + "signature": "func (m *MeasureUsageFromInput) FromEnum(e MeasureUsageFromEnum, currPeriod timeutil.ClosedPeriod, now time.Time) error", + "line": 63 + }, + { + "kind": "struct", + "name": "CreateEntitlementInputs", + "signature": "type CreateEntitlementInputs struct", + "line": 78 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c CreateEntitlementInputs) Equal(other CreateEntitlementInputs) bool", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreateEntitlementInputs) Validate() error", + "line": 193 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (c CreateEntitlementInputs) GetType() EntitlementType", + "line": 234 + }, + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 239 + }, + { + "kind": "func", + "name": "AsCreateEntitlementInputs", + "signature": "func (e Entitlement) AsCreateEntitlementInputs(cust customer.Customer) CreateEntitlementInputs", + "line": 255 + }, + { + "kind": "func", + "name": "IsActive", + "signature": "func (e Entitlement) IsActive(at time.Time) bool", + "line": 287 + }, + { + "kind": "func", + "name": "GetType", + "signature": "func (e Entitlement) GetType() EntitlementType", + "line": 307 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (e Entitlement) GetCadence() models.CadencedModel", + "line": 313 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e EntitlementType) Values() []EntitlementType", + "line": 331 + }, + { + "kind": "func", + "name": "StrValues", + "signature": "func (e EntitlementType) StrValues() []string", + "line": 335 + }, + { + "kind": "func", + "name": "String", + "signature": "func (e EntitlementType) String() string", + "line": 341 + }, + { + "kind": "struct", + "name": "GenericProperties", + "signature": "type GenericProperties struct", + "line": 346 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e GenericProperties) Validate() error", + "line": 371 + }, + { + "kind": "func", + "name": "ActiveFromTime", + "signature": "func (e GenericProperties) ActiveFromTime() time.Time", + "line": 381 + }, + { + "kind": "func", + "name": "ActiveToTime", + "signature": "func (e GenericProperties) ActiveToTime() *time.Time", + "line": 386 + } + ], + "line_count": 391 + }, + "openmeter/entitlement/entitlement_grant.go": { + "header": "type CreateEntitlementGrantInputs struct {\n\tcredit.CreateGrantInput\n}", + "symbols": [ + { + "kind": "struct", + "name": "CreateEntitlementGrantInputs", + "signature": "type CreateEntitlementGrantInputs struct", + "line": 5 + } + ], + "line_count": 7 + }, + "openmeter/entitlement/entitlement_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestUsagePeriod", + "signature": "func TestUsagePeriod(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestMeasureUsageFromInput", + "signature": "func TestMeasureUsageFromInput(t *testing.T)", + "line": 29 + } + ], + "line_count": 69 + }, + "openmeter/entitlement/entitlement_types.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/feature\"", + "symbols": [ + { + "kind": "interface", + "name": "EntitlementValue", + "signature": "type EntitlementValue interface", + "line": 10 + }, + { + "kind": "struct", + "name": "NoAccessValue", + "signature": "type NoAccessValue struct", + "line": 16 + }, + { + "kind": "interface", + "name": "SubTypeConnector", + "signature": "type SubTypeConnector interface", + "line": 23 + } + ], + "line_count": 33 + }, + "openmeter/entitlement/errors.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "AlreadyExistsError", + "signature": "type AlreadyExistsError struct", + "line": 9 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *AlreadyExistsError) Error() string", + "line": 15 + }, + { + "kind": "struct", + "name": "AlreadyDeletedError", + "signature": "type AlreadyDeletedError struct", + "line": 19 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *AlreadyDeletedError) Error() string", + "line": 23 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 27 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 31 + }, + { + "kind": "struct", + "name": "WrongTypeError", + "signature": "type WrongTypeError struct", + "line": 35 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *WrongTypeError) Error() string", + "line": 40 + }, + { + "kind": "struct", + "name": "InvalidValueError", + "signature": "type InvalidValueError struct", + "line": 44 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *InvalidValueError) Error() string", + "line": 49 + }, + { + "kind": "struct", + "name": "InvalidFeatureError", + "signature": "type InvalidFeatureError struct", + "line": 53 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *InvalidFeatureError) Error() string", + "line": 58 + }, + { + "kind": "struct", + "name": "ForbiddenError", + "signature": "type ForbiddenError struct", + "line": 62 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ForbiddenError) Error() string", + "line": 66 + } + ], + "line_count": 82 + }, + "openmeter/entitlement/events.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "entitlementEventV2", + "signature": "type entitlementEventV2 struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e entitlementEventV2) Validate() error", + "line": 25 + }, + { + "kind": "struct", + "name": "entitlementEventV2EntitlementLiteral", + "signature": "type entitlementEventV2EntitlementLiteral struct", + "line": 38 + }, + { + "kind": "func", + "name": "ToDomainEntitlement", + "signature": "func (e entitlementEventV2EntitlementLiteral) ToDomainEntitlement() Entitlement", + "line": 73 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e entitlementEventV2EntitlementLiteral) Validate() error", + "line": 101 + }, + { + "kind": "func", + "name": "mapEntitlementToV2Literal", + "signature": "func mapEntitlementToV2Literal(ent Entitlement, c *customer.Customer) entitlementEventV2EntitlementLiteral", + "line": 111 + }, + { + "kind": "func", + "name": "mapEntitlementToV2", + "signature": "func mapEntitlementToV2(ent Entitlement, c *customer.Customer) entitlementEventV2", + "line": 137 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementCreatedEventV2) Validate() error", + "line": 158 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e EntitlementCreatedEventV2) EventName() string", + "line": 162 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e EntitlementCreatedEventV2) EventMetadata() metadata.EventMetadata", + "line": 166 + }, + { + "kind": "func", + "name": "NewEntitlementCreatedEventPayloadV2", + "signature": "func NewEntitlementCreatedEventPayloadV2(ent Entitlement, c *customer.Customer) EntitlementCreatedEventV2", + "line": 173 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementDeletedEventV2) Validate() error", + "line": 189 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e EntitlementDeletedEventV2) EventName() string", + "line": 193 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e EntitlementDeletedEventV2) EventMetadata() metadata.EventMetadata", + "line": 197 + }, + { + "kind": "func", + "name": "NewEntitlementDeletedEventPayloadV2", + "signature": "func NewEntitlementDeletedEventPayloadV2(ent Entitlement, c *customer.Customer) EntitlementDeletedEventV2", + "line": 204 + } + ], + "line_count": 206 + }, + "openmeter/entitlement/hooks/subscription/hook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "struct", + "name": "hook", + "signature": "type hook struct", + "line": 12 + }, + { + "kind": "struct", + "name": "EntitlementSubscriptionHookConfig", + "signature": "type EntitlementSubscriptionHookConfig struct", + "line": 16 + }, + { + "kind": "func", + "name": "NewEntitlementSubscriptionHook", + "signature": "func NewEntitlementSubscriptionHook(_ EntitlementSubscriptionHookConfig) EntitlementSubscriptionHook", + "line": 25 + }, + { + "kind": "func", + "name": "PreDelete", + "signature": "func (h *hook) PreDelete(ctx context.Context, ent *entitlement.Entitlement) error", + "line": 32 + }, + { + "kind": "func", + "name": "PreUpdate", + "signature": "func (h *hook) PreUpdate(ctx context.Context, ent *entitlement.Entitlement) error", + "line": 44 + } + ], + "line_count": 53 + }, + "openmeter/entitlement/metered/balance.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementBalance", + "signature": "type EntitlementBalance struct", + "line": 24 + }, + { + "kind": "struct", + "name": "EntitlementBalanceHistoryWindow", + "signature": "type EntitlementBalanceHistoryWindow struct", + "line": 38 + }, + { + "kind": "struct", + "name": "BalanceHistoryParams", + "signature": "type BalanceHistoryParams struct", + "line": 55 + }, + { + "kind": "func", + "name": "GetEntitlementBalance", + "signature": "func (e *connector) GetEntitlementBalance(ctx context.Context, entitlementID models.NamespacedID, at time.Time) (*EntitlementBalance, error)", + "line": 62 + }, + { + "kind": "func", + "name": "GetEntitlementBalanceHistory", + "signature": "func (e *connector) GetEntitlementBalanceHistory(ctx context.Context, entitlementID models.NamespacedID, params BalanceHistoryParams) ([]EntitlementBalanceHistoryWindow, engine.GrantBurnDownHistory, error)", + "line": 109 + }, + { + "kind": "func", + "name": "queryMeter", + "signature": "func (e *connector) queryMeter(ctx context.Context, namespace string, m meter.Meter, params streaming.QueryParams) ([]meter.MeterQueryRow, error)", + "line": 369 + } + ], + "line_count": 381 + }, + "openmeter/entitlement/metered/balance_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "getAnchor", + "signature": "func getAnchor(t *testing.T) time.Time", + "line": 28 + }, + { + "kind": "func", + "name": "TestGetEntitlementBalance", + "signature": "func TestGetEntitlementBalance(t *testing.T)", + "line": 34 + }, + { + "kind": "func", + "name": "TestGetEntitlementHistory", + "signature": "func TestGetEntitlementHistory(t *testing.T)", + "line": 850 + } + ], + "line_count": 1452 + }, + "openmeter/entitlement/metered/connector.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "ResetEntitlementUsageParams", + "signature": "type ResetEntitlementUsageParams struct", + "line": 27 + }, + { + "kind": "interface", + "name": "Connector", + "signature": "type Connector interface", + "line": 33 + }, + { + "kind": "struct", + "name": "MeteredEntitlementValue", + "signature": "type MeteredEntitlementValue struct", + "line": 48 + }, + { + "kind": "func", + "name": "HasAccess", + "signature": "func (m *MeteredEntitlementValue) HasAccess() bool", + "line": 60 + }, + { + "kind": "struct", + "name": "connector", + "signature": "type connector struct", + "line": 67 + }, + { + "kind": "func", + "name": "NewMeteredEntitlementConnector", + "signature": "func NewMeteredEntitlementConnector(\n\tstreamingConnector streaming.Connector,\n\townerConnector grant.OwnerConnector,\n\tbalanceConnector credit.BalanceConnector,\n\tgrantConnector credit.GrantConnector,\n\tgrantRepo grant.Repo,\n\tentitlementRepo entitlement.EntitlementRepo,\n\tpublisher eventbus.Publisher,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n) Connector", + "line": 83 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (c *connector) RegisterHooks(hooks ...models.ServiceHook[Entitlement])", + "line": 112 + }, + { + "kind": "func", + "name": "GetValue", + "signature": "func (e *connector) GetValue(ctx context.Context, entitlement *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error)", + "line": 116 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (c *connector) BeforeCreate(model entitlement.CreateEntitlementInputs, feature feature.Feature) (*entitlement.CreateEntitlementRepoInputs, error)", + "line": 143 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (c *connector) AfterCreate(ctx context.Context, end *entitlement.Entitlement) error", + "line": 222 + } + ], + "line_count": 256 + }, + "openmeter/entitlement/metered/entitlement.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n\t\"github.com/openmeterio/openmeter/pkg/defaultx\"", + "symbols": [ + { + "kind": "struct", + "name": "IssueAfterReset", + "signature": "type IssueAfterReset struct", + "line": 17 + }, + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 22 + }, + { + "kind": "func", + "name": "ToGenericEntitlement", + "signature": "func (e *Entitlement) ToGenericEntitlement() *entitlement.Entitlement", + "line": 52 + }, + { + "kind": "func", + "name": "HasDefaultGrant", + "signature": "func (e *Entitlement) HasDefaultGrant() bool", + "line": 69 + }, + { + "kind": "func", + "name": "ParseFromGenericEntitlement", + "signature": "func ParseFromGenericEntitlement(model *entitlement.Entitlement) (*Entitlement, error)", + "line": 73 + } + ], + "line_count": 126 + }, + "openmeter/entitlement/metered/entitlement_grant.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ListEntitlementGrantsParams", + "signature": "type ListEntitlementGrantsParams struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListEntitlementGrantsParams) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (e *connector) CreateGrant(ctx context.Context, namespace string, customerID string, entitlementIdOrFeatureKey string, inputGrant CreateEntitlementGrantInputs) (EntitlementGrant, error)", + "line": 50 + }, + { + "kind": "func", + "name": "ListEntitlementGrants", + "signature": "func (e *connector) ListEntitlementGrants(ctx context.Context, namespace string, params ListEntitlementGrantsParams) (pagination.Result[EntitlementGrant], error)", + "line": 95 + }, + { + "kind": "struct", + "name": "EntitlementGrant", + "signature": "type EntitlementGrant struct", + "line": 132 + }, + { + "kind": "func", + "name": "GrantFromCreditGrant", + "signature": "func GrantFromCreditGrant(grant grant.Grant, now time.Time) (*EntitlementGrant, error)", + "line": 147 + } + ], + "line_count": 163 + }, + "openmeter/entitlement/metered/events.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementResetEvent", + "signature": "type EntitlementResetEvent struct", + "line": 18 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e EntitlementResetEvent) EventName() string", + "line": 37 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e EntitlementResetEvent) EventMetadata() metadata.EventMetadata", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementResetEvent) Validate() error", + "line": 48 + }, + { + "kind": "struct", + "name": "EntitlementResetEventV3", + "signature": "type EntitlementResetEventV3 struct", + "line": 72 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e EntitlementResetEventV3) EventName() string", + "line": 91 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e EntitlementResetEventV3) EventMetadata() metadata.EventMetadata", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementResetEventV3) Validate() error", + "line": 102 + } + ], + "line_count": 124 + }, + "openmeter/entitlement/metered/grant_owner_adapter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "entitlementGrantOwner", + "signature": "type entitlementGrantOwner struct", + "line": 25 + }, + { + "kind": "func", + "name": "NewEntitlementGrantOwnerAdapter", + "signature": "func NewEntitlementGrantOwnerAdapter(\n\tfeatureRepo feature.FeatureRepo,\n\tentitlementRepo entitlement.EntitlementRepo,\n\tusageResetRepo UsageResetRepo,\n\tmeterService meter.Service,\n\tcustomerService customer.Service,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n) grant.OwnerConnector", + "line": 35 + }, + { + "kind": "func", + "name": "DescribeOwner", + "signature": "func (e *entitlementGrantOwner) DescribeOwner(ctx context.Context, id models.NamespacedID) (grant.Owner, error)", + "line": 55 + }, + { + "kind": "func", + "name": "GetStartOfMeasurement", + "signature": "func (e *entitlementGrantOwner) GetStartOfMeasurement(ctx context.Context, owner models.NamespacedID) (time.Time, error)", + "line": 137 + }, + { + "kind": "func", + "name": "GetUsagePeriodStartAt", + "signature": "func (e *entitlementGrantOwner) GetUsagePeriodStartAt(ctx context.Context, owner models.NamespacedID, at time.Time) (time.Time, error)", + "line": 159 + }, + { + "kind": "func", + "name": "GetResetTimelineInclusive", + "signature": "func (e *entitlementGrantOwner) GetResetTimelineInclusive(ctx context.Context, owner models.NamespacedID, period timeutil.ClosedPeriod) (timeutil.SimpleTimeline, error)", + "line": 182 + }, + { + "kind": "func", + "name": "EndCurrentUsagePeriod", + "signature": "func (e *entitlementGrantOwner) EndCurrentUsagePeriod(ctx context.Context, owner models.NamespacedID, params grant.EndCurrentUsagePeriodParams) error", + "line": 210 + }, + { + "kind": "func", + "name": "LockOwnerForTx", + "signature": "func (e *entitlementGrantOwner) LockOwnerForTx(ctx context.Context, owner models.NamespacedID, wait bool) error", + "line": 286 + } + ], + "line_count": 306 + }, + "openmeter/entitlement/metered/grant_owner_adapter_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestEntitlementGrantOwnerAdapter", + "signature": "func TestEntitlementGrantOwnerAdapter(t *testing.T)", + "line": 27 + } + ], + "line_count": 720 + }, + "openmeter/entitlement/metered/hook.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "hook", + "signature": "type hook struct", + "line": 10 + }, + { + "kind": "func", + "name": "ConvertHook", + "signature": "func ConvertHook(h models.ServiceHook[entitlement.Entitlement]) models.ServiceHook[Entitlement]", + "line": 16 + }, + { + "kind": "func", + "name": "PreDelete", + "signature": "func (h *hook) PreDelete(ctx context.Context, ent *Entitlement) error", + "line": 22 + }, + { + "kind": "func", + "name": "PreUpdate", + "signature": "func (h *hook) PreUpdate(ctx context.Context, ent *Entitlement) error", + "line": 26 + }, + { + "kind": "func", + "name": "PostCreate", + "signature": "func (h *hook) PostCreate(ctx context.Context, ent *Entitlement) error", + "line": 30 + }, + { + "kind": "func", + "name": "PostUpdate", + "signature": "func (h *hook) PostUpdate(ctx context.Context, ent *Entitlement) error", + "line": 34 + }, + { + "kind": "func", + "name": "PostDelete", + "signature": "func (h *hook) PostDelete(ctx context.Context, ent *Entitlement) error", + "line": 38 + } + ], + "line_count": 40 + }, + "openmeter/entitlement/metered/lateevents_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "inconsistentCreditConnector", + "signature": "type inconsistentCreditConnector struct", + "line": 45 + }, + { + "kind": "func", + "name": "GetBalanceAt", + "signature": "func (c *inconsistentCreditConnector) GetBalanceAt(ctx context.Context, ownerID models.NamespacedID, at time.Time) (engine.RunResult, error)", + "line": 50 + }, + { + "kind": "func", + "name": "GetBalanceForPeriod", + "signature": "func (c *inconsistentCreditConnector) GetBalanceForPeriod(ctx context.Context, ownerID models.NamespacedID, period timeutil.ClosedPeriod) (engine.RunResult, error)", + "line": 60 + }, + { + "kind": "func", + "name": "TestGetEntitlementBalanceConsistency", + "signature": "func TestGetEntitlementBalanceConsistency(t *testing.T)", + "line": 70 + } + ], + "line_count": 308 + }, + "openmeter/entitlement/metered/owner_customer.go": { + "header": "type ownerCustomer struct {\n\tid string\n\tkey *string", + "symbols": [ + { + "kind": "struct", + "name": "ownerCustomer", + "signature": "type ownerCustomer struct", + "line": 7 + }, + { + "kind": "func", + "name": "GetUsageAttribution", + "signature": "func (c ownerCustomer) GetUsageAttribution() streaming.CustomerUsageAttribution", + "line": 15 + } + ], + "line_count": 17 + }, + "openmeter/entitlement/metered/repository.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "UsageResetRepo", + "signature": "type UsageResetRepo interface", + "line": 12 + }, + { + "kind": "struct", + "name": "UsageResetNotFoundError", + "signature": "type UsageResetNotFoundError struct", + "line": 16 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e UsageResetNotFoundError) Error() string", + "line": 20 + }, + { + "kind": "struct", + "name": "UsageResetUpdate", + "signature": "type UsageResetUpdate struct", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u UsageResetUpdate) Validate() error", + "line": 32 + } + ], + "line_count": 42 + }, + "openmeter/entitlement/metered/reset.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ResetEntitlementUsage", + "signature": "func (e *connector) ResetEntitlementUsage(ctx context.Context, entitlementID models.NamespacedID, params ResetEntitlementUsageParams) (*EntitlementBalance, error)", + "line": 21 + }, + { + "kind": "func", + "name": "ResetEntitlementsWithExpiredUsagePeriod", + "signature": "func (c *connector) ResetEntitlementsWithExpiredUsagePeriod(ctx context.Context, namespace string, highwatermark time.Time) ([]models.NamespacedID, error)", + "line": 88 + } + ], + "line_count": 116 + }, + "openmeter/entitlement/metered/reset_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestResetEntitlementUsage", + "signature": "func TestResetEntitlementUsage(t *testing.T)", + "line": 26 + } + ], + "line_count": 973 + }, + "openmeter/entitlement/metered/trace.go": { + "header": "\t\"go.opentelemetry.io/otel/attribute\"\n\t\"go.opentelemetry.io/otel/trace\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "mtrace", + "signature": "type mtrace struct", + "line": 11 + }, + { + "kind": "func", + "name": "WithOwner", + "signature": "func (m mtrace) WithOwner(owner models.NamespacedID) trace.SpanStartEventOption", + "line": 15 + }, + { + "kind": "func", + "name": "WithPeriod", + "signature": "func (m mtrace) WithPeriod(period timeutil.ClosedPeriod) trace.SpanStartEventOption", + "line": 22 + } + ], + "line_count": 27 + }, + "openmeter/entitlement/metered/utils_test.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "dependencies", + "signature": "type dependencies struct", + "line": 44 + }, + { + "kind": "func", + "name": "Teardown", + "signature": "func (d *dependencies) Teardown()", + "line": 64 + }, + { + "kind": "func", + "name": "setupConnector", + "signature": "func setupConnector(t *testing.T) (meteredentitlement.Connector, *dependencies)", + "line": 79 + }, + { + "kind": "func", + "name": "assertUsagePeriodInputsEquals", + "signature": "func assertUsagePeriodInputsEquals(t *testing.T, expected, actual *entitlement.UsagePeriodInput)", + "line": 219 + }, + { + "kind": "func", + "name": "createCustomerAndSubject", + "signature": "func createCustomerAndSubject(t *testing.T, subjectService subject.Service, customerService customer.Service, ns, key, name string) *customer.Customer", + "line": 227 + } + ], + "line_count": 249 + }, + "openmeter/entitlement/repository.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/streaming\"", + "symbols": [ + { + "kind": "struct", + "name": "UpdateEntitlementUsagePeriodParams", + "signature": "type UpdateEntitlementUsagePeriodParams struct", + "line": 15 + }, + { + "kind": "struct", + "name": "ListExpiredEntitlementsParams", + "signature": "type ListExpiredEntitlementsParams struct", + "line": 19 + }, + { + "kind": "struct", + "name": "UpsertEntitlementCurrentPeriodElement", + "signature": "type UpsertEntitlementCurrentPeriodElement struct", + "line": 28 + }, + { + "kind": "interface", + "name": "EntitlementRepo", + "signature": "type EntitlementRepo interface", + "line": 33 + }, + { + "kind": "struct", + "name": "CreateEntitlementRepoInputs", + "signature": "type CreateEntitlementRepoInputs struct", + "line": 76 + } + ], + "line_count": 96 + }, + "openmeter/entitlement/service/access_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetAccess", + "signature": "func TestGetAccess(t *testing.T)", + "line": 19 + } + ], + "line_count": 340 + }, + "openmeter/entitlement/service/lock.go": { + "header": "func NewEntitlementUniqueScopeLock(featureKey string, customerID string) (lockr.Key, error) {\n\treturn lockr.NewKey(\"fk\", featureKey, \"cid\", customerID)\n}", + "symbols": [ + { + "kind": "func", + "name": "NewEntitlementUniqueScopeLock", + "signature": "func NewEntitlementUniqueScopeLock(featureKey string, customerID string) (lockr.Key, error)", + "line": 5 + } + ], + "line_count": 7 + }, + "openmeter/entitlement/service/scheduling.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ScheduleEntitlement", + "signature": "func (c *service) ScheduleEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error)", + "line": 20 + }, + { + "kind": "func", + "name": "SupersedeEntitlement", + "signature": "func (c *service) SupersedeEntitlement(ctx context.Context, entitlementId string, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error)", + "line": 139 + }, + { + "kind": "func", + "name": "lockUniqueScope", + "signature": "func (c *service) lockUniqueScope(ctx context.Context, customerID string, featureKey string) error", + "line": 218 + } + ], + "line_count": 225 + }, + "openmeter/entitlement/service/scheduling_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreateEntitlementWithGrants", + "signature": "func TestCreateEntitlementWithGrants(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestScheduling", + "signature": "func TestScheduling(t *testing.T)", + "line": 154 + }, + { + "kind": "func", + "name": "TestSuperseding", + "signature": "func TestSuperseding(t *testing.T)", + "line": 563 + } + ], + "line_count": 913 + }, + "openmeter/entitlement/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "ServiceConfig", + "signature": "type ServiceConfig struct", + "line": 27 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 41 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (s *service) RegisterHooks(hooks ...models.ServiceHook[entitlement.Entitlement])", + "line": 57 + }, + { + "kind": "func", + "name": "NewEntitlementService", + "signature": "func NewEntitlementService(\n\tconfig ServiceConfig,\n) entitlement.Service", + "line": 61 + }, + { + "kind": "func", + "name": "CreateEntitlement", + "signature": "func (c *service) CreateEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs, grants []entitlement.CreateEntitlementGrantInputs) (*entitlement.Entitlement, error)", + "line": 77 + }, + { + "kind": "func", + "name": "OverrideEntitlement", + "signature": "func (c *service) OverrideEntitlement(ctx context.Context, customerID string, entitlementIdOrFeatureKey string, input entitlement.CreateEntitlementInputs, grants []entitlement.CreateEntitlementGrantInputs) (*entitlement.Entitlement, error)", + "line": 104 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (c *service) GetEntitlement(ctx context.Context, namespace string, id string) (*entitlement.Entitlement, error)", + "line": 149 + }, + { + "kind": "func", + "name": "GetEntitlementWithCustomer", + "signature": "func (c *service) GetEntitlementWithCustomer(ctx context.Context, namespace string, id string) (*entitlement.EntitlementWithCustomer, error)", + "line": 153 + }, + { + "kind": "func", + "name": "DeleteEntitlement", + "signature": "func (c *service) DeleteEntitlement(ctx context.Context, namespace string, id string, at time.Time) error", + "line": 173 + }, + { + "kind": "func", + "name": "GetEntitlementsOfCustomer", + "signature": "func (c *service) GetEntitlementsOfCustomer(ctx context.Context, namespace string, customerId string, at time.Time) ([]entitlement.Entitlement, error)", + "line": 211 + }, + { + "kind": "func", + "name": "GetEntitlementOfCustomerAt", + "signature": "func (c *service) GetEntitlementOfCustomerAt(ctx context.Context, namespace string, customerID string, idOrFeatureKey string, at time.Time) (*entitlement.Entitlement, error)", + "line": 229 + }, + { + "kind": "func", + "name": "GetEntitlementValue", + "signature": "func (c *service) GetEntitlementValue(ctx context.Context, namespace string, customerID string, idOrFeatureKey string, at time.Time) (entitlement.EntitlementValue, error)", + "line": 244 + }, + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (c *service) ListEntitlements(ctx context.Context, params entitlement.ListEntitlementsParams) (pagination.Result[entitlement.Entitlement], error)", + "line": 262 + }, + { + "kind": "func", + "name": "ListEntitlementsWithCustomer", + "signature": "func (c *service) ListEntitlementsWithCustomer(ctx context.Context, params entitlement.ListEntitlementsParams) (entitlement.ListEntitlementsWithCustomerResult, error)", + "line": 272 + }, + { + "kind": "func", + "name": "expandCustomers", + "signature": "func (c *service) expandCustomers(ctx context.Context, entitlements []entitlement.Entitlement) (map[models.NamespacedID]*customer.Customer, error)", + "line": 297 + }, + { + "kind": "func", + "name": "GetAccess", + "signature": "func (c *service) GetAccess(ctx context.Context, namespace string, customerId string) (entitlement.Access, error)", + "line": 337 + }, + { + "kind": "func", + "name": "getTypeConnector", + "signature": "func (c *service) getTypeConnector(inp entitlement.TypedEntitlement) (entitlement.SubTypeConnector, error)", + "line": 424 + } + ], + "line_count": 436 + }, + "openmeter/entitlement/service/service_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetEntitlementOfCustomerAt", + "signature": "func TestGetEntitlementOfCustomerAt(t *testing.T)", + "line": 17 + } + ], + "line_count": 80 + }, + "openmeter/entitlement/service/utils_test.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "mockTypeConnector", + "signature": "type mockTypeConnector struct", + "line": 37 + }, + { + "kind": "struct", + "name": "mockTypeValue", + "signature": "type mockTypeValue struct", + "line": 41 + }, + { + "kind": "func", + "name": "HasAccess", + "signature": "func (m *mockTypeValue) HasAccess() bool", + "line": 43 + }, + { + "kind": "func", + "name": "GetValue", + "signature": "func (m *mockTypeConnector) GetValue(ctx context.Context, entitlement *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error)", + "line": 47 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (m *mockTypeConnector) BeforeCreate(ent entitlement.CreateEntitlementInputs, feature feature.Feature) (*entitlement.CreateEntitlementRepoInputs, error)", + "line": 51 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (m *mockTypeConnector) AfterCreate(ctx context.Context, entitlement *entitlement.Entitlement) error", + "line": 64 + }, + { + "kind": "struct", + "name": "dependencies", + "signature": "type dependencies struct", + "line": 68 + }, + { + "kind": "func", + "name": "Teardown", + "signature": "func (d *dependencies) Teardown()", + "line": 81 + }, + { + "kind": "func", + "name": "setupDependecies", + "signature": "func setupDependecies(t *testing.T) (entitlement.Service, *dependencies)", + "line": 90 + }, + { + "kind": "func", + "name": "createMeterInPG", + "signature": "func createMeterInPG(t *testing.T, dbClient *db.Client, mtr meter.Meter)", + "line": 178 + }, + { + "kind": "func", + "name": "createCustomerAndSubject", + "signature": "func createCustomerAndSubject(t *testing.T, subjectService subject.Service, customerService customer.Service, ns, key, name string) *customer.Customer", + "line": 195 + } + ], + "line_count": 217 + }, + "openmeter/entitlement/snapshot/event.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (o ValueOperationType) Values() []ValueOperationType", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o ValueOperationType) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "EntitlementValue", + "signature": "type EntitlementValue struct", + "line": 42 + }, + { + "kind": "struct", + "name": "SnapshotEvent", + "signature": "type SnapshotEvent struct", + "line": 62 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e SnapshotEvent) EventName() string", + "line": 90 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e SnapshotEvent) EventMetadata() metadata.EventMetadata", + "line": 94 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e SnapshotEvent) Validate() error", + "line": 111 + }, + { + "kind": "func", + "name": "NewSnapshotEvent", + "signature": "func NewSnapshotEvent(ent entitlement.Entitlement, subj *subject.Subject, customer customer.Customer, feat feature.Feature, op ValueOperationType, calculatedAt *time.Time, value *EntitlementValue, currentUsagePeriod *timeutil.ClosedPeriod) SnapshotEvent", + "line": 155 + } + ], + "line_count": 172 + }, + "openmeter/entitlement/static/connector.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "Connector", + "signature": "type Connector interface", + "line": 14 + }, + { + "kind": "struct", + "name": "connector", + "signature": "type connector struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewStaticEntitlementConnector", + "signature": "func NewStaticEntitlementConnector() Connector", + "line": 22 + }, + { + "kind": "func", + "name": "GetValue", + "signature": "func (c *connector) GetValue(ctx context.Context, entitlement *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error)", + "line": 28 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (c *connector) BeforeCreate(model entitlement.CreateEntitlementInputs, feature feature.Feature) (*entitlement.CreateEntitlementRepoInputs, error)", + "line": 39 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (c *connector) AfterCreate(ctx context.Context, entitlement *entitlement.Entitlement) error", + "line": 91 + }, + { + "kind": "struct", + "name": "StaticEntitlementValue", + "signature": "type StaticEntitlementValue struct", + "line": 95 + }, + { + "kind": "func", + "name": "HasAccess", + "signature": "func (s *StaticEntitlementValue) HasAccess() bool", + "line": 101 + } + ], + "line_count": 103 + }, + "openmeter/entitlement/static/entitlement.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 9 + }, + { + "kind": "func", + "name": "ParseFromGenericEntitlement", + "signature": "func ParseFromGenericEntitlement(model *entitlement.Entitlement) (*Entitlement, error)", + "line": 15 + } + ], + "line_count": 28 + }, + "openmeter/entitlement/uniqueness.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateUniqueConstraint", + "signature": "func ValidateUniqueConstraint(ents []Entitlement) error", + "line": 30 + }, + { + "kind": "struct", + "name": "UniquenessConstraintError", + "signature": "type UniquenessConstraintError struct", + "line": 64 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *UniquenessConstraintError) Error() string", + "line": 68 + } + ], + "line_count": 70 + }, + "openmeter/entitlement/uniqueness_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestSchedulingConstraint", + "signature": "func TestSchedulingConstraint(t *testing.T)", + "line": 15 + }, + { + "kind": "struct", + "name": "getEntInp", + "signature": "type getEntInp struct", + "line": 207 + }, + { + "kind": "func", + "name": "getEnt", + "signature": "func getEnt(t *testing.T, inp getEntInp) entitlement.Entitlement", + "line": 217 + } + ], + "line_count": 246 + }, + "openmeter/entitlement/usageperiod.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewUsagePeriodFromRecurrence", + "signature": "func NewUsagePeriodFromRecurrence(rec timeutil.Recurrence) UsagePeriod", + "line": 18 + }, + { + "kind": "func", + "name": "NewUsagePeriod", + "signature": "func NewUsagePeriod(recs []timeutil.Timed[timeutil.Recurrence]) UsagePeriod", + "line": 27 + }, + { + "kind": "func", + "name": "NewUsagePeriodInputFromRecurrence", + "signature": "func NewUsagePeriodInputFromRecurrence(rec timeutil.Recurrence) UsagePeriodInput", + "line": 34 + }, + { + "kind": "func", + "name": "NewStartingUsagePeriod", + "signature": "func NewStartingUsagePeriod(rec timeutil.Recurrence, start time.Time) UsagePeriod", + "line": 40 + }, + { + "kind": "func", + "name": "NewStartingUsagePeriodInput", + "signature": "func NewStartingUsagePeriodInput(rec timeutil.Recurrence, start time.Time) UsagePeriodInput", + "line": 48 + }, + { + "kind": "struct", + "name": "UsagePeriod", + "signature": "type UsagePeriod struct", + "line": 56 + }, + { + "kind": "struct", + "name": "usagePeriodSerde", + "signature": "type usagePeriodSerde struct", + "line": 60 + }, + { + "kind": "struct", + "name": "timedRecurrenceSerde", + "signature": "type timedRecurrenceSerde struct", + "line": 64 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (u UsagePeriod) MarshalJSON() ([]byte, error)", + "line": 69 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (u *UsagePeriod) UnmarshalJSON(data []byte) error", + "line": 82 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u UsagePeriod) Validate() error", + "line": 98 + }, + { + "kind": "func", + "name": "GetOriginalValueAsUsagePeriodInput", + "signature": "func (u *UsagePeriod) GetOriginalValueAsUsagePeriodInput() *UsagePeriodInput", + "line": 124 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (u UsagePeriod) Equal(other UsagePeriod) bool", + "line": 140 + }, + { + "kind": "func", + "name": "GetCurrentPeriodAt", + "signature": "func (u UsagePeriod) GetCurrentPeriodAt(at time.Time) (timeutil.ClosedPeriod, error)", + "line": 154 + }, + { + "kind": "func", + "name": "GetResetTimelineInclusive", + "signature": "func (u UsagePeriod) GetResetTimelineInclusive(inPeriod timeutil.ClosedPeriod) (timeutil.SimpleTimeline, error)", + "line": 186 + }, + { + "kind": "func", + "name": "GetUsagePeriodInputAt", + "signature": "func (u UsagePeriod) GetUsagePeriodInputAt(at time.Time) (UsagePeriodInput, int, error)", + "line": 252 + } + ], + "line_count": 271 + }, + "openmeter/entitlement/usageperiod_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestUsagePeriodValidation", + "signature": "func TestUsagePeriodValidation(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestUsagePeriodGetPeriodAt", + "signature": "func TestUsagePeriodGetPeriodAt(t *testing.T)", + "line": 60 + }, + { + "kind": "func", + "name": "TestUsagePeriodGetResetTimelineInclusive", + "signature": "func TestUsagePeriodGetResetTimelineInclusive(t *testing.T)", + "line": 258 + }, + { + "kind": "func", + "name": "TestUsagePeriodSerialization", + "signature": "func TestUsagePeriodSerialization(t *testing.T)", + "line": 383 + } + ], + "line_count": 407 + }, + "openmeter/entitlement/validators/customer/validator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "NewValidator", + "signature": "func NewValidator(entitlementRepo entitlement.EntitlementRepo) (*Validator, error)", + "line": 17 + }, + { + "kind": "struct", + "name": "Validator", + "signature": "type Validator struct", + "line": 27 + }, + { + "kind": "func", + "name": "ValidateDeleteCustomer", + "signature": "func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 32 + } + ], + "line_count": 56 + }, + "openmeter/event/metadata/event_type.go": { + "header": "\t\"fmt\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "EventType", + "signature": "type EventType struct", + "line": 14 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s *EventType) EventName() string", + "line": 25 + }, + { + "kind": "func", + "name": "VersionSubsystem", + "signature": "func (s *EventType) VersionSubsystem() string", + "line": 29 + }, + { + "kind": "func", + "name": "GetEventName", + "signature": "func GetEventName(spec EventType) string", + "line": 33 + }, + { + "kind": "struct", + "name": "EventMetadata", + "signature": "type EventMetadata struct", + "line": 37 + } + ], + "line_count": 59 + }, + "openmeter/event/metadata/resourcepath.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ComposeResourcePath", + "signature": "func ComposeResourcePath(namespace string, items ...string) string", + "line": 30 + }, + { + "kind": "func", + "name": "ComposeResourcePathRaw", + "signature": "func ComposeResourcePathRaw(items ...string) string", + "line": 34 + } + ], + "line_count": 36 + }, + "openmeter/event/models/models.go": { + "header": "type FeatureKeyAndID struct {\n\tKey string `json:\"key\"`\n\tID string `json:\"id\"`", + "symbols": [ + { + "kind": "struct", + "name": "FeatureKeyAndID", + "signature": "type FeatureKeyAndID struct", + "line": 5 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FeatureKeyAndID) Validate() error", + "line": 10 + }, + { + "kind": "struct", + "name": "NamespaceID", + "signature": "type NamespaceID struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NamespaceID) Validate() error", + "line": 26 + } + ], + "line_count": 32 + }, + "openmeter/info/httpdriver/currencies.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (h *handler) ListCurrencies() ListCurrenciesHandler", + "line": 21 + } + ], + "line_count": 50 + }, + "openmeter/info/httpdriver/driver.go": { + "header": "type Handler interface {\n\tListCurrencies() ListCurrenciesHandler\n}", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 5 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 9 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(options ...httptransport.HandlerOption) Handler", + "line": 13 + } + ], + "line_count": 17 + }, + "openmeter/ingest/dedupe.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "struct", + "name": "DeduplicatingCollector", + "signature": "type DeduplicatingCollector struct", + "line": 13 + }, + { + "kind": "func", + "name": "Ingest", + "signature": "func (d DeduplicatingCollector) Ingest(ctx context.Context, namespace string, ev event.Event) error", + "line": 20 + } + ], + "line_count": 31 + }, + "openmeter/ingest/dedupe_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "func", + "name": "TestDeduplicatingCollector", + "signature": "func TestDeduplicatingCollector(t *testing.T)", + "line": 15 + } + ], + "line_count": 44 + }, + "openmeter/ingest/httpdriver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "struct", + "name": "ErrorInvalidContentType", + "signature": "type ErrorInvalidContentType struct", + "line": 11 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ErrorInvalidContentType) Error() string", + "line": 15 + }, + { + "kind": "func", + "name": "Message", + "signature": "func (e ErrorInvalidContentType) Message() string", + "line": 21 + }, + { + "kind": "func", + "name": "Details", + "signature": "func (e ErrorInvalidContentType) Details() map[string]any", + "line": 25 + }, + { + "kind": "struct", + "name": "ErrorInvalidEvent", + "signature": "type ErrorInvalidEvent struct", + "line": 31 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ErrorInvalidEvent) Error() string", + "line": 35 + }, + { + "kind": "func", + "name": "Message", + "signature": "func (e ErrorInvalidEvent) Message() string", + "line": 41 + }, + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 45 + } + ], + "line_count": 50 + }, + "openmeter/ingest/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "IngestHandler", + "signature": "type IngestHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 22 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 28 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice ingest.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 37 + } + ], + "line_count": 47 + }, + "openmeter/ingest/httpdriver/ingest.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "IngestEvents", + "signature": "func (h *handler) IngestEvents() IngestEventsHandler", + "line": 23 + } + ], + "line_count": 109 + }, + "openmeter/ingest/httpdriver/ingest_test.go": { + "header": "\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestIngestEvents", + "signature": "func TestIngestEvents(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestIngestEvents_InvalidEvent", + "signature": "func TestIngestEvents_InvalidEvent(t *testing.T)", + "line": 72 + }, + { + "kind": "func", + "name": "TestBatchHandler", + "signature": "func TestBatchHandler(t *testing.T)", + "line": 97 + } + ], + "line_count": 149 + }, + "openmeter/ingest/ingest.go": { + "header": "\t\"context\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Collector", + "signature": "type Collector interface", + "line": 11 + } + ], + "line_count": 14 + }, + "openmeter/ingest/ingestadapter/telemetry.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "struct", + "name": "collectorTelemetry", + "signature": "type collectorTelemetry struct", + "line": 17 + }, + { + "kind": "func", + "name": "WithTelemetry", + "signature": "func WithTelemetry(collector ingest.Collector, metricMeter metric.Meter, tracer trace.Tracer) (ingest.Collector, error)", + "line": 26 + }, + { + "kind": "func", + "name": "Ingest", + "signature": "func (c *collectorTelemetry) Ingest(ctx context.Context, namespace string, ev event.Event) error", + "line": 55 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (c *collectorTelemetry) Close()", + "line": 82 + } + ], + "line_count": 84 + }, + "openmeter/ingest/inmemory.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "struct", + "name": "InMemoryCollector", + "signature": "type InMemoryCollector struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewInMemoryCollector", + "signature": "func NewInMemoryCollector() *InMemoryCollector", + "line": 20 + }, + { + "kind": "func", + "name": "init", + "signature": "func (c *InMemoryCollector) init()", + "line": 24 + }, + { + "kind": "func", + "name": "Ingest", + "signature": "func (c *InMemoryCollector) Ingest(_ context.Context, namespace string, ev event.Event) error", + "line": 31 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (c *InMemoryCollector) Close()", + "line": 43 + }, + { + "kind": "func", + "name": "Events", + "signature": "func (c *InMemoryCollector) Events(namespace string) []event.Event", + "line": 46 + }, + { + "kind": "func", + "name": "Namespaces", + "signature": "func (c *InMemoryCollector) Namespaces() []string", + "line": 56 + } + ], + "line_count": 63 + }, + "openmeter/ingest/inmemory_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"", + "symbols": [ + { + "kind": "func", + "name": "TestInMemoryCollector", + "signature": "func TestInMemoryCollector(t *testing.T)", + "line": 14 + } + ], + "line_count": 28 + }, + "openmeter/ingest/kafkaingest/collector.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ToIngestedAt", + "signature": "func ToIngestedAt(t time.Time) string", + "line": 31 + }, + { + "kind": "func", + "name": "FromIngestedAt", + "signature": "func FromIngestedAt(s string) (time.Time, error)", + "line": 35 + }, + { + "kind": "struct", + "name": "Collector", + "signature": "type Collector struct", + "line": 40 + }, + { + "kind": "func", + "name": "NewCollector", + "signature": "func NewCollector(\n\tproducer *kafka.Producer,\n\tserializer serializer.Serializer,\n\tresolver topicresolver.Resolver,\n\tprovisioner pkgkafka.TopicProvisioner,\n\tpartitions int,\n\tlogger *slog.Logger,\n\ttracer trace.Tracer,\n) (*Collector, error)", + "line": 51 + }, + { + "kind": "func", + "name": "Ingest", + "signature": "func (s Collector) Ingest(ctx context.Context, namespace string, ev event.Event) error", + "line": 92 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (s Collector) Close()", + "line": 171 + }, + { + "kind": "func", + "name": "KafkaProducerGroup", + "signature": "func KafkaProducerGroup(ctx context.Context, producer *kafka.Producer, logger *slog.Logger, kafkaMetrics *kafkametrics.Metrics) (execute func() error, interrupt func(error))", + "line": 176 + } + ], + "line_count": 244 + }, + "openmeter/ingest/kafkaingest/namespace.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NamespaceHandler", + "signature": "type NamespaceHandler struct", + "line": 13 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (h NamespaceHandler) CreateNamespace(ctx context.Context, namespace string) error", + "line": 24 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (h NamespaceHandler) DeleteNamespace(ctx context.Context, namespace string) error", + "line": 46 + } + ], + "line_count": 66 + }, + "openmeter/ingest/kafkaingest/serializer/json.go": { + "header": "\t\"encoding/json\"\n\t\"github.com/cloudevents/sdk-go/v2/event\"\n\t\"github.com/openmeterio/openmeter/openmeter/dedupe\"", + "symbols": [ + { + "kind": "struct", + "name": "JSONSerializer", + "signature": "type JSONSerializer struct", + "line": 11 + }, + { + "kind": "func", + "name": "NewJSONSerializer", + "signature": "func NewJSONSerializer() JSONSerializer", + "line": 13 + }, + { + "kind": "func", + "name": "SerializeKey", + "signature": "func (s JSONSerializer) SerializeKey(topic string, namespace string, ev event.Event) ([]byte, error)", + "line": 17 + }, + { + "kind": "func", + "name": "SerializeValue", + "signature": "func (s JSONSerializer) SerializeValue(topic string, ev event.Event) ([]byte, error)", + "line": 27 + }, + { + "kind": "func", + "name": "GetFormat", + "signature": "func (s JSONSerializer) GetFormat() string", + "line": 36 + }, + { + "kind": "func", + "name": "GetKeySchemaId", + "signature": "func (s JSONSerializer) GetKeySchemaId() int", + "line": 40 + }, + { + "kind": "func", + "name": "GetValueSchemaId", + "signature": "func (s JSONSerializer) GetValueSchemaId() int", + "line": 44 + } + ], + "line_count": 46 + }, + "openmeter/ingest/kafkaingest/serializer/serializer.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Serializer", + "signature": "type Serializer interface", + "line": 12 + }, + { + "kind": "struct", + "name": "CloudEventsKafkaPayload", + "signature": "type CloudEventsKafkaPayload struct", + "line": 20 + }, + { + "kind": "func", + "name": "toCloudEventsKafkaPayload", + "signature": "func toCloudEventsKafkaPayload(ev event.Event) (CloudEventsKafkaPayload, error)", + "line": 31 + }, + { + "kind": "func", + "name": "FromKafkaPayloadToCloudEvents", + "signature": "func FromKafkaPayloadToCloudEvents(payload CloudEventsKafkaPayload) (event.Event, error)", + "line": 63 + }, + { + "kind": "func", + "name": "ValidateKafkaPayloadToCloudEvent", + "signature": "func ValidateKafkaPayloadToCloudEvent(ce CloudEventsKafkaPayload) error", + "line": 90 + } + ], + "line_count": 114 + }, + "openmeter/ingest/kafkaingest/serializer/serializer_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestToCloudEventsKafkaPayload", + "signature": "func TestToCloudEventsKafkaPayload(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestFromKafkaPayloadToCloudEvents", + "signature": "func TestFromKafkaPayloadToCloudEvents(t *testing.T)", + "line": 99 + }, + { + "kind": "func", + "name": "TestSerializeKey", + "signature": "func TestSerializeKey(t *testing.T)", + "line": 208 + } + ], + "line_count": 221 + }, + "openmeter/ingest/kafkaingest/topicresolver/namespacedtopic.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "NamespacedTopicResolver", + "signature": "type NamespacedTopicResolver struct", + "line": 11 + }, + { + "kind": "func", + "name": "Resolve", + "signature": "func (r NamespacedTopicResolver) Resolve(_ context.Context, namespace string) (string, error)", + "line": 17 + }, + { + "kind": "func", + "name": "NewNamespacedTopicResolver", + "signature": "func NewNamespacedTopicResolver(template string) (*NamespacedTopicResolver, error)", + "line": 21 + } + ], + "line_count": 28 + }, + "openmeter/ingest/kafkaingest/topicresolver/resolver.go": { + "header": "type Resolver interface {\n\tResolve(ctx context.Context, namespace string) (string, error)\n}", + "symbols": [ + { + "kind": "interface", + "name": "Resolver", + "signature": "type Resolver interface", + "line": 6 + } + ], + "line_count": 8 + }, + "openmeter/ingest/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 13 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 37 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(config Config) (Service, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "IngestEventsRequest", + "signature": "type IngestEventsRequest struct", + "line": 53 + }, + { + "kind": "func", + "name": "IngestEvents", + "signature": "func (s service) IngestEvents(ctx context.Context, request IngestEventsRequest) (bool, error)", + "line": 58 + }, + { + "kind": "func", + "name": "processEvent", + "signature": "func (s service) processEvent(ctx context.Context, event event.Event, namespace string) error", + "line": 69 + } + ], + "line_count": 96 + }, + "openmeter/ledger/account.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerAccounts", + "signature": "type CustomerAccounts struct", + "line": 21 + }, + { + "kind": "struct", + "name": "BusinessAccounts", + "signature": "type BusinessAccounts struct", + "line": 49 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t AccountType) Validate() error", + "line": 56 + }, + { + "kind": "interface", + "name": "AccountResolver", + "signature": "type AccountResolver interface", + "line": 67 + }, + { + "kind": "interface", + "name": "AccountReader", + "signature": "type AccountReader interface", + "line": 73 + }, + { + "kind": "interface", + "name": "AccountProvisioner", + "signature": "type AccountProvisioner interface", + "line": 81 + }, + { + "kind": "interface", + "name": "AccountCatalog", + "signature": "type AccountCatalog interface", + "line": 86 + }, + { + "kind": "interface", + "name": "AccountLocker", + "signature": "type AccountLocker interface", + "line": 91 + }, + { + "kind": "struct", + "name": "ListAccountsInput", + "signature": "type ListAccountsInput struct", + "line": 95 + }, + { + "kind": "struct", + "name": "ListSubAccountsInput", + "signature": "type ListSubAccountsInput struct", + "line": 100 + }, + { + "kind": "struct", + "name": "CreateAccountInput", + "signature": "type CreateAccountInput struct", + "line": 107 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreateAccountInput) Validate() error", + "line": 113 + }, + { + "kind": "struct", + "name": "CreateSubAccountInput", + "signature": "type CreateSubAccountInput struct", + "line": 121 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CreateSubAccountInput) Validate() error", + "line": 128 + } + ], + "line_count": 142 + }, + "openmeter/ledger/account/account.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "SubAccountCreatorLister", + "signature": "type SubAccountCreatorLister interface", + "line": 12 + }, + { + "kind": "struct", + "name": "AccountLiveServices", + "signature": "type AccountLiveServices struct", + "line": 17 + }, + { + "kind": "struct", + "name": "AccountData", + "signature": "type AccountData struct", + "line": 22 + }, + { + "kind": "func", + "name": "NewAccountFromData", + "signature": "func NewAccountFromData(data AccountData, services AccountLiveServices) (ledger.Account, error)", + "line": 29 + }, + { + "kind": "struct", + "name": "Account", + "signature": "type Account struct", + "line": 54 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (a *Account) Type() ledger.AccountType", + "line": 62 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (a *Account) ID() models.NamespacedID", + "line": 67 + } + ], + "line_count": 69 + }, + "openmeter/ledger/account/account_business.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "BusinessAccount", + "signature": "type BusinessAccount struct", + "line": 14 + }, + { + "kind": "func", + "name": "newBusinessAccount", + "signature": "func newBusinessAccount(a *Account) *BusinessAccount", + "line": 20 + }, + { + "kind": "func", + "name": "GetSubAccountForRoute", + "signature": "func (a *BusinessAccount) GetSubAccountForRoute(ctx context.Context, params ledger.BusinessRouteParams) (ledger.SubAccount, error)", + "line": 25 + } + ], + "line_count": 35 + }, + "openmeter/ledger/account/account_customer.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "func", + "name": "newCustomerAccount", + "signature": "func newCustomerAccount(a *Account) *CustomerAccount", + "line": 9 + }, + { + "kind": "struct", + "name": "CustomerAccount", + "signature": "type CustomerAccount struct", + "line": 15 + }, + { + "kind": "struct", + "name": "CustomerFBOAccount", + "signature": "type CustomerFBOAccount struct", + "line": 26 + }, + { + "kind": "func", + "name": "newCustomerFBOAccount", + "signature": "func newCustomerFBOAccount(a *Account) *CustomerFBOAccount", + "line": 32 + }, + { + "kind": "func", + "name": "GetSubAccountForRoute", + "signature": "func (a *CustomerFBOAccount) GetSubAccountForRoute(ctx context.Context, params ledger.CustomerFBORouteParams) (ledger.SubAccount, error)", + "line": 37 + }, + { + "kind": "struct", + "name": "CustomerReceivableAccount", + "signature": "type CustomerReceivableAccount struct", + "line": 54 + }, + { + "kind": "func", + "name": "newCustomerReceivableAccount", + "signature": "func newCustomerReceivableAccount(a *Account) *CustomerReceivableAccount", + "line": 60 + }, + { + "kind": "func", + "name": "GetSubAccountForRoute", + "signature": "func (a *CustomerReceivableAccount) GetSubAccountForRoute(ctx context.Context, params ledger.CustomerReceivableRouteParams) (ledger.SubAccount, error)", + "line": 65 + }, + { + "kind": "struct", + "name": "CustomerAccruedAccount", + "signature": "type CustomerAccruedAccount struct", + "line": 82 + }, + { + "kind": "func", + "name": "newCustomerAccruedAccount", + "signature": "func newCustomerAccruedAccount(a *Account) *CustomerAccruedAccount", + "line": 88 + }, + { + "kind": "func", + "name": "GetSubAccountForRoute", + "signature": "func (a *CustomerAccruedAccount) GetSubAccountForRoute(ctx context.Context, params ledger.CustomerAccruedRouteParams) (ledger.SubAccount, error)", + "line": 94 + } + ], + "line_count": 104 + }, + "openmeter/ledger/account/adapter/account.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "CreateAccount", + "signature": "func (r *repo) CreateAccount(ctx context.Context, input ledgeraccount.CreateAccountInput) (*ledgeraccount.AccountData, error)", + "line": 14 + }, + { + "kind": "func", + "name": "GetAccountByID", + "signature": "func (r *repo) GetAccountByID(ctx context.Context, id models.NamespacedID) (*ledgeraccount.AccountData, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ListAccounts", + "signature": "func (r *repo) ListAccounts(ctx context.Context, input ledgeraccount.ListAccountsInput) ([]*ledgeraccount.AccountData, error)", + "line": 45 + }, + { + "kind": "func", + "name": "MapAccountData", + "signature": "func MapAccountData(entity *db.LedgerAccount) (*ledgeraccount.AccountData, error)", + "line": 72 + } + ], + "line_count": 86 + }, + "openmeter/ledger/account/adapter/repo.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "repo", + "signature": "type repo struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewRepo", + "signature": "func NewRepo(db *entdb.Client) ledgeraccount.Repo", + "line": 20 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *repo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 26 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *repo) WithTx(ctx context.Context, tx *entutils.TxDriver) *repo", + "line": 37 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *repo) Self() *repo", + "line": 43 + } + ], + "line_count": 45 + }, + "openmeter/ledger/account/adapter/repo_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRepo_CreateAndGetAccount", + "signature": "func TestRepo_CreateAndGetAccount(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestRepo_GetAccountByID_NotFound", + "signature": "func TestRepo_GetAccountByID_NotFound(t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestRepo_ListSubAccounts", + "signature": "func TestRepo_ListSubAccounts(t *testing.T)", + "line": 81 + }, + { + "kind": "func", + "name": "TestRepo_SubAccountRouteUniquenessConstraints", + "signature": "func TestRepo_SubAccountRouteUniquenessConstraints(t *testing.T)", + "line": 231 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(t *testing.T, raw string) alpacadecimal.Decimal", + "line": 312 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 321 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 327 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 340 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 358 + }, + { + "kind": "func", + "name": "testNamespace", + "signature": "func testNamespace() string", + "line": 366 + } + ], + "line_count": 368 + }, + "openmeter/ledger/account/adapter/subaccount.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "EnsureSubAccount", + "signature": "func (r *repo) EnsureSubAccount(ctx context.Context, input ledgeraccount.CreateSubAccountInput) (*ledgeraccount.SubAccountData, error)", + "line": 21 + }, + { + "kind": "func", + "name": "resolveOrCreateRoute", + "signature": "func (r *repo) resolveOrCreateRoute(ctx context.Context, input ledgeraccount.CreateSubAccountInput) (*db.LedgerSubAccountRoute, error)", + "line": 71 + }, + { + "kind": "func", + "name": "GetSubAccountByID", + "signature": "func (r *repo) GetSubAccountByID(ctx context.Context, id models.NamespacedID) (*ledgeraccount.SubAccountData, error)", + "line": 125 + }, + { + "kind": "func", + "name": "ListSubAccounts", + "signature": "func (r *repo) ListSubAccounts(ctx context.Context, input ledgeraccount.ListSubAccountsInput) ([]*ledgeraccount.SubAccountData, error)", + "line": 146 + }, + { + "kind": "func", + "name": "MapSubAccountData", + "signature": "func MapSubAccountData(entity *db.LedgerSubAccount) (ledgeraccount.SubAccountData, error)", + "line": 228 + } + ], + "line_count": 260 + }, + "openmeter/ledger/account/address.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "struct", + "name": "AddressData", + "signature": "type AddressData struct", + "line": 10 + }, + { + "kind": "func", + "name": "NewAddressFromData", + "signature": "func NewAddressFromData(data AddressData) (*Address, error)", + "line": 18 + }, + { + "kind": "func", + "name": "newSubAccountRouteFromAddressData", + "signature": "func newSubAccountRouteFromAddressData(data AddressData) (ledger.SubAccountRoute, error)", + "line": 30 + }, + { + "kind": "struct", + "name": "Address", + "signature": "type Address struct", + "line": 49 + }, + { + "kind": "func", + "name": "SubAccountID", + "signature": "func (a *Address) SubAccountID() string", + "line": 60 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func (a *Address) AccountType() ledger.AccountType", + "line": 64 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (a *Address) Route() ledger.SubAccountRoute", + "line": 68 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (a *Address) Equal(other ledger.PostingAddress) bool", + "line": 72 + } + ], + "line_count": 94 + }, + "openmeter/ledger/account/ledger.go": { + "header": "", + "symbols": [], + "line_count": 1 + }, + "openmeter/ledger/account/repo.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "Repo", + "signature": "type Repo interface", + "line": 10 + } + ], + "line_count": 30 + }, + "openmeter/ledger/account/service.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)\ntype Service interface {", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 7 + } + ], + "line_count": 17 + }, + "openmeter/ledger/account/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sort\"", + "symbols": [ + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 15 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(repo account.Repo, locker *lockr.Locker) account.Service", + "line": 23 + }, + { + "kind": "func", + "name": "CreateAccount", + "signature": "func (s *service) CreateAccount(ctx context.Context, input ledger.CreateAccountInput) (ledger.Account, error)", + "line": 34 + }, + { + "kind": "func", + "name": "EnsureSubAccount", + "signature": "func (s *service) EnsureSubAccount(ctx context.Context, input ledger.CreateSubAccountInput) (ledger.SubAccount, error)", + "line": 47 + }, + { + "kind": "func", + "name": "GetAccountByID", + "signature": "func (s *service) GetAccountByID(ctx context.Context, id models.NamespacedID) (ledger.Account, error)", + "line": 62 + }, + { + "kind": "func", + "name": "GetSubAccountByID", + "signature": "func (s *service) GetSubAccountByID(ctx context.Context, id models.NamespacedID) (ledger.SubAccount, error)", + "line": 71 + }, + { + "kind": "func", + "name": "ListSubAccounts", + "signature": "func (s *service) ListSubAccounts(ctx context.Context, input ledger.ListSubAccountsInput) ([]ledger.SubAccount, error)", + "line": 80 + }, + { + "kind": "func", + "name": "ListAccounts", + "signature": "func (s *service) ListAccounts(ctx context.Context, input ledger.ListAccountsInput) ([]ledger.Account, error)", + "line": 98 + }, + { + "kind": "func", + "name": "LockAccountsForPosting", + "signature": "func (s *service) LockAccountsForPosting(ctx context.Context, accounts []ledger.Account) error", + "line": 116 + } + ], + "line_count": 158 + }, + "openmeter/ledger/account/subaccount.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "struct", + "name": "SubAccountData", + "signature": "type SubAccountData struct", + "line": 11 + }, + { + "kind": "struct", + "name": "SubAccountRouteData", + "signature": "type SubAccountRouteData struct", + "line": 24 + }, + { + "kind": "func", + "name": "NewSubAccountFromData", + "signature": "func NewSubAccountFromData(data SubAccountData) (*SubAccount, error)", + "line": 30 + }, + { + "kind": "struct", + "name": "SubAccount", + "signature": "type SubAccount struct", + "line": 53 + }, + { + "kind": "func", + "name": "Address", + "signature": "func (s *SubAccount) Address() ledger.PostingAddress", + "line": 60 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (s *SubAccount) Route() ledger.Route", + "line": 64 + }, + { + "kind": "func", + "name": "AccountID", + "signature": "func (s *SubAccount) AccountID() models.NamespacedID", + "line": 68 + } + ], + "line_count": 73 + }, + "openmeter/ledger/accounts.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "interface", + "name": "CustomerAccount", + "signature": "type CustomerAccount interface", + "line": 17 + }, + { + "kind": "interface", + "name": "CustomerFBOAccount", + "signature": "type CustomerFBOAccount interface", + "line": 22 + }, + { + "kind": "struct", + "name": "CustomerFBORouteParams", + "signature": "type CustomerFBORouteParams struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p CustomerFBORouteParams) Validate() error", + "line": 37 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (p CustomerFBORouteParams) Route() Route", + "line": 49 + }, + { + "kind": "interface", + "name": "CustomerReceivableAccount", + "signature": "type CustomerReceivableAccount interface", + "line": 61 + }, + { + "kind": "struct", + "name": "CustomerReceivableRouteParams", + "signature": "type CustomerReceivableRouteParams struct", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p CustomerReceivableRouteParams) Validate() error", + "line": 77 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (p CustomerReceivableRouteParams) Route() Route", + "line": 85 + }, + { + "kind": "interface", + "name": "CustomerAccruedAccount", + "signature": "type CustomerAccruedAccount interface", + "line": 97 + }, + { + "kind": "struct", + "name": "CustomerAccruedRouteParams", + "signature": "type CustomerAccruedRouteParams struct", + "line": 104 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p CustomerAccruedRouteParams) Validate() error", + "line": 111 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (p CustomerAccruedRouteParams) Route() Route", + "line": 115 + }, + { + "kind": "interface", + "name": "BusinessAccount", + "signature": "type BusinessAccount interface", + "line": 129 + }, + { + "kind": "struct", + "name": "BusinessRouteParams", + "signature": "type BusinessRouteParams struct", + "line": 135 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p BusinessRouteParams) Validate() error", + "line": 142 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (p BusinessRouteParams) Route() Route", + "line": 146 + } + ], + "line_count": 153 + }, + "openmeter/ledger/annotations.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "ChargeTransactionAnnotationsInput", + "signature": "type ChargeTransactionAnnotationsInput struct", + "line": 26 + }, + { + "kind": "func", + "name": "ChargeAnnotations", + "signature": "func ChargeAnnotations(chargeID models.NamespacedID) models.Annotations", + "line": 80 + }, + { + "kind": "func", + "name": "ChargeTransactionAnnotations", + "signature": "func ChargeTransactionAnnotations(input ChargeTransactionAnnotationsInput) models.Annotations", + "line": 87 + }, + { + "kind": "func", + "name": "TransactionAnnotations", + "signature": "func TransactionAnnotations(templateCode string, direction TransactionDirection) models.Annotations", + "line": 109 + }, + { + "kind": "func", + "name": "BreakageAnnotations", + "signature": "func BreakageAnnotations(kind BreakageKind, recordID string, planID *string) models.Annotations", + "line": 116 + }, + { + "kind": "func", + "name": "TransactionTemplateCodeFromAnnotations", + "signature": "func TransactionTemplateCodeFromAnnotations(annotations models.Annotations) (string, error)", + "line": 130 + }, + { + "kind": "func", + "name": "TransactionDirectionFromAnnotations", + "signature": "func TransactionDirectionFromAnnotations(annotations models.Annotations) (TransactionDirection, error)", + "line": 144 + } + ], + "line_count": 162 + }, + "openmeter/ledger/annotations_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestTransactionTemplateCodeAnnotations", + "signature": "func TestTransactionTemplateCodeAnnotations(t *testing.T)", + "line": 9 + } + ], + "line_count": 17 + }, + "openmeter/ledger/balance.go": { + "header": "\t\"context\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "BalanceQuery", + "signature": "type BalanceQuery struct", + "line": 8 + }, + { + "kind": "interface", + "name": "BalanceQuerier", + "signature": "type BalanceQuerier interface", + "line": 13 + } + ], + "line_count": 16 + }, + "openmeter/ledger/breakage/README.md": { + "header": "# Credit Expiration Breakage\n\nThis package keeps future credit-expiration ledger entries aligned with actual customer credit usage.\n\nThe ledger is the accounting source of truth. Breakage records are an allocation/index layer: they let later collection and correction flows find open planned breakage, reopen released breakage, and project customer-visible expired credit.\n\n## Notation\n\n- `FBO(r)` is the customer credit account route.\n- `BR(b)` is the breakage account route used for breakage accounting.\n- `r.priority` is the credit draw-down priority. Lower values are consumed first.\n- `@T` is ledger `booked_at`.\n- `E` is an expiration timestamp.\n- `plan` means pre-booked future breakage for issued expiring credit.\n- `release` means a future entry that reduces planned breakage because credit was used or removed before expiration.\n- `reopen` means a future entry that increases planned breakage again because previously used credit became unused.\n- `breakage impact` means the customer-visible expired amount after plans, releases, and reopens are netted.\n\nAll breakage record amounts are positive. The sign lives in the ledger entries.\n", + "symbols": [], + "line_count": 378 + }, + "openmeter/ledger/breakage/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (breakage.Adapter, error)", + "line": 27 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 37 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 41 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 52 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 60 + } + ], + "line_count": 62 + }, + "openmeter/ledger/breakage/adapter/record.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tsql \"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "CreateRecords", + "signature": "func (a *adapter) CreateRecords(ctx context.Context, input breakage.CreateRecordsInput) error", + "line": 19 + }, + { + "kind": "func", + "name": "ListReleaseRecords", + "signature": "func (a *adapter) ListReleaseRecords(ctx context.Context, input breakage.ListReleasesInput) ([]breakage.Record, error)", + "line": 63 + }, + { + "kind": "func", + "name": "ListExpiredRecords", + "signature": "func (a *adapter) ListExpiredRecords(ctx context.Context, input breakage.ListExpiredRecordsInput) ([]breakage.Record, error)", + "line": 149 + }, + { + "kind": "func", + "name": "ListCandidateRecords", + "signature": "func (a *adapter) ListCandidateRecords(ctx context.Context, input breakage.ListPlansInput) ([]breakage.Record, error)", + "line": 192 + }, + { + "kind": "func", + "name": "mapRecordFromDB", + "signature": "func mapRecordFromDB(row *entdb.LedgerBreakageRecord) breakage.Record", + "line": 235 + }, + { + "kind": "func", + "name": "mapRecords", + "signature": "func mapRecords(rows []*entdb.LedgerBreakageRecord) []breakage.Record", + "line": 267 + } + ], + "line_count": 274 + }, + "openmeter/ledger/breakage/breakage_impacts.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListExpiredBreakageImpactsInput) Validate() error", + "line": 17 + }, + { + "kind": "func", + "name": "ListExpiredBreakageImpacts", + "signature": "func (s *service) ListExpiredBreakageImpacts(ctx context.Context, input ListExpiredBreakageImpactsInput) (ListExpiredBreakageImpactsResult, error)", + "line": 57 + }, + { + "kind": "func", + "name": "breakageImpactMatchesCursorWindow", + "signature": "func breakageImpactMatchesCursorWindow(item BreakageImpact, after, before *ledger.TransactionCursor) bool", + "line": 152 + }, + { + "kind": "struct", + "name": "expiredBreakageImpactGroupKey", + "signature": "type expiredBreakageImpactGroupKey struct", + "line": 166 + }, + { + "kind": "struct", + "name": "expiredBreakageImpactGroup", + "signature": "type expiredBreakageImpactGroup struct", + "line": 171 + } + ], + "line_count": 176 + }, + "openmeter/ledger/breakage/noop.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NoopService", + "signature": "type NoopService struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewNoopService", + "signature": "func NewNoopService() Service", + "line": 50 + } + ], + "line_count": 52 + }, + "openmeter/ledger/breakage/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 19 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 57 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 64 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(config Config) (Service, error)", + "line": 82 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 93 + }, + { + "kind": "struct", + "name": "PlanIssuanceInput", + "signature": "type PlanIssuanceInput struct", + "line": 100 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PlanIssuanceInput) Validate() error", + "line": 114 + }, + { + "kind": "struct", + "name": "ReleasePlanInput", + "signature": "type ReleasePlanInput struct", + "line": 164 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReleasePlanInput) Validate() error", + "line": 171 + }, + { + "kind": "struct", + "name": "ReopenReleaseInput", + "signature": "type ReopenReleaseInput struct", + "line": 209 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ReopenReleaseInput) Validate() error", + "line": 215 + }, + { + "kind": "func", + "name": "ValidateForReference", + "signature": "func (c Record) ValidateForReference() error", + "line": 255 + }, + { + "kind": "func", + "name": "PlanIssuance", + "signature": "func (s *service) PlanIssuance(ctx context.Context, input PlanIssuanceInput) ([]ledger.TransactionInput, []PendingRecord, error)", + "line": 288 + }, + { + "kind": "func", + "name": "ReleasePlan", + "signature": "func (s *service) ReleasePlan(ctx context.Context, input ReleasePlanInput) (ledger.TransactionInput, PendingRecord, error)", + "line": 349 + }, + { + "kind": "func", + "name": "ReopenRelease", + "signature": "func (s *service) ReopenRelease(ctx context.Context, input ReopenReleaseInput) (ledger.TransactionInput, PendingRecord, error)", + "line": 387 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (s *service) ListPlans(ctx context.Context, input ListPlansInput) ([]Plan, error)", + "line": 424 + }, + { + "kind": "func", + "name": "ListReleases", + "signature": "func (s *service) ListReleases(ctx context.Context, input ListReleasesInput) ([]Release, error)", + "line": 481 + }, + { + "kind": "func", + "name": "ListExpiredRecords", + "signature": "func (s *service) ListExpiredRecords(ctx context.Context, input ListExpiredRecordsInput) ([]Record, error)", + "line": 533 + }, + { + "kind": "func", + "name": "PersistCommittedRecords", + "signature": "func (s *service) PersistCommittedRecords(ctx context.Context, pending []PendingRecord, group ledger.TransactionGroup) error", + "line": 551 + }, + { + "kind": "func", + "name": "committedSourceEntriesByIdentity", + "signature": "func committedSourceEntriesByIdentity(group ledger.TransactionGroup) map[string]ledger.Entry", + "line": 610 + }, + { + "kind": "func", + "name": "resolvePlanAddresses", + "signature": "func (s *service) resolvePlanAddresses(ctx context.Context, input PlanIssuanceInput) (ledger.PostingAddress, ledger.PostingAddress, error)", + "line": 630 + }, + { + "kind": "func", + "name": "hydratePlanAddresses", + "signature": "func (s *service) hydratePlanAddresses(ctx context.Context, plan *Plan) error", + "line": 662 + }, + { + "kind": "func", + "name": "hydrateReleaseAddresses", + "signature": "func (s *service) hydrateReleaseAddresses(ctx context.Context, release *Release) error", + "line": 685 + }, + { + "kind": "func", + "name": "resolveBreakageTemplate", + "signature": "func (s *service) resolveBreakageTemplate(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\trecordID string,\n\tplanID *string,\n\ttemplate transactions.TransactionTemplate,\n) (ledger.TransactionInput, error)", + "line": 708 + }, + { + "kind": "func", + "name": "breakageKindForTemplate", + "signature": "func breakageKindForTemplate(template transactions.TransactionTemplate) (ledger.BreakageKind, error)", + "line": 740 + }, + { + "kind": "func", + "name": "breakageRecordID", + "signature": "func breakageRecordID(annotations models.Annotations) (string, bool)", + "line": 753 + }, + { + "kind": "func", + "name": "resolveCreditPriority", + "signature": "func resolveCreditPriority(priority *int) int", + "line": 767 + }, + { + "kind": "func", + "name": "newRecordID", + "signature": "func newRecordID(namespace string) models.NamespacedID", + "line": 775 + } + ], + "line_count": 780 + }, + "openmeter/ledger/breakage/types.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Record", + "signature": "type Record struct", + "line": 38 + }, + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 72 + }, + { + "kind": "struct", + "name": "Release", + "signature": "type Release struct", + "line": 82 + }, + { + "kind": "struct", + "name": "PendingRecord", + "signature": "type PendingRecord struct", + "line": 94 + }, + { + "kind": "struct", + "name": "ListPlansInput", + "signature": "type ListPlansInput struct", + "line": 104 + }, + { + "kind": "struct", + "name": "ListReleasesInput", + "signature": "type ListReleasesInput struct", + "line": 113 + }, + { + "kind": "struct", + "name": "ListExpiredRecordsInput", + "signature": "type ListExpiredRecordsInput struct", + "line": 122 + }, + { + "kind": "struct", + "name": "ListExpiredBreakageImpactsInput", + "signature": "type ListExpiredBreakageImpactsInput struct", + "line": 130 + }, + { + "kind": "struct", + "name": "ListExpiredBreakageImpactsResult", + "signature": "type ListExpiredBreakageImpactsResult struct", + "line": 141 + }, + { + "kind": "struct", + "name": "BreakageImpact", + "signature": "type BreakageImpact struct", + "line": 148 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (i BreakageImpact) Cursor() ledger.TransactionCursor", + "line": 158 + }, + { + "kind": "struct", + "name": "CreateRecordsInput", + "signature": "type CreateRecordsInput struct", + "line": 168 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateRecordsInput) Validate() error", + "line": 172 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Record) Validate() error", + "line": 182 + }, + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 244 + } + ], + "line_count": 262 + }, + "openmeter/ledger/chargeadapter/annotations.go": { + "header": "\t\"github.com/samber/lo\"\n\tchargecreditpurchase \"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\tchargeflatfee \"github.com/openmeterio/openmeter/openmeter/billing/charges/flatfee\"", + "symbols": [ + { + "kind": "func", + "name": "chargeAnnotationsForCreditPurchaseCharge", + "signature": "func chargeAnnotationsForCreditPurchaseCharge(charge chargecreditpurchase.Charge) models.Annotations", + "line": 14 + }, + { + "kind": "func", + "name": "chargeAnnotationsForFlatFeeCharge", + "signature": "func chargeAnnotationsForFlatFeeCharge(charge chargeflatfee.Charge) models.Annotations", + "line": 25 + }, + { + "kind": "func", + "name": "chargeAnnotationsForUsageBasedCharge", + "signature": "func chargeAnnotationsForUsageBasedCharge(charge chargeusagebased.Charge) models.Annotations", + "line": 36 + }, + { + "kind": "func", + "name": "chargeTransactionAnnotations", + "signature": "func chargeTransactionAnnotations(chargeID models.NamespacedID, subscription *meta.SubscriptionReference, featureID *string) models.Annotations", + "line": 47 + } + ], + "line_count": 65 + }, + "openmeter/ledger/chargeadapter/bookedat_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "requireLedgerBookedAtEqual", + "signature": "func requireLedgerBookedAtEqual(t *testing.T, expected, actual time.Time)", + "line": 10 + }, + { + "kind": "func", + "name": "requireLedgerBookedAtNotEqual", + "signature": "func requireLedgerBookedAtNotEqual(t *testing.T, expected, actual time.Time)", + "line": 18 + } + ], + "line_count": 24 + }, + "openmeter/ledger/chargeadapter/creditpurchase.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "creditPurchaseHandler", + "signature": "type creditPurchaseHandler struct", + "line": 25 + }, + { + "kind": "func", + "name": "NewCreditPurchaseHandler", + "signature": "func NewCreditPurchaseHandler(\n\tledger ledger.Ledger,\n\tbalanceQuerier ledger.BalanceQuerier,\n\taccountResolver ledger.AccountResolver,\n\taccountCatalog ledger.AccountCatalog,\n\tbreakageService breakage.Service,\n\ttransactionManager transaction.Creator,\n) (chargecreditpurchase.Handler, error)", + "line": 37 + }, + { + "kind": "func", + "name": "OnPromotionalCreditPurchase", + "signature": "func (h *creditPurchaseHandler) OnPromotionalCreditPurchase(ctx context.Context, charge chargecreditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 62 + }, + { + "kind": "func", + "name": "OnCreditPurchaseInitiated", + "signature": "func (h *creditPurchaseHandler) OnCreditPurchaseInitiated(ctx context.Context, charge chargecreditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 66 + }, + { + "kind": "func", + "name": "OnCreditPurchasePaymentAuthorized", + "signature": "func (h *creditPurchaseHandler) OnCreditPurchasePaymentAuthorized(ctx context.Context, input chargecreditpurchase.PaymentEventInput) (ledgertransaction.GroupReference, error)", + "line": 70 + }, + { + "kind": "func", + "name": "OnCreditPurchasePaymentSettled", + "signature": "func (h *creditPurchaseHandler) OnCreditPurchasePaymentSettled(ctx context.Context, input chargecreditpurchase.PaymentEventInput) (ledgertransaction.GroupReference, error)", + "line": 127 + }, + { + "kind": "func", + "name": "issueCreditPurchase", + "signature": "func (h *creditPurchaseHandler) issueCreditPurchase(ctx context.Context, charge chargecreditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 187 + }, + { + "kind": "func", + "name": "issueCreditPurchaseGroup", + "signature": "func (h *creditPurchaseHandler) issueCreditPurchaseGroup(ctx context.Context, charge chargecreditpurchase.Charge) (ledgertransaction.GroupReference, error)", + "line": 193 + }, + { + "kind": "func", + "name": "resolverDependencies", + "signature": "func (h *creditPurchaseHandler) resolverDependencies() transactions.ResolverDependencies", + "line": 352 + }, + { + "kind": "struct", + "name": "advanceAttribution", + "signature": "type advanceAttribution struct", + "line": 360 + }, + { + "kind": "struct", + "name": "unattributedAccruedBalance", + "signature": "type unattributedAccruedBalance struct", + "line": 368 + }, + { + "kind": "struct", + "name": "taxDimensionKey", + "signature": "type taxDimensionKey struct", + "line": 375 + }, + { + "kind": "func", + "name": "advanceAttributions", + "signature": "func (h *creditPurchaseHandler) advanceAttributions(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\tcurrency currencyx.Code,\n\tamount alpacadecimal.Decimal,\n\tcreditFeatures []string,\n) ([]advanceAttribution, error)", + "line": 380 + }, + { + "kind": "func", + "name": "unattributedAccruedBalances", + "signature": "func (h *creditPurchaseHandler) unattributedAccruedBalances(ctx context.Context, accruedAccount ledger.CustomerAccruedAccount, currency currencyx.Code) ([]unattributedAccruedBalance, error)", + "line": 486 + }, + { + "kind": "func", + "name": "allocateAccruedAttribution", + "signature": "func allocateAccruedAttribution(\n\tcalculator currencyx.Calculator,\n\tamount alpacadecimal.Decimal,\n\tunattributedAccrued []unattributedAccruedBalance,\n) ([]currencyx.AmountAllocation[taxDimensionKey], error)", + "line": 533 + }, + { + "kind": "func", + "name": "totalUnattributedAccruedBalance", + "signature": "func totalUnattributedAccruedBalance(unattributedAccrued []unattributedAccruedBalance) alpacadecimal.Decimal", + "line": 562 + }, + { + "kind": "func", + "name": "taxDimensionRouteKey", + "signature": "func taxDimensionRouteKey(route ledger.Route) taxDimensionKey", + "line": 573 + }, + { + "kind": "func", + "name": "compareTaxDimensionKey", + "signature": "func compareTaxDimensionKey(left, right taxDimensionKey) int", + "line": 580 + }, + { + "kind": "func", + "name": "compareSubAccountRoute", + "signature": "func compareSubAccountRoute(left, right ledger.SubAccount) int", + "line": 588 + } + ], + "line_count": 594 + }, + "openmeter/ledger/chargeadapter/creditpurchase_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestOnPromotionalCreditPurchase", + "signature": "func TestOnPromotionalCreditPurchase(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestOnPromotionalCreditPurchase_BacksAdvanceBeforeTopUp", + "signature": "func TestOnPromotionalCreditPurchase_BacksAdvanceBeforeTopUp(t *testing.T)", + "line": 49 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_BackfillsOnlyMatchingFeatureAdvances", + "signature": "func TestOnCreditPurchaseInitiated_BackfillsOnlyMatchingFeatureAdvances(t *testing.T)", + "line": 74 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_RestrictedCreditDoesNotBackfillFeaturelessAdvance", + "signature": "func TestOnCreditPurchaseInitiated_RestrictedCreditDoesNotBackfillFeaturelessAdvance(t *testing.T)", + "line": 101 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated", + "signature": "func TestOnCreditPurchaseInitiated(t *testing.T)", + "line": 123 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_UsesFeatureRestrictedFBO", + "signature": "func TestOnCreditPurchaseInitiated_UsesFeatureRestrictedFBO(t *testing.T)", + "line": 139 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_ExpiringCreditPlansBreakage", + "signature": "func TestOnCreditPurchaseInitiated_ExpiringCreditPlansBreakage(t *testing.T)", + "line": 155 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_ExpiringCreditReleasesAdvanceCoverage", + "signature": "func TestOnCreditPurchaseInitiated_ExpiringCreditReleasesAdvanceCoverage(t *testing.T)", + "line": 185 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_TracksChargeReferencesOnTransactions", + "signature": "func TestOnCreditPurchaseInitiated_TracksChargeReferencesOnTransactions(t *testing.T)", + "line": 223 + }, + { + "kind": "func", + "name": "TestOnCreditPurchaseInitiated_OnlyIssuesExcessBeyondAdvance", + "signature": "func TestOnCreditPurchaseInitiated_OnlyIssuesExcessBeyondAdvance(t *testing.T)", + "line": 258 + }, + { + "kind": "func", + "name": "TestOnCreditPurchasePaymentAuthorized", + "signature": "func TestOnCreditPurchasePaymentAuthorized(t *testing.T)", + "line": 280 + }, + { + "kind": "func", + "name": "TestOnCreditPurchasePaymentSettled", + "signature": "func TestOnCreditPurchasePaymentSettled(t *testing.T)", + "line": 318 + }, + { + "kind": "func", + "name": "TestOnCreditPurchasePaymentSettled_BacksAdvanceBeforeTopUp", + "signature": "func TestOnCreditPurchasePaymentSettled_BacksAdvanceBeforeTopUp(t *testing.T)", + "line": 357 + }, + { + "kind": "struct", + "name": "creditPurchaseHandlerTestEnv", + "signature": "type creditPurchaseHandlerTestEnv struct", + "line": 399 + }, + { + "kind": "func", + "name": "newCreditPurchaseHandlerTestEnv", + "signature": "func newCreditPurchaseHandlerTestEnv(t *testing.T) *creditPurchaseHandlerTestEnv", + "line": 404 + }, + { + "kind": "func", + "name": "newPromotionalCharge", + "signature": "func (e *creditPurchaseHandlerTestEnv) newPromotionalCharge(amount alpacadecimal.Decimal) chargecreditpurchase.Charge", + "line": 437 + }, + { + "kind": "func", + "name": "newExternalCharge", + "signature": "func (e *creditPurchaseHandlerTestEnv) newExternalCharge(amount, costBasis alpacadecimal.Decimal) chargecreditpurchase.Charge", + "line": 474 + }, + { + "kind": "func", + "name": "fboSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) fboSubAccount(t *testing.T, costBasis alpacadecimal.Decimal) ledger.SubAccount", + "line": 517 + }, + { + "kind": "func", + "name": "fboSubAccountWithFeatures", + "signature": "func (e *creditPurchaseHandlerTestEnv) fboSubAccountWithFeatures(t *testing.T, costBasis alpacadecimal.Decimal, features []string) ledger.SubAccount", + "line": 523 + }, + { + "kind": "func", + "name": "unknownReceivableSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) unknownReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 537 + }, + { + "kind": "func", + "name": "unknownReceivableSubAccountWithFeatures", + "signature": "func (e *creditPurchaseHandlerTestEnv) unknownReceivableSubAccountWithFeatures(t *testing.T, features []string) ledger.SubAccount", + "line": 543 + }, + { + "kind": "func", + "name": "unknownAccruedSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) unknownAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 557 + }, + { + "kind": "func", + "name": "accruedSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) accruedSubAccount(t *testing.T, costBasis alpacadecimal.Decimal) ledger.SubAccount", + "line": 569 + }, + { + "kind": "func", + "name": "receivableSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) receivableSubAccount(t *testing.T, costBasis alpacadecimal.Decimal) ledger.SubAccount", + "line": 581 + }, + { + "kind": "func", + "name": "receivableSubAccountWithFeatures", + "signature": "func (e *creditPurchaseHandlerTestEnv) receivableSubAccountWithFeatures(t *testing.T, costBasis alpacadecimal.Decimal, features []string) ledger.SubAccount", + "line": 587 + }, + { + "kind": "func", + "name": "authorizedReceivableSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) authorizedReceivableSubAccount(t *testing.T, costBasis alpacadecimal.Decimal) ledger.SubAccount", + "line": 601 + }, + { + "kind": "func", + "name": "washSubAccount", + "signature": "func (e *creditPurchaseHandlerTestEnv) washSubAccount(t *testing.T, costBasis alpacadecimal.Decimal) ledger.SubAccount", + "line": 614 + }, + { + "kind": "func", + "name": "sumBalance", + "signature": "func (e *creditPurchaseHandlerTestEnv) sumBalance(t *testing.T, subAccount ledger.SubAccount) alpacadecimal.Decimal", + "line": 626 + }, + { + "kind": "func", + "name": "sumBalanceAsOf", + "signature": "func (e *creditPurchaseHandlerTestEnv) sumBalanceAsOf(t *testing.T, subAccount ledger.SubAccount, asOf time.Time) alpacadecimal.Decimal", + "line": 630 + }, + { + "kind": "func", + "name": "breakageRows", + "signature": "func (e *creditPurchaseHandlerTestEnv) breakageRows(t *testing.T, groupID string) []*entdb.LedgerBreakageRecord", + "line": 641 + }, + { + "kind": "func", + "name": "createAdvanceExposure", + "signature": "func (e *creditPurchaseHandlerTestEnv) createAdvanceExposure(t *testing.T, amount alpacadecimal.Decimal)", + "line": 659 + }, + { + "kind": "func", + "name": "createAdvanceExposureWithFeatures", + "signature": "func (e *creditPurchaseHandlerTestEnv) createAdvanceExposureWithFeatures(t *testing.T, amount alpacadecimal.Decimal, features []string)", + "line": 665 + }, + { + "kind": "func", + "name": "transactionGroupAnnotations", + "signature": "func (e *creditPurchaseHandlerTestEnv) transactionGroupAnnotations(t *testing.T, groupID string) models.Annotations", + "line": 698 + }, + { + "kind": "func", + "name": "transactionAnnotations", + "signature": "func (e *creditPurchaseHandlerTestEnv) transactionAnnotations(t *testing.T, groupID string) []models.Annotations", + "line": 712 + }, + { + "kind": "func", + "name": "transactionBookedAtTimes", + "signature": "func (e *creditPurchaseHandlerTestEnv) transactionBookedAtTimes(t *testing.T, groupID string) []time.Time", + "line": 735 + }, + { + "kind": "func", + "name": "transactionTemplateCodes", + "signature": "func (e *creditPurchaseHandlerTestEnv) transactionTemplateCodes(t *testing.T, groupID string) []string", + "line": 759 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(t *testing.T, raw string) alpacadecimal.Decimal", + "line": 773 + } + ], + "line_count": 780 + }, + "openmeter/ledger/chargeadapter/flatfee.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "flatFeeHandler", + "signature": "type flatFeeHandler struct", + "line": 21 + }, + { + "kind": "func", + "name": "NewFlatFeeHandler", + "signature": "func NewFlatFeeHandler(\n\tledger ledger.Ledger,\n\tdeps transactions.ResolverDependencies,\n\tcollectorService collector.Service,\n) flatfee.Handler", + "line": 29 + }, + { + "kind": "func", + "name": "OnAllocateCredits", + "signature": "func (h *flatFeeHandler) OnAllocateCredits(ctx context.Context, input flatfee.OnAllocateCreditsInput) (creditrealization.CreateAllocationInputs, error)", + "line": 43 + }, + { + "kind": "func", + "name": "OnInvoiceUsageAccrued", + "signature": "func (h *flatFeeHandler) OnInvoiceUsageAccrued(ctx context.Context, input flatfee.OnInvoiceUsageAccruedInput) (ledgertransaction.GroupReference, error)", + "line": 88 + }, + { + "kind": "func", + "name": "OnCorrectCreditAllocations", + "signature": "func (h *flatFeeHandler) OnCorrectCreditAllocations(ctx context.Context, input flatfee.CorrectCreditAllocationsInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 151 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (h *flatFeeHandler) OnPaymentAuthorized(ctx context.Context, input flatfee.OnPaymentAuthorizedInput) (ledgertransaction.GroupReference, error)", + "line": 174 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (h *flatFeeHandler) OnPaymentSettled(ctx context.Context, input flatfee.OnPaymentSettledInput) (ledgertransaction.GroupReference, error)", + "line": 227 + }, + { + "kind": "func", + "name": "OnPaymentUncollectible", + "signature": "func (h *flatFeeHandler) OnPaymentUncollectible(_ context.Context, _ flatfee.Charge) (ledgertransaction.GroupReference, error)", + "line": 282 + }, + { + "kind": "func", + "name": "validateSettlementMode", + "signature": "func validateSettlementMode(actual productcatalog.SettlementMode, allowed ...productcatalog.SettlementMode) error", + "line": 286 + } + ], + "line_count": 296 + }, + "openmeter/ledger/chargeadapter/flatfee_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestOnAllocateCredits", + "signature": "func TestOnAllocateCredits(t *testing.T)", + "line": 36 + }, + { + "kind": "func", + "name": "TestOnAllocateCreditsCreditOnly", + "signature": "func TestOnAllocateCreditsCreditOnly(t *testing.T)", + "line": 153 + }, + { + "kind": "func", + "name": "TestOnCorrectCreditAllocations", + "signature": "func TestOnCorrectCreditAllocations(t *testing.T)", + "line": 203 + }, + { + "kind": "func", + "name": "TestOnFlatFeeStandardInvoiceUsageAccrued", + "signature": "func TestOnFlatFeeStandardInvoiceUsageAccrued(t *testing.T)", + "line": 406 + }, + { + "kind": "func", + "name": "TestOnFlatFeePaymentAuthorized", + "signature": "func TestOnFlatFeePaymentAuthorized(t *testing.T)", + "line": 481 + }, + { + "kind": "func", + "name": "TestOnFlatFeePaymentSettled", + "signature": "func TestOnFlatFeePaymentSettled(t *testing.T)", + "line": 609 + }, + { + "kind": "func", + "name": "TestOnFlatFeePaymentUncollectible", + "signature": "func TestOnFlatFeePaymentUncollectible(t *testing.T)", + "line": 676 + }, + { + "kind": "struct", + "name": "flatFeeHandlerTestEnv", + "signature": "type flatFeeHandlerTestEnv struct", + "line": 687 + }, + { + "kind": "func", + "name": "newFlatFeeHandlerTestEnv", + "signature": "func newFlatFeeHandlerTestEnv(t *testing.T) *flatFeeHandlerTestEnv", + "line": 694 + }, + { + "kind": "func", + "name": "newAssignmentInput", + "signature": "func (e *flatFeeHandlerTestEnv) newAssignmentInput(amount alpacadecimal.Decimal) chargeflatfee.OnAllocateCreditsInput", + "line": 738 + }, + { + "kind": "func", + "name": "newAllocateCreditsInputForCharge", + "signature": "func (e *flatFeeHandlerTestEnv) newAllocateCreditsInputForCharge(charge chargeflatfee.Charge, amount alpacadecimal.Decimal) chargeflatfee.OnAllocateCreditsInput", + "line": 742 + }, + { + "kind": "func", + "name": "newAssignmentInputWithMode", + "signature": "func (e *flatFeeHandlerTestEnv) newAssignmentInputWithMode(amount alpacadecimal.Decimal, mode productcatalog.SettlementMode) chargeflatfee.OnAllocateCreditsInput", + "line": 751 + }, + { + "kind": "func", + "name": "fundPriority", + "signature": "func (e *flatFeeHandlerTestEnv) fundPriority(t *testing.T, priority int, amount int64) ledger.SubAccount", + "line": 799 + }, + { + "kind": "func", + "name": "fundPriorityWithFeatures", + "signature": "func (e *flatFeeHandlerTestEnv) fundPriorityWithFeatures(t *testing.T, priority int, amount int64, features []string) ledger.SubAccount", + "line": 805 + }, + { + "kind": "func", + "name": "newAccrualInput", + "signature": "func (e *flatFeeHandlerTestEnv) newAccrualInput(total alpacadecimal.Decimal) chargeflatfee.OnInvoiceUsageAccruedInput", + "line": 863 + }, + { + "kind": "func", + "name": "newCreditsOnlyCharge", + "signature": "func (e *flatFeeHandlerTestEnv) newCreditsOnlyCharge(amount alpacadecimal.Decimal) chargeflatfee.Charge", + "line": 881 + }, + { + "kind": "func", + "name": "newBaseCharge", + "signature": "func (e *flatFeeHandlerTestEnv) newBaseCharge(servicePeriod timeutil.ClosedPeriod, amount alpacadecimal.Decimal) chargeflatfee.Charge", + "line": 894 + }, + { + "kind": "func", + "name": "newRunBase", + "signature": "func (e *flatFeeHandlerTestEnv) newRunBase(servicePeriod timeutil.ClosedPeriod, amount alpacadecimal.Decimal) chargeflatfee.RealizationRunBase", + "line": 931 + }, + { + "kind": "func", + "name": "newPaymentEventInput", + "signature": "func (e *flatFeeHandlerTestEnv) newPaymentEventInput(charge chargeflatfee.Charge) chargeflatfee.PaymentEventInput", + "line": 953 + }, + { + "kind": "func", + "name": "newChargeWithAccruedUsage", + "signature": "func (e *flatFeeHandlerTestEnv) newChargeWithAccruedUsage(total alpacadecimal.Decimal) chargeflatfee.Charge", + "line": 966 + }, + { + "kind": "func", + "name": "newChargeWithCreditRealizationsAndAccruedUsage", + "signature": "func (e *flatFeeHandlerTestEnv) newChargeWithCreditRealizationsAndAccruedUsage(realizations creditrealization.CreateAllocationInputs, accruedTotal alpacadecimal.Decimal) chargeflatfee.Charge", + "line": 988 + }, + { + "kind": "func", + "name": "washSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) washSubAccount(t *testing.T) ledger.SubAccount", + "line": 1030 + }, + { + "kind": "func", + "name": "receivableSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) receivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 1034 + }, + { + "kind": "func", + "name": "authorizedReceivableSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) authorizedReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 1038 + }, + { + "kind": "func", + "name": "creditAccruedSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) creditAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 1042 + }, + { + "kind": "func", + "name": "unknownAccruedSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) unknownAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 1047 + }, + { + "kind": "func", + "name": "unknownReceivableSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) unknownReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 1051 + }, + { + "kind": "func", + "name": "unknownFboSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) unknownFboSubAccount(t *testing.T) ledger.SubAccount", + "line": 1055 + }, + { + "kind": "func", + "name": "invoiceAccruedSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) invoiceAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 1065 + }, + { + "kind": "func", + "name": "creditEarningsSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) creditEarningsSubAccount(t *testing.T) ledger.SubAccount", + "line": 1069 + }, + { + "kind": "func", + "name": "invoiceEarningsSubAccount", + "signature": "func (e *flatFeeHandlerTestEnv) invoiceEarningsSubAccount(t *testing.T) ledger.SubAccount", + "line": 1074 + }, + { + "kind": "func", + "name": "sumBalance", + "signature": "func (e *flatFeeHandlerTestEnv) sumBalance(t *testing.T, subAccount ledger.SubAccount) alpacadecimal.Decimal", + "line": 1078 + }, + { + "kind": "func", + "name": "recognizeCreditAccrued", + "signature": "func (e *flatFeeHandlerTestEnv) recognizeCreditAccrued(t *testing.T, amount alpacadecimal.Decimal) string", + "line": 1082 + }, + { + "kind": "func", + "name": "createInitialLineages", + "signature": "func (e *flatFeeHandlerTestEnv) createInitialLineages(t *testing.T, chargeID string, realizations creditrealization.Realizations)", + "line": 1096 + }, + { + "kind": "func", + "name": "activeSegmentsByRealization", + "signature": "func (e *flatFeeHandlerTestEnv) activeSegmentsByRealization(t *testing.T, realizations creditrealization.Realizations) lineage.ActiveSegmentsByRealizationID", + "line": 1111 + }, + { + "kind": "func", + "name": "assertRecognizedSegments", + "signature": "func (e *flatFeeHandlerTestEnv) assertRecognizedSegments(t *testing.T, realizations creditrealization.Realizations, recognitionGroupID string) lineage.ActiveSegmentsByRealizationID", + "line": 1125 + }, + { + "kind": "func", + "name": "ensureCharge", + "signature": "func (e *flatFeeHandlerTestEnv) ensureCharge(t *testing.T, chargeID string)", + "line": 1146 + }, + { + "kind": "func", + "name": "transactionGroupAnnotations", + "signature": "func (e *flatFeeHandlerTestEnv) transactionGroupAnnotations(t *testing.T, groupID string) models.Annotations", + "line": 1157 + }, + { + "kind": "func", + "name": "transactionBookedAtTimes", + "signature": "func (e *flatFeeHandlerTestEnv) transactionBookedAtTimes(t *testing.T, groupID string) []time.Time", + "line": 1171 + }, + { + "kind": "func", + "name": "testInvoiceCostBasis", + "signature": "func testInvoiceCostBasis() *alpacadecimal.Decimal", + "line": 1195 + } + ], + "line_count": 1198 + }, + "openmeter/ledger/chargeadapter/helpers.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "settledBalanceForSubAccount", + "signature": "func settledBalanceForSubAccount(ctx context.Context, querier ledger.BalanceQuerier, subAccount ledger.SubAccount) (alpacadecimal.Decimal, error)", + "line": 14 + }, + { + "kind": "func", + "name": "taxCodeIDFromIntent", + "signature": "func taxCodeIDFromIntent(taxConfig *productcatalog.TaxCodeConfig) *string", + "line": 23 + }, + { + "kind": "func", + "name": "taxBehaviorFromIntent", + "signature": "func taxBehaviorFromIntent(taxConfig *productcatalog.TaxCodeConfig) *ledger.TaxBehavior", + "line": 30 + } + ], + "line_count": 36 + }, + "openmeter/ledger/chargeadapter/usagebased.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "usageBasedHandler", + "signature": "type usageBasedHandler struct", + "line": 21 + }, + { + "kind": "func", + "name": "NewUsageBasedHandler", + "signature": "func NewUsageBasedHandler(\n\tledger ledger.Ledger,\n\tdeps transactions.ResolverDependencies,\n\tcollectorService collector.Service,\n) usagebased.Handler", + "line": 29 + }, + { + "kind": "func", + "name": "OnInvoiceUsageAccrued", + "signature": "func (h *usageBasedHandler) OnInvoiceUsageAccrued(ctx context.Context, input usagebased.OnInvoiceUsageAccruedInput) (ledgertransaction.GroupReference, error)", + "line": 41 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (h *usageBasedHandler) OnPaymentAuthorized(ctx context.Context, input usagebased.OnPaymentAuthorizedInput) (ledgertransaction.GroupReference, error)", + "line": 97 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (h *usageBasedHandler) OnPaymentSettled(ctx context.Context, input usagebased.OnPaymentSettledInput) (ledgertransaction.GroupReference, error)", + "line": 162 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccrued", + "signature": "func (h *usageBasedHandler) OnCreditsOnlyUsageAccrued(ctx context.Context, input usagebased.CreditsOnlyUsageAccruedInput) (creditrealization.CreateAllocationInputs, error)", + "line": 222 + }, + { + "kind": "func", + "name": "OnCreditsOnlyUsageAccruedCorrection", + "signature": "func (h *usageBasedHandler) OnCreditsOnlyUsageAccruedCorrection(ctx context.Context, input usagebased.CreditsOnlyUsageAccruedCorrectionInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 264 + } + ], + "line_count": 291 + }, + "openmeter/ledger/chargeadapter/usagebased_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestOnUsageBasedCreditsOnlyUsageAccrued", + "signature": "func TestOnUsageBasedCreditsOnlyUsageAccrued(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "TestOnUsageBasedCreditsOnlyUsageAccruedCorrection", + "signature": "func TestOnUsageBasedCreditsOnlyUsageAccruedCorrection(t *testing.T)", + "line": 166 + }, + { + "kind": "func", + "name": "TestOnUsageBasedInvoiceUsageAccrued", + "signature": "func TestOnUsageBasedInvoiceUsageAccrued(t *testing.T)", + "line": 343 + }, + { + "kind": "func", + "name": "TestOnUsageBasedPaymentAuthorized", + "signature": "func TestOnUsageBasedPaymentAuthorized(t *testing.T)", + "line": 399 + }, + { + "kind": "func", + "name": "TestOnUsageBasedPaymentSettled", + "signature": "func TestOnUsageBasedPaymentSettled(t *testing.T)", + "line": 466 + }, + { + "kind": "struct", + "name": "usageBasedHandlerTestEnv", + "signature": "type usageBasedHandlerTestEnv struct", + "line": 538 + }, + { + "kind": "func", + "name": "newUsageBasedHandlerTestEnv", + "signature": "func newUsageBasedHandlerTestEnv(t *testing.T) *usageBasedHandlerTestEnv", + "line": 545 + }, + { + "kind": "func", + "name": "newCreditsOnlyCharge", + "signature": "func (e *usageBasedHandlerTestEnv) newCreditsOnlyCharge() chargeusagebased.Charge", + "line": 593 + }, + { + "kind": "func", + "name": "newCharge", + "signature": "func (e *usageBasedHandlerTestEnv) newCharge(settlementMode productcatalog.SettlementMode) chargeusagebased.Charge", + "line": 597 + }, + { + "kind": "func", + "name": "newRun", + "signature": "func (e *usageBasedHandlerTestEnv) newRun() chargeusagebased.RealizationRun", + "line": 640 + }, + { + "kind": "func", + "name": "newRunWithLine", + "signature": "func (e *usageBasedHandlerTestEnv) newRunWithLine(lineID string) chargeusagebased.RealizationRun", + "line": 669 + }, + { + "kind": "func", + "name": "newRunWithInvoiceUsage", + "signature": "func (e *usageBasedHandlerTestEnv) newRunWithInvoiceUsage(lineID string, total alpacadecimal.Decimal) chargeusagebased.RealizationRun", + "line": 675 + }, + { + "kind": "func", + "name": "newRunWithAuthorizedPayment", + "signature": "func (e *usageBasedHandlerTestEnv) newRunWithAuthorizedPayment(lineID string, total alpacadecimal.Decimal) chargeusagebased.RealizationRun", + "line": 688 + }, + { + "kind": "func", + "name": "newRunWithAuthorizedPaymentAndInvoiceUsage", + "signature": "func (e *usageBasedHandlerTestEnv) newRunWithAuthorizedPaymentAndInvoiceUsage(lineID string, paymentAmount, invoiceUsageTotal alpacadecimal.Decimal) chargeusagebased.RealizationRun", + "line": 692 + }, + { + "kind": "func", + "name": "fundPriority", + "signature": "func (e *usageBasedHandlerTestEnv) fundPriority(t *testing.T, priority int, amount int64) ledger.SubAccount", + "line": 723 + }, + { + "kind": "func", + "name": "creditAccruedSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) creditAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 777 + }, + { + "kind": "func", + "name": "unknownAccruedSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) unknownAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 782 + }, + { + "kind": "func", + "name": "unknownReceivableSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) unknownReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 786 + }, + { + "kind": "func", + "name": "unknownReceivableSubAccountForFeature", + "signature": "func (e *usageBasedHandlerTestEnv) unknownReceivableSubAccountForFeature(t *testing.T, featureKey string) ledger.SubAccount", + "line": 790 + }, + { + "kind": "func", + "name": "authorizedReceivableSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) authorizedReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 804 + }, + { + "kind": "func", + "name": "receivableSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) receivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 808 + }, + { + "kind": "func", + "name": "washSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) washSubAccount(t *testing.T) ledger.SubAccount", + "line": 812 + }, + { + "kind": "func", + "name": "invoiceAccruedSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) invoiceAccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 816 + }, + { + "kind": "func", + "name": "invoiceEarningsSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) invoiceEarningsSubAccount(t *testing.T) ledger.SubAccount", + "line": 820 + }, + { + "kind": "func", + "name": "unknownFboSubAccount", + "signature": "func (e *usageBasedHandlerTestEnv) unknownFboSubAccount(t *testing.T) ledger.SubAccount", + "line": 824 + }, + { + "kind": "func", + "name": "sumBalance", + "signature": "func (e *usageBasedHandlerTestEnv) sumBalance(t *testing.T, subAccount ledger.SubAccount) alpacadecimal.Decimal", + "line": 834 + }, + { + "kind": "func", + "name": "transactionAnnotations", + "signature": "func (e *usageBasedHandlerTestEnv) transactionAnnotations(t *testing.T, groupID string) []models.Annotations", + "line": 838 + }, + { + "kind": "func", + "name": "transactionBookedAtTimes", + "signature": "func (e *usageBasedHandlerTestEnv) transactionBookedAtTimes(t *testing.T, groupID string) []time.Time", + "line": 861 + }, + { + "kind": "func", + "name": "recognizeCreditAccrued", + "signature": "func (e *usageBasedHandlerTestEnv) recognizeCreditAccrued(t *testing.T, amount alpacadecimal.Decimal) string", + "line": 884 + }, + { + "kind": "func", + "name": "createInitialLineages", + "signature": "func (e *usageBasedHandlerTestEnv) createInitialLineages(t *testing.T, chargeID string, realizations creditrealization.Realizations)", + "line": 898 + }, + { + "kind": "func", + "name": "activeSegmentsByRealization", + "signature": "func (e *usageBasedHandlerTestEnv) activeSegmentsByRealization(t *testing.T, realizations creditrealization.Realizations) lineage.ActiveSegmentsByRealizationID", + "line": 913 + }, + { + "kind": "func", + "name": "assertRecognizedSegments", + "signature": "func (e *usageBasedHandlerTestEnv) assertRecognizedSegments(t *testing.T, realizations creditrealization.Realizations, recognitionGroupID string) lineage.ActiveSegmentsByRealizationID", + "line": 927 + }, + { + "kind": "func", + "name": "ensureCharge", + "signature": "func (e *usageBasedHandlerTestEnv) ensureCharge(t *testing.T, chargeID string)", + "line": 948 + }, + { + "kind": "func", + "name": "realizationsFromAllocations", + "signature": "func (e *usageBasedHandlerTestEnv) realizationsFromAllocations(allocations creditrealization.CreateAllocationInputs) creditrealization.Realizations", + "line": 959 + } + ], + "line_count": 979 + }, + "openmeter/ledger/collector/README.md": { + "header": "# Credit Collection\n\nThis package turns customer credit and advance into accrued value. The hard part is not posting `FBO -> accrued`; it is preserving the exact order of what was collected so later correction and breakage flows can undo the same economic slices.\n\n## Vocab\n\n- `BookedAt`: timestamp used for the ledger transactions being written.\n- `SourceBalanceAsOf`: timestamp used to decide which FBO sources are available.\n- `source`: one spendable FBO slice selected by the collector.\n- `source entry`: the concrete negative FBO ledger entry created by collection.\n- `allocation`: billing's collapsed record of collected credit.\n- `advance`: value moved through FBO/accrued before real credit exists to cover it.\n\n`BookedAt` and `SourceBalanceAsOf` are intentionally separate.\n\nExample:\n\n```text\ncharge allocates at T1\nsource balance is checked at T5", + "symbols": [], + "line_count": 305 + }, + "openmeter/ledger/collector/collect.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "accrualCollector", + "signature": "type accrualCollector struct", + "line": 21 + }, + { + "kind": "struct", + "name": "resolvedCollectedInputs", + "signature": "type resolvedCollectedInputs struct", + "line": 31 + }, + { + "kind": "func", + "name": "collect", + "signature": "func (c *accrualCollector) collect(ctx context.Context, input CollectToAccruedInput) (creditrealization.CreateAllocationInputs, error)", + "line": 36 + }, + { + "kind": "func", + "name": "resolveCollectedInputs", + "signature": "func (c *accrualCollector) resolveCollectedInputs(ctx context.Context, input CollectToAccruedInput, amount alpacadecimal.Decimal) (resolvedCollectedInputs, error)", + "line": 101 + }, + { + "kind": "func", + "name": "resolveAdvanceInputs", + "signature": "func (c *accrualCollector) resolveAdvanceInputs(ctx context.Context, input CollectToAccruedInput, amount alpacadecimal.Decimal) ([]ledger.TransactionInput, error)", + "line": 164 + }, + { + "kind": "func", + "name": "shouldAdvanceShortfall", + "signature": "func (c *accrualCollector) shouldAdvanceShortfall(input CollectToAccruedInput, shortfall alpacadecimal.Decimal) bool", + "line": 196 + }, + { + "kind": "func", + "name": "resolutionScope", + "signature": "func (c *accrualCollector) resolutionScope(input CollectToAccruedInput) transactions.ResolutionScope", + "line": 200 + }, + { + "kind": "func", + "name": "customerID", + "signature": "func (c *accrualCollector) customerID(input CollectToAccruedInput) customer.CustomerID", + "line": 207 + }, + { + "kind": "func", + "name": "toCreditRealizations", + "signature": "func (i collectedInputs) toCreditRealizations(servicePeriod timeutil.ClosedPeriod, transactionGroupID string) creditrealization.CreateAllocationInputs", + "line": 214 + }, + { + "kind": "func", + "name": "collectedFBOAmount", + "signature": "func (i collectedInputs) collectedFBOAmount() alpacadecimal.Decimal", + "line": 257 + }, + { + "kind": "func", + "name": "creditRealizationAnnotationsForCollectedInput", + "signature": "func creditRealizationAnnotationsForCollectedInput(input ledger.TransactionInput) models.Annotations", + "line": 273 + } + ], + "line_count": 295 + }, + "openmeter/ledger/collector/collection_fbo.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "fboCollectionSource", + "signature": "type fboCollectionSource struct", + "line": 22 + }, + { + "kind": "struct", + "name": "fboCollectionSelection", + "signature": "type fboCollectionSelection struct", + "line": 32 + }, + { + "kind": "interface", + "name": "accountIdentifier", + "signature": "type accountIdentifier interface", + "line": 41 + }, + { + "kind": "func", + "name": "collectCustomerFBO", + "signature": "func (c *accrualCollector) collectCustomerFBO(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\tcurrency currencyx.Code,\n\tfeatureKey string,\n\ttarget alpacadecimal.Decimal,\n\tasOf time.Time,\n) ([]transactions.PostingAmount, error)", + "line": 45 + }, + { + "kind": "func", + "name": "collectCustomerFBOSelections", + "signature": "func (c *accrualCollector) collectCustomerFBOSelections(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\tcurrency currencyx.Code,\n\tfeatureKey string,\n\ttarget alpacadecimal.Decimal,\n\tasOf time.Time,\n) ([]fboCollectionSelection, error)", + "line": 61 + }, + { + "kind": "func", + "name": "Compare", + "signature": "func (s fboCollectionSource) Compare(other fboCollectionSource) int", + "line": 79 + }, + { + "kind": "func", + "name": "compareOptionalTime", + "signature": "func compareOptionalTime(left, right *time.Time) int", + "line": 102 + }, + { + "kind": "func", + "name": "listCustomerFBOSources", + "signature": "func (c *accrualCollector) listCustomerFBOSources(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\tcurrency currencyx.Code,\n\tfeatureKey string,\n\tasOf time.Time,\n) ([]fboCollectionSource, error)", + "line": 115 + }, + { + "kind": "func", + "name": "postingAmounts", + "signature": "func (s fboCollectionSelections) postingAmounts() []transactions.PostingAmount", + "line": 230 + }, + { + "kind": "func", + "name": "selectFBOSources", + "signature": "func selectFBOSources(sources []fboCollectionSource, target alpacadecimal.Decimal) []fboCollectionSelection", + "line": 247 + }, + { + "kind": "func", + "name": "selectFBOPostingAmounts", + "signature": "func selectFBOPostingAmounts(sources []fboCollectionSource, target alpacadecimal.Decimal) []transactions.PostingAmount", + "line": 275 + }, + { + "kind": "func", + "name": "customerFBOPriority", + "signature": "func customerFBOPriority(route ledger.Route) int", + "line": 279 + }, + { + "kind": "func", + "name": "settledSubAccountBalance", + "signature": "func (c *accrualCollector) settledSubAccountBalance(ctx context.Context, subAccount ledger.SubAccount, asOf time.Time) (alpacadecimal.Decimal, error)", + "line": 287 + } + ], + "line_count": 296 + }, + "openmeter/ledger/collector/collection_fbo_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCollectCustomerFBOUsesPriorityOrder", + "signature": "func TestCollectCustomerFBOUsesPriorityOrder(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestCollectCustomerFBOUsesSubAccountIDTieBreaker", + "signature": "func TestCollectCustomerFBOUsesSubAccountIDTieBreaker(t *testing.T)", + "line": 39 + }, + { + "kind": "func", + "name": "TestCollectCustomerFBOUsesAsOfBalance", + "signature": "func TestCollectCustomerFBOUsesAsOfBalance(t *testing.T)", + "line": 62 + }, + { + "kind": "func", + "name": "TestCollectCustomerFBOFiltersByFeatureEligibility", + "signature": "func TestCollectCustomerFBOFiltersByFeatureEligibility(t *testing.T)", + "line": 83 + }, + { + "kind": "func", + "name": "TestCollectCustomerFBOUsesPriorityBeforeFeatureRestriction", + "signature": "func TestCollectCustomerFBOUsesPriorityBeforeFeatureRestriction(t *testing.T)", + "line": 121 + }, + { + "kind": "func", + "name": "TestCollectCustomerFBOReleasesBreakageInExpiryOrder", + "signature": "func TestCollectCustomerFBOReleasesBreakageInExpiryOrder(t *testing.T)", + "line": 145 + }, + { + "kind": "func", + "name": "newTestAccrualCollector", + "signature": "func newTestAccrualCollector(env *ledgertestutils.IntegrationEnv) *accrualCollector", + "line": 184 + }, + { + "kind": "func", + "name": "collectCustomerFBOForTest", + "signature": "func collectCustomerFBOForTest(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tcollector *accrualCollector,\n\ttarget alpacadecimal.Decimal,\n\tasOf time.Time,\n) ([]transactions.PostingAmount, error)", + "line": 197 + }, + { + "kind": "func", + "name": "collectCustomerFBOForFeatureForTest", + "signature": "func collectCustomerFBOForFeatureForTest(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tcollector *accrualCollector,\n\tfeatureKey string,\n\ttarget alpacadecimal.Decimal,\n\tasOf time.Time,\n) ([]transactions.PostingAmount, error)", + "line": 209 + }, + { + "kind": "func", + "name": "newTestAccrualCollectorWithBreakage", + "signature": "func newTestAccrualCollectorWithBreakage(\n\tenv *ledgertestutils.IntegrationEnv,\n\tbreakageService ledgerbreakage.Service,\n) *accrualCollector", + "line": 224 + }, + { + "kind": "func", + "name": "newTestBreakageService", + "signature": "func newTestBreakageService(t *testing.T, env *ledgertestutils.IntegrationEnv) ledgerbreakage.Service", + "line": 235 + }, + { + "kind": "func", + "name": "fundPriority", + "signature": "func fundPriority(t *testing.T, env *ledgertestutils.IntegrationEnv, priority int, amount int64) ledger.SubAccount", + "line": 256 + }, + { + "kind": "func", + "name": "fundPriorityWithCostBasis", + "signature": "func fundPriorityWithCostBasis(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tpriority int,\n\tamount int64,\n\tcostBasis *alpacadecimal.Decimal,\n) ledger.SubAccount", + "line": 262 + }, + { + "kind": "func", + "name": "fundPriorityWithFeatures", + "signature": "func fundPriorityWithFeatures(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tpriority int,\n\tamount int64,\n\tfeatures []string,\n) ledger.SubAccount", + "line": 274 + }, + { + "kind": "func", + "name": "fundPriorityWithCostBasisAndFeatures", + "signature": "func fundPriorityWithCostBasisAndFeatures(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tpriority int,\n\tamount int64,\n\tcostBasis *alpacadecimal.Decimal,\n\tfeatures []string,\n) ledger.SubAccount", + "line": 286 + }, + { + "kind": "func", + "name": "bookExpiringCredit", + "signature": "func bookExpiringCredit(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tbreakageService ledgerbreakage.Service,\n\tpriority int,\n\tamount int64,\n\texpiresAt time.Time,\n) string", + "line": 346 + }, + { + "kind": "func", + "name": "bookExpiringCreditWithFeatures", + "signature": "func bookExpiringCreditWithFeatures(\n\tt *testing.T,\n\tenv *ledgertestutils.IntegrationEnv,\n\tbreakageService ledgerbreakage.Service,\n\tpriority int,\n\tamount int64,\n\tfeatures []string,\n\texpiresAt time.Time,\n) string", + "line": 359 + }, + { + "kind": "func", + "name": "bookFutureFBOCollection", + "signature": "func bookFutureFBOCollection(t *testing.T, env *ledgertestutils.IntegrationEnv, priority int, amount int64, at time.Time)", + "line": 411 + } + ], + "line_count": 436 + }, + "openmeter/ledger/collector/correct.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "accrualCorrector", + "signature": "type accrualCorrector struct", + "line": 24 + }, + { + "kind": "struct", + "name": "collectedSource", + "signature": "type collectedSource struct", + "line": 33 + }, + { + "kind": "struct", + "name": "transactionCorrectionPlan", + "signature": "type transactionCorrectionPlan struct", + "line": 39 + }, + { + "kind": "interface", + "name": "plannedAction", + "signature": "type plannedAction interface", + "line": 45 + }, + { + "kind": "struct", + "name": "plannedTransactionCorrection", + "signature": "type plannedTransactionCorrection struct", + "line": 49 + }, + { + "kind": "func", + "name": "mergeKey", + "signature": "func (p plannedTransactionCorrection) mergeKey() string", + "line": 57 + }, + { + "kind": "struct", + "name": "plannedDirectInputs", + "signature": "type plannedDirectInputs struct", + "line": 63 + }, + { + "kind": "struct", + "name": "resolvedCorrectionInputs", + "signature": "type resolvedCorrectionInputs struct", + "line": 70 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (c *accrualCorrector) correct(ctx context.Context, input CorrectCollectedAccruedInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 75 + }, + { + "kind": "func", + "name": "planCorrection", + "signature": "func (c *accrualCorrector) planCorrection(ctx context.Context, input CorrectCollectedAccruedInput, correction creditrealization.CorrectionRequestItem) ([]plannedAction, error)", + "line": 147 + }, + { + "kind": "func", + "name": "originalGroup", + "signature": "func (c *accrualCorrector) originalGroup(ctx context.Context, input CorrectCollectedAccruedInput, correction creditrealization.CorrectionRequestItem) (ledger.TransactionGroup, error)", + "line": 194 + }, + { + "kind": "func", + "name": "planSegmentCorrection", + "signature": "func (c *accrualCorrector) planSegmentCorrection(ctx context.Context, input CorrectCollectedAccruedInput, source collectedSource, segment lineage.Segment, amount alpacadecimal.Decimal) ([]plannedAction, error)", + "line": 206 + }, + { + "kind": "func", + "name": "planRecognizedEarningsSegment", + "signature": "func (c *accrualCorrector) planRecognizedEarningsSegment(ctx context.Context, input CorrectCollectedAccruedInput, source collectedSource, segment lineage.Segment, amount alpacadecimal.Decimal) ([]plannedAction, error)", + "line": 222 + }, + { + "kind": "func", + "name": "planBackfilledAdvanceSegment", + "signature": "func (c *accrualCorrector) planBackfilledAdvanceSegment(ctx context.Context, input CorrectCollectedAccruedInput, source collectedSource, segment lineage.Segment, amount alpacadecimal.Decimal) ([]plannedAction, error)", + "line": 269 + }, + { + "kind": "func", + "name": "reissueBackfilledCredit", + "signature": "func (c *accrualCorrector) reissueBackfilledCredit(ctx context.Context, input CorrectCollectedAccruedInput, backingGroup ledger.TransactionGroup, amount alpacadecimal.Decimal) ([]ledger.TransactionInput, error)", + "line": 325 + }, + { + "kind": "func", + "name": "plannedSourceCorrectionActions", + "signature": "func plannedSourceCorrectionActions(source collectedSource, amount alpacadecimal.Decimal, includeAdvanceReceivable bool) []plannedAction", + "line": 369 + }, + { + "kind": "func", + "name": "resolvePlannedInputs", + "signature": "func (c *accrualCorrector) resolvePlannedInputs(ctx context.Context, input CorrectCollectedAccruedInput, actions []plannedAction) (resolvedCorrectionInputs, error)", + "line": 392 + }, + { + "kind": "func", + "name": "resolveAdvanceBackfillBreakageReopenInputs", + "signature": "func (c *accrualCorrector) resolveAdvanceBackfillBreakageReopenInputs(ctx context.Context, input CorrectCollectedAccruedInput, backingGroup ledger.TransactionGroup, amount alpacadecimal.Decimal) ([]ledger.TransactionInput, []breakage.PendingRecord, error)", + "line": 450 + }, + { + "kind": "struct", + "name": "correctedFBOEntry", + "signature": "type correctedFBOEntry struct", + "line": 497 + }, + { + "kind": "func", + "name": "resolveBreakageReopenInputs", + "signature": "func (c *accrualCorrector) resolveBreakageReopenInputs(ctx context.Context, input CorrectCollectedAccruedInput, transactionPlan transactionCorrectionPlan) ([]ledger.TransactionInput, []breakage.PendingRecord, error)", + "line": 502 + }, + { + "kind": "func", + "name": "correctedFBOEntriesForAmount", + "signature": "func correctedFBOEntriesForAmount(transaction ledger.Transaction, amount alpacadecimal.Decimal) []correctedFBOEntry", + "line": 574 + }, + { + "kind": "func", + "name": "compareCollectedFBOCorrectionSourceEntries", + "signature": "func compareCollectedFBOCorrectionSourceEntries(left ledger.Entry, right ledger.Entry) int", + "line": 605 + }, + { + "kind": "func", + "name": "collectedSourceBySortHint", + "signature": "func (c *accrualCorrector) collectedSourceBySortHint(group ledger.TransactionGroup, sortHint int) (collectedSource, error)", + "line": 625 + }, + { + "kind": "func", + "name": "collectedSourcesForGroup", + "signature": "func (c *accrualCorrector) collectedSourcesForGroup(group ledger.TransactionGroup) ([]collectedSource, error)", + "line": 638 + }, + { + "kind": "func", + "name": "forwardTransactionByTemplate", + "signature": "func (c *accrualCorrector) forwardTransactionByTemplate(group ledger.TransactionGroup, templateCode string) (ledger.Transaction, error)", + "line": 676 + }, + { + "kind": "func", + "name": "backfilledCreditReissueRoute", + "signature": "func (c *accrualCorrector) backfilledCreditReissueRoute(group ledger.TransactionGroup) (currencyx.Code, *alpacadecimal.Decimal, *int, []string, error)", + "line": 696 + }, + { + "kind": "func", + "name": "sortCorrectionSegments", + "signature": "func sortCorrectionSegments(segments []lineage.Segment) []lineage.Segment", + "line": 732 + }, + { + "kind": "func", + "name": "minDecimal", + "signature": "func minDecimal(a, b alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 757 + } + ], + "line_count": 763 + }, + "openmeter/ledger/collector/correct_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestCorrectCollectedAccruedUsesReverseFeatureAwareCollectionOrder", + "signature": "func TestCorrectCollectedAccruedUsesReverseFeatureAwareCollectionOrder(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestCorrectCollectedAccruedReopensBreakageByReverseFeatureAwareCollectionOrder", + "signature": "func TestCorrectCollectedAccruedReopensBreakageByReverseFeatureAwareCollectionOrder(t *testing.T)", + "line": 68 + }, + { + "kind": "func", + "name": "TestCorrectCollectedAccruedPartiallyReversesAdvanceBackedCollection", + "signature": "func TestCorrectCollectedAccruedPartiallyReversesAdvanceBackedCollection(t *testing.T)", + "line": 130 + }, + { + "kind": "func", + "name": "newTestAccrualCorrector", + "signature": "func newTestAccrualCorrector(\n\tenv *ledgertestutils.IntegrationEnv,\n\tbreakageService ledgerbreakage.Service,\n) *accrualCorrector", + "line": 170 + }, + { + "kind": "func", + "name": "testServicePeriod", + "signature": "func testServicePeriod(env *ledgertestutils.IntegrationEnv) timeutil.ClosedPeriod", + "line": 186 + }, + { + "kind": "func", + "name": "realizationsFromAllocations", + "signature": "func realizationsFromAllocations(env *ledgertestutils.IntegrationEnv, allocations creditrealization.CreateAllocationInputs) creditrealization.Realizations", + "line": 193 + } + ], + "line_count": 213 + }, + "openmeter/ledger/collector/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 23 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 38 + }, + { + "kind": "struct", + "name": "CollectToAccruedInput", + "signature": "type CollectToAccruedInput struct", + "line": 63 + }, + { + "kind": "struct", + "name": "CorrectCollectedAccruedInput", + "signature": "type CorrectCollectedAccruedInput struct", + "line": 79 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 89 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(config Config) (Service, error)", + "line": 94 + }, + { + "kind": "func", + "name": "CollectToAccrued", + "signature": "func (s *service) CollectToAccrued(ctx context.Context, input CollectToAccruedInput) (creditrealization.CreateAllocationInputs, error)", + "line": 116 + }, + { + "kind": "func", + "name": "CorrectCollectedAccrued", + "signature": "func (s *service) CorrectCollectedAccrued(ctx context.Context, input CorrectCollectedAccruedInput) (creditrealization.CreateCorrectionInputs, error)", + "line": 127 + } + ], + "line_count": 129 + }, + "openmeter/ledger/customerbalance/README.md": { + "header": "# Customer Credit Balance\n\nThis package exposes customer-facing credit balance and credit transaction views.\n\n> The current balance calculation path is temporary. It is expected to move to the **real-time-engine (RTE)** shortly. The API semantics below should remain stable even if the implementation stops querying the ledger directly for every balance view.\n\n## Balance Semantics\n\nCredit balance is defined at a point in time.\n\n`asOf` controls which booked FBO ledger entries are visible:\n\n```text\nbalance(asOf=T) = sum(FBO entries where booked_at <= T)\n```\n\nFuture-dated expiration entries do not affect the current balance. They do affect a balance queried at or after their expiration timestamp.\n\nExample:\n", + "symbols": [], + "line_count": 210 + }, + "openmeter/ledger/customerbalance/calculation.go": { + "header": "\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"", + "symbols": [ + { + "kind": "struct", + "name": "Impact", + "signature": "type Impact struct", + "line": 11 + }, + { + "kind": "func", + "name": "NewImpact", + "signature": "func NewImpact(charge charges.Charge, amount alpacadecimal.Decimal) (Impact, error)", + "line": 17 + }, + { + "kind": "func", + "name": "OutstandingAmount", + "signature": "func (i Impact) OutstandingAmount() alpacadecimal.Decimal", + "line": 28 + }, + { + "kind": "func", + "name": "RealizedCredits", + "signature": "func (i Impact) RealizedCredits() alpacadecimal.Decimal", + "line": 37 + }, + { + "kind": "func", + "name": "BoundedAmount", + "signature": "func (i Impact) BoundedAmount() alpacadecimal.Decimal", + "line": 70 + }, + { + "kind": "func", + "name": "UnboundedAmount", + "signature": "func (i Impact) UnboundedAmount() alpacadecimal.Decimal", + "line": 79 + }, + { + "kind": "struct", + "name": "chargePendingBalanceCalculator", + "signature": "type chargePendingBalanceCalculator struct", + "line": 88 + }, + { + "kind": "func", + "name": "sumImpactAmounts", + "signature": "func sumImpactAmounts(impacts []Impact) (bounded alpacadecimal.Decimal, unbounded alpacadecimal.Decimal)", + "line": 99 + }, + { + "kind": "func", + "name": "applyBoundedAmount", + "signature": "func applyBoundedAmount(balance alpacadecimal.Decimal, amount alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 111 + } + ], + "line_count": 121 + }, + "openmeter/ledger/customerbalance/expired_loader.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger/breakage\"", + "symbols": [ + { + "kind": "struct", + "name": "expiredCreditTransactionLoader", + "signature": "type expiredCreditTransactionLoader struct", + "line": 10 + }, + { + "kind": "func", + "name": "newExpiredCreditTransactionLoader", + "signature": "func newExpiredCreditTransactionLoader(s *service) creditTransactionLoader", + "line": 14 + }, + { + "kind": "func", + "name": "Load", + "signature": "func (l *expiredCreditTransactionLoader) Load(ctx context.Context, input creditTransactionLoaderInput) (creditTransactionLoaderResult, error)", + "line": 18 + } + ], + "line_count": 49 + }, + "openmeter/ledger/customerbalance/expired_loader_test.go": { + "header": "\t\"cmp\"\n\t\"slices\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestListCreditTransactionsExpiredBreakage", + "signature": "func TestListCreditTransactionsExpiredBreakage(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestListCreditTransactionsCombinesFundedConsumedAndExpired", + "signature": "func TestListCreditTransactionsCombinesFundedConsumedAndExpired(t *testing.T)", + "line": 115 + }, + { + "kind": "struct", + "name": "expiredListingPlanSetup", + "signature": "type expiredListingPlanSetup struct", + "line": 191 + }, + { + "kind": "struct", + "name": "expectedExpiredListingTransaction", + "signature": "type expectedExpiredListingTransaction struct", + "line": 198 + }, + { + "kind": "struct", + "name": "expectedCreditTransaction", + "signature": "type expectedCreditTransaction struct", + "line": 205 + }, + { + "kind": "func", + "name": "bookExpiredListingState", + "signature": "func (e *testEnv) bookExpiredListingState(t *testing.T, issuedAt time.Time, specs []expiredListingPlanSetup)", + "line": 213 + }, + { + "kind": "func", + "name": "bookMixedCreditTransactionState", + "signature": "func (e *testEnv) bookMixedCreditTransactionState(t *testing.T, issuedAt time.Time, amount, consumed int64, expiresAfter time.Duration)", + "line": 297 + }, + { + "kind": "func", + "name": "createPromotionalCreditFunding", + "signature": "func (e *testEnv) createPromotionalCreditFunding(t *testing.T, fundedAt time.Time, amount alpacadecimal.Decimal, expiresAt time.Time) creditpurchase.Charge", + "line": 314 + }, + { + "kind": "func", + "name": "commitBreakageRecords", + "signature": "func (e *testEnv) commitBreakageRecords(t *testing.T, inputs []ledger.TransactionInput, pending []ledgerbreakage.PendingRecord)", + "line": 347 + }, + { + "kind": "func", + "name": "bookFBOUsage", + "signature": "func (e *testEnv) bookFBOUsage(t *testing.T, at time.Time, address ledger.PostingAddress, amount alpacadecimal.Decimal)", + "line": 355 + }, + { + "kind": "func", + "name": "bookFBORestore", + "signature": "func (e *testEnv) bookFBORestore(t *testing.T, at time.Time, amount alpacadecimal.Decimal)", + "line": 386 + }, + { + "kind": "func", + "name": "requireExpiredTransactions", + "signature": "func requireExpiredTransactions(\n\tt *testing.T,\n\tissuedAt time.Time,\n\tactual []CreditTransaction,\n\texpected []expectedExpiredListingTransaction,\n)", + "line": 412 + }, + { + "kind": "func", + "name": "requireCreditTransactions", + "signature": "func requireCreditTransactions(\n\tt *testing.T,\n\tissuedAt time.Time,\n\tactual []CreditTransaction,\n\texpected []expectedCreditTransaction,\n)", + "line": 433 + }, + { + "kind": "func", + "name": "requireCreditTransactionTypes", + "signature": "func requireCreditTransactionTypes(t *testing.T, actual []CreditTransaction, expected []CreditTransactionType)", + "line": 453 + } + ], + "line_count": 460 + }, + "openmeter/ledger/customerbalance/facade.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CurrencyFilter", + "signature": "type CurrencyFilter struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f CurrencyFilter) Validate() error", + "line": 21 + }, + { + "kind": "struct", + "name": "GetBalancesInput", + "signature": "type GetBalancesInput struct", + "line": 31 + }, + { + "kind": "struct", + "name": "GetBalanceInput", + "signature": "type GetBalanceInput struct", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetBalancesInput) Validate() error", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetBalanceInput) Validate() error", + "line": 62 + }, + { + "kind": "struct", + "name": "BalanceByCurrency", + "signature": "type BalanceByCurrency struct", + "line": 90 + }, + { + "kind": "struct", + "name": "Facade", + "signature": "type Facade struct", + "line": 95 + }, + { + "kind": "func", + "name": "NewFacade", + "signature": "func NewFacade(service Service) (*Facade, error)", + "line": 99 + }, + { + "kind": "func", + "name": "GetBalances", + "signature": "func (f *Facade) GetBalances(ctx context.Context, input GetBalancesInput) ([]BalanceByCurrency, error)", + "line": 109 + }, + { + "kind": "func", + "name": "GetBalance", + "signature": "func (f *Facade) GetBalance(ctx context.Context, input GetBalanceInput) (alpacadecimal.Decimal, error)", + "line": 154 + }, + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (f *Facade) ListCreditTransactions(ctx context.Context, input ListCreditTransactionsInput) (ListCreditTransactionsResult, error)", + "line": 174 + }, + { + "kind": "func", + "name": "dedupeCurrencies", + "signature": "func dedupeCurrencies(codes []currencyx.Code) []currencyx.Code", + "line": 186 + } + ], + "line_count": 200 + }, + "openmeter/ledger/customerbalance/facade_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestFacadeGetBalancesWithExplicitCurrencies", + "signature": "func TestFacadeGetBalancesWithExplicitCurrencies(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestFacadeGetBalancesWithDiscoveredCurrencies", + "signature": "func TestFacadeGetBalancesWithDiscoveredCurrencies(t *testing.T)", + "line": 48 + }, + { + "kind": "func", + "name": "TestFacadeGetBalancesWithUnsupportedExplicitCurrency", + "signature": "func TestFacadeGetBalancesWithUnsupportedExplicitCurrency(t *testing.T)", + "line": 84 + }, + { + "kind": "func", + "name": "TestFacadeGetBalanceAfterTransactionCursor", + "signature": "func TestFacadeGetBalanceAfterTransactionCursor(t *testing.T)", + "line": 101 + }, + { + "kind": "func", + "name": "TestFacadeGetBalanceAsOfIncludesBreakageExpiry", + "signature": "func TestFacadeGetBalanceAsOfIncludesBreakageExpiry(t *testing.T)", + "line": 145 + }, + { + "kind": "func", + "name": "TestFacadeGetBalanceAsOf", + "signature": "func TestFacadeGetBalanceAsOf(t *testing.T)", + "line": 221 + } + ], + "line_count": 253 + }, + "openmeter/ledger/customerbalance/funded_loader.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/creditpurchase\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing/charges/meta\"", + "symbols": [ + { + "kind": "struct", + "name": "fundedCreditTransactionLoader", + "signature": "type fundedCreditTransactionLoader struct", + "line": 12 + }, + { + "kind": "func", + "name": "newFundedCreditTransactionLoader", + "signature": "func newFundedCreditTransactionLoader(s *service) creditTransactionLoader", + "line": 16 + }, + { + "kind": "func", + "name": "Load", + "signature": "func (l *fundedCreditTransactionLoader) Load(ctx context.Context, input creditTransactionLoaderInput) (creditTransactionLoaderResult, error)", + "line": 20 + }, + { + "kind": "func", + "name": "toFundedCreditActivityCursor", + "signature": "func toFundedCreditActivityCursor(cursor *ledger.TransactionCursor) *creditpurchase.FundedCreditActivityCursor", + "line": 58 + }, + { + "kind": "func", + "name": "chargesFundedCursorChargeID", + "signature": "func chargesFundedCursorChargeID(id models.NamespacedID) meta.ChargeID", + "line": 70 + } + ], + "line_count": 75 + }, + "openmeter/ledger/customerbalance/ledger_loader.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "ledgerCreditTransactionLoader", + "signature": "type ledgerCreditTransactionLoader struct", + "line": 9 + }, + { + "kind": "func", + "name": "newLedgerCreditTransactionLoader", + "signature": "func newLedgerCreditTransactionLoader(s *service, movement ledger.ListTransactionsCreditMovement) creditTransactionLoader", + "line": 14 + }, + { + "kind": "func", + "name": "Load", + "signature": "func (l *ledgerCreditTransactionLoader) Load(ctx context.Context, input creditTransactionLoaderInput) (creditTransactionLoaderResult, error)", + "line": 21 + } + ], + "line_count": 48 + }, + "openmeter/ledger/customerbalance/loaders.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "creditTransactionLoaderInput", + "signature": "type creditTransactionLoaderInput struct", + "line": 12 + }, + { + "kind": "struct", + "name": "creditTransactionLoaderResult", + "signature": "type creditTransactionLoaderResult struct", + "line": 22 + }, + { + "kind": "interface", + "name": "creditTransactionLoader", + "signature": "type creditTransactionLoader interface", + "line": 27 + }, + { + "kind": "func", + "name": "creditTransactionLoaders", + "signature": "func (s *service) creditTransactionLoaders(txType *CreditTransactionType) ([]creditTransactionLoader, error)", + "line": 47 + } + ], + "line_count": 67 + }, + "openmeter/ledger/customerbalance/merge.go": { + "header": "\t\"container/heap\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "func", + "name": "compareCreditTransactionsByCursor", + "signature": "func compareCreditTransactionsByCursor(a, b CreditTransaction) int", + "line": 9 + }, + { + "kind": "struct", + "name": "mergeListState", + "signature": "type mergeListState struct", + "line": 13 + }, + { + "kind": "struct", + "name": "mergeHeapNode", + "signature": "type mergeHeapNode struct", + "line": 18 + }, + { + "kind": "struct", + "name": "mergeHeap", + "signature": "type mergeHeap struct", + "line": 23 + }, + { + "kind": "func", + "name": "Len", + "signature": "func (h mergeHeap) Len() int", + "line": 28 + }, + { + "kind": "func", + "name": "Less", + "signature": "func (h mergeHeap) Less(i, j int) bool", + "line": 32 + }, + { + "kind": "func", + "name": "Swap", + "signature": "func (h mergeHeap) Swap(i, j int)", + "line": 36 + }, + { + "kind": "func", + "name": "Push", + "signature": "func (h *mergeHeap) Push(x any)", + "line": 40 + }, + { + "kind": "func", + "name": "Pop", + "signature": "func (h *mergeHeap) Pop() any", + "line": 44 + }, + { + "kind": "func", + "name": "mergeSortedLists", + "signature": "func mergeSortedLists(lists [][]CreditTransaction, limit int, cmp func(a, b CreditTransaction) int) ([]CreditTransaction, bool)", + "line": 52 + }, + { + "kind": "func", + "name": "creditTransactionCursor", + "signature": "func creditTransactionCursor(tx CreditTransaction) ledger.TransactionCursor", + "line": 100 + } + ], + "line_count": 106 + }, + "openmeter/ledger/customerbalance/noop.go": { + "header": "\t\"context\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "noopBalance", + "signature": "type noopBalance struct", + "line": 13 + }, + { + "kind": "struct", + "name": "NoopService", + "signature": "type NoopService struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewNoopService", + "signature": "func NewNoopService() Service", + "line": 39 + } + ], + "line_count": 41 + }, + "openmeter/ledger/customerbalance/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 23 + }, + { + "kind": "interface", + "name": "chargesService", + "signature": "type chargesService interface", + "line": 33 + }, + { + "kind": "interface", + "name": "creditPurchaseActivityService", + "signature": "type creditPurchaseActivityService interface", + "line": 38 + }, + { + "kind": "interface", + "name": "subAccountLister", + "signature": "type subAccountLister interface", + "line": 42 + }, + { + "kind": "interface", + "name": "usageBasedTotalsService", + "signature": "type usageBasedTotalsService interface", + "line": 46 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 59 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 74 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 85 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*service, error)", + "line": 119 + }, + { + "kind": "func", + "name": "GetBalance", + "signature": "func (s *service) GetBalance(ctx context.Context, customerID customer.CustomerID, currency currencyx.Code, query ledger.BalanceQuery) (ledger.Balance, error)", + "line": 142 + }, + { + "kind": "func", + "name": "currentBalanceQuery", + "signature": "func currentBalanceQuery(query ledger.BalanceQuery) ledger.BalanceQuery", + "line": 180 + }, + { + "kind": "func", + "name": "GetFBOCurrencies", + "signature": "func (s *service) GetFBOCurrencies(ctx context.Context, customerID customer.CustomerID) ([]currencyx.Code, error)", + "line": 190 + }, + { + "kind": "func", + "name": "getChargePendingBalanceImpacts", + "signature": "func (s *service) getChargePendingBalanceImpacts(ctx context.Context, customerID customer.CustomerID, currency currencyx.Code) ([]Impact, error)", + "line": 220 + }, + { + "kind": "func", + "name": "getChargePendingBalanceImpact", + "signature": "func (s *service) getChargePendingBalanceImpact(ctx context.Context, charge charges.Charge, currency currencyx.Code) (*Impact, error)", + "line": 259 + }, + { + "kind": "func", + "name": "getFlatFeeChargePendingBalanceImpact", + "signature": "func getFlatFeeChargePendingBalanceImpact(charge charges.Charge, currency currencyx.Code) (*Impact, error)", + "line": 274 + }, + { + "kind": "func", + "name": "getUsageBasedChargePendingBalanceImpact", + "signature": "func (s *service) getUsageBasedChargePendingBalanceImpact(ctx context.Context, charge charges.Charge, currency currencyx.Code) (*Impact, error)", + "line": 287 + }, + { + "kind": "func", + "name": "chargeHasStarted", + "signature": "func chargeHasStarted(charge charges.Charge) bool", + "line": 307 + }, + { + "kind": "func", + "name": "newImpactOrNil", + "signature": "func newImpactOrNil(charge charges.Charge, amount alpacadecimal.Decimal) (*Impact, error)", + "line": 330 + }, + { + "kind": "struct", + "name": "balance", + "signature": "type balance struct", + "line": 343 + }, + { + "kind": "func", + "name": "Settled", + "signature": "func (b balance) Settled() alpacadecimal.Decimal", + "line": 348 + }, + { + "kind": "func", + "name": "Pending", + "signature": "func (b balance) Pending() alpacadecimal.Decimal", + "line": 352 + } + ], + "line_count": 354 + }, + "openmeter/ledger/customerbalance/service_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetBalance", + "signature": "func TestGetBalance(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestImpactRealizedCreditsSkipsVoidedUsageBasedBillingHistory", + "signature": "func TestImpactRealizedCreditsSkipsVoidedUsageBasedBillingHistory(t *testing.T)", + "line": 151 + }, + { + "kind": "func", + "name": "TestImpactRealizedCreditsSkipsVoidedFlatFeeBillingHistory", + "signature": "func TestImpactRealizedCreditsSkipsVoidedFlatFeeBillingHistory(t *testing.T)", + "line": 207 + }, + { + "kind": "func", + "name": "TestGetBalanceWithDifferentCurrency", + "signature": "func TestGetBalanceWithDifferentCurrency(t *testing.T)", + "line": 234 + } + ], + "line_count": 253 + }, + "openmeter/ledger/customerbalance/testenv_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 62 + }, + { + "kind": "func", + "name": "newTestEnv", + "signature": "func newTestEnv(t *testing.T) *testEnv", + "line": 74 + }, + { + "kind": "func", + "name": "addUsage", + "signature": "func (e *testEnv) addUsage(value float64, at time.Time)", + "line": 313 + }, + { + "kind": "func", + "name": "sp", + "signature": "func (e *testEnv) sp() timeutil.ClosedPeriod", + "line": 317 + }, + { + "kind": "func", + "name": "passTimeAfterServicePeriod", + "signature": "func (e *testEnv) passTimeAfterServicePeriod(t *testing.T, servicePeriod timeutil.ClosedPeriod)", + "line": 324 + }, + { + "kind": "func", + "name": "bookFBOBalance", + "signature": "func (e *testEnv) bookFBOBalance(t *testing.T, amount alpacadecimal.Decimal)", + "line": 332 + }, + { + "kind": "func", + "name": "bookFBOBalanceInCurrency", + "signature": "func (e *testEnv) bookFBOBalanceInCurrency(t *testing.T, amount alpacadecimal.Decimal, currency currencyx.Code)", + "line": 336 + }, + { + "kind": "func", + "name": "fundOpenReceivable", + "signature": "func (e *testEnv) fundOpenReceivable(t *testing.T, amount alpacadecimal.Decimal)", + "line": 362 + }, + { + "kind": "func", + "name": "fundOpenReceivableInCurrency", + "signature": "func (e *testEnv) fundOpenReceivableInCurrency(t *testing.T, amount alpacadecimal.Decimal, currency currencyx.Code)", + "line": 366 + }, + { + "kind": "func", + "name": "createUsageBasedCharge", + "signature": "func (e *testEnv) createUsageBasedCharge(t *testing.T, unitPrice alpacadecimal.Decimal, settlementMode productcatalog.SettlementMode, servicePeriod timeutil.ClosedPeriod) usagebased.Charge", + "line": 397 + }, + { + "kind": "func", + "name": "createUsageBasedChargeInCurrency", + "signature": "func (e *testEnv) createUsageBasedChargeInCurrency(t *testing.T, unitPrice alpacadecimal.Decimal, settlementMode productcatalog.SettlementMode, servicePeriod timeutil.ClosedPeriod, currency currencyx.Code) usagebased.Charge", + "line": 401 + }, + { + "kind": "func", + "name": "createFlatFeeCharge", + "signature": "func (e *testEnv) createFlatFeeCharge(t *testing.T, amount alpacadecimal.Decimal, settlementMode productcatalog.SettlementMode, servicePeriod timeutil.ClosedPeriod) flatfee.Charge", + "line": 431 + }, + { + "kind": "func", + "name": "createFlatFeeChargeInCurrency", + "signature": "func (e *testEnv) createFlatFeeChargeInCurrency(t *testing.T, amount alpacadecimal.Decimal, settlementMode productcatalog.SettlementMode, servicePeriod timeutil.ClosedPeriod, currency currencyx.Code) flatfee.Charge", + "line": 435 + }, + { + "kind": "func", + "name": "advanceFlatFeeCharge", + "signature": "func (e *testEnv) advanceFlatFeeCharge(t *testing.T, charge flatfee.Charge) flatfee.Charge", + "line": 464 + }, + { + "kind": "struct", + "name": "chargeStore", + "signature": "type chargeStore struct", + "line": 495 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (l chargeStore) GetByIDs(ctx context.Context, input charges.GetByIDsInput) (charges.Charges, error)", + "line": 501 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (l chargeStore) ListCharges(ctx context.Context, input charges.ListChargesInput) (pagination.Result[charges.Charge], error)", + "line": 557 + }, + { + "kind": "struct", + "name": "mockCustomerOverrideService", + "signature": "type mockCustomerOverrideService struct", + "line": 617 + }, + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (s mockCustomerOverrideService) UpsertCustomerOverride(context.Context, billing.UpsertCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 621 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (s mockCustomerOverrideService) DeleteCustomerOverride(context.Context, billing.DeleteCustomerOverrideInput) error", + "line": 625 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (s mockCustomerOverrideService) GetCustomerOverride(context.Context, billing.GetCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 629 + }, + { + "kind": "func", + "name": "GetCustomerApp", + "signature": "func (s mockCustomerOverrideService) GetCustomerApp(context.Context, billing.GetCustomerAppInput) (app.App, error)", + "line": 635 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (s mockCustomerOverrideService) ListCustomerOverrides(context.Context, billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesResult, error)", + "line": 639 + } + ], + "line_count": 641 + }, + "openmeter/ledger/customerbalance/transactions.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (t CreditTransactionType) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "ListCreditTransactionsInput", + "signature": "type ListCreditTransactionsInput struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListCreditTransactionsInput) Validate() error", + "line": 49 + }, + { + "kind": "struct", + "name": "CreditTransaction", + "signature": "type CreditTransaction struct", + "line": 95 + }, + { + "kind": "struct", + "name": "CreditTransactionBalance", + "signature": "type CreditTransactionBalance struct", + "line": 108 + }, + { + "kind": "struct", + "name": "ListCreditTransactionsResult", + "signature": "type ListCreditTransactionsResult struct", + "line": 113 + }, + { + "kind": "func", + "name": "ListCreditTransactions", + "signature": "func (s *service) ListCreditTransactions(ctx context.Context, input ListCreditTransactionsInput) (ListCreditTransactionsResult, error)", + "line": 119 + }, + { + "kind": "func", + "name": "emptyCreditTransactions", + "signature": "func emptyCreditTransactions() ListCreditTransactionsResult", + "line": 206 + }, + { + "kind": "func", + "name": "creditTransactionsAsOf", + "signature": "func creditTransactionsAsOf(asOf *time.Time) time.Time", + "line": 212 + }, + { + "kind": "func", + "name": "customerFBOAccountID", + "signature": "func (s *service) customerFBOAccountID(ctx context.Context, customerID customer.CustomerID) (string, error)", + "line": 220 + }, + { + "kind": "func", + "name": "creditTransactionsFromLedgerTransactions", + "signature": "func creditTransactionsFromLedgerTransactions(txs []ledger.Transaction) ([]CreditTransaction, error)", + "line": 233 + }, + { + "kind": "func", + "name": "creditTransactionFromLedgerTransaction", + "signature": "func creditTransactionFromLedgerTransaction(tx ledger.Transaction) (CreditTransaction, error)", + "line": 248 + }, + { + "kind": "func", + "name": "creditTransactionFBOImpact", + "signature": "func creditTransactionFBOImpact(tx ledger.Transaction) (alpacadecimal.Decimal, currencyx.Code, error)", + "line": 266 + }, + { + "kind": "func", + "name": "applyCreditTransactionBalances", + "signature": "func applyCreditTransactionBalances(items []CreditTransaction, after alpacadecimal.Decimal)", + "line": 293 + }, + { + "kind": "func", + "name": "creditTransactionType", + "signature": "func creditTransactionType(fboImpact alpacadecimal.Decimal) CreditTransactionType", + "line": 303 + }, + { + "kind": "struct", + "name": "chargeDisplayMetadata", + "signature": "type chargeDisplayMetadata struct", + "line": 311 + }, + { + "kind": "func", + "name": "applyChargeMetadataToCreditTransactions", + "signature": "func (s *service) applyChargeMetadataToCreditTransactions(ctx context.Context, namespace string, items []CreditTransaction)", + "line": 316 + }, + { + "kind": "func", + "name": "chargeDisplayMetadataFromCharge", + "signature": "func chargeDisplayMetadataFromCharge(charge charges.Charge) (chargeDisplayMetadata, error)", + "line": 365 + }, + { + "kind": "func", + "name": "chargeIDFromAnnotations", + "signature": "func chargeIDFromAnnotations(annotations models.Annotations) string", + "line": 402 + } + ], + "line_count": 414 + }, + "openmeter/ledger/customerbalance/transactions_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreditTransactionLoaders_InvalidType", + "signature": "func TestCreditTransactionLoaders_InvalidType(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestCreditTransactionFromLedgerTransaction_UsesFBOEntry", + "signature": "func TestCreditTransactionFromLedgerTransaction_UsesFBOEntry(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestCreditTransactionFromLedgerTransaction_AggregatesScopedFBOEntries", + "signature": "func TestCreditTransactionFromLedgerTransaction_AggregatesScopedFBOEntries(t *testing.T)", + "line": 44 + }, + { + "kind": "func", + "name": "TestApplyCreditTransactionBalances", + "signature": "func TestApplyCreditTransactionBalances(t *testing.T)", + "line": 59 + }, + { + "kind": "func", + "name": "TestApplyChargeMetadataToCreditTransactions", + "signature": "func TestApplyChargeMetadataToCreditTransactions(t *testing.T)", + "line": 72 + }, + { + "kind": "func", + "name": "TestMergeSortedLists_ByCursorDesc", + "signature": "func TestMergeSortedLists_ByCursorDesc(t *testing.T)", + "line": 124 + }, + { + "kind": "func", + "name": "mustHistoricalTransaction", + "signature": "func mustHistoricalTransaction(t *testing.T, entries []ledgerhistorical.EntryData) ledger.Transaction", + "line": 163 + }, + { + "kind": "func", + "name": "mustEntryData", + "signature": "func mustEntryData(t *testing.T, id string, accountType ledger.AccountType, currency currencyx.Code, amount alpacadecimal.Decimal) ledgerhistorical.EntryData", + "line": 177 + }, + { + "kind": "struct", + "name": "staticChargeService", + "signature": "type staticChargeService struct", + "line": 199 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (s staticChargeService) GetByIDs(_ context.Context, input charges.GetByIDsInput) (charges.Charges, error)", + "line": 203 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (s staticChargeService) ListCharges(context.Context, charges.ListChargesInput) (pagination.Result[charges.Charge], error)", + "line": 217 + } + ], + "line_count": 219 + }, + "openmeter/ledger/errors.go": { + "header": "const ErrCodeInvalidTransactionTotal models.ErrorCode = \"invalid_transaction_total\"\nvar ErrInvalidTransactionTotal = models.NewValidationIssue(\n\tErrCodeInvalidTransactionTotal,", + "symbols": [], + "line_count": 145 + }, + "openmeter/ledger/historical/adapter/ledger.go": { + "header": "\t\"context\"\n\tstdsql \"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "hydrateHistoricalTransaction", + "signature": "func hydrateHistoricalTransaction(tx *db.LedgerTransaction) (*ledgerhistorical.Transaction, error)", + "line": 30 + }, + { + "kind": "func", + "name": "BookTransaction", + "signature": "func (r *repo) BookTransaction(ctx context.Context, groupID models.NamespacedID, input ledger.TransactionInput) (*ledgerhistorical.Transaction, error)", + "line": 91 + }, + { + "kind": "func", + "name": "CreateTransactionGroup", + "signature": "func (r *repo) CreateTransactionGroup(ctx context.Context, transactionGroup ledgerhistorical.CreateTransactionGroupInput) (ledgerhistorical.TransactionGroupData, error)", + "line": 174 + }, + { + "kind": "func", + "name": "GetTransactionGroup", + "signature": "func (r *repo) GetTransactionGroup(ctx context.Context, id models.NamespacedID) (*ledgerhistorical.TransactionGroup, error)", + "line": 193 + }, + { + "kind": "func", + "name": "SumEntries", + "signature": "func (r *repo) SumEntries(ctx context.Context, query ledger.Query) (alpacadecimal.Decimal, error)", + "line": 238 + }, + { + "kind": "func", + "name": "ListTransactions", + "signature": "func (r *repo) ListTransactions(ctx context.Context, input ledger.ListTransactionsInput) (ledger.ListTransactionsResult, error)", + "line": 273 + }, + { + "kind": "func", + "name": "listTransactionsEntryPredicates", + "signature": "func listTransactionsEntryPredicates(accountIDs []string, currency *currencyx.Code) []predicate.LedgerEntry", + "line": 405 + }, + { + "kind": "func", + "name": "ledgerTransactionAfterCursorPredicate", + "signature": "func ledgerTransactionAfterCursorPredicate(cursor ledger.TransactionCursor) predicate.LedgerTransaction", + "line": 428 + }, + { + "kind": "func", + "name": "ledgerTransactionBeforeCursorPredicate", + "signature": "func ledgerTransactionBeforeCursorPredicate(cursor ledger.TransactionCursor) predicate.LedgerTransaction", + "line": 446 + }, + { + "kind": "func", + "name": "listTransactionsOrdering", + "signature": "func listTransactionsOrdering(before bool) []ledgertransactiondb.OrderOption", + "line": 464 + }, + { + "kind": "func", + "name": "ledgerTransactionCreditMovementPredicate", + "signature": "func ledgerTransactionCreditMovementPredicate(\n\taccountIDs []string,\n\tcurrency *currencyx.Code,\n\tmovement ledger.ListTransactionsCreditMovement,\n) (predicate.LedgerTransaction, error)", + "line": 477 + }, + { + "kind": "func", + "name": "scopedFBOMovementTransactionSelector", + "signature": "func scopedFBOMovementTransactionSelector(\n\taccountIDs []string,\n\tcurrency *currencyx.Code,\n\thaving *sql.Predicate,\n) *sql.Selector", + "line": 503 + }, + { + "kind": "func", + "name": "scopedEntryAmountSumPredicate", + "signature": "func scopedEntryAmountSumPredicate(op string) *sql.Predicate", + "line": 537 + }, + { + "kind": "func", + "name": "stringsToAny", + "signature": "func stringsToAny(values []string) []any", + "line": 541 + } + ], + "line_count": 548 + }, + "openmeter/ledger/historical/adapter/ledger_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRepo_CreateTransactionGroup", + "signature": "func TestRepo_CreateTransactionGroup(t *testing.T)", + "line": 29 + }, + { + "kind": "func", + "name": "TestRepo_BookTransaction_CreatesTransactionAndEntries", + "signature": "func TestRepo_BookTransaction_CreatesTransactionAndEntries(t *testing.T)", + "line": 58 + }, + { + "kind": "func", + "name": "TestRepo_GetTransactionGroup_PreservesTaxBehavior", + "signature": "func TestRepo_GetTransactionGroup_PreservesTaxBehavior(t *testing.T)", + "line": 144 + }, + { + "kind": "func", + "name": "TestRepo_BookTransaction_NilInput", + "signature": "func TestRepo_BookTransaction_NilInput(t *testing.T)", + "line": 199 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_PaginatesAndFilters", + "signature": "func TestRepo_ListTransactions_PaginatesAndFilters(t *testing.T)", + "line": 221 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_PaginatesWithBefore", + "signature": "func TestRepo_ListTransactions_PaginatesWithBefore(t *testing.T)", + "line": 297 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_BeforeNextCursorResumesWithoutOverlap", + "signature": "func TestRepo_ListTransactions_BeforeNextCursorResumesWithoutOverlap(t *testing.T)", + "line": 364 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_FiltersCreditMovementByScopedFBOEntry", + "signature": "func TestRepo_ListTransactions_FiltersCreditMovementByScopedFBOEntry(t *testing.T)", + "line": 441 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_FiltersCreditMovementByScopedNetFBOAmount", + "signature": "func TestRepo_ListTransactions_FiltersCreditMovementByScopedNetFBOAmount(t *testing.T)", + "line": 522 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_PaginatesAndFiltersByAccountAndAnnotation", + "signature": "func TestRepo_ListTransactions_PaginatesAndFiltersByAccountAndAnnotation(t *testing.T)", + "line": 575 + }, + { + "kind": "func", + "name": "TestRepo_ListTransactions_FiltersHydratedEntriesByScope", + "signature": "func TestRepo_ListTransactions_FiltersHydratedEntriesByScope(t *testing.T)", + "line": 727 + }, + { + "kind": "func", + "name": "TestRepo_SumEntries_Filters", + "signature": "func TestRepo_SumEntries_Filters(t *testing.T)", + "line": 782 + }, + { + "kind": "func", + "name": "TestSumEntriesQuery_SQL", + "signature": "func TestSumEntriesQuery_SQL(t *testing.T)", + "line": 997 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 1036 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 1043 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 1057 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 1075 + }, + { + "kind": "func", + "name": "createSubAccount", + "signature": "func (e *TestEnv) createSubAccount(t *testing.T, namespace string, route ledger.Route) *ledgeraccount.SubAccountData", + "line": 1084 + }, + { + "kind": "func", + "name": "createSubAccountOfType", + "signature": "func (e *TestEnv) createSubAccountOfType(t *testing.T, namespace string, accountType ledger.AccountType, route ledger.Route) *ledgeraccount.SubAccountData", + "line": 1090 + }, + { + "kind": "func", + "name": "testNamespace", + "signature": "func testNamespace() string", + "line": 1111 + }, + { + "kind": "func", + "name": "mustSetUpHistoricalTransactionInput", + "signature": "func mustSetUpHistoricalTransactionInput(_ *testing.T, bookedAt time.Time, entries []*transactionstestutils.AnyEntryInput) ledger.TransactionInput", + "line": 1115 + }, + { + "kind": "func", + "name": "testAddress", + "signature": "func testAddress(t *testing.T, sub *ledgeraccount.SubAccountData) ledger.PostingAddress", + "line": 1122 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(t *testing.T, raw string) alpacadecimal.Decimal", + "line": 1140 + } + ], + "line_count": 1147 + }, + "openmeter/ledger/historical/adapter/repo.go": { + "header": "\t\"context\"\n\tstdsql \"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "repo", + "signature": "type repo struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewRepo", + "signature": "func NewRepo(dbClient *db.Client) ledgerhistorical.Repo", + "line": 20 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *repo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 26 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *repo) WithTx(ctx context.Context, tx *entutils.TxDriver) *repo", + "line": 37 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *repo) Self() *repo", + "line": 43 + } + ], + "line_count": 45 + }, + "openmeter/ledger/historical/adapter/sumentries_query.go": { + "header": "\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/lib/pq\"", + "symbols": [ + { + "kind": "struct", + "name": "sumEntriesQuery", + "signature": "type sumEntriesQuery struct", + "line": 18 + }, + { + "kind": "func", + "name": "Build", + "signature": "func (b *sumEntriesQuery) Build(client *db.Client) (*db.LedgerEntryQuery, error)", + "line": 22 + }, + { + "kind": "func", + "name": "SQL", + "signature": "func (b *sumEntriesQuery) SQL() (string, []any, error)", + "line": 32 + }, + { + "kind": "func", + "name": "entryPredicates", + "signature": "func (b *sumEntriesQuery) entryPredicates() ([]predicate.LedgerEntry, error)", + "line": 50 + }, + { + "kind": "func", + "name": "subAccountPredicates", + "signature": "func (b *sumEntriesQuery) subAccountPredicates() ([]predicate.LedgerSubAccount, error)", + "line": 107 + } + ], + "line_count": 171 + }, + "openmeter/ledger/historical/balance.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "Balance", + "signature": "type Balance struct", + "line": 13 + }, + { + "kind": "func", + "name": "Settled", + "signature": "func (b *Balance) Settled() alpacadecimal.Decimal", + "line": 20 + }, + { + "kind": "func", + "name": "Pending", + "signature": "func (b *Balance) Pending() alpacadecimal.Decimal", + "line": 24 + }, + { + "kind": "func", + "name": "GetAccountBalance", + "signature": "func (l *Ledger) GetAccountBalance(ctx context.Context, account ledger.Account, route ledger.RouteFilter, query ledger.BalanceQuery) (ledger.Balance, error)", + "line": 30 + }, + { + "kind": "func", + "name": "GetSubAccountBalance", + "signature": "func (l *Ledger) GetSubAccountBalance(ctx context.Context, subAccount ledger.SubAccount, query ledger.BalanceQuery) (ledger.Balance, error)", + "line": 54 + }, + { + "kind": "func", + "name": "sumEntries", + "signature": "func (l *Ledger) sumEntries(ctx context.Context, query ledger.Query) (ledger.QuerySummedResult, error)", + "line": 67 + } + ], + "line_count": 82 + }, + "openmeter/ledger/historical/entry.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "EntryData", + "signature": "type EntryData struct", + "line": 14 + }, + { + "kind": "struct", + "name": "Entry", + "signature": "type Entry struct", + "line": 32 + }, + { + "kind": "func", + "name": "newEntryFromData", + "signature": "func newEntryFromData(data EntryData) (*Entry, error)", + "line": 43 + }, + { + "kind": "func", + "name": "PostingAddress", + "signature": "func (e *Entry) PostingAddress() ledger.PostingAddress", + "line": 63 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (e *Entry) Amount() alpacadecimal.Decimal", + "line": 67 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func (e *Entry) IdentityKey() string", + "line": 71 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (e *Entry) Annotations() models.Annotations", + "line": 75 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (e *Entry) ID() models.NamespacedID", + "line": 79 + }, + { + "kind": "func", + "name": "TransactionID", + "signature": "func (e *Entry) TransactionID() models.NamespacedID", + "line": 83 + } + ], + "line_count": 85 + }, + "openmeter/ledger/historical/ledger.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "struct", + "name": "Ledger", + "signature": "type Ledger struct", + "line": 13 + }, + { + "kind": "func", + "name": "NewLedger", + "signature": "func NewLedger(repo Repo, accountCatalog ledger.AccountCatalog, accountLocker ledger.AccountLocker, routingValidator ledger.RoutingValidator) *Ledger", + "line": 22 + }, + { + "kind": "func", + "name": "ListTransactions", + "signature": "func (l *Ledger) ListTransactions(ctx context.Context, params ledger.ListTransactionsInput) (ledger.ListTransactionsResult, error)", + "line": 37 + }, + { + "kind": "func", + "name": "GetTransactionGroup", + "signature": "func (l *Ledger) GetTransactionGroup(ctx context.Context, id models.NamespacedID) (ledger.TransactionGroup, error)", + "line": 53 + }, + { + "kind": "func", + "name": "CommitGroup", + "signature": "func (l *Ledger) CommitGroup(ctx context.Context, group ledger.TransactionGroupInput) (ledger.TransactionGroup, error)", + "line": 62 + }, + { + "kind": "func", + "name": "lockAccountsForTransactionInputs", + "signature": "func (l *Ledger) lockAccountsForTransactionInputs(ctx context.Context, namespace string, txInputs []ledger.TransactionInput) error", + "line": 115 + }, + { + "kind": "func", + "name": "validateAccountBalancesForTransaction", + "signature": "func (l *Ledger) validateAccountBalancesForTransaction(_ context.Context, _ ledger.TransactionInput) error", + "line": 159 + } + ], + "line_count": 162 + }, + "openmeter/ledger/historical/repo.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "interface", + "name": "Repo", + "signature": "type Repo interface", + "line": 15 + }, + { + "kind": "struct", + "name": "ListEntriesInput", + "signature": "type ListEntriesInput struct", + "line": 38 + }, + { + "kind": "struct", + "name": "EntryExpand", + "signature": "type EntryExpand struct", + "line": 46 + }, + { + "kind": "struct", + "name": "CreateTransactionInput", + "signature": "type CreateTransactionInput struct", + "line": 54 + }, + { + "kind": "struct", + "name": "CreateTransactionGroupInput", + "signature": "type CreateTransactionGroupInput struct", + "line": 62 + }, + { + "kind": "struct", + "name": "TransactionGroupData", + "signature": "type TransactionGroupData struct", + "line": 68 + }, + { + "kind": "struct", + "name": "TransactionData", + "signature": "type TransactionData struct", + "line": 76 + } + ], + "line_count": 83 + }, + "openmeter/ledger/historical/transaction.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "Transaction", + "signature": "type Transaction struct", + "line": 13 + }, + { + "kind": "func", + "name": "NewTransactionFromData", + "signature": "func NewTransactionFromData(data TransactionData, entries []EntryData) (*Transaction, error)", + "line": 18 + }, + { + "kind": "func", + "name": "Entries", + "signature": "func (t *Transaction) Entries() []ledger.Entry", + "line": 42 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (t *Transaction) ID() models.NamespacedID", + "line": 48 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func (t *Transaction) BookedAt() time.Time", + "line": 55 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t *Transaction) Annotations() models.Annotations", + "line": 59 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (t *Transaction) Cursor() ledger.TransactionCursor", + "line": 63 + }, + { + "kind": "struct", + "name": "TransactionGroup", + "signature": "type TransactionGroup struct", + "line": 74 + }, + { + "kind": "func", + "name": "NewTransactionGroupFromData", + "signature": "func NewTransactionGroupFromData(data TransactionGroupData, transactions []*Transaction) *TransactionGroup", + "line": 79 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (t *TransactionGroup) ID() models.NamespacedID", + "line": 88 + }, + { + "kind": "func", + "name": "Transactions", + "signature": "func (t *TransactionGroup) Transactions() []ledger.Transaction", + "line": 95 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t *TransactionGroup) Annotations() models.Annotations", + "line": 101 + } + ], + "line_count": 103 + }, + "openmeter/ledger/impact.go": { + "header": "func TransactionImpact(tx Transaction, filter ImpactFilter) alpacadecimal.Decimal {\n\ttotal := alpacadecimal.Zero\n\tfor _, entry := range tx.Entries() {", + "symbols": [ + { + "kind": "func", + "name": "TransactionImpact", + "signature": "func TransactionImpact(tx Transaction, filter ImpactFilter) alpacadecimal.Decimal", + "line": 5 + }, + { + "kind": "func", + "name": "EntryMatchesImpactFilter", + "signature": "func EntryMatchesImpactFilter(entry Entry, filter ImpactFilter) bool", + "line": 16 + } + ], + "line_count": 27 + }, + "openmeter/ledger/impact_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestEntryMatchesImpactFilter", + "signature": "func TestEntryMatchesImpactFilter(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestEntryMatchesImpactFilter_NilRouteFields", + "signature": "func TestEntryMatchesImpactFilter_NilRouteFields(t *testing.T)", + "line": 204 + }, + { + "kind": "func", + "name": "TestTransactionImpact", + "signature": "func TestTransactionImpact(t *testing.T)", + "line": 277 + }, + { + "kind": "struct", + "name": "impactTestTransaction", + "signature": "type impactTestTransaction struct", + "line": 349 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (t impactTestTransaction) Cursor() ledger.TransactionCursor", + "line": 353 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func (t impactTestTransaction) BookedAt() time.Time", + "line": 361 + }, + { + "kind": "func", + "name": "Entries", + "signature": "func (t impactTestTransaction) Entries() []ledger.Entry", + "line": 365 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (t impactTestTransaction) ID() models.NamespacedID", + "line": 369 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t impactTestTransaction) Annotations() models.Annotations", + "line": 373 + }, + { + "kind": "struct", + "name": "impactTestEntry", + "signature": "type impactTestEntry struct", + "line": 379 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (e impactTestEntry) ID() models.NamespacedID", + "line": 388 + }, + { + "kind": "func", + "name": "TransactionID", + "signature": "func (e impactTestEntry) TransactionID() models.NamespacedID", + "line": 392 + }, + { + "kind": "func", + "name": "PostingAddress", + "signature": "func (e impactTestEntry) PostingAddress() ledger.PostingAddress", + "line": 396 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (e impactTestEntry) Amount() alpacadecimal.Decimal", + "line": 400 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func (e impactTestEntry) IdentityKey() string", + "line": 404 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (e impactTestEntry) Annotations() models.Annotations", + "line": 408 + }, + { + "kind": "struct", + "name": "impactTestAddress", + "signature": "type impactTestAddress struct", + "line": 414 + }, + { + "kind": "func", + "name": "SubAccountID", + "signature": "func (a impactTestAddress) SubAccountID() string", + "line": 420 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func (a impactTestAddress) AccountType() ledger.AccountType", + "line": 424 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (a impactTestAddress) Route() ledger.SubAccountRoute", + "line": 428 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (a impactTestAddress) Equal(other ledger.PostingAddress) bool", + "line": 432 + }, + { + "kind": "func", + "name": "mustImpactTestEntry", + "signature": "func mustImpactTestEntry(t *testing.T, accountType ledger.AccountType, route ledger.Route, amount ...alpacadecimal.Decimal) ledger.Entry", + "line": 440 + } + ], + "line_count": 467 + }, + "openmeter/ledger/ledger_fx_test.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "testTransactionGroupInput", + "signature": "type testTransactionGroupInput struct", + "line": 22 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func (t testTransactionGroupInput) Namespace() string", + "line": 28 + }, + { + "kind": "func", + "name": "Transactions", + "signature": "func (t testTransactionGroupInput) Transactions() []ledger.TransactionInput", + "line": 32 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t testTransactionGroupInput) Annotations() models.Annotations", + "line": 36 + }, + { + "kind": "func", + "name": "TestFXOnInvoiceIssued", + "signature": "func TestFXOnInvoiceIssued(t *testing.T)", + "line": 42 + } + ], + "line_count": 147 + }, + "openmeter/ledger/ledger_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "exampleEntryInput", + "signature": "type exampleEntryInput struct", + "line": 18 + }, + { + "kind": "func", + "name": "PostingAddress", + "signature": "func (e exampleEntryInput) PostingAddress() ledger.PostingAddress", + "line": 23 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (e exampleEntryInput) Amount() alpacadecimal.Decimal", + "line": 27 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func (e exampleEntryInput) IdentityKey() string", + "line": 31 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (e exampleEntryInput) Annotations() models.Annotations", + "line": 35 + }, + { + "kind": "func", + "name": "TestTwoAccountTransaction", + "signature": "func TestTwoAccountTransaction(t *testing.T)", + "line": 41 + }, + { + "kind": "func", + "name": "TestMultiAccountTransaction", + "signature": "func TestMultiAccountTransaction(t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestGetAccountBalance", + "signature": "func TestGetAccountBalance(t *testing.T)", + "line": 106 + } + ], + "line_count": 117 + }, + "openmeter/ledger/noop/noop.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "balance", + "signature": "type balance struct", + "line": 19 + }, + { + "kind": "struct", + "name": "subAccount", + "signature": "type subAccount struct", + "line": 29 + }, + { + "kind": "func", + "name": "Address", + "signature": "func (s subAccount) Address() ledger.PostingAddress", + "line": 35 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (s subAccount) Route() ledger.Route", + "line": 39 + }, + { + "kind": "func", + "name": "AccountID", + "signature": "func (s subAccount) AccountID() models.NamespacedID", + "line": 43 + }, + { + "kind": "struct", + "name": "postingAddress", + "signature": "type postingAddress struct", + "line": 51 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p postingAddress) Equal(other ledger.PostingAddress) bool", + "line": 55 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func (p postingAddress) AccountType() ledger.AccountType", + "line": 63 + }, + { + "kind": "struct", + "name": "Ledger", + "signature": "type Ledger struct", + "line": 71 + }, + { + "kind": "struct", + "name": "AccountResolver", + "signature": "type AccountResolver struct", + "line": 98 + }, + { + "kind": "struct", + "name": "AccountService", + "signature": "type AccountService struct", + "line": 136 + }, + { + "kind": "struct", + "name": "customerAccount", + "signature": "type customerAccount struct", + "line": 168 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (c customerAccount) ID() models.NamespacedID", + "line": 180 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (c customerAccount) Type() ledger.AccountType", + "line": 184 + }, + { + "kind": "struct", + "name": "customerFBOAccount", + "signature": "type customerFBOAccount struct", + "line": 188 + }, + { + "kind": "struct", + "name": "customerReceivableAccount", + "signature": "type customerReceivableAccount struct", + "line": 196 + }, + { + "kind": "struct", + "name": "customerAccruedAccount", + "signature": "type customerAccruedAccount struct", + "line": 204 + }, + { + "kind": "struct", + "name": "businessAccount", + "signature": "type businessAccount struct", + "line": 212 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (b businessAccount) ID() models.NamespacedID", + "line": 220 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (b businessAccount) Type() ledger.AccountType", + "line": 224 + }, + { + "kind": "func", + "name": "GetSubAccountForRoute", + "signature": "func (b businessAccount) GetSubAccountForRoute(context.Context, ledger.BusinessRouteParams) (ledger.SubAccount, error)", + "line": 228 + }, + { + "kind": "struct", + "name": "NamespaceHandler", + "signature": "type NamespaceHandler struct", + "line": 232 + }, + { + "kind": "func", + "name": "newAccount", + "signature": "func newAccount(namespace string, accountType ledger.AccountType, id string) ledger.Account", + "line": 244 + }, + { + "kind": "func", + "name": "newSubAccount", + "signature": "func newSubAccount(namespace, accountID string, route ledger.Route) *ledgeraccount.SubAccount", + "line": 265 + }, + { + "kind": "func", + "name": "normalizeNamespace", + "signature": "func normalizeNamespace(namespace string) string", + "line": 297 + }, + { + "kind": "func", + "name": "normalizeID", + "signature": "func normalizeID(id, fallback string) string", + "line": 301 + }, + { + "kind": "func", + "name": "accountTypeForRoute", + "signature": "func accountTypeForRoute(route ledger.Route) ledger.AccountType", + "line": 309 + } + ], + "line_count": 318 + }, + "openmeter/ledger/primitives.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "PostingAddress", + "signature": "type PostingAddress interface", + "line": 22 + }, + { + "kind": "interface", + "name": "Balance", + "signature": "type Balance interface", + "line": 30 + }, + { + "kind": "interface", + "name": "SubAccount", + "signature": "type SubAccount interface", + "line": 37 + }, + { + "kind": "struct", + "name": "RouteFilter", + "signature": "type RouteFilter struct", + "line": 49 + }, + { + "kind": "interface", + "name": "Account", + "signature": "type Account interface", + "line": 68 + }, + { + "kind": "interface", + "name": "EntryInput", + "signature": "type EntryInput interface", + "line": 77 + }, + { + "kind": "interface", + "name": "Entry", + "signature": "type Entry interface", + "line": 84 + }, + { + "kind": "interface", + "name": "TransactionInput", + "signature": "type TransactionInput interface", + "line": 90 + }, + { + "kind": "struct", + "name": "ImpactFilter", + "signature": "type ImpactFilter struct", + "line": 97 + }, + { + "kind": "interface", + "name": "Transaction", + "signature": "type Transaction interface", + "line": 103 + }, + { + "kind": "struct", + "name": "TransactionCursor", + "signature": "type TransactionCursor struct", + "line": 111 + }, + { + "kind": "func", + "name": "Compare", + "signature": "func (c TransactionCursor) Compare(other TransactionCursor) int", + "line": 119 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TransactionCursor) Validate() error", + "line": 137 + }, + { + "kind": "interface", + "name": "TransactionGroupInput", + "signature": "type TransactionGroupInput interface", + "line": 155 + }, + { + "kind": "interface", + "name": "TransactionGroup", + "signature": "type TransactionGroup interface", + "line": 162 + }, + { + "kind": "interface", + "name": "Ledger", + "signature": "type Ledger interface", + "line": 172 + }, + { + "kind": "struct", + "name": "ListTransactionsInput", + "signature": "type ListTransactionsInput struct", + "line": 185 + }, + { + "kind": "struct", + "name": "ListTransactionsResult", + "signature": "type ListTransactionsResult struct", + "line": 207 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListTransactionsInput) Validate() error", + "line": 212 + } + ], + "line_count": 291 + }, + "openmeter/ledger/query.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "Query", + "signature": "type Query struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Query) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "Filters", + "signature": "type Filters struct", + "line": 99 + }, + { + "kind": "struct", + "name": "QuerySummedResult", + "signature": "type QuerySummedResult struct", + "line": 112 + } + ], + "line_count": 115 + }, + "openmeter/ledger/recognizer/noop.go": { + "header": "type NoopService struct{}\nvar _ Service = NoopService{}\nfunc (NoopService) RecognizeEarnings(context.Context, RecognizeEarningsInput) (RecognizeEarningsResult, error) {", + "symbols": [ + { + "kind": "struct", + "name": "NoopService", + "signature": "type NoopService struct", + "line": 7 + } + ], + "line_count": 13 + }, + "openmeter/ledger/recognizer/recognize.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sort\"", + "symbols": [ + { + "kind": "struct", + "name": "lineageEligible", + "signature": "type lineageEligible struct", + "line": 25 + }, + { + "kind": "func", + "name": "RecognizeEarnings", + "signature": "func (s *service) RecognizeEarnings(ctx context.Context, in RecognizeEarningsInput) (RecognizeEarningsResult, error)", + "line": 31 + }, + { + "kind": "func", + "name": "collectEligibleLineages", + "signature": "func collectEligibleLineages(lineages []lineage.Lineage) []lineageEligible", + "line": 113 + }, + { + "kind": "func", + "name": "allocateRecognition", + "signature": "func (s *service) allocateRecognition(ctx context.Context, eligible []lineageEligible, actualAmount alpacadecimal.Decimal, groupID string, at time.Time) error", + "line": 145 + }, + { + "kind": "func", + "name": "sumPositiveEntries", + "signature": "func sumPositiveEntries(inputs []ledger.TransactionInput) alpacadecimal.Decimal", + "line": 208 + }, + { + "kind": "func", + "name": "minDecimal", + "signature": "func minDecimal(a, b alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 222 + } + ], + "line_count": 228 + }, + "openmeter/ledger/recognizer/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 19 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 30 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(config Config) (Service, error)", + "line": 55 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 68 + }, + { + "kind": "struct", + "name": "RecognizeEarningsInput", + "signature": "type RecognizeEarningsInput struct", + "line": 76 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i RecognizeEarningsInput) Validate() error", + "line": 82 + }, + { + "kind": "struct", + "name": "RecognizeEarningsResult", + "signature": "type RecognizeEarningsResult struct", + "line": 99 + } + ], + "line_count": 102 + }, + "openmeter/ledger/recognizer/service_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "recognizerTestEnv", + "signature": "type recognizerTestEnv struct", + "line": 25 + }, + { + "kind": "func", + "name": "newRecognizerTestEnv", + "signature": "func newRecognizerTestEnv(t *testing.T) *recognizerTestEnv", + "line": 31 + }, + { + "kind": "func", + "name": "testID", + "signature": "func testID() string", + "line": 66 + }, + { + "kind": "func", + "name": "resolverDeps", + "signature": "func (e *recognizerTestEnv) resolverDeps() transactions.ResolverDependencies", + "line": 70 + }, + { + "kind": "func", + "name": "resolveAndCommit", + "signature": "func (e *recognizerTestEnv) resolveAndCommit(t *testing.T, templates ...transactions.TransactionTemplate)", + "line": 78 + }, + { + "kind": "func", + "name": "ensureCharge", + "signature": "func (e *recognizerTestEnv) ensureCharge(t *testing.T, chargeID string)", + "line": 97 + }, + { + "kind": "func", + "name": "createLineageForRealization", + "signature": "func (e *recognizerTestEnv) createLineageForRealization(t *testing.T, chargeID, realizationID string, amount alpacadecimal.Decimal, originKind creditrealization.LineageOriginKind)", + "line": 115 + }, + { + "kind": "func", + "name": "TestRecognizeEarnings_IdempotencyOnUnchangedState", + "signature": "func TestRecognizeEarnings_IdempotencyOnUnchangedState(t *testing.T)", + "line": 150 + }, + { + "kind": "func", + "name": "TestRecognizeEarnings_DeterministicAllocationAndSegmentTransition", + "signature": "func TestRecognizeEarnings_DeterministicAllocationAndSegmentTransition(t *testing.T)", + "line": 188 + } + ], + "line_count": 227 + }, + "openmeter/ledger/resolvers/account.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "AccountResolver", + "signature": "type AccountResolver struct", + "line": 18 + }, + { + "kind": "struct", + "name": "AccountResolverConfig", + "signature": "type AccountResolverConfig struct", + "line": 25 + }, + { + "kind": "func", + "name": "NewAccountResolver", + "signature": "func NewAccountResolver(cfg AccountResolverConfig) *AccountResolver", + "line": 32 + }, + { + "kind": "func", + "name": "CreateCustomerAccounts", + "signature": "func (s *AccountResolver) CreateCustomerAccounts(ctx context.Context, customerID customer.CustomerID) (ledger.CustomerAccounts, error)", + "line": 50 + }, + { + "kind": "func", + "name": "GetCustomerAccounts", + "signature": "func (s *AccountResolver) GetCustomerAccounts(ctx context.Context, customerID customer.CustomerID) (ledger.CustomerAccounts, error)", + "line": 96 + }, + { + "kind": "func", + "name": "EnsureBusinessAccounts", + "signature": "func (s *AccountResolver) EnsureBusinessAccounts(ctx context.Context, namespace string) (ledger.BusinessAccounts, error)", + "line": 168 + }, + { + "kind": "func", + "name": "GetBusinessAccounts", + "signature": "func (s *AccountResolver) GetBusinessAccounts(ctx context.Context, namespace string) (ledger.BusinessAccounts, error)", + "line": 200 + }, + { + "kind": "func", + "name": "listBusinessAccountsByType", + "signature": "func (s *AccountResolver) listBusinessAccountsByType(ctx context.Context, namespace string) (map[ledger.AccountType]ledger.Account, error)", + "line": 266 + }, + { + "kind": "func", + "name": "lockCustomerProvisioning", + "signature": "func (s *AccountResolver) lockCustomerProvisioning(ctx context.Context, customerID customer.CustomerID) error", + "line": 287 + }, + { + "kind": "func", + "name": "lockBusinessProvisioning", + "signature": "func (s *AccountResolver) lockBusinessProvisioning(ctx context.Context, namespace string) error", + "line": 307 + }, + { + "kind": "func", + "name": "lockProvisioning", + "signature": "func (s *AccountResolver) lockProvisioning(ctx context.Context, key lockr.Key) error", + "line": 325 + } + ], + "line_count": 338 + }, + "openmeter/ledger/resolvers/account_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [ + { + "kind": "func", + "name": "TestAccountResolver_GetBusinessAccountsRequiresExplicitProvisioning", + "signature": "func TestAccountResolver_GetBusinessAccountsRequiresExplicitProvisioning(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestAccountResolver_EnsureBusinessAccountsIsIdempotent", + "signature": "func TestAccountResolver_EnsureBusinessAccountsIsIdempotent(t *testing.T)", + "line": 36 + }, + { + "kind": "func", + "name": "TestAccountResolver_CreateCustomerAccountsIsIdempotent", + "signature": "func TestAccountResolver_CreateCustomerAccountsIsIdempotent(t *testing.T)", + "line": 82 + }, + { + "kind": "struct", + "name": "resolverTestEnv", + "signature": "type resolverTestEnv struct", + "line": 142 + }, + { + "kind": "func", + "name": "newResolverTestEnv", + "signature": "func newResolverTestEnv(t *testing.T) resolverTestEnv", + "line": 148 + } + ], + "line_count": 179 + }, + "openmeter/ledger/resolvers/adapter/repo.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "repo", + "signature": "type repo struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewRepo", + "signature": "func NewRepo(db *entdb.Client) resolvers.CustomerAccountRepo", + "line": 23 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *repo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 27 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *repo) WithTx(ctx context.Context, tx *entutils.TxDriver) *repo", + "line": 38 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *repo) Self() *repo", + "line": 44 + }, + { + "kind": "func", + "name": "CreateCustomerAccount", + "signature": "func (r *repo) CreateCustomerAccount(ctx context.Context, input resolvers.CreateCustomerAccountInput) error", + "line": 48 + }, + { + "kind": "func", + "name": "GetCustomerAccountIDs", + "signature": "func (r *repo) GetCustomerAccountIDs(ctx context.Context, customerID customer.CustomerID) (map[ledger.AccountType]string, error)", + "line": 83 + } + ], + "line_count": 102 + }, + "openmeter/ledger/resolvers/customeraccount.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "interface", + "name": "CustomerAccountRepo", + "signature": "type CustomerAccountRepo interface", + "line": 12 + }, + { + "kind": "struct", + "name": "CreateCustomerAccountInput", + "signature": "type CreateCustomerAccountInput struct", + "line": 19 + } + ], + "line_count": 23 + }, + "openmeter/ledger/resolvers/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "validationErrors", + "signature": "type validationErrors interface", + "line": 14 + }, + { + "kind": "struct", + "name": "CustomerAccountAlreadyExistsError", + "signature": "type CustomerAccountAlreadyExistsError struct", + "line": 26 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *CustomerAccountAlreadyExistsError) Error() string", + "line": 34 + }, + { + "kind": "func", + "name": "ValidationErrors", + "signature": "func (e *CustomerAccountAlreadyExistsError) ValidationErrors() (models.ValidationIssues, error)", + "line": 44 + }, + { + "kind": "func", + "name": "AsCustomerAccountAlreadyExistsError", + "signature": "func AsCustomerAccountAlreadyExistsError(err error) (*CustomerAccountAlreadyExistsError, bool)", + "line": 55 + } + ], + "line_count": 62 + }, + "openmeter/ledger/resolvers/hooks.go": { + "header": "\t\"context\"\n\totelcodes \"go.opentelemetry.io/otel/codes\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "interface", + "name": "customerAccountProvisioner", + "signature": "type customerAccountProvisioner interface", + "line": 20 + }, + { + "kind": "struct", + "name": "CustomerLedgerHookConfig", + "signature": "type CustomerLedgerHookConfig struct", + "line": 24 + }, + { + "kind": "struct", + "name": "customerLedgerHook", + "signature": "type customerLedgerHook struct", + "line": 30 + }, + { + "kind": "func", + "name": "NewCustomerLedgerHook", + "signature": "func NewCustomerLedgerHook(config CustomerLedgerHookConfig) (CustomerLedgerHook, error)", + "line": 36 + }, + { + "kind": "func", + "name": "PostCreate", + "signature": "func (h *customerLedgerHook) PostCreate(ctx context.Context, cust *customer.Customer) error", + "line": 43 + } + ], + "line_count": 59 + }, + "openmeter/ledger/resolvers/namespace.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n\t\"github.com/openmeterio/openmeter/openmeter/namespace\"", + "symbols": [ + { + "kind": "interface", + "name": "businessAccountProvisioner", + "signature": "type businessAccountProvisioner interface", + "line": 10 + }, + { + "kind": "struct", + "name": "namespaceHandler", + "signature": "type namespaceHandler struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewNamespaceHandler", + "signature": "func NewNamespaceHandler(provisioner businessAccountProvisioner) namespace.Handler", + "line": 20 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (h *namespaceHandler) CreateNamespace(ctx context.Context, name string) error", + "line": 26 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (h *namespaceHandler) DeleteNamespace(ctx context.Context, _ string) error", + "line": 31 + } + ], + "line_count": 33 + }, + "openmeter/ledger/routing.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s TransactionAuthorizationStatus) Validate() error", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (v RoutingKeyVersion) Validate() error", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b TaxBehavior) Validate() error", + "line": 67 + }, + { + "kind": "struct", + "name": "RoutingKey", + "signature": "type RoutingKey struct", + "line": 80 + }, + { + "kind": "func", + "name": "NewRoutingKey", + "signature": "func NewRoutingKey(version RoutingKeyVersion, value string) (RoutingKey, error)", + "line": 85 + }, + { + "kind": "func", + "name": "Version", + "signature": "func (k RoutingKey) Version() RoutingKeyVersion", + "line": 99 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (k RoutingKey) Value() string", + "line": 103 + }, + { + "kind": "struct", + "name": "SubAccountRoute", + "signature": "type SubAccountRoute struct", + "line": 107 + }, + { + "kind": "func", + "name": "NewSubAccountRouteFromData", + "signature": "func NewSubAccountRouteFromData(id string, key RoutingKey, route Route) (SubAccountRoute, error)", + "line": 116 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (r SubAccountRoute) ID() string", + "line": 138 + }, + { + "kind": "func", + "name": "RoutingKey", + "signature": "func (r SubAccountRoute) RoutingKey() RoutingKey", + "line": 142 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (r SubAccountRoute) Route() Route", + "line": 146 + }, + { + "kind": "struct", + "name": "Route", + "signature": "type Route struct", + "line": 156 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Route) Validate() error", + "line": 173 + }, + { + "kind": "func", + "name": "Filter", + "signature": "func (r Route) Filter() RouteFilter", + "line": 211 + }, + { + "kind": "func", + "name": "Matches", + "signature": "func (r Route) Matches(filter RouteFilter) bool", + "line": 223 + }, + { + "kind": "func", + "name": "Normalize", + "signature": "func (r Route) Normalize() (Route, error)", + "line": 279 + }, + { + "kind": "func", + "name": "Normalize", + "signature": "func (f RouteFilter) Normalize() (RouteFilter, error)", + "line": 292 + }, + { + "kind": "struct", + "name": "routingVersionRequirement", + "signature": "type routingVersionRequirement struct", + "line": 350 + }, + { + "kind": "func", + "name": "selectRoutingKeyVersion", + "signature": "func selectRoutingKeyVersion(route Route) RoutingKeyVersion", + "line": 364 + }, + { + "kind": "func", + "name": "BuildRoutingKey", + "signature": "func BuildRoutingKey(route Route) (RoutingKey, error)", + "line": 375 + }, + { + "kind": "func", + "name": "BuildRoutingKeyV1", + "signature": "func BuildRoutingKeyV1(route Route) (RoutingKey, error)", + "line": 396 + }, + { + "kind": "func", + "name": "BuildRoutingKeyV2", + "signature": "func BuildRoutingKeyV2(route Route) (RoutingKey, error)", + "line": 408 + }, + { + "kind": "func", + "name": "buildRoutingKeyV1Normalized", + "signature": "func buildRoutingKeyV1Normalized(route Route) (RoutingKey, error)", + "line": 417 + }, + { + "kind": "func", + "name": "buildRoutingKeyV2Normalized", + "signature": "func buildRoutingKeyV2Normalized(route Route) (RoutingKey, error)", + "line": 431 + }, + { + "kind": "func", + "name": "ValidateTransactionAmount", + "signature": "func ValidateTransactionAmount(value alpacadecimal.Decimal) error", + "line": 449 + }, + { + "kind": "func", + "name": "ValidateCreditPriority", + "signature": "func ValidateCreditPriority(value int) error", + "line": 466 + }, + { + "kind": "func", + "name": "ValidateCurrency", + "signature": "func ValidateCurrency(value currencyx.Code) error", + "line": 476 + }, + { + "kind": "func", + "name": "ValidateCostBasis", + "signature": "func ValidateCostBasis(value alpacadecimal.Decimal) error", + "line": 486 + }, + { + "kind": "func", + "name": "SortedFeatures", + "signature": "func SortedFeatures(features []string) []string", + "line": 502 + }, + { + "kind": "func", + "name": "validateFeatures", + "signature": "func validateFeatures(features []string) error", + "line": 512 + }, + { + "kind": "func", + "name": "canonicalFeatures", + "signature": "func canonicalFeatures(features []string) string", + "line": 533 + }, + { + "kind": "func", + "name": "optionalStringValue", + "signature": "func optionalStringValue(s *string) string", + "line": 541 + }, + { + "kind": "func", + "name": "optionalIntValue", + "signature": "func optionalIntValue(v *int) string", + "line": 548 + }, + { + "kind": "func", + "name": "optionalDecimalValue", + "signature": "func optionalDecimalValue(v *alpacadecimal.Decimal) string", + "line": 555 + } + ], + "line_count": 560 + }, + "openmeter/ledger/routing_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestBuildRoutingKeyV1", + "signature": "func TestBuildRoutingKeyV1(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_Nulls", + "signature": "func TestBuildRoutingKeyV1_Nulls(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_SameLiterals_SameKey", + "signature": "func TestBuildRoutingKeyV1_SameLiterals_SameKey(t *testing.T)", + "line": 38 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_DifferentCurrency_DifferentKey", + "signature": "func TestBuildRoutingKeyV1_DifferentCurrency_DifferentKey(t *testing.T)", + "line": 52 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_WithTaxCodeAndFeatures", + "signature": "func TestBuildRoutingKeyV1_WithTaxCodeAndFeatures(t *testing.T)", + "line": 60 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_EmptyFeatures", + "signature": "func TestBuildRoutingKeyV1_EmptyFeatures(t *testing.T)", + "line": 71 + }, + { + "kind": "func", + "name": "TestRouteValidateRejectsInvalidFeatures", + "signature": "func TestRouteValidateRejectsInvalidFeatures(t *testing.T)", + "line": 80 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_DifferentPriority_DifferentKey", + "signature": "func TestBuildRoutingKeyV1_DifferentPriority_DifferentKey(t *testing.T)", + "line": 92 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_CanonicalizesCostBasis", + "signature": "func TestBuildRoutingKeyV1_CanonicalizesCostBasis(t *testing.T)", + "line": 100 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV1_DifferentAuthorizationStatus_DifferentKey", + "signature": "func TestBuildRoutingKeyV1_DifferentAuthorizationStatus_DifferentKey(t *testing.T)", + "line": 111 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV2_DifferentTaxBehavior_DifferentKey", + "signature": "func TestBuildRoutingKeyV2_DifferentTaxBehavior_DifferentKey(t *testing.T)", + "line": 127 + }, + { + "kind": "func", + "name": "TestTaxBehaviorValidate", + "signature": "func TestTaxBehaviorValidate(t *testing.T)", + "line": 142 + }, + { + "kind": "func", + "name": "TestRouteValidate_InvalidTaxBehavior", + "signature": "func TestRouteValidate_InvalidTaxBehavior(t *testing.T)", + "line": 149 + }, + { + "kind": "func", + "name": "TestRouteFilter_NormalizePreservesTaxCode", + "signature": "func TestRouteFilter_NormalizePreservesTaxCode(t *testing.T)", + "line": 157 + }, + { + "kind": "func", + "name": "TestRouteFilter_NormalizePreservesTaxBehavior", + "signature": "func TestRouteFilter_NormalizePreservesTaxBehavior(t *testing.T)", + "line": 170 + }, + { + "kind": "func", + "name": "TestRouteFilter_NormalizeAbsentTaxFieldsStayAbsent", + "signature": "func TestRouteFilter_NormalizeAbsentTaxFieldsStayAbsent(t *testing.T)", + "line": 183 + }, + { + "kind": "func", + "name": "TestRouteFilter_NormalizeSomeNilTaxCodePreserved", + "signature": "func TestRouteFilter_NormalizeSomeNilTaxCodePreserved(t *testing.T)", + "line": 191 + }, + { + "kind": "func", + "name": "TestRouteToFilter_TaxFieldsPinned", + "signature": "func TestRouteToFilter_TaxFieldsPinned(t *testing.T)", + "line": 203 + }, + { + "kind": "func", + "name": "TestRouteToFilter_NilTaxFieldsPinnedAsPresent", + "signature": "func TestRouteToFilter_NilTaxFieldsPinnedAsPresent(t *testing.T)", + "line": 222 + }, + { + "kind": "func", + "name": "TestRouteMatches", + "signature": "func TestRouteMatches(t *testing.T)", + "line": 240 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(t *testing.T, raw string) alpacadecimal.Decimal", + "line": 536 + }, + { + "kind": "func", + "name": "TestBuildRoutingKeyV2_WithTaxBehaviorAndTaxCode", + "signature": "func TestBuildRoutingKeyV2_WithTaxBehaviorAndTaxCode(t *testing.T)", + "line": 545 + } + ], + "line_count": 554 + }, + "openmeter/ledger/routing_validator.go": { + "header": "type RoutingValidator interface {\n\tValidateEntries(entries []EntryInput) error\n}", + "symbols": [ + { + "kind": "interface", + "name": "RoutingValidator", + "signature": "type RoutingValidator interface", + "line": 3 + } + ], + "line_count": 5 + }, + "openmeter/ledger/routingrules/defaults.go": { + "header": "var DefaultValidator = Validator{\n\tRules: []RoutingRule{\n\t\tRequireUniqueSubAccountsRule{},", + "symbols": [], + "line_count": 107 + }, + "openmeter/ledger/routingrules/routingrules.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "RoutingRule", + "signature": "type RoutingRule interface", + "line": 10 + }, + { + "kind": "struct", + "name": "Validator", + "signature": "type Validator struct", + "line": 14 + }, + { + "kind": "func", + "name": "ValidateEntries", + "signature": "func (v Validator) ValidateEntries(entries []ledger.EntryInput) error", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FuncRule) Validate(tx TxView) error", + "line": 37 + }, + { + "kind": "struct", + "name": "RequireUniqueSubAccountsRule", + "signature": "type RequireUniqueSubAccountsRule struct", + "line": 41 + }, + { + "kind": "struct", + "name": "entryIdentityKey", + "signature": "type entryIdentityKey struct", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireUniqueSubAccountsRule) Validate(tx TxView) error", + "line": 48 + }, + { + "kind": "struct", + "name": "AllowedAccountSetsRule", + "signature": "type AllowedAccountSetsRule struct", + "line": 71 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r AllowedAccountSetsRule) Validate(tx TxView) error", + "line": 75 + }, + { + "kind": "struct", + "name": "RequireFlowDirectionRule", + "signature": "type RequireFlowDirectionRule struct", + "line": 93 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireFlowDirectionRule) Validate(tx TxView) error", + "line": 98 + }, + { + "kind": "func", + "name": "hasMixedSigns", + "signature": "func hasMixedSigns(entries []EntryView) bool", + "line": 140 + }, + { + "kind": "func", + "name": "allEntriesPositive", + "signature": "func allEntriesPositive(entries []EntryView) bool", + "line": 155 + }, + { + "kind": "func", + "name": "allEntriesNegative", + "signature": "func allEntriesNegative(entries []EntryView) bool", + "line": 165 + }, + { + "kind": "struct", + "name": "RequireSameRouteRule", + "signature": "type RequireSameRouteRule struct", + "line": 187 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireSameRouteRule) Validate(tx TxView) error", + "line": 193 + }, + { + "kind": "struct", + "name": "RequireTaxDimensionScopeRule", + "signature": "type RequireTaxDimensionScopeRule struct", + "line": 201 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireTaxDimensionScopeRule) Validate(tx TxView) error", + "line": 203 + }, + { + "kind": "struct", + "name": "RequireFeatureDimensionScopeRule", + "signature": "type RequireFeatureDimensionScopeRule struct", + "line": 226 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireFeatureDimensionScopeRule) Validate(tx TxView) error", + "line": 228 + }, + { + "kind": "struct", + "name": "RequireAccountAuthorizationStatusRule", + "signature": "type RequireAccountAuthorizationStatusRule struct", + "line": 248 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireAccountAuthorizationStatusRule) Validate(tx TxView) error", + "line": 254 + }, + { + "kind": "func", + "name": "sameRouteField", + "signature": "func sameRouteField(left ledger.Route, right ledger.Route, field RouteField) (bool, error)", + "line": 262 + }, + { + "kind": "struct", + "name": "RequireReceivableAuthorizationStageRule", + "signature": "type RequireReceivableAuthorizationStageRule struct", + "line": 283 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireReceivableAuthorizationStageRule) Validate(tx TxView) error", + "line": 285 + }, + { + "kind": "struct", + "name": "RequireAccruedCostBasisTranslationRule", + "signature": "type RequireAccruedCostBasisTranslationRule struct", + "line": 342 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireAccruedCostBasisTranslationRule) Validate(tx TxView) error", + "line": 344 + }, + { + "kind": "struct", + "name": "RequireFBOCostBasisTranslationRule", + "signature": "type RequireFBOCostBasisTranslationRule struct", + "line": 370 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RequireFBOCostBasisTranslationRule) Validate(tx TxView) error", + "line": 372 + }, + { + "kind": "func", + "name": "entriesBySign", + "signature": "func entriesBySign(entries []EntryView) ([]EntryView, []EntryView)", + "line": 398 + }, + { + "kind": "func", + "name": "requireAuthorizationStatus", + "signature": "func requireAuthorizationStatus(entries []EntryView, accountType ledger.AccountType, expected ledger.TransactionAuthorizationStatus) error", + "line": 414 + }, + { + "kind": "func", + "name": "allEntriesHaveAuthorizationStatus", + "signature": "func allEntriesHaveAuthorizationStatus(entries []EntryView, expected ledger.TransactionAuthorizationStatus) bool", + "line": 428 + }, + { + "kind": "func", + "name": "requireKnownToUnknownCostBasisTranslation", + "signature": "func requireKnownToUnknownCostBasisTranslation(knownEntries, unknownEntries []EntryView, accountType ledger.AccountType, fields []RouteField) error", + "line": 438 + }, + { + "kind": "func", + "name": "requireKnownToUnknownCostBasisTranslationEitherDirection", + "signature": "func requireKnownToUnknownCostBasisTranslationEitherDirection(leftEntries, rightEntries []EntryView, accountType ledger.AccountType, fields []RouteField) error", + "line": 460 + }, + { + "kind": "func", + "name": "requireMatchingRouteFields", + "signature": "func requireMatchingRouteFields(leftEntries, rightEntries []EntryView, leftType, rightType ledger.AccountType, fields []RouteField) error", + "line": 468 + }, + { + "kind": "func", + "name": "hasMatchingRouteFields", + "signature": "func hasMatchingRouteFields(entry EntryView, candidates []EntryView, fields []RouteField) (bool, error)", + "line": 502 + }, + { + "kind": "func", + "name": "sameAccountTypeSet", + "signature": "func sameAccountTypeSet(left []ledger.AccountType, right []ledger.AccountType) bool", + "line": 523 + } + ], + "line_count": 540 + }, + "openmeter/ledger/routingrules/routingrules_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestDefaultValidator_AllowsFBOToAccrued", + "signature": "func TestDefaultValidator_AllowsFBOToAccrued(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsAccruedToFBO", + "signature": "func TestDefaultValidator_AllowsAccruedToFBO(t *testing.T)", + "line": 39 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsFBOToReceivableReverse", + "signature": "func TestDefaultValidator_AllowsFBOToReceivableReverse(t *testing.T)", + "line": 60 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsForbiddenAccountCombination", + "signature": "func TestDefaultValidator_RejectsForbiddenAccountCombination(t *testing.T)", + "line": 83 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsDuplicateSubAccountEntries", + "signature": "func TestDefaultValidator_RejectsDuplicateSubAccountEntries(t *testing.T)", + "line": 105 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsDuplicateSubAccountEntriesWithUniqueIdentities", + "signature": "func TestDefaultValidator_AllowsDuplicateSubAccountEntriesWithUniqueIdentities(t *testing.T)", + "line": 132 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsTaxBehaviorOutsideAccruedOrEarnings", + "signature": "func TestDefaultValidator_RejectsTaxBehaviorOutsideAccruedOrEarnings(t *testing.T)", + "line": 164 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsTaxCodeOnFBO", + "signature": "func TestDefaultValidator_RejectsTaxCodeOnFBO(t *testing.T)", + "line": 182 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsMismatchedReceivableAndFBORoute", + "signature": "func TestDefaultValidator_RejectsMismatchedReceivableAndFBORoute(t *testing.T)", + "line": 200 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsFBOCostBasisTranslationBothDirections", + "signature": "func TestDefaultValidator_AllowsFBOCostBasisTranslationBothDirections(t *testing.T)", + "line": 222 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsFBOCostBasisTranslationWithMismatchedPriority", + "signature": "func TestDefaultValidator_RejectsFBOCostBasisTranslationWithMismatchedPriority(t *testing.T)", + "line": 268 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsFBOCostBasisTranslationWithMismatchedTaxBehavior", + "signature": "func TestDefaultValidator_RejectsFBOCostBasisTranslationWithMismatchedTaxBehavior(t *testing.T)", + "line": 296 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsReceivableCostBasisAttributionAcrossFeatures", + "signature": "func TestDefaultValidator_AllowsReceivableCostBasisAttributionAcrossFeatures(t *testing.T)", + "line": 327 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsReceivableAuthorizationTransition", + "signature": "func TestDefaultValidator_AllowsReceivableAuthorizationTransition(t *testing.T)", + "line": 354 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsReceivableAuthorizationTransitionWithWrongDirection", + "signature": "func TestDefaultValidator_RejectsReceivableAuthorizationTransitionWithWrongDirection(t *testing.T)", + "line": 379 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsWashToAuthorizedReceivable", + "signature": "func TestDefaultValidator_AllowsWashToAuthorizedReceivable(t *testing.T)", + "line": 405 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsFBOToTaxedAccrued", + "signature": "func TestDefaultValidator_AllowsFBOToTaxedAccrued(t *testing.T)", + "line": 428 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsTaxCodeOnReceivable", + "signature": "func TestDefaultValidator_RejectsTaxCodeOnReceivable(t *testing.T)", + "line": 453 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsFeaturesOnAccrued", + "signature": "func TestDefaultValidator_RejectsFeaturesOnAccrued(t *testing.T)", + "line": 482 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsAccruedToEarningsTaxCodeMismatch", + "signature": "func TestDefaultValidator_RejectsAccruedToEarningsTaxCodeMismatch(t *testing.T)", + "line": 499 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsAccruedToEarningsTaxBehaviorMismatch", + "signature": "func TestDefaultValidator_RejectsAccruedToEarningsTaxBehaviorMismatch(t *testing.T)", + "line": 528 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsReceivableToAccruedMatchingTaxCode", + "signature": "func TestDefaultValidator_AllowsReceivableToAccruedMatchingTaxCode(t *testing.T)", + "line": 556 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsAccruedToEarningsMatchingTaxCode", + "signature": "func TestDefaultValidator_AllowsAccruedToEarningsMatchingTaxCode(t *testing.T)", + "line": 583 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsAccruedToEarningsTaxCodeWithoutTaxBehavior", + "signature": "func TestDefaultValidator_AllowsAccruedToEarningsTaxCodeWithoutTaxBehavior(t *testing.T)", + "line": 610 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsTaxBehaviorWithoutTaxCode", + "signature": "func TestDefaultValidator_RejectsTaxBehaviorWithoutTaxCode(t *testing.T)", + "line": 634 + }, + { + "kind": "func", + "name": "TestDefaultValidator_AllowsAccruedToEarningsNilTaxCodeBothSides", + "signature": "func TestDefaultValidator_AllowsAccruedToEarningsNilTaxCodeBothSides(t *testing.T)", + "line": 659 + }, + { + "kind": "func", + "name": "TestDefaultValidator_RejectsWashToOpenReceivable", + "signature": "func TestDefaultValidator_RejectsWashToOpenReceivable(t *testing.T)", + "line": 680 + }, + { + "kind": "func", + "name": "addressForRoute", + "signature": "func addressForRoute(t *testing.T, accountType ledger.AccountType, subAccountID string, route ledger.Route) ledger.PostingAddress", + "line": 704 + } + ], + "line_count": 720 + }, + "openmeter/ledger/routingrules/view.go": { + "header": "\t\"slices\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "struct", + "name": "EntryView", + "signature": "type EntryView struct", + "line": 11 + }, + { + "kind": "func", + "name": "newEntryView", + "signature": "func newEntryView(entry ledger.EntryInput) (EntryView, error)", + "line": 17 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (e EntryView) Amount() alpacadecimal.Decimal", + "line": 25 + }, + { + "kind": "func", + "name": "AccountType", + "signature": "func (e EntryView) AccountType() ledger.AccountType", + "line": 29 + }, + { + "kind": "func", + "name": "Route", + "signature": "func (e EntryView) Route() ledger.Route", + "line": 33 + }, + { + "kind": "func", + "name": "Entry", + "signature": "func (e EntryView) Entry() ledger.EntryInput", + "line": 37 + }, + { + "kind": "struct", + "name": "TxView", + "signature": "type TxView struct", + "line": 41 + }, + { + "kind": "func", + "name": "NewTxView", + "signature": "func NewTxView(entries []ledger.EntryInput) (TxView, error)", + "line": 45 + }, + { + "kind": "func", + "name": "Entries", + "signature": "func (t TxView) Entries() []EntryView", + "line": 61 + }, + { + "kind": "func", + "name": "EntriesOf", + "signature": "func (t TxView) EntriesOf(accountType ledger.AccountType) []EntryView", + "line": 65 + }, + { + "kind": "func", + "name": "HasAccountType", + "signature": "func (t TxView) HasAccountType(accountType ledger.AccountType) bool", + "line": 76 + }, + { + "kind": "func", + "name": "HasAccountTypes", + "signature": "func (t TxView) HasAccountTypes(accountTypes ...ledger.AccountType) bool", + "line": 86 + }, + { + "kind": "func", + "name": "AccountTypes", + "signature": "func (t TxView) AccountTypes() []ledger.AccountType", + "line": 96 + }, + { + "kind": "func", + "name": "optionalStringEqual", + "signature": "func optionalStringEqual(left *string, right *string) bool", + "line": 115 + }, + { + "kind": "func", + "name": "optionalIntEqual", + "signature": "func optionalIntEqual(left *int, right *int) bool", + "line": 123 + }, + { + "kind": "func", + "name": "optionalTransactionAuthorizationStatusEqual", + "signature": "func optionalTransactionAuthorizationStatusEqual(left *ledger.TransactionAuthorizationStatus, right *ledger.TransactionAuthorizationStatus) bool", + "line": 131 + }, + { + "kind": "func", + "name": "optionalTaxBehaviorEqual", + "signature": "func optionalTaxBehaviorEqual(left *ledger.TaxBehavior, right *ledger.TaxBehavior) bool", + "line": 139 + }, + { + "kind": "func", + "name": "optionalDecimalEqual", + "signature": "func optionalDecimalEqual(left *alpacadecimal.Decimal, right *alpacadecimal.Decimal) bool", + "line": 147 + }, + { + "kind": "func", + "name": "stringSliceEqual", + "signature": "func stringSliceEqual(left []string, right []string) bool", + "line": 155 + } + ], + "line_count": 157 + }, + "openmeter/ledger/testutils/deps.go": { + "header": "\t\"log/slog\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\tledgeraccount \"github.com/openmeterio/openmeter/openmeter/ledger/account\"", + "symbols": [ + { + "kind": "struct", + "name": "Deps", + "signature": "type Deps struct", + "line": 18 + }, + { + "kind": "func", + "name": "InitDeps", + "signature": "func InitDeps(db *entdb.Client, logger *slog.Logger) (Deps, error)", + "line": 24 + } + ], + "line_count": 48 + }, + "openmeter/ledger/testutils/integration.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "IntegrationEnv", + "signature": "type IntegrationEnv struct", + "line": 21 + }, + { + "kind": "func", + "name": "NewIntegrationEnv", + "signature": "func NewIntegrationEnv(t *testing.T, namespacePrefix string) *IntegrationEnv", + "line": 31 + }, + { + "kind": "func", + "name": "Now", + "signature": "func (e *IntegrationEnv) Now() time.Time", + "line": 92 + }, + { + "kind": "func", + "name": "FBOSubAccount", + "signature": "func (e *IntegrationEnv) FBOSubAccount(t *testing.T, priority int) ledger.SubAccount", + "line": 96 + }, + { + "kind": "func", + "name": "ReceivableSubAccount", + "signature": "func (e *IntegrationEnv) ReceivableSubAccount(t *testing.T) ledger.SubAccount", + "line": 108 + }, + { + "kind": "func", + "name": "ReceivableSubAccountWithStatus", + "signature": "func (e *IntegrationEnv) ReceivableSubAccountWithStatus(t *testing.T, status ledger.TransactionAuthorizationStatus) ledger.SubAccount", + "line": 114 + }, + { + "kind": "func", + "name": "ReceivableSubAccountWithCostBasis", + "signature": "func (e *IntegrationEnv) ReceivableSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 120 + }, + { + "kind": "func", + "name": "ReceivableSubAccountWithCostBasisAndStatus", + "signature": "func (e *IntegrationEnv) ReceivableSubAccountWithCostBasisAndStatus(t *testing.T, costBasis *alpacadecimal.Decimal, status ledger.TransactionAuthorizationStatus) ledger.SubAccount", + "line": 126 + }, + { + "kind": "func", + "name": "AccruedSubAccount", + "signature": "func (e *IntegrationEnv) AccruedSubAccount(t *testing.T) ledger.SubAccount", + "line": 139 + }, + { + "kind": "func", + "name": "AccruedSubAccountWithCostBasis", + "signature": "func (e *IntegrationEnv) AccruedSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 145 + }, + { + "kind": "func", + "name": "AccruedSubAccountWithCostBasisAndTaxCode", + "signature": "func (e *IntegrationEnv) AccruedSubAccountWithCostBasisAndTaxCode(t *testing.T, costBasis *alpacadecimal.Decimal, taxCode *string) ledger.SubAccount", + "line": 151 + }, + { + "kind": "func", + "name": "WashSubAccount", + "signature": "func (e *IntegrationEnv) WashSubAccount(t *testing.T) ledger.SubAccount", + "line": 164 + }, + { + "kind": "func", + "name": "WashSubAccountWithCostBasis", + "signature": "func (e *IntegrationEnv) WashSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 170 + }, + { + "kind": "func", + "name": "EarningsSubAccount", + "signature": "func (e *IntegrationEnv) EarningsSubAccount(t *testing.T) ledger.SubAccount", + "line": 182 + }, + { + "kind": "func", + "name": "EarningsSubAccountWithCostBasis", + "signature": "func (e *IntegrationEnv) EarningsSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 188 + }, + { + "kind": "func", + "name": "BrokerageSubAccount", + "signature": "func (e *IntegrationEnv) BrokerageSubAccount(t *testing.T) ledger.SubAccount", + "line": 200 + }, + { + "kind": "func", + "name": "BreakageSubAccountWithCostBasis", + "signature": "func (e *IntegrationEnv) BreakageSubAccountWithCostBasis(t *testing.T, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 211 + }, + { + "kind": "func", + "name": "SumBalance", + "signature": "func (e *IntegrationEnv) SumBalance(t *testing.T, subAccount ledger.SubAccount) alpacadecimal.Decimal", + "line": 223 + } + ], + "line_count": 230 + }, + "openmeter/ledger/transactions/accrual.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TransferCustomerFBOToAccruedTemplate", + "signature": "type TransferCustomerFBOToAccruedTemplate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) typeGuard() guard", + "line": 63 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) code() TransactionTemplateCode", + "line": 67 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 73 + }, + { + "kind": "func", + "name": "routePairingKey", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) routePairingKey(address ledger.PostingAddress) routePairingKey", + "line": 108 + }, + { + "kind": "func", + "name": "compareFBOAccrualCorrectionSourceEntries", + "signature": "func compareFBOAccrualCorrectionSourceEntries(left ledger.Entry, right ledger.Entry) int", + "line": 117 + }, + { + "kind": "func", + "name": "fboCorrectionPriority", + "signature": "func fboCorrectionPriority(address ledger.PostingAddress) int", + "line": 137 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 146 + }, + { + "kind": "func", + "name": "resolveAccruedSubAccByRoutePairingKey", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) resolveAccruedSubAccByRoutePairingKey(\n\tctx context.Context,\n\taccruedAccount ledger.CustomerAccruedAccount,\n\tsources []PostingAmount,\n) (map[routePairingKey]PostingAmount, error)", + "line": 170 + }, + { + "kind": "func", + "name": "buildRoutePreservingAccrualEntries", + "signature": "func (t TransferCustomerFBOToAccruedTemplate) buildRoutePreservingAccrualEntries(\n\tsources []PostingAmount,\n\taccruedSubAccByKey map[routePairingKey]PostingAmount,\n) []*EntryInput", + "line": 200 + }, + { + "kind": "func", + "name": "costBasisKey", + "signature": "func costBasisKey(costBasis *alpacadecimal.Decimal) string", + "line": 233 + }, + { + "kind": "struct", + "name": "TransferCustomerFBOAdvanceToAccruedTemplate", + "signature": "type TransferCustomerFBOAdvanceToAccruedTemplate struct", + "line": 243 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TransferCustomerFBOAdvanceToAccruedTemplate) Validate() error", + "line": 254 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t TransferCustomerFBOAdvanceToAccruedTemplate) typeGuard() guard", + "line": 288 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t TransferCustomerFBOAdvanceToAccruedTemplate) code() TransactionTemplateCode", + "line": 292 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t TransferCustomerFBOAdvanceToAccruedTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 298 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t TransferCustomerFBOAdvanceToAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 340 + }, + { + "kind": "struct", + "name": "TransferCustomerReceivableToAccruedTemplate", + "signature": "type TransferCustomerReceivableToAccruedTemplate struct", + "line": 385 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TransferCustomerReceivableToAccruedTemplate) Validate() error", + "line": 394 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t TransferCustomerReceivableToAccruedTemplate) typeGuard() guard", + "line": 424 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t TransferCustomerReceivableToAccruedTemplate) code() TransactionTemplateCode", + "line": 428 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t TransferCustomerReceivableToAccruedTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 434 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t TransferCustomerReceivableToAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 438 + }, + { + "kind": "struct", + "name": "TranslateCustomerAccruedCostBasisTemplate", + "signature": "type TranslateCustomerAccruedCostBasisTemplate struct", + "line": 480 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TranslateCustomerAccruedCostBasisTemplate) Validate() error", + "line": 490 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t TranslateCustomerAccruedCostBasisTemplate) typeGuard() guard", + "line": 530 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t TranslateCustomerAccruedCostBasisTemplate) code() TransactionTemplateCode", + "line": 534 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t TranslateCustomerAccruedCostBasisTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 540 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t TranslateCustomerAccruedCostBasisTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 584 + } + ], + "line_count": 623 + }, + "openmeter/ledger/transactions/accrual_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestTransferCustomerFBOToAccruedTemplate", + "signature": "func TestTransferCustomerFBOToAccruedTemplate(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOToAccruedTemplate_PreservesCostBasisAcrossBuckets", + "signature": "func TestTransferCustomerFBOToAccruedTemplate_PreservesCostBasisAcrossBuckets(t *testing.T)", + "line": 42 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOToAccruedCorrection_UsesReverseCollectionPriority", + "signature": "func TestTransferCustomerFBOToAccruedCorrection_UsesReverseCollectionPriority(t *testing.T)", + "line": 77 + }, + { + "kind": "func", + "name": "TestTransferCustomerReceivableToAccruedTemplate", + "signature": "func TestTransferCustomerReceivableToAccruedTemplate(t *testing.T)", + "line": 118 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOAdvanceToAccruedTemplate_UnknownCostBasisAdvanceNetEffect", + "signature": "func TestTransferCustomerFBOAdvanceToAccruedTemplate_UnknownCostBasisAdvanceNetEffect(t *testing.T)", + "line": 137 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOAdvanceToAccruedTemplate_AppliesTaxBehaviorToAccrued", + "signature": "func TestTransferCustomerFBOAdvanceToAccruedTemplate_AppliesTaxBehaviorToAccrued(t *testing.T)", + "line": 160 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOToAccruedTemplate_AppliesTaxConfigToAccrued", + "signature": "func TestTransferCustomerFBOToAccruedTemplate_AppliesTaxConfigToAccrued(t *testing.T)", + "line": 194 + }, + { + "kind": "func", + "name": "TestTransferCustomerFBOToAccruedTemplate_NilTaxConfigUsesNilAccruedRoute", + "signature": "func TestTransferCustomerFBOToAccruedTemplate_NilTaxConfigUsesNilAccruedRoute(t *testing.T)", + "line": 234 + }, + { + "kind": "func", + "name": "TestTranslateCustomerAccruedCostBasisTemplate", + "signature": "func TestTranslateCustomerAccruedCostBasisTemplate(t *testing.T)", + "line": 258 + } + ], + "line_count": 290 + }, + "openmeter/ledger/transactions/breakage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "breakageTemplateBase", + "signature": "type breakageTemplateBase struct", + "line": 14 + }, + { + "kind": "func", + "name": "validate", + "signature": "func (t breakageTemplateBase) validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t breakageTemplateBase) resolve(fboAmount, breakageAmount alpacadecimal.Decimal) ledger.TransactionInput", + "line": 53 + }, + { + "kind": "struct", + "name": "PlanCustomerFBOBreakageTemplate", + "signature": "type PlanCustomerFBOBreakageTemplate struct", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t PlanCustomerFBOBreakageTemplate) Validate() error", + "line": 76 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t PlanCustomerFBOBreakageTemplate) typeGuard() guard", + "line": 80 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t PlanCustomerFBOBreakageTemplate) code() TransactionTemplateCode", + "line": 84 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t PlanCustomerFBOBreakageTemplate) resolve(context.Context, customer.CustomerID, ResolverDependencies) (ledger.TransactionInput, error)", + "line": 90 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t PlanCustomerFBOBreakageTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 94 + }, + { + "kind": "func", + "name": "base", + "signature": "func (t PlanCustomerFBOBreakageTemplate) base() breakageTemplateBase", + "line": 98 + }, + { + "kind": "struct", + "name": "ReleaseCustomerFBOBreakageTemplate", + "signature": "type ReleaseCustomerFBOBreakageTemplate struct", + "line": 102 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) Validate() error", + "line": 109 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) typeGuard() guard", + "line": 113 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) code() TransactionTemplateCode", + "line": 117 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) resolve(context.Context, customer.CustomerID, ResolverDependencies) (ledger.TransactionInput, error)", + "line": 123 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 127 + }, + { + "kind": "func", + "name": "base", + "signature": "func (t ReleaseCustomerFBOBreakageTemplate) base() breakageTemplateBase", + "line": 131 + }, + { + "kind": "struct", + "name": "ReopenCustomerFBOBreakageTemplate", + "signature": "type ReopenCustomerFBOBreakageTemplate struct", + "line": 135 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) Validate() error", + "line": 142 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) typeGuard() guard", + "line": 146 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) code() TransactionTemplateCode", + "line": 150 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) resolve(context.Context, customer.CustomerID, ResolverDependencies) (ledger.TransactionInput, error)", + "line": 156 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 160 + }, + { + "kind": "func", + "name": "base", + "signature": "func (t ReopenCustomerFBOBreakageTemplate) base() breakageTemplateBase", + "line": 164 + } + ], + "line_count": 166 + }, + "openmeter/ledger/transactions/codes.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)", + "symbols": [ + { + "kind": "func", + "name": "templateCode", + "signature": "func templateCode(template TransactionTemplate) (TransactionTemplateCode, error)", + "line": 83 + }, + { + "kind": "func", + "name": "transactionTemplateByCode", + "signature": "func transactionTemplateByCode(code string) (TransactionTemplate, error)", + "line": 92 + }, + { + "kind": "func", + "name": "transactionTemplateByLegacyName", + "signature": "func transactionTemplateByLegacyName(name string) (TransactionTemplate, error)", + "line": 101 + }, + { + "kind": "func", + "name": "TemplateCode", + "signature": "func TemplateCode(template TransactionTemplate) string", + "line": 110 + }, + { + "kind": "func", + "name": "annotateTemplateTransaction", + "signature": "func annotateTemplateTransaction(input ledger.TransactionInput, template TransactionTemplate, direction ledger.TransactionDirection) (ledger.TransactionInput, error)", + "line": 119 + }, + { + "kind": "func", + "name": "appendResolvedTemplateTransaction", + "signature": "func appendResolvedTemplateTransaction(\n\tinputs []ledger.TransactionInput,\n\tinput ledger.TransactionInput,\n\ttemplate TransactionTemplate,\n\tdirection ledger.TransactionDirection,\n) ([]ledger.TransactionInput, error)", + "line": 128 + } + ], + "line_count": 144 + }, + "openmeter/ledger/transactions/collection.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sort\"", + "symbols": [ + { + "kind": "struct", + "name": "subAccountBalance", + "signature": "type subAccountBalance struct", + "line": 16 + }, + { + "kind": "struct", + "name": "subAccountAmount", + "signature": "type subAccountAmount struct", + "line": 21 + }, + { + "kind": "struct", + "name": "PostingAmount", + "signature": "type PostingAmount struct", + "line": 27 + }, + { + "kind": "interface", + "name": "accountIdentifier", + "signature": "type accountIdentifier interface", + "line": 34 + }, + { + "kind": "func", + "name": "collectFromAttributableCustomerAccrued", + "signature": "func collectFromAttributableCustomerAccrued(\n\tctx context.Context,\n\tcustomerID customer.CustomerID,\n\tcurrency currencyx.Code,\n\ttarget alpacadecimal.Decimal,\n\tdeps ResolverDependencies,\n) ([]subAccountAmount, error)", + "line": 38 + }, + { + "kind": "func", + "name": "collectFromBalanceSources", + "signature": "func collectFromBalanceSources(sources []subAccountBalance, target alpacadecimal.Decimal) []subAccountAmount", + "line": 93 + }, + { + "kind": "func", + "name": "decimalPointersEqual", + "signature": "func decimalPointersEqual(left, right *alpacadecimal.Decimal) bool", + "line": 121 + }, + { + "kind": "func", + "name": "settledBalanceForSubAccount", + "signature": "func settledBalanceForSubAccount(ctx context.Context, deps ResolverDependencies, subAccount ledger.SubAccount) (alpacadecimal.Decimal, error)", + "line": 132 + } + ], + "line_count": 139 + }, + "openmeter/ledger/transactions/correction.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CorrectionInput", + "signature": "type CorrectionInput struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CorrectionScope) Validate() error", + "line": 26 + }, + { + "kind": "func", + "name": "CorrectTransaction", + "signature": "func CorrectTransaction(\n\t_ context.Context,\n\tdeps ResolverDependencies,\n\tscope CorrectionScope,\n) ([]ledger.TransactionInput, error)", + "line": 42 + }, + { + "kind": "func", + "name": "transactionTemplateFromAnnotations", + "signature": "func transactionTemplateFromAnnotations(annotations models.Annotations) (TransactionTemplate, error)", + "line": 83 + }, + { + "kind": "func", + "name": "transactionTemplateNameFromAnnotations", + "signature": "func transactionTemplateNameFromAnnotations(annotations models.Annotations) (string, error)", + "line": 101 + }, + { + "kind": "func", + "name": "correctTemplate", + "signature": "func correctTemplate(scope CorrectionScope, template TransactionTemplate) ([]ledger.TransactionInput, error)", + "line": 115 + }, + { + "kind": "func", + "name": "templateCorrectionNotImplemented", + "signature": "func templateCorrectionNotImplemented(template string) error", + "line": 126 + } + ], + "line_count": 128 + }, + "openmeter/ledger/transactions/correction_leg.go": { + "header": "\t\"cmp\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "routePairingKey", + "signature": "type routePairingKey struct", + "line": 15 + }, + { + "kind": "func", + "name": "String", + "signature": "func (k routePairingKey) String() string", + "line": 22 + }, + { + "kind": "struct", + "name": "correctionLeg", + "signature": "type correctionLeg struct", + "line": 26 + }, + { + "kind": "struct", + "name": "correctionPosting", + "signature": "type correctionPosting struct", + "line": 33 + }, + { + "kind": "func", + "name": "allocateCorrectionLegs", + "signature": "func allocateCorrectionLegs(\n\tsourceEntries []ledger.Entry,\n\tcounterpartEntries []ledger.Entry,\n\tkeyForAddress func(ledger.PostingAddress) routePairingKey,\n\tsourceAmount func(ledger.Entry) alpacadecimal.Decimal,\n\tamount alpacadecimal.Decimal,\n) ([]correctionPosting, error)", + "line": 39 + }, + { + "kind": "func", + "name": "compareSubAccountID", + "signature": "func compareSubAccountID(left ledger.Entry, right ledger.Entry) int", + "line": 128 + }, + { + "kind": "func", + "name": "mapCorrectionPostingsToEntryInputs", + "signature": "func mapCorrectionPostingsToEntryInputs(postings []correctionPosting) []*EntryInput", + "line": 132 + } + ], + "line_count": 143 + }, + "openmeter/ledger/transactions/correction_leg_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestRoutePairingKeyEquality", + "signature": "func TestRoutePairingKeyEquality(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestRoutePairingKeyString", + "signature": "func TestRoutePairingKeyString(t *testing.T)", + "line": 42 + } + ], + "line_count": 58 + }, + "openmeter/ledger/transactions/correction_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "correctionTestTransaction", + "signature": "type correctionTestTransaction struct", + "line": 14 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func (t *correctionTestTransaction) BookedAt() time.Time", + "line": 22 + }, + { + "kind": "func", + "name": "Entries", + "signature": "func (t *correctionTestTransaction) Entries() []ledger.Entry", + "line": 26 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (t *correctionTestTransaction) ID() models.NamespacedID", + "line": 30 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t *correctionTestTransaction) Annotations() models.Annotations", + "line": 34 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (t *correctionTestTransaction) Cursor() ledger.TransactionCursor", + "line": 38 + }, + { + "kind": "func", + "name": "TestCorrectTransactionRejectsCorrectionDirection", + "signature": "func TestCorrectTransactionRejectsCorrectionDirection(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "TestCorrectTransactionDispatchesTemplateStub", + "signature": "func TestCorrectTransactionDispatchesTemplateStub(t *testing.T)", + "line": 64 + }, + { + "kind": "func", + "name": "TestCorrectTransactionDispatchesArchivedReceivablePaymentTemplates", + "signature": "func TestCorrectTransactionDispatchesArchivedReceivablePaymentTemplates(t *testing.T)", + "line": 82 + }, + { + "kind": "func", + "name": "TestCorrectTransactionDispatchesLegacyTemplateNames", + "signature": "func TestCorrectTransactionDispatchesLegacyTemplateNames(t *testing.T)", + "line": 123 + }, + { + "kind": "func", + "name": "TestCorrectTransactionDoesNotFallbackToLegacyTemplateNameWhenCodeExists", + "signature": "func TestCorrectTransactionDoesNotFallbackToLegacyTemplateNameWhenCodeExists(t *testing.T)", + "line": 141 + } + ], + "line_count": 158 + }, + "openmeter/ledger/transactions/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "IssueCustomerReceivableTemplate", + "signature": "type IssueCustomerReceivableTemplate struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t IssueCustomerReceivableTemplate) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t IssueCustomerReceivableTemplate) typeGuard() guard", + "line": 59 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t IssueCustomerReceivableTemplate) code() TransactionTemplateCode", + "line": 63 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t IssueCustomerReceivableTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 69 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t IssueCustomerReceivableTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 111 + }, + { + "kind": "struct", + "name": "SettleCustomerReceivableFromPaymentTemplate", + "signature": "type SettleCustomerReceivableFromPaymentTemplate struct", + "line": 156 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t SettleCustomerReceivableFromPaymentTemplate) Validate() error", + "line": 165 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t SettleCustomerReceivableFromPaymentTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 189 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t SettleCustomerReceivableFromPaymentTemplate) typeGuard() guard", + "line": 193 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t SettleCustomerReceivableFromPaymentTemplate) code() TransactionTemplateCode", + "line": 197 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t SettleCustomerReceivableFromPaymentTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 201 + }, + { + "kind": "struct", + "name": "AuthorizeCustomerReceivablePaymentTemplate", + "signature": "type AuthorizeCustomerReceivablePaymentTemplate struct", + "line": 247 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t AuthorizeCustomerReceivablePaymentTemplate) Validate() error", + "line": 256 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t AuthorizeCustomerReceivablePaymentTemplate) typeGuard() guard", + "line": 278 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t AuthorizeCustomerReceivablePaymentTemplate) code() TransactionTemplateCode", + "line": 282 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t AuthorizeCustomerReceivablePaymentTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 288 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t AuthorizeCustomerReceivablePaymentTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 292 + }, + { + "kind": "struct", + "name": "AttributeCustomerAdvanceReceivableCostBasisTemplate", + "signature": "type AttributeCustomerAdvanceReceivableCostBasisTemplate struct", + "line": 335 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t AttributeCustomerAdvanceReceivableCostBasisTemplate) Validate() error", + "line": 345 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t AttributeCustomerAdvanceReceivableCostBasisTemplate) typeGuard() guard", + "line": 369 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t AttributeCustomerAdvanceReceivableCostBasisTemplate) code() TransactionTemplateCode", + "line": 373 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t AttributeCustomerAdvanceReceivableCostBasisTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 379 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t AttributeCustomerAdvanceReceivableCostBasisTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 423 + }, + { + "kind": "struct", + "name": "CoverCustomerReceivableTemplate", + "signature": "type CoverCustomerReceivableTemplate struct", + "line": 465 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t CoverCustomerReceivableTemplate) Validate() error", + "line": 474 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t CoverCustomerReceivableTemplate) typeGuard() guard", + "line": 502 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t CoverCustomerReceivableTemplate) code() TransactionTemplateCode", + "line": 506 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t CoverCustomerReceivableTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 512 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t CoverCustomerReceivableTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 516 + } + ], + "line_count": 555 + }, + "openmeter/ledger/transactions/customer_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestIssueCustomerReceivableTemplate", + "signature": "func TestIssueCustomerReceivableTemplate(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestIssueCustomerReceivableTemplate_DefaultPriority", + "signature": "func TestIssueCustomerReceivableTemplate_DefaultPriority(t *testing.T)", + "line": 31 + }, + { + "kind": "func", + "name": "TestAuthorizeCustomerReceivablePaymentTemplate", + "signature": "func TestAuthorizeCustomerReceivablePaymentTemplate(t *testing.T)", + "line": 48 + }, + { + "kind": "func", + "name": "TestCoverCustomerReceivableTemplate", + "signature": "func TestCoverCustomerReceivableTemplate(t *testing.T)", + "line": 76 + }, + { + "kind": "func", + "name": "TestSettleCustomerReceivableFromPaymentTemplate", + "signature": "func TestSettleCustomerReceivableFromPaymentTemplate(t *testing.T)", + "line": 105 + }, + { + "kind": "func", + "name": "TestAttributeCustomerAdvanceReceivableCostBasisTemplate", + "signature": "func TestAttributeCustomerAdvanceReceivableCostBasisTemplate(t *testing.T)", + "line": 137 + } + ], + "line_count": 163 + }, + "openmeter/ledger/transactions/earnings.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "RecognizeEarningsFromAttributableAccruedTemplate", + "signature": "type RecognizeEarningsFromAttributableAccruedTemplate struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) Validate() error", + "line": 25 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) typeGuard() guard", + "line": 41 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) code() TransactionTemplateCode", + "line": 45 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) correct(scope CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 51 + }, + { + "kind": "func", + "name": "routePairingKey", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) routePairingKey(address ledger.PostingAddress) routePairingKey", + "line": 91 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 102 + }, + { + "kind": "func", + "name": "resolveEarningsSubAccByRoutePairingKey", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) resolveEarningsSubAccByRoutePairingKey(\n\tctx context.Context,\n\tearningsAccount ledger.BusinessAccount,\n\tcollections []subAccountAmount,\n) (map[routePairingKey]subAccountAmount, error)", + "line": 127 + }, + { + "kind": "func", + "name": "buildRoutePreservingEarningsEntries", + "signature": "func (t RecognizeEarningsFromAttributableAccruedTemplate) buildRoutePreservingEarningsEntries(\n\tcollections []subAccountAmount,\n\tearningsSubAccByKey map[routePairingKey]subAccountAmount,\n) []*EntryInput", + "line": 159 + } + ], + "line_count": 189 + }, + "openmeter/ledger/transactions/earnings_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestRecognizeEarningsFromAttributableAccruedTemplate", + "signature": "func TestRecognizeEarningsFromAttributableAccruedTemplate(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestRecognizeEarningsFromAttributableAccruedTemplate_IgnoresUnknownCostBasis", + "signature": "func TestRecognizeEarningsFromAttributableAccruedTemplate_IgnoresUnknownCostBasis(t *testing.T)", + "line": 40 + }, + { + "kind": "func", + "name": "TestRecognizeEarningsCorrection_FullReversal", + "signature": "func TestRecognizeEarningsCorrection_FullReversal(t *testing.T)", + "line": 79 + }, + { + "kind": "func", + "name": "TestRecognizeEarningsCorrection_PartialReversal", + "signature": "func TestRecognizeEarningsCorrection_PartialReversal(t *testing.T)", + "line": 116 + }, + { + "kind": "func", + "name": "TestRecognizeEarningsCorrection_OverCorrectionError", + "signature": "func TestRecognizeEarningsCorrection_OverCorrectionError(t *testing.T)", + "line": 149 + }, + { + "kind": "func", + "name": "TestRecognizeEarningsCorrection_MultipleCostBases", + "signature": "func TestRecognizeEarningsCorrection_MultipleCostBases(t *testing.T)", + "line": 177 + }, + { + "kind": "func", + "name": "findForwardTransaction", + "signature": "func findForwardTransaction(t *testing.T, group ledger.TransactionGroup, template TransactionTemplate) ledger.Transaction", + "line": 222 + } + ], + "line_count": 244 + }, + "openmeter/ledger/transactions/entry_identity.go": { + "header": "func NewCollectionSourceIdentityKey(index int) string {\n\treturn fmt.Sprintf(\"collection-source:%d\", index)\n}", + "symbols": [ + { + "kind": "func", + "name": "NewCollectionSourceIdentityKey", + "signature": "func NewCollectionSourceIdentityKey(index int) string", + "line": 5 + }, + { + "kind": "func", + "name": "NewCorrectionSourceIdentityKey", + "signature": "func NewCorrectionSourceIdentityKey(sourceEntryID string) string", + "line": 9 + } + ], + "line_count": 11 + }, + "openmeter/ledger/transactions/fx.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ConvertCurrencyTemplate", + "signature": "type ConvertCurrencyTemplate struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ConvertCurrencyTemplate) Validate() error", + "line": 26 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t ConvertCurrencyTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 58 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t ConvertCurrencyTemplate) typeGuard() guard", + "line": 62 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t ConvertCurrencyTemplate) code() TransactionTemplateCode", + "line": 66 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t ConvertCurrencyTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 70 + } + ], + "line_count": 146 + }, + "openmeter/ledger/transactions/input.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "EntryInput", + "signature": "type EntryInput struct", + "line": 13 + }, + { + "kind": "func", + "name": "PostingAddress", + "signature": "func (e *EntryInput) PostingAddress() ledger.PostingAddress", + "line": 26 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (e *EntryInput) Amount() alpacadecimal.Decimal", + "line": 30 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func (e *EntryInput) IdentityKey() string", + "line": 34 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (e *EntryInput) Annotations() models.Annotations", + "line": 38 + }, + { + "kind": "struct", + "name": "TransactionInput", + "signature": "type TransactionInput struct", + "line": 42 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func (t *TransactionInput) BookedAt() time.Time", + "line": 54 + }, + { + "kind": "func", + "name": "EntryInputs", + "signature": "func (t *TransactionInput) EntryInputs() []ledger.EntryInput", + "line": 58 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t *TransactionInput) Annotations() models.Annotations", + "line": 64 + }, + { + "kind": "func", + "name": "AsGroupInput", + "signature": "func (t *TransactionInput) AsGroupInput(namespace string, annotations models.Annotations) ledger.TransactionGroupInput", + "line": 68 + }, + { + "kind": "func", + "name": "GroupInputs", + "signature": "func GroupInputs(namespace string, annotations models.Annotations, inputs ...ledger.TransactionInput) ledger.TransactionGroupInput", + "line": 76 + }, + { + "kind": "func", + "name": "WithAnnotations", + "signature": "func WithAnnotations(input ledger.TransactionInput, annotations models.Annotations) ledger.TransactionInput", + "line": 84 + }, + { + "kind": "struct", + "name": "annotatedTransactionInput", + "signature": "type annotatedTransactionInput struct", + "line": 101 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (a *annotatedTransactionInput) Annotations() models.Annotations", + "line": 108 + }, + { + "kind": "struct", + "name": "TransactionGroupInput", + "signature": "type TransactionGroupInput struct", + "line": 112 + }, + { + "kind": "func", + "name": "Transactions", + "signature": "func (t *TransactionGroupInput) Transactions() []ledger.TransactionInput", + "line": 124 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (t *TransactionGroupInput) Annotations() models.Annotations", + "line": 128 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func (t *TransactionGroupInput) Namespace() string", + "line": 132 + } + ], + "line_count": 134 + }, + "openmeter/ledger/transactions/legacy.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "legacyFundCustomerReceivableTemplate", + "signature": "type legacyFundCustomerReceivableTemplate struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t legacyFundCustomerReceivableTemplate) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t legacyFundCustomerReceivableTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 51 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t legacyFundCustomerReceivableTemplate) typeGuard() guard", + "line": 55 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t legacyFundCustomerReceivableTemplate) code() TransactionTemplateCode", + "line": 59 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t legacyFundCustomerReceivableTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 63 + }, + { + "kind": "struct", + "name": "legacySettleCustomerReceivablePaymentTemplate", + "signature": "type legacySettleCustomerReceivablePaymentTemplate struct", + "line": 112 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t legacySettleCustomerReceivablePaymentTemplate) Validate() error", + "line": 119 + }, + { + "kind": "func", + "name": "typeGuard", + "signature": "func (t legacySettleCustomerReceivablePaymentTemplate) typeGuard() guard", + "line": 141 + }, + { + "kind": "func", + "name": "code", + "signature": "func (t legacySettleCustomerReceivablePaymentTemplate) code() TransactionTemplateCode", + "line": 145 + }, + { + "kind": "func", + "name": "correct", + "signature": "func (t legacySettleCustomerReceivablePaymentTemplate) correct(CorrectionInput) ([]ledger.TransactionInput, error)", + "line": 151 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (t legacySettleCustomerReceivablePaymentTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error)", + "line": 155 + } + ], + "line_count": 192 + }, + "openmeter/ledger/transactions/priority.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/ledger\"\n)\nfunc resolveCustomerFBOCreditPriority(configured *int) int {", + "symbols": [ + { + "kind": "func", + "name": "resolveCustomerFBOCreditPriority", + "signature": "func resolveCustomerFBOCreditPriority(configured *int) int", + "line": 7 + } + ], + "line_count": 12 + }, + "openmeter/ledger/transactions/resolve.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "ResolverDependencies", + "signature": "type ResolverDependencies struct", + "line": 13 + }, + { + "kind": "struct", + "name": "ResolutionScope", + "signature": "type ResolutionScope struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ResolutionScope) Validate() error", + "line": 25 + }, + { + "kind": "func", + "name": "validateForCustomerTransaction", + "signature": "func (s ResolutionScope) validateForCustomerTransaction() error", + "line": 37 + }, + { + "kind": "func", + "name": "validateForOrgTransaction", + "signature": "func (s ResolutionScope) validateForOrgTransaction() error", + "line": 53 + }, + { + "kind": "func", + "name": "ResolveTransactions", + "signature": "func ResolveTransactions(\n\tctx context.Context,\n\tdeps ResolverDependencies,\n\tscope ResolutionScope,\n\ttemplates ...TransactionTemplate,\n) ([]ledger.TransactionInput, error)", + "line": 64 + } + ], + "line_count": 118 + }, + "openmeter/ledger/transactions/resolve_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "struct", + "name": "spyCustomerTemplate", + "signature": "type spyCustomerTemplate struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *spyCustomerTemplate) Validate() error", + "line": 18 + }, + { + "kind": "func", + "name": "TestResolveTransactions_callsResolverValidate", + "signature": "func TestResolveTransactions_callsResolverValidate(t *testing.T)", + "line": 41 + }, + { + "kind": "func", + "name": "TestResolveTransactions_addsTemplateAnnotations", + "signature": "func TestResolveTransactions_addsTemplateAnnotations(t *testing.T)", + "line": 60 + } + ], + "line_count": 67 + }, + "openmeter/ledger/transactions/template.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/ledger\"", + "symbols": [ + { + "kind": "interface", + "name": "CustomerTransactionTemplate", + "signature": "type CustomerTransactionTemplate interface", + "line": 20 + }, + { + "kind": "interface", + "name": "OrgTransactionTemplate", + "signature": "type OrgTransactionTemplate interface", + "line": 29 + } + ], + "line_count": 35 + }, + "openmeter/ledger/transactions/testenv_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "struct", + "name": "transactionsTestEnv", + "signature": "type transactionsTestEnv struct", + "line": 13 + }, + { + "kind": "func", + "name": "newTransactionsTestEnv", + "signature": "func newTransactionsTestEnv(t *testing.T) *transactionsTestEnv", + "line": 17 + }, + { + "kind": "func", + "name": "resolverDeps", + "signature": "func (e *transactionsTestEnv) resolverDeps() ResolverDependencies", + "line": 23 + }, + { + "kind": "func", + "name": "resolve", + "signature": "func (e *transactionsTestEnv) resolve(t *testing.T, templates ...TransactionTemplate) []ledger.TransactionInput", + "line": 31 + }, + { + "kind": "func", + "name": "commit", + "signature": "func (e *transactionsTestEnv) commit(t *testing.T, inputs ...ledger.TransactionInput)", + "line": 48 + }, + { + "kind": "func", + "name": "resolveAndCommit", + "signature": "func (e *transactionsTestEnv) resolveAndCommit(t *testing.T, templates ...TransactionTemplate) []ledger.TransactionInput", + "line": 55 + }, + { + "kind": "func", + "name": "fundPriority", + "signature": "func (e *transactionsTestEnv) fundPriority(t *testing.T, priority int, amount int64) ledger.SubAccount", + "line": 63 + }, + { + "kind": "func", + "name": "fundPriorityWithCostBasis", + "signature": "func (e *transactionsTestEnv) fundPriorityWithCostBasis(t *testing.T, priority int, amount int64, costBasis *alpacadecimal.Decimal) ledger.SubAccount", + "line": 69 + } + ], + "line_count": 103 + }, + "openmeter/ledger/transactions/testutils/anytransaction.go": { + "header": "\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "AnyEntryInput", + "signature": "type AnyEntryInput struct", + "line": 13 + }, + { + "kind": "func", + "name": "PostingAddress", + "signature": "func (a *AnyEntryInput) PostingAddress() ledger.PostingAddress", + "line": 22 + }, + { + "kind": "func", + "name": "Amount", + "signature": "func (a *AnyEntryInput) Amount() alpacadecimal.Decimal", + "line": 26 + }, + { + "kind": "func", + "name": "IdentityKey", + "signature": "func (a *AnyEntryInput) IdentityKey() string", + "line": 30 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (a *AnyEntryInput) Annotations() models.Annotations", + "line": 34 + }, + { + "kind": "struct", + "name": "AnyTransactionInput", + "signature": "type AnyTransactionInput struct", + "line": 38 + }, + { + "kind": "func", + "name": "BookedAt", + "signature": "func (a *AnyTransactionInput) BookedAt() time.Time", + "line": 46 + }, + { + "kind": "func", + "name": "EntryInputs", + "signature": "func (a *AnyTransactionInput) EntryInputs() []ledger.EntryInput", + "line": 50 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (a *AnyTransactionInput) Annotations() models.Annotations", + "line": 56 + }, + { + "kind": "func", + "name": "AsGroupInput", + "signature": "func (a *AnyTransactionInput) AsGroupInput(namespace string, annotations models.Annotations) ledger.TransactionGroupInput", + "line": 60 + }, + { + "kind": "struct", + "name": "AnyTransactionGroupInput", + "signature": "type AnyTransactionGroupInput struct", + "line": 64 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func (a *AnyTransactionGroupInput) Namespace() string", + "line": 72 + }, + { + "kind": "func", + "name": "Transactions", + "signature": "func (a *AnyTransactionGroupInput) Transactions() []ledger.TransactionInput", + "line": 76 + }, + { + "kind": "func", + "name": "Annotations", + "signature": "func (a *AnyTransactionGroupInput) Annotations() models.Annotations", + "line": 82 + } + ], + "line_count": 84 + }, + "openmeter/ledger/validations.go": { + "header": "\t\"context\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateInvariance", + "signature": "func ValidateInvariance(ctx context.Context, entries []EntryInput) error", + "line": 13 + }, + { + "kind": "func", + "name": "ValidateRouting", + "signature": "func ValidateRouting(ctx context.Context, entries []EntryInput) error", + "line": 29 + }, + { + "kind": "func", + "name": "ValidateEntryInput", + "signature": "func ValidateEntryInput(ctx context.Context, entry EntryInput) error", + "line": 34 + }, + { + "kind": "func", + "name": "ValidateAddress", + "signature": "func ValidateAddress(ctx context.Context, address PostingAddress) error", + "line": 56 + }, + { + "kind": "func", + "name": "validateEntryAmountPrecision", + "signature": "func validateEntryAmountPrecision(entry EntryInput) error", + "line": 66 + }, + { + "kind": "func", + "name": "ValidateTransactionInput", + "signature": "func ValidateTransactionInput(ctx context.Context, transaction TransactionInput) error", + "line": 89 + }, + { + "kind": "func", + "name": "ValidateTransactionInputWith", + "signature": "func ValidateTransactionInputWith(ctx context.Context, transaction TransactionInput, routingValidator RoutingValidator) error", + "line": 93 + } + ], + "line_count": 119 + }, + "openmeter/ledger/validations_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateTransactionInputEntryAmountPrecision", + "signature": "func TestValidateTransactionInputEntryAmountPrecision(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "mustPostingAddress", + "signature": "func mustPostingAddress(t *testing.T, currency currencyx.Code) ledger.PostingAddress", + "line": 94 + }, + { + "kind": "func", + "name": "mustDecimal", + "signature": "func mustDecimal(t *testing.T, raw string) alpacadecimal.Decimal", + "line": 113 + } + ], + "line_count": 120 + }, + "openmeter/llmcost/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 11 + } + ], + "line_count": 26 + }, + "openmeter/llmcost/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (llmcost.Adapter, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 55 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 72 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/llmcost/adapter/mapping.go": { + "header": "\t\"errors\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "mapPriceFromEntity", + "signature": "func mapPriceFromEntity(entity *db.LLMCostPrice) (llmcost.Price, error)", + "line": 14 + }, + { + "kind": "func", + "name": "decimalOrZero", + "signature": "func decimalOrZero(d *alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 59 + } + ], + "line_count": 65 + }, + "openmeter/llmcost/adapter/price.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ListPrices", + "signature": "func (a *adapter) ListPrices(ctx context.Context, input llmcost.ListPricesInput) (pagination.Result[llmcost.Price], error)", + "line": 21 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (a *adapter) GetPrice(ctx context.Context, input llmcost.GetPriceInput) (llmcost.Price, error)", + "line": 69 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (a *adapter) ResolvePrice(ctx context.Context, input llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 93 + }, + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (a *adapter) CreateOverride(ctx context.Context, input llmcost.CreateOverrideInput) (llmcost.Price, error)", + "line": 141 + }, + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (a *adapter) DeleteOverride(ctx context.Context, input llmcost.DeleteOverrideInput) error", + "line": 188 + }, + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (a *adapter) ListOverrides(ctx context.Context, input llmcost.ListOverridesInput) (pagination.Result[llmcost.Price], error)", + "line": 222 + }, + { + "kind": "func", + "name": "UpsertGlobalPrice", + "signature": "func (a *adapter) UpsertGlobalPrice(ctx context.Context, price llmcost.Price) error", + "line": 253 + } + ], + "line_count": 308 + }, + "openmeter/llmcost/errors.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "func", + "name": "NewPriceNotFoundError", + "signature": "func NewPriceNotFoundError(provider, modelID string) error", + "line": 11 + }, + { + "kind": "func", + "name": "NewPriceOverrideNotFoundError", + "signature": "func NewPriceOverrideNotFoundError(id string) error", + "line": 17 + } + ], + "line_count": 91 + }, + "openmeter/llmcost/llmcost.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (s PriceSource) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "ModelPricing", + "signature": "type ModelPricing struct", + "line": 36 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ModelPricing) Validate() error", + "line": 53 + }, + { + "kind": "struct", + "name": "Price", + "signature": "type Price struct", + "line": 68 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Price) Validate() error", + "line": 109 + }, + { + "kind": "struct", + "name": "SourcePrice", + "signature": "type SourcePrice struct", + "line": 136 + }, + { + "kind": "struct", + "name": "SourcePriceData", + "signature": "type SourcePriceData struct", + "line": 146 + } + ], + "line_count": 152 + }, + "openmeter/llmcost/llmcost_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestPriceSourceValidate", + "signature": "func TestPriceSourceValidate(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestModelPricingValidate", + "signature": "func TestModelPricingValidate(t *testing.T)", + "line": 27 + }, + { + "kind": "func", + "name": "TestPriceValidate", + "signature": "func TestPriceValidate(t *testing.T)", + "line": 58 + }, + { + "kind": "func", + "name": "TestInputValidation", + "signature": "func TestInputValidation(t *testing.T)", + "line": 134 + } + ], + "line_count": 192 + }, + "openmeter/llmcost/normalize.go": { + "header": "\t\"regexp\"\n\t\"strings\"\n)", + "symbols": [ + { + "kind": "func", + "name": "NormalizeModelID", + "signature": "func NormalizeModelID(provider string, modelID string) (canonicalProvider string, canonicalModelID string)", + "line": 34 + }, + { + "kind": "func", + "name": "NormalizeProvider", + "signature": "func NormalizeProvider(provider string) string", + "line": 64 + } + ], + "line_count": 106 + }, + "openmeter/llmcost/normalize_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestNormalizeModelIDProviderNames", + "signature": "func TestNormalizeModelIDProviderNames(t *testing.T)", + "line": 9 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDCaseAndWhitespace", + "signature": "func TestNormalizeModelIDCaseAndWhitespace(t *testing.T)", + "line": 53 + }, + { + "kind": "func", + "name": "TestNormalizeProviderCaseAndWhitespace", + "signature": "func TestNormalizeProviderCaseAndWhitespace(t *testing.T)", + "line": 71 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDVersionSuffix", + "signature": "func TestNormalizeModelIDVersionSuffix(t *testing.T)", + "line": 90 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDBedrockVersionSuffix", + "signature": "func TestNormalizeModelIDBedrockVersionSuffix(t *testing.T)", + "line": 112 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDBedrockRegionPrefix", + "signature": "func TestNormalizeModelIDBedrockRegionPrefix(t *testing.T)", + "line": 135 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDDotVersion", + "signature": "func TestNormalizeModelIDDotVersion(t *testing.T)", + "line": 156 + }, + { + "kind": "func", + "name": "TestNormalizeModelIDAliases", + "signature": "func TestNormalizeModelIDAliases(t *testing.T)", + "line": 179 + } + ], + "line_count": 198 + }, + "openmeter/llmcost/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 17 + }, + { + "kind": "struct", + "name": "ListPricesInput", + "signature": "type ListPricesInput struct", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListPricesInput) Validate() error", + "line": 80 + }, + { + "kind": "struct", + "name": "GetPriceInput", + "signature": "type GetPriceInput struct", + "line": 131 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetPriceInput) Validate() error", + "line": 140 + }, + { + "kind": "struct", + "name": "ResolvePriceInput", + "signature": "type ResolvePriceInput struct", + "line": 149 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ResolvePriceInput) Validate() error", + "line": 156 + }, + { + "kind": "struct", + "name": "CreateOverrideInput", + "signature": "type CreateOverrideInput struct", + "line": 175 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateOverrideInput) Validate() error", + "line": 186 + }, + { + "kind": "struct", + "name": "DeleteOverrideInput", + "signature": "type DeleteOverrideInput struct", + "line": 213 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteOverrideInput) Validate() error", + "line": 218 + }, + { + "kind": "struct", + "name": "ListOverridesInput", + "signature": "type ListOverridesInput struct", + "line": 233 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListOverridesInput) Validate() error", + "line": 243 + } + ], + "line_count": 281 + }, + "openmeter/llmcost/service/service.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/llmcost\"", + "symbols": [ + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service", + "line": 19 + }, + { + "kind": "func", + "name": "ListPrices", + "signature": "func (s *service) ListPrices(ctx context.Context, input llmcost.ListPricesInput) (pagination.Result[llmcost.Price], error)", + "line": 26 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (s *service) GetPrice(ctx context.Context, input llmcost.GetPriceInput) (llmcost.Price, error)", + "line": 81 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (s *service) ResolvePrice(ctx context.Context, input llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 116 + }, + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (s *service) CreateOverride(ctx context.Context, input llmcost.CreateOverrideInput) (llmcost.Price, error)", + "line": 120 + }, + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (s *service) DeleteOverride(ctx context.Context, input llmcost.DeleteOverrideInput) error", + "line": 126 + }, + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (s *service) ListOverrides(ctx context.Context, input llmcost.ListOverridesInput) (pagination.Result[llmcost.Price], error)", + "line": 132 + }, + { + "kind": "func", + "name": "sourceFilterExcludesManual", + "signature": "func sourceFilterExcludesManual(source *filter.FilterString) bool", + "line": 141 + } + ], + "line_count": 157 + }, + "openmeter/llmcost/service/service_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "noopDriver", + "signature": "type noopDriver struct", + "line": 21 + }, + { + "kind": "struct", + "name": "mockAdapter", + "signature": "type mockAdapter struct", + "line": 28 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (m *mockAdapter) Tx(_ context.Context) (context.Context, transaction.Driver, error)", + "line": 33 + }, + { + "kind": "func", + "name": "ListPrices", + "signature": "func (m *mockAdapter) ListPrices(_ context.Context, _ llmcost.ListPricesInput) (pagination.Result[llmcost.Price], error)", + "line": 37 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (m *mockAdapter) GetPrice(_ context.Context, _ llmcost.GetPriceInput) (llmcost.Price, error)", + "line": 44 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (m *mockAdapter) ResolvePrice(_ context.Context, _ llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 48 + }, + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (m *mockAdapter) CreateOverride(_ context.Context, _ llmcost.CreateOverrideInput) (llmcost.Price, error)", + "line": 52 + }, + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (m *mockAdapter) DeleteOverride(_ context.Context, _ llmcost.DeleteOverrideInput) error", + "line": 56 + }, + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (m *mockAdapter) ListOverrides(_ context.Context, _ llmcost.ListOverridesInput) (pagination.Result[llmcost.Price], error)", + "line": 60 + }, + { + "kind": "func", + "name": "UpsertGlobalPrice", + "signature": "func (m *mockAdapter) UpsertGlobalPrice(_ context.Context, _ llmcost.Price) error", + "line": 67 + }, + { + "kind": "func", + "name": "makeTestPrice", + "signature": "func makeTestPrice(provider string, modelID string, source llmcost.PriceSource) llmcost.Price", + "line": 71 + }, + { + "kind": "func", + "name": "makeTestOverride", + "signature": "func makeTestOverride(provider string, modelID string, ns string) llmcost.Price", + "line": 87 + }, + { + "kind": "func", + "name": "TestListPrices_SourceFilterOverlay", + "signature": "func TestListPrices_SourceFilterOverlay(t *testing.T)", + "line": 96 + }, + { + "kind": "func", + "name": "TestSourceFilterExcludesManual", + "signature": "func TestSourceFilterExcludesManual(t *testing.T)", + "line": 214 + } + ], + "line_count": 248 + }, + "openmeter/llmcost/sync/fetcher.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/llmcost\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Fetcher", + "signature": "type Fetcher interface", + "line": 10 + } + ], + "line_count": 16 + }, + "openmeter/llmcost/sync/fetcher_modelsdev.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "modelsDevProvider", + "signature": "type modelsDevProvider struct", + "line": 20 + }, + { + "kind": "struct", + "name": "modelsDevModel", + "signature": "type modelsDevModel struct", + "line": 27 + }, + { + "kind": "struct", + "name": "modelsDevCost", + "signature": "type modelsDevCost struct", + "line": 33 + }, + { + "kind": "struct", + "name": "modelsDevFetcher", + "signature": "type modelsDevFetcher struct", + "line": 41 + }, + { + "kind": "func", + "name": "NewModelsDevFetcher", + "signature": "func NewModelsDevFetcher(client *http.Client) Fetcher", + "line": 45 + }, + { + "kind": "func", + "name": "Source", + "signature": "func (f *modelsDevFetcher) Source() llmcost.PriceSource", + "line": 49 + }, + { + "kind": "func", + "name": "Fetch", + "signature": "func (f *modelsDevFetcher) Fetch(ctx context.Context) ([]llmcost.SourcePrice, error)", + "line": 53 + } + ], + "line_count": 139 + }, + "openmeter/llmcost/sync/normalizer.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/llmcost\"\n)\ntype ModelIDNormalizer interface {", + "symbols": [ + { + "kind": "interface", + "name": "ModelIDNormalizer", + "signature": "type ModelIDNormalizer interface", + "line": 10 + }, + { + "kind": "struct", + "name": "defaultNormalizer", + "signature": "type defaultNormalizer struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewDefaultNormalizer", + "signature": "func NewDefaultNormalizer() ModelIDNormalizer", + "line": 16 + }, + { + "kind": "func", + "name": "Normalize", + "signature": "func (n *defaultNormalizer) Normalize(modelID string, provider string) (string, string)", + "line": 20 + } + ], + "line_count": 22 + }, + "openmeter/llmcost/sync/normalizer_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestNormalizerProviderNames", + "signature": "func TestNormalizerProviderNames(t *testing.T)", + "line": 9 + }, + { + "kind": "func", + "name": "TestNormalizerCaseAndWhitespace", + "signature": "func TestNormalizerCaseAndWhitespace(t *testing.T)", + "line": 53 + }, + { + "kind": "func", + "name": "TestNormalizerVersionSuffix", + "signature": "func TestNormalizerVersionSuffix(t *testing.T)", + "line": 73 + } + ], + "line_count": 94 + }, + "openmeter/llmcost/sync/reconciler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Reconciler", + "signature": "type Reconciler struct", + "line": 26 + }, + { + "kind": "func", + "name": "NewReconciler", + "signature": "func NewReconciler(repo llmcost.Adapter, logger *slog.Logger, minAgreement int, priceTolerance float64) *Reconciler", + "line": 33 + }, + { + "kind": "struct", + "name": "providerModelKey", + "signature": "type providerModelKey struct", + "line": 51 + }, + { + "kind": "func", + "name": "Reconcile", + "signature": "func (r *Reconciler) Reconcile(ctx context.Context, prices []llmcost.SourcePrice) error", + "line": 58 + }, + { + "kind": "func", + "name": "findAgreement", + "signature": "func (r *Reconciler) findAgreement(prices []llmcost.SourcePrice) []llmcost.SourcePrice", + "line": 141 + }, + { + "kind": "func", + "name": "pricesAgree", + "signature": "func pricesAgree(a, b llmcost.ModelPricing, tolerance alpacadecimal.Decimal) bool", + "line": 167 + }, + { + "kind": "func", + "name": "optionalDecimalsAgree", + "signature": "func optionalDecimalsAgree(a, b *alpacadecimal.Decimal, tolerance alpacadecimal.Decimal) bool", + "line": 177 + }, + { + "kind": "func", + "name": "decimalsAgree", + "signature": "func decimalsAgree(a, b, tolerance alpacadecimal.Decimal) bool", + "line": 188 + }, + { + "kind": "func", + "name": "averagePrices", + "signature": "func averagePrices(prices []llmcost.SourcePrice) (llmcost.SourcePrice, error)", + "line": 210 + }, + { + "kind": "func", + "name": "averageOptionalDecimal", + "signature": "func averageOptionalDecimal(prices []llmcost.SourcePrice, count alpacadecimal.Decimal, getter func(llmcost.SourcePrice) *alpacadecimal.Decimal) *alpacadecimal.Decimal", + "line": 236 + } + ], + "line_count": 250 + }, + "openmeter/llmcost/sync/reconciler_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "mockAdapter", + "signature": "type mockAdapter struct", + "line": 21 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (m *mockAdapter) Tx(_ context.Context) (context.Context, transaction.Driver, error)", + "line": 26 + }, + { + "kind": "func", + "name": "UpsertGlobalPrice", + "signature": "func (m *mockAdapter) UpsertGlobalPrice(_ context.Context, price llmcost.Price) error", + "line": 30 + }, + { + "kind": "func", + "name": "ListPrices", + "signature": "func (m *mockAdapter) ListPrices(context.Context, llmcost.ListPricesInput) (pagination.Result[llmcost.Price], error)", + "line": 38 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (m *mockAdapter) GetPrice(context.Context, llmcost.GetPriceInput) (llmcost.Price, error)", + "line": 42 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (m *mockAdapter) ResolvePrice(context.Context, llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 46 + }, + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (m *mockAdapter) CreateOverride(context.Context, llmcost.CreateOverrideInput) (llmcost.Price, error)", + "line": 50 + }, + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (m *mockAdapter) DeleteOverride(context.Context, llmcost.DeleteOverrideInput) error", + "line": 54 + }, + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (m *mockAdapter) ListOverrides(context.Context, llmcost.ListOverridesInput) (pagination.Result[llmcost.Price], error)", + "line": 58 + }, + { + "kind": "func", + "name": "makePrice", + "signature": "func makePrice(source string, provider string, modelID string, input, output float64) llmcost.SourcePrice", + "line": 62 + }, + { + "kind": "func", + "name": "makePriceWithOptional", + "signature": "func makePriceWithOptional(source, provider, modelID string, input, output float64, cacheRead, cacheWrite, reasoning *float64) llmcost.SourcePrice", + "line": 75 + }, + { + "kind": "func", + "name": "fp", + "signature": "func fp(v float64) *float64", + "line": 89 + }, + { + "kind": "func", + "name": "TestReconcileAgreement", + "signature": "func TestReconcileAgreement(t *testing.T)", + "line": 91 + }, + { + "kind": "func", + "name": "TestReconcilerDefaults", + "signature": "func TestReconcilerDefaults(t *testing.T)", + "line": 201 + }, + { + "kind": "func", + "name": "TestDecimalsAgree", + "signature": "func TestDecimalsAgree(t *testing.T)", + "line": 221 + }, + { + "kind": "func", + "name": "TestPricesAgree", + "signature": "func TestPricesAgree(t *testing.T)", + "line": 267 + }, + { + "kind": "func", + "name": "TestAveragePrices", + "signature": "func TestAveragePrices(t *testing.T)", + "line": 367 + }, + { + "kind": "func", + "name": "TestOptionalDecimalsAgree", + "signature": "func TestOptionalDecimalsAgree(t *testing.T)", + "line": 450 + }, + { + "kind": "func", + "name": "TestReconcileUpsertError", + "signature": "func TestReconcileUpsertError(t *testing.T)", + "line": 486 + }, + { + "kind": "func", + "name": "TestReconcileWithOptionalFields", + "signature": "func TestReconcileWithOptionalFields(t *testing.T)", + "line": 531 + }, + { + "kind": "struct", + "name": "failOnceMockAdapter", + "signature": "type failOnceMockAdapter struct", + "line": 586 + }, + { + "kind": "func", + "name": "UpsertGlobalPrice", + "signature": "func (m *failOnceMockAdapter) UpsertGlobalPrice(_ context.Context, price llmcost.Price) error", + "line": 591 + } + ], + "line_count": 598 + }, + "openmeter/llmcost/sync/sync.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "SyncJob", + "signature": "type SyncJob struct", + "line": 18 + }, + { + "kind": "struct", + "name": "SyncJobConfig", + "signature": "type SyncJobConfig struct", + "line": 27 + }, + { + "kind": "func", + "name": "DefaultFetchers", + "signature": "func DefaultFetchers(client *http.Client) []Fetcher", + "line": 50 + }, + { + "kind": "func", + "name": "NewSyncJob", + "signature": "func NewSyncJob(config SyncJobConfig) *SyncJob", + "line": 61 + }, + { + "kind": "struct", + "name": "sourceModelKey", + "signature": "type sourceModelKey struct", + "line": 90 + }, + { + "kind": "func", + "name": "deduplicateSourcePrices", + "signature": "func deduplicateSourcePrices(prices []llmcost.SourcePrice) []llmcost.SourcePrice", + "line": 99 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (j *SyncJob) Run(ctx context.Context) error", + "line": 129 + } + ], + "line_count": 188 + }, + "openmeter/llmcost/sync/sync_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "mockFetcher", + "signature": "type mockFetcher struct", + "line": 17 + }, + { + "kind": "func", + "name": "Source", + "signature": "func (m *mockFetcher) Source() llmcost.PriceSource", + "line": 23 + }, + { + "kind": "func", + "name": "Fetch", + "signature": "func (m *mockFetcher) Fetch(_ context.Context) ([]llmcost.SourcePrice, error)", + "line": 27 + }, + { + "kind": "func", + "name": "TestSyncJobRun", + "signature": "func TestSyncJobRun(t *testing.T)", + "line": 31 + }, + { + "kind": "func", + "name": "TestDeduplicateSourcePrices", + "signature": "func TestDeduplicateSourcePrices(t *testing.T)", + "line": 260 + }, + { + "kind": "func", + "name": "TestSyncJobDeduplication", + "signature": "func TestSyncJobDeduplication(t *testing.T)", + "line": 361 + }, + { + "kind": "func", + "name": "TestSyncJobDefaultFetchers", + "signature": "func TestSyncJobDefaultFetchers(t *testing.T)", + "line": 424 + }, + { + "kind": "func", + "name": "TestSyncJobTolerancePassthrough", + "signature": "func TestSyncJobTolerancePassthrough(t *testing.T)", + "line": 436 + } + ], + "line_count": 521 + }, + "openmeter/meter/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Adapter, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "Adapter", + "signature": "type Adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *Adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 52 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *Adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *Adapter", + "line": 63 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *Adapter) Self() *Adapter", + "line": 72 + } + ], + "line_count": 74 + }, + "openmeter/meter/adapter/adapter_test.go": { + "header": "\t\"crypto/rand\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "func", + "name": "Test_Adapter", + "signature": "func Test_Adapter(t *testing.T)", + "line": 21 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 127 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 136 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 145 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 167 + }, + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 193 + } + ], + "line_count": 199 + }, + "openmeter/meter/adapter/manage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (a *Adapter) CreateMeter(ctx context.Context, input meterpkg.CreateMeterInput) (meterpkg.Meter, error)", + "line": 22 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (a *Adapter) UpdateMeter(ctx context.Context, input meterpkg.UpdateMeterInput) (meterpkg.Meter, error)", + "line": 64 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (a *Adapter) DeleteMeter(ctx context.Context, meter meterpkg.Meter) error", + "line": 98 + }, + { + "kind": "func", + "name": "HasActiveFeatureForMeter", + "signature": "func (a *Adapter) HasActiveFeatureForMeter(ctx context.Context, namespace, meterID string) (bool, error)", + "line": 125 + }, + { + "kind": "func", + "name": "HasEntitlementForMeter", + "signature": "func (a *Adapter) HasEntitlementForMeter(ctx context.Context, namespace, meterID string) (bool, error)", + "line": 145 + }, + { + "kind": "func", + "name": "ListFeaturesForMeter", + "signature": "func (a *Adapter) ListFeaturesForMeter(ctx context.Context, namespace, meterID string) ([]feature.Feature, error)", + "line": 167 + } + ], + "line_count": 194 + }, + "openmeter/meter/adapter/meter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "ListMeters", + "signature": "func (a *Adapter) ListMeters(ctx context.Context, params meter.ListMetersParams) (pagination.Result[meter.Meter], error)", + "line": 19 + }, + { + "kind": "func", + "name": "GetMeterByIDOrSlug", + "signature": "func (a *Adapter) GetMeterByIDOrSlug(ctx context.Context, input meter.GetMeterInput) (meter.Meter, error)", + "line": 89 + }, + { + "kind": "func", + "name": "MapFromEntityFactory", + "signature": "func MapFromEntityFactory(entity *db.Meter) (meter.Meter, error)", + "line": 118 + } + ], + "line_count": 146 + }, + "openmeter/meter/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewMeterNotFoundError", + "signature": "func NewMeterNotFoundError(meterIDOrSlug string) error", + "line": 11 + }, + { + "kind": "struct", + "name": "MeterNotFoundError", + "signature": "type MeterNotFoundError struct", + "line": 22 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *MeterNotFoundError) Error() string", + "line": 27 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *MeterNotFoundError) Unwrap() error", + "line": 32 + }, + { + "kind": "func", + "name": "IsMeterNotFoundError", + "signature": "func IsMeterNotFoundError(err error) bool", + "line": 37 + } + ], + "line_count": 45 + }, + "openmeter/meter/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "NewMeterCreateEvent", + "signature": "func NewMeterCreateEvent(ctx context.Context, meter *Meter) MeterCreateEvent", + "line": 21 + }, + { + "kind": "struct", + "name": "MeterCreateEvent", + "signature": "type MeterCreateEvent struct", + "line": 29 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e MeterCreateEvent) EventName() string", + "line": 34 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e MeterCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 42 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e MeterCreateEvent) Validate() error", + "line": 53 + }, + { + "kind": "func", + "name": "NewMeterUpdateEvent", + "signature": "func NewMeterUpdateEvent(ctx context.Context, meter *Meter) MeterUpdateEvent", + "line": 64 + }, + { + "kind": "struct", + "name": "MeterUpdateEvent", + "signature": "type MeterUpdateEvent struct", + "line": 72 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e MeterUpdateEvent) EventName() string", + "line": 77 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e MeterUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 85 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e MeterUpdateEvent) Validate() error", + "line": 96 + }, + { + "kind": "func", + "name": "NewMeterDeleteEvent", + "signature": "func NewMeterDeleteEvent(ctx context.Context, meter *Meter) MeterDeleteEvent", + "line": 107 + }, + { + "kind": "struct", + "name": "MeterDeleteEvent", + "signature": "type MeterDeleteEvent struct", + "line": 115 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e MeterDeleteEvent) EventName() string", + "line": 120 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e MeterDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 128 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e MeterDeleteEvent) Validate() error", + "line": 139 + } + ], + "line_count": 151 + }, + "openmeter/meter/httphandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 17 + }, + { + "kind": "interface", + "name": "MeterHandler", + "signature": "type MeterHandler interface", + "line": 21 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 37 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 46 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tcustomerService customer.Service,\n\tmeterService meter.ManageService,\n\tstreaming streaming.Connector,\n\tsubjectService subject.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 55 + } + ], + "line_count": 71 + }, + "openmeter/meter/httphandler/mapping.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ToAPIMeter", + "signature": "func ToAPIMeter(m meter.Meter) api.Meter", + "line": 23 + }, + { + "kind": "func", + "name": "ToAPIMeterQueryResult", + "signature": "func ToAPIMeterQueryResult(from *time.Time, to *time.Time, windowSize *api.WindowSize, rows []meter.MeterQueryRow) api.MeterQueryResult", + "line": 48 + }, + { + "kind": "func", + "name": "ToAPIMeterQueryRow", + "signature": "func ToAPIMeterQueryRow(row meter.MeterQueryRow) api.MeterQueryRow", + "line": 58 + }, + { + "kind": "func", + "name": "ToAPIMeterQueryRowList", + "signature": "func ToAPIMeterQueryRowList(rows []meter.MeterQueryRow) []api.MeterQueryRow", + "line": 72 + }, + { + "kind": "func", + "name": "ToRequestFromQueryParamsPOSTBody", + "signature": "func ToRequestFromQueryParamsPOSTBody(apiParams api.QueryMeterParams) api.QueryMeterPostJSONRequestBody", + "line": 83 + }, + { + "kind": "func", + "name": "toQueryParamsFromRequest", + "signature": "func (h *handler) toQueryParamsFromRequest(ctx context.Context, m meter.Meter, request api.QueryMeterPostJSONRequestBody) (streaming.QueryParams, error)", + "line": 110 + }, + { + "kind": "func", + "name": "getFilterCustomer", + "signature": "func (h *handler) getFilterCustomer(ctx context.Context, namespace string, filterCustomerIds []string) ([]customer.Customer, error)", + "line": 201 + } + ], + "line_count": 235 + }, + "openmeter/meter/httphandler/meter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListMetersRequest", + "signature": "type ListMetersRequest struct", + "line": 29 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (h *handler) ListMeters() ListMetersHandler", + "line": 38 + }, + { + "kind": "struct", + "name": "GetMeterRequest", + "signature": "type GetMeterRequest struct", + "line": 90 + }, + { + "kind": "func", + "name": "GetMeter", + "signature": "func (h *handler) GetMeter() GetMeterHandler", + "line": 96 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (h handler) CreateMeter() CreateMeterHandler", + "line": 138 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (h handler) UpdateMeter() UpdateMeterHandler", + "line": 204 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (h handler) DeleteMeter() DeleteMeterHandler", + "line": 274 + }, + { + "kind": "func", + "name": "validateJSONPaths", + "signature": "func validateJSONPaths(ctx context.Context, streaming streaming.Connector, valueProperty *string, groupBy *map[string]string) error", + "line": 320 + }, + { + "kind": "func", + "name": "validateValuePropertyJSONPath", + "signature": "func validateValuePropertyJSONPath(ctx context.Context, streaming streaming.Connector, valueProperty *string) error", + "line": 335 + }, + { + "kind": "func", + "name": "validateGroupByJSONPaths", + "signature": "func validateGroupByJSONPaths(ctx context.Context, streaming streaming.Connector, groupBy *map[string]string) error", + "line": 353 + } + ], + "line_count": 370 + }, + "openmeter/meter/httphandler/query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListSubjectsParams", + "signature": "type ListSubjectsParams struct", + "line": 23 + }, + { + "kind": "struct", + "name": "ListSubjectsRequest", + "signature": "type ListSubjectsRequest struct", + "line": 29 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (h *handler) ListSubjects() ListSubjectsHandler", + "line": 37 + }, + { + "kind": "struct", + "name": "QueryMeterParams", + "signature": "type QueryMeterParams struct", + "line": 86 + }, + { + "kind": "struct", + "name": "QueryMeterRequest", + "signature": "type QueryMeterRequest struct", + "line": 91 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (h *handler) QueryMeter() QueryMeterHandler", + "line": 98 + }, + { + "kind": "struct", + "name": "QueryMeterPostRequest", + "signature": "type QueryMeterPostRequest struct", + "line": 148 + }, + { + "kind": "func", + "name": "QueryMeterPost", + "signature": "func (h *handler) QueryMeterPost() QueryMeterPostHandler", + "line": 161 + }, + { + "kind": "struct", + "name": "ListGroupByValuesParams", + "signature": "type ListGroupByValuesParams struct", + "line": 216 + }, + { + "kind": "struct", + "name": "ListGroupByValuesRequest", + "signature": "type ListGroupByValuesRequest struct", + "line": 224 + }, + { + "kind": "func", + "name": "ListGroupByValues", + "signature": "func (h *handler) ListGroupByValues() ListGroupByValuesHandler", + "line": 234 + } + ], + "line_count": 285 + }, + "openmeter/meter/httphandler/query_csv.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "QueryMeterCSV", + "signature": "func (h *handler) QueryMeterCSV() QueryMeterCSVHandler", + "line": 36 + }, + { + "kind": "func", + "name": "QueryMeterPostCSV", + "signature": "func (h *handler) QueryMeterPostCSV() QueryMeterPostCSVHandler", + "line": 108 + }, + { + "kind": "func", + "name": "getSubjectsFromQueryResult", + "signature": "func getSubjectsFromQueryResult(rows []meter.MeterQueryRow) []string", + "line": 180 + }, + { + "kind": "func", + "name": "NewQueryMeterCSVResult", + "signature": "func NewQueryMeterCSVResult(meterSlug string, queryGroupBy []string, rows []meter.MeterQueryRow, subjectsByKey map[string]subject.Subject) QueryMeterCSVResponse", + "line": 197 + }, + { + "kind": "struct", + "name": "queryMeterCSVResult", + "signature": "type queryMeterCSVResult struct", + "line": 206 + }, + { + "kind": "func", + "name": "Records", + "signature": "func (a *queryMeterCSVResult) Records() [][]string", + "line": 214 + }, + { + "kind": "func", + "name": "FileName", + "signature": "func (a *queryMeterCSVResult) FileName() string", + "line": 287 + } + ], + "line_count": 289 + }, + "openmeter/meter/meter.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"regexp\"", + "symbols": [ + { + "kind": "func", + "name": "NewEventTypeValidator", + "signature": "func NewEventTypeValidator(reserved []*EventTypePattern) models.ValidatorFunc[string]", + "line": 17 + }, + { + "kind": "func", + "name": "AddTo", + "signature": "func (w WindowSize) AddTo(t time.Time) (time.Time, error)", + "line": 101 + }, + { + "kind": "func", + "name": "Truncate", + "signature": "func (w WindowSize) Truncate(t time.Time) (time.Time, error)", + "line": 118 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (f OrderBy) Values() []OrderBy", + "line": 146 + }, + { + "kind": "struct", + "name": "Meter", + "signature": "type Meter struct", + "line": 162 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (m Meter) ValidateWith(validators ...models.ValidatorFunc[Meter]) error", + "line": 175 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m Meter) Equal(m2 Meter) error", + "line": 179 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m Meter) Validate() error", + "line": 249 + }, + { + "kind": "func", + "name": "validateMeterAggregation", + "signature": "func validateMeterAggregation(valueProperty *string, aggregation MeterAggregation) error", + "line": 286 + }, + { + "kind": "func", + "name": "validateMeterGroupBy", + "signature": "func validateMeterGroupBy(valueProperty *string, groupBy map[string]string) error", + "line": 310 + }, + { + "kind": "struct", + "name": "MeterQueryRow", + "signature": "type MeterQueryRow struct", + "line": 336 + } + ], + "line_count": 343 + }, + "openmeter/meter/meter_test.go": { + "header": "\t\"fmt\"\n\t\"regexp\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestMeterValidation", + "signature": "func TestMeterValidation(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "Test_EventTypeFilter", + "signature": "func Test_EventTypeFilter(t *testing.T)", + "line": 341 + } + ], + "line_count": 387 + }, + "openmeter/meter/mockadapter/adapter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New(meters []meter.Meter) (*adapter, error)", + "line": 14 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 34 + }, + { + "kind": "func", + "name": "init", + "signature": "func (c *adapter) init()", + "line": 41 + }, + { + "kind": "func", + "name": "NewManage", + "signature": "func NewManage(meters []meter.Meter) (meter.ManageService, error)", + "line": 49 + }, + { + "kind": "struct", + "name": "manageAdapter", + "signature": "type manageAdapter struct", + "line": 63 + }, + { + "kind": "func", + "name": "SetDBClient", + "signature": "func (c *adapter) SetDBClient(client *entdb.Client) error", + "line": 72 + } + ], + "line_count": 86 + }, + "openmeter/meter/mockadapter/manage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "RegisterPreUpdateMeterHook", + "signature": "func (a manageAdapter) RegisterPreUpdateMeterHook(hook meterpkg.PreUpdateMeterHook) error", + "line": 15 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (a manageAdapter) CreateMeter(ctx context.Context, input meterpkg.CreateMeterInput) (meterpkg.Meter, error)", + "line": 22 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (a manageAdapter) UpdateMeter(ctx context.Context, input meterpkg.UpdateMeterInput) (meterpkg.Meter, error)", + "line": 51 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (a manageAdapter) DeleteMeter(ctx context.Context, input meterpkg.DeleteMeterInput) error", + "line": 98 + } + ], + "line_count": 111 + }, + "openmeter/meter/mockadapter/meter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ListMeters", + "signature": "func (c *adapter) ListMeters(_ context.Context, params meter.ListMetersParams) (pagination.Result[meter.Meter], error)", + "line": 16 + }, + { + "kind": "func", + "name": "GetMeterByIDOrSlug", + "signature": "func (c *adapter) GetMeterByIDOrSlug(_ context.Context, input meter.GetMeterInput) (meter.Meter, error)", + "line": 70 + }, + { + "kind": "func", + "name": "ReplaceMeters", + "signature": "func (c *adapter) ReplaceMeters(ctx context.Context, meters []meter.Meter) error", + "line": 89 + }, + { + "kind": "func", + "name": "getMeters", + "signature": "func (c *adapter) getMeters() []meter.Meter", + "line": 154 + } + ], + "line_count": 158 + }, + "openmeter/meter/parse.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ErrInvalidEvent", + "signature": "type ErrInvalidEvent struct", + "line": 18 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ErrInvalidEvent) Error() string", + "line": 22 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e ErrInvalidEvent) Unwrap() error", + "line": 31 + }, + { + "kind": "func", + "name": "NewErrInvalidEvent", + "signature": "func NewErrInvalidEvent(err error) error", + "line": 35 + }, + { + "kind": "struct", + "name": "ErrInvalidMeter", + "signature": "type ErrInvalidMeter struct", + "line": 41 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ErrInvalidMeter) Error() string", + "line": 45 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e ErrInvalidMeter) Unwrap() error", + "line": 54 + }, + { + "kind": "func", + "name": "NewErrInvalidMeter", + "signature": "func NewErrInvalidMeter(err error) error", + "line": 58 + }, + { + "kind": "struct", + "name": "ParsedEvent", + "signature": "type ParsedEvent struct", + "line": 62 + }, + { + "kind": "func", + "name": "ParseEventString", + "signature": "func ParseEventString(meter Meter, data string) (*ParsedEvent, error)", + "line": 68 + }, + { + "kind": "func", + "name": "ParseEvent", + "signature": "func ParseEvent(meter Meter, data []byte) (*ParsedEvent, error)", + "line": 73 + }, + { + "kind": "func", + "name": "validateFloat64", + "signature": "func validateFloat64(v float64) error", + "line": 165 + }, + { + "kind": "func", + "name": "parseGroupBy", + "signature": "func parseGroupBy(meter Meter, data interface{}) map[string]string", + "line": 180 + } + ], + "line_count": 198 + }, + "openmeter/meter/parse_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "TestParseEvent", + "signature": "func TestParseEvent(t *testing.T)", + "line": 15 + } + ], + "line_count": 252 + }, + "openmeter/meter/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 21 + }, + { + "kind": "interface", + "name": "ManageService", + "signature": "type ManageService interface", + "line": 27 + }, + { + "kind": "struct", + "name": "GetMeterInput", + "signature": "type GetMeterInput struct", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetMeterInput) Validate() error", + "line": 49 + }, + { + "kind": "struct", + "name": "ListMetersParams", + "signature": "type ListMetersParams struct", + "line": 64 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListMetersParams) Validate() error", + "line": 91 + }, + { + "kind": "struct", + "name": "inputOptions", + "signature": "type inputOptions struct", + "line": 137 + }, + { + "kind": "struct", + "name": "CreateMeterInput", + "signature": "type CreateMeterInput struct", + "line": 147 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateMeterInput) ValidateWith(validators ...models.ValidatorFunc[CreateMeterInput]) error", + "line": 163 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateMeterInput) Validate() error", + "line": 168 + }, + { + "kind": "struct", + "name": "UpdateMeterInput", + "signature": "type UpdateMeterInput struct", + "line": 213 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateMeterInput) Validate(valueProperty *string) error", + "line": 225 + }, + { + "kind": "struct", + "name": "DeleteMeterInput", + "signature": "type DeleteMeterInput struct", + "line": 249 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteMeterInput) Validate() error", + "line": 257 + } + ], + "line_count": 269 + }, + "openmeter/meter/service/manage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "ManageService", + "signature": "type ManageService struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewManage", + "signature": "func NewManage(\n\tadapter *adapter.Adapter,\n\tpublisher eventbus.Publisher,\n\tnamespaceManager *namespace.Manager,\n\treservedEventTypes []*meter.EventTypePattern,\n) *ManageService", + "line": 27 + }, + { + "kind": "func", + "name": "RegisterPreUpdateMeterHook", + "signature": "func (s *ManageService) RegisterPreUpdateMeterHook(hook meter.PreUpdateMeterHook) error", + "line": 43 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (s *ManageService) CreateMeter(ctx context.Context, input meter.CreateMeterInput) (meter.Meter, error)", + "line": 49 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (s *ManageService) DeleteMeter(ctx context.Context, input meter.DeleteMeterInput) error", + "line": 84 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (s *ManageService) UpdateMeter(ctx context.Context, input meter.UpdateMeterInput) (meter.Meter, error)", + "line": 158 + } + ], + "line_count": 234 + }, + "openmeter/meter/service/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter/adapter\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 13 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tadapter *adapter.Adapter,\n) *Service", + "line": 17 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (s *Service) ListMeters(ctx context.Context, input meter.ListMetersParams) (pagination.Result[meter.Meter], error)", + "line": 26 + }, + { + "kind": "func", + "name": "GetMeterByIDOrSlug", + "signature": "func (s *Service) GetMeterByIDOrSlug(ctx context.Context, input meter.GetMeterInput) (meter.Meter, error)", + "line": 31 + } + ], + "line_count": 33 + }, + "openmeter/meter/service_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestListMetersParams_Validate_Sort", + "signature": "func TestListMetersParams_Validate_Sort(t *testing.T)", + "line": 13 + } + ], + "line_count": 105 + }, + "openmeter/meterevent/adapter/adapter.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"\n\t\"github.com/openmeterio/openmeter/openmeter/meterevent\"", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tstreamingConnector streaming.Connector,\n\tcustomerService customer.Service,\n\tmeterService meter.Service,\n) meterevent.Service", + "line": 10 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 24 + } + ], + "line_count": 28 + }, + "openmeter/meterevent/adapter/event.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "ListEvents", + "signature": "func (a *adapter) ListEvents(ctx context.Context, params meterevent.ListEventsParams) ([]meterevent.Event, error)", + "line": 19 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (a *adapter) ListEventsV2(ctx context.Context, params meterevent.ListEventsV2Params) (pagination.Result[meterevent.Event], error)", + "line": 71 + }, + { + "kind": "func", + "name": "listCustomers", + "signature": "func (a *adapter) listCustomers(ctx context.Context, namespace string, customerIDs []string) ([]streaming.Customer, error)", + "line": 140 + }, + { + "kind": "func", + "name": "eventPostProcess", + "signature": "func (a *adapter) eventPostProcess(ctx context.Context, namespace string, rawEvents []streaming.RawEvent) ([]meterevent.Event, error)", + "line": 180 + }, + { + "kind": "func", + "name": "mapEventsToMeterEvents", + "signature": "func mapEventsToMeterEvents(rawEvents []streaming.RawEvent) []meterevent.Event", + "line": 202 + }, + { + "kind": "func", + "name": "validateEvents", + "signature": "func (a *adapter) validateEvents(ctx context.Context, namespace string, events []meterevent.Event) ([]meterevent.Event, error)", + "line": 227 + }, + { + "kind": "func", + "name": "enrichEventsWithCustomerID", + "signature": "func (a *adapter) enrichEventsWithCustomerID(ctx context.Context, namespace string, events []meterevent.Event) ([]meterevent.Event, error)", + "line": 275 + } + ], + "line_count": 320 + }, + "openmeter/meterevent/httphandler/event.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListEvents", + "signature": "func (h *handler) ListEvents() ListEventsHandler", + "line": 26 + } + ], + "line_count": 72 + }, + "openmeter/meterevent/httphandler/event_v2.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (h *handler) ListEventsV2() ListEventsV2Handler", + "line": 22 + } + ], + "line_count": 51 + }, + "openmeter/meterevent/httphandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "EventHandler", + "signature": "type EventHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 25 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 31 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tmetereventService meterevent.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 40 + } + ], + "line_count": 50 + }, + "openmeter/meterevent/httphandler/mapping.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "convertListEventsV2Params", + "signature": "func convertListEventsV2Params(params api.ListEventsV2Params, namespace string) (meterevent.ListEventsV2Params, error)", + "line": 17 + }, + { + "kind": "func", + "name": "convertEvent", + "signature": "func convertEvent(e meterevent.Event) (api.IngestedEvent, error)", + "line": 43 + }, + { + "kind": "func", + "name": "convertListEventsV2Response", + "signature": "func convertListEventsV2Response(events pagination.Result[meterevent.Event]) (api.IngestedEventCursorPaginatedResponse, error)", + "line": 78 + } + ], + "line_count": 92 + }, + "openmeter/meterevent/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 20 + }, + { + "kind": "struct", + "name": "ListEventsParams", + "signature": "type ListEventsParams struct", + "line": 26 + }, + { + "kind": "struct", + "name": "Event", + "signature": "type Event struct", + "line": 50 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (e Event) Cursor() pagination.Cursor", + "line": 84 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListEventsParams) Validate() error", + "line": 96 + }, + { + "kind": "struct", + "name": "ListEventsV2Params", + "signature": "type ListEventsV2Params struct", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListEventsV2Params) Validate() error", + "line": 173 + } + ], + "line_count": 252 + }, + "openmeter/meterevent/service_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestListEventsV2Params_Validate", + "signature": "func TestListEventsV2Params_Validate(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestEvent_Cursor", + "signature": "func TestEvent_Cursor(t *testing.T)", + "line": 89 + } + ], + "line_count": 123 + }, + "openmeter/meterexport/service.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 18 + }, + { + "kind": "struct", + "name": "TargetMeterDescriptor", + "signature": "type TargetMeterDescriptor struct", + "line": 53 + }, + { + "kind": "struct", + "name": "DataExportConfig", + "signature": "type DataExportConfig struct", + "line": 59 + }, + { + "kind": "struct", + "name": "dataExportConfigJSON", + "signature": "type dataExportConfigJSON struct", + "line": 71 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (c DataExportConfig) MarshalJSON() ([]byte, error)", + "line": 77 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (c *DataExportConfig) UnmarshalJSON(data []byte) error", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c DataExportConfig) Validate() error", + "line": 110 + }, + { + "kind": "struct", + "name": "DataExportParams", + "signature": "type DataExportParams struct", + "line": 132 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p DataExportParams) Validate() error", + "line": 139 + } + ], + "line_count": 151 + }, + "openmeter/meterexport/service/funnel.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "funnelParams", + "signature": "type funnelParams struct", + "line": 13 + }, + { + "kind": "func", + "name": "validate", + "signature": "func (p funnelParams) validate() error", + "line": 18 + }, + { + "kind": "func", + "name": "validateUnsupportedParams", + "signature": "func (p funnelParams) validateUnsupportedParams() []error", + "line": 41 + }, + { + "kind": "func", + "name": "funnel", + "signature": "func (s *service) funnel(ctx context.Context, params funnelParams, resultCh chan<- meter.MeterQueryRow, errCh chan<- error) error", + "line": 63 + }, + { + "kind": "func", + "name": "iterateQueryTime", + "signature": "func iterateQueryTime(start time.Time, limit *time.Time, windowSize meter.WindowSize) (time.Time, error)", + "line": 122 + } + ], + "line_count": 139 + }, + "openmeter/meterexport/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"\n\t\"github.com/openmeterio/openmeter/openmeter/meterexport\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 11 + }, + { + "kind": "func", + "name": "validate", + "signature": "func (c Config) validate() error", + "line": 20 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 38 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*service, error)", + "line": 42 + } + ], + "line_count": 52 + }, + "openmeter/meterexport/service/service_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "MockMeterService", + "signature": "type MockMeterService struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewMockMeterService", + "signature": "func NewMockMeterService() *MockMeterService", + "line": 27 + }, + { + "kind": "func", + "name": "AddMeter", + "signature": "func (m *MockMeterService) AddMeter(met meter.Meter)", + "line": 33 + }, + { + "kind": "func", + "name": "GetMeterByIDOrSlug", + "signature": "func (m *MockMeterService) GetMeterByIDOrSlug(ctx context.Context, input meter.GetMeterInput) (meter.Meter, error)", + "line": 38 + }, + { + "kind": "func", + "name": "ListMeters", + "signature": "func (m *MockMeterService) ListMeters(ctx context.Context, params meter.ListMetersParams) (pagination.Result[meter.Meter], error)", + "line": 46 + }, + { + "kind": "func", + "name": "TestExportSyntheticMeterData", + "signature": "func TestExportSyntheticMeterData(t *testing.T)", + "line": 50 + }, + { + "kind": "func", + "name": "TestExportSyntheticMeterData_ContextCancellation", + "signature": "func TestExportSyntheticMeterData_ContextCancellation(t *testing.T)", + "line": 292 + }, + { + "kind": "func", + "name": "TestServiceNew", + "signature": "func TestServiceNew(t *testing.T)", + "line": 457 + }, + { + "kind": "func", + "name": "TestExportSyntheticMeterDataIter", + "signature": "func TestExportSyntheticMeterDataIter(t *testing.T)", + "line": 494 + } + ], + "line_count": 709 + }, + "openmeter/meterexport/service/syntheticdata.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "GetTargetMeterDescriptor", + "signature": "func (s *service) GetTargetMeterDescriptor(ctx context.Context, config meterexport.DataExportConfig) (meterexport.TargetMeterDescriptor, error)", + "line": 21 + }, + { + "kind": "func", + "name": "validateAndGetMeter", + "signature": "func (s *service) validateAndGetMeter(ctx context.Context, config meterexport.DataExportConfig) (meter.Meter, meterexport.TargetMeterDescriptor, error)", + "line": 28 + }, + { + "kind": "func", + "name": "ExportSyntheticMeterData", + "signature": "func (s *service) ExportSyntheticMeterData(ctx context.Context, params meterexport.DataExportParams, resultCh chan<- streaming.RawEvent, errCh chan<- error) error", + "line": 57 + }, + { + "kind": "func", + "name": "createEventFromMeterRow", + "signature": "func (s *service) createEventFromMeterRow(m meter.Meter, row meter.MeterQueryRow) (streaming.RawEvent, error)", + "line": 142 + } + ], + "line_count": 173 + }, + "openmeter/meterexport/service/syntheticdata_iter.go": { + "header": "\t\"context\"\n\t\"iter\"\n\t\"github.com/openmeterio/openmeter/openmeter/meterexport\"", + "symbols": [ + { + "kind": "func", + "name": "ExportSyntheticMeterDataIter", + "signature": "func (s *service) ExportSyntheticMeterDataIter(ctx context.Context, params meterexport.DataExportParams) (iter.Seq2[streaming.RawEvent, error], error)", + "line": 13 + } + ], + "line_count": 80 + }, + "openmeter/meterexport/service_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestDataExportConfig_JSONRoundTrip", + "signature": "func TestDataExportConfig_JSONRoundTrip(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestDataExportConfig_UnmarshalJSON", + "signature": "func TestDataExportConfig_UnmarshalJSON(t *testing.T)", + "line": 81 + }, + { + "kind": "func", + "name": "mustLoadLocation", + "signature": "func mustLoadLocation(t *testing.T, name string) *time.Location", + "line": 135 + } + ], + "line_count": 140 + }, + "openmeter/namespace/namespace.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "Manager", + "signature": "type Manager struct", + "line": 11 + }, + { + "kind": "struct", + "name": "ManagerConfig", + "signature": "type ManagerConfig struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewManager", + "signature": "func NewManager(config ManagerConfig) (*Manager, error)", + "line": 23 + }, + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 48 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (m *Manager) CreateNamespace(ctx context.Context, name string) error", + "line": 54 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (m *Manager) DeleteNamespace(ctx context.Context, name string) error", + "line": 63 + }, + { + "kind": "func", + "name": "RegisterHandler", + "signature": "func (m *Manager) RegisterHandler(handler Handler) error", + "line": 76 + }, + { + "kind": "func", + "name": "CreateDefaultNamespace", + "signature": "func (m *Manager) CreateDefaultNamespace(ctx context.Context) error", + "line": 92 + }, + { + "kind": "func", + "name": "GetDefaultNamespace", + "signature": "func (m *Manager) GetDefaultNamespace() string", + "line": 96 + }, + { + "kind": "func", + "name": "IsManagementDisabled", + "signature": "func (m *Manager) IsManagementDisabled() bool", + "line": 100 + }, + { + "kind": "func", + "name": "createNamespace", + "signature": "func (m *Manager) createNamespace(ctx context.Context, name string) error", + "line": 105 + }, + { + "kind": "func", + "name": "deleteNamespace", + "signature": "func (m *Manager) deleteNamespace(ctx context.Context, name string) error", + "line": 122 + } + ], + "line_count": 136 + }, + "openmeter/namespace/namespace_test.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "newFakeHandler", + "signature": "func newFakeHandler() *fakeHandler", + "line": 12 + }, + { + "kind": "struct", + "name": "fakeHandler", + "signature": "type fakeHandler struct", + "line": 18 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (h *fakeHandler) CreateNamespace(_ context.Context, name string) error", + "line": 24 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (h *fakeHandler) DeleteNamespace(_ context.Context, name string) error", + "line": 33 + }, + { + "kind": "func", + "name": "TestManager_CreateNamespce", + "signature": "func TestManager_CreateNamespce(t *testing.T)", + "line": 42 + }, + { + "kind": "func", + "name": "TestManager_CreateDefaultNamespce", + "signature": "func TestManager_CreateDefaultNamespce(t *testing.T)", + "line": 59 + }, + { + "kind": "func", + "name": "TestManager_DeleteNamespce", + "signature": "func TestManager_DeleteNamespce(t *testing.T)", + "line": 74 + }, + { + "kind": "func", + "name": "TestManager_Register", + "signature": "func TestManager_Register(t *testing.T)", + "line": 96 + } + ], + "line_count": 122 + }, + "openmeter/namespace/namespacedriver/decoder.go": { + "header": "type NamespaceDecoder interface {\n\tGetNamespace(ctx context.Context) (string, bool)\n}", + "symbols": [ + { + "kind": "interface", + "name": "NamespaceDecoder", + "signature": "type NamespaceDecoder interface", + "line": 6 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (d StaticNamespaceDecoder) GetNamespace(ctx context.Context) (string, bool)", + "line": 12 + } + ], + "line_count": 14 + }, + "openmeter/notification/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (notification.Repository, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 62 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 71 + } + ], + "line_count": 73 + }, + "openmeter/notification/adapter/channel.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "ListChannels", + "signature": "func (a *adapter) ListChannels(ctx context.Context, params notification.ListChannelsInput) (pagination.Result[notification.Channel], error)", + "line": 17 + }, + { + "kind": "func", + "name": "CreateChannel", + "signature": "func (a *adapter) CreateChannel(ctx context.Context, params notification.CreateChannelInput) (*notification.Channel, error)", + "line": 83 + }, + { + "kind": "func", + "name": "DeleteChannel", + "signature": "func (a *adapter) DeleteChannel(ctx context.Context, params notification.DeleteChannelInput) error", + "line": 109 + }, + { + "kind": "func", + "name": "GetChannel", + "signature": "func (a *adapter) GetChannel(ctx context.Context, params notification.GetChannelInput) (*notification.Channel, error)", + "line": 136 + }, + { + "kind": "func", + "name": "UpdateChannel", + "signature": "func (a *adapter) UpdateChannel(ctx context.Context, params notification.UpdateChannelInput) (*notification.Channel, error)", + "line": 166 + } + ], + "line_count": 198 + }, + "openmeter/notification/adapter/deliverystatus.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListEventsDeliveryStatus", + "signature": "func (a *adapter) ListEventsDeliveryStatus(ctx context.Context, params notification.ListEventsDeliveryStatusInput) (pagination.Result[notification.EventDeliveryStatus], error)", + "line": 19 + }, + { + "kind": "func", + "name": "GetEventDeliveryStatus", + "signature": "func (a *adapter) GetEventDeliveryStatus(ctx context.Context, params notification.GetEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 75 + }, + { + "kind": "func", + "name": "UpdateEventDeliveryStatus", + "signature": "func (a *adapter) UpdateEventDeliveryStatus(ctx context.Context, params notification.UpdateEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 104 + } + ], + "line_count": 141 + }, + "openmeter/notification/adapter/entitymapping.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "ChannelFromDBEntity", + "signature": "func ChannelFromDBEntity(e db.NotificationChannel) *notification.Channel", + "line": 15 + }, + { + "kind": "func", + "name": "RuleFromDBEntity", + "signature": "func RuleFromDBEntity(e db.NotificationRule) *notification.Rule", + "line": 44 + }, + { + "kind": "func", + "name": "EventFromDBEntity", + "signature": "func EventFromDBEntity(e db.NotificationEvent) (*notification.Event, error)", + "line": 85 + }, + { + "kind": "func", + "name": "eventPayloadFromJSON", + "signature": "func eventPayloadFromJSON(data []byte) (notification.EventPayload, error)", + "line": 123 + }, + { + "kind": "func", + "name": "EventDeliveryStatusFromDBEntity", + "signature": "func EventDeliveryStatusFromDBEntity(e db.NotificationEventDeliveryStatus) *notification.EventDeliveryStatus", + "line": 144 + } + ], + "line_count": 168 + }, + "openmeter/notification/adapter/entitymapping_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestEventPayloadFromJSON_V1Invoice", + "signature": "func TestEventPayloadFromJSON_V1Invoice(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestEventPayloadFromJSON_UnsupportedVersion", + "signature": "func TestEventPayloadFromJSON_UnsupportedVersion(t *testing.T)", + "line": 38 + }, + { + "kind": "func", + "name": "TestEventPayloadFromJSON_NonInvoiceType", + "signature": "func TestEventPayloadFromJSON_NonInvoiceType(t *testing.T)", + "line": 49 + }, + { + "kind": "func", + "name": "TestEventPayloadV1JSONShape", + "signature": "func TestEventPayloadV1JSONShape(t *testing.T)", + "line": 70 + } + ], + "line_count": 103 + }, + "openmeter/notification/adapter/event.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "EagerLoadRulesWithActiveChannels", + "signature": "func EagerLoadRulesWithActiveChannels(at time.Time) func(query *entdb.NotificationRuleQuery)", + "line": 23 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (a *adapter) ListEvents(ctx context.Context, params notification.ListEventsInput) (pagination.Result[notification.Event], error)", + "line": 37 + }, + { + "kind": "func", + "name": "GetEvent", + "signature": "func (a *adapter) GetEvent(ctx context.Context, params notification.GetEventInput) (*notification.Event, error)", + "line": 152 + }, + { + "kind": "func", + "name": "CreateEvent", + "signature": "func (a *adapter) CreateEvent(ctx context.Context, params notification.CreateEventInput) (*notification.Event, error)", + "line": 189 + } + ], + "line_count": 284 + }, + "openmeter/notification/adapter/rule.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "EagerLoadActiveChannels", + "signature": "func EagerLoadActiveChannels(at time.Time) func(query *entdb.NotificationChannelQuery)", + "line": 19 + }, + { + "kind": "func", + "name": "ListRules", + "signature": "func (a *adapter) ListRules(ctx context.Context, params notification.ListRulesInput) (pagination.Result[notification.Rule], error)", + "line": 31 + }, + { + "kind": "func", + "name": "CreateRule", + "signature": "func (a *adapter) CreateRule(ctx context.Context, params notification.CreateRuleInput) (*notification.Rule, error)", + "line": 108 + }, + { + "kind": "func", + "name": "DeleteRule", + "signature": "func (a *adapter) DeleteRule(ctx context.Context, params notification.DeleteRuleInput) error", + "line": 146 + }, + { + "kind": "func", + "name": "GetRule", + "signature": "func (a *adapter) GetRule(ctx context.Context, params notification.GetRuleInput) (*notification.Rule, error)", + "line": 173 + }, + { + "kind": "func", + "name": "UpdateRule", + "signature": "func (a *adapter) UpdateRule(ctx context.Context, params notification.UpdateRuleInput) (*notification.Rule, error)", + "line": 204 + } + ], + "line_count": 249 + }, + "openmeter/notification/annotations.go": { + "header": "const (\n\tAnnotationRuleTestEvent = \"notification.rule.test\"\n\tAnnotationEventFeatureKey = \"event.feature.key\"", + "symbols": [], + "line_count": 22 + }, + "openmeter/notification/channel.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\twebhooksecret \"github.com/openmeterio/openmeter/openmeter/notification/webhook/secret\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (t ChannelType) Values() []string", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t ChannelType) Validate() error", + "line": 27 + }, + { + "kind": "struct", + "name": "Channel", + "signature": "type Channel struct", + "line": 37 + }, + { + "kind": "struct", + "name": "ChannelConfigMeta", + "signature": "type ChannelConfigMeta struct", + "line": 55 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m ChannelConfigMeta) Validate() error", + "line": 59 + }, + { + "kind": "struct", + "name": "ChannelConfig", + "signature": "type ChannelConfig struct", + "line": 66 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ChannelConfig) Validate() error", + "line": 74 + }, + { + "kind": "struct", + "name": "WebHookChannelConfig", + "signature": "type WebHookChannelConfig struct", + "line": 86 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (w WebHookChannelConfig) Validate() error", + "line": 97 + }, + { + "kind": "struct", + "name": "ListChannelsInput", + "signature": "type ListChannelsInput struct", + "line": 118 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i ListChannelsInput) ValidateWith(validators ...models.ValidatorFunc[ListChannelsInput]) error", + "line": 129 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListChannelsInput) Validate() error", + "line": 133 + }, + { + "kind": "struct", + "name": "CreateChannelInput", + "signature": "type CreateChannelInput struct", + "line": 144 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateChannelInput) ValidateWith(validators ...models.ValidatorFunc[CreateChannelInput]) error", + "line": 161 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateChannelInput) Validate() error", + "line": 165 + }, + { + "kind": "struct", + "name": "UpdateChannelInput", + "signature": "type UpdateChannelInput struct", + "line": 192 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i UpdateChannelInput) ValidateWith(validators ...models.ValidatorFunc[UpdateChannelInput]) error", + "line": 209 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateChannelInput) Validate() error", + "line": 213 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i GetChannelInput) ValidateWith(validators ...models.ValidatorFunc[GetChannelInput]) error", + "line": 246 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetChannelInput) Validate() error", + "line": 250 + } + ], + "line_count": 269 + }, + "openmeter/notification/consumer/consumer.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o Options) Validate() error", + "line": 31 + }, + { + "kind": "struct", + "name": "Consumer", + "signature": "type Consumer struct", + "line": 49 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(opts Options) (*Consumer, error)", + "line": 57 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (c *Consumer) Handle(ctx context.Context, event snapshot.SnapshotEvent) error", + "line": 118 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (c *Consumer) Run(ctx context.Context) error", + "line": 122 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (c *Consumer) Close() error", + "line": 126 + } + ], + "line_count": 128 + }, + "openmeter/notification/consumer/entitlementbalancethreshold.go": { + "header": "\t\"context\"\n\t\"crypto/sha256\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementSnapshotHandlerState", + "signature": "type EntitlementSnapshotHandlerState struct", + "line": 32 + }, + { + "kind": "func", + "name": "handleAsSnapshotEvent", + "signature": "func (b *EntitlementSnapshotHandler) handleAsSnapshotEvent(ctx context.Context, event snapshot.SnapshotEvent) error", + "line": 38 + }, + { + "kind": "func", + "name": "handleRule", + "signature": "func (b *EntitlementSnapshotHandler) handleRule(ctx context.Context, balSnapshot snapshot.SnapshotEvent, rule notification.Rule) error", + "line": 75 + }, + { + "kind": "struct", + "name": "createBalanceThresholdEventInput", + "signature": "type createBalanceThresholdEventInput struct", + "line": 174 + }, + { + "kind": "func", + "name": "createEvent", + "signature": "func (b *EntitlementSnapshotHandler) createEvent(ctx context.Context, in createBalanceThresholdEventInput) error", + "line": 181 + }, + { + "kind": "func", + "name": "isBalanceThresholdEvent", + "signature": "func (b *EntitlementSnapshotHandler) isBalanceThresholdEvent(event snapshot.SnapshotEvent) bool", + "line": 250 + }, + { + "kind": "func", + "name": "thresholdKindFromThreshold", + "signature": "func thresholdKindFromThreshold(t notification.BalanceThreshold) (ThresholdKind, error)", + "line": 280 + }, + { + "kind": "struct", + "name": "BalanceEventDedupHash", + "signature": "type BalanceEventDedupHash struct", + "line": 293 + }, + { + "kind": "func", + "name": "NewBalanceEventDedupHash", + "signature": "func NewBalanceEventDedupHash(snapshot snapshot.SnapshotEvent, ruleID string, threshold notification.BalanceThreshold) (*BalanceEventDedupHash, error)", + "line": 308 + }, + { + "kind": "func", + "name": "V1", + "signature": "func (d BalanceEventDedupHash) V1() string", + "line": 333 + }, + { + "kind": "func", + "name": "V2", + "signature": "func (d BalanceEventDedupHash) V2() string", + "line": 360 + }, + { + "kind": "struct", + "name": "numericThreshold", + "signature": "type numericThreshold struct", + "line": 382 + }, + { + "kind": "func", + "name": "getNumericThreshold", + "signature": "func getNumericThreshold(threshold notification.BalanceThreshold, value api.EntitlementValue) (*numericThreshold, error)", + "line": 395 + }, + { + "kind": "struct", + "name": "activeThresholds", + "signature": "type activeThresholds struct", + "line": 447 + }, + { + "kind": "func", + "name": "Iter", + "signature": "func (a activeThresholds) Iter() iter.Seq2[int, *notification.BalanceThreshold]", + "line": 452 + }, + { + "kind": "func", + "name": "getActiveThresholdsWithHighestPriority", + "signature": "func getActiveThresholdsWithHighestPriority(thresholds []notification.BalanceThreshold, value snapshot.EntitlementValue) (*activeThresholds, error)", + "line": 464 + } + ], + "line_count": 526 + }, + "openmeter/notification/consumer/entitlementbalancethreshold_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "newNumberThreshold", + "signature": "func newNumberThreshold(v float64) notification.BalanceThreshold", + "line": 21 + }, + { + "kind": "func", + "name": "newPercentThreshold", + "signature": "func newPercentThreshold(v float64) notification.BalanceThreshold", + "line": 28 + }, + { + "kind": "func", + "name": "newUsageValueThreshold", + "signature": "func newUsageValueThreshold(v float64) notification.BalanceThreshold", + "line": 35 + }, + { + "kind": "func", + "name": "newUsagePercentageThreshold", + "signature": "func newUsagePercentageThreshold(v float64) notification.BalanceThreshold", + "line": 42 + }, + { + "kind": "func", + "name": "newBalanceValueThreshold", + "signature": "func newBalanceValueThreshold(v float64) notification.BalanceThreshold", + "line": 49 + }, + { + "kind": "func", + "name": "Test_GetActiveThresholdsWithHighestPriority", + "signature": "func Test_GetActiveThresholdsWithHighestPriority(t *testing.T)", + "line": 56 + }, + { + "kind": "func", + "name": "Test_GetActiveThresholdsWithHighestPriority_Error", + "signature": "func Test_GetActiveThresholdsWithHighestPriority_Error(t *testing.T)", + "line": 647 + }, + { + "kind": "func", + "name": "MustParseISOTime", + "signature": "func MustParseISOTime(t *testing.T, str string) time.Time", + "line": 696 + }, + { + "kind": "func", + "name": "Test_BalanceEventDedupHash", + "signature": "func Test_BalanceEventDedupHash(t *testing.T)", + "line": 707 + } + ], + "line_count": 888 + }, + "openmeter/notification/consumer/entitlementreset.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "isEntitlementResetEvent", + "signature": "func (b *EntitlementSnapshotHandler) isEntitlementResetEvent(event snapshot.SnapshotEvent) bool", + "line": 24 + }, + { + "kind": "func", + "name": "handleAsEntitlementResetEvent", + "signature": "func (b *EntitlementSnapshotHandler) handleAsEntitlementResetEvent(ctx context.Context, event snapshot.SnapshotEvent) error", + "line": 33 + }, + { + "kind": "func", + "name": "handleResetRule", + "signature": "func (b *EntitlementSnapshotHandler) handleResetRule(ctx context.Context, event snapshot.SnapshotEvent, rule notification.Rule) error", + "line": 62 + }, + { + "kind": "struct", + "name": "createEntitlementResetEventInput", + "signature": "type createEntitlementResetEventInput struct", + "line": 91 + }, + { + "kind": "func", + "name": "createResetEvent", + "signature": "func (b *EntitlementSnapshotHandler) createResetEvent(ctx context.Context, in createEntitlementResetEventInput) error", + "line": 96 + } + ], + "line_count": 158 + }, + "openmeter/notification/consumer/entitlementsnapshot.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementSnapshotHandler", + "signature": "type EntitlementSnapshotHandler struct", + "line": 12 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (b *EntitlementSnapshotHandler) Handle(ctx context.Context, event snapshot.SnapshotEvent) error", + "line": 17 + } + ], + "line_count": 31 + }, + "openmeter/notification/consumer/invoice.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoiceEventHandler", + "signature": "type InvoiceEventHandler struct", + "line": 15 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *InvoiceEventHandler) Handle(ctx context.Context, event billing.EventStandardInvoice, eventType notification.EventType) error", + "line": 20 + } + ], + "line_count": 101 + }, + "openmeter/notification/defaults.go": { + "header": "const (\n\tDefaultDisabled = false\n\tDefaultPageNumber = 1", + "symbols": [], + "line_count": 7 + }, + "openmeter/notification/deliverystatus.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "String", + "signature": "func (e EventDeliveryStatusState) String() string", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EventDeliveryStatusState) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (e EventDeliveryStatusState) Values() []string", + "line": 42 + }, + { + "kind": "struct", + "name": "EventDeliveryAttemptResponse", + "signature": "type EventDeliveryAttemptResponse struct", + "line": 52 + }, + { + "kind": "struct", + "name": "EventDeliveryAttempt", + "signature": "type EventDeliveryAttempt struct", + "line": 59 + }, + { + "kind": "func", + "name": "SortEventDeliveryAttemptsInDescOrder", + "signature": "func SortEventDeliveryAttemptsInDescOrder(attempts []EventDeliveryAttempt)", + "line": 66 + }, + { + "kind": "struct", + "name": "EventDeliveryStatus", + "signature": "type EventDeliveryStatus struct", + "line": 72 + }, + { + "kind": "struct", + "name": "ListEventsDeliveryStatusInput", + "signature": "type ListEventsDeliveryStatusInput struct", + "line": 95 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i ListEventsDeliveryStatusInput) ValidateWith(validators ...models.ValidatorFunc[ListEventsDeliveryStatusInput]) error", + "line": 116 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListEventsDeliveryStatusInput) Validate() error", + "line": 120 + }, + { + "kind": "struct", + "name": "GetEventDeliveryStatusInput", + "signature": "type GetEventDeliveryStatusInput struct", + "line": 143 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i GetEventDeliveryStatusInput) ValidateWith(validators ...models.ValidatorFunc[GetEventDeliveryStatusInput]) error", + "line": 152 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetEventDeliveryStatusInput) Validate() error", + "line": 156 + }, + { + "kind": "struct", + "name": "UpdateEventDeliveryStatusInput", + "signature": "type UpdateEventDeliveryStatusInput struct", + "line": 175 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i UpdateEventDeliveryStatusInput) ValidateWith(validators ...models.ValidatorFunc[UpdateEventDeliveryStatusInput]) error", + "line": 190 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateEventDeliveryStatusInput) Validate() error", + "line": 194 + } + ], + "line_count": 206 + }, + "openmeter/notification/entitlements.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementValuePayloadBase", + "signature": "type EntitlementValuePayloadBase struct", + "line": 24 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (e EntitlementValuePayloadBase) ValidateWith(validators ...models.ValidatorFunc[EntitlementValuePayloadBase]) error", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementValuePayloadBase) Validate() error", + "line": 36 + }, + { + "kind": "struct", + "name": "BalanceThresholdPayload", + "signature": "type BalanceThresholdPayload struct", + "line": 45 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (b BalanceThresholdPayload) ValidateWith(validators ...models.ValidatorFunc[BalanceThresholdPayload]) error", + "line": 51 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b BalanceThresholdPayload) Validate() error", + "line": 56 + }, + { + "kind": "struct", + "name": "BalanceThresholdRuleConfig", + "signature": "type BalanceThresholdRuleConfig struct", + "line": 79 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (b BalanceThresholdRuleConfig) ValidateWith(validators ...models.ValidatorFunc[BalanceThresholdRuleConfig]) error", + "line": 86 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b BalanceThresholdRuleConfig) Validate() error", + "line": 91 + }, + { + "kind": "func", + "name": "ValidateRuleConfigWithFeatures", + "signature": "func ValidateRuleConfigWithFeatures(ctx context.Context, service FeatureService, namespace string) models.ValidatorFunc[RuleConfig]", + "line": 124 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (e EntitlementResetPayload) ValidateWith(validators ...models.ValidatorFunc[EntitlementResetPayload]) error", + "line": 188 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementResetPayload) Validate() error", + "line": 192 + }, + { + "kind": "struct", + "name": "EntitlementResetRuleConfig", + "signature": "type EntitlementResetRuleConfig struct", + "line": 201 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (e EntitlementResetRuleConfig) ValidateWith(validators ...models.ValidatorFunc[EntitlementResetRuleConfig]) error", + "line": 205 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e EntitlementResetRuleConfig) Validate() error", + "line": 209 + } + ], + "line_count": 217 + }, + "openmeter/notification/errors.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 11 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e NotFoundError) Error() string", + "line": 15 + }, + { + "kind": "struct", + "name": "genericError", + "signature": "type genericError struct", + "line": 19 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e UpdateAfterDeleteError) Error() string", + "line": 27 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e UpdateAfterDeleteError) Unwrap() error", + "line": 31 + } + ], + "line_count": 33 + }, + "openmeter/notification/event.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "EventTypes", + "signature": "func EventTypes() []EventType", + "line": 22 + }, + { + "kind": "func", + "name": "String", + "signature": "func (t EventType) String() string", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t EventType) Validate() error", + "line": 37 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (t EventType) Values() []string", + "line": 45 + }, + { + "kind": "struct", + "name": "Event", + "signature": "type Event struct", + "line": 51 + }, + { + "kind": "struct", + "name": "ListEventsInput", + "signature": "type ListEventsInput struct", + "line": 74 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i ListEventsInput) ValidateWith(validators ...models.ValidatorFunc[ListEventsInput]) error", + "line": 99 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListEventsInput) Validate() error", + "line": 103 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i GetEventInput) ValidateWith(validators ...models.ValidatorFunc[GetEventInput]) error", + "line": 128 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetEventInput) Validate() error", + "line": 132 + }, + { + "kind": "struct", + "name": "CreateEventInput", + "signature": "type CreateEventInput struct", + "line": 151 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateEventInput) ValidateWith(validators ...models.ValidatorFunc[CreateEventInput]) error", + "line": 165 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateEventInput) Validate() error", + "line": 169 + }, + { + "kind": "struct", + "name": "ResendEventInput", + "signature": "type ResendEventInput struct", + "line": 184 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i ResendEventInput) ValidateWith(validators ...models.ValidatorFunc[ResendEventInput]) error", + "line": 190 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ResendEventInput) Validate() error", + "line": 194 + } + ], + "line_count": 206 + }, + "openmeter/notification/eventhandler.go": { + "header": "\t\"context\"\n\t\"runtime\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "EventHandler", + "signature": "type EventHandler interface", + "line": 18 + }, + { + "kind": "interface", + "name": "EventReconciler", + "signature": "type EventReconciler interface", + "line": 26 + }, + { + "kind": "interface", + "name": "EventDispatcher", + "signature": "type EventDispatcher interface", + "line": 30 + } + ], + "line_count": 32 + }, + "openmeter/notification/eventhandler/deliverystatus.go": { + "header": "\t\"slices\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification\"", + "symbols": [ + { + "kind": "func", + "name": "filterActiveDeliveryStatusesByChannelType", + "signature": "func filterActiveDeliveryStatusesByChannelType(event *notification.Event, channelType notification.ChannelType) []notification.EventDeliveryStatus", + "line": 11 + }, + { + "kind": "func", + "name": "sortDeliveryStatusStateByPriority", + "signature": "func sortDeliveryStatusStateByPriority(states []notification.EventDeliveryStatus) []notification.EventDeliveryStatus", + "line": 55 + } + ], + "line_count": 81 + }, + "openmeter/notification/eventhandler/dispatch.go": { + "header": "\t\"context\"\n\t\"runtime/debug\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "func", + "name": "Dispatch", + "signature": "func (h *Handler) Dispatch(ctx context.Context, event *notification.Event) error", + "line": 13 + } + ], + "line_count": 44 + }, + "openmeter/notification/eventhandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *Config) Validate() error", + "line": 33 + }, + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 61 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (h *Handler) Start() error", + "line": 86 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (h *Handler) Close() error", + "line": 137 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Handler, error)", + "line": 148 + } + ], + "line_count": 187 + }, + "openmeter/notification/eventhandler/noop/handler.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 11 + }, + { + "kind": "func", + "name": "Dispatch", + "signature": "func (h Handler) Dispatch(_ context.Context, _ *notification.Event) error", + "line": 13 + }, + { + "kind": "func", + "name": "Reconcile", + "signature": "func (h Handler) Reconcile(_ context.Context) error", + "line": 17 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (h Handler) Start() error", + "line": 21 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (h Handler) Close() error", + "line": 25 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() (*Handler, error)", + "line": 29 + } + ], + "line_count": 31 + }, + "openmeter/notification/eventhandler/reconcile.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "reconcileEvent", + "signature": "func (h *Handler) reconcileEvent(ctx context.Context, event *notification.Event) error", + "line": 22 + }, + { + "kind": "func", + "name": "Reconcile", + "signature": "func (h *Handler) Reconcile(ctx context.Context) error", + "line": 66 + } + ], + "line_count": 147 + }, + "openmeter/notification/eventhandler/webhook.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "reconcileWebhookEvent", + "signature": "func (h *Handler) reconcileWebhookEvent(ctx context.Context, event *notification.Event) error", + "line": 30 + }, + { + "kind": "func", + "name": "getDeliveryStatusByChannelID", + "signature": "func getDeliveryStatusByChannelID(items []webhook.MessageDeliveryStatus, channelID string) *webhook.MessageDeliveryStatus", + "line": 440 + }, + { + "kind": "func", + "name": "resendWebhookMessage", + "signature": "func (h *Handler) resendWebhookMessage(ctx context.Context, event *notification.Event, status *notification.EventDeliveryStatus) error", + "line": 450 + }, + { + "kind": "func", + "name": "getWebhookMessage", + "signature": "func (h *Handler) getWebhookMessage(ctx context.Context, event *notification.Event) (*webhook.Message, error)", + "line": 489 + }, + { + "kind": "func", + "name": "sendWebhookMessage", + "signature": "func (h *Handler) sendWebhookMessage(ctx context.Context, event *notification.Event) (*webhook.Message, error)", + "line": 524 + }, + { + "kind": "func", + "name": "eventAsPayload", + "signature": "func eventAsPayload(event *notification.Event) (webhook.Payload, error)", + "line": 566 + } + ], + "line_count": 605 + }, + "openmeter/notification/eventpayload.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "AsRawPayload", + "signature": "func AsRawPayload(t any) (RawPayload, error)", + "line": 13 + }, + { + "kind": "struct", + "name": "EventPayloadMeta", + "signature": "type EventPayloadMeta struct", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m EventPayloadMeta) Validate() error", + "line": 32 + }, + { + "kind": "struct", + "name": "EventPayload", + "signature": "type EventPayload struct", + "line": 42 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p EventPayload) Validate() error", + "line": 53 + } + ], + "line_count": 76 + }, + "openmeter/notification/httpdriver/channel.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListChannels", + "signature": "func (h *handler) ListChannels() ListChannelsHandler", + "line": 26 + }, + { + "kind": "func", + "name": "CreateChannel", + "signature": "func (h *handler) CreateChannel() CreateChannelHandler", + "line": 88 + }, + { + "kind": "func", + "name": "UpdateChannel", + "signature": "func (h *handler) UpdateChannel() UpdateChannelHandler", + "line": 132 + }, + { + "kind": "func", + "name": "DeleteChannel", + "signature": "func (h *handler) DeleteChannel() DeleteChannelHandler", + "line": 176 + }, + { + "kind": "func", + "name": "GetChannel", + "signature": "func (h *handler) GetChannel() GetChannelHandler", + "line": 212 + } + ], + "line_count": 244 + }, + "openmeter/notification/httpdriver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 15 + } + ], + "line_count": 24 + }, + "openmeter/notification/httpdriver/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListEvents", + "signature": "func (h *handler) ListEvents() ListEventsHandler", + "line": 27 + }, + { + "kind": "func", + "name": "GetEvent", + "signature": "func (h *handler) GetEvent() GetEventHandler", + "line": 94 + }, + { + "kind": "func", + "name": "ResendEvent", + "signature": "func (h *handler) ResendEvent() ResendEventHandler", + "line": 136 + } + ], + "line_count": 173 + }, + "openmeter/notification/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 16 + }, + { + "kind": "interface", + "name": "ChannelHandler", + "signature": "type ChannelHandler interface", + "line": 22 + }, + { + "kind": "interface", + "name": "RuleHandler", + "signature": "type RuleHandler interface", + "line": 30 + }, + { + "kind": "interface", + "name": "EventHandler", + "signature": "type EventHandler interface", + "line": 39 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 47 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 54 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice notification.Service,\n\tbillingService billing.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 63 + } + ], + "line_count": 75 + }, + "openmeter/notification/httpdriver/mapping.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "FromChannel", + "signature": "func FromChannel(c notification.Channel) (api.NotificationChannel, error)", + "line": 14 + }, + { + "kind": "func", + "name": "FromChannelWebhook", + "signature": "func FromChannelWebhook(c notification.Channel) api.NotificationChannelWebhook", + "line": 27 + }, + { + "kind": "func", + "name": "FromAnnotations", + "signature": "func FromAnnotations(a models.Annotations) api.Annotations", + "line": 50 + }, + { + "kind": "func", + "name": "FromMetadata", + "signature": "func FromMetadata(m models.Metadata) api.Metadata", + "line": 58 + }, + { + "kind": "func", + "name": "AsChannelWebhookCreateRequest", + "signature": "func AsChannelWebhookCreateRequest(r api.NotificationChannelWebhookCreateRequest, namespace string) notification.CreateChannelInput", + "line": 66 + }, + { + "kind": "func", + "name": "AsMetadata", + "signature": "func AsMetadata(m *api.Metadata) models.Metadata", + "line": 88 + }, + { + "kind": "func", + "name": "AsChannelWebhookUpdateRequest", + "signature": "func AsChannelWebhookUpdateRequest(r api.NotificationChannelWebhookCreateRequest, namespace, channelID string) notification.UpdateChannelInput", + "line": 96 + }, + { + "kind": "func", + "name": "AsRuleBalanceThresholdCreateRequest", + "signature": "func AsRuleBalanceThresholdCreateRequest(r api.NotificationRuleBalanceThresholdCreateRequest, namespace string) notification.CreateRuleInput", + "line": 119 + }, + { + "kind": "func", + "name": "AsRuleBalanceThresholdUpdateRequest", + "signature": "func AsRuleBalanceThresholdUpdateRequest(r api.NotificationRuleBalanceThresholdCreateRequest, namespace, ruleID string) notification.UpdateRuleInput", + "line": 141 + }, + { + "kind": "func", + "name": "AsRuleEntitlementResetCreateRequest", + "signature": "func AsRuleEntitlementResetCreateRequest(r api.NotificationRuleEntitlementResetCreateRequest, namespace string) notification.CreateRuleInput", + "line": 164 + }, + { + "kind": "func", + "name": "AsRuleEntitlementResetUpdateRequest", + "signature": "func AsRuleEntitlementResetUpdateRequest(r api.NotificationRuleEntitlementResetCreateRequest, namespace, ruleID string) notification.UpdateRuleInput", + "line": 185 + }, + { + "kind": "func", + "name": "AsRuleInvoiceCreatedCreateRequest", + "signature": "func AsRuleInvoiceCreatedCreateRequest(r api.NotificationRuleInvoiceCreatedCreateRequest, namespace string) notification.CreateRuleInput", + "line": 207 + }, + { + "kind": "func", + "name": "AsRuleInvoiceCreatedUpdateRequest", + "signature": "func AsRuleInvoiceCreatedUpdateRequest(r api.NotificationRuleInvoiceCreatedCreateRequest, namespace, ruleID string) notification.UpdateRuleInput", + "line": 226 + }, + { + "kind": "func", + "name": "AsRuleInvoiceUpdatedCreateRequest", + "signature": "func AsRuleInvoiceUpdatedCreateRequest(r api.NotificationRuleInvoiceUpdatedCreateRequest, namespace string) notification.CreateRuleInput", + "line": 246 + }, + { + "kind": "func", + "name": "AsRuleInvoiceUpdatedUpdateRequest", + "signature": "func AsRuleInvoiceUpdatedUpdateRequest(r api.NotificationRuleInvoiceUpdatedCreateRequest, namespace, ruleID string) notification.UpdateRuleInput", + "line": 265 + }, + { + "kind": "func", + "name": "FromRule", + "signature": "func FromRule(r notification.Rule) (api.NotificationRule, error)", + "line": 285 + }, + { + "kind": "func", + "name": "FromRuleBalanceThreshold", + "signature": "func FromRuleBalanceThreshold(r notification.Rule) api.NotificationRuleBalanceThreshold", + "line": 319 + }, + { + "kind": "func", + "name": "FromRuleEntitlementReset", + "signature": "func FromRuleEntitlementReset(r notification.Rule) api.NotificationRuleEntitlementReset", + "line": 358 + }, + { + "kind": "func", + "name": "FromRuleInvoiceCreated", + "signature": "func FromRuleInvoiceCreated(r notification.Rule) api.NotificationRuleInvoiceCreated", + "line": 396 + }, + { + "kind": "func", + "name": "FromRuleInvoiceUpdated", + "signature": "func FromRuleInvoiceUpdated(r notification.Rule) api.NotificationRuleInvoiceUpdated", + "line": 420 + }, + { + "kind": "func", + "name": "FromEvent", + "signature": "func FromEvent(e notification.Event) (api.NotificationEvent, error)", + "line": 444 + }, + { + "kind": "func", + "name": "AsEventDeliveryAttempts", + "signature": "func AsEventDeliveryAttempts(attempts []notification.EventDeliveryAttempt) []api.NotificationEventDeliveryAttempt", + "line": 546 + }, + { + "kind": "func", + "name": "FromEventType", + "signature": "func FromEventType(t notification.EventType) (api.NotificationEventType, error)", + "line": 567 + }, + { + "kind": "func", + "name": "FromEventAsBalanceThresholdPayload", + "signature": "func FromEventAsBalanceThresholdPayload(e notification.Event) (api.NotificationEventBalanceThresholdPayload, error)", + "line": 582 + }, + { + "kind": "func", + "name": "FromEventAsEntitlementResetPayload", + "signature": "func FromEventAsEntitlementResetPayload(e notification.Event) (api.NotificationEventResetPayload, error)", + "line": 602 + }, + { + "kind": "func", + "name": "FromEventAsInvoiceCreatedPayload", + "signature": "func FromEventAsInvoiceCreatedPayload(e notification.Event) (api.NotificationEventInvoiceCreatedPayload, error)", + "line": 621 + }, + { + "kind": "func", + "name": "FromEventAsInvoiceUpdatedPayload", + "signature": "func FromEventAsInvoiceUpdatedPayload(e notification.Event) (api.NotificationEventInvoiceUpdatedPayload, error)", + "line": 634 + } + ], + "line_count": 645 + }, + "openmeter/notification/httpdriver/mapping_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "invoiceEvent", + "signature": "func invoiceEvent(invoice *notification.InvoicePayload) notification.Event", + "line": 15 + }, + { + "kind": "func", + "name": "TestFromEventAsInvoiceCreatedPayload", + "signature": "func TestFromEventAsInvoiceCreatedPayload(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestFromEventAsInvoiceUpdatedPayload", + "signature": "func TestFromEventAsInvoiceUpdatedPayload(t *testing.T)", + "line": 51 + } + ], + "line_count": 72 + }, + "openmeter/notification/httpdriver/rule.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListRules", + "signature": "func (h *handler) ListRules() ListRulesHandler", + "line": 28 + }, + { + "kind": "func", + "name": "CreateRule", + "signature": "func (h *handler) CreateRule() CreateRuleHandler", + "line": 90 + }, + { + "kind": "func", + "name": "UpdateRule", + "signature": "func (h *handler) UpdateRule() UpdateRuleHandler", + "line": 150 + }, + { + "kind": "func", + "name": "DeleteRule", + "signature": "func (h *handler) DeleteRule() DeleteRuleHandler", + "line": 210 + }, + { + "kind": "func", + "name": "GetRule", + "signature": "func (h *handler) GetRule() GetRuleHandler", + "line": 246 + }, + { + "kind": "struct", + "name": "TestRuleRequest", + "signature": "type TestRuleRequest struct", + "line": 280 + }, + { + "kind": "func", + "name": "TestRule", + "signature": "func (h *handler) TestRule() TestRuleHandler", + "line": 292 + } + ], + "line_count": 352 + }, + "openmeter/notification/internal/rule.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TestEventGenerator", + "signature": "type TestEventGenerator struct", + "line": 25 + }, + { + "kind": "func", + "name": "NewTestEventGenerator", + "signature": "func NewTestEventGenerator(billingService billing.Service) *TestEventGenerator", + "line": 29 + }, + { + "kind": "struct", + "name": "EventGeneratorInput", + "signature": "type EventGeneratorInput struct", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i EventGeneratorInput) Validate() error", + "line": 41 + }, + { + "kind": "func", + "name": "Generate", + "signature": "func (t *TestEventGenerator) Generate(ctx context.Context, in EventGeneratorInput) (notification.EventPayload, error)", + "line": 53 + }, + { + "kind": "func", + "name": "newTestBalanceThresholdPayload", + "signature": "func (t *TestEventGenerator) newTestBalanceThresholdPayload() notification.EventPayload", + "line": 70 + }, + { + "kind": "func", + "name": "newTestEntitlementResetPayload", + "signature": "func (t *TestEventGenerator) newTestEntitlementResetPayload() notification.EventPayload", + "line": 83 + }, + { + "kind": "func", + "name": "newTestInvoicePayload", + "signature": "func (t *TestEventGenerator) newTestInvoicePayload(ctx context.Context, namespace string, eventType notification.EventType) (notification.EventPayload, error)", + "line": 183 + } + ], + "line_count": 248 + }, + "openmeter/notification/invoice.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "InvoicePayload", + "signature": "type InvoicePayload struct", + "line": 18 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (ip InvoicePayload) ValidateWith(validators ...models.ValidatorFunc[InvoicePayload]) error", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (ip InvoicePayload) Validate() error", + "line": 26 + }, + { + "kind": "struct", + "name": "InvoiceRuleConfig", + "signature": "type InvoiceRuleConfig struct", + "line": 35 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (c InvoiceRuleConfig) ValidateWith(validators ...models.ValidatorFunc[InvoiceRuleConfig]) error", + "line": 37 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c InvoiceRuleConfig) Validate() error", + "line": 41 + } + ], + "line_count": 43 + }, + "openmeter/notification/repository.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Repository", + "signature": "type Repository interface", + "line": 10 + }, + { + "kind": "interface", + "name": "ChannelRepository", + "signature": "type ChannelRepository interface", + "line": 18 + }, + { + "kind": "interface", + "name": "RuleRepository", + "signature": "type RuleRepository interface", + "line": 26 + }, + { + "kind": "interface", + "name": "EventRepository", + "signature": "type EventRepository interface", + "line": 34 + } + ], + "line_count": 41 + }, + "openmeter/notification/rule.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "Rule", + "signature": "type Rule struct", + "line": 17 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (r Rule) ValidateWith(validators ...models.ValidatorFunc[Rule]) error", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Rule) Validate() error", + "line": 39 + }, + { + "kind": "struct", + "name": "RuleConfigMeta", + "signature": "type RuleConfigMeta struct", + "line": 66 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (m RuleConfigMeta) ValidateWith(validators ...models.ValidatorFunc[RuleConfigMeta]) error", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m RuleConfigMeta) Validate() error", + "line": 74 + }, + { + "kind": "struct", + "name": "RuleConfig", + "signature": "type RuleConfig struct", + "line": 84 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (c RuleConfig) ValidateWith(validators ...models.ValidatorFunc[RuleConfig]) error", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c RuleConfig) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "ListRulesInput", + "signature": "type ListRulesInput struct", + "line": 130 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i ListRulesInput) ValidateWith(validators ...models.ValidatorFunc[ListRulesInput]) error", + "line": 143 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListRulesInput) Validate() error", + "line": 147 + }, + { + "kind": "struct", + "name": "CreateRuleInput", + "signature": "type CreateRuleInput struct", + "line": 158 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i CreateRuleInput) ValidateWith(validators ...models.ValidatorFunc[CreateRuleInput]) error", + "line": 177 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateRuleInput) Validate() error", + "line": 183 + }, + { + "kind": "struct", + "name": "UpdateRuleInput", + "signature": "type UpdateRuleInput struct", + "line": 218 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i UpdateRuleInput) ValidateWith(validators ...models.ValidatorFunc[UpdateRuleInput]) error", + "line": 237 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateRuleInput) Validate() error", + "line": 241 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (i GetRuleInput) ValidateWith(validators ...models.ValidatorFunc[GetRuleInput]) error", + "line": 282 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetRuleInput) Validate() error", + "line": 286 + } + ], + "line_count": 305 + }, + "openmeter/notification/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/feature\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 18 + }, + { + "kind": "interface", + "name": "ChannelService", + "signature": "type ChannelService interface", + "line": 26 + }, + { + "kind": "interface", + "name": "RuleService", + "signature": "type RuleService interface", + "line": 34 + }, + { + "kind": "interface", + "name": "EventService", + "signature": "type EventService interface", + "line": 42 + }, + { + "kind": "interface", + "name": "FeatureService", + "signature": "type FeatureService interface", + "line": 52 + } + ], + "line_count": 54 + }, + "openmeter/notification/service/channel.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListChannels", + "signature": "func (s Service) ListChannels(ctx context.Context, params notification.ListChannelsInput) (notification.ListChannelsResult, error)", + "line": 16 + }, + { + "kind": "func", + "name": "CreateChannel", + "signature": "func (s Service) CreateChannel(ctx context.Context, params notification.CreateChannelInput) (*notification.Channel, error)", + "line": 24 + }, + { + "kind": "func", + "name": "DeleteChannel", + "signature": "func (s Service) DeleteChannel(ctx context.Context, params notification.DeleteChannelInput) error", + "line": 96 + }, + { + "kind": "func", + "name": "GetChannel", + "signature": "func (s Service) GetChannel(ctx context.Context, params notification.GetChannelInput) (*notification.Channel, error)", + "line": 149 + }, + { + "kind": "func", + "name": "UpdateChannel", + "signature": "func (s Service) UpdateChannel(ctx context.Context, params notification.UpdateChannelInput) (*notification.Channel, error)", + "line": 157 + } + ], + "line_count": 248 + }, + "openmeter/notification/service/deliverystatus.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateEventDeliveryStatus", + "signature": "func (s Service) UpdateEventDeliveryStatus(ctx context.Context, params notification.UpdateEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 11 + }, + { + "kind": "func", + "name": "ListEventsDeliveryStatus", + "signature": "func (s Service) ListEventsDeliveryStatus(ctx context.Context, params notification.ListEventsDeliveryStatusInput) (notification.ListEventsDeliveryStatusResult, error)", + "line": 23 + }, + { + "kind": "func", + "name": "GetEventDeliveryStatus", + "signature": "func (s Service) GetEventDeliveryStatus(ctx context.Context, params notification.GetEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 31 + } + ], + "line_count": 37 + }, + "openmeter/notification/service/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListEvents", + "signature": "func (s Service) ListEvents(ctx context.Context, params notification.ListEventsInput) (notification.ListEventsResult, error)", + "line": 17 + }, + { + "kind": "func", + "name": "GetEvent", + "signature": "func (s Service) GetEvent(ctx context.Context, params notification.GetEventInput) (*notification.Event, error)", + "line": 25 + }, + { + "kind": "func", + "name": "CreateEvent", + "signature": "func (s Service) CreateEvent(ctx context.Context, params notification.CreateEventInput) (*notification.Event, error)", + "line": 33 + }, + { + "kind": "func", + "name": "ResendEvent", + "signature": "func (s Service) ResendEvent(ctx context.Context, params notification.ResendEventInput) error", + "line": 73 + } + ], + "line_count": 154 + }, + "openmeter/notification/service/rule.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListRules", + "signature": "func (s Service) ListRules(ctx context.Context, params notification.ListRulesInput) (notification.ListRulesResult, error)", + "line": 18 + }, + { + "kind": "func", + "name": "CreateRule", + "signature": "func (s Service) CreateRule(ctx context.Context, params notification.CreateRuleInput) (*notification.Rule, error)", + "line": 81 + }, + { + "kind": "func", + "name": "DeleteRule", + "signature": "func (s Service) DeleteRule(ctx context.Context, params notification.DeleteRuleInput) error", + "line": 140 + }, + { + "kind": "func", + "name": "GetRule", + "signature": "func (s Service) GetRule(ctx context.Context, params notification.GetRuleInput) (*notification.Rule, error)", + "line": 175 + }, + { + "kind": "func", + "name": "UpdateRule", + "signature": "func (s Service) UpdateRule(ctx context.Context, params notification.UpdateRuleInput) (*notification.Rule, error)", + "line": 183 + } + ], + "line_count": 308 + }, + "openmeter/notification/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 20 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 29 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 38 + }, + { + "kind": "func", + "name": "ListFeature", + "signature": "func (s Service) ListFeature(ctx context.Context, namespace string, features ...string) ([]feature.Feature, error)", + "line": 63 + } + ], + "line_count": 74 + }, + "openmeter/notification/utils.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ChannelTypes", + "signature": "func ChannelTypes(channels []Channel) []ChannelType", + "line": 10 + }, + { + "kind": "func", + "name": "ChannelIDsByType", + "signature": "func ChannelIDsByType(channels []Channel, channelType ChannelType) []string", + "line": 27 + }, + { + "kind": "func", + "name": "DeliveryStatusStates", + "signature": "func DeliveryStatusStates(statuses []EventDeliveryStatus) []EventDeliveryStatusState", + "line": 42 + }, + { + "kind": "func", + "name": "interfaceMapToStringMap", + "signature": "func interfaceMapToStringMap(m map[string]interface{}, strict bool) (map[string]string, error)", + "line": 58 + }, + { + "kind": "func", + "name": "StrictInterfaceMapToStringMap", + "signature": "func StrictInterfaceMapToStringMap(m map[string]interface{}) (map[string]string, error)", + "line": 88 + }, + { + "kind": "func", + "name": "InterfaceMapToStringMap", + "signature": "func InterfaceMapToStringMap(m map[string]interface{}) map[string]string", + "line": 92 + }, + { + "kind": "struct", + "name": "ChannelIDsDifference", + "signature": "type ChannelIDsDifference struct", + "line": 142 + }, + { + "kind": "func", + "name": "Has", + "signature": "func (d ChannelIDsDifference) Has(id string) bool", + "line": 146 + }, + { + "kind": "func", + "name": "HasChanged", + "signature": "func (d ChannelIDsDifference) HasChanged() bool", + "line": 150 + }, + { + "kind": "func", + "name": "InAdditions", + "signature": "func (d ChannelIDsDifference) InAdditions(id string) bool", + "line": 154 + }, + { + "kind": "func", + "name": "InRemovals", + "signature": "func (d ChannelIDsDifference) InRemovals(id string) bool", + "line": 158 + }, + { + "kind": "func", + "name": "Additions", + "signature": "func (d ChannelIDsDifference) Additions() []string", + "line": 162 + }, + { + "kind": "func", + "name": "Removals", + "signature": "func (d ChannelIDsDifference) Removals() []string", + "line": 166 + }, + { + "kind": "func", + "name": "All", + "signature": "func (d ChannelIDsDifference) All() []string", + "line": 170 + }, + { + "kind": "func", + "name": "NewChannelIDsDifference", + "signature": "func NewChannelIDsDifference(new, old []string) *ChannelIDsDifference", + "line": 174 + } + ], + "line_count": 193 + }, + "openmeter/notification/utils_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestChannelIDsDifference", + "signature": "func TestChannelIDsDifference(t *testing.T)", + "line": 9 + } + ], + "line_count": 85 + }, + "openmeter/notification/webhook/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "IsNotImplemented", + "signature": "func IsNotImplemented(err error) bool", + "line": 11 + }, + { + "kind": "func", + "name": "IgnoreNotImplemented", + "signature": "func IgnoreNotImplemented(err error) error", + "line": 15 + }, + { + "kind": "struct", + "name": "ValidationError", + "signature": "type ValidationError struct", + "line": 25 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ValidationError) Error() string", + "line": 29 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e ValidationError) Unwrap() error", + "line": 33 + }, + { + "kind": "func", + "name": "NewValidationError", + "signature": "func NewValidationError(err error) error", + "line": 37 + }, + { + "kind": "func", + "name": "IsValidationError", + "signature": "func IsValidationError(err error) bool", + "line": 45 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 49 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e NotFoundError) Error() string", + "line": 53 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e NotFoundError) Unwrap() error", + "line": 57 + }, + { + "kind": "func", + "name": "NewNotFoundError", + "signature": "func NewNotFoundError(err error) error", + "line": 61 + }, + { + "kind": "func", + "name": "IsNotFoundError", + "signature": "func IsNotFoundError(err error) bool", + "line": 69 + }, + { + "kind": "struct", + "name": "RetryableError", + "signature": "type RetryableError struct", + "line": 79 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e RetryableError) Error() string", + "line": 85 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e RetryableError) Unwrap() error", + "line": 89 + }, + { + "kind": "func", + "name": "RetryAfter", + "signature": "func (e RetryableError) RetryAfter() time.Duration", + "line": 93 + }, + { + "kind": "func", + "name": "IsRetryableError", + "signature": "func IsRetryableError(err error) bool", + "line": 97 + }, + { + "kind": "func", + "name": "NewRetryableError", + "signature": "func NewRetryableError(err error, after time.Duration) error", + "line": 103 + }, + { + "kind": "struct", + "name": "MessageAlreadyExistsError", + "signature": "type MessageAlreadyExistsError struct", + "line": 118 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e MessageAlreadyExistsError) Error() string", + "line": 123 + }, + { + "kind": "func", + "name": "NewMessageAlreadyExistsError", + "signature": "func NewMessageAlreadyExistsError(namespace string, eventID string) error", + "line": 127 + }, + { + "kind": "func", + "name": "IsMessageAlreadyExistsError", + "signature": "func IsMessageAlreadyExistsError(err error) bool", + "line": 134 + }, + { + "kind": "struct", + "name": "UnrecoverableError", + "signature": "type UnrecoverableError struct", + "line": 138 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e UnrecoverableError) Error() string", + "line": 142 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e UnrecoverableError) Unwrap() error", + "line": 146 + }, + { + "kind": "func", + "name": "IsUnrecoverableError", + "signature": "func IsUnrecoverableError(err error) bool", + "line": 150 + }, + { + "kind": "func", + "name": "NewUnrecoverableError", + "signature": "func NewUnrecoverableError(err error) error", + "line": 154 + }, + { + "kind": "func", + "name": "IsMaxChannelsPerWebhookExceededError", + "signature": "func IsMaxChannelsPerWebhookExceededError(err error) bool", + "line": 166 + } + ], + "line_count": 168 + }, + "openmeter/notification/webhook/events.go": { + "header": "var NotificationEventTypes = []EventType{\n\tEventTypeEntitlementsBalanceThreshold,\n\tEventTypeEntitlementsReset,", + "symbols": [], + "line_count": 54 + }, + "openmeter/notification/webhook/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Webhook", + "signature": "type Webhook struct", + "line": 14 + }, + { + "kind": "struct", + "name": "ListWebhooksInput", + "signature": "type ListWebhooksInput struct", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListWebhooksInput) Validate() error", + "line": 40 + }, + { + "kind": "struct", + "name": "CreateWebhookInput", + "signature": "type CreateWebhookInput struct", + "line": 52 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateWebhookInput) Validate() error", + "line": 67 + }, + { + "kind": "struct", + "name": "UpdateWebhookInput", + "signature": "type UpdateWebhookInput struct", + "line": 89 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateWebhookInput) Validate() error", + "line": 104 + }, + { + "kind": "struct", + "name": "UpdateWebhookChannelsInput", + "signature": "type UpdateWebhookChannelsInput struct", + "line": 132 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateWebhookChannelsInput) Validate() error", + "line": 140 + }, + { + "kind": "struct", + "name": "GetWebhookInput", + "signature": "type GetWebhookInput struct", + "line": 156 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetWebhookInput) Validate() error", + "line": 162 + }, + { + "kind": "struct", + "name": "MessageDeliveryStatus", + "signature": "type MessageDeliveryStatus struct", + "line": 180 + }, + { + "kind": "struct", + "name": "Message", + "signature": "type Message struct", + "line": 187 + }, + { + "kind": "struct", + "name": "SendMessageInput", + "signature": "type SendMessageInput struct", + "line": 211 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SendMessageInput) Validate() error", + "line": 220 + }, + { + "kind": "struct", + "name": "ExpandParams", + "signature": "type ExpandParams struct", + "line": 242 + }, + { + "kind": "struct", + "name": "GetMessageInput", + "signature": "type GetMessageInput struct", + "line": 251 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetMessageInput) Validate() error", + "line": 260 + }, + { + "kind": "struct", + "name": "ResendMessageInput", + "signature": "type ResendMessageInput struct", + "line": 276 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ResendMessageInput) Validate() error", + "line": 284 + }, + { + "kind": "struct", + "name": "RegisterEventTypesInputs", + "signature": "type RegisterEventTypesInputs struct", + "line": 302 + }, + { + "kind": "struct", + "name": "EventType", + "signature": "type EventType struct", + "line": 312 + }, + { + "kind": "interface", + "name": "EventTypeHandler", + "signature": "type EventTypeHandler interface", + "line": 321 + }, + { + "kind": "interface", + "name": "WebhookHandler", + "signature": "type WebhookHandler interface", + "line": 325 + }, + { + "kind": "interface", + "name": "MessageHandler", + "signature": "type MessageHandler interface", + "line": 334 + }, + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 340 + } + ], + "line_count": 349 + }, + "openmeter/notification/webhook/noop/noop.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/notification/webhook\"", + "symbols": [ + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 13 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(logger *slog.Logger) *Handler", + "line": 17 + }, + { + "kind": "func", + "name": "RegisterEventTypes", + "signature": "func (h Handler) RegisterEventTypes(ctx context.Context, params webhook.RegisterEventTypesInputs) error", + "line": 23 + }, + { + "kind": "func", + "name": "CreateWebhook", + "signature": "func (h Handler) CreateWebhook(ctx context.Context, params webhook.CreateWebhookInput) (*webhook.Webhook, error)", + "line": 31 + }, + { + "kind": "func", + "name": "UpdateWebhook", + "signature": "func (h Handler) UpdateWebhook(ctx context.Context, params webhook.UpdateWebhookInput) (*webhook.Webhook, error)", + "line": 37 + }, + { + "kind": "func", + "name": "UpdateWebhookChannels", + "signature": "func (h Handler) UpdateWebhookChannels(ctx context.Context, params webhook.UpdateWebhookChannelsInput) (*webhook.Webhook, error)", + "line": 43 + }, + { + "kind": "func", + "name": "DeleteWebhook", + "signature": "func (h Handler) DeleteWebhook(ctx context.Context, params webhook.DeleteWebhookInput) error", + "line": 49 + }, + { + "kind": "func", + "name": "GetWebhook", + "signature": "func (h Handler) GetWebhook(ctx context.Context, params webhook.GetWebhookInput) (*webhook.Webhook, error)", + "line": 55 + }, + { + "kind": "func", + "name": "ListWebhooks", + "signature": "func (h Handler) ListWebhooks(ctx context.Context, params webhook.ListWebhooksInput) ([]webhook.Webhook, error)", + "line": 61 + }, + { + "kind": "func", + "name": "SendMessage", + "signature": "func (h Handler) SendMessage(ctx context.Context, params webhook.SendMessageInput) (*webhook.Message, error)", + "line": 67 + }, + { + "kind": "func", + "name": "GetMessage", + "signature": "func (h Handler) GetMessage(ctx context.Context, params webhook.GetMessageInput) (*webhook.Message, error)", + "line": 73 + }, + { + "kind": "func", + "name": "ResendMessage", + "signature": "func (h Handler) ResendMessage(ctx context.Context, params webhook.ResendMessageInput) error", + "line": 79 + } + ], + "line_count": 83 + }, + "openmeter/notification/webhook/secret/secret.go": { + "header": "\t\"crypto/rand\"\n\t\"encoding/base64\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "NewSigningSecret", + "signature": "func NewSigningSecret(size int) (string, error)", + "line": 14 + }, + { + "kind": "func", + "name": "NewSigningSecretWithDefaultSize", + "signature": "func NewSigningSecretWithDefaultSize() (string, error)", + "line": 24 + }, + { + "kind": "func", + "name": "ValidateSigningSecret", + "signature": "func ValidateSigningSecret(secret string) error", + "line": 32 + } + ], + "line_count": 45 + }, + "openmeter/notification/webhook/svix/annotations.go": { + "header": "const (\n\tAnnotationMessageID = \"svix.message.id\"\n\tAnnotationMessageEventID = \"svix.message.event_id\"", + "symbols": [], + "line_count": 15 + }, + "openmeter/notification/webhook/svix/application.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "CreateApplication", + "signature": "func (h svixHandler) CreateApplication(ctx context.Context, id string) (*svix.ApplicationOut, error)", + "line": 17 + } + ], + "line_count": 50 + }, + "openmeter/notification/webhook/svix/event.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tsvix \"github.com/svix/svix-webhooks/go\"", + "symbols": [ + { + "kind": "func", + "name": "RegisterEventTypes", + "signature": "func (h svixHandler) RegisterEventTypes(ctx context.Context, params webhook.RegisterEventTypesInputs) error", + "line": 16 + } + ], + "line_count": 46 + }, + "openmeter/notification/webhook/svix/internal/error.go": { + "header": "\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SvixError", + "signature": "type SvixError struct", + "line": 19 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e SvixError) Error() string", + "line": 27 + }, + { + "kind": "func", + "name": "Wrap", + "signature": "func (e SvixError) Wrap() error", + "line": 38 + }, + { + "kind": "struct", + "name": "SvixErrorBody", + "signature": "type SvixErrorBody struct", + "line": 53 + }, + { + "kind": "struct", + "name": "SvixValidationErrorBody", + "signature": "type SvixValidationErrorBody struct", + "line": 58 + }, + { + "kind": "struct", + "name": "SvixValidationError", + "signature": "type SvixValidationError struct", + "line": 62 + }, + { + "kind": "func", + "name": "WrapSvixError", + "signature": "func WrapSvixError(err error) error", + "line": 68 + } + ], + "line_count": 110 + }, + "openmeter/notification/webhook/svix/message.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "SendMessage", + "signature": "func (h svixHandler) SendMessage(ctx context.Context, params webhook.SendMessageInput) (*webhook.Message, error)", + "line": 23 + }, + { + "kind": "func", + "name": "getDeliveryStatus", + "signature": "func (h svixHandler) getDeliveryStatus(ctx context.Context, namespace, eventID, channelID string) ([]webhook.MessageDeliveryStatus, error)", + "line": 105 + }, + { + "kind": "func", + "name": "GetMessage", + "signature": "func (h svixHandler) GetMessage(ctx context.Context, params webhook.GetMessageInput) (*webhook.Message, error)", + "line": 258 + }, + { + "kind": "func", + "name": "ResendMessage", + "signature": "func (h svixHandler) ResendMessage(ctx context.Context, params webhook.ResendMessageInput) error", + "line": 316 + }, + { + "kind": "func", + "name": "deliveryStateFromSvixMessageStatus", + "signature": "func deliveryStateFromSvixMessageStatus(status svixmodels.MessageStatus) notification.EventDeliveryStatusState", + "line": 354 + } + ], + "line_count": 365 + }, + "openmeter/notification/webhook/svix/svix.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SvixConfig", + "signature": "type SvixConfig struct", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SvixConfig) Validate() error", + "line": 37 + }, + { + "kind": "func", + "name": "IsEnabled", + "signature": "func (c SvixConfig) IsEnabled() bool", + "line": 53 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 57 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 67 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (webhook.Handler, error)", + "line": 85 + }, + { + "kind": "struct", + "name": "svixHandler", + "signature": "type svixHandler struct", + "line": 124 + }, + { + "kind": "func", + "name": "NewHandler", + "signature": "func NewHandler(config Config) (webhook.Handler, error)", + "line": 130 + } + ], + "line_count": 140 + }, + "openmeter/notification/webhook/svix/webhook.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetOrUpdateEndpointHeaders", + "signature": "func (h svixHandler) GetOrUpdateEndpointHeaders(ctx context.Context, appID, endpointID string, headers map[string]string) (map[string]string, error)", + "line": 24 + }, + { + "kind": "func", + "name": "GetOrUpdateEndpointSecret", + "signature": "func (h svixHandler) GetOrUpdateEndpointSecret(ctx context.Context, appID, endpointID string, secret *string) (string, error)", + "line": 75 + }, + { + "kind": "func", + "name": "CreateWebhook", + "signature": "func (h svixHandler) CreateWebhook(ctx context.Context, params webhook.CreateWebhookInput) (*webhook.Webhook, error)", + "line": 126 + }, + { + "kind": "func", + "name": "UpdateWebhook", + "signature": "func (h svixHandler) UpdateWebhook(ctx context.Context, params webhook.UpdateWebhookInput) (*webhook.Webhook, error)", + "line": 232 + }, + { + "kind": "func", + "name": "UpdateWebhookChannels", + "signature": "func (h svixHandler) UpdateWebhookChannels(ctx context.Context, params webhook.UpdateWebhookChannelsInput) (*webhook.Webhook, error)", + "line": 313 + }, + { + "kind": "func", + "name": "DeleteWebhook", + "signature": "func (h svixHandler) DeleteWebhook(ctx context.Context, params webhook.DeleteWebhookInput) error", + "line": 382 + }, + { + "kind": "func", + "name": "GetWebhook", + "signature": "func (h svixHandler) GetWebhook(ctx context.Context, params webhook.GetWebhookInput) (*webhook.Webhook, error)", + "line": 412 + }, + { + "kind": "func", + "name": "ListWebhooks", + "signature": "func (h svixHandler) ListWebhooks(ctx context.Context, params webhook.ListWebhooksInput) ([]webhook.Webhook, error)", + "line": 455 + }, + { + "kind": "func", + "name": "WebhookFromSvixEndpointOut", + "signature": "func WebhookFromSvixEndpointOut(e *svix.EndpointOut) *webhook.Webhook", + "line": 556 + } + ], + "line_count": 570 + }, + "openmeter/portal/adapter/adapter.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/portal\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (portal.Service, error)", + "line": 27 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 40 + } + ], + "line_count": 43 + }, + "openmeter/portal/adapter/noop.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/portal\"", + "symbols": [ + { + "kind": "struct", + "name": "noopAdapter", + "signature": "type noopAdapter struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewNoop", + "signature": "func NewNoop() portal.Service", + "line": 14 + }, + { + "kind": "func", + "name": "CreateToken", + "signature": "func (a *noopAdapter) CreateToken(ctx context.Context, input portal.CreateTokenInput) (*portal.PortalToken, error)", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *noopAdapter) Validate(ctx context.Context, tokenString string) (*portal.PortalTokenClaims, error)", + "line": 22 + }, + { + "kind": "func", + "name": "ListTokens", + "signature": "func (a *noopAdapter) ListTokens(ctx context.Context, input portal.ListTokensInput) (pagination.Result[*portal.PortalToken], error)", + "line": 26 + }, + { + "kind": "func", + "name": "InvalidateToken", + "signature": "func (a *noopAdapter) InvalidateToken(ctx context.Context, input portal.InvalidateTokenInput) error", + "line": 30 + } + ], + "line_count": 32 + }, + "openmeter/portal/adapter/token.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "JTWPortalTokenClaims", + "signature": "type JTWPortalTokenClaims struct", + "line": 18 + }, + { + "kind": "func", + "name": "CreateToken", + "signature": "func (a *adapter) CreateToken(ctx context.Context, input portal.CreateTokenInput) (*portal.PortalToken, error)", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *adapter) Validate(ctx context.Context, tokenString string) (*portal.PortalTokenClaims, error)", + "line": 76 + }, + { + "kind": "func", + "name": "ListTokens", + "signature": "func (a *adapter) ListTokens(context.Context, portal.ListTokensInput) (pagination.Result[*portal.PortalToken], error)", + "line": 113 + }, + { + "kind": "func", + "name": "InvalidateToken", + "signature": "func (a *adapter) InvalidateToken(ctx context.Context, input portal.InvalidateTokenInput) error", + "line": 120 + } + ], + "line_count": 122 + }, + "openmeter/portal/authenticator/authenticator.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetAuthenticatedSubject", + "signature": "func GetAuthenticatedSubject(ctx context.Context) (string, bool)", + "line": 28 + }, + { + "kind": "struct", + "name": "Authenticator", + "signature": "type Authenticator struct", + "line": 40 + }, + { + "kind": "func", + "name": "NewAuthenticator", + "signature": "func NewAuthenticator(portal portal.Service, errorHandler errorsx.Handler) Authenticator", + "line": 45 + }, + { + "kind": "func", + "name": "NewAuthenticatorMiddlewareFunc", + "signature": "func (a Authenticator) NewAuthenticatorMiddlewareFunc(swagger *openapi3.T) func(http.Handler) http.Handler", + "line": 55 + }, + { + "kind": "func", + "name": "verifyPortalToken", + "signature": "func (a Authenticator) verifyPortalToken(w http.ResponseWriter, r *http.Request) (*http.Request, error)", + "line": 83 + }, + { + "kind": "func", + "name": "getSecurityRequirements", + "signature": "func (a Authenticator) getSecurityRequirements(swagger *openapi3.T, r *http.Request) (*openapi3.SecurityRequirements, error)", + "line": 124 + }, + { + "kind": "func", + "name": "validateSecurityRequirements", + "signature": "func (a Authenticator) validateSecurityRequirements(securityRequirements openapi3.SecurityRequirements, w http.ResponseWriter, r *http.Request) (*http.Request, error)", + "line": 147 + }, + { + "kind": "func", + "name": "validateSecurityRequirement", + "signature": "func (a Authenticator) validateSecurityRequirement(securityRequirement openapi3.SecurityRequirement, w http.ResponseWriter, r *http.Request) (*http.Request, error)", + "line": 168 + }, + { + "kind": "func", + "name": "getAuthenticatorFunc", + "signature": "func (a Authenticator) getAuthenticatorFunc(securitySchemaName string) func(w http.ResponseWriter, r *http.Request) (*http.Request, error)", + "line": 189 + } + ], + "line_count": 196 + }, + "openmeter/portal/httphandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 15 + }, + { + "kind": "interface", + "name": "TokenHandler", + "signature": "type TokenHandler interface", + "line": 19 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 27 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 34 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tportalService portal.Service,\n\tmeterService meter.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 43 + } + ], + "line_count": 55 + }, + "openmeter/portal/httphandler/mapping.go": { + "header": "\t\"time\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "toAPIPortalToken", + "signature": "func toAPIPortalToken(t *portal.PortalToken) api.PortalToken", + "line": 13 + } + ], + "line_count": 28 + }, + "openmeter/portal/httphandler/portal.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "struct", + "name": "ListTokensRequest", + "signature": "type ListTokensRequest struct", + "line": 26 + }, + { + "kind": "func", + "name": "ListTokens", + "signature": "func (h *handler) ListTokens() ListTokensHandler", + "line": 32 + }, + { + "kind": "func", + "name": "CreateToken", + "signature": "func (h *handler) CreateToken() CreateTokenHandler", + "line": 80 + }, + { + "kind": "func", + "name": "InvalidateToken", + "signature": "func (h *handler) InvalidateToken() InvalidateTokenHandler", + "line": 161 + } + ], + "line_count": 197 + }, + "openmeter/portal/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 13 + }, + { + "kind": "interface", + "name": "PortalTokenService", + "signature": "type PortalTokenService interface", + "line": 18 + }, + { + "kind": "struct", + "name": "PortalTokenClaims", + "signature": "type PortalTokenClaims struct", + "line": 26 + }, + { + "kind": "func", + "name": "GetAllowedMeterSlugs", + "signature": "func (c *PortalTokenClaims) GetAllowedMeterSlugs() ([]string, error)", + "line": 45 + }, + { + "kind": "struct", + "name": "PortalToken", + "signature": "type PortalToken struct", + "line": 50 + }, + { + "kind": "struct", + "name": "CreateTokenInput", + "signature": "type CreateTokenInput struct", + "line": 60 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateTokenInput) Validate() error", + "line": 67 + }, + { + "kind": "struct", + "name": "ListTokensInput", + "signature": "type ListTokensInput struct", + "line": 98 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListTokensInput) Validate() error", + "line": 103 + }, + { + "kind": "struct", + "name": "InvalidateTokenInput", + "signature": "type InvalidateTokenInput struct", + "line": 122 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InvalidateTokenInput) Validate() error", + "line": 128 + } + ], + "line_count": 152 + }, + "openmeter/productcatalog/adapter/feature.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "featureDBAdapter", + "signature": "type featureDBAdapter struct", + "line": 31 + }, + { + "kind": "func", + "name": "NewPostgresFeatureRepo", + "signature": "func NewPostgresFeatureRepo(db *db.Client, logger *slog.Logger) feature.FeatureRepo", + "line": 36 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (c *featureDBAdapter) CreateFeature(ctx context.Context, feat feature.CreateFeatureInputs) (feature.Feature, error)", + "line": 43 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (c *featureDBAdapter) UpdateFeature(ctx context.Context, input feature.UpdateFeatureInputs) (feature.Feature, error)", + "line": 100 + }, + { + "kind": "func", + "name": "GetByIdOrKey", + "signature": "func (c *featureDBAdapter) GetByIdOrKey(ctx context.Context, namespace string, idOrKey string, includeArchived bool) (*feature.Feature, error)", + "line": 170 + }, + { + "kind": "func", + "name": "ArchiveFeature", + "signature": "func (c *featureDBAdapter) ArchiveFeature(ctx context.Context, params feature.ArchiveFeatureInput) error", + "line": 201 + }, + { + "kind": "func", + "name": "HasActiveFeatureForMeter", + "signature": "func (c *featureDBAdapter) HasActiveFeatureForMeter(ctx context.Context, namespace string, meterID string) (bool, error)", + "line": 272 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (c *featureDBAdapter) ListFeatures(ctx context.Context, params feature.ListFeaturesParams) (pagination.Result[feature.Feature], error)", + "line": 285 + }, + { + "kind": "func", + "name": "MapFeatureEntity", + "signature": "func MapFeatureEntity(entity *db.Feature) feature.Feature", + "line": 374 + } + ], + "line_count": 429 + }, + "openmeter/productcatalog/adapter/feature_test.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreateFeature", + "signature": "func TestCreateFeature(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "TestUpdateFeature", + "signature": "func TestUpdateFeature(t *testing.T)", + "line": 435 + }, + { + "kind": "func", + "name": "TestArchiveFeature", + "signature": "func TestArchiveFeature(t *testing.T)", + "line": 823 + }, + { + "kind": "func", + "name": "TestFetchingArchivedFeature", + "signature": "func TestFetchingArchivedFeature(t *testing.T)", + "line": 930 + } + ], + "line_count": 1012 + }, + "openmeter/productcatalog/adapter/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Tx", + "signature": "func (e *featureDBAdapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 17 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (e *featureDBAdapter) WithTx(ctx context.Context, tx *entutils.TxDriver) feature.FeatureRepo", + "line": 27 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (e *featureDBAdapter) Self() feature.FeatureRepo", + "line": 32 + } + ], + "line_count": 34 + }, + "openmeter/productcatalog/addon.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (s AddonStatus) Values() []AddonStatus", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s AddonStatus) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "AddonMeta", + "signature": "type AddonMeta struct", + "line": 47 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m AddonMeta) Validate() error", + "line": 75 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m AddonMeta) Equal(v AddonMeta) bool", + "line": 101 + }, + { + "kind": "func", + "name": "Status", + "signature": "func (m AddonMeta) Status() AddonStatus", + "line": 142 + }, + { + "kind": "func", + "name": "StatusAt", + "signature": "func (m AddonMeta) StatusAt(t time.Time) AddonStatus", + "line": 147 + }, + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 176 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (a Addon) ValidateWith(validators ...models.ValidatorFunc[Addon]) error", + "line": 183 + }, + { + "kind": "func", + "name": "ValidationErrors", + "signature": "func (a Addon) ValidationErrors() (models.ValidationIssues, error)", + "line": 189 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a Addon) Validate() error", + "line": 193 + }, + { + "kind": "func", + "name": "Publishable", + "signature": "func (a Addon) Publishable() error", + "line": 203 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (a Addon) Equal(v Addon) bool", + "line": 213 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a AddonInstanceType) Validate() error", + "line": 228 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (a AddonInstanceType) Values() []string", + "line": 237 + }, + { + "kind": "func", + "name": "ValidateAddonMeta", + "signature": "func ValidateAddonMeta() models.ValidatorFunc[Addon]", + "line": 246 + }, + { + "kind": "func", + "name": "ValidateAddonRateCards", + "signature": "func ValidateAddonRateCards() models.ValidatorFunc[Addon]", + "line": 254 + }, + { + "kind": "func", + "name": "ValidateAddonStatusPublishable", + "signature": "func ValidateAddonStatusPublishable() models.ValidatorFunc[Addon]", + "line": 264 + }, + { + "kind": "func", + "name": "ValidateAddonWithStatus", + "signature": "func ValidateAddonWithStatus(allowed ...AddonStatus) models.ValidatorFunc[Addon]", + "line": 274 + }, + { + "kind": "func", + "name": "ValidateAddonHasSingleBillingCadence", + "signature": "func ValidateAddonHasSingleBillingCadence() models.ValidatorFunc[Addon]", + "line": 285 + }, + { + "kind": "func", + "name": "ValidateAddonHasCompatiblePrices", + "signature": "func ValidateAddonHasCompatiblePrices() models.ValidatorFunc[Addon]", + "line": 298 + }, + { + "kind": "func", + "name": "AddonRateCardMatcherForAGivenPlanRateCard", + "signature": "func AddonRateCardMatcherForAGivenPlanRateCard(planRateCard RateCard) func(addonRateCard RateCard) bool", + "line": 324 + }, + { + "kind": "func", + "name": "ValidateAddonWithFeatures", + "signature": "func ValidateAddonWithFeatures(ctx context.Context, resolver NamespacedFeatureResolver) models.ValidatorFunc[Addon]", + "line": 330 + } + ], + "line_count": 334 + }, + "openmeter/productcatalog/addon/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (addon.Repository, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 55 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 72 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/productcatalog/addon/adapter/adapter_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPostgresAdapter", + "signature": "func TestPostgresAdapter(t *testing.T)", + "line": 28 + } + ], + "line_count": 442 + }, + "openmeter/productcatalog/addon/adapter/addon.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ListAddons", + "signature": "func (a *adapter) ListAddons(ctx context.Context, params addon.ListAddonsInput) (pagination.Result[addon.Addon], error)", + "line": 28 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (a *adapter) CreateAddon(ctx context.Context, params addon.CreateAddonInput) (*addon.Addon, error)", + "line": 154 + }, + { + "kind": "func", + "name": "rateCardBulkCreate", + "signature": "func rateCardBulkCreate(c *entdb.AddonRateCardClient, rateCards productcatalog.RateCards, addonID string, ns string) ([]*entdb.AddonRateCardCreate, error)", + "line": 219 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (a *adapter) DeleteAddon(ctx context.Context, params addon.DeleteAddonInput) error", + "line": 259 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (a *adapter) GetAddon(ctx context.Context, params addon.GetAddonInput) (*addon.Addon, error)", + "line": 306 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (a *adapter) UpdateAddon(ctx context.Context, params addon.UpdateAddonInput) (*addon.Addon, error)", + "line": 436 + } + ], + "line_count": 550 + }, + "openmeter/productcatalog/addon/adapter/mapping.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "FromAddonRow", + "signature": "func FromAddonRow(a entdb.Addon) (*addon.Addon, error)", + "line": 17 + }, + { + "kind": "func", + "name": "FromAddonRateCardRow", + "signature": "func FromAddonRateCardRow(r entdb.AddonRateCard) (*addon.RateCard, error)", + "line": 87 + }, + { + "kind": "func", + "name": "FromPlanAddonRow", + "signature": "func FromPlanAddonRow(a entdb.PlanAddon) (*addon.Plan, error)", + "line": 173 + }, + { + "kind": "func", + "name": "FromPlanRow", + "signature": "func FromPlanRow(p entdb.Plan) (*productcatalog.Plan, error)", + "line": 211 + }, + { + "kind": "func", + "name": "FromPlanPhaseRow", + "signature": "func FromPlanPhaseRow(p entdb.PlanPhase) (*productcatalog.Phase, error)", + "line": 258 + }, + { + "kind": "func", + "name": "FromPlanRateCardRow", + "signature": "func FromPlanRateCardRow(r entdb.PlanRateCard) (productcatalog.RateCard, error)", + "line": 298 + }, + { + "kind": "func", + "name": "asAddonRateCardRow", + "signature": "func asAddonRateCardRow(r productcatalog.RateCard) (entdb.AddonRateCard, error)", + "line": 353 + } + ], + "line_count": 391 + }, + "openmeter/productcatalog/addon/addon.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 15 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (a Addon) ValidateWith(validators ...models.ValidatorFunc[Addon]) error", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a Addon) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "AsProductCatalogAddon", + "signature": "func (a Addon) AsProductCatalogAddon() productcatalog.Addon", + "line": 57 + } + ], + "line_count": 62 + }, + "openmeter/productcatalog/addon/assert.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "AssertAddonCreateInputEqual", + "signature": "func AssertAddonCreateInputEqual(t *testing.T, i CreateAddonInput, a Addon)", + "line": 13 + }, + { + "kind": "func", + "name": "AssertAddonUpdateInputEqual", + "signature": "func AssertAddonUpdateInputEqual(t *testing.T, i UpdateAddonInput, a Addon)", + "line": 27 + }, + { + "kind": "func", + "name": "AssertAddonEqual", + "signature": "func AssertAddonEqual(t *testing.T, expected, actual Addon)", + "line": 53 + }, + { + "kind": "func", + "name": "AssertAddonRateCardsEqual", + "signature": "func AssertAddonRateCardsEqual(t *testing.T, r1, r2 productcatalog.RateCards)", + "line": 66 + }, + { + "kind": "func", + "name": "AssertRateCardEqual", + "signature": "func AssertRateCardEqual(t *testing.T, r1, r2 productcatalog.RateCard)", + "line": 105 + } + ], + "line_count": 132 + }, + "openmeter/productcatalog/addon/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundErrorParams", + "signature": "type NotFoundErrorParams struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewNotFoundError", + "signature": "func NewNotFoundError(e NotFoundErrorParams) *NotFoundError", + "line": 19 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 53 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 57 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *NotFoundError) Unwrap() error", + "line": 61 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 65 + } + ], + "line_count": 72 + }, + "openmeter/productcatalog/addon/errors_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsNotFoundError", + "signature": "func TestIsNotFoundError(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestIsNotFoundError_String", + "signature": "func TestIsNotFoundError_String(t *testing.T)", + "line": 49 + } + ], + "line_count": 94 + }, + "openmeter/productcatalog/addon/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "NewAddonCreateEvent", + "signature": "func NewAddonCreateEvent(ctx context.Context, addon *Addon) AddonCreateEvent", + "line": 24 + }, + { + "kind": "struct", + "name": "AddonCreateEvent", + "signature": "type AddonCreateEvent struct", + "line": 32 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AddonCreateEvent) EventName() string", + "line": 37 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AddonCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 45 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AddonCreateEvent) Validate() error", + "line": 56 + }, + { + "kind": "func", + "name": "NewAddonUpdateEvent", + "signature": "func NewAddonUpdateEvent(ctx context.Context, addon *Addon) AddonUpdateEvent", + "line": 67 + }, + { + "kind": "struct", + "name": "AddonUpdateEvent", + "signature": "type AddonUpdateEvent struct", + "line": 75 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AddonUpdateEvent) EventName() string", + "line": 80 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AddonUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 88 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AddonUpdateEvent) Validate() error", + "line": 99 + }, + { + "kind": "func", + "name": "NewAddonDeleteEvent", + "signature": "func NewAddonDeleteEvent(ctx context.Context, addon *Addon) AddonDeleteEvent", + "line": 110 + }, + { + "kind": "struct", + "name": "AddonDeleteEvent", + "signature": "type AddonDeleteEvent struct", + "line": 118 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AddonDeleteEvent) EventName() string", + "line": 123 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AddonDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 131 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AddonDeleteEvent) Validate() error", + "line": 142 + }, + { + "kind": "func", + "name": "NewAddonPublishEvent", + "signature": "func NewAddonPublishEvent(ctx context.Context, Addon *Addon) AddonPublishEvent", + "line": 157 + }, + { + "kind": "struct", + "name": "AddonPublishEvent", + "signature": "type AddonPublishEvent struct", + "line": 165 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AddonPublishEvent) EventName() string", + "line": 170 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AddonPublishEvent) EventMetadata() metadata.EventMetadata", + "line": 178 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AddonPublishEvent) Validate() error", + "line": 189 + }, + { + "kind": "func", + "name": "NewAddonArchiveEvent", + "signature": "func NewAddonArchiveEvent(ctx context.Context, Addon *Addon) AddonArchiveEvent", + "line": 200 + }, + { + "kind": "struct", + "name": "AddonArchiveEvent", + "signature": "type AddonArchiveEvent struct", + "line": 208 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e AddonArchiveEvent) EventName() string", + "line": 213 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e AddonArchiveEvent) EventMetadata() metadata.EventMetadata", + "line": 221 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e AddonArchiveEvent) Validate() error", + "line": 232 + } + ], + "line_count": 240 + }, + "openmeter/productcatalog/addon/httpdriver/addon.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListAddons", + "signature": "func (h *handler) ListAddons() ListAddonsHandler", + "line": 33 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (h *handler) CreateAddon() CreateAddonHandler", + "line": 114 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (h *handler) UpdateAddon() UpdateAddonHandler", + "line": 163 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (h *handler) DeleteAddon() DeleteAddonHandler", + "line": 213 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (h *handler) GetAddon() GetAddonHandler", + "line": 263 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (h *handler) PublishAddon() PublishAddonHandler", + "line": 307 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (h *handler) ArchiveAddon() ArchiveAddonHandler", + "line": 352 + } + ], + "line_count": 387 + }, + "openmeter/productcatalog/addon/httpdriver/driver.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "AddonHandler", + "signature": "type AddonHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 30 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 36 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice addon.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 45 + } + ], + "line_count": 55 + }, + "openmeter/productcatalog/addon/httpdriver/mapping.go": { + "header": "\t\"fmt\"\n\t\"github.com/invopop/gobl/currency\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "FromAddon", + "signature": "func FromAddon(a addon.Addon) (api.Addon, error)", + "line": 16 + }, + { + "kind": "func", + "name": "AsCreateAddonRequest", + "signature": "func AsCreateAddonRequest(a api.AddonCreate, namespace string) (CreateAddonRequest, error)", + "line": 61 + }, + { + "kind": "func", + "name": "AsUpdateAddonRequest", + "signature": "func AsUpdateAddonRequest(a api.AddonReplaceUpdate, namespace string, addonID string) (UpdateAddonRequest, error)", + "line": 93 + } + ], + "line_count": 113 + }, + "openmeter/productcatalog/addon/plan.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Plan) Validate() error", + "line": 21 + } + ], + "line_count": 33 + }, + "openmeter/productcatalog/addon/ratecard.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "RateCardManagedFields", + "signature": "type RateCardManagedFields struct", + "line": 17 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m RateCardManagedFields) Equal(v RateCardManagedFields) bool", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m RateCardManagedFields) Validate() error", + "line": 37 + }, + { + "kind": "interface", + "name": "ManagedRateCard", + "signature": "type ManagedRateCard interface", + "line": 51 + }, + { + "kind": "struct", + "name": "RateCard", + "signature": "type RateCard struct", + "line": 60 + }, + { + "kind": "func", + "name": "ManagedFields", + "signature": "func (r *RateCard) ManagedFields() RateCardManagedFields", + "line": 65 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (r *RateCard) Equal(v productcatalog.RateCard) bool", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r *RateCard) Validate() error", + "line": 83 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (r *RateCard) MarshalJSON() ([]byte, error)", + "line": 101 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (r *RateCard) UnmarshalJSON(b []byte) error", + "line": 117 + }, + { + "kind": "func", + "name": "At", + "signature": "func (c RateCards) At(idx int) RateCard", + "line": 154 + }, + { + "kind": "func", + "name": "AsProductCatalogRateCards", + "signature": "func (c RateCards) AsProductCatalogRateCards() productcatalog.RateCards", + "line": 158 + }, + { + "kind": "func", + "name": "SingleBillingCadence", + "signature": "func (c RateCards) SingleBillingCadence() bool", + "line": 168 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c RateCards) Equal(v RateCards) bool", + "line": 172 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c RateCards) Validate() error", + "line": 208 + } + ], + "line_count": 218 + }, + "openmeter/productcatalog/addon/ratecard_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRateCard_JSON", + "signature": "func TestRateCard_JSON(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestFlatFeeRateCard", + "signature": "func TestFlatFeeRateCard(t *testing.T)", + "line": 150 + }, + { + "kind": "func", + "name": "TestUsageBasedRateCard", + "signature": "func TestUsageBasedRateCard(t *testing.T)", + "line": 268 + } + ], + "line_count": 399 + }, + "openmeter/productcatalog/addon/repository.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Repository", + "signature": "type Repository interface", + "line": 12 + } + ], + "line_count": 20 + }, + "openmeter/productcatalog/addon/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (f OrderBy) Values() []OrderBy", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f OrderBy) Validate() error", + "line": 49 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 57 + }, + { + "kind": "struct", + "name": "ListAddonsInput", + "signature": "type ListAddonsInput struct", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListAddonsInput) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "ListAddonsStatusFilter", + "signature": "type ListAddonsStatusFilter struct", + "line": 133 + }, + { + "kind": "struct", + "name": "inputOptions", + "signature": "type inputOptions struct", + "line": 144 + }, + { + "kind": "struct", + "name": "CreateAddonInput", + "signature": "type CreateAddonInput struct", + "line": 152 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAddonInput) Validate() error", + "line": 159 + }, + { + "kind": "struct", + "name": "UpdateAddonInput", + "signature": "type UpdateAddonInput struct", + "line": 187 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UpdateAddonInput) Equal(p Addon) bool", + "line": 214 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAddonInput) Validate() error", + "line": 250 + }, + { + "kind": "struct", + "name": "ExpandFields", + "signature": "type ExpandFields struct", + "line": 295 + }, + { + "kind": "struct", + "name": "GetAddonInput", + "signature": "type GetAddonInput struct", + "line": 299 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetAddonInput) Validate() error", + "line": 316 + }, + { + "kind": "struct", + "name": "DeleteAddonInput", + "signature": "type DeleteAddonInput struct", + "line": 330 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteAddonInput) Validate() error", + "line": 334 + }, + { + "kind": "struct", + "name": "PublishAddonInput", + "signature": "type PublishAddonInput struct", + "line": 348 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PublishAddonInput) Validate() error", + "line": 355 + }, + { + "kind": "struct", + "name": "ArchiveAddonInput", + "signature": "type ArchiveAddonInput struct", + "line": 395 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ArchiveAddonInput) Validate() error", + "line": 403 + }, + { + "kind": "struct", + "name": "NextAddonInput", + "signature": "type NextAddonInput struct", + "line": 427 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NextAddonInput) Validate() error", + "line": 439 + } + ], + "line_count": 451 + }, + "openmeter/productcatalog/addon/service/addon.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListAddons", + "signature": "func (s service) ListAddons(ctx context.Context, params addon.ListAddonsInput) (pagination.Result[addon.Addon], error)", + "line": 21 + }, + { + "kind": "func", + "name": "resolveTaxCodes", + "signature": "func (s service) resolveTaxCodes(ctx context.Context, namespace string, rateCards *productcatalog.RateCards) error", + "line": 36 + }, + { + "kind": "func", + "name": "Len", + "signature": "func (a addonVersions) Len() int", + "line": 84 + }, + { + "kind": "func", + "name": "Less", + "signature": "func (a addonVersions) Less(i, j int) bool", + "line": 88 + }, + { + "kind": "func", + "name": "Swap", + "signature": "func (a addonVersions) Swap(i, j int)", + "line": 92 + }, + { + "kind": "func", + "name": "Sort", + "signature": "func (a addonVersions) Sort()", + "line": 97 + }, + { + "kind": "func", + "name": "Latest", + "signature": "func (a addonVersions) Latest() *addon.Addon", + "line": 102 + }, + { + "kind": "func", + "name": "HasDraft", + "signature": "func (a addonVersions) HasDraft() bool", + "line": 114 + }, + { + "kind": "func", + "name": "getAddonVersions", + "signature": "func (s service) getAddonVersions(ctx context.Context, namespace, key string) (addonVersions, error)", + "line": 124 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (s service) CreateAddon(ctx context.Context, params addon.CreateAddonInput) (*addon.Addon, error)", + "line": 139 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (s service) DeleteAddon(ctx context.Context, params addon.DeleteAddonInput) error", + "line": 199 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (s service) GetAddon(ctx context.Context, params addon.GetAddonInput) (*addon.Addon, error)", + "line": 282 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (s service) UpdateAddon(ctx context.Context, params addon.UpdateAddonInput) (*addon.Addon, error)", + "line": 312 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (s service) PublishAddon(ctx context.Context, params addon.PublishAddonInput) (*addon.Addon, error)", + "line": 377 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (s service) ArchiveAddon(ctx context.Context, params addon.ArchiveAddonInput) (*addon.Addon, error)", + "line": 496 + }, + { + "kind": "func", + "name": "NextAddon", + "signature": "func (s service) NextAddon(ctx context.Context, params addon.NextAddonInput) (*addon.Addon, error)", + "line": 561 + } + ], + "line_count": 672 + }, + "openmeter/productcatalog/addon/service/service.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 13 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (addon.Service, error)", + "line": 22 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 55 + } + ], + "line_count": 62 + }, + "openmeter/productcatalog/addon/service/service_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddonService", + "signature": "func TestAddonService(t *testing.T)", + "line": 30 + }, + { + "kind": "func", + "name": "TestAddonService_List", + "signature": "func TestAddonService_List(t *testing.T)", + "line": 448 + } + ], + "line_count": 614 + }, + "openmeter/productcatalog/addon/service/taxcode_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "newTestAddonFlatRateCard", + "signature": "func newTestAddonFlatRateCard(feat feature.Feature, tc *productcatalog.TaxConfig) productcatalog.RateCard", + "line": 26 + }, + { + "kind": "func", + "name": "newTestAddonInput", + "signature": "func newTestAddonInput(t *testing.T, namespace string, rcs ...productcatalog.RateCard) addon.CreateAddonInput", + "line": 43 + }, + { + "kind": "func", + "name": "getFirstAddonRCTaxConfig", + "signature": "func getFirstAddonRCTaxConfig(t *testing.T, a *addon.Addon) *productcatalog.TaxConfig", + "line": 48 + }, + { + "kind": "func", + "name": "findAddonTaxCodeByStripeCode", + "signature": "func findAddonTaxCodeByStripeCode(t *testing.T, ctx context.Context, svc taxcode.Service, namespace string, stripeCode string) (taxcode.TaxCode, error)", + "line": 54 + }, + { + "kind": "func", + "name": "assertAddonRCDBCols", + "signature": "func assertAddonRCDBCols(t *testing.T, ctx context.Context, env *pctestutils.TestEnv, addonID string, rcKey string, wantTaxCodeID *string, wantBehavior *productcatalog.TaxBehavior)", + "line": 65 + }, + { + "kind": "func", + "name": "TestAddonTaxCodeDualWrite", + "signature": "func TestAddonTaxCodeDualWrite(t *testing.T)", + "line": 79 + }, + { + "kind": "func", + "name": "TestAddonTaxCodeBackfill", + "signature": "func TestAddonTaxCodeBackfill(t *testing.T)", + "line": 578 + }, + { + "kind": "func", + "name": "TestAddonWithPlanTaxCode", + "signature": "func TestAddonWithPlanTaxCode(t *testing.T)", + "line": 765 + } + ], + "line_count": 911 + }, + "openmeter/productcatalog/addon/validators.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "IsAddonDeleted", + "signature": "func IsAddonDeleted(at time.Time) models.ValidatorFunc[Addon]", + "line": 13 + }, + { + "kind": "func", + "name": "HasAddonStatus", + "signature": "func HasAddonStatus(statuses ...productcatalog.AddonStatus) models.ValidatorFunc[Addon]", + "line": 23 + } + ], + "line_count": 31 + }, + "openmeter/productcatalog/alignment.go": { + "header": "\t\"github.com/openmeterio/openmeter/pkg/datetime\"\n)\nfunc ValidateBillingCadencesAlign(planBillingCadence datetime.ISODuration, rateCardBillingCadence datetime.ISODuration) error {", + "symbols": [ + { + "kind": "func", + "name": "ValidateBillingCadencesAlign", + "signature": "func ValidateBillingCadencesAlign(planBillingCadence datetime.ISODuration, rateCardBillingCadence datetime.ISODuration) error", + "line": 12 + } + ], + "line_count": 35 + }, + "openmeter/productcatalog/discount.go": { + "header": "\t\"errors\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "PercentageDiscount", + "signature": "type PercentageDiscount struct", + "line": 21 + }, + { + "kind": "func", + "name": "Hash", + "signature": "func (d PercentageDiscount) Hash() hasher.Hash", + "line": 26 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (d PercentageDiscount) ValidateWith(v ...models.ValidatorFunc[PercentageDiscount]) error", + "line": 34 + }, + { + "kind": "func", + "name": "PercentageDiscountWithValidValue", + "signature": "func PercentageDiscountWithValidValue() models.ValidatorFunc[PercentageDiscount]", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d PercentageDiscount) Validate() error", + "line": 48 + }, + { + "kind": "func", + "name": "ValidateForPrice", + "signature": "func (d PercentageDiscount) ValidateForPrice(_ *Price) error", + "line": 52 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d PercentageDiscount) Clone() PercentageDiscount", + "line": 56 + }, + { + "kind": "struct", + "name": "UsageDiscount", + "signature": "type UsageDiscount struct", + "line": 69 + }, + { + "kind": "func", + "name": "Hash", + "signature": "func (d UsageDiscount) Hash() hasher.Hash", + "line": 73 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (d UsageDiscount) ValidateWith(v ...models.ValidatorFunc[UsageDiscount]) error", + "line": 81 + }, + { + "kind": "func", + "name": "UsageDiscountWithValidValue", + "signature": "func UsageDiscountWithValidValue() models.ValidatorFunc[UsageDiscount]", + "line": 85 + }, + { + "kind": "func", + "name": "UsageDiscountWithPrice", + "signature": "func UsageDiscountWithPrice(price *Price) models.ValidatorFunc[UsageDiscount]", + "line": 95 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d UsageDiscount) Validate() error", + "line": 116 + }, + { + "kind": "func", + "name": "ValidateForPrice", + "signature": "func (d UsageDiscount) ValidateForPrice(price *Price) error", + "line": 120 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d UsageDiscount) Clone() UsageDiscount", + "line": 124 + }, + { + "kind": "struct", + "name": "Discounts", + "signature": "type Discounts struct", + "line": 136 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (d Discounts) Equal(v Discounts) bool", + "line": 141 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d Discounts) Clone() Discounts", + "line": 153 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d *Discounts) Validate() error", + "line": 167 + }, + { + "kind": "func", + "name": "ValidateForPrice", + "signature": "func (d Discounts) ValidateForPrice(price *Price) error", + "line": 202 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (d Discounts) IsEmpty() bool", + "line": 237 + } + ], + "line_count": 239 + }, + "openmeter/productcatalog/discount_test.go": { + "header": "\t\"testing\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\tjson \"github.com/json-iterator/go\"", + "symbols": [ + { + "kind": "func", + "name": "TestDiscount_JSON", + "signature": "func TestDiscount_JSON(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestDiscountsEqual", + "signature": "func TestDiscountsEqual(t *testing.T)", + "line": 54 + }, + { + "kind": "func", + "name": "TestDiscountsValidateForPrice", + "signature": "func TestDiscountsValidateForPrice(t *testing.T)", + "line": 101 + } + ], + "line_count": 161 + }, + "openmeter/productcatalog/driver/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "getErrorEncoder", + "signature": "func getErrorEncoder() encoder.ErrorEncoder", + "line": 14 + } + ], + "line_count": 24 + }, + "openmeter/productcatalog/driver/feature.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "FeatureHandler", + "signature": "type FeatureHandler interface", + "line": 27 + }, + { + "kind": "struct", + "name": "featureHandlers", + "signature": "type featureHandlers struct", + "line": 34 + }, + { + "kind": "func", + "name": "NewFeatureHandler", + "signature": "func NewFeatureHandler(\n\tconnector feature.FeatureConnector,\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tmeterService meter.Service,\n\tllmcostService llmcost.Service,\n\toptions ...httptransport.HandlerOption,\n) FeatureHandler", + "line": 42 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (h *featureHandlers) GetFeature() GetFeatureHandler", + "line": 66 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (h *featureHandlers) CreateFeature() CreateFeatureHandler", + "line": 116 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (h *featureHandlers) ListFeatures() ListFeaturesHandler", + "line": 169 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (h *featureHandlers) DeleteFeature() DeleteFeatureHandler", + "line": 258 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *featureHandlers) resolveNamespace(ctx context.Context) (string, error)", + "line": 284 + } + ], + "line_count": 291 + }, + "openmeter/productcatalog/driver/parser.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "MapFeatureToResponse", + "signature": "func MapFeatureToResponse(f feature.Feature) (api.Feature, error)", + "line": 18 + }, + { + "kind": "func", + "name": "MapFeatureCreateInputsRequest", + "signature": "func MapFeatureCreateInputsRequest(namespace string, f api.FeatureCreateInputs, meterID *string) (feature.CreateFeatureInputs, error)", + "line": 46 + }, + { + "kind": "func", + "name": "domainUnitCostToAPI", + "signature": "func domainUnitCostToAPI(u *feature.UnitCost) (api.FeatureUnitCost, error)", + "line": 74 + }, + { + "kind": "func", + "name": "apiUnitCostToDomain", + "signature": "func apiUnitCostToDomain(u *api.FeatureUnitCost) (*feature.UnitCost, error)", + "line": 114 + }, + { + "kind": "func", + "name": "resolveLLMPricing", + "signature": "func resolveLLMPricing(ctx context.Context, svc llmcost.Service, feat *feature.Feature) *llmcost.ModelPricing", + "line": 163 + }, + { + "kind": "func", + "name": "extractEqFilterValue", + "signature": "func extractEqFilterValue(filters feature.MeterGroupByFilters, key string) string", + "line": 201 + }, + { + "kind": "func", + "name": "enrichFeatureResponseWithPricing", + "signature": "func enrichFeatureResponseWithPricing(resp *api.Feature, pricing *llmcost.ModelPricing)", + "line": 215 + } + ], + "line_count": 247 + }, + "openmeter/productcatalog/effectiveperiod.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "EffectivePeriod", + "signature": "type EffectivePeriod struct", + "line": 20 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p EffectivePeriod) ValidateWith(v ...models.ValidatorFunc[EffectivePeriod]) error", + "line": 28 + }, + { + "kind": "func", + "name": "AsPeriod", + "signature": "func (p EffectivePeriod) AsPeriod() timeutil.OpenPeriod", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p EffectivePeriod) Validate() error", + "line": 39 + }, + { + "kind": "func", + "name": "ValidateEffectivePeriod", + "signature": "func ValidateEffectivePeriod() models.ValidatorFunc[EffectivePeriod]", + "line": 43 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p EffectivePeriod) Equal(o EffectivePeriod) bool", + "line": 71 + } + ], + "line_count": 74 + }, + "openmeter/productcatalog/effectiveperiod_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestEffectivePeriod_Validate", + "signature": "func TestEffectivePeriod_Validate(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestEffectivePeriod_Equal", + "signature": "func TestEffectivePeriod_Equal(t *testing.T)", + "line": 95 + } + ], + "line_count": 147 + }, + "openmeter/productcatalog/entitlement.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "entitlementTemplater", + "signature": "type entitlementTemplater interface", + "line": 16 + }, + { + "kind": "struct", + "name": "EntitlementTemplate", + "signature": "type EntitlementTemplate struct", + "line": 34 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (e *EntitlementTemplate) Equal(v *EntitlementTemplate) bool", + "line": 41 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (e *EntitlementTemplate) MarshalJSON() ([]byte, error)", + "line": 66 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (e *EntitlementTemplate) UnmarshalJSON(bytes []byte) error", + "line": 108 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e *EntitlementTemplate) Validate() error", + "line": 149 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (e *EntitlementTemplate) Type() entitlement.EntitlementType", + "line": 166 + }, + { + "kind": "func", + "name": "AsMetered", + "signature": "func (e *EntitlementTemplate) AsMetered() (MeteredEntitlementTemplate, error)", + "line": 170 + }, + { + "kind": "func", + "name": "AsStatic", + "signature": "func (e *EntitlementTemplate) AsStatic() (StaticEntitlementTemplate, error)", + "line": 185 + }, + { + "kind": "func", + "name": "AsBoolean", + "signature": "func (e *EntitlementTemplate) AsBoolean() (BooleanEntitlementTemplate, error)", + "line": 200 + }, + { + "kind": "func", + "name": "FromMetered", + "signature": "func (e *EntitlementTemplate) FromMetered(t MeteredEntitlementTemplate)", + "line": 215 + }, + { + "kind": "func", + "name": "FromStatic", + "signature": "func (e *EntitlementTemplate) FromStatic(t StaticEntitlementTemplate)", + "line": 220 + }, + { + "kind": "func", + "name": "FromBoolean", + "signature": "func (e *EntitlementTemplate) FromBoolean(t BooleanEntitlementTemplate)", + "line": 225 + }, + { + "kind": "struct", + "name": "MeteredEntitlementTemplate", + "signature": "type MeteredEntitlementTemplate struct", + "line": 253 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t *MeteredEntitlementTemplate) Equal(v *MeteredEntitlementTemplate) bool", + "line": 275 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t *MeteredEntitlementTemplate) Validate() error", + "line": 330 + }, + { + "kind": "struct", + "name": "StaticEntitlementTemplate", + "signature": "type StaticEntitlementTemplate struct", + "line": 362 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t *StaticEntitlementTemplate) Equal(v *StaticEntitlementTemplate) bool", + "line": 372 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t *StaticEntitlementTemplate) Validate() error", + "line": 388 + }, + { + "kind": "struct", + "name": "BooleanEntitlementTemplate", + "signature": "type BooleanEntitlementTemplate struct", + "line": 403 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t *BooleanEntitlementTemplate) Equal(v *BooleanEntitlementTemplate) bool", + "line": 408 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t *BooleanEntitlementTemplate) Validate() error", + "line": 420 + } + ], + "line_count": 422 + }, + "openmeter/productcatalog/entitlement_test.go": { + "header": "\t\"testing\"\n\tjson \"github.com/json-iterator/go\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestEntitlementTemplate_JSON", + "signature": "func TestEntitlementTemplate_JSON(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestEntitlementTemplateEqual", + "signature": "func TestEntitlementTemplateEqual(t *testing.T)", + "line": 68 + } + ], + "line_count": 153 + }, + "openmeter/productcatalog/errors.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"", + "symbols": [], + "line_count": 624 + }, + "openmeter/productcatalog/feature/connector.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateFeatureInputs", + "signature": "type CreateFeatureInputs struct", + "line": 23 + }, + { + "kind": "struct", + "name": "UpdateFeatureInputs", + "signature": "type UpdateFeatureInputs struct", + "line": 34 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateFeatureInputs) Validate() error", + "line": 40 + }, + { + "kind": "interface", + "name": "FeatureConnector", + "signature": "type FeatureConnector interface", + "line": 59 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (f FeatureOrderBy) Values() []FeatureOrderBy", + "line": 91 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FeatureOrderBy) Validate() error", + "line": 100 + }, + { + "kind": "struct", + "name": "ListFeaturesParams", + "signature": "type ListFeaturesParams struct", + "line": 108 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListFeaturesParams) Validate() error", + "line": 125 + }, + { + "kind": "struct", + "name": "featureConnector", + "signature": "type featureConnector struct", + "line": 160 + }, + { + "kind": "func", + "name": "NewFeatureConnector", + "signature": "func NewFeatureConnector(\n\tfeatureRepo FeatureRepo,\n\tmeterService meterpkg.Service,\n\tpublisher eventbus.Publisher,\n) FeatureConnector", + "line": 168 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (c *featureConnector) CreateFeature(ctx context.Context, feature CreateFeatureInputs) (Feature, error)", + "line": 188 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (c *featureConnector) UpdateFeature(ctx context.Context, input UpdateFeatureInputs) (Feature, error)", + "line": 278 + }, + { + "kind": "func", + "name": "ArchiveFeature", + "signature": "func (c *featureConnector) ArchiveFeature(ctx context.Context, featureID models.NamespacedID) error", + "line": 336 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (c *featureConnector) ListFeatures(ctx context.Context, params ListFeaturesParams) (pagination.Result[Feature], error)", + "line": 367 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (c *featureConnector) GetFeature(ctx context.Context, namespace string, idOrKey string, includeArchived IncludeArchivedFeature) (*Feature, error)", + "line": 376 + } + ], + "line_count": 382 + }, + "openmeter/productcatalog/feature/connector_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/oapi-codegen/nullable\"", + "symbols": [ + { + "kind": "func", + "name": "TestUpdateFeatureInputsValidate", + "signature": "func TestUpdateFeatureInputsValidate(t *testing.T)", + "line": 11 + } + ], + "line_count": 66 + }, + "openmeter/productcatalog/feature/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewFeatureCreateEvent", + "signature": "func NewFeatureCreateEvent(ctx context.Context, feature *Feature) FeatureCreateEvent", + "line": 22 + }, + { + "kind": "struct", + "name": "FeatureCreateEvent", + "signature": "type FeatureCreateEvent struct", + "line": 30 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e FeatureCreateEvent) EventName() string", + "line": 35 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e FeatureCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e FeatureCreateEvent) Validate() error", + "line": 54 + }, + { + "kind": "func", + "name": "NewFeatureUpdateEvent", + "signature": "func NewFeatureUpdateEvent(ctx context.Context, feature *Feature) FeatureUpdateEvent", + "line": 69 + }, + { + "kind": "struct", + "name": "FeatureUpdateEvent", + "signature": "type FeatureUpdateEvent struct", + "line": 77 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e FeatureUpdateEvent) EventName() string", + "line": 82 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e FeatureUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e FeatureUpdateEvent) Validate() error", + "line": 101 + }, + { + "kind": "func", + "name": "NewFeatureArchiveEvent", + "signature": "func NewFeatureArchiveEvent(ctx context.Context, feature *Feature) FeatureArchiveEvent", + "line": 116 + }, + { + "kind": "struct", + "name": "FeatureArchiveEvent", + "signature": "type FeatureArchiveEvent struct", + "line": 124 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e FeatureArchiveEvent) EventName() string", + "line": 129 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e FeatureArchiveEvent) EventMetadata() metadata.EventMetadata", + "line": 137 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e FeatureArchiveEvent) Validate() error", + "line": 148 + } + ], + "line_count": 164 + }, + "openmeter/productcatalog/feature/feature.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureNotFoundError", + "signature": "type FeatureNotFoundError struct", + "line": 12 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *FeatureNotFoundError) Error() string", + "line": 16 + }, + { + "kind": "struct", + "name": "FeatureInvalidFiltersError", + "signature": "type FeatureInvalidFiltersError struct", + "line": 20 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *FeatureInvalidFiltersError) Error() string", + "line": 25 + }, + { + "kind": "struct", + "name": "FeatureWithNameAlreadyExistsError", + "signature": "type FeatureWithNameAlreadyExistsError struct", + "line": 29 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *FeatureWithNameAlreadyExistsError) Error() string", + "line": 34 + }, + { + "kind": "struct", + "name": "FeatureInvalidMeterAggregationError", + "signature": "type FeatureInvalidMeterAggregationError struct", + "line": 40 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *FeatureInvalidMeterAggregationError) Error() string", + "line": 46 + }, + { + "kind": "struct", + "name": "ForbiddenError", + "signature": "type ForbiddenError struct", + "line": 57 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ForbiddenError) Error() string", + "line": 62 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f MeterGroupByFilters) Validate(meter meter.Meter) error", + "line": 69 + }, + { + "kind": "func", + "name": "ConvertMapStringToMeterGroupByFilters", + "signature": "func ConvertMapStringToMeterGroupByFilters(m map[string]string) MeterGroupByFilters", + "line": 91 + }, + { + "kind": "func", + "name": "ConvertMeterGroupByFiltersToMapString", + "signature": "func ConvertMeterGroupByFiltersToMapString(f MeterGroupByFilters) map[string]string", + "line": 106 + }, + { + "kind": "struct", + "name": "Feature", + "signature": "type Feature struct", + "line": 124 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f *Feature) Validate() error", + "line": 158 + } + ], + "line_count": 198 + }, + "openmeter/productcatalog/feature/featuremeter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "FeatureMeter", + "signature": "type FeatureMeter struct", + "line": 15 + }, + { + "kind": "interface", + "name": "FeatureMeters", + "signature": "type FeatureMeters interface", + "line": 20 + }, + { + "kind": "struct", + "name": "FeatureMeterCollection", + "signature": "type FeatureMeterCollection struct", + "line": 25 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (f FeatureMeterCollection) Get(featureKey string, requireMeter bool) (FeatureMeter, error)", + "line": 30 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (f FeatureMeterCollection) GetByID(featureID string, requireMeter bool) (FeatureMeter, error)", + "line": 43 + }, + { + "kind": "func", + "name": "ResolveFeatureMeters", + "signature": "func (c *featureConnector) ResolveFeatureMeters(ctx context.Context, namespace string, featureRefs ...ref.IDOrKey) (FeatureMeters, error)", + "line": 56 + }, + { + "kind": "func", + "name": "resolveFeatureMeters", + "signature": "func resolveFeatureMeters(features []Feature) FeatureMeterCollection", + "line": 138 + }, + { + "kind": "func", + "name": "ensureFeatureIDsResolved", + "signature": "func ensureFeatureIDsResolved(featureRefs []ref.IDOrKey, resolved FeatureMeterCollection) error", + "line": 159 + }, + { + "kind": "struct", + "name": "featureAccessor", + "signature": "type featureAccessor struct", + "line": 210 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (a featureAccessor) GetKey(f Feature) string", + "line": 214 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (a featureAccessor) GetDeletedAt(f Feature) *time.Time", + "line": 218 + }, + { + "kind": "func", + "name": "getLastFeatures", + "signature": "func getLastFeatures(features []Feature) map[string]Feature", + "line": 222 + } + ], + "line_count": 224 + }, + "openmeter/productcatalog/feature/featuremeter_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetLastFeatures", + "signature": "func TestGetLastFeatures(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestResolveFeatureMeters", + "signature": "func TestResolveFeatureMeters(t *testing.T)", + "line": 66 + } + ], + "line_count": 108 + }, + "openmeter/productcatalog/feature/meter_group_by_filters_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestMeterGroupByFiltersValidate", + "signature": "func TestMeterGroupByFiltersValidate(t *testing.T)", + "line": 13 + } + ], + "line_count": 50 + }, + "openmeter/productcatalog/feature/repository.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ArchiveFeatureInput", + "signature": "type ArchiveFeatureInput struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ArchiveFeatureInput) Validate() error", + "line": 19 + }, + { + "kind": "interface", + "name": "FeatureRepo", + "signature": "type FeatureRepo interface", + "line": 37 + } + ], + "line_count": 47 + }, + "openmeter/productcatalog/feature/unitcost.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "UnitCost", + "signature": "type UnitCost struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ManualUnitCost", + "signature": "type ManualUnitCost struct", + "line": 33 + }, + { + "kind": "struct", + "name": "LLMUnitCost", + "signature": "type LLMUnitCost struct", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u *UnitCost) Validate() error", + "line": 69 + }, + { + "kind": "func", + "name": "ValidateWithMeter", + "signature": "func (u *UnitCost) ValidateWithMeter(m meter.Meter) error", + "line": 145 + } + ], + "line_count": 187 + }, + "openmeter/productcatalog/featureresolver.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/feature\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "FeatureResolver", + "signature": "type FeatureResolver interface", + "line": 9 + }, + { + "kind": "interface", + "name": "NamespacedFeatureResolver", + "signature": "type NamespacedFeatureResolver interface", + "line": 15 + } + ], + "line_count": 19 + }, + "openmeter/productcatalog/featureresolver/ratecard.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ResolveFeaturesForRateCards", + "signature": "func ResolveFeaturesForRateCards(\n\tctx context.Context,\n\tresolver productcatalog.FeatureResolver,\n\tnamespace string,\n\trateCards *productcatalog.RateCards,\n) error", + "line": 15 + } + ], + "line_count": 116 + }, + "openmeter/productcatalog/featureresolver/ratecard_test.go": { + "header": "\t\"testing\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Test_ResolveFeaturesForRateCards", + "signature": "func Test_ResolveFeaturesForRateCards(t *testing.T)", + "line": 21 + } + ], + "line_count": 281 + }, + "openmeter/productcatalog/featureresolver/resolver.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New(service feature.FeatureConnector) (productcatalog.FeatureResolver, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "namespacedResolver", + "signature": "type namespacedResolver struct", + "line": 30 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func (n *namespacedResolver) Namespace() string", + "line": 35 + }, + { + "kind": "func", + "name": "Resolve", + "signature": "func (n *namespacedResolver) Resolve(ctx context.Context, id, key *string) (*feature.Feature, error)", + "line": 39 + }, + { + "kind": "func", + "name": "BatchResolve", + "signature": "func (n *namespacedResolver) BatchResolve(ctx context.Context, idOrKeys ...string) (map[string]*feature.Feature, error)", + "line": 43 + }, + { + "kind": "struct", + "name": "resolver", + "signature": "type resolver struct", + "line": 49 + }, + { + "kind": "func", + "name": "WithNamespace", + "signature": "func (r *resolver) WithNamespace(namespace string) productcatalog.NamespacedFeatureResolver", + "line": 53 + }, + { + "kind": "func", + "name": "Resolve", + "signature": "func (r *resolver) Resolve(ctx context.Context, namespace string, id, key *string) (*feature.Feature, error)", + "line": 60 + }, + { + "kind": "func", + "name": "BatchResolve", + "signature": "func (r *resolver) BatchResolve(ctx context.Context, namespace string, idsOrKeys ...string) (map[string]*feature.Feature, error)", + "line": 118 + } + ], + "line_count": 156 + }, + "openmeter/productcatalog/featureresolver/resolver_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Test_NamespacedFeatureResolver", + "signature": "func Test_NamespacedFeatureResolver(t *testing.T)", + "line": 19 + } + ], + "line_count": 187 + }, + "openmeter/productcatalog/http/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "func", + "name": "ValidationErrorEncoder", + "signature": "func ValidationErrorEncoder(kind ResourceKind) encoder.ErrorEncoder", + "line": 12 + }, + { + "kind": "struct", + "name": "validationError", + "signature": "type validationError struct", + "line": 31 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e validationError) Error() string", + "line": 36 + }, + { + "kind": "func", + "name": "validationErrorToExtensions", + "signature": "func validationErrorToExtensions(err validationError) map[string]interface", + "line": 40 + } + ], + "line_count": 53 + }, + "openmeter/productcatalog/http/mapping.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "FromRateCard", + "signature": "func FromRateCard(r productcatalog.RateCard) (api.RateCard, error)", + "line": 18 + }, + { + "kind": "func", + "name": "FromRateCardUsageBasedPrice", + "signature": "func FromRateCardUsageBasedPrice(price productcatalog.Price) (api.RateCardUsageBasedPrice, error)", + "line": 119 + }, + { + "kind": "func", + "name": "FromTaxConfig", + "signature": "func FromTaxConfig(c productcatalog.TaxConfig) api.TaxConfig", + "line": 238 + }, + { + "kind": "func", + "name": "FromPaymentTerm", + "signature": "func FromPaymentTerm(t productcatalog.PaymentTermType) api.PricePaymentTerm", + "line": 254 + }, + { + "kind": "func", + "name": "FromEntitlementTemplate", + "signature": "func FromEntitlementTemplate(t productcatalog.EntitlementTemplate) (api.RateCardEntitlement, error)", + "line": 265 + }, + { + "kind": "func", + "name": "FromDiscounts", + "signature": "func FromDiscounts(discounts productcatalog.Discounts) *api.Discounts", + "line": 321 + }, + { + "kind": "func", + "name": "AsRateCards", + "signature": "func AsRateCards(rcs []api.RateCard) (productcatalog.RateCards, error)", + "line": 342 + }, + { + "kind": "func", + "name": "AsRateCard", + "signature": "func AsRateCard(r api.RateCard) (productcatalog.RateCard, error)", + "line": 361 + }, + { + "kind": "func", + "name": "AsFlatFeeRateCard", + "signature": "func AsFlatFeeRateCard(flat api.RateCardFlatFee) (productcatalog.FlatFeeRateCard, error)", + "line": 397 + }, + { + "kind": "func", + "name": "AsUsageBasedRateCard", + "signature": "func AsUsageBasedRateCard(usage api.RateCardUsageBased) (productcatalog.UsageBasedRateCard, error)", + "line": 470 + }, + { + "kind": "func", + "name": "AsDiscounts", + "signature": "func AsDiscounts(discounts *api.Discounts) (productcatalog.Discounts, error)", + "line": 524 + }, + { + "kind": "func", + "name": "AsUsageDiscount", + "signature": "func AsUsageDiscount(d api.DiscountUsage) (productcatalog.UsageDiscount, error)", + "line": 548 + }, + { + "kind": "func", + "name": "AsPercentageDiscount", + "signature": "func AsPercentageDiscount(d api.DiscountPercentage) productcatalog.PercentageDiscount", + "line": 559 + }, + { + "kind": "func", + "name": "AsPrice", + "signature": "func AsPrice(p api.RateCardUsageBasedPrice) (*productcatalog.Price, error)", + "line": 565 + }, + { + "kind": "func", + "name": "AsPriceTier", + "signature": "func AsPriceTier(t api.PriceTier) (productcatalog.PriceTier, error)", + "line": 761 + }, + { + "kind": "func", + "name": "AsEntitlementTemplate", + "signature": "func AsEntitlementTemplate(e api.RateCardEntitlement, billingCadence *datetime.ISODuration) (*productcatalog.EntitlementTemplate, error)", + "line": 802 + }, + { + "kind": "func", + "name": "AsTaxConfig", + "signature": "func AsTaxConfig(c api.TaxConfig) productcatalog.TaxConfig", + "line": 877 + }, + { + "kind": "func", + "name": "FromMetadata", + "signature": "func FromMetadata(metadata models.Metadata) *api.Metadata", + "line": 892 + }, + { + "kind": "func", + "name": "FromValidationAttributes", + "signature": "func FromValidationAttributes(attrs models.Attributes) *api.Annotations", + "line": 907 + }, + { + "kind": "func", + "name": "FromAnnotations", + "signature": "func FromAnnotations(annotations models.Annotations) *api.Annotations", + "line": 921 + }, + { + "kind": "func", + "name": "FromValidationErrors", + "signature": "func FromValidationErrors(issues models.ValidationIssues) *[]api.ValidationError", + "line": 929 + } + ], + "line_count": 946 + }, + "openmeter/productcatalog/http/resource.go": { + "header": "type ResourceKind string\nconst (\n\tResourceKindPlan ResourceKind = \"plan\"", + "symbols": [], + "line_count": 8 + }, + "openmeter/productcatalog/phase.go": { + "header": "\t\"errors\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PhaseMeta", + "signature": "type PhaseMeta struct", + "line": 17 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p PhaseMeta) Equal(v PhaseMeta) bool", + "line": 35 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PhaseMeta) Validate() error", + "line": 60 + }, + { + "kind": "struct", + "name": "Phase", + "signature": "type Phase struct", + "line": 91 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p Phase) ValidateWith(v ...models.ValidatorFunc[Phase]) error", + "line": 98 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p Phase) Equal(v Phase) bool", + "line": 103 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Phase) Validate() error", + "line": 112 + }, + { + "kind": "func", + "name": "ValidatePhaseMeta", + "signature": "func ValidatePhaseMeta() models.ValidatorFunc[Phase]", + "line": 121 + }, + { + "kind": "func", + "name": "ValidatePhaseRateCards", + "signature": "func ValidatePhaseRateCards() models.ValidatorFunc[Phase]", + "line": 130 + } + ], + "line_count": 138 + }, + "openmeter/productcatalog/plan.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (s PlanStatus) Values() []PlanStatus", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s PlanStatus) Validate() error", + "line": 37 + }, + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 49 + }, + { + "kind": "func", + "name": "ValidationErrors", + "signature": "func (p Plan) ValidationErrors() (models.ValidationIssues, error)", + "line": 58 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p Plan) ValidateWith(validators ...models.ValidatorFunc[Plan]) error", + "line": 62 + }, + { + "kind": "func", + "name": "ValidatePlanMeta", + "signature": "func ValidatePlanMeta() models.ValidatorFunc[Plan]", + "line": 66 + }, + { + "kind": "func", + "name": "ValidatePlanPhases", + "signature": "func ValidatePlanPhases() models.ValidatorFunc[Plan]", + "line": 72 + }, + { + "kind": "func", + "name": "ValidatePlanBillingCadenceLiteral", + "signature": "func ValidatePlanBillingCadenceLiteral() models.ValidatorFunc[Plan]", + "line": 126 + }, + { + "kind": "func", + "name": "ValidatePlanHasAlignedBillingCadences", + "signature": "func ValidatePlanHasAlignedBillingCadences() models.ValidatorFunc[Plan]", + "line": 141 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Plan) Validate() error", + "line": 172 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p Plan) Equal(o Plan) bool", + "line": 182 + }, + { + "kind": "struct", + "name": "PlanMeta", + "signature": "type PlanMeta struct", + "line": 206 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PlanMeta) Validate() error", + "line": 238 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p PlanMeta) Equal(o PlanMeta) bool", + "line": 269 + }, + { + "kind": "func", + "name": "Status", + "signature": "func (p PlanMeta) Status() PlanStatus", + "line": 314 + }, + { + "kind": "func", + "name": "StatusAt", + "signature": "func (p PlanMeta) StatusAt(t time.Time) PlanStatus", + "line": 319 + }, + { + "kind": "func", + "name": "ValidatePlanWithFeatures", + "signature": "func ValidatePlanWithFeatures(ctx context.Context, resolver NamespacedFeatureResolver) models.ValidatorFunc[Plan]", + "line": 348 + } + ], + "line_count": 367 + }, + "openmeter/productcatalog/plan/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (plan.Repository, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 55 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 72 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/productcatalog/plan/adapter/adapter_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPostgresAdapter", + "signature": "func TestPostgresAdapter(t *testing.T)", + "line": 24 + }, + { + "kind": "struct", + "name": "createPlanVersionInput", + "signature": "type createPlanVersionInput struct", + "line": 387 + }, + { + "kind": "func", + "name": "createPlanVersion", + "signature": "func createPlanVersion(ctx context.Context, repo plan.Repository, in createPlanVersionInput) error", + "line": 394 + }, + { + "kind": "func", + "name": "testListPlanStatusFilter", + "signature": "func testListPlanStatusFilter(ctx context.Context, t *testing.T, repo plan.Repository)", + "line": 415 + } + ], + "line_count": 534 + }, + "openmeter/productcatalog/plan/adapter/mapping.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "FromPlanRow", + "signature": "func FromPlanRow(p entdb.Plan) (*plan.Plan, error)", + "line": 17 + }, + { + "kind": "func", + "name": "FromPlanAddonRow", + "signature": "func FromPlanAddonRow(a entdb.PlanAddon) (*plan.Addon, error)", + "line": 97 + }, + { + "kind": "func", + "name": "FromAddonRow", + "signature": "func FromAddonRow(a entdb.Addon) (*productcatalog.Addon, error)", + "line": 135 + }, + { + "kind": "func", + "name": "FromAddonRateCardRow", + "signature": "func FromAddonRateCardRow(r entdb.AddonRateCard) (productcatalog.RateCard, error)", + "line": 174 + }, + { + "kind": "func", + "name": "fromPlanPhaseRow", + "signature": "func fromPlanPhaseRow(p entdb.PlanPhase) (*plan.Phase, error)", + "line": 229 + }, + { + "kind": "func", + "name": "fromPlanRateCardRow", + "signature": "func fromPlanRateCardRow(r entdb.PlanRateCard) (productcatalog.RateCard, error)", + "line": 288 + }, + { + "kind": "func", + "name": "asPlanRateCardRow", + "signature": "func asPlanRateCardRow(r productcatalog.RateCard) (entdb.PlanRateCard, error)", + "line": 374 + } + ], + "line_count": 407 + }, + "openmeter/productcatalog/plan/adapter/phase.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "createPhaseInput", + "signature": "type createPhaseInput struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i createPhaseInput) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "createPhase", + "signature": "func (a *adapter) createPhase(ctx context.Context, params createPhaseInput) (*plan.Phase, error)", + "line": 51 + }, + { + "kind": "func", + "name": "rateCardBulkCreate", + "signature": "func rateCardBulkCreate(c *entdb.PlanRateCardClient, rateCards productcatalog.RateCards, phaseID string, ns string) ([]*entdb.PlanRateCardCreate, error)", + "line": 105 + } + ], + "line_count": 142 + }, + "openmeter/productcatalog/plan/adapter/plan.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlans", + "signature": "func (a *adapter) ListPlans(ctx context.Context, params plan.ListPlansInput) (pagination.Result[plan.Plan], error)", + "line": 26 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (a *adapter) CreatePlan(ctx context.Context, params plan.CreatePlanInput) (*plan.Plan, error)", + "line": 171 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (a *adapter) DeletePlan(ctx context.Context, params plan.DeletePlanInput) error", + "line": 240 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (a *adapter) GetPlan(ctx context.Context, params plan.GetPlanInput) (*plan.Plan, error)", + "line": 302 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (a *adapter) UpdatePlan(ctx context.Context, params plan.UpdatePlanInput) (*plan.Plan, error)", + "line": 410 + }, + { + "kind": "func", + "name": "planPhaseIncludeDeleted", + "signature": "func planPhaseIncludeDeleted(include bool) func(*entdb.PlanPhaseQuery)", + "line": 501 + } + ], + "line_count": 539 + }, + "openmeter/productcatalog/plan/addon.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "Addon", + "signature": "type Addon struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a Addon) Validate() error", + "line": 21 + } + ], + "line_count": 37 + }, + "openmeter/productcatalog/plan/assert.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "AssertPlanCreateInputEqual", + "signature": "func AssertPlanCreateInputEqual(t *testing.T, i CreatePlanInput, p Plan)", + "line": 13 + }, + { + "kind": "func", + "name": "AssertPlanUpdateInputEqual", + "signature": "func AssertPlanUpdateInputEqual(t *testing.T, i UpdatePlanInput, p Plan)", + "line": 27 + }, + { + "kind": "func", + "name": "AssertPlanEqual", + "signature": "func AssertPlanEqual(t *testing.T, expected, actual Plan)", + "line": 53 + }, + { + "kind": "func", + "name": "AssertPlanRateCardsEqual", + "signature": "func AssertPlanRateCardsEqual(t *testing.T, r1, r2 productcatalog.RateCards)", + "line": 141 + }, + { + "kind": "func", + "name": "AssertRateCardEqual", + "signature": "func AssertRateCardEqual(t *testing.T, r1, r2 productcatalog.RateCard)", + "line": 180 + } + ], + "line_count": 207 + }, + "openmeter/productcatalog/plan/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundErrorParams", + "signature": "type NotFoundErrorParams struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewNotFoundError", + "signature": "func NewNotFoundError(e NotFoundErrorParams) *NotFoundError", + "line": 19 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 53 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 57 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *NotFoundError) Unwrap() error", + "line": 61 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 65 + } + ], + "line_count": 72 + }, + "openmeter/productcatalog/plan/errors_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsNotFoundError", + "signature": "func TestIsNotFoundError(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestIsNotFoundError_String", + "signature": "func TestIsNotFoundError_String(t *testing.T)", + "line": 49 + } + ], + "line_count": 94 + }, + "openmeter/productcatalog/plan/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "NewPlanCreateEvent", + "signature": "func NewPlanCreateEvent(ctx context.Context, plan *Plan) PlanCreateEvent", + "line": 25 + }, + { + "kind": "struct", + "name": "PlanCreateEvent", + "signature": "type PlanCreateEvent struct", + "line": 33 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanCreateEvent) EventName() string", + "line": 38 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 46 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanCreateEvent) Validate() error", + "line": 57 + }, + { + "kind": "func", + "name": "NewPlanUpdateEvent", + "signature": "func NewPlanUpdateEvent(ctx context.Context, plan *Plan) PlanUpdateEvent", + "line": 68 + }, + { + "kind": "struct", + "name": "PlanUpdateEvent", + "signature": "type PlanUpdateEvent struct", + "line": 76 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanUpdateEvent) EventName() string", + "line": 81 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 89 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanUpdateEvent) Validate() error", + "line": 100 + }, + { + "kind": "func", + "name": "NewPlanDeleteEvent", + "signature": "func NewPlanDeleteEvent(ctx context.Context, plan *Plan) PlanDeleteEvent", + "line": 111 + }, + { + "kind": "struct", + "name": "PlanDeleteEvent", + "signature": "type PlanDeleteEvent struct", + "line": 119 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanDeleteEvent) EventName() string", + "line": 124 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 132 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanDeleteEvent) Validate() error", + "line": 143 + }, + { + "kind": "func", + "name": "NewPlanPublishEvent", + "signature": "func NewPlanPublishEvent(ctx context.Context, plan *Plan) PlanPublishEvent", + "line": 158 + }, + { + "kind": "struct", + "name": "PlanPublishEvent", + "signature": "type PlanPublishEvent struct", + "line": 166 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanPublishEvent) EventName() string", + "line": 171 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanPublishEvent) EventMetadata() metadata.EventMetadata", + "line": 179 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanPublishEvent) Validate() error", + "line": 190 + }, + { + "kind": "func", + "name": "NewPlanArchiveEvent", + "signature": "func NewPlanArchiveEvent(ctx context.Context, plan *Plan) PlanArchiveEvent", + "line": 201 + }, + { + "kind": "struct", + "name": "PlanArchiveEvent", + "signature": "type PlanArchiveEvent struct", + "line": 209 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanArchiveEvent) EventName() string", + "line": 214 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanArchiveEvent) EventMetadata() metadata.EventMetadata", + "line": 222 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanArchiveEvent) Validate() error", + "line": 233 + } + ], + "line_count": 241 + }, + "openmeter/productcatalog/plan/httpdriver/driver.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 16 + }, + { + "kind": "interface", + "name": "PlanHandler", + "signature": "type PlanHandler interface", + "line": 20 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 33 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 41 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice plan.Service,\n\tcredits appconfig.CreditsConfiguration,\n\tfeatureGate featuregate.Gate,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 50 + } + ], + "line_count": 64 + }, + "openmeter/productcatalog/plan/httpdriver/featuregate.go": { + "header": "func (h *handler) isCreditsEnabled(ns string) (bool, error) {\n\tif !h.credits.Enabled {\n\t\treturn false, nil", + "symbols": [ + { + "kind": "func", + "name": "isCreditsEnabled", + "signature": "func (h *handler) isCreditsEnabled(ns string) (bool, error)", + "line": 3 + } + ], + "line_count": 15 + }, + "openmeter/productcatalog/plan/httpdriver/mapping.go": { + "header": "\t\"fmt\"\n\t\"github.com/invopop/gobl/currency\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "FromPlan", + "signature": "func FromPlan(p plan.Plan) (api.Plan, error)", + "line": 17 + }, + { + "kind": "func", + "name": "FromPlanPhase", + "signature": "func FromPlanPhase(p plan.Phase) (api.PlanPhase, error)", + "line": 68 + }, + { + "kind": "func", + "name": "AsCreatePlanRequest", + "signature": "func AsCreatePlanRequest(a api.PlanCreate, namespace string) (CreatePlanRequest, error)", + "line": 90 + }, + { + "kind": "func", + "name": "fromProRatingConfig", + "signature": "func fromProRatingConfig(p productcatalog.ProRatingConfig) *api.ProRatingConfig", + "line": 137 + }, + { + "kind": "func", + "name": "asProRatingConfig", + "signature": "func asProRatingConfig(p *api.ProRatingConfig) productcatalog.ProRatingConfig", + "line": 145 + }, + { + "kind": "func", + "name": "AsPlanPhase", + "signature": "func AsPlanPhase(a api.PlanPhase) (productcatalog.Phase, error)", + "line": 160 + }, + { + "kind": "func", + "name": "AsUpdatePlanRequest", + "signature": "func AsUpdatePlanRequest(a api.PlanReplaceUpdate, namespace string, planID string) (UpdatePlanRequest, error)", + "line": 185 + } + ], + "line_count": 222 + }, + "openmeter/productcatalog/plan/httpdriver/plan.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlans", + "signature": "func (h *handler) ListPlans() ListPlansHandler", + "line": 32 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (h *handler) CreatePlan() CreatePlanHandler", + "line": 106 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (h *handler) UpdatePlan() UpdatePlanHandler", + "line": 164 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (h *handler) DeletePlan() DeletePlanHandler", + "line": 224 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (h *handler) GetPlan() GetPlanHandler", + "line": 274 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (h *handler) PublishPlan() PublishPlanHandler", + "line": 318 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (h *handler) ArchivePlan() ArchivePlanHandler", + "line": 363 + }, + { + "kind": "func", + "name": "NextPlan", + "signature": "func (h *handler) NextPlan() NextPlanHandler", + "line": 406 + } + ], + "line_count": 447 + }, + "openmeter/productcatalog/plan/phase.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "PhaseManagedFields", + "signature": "type PhaseManagedFields struct", + "line": 15 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m PhaseManagedFields) Equal(v PhaseManagedFields) bool", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m PhaseManagedFields) Validate() error", + "line": 35 + }, + { + "kind": "interface", + "name": "ManagedPhase", + "signature": "type ManagedPhase interface", + "line": 53 + }, + { + "kind": "struct", + "name": "Phase", + "signature": "type Phase struct", + "line": 63 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p Phase) Equal(v Phase) bool", + "line": 68 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p Phase) ValidateWith(validators ...models.ValidatorFunc[Phase]) error", + "line": 91 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Phase) Validate() error", + "line": 95 + }, + { + "kind": "func", + "name": "AsProductCatalogPhase", + "signature": "func (p Phase) AsProductCatalogPhase() productcatalog.Phase", + "line": 102 + }, + { + "kind": "func", + "name": "ValidatePhaseManagedFields", + "signature": "func ValidatePhaseManagedFields() models.ValidatorFunc[Phase]", + "line": 106 + }, + { + "kind": "func", + "name": "ValidatePhase", + "signature": "func ValidatePhase() models.ValidatorFunc[Phase]", + "line": 112 + } + ], + "line_count": 116 + }, + "openmeter/productcatalog/plan/plan.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 18 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (p Plan) ValidateWith(validators ...models.ValidatorFunc[Plan]) error", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Plan) Validate() error", + "line": 36 + }, + { + "kind": "func", + "name": "AsProductCatalogPlan", + "signature": "func (p Plan) AsProductCatalogPlan() productcatalog.Plan", + "line": 43 + }, + { + "kind": "func", + "name": "ValidatePlanMeta", + "signature": "func ValidatePlanMeta() models.ValidatorFunc[Plan]", + "line": 50 + }, + { + "kind": "func", + "name": "ValidatePlanPhases", + "signature": "func ValidatePlanPhases() models.ValidatorFunc[Plan]", + "line": 56 + } + ], + "line_count": 68 + }, + "openmeter/productcatalog/plan/ratecard.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "RateCardManagedFields", + "signature": "type RateCardManagedFields struct", + "line": 17 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m RateCardManagedFields) Equal(v RateCardManagedFields) bool", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m RateCardManagedFields) Validate() error", + "line": 37 + }, + { + "kind": "interface", + "name": "ManagedRateCard", + "signature": "type ManagedRateCard interface", + "line": 55 + }, + { + "kind": "struct", + "name": "RateCard", + "signature": "type RateCard struct", + "line": 64 + }, + { + "kind": "func", + "name": "ManagedFields", + "signature": "func (r *RateCard) ManagedFields() RateCardManagedFields", + "line": 69 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (r *RateCard) Equal(v productcatalog.RateCard) bool", + "line": 73 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r *RateCard) Validate() error", + "line": 87 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (r *RateCard) MarshalJSON() ([]byte, error)", + "line": 101 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (r *RateCard) UnmarshalJSON(b []byte) error", + "line": 117 + } + ], + "line_count": 150 + }, + "openmeter/productcatalog/plan/ratecard_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRateCard_JSON", + "signature": "func TestRateCard_JSON(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestFlatFeeRateCard", + "signature": "func TestFlatFeeRateCard(t *testing.T)", + "line": 150 + }, + { + "kind": "func", + "name": "TestUsageBasedRateCard", + "signature": "func TestUsageBasedRateCard(t *testing.T)", + "line": 268 + } + ], + "line_count": 399 + }, + "openmeter/productcatalog/plan/repository.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Repository", + "signature": "type Repository interface", + "line": 12 + } + ], + "line_count": 21 + }, + "openmeter/productcatalog/plan/serializer.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "rateCardAlias", + "signature": "type rateCardAlias struct", + "line": 16 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p Plan) MarshalJSON() ([]byte, error)", + "line": 30 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (p *Plan) UnmarshalJSON(data []byte) error", + "line": 112 + } + ], + "line_count": 222 + }, + "openmeter/productcatalog/plan/serializer_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlanSerialization", + "signature": "func TestPlanSerialization(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestPlanSerializationErrors", + "signature": "func TestPlanSerializationErrors(t *testing.T)", + "line": 155 + } + ], + "line_count": 222 + }, + "openmeter/productcatalog/plan/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (f OrderBy) Values() []OrderBy", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f OrderBy) Validate() error", + "line": 48 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 56 + }, + { + "kind": "struct", + "name": "ListPlansInput", + "signature": "type ListPlansInput struct", + "line": 69 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListPlansInput) Validate() error", + "line": 111 + }, + { + "kind": "struct", + "name": "ListPlansStatusFilter", + "signature": "type ListPlansStatusFilter struct", + "line": 136 + }, + { + "kind": "struct", + "name": "inputOptions", + "signature": "type inputOptions struct", + "line": 147 + }, + { + "kind": "struct", + "name": "CreatePlanInput", + "signature": "type CreatePlanInput struct", + "line": 155 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreatePlanInput) Validate() error", + "line": 162 + }, + { + "kind": "struct", + "name": "UpdatePlanInput", + "signature": "type UpdatePlanInput struct", + "line": 190 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UpdatePlanInput) Equal(p Plan) bool", + "line": 220 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdatePlanInput) Validate() error", + "line": 272 + }, + { + "kind": "func", + "name": "ValidateWithPlan", + "signature": "func (i UpdatePlanInput) ValidateWithPlan(p productcatalog.Plan) error", + "line": 321 + }, + { + "kind": "struct", + "name": "ExpandFields", + "signature": "type ExpandFields struct", + "line": 365 + }, + { + "kind": "struct", + "name": "GetPlanInput", + "signature": "type GetPlanInput struct", + "line": 369 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetPlanInput) Validate() error", + "line": 386 + }, + { + "kind": "struct", + "name": "DeletePlanInput", + "signature": "type DeletePlanInput struct", + "line": 400 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeletePlanInput) Validate() error", + "line": 404 + }, + { + "kind": "struct", + "name": "PublishPlanInput", + "signature": "type PublishPlanInput struct", + "line": 418 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i PublishPlanInput) Validate() error", + "line": 425 + }, + { + "kind": "struct", + "name": "ArchivePlanInput", + "signature": "type ArchivePlanInput struct", + "line": 465 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ArchivePlanInput) Validate() error", + "line": 473 + }, + { + "kind": "struct", + "name": "NextPlanInput", + "signature": "type NextPlanInput struct", + "line": 496 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NextPlanInput) Validate() error", + "line": 508 + } + ], + "line_count": 520 + }, + "openmeter/productcatalog/plan/service/plan.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlans", + "signature": "func (s service) ListPlans(ctx context.Context, params plan.ListPlansInput) (pagination.Result[plan.Plan], error)", + "line": 18 + }, + { + "kind": "func", + "name": "resolveTaxCodes", + "signature": "func (s service) resolveTaxCodes(ctx context.Context, namespace string, rateCards *productcatalog.RateCards) error", + "line": 33 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (s service) CreatePlan(ctx context.Context, params plan.CreatePlanInput) (*plan.Plan, error)", + "line": 78 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (s service) DeletePlan(ctx context.Context, params plan.DeletePlanInput) error", + "line": 167 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (s service) GetPlan(ctx context.Context, params plan.GetPlanInput) (*plan.Plan, error)", + "line": 237 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (s service) UpdatePlan(ctx context.Context, params plan.UpdatePlanInput) (*plan.Plan, error)", + "line": 266 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (s service) PublishPlan(ctx context.Context, params plan.PublishPlanInput) (*plan.Plan, error)", + "line": 364 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (s service) ArchivePlan(ctx context.Context, params plan.ArchivePlanInput) (*plan.Plan, error)", + "line": 531 + }, + { + "kind": "func", + "name": "NextPlan", + "signature": "func (s service) NextPlan(ctx context.Context, params plan.NextPlanInput) (*plan.Plan, error)", + "line": 599 + } + ], + "line_count": 732 + }, + "openmeter/productcatalog/plan/service/service.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 13 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (plan.Service, error)", + "line": 22 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 55 + } + ], + "line_count": 62 + }, + "openmeter/productcatalog/plan/service/service_test.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlanService", + "signature": "func TestPlanService(t *testing.T)", + "line": 28 + }, + { + "kind": "func", + "name": "TestListPlansFilters", + "signature": "func TestListPlansFilters(t *testing.T)", + "line": 840 + } + ], + "line_count": 1077 + }, + "openmeter/productcatalog/plan/service/taxcode_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "newTestFlatRateCard", + "signature": "func newTestFlatRateCard(feat feature.Feature, tc *productcatalog.TaxConfig, billingCadence *datetime.ISODuration) productcatalog.RateCard", + "line": 28 + }, + { + "kind": "func", + "name": "newTestPlanInput", + "signature": "func newTestPlanInput(t *testing.T, namespace string, rc productcatalog.RateCard) plan.CreatePlanInput", + "line": 45 + }, + { + "kind": "func", + "name": "getFirstRCTaxConfig", + "signature": "func getFirstRCTaxConfig(t *testing.T, p *plan.Plan) *productcatalog.TaxConfig", + "line": 56 + }, + { + "kind": "func", + "name": "findTaxCodeByStripeCode", + "signature": "func findTaxCodeByStripeCode(t *testing.T, ctx context.Context, svc taxcode.Service, namespace string, stripeCode string) (taxcode.TaxCode, error)", + "line": 63 + }, + { + "kind": "func", + "name": "assertPlanRCDBCols", + "signature": "func assertPlanRCDBCols(t *testing.T, ctx context.Context, env *pctestutils.TestEnv, phaseID string, rcKey string, wantTaxCodeID *string, wantBehavior *productcatalog.TaxBehavior)", + "line": 74 + }, + { + "kind": "func", + "name": "TestPlanTaxCodeDualWrite", + "signature": "func TestPlanTaxCodeDualWrite(t *testing.T)", + "line": 88 + }, + { + "kind": "func", + "name": "TestPlanTaxCodeBackfill", + "signature": "func TestPlanTaxCodeBackfill(t *testing.T)", + "line": 698 + }, + { + "kind": "func", + "name": "TestPlanWithAddonTaxCode", + "signature": "func TestPlanWithAddonTaxCode(t *testing.T)", + "line": 893 + } + ], + "line_count": 993 + }, + "openmeter/productcatalog/plan/validators.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "IsPlanDeleted", + "signature": "func IsPlanDeleted(at time.Time) models.ValidatorFunc[Plan]", + "line": 14 + }, + { + "kind": "func", + "name": "HasPlanStatus", + "signature": "func HasPlanStatus(statuses ...productcatalog.PlanStatus) models.ValidatorFunc[Plan]", + "line": 25 + } + ], + "line_count": 33 + }, + "openmeter/productcatalog/plan_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlanStatus", + "signature": "func TestPlanStatus(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestAlignmentEnforcement", + "signature": "func TestAlignmentEnforcement(t *testing.T)", + "line": 186 + } + ], + "line_count": 344 + }, + "openmeter/productcatalog/planaddon.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddonMeta", + "signature": "type PlanAddonMeta struct", + "line": 12 + }, + { + "kind": "struct", + "name": "PlanAddonConfig", + "signature": "type PlanAddonConfig struct", + "line": 19 + }, + { + "kind": "struct", + "name": "PlanAddon", + "signature": "type PlanAddon struct", + "line": 33 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (c PlanAddon) ValidateWith(validators ...models.ValidatorFunc[PlanAddon]) error", + "line": 43 + }, + { + "kind": "func", + "name": "ValidationErrors", + "signature": "func (c PlanAddon) ValidationErrors() (models.ValidationIssues, error)", + "line": 49 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c PlanAddon) Validate() error", + "line": 58 + }, + { + "kind": "func", + "name": "ValidateAddonBillingCadenceAreAlignedWithPlan", + "signature": "func ValidateAddonBillingCadenceAreAlignedWithPlan(addonRateCards RateCards) models.ValidatorFunc[Plan]", + "line": 125 + }, + { + "kind": "func", + "name": "ValidatePlanPhaseAndAddonRateCardsAreCompatible", + "signature": "func ValidatePlanPhaseAndAddonRateCardsAreCompatible(addonRateCards RateCards) models.ValidatorFunc[Phase]", + "line": 142 + } + ], + "line_count": 165 + }, + "openmeter/productcatalog/planaddon/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (planaddon.Repository, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 55 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 72 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/productcatalog/planaddon/adapter/adapter_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPostgresAdapter", + "signature": "func TestPostgresAdapter(t *testing.T)", + "line": 27 + } + ], + "line_count": 410 + }, + "openmeter/productcatalog/planaddon/adapter/mapping.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "FromPlanAddonRow", + "signature": "func FromPlanAddonRow(a entdb.PlanAddon) (*planaddon.PlanAddon, error)", + "line": 17 + } + ], + "line_count": 81 + }, + "openmeter/productcatalog/planaddon/adapter/planaddon.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\tentdb \"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (a *adapter) ListPlanAddons(ctx context.Context, params planaddon.ListPlanAddonsInput) (pagination.Result[planaddon.PlanAddon], error)", + "line": 21 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (a *adapter) CreatePlanAddon(ctx context.Context, params planaddon.CreatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 164 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (a *adapter) DeletePlanAddon(ctx context.Context, params planaddon.DeletePlanAddonInput) error", + "line": 229 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (a *adapter) GetPlanAddon(ctx context.Context, params planaddon.GetPlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 283 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (a *adapter) UpdatePlanAddon(ctx context.Context, params planaddon.UpdatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 341 + } + ], + "line_count": 412 + }, + "openmeter/productcatalog/planaddon/assert.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "AssertPlanAddonCreateInputEqual", + "signature": "func AssertPlanAddonCreateInputEqual(t *testing.T, i CreatePlanAddonInput, a PlanAddon)", + "line": 9 + }, + { + "kind": "func", + "name": "AssertPlanAddonUpdateInputEqual", + "signature": "func AssertPlanAddonUpdateInputEqual(t *testing.T, i UpdatePlanAddonInput, a PlanAddon)", + "line": 24 + }, + { + "kind": "func", + "name": "AssertPlanAddonEqual", + "signature": "func AssertPlanAddonEqual(t *testing.T, expected, actual PlanAddon)", + "line": 58 + } + ], + "line_count": 65 + }, + "openmeter/productcatalog/planaddon/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundErrorParams", + "signature": "type NotFoundErrorParams struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewNotFoundError", + "signature": "func NewNotFoundError(e NotFoundErrorParams) *NotFoundError", + "line": 19 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 53 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 57 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *NotFoundError) Unwrap() error", + "line": 61 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 65 + } + ], + "line_count": 72 + }, + "openmeter/productcatalog/planaddon/errors_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsNotFoundError", + "signature": "func TestIsNotFoundError(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestIsNotFoundError_String", + "signature": "func TestIsNotFoundError_String(t *testing.T)", + "line": 48 + } + ], + "line_count": 85 + }, + "openmeter/productcatalog/planaddon/event.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "NewPlanAddonCreateEvent", + "signature": "func NewPlanAddonCreateEvent(ctx context.Context, planAddon *PlanAddon) PlanAddonCreateEvent", + "line": 22 + }, + { + "kind": "struct", + "name": "PlanAddonCreateEvent", + "signature": "type PlanAddonCreateEvent struct", + "line": 30 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanAddonCreateEvent) EventName() string", + "line": 35 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanAddonCreateEvent) EventMetadata() metadata.EventMetadata", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanAddonCreateEvent) Validate() error", + "line": 54 + }, + { + "kind": "func", + "name": "NewPlanAddonUpdateEvent", + "signature": "func NewPlanAddonUpdateEvent(ctx context.Context, addon *PlanAddon) PlanAddonUpdateEvent", + "line": 65 + }, + { + "kind": "struct", + "name": "PlanAddonUpdateEvent", + "signature": "type PlanAddonUpdateEvent struct", + "line": 73 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanAddonUpdateEvent) EventName() string", + "line": 78 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanAddonUpdateEvent) EventMetadata() metadata.EventMetadata", + "line": 86 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanAddonUpdateEvent) Validate() error", + "line": 97 + }, + { + "kind": "func", + "name": "NewPlanAddonDeleteEvent", + "signature": "func NewPlanAddonDeleteEvent(ctx context.Context, addon *PlanAddon) PlanAddonDeleteEvent", + "line": 108 + }, + { + "kind": "struct", + "name": "PlanAddonDeleteEvent", + "signature": "type PlanAddonDeleteEvent struct", + "line": 116 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e PlanAddonDeleteEvent) EventName() string", + "line": 121 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e PlanAddonDeleteEvent) EventMetadata() metadata.EventMetadata", + "line": 129 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e PlanAddonDeleteEvent) Validate() error", + "line": 140 + } + ], + "line_count": 152 + }, + "openmeter/productcatalog/planaddon/httpdriver/driver.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "PlanAddonHandler", + "signature": "type PlanAddonHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 28 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 34 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice planaddon.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 43 + } + ], + "line_count": 53 + }, + "openmeter/productcatalog/planaddon/httpdriver/mapping.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "FromPlanAddon", + "signature": "func FromPlanAddon(a planaddon.PlanAddon) (api.PlanAddon, error)", + "line": 15 + }, + { + "kind": "func", + "name": "AsCreatePlanAddonRequest", + "signature": "func AsCreatePlanAddonRequest(a api.PlanAddonCreate, namespace string, planID string) (CreatePlanAddonRequest, error)", + "line": 39 + }, + { + "kind": "func", + "name": "AsUpdatePlanAddonRequest", + "signature": "func AsUpdatePlanAddonRequest(a api.PlanAddonReplaceUpdate, namespace string, planID string, addonID string) (UpdatePlanAddonRequest, error)", + "line": 60 + }, + { + "kind": "func", + "name": "AsMetadata", + "signature": "func AsMetadata(metadata api.Metadata) models.Metadata", + "line": 81 + } + ], + "line_count": 93 + }, + "openmeter/productcatalog/planaddon/httpdriver/planaddon.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (h *handler) ListPlanAddons() ListPlanAddonsHandler", + "line": 37 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (h *handler) CreatePlanAddon() CreatePlanAddonHandler", + "line": 105 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (h *handler) UpdatePlanAddon() UpdatePlanAddonHandler", + "line": 154 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (h *handler) DeletePlanAddon() DeletePlanAddonHandler", + "line": 203 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (h *handler) GetPlanAddon() GetPlanAddonHandler", + "line": 247 + } + ], + "line_count": 279 + }, + "openmeter/productcatalog/planaddon/planaddon.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/addon\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanAddon", + "signature": "type PlanAddon struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a PlanAddon) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "AsProductCatalogPlanAddon", + "signature": "func (a PlanAddon) AsProductCatalogPlanAddon() productcatalog.PlanAddon", + "line": 53 + } + ], + "line_count": 59 + }, + "openmeter/productcatalog/planaddon/repository.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Repository", + "signature": "type Repository interface", + "line": 10 + } + ], + "line_count": 18 + }, + "openmeter/productcatalog/planaddon/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 31 + }, + { + "kind": "struct", + "name": "ListPlanAddonsInput", + "signature": "type ListPlanAddonsInput struct", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListPlanAddonsInput) Validate() error", + "line": 82 + }, + { + "kind": "struct", + "name": "CreatePlanAddonInput", + "signature": "type CreatePlanAddonInput struct", + "line": 88 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreatePlanAddonInput) Validate() error", + "line": 110 + }, + { + "kind": "struct", + "name": "UpdatePlanAddonInput", + "signature": "type UpdatePlanAddonInput struct", + "line": 133 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i UpdatePlanAddonInput) Equal(p PlanAddon) bool", + "line": 158 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdatePlanAddonInput) Validate() error", + "line": 198 + }, + { + "kind": "struct", + "name": "GetPlanAddonInput", + "signature": "type GetPlanAddonInput struct", + "line": 220 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetPlanAddonInput) Validate() error", + "line": 233 + }, + { + "kind": "struct", + "name": "DeletePlanAddonInput", + "signature": "type DeletePlanAddonInput struct", + "line": 253 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeletePlanAddonInput) Validate() error", + "line": 263 + } + ], + "line_count": 281 + }, + "openmeter/productcatalog/planaddon/service/planaddon.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (s service) ListPlanAddons(ctx context.Context, params planaddon.ListPlanAddonsInput) (pagination.Result[planaddon.PlanAddon], error)", + "line": 18 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (s service) CreatePlanAddon(ctx context.Context, params planaddon.CreatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 30 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (s service) DeletePlanAddon(ctx context.Context, params planaddon.DeletePlanAddonInput) error", + "line": 155 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (s service) GetPlanAddon(ctx context.Context, params planaddon.GetPlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 238 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (s service) UpdatePlanAddon(ctx context.Context, params planaddon.UpdatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 273 + } + ], + "line_count": 397 + }, + "openmeter/productcatalog/planaddon/service/service.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/addon\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 13 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (planaddon.Service, error)", + "line": 21 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 53 + } + ], + "line_count": 59 + }, + "openmeter/productcatalog/planaddon/service/service_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlanAddonService", + "signature": "func TestPlanAddonService(t *testing.T)", + "line": 27 + } + ], + "line_count": 429 + }, + "openmeter/productcatalog/planaddon_test.go": { + "header": "\t\"net/http\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestPlanAddon_ValidationErrors", + "signature": "func TestPlanAddon_ValidationErrors(t *testing.T)", + "line": 19 + } + ], + "line_count": 603 + }, + "openmeter/productcatalog/price.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (p PaymentTermType) Values() []string", + "line": 26 + }, + { + "kind": "func", + "name": "StringValues", + "signature": "func (p PaymentTermType) StringValues() []string", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PaymentTermType) Validate() error", + "line": 40 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (p PriceType) Values() []string", + "line": 58 + }, + { + "kind": "interface", + "name": "pricer", + "signature": "type pricer interface", + "line": 68 + }, + { + "kind": "struct", + "name": "Price", + "signature": "type Price struct", + "line": 94 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (p *Price) Clone() *Price", + "line": 103 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p Price) MarshalJSON() ([]byte, error)", + "line": 124 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (p *Price) UnmarshalJSON(bytes []byte) error", + "line": 182 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p *Price) Validate() error", + "line": 239 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p *Price) Equal(v *Price) bool", + "line": 260 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (p *Price) Type() PriceType", + "line": 288 + }, + { + "kind": "func", + "name": "AsFlat", + "signature": "func (p *Price) AsFlat() (FlatPrice, error)", + "line": 292 + }, + { + "kind": "func", + "name": "AsUnit", + "signature": "func (p *Price) AsUnit() (UnitPrice, error)", + "line": 304 + }, + { + "kind": "func", + "name": "AsTiered", + "signature": "func (p *Price) AsTiered() (TieredPrice, error)", + "line": 316 + }, + { + "kind": "func", + "name": "AsDynamic", + "signature": "func (p *Price) AsDynamic() (DynamicPrice, error)", + "line": 328 + }, + { + "kind": "func", + "name": "AsPackage", + "signature": "func (p *Price) AsPackage() (PackagePrice, error)", + "line": 340 + }, + { + "kind": "func", + "name": "FromFlat", + "signature": "func (p *Price) FromFlat(price FlatPrice)", + "line": 352 + }, + { + "kind": "func", + "name": "FromUnit", + "signature": "func (p *Price) FromUnit(price UnitPrice)", + "line": 357 + }, + { + "kind": "func", + "name": "FromTiered", + "signature": "func (p *Price) FromTiered(price TieredPrice)", + "line": 362 + }, + { + "kind": "func", + "name": "FromDynamic", + "signature": "func (p *Price) FromDynamic(price DynamicPrice)", + "line": 367 + }, + { + "kind": "func", + "name": "FromPackage", + "signature": "func (p *Price) FromPackage(price PackagePrice)", + "line": 372 + }, + { + "kind": "func", + "name": "GetCommitments", + "signature": "func (p *Price) GetCommitments() Commitments", + "line": 401 + }, + { + "kind": "func", + "name": "GetPaymentTerm", + "signature": "func (p *Price) GetPaymentTerm() PaymentTermType", + "line": 418 + }, + { + "kind": "struct", + "name": "FlatPrice", + "signature": "type FlatPrice struct", + "line": 428 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (f *FlatPrice) Clone() FlatPrice", + "line": 437 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (f *FlatPrice) Equal(v *FlatPrice) bool", + "line": 444 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f *FlatPrice) Validate() error", + "line": 464 + }, + { + "kind": "struct", + "name": "UnitPrice", + "signature": "type UnitPrice struct", + "line": 478 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (u *UnitPrice) Clone() UnitPrice", + "line": 485 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (u *UnitPrice) Equal(v *UnitPrice) bool", + "line": 503 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u *UnitPrice) Validate() error", + "line": 523 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (p TieredPriceMode) Values() []TieredPriceMode", + "line": 546 + }, + { + "kind": "func", + "name": "StringValues", + "signature": "func (p TieredPriceMode) StringValues() []string", + "line": 553 + }, + { + "kind": "func", + "name": "NewTieredPriceMode", + "signature": "func NewTieredPriceMode(s string) (TieredPriceMode, error)", + "line": 560 + }, + { + "kind": "struct", + "name": "TieredPrice", + "signature": "type TieredPrice struct", + "line": 571 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (t *TieredPrice) Clone() TieredPrice", + "line": 583 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t *TieredPrice) Equal(v *TieredPrice) bool", + "line": 608 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t *TieredPrice) Validate() error", + "line": 638 + }, + { + "kind": "func", + "name": "WithSortedTiers", + "signature": "func (t *TieredPrice) WithSortedTiers() TieredPrice", + "line": 682 + }, + { + "kind": "struct", + "name": "PriceTier", + "signature": "type PriceTier struct", + "line": 710 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (p PriceTier) Clone() PriceTier", + "line": 722 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PriceTier) Validate() error", + "line": 741 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p PriceTier) Equal(v PriceTier) bool", + "line": 768 + }, + { + "kind": "struct", + "name": "PriceTierFlatPrice", + "signature": "type PriceTierFlatPrice struct", + "line": 786 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (f PriceTierFlatPrice) Clone() PriceTierFlatPrice", + "line": 791 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f PriceTierFlatPrice) Validate() error", + "line": 797 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (f PriceTierFlatPrice) Equal(v PriceTierFlatPrice) bool", + "line": 805 + }, + { + "kind": "struct", + "name": "PriceTierUnitPrice", + "signature": "type PriceTierUnitPrice struct", + "line": 811 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (u PriceTierUnitPrice) Clone() PriceTierUnitPrice", + "line": 816 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (u PriceTierUnitPrice) Validate() error", + "line": 822 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (u PriceTierUnitPrice) Equal(v PriceTierUnitPrice) bool", + "line": 830 + }, + { + "kind": "struct", + "name": "Commitments", + "signature": "type Commitments struct", + "line": 834 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Commitments) Validate() error", + "line": 842 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c Commitments) Equal(v Commitments) bool", + "line": 864 + }, + { + "kind": "struct", + "name": "DynamicPrice", + "signature": "type DynamicPrice struct", + "line": 880 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (p DynamicPrice) Clone() DynamicPrice", + "line": 887 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p DynamicPrice) Validate() error", + "line": 905 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p *DynamicPrice) Equal(v *DynamicPrice) bool", + "line": 919 + }, + { + "kind": "struct", + "name": "PackagePrice", + "signature": "type PackagePrice struct", + "line": 941 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (p PackagePrice) Clone() PackagePrice", + "line": 948 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PackagePrice) Validate() error", + "line": 967 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p *PackagePrice) Equal(v *PackagePrice) bool", + "line": 989 + } + ], + "line_count": 1011 + }, + "openmeter/productcatalog/price_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestPrice_JSON", + "signature": "func TestPrice_JSON(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestFlatPrice", + "signature": "func TestFlatPrice(t *testing.T)", + "line": 84 + }, + { + "kind": "func", + "name": "TestUnitPrice", + "signature": "func TestUnitPrice(t *testing.T)", + "line": 123 + }, + { + "kind": "func", + "name": "TestTieredPrice", + "signature": "func TestTieredPrice(t *testing.T)", + "line": 190 + }, + { + "kind": "func", + "name": "TestTieredPriceSorting", + "signature": "func TestTieredPriceSorting(t *testing.T)", + "line": 379 + } + ], + "line_count": 403 + }, + "openmeter/productcatalog/pro_rating.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (m ProRatingMode) Values() []string", + "line": 16 + }, + { + "kind": "struct", + "name": "ProRatingConfig", + "signature": "type ProRatingConfig struct", + "line": 23 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ProRatingConfig) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p ProRatingConfig) Equal(o ProRatingConfig) bool", + "line": 50 + } + ], + "line_count": 52 + }, + "openmeter/productcatalog/ratecard.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (s RateCardType) Values() []string", + "line": 25 + }, + { + "kind": "interface", + "name": "RateCard", + "signature": "type RateCard interface", + "line": 32 + }, + { + "kind": "struct", + "name": "RateCardSerde", + "signature": "type RateCardSerde struct", + "line": 52 + }, + { + "kind": "struct", + "name": "RateCardMeta", + "signature": "type RateCardMeta struct", + "line": 62 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func (r RateCardMeta) HasFeature() bool", + "line": 98 + }, + { + "kind": "func", + "name": "GetFeatureID", + "signature": "func (r RateCardMeta) GetFeatureID() *string", + "line": 102 + }, + { + "kind": "func", + "name": "GetFeatureKey", + "signature": "func (r RateCardMeta) GetFeatureKey() *string", + "line": 106 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (r *RateCardMeta) SetFeature(id, key *string)", + "line": 110 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (r RateCardMeta) Clone() RateCardMeta", + "line": 115 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (r RateCardMeta) Equal(v RateCardMeta) bool", + "line": 167 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (r RateCardMeta) ValidateWith(v ...models.ValidatorFunc[RateCardMeta]) error", + "line": 208 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RateCardMeta) Validate() error", + "line": 212 + }, + { + "kind": "func", + "name": "IsBillable", + "signature": "func (r RateCardMeta) IsBillable() bool", + "line": 271 + }, + { + "kind": "struct", + "name": "FlatFeeRateCard", + "signature": "type FlatFeeRateCard struct", + "line": 280 + }, + { + "kind": "func", + "name": "Compatible", + "signature": "func (r *FlatFeeRateCard) Compatible(v RateCard) error", + "line": 289 + }, + { + "kind": "func", + "name": "GetBillingCadence", + "signature": "func (r *FlatFeeRateCard) GetBillingCadence() *datetime.ISODuration", + "line": 296 + }, + { + "kind": "func", + "name": "ChangeMeta", + "signature": "func (r *FlatFeeRateCard) ChangeMeta(fn func(m RateCardMeta) (RateCardMeta, error)) error", + "line": 300 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (r *FlatFeeRateCard) Merge(v RateCard) error", + "line": 310 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (r *FlatFeeRateCard) Type() RateCardType", + "line": 326 + }, + { + "kind": "func", + "name": "Key", + "signature": "func (r *FlatFeeRateCard) Key() string", + "line": 330 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (r *FlatFeeRateCard) Equal(v RateCard) bool", + "line": 334 + }, + { + "kind": "func", + "name": "AsMeta", + "signature": "func (r *FlatFeeRateCard) AsMeta() RateCardMeta", + "line": 355 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (r *FlatFeeRateCard) ValidateWith(v ...models.ValidatorFunc[*FlatFeeRateCard]) error", + "line": 359 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r *FlatFeeRateCard) Validate() error", + "line": 363 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (r *FlatFeeRateCard) Clone() RateCard", + "line": 392 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (r *FlatFeeRateCard) MarshalJSON() ([]byte, error)", + "line": 405 + }, + { + "kind": "struct", + "name": "UsageBasedRateCard", + "signature": "type UsageBasedRateCard struct", + "line": 426 + }, + { + "kind": "func", + "name": "Compatible", + "signature": "func (r *UsageBasedRateCard) Compatible(v RateCard) error", + "line": 434 + }, + { + "kind": "func", + "name": "GetBillingCadence", + "signature": "func (r *UsageBasedRateCard) GetBillingCadence() *datetime.ISODuration", + "line": 441 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (r *UsageBasedRateCard) Clone() RateCard", + "line": 445 + }, + { + "kind": "func", + "name": "ChangeMeta", + "signature": "func (r *UsageBasedRateCard) ChangeMeta(fn func(m RateCardMeta) (RateCardMeta, error)) error", + "line": 454 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (r *UsageBasedRateCard) Merge(v RateCard) error", + "line": 464 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (r *UsageBasedRateCard) Type() RateCardType", + "line": 480 + }, + { + "kind": "func", + "name": "Key", + "signature": "func (r *UsageBasedRateCard) Key() string", + "line": 484 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (r *UsageBasedRateCard) Equal(v RateCard) bool", + "line": 488 + }, + { + "kind": "func", + "name": "AsMeta", + "signature": "func (r *UsageBasedRateCard) AsMeta() RateCardMeta", + "line": 509 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (r *UsageBasedRateCard) ValidateWith(v ...models.ValidatorFunc[*UsageBasedRateCard]) error", + "line": 513 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r *UsageBasedRateCard) Validate() error", + "line": 517 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (r *UsageBasedRateCard) MarshalJSON() ([]byte, error)", + "line": 540 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (c RateCards) Clone() RateCards", + "line": 563 + }, + { + "kind": "func", + "name": "At", + "signature": "func (c RateCards) At(idx int) RateCard", + "line": 571 + }, + { + "kind": "func", + "name": "Billables", + "signature": "func (c RateCards) Billables() RateCards", + "line": 575 + }, + { + "kind": "func", + "name": "SingleBillingCadence", + "signature": "func (c RateCards) SingleBillingCadence() bool", + "line": 588 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c RateCards) Equal(v RateCards) bool", + "line": 604 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (c RateCards) ValidateWith(v ...models.ValidatorFunc[RateCards]) error", + "line": 640 + }, + { + "kind": "func", + "name": "ValidateRateCards", + "signature": "func ValidateRateCards() models.ValidatorFunc[RateCards]", + "line": 647 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c RateCards) Validate() error", + "line": 674 + }, + { + "kind": "struct", + "name": "RateCardWithOverlay", + "signature": "type RateCardWithOverlay struct", + "line": 678 + }, + { + "kind": "func", + "name": "NewRateCardWithOverlay", + "signature": "func NewRateCardWithOverlay(base, overlay RateCard) RateCardWithOverlay", + "line": 683 + }, + { + "kind": "func", + "name": "ValidateWith", + "signature": "func (r RateCardWithOverlay) ValidateWith(validators ...models.ValidatorFunc[RateCardWithOverlay]) error", + "line": 690 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r RateCardWithOverlay) Validate() error", + "line": 694 + }, + { + "kind": "func", + "name": "ValidateRateCardsWithFeatures", + "signature": "func ValidateRateCardsWithFeatures(ctx context.Context, resolver NamespacedFeatureResolver) func(cards RateCards) error", + "line": 889 + } + ], + "line_count": 928 + }, + "openmeter/productcatalog/ratecard_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatFeeRateCard", + "signature": "func TestFlatFeeRateCard(t *testing.T)", + "line": 16 + }, + { + "kind": "func", + "name": "TestUsageBasedRateCard", + "signature": "func TestUsageBasedRateCard(t *testing.T)", + "line": 160 + }, + { + "kind": "func", + "name": "TestRateCardsEqual", + "signature": "func TestRateCardsEqual(t *testing.T)", + "line": 355 + }, + { + "kind": "func", + "name": "TestRateCards_BillingCadenceAligned", + "signature": "func TestRateCards_BillingCadenceAligned(t *testing.T)", + "line": 634 + }, + { + "kind": "func", + "name": "TestRateCardsCompatible", + "signature": "func TestRateCardsCompatible(t *testing.T)", + "line": 827 + } + ], + "line_count": 1184 + }, + "openmeter/productcatalog/settlementmode.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (s SettlementMode) Values() []string", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SettlementMode) Validate() error", + "line": 22 + } + ], + "line_count": 28 + }, + "openmeter/productcatalog/subscription/http/cancel.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (h *handler) CancelSubscription() CancelSubscriptionHandler", + "line": 28 + }, + { + "kind": "func", + "name": "ContinueSubscription", + "signature": "func (h *handler) ContinueSubscription() ContinueSubscriptionHandler", + "line": 86 + }, + { + "kind": "func", + "name": "RestoreSubscription", + "signature": "func (h *handler) RestoreSubscription() RestoreSubscriptionHandler", + "line": 126 + } + ], + "line_count": 153 + }, + "openmeter/productcatalog/subscription/http/change.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (h *handler) ChangeSubscription() ChangeSubscriptionHandler", + "line": 30 + } + ], + "line_count": 157 + }, + "openmeter/productcatalog/subscription/http/create.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (h *handler) CreateSubscription() CreateSubscriptionHandler", + "line": 30 + }, + { + "kind": "func", + "name": "getCustomer", + "signature": "func (h *handler) getCustomer(ctx context.Context, namespace string, id *string, key *string) (*customer.Customer, error)", + "line": 182 + } + ], + "line_count": 222 + }, + "openmeter/productcatalog/subscription/http/delete.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "func", + "name": "DeleteSubscription", + "signature": "func (h *handler) DeleteSubscription() DeleteSubscriptionHandler", + "line": 23 + } + ], + "line_count": 53 + }, + "openmeter/productcatalog/subscription/http/edit.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "EditSubscription", + "signature": "func (h *handler) EditSubscription() EditSubscriptionHandler", + "line": 30 + } + ], + "line_count": 92 + }, + "openmeter/productcatalog/subscription/http/errors.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "func", + "name": "errorEncoder", + "signature": "func errorEncoder() encoder.ErrorEncoder", + "line": 17 + }, + { + "kind": "func", + "name": "mapValidationIssueForAPI", + "signature": "func mapValidationIssueForAPI(issues models.ValidationIssues) (models.ValidationIssues, error)", + "line": 55 + } + ], + "line_count": 68 + }, + "openmeter/productcatalog/subscription/http/featuregate.go": { + "header": "func (h *handler) isCreditsEnabled(ns string) (bool, error) {\n\tif !h.Credits.Enabled {\n\t\treturn false, nil", + "symbols": [ + { + "kind": "func", + "name": "isCreditsEnabled", + "signature": "func (h *handler) isCreditsEnabled(ns string) (bool, error)", + "line": 3 + } + ], + "line_count": 15 + }, + "openmeter/productcatalog/subscription/http/get.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (h *handler) GetSubscription() GetSubscriptionHandler", + "line": 34 + }, + { + "kind": "func", + "name": "ListCustomerSubscriptions", + "signature": "func (h *handler) ListCustomerSubscriptions() ListCustomerSubscriptionsHandler", + "line": 89 + } + ], + "line_count": 186 + }, + "openmeter/productcatalog/subscription/http/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 20 + }, + { + "kind": "struct", + "name": "HandlerConfig", + "signature": "type HandlerConfig struct", + "line": 33 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 44 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 49 + }, + { + "kind": "func", + "name": "NewHandler", + "signature": "func NewHandler(config HandlerConfig, options ...httptransport.HandlerOption) Handler", + "line": 58 + } + ], + "line_count": 63 + }, + "openmeter/productcatalog/subscription/http/mapping.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "MapAPISubscriptionEditOperationToPatch", + "signature": "func MapAPISubscriptionEditOperationToPatch(apiPatch api.SubscriptionEditOperation) (subscription.Patch, error)", + "line": 26 + }, + { + "kind": "func", + "name": "MapSubscriptionToAPI", + "signature": "func MapSubscriptionToAPI(sub subscription.Subscription) api.Subscription", + "line": 168 + }, + { + "kind": "func", + "name": "MapSubscriptionItemToAPI", + "signature": "func MapSubscriptionItemToAPI(item subscription.SubscriptionItemView) (api.SubscriptionItem, error)", + "line": 212 + }, + { + "kind": "func", + "name": "MapAPITimingToTiming", + "signature": "func MapAPITimingToTiming(apiTiming api.SubscriptionTiming) (subscription.Timing, error)", + "line": 272 + }, + { + "kind": "func", + "name": "MapSubscriptionPhaseToAPI", + "signature": "func MapSubscriptionPhaseToAPI(subView subscription.SubscriptionView, phaseView subscription.SubscriptionPhaseView) (api.SubscriptionPhaseExpanded, error)", + "line": 294 + }, + { + "kind": "func", + "name": "MapSubscriptionViewToAPI", + "signature": "func MapSubscriptionViewToAPI(view subscription.SubscriptionView) (api.SubscriptionExpanded, error)", + "line": 400 + }, + { + "kind": "func", + "name": "CustomPlanToCreatePlanRequest", + "signature": "func CustomPlanToCreatePlanRequest(a api.CustomPlanInput, namespace string) (plandriver.CreatePlanRequest, error)", + "line": 458 + }, + { + "kind": "func", + "name": "asProRatingConfig", + "signature": "func asProRatingConfig(p *api.ProRatingConfig) productcatalog.ProRatingConfig", + "line": 509 + } + ], + "line_count": 521 + }, + "openmeter/productcatalog/subscription/http/migrate.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "MigrateSubscription", + "signature": "func (h *handler) MigrateSubscription() MigrateSubscriptionHandler", + "line": 24 + } + ], + "line_count": 80 + }, + "openmeter/productcatalog/subscription/plan.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanInput", + "signature": "type PlanInput struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p *PlanInput) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "AsRef", + "signature": "func (p *PlanInput) AsRef() *PlanRefInput", + "line": 29 + }, + { + "kind": "func", + "name": "AsInput", + "signature": "func (p *PlanInput) AsInput() *plan.CreatePlanInput", + "line": 33 + }, + { + "kind": "func", + "name": "FromInput", + "signature": "func (p *PlanInput) FromInput(pi *plan.CreatePlanInput)", + "line": 37 + }, + { + "kind": "func", + "name": "FromRef", + "signature": "func (p *PlanInput) FromRef(pr *PlanRefInput)", + "line": 41 + }, + { + "kind": "struct", + "name": "PlanRefInput", + "signature": "type PlanRefInput struct", + "line": 45 + }, + { + "kind": "struct", + "name": "Plan", + "signature": "type Plan struct", + "line": 50 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (p *Plan) GetName() string", + "line": 57 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionPlanInput", + "signature": "func (p *Plan) ToCreateSubscriptionPlanInput() subscription.CreateSubscriptionPlanInput", + "line": 61 + }, + { + "kind": "func", + "name": "GetPhases", + "signature": "func (p *Plan) GetPhases() []subscription.PlanPhase", + "line": 81 + }, + { + "kind": "func", + "name": "Currency", + "signature": "func (p *Plan) Currency() currencyx.Code", + "line": 97 + }, + { + "kind": "struct", + "name": "Phase", + "signature": "type Phase struct", + "line": 101 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionPhasePlanInput", + "signature": "func (p *Phase) ToCreateSubscriptionPhasePlanInput() subscription.CreateSubscriptionPhasePlanInput", + "line": 109 + }, + { + "kind": "func", + "name": "GetRateCards", + "signature": "func (p *Phase) GetRateCards() []subscription.PlanRateCard", + "line": 119 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (p *Phase) GetKey() string", + "line": 131 + }, + { + "kind": "struct", + "name": "RateCard", + "signature": "type RateCard struct", + "line": 135 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionItemPlanInput", + "signature": "func (r *RateCard) ToCreateSubscriptionItemPlanInput() subscription.CreateSubscriptionItemPlanInput", + "line": 142 + }, + { + "kind": "func", + "name": "GetKey", + "signature": "func (r *RateCard) GetKey() string", + "line": 150 + } + ], + "line_count": 152 + }, + "openmeter/productcatalog/subscription/service.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "interface", + "name": "PlanSubscriptionService", + "signature": "type PlanSubscriptionService interface", + "line": 12 + }, + { + "kind": "struct", + "name": "SubscriptionChangeResponse", + "signature": "type SubscriptionChangeResponse struct", + "line": 19 + }, + { + "kind": "struct", + "name": "MigrateSubscriptionRequest", + "signature": "type MigrateSubscriptionRequest struct", + "line": 24 + }, + { + "kind": "struct", + "name": "ChangeSubscriptionRequest", + "signature": "type ChangeSubscriptionRequest struct", + "line": 32 + }, + { + "kind": "struct", + "name": "CreateSubscriptionRequest", + "signature": "type CreateSubscriptionRequest struct", + "line": 41 + } + ], + "line_count": 47 + }, + "openmeter/productcatalog/subscription/service/change.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "func", + "name": "Change", + "signature": "func (s *service) Change(ctx context.Context, request plansubscription.ChangeSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error)", + "line": 14 + } + ], + "line_count": 70 + }, + "openmeter/productcatalog/subscription/service/change_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestChange", + "signature": "func TestChange(t *testing.T)", + "line": 25 + } + ], + "line_count": 405 + }, + "openmeter/productcatalog/subscription/service/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, request plansubscription.CreateSubscriptionRequest) (subscription.Subscription, error)", + "line": 14 + } + ], + "line_count": 69 + }, + "openmeter/productcatalog/subscription/service/migrate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Migrate", + "signature": "func (s *service) Migrate(ctx context.Context, request plansubscription.MigrateSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error)", + "line": 17 + } + ], + "line_count": 114 + }, + "openmeter/productcatalog/subscription/service/migrate_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestMigrate", + "signature": "func TestMigrate(t *testing.T)", + "line": 23 + } + ], + "line_count": 390 + }, + "openmeter/productcatalog/subscription/service/plan.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "getPlanByVersion", + "signature": "func (s *service) getPlanByVersion(ctx context.Context, namespace string, ref plansubscription.PlanRefInput) (*plan.Plan, error)", + "line": 18 + }, + { + "kind": "func", + "name": "PlanFromPlanInput", + "signature": "func PlanFromPlanInput(input plan.CreatePlanInput) (subscription.Plan, error)", + "line": 44 + }, + { + "kind": "func", + "name": "PlanFromPlan", + "signature": "func PlanFromPlan(p plan.Plan) subscription.Plan", + "line": 82 + } + ], + "line_count": 87 + }, + "openmeter/productcatalog/subscription/service/plan_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestDiscountPersisting", + "signature": "func TestDiscountPersisting(t *testing.T)", + "line": 18 + } + ], + "line_count": 96 + }, + "openmeter/productcatalog/subscription/service/service.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 28 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(c Config) plansubscription.PlanSubscriptionService", + "line": 32 + }, + { + "kind": "func", + "name": "zeroPhasesBeforeStartingPhase", + "signature": "func (s *service) zeroPhasesBeforeStartingPhase(p *plan.Plan, startingPhase string) error", + "line": 38 + } + ], + "line_count": 65 + }, + "openmeter/productcatalog/subscription/testutils/adapter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "PlanSubscriptionAdapter", + "signature": "type PlanSubscriptionAdapter interface", + "line": 18 + }, + { + "kind": "struct", + "name": "PlanSubscriptionAdapterConfig", + "signature": "type PlanSubscriptionAdapterConfig struct", + "line": 28 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 33 + }, + { + "kind": "func", + "name": "NewPlanSubscriptionAdapter", + "signature": "func NewPlanSubscriptionAdapter(config PlanSubscriptionAdapterConfig) PlanSubscriptionAdapter", + "line": 39 + }, + { + "kind": "func", + "name": "GetVersion", + "signature": "func (a *adapter) GetVersion(ctx context.Context, namespace string, ref plansubscription.PlanRefInput) (subscription.Plan, error)", + "line": 43 + }, + { + "kind": "func", + "name": "FromInput", + "signature": "func (a *adapter) FromInput(ctx context.Context, namespace string, input plan.CreatePlanInput) (subscription.Plan, error)", + "line": 75 + } + ], + "line_count": 77 + }, + "openmeter/productcatalog/tax.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (t TaxBehavior) Values() []string", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TaxBehavior) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "TaxConfig", + "signature": "type TaxConfig struct", + "line": 38 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c *TaxConfig) Equal(v *TaxConfig) bool", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *TaxConfig) Validate() error", + "line": 72 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (c TaxConfig) Clone() TaxConfig", + "line": 94 + }, + { + "kind": "func", + "name": "MergeTaxConfigs", + "signature": "func MergeTaxConfigs(base, overrides *TaxConfig) *TaxConfig", + "line": 117 + }, + { + "kind": "struct", + "name": "StripeTaxConfig", + "signature": "type StripeTaxConfig struct", + "line": 144 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (s *StripeTaxConfig) Equal(v *StripeTaxConfig) bool", + "line": 151 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *StripeTaxConfig) Validate() error", + "line": 163 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (s StripeTaxConfig) Clone() StripeTaxConfig", + "line": 171 + }, + { + "kind": "struct", + "name": "TaxCodeConfig", + "signature": "type TaxCodeConfig struct", + "line": 178 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *TaxCodeConfig) Validate() error", + "line": 183 + }, + { + "kind": "func", + "name": "ToTaxConfig", + "signature": "func (c *TaxCodeConfig) ToTaxConfig() *TaxConfig", + "line": 204 + }, + { + "kind": "func", + "name": "TaxCodeConfigFrom", + "signature": "func TaxCodeConfigFrom(cfg *TaxConfig) *TaxCodeConfig", + "line": 223 + }, + { + "kind": "func", + "name": "ResolveTaxConfig", + "signature": "func ResolveTaxConfig(ctx context.Context, svc taxcode.Service, namespace string, cfg *TaxConfig) error", + "line": 257 + }, + { + "kind": "func", + "name": "BackfillTaxConfig", + "signature": "func BackfillTaxConfig(cfg *TaxConfig, taxBehavior *TaxBehavior, tc *taxcode.TaxCode) *TaxConfig", + "line": 299 + } + ], + "line_count": 330 + }, + "openmeter/productcatalog/tax_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestTaxCodeConfigValidation", + "signature": "func TestTaxCodeConfigValidation(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestTaxCodeConfigToTaxConfig", + "signature": "func TestTaxCodeConfigToTaxConfig(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "TestTaxCodeConfigFrom", + "signature": "func TestTaxCodeConfigFrom(t *testing.T)", + "line": 86 + }, + { + "kind": "func", + "name": "TestTaxConfigValidation", + "signature": "func TestTaxConfigValidation(t *testing.T)", + "line": 113 + }, + { + "kind": "func", + "name": "TestTaxConfigEqual", + "signature": "func TestTaxConfigEqual(t *testing.T)", + "line": 163 + }, + { + "kind": "func", + "name": "TestMergeTaxConfigs", + "signature": "func TestMergeTaxConfigs(t *testing.T)", + "line": 304 + }, + { + "kind": "func", + "name": "TestTaxConfigClone", + "signature": "func TestTaxConfigClone(t *testing.T)", + "line": 492 + }, + { + "kind": "func", + "name": "TestBackfillTaxConfig", + "signature": "func TestBackfillTaxConfig(t *testing.T)", + "line": 525 + }, + { + "kind": "func", + "name": "TestBackfillTaxConfigPointerIsolation", + "signature": "func TestBackfillTaxConfigPointerIsolation(t *testing.T)", + "line": 649 + }, + { + "kind": "struct", + "name": "stubTaxCodeService", + "signature": "type stubTaxCodeService struct", + "line": 678 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (s *stubTaxCodeService) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error)", + "line": 683 + }, + { + "kind": "func", + "name": "GetOrCreateByAppMapping", + "signature": "func (s *stubTaxCodeService) GetOrCreateByAppMapping(ctx context.Context, input taxcode.GetOrCreateByAppMappingInput) (taxcode.TaxCode, error)", + "line": 687 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (s *stubTaxCodeService) CreateTaxCode(_ context.Context, _ taxcode.CreateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 691 + }, + { + "kind": "func", + "name": "UpdateTaxCode", + "signature": "func (s *stubTaxCodeService) UpdateTaxCode(_ context.Context, _ taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 695 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (s *stubTaxCodeService) ListTaxCodes(_ context.Context, _ taxcode.ListTaxCodesInput) (pagination.Result[taxcode.TaxCode], error)", + "line": 699 + }, + { + "kind": "func", + "name": "GetTaxCodeByAppMapping", + "signature": "func (s *stubTaxCodeService) GetTaxCodeByAppMapping(_ context.Context, _ taxcode.GetTaxCodeByAppMappingInput) (taxcode.TaxCode, error)", + "line": 703 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (s *stubTaxCodeService) DeleteTaxCode(_ context.Context, _ taxcode.DeleteTaxCodeInput) error", + "line": 707 + }, + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (s *stubTaxCodeService) GetOrganizationDefaultTaxCodes(_ context.Context, _ taxcode.GetOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 711 + }, + { + "kind": "func", + "name": "UpsertOrganizationDefaultTaxCodes", + "signature": "func (s *stubTaxCodeService) UpsertOrganizationDefaultTaxCodes(_ context.Context, _ taxcode.UpsertOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 715 + }, + { + "kind": "func", + "name": "TestResolveTaxConfig", + "signature": "func TestResolveTaxConfig(t *testing.T)", + "line": 719 + } + ], + "line_count": 828 + }, + "openmeter/productcatalog/testutils/addon.go": { + "header": "\t\"testing\"\n\t\"github.com/invopop/gobl/currency\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestAddon", + "signature": "func NewTestAddon(t *testing.T, namespace string, rateCards ...productcatalog.RateCard) addon.CreateAddonInput", + "line": 14 + } + ], + "line_count": 34 + }, + "openmeter/productcatalog/testutils/env.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 32 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 50 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 59 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 81 + } + ], + "line_count": 189 + }, + "openmeter/productcatalog/testutils/feature.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestFeature", + "signature": "func NewTestFeature(t *testing.T, namespace string) feature.CreateFeatureInputs", + "line": 12 + }, + { + "kind": "func", + "name": "NewTestFeatureFromMeter", + "signature": "func NewTestFeatureFromMeter(t *testing.T, meter *meter.Meter) feature.CreateFeatureInputs", + "line": 22 + } + ], + "line_count": 33 + }, + "openmeter/productcatalog/testutils/meters.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestMeters", + "signature": "func NewTestMeters(t *testing.T, namespace string) []meter.Meter", + "line": 13 + } + ], + "line_count": 81 + }, + "openmeter/productcatalog/testutils/namespace.go": { + "header": "\t\"crypto/rand\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 11 + } + ], + "line_count": 17 + }, + "openmeter/productcatalog/testutils/plan.go": { + "header": "\t\"testing\"\n\tdecimal \"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "WithPlanPhases", + "signature": "func WithPlanPhases(phases ...productcatalog.Phase) TransformerFunc[productcatalog.Plan]", + "line": 20 + }, + { + "kind": "func", + "name": "WithPlanKey", + "signature": "func WithPlanKey(key string) TransformerFunc[productcatalog.Plan]", + "line": 28 + }, + { + "kind": "func", + "name": "NewTestPlan", + "signature": "func NewTestPlan(t *testing.T, namespace string, transformers ...TransformerFunc[productcatalog.Plan]) plan.CreatePlanInput", + "line": 36 + } + ], + "line_count": 99 + }, + "openmeter/progressmanager/adapter.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/progressmanager/entity\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 9 + }, + { + "kind": "interface", + "name": "ProgressManagerAdapter", + "signature": "type ProgressManagerAdapter interface", + "line": 13 + } + ], + "line_count": 16 + }, + "openmeter/progressmanager/adapter/adapter.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (progressmanager.Adapter, error)", + "line": 36 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 51 + }, + { + "kind": "func", + "name": "NewNoop", + "signature": "func NewNoop() progressmanager.Adapter", + "line": 65 + }, + { + "kind": "struct", + "name": "adapterNoop", + "signature": "type adapterNoop struct", + "line": 71 + } + ], + "line_count": 71 + }, + "openmeter/progressmanager/adapter/mock.go": { + "header": "\t\"context\"\n\t\"github.com/stretchr/testify/mock\"\n\t\"github.com/openmeterio/openmeter/openmeter/progressmanager\"", + "symbols": [ + { + "kind": "func", + "name": "NewMockProgressManager", + "signature": "func NewMockProgressManager() *MockProgressManager", + "line": 14 + }, + { + "kind": "struct", + "name": "MockProgressManager", + "signature": "type MockProgressManager struct", + "line": 19 + }, + { + "kind": "func", + "name": "GetProgress", + "signature": "func (m *MockProgressManager) GetProgress(ctx context.Context, input progressmanagerentity.GetProgressInput) (*progressmanagerentity.Progress, error)", + "line": 23 + }, + { + "kind": "func", + "name": "DeleteProgressByRuntimeID", + "signature": "func (m *MockProgressManager) DeleteProgressByRuntimeID(ctx context.Context, runtimeID string) error", + "line": 34 + }, + { + "kind": "func", + "name": "UpsertProgress", + "signature": "func (m *MockProgressManager) UpsertProgress(ctx context.Context, input progressmanagerentity.UpsertProgressInput) error", + "line": 39 + } + ], + "line_count": 42 + }, + "openmeter/progressmanager/adapter/noop.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/progressmanager/entity\"", + "symbols": [ + { + "kind": "func", + "name": "GetProgress", + "signature": "func (a *adapterNoop) GetProgress(ctx context.Context, input entity.GetProgressInput) (*entity.Progress, error)", + "line": 11 + }, + { + "kind": "func", + "name": "UpsertProgress", + "signature": "func (a *adapterNoop) UpsertProgress(ctx context.Context, input entity.UpsertProgressInput) error", + "line": 17 + } + ], + "line_count": 19 + }, + "openmeter/progressmanager/adapter/progress.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetProgress", + "signature": "func (a *adapter) GetProgress(ctx context.Context, input entity.GetProgressInput) (*entity.Progress, error)", + "line": 19 + }, + { + "kind": "func", + "name": "UpsertProgress", + "signature": "func (a *adapter) UpsertProgress(ctx context.Context, input entity.UpsertProgressInput) error", + "line": 46 + }, + { + "kind": "func", + "name": "getKey", + "signature": "func (a *adapter) getKey(id entity.ProgressID) string", + "line": 65 + } + ], + "line_count": 71 + }, + "openmeter/progressmanager/entity/progressmanager.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ProgressID", + "signature": "type ProgressID struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *ProgressID) Validate() error", + "line": 17 + }, + { + "kind": "struct", + "name": "Progress", + "signature": "type Progress struct", + "line": 32 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *Progress) Validate() error", + "line": 45 + }, + { + "kind": "struct", + "name": "GetProgressInput", + "signature": "type GetProgressInput struct", + "line": 68 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *GetProgressInput) Validate() error", + "line": 72 + }, + { + "kind": "struct", + "name": "UpsertProgressInput", + "signature": "type UpsertProgressInput struct", + "line": 83 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a *UpsertProgressInput) Validate() error", + "line": 87 + } + ], + "line_count": 95 + }, + "openmeter/progressmanager/httpdriver/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 14 + }, + { + "kind": "interface", + "name": "ProgressHandler", + "signature": "type ProgressHandler interface", + "line": 18 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 24 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 30 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tservice progressmanager.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 39 + } + ], + "line_count": 49 + }, + "openmeter/progressmanager/httpdriver/progress.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetProgress", + "signature": "func (h *handler) GetProgress() GetProgressHandler", + "line": 22 + }, + { + "kind": "func", + "name": "progressToAPI", + "signature": "func progressToAPI(p progressmanagerentity.Progress) api.Progress", + "line": 62 + } + ], + "line_count": 69 + }, + "openmeter/progressmanager/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/progressmanager/entity\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 9 + }, + { + "kind": "interface", + "name": "ProgressManagerService", + "signature": "type ProgressManagerService interface", + "line": 13 + } + ], + "line_count": 16 + }, + "openmeter/registry/builder/entitlement.go": { + "header": "\t\"log/slog\"\n\t\"time\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementOptions", + "signature": "type EntitlementOptions struct", + "line": 32 + }, + { + "kind": "func", + "name": "GetEntitlementRegistry", + "signature": "func GetEntitlementRegistry(opts EntitlementOptions) *registry.Entitlement", + "line": 44 + } + ], + "line_count": 133 + }, + "openmeter/registry/entitlement.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/credit\"\n\t\"github.com/openmeterio/openmeter/openmeter/credit/grant\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"", + "symbols": [ + { + "kind": "struct", + "name": "Entitlement", + "signature": "type Entitlement struct", + "line": 11 + } + ], + "line_count": 21 + }, + "openmeter/secret/adapter.go": { + "header": "\t\"context\"\n\tsecretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 9 + }, + { + "kind": "interface", + "name": "SecretAdapter", + "signature": "type SecretAdapter interface", + "line": 13 + } + ], + "line_count": 18 + }, + "openmeter/secret/adapter/adapter.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/secret\"\n)\nfunc New() secret.Adapter {", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New() secret.Adapter", + "line": 7 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 13 + } + ], + "line_count": 13 + }, + "openmeter/secret/adapter/secret.go": { + "header": "\t\"context\"\n\tsecretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"\n)", + "symbols": [ + { + "kind": "func", + "name": "CreateAppSecret", + "signature": "func (a adapter) CreateAppSecret(ctx context.Context, input secretentity.CreateAppSecretInput) (secretentity.SecretID, error)", + "line": 12 + }, + { + "kind": "func", + "name": "UpdateAppSecret", + "signature": "func (a adapter) UpdateAppSecret(ctx context.Context, input secretentity.UpdateAppSecretInput) (secretentity.SecretID, error)", + "line": 19 + }, + { + "kind": "func", + "name": "GetAppSecret", + "signature": "func (a adapter) GetAppSecret(ctx context.Context, input secretentity.GetAppSecretInput) (secretentity.Secret, error)", + "line": 26 + }, + { + "kind": "func", + "name": "DeleteAppSecret", + "signature": "func (a adapter) DeleteAppSecret(ctx context.Context, input secretentity.DeleteAppSecretInput) error", + "line": 37 + } + ], + "line_count": 39 + }, + "openmeter/secret/entity/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "NewSecretNotFoundError", + "signature": "func NewSecretNotFoundError(id SecretID) *SecretNotFoundError", + "line": 12 + }, + { + "kind": "struct", + "name": "SecretNotFoundError", + "signature": "type SecretNotFoundError struct", + "line": 20 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *SecretNotFoundError) Error() string", + "line": 24 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *SecretNotFoundError) Unwrap() error", + "line": 28 + }, + { + "kind": "func", + "name": "IsSecretNotFoundError", + "signature": "func IsSecretNotFoundError(err error) bool", + "line": 33 + } + ], + "line_count": 41 + }, + "openmeter/secret/entity/input.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateAppSecretInput", + "signature": "type CreateAppSecretInput struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateAppSecretInput) Validate() error", + "line": 16 + }, + { + "kind": "struct", + "name": "UpdateAppSecretInput", + "signature": "type UpdateAppSecretInput struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateAppSecretInput) Validate() error", + "line": 45 + } + ], + "line_count": 71 + }, + "openmeter/secret/entity/secret.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "struct", + "name": "SecretID", + "signature": "type SecretID struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewSecretID", + "signature": "func NewSecretID(appID app.AppID, id string, key string) SecretID", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i SecretID) Validate() error", + "line": 29 + }, + { + "kind": "struct", + "name": "Secret", + "signature": "type Secret struct", + "line": 52 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s Secret) Validate() error", + "line": 57 + } + ], + "line_count": 71 + }, + "openmeter/secret/service.go": { + "header": "\t\"context\"\n\tsecretentity \"github.com/openmeterio/openmeter/openmeter/secret/entity\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 9 + }, + { + "kind": "interface", + "name": "SecretService", + "signature": "type SecretService interface", + "line": 13 + } + ], + "line_count": 18 + }, + "openmeter/secret/service/secret.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/secret\"", + "symbols": [ + { + "kind": "func", + "name": "CreateAppSecret", + "signature": "func (s *Service) CreateAppSecret(ctx context.Context, input secretentity.CreateAppSecretInput) (secretentity.SecretID, error)", + "line": 14 + }, + { + "kind": "func", + "name": "UpdateAppSecret", + "signature": "func (s *Service) UpdateAppSecret(ctx context.Context, input secretentity.UpdateAppSecretInput) (secretentity.SecretID, error)", + "line": 24 + }, + { + "kind": "func", + "name": "GetAppSecret", + "signature": "func (s *Service) GetAppSecret(ctx context.Context, input secretentity.GetAppSecretInput) (secretentity.Secret, error)", + "line": 34 + }, + { + "kind": "func", + "name": "DeleteAppSecret", + "signature": "func (s *Service) DeleteAppSecret(ctx context.Context, input secretentity.DeleteAppSecretInput) error", + "line": 44 + } + ], + "line_count": 52 + }, + "openmeter/secret/service/service.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/secret\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 11 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 27 + } + ], + "line_count": 35 + }, + "openmeter/server/cors.go": { + "header": "\t\"net/http\"\n\t\"strings\"\n\t\"github.com/go-chi/cors\"", + "symbols": [ + { + "kind": "struct", + "name": "corsOptions", + "signature": "type corsOptions struct", + "line": 10 + }, + { + "kind": "func", + "name": "corsHandler", + "signature": "func corsHandler(options corsOptions) func(next http.Handler) http.Handler", + "line": 15 + } + ], + "line_count": 38 + }, + "openmeter/server/framework_test.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "func", + "name": "TestIssueIfHTTPStatusKnownErrorResponses", + "signature": "func TestIssueIfHTTPStatusKnownErrorResponses(t *testing.T)", + "line": 21 + } + ], + "line_count": 126 + }, + "openmeter/server/router/addon.go": { + "header": "\t\"net/http\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "ListAddons", + "signature": "func (a *Router) ListAddons(w http.ResponseWriter, r *http.Request, params api.ListAddonsParams)", + "line": 14 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (a *Router) CreateAddon(w http.ResponseWriter, r *http.Request)", + "line": 20 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (a *Router) DeleteAddon(w http.ResponseWriter, r *http.Request, addonId string)", + "line": 26 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (a *Router) GetAddon(w http.ResponseWriter, r *http.Request, addonId string, params api.GetAddonParams)", + "line": 32 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (a *Router) UpdateAddon(w http.ResponseWriter, r *http.Request, addonId string)", + "line": 41 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (a *Router) ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId string)", + "line": 47 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (a *Router) PublishAddon(w http.ResponseWriter, r *http.Request, addonId string)", + "line": 53 + } + ], + "line_count": 55 + }, + "openmeter/server/router/app.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetApp", + "signature": "func (a *Router) GetApp(w http.ResponseWriter, r *http.Request, appID string)", + "line": 11 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (a *Router) ListApps(w http.ResponseWriter, r *http.Request, params api.ListAppsParams)", + "line": 17 + }, + { + "kind": "func", + "name": "UpdateApp", + "signature": "func (a *Router) UpdateApp(w http.ResponseWriter, r *http.Request, appID string)", + "line": 23 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (a *Router) UninstallApp(w http.ResponseWriter, r *http.Request, appID string)", + "line": 29 + } + ], + "line_count": 31 + }, + "openmeter/server/router/appcustominvoicing.go": { + "header": "\t\"net/http\"\n\tappcustominvoicinghttpdriver \"github.com/openmeterio/openmeter/openmeter/app/custominvoicing/httpdriver\"\n)", + "symbols": [ + { + "kind": "func", + "name": "AppCustomInvoicingDraftSynchronized", + "signature": "func (a *Router) AppCustomInvoicingDraftSynchronized(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 11 + }, + { + "kind": "func", + "name": "AppCustomInvoicingIssuingSynchronized", + "signature": "func (a *Router) AppCustomInvoicingIssuingSynchronized(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 19 + }, + { + "kind": "func", + "name": "AppCustomInvoicingUpdatePaymentStatus", + "signature": "func (a *Router) AppCustomInvoicingUpdatePaymentStatus(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 27 + } + ], + "line_count": 31 + }, + "openmeter/server/router/appstripe.go": { + "header": "\t\"fmt\"\n\t\"io\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "AppStripeWebhook", + "signature": "func (a *Router) AppStripeWebhook(w http.ResponseWriter, r *http.Request, appID string)", + "line": 14 + }, + { + "kind": "func", + "name": "UpdateStripeAPIKey", + "signature": "func (a *Router) UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request, appID string)", + "line": 34 + }, + { + "kind": "func", + "name": "CreateStripeCheckoutSession", + "signature": "func (a *Router) CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)", + "line": 40 + } + ], + "line_count": 42 + }, + "openmeter/server/router/billing.go": { + "header": "\t\"net/http\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "ListBillingProfileCustomerOverrides", + "signature": "func (a *Router) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params api.ListBillingProfileCustomerOverridesParams)", + "line": 14 + }, + { + "kind": "func", + "name": "DeleteBillingProfileCustomerOverride", + "signature": "func (a *Router) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)", + "line": 20 + }, + { + "kind": "func", + "name": "GetBillingProfileCustomerOverride", + "signature": "func (a *Router) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string, params api.GetBillingProfileCustomerOverrideParams)", + "line": 28 + }, + { + "kind": "func", + "name": "UpsertBillingProfileCustomerOverride", + "signature": "func (a *Router) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)", + "line": 37 + }, + { + "kind": "func", + "name": "ListInvoices", + "signature": "func (a *Router) ListInvoices(w http.ResponseWriter, r *http.Request, params api.ListInvoicesParams)", + "line": 45 + }, + { + "kind": "func", + "name": "InvoicePendingLinesAction", + "signature": "func (a *Router) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)", + "line": 51 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (a *Router) DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 57 + }, + { + "kind": "func", + "name": "GetInvoice", + "signature": "func (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params api.GetInvoiceParams)", + "line": 65 + }, + { + "kind": "func", + "name": "SnapshotQuantitiesInvoiceAction", + "signature": "func (a *Router) SnapshotQuantitiesInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 75 + }, + { + "kind": "func", + "name": "AdvanceInvoiceAction", + "signature": "func (a *Router) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 84 + }, + { + "kind": "func", + "name": "ApproveInvoiceAction", + "signature": "func (a *Router) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 93 + }, + { + "kind": "func", + "name": "SimulateInvoice", + "signature": "func (a *Router) SimulateInvoice(w http.ResponseWriter, r *http.Request, customerId string)", + "line": 102 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (a *Router) UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 110 + }, + { + "kind": "func", + "name": "RetryInvoiceAction", + "signature": "func (a *Router) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 118 + }, + { + "kind": "func", + "name": "RecalculateInvoiceTaxAction", + "signature": "func (a *Router) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 127 + }, + { + "kind": "func", + "name": "VoidInvoiceAction", + "signature": "func (a *Router) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)", + "line": 133 + }, + { + "kind": "func", + "name": "CreatePendingInvoiceLine", + "signature": "func (a *Router) CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request, customerId string)", + "line": 139 + }, + { + "kind": "func", + "name": "ListBillingProfiles", + "signature": "func (a *Router) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params api.ListBillingProfilesParams)", + "line": 146 + }, + { + "kind": "func", + "name": "CreateBillingProfile", + "signature": "func (a *Router) CreateBillingProfile(w http.ResponseWriter, r *http.Request)", + "line": 152 + }, + { + "kind": "func", + "name": "DeleteBillingProfile", + "signature": "func (a *Router) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string)", + "line": 158 + }, + { + "kind": "func", + "name": "GetBillingProfile", + "signature": "func (a *Router) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params api.GetBillingProfileParams)", + "line": 164 + }, + { + "kind": "func", + "name": "UpdateBillingProfile", + "signature": "func (a *Router) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string)", + "line": 173 + } + ], + "line_count": 175 + }, + "openmeter/server/router/credit.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\tcreditdriver \"github.com/openmeterio/openmeter/openmeter/credit/driver\"", + "symbols": [ + { + "kind": "func", + "name": "ListGrants", + "signature": "func (a *Router) ListGrants(w http.ResponseWriter, r *http.Request, params api.ListGrantsParams)", + "line": 12 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (a *Router) VoidGrant(w http.ResponseWriter, r *http.Request, grantId string, params api.VoidGrantParams)", + "line": 20 + }, + { + "kind": "func", + "name": "ListGrantsV2", + "signature": "func (a *Router) ListGrantsV2(w http.ResponseWriter, r *http.Request, params api.ListGrantsV2Params)", + "line": 33 + } + ], + "line_count": 37 + }, + "openmeter/server/router/customer.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\tapphttpdriver \"github.com/openmeterio/openmeter/openmeter/app/httpdriver\"", + "symbols": [ + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (a *Router) ListCustomers(w http.ResponseWriter, r *http.Request, params api.ListCustomersParams)", + "line": 14 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (a *Router) CreateCustomer(w http.ResponseWriter, r *http.Request)", + "line": 20 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (a *Router) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string)", + "line": 26 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (a *Router) GetCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string, params api.GetCustomerParams)", + "line": 32 + }, + { + "kind": "func", + "name": "UpdateCustomer", + "signature": "func (a *Router) UpdateCustomer(w http.ResponseWriter, r *http.Request, customerIDOrKey string)", + "line": 41 + }, + { + "kind": "func", + "name": "ListCustomerAppData", + "signature": "func (a *Router) ListCustomerAppData(w http.ResponseWriter, r *http.Request, customerIdOrKey string, params api.ListCustomerAppDataParams)", + "line": 47 + }, + { + "kind": "func", + "name": "UpsertCustomerAppData", + "signature": "func (a *Router) UpsertCustomerAppData(w http.ResponseWriter, r *http.Request, customerIDOrKey string)", + "line": 56 + }, + { + "kind": "func", + "name": "DeleteCustomerAppData", + "signature": "func (a *Router) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerIDOrKey string, appID string)", + "line": 64 + }, + { + "kind": "func", + "name": "ListCustomerSubscriptions", + "signature": "func (a *Router) ListCustomerSubscriptions(w http.ResponseWriter, r *http.Request, customerIDOrKey string, params api.ListCustomerSubscriptionsParams)", + "line": 73 + } + ], + "line_count": 78 + }, + "openmeter/server/router/customerstripe.go": { + "header": "\t\"net/http\"\n\tappstripehttpdriver \"github.com/openmeterio/openmeter/openmeter/app/stripe/httpdriver\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerStripeAppData", + "signature": "func (a *Router) GetCustomerStripeAppData(w http.ResponseWriter, r *http.Request, customerIdOrKey string)", + "line": 11 + }, + { + "kind": "func", + "name": "UpsertCustomerStripeAppData", + "signature": "func (a *Router) UpsertCustomerStripeAppData(w http.ResponseWriter, r *http.Request, customerIdOrKey string)", + "line": 19 + }, + { + "kind": "func", + "name": "CreateCustomerStripePortalSession", + "signature": "func (a *Router) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerIdOrKey string)", + "line": 27 + } + ], + "line_count": 31 + }, + "openmeter/server/router/debug.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/openmeter/debug/httpdriver\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetDebugMetrics", + "signature": "func (a *Router) GetDebugMetrics(w http.ResponseWriter, r *http.Request)", + "line": 11 + } + ], + "line_count": 13 + }, + "openmeter/server/router/entitlement.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\tcustomerdriver \"github.com/openmeterio/openmeter/openmeter/customer/httpdriver\"", + "symbols": [ + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (a *Router) ListEntitlements(w http.ResponseWriter, r *http.Request, params api.ListEntitlementsParams)", + "line": 18 + }, + { + "kind": "func", + "name": "GetEntitlementById", + "signature": "func (a *Router) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId string)", + "line": 24 + }, + { + "kind": "func", + "name": "CreateEntitlement", + "signature": "func (a *Router) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)", + "line": 36 + }, + { + "kind": "func", + "name": "ListSubjectEntitlements", + "signature": "func (a *Router) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, params api.ListSubjectEntitlementsParams)", + "line": 42 + }, + { + "kind": "func", + "name": "GetEntitlementValue", + "signature": "func (a *Router) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params api.GetEntitlementValueParams)", + "line": 51 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (a *Router) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)", + "line": 61 + }, + { + "kind": "func", + "name": "ListEntitlementGrants", + "signature": "func (a *Router) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params api.ListEntitlementGrantsParams)", + "line": 70 + }, + { + "kind": "func", + "name": "ResetEntitlementUsage", + "signature": "func (a *Router) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)", + "line": 79 + }, + { + "kind": "func", + "name": "GetEntitlementHistory", + "signature": "func (a *Router) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string, params api.GetEntitlementHistoryParams)", + "line": 88 + }, + { + "kind": "func", + "name": "DeleteEntitlement", + "signature": "func (a *Router) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)", + "line": 98 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (a *Router) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)", + "line": 106 + }, + { + "kind": "func", + "name": "OverrideEntitlement", + "signature": "func (a *Router) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)", + "line": 114 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementValue", + "signature": "func (a *Router) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string, params api.GetCustomerEntitlementValueParams)", + "line": 127 + }, + { + "kind": "func", + "name": "GetCustomerAccess", + "signature": "func (a *Router) GetCustomerAccess(w http.ResponseWriter, r *http.Request, customerIdOrKey string)", + "line": 136 + }, + { + "kind": "func", + "name": "ListEntitlementsV2", + "signature": "func (a *Router) ListEntitlementsV2(w http.ResponseWriter, r *http.Request, params api.ListEntitlementsV2Params)", + "line": 146 + }, + { + "kind": "func", + "name": "GetEntitlementByIdV2", + "signature": "func (a *Router) GetEntitlementByIdV2(w http.ResponseWriter, r *http.Request, entitlementId string)", + "line": 150 + }, + { + "kind": "func", + "name": "CreateCustomerEntitlementV2", + "signature": "func (a *Router) CreateCustomerEntitlementV2(w http.ResponseWriter, r *http.Request, customerIdOrKey api.ULIDOrExternalKey)", + "line": 162 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementsV2", + "signature": "func (a *Router) ListCustomerEntitlementsV2(w http.ResponseWriter, r *http.Request, customerIdOrKey api.ULIDOrExternalKey, params api.ListCustomerEntitlementsV2Params)", + "line": 168 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementV2", + "signature": "func (a *Router) GetCustomerEntitlementV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string)", + "line": 177 + }, + { + "kind": "func", + "name": "DeleteCustomerEntitlementV2", + "signature": "func (a *Router) DeleteCustomerEntitlementV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, entitlementIdOrFeatureKey string)", + "line": 186 + }, + { + "kind": "func", + "name": "OverrideCustomerEntitlementV2", + "signature": "func (a *Router) OverrideCustomerEntitlementV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string)", + "line": 195 + }, + { + "kind": "func", + "name": "ListCustomerEntitlementGrantsV2", + "signature": "func (a *Router) ListCustomerEntitlementGrantsV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string, params api.ListCustomerEntitlementGrantsV2Params)", + "line": 204 + }, + { + "kind": "func", + "name": "CreateCustomerEntitlementGrantV2", + "signature": "func (a *Router) CreateCustomerEntitlementGrantV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string)", + "line": 214 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementValueV2", + "signature": "func (a *Router) GetCustomerEntitlementValueV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string, params api.GetCustomerEntitlementValueV2Params)", + "line": 223 + }, + { + "kind": "func", + "name": "GetCustomerEntitlementHistoryV2", + "signature": "func (a *Router) GetCustomerEntitlementHistoryV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string, params api.GetCustomerEntitlementHistoryV2Params)", + "line": 233 + }, + { + "kind": "func", + "name": "ResetCustomerEntitlementUsageV2", + "signature": "func (a *Router) ResetCustomerEntitlementUsageV2(w http.ResponseWriter, r *http.Request, customerIdOrKey string, featureKey string)", + "line": 243 + } + ], + "line_count": 248 + }, + "openmeter/server/router/event.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n)", + "symbols": [ + { + "kind": "func", + "name": "IngestEvents", + "signature": "func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request)", + "line": 10 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (a *Router) ListEvents(w http.ResponseWriter, r *http.Request, params api.ListEventsParams)", + "line": 15 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (a *Router) ListEventsV2(w http.ResponseWriter, r *http.Request, params api.ListEventsV2Params)", + "line": 20 + } + ], + "line_count": 22 + }, + "openmeter/server/router/info.go": { + "header": "func (a *Router) ListCurrencies(w http.ResponseWriter, r *http.Request) {\n\ta.infoHandler.ListCurrencies().ServeHTTP(w, r)\n}", + "symbols": [ + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (a *Router) ListCurrencies(w http.ResponseWriter, r *http.Request)", + "line": 7 + }, + { + "kind": "func", + "name": "GetProgress", + "signature": "func (a *Router) GetProgress(w http.ResponseWriter, r *http.Request, progressID string)", + "line": 13 + } + ], + "line_count": 15 + }, + "openmeter/server/router/marketplace.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ListMarketplaceListings", + "signature": "func (a *Router) ListMarketplaceListings(w http.ResponseWriter, r *http.Request, params api.ListMarketplaceListingsParams)", + "line": 11 + }, + { + "kind": "func", + "name": "GetMarketplaceListing", + "signature": "func (a *Router) GetMarketplaceListing(w http.ResponseWriter, r *http.Request, appType api.AppType)", + "line": 17 + }, + { + "kind": "func", + "name": "MarketplaceAppAPIKeyInstall", + "signature": "func (a *Router) MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request, appType api.AppType)", + "line": 23 + }, + { + "kind": "func", + "name": "MarketplaceOAuth2InstallGetURL", + "signature": "func (a *Router) MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request, appType api.AppType)", + "line": 29 + }, + { + "kind": "func", + "name": "MarketplaceOAuth2InstallAuthorize", + "signature": "func (a *Router) MarketplaceOAuth2InstallAuthorize(w http.ResponseWriter, r *http.Request, appType api.AppType, params api.MarketplaceOAuth2InstallAuthorizeParams)", + "line": 36 + }, + { + "kind": "func", + "name": "MarketplaceAppInstall", + "signature": "func (a *Router) MarketplaceAppInstall(w http.ResponseWriter, r *http.Request, appType api.AppType)", + "line": 43 + } + ], + "line_count": 45 + }, + "openmeter/server/router/meter.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\thttpdriver \"github.com/openmeterio/openmeter/openmeter/meter/httphandler\"", + "symbols": [ + { + "kind": "func", + "name": "ListMeters", + "signature": "func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)", + "line": 12 + }, + { + "kind": "func", + "name": "GetMeter", + "signature": "func (a *Router) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)", + "line": 17 + }, + { + "kind": "func", + "name": "CreateMeter", + "signature": "func (a *Router) CreateMeter(w http.ResponseWriter, r *http.Request)", + "line": 22 + }, + { + "kind": "func", + "name": "UpdateMeter", + "signature": "func (a *Router) UpdateMeter(w http.ResponseWriter, r *http.Request, meterID string)", + "line": 27 + }, + { + "kind": "func", + "name": "DeleteMeter", + "signature": "func (a *Router) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)", + "line": 32 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (a *Router) QueryMeter(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, params api.QueryMeterParams)", + "line": 37 + }, + { + "kind": "func", + "name": "QueryMeterPost", + "signature": "func (a *Router) QueryMeterPost(w http.ResponseWriter, r *http.Request, meterIDOrSlug string)", + "line": 61 + }, + { + "kind": "func", + "name": "ListMeterSubjects", + "signature": "func (a *Router) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, params api.ListMeterSubjectsParams)", + "line": 79 + }, + { + "kind": "func", + "name": "ListMeterGroupByValues", + "signature": "func (a *Router) ListMeterGroupByValues(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, groupByKey string, params api.ListMeterGroupByValuesParams)", + "line": 88 + } + ], + "line_count": 95 + }, + "openmeter/server/router/noop.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n)\nvar unimplemented api.ServerInterface = api.Unimplemented{}", + "symbols": [], + "line_count": 9 + }, + "openmeter/server/router/notification.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ListNotificationChannels", + "signature": "func (a *Router) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params api.ListNotificationChannelsParams)", + "line": 11 + }, + { + "kind": "func", + "name": "CreateNotificationChannel", + "signature": "func (a *Router) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)", + "line": 17 + }, + { + "kind": "func", + "name": "DeleteNotificationChannel", + "signature": "func (a *Router) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)", + "line": 23 + }, + { + "kind": "func", + "name": "GetNotificationChannel", + "signature": "func (a *Router) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)", + "line": 29 + }, + { + "kind": "func", + "name": "UpdateNotificationChannel", + "signature": "func (a *Router) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelID string)", + "line": 35 + }, + { + "kind": "func", + "name": "ListNotificationEvents", + "signature": "func (a *Router) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params api.ListNotificationEventsParams)", + "line": 41 + }, + { + "kind": "func", + "name": "GetNotificationEvent", + "signature": "func (a *Router) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventID string)", + "line": 47 + }, + { + "kind": "func", + "name": "ResendNotificationEvent", + "signature": "func (a *Router) ResendNotificationEvent(w http.ResponseWriter, r *http.Request, eventID string)", + "line": 53 + }, + { + "kind": "func", + "name": "ListNotificationRules", + "signature": "func (a *Router) ListNotificationRules(w http.ResponseWriter, r *http.Request, params api.ListNotificationRulesParams)", + "line": 59 + }, + { + "kind": "func", + "name": "CreateNotificationRule", + "signature": "func (a *Router) CreateNotificationRule(w http.ResponseWriter, r *http.Request)", + "line": 65 + }, + { + "kind": "func", + "name": "DeleteNotificationRule", + "signature": "func (a *Router) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)", + "line": 71 + }, + { + "kind": "func", + "name": "GetNotificationRule", + "signature": "func (a *Router) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)", + "line": 77 + }, + { + "kind": "func", + "name": "UpdateNotificationRule", + "signature": "func (a *Router) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)", + "line": 83 + }, + { + "kind": "func", + "name": "TestNotificationRule", + "signature": "func (a *Router) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleID string)", + "line": 89 + } + ], + "line_count": 91 + }, + "openmeter/server/router/plan.go": { + "header": "\t\"net/http\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlans", + "signature": "func (a *Router) ListPlans(w http.ResponseWriter, r *http.Request, params api.ListPlansParams)", + "line": 14 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (a *Router) CreatePlan(w http.ResponseWriter, r *http.Request)", + "line": 20 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (a *Router) DeletePlan(w http.ResponseWriter, r *http.Request, planId string)", + "line": 26 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (a *Router) GetPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string, params api.GetPlanParams)", + "line": 32 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (a *Router) UpdatePlan(w http.ResponseWriter, r *http.Request, planId string)", + "line": 41 + }, + { + "kind": "func", + "name": "NextPlan", + "signature": "func (a *Router) NextPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string)", + "line": 47 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (a *Router) PublishPlan(w http.ResponseWriter, r *http.Request, planId string)", + "line": 54 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (a *Router) ArchivePlan(w http.ResponseWriter, r *http.Request, planId string)", + "line": 60 + } + ], + "line_count": 62 + }, + "openmeter/server/router/planaddon.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/planaddon/httpdriver\"", + "symbols": [ + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (a *Router) ListPlanAddons(w http.ResponseWriter, r *http.Request, planId string, params api.ListPlanAddonsParams)", + "line": 12 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (a *Router) CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId string)", + "line": 21 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (a *Router) DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)", + "line": 27 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (a *Router) GetPlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)", + "line": 36 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (a *Router) UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId string, planAddonId string)", + "line": 45 + } + ], + "line_count": 50 + }, + "openmeter/server/router/portal.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePortalToken", + "signature": "func (a *Router) CreatePortalToken(w http.ResponseWriter, r *http.Request)", + "line": 14 + }, + { + "kind": "func", + "name": "ListPortalTokens", + "signature": "func (a *Router) ListPortalTokens(w http.ResponseWriter, r *http.Request, params api.ListPortalTokensParams)", + "line": 19 + }, + { + "kind": "func", + "name": "InvalidatePortalTokens", + "signature": "func (a *Router) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)", + "line": 24 + }, + { + "kind": "func", + "name": "QueryPortalMeter", + "signature": "func (a *Router) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params api.QueryPortalMeterParams)", + "line": 30 + } + ], + "line_count": 51 + }, + "openmeter/server/router/product_catalog.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (a *Router) ListFeatures(w http.ResponseWriter, r *http.Request, params api.ListFeaturesParams)", + "line": 11 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (a *Router) CreateFeature(w http.ResponseWriter, r *http.Request)", + "line": 17 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (a *Router) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId string)", + "line": 23 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (a *Router) GetFeature(w http.ResponseWriter, r *http.Request, featureId string)", + "line": 29 + } + ], + "line_count": 31 + }, + "openmeter/server/router/router.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 81 + }, + { + "kind": "func", + "name": "jsonBodyDecoder", + "signature": "func jsonBodyDecoder(body io.Reader, header http.Header, schema *openapi3.SchemaRef, encFn openapi3filter.EncodingFn) (interface", + "line": 87 + }, + { + "kind": "interface", + "name": "IngestHandler", + "signature": "type IngestHandler interface", + "line": 95 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 99 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 144 + }, + { + "kind": "struct", + "name": "Router", + "signature": "type Router struct", + "line": 257 + }, + { + "kind": "func", + "name": "NewRouter", + "signature": "func NewRouter(config Config) (*Router, error)", + "line": 290 + } + ], + "line_count": 517 + }, + "openmeter/server/router/subject.go": { + "header": "\t\"net/http\"\n)\nfunc (a *Router) UpsertSubject(w http.ResponseWriter, r *http.Request) {", + "symbols": [ + { + "kind": "func", + "name": "UpsertSubject", + "signature": "func (a *Router) UpsertSubject(w http.ResponseWriter, r *http.Request)", + "line": 8 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (a *Router) ListSubjects(w http.ResponseWriter, r *http.Request)", + "line": 13 + }, + { + "kind": "func", + "name": "GetSubject", + "signature": "func (a *Router) GetSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)", + "line": 18 + }, + { + "kind": "func", + "name": "DeleteSubject", + "signature": "func (a *Router) DeleteSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)", + "line": 23 + } + ], + "line_count": 25 + }, + "openmeter/server/router/subscription.go": { + "header": "\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/api\"\n\tsubscriptionhttpdriver \"github.com/openmeterio/openmeter/openmeter/productcatalog/subscription/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateSubscription", + "signature": "func (a *Router) CreateSubscription(w http.ResponseWriter, r *http.Request)", + "line": 11 + }, + { + "kind": "func", + "name": "ChangeSubscription", + "signature": "func (a *Router) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 15 + }, + { + "kind": "func", + "name": "GetSubscription", + "signature": "func (a *Router) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string, params api.GetSubscriptionParams)", + "line": 22 + }, + { + "kind": "func", + "name": "EditSubscription", + "signature": "func (a *Router) EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 30 + }, + { + "kind": "func", + "name": "CancelSubscription", + "signature": "func (a *Router) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 37 + }, + { + "kind": "func", + "name": "MigrateSubscription", + "signature": "func (a *Router) MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 44 + }, + { + "kind": "func", + "name": "UnscheduleCancelation", + "signature": "func (a *Router) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 51 + }, + { + "kind": "func", + "name": "RestoreSubscription", + "signature": "func (a *Router) RestoreSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 58 + }, + { + "kind": "func", + "name": "DeleteSubscription", + "signature": "func (a *Router) DeleteSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 65 + } + ], + "line_count": 69 + }, + "openmeter/server/router/subscriptionaddon.go": { + "header": "\t\"net/http\"\n\thttpdriver \"github.com/openmeterio/openmeter/openmeter/subscription/addon/http\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (a *Router) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 11 + }, + { + "kind": "func", + "name": "CreateSubscriptionAddon", + "signature": "func (a *Router) CreateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string)", + "line": 19 + }, + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (a *Router) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string, subscriptionAddonId string)", + "line": 27 + }, + { + "kind": "func", + "name": "UpdateSubscriptionAddon", + "signature": "func (a *Router) UpdateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId string, subscriptionAddonId string)", + "line": 36 + } + ], + "line_count": 41 + }, + "openmeter/server/server.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Server", + "signature": "type Server struct", + "line": 29 + }, + { + "kind": "struct", + "name": "ServerLogger", + "signature": "type ServerLogger struct", + "line": 33 + }, + { + "kind": "interface", + "name": "MiddlewareManager", + "signature": "type MiddlewareManager interface", + "line": 35 + }, + { + "kind": "interface", + "name": "RouteManager", + "signature": "type RouteManager interface", + "line": 41 + }, + { + "kind": "struct", + "name": "RouterHooks", + "signature": "type RouterHooks struct", + "line": 60 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 67 + }, + { + "kind": "func", + "name": "NewServer", + "signature": "func NewServer(config *Config) (*Server, error)", + "line": 74 + }, + { + "kind": "struct", + "name": "middlewareCollector", + "signature": "type middlewareCollector struct", + "line": 260 + }, + { + "kind": "func", + "name": "Use", + "signature": "func (c *middlewareCollector) Use(middlewares ...func(http.Handler) http.Handler)", + "line": 264 + }, + { + "kind": "func", + "name": "collectMiddlewareHooks", + "signature": "func collectMiddlewareHooks(hooks []MiddlewareHook) []server.MiddlewareFunc", + "line": 271 + }, + { + "kind": "func", + "name": "errorHandlerReply", + "signature": "func errorHandlerReply(w http.ResponseWriter, r *http.Request, err error)", + "line": 280 + } + ], + "line_count": 304 + }, + "openmeter/server/server_test.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "struct", + "name": "MockHandler", + "signature": "type MockHandler struct", + "line": 126 + }, + { + "kind": "func", + "name": "ServeHTTP", + "signature": "func (h MockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request, namespace string)", + "line": 128 + }, + { + "kind": "struct", + "name": "testRequest", + "signature": "type testRequest struct", + "line": 132 + }, + { + "kind": "struct", + "name": "testResponse", + "signature": "type testResponse struct", + "line": 140 + }, + { + "kind": "func", + "name": "TestRoutes", + "signature": "func TestRoutes(t *testing.T)", + "line": 145 + }, + { + "kind": "func", + "name": "getTestServer", + "signature": "func getTestServer(t *testing.T, opts ...func(*router.Config)) (*Server, *MockStreamingConnector)", + "line": 695 + }, + { + "kind": "func", + "name": "TestListCustomerChargesRoute", + "signature": "func TestListCustomerChargesRoute(t *testing.T)", + "line": 803 + }, + { + "kind": "struct", + "name": "NoopChargeService", + "signature": "type NoopChargeService struct", + "line": 825 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (n NoopChargeService) GetByID(_ context.Context, _ billingcharges.GetByIDInput) (billingcharges.Charge, error)", + "line": 827 + }, + { + "kind": "func", + "name": "GetByIDs", + "signature": "func (n NoopChargeService) GetByIDs(_ context.Context, _ billingcharges.GetByIDsInput) (billingcharges.Charges, error)", + "line": 831 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (n NoopChargeService) Create(_ context.Context, _ billingcharges.CreateInput) (billingcharges.Charges, error)", + "line": 835 + }, + { + "kind": "func", + "name": "UpdateSubscriptionItemID", + "signature": "func (n NoopChargeService) UpdateSubscriptionItemID(_ context.Context, charge billingcharges.Charge, _ string) (billingcharges.Charge, error)", + "line": 839 + }, + { + "kind": "func", + "name": "AdvanceCharges", + "signature": "func (n NoopChargeService) AdvanceCharges(_ context.Context, _ billingcharges.AdvanceChargesInput) (billingcharges.Charges, error)", + "line": 843 + }, + { + "kind": "func", + "name": "ListCustomersToAdvance", + "signature": "func (n NoopChargeService) ListCustomersToAdvance(_ context.Context, _ billingcharges.ListCustomersToAdvanceInput) (pagination.Result[customer.CustomerID], error)", + "line": 847 + }, + { + "kind": "func", + "name": "ApplyPatches", + "signature": "func (n NoopChargeService) ApplyPatches(_ context.Context, _ billingcharges.ApplyPatchesInput) error", + "line": 851 + }, + { + "kind": "func", + "name": "ListCharges", + "signature": "func (n NoopChargeService) ListCharges(_ context.Context, input billingcharges.ListChargesInput) (pagination.Result[billingcharges.Charge], error)", + "line": 855 + }, + { + "kind": "func", + "name": "GetCurrentTotals", + "signature": "func (n NoopChargeService) GetCurrentTotals(_ context.Context, _ usagebased.GetCurrentTotalsInput) (usagebased.GetCurrentTotalsResult, error)", + "line": 863 + }, + { + "kind": "struct", + "name": "NoopPublisher", + "signature": "type NoopPublisher struct", + "line": 871 + }, + { + "kind": "func", + "name": "NewNoopPublisher", + "signature": "func NewNoopPublisher() *NoopPublisher", + "line": 876 + }, + { + "kind": "func", + "name": "Publish", + "signature": "func (p *NoopPublisher) Publish(ctx context.Context, event marshaler.Event) error", + "line": 883 + }, + { + "kind": "func", + "name": "Marshaler", + "signature": "func (p *NoopPublisher) Marshaler() marshaler.Marshaler", + "line": 888 + }, + { + "kind": "func", + "name": "WithContext", + "signature": "func (p *NoopPublisher) WithContext(ctx context.Context) eventbus.ContextPublisher", + "line": 893 + }, + { + "kind": "struct", + "name": "noopContextPublisher", + "signature": "type noopContextPublisher struct", + "line": 898 + }, + { + "kind": "func", + "name": "PublishIfNoError", + "signature": "func (p noopContextPublisher) PublishIfNoError(event marshaler.Event, err error) error", + "line": 904 + }, + { + "kind": "struct", + "name": "MockDebugHandler", + "signature": "type MockDebugHandler struct", + "line": 909 + }, + { + "kind": "func", + "name": "GetDebugMetrics", + "signature": "func (h MockDebugHandler) GetDebugMetrics(ctx context.Context, namespace string) (string, error)", + "line": 911 + }, + { + "kind": "struct", + "name": "MockStreamingConnector", + "signature": "type MockStreamingConnector struct", + "line": 918 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (c *MockStreamingConnector) CreateNamespace(ctx context.Context, namespace string) error", + "line": 922 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (c *MockStreamingConnector) DeleteNamespace(ctx context.Context, namespace string) error", + "line": 926 + }, + { + "kind": "func", + "name": "CountEvents", + "signature": "func (c *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)", + "line": 930 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (c *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)", + "line": 934 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (c *MockStreamingConnector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)", + "line": 950 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (c *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, m meter.Meter, params streaming.QueryParams) ([]meter.MeterQueryRow, error)", + "line": 966 + }, + { + "kind": "func", + "name": "ResetQueryMeterParams", + "signature": "func (c *MockStreamingConnector) ResetQueryMeterParams()", + "line": 979 + }, + { + "kind": "func", + "name": "LastQueryMeterParams", + "signature": "func (c *MockStreamingConnector) LastQueryMeterParams() (streaming.QueryParams, bool)", + "line": 983 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (c *MockStreamingConnector) ListSubjects(ctx context.Context, params streaming.ListSubjectsParams) ([]string, error)", + "line": 991 + }, + { + "kind": "func", + "name": "ListGroupByValues", + "signature": "func (c *MockStreamingConnector) ListGroupByValues(ctx context.Context, params streaming.ListGroupByValuesParams) ([]string, error)", + "line": 995 + }, + { + "kind": "func", + "name": "BatchInsert", + "signature": "func (c *MockStreamingConnector) BatchInsert(ctx context.Context, events []streaming.RawEvent) error", + "line": 999 + }, + { + "kind": "func", + "name": "ValidateJSONPath", + "signature": "func (c *MockStreamingConnector) ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)", + "line": 1003 + }, + { + "kind": "struct", + "name": "NoopFeatureConnector", + "signature": "type NoopFeatureConnector struct", + "line": 1010 + }, + { + "kind": "func", + "name": "ListFeatures", + "signature": "func (n NoopFeatureConnector) ListFeatures(ctx context.Context, params feature.ListFeaturesParams) (pagination.Result[feature.Feature], error)", + "line": 1012 + }, + { + "kind": "func", + "name": "GetFeature", + "signature": "func (n NoopFeatureConnector) GetFeature(ctx context.Context, namespace string, idOrKey string, includeArchived feature.IncludeArchivedFeature) (*feature.Feature, error)", + "line": 1016 + }, + { + "kind": "func", + "name": "CreateFeature", + "signature": "func (n NoopFeatureConnector) CreateFeature(ctx context.Context, input feature.CreateFeatureInputs) (feature.Feature, error)", + "line": 1020 + }, + { + "kind": "func", + "name": "UpdateFeature", + "signature": "func (n NoopFeatureConnector) UpdateFeature(ctx context.Context, input feature.UpdateFeatureInputs) (feature.Feature, error)", + "line": 1024 + }, + { + "kind": "func", + "name": "DeleteFeature", + "signature": "func (n NoopFeatureConnector) DeleteFeature(ctx context.Context, namespace string, key string) error", + "line": 1028 + }, + { + "kind": "func", + "name": "ArchiveFeature", + "signature": "func (n NoopFeatureConnector) ArchiveFeature(ctx context.Context, featureID models.NamespacedID) error", + "line": 1032 + }, + { + "kind": "func", + "name": "ResolveFeatureMeters", + "signature": "func (n NoopFeatureConnector) ResolveFeatureMeters(ctx context.Context, namespace string, featureRefs ...ref.IDOrKey) (feature.FeatureMeters, error)", + "line": 1036 + }, + { + "kind": "struct", + "name": "NoopCostService", + "signature": "type NoopCostService struct", + "line": 1043 + }, + { + "kind": "func", + "name": "QueryFeatureCost", + "signature": "func (n NoopCostService) QueryFeatureCost(ctx context.Context, input costpkg.QueryFeatureCostInput) (*costpkg.CostQueryResult, error)", + "line": 1045 + }, + { + "kind": "struct", + "name": "NoopEntitlementConnector", + "signature": "type NoopEntitlementConnector struct", + "line": 1052 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (n NoopEntitlementConnector) RegisterHooks(hooks ...models.ServiceHook[entitlement.Entitlement])", + "line": 1054 + }, + { + "kind": "func", + "name": "CreateEntitlement", + "signature": "func (n NoopEntitlementConnector) CreateEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs, grants []entitlement.CreateEntitlementGrantInputs) (*entitlement.Entitlement, error)", + "line": 1057 + }, + { + "kind": "func", + "name": "ScheduleEntitlement", + "signature": "func (n NoopEntitlementConnector) ScheduleEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error)", + "line": 1061 + }, + { + "kind": "func", + "name": "OverrideEntitlement", + "signature": "func (n NoopEntitlementConnector) OverrideEntitlement(ctx context.Context, subject string, entitlementIdOrFeatureKey string, input entitlement.CreateEntitlementInputs, grants []entitlement.CreateEntitlementGrantInputs) (*entitlement.Entitlement, error)", + "line": 1065 + }, + { + "kind": "func", + "name": "SupersedeEntitlement", + "signature": "func (n NoopEntitlementConnector) SupersedeEntitlement(ctx context.Context, entitlementId string, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error)", + "line": 1069 + }, + { + "kind": "func", + "name": "GetEntitlement", + "signature": "func (n NoopEntitlementConnector) GetEntitlement(ctx context.Context, namespace string, id string) (*entitlement.Entitlement, error)", + "line": 1073 + }, + { + "kind": "func", + "name": "GetEntitlementWithCustomer", + "signature": "func (n NoopEntitlementConnector) GetEntitlementWithCustomer(ctx context.Context, namespace string, id string) (*entitlement.EntitlementWithCustomer, error)", + "line": 1077 + }, + { + "kind": "func", + "name": "DeleteEntitlement", + "signature": "func (n NoopEntitlementConnector) DeleteEntitlement(ctx context.Context, namespace string, id string, at time.Time) error", + "line": 1081 + }, + { + "kind": "func", + "name": "GetEntitlementValue", + "signature": "func (n NoopEntitlementConnector) GetEntitlementValue(ctx context.Context, namespace string, subjectKey string, idOrFeatureKey string, at time.Time) (entitlement.EntitlementValue, error)", + "line": 1085 + }, + { + "kind": "func", + "name": "GetEntitlementsOfCustomer", + "signature": "func (n NoopEntitlementConnector) GetEntitlementsOfCustomer(ctx context.Context, namespace string, subjectKey string, at time.Time) ([]entitlement.Entitlement, error)", + "line": 1089 + }, + { + "kind": "func", + "name": "ListEntitlements", + "signature": "func (n NoopEntitlementConnector) ListEntitlements(ctx context.Context, params entitlement.ListEntitlementsParams) (pagination.Result[entitlement.Entitlement], error)", + "line": 1093 + }, + { + "kind": "func", + "name": "ListEntitlementsWithCustomer", + "signature": "func (n NoopEntitlementConnector) ListEntitlementsWithCustomer(ctx context.Context, params entitlement.ListEntitlementsParams) (entitlement.ListEntitlementsWithCustomerResult, error)", + "line": 1097 + }, + { + "kind": "func", + "name": "GetEntitlementOfCustomerAt", + "signature": "func (n NoopEntitlementConnector) GetEntitlementOfCustomerAt(ctx context.Context, namespace string, subjectKey string, idOrFeatureKey string, at time.Time) (*entitlement.Entitlement, error)", + "line": 1101 + }, + { + "kind": "func", + "name": "GetAccess", + "signature": "func (n NoopEntitlementConnector) GetAccess(ctx context.Context, namespace string, subjectKey string) (entitlement.Access, error)", + "line": 1105 + }, + { + "kind": "struct", + "name": "NoopEntitlementBalanceConnector", + "signature": "type NoopEntitlementBalanceConnector struct", + "line": 1113 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (n NoopEntitlementBalanceConnector) RegisterHooks(hooks ...models.ServiceHook[meteredentitlement.Entitlement])", + "line": 1115 + }, + { + "kind": "func", + "name": "GetEntitlementBalance", + "signature": "func (n NoopEntitlementBalanceConnector) GetEntitlementBalance(ctx context.Context, entitlementID models.NamespacedID, at time.Time) (*meteredentitlement.EntitlementBalance, error)", + "line": 1118 + }, + { + "kind": "func", + "name": "GetEntitlementBalanceHistory", + "signature": "func (n NoopEntitlementBalanceConnector) GetEntitlementBalanceHistory(ctx context.Context, entitlementID models.NamespacedID, params meteredentitlement.BalanceHistoryParams) ([]meteredentitlement.EntitlementBalanceHistoryWindow, engine.GrantBurnDownHistory, error)", + "line": 1122 + }, + { + "kind": "func", + "name": "ResetEntitlementUsage", + "signature": "func (n NoopEntitlementBalanceConnector) ResetEntitlementUsage(ctx context.Context, entitlementID models.NamespacedID, params meteredentitlement.ResetEntitlementUsageParams) (balanceAfterReset *meteredentitlement.EntitlementBalance, err error)", + "line": 1126 + }, + { + "kind": "func", + "name": "ResetEntitlementsWithExpiredUsagePeriod", + "signature": "func (n NoopEntitlementBalanceConnector) ResetEntitlementsWithExpiredUsagePeriod(ctx context.Context, namespace string, highwatermark time.Time) ([]models.NamespacedID, error)", + "line": 1130 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (n NoopEntitlementBalanceConnector) CreateGrant(ctx context.Context, namespace string, subjectKey string, entitlementIdOrFeatureKey string, inputGrant meteredentitlement.CreateEntitlementGrantInputs) (meteredentitlement.EntitlementGrant, error)", + "line": 1134 + }, + { + "kind": "func", + "name": "ListEntitlementGrants", + "signature": "func (n NoopEntitlementBalanceConnector) ListEntitlementGrants(ctx context.Context, namespace string, params meteredentitlement.ListEntitlementGrantsParams) (pagination.Result[meteredentitlement.EntitlementGrant], error)", + "line": 1138 + }, + { + "kind": "func", + "name": "GetValue", + "signature": "func (n NoopEntitlementBalanceConnector) GetValue(ctx context.Context, entitlement *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error)", + "line": 1142 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (n NoopEntitlementBalanceConnector) BeforeCreate(entitlement entitlement.CreateEntitlementInputs, feature feature.Feature) (*entitlement.CreateEntitlementRepoInputs, error)", + "line": 1146 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (n NoopEntitlementBalanceConnector) AfterCreate(ctx context.Context, entitlement *entitlement.Entitlement) error", + "line": 1150 + }, + { + "kind": "struct", + "name": "NoopGrantConnector", + "signature": "type NoopGrantConnector struct", + "line": 1158 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (n NoopGrantConnector) CreateGrant(ctx context.Context, owner models.NamespacedID, input credit.CreateGrantInput) (*grant.Grant, error)", + "line": 1160 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (n NoopGrantConnector) VoidGrant(ctx context.Context, grantID models.NamespacedID, at *time.Time) error", + "line": 1164 + }, + { + "kind": "struct", + "name": "NoopNotificationService", + "signature": "type NoopNotificationService struct", + "line": 1171 + }, + { + "kind": "func", + "name": "ListFeature", + "signature": "func (n NoopNotificationService) ListFeature(_ context.Context, _ string, _ ...string) ([]feature.Feature, error)", + "line": 1173 + }, + { + "kind": "func", + "name": "ListChannels", + "signature": "func (n NoopNotificationService) ListChannels(_ context.Context, _ notification.ListChannelsInput) (notification.ListChannelsResult, error)", + "line": 1177 + }, + { + "kind": "func", + "name": "CreateChannel", + "signature": "func (n NoopNotificationService) CreateChannel(_ context.Context, _ notification.CreateChannelInput) (*notification.Channel, error)", + "line": 1181 + }, + { + "kind": "func", + "name": "DeleteChannel", + "signature": "func (n NoopNotificationService) DeleteChannel(_ context.Context, _ notification.DeleteChannelInput) error", + "line": 1185 + }, + { + "kind": "func", + "name": "GetChannel", + "signature": "func (n NoopNotificationService) GetChannel(_ context.Context, _ notification.GetChannelInput) (*notification.Channel, error)", + "line": 1189 + }, + { + "kind": "func", + "name": "UpdateChannel", + "signature": "func (n NoopNotificationService) UpdateChannel(_ context.Context, _ notification.UpdateChannelInput) (*notification.Channel, error)", + "line": 1193 + }, + { + "kind": "func", + "name": "ListRules", + "signature": "func (n NoopNotificationService) ListRules(_ context.Context, _ notification.ListRulesInput) (notification.ListRulesResult, error)", + "line": 1197 + }, + { + "kind": "func", + "name": "CreateRule", + "signature": "func (n NoopNotificationService) CreateRule(_ context.Context, _ notification.CreateRuleInput) (*notification.Rule, error)", + "line": 1201 + }, + { + "kind": "func", + "name": "DeleteRule", + "signature": "func (n NoopNotificationService) DeleteRule(_ context.Context, _ notification.DeleteRuleInput) error", + "line": 1205 + }, + { + "kind": "func", + "name": "GetRule", + "signature": "func (n NoopNotificationService) GetRule(_ context.Context, _ notification.GetRuleInput) (*notification.Rule, error)", + "line": 1209 + }, + { + "kind": "func", + "name": "UpdateRule", + "signature": "func (n NoopNotificationService) UpdateRule(_ context.Context, _ notification.UpdateRuleInput) (*notification.Rule, error)", + "line": 1213 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (n NoopNotificationService) ListEvents(_ context.Context, _ notification.ListEventsInput) (notification.ListEventsResult, error)", + "line": 1217 + }, + { + "kind": "func", + "name": "GetEvent", + "signature": "func (n NoopNotificationService) GetEvent(_ context.Context, _ notification.GetEventInput) (*notification.Event, error)", + "line": 1221 + }, + { + "kind": "func", + "name": "ResendEvent", + "signature": "func (n NoopNotificationService) ResendEvent(_ context.Context, _ notification.ResendEventInput) error", + "line": 1225 + }, + { + "kind": "func", + "name": "CreateEvent", + "signature": "func (n NoopNotificationService) CreateEvent(_ context.Context, _ notification.CreateEventInput) (*notification.Event, error)", + "line": 1229 + }, + { + "kind": "func", + "name": "ListEventsDeliveryStatus", + "signature": "func (n NoopNotificationService) ListEventsDeliveryStatus(_ context.Context, _ notification.ListEventsDeliveryStatusInput) (notification.ListEventsDeliveryStatusResult, error)", + "line": 1233 + }, + { + "kind": "func", + "name": "GetEventDeliveryStatus", + "signature": "func (n NoopNotificationService) GetEventDeliveryStatus(_ context.Context, _ notification.GetEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 1237 + }, + { + "kind": "func", + "name": "UpdateEventDeliveryStatus", + "signature": "func (n NoopNotificationService) UpdateEventDeliveryStatus(_ context.Context, _ notification.UpdateEventDeliveryStatusInput) (*notification.EventDeliveryStatus, error)", + "line": 1241 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (n NoopNotificationService) Close() error", + "line": 1245 + }, + { + "kind": "struct", + "name": "NoopAppService", + "signature": "type NoopAppService struct", + "line": 1251 + }, + { + "kind": "func", + "name": "RegisterMarketplaceListing", + "signature": "func (n NoopAppService) RegisterMarketplaceListing(input app.RegisterMarketplaceListingInput) error", + "line": 1253 + }, + { + "kind": "func", + "name": "GetMarketplaceListing", + "signature": "func (n NoopAppService) GetMarketplaceListing(ctx context.Context, input app.MarketplaceGetInput) (app.RegistryItem, error)", + "line": 1257 + }, + { + "kind": "func", + "name": "ListMarketplaceListings", + "signature": "func (n NoopAppService) ListMarketplaceListings(ctx context.Context, input app.MarketplaceListInput) (pagination.Result[app.RegistryItem], error)", + "line": 1261 + }, + { + "kind": "func", + "name": "InstallMarketplaceListingWithAPIKey", + "signature": "func (n NoopAppService) InstallMarketplaceListingWithAPIKey(ctx context.Context, input app.InstallAppWithAPIKeyInput) (app.App, error)", + "line": 1265 + }, + { + "kind": "func", + "name": "InstallMarketplaceListing", + "signature": "func (n NoopAppService) InstallMarketplaceListing(ctx context.Context, input app.InstallAppInput) (app.App, error)", + "line": 1269 + }, + { + "kind": "func", + "name": "GetMarketplaceListingOauth2InstallURL", + "signature": "func (n NoopAppService) GetMarketplaceListingOauth2InstallURL(ctx context.Context, input app.GetOauth2InstallURLInput) (app.GetOauth2InstallURLOutput, error)", + "line": 1273 + }, + { + "kind": "func", + "name": "AuthorizeMarketplaceListingOauth2Install", + "signature": "func (n NoopAppService) AuthorizeMarketplaceListingOauth2Install(ctx context.Context, input app.AuthorizeOauth2InstallInput) error", + "line": 1277 + }, + { + "kind": "func", + "name": "CreateApp", + "signature": "func (n NoopAppService) CreateApp(ctx context.Context, input app.CreateAppInput) (app.AppBase, error)", + "line": 1281 + }, + { + "kind": "func", + "name": "UpdateAppStatus", + "signature": "func (n NoopAppService) UpdateAppStatus(ctx context.Context, input app.UpdateAppStatusInput) error", + "line": 1285 + }, + { + "kind": "func", + "name": "GetApp", + "signature": "func (n NoopAppService) GetApp(ctx context.Context, input app.GetAppInput) (app.App, error)", + "line": 1289 + }, + { + "kind": "func", + "name": "UpdateApp", + "signature": "func (n NoopAppService) UpdateApp(ctx context.Context, input app.UpdateAppInput) (app.App, error)", + "line": 1293 + }, + { + "kind": "func", + "name": "ListApps", + "signature": "func (n NoopAppService) ListApps(ctx context.Context, input app.ListAppInput) (pagination.Result[app.App], error)", + "line": 1297 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (n NoopAppService) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 1301 + }, + { + "kind": "func", + "name": "ListCustomerData", + "signature": "func (n NoopAppService) ListCustomerData(ctx context.Context, input app.ListCustomerInput) (pagination.Result[app.CustomerApp], error)", + "line": 1305 + }, + { + "kind": "func", + "name": "EnsureCustomer", + "signature": "func (n NoopAppService) EnsureCustomer(ctx context.Context, input app.EnsureCustomerInput) error", + "line": 1309 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (n NoopAppService) DeleteCustomer(ctx context.Context, input app.DeleteCustomerInput) error", + "line": 1313 + }, + { + "kind": "struct", + "name": "NoopAppStripeService", + "signature": "type NoopAppStripeService struct", + "line": 1319 + }, + { + "kind": "func", + "name": "UpdateAPIKey", + "signature": "func (n NoopAppStripeService) UpdateAPIKey(ctx context.Context, input appstripe.UpdateAPIKeyInput) error", + "line": 1321 + }, + { + "kind": "func", + "name": "CreateCheckoutSession", + "signature": "func (n NoopAppStripeService) CreateCheckoutSession(ctx context.Context, input appstripe.CreateCheckoutSessionInput) (appstripe.CreateCheckoutSessionOutput, error)", + "line": 1325 + }, + { + "kind": "func", + "name": "GetWebhookSecret", + "signature": "func (n NoopAppStripeService) GetWebhookSecret(ctx context.Context, input appstripe.GetWebhookSecretInput) (appstripe.GetWebhookSecretOutput, error)", + "line": 1329 + }, + { + "kind": "func", + "name": "GetStripeAppData", + "signature": "func (n NoopAppStripeService) GetStripeAppData(ctx context.Context, input appstripe.GetStripeAppDataInput) (appstripe.AppData, error)", + "line": 1333 + }, + { + "kind": "func", + "name": "HandleSetupIntentSucceeded", + "signature": "func (n NoopAppStripeService) HandleSetupIntentSucceeded(ctx context.Context, input appstripe.HandleSetupIntentSucceededInput) (appstripe.HandleSetupIntentSucceededOutput, error)", + "line": 1337 + }, + { + "kind": "func", + "name": "GetStripeCustomerData", + "signature": "func (n NoopAppStripeService) GetStripeCustomerData(ctx context.Context, input appstripe.GetStripeCustomerDataInput) (appstripe.CustomerData, error)", + "line": 1341 + }, + { + "kind": "func", + "name": "UpsertStripeCustomerData", + "signature": "func (n NoopAppStripeService) UpsertStripeCustomerData(ctx context.Context, input appstripe.UpsertStripeCustomerDataInput) error", + "line": 1345 + }, + { + "kind": "func", + "name": "DeleteStripeCustomerData", + "signature": "func (n NoopAppStripeService) DeleteStripeCustomerData(ctx context.Context, input appstripe.DeleteStripeCustomerDataInput) error", + "line": 1349 + }, + { + "kind": "func", + "name": "GetSupplierContact", + "signature": "func (n NoopAppStripeService) GetSupplierContact(ctx context.Context, input appstripe.GetSupplierContactInput) (billing.SupplierContact, error)", + "line": 1353 + }, + { + "kind": "func", + "name": "GetMaskedSecretAPIKey", + "signature": "func (n NoopAppStripeService) GetMaskedSecretAPIKey(ctx context.Context, secretAPIKeyID secretentity.SecretID) (string, error)", + "line": 1357 + }, + { + "kind": "func", + "name": "CreatePortalSession", + "signature": "func (n NoopAppStripeService) CreatePortalSession(ctx context.Context, input appstripe.CreateStripePortalSessionInput) (appstripe.StripePortalSession, error)", + "line": 1361 + }, + { + "kind": "func", + "name": "NewApp", + "signature": "func (n NoopAppStripeService) NewApp(ctx context.Context, appBase app.AppBase) (app.App, error)", + "line": 1366 + }, + { + "kind": "func", + "name": "InstallAppWithAPIKey", + "signature": "func (n NoopAppStripeService) InstallAppWithAPIKey(ctx context.Context, input app.AppFactoryInstallAppWithAPIKeyInput) (app.App, error)", + "line": 1370 + }, + { + "kind": "func", + "name": "UninstallApp", + "signature": "func (n NoopAppStripeService) UninstallApp(ctx context.Context, input app.UninstallAppInput) error", + "line": 1374 + }, + { + "kind": "func", + "name": "HandleInvoiceStateTransition", + "signature": "func (n NoopAppStripeService) HandleInvoiceStateTransition(ctx context.Context, input appstripe.HandleInvoiceStateTransitionInput) error", + "line": 1379 + }, + { + "kind": "func", + "name": "HandleInvoiceSentEvent", + "signature": "func (n NoopAppStripeService) HandleInvoiceSentEvent(ctx context.Context, input appstripe.HandleInvoiceSentEventInput) error", + "line": 1383 + }, + { + "kind": "struct", + "name": "NoopAppCustomInvoicingService", + "signature": "type NoopAppCustomInvoicingService struct", + "line": 1389 + }, + { + "kind": "func", + "name": "SyncDraftInvoice", + "signature": "func (n NoopAppCustomInvoicingService) SyncDraftInvoice(ctx context.Context, input appcustominvoicing.SyncDraftInvoiceInput) (billing.StandardInvoice, error)", + "line": 1391 + }, + { + "kind": "func", + "name": "SyncIssuingInvoice", + "signature": "func (n NoopAppCustomInvoicingService) SyncIssuingInvoice(ctx context.Context, input appcustominvoicing.SyncIssuingInvoiceInput) (billing.StandardInvoice, error)", + "line": 1395 + }, + { + "kind": "func", + "name": "HandlePaymentTrigger", + "signature": "func (n NoopAppCustomInvoicingService) HandlePaymentTrigger(ctx context.Context, input appcustominvoicing.HandlePaymentTriggerInput) (billing.StandardInvoice, error)", + "line": 1399 + }, + { + "kind": "struct", + "name": "NoopCustomerService", + "signature": "type NoopCustomerService struct", + "line": 1405 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (n NoopCustomerService) RegisterHooks(_ ...models.ServiceHook[customer.Customer])", + "line": 1407 + }, + { + "kind": "func", + "name": "ListCustomers", + "signature": "func (n NoopCustomerService) ListCustomers(ctx context.Context, params customer.ListCustomersInput) (pagination.Result[customer.Customer], error)", + "line": 1409 + }, + { + "kind": "func", + "name": "ListCustomerUsageAttributions", + "signature": "func (n NoopCustomerService) ListCustomerUsageAttributions(ctx context.Context, input customer.ListCustomerUsageAttributionsInput) (pagination.Result[streaming.CustomerUsageAttribution], error)", + "line": 1428 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (n NoopCustomerService) CreateCustomer(ctx context.Context, params customer.CreateCustomerInput) (*customer.Customer, error)", + "line": 1432 + }, + { + "kind": "func", + "name": "DeleteCustomer", + "signature": "func (n NoopCustomerService) DeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 1436 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (n NoopCustomerService) GetCustomer(ctx context.Context, input customer.GetCustomerInput) (*customer.Customer, error)", + "line": 1440 + }, + { + "kind": "func", + "name": "GetCustomerByUsageAttribution", + "signature": "func (n NoopCustomerService) GetCustomerByUsageAttribution(ctx context.Context, input customer.GetCustomerByUsageAttributionInput) (*customer.Customer, error)", + "line": 1444 + }, + { + "kind": "func", + "name": "UpdateCustomer", + "signature": "func (n NoopCustomerService) UpdateCustomer(ctx context.Context, params customer.UpdateCustomerInput) (*customer.Customer, error)", + "line": 1448 + }, + { + "kind": "func", + "name": "GetEntitlementValue", + "signature": "func (n NoopCustomerService) GetEntitlementValue(ctx context.Context, input customer.GetEntitlementValueInput) (entitlement.EntitlementValue, error)", + "line": 1452 + }, + { + "kind": "func", + "name": "GetCustomerAccess", + "signature": "func (n NoopCustomerService) GetCustomerAccess(ctx context.Context, input customer.GetCustomerInput) (entitlement.Access, error)", + "line": 1456 + }, + { + "kind": "func", + "name": "FindCustomer", + "signature": "func (n NoopCustomerService) FindCustomer(ctx context.Context, namespace string, customerRef ref.IDOrKey) (*customer.Customer, error)", + "line": 1460 + }, + { + "kind": "func", + "name": "RegisterRequestValidator", + "signature": "func (n NoopCustomerService) RegisterRequestValidator(validator customer.RequestValidator)", + "line": 1464 + }, + { + "kind": "func", + "name": "CustomerExists", + "signature": "func (n NoopCustomerService) CustomerExists(ctx context.Context, customer customer.CustomerID) error", + "line": 1467 + }, + { + "kind": "struct", + "name": "NoopPlanService", + "signature": "type NoopPlanService struct", + "line": 1473 + }, + { + "kind": "func", + "name": "ListPlans", + "signature": "func (n NoopPlanService) ListPlans(ctx context.Context, params plan.ListPlansInput) (pagination.Result[plan.Plan], error)", + "line": 1475 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (n NoopPlanService) CreatePlan(ctx context.Context, params plan.CreatePlanInput) (*plan.Plan, error)", + "line": 1479 + }, + { + "kind": "func", + "name": "DeletePlan", + "signature": "func (n NoopPlanService) DeletePlan(ctx context.Context, params plan.DeletePlanInput) error", + "line": 1483 + }, + { + "kind": "func", + "name": "GetPlan", + "signature": "func (n NoopPlanService) GetPlan(ctx context.Context, params plan.GetPlanInput) (*plan.Plan, error)", + "line": 1487 + }, + { + "kind": "func", + "name": "UpdatePlan", + "signature": "func (n NoopPlanService) UpdatePlan(ctx context.Context, params plan.UpdatePlanInput) (*plan.Plan, error)", + "line": 1491 + }, + { + "kind": "func", + "name": "PublishPlan", + "signature": "func (n NoopPlanService) PublishPlan(ctx context.Context, params plan.PublishPlanInput) (*plan.Plan, error)", + "line": 1495 + }, + { + "kind": "func", + "name": "ArchivePlan", + "signature": "func (n NoopPlanService) ArchivePlan(ctx context.Context, params plan.ArchivePlanInput) (*plan.Plan, error)", + "line": 1499 + }, + { + "kind": "func", + "name": "NextPlan", + "signature": "func (n NoopPlanService) NextPlan(ctx context.Context, params plan.NextPlanInput) (*plan.Plan, error)", + "line": 1503 + }, + { + "kind": "struct", + "name": "NoopAddonService", + "signature": "type NoopAddonService struct", + "line": 1511 + }, + { + "kind": "func", + "name": "ListAddons", + "signature": "func (n NoopAddonService) ListAddons(ctx context.Context, params addon.ListAddonsInput) (pagination.Result[addon.Addon], error)", + "line": 1513 + }, + { + "kind": "func", + "name": "CreateAddon", + "signature": "func (n NoopAddonService) CreateAddon(ctx context.Context, params addon.CreateAddonInput) (*addon.Addon, error)", + "line": 1517 + }, + { + "kind": "func", + "name": "DeleteAddon", + "signature": "func (n NoopAddonService) DeleteAddon(ctx context.Context, params addon.DeleteAddonInput) error", + "line": 1521 + }, + { + "kind": "func", + "name": "GetAddon", + "signature": "func (n NoopAddonService) GetAddon(ctx context.Context, params addon.GetAddonInput) (*addon.Addon, error)", + "line": 1525 + }, + { + "kind": "func", + "name": "UpdateAddon", + "signature": "func (n NoopAddonService) UpdateAddon(ctx context.Context, params addon.UpdateAddonInput) (*addon.Addon, error)", + "line": 1529 + }, + { + "kind": "func", + "name": "PublishAddon", + "signature": "func (n NoopAddonService) PublishAddon(ctx context.Context, params addon.PublishAddonInput) (*addon.Addon, error)", + "line": 1533 + }, + { + "kind": "func", + "name": "ArchiveAddon", + "signature": "func (n NoopAddonService) ArchiveAddon(ctx context.Context, params addon.ArchiveAddonInput) (*addon.Addon, error)", + "line": 1537 + }, + { + "kind": "func", + "name": "NextAddon", + "signature": "func (n NoopAddonService) NextAddon(ctx context.Context, params addon.NextAddonInput) (*addon.Addon, error)", + "line": 1541 + }, + { + "kind": "struct", + "name": "NoopPlanAddonService", + "signature": "type NoopPlanAddonService struct", + "line": 1549 + }, + { + "kind": "func", + "name": "ListPlanAddons", + "signature": "func (n NoopPlanAddonService) ListPlanAddons(ctx context.Context, params planaddon.ListPlanAddonsInput) (pagination.Result[planaddon.PlanAddon], error)", + "line": 1551 + }, + { + "kind": "func", + "name": "CreatePlanAddon", + "signature": "func (n NoopPlanAddonService) CreatePlanAddon(ctx context.Context, params planaddon.CreatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 1555 + }, + { + "kind": "func", + "name": "DeletePlanAddon", + "signature": "func (n NoopPlanAddonService) DeletePlanAddon(ctx context.Context, params planaddon.DeletePlanAddonInput) error", + "line": 1559 + }, + { + "kind": "func", + "name": "GetPlanAddon", + "signature": "func (n NoopPlanAddonService) GetPlanAddon(ctx context.Context, params planaddon.GetPlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 1563 + }, + { + "kind": "func", + "name": "UpdatePlanAddon", + "signature": "func (n NoopPlanAddonService) UpdatePlanAddon(ctx context.Context, params planaddon.UpdatePlanAddonInput) (*planaddon.PlanAddon, error)", + "line": 1567 + }, + { + "kind": "struct", + "name": "NoopPlanSubscriptionService", + "signature": "type NoopPlanSubscriptionService struct", + "line": 1575 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (n NoopPlanSubscriptionService) Create(ctx context.Context, request plansubscription.CreateSubscriptionRequest) (subscription.Subscription, error)", + "line": 1577 + }, + { + "kind": "func", + "name": "Migrate", + "signature": "func (n NoopPlanSubscriptionService) Migrate(ctx context.Context, request plansubscription.MigrateSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error)", + "line": 1581 + }, + { + "kind": "func", + "name": "Change", + "signature": "func (n NoopPlanSubscriptionService) Change(ctx context.Context, request plansubscription.ChangeSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error)", + "line": 1588 + }, + { + "kind": "struct", + "name": "NoopSubscriptionService", + "signature": "type NoopSubscriptionService struct", + "line": 1599 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (n NoopSubscriptionService) UpdateAnnotations(ctx context.Context, subscriptionID models.NamespacedID, annotations models.Annotations) (*subscription.Subscription, error)", + "line": 1601 + }, + { + "kind": "func", + "name": "RegisterHook", + "signature": "func (n NoopSubscriptionService) RegisterHook(validator subscription.SubscriptionCommandHook) error", + "line": 1605 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (n NoopSubscriptionService) Create(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 1609 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (n NoopSubscriptionService) Update(ctx context.Context, subscriptionID models.NamespacedID, target subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 1613 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (n NoopSubscriptionService) Delete(ctx context.Context, subscriptionID models.NamespacedID) error", + "line": 1617 + }, + { + "kind": "func", + "name": "Cancel", + "signature": "func (n NoopSubscriptionService) Cancel(ctx context.Context, subscriptionID models.NamespacedID, timing subscription.Timing) (subscription.Subscription, error)", + "line": 1621 + }, + { + "kind": "func", + "name": "Continue", + "signature": "func (n NoopSubscriptionService) Continue(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 1625 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (n NoopSubscriptionService) Get(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 1629 + }, + { + "kind": "func", + "name": "GetView", + "signature": "func (n NoopSubscriptionService) GetView(ctx context.Context, subscriptionID models.NamespacedID) (subscription.SubscriptionView, error)", + "line": 1633 + }, + { + "kind": "func", + "name": "List", + "signature": "func (n NoopSubscriptionService) List(ctx context.Context, params subscription.ListSubscriptionsInput) (subscription.SubscriptionList, error)", + "line": 1637 + }, + { + "kind": "func", + "name": "GetAllForCustomer", + "signature": "func (n NoopSubscriptionService) GetAllForCustomer(ctx context.Context, customerID models.NamespacedID, period timeutil.StartBoundedPeriod) ([]subscription.Subscription, error)", + "line": 1641 + }, + { + "kind": "func", + "name": "ExpandViews", + "signature": "func (n NoopSubscriptionService) ExpandViews(ctx context.Context, subs []subscription.Subscription) ([]subscription.SubscriptionView, error)", + "line": 1645 + }, + { + "kind": "struct", + "name": "NoopSubscriptionWorkflowService", + "signature": "type NoopSubscriptionWorkflowService struct", + "line": 1653 + }, + { + "kind": "func", + "name": "CreateFromPlan", + "signature": "func (n NoopSubscriptionWorkflowService) CreateFromPlan(ctx context.Context, inp subscriptionworkflow.CreateSubscriptionWorkflowInput, plan subscription.Plan) (subscription.SubscriptionView, error)", + "line": 1655 + }, + { + "kind": "func", + "name": "EditRunning", + "signature": "func (n NoopSubscriptionWorkflowService) EditRunning(ctx context.Context, subscriptionID models.NamespacedID, customizations []subscription.Patch, timing subscription.Timing) (subscription.SubscriptionView, error)", + "line": 1659 + }, + { + "kind": "func", + "name": "ChangeToPlan", + "signature": "func (n NoopSubscriptionWorkflowService) ChangeToPlan(ctx context.Context, subscriptionID models.NamespacedID, inp subscriptionworkflow.ChangeSubscriptionWorkflowInput, plan subscription.Plan) (current subscription.Subscription, new subscription.SubscriptionView, err error)", + "line": 1663 + }, + { + "kind": "func", + "name": "Restore", + "signature": "func (n NoopSubscriptionWorkflowService) Restore(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 1667 + }, + { + "kind": "func", + "name": "AddAddon", + "signature": "func (n NoopSubscriptionWorkflowService) AddAddon(ctx context.Context, subscriptionID models.NamespacedID, inp subscriptionworkflow.AddAddonWorkflowInput) (subscription.SubscriptionView, subscriptionaddon.SubscriptionAddon, error)", + "line": 1671 + }, + { + "kind": "func", + "name": "ChangeAddonQuantity", + "signature": "func (n NoopSubscriptionWorkflowService) ChangeAddonQuantity(ctx context.Context, subscriptionID models.NamespacedID, inp subscriptionworkflow.ChangeAddonQuantityWorkflowInput) (subscription.SubscriptionView, subscriptionaddon.SubscriptionAddon, error)", + "line": 1675 + }, + { + "kind": "struct", + "name": "NoopSubscriptionAddonService", + "signature": "type NoopSubscriptionAddonService struct", + "line": 1683 + }, + { + "kind": "func", + "name": "ChangeQuantity", + "signature": "func (n NoopSubscriptionAddonService) ChangeQuantity(ctx context.Context, subscriptionID models.NamespacedID, input subscriptionaddon.CreateSubscriptionAddonQuantityInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 1685 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (n NoopSubscriptionAddonService) Get(ctx context.Context, params subscriptionaddon.GetSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 1689 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (n NoopSubscriptionAddonService) Create(ctx context.Context, ns string, input subscriptionaddon.CreateSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 1693 + }, + { + "kind": "func", + "name": "List", + "signature": "func (n NoopSubscriptionAddonService) List(ctx context.Context, ns string, input subscriptionaddon.ListSubscriptionAddonsInput) (pagination.Result[subscriptionaddon.SubscriptionAddon], error)", + "line": 1697 + }, + { + "kind": "struct", + "name": "NoopGrantRepo", + "signature": "type NoopGrantRepo struct", + "line": 1705 + }, + { + "kind": "func", + "name": "CreateGrant", + "signature": "func (n NoopGrantRepo) CreateGrant(ctx context.Context, input grant.RepoCreateInput) (*grant.Grant, error)", + "line": 1707 + }, + { + "kind": "func", + "name": "VoidGrant", + "signature": "func (n NoopGrantRepo) VoidGrant(ctx context.Context, grantID models.NamespacedID, at time.Time) error", + "line": 1711 + }, + { + "kind": "func", + "name": "DeleteOwnerGrants", + "signature": "func (n NoopGrantRepo) DeleteOwnerGrants(ctx context.Context, ownerID models.NamespacedID) error", + "line": 1715 + }, + { + "kind": "func", + "name": "ListGrants", + "signature": "func (n NoopGrantRepo) ListGrants(ctx context.Context, params grant.ListParams) (pagination.Result[grant.Grant], error)", + "line": 1719 + }, + { + "kind": "func", + "name": "ListActiveGrantsBetween", + "signature": "func (n NoopGrantRepo) ListActiveGrantsBetween(ctx context.Context, owner models.NamespacedID, from, to time.Time) ([]grant.Grant, error)", + "line": 1723 + }, + { + "kind": "func", + "name": "GetGrant", + "signature": "func (n NoopGrantRepo) GetGrant(ctx context.Context, grantID models.NamespacedID) (grant.Grant, error)", + "line": 1727 + }, + { + "kind": "struct", + "name": "NoopTransactionDriver", + "signature": "type NoopTransactionDriver struct", + "line": 1732 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (d NoopTransactionDriver) Commit() error", + "line": 1734 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (d NoopTransactionDriver) Rollback() error", + "line": 1738 + }, + { + "kind": "func", + "name": "SavePoint", + "signature": "func (d NoopTransactionDriver) SavePoint() error", + "line": 1742 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (n NoopGrantRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 1746 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (n NoopGrantRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) grant.Repo", + "line": 1750 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (n NoopGrantRepo) Self() grant.Repo", + "line": 1754 + }, + { + "kind": "struct", + "name": "NoopBillingService", + "signature": "type NoopBillingService struct", + "line": 1761 + }, + { + "kind": "func", + "name": "CreateProfile", + "signature": "func (n NoopBillingService) CreateProfile(ctx context.Context, param billing.CreateProfileInput) (*billing.Profile, error)", + "line": 1764 + }, + { + "kind": "func", + "name": "GetDefaultProfile", + "signature": "func (n NoopBillingService) GetDefaultProfile(ctx context.Context, input billing.GetDefaultProfileInput) (*billing.Profile, error)", + "line": 1768 + }, + { + "kind": "func", + "name": "GetProfile", + "signature": "func (n NoopBillingService) GetProfile(ctx context.Context, input billing.GetProfileInput) (*billing.Profile, error)", + "line": 1772 + }, + { + "kind": "func", + "name": "ListProfiles", + "signature": "func (n NoopBillingService) ListProfiles(ctx context.Context, input billing.ListProfilesInput) (billing.ListProfilesResult, error)", + "line": 1776 + }, + { + "kind": "func", + "name": "DeleteProfile", + "signature": "func (n NoopBillingService) DeleteProfile(ctx context.Context, input billing.DeleteProfileInput) error", + "line": 1780 + }, + { + "kind": "func", + "name": "UpdateProfile", + "signature": "func (n NoopBillingService) UpdateProfile(ctx context.Context, input billing.UpdateProfileInput) (*billing.Profile, error)", + "line": 1784 + }, + { + "kind": "func", + "name": "ProvisionDefaultBillingProfile", + "signature": "func (n NoopBillingService) ProvisionDefaultBillingProfile(ctx context.Context, namespace string) error", + "line": 1788 + }, + { + "kind": "func", + "name": "IsAppUsed", + "signature": "func (n NoopBillingService) IsAppUsed(ctx context.Context, appID app.AppID) error", + "line": 1792 + }, + { + "kind": "func", + "name": "ResolveStripeAppIDFromBillingProfile", + "signature": "func (n NoopBillingService) ResolveStripeAppIDFromBillingProfile(ctx context.Context, namespace string, customerId *customer.CustomerID) (app.AppID, error)", + "line": 1796 + }, + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (n NoopBillingService) UpsertCustomerOverride(ctx context.Context, input billing.UpsertCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 1801 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (n NoopBillingService) DeleteCustomerOverride(ctx context.Context, input billing.DeleteCustomerOverrideInput) error", + "line": 1805 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (n NoopBillingService) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 1809 + }, + { + "kind": "func", + "name": "GetCustomerApp", + "signature": "func (n NoopBillingService) GetCustomerApp(ctx context.Context, input billing.GetCustomerAppInput) (app.App, error)", + "line": 1813 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (n NoopBillingService) ListCustomerOverrides(ctx context.Context, input billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesResult, error)", + "line": 1817 + }, + { + "kind": "func", + "name": "CreatePendingInvoiceLines", + "signature": "func (n NoopBillingService) CreatePendingInvoiceLines(ctx context.Context, input billing.CreatePendingInvoiceLinesInput) (*billing.CreatePendingInvoiceLinesResult, error)", + "line": 1822 + }, + { + "kind": "func", + "name": "RegisterLineEngine", + "signature": "func (n NoopBillingService) RegisterLineEngine(engine billing.LineEngine) error", + "line": 1826 + }, + { + "kind": "func", + "name": "DeregisterLineEngine", + "signature": "func (n NoopBillingService) DeregisterLineEngine(engineType billing.LineEngineType) error", + "line": 1830 + }, + { + "kind": "func", + "name": "GetRegisteredLineEngines", + "signature": "func (n NoopBillingService) GetRegisteredLineEngines() []billing.LineEngineType", + "line": 1834 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (n NoopBillingService) OnMutableStandardLinesDeleted(ctx context.Context, input billing.OnMutableStandardLinesDeletedInput) error", + "line": 1838 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (n NoopBillingService) OnUnsupportedCreditNote(ctx context.Context, input billing.OnUnsupportedCreditNoteInput) error", + "line": 1842 + }, + { + "kind": "func", + "name": "GetLinesForSubscription", + "signature": "func (n NoopBillingService) GetLinesForSubscription(ctx context.Context, input billing.GetLinesForSubscriptionInput) ([]billing.LineOrHierarchy, error)", + "line": 1846 + }, + { + "kind": "func", + "name": "SnapshotLineQuantity", + "signature": "func (n NoopBillingService) SnapshotLineQuantity(ctx context.Context, input billing.SnapshotLineQuantityInput) (*billing.StandardLine, error)", + "line": 1850 + }, + { + "kind": "func", + "name": "DeleteSplitLineGroup", + "signature": "func (n NoopBillingService) DeleteSplitLineGroup(ctx context.Context, input billing.DeleteSplitLineGroupInput) error", + "line": 1855 + }, + { + "kind": "func", + "name": "UpdateSplitLineGroup", + "signature": "func (n NoopBillingService) UpdateSplitLineGroup(ctx context.Context, input billing.UpdateSplitLineGroupInput) (billing.SplitLineGroup, error)", + "line": 1859 + }, + { + "kind": "func", + "name": "GetSplitLineGroup", + "signature": "func (n NoopBillingService) GetSplitLineGroup(ctx context.Context, input billing.GetSplitLineGroupInput) (billing.SplitLineHierarchy, error)", + "line": 1863 + }, + { + "kind": "func", + "name": "ListInvoices", + "signature": "func (n NoopBillingService) ListInvoices(ctx context.Context, input billing.ListInvoicesInput) (billing.ListInvoicesResponse, error)", + "line": 1868 + }, + { + "kind": "func", + "name": "ListStandardInvoices", + "signature": "func (n NoopBillingService) ListStandardInvoices(ctx context.Context, input billing.ListStandardInvoicesInput) (billing.ListStandardInvoicesResponse, error)", + "line": 1872 + }, + { + "kind": "func", + "name": "CreateStandardInvoiceFromGatheringLines", + "signature": "func (n NoopBillingService) CreateStandardInvoiceFromGatheringLines(ctx context.Context, input billing.CreateStandardInvoiceFromGatheringLinesInput) (*billing.StandardInvoice, error)", + "line": 1876 + }, + { + "kind": "func", + "name": "GetInvoiceById", + "signature": "func (n NoopBillingService) GetInvoiceById(ctx context.Context, input billing.GetInvoiceByIdInput) (billing.Invoice, error)", + "line": 1880 + }, + { + "kind": "func", + "name": "GetStandardInvoiceById", + "signature": "func (n NoopBillingService) GetStandardInvoiceById(ctx context.Context, input billing.GetStandardInvoiceByIdInput) (billing.StandardInvoice, error)", + "line": 1884 + }, + { + "kind": "func", + "name": "AdvanceInvoice", + "signature": "func (n NoopBillingService) AdvanceInvoice(ctx context.Context, input billing.AdvanceInvoiceInput) (billing.StandardInvoice, error)", + "line": 1888 + }, + { + "kind": "func", + "name": "ForceCollectInvoice", + "signature": "func (n NoopBillingService) ForceCollectInvoice(ctx context.Context, input billing.ForceCollectInvoiceInput) (billing.StandardInvoice, error)", + "line": 1892 + }, + { + "kind": "func", + "name": "ApproveInvoice", + "signature": "func (n NoopBillingService) ApproveInvoice(ctx context.Context, input billing.ApproveInvoiceInput) (billing.StandardInvoice, error)", + "line": 1896 + }, + { + "kind": "func", + "name": "PaymentAuthorized", + "signature": "func (n NoopBillingService) PaymentAuthorized(ctx context.Context, input billing.PaymentAuthorizedInput) (billing.StandardInvoice, error)", + "line": 1900 + }, + { + "kind": "func", + "name": "RetryInvoice", + "signature": "func (n NoopBillingService) RetryInvoice(ctx context.Context, input billing.RetryInvoiceInput) (billing.StandardInvoice, error)", + "line": 1904 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (n NoopBillingService) DeleteInvoice(ctx context.Context, input billing.DeleteInvoiceInput) (billing.StandardInvoice, error)", + "line": 1908 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (n NoopBillingService) UpdateInvoice(ctx context.Context, input billing.UpdateInvoiceInput) (billing.Invoice, error)", + "line": 1912 + }, + { + "kind": "func", + "name": "UpdateStandardInvoice", + "signature": "func (n NoopBillingService) UpdateStandardInvoice(ctx context.Context, input billing.UpdateStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 1916 + }, + { + "kind": "func", + "name": "SimulateInvoice", + "signature": "func (n NoopBillingService) SimulateInvoice(ctx context.Context, input billing.SimulateInvoiceInput) (billing.StandardInvoice, error)", + "line": 1920 + }, + { + "kind": "func", + "name": "UpsertValidationIssues", + "signature": "func (n NoopBillingService) UpsertValidationIssues(ctx context.Context, input billing.UpsertValidationIssuesInput) error", + "line": 1924 + }, + { + "kind": "func", + "name": "RecalculateGatheringInvoices", + "signature": "func (n NoopBillingService) RecalculateGatheringInvoices(ctx context.Context, input billing.RecalculateGatheringInvoicesInput) error", + "line": 1928 + }, + { + "kind": "func", + "name": "RegisterStandardInvoiceHooks", + "signature": "func (n NoopBillingService) RegisterStandardInvoiceHooks(hooks ...billing.StandardInvoiceHook)", + "line": 1932 + }, + { + "kind": "func", + "name": "InvoicePendingLines", + "signature": "func (n NoopBillingService) InvoicePendingLines(ctx context.Context, input billing.InvoicePendingLinesInput, opts ...billing.InvoicePendingLinesOption) ([]billing.StandardInvoice, error)", + "line": 1936 + }, + { + "kind": "func", + "name": "ListGatheringInvoices", + "signature": "func (n NoopBillingService) ListGatheringInvoices(ctx context.Context, input billing.ListGatheringInvoicesInput) (pagination.Result[billing.GatheringInvoice], error)", + "line": 1940 + }, + { + "kind": "func", + "name": "UpdateGatheringInvoice", + "signature": "func (n NoopBillingService) UpdateGatheringInvoice(ctx context.Context, input billing.UpdateGatheringInvoiceInput) error", + "line": 1944 + }, + { + "kind": "func", + "name": "GetGatheringInvoiceById", + "signature": "func (n NoopBillingService) GetGatheringInvoiceById(ctx context.Context, input billing.GetGatheringInvoiceByIdInput) (billing.GatheringInvoice, error)", + "line": 1948 + }, + { + "kind": "func", + "name": "GenerateInvoiceSequenceNumber", + "signature": "func (n NoopBillingService) GenerateInvoiceSequenceNumber(ctx context.Context, in billing.SequenceGenerationInput, def billing.SequenceDefinition) (string, error)", + "line": 1953 + }, + { + "kind": "func", + "name": "TriggerInvoice", + "signature": "func (n NoopBillingService) TriggerInvoice(ctx context.Context, input billing.InvoiceTriggerServiceInput) error", + "line": 1958 + }, + { + "kind": "func", + "name": "UpdateInvoiceFields", + "signature": "func (n NoopBillingService) UpdateInvoiceFields(ctx context.Context, input billing.UpdateInvoiceFieldsInput) error", + "line": 1962 + }, + { + "kind": "func", + "name": "SyncDraftInvoice", + "signature": "func (n NoopBillingService) SyncDraftInvoice(ctx context.Context, input billing.SyncDraftStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 1966 + }, + { + "kind": "func", + "name": "SyncIssuingInvoice", + "signature": "func (n NoopBillingService) SyncIssuingInvoice(ctx context.Context, input billing.SyncIssuingStandardInvoiceInput) (billing.StandardInvoice, error)", + "line": 1970 + }, + { + "kind": "func", + "name": "GetAdvancementStrategy", + "signature": "func (n NoopBillingService) GetAdvancementStrategy() billing.AdvancementStrategy", + "line": 1975 + }, + { + "kind": "func", + "name": "WithAdvancementStrategy", + "signature": "func (n NoopBillingService) WithAdvancementStrategy(strategy billing.AdvancementStrategy) billing.Service", + "line": 1979 + }, + { + "kind": "func", + "name": "WithLockedNamespaces", + "signature": "func (n NoopBillingService) WithLockedNamespaces(namespaces []string) billing.Service", + "line": 1983 + }, + { + "kind": "func", + "name": "WithLock", + "signature": "func (n NoopBillingService) WithLock(ctx context.Context, customerID customer.CustomerID, fn func(ctx context.Context) error) error", + "line": 1988 + }, + { + "kind": "struct", + "name": "NoopTaxCodeService", + "signature": "type NoopTaxCodeService struct", + "line": 1995 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (n NoopTaxCodeService) CreateTaxCode(ctx context.Context, input taxcode.CreateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 1997 + }, + { + "kind": "func", + "name": "UpdateTaxCode", + "signature": "func (n NoopTaxCodeService) UpdateTaxCode(ctx context.Context, input taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 2001 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (n NoopTaxCodeService) ListTaxCodes(ctx context.Context, input taxcode.ListTaxCodesInput) (pagination.Result[taxcode.TaxCode], error)", + "line": 2005 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (n NoopTaxCodeService) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error)", + "line": 2009 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (n NoopTaxCodeService) DeleteTaxCode(ctx context.Context, input taxcode.DeleteTaxCodeInput) error", + "line": 2013 + }, + { + "kind": "func", + "name": "GetTaxCodeByAppMapping", + "signature": "func (n NoopTaxCodeService) GetTaxCodeByAppMapping(ctx context.Context, input taxcode.GetTaxCodeByAppMappingInput) (taxcode.TaxCode, error)", + "line": 2017 + }, + { + "kind": "func", + "name": "GetOrCreateByAppMapping", + "signature": "func (n NoopTaxCodeService) GetOrCreateByAppMapping(ctx context.Context, input taxcode.GetOrCreateByAppMappingInput) (taxcode.TaxCode, error)", + "line": 2021 + }, + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (n NoopTaxCodeService) GetOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.GetOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 2025 + }, + { + "kind": "func", + "name": "UpsertOrganizationDefaultTaxCodes", + "signature": "func (n NoopTaxCodeService) UpsertOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.UpsertOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 2029 + }, + { + "kind": "struct", + "name": "NoopSubjectService", + "signature": "type NoopSubjectService struct", + "line": 2037 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (n NoopSubjectService) RegisterHooks(_ ...models.ServiceHook[subject.Subject])", + "line": 2039 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (n NoopSubjectService) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error)", + "line": 2041 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (n NoopSubjectService) Update(ctx context.Context, input subject.UpdateInput) (subject.Subject, error)", + "line": 2045 + }, + { + "kind": "func", + "name": "GetByIdOrKey", + "signature": "func (n NoopSubjectService) GetByIdOrKey(ctx context.Context, orgId string, idOrKey string) (subject.Subject, error)", + "line": 2049 + }, + { + "kind": "func", + "name": "GetById", + "signature": "func (n NoopSubjectService) GetById(ctx context.Context, id models.NamespacedID) (subject.Subject, error)", + "line": 2053 + }, + { + "kind": "func", + "name": "GetByKey", + "signature": "func (n NoopSubjectService) GetByKey(ctx context.Context, key models.NamespacedKey) (subject.Subject, error)", + "line": 2057 + }, + { + "kind": "func", + "name": "List", + "signature": "func (n NoopSubjectService) List(ctx context.Context, orgId string, params subject.ListParams) (pagination.Result[subject.Subject], error)", + "line": 2061 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (n NoopSubjectService) Delete(ctx context.Context, id models.NamespacedID) error", + "line": 2065 + }, + { + "kind": "struct", + "name": "NoopIngestService", + "signature": "type NoopIngestService struct", + "line": 2074 + }, + { + "kind": "func", + "name": "IngestEvents", + "signature": "func (n NoopIngestService) IngestEvents(ctx context.Context, request ingest.IngestEventsRequest) (bool, error)", + "line": 2076 + }, + { + "kind": "struct", + "name": "NoopCurrencyService", + "signature": "type NoopCurrencyService struct", + "line": 2084 + }, + { + "kind": "func", + "name": "ListCurrencies", + "signature": "func (n NoopCurrencyService) ListCurrencies(ctx context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error)", + "line": 2086 + }, + { + "kind": "func", + "name": "CreateCurrency", + "signature": "func (n NoopCurrencyService) CreateCurrency(ctx context.Context, params currencies.CreateCurrencyInput) (currencies.Currency, error)", + "line": 2090 + }, + { + "kind": "func", + "name": "CreateCostBasis", + "signature": "func (n NoopCurrencyService) CreateCostBasis(ctx context.Context, params currencies.CreateCostBasisInput) (currencies.CostBasis, error)", + "line": 2094 + }, + { + "kind": "func", + "name": "ListCostBases", + "signature": "func (n NoopCurrencyService) ListCostBases(ctx context.Context, params currencies.ListCostBasesInput) (pagination.Result[currencies.CostBasis], error)", + "line": 2098 + }, + { + "kind": "struct", + "name": "NoopLLMCostService", + "signature": "type NoopLLMCostService struct", + "line": 2105 + }, + { + "kind": "func", + "name": "ListPrices", + "signature": "func (n NoopLLMCostService) ListPrices(ctx context.Context, input llmcost.ListPricesInput) (pagination.Result[llmcost.Price], error)", + "line": 2107 + }, + { + "kind": "func", + "name": "GetPrice", + "signature": "func (n NoopLLMCostService) GetPrice(ctx context.Context, input llmcost.GetPriceInput) (llmcost.Price, error)", + "line": 2111 + }, + { + "kind": "func", + "name": "ResolvePrice", + "signature": "func (n NoopLLMCostService) ResolvePrice(ctx context.Context, input llmcost.ResolvePriceInput) (llmcost.Price, error)", + "line": 2115 + }, + { + "kind": "func", + "name": "CreateOverride", + "signature": "func (n NoopLLMCostService) CreateOverride(ctx context.Context, input llmcost.CreateOverrideInput) (llmcost.Price, error)", + "line": 2119 + }, + { + "kind": "func", + "name": "DeleteOverride", + "signature": "func (n NoopLLMCostService) DeleteOverride(ctx context.Context, input llmcost.DeleteOverrideInput) error", + "line": 2123 + }, + { + "kind": "func", + "name": "ListOverrides", + "signature": "func (n NoopLLMCostService) ListOverrides(ctx context.Context, input llmcost.ListOverridesInput) (pagination.Result[llmcost.Price], error)", + "line": 2127 + } + ], + "line_count": 2129 + }, + "openmeter/session/session.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetSessionUserID", + "signature": "func GetSessionUserID(ctx context.Context) *string", + "line": 18 + }, + { + "kind": "func", + "name": "GetActiveSession", + "signature": "func GetActiveSession(ctx context.Context) *AuthenticationSession", + "line": 31 + }, + { + "kind": "func", + "name": "NewAuthenticationSession", + "signature": "func NewAuthenticationSession(orgID, orgSlug, orgRole, userID string, orgPermissions []string) (*AuthenticationSession, error)", + "line": 40 + }, + { + "kind": "struct", + "name": "AuthenticationSession", + "signature": "type AuthenticationSession struct", + "line": 57 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s AuthenticationSession) Validate() error", + "line": 66 + }, + { + "kind": "func", + "name": "WithLogger", + "signature": "func (s AuthenticationSession) WithLogger(logger *slog.Logger) *slog.Logger", + "line": 81 + } + ], + "line_count": 89 + }, + "openmeter/sink/buffer.go": { + "header": "\t\"fmt\"\n\t\"sync\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "struct", + "name": "SinkBuffer", + "signature": "type SinkBuffer struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewSinkBuffer", + "signature": "func NewSinkBuffer() *SinkBuffer", + "line": 17 + }, + { + "kind": "func", + "name": "Size", + "signature": "func (b *SinkBuffer) Size() int", + "line": 23 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (b *SinkBuffer) Add(message sinkmodels.SinkMessage)", + "line": 29 + }, + { + "kind": "func", + "name": "Dequeue", + "signature": "func (b *SinkBuffer) Dequeue(transformers ...MessageTransformerFunc) []sinkmodels.SinkMessage", + "line": 39 + }, + { + "kind": "func", + "name": "RemoveByPartitions", + "signature": "func (b *SinkBuffer) RemoveByPartitions(partitions []kafka.TopicPartition)", + "line": 60 + }, + { + "kind": "func", + "name": "topicPartitionKey", + "signature": "func topicPartitionKey(partition kafka.TopicPartition) string", + "line": 79 + }, + { + "kind": "func", + "name": "partitionKey", + "signature": "func partitionKey(topic string, partition int32) string", + "line": 87 + } + ], + "line_count": 89 + }, + "openmeter/sink/buffer_test.go": { + "header": "\t\"testing\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestBuffer", + "signature": "func TestBuffer(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestBufferRemoveByPartitions", + "signature": "func TestBufferRemoveByPartitions(t *testing.T)", + "line": 46 + } + ], + "line_count": 78 + }, + "openmeter/sink/flushhandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "FlushEventHandlerOptions", + "signature": "type FlushEventHandlerOptions struct", + "line": 23 + }, + { + "kind": "struct", + "name": "flushEventHandler", + "signature": "type flushEventHandler struct", + "line": 36 + }, + { + "kind": "func", + "name": "NewFlushEventHandler", + "signature": "func NewFlushEventHandler(opts FlushEventHandlerOptions) (FlushEventHandler, error)", + "line": 61 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (f *flushEventHandler) Close() error", + "line": 124 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (f *flushEventHandler) Start(ctx context.Context) error", + "line": 142 + }, + { + "kind": "func", + "name": "start", + "signature": "func (f *flushEventHandler) start(ctx context.Context)", + "line": 147 + }, + { + "kind": "func", + "name": "invokeCallbackWithTimeout", + "signature": "func (f *flushEventHandler) invokeCallbackWithTimeout(parentSpan trace.Span, events []models.SinkMessage) error", + "line": 188 + }, + { + "kind": "func", + "name": "invokeCallback", + "signature": "func (f *flushEventHandler) invokeCallback(ctx context.Context, events []models.SinkMessage) error", + "line": 200 + }, + { + "kind": "func", + "name": "OnFlushSuccess", + "signature": "func (f *flushEventHandler) OnFlushSuccess(ctx context.Context, event []models.SinkMessage) error", + "line": 214 + }, + { + "kind": "func", + "name": "WaitForDrain", + "signature": "func (f *flushEventHandler) WaitForDrain(ctx context.Context) error", + "line": 248 + } + ], + "line_count": 255 + }, + "openmeter/sink/flushhandler/ingestnotification/events/events.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "EventBatchedIngest", + "signature": "type EventBatchedIngest struct", + "line": 17 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (b EventBatchedIngest) EventName() string", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (b EventBatchedIngest) Validate() error", + "line": 48 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (b EventBatchedIngest) EventMetadata() metadata.EventMetadata", + "line": 60 + } + ], + "line_count": 65 + }, + "openmeter/sink/flushhandler/ingestnotification/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 23 + }, + { + "kind": "struct", + "name": "HandlerConfig", + "signature": "type HandlerConfig struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c HandlerConfig) Validate() error", + "line": 33 + }, + { + "kind": "func", + "name": "NewHandler", + "signature": "func NewHandler(logger *slog.Logger, metricMeter metric.Meter, publisher eventbus.Publisher, config HandlerConfig) (flushhandler.FlushEventHandler, error)", + "line": 41 + }, + { + "kind": "func", + "name": "OnFlushSuccess", + "signature": "func (h *handler) OnFlushSuccess(ctx context.Context, events []sinkmodels.SinkMessage) error", + "line": 64 + }, + { + "kind": "func", + "name": "getMeterSlugsFromMeters", + "signature": "func (h *handler) getMeterSlugsFromMeters(meters []*meter.Meter) []string", + "line": 152 + } + ], + "line_count": 159 + }, + "openmeter/sink/flushhandler/meters.go": { + "header": "\t\"fmt\"\n\t\"go.opentelemetry.io/otel/metric\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "metrics", + "signature": "type metrics struct", + "line": 9 + }, + { + "kind": "func", + "name": "newMetrics", + "signature": "func newMetrics(handlerName string, meter metric.Meter) (*metrics, error)", + "line": 17 + } + ], + "line_count": 43 + }, + "openmeter/sink/flushhandler/mux.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/sink/models\"", + "symbols": [ + { + "kind": "struct", + "name": "FlushEventHandlers", + "signature": "type FlushEventHandlers struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewFlushEventHandlers", + "signature": "func NewFlushEventHandlers() *FlushEventHandlers", + "line": 19 + }, + { + "kind": "func", + "name": "AddHandler", + "signature": "func (f *FlushEventHandlers) AddHandler(handler FlushEventHandler)", + "line": 23 + }, + { + "kind": "func", + "name": "OnDrainComplete", + "signature": "func (f *FlushEventHandlers) OnDrainComplete(fn DrainCompleteFunc)", + "line": 27 + }, + { + "kind": "func", + "name": "OnFlushSuccess", + "signature": "func (f *FlushEventHandlers) OnFlushSuccess(ctx context.Context, events []models.SinkMessage) error", + "line": 31 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (f *FlushEventHandlers) Close() error", + "line": 43 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (f *FlushEventHandlers) Start(ctx context.Context) error", + "line": 55 + }, + { + "kind": "func", + "name": "WaitForDrain", + "signature": "func (f *FlushEventHandlers) WaitForDrain(ctx context.Context) error", + "line": 65 + } + ], + "line_count": 77 + }, + "openmeter/sink/flushhandler/types.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/sink/models\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "FlushEventHandler", + "signature": "type FlushEventHandler interface", + "line": 9 + } + ], + "line_count": 18 + }, + "openmeter/sink/meters.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "NamespacedMeterCache", + "signature": "type NamespacedMeterCache struct", + "line": 19 + }, + { + "kind": "struct", + "name": "NamespacedMeterCacheConfig", + "signature": "type NamespacedMeterCacheConfig struct", + "line": 29 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c NamespacedMeterCacheConfig) Validate() error", + "line": 35 + }, + { + "kind": "func", + "name": "NewNamespaceStore", + "signature": "func NewNamespaceStore(config NamespacedMeterCacheConfig) (*NamespacedMeterCache, error)", + "line": 51 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (n *NamespacedMeterCache) Start(ctx context.Context) error", + "line": 64 + }, + { + "kind": "func", + "name": "start", + "signature": "func (n *NamespacedMeterCache) start(ctx context.Context)", + "line": 80 + }, + { + "kind": "func", + "name": "fetchMeters", + "signature": "func (n *NamespacedMeterCache) fetchMeters(ctx context.Context) (map[string]MetersByType, error)", + "line": 103 + }, + { + "kind": "func", + "name": "updateCache", + "signature": "func (n *NamespacedMeterCache) updateCache(meters map[string]MetersByType)", + "line": 127 + }, + { + "kind": "func", + "name": "GetAffectedMeters", + "signature": "func (n *NamespacedMeterCache) GetAffectedMeters(ctx context.Context, m *sinkmodels.SinkMessage) ([]*meter.Meter, error)", + "line": 135 + } + ], + "line_count": 151 + }, + "openmeter/sink/models/models.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "struct", + "name": "SinkMessage", + "signature": "type SinkMessage struct", + "line": 14 + }, + { + "kind": "func", + "name": "GetDedupeItem", + "signature": "func (m SinkMessage) GetDedupeItem() dedupe.Item", + "line": 28 + }, + { + "kind": "func", + "name": "String", + "signature": "func (c ProcessingState) String() string", + "line": 38 + }, + { + "kind": "struct", + "name": "ProcessingStatus", + "signature": "type ProcessingStatus struct", + "line": 57 + } + ], + "line_count": 60 + }, + "openmeter/sink/partition.go": { + "header": "\t\"fmt\"\n\t\"sort\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "func", + "name": "prettyPartitions", + "signature": "func prettyPartitions(partitions []kafka.TopicPartition) []string", + "line": 10 + } + ], + "line_count": 26 + }, + "openmeter/sink/sink.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Sink", + "signature": "type Sink struct", + "line": 35 + }, + { + "kind": "struct", + "name": "SinkConfig", + "signature": "type SinkConfig struct", + "line": 55 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SinkConfig) Validate() error", + "line": 105 + }, + { + "kind": "func", + "name": "NewSink", + "signature": "func NewSink(config SinkConfig) (*Sink, error)", + "line": 173 + }, + { + "kind": "func", + "name": "withStoredAt", + "signature": "func withStoredAt(storedAt time.Time) MessageTransformerFunc", + "line": 251 + }, + { + "kind": "func", + "name": "flush", + "signature": "func (s *Sink) flush(ctx context.Context) error", + "line": 259 + }, + { + "kind": "func", + "name": "reportFlushMetrics", + "signature": "func (s *Sink) reportFlushMetrics(ctx context.Context, messages []sinkmodels.SinkMessage) error", + "line": 408 + }, + { + "kind": "func", + "name": "persistToStorage", + "signature": "func (s *Sink) persistToStorage(ctx context.Context, messages []sinkmodels.SinkMessage) error", + "line": 430 + }, + { + "kind": "func", + "name": "dedupeSet", + "signature": "func (s *Sink) dedupeSet(ctx context.Context, messages []sinkmodels.SinkMessage) error", + "line": 478 + }, + { + "kind": "func", + "name": "updateTopicSubscription", + "signature": "func (s *Sink) updateTopicSubscription(ctx context.Context, metadataTimeout time.Duration) error", + "line": 555 + }, + { + "kind": "func", + "name": "subscribeToNamespaces", + "signature": "func (s *Sink) subscribeToNamespaces(ctx context.Context) error", + "line": 592 + }, + { + "kind": "func", + "name": "setFlushTimer", + "signature": "func (s *Sink) setFlushTimer(ctx context.Context)", + "line": 616 + }, + { + "kind": "func", + "name": "clearFlushTimer", + "signature": "func (s *Sink) clearFlushTimer()", + "line": 627 + }, + { + "kind": "func", + "name": "Run", + "signature": "func (s *Sink) Run(ctx context.Context) error", + "line": 634 + }, + { + "kind": "func", + "name": "pause", + "signature": "func (s *Sink) pause() error", + "line": 773 + }, + { + "kind": "func", + "name": "resume", + "signature": "func (s *Sink) resume() error", + "line": 786 + }, + { + "kind": "func", + "name": "rebalance", + "signature": "func (s *Sink) rebalance(c *kafka.Consumer, event kafka.Event) error", + "line": 799 + }, + { + "kind": "func", + "name": "parseMessage", + "signature": "func (s *Sink) parseMessage(ctx context.Context, e *kafka.Message) (*sinkmodels.SinkMessage, error)", + "line": 876 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (s *Sink) Close() error", + "line": 973 + }, + { + "kind": "func", + "name": "dedupeSinkMessages", + "signature": "func dedupeSinkMessages(events []sinkmodels.SinkMessage) []sinkmodels.SinkMessage", + "line": 1008 + } + ], + "line_count": 1034 + }, + "openmeter/sink/storage.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "Storage", + "signature": "type Storage interface", + "line": 16 + }, + { + "kind": "struct", + "name": "ClickHouseStorageConfig", + "signature": "type ClickHouseStorageConfig struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ClickHouseStorageConfig) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "NewClickhouseStorage", + "signature": "func NewClickhouseStorage(config ClickHouseStorageConfig) (*ClickHouseStorage, error)", + "line": 32 + }, + { + "kind": "struct", + "name": "ClickHouseStorage", + "signature": "type ClickHouseStorage struct", + "line": 42 + }, + { + "kind": "func", + "name": "BatchInsert", + "signature": "func (c *ClickHouseStorage) BatchInsert(ctx context.Context, messages []sinkmodels.SinkMessage) error", + "line": 47 + } + ], + "line_count": 74 + }, + "openmeter/streaming/clickhouse/connector.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Connector", + "signature": "type Connector struct", + "line": 24 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 43 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(ctx context.Context, config Config) (*Connector, error)", + "line": 67 + }, + { + "kind": "func", + "name": "createTable", + "signature": "func (c *Connector) createTable(ctx context.Context) error", + "line": 88 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (c *Connector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)", + "line": 98 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (c *Connector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)", + "line": 115 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (c *Connector) QueryMeter(ctx context.Context, namespace string, meter meterpkg.Meter, params streaming.QueryParams) ([]meterpkg.MeterQueryRow, error)", + "line": 132 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (c *Connector) ListSubjects(ctx context.Context, params streaming.ListSubjectsParams) ([]string, error)", + "line": 200 + }, + { + "kind": "func", + "name": "ListGroupByValues", + "signature": "func (c *Connector) ListGroupByValues(ctx context.Context, params streaming.ListGroupByValuesParams) ([]string, error)", + "line": 217 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (c *Connector) CreateNamespace(ctx context.Context, namespace string) error", + "line": 234 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (c *Connector) DeleteNamespace(ctx context.Context, namespace string) error", + "line": 238 + }, + { + "kind": "func", + "name": "CountEvents", + "signature": "func (c *Connector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)", + "line": 243 + }, + { + "kind": "func", + "name": "BatchInsert", + "signature": "func (c *Connector) BatchInsert(ctx context.Context, rawEvents []streaming.RawEvent) error", + "line": 260 + }, + { + "kind": "func", + "name": "createEventsTable", + "signature": "func (c *Connector) createEventsTable(ctx context.Context) error", + "line": 290 + }, + { + "kind": "func", + "name": "ValidateJSONPath", + "signature": "func (c *Connector) ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)", + "line": 305 + }, + { + "kind": "func", + "name": "queryEventsTable", + "signature": "func (c *Connector) queryEventsTable(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)", + "line": 326 + }, + { + "kind": "func", + "name": "queryEventsTableV2", + "signature": "func (c *Connector) queryEventsTableV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)", + "line": 387 + }, + { + "kind": "func", + "name": "queryCountEvents", + "signature": "func (c *Connector) queryCountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)", + "line": 438 + }, + { + "kind": "func", + "name": "queryMeterWithProgress", + "signature": "func (c *Connector) queryMeterWithProgress(ctx context.Context, namespace string, clientID string, query queryMeter) ([]meterpkg.MeterQueryRow, error)", + "line": 480 + }, + { + "kind": "func", + "name": "queryMeter", + "signature": "func (c *Connector) queryMeter(ctx context.Context, query queryMeter) ([]meterpkg.MeterQueryRow, error)", + "line": 502 + }, + { + "kind": "func", + "name": "listSubjects", + "signature": "func (c *Connector) listSubjects(ctx context.Context, params streaming.ListSubjectsParams) ([]string, error)", + "line": 535 + }, + { + "kind": "func", + "name": "listGroupByValues", + "signature": "func (c *Connector) listGroupByValues(ctx context.Context, params streaming.ListGroupByValuesParams) ([]string, error)", + "line": 573 + }, + { + "kind": "func", + "name": "withProgressContext", + "signature": "func (c *Connector) withProgressContext(ctx context.Context, namespace string, clientID string, countSQL string, countArgs []interface{}) (context.Context, error)", + "line": 612 + } + ], + "line_count": 669 + }, + "openmeter/streaming/clickhouse/connector_query_test.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "ConnectorTestSuite", + "signature": "type ConnectorTestSuite struct", + "line": 24 + }, + { + "kind": "func", + "name": "SetupTest", + "signature": "func (s *ConnectorTestSuite) SetupTest()", + "line": 29 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *ConnectorTestSuite) TearDownTest()", + "line": 48 + }, + { + "kind": "func", + "name": "TestConnectorQueryMeter", + "signature": "func (s *ConnectorTestSuite) TestConnectorQueryMeter()", + "line": 58 + }, + { + "kind": "func", + "name": "TestConnector", + "signature": "func TestConnector(t *testing.T)", + "line": 383 + } + ], + "line_count": 385 + }, + "openmeter/streaming/clickhouse/connector_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "GetMockConnector", + "signature": "func GetMockConnector(t *testing.T, opts ...MockConnectorOption) (*Connector, *MockClickHouse)", + "line": 25 + }, + { + "kind": "func", + "name": "TestConnector_QueryMeter", + "signature": "func TestConnector_QueryMeter(t *testing.T)", + "line": 50 + }, + { + "kind": "func", + "name": "TestBatchInsert", + "signature": "func TestBatchInsert(t *testing.T)", + "line": 178 + } + ], + "line_count": 202 + }, + "openmeter/streaming/clickhouse/event_query.go": { + "header": "\t_ \"embed\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "createEventsTable", + "signature": "type createEventsTable struct", + "line": 15 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d createEventsTable) toSQL() string", + "line": 20 + }, + { + "kind": "struct", + "name": "queryEventsTable", + "signature": "type queryEventsTable struct", + "line": 52 + }, + { + "kind": "func", + "name": "toCountRowSQL", + "signature": "func (d queryEventsTable) toCountRowSQL() (string, []interface", + "line": 69 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d queryEventsTable) toSQL() (string, []interface", + "line": 105 + }, + { + "kind": "struct", + "name": "queryCountEvents", + "signature": "type queryCountEvents struct", + "line": 172 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d queryCountEvents) toSQL() (string, []interface", + "line": 179 + }, + { + "kind": "struct", + "name": "InsertEventsQuery", + "signature": "type InsertEventsQuery struct", + "line": 195 + }, + { + "kind": "func", + "name": "ToSQL", + "signature": "func (q InsertEventsQuery) ToSQL() (string, []interface", + "line": 202 + }, + { + "kind": "func", + "name": "getTableName", + "signature": "func getTableName(database string, tableName string) string", + "line": 238 + } + ], + "line_count": 240 + }, + "openmeter/streaming/clickhouse/event_query_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreateEventsTable", + "signature": "func TestCreateEventsTable(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestQueryEventsTable", + "signature": "func TestQueryEventsTable(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "TestQueryEventsCount", + "signature": "func TestQueryEventsCount(t *testing.T)", + "line": 145 + }, + { + "kind": "func", + "name": "TestInsertEventsQuery", + "signature": "func TestInsertEventsQuery(t *testing.T)", + "line": 175 + } + ], + "line_count": 229 + }, + "openmeter/streaming/clickhouse/event_query_v2.go": { + "header": "\t\"github.com/huandu/go-sqlbuilder\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/streaming\"", + "symbols": [ + { + "kind": "struct", + "name": "queryEventsTableV2", + "signature": "type queryEventsTableV2 struct", + "line": 14 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (q queryEventsTableV2) toSQL() (string, []interface", + "line": 21 + }, + { + "kind": "func", + "name": "toCountRowSQL", + "signature": "func (q queryEventsTableV2) toCountRowSQL() (string, []interface", + "line": 137 + } + ], + "line_count": 176 + }, + "openmeter/streaming/clickhouse/event_query_v2_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestQueryEventsTableV2_ToSQL", + "signature": "func TestQueryEventsTableV2_ToSQL(t *testing.T)", + "line": 18 + }, + { + "kind": "func", + "name": "TestQueryEventsTableV2_ToCountRowSQL", + "signature": "func TestQueryEventsTableV2_ToCountRowSQL(t *testing.T)", + "line": 226 + } + ], + "line_count": 326 + }, + "openmeter/streaming/clickhouse/group_by_values_query.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/huandu/go-sqlbuilder\"", + "symbols": [ + { + "kind": "struct", + "name": "listGroupByValuesQuery", + "signature": "type listGroupByValuesQuery struct", + "line": 12 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d listGroupByValuesQuery) toSQL() (string, []interface", + "line": 23 + } + ], + "line_count": 52 + }, + "openmeter/streaming/clickhouse/group_by_values_query_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestListGroupByValues", + "signature": "func TestListGroupByValues(t *testing.T)", + "line": 13 + } + ], + "line_count": 132 + }, + "openmeter/streaming/clickhouse/meter_query.go": { + "header": "\t_ \"embed\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "NullDecimal", + "signature": "type NullDecimal struct", + "line": 23 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (v *NullDecimal) Scan(src any) error", + "line": 27 + }, + { + "kind": "struct", + "name": "queryMeter", + "signature": "type queryMeter struct", + "line": 42 + }, + { + "kind": "func", + "name": "from", + "signature": "func (d *queryMeter) from() *time.Time", + "line": 62 + }, + { + "kind": "func", + "name": "toCountRowSQL", + "signature": "func (d *queryMeter) toCountRowSQL() (string, []interface", + "line": 93 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d *queryMeter) toSQL() (string, []interface", + "line": 108 + }, + { + "kind": "func", + "name": "whereByOrderedColumns", + "signature": "func (d *queryMeter) whereByOrderedColumns(query *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder", + "line": 366 + }, + { + "kind": "func", + "name": "timeWhere", + "signature": "func (d *queryMeter) timeWhere(query *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder", + "line": 379 + }, + { + "kind": "func", + "name": "scanRows", + "signature": "func (queryMeter queryMeter) scanRows(rows driver.Rows) ([]meterpkg.MeterQueryRow, error)", + "line": 397 + }, + { + "kind": "func", + "name": "escapeJSONPathLiteral", + "signature": "func escapeJSONPathLiteral(s string) string", + "line": 488 + } + ], + "line_count": 509 + }, + "openmeter/streaming/clickhouse/meter_query_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestQueryMeter", + "signature": "func TestQueryMeter(t *testing.T)", + "line": 17 + } + ], + "line_count": 843 + }, + "openmeter/streaming/clickhouse/mock.go": { + "header": "\t\"context\"\n\t\"github.com/ClickHouse/clickhouse-go/v2\"\n\t\"github.com/ClickHouse/clickhouse-go/v2/lib/driver\"", + "symbols": [ + { + "kind": "func", + "name": "NewMockClickHouse", + "signature": "func NewMockClickHouse() *MockClickHouse", + "line": 13 + }, + { + "kind": "struct", + "name": "MockClickHouse", + "signature": "type MockClickHouse struct", + "line": 18 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (m *MockClickHouse) Query(ctx context.Context, query string, queryArgs ...interface{}) (driver.Rows, error)", + "line": 22 + }, + { + "kind": "func", + "name": "QueryRow", + "signature": "func (m *MockClickHouse) QueryRow(ctx context.Context, query string, queryArgs ...interface{}) driver.Row", + "line": 27 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (m *MockClickHouse) Select(ctx context.Context, dest any, query string, queryArgs ...any) error", + "line": 32 + }, + { + "kind": "func", + "name": "ServerVersion", + "signature": "func (m *MockClickHouse) ServerVersion() (*clickhouse.ServerVersion, error)", + "line": 37 + }, + { + "kind": "func", + "name": "Contributors", + "signature": "func (m *MockClickHouse) Contributors() []string", + "line": 42 + }, + { + "kind": "func", + "name": "Stats", + "signature": "func (m *MockClickHouse) Stats() driver.Stats", + "line": 47 + }, + { + "kind": "func", + "name": "PrepareBatch", + "signature": "func (m *MockClickHouse) PrepareBatch(ctx context.Context, query string, options ...driver.PrepareBatchOption) (driver.Batch, error)", + "line": 52 + }, + { + "kind": "func", + "name": "AsyncInsert", + "signature": "func (m *MockClickHouse) AsyncInsert(ctx context.Context, query string, wait bool, args ...interface{}) error", + "line": 57 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (m *MockClickHouse) Exec(ctx context.Context, query string, args ...interface{}) error", + "line": 62 + }, + { + "kind": "func", + "name": "Ping", + "signature": "func (m *MockClickHouse) Ping(ctx context.Context) error", + "line": 67 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (m *MockClickHouse) Close() error", + "line": 72 + }, + { + "kind": "func", + "name": "NewMockRows", + "signature": "func NewMockRows() *MockRows", + "line": 79 + }, + { + "kind": "struct", + "name": "MockRows", + "signature": "type MockRows struct", + "line": 84 + }, + { + "kind": "func", + "name": "HasData", + "signature": "func (m *MockRows) HasData() bool", + "line": 88 + }, + { + "kind": "func", + "name": "Next", + "signature": "func (m *MockRows) Next() bool", + "line": 93 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (m *MockRows) Scan(dest ...interface{}) error", + "line": 98 + }, + { + "kind": "func", + "name": "ScanStruct", + "signature": "func (m *MockRows) ScanStruct(dest any) error", + "line": 103 + }, + { + "kind": "func", + "name": "Totals", + "signature": "func (m *MockRows) Totals(dest ...interface{}) error", + "line": 108 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (m *MockRows) Close() error", + "line": 113 + }, + { + "kind": "func", + "name": "Columns", + "signature": "func (m *MockRows) Columns() []string", + "line": 118 + }, + { + "kind": "func", + "name": "ColumnTypes", + "signature": "func (m *MockRows) ColumnTypes() []driver.ColumnType", + "line": 123 + }, + { + "kind": "func", + "name": "Err", + "signature": "func (m *MockRows) Err() error", + "line": 128 + } + ], + "line_count": 131 + }, + "openmeter/streaming/clickhouse/queryhelper.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"github.com/huandu/go-sqlbuilder\"", + "symbols": [ + { + "kind": "func", + "name": "selectCustomerIdColumn", + "signature": "func selectCustomerIdColumn(eventsTableName string, customers []streaming.Customer, query *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder", + "line": 15 + }, + { + "kind": "func", + "name": "customersWhere", + "signature": "func customersWhere(eventsTableName string, customers []streaming.Customer, query *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder", + "line": 67 + }, + { + "kind": "func", + "name": "subjectWhere", + "signature": "func subjectWhere(\n\teventsTableName string,\n\tsubjects []string,\n\tquery *sqlbuilder.SelectBuilder,\n) *sqlbuilder.SelectBuilder", + "line": 94 + }, + { + "kind": "func", + "name": "columnFactory", + "signature": "func columnFactory(alias string) func(string) string", + "line": 113 + } + ], + "line_count": 117 + }, + "openmeter/streaming/clickhouse/subject_query.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/huandu/go-sqlbuilder\"", + "symbols": [ + { + "kind": "struct", + "name": "listSubjectsQuery", + "signature": "type listSubjectsQuery struct", + "line": 12 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d listSubjectsQuery) toSQL() (string, []interface", + "line": 22 + } + ], + "line_count": 51 + }, + "openmeter/streaming/clickhouse/subject_query_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestListSubjects", + "signature": "func TestListSubjects(t *testing.T)", + "line": 13 + } + ], + "line_count": 103 + }, + "openmeter/streaming/clickhouse/suite_test.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CHTestSuite", + "signature": "type CHTestSuite struct", + "line": 18 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CHTestSuite) SetupSuite()", + "line": 27 + }, + { + "kind": "func", + "name": "SetupTest", + "signature": "func (s *CHTestSuite) SetupTest()", + "line": 31 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *CHTestSuite) TearDownTest()", + "line": 46 + }, + { + "kind": "func", + "name": "CreateTempDatabase", + "signature": "func (s *CHTestSuite) CreateTempDatabase(t *testing.T) func()", + "line": 57 + } + ], + "line_count": 72 + }, + "openmeter/streaming/clickhouse/utils_query.go": { + "header": "type validateJsonPathQuery struct {\n\tjsonPath string\n}", + "symbols": [ + { + "kind": "struct", + "name": "validateJsonPathQuery", + "signature": "type validateJsonPathQuery struct", + "line": 5 + }, + { + "kind": "func", + "name": "toSQL", + "signature": "func (d validateJsonPathQuery) toSQL() (string, []interface", + "line": 10 + } + ], + "line_count": 13 + }, + "openmeter/streaming/clickhouse/utils_query_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Test_ValidateJsonPathQuery", + "signature": "func Test_ValidateJsonPathQuery(t *testing.T)", + "line": 9 + } + ], + "line_count": 18 + }, + "openmeter/streaming/connector.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CountEventsParams", + "signature": "type CountEventsParams struct", + "line": 13 + }, + { + "kind": "struct", + "name": "CountEventRow", + "signature": "type CountEventRow struct", + "line": 18 + }, + { + "kind": "struct", + "name": "RawEvent", + "signature": "type RawEvent struct", + "line": 24 + }, + { + "kind": "interface", + "name": "Connector", + "signature": "type Connector interface", + "line": 38 + }, + { + "kind": "struct", + "name": "ListSubjectsParams", + "signature": "type ListSubjectsParams struct", + "line": 54 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListSubjectsParams) Validate() error", + "line": 63 + }, + { + "kind": "struct", + "name": "ListGroupByValuesParams", + "signature": "type ListGroupByValuesParams struct", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListGroupByValuesParams) Validate() error", + "line": 100 + } + ], + "line_count": 136 + }, + "openmeter/streaming/defaults.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/meter\"\n)", + "symbols": [], + "line_count": 14 + }, + "openmeter/streaming/eventparams.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (f EventSortField) Values() []string", + "line": 26 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f EventSortField) Validate() error", + "line": 36 + }, + { + "kind": "struct", + "name": "ListEventsParams", + "signature": "type ListEventsParams struct", + "line": 49 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListEventsParams) Validate() error", + "line": 73 + }, + { + "kind": "struct", + "name": "ListEventsV2Params", + "signature": "type ListEventsV2Params struct", + "line": 100 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ListEventsV2Params) Validate() error", + "line": 132 + } + ], + "line_count": 196 + }, + "openmeter/streaming/query_params.go": { + "header": "\t\"errors\"\n\t\"slices\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "QueryParams", + "signature": "type QueryParams struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p *QueryParams) Validate() error", + "line": 29 + } + ], + "line_count": 88 + }, + "openmeter/streaming/query_params_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "testCustomer", + "signature": "type testCustomer struct", + "line": 14 + }, + { + "kind": "func", + "name": "GetUsageAttribution", + "signature": "func (c testCustomer) GetUsageAttribution() CustomerUsageAttribution", + "line": 20 + }, + { + "kind": "func", + "name": "TestQueryParamsValidate", + "signature": "func TestQueryParamsValidate(t *testing.T)", + "line": 24 + } + ], + "line_count": 98 + }, + "openmeter/streaming/retry/retry.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"io\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 27 + }, + { + "kind": "struct", + "name": "Connector", + "signature": "type Connector struct", + "line": 53 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Connector, error)", + "line": 64 + }, + { + "kind": "func", + "name": "BatchInsert", + "signature": "func (c *Connector) BatchInsert(ctx context.Context, events []streaming.RawEvent) error", + "line": 78 + }, + { + "kind": "func", + "name": "CountEvents", + "signature": "func (c *Connector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)", + "line": 82 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (c *Connector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)", + "line": 88 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (c *Connector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)", + "line": 94 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (c *Connector) ListSubjects(ctx context.Context, params streaming.ListSubjectsParams) ([]string, error)", + "line": 100 + }, + { + "kind": "func", + "name": "ListGroupByValues", + "signature": "func (c *Connector) ListGroupByValues(ctx context.Context, params streaming.ListGroupByValuesParams) ([]string, error)", + "line": 106 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (c *Connector) QueryMeter(ctx context.Context, namespace string, m meter.Meter, params streaming.QueryParams) ([]meter.MeterQueryRow, error)", + "line": 112 + }, + { + "kind": "func", + "name": "ValidateJSONPath", + "signature": "func (c *Connector) ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)", + "line": 118 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (c *Connector) CreateNamespace(ctx context.Context, namespace string) error", + "line": 122 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (c *Connector) DeleteNamespace(ctx context.Context, namespace string) error", + "line": 126 + } + ], + "line_count": 171 + }, + "openmeter/streaming/retry/retry_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"io\"", + "symbols": [ + { + "kind": "struct", + "name": "noopConnector", + "signature": "type noopConnector struct", + "line": 19 + }, + { + "kind": "func", + "name": "validConfig", + "signature": "func validConfig() Config", + "line": 23 + }, + { + "kind": "func", + "name": "TestConfigValidate", + "signature": "func TestConfigValidate(t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "TestNewConnector", + "signature": "func TestNewConnector(t *testing.T)", + "line": 95 + }, + { + "kind": "struct", + "name": "MockRetryable", + "signature": "type MockRetryable struct", + "line": 111 + }, + { + "kind": "func", + "name": "Action", + "signature": "func (m *MockRetryable) Action() (int, error)", + "line": 115 + }, + { + "kind": "func", + "name": "TestRetry", + "signature": "func TestRetry(t *testing.T)", + "line": 120 + }, + { + "kind": "func", + "name": "TestRetryContextCancellation", + "signature": "func TestRetryContextCancellation(t *testing.T)", + "line": 180 + }, + { + "kind": "func", + "name": "TestRetryBackoffAndJitter", + "signature": "func TestRetryBackoffAndJitter(t *testing.T)", + "line": 204 + } + ], + "line_count": 241 + }, + "openmeter/streaming/testutils/streaming.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "NewMockStreamingConnector", + "signature": "func NewMockStreamingConnector(t testing.TB) *MockStreamingConnector", + "line": 20 + }, + { + "kind": "struct", + "name": "SimpleEvent", + "signature": "type SimpleEvent struct", + "line": 27 + }, + { + "kind": "struct", + "name": "MockStreamingConnector", + "signature": "type MockStreamingConnector struct", + "line": 34 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (m *MockStreamingConnector) Reset()", + "line": 39 + }, + { + "kind": "func", + "name": "WithStoredAt", + "signature": "func WithStoredAt(storedAt time.Time) AddOption", + "line": 46 + }, + { + "kind": "func", + "name": "AddSimpleEvent", + "signature": "func (m *MockStreamingConnector) AddSimpleEvent(meterSlug string, value float64, at time.Time, opts ...AddOption)", + "line": 52 + }, + { + "kind": "func", + "name": "SetSimpleEvents", + "signature": "func (m *MockStreamingConnector) SetSimpleEvents(meterSlug string, fn func(events []SimpleEvent) []SimpleEvent)", + "line": 66 + }, + { + "kind": "func", + "name": "AddRow", + "signature": "func (m *MockStreamingConnector) AddRow(meterSlug string, row meter.MeterQueryRow)", + "line": 74 + }, + { + "kind": "func", + "name": "sortMeterEvents", + "signature": "func (m *MockStreamingConnector) sortMeterEvents(meterSlug string)", + "line": 78 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (c *MockStreamingConnector) CreateNamespace(ctx context.Context, namespace string) error", + "line": 85 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (c *MockStreamingConnector) DeleteNamespace(ctx context.Context, namespace string) error", + "line": 89 + }, + { + "kind": "func", + "name": "CountEvents", + "signature": "func (m *MockStreamingConnector) CountEvents(ctx context.Context, namespace string, params streaming.CountEventsParams) ([]streaming.CountEventRow, error)", + "line": 93 + }, + { + "kind": "func", + "name": "ListEvents", + "signature": "func (m *MockStreamingConnector) ListEvents(ctx context.Context, namespace string, params streaming.ListEventsParams) ([]streaming.RawEvent, error)", + "line": 97 + }, + { + "kind": "func", + "name": "ListEventsV2", + "signature": "func (m *MockStreamingConnector) ListEventsV2(ctx context.Context, params streaming.ListEventsV2Params) ([]streaming.RawEvent, error)", + "line": 101 + }, + { + "kind": "func", + "name": "QueryMeter", + "signature": "func (m *MockStreamingConnector) QueryMeter(ctx context.Context, namespace string, mm meter.Meter, params streaming.QueryParams) ([]meter.MeterQueryRow, error)", + "line": 107 + }, + { + "kind": "func", + "name": "BatchInsert", + "signature": "func (m *MockStreamingConnector) BatchInsert(ctx context.Context, events []streaming.RawEvent) error", + "line": 128 + }, + { + "kind": "func", + "name": "ValidateJSONPath", + "signature": "func (m *MockStreamingConnector) ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)", + "line": 132 + }, + { + "kind": "func", + "name": "windowSizeDuration", + "signature": "func (m *MockStreamingConnector) windowSizeDuration(windowSize meter.WindowSize) time.Duration", + "line": 136 + }, + { + "kind": "func", + "name": "filterStoredAt", + "signature": "func filterStoredAt(f *filter.FilterTimeUnix, storedAt time.Time) bool", + "line": 152 + }, + { + "kind": "func", + "name": "aggregateEvents", + "signature": "func (m *MockStreamingConnector) aggregateEvents(mm meter.Meter, params streaming.QueryParams) ([]meter.MeterQueryRow, error)", + "line": 188 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (m *MockStreamingConnector) ListSubjects(ctx context.Context, params streaming.ListSubjectsParams) ([]string, error)", + "line": 283 + }, + { + "kind": "func", + "name": "ListGroupByValues", + "signature": "func (m *MockStreamingConnector) ListGroupByValues(ctx context.Context, params streaming.ListGroupByValuesParams) ([]string, error)", + "line": 287 + } + ], + "line_count": 289 + }, + "openmeter/streaming/testutils/streaming_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestMockStreamingConnector", + "signature": "func TestMockStreamingConnector(t *testing.T)", + "line": 19 + } + ], + "line_count": 519 + }, + "openmeter/streaming/usageattribution.go": { + "header": "\t\"errors\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "Customer", + "signature": "type Customer interface", + "line": 11 + }, + { + "kind": "func", + "name": "NewCustomerUsageAttribution", + "signature": "func NewCustomerUsageAttribution(id string, key *string, subjectKeys []string) CustomerUsageAttribution", + "line": 16 + }, + { + "kind": "struct", + "name": "CustomerUsageAttribution", + "signature": "type CustomerUsageAttribution struct", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (ua CustomerUsageAttribution) Validate() error", + "line": 41 + }, + { + "kind": "func", + "name": "GetValues", + "signature": "func (ua CustomerUsageAttribution) GetValues() []string", + "line": 60 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (ua CustomerUsageAttribution) Equal(other CustomerUsageAttribution) bool", + "line": 73 + } + ], + "line_count": 87 + }, + "openmeter/streaming/usageattribution_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "TestCustomerUsageAttributionValidate", + "signature": "func TestCustomerUsageAttributionValidate(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestCustomerUsageAttributionGetValues", + "signature": "func TestCustomerUsageAttributionGetValues(t *testing.T)", + "line": 124 + }, + { + "kind": "func", + "name": "TestCustomerUsageAttributionEqual", + "signature": "func TestCustomerUsageAttributionEqual(t *testing.T)", + "line": 206 + } + ], + "line_count": 378 + }, + "openmeter/subject/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "interface", + "name": "Adapter", + "signature": "type Adapter interface", + "line": 12 + }, + { + "kind": "struct", + "name": "GetSubjectAdapterInput", + "signature": "type GetSubjectAdapterInput struct", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetSubjectAdapterInput) Validate() error", + "line": 30 + } + ], + "line_count": 40 + }, + "openmeter/subject/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "New", + "signature": "func New(db *entdb.Client) (subject.Adapter, error)", + "line": 16 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 31 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 35 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 45 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 53 + } + ], + "line_count": 55 + }, + "openmeter/subject/adapter/subject.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Create", + "signature": "func (a *adapter) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error)", + "line": 20 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (a *adapter) Update(ctx context.Context, input subject.UpdateInput) (subject.Subject, error)", + "line": 52 + }, + { + "kind": "func", + "name": "GetByIdOrKey", + "signature": "func (a *adapter) GetByIdOrKey(ctx context.Context, namespace string, idOrKey string) (subject.Subject, error)", + "line": 106 + }, + { + "kind": "func", + "name": "GetByKey", + "signature": "func (a *adapter) GetByKey(ctx context.Context, key models.NamespacedKey) (subject.Subject, error)", + "line": 148 + }, + { + "kind": "func", + "name": "GetById", + "signature": "func (a *adapter) GetById(ctx context.Context, id models.NamespacedID) (subject.Subject, error)", + "line": 180 + }, + { + "kind": "func", + "name": "List", + "signature": "func (a *adapter) List(ctx context.Context, namespace string, params subject.ListParams) (pagination.Result[subject.Subject], error)", + "line": 207 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (a *adapter) Delete(ctx context.Context, id models.NamespacedID) error", + "line": 271 + }, + { + "kind": "func", + "name": "mapEntity", + "signature": "func mapEntity(e *db.Subject) subject.Subject", + "line": 310 + } + ], + "line_count": 336 + }, + "openmeter/subject/httphandler/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 16 + }, + { + "kind": "interface", + "name": "SubjectHandler", + "signature": "type SubjectHandler interface", + "line": 20 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 29 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 37 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(\n\tnamespaceDecoder namespacedriver.NamespaceDecoder,\n\tlogger *slog.Logger,\n\tsubjectService subject.Service,\n\tentitlementConnector entitlement.Service,\n\toptions ...httptransport.HandlerOption,\n) Handler", + "line": 46 + } + ], + "line_count": 60 + }, + "openmeter/subject/httphandler/mapping.go": { + "header": "\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/openmeter/subject\"\n)", + "symbols": [ + { + "kind": "func", + "name": "FromSubject", + "signature": "func FromSubject(s subject.Subject) api.Subject", + "line": 8 + } + ], + "line_count": 31 + }, + "openmeter/subject/httphandler/subject.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "struct", + "name": "GetSubjectRequest", + "signature": "type GetSubjectRequest struct", + "line": 29 + }, + { + "kind": "func", + "name": "GetSubject", + "signature": "func (h *handler) GetSubject() GetSubjectHandler", + "line": 35 + }, + { + "kind": "struct", + "name": "ListSubjectsRequest", + "signature": "type ListSubjectsRequest struct", + "line": 71 + }, + { + "kind": "func", + "name": "ListSubjects", + "signature": "func (h *handler) ListSubjects() ListSubjectsHandler", + "line": 76 + }, + { + "kind": "struct", + "name": "UpsertSubjectRequest", + "signature": "type UpsertSubjectRequest struct", + "line": 117 + }, + { + "kind": "func", + "name": "UpsertSubject", + "signature": "func (h *handler) UpsertSubject() UpsertSubjectHandler", + "line": 124 + }, + { + "kind": "struct", + "name": "DeleteSubjectRequest", + "signature": "type DeleteSubjectRequest struct", + "line": 270 + }, + { + "kind": "func", + "name": "DeleteSubject", + "signature": "func (h *handler) DeleteSubject() DeleteSubjectHandler", + "line": 276 + } + ], + "line_count": 312 + }, + "openmeter/subject/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 11 + }, + { + "kind": "struct", + "name": "ListParams", + "signature": "type ListParams struct", + "line": 35 + }, + { + "kind": "struct", + "name": "CreateInput", + "signature": "type CreateInput struct", + "line": 43 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateInput) Validate() error", + "line": 51 + }, + { + "kind": "struct", + "name": "UpdateInput", + "signature": "type UpdateInput struct", + "line": 70 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateInput) Validate() error", + "line": 78 + } + ], + "line_count": 101 + }, + "openmeter/subject/service/hooks/customersubject.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "contextKey", + "signature": "type contextKey struct", + "line": 19 + }, + { + "kind": "func", + "name": "NewContextWithSkipSubjectCustomer", + "signature": "func NewContextWithSkipSubjectCustomer(ctx context.Context) context.Context", + "line": 23 + }, + { + "kind": "func", + "name": "SkipSubjectCustomerFromContext", + "signature": "func SkipSubjectCustomerFromContext(ctx context.Context) bool", + "line": 27 + }, + { + "kind": "struct", + "name": "customerSubjectHook", + "signature": "type customerSubjectHook struct", + "line": 43 + }, + { + "kind": "func", + "name": "PostCreate", + "signature": "func (s customerSubjectHook) PostCreate(ctx context.Context, cus *customer.Customer) error", + "line": 51 + }, + { + "kind": "func", + "name": "PostUpdate", + "signature": "func (s customerSubjectHook) PostUpdate(ctx context.Context, cus *customer.Customer) error", + "line": 66 + }, + { + "kind": "func", + "name": "NewCustomerSubjectHook", + "signature": "func NewCustomerSubjectHook(config CustomerSubjectHookConfig) (CustomerSubjectHook, error)", + "line": 81 + }, + { + "kind": "struct", + "name": "SubjectProvisionerConfig", + "signature": "type SubjectProvisionerConfig struct", + "line": 102 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SubjectProvisionerConfig) Validate() error", + "line": 108 + }, + { + "kind": "func", + "name": "NewSubjectProvisioner", + "signature": "func NewSubjectProvisioner(config SubjectProvisionerConfig) (*SubjectProvisioner, error)", + "line": 126 + }, + { + "kind": "struct", + "name": "SubjectProvisioner", + "signature": "type SubjectProvisioner struct", + "line": 138 + }, + { + "kind": "func", + "name": "EnsureSubjects", + "signature": "func (p SubjectProvisioner) EnsureSubjects(ctx context.Context, cus *customer.Customer) error", + "line": 145 + }, + { + "kind": "func", + "name": "EnsureSubject", + "signature": "func (p SubjectProvisioner) EnsureSubject(ctx context.Context, cus *customer.Customer, subjectKey string) (*subject.Subject, error)", + "line": 199 + } + ], + "line_count": 260 + }, + "openmeter/subject/service/hooks/customersubject_test.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "func", + "name": "Test_CustomerSubjectHook", + "signature": "func Test_CustomerSubjectHook(t *testing.T)", + "line": 35 + }, + { + "kind": "struct", + "name": "NoopCustomerOverrideService", + "signature": "type NoopCustomerOverrideService struct", + "line": 190 + }, + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) UpsertCustomerOverride(ctx context.Context, input billing.UpsertCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 192 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) DeleteCustomerOverride(ctx context.Context, input billing.DeleteCustomerOverrideInput) error", + "line": 196 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 200 + }, + { + "kind": "func", + "name": "GetCustomerApp", + "signature": "func (n NoopCustomerOverrideService) GetCustomerApp(ctx context.Context, input billing.GetCustomerAppInput) (app.App, error)", + "line": 204 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (n NoopCustomerOverrideService) ListCustomerOverrides(ctx context.Context, input billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesResult, error)", + "line": 208 + }, + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 212 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 220 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 231 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 240 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 262 + } + ], + "line_count": 315 + }, + "openmeter/subject/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subject\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 15 + }, + { + "kind": "func", + "name": "RegisterHooks", + "signature": "func (s *Service) RegisterHooks(hooks ...models.ServiceHook[subject.Subject])", + "line": 20 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(subjectAdapter subject.Adapter) (*Service, error)", + "line": 25 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *Service) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error)", + "line": 37 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (s *Service) Update(ctx context.Context, input subject.UpdateInput) (subject.Subject, error)", + "line": 57 + }, + { + "kind": "func", + "name": "GetByIdOrKey", + "signature": "func (s *Service) GetByIdOrKey(ctx context.Context, orgId string, idOrKey string) (subject.Subject, error)", + "line": 89 + }, + { + "kind": "func", + "name": "GetById", + "signature": "func (s *Service) GetById(ctx context.Context, id models.NamespacedID) (subject.Subject, error)", + "line": 94 + }, + { + "kind": "func", + "name": "GetByKey", + "signature": "func (s *Service) GetByKey(ctx context.Context, key models.NamespacedKey) (subject.Subject, error)", + "line": 103 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *Service) List(ctx context.Context, orgId string, params subject.ListParams) (pagination.Result[subject.Subject], error)", + "line": 112 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (s *Service) Delete(ctx context.Context, id models.NamespacedID) error", + "line": 117 + } + ], + "line_count": 142 + }, + "openmeter/subject/service/service_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Test_SubjectService", + "signature": "func Test_SubjectService(t *testing.T)", + "line": 22 + } + ], + "line_count": 262 + }, + "openmeter/subject/subject.go": { + "header": "\t\"errors\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Subject", + "signature": "type Subject struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s Subject) Validate() error", + "line": 22 + }, + { + "kind": "struct", + "name": "SubjectKey", + "signature": "type SubjectKey struct", + "line": 34 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SubjectKey) Validate() error", + "line": 38 + } + ], + "line_count": 44 + }, + "openmeter/subject/testutils/env.go": { + "header": "\t\"crypto/rand\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 31 + }, + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 39 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 52 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 61 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 83 + } + ], + "line_count": 146 + }, + "openmeter/subscription/addon/README.md": { + "header": "# Subscription Addon\n\nThis package contains the subscription addon related functionality.\n\n## Entity Relationship Diagram\n\n```mermaid\nerDiagram\n Subscription ||--|| SubscriptionAddon : \"has (1:1)\"\n SubscriptionAddon ||--o{ SubscriptionAddonQuantity : \"has (1:N)\"\n SubscriptionAddon ||--o{ SubscriptionAddonRateCard : \"has (1:N) calculated from Addon\"\n Addon ||--|| SubscriptionAddon : \"has (1:1)\"\n\n Subscription {\n string id PK\n }\n\n Addon {\n string id PK\n }", + "symbols": [], + "line_count": 40 + }, + "openmeter/subscription/addon/addon.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddon", + "signature": "type SubscriptionAddon struct", + "line": 15 + }, + { + "kind": "func", + "name": "GetInstanceAt", + "signature": "func (a SubscriptionAddon) GetInstanceAt(t time.Time) (SubscriptionAddonInstance, bool)", + "line": 32 + }, + { + "kind": "func", + "name": "GetInstances", + "signature": "func (a SubscriptionAddon) GetInstances() []SubscriptionAddonInstance", + "line": 49 + }, + { + "kind": "struct", + "name": "CreateSubscriptionAddonInput", + "signature": "type CreateSubscriptionAddonInput struct", + "line": 105 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateSubscriptionAddonInput) Validate() error", + "line": 114 + } + ], + "line_count": 134 + }, + "openmeter/subscription/addon/addon_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubscriptionAddonGetInstances", + "signature": "func TestSubscriptionAddonGetInstances(t *testing.T)", + "line": 17 + } + ], + "line_count": 218 + }, + "openmeter/subscription/addon/diff/README.md": { + "header": "# Subscription Addon Diff Package\n\nThis package implements functionality to apply and restore subscription addons to subscription specifications.\n\n## Core Components\n\n### Diffable Interface (`diff.go`)\nThe central interface for objects that can be both applied to and removed from a subscription specification:\n- `GetApplies()`: Returns operations that will be applied to the specification\n- `GetRestores()`: Returns operations that will be applied to revert changes\n\n### Addon Operations (`addon.go`)\nHandles the conversion of subscription addons into diffable objects that can modify subscription specifications:\n- `GetDiffableFromAddon()`: Creates a diffable object from a subscription addon\n- `diffable`: Wrapper for apply and restore implementations for a single `SubscriptionAddonInstance`\n\n### Application Logic (`apply.go`)\nAlgorithm for applying subscription addon rate cards to subscription specifications. A specification for it is as follows:\n\n1. Given a `SubscriptionAddon`, `SubscriptionAddonInstances` can be created.", + "symbols": [], + "line_count": 33 + }, + "openmeter/subscription/addon/diff/addon.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\tsubscriptionaddon \"github.com/openmeterio/openmeter/openmeter/subscription/addon\"", + "symbols": [ + { + "kind": "func", + "name": "GetDiffableFromAddon", + "signature": "func GetDiffableFromAddon(\n\t_ subscription.SubscriptionView,\n\taddon subscriptionaddon.SubscriptionAddon,\n) (Diffable, error)", + "line": 10 + }, + { + "kind": "struct", + "name": "diffable", + "signature": "type diffable struct", + "line": 52 + }, + { + "kind": "func", + "name": "GetApplies", + "signature": "func (d *diffable) GetApplies() subscription.AppliesToSpec", + "line": 56 + }, + { + "kind": "func", + "name": "GetRestores", + "signature": "func (d *diffable) GetRestores() subscription.AppliesToSpec", + "line": 70 + } + ], + "line_count": 72 + }, + "openmeter/subscription/addon/diff/affected.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "GetAffectedItemIDs", + "signature": "func GetAffectedItemIDs(view subscription.SubscriptionView, addon subscriptionaddon.SubscriptionAddon) map[string][]string", + "line": 12 + } + ], + "line_count": 59 + }, + "openmeter/subscription/addon/diff/apply.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "getApplyForRateCard", + "signature": "func (d *diffable) getApplyForRateCard(rc subscriptionaddon.SubscriptionAddonRateCard) subscription.AppliesToSpec", + "line": 15 + }, + { + "kind": "func", + "name": "setItemRelativeCadence", + "signature": "func (d *diffable) setItemRelativeCadence(item *subscription.SubscriptionItemSpec, phaseCadence models.CadencedModel, target timeutil.OpenPeriod)", + "line": 203 + } + ], + "line_count": 219 + }, + "openmeter/subscription/addon/diff/apply_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestApply", + "signature": "func TestApply(t *testing.T)", + "line": 29 + }, + { + "kind": "func", + "name": "TestApplyWithMultiInstance", + "signature": "func TestApplyWithMultiInstance(t *testing.T)", + "line": 811 + }, + { + "kind": "func", + "name": "lookupTaxCodeID", + "signature": "func lookupTaxCodeID(t *testing.T, deps subscriptiontestutils.SubscriptionDependencies, stripeCode string) *string", + "line": 916 + }, + { + "kind": "func", + "name": "withTaxCodeID", + "signature": "func withTaxCodeID(rc *productcatalog.FlatFeeRateCard, taxCodeID *string) *productcatalog.FlatFeeRateCard", + "line": 930 + }, + { + "kind": "func", + "name": "compareRateCardsWithAmountChange", + "signature": "func compareRateCardsWithAmountChange(t *testing.T, baseTarget *productcatalog.FlatFeeRateCard, targetAmount int, value productcatalog.RateCard, msgAndArgs ...interface{})", + "line": 939 + } + ], + "line_count": 977 + }, + "openmeter/subscription/addon/diff/diff.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n)\ntype Diffable interface {", + "symbols": [ + { + "kind": "interface", + "name": "Diffable", + "signature": "type Diffable interface", + "line": 8 + }, + { + "kind": "struct", + "name": "someDiffable", + "signature": "type someDiffable struct", + "line": 17 + }, + { + "kind": "func", + "name": "GetApplies", + "signature": "func (s *someDiffable) GetApplies() subscription.AppliesToSpec", + "line": 22 + }, + { + "kind": "func", + "name": "GetRestores", + "signature": "func (s *someDiffable) GetRestores() subscription.AppliesToSpec", + "line": 26 + } + ], + "line_count": 28 + }, + "openmeter/subscription/addon/diff/restore.go": { + "header": "\t\"fmt\"\n\t\"reflect\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "restore", + "signature": "func (d *diffable) restore() subscription.AppliesToSpec", + "line": 15 + } + ], + "line_count": 158 + }, + "openmeter/subscription/addon/diff/restore_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRestore", + "signature": "func TestRestore(t *testing.T)", + "line": 26 + }, + { + "kind": "struct", + "name": "buildRes", + "signature": "type buildRes struct", + "line": 681 + }, + { + "kind": "func", + "name": "buildSubAndAddon", + "signature": "func buildSubAndAddon(\n\tt *testing.T,\n\tdeps *subscriptiontestutils.SubscriptionDependencies,\n\tplanInp plan.CreatePlanInput,\n\taddonInp addon.CreateAddonInput,\n\tsubsAddCadence models.CadencedModel,\n) *buildRes", + "line": 688 + }, + { + "kind": "func", + "name": "buildSubAndMultiInstanceAddon", + "signature": "func buildSubAndMultiInstanceAddon(\n\tt *testing.T,\n\tdeps *subscriptiontestutils.SubscriptionDependencies,\n\tplanInp plan.CreatePlanInput,\n\taddonInp addon.CreateAddonInput,\n\tquants []subscriptionaddon.CreateSubscriptionAddonQuantityInput,\n) *buildRes", + "line": 721 + } + ], + "line_count": 752 + }, + "openmeter/subscription/addon/diff/zeroratecard.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/entitlement\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "zeroRateCardCheck", + "signature": "type zeroRateCardCheck struct", + "line": 14 + }, + { + "kind": "func", + "name": "CanDelete", + "signature": "func (z zeroRateCardCheck) CanDelete() bool", + "line": 19 + }, + { + "kind": "func", + "name": "isZeroByContents", + "signature": "func (z zeroRateCardCheck) isZeroByContents() bool", + "line": 27 + }, + { + "kind": "func", + "name": "isZeroByAnnotations", + "signature": "func (z zeroRateCardCheck) isZeroByAnnotations() bool", + "line": 70 + } + ], + "line_count": 74 + }, + "openmeter/subscription/addon/events.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "event", + "signature": "type event struct", + "line": 16 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s event) EventMetadata() metadata.EventMetadata", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s event) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "NewCreatedEvent", + "signature": "func NewCreatedEvent(ctx context.Context, customer customer.Customer, subscriptionAddon SubscriptionAddon) CreatedEvent", + "line": 34 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s CreatedEvent) EventName() string", + "line": 54 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s CreatedEvent) EventMetadata() metadata.EventMetadata", + "line": 58 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s CreatedEvent) Validate() error", + "line": 62 + }, + { + "kind": "func", + "name": "NewChangeQuantityEvent", + "signature": "func NewChangeQuantityEvent(ctx context.Context, customer customer.Customer, subscriptionAddon SubscriptionAddon) ChangeQuantityEvent", + "line": 67 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s ChangeQuantityEvent) EventName() string", + "line": 87 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s ChangeQuantityEvent) EventMetadata() metadata.EventMetadata", + "line": 91 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ChangeQuantityEvent) Validate() error", + "line": 95 + } + ], + "line_count": 97 + }, + "openmeter/subscription/addon/events_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestEvents", + "signature": "func TestEvents(t *testing.T)", + "line": 21 + } + ], + "line_count": 150 + }, + "openmeter/subscription/addon/extend.go": { + "header": "\t\"fmt\"\n\t\"reflect\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "Apply", + "signature": "func (a SubscriptionAddonRateCard) Apply(target productcatalog.RateCard, annotations models.Annotations) error", + "line": 16 + }, + { + "kind": "func", + "name": "Restore", + "signature": "func (a SubscriptionAddonRateCard) Restore(target productcatalog.RateCard, annotations models.Annotations, instanceType productcatalog.AddonInstanceType) error", + "line": 105 + } + ], + "line_count": 214 + }, + "openmeter/subscription/addon/extend_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidations", + "signature": "func TestValidations(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestExtendApply", + "signature": "func TestExtendApply(t *testing.T)", + "line": 227 + }, + { + "kind": "func", + "name": "TestExtendRestore", + "signature": "func TestExtendRestore(t *testing.T)", + "line": 468 + }, + { + "kind": "struct", + "name": "nonPointerRateCard", + "signature": "type nonPointerRateCard struct", + "line": 875 + }, + { + "kind": "func", + "name": "HasFeature", + "signature": "func (n nonPointerRateCard) HasFeature() bool", + "line": 877 + }, + { + "kind": "func", + "name": "GetFeatureID", + "signature": "func (n nonPointerRateCard) GetFeatureID() *string", + "line": 881 + }, + { + "kind": "func", + "name": "GetFeatureKey", + "signature": "func (n nonPointerRateCard) GetFeatureKey() *string", + "line": 885 + }, + { + "kind": "func", + "name": "SetFeature", + "signature": "func (n nonPointerRateCard) SetFeature(_, _ *string)", + "line": 889 + }, + { + "kind": "func", + "name": "IsBillable", + "signature": "func (n nonPointerRateCard) IsBillable() bool", + "line": 894 + }, + { + "kind": "func", + "name": "AsMeta", + "signature": "func (n nonPointerRateCard) AsMeta() productcatalog.RateCardMeta", + "line": 898 + }, + { + "kind": "func", + "name": "ChangeMeta", + "signature": "func (n nonPointerRateCard) ChangeMeta(func(m productcatalog.RateCardMeta) (productcatalog.RateCardMeta, error)) error", + "line": 902 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (n nonPointerRateCard) Clone() productcatalog.RateCard", + "line": 906 + }, + { + "kind": "func", + "name": "Compatible", + "signature": "func (n nonPointerRateCard) Compatible(productcatalog.RateCard) error", + "line": 910 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (n nonPointerRateCard) Equal(productcatalog.RateCard) bool", + "line": 914 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (n nonPointerRateCard) Validate() error", + "line": 918 + }, + { + "kind": "func", + "name": "GetBillingCadence", + "signature": "func (n nonPointerRateCard) GetBillingCadence() *datetime.ISODuration", + "line": 922 + }, + { + "kind": "func", + "name": "Key", + "signature": "func (n nonPointerRateCard) Key() string", + "line": 926 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (n nonPointerRateCard) Merge(productcatalog.RateCard) error", + "line": 930 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (n nonPointerRateCard) Type() productcatalog.RateCardType", + "line": 934 + }, + { + "kind": "func", + "name": "getTestAddonRateCard", + "signature": "func getTestAddonRateCard(rc productcatalog.RateCard) subscriptionaddon.SubscriptionAddonRateCard", + "line": 938 + } + ], + "line_count": 944 + }, + "openmeter/subscription/addon/http/create.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "CreateSubscriptionAddon", + "signature": "func (h *handler) CreateSubscriptionAddon() CreateSubscriptionAddonHandler", + "line": 31 + } + ], + "line_count": 97 + }, + "openmeter/subscription/addon/http/get.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "GetSubscriptionAddon", + "signature": "func (h *handler) GetSubscriptionAddon() GetSubscriptionAddonHandler", + "line": 28 + } + ], + "line_count": 62 + }, + "openmeter/subscription/addon/http/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 17 + }, + { + "kind": "struct", + "name": "HandlerConfig", + "signature": "type HandlerConfig struct", + "line": 24 + }, + { + "kind": "func", + "name": "NewHandler", + "signature": "func NewHandler(config HandlerConfig, options ...httptransport.HandlerOption) Handler", + "line": 32 + }, + { + "kind": "struct", + "name": "handler", + "signature": "type handler struct", + "line": 39 + }, + { + "kind": "func", + "name": "resolveNamespace", + "signature": "func (h *handler) resolveNamespace(ctx context.Context) (string, error)", + "line": 44 + } + ], + "line_count": 51 + }, + "openmeter/subscription/addon/http/list.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "ListSubscriptionAddons", + "signature": "func (h *handler) ListSubscriptionAddons() ListSubscriptionAddonsHandler", + "line": 27 + } + ], + "line_count": 65 + }, + "openmeter/subscription/addon/http/mapping.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "MapCreateSubscriptionAddonRequestToInput", + "signature": "func MapCreateSubscriptionAddonRequestToInput(req api.SubscriptionAddonCreate) (subscriptionworkflow.AddAddonWorkflowInput, error)", + "line": 21 + }, + { + "kind": "func", + "name": "MapSubscriptionAddonToResponse", + "signature": "func MapSubscriptionAddonToResponse(view subscription.SubscriptionView, addon subscriptionaddon.SubscriptionAddon) (api.SubscriptionAddon, error)", + "line": 40 + } + ], + "line_count": 110 + }, + "openmeter/subscription/addon/http/update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "UpdateSubscriptionAddon", + "signature": "func (h *handler) UpdateSubscriptionAddon() UpdateSubscriptionAddonHandler", + "line": 29 + } + ], + "line_count": 83 + }, + "openmeter/subscription/addon/instance.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/addon\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonInstance", + "signature": "type SubscriptionAddonInstance struct", + "line": 10 + } + ], + "line_count": 25 + }, + "openmeter/subscription/addon/quantity.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonQuantity", + "signature": "type SubscriptionAddonQuantity struct", + "line": 11 + }, + { + "kind": "func", + "name": "AsTimed", + "signature": "func (q SubscriptionAddonQuantity) AsTimed() timeutil.Timed[SubscriptionAddonQuantity]", + "line": 19 + }, + { + "kind": "struct", + "name": "CreateSubscriptionAddonQuantityInput", + "signature": "type CreateSubscriptionAddonQuantityInput struct", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateSubscriptionAddonQuantityInput) Validate() error", + "line": 30 + } + ], + "line_count": 42 + }, + "openmeter/subscription/addon/ratecard.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/productcatalog/addon\"\n)\ntype SubscriptionAddonRateCard struct {", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionAddonRateCard", + "signature": "type SubscriptionAddonRateCard struct", + "line": 7 + } + ], + "line_count": 9 + }, + "openmeter/subscription/addon/repo/mapping.go": { + "header": "\t\"errors\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "MapSubscriptionAddon", + "signature": "func MapSubscriptionAddon(\n\tentity *db.SubscriptionAddon,\n) (subscriptionaddon.SubscriptionAddon, error)", + "line": 17 + }, + { + "kind": "func", + "name": "MapSubscriptionAddons", + "signature": "func MapSubscriptionAddons(entities []*db.SubscriptionAddon) ([]subscriptionaddon.SubscriptionAddon, error)", + "line": 67 + }, + { + "kind": "func", + "name": "MapSubscriptionAddonRateCard", + "signature": "func MapSubscriptionAddonRateCard(entity *db.AddonRateCard) (subscriptionaddon.SubscriptionAddonRateCard, error)", + "line": 74 + }, + { + "kind": "func", + "name": "MapSubscriptionAddonRateCards", + "signature": "func MapSubscriptionAddonRateCards(entities []*db.AddonRateCard) ([]subscriptionaddon.SubscriptionAddonRateCard, error)", + "line": 96 + }, + { + "kind": "func", + "name": "MapSubscriptionAddonQuantity", + "signature": "func MapSubscriptionAddonQuantity(entity *db.SubscriptionAddonQuantity) subscriptionaddon.SubscriptionAddonQuantity", + "line": 103 + }, + { + "kind": "func", + "name": "MapSubscriptionAddonQuantities", + "signature": "func MapSubscriptionAddonQuantities(entities []*db.SubscriptionAddonQuantity) []subscriptionaddon.SubscriptionAddonQuantity", + "line": 120 + } + ], + "line_count": 126 + }, + "openmeter/subscription/addon/repo/subscriptionaddon.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "struct", + "name": "subscriptionAddonRepo", + "signature": "type subscriptionAddonRepo struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewSubscriptionAddonRepo", + "signature": "func NewSubscriptionAddonRepo(db *db.Client) *subscriptionAddonRepo", + "line": 23 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (r *subscriptionAddonRepo) Create(ctx context.Context, namespace string, input subscriptionaddon.CreateSubscriptionAddonRepositoryInput) (*models.NamespacedID, error)", + "line": 30 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (r *subscriptionAddonRepo) Get(ctx context.Context, params subscriptionaddon.GetSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 54 + }, + { + "kind": "func", + "name": "List", + "signature": "func (r *subscriptionAddonRepo) List(ctx context.Context, namespace string, filter subscriptionaddon.ListSubscriptionAddonRepositoryInput) (pagination.Result[subscriptionaddon.SubscriptionAddon], error)", + "line": 87 + }, + { + "kind": "func", + "name": "querySubscriptionAddon", + "signature": "func querySubscriptionAddon(query *db.SubscriptionAddonQuery) *db.SubscriptionAddonQuery", + "line": 138 + } + ], + "line_count": 152 + }, + "openmeter/subscription/addon/repo/subscriptionaddonquantity.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"\n\tsubscriptionaddon \"github.com/openmeterio/openmeter/openmeter/subscription/addon\"", + "symbols": [ + { + "kind": "struct", + "name": "subscriptionAddonQuantityRepo", + "signature": "type subscriptionAddonQuantityRepo struct", + "line": 12 + }, + { + "kind": "func", + "name": "NewSubscriptionAddonQuantityRepo", + "signature": "func NewSubscriptionAddonQuantityRepo(db *db.Client) *subscriptionAddonQuantityRepo", + "line": 18 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (r *subscriptionAddonQuantityRepo) Create(ctx context.Context, subscriptionAddonID models.NamespacedID, input subscriptionaddon.CreateSubscriptionAddonQuantityRepositoryInput) (*subscriptionaddon.SubscriptionAddonQuantity, error)", + "line": 25 + } + ], + "line_count": 40 + }, + "openmeter/subscription/addon/repo/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Tx", + "signature": "func (r *subscriptionAddonRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 15 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *subscriptionAddonRepo) Self() *subscriptionAddonRepo", + "line": 25 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *subscriptionAddonRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionAddonRepo", + "line": 29 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *subscriptionAddonQuantityRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 36 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *subscriptionAddonQuantityRepo) Self() *subscriptionAddonQuantityRepo", + "line": 46 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *subscriptionAddonQuantityRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionAddonQuantityRepo", + "line": 50 + } + ], + "line_count": 53 + }, + "openmeter/subscription/addon/repository.go": { + "header": "\t\"context\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateSubscriptionAddonRepositoryInput", + "signature": "type CreateSubscriptionAddonRepositoryInput struct", + "line": 13 + }, + { + "kind": "struct", + "name": "ListSubscriptionAddonRepositoryInput", + "signature": "type ListSubscriptionAddonRepositoryInput struct", + "line": 23 + }, + { + "kind": "interface", + "name": "SubscriptionAddonRepository", + "signature": "type SubscriptionAddonRepository interface", + "line": 32 + }, + { + "kind": "struct", + "name": "CreateSubscriptionAddonQuantityRepositoryInput", + "signature": "type CreateSubscriptionAddonQuantityRepositoryInput struct", + "line": 39 + }, + { + "kind": "interface", + "name": "SubscriptionAddonQuantityRepository", + "signature": "type SubscriptionAddonQuantityRepository interface", + "line": 44 + } + ], + "line_count": 46 + }, + "openmeter/subscription/addon/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (f OrderBy) Values() []OrderBy", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f OrderBy) Validate() error", + "line": 30 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 38 + }, + { + "kind": "struct", + "name": "ListSubscriptionAddonsInput", + "signature": "type ListSubscriptionAddonsInput struct", + "line": 46 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListSubscriptionAddonsInput) Validate() error", + "line": 55 + }, + { + "kind": "struct", + "name": "GetSubscriptionAddonInput", + "signature": "type GetSubscriptionAddonInput struct", + "line": 73 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetSubscriptionAddonInput) Validate() error", + "line": 80 + } + ], + "line_count": 88 + }, + "openmeter/subscription/addon/service/change_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddonServiceChangeQuantity", + "signature": "func TestAddonServiceChangeQuantity(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "createExampleSubscriptionAddon", + "signature": "func createExampleSubscriptionAddon(t *testing.T, deps subscriptiontestutils.SubscriptionDependencies, now time.Time) *subscriptionaddon.SubscriptionAddon", + "line": 186 + } + ], + "line_count": 231 + }, + "openmeter/subscription/addon/service/create_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddonServiceCreate", + "signature": "func TestAddonServiceCreate(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "createPlanWithAddon", + "signature": "func createPlanWithAddon(\n\tt *testing.T,\n\tdeps subscriptiontestutils.SubscriptionDependencies,\n\tplanInp plan.CreatePlanInput,\n\taddonInp addon.CreateAddonInput,\n) (subscription.Plan, addon.Addon)", + "line": 515 + }, + { + "kind": "func", + "name": "createExampleSubscription", + "signature": "func createExampleSubscription(t *testing.T, deps subscriptiontestutils.SubscriptionDependencies, currentTime time.Time) subscription.SubscriptionView", + "line": 556 + }, + { + "kind": "func", + "name": "withDeps", + "signature": "func withDeps(t *testing.T, fn func(t *testing.T, deps subscriptiontestutils.SubscriptionDependencies))", + "line": 579 + } + ], + "line_count": 587 + }, + "openmeter/subscription/addon/service/list_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddonServiceGet", + "signature": "func TestAddonServiceGet(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestAddonServiceList", + "signature": "func TestAddonServiceList(t *testing.T)", + "line": 77 + } + ], + "line_count": 244 + }, + "openmeter/subscription/addon/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 20 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 35 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 67 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(\n\tcfg Config,\n) (subscriptionaddon.Service, error)", + "line": 73 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, ns string, input subscriptionaddon.CreateSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 86 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (s *service) Get(ctx context.Context, params subscriptionaddon.GetSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 203 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *service) List(ctx context.Context, ns string, input subscriptionaddon.ListSubscriptionAddonsInput) (pagination.Result[subscriptionaddon.SubscriptionAddon], error)", + "line": 211 + }, + { + "kind": "func", + "name": "ChangeQuantity", + "signature": "func (s *service) ChangeQuantity(ctx context.Context, id models.NamespacedID, input subscriptionaddon.CreateSubscriptionAddonQuantityInput) (*subscriptionaddon.SubscriptionAddon, error)", + "line": 221 + } + ], + "line_count": 321 + }, + "openmeter/subscription/annotations.go": { + "header": "\t\"errors\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "annotationParser", + "signature": "type annotationParser struct", + "line": 28 + }, + { + "kind": "func", + "name": "HasSubscription", + "signature": "func (a annotationParser) HasSubscription(annotations models.Annotations) bool", + "line": 32 + }, + { + "kind": "func", + "name": "ListOwnerSubSystems", + "signature": "func (a annotationParser) ListOwnerSubSystems(annotations models.Annotations) []string", + "line": 37 + }, + { + "kind": "func", + "name": "AddOwnerSubSystem", + "signature": "func (a annotationParser) AddOwnerSubSystem(annotations models.Annotations, system string) (models.Annotations, error)", + "line": 64 + }, + { + "kind": "func", + "name": "GetBooleanEntitlementCount", + "signature": "func (a annotationParser) GetBooleanEntitlementCount(annotations models.Annotations) int", + "line": 80 + }, + { + "kind": "func", + "name": "SetBooleanEntitlementCount", + "signature": "func (a annotationParser) SetBooleanEntitlementCount(annotations models.Annotations, count int) (models.Annotations, error)", + "line": 99 + }, + { + "kind": "func", + "name": "GetPreviousSubscriptionID", + "signature": "func (a annotationParser) GetPreviousSubscriptionID(annotations models.Annotations) *string", + "line": 107 + }, + { + "kind": "func", + "name": "SetPreviousSubscriptionID", + "signature": "func (a annotationParser) SetPreviousSubscriptionID(annotations models.Annotations, subscriptionID string) (models.Annotations, error)", + "line": 125 + }, + { + "kind": "func", + "name": "GetSupersedingSubscriptionID", + "signature": "func (a annotationParser) GetSupersedingSubscriptionID(annotations models.Annotations) *string", + "line": 133 + }, + { + "kind": "func", + "name": "SetSupersedingSubscriptionID", + "signature": "func (a annotationParser) SetSupersedingSubscriptionID(annotations models.Annotations, subscriptionID string) (models.Annotations, error)", + "line": 151 + }, + { + "kind": "func", + "name": "ClearSupersedingSubscriptionID", + "signature": "func (a annotationParser) ClearSupersedingSubscriptionID(annotations models.Annotations) (models.Annotations, error)", + "line": 159 + } + ], + "line_count": 165 + }, + "openmeter/subscription/apply.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "ApplyContext", + "signature": "type ApplyContext struct", + "line": 15 + }, + { + "kind": "interface", + "name": "AppliesToSpec", + "signature": "type AppliesToSpec interface", + "line": 20 + }, + { + "kind": "func", + "name": "AllowedDuringApplyingToSpecError", + "signature": "func AllowedDuringApplyingToSpecError() models.ValidationIssueOption", + "line": 31 + }, + { + "kind": "func", + "name": "NewAppliesToSpec", + "signature": "func NewAppliesToSpec(fn func(spec *SubscriptionSpec, actx ApplyContext) error) AppliesToSpec", + "line": 35 + }, + { + "kind": "struct", + "name": "someAppliesToSpec", + "signature": "type someAppliesToSpec struct", + "line": 43 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (s *someAppliesToSpec) ApplyTo(spec *SubscriptionSpec, actx ApplyContext) error", + "line": 47 + }, + { + "kind": "func", + "name": "NewAggregateAppliesToSpec", + "signature": "func NewAggregateAppliesToSpec(applieses []AppliesToSpec) AppliesToSpec", + "line": 52 + } + ], + "line_count": 78 + }, + "openmeter/subscription/billing.go": { + "header": "type BillingBehaviorOverride struct {\n\tRestartBillingPeriod *bool `json:\"restartBillingPeriod,omitempty\"`\n}", + "symbols": [ + { + "kind": "struct", + "name": "BillingBehaviorOverride", + "signature": "type BillingBehaviorOverride struct", + "line": 3 + } + ], + "line_count": 11 + }, + "openmeter/subscription/context.go": { + "header": "type contextKey string\nconst (\n\tsubscriptionoperation contextKey = \"subscriptionoperation\"", + "symbols": [ + { + "kind": "func", + "name": "NewSubscriptionOperationContext", + "signature": "func NewSubscriptionOperationContext(ctx context.Context) context.Context", + "line": 11 + }, + { + "kind": "func", + "name": "IsSubscriptionOperation", + "signature": "func IsSubscriptionOperation(ctx context.Context) bool", + "line": 15 + } + ], + "line_count": 22 + }, + "openmeter/subscription/entitlement.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionEntitlement", + "signature": "type SubscriptionEntitlement struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SubscriptionEntitlement) Validate() error", + "line": 17 + }, + { + "kind": "func", + "name": "ToScheduleSubscriptionEntitlementInput", + "signature": "func (s SubscriptionEntitlement) ToScheduleSubscriptionEntitlementInput() ScheduleSubscriptionEntitlementInput", + "line": 39 + }, + { + "kind": "struct", + "name": "ScheduleSubscriptionEntitlementInput", + "signature": "type ScheduleSubscriptionEntitlementInput struct", + "line": 45 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (s ScheduleSubscriptionEntitlementInput) Equal(other ScheduleSubscriptionEntitlementInput) bool", + "line": 50 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ScheduleSubscriptionEntitlementInput) Validate() error", + "line": 54 + }, + { + "kind": "interface", + "name": "EntitlementAdapter", + "signature": "type EntitlementAdapter interface", + "line": 66 + } + ], + "line_count": 72 + }, + "openmeter/subscription/entitlement/adapter.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "EntitlementSubscriptionAdapter", + "signature": "type EntitlementSubscriptionAdapter struct", + "line": 18 + }, + { + "kind": "func", + "name": "NewSubscriptionEntitlementAdapter", + "signature": "func NewSubscriptionEntitlementAdapter(\n\tentitlementConnector entitlement.Service,\n\titemRepo subscription.SubscriptionItemRepository,\n\ttxCreator transaction.Creator,\n) *EntitlementSubscriptionAdapter", + "line": 26 + }, + { + "kind": "func", + "name": "ScheduleEntitlement", + "signature": "func (a *EntitlementSubscriptionAdapter) ScheduleEntitlement(ctx context.Context, input subscription.ScheduleSubscriptionEntitlementInput, annotations models.Annotations) (*subscription.SubscriptionEntitlement, error)", + "line": 39 + }, + { + "kind": "func", + "name": "GetForSubscriptionsAt", + "signature": "func (a *EntitlementSubscriptionAdapter) GetForSubscriptionsAt(ctx context.Context, input []subscription.GetForSubscriptionAtInput) ([]subscription.SubscriptionEntitlement, error)", + "line": 79 + }, + { + "kind": "func", + "name": "DeleteByItemID", + "signature": "func (a *EntitlementSubscriptionAdapter) DeleteByItemID(ctx context.Context, id models.NamespacedID) error", + "line": 123 + } + ], + "line_count": 135 + }, + "openmeter/subscription/entitlement/errors.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 10 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 15 + } + ], + "line_count": 28 + }, + "openmeter/subscription/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewErrSubscriptionBillingPeriodQueriedBeforeSubscriptionStart", + "signature": "func NewErrSubscriptionBillingPeriodQueriedBeforeSubscriptionStart(queriedAt, subscriptionStart time.Time) error", + "line": 26 + }, + { + "kind": "func", + "name": "IsErrSubscriptionBillingPeriodQueriedBeforeSubscriptionStart", + "signature": "func IsErrSubscriptionBillingPeriodQueriedBeforeSubscriptionStart(err error) bool", + "line": 30 + }, + { + "kind": "func", + "name": "IsValidationIssueWithCode", + "signature": "func IsValidationIssueWithCode(err error, code models.ErrorCode) bool", + "line": 54 + }, + { + "kind": "func", + "name": "IsValidationIssueWithBoolAttr", + "signature": "func IsValidationIssueWithBoolAttr(err error, attrName string) bool", + "line": 67 + }, + { + "kind": "func", + "name": "NewSubscriptionNotFoundError", + "signature": "func NewSubscriptionNotFoundError(id string) error", + "line": 177 + }, + { + "kind": "struct", + "name": "SubscriptionNotFoundError", + "signature": "type SubscriptionNotFoundError struct", + "line": 188 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *SubscriptionNotFoundError) Error() string", + "line": 193 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *SubscriptionNotFoundError) Unwrap() error", + "line": 198 + }, + { + "kind": "func", + "name": "IsSubscriptionNotFoundError", + "signature": "func IsSubscriptionNotFoundError(err error) bool", + "line": 203 + }, + { + "kind": "func", + "name": "NewPhaseNotFoundError", + "signature": "func NewPhaseNotFoundError(phaseId string) error", + "line": 214 + }, + { + "kind": "struct", + "name": "PhaseNotFoundError", + "signature": "type PhaseNotFoundError struct", + "line": 225 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *PhaseNotFoundError) Error() string", + "line": 230 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *PhaseNotFoundError) Unwrap() error", + "line": 235 + }, + { + "kind": "func", + "name": "IsPhaseNotFoundError", + "signature": "func IsPhaseNotFoundError(err error) bool", + "line": 240 + }, + { + "kind": "func", + "name": "NewItemNotFoundError", + "signature": "func NewItemNotFoundError(itemId string) error", + "line": 251 + }, + { + "kind": "struct", + "name": "ItemNotFoundError", + "signature": "type ItemNotFoundError struct", + "line": 262 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ItemNotFoundError) Error() string", + "line": 267 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ItemNotFoundError) Unwrap() error", + "line": 272 + }, + { + "kind": "func", + "name": "IsItemNotFoundError", + "signature": "func IsItemNotFoundError(err error) bool", + "line": 277 + } + ], + "line_count": 285 + }, + "openmeter/subscription/errors_test.go": { + "header": "\t\"encoding/json\"\n\t\"net/http\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubscriptionErrors", + "signature": "func TestSubscriptionErrors(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestSubscriptionSpecValidation", + "signature": "func TestSubscriptionSpecValidation(t *testing.T)", + "line": 45 + } + ], + "line_count": 397 + }, + "openmeter/subscription/events.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "viewEvent", + "signature": "type viewEvent struct", + "line": 16 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s viewEvent) EventMetadata() metadata.EventMetadata", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s viewEvent) Validate() error", + "line": 28 + }, + { + "kind": "func", + "name": "NewCreatedEvent", + "signature": "func NewCreatedEvent(ctx context.Context, view SubscriptionView) CreatedEvent", + "line": 33 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s CreatedEvent) EventName() string", + "line": 52 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s CreatedEvent) EventMetadata() metadata.EventMetadata", + "line": 56 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s CreatedEvent) Validate() error", + "line": 60 + }, + { + "kind": "func", + "name": "NewDeletedEvent", + "signature": "func NewDeletedEvent(ctx context.Context, view SubscriptionView) DeletedEvent", + "line": 65 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s DeletedEvent) EventName() string", + "line": 84 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s DeletedEvent) EventMetadata() metadata.EventMetadata", + "line": 88 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s DeletedEvent) Validate() error", + "line": 92 + }, + { + "kind": "func", + "name": "NewCancelledEvent", + "signature": "func NewCancelledEvent(ctx context.Context, view SubscriptionView) CancelledEvent", + "line": 97 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s CancelledEvent) EventName() string", + "line": 116 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s CancelledEvent) EventMetadata() metadata.EventMetadata", + "line": 120 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s CancelledEvent) Validate() error", + "line": 124 + }, + { + "kind": "func", + "name": "NewContinuedEvent", + "signature": "func NewContinuedEvent(ctx context.Context, view SubscriptionView) ContinuedEvent", + "line": 129 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s ContinuedEvent) EventName() string", + "line": 148 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s ContinuedEvent) EventMetadata() metadata.EventMetadata", + "line": 152 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s ContinuedEvent) Validate() error", + "line": 156 + }, + { + "kind": "func", + "name": "NewUpdatedEvent", + "signature": "func NewUpdatedEvent(ctx context.Context, view SubscriptionView) UpdatedEvent", + "line": 161 + }, + { + "kind": "struct", + "name": "UpdatedEvent", + "signature": "type UpdatedEvent struct", + "line": 168 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s UpdatedEvent) EventName() string", + "line": 184 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s UpdatedEvent) EventMetadata() metadata.EventMetadata", + "line": 188 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s UpdatedEvent) Validate() error", + "line": 195 + }, + { + "kind": "struct", + "name": "SubscriptionSyncEvent", + "signature": "type SubscriptionSyncEvent struct", + "line": 199 + }, + { + "kind": "func", + "name": "NewSubscriptionSyncEvent", + "signature": "func NewSubscriptionSyncEvent(ctx context.Context, sub Subscription) SubscriptionSyncEvent", + "line": 203 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (s SubscriptionSyncEvent) EventName() string", + "line": 219 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SubscriptionSyncEvent) Validate() error", + "line": 223 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (s SubscriptionSyncEvent) EventMetadata() metadata.EventMetadata", + "line": 237 + } + ], + "line_count": 242 + }, + "openmeter/subscription/featureflag.go": { + "header": "const MultiSubscriptionEnabledFF = ffx.Feature(\"multi-subscription-enabled\")", + "symbols": [], + "line_count": 5 + }, + "openmeter/subscription/fielddescriptormapper.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "MapSubscriptionSpecValidationIssueField", + "signature": "func MapSubscriptionSpecValidationIssueField(iss models.ValidationIssue) (models.ValidationIssue, error)", + "line": 19 + }, + { + "kind": "func", + "name": "mapPhaseDescriptor", + "signature": "func mapPhaseDescriptor(t *models.FieldDescriptorTree, current *models.FieldDescriptor) (bool, error)", + "line": 56 + } + ], + "line_count": 90 + }, + "openmeter/subscription/hook.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "SubscriptionCommandHook", + "signature": "type SubscriptionCommandHook interface", + "line": 9 + }, + { + "kind": "struct", + "name": "NoOpSubscriptionCommandHook", + "signature": "type NoOpSubscriptionCommandHook struct", + "line": 25 + } + ], + "line_count": 57 + }, + "openmeter/subscription/hooks/annotations/hook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "AnnotationCleanupHook", + "signature": "type AnnotationCleanupHook struct", + "line": 15 + }, + { + "kind": "func", + "name": "NewAnnotationCleanupHook", + "signature": "func NewAnnotationCleanupHook(subscriptionQueryService subscription.QueryService, subscriptionRepository subscription.SubscriptionRepository, logger *slog.Logger) (*AnnotationCleanupHook, error)", + "line": 23 + }, + { + "kind": "func", + "name": "BeforeDelete", + "signature": "func (h *AnnotationCleanupHook) BeforeDelete(ctx context.Context, view subscription.SubscriptionView) error", + "line": 43 + }, + { + "kind": "func", + "name": "updateSupersedingSubscriptionAnnotations", + "signature": "func (h *AnnotationCleanupHook) updateSupersedingSubscriptionAnnotations(ctx context.Context, view subscription.SubscriptionView) error", + "line": 53 + }, + { + "kind": "func", + "name": "updatePreviousSubscriptionAnnotations", + "signature": "func (h *AnnotationCleanupHook) updatePreviousSubscriptionAnnotations(ctx context.Context, view subscription.SubscriptionView) error", + "line": 119 + } + ], + "line_count": 184 + }, + "openmeter/subscription/item.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionItem", + "signature": "type SubscriptionItem struct", + "line": 12 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (i *SubscriptionItem) UnmarshalJSON(b []byte) error", + "line": 46 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (i SubscriptionItem) GetCadence(phaseCadence models.CadencedModel) models.CadencedModel", + "line": 116 + }, + { + "kind": "func", + "name": "AsEntityInput", + "signature": "func (i SubscriptionItem) AsEntityInput() CreateSubscriptionItemEntityInput", + "line": 139 + }, + { + "kind": "struct", + "name": "SubscriptionItemRef", + "signature": "type SubscriptionItemRef struct", + "line": 160 + }, + { + "kind": "func", + "name": "Equals", + "signature": "func (r SubscriptionItemRef) Equals(r2 SubscriptionItemRef) bool", + "line": 166 + } + ], + "line_count": 177 + }, + "openmeter/subscription/list.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (o OrderBy) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "ListSubscriptionsInput", + "signature": "type ListSubscriptionsInput struct", + "line": 31 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListSubscriptionsInput) Validate() error", + "line": 49 + } + ], + "line_count": 103 + }, + "openmeter/subscription/locks.go": { + "header": "func GetCustomerLock(customerId string) (lockr.Key, error) {\n\treturn lockr.NewKey(\"customer\", customerId, \"subscription\")\n}", + "symbols": [ + { + "kind": "func", + "name": "GetCustomerLock", + "signature": "func GetCustomerLock(customerId string) (lockr.Key, error)", + "line": 5 + } + ], + "line_count": 7 + }, + "openmeter/subscription/patch.go": { + "header": "\t\"fmt\"\n)\ntype PatchConflictError struct {", + "symbols": [ + { + "kind": "struct", + "name": "PatchConflictError", + "signature": "type PatchConflictError struct", + "line": 7 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *PatchConflictError) Error() string", + "line": 11 + }, + { + "kind": "struct", + "name": "PatchValidationError", + "signature": "type PatchValidationError struct", + "line": 15 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *PatchValidationError) Error() string", + "line": 19 + }, + { + "kind": "struct", + "name": "PatchForbiddenError", + "signature": "type PatchForbiddenError struct", + "line": 23 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *PatchForbiddenError) Error() string", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o PatchOperation) Validate() error", + "line": 40 + }, + { + "kind": "interface", + "name": "Patch", + "signature": "type Patch interface", + "line": 49 + }, + { + "kind": "interface", + "name": "AnyValuePatch", + "signature": "type AnyValuePatch interface", + "line": 56 + }, + { + "kind": "func", + "name": "ToApplies", + "signature": "func ToApplies(p Patch, _ int) AppliesToSpec", + "line": 66 + } + ], + "line_count": 68 + }, + "openmeter/subscription/patch/additem.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchAddItem", + "signature": "type PatchAddItem struct", + "line": 11 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (a PatchAddItem) Op() subscription.PatchOperation", + "line": 17 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (a PatchAddItem) Path() subscription.SpecPath", + "line": 21 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (a PatchAddItem) Value() subscription.SubscriptionItemSpec", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a PatchAddItem) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "FieldDescriptor", + "signature": "func (a PatchAddItem) FieldDescriptor() *models.FieldDescriptor", + "line": 45 + }, + { + "kind": "func", + "name": "ValueAsAny", + "signature": "func (a PatchAddItem) ValueAsAny() any", + "line": 58 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (a PatchAddItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 64 + } + ], + "line_count": 169 + }, + "openmeter/subscription/patch/additem_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddItem", + "signature": "func TestAddItem(t *testing.T)", + "line": 19 + } + ], + "line_count": 289 + }, + "openmeter/subscription/patch/addphase.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchAddPhase", + "signature": "type PatchAddPhase struct", + "line": 10 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (a PatchAddPhase) Op() subscription.PatchOperation", + "line": 15 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (a PatchAddPhase) Path() subscription.SpecPath", + "line": 19 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (a PatchAddPhase) Value() subscription.CreateSubscriptionPhaseInput", + "line": 23 + }, + { + "kind": "func", + "name": "ValueAsAny", + "signature": "func (a PatchAddPhase) ValueAsAny() any", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (a PatchAddPhase) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (a PatchAddPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 49 + } + ], + "line_count": 109 + }, + "openmeter/subscription/patch/patch_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestRemoveAdd", + "signature": "func TestRemoveAdd(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "getDefaultSpec", + "signature": "func getDefaultSpec(t *testing.T, activeFrom time.Time) (*subscription.SubscriptionSpec, *psubs.Plan)", + "line": 199 + } + ], + "line_count": 216 + }, + "openmeter/subscription/patch/removeitem.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchRemoveItem", + "signature": "type PatchRemoveItem struct", + "line": 10 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (r PatchRemoveItem) Op() subscription.PatchOperation", + "line": 15 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (r PatchRemoveItem) Path() subscription.SpecPath", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r PatchRemoveItem) Validate() error", + "line": 23 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (r PatchRemoveItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 38 + } + ], + "line_count": 86 + }, + "openmeter/subscription/patch/removeitem_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestRemoveItem", + "signature": "func TestRemoveItem(t *testing.T)", + "line": 17 + } + ], + "line_count": 237 + }, + "openmeter/subscription/patch/removephase.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchRemovePhase", + "signature": "type PatchRemovePhase struct", + "line": 10 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (r PatchRemovePhase) Op() subscription.PatchOperation", + "line": 15 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (r PatchRemovePhase) Path() subscription.SpecPath", + "line": 19 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (r PatchRemovePhase) Value() subscription.RemoveSubscriptionPhaseInput", + "line": 23 + }, + { + "kind": "func", + "name": "ValueAsAny", + "signature": "func (r PatchRemovePhase) ValueAsAny() any", + "line": 27 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r PatchRemovePhase) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (r PatchRemovePhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 45 + } + ], + "line_count": 108 + }, + "openmeter/subscription/patch/stretchphase.go": { + "header": "\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/datetime\"", + "symbols": [ + { + "kind": "struct", + "name": "PatchStretchPhase", + "signature": "type PatchStretchPhase struct", + "line": 10 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p PatchStretchPhase) Op() subscription.PatchOperation", + "line": 16 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (p PatchStretchPhase) Path() subscription.SpecPath", + "line": 20 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (p PatchStretchPhase) Value() datetime.ISODuration", + "line": 24 + }, + { + "kind": "func", + "name": "ValueAsAny", + "signature": "func (p PatchStretchPhase) ValueAsAny() any", + "line": 28 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchStretchPhase) Validate() error", + "line": 32 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (p PatchStretchPhase) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 50 + } + ], + "line_count": 109 + }, + "openmeter/subscription/patch/stretchphase_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "TestStretchPhase", + "signature": "func TestStretchPhase(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestASD", + "signature": "func TestASD(t *testing.T)", + "line": 213 + } + ], + "line_count": 225 + }, + "openmeter/subscription/patch/unscheduleedit.go": { + "header": "\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n)\ntype PatchUnscheduleEdit struct{}", + "symbols": [ + { + "kind": "struct", + "name": "PatchUnscheduleEdit", + "signature": "type PatchUnscheduleEdit struct", + "line": 7 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p PatchUnscheduleEdit) Op() subscription.PatchOperation", + "line": 9 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (p PatchUnscheduleEdit) Path() subscription.SpecPath", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p PatchUnscheduleEdit) Validate() error", + "line": 17 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (p PatchUnscheduleEdit) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error", + "line": 40 + } + ], + "line_count": 66 + }, + "openmeter/subscription/patch/unscheduleedit_test.go": { + "header": "\t\"testing\"\n\t\"github.com/samber/lo\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestUnscheduleEdit", + "signature": "func TestUnscheduleEdit(t *testing.T)", + "line": 17 + } + ], + "line_count": 173 + }, + "openmeter/subscription/patch_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "TestPathRelations", + "signature": "func TestPathRelations(t *testing.T)", + "line": 11 + } + ], + "line_count": 40 + }, + "openmeter/subscription/phase.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionPhase", + "signature": "type SubscriptionPhase struct", + "line": 9 + } + ], + "line_count": 30 + }, + "openmeter/subscription/plan.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/currencyx\"", + "symbols": [ + { + "kind": "struct", + "name": "PlanRef", + "signature": "type PlanRef struct", + "line": 11 + }, + { + "kind": "func", + "name": "GetPath", + "signature": "func (p PlanRef) GetPath() SpecPath", + "line": 17 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p PlanRef) Equal(p2 PlanRef) bool", + "line": 21 + }, + { + "kind": "func", + "name": "NilEqual", + "signature": "func (p *PlanRef) NilEqual(p2 *PlanRef) bool", + "line": 34 + }, + { + "kind": "interface", + "name": "PlanRateCard", + "signature": "type PlanRateCard interface", + "line": 46 + }, + { + "kind": "interface", + "name": "PlanPhase", + "signature": "type PlanPhase interface", + "line": 52 + }, + { + "kind": "interface", + "name": "Plan", + "signature": "type Plan interface", + "line": 59 + }, + { + "kind": "func", + "name": "NewPlanNotFoundError", + "signature": "func NewPlanNotFoundError(key string, version int) error", + "line": 72 + }, + { + "kind": "struct", + "name": "PlanNotFoundError", + "signature": "type PlanNotFoundError struct", + "line": 83 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *PlanNotFoundError) Error() string", + "line": 88 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *PlanNotFoundError) Unwrap() error", + "line": 93 + }, + { + "kind": "func", + "name": "IsPlanNotFoundError", + "signature": "func IsPlanNotFoundError(err error) bool", + "line": 98 + } + ], + "line_count": 106 + }, + "openmeter/subscription/repo/mapping.go": { + "header": "\t\"fmt\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "MapDBSubscription", + "signature": "func MapDBSubscription(sub *db.Subscription) (subscription.Subscription, error)", + "line": 16 + }, + { + "kind": "func", + "name": "MapDBSubscripitonPhase", + "signature": "func MapDBSubscripitonPhase(phase *db.SubscriptionPhase) (subscription.SubscriptionPhase, error)", + "line": 74 + }, + { + "kind": "func", + "name": "MapDBSubscriptionItem", + "signature": "func MapDBSubscriptionItem(item *db.SubscriptionItem) (subscription.SubscriptionItem, error)", + "line": 101 + } + ], + "line_count": 209 + }, + "openmeter/subscription/repo/subscriptionitemrepo.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "subscriptionItemRepo", + "signature": "type subscriptionItemRepo struct", + "line": 19 + }, + { + "kind": "func", + "name": "NewSubscriptionItemRepo", + "signature": "func NewSubscriptionItemRepo(db *db.Client) *subscriptionItemRepo", + "line": 25 + }, + { + "kind": "func", + "name": "getItemForSubscriptionAtFilter", + "signature": "func getItemForSubscriptionAtFilter(input subscription.GetForSubscriptionAtInput) predicate.SubscriptionItem", + "line": 31 + }, + { + "kind": "func", + "name": "GetForSubscriptionAt", + "signature": "func (r *subscriptionItemRepo) GetForSubscriptionAt(ctx context.Context, input subscription.GetForSubscriptionAtInput) ([]subscription.SubscriptionItem, error)", + "line": 41 + }, + { + "kind": "func", + "name": "GetForSubscriptionsAt", + "signature": "func (r *subscriptionItemRepo) GetForSubscriptionsAt(ctx context.Context, input []subscription.GetForSubscriptionAtInput) ([]subscription.SubscriptionItem, error)", + "line": 66 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (r *subscriptionItemRepo) GetByID(ctx context.Context, id models.NamespacedID) (subscription.SubscriptionItem, error)", + "line": 97 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (r *subscriptionItemRepo) Create(ctx context.Context, input subscription.CreateSubscriptionItemEntityInput) (subscription.SubscriptionItem, error)", + "line": 122 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (r *subscriptionItemRepo) Delete(ctx context.Context, input models.NamespacedID) error", + "line": 175 + } + ], + "line_count": 195 + }, + "openmeter/subscription/repo/subscriptionphaserepo.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "struct", + "name": "subscriptionPhaseRepo", + "signature": "type subscriptionPhaseRepo struct", + "line": 17 + }, + { + "kind": "func", + "name": "NewSubscriptionPhaseRepo", + "signature": "func NewSubscriptionPhaseRepo(db *db.Client) *subscriptionPhaseRepo", + "line": 23 + }, + { + "kind": "func", + "name": "getPhaseForSubscriptionAtFilter", + "signature": "func getPhaseForSubscriptionAtFilter(input subscription.GetForSubscriptionAtInput) predicate.SubscriptionPhase", + "line": 29 + }, + { + "kind": "func", + "name": "GetForSubscriptionAt", + "signature": "func (r *subscriptionPhaseRepo) GetForSubscriptionAt(ctx context.Context, input subscription.GetForSubscriptionAtInput) ([]subscription.SubscriptionPhase, error)", + "line": 40 + }, + { + "kind": "func", + "name": "GetForSubscriptionsAt", + "signature": "func (r *subscriptionPhaseRepo) GetForSubscriptionsAt(ctx context.Context, input []subscription.GetForSubscriptionAtInput) ([]subscription.SubscriptionPhase, error)", + "line": 63 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (r *subscriptionPhaseRepo) Create(ctx context.Context, phase subscription.CreateSubscriptionPhaseEntityInput) (subscription.SubscriptionPhase, error)", + "line": 94 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (r *subscriptionPhaseRepo) Delete(ctx context.Context, id models.NamespacedID) error", + "line": 116 + } + ], + "line_count": 134 + }, + "openmeter/subscription/repo/subscriptionrepo.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [ + { + "kind": "struct", + "name": "subscriptionRepo", + "signature": "type subscriptionRepo struct", + "line": 24 + }, + { + "kind": "func", + "name": "NewSubscriptionRepo", + "signature": "func NewSubscriptionRepo(db *db.Client) *subscriptionRepo", + "line": 30 + }, + { + "kind": "func", + "name": "SetEndOfCadence", + "signature": "func (r *subscriptionRepo) SetEndOfCadence(ctx context.Context, id models.NamespacedID, at *time.Time) (*subscription.Subscription, error)", + "line": 36 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (r *subscriptionRepo) UpdateAnnotations(ctx context.Context, id models.NamespacedID, annotations models.Annotations) (*subscription.Subscription, error)", + "line": 54 + }, + { + "kind": "func", + "name": "GetByID", + "signature": "func (r *subscriptionRepo) GetByID(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 72 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (r *subscriptionRepo) Create(ctx context.Context, sub subscription.CreateSubscriptionEntityInput) (subscription.Subscription, error)", + "line": 90 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (r *subscriptionRepo) Delete(ctx context.Context, id models.NamespacedID) error", + "line": 140 + }, + { + "kind": "func", + "name": "List", + "signature": "func (r *subscriptionRepo) List(ctx context.Context, in subscription.ListSubscriptionsInput) (subscription.SubscriptionList, error)", + "line": 154 + } + ], + "line_count": 251 + }, + "openmeter/subscription/repo/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "Tx", + "signature": "func (r *subscriptionRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 13 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *subscriptionRepo) Self() *subscriptionRepo", + "line": 23 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *subscriptionRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionRepo", + "line": 27 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *subscriptionPhaseRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 32 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *subscriptionPhaseRepo) Self() *subscriptionPhaseRepo", + "line": 42 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *subscriptionPhaseRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionPhaseRepo", + "line": 46 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (r *subscriptionItemRepo) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 51 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (r *subscriptionItemRepo) Self() *subscriptionItemRepo", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (r *subscriptionItemRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionItemRepo", + "line": 65 + } + ], + "line_count": 68 + }, + "openmeter/subscription/repo/utils.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db/predicate\"\n\tdb_subscription \"github.com/openmeterio/openmeter/openmeter/ent/db/subscription\"", + "symbols": [ + { + "kind": "func", + "name": "SubscriptionActiveAfter", + "signature": "func SubscriptionActiveAfter(at time.Time) []predicate.Subscription", + "line": 11 + }, + { + "kind": "func", + "name": "SubscriptionActiveAt", + "signature": "func SubscriptionActiveAt(at time.Time) []predicate.Subscription", + "line": 20 + }, + { + "kind": "func", + "name": "SubscriptionActiveInPeriod", + "signature": "func SubscriptionActiveInPeriod(period timeutil.StartBoundedPeriod) []predicate.Subscription", + "line": 31 + }, + { + "kind": "func", + "name": "SubscriptionNotDeletedAt", + "signature": "func SubscriptionNotDeletedAt(at time.Time) []predicate.Subscription", + "line": 41 + } + ], + "line_count": 48 + }, + "openmeter/subscription/repository.go": { + "header": "\t\"context\"\n\t\"maps\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateSubscriptionEntityInput", + "signature": "type CreateSubscriptionEntityInput struct", + "line": 16 + }, + { + "kind": "interface", + "name": "SubscriptionRepository", + "signature": "type SubscriptionRepository interface", + "line": 43 + }, + { + "kind": "struct", + "name": "CreateSubscriptionPhaseEntityInput", + "signature": "type CreateSubscriptionPhaseEntityInput struct", + "line": 64 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i CreateSubscriptionPhaseEntityInput) Equal(other CreateSubscriptionPhaseEntityInput) bool", + "line": 90 + }, + { + "kind": "struct", + "name": "GetForSubscriptionAtInput", + "signature": "type GetForSubscriptionAtInput struct", + "line": 94 + }, + { + "kind": "interface", + "name": "SubscriptionPhaseRepository", + "signature": "type SubscriptionPhaseRepository interface", + "line": 100 + }, + { + "kind": "struct", + "name": "CreateSubscriptionItemEntityInput", + "signature": "type CreateSubscriptionItemEntityInput struct", + "line": 113 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i CreateSubscriptionItemEntityInput) Equal(other CreateSubscriptionItemEntityInput) bool", + "line": 139 + }, + { + "kind": "interface", + "name": "SubscriptionItemRepository", + "signature": "type SubscriptionItemRepository interface", + "line": 151 + } + ], + "line_count": 160 + }, + "openmeter/subscription/serialize_test.go": { + "header": "\t\"bytes\"\n\t\"encoding/json\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubscriptionItemSpecSerialize", + "signature": "func TestSubscriptionItemSpecSerialize(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestSubscriptionItemSerialize", + "signature": "func TestSubscriptionItemSerialize(t *testing.T)", + "line": 65 + } + ], + "line_count": 133 + }, + "openmeter/subscription/service.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "QueryService", + "signature": "type QueryService interface", + "line": 9 + }, + { + "kind": "interface", + "name": "CommandService", + "signature": "type CommandService interface", + "line": 20 + }, + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 37 + }, + { + "kind": "interface", + "name": "HookService", + "signature": "type HookService interface", + "line": 42 + } + ], + "line_count": 44 + }, + "openmeter/subscription/service/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ServiceConfig", + "signature": "type ServiceConfig struct", + "line": 26 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(conf ServiceConfig) (subscription.Service, error)", + "line": 46 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 69 + }, + { + "kind": "func", + "name": "RegisterHook", + "signature": "func (s *service) RegisterHook(validator subscription.SubscriptionCommandHook) error", + "line": 75 + }, + { + "kind": "func", + "name": "lockCustomer", + "signature": "func (s *service) lockCustomer(ctx context.Context, customerId string) error", + "line": 88 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *service) Create(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 101 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (s *service) Update(ctx context.Context, subscriptionID models.NamespacedID, newSpec subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 196 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (s *service) Delete(ctx context.Context, subscriptionID models.NamespacedID) error", + "line": 249 + }, + { + "kind": "func", + "name": "Cancel", + "signature": "func (s *service) Cancel(ctx context.Context, subscriptionID models.NamespacedID, timing subscription.Timing) (subscription.Subscription, error)", + "line": 300 + }, + { + "kind": "func", + "name": "Continue", + "signature": "func (s *service) Continue(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 360 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (s *service) UpdateAnnotations(ctx context.Context, subscriptionID models.NamespacedID, annotations models.Annotations) (*subscription.Subscription, error)", + "line": 417 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (s *service) Get(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 421 + }, + { + "kind": "func", + "name": "GetView", + "signature": "func (s *service) GetView(ctx context.Context, subscriptionID models.NamespacedID) (subscription.SubscriptionView, error)", + "line": 431 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *service) List(ctx context.Context, input subscription.ListSubscriptionsInput) (subscription.SubscriptionList, error)", + "line": 467 + }, + { + "kind": "func", + "name": "ExpandViews", + "signature": "func (s *service) ExpandViews(ctx context.Context, subs []subscription.Subscription) ([]subscription.SubscriptionView, error)", + "line": 477 + }, + { + "kind": "func", + "name": "updateCustomerCurrencyIfNotSet", + "signature": "func (s *service) updateCustomerCurrencyIfNotSet(ctx context.Context, sub subscription.Subscription, currentSpec subscription.SubscriptionSpec) error", + "line": 692 + } + ], + "line_count": 734 + }, + "openmeter/subscription/service/service_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreation", + "signature": "func TestCreation(t *testing.T)", + "line": 27 + }, + { + "kind": "func", + "name": "TestCancellation", + "signature": "func TestCancellation(t *testing.T)", + "line": 244 + }, + { + "kind": "func", + "name": "TestContinuing", + "signature": "func TestContinuing(t *testing.T)", + "line": 361 + }, + { + "kind": "func", + "name": "TestList", + "signature": "func TestList(t *testing.T)", + "line": 513 + }, + { + "kind": "func", + "name": "TestSubscriptionChangeTrackingAnnotations", + "signature": "func TestSubscriptionChangeTrackingAnnotations(t *testing.T)", + "line": 835 + }, + { + "kind": "func", + "name": "TestTaxCodeResolution", + "signature": "func TestTaxCodeResolution(t *testing.T)", + "line": 1113 + } + ], + "line_count": 1401 + }, + "openmeter/subscription/service/servicevalidation.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "validateCreate", + "signature": "func (s *service) validateCreate(ctx context.Context, cust customer.Customer, spec subscription.SubscriptionSpec) error", + "line": 15 + }, + { + "kind": "func", + "name": "validateUpdate", + "signature": "func (s *service) validateUpdate(ctx context.Context, currentView subscription.SubscriptionView, newSpec subscription.SubscriptionSpec) error", + "line": 43 + }, + { + "kind": "func", + "name": "validateCancel", + "signature": "func (s *service) validateCancel(ctx context.Context, view subscription.SubscriptionView, timing subscription.Timing) error", + "line": 83 + }, + { + "kind": "func", + "name": "validateContinue", + "signature": "func (s *service) validateContinue(ctx context.Context, view subscription.SubscriptionView) error", + "line": 115 + } + ], + "line_count": 133 + }, + "openmeter/subscription/service/sync.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "sync", + "signature": "func (s *service) sync(ctx context.Context, view subscription.SubscriptionView, newSpec subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 28 + }, + { + "kind": "func", + "name": "mark", + "signature": "func (t touched) mark(key subscription.SpecPath)", + "line": 355 + }, + { + "kind": "func", + "name": "isTouched", + "signature": "func (t touched) isTouched(key subscription.SpecPath) bool", + "line": 361 + } + ], + "line_count": 378 + }, + "openmeter/subscription/service/sync_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestEdit", + "signature": "func TestEdit(t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestDeleteScheduledDowngradeCanExpandDeletedSubscriptionForSync", + "signature": "func TestDeleteScheduledDowngradeCanExpandDeletedSubscriptionForSync(t *testing.T)", + "line": 383 + }, + { + "kind": "func", + "name": "getSubscriptionViewIncludingDeleted", + "signature": "func getSubscriptionViewIncludingDeleted(t *testing.T, ctx context.Context, service subscription.Service, subscriptionID models.NamespacedID) subscription.SubscriptionView", + "line": 473 + } + ], + "line_count": 489 + }, + "openmeter/subscription/service/synchelpers.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"", + "symbols": [ + { + "kind": "func", + "name": "createPhase", + "signature": "func (s *service) createPhase(\n\tctx context.Context,\n\tcust customer.Customer,\n\tphaseSpec subscription.SubscriptionPhaseSpec,\n\tsub subscription.Subscription,\n\tcadence models.CadencedModel,\n) (subscription.SubscriptionPhaseView, error)", + "line": 15 + }, + { + "kind": "struct", + "name": "createItemOptions", + "signature": "type createItemOptions struct", + "line": 64 + }, + { + "kind": "func", + "name": "createItem", + "signature": "func (s *service) createItem(\n\tctx context.Context,\n\topts createItemOptions,\n) (subscription.SubscriptionItemView, error)", + "line": 72 + }, + { + "kind": "func", + "name": "deletePhase", + "signature": "func (s *service) deletePhase(ctx context.Context, phase subscription.SubscriptionPhaseView) error", + "line": 140 + }, + { + "kind": "func", + "name": "deleteItem", + "signature": "func (s *service) deleteItem(ctx context.Context, item subscription.SubscriptionItemView) error", + "line": 162 + }, + { + "kind": "func", + "name": "resolveTaxCode", + "signature": "func (s *service) resolveTaxCode(ctx context.Context, namespace string, rc productcatalog.RateCard) error", + "line": 184 + } + ], + "line_count": 200 + }, + "openmeter/subscription/specpath.go": { + "header": "\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (p *SpecPath) UnmarshalJSON(data []byte) error", + "line": 28 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p SpecPath) MarshalJSON() ([]byte, error)", + "line": 38 + }, + { + "kind": "func", + "name": "seg", + "signature": "func (p SpecPath) seg() []string", + "line": 42 + }, + { + "kind": "func", + "name": "IsParentOf", + "signature": "func (p SpecPath) IsParentOf(other SpecPath) bool", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p SpecPath) Validate() error", + "line": 66 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (p SpecPath) Type() SpecPathType", + "line": 101 + }, + { + "kind": "func", + "name": "PhaseKey", + "signature": "func (p SpecPath) PhaseKey() string", + "line": 114 + }, + { + "kind": "func", + "name": "ItemKey", + "signature": "func (p SpecPath) ItemKey() string", + "line": 118 + }, + { + "kind": "func", + "name": "ItemVersion", + "signature": "func (p SpecPath) ItemVersion() int", + "line": 126 + }, + { + "kind": "func", + "name": "NewPhasePath", + "signature": "func NewPhasePath(phaseKey string) SpecPath", + "line": 142 + }, + { + "kind": "func", + "name": "NewItemPath", + "signature": "func NewItemPath(phaseKey, itemKey string) SpecPath", + "line": 146 + }, + { + "kind": "func", + "name": "NewItemVersionPath", + "signature": "func NewItemVersionPath(phaseKey, itemKey string, idx int) SpecPath", + "line": 151 + } + ], + "line_count": 154 + }, + "openmeter/subscription/state.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/qmuntal/stateless\"", + "symbols": [ + { + "kind": "func", + "name": "Values", + "signature": "func (s SubscriptionStatus) Values() []SubscriptionStatus", + "line": 25 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SubscriptionStatus) Validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "SubscriptionStateMachine", + "signature": "type SubscriptionStateMachine struct", + "line": 55 + }, + { + "kind": "func", + "name": "CanTransitionOrErr", + "signature": "func (sm SubscriptionStateMachine) CanTransitionOrErr(ctx context.Context, action SubscriptionAction) error", + "line": 59 + }, + { + "kind": "func", + "name": "NewStateMachine", + "signature": "func NewStateMachine(status SubscriptionStatus) SubscriptionStateMachine", + "line": 89 + } + ], + "line_count": 109 + }, + "openmeter/subscription/subscription.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/openmeter/customer\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "struct", + "name": "Subscription", + "signature": "type Subscription struct", + "line": 13 + }, + { + "kind": "func", + "name": "AsEntityInput", + "signature": "func (s Subscription) AsEntityInput() CreateSubscriptionEntityInput", + "line": 36 + }, + { + "kind": "func", + "name": "GetStatusAt", + "signature": "func (s Subscription) GetStatusAt(at time.Time) SubscriptionStatus", + "line": 56 + }, + { + "kind": "func", + "name": "GetCustomerID", + "signature": "func (s Subscription) GetCustomerID() customer.CustomerID", + "line": 85 + } + ], + "line_count": 90 + }, + "openmeter/subscription/subscription_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubscriptionStatus", + "signature": "func TestSubscriptionStatus(t *testing.T)", + "line": 14 + } + ], + "line_count": 113 + }, + "openmeter/subscription/subscriptionspec.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "CreateSubscriptionPlanInput", + "signature": "type CreateSubscriptionPlanInput struct", + "line": 32 + }, + { + "kind": "struct", + "name": "CreateSubscriptionCustomerInput", + "signature": "type CreateSubscriptionCustomerInput struct", + "line": 45 + }, + { + "kind": "struct", + "name": "SubscriptionSpec", + "signature": "type SubscriptionSpec struct", + "line": 57 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionEntityInput", + "signature": "func (s *SubscriptionSpec) ToCreateSubscriptionEntityInput(ns string) CreateSubscriptionEntityInput", + "line": 65 + }, + { + "kind": "func", + "name": "GetPhaseCadence", + "signature": "func (s *SubscriptionSpec) GetPhaseCadence(phaseKey string) (models.CadencedModel, error)", + "line": 88 + }, + { + "kind": "func", + "name": "GetSortedPhases", + "signature": "func (s *SubscriptionSpec) GetSortedPhases() []*SubscriptionPhaseSpec", + "line": 134 + }, + { + "kind": "func", + "name": "GetCurrentPhaseAt", + "signature": "func (s *SubscriptionSpec) GetCurrentPhaseAt(t time.Time) (*SubscriptionPhaseSpec, bool)", + "line": 167 + }, + { + "kind": "func", + "name": "HasEntitlements", + "signature": "func (s *SubscriptionSpec) HasEntitlements() bool", + "line": 188 + }, + { + "kind": "func", + "name": "HasBillables", + "signature": "func (s *SubscriptionSpec) HasBillables() bool", + "line": 194 + }, + { + "kind": "func", + "name": "HasMeteredBillables", + "signature": "func (s *SubscriptionSpec) HasMeteredBillables() bool", + "line": 200 + }, + { + "kind": "func", + "name": "GetAlignedBillingPeriodAt", + "signature": "func (s *SubscriptionSpec) GetAlignedBillingPeriodAt(at time.Time) (timeutil.ClosedPeriod, error)", + "line": 208 + }, + { + "kind": "func", + "name": "SyncAnnotations", + "signature": "func (s *SubscriptionSpec) SyncAnnotations() error", + "line": 290 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SubscriptionSpec) Validate() error", + "line": 300 + }, + { + "kind": "func", + "name": "ValidateAlignment", + "signature": "func (s *SubscriptionSpec) ValidateAlignment() error", + "line": 336 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (s SubscriptionSpec) GetCadence() models.CadencedModel", + "line": 364 + }, + { + "kind": "struct", + "name": "CreateSubscriptionPhasePlanInput", + "signature": "type CreateSubscriptionPhasePlanInput struct", + "line": 371 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateSubscriptionPhasePlanInput) Validate() error", + "line": 379 + }, + { + "kind": "struct", + "name": "CreateSubscriptionPhaseCustomerInput", + "signature": "type CreateSubscriptionPhaseCustomerInput struct", + "line": 389 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s RemoveSubscriptionPhaseShifting) Validate() error", + "line": 400 + }, + { + "kind": "struct", + "name": "RemoveSubscriptionPhaseInput", + "signature": "type RemoveSubscriptionPhaseInput struct", + "line": 407 + }, + { + "kind": "struct", + "name": "CreateSubscriptionPhaseInput", + "signature": "type CreateSubscriptionPhaseInput struct", + "line": 411 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateSubscriptionPhaseInput) Validate() error", + "line": 418 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseSpec", + "signature": "type SubscriptionPhaseSpec struct", + "line": 426 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionPhaseEntityInput", + "signature": "func (s SubscriptionPhaseSpec) ToCreateSubscriptionPhaseEntityInput(\n\tsubscription Subscription,\n\tactiveFrom time.Time,\n) CreateSubscriptionPhaseEntityInput", + "line": 435 + }, + { + "kind": "func", + "name": "GetBillableItemsByKey", + "signature": "func (s SubscriptionPhaseSpec) GetBillableItemsByKey() map[string][]*SubscriptionItemSpec", + "line": 455 + }, + { + "kind": "func", + "name": "HasEntitlements", + "signature": "func (s SubscriptionPhaseSpec) HasEntitlements() bool", + "line": 470 + }, + { + "kind": "func", + "name": "HasMeteredBillables", + "signature": "func (s SubscriptionPhaseSpec) HasMeteredBillables() bool", + "line": 476 + }, + { + "kind": "func", + "name": "HasBillables", + "signature": "func (s SubscriptionPhaseSpec) HasBillables() bool", + "line": 482 + }, + { + "kind": "func", + "name": "SyncAnnotations", + "signature": "func (s SubscriptionPhaseSpec) SyncAnnotations() error", + "line": 486 + }, + { + "kind": "func", + "name": "FieldDescriptor", + "signature": "func (s SubscriptionPhaseSpec) FieldDescriptor() *models.FieldDescriptor", + "line": 498 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s SubscriptionPhaseSpec) Validate(\n\tphaseCadence models.CadencedModel,\n) error", + "line": 507 + }, + { + "kind": "struct", + "name": "CreateSubscriptionItemPlanInput", + "signature": "type CreateSubscriptionItemPlanInput struct", + "line": 623 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (i *CreateSubscriptionItemPlanInput) UnmarshalJSON(b []byte) error", + "line": 629 + }, + { + "kind": "struct", + "name": "CreateSubscriptionItemCustomerInput", + "signature": "type CreateSubscriptionItemCustomerInput struct", + "line": 668 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (i *CreateSubscriptionItemCustomerInput) UnmarshalJSON(b []byte) error", + "line": 674 + }, + { + "kind": "struct", + "name": "CreateSubscriptionItemInput", + "signature": "type CreateSubscriptionItemInput struct", + "line": 710 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (i *CreateSubscriptionItemInput) UnmarshalJSON(b []byte) error", + "line": 716 + }, + { + "kind": "struct", + "name": "SubscriptionItemSpec", + "signature": "type SubscriptionItemSpec struct", + "line": 744 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (s SubscriptionItemSpec) GetCadence(phaseCadence models.CadencedModel) models.CadencedModel", + "line": 748 + }, + { + "kind": "struct", + "name": "GetFullServicePeriodAtInput", + "signature": "type GetFullServicePeriodAtInput struct", + "line": 784 + }, + { + "kind": "func", + "name": "isEndOfSubscription", + "signature": "func (i GetFullServicePeriodAtInput) isEndOfSubscription() bool", + "line": 792 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetFullServicePeriodAtInput) Validate() error", + "line": 796 + }, + { + "kind": "func", + "name": "GetFullServicePeriodAt", + "signature": "func (s SubscriptionItemSpec) GetFullServicePeriodAt(\n\tinp GetFullServicePeriodAtInput,\n) (timeutil.ClosedPeriod, error)", + "line": 828 + }, + { + "kind": "func", + "name": "ToCreateSubscriptionItemEntityInput", + "signature": "func (s SubscriptionItemSpec) ToCreateSubscriptionItemEntityInput(\n\tphaseID models.NamespacedID,\n\tphaseCadence models.CadencedModel,\n\tentitlement *entitlement.Entitlement,\n) (CreateSubscriptionItemEntityInput, error)", + "line": 861 + }, + { + "kind": "struct", + "name": "ToScheduleSubscriptionEntitlementInputOptions", + "signature": "type ToScheduleSubscriptionEntitlementInputOptions struct", + "line": 891 + }, + { + "kind": "func", + "name": "ToScheduleSubscriptionEntitlementInput", + "signature": "func (s SubscriptionItemSpec) ToScheduleSubscriptionEntitlementInput(\n\topts ToScheduleSubscriptionEntitlementInputOptions,\n) (ScheduleSubscriptionEntitlementInput, bool, error)", + "line": 898 + }, + { + "kind": "func", + "name": "GetRef", + "signature": "func (s SubscriptionItemSpec) GetRef(subId string) SubscriptionItemRef", + "line": 987 + }, + { + "kind": "func", + "name": "SyncAnnotations", + "signature": "func (s *SubscriptionItemSpec) SyncAnnotations() error", + "line": 995 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SubscriptionItemSpec) Validate() error", + "line": 1014 + }, + { + "kind": "func", + "name": "NewSpecFromPlan", + "signature": "func NewSpecFromPlan(p Plan, c CreateSubscriptionCustomerInput) (SubscriptionSpec, error)", + "line": 1046 + }, + { + "kind": "func", + "name": "Apply", + "signature": "func (s *SubscriptionSpec) Apply(applies AppliesToSpec, context ApplyContext) error", + "line": 1140 + }, + { + "kind": "func", + "name": "ApplyMany", + "signature": "func (s *SubscriptionSpec) ApplyMany(applieses []AppliesToSpec, aCtx ApplyContext) error", + "line": 1153 + }, + { + "kind": "struct", + "name": "SpecValidationError", + "signature": "type SpecValidationError struct", + "line": 1165 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *SpecValidationError) Error() string", + "line": 1170 + }, + { + "kind": "struct", + "name": "AlignmentError", + "signature": "type AlignmentError struct", + "line": 1175 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e AlignmentError) Error() string", + "line": 1179 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e AlignmentError) Unwrap() error", + "line": 1183 + } + ], + "line_count": 1185 + }, + "openmeter/subscription/subscriptionspec_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestGetFullServicePeriodAtInputValidate", + "signature": "func TestGetFullServicePeriodAtInputValidate(t *testing.T)", + "line": 16 + } + ], + "line_count": 136 + }, + "openmeter/subscription/subscriptionview.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionView", + "signature": "type SubscriptionView struct", + "line": 22 + }, + { + "kind": "func", + "name": "AsSpec", + "signature": "func (s SubscriptionView) AsSpec() SubscriptionSpec", + "line": 29 + }, + { + "kind": "func", + "name": "GetPhaseByKey", + "signature": "func (s SubscriptionView) GetPhaseByKey(key string) (*SubscriptionPhaseView, bool)", + "line": 33 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SubscriptionView) Validate(includePhases bool) error", + "line": 42 + }, + { + "kind": "struct", + "name": "SubscriptionPhaseView", + "signature": "type SubscriptionPhaseView struct", + "line": 84 + }, + { + "kind": "func", + "name": "AsSpec", + "signature": "func (s *SubscriptionPhaseView) AsSpec() SubscriptionPhaseSpec", + "line": 90 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SubscriptionPhaseView) Validate(includeItems bool) error", + "line": 94 + }, + { + "kind": "struct", + "name": "SubscriptionItemView", + "signature": "type SubscriptionItemView struct", + "line": 107 + }, + { + "kind": "func", + "name": "AsSpec", + "signature": "func (s *SubscriptionItemView) AsSpec() SubscriptionItemSpec", + "line": 115 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (s *SubscriptionItemView) Validate() error", + "line": 119 + }, + { + "kind": "func", + "name": "NewSubscriptionView", + "signature": "func NewSubscriptionView(\n\tsub Subscription,\n\tcust customer.Customer,\n\tphases []SubscriptionPhase,\n\titems []SubscriptionItem,\n\tents []SubscriptionEntitlement,\n\tentFeats []feature.Feature,\n\titemFeats []feature.Feature,\n) (*SubscriptionView, error)", + "line": 235 + } + ], + "line_count": 459 + }, + "openmeter/subscription/testutils/addon.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "BuildAddonForTesting", + "signature": "func BuildAddonForTesting(t *testing.T, period productcatalog.EffectivePeriod, typ productcatalog.AddonInstanceType, rcs ...productcatalog.RateCard) addon.CreateAddonInput", + "line": 16 + }, + { + "kind": "func", + "name": "GetExampleAddonInput", + "signature": "func GetExampleAddonInput(t *testing.T, effectivePeriod productcatalog.EffectivePeriod) addon.CreateAddonInput", + "line": 120 + }, + { + "kind": "struct", + "name": "testAddonService", + "signature": "type testAddonService struct", + "line": 124 + }, + { + "kind": "func", + "name": "NewTestAddonService", + "signature": "func NewTestAddonService(svc addon.Service) *testAddonService", + "line": 128 + }, + { + "kind": "func", + "name": "CreateTestAddon", + "signature": "func (s *testAddonService) CreateTestAddon(t *testing.T, addInp addon.CreateAddonInput) addon.Addon", + "line": 132 + } + ], + "line_count": 149 + }, + "openmeter/subscription/testutils/billing.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "struct", + "name": "NoopCustomerOverrideService", + "signature": "type NoopCustomerOverrideService struct", + "line": 12 + }, + { + "kind": "func", + "name": "UpsertCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) UpsertCustomerOverride(ctx context.Context, input billing.UpsertCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 14 + }, + { + "kind": "func", + "name": "DeleteCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) DeleteCustomerOverride(ctx context.Context, input billing.DeleteCustomerOverrideInput) error", + "line": 18 + }, + { + "kind": "func", + "name": "GetCustomerOverride", + "signature": "func (n NoopCustomerOverrideService) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideInput) (billing.CustomerOverrideWithDetails, error)", + "line": 22 + }, + { + "kind": "func", + "name": "GetCustomerApp", + "signature": "func (n NoopCustomerOverrideService) GetCustomerApp(ctx context.Context, input billing.GetCustomerAppInput) (app.App, error)", + "line": 26 + }, + { + "kind": "func", + "name": "ListCustomerOverrides", + "signature": "func (n NoopCustomerOverrideService) ListCustomerOverrides(ctx context.Context, input billing.ListCustomerOverridesInput) (billing.ListCustomerOverridesResult, error)", + "line": 30 + } + ], + "line_count": 32 + }, + "openmeter/subscription/testutils/builder.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "struct", + "name": "testPlanbuilder", + "signature": "type testPlanbuilder struct", + "line": 21 + }, + { + "kind": "func", + "name": "AddPhase", + "signature": "func (b *testPlanbuilder) AddPhase(dur *datetime.ISODuration, rcs ...productcatalog.RateCard) *testPlanbuilder", + "line": 25 + }, + { + "kind": "func", + "name": "SetMeta", + "signature": "func (b *testPlanbuilder) SetMeta(meta productcatalog.PlanMeta) *testPlanbuilder", + "line": 41 + }, + { + "kind": "func", + "name": "Build", + "signature": "func (b *testPlanbuilder) Build() plan.CreatePlanInput", + "line": 46 + }, + { + "kind": "func", + "name": "BuildTestPlanInput", + "signature": "func BuildTestPlanInput(t *testing.T) *testPlanbuilder", + "line": 50 + }, + { + "kind": "struct", + "name": "testSubscriptionSpecBuilder", + "signature": "type testSubscriptionSpecBuilder struct", + "line": 77 + }, + { + "kind": "func", + "name": "AddPhase", + "signature": "func (b *testSubscriptionSpecBuilder) AddPhase(dur *datetime.ISODuration, rcs ...productcatalog.RateCard) *testSubscriptionSpecBuilder", + "line": 82 + }, + { + "kind": "func", + "name": "Build", + "signature": "func (b *testSubscriptionSpecBuilder) Build() (subscription.SubscriptionSpec, error)", + "line": 134 + }, + { + "kind": "func", + "name": "BuildTestSubscriptionSpec", + "signature": "func BuildTestSubscriptionSpec(t *testing.T) *testSubscriptionSpecBuilder", + "line": 148 + } + ], + "line_count": 173 + }, + "openmeter/subscription/testutils/compare.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateSpecAndView", + "signature": "func ValidateSpecAndView(t *testing.T, expected subscription.SubscriptionSpec, found subscription.SubscriptionView)", + "line": 21 + }, + { + "kind": "func", + "name": "SpecsEqual", + "signature": "func SpecsEqual(t *testing.T, s1, s2 subscription.SubscriptionSpec)", + "line": 165 + }, + { + "kind": "func", + "name": "tsPlusNillableISO", + "signature": "func tsPlusNillableISO(ts time.Time, iso *datetime.ISODuration) *time.Time", + "line": 271 + }, + { + "kind": "func", + "name": "equalNilableTime", + "signature": "func equalNilableTime(t *testing.T, t1, t2 *time.Time, msgAndArgs ...interface{})", + "line": 281 + }, + { + "kind": "func", + "name": "SubscriptionAddonsEqual", + "signature": "func SubscriptionAddonsEqual(t *testing.T, a1, a2 subscriptionaddon.SubscriptionAddon)", + "line": 304 + } + ], + "line_count": 317 + }, + "openmeter/subscription/testutils/customer.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "NewCustomerAdapter", + "signature": "func NewCustomerAdapter(t *testing.T, dbDeps *DBDeps) *testCustomerRepo", + "line": 21 + }, + { + "kind": "func", + "name": "NewSubjectService", + "signature": "func NewSubjectService(t *testing.T, dbDeps *DBDeps) subject.Service", + "line": 42 + }, + { + "kind": "func", + "name": "NewCustomerService", + "signature": "func NewCustomerService(t *testing.T, dbDeps *DBDeps) customer.Service", + "line": 58 + }, + { + "kind": "struct", + "name": "testCustomerRepo", + "signature": "type testCustomerRepo struct", + "line": 74 + }, + { + "kind": "func", + "name": "CreateExampleCustomer", + "signature": "func (a *testCustomerRepo) CreateExampleCustomer(t *testing.T) *customer.Customer", + "line": 79 + } + ], + "line_count": 119 + }, + "openmeter/subscription/testutils/db.go": { + "header": "\t\"errors\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "DBDeps", + "signature": "type DBDeps struct", + "line": 15 + }, + { + "kind": "func", + "name": "Cleanup", + "signature": "func (d *DBDeps) Cleanup(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "SetupDBDeps", + "signature": "func SetupDBDeps(t *testing.T) *DBDeps", + "line": 41 + } + ], + "line_count": 79 + }, + "openmeter/subscription/testutils/feature.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ExampleFeature", + "signature": "func ExampleFeature(meterID string) feature.CreateFeatureInputs", + "line": 19 + }, + { + "kind": "func", + "name": "ExampleFeature2", + "signature": "func ExampleFeature2(meterID string) feature.CreateFeatureInputs", + "line": 28 + }, + { + "kind": "func", + "name": "ExampleFeature3", + "signature": "func ExampleFeature3(meterID string) feature.CreateFeatureInputs", + "line": 37 + }, + { + "kind": "struct", + "name": "testFeatureConnector", + "signature": "type testFeatureConnector struct", + "line": 46 + }, + { + "kind": "func", + "name": "NewTestFeatureConnector", + "signature": "func NewTestFeatureConnector(conn feature.FeatureConnector) *testFeatureConnector", + "line": 50 + }, + { + "kind": "func", + "name": "CreateExampleFeatures", + "signature": "func (c *testFeatureConnector) CreateExampleFeatures(t *testing.T, meterID string) []feature.Feature", + "line": 54 + } + ], + "line_count": 69 + }, + "openmeter/subscription/testutils/global.go": { + "header": "var ExampleNamespace = \"test-namespace\"\nvar ISOMonth, _ = datetime.ISODurationString(\"P1M\").Parse()", + "symbols": [], + "line_count": 7 + }, + "openmeter/subscription/testutils/helpers.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "CreatePlanWithAddon", + "signature": "func CreatePlanWithAddon(\n\tt *testing.T,\n\tdeps SubscriptionDependencies,\n\tplanInp plan.CreatePlanInput,\n\taddonInp addon.CreateAddonInput,\n) (subscription.Plan, addon.Addon)", + "line": 24 + }, + { + "kind": "func", + "name": "CreateSubscriptionFromPlan", + "signature": "func CreateSubscriptionFromPlan(t *testing.T, deps *SubscriptionDependencies, plan subscription.Plan, startAt time.Time) subscription.SubscriptionView", + "line": 65 + }, + { + "kind": "func", + "name": "CreateMultiInstanceAddonForSubscription", + "signature": "func CreateMultiInstanceAddonForSubscription(t *testing.T, deps *SubscriptionDependencies, subID models.NamespacedID, addonID models.NamespacedID, quants []subscriptionaddon.CreateSubscriptionAddonQuantityInput) subscriptionaddon.SubscriptionAddon", + "line": 84 + }, + { + "kind": "func", + "name": "CreateAddonForSubscription", + "signature": "func CreateAddonForSubscription(t *testing.T, deps *SubscriptionDependencies, subID models.NamespacedID, addonID models.NamespacedID, cadence models.CadencedModel) subscriptionaddon.SubscriptionAddon", + "line": 109 + } + ], + "line_count": 127 + }, + "openmeter/subscription/testutils/mock.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"", + "symbols": [ + { + "kind": "struct", + "name": "MockService", + "signature": "type MockService struct", + "line": 13 + }, + { + "kind": "func", + "name": "RegisterHook", + "signature": "func (s *MockService) RegisterHook(hook subscription.SubscriptionCommandHook) error", + "line": 28 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *MockService) Create(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 40 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (s *MockService) Update(ctx context.Context, subscriptionID models.NamespacedID, target subscription.SubscriptionSpec) (subscription.Subscription, error)", + "line": 44 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (s *MockService) Delete(ctx context.Context, subscriptionID models.NamespacedID) error", + "line": 48 + }, + { + "kind": "func", + "name": "Cancel", + "signature": "func (s *MockService) Cancel(ctx context.Context, subscriptionID models.NamespacedID, at subscription.Timing) (subscription.Subscription, error)", + "line": 52 + }, + { + "kind": "func", + "name": "Continue", + "signature": "func (s *MockService) Continue(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 56 + }, + { + "kind": "func", + "name": "UpdateAnnotations", + "signature": "func (s *MockService) UpdateAnnotations(ctx context.Context, subscriptionID models.NamespacedID, annotations models.Annotations) (*subscription.Subscription, error)", + "line": 60 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (s *MockService) Get(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 64 + }, + { + "kind": "func", + "name": "GetView", + "signature": "func (s *MockService) GetView(ctx context.Context, subscriptionID models.NamespacedID) (subscription.SubscriptionView, error)", + "line": 68 + }, + { + "kind": "func", + "name": "List", + "signature": "func (s *MockService) List(ctx context.Context, params subscription.ListSubscriptionsInput) (subscription.SubscriptionList, error)", + "line": 72 + }, + { + "kind": "func", + "name": "ExpandViews", + "signature": "func (s *MockService) ExpandViews(ctx context.Context, subs []subscription.Subscription) ([]subscription.SubscriptionView, error)", + "line": 76 + }, + { + "kind": "func", + "name": "GetAllForCustomer", + "signature": "func (s *MockService) GetAllForCustomer(ctx context.Context, customerID models.NamespacedID, period timeutil.StartBoundedPeriod) ([]subscription.Subscription, error)", + "line": 80 + }, + { + "kind": "struct", + "name": "MockWorkflowService", + "signature": "type MockWorkflowService struct", + "line": 84 + }, + { + "kind": "func", + "name": "CreateFromPlan", + "signature": "func (s *MockWorkflowService) CreateFromPlan(ctx context.Context, inp subscriptionworkflow.CreateSubscriptionWorkflowInput, plan subscription.Plan) (subscription.SubscriptionView, error)", + "line": 90 + }, + { + "kind": "func", + "name": "EditRunning", + "signature": "func (s *MockWorkflowService) EditRunning(ctx context.Context, subscriptionID models.NamespacedID, customizations []subscription.Patch) (subscription.SubscriptionView, error)", + "line": 94 + }, + { + "kind": "func", + "name": "ChangeToPlan", + "signature": "func (s *MockWorkflowService) ChangeToPlan(ctx context.Context, subscriptionID models.NamespacedID, inp subscriptionworkflow.ChangeSubscriptionWorkflowInput, plan subscription.Plan) (current subscription.Subscription, new subscription.SubscriptionView, err error)", + "line": 98 + } + ], + "line_count": 100 + }, + "openmeter/subscription/testutils/patch.go": { + "header": "type TestPatch struct {\n\tPatchValue any\n\tPatchOperation subscription.PatchOperation", + "symbols": [ + { + "kind": "struct", + "name": "TestPatch", + "signature": "type TestPatch struct", + "line": 5 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (p *TestPatch) ApplyTo(s *subscription.SubscriptionSpec, c subscription.ApplyContext) error", + "line": 19 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (p *TestPatch) Op() subscription.PatchOperation", + "line": 26 + }, + { + "kind": "func", + "name": "Path", + "signature": "func (p *TestPatch) Path() subscription.SpecPath", + "line": 30 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p *TestPatch) Validate() error", + "line": 34 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p *TestPatch) MarshalJSON() ([]byte, error)", + "line": 41 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (p *TestPatch) UnmarshalJSON(data []byte) error", + "line": 45 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (p *TestPatch) Value() any", + "line": 49 + }, + { + "kind": "func", + "name": "ValueAsAny", + "signature": "func (p *TestPatch) ValueAsAny() any", + "line": 53 + } + ], + "line_count": 55 + }, + "openmeter/subscription/testutils/plan.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GetExamplePlanInput", + "signature": "func GetExamplePlanInput(t *testing.T) plan.CreatePlanInput", + "line": 19 + }, + { + "kind": "struct", + "name": "planHelper", + "signature": "type planHelper struct", + "line": 30 + }, + { + "kind": "func", + "name": "NewPlanHelper", + "signature": "func NewPlanHelper(planService plan.Service) *planHelper", + "line": 34 + }, + { + "kind": "func", + "name": "CreatePlan", + "signature": "func (h *planHelper) CreatePlan(t *testing.T, input plan.CreatePlanInput) subscription.Plan", + "line": 40 + } + ], + "line_count": 65 + }, + "openmeter/subscription/testutils/ratecard.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "GetEntitlementTemplateUsagePeriod", + "signature": "func GetEntitlementTemplateUsagePeriod(t *testing.T, et productcatalog.EntitlementTemplate) *datetime.ISODuration", + "line": 129 + } + ], + "line_count": 144 + }, + "openmeter/subscription/testutils/repository.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/openmeterio/openmeter/openmeter/productcatalog\"", + "symbols": [ + { + "kind": "func", + "name": "NewSubscriptionRepo", + "signature": "func NewSubscriptionRepo(t *testing.T, dbDeps *DBDeps) testSubscriptionRepo", + "line": 14 + }, + { + "kind": "struct", + "name": "testSubscriptionRepo", + "signature": "type testSubscriptionRepo struct", + "line": 22 + }, + { + "kind": "func", + "name": "CreateExampleSubscription", + "signature": "func (r *testSubscriptionRepo) CreateExampleSubscription(t *testing.T, customerId string, planRef subscription.PlanRef) subscription.Subscription", + "line": 26 + }, + { + "kind": "func", + "name": "getExampleCreateSubscriptionInput", + "signature": "func getExampleCreateSubscriptionInput(customerId string, planRef subscription.PlanRef) subscription.CreateSubscriptionEntityInput", + "line": 37 + }, + { + "kind": "func", + "name": "NewSubscriptionPhaseRepo", + "signature": "func NewSubscriptionPhaseRepo(t *testing.T, dbDeps *DBDeps) testSubscriptionPhaseRepo", + "line": 49 + }, + { + "kind": "struct", + "name": "testSubscriptionPhaseRepo", + "signature": "type testSubscriptionPhaseRepo struct", + "line": 57 + }, + { + "kind": "func", + "name": "NewSubscriptionItemRepo", + "signature": "func NewSubscriptionItemRepo(t *testing.T, dbDeps *DBDeps) testSubscriptionItemRepo", + "line": 61 + }, + { + "kind": "struct", + "name": "testSubscriptionItemRepo", + "signature": "type testSubscriptionItemRepo struct", + "line": 69 + } + ], + "line_count": 71 + }, + "openmeter/subscription/testutils/service.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionDependencies", + "signature": "type SubscriptionDependencies struct", + "line": 52 + }, + { + "kind": "func", + "name": "NewService", + "signature": "func NewService(t *testing.T, dbDeps *DBDeps) SubscriptionDependencies", + "line": 74 + } + ], + "line_count": 300 + }, + "openmeter/subscription/timing.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"runtime/debug\"", + "symbols": [ + { + "kind": "struct", + "name": "Timing", + "signature": "type Timing struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Timing) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "Resolve", + "signature": "func (c Timing) Resolve() (time.Time, error)", + "line": 35 + }, + { + "kind": "func", + "name": "ResolveForSpec", + "signature": "func (c Timing) ResolveForSpec(spec SubscriptionSpec) (time.Time, error)", + "line": 58 + }, + { + "kind": "func", + "name": "ValidateForAction", + "signature": "func (c Timing) ValidateForAction(action SubscriptionAction, subView *SubscriptionView) error", + "line": 89 + }, + { + "kind": "func", + "name": "isDateAlignedWithBillingCadence", + "signature": "func (c Timing) isDateAlignedWithBillingCadence(spec SubscriptionSpec, date time.Time) bool", + "line": 172 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TimingEnum) Validate() error", + "line": 198 + } + ], + "line_count": 205 + }, + "openmeter/subscription/uniqueness.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "ValidateUniqueConstraintBySubscriptions", + "signature": "func ValidateUniqueConstraintBySubscriptions(subs []SubscriptionSpec) error", + "line": 13 + }, + { + "kind": "func", + "name": "ValidateUniqueConstraintByFeatures", + "signature": "func ValidateUniqueConstraintByFeatures(subs []SubscriptionSpec) error", + "line": 56 + }, + { + "kind": "struct", + "name": "SubscriptionSubscriptionLevelUniqueConstraintErrorDetailSide", + "signature": "type SubscriptionSubscriptionLevelUniqueConstraintErrorDetailSide struct", + "line": 60 + }, + { + "kind": "struct", + "name": "SubscriptionFeatureLevelUniqueConstraintErrorDetailSide", + "signature": "type SubscriptionFeatureLevelUniqueConstraintErrorDetailSide struct", + "line": 68 + }, + { + "kind": "struct", + "name": "featureLevelUniqueConstraintValidator", + "signature": "type featureLevelUniqueConstraintValidator struct", + "line": 78 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (v featureLevelUniqueConstraintValidator) Validate(subs []SubscriptionSpec) error", + "line": 80 + }, + { + "kind": "func", + "name": "buildRelevantTimelines", + "signature": "func (v featureLevelUniqueConstraintValidator) buildRelevantTimelines(itemMap map[string][]itemSpecWithCircularReferences) (map[string]models.CadenceList[validationTimelineEntry], error)", + "line": 108 + }, + { + "kind": "func", + "name": "collectRelevantItems", + "signature": "func (v featureLevelUniqueConstraintValidator) collectRelevantItems(subs []SubscriptionSpec, condition func(item *SubscriptionItemSpec) bool) map[string][]itemSpecWithCircularReferences", + "line": 135 + }, + { + "kind": "func", + "name": "itemIsRelevant", + "signature": "func (v featureLevelUniqueConstraintValidator) itemIsRelevant(item *SubscriptionItemSpec) bool", + "line": 161 + }, + { + "kind": "func", + "name": "itemHasEntitlements", + "signature": "func (v featureLevelUniqueConstraintValidator) itemHasEntitlements(item *SubscriptionItemSpec) bool", + "line": 169 + }, + { + "kind": "func", + "name": "itemIsBillable", + "signature": "func (v featureLevelUniqueConstraintValidator) itemIsBillable(item *SubscriptionItemSpec) bool", + "line": 177 + }, + { + "kind": "struct", + "name": "itemSpecWithCircularReferences", + "signature": "type itemSpecWithCircularReferences struct", + "line": 186 + }, + { + "kind": "func", + "name": "GetSelectors", + "signature": "func (i itemSpecWithCircularReferences) GetSelectors() *models.FieldDescriptor", + "line": 193 + }, + { + "kind": "struct", + "name": "validationTimelineEntry", + "signature": "type validationTimelineEntry struct", + "line": 202 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (i validationTimelineEntry) GetCadence() models.CadencedModel", + "line": 207 + }, + { + "kind": "func", + "name": "GetErrorAttributes", + "signature": "func (i validationTimelineEntry) GetErrorAttributes(other validationTimelineEntry) models.Attributes", + "line": 211 + }, + { + "kind": "func", + "name": "subscriptionSpecToFieldSelectors", + "signature": "func subscriptionSpecToFieldSelectors(subscriptionSpec SubscriptionSpec) *models.FieldDescriptor", + "line": 230 + }, + { + "kind": "func", + "name": "planRefToFieldSelector", + "signature": "func planRefToFieldSelector(planRef *PlanRef) *models.FieldDescriptor", + "line": 258 + } + ], + "line_count": 282 + }, + "openmeter/subscription/uniqueness_test.go": { + "header": "\t\"fmt\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidateUniqueConstraintBySubscriptions", + "signature": "func TestValidateUniqueConstraintBySubscriptions(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestValidateUniqueConstraintByFeatures", + "signature": "func TestValidateUniqueConstraintByFeatures(t *testing.T)", + "line": 110 + }, + { + "kind": "func", + "name": "getSimpleSub", + "signature": "func getSimpleSub(cad models.CadencedModel) subscription.SubscriptionSpec", + "line": 473 + } + ], + "line_count": 492 + }, + "openmeter/subscription/validators/customer/validator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "NewValidator", + "signature": "func NewValidator(subscriptionService subscription.Service, customerService customer.Service) (*Validator, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "Validator", + "signature": "type Validator struct", + "line": 32 + }, + { + "kind": "func", + "name": "ValidateUpdateCustomer", + "signature": "func (v *Validator) ValidateUpdateCustomer(ctx context.Context, input customer.UpdateCustomerInput) error", + "line": 38 + }, + { + "kind": "func", + "name": "ValidateDeleteCustomer", + "signature": "func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error", + "line": 101 + } + ], + "line_count": 122 + }, + "openmeter/subscription/validators/subscription/components.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "validateUniqueConstraint", + "signature": "func (v SubscriptionUniqueConstraintValidator) validateUniqueConstraint(ctx context.Context, specs []subscription.SubscriptionSpec) ([]subscription.SubscriptionSpec, error)", + "line": 14 + }, + { + "kind": "func", + "name": "mapSubsToViews", + "signature": "func (v SubscriptionUniqueConstraintValidator) mapSubsToViews(ctx context.Context, subs []subscription.Subscription) ([]subscription.SubscriptionView, error)", + "line": 27 + }, + { + "kind": "func", + "name": "mapViewsToSpecs", + "signature": "func (v SubscriptionUniqueConstraintValidator) mapViewsToSpecs(views []subscription.SubscriptionView) ([]subscription.SubscriptionSpec, error)", + "line": 31 + }, + { + "kind": "func", + "name": "includeSubSpec", + "signature": "func (v SubscriptionUniqueConstraintValidator) includeSubSpec(spec subscription.SubscriptionSpec, subs []subscription.SubscriptionSpec) ([]subscription.SubscriptionSpec, error)", + "line": 37 + }, + { + "kind": "func", + "name": "includeSubViewUnique", + "signature": "func (v SubscriptionUniqueConstraintValidator) includeSubViewUnique(view subscription.SubscriptionView, views []subscription.SubscriptionView) ([]subscription.SubscriptionView, error)", + "line": 41 + }, + { + "kind": "func", + "name": "filterSubViews", + "signature": "func (v SubscriptionUniqueConstraintValidator) filterSubViews(fn func(subscription.SubscriptionView) bool, views []subscription.SubscriptionView) ([]subscription.SubscriptionView, error)", + "line": 47 + } + ], + "line_count": 49 + }, + "openmeter/subscription/validators/subscription/validator.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionUniqueConstraintValidatorConfig", + "signature": "type SubscriptionUniqueConstraintValidatorConfig struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c SubscriptionUniqueConstraintValidatorConfig) Validate() error", + "line": 23 + }, + { + "kind": "struct", + "name": "SubscriptionUniqueConstraintValidator", + "signature": "type SubscriptionUniqueConstraintValidator struct", + "line": 39 + }, + { + "kind": "func", + "name": "NewSubscriptionUniqueConstraintValidator", + "signature": "func NewSubscriptionUniqueConstraintValidator(config SubscriptionUniqueConstraintValidatorConfig) (subscription.SubscriptionCommandHook, error)", + "line": 44 + }, + { + "kind": "func", + "name": "BeforeCreate", + "signature": "func (v SubscriptionUniqueConstraintValidator) BeforeCreate(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) error", + "line": 54 + }, + { + "kind": "func", + "name": "BeforeUpdate", + "signature": "func (v SubscriptionUniqueConstraintValidator) BeforeUpdate(ctx context.Context, currentId models.NamespacedID, targetSpec subscription.SubscriptionSpec) error", + "line": 88 + }, + { + "kind": "func", + "name": "BeforeContinue", + "signature": "func (v SubscriptionUniqueConstraintValidator) BeforeContinue(ctx context.Context, view subscription.SubscriptionView) error", + "line": 140 + }, + { + "kind": "func", + "name": "AfterCreate", + "signature": "func (v SubscriptionUniqueConstraintValidator) AfterCreate(ctx context.Context, view subscription.SubscriptionView) error", + "line": 185 + }, + { + "kind": "func", + "name": "AfterUpdate", + "signature": "func (v SubscriptionUniqueConstraintValidator) AfterUpdate(ctx context.Context, view subscription.SubscriptionView) error", + "line": 189 + }, + { + "kind": "func", + "name": "AfterCancel", + "signature": "func (v SubscriptionUniqueConstraintValidator) AfterCancel(ctx context.Context, view subscription.SubscriptionView) error", + "line": 193 + }, + { + "kind": "func", + "name": "AfterContinue", + "signature": "func (v SubscriptionUniqueConstraintValidator) AfterContinue(ctx context.Context, view subscription.SubscriptionView) error", + "line": 197 + }, + { + "kind": "func", + "name": "BeforeDelete", + "signature": "func (v SubscriptionUniqueConstraintValidator) BeforeDelete(ctx context.Context, view subscription.SubscriptionView) error", + "line": 201 + }, + { + "kind": "func", + "name": "pipelineAfter", + "signature": "func (v SubscriptionUniqueConstraintValidator) pipelineAfter(ctx context.Context, view subscription.SubscriptionView) error", + "line": 205 + }, + { + "kind": "func", + "name": "collectCustomerSubscriptionsStarting", + "signature": "func (v SubscriptionUniqueConstraintValidator) collectCustomerSubscriptionsStarting(ctx context.Context, namespace string, customerID string, starting time.Time) ([]subscription.Subscription, error)", + "line": 234 + } + ], + "line_count": 242 + }, + "openmeter/subscription/workflow/annotations.go": { + "header": "\t\"github.com/oklog/ulid/v2\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "annotationParser", + "signature": "type annotationParser struct", + "line": 13 + }, + { + "kind": "func", + "name": "SetUniquePatchID", + "signature": "func (a annotationParser) SetUniquePatchID(annotations models.Annotations) models.Annotations", + "line": 17 + } + ], + "line_count": 27 + }, + "openmeter/subscription/workflow/errors.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/subscription\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "MapSubscriptionErrors", + "signature": "func MapSubscriptionErrors(err error) error", + "line": 10 + } + ], + "line_count": 22 + }, + "openmeter/subscription/workflow/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"time\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 13 + }, + { + "kind": "struct", + "name": "CreateSubscriptionWorkflowInput", + "signature": "type CreateSubscriptionWorkflowInput struct", + "line": 23 + }, + { + "kind": "struct", + "name": "ChangeSubscriptionWorkflowInput", + "signature": "type ChangeSubscriptionWorkflowInput struct", + "line": 32 + }, + { + "kind": "struct", + "name": "AddAddonWorkflowInput", + "signature": "type AddAddonWorkflowInput struct", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i AddAddonWorkflowInput) Validate() error", + "line": 51 + }, + { + "kind": "struct", + "name": "ChangeAddonQuantityWorkflowInput", + "signature": "type ChangeAddonQuantityWorkflowInput struct", + "line": 63 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ChangeAddonQuantityWorkflowInput) Validate() error", + "line": 71 + } + ], + "line_count": 73 + }, + "openmeter/subscription/workflow/service/addon.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "AddAddon", + "signature": "func (s *service) AddAddon(ctx context.Context, subscriptionID models.NamespacedID, addonInp subscriptionworkflow.AddAddonWorkflowInput) (subscription.SubscriptionView, subscriptionaddon.SubscriptionAddon, error)", + "line": 21 + }, + { + "kind": "struct", + "name": "purchaseRes", + "signature": "type purchaseRes struct", + "line": 113 + }, + { + "kind": "func", + "name": "ChangeAddonQuantity", + "signature": "func (s *service) ChangeAddonQuantity(ctx context.Context, subscriptionID models.NamespacedID, changeInp subscriptionworkflow.ChangeAddonQuantityWorkflowInput) (subscription.SubscriptionView, subscriptionaddon.SubscriptionAddon, error)", + "line": 118 + }, + { + "kind": "func", + "name": "syncWithAddons", + "signature": "func (s *service) syncWithAddons(\n\tctx context.Context,\n\tview subscription.SubscriptionView,\n\tbefore []subscriptionaddon.SubscriptionAddon,\n\tafter []subscriptionaddon.SubscriptionAddon,\n\tcurrentTime time.Time,\n) (subscription.SubscriptionView, error)", + "line": 191 + }, + { + "kind": "func", + "name": "hasAddons", + "signature": "func hasAddons(view subscription.SubscriptionView, addons []subscriptionaddon.SubscriptionAddon) bool", + "line": 270 + }, + { + "kind": "func", + "name": "asDiffs", + "signature": "func asDiffs(view subscription.SubscriptionView, subsAdds []subscriptionaddon.SubscriptionAddon) ([]addondiff.Diffable, error)", + "line": 286 + } + ], + "line_count": 297 + }, + "openmeter/subscription/workflow/service/addon_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestAddAddon", + "signature": "func TestAddAddon(t *testing.T)", + "line": 31 + }, + { + "kind": "func", + "name": "TestChangeAddonQuantity", + "signature": "func TestChangeAddonQuantity(t *testing.T)", + "line": 311 + }, + { + "kind": "func", + "name": "stripFeatureIDs", + "signature": "func stripFeatureIDs(spec *subscription.SubscriptionSpec)", + "line": 649 + }, + { + "kind": "func", + "name": "TestAddonCombinations", + "signature": "func TestAddonCombinations(t *testing.T)", + "line": 662 + } + ], + "line_count": 799 + }, + "openmeter/subscription/workflow/service/service.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "WorkflowServiceConfig", + "signature": "type WorkflowServiceConfig struct", + "line": 17 + }, + { + "kind": "struct", + "name": "service", + "signature": "type service struct", + "line": 29 + }, + { + "kind": "func", + "name": "NewWorkflowService", + "signature": "func NewWorkflowService(cfg WorkflowServiceConfig) subscriptionworkflow.Service", + "line": 33 + }, + { + "kind": "func", + "name": "lockCustomer", + "signature": "func (s *service) lockCustomer(ctx context.Context, customerId string) error", + "line": 41 + } + ], + "line_count": 52 + }, + "openmeter/subscription/workflow/service/subscription.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"maps\"", + "symbols": [ + { + "kind": "func", + "name": "CreateFromPlan", + "signature": "func (s *service) CreateFromPlan(ctx context.Context, inp subscriptionworkflow.CreateSubscriptionWorkflowInput, plan subscription.Plan) (subscription.SubscriptionView, error)", + "line": 23 + }, + { + "kind": "func", + "name": "EditRunning", + "signature": "func (s *service) EditRunning(ctx context.Context, subscriptionID models.NamespacedID, customizations []subscription.Patch, timing subscription.Timing) (subscription.SubscriptionView, error)", + "line": 94 + }, + { + "kind": "func", + "name": "ChangeToPlan", + "signature": "func (s *service) ChangeToPlan(ctx context.Context, subscriptionID models.NamespacedID, inp subscriptionworkflow.ChangeSubscriptionWorkflowInput, plan subscription.Plan) (subscription.Subscription, subscription.SubscriptionView, error)", + "line": 182 + }, + { + "kind": "func", + "name": "Restore", + "signature": "func (s *service) Restore(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error)", + "line": 247 + } + ], + "line_count": 293 + }, + "openmeter/subscription/workflow/service/subscription_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreateFromPlan", + "signature": "func TestCreateFromPlan(t *testing.T)", + "line": 35 + }, + { + "kind": "func", + "name": "TestEditRunning", + "signature": "func TestEditRunning(t *testing.T)", + "line": 163 + }, + { + "kind": "func", + "name": "TestEditingCurrentPhase", + "signature": "func TestEditingCurrentPhase(t *testing.T)", + "line": 382 + }, + { + "kind": "func", + "name": "TestEditingWithTiming", + "signature": "func TestEditingWithTiming(t *testing.T)", + "line": 577 + }, + { + "kind": "func", + "name": "TestChangeToPlan", + "signature": "func TestChangeToPlan(t *testing.T)", + "line": 819 + }, + { + "kind": "func", + "name": "TestEditCombinations", + "signature": "func TestEditCombinations(t *testing.T)", + "line": 1017 + }, + { + "kind": "func", + "name": "TestRestore", + "signature": "func TestRestore(t *testing.T)", + "line": 1388 + }, + { + "kind": "func", + "name": "TestMultiSubscription", + "signature": "func TestMultiSubscription(t *testing.T)", + "line": 1576 + }, + { + "kind": "func", + "name": "TestSubscriptionChangeTrackingAnnotations", + "signature": "func TestSubscriptionChangeTrackingAnnotations(t *testing.T)", + "line": 1771 + }, + { + "kind": "func", + "name": "TestSettlementMode", + "signature": "func TestSettlementMode(t *testing.T)", + "line": 1976 + } + ], + "line_count": 2131 + }, + "openmeter/taxcode/adapter/adapter.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 19 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (taxcode.Repository, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "adapter", + "signature": "type adapter struct", + "line": 55 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 61 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) *adapter", + "line": 72 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (a *adapter) Self() *adapter", + "line": 81 + } + ], + "line_count": 83 + }, + "openmeter/taxcode/adapter/mapping.go": { + "header": "\t\"errors\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/ent/db\"", + "symbols": [ + { + "kind": "func", + "name": "MapTaxCodeFromEntity", + "signature": "func MapTaxCodeFromEntity(entity *db.TaxCode) (taxcode.TaxCode, error)", + "line": 13 + } + ], + "line_count": 35 + }, + "openmeter/taxcode/adapter/organizationdefaulttaxcodes.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (a *adapter) GetOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.GetOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 16 + }, + { + "kind": "func", + "name": "UpsertOrganizationDefaultTaxCodes", + "signature": "func (a *adapter) UpsertOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.UpsertOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 47 + }, + { + "kind": "func", + "name": "mapOrganizationDefaultTaxCodesFromEntity", + "signature": "func mapOrganizationDefaultTaxCodesFromEntity(entity *db.OrganizationDefaultTaxCodes, expand taxcode.OrganizationDefaultTaxCodesExpand) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 78 + } + ], + "line_count": 122 + }, + "openmeter/taxcode/adapter/taxcode.go": { + "header": "\t\"cmp\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (a *adapter) CreateTaxCode(ctx context.Context, input taxcode.CreateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 21 + }, + { + "kind": "func", + "name": "UpdateTaxCode", + "signature": "func (a *adapter) UpdateTaxCode(ctx context.Context, input taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 52 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (a *adapter) ListTaxCodes(ctx context.Context, input taxcode.ListTaxCodesInput) (pagination.Result[taxcode.TaxCode], error)", + "line": 85 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (a *adapter) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error)", + "line": 106 + }, + { + "kind": "func", + "name": "GetTaxCodeByAppMapping", + "signature": "func (a *adapter) GetTaxCodeByAppMapping(ctx context.Context, input taxcode.GetTaxCodeByAppMappingInput) (taxcode.TaxCode, error)", + "line": 132 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (a *adapter) DeleteTaxCode(ctx context.Context, input taxcode.DeleteTaxCodeInput) error", + "line": 191 + } + ], + "line_count": 221 + }, + "openmeter/taxcode/annotations.go": { + "header": "const (\n\tAnnotationKeyManagedBy = \"managed_by\"\n\tAnnotationValueManagedBySystem = \"system\"", + "symbols": [], + "line_count": 10 + }, + "openmeter/taxcode/errors.go": { + "header": "\t\"errors\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/commonhttp\"", + "symbols": [ + { + "kind": "func", + "name": "NewTaxCodeNotFoundError", + "signature": "func NewTaxCodeNotFoundError(id string) error", + "line": 69 + }, + { + "kind": "func", + "name": "NewTaxCodeByAppMappingNotFoundError", + "signature": "func NewTaxCodeByAppMappingNotFoundError(appType, taxCode string) error", + "line": 75 + }, + { + "kind": "func", + "name": "IsTaxCodeNotFoundError", + "signature": "func IsTaxCodeNotFoundError(err error) bool", + "line": 82 + }, + { + "kind": "func", + "name": "NewOrganizationDefaultTaxCodesNotFoundError", + "signature": "func NewOrganizationDefaultTaxCodesNotFoundError(namespace string) error", + "line": 125 + }, + { + "kind": "func", + "name": "IsOrganizationDefaultTaxCodesNotFoundError", + "signature": "func IsOrganizationDefaultTaxCodesNotFoundError(err error) bool", + "line": 131 + }, + { + "kind": "func", + "name": "IsTaxCodeIsOrganizationDefaultError", + "signature": "func IsTaxCodeIsOrganizationDefaultError(err error) bool", + "line": 145 + }, + { + "kind": "func", + "name": "IsTaxCodeOrphanedKeyError", + "signature": "func IsTaxCodeOrphanedKeyError(err error) bool", + "line": 156 + } + ], + "line_count": 158 + }, + "openmeter/taxcode/namespacehandler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "SeedEntry", + "signature": "type SeedEntry struct", + "line": 17 + }, + { + "kind": "struct", + "name": "NamespaceHandlerConfig", + "signature": "type NamespaceHandlerConfig struct", + "line": 27 + }, + { + "kind": "func", + "name": "validate", + "signature": "func (c NamespaceHandlerConfig) validate() error", + "line": 34 + }, + { + "kind": "struct", + "name": "NamespaceHandler", + "signature": "type NamespaceHandler struct", + "line": 66 + }, + { + "kind": "func", + "name": "NewNamespaceHandler", + "signature": "func NewNamespaceHandler(cfg NamespaceHandlerConfig) (*NamespaceHandler, error)", + "line": 77 + }, + { + "kind": "func", + "name": "CreateNamespace", + "signature": "func (h *NamespaceHandler) CreateNamespace(ctx context.Context, ns string) error", + "line": 95 + }, + { + "kind": "func", + "name": "DeleteNamespace", + "signature": "func (h *NamespaceHandler) DeleteNamespace(_ context.Context, _ string) error", + "line": 151 + }, + { + "kind": "func", + "name": "ensureTaxCode", + "signature": "func (h *NamespaceHandler) ensureTaxCode(ctx context.Context, ns string, seed SeedEntry, existingByKey map[string]TaxCode) (string, error)", + "line": 159 + } + ], + "line_count": 199 + }, + "openmeter/taxcode/namespacehandler_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "makeTestSeeds", + "signature": "func makeTestSeeds() []taxcode.SeedEntry", + "line": 19 + }, + { + "kind": "func", + "name": "TestNamespaceHandler", + "signature": "func TestNamespaceHandler(t *testing.T)", + "line": 34 + }, + { + "kind": "func", + "name": "TestNewNamespaceHandler_Validation", + "signature": "func TestNewNamespaceHandler_Validation(t *testing.T)", + "line": 219 + } + ], + "line_count": 269 + }, + "openmeter/taxcode/repository.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "interface", + "name": "Repository", + "signature": "type Repository interface", + "line": 10 + } + ], + "line_count": 22 + }, + "openmeter/taxcode/service.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 12 + }, + { + "kind": "interface", + "name": "TaxCodeService", + "signature": "type TaxCodeService interface", + "line": 17 + }, + { + "kind": "interface", + "name": "OrganizationDefaultTaxCodesService", + "signature": "type OrganizationDefaultTaxCodesService interface", + "line": 27 + }, + { + "kind": "struct", + "name": "inputOptions", + "signature": "type inputOptions struct", + "line": 32 + }, + { + "kind": "struct", + "name": "CreateTaxCodeInput", + "signature": "type CreateTaxCodeInput struct", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateTaxCodeInput) Validate() error", + "line": 58 + }, + { + "kind": "struct", + "name": "UpdateTaxCodeInput", + "signature": "type UpdateTaxCodeInput struct", + "line": 80 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpdateTaxCodeInput) Validate() error", + "line": 92 + }, + { + "kind": "struct", + "name": "ListTaxCodesInput", + "signature": "type ListTaxCodesInput struct", + "line": 110 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i ListTaxCodesInput) Validate() error", + "line": 117 + }, + { + "kind": "struct", + "name": "GetTaxCodeInput", + "signature": "type GetTaxCodeInput struct", + "line": 132 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetTaxCodeInput) Validate() error", + "line": 140 + }, + { + "kind": "struct", + "name": "GetTaxCodeByAppMappingInput", + "signature": "type GetTaxCodeByAppMappingInput struct", + "line": 149 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetTaxCodeByAppMappingInput) Validate() error", + "line": 155 + }, + { + "kind": "struct", + "name": "GetOrCreateByAppMappingInput", + "signature": "type GetOrCreateByAppMappingInput struct", + "line": 173 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetOrCreateByAppMappingInput) Validate() error", + "line": 179 + }, + { + "kind": "struct", + "name": "DeleteTaxCodeInput", + "signature": "type DeleteTaxCodeInput struct", + "line": 197 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DeleteTaxCodeInput) Validate() error", + "line": 203 + }, + { + "kind": "struct", + "name": "GetOrganizationDefaultTaxCodesInput", + "signature": "type GetOrganizationDefaultTaxCodesInput struct", + "line": 211 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i GetOrganizationDefaultTaxCodesInput) Validate() error", + "line": 216 + }, + { + "kind": "struct", + "name": "UpsertOrganizationDefaultTaxCodesInput", + "signature": "type UpsertOrganizationDefaultTaxCodesInput struct", + "line": 224 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i UpsertOrganizationDefaultTaxCodesInput) Validate() error", + "line": 231 + } + ], + "line_count": 247 + }, + "openmeter/taxcode/service/organizationdefaulttaxcodes.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/openmeter/taxcode\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transaction\"", + "symbols": [ + { + "kind": "func", + "name": "GetOrganizationDefaultTaxCodes", + "signature": "func (s *Service) GetOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.GetOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 11 + }, + { + "kind": "func", + "name": "UpsertOrganizationDefaultTaxCodes", + "signature": "func (s *Service) UpsertOrganizationDefaultTaxCodes(ctx context.Context, input taxcode.UpsertOrganizationDefaultTaxCodesInput) (taxcode.OrganizationDefaultTaxCodes, error)", + "line": 21 + } + ], + "line_count": 42 + }, + "openmeter/taxcode/service/organizationdefaulttaxcodes_test.go": { + "header": "\t\"testing\"\n\t\"github.com/oklog/ulid/v2\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestOrganizationDefaultTaxCodesService", + "signature": "func TestOrganizationDefaultTaxCodesService(t *testing.T)", + "line": 16 + } + ], + "line_count": 286 + }, + "openmeter/taxcode/service/service.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/openmeterio/openmeter/openmeter/taxcode\"", + "symbols": [ + { + "kind": "struct", + "name": "Service", + "signature": "type Service struct", + "line": 12 + }, + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 17 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 22 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(config Config) (*Service, error)", + "line": 36 + } + ], + "line_count": 45 + }, + "openmeter/taxcode/service/taxcode.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/openmeter/taxcode\"", + "symbols": [ + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (s *Service) CreateTaxCode(ctx context.Context, input taxcode.CreateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 13 + }, + { + "kind": "func", + "name": "UpdateTaxCode", + "signature": "func (s *Service) UpdateTaxCode(ctx context.Context, input taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error)", + "line": 23 + }, + { + "kind": "func", + "name": "ListTaxCodes", + "signature": "func (s *Service) ListTaxCodes(ctx context.Context, input taxcode.ListTaxCodesInput) (pagination.Result[taxcode.TaxCode], error)", + "line": 42 + }, + { + "kind": "func", + "name": "GetTaxCode", + "signature": "func (s *Service) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error)", + "line": 52 + }, + { + "kind": "func", + "name": "GetTaxCodeByAppMapping", + "signature": "func (s *Service) GetTaxCodeByAppMapping(ctx context.Context, input taxcode.GetTaxCodeByAppMappingInput) (taxcode.TaxCode, error)", + "line": 62 + }, + { + "kind": "func", + "name": "GetOrCreateByAppMapping", + "signature": "func (s *Service) GetOrCreateByAppMapping(ctx context.Context, input taxcode.GetOrCreateByAppMappingInput) (taxcode.TaxCode, error)", + "line": 74 + }, + { + "kind": "func", + "name": "DeleteTaxCode", + "signature": "func (s *Service) DeleteTaxCode(ctx context.Context, input taxcode.DeleteTaxCodeInput) error", + "line": 123 + } + ], + "line_count": 149 + }, + "openmeter/taxcode/service/taxcode_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestTaxCodeService", + "signature": "func TestTaxCodeService(t *testing.T)", + "line": 16 + } + ], + "line_count": 229 + }, + "openmeter/taxcode/taxcode.go": { + "header": "\t\"errors\"\n\t\"regexp\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeAppMapping", + "signature": "type TaxCodeAppMapping struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TaxCodeAppMapping) Validate() error", + "line": 21 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TaxCodeAppMappings) Validate() error", + "line": 45 + }, + { + "kind": "struct", + "name": "TaxCode", + "signature": "type TaxCode struct", + "line": 66 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (t *TaxCode) Equal(v *TaxCode) bool", + "line": 92 + }, + { + "kind": "func", + "name": "IsManagedBySystem", + "signature": "func (t TaxCode) IsManagedBySystem() bool", + "line": 136 + }, + { + "kind": "func", + "name": "GetAppMapping", + "signature": "func (t TaxCode) GetAppMapping(appType app.AppType) (TaxCodeAppMapping, bool)", + "line": 148 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TaxCode) Validate() error", + "line": 154 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodesExpand", + "signature": "type OrganizationDefaultTaxCodesExpand struct", + "line": 173 + }, + { + "kind": "struct", + "name": "OrganizationDefaultTaxCodes", + "signature": "type OrganizationDefaultTaxCodes struct", + "line": 185 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o OrganizationDefaultTaxCodes) Validate() error", + "line": 196 + } + ], + "line_count": 228 + }, + "openmeter/taxcode/testutils/env.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "TestEnv", + "signature": "type TestEnv struct", + "line": 19 + }, + { + "kind": "func", + "name": "DBSchemaMigrate", + "signature": "func (e *TestEnv) DBSchemaMigrate(t *testing.T)", + "line": 28 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (e *TestEnv) Close(t *testing.T)", + "line": 37 + }, + { + "kind": "func", + "name": "CreateTaxCode", + "signature": "func (e *TestEnv) CreateTaxCode(ctx context.Context, t *testing.T, namespace string, opts ...taxcode.CreateTaxCodeInput) taxcode.TaxCode", + "line": 61 + }, + { + "kind": "func", + "name": "SetupNamespaceDefaults", + "signature": "func (e *TestEnv) SetupNamespaceDefaults(ctx context.Context, t *testing.T, namespace string)", + "line": 81 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T) *TestEnv", + "line": 100 + } + ], + "line_count": 131 + }, + "openmeter/testutils/async.go": { + "header": "\t\"sync\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "EventuallyWithTf", + "signature": "func EventuallyWithTf(t *testing.T, fn func(c *assert.CollectT, saveErr func(err any)), wait time.Duration, interval time.Duration)", + "line": 12 + } + ], + "line_count": 26 + }, + "openmeter/testutils/logger.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(t testing.TB) *slog.Logger", + "line": 9 + }, + { + "kind": "func", + "name": "NewDiscardLogger", + "signature": "func NewDiscardLogger(t testing.TB) *slog.Logger", + "line": 14 + }, + { + "kind": "struct", + "name": "discardHandler", + "signature": "type discardHandler struct", + "line": 23 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (dh discardHandler) Enabled(context.Context, slog.Level) bool", + "line": 25 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (dh discardHandler) Handle(context.Context, slog.Record) error", + "line": 26 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (dh discardHandler) WithAttrs(attrs []slog.Attr) slog.Handler", + "line": 27 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (dh discardHandler) WithGroup(name string) slog.Handler", + "line": 28 + } + ], + "line_count": 28 + }, + "openmeter/testutils/namegen.go": { + "header": "\t\"strings\"\n\t\"time\"\n\t\"github.com/forscht/namegen\"", + "symbols": [ + { + "kind": "struct", + "name": "nameGenerator", + "signature": "type nameGenerator struct", + "line": 13 + }, + { + "kind": "func", + "name": "newNameGenerator", + "signature": "func newNameGenerator() *nameGenerator", + "line": 17 + }, + { + "kind": "struct", + "name": "GeneratedName", + "signature": "type GeneratedName struct", + "line": 26 + }, + { + "kind": "func", + "name": "Generate", + "signature": "func (g *nameGenerator) Generate() GeneratedName", + "line": 31 + } + ], + "line_count": 38 + }, + "openmeter/testutils/namegen_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "Test_NameGen", + "signature": "func Test_NameGen(t *testing.T)", + "line": 10 + } + ], + "line_count": 19 + }, + "openmeter/testutils/pg_driver.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"os\"", + "symbols": [ + { + "kind": "struct", + "name": "NoopMigrator", + "signature": "type NoopMigrator struct", + "line": 17 + }, + { + "kind": "func", + "name": "Hash", + "signature": "func (m *NoopMigrator) Hash() (string, error)", + "line": 20 + }, + { + "kind": "func", + "name": "Migrate", + "signature": "func (m *NoopMigrator) Migrate(\n\tctx context.Context,\n\tdb *sql.DB,\n\ttemplateConf pgtestdb.Config,\n) error", + "line": 28 + }, + { + "kind": "struct", + "name": "TestDB", + "signature": "type TestDB struct", + "line": 54 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d *TestDB) Close(t *testing.T)", + "line": 60 + }, + { + "kind": "struct", + "name": "options", + "signature": "type options struct", + "line": 70 + }, + { + "kind": "interface", + "name": "Option", + "signature": "type Option interface", + "line": 76 + }, + { + "kind": "func", + "name": "apply", + "signature": "func (fn optionFunc) apply(c *options)", + "line": 82 + }, + { + "kind": "func", + "name": "WithPostgresConfig", + "signature": "func WithPostgresConfig(config pgtestdb.Config) Option", + "line": 86 + }, + { + "kind": "func", + "name": "WithMigrator", + "signature": "func WithMigrator(migrator pgtestdb.Migrator) Option", + "line": 92 + }, + { + "kind": "func", + "name": "WithDriverOptions", + "signature": "func WithDriverOptions(opts []pgdriver.Option) Option", + "line": 98 + }, + { + "kind": "func", + "name": "InitPostgresDB", + "signature": "func InitPostgresDB(t *testing.T, opts ...Option) *TestDB", + "line": 104 + } + ], + "line_count": 153 + }, + "openmeter/testutils/time.go": { + "header": "\t\"testing\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetRFC3339Time", + "signature": "func GetRFC3339Time(t *testing.T, timeString string) time.Time", + "line": 8 + }, + { + "kind": "func", + "name": "TimeEqualsApproximately", + "signature": "func TimeEqualsApproximately(t *testing.T, expected time.Time, actual time.Time, tolerance time.Duration)", + "line": 17 + } + ], + "line_count": 23 + }, + "openmeter/watermill/driver/kafka/broker.go": { + "header": "\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BrokerOptions", + "signature": "type BrokerOptions struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *BrokerOptions) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "createKafkaConfig", + "signature": "func (o *BrokerOptions) createKafkaConfig(role string) (*sarama.Config, error)", + "line": 48 + } + ], + "line_count": 127 + }, + "openmeter/watermill/driver/kafka/logger.go": { + "header": "\t\"fmt\"\n)\ntype LoggerFunc func(fmt string, args ...any)", + "symbols": [ + { + "kind": "struct", + "name": "SaramaLoggerAdaptor", + "signature": "type SaramaLoggerAdaptor struct", + "line": 9 + }, + { + "kind": "func", + "name": "Print", + "signature": "func (s *SaramaLoggerAdaptor) Print(v ...interface{})", + "line": 13 + }, + { + "kind": "func", + "name": "Printf", + "signature": "func (s *SaramaLoggerAdaptor) Printf(format string, v ...interface{})", + "line": 17 + }, + { + "kind": "func", + "name": "Println", + "signature": "func (s *SaramaLoggerAdaptor) Println(v ...interface{})", + "line": 21 + } + ], + "line_count": 23 + }, + "openmeter/watermill/driver/kafka/marshaler.go": { + "header": "\t\"github.com/IBM/sarama\"\n\t\"github.com/ThreeDotsLabs/watermill-kafka/v3/pkg/kafka\"\n\t\"github.com/ThreeDotsLabs/watermill/message\"", + "symbols": [ + { + "kind": "struct", + "name": "marshalerWithPartitionKey", + "signature": "type marshalerWithPartitionKey struct", + "line": 15 + }, + { + "kind": "func", + "name": "Marshal", + "signature": "func (m marshalerWithPartitionKey) Marshal(topic string, msg *message.Message) (*sarama.ProducerMessage, error)", + "line": 19 + }, + { + "kind": "func", + "name": "AddPartitionKeyFromSubject", + "signature": "func AddPartitionKeyFromSubject(watermillIn *message.Message, cloudEvent event.Event) (*message.Message, error)", + "line": 37 + } + ], + "line_count": 42 + }, + "openmeter/watermill/driver/kafka/metrics.go": { + "header": "\t\"strings\"\n\t\"go.opentelemetry.io/otel/attribute\"\n\t\"github.com/openmeterio/openmeter/openmeter/watermill/driver/kafka/metrics\"", + "symbols": [ + { + "kind": "func", + "name": "SaramaMetricRenamer", + "signature": "func SaramaMetricRenamer(role string) metrics.TransformMetricsNameToOtel", + "line": 16 + } + ], + "line_count": 41 + }, + "openmeter/watermill/driver/kafka/metrics/README.md": { + "header": "# go-metrics to OpenTelemetry adapter\n\nSarama (any most probably other projects) rely on the [http://github.com/rcrowley/go-metrics](go-metrics) package, numerous connectors exist\nfor the package, however there seem to be no opentelemetry one.\n\nGiven the package only supports periodic scraping, it's better to wrap the metric types of go-metrics so that we can send the raw events to OpenTelemetry. The existing event interface of go-metrics is quite limited compared to OpenTelemetry esp considering the usage in Sarama lib, so right now:\n\n- Context is context.Background() for OpenTelemetry calls\n- Errors for metric registration is only logged", + "symbols": [], + "line_count": 9 + }, + "openmeter/watermill/driver/kafka/metrics/adapter.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TransformedMetric", + "signature": "type TransformedMetric struct", + "line": 16 + }, + { + "kind": "func", + "name": "LoggingErrorHandler", + "signature": "func LoggingErrorHandler(dest *slog.Logger) ErrorHandler", + "line": 27 + }, + { + "kind": "struct", + "name": "NewRegistryOptions", + "signature": "type NewRegistryOptions struct", + "line": 33 + }, + { + "kind": "func", + "name": "NewRegistry", + "signature": "func NewRegistry(opts NewRegistryOptions) (metrics.Registry, error)", + "line": 39 + }, + { + "kind": "struct", + "name": "registry", + "signature": "type registry struct", + "line": 67 + }, + { + "kind": "func", + "name": "GetOrRegister", + "signature": "func (r *registry) GetOrRegister(name string, def interface{}) interface", + "line": 76 + }, + { + "kind": "func", + "name": "Register", + "signature": "func (r *registry) Register(name string, def interface{}) error", + "line": 98 + }, + { + "kind": "func", + "name": "getWrappedMeter", + "signature": "func (r *registry) getWrappedMeter(name string, def interface{}) (interface", + "line": 110 + }, + { + "kind": "struct", + "name": "wrappedMeter", + "signature": "type wrappedMeter struct", + "line": 169 + }, + { + "kind": "func", + "name": "Mark", + "signature": "func (m *wrappedMeter) Mark(n int64)", + "line": 175 + }, + { + "kind": "struct", + "name": "wrappedCounter", + "signature": "type wrappedCounter struct", + "line": 180 + }, + { + "kind": "func", + "name": "Inc", + "signature": "func (m *wrappedCounter) Inc(n int64)", + "line": 186 + }, + { + "kind": "func", + "name": "Dec", + "signature": "func (m *wrappedCounter) Dec(n int64)", + "line": 191 + }, + { + "kind": "struct", + "name": "wrappedGaugeFloat64", + "signature": "type wrappedGaugeFloat64 struct", + "line": 196 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (m *wrappedGaugeFloat64) Update(newVal float64)", + "line": 202 + }, + { + "kind": "struct", + "name": "wrappedGauge", + "signature": "type wrappedGauge struct", + "line": 207 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (m *wrappedGauge) Update(newVal int64)", + "line": 213 + }, + { + "kind": "struct", + "name": "wrappedHistogram", + "signature": "type wrappedHistogram struct", + "line": 218 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (m *wrappedHistogram) Update(newVal int64)", + "line": 224 + } + ], + "line_count": 227 + }, + "openmeter/watermill/driver/kafka/publisher.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "PublisherOptions", + "signature": "type PublisherOptions struct", + "line": 14 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *PublisherOptions) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "NewPublisher", + "signature": "func NewPublisher(ctx context.Context, in PublisherOptions) (*kafka.Publisher, error)", + "line": 28 + } + ], + "line_count": 55 + }, + "openmeter/watermill/driver/kafka/saslscram.go": { + "header": "\t\"crypto/sha256\"\n\t\"crypto/sha512\"\n\t\"github.com/xdg-go/scram\"", + "symbols": [ + { + "kind": "struct", + "name": "XDGSCRAMClient", + "signature": "type XDGSCRAMClient struct", + "line": 18 + }, + { + "kind": "func", + "name": "Begin", + "signature": "func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)", + "line": 24 + }, + { + "kind": "func", + "name": "Step", + "signature": "func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)", + "line": 33 + }, + { + "kind": "func", + "name": "Done", + "signature": "func (x *XDGSCRAMClient) Done() bool", + "line": 38 + } + ], + "line_count": 40 + }, + "openmeter/watermill/driver/kafka/subscriber.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriberOptions", + "signature": "type SubscriberOptions struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *SubscriberOptions) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "NewSubscriber", + "signature": "func NewSubscriber(in SubscriberOptions) (message.Subscriber, error)", + "line": 39 + } + ], + "line_count": 65 + }, + "openmeter/watermill/driver/noop/publisher.go": { + "header": "type Publisher struct{}\nvar _ message.Publisher = (*Publisher)(nil)\nfunc (Publisher) Publish(topic string, messages ...*message.Message) error {", + "symbols": [ + { + "kind": "struct", + "name": "Publisher", + "signature": "type Publisher struct", + "line": 5 + } + ], + "line_count": 16 + }, + "openmeter/watermill/eventbus/eventbus.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TopicMapping", + "signature": "type TopicMapping struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (t TopicMapping) Validate() error", + "line": 28 + }, + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 44 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o Options) Validate() error", + "line": 51 + }, + { + "kind": "interface", + "name": "Publisher", + "signature": "type Publisher interface", + "line": 67 + }, + { + "kind": "interface", + "name": "ContextPublisher", + "signature": "type ContextPublisher interface", + "line": 81 + }, + { + "kind": "struct", + "name": "publisher", + "signature": "type publisher struct", + "line": 86 + }, + { + "kind": "func", + "name": "Publish", + "signature": "func (p publisher) Publish(ctx context.Context, event marshaler.Event) error", + "line": 91 + }, + { + "kind": "func", + "name": "Marshaler", + "signature": "func (p publisher) Marshaler() marshaler.Marshaler", + "line": 100 + }, + { + "kind": "struct", + "name": "contextPublisher", + "signature": "type contextPublisher struct", + "line": 104 + }, + { + "kind": "func", + "name": "WithContext", + "signature": "func (p publisher) WithContext(ctx context.Context) ContextPublisher", + "line": 109 + }, + { + "kind": "func", + "name": "PublishIfNoError", + "signature": "func (p contextPublisher) PublishIfNoError(event marshaler.Event, err error) error", + "line": 116 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(opts Options) (Publisher, error)", + "line": 124 + }, + { + "kind": "func", + "name": "NewMock", + "signature": "func NewMock(t *testing.T) Publisher", + "line": 159 + } + ], + "line_count": 172 + }, + "openmeter/watermill/grouphandler/grouphandler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"sync\"", + "symbols": [ + { + "kind": "struct", + "name": "NoPublishingHandler", + "signature": "type NoPublishingHandler struct", + "line": 33 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h *NoPublishingHandler) Handle(msg *message.Message) error", + "line": 40 + }, + { + "kind": "func", + "name": "AddHandler", + "signature": "func (h *NoPublishingHandler) AddHandler(handler GroupEventHandler)", + "line": 92 + }, + { + "kind": "func", + "name": "NewNoPublishingHandler", + "signature": "func NewNoPublishingHandler(marshaler cqrs.CommandEventMarshaler, metricMeter metric.Meter, groupHandlers ...GroupEventHandler) (*NoPublishingHandler, error)", + "line": 101 + }, + { + "kind": "struct", + "name": "meters", + "signature": "type meters struct", + "line": 120 + }, + { + "kind": "func", + "name": "getMeters", + "signature": "func getMeters(meter metric.Meter) (*meters, error)", + "line": 125 + } + ], + "line_count": 140 + }, + "openmeter/watermill/marshaler/marshaler.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Event", + "signature": "type Event interface", + "line": 32 + }, + { + "kind": "struct", + "name": "marshaler", + "signature": "type marshaler struct", + "line": 38 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(transform TransformFunc) Marshaler", + "line": 42 + }, + { + "kind": "func", + "name": "Marshal", + "signature": "func (m *marshaler) Marshal(v interface{}) (*message.Message, error)", + "line": 48 + }, + { + "kind": "func", + "name": "NewCloudEvent", + "signature": "func NewCloudEvent(ev Event) (cloudevents.Event, error)", + "line": 85 + }, + { + "kind": "func", + "name": "Unmarshal", + "signature": "func (m *marshaler) Unmarshal(msg *message.Message, v interface{}) error", + "line": 122 + }, + { + "kind": "func", + "name": "Name", + "signature": "func (m *marshaler) Name(v interface{}) string", + "line": 141 + }, + { + "kind": "func", + "name": "NameFromMessage", + "signature": "func (m *marshaler) NameFromMessage(msg *message.Message) string", + "line": 152 + } + ], + "line_count": 154 + }, + "openmeter/watermill/marshaler/source.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "eventWithSource", + "signature": "type eventWithSource struct", + "line": 10 + }, + { + "kind": "func", + "name": "WithSource", + "signature": "func WithSource(source string, ev Event) Event", + "line": 17 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e *eventWithSource) EventMetadata() metadata.EventMetadata", + "line": 24 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e *eventWithSource) Validate() error", + "line": 31 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e *eventWithSource) EventName() string", + "line": 43 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (e *eventWithSource) MarshalJSON() ([]byte, error)", + "line": 49 + } + ], + "line_count": 51 + }, + "openmeter/watermill/marshaler/source_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/openmeterio/openmeter/openmeter/event/metadata\"", + "symbols": [ + { + "kind": "struct", + "name": "event", + "signature": "type event struct", + "line": 11 + }, + { + "kind": "func", + "name": "EventMetadata", + "signature": "func (e *event) EventMetadata() metadata.EventMetadata", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (e *event) Validate() error", + "line": 19 + }, + { + "kind": "func", + "name": "EventName", + "signature": "func (e *event) EventName() string", + "line": 23 + }, + { + "kind": "func", + "name": "TestWithSubject", + "signature": "func TestWithSubject(t *testing.T)", + "line": 27 + } + ], + "line_count": 47 + }, + "openmeter/watermill/nopublisher/nopublisher.go": { + "header": "\t\"errors\"\n\t\"github.com/ThreeDotsLabs/watermill/message\"\n)", + "symbols": [ + { + "kind": "func", + "name": "NoPublisherHandlerToHandlerFunc", + "signature": "func NoPublisherHandlerToHandlerFunc(h message.NoPublishHandlerFunc) message.HandlerFunc", + "line": 11 + }, + { + "kind": "func", + "name": "HandlerFuncToNoPublisherHandler", + "signature": "func HandlerFuncToNoPublisherHandler(h message.HandlerFunc) message.NoPublishHandlerFunc", + "line": 17 + } + ], + "line_count": 25 + }, + "openmeter/watermill/router/context.go": { + "header": "\t\"github.com/ThreeDotsLabs/watermill/message\"\n)\nfunc RestoreContext(h message.HandlerFunc) message.HandlerFunc {", + "symbols": [ + { + "kind": "func", + "name": "RestoreContext", + "signature": "func RestoreContext(h message.HandlerFunc) message.HandlerFunc", + "line": 10 + } + ], + "line_count": 19 + }, + "openmeter/watermill/router/errors.go": { + "header": "type WarningLogSeverityError struct {\n\terr error\n}", + "symbols": [ + { + "kind": "struct", + "name": "WarningLogSeverityError", + "signature": "type WarningLogSeverityError struct", + "line": 5 + }, + { + "kind": "func", + "name": "NewWarningLogSeverityError", + "signature": "func NewWarningLogSeverityError(err error) error", + "line": 9 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *WarningLogSeverityError) Error() string", + "line": 13 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *WarningLogSeverityError) Unwrap() error", + "line": 17 + } + ], + "line_count": 19 + }, + "openmeter/watermill/router/logger.go": { + "header": "\t\"log/slog\"\n\t\"github.com/ThreeDotsLabs/watermill\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "warningOnlyLogger", + "signature": "type warningOnlyLogger struct", + "line": 11 + }, + { + "kind": "func", + "name": "newWarningOnlyLogger", + "signature": "func newWarningOnlyLogger(logger *slog.Logger) watermill.LoggerAdapter", + "line": 17 + }, + { + "kind": "func", + "name": "With", + "signature": "func (l warningOnlyLogger) With(fields watermill.LogFields) watermill.LoggerAdapter", + "line": 21 + }, + { + "kind": "func", + "name": "slogAttrsFromFields", + "signature": "func (l warningOnlyLogger) slogAttrsFromFields(fields watermill.LogFields) []interface", + "line": 27 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (l warningOnlyLogger) Error(msg string, err error, fields watermill.LogFields)", + "line": 37 + } + ], + "line_count": 41 + }, + "openmeter/watermill/router/metrics.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "HandlerMetrics", + "signature": "func HandlerMetrics(metricMeter metric.Meter, prefix string, log *slog.Logger) (func(message.HandlerFunc) message.HandlerFunc, error)", + "line": 33 + }, + { + "kind": "struct", + "name": "NewDLQTelemetryOptions", + "signature": "type NewDLQTelemetryOptions struct", + "line": 91 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *NewDLQTelemetryOptions) Validate() error", + "line": 99 + }, + { + "kind": "func", + "name": "NewDLQTelemetryMiddleware", + "signature": "func NewDLQTelemetryMiddleware(opts NewDLQTelemetryOptions) (func(message.HandlerFunc) message.HandlerFunc, error)", + "line": 121 + }, + { + "kind": "func", + "name": "metricAttributeTypeFromMessage", + "signature": "func metricAttributeTypeFromMessage(msg *message.Message) attribute.KeyValue", + "line": 208 + } + ], + "line_count": 215 + }, + "openmeter/watermill/router/router.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"github.com/ThreeDotsLabs/watermill\"", + "symbols": [ + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (o *Options) Validate() error", + "line": 26 + }, + { + "kind": "func", + "name": "NewDefaultRouter", + "signature": "func NewDefaultRouter(opts Options) (*message.Router, error)", + "line": 56 + } + ], + "line_count": 148 + }, + "openmeter/watermill/router/router_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "mockHandler", + "signature": "type mockHandler struct", + "line": 21 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (m *mockHandler) Handle(msg *message.Message) error", + "line": 29 + }, + { + "kind": "func", + "name": "HandleDLQ", + "signature": "func (m *mockHandler) HandleDLQ(msg *message.Message) error", + "line": 44 + }, + { + "kind": "struct", + "name": "DoneCondition", + "signature": "type DoneCondition struct", + "line": 51 + }, + { + "kind": "func", + "name": "NewDoneSignal", + "signature": "func NewDoneSignal() *DoneCondition", + "line": 55 + }, + { + "kind": "func", + "name": "Done", + "signature": "func (d *DoneCondition) Done(mock.Arguments)", + "line": 61 + }, + { + "kind": "func", + "name": "Wait", + "signature": "func (d *DoneCondition) Wait(timeout time.Duration) error", + "line": 65 + }, + { + "kind": "func", + "name": "TestDefaultRouter", + "signature": "func TestDefaultRouter(t *testing.T)", + "line": 77 + } + ], + "line_count": 265 + }, + "pkg/clock/clock.go": { + "header": "\t\"sync/atomic\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Now", + "signature": "func Now() time.Time", + "line": 14 + }, + { + "kind": "func", + "name": "SetTime", + "signature": "func SetTime(t time.Time) time.Time", + "line": 23 + }, + { + "kind": "func", + "name": "ResetTime", + "signature": "func ResetTime()", + "line": 29 + }, + { + "kind": "func", + "name": "FreezeTime", + "signature": "func FreezeTime(t time.Time)", + "line": 33 + }, + { + "kind": "func", + "name": "UnFreeze", + "signature": "func UnFreeze()", + "line": 38 + } + ], + "line_count": 40 + }, + "pkg/clock/clock_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestClock", + "signature": "func TestClock(t *testing.T)", + "line": 13 + } + ], + "line_count": 23 + }, + "pkg/cmpx/compare.go": { + "header": "type Comparable[T any] interface {\n\tCompare(T) int\n}", + "symbols": [], + "line_count": 11 + }, + "pkg/contextx/attr.go": { + "header": "\t\"context\"\n\t\"github.com/peterbourgon/ctxdata/v4\"\n)", + "symbols": [ + { + "kind": "func", + "name": "WithAttr", + "signature": "func WithAttr(ctx context.Context, key string, value any) context.Context", + "line": 10 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func WithAttrs(ctx context.Context, data map[string]string) context.Context", + "line": 22 + } + ], + "line_count": 33 + }, + "pkg/contextx/log.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/peterbourgon/ctxdata/v4\"", + "symbols": [ + { + "kind": "func", + "name": "NewLogHandler", + "signature": "func NewLogHandler(handler slog.Handler) slog.Handler", + "line": 11 + }, + { + "kind": "struct", + "name": "Handler", + "signature": "type Handler struct", + "line": 15 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (h Handler) Enabled(ctx context.Context, level slog.Level) bool", + "line": 19 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h Handler) Handle(ctx context.Context, record slog.Record) error", + "line": 23 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (h Handler) WithAttrs(attrs []slog.Attr) slog.Handler", + "line": 33 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (h Handler) WithGroup(name string) slog.Handler", + "line": 37 + } + ], + "line_count": 39 + }, + "pkg/convert/ptr.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "func", + "name": "SafeToUTC", + "signature": "func SafeToUTC(t *time.Time) *time.Time", + "line": 47 + } + ], + "line_count": 73 + }, + "pkg/convert/time.go": { + "header": "func TimePtrIn(t *time.Time, loc *time.Location) *time.Time {\n\tif t == nil {\n\t\treturn nil", + "symbols": [ + { + "kind": "func", + "name": "TimePtrIn", + "signature": "func TimePtrIn(t *time.Time, loc *time.Location) *time.Time", + "line": 5 + } + ], + "line_count": 10 + }, + "pkg/currencyx/allocation.go": { + "header": "\t\"cmp\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "currencyUnit", + "signature": "func currencyUnit(calculator Calculator) alpacadecimal.Decimal", + "line": 314 + } + ], + "line_count": 316 + }, + "pkg/currencyx/allocation_test.go": { + "header": "\t\"cmp\"\n\t\"strings\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestAllocateByWeight", + "signature": "func TestAllocateByWeight(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestAllocateByWeightValidation", + "signature": "func TestAllocateByWeightValidation(t *testing.T)", + "line": 124 + }, + { + "kind": "func", + "name": "TestAllocateByAmount", + "signature": "func TestAllocateByAmount(t *testing.T)", + "line": 198 + }, + { + "kind": "func", + "name": "TestAllocateByAmountValidation", + "signature": "func TestAllocateByAmountValidation(t *testing.T)", + "line": 288 + }, + { + "kind": "func", + "name": "testCalculator", + "signature": "func testCalculator(t *testing.T, code string) currencyx.Calculator", + "line": 355 + }, + { + "kind": "func", + "name": "dec", + "signature": "func dec(value string) alpacadecimal.Decimal", + "line": 398 + } + ], + "line_count": 400 + }, + "pkg/currencyx/currency.go": { + "header": "\t\"errors\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/invopop/gobl/currency\"", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (c Code) Validate() error", + "line": 14 + }, + { + "kind": "func", + "name": "Calculator", + "signature": "func (c Code) Calculator() (Calculator, error)", + "line": 24 + }, + { + "kind": "struct", + "name": "Calculator", + "signature": "type Calculator struct", + "line": 36 + }, + { + "kind": "func", + "name": "RoundToPrecision", + "signature": "func (c Calculator) RoundToPrecision(amount alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 41 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Calculator) Validate() error", + "line": 47 + }, + { + "kind": "func", + "name": "IsRoundedToPrecision", + "signature": "func (c Calculator) IsRoundedToPrecision(amount alpacadecimal.Decimal) bool", + "line": 58 + } + ], + "line_count": 60 + }, + "pkg/currencyx/currency_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestRoundToPrecision", + "signature": "func TestRoundToPrecision(t *testing.T)", + "line": 12 + } + ], + "line_count": 38 + }, + "pkg/datetime/constants.go": { + "header": "const (\n\tlayoutTZName = \"Europe/Budapest\"\n)", + "symbols": [], + "line_count": 31 + }, + "pkg/datetime/datetime.go": { + "header": "\t\"encoding/json\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "struct", + "name": "DateTime", + "signature": "type DateTime struct", + "line": 11 + }, + { + "kind": "func", + "name": "NewDateTime", + "signature": "func NewDateTime(t time.Time) DateTime", + "line": 16 + }, + { + "kind": "func", + "name": "AsTime", + "signature": "func (t DateTime) AsTime() time.Time", + "line": 21 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (t DateTime) MarshalJSON() ([]byte, error)", + "line": 26 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (t *DateTime) UnmarshalJSON(data []byte) error", + "line": 32 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (dt DateTime) Add(d ISODuration) DateTime", + "line": 49 + }, + { + "kind": "func", + "name": "AddDateNoOverflow", + "signature": "func (d DateTime) AddDateNoOverflow(years int, months int, days int) DateTime", + "line": 71 + }, + { + "kind": "func", + "name": "AddYearsNoOverflow", + "signature": "func (d DateTime) AddYearsNoOverflow(years int) DateTime", + "line": 80 + }, + { + "kind": "func", + "name": "AddMonthsNoOverflow", + "signature": "func (d DateTime) AddMonthsNoOverflow(months int) DateTime", + "line": 93 + }, + { + "kind": "func", + "name": "AddWeeks", + "signature": "func (d DateTime) AddWeeks(weeks int) DateTime", + "line": 106 + }, + { + "kind": "func", + "name": "AddDays", + "signature": "func (d DateTime) AddDays(days int) DateTime", + "line": 111 + }, + { + "kind": "func", + "name": "AddHours", + "signature": "func (d DateTime) AddHours(hours int) DateTime", + "line": 116 + }, + { + "kind": "func", + "name": "AddMinutes", + "signature": "func (d DateTime) AddMinutes(minutes int) DateTime", + "line": 121 + }, + { + "kind": "func", + "name": "AddSeconds", + "signature": "func (d DateTime) AddSeconds(seconds alpacadecimal.Decimal) DateTime", + "line": 126 + }, + { + "kind": "func", + "name": "shiftClockTo", + "signature": "func (d DateTime) shiftClockTo(t time.Time) DateTime", + "line": 132 + } + ], + "line_count": 136 + }, + "pkg/datetime/datetime_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestDateTimeParseFormat", + "signature": "func TestDateTimeParseFormat(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestDateTimeAdd", + "signature": "func TestDateTimeAdd(t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestDateTimeShiftClockTo", + "signature": "func TestDateTimeShiftClockTo(t *testing.T)", + "line": 191 + }, + { + "kind": "func", + "name": "TestDuration_Add_Fuzz", + "signature": "func TestDuration_Add_Fuzz(t *testing.T)", + "line": 203 + } + ], + "line_count": 249 + }, + "pkg/datetime/duration.go": { + "header": "\t\"encoding/json\"\n\t\"time\"\n\t\"github.com/govalues/decimal\"", + "symbols": [ + { + "kind": "struct", + "name": "ISODuration", + "signature": "type ISODuration struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewISODuration", + "signature": "func NewISODuration(years, months, weeks, days, hours, minutes, seconds int) ISODuration", + "line": 18 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (d ISODuration) MarshalJSON() ([]byte, error)", + "line": 25 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (d *ISODuration) UnmarshalJSON(data []byte) error", + "line": 30 + }, + { + "kind": "func", + "name": "ISOString", + "signature": "func (p ISODuration) ISOString() ISODurationString", + "line": 35 + }, + { + "kind": "func", + "name": "ISOStringPtrOrNil", + "signature": "func (d *ISODuration) ISOStringPtrOrNil() *ISODurationString", + "line": 40 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p *ISODuration) Equal(v *ISODuration) bool", + "line": 49 + }, + { + "kind": "func", + "name": "Normalise", + "signature": "func (p ISODuration) Normalise(exact bool) ISODuration", + "line": 61 + }, + { + "kind": "func", + "name": "Simplify", + "signature": "func (p ISODuration) Simplify(exact bool) ISODuration", + "line": 65 + }, + { + "kind": "func", + "name": "Negate", + "signature": "func (p ISODuration) Negate() ISODuration", + "line": 69 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (p ISODuration) Add(p2 ISODuration) (ISODuration, error)", + "line": 73 + }, + { + "kind": "func", + "name": "Subtract", + "signature": "func (p ISODuration) Subtract(p2 ISODuration) (ISODuration, error)", + "line": 86 + }, + { + "kind": "func", + "name": "AddTo", + "signature": "func (p ISODuration) AddTo(t time.Time) (time.Time, bool)", + "line": 101 + }, + { + "kind": "func", + "name": "ISODurationBetween", + "signature": "func ISODurationBetween(start time.Time, end time.Time) ISODuration", + "line": 108 + }, + { + "kind": "func", + "name": "ISODurationFromDuration", + "signature": "func ISODurationFromDuration(d time.Duration) ISODuration", + "line": 114 + }, + { + "kind": "func", + "name": "DivisibleBy", + "signature": "func (d ISODuration) DivisibleBy(smaller ISODuration) (bool, error)", + "line": 119 + }, + { + "kind": "func", + "name": "Mul", + "signature": "func (p ISODuration) Mul(n int) (ISODuration, error)", + "line": 168 + }, + { + "kind": "func", + "name": "convertPeriodToSeconds", + "signature": "func convertPeriodToSeconds(p period.Period, daysInMonth int, hoursInDays int) (decimal.Decimal, error)", + "line": 182 + } + ], + "line_count": 281 + }, + "pkg/datetime/duration_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestDurationDivisibleBy", + "signature": "func TestDurationDivisibleBy(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestISODurationOperations", + "signature": "func TestISODurationOperations(t *testing.T)", + "line": 458 + }, + { + "kind": "func", + "name": "TestDivisibleBy", + "signature": "func TestDivisibleBy(t *testing.T)", + "line": 527 + }, + { + "kind": "func", + "name": "TestAddTo", + "signature": "func TestAddTo(t *testing.T)", + "line": 933 + } + ], + "line_count": 994 + }, + "pkg/datetime/durationstring.go": { + "header": "\t\"github.com/rickb777/period\"\n\t\"github.com/samber/lo\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Parse", + "signature": "func (i ISODurationString) Parse() (ISODuration, error)", + "line": 10 + }, + { + "kind": "func", + "name": "ParsePtrOrNil", + "signature": "func (i *ISODurationString) ParsePtrOrNil() (*ISODuration, error)", + "line": 19 + }, + { + "kind": "func", + "name": "String", + "signature": "func (i ISODurationString) String() string", + "line": 32 + } + ], + "line_count": 34 + }, + "pkg/datetime/errors.go": { + "header": "\t\"fmt\"\n)\nfunc NewInvalidTimezoneError(timezone string, err error) error {", + "symbols": [ + { + "kind": "func", + "name": "NewInvalidTimezoneError", + "signature": "func NewInvalidTimezoneError(timezone string, err error) error", + "line": 8 + }, + { + "kind": "func", + "name": "NewDateTimeParseError", + "signature": "func NewDateTimeParseError(value string) error", + "line": 13 + }, + { + "kind": "func", + "name": "NewDurationParseError", + "signature": "func NewDurationParseError(value string, err error) error", + "line": 18 + }, + { + "kind": "func", + "name": "NewDurationArithmeticError", + "signature": "func NewDurationArithmeticError(value string, err error) error", + "line": 22 + } + ], + "line_count": 24 + }, + "pkg/datetime/format.go": { + "header": "func (t DateTime) Format(layout string) string {\n\ttimezone := t.Location().String()\n\tif timezone == \"\" {", + "symbols": [ + { + "kind": "func", + "name": "Format", + "signature": "func (t DateTime) Format(layout string) string", + "line": 6 + }, + { + "kind": "func", + "name": "fallbackRFC9557FormatLayout", + "signature": "func fallbackRFC9557FormatLayout(layout string) string", + "line": 19 + } + ], + "line_count": 32 + }, + "pkg/datetime/interval.go": { + "header": "var (\n\tDurationSecond ISODuration = NewISODuration(0, 0, 0, 0, 0, 0, 1)\n\tDurationMinute ISODuration = NewISODuration(0, 0, 0, 0, 0, 1, 0)", + "symbols": [], + "line_count": 11 + }, + "pkg/datetime/parse.go": { + "header": "\t\"errors\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "Parse", + "signature": "func Parse(value string) (DateTime, error)", + "line": 10 + } + ], + "line_count": 74 + }, + "pkg/datetime/parse_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestParseRFC9557", + "signature": "func TestParseRFC9557(t *testing.T)", + "line": 10 + } + ], + "line_count": 185 + }, + "pkg/datetime/testutils.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/rickb777/period\"", + "symbols": [ + { + "kind": "func", + "name": "MustLoadLocation", + "signature": "func MustLoadLocation(t *testing.T, name string) *time.Location", + "line": 12 + }, + { + "kind": "func", + "name": "MustParseDateTime", + "signature": "func MustParseDateTime(t *testing.T, timeStr string) DateTime", + "line": 22 + }, + { + "kind": "func", + "name": "MustParseTimeInLocation", + "signature": "func MustParseTimeInLocation(t *testing.T, timeStr string, loc *time.Location) DateTime", + "line": 30 + }, + { + "kind": "func", + "name": "MustParseDuration", + "signature": "func MustParseDuration(t *testing.T, s string) ISODuration", + "line": 38 + } + ], + "line_count": 45 + }, + "pkg/defaultx/default.go": { + "header": "func WithDefault[T any](value *T, def T) T {\n\tif value != nil {\n\t\treturn *value", + "symbols": [], + "line_count": 18 + }, + "pkg/entitydiff/diff.go": { + "header": "\t\"errors\"\n\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/equal\"", + "symbols": [ + { + "kind": "interface", + "name": "Entity", + "signature": "type Entity interface", + "line": 11 + } + ], + "line_count": 242 + }, + "pkg/entitydiff/parent.go": { + "header": "type NestedEntity[T Entity, P Entity] struct {\n\tEntity T\n\tParent P", + "symbols": [], + "line_count": 42 + }, + "pkg/equal/equal.go": { + "header": "\t\"github.com/openmeterio/openmeter/pkg/hasher\"\n)\ntype Equaler[T any] interface {", + "symbols": [], + "line_count": 35 + }, + "pkg/errorsx/errorsx.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n)", + "symbols": [ + { + "kind": "func", + "name": "WithPrefix", + "signature": "func WithPrefix(err error, prefix string) error", + "line": 9 + }, + { + "kind": "struct", + "name": "warnError", + "signature": "type warnError struct", + "line": 36 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (w *warnError) Error() string", + "line": 40 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (w *warnError) Unwrap() error", + "line": 44 + }, + { + "kind": "func", + "name": "NewWarnError", + "signature": "func NewWarnError(err error) error", + "line": 48 + } + ], + "line_count": 54 + }, + "pkg/errorsx/errorsx_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestWithPrefix", + "signature": "func TestWithPrefix(t *testing.T)", + "line": 11 + } + ], + "line_count": 65 + }, + "pkg/errorsx/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "Handler", + "signature": "type Handler interface", + "line": 21 + }, + { + "kind": "struct", + "name": "SlogHandler", + "signature": "type SlogHandler struct", + "line": 27 + }, + { + "kind": "func", + "name": "NewSlogHandler", + "signature": "func NewSlogHandler(logger *slog.Logger) SlogHandler", + "line": 31 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h SlogHandler) Handle(err error)", + "line": 35 + }, + { + "kind": "func", + "name": "HandleContext", + "signature": "func (h SlogHandler) HandleContext(ctx context.Context, err error)", + "line": 57 + }, + { + "kind": "struct", + "name": "NopHandler", + "signature": "type NopHandler struct", + "line": 80 + }, + { + "kind": "func", + "name": "NewNopHandler", + "signature": "func NewNopHandler() NopHandler", + "line": 82 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (h NopHandler) Handle(err error)", + "line": 86 + }, + { + "kind": "func", + "name": "HandleContext", + "signature": "func (h NopHandler) HandleContext(ctx context.Context, err error)", + "line": 89 + } + ], + "line_count": 90 + }, + "pkg/errorsx/helpers.go": { + "header": "\t\"errors\"\n\t\"reflect\"\n\t\"slices\"", + "symbols": [ + { + "kind": "func", + "name": "isAPIError", + "signature": "func isAPIError(err error) bool", + "line": 17 + }, + { + "kind": "func", + "name": "isErrorFromPackages", + "signature": "func isErrorFromPackages(err error, packagePaths []string) bool", + "line": 23 + }, + { + "kind": "func", + "name": "isUnwrappedErrorFromPackages", + "signature": "func isUnwrappedErrorFromPackages(err error, packagePaths []string) bool", + "line": 40 + } + ], + "line_count": 55 + }, + "pkg/errorsx/helpers_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestIsAPIError", + "signature": "func TestIsAPIError(t *testing.T)", + "line": 14 + } + ], + "line_count": 70 + }, + "pkg/expand/expand.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"slices\"", + "symbols": [], + "line_count": 68 + }, + "pkg/featuregate/featuregate.go": { + "header": "type Gate interface {\n\tEvaluateBool(namespace, flag string, defaultValue bool) (bool, error)\n}", + "symbols": [ + { + "kind": "interface", + "name": "Gate", + "signature": "type Gate interface", + "line": 3 + }, + { + "kind": "func", + "name": "NewNoop", + "signature": "func NewNoop() Gate", + "line": 7 + }, + { + "kind": "struct", + "name": "Noop", + "signature": "type Noop struct", + "line": 11 + }, + { + "kind": "func", + "name": "EvaluateBool", + "signature": "func (n Noop) EvaluateBool(string, string, bool) (bool, error)", + "line": 13 + } + ], + "line_count": 15 + }, + "pkg/ffx/context.go": { + "header": "\t\"context\"\n\t\"fmt\"\n)", + "symbols": [ + { + "kind": "func", + "name": "SetAccessOnContext", + "signature": "func SetAccessOnContext(ctx context.Context, access AccessConfig) context.Context", + "line": 16 + }, + { + "kind": "func", + "name": "GetAccessFromContext", + "signature": "func GetAccessFromContext(ctx context.Context) (AccessConfig, error)", + "line": 20 + }, + { + "kind": "struct", + "name": "contextService", + "signature": "type contextService struct", + "line": 31 + }, + { + "kind": "func", + "name": "IsFeatureEnabled", + "signature": "func (s *contextService) IsFeatureEnabled(ctx context.Context, feature Feature) (bool, error)", + "line": 33 + }, + { + "kind": "func", + "name": "NewContextService", + "signature": "func NewContextService() Service", + "line": 47 + }, + { + "kind": "struct", + "name": "testContextService", + "signature": "type testContextService struct", + "line": 51 + }, + { + "kind": "func", + "name": "IsFeatureEnabled", + "signature": "func (s *testContextService) IsFeatureEnabled(ctx context.Context, feature Feature) (bool, error)", + "line": 56 + }, + { + "kind": "func", + "name": "NewTestContextService", + "signature": "func NewTestContextService(defaultAccess AccessConfig) Service", + "line": 65 + } + ], + "line_count": 70 + }, + "pkg/ffx/featureflag.go": { + "header": "type Feature string\ntype Service interface {\n\tIsFeatureEnabled(ctx context.Context, feature Feature) (bool, error)", + "symbols": [ + { + "kind": "interface", + "name": "Service", + "signature": "type Service interface", + "line": 8 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (c AccessConfig) Merge(other AccessConfig) AccessConfig", + "line": 14 + } + ], + "line_count": 20 + }, + "pkg/ffx/static.go": { + "header": "\t\"context\"\n\t\"fmt\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "staticService", + "signature": "type staticService struct", + "line": 8 + }, + { + "kind": "func", + "name": "IsFeatureEnabled", + "signature": "func (s *staticService) IsFeatureEnabled(ctx context.Context, feature Feature) (bool, error)", + "line": 14 + }, + { + "kind": "func", + "name": "NewStaticService", + "signature": "func NewStaticService(config AccessConfig) Service", + "line": 23 + } + ], + "line_count": 27 + }, + "pkg/filter/filter.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "interface", + "name": "Filter", + "signature": "type Filter interface", + "line": 21 + }, + { + "kind": "func", + "name": "EscapeLikePattern", + "signature": "func EscapeLikePattern(value string) string", + "line": 52 + }, + { + "kind": "func", + "name": "ContainsPattern", + "signature": "func ContainsPattern(value string) string", + "line": 62 + }, + { + "kind": "func", + "name": "ReverseContainsPattern", + "signature": "func ReverseContainsPattern(like *string) *string", + "line": 68 + }, + { + "kind": "struct", + "name": "FilterString", + "signature": "type FilterString struct", + "line": 82 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterString) Validate() error", + "line": 103 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterString) ValidateWithComplexity(maxDepth int) error", + "line": 108 + }, + { + "kind": "func", + "name": "validateWithComplexity", + "signature": "func (f FilterString) validateWithComplexity(maxDepth int) error", + "line": 114 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterString) IsEmpty() bool", + "line": 145 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterString) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 150 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterString) Select(field string) func(*sql.Selector)", + "line": 199 + }, + { + "kind": "func", + "name": "Match", + "signature": "func (f *FilterString) Match(value string) (bool, error)", + "line": 277 + }, + { + "kind": "func", + "name": "LoFilterPredicate", + "signature": "func (f *FilterString) LoFilterPredicate() func(value string, _ int) (bool, error)", + "line": 286 + }, + { + "kind": "func", + "name": "matches", + "signature": "func (f FilterString) matches(value string) (bool, error)", + "line": 290 + }, + { + "kind": "struct", + "name": "FilterInteger", + "signature": "type FilterInteger struct", + "line": 347 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterInteger) Validate() error", + "line": 359 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterInteger) ValidateWithComplexity(maxDepth int) error", + "line": 364 + }, + { + "kind": "func", + "name": "validateWithComplexity", + "signature": "func (f FilterInteger) validateWithComplexity(maxDepth int) error", + "line": 370 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterInteger) IsEmpty() bool", + "line": 397 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterInteger) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 402 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterInteger) Select(field string) func(*sql.Selector)", + "line": 430 + }, + { + "kind": "struct", + "name": "FilterFloat", + "signature": "type FilterFloat struct", + "line": 464 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterFloat) Validate() error", + "line": 475 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterFloat) ValidateWithComplexity(maxDepth int) error", + "line": 480 + }, + { + "kind": "func", + "name": "validateWithComplexity", + "signature": "func (f FilterFloat) validateWithComplexity(maxDepth int) error", + "line": 486 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterFloat) IsEmpty() bool", + "line": 513 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterFloat) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 518 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterFloat) Select(field string) func(*sql.Selector)", + "line": 546 + }, + { + "kind": "struct", + "name": "FilterTime", + "signature": "type FilterTime struct", + "line": 580 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterTime) Validate() error", + "line": 592 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterTime) ValidateWithComplexity(maxDepth int) error", + "line": 597 + }, + { + "kind": "func", + "name": "validateWithComplexity", + "signature": "func (f FilterTime) validateWithComplexity(maxDepth int) error", + "line": 603 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterTime) IsEmpty() bool", + "line": 630 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterTime) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 635 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterTime) Select(field string) func(*sql.Selector)", + "line": 666 + }, + { + "kind": "struct", + "name": "FilterTimeUnix", + "signature": "type FilterTimeUnix struct", + "line": 704 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterTimeUnix) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 709 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterTimeUnix) Select(field string) func(*sql.Selector)", + "line": 740 + }, + { + "kind": "struct", + "name": "FilterBoolean", + "signature": "type FilterBoolean struct", + "line": 777 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterBoolean) Validate() error", + "line": 782 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterBoolean) ValidateWithComplexity(maxDepth int) error", + "line": 787 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterBoolean) IsEmpty() bool", + "line": 793 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterBoolean) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 798 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterBoolean) Select(field string) func(*sql.Selector)", + "line": 808 + }, + { + "kind": "interface", + "name": "Predicate", + "signature": "type Predicate interface", + "line": 837 + }, + { + "kind": "func", + "name": "validateSingleOperator", + "signature": "func validateSingleOperator(v Filter) error", + "line": 861 + }, + { + "kind": "func", + "name": "isEmptyFilter", + "signature": "func isEmptyFilter(v Filter) bool", + "line": 883 + }, + { + "kind": "struct", + "name": "FilterULID", + "signature": "type FilterULID struct", + "line": 900 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (f FilterULID) Validate() error", + "line": 907 + }, + { + "kind": "func", + "name": "ValidateWithComplexity", + "signature": "func (f FilterULID) ValidateWithComplexity(maxDepth int) error", + "line": 912 + }, + { + "kind": "func", + "name": "validateWithComplexity", + "signature": "func (f FilterULID) validateWithComplexity(maxDepth int) error", + "line": 916 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (f FilterULID) IsEmpty() bool", + "line": 950 + }, + { + "kind": "func", + "name": "SelectWhereExpr", + "signature": "func (f FilterULID) SelectWhereExpr(field string, q *sqlbuilder.SelectBuilder) string", + "line": 955 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (f FilterULID) Select(field string) func(*sql.Selector)", + "line": 971 + }, + { + "kind": "func", + "name": "collectStringValues", + "signature": "func collectStringValues(f Filter) []string", + "line": 990 + } + ], + "line_count": 1015 + }, + "pkg/filter/filter_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "newSelectBuilder", + "signature": "func newSelectBuilder() *entsql.Selector", + "line": 21 + }, + { + "kind": "func", + "name": "assertValidationError", + "signature": "func assertValidationError(t *testing.T, err error, wantErr error)", + "line": 28 + }, + { + "kind": "func", + "name": "TestEscapeLikePattern", + "signature": "func TestEscapeLikePattern(t *testing.T)", + "line": 41 + }, + { + "kind": "func", + "name": "TestContainsPattern", + "signature": "func TestContainsPattern(t *testing.T)", + "line": 47 + }, + { + "kind": "func", + "name": "TestFilterString_Validate", + "signature": "func TestFilterString_Validate(t *testing.T)", + "line": 52 + }, + { + "kind": "func", + "name": "TestFilterString_SelectAndSelectWhereExpr", + "signature": "func TestFilterString_SelectAndSelectWhereExpr(t *testing.T)", + "line": 187 + }, + { + "kind": "func", + "name": "TestFilterString_SelectAndSelectWhereExpr_NestedOperators", + "signature": "func TestFilterString_SelectAndSelectWhereExpr_NestedOperators(t *testing.T)", + "line": 454 + }, + { + "kind": "func", + "name": "TestFilterInteger_Validate", + "signature": "func TestFilterInteger_Validate(t *testing.T)", + "line": 605 + }, + { + "kind": "func", + "name": "TestFilterInteger_SelectAndSelectWhereExpr", + "signature": "func TestFilterInteger_SelectAndSelectWhereExpr(t *testing.T)", + "line": 684 + }, + { + "kind": "func", + "name": "TestFilterFloat_Validate", + "signature": "func TestFilterFloat_Validate(t *testing.T)", + "line": 876 + }, + { + "kind": "func", + "name": "TestFilterFloat_SelectAndSelectWhereExpr", + "signature": "func TestFilterFloat_SelectAndSelectWhereExpr(t *testing.T)", + "line": 955 + }, + { + "kind": "func", + "name": "TestFilterBoolean_Validate", + "signature": "func TestFilterBoolean_Validate(t *testing.T)", + "line": 1147 + }, + { + "kind": "func", + "name": "TestFilterBoolean_SelectAndSelectWhereExpr", + "signature": "func TestFilterBoolean_SelectAndSelectWhereExpr(t *testing.T)", + "line": 1172 + }, + { + "kind": "func", + "name": "TestFilterTime_Validate", + "signature": "func TestFilterTime_Validate(t *testing.T)", + "line": 1249 + }, + { + "kind": "func", + "name": "TestFilterTime_SelectAndSelectWhereExpr", + "signature": "func TestFilterTime_SelectAndSelectWhereExpr(t *testing.T)", + "line": 1308 + }, + { + "kind": "func", + "name": "TestFilterTimeUnix_SelectAndSelectWhereExpr", + "signature": "func TestFilterTimeUnix_SelectAndSelectWhereExpr(t *testing.T)", + "line": 1476 + }, + { + "kind": "func", + "name": "TestFilterString_ValidateWithComplexity", + "signature": "func TestFilterString_ValidateWithComplexity(t *testing.T)", + "line": 1615 + }, + { + "kind": "func", + "name": "TestFilterInteger_ValidateWithComplexity", + "signature": "func TestFilterInteger_ValidateWithComplexity(t *testing.T)", + "line": 1741 + }, + { + "kind": "func", + "name": "TestFilterFloat_ValidateWithComplexity", + "signature": "func TestFilterFloat_ValidateWithComplexity(t *testing.T)", + "line": 1848 + }, + { + "kind": "func", + "name": "TestFilterBoolean_ValidateWithComplexity", + "signature": "func TestFilterBoolean_ValidateWithComplexity(t *testing.T)", + "line": 1931 + }, + { + "kind": "func", + "name": "TestFilterTime_ValidateWithComplexity", + "signature": "func TestFilterTime_ValidateWithComplexity(t *testing.T)", + "line": 1959 + }, + { + "kind": "func", + "name": "TestFilterString_IsEmpty", + "signature": "func TestFilterString_IsEmpty(t *testing.T)", + "line": 2044 + }, + { + "kind": "func", + "name": "TestFilterInteger_IsEmpty", + "signature": "func TestFilterInteger_IsEmpty(t *testing.T)", + "line": 2174 + }, + { + "kind": "func", + "name": "TestFilterFloat_IsEmpty", + "signature": "func TestFilterFloat_IsEmpty(t *testing.T)", + "line": 2255 + }, + { + "kind": "func", + "name": "TestFilterBoolean_IsEmpty", + "signature": "func TestFilterBoolean_IsEmpty(t *testing.T)", + "line": 2336 + }, + { + "kind": "func", + "name": "TestFilterTime_IsEmpty", + "signature": "func TestFilterTime_IsEmpty(t *testing.T)", + "line": 2371 + }, + { + "kind": "func", + "name": "TestFilterULID_Validate", + "signature": "func TestFilterULID_Validate(t *testing.T)", + "line": 2447 + }, + { + "kind": "func", + "name": "TestFilterString_Match", + "signature": "func TestFilterString_Match(t *testing.T)", + "line": 2584 + }, + { + "kind": "func", + "name": "TestFilterULID_SelectAndSelectWhereExpr_RecursesIntoAndOr", + "signature": "func TestFilterULID_SelectAndSelectWhereExpr_RecursesIntoAndOr(t *testing.T)", + "line": 2711 + }, + { + "kind": "func", + "name": "TestFilterULID_IsEmpty", + "signature": "func TestFilterULID_IsEmpty(t *testing.T)", + "line": 2780 + } + ], + "line_count": 2825 + }, + "pkg/framework/README.md": { + "header": "# Framework\n\n## Implementing a new operation\n\nAn _operation_ is a single method or function that a caller can invoke. In an HTTP API context it's often called a _route_ or _endpoint_.\n\nThis framework promotes a bottom-up approach to building APIs.\n\nThe first step to implementing a new operation is to define the request and response types along with an operation function.\n\n```go\ntype Request struct {\n // request params\n}\n\ntype Response struct {\n // response data\n}\n\nfunc Operation(ctx context.Context, req Request) (Response, error) {", + "symbols": [], + "line_count": 86 + }, + "pkg/framework/clickhouseotel/connpool.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ConnPoolMetrics", + "signature": "type ConnPoolMetrics struct", + "line": 16 + }, + { + "kind": "struct", + "name": "ConnPoolMetricsConfig", + "signature": "type ConnPoolMetricsConfig struct", + "line": 38 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ConnPoolMetricsConfig) Validate() error", + "line": 45 + }, + { + "kind": "func", + "name": "NewConnPoolMetrics", + "signature": "func NewConnPoolMetrics(cfg ConnPoolMetricsConfig) (*ConnPoolMetrics, error)", + "line": 67 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (m *ConnPoolMetrics) Start(ctx context.Context) error", + "line": 146 + }, + { + "kind": "func", + "name": "Shutdown", + "signature": "func (m *ConnPoolMetrics) Shutdown() error", + "line": 156 + }, + { + "kind": "func", + "name": "run", + "signature": "func (m *ConnPoolMetrics) run(ctx context.Context)", + "line": 169 + }, + { + "kind": "func", + "name": "record", + "signature": "func (m *ConnPoolMetrics) record(ctx context.Context)", + "line": 190 + }, + { + "kind": "func", + "name": "ping", + "signature": "func (m *ConnPoolMetrics) ping(ctx context.Context)", + "line": 202 + }, + { + "kind": "func", + "name": "pct", + "signature": "func pct(val, max int) float64", + "line": 223 + } + ], + "line_count": 229 + }, + "pkg/framework/clickhouseotel/otel.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ClickHouseTracer", + "signature": "type ClickHouseTracer struct", + "line": 16 + }, + { + "kind": "struct", + "name": "ClickHouseTracerConfig", + "signature": "type ClickHouseTracerConfig struct", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ClickHouseTracerConfig) Validate() error", + "line": 27 + }, + { + "kind": "func", + "name": "NewClickHouseTracer", + "signature": "func NewClickHouseTracer(cfg ClickHouseTracerConfig) (clickhouse.Conn, error)", + "line": 43 + }, + { + "kind": "func", + "name": "anyToStrings", + "signature": "func anyToStrings(args ...any) []string", + "line": 54 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (c *ClickHouseTracer) Query(ctx context.Context, query string, args ...any) (rows driver.Rows, err error)", + "line": 60 + }, + { + "kind": "func", + "name": "QueryRow", + "signature": "func (c *ClickHouseTracer) QueryRow(ctx context.Context, query string, args ...any) driver.Row", + "line": 76 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (c *ClickHouseTracer) Exec(ctx context.Context, query string, args ...any) error", + "line": 93 + }, + { + "kind": "func", + "name": "AsyncInsert", + "signature": "func (c *ClickHouseTracer) AsyncInsert(ctx context.Context, query string, wait bool, args ...any) error", + "line": 111 + } + ], + "line_count": 126 + }, + "pkg/framework/commonhttp/decoder.go": { + "header": "\t\"fmt\"\n\t\"net/http\"\n\t\"github.com/go-chi/render\"", + "symbols": [ + { + "kind": "func", + "name": "JSONRequestBodyDecoder", + "signature": "func JSONRequestBodyDecoder(r *http.Request, out any) error", + "line": 10 + } + ], + "line_count": 15 + }, + "pkg/framework/commonhttp/encoder.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/csv\"", + "symbols": [ + { + "kind": "func", + "name": "GetMediaType", + "signature": "func GetMediaType(r *http.Request) (string, error)", + "line": 19 + }, + { + "kind": "interface", + "name": "CSVResponse", + "signature": "type CSVResponse interface", + "line": 90 + }, + { + "kind": "func", + "name": "DummyErrorEncoder", + "signature": "func DummyErrorEncoder() encoder.ErrorEncoder", + "line": 129 + }, + { + "kind": "func", + "name": "GenericErrorEncoder", + "signature": "func GenericErrorEncoder() encoder.ErrorEncoder", + "line": 137 + } + ], + "line_count": 167 + }, + "pkg/framework/commonhttp/errors.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "ErrorWithHTTPStatusCode", + "signature": "type ErrorWithHTTPStatusCode struct", + "line": 14 + }, + { + "kind": "func", + "name": "ExtendProblem", + "signature": "func ExtendProblem(name, details string) ExtendProblemFunc", + "line": 20 + }, + { + "kind": "func", + "name": "apply", + "signature": "func (e ExtendProblemFunc) apply(extensions map[string]interface{})", + "line": 30 + }, + { + "kind": "func", + "name": "NewHTTPError", + "signature": "func NewHTTPError(statusCode int, err error, extensions ...ExtendProblemFunc) ErrorWithHTTPStatusCode", + "line": 36 + }, + { + "kind": "func", + "name": "EncodeError", + "signature": "func (e ErrorWithHTTPStatusCode) EncodeError(ctx context.Context, w http.ResponseWriter) bool", + "line": 44 + }, + { + "kind": "func", + "name": "ErrorEncoder", + "signature": "func ErrorEncoder(ctx context.Context, _ error, w http.ResponseWriter) bool", + "line": 54 + }, + { + "kind": "func", + "name": "WithHTTPStatusCodeAttribute", + "signature": "func WithHTTPStatusCodeAttribute(code int) models.ValidationIssueOption", + "line": 82 + }, + { + "kind": "struct", + "name": "handleIssueIfHTTPStatusKnownOptions", + "signature": "type handleIssueIfHTTPStatusKnownOptions struct", + "line": 87 + }, + { + "kind": "func", + "name": "WithHTTPStatusAttributePriorizationBehavior", + "signature": "func WithHTTPStatusAttributePriorizationBehavior(behavior HTTPStatusAttributePriorizationBehavior) HandleIssueIfHTTPStatusKnownOptions", + "line": 107 + }, + { + "kind": "func", + "name": "HandleIssueIfHTTPStatusKnown", + "signature": "func HandleIssueIfHTTPStatusKnown(ctx context.Context, err error, w http.ResponseWriter, options ...HandleIssueIfHTTPStatusKnownOptions) bool", + "line": 113 + } + ], + "line_count": 189 + }, + "pkg/framework/commonhttp/errors_test.go": { + "header": "\t\"encoding/json\"\n\t\"net/http\"\n\t\"net/http/httptest\"", + "symbols": [ + { + "kind": "func", + "name": "TestHandleIssueIfHTTPStatusKnown", + "signature": "func TestHandleIssueIfHTTPStatusKnown(t *testing.T)", + "line": 15 + } + ], + "line_count": 50 + }, + "pkg/framework/commonhttp/pagination.go": { + "header": "const (\n\tDefaultPageSize = 100\n\tMaxPageSize = 1000", + "symbols": [], + "line_count": 10 + }, + "pkg/framework/commonhttp/sort.go": { + "header": "\t\"github.com/openmeterio/openmeter/pkg/convert\"\n\t\"github.com/openmeterio/openmeter/pkg/defaultx\"\n\t\"github.com/openmeterio/openmeter/pkg/sortx\"", + "symbols": [], + "line_count": 22 + }, + "pkg/framework/commonhttp/union.go": { + "header": "\t\"encoding/json\"\n)\ntype Union[Primary any, Secondary any] struct {", + "symbols": [], + "line_count": 22 + }, + "pkg/framework/entutils/entcursor/cursor.go": { + "header": "\t_ \"embed\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "struct", + "name": "Extension", + "signature": "type Extension struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() *Extension", + "line": 24 + } + ], + "line_count": 26 + }, + "pkg/framework/entutils/entcursor/cursor.tpl": { + "header": "{{/*\n This template attaches cursor-based pagination methods to Ent queries.\n*/}}\n{{ define \"cursor\" }}\n\n{{ $pkg := base $.Config.Package }}\n{{ template \"header\" $ }}\n\n{{ range $n := $.Nodes }}\n {{ $hasCreatedAt := false }}\n {{ range $f := $n.Fields }}\n {{ if eq $f.Name \"created_at\" }}\n {{ $hasCreatedAt = true }}\n {{ end }}\n {{ end }}\n {{ if $hasCreatedAt }}\n {{ $receiver := $n.Receiver }}\n // Cursor runs the query and returns a cursor-paginated response.\n // Ordering is always by created_at asc, id asc.\n func ({{ $receiver }} *{{ $n.QueryName }}) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*{{ $n.Name }}], error) {", + "symbols": [], + "line_count": 71 + }, + "pkg/framework/entutils/entcursor/cursor_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCursor", + "signature": "func TestCursor(t *testing.T)", + "line": 17 + } + ], + "line_count": 79 + }, + "pkg/framework/entutils/entdriver/driver.go": { + "header": "\t\"database/sql\"\n\t\"entgo.io/ent/dialect\"\n\tentDialectSQL \"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "struct", + "name": "EntPostgresDriver", + "signature": "type EntPostgresDriver struct", + "line": 12 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d *EntPostgresDriver) Close() error", + "line": 18 + }, + { + "kind": "func", + "name": "Driver", + "signature": "func (d *EntPostgresDriver) Driver() *entDialectSQL.Driver", + "line": 31 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (d *EntPostgresDriver) Client() *entdb.Client", + "line": 36 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (d *EntPostgresDriver) Clone() *EntPostgresDriver", + "line": 41 + }, + { + "kind": "func", + "name": "NewEntPostgresDriver", + "signature": "func NewEntPostgresDriver(db *sql.DB) *EntPostgresDriver", + "line": 52 + } + ], + "line_count": 60 + }, + "pkg/framework/entutils/entexpose/entexpose.go": { + "header": "\t_ \"embed\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "struct", + "name": "Extension", + "signature": "type Extension struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() *Extension", + "line": 24 + } + ], + "line_count": 26 + }, + "pkg/framework/entutils/entexpose/expose.tpl": { + "header": "{{/*\n This template exposes client internals (like the driver) so they can be shared accross instances.\n The intended usecase is for shared transaction management accross multiple db.Client and db.Tx instances\n using the same connection.\n\n This template has to be included in each entgo codegen that wants to parttake in shared transactions.\n\n // TODO: Tx.onRollback and Tx.onCommit hooks are ignored when using shared transactions, fix this\n*/}}\n{{ define \"expose\" }}\n\n\n{{/* Add the base header for the generated file */}}\n{{ $pkg := base $.Config.Package }}\n{{ template \"header\" $ }}\n\n{{/* Expose internals of a Client so it can be used by transaction management */}}\nfunc (c *Client) GetConfig() *entutils.RawEntConfig {\n return &entutils.RawEntConfig{\n Driver: c.config.driver,", + "symbols": [], + "line_count": 101 + }, + "pkg/framework/entutils/entmixinaccessor/entmixinaccessor.go": { + "header": "\t_ \"embed\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "struct", + "name": "Extension", + "signature": "type Extension struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() *Extension", + "line": 24 + } + ], + "line_count": 26 + }, + "pkg/framework/entutils/entmixinaccessor/mixinaccessor.tpl": { + "header": "{{/*\n Generates getters for fields that were added to schemas via mixins.\n\n For each node and each mixed-in field, it generates:\n func (e *) Get() { return e. }\n\n For nillable fields, it returns a pointer type (matching the generated entity field type).\n\n The ID field is handled separately since ent exposes it via $n.ID rather than $n.Fields.\n*/}}\n{{ define \"entmixinaccessor\" }}\n\n{{ $pkg := base $.Config.Package }}\n{{ template \"header\" $ }}\n\n{{ range $n := $.Nodes }}\n\t{{- if and $n.ID $n.ID.Position $n.ID.Position.MixedIn }}\n\nfunc (e *{{ $n.Name }}) GetID() {{ $n.ID.Type }} {\n\treturn e.ID", + "symbols": [], + "line_count": 36 + }, + "pkg/framework/entutils/entpaginate/paginate.go": { + "header": "\t_ \"embed\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "struct", + "name": "Extension", + "signature": "type Extension struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() *Extension", + "line": 24 + } + ], + "line_count": 26 + }, + "pkg/framework/entutils/entpaginate/paginate.tpl": { + "header": "{{/*\n This template attaches simple type safe options to run window functions on a query.\n*/}}\n{{ define \"paginate\" }}\n\n\n{{/* Add the base header for the generated file */}}\n{{ $pkg := base $.Config.Package }}\n{{ template \"header\" $ }}\n\n{{/* Loop over all nodes and implement \"pagination.Paginator\" for \"XQuery\" and \"XSelect\" */}}\n{{ range $n := $.Nodes }}\n {{ $receiver := $n.Receiver }}\n // Paginate runs the query and returns a paginated response.\n // If page is its 0 value then it will return all the items and populate the response page accordingly.\n func ({{ $receiver }} *{{ $n.QueryName }}) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*{{ $n.Name }}], error) {\n // Get the limit and offset\n limit, offset := page.Limit(), page.Offset()\n\n // Unset previous pagination settings", + "symbols": [], + "line_count": 74 + }, + "pkg/framework/entutils/entpaginate/paginate_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestPaginate", + "signature": "func TestPaginate(t *testing.T)", + "line": 17 + } + ], + "line_count": 132 + }, + "pkg/framework/entutils/entsetorclear/setorclear.go": { + "header": "\t_ \"embed\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "struct", + "name": "Extension", + "signature": "type Extension struct", + "line": 14 + }, + { + "kind": "func", + "name": "New", + "signature": "func New() *Extension", + "line": 24 + } + ], + "line_count": 26 + }, + "pkg/framework/entutils/entsetorclear/setorclear.tpl": { + "header": "{{/*sourced from https://github.com/ent/ent/issues/1119#issuecomment-1387280573*/}}\n{{ define \"setorclear\" }}\n\t{{/* Add the base header for the generated file */}}\n\t{{ $pkg := base $.Config.Package }}\n\t{{ template \"header\" $ }}\n\n\t{{/* Loop over all updaters and implement the \"SetOrClear\" method for all optional fields */}}\n\t{{ range $n := $.Nodes }}\n\t\t{{ if not ($n.IsView) }}\n\t\t\t{{ $updater := $n.UpdateName }}\n\t\t\t{{ range $f := $n.Fields }}\n\t\t\t\t{{ if and ($f.Optional) (not $f.Immutable)}}\n\t\t\t\t\t{{ $set := print \"Set\" $f.StructField }}\n\t\t\t\t\t{{ $clear := print \"Clear\" $f.StructField }}\n\t\t\t\t\tfunc (u *{{ $updater }}) SetOrClear{{ $f.StructField }}(value *{{ $f.Type }}) *{{ $updater }} {\n\t\t\t\t\t\tif value == nil {\n\t\t\t\t\t\t\treturn u.{{ $clear }}()\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn u.{{ $set }}(*value)\n\t\t\t\t\t}", + "symbols": [], + "line_count": 33 + }, + "pkg/framework/entutils/idorder.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "interface", + "name": "InIDOrderAccessor", + "signature": "type InIDOrderAccessor interface", + "line": 12 + } + ], + "line_count": 84 + }, + "pkg/framework/entutils/idorder_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "struct", + "name": "mockEntity", + "signature": "type mockEntity struct", + "line": 15 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (m mockEntity) GetID() string", + "line": 20 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (m mockEntity) GetNamespace() string", + "line": 21 + }, + { + "kind": "func", + "name": "entity", + "signature": "func entity(ns, id string) mockEntity", + "line": 23 + }, + { + "kind": "func", + "name": "TestInIDOrder", + "signature": "func TestInIDOrder(t *testing.T)", + "line": 27 + } + ], + "line_count": 140 + }, + "pkg/framework/entutils/mapping.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"\n\t\"github.com/openmeterio/openmeter/pkg/slicesx\"", + "symbols": [], + "line_count": 31 + }, + "pkg/framework/entutils/mixinhelper.go": { + "header": "\t\"slices\"\n\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema\"", + "symbols": [ + { + "kind": "interface", + "name": "MixinWithAdditionalMixins", + "signature": "type MixinWithAdditionalMixins interface", + "line": 12 + }, + { + "kind": "struct", + "name": "emptyMixin", + "signature": "type emptyMixin struct", + "line": 19 + } + ], + "line_count": 102 + }, + "pkg/framework/entutils/mixins.go": { + "header": "\t\"fmt\"\n\t\"time\"\n\t\"entgo.io/ent\"", + "symbols": [ + { + "kind": "struct", + "name": "UniqueResourceMixin", + "signature": "type UniqueResourceMixin struct", + "line": 21 + }, + { + "kind": "struct", + "name": "ResourceMixin", + "signature": "type ResourceMixin struct", + "line": 53 + }, + { + "kind": "struct", + "name": "IDMixin", + "signature": "type IDMixin struct", + "line": 83 + }, + { + "kind": "interface", + "name": "IDMixinGetter", + "signature": "type IDMixinGetter interface", + "line": 108 + }, + { + "kind": "struct", + "name": "KeyMixin", + "signature": "type KeyMixin struct", + "line": 117 + }, + { + "kind": "struct", + "name": "NamespaceMixin", + "signature": "type NamespaceMixin struct", + "line": 131 + }, + { + "kind": "interface", + "name": "NamespaceMixinGetter", + "signature": "type NamespaceMixinGetter interface", + "line": 150 + }, + { + "kind": "struct", + "name": "MetadataMixin", + "signature": "type MetadataMixin struct", + "line": 159 + }, + { + "kind": "struct", + "name": "AnnotationsMixin", + "signature": "type AnnotationsMixin struct", + "line": 175 + }, + { + "kind": "interface", + "name": "AnnotationsMixinGetter", + "signature": "type AnnotationsMixinGetter interface", + "line": 201 + }, + { + "kind": "struct", + "name": "TimeMixin", + "signature": "type TimeMixin struct", + "line": 210 + }, + { + "kind": "interface", + "name": "TimeMixinGetter", + "signature": "type TimeMixinGetter interface", + "line": 229 + }, + { + "kind": "func", + "name": "truncatedNow", + "signature": "func truncatedNow() time.Time", + "line": 261 + }, + { + "kind": "struct", + "name": "CadencedMixin", + "signature": "type CadencedMixin struct", + "line": 267 + }, + { + "kind": "struct", + "name": "CustomerAddressMixin", + "signature": "type CustomerAddressMixin struct", + "line": 279 + }, + { + "kind": "func", + "name": "Fields", + "signature": "func (c CustomerAddressMixin) Fields() []ent.Field", + "line": 284 + } + ], + "line_count": 295 + }, + "pkg/framework/entutils/pgjsonb.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/pkg/slicesx\"\n)", + "symbols": [ + { + "kind": "func", + "name": "JSONBIn", + "signature": "func JSONBIn(field string, key string, values []string) func(*sql.Selector)", + "line": 15 + }, + { + "kind": "func", + "name": "JSONBKeyExistsInObject", + "signature": "func JSONBKeyExistsInObject(field string, member string, expectedKey string) func(*sql.Selector)", + "line": 55 + } + ], + "line_count": 67 + }, + "pkg/framework/entutils/pgulid.go": { + "header": "\t\"database/sql/driver\"\n\t\"github.com/oklog/ulid/v2\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "ULID", + "signature": "type ULID struct", + "line": 11 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (v ULID) Value() (driver.Value, error)", + "line": 15 + }, + { + "kind": "func", + "name": "ULIDPointer", + "signature": "func (v *ULID) ULIDPointer() *ulid.ULID", + "line": 19 + }, + { + "kind": "func", + "name": "Ptr", + "signature": "func Ptr(u *ulid.ULID) *ULID", + "line": 26 + }, + { + "kind": "func", + "name": "Wrap", + "signature": "func Wrap(u ulid.ULID) ULID", + "line": 36 + } + ], + "line_count": 40 + }, + "pkg/framework/entutils/sort.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/pkg/sortx\"\n)", + "symbols": [ + { + "kind": "func", + "name": "GetOrdering", + "signature": "func GetOrdering(order sortx.Order) []sql.OrderTermOption", + "line": 9 + }, + { + "kind": "func", + "name": "getStrOrdering", + "signature": "func getStrOrdering(order string) []sql.OrderTermOption", + "line": 22 + } + ], + "line_count": 33 + }, + "pkg/framework/entutils/testutils/ent1/db/client.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Client", + "signature": "type Client struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(opts ...Option) *Client", + "line": 32 + }, + { + "kind": "func", + "name": "init", + "signature": "func (c *Client) init()", + "line": 38 + }, + { + "kind": "func", + "name": "newConfig", + "signature": "func newConfig(opts ...Option) config", + "line": 62 + }, + { + "kind": "func", + "name": "options", + "signature": "func (c *config) options(opts ...Option)", + "line": 69 + }, + { + "kind": "func", + "name": "Debug", + "signature": "func Debug() Option", + "line": 79 + }, + { + "kind": "func", + "name": "Log", + "signature": "func Log(fn func(...any)) Option", + "line": 86 + }, + { + "kind": "func", + "name": "Driver", + "signature": "func Driver(driver dialect.Driver) Option", + "line": 93 + }, + { + "kind": "func", + "name": "Open", + "signature": "func Open(driverName, dataSourceName string, options ...Option) (*Client, error)", + "line": 102 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (c *Client) Tx(ctx context.Context) (*Tx, error)", + "line": 120 + }, + { + "kind": "func", + "name": "BeginTx", + "signature": "func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)", + "line": 138 + }, + { + "kind": "func", + "name": "Debug", + "signature": "func (c *Client) Debug() *Client", + "line": 163 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (c *Client) Close() error", + "line": 175 + }, + { + "kind": "func", + "name": "Use", + "signature": "func (c *Client) Use(hooks ...Hook)", + "line": 181 + }, + { + "kind": "func", + "name": "Intercept", + "signature": "func (c *Client) Intercept(interceptors ...Interceptor)", + "line": 187 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)", + "line": 192 + }, + { + "kind": "struct", + "name": "Example1Client", + "signature": "type Example1Client struct", + "line": 202 + }, + { + "kind": "func", + "name": "NewExample1Client", + "signature": "func NewExample1Client(c config) *Example1Client", + "line": 207 + }, + { + "kind": "func", + "name": "Use", + "signature": "func (c *Example1Client) Use(hooks ...Hook)", + "line": 213 + }, + { + "kind": "func", + "name": "Intercept", + "signature": "func (c *Example1Client) Intercept(interceptors ...Interceptor)", + "line": 219 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (c *Example1Client) Create() *Example1Create", + "line": 224 + }, + { + "kind": "func", + "name": "CreateBulk", + "signature": "func (c *Example1Client) CreateBulk(builders ...*Example1Create) *Example1CreateBulk", + "line": 230 + }, + { + "kind": "func", + "name": "MapCreateBulk", + "signature": "func (c *Example1Client) MapCreateBulk(slice any, setFunc func(*Example1Create, int)) *Example1CreateBulk", + "line": 236 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (c *Example1Client) Update() *Example1Update", + "line": 250 + }, + { + "kind": "func", + "name": "UpdateOne", + "signature": "func (c *Example1Client) UpdateOne(_m *Example1) *Example1UpdateOne", + "line": 256 + }, + { + "kind": "func", + "name": "UpdateOneID", + "signature": "func (c *Example1Client) UpdateOneID(id string) *Example1UpdateOne", + "line": 262 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (c *Example1Client) Delete() *Example1Delete", + "line": 268 + }, + { + "kind": "func", + "name": "DeleteOne", + "signature": "func (c *Example1Client) DeleteOne(_m *Example1) *Example1DeleteOne", + "line": 274 + }, + { + "kind": "func", + "name": "DeleteOneID", + "signature": "func (c *Example1Client) DeleteOneID(id string) *Example1DeleteOne", + "line": 279 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (c *Example1Client) Query() *Example1Query", + "line": 287 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (c *Example1Client) Get(ctx context.Context, id string) (*Example1, error)", + "line": 296 + }, + { + "kind": "func", + "name": "GetX", + "signature": "func (c *Example1Client) GetX(ctx context.Context, id string) *Example1", + "line": 301 + }, + { + "kind": "func", + "name": "Hooks", + "signature": "func (c *Example1Client) Hooks() []Hook", + "line": 310 + }, + { + "kind": "func", + "name": "Interceptors", + "signature": "func (c *Example1Client) Interceptors() []Interceptor", + "line": 315 + }, + { + "kind": "func", + "name": "mutate", + "signature": "func (c *Example1Client) mutate(ctx context.Context, m *Example1Mutation) (Value, error)", + "line": 319 + }, + { + "kind": "func", + "name": "ExecContext", + "signature": "func (c *config) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)", + "line": 346 + }, + { + "kind": "func", + "name": "QueryContext", + "signature": "func (c *config) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)", + "line": 358 + } + ], + "line_count": 366 + }, + "pkg/framework/entutils/testutils/ent1/db/cursor.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [ + { + "kind": "func", + "name": "Cursor", + "signature": "func (_m *Example1Query) Cursor(ctx context.Context, cursor *pagination.Cursor) (pagination.Result[*Example1], error)", + "line": 16 + } + ], + "line_count": 63 + }, + "pkg/framework/entutils/testutils/ent1/db/ent.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "clientCtxKey", + "signature": "type clientCtxKey struct", + "line": 37 + }, + { + "kind": "func", + "name": "FromContext", + "signature": "func FromContext(ctx context.Context) *Client", + "line": 40 + }, + { + "kind": "func", + "name": "NewContext", + "signature": "func NewContext(parent context.Context, c *Client) context.Context", + "line": 46 + }, + { + "kind": "struct", + "name": "txCtxKey", + "signature": "type txCtxKey struct", + "line": 50 + }, + { + "kind": "func", + "name": "TxFromContext", + "signature": "func TxFromContext(ctx context.Context) *Tx", + "line": 53 + }, + { + "kind": "func", + "name": "NewTxContext", + "signature": "func NewTxContext(parent context.Context, tx *Tx) context.Context", + "line": 59 + }, + { + "kind": "func", + "name": "checkColumn", + "signature": "func checkColumn(t, c string) error", + "line": 73 + }, + { + "kind": "func", + "name": "Asc", + "signature": "func Asc(fields ...string) func(*sql.Selector)", + "line": 83 + }, + { + "kind": "func", + "name": "Desc", + "signature": "func Desc(fields ...string) func(*sql.Selector)", + "line": 95 + }, + { + "kind": "func", + "name": "As", + "signature": "func As(fn AggregateFunc, end string) AggregateFunc", + "line": 114 + }, + { + "kind": "func", + "name": "Count", + "signature": "func Count() AggregateFunc", + "line": 121 + }, + { + "kind": "func", + "name": "Max", + "signature": "func Max(field string) AggregateFunc", + "line": 128 + }, + { + "kind": "func", + "name": "Mean", + "signature": "func Mean(field string) AggregateFunc", + "line": 139 + }, + { + "kind": "func", + "name": "Min", + "signature": "func Min(field string) AggregateFunc", + "line": 150 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func Sum(field string) AggregateFunc", + "line": 161 + }, + { + "kind": "struct", + "name": "ValidationError", + "signature": "type ValidationError struct", + "line": 172 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ValidationError) Error() string", + "line": 178 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ValidationError) Unwrap() error", + "line": 183 + }, + { + "kind": "func", + "name": "IsValidationError", + "signature": "func IsValidationError(err error) bool", + "line": 188 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 197 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 202 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 207 + }, + { + "kind": "func", + "name": "MaskNotFound", + "signature": "func MaskNotFound(err error) error", + "line": 216 + }, + { + "kind": "struct", + "name": "NotSingularError", + "signature": "type NotSingularError struct", + "line": 224 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotSingularError) Error() string", + "line": 229 + }, + { + "kind": "func", + "name": "IsNotSingular", + "signature": "func IsNotSingular(err error) bool", + "line": 234 + }, + { + "kind": "struct", + "name": "NotLoadedError", + "signature": "type NotLoadedError struct", + "line": 243 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotLoadedError) Error() string", + "line": 248 + }, + { + "kind": "func", + "name": "IsNotLoaded", + "signature": "func IsNotLoaded(err error) bool", + "line": 253 + }, + { + "kind": "struct", + "name": "ConstraintError", + "signature": "type ConstraintError struct", + "line": 264 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ConstraintError) Error() string", + "line": 270 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ConstraintError) Unwrap() error", + "line": 275 + }, + { + "kind": "func", + "name": "IsConstraintError", + "signature": "func IsConstraintError(err error) bool", + "line": 280 + }, + { + "kind": "struct", + "name": "selector", + "signature": "type selector struct", + "line": 289 + }, + { + "kind": "func", + "name": "ScanX", + "signature": "func (s *selector) ScanX(ctx context.Context, v any)", + "line": 297 + }, + { + "kind": "func", + "name": "Strings", + "signature": "func (s *selector) Strings(ctx context.Context) ([]string, error)", + "line": 304 + }, + { + "kind": "func", + "name": "StringsX", + "signature": "func (s *selector) StringsX(ctx context.Context) []string", + "line": 316 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s *selector) String(ctx context.Context) (_ string, err error)", + "line": 325 + }, + { + "kind": "func", + "name": "StringX", + "signature": "func (s *selector) StringX(ctx context.Context) string", + "line": 342 + }, + { + "kind": "func", + "name": "Ints", + "signature": "func (s *selector) Ints(ctx context.Context) ([]int, error)", + "line": 351 + }, + { + "kind": "func", + "name": "IntsX", + "signature": "func (s *selector) IntsX(ctx context.Context) []int", + "line": 363 + }, + { + "kind": "func", + "name": "Int", + "signature": "func (s *selector) Int(ctx context.Context) (_ int, err error)", + "line": 372 + }, + { + "kind": "func", + "name": "IntX", + "signature": "func (s *selector) IntX(ctx context.Context) int", + "line": 389 + }, + { + "kind": "func", + "name": "Float64s", + "signature": "func (s *selector) Float64s(ctx context.Context) ([]float64, error)", + "line": 398 + }, + { + "kind": "func", + "name": "Float64sX", + "signature": "func (s *selector) Float64sX(ctx context.Context) []float64", + "line": 410 + }, + { + "kind": "func", + "name": "Float64", + "signature": "func (s *selector) Float64(ctx context.Context) (_ float64, err error)", + "line": 419 + }, + { + "kind": "func", + "name": "Float64X", + "signature": "func (s *selector) Float64X(ctx context.Context) float64", + "line": 436 + }, + { + "kind": "func", + "name": "Bools", + "signature": "func (s *selector) Bools(ctx context.Context) ([]bool, error)", + "line": 445 + }, + { + "kind": "func", + "name": "BoolsX", + "signature": "func (s *selector) BoolsX(ctx context.Context) []bool", + "line": 457 + }, + { + "kind": "func", + "name": "Bool", + "signature": "func (s *selector) Bool(ctx context.Context) (_ bool, err error)", + "line": 466 + }, + { + "kind": "func", + "name": "BoolX", + "signature": "func (s *selector) BoolX(ctx context.Context) bool", + "line": 483 + }, + { + "kind": "func", + "name": "setContextOp", + "signature": "func setContextOp(ctx context.Context, qc *QueryContext, op string) context.Context", + "line": 526 + } + ], + "line_count": 608 + }, + "pkg/framework/entutils/testutils/ent1/db/enttest/enttest.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db\"\n\t_ \"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db/runtime\"", + "symbols": [ + { + "kind": "func", + "name": "WithOptions", + "signature": "func WithOptions(opts ...db.Option) Option", + "line": 34 + }, + { + "kind": "func", + "name": "WithMigrateOptions", + "signature": "func WithMigrateOptions(opts ...schema.MigrateOption) Option", + "line": 41 + }, + { + "kind": "func", + "name": "newOptions", + "signature": "func newOptions(opts []Option) *options", + "line": 47 + }, + { + "kind": "func", + "name": "Open", + "signature": "func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *db.Client", + "line": 56 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(t TestingT, opts ...Option) *db.Client", + "line": 68 + }, + { + "kind": "func", + "name": "migrateSchema", + "signature": "func migrateSchema(t TestingT, c *db.Client, o *options)", + "line": 74 + } + ], + "line_count": 84 + }, + "pkg/framework/entutils/testutils/ent1/db/example1.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1", + "signature": "type Example1 struct", + "line": 16 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Example1) assignValues(columns []string, values []any) error", + "line": 49 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Example1) Value(name string) (ent.Value, error)", + "line": 95 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Example1) Update() *Example1UpdateOne", + "line": 102 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Example1) Unwrap() *Example1", + "line": 108 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Example1) String() string", + "line": 118 + } + ], + "line_count": 140 + }, + "pkg/framework/entutils/testutils/ent1/db/example1/example1.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 38 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 60 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 65 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 70 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 75 + }, + { + "kind": "func", + "name": "ByExampleValue1", + "signature": "func ByExampleValue1(opts ...sql.OrderTermOption) OrderOption", + "line": 80 + } + ], + "line_count": 82 + }, + "pkg/framework/entutils/testutils/ent1/db/example1/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Example1", + "line": 13 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Example1", + "line": 18 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Example1", + "line": 23 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Example1", + "line": 28 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Example1", + "line": 33 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Example1", + "line": 38 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Example1", + "line": 43 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Example1", + "line": 48 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Example1", + "line": 53 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Example1", + "line": 58 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Example1", + "line": 63 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Example1", + "line": 68 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Example1", + "line": 73 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Example1", + "line": 78 + }, + { + "kind": "func", + "name": "ExampleValue1", + "signature": "func ExampleValue1(v string) predicate.Example1", + "line": 83 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Example1", + "line": 88 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Example1", + "line": 93 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Example1", + "line": 98 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Example1", + "line": 103 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Example1", + "line": 108 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Example1", + "line": 113 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Example1", + "line": 118 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Example1", + "line": 123 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Example1", + "line": 128 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Example1", + "line": 133 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Example1", + "line": 138 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Example1", + "line": 143 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Example1", + "line": 148 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Example1", + "line": 153 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Example1", + "line": 158 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Example1", + "line": 163 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Example1", + "line": 168 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Example1", + "line": 173 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Example1", + "line": 178 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Example1", + "line": 183 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Example1", + "line": 188 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Example1", + "line": 193 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Example1", + "line": 198 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Example1", + "line": 203 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Example1", + "line": 208 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Example1", + "line": 213 + }, + { + "kind": "func", + "name": "ExampleValue1EQ", + "signature": "func ExampleValue1EQ(v string) predicate.Example1", + "line": 218 + }, + { + "kind": "func", + "name": "ExampleValue1NEQ", + "signature": "func ExampleValue1NEQ(v string) predicate.Example1", + "line": 223 + }, + { + "kind": "func", + "name": "ExampleValue1In", + "signature": "func ExampleValue1In(vs ...string) predicate.Example1", + "line": 228 + }, + { + "kind": "func", + "name": "ExampleValue1NotIn", + "signature": "func ExampleValue1NotIn(vs ...string) predicate.Example1", + "line": 233 + }, + { + "kind": "func", + "name": "ExampleValue1GT", + "signature": "func ExampleValue1GT(v string) predicate.Example1", + "line": 238 + }, + { + "kind": "func", + "name": "ExampleValue1GTE", + "signature": "func ExampleValue1GTE(v string) predicate.Example1", + "line": 243 + }, + { + "kind": "func", + "name": "ExampleValue1LT", + "signature": "func ExampleValue1LT(v string) predicate.Example1", + "line": 248 + }, + { + "kind": "func", + "name": "ExampleValue1LTE", + "signature": "func ExampleValue1LTE(v string) predicate.Example1", + "line": 253 + }, + { + "kind": "func", + "name": "ExampleValue1Contains", + "signature": "func ExampleValue1Contains(v string) predicate.Example1", + "line": 258 + }, + { + "kind": "func", + "name": "ExampleValue1HasPrefix", + "signature": "func ExampleValue1HasPrefix(v string) predicate.Example1", + "line": 263 + }, + { + "kind": "func", + "name": "ExampleValue1HasSuffix", + "signature": "func ExampleValue1HasSuffix(v string) predicate.Example1", + "line": 268 + }, + { + "kind": "func", + "name": "ExampleValue1EqualFold", + "signature": "func ExampleValue1EqualFold(v string) predicate.Example1", + "line": 273 + }, + { + "kind": "func", + "name": "ExampleValue1ContainsFold", + "signature": "func ExampleValue1ContainsFold(v string) predicate.Example1", + "line": 278 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Example1) predicate.Example1", + "line": 283 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Example1) predicate.Example1", + "line": 288 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Example1) predicate.Example1", + "line": 293 + } + ], + "line_count": 295 + }, + "pkg/framework/entutils/testutils/ent1/db/example1_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1Create", + "signature": "type Example1Create struct", + "line": 19 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *Example1Create) SetCreatedAt(v time.Time) *Example1Create", + "line": 27 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *Example1Create) SetNillableCreatedAt(v *time.Time) *Example1Create", + "line": 33 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *Example1Create) SetUpdatedAt(v time.Time) *Example1Create", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *Example1Create) SetNillableUpdatedAt(v *time.Time) *Example1Create", + "line": 47 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *Example1Create) SetDeletedAt(v time.Time) *Example1Create", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *Example1Create) SetNillableDeletedAt(v *time.Time) *Example1Create", + "line": 61 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (_c *Example1Create) SetExampleValue1(v string) *Example1Create", + "line": 69 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *Example1Create) SetID(v string) *Example1Create", + "line": 75 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *Example1Create) Mutation() *Example1Mutation", + "line": 81 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *Example1Create) Save(ctx context.Context) (*Example1, error)", + "line": 86 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *Example1Create) SaveX(ctx context.Context) *Example1", + "line": 92 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *Example1Create) Exec(ctx context.Context) error", + "line": 101 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *Example1Create) ExecX(ctx context.Context)", + "line": 107 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *Example1Create) defaults()", + "line": 114 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *Example1Create) check() error", + "line": 126 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *Example1Create) sqlSave(ctx context.Context) (*Example1, error)", + "line": 139 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *Example1Create) createSpec() (*Example1, *sqlgraph.CreateSpec)", + "line": 162 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *Example1Create) OnConflict(opts ...sql.ConflictOption) *Example1UpsertOne", + "line": 207 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *Example1Create) OnConflictColumns(columns ...string) *Example1UpsertOne", + "line": 220 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example1Upsert) SetUpdatedAt(v time.Time) *Example1Upsert", + "line": 241 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example1Upsert) UpdateUpdatedAt() *Example1Upsert", + "line": 247 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example1Upsert) SetDeletedAt(v time.Time) *Example1Upsert", + "line": 253 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example1Upsert) UpdateDeletedAt() *Example1Upsert", + "line": 259 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example1Upsert) ClearDeletedAt() *Example1Upsert", + "line": 265 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (u *Example1Upsert) SetExampleValue1(v string) *Example1Upsert", + "line": 271 + }, + { + "kind": "func", + "name": "UpdateExampleValue1", + "signature": "func (u *Example1Upsert) UpdateExampleValue1() *Example1Upsert", + "line": 277 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *Example1UpsertOne) UpdateNewValues() *Example1UpsertOne", + "line": 293 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *Example1UpsertOne) Ignore() *Example1UpsertOne", + "line": 312 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *Example1UpsertOne) DoNothing() *Example1UpsertOne", + "line": 319 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *Example1UpsertOne) Update(set func(*Example1Upsert)) *Example1UpsertOne", + "line": 326 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example1UpsertOne) SetUpdatedAt(v time.Time) *Example1UpsertOne", + "line": 334 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example1UpsertOne) UpdateUpdatedAt() *Example1UpsertOne", + "line": 341 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example1UpsertOne) SetDeletedAt(v time.Time) *Example1UpsertOne", + "line": 348 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example1UpsertOne) UpdateDeletedAt() *Example1UpsertOne", + "line": 355 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example1UpsertOne) ClearDeletedAt() *Example1UpsertOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (u *Example1UpsertOne) SetExampleValue1(v string) *Example1UpsertOne", + "line": 369 + }, + { + "kind": "func", + "name": "UpdateExampleValue1", + "signature": "func (u *Example1UpsertOne) UpdateExampleValue1() *Example1UpsertOne", + "line": 376 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *Example1UpsertOne) Exec(ctx context.Context) error", + "line": 383 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *Example1UpsertOne) ExecX(ctx context.Context)", + "line": 391 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *Example1UpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 398 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *Example1UpsertOne) IDX(ctx context.Context) string", + "line": 412 + }, + { + "kind": "struct", + "name": "Example1CreateBulk", + "signature": "type Example1CreateBulk struct", + "line": 421 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *Example1CreateBulk) Save(ctx context.Context) ([]*Example1, error)", + "line": 429 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *Example1CreateBulk) SaveX(ctx context.Context) []*Example1", + "line": 485 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *Example1CreateBulk) Exec(ctx context.Context) error", + "line": 494 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *Example1CreateBulk) ExecX(ctx context.Context)", + "line": 500 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *Example1CreateBulk) OnConflict(opts ...sql.ConflictOption) *Example1UpsertBulk", + "line": 521 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *Example1CreateBulk) OnConflictColumns(columns ...string) *Example1UpsertBulk", + "line": 534 + }, + { + "kind": "struct", + "name": "Example1UpsertBulk", + "signature": "type Example1UpsertBulk struct", + "line": 543 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *Example1UpsertBulk) UpdateNewValues() *Example1UpsertBulk", + "line": 558 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *Example1UpsertBulk) Ignore() *Example1UpsertBulk", + "line": 579 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *Example1UpsertBulk) DoNothing() *Example1UpsertBulk", + "line": 586 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *Example1UpsertBulk) Update(set func(*Example1Upsert)) *Example1UpsertBulk", + "line": 593 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example1UpsertBulk) SetUpdatedAt(v time.Time) *Example1UpsertBulk", + "line": 601 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example1UpsertBulk) UpdateUpdatedAt() *Example1UpsertBulk", + "line": 608 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example1UpsertBulk) SetDeletedAt(v time.Time) *Example1UpsertBulk", + "line": 615 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example1UpsertBulk) UpdateDeletedAt() *Example1UpsertBulk", + "line": 622 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example1UpsertBulk) ClearDeletedAt() *Example1UpsertBulk", + "line": 629 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (u *Example1UpsertBulk) SetExampleValue1(v string) *Example1UpsertBulk", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateExampleValue1", + "signature": "func (u *Example1UpsertBulk) UpdateExampleValue1() *Example1UpsertBulk", + "line": 643 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *Example1UpsertBulk) Exec(ctx context.Context) error", + "line": 650 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *Example1UpsertBulk) ExecX(ctx context.Context)", + "line": 666 + } + ], + "line_count": 670 + }, + "pkg/framework/entutils/testutils/ent1/db/example1_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1Delete", + "signature": "type Example1Delete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *Example1Delete) Where(ps ...predicate.Example1) *Example1Delete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *Example1Delete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *Example1Delete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *Example1Delete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "Example1DeleteOne", + "signature": "type Example1DeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *Example1DeleteOne) Where(ps ...predicate.Example1) *Example1DeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *Example1DeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *Example1DeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "pkg/framework/entutils/testutils/ent1/db/example1_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1Query", + "signature": "type Example1Query struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *Example1Query) Where(ps ...predicate.Example1) *Example1Query", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *Example1Query) Limit(limit int) *Example1Query", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *Example1Query) Offset(offset int) *Example1Query", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *Example1Query) Unique(unique bool) *Example1Query", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *Example1Query) Order(o ...example1.OrderOption) *Example1Query", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *Example1Query) First(ctx context.Context) (*Example1, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *Example1Query) FirstX(ctx context.Context) *Example1", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *Example1Query) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *Example1Query) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *Example1Query) Only(ctx context.Context) (*Example1, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *Example1Query) OnlyX(ctx context.Context) *Example1", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *Example1Query) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *Example1Query) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *Example1Query) All(ctx context.Context) ([]*Example1, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *Example1Query) AllX(ctx context.Context) []*Example1", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *Example1Query) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *Example1Query) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *Example1Query) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *Example1Query) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *Example1Query) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *Example1Query) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *Example1Query) Clone() *Example1Query", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *Example1Query) GroupBy(field string, fields ...string) *Example1GroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *Example1Query) Select(fields ...string) *Example1Select", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *Example1Query) Aggregate(fns ...AggregateFunc) *Example1Select", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *Example1Query) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *Example1Query) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Example1, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *Example1Query) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *Example1Query) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *Example1Query) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *Example1Query) ForUpdate(opts ...sql.LockOption) *Example1Query", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *Example1Query) ForShare(opts ...sql.LockOption) *Example1Query", + "line": 466 + }, + { + "kind": "struct", + "name": "Example1GroupBy", + "signature": "type Example1GroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *Example1GroupBy) Aggregate(fns ...AggregateFunc) *Example1GroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *Example1GroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *Example1GroupBy) sqlScan(ctx context.Context, root *Example1Query, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "Example1Select", + "signature": "type Example1Select struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *Example1Select) Aggregate(fns ...AggregateFunc) *Example1Select", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *Example1Select) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *Example1Select) sqlScan(ctx context.Context, root *Example1Query, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "pkg/framework/entutils/testutils/ent1/db/example1_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1Update", + "signature": "type Example1Update struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *Example1Update) Where(ps ...predicate.Example1) *Example1Update", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *Example1Update) SetUpdatedAt(v time.Time) *Example1Update", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *Example1Update) SetDeletedAt(v time.Time) *Example1Update", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *Example1Update) SetNillableDeletedAt(v *time.Time) *Example1Update", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *Example1Update) ClearDeletedAt() *Example1Update", + "line": 52 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (_u *Example1Update) SetExampleValue1(v string) *Example1Update", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableExampleValue1", + "signature": "func (_u *Example1Update) SetNillableExampleValue1(v *string) *Example1Update", + "line": 64 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *Example1Update) Mutation() *Example1Mutation", + "line": 72 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *Example1Update) Save(ctx context.Context) (int, error)", + "line": 77 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *Example1Update) SaveX(ctx context.Context) int", + "line": 83 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *Example1Update) Exec(ctx context.Context) error", + "line": 92 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *Example1Update) ExecX(ctx context.Context)", + "line": 98 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *Example1Update) defaults()", + "line": 105 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *Example1Update) sqlSave(ctx context.Context) (_node int, err error)", + "line": 112 + }, + { + "kind": "struct", + "name": "Example1UpdateOne", + "signature": "type Example1UpdateOne struct", + "line": 146 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *Example1UpdateOne) SetUpdatedAt(v time.Time) *Example1UpdateOne", + "line": 154 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *Example1UpdateOne) SetDeletedAt(v time.Time) *Example1UpdateOne", + "line": 160 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *Example1UpdateOne) SetNillableDeletedAt(v *time.Time) *Example1UpdateOne", + "line": 166 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *Example1UpdateOne) ClearDeletedAt() *Example1UpdateOne", + "line": 174 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (_u *Example1UpdateOne) SetExampleValue1(v string) *Example1UpdateOne", + "line": 180 + }, + { + "kind": "func", + "name": "SetNillableExampleValue1", + "signature": "func (_u *Example1UpdateOne) SetNillableExampleValue1(v *string) *Example1UpdateOne", + "line": 186 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *Example1UpdateOne) Mutation() *Example1Mutation", + "line": 194 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *Example1UpdateOne) Where(ps ...predicate.Example1) *Example1UpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *Example1UpdateOne) Select(field string, fields ...string) *Example1UpdateOne", + "line": 206 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *Example1UpdateOne) Save(ctx context.Context) (*Example1, error)", + "line": 212 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *Example1UpdateOne) SaveX(ctx context.Context) *Example1", + "line": 218 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *Example1UpdateOne) Exec(ctx context.Context) error", + "line": 227 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *Example1UpdateOne) ExecX(ctx context.Context)", + "line": 233 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *Example1UpdateOne) defaults()", + "line": 240 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *Example1UpdateOne) sqlSave(ctx context.Context) (_node *Example1, err error)", + "line": 247 + } + ], + "line_count": 298 + }, + "pkg/framework/entutils/testutils/ent1/db/expose.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetConfig", + "signature": "func (c *Client) GetConfig() *entutils.RawEntConfig", + "line": 15 + }, + { + "kind": "struct", + "name": "ExposedTxDriver", + "signature": "type ExposedTxDriver struct", + "line": 24 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (d *ExposedTxDriver) Rollback() error", + "line": 30 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (d *ExposedTxDriver) Commit() error", + "line": 34 + }, + { + "kind": "func", + "name": "SavePoint", + "signature": "func (d *ExposedTxDriver) SavePoint(name string) error", + "line": 38 + }, + { + "kind": "func", + "name": "RollbackTo", + "signature": "func (d *ExposedTxDriver) RollbackTo(name string) error", + "line": 43 + }, + { + "kind": "func", + "name": "Release", + "signature": "func (d *ExposedTxDriver) Release(name string) error", + "line": 48 + }, + { + "kind": "func", + "name": "HijackTx", + "signature": "func (c *Client) HijackTx(ctx context.Context, opts *sql.TxOptions) (context.Context, *entutils.RawEntConfig, *ExposedTxDriver, error)", + "line": 55 + }, + { + "kind": "func", + "name": "NewTxClientFromRawConfig", + "signature": "func NewTxClientFromRawConfig(ctx context.Context, cfg entutils.RawEntConfig) *Tx", + "line": 78 + } + ], + "line_count": 94 + }, + "pkg/framework/entutils/testutils/ent1/db/hook/hook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db\"", + "symbols": [ + { + "kind": "func", + "name": "Mutate", + "signature": "func (f Example1Func) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 17 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(first, second Condition, rest ...Condition) Condition", + "line": 28 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(first, second Condition, rest ...Condition) Condition", + "line": 43 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(cond Condition) Condition", + "line": 58 + }, + { + "kind": "func", + "name": "HasOp", + "signature": "func HasOp(op db.Op) Condition", + "line": 65 + }, + { + "kind": "func", + "name": "HasAddedFields", + "signature": "func HasAddedFields(field string, fields ...string) Condition", + "line": 72 + }, + { + "kind": "func", + "name": "HasClearedFields", + "signature": "func HasClearedFields(field string, fields ...string) Condition", + "line": 87 + }, + { + "kind": "func", + "name": "HasFields", + "signature": "func HasFields(field string, fields ...string) Condition", + "line": 102 + }, + { + "kind": "func", + "name": "If", + "signature": "func If(hk db.Hook, cond Condition) db.Hook", + "line": 119 + }, + { + "kind": "func", + "name": "On", + "signature": "func On(hk db.Hook, op db.Op) db.Hook", + "line": 133 + }, + { + "kind": "func", + "name": "Unless", + "signature": "func Unless(hk db.Hook, op db.Op) db.Hook", + "line": 140 + }, + { + "kind": "func", + "name": "FixedError", + "signature": "func FixedError(err error) db.Hook", + "line": 145 + }, + { + "kind": "func", + "name": "Reject", + "signature": "func Reject(op db.Op) db.Hook", + "line": 160 + }, + { + "kind": "struct", + "name": "Chain", + "signature": "type Chain struct", + "line": 167 + }, + { + "kind": "func", + "name": "NewChain", + "signature": "func NewChain(hooks ...db.Hook) Chain", + "line": 172 + }, + { + "kind": "func", + "name": "Hook", + "signature": "func (c Chain) Hook() db.Hook", + "line": 177 + }, + { + "kind": "func", + "name": "Append", + "signature": "func (c Chain) Append(hooks ...db.Hook) Chain", + "line": 188 + }, + { + "kind": "func", + "name": "Extend", + "signature": "func (c Chain) Extend(chain Chain) Chain", + "line": 197 + } + ], + "line_count": 199 + }, + "pkg/framework/entutils/testutils/ent1/db/migrate/migrate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"io\"", + "symbols": [ + { + "kind": "struct", + "name": "Schema", + "signature": "type Schema struct", + "line": 36 + }, + { + "kind": "func", + "name": "NewSchema", + "signature": "func NewSchema(drv dialect.Driver) *Schema", + "line": 41 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 44 + }, + { + "kind": "func", + "name": "Create", + "signature": "func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error", + "line": 49 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func Diff(ctx context.Context, url string, opts ...schema.MigrateOption) error", + "line": 59 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func NamedDiff(ctx context.Context, url, name string, opts ...schema.MigrateOption) error", + "line": 65 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func (s *Schema) Diff(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 71 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func (s *Schema) NamedDiff(ctx context.Context, name string, opts ...schema.MigrateOption) error", + "line": 81 + }, + { + "kind": "func", + "name": "WriteTo", + "signature": "func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error", + "line": 94 + } + ], + "line_count": 96 + }, + "pkg/framework/entutils/testutils/ent1/db/migrate/schema.go": { + "header": "\t\"entgo.io/ent/dialect/sql/schema\"\n\t\"entgo.io/ent/schema/field\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 31 + } + ], + "line_count": 32 + }, + "pkg/framework/entutils/testutils/ent1/db/mutation.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1Mutation", + "signature": "type Example1Mutation struct", + "line": 31 + }, + { + "kind": "func", + "name": "newExample1Mutation", + "signature": "func newExample1Mutation(c config, op Op, opts ...example1Option) *Example1Mutation", + "line": 52 + }, + { + "kind": "func", + "name": "withExample1ID", + "signature": "func withExample1ID(id string) example1Option", + "line": 66 + }, + { + "kind": "func", + "name": "withExample1", + "signature": "func withExample1(node *Example1) example1Option", + "line": 88 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (m Example1Mutation) Client() *Client", + "line": 99 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (m Example1Mutation) Tx() (*Tx, error)", + "line": 107 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (m *Example1Mutation) SetID(id string)", + "line": 118 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (m *Example1Mutation) ID() (id string, exists bool)", + "line": 124 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (m *Example1Mutation) IDs(ctx context.Context) ([]string, error)", + "line": 135 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (m *Example1Mutation) SetCreatedAt(t time.Time)", + "line": 151 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func (m *Example1Mutation) CreatedAt() (r time.Time, exists bool)", + "line": 156 + }, + { + "kind": "func", + "name": "OldCreatedAt", + "signature": "func (m *Example1Mutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)", + "line": 167 + }, + { + "kind": "func", + "name": "ResetCreatedAt", + "signature": "func (m *Example1Mutation) ResetCreatedAt()", + "line": 182 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (m *Example1Mutation) SetUpdatedAt(t time.Time)", + "line": 187 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func (m *Example1Mutation) UpdatedAt() (r time.Time, exists bool)", + "line": 192 + }, + { + "kind": "func", + "name": "OldUpdatedAt", + "signature": "func (m *Example1Mutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)", + "line": 203 + }, + { + "kind": "func", + "name": "ResetUpdatedAt", + "signature": "func (m *Example1Mutation) ResetUpdatedAt()", + "line": 218 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (m *Example1Mutation) SetDeletedAt(t time.Time)", + "line": 223 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func (m *Example1Mutation) DeletedAt() (r time.Time, exists bool)", + "line": 228 + }, + { + "kind": "func", + "name": "OldDeletedAt", + "signature": "func (m *Example1Mutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)", + "line": 239 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (m *Example1Mutation) ClearDeletedAt()", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtCleared", + "signature": "func (m *Example1Mutation) DeletedAtCleared() bool", + "line": 260 + }, + { + "kind": "func", + "name": "ResetDeletedAt", + "signature": "func (m *Example1Mutation) ResetDeletedAt()", + "line": 266 + }, + { + "kind": "func", + "name": "SetExampleValue1", + "signature": "func (m *Example1Mutation) SetExampleValue1(s string)", + "line": 272 + }, + { + "kind": "func", + "name": "ExampleValue1", + "signature": "func (m *Example1Mutation) ExampleValue1() (r string, exists bool)", + "line": 277 + }, + { + "kind": "func", + "name": "OldExampleValue1", + "signature": "func (m *Example1Mutation) OldExampleValue1(ctx context.Context) (v string, err error)", + "line": 288 + }, + { + "kind": "func", + "name": "ResetExampleValue1", + "signature": "func (m *Example1Mutation) ResetExampleValue1()", + "line": 303 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (m *Example1Mutation) Where(ps ...predicate.Example1)", + "line": 308 + }, + { + "kind": "func", + "name": "WhereP", + "signature": "func (m *Example1Mutation) WhereP(ps ...func(*sql.Selector))", + "line": 314 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (m *Example1Mutation) Op() Op", + "line": 323 + }, + { + "kind": "func", + "name": "SetOp", + "signature": "func (m *Example1Mutation) SetOp(op Op)", + "line": 328 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (m *Example1Mutation) Type() string", + "line": 333 + }, + { + "kind": "func", + "name": "Fields", + "signature": "func (m *Example1Mutation) Fields() []string", + "line": 340 + }, + { + "kind": "func", + "name": "Field", + "signature": "func (m *Example1Mutation) Field(name string) (ent.Value, bool)", + "line": 360 + }, + { + "kind": "func", + "name": "OldField", + "signature": "func (m *Example1Mutation) OldField(ctx context.Context, name string) (ent.Value, error)", + "line": 377 + }, + { + "kind": "func", + "name": "SetField", + "signature": "func (m *Example1Mutation) SetField(name string, value ent.Value) error", + "line": 394 + }, + { + "kind": "func", + "name": "AddedFields", + "signature": "func (m *Example1Mutation) AddedFields() []string", + "line": 430 + }, + { + "kind": "func", + "name": "AddedField", + "signature": "func (m *Example1Mutation) AddedField(name string) (ent.Value, bool)", + "line": 437 + }, + { + "kind": "func", + "name": "AddField", + "signature": "func (m *Example1Mutation) AddField(name string, value ent.Value) error", + "line": 444 + }, + { + "kind": "func", + "name": "ClearedFields", + "signature": "func (m *Example1Mutation) ClearedFields() []string", + "line": 452 + }, + { + "kind": "func", + "name": "FieldCleared", + "signature": "func (m *Example1Mutation) FieldCleared(name string) bool", + "line": 462 + }, + { + "kind": "func", + "name": "ClearField", + "signature": "func (m *Example1Mutation) ClearField(name string) error", + "line": 469 + }, + { + "kind": "func", + "name": "ResetField", + "signature": "func (m *Example1Mutation) ResetField(name string) error", + "line": 480 + }, + { + "kind": "func", + "name": "AddedEdges", + "signature": "func (m *Example1Mutation) AddedEdges() []string", + "line": 499 + }, + { + "kind": "func", + "name": "AddedIDs", + "signature": "func (m *Example1Mutation) AddedIDs(name string) []ent.Value", + "line": 506 + }, + { + "kind": "func", + "name": "RemovedEdges", + "signature": "func (m *Example1Mutation) RemovedEdges() []string", + "line": 511 + }, + { + "kind": "func", + "name": "RemovedIDs", + "signature": "func (m *Example1Mutation) RemovedIDs(name string) []ent.Value", + "line": 518 + }, + { + "kind": "func", + "name": "ClearedEdges", + "signature": "func (m *Example1Mutation) ClearedEdges() []string", + "line": 523 + }, + { + "kind": "func", + "name": "EdgeCleared", + "signature": "func (m *Example1Mutation) EdgeCleared(name string) bool", + "line": 530 + }, + { + "kind": "func", + "name": "ClearEdge", + "signature": "func (m *Example1Mutation) ClearEdge(name string) error", + "line": 536 + }, + { + "kind": "func", + "name": "ResetEdge", + "signature": "func (m *Example1Mutation) ResetEdge(name string) error", + "line": 542 + } + ], + "line_count": 544 + }, + "pkg/framework/entutils/testutils/ent1/db/paginate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/pagination\"", + "symbols": [ + { + "kind": "func", + "name": "Paginate", + "signature": "func (_m *Example1Query) Paginate(ctx context.Context, page pagination.Page) (pagination.Result[*Example1], error)", + "line": 14 + } + ], + "line_count": 68 + }, + "pkg/framework/entutils/testutils/ent1/db/predicate/predicate.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\ntype Example1 func(*sql.Selector)", + "symbols": [], + "line_count": 10 + }, + "pkg/framework/entutils/testutils/ent1/db/runtime.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/db/example1\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent1/schema\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 31 + }, + "pkg/framework/entutils/testutils/ent1/db/runtime/runtime.go": { + "header": "const (\n\tVersion = \"v0.14.6\" // Version of ent codegen.\n\tSum = \"h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=\" // Sum of ent codegen.", + "symbols": [], + "line_count": 10 + }, + "pkg/framework/entutils/testutils/ent1/db/tx.go": { + "header": "\t\"context\"\n\tstdsql \"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Tx", + "signature": "type Tx struct", + "line": 15 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error", + "line": 57 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (tx *Tx) Commit() error", + "line": 62 + }, + { + "kind": "func", + "name": "OnCommit", + "signature": "func (tx *Tx) OnCommit(f CommitHook)", + "line": 77 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error", + "line": 113 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (tx *Tx) Rollback() error", + "line": 118 + }, + { + "kind": "func", + "name": "OnRollback", + "signature": "func (tx *Tx) OnRollback(f RollbackHook)", + "line": 133 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (tx *Tx) Client() *Client", + "line": 141 + }, + { + "kind": "func", + "name": "init", + "signature": "func (tx *Tx) init()", + "line": 149 + }, + { + "kind": "struct", + "name": "txDriver", + "signature": "type txDriver struct", + "line": 164 + }, + { + "kind": "func", + "name": "newTx", + "signature": "func newTx(ctx context.Context, drv dialect.Driver) (*txDriver, error)", + "line": 176 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (tx *txDriver) Tx(context.Context) (dialect.Tx, error)", + "line": 186 + }, + { + "kind": "func", + "name": "Dialect", + "signature": "func (tx *txDriver) Dialect() string", + "line": 189 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (tx *txDriver) Exec(ctx context.Context, query string, args, v any) error", + "line": 203 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error", + "line": 208 + }, + { + "kind": "func", + "name": "ExecContext", + "signature": "func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)", + "line": 216 + }, + { + "kind": "func", + "name": "QueryContext", + "signature": "func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)", + "line": 228 + } + ], + "line_count": 236 + }, + "pkg/framework/entutils/testutils/ent1/entc.go": { + "header": "\t\"log\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 16 + } + ], + "line_count": 34 + }, + "pkg/framework/entutils/testutils/ent1/generate.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "pkg/framework/entutils/testutils/ent1/schema/example1.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "struct", + "name": "Example1", + "signature": "type Example1 struct", + "line": 10 + } + ], + "line_count": 35 + }, + "pkg/framework/entutils/testutils/ent2/db/client.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Client", + "signature": "type Client struct", + "line": 23 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(opts ...Option) *Client", + "line": 32 + }, + { + "kind": "func", + "name": "init", + "signature": "func (c *Client) init()", + "line": 38 + }, + { + "kind": "func", + "name": "newConfig", + "signature": "func newConfig(opts ...Option) config", + "line": 62 + }, + { + "kind": "func", + "name": "options", + "signature": "func (c *config) options(opts ...Option)", + "line": 69 + }, + { + "kind": "func", + "name": "Debug", + "signature": "func Debug() Option", + "line": 79 + }, + { + "kind": "func", + "name": "Log", + "signature": "func Log(fn func(...any)) Option", + "line": 86 + }, + { + "kind": "func", + "name": "Driver", + "signature": "func Driver(driver dialect.Driver) Option", + "line": 93 + }, + { + "kind": "func", + "name": "Open", + "signature": "func Open(driverName, dataSourceName string, options ...Option) (*Client, error)", + "line": 102 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (c *Client) Tx(ctx context.Context) (*Tx, error)", + "line": 120 + }, + { + "kind": "func", + "name": "BeginTx", + "signature": "func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)", + "line": 138 + }, + { + "kind": "func", + "name": "Debug", + "signature": "func (c *Client) Debug() *Client", + "line": 163 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (c *Client) Close() error", + "line": 175 + }, + { + "kind": "func", + "name": "Use", + "signature": "func (c *Client) Use(hooks ...Hook)", + "line": 181 + }, + { + "kind": "func", + "name": "Intercept", + "signature": "func (c *Client) Intercept(interceptors ...Interceptor)", + "line": 187 + }, + { + "kind": "func", + "name": "Mutate", + "signature": "func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)", + "line": 192 + }, + { + "kind": "struct", + "name": "Example2Client", + "signature": "type Example2Client struct", + "line": 202 + }, + { + "kind": "func", + "name": "NewExample2Client", + "signature": "func NewExample2Client(c config) *Example2Client", + "line": 207 + }, + { + "kind": "func", + "name": "Use", + "signature": "func (c *Example2Client) Use(hooks ...Hook)", + "line": 213 + }, + { + "kind": "func", + "name": "Intercept", + "signature": "func (c *Example2Client) Intercept(interceptors ...Interceptor)", + "line": 219 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (c *Example2Client) Create() *Example2Create", + "line": 224 + }, + { + "kind": "func", + "name": "CreateBulk", + "signature": "func (c *Example2Client) CreateBulk(builders ...*Example2Create) *Example2CreateBulk", + "line": 230 + }, + { + "kind": "func", + "name": "MapCreateBulk", + "signature": "func (c *Example2Client) MapCreateBulk(slice any, setFunc func(*Example2Create, int)) *Example2CreateBulk", + "line": 236 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (c *Example2Client) Update() *Example2Update", + "line": 250 + }, + { + "kind": "func", + "name": "UpdateOne", + "signature": "func (c *Example2Client) UpdateOne(_m *Example2) *Example2UpdateOne", + "line": 256 + }, + { + "kind": "func", + "name": "UpdateOneID", + "signature": "func (c *Example2Client) UpdateOneID(id string) *Example2UpdateOne", + "line": 262 + }, + { + "kind": "func", + "name": "Delete", + "signature": "func (c *Example2Client) Delete() *Example2Delete", + "line": 268 + }, + { + "kind": "func", + "name": "DeleteOne", + "signature": "func (c *Example2Client) DeleteOne(_m *Example2) *Example2DeleteOne", + "line": 274 + }, + { + "kind": "func", + "name": "DeleteOneID", + "signature": "func (c *Example2Client) DeleteOneID(id string) *Example2DeleteOne", + "line": 279 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (c *Example2Client) Query() *Example2Query", + "line": 287 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (c *Example2Client) Get(ctx context.Context, id string) (*Example2, error)", + "line": 296 + }, + { + "kind": "func", + "name": "GetX", + "signature": "func (c *Example2Client) GetX(ctx context.Context, id string) *Example2", + "line": 301 + }, + { + "kind": "func", + "name": "Hooks", + "signature": "func (c *Example2Client) Hooks() []Hook", + "line": 310 + }, + { + "kind": "func", + "name": "Interceptors", + "signature": "func (c *Example2Client) Interceptors() []Interceptor", + "line": 315 + }, + { + "kind": "func", + "name": "mutate", + "signature": "func (c *Example2Client) mutate(ctx context.Context, m *Example2Mutation) (Value, error)", + "line": 319 + }, + { + "kind": "func", + "name": "ExecContext", + "signature": "func (c *config) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)", + "line": 346 + }, + { + "kind": "func", + "name": "QueryContext", + "signature": "func (c *config) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)", + "line": 358 + } + ], + "line_count": 366 + }, + "pkg/framework/entutils/testutils/ent2/db/ent.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "clientCtxKey", + "signature": "type clientCtxKey struct", + "line": 37 + }, + { + "kind": "func", + "name": "FromContext", + "signature": "func FromContext(ctx context.Context) *Client", + "line": 40 + }, + { + "kind": "func", + "name": "NewContext", + "signature": "func NewContext(parent context.Context, c *Client) context.Context", + "line": 46 + }, + { + "kind": "struct", + "name": "txCtxKey", + "signature": "type txCtxKey struct", + "line": 50 + }, + { + "kind": "func", + "name": "TxFromContext", + "signature": "func TxFromContext(ctx context.Context) *Tx", + "line": 53 + }, + { + "kind": "func", + "name": "NewTxContext", + "signature": "func NewTxContext(parent context.Context, tx *Tx) context.Context", + "line": 59 + }, + { + "kind": "func", + "name": "checkColumn", + "signature": "func checkColumn(t, c string) error", + "line": 73 + }, + { + "kind": "func", + "name": "Asc", + "signature": "func Asc(fields ...string) func(*sql.Selector)", + "line": 83 + }, + { + "kind": "func", + "name": "Desc", + "signature": "func Desc(fields ...string) func(*sql.Selector)", + "line": 95 + }, + { + "kind": "func", + "name": "As", + "signature": "func As(fn AggregateFunc, end string) AggregateFunc", + "line": 114 + }, + { + "kind": "func", + "name": "Count", + "signature": "func Count() AggregateFunc", + "line": 121 + }, + { + "kind": "func", + "name": "Max", + "signature": "func Max(field string) AggregateFunc", + "line": 128 + }, + { + "kind": "func", + "name": "Mean", + "signature": "func Mean(field string) AggregateFunc", + "line": 139 + }, + { + "kind": "func", + "name": "Min", + "signature": "func Min(field string) AggregateFunc", + "line": 150 + }, + { + "kind": "func", + "name": "Sum", + "signature": "func Sum(field string) AggregateFunc", + "line": 161 + }, + { + "kind": "struct", + "name": "ValidationError", + "signature": "type ValidationError struct", + "line": 172 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *ValidationError) Error() string", + "line": 178 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ValidationError) Unwrap() error", + "line": 183 + }, + { + "kind": "func", + "name": "IsValidationError", + "signature": "func IsValidationError(err error) bool", + "line": 188 + }, + { + "kind": "struct", + "name": "NotFoundError", + "signature": "type NotFoundError struct", + "line": 197 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotFoundError) Error() string", + "line": 202 + }, + { + "kind": "func", + "name": "IsNotFound", + "signature": "func IsNotFound(err error) bool", + "line": 207 + }, + { + "kind": "func", + "name": "MaskNotFound", + "signature": "func MaskNotFound(err error) error", + "line": 216 + }, + { + "kind": "struct", + "name": "NotSingularError", + "signature": "type NotSingularError struct", + "line": 224 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotSingularError) Error() string", + "line": 229 + }, + { + "kind": "func", + "name": "IsNotSingular", + "signature": "func IsNotSingular(err error) bool", + "line": 234 + }, + { + "kind": "struct", + "name": "NotLoadedError", + "signature": "type NotLoadedError struct", + "line": 243 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NotLoadedError) Error() string", + "line": 248 + }, + { + "kind": "func", + "name": "IsNotLoaded", + "signature": "func IsNotLoaded(err error) bool", + "line": 253 + }, + { + "kind": "struct", + "name": "ConstraintError", + "signature": "type ConstraintError struct", + "line": 264 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e ConstraintError) Error() string", + "line": 270 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *ConstraintError) Unwrap() error", + "line": 275 + }, + { + "kind": "func", + "name": "IsConstraintError", + "signature": "func IsConstraintError(err error) bool", + "line": 280 + }, + { + "kind": "struct", + "name": "selector", + "signature": "type selector struct", + "line": 289 + }, + { + "kind": "func", + "name": "ScanX", + "signature": "func (s *selector) ScanX(ctx context.Context, v any)", + "line": 297 + }, + { + "kind": "func", + "name": "Strings", + "signature": "func (s *selector) Strings(ctx context.Context) ([]string, error)", + "line": 304 + }, + { + "kind": "func", + "name": "StringsX", + "signature": "func (s *selector) StringsX(ctx context.Context) []string", + "line": 316 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s *selector) String(ctx context.Context) (_ string, err error)", + "line": 325 + }, + { + "kind": "func", + "name": "StringX", + "signature": "func (s *selector) StringX(ctx context.Context) string", + "line": 342 + }, + { + "kind": "func", + "name": "Ints", + "signature": "func (s *selector) Ints(ctx context.Context) ([]int, error)", + "line": 351 + }, + { + "kind": "func", + "name": "IntsX", + "signature": "func (s *selector) IntsX(ctx context.Context) []int", + "line": 363 + }, + { + "kind": "func", + "name": "Int", + "signature": "func (s *selector) Int(ctx context.Context) (_ int, err error)", + "line": 372 + }, + { + "kind": "func", + "name": "IntX", + "signature": "func (s *selector) IntX(ctx context.Context) int", + "line": 389 + }, + { + "kind": "func", + "name": "Float64s", + "signature": "func (s *selector) Float64s(ctx context.Context) ([]float64, error)", + "line": 398 + }, + { + "kind": "func", + "name": "Float64sX", + "signature": "func (s *selector) Float64sX(ctx context.Context) []float64", + "line": 410 + }, + { + "kind": "func", + "name": "Float64", + "signature": "func (s *selector) Float64(ctx context.Context) (_ float64, err error)", + "line": 419 + }, + { + "kind": "func", + "name": "Float64X", + "signature": "func (s *selector) Float64X(ctx context.Context) float64", + "line": 436 + }, + { + "kind": "func", + "name": "Bools", + "signature": "func (s *selector) Bools(ctx context.Context) ([]bool, error)", + "line": 445 + }, + { + "kind": "func", + "name": "BoolsX", + "signature": "func (s *selector) BoolsX(ctx context.Context) []bool", + "line": 457 + }, + { + "kind": "func", + "name": "Bool", + "signature": "func (s *selector) Bool(ctx context.Context) (_ bool, err error)", + "line": 466 + }, + { + "kind": "func", + "name": "BoolX", + "signature": "func (s *selector) BoolX(ctx context.Context) bool", + "line": 483 + }, + { + "kind": "func", + "name": "setContextOp", + "signature": "func setContextOp(ctx context.Context, qc *QueryContext, op string) context.Context", + "line": 526 + } + ], + "line_count": 608 + }, + "pkg/framework/entutils/testutils/ent2/db/enttest/enttest.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db\"\n\t_ \"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db/runtime\"", + "symbols": [ + { + "kind": "func", + "name": "WithOptions", + "signature": "func WithOptions(opts ...db.Option) Option", + "line": 34 + }, + { + "kind": "func", + "name": "WithMigrateOptions", + "signature": "func WithMigrateOptions(opts ...schema.MigrateOption) Option", + "line": 41 + }, + { + "kind": "func", + "name": "newOptions", + "signature": "func newOptions(opts []Option) *options", + "line": 47 + }, + { + "kind": "func", + "name": "Open", + "signature": "func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *db.Client", + "line": 56 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(t TestingT, opts ...Option) *db.Client", + "line": 68 + }, + { + "kind": "func", + "name": "migrateSchema", + "signature": "func migrateSchema(t TestingT, c *db.Client, o *options)", + "line": 74 + } + ], + "line_count": 84 + }, + "pkg/framework/entutils/testutils/ent2/db/example2.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2", + "signature": "type Example2 struct", + "line": 16 + }, + { + "kind": "func", + "name": "assignValues", + "signature": "func (_m *Example2) assignValues(columns []string, values []any) error", + "line": 49 + }, + { + "kind": "func", + "name": "Value", + "signature": "func (_m *Example2) Value(name string) (ent.Value, error)", + "line": 95 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (_m *Example2) Update() *Example2UpdateOne", + "line": 102 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (_m *Example2) Unwrap() *Example2", + "line": 108 + }, + { + "kind": "func", + "name": "String", + "signature": "func (_m *Example2) String() string", + "line": 118 + } + ], + "line_count": 140 + }, + "pkg/framework/entutils/testutils/ent2/db/example2/example2.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ValidColumn", + "signature": "func ValidColumn(column string) bool", + "line": 38 + }, + { + "kind": "func", + "name": "ByID", + "signature": "func ByID(opts ...sql.OrderTermOption) OrderOption", + "line": 60 + }, + { + "kind": "func", + "name": "ByCreatedAt", + "signature": "func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 65 + }, + { + "kind": "func", + "name": "ByUpdatedAt", + "signature": "func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 70 + }, + { + "kind": "func", + "name": "ByDeletedAt", + "signature": "func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption", + "line": 75 + }, + { + "kind": "func", + "name": "ByExampleValue2", + "signature": "func ByExampleValue2(opts ...sql.OrderTermOption) OrderOption", + "line": 80 + } + ], + "line_count": 82 + }, + "pkg/framework/entutils/testutils/ent2/db/example2/where.go": { + "header": "\t\"time\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db/predicate\"", + "symbols": [ + { + "kind": "func", + "name": "ID", + "signature": "func ID(id string) predicate.Example2", + "line": 13 + }, + { + "kind": "func", + "name": "IDEQ", + "signature": "func IDEQ(id string) predicate.Example2", + "line": 18 + }, + { + "kind": "func", + "name": "IDNEQ", + "signature": "func IDNEQ(id string) predicate.Example2", + "line": 23 + }, + { + "kind": "func", + "name": "IDIn", + "signature": "func IDIn(ids ...string) predicate.Example2", + "line": 28 + }, + { + "kind": "func", + "name": "IDNotIn", + "signature": "func IDNotIn(ids ...string) predicate.Example2", + "line": 33 + }, + { + "kind": "func", + "name": "IDGT", + "signature": "func IDGT(id string) predicate.Example2", + "line": 38 + }, + { + "kind": "func", + "name": "IDGTE", + "signature": "func IDGTE(id string) predicate.Example2", + "line": 43 + }, + { + "kind": "func", + "name": "IDLT", + "signature": "func IDLT(id string) predicate.Example2", + "line": 48 + }, + { + "kind": "func", + "name": "IDLTE", + "signature": "func IDLTE(id string) predicate.Example2", + "line": 53 + }, + { + "kind": "func", + "name": "IDEqualFold", + "signature": "func IDEqualFold(id string) predicate.Example2", + "line": 58 + }, + { + "kind": "func", + "name": "IDContainsFold", + "signature": "func IDContainsFold(id string) predicate.Example2", + "line": 63 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func CreatedAt(v time.Time) predicate.Example2", + "line": 68 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func UpdatedAt(v time.Time) predicate.Example2", + "line": 73 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func DeletedAt(v time.Time) predicate.Example2", + "line": 78 + }, + { + "kind": "func", + "name": "ExampleValue2", + "signature": "func ExampleValue2(v string) predicate.Example2", + "line": 83 + }, + { + "kind": "func", + "name": "CreatedAtEQ", + "signature": "func CreatedAtEQ(v time.Time) predicate.Example2", + "line": 88 + }, + { + "kind": "func", + "name": "CreatedAtNEQ", + "signature": "func CreatedAtNEQ(v time.Time) predicate.Example2", + "line": 93 + }, + { + "kind": "func", + "name": "CreatedAtIn", + "signature": "func CreatedAtIn(vs ...time.Time) predicate.Example2", + "line": 98 + }, + { + "kind": "func", + "name": "CreatedAtNotIn", + "signature": "func CreatedAtNotIn(vs ...time.Time) predicate.Example2", + "line": 103 + }, + { + "kind": "func", + "name": "CreatedAtGT", + "signature": "func CreatedAtGT(v time.Time) predicate.Example2", + "line": 108 + }, + { + "kind": "func", + "name": "CreatedAtGTE", + "signature": "func CreatedAtGTE(v time.Time) predicate.Example2", + "line": 113 + }, + { + "kind": "func", + "name": "CreatedAtLT", + "signature": "func CreatedAtLT(v time.Time) predicate.Example2", + "line": 118 + }, + { + "kind": "func", + "name": "CreatedAtLTE", + "signature": "func CreatedAtLTE(v time.Time) predicate.Example2", + "line": 123 + }, + { + "kind": "func", + "name": "UpdatedAtEQ", + "signature": "func UpdatedAtEQ(v time.Time) predicate.Example2", + "line": 128 + }, + { + "kind": "func", + "name": "UpdatedAtNEQ", + "signature": "func UpdatedAtNEQ(v time.Time) predicate.Example2", + "line": 133 + }, + { + "kind": "func", + "name": "UpdatedAtIn", + "signature": "func UpdatedAtIn(vs ...time.Time) predicate.Example2", + "line": 138 + }, + { + "kind": "func", + "name": "UpdatedAtNotIn", + "signature": "func UpdatedAtNotIn(vs ...time.Time) predicate.Example2", + "line": 143 + }, + { + "kind": "func", + "name": "UpdatedAtGT", + "signature": "func UpdatedAtGT(v time.Time) predicate.Example2", + "line": 148 + }, + { + "kind": "func", + "name": "UpdatedAtGTE", + "signature": "func UpdatedAtGTE(v time.Time) predicate.Example2", + "line": 153 + }, + { + "kind": "func", + "name": "UpdatedAtLT", + "signature": "func UpdatedAtLT(v time.Time) predicate.Example2", + "line": 158 + }, + { + "kind": "func", + "name": "UpdatedAtLTE", + "signature": "func UpdatedAtLTE(v time.Time) predicate.Example2", + "line": 163 + }, + { + "kind": "func", + "name": "DeletedAtEQ", + "signature": "func DeletedAtEQ(v time.Time) predicate.Example2", + "line": 168 + }, + { + "kind": "func", + "name": "DeletedAtNEQ", + "signature": "func DeletedAtNEQ(v time.Time) predicate.Example2", + "line": 173 + }, + { + "kind": "func", + "name": "DeletedAtIn", + "signature": "func DeletedAtIn(vs ...time.Time) predicate.Example2", + "line": 178 + }, + { + "kind": "func", + "name": "DeletedAtNotIn", + "signature": "func DeletedAtNotIn(vs ...time.Time) predicate.Example2", + "line": 183 + }, + { + "kind": "func", + "name": "DeletedAtGT", + "signature": "func DeletedAtGT(v time.Time) predicate.Example2", + "line": 188 + }, + { + "kind": "func", + "name": "DeletedAtGTE", + "signature": "func DeletedAtGTE(v time.Time) predicate.Example2", + "line": 193 + }, + { + "kind": "func", + "name": "DeletedAtLT", + "signature": "func DeletedAtLT(v time.Time) predicate.Example2", + "line": 198 + }, + { + "kind": "func", + "name": "DeletedAtLTE", + "signature": "func DeletedAtLTE(v time.Time) predicate.Example2", + "line": 203 + }, + { + "kind": "func", + "name": "DeletedAtIsNil", + "signature": "func DeletedAtIsNil() predicate.Example2", + "line": 208 + }, + { + "kind": "func", + "name": "DeletedAtNotNil", + "signature": "func DeletedAtNotNil() predicate.Example2", + "line": 213 + }, + { + "kind": "func", + "name": "ExampleValue2EQ", + "signature": "func ExampleValue2EQ(v string) predicate.Example2", + "line": 218 + }, + { + "kind": "func", + "name": "ExampleValue2NEQ", + "signature": "func ExampleValue2NEQ(v string) predicate.Example2", + "line": 223 + }, + { + "kind": "func", + "name": "ExampleValue2In", + "signature": "func ExampleValue2In(vs ...string) predicate.Example2", + "line": 228 + }, + { + "kind": "func", + "name": "ExampleValue2NotIn", + "signature": "func ExampleValue2NotIn(vs ...string) predicate.Example2", + "line": 233 + }, + { + "kind": "func", + "name": "ExampleValue2GT", + "signature": "func ExampleValue2GT(v string) predicate.Example2", + "line": 238 + }, + { + "kind": "func", + "name": "ExampleValue2GTE", + "signature": "func ExampleValue2GTE(v string) predicate.Example2", + "line": 243 + }, + { + "kind": "func", + "name": "ExampleValue2LT", + "signature": "func ExampleValue2LT(v string) predicate.Example2", + "line": 248 + }, + { + "kind": "func", + "name": "ExampleValue2LTE", + "signature": "func ExampleValue2LTE(v string) predicate.Example2", + "line": 253 + }, + { + "kind": "func", + "name": "ExampleValue2Contains", + "signature": "func ExampleValue2Contains(v string) predicate.Example2", + "line": 258 + }, + { + "kind": "func", + "name": "ExampleValue2HasPrefix", + "signature": "func ExampleValue2HasPrefix(v string) predicate.Example2", + "line": 263 + }, + { + "kind": "func", + "name": "ExampleValue2HasSuffix", + "signature": "func ExampleValue2HasSuffix(v string) predicate.Example2", + "line": 268 + }, + { + "kind": "func", + "name": "ExampleValue2EqualFold", + "signature": "func ExampleValue2EqualFold(v string) predicate.Example2", + "line": 273 + }, + { + "kind": "func", + "name": "ExampleValue2ContainsFold", + "signature": "func ExampleValue2ContainsFold(v string) predicate.Example2", + "line": 278 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(predicates ...predicate.Example2) predicate.Example2", + "line": 283 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(predicates ...predicate.Example2) predicate.Example2", + "line": 288 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(p predicate.Example2) predicate.Example2", + "line": 293 + } + ], + "line_count": 295 + }, + "pkg/framework/entutils/testutils/ent2/db/example2_create.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2Create", + "signature": "type Example2Create struct", + "line": 19 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (_c *Example2Create) SetCreatedAt(v time.Time) *Example2Create", + "line": 27 + }, + { + "kind": "func", + "name": "SetNillableCreatedAt", + "signature": "func (_c *Example2Create) SetNillableCreatedAt(v *time.Time) *Example2Create", + "line": 33 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_c *Example2Create) SetUpdatedAt(v time.Time) *Example2Create", + "line": 41 + }, + { + "kind": "func", + "name": "SetNillableUpdatedAt", + "signature": "func (_c *Example2Create) SetNillableUpdatedAt(v *time.Time) *Example2Create", + "line": 47 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_c *Example2Create) SetDeletedAt(v time.Time) *Example2Create", + "line": 55 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_c *Example2Create) SetNillableDeletedAt(v *time.Time) *Example2Create", + "line": 61 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (_c *Example2Create) SetExampleValue2(v string) *Example2Create", + "line": 69 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (_c *Example2Create) SetID(v string) *Example2Create", + "line": 75 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_c *Example2Create) Mutation() *Example2Mutation", + "line": 81 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *Example2Create) Save(ctx context.Context) (*Example2, error)", + "line": 86 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *Example2Create) SaveX(ctx context.Context) *Example2", + "line": 92 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *Example2Create) Exec(ctx context.Context) error", + "line": 101 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *Example2Create) ExecX(ctx context.Context)", + "line": 107 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_c *Example2Create) defaults()", + "line": 114 + }, + { + "kind": "func", + "name": "check", + "signature": "func (_c *Example2Create) check() error", + "line": 126 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_c *Example2Create) sqlSave(ctx context.Context) (*Example2, error)", + "line": 139 + }, + { + "kind": "func", + "name": "createSpec", + "signature": "func (_c *Example2Create) createSpec() (*Example2, *sqlgraph.CreateSpec)", + "line": 162 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *Example2Create) OnConflict(opts ...sql.ConflictOption) *Example2UpsertOne", + "line": 207 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *Example2Create) OnConflictColumns(columns ...string) *Example2UpsertOne", + "line": 220 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example2Upsert) SetUpdatedAt(v time.Time) *Example2Upsert", + "line": 241 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example2Upsert) UpdateUpdatedAt() *Example2Upsert", + "line": 247 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example2Upsert) SetDeletedAt(v time.Time) *Example2Upsert", + "line": 253 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example2Upsert) UpdateDeletedAt() *Example2Upsert", + "line": 259 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example2Upsert) ClearDeletedAt() *Example2Upsert", + "line": 265 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (u *Example2Upsert) SetExampleValue2(v string) *Example2Upsert", + "line": 271 + }, + { + "kind": "func", + "name": "UpdateExampleValue2", + "signature": "func (u *Example2Upsert) UpdateExampleValue2() *Example2Upsert", + "line": 277 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *Example2UpsertOne) UpdateNewValues() *Example2UpsertOne", + "line": 293 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *Example2UpsertOne) Ignore() *Example2UpsertOne", + "line": 312 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *Example2UpsertOne) DoNothing() *Example2UpsertOne", + "line": 319 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *Example2UpsertOne) Update(set func(*Example2Upsert)) *Example2UpsertOne", + "line": 326 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example2UpsertOne) SetUpdatedAt(v time.Time) *Example2UpsertOne", + "line": 334 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example2UpsertOne) UpdateUpdatedAt() *Example2UpsertOne", + "line": 341 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example2UpsertOne) SetDeletedAt(v time.Time) *Example2UpsertOne", + "line": 348 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example2UpsertOne) UpdateDeletedAt() *Example2UpsertOne", + "line": 355 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example2UpsertOne) ClearDeletedAt() *Example2UpsertOne", + "line": 362 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (u *Example2UpsertOne) SetExampleValue2(v string) *Example2UpsertOne", + "line": 369 + }, + { + "kind": "func", + "name": "UpdateExampleValue2", + "signature": "func (u *Example2UpsertOne) UpdateExampleValue2() *Example2UpsertOne", + "line": 376 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *Example2UpsertOne) Exec(ctx context.Context) error", + "line": 383 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *Example2UpsertOne) ExecX(ctx context.Context)", + "line": 391 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (u *Example2UpsertOne) ID(ctx context.Context) (id string, err error)", + "line": 398 + }, + { + "kind": "func", + "name": "IDX", + "signature": "func (u *Example2UpsertOne) IDX(ctx context.Context) string", + "line": 412 + }, + { + "kind": "struct", + "name": "Example2CreateBulk", + "signature": "type Example2CreateBulk struct", + "line": 421 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_c *Example2CreateBulk) Save(ctx context.Context) ([]*Example2, error)", + "line": 429 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_c *Example2CreateBulk) SaveX(ctx context.Context) []*Example2", + "line": 485 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_c *Example2CreateBulk) Exec(ctx context.Context) error", + "line": 494 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_c *Example2CreateBulk) ExecX(ctx context.Context)", + "line": 500 + }, + { + "kind": "func", + "name": "OnConflict", + "signature": "func (_c *Example2CreateBulk) OnConflict(opts ...sql.ConflictOption) *Example2UpsertBulk", + "line": 521 + }, + { + "kind": "func", + "name": "OnConflictColumns", + "signature": "func (_c *Example2CreateBulk) OnConflictColumns(columns ...string) *Example2UpsertBulk", + "line": 534 + }, + { + "kind": "struct", + "name": "Example2UpsertBulk", + "signature": "type Example2UpsertBulk struct", + "line": 543 + }, + { + "kind": "func", + "name": "UpdateNewValues", + "signature": "func (u *Example2UpsertBulk) UpdateNewValues() *Example2UpsertBulk", + "line": 558 + }, + { + "kind": "func", + "name": "Ignore", + "signature": "func (u *Example2UpsertBulk) Ignore() *Example2UpsertBulk", + "line": 579 + }, + { + "kind": "func", + "name": "DoNothing", + "signature": "func (u *Example2UpsertBulk) DoNothing() *Example2UpsertBulk", + "line": 586 + }, + { + "kind": "func", + "name": "Update", + "signature": "func (u *Example2UpsertBulk) Update(set func(*Example2Upsert)) *Example2UpsertBulk", + "line": 593 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (u *Example2UpsertBulk) SetUpdatedAt(v time.Time) *Example2UpsertBulk", + "line": 601 + }, + { + "kind": "func", + "name": "UpdateUpdatedAt", + "signature": "func (u *Example2UpsertBulk) UpdateUpdatedAt() *Example2UpsertBulk", + "line": 608 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (u *Example2UpsertBulk) SetDeletedAt(v time.Time) *Example2UpsertBulk", + "line": 615 + }, + { + "kind": "func", + "name": "UpdateDeletedAt", + "signature": "func (u *Example2UpsertBulk) UpdateDeletedAt() *Example2UpsertBulk", + "line": 622 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (u *Example2UpsertBulk) ClearDeletedAt() *Example2UpsertBulk", + "line": 629 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (u *Example2UpsertBulk) SetExampleValue2(v string) *Example2UpsertBulk", + "line": 636 + }, + { + "kind": "func", + "name": "UpdateExampleValue2", + "signature": "func (u *Example2UpsertBulk) UpdateExampleValue2() *Example2UpsertBulk", + "line": 643 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (u *Example2UpsertBulk) Exec(ctx context.Context) error", + "line": 650 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (u *Example2UpsertBulk) ExecX(ctx context.Context)", + "line": 666 + } + ], + "line_count": 670 + }, + "pkg/framework/entutils/testutils/ent2/db/example2_delete.go": { + "header": "\t\"context\"\n\t\"entgo.io/ent/dialect/sql\"\n\t\"entgo.io/ent/dialect/sql/sqlgraph\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2Delete", + "signature": "type Example2Delete struct", + "line": 16 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *Example2Delete) Where(ps ...predicate.Example2) *Example2Delete", + "line": 23 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *Example2Delete) Exec(ctx context.Context) (int, error)", + "line": 29 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *Example2Delete) ExecX(ctx context.Context) int", + "line": 34 + }, + { + "kind": "func", + "name": "sqlExec", + "signature": "func (_d *Example2Delete) sqlExec(ctx context.Context) (int, error)", + "line": 42 + }, + { + "kind": "struct", + "name": "Example2DeleteOne", + "signature": "type Example2DeleteOne struct", + "line": 60 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_d *Example2DeleteOne) Where(ps ...predicate.Example2) *Example2DeleteOne", + "line": 65 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_d *Example2DeleteOne) Exec(ctx context.Context) error", + "line": 71 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_d *Example2DeleteOne) ExecX(ctx context.Context)", + "line": 84 + } + ], + "line_count": 88 + }, + "pkg/framework/entutils/testutils/ent2/db/example2_query.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"math\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2Query", + "signature": "type Example2Query struct", + "line": 20 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_q *Example2Query) Where(ps ...predicate.Example2) *Example2Query", + "line": 33 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (_q *Example2Query) Limit(limit int) *Example2Query", + "line": 39 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (_q *Example2Query) Offset(offset int) *Example2Query", + "line": 45 + }, + { + "kind": "func", + "name": "Unique", + "signature": "func (_q *Example2Query) Unique(unique bool) *Example2Query", + "line": 52 + }, + { + "kind": "func", + "name": "Order", + "signature": "func (_q *Example2Query) Order(o ...example2.OrderOption) *Example2Query", + "line": 58 + }, + { + "kind": "func", + "name": "First", + "signature": "func (_q *Example2Query) First(ctx context.Context) (*Example2, error)", + "line": 65 + }, + { + "kind": "func", + "name": "FirstX", + "signature": "func (_q *Example2Query) FirstX(ctx context.Context) *Example2", + "line": 77 + }, + { + "kind": "func", + "name": "FirstID", + "signature": "func (_q *Example2Query) FirstID(ctx context.Context) (id string, err error)", + "line": 87 + }, + { + "kind": "func", + "name": "FirstIDX", + "signature": "func (_q *Example2Query) FirstIDX(ctx context.Context) string", + "line": 100 + }, + { + "kind": "func", + "name": "Only", + "signature": "func (_q *Example2Query) Only(ctx context.Context) (*Example2, error)", + "line": 111 + }, + { + "kind": "func", + "name": "OnlyX", + "signature": "func (_q *Example2Query) OnlyX(ctx context.Context) *Example2", + "line": 127 + }, + { + "kind": "func", + "name": "OnlyID", + "signature": "func (_q *Example2Query) OnlyID(ctx context.Context) (id string, err error)", + "line": 138 + }, + { + "kind": "func", + "name": "OnlyIDX", + "signature": "func (_q *Example2Query) OnlyIDX(ctx context.Context) string", + "line": 155 + }, + { + "kind": "func", + "name": "All", + "signature": "func (_q *Example2Query) All(ctx context.Context) ([]*Example2, error)", + "line": 164 + }, + { + "kind": "func", + "name": "AllX", + "signature": "func (_q *Example2Query) AllX(ctx context.Context) []*Example2", + "line": 174 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (_q *Example2Query) IDs(ctx context.Context) (ids []string, err error)", + "line": 183 + }, + { + "kind": "func", + "name": "IDsX", + "signature": "func (_q *Example2Query) IDsX(ctx context.Context) []string", + "line": 195 + }, + { + "kind": "func", + "name": "Count", + "signature": "func (_q *Example2Query) Count(ctx context.Context) (int, error)", + "line": 204 + }, + { + "kind": "func", + "name": "CountX", + "signature": "func (_q *Example2Query) CountX(ctx context.Context) int", + "line": 213 + }, + { + "kind": "func", + "name": "Exist", + "signature": "func (_q *Example2Query) Exist(ctx context.Context) (bool, error)", + "line": 222 + }, + { + "kind": "func", + "name": "ExistX", + "signature": "func (_q *Example2Query) ExistX(ctx context.Context) bool", + "line": 235 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (_q *Example2Query) Clone() *Example2Query", + "line": 245 + }, + { + "kind": "func", + "name": "GroupBy", + "signature": "func (_q *Example2Query) GroupBy(field string, fields ...string) *Example2GroupBy", + "line": 275 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_q *Example2Query) Select(fields ...string) *Example2Select", + "line": 296 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_q *Example2Query) Aggregate(fns ...AggregateFunc) *Example2Select", + "line": 305 + }, + { + "kind": "func", + "name": "prepareQuery", + "signature": "func (_q *Example2Query) prepareQuery(ctx context.Context) error", + "line": 309 + }, + { + "kind": "func", + "name": "sqlAll", + "signature": "func (_q *Example2Query) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Example2, error)", + "line": 335 + }, + { + "kind": "func", + "name": "sqlCount", + "signature": "func (_q *Example2Query) sqlCount(ctx context.Context) (int, error)", + "line": 363 + }, + { + "kind": "func", + "name": "querySpec", + "signature": "func (_q *Example2Query) querySpec() *sqlgraph.QuerySpec", + "line": 375 + }, + { + "kind": "func", + "name": "sqlQuery", + "signature": "func (_q *Example2Query) sqlQuery(ctx context.Context) *sql.Selector", + "line": 415 + }, + { + "kind": "func", + "name": "ForUpdate", + "signature": "func (_q *Example2Query) ForUpdate(opts ...sql.LockOption) *Example2Query", + "line": 453 + }, + { + "kind": "func", + "name": "ForShare", + "signature": "func (_q *Example2Query) ForShare(opts ...sql.LockOption) *Example2Query", + "line": 466 + }, + { + "kind": "struct", + "name": "Example2GroupBy", + "signature": "type Example2GroupBy struct", + "line": 477 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_g *Example2GroupBy) Aggregate(fns ...AggregateFunc) *Example2GroupBy", + "line": 483 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_g *Example2GroupBy) Scan(ctx context.Context, v any) error", + "line": 489 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_g *Example2GroupBy) sqlScan(ctx context.Context, root *Example2Query, v any) error", + "line": 497 + }, + { + "kind": "struct", + "name": "Example2Select", + "signature": "type Example2Select struct", + "line": 525 + }, + { + "kind": "func", + "name": "Aggregate", + "signature": "func (_s *Example2Select) Aggregate(fns ...AggregateFunc) *Example2Select", + "line": 531 + }, + { + "kind": "func", + "name": "Scan", + "signature": "func (_s *Example2Select) Scan(ctx context.Context, v any) error", + "line": 537 + }, + { + "kind": "func", + "name": "sqlScan", + "signature": "func (_s *Example2Select) sqlScan(ctx context.Context, root *Example2Query, v any) error", + "line": 545 + } + ], + "line_count": 564 + }, + "pkg/framework/entutils/testutils/ent2/db/example2_update.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2Update", + "signature": "type Example2Update struct", + "line": 19 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *Example2Update) Where(ps ...predicate.Example2) *Example2Update", + "line": 26 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *Example2Update) SetUpdatedAt(v time.Time) *Example2Update", + "line": 32 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *Example2Update) SetDeletedAt(v time.Time) *Example2Update", + "line": 38 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *Example2Update) SetNillableDeletedAt(v *time.Time) *Example2Update", + "line": 44 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *Example2Update) ClearDeletedAt() *Example2Update", + "line": 52 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (_u *Example2Update) SetExampleValue2(v string) *Example2Update", + "line": 58 + }, + { + "kind": "func", + "name": "SetNillableExampleValue2", + "signature": "func (_u *Example2Update) SetNillableExampleValue2(v *string) *Example2Update", + "line": 64 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *Example2Update) Mutation() *Example2Mutation", + "line": 72 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *Example2Update) Save(ctx context.Context) (int, error)", + "line": 77 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *Example2Update) SaveX(ctx context.Context) int", + "line": 83 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *Example2Update) Exec(ctx context.Context) error", + "line": 92 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *Example2Update) ExecX(ctx context.Context)", + "line": 98 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *Example2Update) defaults()", + "line": 105 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *Example2Update) sqlSave(ctx context.Context) (_node int, err error)", + "line": 112 + }, + { + "kind": "struct", + "name": "Example2UpdateOne", + "signature": "type Example2UpdateOne struct", + "line": 146 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (_u *Example2UpdateOne) SetUpdatedAt(v time.Time) *Example2UpdateOne", + "line": 154 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (_u *Example2UpdateOne) SetDeletedAt(v time.Time) *Example2UpdateOne", + "line": 160 + }, + { + "kind": "func", + "name": "SetNillableDeletedAt", + "signature": "func (_u *Example2UpdateOne) SetNillableDeletedAt(v *time.Time) *Example2UpdateOne", + "line": 166 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (_u *Example2UpdateOne) ClearDeletedAt() *Example2UpdateOne", + "line": 174 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (_u *Example2UpdateOne) SetExampleValue2(v string) *Example2UpdateOne", + "line": 180 + }, + { + "kind": "func", + "name": "SetNillableExampleValue2", + "signature": "func (_u *Example2UpdateOne) SetNillableExampleValue2(v *string) *Example2UpdateOne", + "line": 186 + }, + { + "kind": "func", + "name": "Mutation", + "signature": "func (_u *Example2UpdateOne) Mutation() *Example2Mutation", + "line": 194 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (_u *Example2UpdateOne) Where(ps ...predicate.Example2) *Example2UpdateOne", + "line": 199 + }, + { + "kind": "func", + "name": "Select", + "signature": "func (_u *Example2UpdateOne) Select(field string, fields ...string) *Example2UpdateOne", + "line": 206 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (_u *Example2UpdateOne) Save(ctx context.Context) (*Example2, error)", + "line": 212 + }, + { + "kind": "func", + "name": "SaveX", + "signature": "func (_u *Example2UpdateOne) SaveX(ctx context.Context) *Example2", + "line": 218 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (_u *Example2UpdateOne) Exec(ctx context.Context) error", + "line": 227 + }, + { + "kind": "func", + "name": "ExecX", + "signature": "func (_u *Example2UpdateOne) ExecX(ctx context.Context)", + "line": 233 + }, + { + "kind": "func", + "name": "defaults", + "signature": "func (_u *Example2UpdateOne) defaults()", + "line": 240 + }, + { + "kind": "func", + "name": "sqlSave", + "signature": "func (_u *Example2UpdateOne) sqlSave(ctx context.Context) (_node *Example2, err error)", + "line": 247 + } + ], + "line_count": 298 + }, + "pkg/framework/entutils/testutils/ent2/db/expose.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "GetConfig", + "signature": "func (c *Client) GetConfig() *entutils.RawEntConfig", + "line": 15 + }, + { + "kind": "struct", + "name": "ExposedTxDriver", + "signature": "type ExposedTxDriver struct", + "line": 24 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (d *ExposedTxDriver) Rollback() error", + "line": 30 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (d *ExposedTxDriver) Commit() error", + "line": 34 + }, + { + "kind": "func", + "name": "SavePoint", + "signature": "func (d *ExposedTxDriver) SavePoint(name string) error", + "line": 38 + }, + { + "kind": "func", + "name": "RollbackTo", + "signature": "func (d *ExposedTxDriver) RollbackTo(name string) error", + "line": 43 + }, + { + "kind": "func", + "name": "Release", + "signature": "func (d *ExposedTxDriver) Release(name string) error", + "line": 48 + }, + { + "kind": "func", + "name": "HijackTx", + "signature": "func (c *Client) HijackTx(ctx context.Context, opts *sql.TxOptions) (context.Context, *entutils.RawEntConfig, *ExposedTxDriver, error)", + "line": 55 + }, + { + "kind": "func", + "name": "NewTxClientFromRawConfig", + "signature": "func NewTxClientFromRawConfig(ctx context.Context, cfg entutils.RawEntConfig) *Tx", + "line": 78 + } + ], + "line_count": 94 + }, + "pkg/framework/entutils/testutils/ent2/db/hook/hook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db\"", + "symbols": [ + { + "kind": "func", + "name": "Mutate", + "signature": "func (f Example2Func) Mutate(ctx context.Context, m db.Mutation) (db.Value, error)", + "line": 17 + }, + { + "kind": "func", + "name": "And", + "signature": "func And(first, second Condition, rest ...Condition) Condition", + "line": 28 + }, + { + "kind": "func", + "name": "Or", + "signature": "func Or(first, second Condition, rest ...Condition) Condition", + "line": 43 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(cond Condition) Condition", + "line": 58 + }, + { + "kind": "func", + "name": "HasOp", + "signature": "func HasOp(op db.Op) Condition", + "line": 65 + }, + { + "kind": "func", + "name": "HasAddedFields", + "signature": "func HasAddedFields(field string, fields ...string) Condition", + "line": 72 + }, + { + "kind": "func", + "name": "HasClearedFields", + "signature": "func HasClearedFields(field string, fields ...string) Condition", + "line": 87 + }, + { + "kind": "func", + "name": "HasFields", + "signature": "func HasFields(field string, fields ...string) Condition", + "line": 102 + }, + { + "kind": "func", + "name": "If", + "signature": "func If(hk db.Hook, cond Condition) db.Hook", + "line": 119 + }, + { + "kind": "func", + "name": "On", + "signature": "func On(hk db.Hook, op db.Op) db.Hook", + "line": 133 + }, + { + "kind": "func", + "name": "Unless", + "signature": "func Unless(hk db.Hook, op db.Op) db.Hook", + "line": 140 + }, + { + "kind": "func", + "name": "FixedError", + "signature": "func FixedError(err error) db.Hook", + "line": 145 + }, + { + "kind": "func", + "name": "Reject", + "signature": "func Reject(op db.Op) db.Hook", + "line": 160 + }, + { + "kind": "struct", + "name": "Chain", + "signature": "type Chain struct", + "line": 167 + }, + { + "kind": "func", + "name": "NewChain", + "signature": "func NewChain(hooks ...db.Hook) Chain", + "line": 172 + }, + { + "kind": "func", + "name": "Hook", + "signature": "func (c Chain) Hook() db.Hook", + "line": 177 + }, + { + "kind": "func", + "name": "Append", + "signature": "func (c Chain) Append(hooks ...db.Hook) Chain", + "line": 188 + }, + { + "kind": "func", + "name": "Extend", + "signature": "func (c Chain) Extend(chain Chain) Chain", + "line": 197 + } + ], + "line_count": 199 + }, + "pkg/framework/entutils/testutils/ent2/db/migrate/migrate.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"io\"", + "symbols": [ + { + "kind": "struct", + "name": "Schema", + "signature": "type Schema struct", + "line": 36 + }, + { + "kind": "func", + "name": "NewSchema", + "signature": "func NewSchema(drv dialect.Driver) *Schema", + "line": 41 + }, + { + "kind": "func", + "name": "Create", + "signature": "func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 44 + }, + { + "kind": "func", + "name": "Create", + "signature": "func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error", + "line": 49 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func Diff(ctx context.Context, url string, opts ...schema.MigrateOption) error", + "line": 59 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func NamedDiff(ctx context.Context, url, name string, opts ...schema.MigrateOption) error", + "line": 65 + }, + { + "kind": "func", + "name": "Diff", + "signature": "func (s *Schema) Diff(ctx context.Context, opts ...schema.MigrateOption) error", + "line": 71 + }, + { + "kind": "func", + "name": "NamedDiff", + "signature": "func (s *Schema) NamedDiff(ctx context.Context, name string, opts ...schema.MigrateOption) error", + "line": 81 + }, + { + "kind": "func", + "name": "WriteTo", + "signature": "func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error", + "line": 94 + } + ], + "line_count": 96 + }, + "pkg/framework/entutils/testutils/ent2/db/migrate/schema.go": { + "header": "\t\"entgo.io/ent/dialect/sql/schema\"\n\t\"entgo.io/ent/schema/field\"\n)", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 31 + } + ], + "line_count": 32 + }, + "pkg/framework/entutils/testutils/ent2/db/mutation.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2Mutation", + "signature": "type Example2Mutation struct", + "line": 31 + }, + { + "kind": "func", + "name": "newExample2Mutation", + "signature": "func newExample2Mutation(c config, op Op, opts ...example2Option) *Example2Mutation", + "line": 52 + }, + { + "kind": "func", + "name": "withExample2ID", + "signature": "func withExample2ID(id string) example2Option", + "line": 66 + }, + { + "kind": "func", + "name": "withExample2", + "signature": "func withExample2(node *Example2) example2Option", + "line": 88 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (m Example2Mutation) Client() *Client", + "line": 99 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (m Example2Mutation) Tx() (*Tx, error)", + "line": 107 + }, + { + "kind": "func", + "name": "SetID", + "signature": "func (m *Example2Mutation) SetID(id string)", + "line": 118 + }, + { + "kind": "func", + "name": "ID", + "signature": "func (m *Example2Mutation) ID() (id string, exists bool)", + "line": 124 + }, + { + "kind": "func", + "name": "IDs", + "signature": "func (m *Example2Mutation) IDs(ctx context.Context) ([]string, error)", + "line": 135 + }, + { + "kind": "func", + "name": "SetCreatedAt", + "signature": "func (m *Example2Mutation) SetCreatedAt(t time.Time)", + "line": 151 + }, + { + "kind": "func", + "name": "CreatedAt", + "signature": "func (m *Example2Mutation) CreatedAt() (r time.Time, exists bool)", + "line": 156 + }, + { + "kind": "func", + "name": "OldCreatedAt", + "signature": "func (m *Example2Mutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)", + "line": 167 + }, + { + "kind": "func", + "name": "ResetCreatedAt", + "signature": "func (m *Example2Mutation) ResetCreatedAt()", + "line": 182 + }, + { + "kind": "func", + "name": "SetUpdatedAt", + "signature": "func (m *Example2Mutation) SetUpdatedAt(t time.Time)", + "line": 187 + }, + { + "kind": "func", + "name": "UpdatedAt", + "signature": "func (m *Example2Mutation) UpdatedAt() (r time.Time, exists bool)", + "line": 192 + }, + { + "kind": "func", + "name": "OldUpdatedAt", + "signature": "func (m *Example2Mutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)", + "line": 203 + }, + { + "kind": "func", + "name": "ResetUpdatedAt", + "signature": "func (m *Example2Mutation) ResetUpdatedAt()", + "line": 218 + }, + { + "kind": "func", + "name": "SetDeletedAt", + "signature": "func (m *Example2Mutation) SetDeletedAt(t time.Time)", + "line": 223 + }, + { + "kind": "func", + "name": "DeletedAt", + "signature": "func (m *Example2Mutation) DeletedAt() (r time.Time, exists bool)", + "line": 228 + }, + { + "kind": "func", + "name": "OldDeletedAt", + "signature": "func (m *Example2Mutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)", + "line": 239 + }, + { + "kind": "func", + "name": "ClearDeletedAt", + "signature": "func (m *Example2Mutation) ClearDeletedAt()", + "line": 254 + }, + { + "kind": "func", + "name": "DeletedAtCleared", + "signature": "func (m *Example2Mutation) DeletedAtCleared() bool", + "line": 260 + }, + { + "kind": "func", + "name": "ResetDeletedAt", + "signature": "func (m *Example2Mutation) ResetDeletedAt()", + "line": 266 + }, + { + "kind": "func", + "name": "SetExampleValue2", + "signature": "func (m *Example2Mutation) SetExampleValue2(s string)", + "line": 272 + }, + { + "kind": "func", + "name": "ExampleValue2", + "signature": "func (m *Example2Mutation) ExampleValue2() (r string, exists bool)", + "line": 277 + }, + { + "kind": "func", + "name": "OldExampleValue2", + "signature": "func (m *Example2Mutation) OldExampleValue2(ctx context.Context) (v string, err error)", + "line": 288 + }, + { + "kind": "func", + "name": "ResetExampleValue2", + "signature": "func (m *Example2Mutation) ResetExampleValue2()", + "line": 303 + }, + { + "kind": "func", + "name": "Where", + "signature": "func (m *Example2Mutation) Where(ps ...predicate.Example2)", + "line": 308 + }, + { + "kind": "func", + "name": "WhereP", + "signature": "func (m *Example2Mutation) WhereP(ps ...func(*sql.Selector))", + "line": 314 + }, + { + "kind": "func", + "name": "Op", + "signature": "func (m *Example2Mutation) Op() Op", + "line": 323 + }, + { + "kind": "func", + "name": "SetOp", + "signature": "func (m *Example2Mutation) SetOp(op Op)", + "line": 328 + }, + { + "kind": "func", + "name": "Type", + "signature": "func (m *Example2Mutation) Type() string", + "line": 333 + }, + { + "kind": "func", + "name": "Fields", + "signature": "func (m *Example2Mutation) Fields() []string", + "line": 340 + }, + { + "kind": "func", + "name": "Field", + "signature": "func (m *Example2Mutation) Field(name string) (ent.Value, bool)", + "line": 360 + }, + { + "kind": "func", + "name": "OldField", + "signature": "func (m *Example2Mutation) OldField(ctx context.Context, name string) (ent.Value, error)", + "line": 377 + }, + { + "kind": "func", + "name": "SetField", + "signature": "func (m *Example2Mutation) SetField(name string, value ent.Value) error", + "line": 394 + }, + { + "kind": "func", + "name": "AddedFields", + "signature": "func (m *Example2Mutation) AddedFields() []string", + "line": 430 + }, + { + "kind": "func", + "name": "AddedField", + "signature": "func (m *Example2Mutation) AddedField(name string) (ent.Value, bool)", + "line": 437 + }, + { + "kind": "func", + "name": "AddField", + "signature": "func (m *Example2Mutation) AddField(name string, value ent.Value) error", + "line": 444 + }, + { + "kind": "func", + "name": "ClearedFields", + "signature": "func (m *Example2Mutation) ClearedFields() []string", + "line": 452 + }, + { + "kind": "func", + "name": "FieldCleared", + "signature": "func (m *Example2Mutation) FieldCleared(name string) bool", + "line": 462 + }, + { + "kind": "func", + "name": "ClearField", + "signature": "func (m *Example2Mutation) ClearField(name string) error", + "line": 469 + }, + { + "kind": "func", + "name": "ResetField", + "signature": "func (m *Example2Mutation) ResetField(name string) error", + "line": 480 + }, + { + "kind": "func", + "name": "AddedEdges", + "signature": "func (m *Example2Mutation) AddedEdges() []string", + "line": 499 + }, + { + "kind": "func", + "name": "AddedIDs", + "signature": "func (m *Example2Mutation) AddedIDs(name string) []ent.Value", + "line": 506 + }, + { + "kind": "func", + "name": "RemovedEdges", + "signature": "func (m *Example2Mutation) RemovedEdges() []string", + "line": 511 + }, + { + "kind": "func", + "name": "RemovedIDs", + "signature": "func (m *Example2Mutation) RemovedIDs(name string) []ent.Value", + "line": 518 + }, + { + "kind": "func", + "name": "ClearedEdges", + "signature": "func (m *Example2Mutation) ClearedEdges() []string", + "line": 523 + }, + { + "kind": "func", + "name": "EdgeCleared", + "signature": "func (m *Example2Mutation) EdgeCleared(name string) bool", + "line": 530 + }, + { + "kind": "func", + "name": "ClearEdge", + "signature": "func (m *Example2Mutation) ClearEdge(name string) error", + "line": 536 + }, + { + "kind": "func", + "name": "ResetEdge", + "signature": "func (m *Example2Mutation) ResetEdge(name string) error", + "line": 542 + } + ], + "line_count": 544 + }, + "pkg/framework/entutils/testutils/ent2/db/predicate/predicate.go": { + "header": "\t\"entgo.io/ent/dialect/sql\"\n)\ntype Example2 func(*sql.Selector)", + "symbols": [], + "line_count": 10 + }, + "pkg/framework/entutils/testutils/ent2/db/runtime.go": { + "header": "\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/db/example2\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils/testutils/ent2/schema\"", + "symbols": [ + { + "kind": "func", + "name": "init", + "signature": "func init()", + "line": 15 + } + ], + "line_count": 31 + }, + "pkg/framework/entutils/testutils/ent2/db/runtime/runtime.go": { + "header": "const (\n\tVersion = \"v0.14.6\" // Version of ent codegen.\n\tSum = \"h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=\" // Sum of ent codegen.", + "symbols": [], + "line_count": 10 + }, + "pkg/framework/entutils/testutils/ent2/db/tx.go": { + "header": "\t\"context\"\n\tstdsql \"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Tx", + "signature": "type Tx struct", + "line": 15 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error", + "line": 57 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (tx *Tx) Commit() error", + "line": 62 + }, + { + "kind": "func", + "name": "OnCommit", + "signature": "func (tx *Tx) OnCommit(f CommitHook)", + "line": 77 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error", + "line": 113 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (tx *Tx) Rollback() error", + "line": 118 + }, + { + "kind": "func", + "name": "OnRollback", + "signature": "func (tx *Tx) OnRollback(f RollbackHook)", + "line": 133 + }, + { + "kind": "func", + "name": "Client", + "signature": "func (tx *Tx) Client() *Client", + "line": 141 + }, + { + "kind": "func", + "name": "init", + "signature": "func (tx *Tx) init()", + "line": 149 + }, + { + "kind": "struct", + "name": "txDriver", + "signature": "type txDriver struct", + "line": 164 + }, + { + "kind": "func", + "name": "newTx", + "signature": "func newTx(ctx context.Context, drv dialect.Driver) (*txDriver, error)", + "line": 176 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (tx *txDriver) Tx(context.Context) (dialect.Tx, error)", + "line": 186 + }, + { + "kind": "func", + "name": "Dialect", + "signature": "func (tx *txDriver) Dialect() string", + "line": 189 + }, + { + "kind": "func", + "name": "Exec", + "signature": "func (tx *txDriver) Exec(ctx context.Context, query string, args, v any) error", + "line": 203 + }, + { + "kind": "func", + "name": "Query", + "signature": "func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error", + "line": 208 + }, + { + "kind": "func", + "name": "ExecContext", + "signature": "func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)", + "line": 216 + }, + { + "kind": "func", + "name": "QueryContext", + "signature": "func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)", + "line": 228 + } + ], + "line_count": 236 + }, + "pkg/framework/entutils/testutils/ent2/entc.go": { + "header": "\t\"log\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 14 + } + ], + "line_count": 32 + }, + "pkg/framework/entutils/testutils/ent2/generate.go": { + "header": "", + "symbols": [], + "line_count": 3 + }, + "pkg/framework/entutils/testutils/ent2/schema/example2.go": { + "header": "\t\"entgo.io/ent\"\n\t\"entgo.io/ent/schema/field\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/entutils\"", + "symbols": [ + { + "kind": "struct", + "name": "Example2", + "signature": "type Example2 struct", + "line": 10 + } + ], + "line_count": 35 + }, + "pkg/framework/entutils/transaction.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "RawEntConfig", + "signature": "type RawEntConfig struct", + "line": 15 + }, + { + "kind": "interface", + "name": "Transactable", + "signature": "type Transactable interface", + "line": 35 + }, + { + "kind": "interface", + "name": "TxHijacker", + "signature": "type TxHijacker interface", + "line": 43 + }, + { + "kind": "func", + "name": "NewTxDriver", + "signature": "func NewTxDriver(driver Transactable, cfg *RawEntConfig) *TxDriver", + "line": 47 + }, + { + "kind": "func", + "name": "Next", + "signature": "func (sp txSavepoint) Next() txSavepoint", + "line": 60 + }, + { + "kind": "func", + "name": "Prev", + "signature": "func (sp txSavepoint) Prev() txSavepoint", + "line": 64 + }, + { + "kind": "func", + "name": "String", + "signature": "func (sp txSavepoint) String() string", + "line": 72 + }, + { + "kind": "struct", + "name": "TxDriver", + "signature": "type TxDriver struct", + "line": 76 + }, + { + "kind": "func", + "name": "GetConfig", + "signature": "func (t *TxDriver) GetConfig() *RawEntConfig", + "line": 92 + }, + { + "kind": "func", + "name": "Commit", + "signature": "func (t *TxDriver) Commit() error", + "line": 97 + }, + { + "kind": "func", + "name": "Rollback", + "signature": "func (t *TxDriver) Rollback() error", + "line": 123 + }, + { + "kind": "func", + "name": "SavePoint", + "signature": "func (t *TxDriver) SavePoint() error", + "line": 148 + }, + { + "kind": "func", + "name": "asEntDriver", + "signature": "func asEntDriver(drv transaction.Driver) (*TxDriver, error)", + "line": 238 + }, + { + "kind": "func", + "name": "GetDriverFromContext", + "signature": "func GetDriverFromContext(ctx context.Context) (*TxDriver, error)", + "line": 247 + } + ], + "line_count": 253 + }, + "pkg/framework/entutils/transaction_test.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "db1Adapter", + "signature": "type db1Adapter struct", + "line": 34 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (d *db1Adapter) Get(ctx context.Context, id string) (*db1.Example1, error)", + "line": 38 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (d *db1Adapter) Save(ctx context.Context, value *db1.Example1) (*db1.Example1, error)", + "line": 42 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (d *db1Adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 50 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (d *db1Adapter) Self() SomeDB[db1.Example1]", + "line": 60 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (d *db1Adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) SomeDB[db1.Example1]", + "line": 64 + }, + { + "kind": "struct", + "name": "db2Adapter", + "signature": "type db2Adapter struct", + "line": 72 + }, + { + "kind": "func", + "name": "Get", + "signature": "func (d *db2Adapter) Get(ctx context.Context, id string) (*db2.Example2, error)", + "line": 76 + }, + { + "kind": "func", + "name": "Save", + "signature": "func (d *db2Adapter) Save(ctx context.Context, value *db2.Example2) (*db2.Example2, error)", + "line": 80 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (d *db2Adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 88 + }, + { + "kind": "func", + "name": "Self", + "signature": "func (d *db2Adapter) Self() SomeDB[db2.Example2]", + "line": 98 + }, + { + "kind": "func", + "name": "WithTx", + "signature": "func (d *db2Adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) SomeDB[db2.Example2]", + "line": 102 + }, + { + "kind": "func", + "name": "TestTransaction", + "signature": "func TestTransaction(t *testing.T)", + "line": 109 + } + ], + "line_count": 462 + }, + "pkg/framework/entutils/valuescanner.go": { + "header": "\t\"database/sql/driver\"\n\t\"encoding/json\"\n\t\"entgo.io/ent/dialect/sql\"", + "symbols": [], + "line_count": 30 + }, + "pkg/framework/lockr/key.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "interface", + "name": "Key", + "signature": "type Key interface", + "line": 14 + }, + { + "kind": "func", + "name": "NewKey", + "signature": "func NewKey(scopes ...string) (Key, error)", + "line": 21 + }, + { + "kind": "struct", + "name": "key", + "signature": "type key struct", + "line": 39 + }, + { + "kind": "func", + "name": "String", + "signature": "func (k *key) String() string", + "line": 45 + }, + { + "kind": "func", + "name": "Hash64", + "signature": "func (k *key) Hash64() uint64", + "line": 50 + } + ], + "line_count": 56 + }, + "pkg/framework/lockr/locker.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LockerConfig", + "signature": "type LockerConfig struct", + "line": 15 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c *LockerConfig) Validate() error", + "line": 19 + }, + { + "kind": "struct", + "name": "Locker", + "signature": "type Locker struct", + "line": 27 + }, + { + "kind": "func", + "name": "NewLocker", + "signature": "func NewLocker(cfg *LockerConfig) (*Locker, error)", + "line": 31 + }, + { + "kind": "func", + "name": "LockForTX", + "signature": "func (l *Locker) LockForTX(ctx context.Context, key Key) error", + "line": 45 + }, + { + "kind": "func", + "name": "LockForTXWithScopes", + "signature": "func (l *Locker) LockForTXWithScopes(ctx context.Context, scopes ...string) error", + "line": 55 + }, + { + "kind": "func", + "name": "lock", + "signature": "func (l *Locker) lock(ctx context.Context, client *db.Tx, key Key) error", + "line": 65 + }, + { + "kind": "func", + "name": "checkForTimeout", + "signature": "func checkForTimeout(err error) error", + "line": 93 + }, + { + "kind": "func", + "name": "getTxClient", + "signature": "func (l *Locker) getTxClient(ctx context.Context) (*db.Tx, error)", + "line": 100 + }, + { + "kind": "struct", + "name": "noopTxCreator", + "signature": "type noopTxCreator struct", + "line": 141 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (n *noopTxCreator) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 145 + } + ], + "line_count": 147 + }, + "pkg/framework/lockr/locker_test.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "creator", + "signature": "type creator struct", + "line": 26 + }, + { + "kind": "func", + "name": "Tx", + "signature": "func (c *creator) Tx(ctx context.Context) (context.Context, transaction.Driver, error)", + "line": 32 + }, + { + "kind": "func", + "name": "TestLockerLockForTx", + "signature": "func TestLockerLockForTx(t *testing.T)", + "line": 42 + } + ], + "line_count": 336 + }, + "pkg/framework/lockr/session.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "releaser", + "signature": "type releaser struct", + "line": 28 + }, + { + "kind": "func", + "name": "release", + "signature": "func (r *releaser) release(ctx context.Context) error", + "line": 35 + }, + { + "kind": "struct", + "name": "SessionLockerConfig", + "signature": "type SessionLockerConfig struct", + "line": 59 + }, + { + "kind": "struct", + "name": "SessionLocker", + "signature": "type SessionLocker struct", + "line": 66 + }, + { + "kind": "func", + "name": "NewSessionLockr", + "signature": "func NewSessionLockr(config SessionLockerConfig) (*SessionLocker, error)", + "line": 79 + }, + { + "kind": "func", + "name": "Start", + "signature": "func (l *SessionLocker) Start(ctx context.Context) error", + "line": 98 + }, + { + "kind": "func", + "name": "lock", + "signature": "func (l *SessionLocker) lock(ctx context.Context, key Key, nonblocking bool) (Releaser, error)", + "line": 120 + }, + { + "kind": "func", + "name": "TryLock", + "signature": "func (l *SessionLocker) TryLock(ctx context.Context, key Key) (Releaser, error)", + "line": 188 + }, + { + "kind": "func", + "name": "TryLockWithScopes", + "signature": "func (l *SessionLocker) TryLockWithScopes(ctx context.Context, scopes ...string) (Releaser, error)", + "line": 199 + }, + { + "kind": "func", + "name": "Lock", + "signature": "func (l *SessionLocker) Lock(ctx context.Context, key Key) (Releaser, error)", + "line": 211 + }, + { + "kind": "func", + "name": "LockWithScopes", + "signature": "func (l *SessionLocker) LockWithScopes(ctx context.Context, scopes ...string) (Releaser, error)", + "line": 218 + }, + { + "kind": "func", + "name": "release", + "signature": "func (l *SessionLocker) release(ctx context.Context, key Key) error", + "line": 227 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (l *SessionLocker) Close()", + "line": 274 + } + ], + "line_count": 288 + }, + "pkg/framework/lockr/session_test.go": { + "header": "\t\"context\"\n\t\"sync\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "newTestSessionLocker", + "signature": "func newTestSessionLocker(t *testing.T, dbConn string, opts ...pgdriver.Option) *SessionLocker", + "line": 16 + }, + { + "kind": "func", + "name": "Test_SessionLocker", + "signature": "func Test_SessionLocker(t *testing.T)", + "line": 39 + } + ], + "line_count": 422 + }, + "pkg/framework/lockr/var.go": { + "header": "const (\n\tpgLockTimeoutErrCode = \"55P03\"\n)", + "symbols": [], + "line_count": 5 + }, + "pkg/framework/operation/middleware.go": { + "header": "type Middleware[Request any, Response any] func(Operation[Request, Response]) Operation[Request, Response]\nfunc Chain[Request any, Response any](outer Middleware[Request, Response], others ...Middleware[Request, Response]) Middleware[Request, Response] {\n\treturn func(next Operation[Request, Response]) Operation[Request, Response] {", + "symbols": [], + "line_count": 16 + }, + "pkg/framework/operation/middleware_test.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/operation\"\n)", + "symbols": [ + { + "kind": "func", + "name": "ExampleMiddleware", + "signature": "func ExampleMiddleware()", + "line": 21 + } + ], + "line_count": 23 + }, + "pkg/framework/operation/operation.go": { + "header": "\t\"context\"\n)\ntype Operation[Request any, Response any] func(ctx context.Context, request Request) (Response, error)", + "symbols": [], + "line_count": 35 + }, + "pkg/framework/operation/operation_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ExampleRequest", + "signature": "type ExampleRequest struct", + "line": 11 + }, + { + "kind": "struct", + "name": "ExampleResponse", + "signature": "type ExampleResponse struct", + "line": 15 + }, + { + "kind": "func", + "name": "exampleOperation", + "signature": "func exampleOperation(ctx context.Context, request ExampleRequest) (ExampleResponse, error)", + "line": 19 + }, + { + "kind": "func", + "name": "ExampleOperation", + "signature": "func ExampleOperation()", + "line": 27 + } + ], + "line_count": 73 + }, + "pkg/framework/pgdriver/driver.go": { + "header": "\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Option", + "signature": "type Option interface", + "line": 19 + }, + { + "kind": "func", + "name": "apply", + "signature": "func (fn optionFunc) apply(c *options)", + "line": 25 + }, + { + "kind": "func", + "name": "WithTracerProvider", + "signature": "func WithTracerProvider(p trace.TracerProvider) Option", + "line": 29 + }, + { + "kind": "func", + "name": "WithMeterProvider", + "signature": "func WithMeterProvider(p metric.MeterProvider) Option", + "line": 35 + }, + { + "kind": "func", + "name": "WithMetricMeter", + "signature": "func WithMetricMeter(m metric.Meter) Option", + "line": 41 + }, + { + "kind": "func", + "name": "WithSpanOptions", + "signature": "func WithSpanOptions(opt otelsql.SpanOptions) Option", + "line": 47 + }, + { + "kind": "func", + "name": "WithLockTimeout", + "signature": "func WithLockTimeout(timeout time.Duration) Option", + "line": 53 + }, + { + "kind": "struct", + "name": "options", + "signature": "type options struct", + "line": 59 + }, + { + "kind": "struct", + "name": "Driver", + "signature": "type Driver struct", + "line": 65 + }, + { + "kind": "func", + "name": "DB", + "signature": "func (d *Driver) DB() *sql.DB", + "line": 70 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d *Driver) Close() error", + "line": 74 + }, + { + "kind": "func", + "name": "NewPostgresDriver", + "signature": "func NewPostgresDriver(ctx context.Context, url string, opts ...Option) (*Driver, error)", + "line": 80 + } + ], + "line_count": 120 + }, + "pkg/framework/tracex/tracex.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"runtime/debug\"", + "symbols": [ + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 13 + }, + { + "kind": "func", + "name": "WithOkStatusDescription", + "signature": "func WithOkStatusDescription(desc string) Option", + "line": 23 + }, + { + "kind": "struct", + "name": "SpanNoValue", + "signature": "type SpanNoValue struct", + "line": 78 + }, + { + "kind": "func", + "name": "StartWithNoValue", + "signature": "func StartWithNoValue(ctx context.Context, tracer trace.Tracer, spanName string, opts ...trace.SpanStartOption) *SpanNoValue", + "line": 83 + }, + { + "kind": "func", + "name": "Wrap", + "signature": "func (s *SpanNoValue) Wrap(fn func(ctx context.Context) error, opts ...Option) error", + "line": 92 + } + ], + "line_count": 103 + }, + "pkg/framework/transaction/context.go": { + "header": "\t\"context\"\n)\ntype omTransactionContextKey string", + "symbols": [ + { + "kind": "func", + "name": "GetDriverFromContext", + "signature": "func GetDriverFromContext(ctx context.Context) (Driver, error)", + "line": 11 + }, + { + "kind": "struct", + "name": "DriverNotFoundError", + "signature": "type DriverNotFoundError struct", + "line": 19 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *DriverNotFoundError) Error() string", + "line": 21 + }, + { + "kind": "func", + "name": "SetDriverOnContext", + "signature": "func SetDriverOnContext(ctx context.Context, tx Driver) (context.Context, error)", + "line": 25 + }, + { + "kind": "struct", + "name": "DriverConflictError", + "signature": "type DriverConflictError struct", + "line": 32 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *DriverConflictError) Error() string", + "line": 34 + } + ], + "line_count": 36 + }, + "pkg/framework/transaction/transaction.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "Driver", + "signature": "type Driver interface", + "line": 12 + }, + { + "kind": "interface", + "name": "Creator", + "signature": "type Creator interface", + "line": 19 + }, + { + "kind": "func", + "name": "RunWithNoValue", + "signature": "func RunWithNoValue(ctx context.Context, creator Creator, cb func(ctx context.Context) error) error", + "line": 24 + }, + { + "kind": "func", + "name": "getTx", + "signature": "func getTx(ctx context.Context, creator Creator) (context.Context, Driver, error)", + "line": 53 + } + ], + "line_count": 106 + }, + "pkg/framework/transport/httptransport/argshandler.go": { + "header": "\t\"context\"\n\t\"net/http\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/operation\"", + "symbols": [], + "line_count": 52 + }, + "pkg/framework/transport/httptransport/encoder/encoder.go": { + "header": "\t\"context\"\n\t\"net/http\"\n)", + "symbols": [], + "line_count": 14 + }, + "pkg/framework/transport/httptransport/handler.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "EnableOperationSpans", + "signature": "func EnableOperationSpans(enabled bool)", + "line": 37 + }, + { + "kind": "interface", + "name": "ErrorHandler", + "signature": "type ErrorHandler interface", + "line": 93 + }, + { + "kind": "interface", + "name": "SelfEncodingError", + "signature": "type SelfEncodingError interface", + "line": 175 + } + ], + "line_count": 177 + }, + "pkg/framework/transport/httptransport/options.go": { + "header": "\t\"context\"\n\t\"github.com/openmeterio/openmeter/pkg/framework/transport/httptransport/encoder\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "HandlerOption", + "signature": "type HandlerOption interface", + "line": 19 + }, + { + "kind": "func", + "name": "apply", + "signature": "func (fn optionFunc) apply(o *handlerOptions)", + "line": 25 + }, + { + "kind": "func", + "name": "WithErrorHandler", + "signature": "func WithErrorHandler(errorHandler ErrorHandler) HandlerOption", + "line": 29 + }, + { + "kind": "func", + "name": "WithErrorEncoder", + "signature": "func WithErrorEncoder(errorEncoder encoder.ErrorEncoder) HandlerOption", + "line": 35 + }, + { + "kind": "func", + "name": "WithOperationName", + "signature": "func WithOperationName(name string) HandlerOption", + "line": 41 + }, + { + "kind": "func", + "name": "WithOperationNameFunc", + "signature": "func WithOperationNameFunc(fn func(ctx context.Context) string) HandlerOption", + "line": 49 + }, + { + "kind": "struct", + "name": "handlerOptions", + "signature": "type handlerOptions struct", + "line": 55 + }, + { + "kind": "func", + "name": "apply", + "signature": "func (h *handlerOptions) apply(options []HandlerOption)", + "line": 63 + }, + { + "kind": "struct", + "name": "dummyErrorHandler", + "signature": "type dummyErrorHandler struct", + "line": 69 + }, + { + "kind": "func", + "name": "resolveErrorHandler", + "signature": "func (o handlerOptions) resolveErrorHandler() ErrorHandler", + "line": 73 + }, + { + "kind": "func", + "name": "AppendOptions", + "signature": "func AppendOptions(base []HandlerOption, items ...HandlerOption) []HandlerOption", + "line": 81 + } + ], + "line_count": 83 + }, + "pkg/gosundheit/logger.go": { + "header": "\t\"log/slog\"\n\thealth \"github.com/AppsFlyer/go-sundheit\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "checkListener", + "signature": "type checkListener struct", + "line": 9 + }, + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(logger *slog.Logger) health.CheckListener", + "line": 13 + }, + { + "kind": "func", + "name": "OnCheckRegistered", + "signature": "func (c checkListener) OnCheckRegistered(name string, result health.Result)", + "line": 19 + }, + { + "kind": "func", + "name": "OnCheckStarted", + "signature": "func (c checkListener) OnCheckStarted(name string)", + "line": 29 + }, + { + "kind": "func", + "name": "OnCheckCompleted", + "signature": "func (c checkListener) OnCheckCompleted(name string, result health.Result)", + "line": 33 + } + ], + "line_count": 41 + }, + "pkg/hasher/hasher.go": { + "header": "type Hash = uint64\ntype Hasher interface {\n\tHash() Hash", + "symbols": [ + { + "kind": "interface", + "name": "Hasher", + "signature": "type Hasher interface", + "line": 5 + } + ], + "line_count": 7 + }, + "pkg/hasher/xxhash.go": { + "header": "func NewHash(data []byte) Hash {\n\treturn xxhash.Sum64(data)\n}", + "symbols": [ + { + "kind": "func", + "name": "NewHash", + "signature": "func NewHash(data []byte) Hash", + "line": 5 + } + ], + "line_count": 7 + }, + "pkg/idempotency/key.go": { + "header": "\t\"fmt\"\n\t\"github.com/google/uuid\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Key", + "signature": "func Key() (string, error)", + "line": 10 + }, + { + "kind": "func", + "name": "MustKey", + "signature": "func MustKey() string", + "line": 20 + } + ], + "line_count": 27 + }, + "pkg/kafka/config.go": { + "header": "\t\"encoding\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "interface", + "name": "ConfigValidator", + "signature": "type ConfigValidator interface", + "line": 17 + }, + { + "kind": "interface", + "name": "ConfigMapper", + "signature": "type ConfigMapper interface", + "line": 21 + }, + { + "kind": "struct", + "name": "CommonConfigParams", + "signature": "type CommonConfigParams struct", + "line": 30 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (c CommonConfigParams) AsConfigMap() (kafka.ConfigMap, error)", + "line": 62 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c CommonConfigParams) Validate() error", + "line": 147 + }, + { + "kind": "struct", + "name": "ConsumerConfigParams", + "signature": "type ConsumerConfigParams struct", + "line": 187 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ConsumerConfigParams) Validate() error", + "line": 229 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (c ConsumerConfigParams) AsConfigMap() (kafka.ConfigMap, error)", + "line": 252 + }, + { + "kind": "struct", + "name": "ProducerConfigParams", + "signature": "type ProducerConfigParams struct", + "line": 317 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ProducerConfigParams) Validate() error", + "line": 322 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (p ProducerConfigParams) AsConfigMap() (kafka.ConfigMap, error)", + "line": 330 + }, + { + "kind": "struct", + "name": "ConsumerConfig", + "signature": "type ConsumerConfig struct", + "line": 350 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (c ConsumerConfig) AsConfigMap() (kafka.ConfigMap, error)", + "line": 355 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ConsumerConfig) Validate() error", + "line": 359 + }, + { + "kind": "struct", + "name": "ProducerConfig", + "signature": "type ProducerConfig struct", + "line": 379 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (c ProducerConfig) AsConfigMap() (kafka.ConfigMap, error)", + "line": 384 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c ProducerConfig) Validate() error", + "line": 388 + }, + { + "kind": "struct", + "name": "AdminConfig", + "signature": "type AdminConfig struct", + "line": 408 + }, + { + "kind": "func", + "name": "AsConfigMap", + "signature": "func (c AdminConfig) AsConfigMap() (kafka.ConfigMap, error)", + "line": 412 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c AdminConfig) Validate() error", + "line": 416 + }, + { + "kind": "func", + "name": "mergeConfigsToMap", + "signature": "func mergeConfigsToMap(mappers ...ConfigMapper) (kafka.ConfigMap, error)", + "line": 430 + }, + { + "kind": "interface", + "name": "configValue", + "signature": "type configValue interface", + "line": 462 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (s *BrokerAddressFamily) UnmarshalText(text []byte) error", + "line": 484 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *BrokerAddressFamily) UnmarshalJSON(data []byte) error", + "line": 499 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s BrokerAddressFamily) String() string", + "line": 503 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (d *TimeDurationMilliSeconds) UnmarshalText(text []byte) error", + "line": 511 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (d *TimeDurationMilliSeconds) UnmarshalJSON(data []byte) error", + "line": 522 + }, + { + "kind": "func", + "name": "Duration", + "signature": "func (d TimeDurationMilliSeconds) Duration() time.Duration", + "line": 526 + }, + { + "kind": "func", + "name": "String", + "signature": "func (d TimeDurationMilliSeconds) String() string", + "line": 530 + }, + { + "kind": "func", + "name": "String", + "signature": "func (c DebugContext) String() string", + "line": 561 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (c *DebugContext) UnmarshalText(text []byte) error", + "line": 565 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (c *DebugContext) UnmarshalJSON(data []byte) error", + "line": 614 + }, + { + "kind": "func", + "name": "String", + "signature": "func (d DebugContexts) String() string", + "line": 686 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (s *Partitioner) UnmarshalText(text []byte) error", + "line": 731 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *Partitioner) UnmarshalJSON(data []byte) error", + "line": 754 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s Partitioner) String() string", + "line": 758 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (s *AutoOffsetReset) UnmarshalText(text []byte) error", + "line": 794 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *AutoOffsetReset) UnmarshalJSON(data []byte) error", + "line": 817 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s AutoOffsetReset) String() string", + "line": 821 + }, + { + "kind": "func", + "name": "String", + "signature": "func (c PartitionAssignmentStrategy) String() string", + "line": 844 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (c *PartitionAssignmentStrategy) UnmarshalText(text []byte) error", + "line": 848 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (c *PartitionAssignmentStrategy) UnmarshalJSON(data []byte) error", + "line": 864 + }, + { + "kind": "func", + "name": "String", + "signature": "func (p PartitionAssignmentStrategies) String() string", + "line": 885 + } + ], + "line_count": 896 + }, + "pkg/kafka/config_test.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestConsumerConfig", + "signature": "func TestConsumerConfig(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestProducerConfig", + "signature": "func TestProducerConfig(t *testing.T)", + "line": 96 + }, + { + "kind": "func", + "name": "TestBrokerAddressFamily", + "signature": "func TestBrokerAddressFamily(t *testing.T)", + "line": 163 + }, + { + "kind": "func", + "name": "TestTimeDurationMilliSeconds", + "signature": "func TestTimeDurationMilliSeconds(t *testing.T)", + "line": 215 + }, + { + "kind": "func", + "name": "TestPartitioner", + "signature": "func TestPartitioner(t *testing.T)", + "line": 278 + }, + { + "kind": "func", + "name": "TestAutoOffsetReset", + "signature": "func TestAutoOffsetReset(t *testing.T)", + "line": 354 + } + ], + "line_count": 428 + }, + "pkg/kafka/kafka.go": { + "header": "", + "symbols": [], + "line_count": 2 + }, + "pkg/kafka/log.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/confluentinc/confluent-kafka-go/v2/kafka\"", + "symbols": [ + { + "kind": "interface", + "name": "LogEmitter", + "signature": "type LogEmitter interface", + "line": 17 + }, + { + "kind": "func", + "name": "LogProcessor", + "signature": "func LogProcessor(logEmitter LogEmitter, logger *slog.Logger) (execute func() error, interrupt func(error))", + "line": 22 + }, + { + "kind": "func", + "name": "ConsumeLogChannel", + "signature": "func ConsumeLogChannel(emitter LogEmitter, logger *slog.Logger)", + "line": 42 + }, + { + "kind": "func", + "name": "processLog", + "signature": "func processLog(logger *slog.Logger, e kafka.LogEvent)", + "line": 48 + }, + { + "kind": "func", + "name": "mapLogLevel", + "signature": "func mapLogLevel(level int) slog.Level", + "line": 61 + } + ], + "line_count": 84 + }, + "pkg/kafka/metrics/internal/broker.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "struct", + "name": "BrokerLatencyMetrics", + "signature": "type BrokerLatencyMetrics struct", + "line": 13 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *BrokerLatencyMetrics) Add(ctx context.Context, stats *stats.BrokerStats, attrs ...attribute.KeyValue)", + "line": 38 + }, + { + "kind": "func", + "name": "NewBrokerLatencyMetrics", + "signature": "func NewBrokerLatencyMetrics(meter metric.Meter) (*BrokerLatencyMetrics, error)", + "line": 61 + }, + { + "kind": "struct", + "name": "BrokerThrottleMetrics", + "signature": "type BrokerThrottleMetrics struct", + "line": 157 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *BrokerThrottleMetrics) Add(ctx context.Context, stats *stats.BrokerStats, attrs ...attribute.KeyValue)", + "line": 182 + }, + { + "kind": "func", + "name": "NewBrokerThrottleMetrics", + "signature": "func NewBrokerThrottleMetrics(meter metric.Meter) (*BrokerThrottleMetrics, error)", + "line": 205 + }, + { + "kind": "struct", + "name": "BrokerMetrics", + "signature": "type BrokerMetrics struct", + "line": 301 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *BrokerMetrics) Add(ctx context.Context, stats *stats.BrokerStats, attrs ...attribute.KeyValue)", + "line": 345 + }, + { + "kind": "func", + "name": "NewBrokerMetrics", + "signature": "func NewBrokerMetrics(meter metric.Meter, extended bool) (*BrokerMetrics, error)", + "line": 384 + } + ], + "line_count": 570 + }, + "pkg/kafka/metrics/internal/consumergroup.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "struct", + "name": "ConsumerGroupMetrics", + "signature": "type ConsumerGroupMetrics struct", + "line": 13 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *ConsumerGroupMetrics) Add(ctx context.Context, stats *stats.ConsumerGroupStats, attrs ...attribute.KeyValue)", + "line": 28 + }, + { + "kind": "func", + "name": "NewConsumerGroupMetrics", + "signature": "func NewConsumerGroupMetrics(meter metric.Meter) (*ConsumerGroupMetrics, error)", + "line": 41 + } + ], + "line_count": 98 + }, + "pkg/kafka/metrics/internal/partition.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "struct", + "name": "PartitionMessageMetrics", + "signature": "type PartitionMessageMetrics struct", + "line": 13 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *PartitionMessageMetrics) Add(ctx context.Context, stats *stats.Partition, attrs ...attribute.KeyValue)", + "line": 32 + }, + { + "kind": "func", + "name": "NewPartitionMessageMetrics", + "signature": "func NewPartitionMessageMetrics(meter metric.Meter) (*PartitionMessageMetrics, error)", + "line": 51 + }, + { + "kind": "struct", + "name": "PartitionOffsetMetrics", + "signature": "type PartitionOffsetMetrics struct", + "line": 130 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *PartitionOffsetMetrics) Add(ctx context.Context, stats *stats.Partition, attrs ...attribute.KeyValue)", + "line": 151 + }, + { + "kind": "func", + "name": "NewPartitionOffsetMetrics", + "signature": "func NewPartitionOffsetMetrics(meter metric.Meter) (*PartitionOffsetMetrics, error)", + "line": 171 + }, + { + "kind": "struct", + "name": "PartitionMetrics", + "signature": "type PartitionMetrics struct", + "line": 250 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *PartitionMetrics) Add(ctx context.Context, stats *stats.Partition, attrs ...attribute.KeyValue)", + "line": 273 + }, + { + "kind": "func", + "name": "NewPartitionMetrics", + "signature": "func NewPartitionMetrics(meter metric.Meter, extended bool) (*PartitionMetrics, error)", + "line": 300 + } + ], + "line_count": 387 + }, + "pkg/kafka/metrics/internal/topic.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "struct", + "name": "TopicBatchMetrics", + "signature": "type TopicBatchMetrics struct", + "line": 13 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *TopicBatchMetrics) Add(ctx context.Context, stats *stats.TopicStats, attrs ...attribute.KeyValue)", + "line": 65 + }, + { + "kind": "func", + "name": "NewTopicBatchMetrics", + "signature": "func NewTopicBatchMetrics(meter metric.Meter) (*TopicBatchMetrics, error)", + "line": 99 + }, + { + "kind": "struct", + "name": "TopicMetrics", + "signature": "type TopicMetrics struct", + "line": 284 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *TopicMetrics) Add(ctx context.Context, stats *stats.TopicStats, attrs ...attribute.KeyValue)", + "line": 294 + }, + { + "kind": "func", + "name": "NewTopicMetrics", + "signature": "func NewTopicMetrics(meter metric.Meter, extended bool) (*TopicMetrics, error)", + "line": 322 + } + ], + "line_count": 357 + }, + "pkg/kafka/metrics/metrics.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "struct", + "name": "Metrics", + "signature": "type Metrics struct", + "line": 16 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (m *Metrics) Add(ctx context.Context, stats *stats.Stats, attrs ...attribute.KeyValue)", + "line": 49 + }, + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 96 + }, + { + "kind": "func", + "name": "WithExtendedMetrics", + "signature": "func WithExtendedMetrics() Option", + "line": 104 + }, + { + "kind": "func", + "name": "WithBrokerMetricsDisabled", + "signature": "func WithBrokerMetricsDisabled() Option", + "line": 110 + }, + { + "kind": "func", + "name": "WithTopicMetricsDisabled", + "signature": "func WithTopicMetricsDisabled() Option", + "line": 116 + }, + { + "kind": "func", + "name": "WithConsumerGroupMetricsDisabled", + "signature": "func WithConsumerGroupMetricsDisabled() Option", + "line": 122 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(meter metric.Meter, opts ...Option) (*Metrics, error)", + "line": 128 + } + ], + "line_count": 278 + }, + "pkg/kafka/metrics/metrics_test.go": { + "header": "\t_ \"embed\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestStats", + "signature": "func NewTestStats(t *testing.T) *stats.Stats", + "line": 17 + }, + { + "kind": "func", + "name": "TestWithMetrics", + "signature": "func TestWithMetrics(t *testing.T)", + "line": 30 + } + ], + "line_count": 77 + }, + "pkg/kafka/metrics/stats/broker.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *BrokerSource) UnmarshalJSON(data []byte) error", + "line": 19 + }, + { + "kind": "func", + "name": "Int64", + "signature": "func (s BrokerSource) Int64() int64", + "line": 42 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *BrokerState) UnmarshalJSON(data []byte) error", + "line": 74 + }, + { + "kind": "func", + "name": "Int64", + "signature": "func (s BrokerState) Int64() int64", + "line": 105 + }, + { + "kind": "struct", + "name": "BrokerTopicPartition", + "signature": "type BrokerTopicPartition struct", + "line": 133 + }, + { + "kind": "struct", + "name": "BrokerStats", + "signature": "type BrokerStats struct", + "line": 138 + } + ], + "line_count": 188 + }, + "pkg/kafka/metrics/stats/consumergroup.go": { + "header": "\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "ConsumerGroupStats", + "signature": "type ConsumerGroupStats struct", + "line": 9 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *ConsumerGroupState) UnmarshalJSON(data []byte) error", + "line": 46 + }, + { + "kind": "func", + "name": "Int64", + "signature": "func (s ConsumerGroupState) Int64() int64", + "line": 75 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (s *ConsumerGroupJoinState) UnmarshalJSON(data []byte) error", + "line": 124 + }, + { + "kind": "func", + "name": "Int64", + "signature": "func (s ConsumerGroupJoinState) Int64() int64", + "line": 157 + } + ], + "line_count": 184 + }, + "pkg/kafka/metrics/stats/stats.go": { + "header": "type Stats struct {\n\tName string `json:\"name\"`\n\tClientID string `json:\"client_id\"`", + "symbols": [ + { + "kind": "struct", + "name": "Stats", + "signature": "type Stats struct", + "line": 4 + }, + { + "kind": "struct", + "name": "WindowStats", + "signature": "type WindowStats struct", + "line": 45 + } + ], + "line_count": 72 + }, + "pkg/kafka/metrics/stats/stats_test.go": { + "header": "\t_ \"embed\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestStats", + "signature": "func TestStats(t *testing.T)", + "line": 14 + } + ], + "line_count": 108 + }, + "pkg/kafka/metrics/stats/testdata/stats.json": { + "header": "{\n \"name\": \"rdkafka#producer-1\",\n \"client_id\": \"rdkafka\",\n \"type\": \"producer\",\n \"ts\": 5016483227792,\n \"time\": 1527060869,\n \"replyq\": 0,\n \"msg_cnt\": 22710,\n \"msg_size\": 704010,\n \"msg_max\": 500000,\n \"msg_size_max\": 1073741824,\n \"simple_cnt\": 0,\n \"metadata_cache_cnt\": 1,\n \"brokers\": {\n \"localhost:9092/2\": {\n \"name\": \"localhost:9092/2\",\n \"nodeid\": 2,\n \"nodename\": \"localhost:9092\",\n \"source\": \"learned\",\n \"state\": \"UP\",", + "symbols": [], + "line_count": 386 + }, + "pkg/kafka/metrics/stats/topic.go": { + "header": "type TopicStats struct {\n\tTopic string `json:\"topic\"`\n\tAge int64 `json:\"age\"`", + "symbols": [ + { + "kind": "struct", + "name": "TopicStats", + "signature": "type TopicStats struct", + "line": 3 + }, + { + "kind": "struct", + "name": "Partition", + "signature": "type Partition struct", + "line": 18 + } + ], + "line_count": 75 + }, + "pkg/kafka/topicprovisioner.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "TopicConfig", + "signature": "type TopicConfig struct", + "line": 16 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c TopicConfig) Validate() error", + "line": 23 + }, + { + "kind": "interface", + "name": "TopicProvisioner", + "signature": "type TopicProvisioner interface", + "line": 35 + }, + { + "kind": "interface", + "name": "AdminClient", + "signature": "type AdminClient interface", + "line": 40 + }, + { + "kind": "struct", + "name": "TopicProvisionerNoop", + "signature": "type TopicProvisionerNoop struct", + "line": 45 + }, + { + "kind": "func", + "name": "Provision", + "signature": "func (t *TopicProvisionerNoop) Provision(ctx context.Context, topics ...TopicConfig) error", + "line": 49 + }, + { + "kind": "func", + "name": "DeProvision", + "signature": "func (t *TopicProvisionerNoop) DeProvision(ctx context.Context, topics ...string) error", + "line": 53 + }, + { + "kind": "struct", + "name": "TopicProvisionerConfig", + "signature": "type TopicProvisionerConfig struct", + "line": 57 + }, + { + "kind": "func", + "name": "NewTopicProvisioner", + "signature": "func NewTopicProvisioner(config TopicProvisionerConfig) (TopicProvisioner, error)", + "line": 75 + }, + { + "kind": "struct", + "name": "topicProvisioner", + "signature": "type topicProvisioner struct", + "line": 156 + }, + { + "kind": "func", + "name": "evictCallback", + "signature": "func (p *topicProvisioner) evictCallback(topic string, _ struct{})", + "line": 177 + }, + { + "kind": "func", + "name": "Provision", + "signature": "func (p *topicProvisioner) Provision(ctx context.Context, topics ...TopicConfig) error", + "line": 186 + }, + { + "kind": "func", + "name": "DeProvision", + "signature": "func (p *topicProvisioner) DeProvision(ctx context.Context, topics ...string) error", + "line": 259 + } + ], + "line_count": 310 + }, + "pkg/kafka/topicprovisioner_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "mockTopicProvisioner", + "signature": "type mockTopicProvisioner struct", + "line": 18 + }, + { + "kind": "func", + "name": "CreateTopics", + "signature": "func (m *mockTopicProvisioner) CreateTopics(_ context.Context, topics []kafka.TopicSpecification, _ ...kafka.CreateTopicsAdminOption) ([]kafka.TopicResult, error)", + "line": 23 + }, + { + "kind": "func", + "name": "DeleteTopics", + "signature": "func (m *mockTopicProvisioner) DeleteTopics(_ context.Context, topics []string, _ ...kafka.DeleteTopicsAdminOption) ([]kafka.TopicResult, error)", + "line": 38 + }, + { + "kind": "func", + "name": "reset", + "signature": "func (m *mockTopicProvisioner) reset()", + "line": 53 + }, + { + "kind": "func", + "name": "TestTopicProvisioner", + "signature": "func TestTopicProvisioner(t *testing.T)", + "line": 57 + } + ], + "line_count": 135 + }, + "pkg/log/mock.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"github.com/stretchr/testify/mock\"", + "symbols": [ + { + "kind": "func", + "name": "NewMockHandler", + "signature": "func NewMockHandler() *MockHandler", + "line": 12 + }, + { + "kind": "struct", + "name": "MockHandler", + "signature": "type MockHandler struct", + "line": 16 + }, + { + "kind": "func", + "name": "Enabled", + "signature": "func (m *MockHandler) Enabled(ctx context.Context, level slog.Level) bool", + "line": 20 + }, + { + "kind": "func", + "name": "Handle", + "signature": "func (m *MockHandler) Handle(ctx context.Context, record slog.Record) error", + "line": 24 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (m *MockHandler) WithAttrs(attrs []slog.Attr) slog.Handler", + "line": 28 + }, + { + "kind": "func", + "name": "WithGroup", + "signature": "func (m *MockHandler) WithGroup(name string) slog.Handler", + "line": 32 + } + ], + "line_count": 34 + }, + "pkg/log/panic.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"", + "symbols": [ + { + "kind": "struct", + "name": "panicLoggerOptions", + "signature": "type panicLoggerOptions struct", + "line": 28 + }, + { + "kind": "func", + "name": "WithRePanic", + "signature": "func WithRePanic(o *panicLoggerOptions)", + "line": 33 + }, + { + "kind": "func", + "name": "WithExit", + "signature": "func WithExit(o *panicLoggerOptions)", + "line": 38 + }, + { + "kind": "func", + "name": "WithContinue", + "signature": "func WithContinue(o *panicLoggerOptions)", + "line": 43 + }, + { + "kind": "func", + "name": "PanicLogger", + "signature": "func PanicLogger(options ...func(*panicLoggerOptions))", + "line": 51 + } + ], + "line_count": 74 + }, + "pkg/lrux/lruitemttl.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "cacheOptions", + "signature": "type cacheOptions struct", + "line": 29 + }, + { + "kind": "func", + "name": "WithTTL", + "signature": "func WithTTL(ttl time.Duration) cacheOptionsFunc", + "line": 35 + } + ], + "line_count": 112 + }, + "pkg/lrux/lruitemttl_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestCacheWithItemTTLSanity", + "signature": "func TestCacheWithItemTTLSanity(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestCacheWithItemTTLSanity_ErrorHandling", + "signature": "func TestCacheWithItemTTLSanity_ErrorHandling(t *testing.T)", + "line": 58 + } + ], + "line_count": 71 + }, + "pkg/models/annotation.go": { + "header": "\t\"math\"\n\t\"reflect\"\n\t\"github.com/brunoga/deep\"", + "symbols": [ + { + "kind": "func", + "name": "GetBool", + "signature": "func (a Annotations) GetBool(key string) bool", + "line": 12 + }, + { + "kind": "func", + "name": "GetString", + "signature": "func (a Annotations) GetString(key string) (string, bool)", + "line": 30 + }, + { + "kind": "func", + "name": "GetInt", + "signature": "func (a Annotations) GetInt(key string) (int, bool)", + "line": 48 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (a Annotations) Reset()", + "line": 80 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (a Annotations) Clone() (Annotations, error)", + "line": 86 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (a Annotations) Merge(m Annotations) (Annotations, error)", + "line": 94 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (a Annotations) Equal(other Annotations) bool", + "line": 120 + } + ], + "line_count": 140 + }, + "pkg/models/annotation_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "Test_Annotations", + "signature": "func Test_Annotations(t *testing.T)", + "line": 10 + } + ], + "line_count": 159 + }, + "pkg/models/attributes.go": { + "header": "\t\"fmt\"\n\t\"maps\"\n\t\"reflect\"", + "symbols": [ + { + "kind": "func", + "name": "Clone", + "signature": "func (a Attributes) Clone() Attributes", + "line": 11 + }, + { + "kind": "func", + "name": "AsStringMap", + "signature": "func (a Attributes) AsStringMap() map[string]any", + "line": 18 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (a Attributes) Merge(m Attributes) Attributes", + "line": 43 + } + ], + "line_count": 59 + }, + "pkg/models/cadence.go": { + "header": "\t\"errors\"\n\t\"time\"\n\t\"github.com/openmeterio/openmeter/pkg/timeutil\"", + "symbols": [ + { + "kind": "struct", + "name": "CadencedModel", + "signature": "type CadencedModel struct", + "line": 20 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (c CadencedModel) Equal(other CadencedModel) bool", + "line": 26 + }, + { + "kind": "func", + "name": "AsPeriod", + "signature": "func (c CadencedModel) AsPeriod() timeutil.OpenPeriod", + "line": 44 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (c CadencedModel) GetCadence() CadencedModel", + "line": 53 + }, + { + "kind": "func", + "name": "NewCadencedModelFromPeriod", + "signature": "func NewCadencedModelFromPeriod(period timeutil.OpenPeriod) (CadencedModel, error)", + "line": 57 + }, + { + "kind": "func", + "name": "cadenced", + "signature": "func (c CadencedModel) cadenced() cadencedMarker", + "line": 70 + }, + { + "kind": "func", + "name": "cadence", + "signature": "func (c CadencedModel) cadence() CadencedModel", + "line": 74 + }, + { + "kind": "func", + "name": "IsActiveAt", + "signature": "func (c CadencedModel) IsActiveAt(t time.Time) bool", + "line": 78 + }, + { + "kind": "func", + "name": "IsZero", + "signature": "func (c CadencedModel) IsZero() bool", + "line": 90 + } + ], + "line_count": 92 + }, + "pkg/models/cadence_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "MockCadenceItem", + "signature": "type MockCadenceItem struct", + "line": 12 + }, + { + "kind": "func", + "name": "GetCadence", + "signature": "func (m MockCadenceItem) GetCadence() CadencedModel", + "line": 17 + }, + { + "kind": "func", + "name": "cadence", + "signature": "func (m MockCadenceItem) cadence() CadencedModel", + "line": 21 + }, + { + "kind": "func", + "name": "cadenced", + "signature": "func (m MockCadenceItem) cadenced() cadencedMarker", + "line": 26 + }, + { + "kind": "func", + "name": "TestCadenceList_GetOverlaps", + "signature": "func TestCadenceList_GetOverlaps(t *testing.T)", + "line": 32 + } + ], + "line_count": 149 + }, + "pkg/models/cadencelist.go": { + "header": "type CadenceList[T CadenceComparable] []T\ntype CadenceComparable interface {\n\tGetCadence() CadencedModel", + "symbols": [ + { + "kind": "interface", + "name": "CadenceComparable", + "signature": "type CadenceComparable interface", + "line": 12 + } + ], + "line_count": 116 + }, + "pkg/models/clonable.go": { + "header": "type Clonable[T any] interface {\n\tClone() T\n}", + "symbols": [], + "line_count": 5 + }, + "pkg/models/equaler.go": { + "header": "type Equaler[T any] interface {\n\tEqual(T) bool\n}", + "symbols": [], + "line_count": 6 + }, + "pkg/models/errors.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "GenericError", + "signature": "type GenericError interface", + "line": 9 + }, + { + "kind": "func", + "name": "NewNamespaceNotFoundError", + "signature": "func NewNamespaceNotFoundError(namespace string) error", + "line": 15 + }, + { + "kind": "struct", + "name": "NamespaceNotFoundError", + "signature": "type NamespaceNotFoundError struct", + "line": 24 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *NamespaceNotFoundError) Error() string", + "line": 28 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *NamespaceNotFoundError) Unwrap() error", + "line": 33 + }, + { + "kind": "func", + "name": "NewGenericNotFoundError", + "signature": "func NewGenericNotFoundError(err error) error", + "line": 38 + }, + { + "kind": "struct", + "name": "GenericNotFoundError", + "signature": "type GenericNotFoundError struct", + "line": 44 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericNotFoundError) Error() string", + "line": 48 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericNotFoundError) Unwrap() error", + "line": 52 + }, + { + "kind": "func", + "name": "IsGenericNotFoundError", + "signature": "func IsGenericNotFoundError(err error) bool", + "line": 57 + }, + { + "kind": "func", + "name": "NewGenericConflictError", + "signature": "func NewGenericConflictError(err error) error", + "line": 68 + }, + { + "kind": "struct", + "name": "GenericConflictError", + "signature": "type GenericConflictError struct", + "line": 74 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericConflictError) Error() string", + "line": 78 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericConflictError) Unwrap() error", + "line": 82 + }, + { + "kind": "func", + "name": "IsGenericConflictError", + "signature": "func IsGenericConflictError(err error) bool", + "line": 87 + }, + { + "kind": "func", + "name": "NewGenericForbiddenError", + "signature": "func NewGenericForbiddenError(err error) error", + "line": 98 + }, + { + "kind": "struct", + "name": "GenericForbiddenError", + "signature": "type GenericForbiddenError struct", + "line": 104 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericForbiddenError) Error() string", + "line": 108 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericForbiddenError) Unwrap() error", + "line": 112 + }, + { + "kind": "func", + "name": "IsGenericForbiddenError", + "signature": "func IsGenericForbiddenError(err error) bool", + "line": 117 + }, + { + "kind": "func", + "name": "NewNillableGenericValidationError", + "signature": "func NewNillableGenericValidationError(err error) error", + "line": 129 + }, + { + "kind": "func", + "name": "NewGenericValidationError", + "signature": "func NewGenericValidationError(err error) error", + "line": 138 + }, + { + "kind": "struct", + "name": "GenericValidationError", + "signature": "type GenericValidationError struct", + "line": 145 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericValidationError) Error() string", + "line": 150 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericValidationError) Unwrap() error", + "line": 155 + }, + { + "kind": "func", + "name": "IsGenericValidationError", + "signature": "func IsGenericValidationError(err error) bool", + "line": 160 + }, + { + "kind": "func", + "name": "NewGenericNotImplementedError", + "signature": "func NewGenericNotImplementedError(err error) error", + "line": 171 + }, + { + "kind": "struct", + "name": "GenericNotImplementedError", + "signature": "type GenericNotImplementedError struct", + "line": 178 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericNotImplementedError) Error() string", + "line": 183 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericNotImplementedError) Unwrap() error", + "line": 188 + }, + { + "kind": "func", + "name": "IsGenericNotImplementedError", + "signature": "func IsGenericNotImplementedError(err error) bool", + "line": 193 + }, + { + "kind": "func", + "name": "NewGenericStatusFailedDependencyError", + "signature": "func NewGenericStatusFailedDependencyError(err error) error", + "line": 204 + }, + { + "kind": "struct", + "name": "GenericStatusFailedDependencyError", + "signature": "type GenericStatusFailedDependencyError struct", + "line": 210 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericStatusFailedDependencyError) Error() string", + "line": 214 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericStatusFailedDependencyError) Unwrap() error", + "line": 218 + }, + { + "kind": "func", + "name": "IsGenericStatusFailedDependencyError", + "signature": "func IsGenericStatusFailedDependencyError(err error) bool", + "line": 222 + }, + { + "kind": "func", + "name": "NewGenericPreConditionFailedError", + "signature": "func NewGenericPreConditionFailedError(err error) error", + "line": 233 + }, + { + "kind": "struct", + "name": "GenericPreConditionFailedError", + "signature": "type GenericPreConditionFailedError struct", + "line": 239 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericPreConditionFailedError) Error() string", + "line": 243 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericPreConditionFailedError) Unwrap() error", + "line": 247 + }, + { + "kind": "func", + "name": "IsGenericPreConditionFailedError", + "signature": "func IsGenericPreConditionFailedError(err error) bool", + "line": 251 + }, + { + "kind": "func", + "name": "NewGenericUnauthorizedError", + "signature": "func NewGenericUnauthorizedError(err error) error", + "line": 262 + }, + { + "kind": "struct", + "name": "GenericUnauthorizedError", + "signature": "type GenericUnauthorizedError struct", + "line": 268 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e *GenericUnauthorizedError) Error() string", + "line": 272 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e *GenericUnauthorizedError) Unwrap() error", + "line": 276 + }, + { + "kind": "func", + "name": "IsGenericUnauthorizedError", + "signature": "func IsGenericUnauthorizedError(err error) bool", + "line": 280 + }, + { + "kind": "func", + "name": "String", + "signature": "func (s ErrorSeverity) String() string", + "line": 304 + }, + { + "kind": "func", + "name": "Values", + "signature": "func (s ErrorSeverity) Values() []string", + "line": 315 + }, + { + "kind": "struct", + "name": "fieldPrefixedWrapper", + "signature": "type fieldPrefixedWrapper struct", + "line": 322 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (p fieldPrefixedWrapper) Error() string", + "line": 327 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (p fieldPrefixedWrapper) Unwrap() error", + "line": 335 + }, + { + "kind": "func", + "name": "ErrorWithFieldPrefix", + "signature": "func ErrorWithFieldPrefix(prefix *FieldDescriptor, err error) error", + "line": 340 + }, + { + "kind": "struct", + "name": "componentWrapper", + "signature": "type componentWrapper struct", + "line": 348 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e componentWrapper) Error() string", + "line": 353 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (e componentWrapper) Unwrap() error", + "line": 361 + }, + { + "kind": "func", + "name": "ErrorWithComponent", + "signature": "func ErrorWithComponent(component ComponentName, err error) error", + "line": 367 + } + ], + "line_count": 373 + }, + "pkg/models/errors_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestErrorWrappers", + "signature": "func TestErrorWrappers(t *testing.T)", + "line": 10 + } + ], + "line_count": 67 + }, + "pkg/models/fielddescriptor.go": { + "header": "\t\"encoding/json\"\n\t\"strings\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "FieldDescriptor", + "signature": "type FieldDescriptor struct", + "line": 12 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (s FieldDescriptor) Clone() *FieldDescriptor", + "line": 20 + }, + { + "kind": "func", + "name": "WithExpression", + "signature": "func (s FieldDescriptor) WithExpression(exp FieldExpression) *FieldDescriptor", + "line": 32 + }, + { + "kind": "func", + "name": "WithAttributes", + "signature": "func (s FieldDescriptor) WithAttributes(attrs Attributes) *FieldDescriptor", + "line": 40 + }, + { + "kind": "func", + "name": "GetAttributes", + "signature": "func (p FieldDescriptor) GetAttributes() Attributes", + "line": 54 + }, + { + "kind": "func", + "name": "WithPrefix", + "signature": "func (p FieldDescriptor) WithPrefix(_prefix *FieldDescriptor) *FieldDescriptor", + "line": 58 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p *FieldDescriptor) MarshalJSON() ([]byte, error)", + "line": 74 + }, + { + "kind": "func", + "name": "String", + "signature": "func (p *FieldDescriptor) String() string", + "line": 82 + }, + { + "kind": "func", + "name": "JSONPath", + "signature": "func (p *FieldDescriptor) JSONPath() string", + "line": 124 + }, + { + "kind": "struct", + "name": "FieldDescriptorTree", + "signature": "type FieldDescriptorTree struct", + "line": 181 + }, + { + "kind": "func", + "name": "Swap", + "signature": "func (t *FieldDescriptorTree) Swap(old, new *FieldDescriptor) error", + "line": 187 + }, + { + "kind": "func", + "name": "Leafs", + "signature": "func (t *FieldDescriptorTree) Leafs() []*FieldDescriptor", + "line": 191 + }, + { + "kind": "func", + "name": "Tree", + "signature": "func (s FieldDescriptor) Tree(cb func(t *FieldDescriptorTree) error) error", + "line": 198 + }, + { + "kind": "func", + "name": "newFieldDescriptor", + "signature": "func newFieldDescriptor() *FieldDescriptor", + "line": 207 + }, + { + "kind": "func", + "name": "NewFieldSelector", + "signature": "func NewFieldSelector(field string) *FieldDescriptor", + "line": 213 + }, + { + "kind": "func", + "name": "NewFieldSelectorGroup", + "signature": "func NewFieldSelectorGroup(selectors ...*FieldDescriptor) *FieldDescriptor", + "line": 220 + } + ], + "line_count": 236 + }, + "pkg/models/fielddescriptor_test.go": { + "header": "\t\"encoding/json\"\n\t\"testing\"\n\t\"github.com/bhmj/jsonslice\"", + "symbols": [ + { + "kind": "func", + "name": "TestFieldSelector", + "signature": "func TestFieldSelector(t *testing.T)", + "line": 14 + }, + { + "kind": "func", + "name": "TestFieldSelectors", + "signature": "func TestFieldSelectors(t *testing.T)", + "line": 68 + }, + { + "kind": "func", + "name": "TestFieldSelectors_JSONPathQuery", + "signature": "func TestFieldSelectors_JSONPathQuery(t *testing.T)", + "line": 229 + }, + { + "kind": "func", + "name": "TestFieldSelectorGroup_WithAttributes", + "signature": "func TestFieldSelectorGroup_WithAttributes(t *testing.T)", + "line": 280 + }, + { + "kind": "func", + "name": "TestMethodArgumentsStayUnchanged", + "signature": "func TestMethodArgumentsStayUnchanged(t *testing.T)", + "line": 351 + } + ], + "line_count": 363 + }, + "pkg/models/fieldexpression.go": { + "header": "\t\"fmt\"\n\t\"strings\"\n)", + "symbols": [ + { + "kind": "interface", + "name": "FieldExpression", + "signature": "type FieldExpression interface", + "line": 8 + }, + { + "kind": "struct", + "name": "FieldAttrValue", + "signature": "type FieldAttrValue struct", + "line": 15 + }, + { + "kind": "func", + "name": "IsCondition", + "signature": "func (f FieldAttrValue) IsCondition() bool", + "line": 22 + }, + { + "kind": "func", + "name": "valueString", + "signature": "func (f FieldAttrValue) valueString() string", + "line": 26 + }, + { + "kind": "func", + "name": "String", + "signature": "func (f FieldAttrValue) String() string", + "line": 43 + }, + { + "kind": "func", + "name": "JSONPathExpression", + "signature": "func (f FieldAttrValue) JSONPathExpression() string", + "line": 47 + }, + { + "kind": "func", + "name": "NewFieldAttrValue", + "signature": "func NewFieldAttrValue(field string, value any) FieldAttrValue", + "line": 58 + }, + { + "kind": "struct", + "name": "FieldArrIndex", + "signature": "type FieldArrIndex struct", + "line": 62 + }, + { + "kind": "func", + "name": "IsCondition", + "signature": "func (f FieldArrIndex) IsCondition() bool", + "line": 68 + }, + { + "kind": "func", + "name": "String", + "signature": "func (f FieldArrIndex) String() string", + "line": 72 + }, + { + "kind": "func", + "name": "JSONPathExpression", + "signature": "func (f FieldArrIndex) JSONPathExpression() string", + "line": 76 + }, + { + "kind": "func", + "name": "NewFieldArrIndex", + "signature": "func NewFieldArrIndex(index int) FieldArrIndex", + "line": 80 + }, + { + "kind": "struct", + "name": "MultiFieldAttrValue", + "signature": "type MultiFieldAttrValue struct", + "line": 84 + }, + { + "kind": "func", + "name": "IsCondition", + "signature": "func (m MultiFieldAttrValue) IsCondition() bool", + "line": 88 + }, + { + "kind": "func", + "name": "String", + "signature": "func (m MultiFieldAttrValue) String() string", + "line": 92 + }, + { + "kind": "func", + "name": "JSONPathExpression", + "signature": "func (m MultiFieldAttrValue) JSONPathExpression() string", + "line": 106 + }, + { + "kind": "func", + "name": "NewMultiFieldAttrValue", + "signature": "func NewMultiFieldAttrValue(values ...FieldAttrValue) MultiFieldAttrValue", + "line": 122 + }, + { + "kind": "struct", + "name": "wildCard", + "signature": "type wildCard struct", + "line": 130 + }, + { + "kind": "func", + "name": "IsCondition", + "signature": "func (w wildCard) IsCondition() bool", + "line": 132 + }, + { + "kind": "func", + "name": "String", + "signature": "func (w wildCard) String() string", + "line": 136 + }, + { + "kind": "func", + "name": "JSONPathExpression", + "signature": "func (w wildCard) JSONPathExpression() string", + "line": 140 + } + ], + "line_count": 142 + }, + "pkg/models/http/annotation.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "FromAnnotations", + "signature": "func FromAnnotations(annotations models.Annotations) *api.Annotations", + "line": 10 + }, + { + "kind": "func", + "name": "AsAnnotations", + "signature": "func AsAnnotations(annotations *api.Annotations) models.Annotations", + "line": 14 + } + ], + "line_count": 20 + }, + "pkg/models/http/metadata.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/api\"\n\t\"github.com/openmeterio/openmeter/pkg/models\"", + "symbols": [ + { + "kind": "func", + "name": "FromMetadata", + "signature": "func FromMetadata(metadata models.Metadata) *api.Metadata", + "line": 10 + }, + { + "kind": "func", + "name": "AsMetadata", + "signature": "func AsMetadata(metadata *api.Metadata) models.Metadata", + "line": 14 + } + ], + "line_count": 20 + }, + "pkg/models/id.go": { + "header": "\t\"fmt\"\n)\ntype NamespacedID struct {", + "symbols": [ + { + "kind": "struct", + "name": "NamespacedID", + "signature": "type NamespacedID struct", + "line": 7 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i NamespacedID) Validate() error", + "line": 12 + } + ], + "line_count": 22 + }, + "pkg/models/idorkey.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "NamespacedIDOrKey", + "signature": "type NamespacedIDOrKey struct", + "line": 10 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (n NamespacedIDOrKey) Validate() error", + "line": 15 + } + ], + "line_count": 27 + }, + "pkg/models/key.go": { + "header": "type NamespacedKey struct {\n\tNamespace string `json:\"namespace\"`\n\tKey string `json:\"key\"`", + "symbols": [ + { + "kind": "struct", + "name": "NamespacedKey", + "signature": "type NamespacedKey struct", + "line": 5 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (k NamespacedKey) Validate() error", + "line": 10 + } + ], + "line_count": 20 + }, + "pkg/models/metadata.go": { + "header": "\t\"maps\"\n)\nvar _ Equaler[Metadata] = (*Metadata)(nil)", + "symbols": [ + { + "kind": "func", + "name": "Equal", + "signature": "func (m Metadata) Equal(v Metadata) bool", + "line": 11 + }, + { + "kind": "func", + "name": "ToMap", + "signature": "func (m Metadata) ToMap() map[string]string", + "line": 15 + }, + { + "kind": "func", + "name": "Merge", + "signature": "func (m Metadata) Merge(d Metadata) Metadata", + "line": 19 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (m Metadata) Clone() Metadata", + "line": 37 + }, + { + "kind": "struct", + "name": "MetadataModel", + "signature": "type MetadataModel struct", + "line": 52 + }, + { + "kind": "func", + "name": "annotated", + "signature": "func (a MetadataModel) annotated() annotatedMarker", + "line": 58 + } + ], + "line_count": 60 + }, + "pkg/models/metadata_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestMetadataEqual", + "signature": "func TestMetadataEqual(t *testing.T)", + "line": 9 + } + ], + "line_count": 81 + }, + "pkg/models/model.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ManagedUniqueResource", + "signature": "type ManagedUniqueResource struct", + "line": 12 + }, + { + "kind": "struct", + "name": "ManagedResource", + "signature": "type ManagedResource struct", + "line": 23 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (m ManagedResource) GetID() string", + "line": 33 + }, + { + "kind": "func", + "name": "GetDescription", + "signature": "func (m ManagedResource) GetDescription() *string", + "line": 37 + }, + { + "kind": "func", + "name": "GetName", + "signature": "func (m ManagedResource) GetName() string", + "line": 41 + }, + { + "kind": "struct", + "name": "ManagedResourceInput", + "signature": "type ManagedResourceInput struct", + "line": 45 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r ManagedResourceInput) Validate() error", + "line": 55 + }, + { + "kind": "func", + "name": "NewManagedResource", + "signature": "func NewManagedResource(input ManagedResourceInput) ManagedResource", + "line": 75 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r ManagedResource) Validate() error", + "line": 99 + }, + { + "kind": "struct", + "name": "ManagedModel", + "signature": "type ManagedModel struct", + "line": 119 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m ManagedModel) Validate() error", + "line": 127 + }, + { + "kind": "func", + "name": "IsDeleted", + "signature": "func (m ManagedModel) IsDeleted() bool", + "line": 139 + }, + { + "kind": "func", + "name": "IsDeletedAt", + "signature": "func (m ManagedModel) IsDeletedAt(t time.Time) bool", + "line": 143 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m ManagedModel) Equal(other ManagedModel) bool", + "line": 151 + }, + { + "kind": "func", + "name": "GetCreatedAt", + "signature": "func (m ManagedModel) GetCreatedAt() time.Time", + "line": 167 + }, + { + "kind": "func", + "name": "GetUpdatedAt", + "signature": "func (m ManagedModel) GetUpdatedAt() time.Time", + "line": 171 + }, + { + "kind": "func", + "name": "GetDeletedAt", + "signature": "func (m ManagedModel) GetDeletedAt() *time.Time", + "line": 175 + }, + { + "kind": "struct", + "name": "ManagedModelWithID", + "signature": "type ManagedModelWithID struct", + "line": 179 + }, + { + "kind": "func", + "name": "GetID", + "signature": "func (m ManagedModelWithID) GetID() string", + "line": 184 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (m ManagedModelWithID) Equal(other ManagedModelWithID) bool", + "line": 188 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m ManagedModelWithID) Validate() error", + "line": 196 + }, + { + "kind": "struct", + "name": "NamespacedModel", + "signature": "type NamespacedModel struct", + "line": 204 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m NamespacedModel) Validate() error", + "line": 208 + }, + { + "kind": "func", + "name": "GetNamespace", + "signature": "func (m NamespacedModel) GetNamespace() string", + "line": 216 + }, + { + "kind": "struct", + "name": "Address", + "signature": "type Address struct", + "line": 220 + }, + { + "kind": "struct", + "name": "VersionedModel", + "signature": "type VersionedModel struct", + "line": 235 + } + ], + "line_count": 241 + }, + "pkg/models/percentage.go": { + "header": "\t\"fmt\"\n\t\"github.com/alpacahq/alpacadecimal\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "Percentage", + "signature": "type Percentage struct", + "line": 9 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (p Percentage) MarshalJSON() ([]byte, error)", + "line": 30 + }, + { + "kind": "func", + "name": "UnmarshalJSON", + "signature": "func (p *Percentage) UnmarshalJSON(data []byte) error", + "line": 35 + }, + { + "kind": "func", + "name": "String", + "signature": "func (p Percentage) String() string", + "line": 40 + }, + { + "kind": "func", + "name": "ApplyTo", + "signature": "func (p Percentage) ApplyTo(value alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 46 + }, + { + "kind": "func", + "name": "ApplyMarkupTo", + "signature": "func (p Percentage) ApplyMarkupTo(value alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 52 + }, + { + "kind": "func", + "name": "Add", + "signature": "func (p Percentage) Add(other Percentage) Percentage", + "line": 56 + } + ], + "line_count": 58 + }, + "pkg/models/percentage_test.go": { + "header": "\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestPercentages", + "signature": "func TestPercentages(t *testing.T)", + "line": 10 + } + ], + "line_count": 17 + }, + "pkg/models/problem.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "interface", + "name": "Problem", + "signature": "type Problem interface", + "line": 30 + }, + { + "kind": "struct", + "name": "StatusProblem", + "signature": "type StatusProblem struct", + "line": 39 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (p *StatusProblem) Error() string", + "line": 59 + }, + { + "kind": "func", + "name": "RawError", + "signature": "func (p *StatusProblem) RawError() error", + "line": 67 + }, + { + "kind": "func", + "name": "ProblemType", + "signature": "func (p *StatusProblem) ProblemType() ProblemType", + "line": 71 + }, + { + "kind": "func", + "name": "ProblemStatus", + "signature": "func (p *StatusProblem) ProblemStatus() int", + "line": 75 + }, + { + "kind": "func", + "name": "ProblemTitle", + "signature": "func (p *StatusProblem) ProblemTitle() string", + "line": 79 + }, + { + "kind": "func", + "name": "Respond", + "signature": "func (p *StatusProblem) Respond(w http.ResponseWriter)", + "line": 84 + }, + { + "kind": "func", + "name": "RespondProblem", + "signature": "func RespondProblem(problem Problem, w http.ResponseWriter)", + "line": 89 + }, + { + "kind": "func", + "name": "NewStatusProblem", + "signature": "func NewStatusProblem(ctx context.Context, err error, status int) *StatusProblem", + "line": 104 + } + ], + "line_count": 137 + }, + "pkg/models/repository.go": { + "header": "\t\"context\"\n\t\"time\"\n)", + "symbols": [], + "line_count": 10 + }, + "pkg/models/servicehook.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"sync\"", + "symbols": [], + "line_count": 187 + }, + "pkg/models/testutils.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "RequireValidationIssuesMatch", + "signature": "func RequireValidationIssuesMatch(t *testing.T, expected ValidationIssues, actual ValidationIssues)", + "line": 10 + } + ], + "line_count": 33 + }, + "pkg/models/validationissue.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"maps\"", + "symbols": [ + { + "kind": "struct", + "name": "ValidationIssue", + "signature": "type ValidationIssue struct", + "line": 20 + }, + { + "kind": "func", + "name": "MarshalJSON", + "signature": "func (i ValidationIssue) MarshalJSON() ([]byte, error)", + "line": 30 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (i ValidationIssue) Clone() ValidationIssue", + "line": 36 + }, + { + "kind": "func", + "name": "Attributes", + "signature": "func (i ValidationIssue) Attributes() Attributes", + "line": 49 + }, + { + "kind": "func", + "name": "Code", + "signature": "func (i ValidationIssue) Code() ErrorCode", + "line": 53 + }, + { + "kind": "func", + "name": "Component", + "signature": "func (i ValidationIssue) Component() ComponentName", + "line": 57 + }, + { + "kind": "func", + "name": "Message", + "signature": "func (i ValidationIssue) Message() string", + "line": 61 + }, + { + "kind": "func", + "name": "Field", + "signature": "func (i ValidationIssue) Field() *FieldDescriptor", + "line": 65 + }, + { + "kind": "func", + "name": "Severity", + "signature": "func (i ValidationIssue) Severity() ErrorSeverity", + "line": 73 + }, + { + "kind": "func", + "name": "With", + "signature": "func (i ValidationIssue) With(opts ...ValidationIssueOption) ValidationIssue", + "line": 77 + }, + { + "kind": "func", + "name": "WithField", + "signature": "func (i ValidationIssue) WithField(parts ...*FieldDescriptor) ValidationIssue", + "line": 85 + }, + { + "kind": "func", + "name": "WithPathString", + "signature": "func (i ValidationIssue) WithPathString(parts ...string) ValidationIssue", + "line": 94 + }, + { + "kind": "func", + "name": "WithSeverity", + "signature": "func (i ValidationIssue) WithSeverity(s ErrorSeverity) ValidationIssue", + "line": 100 + }, + { + "kind": "func", + "name": "WithAttr", + "signature": "func (i ValidationIssue) WithAttr(key any, value any) ValidationIssue", + "line": 107 + }, + { + "kind": "func", + "name": "WithAttrs", + "signature": "func (i ValidationIssue) WithAttrs(attrs Attributes) ValidationIssue", + "line": 121 + }, + { + "kind": "func", + "name": "SetAttributes", + "signature": "func (i ValidationIssue) SetAttributes(attrs Attributes) ValidationIssue", + "line": 142 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (i ValidationIssue) Error() string", + "line": 150 + }, + { + "kind": "func", + "name": "Is", + "signature": "func (i ValidationIssue) Is(target error) bool", + "line": 157 + }, + { + "kind": "func", + "name": "Unwrap", + "signature": "func (i ValidationIssue) Unwrap() error", + "line": 166 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (i ValidationIssue) Equal(other ValidationIssue) bool", + "line": 170 + }, + { + "kind": "func", + "name": "equalValidationIssueAttributeValue", + "signature": "func equalValidationIssueAttributeValue(left, right any) bool", + "line": 181 + }, + { + "kind": "func", + "name": "asValidationIssue", + "signature": "func asValidationIssue(err error) (ValidationIssue, bool)", + "line": 194 + }, + { + "kind": "func", + "name": "AsErrorExtension", + "signature": "func (i ValidationIssue) AsErrorExtension() ErrorExtension", + "line": 209 + }, + { + "kind": "func", + "name": "WithAttribute", + "signature": "func WithAttribute(key any, value any) ValidationIssueOption", + "line": 243 + }, + { + "kind": "func", + "name": "WithAttributes", + "signature": "func WithAttributes(attrs Attributes) ValidationIssueOption", + "line": 257 + }, + { + "kind": "func", + "name": "WithComponent", + "signature": "func WithComponent(component ComponentName) ValidationIssueOption", + "line": 268 + }, + { + "kind": "func", + "name": "WithField", + "signature": "func WithField(parts ...*FieldDescriptor) ValidationIssueOption", + "line": 274 + }, + { + "kind": "func", + "name": "WithFieldString", + "signature": "func WithFieldString(parts ...string) ValidationIssueOption", + "line": 282 + }, + { + "kind": "func", + "name": "WithSeverity", + "signature": "func WithSeverity(severity ErrorSeverity) ValidationIssueOption", + "line": 292 + }, + { + "kind": "func", + "name": "WithCriticalSeverity", + "signature": "func WithCriticalSeverity() ValidationIssueOption", + "line": 298 + }, + { + "kind": "func", + "name": "WithWarningSeverity", + "signature": "func WithWarningSeverity() ValidationIssueOption", + "line": 302 + }, + { + "kind": "func", + "name": "withMessage", + "signature": "func withMessage(message string) ValidationIssueOption", + "line": 306 + }, + { + "kind": "func", + "name": "withCode", + "signature": "func withCode(code ErrorCode) ValidationIssueOption", + "line": 312 + }, + { + "kind": "func", + "name": "newValidationIssue", + "signature": "func newValidationIssue(opts ...ValidationIssueOption) ValidationIssue", + "line": 320 + }, + { + "kind": "func", + "name": "NewValidationIssue", + "signature": "func NewValidationIssue(code ErrorCode, message string, opts ...ValidationIssueOption) ValidationIssue", + "line": 331 + }, + { + "kind": "func", + "name": "NewValidationError", + "signature": "func NewValidationError(code ErrorCode, message string) ValidationIssue", + "line": 344 + }, + { + "kind": "func", + "name": "NewValidationWarning", + "signature": "func NewValidationWarning(code ErrorCode, message string) ValidationIssue", + "line": 349 + }, + { + "kind": "func", + "name": "Clone", + "signature": "func (v ValidationIssues) Clone() ValidationIssues", + "line": 355 + }, + { + "kind": "func", + "name": "AsError", + "signature": "func (v ValidationIssues) AsError() error", + "line": 359 + }, + { + "kind": "func", + "name": "AsErrorExtensions", + "signature": "func (v ValidationIssues) AsErrorExtensions() []ErrorExtension", + "line": 369 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (v ValidationIssues) Error() string", + "line": 375 + }, + { + "kind": "func", + "name": "WithSeverityOrHigher", + "signature": "func (v ValidationIssues) WithSeverityOrHigher(severity ErrorSeverity) ValidationIssues", + "line": 379 + }, + { + "kind": "func", + "name": "AsValidationIssues", + "signature": "func AsValidationIssues(errIn error) (ValidationIssues, error)", + "line": 389 + }, + { + "kind": "func", + "name": "asValidationIssues", + "signature": "func asValidationIssues(err error, prefix *FieldDescriptor, component ComponentName, unknownAsValidationIssue bool) (ValidationIssues, error)", + "line": 402 + }, + { + "kind": "func", + "name": "validationIssueAsValidationIssues", + "signature": "func validationIssueAsValidationIssues(e ValidationIssue, prefix *FieldDescriptor, component ComponentName) ValidationIssues", + "line": 458 + } + ], + "line_count": 497 + }, + "pkg/models/validationissue_test.go": { + "header": "\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestValidationIssue_JSON", + "signature": "func TestValidationIssue_JSON(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestValidationIssue_WithAttrs", + "signature": "func TestValidationIssue_WithAttrs(t *testing.T)", + "line": 90 + }, + { + "kind": "func", + "name": "TestValidationIssue_WithField", + "signature": "func TestValidationIssue_WithField(t *testing.T)", + "line": 121 + }, + { + "kind": "func", + "name": "TestValidationIssue_Clone", + "signature": "func TestValidationIssue_Clone(t *testing.T)", + "line": 143 + }, + { + "kind": "func", + "name": "TestValidationIssue_UnwrapAndErrorsIs", + "signature": "func TestValidationIssue_UnwrapAndErrorsIs(t *testing.T)", + "line": 178 + }, + { + "kind": "func", + "name": "TestValidationIssue_ErrorsIsWithJoin", + "signature": "func TestValidationIssue_ErrorsIsWithJoin(t *testing.T)", + "line": 191 + }, + { + "kind": "func", + "name": "TestAsValidationIssues", + "signature": "func TestAsValidationIssues(t *testing.T)", + "line": 200 + }, + { + "kind": "func", + "name": "TestValidationIssues_AsError", + "signature": "func TestValidationIssues_AsError(t *testing.T)", + "line": 408 + }, + { + "kind": "func", + "name": "TestAsValidationIssues_PointerValidationIssue", + "signature": "func TestAsValidationIssues_PointerValidationIssue(t *testing.T)", + "line": 425 + } + ], + "line_count": 438 + }, + "pkg/models/validator.go": { + "header": "type Validator interface {\n\tValidate() error\n}", + "symbols": [ + { + "kind": "interface", + "name": "Validator", + "signature": "type Validator interface", + "line": 5 + } + ], + "line_count": 26 + }, + "pkg/otelx/spancontext.go": { + "header": "\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"go.opentelemetry.io/otel/trace\"", + "symbols": [ + { + "kind": "func", + "name": "SerializeSpanContext", + "signature": "func SerializeSpanContext(c trace.SpanContext) ([]byte, error)", + "line": 12 + }, + { + "kind": "func", + "name": "DeserializeSpanContext", + "signature": "func DeserializeSpanContext(b []byte) (*trace.SpanContext, error)", + "line": 23 + } + ], + "line_count": 38 + }, + "pkg/pagination/collect.go": { + "header": "\t\"context\"\n\t\"fmt\"\n)", + "symbols": [], + "line_count": 39 + }, + "pkg/pagination/collect_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestCollectAll_MultiplePages", + "signature": "func TestCollectAll_MultiplePages(t *testing.T)", + "line": 10 + }, + { + "kind": "func", + "name": "TestCollectAll_EmptyFirstPage", + "signature": "func TestCollectAll_EmptyFirstPage(t *testing.T)", + "line": 47 + }, + { + "kind": "func", + "name": "TestCollectAll_ErrorMidway", + "signature": "func TestCollectAll_ErrorMidway(t *testing.T)", + "line": 68 + }, + { + "kind": "func", + "name": "TestCollectAll_MaxSafeIter", + "signature": "func TestCollectAll_MaxSafeIter(t *testing.T)", + "line": 99 + }, + { + "kind": "func", + "name": "max", + "signature": "func max(a, b int) int", + "line": 126 + } + ], + "line_count": 131 + }, + "pkg/pagination/page.go": { + "header": "type InvalidError struct {\n\tp Page\n\tmsg string", + "symbols": [ + { + "kind": "struct", + "name": "InvalidError", + "signature": "type InvalidError struct", + "line": 5 + }, + { + "kind": "func", + "name": "Error", + "signature": "func (e InvalidError) Error() string", + "line": 10 + }, + { + "kind": "struct", + "name": "Page", + "signature": "type Page struct", + "line": 14 + }, + { + "kind": "func", + "name": "NewPage", + "signature": "func NewPage(pageNumber int, pageSize int) Page", + "line": 20 + }, + { + "kind": "func", + "name": "NewPageFromRef", + "signature": "func NewPageFromRef(pageNumber *int, pageSize *int) Page", + "line": 29 + }, + { + "kind": "func", + "name": "Offset", + "signature": "func (p Page) Offset() int", + "line": 44 + }, + { + "kind": "func", + "name": "Limit", + "signature": "func (p Page) Limit() int", + "line": 48 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p Page) Validate() error", + "line": 52 + }, + { + "kind": "func", + "name": "IsZero", + "signature": "func (p Page) IsZero() bool", + "line": 64 + } + ], + "line_count": 66 + }, + "pkg/pagination/pagination.go": { + "header": "\t\"context\"\n)\ntype Paginator[T any] interface {", + "symbols": [], + "line_count": 23 + }, + "pkg/pagination/pagination_test.go": { + "header": "\t\"bytes\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestShouldFlattenPageInfoWhenMarshalling", + "signature": "func TestShouldFlattenPageInfoWhenMarshalling(t *testing.T)", + "line": 13 + } + ], + "line_count": 38 + }, + "pkg/pagination/result.go": { + "header": "type Result[T any] struct {\n\tPage Page `json:\"-\"`\n\tTotalCount int `json:\"totalCount\"`", + "symbols": [], + "line_count": 57 + }, + "pkg/pagination/v2/collect.go": { + "header": "\t\"context\"\n\t\"github.com/samber/lo\"\n)", + "symbols": [], + "line_count": 38 + }, + "pkg/pagination/v2/collect_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"strconv\"", + "symbols": [ + { + "kind": "func", + "name": "TestCollectAllV2_MultiplePages", + "signature": "func TestCollectAllV2_MultiplePages(t *testing.T)", + "line": 11 + }, + { + "kind": "func", + "name": "TestCollectAllV2_RespectsInitialCursor", + "signature": "func TestCollectAllV2_RespectsInitialCursor(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "TestCollectAllV2_EmptyFirstPage", + "signature": "func TestCollectAllV2_EmptyFirstPage(t *testing.T)", + "line": 112 + }, + { + "kind": "func", + "name": "TestCollectAllV2_ErrorMidway", + "signature": "func TestCollectAllV2_ErrorMidway(t *testing.T)", + "line": 128 + }, + { + "kind": "func", + "name": "TestCollectAllV2_MaxSafeIterCap", + "signature": "func TestCollectAllV2_MaxSafeIterCap(t *testing.T)", + "line": 160 + }, + { + "kind": "func", + "name": "loCursor", + "signature": "func loCursor(offset int) *Cursor", + "line": 185 + }, + { + "kind": "func", + "name": "max", + "signature": "func max(a, b int) int", + "line": 190 + } + ], + "line_count": 195 + }, + "pkg/pagination/v2/cursor.go": { + "header": "\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Cursor", + "signature": "type Cursor struct", + "line": 13 + }, + { + "kind": "func", + "name": "NewCursor", + "signature": "func NewCursor(t time.Time, id string) Cursor", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Cursor) Validate() error", + "line": 29 + }, + { + "kind": "func", + "name": "DecodeCursor", + "signature": "func DecodeCursor(s string) (*Cursor, error)", + "line": 44 + }, + { + "kind": "func", + "name": "Encode", + "signature": "func (c Cursor) Encode() string", + "line": 57 + }, + { + "kind": "func", + "name": "EncodePtr", + "signature": "func (c *Cursor) EncodePtr() *string", + "line": 66 + }, + { + "kind": "func", + "name": "MarshalText", + "signature": "func (c Cursor) MarshalText() ([]byte, error)", + "line": 76 + }, + { + "kind": "func", + "name": "UnmarshalText", + "signature": "func (c *Cursor) UnmarshalText(text []byte) error", + "line": 82 + } + ], + "line_count": 112 + }, + "pkg/pagination/v2/cursor_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestNewCursor", + "signature": "func TestNewCursor(t *testing.T)", + "line": 10 + }, + { + "kind": "func", + "name": "TestCursorEncodeDecode", + "signature": "func TestCursorEncodeDecode(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestTimeEncodingIsConsistent", + "signature": "func TestTimeEncodingIsConsistent(t *testing.T)", + "line": 80 + }, + { + "kind": "func", + "name": "TestDecodeCursorWithInvalidInput", + "signature": "func TestDecodeCursorWithInvalidInput(t *testing.T)", + "line": 98 + }, + { + "kind": "func", + "name": "TestRoundTripWithDifferentTimes", + "signature": "func TestRoundTripWithDifferentTimes(t *testing.T)", + "line": 131 + }, + { + "kind": "func", + "name": "TestTextMarshalUnmarshal", + "signature": "func TestTextMarshalUnmarshal(t *testing.T)", + "line": 155 + }, + { + "kind": "func", + "name": "TestCursorValidation", + "signature": "func TestCursorValidation(t *testing.T)", + "line": 190 + } + ], + "line_count": 239 + }, + "pkg/pagination/v2/pagination.go": { + "header": "type Item interface {\n\tCursor() Cursor\n}", + "symbols": [ + { + "kind": "interface", + "name": "Item", + "signature": "type Item interface", + "line": 7 + } + ], + "line_count": 28 + }, + "pkg/pagination/v2/pagination_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "TestItem", + "signature": "type TestItem struct", + "line": 12 + }, + { + "kind": "func", + "name": "Cursor", + "signature": "func (i TestItem) Cursor() Cursor", + "line": 18 + }, + { + "kind": "func", + "name": "TestCursorGeneration", + "signature": "func TestCursorGeneration(t *testing.T)", + "line": 22 + } + ], + "line_count": 57 + }, + "pkg/pagination/v2/result.go": { + "header": "type Result[T any] struct {\n\tItems []T `json:\"items\"`\n\tNextCursor *Cursor `json:\"nextCursor\"`", + "symbols": [], + "line_count": 28 + }, + "pkg/pglockx/pglock.go": { + "header": "\t\"database/sql\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 18 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 24 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(db *sql.DB, config Config) (*pglock.Client, error)", + "line": 38 + } + ], + "line_count": 54 + }, + "pkg/pgxpoolobserver/observer.go": { + "header": "\t\"context\"\n\t\"github.com/jackc/pgx/v5/pgxpool\"\n\t\"go.opentelemetry.io/otel/attribute\"", + "symbols": [ + { + "kind": "func", + "name": "ObservePoolMetrics", + "signature": "func ObservePoolMetrics(meter metric.Meter, pool *pgxpool.Pool, additionalAttributes ...attribute.KeyValue) error", + "line": 13 + } + ], + "line_count": 165 + }, + "pkg/redis/client.go": { + "header": "\t\"crypto/tls\"\n\t\"fmt\"\n\t\"github.com/redis/go-redis/extra/redisotel/v9\"", + "symbols": [ + { + "kind": "func", + "name": "WithTracingProvider", + "signature": "func WithTracingProvider(p trace.TracerProvider) Option", + "line": 16 + }, + { + "kind": "func", + "name": "WithMeterProvider", + "signature": "func WithMeterProvider(p metric.MeterProvider) Option", + "line": 25 + }, + { + "kind": "struct", + "name": "Options", + "signature": "type Options struct", + "line": 34 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func NewClient(o Options, opts ...Option) (*redis.Client, error)", + "line": 42 + } + ], + "line_count": 97 + }, + "pkg/redis/config.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"github.com/redis/go-redis/v9\"", + "symbols": [ + { + "kind": "struct", + "name": "Config", + "signature": "type Config struct", + "line": 12 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (c Config) Validate() error", + "line": 28 + }, + { + "kind": "func", + "name": "NewClient", + "signature": "func (c Config) NewClient() (*redis.Client, error)", + "line": 45 + }, + { + "kind": "func", + "name": "Configure", + "signature": "func Configure(v *viper.Viper, prefix string)", + "line": 50 + } + ], + "line_count": 61 + }, + "pkg/ref/ref.go": { + "header": "\t\"fmt\"\n\t\"github.com/oklog/ulid/v2\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "IDOrKey", + "signature": "type IDOrKey struct", + "line": 9 + }, + { + "kind": "func", + "name": "GetIDs", + "signature": "func (i IDOrKey) GetIDs() []string", + "line": 14 + }, + { + "kind": "func", + "name": "GetKeys", + "signature": "func (i IDOrKey) GetKeys() []string", + "line": 22 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i IDOrKey) Validate() error", + "line": 30 + }, + { + "kind": "func", + "name": "ParseIDOrKey", + "signature": "func ParseIDOrKey(s string) IDOrKey", + "line": 38 + } + ], + "line_count": 49 + }, + "pkg/server/attributes.go": { + "header": "\t\"net/http\"\n\t\"github.com/go-chi/chi/v5/middleware\"\n\tsemconv \"go.opentelemetry.io/otel/semconv/v1.27.0\"", + "symbols": [ + { + "kind": "func", + "name": "GetRequestAttributes", + "signature": "func GetRequestAttributes(r *http.Request) map[string]string", + "line": 12 + } + ], + "line_count": 35 + }, + "pkg/server/logger.go": { + "header": "\t\"fmt\"\n\t\"log/slog\"\n\t\"net/http\"", + "symbols": [ + { + "kind": "func", + "name": "NewRequestLoggerMiddleware", + "signature": "func NewRequestLoggerMiddleware(handler slog.Handler) func(next http.Handler) http.Handler", + "line": 18 + }, + { + "kind": "struct", + "name": "RequestLogger", + "signature": "type RequestLogger struct", + "line": 22 + }, + { + "kind": "func", + "name": "NewLogEntry", + "signature": "func (l *RequestLogger) NewLogEntry(r *http.Request) middleware.LogEntry", + "line": 26 + }, + { + "kind": "struct", + "name": "RequestLoggerEntry", + "signature": "type RequestLoggerEntry struct", + "line": 30 + }, + { + "kind": "func", + "name": "Write", + "signature": "func (e *RequestLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})", + "line": 38 + }, + { + "kind": "func", + "name": "Panic", + "signature": "func (e *RequestLoggerEntry) Panic(v interface{}, stack []byte)", + "line": 46 + } + ], + "line_count": 51 + }, + "pkg/server/middleware.go": { + "header": "type MiddlewareFunc func(http.Handler) http.Handler", + "symbols": [], + "line_count": 6 + }, + "pkg/server/poweredby.go": { + "header": "const (\n\tpoweredByHeader = \"X-Powered-By\"\n\tpoweredByValue = \"OpenMeter by Kong, Inc.\"", + "symbols": [ + { + "kind": "func", + "name": "NewPoweredByMiddleware", + "signature": "func NewPoweredByMiddleware() func(next http.Handler) http.Handler", + "line": 12 + } + ], + "line_count": 19 + }, + "pkg/server/poweredby_test.go": { + "header": "\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestNewPoweredByMiddleware", + "signature": "func TestNewPoweredByMiddleware(t *testing.T)", + "line": 13 + } + ], + "line_count": 27 + }, + "pkg/set/set.go": { + "header": "type Set[T comparable] struct {\n\tmu sync.RWMutex\n\tcontent map[T]struct{}", + "symbols": [], + "line_count": 104 + }, + "pkg/set/set_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestSet", + "signature": "func TestSet(t *testing.T)", + "line": 9 + }, + { + "kind": "func", + "name": "TestSet_IsEmpty", + "signature": "func TestSet_IsEmpty(t *testing.T)", + "line": 29 + } + ], + "line_count": 84 + }, + "pkg/slicesx/diff.go": { + "header": "type Diff[T comparable, S ~[]T] struct {\n\tadditionsMap map[T]struct{}\n\tadditions S", + "symbols": [], + "line_count": 66 + }, + "pkg/slicesx/diff_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestDiff", + "signature": "func TestDiff(t *testing.T)", + "line": 9 + } + ], + "line_count": 85 + }, + "pkg/slicesx/each.go": { + "header": "func ForEachUntilWithErr[T any](s []T, f func(T, int) (breaks bool, err error)) error {\n\tfor i, v := range s {\n\t\tbreaks, err := f(v, i)", + "symbols": [], + "line_count": 16 + }, + "pkg/slicesx/each_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestForEachUntilWithErr", + "signature": "func TestForEachUntilWithErr(t *testing.T)", + "line": 10 + }, + { + "kind": "func", + "name": "TestASDF", + "signature": "func TestASDF(t *testing.T)", + "line": 56 + } + ], + "line_count": 66 + }, + "pkg/slicesx/empty.go": { + "header": "func EmptyAsNil[T any](s []T) []T {\n\tif len(s) == 0 {\n\t\treturn nil", + "symbols": [], + "line_count": 11 + }, + "pkg/slicesx/groupby.go": { + "header": "func UniqueGroupBy[T any, U comparable, Slice ~[]T](collection Slice, iteratee func(item T) U) (map[U]T, bool) {\n\tres := lo.GroupBy(collection, iteratee)\n\tout := make(map[U]T, len(res))", + "symbols": [], + "line_count": 18 + }, + "pkg/slicesx/iteratee.go": { + "header": "func AsFilterIteratee[T any](f func(T) bool) func(T, int) bool {\n\treturn func(v T, _ int) bool {\n\t\treturn f(v)", + "symbols": [], + "line_count": 7 + }, + "pkg/slicesx/last.go": { + "header": "func Last[T any](s []T, f func(T) bool) (*T, int, bool) {\n\tif s == nil {\n\t\treturn nil, -1, false", + "symbols": [], + "line_count": 15 + }, + "pkg/slicesx/map.go": { + "header": "\t\"errors\"\n)\nfunc Map[T any, S any](s []T, f func(T) S) []S {", + "symbols": [], + "line_count": 49 + }, + "pkg/slicesx/map_test.go": { + "header": "\t\"fmt\"\n\t\"reflect\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestMap", + "signature": "func TestMap(t *testing.T)", + "line": 9 + } + ], + "line_count": 20 + }, + "pkg/slicesx/normalize.go": { + "header": "\t\"cmp\"\n\t\"slices\"\n)", + "symbols": [], + "line_count": 13 + }, + "pkg/slicesx/normalize_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestNormalize", + "signature": "func TestNormalize(t *testing.T)", + "line": 9 + } + ], + "line_count": 13 + }, + "pkg/slicesx/slice.go": { + "header": "func SliceToPtrSlice[T any](s []T) []*T {\n\treturn lo.Map(s, func(_ T, i int) *T {\n\t\treturn &s[i]", + "symbols": [], + "line_count": 9 + }, + "pkg/sortx/order.go": { + "header": "type Order string\nconst (\n\tOrderAsc Order = \"ASC\"", + "symbols": [ + { + "kind": "func", + "name": "String", + "signature": "func (s Order) String() string", + "line": 12 + }, + { + "kind": "func", + "name": "IsDefaultValue", + "signature": "func (s Order) IsDefaultValue() bool", + "line": 17 + } + ], + "line_count": 19 + }, + "pkg/statelessx/actions.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "EntryFunc", + "signature": "func EntryFunc(fn ActionFn) func(context.Context, ...any) error", + "line": 13 + }, + { + "kind": "func", + "name": "AllOf", + "signature": "func AllOf(fn ...ActionFn) ActionFn", + "line": 22 + } + ], + "line_count": 53 + }, + "pkg/statelessx/conditions.go": { + "header": "func BoolFn(fn func() bool) func(context.Context, ...any) bool {\n\treturn func(context.Context, ...any) bool {\n\t\treturn fn()", + "symbols": [ + { + "kind": "func", + "name": "BoolFn", + "signature": "func BoolFn(fn func() bool) func(context.Context, ...any) bool", + "line": 5 + }, + { + "kind": "func", + "name": "Not", + "signature": "func Not(fn func() bool) func() bool", + "line": 11 + } + ], + "line_count": 15 + }, + "pkg/strcase/strcase.go": { + "header": "\t\"strings\"\n\t\"unicode\"\n)", + "symbols": [ + { + "kind": "func", + "name": "SnakeToCamel", + "signature": "func SnakeToCamel(snake string) string", + "line": 8 + }, + { + "kind": "func", + "name": "CamelToSnake", + "signature": "func CamelToSnake(camel string) string", + "line": 28 + } + ], + "line_count": 43 + }, + "pkg/strcase/strcase_test.go": { + "header": "\t\"testing\"\n\t\"github.com/openmeterio/openmeter/pkg/strcase\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestSnakeToCamel", + "signature": "func TestSnakeToCamel(t *testing.T)", + "line": 9 + }, + { + "kind": "func", + "name": "TestCamelToSnake", + "signature": "func TestCamelToSnake(t *testing.T)", + "line": 62 + }, + { + "kind": "func", + "name": "TestCamelToSnakeToCamel", + "signature": "func TestCamelToSnakeToCamel(t *testing.T)", + "line": 110 + } + ], + "line_count": 130 + }, + "pkg/timeutil/boundary.go": { + "header": "\t\"fmt\"\n\t\"slices\"\n)", + "symbols": [ + { + "kind": "func", + "name": "Validate", + "signature": "func (b Boundary) Validate() error", + "line": 22 + } + ], + "line_count": 28 + }, + "pkg/timeutil/boundedperiod.go": { + "header": "\t\"errors\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "StartBoundedPeriod", + "signature": "type StartBoundedPeriod struct", + "line": 8 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p StartBoundedPeriod) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "ContainsInclusive", + "signature": "func (p StartBoundedPeriod) ContainsInclusive(t time.Time) bool", + "line": 28 + }, + { + "kind": "func", + "name": "ContainsExclusive", + "signature": "func (p StartBoundedPeriod) ContainsExclusive(t time.Time) bool", + "line": 41 + }, + { + "kind": "func", + "name": "Contains", + "signature": "func (p StartBoundedPeriod) Contains(t time.Time) bool", + "line": 54 + }, + { + "kind": "func", + "name": "Open", + "signature": "func (p StartBoundedPeriod) Open() OpenPeriod", + "line": 66 + } + ], + "line_count": 71 + }, + "pkg/timeutil/closedperiod.go": { + "header": "\t\"errors\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "ClosedPeriod", + "signature": "type ClosedPeriod struct", + "line": 8 + }, + { + "kind": "func", + "name": "Duration", + "signature": "func (p ClosedPeriod) Duration() time.Duration", + "line": 15 + }, + { + "kind": "func", + "name": "ContainsInclusive", + "signature": "func (p ClosedPeriod) ContainsInclusive(t time.Time) bool", + "line": 20 + }, + { + "kind": "func", + "name": "ContainsExclusive", + "signature": "func (p ClosedPeriod) ContainsExclusive(t time.Time) bool", + "line": 29 + }, + { + "kind": "func", + "name": "Contains", + "signature": "func (p ClosedPeriod) Contains(t time.Time) bool", + "line": 34 + }, + { + "kind": "func", + "name": "Overlaps", + "signature": "func (p ClosedPeriod) Overlaps(other ClosedPeriod) bool", + "line": 40 + }, + { + "kind": "func", + "name": "ContainsPeriodInclusive", + "signature": "func (p ClosedPeriod) ContainsPeriodInclusive(other ClosedPeriod) bool", + "line": 53 + }, + { + "kind": "func", + "name": "OverlapsInclusive", + "signature": "func (p ClosedPeriod) OverlapsInclusive(other ClosedPeriod) bool", + "line": 59 + }, + { + "kind": "func", + "name": "Intersection", + "signature": "func (p ClosedPeriod) Intersection(other ClosedPeriod) *ClosedPeriod", + "line": 63 + }, + { + "kind": "func", + "name": "Open", + "signature": "func (p ClosedPeriod) Open() OpenPeriod", + "line": 92 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p ClosedPeriod) Validate() error", + "line": 99 + }, + { + "kind": "func", + "name": "Truncate", + "signature": "func (p ClosedPeriod) Truncate(resolution time.Duration) ClosedPeriod", + "line": 107 + }, + { + "kind": "func", + "name": "Equal", + "signature": "func (p ClosedPeriod) Equal(other ClosedPeriod) bool", + "line": 114 + }, + { + "kind": "func", + "name": "IsEmpty", + "signature": "func (p ClosedPeriod) IsEmpty() bool", + "line": 118 + } + ], + "line_count": 120 + }, + "pkg/timeutil/closedperiod_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestClosedPeriod", + "signature": "func TestClosedPeriod(t *testing.T)", + "line": 13 + } + ], + "line_count": 189 + }, + "pkg/timeutil/compare.go": { + "header": "func Compare(a, b time.Time) int {\n\treturn int(a.Sub(b))\n}", + "symbols": [ + { + "kind": "func", + "name": "Compare", + "signature": "func Compare(a, b time.Time) int", + "line": 5 + } + ], + "line_count": 7 + }, + "pkg/timeutil/openperiod.go": { + "header": "\t\"fmt\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "struct", + "name": "OpenPeriod", + "signature": "type OpenPeriod struct", + "line": 8 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (p OpenPeriod) Validate() error", + "line": 15 + }, + { + "kind": "func", + "name": "Equals", + "signature": "func (p OpenPeriod) Equals(other OpenPeriod) bool", + "line": 23 + }, + { + "kind": "func", + "name": "ContainsInclusive", + "signature": "func (p OpenPeriod) ContainsInclusive(t time.Time) bool", + "line": 44 + }, + { + "kind": "func", + "name": "ContainsExclusive", + "signature": "func (p OpenPeriod) ContainsExclusive(t time.Time) bool", + "line": 57 + }, + { + "kind": "func", + "name": "Contains", + "signature": "func (p OpenPeriod) Contains(t time.Time) bool", + "line": 70 + }, + { + "kind": "func", + "name": "Intersection", + "signature": "func (p OpenPeriod) Intersection(other OpenPeriod) *OpenPeriod", + "line": 82 + }, + { + "kind": "func", + "name": "Difference", + "signature": "func (p OpenPeriod) Difference(other OpenPeriod) []OpenPeriod", + "line": 153 + }, + { + "kind": "func", + "name": "Union", + "signature": "func (p OpenPeriod) Union(other OpenPeriod) OpenPeriod", + "line": 195 + }, + { + "kind": "func", + "name": "IsSupersetOf", + "signature": "func (p OpenPeriod) IsSupersetOf(other OpenPeriod) bool", + "line": 234 + }, + { + "kind": "func", + "name": "OverlapsInclusive", + "signature": "func (p OpenPeriod) OverlapsInclusive(other OpenPeriod) bool", + "line": 280 + }, + { + "kind": "func", + "name": "Closed", + "signature": "func (p OpenPeriod) Closed() (ClosedPeriod, error)", + "line": 296 + } + ], + "line_count": 305 + }, + "pkg/timeutil/openperiod_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n)", + "symbols": [ + { + "kind": "func", + "name": "TestOpenPeriod", + "signature": "func TestOpenPeriod(t *testing.T)", + "line": 8 + } + ], + "line_count": 890 + }, + "pkg/timeutil/period.go": { + "header": "type Period interface {\n\tContainsInclusive(t time.Time) bool\n\tContainsExclusive(t time.Time) bool", + "symbols": [ + { + "kind": "interface", + "name": "Period", + "signature": "type Period interface", + "line": 5 + } + ], + "line_count": 12 + }, + "pkg/timeutil/recurrence.go": { + "header": "\t\"errors\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "Recurrence", + "signature": "type Recurrence struct", + "line": 13 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (r Recurrence) Validate() error", + "line": 20 + }, + { + "kind": "func", + "name": "GetPeriodAt", + "signature": "func (r Recurrence) GetPeriodAt(t time.Time) (ClosedPeriod, error)", + "line": 35 + }, + { + "kind": "func", + "name": "IterateFromNextAfter", + "signature": "func (r Recurrence) IterateFromNextAfter(t time.Time, boundaryBehavior Boundary) (RecurrenceIterator, error)", + "line": 67 + }, + { + "kind": "func", + "name": "NextAfter", + "signature": "func (r Recurrence) NextAfter(t time.Time, boundaryBehavior Boundary) (time.Time, error)", + "line": 93 + }, + { + "kind": "func", + "name": "iterateFromNextAfterInclusive", + "signature": "func (r Recurrence) iterateFromNextAfterInclusive(t time.Time) (RecurrenceIterator, error)", + "line": 102 + }, + { + "kind": "func", + "name": "IterateFromPrevBefore", + "signature": "func (r Recurrence) IterateFromPrevBefore(t time.Time, boundaryBehavior Boundary) (RecurrenceIterator, error)", + "line": 169 + }, + { + "kind": "func", + "name": "PrevBefore", + "signature": "func (r Recurrence) PrevBefore(t time.Time, boundaryBehavior Boundary) (time.Time, error)", + "line": 195 + }, + { + "kind": "func", + "name": "iterateFromPrevBeforeInclusive", + "signature": "func (r Recurrence) iterateFromPrevBeforeInclusive(t time.Time) (RecurrenceIterator, error)", + "line": 207 + }, + { + "kind": "func", + "name": "Iterator", + "signature": "func (r Recurrence) Iterator() RecurrenceIterator", + "line": 267 + }, + { + "kind": "func", + "name": "addIntervalNTimes", + "signature": "func (r Recurrence) addIntervalNTimes(t time.Time, nrIntervals int) (time.Time, error)", + "line": 275 + }, + { + "kind": "struct", + "name": "RecurrenceIterator", + "signature": "type RecurrenceIterator struct", + "line": 288 + }, + { + "kind": "func", + "name": "Next", + "signature": "func (i RecurrenceIterator) Next() (RecurrenceIterator, error)", + "line": 294 + }, + { + "kind": "func", + "name": "Prev", + "signature": "func (i RecurrenceIterator) Prev() (RecurrenceIterator, error)", + "line": 298 + }, + { + "kind": "func", + "name": "iteratorWithDelta", + "signature": "func (i RecurrenceIterator) iteratorWithDelta(delta int) (RecurrenceIterator, error)", + "line": 302 + }, + { + "kind": "struct", + "name": "RecurrenceInterval", + "signature": "type RecurrenceInterval struct", + "line": 315 + }, + { + "kind": "func", + "name": "NewRecurrenceFromISODuration", + "signature": "func NewRecurrenceFromISODuration(p datetime.ISODuration, anchor time.Time) (Recurrence, error)", + "line": 326 + }, + { + "kind": "func", + "name": "NewRecurrence", + "signature": "func NewRecurrence(p RecurrenceInterval, anchor time.Time) (Recurrence, error)", + "line": 330 + } + ], + "line_count": 341 + }, + "pkg/timeutil/recurrence_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestNextAfter", + "signature": "func TestNextAfter(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestPrevBefore", + "signature": "func TestPrevBefore(t *testing.T)", + "line": 178 + }, + { + "kind": "func", + "name": "TestGetPeriodAt", + "signature": "func TestGetPeriodAt(t *testing.T)", + "line": 351 + }, + { + "kind": "func", + "name": "addDateNoOverflow", + "signature": "func addDateNoOverflow(t time.Time, years int, months int, days int) time.Time", + "line": 430 + } + ], + "line_count": 432 + }, + "pkg/timeutil/timeline.go": { + "header": "\t\"reflect\"\n\t\"slices\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "NewSimpleTimeline", + "signature": "func NewSimpleTimeline(times []time.Time) SimpleTimeline", + "line": 11 + } + ], + "line_count": 168 + }, + "pkg/timeutil/timeline_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "TestTimelineGetClosedPeriods", + "signature": "func TestTimelineGetClosedPeriods(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestTimelineGetOpenPeriods", + "signature": "func TestTimelineGetOpenPeriods(t *testing.T)", + "line": 71 + } + ], + "line_count": 163 + }, + "pkg/treex/errors.go": { + "header": "var (\n\tErrRootNodeIsNil = errors.New(\"root node cannot be nil\")\n\tErrGraphHasCycle = errors.New(\"graph cannot contain cycles\")", + "symbols": [], + "line_count": 12 + }, + "pkg/treex/node.go": { + "header": "\t\"errors\"\n\t\"reflect\"\n\t\"github.com/samber/lo\"", + "symbols": [], + "line_count": 137 + }, + "pkg/treex/node_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "struct", + "name": "nodeVal", + "signature": "type nodeVal struct", + "line": 10 + }, + { + "kind": "func", + "name": "TestNewNode_RequiresNonNilPointer", + "signature": "func TestNewNode_RequiresNonNilPointer(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestNode_ValueAndSetValue", + "signature": "func TestNode_ValueAndSetValue(t *testing.T)", + "line": 22 + }, + { + "kind": "func", + "name": "TestNode_AddChild_SetsParentAndChildren", + "signature": "func TestNode_AddChild_SetsParentAndChildren(t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "TestNode_RemoveChild", + "signature": "func TestNode_RemoveChild(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "TestNode_SwapChild", + "signature": "func TestNode_SwapChild(t *testing.T)", + "line": 67 + }, + { + "kind": "func", + "name": "TestNode_IsLeafAndIsRoot", + "signature": "func TestNode_IsLeafAndIsRoot(t *testing.T)", + "line": 89 + }, + { + "kind": "func", + "name": "TestNode_ShallowClone", + "signature": "func TestNode_ShallowClone(t *testing.T)", + "line": 103 + }, + { + "kind": "func", + "name": "TestNode_DeepClone", + "signature": "func TestNode_DeepClone(t *testing.T)", + "line": 129 + } + ], + "line_count": 163 + }, + "pkg/treex/tree.go": { + "header": "type Tree[T any] struct {\n\troot *Node[T]\n}", + "symbols": [], + "line_count": 116 + }, + "pkg/treex/tree_test.go": { + "header": "\t\"errors\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "struct", + "name": "testVal", + "signature": "type testVal struct", + "line": 11 + }, + { + "kind": "func", + "name": "TestNewTree_NilRoot", + "signature": "func TestNewTree_NilRoot(t *testing.T)", + "line": 13 + }, + { + "kind": "func", + "name": "TestNewTree_MutatesInput", + "signature": "func TestNewTree_MutatesInput(t *testing.T)", + "line": 20 + }, + { + "kind": "func", + "name": "TestNewTree_DontChangeRoot", + "signature": "func TestNewTree_DontChangeRoot(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "TestNewTree_AcyclicValid", + "signature": "func TestNewTree_AcyclicValid(t *testing.T)", + "line": 76 + }, + { + "kind": "func", + "name": "TestNewTree_DetectsCycle", + "signature": "func TestNewTree_DetectsCycle(t *testing.T)", + "line": 97 + }, + { + "kind": "func", + "name": "TestNewTree_InvalidGraph_NilChild", + "signature": "func TestNewTree_InvalidGraph_NilChild(t *testing.T)", + "line": 116 + }, + { + "kind": "func", + "name": "TestDFS_PreOrderTraversal", + "signature": "func TestDFS_PreOrderTraversal(t *testing.T)", + "line": 132 + }, + { + "kind": "func", + "name": "TestDFS_PruneSubtreeOnStop", + "signature": "func TestDFS_PruneSubtreeOnStop(t *testing.T)", + "line": 165 + }, + { + "kind": "func", + "name": "TestDFS_ErrorPropagation", + "signature": "func TestDFS_ErrorPropagation(t *testing.T)", + "line": 201 + } + ], + "line_count": 241 + }, + "pkg/treex/usage_example_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "struct", + "name": "wrapper", + "signature": "type wrapper struct", + "line": 13 + }, + { + "kind": "func", + "name": "newWrapper", + "signature": "func newWrapper(name string) *wrapper", + "line": 18 + }, + { + "kind": "func", + "name": "TestWrapper_EmbeddingAndHierarchy", + "signature": "func TestWrapper_EmbeddingAndHierarchy(t *testing.T)", + "line": 24 + }, + { + "kind": "func", + "name": "TestWrapper_ImmutableUpdate_UsingShallowClone", + "signature": "func TestWrapper_ImmutableUpdate_UsingShallowClone(t *testing.T)", + "line": 55 + }, + { + "kind": "func", + "name": "TestWrapper_PartialSubtreeUpdate_WithShallowCloneAtIntermediate", + "signature": "func TestWrapper_PartialSubtreeUpdate_WithShallowCloneAtIntermediate(t *testing.T)", + "line": 97 + } + ], + "line_count": 139 + }, + "quickstart/.gitignore": { + "header": "docker-compose.override.yaml", + "symbols": [], + "line_count": 1 + }, + "quickstart/Makefile": { + "header": "# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html\n\n.PHONY: test-local\ntest-local: ## Run quickstart tests against a local stack with debug ports exposed\n\t$(call print-target)\n\t$(MAKE) env-local-down\n\t$(MAKE) env-local-up\n\n\tcurl --retry 10 --retry-max-time 120 --retry-all-errors http://localhost:40000/healthz\n\n\tOPENMETER_ADDRESS=http://localhost:48888 go test -count=1 -v ./...\n\n\t$(MAKE) env-local-down\n\n.PHONY: env-local-down\nenv-local-down:\n\t$(call print-target)\n\tdocker compose \\\n\t\t-f docker-compose.yaml \\\n\t\t-f docker-compose.debug-ports.yaml \\", + "symbols": [], + "line_count": 42 + }, + "quickstart/README.md": { + "header": "# Quickstart\n\n## Prerequisites\n\n- Docker (with Compose)\n- curl\n- jq\n\nClone the repository:\n\n```sh\ngit clone git@github.com:openmeterio/openmeter.git\ncd openmeter/quickstart\n```\n\n## 1. Launch OpenMeter\n\nLaunch OpenMeter and its dependencies via:\n\n```sh", + "symbols": [], + "line_count": 177 + }, + "quickstart/config.yaml": { + "header": "ingest:\n kafka:\n broker: kafka:9092\n brokerAddressFamily: v4\n socketKeepAliveEnable: true\n topicMetadataRefreshInterval: 10s\n\naggregation:\n clickhouse:\n address: clickhouse:9000\n\nsink:\n minCommitCount: 1\n namespaceRefetch: 1s\n namespaceRefetchTimeout: 1s\n kafka:\n brokers: kafka:9092\n brokerAddressFamily: v4\n socketKeepAliveEnable: true\n topicMetadataRefreshInterval: 10s", + "symbols": [], + "line_count": 71 + }, + "quickstart/docker-compose.debug-ports.yaml": { + "header": "# Optional host port exposure for local debugging.\n# CI only needs the app/service ports declared in docker-compose.yaml.\nservices:\n kafka:\n ports:\n - \"127.0.0.1:49092:29092\"\n\n clickhouse:\n ports:\n - \"127.0.0.1:48123:8123\"\n - \"127.0.0.1:49000:9000\"\n - \"127.0.0.1:49009:9009\"\n\n redis:\n ports:\n - \"127.0.0.1:46379:6379\"\n\n postgres:\n ports:\n - \"127.0.0.1:45432:5432\"", + "symbols": [], + "line_count": 24 + }, + "quickstart/docker-compose.yaml": { + "header": "# please use port numbers in the 40000 range so that it doesn't conflict with the main dev environment\nservices:\n openmeter:\n image: ghcr.io/openmeterio/openmeter:latest\n command: openmeter --address 0.0.0.0:8888 --config /etc/openmeter/config.yaml\n restart: always\n pull_policy: always\n depends_on:\n kafka:\n condition: service_healthy\n clickhouse:\n condition: service_healthy\n postgres:\n condition: service_healthy\n ports:\n - \"127.0.0.1:48888:8888\"\n volumes:\n - ./config.yaml:/etc/openmeter/config.yaml\n healthcheck:\n test: [\"CMD\", \"wget\", \"--spider\", \"http://openmeter:8888/api/v1/debug/metrics\"]", + "symbols": [], + "line_count": 145 + }, + "quickstart/quickstart_test.go": { + "header": "\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"", + "symbols": [ + { + "kind": "func", + "name": "initClient", + "signature": "func initClient(t *testing.T) *api.ClientWithResponses", + "line": 25 + }, + { + "kind": "func", + "name": "openmeterAddress", + "signature": "func openmeterAddress(t *testing.T) string", + "line": 39 + }, + { + "kind": "func", + "name": "openmeterV3Address", + "signature": "func openmeterV3Address(t *testing.T) string", + "line": 50 + }, + { + "kind": "func", + "name": "createMeterV3", + "signature": "func createMeterV3(t *testing.T, address string, body apiv3.CreateMeterRequest) *apiv3.Meter", + "line": 56 + }, + { + "kind": "func", + "name": "queryMeterV3", + "signature": "func queryMeterV3(t require.TestingT, address string, meterID string, body apiv3.MeterQueryRequest) *apiv3.MeterQueryResult", + "line": 85 + }, + { + "kind": "func", + "name": "TestQuickstart", + "signature": "func TestQuickstart(t *testing.T)", + "line": 116 + } + ], + "line_count": 237 + }, + "test/app/app_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestApp", + "signature": "func TestApp(t *testing.T)", + "line": 10 + } + ], + "line_count": 39 + }, + "test/app/custominvoicing/event_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomInvoicingEventTestSuite", + "signature": "type CustomInvoicingEventTestSuite struct", + "line": 15 + }, + { + "kind": "func", + "name": "TestInvoicingEvent", + "signature": "func TestInvoicingEvent(t *testing.T)", + "line": 19 + }, + { + "kind": "func", + "name": "TestCreateInvoiceEvent", + "signature": "func (s *CustomInvoicingEventTestSuite) TestCreateInvoiceEvent()", + "line": 23 + } + ], + "line_count": 63 + }, + "test/app/custominvoicing/invocing_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomInvoicingTestSuite", + "signature": "type CustomInvoicingTestSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "TestApp", + "signature": "func TestApp(t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "setupDefaultBillingProfile", + "signature": "func (s *CustomInvoicingTestSuite) setupDefaultBillingProfile(ctx context.Context, namespace string, customInvoicingConfig appcustominvoicing.Configuration)", + "line": 36 + }, + { + "kind": "func", + "name": "TestInvoicingFlowHooksEnabled", + "signature": "func (s *CustomInvoicingTestSuite) TestInvoicingFlowHooksEnabled()", + "line": 61 + }, + { + "kind": "func", + "name": "TestInvoicingFlowPaymentStatusOnly", + "signature": "func (s *CustomInvoicingTestSuite) TestInvoicingFlowPaymentStatusOnly()", + "line": 269 + } + ], + "line_count": 344 + }, + "test/app/marketplace.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "struct", + "name": "AppHandlerTestSuite", + "signature": "type AppHandlerTestSuite struct", + "line": 18 + }, + { + "kind": "func", + "name": "setupNamespace", + "signature": "func (s *AppHandlerTestSuite) setupNamespace(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "TestGetMarketplaceListing", + "signature": "func (s *AppHandlerTestSuite) TestGetMarketplaceListing(ctx context.Context, t *testing.T)", + "line": 33 + }, + { + "kind": "func", + "name": "TestListMarketplaceListings", + "signature": "func (s *AppHandlerTestSuite) TestListMarketplaceListings(ctx context.Context, t *testing.T)", + "line": 66 + } + ], + "line_count": 85 + }, + "test/app/stripe/app_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestAppStripe", + "signature": "func TestAppStripe(t *testing.T)", + "line": 10 + } + ], + "line_count": 70 + }, + "test/app/stripe/appstripe.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "AppHandlerTestSuite", + "signature": "type AppHandlerTestSuite struct", + "line": 30 + }, + { + "kind": "func", + "name": "setupNamespace", + "signature": "func (s *AppHandlerTestSuite) setupNamespace(t *testing.T)", + "line": 38 + }, + { + "kind": "func", + "name": "TestCreate", + "signature": "func (s *AppHandlerTestSuite) TestCreate(ctx context.Context, t *testing.T)", + "line": 45 + }, + { + "kind": "func", + "name": "TestGet", + "signature": "func (s *AppHandlerTestSuite) TestGet(ctx context.Context, t *testing.T)", + "line": 98 + }, + { + "kind": "func", + "name": "TestUpdate", + "signature": "func (s *AppHandlerTestSuite) TestUpdate(ctx context.Context, t *testing.T)", + "line": 126 + }, + { + "kind": "func", + "name": "TestUninstall", + "signature": "func (s *AppHandlerTestSuite) TestUninstall(ctx context.Context, t *testing.T)", + "line": 164 + }, + { + "kind": "func", + "name": "TestCustomerData", + "signature": "func (s *AppHandlerTestSuite) TestCustomerData(ctx context.Context, t *testing.T)", + "line": 193 + }, + { + "kind": "func", + "name": "TestCustomerValidate", + "signature": "func (s *AppHandlerTestSuite) TestCustomerValidate(ctx context.Context, t *testing.T)", + "line": 408 + }, + { + "kind": "func", + "name": "TestCreateCheckoutSession", + "signature": "func (s *AppHandlerTestSuite) TestCreateCheckoutSession(ctx context.Context, t *testing.T)", + "line": 634 + }, + { + "kind": "func", + "name": "TestCreatePortalSession", + "signature": "func (s *AppHandlerTestSuite) TestCreatePortalSession(ctx context.Context, t *testing.T)", + "line": 753 + }, + { + "kind": "func", + "name": "TestUpdateAPIKey", + "signature": "func (s *AppHandlerTestSuite) TestUpdateAPIKey(ctx context.Context, t *testing.T)", + "line": 814 + } + ], + "line_count": 881 + }, + "test/app/stripe/fixture.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "NewFixture", + "signature": "func NewFixture(\n\tapp app.Service,\n\tcustomer customer.Service,\n\tstripeClient *StripeClientMock,\n\tstripeAppClient *StripeAppClientMock,\n) *Fixture", + "line": 19 + }, + { + "kind": "struct", + "name": "Fixture", + "signature": "type Fixture struct", + "line": 33 + }, + { + "kind": "func", + "name": "setupAppWithCustomer", + "signature": "func (s *Fixture) setupAppWithCustomer(ctx context.Context, namespace string) (app.App, *customer.Customer, appstripe.CustomerData, error)", + "line": 41 + }, + { + "kind": "func", + "name": "setupApp", + "signature": "func (s *Fixture) setupApp(ctx context.Context, namespace string) (app.App, error)", + "line": 61 + }, + { + "kind": "func", + "name": "setupCustomer", + "signature": "func (s *Fixture) setupCustomer(ctx context.Context, namespace string) (*customer.Customer, error)", + "line": 96 + }, + { + "kind": "func", + "name": "setupAppCustomerData", + "signature": "func (s *Fixture) setupAppCustomerData(ctx context.Context, customerApp app.App, customer *customer.Customer) (appstripe.CustomerData, error)", + "line": 113 + }, + { + "kind": "func", + "name": "getStripeAccountId", + "signature": "func getStripeAccountId() string", + "line": 138 + } + ], + "line_count": 146 + }, + "test/app/stripe/invoice_credits_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceProgressiveBillingCreditAllocation", + "signature": "func (s *StripeInvoiceTestSuite) TestUsageBasedCreditThenInvoiceProgressiveBillingCreditAllocation()", + "line": 31 + }, + { + "kind": "struct", + "name": "expectedStripeInvoiceItem", + "signature": "type expectedStripeInvoiceItem struct", + "line": 241 + }, + { + "kind": "func", + "name": "expectStripeInvoiceCreate", + "signature": "func (s *StripeInvoiceTestSuite) expectStripeInvoiceCreate(appID app.AppID, customerID customer.CustomerID, invoiceID string, stripeCustomerID string, stripeInvoiceID string)", + "line": 247 + }, + { + "kind": "func", + "name": "expectStripeInvoiceAddLines", + "signature": "func (s *StripeInvoiceTestSuite) expectStripeInvoiceAddLines(stripeInvoiceID string, expectedItems []expectedStripeInvoiceItem)", + "line": 267 + }, + { + "kind": "struct", + "name": "createMockChargeIntentInput", + "signature": "type createMockChargeIntentInput struct", + "line": 311 + }, + { + "kind": "func", + "name": "createMockChargeIntent", + "signature": "func (s *StripeInvoiceTestSuite) createMockChargeIntent(input createMockChargeIntentInput) charges.ChargeIntent", + "line": 323 + }, + { + "kind": "struct", + "name": "createCreditPurchaseIntentInput", + "signature": "type createCreditPurchaseIntentInput struct", + "line": 347 + }, + { + "kind": "func", + "name": "createCreditPurchaseIntent", + "signature": "func (s *StripeInvoiceTestSuite) createCreditPurchaseIntent(input createCreditPurchaseIntentInput) charges.ChargeIntent", + "line": 355 + }, + { + "kind": "func", + "name": "createStripeLedgerBackedCustomer", + "signature": "func (s *StripeInvoiceTestSuite) createStripeLedgerBackedCustomer(ctx context.Context, ns string, subjectKey string) *customer.Customer", + "line": 378 + }, + { + "kind": "func", + "name": "mustSettleExternalCreditPurchase", + "signature": "func (s *StripeInvoiceTestSuite) mustSettleExternalCreditPurchase(ctx context.Context, chargeID meta.ChargeID)", + "line": 391 + } + ], + "line_count": 407 + }, + "test/app/stripe/invoice_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "StripeInvoiceTestSuite", + "signature": "type StripeInvoiceTestSuite struct", + "line": 52 + }, + { + "kind": "func", + "name": "TestStripeInvoicing", + "signature": "func TestStripeInvoicing(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *StripeInvoiceTestSuite) SetupSuite()", + "line": 67 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *StripeInvoiceTestSuite) TearDownTest()", + "line": 158 + }, + { + "kind": "struct", + "name": "ubpFeatures", + "signature": "type ubpFeatures struct", + "line": 162 + }, + { + "kind": "func", + "name": "TestComplexInvoice", + "signature": "func (s *StripeInvoiceTestSuite) TestComplexInvoice()", + "line": 170 + }, + { + "kind": "func", + "name": "TestEmptyInvoiceGenerationZeroUsage", + "signature": "func (s *StripeInvoiceTestSuite) TestEmptyInvoiceGenerationZeroUsage()", + "line": 1113 + }, + { + "kind": "func", + "name": "TestSendInvoice", + "signature": "func (s *StripeInvoiceTestSuite) TestSendInvoice()", + "line": 1330 + }, + { + "kind": "func", + "name": "mapInvoiceItemParamsToInvoiceItem", + "signature": "func mapInvoiceItemParamsToInvoiceItem(id string, i *stripe.InvoiceItemParams) stripeclient.StripeInvoiceItemWithLineID", + "line": 1486 + } + ], + "line_count": 1503 + }, + "test/app/stripe/secret_mock.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"github.com/stretchr/testify/mock\"", + "symbols": [ + { + "kind": "func", + "name": "NewMockSecretService", + "signature": "func NewMockSecretService() (*MockSecretService, error)", + "line": 18 + }, + { + "kind": "struct", + "name": "MockSecretService", + "signature": "type MockSecretService struct", + "line": 34 + }, + { + "kind": "func", + "name": "EnableMock", + "signature": "func (s *MockSecretService) EnableMock()", + "line": 41 + }, + { + "kind": "func", + "name": "DisableMock", + "signature": "func (s *MockSecretService) DisableMock()", + "line": 45 + }, + { + "kind": "func", + "name": "CreateAppSecret", + "signature": "func (s *MockSecretService) CreateAppSecret(ctx context.Context, input secretentity.CreateAppSecretInput) (secretentity.SecretID, error)", + "line": 49 + }, + { + "kind": "func", + "name": "UpdateAppSecret", + "signature": "func (s *MockSecretService) UpdateAppSecret(ctx context.Context, input secretentity.UpdateAppSecretInput) (secretentity.SecretID, error)", + "line": 64 + }, + { + "kind": "func", + "name": "GetAppSecret", + "signature": "func (s *MockSecretService) GetAppSecret(ctx context.Context, input secretentity.GetAppSecretInput) (secretentity.Secret, error)", + "line": 79 + }, + { + "kind": "func", + "name": "DeleteAppSecret", + "signature": "func (s *MockSecretService) DeleteAppSecret(ctx context.Context, input secretentity.DeleteAppSecretInput) error", + "line": 94 + } + ], + "line_count": 107 + }, + "test/app/stripe/stripe_mock.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "StripeClientMock", + "signature": "type StripeClientMock struct", + "line": 14 + }, + { + "kind": "func", + "name": "Restore", + "signature": "func (c *StripeClientMock) Restore()", + "line": 18 + }, + { + "kind": "func", + "name": "GetAccount", + "signature": "func (c *StripeClientMock) GetAccount(ctx context.Context) (stripeclient.StripeAccount, error)", + "line": 22 + }, + { + "kind": "func", + "name": "SetupWebhook", + "signature": "func (c *StripeClientMock) SetupWebhook(ctx context.Context, input stripeclient.SetupWebhookInput) (stripeclient.StripeWebhookEndpoint, error)", + "line": 27 + }, + { + "kind": "struct", + "name": "StripeAppClientMock", + "signature": "type StripeAppClientMock struct", + "line": 36 + }, + { + "kind": "func", + "name": "Restore", + "signature": "func (c *StripeAppClientMock) Restore()", + "line": 40 + }, + { + "kind": "func", + "name": "DeleteWebhook", + "signature": "func (c *StripeAppClientMock) DeleteWebhook(ctx context.Context, input stripeclient.DeleteWebhookInput) error", + "line": 44 + }, + { + "kind": "func", + "name": "GetAccount", + "signature": "func (c *StripeAppClientMock) GetAccount(ctx context.Context) (stripeclient.StripeAccount, error)", + "line": 53 + }, + { + "kind": "func", + "name": "GetCustomer", + "signature": "func (c *StripeAppClientMock) GetCustomer(ctx context.Context, stripeCustomerID string) (stripeclient.StripeCustomer, error)", + "line": 58 + }, + { + "kind": "func", + "name": "CreateCustomer", + "signature": "func (c *StripeAppClientMock) CreateCustomer(ctx context.Context, input stripeclient.CreateStripeCustomerInput) (stripeclient.StripeCustomer, error)", + "line": 63 + }, + { + "kind": "func", + "name": "CreateCheckoutSession", + "signature": "func (c *StripeAppClientMock) CreateCheckoutSession(ctx context.Context, input stripeclient.CreateCheckoutSessionInput) (stripeclient.StripeCheckoutSession, error)", + "line": 72 + }, + { + "kind": "func", + "name": "GetPaymentMethod", + "signature": "func (c *StripeAppClientMock) GetPaymentMethod(ctx context.Context, paymentMethodID string) (stripeclient.StripePaymentMethod, error)", + "line": 81 + }, + { + "kind": "func", + "name": "CreateInvoice", + "signature": "func (c *StripeAppClientMock) CreateInvoice(ctx context.Context, input stripeclient.CreateInvoiceInput) (*stripe.Invoice, error)", + "line": 88 + }, + { + "kind": "func", + "name": "GetInvoice", + "signature": "func (c *StripeAppClientMock) GetInvoice(ctx context.Context, input stripeclient.GetInvoiceInput) (*stripe.Invoice, error)", + "line": 97 + }, + { + "kind": "func", + "name": "UpdateInvoice", + "signature": "func (c *StripeAppClientMock) UpdateInvoice(ctx context.Context, input stripeclient.UpdateInvoiceInput) (*stripe.Invoice, error)", + "line": 106 + }, + { + "kind": "func", + "name": "DeleteInvoice", + "signature": "func (c *StripeAppClientMock) DeleteInvoice(ctx context.Context, input stripeclient.DeleteInvoiceInput) error", + "line": 115 + }, + { + "kind": "func", + "name": "FinalizeInvoice", + "signature": "func (c *StripeAppClientMock) FinalizeInvoice(ctx context.Context, input stripeclient.FinalizeInvoiceInput) (*stripe.Invoice, error)", + "line": 124 + }, + { + "kind": "func", + "name": "ListInvoiceLineItems", + "signature": "func (c *StripeAppClientMock) ListInvoiceLineItems(ctx context.Context, stripeInvoiceID string) ([]*stripe.InvoiceLineItem, error)", + "line": 134 + }, + { + "kind": "func", + "name": "AddInvoiceLines", + "signature": "func (c *StripeAppClientMock) AddInvoiceLines(ctx context.Context, input stripeclient.AddInvoiceLinesInput) ([]stripeclient.StripeInvoiceItemWithLineID, error)", + "line": 139 + }, + { + "kind": "func", + "name": "StableSortInvoiceItemParams", + "signature": "func (c *StripeAppClientMock) StableSortInvoiceItemParams(input []*stripe.InvoiceItemParams)", + "line": 150 + }, + { + "kind": "func", + "name": "UpdateInvoiceLines", + "signature": "func (c *StripeAppClientMock) UpdateInvoiceLines(ctx context.Context, input stripeclient.UpdateInvoiceLinesInput) ([]*stripe.InvoiceItem, error)", + "line": 156 + }, + { + "kind": "func", + "name": "StableSortStripeInvoiceItemWithID", + "signature": "func (c *StripeAppClientMock) StableSortStripeInvoiceItemWithID(lines []*stripeclient.StripeInvoiceItemWithID)", + "line": 167 + }, + { + "kind": "func", + "name": "RemoveInvoiceLines", + "signature": "func (c *StripeAppClientMock) RemoveInvoiceLines(ctx context.Context, input stripeclient.RemoveInvoiceLinesInput) error", + "line": 173 + }, + { + "kind": "func", + "name": "CreatePortalSession", + "signature": "func (c *StripeAppClientMock) CreatePortalSession(ctx context.Context, input stripeclient.CreatePortalSessionInput) (stripeclient.PortalSession, error)", + "line": 183 + } + ], + "line_count": 190 + }, + "test/app/stripe/testenv.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "TestEnv", + "signature": "type TestEnv interface", + "line": 30 + }, + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 44 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (n testEnv) Close() error", + "line": 57 + }, + { + "kind": "func", + "name": "App", + "signature": "func (n testEnv) App() app.Service", + "line": 61 + }, + { + "kind": "func", + "name": "AppStripe", + "signature": "func (n testEnv) AppStripe() appstripe.Service", + "line": 65 + }, + { + "kind": "func", + "name": "Billing", + "signature": "func (n testEnv) Billing() billing.Service", + "line": 69 + }, + { + "kind": "func", + "name": "Customer", + "signature": "func (n testEnv) Customer() customer.Service", + "line": 73 + }, + { + "kind": "func", + "name": "Fixture", + "signature": "func (n testEnv) Fixture() *Fixture", + "line": 77 + }, + { + "kind": "func", + "name": "Secret", + "signature": "func (n testEnv) Secret() *MockSecretService", + "line": 81 + }, + { + "kind": "func", + "name": "StripeClient", + "signature": "func (n testEnv) StripeClient() *StripeClientMock", + "line": 85 + }, + { + "kind": "func", + "name": "StripeAppClient", + "signature": "func (n testEnv) StripeAppClient() *StripeAppClientMock", + "line": 89 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T, ctx context.Context) (TestEnv, error)", + "line": 97 + } + ], + "line_count": 222 + }, + "test/app/testenv.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "interface", + "name": "TestEnv", + "signature": "type TestEnv interface", + "line": 44 + }, + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 53 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (n testEnv) Close() error", + "line": 60 + }, + { + "kind": "func", + "name": "Adapter", + "signature": "func (n testEnv) Adapter() app.Adapter", + "line": 64 + }, + { + "kind": "func", + "name": "App", + "signature": "func (n testEnv) App() app.Service", + "line": 68 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T, ctx context.Context) (TestEnv, error)", + "line": 76 + }, + { + "kind": "struct", + "name": "InitBillingServiceInput", + "signature": "type InitBillingServiceInput struct", + "line": 201 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i InitBillingServiceInput) Validate() error", + "line": 207 + }, + { + "kind": "func", + "name": "InitBillingService", + "signature": "func InitBillingService(t *testing.T, ctx context.Context, in InitBillingServiceInput) (billing.Service, error)", + "line": 223 + } + ], + "line_count": 293 + }, + "test/billing/adapter_test.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "struct", + "name": "BillingAdapterTestSuite", + "signature": "type BillingAdapterTestSuite struct", + "line": 31 + }, + { + "kind": "func", + "name": "TestBillingAdapter", + "signature": "func TestBillingAdapter(t *testing.T)", + "line": 35 + }, + { + "kind": "func", + "name": "setupInvoice", + "signature": "func (s *BillingAdapterTestSuite) setupInvoice(ctx context.Context, ns string) *billing.StandardInvoice", + "line": 39 + }, + { + "kind": "struct", + "name": "newLineInput", + "signature": "type newLineInput struct", + "line": 86 + }, + { + "kind": "func", + "name": "newLine", + "signature": "func newLine(in newLineInput) *billing.StandardLine", + "line": 95 + }, + { + "kind": "func", + "name": "newDetailedLine", + "signature": "func newDetailedLine(in newLineInput) billing.DetailedLine", + "line": 131 + }, + { + "kind": "func", + "name": "TestDetailedLineHandling", + "signature": "func (s *BillingAdapterTestSuite) TestDetailedLineHandling()", + "line": 152 + }, + { + "kind": "func", + "name": "getUniqReferenceNames", + "signature": "func getUniqReferenceNames(lines []billing.DetailedLine) []string", + "line": 372 + }, + { + "kind": "func", + "name": "getLineNames", + "signature": "func getLineNames(lines []billing.DetailedLine) []string", + "line": 378 + }, + { + "kind": "func", + "name": "TestDiscountHandling", + "signature": "func (s *BillingAdapterTestSuite) TestDiscountHandling()", + "line": 387 + }, + { + "kind": "func", + "name": "findAmountDiscountByDescription", + "signature": "func (s *BillingAdapterTestSuite) findAmountDiscountByDescription(discounts []billing.AmountLineDiscountManaged, description string) billing.AmountLineDiscountManaged", + "line": 614 + }, + { + "kind": "func", + "name": "TestHardDeleteGatheringInvoiceLines", + "signature": "func (s *BillingAdapterTestSuite) TestHardDeleteGatheringInvoiceLines()", + "line": 627 + }, + { + "kind": "func", + "name": "TestHardDeleteGatheringInvoiceLinesNegative", + "signature": "func (s *BillingAdapterTestSuite) TestHardDeleteGatheringInvoiceLinesNegative()", + "line": 744 + } + ], + "line_count": 863 + }, + "test/billing/collection_config_test.go": { + "header": "\t\"testing\"\n\t\"github.com/stretchr/testify/require\"\n\tombilling \"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "TestCollectionConfigValidate_Subscription_NoAnchoredDetailRequired", + "signature": "func TestCollectionConfigValidate_Subscription_NoAnchoredDetailRequired(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "TestCollectionConfigValidate_Subscription_IgnoresAnchoredDetail", + "signature": "func TestCollectionConfigValidate_Subscription_IgnoresAnchoredDetail(t *testing.T)", + "line": 21 + } + ], + "line_count": 32 + }, + "test/billing/collection_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "CollectionTestSuite", + "signature": "type CollectionTestSuite struct", + "line": 23 + }, + { + "kind": "func", + "name": "TestCollection", + "signature": "func TestCollection(t *testing.T)", + "line": 27 + }, + { + "kind": "struct", + "name": "collectionNSResult", + "signature": "type collectionNSResult struct", + "line": 31 + }, + { + "kind": "func", + "name": "setupNS", + "signature": "func (s *CollectionTestSuite) setupNS(ctx context.Context, namespace string) collectionNSResult", + "line": 36 + }, + { + "kind": "func", + "name": "TestUncollectableCollection", + "signature": "func (s *CollectionTestSuite) TestUncollectableCollection()", + "line": 57 + }, + { + "kind": "func", + "name": "TestCollectionFlow", + "signature": "func (s *CollectionTestSuite) TestCollectionFlow()", + "line": 134 + }, + { + "kind": "func", + "name": "TestCollectionFlowWithFlatFeeOnly", + "signature": "func (s *CollectionTestSuite) TestCollectionFlowWithFlatFeeOnly()", + "line": 302 + }, + { + "kind": "func", + "name": "TestCollectionFlowWithFlatFeeEditing", + "signature": "func (s *CollectionTestSuite) TestCollectionFlowWithFlatFeeEditing()", + "line": 383 + }, + { + "kind": "func", + "name": "TestAnchoredAlignment_StandardInvoiceUsesLateEventWindow", + "signature": "func (s *CollectionTestSuite) TestAnchoredAlignment_StandardInvoiceUsesLateEventWindow()", + "line": 483 + }, + { + "kind": "func", + "name": "TestAnchoredAlignment_AutomaticCollectionWaitsForAnchor", + "signature": "func (s *CollectionTestSuite) TestAnchoredAlignment_AutomaticCollectionWaitsForAnchor()", + "line": 593 + }, + { + "kind": "func", + "name": "TestAnchoredAlignment_StandardInvoiceWaitsForLateEventWindowEvenPastAnchor", + "signature": "func (s *CollectionTestSuite) TestAnchoredAlignment_StandardInvoiceWaitsForLateEventWindowEvenPastAnchor()", + "line": 650 + }, + { + "kind": "func", + "name": "TestCollectionFlowWithUBPEditingExtendingCollectionPeriod", + "signature": "func (s *CollectionTestSuite) TestCollectionFlowWithUBPEditingExtendingCollectionPeriod()", + "line": 738 + } + ], + "line_count": 874 + }, + "test/billing/customeroverride_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/samber/lo\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerOverrideTestSuite", + "signature": "type CustomerOverrideTestSuite struct", + "line": 17 + }, + { + "kind": "func", + "name": "TestCustomerOverride", + "signature": "func TestCustomerOverride(t *testing.T)", + "line": 21 + }, + { + "kind": "func", + "name": "TestFetchNonExistingCustomer", + "signature": "func (s *CustomerOverrideTestSuite) TestFetchNonExistingCustomer()", + "line": 25 + }, + { + "kind": "func", + "name": "TestDefaultProfileHandling", + "signature": "func (s *CustomerOverrideTestSuite) TestDefaultProfileHandling()", + "line": 47 + }, + { + "kind": "func", + "name": "TestPinnedProfileHandling", + "signature": "func (s *CustomerOverrideTestSuite) TestPinnedProfileHandling()", + "line": 156 + }, + { + "kind": "func", + "name": "TestSanityOverrideOperations", + "signature": "func (s *CustomerOverrideTestSuite) TestSanityOverrideOperations()", + "line": 234 + }, + { + "kind": "func", + "name": "TestCustomerIntegration", + "signature": "func (s *CustomerOverrideTestSuite) TestCustomerIntegration()", + "line": 329 + }, + { + "kind": "func", + "name": "TestNullSetting", + "signature": "func (s *CustomerOverrideTestSuite) TestNullSetting()", + "line": 387 + }, + { + "kind": "func", + "name": "TestGetCustomerApp", + "signature": "func (s *CustomerOverrideTestSuite) TestGetCustomerApp()", + "line": 451 + }, + { + "kind": "func", + "name": "TestListCustomerOverrides", + "signature": "func (s *CustomerOverrideTestSuite) TestListCustomerOverrides()", + "line": 489 + } + ], + "line_count": 657 + }, + "test/billing/discount_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "DiscountsTestSuite", + "signature": "type DiscountsTestSuite struct", + "line": 24 + }, + { + "kind": "func", + "name": "TestDiscounts", + "signature": "func TestDiscounts(t *testing.T)", + "line": 28 + }, + { + "kind": "func", + "name": "TestCorrelationIDHandling", + "signature": "func (s *DiscountsTestSuite) TestCorrelationIDHandling()", + "line": 32 + }, + { + "kind": "func", + "name": "TestUnitDiscountProgressiveBilling", + "signature": "func (s *DiscountsTestSuite) TestUnitDiscountProgressiveBilling()", + "line": 211 + } + ], + "line_count": 442 + }, + "test/billing/event_test.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoicingEventTestSuite", + "signature": "type InvoicingEventTestSuite struct", + "line": 13 + }, + { + "kind": "func", + "name": "TestInvoicingEvent", + "signature": "func TestInvoicingEvent(t *testing.T)", + "line": 17 + }, + { + "kind": "func", + "name": "TestCreateInvoiceEvent", + "signature": "func (s *InvoicingEventTestSuite) TestCreateInvoiceEvent()", + "line": 21 + } + ], + "line_count": 53 + }, + "test/billing/invoice_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoicingTestSuite", + "signature": "type InvoicingTestSuite struct", + "line": 42 + }, + { + "kind": "func", + "name": "TestInvoicing", + "signature": "func TestInvoicing(t *testing.T)", + "line": 46 + }, + { + "kind": "func", + "name": "TestPendingLineCreation", + "signature": "func (s *InvoicingTestSuite) TestPendingLineCreation()", + "line": 50 + }, + { + "kind": "func", + "name": "TestCreateInvoice", + "signature": "func (s *InvoicingTestSuite) TestCreateInvoice()", + "line": 389 + }, + { + "kind": "func", + "name": "TestListGatheringInvoices_CollectionAtFilterExcludesNilCollectionAt", + "signature": "func (s *InvoicingTestSuite) TestListGatheringInvoices_CollectionAtFilterExcludesNilCollectionAt()", + "line": 642 + }, + { + "kind": "func", + "name": "TestInvoicingFlow", + "signature": "func (s *InvoicingTestSuite) TestInvoicingFlow()", + "line": 701 + }, + { + "kind": "func", + "name": "TestPaymentProcessingEnteredAt", + "signature": "func (s *InvoicingTestSuite) TestPaymentProcessingEnteredAt()", + "line": 911 + }, + { + "kind": "func", + "name": "TestStatusDetailsSimulationDoesNotMutatePaymentProcessingTimestamp", + "signature": "func (s *InvoicingTestSuite) TestStatusDetailsSimulationDoesNotMutatePaymentProcessingTimestamp()", + "line": 968 + }, + { + "kind": "interface", + "name": "ValidationIssueIntrospector", + "signature": "type ValidationIssueIntrospector interface", + "line": 1029 + }, + { + "kind": "func", + "name": "TestInvoicingFlowErrorHandling", + "signature": "func (s *InvoicingTestSuite) TestInvoicingFlowErrorHandling()", + "line": 1033 + }, + { + "kind": "func", + "name": "TestBillingProfileChange", + "signature": "func (s *InvoicingTestSuite) TestBillingProfileChange()", + "line": 1377 + }, + { + "kind": "func", + "name": "TestUBPProgressiveInvoicing", + "signature": "func (s *InvoicingTestSuite) TestUBPProgressiveInvoicing()", + "line": 1426 + }, + { + "kind": "func", + "name": "TestUBPGraduatingFlatFeeTier1", + "signature": "func (s *InvoicingTestSuite) TestUBPGraduatingFlatFeeTier1()", + "line": 2363 + }, + { + "kind": "func", + "name": "TestUBPNonProgressiveInvoicing", + "signature": "func (s *InvoicingTestSuite) TestUBPNonProgressiveInvoicing()", + "line": 2605 + }, + { + "kind": "func", + "name": "lineInSameSplitLineGroup", + "signature": "func (s *InvoicingTestSuite) lineInSameSplitLineGroup(lines []*billing.StandardLine, shiblingLineID string) *billing.StandardLine", + "line": 3031 + }, + { + "kind": "func", + "name": "lineByID", + "signature": "func (s *InvoicingTestSuite) lineByID(lines []*billing.StandardLine, id string) *billing.StandardLine", + "line": 3050 + }, + { + "kind": "func", + "name": "sortedSplitLineGroupChildren", + "signature": "func (s *InvoicingTestSuite) sortedSplitLineGroupChildren(line *billing.StandardLine)", + "line": 3062 + }, + { + "kind": "struct", + "name": "ubpPendingLines", + "signature": "type ubpPendingLines struct", + "line": 3077 + }, + { + "kind": "struct", + "name": "ubpFeatures", + "signature": "type ubpFeatures struct", + "line": 3084 + }, + { + "kind": "struct", + "name": "lineExpectations", + "signature": "type lineExpectations struct", + "line": 3091 + }, + { + "kind": "struct", + "name": "feeLineExpect", + "signature": "type feeLineExpect struct", + "line": 3095 + }, + { + "kind": "func", + "name": "requireDetailedLines", + "signature": "func requireDetailedLines(t *testing.T, line *billing.StandardLine, expectations lineExpectations)", + "line": 3101 + }, + { + "kind": "struct", + "name": "expectedTotals", + "signature": "type expectedTotals struct", + "line": 3133 + }, + { + "kind": "func", + "name": "requireTotals", + "signature": "func requireTotals(t *testing.T, expected expectedTotals, totals totals.Totals)", + "line": 3152 + }, + { + "kind": "func", + "name": "TestGatheringInvoiceRecalculation", + "signature": "func (s *InvoicingTestSuite) TestGatheringInvoiceRecalculation()", + "line": 3167 + }, + { + "kind": "func", + "name": "TestEmptyInvoiceGenerationZeroUsage", + "signature": "func (s *InvoicingTestSuite) TestEmptyInvoiceGenerationZeroUsage()", + "line": 3338 + }, + { + "kind": "func", + "name": "TestEmptyInvoiceGenerationZeroPrice", + "signature": "func (s *InvoicingTestSuite) TestEmptyInvoiceGenerationZeroPrice()", + "line": 3457 + }, + { + "kind": "func", + "name": "TestNamespaceLockedGatheringInvoiceCreation", + "signature": "func (s *InvoicingTestSuite) TestNamespaceLockedGatheringInvoiceCreation()", + "line": 3584 + }, + { + "kind": "func", + "name": "TestNamespaceLockedInvoiceProgression", + "signature": "func (s *InvoicingTestSuite) TestNamespaceLockedInvoiceProgression()", + "line": 3612 + }, + { + "kind": "func", + "name": "TestProgressiveBillLate", + "signature": "func (s *InvoicingTestSuite) TestProgressiveBillLate()", + "line": 3654 + }, + { + "kind": "func", + "name": "TestPartialInvoiceLinesOptions", + "signature": "func (s *InvoicingTestSuite) TestPartialInvoiceLinesOptions()", + "line": 3746 + }, + { + "kind": "func", + "name": "TestSortLines", + "signature": "func (s *InvoicingTestSuite) TestSortLines()", + "line": 3856 + }, + { + "kind": "func", + "name": "TestGatheringInvoicePeriodPersisting", + "signature": "func (s *InvoicingTestSuite) TestGatheringInvoicePeriodPersisting()", + "line": 3993 + }, + { + "kind": "func", + "name": "TestCreatePendingInvoiceLinesForDeletedCustomers", + "signature": "func (s *InvoicingTestSuite) TestCreatePendingInvoiceLinesForDeletedCustomers()", + "line": 4093 + }, + { + "kind": "func", + "name": "TestSnapshotQuantityInvalidDatabaseState", + "signature": "func (s *InvoicingTestSuite) TestSnapshotQuantityInvalidDatabaseState()", + "line": 4175 + }, + { + "kind": "func", + "name": "TestGatheringInvoiceEmulation", + "signature": "func (s *InvoicingTestSuite) TestGatheringInvoiceEmulation()", + "line": 4318 + }, + { + "kind": "func", + "name": "TestUpdateInvoice", + "signature": "func (s *InvoicingTestSuite) TestUpdateInvoice()", + "line": 4388 + } + ], + "line_count": 4640 + }, + "test/billing/lineengine_test.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "LineEngineTestSuite", + "signature": "type LineEngineTestSuite struct", + "line": 29 + }, + { + "kind": "func", + "name": "TestLineEngine", + "signature": "func TestLineEngine(t *testing.T)", + "line": 33 + }, + { + "kind": "struct", + "name": "mockCollectionCompletedLineEngine", + "signature": "type mockCollectionCompletedLineEngine struct", + "line": 37 + }, + { + "kind": "func", + "name": "mustAsNewStandardLines", + "signature": "func mustAsNewStandardLines(input ombilling.BuildStandardInvoiceLinesInput) ombilling.StandardLines", + "line": 51 + }, + { + "kind": "func", + "name": "GetLineEngineType", + "signature": "func (m *mockCollectionCompletedLineEngine) GetLineEngineType() ombilling.LineEngineType", + "line": 65 + }, + { + "kind": "func", + "name": "IsLineBillableAsOf", + "signature": "func (m *mockCollectionCompletedLineEngine) IsLineBillableAsOf(_ context.Context, input ombilling.IsLineBillableAsOfInput) (bool, error)", + "line": 73 + }, + { + "kind": "func", + "name": "SplitGatheringLine", + "signature": "func (m *mockCollectionCompletedLineEngine) SplitGatheringLine(_ context.Context, _ ombilling.SplitGatheringLineInput) (ombilling.SplitGatheringLineResult, error)", + "line": 77 + }, + { + "kind": "func", + "name": "BuildStandardInvoiceLines", + "signature": "func (m *mockCollectionCompletedLineEngine) BuildStandardInvoiceLines(ctx context.Context, input ombilling.BuildStandardInvoiceLinesInput) (ombilling.StandardLines, error)", + "line": 81 + }, + { + "kind": "func", + "name": "BuildStandardLinesForGatheringPreview", + "signature": "func (m *mockCollectionCompletedLineEngine) BuildStandardLinesForGatheringPreview(ctx context.Context, input ombilling.BuildStandardInvoiceLinesInput) (ombilling.StandardLines, error)", + "line": 89 + }, + { + "kind": "func", + "name": "OnCollectionCompleted", + "signature": "func (m *mockCollectionCompletedLineEngine) OnCollectionCompleted(ctx context.Context, input ombilling.OnCollectionCompletedInput) (ombilling.StandardLines, error)", + "line": 97 + }, + { + "kind": "func", + "name": "OnStandardInvoiceCreated", + "signature": "func (m *mockCollectionCompletedLineEngine) OnStandardInvoiceCreated(ctx context.Context, input ombilling.OnStandardInvoiceCreatedInput) (ombilling.StandardLines, error)", + "line": 105 + }, + { + "kind": "func", + "name": "OnMutableStandardLinesDeleted", + "signature": "func (m *mockCollectionCompletedLineEngine) OnMutableStandardLinesDeleted(ctx context.Context, input ombilling.OnMutableStandardLinesDeletedInput) error", + "line": 113 + }, + { + "kind": "func", + "name": "OnUnsupportedCreditNote", + "signature": "func (m *mockCollectionCompletedLineEngine) OnUnsupportedCreditNote(ctx context.Context, input ombilling.OnUnsupportedCreditNoteInput) error", + "line": 121 + }, + { + "kind": "func", + "name": "OnInvoiceIssued", + "signature": "func (m *mockCollectionCompletedLineEngine) OnInvoiceIssued(ctx context.Context, input ombilling.OnInvoiceIssuedInput) error", + "line": 129 + }, + { + "kind": "func", + "name": "OnPaymentAuthorized", + "signature": "func (m *mockCollectionCompletedLineEngine) OnPaymentAuthorized(ctx context.Context, input ombilling.OnPaymentAuthorizedInput) error", + "line": 137 + }, + { + "kind": "func", + "name": "OnPaymentSettled", + "signature": "func (m *mockCollectionCompletedLineEngine) OnPaymentSettled(ctx context.Context, input ombilling.OnPaymentSettledInput) error", + "line": 145 + }, + { + "kind": "func", + "name": "CalculateLines", + "signature": "func (m *mockCollectionCompletedLineEngine) CalculateLines(input ombilling.CalculateLinesInput) (ombilling.StandardLines, error)", + "line": 153 + }, + { + "kind": "func", + "name": "Reset", + "signature": "func (m *mockCollectionCompletedLineEngine) Reset()", + "line": 157 + }, + { + "kind": "func", + "name": "registerMockLineEngine", + "signature": "func (s *LineEngineTestSuite) registerMockLineEngine(t *testing.T, engine ombilling.LineEngine)", + "line": 163 + }, + { + "kind": "func", + "name": "unregisterLineEngine", + "signature": "func (s *LineEngineTestSuite) unregisterLineEngine(t *testing.T, engine ombilling.LineEngine)", + "line": 168 + }, + { + "kind": "func", + "name": "createMeteredDraftInvoiceWaitingForCollection", + "signature": "func (s *LineEngineTestSuite) createMeteredDraftInvoiceWaitingForCollection(\n\tctx context.Context,\n\tnamespace string,\n\tengineType ombilling.LineEngineType,\n\tlineName string,\n) (ombilling.StandardInvoice, time.Time)", + "line": 173 + }, + { + "kind": "func", + "name": "createMeteredDraftInvoiceWaitingForCollectionForApp", + "signature": "func (s *LineEngineTestSuite) createMeteredDraftInvoiceWaitingForCollectionForApp(\n\tctx context.Context,\n\tnamespace string,\n\tappID app.AppID,\n\tengineType ombilling.LineEngineType,\n\tlineName string,\n) (ombilling.StandardInvoice, time.Time)", + "line": 184 + }, + { + "kind": "func", + "name": "markInvoicePaid", + "signature": "func (s *LineEngineTestSuite) markInvoicePaid(ctx context.Context, invoiceID ombilling.InvoiceID) ombilling.StandardInvoice", + "line": 265 + }, + { + "kind": "func", + "name": "markInvoiceAuthorized", + "signature": "func (s *LineEngineTestSuite) markInvoiceAuthorized(ctx context.Context, invoiceID ombilling.InvoiceID) ombilling.StandardInvoice", + "line": 285 + }, + { + "kind": "func", + "name": "mustGetInvoiceAppType", + "signature": "func (s *LineEngineTestSuite) mustGetInvoiceAppType(ctx context.Context, invoiceID ombilling.InvoiceID) app.AppType", + "line": 305 + }, + { + "kind": "func", + "name": "TestGatheringPreviewUsesPreviewLineEngineCallback", + "signature": "func (s *LineEngineTestSuite) TestGatheringPreviewUsesPreviewLineEngineCallback()", + "line": 324 + }, + { + "kind": "func", + "name": "TestCollectionCompletedErrorsBecomeValidationIssues", + "signature": "func (s *LineEngineTestSuite) TestCollectionCompletedErrorsBecomeValidationIssues()", + "line": 427 + }, + { + "kind": "func", + "name": "TestCollectionCompletedCustomSnapshotIsPreserved", + "signature": "func (s *LineEngineTestSuite) TestCollectionCompletedCustomSnapshotIsPreserved()", + "line": 484 + }, + { + "kind": "func", + "name": "TestOnInvoiceIssuedIsCalled", + "signature": "func (s *LineEngineTestSuite) TestOnInvoiceIssuedIsCalled()", + "line": 554 + }, + { + "kind": "func", + "name": "TestOnInvoiceIssuedFailureTransitionsToRetryableIssuingState", + "signature": "func (s *LineEngineTestSuite) TestOnInvoiceIssuedFailureTransitionsToRetryableIssuingState()", + "line": 630 + }, + { + "kind": "func", + "name": "TestOnPaymentAuthorizedIsCalled", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentAuthorizedIsCalled()", + "line": 730 + }, + { + "kind": "func", + "name": "TestOnPaymentAuthorizedFailureTransitionsToRetryablePaymentState", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentAuthorizedFailureTransitionsToRetryablePaymentState()", + "line": 826 + }, + { + "kind": "func", + "name": "TestOnPaymentSettledIsCalled", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentSettledIsCalled()", + "line": 935 + }, + { + "kind": "func", + "name": "TestOnPaymentSettledFailureTransitionsToRetryablePaymentState", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentSettledFailureTransitionsToRetryablePaymentState()", + "line": 1026 + }, + { + "kind": "func", + "name": "TestOnPaymentSettledIsCalledAfterAuthorization", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentSettledIsCalledAfterAuthorization()", + "line": 1131 + }, + { + "kind": "func", + "name": "TestOnPaymentSettledFailureAfterAuthorizationTransitionsToRetryablePaymentState", + "signature": "func (s *LineEngineTestSuite) TestOnPaymentSettledFailureAfterAuthorizationTransitionsToRetryablePaymentState()", + "line": 1224 + } + ], + "line_count": 1328 + }, + "test/billing/profile.go": { + "header": "\t\"github.com/samber/lo\"\n\t\"github.com/openmeterio/openmeter/openmeter/app\"\n\t\"github.com/openmeterio/openmeter/openmeter/billing\"", + "symbols": [ + { + "kind": "func", + "name": "minimalCreateProfileInputTemplate", + "signature": "func minimalCreateProfileInputTemplate(appID app.AppID) billing.CreateProfileInput", + "line": 12 + } + ], + "line_count": 51 + }, + "test/billing/profile_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "ProfileTestSuite", + "signature": "type ProfileTestSuite struct", + "line": 19 + }, + { + "kind": "func", + "name": "TestProfile", + "signature": "func TestProfile(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "createProfileFixture", + "signature": "func (s *ProfileTestSuite) createProfileFixture(isDefault bool) *billing.Profile", + "line": 29 + }, + { + "kind": "func", + "name": "TestProfileLifecycle", + "signature": "func (s *ProfileTestSuite) TestProfileLifecycle()", + "line": 55 + }, + { + "kind": "func", + "name": "TestProfileFieldSetting", + "signature": "func (s *ProfileTestSuite) TestProfileFieldSetting()", + "line": 244 + }, + { + "kind": "func", + "name": "TestProfileUpdates", + "signature": "func (s *ProfileTestSuite) TestProfileUpdates()", + "line": 350 + }, + { + "kind": "func", + "name": "TestProfileSubscriptionAlignmentPersists", + "signature": "func (s *ProfileTestSuite) TestProfileSubscriptionAlignmentPersists()", + "line": 481 + }, + { + "kind": "func", + "name": "toUpdateProfileInput", + "signature": "func toUpdateProfileInput(profile billing.Profile) billing.UpdateProfileInput", + "line": 506 + } + ], + "line_count": 519 + }, + "test/billing/schemamigration_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "SchemaMigrationTestSuite", + "signature": "type SchemaMigrationTestSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "TestSchemaMigration", + "signature": "func TestSchemaMigration(t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *SchemaMigrationTestSuite) SetupSuite()", + "line": 36 + }, + { + "kind": "func", + "name": "TestSchemaLevel1Migration", + "signature": "func (s *SchemaMigrationTestSuite) TestSchemaLevel1Migration()", + "line": 40 + }, + { + "kind": "func", + "name": "markAllDetailedChildrenDeleted", + "signature": "func (s *SchemaMigrationTestSuite) markAllDetailedChildrenDeleted(ctx context.Context, ns string, invoiceID string, parentLineName string, deletedAt time.Time) (int, error)", + "line": 256 + }, + { + "kind": "func", + "name": "withoutDetailedFeeLineConfigID", + "signature": "func (s *SchemaMigrationTestSuite) withoutDetailedFeeLineConfigID(in *billing.StandardLine) (*billing.StandardLine, error)", + "line": 284 + }, + { + "kind": "func", + "name": "getLineByName", + "signature": "func (s *SchemaMigrationTestSuite) getLineByName(inv billing.StandardInvoice, name string) *billing.StandardLine", + "line": 300 + } + ], + "line_count": 309 + }, + "test/billing/subscription_suite.go": { + "header": "\t\"errors\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionMixin", + "signature": "type SubscriptionMixin struct", + "line": 55 + }, + { + "kind": "struct", + "name": "SubscriptionMixInDependencies", + "signature": "type SubscriptionMixInDependencies struct", + "line": 64 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (d SubscriptionMixInDependencies) Validate() error", + "line": 75 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *SubscriptionMixin) SetupSuite(t *testing.T, deps SubscriptionMixInDependencies)", + "line": 103 + }, + { + "kind": "func", + "name": "SetupEntitlements", + "signature": "func (s *SubscriptionMixin) SetupEntitlements(t *testing.T, deps SubscriptionMixInDependencies) entitlement.Service", + "line": 234 + } + ], + "line_count": 324 + }, + "test/billing/subscription_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "SubscriptionTestSuite", + "signature": "type SubscriptionTestSuite struct", + "line": 31 + }, + { + "kind": "func", + "name": "TestSubscription", + "signature": "func TestSubscription(t *testing.T)", + "line": 38 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *SubscriptionTestSuite) SetupSuite()", + "line": 42 + }, + { + "kind": "func", + "name": "TestDefaultProfileChange", + "signature": "func (s *SubscriptionTestSuite) TestDefaultProfileChange()", + "line": 65 + }, + { + "kind": "func", + "name": "createCustomerWithSubscription", + "signature": "func (s *SubscriptionTestSuite) createCustomerWithSubscription(ctx context.Context, namespace string, customerKey string, plan subscription.Plan) *customer.Customer", + "line": 307 + }, + { + "kind": "func", + "name": "listGatheringLines", + "signature": "func (s *SubscriptionTestSuite) listGatheringLines(ctx context.Context, namespace string, customerID string) []billing.GatheringLine", + "line": 338 + }, + { + "kind": "func", + "name": "nonDeletedGatheringLinesForSubscription", + "signature": "func nonDeletedGatheringLinesForSubscription(lines []billing.GatheringLine, subscriptionID string) []billing.GatheringLine", + "line": 354 + } + ], + "line_count": 358 + }, + "test/billing/suite.go": { + "header": "\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"", + "symbols": [ + { + "kind": "struct", + "name": "BaseSuite", + "signature": "type BaseSuite struct", + "line": 66 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *BaseSuite) TearDownTest()", + "line": 92 + }, + { + "kind": "func", + "name": "GetUniqueNamespace", + "signature": "func (s *BaseSuite) GetUniqueNamespace(prefix string) string", + "line": 98 + }, + { + "kind": "func", + "name": "GetSubscriptionMixInDependencies", + "signature": "func (b *BaseSuite) GetSubscriptionMixInDependencies() SubscriptionMixInDependencies", + "line": 102 + }, + { + "kind": "struct", + "name": "SetupSuiteOptions", + "signature": "type SetupSuiteOptions struct", + "line": 113 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *BaseSuite) SetupSuite()", + "line": 117 + }, + { + "kind": "func", + "name": "setupSuite", + "signature": "func (s *BaseSuite) setupSuite(opts SetupSuiteOptions)", + "line": 121 + }, + { + "kind": "func", + "name": "InstallSandboxApp", + "signature": "func (s *BaseSuite) InstallSandboxApp(t *testing.T, ns string) app.App", + "line": 302 + }, + { + "kind": "func", + "name": "CreateTestCustomer", + "signature": "func (s *BaseSuite) CreateTestCustomer(ns string, subjectKey string) *customer.Customer", + "line": 323 + }, + { + "kind": "func", + "name": "TearDownSuite", + "signature": "func (s *BaseSuite) TearDownSuite()", + "line": 347 + }, + { + "kind": "func", + "name": "DebugDumpInvoice", + "signature": "func (s *BaseSuite) DebugDumpInvoice(h string, i billing.GenericInvoiceReader)", + "line": 352 + }, + { + "kind": "func", + "name": "DebugDumpStandardInvoice", + "signature": "func (s *BaseSuite) DebugDumpStandardInvoice(h string, i billing.StandardInvoice)", + "line": 371 + }, + { + "kind": "func", + "name": "DebugDumpGatheringInvoice", + "signature": "func (s *BaseSuite) DebugDumpGatheringInvoice(h string, i billing.GatheringInvoice)", + "line": 404 + }, + { + "kind": "struct", + "name": "DraftInvoiceInput", + "signature": "type DraftInvoiceInput struct", + "line": 435 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i DraftInvoiceInput) Validate() error", + "line": 440 + }, + { + "kind": "func", + "name": "CreateGatheringInvoice", + "signature": "func (s *BaseSuite) CreateGatheringInvoice(t *testing.T, ctx context.Context, in DraftInvoiceInput)", + "line": 456 + }, + { + "kind": "func", + "name": "CreateDraftInvoice", + "signature": "func (s *BaseSuite) CreateDraftInvoice(t *testing.T, ctx context.Context, in DraftInvoiceInput) billing.StandardInvoice", + "line": 513 + }, + { + "kind": "struct", + "name": "TestFeature", + "signature": "type TestFeature struct", + "line": 534 + }, + { + "kind": "func", + "name": "SetupApiRequestsTotalFeature", + "signature": "func (s *BaseSuite) SetupApiRequestsTotalFeature(ctx context.Context, ns string) TestFeature", + "line": 539 + }, + { + "kind": "struct", + "name": "BillingProfileProvisionOptions", + "signature": "type BillingProfileProvisionOptions struct", + "line": 589 + }, + { + "kind": "func", + "name": "WithBillingProfileEditFn", + "signature": "func WithBillingProfileEditFn(editFn BillingProfileEditFn) BillingProfileProvisionOption", + "line": 595 + }, + { + "kind": "func", + "name": "WithProgressiveBilling", + "signature": "func WithProgressiveBilling() BillingProfileProvisionOption", + "line": 601 + }, + { + "kind": "func", + "name": "WithCollectionInterval", + "signature": "func WithCollectionInterval(period datetime.ISODuration) BillingProfileProvisionOption", + "line": 607 + }, + { + "kind": "func", + "name": "WithManualApproval", + "signature": "func WithManualApproval() BillingProfileProvisionOption", + "line": 613 + }, + { + "kind": "func", + "name": "ProvisionBillingProfile", + "signature": "func (s *BaseSuite) ProvisionBillingProfile(ctx context.Context, ns string, appID app.AppID, opts ...BillingProfileProvisionOption) *billing.Profile", + "line": 619 + }, + { + "kind": "func", + "name": "ProvisionDefaultTaxCodes", + "signature": "func (s *BaseSuite) ProvisionDefaultTaxCodes(ctx context.Context, ns string) taxcode.OrganizationDefaultTaxCodes", + "line": 644 + }, + { + "kind": "struct", + "name": "SetupCustomInvoicingResponse", + "signature": "type SetupCustomInvoicingResponse struct", + "line": 670 + }, + { + "kind": "struct", + "name": "setupCustomInvoicingOptions", + "signature": "type setupCustomInvoicingOptions struct", + "line": 673 + }, + { + "kind": "func", + "name": "WithCustomInvoicingConfig", + "signature": "func WithCustomInvoicingConfig(config appcustominvoicing.Configuration) setupCustomInvoicingOption", + "line": 679 + }, + { + "kind": "func", + "name": "SetupCustomInvoicingApp", + "signature": "func (s *BaseSuite) SetupCustomInvoicingApp() appcustominvoicing.Service", + "line": 685 + }, + { + "kind": "func", + "name": "SetupCustomInvoicing", + "signature": "func (s *BaseSuite) SetupCustomInvoicing(namespace string, opts ...setupCustomInvoicingOption) SetupCustomInvoicingResponse", + "line": 712 + }, + { + "kind": "func", + "name": "ExpectJSONEqual", + "signature": "func ExpectJSONEqual(t *testing.T, exp, actual any)", + "line": 744 + }, + { + "kind": "struct", + "name": "ExpectedTotals", + "signature": "type ExpectedTotals struct", + "line": 756 + }, + { + "kind": "func", + "name": "RequireTotals", + "signature": "func (s *BaseSuite) RequireTotals(expected ExpectedTotals, actual totals.Totals)", + "line": 767 + }, + { + "kind": "func", + "name": "AssertTotals", + "signature": "func (s *BaseSuite) AssertTotals(expected ExpectedTotals, actual totals.Totals)", + "line": 773 + }, + { + "kind": "func", + "name": "AssertTotals", + "signature": "func AssertTotals(t *testing.T, expected ExpectedTotals, actual totals.Totals)", + "line": 779 + }, + { + "kind": "func", + "name": "totalsToExpected", + "signature": "func totalsToExpected(actual totals.Totals) ExpectedTotals", + "line": 785 + }, + { + "kind": "func", + "name": "AssertDecimalEqual", + "signature": "func (s *BaseSuite) AssertDecimalEqual(expected, actual alpacadecimal.Decimal, label string)", + "line": 798 + } + ], + "line_count": 802 + }, + "test/billing/tax_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "InvoicingTaxTestSuite", + "signature": "type InvoicingTaxTestSuite struct", + "line": 28 + }, + { + "kind": "func", + "name": "TestInvoicingTax", + "signature": "func TestInvoicingTax(t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "TestDefaultTaxConfigProfileSnapshotting", + "signature": "func (s *InvoicingTaxTestSuite) TestDefaultTaxConfigProfileSnapshotting()", + "line": 36 + }, + { + "kind": "func", + "name": "TestLineSplittingRetainsTaxConfig", + "signature": "func (s *InvoicingTaxTestSuite) TestLineSplittingRetainsTaxConfig()", + "line": 146 + }, + { + "kind": "func", + "name": "generateDraftInvoice", + "signature": "func (s *InvoicingTaxTestSuite) generateDraftInvoice(ctx context.Context, customer *customer.Customer) billing.StandardInvoice", + "line": 291 + } + ], + "line_count": 328 + }, + "test/billing/taxcode_dual_write_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "TaxCodeDualWriteTestSuite", + "signature": "type TaxCodeDualWriteTestSuite struct", + "line": 23 + }, + { + "kind": "func", + "name": "TestTaxCodeDualWrite", + "signature": "func TestTaxCodeDualWrite(t *testing.T)", + "line": 27 + }, + { + "kind": "func", + "name": "assertTaxConfigHasStripeCode", + "signature": "func (s *TaxCodeDualWriteTestSuite) assertTaxConfigHasStripeCode(cfg *productcatalog.TaxConfig, wantCode string)", + "line": 34 + }, + { + "kind": "func", + "name": "assertInvoiceLineTaxCode", + "signature": "func (s *TaxCodeDualWriteTestSuite) assertInvoiceLineTaxCode(line *billing.StandardLine, wantCode string)", + "line": 44 + }, + { + "kind": "func", + "name": "TestProfileCreateWritesTaxCodeFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileCreateWritesTaxCodeFK()", + "line": 59 + }, + { + "kind": "func", + "name": "TestProfileCreateBehaviorOnlyNoFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileCreateBehaviorOnlyNoFK()", + "line": 84 + }, + { + "kind": "func", + "name": "TestProfileCreateNilTaxConfigNoFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileCreateNilTaxConfigNoFK()", + "line": 107 + }, + { + "kind": "func", + "name": "TestProfileUpdateClearsTaxCodeFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateClearsTaxCodeFK()", + "line": 120 + }, + { + "kind": "func", + "name": "TestProfileUpdateRMWClearStripeHonorsTaxCodeID", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateRMWClearStripeHonorsTaxCodeID()", + "line": 156 + }, + { + "kind": "func", + "name": "TestProfileUpdateToNilClearsBothColumns", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateToNilClearsBothColumns()", + "line": 193 + }, + { + "kind": "func", + "name": "TestProfileTaxCodeIdempotent", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileTaxCodeIdempotent()", + "line": 215 + }, + { + "kind": "func", + "name": "TestOverrideUpsertWritesTaxCodeFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestOverrideUpsertWritesTaxCodeFK()", + "line": 249 + }, + { + "kind": "func", + "name": "TestOverrideUpdateClearsTaxCodeFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestOverrideUpdateClearsTaxCodeFK()", + "line": 281 + }, + { + "kind": "func", + "name": "TestOverrideDeleteLeavesNoStaleFK", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestOverrideDeleteLeavesNoStaleFK()", + "line": 328 + }, + { + "kind": "func", + "name": "TestEmptyStripeCodeIsNoOp", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestEmptyStripeCodeIsNoOp()", + "line": 365 + }, + { + "kind": "func", + "name": "TestResolveDefaultTaxCodeIdempotentOnUpdate", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestResolveDefaultTaxCodeIdempotentOnUpdate()", + "line": 394 + }, + { + "kind": "func", + "name": "TestProfileUpdateTaxCodeIDWinsOverStaleStripeCode", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateTaxCodeIDWinsOverStaleStripeCode()", + "line": 433 + }, + { + "kind": "func", + "name": "TestProfileUpdateClearTaxCodeIDTriggersStripeResolution", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateClearTaxCodeIDTriggersStripeResolution()", + "line": 478 + }, + { + "kind": "func", + "name": "TestProfileUpdateBareTaxCodeIDIsHonored", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileUpdateBareTaxCodeIDIsHonored()", + "line": 522 + }, + { + "kind": "func", + "name": "TestSnapshotTaxCodeIntoLinesOnAdvance", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestSnapshotTaxCodeIntoLinesOnAdvance()", + "line": 563 + }, + { + "kind": "func", + "name": "TestSnapshotLineOwnCodeTakesPrecedence", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestSnapshotLineOwnCodeTakesPrecedence()", + "line": 611 + }, + { + "kind": "func", + "name": "TestSnapshotPreservesExistingTaxCodeID", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestSnapshotPreservesExistingTaxCodeID()", + "line": 665 + }, + { + "kind": "func", + "name": "TestSimulateInvoiceReadOnly", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestSimulateInvoiceReadOnly()", + "line": 728 + }, + { + "kind": "func", + "name": "TestProfileMergeBothCodeProfileWins", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileMergeBothCodeProfileWins()", + "line": 777 + }, + { + "kind": "func", + "name": "TestProfileMergeFieldByField", + "signature": "func (s *TaxCodeDualWriteTestSuite) TestProfileMergeFieldByField()", + "line": 820 + } + ], + "line_count": 853 + }, + "test/billing/ubpflatfee_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "struct", + "name": "UBPFlatFeeLineTestSuite", + "signature": "type UBPFlatFeeLineTestSuite struct", + "line": 19 + }, + { + "kind": "func", + "name": "TestUBPFlatFeeLine", + "signature": "func TestUBPFlatFeeLine(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "TestPendingLineCreation", + "signature": "func (s *UBPFlatFeeLineTestSuite) TestPendingLineCreation()", + "line": 27 + }, + { + "kind": "func", + "name": "TestPercentageDiscount", + "signature": "func (s *UBPFlatFeeLineTestSuite) TestPercentageDiscount()", + "line": 139 + }, + { + "kind": "func", + "name": "TestValidations", + "signature": "func (s *UBPFlatFeeLineTestSuite) TestValidations()", + "line": 221 + } + ], + "line_count": 284 + }, + "test/credits/base.go": { + "header": "\t\"context\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "BaseSuite", + "signature": "type BaseSuite struct", + "line": 47 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *BaseSuite) SetupSuite()", + "line": 64 + }, + { + "kind": "func", + "name": "TearDownTest", + "signature": "func (s *BaseSuite) TearDownTest()", + "line": 171 + }, + { + "kind": "struct", + "name": "CreateMockChargeIntentInput", + "signature": "type CreateMockChargeIntentInput struct", + "line": 177 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i *CreateMockChargeIntentInput) Validate() error", + "line": 191 + }, + { + "kind": "func", + "name": "CreateMockChargeIntent", + "signature": "func (s *BaseSuite) CreateMockChargeIntent(input CreateMockChargeIntentInput) charges.ChargeIntent", + "line": 211 + }, + { + "kind": "func", + "name": "CreateLedgerBackedCustomer", + "signature": "func (s *BaseSuite) CreateLedgerBackedCustomer(ns string, subjectKey string) *customer.Customer", + "line": 272 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalance", + "signature": "func (s *BaseSuite) MustCustomerFBOBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 288 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalanceWithPriority", + "signature": "func (s *BaseSuite) MustCustomerFBOBalanceWithPriority(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], priority int) alpacadecimal.Decimal", + "line": 296 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalanceAsOf", + "signature": "func (s *BaseSuite) MustCustomerFBOBalanceAsOf(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], asOf time.Time) alpacadecimal.Decimal", + "line": 300 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalanceWithPriorityAsOf", + "signature": "func (s *BaseSuite) MustCustomerFBOBalanceWithPriorityAsOf(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], priority int, asOf *time.Time) alpacadecimal.Decimal", + "line": 304 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalanceForFeatures", + "signature": "func (s *BaseSuite) MustCustomerFBOBalanceForFeatures(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], features mo.Option[[]string]) alpacadecimal.Decimal", + "line": 325 + }, + { + "kind": "func", + "name": "MustCustomerFBOBalanceWithPriorityForFeatures", + "signature": "func (s *BaseSuite) MustCustomerFBOBalanceWithPriorityForFeatures(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], priority int, features mo.Option[[]string]) alpacadecimal.Decimal", + "line": 329 + }, + { + "kind": "func", + "name": "MustCustomerReceivableBalance", + "signature": "func (s *BaseSuite) MustCustomerReceivableBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], status ledger.TransactionAuthorizationStatus) alpacadecimal.Decimal", + "line": 349 + }, + { + "kind": "func", + "name": "MustCustomerReceivableBalanceForTaxCode", + "signature": "func (s *BaseSuite) MustCustomerReceivableBalanceForTaxCode(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], status ledger.TransactionAuthorizationStatus, taxCode mo.Option[*string]) alpacadecimal.Decimal", + "line": 367 + }, + { + "kind": "func", + "name": "MustCustomerAccruedBalanceForTaxCode", + "signature": "func (s *BaseSuite) MustCustomerAccruedBalanceForTaxCode(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], taxCode mo.Option[*string]) alpacadecimal.Decimal", + "line": 385 + }, + { + "kind": "func", + "name": "MustCustomerAccruedBalanceForTaxConfig", + "signature": "func (s *BaseSuite) MustCustomerAccruedBalanceForTaxConfig(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], taxCode mo.Option[*string], taxBehavior mo.Option[*ledger.TaxBehavior]) alpacadecimal.Decimal", + "line": 403 + }, + { + "kind": "func", + "name": "MustCustomerAccruedBalance", + "signature": "func (s *BaseSuite) MustCustomerAccruedBalance(customerID customer.CustomerID, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 423 + }, + { + "kind": "func", + "name": "MustWashBalance", + "signature": "func (s *BaseSuite) MustWashBalance(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 441 + }, + { + "kind": "func", + "name": "MustEarningsBalance", + "signature": "func (s *BaseSuite) MustEarningsBalance(namespace string, code currencyx.Code) alpacadecimal.Decimal", + "line": 456 + }, + { + "kind": "func", + "name": "MustEarningsBalanceForCostBasis", + "signature": "func (s *BaseSuite) MustEarningsBalanceForCostBasis(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal]) alpacadecimal.Decimal", + "line": 463 + }, + { + "kind": "func", + "name": "MustBreakageBalanceAsOf", + "signature": "func (s *BaseSuite) MustBreakageBalanceAsOf(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], asOf time.Time) alpacadecimal.Decimal", + "line": 478 + }, + { + "kind": "func", + "name": "MustEarningsBalanceForTaxCode", + "signature": "func (s *BaseSuite) MustEarningsBalanceForTaxCode(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], taxCode mo.Option[*string]) alpacadecimal.Decimal", + "line": 494 + }, + { + "kind": "struct", + "name": "LedgerSnapshotInput", + "signature": "type LedgerSnapshotInput struct", + "line": 510 + }, + { + "kind": "struct", + "name": "LedgerSnapshot", + "signature": "type LedgerSnapshot struct", + "line": 517 + }, + { + "kind": "func", + "name": "CreateLedgerSnapshot", + "signature": "func (s *BaseSuite) CreateLedgerSnapshot(input LedgerSnapshotInput) LedgerSnapshot", + "line": 526 + }, + { + "kind": "func", + "name": "AssertLedgerSnapshotUnchanged", + "signature": "func (s *BaseSuite) AssertLedgerSnapshotUnchanged(input LedgerSnapshotInput, expected LedgerSnapshot)", + "line": 539 + }, + { + "kind": "func", + "name": "AssertLedgerSnapshotEqual", + "signature": "func (s *BaseSuite) AssertLedgerSnapshotEqual(expected, actual LedgerSnapshot)", + "line": 545 + }, + { + "kind": "func", + "name": "MustRecognizeRevenue", + "signature": "func (s *BaseSuite) MustRecognizeRevenue(customerID customer.CustomerID, code currencyx.Code, amount alpacadecimal.Decimal)", + "line": 556 + }, + { + "kind": "func", + "name": "MustGetChargeByID", + "signature": "func (s *BaseSuite) MustGetChargeByID(chargeID meta.ChargeID) charges.Charge", + "line": 568 + }, + { + "kind": "struct", + "name": "CreateCreditPurchaseIntentInput", + "signature": "type CreateCreditPurchaseIntentInput struct", + "line": 580 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (i CreateCreditPurchaseIntentInput) Validate() error", + "line": 593 + }, + { + "kind": "func", + "name": "CreateCreditPurchaseIntent", + "signature": "func (s *BaseSuite) CreateCreditPurchaseIntent(input CreateCreditPurchaseIntentInput) charges.ChargeIntent", + "line": 617 + }, + { + "kind": "struct", + "name": "CreatePromotionalCreditFundingInput", + "signature": "type CreatePromotionalCreditFundingInput struct", + "line": 641 + }, + { + "kind": "struct", + "name": "CreatePromotionalCreditFundingResult", + "signature": "type CreatePromotionalCreditFundingResult struct", + "line": 653 + }, + { + "kind": "func", + "name": "CreatePromotionalCreditFunding", + "signature": "func (s *BaseSuite) CreatePromotionalCreditFunding(ctx context.Context, input CreatePromotionalCreditFundingInput) CreatePromotionalCreditFundingResult", + "line": 658 + }, + { + "kind": "func", + "name": "MustRefundCharge", + "signature": "func (s *BaseSuite) MustRefundCharge(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID)", + "line": 706 + } + ], + "line_count": 716 + }, + "test/credits/credit_then_invoice_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreditThenInvoiceTestSuite", + "signature": "func TestCreditThenInvoiceTestSuite(t *testing.T)", + "line": 33 + }, + { + "kind": "struct", + "name": "CreditThenInvoiceTestSuite", + "signature": "type CreditThenInvoiceTestSuite struct", + "line": 37 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceDeletePatchDeletesPendingGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceDeletePatchDeletesPendingGatheringLine()", + "line": 41 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits()", + "line": 147 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings()", + "line": 338 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceCreatePatchCreatesPendingGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceCreatePatchCreatesPendingGatheringLine()", + "line": 530 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeletePatchDeletesPendingGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeletePatchDeletesPendingGatheringLine()", + "line": 649 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits()", + "line": 753 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsPartialCredits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsPartialCredits()", + "line": 933 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings()", + "line": 1102 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoicePartialCreditPaymentLifecyclePersistsRunState", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoicePartialCreditPaymentLifecyclePersistsRunState()", + "line": 1281 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDirectPaidTriggerAuthorizesAndSettlesPayment", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDirectPaidTriggerAuthorizesAndSettlesPayment()", + "line": 1522 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceFullyCreditedPaymentCallbacksSkipPaymentBooking", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceFullyCreditedPaymentCallbacksSkipPaymentBooking()", + "line": 1638 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceZeroAmountFinalizesWithoutInvoiceAccrual", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceZeroAmountFinalizesWithoutInvoiceAccrual()", + "line": 1767 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceShrinkToZeroThenExtendToNonZero", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceShrinkToZeroThenExtendToNonZero()", + "line": 1888 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeleteImmutableInvoiceWithPaymentKeepsBookings", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeleteImmutableInvoiceWithPaymentKeepsBookings()", + "line": 2148 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceAsyncPaymentBooksDetachedRun", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceAsyncPaymentBooksDetachedRun()", + "line": 2298 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceInArrearsActivatesAtServiceStartAndInvoicesAtInvoiceAt", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceInArrearsActivatesAtServiceStartAndInvoicesAtInvoiceAt()", + "line": 2494 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceDeleteActiveChargeBeforeStandardInvoiceDeletesGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceDeleteActiveChargeBeforeStandardInvoiceDeletesGatheringLine()", + "line": 2639 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceShrinkExtendPatchReplacesPendingGatheringLineWithProratedAmount", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceShrinkExtendPatchReplacesPendingGatheringLineWithProratedAmount()", + "line": 2734 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceShrinkPatchUpdatesMutableStandardLineInPlace", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceShrinkPatchUpdatesMutableStandardLineInPlace()", + "line": 2881 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceShrinkPatchCorrectsCreditsOnMutableLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceShrinkPatchCorrectsCreditsOnMutableLine()", + "line": 3030 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceImmutableShrinkExtendShrinkSkipsReplacementGatheringLines", + "signature": "func (s *CreditThenInvoiceTestSuite) TestFlatFeeCreditThenInvoiceImmutableShrinkExtendShrinkSkipsReplacementGatheringLines()", + "line": 3199 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchUpdatesPendingGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceExtendPatchUpdatesPendingGatheringLine()", + "line": 3412 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceShrinkPatchUpdatesPendingGatheringLine", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceShrinkPatchUpdatesPendingGatheringLine()", + "line": 3528 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchDeletesMutableStandardLineAndCorrectsCredits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceExtendPatchDeletesMutableStandardLineAndCorrectsCredits()", + "line": 3642 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceShrinkPatchDeletesMutableStandardLineAndCorrectsCredits", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceShrinkPatchDeletesMutableStandardLineAndCorrectsCredits()", + "line": 3828 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceShrinkPatchDuringAwaitingPaymentSettlementCreatesReplacementFinalRun", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceShrinkPatchDuringAwaitingPaymentSettlementCreatesReplacementFinalRun()", + "line": 4015 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchDuringFinalRunCollectionKeepsAdvanceNoop", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceExtendPatchDuringFinalRunCollectionKeepsAdvanceNoop()", + "line": 4275 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchDuringAwaitingPaymentSettlementReclassifiesFinalRunAndKeepsLedgerBookings", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceExtendPatchDuringAwaitingPaymentSettlementReclassifiesFinalRunAndKeepsLedgerBookings()", + "line": 4497 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceShrinkExtendShrinkPreservesImmutableRunsAndLedger", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceShrinkExtendShrinkPreservesImmutableRunsAndLedger()", + "line": 4692 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceExtendPatchFinalizesExtendedPeriodWithTailUsage", + "signature": "func (s *CreditThenInvoiceTestSuite) TestUsageBasedCreditThenInvoiceExtendPatchFinalizesExtendedPeriodWithTailUsage()", + "line": 5080 + }, + { + "kind": "func", + "name": "mustGatheringLinesForCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) mustGatheringLinesForCharge(namespace, customerID, chargeID string, includeDeletedLines bool) []billing.GatheringLine", + "line": 5236 + }, + { + "kind": "func", + "name": "mustSingleActiveGatheringLineForCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) mustSingleActiveGatheringLineForCharge(namespace, customerID, chargeID string) billing.GatheringLine", + "line": 5267 + }, + { + "kind": "func", + "name": "RequireAllRunsNonDeleted", + "signature": "func (s *CreditThenInvoiceTestSuite) RequireAllRunsNonDeleted(runs usagebased.RealizationRuns)", + "line": 5276 + }, + { + "kind": "func", + "name": "mustExtendCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) mustExtendCharge(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID, servicePeriodTo time.Time)", + "line": 5284 + }, + { + "kind": "func", + "name": "mustExtendChargeWithInvoiceAt", + "signature": "func (s *CreditThenInvoiceTestSuite) mustExtendChargeWithInvoiceAt(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID, servicePeriodTo time.Time, invoiceAt time.Time)", + "line": 5290 + }, + { + "kind": "func", + "name": "mustShrinkCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) mustShrinkCharge(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID, servicePeriodTo time.Time)", + "line": 5310 + }, + { + "kind": "func", + "name": "shrinkCharge", + "signature": "func (s *CreditThenInvoiceTestSuite) shrinkCharge(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID, servicePeriodTo time.Time, invoiceAt time.Time) error", + "line": 5316 + }, + { + "kind": "func", + "name": "RequireChargeStatus", + "signature": "func (s *CreditThenInvoiceTestSuite) RequireChargeStatus(chargeID meta.ChargeID, status any) charges.Charge", + "line": 5335 + }, + { + "kind": "func", + "name": "RequireUsageBasedChargeStatus", + "signature": "func (s *CreditThenInvoiceTestSuite) RequireUsageBasedChargeStatus(chargeID meta.ChargeID, status usagebased.Status) usagebased.Charge", + "line": 5363 + }, + { + "kind": "func", + "name": "RequireFlatFeeChargeStatus", + "signature": "func (s *CreditThenInvoiceTestSuite) RequireFlatFeeChargeStatus(chargeID meta.ChargeID, status flatfee.Status) flatfee.Charge", + "line": 5372 + }, + { + "kind": "func", + "name": "mustGetUsageBasedChargeByIDWithExpands", + "signature": "func (s *CreditThenInvoiceTestSuite) mustGetUsageBasedChargeByIDWithExpands(chargeID meta.ChargeID, expands meta.Expands) usagebased.Charge", + "line": 5381 + }, + { + "kind": "func", + "name": "mustGetFlatFeeChargeByIDWithExpands", + "signature": "func (s *CreditThenInvoiceTestSuite) mustGetFlatFeeChargeByIDWithExpands(chargeID meta.ChargeID, expands meta.Expands) flatfee.Charge", + "line": 5396 + } + ], + "line_count": 5409 + }, + "test/credits/creditgrant_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestCreditGrantTestSuite", + "signature": "func TestCreditGrantTestSuite(t *testing.T)", + "line": 36 + }, + { + "kind": "struct", + "name": "CreditGrantTestSuite", + "signature": "type CreditGrantTestSuite struct", + "line": 40 + }, + { + "kind": "func", + "name": "SetupSuite", + "signature": "func (s *CreditGrantTestSuite) SetupSuite()", + "line": 47 + }, + { + "kind": "func", + "name": "TestCreateInvoiceFundedCreatesInvoiceArtifacts", + "signature": "func (s *CreditGrantTestSuite) TestCreateInvoiceFundedCreatesInvoiceArtifacts()", + "line": 95 + }, + { + "kind": "func", + "name": "TestCreatePromotionalGrant", + "signature": "func (s *CreditGrantTestSuite) TestCreatePromotionalGrant()", + "line": 152 + }, + { + "kind": "func", + "name": "TestCreateFeatureFilteredGrantUnsupported", + "signature": "func (s *CreditGrantTestSuite) TestCreateFeatureFilteredGrantUnsupported()", + "line": 191 + }, + { + "kind": "func", + "name": "TestCreateExternalGrantAndSettle", + "signature": "func (s *CreditGrantTestSuite) TestCreateExternalGrantAndSettle()", + "line": 216 + }, + { + "kind": "func", + "name": "TestListCreditGrants", + "signature": "func (s *CreditGrantTestSuite) TestListCreditGrants()", + "line": 274 + }, + { + "kind": "func", + "name": "TestCreateInvoiceFundedGrantPropagatesTaxConfigToInvoiceLine", + "signature": "func (s *CreditGrantTestSuite) TestCreateInvoiceFundedGrantPropagatesTaxConfigToInvoiceLine()", + "line": 307 + }, + { + "kind": "func", + "name": "TestCreateInvoiceFundedGrantNilTaxConfigAppliesCreditGrantDefault", + "signature": "func (s *CreditGrantTestSuite) TestCreateInvoiceFundedGrantNilTaxConfigAppliesCreditGrantDefault()", + "line": 377 + }, + { + "kind": "func", + "name": "TestCreateExternalGrantPropagatesTaxConfigToCharge", + "signature": "func (s *CreditGrantTestSuite) TestCreateExternalGrantPropagatesTaxConfigToCharge()", + "line": 430 + }, + { + "kind": "func", + "name": "TestCreatePromotionalGrantPropagatesTaxConfigToCharge", + "signature": "func (s *CreditGrantTestSuite) TestCreatePromotionalGrantPropagatesTaxConfigToCharge()", + "line": 481 + }, + { + "kind": "func", + "name": "mustCreatePromotionalCreditGrant", + "signature": "func (s *CreditGrantTestSuite) mustCreatePromotionalCreditGrant(ctx context.Context, namespace string, customerID customer.CustomerID, name string, amount alpacadecimal.Decimal) creditpurchase.Charge", + "line": 524 + } + ], + "line_count": 540 + }, + "test/credits/rating_test.go": { + "header": "\t\"testing\"\n\t\"time\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestRatingTestSuite", + "signature": "func TestRatingTestSuite(t *testing.T)", + "line": 20 + }, + { + "kind": "struct", + "name": "RatingTestSuite", + "signature": "type RatingTestSuite struct", + "line": 24 + }, + { + "kind": "func", + "name": "TestListChargesExpandsRealtimeUsageForMultipleUsageBasedCharges", + "signature": "func (s *RatingTestSuite) TestListChargesExpandsRealtimeUsageForMultipleUsageBasedCharges()", + "line": 28 + } + ], + "line_count": 122 + }, + "test/credits/sanity_lifecycle_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestSanityLifecycleSuite", + "signature": "func TestSanityLifecycleSuite(t *testing.T)", + "line": 29 + }, + { + "kind": "struct", + "name": "SanityLifecycleSuite", + "signature": "type SanityLifecycleSuite struct", + "line": 33 + }, + { + "kind": "struct", + "name": "usageBasedPartialBackfillLifecycleState", + "signature": "type usageBasedPartialBackfillLifecycleState struct", + "line": 37 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyLifecyclePartialBackfillCorrectionThenDeleteSanity", + "signature": "func (s *SanityLifecycleSuite) TestUsageBasedCreditOnlyLifecyclePartialBackfillCorrectionThenDeleteSanity()", + "line": 45 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyLifecyclePartialBackfillCorrectionSettleBeforeDeleteSanity", + "signature": "func (s *SanityLifecycleSuite) TestUsageBasedCreditOnlyLifecyclePartialBackfillCorrectionSettleBeforeDeleteSanity()", + "line": 80 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyLifecycleTwoChargesTwoPurchasesSanity", + "signature": "func (s *SanityLifecycleSuite) TestUsageBasedCreditOnlyLifecycleTwoChargesTwoPurchasesSanity()", + "line": 113 + }, + { + "kind": "func", + "name": "setupUsageBasedCreditOnlyLifecyclePartialBackfillCorrection", + "signature": "func (s *SanityLifecycleSuite) setupUsageBasedCreditOnlyLifecyclePartialBackfillCorrection(ctx context.Context, namespacePrefix string) usageBasedPartialBackfillLifecycleState", + "line": 374 + }, + { + "kind": "func", + "name": "mustSettleExternalCreditPurchase", + "signature": "func (s *SanityLifecycleSuite) mustSettleExternalCreditPurchase(ctx context.Context, chargeID meta.ChargeID)", + "line": 540 + }, + { + "kind": "func", + "name": "mustAdvanceUsageBasedChargeByID", + "signature": "func (s *SanityLifecycleSuite) mustAdvanceUsageBasedChargeByID(ctx context.Context, customerID customer.CustomerID, chargeID meta.ChargeID) *usagebased.Charge", + "line": 560 + }, + { + "kind": "func", + "name": "mustAdvanceSingleUsageBasedCharge", + "signature": "func (s *SanityLifecycleSuite) mustAdvanceSingleUsageBasedCharge(ctx context.Context, customerID customer.CustomerID) *usagebased.Charge", + "line": 585 + } + ], + "line_count": 604 + }, + "test/credits/sanity_test.go": { + "header": "\t\"context\"\n\t\"strings\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestSanitySuite", + "signature": "func TestSanitySuite(t *testing.T)", + "line": 43 + }, + { + "kind": "struct", + "name": "SanitySuite", + "signature": "type SanitySuite struct", + "line": 47 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyDeleteCorrectionSanity", + "signature": "func (s *SanitySuite) TestFlatFeeCreditOnlyDeleteCorrectionSanity()", + "line": 51 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyDeleteCorrectionSanity", + "signature": "func (s *SanitySuite) TestUsageBasedCreditOnlyDeleteCorrectionSanity()", + "line": 70 + }, + { + "kind": "func", + "name": "TestFlatFeeFundedCreditOnlyRecognizedRevenueDeleteCorrectionSanity", + "signature": "func (s *SanitySuite) TestFlatFeeFundedCreditOnlyRecognizedRevenueDeleteCorrectionSanity()", + "line": 92 + }, + { + "kind": "func", + "name": "TestUsageBasedFundedCreditOnlyRecognizedRevenueDeleteCorrectionSanity", + "signature": "func (s *SanitySuite) TestUsageBasedFundedCreditOnlyRecognizedRevenueDeleteCorrectionSanity()", + "line": 118 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakagePlanReleaseAndExpirySanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakagePlanReleaseAndExpirySanity()", + "line": 147 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakageImmediatelyReleasesAdvanceBackfillSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakageImmediatelyReleasesAdvanceBackfillSanity()", + "line": 216 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakageReopensAdvanceBackfillReleaseOnUsageCorrectionSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakageReopensAdvanceBackfillReleaseOnUsageCorrectionSanity()", + "line": 304 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakageReopensOnUsageCorrectionSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakageReopensOnUsageCorrectionSanity()", + "line": 408 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakagePartiallyReopensOnUsageShrinkSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakagePartiallyReopensOnUsageShrinkSanity()", + "line": 502 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakageReopensLatestExpirationFirstOnUsageShrinkSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakageReopensLatestExpirationFirstOnUsageShrinkSanity()", + "line": 582 + }, + { + "kind": "func", + "name": "TestExpiringCreditBreakageIgnoresNonExpiringSourceOnUsageShrinkSanity", + "signature": "func (s *SanitySuite) TestExpiringCreditBreakageIgnoresNonExpiringSourceOnUsageShrinkSanity()", + "line": 667 + }, + { + "kind": "func", + "name": "TestFeatureRestrictedCreditCollectionCorrectionThenCollectionSanity", + "signature": "func (s *SanitySuite) TestFeatureRestrictedCreditCollectionCorrectionThenCollectionSanity()", + "line": 749 + }, + { + "kind": "struct", + "name": "expiringCreditBreakageSetup", + "signature": "type expiringCreditBreakageSetup struct", + "line": 853 + }, + { + "kind": "func", + "name": "withExpiringCreditBreakageAmounts", + "signature": "func withExpiringCreditBreakageAmounts(grantAmount, usedAmount alpacadecimal.Decimal) expiringCreditBreakageSetupOption", + "line": 868 + }, + { + "kind": "struct", + "name": "createCreditOnlyFlatFeeChargeInput", + "signature": "type createCreditOnlyFlatFeeChargeInput struct", + "line": 875 + }, + { + "kind": "struct", + "name": "createdCreditOnlyFlatFeeCharge", + "signature": "type createdCreditOnlyFlatFeeCharge struct", + "line": 887 + }, + { + "kind": "func", + "name": "mustFlatFeeCreditRealizations", + "signature": "func (s *SanitySuite) mustFlatFeeCreditRealizations(charge flatfee.Charge) creditrealization.Realizations", + "line": 892 + }, + { + "kind": "struct", + "name": "breakageRowsByExpiryAssertion", + "signature": "type breakageRowsByExpiryAssertion struct", + "line": 900 + }, + { + "kind": "struct", + "name": "plannedBreakageAssertionInput", + "signature": "type plannedBreakageAssertionInput struct", + "line": 907 + }, + { + "kind": "struct", + "name": "releasedBreakageAssertionInput", + "signature": "type releasedBreakageAssertionInput struct", + "line": 918 + }, + { + "kind": "struct", + "name": "reopenedBreakageAssertionInput", + "signature": "type reopenedBreakageAssertionInput struct", + "line": 931 + }, + { + "kind": "struct", + "name": "breakageBalanceAssertionInput", + "signature": "type breakageBalanceAssertionInput struct", + "line": 945 + }, + { + "kind": "struct", + "name": "creditOnlyDeleteCorrectionSetup", + "signature": "type creditOnlyDeleteCorrectionSetup struct", + "line": 956 + }, + { + "kind": "func", + "name": "mustBreakageRows", + "signature": "func (s *SanitySuite) mustBreakageRows(ctx context.Context, namespace string, customerID customer.CustomerID) []*entdb.LedgerBreakageRecord", + "line": 966 + }, + { + "kind": "func", + "name": "assertBreakagePlan", + "signature": "func (s *SanitySuite) assertBreakagePlan(ctx context.Context, namespace string, customerID customer.CustomerID, amount alpacadecimal.Decimal, expiresAt time.Time) string", + "line": 984 + }, + { + "kind": "func", + "name": "assertBreakagePlanAndRelease", + "signature": "func (s *SanitySuite) assertBreakagePlanAndRelease(ctx context.Context, namespace string, customerID customer.CustomerID, planAmount alpacadecimal.Decimal, releaseAmount alpacadecimal.Decimal)", + "line": 998 + }, + { + "kind": "func", + "name": "assertAdvanceBackfillBreakageRows", + "signature": "func (s *SanitySuite) assertAdvanceBackfillBreakageRows(ctx context.Context, namespace string, customerID customer.CustomerID, planAmount alpacadecimal.Decimal, releaseAmount alpacadecimal.Decimal, expiresAt time.Time)", + "line": 1029 + }, + { + "kind": "func", + "name": "assertAdvanceBackfillBreakageReopenedRows", + "signature": "func (s *SanitySuite) assertAdvanceBackfillBreakageReopenedRows(ctx context.Context, namespace string, customerID customer.CustomerID, planAmount alpacadecimal.Decimal, releaseAmount alpacadecimal.Decimal, expiresAt time.Time)", + "line": 1061 + }, + { + "kind": "func", + "name": "assertBreakagePlanReleaseAndReopen", + "signature": "func (s *SanitySuite) assertBreakagePlanReleaseAndReopen(ctx context.Context, namespace string, customerID customer.CustomerID, planAmount alpacadecimal.Decimal, releaseAmount alpacadecimal.Decimal, reopenAmount alpacadecimal.Decimal)", + "line": 1107 + }, + { + "kind": "func", + "name": "assertBreakageRowsByExpiry", + "signature": "func (s *SanitySuite) assertBreakageRowsByExpiry(ctx context.Context, namespace string, customerID customer.CustomerID, expected []breakageRowsByExpiryAssertion)", + "line": 1149 + }, + { + "kind": "func", + "name": "setupExpiringCreditBreakage", + "signature": "func (s *SanitySuite) setupExpiringCreditBreakage(namespaceSuffix string, opts ...expiringCreditBreakageSetupOption) expiringCreditBreakageSetup", + "line": 1214 + }, + { + "kind": "func", + "name": "createAndAdvanceCreditOnlyFlatFeeCharge", + "signature": "func (s *SanitySuite) createAndAdvanceCreditOnlyFlatFeeCharge(input createCreditOnlyFlatFeeChargeInput) createdCreditOnlyFlatFeeCharge", + "line": 1251 + }, + { + "kind": "func", + "name": "createPromotionalCreditGrant", + "signature": "func (s *SanitySuite) createPromotionalCreditGrant(ctx context.Context, input CreatePromotionalCreditFundingInput) creditpurchase.Charge", + "line": 1299 + }, + { + "kind": "func", + "name": "correctCreditUsageAllocation", + "signature": "func (s *SanitySuite) correctCreditUsageAllocation(ctx context.Context, charge flatfee.Charge, allocation creditrealization.Realization, amount alpacadecimal.Decimal, bookedAt time.Time)", + "line": 1327 + }, + { + "kind": "func", + "name": "assertPlannedBreakage", + "signature": "func (s *SanitySuite) assertPlannedBreakage(input plannedBreakageAssertionInput)", + "line": 1350 + }, + { + "kind": "func", + "name": "assertReleasedBreakage", + "signature": "func (s *SanitySuite) assertReleasedBreakage(input releasedBreakageAssertionInput)", + "line": 1376 + }, + { + "kind": "func", + "name": "assertReopenedBreakage", + "signature": "func (s *SanitySuite) assertReopenedBreakage(input reopenedBreakageAssertionInput)", + "line": 1393 + }, + { + "kind": "func", + "name": "assertBreakageBalancesAt", + "signature": "func (s *SanitySuite) assertBreakageBalancesAt(input breakageBalanceAssertionInput)", + "line": 1410 + }, + { + "kind": "func", + "name": "setupFlatFeeCreditOnlyDeleteCorrection", + "signature": "func (s *SanitySuite) setupFlatFeeCreditOnlyDeleteCorrection(namespaceSuffix string) creditOnlyDeleteCorrectionSetup", + "line": 1417 + }, + { + "kind": "func", + "name": "setupUsageBasedCreditOnlyDeleteCorrection", + "signature": "func (s *SanitySuite) setupUsageBasedCreditOnlyDeleteCorrection(namespaceSuffix string) creditOnlyDeleteCorrectionSetup", + "line": 1443 + }, + { + "kind": "func", + "name": "createPromotionalCreditFunding", + "signature": "func (s *SanitySuite) createPromotionalCreditFunding(setup creditOnlyDeleteCorrectionSetup, costBasis alpacadecimal.Decimal) alpacadecimal.Decimal", + "line": 1468 + }, + { + "kind": "func", + "name": "createAndAdvanceFlatFeeCreditOnlyCharge", + "signature": "func (s *SanitySuite) createAndAdvanceFlatFeeCreditOnlyCharge(setup creditOnlyDeleteCorrectionSetup) string", + "line": 1482 + }, + { + "kind": "func", + "name": "recordUsageInClosedServicePeriod", + "signature": "func (s *SanitySuite) recordUsageInClosedServicePeriod(setup creditOnlyDeleteCorrectionSetup)", + "line": 1500 + }, + { + "kind": "func", + "name": "createFinalizedUsageBasedCreditOnlyCharge", + "signature": "func (s *SanitySuite) createFinalizedUsageBasedCreditOnlyCharge(setup creditOnlyDeleteCorrectionSetup) string", + "line": 1510 + }, + { + "kind": "func", + "name": "deleteChargeWithRefundAsCredits", + "signature": "func (s *SanitySuite) deleteChargeWithRefundAsCredits(ctx context.Context, customerID customer.CustomerID, chargeID string)", + "line": 1545 + }, + { + "kind": "func", + "name": "assertUnfundedCreditOnlyRealization", + "signature": "func (s *SanitySuite) assertUnfundedCreditOnlyRealization(customerID customer.CustomerID, amount alpacadecimal.Decimal)", + "line": 1557 + }, + { + "kind": "func", + "name": "assertUnfundedCreditOnlyDeleted", + "signature": "func (s *SanitySuite) assertUnfundedCreditOnlyDeleted(customerID customer.CustomerID)", + "line": 1564 + }, + { + "kind": "func", + "name": "assertFundedCreditOnlyAccrued", + "signature": "func (s *SanitySuite) assertFundedCreditOnlyAccrued(customerID customer.CustomerID, amount alpacadecimal.Decimal, costBasis alpacadecimal.Decimal, startOpenReceivable alpacadecimal.Decimal)", + "line": 1572 + }, + { + "kind": "func", + "name": "recognizeFundedCreditOnlyRevenue", + "signature": "func (s *SanitySuite) recognizeFundedCreditOnlyRevenue(namespace string, customerID customer.CustomerID, amount alpacadecimal.Decimal, costBasis alpacadecimal.Decimal)", + "line": 1580 + }, + { + "kind": "func", + "name": "assertFundedRecognizedCreditOnlyDeleted", + "signature": "func (s *SanitySuite) assertFundedRecognizedCreditOnlyDeleted(namespace string, customerID customer.CustomerID, amount alpacadecimal.Decimal, costBasis alpacadecimal.Decimal, startOpenReceivable alpacadecimal.Decimal)", + "line": 1592 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyDeleteCorrectionWithPartialBackfillSanity", + "signature": "func (s *SanitySuite) TestUsageBasedCreditOnlyDeleteCorrectionWithPartialBackfillSanity()", + "line": 1605 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyDeleteCorrectionWithMixedFeatureAdvanceBackfillSanity", + "signature": "func (s *SanitySuite) TestUsageBasedCreditOnlyDeleteCorrectionWithMixedFeatureAdvanceBackfillSanity()", + "line": 1732 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceSanity", + "signature": "func (s *SanitySuite) TestFlatFeeCreditThenInvoiceSanity()", + "line": 1907 + }, + { + "kind": "struct", + "name": "meteredFeatureSetup", + "signature": "type meteredFeatureSetup struct", + "line": 2253 + }, + { + "kind": "func", + "name": "setupMeteredFeatures", + "signature": "func (s *SanitySuite) setupMeteredFeatures(ctx context.Context, ns string, inputs ...meteredFeatureSetup) map[string]pcfeature.Feature", + "line": 2258 + }, + { + "kind": "func", + "name": "TestCreditPurchasePersistsPriority", + "signature": "func (s *SanitySuite) TestCreditPurchasePersistsPriority()", + "line": 2305 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoicePaymentLifecycle", + "signature": "func (s *SanitySuite) TestUsageBasedCreditThenInvoicePaymentLifecycle()", + "line": 2337 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlySanity", + "signature": "func (s *SanitySuite) TestFlatFeeCreditOnlySanity()", + "line": 2516 + }, + { + "kind": "func", + "name": "TestCreditPurchaseAdvanceAttributionAcrossTaxCodeBuckets", + "signature": "func (s *SanitySuite) TestCreditPurchaseAdvanceAttributionAcrossTaxCodeBuckets()", + "line": 2907 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditOnlyTaxConfigFlowsToEarnings", + "signature": "func (s *SanitySuite) TestFlatFeeCreditOnlyTaxConfigFlowsToEarnings()", + "line": 3063 + }, + { + "kind": "func", + "name": "TestFlatFeeCreditThenInvoiceTaxConfigFlowsToEarnings", + "signature": "func (s *SanitySuite) TestFlatFeeCreditThenInvoiceTaxConfigFlowsToEarnings()", + "line": 3155 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditOnlyTaxConfigFlowsToEarnings", + "signature": "func (s *SanitySuite) TestUsageBasedCreditOnlyTaxConfigFlowsToEarnings()", + "line": 3255 + }, + { + "kind": "func", + "name": "TestUsageBasedCreditThenInvoiceTaxConfigFlowsToEarnings", + "signature": "func (s *SanitySuite) TestUsageBasedCreditThenInvoiceTaxConfigFlowsToEarnings()", + "line": 3364 + }, + { + "kind": "func", + "name": "createTaxCodeForEarningsFlow", + "signature": "func (s *SanitySuite) createTaxCodeForEarningsFlow(ctx context.Context, namespace string, key string, name string) taxcode.TaxCode", + "line": 3472 + }, + { + "kind": "func", + "name": "requireChargeTaxConfig", + "signature": "func (s *SanitySuite) requireChargeTaxConfig(config *productcatalog.TaxCodeConfig, taxCodeID string, behavior productcatalog.TaxBehavior)", + "line": 3488 + }, + { + "kind": "func", + "name": "mustRecognizeAttributableAccrued", + "signature": "func (s *SanitySuite) mustRecognizeAttributableAccrued(customerID customer.CustomerID, currency currencyx.Code, amount alpacadecimal.Decimal)", + "line": 3498 + }, + { + "kind": "func", + "name": "mustEarningsBalanceForTaxConfig", + "signature": "func (s *SanitySuite) mustEarningsBalanceForTaxConfig(namespace string, code currencyx.Code, costBasis mo.Option[*alpacadecimal.Decimal], taxCode mo.Option[*string], taxBehavior mo.Option[*ledger.TaxBehavior]) alpacadecimal.Decimal", + "line": 3525 + }, + { + "kind": "func", + "name": "TestTaxCodeFlowsFromCreditPurchaseToEarnings", + "signature": "func (s *SanitySuite) TestTaxCodeFlowsFromCreditPurchaseToEarnings()", + "line": 3545 + }, + { + "kind": "func", + "name": "TestChargeIntentTaxConfigFlowsToEarnings", + "signature": "func (s *SanitySuite) TestChargeIntentTaxConfigFlowsToEarnings()", + "line": 3674 + }, + { + "kind": "func", + "name": "TestChargeIntentTaxBehaviorFlowsToAdvanceAccrualCreditOnly", + "signature": "func (s *SanitySuite) TestChargeIntentTaxBehaviorFlowsToAdvanceAccrualCreditOnly()", + "line": 3787 + }, + { + "kind": "func", + "name": "TestChargeIntentTaxConfigOverridesFundingTaxCodeCreditOnly", + "signature": "func (s *SanitySuite) TestChargeIntentTaxConfigOverridesFundingTaxCodeCreditOnly()", + "line": 3871 + }, + { + "kind": "func", + "name": "TestTaxCodeFlowsFromInvoicedChargeToAccrued", + "signature": "func (s *SanitySuite) TestTaxCodeFlowsFromInvoicedChargeToAccrued()", + "line": 4005 + } + ], + "line_count": 4137 + }, + "test/customer/customer.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "CustomerHandlerTestSuite", + "signature": "type CustomerHandlerTestSuite struct", + "line": 55 + }, + { + "kind": "func", + "name": "setupNamespace", + "signature": "func (s *CustomerHandlerTestSuite) setupNamespace(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "TestCreate", + "signature": "func (s *CustomerHandlerTestSuite) TestCreate(ctx context.Context, t *testing.T)", + "line": 70 + }, + { + "kind": "func", + "name": "TestUpdate", + "signature": "func (s *CustomerHandlerTestSuite) TestUpdate(ctx context.Context, t *testing.T)", + "line": 205 + }, + { + "kind": "func", + "name": "TestUpdateWithSubscriptionPresent", + "signature": "func (s *CustomerHandlerTestSuite) TestUpdateWithSubscriptionPresent(ctx context.Context, t *testing.T)", + "line": 354 + }, + { + "kind": "func", + "name": "TestList", + "signature": "func (s *CustomerHandlerTestSuite) TestList(ctx context.Context, t *testing.T)", + "line": 483 + }, + { + "kind": "func", + "name": "TestListBillingProfileFilter", + "signature": "func (s *CustomerHandlerTestSuite) TestListBillingProfileFilter(ctx context.Context, t *testing.T)", + "line": 679 + }, + { + "kind": "func", + "name": "TestListCustomerUsageAttributions", + "signature": "func (s *CustomerHandlerTestSuite) TestListCustomerUsageAttributions(ctx context.Context, t *testing.T)", + "line": 819 + }, + { + "kind": "func", + "name": "TestGet", + "signature": "func (s *CustomerHandlerTestSuite) TestGet(ctx context.Context, t *testing.T)", + "line": 881 + }, + { + "kind": "func", + "name": "TestGetByUsageAttribution", + "signature": "func (s *CustomerHandlerTestSuite) TestGetByUsageAttribution(ctx context.Context, t *testing.T)", + "line": 955 + }, + { + "kind": "func", + "name": "TestDelete", + "signature": "func (s *CustomerHandlerTestSuite) TestDelete(ctx context.Context, t *testing.T)", + "line": 1018 + } + ], + "line_count": 1171 + }, + "test/customer/customer_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestCustomer", + "signature": "func TestCustomer(t *testing.T)", + "line": 10 + } + ], + "line_count": 80 + }, + "test/customer/subject.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubjectDeletion", + "signature": "func (s *CustomerHandlerTestSuite) TestSubjectDeletion(ctx context.Context, t *testing.T)", + "line": 32 + }, + { + "kind": "func", + "name": "TestMultiSubjectIntegrationFlow", + "signature": "func (s *CustomerHandlerTestSuite) TestMultiSubjectIntegrationFlow(ctx context.Context, t *testing.T)", + "line": 193 + } + ], + "line_count": 411 + }, + "test/customer/testenv.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "interface", + "name": "TestEnv", + "signature": "type TestEnv interface", + "line": 69 + }, + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 86 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (n testEnv) Close() error", + "line": 101 + }, + { + "kind": "func", + "name": "App", + "signature": "func (n testEnv) App() app.Service", + "line": 105 + }, + { + "kind": "func", + "name": "Customer", + "signature": "func (n testEnv) Customer() customer.Service", + "line": 109 + }, + { + "kind": "func", + "name": "Subscription", + "signature": "func (n testEnv) Subscription() subscription.Service", + "line": 113 + }, + { + "kind": "func", + "name": "SubscriptionWorkflow", + "signature": "func (n testEnv) SubscriptionWorkflow() subscriptionworkflow.Service", + "line": 117 + }, + { + "kind": "func", + "name": "Entitlement", + "signature": "func (n testEnv) Entitlement() entitlement.Service", + "line": 121 + }, + { + "kind": "func", + "name": "Feature", + "signature": "func (n testEnv) Feature() feature.FeatureConnector", + "line": 125 + }, + { + "kind": "func", + "name": "Subject", + "signature": "func (n testEnv) Subject() subject.Service", + "line": 129 + }, + { + "kind": "func", + "name": "Plan", + "signature": "func (n testEnv) Plan() planpkg.Service", + "line": 133 + }, + { + "kind": "func", + "name": "Billing", + "signature": "func (n testEnv) Billing() billing.Service", + "line": 137 + }, + { + "kind": "func", + "name": "Meter", + "signature": "func (n testEnv) Meter() *meteradapter.Adapter", + "line": 141 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T, ctx context.Context) (TestEnv, error)", + "line": 149 + }, + { + "kind": "struct", + "name": "noopCustomerOverrideService", + "signature": "type noopCustomerOverrideService struct", + "line": 453 + }, + { + "kind": "func", + "name": "minimalCreateProfileInputTemplate", + "signature": "func minimalCreateProfileInputTemplate(appID app.AppID) billing.CreateProfileInput", + "line": 457 + }, + { + "kind": "func", + "name": "installSandboxApp", + "signature": "func (s *CustomerHandlerTestSuite) installSandboxApp(t *testing.T, ns string) app.App", + "line": 499 + }, + { + "kind": "func", + "name": "createDefaultProfile", + "signature": "func (s *CustomerHandlerTestSuite) createDefaultProfile(t *testing.T, app app.App, ns string) *billing.Profile", + "line": 519 + } + ], + "line_count": 527 + }, + "test/entitlement/regression/framework_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "Dependencies", + "signature": "type Dependencies struct", + "line": 48 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (d *Dependencies) Close()", + "line": 77 + }, + { + "kind": "func", + "name": "setupDependencies", + "signature": "func setupDependencies(t *testing.T) Dependencies", + "line": 83 + }, + { + "kind": "func", + "name": "createCustomerAndSubject", + "signature": "func createCustomerAndSubject(t *testing.T, subjectService subject.Service, customerService customer.Service, ns, key, name string) *customer.Customer", + "line": 262 + } + ], + "line_count": 283 + }, + "test/entitlement/regression/scenario_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestGrantExpiringAtReset", + "signature": "func TestGrantExpiringAtReset(t *testing.T)", + "line": 26 + }, + { + "kind": "func", + "name": "TestGrantExpiringAndRecurringAtReset", + "signature": "func TestGrantExpiringAndRecurringAtReset(t *testing.T)", + "line": 175 + }, + { + "kind": "func", + "name": "TestBalanceCalculationsAfterVoiding", + "signature": "func TestBalanceCalculationsAfterVoiding(t *testing.T)", + "line": 282 + }, + { + "kind": "func", + "name": "TestCreatingEntitlementsForKeyOfArchivedFeatures", + "signature": "func TestCreatingEntitlementsForKeyOfArchivedFeatures(t *testing.T)", + "line": 385 + }, + { + "kind": "func", + "name": "TestGrantingAfterOverage", + "signature": "func TestGrantingAfterOverage(t *testing.T)", + "line": 461 + }, + { + "kind": "func", + "name": "TestBalanceWorkerActiveToFromEntitlementsMapping", + "signature": "func TestBalanceWorkerActiveToFromEntitlementsMapping(t *testing.T)", + "line": 572 + } + ], + "line_count": 659 + }, + "test/notification/channel.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/assert\"", + "symbols": [ + { + "kind": "func", + "name": "NewCreateChannelInput", + "signature": "func NewCreateChannelInput(namespace, name string) notification.CreateChannelInput", + "line": 15 + }, + { + "kind": "struct", + "name": "ChannelTestSuite", + "signature": "type ChannelTestSuite struct", + "line": 46 + }, + { + "kind": "func", + "name": "TestCreate", + "signature": "func (s *ChannelTestSuite) TestCreate(ctx context.Context, t *testing.T)", + "line": 50 + }, + { + "kind": "func", + "name": "TestList", + "signature": "func (s *ChannelTestSuite) TestList(ctx context.Context, t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestUpdate", + "signature": "func (s *ChannelTestSuite) TestUpdate(ctx context.Context, t *testing.T)", + "line": 102 + }, + { + "kind": "func", + "name": "TestDelete", + "signature": "func (s *ChannelTestSuite) TestDelete(ctx context.Context, t *testing.T)", + "line": 153 + }, + { + "kind": "func", + "name": "TestGet", + "signature": "func (s *ChannelTestSuite) TestGet(ctx context.Context, t *testing.T)", + "line": 169 + } + ], + "line_count": 192 + }, + "test/notification/consumer_balance.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"log/slog\"", + "symbols": [ + { + "kind": "struct", + "name": "BalanceNotificaiontHandlerTestSuite", + "signature": "type BalanceNotificaiontHandlerTestSuite struct", + "line": 29 + }, + { + "kind": "struct", + "name": "BalanceSnapshotEventInput", + "signature": "type BalanceSnapshotEventInput struct", + "line": 51 + }, + { + "kind": "func", + "name": "NewBalanceSnapshotEvent", + "signature": "func NewBalanceSnapshotEvent(in BalanceSnapshotEventInput) snapshot.SnapshotEvent", + "line": 57 + }, + { + "kind": "func", + "name": "setupNamespace", + "signature": "func (s *BalanceNotificaiontHandlerTestSuite) setupNamespace(ctx context.Context, t *testing.T)", + "line": 95 + }, + { + "kind": "func", + "name": "TestGrantingFlow", + "signature": "func (s *BalanceNotificaiontHandlerTestSuite) TestGrantingFlow(ctx context.Context, t *testing.T)", + "line": 168 + }, + { + "kind": "func", + "name": "TestFeatureFiltering", + "signature": "func (s *BalanceNotificaiontHandlerTestSuite) TestFeatureFiltering(ctx context.Context, t *testing.T)", + "line": 431 + } + ], + "line_count": 559 + }, + "test/notification/event.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "NewBalanceThresholdPayload", + "signature": "func NewBalanceThresholdPayload() notification.EventPayload", + "line": 21 + }, + { + "kind": "func", + "name": "NewEntitlementResetPayload", + "signature": "func NewEntitlementResetPayload() notification.EventPayload", + "line": 93 + }, + { + "kind": "func", + "name": "NewCreateEventInput", + "signature": "func NewCreateEventInput(namespace string, t notification.EventType, ruleID string, payload notification.EventPayload) notification.CreateEventInput", + "line": 159 + }, + { + "kind": "struct", + "name": "EventTestSuite", + "signature": "type EventTestSuite struct", + "line": 170 + }, + { + "kind": "func", + "name": "Setup", + "signature": "func (s *EventTestSuite) Setup(ctx context.Context, t *testing.T)", + "line": 179 + }, + { + "kind": "func", + "name": "TestCreateEvent", + "signature": "func (s *EventTestSuite) TestCreateEvent(ctx context.Context, t *testing.T)", + "line": 226 + }, + { + "kind": "func", + "name": "TestGetEvent", + "signature": "func (s *EventTestSuite) TestGetEvent(ctx context.Context, t *testing.T)", + "line": 238 + }, + { + "kind": "func", + "name": "TestListEvents", + "signature": "func (s *EventTestSuite) TestListEvents(ctx context.Context, t *testing.T)", + "line": 255 + }, + { + "kind": "func", + "name": "TestListDeliveryStatus", + "signature": "func (s *EventTestSuite) TestListDeliveryStatus(ctx context.Context, t *testing.T)", + "line": 291 + }, + { + "kind": "func", + "name": "TestUpdateDeliveryStatus", + "signature": "func (s *EventTestSuite) TestUpdateDeliveryStatus(ctx context.Context, t *testing.T)", + "line": 328 + } + ], + "line_count": 366 + }, + "test/notification/helpers.go": { + "header": "\t\"time\"\n\t\"github.com/ClickHouse/clickhouse-go/v2\"\n\tclickhousedriver \"github.com/ClickHouse/clickhouse-go/v2/lib/driver\"", + "symbols": [ + { + "kind": "func", + "name": "NewSvixAuthToken", + "signature": "func NewSvixAuthToken(signingSecret string) (string, error)", + "line": 11 + }, + { + "kind": "func", + "name": "NewClickhouseClient", + "signature": "func NewClickhouseClient(addr string) (clickhousedriver.Conn, error)", + "line": 23 + } + ], + "line_count": 38 + }, + "test/notification/notification_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "func", + "name": "TestNotification", + "signature": "func TestNotification(t *testing.T)", + "line": 10 + } + ], + "line_count": 175 + }, + "test/notification/repository.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/stretchr/testify/require\"", + "symbols": [ + { + "kind": "struct", + "name": "RepositoryTestSuite", + "signature": "type RepositoryTestSuite struct", + "line": 14 + }, + { + "kind": "func", + "name": "Setup", + "signature": "func (s *RepositoryTestSuite) Setup(ctx context.Context, t *testing.T)", + "line": 25 + }, + { + "kind": "func", + "name": "TestFilterEventByFeature", + "signature": "func (s *RepositoryTestSuite) TestFilterEventByFeature(t *testing.T)", + "line": 163 + }, + { + "kind": "func", + "name": "TestFilterEventBySubject", + "signature": "func (s *RepositoryTestSuite) TestFilterEventBySubject(t *testing.T)", + "line": 196 + }, + { + "kind": "func", + "name": "eventIDsFromEventPaginatedResponse", + "signature": "func eventIDsFromEventPaginatedResponse(events pagination.Result[notification.Event]) []string", + "line": 229 + } + ], + "line_count": 236 + }, + "test/notification/rule.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "NewCreateRuleInput", + "signature": "func NewCreateRuleInput(namespace string, name string, channels ...string) notification.CreateRuleInput", + "line": 21 + }, + { + "kind": "struct", + "name": "RuleTestSuite", + "signature": "type RuleTestSuite struct", + "line": 59 + }, + { + "kind": "func", + "name": "Setup", + "signature": "func (s *RuleTestSuite) Setup(ctx context.Context, t *testing.T)", + "line": 66 + }, + { + "kind": "func", + "name": "TestCreate", + "signature": "func (s *RuleTestSuite) TestCreate(ctx context.Context, t *testing.T)", + "line": 129 + }, + { + "kind": "func", + "name": "TestList", + "signature": "func (s *RuleTestSuite) TestList(ctx context.Context, t *testing.T)", + "line": 168 + }, + { + "kind": "func", + "name": "TestUpdate", + "signature": "func (s *RuleTestSuite) TestUpdate(ctx context.Context, t *testing.T)", + "line": 211 + }, + { + "kind": "func", + "name": "TestDelete", + "signature": "func (s *RuleTestSuite) TestDelete(ctx context.Context, t *testing.T)", + "line": 261 + }, + { + "kind": "func", + "name": "TestGet", + "signature": "func (s *RuleTestSuite) TestGet(ctx context.Context, t *testing.T)", + "line": 278 + } + ], + "line_count": 304 + }, + "test/notification/testenv.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"errors\"", + "symbols": [ + { + "kind": "func", + "name": "NewTestULID", + "signature": "func NewTestULID(t *testing.T) string", + "line": 54 + }, + { + "kind": "interface", + "name": "TestEnv", + "signature": "type TestEnv interface", + "line": 62 + }, + { + "kind": "struct", + "name": "testEnv", + "signature": "type testEnv struct", + "line": 77 + }, + { + "kind": "func", + "name": "Close", + "signature": "func (n testEnv) Close() error", + "line": 90 + }, + { + "kind": "func", + "name": "NotificationRepo", + "signature": "func (n testEnv) NotificationRepo() notification.Repository", + "line": 94 + }, + { + "kind": "func", + "name": "Notification", + "signature": "func (n testEnv) Notification() notification.Service", + "line": 98 + }, + { + "kind": "func", + "name": "NotificationWebhook", + "signature": "func (n testEnv) NotificationWebhook() notificationwebhook.Handler", + "line": 102 + }, + { + "kind": "func", + "name": "Feature", + "signature": "func (n testEnv) Feature() feature.FeatureConnector", + "line": 106 + }, + { + "kind": "func", + "name": "Meter", + "signature": "func (n testEnv) Meter() *meteradapter.TestAdapter", + "line": 110 + }, + { + "kind": "func", + "name": "Namespace", + "signature": "func (n testEnv) Namespace() string", + "line": 114 + }, + { + "kind": "func", + "name": "NewTestEnv", + "signature": "func NewTestEnv(t *testing.T, ctx context.Context, namespace string) (TestEnv, error)", + "line": 123 + } + ], + "line_count": 263 + }, + "test/notification/webhook.go": { + "header": "\t\"context\"\n\t\"crypto/rand\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "NewCreateWebhookInput", + "signature": "func NewCreateWebhookInput(namespace string, id *string, desc string) notificationwebhook.CreateWebhookInput", + "line": 18 + }, + { + "kind": "struct", + "name": "WebhookTestSuite", + "signature": "type WebhookTestSuite struct", + "line": 38 + }, + { + "kind": "func", + "name": "Setup", + "signature": "func (s *WebhookTestSuite) Setup(ctx context.Context, t *testing.T)", + "line": 42 + }, + { + "kind": "func", + "name": "TestCreateWebhook", + "signature": "func (s *WebhookTestSuite) TestCreateWebhook(ctx context.Context, t *testing.T)", + "line": 49 + }, + { + "kind": "func", + "name": "TestUpdateWebhook", + "signature": "func (s *WebhookTestSuite) TestUpdateWebhook(ctx context.Context, t *testing.T)", + "line": 71 + }, + { + "kind": "func", + "name": "TestDeleteWebhook", + "signature": "func (s *WebhookTestSuite) TestDeleteWebhook(ctx context.Context, t *testing.T)", + "line": 110 + }, + { + "kind": "func", + "name": "TestGetWebhook", + "signature": "func (s *WebhookTestSuite) TestGetWebhook(ctx context.Context, t *testing.T)", + "line": 128 + }, + { + "kind": "func", + "name": "TestListWebhook", + "signature": "func (s *WebhookTestSuite) TestListWebhook(ctx context.Context, t *testing.T)", + "line": 154 + } + ], + "line_count": 209 + }, + "test/subscription/framework_test.go": { + "header": "\t\"context\"\n\t\"log/slog\"\n\t\"testing\"", + "symbols": [ + { + "kind": "struct", + "name": "testDeps", + "signature": "type testDeps struct", + "line": 38 + }, + { + "kind": "struct", + "name": "setupConfig", + "signature": "type setupConfig struct", + "line": 49 + }, + { + "kind": "func", + "name": "setup", + "signature": "func setup(t *testing.T, _ setupConfig) testDeps", + "line": 51 + }, + { + "kind": "func", + "name": "minimalCreateProfileInputTemplate", + "signature": "func minimalCreateProfileInputTemplate(appID app.AppID) billing.CreateProfileInput", + "line": 182 + } + ], + "line_count": 222 + }, + "test/subscription/scenario_editaligned_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestEditingEntitlementOfAlignedSub", + "signature": "func TestEditingEntitlementOfAlignedSub(t *testing.T)", + "line": 26 + } + ], + "line_count": 202 + }, + "test/subscription/scenario_editcancel_test.go": { + "header": "\t\"context\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestEditingAndCanceling", + "signature": "func TestEditingAndCanceling(t *testing.T)", + "line": 27 + } + ], + "line_count": 230 + }, + "test/subscription/scenario_entinnextphase_test.go": { + "header": "\t\"context\"\n\t\"testing\"\n\t\"github.com/alpacahq/alpacadecimal\"", + "symbols": [ + { + "kind": "func", + "name": "TestSubWithMeteredEntitlement", + "signature": "func TestSubWithMeteredEntitlement(t *testing.T)", + "line": 23 + } + ], + "line_count": 169 + }, + "test/subscription/scenario_firstofmonth_test.go": { + "header": "\t\"context\"\n\t\"slices\"\n\t\"strings\"", + "symbols": [ + { + "kind": "func", + "name": "TestBillingOnFirstOfMonth", + "signature": "func TestBillingOnFirstOfMonth(t *testing.T)", + "line": 27 + }, + { + "kind": "func", + "name": "TestAnchoredAlignment_MidMonthStart_EarlyCancel_IssueNextAnchor", + "signature": "func TestAnchoredAlignment_MidMonthStart_EarlyCancel_IssueNextAnchor(t *testing.T)", + "line": 315 + } + ], + "line_count": 429 + }, + "tools/migrate/README.md": { + "header": "## View SQL Helper\n\nGenerate SQL definitions for `ent.View` schemas:\n\n```bash\nmake generate-view-sql\n```\n\nThis writes `tools/migrate/views.sql` by loading `openmeter/ent/schema` via Ent's schema loader and emitting Postgres `CREATE VIEW` statements from `EntSQL` view annotations.", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/cmd/viewgen/main.go": { + "header": "\t\"flag\"\n\t\"fmt\"\n\t\"os\"", + "symbols": [ + { + "kind": "func", + "name": "main", + "signature": "func main()", + "line": 11 + }, + { + "kind": "func", + "name": "exitf", + "signature": "func exitf(format string, args ...any)", + "line": 23 + } + ], + "line_count": 26 + }, + "tools/migrate/dedupe_tax_codes_by_app_mapping_test.go": { + "header": "\t\"database/sql\"\n\t\"fmt\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestDedupeTaxCodesByAppMappingMigration", + "signature": "func TestDedupeTaxCodesByAppMappingMigration(t *testing.T)", + "line": 13 + } + ], + "line_count": 530 + }, + "tools/migrate/feature_advanced_meter_group_by_filters_test.go": { + "header": "\t\"database/sql\"\n\t\"testing\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "TestFeatureAdvancedMeterGroupByFiltersMigration", + "signature": "func TestFeatureAdvancedMeterGroupByFiltersMigration(t *testing.T)", + "line": 11 + } + ], + "line_count": 219 + }, + "tools/migrate/feature_meter_id_test.go": { + "header": "\t\"database/sql\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestFeatureMeterIDMigration", + "signature": "func TestFeatureMeterIDMigration(t *testing.T)", + "line": 12 + } + ], + "line_count": 189 + }, + "tools/migrate/flatfee_runs_test.go": { + "header": "\t\"database/sql\"\n\t\"testing\"\n\t\"time\"", + "symbols": [ + { + "kind": "func", + "name": "TestFlatFeeRunsCreditOnlyMigration", + "signature": "func TestFlatFeeRunsCreditOnlyMigration(t *testing.T)", + "line": 12 + }, + { + "kind": "func", + "name": "insertFlatFeeRunMigrationCustomer", + "signature": "func insertFlatFeeRunMigrationCustomer(t *testing.T, db *sql.DB, namespace, customerID string)", + "line": 106 + }, + { + "kind": "func", + "name": "insertCreditOnlyFlatFeeCharge", + "signature": "func insertCreditOnlyFlatFeeCharge(t *testing.T, db *sql.DB, namespace, customerID, chargeID, uniqueReferenceID string, servicePeriodFrom, servicePeriodTo time.Time, amount string)", + "line": 123 + }, + { + "kind": "func", + "name": "assertCreditOnlyFlatFeeRunBackfilled", + "signature": "func assertCreditOnlyFlatFeeRunBackfilled(t *testing.T, db *sql.DB, namespace, chargeID, amountAfterProration, creditedAmount string)", + "line": 181 + } + ], + "line_count": 211 + }, + "tools/migrate/fs.go": { + "header": "\t\"bufio\"\n\t\"bytes\"\n\t\"io/fs\"", + "symbols": [ + { + "kind": "interface", + "name": "FS", + "signature": "type FS interface", + "line": 11 + }, + { + "kind": "struct", + "name": "SourceWrapper", + "signature": "type SourceWrapper struct", + "line": 20 + }, + { + "kind": "func", + "name": "NewSourceWrapper", + "signature": "func NewSourceWrapper(fsys fs.FS) *SourceWrapper", + "line": 24 + }, + { + "kind": "func", + "name": "Open", + "signature": "func (s *SourceWrapper) Open(name string) (fs.File, error)", + "line": 28 + }, + { + "kind": "func", + "name": "ReadDir", + "signature": "func (s *SourceWrapper) ReadDir(path string) ([]fs.DirEntry, error)", + "line": 32 + }, + { + "kind": "func", + "name": "ReadFile", + "signature": "func (s *SourceWrapper) ReadFile(name string) ([]byte, error)", + "line": 78 + } + ], + "line_count": 80 + }, + "tools/migrate/fs_test.go": { + "header": "\t\"embed\"\n\t\"io/fs\"\n\t\"testing\"", + "symbols": [ + { + "kind": "func", + "name": "TestSourceWrapper", + "signature": "func TestSourceWrapper(t *testing.T)", + "line": 18 + } + ], + "line_count": 69 + }, + "tools/migrate/generate-sqlc-testdata.sh": { + "header": "#!/usr/bin/env bash\n# Generate SQLC testdata for a specific migration version.\n#\n# Given a golang-migrate version timestamp (e.g. 20240826120919) this script:\n# 1. Spins up a clean postgres via docker compose (reusing the repo service)\n# 2. Runs all migrations up to the requested version against a scratch database\n# 3. Dumps the resulting schema with pg_dump\n# 4. Writes sqlc.yaml + placeholder queries alongside the schema\n# 5. Runs `sqlc generate` to produce the Go structs\n#\n# Requires: docker compose, migrate (golang-migrate), pg_dump, sqlc (all provided\n# by the repo's nix dev shell).\n#\n# Usage: VERSION=20240826120919 ./tools/migrate/generate-sqlc-testdata.sh\n# (or: make generate-sqlc-testdata VERSION=20240826120919)\n\nset -euo pipefail\n\nif [[ -z \"${VERSION:-}\" ]]; then\n\techo \"ERROR: VERSION is required (e.g. VERSION=20240826120919)\" >&2", + "symbols": [], + "line_count": 95 + }, + "tools/migrate/ledger_tax_behavior_test.go": { + "header": "\t\"database/sql\"\n\t\"testing\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "TestLedgerTaxBehaviorMigrationRollback", + "signature": "func TestLedgerTaxBehaviorMigrationRollback(t *testing.T)", + "line": 23 + }, + { + "kind": "func", + "name": "insertTaxBehaviorRoute", + "signature": "func insertTaxBehaviorRoute(\n\tt *testing.T,\n\tdb *sql.DB,\n\taccountID string,\n\trouteID string,\n\tnamespace string,\n\tv2KeyVersion string,\n\tv2KeyValue string,\n)", + "line": 74 + } + ], + "line_count": 99 + }, + "tools/migrate/llmcost_normalize_providers_test.go": { + "header": "\t\"database/sql\"\n\t\"testing\"\n\t\"github.com/oklog/ulid/v2\"", + "symbols": [ + { + "kind": "func", + "name": "TestLLMCostNormalizeProvidersMigration", + "signature": "func TestLLMCostNormalizeProvidersMigration(t *testing.T)", + "line": 11 + } + ], + "line_count": 208 + }, + "tools/migrate/migrate.go": { + "header": "\t\"embed\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "Migrate", + "signature": "type Migrate struct", + "line": 29 + }, + { + "kind": "func", + "name": "LatestVersion", + "signature": "func (m *Migrate) LatestVersion() (uint, error)", + "line": 36 + }, + { + "kind": "func", + "name": "Up", + "signature": "func (m *Migrate) Up() error", + "line": 55 + }, + { + "kind": "func", + "name": "Down", + "signature": "func (m *Migrate) Down() error", + "line": 59 + }, + { + "kind": "func", + "name": "Migrate", + "signature": "func (m *Migrate) Migrate(version uint) error", + "line": 63 + }, + { + "kind": "func", + "name": "filterErrNoChange", + "signature": "func (m *Migrate) filterErrNoChange(err error) error", + "line": 67 + }, + { + "kind": "struct", + "name": "logger", + "signature": "type logger struct", + "line": 76 + }, + { + "kind": "func", + "name": "Printf", + "signature": "func (l *logger) Printf(format string, v ...interface{})", + "line": 82 + }, + { + "kind": "func", + "name": "Verbose", + "signature": "func (l *logger) Verbose() bool", + "line": 86 + }, + { + "kind": "func", + "name": "NewLogger", + "signature": "func NewLogger(log *slog.Logger) migrate.Logger", + "line": 90 + }, + { + "kind": "struct", + "name": "MigrationsConfig", + "signature": "type MigrationsConfig struct", + "line": 97 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m *MigrationsConfig) Validate() error", + "line": 103 + }, + { + "kind": "struct", + "name": "MigrateOptions", + "signature": "type MigrateOptions struct", + "line": 125 + }, + { + "kind": "func", + "name": "Validate", + "signature": "func (m *MigrateOptions) Validate() error", + "line": 131 + }, + { + "kind": "func", + "name": "New", + "signature": "func New(options MigrateOptions) (*Migrate, error)", + "line": 150 + }, + { + "kind": "struct", + "name": "waitForMigrationOptions", + "signature": "type waitForMigrationOptions struct", + "line": 180 + }, + { + "kind": "func", + "name": "getWaitForMigrationOptions", + "signature": "func getWaitForMigrationOptions(waitOpts []WaitForMigrationOption) waitForMigrationOptions", + "line": 185 + }, + { + "kind": "func", + "name": "WaitForMigrationJob", + "signature": "func (m *Migrate) WaitForMigrationJob(waitOpts ...WaitForMigrationOption) error", + "line": 197 + }, + { + "kind": "func", + "name": "setMigrationTableName", + "signature": "func setMigrationTableName(conn, tableName string) (string, error)", + "line": 236 + }, + { + "kind": "func", + "name": "CloseOrLogError", + "signature": "func (m *Migrate) CloseOrLogError()", + "line": 249 + } + ], + "line_count": 259 + }, + "tools/migrate/migrate_test.go": { + "header": "\t\"database/sql\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestUpDownUp", + "signature": "func TestUpDownUp(t *testing.T)", + "line": 18 + }, + { + "kind": "struct", + "name": "stop", + "signature": "type stop struct", + "line": 29 + }, + { + "kind": "func", + "name": "add", + "signature": "func (s *stops) add(stops stops)", + "line": 39 + }, + { + "kind": "func", + "name": "TestAdd", + "signature": "func TestAdd(t *testing.T)", + "line": 44 + }, + { + "kind": "func", + "name": "ups", + "signature": "func (s stops) ups() stops", + "line": 55 + }, + { + "kind": "func", + "name": "downs", + "signature": "func (s stops) downs() stops", + "line": 70 + }, + { + "kind": "struct", + "name": "runner", + "signature": "type runner struct", + "line": 85 + }, + { + "kind": "func", + "name": "Test", + "signature": "func (r runner) Test(t *testing.T)", + "line": 89 + }, + { + "kind": "func", + "name": "purgeDB", + "signature": "func (r runner) purgeDB(t *testing.T, db *testutils.TestDB)", + "line": 153 + } + ], + "line_count": 219 + }, + "tools/migrate/migrations/20240826120919_init.down.sql": { + "header": "-- reverse: create index \"usagereset_namespace_entitlement_id_reset_time\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_namespace_entitlement_id_reset_time\";\n-- reverse: create index \"usagereset_namespace_entitlement_id\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_namespace_entitlement_id\";\n-- reverse: create index \"usagereset_id\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_id\";\n-- reverse: create \"usage_resets\" table\nDROP TABLE \"usage_resets\";\n-- reverse: create \"notification_event_delivery_status_events\" table\nDROP TABLE \"notification_event_delivery_status_events\";\n-- reverse: create index \"notificationevent_namespace_type\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_namespace_type\";\n-- reverse: create index \"notificationevent_namespace_id\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_namespace_id\";\n-- reverse: create index \"notificationevent_id\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_id\";\n-- reverse: create index \"notificationevent_annotations\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_annotations\";\n-- reverse: create \"notification_events\" table\nDROP TABLE \"notification_events\";", + "symbols": [], + "line_count": 84 + }, + "tools/migrate/migrations/20240826120919_init.up.sql": { + "header": "-- create \"features\" table\nCREATE TABLE \"features\" (\n \"id\" character(26) NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"namespace\" character varying NOT NULL,\n \"name\" character varying NOT NULL,\n \"key\" character varying NOT NULL,\n \"meter_slug\" character varying NULL,\n \"meter_group_by_filters\" jsonb NULL,\n \"archived_at\" timestamptz NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"feature_id\" to table: \"features\"\nCREATE INDEX \"feature_id\" ON \"features\" (\"id\");\n-- create index \"feature_namespace_id\" to table: \"features\"\nCREATE INDEX \"feature_namespace_id\" ON \"features\" (\"namespace\", \"id\");\n-- create \"entitlements\" table", + "symbols": [], + "line_count": 217 + }, + "tools/migrate/migrations/20240903155435_entitlement-expired-index.down.sql": { + "header": "-- reverse: create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nDROP INDEX \"entitlement_current_usage_period_end_deleted_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20240903155435_entitlement-expired-index.up.sql": { + "header": "-- create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nCREATE INDEX \"entitlement_current_usage_period_end_deleted_at\" ON \"entitlements\" (\"current_usage_period_end\", \"deleted_at\");", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20240917172257_billing-entities.down.sql": { + "header": "-- reverse: create index \"billinginvoiceitem_namespace_invoice_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_invoice_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_customer_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_customer_id\";\n-- reverse: create index \"billinginvoiceitem_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_id\";\n-- reverse: create \"billing_invoice_items\" table\nDROP TABLE \"billing_invoice_items\";\n-- reverse: create index \"billinginvoice_namespace_status\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_status\";\n-- reverse: create index \"billinginvoice_namespace_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_id\";\n-- reverse: create index \"billinginvoice_namespace_customer_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_customer_id\";\n-- reverse: create index \"billinginvoice_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_id\";\n-- reverse: create \"billing_invoices\" table\nDROP TABLE \"billing_invoices\";", + "symbols": [], + "line_count": 36 + }, + "tools/migrate/migrations/20240917172257_billing-entities.up.sql": { + "header": "-- create \"billing_workflow_configs\" table\nCREATE TABLE \"billing_workflow_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"alignment\" character varying NOT NULL,\n \"collection_period_seconds\" bigint NOT NULL,\n \"invoice_auto_advance\" boolean NOT NULL,\n \"invoice_draft_period_seconds\" bigint NOT NULL,\n \"invoice_due_after_seconds\" bigint NOT NULL,\n \"invoice_collection_method\" character varying NOT NULL,\n \"invoice_line_item_resolution\" character varying NOT NULL,\n \"invoice_line_item_per_subject\" boolean NOT NULL DEFAULT false,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billingworkflowconfig_id\" to table: \"billing_workflow_configs\"\nCREATE INDEX \"billingworkflowconfig_id\" ON \"billing_workflow_configs\" (\"id\");\n-- create index \"billingworkflowconfig_namespace_id\" to table: \"billing_workflow_configs\"", + "symbols": [], + "line_count": 108 + }, + "tools/migrate/migrations/20240918204720_customer.down.sql": { + "header": "-- reverse: create index \"customersubjects_customer_id_subject_key\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_customer_id_subject_key\";\n-- reverse: create \"customer_subjects\" table\nDROP TABLE \"customer_subjects\";\n-- reverse: create index \"customer_namespace_key\" to table: \"customers\"\nDROP INDEX \"customer_namespace_key\";\n-- reverse: create index \"customer_namespace_id\" to table: \"customers\"\nDROP INDEX \"customer_namespace_id\";\n-- reverse: create index \"customer_namespace\" to table: \"customers\"\nDROP INDEX \"customer_namespace\";\n-- reverse: create index \"customer_id\" to table: \"customers\"\nDROP INDEX \"customer_id\";\n-- reverse: create \"customers\" table\nDROP TABLE \"customers\";\n-- reverse: create index \"usagereset_namespace\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_namespace\";\n-- reverse: create index \"notificationeventdeliverystatus_namespace\" to table: \"notification_event_delivery_status\"\nDROP INDEX \"notificationeventdeliverystatus_namespace\";\n-- reverse: create index \"notificationevent_namespace\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_namespace\";", + "symbols": [], + "line_count": 38 + }, + "tools/migrate/migrations/20240918204720_customer.up.sql": { + "header": "-- create index \"grant_namespace\" to table: \"grants\"\nCREATE INDEX \"grant_namespace\" ON \"grants\" (\"namespace\");\n-- create index \"balancesnapshot_namespace\" to table: \"balance_snapshots\"\nCREATE INDEX \"balancesnapshot_namespace\" ON \"balance_snapshots\" (\"namespace\");\n-- create index \"billinginvoice_namespace\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace\" ON \"billing_invoices\" (\"namespace\");\n-- create index \"billingprofile_namespace\" to table: \"billing_profiles\"\nCREATE INDEX \"billingprofile_namespace\" ON \"billing_profiles\" (\"namespace\");\n-- create index \"billingworkflowconfig_namespace\" to table: \"billing_workflow_configs\"\nCREATE INDEX \"billingworkflowconfig_namespace\" ON \"billing_workflow_configs\" (\"namespace\");\n-- create index \"entitlement_namespace\" to table: \"entitlements\"\nCREATE INDEX \"entitlement_namespace\" ON \"entitlements\" (\"namespace\");\n-- create index \"billinginvoiceitem_namespace\" to table: \"billing_invoice_items\"\nCREATE INDEX \"billinginvoiceitem_namespace\" ON \"billing_invoice_items\" (\"namespace\");\n-- create index \"notificationchannel_namespace\" to table: \"notification_channels\"\nCREATE INDEX \"notificationchannel_namespace\" ON \"notification_channels\" (\"namespace\");\n-- create index \"notificationrule_namespace\" to table: \"notification_rules\"\nCREATE INDEX \"notificationrule_namespace\" ON \"notification_rules\" (\"namespace\");\n-- create index \"notificationevent_namespace\" to table: \"notification_events\"\nCREATE INDEX \"notificationevent_namespace\" ON \"notification_events\" (\"namespace\");", + "symbols": [], + "line_count": 68 + }, + "tools/migrate/migrations/20240919144910_customer-timezone.down.sql": { + "header": "-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" DROP COLUMN \"timezone\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20240919144910_customer-timezone.up.sql": { + "header": "-- modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"timezone\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20240920070940_indexing-fixes.down.sql": { + "header": "-- atlas:nolint MF101\n-- reverse: create index \"usagereset_id\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_id\";\n-- reverse: drop index \"usagereset_id\" from table: \"usage_resets\"\nCREATE INDEX \"usagereset_id\" ON \"usage_resets\" (\"id\");\n-- reverse: create index \"notificationrule_id\" to table: \"notification_rules\"\nDROP INDEX \"notificationrule_id\";\n-- reverse: drop index \"notificationrule_id\" from table: \"notification_rules\"\nCREATE INDEX \"notificationrule_id\" ON \"notification_rules\" (\"id\");\n-- reverse: create index \"notificationevent_id\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_id\";\n-- reverse: drop index \"notificationevent_id\" from table: \"notification_events\"\nCREATE INDEX \"notificationevent_id\" ON \"notification_events\" (\"id\");\n-- reverse: create index \"notificationeventdeliverystatus_id\" to table: \"notification_event_delivery_status\"\nDROP INDEX \"notificationeventdeliverystatus_id\";\n-- reverse: drop index \"notificationeventdeliverystatus_id\" from table: \"notification_event_delivery_status\"\nCREATE INDEX \"notificationeventdeliverystatus_id\" ON \"notification_event_delivery_status\" (\"id\");\n-- reverse: create index \"notificationchannel_id\" to table: \"notification_channels\"\nDROP INDEX \"notificationchannel_id\";\n-- reverse: drop index \"notificationchannel_id\" from table: \"notification_channels\"", + "symbols": [], + "line_count": 61 + }, + "tools/migrate/migrations/20240920070940_indexing-fixes.up.sql": { + "header": "\n-- drop index \"billinginvoiceitem_id\" from table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_id\";\n-- create index \"billinginvoiceitem_id\" to table: \"billing_invoice_items\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billinginvoiceitem_id\" ON \"billing_invoice_items\" (\"id\");\n-- drop index \"billinginvoice_id\" from table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_id\";\n-- create index \"billinginvoice_id\" to table: \"billing_invoices\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billinginvoice_id\" ON \"billing_invoices\" (\"id\");\n-- drop index \"billingprofile_id\" from table: \"billing_profiles\"\nDROP INDEX \"billingprofile_id\";\n-- create index \"billingprofile_id\" to table: \"billing_profiles\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billingprofile_id\" ON \"billing_profiles\" (\"id\");\n-- drop index \"billingworkflowconfig_id\" from table: \"billing_workflow_configs\"\nDROP INDEX \"billingworkflowconfig_id\";\n-- create index \"billingworkflowconfig_id\" to table: \"billing_workflow_configs\"\n-- atlas:nolint MF101", + "symbols": [], + "line_count": 76 + }, + "tools/migrate/migrations/20240923170525_customer_drop_providers.down.sql": { + "header": "-- reverse: modify \"customers\" table\n-- atlas:nolint DS103\nALTER TABLE \"customers\" ADD COLUMN \"payment_provider\" character varying NULL, ADD COLUMN \"invoicing_provider\" character varying NULL, ADD COLUMN \"tax_provider\" character varying NULL;", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20240923170525_customer_drop_providers.up.sql": { + "header": "-- modify \"customers\" table\nALTER TABLE \"customers\" DROP COLUMN \"tax_provider\", DROP COLUMN \"invoicing_provider\", DROP COLUMN \"payment_provider\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20240923180033_customer_drop_key.down.sql": { + "header": "-- reverse: create index \"customersubjects_namespace_subject_key\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_subject_key\";\n\n-- reverse: create index \"customersubjects_namespace\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace\";\n\n-- reverse: modify \"customer_subjects\" table\nALTER TABLE\n \"customer_subjects\" DROP CONSTRAINT \"customer_subjects_customers_subjects\",\n DROP COLUMN \"namespace\",\nADD\n CONSTRAINT \"customer_subjects_customers_subjects\" FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n\n-- reverse: modify \"customers\" table\n--\n--\n-- manual interventions as we're breaking lint rules\n-- atlas:nolint MF103\nALTER TABLE\n \"customers\"", + "symbols": [], + "line_count": 24 + }, + "tools/migrate/migrations/20240923180033_customer_drop_key.up.sql": { + "header": "-- modify \"customers\" table\n-- atlas:nolint DS103\nALTER TABLE\n \"customers\" DROP COLUMN \"key\";\n\n-- modify \"customer_subjects\" table\n-- atlas:nolint MF103\nALTER TABLE\n \"customer_subjects\" DROP CONSTRAINT \"customer_subjects_customers_subjects\",\nADD\n COLUMN \"namespace\" character varying NOT NULL,\nADD\n CONSTRAINT \"customer_subjects_customers_subjects\" FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n\n-- create index \"customersubjects_namespace\" to table: \"customer_subjects\"\n-- atlas:nolint MF103\nCREATE INDEX \"customersubjects_namespace\" ON \"customer_subjects\" (\"namespace\");\n\n-- create index \"customersubjects_namespace_subject_key\" to table: \"customer_subjects\"\n--", + "symbols": [], + "line_count": 24 + }, + "tools/migrate/migrations/20240924164504_billing-profile.down.sql": { + "header": "-- reverse: rename a column from \"invoice_line_item_resolution\" to \"invoice_item_resolution\"\nALTER TABLE \"billing_workflow_configs\" RENAME COLUMN \"invoice_item_resolution\" TO \"invoice_line_item_resolution\";\n-- reverse: rename a column from \"collection_period_seconds\" to \"item_collection_period_seconds\"\nALTER TABLE \"billing_workflow_configs\" RENAME COLUMN \"item_collection_period_seconds\" TO \"collection_period_seconds\";\n-- reverse: rename a column from \"alignment\" to \"collection_alignment\"\nALTER TABLE \"billing_workflow_configs\" RENAME COLUMN \"collection_alignment\" TO \"alignment\";\n-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_item_per_subject\", DROP COLUMN \"timezone\", ADD COLUMN \"invoice_line_item_per_subject\" boolean NOT NULL DEFAULT false;\n-- reverse: create index \"billingprofile_namespace_default_deleted_at\" to table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_default_deleted_at\";\n-- reverse: create index \"billing_profiles_workflow_config_id_key\" to table: \"billing_profiles\"\nDROP INDEX \"billing_profiles_workflow_config_id_key\";\n-- reverse: create index \"billingprofile_namespace_id\" to table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_id\";\n-- reverse: modify \"billing_profiles\" table\nALTER TABLE \"billing_profiles\" DROP COLUMN \"supplier_name\", DROP COLUMN \"payment_provider\", DROP COLUMN \"invoicing_provider\", DROP COLUMN \"tax_provider\", DROP COLUMN \"supplier_address_phone_number\", DROP COLUMN \"supplier_address_line2\", DROP COLUMN \"supplier_address_line1\", DROP COLUMN \"supplier_address_city\", DROP COLUMN \"supplier_address_state\", DROP COLUMN \"supplier_address_postal_code\", DROP COLUMN \"supplier_address_country\", DROP COLUMN \"metadata\", ADD COLUMN \"provider_config\" jsonb NOT NULL, ADD COLUMN \"key\" character varying NOT NULL;\n-- reverse: drop index \"billingprofile_namespace_id\" from table: \"billing_profiles\"\nCREATE INDEX \"billingprofile_namespace_id\" ON \"billing_profiles\" (\"namespace\", \"id\");\n-- reverse: drop index \"billingprofile_namespace_default\" from table: \"billing_profiles\"\nCREATE INDEX \"billingprofile_namespace_default\" ON \"billing_profiles\" (\"namespace\", \"default\");", + "symbols": [], + "line_count": 24 + }, + "tools/migrate/migrations/20240924164504_billing-profile.up.sql": { + "header": "-- modify \"billing_invoices\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_invoices\" DROP COLUMN \"provider_config\", DROP COLUMN \"provider_reference\", ADD COLUMN \"tax_provider\" character varying NULL, ADD COLUMN \"invoicing_provider\" character varying NULL, ADD COLUMN \"payment_provider\" character varying NULL;\n-- create index \"billing_invoices_workflow_config_id_key\" to table: \"billing_invoices\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billing_invoices_workflow_config_id_key\" ON \"billing_invoices\" (\"workflow_config_id\");\n-- drop index \"billingprofile_namespace_default\" from table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_default\";\n-- drop index \"billingprofile_namespace_id\" from table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_id\";\n-- modify \"billing_profiles\" table\n-- atlas:nolint MF103 DS103\nALTER TABLE \"billing_profiles\" DROP COLUMN \"key\", DROP COLUMN \"provider_config\", ADD COLUMN \"metadata\" jsonb NULL, ADD COLUMN \"supplier_address_country\" character varying NULL, ADD COLUMN \"supplier_address_postal_code\" character varying NULL, ADD COLUMN \"supplier_address_state\" character varying NULL, ADD COLUMN \"supplier_address_city\" character varying NULL, ADD COLUMN \"supplier_address_line1\" character varying NULL, ADD COLUMN \"supplier_address_line2\" character varying NULL, ADD COLUMN \"supplier_address_phone_number\" character varying NULL, ADD COLUMN \"tax_provider\" character varying NOT NULL, ADD COLUMN \"invoicing_provider\" character varying NOT NULL, ADD COLUMN \"payment_provider\" character varying NOT NULL, ADD COLUMN \"supplier_name\" character varying NOT NULL;\n-- create index \"billingprofile_namespace_id\" to table: \"billing_profiles\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billingprofile_namespace_id\" ON \"billing_profiles\" (\"namespace\", \"id\");\n-- create index \"billing_profiles_workflow_config_id_key\" to table: \"billing_profiles\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billing_profiles_workflow_config_id_key\" ON \"billing_profiles\" (\"workflow_config_id\");\n-- create index \"billingprofile_namespace_default_deleted_at\" to table: \"billing_profiles\"", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20240924220843_billing-customer-override.down.sql": { + "header": "-- reverse: create index \"billingcustomeroverride_namespace_id\" to table: \"billing_customer_overrides\"\nDROP INDEX \"billingcustomeroverride_namespace_id\";\n-- reverse: create index \"billingcustomeroverride_namespace_customer_id\" to table: \"billing_customer_overrides\"\nDROP INDEX \"billingcustomeroverride_namespace_customer_id\";\n-- reverse: create index \"billingcustomeroverride_namespace\" to table: \"billing_customer_overrides\"\nDROP INDEX \"billingcustomeroverride_namespace\";\n-- reverse: create index \"billingcustomeroverride_id\" to table: \"billing_customer_overrides\"\nDROP INDEX \"billingcustomeroverride_id\";\n-- reverse: create index \"billing_customer_overrides_customer_id_key\" to table: \"billing_customer_overrides\"\nDROP INDEX \"billing_customer_overrides_customer_id_key\";\n-- reverse: create \"billing_customer_overrides\" table\nDROP TABLE \"billing_customer_overrides\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20240924220843_billing-customer-override.up.sql": { + "header": "-- create \"billing_customer_overrides\" table\nCREATE TABLE \"billing_customer_overrides\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"collection_alignment\" character varying NULL,\n \"item_collection_period_seconds\" bigint NULL,\n \"invoice_auto_advance\" boolean NULL,\n \"invoice_draft_period_seconds\" bigint NULL,\n \"invoice_due_after_seconds\" bigint NULL,\n \"invoice_collection_method\" character varying NULL,\n \"invoice_item_resolution\" character varying NULL,\n \"invoice_item_per_subject\" boolean NULL,\n \"billing_profile_id\" character(26) NULL,\n \"customer_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"billing_customer_overrides_billing_profiles_billing_customer_ov\" FOREIGN KEY (\"billing_profile_id\") REFERENCES \"billing_profiles\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL,\n CONSTRAINT \"billing_customer_overrides_customers_billing_customer_override\" FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE", + "symbols": [], + "line_count": 31 + }, + "tools/migrate/migrations/20240926164233_pending-invoice-items.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"code\", DROP COLUMN \"series\", ADD COLUMN \"total_amount\" numeric NOT NULL, ADD COLUMN \"key\" character varying NOT NULL;\n-- reverse: modify \"billing_invoice_items\" table\nALTER TABLE \"billing_invoice_items\" DROP COLUMN \"name\", DROP COLUMN \"type\", ALTER COLUMN \"quantity\" SET NOT NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20240926164233_pending-invoice-items.up.sql": { + "header": "-- modify \"billing_invoice_items\" table\n-- atlas:nolint MF103\nALTER TABLE \"billing_invoice_items\" ALTER COLUMN \"quantity\" DROP NOT NULL, ADD COLUMN \"type\" character varying NOT NULL, ADD COLUMN \"name\" character varying NOT NULL;\n-- modify \"billing_invoices\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_invoices\" DROP COLUMN \"key\", DROP COLUMN \"total_amount\", ADD COLUMN \"series\" character varying NULL, ADD COLUMN \"code\" character varying NULL;", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20241013151355_apps.down.sql": { + "header": "-- reverse: create index \"appstripecustomer_namespace_app_id_customer_id\" to table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_namespace_app_id_customer_id\";\n-- reverse: create index \"appstripecustomer_namespace\" to table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_namespace\";\n-- reverse: create index \"appstripecustomer_app_id_stripe_customer_id\" to table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_app_id_stripe_customer_id\";\n-- reverse: create \"app_stripe_customers\" table\nDROP TABLE \"app_stripe_customers\";\n-- reverse: create index \"appstripe_namespace\" to table: \"app_stripes\"\nDROP INDEX \"appstripe_namespace\";\n-- reverse: create index \"appstripe_id\" to table: \"app_stripes\"\nDROP INDEX \"appstripe_id\";\n-- reverse: create \"app_stripes\" table\nDROP TABLE \"app_stripes\";\n-- reverse: create index \"appcustomer_namespace_app_id_customer_id\" to table: \"app_customers\"\nDROP INDEX \"appcustomer_namespace_app_id_customer_id\";\n-- reverse: create index \"appcustomer_namespace\" to table: \"app_customers\"\nDROP INDEX \"appcustomer_namespace\";\n-- reverse: create \"app_customers\" table\nDROP TABLE \"app_customers\";", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20241013151355_apps.up.sql": { + "header": "-- create \"apps\" table\nCREATE TABLE \"apps\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NOT NULL,\n \"type\" character varying NOT NULL,\n \"status\" character varying NOT NULL,\n \"is_default\" boolean NOT NULL DEFAULT false,\n PRIMARY KEY (\"id\")\n);\n-- create index \"app_id\" to table: \"apps\"\nCREATE UNIQUE INDEX \"app_id\" ON \"apps\" (\"id\");\n-- create index \"app_namespace\" to table: \"apps\"\nCREATE INDEX \"app_namespace\" ON \"apps\" (\"namespace\");\n-- create index \"app_namespace_id\" to table: \"apps\"", + "symbols": [], + "line_count": 84 + }, + "tools/migrate/migrations/20241017090045_unify-resource-def.down.sql": { + "header": "-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" DROP COLUMN \"description\";\n-- reverse: modify \"billing_profiles\" table\nALTER TABLE \"billing_profiles\" DROP COLUMN \"description\", DROP COLUMN \"name\";\n-- reverse: modify \"apps\" table\nALTER TABLE \"apps\" ALTER COLUMN \"description\" SET NOT NULL;", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20241017090045_unify-resource-def.up.sql": { + "header": "-- modify \"apps\" table\nALTER TABLE \"apps\" ALTER COLUMN \"description\" DROP NOT NULL;\n-- modify \"billing_profiles\" table\n-- atlas:nolint MF103\nALTER TABLE \"billing_profiles\" ADD COLUMN \"name\" character varying NOT NULL, ADD COLUMN \"description\" character varying NULL;\n-- modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"description\" character varying NULL;", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20241017135535_entitlement_scheduling.down.sql": { + "header": "-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP COLUMN \"active_to\", DROP COLUMN \"active_from\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241017135535_entitlement_scheduling.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"active_from\" timestamptz NULL, ADD COLUMN \"active_to\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241021124045_billing-profile.down.sql": { + "header": "-- reverse: modify \"billing_profiles\" table\nALTER TABLE \"billing_profiles\" DROP CONSTRAINT \"billing_profiles_apps_tax_app\", DROP CONSTRAINT \"billing_profiles_apps_payment_app\", DROP CONSTRAINT \"billing_profiles_apps_invoicing_app\", DROP COLUMN \"payment_app_id\", DROP COLUMN \"invoicing_app_id\", DROP COLUMN \"tax_app_id\", DROP COLUMN \"supplier_tax_code\", ADD COLUMN \"payment_provider\" character varying NOT NULL, ADD COLUMN \"invoicing_provider\" character varying NOT NULL, ADD COLUMN \"tax_provider\" character varying NOT NULL;\n-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_due_after\", DROP COLUMN \"invoice_draft_period\", DROP COLUMN \"item_collection_period\", ADD COLUMN \"invoice_item_per_subject\" boolean NOT NULL, ADD COLUMN \"timezone\" character varying NULL, ADD COLUMN \"invoice_item_resolution\" character varying NOT NULL, ADD COLUMN \"invoice_due_after_seconds\" bigint NOT NULL, ADD COLUMN \"invoice_draft_period_seconds\" bigint NOT NULL, ADD COLUMN \"item_collection_period_seconds\" bigint NOT NULL;\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"payment_provider\" character varying NULL, ADD COLUMN \"invoicing_provider\" character varying NULL, ADD COLUMN \"tax_provider\" character varying NULL;\n-- reverse: modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"invoice_due_after\", DROP COLUMN \"invoice_draft_period\", DROP COLUMN \"item_collection_period\", ADD COLUMN \"invoice_item_per_subject\" boolean NULL, ADD COLUMN \"invoice_item_resolution\" character varying NULL, ADD COLUMN \"invoice_due_after_seconds\" bigint NULL, ADD COLUMN \"invoice_draft_period_seconds\" bigint NULL, ADD COLUMN \"item_collection_period_seconds\" bigint NULL;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241021124045_billing-profile.up.sql": { + "header": "-- modify \"billing_customer_overrides\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"item_collection_period_seconds\", DROP COLUMN \"invoice_draft_period_seconds\", DROP COLUMN \"invoice_due_after_seconds\", DROP COLUMN \"invoice_item_resolution\", DROP COLUMN \"invoice_item_per_subject\", ADD COLUMN \"item_collection_period\" character varying NULL, ADD COLUMN \"invoice_draft_period\" character varying NULL, ADD COLUMN \"invoice_due_after\" character varying NULL;\n-- modify \"billing_invoices\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_invoices\" DROP COLUMN \"tax_provider\", DROP COLUMN \"invoicing_provider\", DROP COLUMN \"payment_provider\";\n-- modify \"billing_workflow_configs\" table\n-- atlas:nolint DS103 MF103\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"item_collection_period_seconds\", DROP COLUMN \"invoice_draft_period_seconds\", DROP COLUMN \"invoice_due_after_seconds\", DROP COLUMN \"invoice_item_resolution\", DROP COLUMN \"timezone\", DROP COLUMN \"invoice_item_per_subject\", ADD COLUMN \"item_collection_period\" character varying NOT NULL, ADD COLUMN \"invoice_draft_period\" character varying NOT NULL, ADD COLUMN \"invoice_due_after\" character varying NOT NULL;\n-- modify \"billing_profiles\" table\n-- atlas:nolint DS103 MF103\nALTER TABLE \"billing_profiles\" DROP COLUMN \"tax_provider\", DROP COLUMN \"invoicing_provider\", DROP COLUMN \"payment_provider\", ADD COLUMN \"supplier_tax_code\" character varying NULL, ADD COLUMN \"tax_app_id\" character(26) NOT NULL, ADD COLUMN \"invoicing_app_id\" character(26) NOT NULL, ADD COLUMN \"payment_app_id\" character(26) NOT NULL, ADD\n CONSTRAINT \"billing_profiles_apps_invoicing_app\" FOREIGN KEY (\"invoicing_app_id\") REFERENCES \"apps\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD\n CONSTRAINT \"billing_profiles_apps_payment_app\" FOREIGN KEY (\"payment_app_id\") REFERENCES \"apps\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD\n CONSTRAINT \"billing_profiles_apps_tax_app\" FOREIGN KEY (\"tax_app_id\") REFERENCES \"apps\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;", + "symbols": [], + "line_count": 15 + }, + "tools/migrate/migrations/20241024122007_line-item-fixes.down.sql": { + "header": "-- reverse: drop \"billing_invoice_items\" table\nCREATE TABLE \"billing_invoice_items\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"customer_id\" character(26) NOT NULL,\n \"period_start\" timestamptz NOT NULL,\n \"period_end\" timestamptz NOT NULL,\n \"invoice_at\" timestamptz NOT NULL,\n \"quantity\" numeric NULL,\n \"unit_price\" numeric NOT NULL,\n \"currency\" character varying(3) NOT NULL,\n \"tax_code_override\" jsonb NOT NULL,\n \"invoice_id\" character(26) NULL,\n \"type\" character varying NOT NULL,\n \"name\" character varying NOT NULL,\n PRIMARY KEY (\"id\"),", + "symbols": [], + "line_count": 60 + }, + "tools/migrate/migrations/20241024122007_line-item-fixes.up.sql": { + "header": "-- rename a column from \"item_collection_period\" to \"line_collection_period\"\n-- atlas:nolint BC102\nALTER TABLE \"billing_customer_overrides\" RENAME COLUMN \"item_collection_period\" TO \"line_collection_period\";\n-- rename a column from \"item_collection_period\" to \"line_collection_period\"\n-- atlas:nolint BC102\nALTER TABLE \"billing_workflow_configs\" RENAME COLUMN \"item_collection_period\" TO \"line_collection_period\";\n-- create \"billing_invoice_manual_line_configs\" table\nCREATE TABLE \"billing_invoice_manual_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"unit_price\" numeric NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billinginvoicemanuallineconfig_id\" to table: \"billing_invoice_manual_line_configs\"\nCREATE UNIQUE INDEX \"billinginvoicemanuallineconfig_id\" ON \"billing_invoice_manual_line_configs\" (\"id\");\n-- create index \"billinginvoicemanuallineconfig_namespace\" to table: \"billing_invoice_manual_line_configs\"\nCREATE INDEX \"billinginvoicemanuallineconfig_namespace\" ON \"billing_invoice_manual_line_configs\" (\"namespace\");\n-- drop index \"billinginvoice_namespace_status\" from table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_status\";\n-- modify \"billing_invoices\" table", + "symbols": [], + "line_count": 73 + }, + "tools/migrate/migrations/20241030140919_billing-draft-until.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"draft_until\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241030140919_billing-draft-until.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"draft_until\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241102151321_customer_filters.down.sql": { + "header": "-- reverse: create index \"customer_primary_email\" to table: \"customers\"\nDROP INDEX \"customer_primary_email\";\n-- reverse: create index \"customer_name\" to table: \"customers\"\nDROP INDEX \"customer_name\";\n-- reverse: create index \"customer_deleted_at\" to table: \"customers\"\nDROP INDEX \"customer_deleted_at\";\n-- reverse: create index \"customer_created_at\" to table: \"customers\"\nDROP INDEX \"customer_created_at\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241102151321_customer_filters.up.sql": { + "header": "-- create index \"customer_created_at\" to table: \"customers\"\nCREATE INDEX \"customer_created_at\" ON \"customers\" (\"created_at\");\n-- create index \"customer_deleted_at\" to table: \"customers\"\nCREATE INDEX \"customer_deleted_at\" ON \"customers\" (\"deleted_at\");\n-- create index \"customer_name\" to table: \"customers\"\nCREATE INDEX \"customer_name\" ON \"customers\" (\"name\");\n-- create index \"customer_primary_email\" to table: \"customers\"\nCREATE INDEX \"customer_primary_email\" ON \"customers\" (\"primary_email\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241103150058_billing-validation-issues.down.sql": { + "header": "-- reverse: create index \"billinginvoicevalidationissue_namespace_invoice_id_dedupe_hash\" to table: \"billing_invoice_validation_issues\"\nDROP INDEX \"billinginvoicevalidationissue_namespace_invoice_id_dedupe_hash\";\n-- reverse: create index \"billinginvoicevalidationissue_namespace\" to table: \"billing_invoice_validation_issues\"\nDROP INDEX \"billinginvoicevalidationissue_namespace\";\n-- reverse: create index \"billinginvoicevalidationissue_id\" to table: \"billing_invoice_validation_issues\"\nDROP INDEX \"billinginvoicevalidationissue_id\";\n-- reverse: create \"billing_invoice_validation_issues\" table\nDROP TABLE \"billing_invoice_validation_issues\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241103150058_billing-validation-issues.up.sql": { + "header": "-- create \"billing_invoice_validation_issues\" table\nCREATE TABLE \"billing_invoice_validation_issues\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"severity\" character varying NOT NULL,\n \"code\" character varying NULL,\n \"message\" character varying NOT NULL,\n \"path\" character varying NULL,\n \"component\" character varying NOT NULL,\n \"dedupe_hash\" bytea NOT NULL,\n \"invoice_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"billing_invoice_validation_issues_billing_invoices_billing_invo\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION\n);\n-- create index \"billinginvoicevalidationissue_id\" to table: \"billing_invoice_validation_issues\"\nCREATE UNIQUE INDEX \"billinginvoicevalidationissue_id\" ON \"billing_invoice_validation_issues\" (\"id\");\n-- create index \"billinginvoicevalidationissue_namespace\" to table: \"billing_invoice_validation_issues\"", + "symbols": [], + "line_count": 23 + }, + "tools/migrate/migrations/20241105171821_plan.down.sql": { + "header": "-- reverse: create index \"planratecard_phase_id_key\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_key\";\n-- reverse: create index \"planratecard_phase_id_feature_key\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_feature_key\";\n-- reverse: create index \"planratecard_namespace_key_deleted_at\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_namespace_key_deleted_at\";\n-- reverse: create index \"planratecard_namespace_id\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_namespace_id\";\n-- reverse: create index \"planratecard_namespace\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_namespace\";\n-- reverse: create index \"planratecard_id\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_id\";\n-- reverse: create \"plan_rate_cards\" table\nDROP TABLE \"plan_rate_cards\";\n-- reverse: create index \"planphase_plan_id_key\" to table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_key\";\n-- reverse: create index \"planphase_namespace_key_deleted_at\" to table: \"plan_phases\"\nDROP INDEX \"planphase_namespace_key_deleted_at\";\n-- reverse: create index \"planphase_namespace_key\" to table: \"plan_phases\"\nDROP INDEX \"planphase_namespace_key\";", + "symbols": [], + "line_count": 40 + }, + "tools/migrate/migrations/20241105171821_plan.up.sql": { + "header": "-- create \"plans\" table\nCREATE TABLE \"plans\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"key\" character varying NOT NULL,\n \"version\" bigint NOT NULL,\n \"currency\" character varying NOT NULL DEFAULT 'USD',\n \"effective_from\" timestamptz NULL,\n \"effective_to\" timestamptz NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"plan_id\" to table: \"plans\"\nCREATE UNIQUE INDEX \"plan_id\" ON \"plans\" (\"id\");\n-- create index \"plan_namespace\" to table: \"plans\"", + "symbols": [], + "line_count": 91 + }, + "tools/migrate/migrations/20241108055754_plan.down.sql": { + "header": "-- reverse: create index \"plan_namespace_key_version_deleted_at\" to table: \"plans\"\nDROP INDEX \"plan_namespace_key_version_deleted_at\";\n-- reverse: drop index \"plan_namespace_key_version\" from table: \"plans\"\nCREATE UNIQUE INDEX \"plan_namespace_key_version\" ON \"plans\" (\"namespace\", \"key\", \"version\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20241108055754_plan.up.sql": { + "header": "-- drop index \"plan_namespace_key_version\" from table: \"plans\"\nDROP INDEX \"plan_namespace_key_version\";\n-- create index \"plan_namespace_key_version_deleted_at\" to table: \"plans\"\n-- atlas:nolint\nCREATE UNIQUE INDEX \"plan_namespace_key_version_deleted_at\" ON \"plans\" (\"namespace\", \"key\", \"version\", \"deleted_at\");", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20241108120252_billing-line-splitting.down.sql": { + "header": "-- reverse: modify \"billing_invoice_validation_issues\" table\nALTER TABLE \"billing_invoice_validation_issues\" DROP CONSTRAINT \"billing_invoice_validation_issues_billing_invoices_billing_invo\", ADD\n CONSTRAINT \"billing_invoice_validation_issues_billing_invoices_billing_invo\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: create index \"billinginvoiceline_namespace_parent_line_id\" to table: \"billing_invoice_lines\"\nDROP INDEX \"billinginvoiceline_namespace_parent_line_id\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_manual_usage_based_line_c\", DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_manual_line_configs_manua\", DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_lines_child_lines\", DROP CONSTRAINT \"billing_invoice_lines_billing_invoices_billing_invoice_lines\", DROP COLUMN \"parent_line_id\", DROP COLUMN \"manual_usage_based_line_config_id\", ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoices_billing_invoice_lines\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoice_manual_line_configs_billi\" FOREIGN KEY (\"manual_line_config_id\") REFERENCES \"billing_invoice_manual_line_configs\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- reverse: create index \"billinginvoicemanualusagebasedlineconfig_namespace\" to table: \"billing_invoice_manual_usage_based_line_configs\"\nDROP INDEX \"billinginvoicemanualusagebasedlineconfig_namespace\";\n-- reverse: create index \"billinginvoicemanualusagebasedlineconfig_id\" to table: \"billing_invoice_manual_usage_based_line_configs\"\nDROP INDEX \"billinginvoicemanualusagebasedlineconfig_id\";\n-- reverse: create \"billing_invoice_manual_usage_based_line_configs\" table\nDROP TABLE \"billing_invoice_manual_usage_based_line_configs\";\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"customer_usage_attribution\";", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20241108120252_billing-line-splitting.up.sql": { + "header": "-- modify \"billing_invoices\" table\n-- atlas:nolint MF103\nALTER TABLE \"billing_invoices\" ADD COLUMN \"customer_usage_attribution\" jsonb NOT NULL;\n-- create \"billing_invoice_manual_usage_based_line_configs\" table\nCREATE TABLE \"billing_invoice_manual_usage_based_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"price_type\" character varying NOT NULL,\n \"feature_key\" character varying NOT NULL,\n \"price\" jsonb NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billinginvoicemanualusagebasedlineconfig_id\" to table: \"billing_invoice_manual_usage_based_line_configs\"\nCREATE UNIQUE INDEX \"billinginvoicemanualusagebasedlineconfig_id\" ON \"billing_invoice_manual_usage_based_line_configs\" (\"id\");\n-- create index \"billinginvoicemanualusagebasedlineconfig_namespace\" to table: \"billing_invoice_manual_usage_based_line_configs\"\nCREATE INDEX \"billinginvoicemanualusagebasedlineconfig_namespace\" ON \"billing_invoice_manual_usage_based_line_configs\" (\"namespace\");\n-- modify \"billing_invoice_lines\" table\n-- atlas:nolint CD101\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_manual_line_configs_billi\", DROP CONSTRAINT \"billing_invoice_lines_billing_invoices_billing_invoice_lines\", ADD COLUMN \"manual_usage_based_line_config_id\" character(26) NULL, ADD COLUMN \"parent_line_id\" character(26) NULL, ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoices_billing_invoice_lines\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE, ADD", + "symbols": [], + "line_count": 28 + }, + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.down.sql": { + "header": "-- reverse: drop \"billing_invoice_manual_usage_based_line_configs\" table\nCREATE TABLE \"billing_invoice_manual_usage_based_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"price_type\" character varying NOT NULL,\n \"feature_key\" character varying NOT NULL,\n \"price\" jsonb NOT NULL,\n PRIMARY KEY (\"id\")\n);\nCREATE UNIQUE INDEX \"billinginvoicemanualusagebasedlineconfig_id\" ON \"billing_invoice_manual_usage_based_line_configs\" (\"id\");\nCREATE INDEX \"billinginvoicemanualusagebasedlineconfig_namespace\" ON \"billing_invoice_manual_usage_based_line_configs\" (\"namespace\");\n-- reverse: drop \"billing_invoice_manual_line_configs\" table\nCREATE TABLE \"billing_invoice_manual_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"unit_price\" numeric NOT NULL,\n PRIMARY KEY (\"id\")\n);\nCREATE UNIQUE INDEX \"billinginvoicemanuallineconfig_id\" ON \"billing_invoice_manual_line_configs\" (\"id\");\nCREATE INDEX \"billinginvoicemanuallineconfig_namespace\" ON \"billing_invoice_manual_line_configs\" (\"namespace\");", + "symbols": [], + "line_count": 42 + }, + "tools/migrate/migrations/20241108160647_billing-reuse-plan-types.up.sql": { + "header": "-- create \"billing_invoice_flat_fee_line_configs\" table\nCREATE TABLE \"billing_invoice_flat_fee_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billinginvoiceflatfeelineconfig_id\" to table: \"billing_invoice_flat_fee_line_configs\"\nCREATE UNIQUE INDEX \"billinginvoiceflatfeelineconfig_id\" ON \"billing_invoice_flat_fee_line_configs\" (\"id\");\n-- create index \"billinginvoiceflatfeelineconfig_namespace\" to table: \"billing_invoice_flat_fee_line_configs\"\nCREATE INDEX \"billinginvoiceflatfeelineconfig_namespace\" ON \"billing_invoice_flat_fee_line_configs\" (\"namespace\");\n-- create \"billing_invoice_usage_based_line_configs\" table\nCREATE TABLE \"billing_invoice_usage_based_line_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"price_type\" character varying NOT NULL,\n \"feature_key\" character varying NOT NULL,\n \"price\" jsonb NOT NULL,\n PRIMARY KEY (\"id\")\n);", + "symbols": [], + "line_count": 44 + }, + "tools/migrate/migrations/20241119131528_plan.down.sql": { + "header": "-- reverse: create index \"planratecard_phase_id_key_deleted_at\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_key_deleted_at\";\n-- reverse: create index \"planratecard_phase_id_feature_key_deleted_at\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_feature_key_deleted_at\";\n-- reverse: drop index \"planratecard_phase_id_key\" from table: \"plan_rate_cards\"\nCREATE UNIQUE INDEX \"planratecard_phase_id_key\" ON \"plan_rate_cards\" (\"phase_id\", \"key\");\n-- reverse: drop index \"planratecard_phase_id_feature_key\" from table: \"plan_rate_cards\"\nCREATE UNIQUE INDEX \"planratecard_phase_id_feature_key\" ON \"plan_rate_cards\" (\"phase_id\", \"feature_key\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241119131528_plan.up.sql": { + "header": "-- drop index \"planratecard_phase_id_feature_key\" from table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_feature_key\";\n-- drop index \"planratecard_phase_id_key\" from table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_key\";\n-- create index \"planratecard_phase_id_feature_key_deleted_at\" to table: \"plan_rate_cards\"\n-- atlas:nolint\nCREATE UNIQUE INDEX \"planratecard_phase_id_feature_key_deleted_at\" ON \"plan_rate_cards\" (\"phase_id\", \"feature_key\", \"deleted_at\");\n-- create index \"planratecard_phase_id_key_deleted_at\" to table: \"plan_rate_cards\"\n-- atlas:nolint\nCREATE UNIQUE INDEX \"planratecard_phase_id_key_deleted_at\" ON \"plan_rate_cards\" (\"phase_id\", \"key\", \"deleted_at\");", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20241119154436_plan.down.sql": { + "header": "-- reverse: create index \"planphase_plan_id_key_deleted_at\" to table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_key_deleted_at\";\n-- reverse: drop index \"planphase_plan_id_key\" from table: \"plan_phases\"\nCREATE UNIQUE INDEX \"planphase_plan_id_key\" ON \"plan_phases\" (\"plan_id\", \"key\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20241119154436_plan.up.sql": { + "header": "-- drop index \"planphase_plan_id_key\" from table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_key\";\n-- create index \"planphase_plan_id_key_deleted_at\" to table: \"plan_phases\"\n-- atlas:nolint\nCREATE UNIQUE INDEX \"planphase_plan_id_key_deleted_at\" ON \"plan_phases\" (\"plan_id\", \"key\", \"deleted_at\");", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.down.sql": { + "header": "-- reverse: create index \"customersubjects_namespace_subject_key_is_deleted\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_subject_key_is_deleted\";\n-- reverse: create index \"customersubjects_namespace_customer_id_is_deleted\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_customer_id_is_deleted\";\n-- reverse: modify \"customer_subjects\" table\nALTER TABLE \"customer_subjects\" DROP COLUMN \"is_deleted\", DROP COLUMN \"deleted_at\";\n-- atlas:nolint MF101\n-- reverse: drop index \"customersubjects_namespace_subject_key\" from table: \"customer_subjects\"\nCREATE UNIQUE INDEX \"customersubjects_namespace_subject_key\" ON \"customer_subjects\" (\"namespace\", \"subject_key\");\n-- atlas:nolint MF101\n-- reverse: drop index \"customersubjects_customer_id_subject_key\" from table: \"customer_subjects\"\nCREATE UNIQUE INDEX \"customersubjects_customer_id_subject_key\" ON \"customer_subjects\" (\"customer_id\", \"subject_key\");", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20241119181140_customer_subjects_soft_delete.up.sql": { + "header": "-- drop index \"customersubjects_customer_id_subject_key\" from table: \"customer_subjects\"\nDROP INDEX \"customersubjects_customer_id_subject_key\";\n-- drop index \"customersubjects_namespace_subject_key\" from table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_subject_key\";\n-- modify \"customer_subjects\" table\nALTER TABLE \"customer_subjects\" ADD COLUMN \"deleted_at\" timestamptz NULL, ADD COLUMN \"is_deleted\" boolean NOT NULL DEFAULT false;\n-- create index \"customersubjects_namespace_customer_id_is_deleted\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_namespace_customer_id_is_deleted\" ON \"customer_subjects\" (\"namespace\", \"customer_id\", \"is_deleted\");\n-- atlas:nolint MF101\n-- create index \"customersubjects_namespace_subject_key_is_deleted\" to table: \"customer_subjects\"\nCREATE UNIQUE INDEX \"customersubjects_namespace_subject_key_is_deleted\" ON \"customer_subjects\" (\"namespace\", \"subject_key\", \"is_deleted\") WHERE (is_deleted = false);", + "symbols": [], + "line_count": 11 + }, + "tools/migrate/migrations/20241120145625_billing-discounts.down.sql": { + "header": "-- reverse: create index \"billinginvoicelinediscount_namespace_line_id_child_unique_refer\" to table: \"billing_invoice_line_discounts\"\nDROP INDEX \"billinginvoicelinediscount_namespace_line_id_child_unique_refer\";\n-- reverse: create index \"billinginvoicelinediscount_namespace_line_id\" to table: \"billing_invoice_line_discounts\"\nDROP INDEX \"billinginvoicelinediscount_namespace_line_id\";\n-- reverse: create index \"billinginvoicelinediscount_namespace\" to table: \"billing_invoice_line_discounts\"\nDROP INDEX \"billinginvoicelinediscount_namespace\";\n-- reverse: create index \"billinginvoicelinediscount_id\" to table: \"billing_invoice_line_discounts\"\nDROP INDEX \"billinginvoicelinediscount_id\";\n-- reverse: create \"billing_invoice_line_discounts\" table\nDROP TABLE \"billing_invoice_line_discounts\";\n-- reverse: create index \"billinginvoiceline_namespace_parent_line_id_child_unique_refere\" to table: \"billing_invoice_lines\"\nDROP INDEX \"billinginvoiceline_namespace_parent_line_id_child_unique_refere\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_lines_detailed_lines\", DROP COLUMN \"child_unique_reference_id\", ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoice_lines_child_lines\" FOREIGN KEY (\"parent_line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- reverse: rename a column from \"amount\" to \"per_unit_amount\"\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" RENAME COLUMN \"per_unit_amount\" TO \"amount\";", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20241120145625_billing-discounts.up.sql": { + "header": "-- rename a column from \"amount\" to \"per_unit_amount\"\n-- atlas:nolint BC102\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" RENAME COLUMN \"amount\" TO \"per_unit_amount\";\n-- modify \"billing_invoice_lines\" table\n-- atlas:nolint CD101\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_lines_child_lines\", ADD COLUMN \"child_unique_reference_id\" character varying NULL, ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoice_lines_detailed_lines\" FOREIGN KEY (\"parent_line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"billinginvoiceline_namespace_parent_line_id_child_unique_refere\" to table: \"billing_invoice_lines\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billinginvoiceline_namespace_parent_line_id_child_unique_refere\" ON \"billing_invoice_lines\" (\"namespace\", \"parent_line_id\", \"child_unique_reference_id\") WHERE ((child_unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));\n-- create \"billing_invoice_line_discounts\" table\nCREATE TABLE \"billing_invoice_line_discounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"child_unique_reference_id\" character varying NULL,\n \"description\" character varying NULL,\n \"amount\" numeric NOT NULL,", + "symbols": [], + "line_count": 32 + }, + "tools/migrate/migrations/20241121145549_billing-totals.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"total\", DROP COLUMN \"discounts_total\", DROP COLUMN \"charges_total\", DROP COLUMN \"taxes_exclusive_total\", DROP COLUMN \"taxes_inclusive_total\", DROP COLUMN \"taxes_total\", DROP COLUMN \"amount\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"total\", DROP COLUMN \"discounts_total\", DROP COLUMN \"charges_total\", DROP COLUMN \"taxes_exclusive_total\", DROP COLUMN \"taxes_inclusive_total\", DROP COLUMN \"taxes_total\", DROP COLUMN \"amount\";\n-- reverse: modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" DROP COLUMN \"category\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20241121145549_billing-totals.up.sql": { + "header": "-- modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" ADD COLUMN \"category\" character varying NOT NULL DEFAULT 'regular';\n-- modify \"billing_invoice_lines\" table\n-- atlas:nolint MF103\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"amount\" numeric NOT NULL, ADD COLUMN \"taxes_total\" numeric NOT NULL, ADD COLUMN \"taxes_inclusive_total\" numeric NOT NULL, ADD COLUMN \"taxes_exclusive_total\" numeric NOT NULL, ADD COLUMN \"charges_total\" numeric NOT NULL, ADD COLUMN \"discounts_total\" numeric NOT NULL, ADD COLUMN \"total\" numeric NOT NULL;\n-- modify \"billing_invoices\" table\n-- atlas:nolint MF103\nALTER TABLE \"billing_invoices\" ADD COLUMN \"amount\" numeric NOT NULL, ADD COLUMN \"taxes_total\" numeric NOT NULL, ADD COLUMN \"taxes_inclusive_total\" numeric NOT NULL, ADD COLUMN \"taxes_exclusive_total\" numeric NOT NULL, ADD COLUMN \"charges_total\" numeric NOT NULL, ADD COLUMN \"discounts_total\" numeric NOT NULL, ADD COLUMN \"total\" numeric NOT NULL;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.down.sql": { + "header": "-- reverse: modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" DROP COLUMN \"pre_line_period_quantity\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241126151128_billing-ubp-pre-qty-save.up.sql": { + "header": "-- modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" ADD COLUMN \"pre_line_period_quantity\" numeric NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241204162012_subscriptions.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP CONSTRAINT \"subscriptions_customers_subscription\";\n-- reverse: modify \"subscription_phases\" table\nALTER TABLE \"subscription_phases\" DROP CONSTRAINT \"subscription_phases_subscriptions_phases\";\n-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_subscription_phases_items\", DROP CONSTRAINT \"subscription_items_entitlements_entitlement\";\n-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP CONSTRAINT \"entitlements_subscription_items_subscription_item\";\n-- reverse: create index \"subscription_namespace_id\" to table: \"subscriptions\"\nDROP INDEX \"subscription_namespace_id\";\n-- reverse: create index \"subscription_namespace_customer_id\" to table: \"subscriptions\"\nDROP INDEX \"subscription_namespace_customer_id\";\n-- reverse: create index \"subscription_namespace\" to table: \"subscriptions\"\nDROP INDEX \"subscription_namespace\";\n-- reverse: create index \"subscription_id\" to table: \"subscriptions\"\nDROP INDEX \"subscription_id\";\n-- reverse: create \"subscriptions\" table\nDROP TABLE \"subscriptions\";\n-- reverse: create index \"subscriptionphase_namespace_subscription_id_key\" to table: \"subscription_phases\"\nDROP INDEX \"subscriptionphase_namespace_subscription_id_key\";", + "symbols": [], + "line_count": 42 + }, + "tools/migrate/migrations/20241204162012_subscriptions.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"subscription_managed\" boolean NULL, ADD COLUMN \"entitlement_subscription_item\" character(26) NULL;\n-- create \"subscription_items\" table\nCREATE TABLE \"subscription_items\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"active_from\" timestamptz NOT NULL,\n \"active_to\" timestamptz NULL,\n \"key\" character varying NOT NULL,\n \"active_from_override_relative_to_phase_start\" character varying NULL,\n \"active_to_override_relative_to_phase_start\" character varying NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"feature_key\" character varying NULL,\n \"entitlement_template\" jsonb NULL,\n \"tax_config\" jsonb NULL,", + "symbols": [], + "line_count": 96 + }, + "tools/migrate/migrations/20241207103019_billing-app-external-ids.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"payment_app_external_id\", DROP COLUMN \"invoicing_app_external_id\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"invoicing_app_external_id\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20241207103019_billing-app-external-ids.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"invoicing_app_external_id\" character varying NULL;\n-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"invoicing_app_external_id\" character varying NULL, ADD COLUMN \"payment_app_external_id\" character varying NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20241209085334_subscription_fields.down.sql": { + "header": "-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_entitlements_subscription_item\", ADD\n CONSTRAINT \"subscription_items_entitlements_entitlement\" FOREIGN KEY (\"entitlement_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"description\", DROP COLUMN \"name\";\n-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"entitlement_subscription_item\" character(26) NULL;\n-- reverse: custom\nALTER TABLE \"entitlements\" ADD\n CONSTRAINT \"entitlements_subscription_items_subscription_item\" FOREIGN KEY (\"entitlement_subscription_item\") REFERENCES \"subscription_items\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20241209085334_subscription_fields.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP COLUMN \"entitlement_subscription_item\";\n-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"name\" character varying NOT NULL DEFAULT 'Subscription', ADD COLUMN \"description\" character varying NULL;\n-- modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_entitlements_entitlement\", ADD\n CONSTRAINT \"subscription_items_entitlements_subscription_item\" FOREIGN KEY (\"entitlement_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20241209152120_subs-plan-linking.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP CONSTRAINT \"subscriptions_plans_subscriptions\", DROP COLUMN \"plan_id\", ADD COLUMN \"plan_version\" bigint NOT NULL, ADD COLUMN \"plan_key\" character varying NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241209152120_subs-plan-linking.up.sql": { + "header": "-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"plan_key\", DROP COLUMN \"plan_version\", ADD COLUMN \"plan_id\" character(26) NULL, ADD\n CONSTRAINT \"subscriptions_plans_subscriptions\" FOREIGN KEY (\"plan_id\") REFERENCES \"plans\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20241213152122_billing-subscription-linking.down.sql": { + "header": "-- reverse: create index \"billinginvoiceline_namespace_subscription_id_subscription_phase\" to table: \"billing_invoice_lines\"\nDROP INDEX \"billinginvoiceline_namespace_subscription_id_subscription_phase\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_subscriptions_billing_lines\", DROP CONSTRAINT \"billing_invoice_lines_subscription_phases_billing_lines\", DROP CONSTRAINT \"billing_invoice_lines_subscription_items_billing_lines\", DROP COLUMN \"subscription_phase_id\", DROP COLUMN \"subscription_item_id\", DROP COLUMN \"subscription_id\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20241213152122_billing-subscription-linking.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"subscription_id\" character(26) NULL, ADD COLUMN \"subscription_item_id\" character(26) NULL, ADD COLUMN \"subscription_phase_id\" character(26) NULL, ADD\n CONSTRAINT \"billing_invoice_lines_subscription_items_billing_lines\" FOREIGN KEY (\"subscription_item_id\") REFERENCES \"subscription_items\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD\n CONSTRAINT \"billing_invoice_lines_subscription_phases_billing_lines\" FOREIGN KEY (\"subscription_phase_id\") REFERENCES \"subscription_phases\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD\n CONSTRAINT \"billing_invoice_lines_subscriptions_billing_lines\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"billinginvoiceline_namespace_subscription_id_subscription_phase\" to table: \"billing_invoice_lines\"\nCREATE INDEX \"billinginvoiceline_namespace_subscription_id_subscription_phase\" ON \"billing_invoice_lines\" (\"namespace\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\");", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.down.sql": { + "header": "-- reverse: modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" DROP COLUMN \"invoicing_app_external_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241219213036_add_invoice_line_discount_external_id.up.sql": { + "header": "-- modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" ADD COLUMN \"invoicing_app_external_id\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.down.sql": { + "header": "-- reverse: create index \"appstripe_namespace_stripe_account_id_stripe_livemode\" to table: \"app_stripes\"\nDROP INDEX \"appstripe_namespace_stripe_account_id_stripe_livemode\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20241230152834_app_stripe_account_id_unique.up.sql": { + "header": "-- atlas:nolint MF101\n-- create index \"appstripe_namespace_stripe_account_id_stripe_livemode\" to table: \"app_stripes\"\nCREATE UNIQUE INDEX \"appstripe_namespace_stripe_account_id_stripe_livemode\" ON \"app_stripes\" (\"namespace\", \"stripe_account_id\", \"stripe_livemode\");", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250103121359_plan-phase-duration.down.sql": { + "header": "-- delete all \"plan_phases\", phases are incompatible with the old plan phase schema\n-- atlas:nolint destructive\nDELETE FROM \"plan_phases\";\n-- reverse: create index \"planphase_plan_id_index_deleted_at\" to table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_index_deleted_at\";\n-- reverse: modify \"plan_phases\" table\n-- atlas:nolint destructive\nALTER TABLE \"plan_phases\" DROP COLUMN \"duration\", DROP COLUMN \"index\", ADD COLUMN \"start_after\" character varying NOT NULL DEFAULT 'P0D';", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250103121359_plan-phase-duration.up.sql": { + "header": "-- delete all \"plan_phases\", phases are incompatible with the new plan phase schema\n-- atlas:nolint destructive\nDELETE FROM \"plan_phases\";\n-- modify \"plan_phases\" table\n-- atlas:nolint destructive data_depend\nALTER TABLE \"plan_phases\" DROP COLUMN \"start_after\", ADD COLUMN \"index\" smallint NOT NULL, ADD COLUMN \"duration\" character varying NULL;\n-- create index \"planphase_plan_id_index_deleted_at\" to table: \"plan_phases\"\n-- atlas:nolint data_depend\nCREATE UNIQUE INDEX \"planphase_plan_id_index_deleted_at\" ON \"plan_phases\" (\"plan_id\", \"index\", \"deleted_at\");", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.down.sql": { + "header": "-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_progressive_billing\";\n-- reverse: modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"invoice_progressive_billing\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250108103427_billing-profile-progressive-billing-flag.up.sql": { + "header": "-- modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" ADD COLUMN \"invoice_progressive_billing\" boolean NULL;\n-- modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" ADD COLUMN \"invoice_progressive_billing\" boolean NOT NULL DEFAULT FALSE;\nALTER TABLE \"billing_workflow_configs\" ALTER COLUMN \"invoice_progressive_billing\" DROP DEFAULT;", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.down.sql": { + "header": "-- In all honesty we don't have much of a chance here in retrofitting the values. What we can do is keep them as is and use the deleted_at flag so the system will ignore them going on.\nUPDATE\n entitlements\nSET\n deleted_at = NOW()\nWHERE\n created_at > '2025-01-09 23:18:35' :: timestamp -- time of the migration file\n AND usage_period_interval NOT IN ('P1Y', 'P1M', 'P1W', 'P1D');\n\nUPDATE\n entitlements\nSET\n usage_period_interval = CASE\n WHEN usage_period_interval = 'P1Y' THEN 'YEAR'\n WHEN usage_period_interval = 'P1M' THEN 'MONTH'\n WHEN usage_period_interval = 'P1W' THEN 'WEEK'\n WHEN usage_period_interval = 'P1D' THEN 'DAY'\n ELSE usage_period_interval\n END;\n", + "symbols": [], + "line_count": 38 + }, + "tools/migrate/migrations/20250109231835_entitlements-usage-period-iso.up.sql": { + "header": "-- Let's update all entitlements and convert usage period to ISO format\nUPDATE\n entitlements\nSET\n usage_period_interval = CASE\n WHEN usage_period_interval = 'YEAR' THEN 'P1Y'\n WHEN usage_period_interval = 'MONTH' THEN 'P1M'\n WHEN usage_period_interval = 'WEEK' THEN 'P1W'\n WHEN usage_period_interval = 'DAY' THEN 'P1D' -- Should not happen as cases up exhaust all programmatic values\n ELSE usage_period_interval\n END;\n\n-- Let's update grants as well\nUPDATE\n grants\nSET\n recurrence_period = CASE\n WHEN recurrence_period = 'YEAR' THEN 'P1Y'\n WHEN recurrence_period = 'MONTH' THEN 'P1M'\n WHEN recurrence_period = 'WEEK' THEN 'P1W'", + "symbols": [], + "line_count": 23 + }, + "tools/migrate/migrations/20250110164610_customer-remove-tz.down.sql": { + "header": "-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"timezone\" character varying NULL;\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"customer_timezone\" character varying NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250110164610_customer-remove-tz.up.sql": { + "header": "-- modify \"billing_invoices\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_invoices\" DROP COLUMN \"customer_timezone\";\n-- modify \"customers\" table\n-- atlas:nolint DS103\nALTER TABLE \"customers\" DROP COLUMN \"timezone\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250113222737_app_default_with_deleted.down.sql": { + "header": "-- reverse: create index \"app_namespace_type_is_default\" to table: \"apps\"\nDROP INDEX \"app_namespace_type_is_default\";\n-- atlas:nolint MF101\n-- reverse: drop index \"app_namespace_type_is_default\" from table: \"apps\"\nCREATE UNIQUE INDEX \"app_namespace_type_is_default\" ON \"apps\" (\"namespace\", \"type\", \"is_default\") WHERE (is_default = true);", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250113222737_app_default_with_deleted.up.sql": { + "header": "-- drop index \"app_namespace_type_is_default\" from table: \"apps\"\nDROP INDEX \"app_namespace_type_is_default\";\n-- atlas:nolint MF101\n-- create index \"app_namespace_type_is_default\" to table: \"apps\"\nCREATE UNIQUE INDEX \"app_namespace_type_is_default\" ON \"apps\" (\"namespace\", \"type\", \"is_default\") WHERE ((is_default = true) AND (deleted_at IS NULL));", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_discounts_lines\", DROP COLUMN \"line_ids\";\n-- reverse: create index \"billinginvoicediscount_namespace_invoice_id\" to table: \"billing_invoice_discounts\"\nDROP INDEX \"billinginvoicediscount_namespace_invoice_id\";\n-- reverse: create index \"billinginvoicediscount_namespace_id\" to table: \"billing_invoice_discounts\"\nDROP INDEX \"billinginvoicediscount_namespace_id\";\n-- reverse: create index \"billinginvoicediscount_namespace\" to table: \"billing_invoice_discounts\"\nDROP INDEX \"billinginvoicediscount_namespace\";\n-- reverse: create index \"billinginvoicediscount_id\" to table: \"billing_invoice_discounts\"\nDROP INDEX \"billinginvoicediscount_id\";\n-- reverse: create \"billing_invoice_discounts\" table\nDROP TABLE \"billing_invoice_discounts\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20250114104811_billing-invoice-discounts.up.sql": { + "header": "-- create \"billing_invoice_discounts\" table\nCREATE TABLE \"billing_invoice_discounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"type\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"line_ids\" jsonb NULL,\n \"invoice_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"billing_invoice_discounts_billing_invoices_invoice_discounts\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"billinginvoicediscount_id\" to table: \"billing_invoice_discounts\"\nCREATE UNIQUE INDEX \"billinginvoicediscount_id\" ON \"billing_invoice_discounts\" (\"id\");\n-- create index \"billinginvoicediscount_namespace\" to table: \"billing_invoice_discounts\"", + "symbols": [], + "line_count": 28 + }, + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.down.sql": { + "header": "-- reverse: modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" DROP COLUMN \"payment_term\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250117120943_billing-fee-payment-term.up.sql": { + "header": "-- modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" ADD COLUMN \"payment_term\" character varying NOT NULL DEFAULT 'in_advance';", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250121141512_billing-managed-by.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"managed_by\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250121141512_billing-managed-by.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"managed_by\" character varying;\nUPDATE \"billing_invoice_lines\" SET \"managed_by\" = 'system' WHERE \"status\" = 'detailed';\nUPDATE \"billing_invoice_lines\" SET \"managed_by\" = 'subscription' WHERE \"subscription_id\" IS NOT NULL and \"status\" <> 'detailed';\nUPDATE \"billing_invoice_lines\" SET \"managed_by\" = 'manual' WHERE \"subscription_id\" IS NULL and \"status\" <> 'detailed';\n-- atlas:nolint MF104\nALTER TABLE \"billing_invoice_lines\" ALTER COLUMN \"managed_by\" SET NOT NULL;", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.down.sql": { + "header": "-- reverse: create index \"billingsequencenumbers_namespace_scope\" to table: \"billing_sequence_numbers\"\nDROP INDEX \"billingsequencenumbers_namespace_scope\";\n-- reverse: create index \"billingsequencenumbers_namespace\" to table: \"billing_sequence_numbers\"\nDROP INDEX \"billingsequencenumbers_namespace\";\n-- reverse: create \"billing_sequence_numbers\" table\nDROP TABLE \"billing_sequence_numbers\";\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ALTER COLUMN \"number\" DROP NOT NULL;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250123130012_billing-sequence-numbers.up.sql": { + "header": "-- modify \"billing_invoices\" table\nCREATE SEQUENCE \"tmp_billing_sequence_numbers_namespace_scope\" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;\n-- let's add sane default values to the existing rows (INV-1, INV-2, ...)\nUPDATE \"billing_invoices\" SET \"number\" = 'INV-' || nextval('tmp_billing_sequence_numbers_namespace_scope') WHERE \"number\" IS NULL;\nDROP SEQUENCE \"tmp_billing_sequence_numbers_namespace_scope\";\n\nALTER TABLE \"billing_invoices\" ALTER COLUMN \"number\" SET NOT NULL;\n-- create \"billing_sequence_numbers\" table\nCREATE TABLE \"billing_sequence_numbers\" (\n \"id\" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,\n \"namespace\" character varying NOT NULL,\n \"scope\" character varying NOT NULL,\n \"last\" numeric NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billingsequencenumbers_namespace\" to table: \"billing_sequence_numbers\"\nCREATE INDEX \"billingsequencenumbers_namespace\" ON \"billing_sequence_numbers\" (\"namespace\");\n-- create index \"billingsequencenumbers_namespace_scope\" to table: \"billing_sequence_numbers\"\nCREATE UNIQUE INDEX \"billingsequencenumbers_namespace_scope\" ON \"billing_sequence_numbers\" (\"namespace\", \"scope\");", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20250124114836_billing-tax-behavior.down.sql": { + "header": "-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_tax_behavior\";\n-- reverse: modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"invoice_tax_behavior\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250124114836_billing-tax-behavior.up.sql": { + "header": "-- modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" ADD COLUMN \"invoice_tax_behavior\" character varying NULL;\n-- modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" ADD COLUMN \"invoice_tax_behavior\" character varying NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.down.sql": { + "header": "-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_default_tax_settings\", ADD COLUMN \"invoice_tax_behavior\" character varying NULL;\n-- reverse: modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"invoice_default_tax_config\", ADD COLUMN \"invoice_tax_behavior\" character varying NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250127132300_billing-tax-behavior-to-config.up.sql": { + "header": "-- modify \"billing_customer_overrides\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"invoice_tax_behavior\", ADD COLUMN \"invoice_default_tax_config\" jsonb NULL;\n-- modify \"billing_workflow_configs\" table\n-- atlas:nolint DS103\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"invoice_tax_behavior\", ADD COLUMN \"invoice_default_tax_settings\" jsonb NULL;", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250129143720_minimum-entitlement-usageperiod.up.sql": { + "header": "-- let's delete all subscription items where the usagePeriod is less than 1 hour\nUPDATE\n subscription_items\nSET\n deleted_at = NOW()\nWHERE\n (entitlement_template ->> 'usagePeriod') :: INTERVAL < 'PT1H' :: INTERVAL;\n\n-- let's delete all plan rate cards where the usagePeriod is less than 1 hour\nUPDATE\n plan_rate_cards\nSET\n deleted_at = NOW()\nWHERE\n (entitlement_template ->> 'usagePeriod') :: INTERVAL < 'PT1H' :: INTERVAL;", + "symbols": [], + "line_count": 15 + }, + "tools/migrate/migrations/20250130034713_customer_key.down.sql": { + "header": "-- reverse: create index \"customer_namespace_key_is_deleted\" to table: \"customers\"\nDROP INDEX \"customer_namespace_key_is_deleted\";\n-- reverse: create index \"customer_is_deleted\" to table: \"customers\"\nDROP INDEX \"customer_is_deleted\";\n-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" DROP COLUMN \"is_deleted\", DROP COLUMN \"key\";\n-- reverse: drop index \"customer_deleted_at\" from table: \"customers\"\nCREATE INDEX \"customer_deleted_at\" ON \"customers\" (\"deleted_at\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250130034713_customer_key.up.sql": { + "header": "-- modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"key\" character varying NULL, ADD COLUMN \"is_deleted\" boolean NOT NULL DEFAULT false;\n-- create index \"customer_is_deleted\" to table: \"customers\"\nCREATE INDEX \"customer_is_deleted\" ON \"customers\" (\"is_deleted\");\n-- create index \"customer_namespace_key_is_deleted\" to table: \"customers\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"customer_namespace_key_is_deleted\" ON \"customers\" (\"namespace\", \"key\", \"is_deleted\");\n-- data migration\nUPDATE \"customers\" SET \"is_deleted\" = true WHERE \"deleted_at\" IS NOT NULL;\n-- drop index \"customer_deleted_at\" from table: \"customers\"\nDROP INDEX \"customer_deleted_at\";", + "symbols": [], + "line_count": 11 + }, + "tools/migrate/migrations/20250130104722_billing-collection-at.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"collection_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250130104722_billing-collection-at.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"collection_at\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"sent_to_customer_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250131125127_billing-sent-to-customer-at.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"sent_to_customer_at\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250203103124_invoice-state-rename.down.sql": { + "header": "UPDATE billing_invoices SET status = 'draft_created' WHERE status = 'draft.created';\nUPDATE billing_invoices SET status = 'draft_updating' WHERE status = 'draft.updating';\nUPDATE billing_invoices SET status = 'draft_manual_approval_needed' WHERE status = 'draft.manual_approval_needed';\nUPDATE billing_invoices SET status = 'draft_validating' WHERE status = 'draft.validating';\nUPDATE billing_invoices SET status = 'draft_invalid' WHERE status = 'draft.invalid';\nUPDATE billing_invoices SET status = 'draft_syncing' WHERE status = 'draft.syncing';\nUPDATE billing_invoices SET status = 'draft_sync_failed' WHERE status = 'draft.sync_failed';\nUPDATE billing_invoices SET status = 'draft_waiting_auto_approval' WHERE status = 'draft.waiting_auto_approval';\nUPDATE billing_invoices SET status = 'draft_ready_to_issue' WHERE status = 'draft.ready_to_issue';\n\nUPDATE billing_invoices SET status = 'delete_in_progress' WHERE status = 'delete.in_progress';\nUPDATE billing_invoices SET status = 'delete_syncing' WHERE status = 'delete.syncing';\nUPDATE billing_invoices SET status = 'delete_failed' WHERE status = 'delete.failed';\n\nUPDATE billing_invoices SET status = 'issuing_syncing' WHERE status = 'issuing_syncing';\nUPDATE billing_invoices SET status = 'issuing_failed' WHERE status = 'issuing_failed';\n", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250203103124_invoice-state-rename.up.sql": { + "header": "UPDATE billing_invoices SET status = 'draft.created' WHERE status = 'draft_created';\nUPDATE billing_invoices SET status = 'draft.updating' WHERE status = 'draft_updating';\nUPDATE billing_invoices SET status = 'draft.manual_approval_needed' WHERE status = 'draft_manual_approval_needed';\nUPDATE billing_invoices SET status = 'draft.validating' WHERE status = 'draft_validating';\nUPDATE billing_invoices SET status = 'draft.invalid' WHERE status = 'draft_invalid';\nUPDATE billing_invoices SET status = 'draft.syncing' WHERE status = 'draft_syncing';\nUPDATE billing_invoices SET status = 'draft.sync_failed' WHERE status = 'draft_sync_failed';\nUPDATE billing_invoices SET status = 'draft.waiting_auto_approval' WHERE status = 'draft_waiting_auto_approval';\nUPDATE billing_invoices SET status = 'draft.ready_to_issue' WHERE status = 'draft_ready_to_issue';\n\nUPDATE billing_invoices SET status = 'delete.in_progress' WHERE status = 'delete_in_progress';\nUPDATE billing_invoices SET status = 'delete.syncing' WHERE status = 'delete_syncing';\nUPDATE billing_invoices SET status = 'delete.failed' WHERE status = 'delete_failed';\n\nUPDATE billing_invoices SET status = 'issuing.syncing' WHERE status = 'issuing_syncing';\nUPDATE billing_invoices SET status = 'issuing.failed' WHERE status = 'issuing_failed';\n", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250203131553_plan-alignment.down.sql": { + "header": "-- reverse: modify \"plans\" table\nALTER TABLE \"plans\" DROP COLUMN \"billables_must_align\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250203131553_plan-alignment.up.sql": { + "header": "-- modify \"plans\" table\nALTER TABLE \"plans\" ADD COLUMN \"billables_must_align\" boolean NOT NULL DEFAULT false;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250203165324_billing-tax-external-id.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"tax_app_external_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250203165324_billing-tax-external-id.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"tax_app_external_id\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250204184648_subscription-alignment.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"billables_must_align\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250204184648_subscription-alignment.up.sql": { + "header": "-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"billables_must_align\" boolean NOT NULL DEFAULT false;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250204185046_subscription-billing-override.down.sql": { + "header": "-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP COLUMN \"restarts_billing_period\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250204185046_subscription-billing-override.up.sql": { + "header": "-- modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" ADD COLUMN \"restarts_billing_period\" boolean NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250207101313_billing-store-status-details.down.sql": { + "header": "-- reverse: create index \"billinginvoice_status_details_cache\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_status_details_cache\";\n-- reverse: create index \"billinginvoice_namespace_status\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_status\";\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"status_details_cache\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250207101313_billing-store-status-details.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"status_details_cache\" jsonb NULL;\n-- create index \"billinginvoice_namespace_status\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace_status\" ON \"billing_invoices\" (\"namespace\", \"status\");\n-- create index \"billinginvoice_status_details_cache\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_status_details_cache\" ON \"billing_invoices\" USING gin (\"status_details_cache\");", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250218103055_fix-unique-indexes.down.sql": { + "header": "-- reverse: create index \"plan_namespace_key_version\" to table: \"plans\"\nDROP INDEX \"plan_namespace_key_version\";\n-- reverse: drop index \"plan_namespace_key_version_deleted_at\" from table: \"plans\"\nCREATE UNIQUE INDEX \"plan_namespace_key_version_deleted_at\" ON \"plans\" (\"namespace\", \"key\", \"version\", \"deleted_at\");\n-- reverse: create index \"planratecard_phase_id_key\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_key\";\n-- reverse: create index \"planratecard_phase_id_feature_key\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_phase_id_feature_key\";\n-- reverse: drop index \"planratecard_phase_id_key_deleted_at\" from table: \"plan_rate_cards\"\nCREATE UNIQUE INDEX \"planratecard_phase_id_key_deleted_at\" ON \"plan_rate_cards\" (\"phase_id\", \"key\", \"deleted_at\");\n-- reverse: drop index \"planratecard_phase_id_feature_key_deleted_at\" from table: \"plan_rate_cards\"\nCREATE UNIQUE INDEX \"planratecard_phase_id_feature_key_deleted_at\" ON \"plan_rate_cards\" (\"phase_id\", \"feature_key\", \"deleted_at\");\n-- reverse: create index \"planphase_plan_id_key\" to table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_key\";\n-- reverse: create index \"planphase_plan_id_index\" to table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_index\";\n-- reverse: drop index \"planphase_plan_id_key_deleted_at\" from table: \"plan_phases\"\nCREATE UNIQUE INDEX \"planphase_plan_id_key_deleted_at\" ON \"plan_phases\" (\"plan_id\", \"key\", \"deleted_at\");\n-- reverse: drop index \"planphase_plan_id_index_deleted_at\" from table: \"plan_phases\"\nCREATE UNIQUE INDEX \"planphase_plan_id_index_deleted_at\" ON \"plan_phases\" (\"plan_id\", \"index\", \"deleted_at\");", + "symbols": [], + "line_count": 30 + }, + "tools/migrate/migrations/20250218103055_fix-unique-indexes.up.sql": { + "header": "-- drop index \"appstripe_namespace_stripe_account_id_stripe_livemode\" from table: \"app_stripes\"\nDROP INDEX \"appstripe_namespace_stripe_account_id_stripe_livemode\";\n-- create index \"appstripe_namespace_stripe_account_id_stripe_livemode\" to table: \"app_stripes\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"appstripe_namespace_stripe_account_id_stripe_livemode\" ON \"app_stripes\" (\"namespace\", \"stripe_account_id\", \"stripe_livemode\") WHERE (deleted_at IS NULL);\n-- drop index \"billingprofile_namespace_default_deleted_at\" from table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_default_deleted_at\";\n-- create index \"billingprofile_namespace_default\" to table: \"billing_profiles\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billingprofile_namespace_default\" ON \"billing_profiles\" (\"namespace\", \"default\") WHERE (deleted_at IS NULL);\n-- create index \"feature_namespace_key\" to table: \"features\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"feature_namespace_key\" ON \"features\" (\"namespace\", \"key\") WHERE (archived_at IS NULL);\n-- drop index \"planphase_plan_id_index_deleted_at\" from table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_index_deleted_at\";\n-- drop index \"planphase_plan_id_key_deleted_at\" from table: \"plan_phases\"\nDROP INDEX \"planphase_plan_id_key_deleted_at\";\n-- create index \"planphase_plan_id_index\" to table: \"plan_phases\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"planphase_plan_id_index\" ON \"plan_phases\" (\"plan_id\", \"index\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 38 + }, + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.down.sql": { + "header": "-- reverse: create index \"billingprofile_namespace_default\" to table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_default\";\n-- reverse: drop index \"billingprofile_namespace_default\" from table: \"billing_profiles\"\nCREATE UNIQUE INDEX \"billingprofile_namespace_default\" ON \"billing_profiles\" (\"namespace\", \"default\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250218161614_billing-profile-fix-constraint.up.sql": { + "header": "-- drop index \"billingprofile_namespace_default\" from table: \"billing_profiles\"\nDROP INDEX \"billingprofile_namespace_default\";\n-- create index \"billingprofile_namespace_default\" to table: \"billing_profiles\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billingprofile_namespace_default\" ON \"billing_profiles\" (\"namespace\", \"default\") WHERE (\"default\" AND (deleted_at IS NULL));", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.down.sql": { + "header": "-- reverse: modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" DROP COLUMN \"anchor\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250220150245_usage-reset-anchor-times.up.sql": { + "header": "-- modify \"usage_resets\" table\nALTER TABLE\n \"usage_resets\"\nADD\n COLUMN \"anchor\" timestamptz NOT NULL DEFAULT '2025-02-01 23:18:35';\n\n-- Let's drop the default used for creation\nALTER TABLE\n \"usage_resets\"\nALTER COLUMN\n \"anchor\" DROP DEFAULT;\n\n-- we need to update all existing the LAST reset for each entitlement so anchor has the same value as entitlement.usage_period_anchor\n-- As the anchor field is not nullable, we default it to the reset time.\n-- This WORKS because entitlements could only be reset manually before this:\n-- 1. between each two subsequent reset it is impossible to have a full usage period\n-- 2. setting the anchor time to the reset time guarantees that said period starts with the reset time\n-- therefore the automatic reset calculation wont find any \"ghost\" periods inbetween the historical resets\nWITH latest_resets AS (\n SELECT", + "symbols": [], + "line_count": 43 + }, + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.down.sql": { + "header": "-- reverse: create index \"billingcustomerlock_namespace_customer_id\" to table: \"billing_customer_locks\"\nDROP INDEX \"billingcustomerlock_namespace_customer_id\";\n-- reverse: create index \"billingcustomerlock_namespace\" to table: \"billing_customer_locks\"\nDROP INDEX \"billingcustomerlock_namespace\";\n-- reverse: create index \"billingcustomerlock_id\" to table: \"billing_customer_locks\"\nDROP INDEX \"billingcustomerlock_id\";\n-- reverse: create \"billing_customer_locks\" table\nDROP TABLE \"billing_customer_locks\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250303141439_billing-dedicated-customer-sync-table.up.sql": { + "header": "-- create \"billing_customer_locks\" table\nCREATE TABLE \"billing_customer_locks\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"customer_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billingcustomerlock_id\" to table: \"billing_customer_locks\"\nCREATE UNIQUE INDEX \"billingcustomerlock_id\" ON \"billing_customer_locks\" (\"id\");\n-- create index \"billingcustomerlock_namespace\" to table: \"billing_customer_locks\"\nCREATE INDEX \"billingcustomerlock_namespace\" ON \"billing_customer_locks\" (\"namespace\");\n-- create index \"billingcustomerlock_namespace_customer_id\" to table: \"billing_customer_locks\"\nCREATE UNIQUE INDEX \"billingcustomerlock_namespace_customer_id\" ON \"billing_customer_locks\" (\"namespace\", \"customer_id\");", + "symbols": [], + "line_count": 13 + }, + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.down.sql": { + "header": "-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"is_deleted\" boolean;\nUPDATE \"customers\" SET \"is_deleted\" = deleted_at IS NOT NULL;\nALTER TABLE \"customers\" ALTER COLUMN \"is_deleted\" SET NOT NULL;\nCREATE UNIQUE INDEX \"customer_namespace_key_is_deleted\" ON \"customers\" (\"namespace\", \"key\", \"is_deleted\");\nCREATE INDEX \"customer_is_deleted\" ON \"customers\" (\"is_deleted\");\n-- reverse: create index \"customersubjects_namespace_subject_key\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_subject_key\";\n-- reverse: create index \"customersubjects_namespace_customer_id_deleted_at\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_namespace_customer_id_deleted_at\";\n-- reverse: modify \"customer_subjects\" table\nALTER TABLE \"customer_subjects\" ADD COLUMN \"is_deleted\" boolean NOT NULL DEFAULT false;\nCREATE INDEX \"customersubjects_namespace_customer_id_is_deleted\" ON \"customer_subjects\" (\"namespace\", \"customer_id\", \"is_deleted\");\n-- atlas:nolint MF101\n-- create index \"customersubjects_namespace_subject_key_is_deleted\" to table: \"customer_subjects\"\nCREATE UNIQUE INDEX \"customersubjects_namespace_subject_key_is_deleted\" ON \"customer_subjects\" (\"namespace\", \"subject_key\", \"is_deleted\") WHERE (is_deleted = false);\n", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250304071554_customer-remove-is-deleted.up.sql": { + "header": "-- modify \"customer_subjects\" table\nDROP INDEX \"customersubjects_namespace_customer_id_is_deleted\";\nDROP INDEX \"customersubjects_namespace_subject_key_is_deleted\";\n-- atlas:nolint DS103\nALTER TABLE \"customer_subjects\" DROP COLUMN \"is_deleted\";\n-- create index \"customersubjects_namespace_customer_id_deleted_at\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_namespace_customer_id_deleted_at\" ON \"customer_subjects\" (\"namespace\", \"customer_id\", \"deleted_at\");\n-- create index \"customersubjects_namespace_subject_key\" to table: \"customer_subjects\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"customersubjects_namespace_subject_key\" ON \"customer_subjects\" (\"namespace\", \"subject_key\") WHERE (deleted_at IS NULL);\n-- modify \"customers\" table\nDROP INDEX \"customer_namespace_key_is_deleted\";\n-- atlas:nolint DS103\nALTER TABLE \"customers\" DROP COLUMN \"is_deleted\";\n-- create index \"customer_namespace_key\" to table: \"customers\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"customer_namespace_key\" ON \"customers\" (\"namespace\", \"key\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250305025807_add_meter_table.down.sql": { + "header": "-- reverse create table \"meters\"\nDROP TABLE \"meters\";\n\n-- reverse create index \"meter_id\"\nDROP INDEX IF EXISTS \"meter_id\";", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250305025807_add_meter_table.up.sql": { + "header": "-- create table \"meters\"\nCREATE TABLE IF NOT EXISTS \"meters\" (\n \"id\" character(26) NOT NULL,\n \"created_at\" timestamp with time zone NOT NULL,\n \"updated_at\" timestamp with time zone NOT NULL,\n \"slug\" character varying NOT NULL,\n \"description\" character varying DEFAULT ''::character varying,\n \"event_type\" character varying NOT NULL,\n \"value_property\" character varying NOT NULL,\n \"group_by\" jsonb NOT NULL,\n \"aggregation\" character varying NOT NULL,\n \"window_size\" character varying NOT NULL,\n \"organization_meters\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\n-- create index \"meter_id\" to table: \"meters\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX IF NOT EXISTS \"meter_id\" ON \"meters\" (\"id\");\n", + "symbols": [], + "line_count": 20 + }, + "tools/migrate/migrations/20250306040407_resource_meter.down.sql": { + "header": "-- reverse \"meters\" table\nALTER TABLE \"meters\" RENAME COLUMN \"namespace\" TO \"organization_meters\";\nALTER TABLE \"meters\" RENAME COLUMN \"key\" TO \"slug\";\nALTER TABLE \"meters\"\n DROP COLUMN \"name\",\n DROP COLUMN \"event_from\",\n DROP COLUMN \"metadata\",\n DROP COLUMN \"deleted_at\",\n ALTER COLUMN \"value_property\" SET NOT NULL,\n ALTER COLUMN \"group_by\" SET NOT NULL,\n ALTER COLUMN \"description\" SET DEFAULT ''::character varying,\n ADD COLUMN \"window_size\" character varying NOT NULL;\n\n-- reverse dropping index \"meter_slug_organization_meters\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"meter_slug_organization_meters\" ON \"meters\" (\"slug\", \"organization_meters\");\n\n-- reverse create index \"meter_namespace\"\nDROP INDEX IF EXISTS \"meter_namespace\";\n-- reverse create index \"meter_namespace_id\"", + "symbols": [], + "line_count": 23 + }, + "tools/migrate/migrations/20250306040407_resource_meter.up.sql": { + "header": "-- modify \"meters\" table\n-- note that alter table doesn't accept multiple column changes with renaming\n-- atlas:nolint BC102\nALTER TABLE \"meters\" RENAME COLUMN \"organization_meters\" TO \"namespace\";\n-- atlas:nolint BC102\nALTER TABLE \"meters\" RENAME COLUMN \"slug\" TO \"key\";\n\n-- atlas:nolint DS103 BC102\nALTER TABLE \"meters\"\n ADD COLUMN \"name\" character varying NULL,\n ADD COLUMN \"event_from\" timestamptz NULL,\n ADD COLUMN \"metadata\" jsonb NULL,\n ADD COLUMN \"deleted_at\" timestamptz NULL,\n ALTER COLUMN \"value_property\" DROP NOT NULL,\n ALTER COLUMN \"group_by\" DROP NOT NULL,\n ALTER COLUMN \"description\" DROP DEFAULT,\n DROP COLUMN \"window_size\";\n\n-- drop index \"meter_slug_organization_meters\" from table: \"meters\"\nDROP INDEX IF EXISTS \"meter_slug_organization_meters\";", + "symbols": [], + "line_count": 39 + }, + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.down.sql": { + "header": "-- reverse: modify \"balance_snapshots\" table\nALTER TABLE \"balance_snapshots\" DROP COLUMN \"usage\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250307151454_balance-snapshot-usage.up.sql": { + "header": "-- modify \"balance_snapshots\" table\nALTER TABLE \"balance_snapshots\" ADD COLUMN \"usage\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.down.sql": { + "header": "-- reverse: create index \"balancesnapshot_namespace_owner_id_at\" to table: \"balance_snapshots\"\nDROP INDEX \"balancesnapshot_namespace_owner_id_at\";\n-- reverse: drop index \"balancesnapshot_namespace_balance_at\" from table: \"balance_snapshots\"\nCREATE INDEX \"balancesnapshot_namespace_balance_at\" ON \"balance_snapshots\" (\"namespace\", \"balance\", \"at\");\n-- reverse: drop index \"balancesnapshot_namespace_balance\" from table: \"balance_snapshots\"\nCREATE INDEX \"balancesnapshot_namespace_balance\" ON \"balance_snapshots\" (\"namespace\", \"balance\");\n-- reverse: drop index \"balancesnapshot_namespace_at\" from table: \"balance_snapshots\"\nCREATE INDEX \"balancesnapshot_namespace_at\" ON \"balance_snapshots\" (\"namespace\", \"at\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250311193204_balance-snapshot-indexes.up.sql": { + "header": "-- drop index \"balancesnapshot_namespace_at\" from table: \"balance_snapshots\"\nDROP INDEX \"balancesnapshot_namespace_at\";\n-- drop index \"balancesnapshot_namespace_balance\" from table: \"balance_snapshots\"\nDROP INDEX \"balancesnapshot_namespace_balance\";\n-- drop index \"balancesnapshot_namespace_balance_at\" from table: \"balance_snapshots\"\nDROP INDEX \"balancesnapshot_namespace_balance_at\";\n-- create index \"balancesnapshot_namespace_owner_id_at\" to table: \"balance_snapshots\"\nCREATE INDEX \"balancesnapshot_namespace_owner_id_at\" ON \"balance_snapshots\" (\"namespace\", \"owner_id\", \"at\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.down.sql": { + "header": "-- reverse: modify \"app_stripes\" table\nALTER TABLE \"app_stripes\" DROP COLUMN \"masked_api_key\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250318123842_app-stripe-store-masked-key.up.sql": { + "header": "-- modify \"app_stripes\" table\nALTER TABLE \"app_stripes\" ADD COLUMN \"masked_api_key\" character varying NOT NULL DEFAULT 'sk_***';\nALTER TABLE \"app_stripes\" ALTER COLUMN \"masked_api_key\" DROP DEFAULT;", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250325114848_annotations.down.sql": { + "header": "-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250325114848_annotations.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"annotations\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250325115141_ent-subs-annotation.down.sql": { + "header": "-- This down migration removes the subscription.id annotation from entitlements\n-- We'll only run this on entitlements that are subscription_managed = true to be safe\n\nUPDATE entitlements e\nSET annotations = e.annotations - 'subscription.id'\nWHERE e.subscription_managed = TRUE\nAND e.annotations->>'subscription.id' IS NOT NULL;", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20250325115141_ent-subs-annotation.up.sql": { + "header": "-- Let's add a migration that select all entitlements that are subscription managed, then\n-- 1. find the subscription that it references (through item and phase)\n-- 2. add the subscription.id annotation with the subscription's id (if not present) to the entitlement\nUPDATE entitlements e\nSET annotations = jsonb_set(\n CASE\n WHEN e.annotations IS NULL THEN '{}'::jsonb\n ELSE e.annotations\n END,\n '{subscription.id}',\n to_jsonb(sp.subscription_id)\n)\nFROM subscription_items si\nJOIN subscription_phases sp ON si.phase_id = sp.id\nWHERE e.subscription_managed = TRUE\nAND e.id = si.entitlement_id\nAND (e.annotations IS NULL OR e.annotations->>'subscription.id' IS NULL);", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.down.sql": { + "header": "-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"subscription_managed\" boolean NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250325124631_remove-subscription-managed-flag.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP COLUMN \"subscription_managed\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250327123818_entitlement-cursor.down.sql": { + "header": "-- reverse: create index \"entitlement_created_at_id\" to table: \"entitlements\"\nDROP INDEX \"entitlement_created_at_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250327123818_entitlement-cursor.up.sql": { + "header": "-- create index \"entitlement_created_at_id\" to table: \"entitlements\"\n-- atlas:nolint\nCREATE UNIQUE INDEX \"entitlement_created_at_id\" ON \"entitlements\" (\"created_at\", \"id\");", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250331141703_plan-rc-discounts.down.sql": { + "header": "-- reverse: modify \"plan_rate_cards\" table\nALTER TABLE \"plan_rate_cards\" DROP COLUMN \"discounts\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250331141703_plan-rc-discounts.up.sql": { + "header": "-- modify \"plan_rate_cards\" table\nALTER TABLE \"plan_rate_cards\" ADD COLUMN \"discounts\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250401085630_plan-discount-nillable.down.sql": { + "header": "-- reverse: modify \"plan_phases\" table\nALTER TABLE \"plan_phases\" ADD COLUMN \"discounts\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250401085630_plan-discount-nillable.up.sql": { + "header": "-- modify \"plan_phases\" table\nALTER TABLE \"plan_phases\" DROP COLUMN \"discounts\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250401093027_subs-item-discounts.down.sql": { + "header": "-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP COLUMN \"discounts\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250401093027_subs-item-discounts.up.sql": { + "header": "-- modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" ADD COLUMN \"discounts\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD\n CONSTRAINT \"billing_invoice_lines_billing_invoice_discounts_lines\" FOREIGN KEY (\"line_ids\") REFERENCES \"billing_invoice_discounts\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: modify \"billing_invoice_discounts\" table\nALTER TABLE \"billing_invoice_discounts\" ADD\n CONSTRAINT \"billing_invoice_discounts_billing_invoices_invoice_discounts\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250403195308_deprecate-invoice-discounts.up.sql": { + "header": "-- modify \"billing_invoice_discounts\" table\nALTER TABLE \"billing_invoice_discounts\" DROP CONSTRAINT \"billing_invoice_discounts_billing_invoices_invoice_discounts\";\n-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_discounts_lines\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250404105832_addon.down.sql": { + "header": "-- reverse: create index \"addonratecard_namespace_key_deleted_at\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_namespace_key_deleted_at\";\n-- reverse: create index \"addonratecard_namespace_id\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_namespace_id\";\n-- reverse: create index \"addonratecard_namespace\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_namespace\";\n-- reverse: create index \"addonratecard_id\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_id\";\n-- reverse: create index \"addonratecard_addon_id_key\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_addon_id_key\";\n-- reverse: create index \"addonratecard_addon_id_feature_key\" to table: \"addon_rate_cards\"\nDROP INDEX \"addonratecard_addon_id_feature_key\";\n-- reverse: create \"addon_rate_cards\" table\nDROP TABLE \"addon_rate_cards\";\n-- reverse: create index \"addon_namespace_key_version\" to table: \"addons\"\nDROP INDEX \"addon_namespace_key_version\";\n-- reverse: create index \"addon_namespace_key_deleted_at\" to table: \"addons\"\nDROP INDEX \"addon_namespace_key_deleted_at\";\n-- reverse: create index \"addon_namespace_id\" to table: \"addons\"\nDROP INDEX \"addon_namespace_id\";", + "symbols": [], + "line_count": 28 + }, + "tools/migrate/migrations/20250404105832_addon.up.sql": { + "header": "-- create \"addons\" table\nCREATE TABLE \"addons\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"key\" character varying NOT NULL,\n \"version\" bigint NOT NULL,\n \"currency\" character varying NOT NULL DEFAULT 'USD',\n \"effective_from\" timestamptz NULL,\n \"effective_to\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"addon_annotations\" to table: \"addons\"\nCREATE INDEX \"addon_annotations\" ON \"addons\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 66 + }, + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"ratecard_discounts\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250404145234_billing-line-ratecard-discounts.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"ratecard_discounts\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250405193107_addon-instance-type.down.sql": { + "header": "-- reverse: modify \"addons\" table\nALTER TABLE \"addons\" DROP COLUMN \"instance_type\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250405193107_addon-instance-type.up.sql": { + "header": "-- modify \"addons\" table\nALTER TABLE \"addons\" ADD COLUMN \"instance_type\" character varying NOT NULL DEFAULT 'single';", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.down.sql": { + "header": "-- reverse: modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" DROP COLUMN \"reason\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250406215430_billing-line-discount-reason.up.sql": { + "header": "-- modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" ADD COLUMN \"reason\" character varying NOT NULL DEFAULT 'maximum_spend';\nALTER TABLE \"billing_invoice_line_discounts\" ALTER COLUMN \"reason\" DROP DEFAULT;", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.down.sql": { + "header": "-- reverse: modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" DROP COLUMN \"source_discount\", DROP COLUMN \"pre_line_period_quantity\", DROP COLUMN \"quantity\", DROP COLUMN \"rounding_amount\", DROP COLUMN \"type\", ALTER COLUMN \"amount\" SET NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250407191828_billing-line-discount-unit-support.up.sql": { + "header": "-- modify \"billing_invoice_line_discounts\" table\nALTER TABLE \"billing_invoice_line_discounts\" ALTER COLUMN \"amount\" DROP NOT NULL, ADD COLUMN \"type\" character varying NOT NULL DEFAULT 'amount', ADD COLUMN \"rounding_amount\" numeric NULL DEFAULT 0, ADD COLUMN \"quantity\" numeric NULL, ADD COLUMN \"pre_line_period_quantity\" numeric NULL, ADD COLUMN \"source_discount\" jsonb NULL;\n\nALTER TABLE \"billing_invoice_line_discounts\" ALTER COLUMN \"type\" DROP DEFAULT;\nALTER TABLE \"billing_invoice_line_discounts\" ALTER COLUMN \"rounding_amount\" DROP DEFAULT;", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250408162413_child-uniq-id-rename.up.sql": { + "header": "UPDATE \"billing_invoice_lines\"\nSET \"child_unique_reference_id\" = 'min-spend'\nWHERE \"child_unique_reference_id\" IS NOT NULL AND \"child_unique_reference_id\" IN ('unit-price-min-spend', 'volume-min-spend', 'graduated-tiered-min-spend');", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.down.sql": { + "header": "-- reverse: modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" DROP COLUMN \"metered_quantity\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250408170934_billing-persist-original-qty.up.sql": { + "header": "-- modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" ADD COLUMN \"metered_quantity\" numeric NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250409142535_subscriptionaddon.down.sql": { + "header": "-- reverse: create index \"subscriptionaddonratecarditemlink_subscription_item_id_subscrip\" to table: \"subscription_addon_rate_card_item_links\"\nDROP INDEX \"subscriptionaddonratecarditemlink_subscription_item_id_subscrip\";\n-- reverse: create index \"subscriptionaddonratecarditemlink_subscription_item_id\" to table: \"subscription_addon_rate_card_item_links\"\nDROP INDEX \"subscriptionaddonratecarditemlink_subscription_item_id\";\n-- reverse: create index \"subscriptionaddonratecarditemlink_subscription_addon_rate_card_\" to table: \"subscription_addon_rate_card_item_links\"\nDROP INDEX \"subscriptionaddonratecarditemlink_subscription_addon_rate_card_\";\n-- reverse: create index \"subscriptionaddonratecarditemlink_id\" to table: \"subscription_addon_rate_card_item_links\"\nDROP INDEX \"subscriptionaddonratecarditemlink_id\";\n-- reverse: create \"subscription_addon_rate_card_item_links\" table\nDROP TABLE \"subscription_addon_rate_card_item_links\";\n-- reverse: create index \"subscriptionaddonratecard_subscription_addon_id\" to table: \"subscription_addon_rate_cards\"\nDROP INDEX \"subscriptionaddonratecard_subscription_addon_id\";\n-- reverse: create index \"subscriptionaddonratecard_namespace_id\" to table: \"subscription_addon_rate_cards\"\nDROP INDEX \"subscriptionaddonratecard_namespace_id\";\n-- reverse: create index \"subscriptionaddonratecard_namespace\" to table: \"subscription_addon_rate_cards\"\nDROP INDEX \"subscriptionaddonratecard_namespace\";\n-- reverse: create index \"subscriptionaddonratecard_id\" to table: \"subscription_addon_rate_cards\"\nDROP INDEX \"subscriptionaddonratecard_id\";\n-- reverse: create \"subscription_addon_rate_cards\" table\nDROP TABLE \"subscription_addon_rate_cards\";", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20250409142535_subscriptionaddon.up.sql": { + "header": "-- create \"subscription_addons\" table\nCREATE TABLE \"subscription_addons\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"addon_id\" character(26) NOT NULL,\n \"subscription_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"subscription_addons_addons_subscription_addons\" FOREIGN KEY (\"addon_id\") REFERENCES \"addons\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE,\n CONSTRAINT \"subscription_addons_subscriptions_addons\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"subscriptionaddon_id\" to table: \"subscription_addons\"\nCREATE UNIQUE INDEX \"subscriptionaddon_id\" ON \"subscription_addons\" (\"id\");\n-- create index \"subscriptionaddon_namespace\" to table: \"subscription_addons\"\nCREATE INDEX \"subscriptionaddon_namespace\" ON \"subscription_addons\" (\"namespace\");\n-- create \"subscription_addon_quantities\" table\nCREATE TABLE \"subscription_addon_quantities\" (", + "symbols": [], + "line_count": 79 + }, + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.down.sql": { + "header": "-- reverse: drop \"billing_invoice_discounts\" table\nCREATE TABLE \"billing_invoice_discounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"type\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"line_ids\" jsonb NULL,\n \"invoice_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\")\n);\nCREATE UNIQUE INDEX \"billinginvoicediscount_id\" ON \"billing_invoice_discounts\" (\"id\");\nCREATE INDEX \"billinginvoicediscount_namespace\" ON \"billing_invoice_discounts\" (\"namespace\");\nCREATE UNIQUE INDEX \"billinginvoicediscount_namespace_id\" ON \"billing_invoice_discounts\" (\"namespace\", \"id\");\nCREATE INDEX \"billinginvoicediscount_namespace_invoice_id\" ON \"billing_invoice_discounts\" (\"namespace\", \"invoice_id\");", + "symbols": [], + "line_count": 33 + }, + "tools/migrate/migrations/20250411062903_billing-split-line-discounts.up.sql": { + "header": "-- Sanity: make sure that there are no usage discounts in the database (it is still unsupported, but let's make sure)\nDELETE FROM \"billing_invoice_line_discounts\" WHERE \"type\" = 'usage';\n-- modify \"billing_invoice_line_discounts\" table\n-- atlas:nolint MF104 CD101\nALTER TABLE \"billing_invoice_line_discounts\" DROP CONSTRAINT \"billing_invoice_line_discounts_billing_invoice_lines_line_disco\", ALTER COLUMN \"amount\" SET DEFAULT 0, ALTER COLUMN \"amount\" SET NOT NULL , ALTER COLUMN \"type\" DROP NOT NULL, ADD\n CONSTRAINT \"billing_invoice_line_discounts_billing_invoice_lines_line_amoun\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- remove the default value for the amount column\nALTER TABLE \"billing_invoice_line_discounts\" ALTER COLUMN \"amount\" DROP DEFAULT;\n-- create \"billing_invoice_line_usage_discounts\" table\nCREATE TABLE \"billing_invoice_line_usage_discounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"child_unique_reference_id\" character varying NULL,\n \"description\" character varying NULL,\n \"reason\" character varying NOT NULL,\n \"invoicing_app_external_id\" character varying NULL,\n \"quantity\" numeric NOT NULL,", + "symbols": [], + "line_count": 37 + }, + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.down.sql": { + "header": "-- reverse: modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" DROP COLUMN \"metered_pre_line_period_quantity\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250411132453_billing-metered-pre-line-period-quantity.up.sql": { + "header": "-- modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" ADD COLUMN \"metered_pre_line_period_quantity\" numeric NULL;\n\n-- before usage discounts were introduced, we didn't have the metered pre-line period quantity, now let's backfill it\nUPDATE \"billing_invoice_usage_based_line_configs\"\n SET \"metered_pre_line_period_quantity\" = \"pre_line_period_quantity\"\n WHERE\n \"pre_line_period_quantity\" IS NOT NULL AND\n \"metered_pre_line_period_quantity\" IS NULL;\n\n-- before usage discounts were introduced, we didn't have the metered quantity, now let's backfill it\nUPDATE \"billing_invoice_usage_based_line_configs\"\n SET \"metered_quantity\" = \"billing_invoice_lines\".\"quantity\"\n FROM \"billing_invoice_lines\"\n WHERE \"billing_invoice_lines\".\"usage_based_line_config_id\" = \"billing_invoice_usage_based_line_configs\".\"id\" AND\n \"billing_invoice_lines\".\"type\" = 'usage_based' AND\n \"billing_invoice_lines\".\"quantity\" IS NOT NULL AND\n \"billing_invoice_usage_based_line_configs\".\"metered_quantity\" IS NULL;", + "symbols": [], + "line_count": 18 + }, + "tools/migrate/migrations/20250414082312_meter-unique-key.down.sql": { + "header": "-- reverse: create index \"meter_namespace_key\" to table: \"meters\"\nDROP INDEX \"meter_namespace_key\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250414082312_meter-unique-key.up.sql": { + "header": "-- create index \"meter_namespace_key\" to table: \"meters\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"meter_namespace_key\" ON \"meters\" (\"namespace\", \"key\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250415105134_plan_addons.down.sql": { + "header": "-- reverse: create index \"planaddon_namespace_plan_id_addon_id\" to table: \"plan_addons\"\nDROP INDEX \"planaddon_namespace_plan_id_addon_id\";\n-- reverse: create index \"planaddon_namespace\" to table: \"plan_addons\"\nDROP INDEX \"planaddon_namespace\";\n-- reverse: create index \"planaddon_id\" to table: \"plan_addons\"\nDROP INDEX \"planaddon_id\";\n-- reverse: create index \"planaddon_annotations\" to table: \"plan_addons\"\nDROP INDEX \"planaddon_annotations\";\n-- reverse: create \"plan_addons\" table\nDROP TABLE \"plan_addons\";", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20250415105134_plan_addons.up.sql": { + "header": "-- create \"plan_addons\" table\nCREATE TABLE \"plan_addons\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"annotations\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"from_plan_phase\" character varying NOT NULL,\n \"max_quantity\" bigint NULL,\n \"addon_id\" character(26) NOT NULL,\n \"plan_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"plan_addons_addons_plans\" FOREIGN KEY (\"addon_id\") REFERENCES \"addons\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE,\n CONSTRAINT \"plan_addons_plans_addons\" FOREIGN KEY (\"plan_id\") REFERENCES \"plans\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"planaddon_annotations\" to table: \"plan_addons\"\nCREATE INDEX \"planaddon_annotations\" ON \"plan_addons\" USING gin (\"annotations\");\n-- create index \"planaddon_id\" to table: \"plan_addons\"", + "symbols": [], + "line_count": 25 + }, + "tools/migrate/migrations/20250415143130_subs-annotations.down.sql": { + "header": "-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250415143130_subs-annotations.up.sql": { + "header": "-- modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" ADD COLUMN \"annotations\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.down.sql": { + "header": "-- reverse: drop \"subscription_addon_rate_cards\" table\nCREATE TABLE \"subscription_addon_rate_cards\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"addon_ratecard_id\" character(26) NOT NULL,\n \"subscription_addon_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"subscription_addon_rate_cards_addon_rate_cards_subscription_add\" FOREIGN KEY (\"addon_ratecard_id\") REFERENCES \"addon_rate_cards\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE,\n CONSTRAINT \"subscription_addon_rate_cards_subscription_addons_rate_cards\" FOREIGN KEY (\"subscription_addon_id\") REFERENCES \"subscription_addons\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"subscriptionaddonratecard_id\" ON \"subscription_addon_rate_cards\" (\"id\");\nCREATE INDEX \"subscriptionaddonratecard_namespace\" ON \"subscription_addon_rate_cards\" (\"namespace\");\nCREATE UNIQUE INDEX \"subscriptionaddonratecard_namespace_id\" ON \"subscription_addon_rate_cards\" (\"namespace\", \"id\");\nCREATE INDEX \"subscriptionaddonratecard_subscription_addon_id\" ON \"subscription_addon_rate_cards\" (\"subscription_addon_id\");\n-- reverse: drop \"subscription_addon_rate_card_item_links\" table\nCREATE TABLE \"subscription_addon_rate_card_item_links\" (", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20250416094534_delete-subsadd-ratecards.up.sql": { + "header": "-- drop \"subscription_addon_rate_card_item_links\" table\nDROP TABLE \"subscription_addon_rate_card_item_links\";\n-- drop \"subscription_addon_rate_cards\" table\nDROP TABLE \"subscription_addon_rate_cards\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250416191201_app-custominvoicing.down.sql": { + "header": "-- reverse: create index \"appcustominvoicingcustomer_namespace_app_id_customer_id\" to table: \"app_custom_invoicing_customers\"\nDROP INDEX \"appcustominvoicingcustomer_namespace_app_id_customer_id\";\n-- reverse: create index \"appcustominvoicingcustomer_namespace\" to table: \"app_custom_invoicing_customers\"\nDROP INDEX \"appcustominvoicingcustomer_namespace\";\n-- reverse: create \"app_custom_invoicing_customers\" table\nDROP TABLE \"app_custom_invoicing_customers\";\n-- reverse: create index \"appcustominvoicing_namespace\" to table: \"app_custom_invoicings\"\nDROP INDEX \"appcustominvoicing_namespace\";\n-- reverse: create index \"appcustominvoicing_id\" to table: \"app_custom_invoicings\"\nDROP INDEX \"appcustominvoicing_id\";\n-- reverse: create \"app_custom_invoicings\" table\nDROP TABLE \"app_custom_invoicings\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20250416191201_app-custominvoicing.up.sql": { + "header": "-- create \"app_custom_invoicings\" table\nCREATE TABLE \"app_custom_invoicings\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"skip_draft_sync_hook\" boolean NOT NULL DEFAULT false,\n \"skip_issuing_sync_hook\" boolean NOT NULL DEFAULT false,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"app_custom_invoicings_apps_app\" FOREIGN KEY (\"id\") REFERENCES \"apps\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"appcustominvoicing_id\" to table: \"app_custom_invoicings\"\nCREATE UNIQUE INDEX \"appcustominvoicing_id\" ON \"app_custom_invoicings\" (\"id\");\n-- create index \"appcustominvoicing_namespace\" to table: \"app_custom_invoicings\"\nCREATE INDEX \"appcustominvoicing_namespace\" ON \"app_custom_invoicings\" (\"namespace\");\n-- create \"app_custom_invoicing_customers\" table\nCREATE TABLE \"app_custom_invoicing_customers\" (\n \"id\" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,\n \"namespace\" character varying NOT NULL,", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20250417145207_app-custominvoicing.down.sql": { + "header": "-- reverse: create index \"appcustominvoicing_namespace_id\" to table: \"app_custom_invoicings\"\nDROP INDEX \"appcustominvoicing_namespace_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250417145207_app-custominvoicing.up.sql": { + "header": "-- create index \"appcustominvoicing_namespace_id\" to table: \"app_custom_invoicings\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"appcustominvoicing_namespace_id\" ON \"app_custom_invoicings\" (\"namespace\", \"id\");", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.down.sql": { + "header": "-- reverse: rename a column from \"skip_issuing_sync_hook\" to \"enable_issuing_sync_hook\"\nALTER TABLE \"app_custom_invoicings\" RENAME COLUMN \"enable_issuing_sync_hook\" TO \"skip_issuing_sync_hook\";\nUPDATE \"app_custom_invoicings\" SET \"skip_issuing_sync_hook\" = NOT \"skip_issuing_sync_hook\";\n\n-- reverse: rename a column from \"skip_draft_sync_hook\" to \"enable_draft_sync_hook\"\nALTER TABLE \"app_custom_invoicings\" RENAME COLUMN \"enable_draft_sync_hook\" TO \"skip_draft_sync_hook\";\nUPDATE \"app_custom_invoicings\" SET \"skip_draft_sync_hook\" = NOT \"skip_draft_sync_hook\";", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20250422174622_rename-custominvoicing-settings.up.sql": { + "header": "-- rename a column from \"skip_draft_sync_hook\" to \"enable_draft_sync_hook\"\n-- atlas:nolint BC102\nALTER TABLE \"app_custom_invoicings\" RENAME COLUMN \"skip_draft_sync_hook\" TO \"enable_draft_sync_hook\";\nUPDATE \"app_custom_invoicings\" SET \"enable_draft_sync_hook\" = NOT \"enable_draft_sync_hook\";\n-- rename a column from \"skip_issuing_sync_hook\" to \"enable_issuing_sync_hook\"\n-- atlas:nolint BC102\nALTER TABLE \"app_custom_invoicings\" RENAME COLUMN \"skip_issuing_sync_hook\" TO \"enable_issuing_sync_hook\";\nUPDATE \"app_custom_invoicings\" SET \"enable_issuing_sync_hook\" = NOT \"enable_issuing_sync_hook\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.down.sql": { + "header": "-- Remove the \"subscription.entitlement.boolean.count\" annotation from subscription items\n-- that have a boolean entitlement associated with them\n\n-- First, set annotations to NULL for items that only have the boolean count annotation\nUPDATE subscription_items si\nSET annotations = NULL\nFROM entitlements e\nWHERE si.entitlement_id = e.id\nAND e.entitlement_type = 'boolean'\nAND si.annotations::text = '{\"subscription.entitlement.boolean.count\": 1}';\n\n-- Then, remove the boolean count annotation from items that have other annotations too\nUPDATE subscription_items si\nSET annotations = si.annotations - 'subscription.entitlement.boolean.count'\nFROM entitlements e\nWHERE si.entitlement_id = e.id\nAND e.entitlement_type = 'boolean'\nAND si.annotations ? 'subscription.entitlement.boolean.count'\nAND si.annotations::text != '{\"subscription.entitlement.boolean.count\": 1}';", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20250424160933_boolean-entitlement-count-annotation.up.sql": { + "header": "-- We'll update all SubscriptionItems that have a boolean entitlement associated with them\n-- by merging their current annotations with the boolean entitlement count annotation: \"subscription.entitlement.boolean.count\"\n-- if it's already present, we'll skip the item\n-- if it's not present, we'll set its value to 1\n\nUPDATE subscription_items si\nSET annotations = CASE\n -- If there are no annotations yet, create a new object with the boolean count\n WHEN si.annotations IS NULL THEN '{\"subscription.entitlement.boolean.count\": 1}'::jsonb\n -- If annotations exist but don't have the boolean count key, add it\n WHEN NOT (si.annotations ? 'subscription.entitlement.boolean.count') THEN\n jsonb_set(si.annotations, '{subscription.entitlement.boolean.count}', '1'::jsonb)\n -- Otherwise keep the existing annotations (skip items that already have the count)\n ELSE si.annotations\nEND\nFROM entitlements e\nWHERE si.entitlement_id = e.id\nAND e.entitlement_type = 'boolean';\n", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20250506182753_backfill-invoice-at.down.sql": { + "header": "-- no-op", + "symbols": [], + "line_count": 1 + }, + "tools/migrate/migrations/20250506182753_backfill-invoice-at.up.sql": { + "header": "UPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" = 'issued';\nUPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" LIKE 'payment_processing.%';\nUPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" = 'paid';\nUPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" = 'overdue';\nUPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" = 'uncollectible';\nUPDATE \"billing_invoices\" SET \"issued_at\" = \"updated_at\" WHERE \"issued_at\" IS NULL AND \"status\" = 'voided';", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.down.sql": { + "header": "-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"tax_enforced\", DROP COLUMN \"tax_enabled\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250512174316_billing_profile_workflow_config_tax.up.sql": { + "header": "-- modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" ADD COLUMN \"tax_enabled\" boolean NOT NULL DEFAULT true, ADD COLUMN \"tax_enforced\" boolean NOT NULL DEFAULT false;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"quantity_snapshoted_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250516090128_billing-invoice-snapshotted-at.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"quantity_snapshoted_at\" timestamptz NULL;\n\n-- backfill quantity_snapshoted_at\n-- Gathering invoices should not have this value set. In the current workflow this is done in parallel\n-- with the darft invoice creation.\nUPDATE \"billing_invoices\"\n SET \"quantity_snapshoted_at\" = \"created_at\"\n WHERE \"quantity_snapshoted_at\" IS NULL AND \"status\" <> 'gathering';", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20250522155754_billing-line-index.down.sql": { + "header": "-- reverse: modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" DROP COLUMN \"index\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250522155754_billing-line-index.up.sql": { + "header": "-- modify \"billing_invoice_flat_fee_line_configs\" table\nALTER TABLE \"billing_invoice_flat_fee_line_configs\" ADD COLUMN \"index\" bigint NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.down.sql": { + "header": "-- reverse: modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" ALTER COLUMN \"feature_key\" SET NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250525121526_billing-ubp-fee-line.up.sql": { + "header": "-- modify \"billing_invoice_usage_based_line_configs\" table\nALTER TABLE \"billing_invoice_usage_based_line_configs\" ALTER COLUMN \"feature_key\" DROP NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250527084817_billing-backfill-periods.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250527084817_billing-backfill-periods.up.sql": { + "header": "UPDATE billing_invoices\nSET period_start = (\n SELECT\n MIN(period_start)\n FROM billing_invoice_lines\n WHERE\n invoice_id = billing_invoices.id AND\n deleted_at IS NULL AND\n status = 'valid'\n)\nWHERE period_start IS NULL AND status = 'gathering' AND deleted_at is NULL;\n\nUPDATE billing_invoices\nSET period_end = (\n SELECT\n MAX(period_end)\n FROM billing_invoice_lines\n WHERE\n invoice_id = billing_invoices.id AND\n deleted_at IS NULL AND", + "symbols": [], + "line_count": 23 + }, + "tools/migrate/migrations/20250604111901_subscription-sorthint.down.sql": { + "header": "-- reverse: modify \"subscription_phases\" table\nALTER TABLE \"subscription_phases\" DROP COLUMN \"sort_hint\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250604111901_subscription-sorthint.up.sql": { + "header": "-- modify \"subscription_phases\" table\nALTER TABLE \"subscription_phases\" ADD COLUMN \"sort_hint\" smallint NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250605102416_subscription-cascade.down.sql": { + "header": "-- reverse: modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" DROP CONSTRAINT \"usage_resets_entitlements_usage_reset\", ADD CONSTRAINT \"usage_resets_entitlements_usage_reset\" FOREIGN KEY (\"entitlement_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_subscription_phases_items\", ADD CONSTRAINT \"subscription_items_subscription_phases_items\" FOREIGN KEY (\"phase_id\") REFERENCES \"subscription_phases\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: modify \"subscription_phases\" table\nALTER TABLE \"subscription_phases\" DROP CONSTRAINT \"subscription_phases_subscriptions_phases\", ADD CONSTRAINT \"subscription_phases_subscriptions_phases\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: modify \"grants\" table\nALTER TABLE \"grants\" DROP CONSTRAINT \"grants_entitlements_grant\", ADD CONSTRAINT \"grants_entitlements_grant\" FOREIGN KEY (\"owner_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- reverse: modify \"balance_snapshots\" table\nALTER TABLE \"balance_snapshots\" DROP CONSTRAINT \"balance_snapshots_entitlements_balance_snapshot\", ADD CONSTRAINT \"balance_snapshots_entitlements_balance_snapshot\" FOREIGN KEY (\"owner_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20250605102416_subscription-cascade.up.sql": { + "header": "-- modify \"balance_snapshots\" table\nALTER TABLE \"balance_snapshots\" DROP CONSTRAINT \"balance_snapshots_entitlements_balance_snapshot\", ADD CONSTRAINT \"balance_snapshots_entitlements_balance_snapshot\" FOREIGN KEY (\"owner_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- modify \"grants\" table\nALTER TABLE \"grants\" DROP CONSTRAINT \"grants_entitlements_grant\", ADD CONSTRAINT \"grants_entitlements_grant\" FOREIGN KEY (\"owner_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- modify \"subscription_phases\" table\nALTER TABLE \"subscription_phases\" DROP CONSTRAINT \"subscription_phases_subscriptions_phases\", ADD CONSTRAINT \"subscription_phases_subscriptions_phases\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_subscription_phases_items\", ADD CONSTRAINT \"subscription_items_subscription_phases_items\" FOREIGN KEY (\"phase_id\") REFERENCES \"subscription_phases\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" DROP CONSTRAINT \"usage_resets_entitlements_usage_reset\", ADD CONSTRAINT \"usage_resets_entitlements_usage_reset\" FOREIGN KEY (\"entitlement_id\") REFERENCES \"entitlements\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n\n-- create trigger to delete entitlement when subscription_item is deleted\nCREATE OR REPLACE FUNCTION delete_entitlement_on_subscription_item_delete()\nRETURNS TRIGGER AS $$\nBEGIN\n -- Delete the entitlement if it exists and is referenced by the deleted subscription_item\n IF OLD.entitlement_id IS NOT NULL THEN\n DELETE FROM entitlements WHERE id = OLD.entitlement_id;\n END IF;\n RETURN OLD;", + "symbols": [], + "line_count": 27 + }, + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.down.sql": { + "header": "-- requires manual revert as we might have created additional lines in this format.", + "symbols": [], + "line_count": 1 + }, + "tools/migrate/migrations/20250605131637_migrate-flat-fees-to-ubp-flat-fees.up.sql": { + "header": "\n--- Source: https://github.com/geckoboard/pgulid/blob/master/pgulid.sql\n\nCREATE EXTENSION IF NOT EXISTS pgcrypto;\n\n-- Note: pg_temp only exists for the current session, so we don't need to clean up the function after the migration is done\nCREATE OR REPLACE FUNCTION pg_temp.generate_ulid()\nRETURNS TEXT\nAS $$\nDECLARE\n -- Crockford's Base32\n encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';\n timestamp BYTEA = E'\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000';\n output TEXT = '';\n\n unix_time BIGINT;\n ulid BYTEA;\nBEGIN\n -- 6 timestamp bytes\n unix_time = (EXTRACT(EPOCH FROM CLOCK_TIMESTAMP()) * 1000)::BIGINT;", + "symbols": [], + "line_count": 222 + }, + "tools/migrate/migrations/20250606115858_subject_create.down.sql": { + "header": "-- reverse: create index \"subject_key_organization_subjects\" to table: \"subjects\"\nDROP INDEX \"subject_key_organization_subjects\";\n\n-- reverse: create index \"subject_id\" to table: \"subjects\"\nDROP INDEX \"subject_id\";\n\n-- reverse: create index \"subject_display_name\" to table: \"subjects\"\nDROP INDEX \"subject_display_name\";\n\n-- reverse: create \"subjects\" table\nDROP TABLE \"subjects\";", + "symbols": [], + "line_count": 11 + }, + "tools/migrate/migrations/20250606115858_subject_create.up.sql": { + "header": "-- create \"subjects\" table\nCREATE TABLE IF NOT EXISTS \"subjects\" (\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"current_period_start\" timestamptz NULL,\n \"current_period_end\" timestamptz NULL,\n \"id\" character(26) NOT NULL,\n \"key\" character varying NOT NULL,\n \"display_name\" character varying NULL,\n \"metadata\" jsonb NULL,\n \"stripe_customer_id\" character varying NULL,\n \"organization_subjects\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\n-- create index \"subject_id\" to table: \"subjects\"\nCREATE UNIQUE INDEX IF NOT EXISTS \"subject_id\" ON \"subjects\" (\"id\");\n\n-- create index \"subject_key_organization_subjects\" to table: \"subjects\"\nCREATE UNIQUE INDEX IF NOT EXISTS \"subject_key_organization_subjects\" ON \"subjects\" (\"key\", \"organization_subjects\");", + "symbols": [], + "line_count": 23 + }, + "tools/migrate/migrations/20250606115859_subject_namespace.down.sql": { + "header": "-- modify \"subjects\" table\n-- atlas:nolint BC102\nALTER TABLE \"subjects\" RENAME COLUMN \"namespace\" TO \"organization_subjects\";\n\n-- create index \"subject_key_organization_subjects\" to table: \"subjects\"\nCREATE UNIQUE INDEX \"subject_key_organization_subjects\" ON \"subjects\" (\"key\", \"organization_subjects\");\n\n-- atlas:nolint DS103 BC102\nALTER TABLE \"subjects\"\n ADD COLUMN \"current_period_start\" timestamptz NULL,\n ADD COLUMN \"current_period_end\" timestamptz NULL;\n\n-- drop index \"subject_namespace\" from table: \"subjects\"\nDROP INDEX \"subject_namespace\";\n\n-- drop index \"subject_key_namespace\" from table: \"subjects\"\nDROP INDEX \"subject_key_namespace\";", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20250606115859_subject_namespace.up.sql": { + "header": "-- drop index \"subject_key_organization_subjects\" to table: \"subjects\"\nDROP INDEX \"subject_key_organization_subjects\";\n\n-- modify \"subjects\" table\n-- atlas:nolint BC102\nALTER TABLE \"subjects\" RENAME COLUMN \"organization_subjects\" TO \"namespace\";\n\n-- atlas:nolint DS103 BC102\nALTER TABLE \"subjects\"\n DROP COLUMN \"current_period_start\",\n DROP COLUMN \"current_period_end\";\n\n-- create index \"subject_namespace\" to table: \"subjects\"\nCREATE INDEX IF NOT EXISTS \"subject_namespace\" ON \"subjects\" (\"namespace\");\n\n-- create index \"subject_key_namespace\" to table: \"subjects\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX IF NOT EXISTS \"subject_key_namespace\" ON \"subjects\" (\"key\", \"namespace\");", + "symbols": [], + "line_count": 18 + }, + "tools/migrate/migrations/20250609172811_billing-split-line-group.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_billing_invoice_split_line_groups_billing\", DROP COLUMN \"split_line_group_id\";\n-- reverse: create index \"billinginvoicesplitlinegroup_namespace_unique_reference_id\" to table: \"billing_invoice_split_line_groups\"\nDROP INDEX \"billinginvoicesplitlinegroup_namespace_unique_reference_id\";\n-- reverse: create index \"billinginvoicesplitlinegroup_namespace_id\" to table: \"billing_invoice_split_line_groups\"\nDROP INDEX \"billinginvoicesplitlinegroup_namespace_id\";\n-- reverse: create index \"billinginvoicesplitlinegroup_namespace\" to table: \"billing_invoice_split_line_groups\"\nDROP INDEX \"billinginvoicesplitlinegroup_namespace\";\n-- reverse: create index \"billinginvoicesplitlinegroup_id\" to table: \"billing_invoice_split_line_groups\"\nDROP INDEX \"billinginvoicesplitlinegroup_id\";\n-- reverse: create \"billing_invoice_split_line_groups\" table\nDROP TABLE \"billing_invoice_split_line_groups\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20250609172811_billing-split-line-group.up.sql": { + "header": "-- create \"billing_invoice_split_line_groups\" table\nCREATE TABLE \"billing_invoice_split_line_groups\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"currency\" character varying(3) NOT NULL,\n \"tax_config\" jsonb NULL,\n \"service_period_start\" timestamptz NOT NULL,\n \"service_period_end\" timestamptz NOT NULL,\n \"unique_reference_id\" character varying NULL,\n \"ratecard_discounts\" jsonb NULL,\n \"feature_key\" character varying NULL,\n \"price\" jsonb NOT NULL,\n \"subscription_id\" character(26) NULL,\n \"subscription_item_id\" character(26) NULL,", + "symbols": [], + "line_count": 36 + }, + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250609204117_billing-migrate-split-line-groups.up.sql": { + "header": "\n-- Step 1: convert existing split lines into split line groups\n\nINSERT INTO billing_invoice_split_line_groups\n(\n id,\n namespace,\n metadata,\n created_at,\n updated_at,\n deleted_at,\n name,\n description,\n service_period_start,\n service_period_end,\n currency,\n tax_config,\n unique_reference_id,\n ratecard_discounts,\n feature_key,", + "symbols": [], + "line_count": 60 + }, + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"pro_rating_config\", DROP COLUMN \"billing_cadence\";\n-- reverse: modify \"plans\" table\nALTER TABLE \"plans\" DROP COLUMN \"pro_rating_config\", DROP COLUMN \"billing_cadence\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250610101736_plan-subscription-billing-cadence.up.sql": { + "header": "-- original: 20250606130010_plan-subscription-billing-cadence.up.sql\n-- modify \"plans\" table - add columns as nullable first\nALTER TABLE \"plans\" ADD COLUMN \"billing_cadence\" character varying;\nALTER TABLE \"plans\" ADD COLUMN \"pro_rating_config\" jsonb;\n\n-- Update existing plans with billing_cadence from the last phase rate cards\n-- Find the shortest (most frequent) billing cadence from rate cards in the last phase\nWITH last_phase_billing_cadences AS (\n SELECT\n p.id as plan_id,\n prc.billing_cadence\n FROM plans p\n JOIN plan_phases pp ON p.id = pp.plan_id\n JOIN plan_rate_cards prc ON pp.id = prc.phase_id\n WHERE pp.duration IS NULL -- last phase\n AND pp.deleted_at IS NULL -- exclude soft-deleted phases\n AND prc.deleted_at IS NULL -- exclude soft-deleted rate cards\n AND p.deleted_at IS NULL -- exclude soft-deleted plans\n AND prc.billing_cadence IS NOT NULL\n AND prc.billing_cadence != ''", + "symbols": [], + "line_count": 103 + }, + "tools/migrate/migrations/20250610125104_subs-billing-anchor.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"billing_anchor\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250610125104_subs-billing-anchor.up.sql": { + "header": "-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"billing_anchor\" timestamptz;\n\n-- update all entries to set the billing anchor to the active_from time\nUPDATE \"subscriptions\" SET \"billing_anchor\" = \"active_from\" WHERE \"billing_anchor\" IS NULL;\n\n-- make the billing anchor not nullable\nALTER TABLE \"subscriptions\" ALTER COLUMN \"billing_anchor\" SET NOT NULL;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250618194112_remove_app_default.down.sql": { + "header": "-- reverse: modify \"apps\" table\nALTER TABLE \"apps\" ADD COLUMN \"is_default\" boolean NOT NULL DEFAULT false;\n\n-- atlas:nolint MF101\n-- reverse: drop index \"app_namespace_type_is_default\" from table: \"apps\"\nCREATE UNIQUE INDEX \"app_namespace_type_is_default\" ON \"apps\" (\"namespace\", \"type\", \"is_default\") WHERE (is_default = true);", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250618194112_remove_app_default.up.sql": { + "header": "-- reverse: create index \"app_namespace_type_is_default\" to table: \"apps\"\nDROP INDEX \"app_namespace_type_is_default\";\n-- reverse: modify \"apps\" table\n-- atlas:nolint DS103\nALTER TABLE \"apps\" DROP COLUMN \"is_default\";", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.down.sql": { + "header": "-- reverse: modify \"plans\" table\nALTER TABLE \"plans\" ADD COLUMN \"billables_must_align\" boolean NOT NULL DEFAULT false;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250623133834_remove-billablesmustalign-from-plan.up.sql": { + "header": "-- modify \"plans\" table\nALTER TABLE \"plans\" DROP COLUMN \"billables_must_align\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"billables_must_align\" boolean NOT NULL DEFAULT false;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250624115812_rm-subscription-alignment.up.sql": { + "header": "-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"billables_must_align\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.down.sql": { + "header": "-- reverse: modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" DROP COLUMN \"usage_period_interval\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250703081943_entitlement-usageperiod-interval-change.up.sql": { + "header": "-- modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" ADD COLUMN \"usage_period_interval\" character varying NULL;\n\n-- Update all existing usage_resets with the usage_period_interval from their corresponding entitlement\nUPDATE usage_resets\nSET usage_period_interval = e.usage_period_interval\nFROM entitlements e\nWHERE usage_resets.entitlement_id = e.id;\n\n-- Now make the column NOT NULL\n-- atlas:nolint MF104\nALTER TABLE \"usage_resets\" ALTER COLUMN \"usage_period_interval\" SET NOT NULL;", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20250707075725_billingline-annotations.down.sql": { + "header": "-- reverse: create index \"billinginvoiceline_annotations\" to table: \"billing_invoice_lines\"\nDROP INDEX \"billinginvoiceline_annotations\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250707075725_billingline-annotations.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"billinginvoiceline_annotations\" to table: \"billing_invoice_lines\"\nCREATE INDEX \"billinginvoiceline_annotations\" ON \"billing_invoice_lines\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250711121333_customer_annotations.down.sql": { + "header": "-- reverse: create index \"customer_annotations\" to table: \"customers\"\nDROP INDEX \"customer_annotations\";\n-- reverse: modify \"customers\" table\nALTER TABLE \"customers\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250711121333_customer_annotations.up.sql": { + "header": "-- modify \"customers\" table\nALTER TABLE \"customers\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"customer_annotations\" to table: \"customers\"\nCREATE INDEX \"customer_annotations\" ON \"customers\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250731141420_billing-migrate-flat-fee-lines.up.sql": { + "header": "\n-- exact copy of 20250605131637_migrate-flat-fees-to-ubp-flat-fees.up\n-- but now that we are removing the flat fee lines altogether from the config we need to do a second pass of migrations\n\n--- Source: https://github.com/geckoboard/pgulid/blob/master/pgulid.sql\n\nCREATE EXTENSION IF NOT EXISTS pgcrypto;\n\n-- Note: pg_temp only exists for the current session, so we don't need to clean up the function after the migration is done\nCREATE OR REPLACE FUNCTION pg_temp.generate_ulid()\nRETURNS TEXT\nAS $$\nDECLARE\n -- Crockford's Base32\n encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';\n timestamp BYTEA = E'\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000';\n output TEXT = '';\n\n unix_time BIGINT;\n ulid BYTEA;", + "symbols": [], + "line_count": 225 + }, + "tools/migrate/migrations/20250731160524_billing-second-resolution.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250731160524_billing-second-resolution.up.sql": { + "header": "-- We need to annotate the previous lines to indicate to subscription sync to ignore them due to the period calculation change.\n-- Billing sync will ensure that the lines are continous for a subscription item, thus we will not have a few seconds of gaps\n-- in the invoices.\n\n-- Warning: If you want to reuse this please make sure that you also add billing.subscription.sync.force-continuous-lines: true\nUPDATE billing_invoice_lines\nSET\n annotations = CASE\n WHEN annotations IS NULL OR annotations = 'null'::jsonb THEN '{}'::jsonb\n ELSE annotations\n END || jsonb_build_object('billing.subscription.sync.ignore', true)\nWHERE\n -- Line type usage based\n \"type\" = 'usage_based'\n -- Status valid\n AND \"status\" = 'valid'\n -- InvoiceID belongs to a not gathering invoice\n AND \"invoice_id\" NOT IN (\n SELECT \"id\" FROM billing_invoices\n WHERE \"status\" = 'gathering'", + "symbols": [], + "line_count": 21 + }, + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.down.sql": { + "header": "-- reverse: create index \"usagereset_annotations\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_annotations\";\n-- reverse: modify \"usage_resets\" table\nALTER TABLE \"usage_resets\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250807075408_usageperiod-duration-calculations.up.sql": { + "header": "CREATE EXTENSION IF NOT EXISTS pgcrypto;\n\nALTER TABLE \"usage_resets\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"usagereset_annotations\" to table: \"usage_resets\"\nCREATE INDEX \"usagereset_annotations\" ON \"usage_resets\" USING gin (\"annotations\");\n\n--\n-- Note: we'll create permanent functions (that we do not later drop). The reasoning is twofold:\n-- 1. Somewhat self-evidently for later reuse\n-- 2. So we have access to them test-time\n-- All functions will be prefixed with \"om_func_\"\n--\n\nCREATE OR REPLACE FUNCTION om_func_generate_ulid()\nRETURNS TEXT\nAS $$\nDECLARE\n -- Crockford's Base32\n encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';\n timestamp BYTEA = E'\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000';", + "symbols": [], + "line_count": 483 + }, + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"customer_key\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250811130613_add_billing_invoice_customer_key.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"customer_key\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250815072132_force-continuous-lines-annotation.up.sql": { + "header": "UPDATE billing_invoice_lines\n SET annotations = annotations || '{\"billing.subscription.sync.force-continuous-lines\": true}'\n WHERE\n (annotations is not null and annotations <> 'null'::jsonb) and (annotations -> 'billing.subscription.sync.ignore' = 'true'::jsonb);", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250818081817_subscription-period.down.sql": { + "header": "-- reverse: modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" DROP COLUMN \"subscription_billing_period_to\", DROP COLUMN \"subscription_billing_period_from\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"subscription_billing_period_to\", DROP COLUMN \"subscription_billing_period_from\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250818081817_subscription-period.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"subscription_billing_period_from\" timestamptz NULL, ADD COLUMN \"subscription_billing_period_to\" timestamptz NULL;\n-- modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" ADD COLUMN \"subscription_billing_period_from\" timestamptz NULL, ADD COLUMN \"subscription_billing_period_to\" timestamptz NULL;\n\n-- backfill data (so that we have some data on the old invoices), gathering invoices will be updated by the subscription sync\nUPDATE billing_invoice_lines\n SET subscription_billing_period_from = period_start,\n subscription_billing_period_to = period_end\n WHERE subscription_id IS NOT NULL;\n\nUPDATE billing_invoice_split_line_groups\n SET subscription_billing_period_from = service_period_start,\n subscription_billing_period_to = service_period_end\n WHERE subscription_id IS NOT NULL;", + "symbols": [], + "line_count": 15 + }, + "tools/migrate/migrations/20250818093933_entitlement-subject-id.down.sql": { + "header": "-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP CONSTRAINT \"entitlements_subjects_entitlements\", DROP COLUMN \"subject_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250818093933_entitlement-subject-id.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"subject_id\" character(26) NULL;\n\n-- Now let's find the matching subject_id for each entitlement by filtering for subject_key and namespace\n-- We use DISTINCT ON to ensure we only get one row per entitlement (even though we have a unique constraint on key+namespace)\nWITH tt AS (\n SELECT DISTINCT ON (e.id)\n e.id as entitlement_id,\n e.namespace,\n s.id as subject_id\n FROM entitlements e\n JOIN subjects s ON e.subject_key = s.key AND e.namespace = s.namespace\n ORDER BY e.id, s.created_at ASC\n)\nUPDATE entitlements e\nSET subject_id = t.subject_id\nFROM tt t\nWHERE e.id = t.entitlement_id;\n\n-- Now, let's create a new subject for each entitlement that doesn't have a subject_id and set the subject_id in the entitlements table", + "symbols": [], + "line_count": 43 + }, + "tools/migrate/migrations/20250821121421_entitlement-customer-link.down.sql": { + "header": "-- reverse: create index \"entitlement_namespace_subject_id\" to table: \"entitlements\"\nDROP INDEX \"entitlement_namespace_subject_id\";\n-- reverse: create index \"entitlement_namespace_id_customer_id\" to table: \"entitlements\"\nDROP INDEX \"entitlement_namespace_id_customer_id\";\n-- reverse: create index \"entitlement_namespace_customer_id\" to table: \"entitlements\"\nDROP INDEX \"entitlement_namespace_customer_id\";\n-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP CONSTRAINT \"entitlements_customers_entitlements\", DROP COLUMN \"customer_id\";\n-- reverse: drop index \"entitlement_namespace_id_subject_key\" from table: \"entitlements\"\nCREATE INDEX \"entitlement_namespace_id_subject_key\" ON \"entitlements\" (\"namespace\", \"id\", \"subject_key\");", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20250821121421_entitlement-customer-link.up.sql": { + "header": "-- drop index \"entitlement_namespace_id_subject_key\" from table: \"entitlements\"\nDROP INDEX IF EXISTS \"entitlement_namespace_id_subject_key\";\n\n-- 1) add column as NULLABLE first so we can backfill\nALTER TABLE \"entitlements\" ADD COLUMN \"customer_id\" character(26);\n\n-- 2) backfill customer_id from usage attribution mapping (customer_subjects)\n-- We match by namespace + subject_key and only consider active (deleted_at IS NULL) mappings\nUPDATE \"entitlements\" e\nSET \"customer_id\" = cs.\"customer_id\"\nFROM \"customer_subjects\" cs\nWHERE cs.\"namespace\" = e.\"namespace\"\n AND cs.\"subject_key\" = e.\"subject_key\"\n AND cs.\"deleted_at\" IS NULL\n AND (e.\"customer_id\" IS NULL OR e.\"customer_id\" = '');\n\n-- 3) add foreign key constraint (allow NULLs for legacy rows)\nALTER TABLE \"entitlements\"\n ADD CONSTRAINT \"entitlements_customers_entitlements\"\n FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\")", + "symbols": [], + "line_count": 30 + }, + "tools/migrate/migrations/20250904120629_subject-created-at-index.down.sql": { + "header": "-- reverse: create index \"subject_created_at_id\" to table: \"subjects\"\nDROP INDEX \"subject_created_at_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250904120629_subject-created-at-index.up.sql": { + "header": "-- create index \"subject_created_at_id\" to table: \"subjects\"\nCREATE INDEX \"subject_created_at_id\" ON \"subjects\" (\"created_at\", \"id\");", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250908130504_customer-indexes.down.sql": { + "header": "-- reverse: create index \"customersubjects_subject_key\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_subject_key\";\n-- reverse: create index \"customersubjects_deleted_at_customer_id\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_deleted_at_customer_id\";\n-- reverse: create index \"customersubjects_deleted_at\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_deleted_at\";\n-- reverse: create index \"customersubjects_customer_id\" to table: \"customer_subjects\"\nDROP INDEX \"customersubjects_customer_id\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250908130504_customer-indexes.up.sql": { + "header": "-- create index \"customersubjects_customer_id\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_customer_id\" ON \"customer_subjects\" (\"customer_id\");\n-- create index \"customersubjects_deleted_at\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_deleted_at\" ON \"customer_subjects\" (\"deleted_at\");\n-- create index \"customersubjects_deleted_at_customer_id\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_deleted_at_customer_id\" ON \"customer_subjects\" (\"deleted_at\", \"customer_id\");\n-- create index \"customersubjects_subject_key\" to table: \"customer_subjects\"\nCREATE INDEX \"customersubjects_subject_key\" ON \"customer_subjects\" (\"subject_key\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20250911154229_subject_deleted_at.down.sql": { + "header": "-- reverse: create index \"subject_namespace_key\" to table: \"subjects\"\nDROP INDEX \"subject_namespace_key\";\n-- reverse: modify \"subjects\" table\nALTER TABLE \"subjects\" DROP COLUMN \"deleted_at\";\n-- reverse: drop index \"subject_key_namespace\" from table: \"subjects\"\nCREATE UNIQUE INDEX \"subject_key_namespace\" ON \"subjects\" (\"key\", \"namespace\");", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250911154229_subject_deleted_at.up.sql": { + "header": "-- drop index \"subject_key_namespace\" from table: \"subjects\"\nDROP INDEX \"subject_key_namespace\";\n-- modify \"subjects\" table\nALTER TABLE \"subjects\" ADD COLUMN \"deleted_at\" timestamptz NULL;\n-- create index \"subject_namespace_key\" to table: \"subjects\"\nCREATE UNIQUE INDEX \"subject_namespace_key\" ON \"subjects\" (\"namespace\", \"key\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250924131607_subject-index.down.sql": { + "header": "-- reverse: create index \"subject_namespace_key_deleted_at\" to table: \"subjects\"\nDROP INDEX \"subject_namespace_key_deleted_at\";\n-- reverse: create index \"subject_namespace_id\" to table: \"subjects\"\nDROP INDEX \"subject_namespace_id\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250924131607_subject-index.up.sql": { + "header": "-- create index \"subject_namespace_id\" to table: \"subjects\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"subject_namespace_id\" ON \"subjects\" (\"namespace\", \"id\");\n-- create index \"subject_namespace_key_deleted_at\" to table: \"subjects\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"subject_namespace_key_deleted_at\" ON \"subjects\" (\"namespace\", \"key\", \"deleted_at\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20250925160650_grant-annotations.down.sql": { + "header": "-- reverse: create index \"grant_annotations\" to table: \"grants\"\nDROP INDEX \"grant_annotations\";\n-- reverse: modify \"grants\" table\nALTER TABLE \"grants\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20250925160650_grant-annotations.up.sql": { + "header": "-- modify \"grants\" table\nALTER TABLE \"grants\" ADD COLUMN \"annotations\" jsonb NULL;\n\n-- NOTE: metadata will be dropped later\n-- NOTE: technically, this might parse the values from strings to other primitive types when we later parse this.\n-- convert metadata to annotations: all values will be converted to strings\nUPDATE \"grants\" SET \"annotations\" = \"metadata\";\n\n\n-- create index \"grant_annotations\" to table: \"grants\"\nCREATE INDEX \"grant_annotations\" ON \"grants\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 11 + }, + "tools/migrate/migrations/20250925160958_grant-expiration-optional.down.sql": { + "header": "-- reverse: modify \"grants\" table\nALTER TABLE \"grants\" ALTER COLUMN \"expires_at\" SET NOT NULL, ALTER COLUMN \"expiration\" SET NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250925160958_grant-expiration-optional.up.sql": { + "header": "-- modify \"grants\" table\nALTER TABLE \"grants\" ALTER COLUMN \"expiration\" DROP NOT NULL, ALTER COLUMN \"expires_at\" DROP NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250926145502_grant-annotations.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250926145502_grant-annotations.up.sql": { + "header": "-- Copy back annotations to metadata where it has been updated\nUPDATE \"grants\" SET \"metadata\" = \"annotations\" WHERE \"metadata\" IS DISTINCT FROM \"annotations\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20250926145930_null-grant-annotations.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20250926145930_null-grant-annotations.up.sql": { + "header": "-- Now let's null annotations. This should be run together with the previous migration. They are in seperate files so there's no change migration runner would mistakenly run this without the previous migration succeeding.\nUPDATE \"grants\" SET \"annotations\" = NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.down.sql": { + "header": "-- reverse: modify \"features\" table\nALTER TABLE \"features\" DROP COLUMN \"advanced_meter_group_by_filters\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251006141236_feature-advanced-meter-group-by-filters.up.sql": { + "header": "-- modify \"features\" table\nALTER TABLE \"features\" ADD COLUMN \"advanced_meter_group_by_filters\" jsonb NULL;\n\n-- Copy existing meter_group_by_filters data to advanced_meter_group_by_filters\n-- Convert simple key-value pairs to FilterString objects with $eq operator\nUPDATE \"features\"\nSET \"advanced_meter_group_by_filters\" = (\n SELECT COALESCE(\n jsonb_object_agg(\n kv.key,\n jsonb_build_object('$eq', kv.value)\n ),\n '{}'::jsonb\n )\n FROM jsonb_each_text(\"meter_group_by_filters\") AS kv(key, value)\n)\nWHERE \"meter_group_by_filters\" IS NOT NULL \n AND \"meter_group_by_filters\" != 'null'::jsonb\n AND jsonb_typeof(\"meter_group_by_filters\") = 'object';", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.down.sql": { + "header": "-- reverse: create index \"billinginvoice_namespace_updated_at\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_updated_at\";\n-- reverse: create index \"billinginvoice_namespace_period_start\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_period_start\";\n-- reverse: create index \"billinginvoice_namespace_issued_at\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_issued_at\";\n-- reverse: create index \"billinginvoice_namespace_created_at\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_created_at\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20251014132051_invoice-order-by-indexes.up.sql": { + "header": "-- create index \"billinginvoice_namespace_created_at\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace_created_at\" ON \"billing_invoices\" (\"namespace\", \"created_at\");\n-- create index \"billinginvoice_namespace_issued_at\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace_issued_at\" ON \"billing_invoices\" (\"namespace\", \"issued_at\");\n-- create index \"billinginvoice_namespace_period_start\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace_period_start\" ON \"billing_invoices\" (\"namespace\", \"period_start\");\n-- create index \"billinginvoice_namespace_updated_at\" to table: \"billing_invoices\"\nCREATE INDEX \"billinginvoice_namespace_updated_at\" ON \"billing_invoices\" (\"namespace\", \"updated_at\");", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.down.sql": { + "header": "-- reverse: create index \"notificationrule_annotations\" to table: \"notification_rules\"\nDROP INDEX \"notificationrule_annotations\";\n-- reverse: modify \"notification_rules\" table\nALTER TABLE \"notification_rules\" DROP COLUMN \"metadata\", DROP COLUMN \"annotations\";\n-- reverse: create index \"notificationeventdeliverystatus_annotations\" to table: \"notification_event_delivery_status\"\nDROP INDEX \"notificationeventdeliverystatus_annotations\";\n-- reverse: modify \"notification_event_delivery_status\" table\nALTER TABLE \"notification_event_delivery_status\" DROP COLUMN \"annotations\";\n-- reverse: create index \"notificationchannel_annotations\" to table: \"notification_channels\"\nDROP INDEX \"notificationchannel_annotations\";\n-- reverse: modify \"notification_channels\" table\nALTER TABLE \"notification_channels\" DROP COLUMN \"metadata\", DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20251026114744_notification_metadata_annotations.up.sql": { + "header": "-- modify \"notification_channels\" table\nALTER TABLE \"notification_channels\" ADD COLUMN \"annotations\" jsonb NULL, ADD COLUMN \"metadata\" jsonb NULL;\n-- create index \"notificationchannel_annotations\" to table: \"notification_channels\"\nCREATE INDEX \"notificationchannel_annotations\" ON \"notification_channels\" USING gin (\"annotations\");\n-- modify \"notification_event_delivery_status\" table\nALTER TABLE \"notification_event_delivery_status\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"notificationeventdeliverystatus_annotations\" to table: \"notification_event_delivery_status\"\nCREATE INDEX \"notificationeventdeliverystatus_annotations\" ON \"notification_event_delivery_status\" USING gin (\"annotations\");\n-- modify \"notification_rules\" table\nALTER TABLE \"notification_rules\" ADD COLUMN \"annotations\" jsonb NULL, ADD COLUMN \"metadata\" jsonb NULL;\n-- create index \"notificationrule_annotations\" to table: \"notification_rules\"\nCREATE INDEX \"notificationrule_annotations\" ON \"notification_rules\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20251027102800_improve-subject-indexes.down.sql": { + "header": "-- reverse: create index \"subject_namespace_key_deleted_at_unique\" to table: \"subjects\"\nDROP INDEX \"subject_namespace_key_deleted_at_unique\";\n-- reverse: create index \"subject_namespace_key_deleted_at\" to table: \"subjects\"\nDROP INDEX \"subject_namespace_key_deleted_at\";\n-- reverse: drop index \"subject_namespace_key_deleted_at\" from table: \"subjects\"\nCREATE UNIQUE INDEX \"subject_namespace_key_deleted_at\" ON \"subjects\" (\"namespace\", \"key\", \"deleted_at\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20251027102800_improve-subject-indexes.up.sql": { + "header": "-- rename index \"subject_namespace_key_deleted_at\" to \"subject_namespace_key_deleted_at_unique\"\nALTER INDEX \"subject_namespace_key_deleted_at\" RENAME TO \"subject_namespace_key_deleted_at_unique\";\n-- create index \"subject_namespace_key_deleted_at\" to table: \"subjects\"\nCREATE INDEX \"subject_namespace_key_deleted_at\" ON \"subjects\" (\"namespace\", \"key\", \"deleted_at\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.down.sql": { + "header": "-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP COLUMN \"anchored_alignment_detail\";\n-- reverse: modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" DROP COLUMN \"anchored_alignment_detail\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251029132709_first-day-of-month-billing.up.sql": { + "header": "-- modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" ADD COLUMN \"anchored_alignment_detail\" jsonb NULL;\n-- modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" ADD COLUMN \"anchored_alignment_detail\" jsonb NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251102163348_add-subscription-annotations.down.sql": { + "header": "-- reverse: create index \"subscription_annotations\" to table: \"subscriptions\"\nDROP INDEX \"subscription_annotations\";\n-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251102163348_add-subscription-annotations.up.sql": { + "header": "-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"subscription_annotations\" to table: \"subscriptions\"\nCREATE INDEX \"subscription_annotations\" ON \"subscriptions\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251106124357_notification_deliverystatus.down.sql": { + "header": "-- reverse: create index \"notificationeventdeliverystatus_namespace_state_next_attempt_at\" to table: \"notification_event_delivery_status\"\nDROP INDEX \"notificationeventdeliverystatus_namespace_state_next_attempt_at\";\n-- reverse: modify \"notification_event_delivery_status\" table\nALTER TABLE \"notification_event_delivery_status\" DROP COLUMN \"attempts\", DROP COLUMN \"next_attempt_at\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251106124357_notification_deliverystatus.up.sql": { + "header": "-- modify \"notification_event_delivery_status\" table\nALTER TABLE \"notification_event_delivery_status\" ADD COLUMN \"next_attempt_at\" timestamptz NULL, ADD COLUMN \"attempts\" jsonb NULL;\n-- create index \"notificationeventdeliverystatus_namespace_state_next_attempt_at\" to table: \"notification_event_delivery_status\"\nCREATE INDEX \"notificationeventdeliverystatus_namespace_state_next_attempt_at\" ON \"notification_event_delivery_status\" (\"namespace\", \"state\", \"next_attempt_at\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.down.sql": { + "header": "-- reverse: modify \"entitlements\" table\nALTER TABLE \"entitlements\" ADD COLUMN \"subject_id\" character(26) NOT NULL, ADD COLUMN \"subject_key\" character varying NOT NULL;\n\n-- lets add back those indexes atlas somehow misses....\nCREATE INDEX IF NOT EXISTS \"entitlement_namespace_subject_key\" ON \"entitlements\" (\"namespace\", \"subject_key\");\nCREATE INDEX IF NOT EXISTS \"entitlement_namespace_subject_id\" ON \"entitlements\" (\"namespace\", \"subject_id\");\n\n-- and the constraint\nALTER TABLE \"entitlements\" ADD CONSTRAINT \"entitlements_subjects_entitlements\" FOREIGN KEY (\"subject_id\") REFERENCES \"subjects\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20251110132128_remove-subject-from-entitlement.up.sql": { + "header": "-- modify \"entitlements\" table\nALTER TABLE \"entitlements\" DROP COLUMN \"subject_key\", DROP COLUMN \"subject_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251121083843_meter_annotations.down.sql": { + "header": "-- reverse: create index \"meter_annotations\" to table: \"meters\"\nDROP INDEX \"meter_annotations\";\n-- reverse: modify \"meters\" table\nALTER TABLE \"meters\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251121083843_meter_annotations.up.sql": { + "header": "-- modify \"meters\" table\nALTER TABLE \"meters\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"meter_annotations\" to table: \"meters\"\nCREATE INDEX \"meter_annotations\" ON \"meters\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"payment_processing_entered_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251127184619_invoice-payment-processing-entered-at.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"payment_processing_entered_at\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.down.sql": { + "header": "-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ALTER COLUMN \"customer_usage_attribution\" SET NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251210162410_make-customer-usage-attribution-optional.up.sql": { + "header": "-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ALTER COLUMN \"customer_usage_attribution\" DROP NOT NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251211145809_meter_event_type.down.sql": { + "header": "-- reverse: create index \"meter_namespace_event_type\" to table: \"meters\"\nDROP INDEX \"meter_namespace_event_type\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251211145809_meter_event_type.up.sql": { + "header": "-- create index \"meter_namespace_event_type\" to table: \"meters\"\nCREATE INDEX \"meter_namespace_event_type\" ON \"meters\" (\"namespace\", \"event_type\");", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20251216153810_subscription-sync-state.down.sql": { + "header": "-- reverse: create index \"subscriptionbillingsyncstate_namespace_subscription_id\" to table: \"subscription_billing_sync_states\"\nDROP INDEX \"subscriptionbillingsyncstate_namespace_subscription_id\";\n-- reverse: create index \"subscriptionbillingsyncstate_namespace\" to table: \"subscription_billing_sync_states\"\nDROP INDEX \"subscriptionbillingsyncstate_namespace\";\n-- reverse: create index \"subscriptionbillingsyncstate_id\" to table: \"subscription_billing_sync_states\"\nDROP INDEX \"subscriptionbillingsyncstate_id\";\n-- reverse: create index \"subscription_billing_sync_states_subscription_id_key\" to table: \"subscription_billing_sync_states\"\nDROP INDEX \"subscription_billing_sync_states_subscription_id_key\";\n-- reverse: create \"subscription_billing_sync_states\" table\nDROP TABLE \"subscription_billing_sync_states\";", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20251216153810_subscription-sync-state.up.sql": { + "header": "-- create \"subscription_billing_sync_states\" table\nCREATE TABLE \"subscription_billing_sync_states\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"has_billables\" boolean NOT NULL,\n \"synced_at\" timestamptz NOT NULL,\n \"next_sync_after\" timestamptz NULL,\n \"subscription_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"subscription_billing_sync_states_subscriptions_billing_sync_sta\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"subscription_billing_sync_states_subscription_id_key\" to table: \"subscription_billing_sync_states\"\nCREATE UNIQUE INDEX \"subscription_billing_sync_states_subscription_id_key\" ON \"subscription_billing_sync_states\" (\"subscription_id\");\n-- create index \"subscriptionbillingsyncstate_id\" to table: \"subscription_billing_sync_states\"\nCREATE UNIQUE INDEX \"subscriptionbillingsyncstate_id\" ON \"subscription_billing_sync_states\" (\"id\");\n-- create index \"subscriptionbillingsyncstate_namespace\" to table: \"subscription_billing_sync_states\"\nCREATE INDEX \"subscriptionbillingsyncstate_namespace\" ON \"subscription_billing_sync_states\" (\"namespace\");\n-- create index \"subscriptionbillingsyncstate_namespace_subscription_id\" to table: \"subscription_billing_sync_states\"\nCREATE UNIQUE INDEX \"subscriptionbillingsyncstate_namespace_subscription_id\" ON \"subscription_billing_sync_states\" (\"namespace\", \"subscription_id\");", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20251230114920_static_entitlement_config.down.sql": { + "header": "--- Restore config data.\nUPDATE entitlements\nSET config = to_jsonb(encode(convert_to(to_json(config::text)::text, 'UTF8'), 'base64')::text)\nWHERE entitlement_type = 'static' AND config IS NOT NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20251230114920_static_entitlement_config.up.sql": { + "header": "--- Update JSON configs to store JSON objects instead of their base64 encoded JSON string representation.\nUPDATE entitlements\nSET config = ((convert_from(decode((config #>> '{}')::text, 'base64'), 'UTF8'))::jsonb #>> '{}')::jsonb\nWHERE entitlement_type = 'static' AND config IS NOT NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.down.sql": { + "header": "-- reverse: create index \"feature_namespace_meter_slug\" to table: \"features\"\nDROP INDEX \"feature_namespace_meter_slug\";\n-- reverse: create index \"customer_namespace_key_deleted_at\" to table: \"customers\"\nDROP INDEX \"customer_namespace_key_deleted_at\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260106184018_balance_worker_idx_improvements.up.sql": { + "header": "-- create index \"customer_namespace_key_deleted_at\" to table: \"customers\"\nCREATE INDEX \"customer_namespace_key_deleted_at\" ON \"customers\" (\"namespace\", \"key\", \"deleted_at\");\n-- create index \"feature_namespace_meter_slug\" to table: \"features\"\nCREATE INDEX \"feature_namespace_meter_slug\" ON \"features\" (\"namespace\", \"meter_slug\") WHERE (archived_at IS NULL);", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260112160815_detailed-lines.down.sql": { + "header": "-- reverse: create index \"billingstdinvdetailedlineamntdiscount_ns_parent_child_id\" to table: \"billing_standard_invoice_detailed_line_amount_discounts\"\nDROP INDEX \"billingstdinvdetailedlineamntdiscount_ns_parent_child_id\";\n-- reverse: create index \"billingstandardinvoicedetailedlineamountdiscount_namespace_line\" to table: \"billing_standard_invoice_detailed_line_amount_discounts\"\nDROP INDEX \"billingstandardinvoicedetailedlineamountdiscount_namespace_line\";\n-- reverse: create index \"billingstandardinvoicedetailedlineamountdiscount_namespace\" to table: \"billing_standard_invoice_detailed_line_amount_discounts\"\nDROP INDEX \"billingstandardinvoicedetailedlineamountdiscount_namespace\";\n-- reverse: create index \"billingstandardinvoicedetailedlineamountdiscount_id\" to table: \"billing_standard_invoice_detailed_line_amount_discounts\"\nDROP INDEX \"billingstandardinvoicedetailedlineamountdiscount_id\";\n-- reverse: create \"billing_standard_invoice_detailed_line_amount_discounts\" table\nDROP TABLE \"billing_standard_invoice_detailed_line_amount_discounts\";\n-- reverse: create index \"billingstdinvdetailedline_ns_parent_child_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstdinvdetailedline_ns_parent_child_id\";\n-- reverse: create index \"billingstandardinvoicedetailedline_namespace_parent_line_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstandardinvoicedetailedline_namespace_parent_line_id\";\n-- reverse: create index \"billingstandardinvoicedetailedline_namespace_invoice_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstandardinvoicedetailedline_namespace_invoice_id\";\n-- reverse: create index \"billingstandardinvoicedetailedline_namespace_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstandardinvoicedetailedline_namespace_id\";\n-- reverse: create index \"billingstandardinvoicedetailedline_namespace\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstandardinvoicedetailedline_namespace\";", + "symbols": [], + "line_count": 32 + }, + "tools/migrate/migrations/20260112160815_detailed-lines.up.sql": { + "header": "-- create \"billing_invoice_write_schema_levels\" table\nCREATE TABLE \"billing_invoice_write_schema_levels\" (\n \"id\" character varying NOT NULL,\n \"schema_level\" bigint NOT NULL,\n PRIMARY KEY (\"id\")\n);\n\nINSERT INTO \"billing_invoice_write_schema_levels\" (\"id\", \"schema_level\") VALUES ('write_schema_level', 1);\n-- create index \"billinginvoicewriteschemalevel_id\" to table: \"billing_invoice_write_schema_levels\"\nCREATE UNIQUE INDEX \"billinginvoicewriteschemalevel_id\" ON \"billing_invoice_write_schema_levels\" (\"id\");\n-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"schema_level\" bigint NOT NULL DEFAULT 1;\n-- create \"billing_standard_invoice_detailed_lines\" table\nCREATE TABLE \"billing_standard_invoice_detailed_lines\" (\n \"id\" character(26) NOT NULL,\n \"annotations\" jsonb NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,", + "symbols": [], + "line_count": 87 + }, + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.down.sql": { + "header": "-- reverse: create index \"billinginvoice_namespace_customer_id_currency\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_customer_id_currency\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260113121259_gathering-invoice-unique.up.sql": { + "header": "-- create index \"billinginvoice_namespace_customer_id_currency\" to table: \"billing_invoices\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"billinginvoice_namespace_customer_id_currency\" ON \"billing_invoices\" (\"namespace\", \"customer_id\", \"currency\") WHERE ((deleted_at IS NULL) AND ((status)::text = 'gathering'::text));", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20260121143838_detailed-lines-migration.down.sql": { + "header": "\nDROP FUNCTION IF EXISTS om_func_migrate_customer_invoices_to_schema_level_2(TEXT);", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260121143838_detailed-lines-migration.up.sql": { + "header": "\n-- Migrates schema-level-1 invoices for a given customer to schema level 2.\n--\n-- Schema level 1:\n-- - detailed lines are stored as \"fee\" lines in billing_invoice_lines (status = 'detailed')\n-- - detailed line amount discounts are stored in billing_invoice_line_discounts (line_id = detailed line id)\n--\n-- Schema level 2:\n-- - detailed lines are stored in billing_standard_invoice_detailed_lines\n-- - detailed line amount discounts are stored in billing_standard_invoice_detailed_line_amount_discounts\n--\n-- Notes:\n-- - old rows are kept as-is (we only copy)\n-- - only invoices with schema_level = 1 are migrated + updated to schema_level = 2\n-- - idempotent: uses ON CONFLICT DO NOTHING for inserts\nCREATE OR REPLACE FUNCTION om_func_migrate_customer_invoices_to_schema_level_2(p_customer_id TEXT)\nRETURNS BIGINT\nAS $$\nDECLARE\n v_updated_invoices BIGINT;", + "symbols": [], + "line_count": 153 + }, + "tools/migrate/migrations/20260220092326_tax-code.down.sql": { + "header": "-- reverse: create index \"taxcode_namespace_key\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_namespace_key\";\n-- reverse: create index \"taxcode_namespace_key_deleted_at\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_namespace_key_deleted_at\";\n-- reverse: create index \"taxcode_namespace_id\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_namespace_id\";\n-- reverse: create index \"taxcode_namespace\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_namespace\";\n-- reverse: create index \"taxcode_id\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_id\";\n-- reverse: create \"tax_codes\" table\nDROP TABLE \"tax_codes\";", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260220092326_tax-code.up.sql": { + "header": "-- create \"tax_codes\" table\nCREATE TABLE \"tax_codes\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"name\" character varying NOT NULL,\n \"description\" character varying NULL,\n \"key\" character varying NOT NULL,\n \"app_mappings\" jsonb NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"taxcode_id\" to table: \"tax_codes\"\nCREATE UNIQUE INDEX \"taxcode_id\" ON \"tax_codes\" (\"id\");\n-- create index \"taxcode_namespace\" to table: \"tax_codes\"\nCREATE INDEX \"taxcode_namespace\" ON \"tax_codes\" (\"namespace\");\n-- create index \"taxcode_namespace_id\" to table: \"tax_codes\"\nCREATE UNIQUE INDEX \"taxcode_namespace_id\" ON \"tax_codes\" (\"namespace\", \"id\");", + "symbols": [], + "line_count": 26 + }, + "tools/migrate/migrations/20260224121149_charges.down.sql": { + "header": "-- reverse: modify \"standard_invoice_settlements\" table\nALTER TABLE \"standard_invoice_settlements\" DROP CONSTRAINT \"standard_invoice_settlements_charges_standard_invoice_settlment\", DROP CONSTRAINT \"standard_invoice_settlements_billing_invoice_lines_billing_invo\";\n-- reverse: modify \"charges\" table\nALTER TABLE \"charges\" DROP CONSTRAINT \"charges_subscriptions_charge_intents\", DROP CONSTRAINT \"charges_subscription_phases_charge_intents\", DROP CONSTRAINT \"charges_subscription_items_charge_intents\", DROP CONSTRAINT \"charges_customers_charge_intents\";\n-- reverse: modify \"charge_usage_baseds\" table\nALTER TABLE \"charge_usage_baseds\" DROP CONSTRAINT \"charge_usage_baseds_charges_usage_based\";\n-- reverse: modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" DROP CONSTRAINT \"charge_flat_fees_charges_flat_fee\";\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP CONSTRAINT \"charge_credit_purchases_charges_credit_purchase\";\n-- reverse: modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" DROP CONSTRAINT \"billing_invoice_split_line_groups_charges_billing_split_line_gr\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP CONSTRAINT \"billing_invoice_lines_standard_invoice_settlements_standard_inv\", DROP CONSTRAINT \"billing_invoice_lines_charges_billing_invoice_lines\";\n-- reverse: create index \"standardinvoicesettlement_namespace_charge_id_line_id\" to table: \"standard_invoice_settlements\"\nDROP INDEX \"standardinvoicesettlement_namespace_charge_id_line_id\";\n-- reverse: create index \"standardinvoicesettlement_namespace\" to table: \"standard_invoice_settlements\"\nDROP INDEX \"standardinvoicesettlement_namespace\";\n-- reverse: create index \"standardinvoicesettlement_id\" to table: \"standard_invoice_settlements\"\nDROP INDEX \"standardinvoicesettlement_id\";", + "symbols": [], + "line_count": 62 + }, + "tools/migrate/migrations/20260224121149_charges.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"billing_invoice_line_standard_invoice_settlments\" character(26) NULL, ADD COLUMN \"charge_id\" character(26) NULL;\n-- modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" ADD COLUMN \"charge_id\" character(26) NULL;\n-- create \"charge_credit_purchases\" table\nCREATE TABLE \"charge_credit_purchases\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"credit_amount\" numeric NOT NULL,\n \"settlement\" jsonb NOT NULL,\n \"status\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"chargecreditpurchase_id\" to table: \"charge_credit_purchases\"\nCREATE UNIQUE INDEX \"chargecreditpurchase_id\" ON \"charge_credit_purchases\" (\"id\");\n-- create index \"chargecreditpurchase_namespace\" to table: \"charge_credit_purchases\"\nCREATE INDEX \"chargecreditpurchase_namespace\" ON \"charge_credit_purchases\" (\"namespace\");\n-- create \"charge_flat_fees\" table\nCREATE TABLE \"charge_flat_fees\" (\n \"id\" character(26) NOT NULL,", + "symbols": [], + "line_count": 138 + }, + "tools/migrate/migrations/20260225160541_billing-credits.down.sql": { + "header": "-- reverse: modify \"standard_invoice_settlements\" table\nALTER TABLE \"standard_invoice_settlements\" DROP COLUMN \"credits_total\";\n-- reverse: modify \"billing_standard_invoice_detailed_lines\" table\nALTER TABLE \"billing_standard_invoice_detailed_lines\" DROP COLUMN \"credits_applied\", DROP COLUMN \"credits_total\";\n-- reverse: modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" DROP COLUMN \"credits_total\";\n-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"credits_applied\", DROP COLUMN \"credits_total\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20260225160541_billing-credits.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"credits_total\" numeric NOT NULL DEFAULT 0, ADD COLUMN \"credits_applied\" jsonb NULL;\n-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ADD COLUMN \"credits_total\" numeric NOT NULL DEFAULT 0;\n-- modify \"billing_standard_invoice_detailed_lines\" table\nALTER TABLE \"billing_standard_invoice_detailed_lines\" ADD COLUMN \"credits_total\" numeric NOT NULL DEFAULT 0, ADD COLUMN \"credits_applied\" jsonb NULL;\n-- modify \"standard_invoice_settlements\" table\nALTER TABLE \"standard_invoice_settlements\" ADD COLUMN \"credits_total\" numeric NOT NULL DEFAULT 0;\n\n-- drop default values (existing rows have 0 credits, but if we don't specify the default value in the previous step we get a migration error)\n-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ALTER COLUMN \"credits_total\" DROP DEFAULT;\n-- modify \"billing_invoices\" table\nALTER TABLE \"billing_invoices\" ALTER COLUMN \"credits_total\" DROP DEFAULT;\n-- modify \"billing_standard_invoice_detailed_lines\" table\nALTER TABLE \"billing_standard_invoice_detailed_lines\" ALTER COLUMN \"credits_total\" DROP DEFAULT;\n-- modify \"standard_invoice_settlements\" table\nALTER TABLE \"standard_invoice_settlements\" ALTER COLUMN \"credits_total\" DROP DEFAULT;\n\n", + "symbols": [], + "line_count": 179 + }, + "tools/migrate/migrations/20260303100951_currency-cost-basis.down.sql": { + "header": "-- reverse: create index \"currencycostbasis_namespace_custom_currency_id_fiat_code_effect\" to table: \"currency_cost_bases\"\nDROP INDEX \"currencycostbasis_namespace_custom_currency_id_fiat_code_effect\";\n-- reverse: create index \"currencycostbasis_namespace\" to table: \"currency_cost_bases\"\nDROP INDEX \"currencycostbasis_namespace\";\n-- reverse: create index \"currencycostbasis_id\" to table: \"currency_cost_bases\"\nDROP INDEX \"currencycostbasis_id\";\n-- reverse: create \"currency_cost_bases\" table\nDROP TABLE \"currency_cost_bases\";\n-- reverse: create index \"customcurrency_namespace_id\" to table: \"custom_currencies\"\nDROP INDEX \"customcurrency_namespace_id\";\n-- reverse: create index \"customcurrency_namespace_code\" to table: \"custom_currencies\"\nDROP INDEX \"customcurrency_namespace_code\";\n-- reverse: create index \"customcurrency_namespace\" to table: \"custom_currencies\"\nDROP INDEX \"customcurrency_namespace\";\n-- reverse: create index \"customcurrency_id\" to table: \"custom_currencies\"\nDROP INDEX \"customcurrency_id\";\n-- reverse: create \"custom_currencies\" table\nDROP TABLE \"custom_currencies\";", + "symbols": [], + "line_count": 18 + }, + "tools/migrate/migrations/20260303100951_currency-cost-basis.up.sql": { + "header": "-- create \"custom_currencies\" table\nCREATE TABLE \"custom_currencies\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"code\" character varying NOT NULL,\n \"name\" character varying NOT NULL,\n \"symbol\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"customcurrency_id\" to table: \"custom_currencies\"\nCREATE UNIQUE INDEX \"customcurrency_id\" ON \"custom_currencies\" (\"id\");\n-- create index \"customcurrency_namespace\" to table: \"custom_currencies\"\nCREATE INDEX \"customcurrency_namespace\" ON \"custom_currencies\" (\"namespace\");\n-- create index \"customcurrency_namespace_code\" to table: \"custom_currencies\"\nCREATE UNIQUE INDEX \"customcurrency_namespace_code\" ON \"custom_currencies\" (\"namespace\", \"code\") WHERE (deleted_at IS NULL);\n-- create index \"customcurrency_namespace_id\" to table: \"custom_currencies\"\nCREATE UNIQUE INDEX \"customcurrency_namespace_id\" ON \"custom_currencies\" (\"namespace\", \"id\");", + "symbols": [], + "line_count": 40 + }, + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.down.sql": { + "header": "-- reverse: drop \"standard_invoice_settlements\" table\nCREATE TABLE \"standard_invoice_settlements\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"amount\" numeric NOT NULL,\n \"taxes_total\" numeric NOT NULL,\n \"taxes_inclusive_total\" numeric NOT NULL,\n \"taxes_exclusive_total\" numeric NOT NULL,\n \"charges_total\" numeric NOT NULL,\n \"discounts_total\" numeric NOT NULL,\n \"total\" numeric NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"metered_service_period_quantity\" numeric NOT NULL,\n \"metered_pre_service_period_quantity\" numeric NOT NULL,", + "symbols": [], + "line_count": 68 + }, + "tools/migrate/migrations/20260303111853_billing-charges-flat-fee.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"billing_invoice_line_standard_invoice_settlments\";\n-- create \"charge_credit_realizations\" table\nCREATE TABLE \"charge_credit_realizations\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"amount\" numeric NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"ledger_transaction_group_id\" character(26) NOT NULL,\n \"line_id\" character(26) NULL,\n \"charge_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"charge_credit_realizations_billing_invoice_lines_charge_credit_\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL,\n CONSTRAINT \"charge_credit_realizations_charge_flat_fees_charge_credit_reali\" FOREIGN KEY (\"charge_id\") REFERENCES \"charge_flat_fees\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION\n);", + "symbols": [], + "line_count": 98 + }, + "tools/migrate/migrations/20260303233513_llmcost_add.down.sql": { + "header": "-- reverse: create index \"llmcostprice_provider_model_id_namespace_effective_from\" to table: \"llm_cost_prices\"\nDROP INDEX \"llmcostprice_provider_model_id_namespace_effective_from\";\n-- reverse: create index \"llmcostprice_provider_model_id\" to table: \"llm_cost_prices\"\nDROP INDEX \"llmcostprice_provider_model_id\";\n-- reverse: create index \"llmcostprice_namespace_provider_model_id\" to table: \"llm_cost_prices\"\nDROP INDEX \"llmcostprice_namespace_provider_model_id\";\n-- reverse: create index \"llmcostprice_id\" to table: \"llm_cost_prices\"\nDROP INDEX \"llmcostprice_id\";\n-- reverse: create \"llm_cost_prices\" table\nDROP TABLE \"llm_cost_prices\";", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20260303233513_llmcost_add.up.sql": { + "header": "-- create \"llm_cost_prices\" table\nCREATE TABLE \"llm_cost_prices\" (\n \"id\" character(26) NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"namespace\" character varying NULL,\n \"provider\" character varying NOT NULL,\n \"model_id\" character varying NOT NULL,\n \"model_name\" character varying NOT NULL DEFAULT '',\n \"input_per_token\" numeric NOT NULL,\n \"output_per_token\" numeric NOT NULL,\n \"cache_read_per_token\" numeric NOT NULL,\n \"reasoning_per_token\" numeric NOT NULL,\n \"cache_write_per_token\" numeric NOT NULL,\n \"currency\" character varying NOT NULL DEFAULT 'USD',\n \"source\" character varying NOT NULL,\n \"source_prices\" jsonb NULL,\n \"effective_from\" timestamptz NOT NULL,", + "symbols": [], + "line_count": 31 + }, + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.down.sql": { + "header": "-- reverse: create index \"charge_flat_fees_std_invoice_payment_settlement_id_key\" to table: \"charge_flat_fees\"\nDROP INDEX \"charge_flat_fees_std_invoice_payment_settlement_id_key\";\n-- reverse: modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" DROP CONSTRAINT \"charge_flat_fees_charge_standard_invoice_payment_settlements_ch\", DROP COLUMN \"std_invoice_payment_settlement_id\";\n-- reverse: create index \"chargestandardinvoicepaymentsettlement_namespace_line_id\" to table: \"charge_standard_invoice_payment_settlements\"\nDROP INDEX \"chargestandardinvoicepaymentsettlement_namespace_line_id\";\n-- reverse: modify \"charge_standard_invoice_payment_settlements\" table\nALTER TABLE \"charge_standard_invoice_payment_settlements\" ADD COLUMN \"charge_id\" character(26) NOT NULL, ADD CONSTRAINT \"charge_standard_invoice_payment_settlements_charge_flat_fees_ch\" FOREIGN KEY (\"charge_id\") REFERENCES \"charge_flat_fees\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- recreate indexes on charge_id that were implicitly dropped when the column was dropped\nCREATE UNIQUE INDEX \"charge_standard_invoice_payment_settlements_charge_id_key\" ON \"charge_standard_invoice_payment_settlements\" (\"charge_id\");\nCREATE UNIQUE INDEX \"chargestandardinvoicepaymentsettlement_namespace_charge_id_line\" ON \"charge_standard_invoice_payment_settlements\" (\"namespace\", \"charge_id\", \"line_id\") WHERE ((line_id IS NOT NULL) AND (deleted_at IS NULL));\n-- reverse: create index \"charge_credit_purchases_external_payment_settlement_id_key\" to table: \"charge_credit_purchases\"\nDROP INDEX \"charge_credit_purchases_external_payment_settlement_id_key\";\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP CONSTRAINT \"charge_credit_purchases_charge_external_payment_settlements_cha\", DROP COLUMN \"external_payment_settlement_id\", DROP COLUMN \"credit_granted_at\", DROP COLUMN \"credit_grant_transaction_group_id\", ADD COLUMN \"status\" character varying NOT NULL;\n-- reverse: create index \"chargeexternalpaymentsettlement_namespace_id\" to table: \"charge_external_payment_settlements\"\nDROP INDEX \"chargeexternalpaymentsettlement_namespace_id\";\n-- reverse: create index \"chargeexternalpaymentsettlement_namespace\" to table: \"charge_external_payment_settlements\"\nDROP INDEX \"chargeexternalpaymentsettlement_namespace\";\n-- reverse: create index \"chargeexternalpaymentsettlement_id\" to table: \"charge_external_payment_settlements\"", + "symbols": [], + "line_count": 25 + }, + "tools/migrate/migrations/20260305140658_billing-charges-credit-purchase.up.sql": { + "header": "-- create \"charge_external_payment_settlements\" table\nCREATE TABLE \"charge_external_payment_settlements\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"authorized_transaction_group_id\" character(26) NULL,\n \"authorized_at\" timestamptz NULL,\n \"settled_transaction_group_id\" character(26) NULL,\n \"settled_at\" timestamptz NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"chargeexternalpaymentsettlement_annotations\" to table: \"charge_external_payment_settlements\"\nCREATE INDEX \"chargeexternalpaymentsettlement_annotations\" ON \"charge_external_payment_settlements\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 39 + }, + "tools/migrate/migrations/20260305173559_feature_cost_add.down.sql": { + "header": "-- reverse: modify \"features\" table\nALTER TABLE \"features\" DROP CONSTRAINT \"unit_cost_llm_token_type_mutual_exclusive\", DROP CONSTRAINT \"unit_cost_llm_provider_mutual_exclusive\", DROP CONSTRAINT \"unit_cost_llm_model_mutual_exclusive\", DROP COLUMN \"unit_cost_llm_token_type\", DROP COLUMN \"unit_cost_llm_token_type_property\", DROP COLUMN \"unit_cost_llm_model\", DROP COLUMN \"unit_cost_llm_model_property\", DROP COLUMN \"unit_cost_llm_provider\", DROP COLUMN \"unit_cost_llm_provider_property\", DROP COLUMN \"unit_cost_manual_amount\", DROP COLUMN \"unit_cost_type\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260305173559_feature_cost_add.up.sql": { + "header": "-- modify \"features\" table\nALTER TABLE \"features\" ADD COLUMN \"unit_cost_type\" character varying NULL, ADD COLUMN \"unit_cost_manual_amount\" numeric NULL, ADD COLUMN \"unit_cost_llm_provider_property\" character varying NULL, ADD COLUMN \"unit_cost_llm_provider\" character varying NULL, ADD COLUMN \"unit_cost_llm_model_property\" character varying NULL, ADD COLUMN \"unit_cost_llm_model\" character varying NULL, ADD COLUMN \"unit_cost_llm_token_type_property\" character varying NULL, ADD COLUMN \"unit_cost_llm_token_type\" character varying NULL, ADD CONSTRAINT \"unit_cost_llm_model_mutual_exclusive\" CHECK (NOT ((unit_cost_llm_model_property IS NOT NULL) AND (unit_cost_llm_model IS NOT NULL))), ADD CONSTRAINT \"unit_cost_llm_provider_mutual_exclusive\" CHECK (NOT ((unit_cost_llm_provider_property IS NOT NULL) AND (unit_cost_llm_provider IS NOT NULL))), ADD CONSTRAINT \"unit_cost_llm_token_type_mutual_exclusive\" CHECK (NOT ((unit_cost_llm_token_type_property IS NOT NULL) AND (unit_cost_llm_token_type IS NOT NULL)));", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260314200257_charge-normalize-db.down.sql": { + "header": "-- reverse: drop \"charge_standard_invoice_payment_settlements\" table\nCREATE TABLE \"charge_standard_invoice_payment_settlements\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"authorized_transaction_group_id\" character(26) NULL,\n \"authorized_at\" timestamptz NULL,\n \"settled_transaction_group_id\" character(26) NULL,\n \"settled_at\" timestamptz NULL,\n \"line_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"charge_standard_invoice_payment_settlements_billing_invoice_lin\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION\n);", + "symbols": [], + "line_count": 172 + }, + "tools/migrate/migrations/20260314200257_charge-normalize-db.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\n-- atlas:nolint DS103\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"external_payment_settlement_id\";\n-- create \"charge_credit_purchase_external_payments\" table\nCREATE TABLE \"charge_credit_purchase_external_payments\" (\n \"id\" character(26) NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"authorized_transaction_group_id\" character(26) NULL,\n \"authorized_at\" timestamptz NULL,\n \"settled_transaction_group_id\" character(26) NULL,\n \"settled_at\" timestamptz NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"charge_id\" character(26) NOT NULL,", + "symbols": [], + "line_count": 145 + }, + "tools/migrate/migrations/20260316165258_ledger.down.sql": { + "header": "-- reverse: create index \"ledgerentry_namespace_transaction_id\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_namespace_transaction_id\";\n-- reverse: create index \"ledgerentry_namespace_sub_account_id\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_namespace_sub_account_id\";\n-- reverse: create index \"ledgerentry_namespace_id\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_namespace_id\";\n-- reverse: create index \"ledgerentry_namespace\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_namespace\";\n-- reverse: create index \"ledgerentry_id\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_id\";\n-- reverse: create index \"ledgerentry_created_at_id\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_created_at_id\";\n-- reverse: create index \"ledgerentry_annotations\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_annotations\";\n-- reverse: create \"ledger_entries\" table\nDROP TABLE \"ledger_entries\";\n-- reverse: create index \"ledgertransaction_namespace_id\" to table: \"ledger_transactions\"\nDROP INDEX \"ledgertransaction_namespace_id\";\n-- reverse: create index \"ledgertransaction_namespace_group_id\" to table: \"ledger_transactions\"\nDROP INDEX \"ledgertransaction_namespace_group_id\";", + "symbols": [], + "line_count": 72 + }, + "tools/migrate/migrations/20260316165258_ledger.up.sql": { + "header": "-- create \"ledger_accounts\" table\nCREATE TABLE \"ledger_accounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"annotations\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"account_type\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"ledgeraccount_annotations\" to table: \"ledger_accounts\"\nCREATE INDEX \"ledgeraccount_annotations\" ON \"ledger_accounts\" USING gin (\"annotations\");\n-- create index \"ledgeraccount_id\" to table: \"ledger_accounts\"\nCREATE UNIQUE INDEX \"ledgeraccount_id\" ON \"ledger_accounts\" (\"id\");\n-- create index \"ledgeraccount_namespace\" to table: \"ledger_accounts\"\nCREATE INDEX \"ledgeraccount_namespace\" ON \"ledger_accounts\" (\"namespace\");\n-- create index \"ledgeraccount_namespace_id\" to table: \"ledger_accounts\"\nCREATE UNIQUE INDEX \"ledgeraccount_namespace_id\" ON \"ledger_accounts\" (\"namespace\", \"id\");\n-- create \"ledger_dimensions\" table", + "symbols": [], + "line_count": 144 + }, + "tools/migrate/migrations/20260316165515_ledger-customer-account.down.sql": { + "header": "-- reverse: create index \"ledgercustomeraccount_namespace_id\" to table: \"ledger_customer_accounts\"\nDROP INDEX \"ledgercustomeraccount_namespace_id\";\n-- reverse: create index \"ledgercustomeraccount_namespace_customer_id_account_type\" to table: \"ledger_customer_accounts\"\nDROP INDEX \"ledgercustomeraccount_namespace_customer_id_account_type\";\n-- reverse: create index \"ledgercustomeraccount_namespace\" to table: \"ledger_customer_accounts\"\nDROP INDEX \"ledgercustomeraccount_namespace\";\n-- reverse: create index \"ledgercustomeraccount_id\" to table: \"ledger_customer_accounts\"\nDROP INDEX \"ledgercustomeraccount_id\";\n-- reverse: create \"ledger_customer_accounts\" table\nDROP TABLE \"ledger_customer_accounts\";", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20260316165515_ledger-customer-account.up.sql": { + "header": "-- create \"ledger_customer_accounts\" table\nCREATE TABLE \"ledger_customer_accounts\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"customer_id\" character varying NOT NULL,\n \"account_type\" character varying NOT NULL,\n \"account_id\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"ledgercustomeraccount_id\" to table: \"ledger_customer_accounts\"\nCREATE UNIQUE INDEX \"ledgercustomeraccount_id\" ON \"ledger_customer_accounts\" (\"id\");\n-- create index \"ledgercustomeraccount_namespace\" to table: \"ledger_customer_accounts\"\nCREATE INDEX \"ledgercustomeraccount_namespace\" ON \"ledger_customer_accounts\" (\"namespace\");\n-- create index \"ledgercustomeraccount_namespace_customer_id_account_type\" to table: \"ledger_customer_accounts\"\nCREATE UNIQUE INDEX \"ledgercustomeraccount_namespace_customer_id_account_type\" ON \"ledger_customer_accounts\" (\"namespace\", \"customer_id\", \"account_type\");\n-- create index \"ledgercustomeraccount_namespace_id\" to table: \"ledger_customer_accounts\"\nCREATE UNIQUE INDEX \"ledgercustomeraccount_namespace_id\" ON \"ledger_customer_accounts\" (\"namespace\", \"id\");", + "symbols": [], + "line_count": 20 + }, + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.down.sql": { + "header": "-- reverse: create index \"ledgersubaccount_namespace_account_id_route_id\" to table: \"ledger_sub_accounts\"\nDROP INDEX \"ledgersubaccount_namespace_account_id_route_id\";\n-- reverse: modify \"ledger_sub_accounts\" table\nALTER TABLE \"ledger_sub_accounts\" DROP CONSTRAINT \"ledger_sub_accounts_ledger_sub_account_routes_sub_accounts\", DROP COLUMN \"route_id\", ADD COLUMN \"credit_priority_dimension_id\" character(26) NULL, ADD COLUMN \"features_dimension_id\" character(26) NULL, ADD COLUMN \"tax_code_dimension_id\" character(26) NULL, ADD COLUMN \"currency_dimension_id\" character(26) NOT NULL, ADD COLUMN \"ledger_dimension_sub_accounts\" character(26) NULL;\n-- reverse: create index \"ledgersubaccount_namespace_account_id_currency_dimension_id\" to table: \"ledger_sub_accounts\"\nCREATE UNIQUE INDEX \"ledgersubaccount_namespace_account_id_currency_dimension_id\" ON \"ledger_sub_accounts\" (\"namespace\", \"account_id\", \"currency_dimension_id\");\n-- reverse: create index \"ledgersubaccountroute_namespace_account_id_routing_key_version_\" to table: \"ledger_sub_account_routes\"\nDROP INDEX \"ledgersubaccountroute_namespace_account_id_routing_key_version_\";\n-- reverse: create index \"ledgersubaccountroute_namespace\" to table: \"ledger_sub_account_routes\"\nDROP INDEX \"ledgersubaccountroute_namespace\";\n-- reverse: create index \"ledgersubaccountroute_id\" to table: \"ledger_sub_account_routes\"\nDROP INDEX \"ledgersubaccountroute_id\";\n-- reverse: create \"ledger_sub_account_routes\" table\nDROP TABLE \"ledger_sub_account_routes\";", + "symbols": [], + "line_count": 14 + }, + "tools/migrate/migrations/20260316165652_ledger-subaccount-routing.up.sql": { + "header": "-- create \"ledger_sub_account_routes\" table\nCREATE TABLE \"ledger_sub_account_routes\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"routing_key_version\" character varying NOT NULL,\n \"routing_key\" character varying NOT NULL,\n \"account_id\" character(26) NOT NULL,\n \"ledger_dimension_sub_account_routes\" character(26) NULL,\n \"currency_dimension_id\" character(26) NOT NULL,\n \"tax_code_dimension_id\" character(26) NULL,\n \"features_dimension_id\" character(26) NULL,\n \"credit_priority_dimension_id\" character(26) NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"ledger_sub_account_routes_ledger_accounts_sub_account_routes\" FOREIGN KEY (\"account_id\") REFERENCES \"ledger_accounts\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION,\n CONSTRAINT \"ledger_sub_account_routes_ledger_dimensions_credit_priority_sub\" FOREIGN KEY (\"credit_priority_dimension_id\") REFERENCES \"ledger_dimensions\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL,\n CONSTRAINT \"ledger_sub_account_routes_ledger_dimensions_currency_sub_accoun\" FOREIGN KEY (\"currency_dimension_id\") REFERENCES \"ledger_dimensions\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION,\n CONSTRAINT \"ledger_sub_account_routes_ledger_dimensions_features_sub_accoun\" FOREIGN KEY (\"features_dimension_id\") REFERENCES \"ledger_dimensions\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL,", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20260316165852_ledger-route-literals.down.sql": { + "header": "-- reverse: drop \"ledger_dimensions\" table\nCREATE TABLE \"ledger_dimensions\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"annotations\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"dimension_key\" character varying NOT NULL,\n \"dimension_value\" character varying NOT NULL,\n \"dimension_display_value\" character varying NOT NULL,\n PRIMARY KEY (\"id\")\n);\nCREATE INDEX \"ledgerdimension_annotations\" ON \"ledger_dimensions\" USING gin (\"annotations\");\nCREATE UNIQUE INDEX \"ledgerdimension_id\" ON \"ledger_dimensions\" (\"id\");\nCREATE INDEX \"ledgerdimension_namespace\" ON \"ledger_dimensions\" (\"namespace\");\nCREATE UNIQUE INDEX \"ledgerdimension_namespace_dimension_key_dimension_value\" ON \"ledger_dimensions\" (\"namespace\", \"dimension_key\", \"dimension_value\");\nCREATE UNIQUE INDEX \"ledgerdimension_namespace_id\" ON \"ledger_dimensions\" (\"namespace\", \"id\");\n-- reverse: modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"credit_priority\", DROP COLUMN \"features\", DROP COLUMN \"tax_code\", DROP COLUMN \"currency\", ADD COLUMN \"credit_priority_dimension_id\" character(26) NULL, ADD COLUMN \"features_dimension_id\" character(26) NULL, ADD COLUMN \"tax_code_dimension_id\" character(26) NULL, ADD COLUMN \"currency_dimension_id\" character(26) NOT NULL, ADD COLUMN \"ledger_dimension_sub_account_routes\" character(26) NULL;", + "symbols": [], + "line_count": 20 + }, + "tools/migrate/migrations/20260316165852_ledger-route-literals.up.sql": { + "header": "-- modify \"ledger_sub_account_routes\" table\n-- atlas:nolint DS103 MF103\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"ledger_dimension_sub_account_routes\", DROP COLUMN \"currency_dimension_id\", DROP COLUMN \"tax_code_dimension_id\", DROP COLUMN \"features_dimension_id\", DROP COLUMN \"credit_priority_dimension_id\", ADD COLUMN \"currency\" character varying NOT NULL, ADD COLUMN \"tax_code\" character varying NULL, ADD COLUMN \"features\" jsonb NULL, ADD COLUMN \"credit_priority\" bigint NULL;\n-- drop \"ledger_dimensions\" table\n-- atlas:nolint DS102\nDROP TABLE \"ledger_dimensions\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20260317164048_charge_usage_based.down.sql": { + "header": "-- reverse: create index \"chargeusagebasedrunpayment_namespace\" to table: \"charge_usage_based_run_payments\"\nDROP INDEX \"chargeusagebasedrunpayment_namespace\";\n-- reverse: create index \"chargeusagebasedrunpayment_id\" to table: \"charge_usage_based_run_payments\"\nDROP INDEX \"chargeusagebasedrunpayment_id\";\n-- reverse: create index \"chargeusagebasedrunpayment_annotations\" to table: \"charge_usage_based_run_payments\"\nDROP INDEX \"chargeusagebasedrunpayment_annotations\";\n-- reverse: create index \"charge_usage_based_run_payments_run_id_key\" to table: \"charge_usage_based_run_payments\"\nDROP INDEX \"charge_usage_based_run_payments_run_id_key\";\n-- reverse: create \"charge_usage_based_run_payments\" table\nDROP TABLE \"charge_usage_based_run_payments\";\n-- reverse: create index \"chargeusagebasedruninvoicedusage_namespace\" to table: \"charge_usage_based_run_invoiced_usages\"\nDROP INDEX \"chargeusagebasedruninvoicedusage_namespace\";\n-- reverse: create index \"chargeusagebasedruninvoicedusage_id\" to table: \"charge_usage_based_run_invoiced_usages\"\nDROP INDEX \"chargeusagebasedruninvoicedusage_id\";\n-- reverse: create index \"chargeusagebasedruninvoicedusage_annotations\" to table: \"charge_usage_based_run_invoiced_usages\"\nDROP INDEX \"chargeusagebasedruninvoicedusage_annotations\";\n-- reverse: create index \"charge_usage_based_run_invoiced_usages_run_id_key\" to table: \"charge_usage_based_run_invoiced_usages\"\nDROP INDEX \"charge_usage_based_run_invoiced_usages_run_id_key\";\n-- reverse: create \"charge_usage_based_run_invoiced_usages\" table\nDROP TABLE \"charge_usage_based_run_invoiced_usages\";", + "symbols": [], + "line_count": 44 + }, + "tools/migrate/migrations/20260317164048_charge_usage_based.up.sql": { + "header": "-- create \"charge_usage_based\" table\nCREATE TABLE \"charge_usage_based\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"invoice_at\" timestamptz NOT NULL,\n \"settlement_mode\" character varying NOT NULL,\n \"discounts\" jsonb NULL,\n \"feature_key\" character varying NOT NULL,\n \"price\" jsonb NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"charge_usage_based_charges_usage_based\" FOREIGN KEY (\"id\") REFERENCES \"charges\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"chargeusagebased_id\" to table: \"charge_usage_based\"\nCREATE UNIQUE INDEX \"chargeusagebased_id\" ON \"charge_usage_based\" (\"id\");\n-- create index \"chargeusagebased_namespace\" to table: \"charge_usage_based\"\nCREATE INDEX \"chargeusagebased_namespace\" ON \"charge_usage_based\" (\"namespace\");\n-- create index \"chargeusagebased_namespace_id\" to table: \"charge_usage_based\"\nCREATE UNIQUE INDEX \"chargeusagebased_namespace_id\" ON \"charge_usage_based\" (\"namespace\", \"id\");\n-- create \"charge_usage_based_runs\" table\nCREATE TABLE \"charge_usage_based_runs\" (", + "symbols": [], + "line_count": 123 + }, + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.down.sql": { + "header": "-- reverse: create index \"chargecreditpurchaseinvoicedpayment_namespace_charge_id\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"chargecreditpurchaseinvoicedpayment_namespace_charge_id\";\n-- reverse: create index \"chargecreditpurchaseinvoicedpayment_namespace\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"chargecreditpurchaseinvoicedpayment_namespace\";\n-- reverse: create index \"chargecreditpurchaseinvoicedpayment_id\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"chargecreditpurchaseinvoicedpayment_id\";\n-- reverse: create index \"chargecreditpurchaseinvoicedpayment_annotations\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"chargecreditpurchaseinvoicedpayment_annotations\";\n-- reverse: create index \"charge_credit_purchase_invoiced_payments_line_id_key\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"charge_credit_purchase_invoiced_payments_line_id_key\";\n-- reverse: create index \"charge_credit_purchase_invoiced_payments_charge_id_key\" to table: \"charge_credit_purchase_invoiced_payments\"\nDROP INDEX \"charge_credit_purchase_invoiced_payments_charge_id_key\";\n-- reverse: create \"charge_credit_purchase_invoiced_payments\" table\nDROP TABLE \"charge_credit_purchase_invoiced_payments\";\n-- reverse: modify \"charge_usage_based_run_payments\" table\nALTER TABLE \"charge_usage_based_run_payments\" DROP COLUMN \"invoice_id\";\n-- reverse: modify \"charge_flat_fee_payments\" table\nALTER TABLE \"charge_flat_fee_payments\" DROP COLUMN \"invoice_id\";", + "symbols": [], + "line_count": 18 + }, + "tools/migrate/migrations/20260319114832_charge-creditpurchase-invoiced-payment.up.sql": { + "header": "-- modify \"charge_flat_fee_payments\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_flat_fee_payments\" ADD COLUMN \"invoice_id\" character(26) NOT NULL;\n-- modify \"charge_usage_based_run_payments\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_run_payments\" ADD COLUMN \"invoice_id\" character(26) NOT NULL;\n-- create \"charge_credit_purchase_invoiced_payments\" table\nCREATE TABLE \"charge_credit_purchase_invoiced_payments\" (\n \"id\" character(26) NOT NULL,\n \"invoice_id\" character(26) NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"authorized_transaction_group_id\" character(26) NULL,\n \"authorized_at\" timestamptz NULL,\n \"settled_transaction_group_id\" character(26) NULL,\n \"settled_at\" timestamptz NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,", + "symbols": [], + "line_count": 41 + }, + "tools/migrate/migrations/20260319155747_tax-code-fk.down.sql": { + "header": "-- reverse: create index \"subscriptionitem_tax_code_id\" to table: \"subscription_items\"\nDROP INDEX \"subscriptionitem_tax_code_id\";\n-- reverse: modify \"subscription_items\" table\nALTER TABLE \"subscription_items\" DROP CONSTRAINT \"subscription_items_tax_codes_subscription_items\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: create index \"planratecard_tax_code_id\" to table: \"plan_rate_cards\"\nDROP INDEX \"planratecard_tax_code_id\";\n-- reverse: modify \"plan_rate_cards\" table\nALTER TABLE \"plan_rate_cards\" DROP CONSTRAINT \"plan_rate_cards_tax_codes_plan_rate_cards\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: create index \"billingworkflowconfig_tax_code_id\" to table: \"billing_workflow_configs\"\nDROP INDEX \"billingworkflowconfig_tax_code_id\";\n-- reverse: modify \"billing_workflow_configs\" table\nALTER TABLE \"billing_workflow_configs\" DROP CONSTRAINT \"billing_workflow_configs_tax_codes_billing_workflow_configs\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: create index \"billingstandardinvoicedetailedline_tax_code_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstandardinvoicedetailedline_tax_code_id\";\n-- reverse: modify \"billing_standard_invoice_detailed_lines\" table\nALTER TABLE \"billing_standard_invoice_detailed_lines\" DROP CONSTRAINT \"billing_standard_invoice_detailed_lines_tax_codes_billing_stand\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: create index \"billinginvoicesplitlinegroup_tax_code_id\" to table: \"billing_invoice_split_line_groups\"\nDROP INDEX \"billinginvoicesplitlinegroup_tax_code_id\";\n-- reverse: modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" DROP CONSTRAINT \"billing_invoice_split_line_groups_tax_codes_billing_invoice_spl\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";", + "symbols": [], + "line_count": 32 + }, + "tools/migrate/migrations/20260319155747_tax-code-fk.up.sql": { + "header": "-- modify \"addon_rate_cards\" table\nALTER TABLE \"addon_rate_cards\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"addon_rate_cards_tax_codes_addon_rate_cards\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL NOT VALID;\n-- create index \"addonratecard_tax_code_id\" to table: \"addon_rate_cards\"\nCREATE INDEX \"addonratecard_tax_code_id\" ON \"addon_rate_cards\" (\"tax_code_id\");\nALTER TABLE \"addon_rate_cards\" VALIDATE CONSTRAINT \"addon_rate_cards_tax_codes_addon_rate_cards\";\n-- modify \"billing_customer_overrides\" table\nALTER TABLE \"billing_customer_overrides\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"billing_customer_overrides_tax_codes_billing_customer_overrides\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL NOT VALID;\n-- create index \"billingcustomeroverride_tax_code_id\" to table: \"billing_customer_overrides\"\nCREATE INDEX \"billingcustomeroverride_tax_code_id\" ON \"billing_customer_overrides\" (\"tax_code_id\");\nALTER TABLE \"billing_customer_overrides\" VALIDATE CONSTRAINT \"billing_customer_overrides_tax_codes_billing_customer_overrides\";\n-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"billing_invoice_lines_tax_codes_billing_invoice_lines\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL NOT VALID;\n-- create index \"billinginvoiceline_tax_code_id\" to table: \"billing_invoice_lines\"\nCREATE INDEX \"billinginvoiceline_tax_code_id\" ON \"billing_invoice_lines\" (\"tax_code_id\");\nALTER TABLE \"billing_invoice_lines\" VALIDATE CONSTRAINT \"billing_invoice_lines_tax_codes_billing_invoice_lines\";\n-- modify \"billing_invoice_split_line_groups\" table\nALTER TABLE \"billing_invoice_split_line_groups\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"billing_invoice_split_line_groups_tax_codes_billing_invoice_spl\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL NOT VALID;\n-- create index \"billinginvoicesplitlinegroup_tax_code_id\" to table: \"billing_invoice_split_line_groups\"\nCREATE INDEX \"billinginvoicesplitlinegroup_tax_code_id\" ON \"billing_invoice_split_line_groups\" (\"tax_code_id\");\nALTER TABLE \"billing_invoice_split_line_groups\" VALIDATE CONSTRAINT \"billing_invoice_split_line_groups_tax_codes_billing_invoice_spl\";", + "symbols": [], + "line_count": 40 + }, + "tools/migrate/migrations/20260320084936_charges-state-details.down.sql": { + "header": "-- reverse: modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" DROP CONSTRAINT \"charge_usage_based_charge_usage_based_runs_current_run\", DROP COLUMN \"current_realization_run_id\", DROP COLUMN \"status\";\n-- reverse: modify \"charges\" table\nALTER TABLE \"charges\" DROP COLUMN \"advance_after\";\n-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"total\", DROP COLUMN \"credits_total\", DROP COLUMN \"discounts_total\", DROP COLUMN \"charges_total\", DROP COLUMN \"taxes_exclusive_total\", DROP COLUMN \"taxes_inclusive_total\", DROP COLUMN \"taxes_total\", DROP COLUMN \"amount\";\n-- reverse: modify \"charge_usage_based_run_credit_allocations\" table\nALTER TABLE \"charge_usage_based_run_credit_allocations\" DROP COLUMN \"sort_hint\";\n-- reverse: modify \"charge_flat_fee_credit_allocations\" table\nALTER TABLE \"charge_flat_fee_credit_allocations\" DROP COLUMN \"sort_hint\";", + "symbols": [], + "line_count": 10 + }, + "tools/migrate/migrations/20260320084936_charges-state-details.up.sql": { + "header": "-- modify \"charge_flat_fee_credit_allocations\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_flat_fee_credit_allocations\" ADD COLUMN \"sort_hint\" bigint NOT NULL;\n-- modify \"charge_usage_based_run_credit_allocations\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_run_credit_allocations\" ADD COLUMN \"sort_hint\" bigint NOT NULL;\n-- modify \"charge_usage_based_runs\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"amount\" numeric NOT NULL, ADD COLUMN \"taxes_total\" numeric NOT NULL, ADD COLUMN \"taxes_inclusive_total\" numeric NOT NULL, ADD COLUMN \"taxes_exclusive_total\" numeric NOT NULL, ADD COLUMN \"charges_total\" numeric NOT NULL, ADD COLUMN \"discounts_total\" numeric NOT NULL, ADD COLUMN \"credits_total\" numeric NOT NULL, ADD COLUMN \"total\" numeric NOT NULL;\n-- modify \"charges\" table\nALTER TABLE \"charges\" ADD COLUMN \"advance_after\" timestamptz NULL;\n-- modify \"charge_usage_based\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based\" ADD COLUMN \"status\" character varying NOT NULL, ADD COLUMN \"current_realization_run_id\" character(26) NULL, ADD CONSTRAINT \"charge_usage_based_charge_usage_based_runs_current_run\" FOREIGN KEY (\"current_realization_run_id\") REFERENCES \"charge_usage_based_runs\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;", + "symbols": [], + "line_count": 14 + }, + "tools/migrate/migrations/20260320171954_feature-meter-id.down.sql": { + "header": "-- reverse: create index \"feature_namespace_meter_id\" to table: \"features\"\nDROP INDEX \"feature_namespace_meter_id\";\n-- repopulate meter_slug from meter_id before dropping the new foreign key column\nUPDATE features f\nSET meter_slug = m.key\nFROM meters m\nWHERE f.meter_id = m.id\n AND f.meter_id IS NOT NULL\n AND (f.meter_slug IS NULL OR f.meter_slug <> m.key);\n-- reverse: modify \"features\" table\nALTER TABLE \"features\" DROP CONSTRAINT \"features_meters_feature\", DROP COLUMN \"meter_id\";", + "symbols": [], + "line_count": 11 + }, + "tools/migrate/migrations/20260320171954_feature-meter-id.up.sql": { + "header": "-- modify \"features\" table\nALTER TABLE \"features\" ADD COLUMN \"meter_id\" character(26) NULL, ADD CONSTRAINT \"features_meters_feature\" FOREIGN KEY (\"meter_id\") REFERENCES \"meters\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"feature_namespace_meter_id\" to table: \"features\"\nCREATE INDEX \"feature_namespace_meter_id\" ON \"features\" (\"namespace\", \"meter_id\") WHERE (archived_at IS NULL);\n-- populate meter_id from meter_slug using a deterministic match\n-- prefer the active meter for a key, otherwise fall back to the most recently deleted one\nWITH resolved_meters AS (\n SELECT DISTINCT ON (namespace, key)\n id,\n namespace,\n key\n FROM meters\n ORDER BY namespace, key, (deleted_at IS NULL) DESC, deleted_at DESC NULLS LAST, updated_at DESC, created_at DESC, id DESC\n)\nUPDATE features f\nSET meter_id = m.id\nFROM resolved_meters m\nWHERE f.meter_slug = m.key\n AND f.namespace = m.namespace\n AND f.meter_slug IS NOT NULL", + "symbols": [], + "line_count": 21 + }, + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.down.sql": { + "header": "-- reverse: modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"cost_basis\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260323132723_ledger-route-cost-basis.up.sql": { + "header": "-- modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" ADD COLUMN \"cost_basis\" numeric NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260323141807_add-feature-description.down.sql": { + "header": "-- reverse: modify \"features\" table\nALTER TABLE \"features\" DROP COLUMN \"description\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260323141807_add-feature-description.up.sql": { + "header": "-- modify \"features\" table\nALTER TABLE \"features\" ADD COLUMN \"description\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260324140705_charges-run-collection-period.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"collection_end\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260324140705_charges-run-collection-period.up.sql": { + "header": "-- modify \"charge_usage_based_runs\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"collection_end\" timestamptz NOT NULL;", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20260325084446_charges-refactor-tables.down.sql": { + "header": "\nDROP VIEW IF EXISTS \"charges_search_v1s\";\n\n\n-- reverse: create index \"charges_charge_usage_based_id_key\" to table: \"charges\"\nDROP INDEX \"charges_charge_usage_based_id_key\";\n-- reverse: create index \"charges_charge_flat_fee_id_key\" to table: \"charges\"\nDROP INDEX \"charges_charge_flat_fee_id_key\";\n-- reverse: create index \"charges_charge_credit_purchase_id_key\" to table: \"charges\"\nDROP INDEX \"charges_charge_credit_purchase_id_key\";\n-- reverse: create index \"charge_namespace_unique_reference_id\" to table: \"charges\"\nDROP INDEX \"charge_namespace_unique_reference_id\";\n-- reverse: modify \"charges\" table\nALTER TABLE \"charges\" DROP CONSTRAINT \"charges_charge_usage_based_charge\", DROP CONSTRAINT \"charges_charge_flat_fees_charge\", DROP CONSTRAINT \"charges_charge_credit_purchases_charge\", DROP COLUMN \"charge_usage_based_id\", DROP COLUMN \"charge_flat_fee_id\", DROP COLUMN \"charge_credit_purchase_id\", ADD COLUMN \"advance_after\" timestamptz NULL, ADD COLUMN \"subscription_phase_id\" character(26) NULL, ADD COLUMN \"subscription_item_id\" character(26) NULL, ADD COLUMN \"subscription_id\" character(26) NULL, ADD COLUMN \"customer_id\" character(26) NOT NULL, ADD COLUMN \"managed_by\" character varying NOT NULL, ADD COLUMN \"currency\" character varying(3) NOT NULL, ADD COLUMN \"status\" character varying NOT NULL, ADD COLUMN \"full_service_period_to\" timestamptz NOT NULL, ADD COLUMN \"full_service_period_from\" timestamptz NOT NULL, ADD COLUMN \"billing_period_to\" timestamptz NOT NULL, ADD COLUMN \"billing_period_from\" timestamptz NOT NULL, ADD COLUMN \"service_period_to\" timestamptz NOT NULL, ADD COLUMN \"service_period_from\" timestamptz NOT NULL, ADD COLUMN \"description\" character varying NULL, ADD COLUMN \"name\" character varying NOT NULL, ADD COLUMN \"updated_at\" timestamptz NOT NULL, ADD COLUMN \"metadata\" jsonb NULL, ADD COLUMN \"annotations\" jsonb NULL;\n-- reverse: drop index \"charge_namespace_id\" from table: \"charges\"\nCREATE UNIQUE INDEX \"charge_namespace_id\" ON \"charges\" (\"namespace\", \"id\");\n-- reverse: create index \"chargeusagebased_namespace_customer_id_unique_reference_id\" to table: \"charge_usage_based\"\nDROP INDEX \"chargeusagebased_namespace_customer_id_unique_reference_id\";\n-- reverse: create index \"chargeusagebased_annotations\" to table: \"charge_usage_based\"\nDROP INDEX \"chargeusagebased_annotations\";", + "symbols": [], + "line_count": 45 + }, + "tools/migrate/migrations/20260325084446_charges-refactor-tables.up.sql": { + "header": "-- drop index \"chargecreditpurchaseexternalpayment_namespace_charge_id\" from table: \"charge_credit_purchase_external_payments\"\nDROP INDEX \"chargecreditpurchaseexternalpayment_namespace_charge_id\";\n-- drop index \"chargeflatfeepayment_namespace_charge_id\" from table: \"charge_flat_fee_payments\"\nDROP INDEX \"chargeflatfeepayment_namespace_charge_id\";\n-- modify \"charge_credit_purchases\" table\n-- atlas:nolint MF103 CD101\nALTER TABLE \"charge_credit_purchases\" DROP CONSTRAINT \"charge_credit_purchases_charges_credit_purchase\", ADD COLUMN \"service_period_from\" timestamptz NOT NULL, ADD COLUMN \"service_period_to\" timestamptz NOT NULL, ADD COLUMN \"billing_period_from\" timestamptz NOT NULL, ADD COLUMN \"billing_period_to\" timestamptz NOT NULL, ADD COLUMN \"full_service_period_from\" timestamptz NOT NULL, ADD COLUMN \"full_service_period_to\" timestamptz NOT NULL, ADD COLUMN \"status\" character varying NOT NULL, ADD COLUMN \"unique_reference_id\" character varying NULL, ADD COLUMN \"currency\" character varying(3) NOT NULL, ADD COLUMN \"managed_by\" character varying NOT NULL, ADD COLUMN \"advance_after\" timestamptz NULL, ADD COLUMN \"annotations\" jsonb NULL, ADD COLUMN \"metadata\" jsonb NULL, ADD COLUMN \"created_at\" timestamptz NOT NULL, ADD COLUMN \"updated_at\" timestamptz NOT NULL, ADD COLUMN \"deleted_at\" timestamptz NULL, ADD COLUMN \"name\" character varying NOT NULL, ADD COLUMN \"description\" character varying NULL, ADD COLUMN \"customer_id\" character(26) NOT NULL, ADD COLUMN \"subscription_id\" character(26) NULL, ADD COLUMN \"subscription_item_id\" character(26) NULL, ADD COLUMN \"subscription_phase_id\" character(26) NULL, ADD CONSTRAINT \"charge_credit_purchases_customers_charges_credit_purchase\" FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT \"charge_credit_purchases_subscription_items_charges_credit_purch\" FOREIGN KEY (\"subscription_item_id\") REFERENCES \"subscription_items\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_credit_purchases_subscription_phases_charges_credit_purc\" FOREIGN KEY (\"subscription_phase_id\") REFERENCES \"subscription_phases\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_credit_purchases_subscriptions_charges_credit_purchase\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"chargecreditpurchase_annotations\" to table: \"charge_credit_purchases\"\nCREATE INDEX \"chargecreditpurchase_annotations\" ON \"charge_credit_purchases\" USING gin (\"annotations\");\n-- create index \"chargecreditpurchase_namespace_customer_id_unique_reference_id\" to table: \"charge_credit_purchases\"\nCREATE UNIQUE INDEX \"chargecreditpurchase_namespace_customer_id_unique_reference_id\" ON \"charge_credit_purchases\" (\"namespace\", \"customer_id\", \"unique_reference_id\") WHERE ((unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));\n-- create index \"chargecreditpurchase_namespace_id\" to table: \"charge_credit_purchases\"\nCREATE UNIQUE INDEX \"chargecreditpurchase_namespace_id\" ON \"charge_credit_purchases\" (\"namespace\", \"id\");\n-- modify \"charge_flat_fees\" table\n-- atlas:nolint CD101 MF103\nALTER TABLE \"charge_flat_fees\" DROP CONSTRAINT \"charge_flat_fees_charges_flat_fee\", ADD COLUMN \"service_period_from\" timestamptz NOT NULL, ADD COLUMN \"service_period_to\" timestamptz NOT NULL, ADD COLUMN \"billing_period_from\" timestamptz NOT NULL, ADD COLUMN \"billing_period_to\" timestamptz NOT NULL, ADD COLUMN \"full_service_period_from\" timestamptz NOT NULL, ADD COLUMN \"full_service_period_to\" timestamptz NOT NULL, ADD COLUMN \"status\" character varying NOT NULL, ADD COLUMN \"unique_reference_id\" character varying NULL, ADD COLUMN \"currency\" character varying(3) NOT NULL, ADD COLUMN \"managed_by\" character varying NOT NULL, ADD COLUMN \"advance_after\" timestamptz NULL, ADD COLUMN \"annotations\" jsonb NULL, ADD COLUMN \"metadata\" jsonb NULL, ADD COLUMN \"created_at\" timestamptz NOT NULL, ADD COLUMN \"updated_at\" timestamptz NOT NULL, ADD COLUMN \"deleted_at\" timestamptz NULL, ADD COLUMN \"name\" character varying NOT NULL, ADD COLUMN \"description\" character varying NULL, ADD COLUMN \"customer_id\" character(26) NOT NULL, ADD COLUMN \"subscription_id\" character(26) NULL, ADD COLUMN \"subscription_item_id\" character(26) NULL, ADD COLUMN \"subscription_phase_id\" character(26) NULL, ADD CONSTRAINT \"charge_flat_fees_customers_charges_flat_fee\" FOREIGN KEY (\"customer_id\") REFERENCES \"customers\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT \"charge_flat_fees_subscription_items_charges_flat_fee\" FOREIGN KEY (\"subscription_item_id\") REFERENCES \"subscription_items\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_flat_fees_subscription_phases_charges_flat_fee\" FOREIGN KEY (\"subscription_phase_id\") REFERENCES \"subscription_phases\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_flat_fees_subscriptions_charges_flat_fee\" FOREIGN KEY (\"subscription_id\") REFERENCES \"subscriptions\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"chargeflatfee_annotations\" to table: \"charge_flat_fees\"\nCREATE INDEX \"chargeflatfee_annotations\" ON \"charge_flat_fees\" USING gin (\"annotations\");\n-- create index \"chargeflatfee_namespace_customer_id_unique_reference_id\" to table: \"charge_flat_fees\"\nCREATE UNIQUE INDEX \"chargeflatfee_namespace_customer_id_unique_reference_id\" ON \"charge_flat_fees\" (\"namespace\", \"customer_id\", \"unique_reference_id\") WHERE ((unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));", + "symbols": [], + "line_count": 44 + }, + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.down.sql": { + "header": "-- reverse: modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" DROP COLUMN \"settlement_mode\";\n-- reverse: modify \"plans\" table\nALTER TABLE \"plans\" DROP COLUMN \"settlement_mode\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260325154250_add-settlement-mode-for-plan-and-subscription.up.sql": { + "header": "-- modify \"plans\" table\nALTER TABLE \"plans\" ADD COLUMN \"settlement_mode\" character varying NOT NULL DEFAULT 'credit_then_invoice';\n-- modify \"subscriptions\" table\nALTER TABLE \"subscriptions\" ADD COLUMN \"settlement_mode\" character varying NOT NULL DEFAULT 'credit_then_invoice';", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.down.sql": { + "header": "-- Down migration is a no-op: provider normalization and model name cleanup\n-- cannot be reliably reversed as the original values are not preserved.\n-- The next sync job will re-populate prices from external sources.", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/migrations/20260326000000_llmcost_normalize_providers.up.sql": { + "header": "-- Normalize provider names in llm_cost_prices to match updated NormalizeProvider() logic.\n-- Hosting providers (azure, bedrock, vertex_ai) are kept separate from model vendors\n-- (openai, anthropic, google) because pricing can differ.\n--\n-- The unique index is on (provider, model_id, namespace, effective_from) WHERE deleted_at IS NULL,\n-- so deduplication must match on all four columns.\n\n-- Step 1: For each alias group, soft-delete rows that would collide with an existing\n-- canonical row on the full unique key (canonical_provider, model_id, namespace, effective_from).\n-- This handles alias\u2192canonical conflicts.\nUPDATE llm_cost_prices AS dup\nSET deleted_at = NOW()\nWHERE deleted_at IS NULL\n AND provider IN ('nano-gpt', 'nano_gpt')\n AND EXISTS (\n SELECT 1 FROM llm_cost_prices AS canon\n WHERE canon.provider = 'nanogpt'\n AND canon.model_id = dup.model_id\n AND canon.namespace IS NOT DISTINCT FROM dup.namespace\n AND canon.effective_from = dup.effective_from", + "symbols": [], + "line_count": 156 + }, + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.down.sql": { + "header": "-- reverse: modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"transaction_authorization_status\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260326163949_add_ledger_transaction_authorization_status.up.sql": { + "header": "-- modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" ADD COLUMN \"transaction_authorization_status\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_run_credit_allocations\" table\nALTER TABLE \"charge_usage_based_run_credit_allocations\" DROP CONSTRAINT \"charge_ub_run_credit_alloc_run\", DROP CONSTRAINT \"charge_usage_based_run_credit_allocations_charge_usage_based_ru\", ADD CONSTRAINT \"charge_usage_based_run_credit_allocations_charge_usage_based_ru\" FOREIGN KEY (\"run_id\") REFERENCES \"charge_usage_based_runs\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n-- reverse: modify \"charge_flat_fee_credit_allocations\" table\nALTER TABLE \"charge_flat_fee_credit_allocations\" DROP CONSTRAINT \"charge_flat_fee_credit_allocations_charge_flat_fee_credit_alloc\", DROP CONSTRAINT \"charge_ff_credit_alloc_flat_fee\", ADD CONSTRAINT \"charge_flat_fee_credit_allocations_charge_flat_fees_credit_allo\" FOREIGN KEY (\"charge_id\") REFERENCES \"charge_flat_fees\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;\n\n-- reverse: modify \"charge_usage_based_run_credit_allocations\" table\nALTER TABLE \"charge_usage_based_run_credit_allocations\" DROP COLUMN \"corrects_realization_id\", DROP COLUMN \"type\";\n-- reverse: modify \"charge_flat_fee_credit_allocations\" table\nALTER TABLE \"charge_flat_fee_credit_allocations\" DROP COLUMN \"corrects_realization_id\", DROP COLUMN \"type\";", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20260331103521_charges-negative-realization-runs.up.sql": { + "header": "-- modify \"charge_flat_fee_credit_allocations\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_flat_fee_credit_allocations\" ADD COLUMN \"type\" character varying NOT NULL, ADD COLUMN \"corrects_realization_id\" character(26) NULL;\n-- modify \"charge_usage_based_run_credit_allocations\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_run_credit_allocations\" ADD COLUMN \"type\" character varying NOT NULL, ADD COLUMN \"corrects_realization_id\" character(26) NULL;\n\n-- modify \"charge_flat_fee_credit_allocations\" table\n-- atlas:nolint CD101\nALTER TABLE \"charge_flat_fee_credit_allocations\" DROP CONSTRAINT \"charge_flat_fee_credit_allocations_charge_flat_fees_credit_allo\", ADD CONSTRAINT \"charge_ff_credit_alloc_flat_fee\" FOREIGN KEY (\"charge_id\") REFERENCES \"charge_flat_fees\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE, ADD CONSTRAINT \"charge_flat_fee_credit_allocations_charge_flat_fee_credit_alloc\" FOREIGN KEY (\"corrects_realization_id\") REFERENCES \"charge_flat_fee_credit_allocations\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- modify \"charge_usage_based_run_credit_allocations\" table\n-- atlas:nolint CD101\nALTER TABLE \"charge_usage_based_run_credit_allocations\" DROP CONSTRAINT \"charge_usage_based_run_credit_allocations_charge_usage_based_ru\", ADD CONSTRAINT \"charge_usage_based_run_credit_allocations_charge_usage_based_ru\" FOREIGN KEY (\"corrects_realization_id\") REFERENCES \"charge_usage_based_run_credit_allocations\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_ub_run_credit_alloc_run\" FOREIGN KEY (\"run_id\") REFERENCES \"charge_usage_based_runs\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE;", + "symbols": [], + "line_count": 13 + }, + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.down.sql": { + "header": "-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"priority\", DROP COLUMN \"effective_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260402130955_add_credit_purchase_effective_at_priority.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"effective_at\" timestamptz NULL, ADD COLUMN \"priority\" bigint NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260403090155_charges_feature_ids.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP CONSTRAINT \"charge_usage_based_runs_features_usage_based_runs\", DROP COLUMN \"feature_id\";\n-- reverse: modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" DROP CONSTRAINT \"charge_usage_based_features_usage_based_charges\", DROP COLUMN \"feature_id\";\n-- reverse: modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" DROP CONSTRAINT \"charge_flat_fees_features_flat_fee_charges\", DROP COLUMN \"feature_id\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20260403090155_charges_feature_ids.up.sql": { + "header": "-- modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" ADD COLUMN \"feature_id\" character(26) NULL, ADD CONSTRAINT \"charge_flat_fees_features_flat_fee_charges\" FOREIGN KEY (\"feature_id\") REFERENCES \"features\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- modify \"charge_usage_based\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based\" ADD COLUMN \"feature_id\" character(26) NOT NULL, ADD CONSTRAINT \"charge_usage_based_features_usage_based_charges\" FOREIGN KEY (\"feature_id\") REFERENCES \"features\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;\n-- modify \"charge_usage_based_runs\" table\n-- atlas:nolint MF103\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"feature_id\" character(26) NOT NULL, ADD CONSTRAINT \"charge_usage_based_runs_features_usage_based_runs\" FOREIGN KEY (\"feature_id\") REFERENCES \"features\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.down.sql": { + "header": "-- reverse: create index \"taxcode_annotations\" to table: \"tax_codes\"\nDROP INDEX \"taxcode_annotations\";\n-- reverse: modify \"tax_codes\" table\nALTER TABLE \"tax_codes\" DROP COLUMN \"annotations\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260408082246_add_annotations_to_taxcode.up.sql": { + "header": "-- modify \"tax_codes\" table\nALTER TABLE \"tax_codes\" ADD COLUMN \"annotations\" jsonb NULL;\n-- create index \"taxcode_annotations\" to table: \"tax_codes\"\nCREATE INDEX \"taxcode_annotations\" ON \"tax_codes\" USING gin (\"annotations\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260409112434_invoice-line-backend.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"engine\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260409112434_invoice-line-backend.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"engine\" character varying NOT NULL DEFAULT 'invoicing';", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.down.sql": { + "header": "-- reverse: create index \"creditrealizationlineagesegment_lineage_id_closed_at\" to table: \"credit_realization_lineage_segments\"\nDROP INDEX \"creditrealizationlineagesegment_lineage_id_closed_at\";\n-- reverse: create index \"creditrealizationlineagesegment_lineage_id\" to table: \"credit_realization_lineage_segments\"\nDROP INDEX \"creditrealizationlineagesegment_lineage_id\";\n-- reverse: create index \"creditrealizationlineagesegment_id\" to table: \"credit_realization_lineage_segments\"\nDROP INDEX \"creditrealizationlineagesegment_id\";\n-- reverse: create \"credit_realization_lineage_segments\" table\nDROP TABLE \"credit_realization_lineage_segments\";\n-- reverse: create index \"creditrealizationlineage_namespace_charge_id\" to table: \"credit_realization_lineages\"\nDROP INDEX \"creditrealizationlineage_namespace_charge_id\";\n-- reverse: create index \"creditrealizationlineage_namespace_root_realization_id\" to table: \"credit_realization_lineages\"\nDROP INDEX \"creditrealizationlineage_namespace_root_realization_id\";\n-- reverse: create index \"creditrealizationlineage_namespace_customer_id\" to table: \"credit_realization_lineages\"\nDROP INDEX \"creditrealizationlineage_namespace_customer_id\";\n-- reverse: create index \"creditrealizationlineage_namespace\" to table: \"credit_realization_lineages\"\nDROP INDEX \"creditrealizationlineage_namespace\";\n-- reverse: create index \"creditrealizationlineage_id\" to table: \"credit_realization_lineages\"\nDROP INDEX \"creditrealizationlineage_id\";\n-- reverse: create \"credit_realization_lineages\" table\nDROP TABLE \"credit_realization_lineages\";", + "symbols": [], + "line_count": 20 + }, + "tools/migrate/migrations/20260409130630_add_credit_realization_lineage.up.sql": { + "header": "-- create \"credit_realization_lineages\" table\nCREATE TABLE \"credit_realization_lineages\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"charge_id\" character(26) NOT NULL,\n \"root_realization_id\" character(26) NOT NULL,\n \"customer_id\" character(26) NOT NULL,\n \"currency\" character varying(3) NOT NULL,\n \"origin_kind\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"credit_realization_lineages_charges_credit_realization_lineages\" FOREIGN KEY (\"charge_id\") REFERENCES \"charges\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION\n);\n-- create index \"creditrealizationlineage_id\" to table: \"credit_realization_lineages\"\nCREATE UNIQUE INDEX \"creditrealizationlineage_id\" ON \"credit_realization_lineages\" (\"id\");\n-- create index \"creditrealizationlineage_namespace\" to table: \"credit_realization_lineages\"\nCREATE INDEX \"creditrealizationlineage_namespace\" ON \"credit_realization_lineages\" (\"namespace\");\n-- create index \"creditrealizationlineage_namespace_charge_id\" to table: \"credit_realization_lineages\"\nCREATE INDEX \"creditrealizationlineage_namespace_charge_id\" ON \"credit_realization_lineages\" (\"namespace\", \"charge_id\");\n-- create index \"creditrealizationlineage_namespace_customer_id\" to table: \"credit_realization_lineages\"", + "symbols": [], + "line_count": 41 + }, + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.down.sql": { + "header": "-- reverse: modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" DROP COLUMN \"status_detailed\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260410132752_flat_fee_status_detailed.up.sql": { + "header": "-- modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" ADD COLUMN \"status_detailed\" character varying NULL;\nUPDATE \"charge_flat_fees\" SET \"status_detailed\" = \"status\";\n-- atlas:nolint MF104\nALTER TABLE \"charge_flat_fees\" ALTER COLUMN \"status_detailed\" SET NOT NULL;", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.down.sql": { + "header": "-- reverse: create index \"chargecreditpurchasecreditgrant_namespace_charge_id\" to table: \"charge_credit_purchase_credit_grants\"\nDROP INDEX \"chargecreditpurchasecreditgrant_namespace_charge_id\";\n-- reverse: create index \"chargecreditpurchasecreditgrant_namespace\" to table: \"charge_credit_purchase_credit_grants\"\nDROP INDEX \"chargecreditpurchasecreditgrant_namespace\";\n-- reverse: create index \"chargecreditpurchasecreditgrant_id\" to table: \"charge_credit_purchase_credit_grants\"\nDROP INDEX \"chargecreditpurchasecreditgrant_id\";\n-- reverse: create index \"charge_credit_purchase_credit_grants_charge_id_key\" to table: \"charge_credit_purchase_credit_grants\"\nDROP INDEX \"charge_credit_purchase_credit_grants_charge_id_key\";\n-- reverse: create \"charge_credit_purchase_credit_grants\" table\nDROP TABLE \"charge_credit_purchase_credit_grants\";\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"status_detailed\", ADD COLUMN \"credit_granted_at\" timestamptz NULL, ADD COLUMN \"credit_grant_transaction_group_id\" character(26) NULL;", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260410144542_credit_purchase_refactor.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\n-- atlas:nolint DS103\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"credit_grant_transaction_group_id\", DROP COLUMN \"credit_granted_at\", ADD COLUMN \"status_detailed\" character varying NULL;\nUPDATE \"charge_credit_purchases\" SET \"status_detailed\" = \"status\";\n-- atlas:nolint MF104\nALTER TABLE \"charge_credit_purchases\" ALTER COLUMN \"status_detailed\" SET NOT NULL;\n-- create \"charge_credit_purchase_credit_grants\" table\nCREATE TABLE \"charge_credit_purchase_credit_grants\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"transaction_group_id\" character(26) NOT NULL,\n \"granted_at\" timestamptz NOT NULL,\n \"charge_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"charge_credit_purchase_credit_grants_charge_credit_purchases_cr\" FOREIGN KEY (\"charge_id\") REFERENCES \"charge_credit_purchases\" (\"id\") ON UPDATE NO ACTION ON DELETE CASCADE\n);\n-- create index \"charge_credit_purchase_credit_grants_charge_id_key\" to table: \"charge_credit_purchase_credit_grants\"", + "symbols": [], + "line_count": 27 + }, + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.down.sql": { + "header": "-- reverse: create index \"charge_usage_based_runs_line_id_key\" to table: \"charge_usage_based_runs\"\nDROP INDEX \"charge_usage_based_runs_line_id_key\";\n-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP CONSTRAINT \"charge_usage_based_runs_billing_invoice_lines_charge_usage_base\", DROP COLUMN \"line_id\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260413154216_usagebased-run-line-id.up.sql": { + "header": "-- modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"line_id\" character(26) NULL, ADD CONSTRAINT \"charge_usage_based_runs_billing_invoice_lines_charge_usage_base\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"charge_usage_based_runs_line_id_key\" to table: \"charge_usage_based_runs\"\nCREATE UNIQUE INDEX \"charge_usage_based_runs_line_id_key\" ON \"charge_usage_based_runs\" (\"line_id\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.down.sql": { + "header": "-- reverse: create index \"chargeusagebasedrundetailedline_tax_code_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_tax_code_id\";\n-- reverse: create index \"chargeusagebasedrundetailedline_namespace_run_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_namespace_run_id\";\n-- reverse: create index \"chargeusagebasedrundetailedline_namespace_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_namespace_id\";\n-- reverse: create index \"chargeusagebasedrundetailedline_namespace_charge_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_namespace_charge_id\";\n-- reverse: create index \"chargeusagebasedrundetailedline_namespace\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_namespace\";\n-- reverse: create index \"chargeusagebasedrundetailedline_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_id\";\n-- reverse: create index \"chargeusagebasedrundetailedline_annotations\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeusagebasedrundetailedline_annotations\";\n-- reverse: create index \"chargeubdetailedline_ns_charge_run_child_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeubdetailedline_ns_charge_run_child_id\";\n-- reverse: create \"charge_usage_based_run_detailed_line\" table\nDROP TABLE \"charge_usage_based_run_detailed_line\";\n-- reverse: create index \"chargeflatfeedetailedline_tax_code_id\" to table: \"charge_flat_fee_detailed_line\"\nDROP INDEX \"chargeflatfeedetailedline_tax_code_id\";", + "symbols": [], + "line_count": 34 + }, + "tools/migrate/migrations/20260421111210_add_charge_detailed_line_tables.up.sql": { + "header": "-- create \"charge_flat_fee_detailed_line\" table\nCREATE TABLE \"charge_flat_fee_detailed_line\" (\n \"id\" character(26) NOT NULL,\n \"currency\" character varying(3) NOT NULL,\n \"tax_config\" jsonb NULL,\n \"tax_behavior\" character varying NULL,\n \"service_period_start\" timestamptz NOT NULL,\n \"service_period_end\" timestamptz NOT NULL,\n \"quantity\" numeric NOT NULL,\n \"invoicing_app_external_id\" character varying NULL,\n \"child_unique_reference_id\" character varying NULL,\n \"per_unit_amount\" numeric NOT NULL,\n \"category\" character varying NOT NULL DEFAULT 'regular',\n \"payment_term\" character varying NOT NULL DEFAULT 'in_advance',\n \"index\" bigint NULL,\n \"credits_applied\" jsonb NULL,\n \"annotations\" jsonb NULL,\n \"namespace\" character varying NOT NULL,\n \"metadata\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,", + "symbols": [], + "line_count": 108 + }, + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_run_detailed_line\" table\nALTER TABLE \"charge_usage_based_run_detailed_line\" ALTER COLUMN \"child_unique_reference_id\" DROP NOT NULL, DROP CONSTRAINT IF EXISTS \"child_unique_reference_id_not_empty\";\n-- reverse: modify \"charge_flat_fee_detailed_line\" table\nALTER TABLE \"charge_flat_fee_detailed_line\" ALTER COLUMN \"child_unique_reference_id\" DROP NOT NULL, DROP CONSTRAINT IF EXISTS \"child_unique_reference_id_not_empty\";\n-- reverse: modify \"billing_standard_invoice_detailed_lines\" table\nALTER TABLE \"billing_standard_invoice_detailed_lines\" ALTER COLUMN \"child_unique_reference_id\" DROP NOT NULL, DROP CONSTRAINT IF EXISTS \"child_unique_reference_id_not_empty\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20260421150206_require_child_unique_reference_id_on_detailed_lines.up.sql": { + "header": "-- modify \"billing_standard_invoice_detailed_lines\" table\nUPDATE \"billing_standard_invoice_detailed_lines\"\nSET \"child_unique_reference_id\" = \"id\"\nWHERE \"child_unique_reference_id\" IS NULL OR \"child_unique_reference_id\" = '';\n-- atlas:nolint MF104\nALTER TABLE \"billing_standard_invoice_detailed_lines\" ADD CONSTRAINT \"child_unique_reference_id_not_empty\" CHECK ((child_unique_reference_id)::text <> ''::text), ALTER COLUMN \"child_unique_reference_id\" SET NOT NULL;\n-- modify \"charge_flat_fee_detailed_line\" table\nUPDATE \"charge_flat_fee_detailed_line\"\nSET \"child_unique_reference_id\" = \"id\"\nWHERE \"child_unique_reference_id\" IS NULL OR \"child_unique_reference_id\" = '';\n-- atlas:nolint MF104\nALTER TABLE \"charge_flat_fee_detailed_line\" ADD CONSTRAINT \"child_unique_reference_id_not_empty\" CHECK ((child_unique_reference_id)::text <> ''::text), ALTER COLUMN \"child_unique_reference_id\" SET NOT NULL;\n-- modify \"charge_usage_based_run_detailed_line\" table\nUPDATE \"charge_usage_based_run_detailed_line\"\nSET \"child_unique_reference_id\" = \"id\"\nWHERE \"child_unique_reference_id\" IS NULL OR \"child_unique_reference_id\" = '';\n-- atlas:nolint MF104\nALTER TABLE \"charge_usage_based_run_detailed_line\" ADD CONSTRAINT \"child_unique_reference_id_not_empty\" CHECK ((child_unique_reference_id)::text <> ''::text), ALTER COLUMN \"child_unique_reference_id\" SET NOT NULL;", + "symbols": [], + "line_count": 18 + }, + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.down.sql": { + "header": "-- reverse: create index \"chargeubdetailedline_ns_charge_run_child_id\" to table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeubdetailedline_ns_charge_run_child_id\";\n-- reverse: drop index \"chargeubdetailedline_ns_charge_run_child_id\" from table: \"charge_usage_based_run_detailed_line\"\nCREATE UNIQUE INDEX \"chargeubdetailedline_ns_charge_run_child_id\" ON \"charge_usage_based_run_detailed_line\" (\"namespace\", \"charge_id\", \"run_id\", \"child_unique_reference_id\") WHERE ((child_unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));\n-- reverse: create index \"chargeffdetailedline_ns_charge_child_id\" to table: \"charge_flat_fee_detailed_line\"\nDROP INDEX \"chargeffdetailedline_ns_charge_child_id\";\n-- reverse: drop index \"chargeffdetailedline_ns_charge_child_id\" from table: \"charge_flat_fee_detailed_line\"\nCREATE UNIQUE INDEX \"chargeffdetailedline_ns_charge_child_id\" ON \"charge_flat_fee_detailed_line\" (\"namespace\", \"charge_id\", \"child_unique_reference_id\") WHERE ((child_unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));\n-- reverse: create index \"billingstdinvdetailedline_ns_parent_child_id\" to table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstdinvdetailedline_ns_parent_child_id\";\n-- reverse: drop index \"billingstdinvdetailedline_ns_parent_child_id\" from table: \"billing_standard_invoice_detailed_lines\"\nCREATE UNIQUE INDEX \"billingstdinvdetailedline_ns_parent_child_id\" ON \"billing_standard_invoice_detailed_lines\" (\"namespace\", \"parent_line_id\", \"child_unique_reference_id\") WHERE ((child_unique_reference_id IS NOT NULL) AND (deleted_at IS NULL));", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260422051837_simplify_mixin_detailed_line_partial_indexes.up.sql": { + "header": "-- drop index \"billingstdinvdetailedline_ns_parent_child_id\" from table: \"billing_standard_invoice_detailed_lines\"\nDROP INDEX \"billingstdinvdetailedline_ns_parent_child_id\";\n-- create index \"billingstdinvdetailedline_ns_parent_child_id\" to table: \"billing_standard_invoice_detailed_lines\"\nCREATE UNIQUE INDEX \"billingstdinvdetailedline_ns_parent_child_id\" ON \"billing_standard_invoice_detailed_lines\" (\"namespace\", \"parent_line_id\", \"child_unique_reference_id\") WHERE (deleted_at IS NULL);\n-- drop index \"chargeffdetailedline_ns_charge_child_id\" from table: \"charge_flat_fee_detailed_line\"\nDROP INDEX \"chargeffdetailedline_ns_charge_child_id\";\n-- create index \"chargeffdetailedline_ns_charge_child_id\" to table: \"charge_flat_fee_detailed_line\"\nCREATE UNIQUE INDEX \"chargeffdetailedline_ns_charge_child_id\" ON \"charge_flat_fee_detailed_line\" (\"namespace\", \"charge_id\", \"child_unique_reference_id\") WHERE (deleted_at IS NULL);\n-- drop index \"chargeubdetailedline_ns_charge_run_child_id\" from table: \"charge_usage_based_run_detailed_line\"\nDROP INDEX \"chargeubdetailedline_ns_charge_run_child_id\";\n-- create index \"chargeubdetailedline_ns_charge_run_child_id\" to table: \"charge_usage_based_run_detailed_line\"\nCREATE UNIQUE INDEX \"chargeubdetailedline_ns_charge_run_child_id\" ON \"charge_usage_based_run_detailed_line\" (\"namespace\", \"charge_id\", \"run_id\", \"child_unique_reference_id\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.down.sql": { + "header": "-- reverse: modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" DROP COLUMN \"override_collection_period_end\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260422140242_add_standard_invoice_line_override_collection_period_end.up.sql": { + "header": "-- modify \"billing_invoice_lines\" table\nALTER TABLE \"billing_invoice_lines\" ADD COLUMN \"override_collection_period_end\" timestamptz NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"collection_end\" timestamptz;\nUPDATE \"charge_usage_based_runs\" SET \"collection_end\" = \"stored_at_lt\";\nALTER TABLE \"charge_usage_based_runs\" ALTER COLUMN \"collection_end\" SET NOT NULL;\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"service_period_to\";\nALTER TABLE \"charge_usage_based_runs\" RENAME COLUMN \"metered_quantity\" TO \"meter_value\";\nALTER TABLE \"charge_usage_based_runs\" RENAME COLUMN \"stored_at_lt\" TO \"asof\";", + "symbols": [], + "line_count": 7 + }, + "tools/migrate/migrations/20260424091352_usagebased_run_data_structure.up.sql": { + "header": "-- modify \"charge_usage_based_runs\" table\n-- atlas:nolint BC102\nALTER TABLE \"charge_usage_based_runs\" RENAME COLUMN \"asof\" TO \"stored_at_lt\";\n-- atlas:nolint BC102\nALTER TABLE \"charge_usage_based_runs\" RENAME COLUMN \"meter_value\" TO \"metered_quantity\";\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"service_period_to\" timestamptz;\n-- Existing runtime snapshots used collection_end as the actual metering cutoff; asof was only\n-- the run creation timestamp. Preserve the query cutoff under the new stored_at_lt name.\nUPDATE \"charge_usage_based_runs\" SET \"stored_at_lt\" = \"collection_end\";\n-- Final runs can backfill their service period from the immutable parent charge intent. Partial\n-- runs should not exist in persisted production data yet, but keep a safe fallback to the old\n-- collection_end value for any non-final rows.\nUPDATE \"charge_usage_based_runs\" AS \"r\"\nSET \"service_period_to\" = CASE\n WHEN \"r\".\"type\" = 'final_realization' THEN \"c\".\"service_period_to\"\n ELSE \"r\".\"collection_end\"\nEND\nFROM \"charge_usage_based\" AS \"c\"\nWHERE \"r\".\"namespace\" = \"c\".\"namespace\"\n AND \"r\".\"charge_id\" = \"c\".\"id\"", + "symbols": [], + "line_count": 25 + }, + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.down.sql": { + "header": "-- reverse: recreate charges_search_v1s view without tax_code_id and tax_behavior columns\nDROP VIEW IF EXISTS \"charges_search_v1s\";\nCREATE VIEW \"charges_search_v1s\" AS\nSELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", 'credit_purchase' AS \"type\" FROM \"charge_credit_purchases\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", 'flat_fee' AS \"type\" FROM \"charge_flat_fees\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", 'usage_based' AS \"type\" FROM \"charge_usage_based\";\n-- reverse: drop indexes on tax_code_id\nDROP INDEX IF EXISTS \"chargeusagebased_tax_code_id\";\nDROP INDEX IF EXISTS \"chargeflatfees_tax_code_id\";\nDROP INDEX IF EXISTS \"chargecreditpurchases_tax_code_id\";\n-- reverse: modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" DROP CONSTRAINT \"charge_usage_based_tax_codes_charge_usage_based\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" DROP CONSTRAINT \"charge_flat_fees_tax_codes_charge_flat_fees\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP CONSTRAINT \"charge_credit_purchases_tax_codes_charge_credit_purchases\", DROP COLUMN \"tax_code_id\", DROP COLUMN \"tax_behavior\";", + "symbols": [], + "line_count": 14 + }, + "tools/migrate/migrations/20260428102826_add_tax_codes_to_charges.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"charge_credit_purchases_tax_codes_charge_credit_purchases\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"charge_flat_fees_tax_codes_charge_flat_fees\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" ADD COLUMN \"tax_behavior\" character varying NULL, ADD COLUMN \"tax_code_id\" character(26) NULL, ADD CONSTRAINT \"charge_usage_based_tax_codes_charge_usage_based\" FOREIGN KEY (\"tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create indexes on tax_code_id for FK lookup performance (ON DELETE SET NULL scans these columns)\nCREATE INDEX \"chargecreditpurchases_tax_code_id\" ON \"charge_credit_purchases\" (\"tax_code_id\");\nCREATE INDEX \"chargeflatfees_tax_code_id\" ON \"charge_flat_fees\" (\"tax_code_id\");\nCREATE INDEX \"chargeusagebased_tax_code_id\" ON \"charge_usage_based\" (\"tax_code_id\");\n-- recreate charges_search_v1s view to include tax_code_id and tax_behavior columns\nDROP VIEW IF EXISTS \"charges_search_v1s\";\nCREATE VIEW \"charges_search_v1s\" AS\nSELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'credit_purchase' AS \"type\" FROM \"charge_credit_purchases\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'flat_fee' AS \"type\" FROM \"charge_flat_fees\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'usage_based' AS \"type\" FROM \"charge_usage_based\";", + "symbols": [], + "line_count": 14 + }, + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"detailed_lines_present\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260429140129_add_usage_based_run_detailed_lines_present.up.sql": { + "header": "-- modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"detailed_lines_present\" boolean NOT NULL DEFAULT false;\nUPDATE \"charge_usage_based_runs\" AS \"runs\"\nSET \"detailed_lines_present\" = true\nWHERE EXISTS (\n SELECT 1\n FROM \"charge_usage_based_run_detailed_line\" AS \"lines\"\n WHERE \"lines\".\"namespace\" = \"runs\".\"namespace\"\n AND \"lines\".\"charge_id\" = \"runs\".\"charge_id\"\n AND \"lines\".\"run_id\" = \"runs\".\"id\"\n AND \"lines\".\"deleted_at\" IS NULL\n);\nUPDATE \"charge_usage_based_runs\" AS \"runs\"\nSET \"detailed_lines_present\" = true\nFROM \"charge_usage_based\" AS \"charges\"\nWHERE \"charges\".\"namespace\" = \"runs\".\"namespace\"\n AND \"charges\".\"id\" = \"runs\".\"charge_id\"\n AND \"charges\".\"status_detailed\" = 'final';\nALTER TABLE \"charge_usage_based_runs\" ALTER COLUMN \"detailed_lines_present\" DROP DEFAULT;", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.down.sql": { + "header": "-- reverse: modify \"credit_realization_lineage_segments\" table\nALTER TABLE \"credit_realization_lineage_segments\" DROP COLUMN \"source_backing_transaction_group_id\", DROP COLUMN \"source_state\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260430095237_add_credit_realization_lineage_segment_source.up.sql": { + "header": "-- modify \"credit_realization_lineage_segments\" table\nALTER TABLE \"credit_realization_lineage_segments\" ADD COLUMN \"source_state\" character varying NULL, ADD COLUMN \"source_backing_transaction_group_id\" character(26) NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260502093117_distributed_locks.down.sql": { + "header": "DROP TABLE IF EXISTS distributed_locks;", + "symbols": [], + "line_count": 1 + }, + "tools/migrate/migrations/20260502093117_distributed_locks.up.sql": { + "header": "CREATE TABLE IF NOT EXISTS distributed_locks (\n \"name\" varchar(255) NOT NULL,\n \"record_version_number\" int8 NULL,\n \"data\" bytea NULL,\n \"owner\" varchar(255) NULL,\n CONSTRAINT distributed_locks_pkey PRIMARY KEY (\"name\")\n);\n\nCREATE SEQUENCE IF NOT EXISTS distributed_locks_rvn CYCLE OWNED BY distributed_locks.record_version_number;", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.down.sql": { + "header": "-- reverse: create index \"organizationdefaulttaxcodes_namespace\" to table: \"organization_default_tax_codes\"\nDROP INDEX \"organizationdefaulttaxcodes_namespace\";\n-- reverse: create index \"organizationdefaulttaxcodes_id\" to table: \"organization_default_tax_codes\"\nDROP INDEX \"organizationdefaulttaxcodes_id\";\n-- reverse: create \"organization_default_tax_codes\" table\nDROP TABLE \"organization_default_tax_codes\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20260506082128_add_organization_default_tax_codes.up.sql": { + "header": "-- create \"organization_default_tax_codes\" table\nCREATE TABLE \"organization_default_tax_codes\" (\n \"id\" character(26) NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"namespace\" character varying NOT NULL,\n \"invoicing_tax_code_id\" character(26) NOT NULL,\n \"credit_grant_tax_code_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\"),\n CONSTRAINT \"org_dtc_credit_grant_tax_code_fk\" FOREIGN KEY (\"credit_grant_tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION,\n CONSTRAINT \"org_dtc_invoicing_tax_code_fk\" FOREIGN KEY (\"invoicing_tax_code_id\") REFERENCES \"tax_codes\" (\"id\") ON UPDATE NO ACTION ON DELETE NO ACTION\n);\n-- create index \"organizationdefaulttaxcodes_id\" to table: \"organization_default_tax_codes\"\nCREATE UNIQUE INDEX \"organizationdefaulttaxcodes_id\" ON \"organization_default_tax_codes\" (\"id\");\n-- create index \"organizationdefaulttaxcodes_namespace\" to table: \"organization_default_tax_codes\"\nCREATE UNIQUE INDEX \"organizationdefaulttaxcodes_namespace\" ON \"organization_default_tax_codes\" (\"namespace\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 17 + }, + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_run_detailed_line\" table\nALTER TABLE \"charge_usage_based_run_detailed_line\" DROP CONSTRAINT \"cub_run_corrected_detailed_lines\", DROP COLUMN \"corrects_run_id\", DROP COLUMN \"pricer_reference_id\";\n-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"no_fiat_transaction_required\";\n-- reverse: modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" DROP COLUMN \"rating_engine\";\n-- reverse: modify \"charge_flat_fee_detailed_line\" table\nALTER TABLE \"charge_flat_fee_detailed_line\" DROP COLUMN \"pricer_reference_id\";", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20260506102300_add_usage_based_detailed_line_corrects_run_id.up.sql": { + "header": "-- modify \"charge_flat_fee_detailed_line\" table\nALTER TABLE \"charge_flat_fee_detailed_line\" ADD COLUMN \"pricer_reference_id\" character varying;\nUPDATE \"charge_flat_fee_detailed_line\" SET \"pricer_reference_id\" = \"child_unique_reference_id\" WHERE \"pricer_reference_id\" IS NULL;\nALTER TABLE \"charge_flat_fee_detailed_line\" ALTER COLUMN \"pricer_reference_id\" SET NOT NULL;\n-- modify \"charge_usage_based\" table\nALTER TABLE \"charge_usage_based\" ADD COLUMN \"rating_engine\" character varying;\nUPDATE \"charge_usage_based\" SET \"rating_engine\" = 'delta' WHERE \"rating_engine\" IS NULL;\nALTER TABLE \"charge_usage_based\" ALTER COLUMN \"rating_engine\" SET NOT NULL;\n-- modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"no_fiat_transaction_required\" boolean NOT NULL DEFAULT false;\nUPDATE \"charge_usage_based_runs\" AS r SET \"no_fiat_transaction_required\" = true FROM \"charge_usage_based\" AS c WHERE r.\"charge_id\" = c.\"id\" AND c.\"settlement_mode\" = 'credit_only';\nALTER TABLE \"charge_usage_based_runs\" ALTER COLUMN \"no_fiat_transaction_required\" DROP DEFAULT;\n-- modify \"charge_usage_based_run_detailed_line\" table\nALTER TABLE \"charge_usage_based_run_detailed_line\" ADD COLUMN \"pricer_reference_id\" character varying, ADD COLUMN \"corrects_run_id\" character(26) NULL, ADD CONSTRAINT \"cub_run_corrected_detailed_lines\" FOREIGN KEY (\"corrects_run_id\") REFERENCES \"charge_usage_based_runs\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\nUPDATE \"charge_usage_based_run_detailed_line\" SET \"pricer_reference_id\" = \"child_unique_reference_id\" WHERE \"pricer_reference_id\" IS NULL;\nALTER TABLE \"charge_usage_based_run_detailed_line\" ALTER COLUMN \"pricer_reference_id\" SET NOT NULL;", + "symbols": [], + "line_count": 16 + }, + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.down.sql": { + "header": "-- reverse: modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" DROP CONSTRAINT \"charge_usage_based_runs_billing_invoices_charge_usage_based_run\", DROP COLUMN \"invoice_id\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260506134501_add_usage_based_run_invoice_id.up.sql": { + "header": "-- modify \"charge_usage_based_runs\" table\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"invoice_id\" character(26) NULL, ADD CONSTRAINT \"charge_usage_based_runs_billing_invoices_charge_usage_based_run\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.down.sql": { + "header": "-- reverse: create index \"appstripecustomer_namespace_app_id_customer_id\" to table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_namespace_app_id_customer_id\";\n-- reverse: create index \"appstripecustomer_app_id_stripe_customer_id\" to table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_app_id_stripe_customer_id\";\n-- reverse: drop index \"appstripecustomer_namespace_app_id_customer_id\" from table: \"app_stripe_customers\"\nCREATE UNIQUE INDEX \"appstripecustomer_namespace_app_id_customer_id\" ON \"app_stripe_customers\" (\"namespace\", \"app_id\", \"customer_id\");\n-- reverse: drop index \"appstripecustomer_app_id_stripe_customer_id\" from table: \"app_stripe_customers\"\nCREATE UNIQUE INDEX \"appstripecustomer_app_id_stripe_customer_id\" ON \"app_stripe_customers\" (\"app_id\", \"stripe_customer_id\");\n-- reverse: create index \"appcustomer_namespace_app_id_customer_id\" to table: \"app_customers\"\nDROP INDEX \"appcustomer_namespace_app_id_customer_id\";\n-- reverse: drop index \"appcustomer_namespace_app_id_customer_id\" from table: \"app_customers\"\nCREATE UNIQUE INDEX \"appcustomer_namespace_app_id_customer_id\" ON \"app_customers\" (\"namespace\", \"app_id\", \"customer_id\");", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260508124235_add_app_customer_partial_unique_indexes.up.sql": { + "header": "-- drop index \"appcustomer_namespace_app_id_customer_id\" from table: \"app_customers\"\nDROP INDEX \"appcustomer_namespace_app_id_customer_id\";\n-- create index \"appcustomer_namespace_app_id_customer_id\" to table: \"app_customers\"\nCREATE UNIQUE INDEX \"appcustomer_namespace_app_id_customer_id\" ON \"app_customers\" (\"namespace\", \"app_id\", \"customer_id\") WHERE (deleted_at IS NULL);\n-- drop index \"appstripecustomer_app_id_stripe_customer_id\" from table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_app_id_stripe_customer_id\";\n-- drop index \"appstripecustomer_namespace_app_id_customer_id\" from table: \"app_stripe_customers\"\nDROP INDEX \"appstripecustomer_namespace_app_id_customer_id\";\n-- create index \"appstripecustomer_app_id_stripe_customer_id\" to table: \"app_stripe_customers\"\nCREATE UNIQUE INDEX \"appstripecustomer_app_id_stripe_customer_id\" ON \"app_stripe_customers\" (\"app_id\", \"stripe_customer_id\") WHERE (deleted_at IS NULL);\n-- create index \"appstripecustomer_namespace_app_id_customer_id\" to table: \"app_stripe_customers\"\nCREATE UNIQUE INDEX \"appstripecustomer_namespace_app_id_customer_id\" ON \"app_stripe_customers\" (\"namespace\", \"app_id\", \"customer_id\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 12 + }, + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.down.sql": { + "header": "-- remove initial realization run type\nALTER TABLE \"charge_usage_based_runs\" DROP COLUMN \"initial_type\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260511120000_usagebased_run_initial_type.up.sql": { + "header": "-- add initial realization run type and backfill it from the current type\nALTER TABLE \"charge_usage_based_runs\" ADD COLUMN \"initial_type\" character varying NULL;\nUPDATE \"charge_usage_based_runs\" SET \"initial_type\" = \"type\" WHERE \"initial_type\" IS NULL;\nALTER TABLE \"charge_usage_based_runs\" ALTER COLUMN \"initial_type\" SET NOT NULL;", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260511201803_flatfee_runs.down.sql": { + "header": "-- reverse: drop \"charge_flat_fee_payments\" table\nCREATE TABLE \"charge_flat_fee_payments\" (\n \"id\" character(26) NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"status\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"authorized_transaction_group_id\" character(26) NULL,\n \"authorized_at\" timestamptz NULL,\n \"settled_transaction_group_id\" character(26) NULL,\n \"settled_at\" timestamptz NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"annotations\" jsonb NULL,\n \"line_id\" character(26) NOT NULL,\n \"charge_id\" character(26) NOT NULL,\n \"invoice_id\" character(26) NOT NULL,\n PRIMARY KEY (\"id\")", + "symbols": [], + "line_count": 410 + }, + "tools/migrate/migrations/20260511201803_flatfee_runs.up.sql": { + "header": "-- modify \"charge_flat_fee_credit_allocations\" table\nALTER TABLE \"charge_flat_fee_credit_allocations\" DROP CONSTRAINT \"charge_ff_credit_alloc_flat_fee\", DROP CONSTRAINT \"charge_flat_fee_credit_allocations_billing_invoice_lines_charge\";\n-- modify \"charge_flat_fee_detailed_line\" table\nALTER TABLE \"charge_flat_fee_detailed_line\" DROP CONSTRAINT \"charge_flat_fee_detailed_line_charge_flat_fees_detailed_lines\", DROP CONSTRAINT \"charge_flat_fee_detailed_line_tax_codes_charge_flat_fee_detaile\";\n-- modify \"charge_flat_fee_invoiced_usages\" table\nALTER TABLE \"charge_flat_fee_invoiced_usages\" DROP CONSTRAINT \"charge_flat_fee_invoiced_usages_billing_invoice_lines_charge_fl\", DROP CONSTRAINT \"charge_flat_fee_invoiced_usages_charge_flat_fees_invoiced_usage\";\n-- modify \"charge_flat_fee_payments\" table\nALTER TABLE \"charge_flat_fee_payments\" DROP CONSTRAINT \"charge_flat_fee_payments_billing_invoice_lines_charge_flat_fee_\", DROP CONSTRAINT \"charge_flat_fee_payments_charge_flat_fees_payment\";\n-- modify \"charge_flat_fees\" table\nALTER TABLE \"charge_flat_fees\" ADD COLUMN \"current_realization_run_id\" character(26) NULL;\n-- create \"charge_flat_fee_run_credit_allocations\" table\nCREATE TABLE \"charge_flat_fee_run_credit_allocations\" (\n \"id\" character(26) NOT NULL,\n \"amount\" numeric NOT NULL,\n \"service_period_from\" timestamptz NOT NULL,\n \"service_period_to\" timestamptz NOT NULL,\n \"ledger_transaction_group_id\" character(26) NOT NULL,\n \"sort_hint\" bigint NOT NULL,\n \"type\" character varying NOT NULL,\n \"namespace\" character varying NOT NULL,", + "symbols": [], + "line_count": 482 + }, + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.down.sql": { + "header": "-- reverse: create index \"charge_flat_fee_runs_line_id_key\" to table: \"charge_flat_fee_runs\"\nDROP INDEX \"charge_flat_fee_runs_line_id_key\";\n-- reverse: modify \"charge_flat_fee_runs\" table\nALTER TABLE \"charge_flat_fee_runs\" DROP CONSTRAINT \"charge_flat_fee_runs_billing_invoices_charge_flat_fee_runs\", DROP CONSTRAINT \"charge_flat_fee_runs_billing_invoice_lines_charge_flat_fee_runs\";\n-- reverse: modify \"charge_usage_based_run_invoiced_usages\" table\nALTER TABLE \"charge_usage_based_run_invoiced_usages\" ADD COLUMN \"line_id\" character(26) NULL, ADD COLUMN \"mutable\" boolean NOT NULL DEFAULT false;\nALTER TABLE \"charge_usage_based_run_invoiced_usages\" ALTER COLUMN \"mutable\" DROP DEFAULT;\n-- reverse: modify \"charge_flat_fee_run_invoiced_usages\" table\nALTER TABLE \"charge_flat_fee_run_invoiced_usages\" ADD COLUMN \"line_id\" character(26) NULL, ADD COLUMN \"mutable\" boolean NOT NULL DEFAULT false;\nALTER TABLE \"charge_flat_fee_run_invoiced_usages\" ALTER COLUMN \"mutable\" DROP DEFAULT;\nALTER TABLE \"charge_flat_fee_run_invoiced_usages\" ADD CONSTRAINT \"charge_flat_fee_run_invoiced_usages_billing_invoice_lines_charg\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- reverse: modify \"charge_flat_fee_runs\" table\nALTER TABLE \"charge_flat_fee_runs\" DROP COLUMN \"no_fiat_transaction_required\", DROP COLUMN \"invoice_id\", DROP COLUMN \"line_id\";", + "symbols": [], + "line_count": 13 + }, + "tools/migrate/migrations/20260512114051_flatfee_run_domain_fields.up.sql": { + "header": "-- modify \"charge_flat_fee_runs\" table\nALTER TABLE \"charge_flat_fee_runs\" ADD COLUMN \"line_id\" character(26) NULL, ADD COLUMN \"invoice_id\" character(26) NULL, ADD COLUMN \"no_fiat_transaction_required\" boolean NULL;\n\nUPDATE \"charge_flat_fee_runs\" AS \"r\"\nSET \"no_fiat_transaction_required\" = true;\n\nALTER TABLE \"charge_flat_fee_runs\" ALTER COLUMN \"no_fiat_transaction_required\" SET NOT NULL;\n\n-- modify \"charge_flat_fee_run_invoiced_usages\" table\nALTER TABLE \"charge_flat_fee_run_invoiced_usages\" DROP CONSTRAINT \"charge_flat_fee_run_invoiced_usages_billing_invoice_lines_charg\", DROP COLUMN \"line_id\", DROP COLUMN \"mutable\";\n-- modify \"charge_usage_based_run_invoiced_usages\" table\nALTER TABLE \"charge_usage_based_run_invoiced_usages\" DROP COLUMN \"line_id\", DROP COLUMN \"mutable\";\n\nALTER TABLE \"charge_flat_fee_runs\" ADD CONSTRAINT \"charge_flat_fee_runs_billing_invoice_lines_charge_flat_fee_runs\" FOREIGN KEY (\"line_id\") REFERENCES \"billing_invoice_lines\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL, ADD CONSTRAINT \"charge_flat_fee_runs_billing_invoices_charge_flat_fee_runs\" FOREIGN KEY (\"invoice_id\") REFERENCES \"billing_invoices\" (\"id\") ON UPDATE NO ACTION ON DELETE SET NULL;\n-- create index \"charge_flat_fee_runs_line_id_key\" to table: \"charge_flat_fee_runs\"\nCREATE UNIQUE INDEX \"charge_flat_fee_runs_line_id_key\" ON \"charge_flat_fee_runs\" (\"line_id\");", + "symbols": [], + "line_count": 16 + }, + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.down.sql": { + "header": "UPDATE\n \"ledger_transactions\" AS tx\nSET\n \"annotations\" = jsonb_set(\n tx.\"annotations\" - 'ledger.transaction.template_code',\n '{ledger.transaction.template_name}',\n to_jsonb(mapping.legacy_name::text),\n true\n )\nFROM (\n VALUES\n ('customer.receivable.issue', 'IssueCustomerReceivableTemplate'),\n ('customer.receivable.payment.authorize', 'AuthorizeCustomerReceivablePaymentTemplate'),\n ('customer.receivable.payment.settle', 'SettleCustomerReceivableFromPaymentTemplate'),\n ('customer.receivable.advance.attribute', 'AttributeCustomerAdvanceReceivableCostBasisTemplate'),\n ('customer.receivable.cover', 'CoverCustomerReceivableTemplate'),\n ('customer.fbo.collect', 'TransferCustomerFBOToAccruedTemplate'),\n ('customer.fbo.advance.collect', 'TransferCustomerFBOAdvanceToAccruedTemplate'),\n ('customer.receivable.collect', 'TransferCustomerReceivableToAccruedTemplate'),\n ('customer.accrued.cost_basis.translate', 'TranslateCustomerAccruedCostBasisTemplate'),", + "symbols": [], + "line_count": 25 + }, + "tools/migrate/migrations/20260513072457_ledger_transaction_template_codes.up.sql": { + "header": "UPDATE\n \"ledger_transactions\" AS tx\nSET\n \"annotations\" = jsonb_set(\n tx.\"annotations\" - 'ledger.transaction.template_name',\n '{ledger.transaction.template_code}',\n to_jsonb(mapping.template_code::text),\n true\n )\nFROM (\n VALUES\n ('IssueCustomerReceivableTemplate', 'customer.receivable.issue'),\n ('AuthorizeCustomerReceivablePaymentTemplate', 'customer.receivable.payment.authorize'),\n ('SettleCustomerReceivableFromPaymentTemplate', 'customer.receivable.payment.settle'),\n ('AttributeCustomerAdvanceReceivableCostBasisTemplate', 'customer.receivable.advance.attribute'),\n ('CoverCustomerReceivableTemplate', 'customer.receivable.cover'),\n ('TransferCustomerFBOToAccruedTemplate', 'customer.fbo.collect'),\n ('TransferCustomerFBOAdvanceToAccruedTemplate', 'customer.fbo.advance.collect'),\n ('TransferCustomerReceivableToAccruedTemplate', 'customer.receivable.collect'),\n ('TranslateCustomerAccruedCostBasisTemplate', 'customer.accrued.cost_basis.translate'),", + "symbols": [], + "line_count": 25 + }, + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.down.sql": { + "header": "-- reverse: modify \"charge_flat_fee_runs\" table\nALTER TABLE \"charge_flat_fee_runs\" DROP COLUMN \"immutable\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260513083018_add_flat_fee_run_immutable.up.sql": { + "header": "-- modify \"charge_flat_fee_runs\" table\nALTER TABLE \"charge_flat_fee_runs\" ADD COLUMN \"immutable\" boolean NULL;\n\nUPDATE \"charge_flat_fee_runs\"\nSET \"immutable\" = false\nWHERE \"immutable\" IS NULL;\n\nALTER TABLE \"charge_flat_fee_runs\" ALTER COLUMN \"immutable\" SET NOT NULL;", + "symbols": [], + "line_count": 8 + }, + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.down.sql": { + "header": "-- reverse: create index \"appcustominvoicingcustomer_namespace_app_id_customer_id\" to table: \"app_custom_invoicing_customers\"\nDROP INDEX \"appcustominvoicingcustomer_namespace_app_id_customer_id\";\n-- reverse: drop index \"appcustominvoicingcustomer_namespace_app_id_customer_id\" from table: \"app_custom_invoicing_customers\"\nCREATE UNIQUE INDEX \"appcustominvoicingcustomer_namespace_app_id_customer_id\" ON \"app_custom_invoicing_customers\" (\"namespace\", \"app_id\", \"customer_id\");", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260513120726_add_app_custom_invoicing_customers_partial_unique_indexes.up.sql": { + "header": "-- drop index \"appcustominvoicingcustomer_namespace_app_id_customer_id\" from table: \"app_custom_invoicing_customers\"\nDROP INDEX \"appcustominvoicingcustomer_namespace_app_id_customer_id\";\n-- create index \"appcustominvoicingcustomer_namespace_app_id_customer_id\" to table: \"app_custom_invoicing_customers\"\nCREATE UNIQUE INDEX \"appcustominvoicingcustomer_namespace_app_id_customer_id\" ON \"app_custom_invoicing_customers\" (\"namespace\", \"app_id\", \"customer_id\") WHERE (deleted_at IS NULL);", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.down.sql": { + "header": "-- reverse: create index \"ledgerentry_transaction_id_sub_account_id_identity_key\" to table: \"ledger_entries\"\nDROP INDEX \"ledgerentry_transaction_id_sub_account_id_identity_key\";\n-- reverse: modify \"ledger_entries\" table\nALTER TABLE \"ledger_entries\" DROP COLUMN \"identity_key\";", + "symbols": [], + "line_count": 4 + }, + "tools/migrate/migrations/20260514084134_add_ledger_entry_identity_key.up.sql": { + "header": "-- modify \"ledger_entries\" table\nALTER TABLE \"ledger_entries\" ADD COLUMN \"identity_key\" character varying NOT NULL DEFAULT '';\n-- create index \"ledgerentry_transaction_id_sub_account_id_identity_key\" to table: \"ledger_entries\"\n-- atlas:nolint MF101\nCREATE UNIQUE INDEX \"ledgerentry_transaction_id_sub_account_id_identity_key\" ON \"ledger_entries\" (\"transaction_id\", \"sub_account_id\", \"identity_key\");", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.down.sql": { + "header": "-- reverse: create index \"ledgerbreakagerecord_namespace_source_transaction_group_id\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace_source_transaction_group_id\";\n-- reverse: create index \"ledgerbreakagerecord_namespace_source_entry_id\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace_source_entry_id\";\n-- reverse: create index \"ledgerbreakagerecord_namespace_plan_id\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace_plan_id\";\n-- reverse: create index \"ledgerbreakagerecord_namespace_customer_id_currency_credit_\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace_customer_id_currency_credit_\";\n-- reverse: create index \"ledgerbreakagerecord_namespace_breakage_transaction_group_id\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace_breakage_transaction_group_id\";\n-- reverse: create index \"ledgerbreakagerecord_namespace\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_namespace\";\n-- reverse: create index \"ledgerbreakagerecord_id\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_id\";\n-- reverse: create index \"ledgerbreakagerecord_annotations\" to table: \"ledger_breakage_records\"\nDROP INDEX \"ledgerbreakagerecord_annotations\";\n-- reverse: create \"ledger_breakage_records\" table\nDROP TABLE \"ledger_breakage_records\";\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"expires_at\";", + "symbols": [], + "line_count": 20 + }, + "tools/migrate/migrations/20260517121831_add_credit_expiration_breakage.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"expires_at\" timestamptz NULL;\n-- create \"ledger_breakage_records\" table\nCREATE TABLE \"ledger_breakage_records\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"annotations\" jsonb NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"kind\" character varying NOT NULL,\n \"amount\" numeric NOT NULL,\n \"customer_id\" character(26) NOT NULL,\n \"currency\" character varying(3) NOT NULL,\n \"credit_priority\" bigint NOT NULL,\n \"expires_at\" timestamptz NOT NULL,\n \"source_kind\" character varying NOT NULL,\n \"source_transaction_group_id\" character(26) NULL,\n \"source_transaction_id\" character(26) NULL,\n \"source_entry_id\" character(26) NULL,", + "symbols": [], + "line_count": 44 + }, + "tools/migrate/migrations/20260519132345_reset-sync-state.down.sql": { + "header": "", + "symbols": [], + "line_count": 0 + }, + "tools/migrate/migrations/20260519132345_reset-sync-state.up.sql": { + "header": "-- force sync all subscriptions\nDELETE FROM \"subscription_billing_sync_states\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.down.sql": { + "header": "-- Intentionally no-op.\n--\n-- This repair migration only makes schema from earlier migrations present when\n-- those earlier versions were skipped by already-migrated production databases.\n-- Dropping these objects on rollback would remove schema that may have been\n-- created by the original migrations on healthy databases.", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/migrations/20260520130000_repair_rebased_migrations.up.sql": { + "header": "-- Repair migrations that may have been skipped on production databases because\n-- their version numbers were lower than migrations already applied after a rebase.\n--\n-- This intentionally excludes 20260326000000_llmcost_normalize_providers.\n\n-- 20260428102826_add_tax_codes_to_charges\nALTER TABLE \"charge_credit_purchases\"\n ADD COLUMN IF NOT EXISTS \"tax_behavior\" character varying NULL,\n ADD COLUMN IF NOT EXISTS \"tax_code_id\" character(26) NULL;\n\nALTER TABLE \"charge_flat_fees\"\n ADD COLUMN IF NOT EXISTS \"tax_behavior\" character varying NULL,\n ADD COLUMN IF NOT EXISTS \"tax_code_id\" character(26) NULL;\n\nALTER TABLE \"charge_usage_based\"\n ADD COLUMN IF NOT EXISTS \"tax_behavior\" character varying NULL,\n ADD COLUMN IF NOT EXISTS \"tax_code_id\" character(26) NULL;\n\nDO $$\nBEGIN", + "symbols": [], + "line_count": 133 + }, + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.down.sql": { + "header": "-- reverse: modify \"ledger_sub_account_routes\" table\n-- Fail loudly if V2 routing rows exist. Dropping tax_behavior while V2 routing keys\n-- remain would leave rows whose routing_key references a dimension no longer stored\n-- in the table.\nDO $$\nBEGIN\n IF EXISTS (\n SELECT 1 FROM ledger_sub_account_routes\n WHERE routing_key_version = 'v2'\n ) THEN\n RAISE EXCEPTION 'cannot rollback: V2 routing key rows exist; downgrade routes first';\n END IF;\nEND $$;\n\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"tax_behavior\";", + "symbols": [], + "line_count": 15 + }, + "tools/migrate/migrations/20260520130500_add_ledger_tax_behavior.up.sql": { + "header": "-- modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" ADD COLUMN \"tax_behavior\" character varying NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.down.sql": { + "header": "-- Intentionally no-op.\n--\n-- This migration soft-deletes duplicate tax_codes rows and repoints all\n-- tax_code_id FK columns from losers to winners. Rolling back would require\n-- restoring the soft-deleted losers and re-pointing every FK back \u2014 but the\n-- original loser IDs are no longer stored anywhere, and re-introducing them\n-- would leave the FK columns pointing at rows that may have been deleted for\n-- other reasons. The dedup is a one-way data cleanup; re-running the migration\n-- on a clean database is a no-op (the temp table will be empty).", + "symbols": [], + "line_count": 9 + }, + "tools/migrate/migrations/20260527120000_dedupe_tax_codes_by_app_mapping.up.sql": { + "header": "-- Deduplicate tax_codes rows that share the same Stripe app_mapping content.\n--\n-- Two write paths can produce duplicate (namespace, app_type, app_tax_code) groups:\n-- the OSS seeder (system-managed keys like \"saas_business\") and the dual-write path\n-- GetOrCreateByAppMapping (auto-keyed as \"stripe_txcd_XXXXXXXX\"). The read-side\n-- tie-break already returns the right row, but duplicate rows remain on disk and\n-- downstream tax_code_id FK columns may still point at losers. This migration\n-- soft-deletes every loser and repoints all FKs to the winner in one transaction.\n\nBEGIN;\n\n-- Step 1: materialise loser \u2192 winner pairs into a temp table.\n-- Winner selection mirrors the read-side tie-break: system-managed rows first,\n-- then oldest created_at, then smallest id.\nDROP TABLE IF EXISTS _tax_code_dedup_map;\nCREATE TEMP TABLE _tax_code_dedup_map AS\nWITH expanded AS (\n SELECT\n t.id,\n t.namespace,", + "symbols": [], + "line_count": 188 + }, + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.down.sql": { + "header": "-- reverse: modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"features\", ADD COLUMN \"features\" jsonb NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260604143000_ledger_route_features_text_array.up.sql": { + "header": "-- modify \"ledger_sub_account_routes\" table\nALTER TABLE \"ledger_sub_account_routes\" DROP COLUMN \"features\", ADD COLUMN \"features\" text[] NULL;", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.down.sql": { + "header": "-- reverse: modify \"credit_realization_lineages\" table\nALTER TABLE \"credit_realization_lineages\" DROP COLUMN \"advance_features\";\n\n-- reverse: modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" DROP COLUMN \"feature_filters\";", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql": { + "header": "-- modify \"charge_credit_purchases\" table\nALTER TABLE \"charge_credit_purchases\" ADD COLUMN \"feature_filters\" text[] NULL;\n\n-- modify \"credit_realization_lineages\" table\nALTER TABLE \"credit_realization_lineages\" ADD COLUMN \"advance_features\" text[] NULL;", + "symbols": [], + "line_count": 5 + }, + "tools/migrate/productcatalog_test.go": { + "header": "\t\"database/sql\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "func", + "name": "TestStartAfterChange", + "signature": "func TestStartAfterChange(t *testing.T)", + "line": 15 + }, + { + "kind": "func", + "name": "TestPlanBillingCadenceProRatingMigration", + "signature": "func TestPlanBillingCadenceProRatingMigration(t *testing.T)", + "line": 63 + }, + { + "kind": "func", + "name": "TestSubscriptionBillingCadenceProRatingMigration", + "signature": "func TestSubscriptionBillingCadenceProRatingMigration(t *testing.T)", + "line": 618 + } + ], + "line_count": 1159 + }, + "tools/migrate/testdata/ignore/20240826120919_init.down.sql": { + "header": "-- reverse: create index \"feature_namespace_id\" to table: \"features\"\nDROP INDEX \"feature_namespace_id\";\n-- reverse: create index \"feature_id\" to table: \"features\"\nDROP INDEX \"feature_id\";\n-- reverse: create \"features\" table\nDROP TABLE \"features\";", + "symbols": [], + "line_count": 6 + }, + "tools/migrate/testdata/ignore/20240826120919_init.up.sql": { + "header": "-- create \"features\" table\nCREATE TABLE \"features\" (\n \"id\" character(26) NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"namespace\" character varying NOT NULL,\n \"name\" character varying NOT NULL,\n \"key\" character varying NOT NULL,\n \"meter_slug\" character varying NULL,\n \"meter_group_by_filters\" jsonb NULL,\n \"archived_at\" timestamptz NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"feature_id\" to table: \"features\"\nCREATE INDEX \"feature_id\" ON \"features\" (\"id\");\n-- create index \"feature_namespace_id\" to table: \"features\"\nCREATE INDEX \"feature_namespace_id\" ON \"features\" (\"namespace\", \"id\");", + "symbols": [], + "line_count": 19 + }, + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.down.sql": { + "header": "-- migration:ignore\n-- reverse: create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nDROP INDEX \"entitlement_current_usage_period_end_deleted_at\";", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/testdata/ignore/20240903155435_entitlement-expired-index.up.sql": { + "header": "-- migration:ignore\n-- create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nCREATE INDEX \"entitlement_current_usage_period_end_deleted_at\" ON \"entitlements\" (\"current_usage_period_end\", \"deleted_at\");", + "symbols": [], + "line_count": 3 + }, + "tools/migrate/testdata/ignore/20240917172257_billing-entities.down.sql": { + "header": "-- reverse: create index \"billinginvoiceitem_namespace_invoice_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_invoice_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_customer_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_customer_id\";\n-- reverse: create index \"billinginvoiceitem_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_id\";\n-- reverse: create \"billing_invoice_items\" table\nDROP TABLE \"billing_invoice_items\";\n-- reverse: create index \"billinginvoice_namespace_status\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_status\";\n-- reverse: create index \"billinginvoice_namespace_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_id\";\n-- reverse: create index \"billinginvoice_namespace_customer_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_customer_id\";\n-- reverse: create index \"billinginvoice_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_id\";\n-- reverse: create \"billing_invoices\" table\nDROP TABLE \"billing_invoices\";", + "symbols": [], + "line_count": 36 + }, + "tools/migrate/testdata/ignore/20240917172257_billing-entities.up.sql": { + "header": "-- create \"billing_workflow_configs\" table\nCREATE TABLE \"billing_workflow_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"alignment\" character varying NOT NULL,\n \"collection_period_seconds\" bigint NOT NULL,\n \"invoice_auto_advance\" boolean NOT NULL,\n \"invoice_draft_period_seconds\" bigint NOT NULL,\n \"invoice_due_after_seconds\" bigint NOT NULL,\n \"invoice_collection_method\" character varying NOT NULL,\n \"invoice_line_item_resolution\" character varying NOT NULL,\n \"invoice_line_item_per_subject\" boolean NOT NULL DEFAULT false,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billingworkflowconfig_id\" to table: \"billing_workflow_configs\"\nCREATE INDEX \"billingworkflowconfig_id\" ON \"billing_workflow_configs\" (\"id\");\n-- create index \"billingworkflowconfig_namespace_id\" to table: \"billing_workflow_configs\"", + "symbols": [], + "line_count": 108 + }, + "tools/migrate/testdata/noignore/20240826120919_init.down.sql": { + "header": "-- reverse: create index \"usagereset_namespace_entitlement_id_reset_time\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_namespace_entitlement_id_reset_time\";\n-- reverse: create index \"usagereset_namespace_entitlement_id\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_namespace_entitlement_id\";\n-- reverse: create index \"usagereset_id\" to table: \"usage_resets\"\nDROP INDEX \"usagereset_id\";\n-- reverse: create \"usage_resets\" table\nDROP TABLE \"usage_resets\";\n-- reverse: create \"notification_event_delivery_status_events\" table\nDROP TABLE \"notification_event_delivery_status_events\";\n-- reverse: create index \"notificationevent_namespace_type\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_namespace_type\";\n-- reverse: create index \"notificationevent_namespace_id\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_namespace_id\";\n-- reverse: create index \"notificationevent_id\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_id\";\n-- reverse: create index \"notificationevent_annotations\" to table: \"notification_events\"\nDROP INDEX \"notificationevent_annotations\";\n-- reverse: create \"notification_events\" table\nDROP TABLE \"notification_events\";", + "symbols": [], + "line_count": 84 + }, + "tools/migrate/testdata/noignore/20240826120919_init.up.sql": { + "header": "-- create \"features\" table\nCREATE TABLE \"features\" (\n \"id\" character(26) NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"metadata\" jsonb NULL,\n \"namespace\" character varying NOT NULL,\n \"name\" character varying NOT NULL,\n \"key\" character varying NOT NULL,\n \"meter_slug\" character varying NULL,\n \"meter_group_by_filters\" jsonb NULL,\n \"archived_at\" timestamptz NULL,\n PRIMARY KEY (\"id\")\n);\n-- create index \"feature_id\" to table: \"features\"\nCREATE INDEX \"feature_id\" ON \"features\" (\"id\");\n-- create index \"feature_namespace_id\" to table: \"features\"\nCREATE INDEX \"feature_namespace_id\" ON \"features\" (\"namespace\", \"id\");\n-- create \"entitlements\" table", + "symbols": [], + "line_count": 217 + }, + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.down.sql": { + "header": "-- reverse: create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nDROP INDEX \"entitlement_current_usage_period_end_deleted_at\";", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/testdata/noignore/20240903155435_entitlement-expired-index.up.sql": { + "header": "-- create index \"entitlement_current_usage_period_end_deleted_at\" to table: \"entitlements\"\nCREATE INDEX \"entitlement_current_usage_period_end_deleted_at\" ON \"entitlements\" (\"current_usage_period_end\", \"deleted_at\");", + "symbols": [], + "line_count": 2 + }, + "tools/migrate/testdata/noignore/20240917172257_billing-entities.down.sql": { + "header": "-- reverse: create index \"billinginvoiceitem_namespace_invoice_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_invoice_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_id\";\n-- reverse: create index \"billinginvoiceitem_namespace_customer_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_namespace_customer_id\";\n-- reverse: create index \"billinginvoiceitem_id\" to table: \"billing_invoice_items\"\nDROP INDEX \"billinginvoiceitem_id\";\n-- reverse: create \"billing_invoice_items\" table\nDROP TABLE \"billing_invoice_items\";\n-- reverse: create index \"billinginvoice_namespace_status\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_status\";\n-- reverse: create index \"billinginvoice_namespace_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_id\";\n-- reverse: create index \"billinginvoice_namespace_customer_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_namespace_customer_id\";\n-- reverse: create index \"billinginvoice_id\" to table: \"billing_invoices\"\nDROP INDEX \"billinginvoice_id\";\n-- reverse: create \"billing_invoices\" table\nDROP TABLE \"billing_invoices\";", + "symbols": [], + "line_count": 36 + }, + "tools/migrate/testdata/noignore/20240917172257_billing-entities.up.sql": { + "header": "-- create \"billing_workflow_configs\" table\nCREATE TABLE \"billing_workflow_configs\" (\n \"id\" character(26) NOT NULL,\n \"namespace\" character varying NOT NULL,\n \"created_at\" timestamptz NOT NULL,\n \"updated_at\" timestamptz NOT NULL,\n \"deleted_at\" timestamptz NULL,\n \"alignment\" character varying NOT NULL,\n \"collection_period_seconds\" bigint NOT NULL,\n \"invoice_auto_advance\" boolean NOT NULL,\n \"invoice_draft_period_seconds\" bigint NOT NULL,\n \"invoice_due_after_seconds\" bigint NOT NULL,\n \"invoice_collection_method\" character varying NOT NULL,\n \"invoice_line_item_resolution\" character varying NOT NULL,\n \"invoice_line_item_per_subject\" boolean NOT NULL DEFAULT false,\n PRIMARY KEY (\"id\")\n);\n-- create index \"billingworkflowconfig_id\" to table: \"billing_workflow_configs\"\nCREATE INDEX \"billingworkflowconfig_id\" ON \"billing_workflow_configs\" (\"id\");\n-- create index \"billingworkflowconfig_namespace_id\" to table: \"billing_workflow_configs\"", + "symbols": [], + "line_count": 108 + }, + "tools/migrate/testdata/sqlcgen/README.md": { + "header": "# Migration test data generation\n\nGiven migrations depend on many entities (such as customer, billing profile, subscription etc.), it's easier to generate data using tests. This guide shows how we can create testcases based on sql dumps for faster validation.\n\nWe cannot use ent here, as the schema evolves, so we need a point-in-time snapshot. SQLC is a great codegenerator to generate ad-hoc queries, that we can persist to the db.\n\nSQLC requires the DB schema to generate the queries, for now, I would just commit those alongside the tests in case we would need to tweak the test to understand what have happened with a faulty migration.\n\n## Quick Start (Automated)\n\nFor a quick and automated way to generate SQLC testdata for any migration version, you can use the new make command:\n\n```bash\nmake generate-sqlc-testdata VERSION=20240826120919\n```\n\nThis command will:\n1. Run the specified migration version against a fresh PostgreSQL database\n2. Generate a schema dump using `pg_dump`\n3. Create the proper SQLC configuration and placeholder queries", + "symbols": [], + "line_count": 114 + }, + "tools/migrate/view_parity_test.go": { + "header": "\t\"database/sql\"\n\t\"errors\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "viewColumn", + "signature": "type viewColumn struct", + "line": 27 + }, + { + "kind": "func", + "name": "stripSQLLineComments", + "signature": "func stripSQLLineComments(sqlText string) string", + "line": 34 + }, + { + "kind": "func", + "name": "parseExpectedViews", + "signature": "func parseExpectedViews(schemaSQL string) (map[string]string, error)", + "line": 49 + }, + { + "kind": "func", + "name": "normalizeViewSQL", + "signature": "func normalizeViewSQL(s string) string", + "line": 73 + }, + { + "kind": "func", + "name": "stripViewStatements", + "signature": "func stripViewStatements(sqlText string) string", + "line": 83 + }, + { + "kind": "func", + "name": "buildMigrationsWithoutViews", + "signature": "func buildMigrationsWithoutViews(cfg migrate.MigrationsConfig) (migrate.MigrationsConfig, error)", + "line": 105 + }, + { + "kind": "func", + "name": "newMigratorForTest", + "signature": "func newMigratorForTest(t *testing.T, connectionString string, cfg migrate.MigrationsConfig) *migrate.Migrate", + "line": 149 + }, + { + "kind": "func", + "name": "loadPublicViewDefinition", + "signature": "func loadPublicViewDefinition(t *testing.T, db *sql.DB, viewName string) string", + "line": 162 + }, + { + "kind": "func", + "name": "loadPublicViewColumns", + "signature": "func loadPublicViewColumns(t *testing.T, db *sql.DB, viewName string) []viewColumn", + "line": 179 + }, + { + "kind": "func", + "name": "applyGeneratedViews", + "signature": "func applyGeneratedViews(t *testing.T, db *sql.DB)", + "line": 204 + }, + { + "kind": "func", + "name": "TestViewDefinitionsMatchGeneratedSchemaSQL", + "signature": "func TestViewDefinitionsMatchGeneratedSchemaSQL(t *testing.T)", + "line": 217 + } + ], + "line_count": 272 + }, + "tools/migrate/viewgen/viewgen.go": { + "header": "\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"", + "symbols": [ + { + "kind": "struct", + "name": "ViewDef", + "signature": "type ViewDef struct", + "line": 22 + }, + { + "kind": "func", + "name": "GenerateSQL", + "signature": "func GenerateSQL(schemaPath string) ([]byte, error)", + "line": 27 + }, + { + "kind": "func", + "name": "GenerateFile", + "signature": "func GenerateFile(schemaPath, outPath string) error", + "line": 41 + }, + { + "kind": "func", + "name": "CollectViews", + "signature": "func CollectViews(schemas []*load.Schema, dialectName string) ([]ViewDef, error)", + "line": 58 + }, + { + "kind": "func", + "name": "RenderSQL", + "signature": "func RenderSQL(views []ViewDef) []byte", + "line": 103 + }, + { + "kind": "func", + "name": "entSQLAnnotation", + "signature": "func entSQLAnnotation(annotations map[string]any) (*entsql.Annotation, error)", + "line": 117 + } + ], + "line_count": 134 + }, + "tools/migrate/views.sql": { + "header": "-- Code generated by viewgen, DO NOT EDIT.\n-- Regenerate with: make generate-view-sql\nCREATE VIEW \"charges_search_v1s\" AS\nSELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'credit_purchase' AS \"type\" FROM \"charge_credit_purchases\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'flat_fee' AS \"type\" FROM \"charge_flat_fees\" UNION ALL SELECT \"id\", \"namespace\", \"metadata\", \"created_at\", \"updated_at\", \"deleted_at\", \"name\", \"description\", \"annotations\", \"customer_id\", \"service_period_from\", \"service_period_to\", \"billing_period_from\", \"billing_period_to\", \"full_service_period_from\", \"full_service_period_to\", \"status\", \"unique_reference_id\", \"currency\", \"managed_by\", \"subscription_id\", \"subscription_phase_id\", \"subscription_item_id\", \"advance_after\", \"tax_code_id\", \"tax_behavior\", 'usage_based' AS \"type\" FROM \"charge_usage_based\";", + "symbols": [], + "line_count": 4 + }, + "tools/wait-for-compose.sh": { + "header": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Wait for docker compose services to be healthy (or if no health check is available, just running)\n#\n# Usage:\n# ./tools/wait-for-compose.sh postgres svix redis\n#\n\n# Get the container ID for the service\nCONTAINER_IDS=$(docker compose ps -q \"$@\")\nif [[ -z \"$CONTAINER_IDS\" ]]; then\n echo \"Error: Could not find container ids.\"\n exit 1\nfi\n\ncheckServices() {\n for CONTAINER_ID in $@; do\n STATUS=\"$(docker inspect --format='{{.State.Health.Status}}' \"$CONTAINER_ID\" 2>/dev/null || true)\"\n SERVICE_NAME=\"$(docker inspect --format='{{.Name}}' \"$CONTAINER_ID\" 2>/dev/null | sed 's|^/||')\"", + "symbols": [], + "line_count": 57 + } +} \ No newline at end of file diff --git a/.archie/telemetry/deep-scan_2026-06-05T172925Z.json b/.archie/telemetry/deep-scan_2026-06-05T172925Z.json new file mode 100644 index 0000000000..4c69e0cf9a --- /dev/null +++ b/.archie/telemetry/deep-scan_2026-06-05T172925Z.json @@ -0,0 +1,140 @@ +{ + "command": "deep-scan", + "cli": "claude", + "meta": { + "depth": "comprehensive" + }, + "started_at": "2026-06-05T13:01:02Z", + "completed_at": "2026-06-05T17:29:09Z", + "total_seconds": 16434, + "project": { + "source_files": 0, + "total_loc": 0, + "directories": 0 + }, + "steps": [ + { + "step": 1, + "key": "scan", + "name": "Scanner", + "seconds": 15 + }, + { + "step": 2, + "key": "read", + "name": "Read prior knowledge", + "seconds": 46 + }, + { + "step": 3, + "key": "wave1", + "name": "Wave 1 \u2014 fact agents", + "seconds": 1166, + "model": "gpt-5", + "sub_agents": [ + { + "key": "data", + "name": "Data", + "seconds": 1056 + }, + { + "key": "patterns", + "name": "Patterns", + "seconds": 407 + }, + { + "key": "structure", + "name": "Structure", + "seconds": 0 + }, + { + "key": "technology", + "name": "Technology", + "seconds": 412 + }, + { + "key": "ui", + "name": "UI Layer", + "seconds": 1166 + } + ] + }, + { + "step": 4, + "key": "wave1", + "name": "Wave 1 \u2014 fact agents", + "seconds": 43 + }, + { + "step": 5, + "key": "wave1", + "name": "Wave 1 \u2014 fact agents", + "seconds": 628, + "data_models_count": 74, + "persistence_stores_count": 4 + }, + { + "step": 6, + "key": "merge", + "name": "Wave 1 merge", + "seconds": 5 + }, + { + "step": 7, + "key": "wave2_synthesis", + "name": "Wave 2 \u2014 reasoning", + "seconds": 960, + "model": "gpt-5", + "sub_agents": [ + { + "key": "design", + "name": "Design", + "seconds": 818 + }, + { + "key": "overview", + "name": "Overview", + "seconds": 84 + }, + { + "key": "risk", + "name": "Risk", + "seconds": 487 + } + ] + }, + { + "step": 8, + "key": "rule_synthesis", + "name": "Rule synthesis", + "seconds": 717, + "model": "gpt-5" + }, + { + "step": 9, + "key": "intent_layer", + "name": "Intent Layer", + "seconds": 3868, + "model": "gpt-5", + "skipped": false + }, + { + "step": 10, + "key": "cleanup", + "name": "Cleanup", + "seconds": 1 + }, + { + "step": 11, + "key": "drift", + "name": "Drift & assessment", + "seconds": 8338 + }, + { + "step": 12, + "key": "drift", + "name": "Drift & assessment", + "seconds": 647 + } + ] +} \ No newline at end of file diff --git a/.archie/verdicts.json b/.archie/verdicts.json new file mode 100644 index 0000000000..72a9047813 --- /dev/null +++ b/.archie/verdicts.json @@ -0,0 +1,70 @@ +{ + "verdicts": [ + { + "id": "f_0009", + "verdict": "keep", + "confidence": 0.95, + "reason": "The quoted code at line 240 exists exactly as cited. providerError() receives no context parameter, so UpdateAppStatus gets context.Background() on every Stripe 401, severing cancellation and trace propagation from the caller's request context. All callers (DeleteWebhook, GetAccount, GetPaymentMethod) receive ctx but cannot pass it through because providerError() takes no context parameter. This is a real violation of the AGENTS.md rule against context.Background() sidesteps, and the failure mode (writes executing outside the caller's transaction/trace/cancellation) is genuine." + }, + { + "id": "f_0011", + "verdict": "keep", + "confidence": 0.85, + "reason": "The quoted code exists at customer.go:58-60; the v3 list handler applies filter.ApplyToQuery to input.Name/PrimaryEmail/Key fields, which per AGENTS.md compile to leading-wildcard ILIKE that cannot use plain btree indexes, causing sequential scans; the handler is wired into the live server and the issue is explicitly documented as a pg_trgm GIN index TODO in the codebase." + }, + { + "id": "f_0006", + "verdict": "keep", + "confidence": 0.88, + "reason": "The quoted call site exists at cmd/billing-worker/main.go:81-87; billing-worker calls EnsureBusinessAccounts without registering any namespace handlers (unlike cmd/server which registers LedgerNamespaceHandler/KafkaIngestNamespaceHandler before initNamespace), creating an unguarded startup dependency: if billing-worker starts before cmd/server has provisioned the default namespace via handlers, the call will fail trying to access uninitialized namespace-specific ledger state." + }, + { + "id": "f_0012", + "verdict": "demote", + "confidence": 0.95, + "reason": "The code and pattern are real: SetSchemaLevel is called at line 58 of gatheringinvoice.go, and the discriminator-based dual-write logic across schema level and deprecated columns does exist. However, this is already explicitly documented in .claude/rules/pitfalls.md as an acknowledged in-flight schema-migration technical debt with a documented fix direction, not a newly discovered architectural problem." + }, + { + "id": "f_0003", + "verdict": "keep", + "confidence": 0.75, + "reason": "The triggering call site exists: grouphandler.go:54 returns nil (ACK + discard) when eventName has no registered handler; the codebase does use EventVersionSubsystem prefixes for versioning and independent producers (billing/worker, entitlement/balanceworker) emit events asynchronously; AGENTS.md confirms a /notification skill addresses payload versioning, indicating this is a known concern. The pattern enables silent message loss on version mismatch during rolling deploys or concurrent version increments, but without seeing actual event type definitions and version schemes, confidence is medium-high rather than absolute." + }, + { + "id": "f_0005", + "verdict": "keep", + "confidence": 0.95, + "reason": "The quoted code at openmeter/server/server.go:222 exists and truly uses context.Background() in the oapimiddleware ErrorHandler callback, severing request-scoped context (request-id, OTel span) from OpenAPI validation-failure RFC 7807 responses; the library's ErrorHandler signature precludes passing the request, making this a real violation of the context-propagation rule, though fixing it would require either wrapping the middleware or switching validation error handling." + }, + { + "id": "f_0010", + "verdict": "keep", + "confidence": 0.88, + "reason": "The quoted code exists exactly as cited; cmd/billing-worker calls EnsureBusinessAccounts and SandboxProvisioner in main.go:86 and main.go:93 without registering namespace handlers, creating an undocumented implicit ordering dependency on cmd/server running first, which is not enforced in code or validated at deployment time." + }, + { + "id": "f_0007", + "verdict": "keep", + "confidence": 0.85, + "reason": "Hook providers (NewCustomerLedgerServiceHook, NewCustomerSubjectServiceHook, NewCustomerEntitlementValidatorServiceHook) call RegisterHooks as side-effects within their construction, but are not included in the Customer wire.NewSet and have no other transitive dependents visible; Wire will not instantiate them unless explicitly required by another provider, silently skipping hook registration with no compile error if they are omitted from a binary's wire.Build." + }, + { + "id": "f_0008", + "verdict": "demote", + "confidence": 0.85, + "reason": "The quoted code exists and the default case is present, but the failure mode is latent, not current: only two known subsystems (ingest, balance-worker) are checked and both route correctly; the default routing to SystemEventsTopic appears intentional for true system events. The finding describes a future risk ('a new event family that forgets'), not a current misrouting of existing events. This is an architectural pitfall for future extensions, not an active finding." + }, + { + "id": "f_0014", + "verdict": "keep", + "confidence": 0.95, + "reason": "The quoted code exists at the exact cited locations (routes.go:418-420 and 472-474) and unconditionally delegates to api.Unimplemented without any credits.enabled or feature gate check, in stark contrast to sibling operations like GetCustomerCreditBalance (line 372-378) which explicitly guard with `if !s.Credits.Enabled`, making these two operations permanently unavailable to SDK clients despite being in the published TypeSpec/OpenAPI contract." + }, + { + "id": "f_0013", + "verdict": "keep", + "confidence": 0.95, + "reason": "RawEvent struct has ch:\"customer_id\" field but InsertEventsQuery.ToSQL() omits it from Cols() and Values(), and createEventsTable.toSQL() does not Define() it; the IfNotExists() path means this drift is undetected and customer_id values are silently lost at runtime." + } + ] +} \ No newline at end of file diff --git a/.archiebulk b/.archiebulk new file mode 100644 index 0000000000..c79c8c36d9 --- /dev/null +++ b/.archiebulk @@ -0,0 +1,144 @@ +# Archie bulk-content classifier — files that exist but are never read. +# +# Each non-comment line: +# (whitespace-separated, `-` or omitted framework is fine) +# +# Semantics: the scanner records the file's path and tags it with the category +# and framework, but never reads its contents. AI agents get the manifest in +# their inputs and are instructed not to Read these paths. Existence still +# counts toward `frontend_ratio` and similar inventory metrics. +# +# Precedence (most-restrictive wins): .gitignore > .archieignore > .archiebulk +# A path that would be fully ignored by .archieignore stays ignored. +# +# Glob syntax: `**/` matches any depth, `*` matches within a path segment, +# `?` matches a single non-slash char, `[abc]` is a character class. +# +# Categories used by the scanner: +# ui_resource — counts toward `frontend_ratio` numerator (Android res/, iOS storyboards) +# generated — codegen output (.g.dart, .pb.go, .min.js, dist/) +# localization — translation files +# migration — schema migrations +# fixture — test/data fixtures, snapshots +# asset — images, fonts, media (not counted as source shape) +# lockfile — dependency lockfiles (visible inventory, not source shape) +# dependency — vendored third-party code +# data — large data files + +# ── Android ────────────────────────────────────────────────────────── +**/res/layout/** ui_resource android +**/res/layout-*/** ui_resource android +**/res/drawable/** ui_resource android +**/res/drawable-*/** ui_resource android +**/res/menu/** ui_resource android +**/res/values/** ui_resource android +**/res/values-*/** ui_resource android +**/res/navigation/** ui_resource android +**/res/color/** ui_resource android +**/res/anim/** ui_resource android +**/res/animator/** ui_resource android +**/res/xml/** ui_resource android +**/res/font/** asset android +**/res/mipmap-*/** asset android +**/res/raw/** asset android + +# ── iOS / macOS ────────────────────────────────────────────────────── +**/*.storyboard ui_resource ios +**/*.xib ui_resource ios +**/Assets.xcassets/** asset ios +**/*.xcstrings localization ios +**/*.strings localization ios +**/*.stringsdict localization ios + +# ── Flutter / Dart ─────────────────────────────────────────────────── +**/*.g.dart generated flutter +**/*.freezed.dart generated flutter +**/*.mocks.dart generated flutter +**/*.gr.dart generated flutter +**/*.config.dart generated flutter +**/*.arb localization flutter +pubspec.lock lockfile flutter + +# ── JS / TS / Node / React / Vue / Svelte ──────────────────────────── +**/*.min.js generated bundler +**/*.min.css generated bundler +**/*.map generated bundler +**/*.d.ts generated typescript +**/dist/** generated bundler +**/out/** generated bundler +**/.next/** generated nextjs +**/.nuxt/** generated nuxt +**/.svelte-kit/** generated sveltekit +**/storybook-static/** generated storybook +**/coverage/** generated test +**/public/locales/** localization web +**/locales/** localization - +**/i18n/** localization - +**/messages/*.json localization - +**/*.po localization gettext +package-lock.json lockfile node +yarn.lock lockfile node +pnpm-lock.yaml lockfile node +bun.lock lockfile bun +bun.lockb lockfile bun + +# ── Go ─────────────────────────────────────────────────────────────── +**/*.pb.go generated protobuf +**/*_grpc.pb.go generated grpc +**/mocks/mock_*.go generated gomock +**/wire_gen.go generated wire +**/zz_generated_*.go generated kubebuilder +**/*.gen.go generated go +# Ent ORM: everything under ent/db/ is schema-driven codegen. Authoritative +# source is the Ent Schema files in ent/schema/ — those stay visible. Common +# in API-driven Go services; drops ~100 folders + several MB of noise on +# real-sized ent projects. +**/ent/db/** generated go-ent +**/ent[0-9]/db/** generated go-ent +# sqlc output — generated query/models typically live next to a sqlc.yaml +**/*.sql.go generated sqlc +**/vendor/** dependency go +go.sum lockfile go + +# ── Python ─────────────────────────────────────────────────────────── +**/*_pb2.py generated protobuf +**/*_pb2_grpc.py generated grpc +**/migrations/**/*.py migration django +**/alembic/versions/** migration alembic +Pipfile.lock lockfile python +poetry.lock lockfile python +uv.lock lockfile python + +# ── Rust / other ───────────────────────────────────────────────────── +Cargo.lock lockfile rust + +# ── Ruby / PHP ─────────────────────────────────────────────────────── +Gemfile.lock lockfile ruby +composer.lock lockfile php + +# ── Database / SQL ─────────────────────────────────────────────────── +**/db/migrate/** migration rails +**/migrations/**/*.sql migration sql +**/prisma/migrations/** migration prisma +**/supabase/migrations/** migration supabase + +# ── OpenAPI / codegen / GraphQL ────────────────────────────────────── +**/gen/** generated codegen +**/generated/** generated codegen +**/__generated__/** generated graphql +**/*.graphql.ts generated graphql + +# ── Test fixtures / snapshots ──────────────────────────────────────── +**/fixtures/** fixture - +**/seeds/** fixture - +**/testdata/** fixture - +**/snapshots/** fixture test +**/__snapshots__/** fixture jest + +# ── Data ───────────────────────────────────────────────────────────── +**/*.csv data - + +# ── Infra ──────────────────────────────────────────────────────────── +**/.terraform/** generated terraform +.terraform.lock.hcl lockfile terraform +**/charts/**/*.lock lockfile helm diff --git a/.archieignore b/.archieignore new file mode 100644 index 0000000000..838e231862 --- /dev/null +++ b/.archieignore @@ -0,0 +1,85 @@ +# Archie default ignore patterns +# Edit this file to customize what Archie scans +# These patterns are merged with .gitignore + +# Version control +.git/ + +# Dependencies & caches +node_modules/ +__pycache__/ +.venv/ +venv/ +vendor/ +Pods/ +.devenv/ +.swiftpm/ +.pub-cache/ +.dart_tool/ +.ccache/ + +# Build outputs +dist/ +build/ +.build/ +.next/ +.nuxt/ +.svelte-kit/ +DerivedData/ + +# IDE & tooling +.gradle/ +.idea/ +.vscode/ +.turbo/ +.parcel-cache/ +.tox/ +.mypy_cache/ +.pytest_cache/ +.ruff_cache/ +coverage/ +.nyc_output/ + +# CI/CD + security-tool metadata (describes pipelines, not the codebase's +# architecture — framework detection picks up "uses GitHub Actions" without +# needing to read every workflow file) +.github/ +.gitlab/ +.circleci/ +.grype/ +.trivyignore/ + +# Agent-skill installation dirs (Archie and other agent tools sometimes +# install slash commands here via --commands-dir). These are framework +# config, not project source. +.agents/ +.cursor/ + +# Archie internals +.archie/ +.claude/ + +# Binary & media files +*.png +*.jpg +*.jpeg +*.gif +*.ico +*.svg +*.webp +*.mp3 +*.mp4 +*.zip +*.tar +*.gz +*.woff +*.woff2 +*.ttf +*.pdf +*.pyc +*.so +*.dylib +*.dll +*.exe +*.lock +*.sum diff --git a/.claude/rules/architecture.md b/.claude/rules/architecture.md new file mode 100644 index 0000000000..772c74996c --- /dev/null +++ b/.claude/rules/architecture.md @@ -0,0 +1,193 @@ +## Components + +### Server entrypoint & DI bootstrap +- **Location:** `cmd/server` +- **Responsibility:** main() loads config via Viper (with config.DecodeHook), validates it, calls Wire-generated initializeApplication(ctx, conf) to build the full Application graph, then runs app.Migrate(ctx) BEFORE provisioning the default namespace. It registers namespace handlers (app.LedgerNamespaceHandler, app.KafkaIngestNamespaceHandler) prior to initNamespace, constructs a debug.NewDebugConnector wrapping the StreamingConnector, and starts the HTTP server plus telemetry server through oklog/run. Panics are funneled through log.PanicLogger(log.WithExit). +- **Depends on:** app/common, app/config, openmeter/server, openmeter/server/router, openmeter/namespace, openmeter/ingest/kafkaingest, openmeter/debug, pkg/errorsx, pkg/log +- **Key interfaces:** `main` (main) + +### Worker & job entrypoints +- **Location:** `cmd` +- **Responsibility:** Five additional binaries beyond the API server, each with its own main.go repeating the same Viper config-load/validate boilerplate (cmd/server/main.go pattern) and then building a worker-specific Wire application: billing-worker (invoice advancement/collection + subscription→billing reconciliation), balance-worker (entitlement balance snapshotting from usage events), sink-worker (Kafka→ClickHouse usage event sink), notification-service (notification event delivery), and jobs (one-off operational jobs). All share app/config and pkg/log.PanicLogger. +- **Depends on:** app/common, app/config, pkg/log +- **Key interfaces:** `billing-worker main` (main), `balance-worker main` (main), `sink-worker main` (main), `notification-service main` (main), `jobs main` (main) + +### Application wiring (app/common) +- **Location:** `app/common` +- **Responsibility:** The dependency-injection layer. Each file is a Google Wire provider set (wire.NewSet) for one subsystem: billing.go declares BillingRegistry/ChargesRegistry bundling billing.Service plus flatfee/usagebased/creditpurchase/recognizer charge services; ledger.go wires concrete-or-noop ledger account/resolver services gated on credits.enabled; database.go, clickhouse.go, kafka.go, streaming.go provide infra clients; openmeter_server.go / openmeter_billingworker.go / openmeter_sinkworker.go / openmeter_balanceworker.go / openmeter_notification.go assemble per-binary Application structs. Constructor functions take explicit *slog.Logger and config inputs (never slog.Default()). +- **Depends on:** app/config, openmeter/billing, openmeter/billing/charges, openmeter/billing/rating, openmeter/customer, openmeter/ledger, openmeter/meter, openmeter/productcatalog/feature, openmeter/streaming, openmeter/taxcode, openmeter/watermill/eventbus, openmeter/ent/db, pkg/framework/lockr, pkg/featuregate +- **Key interfaces:** `BillingRegistry` (ChargesServiceOrNil), `Billing (wire.NewSet)` (BillingAdapter, NewBillingRatingService, NewLedgerBreakageService, NewBillingRegistry, NewBillingCustomerOverrideService) + +### Billing domain +- **Location:** `openmeter/billing` +- **Responsibility:** Largest domain (41 files in root, 95 in-edges). Root package declares the billing.Service and billing.Adapter interfaces plus invoice/line/profile/customer-override/discount/tax models and the StandardInvoiceHooks. service/ implements billing.Service (struct Service holds adapter, customerService, appService, taxCodeService, ratingService, featureService, meterService, streamingConnector, eventbus.Publisher, an engineRegistry of lineEngines, and an invoicecalc.Calculator) orchestrating the invoice state machine, gathering→standard invoice conversion, line splitting, sequence numbering, and quantity snapshots. adapter/ implements billing.Adapter over Ent with HijackTx/WithTx transaction hijacking. Sub-areas: charges/ (usage-based & flatfee & credit-purchase charge lifecycle state machines), rating/ (pricing engine), worker/ (auto-advance, collect, subscriptionsync reconciliation), lineengine/, validators/, httpdriver/ (legacy v1 HTTP). Uses goderive (derived.gen.go) and goverter. +- **Depends on:** openmeter/app, openmeter/customer, openmeter/meter, openmeter/productcatalog/feature, openmeter/streaming, openmeter/taxcode, openmeter/billing/rating, openmeter/billing/lineengine, openmeter/billing/service/invoicecalc, openmeter/watermill/eventbus, openmeter/ent/db, pkg/framework/transaction, pkg/framework/entutils, pkg/models +- **Key interfaces:** `billing.Service` ((invoice lifecycle, profile, customer-override, gathering & standard invoice, line, sequence, quantity-snapshot operations declared across openmeter/billing/*.go)), `billing.Adapter` (Tx, WithTx, Self), `Config.Validate` (Validate) + +### Charges sub-system +- **Location:** `openmeter/billing/charges` +- **Responsibility:** Usage-based billing charge engine layered under billing. meta/ holds charge-meta queries (39 in-edges); service/ drives charge creation/advancement and the realization runs; usagebased/, flatfee/, creditpurchase/ implement per-charge-type lifecycle state machines; invoiceupdater/, lineage/ link charges back to invoice lines; models/ subpackages (chargemeta, creditrealization, invoicedusage, ledgertransaction, payment) carry value types. Adapter helpers are kept transaction-aware via entutils.TransactingRepo even when handed a raw *entdb.Client. Lifecycle tests drive charges.Service.Create/AdvanceCharges/ApplyPatches. +- **Depends on:** openmeter/billing, openmeter/billing/charges/meta, openmeter/ledger, openmeter/credit, openmeter/ent/db, pkg/framework/entutils +- **Key interfaces:** `charges.Service` (Create, AdvanceCharges, ApplyPatches) + +### Customer domain +- **Location:** `openmeter/customer` +- **Responsibility:** High-fan-in domain (103 in-edges). Root declares customer.Service plus customer model, errors, events, and a requestvalidator. service/ implements the service (with service/hooks for lifecycle hooks); adapter/ is the Ent persistence layer; app/ holds app-integration types; httpdriver/ is the legacy v1 HTTP layer; testutils/ provides shared test fixtures. Consumed by billing, subscription, ledger and the v3 customers handlers. +- **Depends on:** openmeter/ent/db, pkg/framework/entutils, pkg/framework/transaction, pkg/models, pkg/clock +- **Key interfaces:** `customer.Service` ((customer CRUD + lifecycle declared in openmeter/customer/customer.go)) + +### Product catalog domain +- **Location:** `openmeter/productcatalog` +- **Responsibility:** Highest non-pkg fan-in (104 in-edges). Holds plan, addon, planaddon, ratecard, price, discount, tax, feature, and pro-rating value types and rules at the root, with adapter/ (Ent), feature/ (FeatureConnector + FeatureRepo, itself 67 in-edges), featureresolver/, plan/ (service+adapter), addon/, planaddon/, subscription/ (plan→subscription bridge), driver/ + http/ (HTTP), and testutils/. Defines the catalog primitives that subscription, billing, and entitlement build on. +- **Depends on:** openmeter/ent/db, openmeter/meter, pkg/models, pkg/currencyx, pkg/datetime +- **Key interfaces:** `feature.FeatureConnector` ((feature CRUD/query declared in openmeter/productcatalog/feature)), `feature.FeatureRepo` ((feature persistence contract)) + +### Subscription domain +- **Location:** `openmeter/subscription` +- **Responsibility:** 31-file domain (37 in-edges, 25 out-edges). Root holds the subscription spec model (subscriptionspec.go), views (subscriptionview.go), patch system (patch.go + patch/), apply/sync logic (apply.go), phase/item/timing models, uniqueness rules, billing bridge (billing.go), and entitlement bridge (entitlement.go, entitlement/). repo/ persists; service/ + workflow/ orchestrate creation/edit/cancel/plan-change; addon/ (with diff/, repo/, service/) is the subscription-addon sub-system; hooks/ and validators/ enforce invariants. Bridges product catalog plans to live customer subscriptions and into billing + entitlement. +- **Depends on:** openmeter/productcatalog, openmeter/customer, openmeter/entitlement, openmeter/billing, openmeter/ent/db, pkg/datetime, pkg/models +- **Key interfaces:** `subscription.Service` ((create/list/get/cancel/change declared in openmeter/subscription/service.go)), `Subscription patch system` ((patch application declared in subscription/patch.go)) + +### Entitlement domain +- **Location:** `openmeter/entitlement` +- **Responsibility:** Access-control domain (40 in-edges, 19 out-edges). Root declares entitlement.Service, EntitlementRepo, the access model (access.go), entitlement types (metered/boolean/static), grant linkage (entitlement_grant.go), and usage-period logic (usageperiod.go). metered/ holds the metered-entitlement connector tying entitlements to credit grants + usage; balanceworker/ computes balance snapshots from usage events (driven by cmd/balance-worker); driver/ + driver/v2 expose legacy v1 + v2 HTTP; hooks/subscription wires entitlement provisioning to subscription lifecycle; snapshot/, static/, boolean/, validators/ round it out. +- **Depends on:** openmeter/credit, openmeter/credit/grant, openmeter/productcatalog/feature, openmeter/meter, openmeter/streaming, openmeter/ent/db, pkg/models, pkg/timeutil +- **Key interfaces:** `entitlement.Service` ((entitlement CRUD + access checks declared in openmeter/entitlement/connector.go)), `meteredentitlement.Connector` ((metered balance/reset operations)) + +### Credit & grant domain +- **Location:** `openmeter/credit` +- **Responsibility:** Credit-grant accounting feeding entitlements. Root declares BalanceConnector, GrantConnector, balance/ (balance computation), engine/ (grant-burn-down engine), grant/ (grant model + Repo + OwnerConnector), hook/ (lifecycle hooks). The whole credit stack is feature-gated by credits.enabled at the wiring layer. Used by the metered-entitlement connector and the registry. +- **Depends on:** openmeter/credit/grant, openmeter/credit/balance, openmeter/credit/engine, openmeter/ent/db, pkg/models, pkg/timeutil +- **Key interfaces:** `credit.BalanceConnector` ((credit balance computation)), `credit.GrantConnector` ((grant CRUD)), `grant.OwnerConnector` ((grant owner resolution)) + +### Ledger domain +- **Location:** `openmeter/ledger` +- **Responsibility:** Double-entry-style ledger for customer credit accounts (35 in-edges, 17 out-edges), feature-gated by credits.enabled. Root holds account/transaction/balance/routing primitives, impact analysis (impact.go), routing rules + validator (routing.go, routing_validator.go), and a noop/ implementation used when credits are off. account/ has its own service/+adapter/ (account_business.go, account_customer.go, subaccount.go); transactions/, historical/ (+adapter), resolvers/ (+adapter), routingrules/, recognizer/, breakage/, chargeadapter/, customerbalance/, collector/ are sub-areas. When credits are disabled app/common wires noop services; real backfill must construct concrete account+resolver adapters directly. +- **Depends on:** openmeter/customer, openmeter/ent/db, pkg/framework/entutils, pkg/models, pkg/datetime +- **Key interfaces:** `ledger account service` ((account create/resolve/balance declared in openmeter/ledger/account)), `ledger routing` ((routing rule evaluation in routing.go / routing_validator.go)) + +### Meter domain +- **Location:** `openmeter/meter` +- **Responsibility:** Meter definition domain (70 in-edges). Root declares meter.Service, the Meter model, MeterQueryRow, and event parsing (parse.go). service/ implements the service; adapter/ persists via Ent; mockadapter/ is a test double; httphandler/ exposes v1 meter HTTP. Meters define how raw usage events are aggregated; consumed by streaming, billing, and entitlement. +- **Depends on:** openmeter/namespace, openmeter/ent/db, pkg/models, pkg/slicesx +- **Key interfaces:** `meter.Service` ((meter CRUD/query declared in openmeter/meter/service.go)), `Meter.parse` (parse) + +### Streaming / usage query (ClickHouse) +- **Location:** `openmeter/streaming` +- **Responsibility:** Defines the streaming.Connector interface (extends namespace.Handler) for reading metered usage out of ClickHouse: CountEvents, ListEvents, ListEventsV2, ListSubjects, ListGroupByValues, QueryMeter, BatchInsert, ValidateJSONPath. clickhouse/ holds the concrete ClickHouse implementation; retry/ adds retry behavior; usageattribution.go maps events to customers; testutils/ provides a MockStreamingConnector with SetSimpleEvents and explicit StoredAt for late-arriving-usage tests. The RawEvent struct carries CloudEvents-shaped fields with both `ch` (ClickHouse) and `json` tags. +- **Depends on:** openmeter/meter, openmeter/namespace, pkg/models +- **Key interfaces:** `streaming.Connector` (CountEvents, ListEvents, ListEventsV2, ListSubjects, ListGroupByValues, QueryMeter, BatchInsert, ValidateJSONPath) + +### Ingest & sink pipeline +- **Location:** `openmeter/ingest` +- **Responsibility:** Usage event intake. ingest/ defines the ingest service, in-memory and dedupe collectors (dedupe.go, inmemory.go), kafkaingest/ publishes events to Kafka, ingestadapter/ adapts, httpdriver/ exposes the v1 ingest HTTP endpoint. openmeter/sink (sink-worker side) consumes from Kafka: buffer.go batches events, partition.go handles partition assignment, storage.go + meters.go write to ClickHouse via the streaming connector, flushhandler/ flushes buffers. Together they form the event-time metering ingest→storage path. +- **Depends on:** openmeter/streaming, openmeter/meter, openmeter/namespace, pkg/kafka +- **Key interfaces:** `ingest service` ((event ingest + dedupe in openmeter/ingest/ingest.go, dedupe.go)), `sink` ((buffer, partition, storage flush in openmeter/sink)) + +### Notification domain +- **Location:** `openmeter/notification` +- **Responsibility:** Notification event pipeline. Root declares notification.Service + notification.Repository, channel/rule/event/eventpayload/deliverystatus models, and entitlement-specific event types (entitlements.go, invoice.go). service/ implements the service (struct Service holds feature connector, adapter repository, webhook.Handler, logger); consumer/ is the Kafka consumer side (driven by cmd/notification-service); eventhandler/ processes events; webhook/ integrates with Svix for webhook delivery; httpdriver/ exposes v1 HTTP; internal/ holds private helpers. +- **Depends on:** openmeter/notification/webhook, openmeter/productcatalog/feature, openmeter/ent/db, openmeter/watermill/eventbus, pkg/models +- **Key interfaces:** `notification.Service` ((rule/channel/event CRUD + delivery declared in openmeter/notification/service.go)), `notification.Repository` ((notification persistence)), `webhook.Handler` ((Svix webhook delivery)) + +### App / marketplace integrations +- **Location:** `openmeter/app` +- **Responsibility:** Third-party app/marketplace framework (53 in-edges). Root declares app.Service, the app/marketplace registry (registry.go, marketplace.go), webhook handling, and an appbase. stripe/ implements the Stripe billing integration; custominvoicing/ implements a custom-invoicing app; sandbox/ is a test app; httpdriver/ + service/ + adapter/ provide HTTP/service/persistence. Apps plug into billing (invoice delivery, payment). +- **Depends on:** openmeter/customer, openmeter/secret, openmeter/ent/db, pkg/models +- **Key interfaces:** `app.Service` ((app install/list/marketplace declared in openmeter/app/service.go)) + +### Ent schema (DB source of truth) +- **Location:** `openmeter/ent/schema` +- **Responsibility:** Hand-written Ent entity definitions that are the source of truth for the PostgreSQL schema. ~35 schema files spanning customer, billing (billing.go), charges (charges*.go), subscription (+addon, +billingsync), entitlement, grant, feature, ledger_* (account, customer_account, entry, transaction, transaction_group, breakage_record), llmcostprice, notification, plan/addon, ratecard, meter, taxcode, app/app_stripe, balance_snapshot, usage_reset. Schemas use shared Mixins from pkg/framework/entutils (ResourceMixin, CustomerAddressMixin, AnnotationsMixin). Generated into openmeter/ent/db (407 files, DO NOT EDIT) via `make generate`; migrations generated from schema diffs via Atlas. +- **Depends on:** pkg/framework/entutils, pkg/clock, pkg/currencyx +- **Key interfaces:** `Customer (ent.Schema)` (Mixin, Fields, Edges, Indexes) + +### Generated Ent client +- **Location:** `openmeter/ent/db` +- **Responsibility:** Ent-generated ORM client (407 files, 60 in-edges, 108 out-edges). Single shared *entdb.Client used by every domain adapter for PostgreSQL access; supports transaction hijacking (HijackTx) consumed by adapters' Tx/WithTx. predicate/ subpackage (94 in-edges) holds query predicates. All files carry `// Code generated ... DO NOT EDIT` headers; regenerated from openmeter/ent/schema via `make generate`. Its breadth makes it the dominant node in the large generated-code import cycle (cycle 0). +- **Depends on:** openmeter/ent/schema +- **Key interfaces:** `entdb.Client` (HijackTx, NewTxClientFromRawConfig, Client) + +### Registry & builder +- **Location:** `openmeter/registry` +- **Responsibility:** Aggregation structs that bundle related connectors for downstream consumers. registry.Entitlement groups Feature/FeatureRepo connectors, EntitlementOwner (grant.OwnerConnector), CreditBalance/Grant connectors, GrantRepo, MeteredEntitlement connector, Entitlement service, and EntitlementRepo into one struct. builder/ assembles these registries. This is the in-domain counterpart to app/common's Wire registries. +- **Depends on:** openmeter/credit, openmeter/credit/grant, openmeter/entitlement, openmeter/entitlement/metered, openmeter/productcatalog/feature +- **Key interfaces:** `registry.Entitlement` + +### Legacy v1 HTTP router +- **Location:** `openmeter/server/router` +- **Responsibility:** Assembles the legacy v1 HTTP API. router.go validates requests against the embedded OpenAPI 3 spec (kin-openapi openapi3/openapi3filter) and wires per-domain httpdriver/httphandler packages (customer, billing, credit, entitlement v1+v2, meter, meterevent, ingest, ledger/customerbalance, llmcost, notification, portal, productcatalog/addon/plan/feature, app/stripe/custominvoicing, subject, subscription, debug, info) into Chi routes implementing the generated api.ServerInterface from api/api.gen.go. The sibling openmeter/server holds CORS + server lifecycle. +- **Depends on:** api, api/v3/handlers/currencies, app/config, openmeter/customer, openmeter/billing, openmeter/entitlement, openmeter/meter, openmeter/notification, openmeter/productcatalog, openmeter/ledger, (all domain httpdriver packages) +- **Key interfaces:** `Router` ((implements api.ServerInterface generated from legacy TypeSpec)) + +### v3 API layer (AIP-style) +- **Location:** `api/v3` +- **Responsibility:** Newer Google-AIP-style HTTP API. api.gen.go is the oapi-codegen-generated ServerInterface; server/routes.go implements every operation as a thin method delegating to a per-resource handler (e.g. s.metersHandler.CreateMeter().With(meterId).ServeHTTP). handlers/ holds one package per resource (meters, events, customers + nested billing/charges/credits/entitlementaccess, subscriptions, apps, billingprofiles, taxcodes, currencies, features, featurecost, llmcost, plans, addons) each defining a Handler interface + struct with New(resolveNamespace, service, options...) returning httptransport handlers. filters/ implements AIP query-param filtering; apierrors/, render/, request/, response/, oasmiddleware/ are shared HTTP plumbing. Not all generated operations are implemented: credits operations are gated on Credits.Enabled and delegate to api.Unimplemented otherwise; CreateCreditAdjustment and QueryGovernanceAccess are always unimplemented. +- **Depends on:** api/v3 (generated), openmeter/customer, openmeter/meter, openmeter/subscription, openmeter/billing, openmeter/billing/charges, openmeter/credit, openmeter/ledger, pkg/framework/transport/httptransport, pkg/framework/commonhttp +- **Key interfaces:** `v3 Server (meters)` (CreateMeter, GetMeter, ListMeters, UpdateMeter, DeleteMeter, QueryMeter (JSON + text/csv content negotiation)), `v3 Server (customers)` (CreateCustomer, GetCustomer, ListCustomers, UpsertCustomer, DeleteCustomer, ListCustomerEntitlementAccess), `v3 Server (subscriptions)` (CreateSubscription, ListSubscriptions, GetSubscription, CancelSubscription, UnscheduleCancelation, ChangeSubscription), `v3 Server (plans)` (ListPlans, CreatePlan, GetPlan, UpdatePlan, DeletePlan, ArchivePlan, PublishPlan), `v3 Server (credits, gated)` (GetCustomerCreditBalance, ListCreditGrants, CreateCreditGrant, GetCreditGrant, UpdateCreditGrantExternalSettlement, ListCreditTransactions), `customers.Handler` (ListCustomers, CreateCustomer, DeleteCustomer, GetCustomer, UpsertCustomer) + +### Generated API contract & v1 server interface +- **Location:** `api` +- **Responsibility:** Top-level api package (43 in-edges): api.gen.go is the oapi-codegen-generated legacy v1 ServerInterface + types; convert.gen.go/convert.go are goverter type converters; openapi.yaml + openapi.cloud.yaml are the generated OpenAPI specs (from TypeSpec); types/ holds shared API types. Consumed by both the legacy router and v3. This package is the Go-side boundary of the TypeSpec→OpenAPI→Go generation chain. +- **Depends on:** pkg/models +- **Key interfaces:** `api.ServerInterface` ((all v1 operations generated from legacy TypeSpec)) + +### TypeSpec API specification +- **Location:** `api/spec` +- **Responsibility:** Node/pnpm workspace authoring the API contract in TypeSpec, the source of truth for OpenAPI. Two packages under packages/: legacy/ (src/main.tsp + auth/errors/debug/events/meters/filter/portal/subjects/rest/query/types.tsp and an app/ subtree) drives the v1 API; aip/ (src/main.tsp, openmeter.tsp, konnect.tsp, test.tsp) drives the Google-AIP-style v3 API. Each package also ships compiled JS libs (lib/index.js with custom AIP/legacy lint rules under lib/rules). Generation orchestrated by Makefile + pnpm scripts (generate/format/lint). +- **Key interfaces:** `legacy TypeSpec`, `aip TypeSpec` + +### JavaScript/TypeScript SDK +- **Location:** `api/client/javascript` +- **Responsibility:** Published @openmeter/sdk npm package. src/client/index.ts builds an openapi-fetch typed client (paths from generated schemas.js, encodeDates helper) and composes per-resource wrapper classes (Addons, Apps, Billing, Customers, Debug, Entitlements + EntitlementsV2, Events, Features, Info, Meters, Notifications, Plans, Portal, Subjects, SubscriptionAddons, Subscriptions). src/portal/ is a separate portal client; src/zod/ provides Zod schemas; src/react/context.tsx provides a React context (react is a peerDependency). Generated via orval (orval.config.ts) from the OpenAPI spec; built/tested with biome + vitest. +- **Key interfaces:** `OpenMeter client` (Addons, Apps, Billing, Customers, Debug, Entitlements, EntitlementsV2, Events, Features, Info, Meters, Notifications, Plans, Portal, Subjects, SubscriptionAddons, Subscriptions) + +### Python SDK +- **Location:** `api/client/python` +- **Responsibility:** Published `openmeter` Poetry package (Apache-2.0), a corehttp-based client supporting sync + async usage (examples/sync, examples/async). Depends on isodate, corehttp[requests,aiohttp], cloudevents, urllib3. Generated client code from the OpenAPI spec; not imported by the Go backend. +- **Key interfaces:** `OpenMeter Python client` ((sync + async usage-metering client operations)) + +### Collector (Benthos/Redpanda Connect) +- **Location:** `collector` +- **Responsibility:** Separate Go module + binary that streams external usage events into OpenMeter. cmd/main.go runs a Benthos (Redpanda Connect) CLI assembled from registered plugins: benthos/input, benthos/output, benthos/bloblang (custom bloblang mapping plugins), benthos/services/leaderelection (Kubernetes-style leader election CLI opts), plus benthos/presets and benthos/internal. Pulls in redpanda-data/benthos v4 + connect free bundle. Independent go.mod, so not part of the root module's import graph. +- **Key interfaces:** `collector main` (main) + +### Shared utility packages (pkg/) +- **Location:** `pkg` +- **Responsibility:** Cross-cutting Go utilities, several of which are the codebase's biggest dependency magnets: pkg/models (229 in-edges) holds shared domain models + the NewNillableGenericValidationError error aggregation used by Validate() methods; pkg/pagination (119 in-edges); pkg/clock (100 in-edges, FreezeTime/UnFreeze test helpers); pkg/currencyx (91, currency.Code type used in ent schema); pkg/timeutil (82); pkg/framework/entutils (74, Ent mixins + TransactingRepo + TxDriver transaction helpers); pkg/framework/transaction (70, transaction.Driver); pkg/datetime (65); pkg/framework/commonhttp (63, GetMediaType); pkg/filter (53); pkg/framework/transport/httptransport (47, the .With().ServeHTTP handler abstraction used by v3). Also kafka, redis, log, otelx, lockr, models, set, slicesx, sortx, strcase, treex, etc. +- **Key interfaces:** `models` (NewNillableGenericValidationError), `entutils` (TransactingRepo, TransactingRepoWithNoValue, NewTxDriver, ResourceMixin, CustomerAddressMixin, AnnotationsMixin), `httptransport` ((.With(params).ServeHTTP handler abstraction + HandlerOption)), `clock` (FreezeTime, UnFreeze) + +### Database migrations +- **Location:** `tools/migrate` +- **Responsibility:** Migration tooling and SQL files. migrations/ holds golang-migrate-format timestamped .up.sql/.down.sql pairs plus atlas.sum, generated from Ent schema diffs via `atlas migrate --env local diff ` (atlas.hcl points schema source at ent://openmeter/ent/schema). cmd/viewgen/main.go is a generator for Ent views (which don't auto-appear in generated migrate metadata). Migrations run on startup when postgres.autoMigrate is ent or migration. +- **Depends on:** openmeter/ent/schema +- **Key interfaces:** `viewgen` (main) + +## File Placement + +| Component Type | Location | Naming | Example | +|---------------|----------|--------|---------| +| Domain service interface | `openmeter//` | `.go / service.go / connector.go in the domain root package` | `openmeter/billing/invoice.go declares billing.Service; openmeter/streaming/connector.go declares streaming.Connector` | +| Service implementation | `openmeter//service/` | `service/service.go with a Service struct + Config{...} + Config.Validate() + New(Config)` | `openmeter/billing/service/service.go (Service struct, Config with per-field non-nil Validate); openmeter/notification/service/service.go follows the same shape` | +| Persistence adapter | `openmeter//adapter/` | `adapter/adapter.go with an adapter struct holding *entdb.Client + Tx/WithTx/Self` | `openmeter/billing/adapter/adapter.go implements billing.Adapter with HijackTx/WithTx; openmeter/customer/adapter follows suit` | +| Legacy v1 HTTP layer | `openmeter//httpdriver/ (or httphandler/)` | `httpdriver/ or httphandler/ co-located inside the domain package` | `openmeter/customer/httpdriver, openmeter/meter/httphandler, openmeter/notification/httpdriver — all imported by openmeter/server/router/router.go` | +| v3 HTTP handler | `api/v3/handlers//` | `handlers//{handler.go,.go,convert.gen.go} with Handler interface + New(resolveNamespace, service, options...)` | `api/v3/handlers/customers/handler.go (Handler interface, handler struct, New); per-operation files create.go/get.go/list.go/delete.go/upsert.go` | +| Type conversion | `alongside the package that owns the types (api/, openmeter/billing/, api/v3/handlers/customers/)` | `convert.go (goverter interface) → convert.gen.go (generated); derived.gen.go (goderive)` | `api/convert.go + api/convert.gen.go; openmeter/billing/derived.gen.go; api/v3/handlers/customers/convert.gen.go` | +| Unit / integration tests | `co-located in each package AND top-level test/ (test/billing, test/customer, test/entitlement, test/subscription, test/credits, test/notification, test/app)` | `_test.go co-located with source; cross-domain integration suites under test//` | `openmeter/billing/charges/service/usagebased_test.go (co-located); test/billing (shared billing integration harness imported by charges/service tests)` | +| End-to-end tests | `e2e/` | `_test.go + docker-compose.*.yaml in e2e/` | `e2e/e2e_test.go, e2e/addons_v3_test.go, e2e/customer_credits_v3_test.go, e2e/entitlement_parity_test.go, e2e/docker-compose.infra.yaml` | +| Ent schema (DB source of truth) | `openmeter/ent/schema/` | `.go with a struct embedding ent.Schema + Mixin()/Fields()/Edges()` | `openmeter/ent/schema/customer.go (Customer ent.Schema, ResourceMixin + CustomerAddressMixin + AnnotationsMixin)` | +| DI / wiring providers | `app/common/` | `one wire.NewSet provider-set file per subsystem` | `app/common/billing.go (var Billing = wire.NewSet(...)), app/common/ledger.go, app/common/openmeter_server.go` | +| Service entrypoints | `cmd/` | `cmd//main.go` | `cmd/server/main.go, cmd/billing-worker/main.go, cmd/sink-worker/main.go` | +| SQL migrations | `tools/migrate/migrations/` | `_.up.sql / .down.sql + atlas.sum` | `tools/migrate/migrations/*.up.sql generated by `atlas migrate --env local diff`` | + +## Naming Conventions + +- **Go domain root packages**: single lowercase word matching the domain (e.g. `billing`, `customer`, `subscription`, `entitlement`, `streaming`, `notification`, `ledger`, `meter`) +- **Go implementation subpackages with import aliases**: package named service/adapter but imported with a domain-prefixed alias (e.g. `package billingservice in service/service.go imported as billingservice`, `package billingadapter in adapter/adapter.go`, `package customers in api/v3/handlers/customers`) +- **Go interface-satisfaction assertions**: var _ = (*)(nil) (e.g. `var _ billing.Service = (*Service)(nil)`, `var _ billing.Adapter = (*adapter)(nil)`, `var _ notification.Service = (*Service)(nil)`) +- **Constructor + config**: type Config struct {...}; func (c Config) Validate() error; func New(config Config) (Iface, error) (e.g. `billingadapter.New(Config)`, `billingservice Config.Validate() returning errors.New per nil field`, `notification service New(Config)`) +- **Generated Go files**: *.gen.go and wire_gen.go and ent/db/ with `// Code generated ... DO NOT EDIT` header (e.g. `api/api.gen.go`, `api/v3/api.gen.go`, `openmeter/billing/derived.gen.go`, `openmeter/billing/service/convert.gen.go`, `wire_gen.go`) +- **Go test files**: _test.go co-located (e.g. `openmeter/billing/service/invoice_test.go`, `openmeter/subscription/patch_test.go`, `openmeter/entitlement/usageperiod_test.go`) +- **TypeScript SDK files**: kebab-case modules, PascalCase exported wrapper classes (e.g. `src/client/subscription-addons.js exporting class SubscriptionAddons`, `src/client/index.ts`, `src/react/context.tsx`) +- **TypeSpec spec files**: lowercase .tsp under packages//src/ (e.g. `api/spec/packages/legacy/src/meters.tsp`, `api/spec/packages/aip/src/openmeter.tsp`, `api/spec/packages/legacy/src/main.tsp`) +- **Ent schema files**: snake_case or compound lowercase .go matching the entity (e.g. `openmeter/ent/schema/ledger_account.go`, `openmeter/ent/schema/balance_snapshot.go`, `openmeter/ent/schema/chargesusagebased.go`, `openmeter/ent/schema/customer.go`) \ No newline at end of file diff --git a/.claude/rules/data-models.md b/.claude/rules/data-models.md new file mode 100644 index 0000000000..0f7a1c8138 --- /dev/null +++ b/.claude/rules/data-models.md @@ -0,0 +1,2456 @@ +OpenMeter persists its control-plane state in PostgreSQL via the Ent ORM (~70 tables across customer, entitlement/credit, productcatalog, subscription, billing, charges, ledger, notification, and app domains; source of truth is openmeter/ent/schema/*.go, Atlas migrations under tools/migrate/migrations/). Raw usage events live in ClickHouse (per-namespace om__events MergeTree table) and flow there through per-namespace Kafka ingest topics consumed by the sink-worker; Redis backs event deduplication and async query progress tracking. Almost every Postgres table is multi-tenant (namespace-scoped), uses ULID char(26) ids, and soft-deletes via deleted_at. + +## Models + +_Domain entities, DTOs, and value objects this codebase reads and writes._ + +### `RawEvent` *(document)* + +The CloudEvents-shaped usage event row stored in the ClickHouse om__events table; data is the raw JSON payload, store_row_id a generated ULID per stored copy and customer_id an optional attribution (see openmeter/streaming/connector.go:24). + +- **Location:** `openmeter/streaming/connector.go` +- **Store:** `clickhouse_events` +- **Owner:** `openmeter/streaming` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | String | | +| `id` | String | | +| `type` | LowCardinality(String) | | +| `subject` | String | | +| `source` | String | | +| `time` | DateTime | | +| `data` | String | Raw JSON event payload from which meters extract values via value_property JSONPath (see openmeter/streaming/connector.go:31). | +| `ingested_at` | DateTime | | +| `stored_at` | DateTime | When the row landed in ClickHouse; used as the late-arriving-usage cutoff in usage-based billing realization runs (see openmeter/sink/storage.go:62). | +| `store_row_id` | String | Per-stored-row ULID assigned by the sink on insert; distinguishes physical copies of the same logical event id (see openmeter/sink/storage.go:63). | +| `customer_id` | String | | + +**Data Guarantees:** +- ENGINE = MergeTree PARTITION BY toYYYYMM(time) (see openmeter/streaming/clickhouse/event_query.go:38) +- ORDER BY (namespace, type, subject, toStartOfHour(time)) (see openmeter/streaming/clickhouse/event_query.go:45) +- minmax skip-index on stored_at +- no soft-delete; append-only; logical dedup happens upstream in Redis before insert + +**Consumers:** +- `ClickHouseStorage.BatchInsert` — `openmeter/sink/storage.go`: sole writer — maps SinkMessages to RawEvents and batch-inserts them into ClickHouse, stamping stored_at/store_row_id +- `createEventsTable.toSQL` — `openmeter/streaming/clickhouse/event_query.go`: emits the CREATE TABLE DDL for the per-namespace events table +- `queryEventsTable` — `openmeter/streaming/clickhouse/event_query.go`: builds list/count queries filtering by namespace/time/subject + +**Lifecycle:** +- *How to add:* Add a column to RawEvent in openmeter/streaming/connector.go (with ch:"..." tag) AND to the createEventsTable.Define(...) calls in openmeter/streaming/clickhouse/event_query.go; the table is created idempotently (IF NOT EXISTS) on connector startup. There is no Atlas migration for ClickHouse. + + ``` + sb.Define("store_row_id", "String") + ``` + +- *How to modify:* ClickHouse columns are added via the IF NOT EXISTS create path or ALTER TABLE; changing ORDER BY/partitioning is a breaking schema change requiring a new table and backfill. +- *How to read:* Always through the streaming.Connector (ListEvents/ListEventsV2/CountEvents/QueryMeter), never raw ClickHouse from handlers. + + ``` + events, err := connector.ListEvents(ctx, namespace, params) + ``` + +- *Tests:* `openmeter/streaming/clickhouse/event_query_test.go`, `openmeter/streaming/clickhouse/event_query_v2_test.go`, `openmeter/streaming/clickhouse/meter_query_test.go` + +### `dedupe.Item` *(key_value)* + +The deduplication key (namespace + event id + source) hashed into a Redis key with TTL to drop duplicate ingest events (see openmeter/dedupe/redisdedupe/redisdedupe.go:45). + +- **Location:** `openmeter/dedupe/dedupe.go` +- **Store:** `redis` +- **Owner:** `openmeter/dedupe` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `Namespace` | string | | +| `ID` | string | | +| `Source` | string | | + +**Data Guarantees:** +- TTL = Deduplicator.Expiration (see openmeter/dedupe/redisdedupe/redisdedupe.go:84) +- SET NX semantics — first writer wins, returns unique=true (see openmeter/dedupe/redisdedupe/redisdedupe.go:82) +- key may be raw key or sha-hashed depending on DedupeMode (rawkey/keyhash/keyhash-migration) (see openmeter/dedupe/redisdedupe/redisdedupe.go:51) + +**Consumers:** +- `Deduplicator.IsUnique` — `openmeter/dedupe/redisdedupe/redisdedupe.go`: checks-and-sets the dedup key atomically (SET NX); returns whether the event is new +- `Deduplicator.CheckUniqueBatch` — `openmeter/dedupe/redisdedupe/redisdedupe.go`: MGET batch read path classifying items into unique vs already-processed + +**Lifecycle:** +- *How to add:* Dedup keys are produced from dedupe.Item.Key(); the Redis value is empty — only key presence matters. Change the key shape in dedupe.Item / keyhash.go. + + ``` + d.Redis.SetArgs(ctx, key, "", redis.SetArgs{TTL: d.Expiration, Mode: "nx"}) + ``` + +- *How to modify:* Changing the hashing format requires a migration mode (DedupeModeKeyHashMigration) that checks both old and new key formats during transition. +- *How to read:* Via Deduplicator.IsUnique/CheckUnique/CheckUniqueBatch; never touch Redis keys directly. + +### `Progress` *(key_value)* + +Async-query progress state cached in Redis under key progress:: with a TTL, used to report long-running event-query progress (see openmeter/progressmanager/adapter/progress.go:16). + +- **Location:** `openmeter/progressmanager/entity/progressmanager.go` +- **Store:** `redis` +- **Owner:** `openmeter/progressmanager` +**Data Guarantees:** +- key = progress:: (optionally prefixed) (see openmeter/progressmanager/adapter/progress.go:65) +- JSON-serialized value with TTL = adapter.expiration (see openmeter/progressmanager/adapter/progress.go:56) +- missing key → NotFound (redis.Nil) (see openmeter/progressmanager/adapter/progress.go:29) + +**Consumers:** +- `adapter.UpsertProgress` — `openmeter/progressmanager/adapter/progress.go`: writes JSON progress with TTL (SET) +- `adapter.GetProgress` — `openmeter/progressmanager/adapter/progress.go`: reads/unmarshals progress; returns NotFound on missing key + +**Lifecycle:** +- *How to add:* Edit the Progress entity in openmeter/progressmanager/entity/progressmanager.go; it is JSON-marshaled wholesale into the Redis value. + + ``` + a.redis.Set(ctx, a.getKey(input.ProgressID), data, a.expiration) + ``` + +- *How to read:* Via progressmanager service GetProgress; a noop adapter exists when Redis is not configured. + +### `SinkMessage` *(value_object)* + +In-flight per-event message inside the sink-worker carrying the deserialized CloudEvent plus namespace and ingested/stored timestamps before it is mapped to a RawEvent and persisted (see openmeter/sink/storage.go:52). + +- **Location:** `openmeter/sink/models/models.go` +- **Owner:** `openmeter/sink` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `Namespace` | string | | +| `Serialized` | *serializer.CloudEventsKafkaPayload | | +| `IngestedAt` | *time.Time | | +| `StoredAt` | *time.Time | | + +**Data Guarantees:** +- transient; not persisted as-is — mapped to RawEvent for ClickHouse insert (see openmeter/sink/storage.go:53) + +**Consumers:** +- `ClickHouseStorage.BatchInsert` — `openmeter/sink/storage.go`: consumes SinkMessages and maps them to ClickHouse RawEvents + +**Lifecycle:** +- *How to add:* Edit the SinkMessage struct in openmeter/sink/models/models.go. + +### `BillingInvoice` *(table)* + +An invoice in gathering or standard state, snapshotting customer/supplier identity, addresses, cloned profile settings and lifecycle timestamps; status_details_cache is GIN-indexed and collection_at has dual gathering/standard semantics (see openmeter/ent/schema/billing.go:1018). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `supplier_name` | TEXT | | +| `supplier_tax_code` | TEXT | | +| `customer_key` | TEXT | | +| `customer_name` | TEXT | | +| `customer_usage_attribution` | jsonb | | +| `number` | TEXT | | +| `type` | enum | | +| `description` | TEXT | | +| `customer_id` | char(26) | | +| `source_billing_profile_id` | char(26) | | +| `voided_at` | TIMESTAMPTZ | | +| `issued_at` | TIMESTAMPTZ | Can be in the future for pre-issued invoices (see openmeter/ent/schema/billing.go:1087). | +| `sent_to_customer_at` | TIMESTAMPTZ | | +| `draft_until` | TIMESTAMPTZ | | +| `quantity_snapshoted_at` | TIMESTAMPTZ | | +| `currency` | varchar(3) | | +| `due_at` | TIMESTAMPTZ | | +| `status` | enum | | +| `status_details_cache` | jsonb | | +| `workflow_config_id` | char(26) | | +| `tax_app_id` | char(26) | | +| `invoicing_app_id` | char(26) | | +| `payment_app_id` | char(26) | | +| `period_start` | TIMESTAMPTZ | | +| `period_end` | TIMESTAMPTZ | | +| `collection_at` | TIMESTAMPTZ | Dual purpose: on gathering invoices defines when pending lines collect into a draft; on standard invoices the post-creation collection/snapshot cutoff for metered lines (see openmeter/ent/schema/billing.go:1154). | +| `payment_processing_entered_at` | TIMESTAMPTZ | When the invoice first entered payment-processing; used for staleness/fraud guarding (see openmeter/ent/schema/billing.go:1164). | +| `schema_level` | INT | Write schema version used during the in-progress invoice-line migration (see openmeter/ent/schema/billing.go:1170). | +| `supplier_address_*` | TEXT | | +| `customer_address_*` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, customer_id, currency) WHERE deleted_at IS NULL AND status = 'gathering' — one gathering invoice per customer+currency (see openmeter/ent/schema/billing.go:1193) +- GIN INDEX(status_details_cache) +- INDEX(namespace, status), INDEX(namespace, issued_at) +- FK source_billing_profile_id immutable (profile change forces void) + +**Lifecycle:** +- *How to add:* Edit BillingInvoice.Fields() in billing.go and regenerate. Invoice has supplier AND customer address mixins (two CustomerAddressMixin prefixes). +- *How to modify:* See the /billing skill for the invoice state machine. + +### `BillingInvoiceLine` *(table)* + +The primary invoice line table (flat-fee or usage-based) carrying service/billing period, managed_by, parent_line hierarchy, subscription+charge linkage and totals; intended to eventually absorb the ubp line config (see openmeter/ent/schema/billing.go:303). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `name/description/metadata/annotations` | TEXT/jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `currency` | varchar(3) | | +| `tax_config` | jsonb | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `period_start` | TIMESTAMPTZ | | +| `period_end` | TIMESTAMPTZ | | +| `invoice_id` | char(26) | | +| `managed_by` | enum | | +| `parent_line_id` | char(26) | | +| `invoice_at` | TIMESTAMPTZ | | +| `override_collection_period_end` | TIMESTAMPTZ | | +| `type` | enum | | +| `status` | enum | | +| `quantity` | numeric | Optional; for usage-based billing it is only persisted when the invoice is issued (see openmeter/ent/schema/billing.go:352). | +| `ratecard_discounts` | jsonb | | +| `child_unique_reference_id` | TEXT | Stable key per parent line for upserting/identifying lines created for the same reason (e.g. tiered price tier) across invoices (see openmeter/ent/schema/billing.go:370). | +| `subscription_id/subscription_phase_id/subscription_item_id` | TEXT | | +| `subscription_billing_period_from/to` | TIMESTAMPTZ | | +| `split_line_group_id` | char(26) | | +| `charge_id` | char(26) | | +| `engine` | enum | | +| `line_ids` | char(26) | Deprecated: invoice discounts moved to line_discounts (see openmeter/ent/schema/billing.go:416). | +| `credits_applied` | jsonb | | +| `amount/totals fields` | numeric | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:440) +- FK invoice_id → billing_invoices.id (required) +- detailed_lines/discount children ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit BillingInvoiceLine.Fields() in billing.go and regenerate. This table aggregates several mixins (Annotations, Resource, InvoiceLineBase, Tax, totals, externalid.Line). + +### `SubscriptionItem` *(table)* + +A ratecard-instance inside a phase carrying its own mutable cadence and effective price/entitlement/discount config; active_*_override_relative_to_phase_start preserves intended cadence across edits/cancels (see openmeter/ent/schema/subscription.go:141). + +- **Location:** `openmeter/ent/schema/subscription.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subscription` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `metadata` | jsonb | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `annotations` | jsonb | | +| `active_from` | TIMESTAMPTZ | | +| `active_to` | TIMESTAMPTZ | | +| `phase_id` | TEXT | | +| `key` | TEXT | | +| `entitlement_id` | TEXT | | +| `restarts_billing_period` | BOOL | | +| `active_from_override_relative_to_phase_start` | TEXT | ISO duration offset from phase start preserving the intended item cadence across edits/cancels (see openmeter/ent/schema/subscription.go:173). | +| `active_to_override_relative_to_phase_start` | TEXT | | +| `name` | TEXT | | +| `description` | TEXT | | +| `feature_key` | TEXT | | +| `entitlement_template` | jsonb | | +| `tax_config` | jsonb | | +| `billing_cadence` | TEXT | | +| `price` | jsonb | | +| `discounts` | jsonb | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, phase_id, key) +- FK phase_id → subscription_phases.id, FK entitlement_id → entitlements.id ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit SubscriptionItem.Fields() and regenerate. Note items are intentionally NOT cadenced via CadencedMixin because their cadence is mutable. + +### `Entitlement` *(table)* + +A customer's right to consume a feature (metered, boolean, or static); anchors usage periods and links to grants, usage resets and balance snapshots (see openmeter/ent/schema/entitlement.go:20). + +- **Location:** `openmeter/ent/schema/entitlement.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/entitlement` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `entitlement_type` | enum | | +| `feature_id` | char(26) | | +| `active_from` | TIMESTAMPTZ | | +| `active_to` | TIMESTAMPTZ | | +| `feature_key` | TEXT | Validated to reject valid ULIDs so feature keys never collide with ids (see openmeter/ent/schema/entitlement.go:41). | +| `customer_id` | char(26) | | +| `measure_usage_from` | TIMESTAMPTZ | | +| `issue_after_reset` | FLOAT | | +| `issue_after_reset_priority` | uint8 | | +| `is_soft_limit` | BOOL | | +| `preserve_overage_at_reset` | BOOL | | +| `config` | jsonb | | +| `usage_period_interval` | TEXT | ISO8601 duration string defining the recurring usage period (see openmeter/ent/schema/entitlement.go:61). | +| `usage_period_anchor` | TIMESTAMPTZ | Original anchor time; no longer overwritten on reset — the effective anchor is derived from the last UsageReset queried dynamically (see openmeter/ent/schema/entitlement.go:62). | +| `current_usage_period_start` | TIMESTAMPTZ | Denormalized current-period start; schema TODO marks it for removal in favor of calculation (see openmeter/ent/schema/entitlement.go:63). | +| `current_usage_period_end` | TIMESTAMPTZ | | +| `annotations` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(created_at, id) (see openmeter/ent/schema/entitlement.go:85) +- INDEX(current_usage_period_end, deleted_at) — used to collect entitlements with due resets (see openmeter/ent/schema/entitlement.go:84) +- FK feature_id → features.id, FK customer_id → customers.id +- child usage_reset/grant/balance_snapshot ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit Entitlement.Fields() in entitlement.go and regenerate; many fields are Immutable and Nillable. The current_usage_period_* columns are slated for removal in favor of dynamic computation. + +### `Feature` *(table)* + +A purchasable/grantable capability tied to a meter; holds unit-cost configuration (manual amount or LLM-provider/model/token pricing) and is archived via archived_at rather than deleted (see openmeter/ent/schema/feature.go:17). + +- **Location:** `openmeter/ent/schema/feature.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog/feature` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `metadata` | jsonb | | +| `namespace` | TEXT | | +| `name` | TEXT | | +| `description` | TEXT | | +| `key` | TEXT | | +| `meter_slug` | TEXT | Deprecated meter reference by slug; to be removed in Phase 2 in favor of meter_id (see openmeter/ent/schema/feature.go:35). | +| `meter_id` | TEXT | | +| `meter_group_by_filters` | jsonb | | +| `advanced_meter_group_by_filters` | jsonb | | +| `unit_cost_type` | TEXT | | +| `unit_cost_manual_amount` | numeric | | +| `unit_cost_llm_provider_property` | TEXT | | +| `unit_cost_llm_provider` | TEXT | | +| `unit_cost_llm_model_property` | TEXT | | +| `unit_cost_llm_model` | TEXT | | +| `unit_cost_llm_token_type_property` | TEXT | | +| `unit_cost_llm_token_type` | TEXT | | +| `archived_at` | TIMESTAMPTZ | Soft-archive timestamp; features are uniqueness-scoped to archived_at IS NULL rather than deleted_at (see openmeter/ent/schema/feature.go:67). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key) WHERE archived_at IS NULL (see openmeter/ent/schema/feature.go:66) +- CHECK unit_cost_llm_{provider,model,token_type} property vs literal mutually exclusive (see openmeter/ent/schema/feature.go:55) + +**Lifecycle:** +- *How to add:* Edit Feature.Fields() and Annotations() (for CHECK constraints) in feature.go, regenerate, diff a migration. + + ``` + entsql.Checks(map[string]string{ + "unit_cost_llm_provider_mutual_exclusive": "NOT (unit_cost_llm_provider_property IS NOT NULL AND unit_cost_llm_provider IS NOT NULL)", + }) + ``` + + +### `LedgerBreakageRecord` *(table)* + +Projection row recording credit breakage (expired/unused credit) with full source-vs-breakage transaction lineage; intentionally keeps ledger references as plain IDs because it is a projection, not accounting source of truth (see openmeter/ent/schema/ledger_breakage_record.go:15). + +- **Location:** `openmeter/ent/schema/ledger_breakage_record.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger/breakage` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `kind` | enum | | +| `amount` | numeric | | +| `customer_id` | char(26) | | +| `currency` | varchar(3) | | +| `credit_priority` | INT | | +| `expires_at` | TIMESTAMPTZ | | +| `source_kind` | enum | | +| `source_transaction_group_id` | char(26) | | +| `source_transaction_id` | char(26) | | +| `source_entry_id` | char(26) | | +| `breakage_transaction_group_id` | char(26) | | +| `breakage_transaction_id` | char(26) | | +| `fbo_sub_account_id` | char(26) | | +| `breakage_sub_account_id` | char(26) | | +| `plan_id` | char(26) | | +| `release_id` | char(26) | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, customer_id, currency, credit_priority, expires_at, id) +- references stored as plain IDs (no FKs) by design (see openmeter/ent/schema/ledger_breakage_record.go:19) + +**Lifecycle:** +- *How to add:* Edit LedgerBreakageRecord.Fields() and regenerate. Added via migration 20260517121831_add_credit_expiration_breakage. + +### `PlanRateCard` *(table)* + +A ratecard within a plan phase (shared RateCard mixin: type, price, entitlement_template, discounts, tax) referencing an optional feature (see openmeter/ent/schema/productcatalog.go:141). + +- **Location:** `openmeter/ent/schema/productcatalog.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `key` | TEXT | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `type` | enum | | +| `feature_key` | TEXT | | +| `entitlement_template` | jsonb | | +| `tax_config` | jsonb | | +| `billing_cadence` | TEXT | | +| `price` | jsonb | | +| `discounts` | jsonb | | +| `phase_id` | TEXT | | +| `feature_id` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(phase_id, key) WHERE deleted_at IS NULL +- UNIQUE(phase_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:193) + +**Lifecycle:** +- *How to add:* RateCard fields come from the shared RateCard mixin in ratecard.go; phase_id/feature_id are added in PlanRateCard.Fields(). Edit and regenerate. + +### `Customer` *(table)* + +A billable end-customer; carries billing address snapshot fields and an optional currency, and fans out to subscriptions, entitlements, charges and billing overrides (see openmeter/ent/schema/customer.go:16). + +- **Location:** `openmeter/ent/schema/customer.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/customer` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `annotations` | jsonb | | +| `billing_address_country` | char(2) | | +| `billing_address_postal_code` | TEXT | | +| `billing_address_state` | TEXT | | +| `billing_address_city` | TEXT | | +| `billing_address_line1` | TEXT | | +| `billing_address_line2` | TEXT | | +| `billing_address_phone_number` | TEXT | | +| `key` | TEXT | External-facing stable customer key; stored as empty string (not NULL) when unset so a unique index can be applied (see openmeter/ent/schema/customer.go:33). | +| `primary_email` | TEXT | | +| `currency` | char(3) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:58) +- INDEX(name), INDEX(primary_email), INDEX(created_at) +- soft_delete (deleted_at) +- audit (created_at, updated_at) +- FK apps/subjects/billing_customer_override → ON DELETE CASCADE (see openmeter/ent/schema/customer.go:73) + +**Lifecycle:** +- *How to add:* Add the column to Customer.Fields() in openmeter/ent/schema/customer.go, run `make generate`, then `atlas migrate --env local diff ` to emit the SQL under tools/migrate/migrations/. + + ``` + field.String("key").Optional(), + ``` + +- *How to modify:* Never edit historical migrations; add a new ent field/index and generate a new migration. The committed v3 list-filter TODO in customer.go warns to add pg_trgm GIN indexes via a custom SQL migration before exposing ILIKE contains filters. +- *How to read:* Through the customer adapter/service; the schema notes the v3 list API exposes case-insensitive contains filters compiling to ILIKE. + +### `BillingCustomerOverride` *(table)* + +Per-customer overrides of billing profile / workflow settings (one per customer); NULL override fields fall back to the profile (see openmeter/ent/schema/billing.go:178). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `customer_id` | char(26) | | +| `billing_profile_id` | char(26) | | +| `collection_alignment` | enum | | +| `anchored_alignment_detail` | jsonb | | +| `line_collection_period` | TEXT | | +| `invoice_auto_advance` | BOOL | | +| `invoice_draft_period` | TEXT | | +| `invoice_due_after` | TEXT | | +| `invoice_collection_method` | enum | | +| `invoice_progressive_billing` | BOOL | | +| `invoice_default_tax_config` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:258) +- FK customer_id → customers.id (required, immutable) + +**Lifecycle:** +- *How to add:* Edit BillingCustomerOverride.Fields() and regenerate. + +### `BillingWorkflowConfig` *(table)* + +Cloneable invoicing workflow settings (collection alignment, draft/due periods, auto-advance, progressive billing, tax enable/enforce) referenced by profiles, overrides and invoices (see openmeter/ent/schema/billing.go:110). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `collection_alignment` | enum | | +| `anchored_alignment_detail` | jsonb | | +| `line_collection_period` | TEXT | | +| `invoice_auto_advance` | BOOL | | +| `invoice_draft_period` | TEXT | | +| `invoice_due_after` | TEXT | | +| `invoice_collection_method` | enum | | +| `invoice_progressive_billing` | BOOL | | +| `invoice_default_tax_settings` | jsonb | | +| `tax_enabled` | BOOL | | +| `tax_enforced` | BOOL | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, id) + +**Lifecycle:** +- *How to add:* Edit BillingWorkflowConfig.Fields() and regenerate. + +### `Grant` *(table)* + +A credit grant against an entitlement (owner_id) with amount, priority, expiration and recurrence; voided_at soft-voids it (see openmeter/ent/schema/grant.go:15). + +- **Location:** `openmeter/ent/schema/grant.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/credit/grant` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `metadata` | jsonb | | +| `owner_id` | char(26) | Entitlement id this grant belongs to (FK to entitlements via the grant edge) (see openmeter/ent/schema/grant.go:67). | +| `amount` | numeric | | +| `priority` | uint8 | | +| `effective_at` | TIMESTAMPTZ | | +| `expiration` | jsonb | | +| `expires_at` | TIMESTAMPTZ | | +| `voided_at` | TIMESTAMPTZ | | +| `reset_max_rollover` | numeric | | +| `reset_min_rollover` | numeric | | +| `recurrence_period` | TEXT | | +| `recurrence_anchor` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, owner_id), INDEX(effective_at, expires_at) +- FK owner_id → entitlements.id ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit Grant.Fields() in grant.go, regenerate, diff migration. + +### `Subscription` *(table)* + +An active customer subscription instance with cadenced active window, currency, billing anchor/cadence, pro-rating and settlement mode; root of phases/items and billing/charge edges (see openmeter/ent/schema/subscription.go:18). + +- **Location:** `openmeter/ent/schema/subscription.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subscription` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `metadata` | jsonb | | +| `active_from` | TIMESTAMPTZ | | +| `active_to` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `plan_id` | TEXT | | +| `customer_id` | TEXT | | +| `currency` | char(3) | | +| `billing_anchor` | TIMESTAMPTZ | | +| `billing_cadence` | TEXT | | +| `pro_rating_config` | jsonb | | +| `settlement_mode` | enum | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, customer_id) +- FK customer_id → customers.id (required, immutable) +- phases/addons/billing_sync_state ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit Subscription.Fields() in subscription.go and regenerate. Subscription is cadenced (active_from/active_to via CadencedMixin). +- *How to modify:* See the /subscription skill for the sync algorithm; subscription edits drive billing/charge reconciliation. + +### `LLMCostPrice` *(table)* + +Canonical per-token LLM pricing rows; namespace NULL means a global default, a set namespace is an override (see openmeter/ent/schema/llmcostprice.go:16). + +- **Location:** `openmeter/ent/schema/llmcostprice.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/llmcost` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `metadata` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `namespace` | TEXT | NULL for global prices, set for namespace overrides (see openmeter/ent/schema/llmcostprice.go:32). | +| `provider` | TEXT | | +| `model_id` | TEXT | | +| `model_name` | TEXT | | +| `input_per_token` | numeric | | +| `output_per_token` | numeric | | +| `cache_read_per_token` | numeric | | +| `reasoning_per_token` | numeric | | +| `cache_write_per_token` | numeric | | +| `currency` | TEXT | | +| `source` | TEXT | | +| `source_prices` | jsonb | | +| `effective_from` | TIMESTAMPTZ | | +| `effective_to` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- UNIQUE(provider, model_id, namespace, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/llmcostprice.go:85) +- partial index for global lookups WHERE namespace IS NULL + +**Lifecycle:** +- *How to add:* Edit LLMCostPrice.Fields() in llmcostprice.go and regenerate. This table notably does NOT use NamespaceMixin (namespace is nullable). +- *How to read:* Override resolution: look up namespace override first, then fall back to the global (namespace IS NULL) row. + +### `BillingInvoiceSplitLineGroup` *(table)* + +Groups invoice lines that result from splitting a single usage-based service period across progressive-billing invoices; tax fields are deprecated here (see openmeter/ent/schema/billing.go:611). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `name` | TEXT | | +| `currency` | varchar(3) | | +| `tax_config` | jsonb | Deprecated: split groups no longer carry tax config (see openmeter/ent/schema/billing.go:631). | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `service_period_start` | TIMESTAMPTZ | | +| `service_period_end` | TIMESTAMPTZ | | +| `unique_reference_id` | TEXT | | +| `ratecard_discounts` | jsonb | | +| `feature_key` | TEXT | | +| `price` | jsonb | | +| `subscription_id/subscription_phase_id/subscription_item_id` | TEXT | | +| `subscription_billing_period_from/to` | TIMESTAMPTZ | | +| `charge_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:717) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `BillingProfile` *(table)* + +A billing configuration tying supplier identity + tax/invoicing/payment apps + workflow config; one default per namespace (see openmeter/ent/schema/billing.go:28). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `supplier_address_*` | TEXT | | +| `tax_app_id` | char(26) | | +| `invoicing_app_id` | char(26) | | +| `payment_app_id` | char(26) | | +| `workflow_config_id` | TEXT | | +| `default` | BOOL | | +| `supplier_name` | TEXT | | +| `supplier_tax_code` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, default) WHERE "default" AND deleted_at IS NULL — at most one default profile per namespace (see openmeter/ent/schema/billing.go:102) +- FK tax_app/invoicing_app/payment_app → apps.id (required, immutable) + +**Lifecycle:** +- *How to add:* Edit BillingProfile.Fields() in billing.go and regenerate. + +### `Plan` *(table)* + +A versioned product-catalog plan (key + version) with default billing cadence, pro-rating config, settlement mode and effective window; phases hang off it (see openmeter/ent/schema/productcatalog.go:16). + +- **Location:** `openmeter/ent/schema/productcatalog.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `key` | TEXT | | +| `version` | INT | | +| `currency` | TEXT | | +| `billing_cadence` | TEXT | | +| `pro_rating_config` | jsonb | | +| `effective_from` | TIMESTAMPTZ | | +| `effective_to` | TIMESTAMPTZ | | +| `settlement_mode` | enum | Defaults to credit-then-invoice settlement (see openmeter/ent/schema/productcatalog.go:57). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:78) +- version >= 1 +- phases/addons ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit Plan.Fields() in productcatalog.go and regenerate. + +### `Addon` *(table)* + +A versioned add-on product (single or multi instance) that can be attached to plans and subscriptions; annotations are GIN-indexed (see openmeter/ent/schema/addon.go:16). + +- **Location:** `openmeter/ent/schema/addon.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `key` | TEXT | | +| `version` | INT | | +| `currency` | TEXT | | +| `instance_type` | enum | | +| `effective_from` | TIMESTAMPTZ | | +| `effective_to` | TIMESTAMPTZ | | +| `annotations` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key, version) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:72) +- GIN INDEX(annotations) +- ratecards/plans/subscription_addons ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit Addon.Fields() in addon.go and regenerate. + +### `ChargeFlatFee` *(table)* + +Flat-fee charge subtype: payment term, pro-rating, pre/post-proration amounts, settlement and detailed status; has realization runs (see openmeter/ent/schema/chargesflatfee.go:23). + +- **Location:** `openmeter/ent/schema/chargesflatfee.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/flatfee` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id (chargemeta.Mixin)` | char(26) | | +| `namespace` | TEXT | | +| `customer_id` | char(26) | | +| `payment_term` | TEXT | | +| `invoice_at` | TIMESTAMPTZ | | +| `settlement_mode` | enum | | +| `discounts` | jsonb | | +| `pro_rating` | enum | | +| `feature_key` | TEXT | | +| `feature_id` | char(26) | | +| `amount_before_proration` | numeric | | +| `amount_after_proration` | numeric | | +| `current_realization_run_id` | char(26) | | +| `status_detailed` | enum | | +| `tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- INDEX(tax_code_id) +- tax_code FK ON DELETE SET NULL + +**Lifecycle:** +- *How to add:* Edit ChargeFlatFee.Fields() in chargesflatfee.go and regenerate. + +### `Meter` *(table)* + +Definition of how to aggregate raw usage events (event_type + aggregation + optional value_property/group_by) into a metered value; event_from bounds which events count (see openmeter/ent/schema/meter.go:14). + +- **Location:** `openmeter/ent/schema/meter.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/meter` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `key` | TEXT | | +| `name` | TEXT | | +| `description` | TEXT | | +| `metadata` | jsonb | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `event_type` | TEXT | CloudEvents `type` value this meter filters on when scanning the ClickHouse events table (see openmeter/ent/schema/meter.go:30). | +| `value_property` | TEXT | JSONPath into the event data extracting the numeric value; optional for COUNT aggregation (see openmeter/ent/schema/meter.go:32). | +| `group_by` | jsonb | | +| `aggregation` | enum | | +| `event_from` | TIMESTAMPTZ | If set, only events at/after this time are included in the meter (see openmeter/ent/schema/meter.go:36). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/meter.go:43) +- INDEX(namespace, event_type) +- soft_delete (deleted_at) + +**Lifecycle:** +- *How to add:* Edit Meter.Fields() and regenerate. Meters are the bridge between Postgres definitions and the ClickHouse om__events table queried by openmeter/streaming/clickhouse/meter_query.go. +- *How to read:* Meter aggregation queries run against ClickHouse via the streaming connector, not Postgres. + +### `ChargeUsageBasedRuns` *(table)* + +A realization run for a usage-based charge; stored_at_lt is the late-arriving-event cutoff and metered_quantity the measured usage for the period (see openmeter/ent/schema/chargesusagebased.go:143). + +- **Location:** `openmeter/ent/schema/chargesusagebased.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/usagebased` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `charge_id` | char(26) | | +| `feature_id` | char(26) | | +| `type` | enum | | +| `initial_type` | enum | | +| `stored_at_lt` | TIMESTAMPTZ | Upper bound on event stored_at included in this run, implementing the late-arriving usage cutoff (see openmeter/ent/schema/chargesusagebased.go:179). | +| `service_period_to` | TIMESTAMPTZ | | +| `detailed_lines_present` | BOOL | | +| `line_id` | char(26) | | +| `invoice_id` | char(26) | | +| `metered_quantity` | numeric | | +| `no_fiat_transaction_required` | BOOL | | +| `totals fields` | numeric | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, charge_id) +- FK feature_id → features.id (required) + +**Lifecycle:** +- *How to add:* Edit ChargeUsageBasedRuns.Fields() and regenerate. + +### `ChargesSearchV1` *(value_object)* + +Postgres VIEW UNION-ALLing charge_credit_purchases, charge_flat_fees and charge_usage_based into a unified searchable charge-meta surface; declared as ent.View with no mixins (see openmeter/ent/schema/charges.go:48). + +- **Location:** `openmeter/ent/schema/charges.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/meta` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `type` | enum | | +| `id` | char(26) | | +| `namespace` | TEXT | | +| `customer_id` | char(26) | | +| `status` | TEXT | | +| `unique_reference_id` | TEXT | | +| `currency` | TEXT | | +| `managed_by` | TEXT | | +| `subscription_id/subscription_phase_id/subscription_item_id` | TEXT | | +| `advance_after` | TIMESTAMPTZ | | +| `service_period_from/to` | TIMESTAMPTZ | | +| `billing_period_from/to` | TIMESTAMPTZ | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | TEXT | | + +**Data Guarantees:** +- read-only view; per AGENTS.md ent.View DDL may need explicit SQL migration (not in migrate.Tables) + +**Lifecycle:** +- *How to add:* Modify buildChargesSearchV1TableSelector / chargesSearchV1Columns in charges.go. Per the AGENTS.md ent.View caveat, view DDL may need a hand-written SQL migration since views don't appear in generated migrate.Tables. + +### `BillingInvoiceLineDiscount` *(table)* + +Amount discount applied to an invoice line (reason + amount + rounding); several quantity fields are deprecated after splitting amount vs usage discount tables (see openmeter/ent/schema/billing.go:755). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `line_id` | char(26) | | +| `child_unique_reference_id` | TEXT | | +| `description` | TEXT | | +| `reason` | enum | | +| `amount` | numeric | | +| `rounding_amount` | numeric | | +| `source_discount` | jsonb | | +| `type` | TEXT | Deprecated after splitting amount/usage discount tables (see openmeter/ent/schema/billing.go:793). | +| `quantity` | numeric | | +| `pre_line_period_quantity` | numeric | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:820) +- FK line_id → billing_invoice_lines.id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `ChargeFlatFeeRun` *(table)* + +A realization run for a flat-fee charge over a service period, producing detailed lines / payment / invoiced-usage and linking to invoice lines (see openmeter/ent/schema/chargesflatfee.go:141). + +- **Location:** `openmeter/ent/schema/chargesflatfee.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/flatfee` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `charge_id` | char(26) | | +| `type` | enum | | +| `initial_type` | enum | | +| `service_period_from/to` | TIMESTAMPTZ | | +| `line_id` | char(26) | | +| `invoice_id` | char(26) | | +| `amount_after_proration` | numeric | | +| `no_fiat_transaction_required` | BOOL | | +| `immutable` | BOOL | | +| `totals fields` | numeric | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, charge_id) +- line_id/invoice_id FK ON DELETE SET NULL + +**Lifecycle:** +- *How to add:* Edit ChargeFlatFeeRun.Fields() and regenerate. + +### `ChargeUsageBased` *(table)* + +Usage-based charge subtype tied to a feature with rating engine, price JSON and realization runs; table explicitly named charge_usage_based (see openmeter/ent/schema/chargesusagebased.go:24). + +- **Location:** `openmeter/ent/schema/chargesusagebased.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/usagebased` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `customer_id` | char(26) | | +| `invoice_at` | TIMESTAMPTZ | | +| `settlement_mode` | enum | | +| `discounts` | jsonb | | +| `feature_key` | TEXT | | +| `feature_id` | char(26) | | +| `rating_engine` | enum | | +| `price` | jsonb | | +| `current_realization_run_id` | char(26) | | +| `status_detailed` | enum | | +| `tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- INDEX(tax_code_id) +- FK feature_id → features.id (required) + +**Lifecycle:** +- *How to add:* Edit ChargeUsageBased.Fields() in chargesusagebased.go and regenerate. Note Annotations() forces table name to charge_usage_based. + +### `AddonRateCard` *(table)* + +RateCard belonging to an Addon (same RateCard mixin shape as PlanRateCard) (see openmeter/ent/schema/addon.go:87). + +- **Location:** `openmeter/ent/schema/addon.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `key` | TEXT | | +| `name` | TEXT | | +| `tax_code_id` | char(26) | | +| `tax_behavior` | enum | | +| `type` | enum | | +| `feature_key` | TEXT | | +| `price` | jsonb | | +| `discounts` | jsonb | | +| `addon_id` | TEXT | | +| `feature_id` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(addon_id, key) WHERE deleted_at IS NULL +- UNIQUE(addon_id, feature_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/addon.go:139) + +**Lifecycle:** +- *How to add:* Edit AddonRateCard.Fields() and regenerate. + +### `LedgerSubAccountRoute` *(table)* + +Routing rule mapping a routing_key (currency/tax/feature/cost-basis/priority dimensions, denormalized as literal columns, not FKs) to a sub-account within an account (see openmeter/ent/schema/ledger_account.go:96). + +- **Location:** `openmeter/ent/schema/ledger_account.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `account_id` | char(26) | | +| `routing_key_version` | TEXT | | +| `routing_key` | TEXT | | +| `currency` | TEXT | Literal routing value denormalized from routing_key for filtering, not a FK (see openmeter/ent/schema/ledger_account.go:117). | +| `tax_code` | TEXT | Stores the TaxCode.Key string as a routing dimension, not a FK to tax_codes (see openmeter/ent/schema/ledger_account.go:119). | +| `tax_behavior` | TEXT | | +| `features` | text[] | | +| `cost_basis` | numeric | | +| `credit_priority` | INT | | +| `transaction_authorization_status` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, account_id, routing_key_version, routing_key) (see openmeter/ent/schema/ledger_account.go:140) +- FK account_id (required) + +**Lifecycle:** +- *How to add:* Edit LedgerSubAccountRoute.Fields() and regenerate. The features text[] column was changed via migration 20260604143000_ledger_route_features_text_array; tax_behavior added in 20260520130500. + +### `PlanPhase` *(table)* + +An ordered phase within a Plan (index + optional duration) that groups ratecards (see openmeter/ent/schema/productcatalog.go:86). + +- **Location:** `openmeter/ent/schema/productcatalog.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `key` | TEXT | | +| `plan_id` | TEXT | | +| `index` | uint8 | | +| `duration` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(plan_id, key) WHERE deleted_at IS NULL +- UNIQUE(plan_id, index) WHERE deleted_at IS NULL (see openmeter/ent/schema/productcatalog.go:133) +- ratecards ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit PlanPhase.Fields() and regenerate. + +### `SubscriptionPhase` *(table)* + +A time-bounded phase of a subscription; sort_hint disambiguates phases that share an active_from (zero-length phases) (see openmeter/ent/schema/subscription.go:95). + +- **Location:** `openmeter/ent/schema/subscription.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subscription` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `metadata` | jsonb | | +| `subscription_id` | TEXT | | +| `key` | TEXT | | +| `name` | TEXT | | +| `description` | TEXT | | +| `active_from` | TIMESTAMPTZ | | +| `sort_hint` | uint8 | Tie-breaker for ordering phases with equal active_from (see openmeter/ent/schema/subscription.go:115). | + +**Data Guarantees:** +- PK id +- INDEX(namespace, subscription_id, key) +- FK subscription_id → subscriptions.id ON DELETE CASCADE +- items ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit SubscriptionPhase.Fields() and regenerate. + +### `ChargeCreditPurchase` *(table)* + +Credit-purchase charge subtype: credit amount, effective/expiry window, priority, feature filters, settlement JSON and detailed status; links to a granted credit + payment edges (see openmeter/ent/schema/chargescreditpurchase.go:21). + +- **Location:** `openmeter/ent/schema/chargescreditpurchase.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/creditpurchase` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `customer_id` | char(26) | | +| `credit_amount` | numeric | | +| `effective_at` | TIMESTAMPTZ | | +| `expires_at` | TIMESTAMPTZ | | +| `priority` | INT | | +| `feature_filters` | text[] | Restricts which features the purchased credit applies to (added in migration 20260605120000) (see openmeter/ent/schema/chargescreditpurchase.go:50). | +| `settlement` | jsonb | | +| `status_detailed` | enum | | +| `tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- INDEX(tax_code_id) +- FK customer_id → customers.id (required) + +**Lifecycle:** +- *How to add:* Edit ChargeCreditPurchase.Fields() in chargescreditpurchase.go and regenerate. feature_filters was added via tools/migrate/migrations/20260605120000_add_credit_feature_filters.up.sql. + + ``` + ALTER TABLE "charge_credit_purchases" ADD COLUMN "feature_filters" text[] NULL; + ``` + + +### `NotificationEventDeliveryStatus` *(table)* + +Per-(event, channel) delivery state machine row with reason, next_attempt_at and an attempts history; drives the reconciliation/retry loop (see openmeter/ent/schema/notification.go:170). + +- **Location:** `openmeter/ent/schema/notification.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/notification` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `event_id` | TEXT | | +| `channel_id` | TEXT | | +| `state` | enum | | +| `reason` | TEXT | | +| `next_attempt_at` | TIMESTAMPTZ | When the reconciliation loop should next retry delivery (see openmeter/ent/schema/notification.go:201). | +| `attempts` | jsonb | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, event_id, channel_id), INDEX(namespace, state, next_attempt_at) — drives retry polling (see openmeter/ent/schema/notification.go:220) + +**Lifecycle:** +- *How to add:* Edit NotificationEventDeliveryStatus.Fields() and regenerate. +- *How to read:* Reconciliation loop polls state + next_attempt_at; see the /notification skill. + +### `PlanAddon` *(table)* + +Join table declaring which Addon is available for a Plan, from which phase and up to what quantity (see openmeter/ent/schema/planaddon.go:13). + +- **Location:** `openmeter/ent/schema/planaddon.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/productcatalog` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `plan_id` | TEXT | | +| `addon_id` | TEXT | | +| `from_plan_phase` | TEXT | | +| `max_quantity` | INT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, plan_id, addon_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/planaddon.go:65) + +**Lifecycle:** +- *How to add:* Edit PlanAddon.Fields() and regenerate. + +### `BalanceSnapshot` *(table)* + +Cached point-in-time credit balance for an entitlement owner (grant_balances + usage + overage at a timestamp), used to avoid recomputing the full ledger from scratch (see openmeter/ent/schema/balance_snapshot.go:15). + +- **Location:** `openmeter/ent/schema/balance_snapshot.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/credit/balance` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `owner_id` | char(26) | | +| `grant_balances` | jsonb | | +| `usage` | jsonb | | +| `balance` | numeric | | +| `overage` | numeric | | +| `at` | TIMESTAMPTZ | The instant this balance was snapshotted; queried as the high-water mark for resuming balance computation (see openmeter/ent/schema/balance_snapshot.go:43). | + +**Data Guarantees:** +- INDEX(namespace, owner_id, at) WHERE deleted_at IS NULL (see openmeter/ent/schema/balance_snapshot.go:49) +- FK owner_id → entitlements.id ON DELETE CASCADE +- all value fields Immutable + +**Lifecycle:** +- *How to add:* Edit BalanceSnapshot.Fields() and regenerate. + +### `BillingInvoiceLineUsageDiscount` *(table)* + +Usage (quantity) discount applied to a usage-based invoice line (see openmeter/ent/schema/billing.go:838). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `line_id` | char(26) | | +| `child_unique_reference_id` | TEXT | | +| `description` | TEXT | | +| `reason` | enum | | +| `quantity` | numeric | | +| `pre_line_period_quantity` | numeric | | +| `reason_details` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL +- FK line_id → billing_invoice_lines.id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `UsageReset` *(table)* + +Records an entitlement usage-period reset event (reset_time + anchor + interval); the entitlement's effective anchor is derived from the latest reset rather than from the entitlement row (see openmeter/ent/schema/usage_reset.go:14). + +- **Location:** `openmeter/ent/schema/usage_reset.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/entitlement` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `entitlement_id` | char(26) | | +| `reset_time` | TIMESTAMPTZ | | +| `anchor` | TIMESTAMPTZ | | +| `usage_period_interval` | TEXT | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, entitlement_id, reset_time) +- FK entitlement_id → entitlements.id ON DELETE CASCADE +- all fields Immutable + +**Lifecycle:** +- *How to add:* Edit UsageReset.Fields() and regenerate. + +### `AppStripe` *(table)* + +Stripe app configuration (account id, livemode, webhook id, and sensitive api_key/webhook_secret) (see openmeter/ent/schema/app_stripe.go:15). + +- **Location:** `openmeter/ent/schema/app_stripe.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app/stripe` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `stripe_account_id` | TEXT | | +| `stripe_livemode` | BOOL | | +| `api_key` | TEXT | Ent Sensitive() field — redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:31). | +| `masked_api_key` | TEXT | | +| `stripe_webhook_id` | TEXT | | +| `webhook_secret` | TEXT | Ent Sensitive() field — redacted in logs/serialization (see openmeter/ent/schema/app_stripe.go:34). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, stripe_account_id, stripe_livemode) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:40) + +**Lifecycle:** +- *How to add:* Edit AppStripe.Fields() and regenerate. Use .Sensitive() for secret columns. + +### `BillingInvoiceValidationIssue` *(table)* + +A validation issue attached to an invoice, deduped per invoice via a 32-byte dedupe_hash (see openmeter/ent/schema/billing.go:1249). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `invoice_id` | char(26) | | +| `severity` | enum | | +| `code` | TEXT | | +| `message` | TEXT | | +| `path` | TEXT | | +| `component` | TEXT | | +| `dedupe_hash` | bytea(32) | 32-byte hash that dedupes identical issues per invoice via the unique index (see openmeter/ent/schema/billing.go:1286). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, invoice_id, dedupe_hash) (see openmeter/ent/schema/billing.go:1294) +- FK invoice_id → billing_invoices.id ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `Charge` *(table)* + +Polymorphic parent row for a billable charge; exactly one of the three per-type FK columns (flat_fee/credit_purchase/usage_based) points to the subtype, with unique_reference_id for idempotent creation (see openmeter/ent/schema/charges.go:96). + +- **Location:** `openmeter/ent/schema/charges.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `unique_reference_id` | TEXT | Idempotency key for a charge; uniqueness is enforced only when set and not deleted (see openmeter/ent/schema/charges.go:116). | +| `type` | enum | | +| `charge_flat_fee_id` | TEXT | | +| `charge_credit_purchase_id` | TEXT | | +| `charge_usage_based_id` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/charges.go:167) +- exactly one of the three subtype FK columns is set + +**Lifecycle:** +- *How to add:* Edit Charge.Fields() in charges.go and regenerate. See the /charges skill for charge creation and advancement. +- *How to read:* The ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables) provides a unified read surface (see openmeter/ent/schema/charges.go:48). + +### `CreditRealizationLineage` *(table)* + +Tracks the lineage of a realized credit allocation for a charge (root_realization_id + origin_kind + advance_features), with closeable segments (see openmeter/ent/schema/creditrealizationlineage.go:24). + +- **Location:** `openmeter/ent/schema/creditrealizationlineage.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/creditrealization` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `charge_id` | char(26) | | +| `root_realization_id` | char(26) | | +| `customer_id` | char(26) | | +| `currency` | varchar(3) | | +| `origin_kind` | enum | | +| `advance_features` | text[] | Feature filters carried by the originating advance (added in migration 20260605120000) (see openmeter/ent/schema/creditrealizationlineage.go:65). | +| `created_at` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, root_realization_id) (see openmeter/ent/schema/creditrealizationlineage.go:91) +- FK charge_id → charges.id (required) + +**Lifecycle:** +- *How to add:* Edit CreditRealizationLineage.Fields() and regenerate. + +### `CreditRealizationLineageSegment` *(table)* + +A segment of a credit realization lineage tracking amount + state transitions and backing transaction groups; closed_at marks settlement (see openmeter/ent/schema/creditrealizationlineage.go:97). + +- **Location:** `openmeter/ent/schema/creditrealizationlineage.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/creditrealization` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `lineage_id` | char(26) | | +| `amount` | numeric | | +| `state` | enum | | +| `backing_transaction_group_id` | char(26) | | +| `source_state` | enum | | +| `source_backing_transaction_group_id` | char(26) | | +| `closed_at` | TIMESTAMPTZ | | +| `created_at` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- INDEX(lineage_id, closed_at) +- FK lineage_id → credit_realization_lineages.id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. This table has no namespace/time mixins. + +### `NotificationChannel` *(table)* + +A delivery channel (currently webhook) holding a type-tagged config JSON resolved by a custom value scanner (see openmeter/ent/schema/notification.go:21). + +- **Location:** `openmeter/ent/schema/notification.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/notification` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `annotations` | jsonb | | +| `metadata` | jsonb | | +| `type` | enum | | +| `name` | TEXT | | +| `disabled` | BOOL | | +| `config` | jsonb | Type-discriminated channel config (e.g. webhook), serialized via ChannelConfigValueScanner (see openmeter/ent/schema/notification.go:230). | + +**Data Guarantees:** +- PK id +- INDEX(namespace, type) + +**Lifecycle:** +- *How to add:* Edit NotificationChannel.Fields() in notification.go and regenerate. New config variants need a case added to ChannelConfigValueScanner. See the /notification skill. + +### `NotificationRule` *(table)* + +A rule binding an event type to channels with a type-tagged config (balance threshold, entitlement reset, invoice created/updated) (see openmeter/ent/schema/notification.go:67). + +- **Location:** `openmeter/ent/schema/notification.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/notification` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `annotations` | jsonb | | +| `metadata` | jsonb | | +| `type` | enum | | +| `name` | TEXT | | +| `disabled` | BOOL | | +| `config` | jsonb | Type-discriminated rule config serialized via RuleConfigValueScanner (see openmeter/ent/schema/notification.go:290). | + +**Data Guarantees:** +- PK id +- INDEX(namespace, type) + +**Lifecycle:** +- *How to add:* Edit NotificationRule.Fields() and regenerate. New event-type configs require a case in RuleConfigValueScanner. + +### `Subject` *(table)* + +The metered identity (e.g. a user/account key) that events are attributed to; carries optional stripe_customer_id and free-form metadata (see openmeter/ent/schema/subject.go:13). + +- **Location:** `openmeter/ent/schema/subject.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subject` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `key` | TEXT | | +| `display_name` | TEXT | | +| `stripe_customer_id` | TEXT | | +| `metadata` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/subject.go:45) +- UNIQUE(namespace, id) +- INDEX(display_name), INDEX(created_at, id) +- soft_delete (deleted_at) + +**Lifecycle:** +- *How to add:* Edit Subject.Fields() in subject.go, regenerate and diff a migration. + +### `TaxCode` *(table)* + +A reusable tax code resource with optional per-app mappings, referenced by ratecards, lines, charges and org defaults (see openmeter/ent/schema/taxcode.go:18). + +- **Location:** `openmeter/ent/schema/taxcode.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/taxcode` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `key` | TEXT | | +| `name` | TEXT | | +| `description` | TEXT | | +| `metadata` | jsonb | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `app_mappings` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, key) WHERE deleted_at IS NULL (see openmeter/ent/schema/taxcode.go:44) + +**Lifecycle:** +- *How to add:* Edit TaxCode.Fields() and regenerate. Migration 20260527120000_dedupe_tax_codes_by_app_mapping consolidated duplicate tax codes. + +### `App` *(table)* + +An installed integration/app of a given type and status (e.g. stripe, custom-invoicing); linked to customers and used as tax/invoicing/payment provider on billing profiles and invoices (see openmeter/ent/schema/app.go:16). + +- **Location:** `openmeter/ent/schema/app.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `name` | TEXT | | +| `description` | TEXT | | +| `type` | TEXT | | +| `status` | TEXT | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, type) +- customer_apps ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit App.Fields() in app.go and regenerate. + +### `BillingInvoiceUsageBasedLineConfig` *(table)* + +Usage-based line config: price type, feature key, price JSON and pre-line/metered quantities (see openmeter/ent/schema/billing.go:541). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `price_type` | enum | | +| `feature_key` | TEXT | | +| `price` | jsonb | | +| `pre_line_period_quantity` | numeric | | +| `metered_pre_line_period_quantity` | numeric | | +| `metered_quantity` | numeric | | + +**Data Guarantees:** +- PK id + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `BillingStandardInvoiceDetailedLineAmountDiscount` *(table)* + +Amount discount on a standard-invoice detailed line (see openmeter/ent/schema/billing.go:956). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `line_id` | char(26) | | +| `child_unique_reference_id` | TEXT | | +| `reason` | enum | | +| `amount` | numeric | | +| `rounding_amount` | numeric | | +| `source_discount` | jsonb | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, line_id, child_unique_reference_id) WHERE child_unique_reference_id IS NOT NULL AND deleted_at IS NULL (see openmeter/ent/schema/billing.go:996) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `ChargeUsageBasedRunDetailedLine` *(table)* + +Detailed (priced) line produced by a usage-based realization run; corrects_run_id links a correction line back to a superseded run (see openmeter/ent/schema/chargesusagebased.go:260). + +- **Location:** `openmeter/ent/schema/chargesusagebased.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/charges/usagebased` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `charge_id` | char(26) | | +| `run_id` | char(26) | | +| `pricer_reference_id` | TEXT | | +| `corrects_run_id` | char(26) | | +| `child_unique_reference_id (stddetailedline.Mixin)` | TEXT | | +| `tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, charge_id, run_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/chargesusagebased.go:324) +- table explicitly named charge_usage_based_run_detailed_line + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `LedgerEntry` *(table)* + +A single signed amount posting against a sub-account within a transaction; identity_key dedupes entries within a (transaction, sub_account) (see openmeter/ent/schema/ledger_entry.go:15). + +- **Location:** `openmeter/ent/schema/ledger_entry.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `sub_account_id` | char(26) | | +| `identity_key` | TEXT | Per-(transaction, sub_account) dedup key enforced by a unique index; defaults to empty string (see openmeter/ent/schema/ledger_entry.go:33). | +| `amount` | numeric | | +| `transaction_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(transaction_id, sub_account_id, identity_key) (see openmeter/ent/schema/ledger_entry.go:67) +- amount immutable +- FK transaction_id, sub_account_id (required, immutable) + +**Lifecycle:** +- *How to add:* Edit LedgerEntry.Fields() and regenerate. Entries are append-only (immutable amount). + +### `SubscriptionAddon` *(table)* + +An instantiated addon attached to a subscription; quantity history lives in SubscriptionAddonQuantity (see openmeter/ent/schema/subscription_addon.go:14). + +- **Location:** `openmeter/ent/schema/subscription_addon.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subscription` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `addon_id` | TEXT | | +| `subscription_id` | TEXT | | + +**Data Guarantees:** +- PK id +- FK subscription_id → subscriptions.id (required), FK addon_id → addons.id (required) +- quantities ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit SubscriptionAddon.Fields() and regenerate. + +### `SubscriptionAddonQuantity` *(table)* + +Append-only quantity-over-time records for a SubscriptionAddon (active_from + immutable quantity) (see openmeter/ent/schema/subscription_addon.go:56). + +- **Location:** `openmeter/ent/schema/subscription_addon.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/subscription` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `updated_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | +| `active_from` | TIMESTAMPTZ | | +| `quantity` | INT | | +| `subscription_addon_id` | TEXT | | + +**Data Guarantees:** +- PK id +- quantity >= 0, immutable +- FK subscription_addon_id → subscription_addons.id ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit SubscriptionAddonQuantity.Fields() and regenerate. + +### `CurrencyCostBasis` *(table)* + +Time-effective exchange rate of a custom currency to a fiat code (see openmeter/ent/schema/custom_currencies.go:61). + +- **Location:** `openmeter/ent/schema/custom_currencies.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/currency` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `custom_currency_id` | char(26) | | +| `fiat_code` | TEXT | | +| `rate` | numeric | | +| `effective_from` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, custom_currency_id, fiat_code, effective_from) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:108) +- FK custom_currency_id → custom_currencies.id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `NotificationEvent` *(table)* + +A fired notification event instance carrying a JSON payload and the rule_id that produced it (see openmeter/ent/schema/notification.go:118). + +- **Location:** `openmeter/ent/schema/notification.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/notification` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at` | TIMESTAMPTZ | | +| `type` | enum | | +| `rule_id` | char(26) | | +| `payload` | jsonb | | + +**Data Guarantees:** +- PK id +- INDEX(namespace, type) +- FK rule_id → notification_rules.id (required) + +**Lifecycle:** +- *How to add:* Edit NotificationEvent.Fields() and regenerate. Note: only created_at (no updated/deleted) — events are append-only. + +### `AppStripeCustomer` *(table)* + +Links a Stripe app to a Customer with the Stripe customer id and default payment method (see openmeter/ent/schema/app_stripe.go:62). + +- **Location:** `openmeter/ent/schema/app_stripe.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app/stripe` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `app_id` | char(26) | | +| `customer_id` | char(26) | | +| `stripe_customer_id` | TEXT | | +| `stripe_default_payment_method_id` | TEXT | | + +**Data Guarantees:** +- UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL +- UNIQUE(app_id, stripe_customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app_stripe.go:93) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `BillingInvoiceFlatFeeLineConfig` *(table)* + +Per-unit amount + category + payment term config for a flat-fee invoice line (see openmeter/ent/schema/billing.go:511). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `per_unit_amount` | numeric | | +| `category` | enum | | +| `payment_term` | enum | | +| `index` | INT | Sort order, only meaningful for detailed lines (see openmeter/ent/schema/billing.go:534). | + +**Data Guarantees:** +- PK id + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `BillingStandardInvoiceDetailedLine` *(table)* + +Detailed (child) line of a standard invoice produced by the v2 line model, linked to a parent BillingInvoiceLine (see openmeter/ent/schema/billing.go:898). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `invoice_id` | char(26) | | +| `parent_line_id` | char(26) | | +| `child_unique_reference_id` | TEXT | | +| `tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, parent_line_id, child_unique_reference_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/billing.go:926) +- FK invoice_id, parent_line_id (required) + +**Lifecycle:** +- *How to add:* Fields come mostly from stddetailedline.Mixin. Edit and regenerate. + +### `CustomCurrency` *(table)* + +A namespace-defined non-fiat currency (code/name/symbol) with a cost-basis history; e.g. for credit-token style billing (see openmeter/ent/schema/custom_currencies.go:16). + +- **Location:** `openmeter/ent/schema/custom_currencies.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/currency` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `code` | TEXT | | +| `name` | TEXT | | +| `symbol` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, code) WHERE deleted_at IS NULL (see openmeter/ent/schema/custom_currencies.go:51) +- cost_basis_history ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `LedgerCustomerAccount` *(table)* + +Private link table mapping a customer to their ledger accounts — one FBO and one Receivable account per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:14). + +- **Location:** `openmeter/ent/schema/ledger_customer_account.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `customer_id` | TEXT | | +| `account_type` | enum | | +| `account_id` | TEXT | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, customer_id, account_type) — one FBO + one Receivable per customer per namespace (see openmeter/ent/schema/ledger_customer_account.go:38) + +**Lifecycle:** +- *How to add:* Edit and regenerate. AGENTS.md notes that when credits.enabled is false, ledger account services are noop; backfills writing real ledger_customer_accounts rows must construct concrete adapters directly. + +### `LedgerSubAccount` *(table)* + +A sub-account keyed by (account_id, route_id) that holds ledger entries (see openmeter/ent/schema/ledger_account.go:48). + +- **Location:** `openmeter/ent/schema/ledger_account.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `account_id` | char(26) | | +| `route_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, account_id, route_id) +- FK account_id, route_id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `LedgerTransaction` *(table)* + +A booked transaction within a group, dated by booked_at, made up of balanced entries (see openmeter/ent/schema/ledger_transaction.go:13). + +- **Location:** `openmeter/ent/schema/ledger_transaction.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `group_id` | char(26) | | +| `booked_at` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, id) +- INDEX(namespace, booked_at) +- FK group_id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `SubscriptionBillingSyncState` *(table)* + +Per-subscription bookkeeping for the billing sync bridge: whether it has billables, when it was last synced, and when the next sync is due (see openmeter/ent/schema/subscriptionbillingsync.go:13). + +- **Location:** `openmeter/ent/schema/subscriptionbillingsync.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing/worker/subscriptionsync` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `subscription_id` | char(26) | | +| `has_billables` | BOOL | | +| `synced_at` | TIMESTAMPTZ | | +| `next_sync_after` | TIMESTAMPTZ | Schedules the next reconciliation pass; NULL means no pending re-sync (see openmeter/ent/schema/subscriptionbillingsync.go:28). | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, subscription_id) (see openmeter/ent/schema/subscriptionbillingsync.go:41) +- FK subscription_id → subscriptions.id ON DELETE CASCADE + +**Lifecycle:** +- *How to add:* Edit SubscriptionBillingSyncState.Fields() and regenerate. This table has no TimeMixin (no created/updated/deleted_at). + +### `AppCustomInvoicing` *(table)* + +Custom-invoicing app config toggling draft/issuing sync hooks (see openmeter/ent/schema/appcustominvoicing.go:15). + +- **Location:** `openmeter/ent/schema/appcustominvoicing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app/custominvoicing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `enable_draft_sync_hook` | BOOL | | +| `enable_issuing_sync_hook` | BOOL | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, id) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `AppCustomInvoicingCustomer` *(table)* + +Links a custom-invoicing app to a Customer (see openmeter/ent/schema/appcustominvoicing.go:54). + +- **Location:** `openmeter/ent/schema/appcustominvoicing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app/custominvoicing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `metadata` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `app_id` | char(26) | | +| `customer_id` | char(26) | | + +**Data Guarantees:** +- UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `CustomerSubjects` *(table)* + +Join table linking a Customer to one or more subject keys (the metering identity); FK to Subject.key is intentionally absent because Ent cannot FK non-ID fields (see openmeter/ent/schema/customer.go:147). + +- **Location:** `openmeter/ent/schema/customer.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/customer` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `customer_id` | char(26) | | +| `subject_key` | TEXT | | +| `created_at` | TIMESTAMPTZ | | +| `deleted_at` | TIMESTAMPTZ | | + +**Data Guarantees:** +- UNIQUE(namespace, subject_key) WHERE deleted_at IS NULL (see openmeter/ent/schema/customer.go:123) +- FK customer_id → customers.id ON DELETE CASCADE +- soft_delete (deleted_at) + +**Lifecycle:** +- *How to add:* Edit CustomerSubjects in customer.go and regenerate. + +### `LedgerAccount` *(table)* + +A double-entry ledger account of a given account_type; parent of sub-accounts and routing rows (see openmeter/ent/schema/ledger_account.go:16). + +- **Location:** `openmeter/ent/schema/ledger_account.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `account_type` | enum | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, id) + +**Lifecycle:** +- *How to add:* Edit LedgerAccount.Fields() in ledger_account.go and regenerate. See the /ledger skill. + +### `OrganizationDefaultTaxCodes` *(table)* + +Per-namespace default tax codes for invoicing and credit grants; namespace declared explicitly (not via mixin) to keep a unique constraint (see openmeter/ent/schema/organizationdefaulttaxcodes.go:15). + +- **Location:** `openmeter/ent/schema/organizationdefaulttaxcodes.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/taxcode` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `namespace` | TEXT | | +| `invoicing_tax_code_id` | char(26) | | +| `credit_grant_tax_code_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace) WHERE deleted_at IS NULL (see openmeter/ent/schema/organizationdefaulttaxcodes.go:57) +- FK both tax_code ids → tax_codes.id (required) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `AppCustomer` *(table)* + +Join table linking an App install to a Customer (see openmeter/ent/schema/app.go:53). + +- **Location:** `openmeter/ent/schema/app.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/app` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | +| `app_id` | char(26) | | +| `customer_id` | char(26) | | + +**Data Guarantees:** +- UNIQUE(namespace, app_id, customer_id) WHERE deleted_at IS NULL (see openmeter/ent/schema/app.go:77) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `LedgerTransactionGroup` *(table)* + +Groups related ledger transactions that must be booked atomically (see openmeter/ent/schema/ledger_transaction_group.go:11). + +- **Location:** `openmeter/ent/schema/ledger_transaction_group.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/ledger` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) | | +| `namespace` | TEXT | | +| `annotations` | jsonb | | +| `created_at/updated_at/deleted_at` | TIMESTAMPTZ | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, id) + +**Lifecycle:** +- *How to add:* Edit and regenerate. + +### `BillingCustomerLock` *(table)* + +Row used as a per-customer advisory lock during billing mutations (one row per customer) (see openmeter/ent/schema/billing.go:1334). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | char(26) ULID | | +| `namespace` | TEXT | | +| `customer_id` | char(26) | | + +**Data Guarantees:** +- PK id +- UNIQUE(namespace, customer_id) (see openmeter/ent/schema/billing.go:1356) + +**Lifecycle:** +- *How to add:* Edit and regenerate. +- *How to read:* Locked via SELECT ... FOR UPDATE during billing mutations. + +### `BillingSequenceNumbers` *(table)* + +Monotonic counter per (namespace, scope) for generating invoice numbers (see openmeter/ent/schema/billing.go:1308). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `namespace` | TEXT | | +| `scope` | TEXT | | +| `last` | numeric | | + +**Data Guarantees:** +- UNIQUE(namespace, scope) (see openmeter/ent/schema/billing.go:1330) + +**Lifecycle:** +- *How to add:* Edit and regenerate. No id/audit columns — keyed by (namespace, scope). + +### `BillingInvoiceWriteSchemaLevel` *(table)* + +Temporary single-row-keyed table tracking the active write schema level for billing invoices during the line-model migration (see openmeter/ent/schema/billing.go:1363). + +- **Location:** `openmeter/ent/schema/billing.go` +- **Store:** `primary_postgres` +- **Owner:** `openmeter/billing` + +**Fields:** + +| Field | Type | Description | +|---|---|---| +| `id` | TEXT | | +| `schema_level` | INT | | + +**Data Guarantees:** +- PK id (UNIQUE) + +**Lifecycle:** +- *How to add:* Temporary migration table; no mixins. Edit and regenerate. + +## Persistence Stores + +_Where data lives across process or session boundaries — databases, caches, queues, mobile local storage._ + +### `primary_postgres` + +Source-of-truth control-plane store; schema is defined in Ent (openmeter/ent/schema/*.go) and migrated with Atlas-generated golang-migrate SQL. Almost all tables are namespace-scoped with ULID char(26) ids and deleted_at soft-deletes (see openmeter/ent/schema/customer.go:21). + +- **Engine:** PostgreSQL (Ent ORM + Atlas migrations + pgx) +- **Role:** primary +- **Migrations dir:** `tools/migrate/migrations` +- **Lives here:** Customer, CustomerSubjects, Subject, Meter, Feature, Entitlement, Grant, BalanceSnapshot, UsageReset, Plan, PlanPhase, PlanRateCard, Addon, AddonRateCard, PlanAddon, Subscription, SubscriptionPhase, SubscriptionItem, SubscriptionAddon, SubscriptionAddonQuantity, SubscriptionBillingSyncState, BillingProfile, BillingWorkflowConfig, BillingCustomerOverride, BillingInvoice, BillingInvoiceLine, BillingInvoiceFlatFeeLineConfig, BillingInvoiceUsageBasedLineConfig, BillingInvoiceSplitLineGroup, BillingInvoiceLineDiscount, BillingInvoiceLineUsageDiscount, BillingStandardInvoiceDetailedLine, BillingStandardInvoiceDetailedLineAmountDiscount, BillingInvoiceValidationIssue, BillingSequenceNumbers, BillingCustomerLock, BillingInvoiceWriteSchemaLevel, Charge, ChargesSearchV1, ChargeFlatFee, ChargeFlatFeeRun, ChargeUsageBased, ChargeUsageBasedRuns, ChargeUsageBasedRunDetailedLine, ChargeCreditPurchase, CreditRealizationLineage, CreditRealizationLineageSegment, LedgerAccount, LedgerSubAccount, LedgerSubAccountRoute, LedgerTransactionGroup, LedgerTransaction, LedgerEntry, LedgerCustomerAccount, LedgerBreakageRecord, App, AppCustomer, AppStripe, AppStripeCustomer, AppCustomInvoicing, AppCustomInvoicingCustomer, TaxCode, OrganizationDefaultTaxCodes, CustomCurrency, CurrencyCostBasis, LLMCostPrice, NotificationChannel, NotificationRule, NotificationEvent, NotificationEventDeliveryStatus +- **Written by:** App / marketplace integrations, Billing domain, Charges sub-system, Credit & grant domain, Customer domain, Entitlement domain, Ledger domain, Meter domain, Notification domain, Product catalog domain, Subscription domain + +### `redis` + +Cache/coordination store: ingest event deduplication via SET NX keys with TTL (openmeter/dedupe/redisdedupe) and async query progress under progress:: keys with TTL (openmeter/progressmanager/adapter) (see openmeter/dedupe/redisdedupe/redisdedupe.go:32). + +- **Engine:** Redis (go-redis v9) +- **Role:** cache +- **Lives here:** dedupe.Item, Progress + +### `clickhouse_events` + +Append-only analytics store holding raw usage events in per-namespace MergeTree tables named om__events; meters aggregate over it and usage-based billing reads metered quantities from it. Tables are created idempotently on connector startup, not via Atlas (see openmeter/streaming/clickhouse/event_query.go:20). + +- **Engine:** ClickHouse (MergeTree) +- **Role:** analytics +- **Lives here:** RawEvent +- **Written by:** Streaming / usage query (ClickHouse) + +### `kafka_ingest` + +Per-namespace ingest event topics (template om_%s_events) that the API ingest path produces to and the sink-worker consumes (subscribing via regexp ^om__events$) before writing to ClickHouse; plus system event topics om_sys.api_events / om_sys.ingest_events / om_sys.balance_worker_events and the notification DLQ om_sys.notification_service_dlq (see app/config/ingest.go:180, app/config/events.go:230). + +- **Engine:** Kafka (confluent-kafka-go + Watermill) +- **Role:** queue \ No newline at end of file diff --git a/.claude/rules/dev-rules.md b/.claude/rules/dev-rules.md new file mode 100644 index 0000000000..1042f14632 --- /dev/null +++ b/.claude/rules/dev-rules.md @@ -0,0 +1,34 @@ +## Development Rules + +### Anti Pattern + +- Never hand-edit files carrying a `// Code generated by X, DO NOT EDIT.` header — openmeter/ent/db/, **/wire_gen.go, **/convert.gen.go, billing/derived.gen.go, api/api.gen.go, api/v3/api.gen.go, api/client/go/client.gen.go; regenerate via make generate / make gen-api. *(source: `AGENTS.md Code Generation table; openmeter/ent/db/`)* +- Never use panic in non-test code; if a new failure mode is possible, change the function signature to return an error and propagate it. *(source: `AGENTS.md Coding Conventions`)* +- Never introduce context.Background() or context.TODO() to sidestep missing context propagation; propagate the caller's context through the full path, or drop the unused context.Context parameter. *(source: `AGENTS.md Coding Conventions`)* +- Never use raw decimal-equality booleans in tests when precision allows; assert via require.Equal(t, expectedFloat64, actual.InexactFloat64()) and prefer simple float64(5) literals over verbose decimal construction. *(source: `AGENTS.md Testing`)* +- Do not extract helpers that only wrap 2-4 trivial lines/guards without adding domain intent, and remove leftover pass-through wrappers that only call another function — call the underlying function directly. *(source: `AGENTS.md Coding Conventions`)* + +### Boundary + +- In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware: even helpers taking a raw *entdb.Client must wrap their body with entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to the tx already in ctx. *(source: `AGENTS.md Coding Conventions; openmeter/billing/charges adapter`)* +- Keep domain test helpers under openmeter/.../testutils independent of app/common; build test dependencies from underlying constructors (repos, adapters, services, lockr), not the wiring layer, to avoid test-only import cycles. *(source: `AGENTS.md Testing`)* +- ent.View schemas generate query code but do NOT appear in openmeter/ent/db/migrate/schema.go or migrate.Tables; their DDL needs an explicit SQL migration (use `make generate-view-sql` / tools/migrate/cmd/viewgen) — do not assume atlas diff will emit them. *(source: `AGENTS.md Ent view caveat; Makefile generate-view-sql`)* + +### Data Flow + +- When changing the API, edit TypeSpec in api/spec/ first, then run `make gen-api` (OpenAPI + SDKs), then `make generate` (Go server/client). Adding @query to a TypeSpec file without HTTP decorators requires importing @typespec/http and `using TypeSpec.Http;`. *(source: `AGENTS.md Code Generation workflow`)* + +### Pattern To Follow + +- In production constructors/initialization, always require and inject a *slog.Logger explicitly via Config; never fall back to slog.Default(). *(source: `AGENTS.md Coding Conventions; openmeter/notification/service/service.go, openmeter/notification/adapter/adapter.go`)* +- Build a service via its Config struct + New() constructor that validates required dependencies and asserts the interface (var _ Service = (*Service)(nil)); adapters validate via Config.Validate() requiring client+logger. *(source: `openmeter/notification/service/service.go; openmeter/notification/adapter/adapter.go`)* +- For Validate() methods, collect all issues into `var errs []error` and return models.NewNillableGenericValidationError(errors.Join(errs...)); wrap field context with fmt.Errorf("field: %w", err) and use errors.New for simple local checks — do not return on the first invalid field. *(source: `AGENTS.md Coding Conventions`)* +- Use samber/lo helpers instead of local wrappers: slices.Clone for defensive copies, lo.ToPtr for pointer literals, lo.Must only for (value,err) panic-on-failure test setup; never add local ptr/must/loPtr/loMust helpers. *(source: `AGENTS.md Coding Conventions; .agents/skills samber-lo`)* +- For type-translation files/functions use FromAPI.../ToAPI.../FromDB.../ToDB... naming and `map`/`mapped` terminology (never project/projected); follow the /go-types-conversion skill. *(source: `AGENTS.md Coding Conventions; .agents/skills/go-types-conversion`)* +- In tests, prefer t.Context() over context.Background(); pair clock.FreezeTime(...) with defer clock.UnFreeze() in the same scope so later subtests do not inherit frozen time. *(source: `AGENTS.md Testing`)* + +### Wiring + +- Always change the Ent schema in openmeter/ent/schema/*.go first, then run `make generate` to regenerate openmeter/ent/db/, then `atlas migrate --env local diff ` to emit migrations — never write DB columns or migration SQL by hand. *(source: `AGENTS.md Database Migrations; openmeter/ent/schema/feature.go`)* +- When credits.enabled is false, ledger account services/resolvers are wired to noop in app/common; any ledger backfill that must write real ledger_accounts/ledger_customer_accounts rows must construct concrete ledger adapters directly rather than relying on default DI outputs. *(source: `AGENTS.md Configuration`)* +- cmd/server/main.go migrates the DB before creating the default namespace; register namespace handlers before initNamespace(...) if they must provision the default namespace during startup. *(source: `AGENTS.md Architecture`)* \ No newline at end of file diff --git a/.claude/rules/enforcement/by-topic/billing-lifecycle.md b/.claude/rules/enforcement/by-topic/billing-lifecycle.md new file mode 100644 index 0000000000..ada78631f8 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/billing-lifecycle.md @@ -0,0 +1,25 @@ +# Enforcement: billing-lifecycle (3 rules) + +Topic file. Loaded on demand when an agent works on something in the `billing-lifecycle` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-fsm-001` — Model invoice and charge lifecycle transitions through the qmuntal/stateless FSM, not ad-hoc status mutation + +*source: `deep_scan`* + +**Why:** Invoice and usage-based-charge lifecycles have guarded transitions with side effects (calculation, finalization, voiding) that must be auditable and persisted across requests. stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (invoice.status / charge.status), and states are Configure'd with Permit / PermitDynamic(guard) edges and OnActive side-effect callbacks. Mutating status directly or branching with if/switch scatters guards and makes illegal transitions possible; the FSM centralizes the legal edge set as a single source of truth. + +### `dec-charge-idempotency-001` — Create charges with a unique_reference_id for idempotency and read across subtypes via the ChargesSearchV1 view + +*source: `deep_scan`* + +**Why:** Charge is a polymorphic parent row where exactly one of three subtype FK columns (flat_fee / credit_purchase / usage_based) points to the subtype table, with UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL for idempotent creation (openmeter/ent/schema/charges.go:167). Reads go through the ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables). Creating a charge without unique_reference_id loses retry-safety; a single wide charges table or separate tables without a parent loses the idempotency key and unified search surface. + +## Tradeoff Signals (warn) + +### `tr-fsm-002` — Do not mutate invoice.status directly or add a status without a corresponding Permit edge + +*source: `deep_scan`* + +**Why:** External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge. Directly assigning invoice.status, branching with if/switch on status instead of Permit edges, or using an in-memory NewStateMachine for a persisted aggregate undermines durability and auditability of transitions. diff --git a/.claude/rules/enforcement/by-topic/codegen.md b/.claude/rules/enforcement/by-topic/codegen.md new file mode 100644 index 0000000000..64f3a6d72c --- /dev/null +++ b/.claude/rules/enforcement/by-topic/codegen.md @@ -0,0 +1,35 @@ +# Enforcement: codegen (4 rules) + +Topic file. Loaded on demand when an agent works on something in the `codegen` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-codegen-001` — Author API changes in TypeSpec and regenerate; never hand-edit generated OpenAPI, server stubs, or SDKs + +*source: `deep_scan`* + +**Why:** The API is authored once in TypeSpec under api/spec (legacy + aip packages); make gen-api compiles it to OpenAPI, then oapi-codegen generates api/api.gen.go and api/v3/api.gen.go, orval the JS SDK, poetry the Python SDK, and goverter/goderive the converters. Two server surfaces and three published SDKs cannot be kept consistent by hand. Editing api/openapi.yaml, api.gen.go, convert.gen.go, or SDK client methods directly breaks the single source of truth and is overwritten on the next generate. + +## Mechanical Violations (block) + +### `mech-gen-001` — Never hand-edit files carrying a `// Code generated ... DO NOT EDIT.` header + +*source: `deep_scan`* · *check: `forbidden_content`* + +**Why:** openmeter/ent/db/, **/wire_gen.go, **/convert.gen.go, billing/derived.gen.go, api/api.gen.go, api/v3/api.gen.go, and api/client/go/client.gen.go are all generated and carry the canonical DO-NOT-EDIT header. Hand-edits are silently overwritten by make generate / make gen-api, and CI fails if generated artifacts drift from source. + +**Path glob:** `**/*.gen.go`, `**/wire_gen.go`, `openmeter/ent/db/**`, `api/api.gen.go`, `api/v3/api.gen.go`, `api/client/go/client.gen.go` + +### `name-gen-file-001` — Generated Go files use *.gen.go / wire_gen.go names and carry the DO-NOT-EDIT header + +*source: `deep_scan`* + +**Why:** All generated Go carries the canonical `// Code generated ... DO NOT EDIT` header and a *.gen.go (or wire_gen.go / ent/db/) name (api/api.gen.go, openmeter/billing/derived.gen.go, openmeter/billing/service/convert.gen.go). Confirmed across api/ and billing/. + +## Pattern Divergence (inform) + +### `infra-gendrift-001` — Run make generate-all and commit before pushing so generated artifacts do not drift + +*source: `deep_scan`* + +**Why:** CI fails if `make update-openapi`, `make generate-javascript-sdk`, or `go generate ./...` produce any git diff or untracked files. The chi-middleware oapi-codegen template is patched via make patch-oapi-templates (run automatically by make generate). Run make generate-all and commit before pushing. diff --git a/.claude/rules/enforcement/by-topic/concurrency.md b/.claude/rules/enforcement/by-topic/concurrency.md new file mode 100644 index 0000000000..45ff80197e --- /dev/null +++ b/.claude/rules/enforcement/by-topic/concurrency.md @@ -0,0 +1,99 @@ +# Enforcement: concurrency (4 rules) + +Topic file. Loaded on demand when an agent works on something in the `concurrency` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-lock-001` — Serialize per-entity multi-row operations with a lockr advisory lock keyed on a globally-unique id inside transaction.Run + +*source: `deep_scan`* + +**Why:** Subscription mutations, billing mutations, and charge advances each touch many rows/tables for one customer and must be serialized per logical entity without serializing the whole table. lockr.NewKey(scopes...) xxh3-hashes the scope to a 64-bit int and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-releasing on commit/rollback. getTxClient hard-asserts the caller is inside a real Postgres transaction (transaction_timestamp() != statement_timestamp()) and errors otherwise (pkg/framework/lockr/locker.go:134). The key id component must be PK-unique (subscription.GetCustomerLock keys on customer id). + +**Example:** + +``` +err := transaction.Run(ctx, svc.adapter, func(ctx context.Context) error { + if err := svc.locker.LockForTX(ctx, subscription.GetCustomerLock(customerID)); err != nil { return err } + return svc.mutate(ctx, ...) +}) +``` + +## Pitfalls (block) + +### `pf-context-001` — Never introduce context.Background() or context.TODO() to sidestep missing context propagation in app code + +*source: `deep_scan`* + +**Why:** Context-ambient transactions carry the active tx on context.Context, rebound by entutils.TransactingRepo and not visible in method signatures. Introducing context.Background()/context.TODO() in application code detaches the call from the caller's transaction, cancellation, deadlines, and tracing — and a write that loses the ctx tx silently commits outside the caller's transaction. AGENTS.md forbids this; either propagate the caller's ctx through the full path, or drop the unused context.Context parameter. + +**Path glob:** `openmeter/**`, `pkg/**`, `app/**`, `api/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "context\\.Background\\(\\)", + "context\\.TODO\\(\\)" + ], + "must_not_match": [ + "_test\\.go", + "main\\.go" + ] + } +] +``` + +
+ +## Tradeoff Signals (warn) + +### `tr-lock-002` — Never key a lockr advisory lock on a non-unique column such as customer.key + +*source: `deep_scan`* + +**Why:** Advisory locks must key on a globally-unique id; misuse is only caught at runtime. customer.key is only unique under namespace + deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62), so a key-based lock could serialize unrelated customers across namespaces or collide a live row with a soft-deleted one. Key on the PK-unique id instead. + +**Path glob:** `openmeter/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "lockr\\.NewKey\\([^)]*\\.Key", + "lockr\\.NewKey\\([^)]*\"key\"" + ] + } +] +``` + +
+ +### `tr-lock-003` — Do not use sync.Mutex or session-scoped pg_advisory_lock for cross-replica serialization + +*source: `deep_scan`* + +**Why:** The worker binaries are horizontally scaled, so an in-process sync.Mutex would not serialize across replicas. Session-scoped pg_advisory_lock (not pg_advisory_xact_lock) ties lock lifetime to the connection, not the transaction, re-introducing lock-then-die orphan windows that the transaction-scoped lockr design eliminates. + +**Path glob:** `openmeter/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "pg_advisory_lock\\(" + ] + } +] +``` + +
diff --git a/.claude/rules/enforcement/by-topic/data-access.md b/.claude/rules/enforcement/by-topic/data-access.md new file mode 100644 index 0000000000..eef1468e83 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/data-access.md @@ -0,0 +1,84 @@ +# Enforcement: data-access (4 rules) + +Topic file. Loaded on demand when an agent works on something in the `data-access` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-tx-001` — Ent adapter methods must wrap their body in entutils.TransactingRepo so they join the caller's transaction + +*source: `deep_scan`* + +**Why:** This is the seam that lets one domain's service participate in another domain's transaction over the single shared Ent client. Without it, subscription→billing→charges→ledger composition could not be atomic. Every domain adapter holds a *entdb.Client and implements entutils.TxCreator (Tx() hijacks an Ent tx onto the context) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self() returns the non-tx instance); TransactingRepo rebinds to the *TxDriver already on the context if one exists and otherwise falls back to repo.Self() (pkg/framework/entutils/transaction.go:199). + +**Example:** + +``` +func (a *adapter) GetCustomer(ctx context.Context, id models.NamespacedID) (*customer.Customer, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep *adapter) (*customer.Customer, error) { + row, err := rep.db.Customer.Query().Where(customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)).Only(ctx) + if err != nil { return nil, err } + return mapCustomerFromDB(row), nil + }) +} +``` + +**Path glob:** `openmeter/**/adapter/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "\\.db\\.\\w+\\.(Create|Update|Delete|Query)\\(" + ], + "must_not_match": [ + "entutils\\.TransactingRepo", + "entutils\\.TransactingRepoWithNoValue" + ] + } +] +``` + +
+ +## Pattern Divergence (inform) + +### `dec-tx-002` — Charges adapter helpers taking a raw *entdb.Client must still wrap their body with entutils.TransactingRepo + +*source: `deep_scan`* + +**Why:** In openmeter/billing/charges/.../adapter, keep Ent access transaction-aware: even helpers that accept a raw *entdb.Client argument must wrap their body with entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to the tx already in ctx. Passing a non-tx client silently writes outside the caller's transaction, breaking the cross-domain atomicity the architecture depends on. + +**Path glob:** `openmeter/billing/charges/**/adapter/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "func \\w+\\([^)]*\\*entdb\\.Client[^)]*\\)" + ], + "must_not_match": [ + "entutils\\.TransactingRepo" + ] + } +] +``` + +
+ +### `data-clickhouse-store-001` — Store usage events only in ClickHouse; never persist or join RawEvent against Postgres + +*source: `deep_scan`* + +**Why:** A separate ClickHouse store and Kafka pipeline carry usage events: per-namespace om__events MergeTree tables, written by the sink-worker. Storing usage events in Postgres, joining RawEvent against Postgres tables, or removing the sink-worker collapses the read-heavy append-only data plane into the OLTP control plane it was deliberately split from. + +### `data-redis-001` — Use Redis only for dedupe and async-query progress, with TTL keys, not as a source of truth + +*source: `deep_scan`* + +**Why:** Redis is a cache/coordination store: ingest event deduplication via SET NX keys with TTL (openmeter/dedupe/redisdedupe) and async query progress under progress:: keys with TTL (openmeter/progressmanager/adapter). It is role=cache, not a primary store; durable control-plane state belongs in Postgres. diff --git a/.claude/rules/enforcement/by-topic/data-modeling.md b/.claude/rules/enforcement/by-topic/data-modeling.md new file mode 100644 index 0000000000..27ca83b153 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/data-modeling.md @@ -0,0 +1,63 @@ +# Enforcement: data-modeling (8 rules) + +Topic file. Loaded on demand when an agent works on something in the `data-modeling` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-mixins-001` — Compose entutils mixins on new Ent entities instead of repeating id/namespace/audit columns + +*source: `deep_scan`* + +**Why:** ~70 tables share the same multi-tenant, soft-delete, ULID-id, audit, metadata-jsonb shape; mixins enforce it once instead of per-table. ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index. Repeating id/namespace/timestamp columns per schema, using UUID v4 PKs, or hard-deleting instead of deleted_at breaks the uniform multi-tenant contract. + +**Example:** + +``` +func (Customer) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.ResourceMixin{}, CustomerAddressMixin{} } } +``` + +### `data-soft-delete-001` — Control-plane rows must be soft-deleted via deleted_at, never hard-deleted + +*source: `deep_scan`* + +**Why:** Entities soft-delete via deleted_at so historical billing/usage references survive; hard deletes are explicitly out of scope. Almost every Postgres table is namespace-scoped, ULID-id'd, and deleted_at soft-deleted. Customer DeleteCustomer is a SetDeletedAt soft-delete that cascade-deletes only edge-linked children; a hard purge would leave dangling FK-less rows (e.g. LedgerCustomerAccount) undetected. + +### `data-namespace-001` — Every Ent query against a namespace-scoped table must filter by namespace + +*source: `deep_scan`* + +**Why:** OpenMeter is multi-tenant: almost every Postgres table is namespace-scoped with ULID char(26) ids and deleted_at soft-deletes. Queries that omit the namespace predicate leak or mutate data across tenants. Adapter queries pair the namespace and id predicates (e.g. customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)). + +## Tradeoff Signals (warn) + +### `tr-mixins-002` — Do not rely on UniqueResourceMixin for strict partial uniqueness; ship a custom IndexWhere SQL migration + +*source: `deep_scan`* + +**Why:** The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness because Ent cannot emit WHERE deleted_at IS NULL without a manual migration, so same-microsecond create/delete/create can collide. Entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration (as Customer does at openmeter/ent/schema/customer.go:58-62). Deleting that custom migration or trusting the mixin's deleted_at-in-key index for correctness re-opens the resurrect-collision bug. + +## Pattern Divergence (inform) + +### `data-ledger-fk-001` — Ledger cross-aggregate references are FK-less by design; enforce referential integrity in application code + +*source: `deep_scan`* + +**Why:** Cross-aggregate references in the Postgres ledger (LedgerCustomerAccount.account_id/customer_id, LedgerSubAccountRoute routing dimensions, LedgerBreakageRecord) are deliberately FK-less and stored as plain char(26)/text columns to avoid import cycles between ledger and customer/account. tax_code stores TaxCode.Key (not a FK). Referential integrity and column alignment are enforced only by application code with no database-level guard, so a hard-deleted account or a renamed TaxCode.Key drifts undetected until a runtime read fails. + +### `place-ent-schema-001` — Ent schemas (the DB source of truth) live in openmeter/ent/schema/ as structs embedding ent.Schema with Mixin/Fields/Edges + +*source: `deep_scan`* + +**Why:** Hand-written Ent schemas are the DB source of truth (.go embedding ent.Schema with Mixin()/Fields()/Edges()); generated client goes to openmeter/ent/db (DO NOT EDIT). Schemas reuse mixins from pkg/framework/entutils. Confirmed by customer.go. + +### `data-customer-fk-001` — CustomerSubjects.subject_key has no FK to Subject; enforce subject existence in application code + +*source: `deep_scan`* + +**Why:** CustomerSubjects.subject_key has no foreign key to Subject.key because Ent cannot FK non-ID fields (openmeter/ent/schema/customer.go:147), so a customer can be linked to a subject key that does not exist as a Subject row — referential integrity is unenforced at the DB level. Validate the subject's existence in the customer service before linking. + +### `data-customer-ilike-001` — Add pg_trgm GIN indexes before exposing case-insensitive contains filters on customer name/email/key + +*source: `deep_scan`* + +**Why:** The v3 customers list API exposes case-insensitive contains/ocontains filters on name, primary_email and key that compile to leading-wildcard ILIKE and cannot use the plain btree indexes on the customers table, forcing full sequential scans (plus a second seq-scan from Paginate's COUNT(*)). The committed TODO in customer.go warns to add pg_trgm GIN indexes via a custom SQL migration before exposing these ILIKE contains filters. diff --git a/.claude/rules/enforcement/by-topic/dependencies.md b/.claude/rules/enforcement/by-topic/dependencies.md new file mode 100644 index 0000000000..2b53217b97 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/dependencies.md @@ -0,0 +1,47 @@ +# Enforcement: dependencies (6 rules) + +Topic file. Loaded on demand when an agent works on something in the `dependencies` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Pattern Divergence (inform) + +### `infra-nix-001` — Run toolchain commands through the Nix CI shell when go/gofmt/golangci-lint/atlas are missing + +*source: `deep_scan`* + +**Why:** Always run toolchain commands through the Nix CI shell `nix develop --impure .#ci -c ` when go/gofmt/golangci-lint/atlas are missing from the ambient shell; CI itself runs build/lint/test/migrate-check/generators this way. Load the repo environment with direnv (or direnv exec . ) so project-specific tools are applied consistently. + +**Example:** + +``` +nix develop --impure .#ci -c make lint-go +``` + +### `infra-config-001` — Touch config.yaml whenever config.example.yaml changes or make server/worker targets abort + +*source: `deep_scan`* + +**Why:** Copy config.example.yaml to config.yaml (Make targets do this automatically) and touch it whenever config.example.yaml changes, or make server / worker targets abort with a diff warning. Local Postgres DSN is postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable; start dependencies with make up and stop with make down. + +### `infra-nvmrc-001` — Keep .nvmrc byte-identical to the Nix CI shell's node -v + +*source: `deep_scan`* + +**Why:** Always keep .nvmrc byte-identical to `nix develop --impure .#ci -c node -v`; CI fails the build job on mismatch and flake.nix enterShell rewrites .nvmrc from node -v. The committed .nvmrc is the GitHub Actions source of truth for Node-based jobs. + +### `infra-modtidy-001` — Tidy both Go modules together and drop incidental go.sum additions from generate/diff + +*source: `deep_scan`* + +**Why:** Keep both Go modules tidy together: go mod tidy for the root and go mod tidy -C collector for the collector module (which replaces the parent via local replace ../). Drop incidental go.sum additions (e.g. tablewriter) introduced by make generate or atlas migrate diff unless the task explicitly requires a dependency change. + +### `infra-release-001` — Releases are tag-only; PRs need a release-note label and Conventional Commit messages + +*source: `deep_scan`* + +**Why:** Container images and Helm charts are tag-only releases to ghcr.io, with release.yaml jobs gating on github.ref_type == 'tag' and tags matching v[0-9]+.[0-9]+.[0-9]+ (optionally -dev.N/-beta.N). Every PR must carry a release-note label (release-note/ignore, kind/feature, release-note/feature, kind/bug, release-note/bug-fix, release-note/breaking-change), and commit messages must follow Conventional Commits enforced by commitizen/prek. End commit messages with the Co-Authored-By: Claude trailer. + +### `infra-cgo-001` — Builds use CGO + musl static linking against librdkafka v2.14.1; use -tags=dynamic locally + +*source: `deep_scan`* + +**Why:** The Go build/test in Docker and Depot CI uses CGO + musl static linking against librdkafka pinned to v2.14.1, with GO_BUILD_FLAGS=-tags=dynamic for local builds (confluent-kafka-go requires it). Redirect GOTMPDIR/TMPDIR to the workspace on Depot runners to avoid ENOSPC in /run. diff --git a/.claude/rules/enforcement/by-topic/error-handling.md b/.claude/rules/enforcement/by-topic/error-handling.md new file mode 100644 index 0000000000..312f20267c --- /dev/null +++ b/.claude/rules/enforcement/by-topic/error-handling.md @@ -0,0 +1,82 @@ +# Enforcement: error-handling (3 rules) + +Topic file. Loaded on demand when an agent works on something in the `error-handling` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-validate-001` — Validate() must collect all issues and return models.NewNillableGenericValidationError(errors.Join(...)), not fail on the first field + +*source: `deep_scan`* + +**Why:** Validation must report all problems at once (not fail-fast) and surface as a single 400/ValidationIssue at the HTTP boundary. Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf("field: %w", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil; single-field checks use models.NewGenericValidationError(...) directly. Returning on the first invalid field, or a bespoke per-domain validation error, breaks the uniform contract the error encoders map to 400. + +**Example:** + +``` +func (i Input) Validate() error { + var errs []error + if i.Name == "" { errs = append(errs, errors.New("name: required")) } + if err := i.Address.Validate(); err != nil { errs = append(errs, fmt.Errorf("address: %w", err)) } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + +**Path glob:** `openmeter/**`, `api/**`, `pkg/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "func \\([^)]*\\) Validate\\(\\) error" + ], + "must_not_match": [ + "NewNillableGenericValidationError", + "NewGenericValidationError", + "_test\\.go" + ] + } +] +``` + +
+ +## Pitfalls (block) + +### `pf-ledger-panic-001` — Never panic in production code; ledger TemplateCode and every new TransactionTemplate must declare a non-empty code() + +*source: `deep_scan`* + +**Why:** Pitfall pf_0013: TemplateCode(template) panics when a TransactionTemplate's code() returns an empty string (openmeter/ledger/transactions/codes.go:113), so a newly added template that forgets to declare its code() crashes the ledger collector at runtime instead of failing the build or returning an error. AGENTS.md: never use panic in non-test code paths; if a new failure mode is possible, change the function signature to return an error and propagate it explicitly. + +**Path glob:** `openmeter/**`, `pkg/**`, `app/**`, `cmd/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "\\bpanic\\(" + ], + "must_not_match": [ + "_test\\.go", + "testutils", + "testutil" + ] + } +] +``` + +
+ +## Pattern Divergence (inform) + +### `sem-httptransport-001` — Build v1 endpoints with httptransport.Handler[Req,Resp] and map domain errors via typed errorEncoders + +*source: `deep_scan`* + +**Why:** v1 endpoints use httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts) with an errorEncoder that maps domain error types to status codes. Error mapping uses an ordered HandleErrorIfTypeMatches[T] chain (errors.As short-circuit: NotFoundError→404, GenericValidationError→400, UpdateAfterDeleteError→409) plus the ValidationIssue openmeter.http.status_code attribute (singular mapping). The v3 surface mirrors the same logic in apierrors.NewV3ErrorHandlerFunc. diff --git a/.claude/rules/enforcement/by-topic/layering.md b/.claude/rules/enforcement/by-topic/layering.md new file mode 100644 index 0000000000..6f3c6ccd91 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/layering.md @@ -0,0 +1,90 @@ +# Enforcement: layering (11 rules) + +Topic file. Loaded on demand when an agent works on something in the `layering` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-api-surface-001` — v3 handlers must be thin delegators to shared domain services, never carry their own domain logic + +*source: `deep_scan`* + +**Why:** v3 is the forward AIP-style surface; v1 cannot be dropped without breaking clients, so both surfaces front the identical domain services and share error rendering (commonhttp.HandleErrorIfTypeMatches, api/v3/apierrors). A v3 handler with its own domain logic, or a service call duplicated across both surfaces with diverging behavior, makes the two transport layers drift. Both v1 httpdriver packages and v3 handlers must delegate to the same openmeter/ service. + +### `dec-style-001` — Keep usage metering in ClickHouse/Kafka and control-plane state in Postgres; do not collapse them + +*source: `deep_scan`* + +**Why:** OpenMeter splits high-volume append-only usage metering (ClickHouse MergeTree + Kafka + sink-worker) from ACID control-plane billing (PostgreSQL + Ent + lockr) because read-heavy ingest/aggregation and transaction-heavy billing have opposing scaling and failure profiles. Putting usage events in Postgres, using a single monolith binary, or a microservice-per-domain-with-own-DB layout all break the root constraint of providing event-time metering AND ACID usage-based billing over one shared codebase. + +## Pitfalls (block) + +### `pf-v3-unimplemented-001` — Do not leave v3 operations advertised as stable while their Server method only delegates to api.Unimplemented + +*source: `deep_scan`* + +**Why:** Pitfall pf_0015: TypeSpec generates each v3 operation's server-interface method and SDK client method from the contract independently of whether the server implements it, and the v3 Server can satisfy the interface by delegating to api.Unimplemented{} (api.gen.go:7186), which always returns 501. Because Go only checks interface satisfaction, a permanently-stubbed operation compiles identically to a finished one, so the advertised contract and the three SDKs diverge from runtime capability with no compile-time signal. + +## Tradeoff Signals (warn) + +### `tr-monolith-001` — Keep one Go module and one Ent client; do not split go.mod per binary or give a domain its own database + +*source: `deep_scan`* + +**Why:** Six binaries over one module: a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, but the payoff is one codebase, one Ent client, one transaction boundary for cross-domain atomicity. Splitting go.mod per binary, duplicating pkg/models types per service, using a separate database per domain, or introducing a distributed transaction/saga between binaries breaks the shared-transaction guarantee that subscription→billing→charges→ledger relies on. + +## Pattern Divergence (inform) + +### `place-domain-iface-001` — Declare Service/Adapter/Connector interfaces and value models in the domain root package, implementations in nested subpackages + +*source: `deep_scan`* + +**Why:** Domain root packages (openmeter//.go, service.go, connector.go) declare interfaces (Service/Adapter/Connector/Repository) and value models; implementations live in nested service/ and adapter/ subpackages. openmeter/billing/invoice.go declares billing.Service; openmeter/streaming/connector.go declares streaming.Connector. Confirmed across billing, customer, streaming, notification, entitlement. + +### `place-service-001` — Concrete services live in a service/ subpackage with a Service struct, Config, Config.Validate(), and New(Config) + +*source: `deep_scan`* + +**Why:** Concrete services live in a service/ subpackage, take a Config struct of injected dependencies, validate each is non-nil in Config.Validate(), and assert interface satisfaction via `var _ billing.Service = (*Service)(nil)`. Loggers are injected, never slog.Default(). openmeter/billing/service/service.go and openmeter/notification/service/service.go follow this shape. + +**Example:** + +``` +var _ billing.Service = (*Service)(nil) +func New(c Config) (*Service, error) { if err := c.Validate(); err != nil { return nil, err }; return &Service{...}, nil } +``` + +### `place-adapter-001` — Ent persistence lives in an adapter/ subpackage holding *entdb.Client with Tx/WithTx/Self + +*source: `deep_scan`* + +**Why:** Ent persistence is isolated in adapter/ packages that hold *entdb.Client and implement transaction hijacking (Tx returns a transaction.Driver; WithTx rebuilds the adapter from the tx config; Self returns the non-tx instance). Confirmed in billing/adapter/adapter.go and customer/adapter. + +### `place-v3-handler-001` — v3 HTTP handlers live under api/v3/handlers// with a Handler interface and per-operation files + +*source: `deep_scan`* + +**Why:** The v3 API centralizes handlers under api/v3/handlers/, one package per resource (nested for sub-resources e.g. customers/charges, customers/credits). Each exposes a Handler interface returning httptransport handlers via New(resolveNamespace, service, options...); routes in api/v3/server/routes.go delegate via .With(params).ServeHTTP. Per-operation files are create.go/get.go/list.go/delete.go/upsert.go. Confirmed in customers/handler.go + routes.go. + +### `place-legacy-httpdriver-001` — Legacy v1 HTTP handlers are co-located per domain as httpdriver/ or httphandler/ packages + +*source: `deep_scan`* + +**Why:** The legacy v1 API keeps HTTP handlers co-located with each domain as httpdriver/httphandler packages (openmeter/customer/httpdriver, openmeter/meter/httphandler, openmeter/notification/httpdriver), assembled in openmeter/server/router/router.go. Confirmed by router.go imports. + +### `name-pkg-alias-001` — Implementation subpackages physically named service/adapter declare a domain-prefixed package name + +*source: `deep_scan`* + +**Why:** Implementation subpackages are physically named service/adapter but declare a domain-prefixed package name (package billingservice in service/service.go, package billingadapter in adapter/adapter.go) so call sites read unambiguously. Confirmed in billing service.go and adapter.go. + +### `name-iface-assert-001` — Assert compile-time interface conformance with var _ = (*)(nil) + +*source: `deep_scan`* + +**Why:** Compile-time interface conformance is asserted with the blank-identifier pattern at the top of each implementation file (var _ billing.Service = (*Service)(nil), var _ billing.Adapter = (*adapter)(nil)). Confirmed in billing service.go, adapter.go, notification service.go. + +**Example:** + +``` +var _ notification.Service = (*Service)(nil) +``` diff --git a/.claude/rules/enforcement/by-topic/mapping.md b/.claude/rules/enforcement/by-topic/mapping.md new file mode 100644 index 0000000000..7caa601528 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/mapping.md @@ -0,0 +1,17 @@ +# Enforcement: mapping (2 rules) + +Topic file. Loaded on demand when an agent works on something in the `mapping` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Pattern Divergence (inform) + +### `name-convert-001` — Type-translation functions use FromAPI.../ToAPI.../FromDB.../ToDB... names and map/mapped terminology + +*source: `deep_scan`* + +**Why:** Domain↔API↔DB conversions use goverter (convert.go → convert.gen.go) and goderive (derived.gen.go). Hand-written conversion files/functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the /go-types-conversion skill) and use map/mapped terminology, never project/projected. Generated *.gen.go files carry DO-NOT-EDIT headers. + +### `sem-entitymapping-001` — Use generated goverter/goderive converters for domain↔API↔DB mapping rather than hand-writing boilerplate + +*source: `deep_scan`* + +**Why:** convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations. Translating between domain, API, and DB representations should use these generated converters, with hand-written helpers only following the FromAPI/ToAPI/FromDB/ToDB naming convention. Never edit *.gen.go (DO-NOT-EDIT header). diff --git a/.claude/rules/enforcement/by-topic/messaging.md b/.claude/rules/enforcement/by-topic/messaging.md new file mode 100644 index 0000000000..299e2dab9b --- /dev/null +++ b/.claude/rules/enforcement/by-topic/messaging.md @@ -0,0 +1,25 @@ +# Enforcement: messaging (3 rules) + +Topic file. Loaded on demand when an agent works on something in the `messaging` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-eventbus-001` — Publish domain events through eventbus.Publisher and consume via grouphandler, not direct confluent-kafka calls + +*source: `deep_scan`* + +**Why:** Outbound: eventbus.New wraps a watermill cqrs.EventBus and routes each event to one of three Kafka topics by event-name prefix (ingest → IngestEventsTopic, balance-worker → BalanceWorkerEventsTopic, everything else → SystemEventsTopic). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once, runs matching handlers, and counts unknown types as ignored. Direct confluent-kafka-go produce/consume in a worker bypasses the centralized marshaling, topic routing, and type dispatch, and a single topic for all events breaks the throughput/retention separation. + +## Pattern Divergence (inform) + +### `sem-webhook-001` — Deliver notification webhooks behind the webhook.Handler interface with Svix and noop implementations + +*source: `deep_scan`* + +**Why:** notification/webhook defines a Handler interface (CreateWebhook, UpdateWebhook, endpoint secret/header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans; the event pipeline reconciles delivery state via eventhandler/reconcile.go. New delivery behavior must go behind the Handler interface so the noop swap keeps working when webhooks are off. + +### `sem-grouphandler-001` — Build Kafka consumers with grouphandler type-routed dispatch; ack unknown event types as ignored + +*source: `deep_scan`* + +**Why:** grouphandler.NewNoPublishingHandler builds a map[eventName][]GroupEventHandler. On each message it derives the CloudEvent type, looks up handlers, unmarshals once into handler[0].NewEvent(), and runs all matching handlers joining their errors. Unknown event types are counted as 'ignored' and ack'd (return nil), not failed; per-message processing time and status counters are emitted to OpenTelemetry. New worker consumers should register handlers into this map rather than hand-rolling consume loops. diff --git a/.claude/rules/enforcement/by-topic/schema-evolution.md b/.claude/rules/enforcement/by-topic/schema-evolution.md new file mode 100644 index 0000000000..682ba6926c --- /dev/null +++ b/.claude/rules/enforcement/by-topic/schema-evolution.md @@ -0,0 +1,35 @@ +# Enforcement: schema-evolution (5 rules) + +Topic file. Loaded on demand when an agent works on something in the `schema-evolution` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Pattern Divergence (inform) + +### `data-clickhouse-sync-001` — Keep the RawEvent struct, ClickHouse DDL, and INSERT column list in sync by hand when changing usage-event columns + +*source: `deep_scan`* + +**Why:** ClickHouse usage-event tables have no in-repo migration tooling: schema evolves only through the idempotent CREATE TABLE IF NOT EXISTS path. A column added to the RawEvent Go struct (openmeter/streaming/connector.go) without a matching Define() in createEventsTable (event_query.go) and the INSERT column list will silently diverge from existing per-namespace om__events tables. There is no Atlas/diff guard for ClickHouse. + +### `data-billing-schemalevel-001` — Drop billing-invoice deprecated columns and the two schema_level artifacts together, not piecemeal + +*source: `deep_scan`* + +**Why:** An in-progress billing-invoice schema migration keeps deprecated columns (line_ids, discount type/quantity, split-line-group tax fields) and a two-place schema_level discriminator (BillingInvoice.schema_level column plus the temporary BillingInvoiceWriteSchemaLevel table) live. The dual-write/dual-read logic spans multiple adapter files (schemalevel.go, gatheringinvoice.go, invoicelinesplitgroup.go, lock.go). Cleanup must remove the field, the table, the adapter dual-shape branches, and lock.go migrateCustomerInvoices in lockstep, or the migration is left half-done. + +### `place-migrations-001` — SQL migrations are timestamped .up.sql/.down.sql pairs in tools/migrate/migrations generated by Atlas + +*source: `deep_scan`* + +**Why:** Migrations are golang-migrate-format timestamped pairs (_.up.sql / .down.sql) plus atlas.sum, generated from Ent schema diffs via `atlas migrate --env local diff `. Schema source is ent://openmeter/ent/schema, migrations dir is file://tools/migrate/migrations. + +### `infra-atlas-sum-001` — tools/migrate/migrations/atlas.sum is append-only; never rewrite earlier migrations + +*source: `deep_scan`* + +**Why:** tools/migrate/migrations/atlas.sum is append-only; pr-checks.yaml runs check_atlas_sum_append_only.py against the PR base SHA, and migrate-check enforces non-linear=error, data_depend=error, incompatible=error (destructive allowed). New migrations must append to the linear chain; editing historical migrations breaks the sum and the lint. + +### `sem-ent-view-001` — ent.View schemas need an explicit SQL migration; atlas diff will not emit their DDL + +*source: `deep_scan`* + +**Why:** ent.View schemas (e.g. ChargesSearchV1) generate query code but do NOT appear in openmeter/ent/db/migrate/schema.go or migrate.Tables, so atlas migrate --env local diff reports no changes for a new view. Their DDL needs an explicit SQL migration (use make generate-view-sql / tools/migrate/cmd/viewgen). Assuming atlas diff emits the view causes silent drift between the Go view definition and the actual database view. diff --git a/.claude/rules/enforcement/by-topic/security.md b/.claude/rules/enforcement/by-topic/security.md new file mode 100644 index 0000000000..52b8d1f759 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/security.md @@ -0,0 +1,11 @@ +# Enforcement: security (1 rule) + +Topic file. Loaded on demand when an agent works on something in the `security` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Pattern Divergence (inform) + +### `infra-secrets-001` — Never commit real secrets; Trufflehog secret scanning fails the build on findings + +*source: `deep_scan`* + +**Why:** Trufflehog secret scanning runs on PRs/pushes to main and fails on findings. Release secrets are provided via GitHub Actions (GITHUB_TOKEN, POETRY_PYPI_TOKEN_PYPI, vars.DEPOT_PROJECT, vars.TEST_CLICKHOUSE_DSN); SVIX_JWT_SECRET=DUMMY_JWT_SECRET is a non-sensitive dev value only. npm publishing uses OIDC Trusted Publishing (no token). diff --git a/.claude/rules/enforcement/by-topic/services.md b/.claude/rules/enforcement/by-topic/services.md new file mode 100644 index 0000000000..c0ae165686 --- /dev/null +++ b/.claude/rules/enforcement/by-topic/services.md @@ -0,0 +1,128 @@ +# Enforcement: services (12 rules) + +Topic file. Loaded on demand when an agent works on something in the `services` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Decision Violations (block) + +### `dec-wire-001` — Wire new services, hooks, and workers through Google Wire provider sets in app/common, not manual or runtime DI + +*source: `deep_scan`* + +**Why:** Each binary has a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets; constructors are plain functions grouped per concern in app/common/*.go. make generate runs wire to emit wire_gen.go. Compile-time DI means a missing provider fails the build, and each binary only links the providers it declares. Runtime/reflection DI and manual wiring in main() are rejected because the graph (billing→charges→ledger→customer→productcatalog) is too large to wire by hand without divergence. + +**Example:** + +``` +var Customer = wire.NewSet(NewCustomerService) +``` + +### `dec-hook-001` — Use the ServiceHookRegistry for synchronous in-process cross-domain reactions, not Kafka or a static cross-domain call + +*source: `deep_scan`* + +**Why:** Some cross-domain effects must be synchronous and in-process (provisioning a ledger account when a customer is created), unlike the asynchronous Kafka event bus used for billing/notification. A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]); Wire providers construct the hook and call targetService.RegisterHooks(h) at startup, registering a Noop hook when the feature is off. Routing a transactional side effect through Kafka loses same-transaction commit guarantees; hard-coding the dependent call would create a static dependency edge and prevent the noop-when-disabled swap. + +### `dec-entitlement-subtype-001` — Add entitlement subtype behavior via a SubTypeConnector and a getTypeConnector switch arm, not inline branching + +*source: `deep_scan`* + +**Why:** entitlement.SubTypeConnector is implemented three times (metered/static/boolean, each in its own connector.go). The aggregate service holds all three and getTypeConnector(typed) switches over the closed EntitlementType set with a default-error arm (openmeter/entitlement/service/service.go:424). A new EntitlementType value MUST get a SubTypeConnector field plus a switch arm or it falls through to the default error. Inline switching over entitlement type everywhere, or open/registry-based dispatch, breaks the sealed-enum contract. + +### `dec-app-registry-001` — Register marketplace app integrations once at wiring time via RegisterMarketplaceListing, not via a central switch or late registration + +*source: `deep_scan`* + +**Why:** The app adapter holds registry map[AppType]RegistryItem. Each integration's constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) exactly once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing (openmeter/app/adapter/marketplace.go:121). The map has no late-registration locking, so all listings must register during DI before the HTTP/worker surface is live. Capability support is discovered by type-asserting the Factory to the requested install interface. + +## Tradeoff Signals (warn) + +### `tr-flag-001` — Gate features at the DI wiring seam with concrete-or-noop providers, not with if feature.enabled inside service logic + +*source: `deep_scan`* + +**Why:** Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning). Putting `if credits.enabled` inside a service method, constructing ledger adapters when credits are disabled, or building a Svix client when webhooks are off scatters runtime conditionals through service logic and leaves gated subsystems half-disabled. + +**Path glob:** `openmeter/**/service/**`, `api/v3/handlers/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "if\\s+\\w*\\.?[Cc]redits\\w*\\.Enabled", + "if\\s+\\w*[Ww]ebhook\\w*\\.Enabled" + ], + "must_not_match": [ + "_test\\.go" + ] + } +] +``` + +
+ +## Pattern Divergence (inform) + +### `dec-ledger-backfill-001` — Ledger backfills that must write real ledger_accounts rows must construct concrete ledger adapters, not rely on default DI + +*source: `deep_scan`* + +**Why:** When credits.enabled is false, app/common wires ledger account services/resolvers to noop implementations. Any ledger account backfill that must write real ledger_accounts / ledger_customer_accounts rows needs to construct concrete ledger account + resolver adapters directly instead of relying on the default DI outputs, which would silently no-op the writes. + +### `place-wire-001` — Google Wire provider sets live in app/common, one wire.NewSet file per subsystem + +*source: `deep_scan`* + +**Why:** Google Wire provider sets live in app/common, one file per subsystem (app/common/billing.go declares var Billing = wire.NewSet(...)); per-binary Application structs are assembled in openmeter_.go files. Wire-generated output is wire_gen.go (DO NOT EDIT). Confirmed by billing.go. + +### `name-config-001` — Services/adapters take a Config struct, validate it in Config.Validate(), and construct via New(config) + +*source: `deep_scan`* + +**Why:** Services/adapters take a Config struct, validate each dependency non-nil in Config.Validate(), and return via New(config) (billingadapter.New(Config), notification service New(Config)). Constructors reject invalid config rather than panicking. Confirmed in billing adapter.go and service.go and notification service.go. + +### `prac-slog-001` — Require and inject *slog.Logger via Config; never fall back to slog.Default() in production code + +*source: `deep_scan`* + +**Why:** In production constructors/initialization, always require and inject a *slog.Logger explicitly via Config; never fall back to slog.Default(). AGENTS.md mandates this; the service/adapter Config.Validate() requires a non-nil logger. slog.Default() hides the dependency and yields uncontrolled logging configuration. + +**Path glob:** `openmeter/**`, `app/**`, `pkg/**` + +
Code-shape trigger + +```json +[ + { + "kind": "regex_in_content", + "must_match": [ + "slog\\.Default\\(\\)" + ], + "must_not_match": [ + "_test\\.go" + ] + } +] +``` + +
+ +### `prac-lo-001` — Use samber/lo and stdlib helpers instead of local ptr/must wrappers + +*source: `deep_scan`* + +**Why:** Use samber/lo helpers instead of local wrappers: slices.Clone for defensive copies, lo.ToPtr for pointer literals, lo.Must only for (value,err) panic-on-failure test setup. Never add local ptr/must/loPtr/loMust helpers when github.com/samber/lo already covers the need. + +### `prac-helper-001` — Do not extract helpers that only wrap 2-4 trivial lines or pass through to another function + +*source: `deep_scan`* + +**Why:** Do not extract helpers that only wrap 2-4 trivial lines/guards without adding domain intent, and remove leftover pass-through wrappers that only call another function — call the underlying function directly. Prefer function names that explain the domain reason for the call over names that restate the implementation steps. + +### `data-namespace-handler-001` — Register namespace handlers before initNamespace if they must provision the default namespace at startup + +*source: `deep_scan`* + +**Why:** cmd/server/main.go migrates the DB before creating the default namespace; register namespace handlers (app.LedgerNamespaceHandler, app.KafkaIngestNamespaceHandler) before initNamespace(...) if they must provision the default namespace during startup. Registering after initNamespace means the default namespace is created without that handler's provisioning. diff --git a/.claude/rules/enforcement/by-topic/testing.md b/.claude/rules/enforcement/by-topic/testing.md new file mode 100644 index 0000000000..c34c7ba3bb --- /dev/null +++ b/.claude/rules/enforcement/by-topic/testing.md @@ -0,0 +1,55 @@ +# Enforcement: testing (6 rules) + +Topic file. Loaded on demand when an agent works on something in the `testing` area. The pre-edit hook reads `.archie/rules.json` directly — this file is for browsing/context only. + +## Pitfalls (block) + +### `pf-test-cycle-001` — Keep test/billing non-test files free of imports into charges/service and subscriptionsync/service + +*source: `deep_scan`* + +**Why:** Pitfall pf_0014: internal test packages (package service) in openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service import the shared test/billing fixtures, which in turn imports those same service packages from its own _test files — a test-only import cycle. Go tolerates it only because the back-edges live in _test files. Moving a back-edge import into a non-test file of test/billing (e.g. a fixture helper constructing a real subscriptionsync service) would promote it into a hard production import cycle that breaks the build. + +## Pattern Divergence (inform) + +### `place-test-001` — Co-locate unit tests as _test.go; put cross-domain integration harnesses under top-level test// and e2e under e2e/ + +*source: `deep_scan`* + +**Why:** Most tests are co-located *_test.go files. Heavier cross-cutting integration suites and shared harnesses live under a top-level test/ tree organized by domain (test/billing, test/customer, test/subscription, ...); e.g. test/billing is imported by openmeter/billing/charges/service/*_test.go. End-to-end HTTP-over-the-wire tests live separately in e2e/ with docker-compose files. + +### `prac-test-decimal-001` — Assert decimal equality in tests via require.Equal on InexactFloat64(), not boolean Equal() + +*source: `deep_scan`* + +**Why:** When asserting alpacadecimal.Decimal equality in tests, prefer require.Equal(t, expectedFloat64, actual.InexactFloat64()) over boolean assertions like require.True(t, expected.Equal(actual)) when precision allows. Prefer simple float64(5)-style literals over verbose decimal construction for expected values. + +### `prac-test-ctx-001` — In tests use t.Context() and pair clock.FreezeTime with defer clock.UnFreeze in the same scope + +*source: `deep_scan`* + +**Why:** In tests, prefer t.Context() over context.Background() so cancellation and lifecycle tie to the test harness. When using clock.FreezeTime(...), immediately pair it with defer clock.UnFreeze() in the same scope so later assertions or subtests do not inherit frozen time accidentally. + +**Example:** + +``` +clock.FreezeTime(now); defer clock.UnFreeze() +``` + +### `prac-test-helpers-001` — Build domain test deps from underlying constructors under testutils, independent of app/common + +*source: `deep_scan`* + +**Why:** Keep domain test helpers under openmeter/.../testutils independent of app/common; build test dependencies from underlying constructors (repos, adapters, services, lockr), not the wiring layer, or unrelated wiring additions can create test-only import cycles. Prefer driving UBP billing lifecycle tests through charges.Service.Create/AdvanceCharges/ApplyPatches rather than lower-level charge adapters. + +### `infra-pgtest-001` — Set POSTGRES_HOST=127.0.0.1 and -tags=dynamic for DB-touching Go tests, or suites silently skip + +*source: `deep_scan`* + +**Why:** Always set POSTGRES_HOST=127.0.0.1 for DB-touching Go tests (and ensure Postgres is up via docker compose up -d postgres), or suites silently skip during setup. Run tests with -tags=dynamic (required for confluent-kafka-go) and the Make parallelism flags -p 128 -parallel 16. + +**Example:** + +``` +POSTGRES_HOST=127.0.0.1 go test -tags=dynamic -v ./openmeter/billing/... +``` diff --git a/.claude/rules/enforcement/index.md b/.claude/rules/enforcement/index.md new file mode 100644 index 0000000000..a574abc9d1 --- /dev/null +++ b/.claude/rules/enforcement/index.md @@ -0,0 +1,45 @@ +# Enforcement Rules — Index + +This project has 102 rules across 14 project topics. Load only the topic file(s) relevant to your task. Universal Archie anti-patterns live in `universal.md` and apply to every project. + +## By topic + +| Topic | File | Rules | +|-------|------|-------| +| billing-lifecycle | by-topic/billing-lifecycle.md | 3 | +| codegen | by-topic/codegen.md | 4 | +| concurrency | by-topic/concurrency.md | 4 | +| data-access | by-topic/data-access.md | 4 | +| data-modeling | by-topic/data-modeling.md | 8 | +| dependencies | by-topic/dependencies.md | 6 | +| error-handling | by-topic/error-handling.md | 3 | +| layering | by-topic/layering.md | 11 | +| mapping | by-topic/mapping.md | 2 | +| messaging | by-topic/messaging.md | 3 | +| schema-evolution | by-topic/schema-evolution.md | 5 | +| security | by-topic/security.md | 1 | +| services | by-topic/services.md | 12 | +| testing | by-topic/testing.md | 6 | +| Universal | universal.md | 30 | + +## By path + +When editing a file matching one of these globs, load the listed topics first. + +| Path glob | Topics to load | +|-----------|----------------| +| `**/*.gen.go` | codegen | +| `**/wire_gen.go` | codegen | +| `api/**` | concurrency, error-handling | +| `api/api.gen.go` | codegen | +| `api/client/go/client.gen.go` | codegen | +| `api/v3/api.gen.go` | codegen | +| `api/v3/handlers/**` | services | +| `app/**` | concurrency, error-handling, services | +| `cmd/**` | error-handling | +| `openmeter/**` | concurrency, error-handling, services | +| `openmeter/**/adapter/**` | data-access | +| `openmeter/**/service/**` | services | +| `openmeter/billing/charges/**/adapter/**` | data-access | +| `openmeter/ent/db/**` | codegen | +| `pkg/**` | concurrency, error-handling, services | diff --git a/.claude/rules/enforcement/universal.md b/.claude/rules/enforcement/universal.md new file mode 100644 index 0000000000..dca7899c47 --- /dev/null +++ b/.claude/rules/enforcement/universal.md @@ -0,0 +1,143 @@ +# Universal Enforcement (30 rules) + +Anti-patterns shipped with Archie that apply to every project regardless of stack. These come from `platform_rules.json`, not from your project's `rules.json`. + +## Mechanical Violations (block) + +### `erosion-god-function` — God-function: CC>15. Complexity concentrating here — SlopCodeBench shows this is the #1 agent failure mode. Split before it grows further. + +*check: `complexity_threshold`* + +### `decay-empty-catch` — Empty catch/except block — error silently swallowed. SlopCodeBench shows error handling degrades first while core functionality stays. + +*check: `forbidden_content`* + +### `security-hardcoded-secret` — Possible hardcoded secret/API key in source code. + +*check: `forbidden_content`* + +### `security-debug-left-behind` — Debug breakpoint left in code. Will halt execution in production. + +*check: `forbidden_content`* + +### `android-layer-viewmodel-context` — + +*check: `architectural_constraint`* + +**Why:** ViewModel must be lifecycle-independent. Referencing Context/View from ViewModel creates memory leaks and breaks testability. + +### `android-layer-fragment-network` — + +*check: `architectural_constraint`* + +**Why:** Fragments must not make network calls directly. All data flows through Repository → ViewModel → Fragment. + +### `android-layer-fragment-db` — + +*check: `architectural_constraint`* + +**Why:** Fragments must not access persistence directly. Data layer is the repository's responsibility. + +### `android-layer-activity-db` — + +*check: `architectural_constraint`* + +**Why:** Activities must not access persistence directly. + +### `android-lifecycle-globalscope` — GlobalScope ignores lifecycle — coroutines leak on configuration change or process death. Use viewModelScope, lifecycleScope, or inject a supervised scope. + +*check: `forbidden_content`* + +### `swift-layer-view-network` — + +*check: `architectural_constraint`* + +**Why:** SwiftUI Views must not make network calls. Data fetching belongs in ViewModel or Repository. + +### `swift-layer-view-userdefaults` — + +*check: `architectural_constraint`* + +**Why:** Views must not access persistence directly. Use a repository or data manager. + +### `typescript-react-dom-manipulation` — + +*check: `architectural_constraint`* + +**Why:** Direct DOM manipulation in React components breaks the virtual DOM model and causes subtle rendering bugs. + +### `python-safety-bare-except` — Bare except catches SystemExit, KeyboardInterrupt, and GeneratorExit. Use except Exception: at minimum. + +*check: `forbidden_content`* + +### `python-safety-eval-exec` — eval/exec executes arbitrary code — critical security risk if input is user-controlled. + +*check: `forbidden_content`* + +## Tradeoff Signals (warn) + +### `erosion-growing-complexity` — Complex function approaching god-function territory (CC>10). Track this — if CC grows between scans, it's eroding. + +*check: `complexity_threshold`* + +### `erosion-god-class` — Class has 20+ methods — likely accumulating responsibilities. Agents patch new logic here instead of creating focused classes. + +*check: `size_threshold`* + +### `erosion-monster-file` — File exceeds 600 lines. In agent-assisted codebases, large files grow because agents append rather than refactor. + +*check: `size_threshold`* + +### `erosion-many-params` — Function with 7+ parameters. Signal of a function doing too much or missing a data class/struct. + +*check: `forbidden_content`* + +### `decay-disabled-test` — Disabled/skipped test. Tests get disabled when agents can't fix them — this hides regressions. The paper shows error-mode tests fail first. + +*check: `forbidden_content`* + +### `decay-todo-fixme-hack` — FIXME/HACK/XXX marker — acknowledged technical debt. Track these: if count grows between scans, quality is degrading. + +*check: `forbidden_content`* + +### `decay-catch-log-only` — Catch block only logs the error without re-throwing or propagating. Error is visible in logs but callers don't know it failed. + +*check: `forbidden_content`* + +### `android-di-service-locator` — Service locator pattern (KoinJavaComponent.get) breaks constructor injection and makes dependencies invisible. Use constructor injection via Koin modules. + +*check: `forbidden_content`* + +### `swift-safety-force-unwrap` — Force unwrap (!) crashes at runtime if nil. Use guard let, if let, or ?? default. + +*check: `forbidden_content`* + +### `swift-safety-force-try` — Force try crashes at runtime if throwing function fails. Use do/catch or try?. + +*check: `forbidden_content`* + +### `typescript-layer-component-fetch` — + +*check: `architectural_constraint`* + +**Why:** Components should not fetch data directly. Use hooks, services, or state management (React Query, SWR, etc.). + +### `typescript-safety-any-type` — Type escape via 'any' — defeats TypeScript's type system. Use unknown, generics, or proper types. + +*check: `forbidden_content`* + +### `typescript-react-index-key` — Array index as React key causes rendering bugs when list items are reordered, inserted, or deleted. + +*check: `forbidden_content`* + +### `python-safety-mutable-default` — Mutable default argument (list/dict) — shared across all calls. Use None default with assignment in body. + +*check: `forbidden_content`* + +### `python-layer-star-import` — Star import pollutes namespace and hides dependencies. Makes it impossible to trace where a symbol comes from. + +*check: `forbidden_content`* + +### `python-layer-circular-import` — TYPE_CHECKING guard suggests circular import was encountered. The cycle should be resolved structurally, not worked around. + +*check: `forbidden_content`* diff --git a/.claude/rules/frontend.md b/.claude/rules/frontend.md new file mode 100644 index 0000000000..7ab88754f8 --- /dev/null +++ b/.claude/rules/frontend.md @@ -0,0 +1,25 @@ +--- +paths: + - **/* +--- + +## Frontend Architecture + +**Framework:** none (generated TypeScript SDK only) + +**Styling:** Not applicable — no UI, no stylesheets, no component library, no design tokens. The api/client/javascript package uses Biome (biome.json) solely as its linter/formatter; it is not a styling system. + +**State management:** Not applicable — there is no application UI. The only client surface is the generated @openmeter/sdk npm package (api/client/javascript), an OpenAPI-derived API client. The optional React sub-export (api/client/javascript/src/react/context.tsx) provides only a context/provider/hook to inject an OpenMeter client instance; it holds no application state of its own. + - Server state: No client-side server-state library (no React Query/SWR/Apollo). Each SDK resource method calls openapi-fetch (this.client.GET/POST/PUT/DELETE/PATCH) and pipes the raw result through transformResponse (api/client/javascript/src/client/utils.ts), which throws HTTPError on resp.error or status >= 400 and recursively decodes ISO date strings to JS Date objects via decodeDates. Callers own any caching/state. + - Local state: Not applicable — no UI components with local state exist. + +**Conventions:** +- No application UI exists: OpenMeter is a Go usage-metering backend (frontend_ratio = 0.0). The only client-facing surface is the generated @openmeter/sdk npm package under api/client/javascript. +- SDK is generated-first, wrapper-second: src/client/schemas.ts (openapi-typescript via scripts/generate.ts) and src/zod/index.ts (orval, per orval.config.ts) are generated from the OpenAPI spec and carry 'Do not edit manually' headers — never hand-edited. +- Four named sub-package exports in package.json: '.' (admin client -> dist/index.js), './portal' (portal-token client), './react' (React context/provider/hook), './zod' (orval-generated Zod schemas). New resource classes are registered as public fields on the root OpenMeter class in src/client/index.ts. +- One file per domain resource under src/client/ (addons.ts, apps.ts, billing.ts, customers.ts, events.ts, meters.ts, notifications.ts, plans.ts, subscriptions.ts, etc.); each exports a class taking Client and returning transformResponse(resp) — callers never read resp.data directly. +- Centralized date handling (api/client/javascript/src/client/utils.ts): encodeDates (Date -> ISO string) is applied in the querySerializer; decodeDates (ISO string -> Date, matched by ISODateFormat regex) runs inside transformResponse. +- Error handling: transformResponse throws HTTPError (api/client/javascript/src/client/common.ts) on resp.error or HTTP status >= 400; HTTPError.fromResponse extracts problem.detail/type/title/status when Content-Type is application/problem+json (RFC 7807); isHTTPError is the type guard. +- React integration (src/react/context.tsx) is the only .tsx file; it carries the 'use client' directive (first line) for Next.js App Router compatibility, re-exports the portal surface wholesale (export * from '../portal/index.js'), and provides only Context plumbing (OpenMeterContext / OpenMeterProvider / useOpenMeter) — no rendered UI. +- Tooling: pnpm package manager (pinned in package.json), dual ESM/CJS build via @knighted/duel, Node >= 22 engine, Vitest tests colocated as *.spec.ts (e.g. src/client/events.spec.ts) using @fetch-mock/vitest. Published library supports React >=18 via peerDependency. +- The quickstart/ directory is a Go + docker-compose deployment example (quickstart/quickstart_test.go, docker-compose.yaml, config.yaml), not a web UI. \ No newline at end of file diff --git a/.claude/rules/guidelines.md b/.claude/rules/guidelines.md new file mode 100644 index 0000000000..9f7e428329 --- /dev/null +++ b/.claude/rules/guidelines.md @@ -0,0 +1,254 @@ +## Implementation Guidelines + +### Transaction-aware Ent adapter participating in a caller's transaction [persistence] +Libraries: `entgo.io/ent v0.14.6`, `github.com/jackc/pgx/v5 v5.9.2` +Pattern: Adapter structs hold a *entdb.Client and implement entutils.TxCreator (Tx hijacks an Ent tx onto ctx) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self returns the non-tx instance). Each adapter method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}) so it transparently joins a caller-supplied tx (rebinding on the *TxDriver in ctx) or runs standalone via Self(). Services compose other services' adapters inside one transaction.Run. +Key files: `pkg/framework/entutils/transaction.go`, `pkg/framework/transaction/transaction.go`, `openmeter/customer/adapter/adapter.go`, `openmeter/billing/adapter/adapter.go` +Example: `func (a *adapter) GetCustomer(ctx context.Context, id models.NamespacedID) (*customer.Customer, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, rep *adapter) (*customer.Customer, error) { + row, err := rep.db.Customer.Query(). + Where(customerdb.Namespace(id.Namespace), customerdb.ID(id.ID)). + Only(ctx) + if err != nil { + return nil, err + } + return mapCustomerFromDB(row), nil + }) +}` +**Applicable when:** Adapter whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator — TransactingRepo only rebinds when a *TxDriver is on ctx, else falls back to repo.Self() (pkg/framework/entutils/transaction.go:199). +**Do NOT apply when:** + - Pure in-memory adapter with no Ent client (registry/map-backed components) — there is no transaction to join (openmeter/app/adapter/marketplace.go:120). + - Helper that accepts a raw *entdb.Client argument instead of reading the tx from ctx — per AGENTS.md the charges adapter convention still requires wrapping the body with entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the ctx tx; passing a non-tx client silently writes outside the caller's transaction. +- Never introduce context.Background()/context.TODO() to sidestep tx propagation (AGENTS.md); thread the caller's ctx through the full path. +- Self() must return the non-tx instance so standalone calls do not accidentally reuse a stale tx client. +- Use transaction.Run(...) at the service layer to open the tx that adapters then join. + +### Per-customer serialization with Postgres advisory locks (lockr) [persistence] +**Scope:** `subscription`, `billing`, `ledger`, `entitlement` +Libraries: `entgo.io/ent v0.14.6 (pg_advisory_xact_lock via raw SQL)`, `github.com/zeebo/xxh3 (xxh3 hash)` +Pattern: lockr.NewKey(scopes...) joins scopes with ':' and xxh3-hashes to a 64-bit int; Locker.LockForTX runs SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-released on commit/rollback. Domains expose typed key builders (subscription.GetCustomerLock(customerID)). getTxClient asserts the call is inside a real Postgres tx and errors otherwise. +Key files: `pkg/framework/lockr/locker.go`, `pkg/framework/lockr/key.go`, `openmeter/subscription/locks.go`, `openmeter/subscription/service/service.go` +Example: `err := transaction.Run(ctx, a.driver, func(ctx context.Context) error { + key := subscription.GetCustomerLock(customerID) + if err := a.locker.LockForTX(ctx, key); err != nil { + return err + } + // all mutations below are serialized per-customer and + // the lock releases automatically when this tx commits + return a.applySubscriptionEdits(ctx, edits) +})` +**Applicable when:** The lock-key identity component is a globally-unique row id — subscription.GetCustomerLock keys on customer id, and customer ids are PK-unique via IDMixin field.String("id").Unique() + index.Fields("namespace","id").Unique() (openmeter/subscription/locks.go:6). +**Do NOT apply when:** + - Caller keys the lock on a namespace-non-unique column — customer key is only unique under namespace + deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62), so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one. + - Caller is not inside a Postgres transaction — lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails. + - Operation mutates exactly one row with no cross-row invariant — Ent SELECT ... FOR UPDATE row locking suffices and avoids two scope strings colliding into the same 64-bit advisory slot. +- Two distinct scope strings can xxh3-collide into the same advisory slot; keep scope vocabularies disjoint per domain. +- Billing also serializes per-customer via the BillingCustomerLock row (SELECT ... FOR UPDATE) — pick the mechanism the surrounding code already uses for that domain. +- The lock is transaction-scoped: do work and commit; do not hold across multiple transactions. + +### Guarded lifecycle state machine with external (aggregate-stored) state [state_management] +**Scope:** `billing`, `charges` +Libraries: `github.com/qmuntal/stateless v1.8.0` +Pattern: stateless.NewStateMachineWithExternalStorage keeps the current state on the domain aggregate (invoice.status / charge.status). Each state is Configure'd with Permit/PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over STATUS (~string + Validate()) and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase). +Key files: `openmeter/billing/service/stdinvoicestate.go`, `openmeter/billing/charges/statemachine/machine.go` +Example: `sm := stateless.NewStateMachineWithExternalStorage( + func(ctx context.Context) (any, error) { return inv.Status, nil }, + func(ctx context.Context, s any) error { inv.Status = s.(billing.InvoiceStatus); return nil }, + stateless.FiringImmediate, +) +sm.Configure(billing.InvoiceStatusDraft). + Permit(triggerFinalize, billing.InvoiceStatusIssued). + OnActive(func(ctx context.Context, _ ...any) error { + return svc.finalizeInvoice(ctx, inv) + }) +if err := sm.Fire(triggerFinalize); err != nil { + return err +}` +**Applicable when:** Charge aggregate that carries its status as a string enum and implements ChargeLike — machine.go:39 requires GetStatus/WithStatus/GetBase/WithBase and machine.go:16 constrains STATUS to ~string + Validate(). +**Do NOT apply when:** + - State is not externally owned by the aggregate — these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the persisted row; an in-memory-state FSM would not persist transitions across requests. + - A transition has no guard and no side effect and the type has only two states — a plain bool/enum field is simpler than configuring a stateless machine. +- Declare every legal transition as a Permit edge; a status reachable only by direct mutation bypasses guards and side effects. +- OnActive side effects run inside the surrounding transaction — keep them idempotent for retry safety. +- Reuse the generic charge machine across flat-fee/usage-based/credit-purchase by satisfying ChargeLike rather than writing a new machine per subtype. + +### Compile-time dependency injection with feature-gated provider swaps (Wire) [state_management] +Libraries: `github.com/google/wire v0.7.0` +Pattern: Constructors are grouped into wire.NewSet provider sets per concern in app/common/*.go; each binary's build-tagged wire.go (//go:build wireinject) lists the sets it needs and make generate emits wire_gen.go. Feature flags choose concrete vs noop providers at wiring time (app/common/ledger.go on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled). +Key files: `cmd/server/wire.go`, `app/common/customer.go`, `app/common/billing.go`, `app/common/ledger.go`, `app/common/app.go` +Example: `// app/common/customer.go +var Customer = wire.NewSet( + NewCustomerService, + NewCustomerAdapter, +) + +func NewCustomerLedgerService(conf config.Configuration) customer.ServiceHook { + if !conf.Credits.Enabled { + return ledgernoop.NewCustomerHook() // feature disabled -> noop + } + return ledger.NewCustomerHook(/* concrete deps */) +}` +**Applicable when:** Subsystem gated by a config flag that must disable cleanly at every layer — credits.enabled wires ledger account services/resolvers to noop implementations across api/v3 handlers, customer ledger hooks, and namespace provisioning (app/common/ledger.go; AGENTS.md). +**Do NOT apply when:** + - Checking the feature flag inside service business logic instead of swapping the provider — a disabled subsystem must be a noop at the wiring seam, not a runtime conditional scattered through methods (AGENTS.md credits.enabled guidance). + - Any ledger-account backfill that must write real ledger_accounts / ledger_customer_accounts rows — when credits.enabled is false the default DI outputs are noop, so the backfill must construct concrete ledger account + resolver adapters directly (AGENTS.md). +- Never edit wire_gen.go by hand; change the provider set and run make generate. +- Each binary links only the provider sets in its wire.go — adding a service to one binary does not add it to the others. +- Register namespace handlers before initNamespace(...) in cmd/server/main.go if they must provision the default namespace at startup (AGENTS.md). + +### Domain events over Kafka via Watermill CQRS and type-routed consumers [notifications] +**Scope:** `notification`, `billing`, `entitlement`, `ingest` +Libraries: `github.com/ThreeDotsLabs/watermill v1.5.2`, `github.com/ThreeDotsLabs/watermill-kafka/v3 v3.1.2`, `github.com/cloudevents/sdk-go/v2 v2.16.2`, `github.com/confluentinc/confluent-kafka-go/v2 v2.14.1` +Pattern: Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest/balance-worker/system). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored. A notification DLQ topic (om_sys.notification_service_dlq) catches poison messages. +Key files: `openmeter/watermill/eventbus/eventbus.go`, `openmeter/watermill/grouphandler/grouphandler.go`, `openmeter/notification/consumer/consumer.go` +Example: `handler := grouphandler.NewNoPublishingHandler( + logger, + eventMarshaler, + grouphandler.NewGroupEventHandler(func(ctx context.Context, e *MyEvent) error { + return svc.Handle(ctx, e) + }), +) +// publishing from a producer: +if err := eventBus.Publish(ctx, myEvent); err != nil { + return err +}` +**Applicable when:** Asynchronous cross-binary work where eventual consistency is acceptable — publish routes by event-name prefix to IngestEventsTopic/BalanceWorkerEventsTopic/SystemEventsTopic (openmeter/watermill/eventbus/eventbus.go). +**Do NOT apply when:** + - Cross-domain effect that must commit in the same transaction as the triggering write (e.g. provisioning a ledger account on customer create) — use the in-process Service hook registry (openmeter/customer/service/service.go), not Kafka. + - Producing/consuming Kafka directly with confluent-kafka-go instead of the eventbus/grouphandler abstractions — bypasses topic routing, CloudEvents marshaling, and unknown-type accounting. +- Event-name prefix determines the topic; name new events consistently so they route correctly. +- All handlers for a type run and their errors are joined — make each handler independently retry-safe. +- Unknown event types are ignored (counted), not errored — a missing handler registration fails silently. + +### Pluggable third-party app integration via the marketplace registry [payments] +**Scope:** `app` +Libraries: `github.com/stripe/stripe-go/v80 v80.2.1`, `github.com/invopop/gobl v0.403.0` +Pattern: The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing. Install operations look up the factory by AppType; capability support (e.g. billing) is discovered by type-asserting the constructed instance against capability interfaces. +Key files: `openmeter/app/adapter/marketplace.go`, `openmeter/app/registry.go`, `openmeter/app/marketplace.go`, `openmeter/app/stripe/service/service.go` +Example: `func NewStripeService(appSvc app.Service, deps Deps) (Service, error) { + s := &service{deps: deps} + err := appSvc.RegisterMarketplaceListing(app.RegistryItem{ + Listing: stripeListing, + Factory: s, // builds an App instance for an install + }) + if err != nil { + return nil, err + } + return s, nil +}` +**Applicable when:** Integration factory that registers exactly once per process at DI wiring time — RegisterMarketplaceListing rejects a second registration of the same AppType (openmeter/app/adapter/marketplace.go:121). +**Do NOT apply when:** + - Registration happens after the listing surface is already serving requests — the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live (openmeter/app/adapter/marketplace.go:121). +- Discover an installed app's billing/invoicing capability by type assertion against the capability interface, not by an AppType switch. +- Use GOBL for invoice document formatting behind the billing service rather than emitting payment-provider-specific invoice shapes. +- Stripe API access uses stripe-go/v80; keep the pinned major in sync with the SDK version in go.mod. + +### Persisted entity definition via Ent schema mixins + Atlas migrations [persistence] +Libraries: `entgo.io/ent v0.14.6`, `ariga.io/atlas v0.36.x`, `github.com/golang-migrate/migrate/v4 v4.19.1`, `github.com/oklog/ulid/v2 v2.1.1` +Pattern: A schema struct composes entutils mixins in Mixin() (ResourceMixin → IDMixin ULID char(26) PK + NamespaceMixin + MetadataMixin jsonb + TimeMixin created/updated/deleted_at + unique (namespace,id); UniqueResourceMixin adds a (namespace,key,deleted_at) unique index). Edit the schema, run make generate to regenerate openmeter/ent/db, then atlas migrate --env local diff to emit .up.sql/.down.sql under tools/migrate/migrations and update atlas.sum. +Key files: `pkg/framework/entutils/mixins.go`, `openmeter/ent/schema/customer.go`, `openmeter/ent/schema/billing.go`, `tools/migrate/migrations` +Example: `func (Customer) Mixin() []ent.Mixin { + return []ent.Mixin{ + entutils.ResourceMixin{}, // id+namespace+metadata+timestamps+soft-delete + BillingAddressMixin{}, + } +} + +func (Customer) Fields() []ent.Field { + return []ent.Field{ + field.String("key").Optional(), + field.String("primary_email").Optional(), + } +}` +**Applicable when:** Entity relying on key-uniqueness within a namespace — UniqueResourceMixin's (namespace,key,deleted_at) index only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47). +**Do NOT apply when:** + - Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL — add a custom SQL migration with IndexWhere as Customer does (openmeter/ent/schema/customer.go:58-62), rather than relying on the mixin's deleted_at-in-key approximation. + - Ent ent.View schemas — they generate query code but do NOT appear in migrate.Tables, so the view DDL needs an explicit SQL migration (ChargesSearchV1; AGENTS.md ent-view caveat). +- Never edit openmeter/ent/db (generated); change the schema and run make generate. +- Drop incidental go.sum entries (e.g. tablewriter) that make generate / atlas diff add unless the task requires a dependency change (AGENTS.md). +- pr-checks enforce atlas.sum append-only; never rewrite existing migration files. + +### Typed v1 HTTP handler with domain-error-to-status mapping [networking] +Libraries: `github.com/go-chi/chi/v5 v5.2.5`, `github.com/getkin/kin-openapi v0.139.0`, `github.com/go-chi/render v1.0.3` +Pattern: Per-domain httpdriver packages build httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts): a decoder maps the HTTP request to a typed Request, the service op runs, an encoder writes the Response, and an errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T] in order, short-circuiting on errors.As against concrete domain error types into RFC7807 problem documents. The v1 router validates requests against the embedded OpenAPI3 spec first. +Key files: `pkg/framework/transport/httptransport/handler.go`, `openmeter/notification/httpdriver/handler.go`, `pkg/framework/commonhttp/errors.go`, `openmeter/notification/httpdriver/errors.go` +Example: `func (h handler) GetChannel() httptransport.Handler[GetChannelRequest, api.Channel] { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (GetChannelRequest, error) { + return GetChannelRequest{ID: chi.URLParam(r, "id")}, nil + }, + func(ctx context.Context, req GetChannelRequest) (api.Channel, error) { + return h.service.GetChannel(ctx, req.ID) + }, + commonhttp.JSONResponseEncoder[api.Channel], + httptransport.WithErrorEncoder(h.resolveErrorEncoder()), + ) +}` +**Applicable when:** Implementing a v1 endpoint where domain errors must map to HTTP status — errorEncoder uses ordered errors.As short-circuits (notification.NotFoundError→404, GenericValidationError→400, UpdateAfterDeleteError→409) (openmeter/notification/httpdriver/errors.go). +**Do NOT apply when:** + - Implementing a v3 AIP endpoint — v3 uses oapi-codegen ServerInterface delegators in api/v3/server/routes.go with shared rendering in api/v3/apierrors, not httptransport.Handler. + - A handler that maps a domain error inline to a status instead of through the typed errorEncoder chain — breaks the uniform RFC7807 mapping (pkg/framework/commonhttp/errors.go). +- Order the errorEncoder chain most-specific-first; errors.As stops at the first match. +- Return domain error types (NotFoundError, GenericValidationError) from services so the encoder can map them — do not pre-format HTTP errors in services. +- GenericValidationError from accumulating Validate() maps to a single 400 ValidationIssue. + +### In-process cross-domain reactions via Service hook registry [state_management] +**Scope:** `customer`, `subscription`, `ledger` +Libraries: `github.com/openmeterio/openmeter/pkg/models (ServiceHookRegistry)` +Pattern: A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]); on a lifecycle event it invokes registered hooks synchronously inside the same transaction. Wire providers in app/common build the hook and call targetService.RegisterHooks(h) at startup, registering a Noop hook when the feature is disabled. +Key files: `openmeter/customer/service/service.go`, `app/common/customer.go`, `pkg/models` +Example: `// at wiring time in app/common/customer.go +ledgerHook := NewCustomerLedgerService(conf) // concrete or Noop +customerService.RegisterHooks(ledgerHook) + +// the hook reacts to customer creation in-process / in-tx +func (h *ledgerHook) PostCreate(ctx context.Context, c *customer.Customer) error { + return h.ledger.ProvisionAccount(ctx, c) +}` +**Applicable when:** Cross-domain effect that must be synchronous and transactional with the triggering write and feature-gatable — customer-create → ledger account provisioning is registered as a hook and swapped to Noop when credits.enabled is false (app/common/customer.go). +**Do NOT apply when:** + - Effect tolerates eventual consistency and should not block the triggering transaction — publish a domain event over the Kafka eventbus instead (openmeter/watermill/eventbus/eventbus.go). + - Triggering service would gain a static import dependency on the dependent domain — the hook registry exists precisely to avoid that compile-time edge; do not hard-code the dependent call in the service body. +- Hooks run inside the triggering transaction; a hook error should roll the whole operation back when the effect is mandatory. +- Provide a Noop hook implementation so a disabled feature registers a no-op rather than nothing. +- Keep hook signatures generic via ServiceHook[T] so multiple reactors can register against one service. + +### Code-generated type conversion between domain, API, and DB representations [persistence] +Libraries: `github.com/jmattheis/goverter v1.9.3`, `github.com/awalterschulze/goderive v0.5.1` +Pattern: convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations (equality/clone helpers). Hand-written conversion functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the go-types-conversion skill); make generate regenerates them. +Key files: `api/convert.go`, `api/convert.gen.go`, `openmeter/billing/derived.gen.go`, `openmeter/customer/adapter/entitymapping.go` +Example: `// goverter interface in convert.go (source of generation) +// goverter:converter +type Converter interface { + ToAPICustomer(c customer.Customer) api.Customer + FromAPICustomerCreate(in api.CustomerCreate) customer.CustomerMutate +} +// run `make generate` -> convert.gen.go implements Converter` +**Applicable when:** Translating between domain/API/DB types where the mapping is structural — hand-written mappers must use FromAPI/ToAPI/FromDB/ToDB names (openmeter/customer/adapter/entitymapping.go). +**Do NOT apply when:** + - Editing a *.gen.go converter by hand — they carry a DO NOT EDIT header; change convert.go (goverter) or the goderive annotation and regenerate. + - Using project/projected terminology for domain mapping — AGENTS.md mandates map/mapped terminology and the FromAPI/ToAPI/FromDB/ToDB function names. +- For equality/clone of billing aggregates use the goderive-generated helpers in derived.gen.go rather than hand-writing deep-equals. +- Keep one converter interface per boundary (API↔domain, DB↔domain) so goverter generation stays scoped. + +### Svix-backed webhook delivery behind a Handler interface [notifications] +**Scope:** `notification` +Libraries: `github.com/svix/svix-webhooks v1.95.1`, `go.opentelemetry.io/otel v1.44.0` +Pattern: notification/webhook defines a Handler interface (CreateWebhook/UpdateWebhook/endpoint secret + header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. A reconciliation loop in eventhandler/reconcile.go re-drives delivery for events whose webhook send did not confirm. +Key files: `openmeter/notification/webhook/svix/webhook.go`, `openmeter/notification/webhook/noop/noop.go`, `openmeter/notification/eventhandler/reconcile.go` +Example: `func NewWebhookHandler(conf config.NotificationConfiguration) (webhook.Handler, error) { + if !conf.Webhook.Enabled { + return noop.NewHandler(), nil + } + return svix.NewHandler(svix.Config{ + ServerURL: conf.Webhook.SvixServerURL, + APIKey: conf.Webhook.SvixAPIKey, + }) +}` +**Applicable when:** Delivering notification events to customer-configured endpoints where delivery is feature-gated — the Handler interface has both a Svix and a noop implementation selected at wiring time (openmeter/notification/webhook/noop/noop.go). +**Do NOT apply when:** + - Webhooks disabled in config — wire the noop Handler, not the Svix one, so no Svix API key is required (openmeter/notification/webhook/noop/noop.go). + - Treating a Svix send as the durable source of truth — the NotificationEventDeliveryStatus row + reconcile loop (openmeter/notification/eventhandler/reconcile.go) are authoritative; an un-reconciled send can be re-driven. +- Persist NotificationEventDeliveryStatus before/around the Svix call so the reconcile loop can recover unconfirmed deliveries. +- Wrap Svix calls in tracex spans for observability (the svix Handler already does). +- Payload versioning lives in eventpayload.go — bump the payload version when changing the wire shape (see /notification skill). \ No newline at end of file diff --git a/.claude/rules/infrastructure.md b/.claude/rules/infrastructure.md new file mode 100644 index 0000000000..c43a89864e --- /dev/null +++ b/.claude/rules/infrastructure.md @@ -0,0 +1,38 @@ +## Infrastructure Rules + +### Ci Cd + +- Always run toolchain commands through the Nix CI shell `nix develop --impure .#ci -c ` when go/gofmt/golangci-lint/atlas are missing from the ambient shell; CI itself runs build/lint/test/migrate-check/generators this way. *(source: `AGENTS.md Testing; .github/workflows/ci.yaml`)* +- Always set POSTGRES_HOST=127.0.0.1 for DB-touching Go tests (and ensure Postgres is up via `docker compose up -d postgres`), or suites silently skip; run tests with -tags=dynamic (confluent-kafka-go) and the Make parallelism flags -p 128 -parallel 16. *(source: `AGENTS.md Testing; Makefile test`)* +- Never let generated artifacts drift: CI fails if `make update-openapi`, `make generate-javascript-sdk`, or `go generate ./...` produce any git diff or untracked files — run make generate-all and commit before pushing. *(source: `.github/workflows/ci.yaml generators-* jobs`)* +- Always keep .nvmrc byte-identical to `nix develop --impure .#ci -c node -v`; CI fails the build job on mismatch and flake.nix enterShell rewrites .nvmrc from `node -v`. *(source: `.github/workflows/ci.yaml Validate Node version file; flake.nix enterShell; AGENTS.md`)* +- The Go build/test in Docker and Depot CI uses CGO + musl static linking against librdkafka pinned to v2.14.1; redirect GOTMPDIR/TMPDIR to the workspace on Depot runners to avoid ENOSPC in /run. *(source: `Dockerfile (-tags musl, -linkmode external -extldflags static); flake.nix rdkafka rev v2.14.1; .github/workflows/ci.yaml build/test`)* +- The chi-middleware oapi-codegen template is patched: run `make patch-oapi-templates` (copies the vendored template and applies api/v3/templates/chi-middleware.tmpl.patch) before code generation, as `make generate` does automatically. *(source: `Makefile patch-oapi-templates; .github/workflows/ci.yaml generators-go`)* + +### Dependency Registry + +- Keep both Go modules tidy together: `go mod tidy` for the root and `go mod tidy -C collector` for the collector module (which replaces the parent via local replace ../); the collector pulls a large Benthos/Redpanda Connect dependency tree. *(source: `Makefile mod; collector/go.mod replace directive`)* +- Drop incidental go.sum additions (e.g. tablewriter) introduced by `make generate` or `atlas migrate diff` unless the task explicitly requires a dependency change. *(source: `AGENTS.md Coding Conventions`)* + +### Distribution + +- Container images and Helm charts are tag-only releases pushed to ghcr.io (images ghcr.io/openmeterio/openmeter + benthos-collector multi-arch linux/amd64+arm64; charts to oci://ghcr.io/openmeterio/helm-charts) — release.yaml jobs gate on github.ref_type == 'tag'. *(source: `.github/workflows/release.yaml; .github/workflows/artifacts.yaml; deploy/charts/openmeter/Chart.yaml`)* +- Release tags must match v[0-9]+.[0-9]+.[0-9]+ (optionally -dev.N / -beta.N); main pushes publish a per-commit npm beta (1.0.0-beta-, dist-tag beta) while tags publish latest. *(source: `.github/workflows/release.yaml on.push.tags + sdk-javascript-meta`)* +- The npm @openmeter/sdk is published via OIDC Trusted Publishing (id-token: write, no token); the trusted publisher entry is keyed on the caller workflow file + the `prod` environment, so npm-release.yaml must be invoked from release.yaml and run on a GitHub-hosted runner with NPM_CONFIG_PROVENANCE=true. *(source: `.github/workflows/npm-release.yaml`)* + +### Env Setup + +- Copy config.example.yaml to config.yaml (Make targets do this automatically) and `touch` it whenever config.example.yaml changes, or `make server`/worker targets abort with a diff warning. *(source: `Makefile server target config.yaml freshness check; AGENTS.md Configuration`)* +- Local Postgres DSN is postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable; start dependencies with `make up` (docker compose; profiles dev/redis/webhook control optional services) and stop with `make down`. *(source: `atlas.hcl; docker-compose.yaml; Makefile up/down`)* +- Load the repo environment with direnv (or `direnv exec . `); when direnv/ambient tools are missing, fall back to `nix develop --impure .#ci -c ...`. The Nix shell provides go/node/python/atlasx/golangci-lint/air/helm/benthos/sqlc/spectral/codegraph. *(source: `AGENTS.md Configuration/Testing; flake.nix packages`)* + +### Git + +- tools/migrate/migrations/atlas.sum is append-only; pr-checks.yaml runs check_atlas_sum_append_only.py against the PR base SHA and migrate-check enforces non-linear=error, data_depend=error, incompatible=error (destructive allowed). *(source: `.github/workflows/pr-checks.yaml; atlas.hcl lint; Makefile migrate-check`)* +- Every PR must carry a release-note label (one of release-note/ignore, kind/feature, release-note/feature, kind/bug, release-note/bug-fix, release-note/breaking-change); commit messages must follow Conventional Commits enforced by commitizen/prek (`prek run -a` and `prek run --stage manual` in CI). *(source: `.github/workflows/pr-checks.yaml release-label; flake.nix git-hooks; .github/workflows/ci.yaml Validate commit messages`)* +- End commit messages with the `Co-Authored-By: Claude ...` trailer and PR bodies with the Claude Code generated line; branch off main before committing/pushing and only push when asked. *(source: `system git instructions; AGENTS.md`)* + +### Secrets + +- Provide release secrets via GitHub Actions: GITHUB_TOKEN (GHCR/helm push), POETRY_PYPI_TOKEN_PYPI from secrets.PYPI_TOKEN (PyPI), vars.DEPOT_PROJECT (Depot builds), vars.TEST_CLICKHOUSE_DSN (tests); SVIX_JWT_SECRET=DUMMY_JWT_SECRET is a non-sensitive dev value only. *(source: `.github/workflows/release.yaml; .github/workflows/ci.yaml; Makefile SVIX_JWT_SECRET`)* +- Trufflehog secret scanning runs on PRs/pushes to main and fails on findings; never commit real secrets. *(source: `.github/workflows/security.yaml secret-scanning`)* \ No newline at end of file diff --git a/.claude/rules/patterns.md b/.claude/rules/patterns.md new file mode 100644 index 0000000000..7d7168b636 --- /dev/null +++ b/.claude/rules/patterns.md @@ -0,0 +1,388 @@ +## Communication Patterns + +### Wire compile-time dependency injection +- **When:** Wiring a new domain service, adapter, hook, or worker into a binary's object graph +- **How:** Each binary (cmd/server, cmd/billing-worker, etc.) declares a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets. Providers are plain constructor functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService)). `make generate` runs wire to emit wire_gen.go which call the constructors in dependency order. Constructors take explicit deps (logger, *entdb.Client, eventbus.Publisher) and return (Service, error); they never reach for globals. + +### Service / Adapter layered package with Config-validating constructor +- **When:** Creating or extending any domain package under openmeter/ (billing, customer, entitlement, subscription, notification, ledger, charges, app) +- **How:** A package exposes a Service interface and an Adapter interface in its root. The service struct (openmeter/customer/service) holds the adapter plus collaborators; the adapter struct (openmeter/customer/adapter) holds *entdb.Client. Both have a New(config) constructor whose Config has a Validate() error checked first thing in New — returning errors instead of panicking. The service var-asserts the interface: `var _ customer.Service = (*Service)(nil)`. + +### Transaction-aware Ent repository (TransactingRepo / HijackTx WithTx) +- **When:** Any adapter method that reads or writes via Ent and must participate in a caller-supplied transaction +- **How:** The adapter implements entutils.TxCreator (Tx() hijacks an Ent tx into the context) and TxUser (WithTx rebuilds the adapter bound to the tx client from raw config; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}): if a tx driver is already on the context it rebinds to it, otherwise it runs on the base client. transaction.Run(ctx, creator, cb) opens/commits/rolls-back and stores the driver on context; nested Run calls reuse the existing driver and emit savepoints. +- **Applicable when:** pkg/framework/entutils/transaction.go:199 TransactingRepo only rebinds when a *TxDriver is found on ctx, else falls back to repo.Self() — applies to adapter helpers whose backing struct holds an *entdb.Client and implements both TxUser[T] and TxCreator +- **Do NOT apply when:** + - Helper accepts a raw *entdb.Client argument instead of reading the tx from ctx — per AGENTS.md the charges adapter convention still requires wrapping such helpers with entutils.TransactingRepo so they rebind to the ctx tx; passing a non-tx client silently writes outside the caller's transaction + - Pure in-memory adapter with no Ent client (e.g. app marketplace registry map in openmeter/app/adapter/marketplace.go:120) — there is no transaction to join + +### Postgres transaction-scoped advisory lock (lockr) +- **Scope:** `subscription`, `entitlement`, `billing`, `ledger` +- **When:** Serializing concurrent business operations that span multiple rows/tables for one logical entity, e.g. all subscription mutations for a customer or all charge advances for a customer +- **How:** lockr.NewKey(scopes...) builds a colon-joined scope string, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx. The lock auto-releases on commit/rollback. getTxClient first asserts the call is inside a real postgres tx (transaction_timestamp() != statement_timestamp()) and errors otherwise. Domain code wraps the key behind a typed helper such as subscription.GetCustomerLock(customerId) = NewKey("customer", customerId, "subscription"). +- **Applicable when:** The lock-key identity component must be a globally-unique row identifier. subscription.GetCustomerLock (openmeter/subscription/locks.go:6) keys on the customer id, and customer ids are PK-unique via the IDMixin `field.String("id").Unique()` + `index.Fields("namespace","id").Unique()` declared in pkg/framework/entutils/mixins.go:90-104,77 — so one ("customer", id, scope) key maps to exactly one customer and the advisory lock serializes only that customer's operations +- **Do NOT apply when:** + - Caller would key the lock on a non-unique column — e.g. customer `key` is only unique under namespace+deleted_at IS NULL (openmeter/ent/schema/customer.go:58-62) not globally; a lock keyed on raw `key` could serialize unrelated customers across namespaces or collide a live row with a soft-deleted one + - Caller is not inside a postgres transaction — lockr.getTxClient (pkg/framework/lockr/locker.go:134) hard-errors when transaction_timestamp()==statement_timestamp(), so LockForTX outside transaction.Run always fails + - Operation mutates exactly one row and needs no cross-row invariant — Ent SELECT ... FOR UPDATE row locking suffices and avoids two distinct scope strings colliding into the same 64-bit advisory slot + +### Service hook registry (ServiceHookRegistry) +- **When:** Letting one domain react to another domain's lifecycle events in-process (e.g. provision a ledger account when a customer is created, sync a customer when a subject is created) +- **How:** A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common build the hook implementation and call targetService.RegisterHooks(h) at startup; when the feature is disabled the provider returns a Noop hook instead (e.g. NewCustomerLedgerServiceHook returns ledgerresolvers.NoopCustomerLedgerHook{} when creditsConfig.Enabled is false). Hooks fire synchronously inside the producing service's flow. + +### In-process event bus over Watermill CQRS (eventbus.Publisher) +- **When:** Emitting domain events (ingest, balance-worker, system events) to Kafka for asynchronous workers to consume +- **How:** eventbus.New wraps a watermill cqrs.EventBus. Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix: ingest-subsystem-prefixed events to IngestEventsTopic, balance-worker-prefixed to BalanceWorkerEventsTopic, everything else to SystemEventsTopic. Producers call publisher.WithContext(ctx).PublishIfNoError(event, err) to inline publish-or-propagate. nil events are intentionally dropped (a handler returning nil means 'publish nothing'). + +### Kafka consumer via Watermill grouphandler (type-routed event dispatch) +- **When:** Building a worker (notification, billing-worker, balance-worker) that consumes CloudEvents off Kafka and fans them to per-event-type handlers +- **How:** grouphandler.NewNoPublishingHandler builds a map[eventName][]GroupEventHandler. On each message it derives the CloudEvent type via the marshaler, looks up handlers, unmarshals once into handler[0].NewEvent(), and runs all matching handlers joining their errors. Unknown event types are counted as 'ignored' and ack'd (return nil), not failed. Per-message processing time and status counters are emitted to OpenTelemetry. + +### Explicit finite state machine (qmuntal/stateless) with external storage +- **Scope:** `billing`, `charges` +- **When:** Modeling the invoice lifecycle and per-charge UBP lifecycle where transitions are guarded and have side effects +- **How:** stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (the invoice/charge), not in the FSM. Each state is Configure'd with Permit(trigger, targetState) edges, guarded variants PermitDynamic(trigger, target, guardFn), and OnActive side-effect callbacks composed via statelessx.AllOf/BoolFn. The invoice machine is pooled (sync.Pool, invoiceStateMachineCache) and reset per use. The charges machine is a generic Machine[CHARGE, BASE, STATUS] driven by AdvanceUntilStateStable and a Persistence{UpdateBase, Refetch} struct, accumulating invoiceupdater.Patch side effects. +- **Applicable when:** openmeter/billing/charges/statemachine/machine.go:16 the STATUS type parameter is constrained `~string` + Validate() error, and machine.go:39 requires CHARGE to implement ChargeLike (GetStatus/WithStatus/GetBase/WithBase) — applies to charge aggregates that carry their status as a string enum and can rebuild themselves with a new status +- **Do NOT apply when:** + - State is not externally owned by the aggregate — these machines use NewStateMachineWithExternalStorage (stdinvoicestate.go:48) and read/write status on the domain object; an in-memory-state FSM would not persist transitions across the request + - A transition has no guard and no side effect and the type has only two states — a plain bool/enum field is simpler than configuring a stateless machine + +### In-memory map registry with type-asserted factory dispatch (app marketplace) +- **Scope:** `app` +- **When:** Pluggable app integrations (Stripe, custom-invoicing, sandbox) registered at startup and instantiated on demand by type +- **How:** The app adapter holds registry map[AppType]RegistryItem. Each integration's service constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) once at wiring time; RegisterMarketplaceListing rejects duplicate types and validates the listing. Install operations look up the RegistryItem and type-assert the Factory to the capability interface actually requested (Factory.(app.AppFactoryInstallWithAPIKey) vs Factory.(app.AppFactoryInstall)), returning a GenericValidationError if the app doesn't support that install method. +- **Applicable when:** openmeter/app/adapter/marketplace.go:121 RegisterMarketplaceListing rejects a second registration of the same AppType — applies to integration factories that register exactly once per process at wiring time; the map is the single source of installable app types and capability support is discovered by interface type-assertion on Factory +- **Do NOT apply when:** + - Registration happens after the listing surface is already serving requests — the map has no locking around late registration, so listings must be registered during DI wiring before the HTTP/worker surface is live + +### Per-subtype connector dispatch behind a single Service (entitlement) +- **Scope:** `entitlement` +- **When:** A service whose behavior branches by an enum subtype (metered / static / boolean entitlements) where each subtype has its own logic implementation +- **How:** entitlement.SubTypeConnector is implemented three times (metered/static/boolean connector.go). The aggregate service holds all three as fields and getTypeConnector(typed) switches on EntitlementType to return the right connector, returning an error in the default case. Sub-type-specific create/value logic is delegated to the selected connector while the umbrella service owns shared concerns. +- **Applicable when:** openmeter/entitlement/service/service.go:424 getTypeConnector switches over the closed EntitlementType set declared in openmeter/entitlement/entitlement.go:331 (Values()={metered,static,boolean}) with a default-error arm — applies when adding behavior keyed on an entitlement subtype; a new EntitlementType value MUST also get a SubTypeConnector field + switch arm or it falls through to the default error +- **Do NOT apply when:** + - The branching value is open/user-defined rather than the fixed EntitlementType enum — a closed switch with a default-error arm would reject legitimate values + +### Generic HTTP handler pipeline (httptransport.Handler[Request,Response]) +- **When:** Implementing a v1 HTTP endpoint: decode request -> call service -> encode response, with consistent error encoding +- **How:** httptransport.NewHandler[Request,Response](decode, service-op, encode, ...opts) builds a typed handler. Per-domain httpdriver packages compose a decoder (request -> typed Request), the service call, and an encoder, plus an errorEncoder that maps domain error types to status codes. Handlers can be Chain'd with operation.Middleware. + +### Domain-error to HTTP-status mapping via typed error encoders +- **When:** Translating service-layer errors into HTTP responses (RFC7807 problem documents) +- **How:** Two complementary mechanisms. (1) Per-handler errorEncoder chains commonhttp.HandleErrorIfTypeMatches[T](ctx, status, err, w) — ordered short-circuit on errors.As against concrete domain error types (e.g. notification.NotFoundError->404, GenericValidationError->400, UpdateAfterDeleteError->409). (2) Generic errors carry an HTTP status as a ValidationIssue attribute (openmeter.http.status_code); commonhttp.HandleIssueIfHTTPStatusKnown maps it but only when all issues agree on a single status ('singular' behavior), else declines. The v3 surface mirrors the same singular logic in apierrors.NewV3ErrorHandlerFunc, rendering v3 BaseAPIError shapes. + +### Accumulating Validate() with NillableGenericValidationError +- **When:** Validating any input struct or domain config +- **How:** Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf("field: %w", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil. Simpler single-field checks return models.NewGenericValidationError(...) directly. The generic validation error maps to HTTP 400 at the edge. + +### Goverter / Goderive code-generated type converters +- **When:** Translating between domain, API, and DB representations without hand-writing boilerplate mappers +- **How:** convert.gen.go files are generated from goverter converter interfaces declared in convert.go; billing/derived.gen.go is generated from goderive annotations. Hand-written conversion files/functions follow the FromAPI.../ToAPI.../FromDB.../ToDB... naming convention (the /go-types-conversion skill). Never edit *.gen.go (Code generated ... DO NOT EDIT header). + +### Svix-backed webhook delivery behind a Handler interface +- **When:** Delivering notification events to customer-configured HTTP endpoints +- **How:** notification/webhook defines a Handler interface (CreateWebhook, UpdateWebhook, endpoint secret/header management) with a Svix implementation (webhook/svix) and a noop implementation (webhook/noop) for when webhooks are disabled. Svix calls are wrapped in OpenTelemetry tracex spans. The notification event pipeline reconciles delivery state via eventhandler/reconcile.go. + +### Ent schema mixins for cross-cutting columns (ResourceMixin/IDMixin/TimeMixin/AnnotationsMixin) +- **When:** Defining a new persisted entity that needs the standard id/namespace/metadata/timestamps and soft-delete columns +- **How:** Schema structs compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index. UniqueResourceMixin adds a (namespace,key,deleted_at) unique index approximating partial-unique-on-not-deleted. Soft delete is via deleted_at; unique indexes are scoped with deleted_at to avoid resurrect collisions. +- **Applicable when:** pkg/framework/entutils/mixins.go:47 UniqueResourceMixin's (namespace,key,deleted_at) unique index only approximates partial uniqueness — same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration; applies to entities relying on key-uniqueness for soft-deleted rows +- **Do NOT apply when:** + - Entity needs true partial-unique (namespace,key) WHERE deleted_at IS NULL — must add a custom SQL migration with IndexWhere, as the customer schema does at openmeter/ent/schema/customer.go:58-62, rather than relying on the mixin's deleted_at-in-key approximation + +## Integrations + +| Service | Purpose | Integration point | +|---------|---------|-------------------| +| PostgreSQL (Ent ORM + Atlas + pgx) | Primary transactional datastore for all domain entities; schema generated from ent schema, migrated via Atlas/golang-migrate | `openmeter/ent/schema/, pkg/framework/entutils/transaction.go, app/common/database.go, tools/migrate/migrations/` | +| ClickHouse | Analytics store for metered usage events; streaming queries (CountEvents, QueryMeter) feed entitlement balance and billing | `openmeter/streaming/clickhouse/, openmeter/streaming/connector.go, app/common/clickhouse.go` | +| Kafka (confluent-kafka-go + Watermill CQRS) | Event backbone: ingest events, system events, balance-worker events; consumed by notification/billing/balance/sink workers | `openmeter/watermill/eventbus/eventbus.go, openmeter/watermill/grouphandler/grouphandler.go, app/common/kafka.go, openmeter/notification/consumer/consumer.go` | +| Svix | Outbound webhook delivery to customer endpoints for notification events | `openmeter/notification/webhook/svix/webhook.go, openmeter/notification/webhook/svix/svix.go` | +| Stripe | Payment/invoicing app integration registered in the app marketplace; handles inbound Stripe webhooks | `openmeter/app/stripe/service/service.go, openmeter/app/stripe/service/factory.go, openmeter/app/stripe/httpdriver/webhook.go` | +| GOBL | Invoice document format/representation for billing invoices | `openmeter/billing/service/` | +| OpenTelemetry | Tracing and metrics across services, Kafka consumers, and Svix calls | `app/common/telemetry.go, openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/webhook/svix/webhook.go` | +| Redis | Dedupe and supporting caches (optional) | `pkg/redis/, openmeter/dedupe/` | +| Viper + Cobra | Configuration loading and CLI command structure for the binaries | `app/config/, app/common/config.go` | + +## Pattern Selection Guide + +| Scenario | Pattern | Rationale | +|----------|---------|-----------| +| Adding a new domain package with persistence | Service/Adapter layered package with Config.Validate() constructors + Ent adapter implementing TxCreator/TxUser | Matches every existing domain (customer, billing, entitlement); transaction-awareness via entutils.TransactingRepo lets the adapter join caller transactions and keeps namespace/multi-tenancy handling uniform. | +| Wiring a new service/hook/worker into a binary | Add a wire.NewSet provider in app/common/*.go and reference it from the binary's wire.go, then run make generate | Wire is the single DI mechanism; constructors take explicit deps and return errors, so feature flags (e.g. credits.enabled) gate wiring by returning Noop implementations. | +| Serializing all operations for one logical entity across multiple tables | lockr advisory lock keyed on a globally-unique id inside transaction.Run | pg_advisory_xact_lock auto-releases with the tx and serializes business flows the DB's row locks can't span; only safe when the key's id component is PK-unique (see lockr precondition). | +| Reacting to another domain's lifecycle event in-process | ServiceHookRegistry hook registered at wiring time (Noop when feature disabled) | Synchronous, transactional in-process coupling without a Kafka round-trip; used for ledger provisioning, subject->customer sync, entitlement validation. | +| Reacting to events asynchronously across workers | eventbus.Publish -> Kafka topic by event-name prefix -> grouphandler type-routed consumer | Decouples producers from workers; unknown event types are safely ignored/ack'd, and per-type handlers unmarshal once. | +| Modeling a guarded multi-step lifecycle with side effects (invoice, charge) | qmuntal/stateless FSM with external storage on the aggregate | Permit/PermitDynamic/OnActive make legal transitions and guards explicit and testable; state lives on the persisted aggregate so transitions survive across requests. | +| Pluggable third-party app integration (Stripe-like) | RegisterMarketplaceListing into the in-memory app registry; capabilities discovered by Factory type-assertion | Single registration point with duplicate rejection; install methods are validated against the listing and the factory's implemented interfaces. | +| Behavior that branches by a fixed enum subtype | Per-subtype connector behind one service with a getTypeConnector switch (default-error arm) | Keeps shared concerns in the umbrella service while delegating subtype logic; the default-error arm forces a new enum value to be wired explicitly. | +| Returning errors to HTTP clients with correct status | Typed error encoders (HandleErrorIfTypeMatches) plus ValidationIssue http.status_code attribute mapping | Centralizes RFC7807 problem rendering; the 'singular' rule avoids ambiguous multi-status responses, and v3 mirrors the same logic in apierrors. | +| Validating input structs | Accumulate errs []error and return NewNillableGenericValidationError(errors.Join(...)) | Reports all field errors at once with field-prefixed wrapping and maps cleanly to HTTP 400. | +| Converting between domain/API/DB types | Goverter/Goderive generated converters; hand-written FromAPI/ToAPI/FromDB/ToDB helpers | Generated mappers cut boilerplate; the naming convention (per /go-types-conversion) keeps translation direction unambiguous. | + +## Quick Pattern Lookup + +- **New persisted domain package** -> Service/Adapter + Config.Validate() constructor + Ent TxCreator/TxUser adapter +- **Wire a service/worker into a binary** -> wire.NewSet provider in app/common + binary wire.go + make generate +- **Run repository logic inside/optionally-inside a transaction** -> transaction.Run + entutils.TransactingRepo +- **Serialize all ops for one entity across tables** -> lockr advisory lock on globally-unique id inside transaction.Run *(scope: subscription, entitlement, billing, ledger)* +- **React to another domain's lifecycle in-process** -> ServiceHookRegistry hook (Noop when disabled) +- **Async cross-worker reaction** -> eventbus.Publish -> Kafka by prefix -> grouphandler type-routed consumer +- **Guarded multi-step lifecycle (invoice/charge)** -> qmuntal/stateless FSM with external storage *(scope: billing, charges)* +- **Pluggable app integration** -> RegisterMarketplaceListing + Factory type-assertion dispatch *(scope: app)* +- **Behavior branching by fixed enum subtype** -> Per-subtype connector + getTypeConnector switch (default error) *(scope: entitlement)* +- **Map domain errors to HTTP status** -> HandleErrorIfTypeMatches chain / http.status_code ValidationIssue attribute +- **Validate input struct** -> errs []error + NewNillableGenericValidationError(errors.Join) + +## Decision Chain + +**Root constraint:** Provide event-time usage metering AND ACID usage-based billing on the same multi-tenant platform: high-volume append-only usage events must aggregate cheaply, while subscriptions/invoices/credits/ledger demand cross-row transactional invariants — over one shared codebase. + +- **Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane**: Read-heavy ingest/aggregation and transaction-heavy billing have opposing scaling and failure profiles, so usage events go to a columnar append-only store and a streaming pipeline while control-plane state stays in OLTP Postgres — split into independently scalable binaries sharing one module. + - *Violation keyword:* `usage events in postgres` + - *Violation keyword:* `single monolith binary` + - *Violation keyword:* `microservice per domain with own db` + - *Violation keyword:* `mongodb` + - *Violation keyword:* `dynamodb for control plane` + - **Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin)**: One shared Postgres schema across ~70 multi-tenant tables needs a uniform namespace/ULID/audit/soft-delete shape, defined once via mixins with Ent as source of truth and Atlas-generated migrations. + - *Violation keyword:* `gorm` + - *Violation keyword:* `prisma` + - *Violation keyword:* `sqlalchemy` + - *Violation keyword:* `hard delete` + - *Violation keyword:* `DROP without deleted_at` + - *Violation keyword:* `uuid v4 pk instead of ulid` + - *Violation keyword:* `per-table id column duplication` + - **Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)**: Cross-domain atomicity over a single shared Ent client requires adapters that join a caller-supplied transaction carried on context, rather than each owning its own connection. + - *Violation keyword:* `context.Background()` + - *Violation keyword:* `context.TODO()` + - *Violation keyword:* `raw *entdb.Client into a writing helper` + - *Violation keyword:* `separate db connection per repo` + - *Violation keyword:* `two-phase commit` + - **Postgres transaction-scoped advisory locking (lockr)**: Multi-replica workers mutating multi-row per-customer aggregates need a serialization point tied to the transaction; pg_advisory_xact_lock keyed on a unique id auto-releases on commit. + - *Violation keyword:* `sync.Mutex` + - *Violation keyword:* `pg_advisory_lock` + - *Violation keyword:* `redis lock for in-tx serialization` + - *Violation keyword:* `lock on customer key` + - *Violation keyword:* `LockForTX outside transaction.Run` + - **Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles**: Guarded, side-effecting invoice/charge transitions must be durable across requests, so the FSM stores status on the persisted aggregate inside the transaction. + - *Violation keyword:* `NewStateMachine (in-memory)` + - *Violation keyword:* `invoice.status = ... direct mutation` + - *Violation keyword:* `if status == switch transitions` + - *Violation keyword:* `ad-hoc lifecycle flags` + - **Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view**: Three charge subtypes with distinct run/lineage children still need one idempotency key and one read surface, written transactionally with the rest of billing. + - *Violation keyword:* `single wide charges table` + - *Violation keyword:* `charge create without unique_reference_id` + - *Violation keyword:* `ent.View expected in migrate.Tables` + - *Violation keyword:* `separate charge tables without parent` + - **Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions**: Effects that must commit in the same transaction as the triggering write (ledger provisioning on customer create) are registered as in-process hooks, not routed through Kafka. + - *Violation keyword:* `kafka publish for transactional side effect` + - *Violation keyword:* `static import of ledger from customer` + - *Violation keyword:* `hard-coded cross-domain call in service body` + - **Google Wire compile-time dependency injection in app/common, per-binary provider sets**: Six binaries over one module each need a distinct object graph; compile-time DI assembles only the needed providers and fails the build on a missing one, and provider swaps (concrete vs noop) gate features. + - *Violation keyword:* `reflection DI container` + - *Violation keyword:* `runtime service locator` + - *Violation keyword:* `manual wiring in main()` + - *Violation keyword:* `if feature.enabled inside service logic` + - **In-memory map registry with type-asserted factory dispatch for app/marketplace integrations**: Pluggable Stripe/custom-invoicing integrations register exactly once at wiring time into a duplicate-rejecting map that is the single source of installable app types. + - *Violation keyword:* `central switch over app type` + - *Violation keyword:* `runtime plugin load` + - *Violation keyword:* `late registration after server start` + - *Violation keyword:* `duplicate AppType registration` + - **TypeSpec-first API contract with full codegen fan-out (OpenAPI → oapi-codegen + 3 SDKs + goverter/goderive)**: Two API surfaces and three published SDKs cannot be kept consistent by hand, so a single TypeSpec source generates OpenAPI, both Go server stubs, the SDKs, and the type converters. + - *Violation keyword:* `edit api.gen.go` + - *Violation keyword:* `hand-edit openapi.yaml` + - *Violation keyword:* `edit convert.gen.go` + - *Violation keyword:* `hand-written SDK method` + - *Violation keyword:* `edit wire_gen.go` + - **Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services**: An installed v1 client base plus a new AIP direction means both surfaces front the identical domain services, sharing typed error-to-status mapping. + - *Violation keyword:* `duplicate domain logic per surface` + - *Violation keyword:* `ad-hoc status code per handler` + - *Violation keyword:* `drop v1 router` + - *Violation keyword:* `bypass httptransport.Handler` + - **Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate**: Multiple surfaces and domains need one multi-issue validation contract that maps to a single 400 ValidationIssue. + - *Violation keyword:* `return on first invalid field` + - *Violation keyword:* `panic on invalid input` + - *Violation keyword:* `custom validation error per domain` + - *Violation keyword:* `slog.Default() fallback` + - **Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in**: Decoupled worker binaries consume high-volume usage events and lower-volume domain events with different topic/retention needs, fanned to per-type handlers via a shared dispatch. + - *Violation keyword:* `direct confluent-kafka produce in worker` + - *Violation keyword:* `single topic for all events` + - *Violation keyword:* `synchronous cross-binary call` + - *Violation keyword:* `no DLQ for poison messages` + - **Per-subtype connector dispatch behind one entitlement Service**: Entitlement (and analogously charge) behavior branches by a closed enum subtype consumed by workers and services, isolated behind a uniform SubTypeConnector with a default-error arm. + - *Violation keyword:* `inline switch over entitlement type everywhere` + - *Violation keyword:* `open/registry subtype dispatch` + - *Violation keyword:* `default arm that accepts unknown subtype` + +## Key Decisions + +### Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx) +**Chosen:** Every domain adapter holds a *entdb.Client and implements entutils.TxCreator (Tx() hijacks an Ent tx onto the context) and TxUser[T] (WithTx rebinds the adapter to the tx client; Self() returns the non-tx instance). Adapter methods wrap their body in entutils.TransactingRepo(ctx, a, func(ctx, rep){...}), which rebinds to the *TxDriver already on the context if one exists and otherwise falls back to repo.Self() (pkg/framework/entutils/transaction.go:199). +**Rationale:** This is the seam that lets one domain's service participate in another domain's transaction over the single shared Ent client (Generated Ent client component, openmeter/ent/db). Without it, subscription→billing→charges→ledger composition could not be atomic. AGENTS.md elevates this to a hard convention for the charges adapter: even helpers that accept a raw *entdb.Client must still wrap their body in entutils.TransactingRepo so they rebind to the ctx tx rather than silently writing outside the caller's transaction. Implemented in pkg/framework/entutils/transaction.go and pkg/framework/transaction/transaction.go, consumed by every adapter (openmeter/customer/adapter/adapter.go, openmeter/billing/adapter/adapter.go). +**Rejected:** Passing an explicit *sql.Tx or tx-bound client through every method signature — rejected because it pollutes every domain interface and is easy to forget; the context-carried *TxDriver makes the tx ambient and the rebind automatic., A repository-per-aggregate with its own connection pool — rejected because cross-domain atomic writes need one connection/transaction, not coordinated commits. +**Forced by:** Single shared Ent client + the requirement that subscription, billing, charges, and ledger mutations be atomic across domains. +**Enables:** Composable service-in-service transactions, the lockr advisory-lock pattern (which asserts it runs inside a real Postgres tx), and the subscription→billing sync writing invoice lines, split-line groups, and charges in one commit. + +### Postgres transaction-scoped advisory locking (lockr) +**Chosen:** lockr.NewKey(scopes...) joins a colon-separated scope, xxh3-hashes it to a 64-bit int, and Locker.LockForTX issues SELECT pg_advisory_xact_lock($1) on the current Ent tx, auto-releasing on commit/rollback. getTxClient first hard-asserts the caller is inside a real Postgres transaction (transaction_timestamp() != statement_timestamp()) and errors otherwise (pkg/framework/lockr/locker.go:134). +**Rationale:** Subscription mutations, billing mutations, and charge advances each touch many rows/tables for one customer and must be serialized per logical entity without serializing the whole table. lockr keys on a globally-unique row id (subscription.GetCustomerLock keys on customer id, openmeter/subscription/locks.go:6; customer ids are PK-unique via IDMixin). It is deliberately Postgres-tx-scoped so the lock cannot leak past the transaction boundary. Implemented in pkg/framework/lockr/{locker.go,key.go}; used across subscription, billing, ledger, entitlement. Note there is also a row-based BillingCustomerLock table (openmeter/ent/schema/billing.go:1334) used via SELECT ... FOR UPDATE for the same per-customer serialization in billing. +**Rejected:** Application-level mutexes — rejected because the binaries are horizontally scaled; an in-process lock would not serialize across replicas., Redis/distributed lock (the repo has cirello.io/pglock available) — rejected for the in-transaction case because pg_advisory_xact_lock ties lock lifetime to the exact transaction that does the writes, eliminating lock-then-die orphan windows., Keying the lock on customer.key — rejected because key is only unique under namespace + deleted_at IS NULL, so a key-based lock could serialize unrelated namespaces or collide a live row with a soft-deleted one. +**Forced by:** Multi-replica workers mutating multi-row per-customer aggregates that need a serialization point. +**Enables:** Safe concurrent subscription edits, billing finalization, and charge advancement for different customers in parallel while serializing operations on the same customer. + +### Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles +**Chosen:** stateless.NewStateMachineWithExternalStorage stores the current state on the domain aggregate (invoice.status / charge.status), not inside the FSM. States are Configure'd with Permit / PermitDynamic(guard) edges and OnActive side-effect callbacks. The charge machine is generic over a STATUS ~string + Validate() type and a CHARGE implementing ChargeLike (GetStatus/WithStatus/GetBase/WithBase) (openmeter/billing/charges/statemachine/machine.go:16,39). +**Rationale:** Invoice and usage-based-charge lifecycles have guarded transitions with side effects (calculation, finalization, voiding) that must be auditable and persisted across requests. Externalizing state onto the row means a transition computed in one request is durable and the next request resumes from the stored status. Implemented in openmeter/billing/service/stdinvoicestate.go:48 and openmeter/billing/charges/statemachine/machine.go. +**Rejected:** Ad-hoc if/switch transition code on a status field — rejected because guards and side effects scatter and illegal transitions become possible; the FSM centralizes the legal edge set., In-memory-state FSM — rejected because transitions must survive across requests; external storage on the aggregate is mandatory., A stateless machine for trivially-two-state fields — explicitly avoided; a plain bool/enum is simpler where there is no guard and no side effect. +**Forced by:** Guarded, side-effecting, auditable invoice and charge lifecycles that span multiple requests. +**Enables:** A single legal-transition source of truth per aggregate, reusable across flat-fee/usage-based/credit-purchase charge subtypes via the generic ChargeLike constraint. + +### TypeSpec-first API contract with full codegen fan-out (OpenAPI → oapi-codegen + 3 SDKs + goverter/goderive) +**Chosen:** The API is authored in TypeSpec under api/spec (two pnpm packages: legacy and aip). make gen-api compiles it to api/openapi.yaml / api/v3/openapi.yaml, then oapi-codegen generates api/api.gen.go (v1 ServerInterface) and api/v3/api.gen.go (v3 ServerInterface), orval generates the JS SDK, poetry/corehttp the Python SDK, and goverter/goderive generate type converters (convert.gen.go, billing/derived.gen.go). All carry a 'DO NOT EDIT' header. +**Rationale:** Two server surfaces and three published SDKs cannot be kept consistent by hand. TypeSpec is the single source of truth; the codegen chain enforces it. The Makefile even patches the oapi-codegen chi-middleware template (patch-oapi-templates) for custom AIP filter parsing. Components: TypeSpec API specification, Generated API contract & v1 server interface, v3 API layer, JavaScript/TypeScript SDK, Python SDK. +**Rejected:** OpenAPI YAML as the hand-edited source of truth — rejected because TypeSpec is more composable/typed and avoids drift between the two API packages., Hand-written SDKs — rejected; orval/poetry generation keeps JS/Python/Go clients lock-step with the spec., Hand-written domain↔API↔DB mappers — rejected for goverter/goderive generation following the FromAPI/ToAPI/FromDB/ToDB naming convention (go-types-conversion skill). +**Forced by:** Two coexisting API surfaces (v1 + AIP v3) plus three published SDKs that must not diverge from one contract. +**Enables:** Adding an endpoint by editing .tsp and re-running make gen-api / make generate; compile-time detection of contract drift. + +### Google Wire compile-time dependency injection in app/common, per-binary provider sets +**Chosen:** Each binary has a build-tagged wire.go (//go:build wireinject) listing wire.NewSet provider sets; constructors are plain functions grouped per concern in app/common/*.go (e.g. var Customer = wire.NewSet(NewCustomerService); BillingRegistry/ChargesRegistry aggregation structs in app/common/billing.go). make generate runs wire to emit wire_gen.go. Feature flags switch concrete vs noop providers at wiring time (app/common/ledger.go picks concrete or noop ledger services on credits.enabled; NewCustomerLedgerService returns a Noop hook when disabled). +**Rationale:** Six binaries share one module but each needs a different object graph. Compile-time DI means a missing provider fails the build, and each binary only links the providers it declares. Feature-gating at the provider level (credits.enabled, webhooks enabled) is the single seam where a whole subsystem becomes a no-op without touching call sites. Components: Application wiring (app/common), Server entrypoint & DI bootstrap. +**Rejected:** Runtime/reflection DI container — rejected because Wire surfaces wiring errors at build time and generates inspectable code., Manual constructor wiring in each main() — rejected; the graph (billing→charges→ledger→customer→productcatalog) is too large to wire by hand per binary without divergence., Feature flags checked deep in service logic — rejected in favor of swapping provider implementations (concrete vs noop) at the wiring seam so disabled features short-circuit cleanly (AGENTS.md: credits.enabled noop wiring). +**Forced by:** Six binaries over one module, each needing a distinct subset of the domain graph, plus feature flags that must disable whole subsystems. +**Enables:** Per-binary minimal object graphs, build-time wiring validation, and clean feature-flag disablement via noop provider swaps. + +### Service hook registry (models.ServiceHookRegistry) for in-process cross-domain reactions +**Chosen:** A service embeds models.ServiceHookRegistry[T] and exposes RegisterHooks(...ServiceHook[T]). Wire providers in app/common construct the hook and call targetService.RegisterHooks(h) at startup; when a feature is off the provider registers a Noop hook instead (e.g. customer-created → provision a ledger account; subject-created → sync customer). Implemented in openmeter/customer/service/service.go, wired in app/common/customer.go. +**Rationale:** Some cross-domain effects must be synchronous and in-process (provisioning a ledger account when a customer is created), unlike the asynchronous Kafka event bus used for billing/notification. The hook registry is the in-process counterpart to the event bus, and registration at wiring time keeps the coupling explicit and feature-gatable. +**Rejected:** Routing every cross-domain reaction through Kafka — rejected for effects that must commit in the same transaction as the triggering write (ledger provisioning), where eventual consistency is unacceptable., Hard-coding the dependent call inside the triggering service — rejected because it would create a compile-time dependency from customer onto ledger and prevent the noop-when-disabled swap. +**Forced by:** Cross-domain effects that must be synchronous/transactional and feature-gatable, alongside the async event bus for the rest. +**Enables:** Provisioning ledger/customer state on lifecycle events without a static dependency edge, switchable to Noop when the feature is disabled. + +### Two-tier async messaging: eventbus.Publisher over Watermill CQRS out, grouphandler type-routed dispatch in +**Chosen:** Outbound: eventbus.New wraps a watermill cqrs.EventBus; Publish routes each marshaler.Event to one of three Kafka topics by event-name prefix (ingest → IngestEventsTopic, balance-worker → BalanceWorkerEventsTopic, everything else → SystemEventsTopic) (openmeter/watermill/eventbus/eventbus.go). Inbound: grouphandler.NewNoPublishingHandler builds map[eventName][]GroupEventHandler, derives the CloudEvent type per message, unmarshals once into handler[0].NewEvent(), runs all matching handlers joining errors, and counts unknown types as ignored (openmeter/watermill/grouphandler/grouphandler.go, openmeter/notification/consumer/consumer.go). +**Rationale:** Usage ingest and domain events have different durability/throughput needs, so they are routed to distinct topics; workers (notification, billing, balance) consume CloudEvents and fan them to per-type handlers without each worker re-implementing topic/dispatch plumbing. CloudEvents is the wire format (cloudevents/sdk-go/v2). There is also a notification DLQ topic om_sys.notification_service_dlq. +**Rejected:** Direct confluent-kafka-go produce/consume in every worker — rejected; Watermill CQRS + grouphandler centralizes marshaling, topic routing, and type dispatch., A single Kafka topic for all events — rejected because ingest volume and system events have different scaling/retention profiles; prefix-based topic routing separates them., Synchronous cross-binary calls — rejected; workers are decoupled by Kafka so the API path does not block on billing/notification work. +**Forced by:** Decoupled worker binaries consuming high-volume usage events and lower-volume domain events with different topic/retention needs. +**Enables:** Adding a new event handler by registering it in the grouphandler map; routing a new event type by prefix; independent worker scaling and a DLQ for poison notification messages. + +### In-memory map registry with type-asserted factory dispatch for app/marketplace integrations +**Chosen:** The app adapter holds registry map[AppType]RegistryItem. Each integration's constructor calls AppService.RegisterMarketplaceListing(RegistryItem{Listing, Factory}) exactly once at wiring time; RegisterMarketplaceListing rejects duplicate AppTypes and validates the listing (openmeter/app/adapter/marketplace.go:121). Install operations look up the factory by AppType. Implementations: stripe, custominvoicing, sandbox. +**Rationale:** Third-party billing/invoicing integrations are pluggable and discovered by type. A startup-time registration map is the single source of installable app types; capability support is discovered by type assertion on the constructed instance. The map has no late-registration locking, so all listings must register during DI before the HTTP/worker surface is live. Component: App / marketplace integrations. +**Rejected:** A hard-coded switch over app types — rejected; the registry lets a new integration register itself from its own package without editing a central switch., Runtime/dynamic plugin loading — rejected; registration is compile-time-known and validated once at wiring, avoiding late-registration races. +**Forced by:** Pluggable Stripe / custom-invoicing / sandbox integrations that must be addable without editing a central dispatch. +**Enables:** Adding a marketplace app by registering a RegistryItem at wiring time and implementing the capability interfaces it advertises. + +### Per-subtype connector dispatch behind one entitlement Service +**Chosen:** entitlement.SubTypeConnector is implemented three times (metered/static/boolean, each in its own connector.go). The aggregate service holds all three and getTypeConnector(typed) switches over the closed EntitlementType set with a default-error arm (openmeter/entitlement/service/service.go:424; values metered/static/boolean from openmeter/entitlement/entitlement.go:331). +**Rationale:** Entitlement behavior branches by a fixed enum subtype, each with its own create/value logic. A closed switch with a default-error arm keeps the type set sealed and forces every new subtype to be handled explicitly. This mirrors the charges subtype split (flat_fee / usage_based / credit_purchase) where the Charge row carries exactly one of three subtype FK columns. +**Rejected:** One mega-service with inline branching everywhere — rejected; the per-subtype connector isolates each subtype's logic behind a uniform interface., Open/registry-based subtype dispatch — rejected because the subtype set is fixed (a closed enum) and a default-error arm should reject unknown values rather than accept user-defined ones. +**Forced by:** A fixed enum of entitlement subtypes each needing distinct create/value logic. +**Enables:** Adding a subtype by implementing SubTypeConnector and adding one switch arm; the compiler/default-arm flags any unhandled subtype. + +### Polymorphic Charge parent row with idempotent unique_reference_id and a Postgres UNION-ALL search view +**Chosen:** Charge is a polymorphic parent row where exactly one of three subtype FK columns (flat_fee / credit_purchase / usage_based) points to the subtype table, with UNIQUE(namespace, unique_reference_id) WHERE unique_reference_id IS NOT NULL AND deleted_at IS NULL for idempotent creation (openmeter/ent/schema/charges.go:167). Reads go through the ChargesSearchV1 Postgres VIEW (UNION ALL of the three subtype tables). The view DDL is shipped via an explicit SQL migration because Ent views do not appear in generated migrate.Tables (AGENTS.md ent-view caveat). +**Rationale:** Charges share a common base but have type-specific lifecycle/run tables (ChargeFlatFeeRun, ChargeUsageBasedRuns, CreditRealizationLineage). The parent-plus-subtype layout keeps the shared columns in one place and the idempotency key makes charge creation safe under retries. The search view denormalizes reads across subtypes. Components: Charges sub-system; data models Charge, ChargesSearchV1, ChargeFlatFee, ChargeUsageBased, ChargeCreditPurchase. +**Rejected:** Single wide charges table with nullable type-specific columns — rejected; type-specific run/lineage children would not fit and the table would be sparse., Separate top-level tables per charge type with no shared parent — rejected; loses the shared base, the single idempotency key, and the unified search surface., Relying on Ent to emit the view in migrate.Tables — rejected/impossible: ent.View schemas generate query code but not migration metadata in this repo, so the view DDL needs a hand-written SQL migration. +**Forced by:** Three charge subtypes with distinct run/lineage child tables that still need one idempotency key and one read surface. +**Enables:** Idempotent charge creation under retries and unified cross-subtype charge search, while keeping subtype lifecycles isolated. + +### Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin) +**Chosen:** Persisted entities compose entutils mixins in Mixin(). ResourceMixin pulls in IDMixin (ULID char(26) PK, unique), NamespaceMixin, MetadataMixin (jsonb), TimeMixin (created/updated/deleted_at) and a unique (namespace,id) index; UniqueResourceMixin adds a (namespace,key,deleted_at) unique index that only approximates partial uniqueness (pkg/framework/entutils/mixins.go:47). The Ent schema (openmeter/ent/schema/*.go) is the single source of truth; Atlas diffs it into golang-migrate SQL under tools/migrate/migrations. +**Rationale:** ~70 tables share the same multi-tenant, soft-delete, ULID-id, audit, metadata-jsonb shape; mixins enforce it once instead of per-table. The (namespace,key,deleted_at) approximation is a known sharp edge: same-microsecond create/delete/create can collide because Ent cannot emit WHERE deleted_at IS NULL without a manual migration, so entities needing true partial-uniqueness (Customer) ship a custom IndexWhere SQL migration (openmeter/ent/schema/customer.go:58-62). The data_overview confirms almost every Postgres table is namespace-scoped, ULID-id'd, and deleted_at soft-deleted. +**Rejected:** Repeating id/namespace/timestamp columns in every schema file — rejected; mixins keep the multi-tenant contract uniform and DRY., Hard deletes — rejected in favor of deleted_at soft-deletes so historical billing/usage references survive., Trusting the mixin's deleted_at-in-key index for real partial uniqueness — rejected where correctness matters; a custom partial-unique SQL migration is required. +**Forced by:** A ~70-table multi-tenant schema needing uniform id/namespace/audit/soft-delete columns across every domain. +**Enables:** Adding an entity by composing mixins and running make generate + atlas diff; consistent namespace scoping and soft-delete semantics everywhere. + +### Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services +**Chosen:** v1: openmeter/server/router validates each request against the embedded OpenAPI 3 spec (kin-openapi openapi3filter) and wires per-domain httpdriver packages, each composing httptransport.NewHandler[Request,Response](decode, service-op, encode) with a typed errorEncoder that maps domain errors to RFC7807 problem documents. v3: api/v3/server/routes.go implements the oapi-codegen ServerInterface as thin methods delegating to per-resource handlers (api/v3/handlers/*), with explicitly Unimplemented / feature-gated operations and AIP query-parameter filtering (api/v3/filters). Both call the same domain services. +**Rationale:** v3 is the forward AIP-style surface; v1 cannot be dropped without breaking clients, so both surfaces front the identical domain services and share error rendering (commonhttp.HandleErrorIfTypeMatches, api/v3/apierrors). The generic httptransport.Handler[Req,Resp] gives v1 consistent decode→service→encode→error-encode plumbing; v3 leans on generated stubs plus thin delegators. +**Rejected:** Forcing a hard cutover from v1 to v3 — rejected; existing clients depend on v1, so the surfaces coexist over shared services., Duplicating domain logic per surface — rejected; both surfaces are thin transport adapters over the same services, so behavior cannot diverge., Per-handler ad-hoc error-to-status mapping — rejected for the ordered typed errorEncoder chain (errors.As short-circuit) so domain error types map to status codes consistently. +**Forced by:** An installed v1 client base plus a new AIP-style API direction, both needing the same domain behavior. +**Enables:** Migrating endpoints to v3 incrementally while v1 keeps working, with one set of domain services and one error-mapping convention behind both. + +### Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate +**Chosen:** Validate() methods collect issues into var errs []error, wrap each with field context (fmt.Errorf("field: %w", err)), and return models.NewNillableGenericValidationError(errors.Join(errs...)) so a nil join yields nil; single-field checks use models.NewGenericValidationError(...) directly (pkg/models/errors.go, openmeter/app/marketplace.go). Service and adapter Config structs also carry Validate() and constructors reject invalid config at New(). +**Rationale:** Validation must report all problems at once (not fail-fast) and surface as a single 400/ValidationIssue at the HTTP boundary. Centralizing on NewNillableGenericValidationError + errors.Join makes the nil-vs-error contract uniform across every domain and lets the error encoders map one error type to 400. AGENTS.md mandates this shape for Validate() methods. pkg/models is the 229-in-edge dependency magnet that carries it. +**Rejected:** Returning on the first invalid field — rejected; callers and API consumers want all issues at once., A bespoke validation library per domain — rejected; one shared error aggregation type keeps HTTP error mapping uniform., Validating only at the HTTP layer — rejected; service/adapter Config.Validate() catches misconfiguration at construction, before the binary serves traffic. +**Forced by:** Multiple API surfaces and many domains all needing a consistent multi-issue validation contract that maps to one HTTP status. +**Enables:** Aggregated 400 ValidationIssue responses, fail-at-construction config validation, and one error type for the encoders to match. + +## Trade-offs Accepted + +- **Accepted:** Context-ambient transactions: the active tx is carried on context.Context and rebound by entutils.TransactingRepo, not visible in method signatures. + - *Benefit:* Cross-domain service composition can be atomic over one Ent client without threading a tx parameter through every interface; subscription→billing→charges→ledger commit together. + - *Caused by:* Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx) + - *Violation signal:* context.Background() + - *Violation signal:* context.TODO() + - *Violation signal:* func(... db *entdb.Client ...) without entutils.TransactingRepo wrapper + - *Violation signal:* passing *entdb.Client into a helper that writes + - *Violation signal:* bypassing WithTx / Self() +- **Accepted:** Advisory locks must run inside a real Postgres transaction and must key on a globally-unique id; misuse (no tx, or keying on a non-unique column) is only caught at runtime. + - *Benefit:* Per-customer serialization of multi-row subscription/billing/charge operations across replicas, with the lock auto-released on commit/rollback (no orphan locks). + - *Caused by:* Postgres transaction-scoped advisory locking (lockr) + - *Violation signal:* lockr.NewKey on customer key + - *Violation signal:* LockForTX outside transaction.Run + - *Violation signal:* sync.Mutex for cross-replica serialization + - *Violation signal:* pg_advisory_lock (session-scoped, not xact) + - *Violation signal:* locking on a namespace-non-unique column +- **Accepted:** Six binaries over one module: shared code is convenient but a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, and all binaries must be rebuilt/redeployed together. + - *Benefit:* One codebase, one Ent client, one transaction boundary for cross-domain atomicity; workers scale and fail independently while sharing types. + - *Caused by:* Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane + - *Violation signal:* go.mod split per binary + - *Violation signal:* duplicating pkg/models types per service + - *Violation signal:* separate database per domain + - *Violation signal:* distributed transaction / saga between binaries +- **Accepted:** TypeSpec-first codegen: any contract change requires regenerating OpenAPI, two Go server stubs, three SDKs, and goverter/goderive converters; generated files must never be hand-edited. + - *Benefit:* Two API surfaces and three SDKs can never drift from one source of truth; contract drift becomes a build failure. + - *Caused by:* TypeSpec-first API contract with full codegen fan-out (OpenAPI → oapi-codegen + 3 SDKs + goverter/goderive) + - *Violation signal:* editing api/api.gen.go + - *Violation signal:* editing api/openapi.yaml by hand + - *Violation signal:* editing convert.gen.go + - *Violation signal:* hand-writing SDK client methods + - *Violation signal:* skipping make gen-api after .tsp change +- **Accepted:** A separate ClickHouse store and Kafka pipeline for usage events: two more stateful systems to operate, and ClickHouse tables are created idempotently at connector startup outside Atlas migration discipline. + - *Benefit:* High-volume append-only usage ingest and aggregation scale independently of OLTP Postgres; meters and usage-based billing read aggregated quantities efficiently. + - *Caused by:* Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane + - *Violation signal:* storing usage events in Postgres + - *Violation signal:* ALTER TABLE om_ events via Atlas + - *Violation signal:* removing the sink-worker + - *Violation signal:* joining RawEvent against Postgres tables +- **Accepted:** External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge. + - *Benefit:* Invoice/charge transitions are durable across requests, auditable, and illegal transitions are rejected at the single edge-set definition. + - *Caused by:* Explicit finite state machines with external storage (qmuntal/stateless) for invoice and per-charge UBP lifecycles + - *Violation signal:* mutating invoice.status directly + - *Violation signal:* if/switch on status instead of Permit edges + - *Violation signal:* NewStateMachine (in-memory) for a persisted aggregate + - *Violation signal:* adding a status without a Permit edge +- **Accepted:** Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning). + - *Benefit:* Whole subsystems (ledger, Svix webhooks) cleanly become no-ops without runtime conditionals scattered through service logic. + - *Caused by:* Google Wire compile-time dependency injection in app/common, per-binary provider sets + - *Violation signal:* if credits.enabled inside service method + - *Violation signal:* constructing ledger adapters when credits disabled + - *Violation signal:* Svix client built when webhooks disabled + - *Violation signal:* missing noop provider for a gated subsystem +- **Accepted:** The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness; entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration. + - *Benefit:* Most entities get key-uniqueness for free from the mixin; the few that need strict partial uniqueness opt into a custom migration. + - *Caused by:* Ent schema mixins as the cross-cutting column contract (ResourceMixin / IDMixin / NamespaceMixin / TimeMixin / AnnotationsMixin) + - *Violation signal:* relying on UniqueResourceMixin for strict partial uniqueness + - *Violation signal:* deleting customer.go IndexWhere migration + - *Violation signal:* same-key create after soft-delete without partial index +- **Accepted:** Two HTTP surfaces (v1 + v3) front the same services indefinitely: every behavior change must be checked against both transport layers and both error-rendering paths. + - *Benefit:* Existing v1 clients keep working while new endpoints land on the AIP v3 surface; no forced client migration. + - *Caused by:* Two coexisting HTTP surfaces: legacy v1 httptransport drivers + thin AIP v3 delegators, both over the same domain services + - *Violation signal:* v3 handler with its own domain logic + - *Violation signal:* duplicating a service call in both surfaces with diverging behavior + - *Violation signal:* dropping the v1 router + - *Violation signal:* v3 endpoint not delegating to a shared domain service + +## Out of Scope + +- {'item': 'A bundled web UI / dashboard application — the frontend surface is published SDKs (JS/TS with a React context provider, Python) and a Cloud product, not an in-repo web app.', 'made_out_of_scope_by': 'Multi-binary Go control plane with code-generated API contract'} +- {'item': 'Distributed transactions / sagas across services — cross-domain consistency is achieved with one shared Ent client, one Postgres transaction, and lockr advisory locks, not a coordination protocol.', 'made_out_of_scope_by': 'Transaction-aware Ent repository (TransactingRepo / HijackTx / WithTx)'} +- {'item': 'Storing or migrating usage events in PostgreSQL — usage events live only in ClickHouse (append-only MergeTree), created idempotently at startup, outside Atlas/Ent migration discipline.', 'made_out_of_scope_by': 'Multi-binary control plane with an event-time usage-metering data plane'} +- {'item': 'Hand-written OpenAPI specs or hand-written SDK client methods — the contract is generated from TypeSpec; editing generated files is forbidden.', 'made_out_of_scope_by': 'TypeSpec-first API contract with full codegen fan-out'} +- {'item': 'Runtime/reflection-based dependency injection or dynamic plugin loading — DI is compile-time via Wire; app integrations register at wiring time into an in-memory map, not via runtime plugins.', 'made_out_of_scope_by': 'Google Wire compile-time dependency injection in app/common'} +- {'item': 'Hard deletes of control-plane rows — entities soft-delete via deleted_at so historical billing/usage references survive.', 'made_out_of_scope_by': 'Ent schema mixins as the cross-cutting column contract'} +- {'item': 'In-process/in-memory event delivery as the only mechanism — asynchronous cross-binary work goes through Kafka (Watermill CQRS); the in-process hook registry is reserved for synchronous/transactional cross-domain effects.', 'made_out_of_scope_by': 'Two-tier async messaging and the Service hook registry'} +- {'item': 'panic-based error handling and slog.Default() fallbacks in production code — AGENTS.md forbids panics in non-test paths and requires explicitly injected *slog.Logger.', 'made_out_of_scope_by': 'Accumulating Validate() returning NillableGenericValidationError as the uniform input-contract gate'} +- {'item': 'External payment/invoice engines hard-wired into the core — Stripe and custom-invoicing are pluggable marketplace apps registered through the app registry, and invoice formatting uses GOBL behind the billing service.', 'made_out_of_scope_by': 'In-memory map registry with type-asserted factory dispatch for app/marketplace integrations'} \ No newline at end of file diff --git a/.claude/rules/pitfalls.md b/.claude/rules/pitfalls.md new file mode 100644 index 0000000000..db916bb30a --- /dev/null +++ b/.claude/rules/pitfalls.md @@ -0,0 +1,64 @@ +## Pitfalls + +- **Cross-aggregate references in the Postgres ledger (LedgerCustomerAccount.account_id/customer_id) and the ClickHouse usage tables are deliberately FK-less and migration-less, so referential integrity and column/struct alignment are enforced only by application code with no database-level guard.** + - *Evidence:* openmeter/ent/schema/ledger_customer_account.go func Edges() returns nil; customer_id and account_id are field.String(...).Immutable() with no FK to Customer or LedgerAccount (intentional, to avoid import cycles between ledger and customer/account).; openmeter/customer/adapter/customer.go DeleteCustomer is a soft-delete (SetDeletedAt) and never touches LedgerCustomerAccount, while it cascade-deletes only edge-linked children - LedgerCustomerAccount is not an edge, so a hard customer purge would leave dangling rows undetected.; openmeter/streaming/clickhouse/connector.go calls createTable only when !SkipCreateTables, and event_query.go:25 uses IfNotExists() - the events table is create-if-absent with no diff/migration path.; openmeter/streaming/connector.go:24-35 RawEvent columns must be kept in sync with the ClickHouse DDL (event_query.go:26-36) and the INSERT column list (event_query.go:207) by hand.; … (4 total) + - *Root cause:* Two decisions converge: the 'Layered Domain Service/Adapter' import-cycle-avoidance keeps the ledger link table FK-less (Edges() returns nil so Ent emits no foreign key), and the multi-store decision (Postgres+Ent+Atlas for domain, ClickHouse create-if-not-exists for usage) leaves ClickHouse outside the migration pipeline. Neither path has a database-level integrity or schema-diff guard, so a hard-deleted account leaving dangling LedgerCustomerAccount rows, or a RawEvent struct change not mirrored in the DDL/INSERT list, drifts undetected until a runtime read fails. + - *Fix direction:* + - Add application-level integrity checks/tests asserting every LedgerCustomerAccount.account_id and customer_id resolves to a live row, and cover any account/customer hard-deletion path. + - Introduce a ClickHouse migration mechanism (or an ALTER-on-startup reconcile) so RawEvent column changes propagate to already-provisioned tables. + - Add a contract test asserting the RawEvent ch: field set equals the createEventsTable DDL column set and the INSERT column list, in order. + - Document the FK-less and migration-less invariants in openmeter/ledger and openmeter/streaming CLAUDE.md so future schema edits know the integrity burden is on application code. +- **An in-progress billing-invoice schema migration keeps deprecated columns and a two-place schema_level discriminator (per-row column plus a temporary BillingInvoiceWriteSchemaLevel table) live, creating coupled cleanup debt that must be removed in lockstep across the Ent schema and the billing adapter once migration completes.** + - *Evidence:* openmeter/ent/schema/billing.go:417 line_ids Deprecated; billing.go:631 BillingInvoiceSplitLineGroup tax_config/tax_code_id/tax_behavior Deprecated; billing.go:793 discount type/quantity/pre_line_period_quantity Deprecated.; openmeter/ent/schema/billing.go:1171 field.Int("schema_level").Default(1) on BillingInvoice; billing.go:1363 BillingInvoiceWriteSchemaLevel is a temporary single-row table tracking the write schema level.; openmeter/billing/adapter/schemalevel.go and gatheringinvoice.go:43/58 read and set the discriminator; gatheringinvoice.go:424 / invoicelinesplitgroup.go:254 branch read mapping on invoice.SchemaLevel; lock.go:55 runs a per-customer migrateCustomerInvoices keyed on minSchemaLevel - the dual-write/dual-read logic spans multiple adapter files. + - *Root cause:* Stems from the Ent-schema-as-source-of-truth persistence decision under an incremental (not breaking-cutover) invoice-line migration: rather than one cutover, the schema carries deprecated columns plus a schema_level discriminator encoded in two artifacts (the BillingInvoice.schema_level column and the standalone BillingInvoiceWriteSchemaLevel table), and the adapter reads GetInvoiceDefaultSchemaLevel/SetSchemaLevel and branches mapGatheringInvoiceLinesFromDB on the level to write and read both shapes. Because the versioning state lives in two places and the dual-write branches live across several adapter files, the cleanup is a multi-artifact schema-plus-adapter operation that can be left half-done if the migration stalls. + - *Fix direction:* + - Maintain an explicit checklist of the deprecated columns and the two schema_level artifacts (BillingInvoice.schema_level + BillingInvoiceWriteSchemaLevel) to drop together. + - When GetInvoiceDefaultSchemaLevel reports a single level everywhere, drop the field, the BillingInvoiceWriteSchemaLevel table, the adapter dual-shape map branches, and lock.go migrateCustomerInvoices in one migration. + - Generate and verify the Atlas down-migration for the column drops before landing, given the atlas.sum linear-chain constraint. + - Add a post-cutover test asserting no live billing_invoice row references a deprecated column and no row has schema_level below the target. +- **LedgerSubAccountRoute denormalizes routing dimensions (currency, tax_code, tax_behavior, features, cost_basis, credit_priority) as plain immutable literal columns with no FK to their source tables - tax_code stores TaxCode.Key, not a FK - so a created route can hold a value that no longer matches the canonical table with no database-level guard.** + - *Evidence:* openmeter/ent/schema/ledger_account.go:116 comment '// Literal routing values (denormalized from routing_key for query filtering; not FKs).'; openmeter/ent/schema/ledger_account.go:118 comment '// tax_code stores the TaxCode.Key string used as a routing dimension, not a FK to the tax_codes table.'; openmeter/ent/schema/ledger_account.go:117-130 currency/tax_code/tax_behavior/features/cost_basis/credit_priority are all field.*(...).Immutable() with no edge - so the values are write-once snapshots, but nothing verifies they matched the source table at write time or remain valid afterward. + - *Root cause:* Stems from the 'Double-entry ledger with FK-less cross-aggregate links' decision plus a query-performance denormalization: ledger sub-account routes flatten routing dimensions into literal columns (ledger_account.go:116-118) for filterable querying instead of FK-joining to tax_codes/currencies, because adding those edges would couple the ledger schema to the tax/catalog aggregates. The columns are Immutable() (write-once snapshots, so they cannot drift after creation), but there is no FK or CHECK to validate that tax_code/currency matched a canonical row at insert time, so an application bug or a later rename of a TaxCode.Key leaves the route pointing at a value the source table no longer recognises, undetectable at the database level. + - *Fix direction:* + - Add application-level validation in the ledger resolver that tax_code/currency exist in their canonical tables before a LedgerSubAccountRoute is created. + - Add a reconciliation test asserting every LedgerSubAccountRoute.tax_code resolves to a live TaxCode.Key and currency is a valid ISO-4217 code. + - Document the snapshot-immutable-not-FK invariant in openmeter/ledger CLAUDE.md so future edits know these columns are write-once denormalized values, not live references. + - If tax codes can be renamed, define a policy (block rename while routes reference the key, or carry a stable TaxCode id alongside the human key). +- **Ledger transaction-template code resolution converts a recoverable error into a process panic: TemplateCode(template) panics when a TransactionTemplate's code() returns an empty string, so a newly added template that forgets to declare its code() crashes the ledger collector at runtime instead of failing the build or returning an error.** + - *Evidence:* openmeter/ledger/transactions/codes.go:109-115 func TemplateCode(template TransactionTemplate) string { code, err := templateCode(template); if err != nil { panic(err) }; return string(code) }.; openmeter/ledger/transactions/codes.go:83-89 templateCode returns fmt.Errorf('unknown transaction template code for %T', template) when template.code() == '' - the only error source.; openmeter/ledger/collector/correct.go:241,285,293,361,511,656 and collect.go:281,283 call transactions.TemplateCode(...) directly in production correction/collection paths.; AGENTS.md: 'Never use panic in non-test code paths. If a new failure mode is possible, change the function signature to return an error and propagate it explicitly.'; … (4 total) + - *Root cause:* Stems from the 'Double-entry ledger with template-only transaction construction' decision: each correction/collection template implements code() to self-identify, and TemplateCode (codes.go:113) was given a string return type (not (string, error)) so call sites in collector/correct.go and collect.go can use it inline in switch/case and as map keys. To preserve that ergonomic signature, the helper swallows the error by panicking. Every current TransactionTemplate returns a non-empty code, so the panic is not firing today - but it is reachable the moment a new template is registered without a code(), violating the no-panic-in-production rule and turning a static omission into a runtime crash in a financial path. There is no triggering caller that fires it now, so this is a latent class, not a finding. + - *Fix direction:* + - Change TemplateCode to return (string, error) and propagate the error through collector/correct.go and collect.go call sites, replacing inline switch/case usage with an explicit lookup-and-handle. + - Alternatively, enforce code() completeness with a compile-time-adjacent registry test that constructs every TransactionTemplate implementation and asserts code() != '' (so a missing code fails CI, not production). + - Add a lint/grep CI guard flagging panic( in openmeter/ledger/** outside _test.go to keep the no-panic rule enforced as the ledger grows. + - Document in openmeter/ledger/transactions/CLAUDE.md that every new TransactionTemplate must declare a non-empty code() and is covered by the registry test. +- **Internal test packages of production service directories (package service in openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service) import the shared test/billing fixtures package, which in turn imports those same service packages from its own _test files, forming a test-only import cycle that couples multiple production service trees through one mutable fixture package.** + - *Evidence:* openmeter/billing/charges/service/base_test.go declares 'package service' (internal test package) and imports billingtest 'github.com/openmeterio/openmeter/test/billing'.; openmeter/billing/worker/subscriptionsync/service/base_test.go declares 'package service' and imports test/billing.; test/billing/subscription_test.go imports github.com/openmeterio/openmeter/openmeter/billing/worker/subscriptionsync/service - the back-edge that closes the loop (note: test/billing NON-test files do NOT import these service packages, so there is no production import cycle - the cycle is confined to the test graph).; .archie dependency graph cycle: ['openmeter/billing/charges/service','openmeter/billing/charges/testutils','openmeter/billing/worker/subscriptionsync/service','test/billing'].; AGENTS.md: 'Keep domain test helpers under openmeter/.../testutils independent from app/common ... or unrelated wiring additions can create test-only import cycles.'; … (5 total) + - *Root cause:* Stems from the 'Layered Domain Service / Adapter / HTTP-driver' pattern plus the shared cross-package test harness (test/billing BaseSuite/SubscriptionMixin) that the /billing and /subscriptionsync skills steer tests toward: because charges and subscriptionsync internal _test files (package service) reuse the same heavyweight test/billing fixtures, and test/billing's own _test files reach back into those service packages, the test compilation graph forms a cycle. Go tolerates it today only because the back-edges live in _test files of different packages, but any move of a back-edge import into a non-test file of test/billing (e.g. a fixture helper that constructs a real subscriptionsync service) would convert it into a hard production import cycle that breaks the build. The shared mutable fixture package is the single coupling point that makes this fragile. + - *Fix direction:* + - Keep test/billing's non-test files free of imports into openmeter/billing/charges/service and openmeter/billing/worker/subscriptionsync/service; restrict those imports to _test files only, and add a CI grep guard asserting it. + - Split test/billing into a minimal fixture-construction core (no service imports) and per-domain test-only extensions, so each service tree depends on the smallest fixture surface. + - Per AGENTS.md, build test dependencies from underlying package constructors (repos, adapters, services, lockr) rather than routing through the shared harness where a lighter fixture suffices. + - Document the test-only-cycle constraint in openmeter/billing/charges/service/CLAUDE.md and test/billing/CLAUDE.md so future fixture additions do not promote a _test back-edge into production code. +- **Two parallel HTTP API surfaces (legacy v1 in openmeter/server/router and AIP-style v3 in api/v3) are generated from one TypeSpec source and both delegate to the same domain services, but v3 carries permanently-unimplemented and feature-gated operations that satisfy the generated interface via api.Unimplemented{}, so the advertised contract diverges from the runtime capability with no compile-time signal.** + - *Evidence:* openmeter/server/router/router.go wires ~25 per-domain httpdriver/httphandler packages and implements api.ServerInterface from api/api.gen.go (legacy v1).; api/v3/server/routes.go implements a separate generated ServerInterface delegating to api/v3/handlers/* packages.; api/v3/server/routes.go:419 CreateCreditAdjustment and routes.go:473 QueryGovernanceAccess always call api.Unimplemented (HTTP 501); routes.go:372-435 GetCustomerCreditBalance / ListCreditGrants / CreateCreditGrant / ListCreditTransactions short-circuit to Unimplemented when s.Credits.Enabled is false.; api/v3/api.gen.go:7186-7191 type Unimplemented struct{} writes http.StatusNotImplemented for each endpoint - the satisfy-the-interface escape hatch.; api/spec has two TypeSpec packages (legacy/ and aip/) generating the two surfaces plus all three SDKs.; … (5 total) + - *Root cause:* Stems from the 'TypeSpec as the single source of truth for both v1 and v3 HTTP APIs and all three SDKs' decision under an in-progress v1->v3 migration: TypeSpec generates each operation's server-interface method and SDK client method from the contract independently of whether the server implements it, and the v3 Server is allowed to satisfy the generated ServerInterface by embedding/delegating to api.Unimplemented{} (api.gen.go:7186), which always returns 501. Because Go only checks that the interface is satisfied, a permanently-stubbed or feature-gated operation compiles identically to a finished one. Maintaining two surfaces (v1 httpdriver vs v3 centralized handlers) with two handler conventions doubles the places where a published-but-unimplemented operation can hide, and the SDKs advertise capability the runtime never provides. + - *Fix direction:* + - Inventory every v3 operation whose Server method body is only a call to api.Unimplemented; for each, decide implement / feature-gate-and-document / mark-unstable-in-TypeSpec. + - Add a generated-vs-implemented audit test that fails CI when a v3 Server method delegates only to api.Unimplemented for an operation the spec marks stable. + - Establish a single documented convention for the two surfaces' handler shape (or a migration plan to retire v1 httpdriver) so reviewers are not maintaining two divergent conventions indefinitely. + - Surface feature-gated/unimplemented status in the OpenAPI operation descriptions so SDK consumers see it, and track the v1->v3 cutover in api/v3/server/CLAUDE.md. + +## Error Mapping + +| Error | Status Code | +|-------|------------| +| `models.GenericValidationError (and NewNillableGenericValidationError)` | 400 | +| `api/v3 generated router binding errors (InvalidParamFormatError, RequiredParamError, RequiredHeaderError, TooManyValuesForParamError, UnmarshalingParamError, UnescapedCookieParamError)` | 400 | +| `models.GenericUnauthorizedError` | 401 | +| `models.GenericForbiddenError` | 403 | +| `models.GenericNotFoundError / domain NotFoundError (e.g. notification.NotFoundError)` | 404 | +| `models.GenericConflictError / notification.UpdateAfterDeleteError` | 409 | +| `models.GenericPreConditionFailedError` | 412 | +| `models.GenericNotImplementedError` | 501 | +| `Unclassified / fallthrough error (commonhttp.ErrorEncoder)` | 500 | \ No newline at end of file diff --git a/.claude/rules/technology.md b/.claude/rules/technology.md new file mode 100644 index 0000000000..027a0d1a5a --- /dev/null +++ b/.claude/rules/technology.md @@ -0,0 +1,283 @@ +## Tech Stack + +- **API Definition:** TypeSpec @typespec/* with prettier-plugin 1.11.0, OpenAPI / kin-openapi kin-openapi v0.139.0 +- **Analytics Database:** ClickHouse (clickhouse-go/v2 + ch-go) clickhouse-go/v2 v2.46.0, ch-go v0.72.0 +- **Auth:** golang-jwt/jwt/v5 v5.3.1, xdg-go/scram v1.2.0 +- **Backend Framework:** Chi router (go-chi/chi) v5.2.5, go-chi/cors + go-chi/render cors v1.2.2, render v1.0.3, oapi-codegen v2.6.1-0.20260403235458 (tool); runtime v1.4.1; nethttp-middleware v1.1.2 +- **Cache:** hashicorp/golang-lru/v2 v2.0.7 +- **Cache / Dedupe:** Redis (go-redis/v9) v9.20.0 + redisotel v9.20.0 +- **Codegen:** goverter (jmattheis/goverter) v1.9.3 (tool), goderive (awalterschulze/goderive) v0.5.1 (tool) +- **Collector:** Benthos / Redpanda Connect benthos/v4 v4.73.0, connect free bundle v4.93.0 +- **Collector (K8s):** controller-runtime + k8s.io client-go controller-runtime v0.24.1, client-go v0.36.1 +- **Commit Tooling:** commitizen / prek cz + prek via Nix git-hooks +- **Config:** Viper + Cobra + pflag viper v1.21.0, cobra v1.10.2, pflag v1.0.10 +- **DI / Wiring:** google/wire v0.7.0 (tool: google/wire/cmd/wire) +- **Database:** PostgreSQL server postgres:15 (atlas dev db); pgx/v5 v5.9.2 driver; lib/pq v1.12.3 +- **Database / Codegen:** sqlc provided via Nix shell (sqlc); gen target generate-sqlc-testdata +- **Database / Migrations:** Atlas (ariga.io/atlas) + atlasx atlas pinned 0.36.0 in flake atlasx; ariga.io/atlas v0.36.2-0.20250730, golang-migrate v4.19.1 +- **Database / ORM:** Ent (entgo.io/ent) v0.14.6 +- **Decimal / Money:** alpacahq/alpacadecimal + govalues/decimal + shopspring/decimal alpacadecimal v0.0.9, govalues/decimal v0.1.36, shopspring/decimal v1.4.0 +- **Dev Environment:** Nix + devenv + flake-parts + git-hooks nixpkgs-unstable; devenv flake; prek pre-commit, air (hot reload) via Nix shell +- **Distributed Locking:** cirello.io/pglock v1.16.1 +- **Events:** CloudEvents SDK (cloudevents/sdk-go/v2) v2.16.2 +- **Health:** AppsFlyer/go-sundheit v0.6.0 +- **Invoicing:** GOBL (invopop/gobl) v0.403.0 +- **Linting (API):** Spectral + Prettier (TypeSpec) spectral-cli 6.16.0 (via pnpx), prettier 3.8.3 +- **Linting (Go):** golangci-lint config version 2; provided by Nix shell +- **Linting (Helm):** helm lint + helm-docs kubernetes-helm + helm-docs via Nix +- **Linting / Formatting (JS SDK):** Biome @biomejs/biome 2.4.11 +- **Logging:** log/slog + samber/slog-multi + lmittmann/tint + golang-cz/devslog slog-multi v1.8.0, tint v1.1.3, devslog v0.0.15 +- **Observability:** OpenTelemetry (go.opentelemetry.io/otel) otel v1.44.0 + otlp grpc/http exporters; otelslog bridge v0.19.0; otelsql v0.42.0; otelhttp v0.69.0 +- **Observability / Metrics:** Prometheus client_golang v1.23.2 + otel prometheus exporter v0.66.0 +- **Payments:** Stripe (stripe-go/v80) v80.2.1 +- **Queue / Messaging:** Watermill + watermill-kafka/v3 watermill v1.5.2, watermill-kafka/v3 v3.1.2 +- **Queue / Streaming:** Kafka (confluent-kafka-go/v2) v2.14.1 (librdkafka v2.14.1 pinned in flake), IBM/sarama v1.49.0 +- **Resilience:** avast/retry-go/v4 + sony/gobreaker retry-go v4.7.0, gobreaker v1.0.0 +- **Runtime:** Go 1.25.6 (module); Docker builder golang:1.26.3-alpine; Nix shell go_1_26, Go (collector module) 1.26.3, Node.js v24.15.0 (.nvmrc); engines node>=22 for JS SDK, Python ^3.9 (SDK package); Nix shell python314 +- **SDK Tooling (JS):** openapi-typescript + orval + openapi-fetch + zod openapi-typescript 7.13.0, orval 8.7.0, openapi-fetch 0.17.0, zod 4.3.6 +- **Scheduling:** go-co-op/gocron/v2 + robfig/cron/v3 gocron v2.21.2, cron v3.0.1 +- **State Machine:** qmuntal/stateless v1.8.0 +- **Testing:** stretchr/testify v1.11.1, gotestsum v1.13.0 (tool), peterldowns/pgtestdb v0.1.1, brianvoe/gofakeit/v6 v6.28.0 +- **Testing (JS SDK):** Vitest + fetch-mock vitest 4.1.4, @fetch-mock/vitest 0.2.18 +- **Utilities:** samber/lo + samber/mo lo v1.53.0, mo v1.16.0, rickb777/period + custom pkg/datetime period v1.0.27, oklog/ulid/v2 + google/uuid ulid v2.1.1, uuid v1.6.0 +- **Validation:** models.NewNillableGenericValidationError (custom) + getkin/kin-openapi kin-openapi v0.139.0 +- **Webhooks:** Svix (svix/svix-webhooks) v1.95.1 + +## Project Structure + +``` +openmeter/ +├── api/ # API layer (generated + source) +│ ├── spec/ # TypeSpec source of truth (packages/legacy, packages/aip) +│ ├── api.gen.go # oapi-codegen legacy server/types (generated) +│ ├── v3/ # v3 (AIP) API: api.gen.go, openapi.yaml, filters, templates +│ ├── openapi.yaml / openapi.cloud.yaml +│ └── client/ # javascript (pnpm/@openmeter/sdk), go, python SDKs +├── app/ +│ ├── common/ # Wire DI providers (wire.go -> wire_gen.go) +│ └── config/ # Viper config structs +├── cmd/ # Service entrypoints (.air.toml each) +│ ├── server/ billing-worker/ balance-worker/ sink-worker/ +│ ├── notification-service/ jobs/ +├── openmeter/ # Core business logic (layered service/adapter) +│ ├── billing/ (service/, adapter/, rating/, worker/, charges/) +│ ├── subscription/ entitlement/ credit/ ledger/ customer/ +│ ├── notification/ (service/, adapter/, consumer/, eventhandler/, webhook/, httpdriver/) +│ ├── meter/ meterevent/ ingest/ sink/ streaming/ productcatalog/ +│ ├── app/ secret/ portal/ namespace/ llmcost/ cost/ progressmanager/ +│ ├── ent/schema/ # Ent entity definitions (DB source of truth) +│ ├── ent/db/ # Generated ent code (DO NOT EDIT) +│ ├── registry/ server/ watermill/ event/ testutils/ +├── pkg/ # Shared utils (clock, models, filter, framework/entutils, kafka, otelx, pagination, ...) +├── collector/ # Separate Go module: Benthos/Redpanda Connect collector +├── tools/migrate/ # Migration tooling + migrations/ (golang-migrate SQL) + atlas.sum +├── e2e/ # End-to-end tests (docker-compose driven) +├── deploy/charts/ # Helm charts: openmeter, benthos-collector +├── docs/ etc/ quickstart/ test/ +├── Dockerfile benthos-collector.Dockerfile docker-compose*.yaml +├── atlas.hcl flake.nix Makefile justfile .golangci.yaml config.example.yaml +``` + +## Run Commands + +```bash +# up +docker compose up -d (start kafka/clickhouse + profiled postgres/redis/svix/dev deps) +# down +docker compose down --remove-orphans --volumes +# server +air -c ./cmd/server/.air.toml (hot-reload API server; checks config.yaml freshness) +# sink-worker +air -c ./cmd/sink-worker/.air.toml +# balance-worker +air -c ./cmd/balance-worker/.air.toml +# billing-worker +air -c ./cmd/billing-worker/.air.toml +# notification-service +air -c ./cmd/notification-service/.air.toml +# llm-cost-sync +go run ./cmd/jobs llm-cost sync +# test +PGPASSWORD=postgres psql ... && POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic ./... +# test-nocache +POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic -count=1 ./... +# test-all +docker compose up -d postgres svix redis && SVIX_HOST=localhost SVIX_JWT_SECRET=DUMMY_JWT_SECRET go test -tags=dynamic -count=1 ./... +# etoe +make -C e2e test-local (TZ=UTC OPENMETER_ADDRESS=http://localhost:38888 go test -count=1 ./...) +# etoe-slow +RUN_SLOW_TESTS=1 make -C e2e test-local +# generate +patch-oapi-templates + go generate ./... +# generate-all +update-openapi + generate-javascript-sdk + go generate ./... +# gen-api +update-openapi (make -C api/spec generate + go generate ./api/...) + generate-javascript-sdk +# update-openapi +patch-oapi-templates + make -C api/spec generate + go generate ./api/... +# generate-javascript-sdk +make -C api/client/javascript generate (pnpm install + generate + build + test) +# patch-oapi-templates +copy oapi-codegen chi-middleware.tmpl and apply api/v3/templates/chi-middleware.tmpl.patch +# generate-view-sql +go run ./tools/migrate/cmd/viewgen (SQL for ent.View schemas) +# generate-sqlc-testdata +VERSION= ./tools/migrate/generate-sqlc-testdata.sh +# migrate-check +migrate-check-schema + migrate-check-diff + migrate-check-lint + migrate-check-validate +# migrate-check-diff +atlas migrate --env local diff migrate-check (must produce no changes) +# migrate-check-lint +atlas migrate --env local lint --latest 10 +# migrate-check-validate +atlas migrate --env local validate +# atlas-diff +atlas migrate --env local diff (generate new migration) +# lint +lint-go + lint-api-spec + lint-openapi + lint-helm +# lint-go +golangci-lint run -v ./... +# lint-go-fast +golangci-lint run -v --config .golangci-fast.yaml $(GO_LINT_PATH) +# lint-go-style +golangci-lint fmt -v -d $(GO_LINT_PATH) +# lint-go-head +golangci-lint run --new-from-rev=HEAD~1 +# lint-openapi +spectral lint api/openapi.yaml api/openapi.cloud.yaml api/v3/openapi.yaml +# lint-helm +helm lint deploy/charts/openmeter && helm lint deploy/charts/benthos-collector +# fmt +golangci-lint run --fix +# mod +go mod tidy && go mod tidy -C collector +# build +build-server build-sink-worker build-benthos-collector build-balance-worker build-billing-worker build-notification-service build-jobs +# build-server +go build -o build/server -tags=dynamic ./cmd/server +# build-benthos-collector +go build -C collector -o ../build/benthos-collector -tags=dynamic ./cmd +# build-benthos-collector-release +CGO_ENABLED=0 GOOS=.. GOARCH=.. go build -C collector -trimpath -ldflags '-s -w -X main.version=..' (set GOOS/GOARCH/VERSION) +# package-helm-chart +helm-docs + helm dependency update + helm package (set CHART and VERSION) +# seed +benthos -c etc/seed/seed.yaml +# ci +make generate-all && make -j 10 lint test etoe +# ci-shell +nix develop --impure .#ci -c (run any toolchain command in the reproducible CI shell) +``` + +## Code Templates + +### domain service: Service layer struct in openmeter//service/service.go: takes a Config of injected deps (Repository, sub-services, *slog.Logger), New() validates required deps and asserts the interface. Loggers injected, never slog.Default(). + +File: `openmeter//service/service.go` + +``` +var _ .Service = (*Service)(nil) +type Config struct { Adapter .Repository; Logger *slog.Logger } +func New(c Config) (*Service, error) { if c.Adapter == nil { return nil, errors.New("missing repository") }; return &Service{adapter: c.Adapter, logger: c.Logger}, nil } +``` + +### domain adapter (Ent repo): Repository/adapter in openmeter//adapter/adapter.go: wraps *entdb.Client, Config.Validate() requires client+logger, returns the domain Repository interface; helpers stay transaction-aware via entutils.TransactingRepo. + +File: `openmeter//adapter/adapter.go` + +``` +type Config struct { Client *entdb.Client; Logger *slog.Logger } +func (c Config) Validate() error { if c.Client == nil { return errors.New("postgres client is required") }; return nil } +func New(c Config) (.Repository, error) { if err := c.Validate(); err != nil { return nil, err }; return &adapter{db: c.Client, logger: c.Logger}, nil } +``` + +### Ent schema entity: Entity definition in openmeter/ent/schema/.go: embed ent.Schema, declare Mixin() (IDMixin/TimeMixin/MetadataMixin), Fields(), Edges(), Indexes(); run `make generate` then `atlas migrate --env local diff ` to produce migrations. + +File: `openmeter/ent/schema/.go` + +``` +type Feature struct { ent.Schema } +func (Feature) Mixin() []ent.Mixin { return []ent.Mixin{entutils.IDMixin{}, entutils.TimeMixin{}, entutils.MetadataMixin{}} } +func (Feature) Fields() []ent.Field { return []ent.Field{ field.String("namespace").NotEmpty().Immutable() } } +``` + +### HTTP handler (httpdriver): HTTP handlers live in openmeter//httpdriver/ and are wired into the Chi server via generated oapi-codegen stubs; validation surfaces ValidationIssue (see /api skill). + +File: `openmeter//httpdriver/.go` + +``` +func (h *handler) Create() CreateHandler { return httptransport.NewHandlerWithArgs(resolveRequest, handle, encodeResponse) } +``` + +### Goverter converter: Define a converter interface with goverter annotations in /convert.go; `make generate` emits /convert.gen.go. Use FromAPI/ToAPI/FromDB/ToDB naming (/go-types-conversion skill). + +File: `openmeter//convert.go` + +``` +// goverter:converter +type Converter interface { ToAPI(domain.X) api.X } +``` + +### Wire DI provider: Register a new dependency by adding a provider to a wire.go set in app/common/ (or domain registry), then run `make generate` to regenerate wire_gen.go. + +File: `app/common/wire.go` + +``` +var Set = wire.NewSet(adapter.New, service.New, wire.Bind(new(domain.Service), new(*service.Service))) +``` + +### SQL migration: Generated by diffing the Ent schema; never hand-edit timestamped files except ent.View DDL which Atlas does not emit. atlas.sum must stay append-only (enforced in pr-checks.yaml). + +File: `tools/migrate/migrations/_.up.sql / .down.sql` + +``` +-- generated via: atlas migrate --env local diff +``` + +### service test (TestEnv): Tests build deps from underlying constructors (repos/adapters/services/lockr), not app/common wiring; require POSTGRES_HOST=127.0.0.1; use t.Context(); freeze time with clock.FreezeTime + defer clock.UnFreeze (/test skill, AGENTS.md). + +File: `openmeter//.../_test.go` + +``` +func TestX(t *testing.T) { ctx := t.Context(); /* given/when/then */ require.Equal(t, float64(5), got.InexactFloat64()) } +``` + +## Testing + +- **stretchr/testify v1.11.1** — Assertion/require + mock framework for all Go tests (go.mod, AGENTS.md /test skill) +- **gotestsum v1.13.0 (tool)** — Test runner with richer output (go.mod tool, flake) +- **peterldowns/pgtestdb v0.1.1** — Ephemeral Postgres test databases per test; requires POSTGRES_HOST=127.0.0.1 or suites skip (go.mod, AGENTS.md) +- **brianvoe/gofakeit/v6 v6.28.0** — Fake data generation in tests (go.mod) + +```bash +# test +PGPASSWORD=postgres psql ... && POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic ./... +# test-nocache +POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic -count=1 ./... +# test-all +docker compose up -d postgres svix redis && SVIX_HOST=localhost SVIX_JWT_SECRET=DUMMY_JWT_SECRET go test -tags=dynamic -count=1 ./... +# generate-sqlc-testdata +VERSION= ./tools/migrate/generate-sqlc-testdata.sh +# migrate-check +migrate-check-schema + migrate-check-diff + migrate-check-lint + migrate-check-validate +# migrate-check-diff +atlas migrate --env local diff migrate-check (must produce no changes) +# migrate-check-lint +atlas migrate --env local lint --latest 10 +# migrate-check-validate +atlas migrate --env local validate +# lint +lint-go + lint-api-spec + lint-openapi + lint-helm +# lint-go +golangci-lint run -v ./... +# lint-go-fast +golangci-lint run -v --config .golangci-fast.yaml $(GO_LINT_PATH) +# lint-go-style +golangci-lint fmt -v -d $(GO_LINT_PATH) +# lint-go-head +golangci-lint run --new-from-rev=HEAD~1 +# lint-openapi +spectral lint api/openapi.yaml api/openapi.cloud.yaml api/v3/openapi.yaml +# lint-helm +helm lint deploy/charts/openmeter && helm lint deploy/charts/benthos-collector +``` \ No newline at end of file diff --git a/.codex/agents/archie-analysis.toml b/.codex/agents/archie-analysis.toml new file mode 100644 index 0000000000..c494ea314c --- /dev/null +++ b/.codex/agents/archie-analysis.toml @@ -0,0 +1,7 @@ +name = "archie_analysis" +description = "Archie analysis worker for scan, deep-scan, and intent-layer subagent tasks." +model_reasoning_effort = "medium" +sandbox_mode = "workspace-write" +developer_instructions = """ +You are an Archie workflow worker. Follow the parent prompt exactly, stay within your assigned task, and write the requested artifact to the requested path. Do not modify unrelated source files. Do not paste large artifacts into the conversation after writing them. +""" diff --git a/.codex/rules/archie.rules b/.codex/rules/archie.rules new file mode 100644 index 0000000000..a64e249686 --- /dev/null +++ b/.codex/rules/archie.rules @@ -0,0 +1,472 @@ +# Archie execpolicy Rules — auto-approve every shell command the +# deep-scan / intent-layer / share / viewer workflows invoke, +# so the user is not prompted mid-run. Generated by +# CodexConnector.finalize() at install time from +# archie/manifest_data.py COMMAND_RULES + install._STANDALONE_SCRIPTS. +# Format: developers.openai.com/codex/rules +# +# Most-restrictive-wins (forbidden > prompt > allow), so any +# stricter user rule in this project still takes precedence over +# the entries below. + +prefix_rule( + pattern = ["python3", ".archie/scanner.py"], + decision = "allow", + justification = "Run Archie's scanner.py", + match = [ + "python3 .archie/scanner.py", + "python3 .archie/scanner.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/renderer.py"], + decision = "allow", + justification = "Run Archie's renderer.py", + match = [ + "python3 .archie/renderer.py", + "python3 .archie/renderer.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/validate.py"], + decision = "allow", + justification = "Run Archie's validate.py", + match = [ + "python3 .archie/validate.py", + "python3 .archie/validate.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/intent_layer.py"], + decision = "allow", + justification = "Run Archie's intent_layer.py", + match = [ + "python3 .archie/intent_layer.py", + "python3 .archie/intent_layer.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/finalize.py"], + decision = "allow", + justification = "Run Archie's finalize.py", + match = [ + "python3 .archie/finalize.py", + "python3 .archie/finalize.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/merge.py"], + decision = "allow", + justification = "Run Archie's merge.py", + match = [ + "python3 .archie/merge.py", + "python3 .archie/merge.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/measure_health.py"], + decision = "allow", + justification = "Run Archie's measure_health.py", + match = [ + "python3 .archie/measure_health.py", + "python3 .archie/measure_health.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/detect_cycles.py"], + decision = "allow", + justification = "Run Archie's detect_cycles.py", + match = [ + "python3 .archie/detect_cycles.py", + "python3 .archie/detect_cycles.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/drift.py"], + decision = "allow", + justification = "Run Archie's drift.py", + match = [ + "python3 .archie/drift.py", + "python3 .archie/drift.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/extract_output.py"], + decision = "allow", + justification = "Run Archie's extract_output.py", + match = [ + "python3 .archie/extract_output.py", + "python3 .archie/extract_output.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/arch_review.py"], + decision = "allow", + justification = "Run Archie's arch_review.py", + match = [ + "python3 .archie/arch_review.py", + "python3 .archie/arch_review.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/align_check.py"], + decision = "allow", + justification = "Run Archie's align_check.py", + match = [ + "python3 .archie/align_check.py", + "python3 .archie/align_check.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/check_rules.py"], + decision = "allow", + justification = "Run Archie's check_rules.py", + match = [ + "python3 .archie/check_rules.py", + "python3 .archie/check_rules.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/code_shape.py"], + decision = "allow", + justification = "Run Archie's code_shape.py", + match = [ + "python3 .archie/code_shape.py", + "python3 .archie/code_shape.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/rule_index.py"], + decision = "allow", + justification = "Run Archie's rule_index.py", + match = [ + "python3 .archie/rule_index.py", + "python3 .archie/rule_index.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/lint_gate.py"], + decision = "allow", + justification = "Run Archie's lint_gate.py", + match = [ + "python3 .archie/lint_gate.py", + "python3 .archie/lint_gate.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/agent_cli.py"], + decision = "allow", + justification = "Run Archie's agent_cli.py", + match = [ + "python3 .archie/agent_cli.py", + "python3 .archie/agent_cli.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/verify_findings.py"], + decision = "allow", + justification = "Run Archie's verify_findings.py", + match = [ + "python3 .archie/verify_findings.py", + "python3 .archie/verify_findings.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/apply_verdicts.py"], + decision = "allow", + justification = "Run Archie's apply_verdicts.py", + match = [ + "python3 .archie/apply_verdicts.py", + "python3 .archie/apply_verdicts.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/migrate_blueprint_rules.py"], + decision = "allow", + justification = "Run Archie's migrate_blueprint_rules.py", + match = [ + "python3 .archie/migrate_blueprint_rules.py", + "python3 .archie/migrate_blueprint_rules.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/rule_kinds.py"], + decision = "allow", + justification = "Run Archie's rule_kinds.py", + match = [ + "python3 .archie/rule_kinds.py", + "python3 .archie/rule_kinds.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/backfill_kinds.py"], + decision = "allow", + justification = "Run Archie's backfill_kinds.py", + match = [ + "python3 .archie/backfill_kinds.py", + "python3 .archie/backfill_kinds.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/telemetry.py"], + decision = "allow", + justification = "Run Archie's telemetry.py", + match = [ + "python3 .archie/telemetry.py", + "python3 .archie/telemetry.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/telemetry_sync.py"], + decision = "allow", + justification = "Run Archie's telemetry_sync.py", + match = [ + "python3 .archie/telemetry_sync.py", + "python3 .archie/telemetry_sync.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/analytics.py"], + decision = "allow", + justification = "Run Archie's analytics.py", + match = [ + "python3 .archie/analytics.py", + "python3 .archie/analytics.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/config.py"], + decision = "allow", + justification = "Run Archie's config.py", + match = [ + "python3 .archie/config.py", + "python3 .archie/config.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/update_check.py"], + decision = "allow", + justification = "Run Archie's update_check.py", + match = [ + "python3 .archie/update_check.py", + "python3 .archie/update_check.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/upload.py"], + decision = "allow", + justification = "Run Archie's upload.py", + match = [ + "python3 .archie/upload.py", + "python3 .archie/upload.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/share_setup.py"], + decision = "allow", + justification = "Run Archie's share_setup.py", + match = [ + "python3 .archie/share_setup.py", + "python3 .archie/share_setup.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/refresh.py"], + decision = "allow", + justification = "Run Archie's refresh.py", + match = [ + "python3 .archie/refresh.py", + "python3 .archie/refresh.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/viewer.py"], + decision = "allow", + justification = "Run Archie's viewer.py", + match = [ + "python3 .archie/viewer.py", + "python3 .archie/viewer.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/install_hooks.py"], + decision = "allow", + justification = "Run Archie's install_hooks.py", + match = [ + "python3 .archie/install_hooks.py", + "python3 .archie/install_hooks.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", ".archie/_common.py"], + decision = "allow", + justification = "Run Archie's _common.py", + match = [ + "python3 .archie/_common.py", + "python3 .archie/_common.py \"$PROJECT_ROOT\"", + ], +) + +prefix_rule( + pattern = ["python3", "-c"], + decision = "allow", + justification = "Inline Python — Archie workflow uses for JSON inspection", +) + +prefix_rule( + pattern = ["codex", "exec"], + decision = "allow", + justification = "verify_findings.py spawns `codex exec` for per-finding model calls during Step 9 drift verification", +) + +prefix_rule( + pattern = ["mkdir"], + decision = "allow", + justification = "Create workspace directories", +) + +prefix_rule( + pattern = ["cp"], + decision = "allow", + justification = "Copy file (workflow uses for workspace-relative copies)", +) + +prefix_rule( + pattern = ["cat"], + decision = "allow", + justification = "Read file to stdout", +) + +prefix_rule( + pattern = ["ls"], + decision = "allow", + justification = "List directory contents", +) + +prefix_rule( + pattern = ["wc"], + decision = "allow", + justification = "Word / line / byte count", +) + +prefix_rule( + pattern = ["head"], + decision = "allow", + justification = "Read head of file", +) + +prefix_rule( + pattern = ["sort"], + decision = "allow", + justification = "Sort lines", +) + +prefix_rule( + pattern = ["date"], + decision = "allow", + justification = "Format timestamp for telemetry", +) + +prefix_rule( + pattern = ["echo"], + decision = "allow", + justification = "Print text (used for pipe-to-script in scope_resolution)", +) + +prefix_rule( + pattern = ["test"], + decision = "allow", + justification = "Conditional test (often a bash builtin; allow for completeness)", +) + +prefix_rule( + pattern = ["rm", "-f", ".archie/health.json"], + decision = "allow", + justification = "Remove the Archie health marker", +) + +prefix_rule( + pattern = ["rm", "-f"], + decision = "allow", + justification = "Remove transient Archie run artifacts under .archie/tmp/. Codex argv-prefix can't bind tighter than 'rm -f' because bash expands the .archie/tmp/archie_* glob to many literal argv entries before exec — workflow only uses rm -f for Archie's own .archie/ paths.", +) + +prefix_rule( + pattern = ["git", "status"], + decision = "allow", + justification = "Read git status", +) + +prefix_rule( + pattern = ["git", "diff"], + decision = "allow", + justification = "Read git diff", +) + +prefix_rule( + pattern = ["git", "log"], + decision = "allow", + justification = "Read git log", +) + +prefix_rule( + pattern = ["git", "rev-parse"], + decision = "allow", + justification = "Read git ref / branch names", +) + +prefix_rule( + pattern = ["git", "ls-files"], + decision = "allow", + justification = "List tracked files", +) + +prefix_rule( + pattern = ["git", "ls-tree"], + decision = "allow", + justification = "List tree contents", +) + +prefix_rule( + pattern = ["git", "show"], + decision = "allow", + justification = "Show git object contents", +) + +prefix_rule( + pattern = ["git", "-C"], + decision = "allow", + justification = "Scoped git for a subdirectory: `git -C log/status/diff/…`. Codex argv-prefix cannot narrow past the dynamic token; the workflow only uses this with read-only git subcommands", +) diff --git a/.gitignore b/.gitignore index 903858c5ad..0c6334b6bf 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,15 @@ api/v3/templates/chi-middleware.tmpl # CodeGraph .codegraph/ + +# Archie (installed tooling — outputs are NOT ignored) +.archie/*.py +.archie/__pycache__/ +.archie/platform_rules.json +.archie/workflow/ +.archie/.test_snapshots/ +.claude/commands/archie-*.md +.claude/hooks/ +.claude/settings.local.json +.agents/skills/archie-*/ +.codex/hooks.json diff --git a/AGENTS.md b/AGENTS.md index a13f6394fb..848a2a3d45 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -314,3 +314,205 @@ Initialize it with `codegraph init -i` before doing code exploration. It indexes ## Skills Skills are created inside [.agents/skills](.agents/skills/) by default and then symlinked to [.claude/skills](.claude/skills). Make sure you always treat `.agents/skills` as the source of truth. + + + + +# AGENTS.md + +> Architecture guidance for **OpenMeter** +> Style: Multi-binary Go backend organized as domain packages under openmeter/, each following a hand-rolled service/adapter/connector pattern (interfaces declared in the domain root package, concrete struct constructors in nested service/ and adapter/ subpackages, wired together by Google Wire in app/common). Persistence is Ent ORM over PostgreSQL with a single shared generated client (openmeter/ent/db). Event-time usage metering data flows through Kafka into ClickHouse via streaming connectors; an async event bus (Watermill over Kafka) drives billing/notification/balance workers. Two parallel HTTP API surfaces coexist: a legacy v1 surface assembled in openmeter/server/router from per-domain httpdriver/httphandler packages, and a newer AIP-style v3 surface in api/v3 with centralized handlers that delegate to the same domain services. API contract is authored in TypeSpec (api/spec, two packages: legacy + aip) and code-generated to OpenAPI then to Go (oapi-codegen) and to JS/Python/Go SDKs. A separate Benthos/Redpanda-Connect collector binary (collector/) ships usage events from external sources. Cross-cutting dependency magnets (pkg/models, pkg/clock, pkg/pagination, openmeter/customer, openmeter/productcatalog, openmeter/billing) are pulled in widely; the only import cycles detected are test-harness-induced (production/test packages importing the test/billing fixtures package). +> Generated: 2026-06-05T13:53:25.551022+00:00 + +## Overview + +OpenMeter is a multi-tenant Go usage-metering and billing platform that ingests CloudEvents usage data, aggregates it in ClickHouse, and drives entitlements, credit grants, a double-entry ledger, and invoice/charge billing through a versioned v1+v3 REST API. It is built as a single-Go-module modulith: roughly 35 layered domain packages under openmeter/ (each splitting Service and Adapter interfaces, Ent/PostgreSQL persistence, and HTTP drivers) composed by Google Wire into six runnable binaries (server, sink-worker, billing-worker, balance-worker, notification-service, jobs) plus a separate Benthos collector module. The HTTP spine routes requests through a Chi router (legacy v1 plus a Google-AIP-style v3 layer, both generated by oapi-codegen from a TypeSpec source of truth) into the domain services, which persist via transaction-aware Ent adapters to PostgreSQL while metered usage flows separately through the ingest collector and Kafka into a single append-only ClickHouse MergeTree table written by the sink worker's three-phase flush. Cross-binary work is asynchronous over Kafka behind a Watermill eventbus facade, with the billing, balance, and notification workers consuming events to advance billing, recompute balances, and deliver outbound webhooks via Svix. The architecture is a modular, event-driven Go monorepo of separately deployable services packaged as containers and orchestrated on Kubernetes via Helm, with the entire API surface and all three SDKs generated from the shared TypeSpec definition. + +## Architecture + +**Style:** OpenMeter is one Go module (github.com/openmeterio/openmeter) compiled into six long-running binaries (cmd/server, cmd/billing-worker, cmd/balance-worker, cmd/sink-worker, cmd/notification-service, cmd/jobs) plus a separate collector module. The control plane is organized as ~17 domain packages under openmeter/ (billing, charges, customer, productcatalog, subscription, entitlement, credit, ledger, meter, notification, app, streaming, ingest/sink), each a hand-rolled service/adapter/connector layer: interfaces declared in the domain root, concrete struct constructors with Config.Validate() in nested service/ and adapter/ subpackages, wired together at compile time by Google Wire provider sets in app/common/*.go. Persistence splits across four stores: PostgreSQL (Ent ORM + Atlas migrations, ~70 namespace-scoped tables) is the source-of-truth control plane; ClickHouse (per-namespace om__events MergeTree) is the append-only usage data plane; Kafka (confluent-kafka-go + Watermill CQRS) carries ingest events and system domain events; Redis backs dedupe and async-query progress. Two HTTP surfaces coexist: a legacy v1 router (openmeter/server/router) composing per-domain httpdriver packages over httptransport.Handler[Req,Resp], and a newer AIP-style v3 surface (api/v3) of thin oapi-codegen delegators. The API contract is authored once in TypeSpec (api/spec, legacy + aip packages) and code-generated to OpenAPI, then to Go server/client (oapi-codegen), Go/JS/Python SDKs, and goverter/goderive converters. +**Structure:** modular + +The architecture is dictated by the product: high-volume event-time usage metering feeding transactional billing. Metering wants an append-only columnar store and a streaming pipeline (ClickHouse + Kafka + sink-worker), while billing/subscription/entitlement want ACID transactions and cross-row invariants (PostgreSQL + Ent + lockr advisory locks). Splitting the binaries lets the read-heavy ingest/sink path and the latency-tolerant billing/notification/balance workers scale and fail independently while sharing one codebase and one Ent client (openmeter/ent/db) — the meta architecture_style notes the only real import cycles are test-fixture induced, so the single module stays clean. Wire compile-time DI (app/common) makes each binary assemble only the providers it needs (e.g. cmd/billing-worker pulls BillingRegistry/ChargesRegistry, not the ingest HTTP driver). The TypeSpec-to-everything codegen chain keeps three SDKs and two server stubs from drifting from one source of truth. The service/adapter split with transaction-aware adapters (entutils.TransactingRepo / HijackTx) is what lets one domain's service compose another's inside a single Postgres transaction — the load-bearing requirement for subscription→billing→charges→ledger consistency. + +**Root constraint:** Provide event-time usage metering AND ACID usage-based billing on the same multi-tenant platform: high-volume append-only usage events must aggregate cheaply, while subscriptions/invoices/credits/ledger demand cross-row transactional invariants — over one shared codebase. +- → Multi-binary Go control plane with layered service/adapter domains, code-generated API contract, and an event-time usage-metering data plane + +**Key trade-offs:** +- Context-ambient transactions: the active tx is carried on context.Context and rebound by entutils.TransactingRepo, not visible in method signatures. → Cross-domain service composition can be atomic over one Ent client without threading a tx parameter through every interface; subscription→billing→charges→ledger commit together. +- Advisory locks must run inside a real Postgres transaction and must key on a globally-unique id; misuse (no tx, or keying on a non-unique column) is only caught at runtime. → Per-customer serialization of multi-row subscription/billing/charge operations across replicas, with the lock auto-released on commit/rollback (no orphan locks). +- Six binaries over one module: shared code is convenient but a change to a high-fan-in magnet (pkg/models 229 in-edges, productcatalog 104, customer 103) ripples across every binary, and all binaries must be rebuilt/redeployed together. → One codebase, one Ent client, one transaction boundary for cross-domain atomicity; workers scale and fail independently while sharing types. +- TypeSpec-first codegen: any contract change requires regenerating OpenAPI, two Go server stubs, three SDKs, and goverter/goderive converters; generated files must never be hand-edited. → Two API surfaces and three SDKs can never drift from one source of truth; contract drift becomes a build failure. +- A separate ClickHouse store and Kafka pipeline for usage events: two more stateful systems to operate, and ClickHouse tables are created idempotently at connector startup outside Atlas migration discipline. → High-volume append-only usage ingest and aggregation scale independently of OLTP Postgres; meters and usage-based billing read aggregated quantities efficiently. +- External-storage state machines put the source-of-truth status on the aggregate row; the FSM definition and the persisted status must stay in sync, and every legal transition must be declared as a Permit edge. → Invoice/charge transitions are durable across requests, auditable, and illegal transitions are rejected at the single edge-set definition. +- Feature subsystems are wired as concrete-or-noop at the DI seam (credits.enabled, webhooks), so disabling a feature requires every layer's provider to honor the flag (api/v3 handlers, customer ledger hooks, namespace provisioning). → Whole subsystems (ledger, Svix webhooks) cleanly become no-ops without runtime conditionals scattered through service logic. +- The (namespace,key,deleted_at) UniqueResourceMixin index only approximates partial uniqueness; entities needing true WHERE deleted_at IS NULL uniqueness must ship a hand-written IndexWhere SQL migration. → Most entities get key-uniqueness for free from the mixin; the few that need strict partial uniqueness opt into a custom migration. +- Two HTTP surfaces (v1 + v3) front the same services indefinitely: every behavior change must be checked against both transport layers and both error-rendering paths. → Existing v1 clients keep working while new endpoints land on the AIP v3 surface; no forced client migration. + +**Runs on:** self-hosted (Kubernetes via Helm; container images on GHCR; binaries cross-compiled for linux/darwin amd64/arm64) +**Compute:** Kubernetes Deployments (Helm chart deploy/charts/openmeter), containers run on depot-ubuntu CI/Depot build runners, long-running worker processes: server, sink-worker, balance-worker, billing-worker, notification-service, jobs +**CI/CD:** GitHub Actions (.github/workflows/): ci.yaml (build/lint/test/migrations/generators via nix develop .#ci on Depot runners), release.yaml (tag-triggered artifacts/helm/binaries/SDKs), artifacts.yaml (Depot build-push container images), npm-release.yaml (OIDC trusted publish), sdk-python-dev-release.yaml, pr-checks.yaml (atlas.sum append-only, release-note label), security.yaml (Trufflehog secret scan + SCA), codeql.yml + codeql-go.yaml, analysis-scorecard.yaml, untrusted-artifacts.yaml, require-all-reviewers.yml, workflow-result.yaml, Depot (depot/build-push-action, depot/setup-action) for fast multi-arch container builds, project from vars.DEPOT_PROJECT + +## Data Models + +OpenMeter persists its control-plane state in PostgreSQL via the Ent ORM (~70 tables across customer, entitlement/credit, productcatalog, subscription, billing, charges, ledger, notification, and app domains; source of truth is openmeter/ent/schema/*.go, Atlas migrations under tools/migrate/migrations/). Raw usage events live in ClickHouse (per-namespace om__events MergeTree table) and flow there through per-namespace Kafka ingest topics consumed by the sink-worker; Redis backs event deduplication and async query progress tracking. Almost every Postgres table is multi-tenant (namespace-scoped), uses ULID char(26) ids, and soft-deletes via deleted_at. + +**Models** (full lifecycle in [`.claude/rules/data-models.md`](.claude/rules/data-models.md)): +- `RawEvent` (document) — `openmeter/streaming/connector.go` +- `dedupe.Item` (key_value) — `openmeter/dedupe/dedupe.go` +- `Progress` (key_value) — `openmeter/progressmanager/entity/progressmanager.go` +- `SinkMessage` (value_object) — `openmeter/sink/models/models.go` +- `BillingInvoice` (table) — `openmeter/ent/schema/billing.go` +- `BillingInvoiceLine` (table) — `openmeter/ent/schema/billing.go` +- `SubscriptionItem` (table) — `openmeter/ent/schema/subscription.go` +- `Entitlement` (table) — `openmeter/ent/schema/entitlement.go` +- `Feature` (table) — `openmeter/ent/schema/feature.go` +- `LedgerBreakageRecord` (table) — `openmeter/ent/schema/ledger_breakage_record.go` +- `PlanRateCard` (table) — `openmeter/ent/schema/productcatalog.go` +- `Customer` (table) — `openmeter/ent/schema/customer.go` +- `BillingCustomerOverride` (table) — `openmeter/ent/schema/billing.go` +- `BillingWorkflowConfig` (table) — `openmeter/ent/schema/billing.go` +- `Grant` (table) — `openmeter/ent/schema/grant.go` +- `Subscription` (table) — `openmeter/ent/schema/subscription.go` +- `LLMCostPrice` (table) — `openmeter/ent/schema/llmcostprice.go` +- `BillingInvoiceSplitLineGroup` (table) — `openmeter/ent/schema/billing.go` +- `BillingProfile` (table) — `openmeter/ent/schema/billing.go` +- `Plan` (table) — `openmeter/ent/schema/productcatalog.go` +- `Addon` (table) — `openmeter/ent/schema/addon.go` +- `ChargeFlatFee` (table) — `openmeter/ent/schema/chargesflatfee.go` +- `Meter` (table) — `openmeter/ent/schema/meter.go` +- `ChargeUsageBasedRuns` (table) — `openmeter/ent/schema/chargesusagebased.go` +- `ChargesSearchV1` (value_object) — `openmeter/ent/schema/charges.go` +- `BillingInvoiceLineDiscount` (table) — `openmeter/ent/schema/billing.go` +- `ChargeFlatFeeRun` (table) — `openmeter/ent/schema/chargesflatfee.go` +- `ChargeUsageBased` (table) — `openmeter/ent/schema/chargesusagebased.go` +- `AddonRateCard` (table) — `openmeter/ent/schema/addon.go` +- `LedgerSubAccountRoute` (table) — `openmeter/ent/schema/ledger_account.go` +- `PlanPhase` (table) — `openmeter/ent/schema/productcatalog.go` +- `SubscriptionPhase` (table) — `openmeter/ent/schema/subscription.go` +- `ChargeCreditPurchase` (table) — `openmeter/ent/schema/chargescreditpurchase.go` +- `NotificationEventDeliveryStatus` (table) — `openmeter/ent/schema/notification.go` +- `PlanAddon` (table) — `openmeter/ent/schema/planaddon.go` +- `BalanceSnapshot` (table) — `openmeter/ent/schema/balance_snapshot.go` +- `BillingInvoiceLineUsageDiscount` (table) — `openmeter/ent/schema/billing.go` +- `UsageReset` (table) — `openmeter/ent/schema/usage_reset.go` +- `AppStripe` (table) — `openmeter/ent/schema/app_stripe.go` +- `BillingInvoiceValidationIssue` (table) — `openmeter/ent/schema/billing.go` +- `Charge` (table) — `openmeter/ent/schema/charges.go` +- `CreditRealizationLineage` (table) — `openmeter/ent/schema/creditrealizationlineage.go` +- `CreditRealizationLineageSegment` (table) — `openmeter/ent/schema/creditrealizationlineage.go` +- `NotificationChannel` (table) — `openmeter/ent/schema/notification.go` +- `NotificationRule` (table) — `openmeter/ent/schema/notification.go` +- `Subject` (table) — `openmeter/ent/schema/subject.go` +- `TaxCode` (table) — `openmeter/ent/schema/taxcode.go` +- `App` (table) — `openmeter/ent/schema/app.go` +- `BillingInvoiceUsageBasedLineConfig` (table) — `openmeter/ent/schema/billing.go` +- `BillingStandardInvoiceDetailedLineAmountDiscount` (table) — `openmeter/ent/schema/billing.go` +- `ChargeUsageBasedRunDetailedLine` (table) — `openmeter/ent/schema/chargesusagebased.go` +- `LedgerEntry` (table) — `openmeter/ent/schema/ledger_entry.go` +- `SubscriptionAddon` (table) — `openmeter/ent/schema/subscription_addon.go` +- `SubscriptionAddonQuantity` (table) — `openmeter/ent/schema/subscription_addon.go` +- `CurrencyCostBasis` (table) — `openmeter/ent/schema/custom_currencies.go` +- `NotificationEvent` (table) — `openmeter/ent/schema/notification.go` +- `AppStripeCustomer` (table) — `openmeter/ent/schema/app_stripe.go` +- `BillingInvoiceFlatFeeLineConfig` (table) — `openmeter/ent/schema/billing.go` +- `BillingStandardInvoiceDetailedLine` (table) — `openmeter/ent/schema/billing.go` +- `CustomCurrency` (table) — `openmeter/ent/schema/custom_currencies.go` +- `LedgerCustomerAccount` (table) — `openmeter/ent/schema/ledger_customer_account.go` +- `LedgerSubAccount` (table) — `openmeter/ent/schema/ledger_account.go` +- `LedgerTransaction` (table) — `openmeter/ent/schema/ledger_transaction.go` +- `SubscriptionBillingSyncState` (table) — `openmeter/ent/schema/subscriptionbillingsync.go` +- `AppCustomInvoicing` (table) — `openmeter/ent/schema/appcustominvoicing.go` +- `AppCustomInvoicingCustomer` (table) — `openmeter/ent/schema/appcustominvoicing.go` +- `CustomerSubjects` (table) — `openmeter/ent/schema/customer.go` +- `LedgerAccount` (table) — `openmeter/ent/schema/ledger_account.go` +- `OrganizationDefaultTaxCodes` (table) — `openmeter/ent/schema/organizationdefaulttaxcodes.go` +- `AppCustomer` (table) — `openmeter/ent/schema/app.go` +- `LedgerTransactionGroup` (table) — `openmeter/ent/schema/ledger_transaction_group.go` +- `BillingCustomerLock` (table) — `openmeter/ent/schema/billing.go` +- `BillingSequenceNumbers` (table) — `openmeter/ent/schema/billing.go` +- `BillingInvoiceWriteSchemaLevel` (table) — `openmeter/ent/schema/billing.go` +- _… 66 more in [`.claude/rules/data-models.md`](.claude/rules/data-models.md)_ + +**Stores:** +- `primary_postgres` (PostgreSQL (Ent ORM + Atlas migrations + pgx), role: primary) — owns: Customer, CustomerSubjects, Subject, Meter, Feature, Entitlement, Grant, BalanceSnapshot, UsageReset, Plan, PlanPhase, PlanRateCard, Addon, AddonRateCard, PlanAddon, Subscription, SubscriptionPhase, SubscriptionItem, SubscriptionAddon, SubscriptionAddonQuantity, SubscriptionBillingSyncState, BillingProfile, BillingWorkflowConfig, BillingCustomerOverride, BillingInvoice, BillingInvoiceLine, BillingInvoiceFlatFeeLineConfig, BillingInvoiceUsageBasedLineConfig, BillingInvoiceSplitLineGroup, BillingInvoiceLineDiscount, BillingInvoiceLineUsageDiscount, BillingStandardInvoiceDetailedLine, BillingStandardInvoiceDetailedLineAmountDiscount, BillingInvoiceValidationIssue, BillingSequenceNumbers, BillingCustomerLock, BillingInvoiceWriteSchemaLevel, Charge, ChargesSearchV1, ChargeFlatFee, ChargeFlatFeeRun, ChargeUsageBased, ChargeUsageBasedRuns, ChargeUsageBasedRunDetailedLine, ChargeCreditPurchase, CreditRealizationLineage, CreditRealizationLineageSegment, LedgerAccount, LedgerSubAccount, LedgerSubAccountRoute, LedgerTransactionGroup, LedgerTransaction, LedgerEntry, LedgerCustomerAccount, LedgerBreakageRecord, App, AppCustomer, AppStripe, AppStripeCustomer, AppCustomInvoicing, AppCustomInvoicingCustomer, TaxCode, OrganizationDefaultTaxCodes, CustomCurrency, CurrencyCostBasis, LLMCostPrice, NotificationChannel, NotificationRule, NotificationEvent, NotificationEventDeliveryStatus +- `redis` (Redis (go-redis v9), role: cache) — owns: dedupe.Item, Progress +- `clickhouse_events` (ClickHouse (MergeTree), role: analytics) — owns: RawEvent +- `kafka_ingest` (Kafka (confluent-kafka-go + Watermill), role: queue) + +## Architecture Diagram + +```mermaid +graph TD + Client["API clients / SDKs (Go, JS, Python)"] --> Server["cmd/server: Chi v1+v3 HTTP API (oapi-codegen)"] + Server --> Domains["openmeter/* domain services (billing, customer, subscription, entitlement, credit, ledger, meter)"] + Domains --> Ent["Ent adapters + entutils.TransactingRepo"] + Ent --> Postgres[("PostgreSQL (Ent schema + Atlas)")] + Domains --> EventBus["Watermill eventbus.Publisher"] + EventBus --> Kafka[("Kafka topics (ingest / system / worker)")] + Client -->|usage events| Ingest["ingest.Collector (Redis dedupe)"] + Ingest --> Kafka + Kafka --> Sink["cmd/sink-worker: 3-phase flush"] + Sink --> ClickHouse[("ClickHouse events (MergeTree)")] + Kafka --> Workers["billing-worker / balance-worker / notification-service"] + Workers --> Domains + ClickHouse --> Domains + Workers --> Svix["Svix webhook delivery"] +``` + +## Workspace Topology (none, 5 workspaces) + +**Apps:** `openmeter`, `collector` +**Shared libraries:** `spec`, `python`, `javascript` + +_No cross-workspace cycles detected._ + +## Commands + +```bash +# up +docker compose up -d (start kafka/clickhouse + profiled postgres/redis/svix/dev deps) +# fmt +golangci-lint run --fix +# test +PGPASSWORD=postgres psql ... && POSTGRES_HOST=127.0.0.1 go test -p 128 -parallel 16 -tags=dynamic ./... +# lint +lint-go + lint-api-spec + lint-openapi + lint-helm +# build +build-server build-sink-worker build-benthos-collector build-balance-worker build-billing-worker build-notification-service build-jobs +# server +air -c ./cmd/server/.air.toml (hot-reload API server; checks config.yaml freshness) +# lint-go +golangci-lint run -v ./... +# test-all +docker compose up -d postgres svix redis && SVIX_HOST=localhost SVIX_JWT_SECRET=DUMMY_JWT_SECRET go test -tags=dynamic -count=1 ./... +``` + +_Full catalog (43 commands) in [`.claude/rules/technology.md`](.claude/rules/technology.md)._ + +## Architectural Rules + +Detailed rules live as topic files under `.claude/rules/`. Read the relevant one when the task touches that surface: + +- [`.claude/rules/architecture.md`](.claude/rules/architecture.md) — Components, file placement, naming conventions +- [`.claude/rules/patterns.md`](.claude/rules/patterns.md) — Communication patterns, integrations, key decisions, trade-offs (with violation signals) +- [`.claude/rules/technology.md`](.claude/rules/technology.md) — Tech stack, project structure, code templates, testing tooling +- [`.claude/rules/data-models.md`](.claude/rules/data-models.md) — Persistence stores, data models, per-model lifecycle (how to add/modify/read, backups, tests) +- [`.claude/rules/guidelines.md`](.claude/rules/guidelines.md) — Implementation guidelines for existing capabilities +- [`.claude/rules/pitfalls.md`](.claude/rules/pitfalls.md) — Documented traps with evidence + fix direction +- [`.claude/rules/dev-rules.md`](.claude/rules/dev-rules.md) — Coding-time imperatives (patterns, anti-patterns, boundaries, wiring) +- [`.claude/rules/infrastructure.md`](.claude/rules/infrastructure.md) — CI / signing / distribution / secrets / env setup / registry auth +- [`.claude/rules/enforcement/index.md`](.claude/rules/enforcement/index.md) — Every rule the pre-edit hook + plan/commit classifier consults, grouped by severity +- [`.claude/rules/frontend.md`](.claude/rules/frontend.md) — UI architecture, state, routing (when applicable) + +## Enforcement Rules + +[`.claude/rules/enforcement/index.md`](.claude/rules/enforcement/index.md) indexes every rule, grouped by topic and by path glob. Load only the topic file(s) relevant to the file you're editing — universal anti-patterns sit in `enforcement/universal.md`. The pre-edit hook (`PRE_VALIDATE_HOOK`) and plan/commit classifier (`align_check.py`) read [`.archie/rules.json`](.archie/rules.json) directly; the markdown is for agent/human browsing only. + +## Per-folder Context + +Every meaningful folder has its own `CLAUDE.md` (Archie's intent layer). Claude Code auto-loads the nearest one, so when editing a file under `some/component/`, look there first for the local invariants, anti-patterns, and adjacent code that uses the same shape. + +--- +*Auto-generated from structured architecture analysis. Place in project root.* + diff --git a/CLAUDE.md b/CLAUDE.md index f5a12da66a..75688867fa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,3 +1,9 @@ -# OpenMeter Development Guide +# CLAUDE.md -See consolidated agents instructions in @AGENTS.md +This project's canonical agent context lives in **[AGENTS.md](./AGENTS.md)**. + +`AGENTS.md` is the vendor-neutral standard (Cursor, Codex, Aider, Continue, +Cline, Cody — and Claude Code itself read it). Treat it as the source of +truth for architecture, patterns, commands, and enforcement rules. +Per-folder context still lives in nested `CLAUDE.md` files (Archie's +intent layer) and applies to any agent regardless of vendor. diff --git a/api/CLAUDE.md b/api/CLAUDE.md new file mode 100644 index 0000000000..9e6ae2336f --- /dev/null +++ b/api/CLAUDE.md @@ -0,0 +1,47 @@ +# api + + + +> Go-side boundary of the TypeSpec->OpenAPI->Go generation chain for the legacy v1/v2 API. Holds the oapi-codegen-generated ServerInterface + request/response types (api.gen.go), the generated OpenAPI specs (openapi.yaml / openapi.cloud.yaml), and goverter type converters between near-identical generated types. Primary constraint: everything here except the tiny //go:generate stub files is generated and must not be hand-edited. + +## Patterns + +**Generated code is read-only** — api.gen.go, convert.gen.go, openapi.yaml, openapi.cloud.yaml all carry 'Code generated ... DO NOT EDIT' headers. To change them, edit the TypeSpec in api/spec and run make gen-api. (`// Code generated by github.com/oapi-codegen/oapi-codegen/v2 ... DO NOT EDIT.\npackage api`) +**Enums emit a Valid() guard** — Every generated enum type (AddonStatus, AppType, CollectionMethod, ...) gets a Valid() bool method switching over its const members; downstream code uses these for validation rather than re-listing values. (`func (e AddonStatus) Valid() bool { switch e { case AddonStatusActive: return true ... default: return false } }`) +**Goverter bridges duplicate generated types** — oapi-codegen produces distinct Go types for the same shape (e.g. BillingDiscountPercentage vs DiscountPercentage). convert.go declares typed func variables under goverter pragmas; convert.gen.go fills them in init(). (`// goverter:variables\nvar ( FromBillingDiscountPercentageToDiscountPercentage func(BillingDiscountPercentage) DiscountPercentage )`) +**Generation driven by codegen.yaml** — api.go is a one-line //go:generate stub pointing at codegen.yaml, which sets chi-server: true, models: true, embedded-spec: true and compatibility flags (always-prefix-enum-values, disable-required-readonly-as-pointer). (`//go:generate go tool .../oapi-codegen --config=codegen.yaml ./openapi.yaml`) +**Problem+json error envelope** — All operations in the spec map non-2xx responses to shared $ref problem schemas (BadRequestProblemResponse, UnauthorizedProblemResponse, ...). New legacy endpoints reuse these, not bespoke error bodies. (`'400': content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse'`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `api.gen.go` | oapi-codegen output: chi ServerInterface, all v1 request/response models, enum consts + Valid() methods, embedded spec | Never edit by hand; it is regenerated wholesale. A type appearing twice with a Billing- prefix is intentional (resolved via convert.gen.go). | +| `api.go` | //go:generate stub invoking oapi-codegen against openapi.yaml | Only the generate directive lives here; do not add Go logic. | +| `codegen.yaml` | oapi-codegen configuration (package, chi-server/models/embedded-spec, compatibility flags) | Changing flags like always-prefix-enum-values or disable-required-readonly-as-pointer churns the entire api.gen.go. | +| `convert.go` | Hand-written goverter:variables declarations for API<->API type conversion | Declare only func signatures under goverter pragmas; bodies are generated. goverter:enum no is set. | +| `convert.gen.go` | Goverter-generated init() bodies for the convert.go variables (//go:build !goverter) | DO NOT EDIT; regenerate via goverter when convert.go changes. | +| `openapi.yaml` | Generated OpenAPI 3.0 spec for the self-hosted v1 API (source for api.gen.go and SDKs) | Edit TypeSpec in api/spec, not this file. | +| `openapi.cloud.yaml` | Generated OpenAPI spec for the Cloud API variant | Same generation source as openapi.yaml; do not diverge by hand. | +| `types/doc.go` | Placeholder package doc for shared API types | types/ is otherwise effectively empty; do not assume rich shared-type logic lives here. | + +## Anti-Patterns + +- Hand-editing api.gen.go, convert.gen.go, openapi.yaml or openapi.cloud.yaml instead of changing api/spec TypeSpec and running make gen-api +- Adding a v3/AIP endpoint here — v3 lives in api/v3, this package is legacy v1/v2 only +- Writing conversion logic in convert.go function bodies instead of declaring goverter:variables signatures and letting goverter fill convert.gen.go +- Introducing a bespoke error response schema on a new operation instead of reusing the shared problem+json $refs +- Re-listing enum members in caller code instead of using the generated Valid() method + +## Decisions + +- **TypeSpec is the single source of truth; this package is purely generated output plus tiny generate stubs.** — Keeps the OpenAPI spec, Go server contract, and multi-language SDKs in lockstep from one authored source. +- **Use goverter to bridge oapi-codegen's duplicate generated types.** — oapi-codegen emits distinct Go types for identical shapes; codegen'd converters avoid hand-maintained, error-prone copy functions. + +## Example: Declaring an API<->API type converter that goverter implements + +``` +//go:generate go tool github.com/jmattheis/goverter/cmd/goverter gen ./\npackage api\n\n// goverter:variables\n// goverter:skipCopySameType\n// goverter:output:file ./convert.gen.go\n// goverter:enum no\nvar (\n\tFromBillingDiscountPercentageToDiscountPercentage func(BillingDiscountPercentage) DiscountPercentage\n\tFromBillingDiscountUsageToDiscountUsage func(BillingDiscountUsage) DiscountUsage\n) +``` + + diff --git a/api/client/CLAUDE.md b/api/client/CLAUDE.md new file mode 100644 index 0000000000..43ef52e492 --- /dev/null +++ b/api/client/CLAUDE.md @@ -0,0 +1,31 @@ +# client + + + +> Structural root for the published, multi-language OpenMeter client SDKs. Every sub-package here is generated from the TypeSpec/OpenAPI contract in api/spec and is consumed by external users; only the Go SDK is imported by the Go backend itself (e.g. e2e, quickstart). + +## Patterns + +**Split by language, generated per language** — Each child owns one SDK language with its own generator/toolchain: go/ (oapi-codegen via codegen.yaml), javascript/ (orval via orval.config.ts), python/ (TypeSpec http-client-python). node/ and web/ are README-only stubs. (`api/client/go/codegen.yaml drives oapi-codegen; api/client/javascript/orval.config.ts drives orval`) +**Hand-edited only at the seams** — Generated code (client.gen.go, javascript/src/) is never edited; thin hand-written wrappers add auth/ergonomics. In go/, client.go adds NewAuthClient / IngestEvent helpers over the generated Client. (`api/client/go/client.go: NewAuthClientWithResponses and IngestEventBatch wrap generated *Client methods`) +**Generation source is api/spec, not these folders** — All client code derives from the OpenAPI specs produced by api/spec; regenerate via `make gen-api` at the repo root. Editing a child's generated output is always wrong. (`go/client.go carries a //go:generate oapi-codegen directive consuming ../../openapi.cloud.yaml`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `go/client.gen.go` | oapi-codegen output: full v1/cloud Client, ClientWithResponses, and request/response types (~1.7MB). | DO NOT EDIT; regenerate via the //go:generate directive in client.go (make gen-api) | +| `go/client.go` | Hand-written auth + event-ingest convenience wrappers over the generated client. | Only place for Go-side ergonomics; keep wrappers as thin pass-throughs to generated methods | +| `javascript/orval.config.ts` | orval generator config for the TypeScript SDK (output under src/). | src/ is generated from the spec; change generation here, not the src output | + +## Anti-Patterns + +- Editing any generated artifact (go/client.gen.go, javascript/src/, python/openmeter/) instead of the api/spec .tsp source +- Importing a non-Go client (javascript/python) from the Go backend +- Adding language-SDK logic outside the per-language child folder + +## Decisions + +- **One generated SDK per language, each with its own native generator/toolchain.** — Idiomatic per-language clients beat one forced abstraction; all stay in sync because they share a single OpenAPI source of truth. + + diff --git a/api/spec/CLAUDE.md b/api/spec/CLAUDE.md new file mode 100644 index 0000000000..404549b67a --- /dev/null +++ b/api/spec/CLAUDE.md @@ -0,0 +1,44 @@ +# spec + + + +> TypeSpec source of truth for the OpenMeter API contract, authored as a pnpm workspace. It compiles two TypeSpec packages into the OpenAPI specs and SDKs the rest of the repo depends on; everything under api/ (openapi.yaml, api/v3/openapi.yaml, api.gen.go, all client SDKs) is generated downstream from here. + +## Patterns + +**Two packages, two API generations** — packages/legacy/ emits the v1/v2 OpenMeter + Cloud specs and the Python client; packages/aip/ emits the AIP-style v3 spec. Add new surface to the package matching the API generation. (`package.json `generate` runs `--filter @openmeter/api-spec-legacy run generate && --filter @openmeter/api-spec-aip run generate``) +**Build orchestration lives in this Makefile, not the children** — The api/spec Makefile runs pnpm generate, then AIP $ref rewriting (yq), `openapi bundle` for v3, and copies outputs into ../ and ../v3/. Running `tsp compile` directly skips these steps. (`Makefile generate rewrites SortQuery/StringFieldFilter schemas to $ref common/definitions/aip_filters.yaml, then cp legacy outputs to ../openapi.yaml and ../openapi.cloud.yaml`) +**pnpm workspace with patched, version-pinned TypeSpec** — pnpm-workspace.yaml globs packages/*; TypeSpec compiler/http/openapi/openapi3 and http-client-python are pinned and locally patched under patches/. .npmrc enforces save-exact=true. (`package.json pnpm.patchedDependencies maps @typespec/http, @typespec/compiler, @typespec/openapi(3), @typespec/http-client-python to files in patches/`) +**Format and lint before generate** — `format` (prettier + aip format) and `lint` (prettier --check + per-package lint incl. custom AIP/legacy rules) run via pnpm scripts; the Makefile generate target depends on format. (`Makefile `generate: format`; package.json `lint` runs prettier --check plus both package lint scripts`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `Makefile` | Top-level orchestration: install, format, generate (yq $ref rewrite + openapi bundle + copy-to-api), lint. | The copy/bundle/yq steps live ONLY here; bypassing them leaves api/openapi.yaml and api/v3/openapi.yaml stale or with inline filter schemas instead of $ref | +| `package.json` | Workspace root: generate/format/lint scripts, pinned TypeSpec deps, patchedDependencies/overrides. | private, version 0.1.0; exports map points at packages/*/output, which are gitignored build artifacts | +| `pnpm-workspace.yaml` | Declares workspace members as packages/* with trustPolicy/minimumReleaseAge guards. | A new package outside packages/* is never discovered by pnpm | +| `patches/` | Local patches for the pinned TypeSpec compiler/http/openapi/openapi3/http-client-python packages. | Bumping a patched dep requires regenerating its patch hash in package.json | +| `.gitignore / .prettierignore` | Excludes generated output (**/output/, packages/**/output/), node_modules, and pnpm-lock from formatting/VCS. | Generated OpenAPI under packages/*/output is intentionally untracked; the committed artifacts are the copies in api/ | + +## Anti-Patterns + +- Editing generated artifacts (api/openapi.yaml, api/v3/openapi.yaml, api.gen.go, Go/JS/Python SDKs) instead of the .tsp sources here +- Running tsp compile directly and skipping the Makefile (misses the yq $ref rewrite, AIP openapi bundle, and copy-to-api steps) +- Adding v3 surface to packages/legacy or v1/v2 surface to packages/aip +- Putting cross-package generation logic inside packages/* instead of the parent Makefile +- Unpinning or floating TypeSpec dependency versions, invalidating the local patches + +## Decisions + +- **Two separate TypeSpec packages (legacy v1/v2/cloud and AIP v3) rather than one shared spec.** — The v3 surface follows Kong AIP conventions and a different pipeline (bundle + filter $ref rewrite) than the legacy surface, so they stay isolated. +- **TypeSpec is the single source of truth; all OpenAPI and SDKs are generated.** — Keeps multi-language clients and server stubs consistent and lets the API contract be authored once. + +## Example: Regenerate all specs and SDKs from the TypeSpec sources + +``` +make gen-api # repo root, or: +make -C api/spec generate # pnpm generate, yq $ref rewrite, openapi bundle, then copy to api/ and api/v3/ +``` + + diff --git a/api/spec/packages/CLAUDE.md b/api/spec/packages/CLAUDE.md new file mode 100644 index 0000000000..a2ed5974fc --- /dev/null +++ b/api/spec/packages/CLAUDE.md @@ -0,0 +1,32 @@ +# packages + + + +> pnpm workspace container holding the two TypeSpec source-of-truth packages that author the OpenMeter API contract. It splits the surface by API generation: legacy/ emits the v1/v2 + Cloud OpenAPI (and a Python client), while aip/ emits the Google-AIP-style v3 OpenAPI. Everything downstream (api/openapi.yaml, api/v3/openapi.yaml, Go/JS SDKs) is generated from these .tsp sources and must never be hand-edited. + +## Patterns + +**Two packages, two API generations** — legacy/ owns v1/v2 + Cloud; aip/ owns the AIP-style v3 surface. Pick the package by which API version the change targets; do not cross-author v3 types in legacy or vice versa. (`v3 list-filter type -> packages/aip/src; new v1 portal endpoint -> packages/legacy/src`) +**Workspace member discovery via pnpm-workspace.yaml** — ../pnpm-workspace.yaml globs 'packages/*', so each child is a standalone pnpm package with its own package.json/tspconfig.yaml. A new sibling only participates once it lives directly under packages/. (`packages:\n - packages/*`) +**Build orchestrated from the parent spec Makefile, not here** — ../Makefile generate target runs pnpm generate across both members, then post-processes (yq $ref rewrite of AIP filters), bundles the aip output, and copies emitted YAML to api/openapi.yaml, api/openapi.cloud.yaml, api/v3/openapi.yaml. Output paths are fixed by that target. (`cp packages/legacy/output/openapi.OpenMeter.yaml ../openapi.yaml`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `aip/` | TypeSpec package for the AIP-style v3 API; stricter custom linter (kebab op-ids, no-nullable, field-prefix); two-stage tsp-compile-then-Node-post-process build with shared common/definitions fragments. | Skipping flatten-allof / seal-object-schemas post-processors, or editing emitted output/definitions YAML instead of src/. | +| `legacy/` | TypeSpec package for v1/v2 + Cloud; dual emit (OpenAPI3 + Python client) via tspconfig.yaml + tspconfig.client.yaml, with a lighter custom linter than aip. | Pointing the OpenAPI emit at ./src instead of ./src/cloud, and CRUD bodies not using the Rest.Resource ResourceCreate/ReplaceModel templates from README. | + +## Anti-Patterns + +- Editing generated artifacts (api/openapi.yaml, api/v3/openapi.yaml, api/api.gen.go, Go/JS/Python SDKs) instead of the .tsp sources here. +- Adding v3 surface to legacy/ or v1 surface to aip/ instead of the package matching the API generation. +- Adding a package outside packages/* so pnpm-workspace.yaml never picks it up. +- Running tsp compile directly and bypassing the parent Makefile generate target (misses the yq filter $ref rewrite, the aip openapi bundle, and the copy-to-api steps). + +## Decisions + +- **Two separate TypeSpec packages rather than one shared spec.** — v1/legacy and v3/AIP have divergent conventions and linters (AIP enforces kebab op-ids, no-nullable, field prefixes); isolating them lets each evolve and lint independently while sharing one pnpm workspace. +- **Cross-package generation logic lives in the parent spec Makefile, not inside packages/.** — Steps spanning both members (yq filter $ref rewrite, openapi bundle of the aip output, copying emitted YAML into api/ and api/v3/) must run in a fixed order, so they sit one level up rather than in either package. + + diff --git a/api/spec/packages/legacy/src/productcatalog/CLAUDE.md b/api/spec/packages/legacy/src/productcatalog/CLAUDE.md new file mode 100644 index 0000000000..4547235b59 --- /dev/null +++ b/api/spec/packages/legacy/src/productcatalog/CLAUDE.md @@ -0,0 +1,73 @@ +# productcatalog + + + +> TypeSpec source of truth for the v1 product-catalog API surface: features, plans, addons, plan-addon assignments, rate cards, prices, discounts, tax, pro-rating, and subscriptions. Models defined here compile to api/openapi.yaml and downstream Go/JS SDKs via `make gen-api` — edit the .tsp, never the generated code. + +## Patterns + +**namespace OpenMeter for every model file** — Every .tsp declares `namespace OpenMeter;` after imports so all models join the single OpenMeter namespace; routes.tsp additionally does `using TypeSpec.Http;` and `using TypeSpec.OpenAPI;`. (`import "@typespec/http"; +import "../types.tsp"; +import "./ratecards.tsp"; +namespace OpenMeter;`) +**@friendlyName on every exposed model/enum/union** — Each generated schema name comes from @friendlyName, not the TypeSpec identifier — e.g. `@friendlyName("RateCardFlatFee")`, `@friendlyName("BillingSettlementMode") enum SettlementMode`. Adding a model without @friendlyName produces an unstable auto-generated OpenAPI name. (`@friendlyName("FlatPrice") +model FlatPrice { type: PriceType.flat; amount: Money; }`) +**Discriminated unions for polymorphic types** — Price, RateCard, RateCardUsageBasedPrice, RateCardEntitlement, FeatureUnitCost, SubscriptionEditOperation all use `@discriminated(#{ envelope: "none", discriminatorPropertyName: "type" })` (or "op") with a per-variant literal discriminator field (e.g. `type: PriceType.flat`). (`@discriminated(#{ envelope: "none", discriminatorPropertyName: "type" }) +union RateCard { flat_fee: RateCardFlatFee, usage_based: RateCardUsageBased }`) +**Lifecycle @visibility on every field** — Fields annotate `@visibility(Lifecycle.Read)`, `(Lifecycle.Read, Lifecycle.Create)`, or `(Read, Create, Update)` to drive Create/Replace model generation. Server-computed fields (version, status, effectiveFrom/To, annotations, validationErrors) are Read-only. (`@visibility(Lifecycle.Read) +status: PlanStatus;`) +**Compose, don't duplicate, via spread + OmitProperties/Resource mixins** — Models reuse shared shapes with `...UniqueResource`, `...ResourceTimestamps`, `...Archiveable`, `...global.Resource`, `...global.CadencedResource`, and derive create bodies with `OmitProperties<...>` / `ResourceCreateModel` / `@withVisibility(Lifecycle.Create)` rather than redefining fields. (`model Feature { ...ResourceTimestamps; ...Archiveable; ...FeatureCreateInputs; @visibility(Lifecycle.Read) id: ULID; }`) +**ISO8601 durations and Money/Numeric scalars** — Durations use `duration` with `@encode(DurationKnownEncoding.ISO8601)`; monetary/quantity values use the shared `Money`, `Numeric`, `Percentage`, `CurrencyCode`, `ULID`, `Key` scalars from ../types.tsp — not raw number/string. (`@encode(DurationKnownEncoding.ISO8601) +billingCadence: duration | null;`) +**Route interfaces carry @route/@tag/@operationId per operation** — routes.tsp groups endpoints into interfaces (FeaturesEndpoints, PlansEndpoints, AddonsEndpoints, SubscriptionsEndpoints) under `@route("/api/v1/...")` + `@tag`, each op tagged `@operationId` (the SDK method name) and `@summary`, returning `Model | NotFoundError | CommonErrors`. (`@get @operationId("getFeature") @summary("Get feature") +get(@path featureId: string): Feature | NotFoundError | CommonErrors;`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.tsp` | Package barrel — imports `..` then every sibling .tsp (discounts, plan, prices, ratecards, routes, tax, subscription, alignment, addon, planaddon). New files must be added here or they are not compiled. | Adding a new .tsp without an import line here silently drops it from the OpenAPI output. | +| `routes.tsp` | All HTTP operations for features/plans/plan-addons/addons/subscriptions. Only file using @route/@get/@post and the `using TypeSpec.Http` directive. | @operationId is the public SDK method name — renaming is a breaking SDK change. Subscription ops return CommonSubscriptionErrors (with validation extensions), not plain CommonErrors. | +| `ratecards.tsp` | RateCardBase generic + RateCardFlatFee/RateCardUsageBased + RateCardEntitlement union deriving from EntitlementMetered/Static/BooleanCreateInputs via OmitProperties. | Entitlement templates omit featureKey/featureId/usagePeriod because the rate card supplies them; do not re-add those fields. | +| `prices.tsp` | Price union (flat/unit/tiered/dynamic/package) and the *WithCommitments variants that spread SpendCommitments. | RateCardUsageBasedPrice (in ratecards.tsp) references the WithCommitments variants; flat-fee rate cards use FlatPriceWithPaymentTerm only. | +| `plan.tsp` | Plan, PlanPhase, PlanStatus, SettlementMode (@friendlyName BillingSettlementMode), PlanReference/Input. proRatingConfig and settlementMode carry default object literals. | PlanStatus is Read-only/computed from effectiveFrom/effectiveTo; phases requires @minItems(1). | +| `subscription.tsp` | Largest model file: Subscription, SubscriptionExpanded, phases/items, Create/Change unions (Plan vs Custom), SubscriptionTiming, and the SubscriptionEditOperation discriminated union (op-based). | Imports ../entitlements/main.tsp and uses `global.` prefixed shared types; SubscriptionEdit.customizations capped at @maxItems(100). | +| `errors.tsp` | Subscription-specific error envelope: CommonSubscriptionErrors alias and Subscription{BadRequest,Conflict}ErrorResponse overriding `extensions` with SubscriptionErrorExtensions (validationErrors). | These wrap the base BadRequestError/ConflictError via OmitProperties<..., "extensions">; keep them in sync with ../errors.tsp. | +| `features.tsp` | Feature/FeatureCreateInputs plus FeatureUnitCost union (manual vs llm) and FeatureLLMUnitCost pricing lookup. Uses `using TypeSpec.OpenAPI`. | meterGroupByFilters is #deprecated in favor of advancedMeterGroupByFilters; LLM cost provider/model/tokenType each have a *Property variant that is mutually exclusive with the static value. | + +## Anti-Patterns + +- Editing api/openapi.yaml or generated Go/JS SDK files instead of these .tsp sources — they are overwritten by `make gen-api`. +- Adding a model/enum without @friendlyName, or a new .tsp without importing it in main.tsp. +- Adding @query/@route/@get decorators in a file that lacks `import "@typespec/http"` + `using TypeSpec.Http;` (compile error: Unknown decorator). +- Making a server-computed field (version, status, effective dates, validationErrors, annotations) Create/Update-writable instead of @visibility(Lifecycle.Read). +- Redefining fields by hand instead of composing with spread/OmitProperties/ResourceCreateModel, drifting create bodies out of sync with the read model. + +## Decisions + +- **TypeSpec is the single source of truth; OpenAPI and all SDKs are generated.** — One contract definition keeps v1 server code, Go client, and JS client provably in sync; per AGENTS.md the workflow is edit .tsp -> make gen-api -> make generate. +- **Envelope-less discriminated unions keyed on `type`/`op`.** — Produces flat OpenAPI discriminator schemas that map cleanly to Go interface implementations for prices, rate cards, and subscription edit operations without an extra wrapper object. +- **Subscriptions get a dedicated error family (CommonSubscriptionErrors with validation extensions).** — Subscription create/edit/change need structured validationErrors in the 400/409 body that the generic CommonErrors do not carry. + +## Example: Defining a polymorphic catalog type with a friendly name, an envelope-less discriminator, and lifecycle visibility. + +``` +import "@typespec/http"; +import "../types.tsp"; + +namespace OpenMeter; + +@friendlyName("FlatPrice") +model FlatPrice { + @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) + type: PriceType.flat; + + @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) + amount: Money; +} + +@friendlyName("Price") +// ... +``` + + diff --git a/api/v3/handlers/meters/query/CLAUDE.md b/api/v3/handlers/meters/query/CLAUDE.md new file mode 100644 index 0000000000..4e5c769ce9 --- /dev/null +++ b/api/v3/handlers/meters/query/CLAUDE.md @@ -0,0 +1,58 @@ +# query + + + +> Pure-function helper package that translates a v3 `api.MeterQueryRequest` body into a `streaming.QueryParams` for meter querying: window-size/timezone/groupBy/dimension-filter parsing, customer-ID resolution, and ISO-8601 duration conversion. No HTTP handler lives here — it is the request-mapping layer consumed by the meters (and featurecost) handlers. + +## Patterns + +**Single orchestrating entrypoint BuildQueryParams** — All request mapping flows through `BuildQueryParams(ctx, meter.Meter, api.MeterQueryRequest, CustomerResolverFunc) (streaming.QueryParams, error)`. Each request field (Granularity, TimeZone, GroupByDimensions, Filters.Dimensions) is conditionally parsed only when non-nil; sub-converters are pure helpers it calls. (`if body.Granularity != nil { ws, err := ConvertISO8601DurationToWindowSize(string(*body.Granularity)); ... params.WindowSize = &ws }`) +**Reserved dimensions are special-cased** — `DimensionSubject` ("subject") and `DimensionCustomerID` ("customer_id") are constants; `IsReservedDimension` / `IsSupportedGroupByDimension` gate them. In the filter switch they map to `params.FilterSubject` / `params.FilterCustomer`; everything else must exist in `m.GroupBy` and becomes a `params.FilterGroupBy` entry. (`switch k { case DimensionSubject: ...; case DimensionCustomerID: ...; default: if _, ok := m.GroupBy[k]; !ok { return params, NewInvalidDimensionFilterError(k) } }`) +**Filtered dimensions auto-added to GroupBy (deduped)** — When a subject or customer_id filter has values, the dimension is appended to `params.GroupBy` but only via `slices.Contains` guard to avoid duplicates. (`if len(subjects) > 0 && !slices.Contains(params.GroupBy, DimensionSubject) { params.GroupBy = append(params.GroupBy, DimensionSubject) }`) +**Restricted filter operators on reserved dims** — `ExtractStringsFromQueryFilter` / `ExtractStringsFromQueryFilterMapItem` accept ONLY `Eq` and `In`; any of Neq/Nin/Contains/Ncontains/And/Or (and Exists for the MapItem variant), or Eq+In together, returns `NewUnsupportedFilterOperatorError`. Non-reserved dims instead go through `request.ConvertQueryFilterStringMapItem` + `ValidateWithComplexity(maxGroupByFilterComplexityDepth)` (depth 2). (`if f.Neq != nil || f.Nin != nil || ... { return nil, NewUnsupportedFilterOperatorError(fieldPath...) }`) +**Errors are models.ValidationIssue with HTTP status + field path** — Every error is a package-level `models.NewValidationIssue(ErrCode..., msg, models.WithFieldString(...), models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(...))` plus a `New...Error(...)` constructor that calls `.WithAttr` or `.WithPathString`. Never return bare `fmt.Errorf` for user-facing validation (the lone exception is `ConvertWindowSizeToISO8601Duration`'s internal unknown-WindowSize case). (`var ErrInvalidWindowSize = models.NewValidationIssue(ErrCodeInvalidWindowSize, "...", models.WithFieldString("granularity"), models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))`) +**CustomerResolverFunc injected, not imported service** — Customer lookup is a `CustomerResolverFunc` typedef passed into `BuildQueryParams`; `NewCustomerResolver(customer.Service)` builds the production one (lists with `IncludeDeleted: true`, KeyBy ID, joins `NewCustomerNotFoundError` for missing IDs). Tests pass a `noopCustomerResolver` instead of a real service. (`func NewCustomerResolver(customerService customer.Service) CustomerResolverFunc { return func(ctx, ns, ids) ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `params.go` | Core `BuildQueryParams` orchestration + `maxGroupByFilterComplexityDepth = 2` constant. | Field-by-field nil checks are load-bearing; subject/customer filters mutate GroupBy as a side effect, so adding new dimension kinds means updating both the switch and the dedup-append logic. | +| `convert.go` | ISO-8601<->WindowSize maps and the `ExtractStrings...` eq/in-only extractors. | The two extractor variants differ ONLY in that the MapItem version also rejects `Exists`; keep them in sync when adding operators. | +| `dimensions.go` | Reserved-dimension constants and `IsReserved`/`IsSupportedGroupByDimension` predicates. | `IsSupportedGroupByDimension` returns true for reserved dims OR keys present in `m.GroupBy`; a new reserved dimension must be added to both the const set and `IsReservedDimension`. | +| `customers.go` | `CustomerResolverFunc` type, `NewCustomerResolver`, and `CustomersToStreaming` (identity map since `customer.Customer` satisfies `streaming.Customer`). | Resolver lists with `IncludeDeleted: true` and returns a joined error per missing ID — do not silently drop unresolved customers. | +| `errors.go` | All `ErrCode*` constants, `ValidationIssue` vars, and `New*Error` constructors with field paths / HTTP statuses. | Customer-not-found is 404, all others are 400; new errors must follow the same ValidationIssue + constructor pairing. | + +## Anti-Patterns + +- Returning plain `fmt.Errorf`/`errors.New` for request-validation failures instead of the package's `models.ValidationIssue`-backed `New*Error` constructors (loses HTTP status and field path). +- Accepting filter operators beyond eq/in on reserved (subject, customer_id) dimensions by bypassing `ExtractStringsFromQueryFilter(MapItem)`. +- Calling a customer service directly inside `BuildQueryParams` instead of going through the injected `CustomerResolverFunc`. +- Appending a dimension to `params.GroupBy` without the `slices.Contains` dedup guard. +- Treating an arbitrary dimension as valid without checking membership in `m.GroupBy` (must error via `NewInvalidDimensionFilterError`). + +## Decisions + +- **Mapping logic lives in its own `query` sub-package separate from the meters HTTP handler.** — It is pure and table-testable (convert_test/params_test cover it without HTTP), and is reused by `api/v3/handlers/featurecost`. +- **Customer resolution is abstracted behind `CustomerResolverFunc` rather than importing `customer.Service`.** — Keeps `BuildQueryParams` unit-testable with a noop resolver and decouples param-building from service wiring. +- **Reserved dimensions and non-reserved meter groupBy dimensions take different validation paths (eq/in extractor vs. full FilterString with complexity limit).** — Subject/customer map to dedicated streaming filter fields, while groupBy dimensions support richer filter expressions bounded by `maxGroupByFilterComplexityDepth`. + +## Example: Adding a new user-facing validation error + +``` +const ErrCodeInvalidGroupBy models.ErrorCode = "invalid_group_by" + +var ErrInvalidGroupBy = models.NewValidationIssue( + ErrCodeInvalidGroupBy, + "invalid group by dimension", + models.WithFieldString("group_by_dimensions"), + models.WithCriticalSeverity(), + commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest), +) + +func NewInvalidGroupByError(dimension string) error { + return ErrInvalidGroupBy.WithAttr("value", dimension) +} +``` + + diff --git a/cmd/balance-worker/CLAUDE.md b/cmd/balance-worker/CLAUDE.md new file mode 100644 index 0000000000..4ad06c4313 --- /dev/null +++ b/cmd/balance-worker/CLAUDE.md @@ -0,0 +1,36 @@ +# balance-worker + + + +> main.go entrypoint for the balance-worker binary, which snapshots entitlement balances from Kafka usage events. Builds a Wire-generated Application and runs it after migrating the DB; constraint: business logic lives in app/common providers, this package only wires and runs. + +## Patterns + +**Standard config bootstrap** — main() uses viper.NewWithOptions(viper.WithDecodeHook(config.DecodeHook())) + pflag, calls config.SetViperDefaults, supports --config/--version/--validate, then v.Unmarshal into config.Configuration and conf.Validate() before building the app. (`v, flags := viper.NewWithOptions(viper.WithDecodeHook(config.DecodeHook())), pflag.NewFlagSet(...)`) +**Wire Application struct embeds lifecycle mixins** — Application embeds common.GlobalInitializer, common.Migrator, common.Runner so SetGlobals(), Migrate(ctx), Run() come from app/common. wire.Build lists the balance-worker provider set and ends with wire.Struct(new(Application), "*"). (`type Application struct { common.GlobalInitializer; common.Migrator; common.Runner; ... }`) +**Panic funnel + ordered cleanup** — First statement is defer log.PanicLogger(log.WithExit); initializeApplication returns a cleanup func that is deferred and also invoked on init failure before os.Exit(1). (`defer log.PanicLogger(log.WithExit)`) +**Migrate before Run** — app.Migrate(ctx) is called and error-checked before app.Run(); never start the worker on an unmigrated DB. (`if err := app.Migrate(ctx); err != nil { ... os.Exit(1) }`) +**metadata() names the binary** — Local metadata(conf) calls common.NewMetadata(conf, version, "balance-worker") to tag telemetry with the service name; version comes from version.go ldflags. (`return common.NewMetadata(conf, version, "balance-worker")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `wire.go` | //go:build wireinject provider list passed to wire.Build (common.BalanceWorker, common.BalanceWorkerAdapter, common.Streaming, common.Notification, common.Lockr, etc.) | Edit this, not wire_gen.go; rerun make generate after changing the provider set or the Application struct. | +| `wire_gen.go` | Wire-generated injector; Code generated by Wire. DO NOT EDIT. | Never hand-edit; the nested cleanupN() unwinding order is generated and must not be touched manually. | +| `main.go` | Process entrypoint: load/validate config, initializeApplication, SetGlobals, Migrate, Run. | ctx is context.Background(); keep config-load boilerplate identical to other cmd/ binaries. | +| `version.go` | ldflags-provisioned version/revision/revisionDate read via runtime/debug in init(). | Identical across all cmd/ binaries; do not diverge. | + +## Anti-Patterns + +- Editing wire_gen.go directly instead of wire.go + make generate +- Adding domain/business logic here instead of an app/common provider +- Calling app.Run() before app.Migrate(ctx) succeeds +- Dropping the defer log.PanicLogger / cleanup() funnel + +## Decisions + +- **DI is centralized in app/common; cmd/ only assembles a worker-specific subset** — Keeps the five worker binaries thin and consistent while sharing one provider library. +- **Application embeds GlobalInitializer/Migrator/Runner mixins** — main() can drive any binary's lifecycle uniformly (SetGlobals/Migrate/Run) regardless of which providers were wired. + + diff --git a/cmd/billing-worker/CLAUDE.md b/cmd/billing-worker/CLAUDE.md new file mode 100644 index 0000000000..29afb1af58 --- /dev/null +++ b/cmd/billing-worker/CLAUDE.md @@ -0,0 +1,46 @@ +# billing-worker + + + +> main.go entrypoint for the billing-worker binary (invoice advancement/collection + subscription->billing reconciliation). Beyond the shared bootstrap it also provisions ledger business accounts and the sandbox app on startup before Run(). + +## Patterns + +**Extra startup provisioning steps** — After Migrate, main() calls app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace()) and app.AppRegistry.SandboxProvisioner(...) before app.Run(); each error -> os.Exit(1). (`_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace())`) +**Richer Application struct** — Application exposes AppRegistry, LedgerAccountResolver, Meter, NamespaceManager, Streaming alongside the GlobalInitializer/Migrator/Runner mixins so startup steps can reach those services. (`AppRegistry common.AppRegistry; LedgerAccountResolver ledger.AccountResolver; NamespaceManager *namespace.Manager`) +**Feature-gate noop in wire** — wire.Build includes common.FeatureGateNoopSet; the generated injector builds gate := featuregate.NewNoop() and threads it through NewBillingRegistry and NewBillingSubscriptionSyncService. (`common.FeatureGateNoopSet`) +**Worker config via FieldsOf** — wire.FieldsOf(new(config.BillingConfiguration), "Worker") and FieldsOf(...BillingWorkerConfiguration, "ConsumerConfiguration") extract nested config sub-structs for providers. (`wire.FieldsOf(new(config.BillingConfiguration), "Worker")`) +**metadata() names the binary** — metadata(conf) = common.NewMetadata(conf, version, "billing-worker"). (`common.NewMetadata(conf, version, "billing-worker")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | Bootstrap + Migrate + ledger/sandbox provisioning + Run. | EnsureBusinessAccounts and SandboxProvisioner must stay before Run(); they depend on Migrate having run first. | +| `wire.go` | billing-worker provider list (common.BillingWorker, common.Streaming, common.TaxCode, common.FeatureGateNoopSet, ...). | credits.enabled gating is handled inside the wired ledger providers; do not bypass them here. | +| `wire_gen.go` | Generated injector wiring the large billing/ledger/subscription graph; DO NOT EDIT. | The injector constructs LedgerHistorical/Account/Resolver chains and BillingRegistry; regenerate via make generate. | +| `version.go` | ldflags version metadata. | Identical to other binaries. | + +## Anti-Patterns + +- Editing wire_gen.go instead of wire.go +- Running app.Run() before EnsureBusinessAccounts/SandboxProvisioner provisioning +- Hardcoding a real feature gate here instead of the wired FeatureGateNoopSet +- Adding billing logic to main.go rather than app/common providers + +## Decisions + +- **Startup eagerly provisions ledger business accounts and sandbox app for the default namespace** — The worker must have its accounts and sandbox integration ready before it begins reconciling/invoicing. + +## Example: Post-migrate provisioning before Run() + +``` +if err := app.Migrate(ctx); err != nil { os.Exit(1) } +_, err = app.LedgerAccountResolver.EnsureBusinessAccounts(ctx, app.NamespaceManager.GetDefaultNamespace()) +if err != nil { logger.Error("failed to provision ledger business accounts", "error", err); os.Exit(1) } +err = app.AppRegistry.SandboxProvisioner(ctx, app.NamespaceManager.GetDefaultNamespace()) +if err != nil { os.Exit(1) } +app.Run() +``` + + diff --git a/cmd/jobs/CLAUDE.md b/cmd/jobs/CLAUDE.md new file mode 100644 index 0000000000..7a65106fbe --- /dev/null +++ b/cmd/jobs/CLAUDE.md @@ -0,0 +1,57 @@ +# jobs + + + +> Entrypoint package for the `jobs` CLI binary — a Cobra root command that runs one-off operational jobs (billing advancement/collection/subscriptionsync, ledger account backfill, entitlement snapshot recalculation, llmcost, quickstart, migrate) against a single Wire-built `internal.Application`. main.go owns process lifecycle and command registration only; all job logic lives in subcommand packages. + +## Patterns + +**Cobra root aggregates subcommand packages** — main.go's rootCmd registers each domain subcommand via rootCmd.AddCommand(...), pulling each from its own package (billing.Cmd, ledger.Cmd, llmcost.Cmd, quickstart.Cmd, entitlement.RootCommand(), migrate.RootCommand()). New jobs are added by creating a subpackage and registering it here — never by adding RunE logic in main.go. (`rootCmd.AddCommand(billing.Cmd); rootCmd.AddCommand(ledger.Cmd)`) +**App initialized once in PersistentPreRunE** — The Wire application is built exactly once via internal.InitializeApplication(ctx, configFileName) inside rootCmd.PersistentPreRunE before any subcommand RunE runs. Subcommands read the shared internal.App / internal.Config globals instead of constructing their own DI graph. (`PersistentPreRunE: func(...) error { return internal.InitializeApplication(ctx, configFileName) }`) +**Signal-aware root context** — main() builds ctx via signal.NotifyContext(context.Background(), SIGINT, SIGHUP, SIGTERM) and runs rootCmd.ExecuteContext(ctx); subcommands must propagate this context (cmd.Context()) for cancellation on shutdown. (`ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGHUP, syscall.SIGTERM)`) +**Deferred shutdown + panic logging** — main() defers log.PanicLogger(log.WithExit) first, then a guarded internal.AppShutdown() call (nil-checked because init may fail before it is set). PersistentPreRunE also invokes AppShutdown on init failure. (`defer log.PanicLogger(log.WithExit); defer func(){ if internal.AppShutdown != nil { internal.AppShutdown() } }()`) +**Config via Viper bound to --config flag** — A persistent --config flag (default config.yaml) is bound with viper.BindPFlag and consumed by internal.loadConfig (config.go), which unmarshals into internal.Config and calls Config.Validate(). Job logic never re-reads config files. (`viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | Process entrypoint: builds signal context, defines rootCmd, wires PersistentPreRunE -> internal.InitializeApplication, registers all subcommand trees, runs ExecuteContext. | No RunE/business logic here. SilenceUsage/SilenceErrors are true, so errors are logged manually and os.Exit(1) is called explicitly — keep that contract. | +| `version.go` | Defines `version` subcommand via versionCommand(); prints internal.Version() (version, revision, revisionDate). | Version data comes from internal.Version(), not ldflags read here directly. | +| `internal/` | Holds the Wire application graph (wire.go/wire_gen.go), package-level globals (App, AppShutdown, Config, ConfigFile in globals.go), config loading (config.go), and InitializeApplication (app.go). | App/AppShutdown/Config are nolint:gochecknoglobals mutable package globals; safe to read only after PersistentPreRunE has run. Subcommands must guard nil AppShutdown. | + +## Anti-Patterns + +- Adding job business logic, flags, or service construction in main.go instead of a dedicated subcommand package. +- Building a second Wire application or constructing services directly in a subcommand instead of reading internal.App. +- Forgetting rootCmd.AddCommand(...) for a new subpackage — the command becomes unreachable from the CLI. +- Introducing context.Background() in a subcommand instead of propagating the signal-aware ctx threaded from ExecuteContext. +- Skipping the nil-check on internal.AppShutdown, which can be unset if initialization fails early. + +## Decisions + +- **Initialize the full application once in PersistentPreRunE rather than per-subcommand.** — All operational jobs share the same heavy DI graph (DB, billing, ledger, streaming); building it once at the root avoids duplicated wiring and config parsing across subcommands. +- **Keep main.go a thin Cobra aggregator with no RunE logic.** — Each operational concern (billing, ledger, entitlement, migrate) evolves independently in its own package; the root only owns lifecycle, signals, config flag, and registration. + +## Example: Adding a new operational subcommand to the jobs binary + +``` +import ( + "github.com/spf13/cobra" + "github.com/openmeterio/openmeter/cmd/jobs/internal" +) + +// in your subpackage: +var Cmd = &cobra.Command{ + Use: "myjob", + RunE: func(cmd *cobra.Command, args []string) error { + // internal.App is already built by the root's PersistentPreRunE + return internal.App.SomeService.DoWork(cmd.Context()) + }, +} + +// in cmd/jobs/main.go: +// ... +``` + + diff --git a/cmd/jobs/ledger/backfillaccounts/CLAUDE.md b/cmd/jobs/ledger/backfillaccounts/CLAUDE.md new file mode 100644 index 0000000000..8d4b361142 --- /dev/null +++ b/cmd/jobs/ledger/backfillaccounts/CLAUDE.md @@ -0,0 +1,31 @@ +# backfillaccounts + + + +> Cobra subcommand (`backfill-accounts`) of the `jobs` binary that provisions customer and business ledger accounts for the default namespace. It is the wiring/CLI shell that constructs a concrete ledger account-resolver stack and delegates all logic to `cmd/jobs/ledger/service.Service.Run`. + +## Patterns + +**Cobra command + RunE delegation** — Expose a package-level `var Cmd = &cobra.Command{...}` with flags bound in `init()` and a `RunE` that builds the service, reads `internal.App.NamespaceManager.GetDefaultNamespace()`, calls `service.Run`, prints a summary, and returns a non-nil error when `FailureCount > 0`. (`Cmd.RunE calls newService(), then service.Run(cmd.Context(), ledgerbackfillservice.RunInput{...})`) +**Concrete resolver stack construction (bypass wired DI)** — Build the ledger account stack manually from adapters/services because the wired public account-resolver surface is narrowed and does not expose CreateCustomerAccounts: accountadapter.NewRepo -> accountservice.New(repo, locker) -> resolversadapter.NewRepo -> resolvers.NewAccountResolver(...). (`accountResolver := resolvers.NewAccountResolver(resolvers.AccountResolverConfig{AccountService: accountSvc, Repo: resolverRepo, Locker: locker})`) +**Shared job runtime via internal.App** — Pull EntClient, Logger, and NamespaceManager from the shared `cmd/jobs/internal.App` rather than wiring a new application; construct a fresh `lockr.NewLocker` with `internal.App.Logger`. (`accountRepo := accountadapter.NewRepo(internal.App.EntClient)`) +**RFC3339 flag parsing to UTC pointer** — Parse the `--created-before` string flag with `time.Parse(time.RFC3339, ...)`, normalize to UTC, and pass a `*time.Time` (nil when empty) into RunInput.CreatedBefore. (`parsed = parsed.UTC(); createdBeforeTime = &parsed`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `backfillaccounts.go` | Defines `Cmd`, its flags (created-before, customer-page-size, dry-run, continue-on-error, include-deleted), `newService()` constructor, and `printSummary()`. | newService deliberately constructs the concrete resolver stack rather than using wired DI (the comment explains CreateCustomerAccounts is not on the public surface); do not replace it with the default wired resolver. printSummary is always called even on the error path before returning. | + +## Anti-Patterns + +- Calling lower-level account adapters/services directly from the command instead of going through ledgerbackfillservice.Service.Run. +- Using the wired/narrowed account resolver from DI (it lacks CreateCustomerAccounts) instead of the concrete resolvers.NewAccountResolver stack. +- Defaulting customer-page-size to a literal here instead of ledgerbackfillservice.DefaultCustomerPageSize. +- Swallowing FailureCount: RunE must return an error when output.Result.FailureCount > 0. + +## Decisions + +- **Build the concrete account+resolver stack in newService() instead of relying on Wire DI.** — The public wired account-resolver surface is intentionally narrowed and does not expose CreateCustomerAccounts, which the backfill requires. + + diff --git a/cmd/jobs/ledger/service/CLAUDE.md b/cmd/jobs/ledger/service/CLAUDE.md new file mode 100644 index 0000000000..dd9d1acce0 --- /dev/null +++ b/cmd/jobs/ledger/service/CLAUDE.md @@ -0,0 +1,59 @@ +# service + + + +> Backend service for the ledger account backfill job. `Service.Run` paginates customers in a namespace and ensures business + per-customer ledger accounts exist, supporting dry-run, continue-on-error, created-before cutoff, and include-deleted modes; returns a `NamespaceResult` of counters. + +## Patterns + +**Config-validated service constructor** — `NewService(Config)` validates required dependencies (customerLister, accountProvisioner) via `Config.Validate()` and returns `(*Service, error)`; dependencies are unexported interfaces so tests can inject fakes. (`func NewService(cfg Config) (*Service, error) { if err := cfg.Validate(); err != nil {...} }`) +**Interface-typed collaborators** — `customerLister` and `accountProvisioner` are local interfaces. accountProvisioner exposes Get/Create CustomerAccounts and Get/Ensure BusinessAccounts; the backfillaccounts command satisfies it with the concrete resolver. (`type accountProvisioner interface { CreateCustomerAccounts(ctx, customer.CustomerID) (ledger.CustomerAccounts, error); ... }`) +**Validate + normalize input structs** — RunInput and ListCustomersInput both have `Validate() error`; RunInput also has `normalized()` that applies DefaultCustomerPageSize and forces CreatedBefore to UTC before use. (`input := in.normalized(); result, err := s.runNamespace(ctx, input, input.Namespace)`) +**Cursor pagination with MAX_SAFE_ITER guard** — runNamespace loops up to paginationv2.MAX_SAFE_ITER, calling customerLister.ListCustomers with a *paginationv2.Cursor; breaks when items empty or NextCursor is nil, and records a paginate_customers failure if the loop never completes. (`for iter := 0; iter < paginationv2.MAX_SAFE_ITER; iter++ { ... cursor = res.NextCursor }`) +**Missing-account detection via ValidationIssue codes** — ensureBusiness/CustomerAccounts call Get first; only ErrCodeBusinessAccountMissing / ErrCodeCustomerAccountMissing (matched by hasValidationIssueCode using models.AsValidationIssues) trigger provisioning. Any other error is a recorded failure. (`if !hasValidationIssueCode(err, ledger.ErrCodeCustomerAccountMissing) { return s.recordFailure(...) }`) +**Counter accumulation + recordFailure** — All outcomes mutate a *NamespaceResult counter (BusinessProvisioned, CustomersWouldProvision, etc.). recordFailure increments FailureCount, logs a warn with namespace/stage/customer_id, and returns a stage-wrapped error. (`result.CustomersProvisioned++`) +**DryRun short-circuits writes** — When input.DryRun is set, ensure* increments the *WouldProvision counter and returns before calling EnsureBusinessAccounts / CreateCustomerAccounts. (`if input.DryRun { result.CustomersWouldProvision++; return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Core service: Config/RunInput/RunOutput/NamespaceResult types, NewService, Run -> runNamespace -> ensureBusinessAccounts/ensureCustomerAccounts, hasValidationIssueCode, recordFailure. | Get-before-provision relies on ledger missing-account validation codes; a non-validation error must NOT be treated as 'missing'. ContinueOnError returns (result, nil) at the Run level even on failures, so callers must inspect FailureCount. | +| `customer_lister_ent.go` | EntCustomerLister implementing customerLister via entClient.Customer.Query with namespace filter, optional deleted/created-before filters, and Cursor pagination. | Soft-delete filtering uses DeletedAtIsNil OR DeletedAtGTE(now) (clock.Now().UTC()); CreatedBefore uses CreatedAtLT with UTC. Nil items from paged.Items are skipped. | +| `service_test.go` | Table-style tests using fakeCustomerLister and fakeAccountProvisioner to cover dry-run, multi-page cursoring, created-before cutoff, and continue-on-error. | Fakes emit ledger.ErrCustomerAccountMissing/ErrBusinessAccountMissing.WithAttrs to drive the provisioning branch; tests use t.Context() and newCustomer() built from models.NewManagedResource. | + +## Anti-Patterns + +- Treating any error from GetCustomerAccounts/GetBusinessAccounts as 'missing' instead of matching the specific validation issue code. +- Writing accounts while DryRun is set, or incrementing provisioned counters in dry-run mode. +- Removing the MAX_SAFE_ITER bound or breaking the cursor advance, risking an infinite pagination loop. +- Returning early on the first customer failure when ContinueOnError is requested (Run/runNamespace must keep going and only accumulate FailureCount). +- Using time without UTC normalization for CreatedBefore / cursor comparisons. + +## Decisions + +- **Detect missing accounts by inspecting validation issue codes on the Get error rather than a sentinel boolean.** — Reuses the ledger package's structured ErrCode* validation errors so provisioning only triggers on a genuine 'account missing' condition, not transient/db errors. +- **Counters are accumulated into NamespaceResult and surfaced via RunOutput even on error.** — Operational job needs a printable summary of scanned/provisioned/failed customers regardless of whether the run aborted or continued on error. + +## Example: Ensure a single customer's ledger accounts (get-then-provision with dry-run + validation-code gating) + +``` +func (s *Service) ensureCustomerAccounts(ctx context.Context, input RunInput, result *NamespaceResult, customerID customer.CustomerID) error { + _, err := s.accountProvisioner.GetCustomerAccounts(ctx, customerID) + if err == nil { + result.CustomersAlreadyProvisioned++ + return nil + } + if !hasValidationIssueCode(err, ledger.ErrCodeCustomerAccountMissing) { + return s.recordFailure(result, "get_customer_accounts", customerID.ID, err) + } + if input.DryRun { + result.CustomersWouldProvision++ + return nil + } + if _, err = s.accountProvisioner.CreateCustomerAccounts(ctx, customerID); err != nil { + return s.recordFailure(result, "create_customer_accounts", customerID.ID, err) +// ... +``` + + diff --git a/cmd/notification-service/CLAUDE.md b/cmd/notification-service/CLAUDE.md new file mode 100644 index 0000000000..888a07b351 --- /dev/null +++ b/cmd/notification-service/CLAUDE.md @@ -0,0 +1,34 @@ +# notification-service + + + +> main.go entrypoint for the notification-service binary, which consumes notification system events from Kafka and delivers them. Unlike the mixin-driven workers, main() builds the run.Group and notification consumer by hand from a partial Wire Application. + +## Patterns + +**Hand-built run.Group** — main() constructs a watermillkafka.Subscriber, builds consumer.Options with router.Options, calls consumer.New, then assembles run.Group (telemetry server, consumer, SignalHandler) and group.Run(run.WithReverseShutdownOrder()) directly rather than via common.Runner. (`notificationConsumer, err := consumer.New(consumerOptions)`) +**Application provides building blocks not lifecycle** — Application exposes BrokerOptions, MessagePublisher, EventPublisher, Notification, Meter, Tracer, TelemetryServer for main() to wire the consumer manually; still embeds GlobalInitializer/Migrator. (`app.BrokerOptions, app.MessagePublisher, app.EventPublisher.Marshaler(), app.Notification`) +**Consumer wired to system events topic** — consumer.Options.SystemEventsTopic = conf.Events.SystemEvents.Topic; ConsumerGroupName from conf.Notification.Consumer.ConsumerGroupName. (`SystemEventsTopic: conf.Events.SystemEvents.Topic`) +**Shared config bootstrap + panic funnel** — Identical viper/pflag config load, conf.Validate(), defer log.PanicLogger(log.WithExit), and Migrate before running. (`defer log.PanicLogger(log.WithExit)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | Bootstrap, build Kafka subscriber + notification consumer, run telemetry + consumer in a run.Group. | Subscriber/consumer are constructed in main, not Wire; group.Run uses run.WithReverseShutdownOrder() so add components in dependency order. | +| `wire.go` | Provider list producing the Application building blocks (notification, meter, streaming, eventbus, watermill kafka driver). | Application here is a provider container, not a Runner; lifecycle is owned by main.go. | +| `wire_gen.go` | Generated injector; DO NOT EDIT. | Regenerate via make generate after provider changes. | +| `version.go` | ldflags version metadata. | Identical to other binaries. | + +## Anti-Patterns + +- Editing wire_gen.go instead of wire.go +- Adding new run.Group members without preserving reverse-shutdown ordering +- Putting delivery/consumer logic in main.go instead of openmeter/notification/consumer +- Skipping app.Migrate(ctx) before starting the consumer + +## Decisions + +- **The consumer and run.Group are assembled in main.go rather than via common.Runner** — Notification delivery needs explicit control over the Kafka subscriber, marshaler, and shutdown ordering of telemetry vs consumer. + + diff --git a/cmd/server/CLAUDE.md b/cmd/server/CLAUDE.md new file mode 100644 index 0000000000..4c295a8d1b --- /dev/null +++ b/cmd/server/CLAUDE.md @@ -0,0 +1,46 @@ +# server + + + +> main.go entrypoint and DI bootstrap for the primary API server binary. Builds the full Application via Wire, migrates the DB, registers namespace handlers, provisions defaults, then serves the HTTP API + telemetry + notification event handler via an oklog/run group. + +## Patterns + +**Migrate then register handlers then initNamespace** — Order is fixed: app.Migrate(ctx) -> RegisterHandler(LedgerNamespaceHandler, KafkaIngestNamespaceHandler, TaxCodeNamespaceHandler) -> initNamespace(manager) -> SandboxProvisioner -> ProvisionDefaultBillingProfile -> MeterConfigInitializer. New handlers that must provision the default namespace MUST be registered before initNamespace. (`app.NamespaceManager.RegisterHandler(app.LedgerNamespaceHandler)`) +**Router config assembled from Application fields** — server.NewServer(&server.Config{RouterConfig: router.Config{...}}) maps ~40 app services (Billing, Customer, Plan, Subscription, Entitlement*, Charge via app.BillingRegistry.ChargesServiceOrNil(), FeatureGate, etc.) into the router. (`ChargeService: app.BillingRegistry.ChargesServiceOrNil()`) +**Debug connector wraps streaming** — debugConnector := debug.NewDebugConnector(app.StreamingConnector) is created and passed as RouterConfig.DebugConnector. (`debugConnector := debug.NewDebugConnector(app.StreamingConnector)`) +**Multi-actor run.Group** — group.Add for telemetry server, kafkaingest.KafkaProducerGroup, the API http.Server (timeouts from conf.Server), NotificationEventHandler, termination checker, and SignalHandler; group.Run(run.WithReverseShutdownOrder()). (`group.Add(kafkaingest.KafkaProducerGroup(ctx, app.KafkaProducer, logger, app.KafkaMetrics))`) +**Shared config bootstrap + panic funnel** — Same viper/pflag/DecodeHook load, conf.Validate(), defer log.PanicLogger(log.WithExit) as the workers. (`defer log.PanicLogger(log.WithExit)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | Full server lifecycle: config, build app, migrate, register namespace handlers, provision defaults, mount router + /version, run actors. | Namespace handlers must be registered BEFORE initNamespace; SandboxProvisioner/ProvisionDefaultBillingProfile/MeterConfigInitializer run after the namespace exists. | +| `wire.go` | Largest provider list (billing, ledger, customer, productcatalog, portal, ingest, notification, secret, registry, taxcode, feature gate, ...). | Adding a router dependency means wiring its provider here AND adding the field to router.Config in main.go. | +| `wire_gen.go` | Generated full-application injector; DO NOT EDIT. | Regenerate via make generate; do not reorder generated cleanup chains. | +| `version.go` | ldflags version metadata; also served by the /version endpoint with runtime.GOOS/GOARCH. | Identical init() to other binaries. | + +## Anti-Patterns + +- Registering a namespace handler after initNamespace when it must provision the default namespace +- Editing wire_gen.go instead of wire.go +- Adding a router service without both a Wire provider and a router.Config field +- Calling provisioning steps before app.Migrate(ctx) +- Adding actors to the run.Group that break reverse-shutdown ordering + +## Decisions + +- **DB migration runs before default-namespace provisioning** — Namespace handlers and default-account/sandbox/billing-profile provisioning write rows that require the migrated schema. +- **All HTTP/telemetry/Kafka/notification actors run under one oklog/run group with reverse shutdown** — Coordinated graceful shutdown: dependents stop before their dependencies (e.g. API before Kafka producer). + +## Example: Register namespace handlers before creating the default namespace + +``` +if err := app.Migrate(ctx); err != nil { os.Exit(1) } +if err = app.NamespaceManager.RegisterHandler(app.LedgerNamespaceHandler); err != nil { os.Exit(1) } +if err = app.NamespaceManager.RegisterHandler(app.KafkaIngestNamespaceHandler); err != nil { os.Exit(1) } +if err = initNamespace(app.NamespaceManager, logger); err != nil { os.Exit(1) } +``` + + diff --git a/cmd/sink-worker/CLAUDE.md b/cmd/sink-worker/CLAUDE.md new file mode 100644 index 0000000000..7caea8a738 --- /dev/null +++ b/cmd/sink-worker/CLAUDE.md @@ -0,0 +1,35 @@ +# sink-worker + + + +> main.go entrypoint for the sink-worker binary, which sinks Kafka usage events into ClickHouse. Builds a lean Wire Application (no Migrator/Runner mixins) and runs app.Sink plus the telemetry server in a hand-built run.Group. + +## Patterns + +**Cancelable root context** — Unlike the other binaries, main() uses ctx, cancel := context.WithCancel(context.Background()) with defer cancel(), passed into Sink.Run(ctx). (`ctx, cancel := context.WithCancel(context.Background()); defer cancel()`) +**Minimal Application, no DB migration** — Application embeds only common.GlobalInitializer and exposes Sink, Streaming, TopicProvisioner, TopicResolver, FlushHandler, TelemetryServer; there is no Migrate step before running. (`Sink *sink.Sink; FlushHandler flushhandler.FlushEventHandler`) +**Sink + telemetry run.Group** — group.Add(app.Sink.Run/Close), group.Add(TelemetryServer.ListenAndServe/Shutdown), SignalHandler; group.Run(run.WithReverseShutdownOrder()) with lo.ErrorsAs[*run.SignalError] for signal detection. (`group.Add(func() error { return app.Sink.Run(ctx) }, func(err error) { _ = app.Sink.Close() })`) +**Wire provider subset for sinking** — wire.Build uses FieldsOf(...,"Sink"), common.Sink, common.SinkWorkerProvisionTopics, common.KafkaNamespaceResolver, common.WatermillNoPublisher (publisher-less), common.Streaming. (`common.WatermillNoPublisher`) +**Local NewLogger helper** — A binary-local NewLogger builds a slogmulti pipe with otelslog middleware (marked TODO: use the primary logger). (`slogmulti.Pipe(otelslog.ResourceMiddleware(res), otelslog.NewHandler)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | Bootstrap, run Sink + telemetry server in run.Group; exits non-zero on non-signal/non-ErrServerClosed errors. | No app.Migrate call here; ctx is cancelable and feeds Sink.Run, so propagate it rather than context.Background(). | +| `wire.go` | Sink provider subset + local metadata/NewLogger helpers. | common.WatermillNoPublisher is intentional (sink only consumes); do not swap in a publisher provider. | +| `wire_gen.go` | Generated injector; DO NOT EDIT. | Regenerate via make generate. | +| `version.go` | ldflags version metadata. | Identical to other binaries. | + +## Anti-Patterns + +- Editing wire_gen.go instead of wire.go +- Adding a Migrator/Runner mixin or DB migration step the sink does not need +- Replacing context.WithCancel root ctx with context.Background() +- Wiring a Watermill publisher into a consume-only sink + +## Decisions + +- **sink-worker omits the Migrator and uses a cancelable context** — It only sinks events into ClickHouse and owns no Postgres schema; an explicit cancelable ctx drives clean Sink shutdown. + + diff --git a/collector/benthos/services/leaderelection/CLAUDE.md b/collector/benthos/services/leaderelection/CLAUDE.md new file mode 100644 index 0000000000..916f7ec1cc --- /dev/null +++ b/collector/benthos/services/leaderelection/CLAUDE.md @@ -0,0 +1,48 @@ +# leaderelection + + + +> Kubernetes-based leader-election service for the standalone Benthos/Redpanda Connect collector binary. Exposes CLI flags and a Benthos CLIOpt that lets exactly one collector instance act as leader (e.g. so only the leader runs singleton inputs/jobs), tracking leadership via the Benthos Resources generic store. + +## Patterns + +**Wire leadership into Benthos via CLIOptFunc** — Leadership is integrated by returning []service.CLIOptFunc from GetLeaderElectionCLIOpts: CLIOptCustomRunFlags registers leaderElectionCLIFlags and parses them into a Config, then CLIOptOnConfigParse constructs NewService and starts it. Add new collector-wide leadership wiring here, not in input/output plugins. (`service.CLIOptCustomRunFlags(leaderElectionCLIFlags, func(ctx *cli.Context) error { leaderElectionConfig = Config{Enabled: ctx.Bool(leaderElectionEnabledFlag), ...}; return nil })`) +**Leadership state lives in Resources generic store** — Leader status is published with res.SetGeneric(IsLeaderKey, true/false) in the LeaderCallbacks and read with res.GetGeneric(IsLeaderKey). IsLeaderKey is a typed genericKey constant. Consumers must call IsLeader(res) rather than reading the generic key directly. (`OnStartedLeading: func(ctx context.Context){ res.SetGeneric(IsLeaderKey, true) }`) +**Fail-open IsLeader semantics** — IsLeader(res) returns true when IsLeaderKey is absent (leader election disabled => everyone is leader), and false when present-but-not-a-bool. Preserve this fail-open-when-unset / fail-closed-when-corrupt contract so disabling leader election doesn't silently stop all processing. (`leader, ok := res.GetGeneric(IsLeaderKey); if !ok { return true }`) +**Flags carry env-var fallbacks and K8s downward-API defaults** — Every cli.Flag in leaderElectionCLIFlags sets EnvVars (e.g. LEASE_LOCK_NAMESPACE plus K8S_* downward-API names) and durations have sane defaults (LeaseDuration 15s, RenewDeadline 10s, RetryPeriod 2s). Identity defaults to os.Hostname(). New flags must follow the same EnvVars + Value convention. (`&cli.StringFlag{Name: leaseLockIdentityFlag, EnvVars: []string{"K8S_POD_NAME", "LEASE_LOCK_IDENTITY"}, Value: hostname}`) +**Self-healing run loop with cancel guard** — Start() launches a goroutine that recreates a NewLeaderElector and calls le.Run(ctx) in a for-loop, retrying after LeaseRetryPeriod unless ctx is cancelled. mu + started guard against double-start; Stop() calls s.cancel(). ReleaseOnCancel is true so leadership is released on shutdown. (`for { le, _ := leaderelection.NewLeaderElector(*s.leaderElectionConfig); le.Run(ctx); if ctx.Err() != nil { return } ... }`) +**Validate required lock fields only when enabled** — In CLIOptOnConfigParse the service short-circuits when !Enabled; when enabled it requires LeaseLockNamespace and LeaseLockName before constructing the service. Keep validation gated on Enabled so disabled deployments don't need K8s config. (`if !leaderElectionConfig.Enabled { return nil }; if leaderElectionConfig.LeaseLockNamespace == "" { return fmt.Errorf(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines Config, Service, NewService (builds K8s client + LeaseLock + LeaderElectionConfig), Start/Stop, the GetLeaderElectionCLIOpts entrypoint, and the IsLeader(res) helper. | NewService reads kubeconfig via controller-runtime config.GetConfig() and routes klog through logging.SetupKlog(logger) — it only works in-cluster or with a valid kubeconfig. LeaseHealthCheckTimeout==0 is auto-set to LeaseDuration*1.5. Don't read IsLeaderKey directly; use IsLeader. | +| `flags.go` | Declares the leaderElection* flag-name constants, the hostname default, and leaderElectionCLIFlags ([]cli.Flag) consumed by CLIOptCustomRunFlags. | Flag names are string constants used in both files — keep flags.go constants and service.go ctx.Bool/String/Duration lookups in sync. hostname is captured once at package init via os.Hostname(). | + +## Anti-Patterns + +- Reading res.GetGeneric(IsLeaderKey) directly instead of calling IsLeader(res), losing the fail-open-when-unset semantics. +- Calling le.Run / NewLeaderElector outside the guarded Start() goroutine, bypassing the mu/started double-start guard and retry loop. +- Adding a flag without EnvVars and a default Value, breaking the K8s downward-API / env-driven deployment convention. +- Setting ReleaseOnCancel=false or removing s.cancel() in Stop(), which leaves the lease held after shutdown and blocks failover. +- Importing this package into root-module code — it belongs to the independent collector go.mod and pulls in k8s.io/client-go. + +## Decisions + +- **Leadership is exposed through the Benthos Resources generic store (SetGeneric/GetGeneric) rather than a shared Go variable.** — Lets Benthos plugins (input/output/bloblang) in other packages query leadership via *service.Resources without a direct import dependency on this service. +- **Integration is via service.CLIOptFunc (CLIOptCustomRunFlags + CLIOptOnConfigParse) instead of a Benthos processor/plugin.** — Leader election is a process-wide concern parsed once at CLI startup, so it hooks the Redpanda Connect CLI lifecycle rather than per-stream config. +- **IsLeader fails open (returns true) when the generic key is unset.** — When leader election is disabled the collector must still process events, so absence of leadership state means 'act as leader'. + +## Example: Gating singleton work on leadership inside a Benthos plugin + +``` +import "github.com/openmeterio/openmeter/collector/benthos/services/leaderelection" + +if !leaderelection.IsLeader(res) { + // not the leader (and leader election is enabled): skip singleton work + return nil +} +``` + + diff --git a/collector/quickstart/collector/resources/CLAUDE.md b/collector/quickstart/collector/resources/CLAUDE.md new file mode 100644 index 0000000000..6d49a545cb --- /dev/null +++ b/collector/quickstart/collector/resources/CLAUDE.md @@ -0,0 +1,30 @@ +# resources + + + +> Benthos/Redpanda Connect shared resource definitions for the quickstart collector — currently holds only the in-memory dedupe cache that the events ingestion stream references by label. Loaded by the Benthos CLI alongside the stream configs as part of the quickstart docker-compose stack. + +## Patterns + +**Resources declared, not inlined** — Reusable Benthos components live here as labeled top-level resources (cache_resources, rate_limit_resources, etc.) so streams can reference them by label rather than redefining them inline. (`cache_resources: + - label: dedupe_cache + memory: + default_ttl: 1h`) +**Label is the cross-file contract** — The `label` value is the only handle a stream has to a resource. The label `dedupe_cache` here must exactly match the `cache:` reference in streams/input.yaml's dedupe processor. (`label: dedupe_cache # referenced as cache: "dedupe_cache" in input.yaml`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `dedupe-cache.yaml` | Defines the `dedupe_cache` memory cache (1h TTL) used by the input stream's dedupe processor to drop duplicate CloudEvents by xxhash64 content hash. | Memory cache is per-process and non-durable — restarts lose dedupe state, and it does not work across horizontally-scaled collector replicas. Renaming the label silently breaks the input stream's dedupe step. TTL bounds the dedupe window. | + +## Anti-Patterns + +- Renaming the `dedupe_cache` label without updating the `cache:` reference in streams/input.yaml — the dedupe processor will fail to resolve the cache. +- Assuming the memory cache provides durable or cluster-wide dedupe — it is process-local and cleared on restart. + +## Decisions + +- **Dedupe cache kept as a shared resource rather than inlined in the stream.** — Benthos resources are referenced by label across stream files, keeping cache config in one place and reusable by multiple processors. + + diff --git a/collector/quickstart/collector/streams/CLAUDE.md b/collector/quickstart/collector/streams/CLAUDE.md new file mode 100644 index 0000000000..8cd1a248c2 --- /dev/null +++ b/collector/quickstart/collector/streams/CLAUDE.md @@ -0,0 +1,74 @@ +# streams + + + +> Benthos/Redpanda Connect stream pipelines that form the quickstart collector's ingestion path: input.yaml exposes an HTTP CloudEvents endpoint that validates/dedupes events, output.yaml buffers them and ships to OpenMeter. The two streams are wired together via the `openmeter` inproc channel. + +## Patterns + +**Two streams bridged by inproc channel** — input.yaml's output writes to `inproc: openmeter`; output.yaml's input reads from `inproc: openmeter`. The named inproc channel is the contract between the ingestion and delivery streams — both names must match. (`# input.yaml output +- inproc: openmeter +# output.yaml input +input: + inproc: openmeter`) +**Content-Type switch for CloudEvents formats** — Incoming requests are routed by a `switch` processor on `meta("Content-Type")`: `application/cloudevents-batch+json` is unarchived from a json_array, `application/cloudevents+json` passes through, anything else returns an RFC7807-style 400. (`- check: meta("Content-Type").lowercase() == "application/cloudevents-batch+json" + processors: + - unarchive: + format: json_array`) +**RFC7807 error responses via mapping + sync_response** — Validation failures build an about:blank problem-details JSON root, set `meta http_response_status` to 400, emit a sync_response, then `root = deleted()` to drop the message from the pipeline. (`meta http_response_status = "400" +root = {"type":"about:blank","title":"Bad Request","status":400,"detail":...}`) +**Schema validation with catch** — A json_schema processor validates against file://./cloudevents.spec.json; a following `catch` block converts any schema error into a 400 problem-details sync_response and deletes the message. (`- json_schema: + schema_path: "file://./cloudevents.spec.json" +- catch: + - mapping: meta http_response_status = "400"`) +**Durable SQLite buffer before delivery** — output.yaml inserts a `buffer: sqlite` at /var/lib/collector/buffer.sqlite (with a split post_processor) so accepted events survive collector restarts before reaching the openmeter output. (`buffer: + sqlite: + path: /var/lib/collector/buffer.sqlite`) +**Env-driven output config** — The openmeter output URL/token/batching are parameterized via ${OPENMETER_URL:...}, ${OPENMETER_TOKEN:}, ${BATCH_SIZE:1}, ${BATCH_PERIOD:30s}; a DEBUG_INPUT switch case can tee events to stdout. (`output: + openmeter: + url: "${OPENMETER_URL:https://openmeter.cloud}" + token: "${OPENMETER_TOKEN:}"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `input.yaml` | HTTP CloudEvents ingestion stream: http_server on :8889 path /api/v1/events, Content-Type routing, dedupe, json_schema validation, then fan-out to inproc `openmeter` with a null sync_response (204). | Relies on `dedupe_cache` resource (resources/dedupe-cache.yaml) and a `cloudevents.spec.json` file resolved relative to the working dir. The fan_out broker order matters: sync_response is sent before inproc delivery. http_response_status meta defaults to 204 on success. | +| `output.yaml` | Delivery stream: reads inproc `openmeter`, buffers to durable SQLite, batches, and posts to the OpenMeter ingest endpoint using the custom `openmeter` output plugin. | The `openmeter` output is a custom Benthos plugin registered by the collector binary, not a stock Benthos output — it only resolves when running the OpenMeter collector build. Buffer path must be a writable mounted volume in docker-compose. Empty OPENMETER_TOKEN default means auth must be supplied via env. | + +## Anti-Patterns + +- Changing the inproc channel name in one stream but not the other — events silently stop flowing between input.yaml and output.yaml. +- Removing the `cache:` dedupe reference or renaming the cache without updating resources/dedupe-cache.yaml. +- Assuming `output: openmeter` is a stock Benthos output — it is a custom collector plugin and won't exist in a vanilla Benthos/Connect binary. +- Pointing the SQLite buffer at a non-persistent path, defeating the at-least-once durability the buffer provides across restarts. +- Returning bare error strings instead of the RFC7807 problem-details shape the existing error mappings produce. + +## Decisions + +- **Ingestion and delivery split into two streams joined by an inproc channel.** — Decouples synchronous HTTP request handling (validate + ack fast with 204) from durable, batched, retryable delivery to OpenMeter, so the HTTP caller is not blocked on upstream availability. +- **Durable SQLite buffer sits between the two streams.** — Provides at-least-once delivery: accepted events are persisted locally and survive collector restarts before being batched to the OpenMeter API. +- **Validation errors are returned as RFC7807 problem-details with explicit http_response_status meta.** — Matches OpenMeter's API error contract so clients posting CloudEvents get consistent, parseable Bad Request responses. + +## Example: Add a new Content-Type branch or validation step to the ingestion pipeline + +``` +pipeline: + processors: + - switch: + - check: meta("Content-Type").lowercase() == "application/cloudevents+json" + processors: + - noop: {} + - check: "" + processors: + - mapping: | + meta http_response_status = "400" + root = {"type":"about:blank","title":"Bad Request","status":400, + "detail":"unexpected Content-Type %s".format(meta("Content-Type"))} + - sync_response: {} + - mapping: "root = deleted()" + - dedupe: +// ... +``` + + diff --git a/collector/quickstart/seeder/CLAUDE.md b/collector/quickstart/seeder/CLAUDE.md new file mode 100644 index 0000000000..ea3c89b455 --- /dev/null +++ b/collector/quickstart/seeder/CLAUDE.md @@ -0,0 +1,32 @@ +# seeder + + + +> Benthos (Redpanda Connect) stream config that generates synthetic CloudEvents usage data and POSTs them into OpenMeter for the quickstart demo. It is data/config only — no Go code; the behavior is entirely driven by the `benthos-collector` image consuming this `config.yaml`. + +## Patterns + +**Env-var-parameterized Benthos config** — Every tunable knob uses the `${VAR:default}` interpolation form so the same config works across compose/CI without edits. Counts, intervals, target URL, token, and logging are all env-driven. (`count: ${SEEDER_COUNT:0}; url: ${OPENMETER_URL:http://127.0.0.1:8888}/api/v1/events`) +**generate input + bloblang mapping emits CloudEvents** — The `generate` input's `mapping` Bloblang builds a CloudEvents 1.0 envelope into `root` with id/specversion/type/source/subject/time/data. New event shapes must keep the CloudEvents envelope fields intact. (`root = { "id": uuid_v4(), "specversion": "1.0", "type": $event_type, "source": $source, ... }`) +**switch output with continue-through HTTP + optional stdout** — Output is a `switch` whose first case (`check: ""`, `continue: true`) always POSTs to the events endpoint as `application/cloudevents+json`; a second case logs to stdout only when `SEEDER_LOG=true`. (`check: '"${SEEDER_LOG:false}" == "true"' -> stdout: { codec: lines }`) +**Backdated, bounded-random event fields** — `time` is randomized within the last 3 days (`ts_sub_iso8601("P3D")` + random seconds); `subject` is `customer-%d` modulo `SEEDER_MAX_SUBJECTS`. Keep new randomized fields seeded with `timestamp_unix_nano()` to avoid identical batches. (`let subject = "customer-%d".format(random_int(seed: timestamp_unix_nano()) % $max_subjects)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `config.yaml` | Whole-folder Benthos stream definition: http server on :4196 (matches the compose healthcheck `/ready`), generate input, output switch to the OpenMeter events API. | The HTTP port 4196 and `OPENMETER_URL` must stay aligned with collector/quickstart/docker-compose.yaml (seeder healthcheck hits :4196, and compose points OPENMETER_URL at the collector's :8889 ingest, not 8888). `max_in_flight: 1` serializes posts — raising it changes ingest ordering/load. | + +## Anti-Patterns + +- Hardcoding the OpenMeter URL, token, count, or interval instead of using `${VAR:default}` — breaks the env-driven compose/CI wiring. +- Changing the HTTP `address` port without updating the compose seeder healthcheck/port mapping (4196). +- Dropping required CloudEvents envelope fields (id/specversion/type/source/subject/time) — OpenMeter ingest expects valid CloudEvents. +- Sending a non-`application/cloudevents+json` Content-Type to /api/v1/events. + +## Decisions + +- **Use a second copy of the benthos-collector image (not custom Go) as the seeder.** — The quickstart only needs synthetic load; reusing the published image with a generate input avoids shipping a separate seeding binary. +- **Backdate event times across a 3-day window.** — Gives the quickstart dashboards/meters non-trivial historical data immediately rather than only live events. + + diff --git a/deploy/charts/CLAUDE.md b/deploy/charts/CLAUDE.md new file mode 100644 index 0000000000..826ef43a5d --- /dev/null +++ b/deploy/charts/CLAUDE.md @@ -0,0 +1,41 @@ +# charts + + + +> Organisational root for OpenMeter's Helm distribution. Holds two independent charts — the full `openmeter` platform install and the lightweight `benthos-collector` sidecar — plus the shared helm-docs tooling (Makefile + template.md) that regenerates every chart README from its values.yaml comments. + +## Patterns + +**Generated READMEs via helm-docs** — Chart READMEs are never hand-written; `make docs` runs helm-docs with the shared `template.md` plus each chart's `README.tmpl.md`. Edit the template files and values.yaml `# --` comments, then regenerate. (`make docs # helm-docs -s file -c . -t $PWD/template.md -t README.tmpl.md`) +**Shared badge/TL;DR template partials** — template.md defines reusable helm-docs partials (`chart.versionBadge`, `chart.artifactHubBadge`, `tldr`, `chart.base`) that every chart README inherits, so per-chart README.tmpl.md only supplies chart-specific prose. (`{{- define "tldr" -}} helm install --generate-name --wait oci://ghcr.io/openmeterio/helm-charts/{{ .Name }} {{- end -}}`) +**Charts published as OCI artifacts** — Both charts are distributed via `oci://ghcr.io/openmeterio/helm-charts/` and indexed on artifacthub.io/packages/helm/openmeter/; install snippets and badge URLs derive from `.Name`. (`[![artifact hub](.../artifact%20hub-{{ .Name | replace "-" "--" }}-...)](https://artifacthub.io/packages/helm/openmeter/{{ .Name }})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `Makefile` | Single `docs` target that drives helm-docs across all charts using `-s file` (sort values by source order), `-c .` (this dir), the shared `template.md`, and each chart's `README.tmpl.md`. | Only sanctioned way to regenerate READMEs; running helm-docs without these flags reorders the values table and drops the shared badges. | +| `template.md` | helm-docs partial library: badge definitions (type/kube/appVersion/version/artifactHub), the `tldr` install block, and the `chart.base`/`chart.baseHead` composition that assembles each README. | Renaming a `define` here silently breaks every chart README referencing it; the OCI registry path `ghcr.io/openmeterio/helm-charts` is hardcoded in the `tldr` partial. | + +## Anti-Patterns + +- Editing any chart's README.md by hand — it is overwritten on the next `make docs` from template.md + README.tmpl.md + values.yaml comments. +- Adding a third chart without giving it a README.tmpl.md and re-running `make docs`, leaving it undocumented. +- Forking the badge/TL;DR markup into a per-chart template instead of reusing the shared `template.md` partials. +- Hardcoding a different OCI registry in a chart README instead of relying on the `tldr` partial's `ghcr.io/openmeterio/helm-charts/{{ .Name }}` path. + +## Decisions + +- **Two separate charts (openmeter, benthos-collector) rather than one umbrella chart with a toggle.** — The collector is an independently-deployed StatefulSet sidecar with its own lifecycle and a much smaller values contract; coupling it to the full platform chart would force unrelated upgrades. +- **Documentation is generated, with shared markup centralised in template.md.** — Keeps version/type/artifacthub badges and the install TL;DR identical across charts and keeps the values table in sync with the actual values.yaml `# --` comments. + +## Example: Regenerate all chart READMEs after editing values.yaml documentation comments + +``` +# from deploy/charts +make docs +# == helm-docs --log-level trace -s file -c . -t $PWD/template.md -t README.tmpl.md +# reads each chart's values.yaml `# --` comments + README.tmpl.md, applies template.md partials +``` + + diff --git a/deploy/charts/benthos-collector/templates/CLAUDE.md b/deploy/charts/benthos-collector/templates/CLAUDE.md new file mode 100644 index 0000000000..c3434a00d3 --- /dev/null +++ b/deploy/charts/benthos-collector/templates/CLAUDE.md @@ -0,0 +1,62 @@ +# templates + + + +> Helm chart templates for the benthos-collector sidecar — a Benthos-based usage collector that ships events to OpenMeter. Renders the full Kubernetes object set (StatefulSet, Service, RBAC, Secrets, ServiceAccount, ConfigMap) from values.yaml. + +## Patterns + +**Named-template naming via _helpers.tpl** — All names/labels are produced by `benthos-collector.*` defines (name, fullname, chart, labels, selectorLabels, serviceAccountName, componentName, storageClass, args). Object templates must call these through `include`, never hardcode names. (`name: {{ include "benthos-collector.fullname" . }}`) +**Standard label block on every metadata** — Every resource attaches `{{- include "benthos-collector.labels" . | nindent 4 }}` under metadata.labels; selectors use the narrower `benthos-collector.selectorLabels`. Adding a resource without the labels include breaks helm-managed-by/version conventions. (`labels: + {{- include "benthos-collector.labels" . | nindent 4 }}`) +**Conditional resources gated on .Values toggles** — Resources guard their entire body with feature flags: `service.enabled`, `serviceAccount.create`, `rbac.create`, `len .Values.caRootCertificates`, `storage.enabled`. New optional resources must follow the same `{{- if ... -}} ... {{- end }}` wrapping. (`{{- if .Values.service.enabled }} +... +{{- end }}`) +**Config delivered via mutually-exclusive args resolver** — `benthos-collector.args` requires exactly one of `config`, `configFile`, or `preset` and calls `fail` otherwise. Presets are an explicit allowlist (`http-server`, `kubernetes-pod-exec-time`). New presets must be added to this template's if/else chain. (`args: {{ include "benthos-collector.args" . }}`) +**Checksum-triggered pod rollout** — statefulset.yaml stamps `checksum/config` and `checksum/secret` from `sha256sum` of the rendered values so config/secret changes force a pod restart. Preserve these annotations when editing the pod template. (`checksum/config: {{ .Values.config | toYaml | sha256sum }}`) +**Component-scoped secondary names** — The config Secret and its volume mount use `benthos-collector.componentName` (list . "config") to derive a DNS-safe suffixed name truncated to fit 63 chars. Use this helper for any per-component object, not raw printf. (`name: {{ include "benthos-collector.componentName" (list . "config") }}`) +**Secret-backed env and config volume** — OPENMETER_URL/OPENMETER_TOKEN are base64'd into the main Secret and injected via `envFrom.secretRef`; benthos config.yaml is base64'd into the config Secret and mounted read-only at /etc/benthos/config.yaml. Sensitive values flow through Secrets, never plain env. (`envFrom: + - secretRef: + name: {{ include "benthos-collector.fullname" . }}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `_helpers.tpl` | Defines all reusable named templates (naming, labels, serviceAccountName, componentName, storageClass, args). Single source of truth for names. | `componentName` truncates fullname to `62 - len(component)`; long release names silently lose characters. `args` and `storageClass` embed business logic (preset allowlist, storageClassName rendering) — edit here, not in object templates. | +| `statefulset.yaml` | Primary workload. Defines container command `/entrypoint.sh /usr/local/bin/benthos`, metrics port 4195, optional http port 8080, leader-election env, volumes, and optional volumeClaimTemplates. | livenessProbe/readinessProbe hit /ping and /ready on the `metrics` port (4195), not the http port. http port only exists when `service.enabled`. Removing checksum annotations disables auto-rollout on config change. | +| `secret.yaml` | Two Secrets: main (OPENMETER_URL required, OPENMETER_TOKEN optional) and a `config`-componentName Secret holding base64 benthos config.yaml. | OPENMETER_URL uses `required` and fails render if unset. config.yaml is `toYaml | b64enc`; do not double-encode. Not gated by any toggle — always rendered. | +| `rbac.yaml` | Gated on `rbac.create`. ClusterRole+Binding for pods/nodes/PVCs/PVs (watch/list/get) and namespaced Role+Binding for coordination.k8s.io leases (for leader election). | Contains a duplicated `subjects:` line in the ClusterRoleBinding block (cosmetic/redundant). Subjects bind to `benthos-collector.serviceAccountName` in `.Release.Namespace`. | +| `service.yaml` | Gated on `service.enabled`. Exposes the `http` targetPort (container 8080) on `service.port`. | Selector uses selectorLabels only. If enabled but the statefulset http port is absent (also gated on service.enabled) the service has no backend — keep both flags consistent. | +| `configmap.yaml` | Renders a `ca-certificates` ConfigMap only when `caRootCertificates` is non-empty; keys are `.crt` lowercased. | ConfigMap name is the literal `ca-certificates` (not fullname-scoped) — collides across releases in the same namespace. Mounted read-only at /usr/local/share/ca-certificates in the statefulset. | +| `serviceaccount.yaml` | Gated on `serviceAccount.create`. Sets automountServiceAccountToken from `serviceAccount.automount` and supports annotations. | When create is false, statefulset still references `serviceAccountName` (default fallback) — ensure the named SA exists externally. | + +## Anti-Patterns + +- Hardcoding object names or label blocks instead of calling the `benthos-collector.*` helpers — breaks naming/truncation and managed-by conventions. +- Adding a benthos config source without extending `benthos-collector.args`; the template `fail`s unless exactly one of config/configFile/preset is set. +- Putting OPENMETER_TOKEN or config.yaml into plain env/ConfigMap instead of the existing Secrets. +- Removing the `checksum/config` / `checksum/secret` annotations, which silently stops pods from rolling on config changes. +- Probing the http port for liveness/readiness — health endpoints (/ping, /ready) live on the metrics port 4195. + +## Decisions + +- **Deployed as a StatefulSet (not Deployment) with optional volumeClaimTemplates.** — Benthos needs stable identity and optional persistent storage (e.g. buffer/state) gated on `storage.enabled`, plus leader election via coordination leases. +- **Config source is resolved by a single `args` helper enforcing exactly one of config/configFile/preset.** — Prevents ambiguous or empty config and provides a curated preset allowlist for common collection scenarios. + +## Example: Adding a new optional Kubernetes resource to the chart + +``` +{{- if .Values.myFeature.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "benthos-collector.fullname" . }} + labels: + {{- include "benthos-collector.labels" . | nindent 4 }} +data: + ... +{{- end }} +``` + + diff --git a/deploy/charts/openmeter/templates/CLAUDE.md b/deploy/charts/openmeter/templates/CLAUDE.md new file mode 100644 index 0000000000..fde7c18972 --- /dev/null +++ b/deploy/charts/openmeter/templates/CLAUDE.md @@ -0,0 +1,65 @@ +# templates + + + +> Helm chart templates that render every Kubernetes object for an OpenMeter install: the API Deployment, four worker Deployments (balance/notification/sink/billing), three billing CronJobs, Service, Ingress, ConfigMap, ServiceAccount, and optional self-hosted ClickHouse/Svix. All naming, labeling, and dependency-wait logic flows through shared `_helpers.tpl` definitions. + +## Patterns + +**Component naming via openmeter.componentName** — Every workload's metadata.name is built with `include "openmeter.componentName" (list . "")`, never hardcoded. This truncates the fullname to fit the 63-char DNS limit while keeping the component suffix. (`name: {{ include "openmeter.componentName" (list . "billing-worker") }}`) +**Component labels & selector labels** — Resource labels use `openmeter.componentLabels (list . "x")` and selectors use `openmeter.componentSelectorLabels (list . "x")`. The component string passed to selector and metadata labels of a workload MUST match so Pods are selected correctly. (`{{- include "openmeter.componentSelectorLabels" (list . "api") | nindent 6 }}`) +**Config-change rollout via checksum annotation** — Every Pod template adds `checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}` so config changes trigger a rolling restart. New Deployments/Jobs must replicate this annotation. (`checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}`) +**Dependency-wait initContainers** — Workloads gate on Postgres/ClickHouse readiness via `openmeter.init.postgres`/`openmeter.init.clickhouse` (svix.yaml uses init.redis), each guarded by the corresponding `.Values.*.enabled` flag. These are only added when the self-hosted dependency is enabled. (`{{- include "openmeter.init.postgres" (list .) | nindent 8 }}`) +**Shared container scaffolding** — All workload containers share the same image (`.Values.image.repository:tag|default .Chart.AppVersion`), `/entrypoint.sh` command, telemetry port 10000, /healthz/live & /healthz/ready probes, config volume at /etc/openmeter, and optional ca-certificates volume gated on `.Values.caRootCertificates`. (`command: ["/entrypoint.sh", "openmeter-balance-worker"]`) +**Self-hosted dependency config injection** — configmap.yaml defines `openmeter.helmValuesConfig` which conditionally emits kafka/clickhouse/postgres/svix blocks per `.Values.*.enabled`, then `mergeOverwrite`s them onto `.Values.config`. New self-hosted dependency wiring goes here, not into static config. (`{{- $cfg := mergeOverwrite $config $valuesConfig -}}`) +**Optional resources gated by enabled flags** — clickhouse.yaml, svix.yaml, ingress.yaml, and serviceaccount.yaml wrap their whole body in `{{- if .Values.X.enabled -}}` / `{{- if .Values.ingress.enabled -}}` so they render nothing when disabled. (`{{- if .Values.svix.enabled -}} ... {{- end }}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `_helpers.tpl` | Single source of named templates: name/fullname/chart, labels, selectorLabels, componentName/componentLabels/componentSelectorLabels, serviceAccountName, and the init.netcat/init.postgres/init.clickhouse/init.redis dependency waiters. | componentName truncates to `63 - 1 - len(component)`; a new long component name silently collides if it exceeds the budget. Add new named helpers here rather than inlining in templates. | +| `deployment.yaml` | Renders five Deployments (api, balance-worker, notification-service, sink-worker, billing-worker) separated by `---`, each differing mainly by component name, replicaCount value, and entrypoint subcommand. | Only the api Deployment exposes the http port 80 and serves traffic; workers expose only telemetry-http 10000. Copy an existing block wholesale when adding a worker; don't forget the checksum annotation and initContainers guards. | +| `jobs.yaml` | Three batch/v1 CronJobs (subscription-sync, billing-collect-invoices, billing-advance-invoices) running `openmeter-jobs` with args like `billing collect all`; all use concurrencyPolicy: Forbid and restartPolicy: Never. | Schedules come from `.Values.jobs..schedule`. The double-nested template metadata (jobTemplate.spec.template.metadata) both need labels/annotations; nindent levels differ (8 vs 12). | +| `configmap.yaml` | Builds config.yaml from `.Values.config` merged with auto-generated self-hosted dependency overrides, plus an optional ca-certificates ConfigMap from `.Values.caRootCertificates`. | helmValuesConfig uses `include` then `fromYaml`; indentation inside the conditional blocks is YAML-significant. The CA cert keys are lower-cased and suffixed `.crt`. | +| `svix.yaml` | Optional self-hosted Svix Deployment + Service, gated on `.Values.svix.enabled`, wiring SVIX_REDIS_DSN / SVIX_DB_DSN with defaults pointing at the in-chart redis-master and postgres. | Uses `.Values.svix.image.*` (not the shared `.Values.image`) and init.redis/init.postgres only. Container port is 8071. | +| `ingress.yaml` | Version-aware Ingress (networking.k8s.io/v1 vs v1beta1 vs extensions) routing to the api component Service, gated on `.Values.ingress.enabled`. | Backend service name comes from `openmeter.componentName (list . "api")` and must match service.yaml; the apiVersion/backend shape branches on `.Capabilities.KubeVersion`. | +| `clickhouse.yaml` | Optional ClickHouseInstallation CR (clickhouse.altinity.com/v1) for self-hosted analytics storage, gated on `.Values.clickhouse.enabled`. | Requires the Altinity ClickHouse operator CRD installed; service address `clickhouse-:9000` is referenced by configmap.yaml and init.clickhouse. | +| `service.yaml` | ClusterIP/typed Service for the api component exposing `.Values.service.port` to targetPort http. | Only the api workload has a Service; selector must use componentSelectorLabels with "api". | + +## Anti-Patterns + +- Hardcoding a resource name instead of `openmeter.componentName` — breaks the 63-char DNS truncation and label/selector matching. +- Adding a Deployment/CronJob without the `checksum/config` annotation — config changes won't trigger a rollout. +- Adding self-hosted dependency settings as static `.Values.config` instead of conditional blocks in `helmValuesConfig` — they leak even when the dependency is disabled. +- Emitting an optional resource (svix/clickhouse/ingress) without the `{{- if .Values.X.enabled -}}` guard. +- Mismatching the component string between a workload's labels, selectorLabels, and metadata.name so Pods fail selection. + +## Decisions + +- **All naming and labeling are centralized in _helpers.tpl named templates rather than inlined.** — Keeps the 63-char DNS truncation logic and Kubernetes recommended labels consistent across the many Deployments/Jobs and avoids per-resource drift. +- **Self-hosted dependencies (postgres/clickhouse/kafka/redis/svix) are first-class but optional, gated by `.Values.*.enabled`, and NOTES.txt warns against using them in production.** — The chart doubles as an all-in-one demo install and a production deployment that points at managed external services. +- **Dependency readiness is enforced with netcat initContainers rather than relying on application retry.** — Ensures Postgres/ClickHouse/Redis are reachable before the OpenMeter process starts migrations or consumers, avoiding crash-loops at startup. + +## Example: Standard worker Deployment block (name, labels, config checksum, dependency init, shared container) + +``` +metadata: + name: {{ include "openmeter.componentName" (list . "sink-worker") }} + labels: + {{- include "openmeter.componentLabels" (list . "sink-worker") | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "openmeter.componentSelectorLabels" (list . "sink-worker") | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + spec: + {{ if or .Values.postgresql.enabled .Values.clickhouse.enabled -}} + initContainers: +// ... +``` + + diff --git a/docs/decisions/CLAUDE.md b/docs/decisions/CLAUDE.md new file mode 100644 index 0000000000..fe85e4e6d4 --- /dev/null +++ b/docs/decisions/CLAUDE.md @@ -0,0 +1,34 @@ +# decisions + + + +> Architecture Decision Records (ADRs) capturing the foundational data-plane technology choices behind OpenMeter's usage-metering pipeline: event streaming, event format, idempotency, partitioning, and historical storage. Documentation only — no code; the records explain why the system is built the way it is. + +## Patterns + +**Sequential numbered ADR filenames** — Each file is `NNNN-kebab-title.md` with a zero-padded 4-digit prefix that monotonically increases; new decisions take the next free number. (`0005-clickhouse.md follows 0004-partitioning.md`) +**Fixed MADR-style section structure** — Every ADR uses the headings `## Context and Problem Statement`, `## Considered Options`, `## Decision Outcome`, and a `### Consequences` subsection listing Pros:/Cons: bullets. (`0001-event-streaming-platform.md lists 3 considered options then a Decision Outcome of 'Kafka with ksqlDB' followed by Pros/Cons`) +**Outcome stated as bullet list of concrete choices** — The Decision Outcome leads with the chosen option name, then itemizes the specific components/parameters adopted. (`0003-idempotency.md: 'Deduplication in ksqlDB via windowed tables', 'Events are unique by ID + Source', '32 days default deduplication window'`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `0001-event-streaming-platform.md` | Records choice of Kafka for event streaming + ksqlDB for stream processing; notes interfaces are kept generic for swappability. | Partly superseded by 0005 (ClickHouse) which lists 'migrate from ksqlDB' as a consequence — ksqlDB is no longer the sole processing path. | +| `0002-event-format.md` | Records CloudEvents as the ingestion event format (ID + Source uniqueness, multi-language, batch support). | The ID+Source uniqueness contract here is the premise for the idempotency decision in 0003 — keep them consistent. | +| `0003-idempotency.md` | Records deduplication via ksqlDB windowed tables (32-day window) instead of Redis; events unique by ID + Source. | Depends on 0002's uniqueness definition; window length has Kafka storage/backup tradeoffs. | +| `0004-partitioning.md` | Records `subject` as the Kafka producer key, subject+group-by in ksqlDB meter keys, configurable partitions defaulting to 100. | Tables partitioned by PRIMARY KEY and cannot be repartitioned — co-partitioning constraints for joins follow from this. | +| `0005-clickhouse.md` | Records ClickHouse + Kafka Connect Sink for historical storage and AggregatingMergeTree/MaterializedView pre-aggregation; addresses ksqlDB scaling limits. | Implies a migration path off ksqlDB for pre-1.0.0 users; mentions future Arroyo-based streaming aggregation as not-yet-implemented direction. | + +## Anti-Patterns + +- Renumbering or reusing an existing ADR number instead of appending the next sequential file +- Editing a past decision's outcome in place rather than adding a new superseding ADR +- Adding implementation code or config here — these are prose decision records only + +## Decisions + +- **Keep streaming interfaces generic rather than hard-coupling to Kafka/ksqlDB** — 0001 states this explicitly so OpenMeter can adapt to alternative streaming platforms (and indeed ClickHouse later supplements ksqlDB). +- **Idempotency via ksqlDB windowed dedup instead of Redis** — 0003 chose strong consistency and no extra system over Redis's simpler-but-inconsistent options, accepting increased Kafka storage. + + diff --git a/docs/migration-guides/CLAUDE.md b/docs/migration-guides/CLAUDE.md new file mode 100644 index 0000000000..63e5cc3c8d --- /dev/null +++ b/docs/migration-guides/CLAUDE.md @@ -0,0 +1,32 @@ +# migration-guides + + + +> Dated, version-anchored migration guides for breaking or deprecating changes operators must act on when upgrading OpenMeter. Documentation only — gives manual steps, SQL, and SDK before/after diffs; no executable code lives here. + +## Patterns + +**Date-prefixed filenames** — Each guide is `YYYY-MM-DD-topic.md`, ordering guides chronologically by when the change was introduced. (`2025-11-04-entitlement-events-v1.md is the most recent`) +**Version range header for upgrade-path guides** — Guides tied to a release pin source/target versions at the top so operators know exactly which upgrade triggers the steps. (`2025-06-26-subscription-alignment.md opens with 'From Version: v1.0.0-beta.214 / To Version: v1.0.0-beta.215'`) +**Repo-relative source links to ground claims** — Behavioral assertions link to the exact Go file+line implementing them so the doc stays verifiable against code. (`subscription-alignment links to /openmeter/productcatalog/alignment.go#L22 and errors.go#L411`) +**Before/After code diffs plus copy-paste SQL** — Guides show TS SDK before/after snippets for API changes and runnable Postgres SQL (SELECT-count-then-UPDATE) for data migrations. (`subject-customer-consolidation shows openmeter.subjects.createEntitlement → openmeter.customers.createEntitlement`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `2025-06-26-subscription-alignment.md` | Migrates unaligned subscriptions/plans to aligned; gives SQL to find convertible rows (every RateCard cadence matching plan billing_cadence) and bulk-UPDATE billables_must_align=true, flagging the rest for manual resolution. | Operates directly on `plans`, `plan_phases`, `plan_rate_cards`, `subscriptions`, `subscription_phases`, `subscription_items` tables; BillablesMustAlign config is slated for removal in beta.216. | +| `2025-08-12-subject-customer-consolidation.md` | Documents subjects→customers consolidation: customers become the primary entity, usage auto-attributed by customer ID/Key, /subjects APIs deprecated then removed, multiple subjects per customer via usageAttribution. | Subject values colliding with an existing customer.key/customer.id silently misattribute usage; deprecation timeline (deprecated Sep 1 2025, removed Nov 1 2025). | +| `2025-11-04-entitlement-events-v1.md` | Announces removal of V1 Entitlement Events; V2 introduced in commit 85f7ec90 due to breaking schema changes. | Operators MUST drain all in-flight V1 events before upgrading, especially when coming from a version prior to 85f7ec90. | + +## Anti-Patterns + +- Describing a breaking change in prose without the pinned version range / commit anchor an operator needs to act +- Providing destructive SQL without a preceding SELECT/COUNT verification step (every guide here counts first) +- Linking behavior claims to no code reference, making the guide impossible to validate against the implementation + +## Decisions + +- **Limit alignment migration SQL to the common 'RateCard cadence == plan cadence' case** — subscription-alignment notes a fully exhaustive PLPGSQL check is possible but most unaligned plans share literal cadence values, so simpler SQL covers the bulk and flags the rest for manual review. + + diff --git a/etc/seed/streams/CLAUDE.md b/etc/seed/streams/CLAUDE.md new file mode 100644 index 0000000000..e570650d8f --- /dev/null +++ b/etc/seed/streams/CLAUDE.md @@ -0,0 +1,71 @@ +# streams + + + +> Benthos/Redpanda Connect stream configs that generate synthetic CloudEvents and POST them to the OpenMeter ingest API for local demo/seeding. Each file models one usage-metering scenario (HTTP API requests, LLM prompt tokens, cloud workload runtime). + +## Patterns + +**Generate-input + Bloblang mapping** — Each file uses input.generate with count:0 (run forever), interval from ${SEEDER_INTERVAL:100ms}, and a Bloblang `mapping` block that builds the event root. (`input: + generate: + count: 0 + interval: "${SEEDER_INTERVAL:100ms}"`) +**CloudEvents 1.0 envelope** — root must be a CloudEvent: id (uuid_v4()), specversion "1.0", type, source "demo-org-seeder", subject, time (now()), and a scenario-specific data object. (`root = { "id": uuid_v4(), "specversion": "1.0", "type": $event_type, "source": $source, ... }`) +**Subject fan-out via SEEDER_SUBJECT_COUNT** — subject is `demo-subject-%d` modulo ${SEEDER_SUBJECT_COUNT:1000} so events spread across a configurable number of synthetic customers. (`let subject = "demo-subject-%d".format(random_int(seed: timestamp_unix_nano()) % $subject_count)`) +**Random selection from literal lists** — Categorical fields (methods, routes, models, regions, instance_types) are chosen with `$list.index(random_int(seed: timestamp_unix_nano()) % $list.length())`. (`let model = $models.index(random_int(seed: timestamp_unix_nano()) % $models.length())`) +**Switch output: ingest + optional log** — output.switch has two cases: an always-true case (check: "") with continue:true that POSTs to the events endpoint, then a gated stdout case enabled by SEEDER_LOG. (`- check: "" + continue: true + output: + http_client: { ... } +- check: '"${SEEDER_LOG:false}" == "true"' + output: + stdout: { codec: lines }`) +**HTTP client to /api/v1/events** — POST to ${OPENMETER_BASE_URL:http://127.0.0.1:8888}/api/v1/events with Content-Type application/cloudevents+json, Bearer ${OPENMETER_TOKEN:}, max_in_flight 256. (`http_client: + url: ${OPENMETER_BASE_URL:http://127.0.0.1:8888}/api/v1/events + verb: POST + headers: { Content-Type: application/cloudevents+json, Authorization: "Bearer ${OPENMETER_TOKEN:}" }`) +**Env-var defaults for everything** — All tunables use ${VAR:default} syntax (SEEDER_INTERVAL, SEEDER_SUBJECT_COUNT, SEEDER_LOG, OPENMETER_BASE_URL, OPENMETER_TOKEN) so a stream runs with zero config. (`interval: "${SEEDER_INTERVAL:100ms}"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `api-requests.yaml` | Generates `request` events with data.method (GET/POST) and data.path (one of /, /about, /contact, /pricing, /docs). | type must stay "request" to match the corresponding meter/event-type definition consuming it. | +| `prompt-tokens.yaml` | Generates `prompt` events with data.tokens (random_int min:100 max:1000), data.model (OpenAI model list), data.type (input/output). | data.tokens is the numeric value meters aggregate; keep it under the `tokens` key and named model list aligned with demo meters. | +| `workload-runtime.yaml` | Generates `workload` events with data.duration_seconds (random_int max:1000), data.region, data.zone (region+suffix), data.instance_type. | zone is composed as region+suffix via %s%s.format; duration_seconds has no min so 0 is possible. | + +## Anti-Patterns + +- Hardcoding the OpenMeter URL or token instead of using ${OPENMETER_BASE_URL}/${OPENMETER_TOKEN} env defaults. +- Omitting required CloudEvents envelope fields (id, specversion, type, source, subject, time) — ingest rejects malformed events. +- Sending Content-Type other than application/cloudevents+json for the JSON CloudEvent body. +- Dropping the continue:true on the ingest case, which would short-circuit the optional SEEDER_LOG stdout output. +- Setting generate.count to a non-zero value, which stops the stream after N events instead of seeding continuously. + +## Decisions + +- **Use Benthos/Redpanda Connect generate-input streams rather than a custom seeder binary.** — Declarative Bloblang config makes synthetic-event scenarios easy to author and tune via env vars without code. +- **One file per usage-metering scenario sharing an identical envelope + output structure.** — Each demonstrates a distinct meter type (requests, tokens, runtime) while keeping ingest wiring uniform and copy-pasteable for new scenarios. + +## Example: Add a new seed stream: continuous CloudEvents generator POSTing to the ingest API + +``` +input: + generate: + count: 0 + interval: "${SEEDER_INTERVAL:100ms}" + mapping: | + let subject_count = ${SEEDER_SUBJECT_COUNT:1000} + let subject = "demo-subject-%d".format(random_int(seed: timestamp_unix_nano()) % $subject_count) + root = { + "id": uuid_v4(), + "specversion": "1.0", + "type": "my_event", + "source": "demo-org-seeder", + "subject": $subject, + "time": now(), + "data": { "value": random_int(seed: timestamp_unix_nano(), max: 1000) }, +// ... +``` + + diff --git a/etc/wiretap/CLAUDE.md b/etc/wiretap/CLAUDE.md new file mode 100644 index 0000000000..220f78b985 --- /dev/null +++ b/etc/wiretap/CLAUDE.md @@ -0,0 +1,31 @@ +# wiretap + + + +> Holds the Docker-targeted configuration for wiretap, a reverse-proxy / API contract-validation tool that fronts the OpenMeter API and checks live traffic against the OpenAPI spec. Its sole constraint: paths and hostnames are written for execution inside a container, not the host. + +## Patterns + +**Docker-host bridge for redirect target** — redirectURL points at host.docker.internal so wiretap running in a container can forward to a service listening on the developer's host machine. (`redirectURL: http://host.docker.internal:8888`) +**Container-absolute contract path** — contract references the OpenAPI spec by an in-container absolute path (mounted volume), not a repo-relative path. (`contract: /usr/local/src/openmeter/api/openapi.yaml`) +**Distinct ports per wiretap function** — Separate ports are assigned for the proxy (port), monitor UI (monitorPort), and websocket (webSocketPort) so they do not collide. (`port: 19090 +monitorPort: 19091 +webSocketPort: 19092`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `config.docker.yaml` | wiretap runtime config for the dockerized variant: proxy redirect target, the three service ports, and the OpenAPI contract location used for request/response validation. | contract is an in-container path (/usr/local/src/openmeter/api/openapi.yaml) that must match the volume mount; if openapi.yaml moves or is unmounted, validation breaks. redirectURL uses host.docker.internal, which only resolves from inside a container. | + +## Anti-Patterns + +- Changing contract to a repo-relative or host path — wiretap runs in-container and resolves it against the container filesystem / mount. +- Pointing redirectURL at localhost instead of host.docker.internal, which would loop back into the container rather than reach the host service. +- Reusing one port for proxy, monitor, and websocket — each wiretap function needs its own port. + +## Decisions + +- **Keep a docker-specific config file separate from any host config.** — The container needs host.docker.internal and absolute mounted paths that would not work when running wiretap directly on the host. + + diff --git a/openmeter/CLAUDE.md b/openmeter/CLAUDE.md new file mode 100644 index 0000000000..e602f71c95 --- /dev/null +++ b/openmeter/CLAUDE.md @@ -0,0 +1,31 @@ +# openmeter + + + +> Structural root of OpenMeter's core business logic. It owns no direct source files; each child is a self-contained domain or infrastructure package (billing, subscription, entitlement, customer, ledger, notification, streaming, sink, watermill, etc.) following the service/adapter layering, and downstream wiring (app/common, cmd/*) plus the v3 handlers compose them. + +## Patterns + +**Domain package = interface root + layered sub-packages** — A domain's root declares Service/Adapter (or Repository) interfaces plus value types; persistence lives in a child adapter/, orchestration in service/, transport in httpdriver/httphandler/ or the v3 handlers. See billing, customer, subject, notification, taxcode. (`openmeter/subject/{subject.go,service.go,adapter.go} -> service/, adapter/, httphandler/, testutils/`) +**Write path goes through Service, never Adapter** — Adapters are Ent/transport-only; the Service owns transaction.Run, hooks, and Validate(). Calling the Adapter directly skips all three. (`subject.Service.Create wraps adapter writes in transaction.Run + hooks; direct adapter writes are an anti-pattern`) +**Collect-then-wrap validation** — Validate()/Input.Validate() accumulate into var errs []error and return models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on first invalid field. Pervasive across billing, productcatalog, notification, taxcode, app. (`errs = append(errs, fmt.Errorf("field: %w", err)); return models.NewNillableGenericValidationError(errors.Join(errs...))`) +**Coded ValidationIssue error catalogs** — Domain errors are typed, coded sentinels (ValidationIssue with attrs / IsX helpers) in an errors.go, not raw fmt.Errorf — they carry HTTP status, severity and frontend code matching. See billing, ledger, taxcode, app, customer. (`billing.NewValidationError(...) sentinels in errors.go; ledger ValidationIssue.WithAttrs`) +**Discriminated-union value types with central registries** — Sum types keyed by a Type discriminator (Price/RateCard, Channel/Rule config, EventType, AppType, EntitlementType) must switch on the discriminator and be added to the central Values()/list. Marshaling the wrapper directly causes wrong shape / recursion. (`productcatalog Price/RateCard custom JSON; notification EventType registered in eventTypes slice; app AppType.Validate`) +**Namespace-tenant seam** — Components that provision per-tenant state register a namespace.Handler (CreateNamespace/DeleteNamespace) on the central Manager; the active tenant is resolved from context via the namespacedriver decoder, never from body/query. (`taxcode/namespacehandler.go seeds org defaults inside one CreateNamespace transaction`) +**Feature-gated wiring (credits.enabled)** — ledger and related credit/customer-account paths are gated by credits.enabled; when off, app/common wires noop implementations. Code touching ledger accounts must respect this gate at every layer. (`openmeter/ledger/noop used when credits disabled`) + +## Anti-Patterns + +- Putting Ent/SQL or HTTP code in a domain root package — roots are interfaces + value types + pure model logic; persistence belongs in adapter/, transport in the httpdriver/handlers +- Writing through an Adapter directly instead of the Service, bypassing transaction.Run, hooks, and Validate() +- Returning bare fmt.Errorf instead of the domain's coded ValidationIssue sentinels, losing HTTP status / severity / frontend-code matching +- Adding a discriminated-union variant (Price, ChannelType, EventType, AppType) without updating its central registry/Values() and every Validate() switch +- Letting Service and Adapter/Repository method sets drift apart, or constructing services via struct literals instead of their New constructors + +## Decisions + +- **Each domain is an interface-rooted package with separate adapter/service/transport children rather than one flat package.** — Enforces dependency direction (transport -> service -> adapter), keeps roots import-light, and lets app/common compose narrow contracts via Wire. +- **Domain errors and validation are modeled as coded ValidationIssue sentinels with errors.Join accumulation.** — Gives consistent HTTP status mapping, severity, and frontend code-matching, and surfaces all invalid fields at once. +- **Tenancy and feature gating are cross-cutting seams (namespace.Handler, credits.enabled noop wiring) rather than per-package conditionals.** — Lets every domain provision/disable consistently without duplicating multi-tenant or feature-flag logic. + + diff --git a/openmeter/apiconverter/CLAUDE.md b/openmeter/apiconverter/CLAUDE.md new file mode 100644 index 0000000000..01c5ccb05f --- /dev/null +++ b/openmeter/apiconverter/CLAUDE.md @@ -0,0 +1,44 @@ +# apiconverter + + + +> Boundary converters that map v1 API filter/pagination types (api package) to internal pkg/filter and pkg/pagination types and back. Its primary constraint: the actual field-mapping logic is goverter-generated and must never be hand-edited. + +## Patterns + +**goverter variable converters** — Converter funcs are declared as package-level var func signatures in filter.go under a `// goverter:variables` block; the bodies are generated into filter.gen.go. Add a new conversion by declaring its signature here, not by writing the body. (`ConvertString func(api.FilterString) filter.FilterString`) +**Ptr / Map variants per type** — Each base converter has paired Ptr and Map/MapPtr variants (e.g. ConvertString, ConvertStringPtr, ConvertStringMap, ConvertStringMapPtr) that nil-guard and delegate to the base converter. (`ConvertStringPtr returns nil when source is nil, else &ConvertString(*source)`) +**goverter:ignore for API/internal field drift** — Fields present on internal filter types but absent from v1 api types are silenced with `// goverter:ignore ` directives above the var. When v1 grows the field, remove the ignore so it copies through instead of being silently dropped. (`// goverter:ignore Exists Contains Ncontains above ConvertString`) +**Hand-written non-goverter converters** — Pagination cursor conversion (cursor.go) is hand-written and delegates to pagination.DecodeCursor; it is NOT under goverter generation. (`func ConvertCursor(s api.CursorPaginationCursor) (*pagination.Cursor, error) { return pagination.DecodeCursor(s) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `filter.go` | Source of truth: goverter var declarations and ignore/skip directives; has `//go:generate ... goverter gen ./` and `// goverter:skipCopySameType`. | Editing converter bodies here does nothing — only signatures and goverter comments matter. Adding a field to internal filter without an ignore entry breaks generation. | +| `filter.gen.go` | Generated converter bodies wired in init(); also contains the private filterFilterStringToApiFilterString helper for the reverse direction. | Marked DO NOT EDIT and `//go:build !goverter`. Regenerate via go generate / make generate after changing filter.go. | +| `cursor.go` | Hand-written cursor converters wrapping pagination/v2 DecodeCursor. | Imports pkg/pagination/v2 (not v1). Keep nil-guarding in the Ptr variant. | + +## Anti-Patterns + +- Hand-editing filter.gen.go instead of regenerating from filter.go. +- Adding a filter operator to internal types without removing the matching goverter:ignore (silently dropped at the boundary). +- Writing bespoke field-copy logic in filter.go function declarations — bodies belong to goverter. + +## Decisions + +- **Use goverter codegen for API<->internal filter mapping.** — Filter types have many operators (Eq/Ne/Gt/In/Like/And/Or...); generation avoids error-prone manual copies and makes drift between API and internal types explicit via ignore directives. + +## Example: Declare a new generated converter with field-drift ignores + +``` +// goverter:variables +// goverter:skipCopySameType +var ( + // goverter:ignore Exists Contains Ncontains + ConvertString func(api.FilterString) filter.FilterString + ConvertStringPtr func(*api.FilterString) *filter.FilterString +) +``` + + diff --git a/openmeter/app/CLAUDE.md b/openmeter/app/CLAUDE.md new file mode 100644 index 0000000000..9886658a93 --- /dev/null +++ b/openmeter/app/CLAUDE.md @@ -0,0 +1,55 @@ +# app + + + +> Third-party app/marketplace framework. The root package declares the domain contracts (app.App, app.Service, app.Adapter, app.AppFactory/RegistryItem, AppBase, MarketplaceListing, Capability) and the app event/error vocabulary; concrete apps (stripe/, custominvoicing/, sandbox/) plug into billing via these interfaces and self-register in the marketplace registry. + +## Patterns + +**App identity = AppBase data + factory-built behavior** — AppBase (embeds models.ManagedResource + Type/Status/Listing/Metadata) is the persisted row; an AppFactory.NewApp(ctx, AppBase) turns a row into a live App implementing the full interface (UpdateAppConfig, customer-data methods, ValidateCapabilities). (`type App interface { GetAppBase() AppBase; ValidateCapabilities(...CapabilityType) error; UpsertCustomerData(...) error }`) +**Every input/value type is self-validating** — All *Input and value types implement Validate() returning models.NewGenericValidationError or errors.Join(errs...); namespace-coherence checks (e.g. CustomerID.Namespace == AppID.Namespace) live in Validate, not the service. (`func (a EnsureCustomerInput) Validate() error { ...; if a.AppID.Namespace != a.CustomerID.Namespace { return fmt.Errorf(...) } }`) +**Typed errors with IsX helpers** — Each error (AppNotFoundError, AppCustomerPreConditionError, AppProviderError) is built via NewX(...), wraps a models.Generic*Error, and exposes Error/Unwrap plus an IsX(err) helper backed by errors.As; a `var _ models.GenericError` assertion guards each. (`var _ models.GenericError = (*AppCustomerPreConditionError)(nil)`) +**AppType is a closed enum gating the discriminated union** — AppType (stripe|sandbox|custom_invoicing) validates against a fixed switch; adding a type requires extending AppType.Validate plus every httpdriver Discriminator switch. (`AppTypeStripe AppType = "stripe"`) +**Events versioned via metadata.EventType** — Lifecycle events (AppCreateEvent v1, AppUpdate/Delete v2) embed AppBase/EventApp, set EventName via metadata.GetEventName, build EventMetadata with metadata.ComposeResourcePath(namespace, EntityApp, id). (`metadata.GetEventName(metadata.EventType{Subsystem: AppEventSubsystem, Name: AppUpdateEventName, Version: "v2"})`) +**App config carried as serializable EventAppData** — EventAppData is a map[string]any from a JSON round-trip (NewEventAppData) consumed via ParseInto(ptr); apps surface config through GetEventAppData rather than concrete structs. (`func NewEventApp(app App) (EventApp, error) { appData, err := app.GetEventAppData(); ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `app.go` | App interface + app-customer-data input types (Get/Upsert/Delete + Validate) | App is the live-behavior interface, not the row; no persistence here. | +| `appbase.go` | AppType/AppStatus/CapabilityType enums, AppBase + getters, AppID | AppType.Validate is a closed switch; new types must be added here AND in every consuming discriminator switch. | +| `adapter.go / service.go` | Adapter and Service interfaces (marketplace + installed-app + customer-data); adapter embeds entutils.TxCreator | Keep Service and Adapter method sets in lockstep; service is a thin validate-then-delegate wrapper. | +| `registry.go` | AppFactory contracts (NewApp, InstallApp, InstallAppWithAPIKey), RegistryItem (Listing+Factory) | RegistryItem.Validate requires a non-nil Factory; the marketplace is in-memory, not a DB table. | +| `errors.go` | Typed app errors wrapping models.Generic*Error with IsX helpers | Return these (esp. AppCustomerPreConditionError) instead of bare errors so HTTP mapping stays correct. | +| `event.go / events.go` | App lifecycle events and app_customer payment-setup event, versioned | Delete EventMetadata dereferences DeletedAt; ensure it is set. | +| `marketplace.go` | MarketplaceListing, Capability, InstallMethod enums, install input types | MarketplaceListing.Validate requires non-empty Type/Name/Description and validates each capability/install-method. | + +## Anti-Patterns + +- Putting Ent/SQL or HTTP logic in the root app package (contracts + events only; persistence in adapter/, transport in httpdriver/). +- Adding an AppType without extending AppType.Validate and every discriminator switch (UpdateApp, MapAppToAPI, toCustomerData). +- Returning bare errors instead of the typed Generic*Error wrappers, breaking IsX detection and status mapping. +- Constructing an App by hand instead of routing AppBase through an AppFactory.NewApp. +- Skipping the namespace-coherence checks in *Input.Validate (AppID.Namespace must match CustomerID.Namespace). + +## Decisions + +- **App is split into a persisted AppBase row plus a factory-built live App.** — Lets generic CRUD/marketplace logic stay app-agnostic while per-type behavior (Stripe/sandbox) is injected via factories registered in the in-memory marketplace. +- **App config is serialized through EventAppData (JSON map) rather than concrete union types.** — Apps are an interface, not a closed union; the map keeps events app-neutral until a proper union refactor (noted in TODOs). + +## Example: Declaring a versioned app event with resource-path metadata + +``` +func (e AppUpdateEvent) EventName() string { + return metadata.GetEventName(metadata.EventType{Subsystem: AppEventSubsystem, Name: AppUpdateEventName, Version: "v2"}) +} + +func (e AppUpdateEvent) EventMetadata() metadata.EventMetadata { + appBase := e.AppBase.GetAppBase() + resourcePath := metadata.ComposeResourcePath(appBase.Namespace, metadata.EntityApp, appBase.ID) + return metadata.EventMetadata{ID: ulid.Make().String(), Source: resourcePath, Subject: resourcePath, Time: appBase.UpdatedAt} +} +``` + + diff --git a/openmeter/app/adapter/CLAUDE.md b/openmeter/app/adapter/CLAUDE.md new file mode 100644 index 0000000000..a370493f17 --- /dev/null +++ b/openmeter/app/adapter/CLAUDE.md @@ -0,0 +1,52 @@ +# adapter + + + +> Ent-backed persistence layer for the app/marketplace framework. Implements app.Adapter (app CRUD, app-customer links) plus the in-memory marketplace registry (app.AppType -> app.RegistryItem) that drives app installation via per-type factories. + +## Patterns + +**Transaction-aware repo via entutils** — Write methods wrap bodies in transaction.Run/RunWithNoValue + entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter)...) so they rebind to the tx client carried in ctx. The adapter implements Tx/WithTx/Self for entutils.TxCreator. (`func (a *adapter) CreateApp(...) { return transaction.Run(ctx, a, func(ctx) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter){ repo.db.App.Create()... }) }) }`) +**Registry is an in-memory map, not a table** — Marketplace listings live in adapter.registry map[app.AppType]app.RegistryItem populated by RegisterMarketplaceListing at wiring time; List/GetMarketplaceListing read from it, they never hit the DB. (`a.registry[input.Listing.Type] = input`) +**DB rows mapped through factory to live App** — GetApp/ListApps load *db.App, look up the RegistryItem by Type, then mapAppFromDB calls registryItem.Factory.NewApp(ctx, appBase) to produce the typed app.App. Never return raw db rows. (`mapAppFromDB(ctx, dbApp, registryItem) -> registryItem.Factory.NewApp(ctx, appBase)`) +**Soft delete via DeletedAt** — Apps and app-customer links are soft-deleted with SetDeletedAt(time.Now()); queries filter DeletedAtIsNil() unless IncludeDeleted. UninstallApp also calls Factory.UninstallApp before marking deleted. (`query = query.Where(appdb.DeletedAtIsNil())`) +**Upsert app-customer with conflict-on-not-deleted** — EnsureCustomer uses OnConflict over (namespace, app_id, customer_id) with ConflictWhere IsNull(deleted_at) to restore/upsert links; constraint errors are mapped to NewAppNotFoundError. (`OnConflict(sql.ConflictColumns(...), sql.ConflictWhere(sql.IsNull(appcustomerdb.FieldDeletedAt))).UpdateDeletedAt()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client *entdb.Client} + New(); adapter struct holds db + registry; Tx/WithTx/Self implement entutils tx interface | WithTx must propagate the registry map to the new tx-bound adapter or marketplace lookups break inside transactions | +| `app.go` | App CRUD (CreateApp/GetApp/ListApps/UpdateApp/UninstallApp) + mapAppBaseFromDB/mapAppFromDB | GetApp returns NewAppNotFoundError on db.IsNotFound; UninstallApp must call Factory.UninstallApp before soft delete | +| `customer.go` | ListCustomerData/EnsureCustomer/DeleteCustomer for app-customer links | Ent issue #1821 workaround: treats 'sql: no rows in result set' from upsert DoNothing as success | +| `marketplace.go` | Registry-backed listing + install (InstallMarketplaceListing[WithAPIKey]); RegisterMarketplaceListing validates + rejects duplicates | Install branches on Factory satisfying app.AppFactoryInstall / AppFactoryInstallWithAPIKey via type assertion; Oauth2 methods return 'not implemented' | + +## Anti-Patterns + +- Calling repo.db.* directly inside a write method without wrapping in entutils.TransactingRepo/transaction.Run +- Persisting marketplace listings to the DB instead of the in-memory registry map +- Returning raw *db.App instead of routing through Factory.NewApp +- Hard-deleting apps/app-customer rows instead of setting DeletedAt + +## Decisions + +- **Marketplace registry is process-local in-memory state on the adapter** — App types are compiled-in plugins registered at startup; their factories cannot be serialized, so listings live in memory not Postgres +- **App identity split into db row + factory-built behavior** — DB stores generic app metadata; type-specific behavior (Stripe, sandbox, custom invoicing) is constructed lazily by the registered Factory + +## Example: Transaction-aware create that maps a db row to a typed app via the registry + +``` +func (a *adapter) CreateApp(ctx context.Context, input app.CreateAppInput) (app.AppBase, error) { + return transaction.Run(ctx, a, func(ctx context.Context) (app.AppBase, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (app.AppBase, error) { + dbApp, err := repo.db.App.Create().SetNamespace(input.Namespace).SetType(input.Type).SetStatus(app.AppStatusReady).Save(ctx) + if err != nil { return app.AppBase{}, err } + registryItem, err := repo.GetMarketplaceListing(ctx, app.MarketplaceGetInput{Type: dbApp.Type}) + if err != nil { return app.AppBase{}, err } + return mapAppBaseFromDB(dbApp, registryItem), nil + }) + }) +} +``` + + diff --git a/openmeter/app/custominvoicing/adapter/CLAUDE.md b/openmeter/app/custominvoicing/adapter/CLAUDE.md new file mode 100644 index 0000000000..deadbca813 --- /dev/null +++ b/openmeter/app/custominvoicing/adapter/CLAUDE.md @@ -0,0 +1,54 @@ +# adapter + + + +> Ent-backed persistence layer for the custom-invoicing app: stores per-app sync-hook configuration (AppCustomInvoicing) and per-customer external-system data (AppCustomInvoicingCustomer). Implements the appcustominvoicing.Adapter / AppConfigAdapter interfaces. + +## Patterns + +**Transaction-aware adapter with Tx/WithTx/Self** — adapter implements the entutils transacting contract: Tx hijacks an Ent tx, WithTx rebinds the client from raw config, Self returns itself. Every query method body is wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue so it joins any tx already in ctx. (`func (a *adapter) GetAppConfiguration(ctx, input) (Configuration, error) { return entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter) (...){ tx.db.AppCustomInvoicing.Query()... }) }`) +**Config-validated constructor** — New(Config) validates Client and Logger are non-nil before returning the appcustominvoicing.Adapter interface; compile-time assert `var _ appcustominvoicing.Adapter = (*adapter)(nil)`. (`func New(config Config) (appcustominvoicing.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Soft delete via DeletedAt + IsNotFound returns empty** — Queries always filter DeletedAtIsNil(); deletes SetDeletedAt(time.Now()) instead of physical delete. Get-style methods translate db.IsNotFound into a zero-value struct + nil error rather than an error. (`if db.IsNotFound(err) { return custominvoicing.Configuration{}, nil }`) +**Upsert via OnConflict + Update partial columns** — Writes use Create().OnConflict... .UpdateNewValues() (config) or sql.ConflictColumns/ConflictWhere with UpdateMetadata()/UpdateDeletedAt() (customer data) so re-installs and metadata refreshes are idempotent. Customer-data conflict target is scoped by a partial unique index ConflictWhere(IsNull(FieldDeletedAt)). (`Create().OnConflict(sql.ConflictColumns(FieldCustomerID, FieldNamespace, FieldAppID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt))).UpdateMetadata().UpdateDeletedAt().Exec(ctx)`) +**Input validation at adapter boundary** — Customer-data methods call input.Validate() before touching the DB; appconfig methods do not (callers validate upstream). (`if err := input.Validate(); err != nil { return appcustominvoicing.CustomerData{}, err }`) +**DB->domain mapping helpers** — Lowercase mapDBToAppConfiguration / mapDBToCustomerData translate the generated db.* row into the domain struct; never expose db.* types outward. (`func mapDBToAppConfiguration(appConfig *db.AppCustomInvoicing) custominvoicing.Configuration { return custominvoicing.Configuration{EnableDraftSyncHook: appConfig.EnableDraftSyncHook, ...} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | adapter struct, Config/Validate, New constructor, Tx/WithTx/Self transaction plumbing | WithTx must rebuild via entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); don't reuse the outer a.db inside a tx | +| `appconfig.go` | Get/Upsert/Delete AppConfiguration (sync-hook flags) | Upsert uses OnConflictColumns(FieldID, FieldNamespace).UpdateNewValues(); keyed by app ID+namespace, not customer | +| `customerdata.go` | Get/Upsert/Delete CustomerData keyed by CustomerID+Namespace+AppID | input.Validate() required here; conflict target includes the partial-index ConflictWhere on DeletedAt | + +## Anti-Patterns + +- Running Ent queries outside entutils.TransactingRepo/TransactingRepoWithNoValue, breaking tx propagation from ctx +- Returning an error instead of a zero value + nil on db.IsNotFound +- Physical deletes instead of SetDeletedAt soft delete +- Returning generated db.* types instead of mapping to domain structs +- Forgetting DeletedAtIsNil() in query/update Where clauses + +## Decisions + +- **Two separate Ent tables (AppCustomInvoicing for app config, AppCustomInvoicingCustomer for per-customer data)** — App-level sync-hook config and customer-to-external-ID mapping have different keys and lifecycles +- **Get-on-missing returns empty struct, not NotFound error** — Sync-hook config and customer data are optional; callers treat absence as defaults + +## Example: Upsert app sync-hook configuration idempotently + +``` +func (a *adapter) UpsertAppConfiguration(ctx context.Context, input custominvoicing.UpsertAppConfigurationInput) error { + return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { + return tx.db.AppCustomInvoicing.Create(). + SetID(input.AppID.ID). + SetNamespace(input.AppID.Namespace). + SetEnableDraftSyncHook(input.Configuration.EnableDraftSyncHook). + SetEnableIssuingSyncHook(input.Configuration.EnableIssuingSyncHook). + OnConflictColumns(appcustominvoicing.FieldID, appcustominvoicing.FieldNamespace). + UpdateNewValues(). + Exec(ctx) + }) +} +``` + + diff --git a/openmeter/app/custominvoicing/httpdriver/CLAUDE.md b/openmeter/app/custominvoicing/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..06fb7da1a3 --- /dev/null +++ b/openmeter/app/custominvoicing/httpdriver/CLAUDE.md @@ -0,0 +1,59 @@ +# httpdriver + + + +> HTTP transport layer exposing the custom-invoicing app's external sync webhooks (draft synchronized, issuing synchronized, update payment status). Decodes api.* request bodies into appcustominvoicing/billing domain inputs and re-encodes billing.StandardInvoice as api.Invoice. + +## Patterns + +**httptransport.NewHandlerWithArgs triple** — Each endpoint returns a typed Handler built from (decode req, business call, response encoder) plus AppendOptions with WithOperationName and WithErrorEncoder. Request/Response/Params are type aliases to the underlying appcustominvoicing/api types. (`DraftSyncronizedHandler httptransport.HandlerWithArgs[DraftSyncronizedRequest, DraftSyncronizedResponse, DraftSyncronizedParams]`) +**Namespace resolution from decoder** — Every decode step calls h.resolveNamespace(ctx) which wraps namespaceDecoder.GetNamespace; a missing namespace yields a 500 commonhttp.NewHTTPError. InvoiceID is assembled from URL param + resolved namespace. (`namespace, err := h.resolveNamespace(ctx); ... InvoiceID: billing.InvoiceID{ID: params.InvoiceID, Namespace: namespace}`) +**Validate after decode, before service** — The business step calls request.Validate() first and returns the validation error directly so the errorEncoder maps it to the right status. (`if err := request.Validate(); err != nil { return DraftSyncronizedResponse{}, err }`) +**Centralized typed errorEncoder** — errors.go errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for billing.NotFoundError(404), ValidationError/ValidationIssue(400), UpdateAfterDeleteError(409), AppError(400), each using billing.EncodeValidationIssues. (`commonhttp.HandleErrorIfTypeMatches[billing.NotFoundError](ctx, http.StatusNotFound, err, w, billing.EncodeValidationIssues) || ...`) +**FromAPI mapping helpers + reuse billing ToAPI** — mapper.go has mapUpsertStandardInvoiceResultFromAPI / mapFinalizeStandardInvoiceResultFromAPI / mapPaymentTriggerFromAPI converting api.* into billing builders (NewUpsertStandardInvoiceResult, NewFinalizeStandardInvoiceResult). Responses reuse billinghttpdriver.MapStandardInvoiceToAPI rather than hand-mapping. (`return billinghttpdriver.MapStandardInvoiceToAPI(invoice)`) +**API->internal trigger name translation** — mapPaymentTriggerFromAPI explicitly switches API trigger enums to billing.Trigger* constants; note the API 'payment_failed' maps to internal billing.TriggerFailed. Empty/unknown returns models.NewGenericValidationError. (`case api.CustomInvoicingPaymentTriggerPaymentFailed: return billing.TriggerFailed, nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `custominvoicing.go` | DraftSyncronized/IssuingSyncronized/UpdatePaymentStatus handler factories | service is appcustominvoicing.SyncService; each handler builds InvoiceID from params+namespace and delegates to h.service.Sync*/HandlePaymentTrigger | +| `handler.go` | Handler/AppHandler interfaces, handler struct, New constructor, resolveNamespace | handler holds SyncService + NamespaceDecoder + options; New takes them positionally | +| `errors.go` | errorEncoder mapping billing error types to HTTP status | ordering matters (first matching type wins); AppError is the apps-dependency fallthrough with no encoder | +| `mapper.go` | FromAPI mappers + payment-trigger translation | API trigger name 'payment_failed' != internal 'failed'; required-trigger and unknown cases must return validation errors | + +## Anti-Patterns + +- Hand-encoding the StandardInvoice response instead of reusing billinghttpdriver.MapStandardInvoiceToAPI +- Skipping request.Validate() before invoking the service +- Reading the namespace from the request body instead of resolveNamespace(ctx) +- Adding a new billing error type without registering it in errorEncoder() +- Assuming API trigger enum names equal internal billing.Trigger* values + +## Decisions + +- **Handlers depend only on appcustominvoicing.SyncService, not the full Service** — HTTP layer needs only the sync/payment surface; narrows coupling +- **Reuse billing httpdriver encoder and error types** — Custom-invoicing returns billing.StandardInvoice, so it shares billing's API mapping and validation-issue encoding + +## Example: Define a sync webhook handler with decode, validate, delegate, encode + +``` +func (h *handler) DraftSyncronized() DraftSyncronizedHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params DraftSyncronizedParams) (DraftSyncronizedRequest, error) { + namespace, err := h.resolveNamespace(ctx) + if err != nil { return DraftSyncronizedRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) } + var body api.CustomInvoicingDraftSynchronizedRequest + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return DraftSyncronizedRequest{}, err } + return DraftSyncronizedRequest{InvoiceID: billing.InvoiceID{ID: params.InvoiceID, Namespace: namespace}, UpsertInvoiceResults: mapUpsertStandardInvoiceResultFromAPI(body.Invoicing)}, nil + }, + func(ctx context.Context, request DraftSyncronizedRequest) (DraftSyncronizedResponse, error) { + if err := request.Validate(); err != nil { return DraftSyncronizedResponse{}, err } + invoice, err := h.service.SyncDraftInvoice(ctx, request) + if err != nil { return DraftSyncronizedResponse{}, err } + return billinghttpdriver.MapStandardInvoiceToAPI(invoice) + }, +// ... +``` + + diff --git a/openmeter/app/custominvoicing/service/CLAUDE.md b/openmeter/app/custominvoicing/service/CLAUDE.md new file mode 100644 index 0000000000..17e3dda843 --- /dev/null +++ b/openmeter/app/custominvoicing/service/CLAUDE.md @@ -0,0 +1,61 @@ +# service + + + +> Service layer of the custom-invoicing app: creates/deletes the app and its sync-hook config (FactoryService), manages per-customer external data, and bridges external sync webhooks into billing (SyncService) by delegating to billing.Service while stamping metadata. + +## Patterns + +**Single Service implementing multiple domain interfaces** — One *Service satisfies appcustominvoicing.Service, FactoryService, and SyncService via compile-time asserts; behavior split across customerdata.go / factory.go / sync.go. (`var _ appcustominvoicing.SyncService = (*Service)(nil)`) +**Config-validated constructor with injected dependencies** — New(Config) requires Adapter, Logger, AppService, BillingService all non-nil (Config.Validate); no slog.Default fallback. Service holds adapter + appService + billingService. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**transaction.Run wraps multi-step writes** — Methods that combine app creation + config upsert (CreateApp) or read-trigger-reread (HandlePaymentTrigger) wrap the body in transaction.Run / RunWithNoValue against s.adapter so partial failures roll back. (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (app.AppBase, error) { appBase, err := s.appService.CreateApp(...); ...; s.adapter.UpsertAppConfiguration(...) })`) +**Sync delegates to billing with metadata + validator injection** — SyncDraftInvoice/SyncIssuingInvoice call billing.Service.Sync*StandardInvoice, attaching AdditionalMetadata (MetadataKeyDraftSyncedAt/FinalizedAt via clock.Now()) and InvoiceValidator: s.ValidateInvoiceApp. (`return s.billingService.SyncDraftInvoice(ctx, billing.SyncDraftStandardInvoiceInput{InvoiceID: input.InvoiceID, UpsertInvoiceResults: input.UpsertInvoiceResults, AdditionalMetadata: map[string]string{...}, InvoiceValidator: s.ValidateInvoiceApp})`) +**Invoice ownership validation** — ValidateInvoiceApp asserts Workflow.Apps.Invoicing exists and GetType()==app.AppTypeCustomInvoicing before any sync/payment mutation, returning models.NewGenericValidationError otherwise. (`if invoice.Workflow.Apps.Invoicing.GetType() != app.AppTypeCustomInvoicing { return models.NewGenericValidationError(...) }`) +**Critical-issue rollback after trigger** — HandlePaymentTrigger re-reads the invoice after TriggerInvoice and, if any ValidationIssueSeverityCritical issues exist, returns billing.ValidationError to force a transaction rollback. (`criticalIssues := lo.Filter(invoice.ValidationIssues, func(issue billing.ValidationIssue, _ int) bool { return issue.Severity == billing.ValidationIssueSeverityCritical }); if len(criticalIssues) > 0 { return ..., billing.ValidationError{Err: criticalIssues.AsError()} }`) +**Validate inputs first** — Every public method starts with input.Validate() (CreateApp wraps as 'invalid input: %w') and returns before doing work. (`if err := input.Validate(); err != nil { return app.AppBase{}, fmt.Errorf("invalid input: %w", err) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct, Config/Validate, New; compile-time assert for appcustominvoicing.Service | All four deps mandatory; logger injected, never slog.Default | +| `factory.go` | CreateApp/DeleteApp/Upsert/GetAppConfiguration (FactoryService) | CreateApp must run app create + config upsert in one transaction.Run; uses app.AppTypeCustomInvoicing | +| `sync.go` | SyncDraftInvoice/SyncIssuingInvoice/HandlePaymentTrigger + ValidateInvoiceApp (SyncService) | Always pass InvoiceValidator: s.ValidateInvoiceApp; HandlePaymentTrigger re-reads invoice and rolls back on critical issues; TriggerInvoice uses CapabilityTypeCollectPayments | +| `customerdata.go` | Get/Upsert/Delete CustomerData delegating to adapter inside transaction.Run | Thin pass-throughs wrapped in transaction.Run/RunWithNoValue | + +## Anti-Patterns + +- Mutating an invoice via billing without first calling ValidateInvoiceApp +- Performing CreateApp's two writes (app + config) outside a single transaction.Run +- Swallowing critical ValidationIssues instead of returning billing.ValidationError to roll back +- Using slog.Default() or time.Now() directly instead of injected logger / pkg/clock.Now() +- Bypassing billing.Service and writing invoice state directly from this layer + +## Decisions + +- **Sync methods are thin wrappers over billing.Service with injected validator + metadata** — Billing owns invoice state machine; the app only stamps custom-invoicing metadata and enforces app-ownership +- **HandlePaymentTrigger re-reads and inspects ValidationIssues to decide rollback** — TriggerInvoice may produce critical issues without erroring; explicit re-read lets the service abort the tx +- **clock.Now() for sync timestamps** — Test-controllable time for deterministic metadata assertions + +## Example: Drive a payment trigger through billing and roll back on critical validation issues + +``` +func (s *Service) HandlePaymentTrigger(ctx context.Context, input appcustominvoicing.HandlePaymentTriggerInput) (billing.StandardInvoice, error) { + if err := input.Validate(); err != nil { return billing.StandardInvoice{}, err } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (billing.StandardInvoice, error) { + invoice, err := s.billingService.GetStandardInvoiceById(ctx, billing.GetStandardInvoiceByIdInput{Invoice: input.InvoiceID}) + if err != nil { return billing.StandardInvoice{}, err } + if err := s.ValidateInvoiceApp(invoice); err != nil { return billing.StandardInvoice{}, err } + err = s.billingService.TriggerInvoice(ctx, billing.InvoiceTriggerServiceInput{ + InvoiceTriggerInput: billing.InvoiceTriggerInput{Invoice: input.InvoiceID, Trigger: input.Trigger}, + AppType: app.AppTypeCustomInvoicing, Capability: app.CapabilityTypeCollectPayments, + }) + if err != nil { return billing.StandardInvoice{}, err } + invoice, err = s.billingService.GetStandardInvoiceById(ctx, billing.GetStandardInvoiceByIdInput{Invoice: input.InvoiceID}) + if err != nil { return billing.StandardInvoice{}, err } + if len(invoice.ValidationIssues) > 0 { + criticalIssues := lo.Filter(invoice.ValidationIssues, func(issue billing.ValidationIssue, _ int) bool { return issue.Severity == billing.ValidationIssueSeverityCritical }) +// ... +``` + + diff --git a/openmeter/app/httpdriver/CLAUDE.md b/openmeter/app/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..8ccfbe7f06 --- /dev/null +++ b/openmeter/app/httpdriver/CLAUDE.md @@ -0,0 +1,52 @@ +# httpdriver + + + +> HTTP transport layer for the app/marketplace API: app CRUD, app-customer data upsert/list/delete, and marketplace listing/install endpoints. Each endpoint is a typed httptransport handler that decodes requests, calls app.Service, and maps domain apps to api.* discriminated unions. + +## Patterns + +**httptransport.NewHandlerWithArgs triple** — Every endpoint is built from (decode func, business func, encoder) plus AppendOptions(h.options, WithOperationName(...)). Request/Response types are aliased to api.* or app.* via type ( ... = ... ) blocks. (`httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("listApps"))...)`) +**Namespace from request context** — Decode funcs call h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace(ctx); failure is a 500 HTTPError. Never trust a namespace from the body. (`namespace, err := h.resolveNamespace(ctx)`) +**Discriminated-union dispatch on app type** — Update/customer-data handlers call body.Discriminator() then switch on app.AppTypeStripe/Sandbox/CustomInvoicing, parsing via body.AsStripeAppReplaceUpdate() etc.; unknown types return NewGenericValidationError. (`switch updateType { case string(app.AppTypeStripe): body.AsStripeAppReplaceUpdate() ... }`) +**Typed map functions to/from api.App** — mapper.go centralizes MapAppToAPI / MapEventAppToAPI / ToAPIStripeCustomerAppData / fromAPIAppStripeCustomerData and per-type mapStripeAppToAPI/mapSandboxAppToAPI/mapCustomInvoicingAppToAPI, building api.App via FromStripeApp/FromSandboxApp/FromCustomInvoicingApp. (`app := api.App{}; app.FromStripeApp(mapStripeAppToAPI(stripeApp.Meta))`) +**Cross-service orchestration in handler body** — Handlers reach into billingService and stripeAppService for side effects: UninstallApp checks billingService.IsAppUsed first; install handlers optionally createBillingProfile/makeStripeDefaultBillingApp. (`if err := h.billingService.IsAppUsed(ctx, request); err != nil { return nil, err }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/AppHandler interfaces, handler struct (service, stripeAppService, billingService, customerService, namespaceDecoder, options), New() constructor, resolveNamespace | New() positional args must match wiring order; resolveNamespace returns 500 not 400 when namespace missing | +| `app.go` | ListApps/GetApp/UpdateApp/UninstallApp handlers; UpdateApp dispatches on Discriminator to build AppConfigUpdate per type | UpdateApp embeds the per-type Configuration (appstripe.Configuration etc.) in AppConfigUpdate; missing a new app type here silently rejects updates | +| `customer.go` | ListCustomerData/UpsertCustomerData/DeleteCustomerData + toCustomerData/resolveCustomerApp/toAPICustomerAppData | All three first GetCustomer and reject deleted customers with NewGenericPreConditionFailedError; resolveCustomerApp falls back to billingService.GetCustomerApp when no appID given | +| `marketplace.go` | ListMarketplaceListings/GetMarketplaceListing/MarketplaceAppInstall[APIKey] + createBillingProfile/makeStripeDefaultBillingApp/mapMarketplaceListing | createBillingProfile only implemented for Stripe (sandbox/custom-invoicing are TODO nil); makeStripeDefaultBillingApp only sets default when current default is the sandbox app | +| `mapper.go` | Domain<->api.App conversions for all app types and stripe customer data | MapAppToAPI/MapEventAppToAPI use unchecked type assertions item.(appstripe.App); a new app type must be added in every switch or it returns 'unsupported app type' | + +## Anti-Patterns + +- Reading namespace from request body/params instead of resolveNamespace(ctx) +- Adding a new app type without extending every Discriminator switch (UpdateApp, toCustomerData, toAPICustomerAppData, MapAppToAPI, createBillingProfile) +- Putting business/persistence logic in handlers instead of delegating to app.Service +- Returning raw errors without wrapping; handlers consistently wrap with fmt.Errorf context + +## Decisions + +- **App types are surfaced as oapi-codegen discriminated unions (api.App, api.CustomerAppData)** — TypeSpec models each app variant separately; handlers must Discriminator()/As*()/From*() to bridge the union to typed domain apps +- **Install endpoints optionally provision a billing profile** — Installing Stripe should make it the default billing app when only the sandbox is configured, removing a manual setup step + +## Example: Discriminated-union request decode for UpdateApp + +``` +updateType, err := body.Discriminator() +if err != nil { return UpdateAppRequest{}, models.NewGenericValidationError(err) } +switch updateType { +case string(app.AppTypeStripe): + payload, err := body.AsStripeAppReplaceUpdate() + if err != nil { return UpdateAppRequest{}, err } + return UpdateAppRequest{AppID: app.AppID{ID: appId, Namespace: namespace}, Name: payload.Name, AppConfigUpdate: appstripe.Configuration{SecretAPIKey: payload.SecretAPIKey}}, nil +default: + return UpdateAppRequest{}, models.NewGenericValidationError(fmt.Errorf("invalid app type: %s", updateType)) +} +``` + + diff --git a/openmeter/app/sandbox/CLAUDE.md b/openmeter/app/sandbox/CLAUDE.md new file mode 100644 index 0000000000..2b0dfaeaca --- /dev/null +++ b/openmeter/app/sandbox/CLAUDE.md @@ -0,0 +1,51 @@ +# sandbox + + + +> Reference/test app implementation of the app framework: a no-credentials Sandbox app that satisfies customerapp.App and billing.InvoicingApp (+PostAdvanceHook) to let OpenMeter run invoicing end-to-end without external integrations. Also provides AutoProvision and a mockable factory for tests. + +## Patterns + +**Compile-time interface assertions** — App and CustomerData are pinned to their contracts with var _ blocks: customerapp.App, billing.InvoicingApp, billing.InvoicingAppPostAdvanceHook, app.CustomerData, app.EventAppParser. Adding/removing methods must keep these satisfied. (`var _ billing.InvoicingApp = (*App)(nil)`) +**Factory registers itself in the marketplace** — NewFactory(config) validates config then calls config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact}); the Factory implements NewApp/InstallAppWithAPIKey/UninstallApp. (`config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact})`) +**Invoicing hooks delegate to billing.Service helpers** — FinalizeStandardInvoice generates a number via billingService.GenerateInvoiceSequenceNumber(...) with the package-level InvoiceSequenceNumber definition; results are built with billing.NewFinalize/UpsertStandardInvoiceResult fluent setters. (`billing.NewFinalizeStandardInvoiceResult().SetInvoiceNumber(invoiceNumber).SetSentToCustomerAt(clock.Now())`) +**Simulated payment via metadata-driven triggers** — PostAdvanceStandardInvoiceHook only acts on PaymentProcessingPending, reads TargetPaymentStatusMetadataKey from invoice metadata, and returns out.InvokeTrigger(billing.InvoiceTriggerInput{...}) with TriggerPaid/Failed/Uncollectible/ActionRequired. (`out.InvokeTrigger(billing.InvoiceTriggerInput{Invoice: invoice.GetInvoiceID(), Trigger: billing.TriggerPaid})`) +**Mockable factory wrapping the real one** — MockableFactory embeds *Factory and overrideFactory; EnableMock(t) swaps NewApp to return a recording mockAppInstance; MockApp uses mo.Option fields + AssertExpectations for call verification. (`fact.EnableMock(t) returns *MockApp; NewApp delegates to overrideFactory when set`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `app.go` | Meta (embeds app.AppBase), App, CustomerData, Factory, Config; all invoicing/customer-data methods; PostAdvanceStandardInvoiceHook payment simulation | Most customer-data/invoice methods are intentional no-ops returning empty results; FinalizeStandardInvoice needs a non-nil billingService | +| `marketplace.go` | MarketplaceListing + Collect/CalculateTax/InvoiceCustomer capabilities; InstallMethodNoCredentials | Capabilities listed here must match what ValidateCapabilities enforces in ValidateCustomer | +| `helpers.go` | AutoProvision + AutoProvisionInput: installs a default Sandbox app on first run if none exists | AutoProvision returns the first existing sandbox app when one is present; do not assume it always creates | +| `errors.go` | ErrSimulatedPaymentFailure as a billing.NewValidationError | Used as the validation error attached to TriggerFailed in the post-advance hook | +| `mock.go` | MockApp, mockAppInstance, MockableFactory, NewMockableFactory, MockWithAppType | MockApp methods use mo.Option.MustGet() and panic if a response was not set via On*; Reset(t) asserts expectations and clears state | +| `config.go` | Empty Configuration{} with no-op Validate (sandbox has no config) | Update flows still pass appsandbox.Configuration{} as AppConfigUpdate | + +## Anti-Patterns + +- Breaking a var _ interface assertion by changing a method signature without updating the contract +- Adding real external calls to the sandbox app (it must run with InstallMethodNoCredentials and no credentials) +- Forgetting to register the listing in NewFactory so the app type is unknown to the registry +- Returning payment triggers from PostAdvanceStandardInvoiceHook when status is not PaymentProcessingPending + +## Decisions + +- **Sandbox is auto-provisioned by default at namespace setup** — Lets users exercise billing/invoicing immediately without configuring Stripe or another external provider +- **Payment outcome is controllable via invoice metadata** — Enables unit and customer tests to deterministically simulate paid/failed/uncollectible/action-required flows through the real advance machinery + +## Example: Self-registering factory implementing the app plugin contract + +``` +func NewFactory(config Config) (*Factory, error) { + if err := config.Validate(); err != nil { return nil, err } + fact := &Factory{appService: config.AppService, billingService: config.BillingService} + if err := config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: MarketplaceListing, Factory: fact}); err != nil { + return nil, fmt.Errorf("failed to register marketplace listing: %w", err) + } + return fact, nil +} +``` + + diff --git a/openmeter/app/service/CLAUDE.md b/openmeter/app/service/CLAUDE.md new file mode 100644 index 0000000000..9869a378c4 --- /dev/null +++ b/openmeter/app/service/CLAUDE.md @@ -0,0 +1,55 @@ +# service + + + +> Service layer for the app/marketplace framework: thin orchestration over app.Adapter that validates inputs, runs transactions, and publishes domain events. Implements app.Service (app CRUD, app-customer data, marketplace listing/install). + +## Patterns + +**Validate-then-delegate** — Every public method calls input.Validate() first and wraps the error in models.NewGenericValidationError before delegating to s.adapter. Read methods are pure pass-throughs after validation. (`if err := input.Validate(); err != nil { return ..., models.NewGenericValidationError(err) }; return s.adapter.GetApp(ctx, input)`) +**Publish events after mutations** — Create/Update/Uninstall/UpdateAppStatus emit events via s.publisher.Publish: app.NewAppCreateEvent, NewAppUpdateEvent, NewAppDeleteEvent. UninstallApp captures existingApp.GetEventAppData() before delete. (`event := app.NewAppCreateEvent(ctx, appBase); s.publisher.Publish(ctx, event)`) +**Transaction wraps multi-step updates** — UpdateApp runs inside transaction.Run(ctx, s.adapter, ...) so the adapter update, per-app UpdateAppConfig, re-fetch, and event publish are atomic. (`transaction.Run(ctx, s.adapter, func(ctx) { adapter.UpdateApp(...); updatedApp.UpdateAppConfig(...); publish(...) })`) +**App-config update routed to the typed app** — When input.AppConfigUpdate != nil, the service calls updatedApp.UpdateAppConfig(ctx, ...) on the typed app then re-fetches via adapter.GetApp to return fresh state. (`if input.AppConfigUpdate != nil { updatedApp.UpdateAppConfig(ctx, input.AppConfigUpdate); updatedApp, _ = s.adapter.GetApp(ctx, input.AppID) }`) +**Constructor with required deps** — Service{adapter, publisher}; Config.Validate rejects nil adapter or publisher; New(config) returns *Service. No slog.Default fallbacks. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{...}, nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct + Config + Validate + New; pins var _ app.Service = (*Service)(nil) | Both adapter and publisher are mandatory; do not introduce a default publisher | +| `app.go` | CreateApp/GetApp/UpdateApp/ListApps/UninstallApp/UpdateAppStatus with validation + event publishing | UpdateApp must re-fetch after UpdateAppConfig so the published event/return reflect config changes; UninstallApp reads EventAppData from the existing app before deletion | +| `customer.go` | ListCustomerData/EnsureCustomer/DeleteCustomer as direct adapter pass-throughs | These do not re-validate (validation happens in adapter/http layer); no events emitted here | +| `marketplace.go` | RegisterMarketplaceListing + Get/List/Install[WithAPIKey] + Oauth2 install URL/authorize, all validate-then-delegate | Oauth2 methods delegate to adapter which returns 'not implemented' | + +## Anti-Patterns + +- Skipping input.Validate()/NewGenericValidationError before calling the adapter on mutating methods +- Performing multi-step mutations (update + config + event) outside transaction.Run +- Publishing events before the adapter mutation succeeds, or omitting events on create/update/delete +- Putting Ent/SQL access in the service instead of delegating to app.Adapter + +## Decisions + +- **Service is a validation + eventing wrapper, persistence lives in the adapter** — Standard OpenMeter service/adapter split keeps DB concerns isolated and makes events a service-layer responsibility +- **UpdateApp re-fetches after applying typed AppConfigUpdate** — App config is stored in app-type-specific entities, so the generic app row must be reloaded to emit an accurate update event + +## Example: Transactional update applying typed config then publishing an event + +``` +func (s *Service) UpdateApp(ctx context.Context, input app.UpdateAppInput) (app.App, error) { + if err := input.Validate(); err != nil { return nil, models.NewGenericValidationError(err) } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (app.App, error) { + updatedApp, err := s.adapter.UpdateApp(ctx, input) + if err != nil { return nil, err } + if input.AppConfigUpdate != nil { + if err := updatedApp.UpdateAppConfig(ctx, input.AppConfigUpdate); err != nil { return nil, err } + if updatedApp, err = s.adapter.GetApp(ctx, input.AppID); err != nil { return nil, err } + } + event, err := app.NewAppUpdateEvent(ctx, updatedApp) + if err != nil { return nil, err } + return updatedApp, s.publisher.Publish(ctx, event) + }) +} +``` + + diff --git a/openmeter/app/stripe/adapter/CLAUDE.md b/openmeter/app/stripe/adapter/CLAUDE.md new file mode 100644 index 0000000000..8f4daeb6aa --- /dev/null +++ b/openmeter/app/stripe/adapter/CLAUDE.md @@ -0,0 +1,57 @@ +# adapter + + + +> Ent-backed persistence layer for the Stripe app integration. Owns CRUD over the appstripe and appstripecustomer DB tables (app data, customer linkage, webhook secrets, default payment method) and orchestrates the live Stripe API via injected client factories. Implements appstripe.Adapter / appstripe.AppStripeAdapter. + +## Patterns + +**Transaction-aware repo via entutils.TransactingRepo** — Every write/read that must be atomic runs inside entutils.TransactingRepo(ctx, a, func(ctx, repo *adapter)...) (or TransactingRepoWithNoValue); the closure uses repo.db, not a.db, so it rebinds to the tx carried in ctx. (`entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (appstripe.AppData, error) { ... repo.db.AppStripe.Query()... })`) +**Tx/WithTx/Self triad** — adapter implements entutils.TxCreator: Tx() hijacks an ent tx, WithTx() returns a new adapter bound to the tx client via entdb.NewTxClientFromRawConfig, Self() returns the receiver. (`func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), ...} }`) +**Validate input then wrap with models error constructors** — Each public method calls input.Validate() first and wraps the result in models.NewGenericValidationError; ent errors are mapped via entdb.IsNotFound / entdb.IsConstraintError into app.NewApp*Error or models.NewGenericConflictError. (`if entdb.IsNotFound(err) { return appstripe.CustomerData{}, app.NewAppCustomerPreConditionError(input.AppID, app.AppTypeStripe, &input.CustomerID, "customer has no data for stripe app") }`) +**Config + New constructor with required-dependency validation** — New(Config) validates all injected deps (Client, AppService, CustomerService, SecretService, Logger) and supplies default Stripe client factories (stripeclient.NewStripeClient / NewStripeAppClient) when nil. asserts var _ appstripe.Adapter = (*adapter)(nil). (`func New(config Config) (appstripe.Adapter, error) { if err := config.Validate(); err != nil { ... } }`) +**Upsert via OnConflict with soft-delete-aware conflict target** — AppStripeCustomer upserts use sql.ConflictColumns(namespace, app_id, customer_id) plus sql.ConflictWhere(sql.IsNull(FieldDeletedAt)) so soft-deleted rows do not collide. (`OnConflict(sql.ConflictColumns(...), sql.ConflictWhere(sql.IsNull(appstripecustomerdb.FieldDeletedAt)))`) +**Webhook lookup intentionally ignores namespace** — GetWebhookSecret queries AppStripe by ID only (no namespace filter) because webhook callers have no namespace; trust derives from the signed payload secret. (`Where(appstripedb.ID(input.AppID)).Only(ctx) // no namespace filter, see comment`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | adapter struct, Config/New, Tx/WithTx/Self transaction plumbing | WithTx must copy ALL dependency fields (logger was omitted in the copy here — replicate the existing shape, do not drop fields silently). | +| `customer.go` | stripe customer-data CRUD (Get/Upsert/Delete) and createStripeCustomer | UpsertStripeCustomerData validates the payment method belongs to the stripe customer and calls appService.EnsureCustomer inside the tx; createStripeCustomer reaches the live Stripe API via stripeAppClientFactory. | +| `stripe.go` | app-level CRUD: CreateStripeApp, UpdateAPIKey, GetStripeAppData, DeleteStripeAppData, GetWebhookSecret, SetCustomerDefaultPaymentMethod, CreateCheckoutSession | UpdateAPIKey validates live/test-mode and stripe account match before persisting; secret writes go through secretService outside the ent tx (mapAppStripeData maps db row -> appstripe.AppData). | + +## Anti-Patterns + +- Using a.db directly inside a TransactingRepo closure instead of repo.db (breaks transaction binding). +- Returning raw ent errors instead of mapping IsNotFound/IsConstraintError to app.* / models.* typed errors. +- Adding a namespace filter to GetWebhookSecret's AppStripe query (webhook requests have no namespace). +- Skipping input.Validate() / models.NewGenericValidationError wrapping at the top of a public method. +- Calling the live Stripe API outside a factory (always go through stripeClientFactory / stripeAppClientFactory so test fakes can be injected). + +## Decisions + +- **Stripe client construction is injected via factories on Config rather than built inline** — Lets tests substitute fake Stripe clients and lets secret/livemode resolution happen per app instance. +- **Secret creation/webhook setup are NOT wrapped in the ent transaction** — They coordinate three remote systems (secret store, Stripe, DB); the code comments acknowledge this is intentionally non-transactional. + +## Example: Adapter method: validate, transact, map ent errors + +``` +func (a *adapter) GetStripeAppData(ctx context.Context, input appstripe.GetStripeAppDataInput) (appstripe.AppData, error) { + if err := input.Validate(); err != nil { + return appstripe.AppData{}, models.NewGenericValidationError(err) + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (appstripe.AppData, error) { + dbApp, err := repo.db.AppStripe.Query(). + Where(appstripedb.Namespace(input.AppID.Namespace)). + Where(appstripedb.ID(input.AppID.ID)).Only(ctx) + if err != nil { + if entdb.IsNotFound(err) { return appstripe.AppData{}, app.NewAppNotFoundError(input.AppID) } + return appstripe.AppData{}, err + } + return mapAppStripeData(input.AppID, dbApp), nil + }) +} +``` + + diff --git a/openmeter/app/stripe/client/CLAUDE.md b/openmeter/app/stripe/client/CLAUDE.md new file mode 100644 index 0000000000..e1e5a9512f --- /dev/null +++ b/openmeter/app/stripe/client/CLAUDE.md @@ -0,0 +1,59 @@ +# client + + + +> Thin, typed wrapper over the stripe-go/v80 SDK. Translates OpenMeter inputs into Stripe params and Stripe responses/errors into OpenMeter domain types. Defines StripeAppClient (installed-app operations) and StripeClient (pre-install), plus their factory function types. + +## Patterns + +**Interface + factory-type + struct triad** — Each client is an interface (StripeAppClient), a factory type alias (StripeAppClientFactory = func(config) (StripeAppClient, error)), and a concrete struct (stripeAppClient) constructed by NewStripeAppClient(config) after config.Validate(). (`type StripeAppClientFactory = func(config StripeAppClientConfig) (StripeAppClient, error)`) +**Central providerError translation** — All Stripe SDK errors funnel through c.providerError(err), which maps HTTP 400 -> models.NewGenericValidationError, 401 -> updates app status to Unauthorized + app.NewAppProviderAuthenticationError, else app.NewAppProviderError. (`if stripeErr, ok := err.(*stripe.Error); ok { switch stripeErr.HTTPStatusCode { case http.StatusBadRequest: return models.NewGenericValidationError(...) } }`) +**Sentinel typed errors with New/Is pair** — errors.go declares typed errors (StripeCustomerNotFoundError, StripePaymentMethodNotFoundError, StripeInvoiceCustomerTaxLocationInvalidError) each with a New... constructor and an Is... helper using errors.As, asserting models.GenericError. (`func IsStripeCustomerNotFoundError(err error) bool { var e *StripeCustomerNotFoundError; return errors.As(err, &e) }`) +**Reserved OpenMeter metadata keys on Stripe objects** — om_namespace / om_app_id / om_customer_id / om_invoice_id are injected into Stripe metadata and listed in SetupIntentReservedMetadataKeys; user-supplied metadata containing these keys must be rejected. (`metadata[StripeMetadataNamespace] = input.AppID.Namespace; metadata[StripeMetadataAppID] = input.AppID.ID`) +**Webhook event type constants** — Stripe webhook event type strings are centralized as WebhookEventType* consts (setup_intent.* and invoice.*) and consumed by the httpdriver webhook switch. (`const WebhookEventTypeInvoicePaid = "invoice.paid"`) +**Explicit toStripeX / FromStripeX mappers** — Conversions between Stripe SDK structs and OpenMeter domain types are dedicated functions (toStripePaymentMethod, FromStripeCurrency) rather than inline. (`func toStripePaymentMethod(stripePaymentMethod *stripe.PaymentMethod) StripePaymentMethod { ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `appclient.go` | StripeAppClient interface, factory, NewStripeAppClient, providerError, metadata + webhook-event consts | providerError mutates app status on 401 using context.Background(); all SDK calls must route through it. Adding an interface method requires updating the concrete struct and test fakes. | +| `checkout.go` | CreateCheckoutSession param building, StripeCheckoutSession type + Validate, CreateCheckoutSessionInput + Validate | Mode is always Setup (Validate enforces it); embedded vs hosted UI mode have different required URL fields; metadata is validated against reserved keys. | +| `errors.go` | typed sentinel errors with New/Is helpers | Constructors return pointers but the var _ models.GenericError assertion is on the value type — keep both consistent when adding a new error. | +| `invoice.go / invoice_line.go` | Stripe invoice + line-item CRUD mapping | These translate between billing line items and Stripe InvoiceItem IDs; preserve the StripeInvoiceItemWithLineID linkage. | +| `client.go` | pre-install StripeClient (GetAccount, SetupWebhook) used before an app row exists | Used by service.InstallAppWithAPIKey before persistence; do not assume an installed app context here. | +| `logger.go` | leveledLogger adapter bridging slog into stripe.LeveledLogger | Injected into stripe.BackendConfig in NewStripeAppClient. | + +## Anti-Patterns + +- Returning a raw *stripe.Error to callers instead of routing through providerError. +- Letting OpenMeter-reserved metadata keys (om_*) be set by user input without rejecting them. +- Hard-coding webhook event type strings instead of the WebhookEventType* constants. +- Using a Stripe checkout mode other than Setup (StripeCheckoutSession.Validate enforces Setup). +- Building param/response conversions inline instead of a toStripeX/FromStripeX helper. + +## Decisions + +- **Two distinct clients (StripeClient pre-install, StripeAppClient post-install)** — Before installation there is no app row/status to mutate on auth errors; afterwards providerError can update app status. +- **Stripe HTTP errors mapped to OpenMeter typed errors at the client boundary** — Upstream layers (adapter/service/httpdriver) stay decoupled from stripe-go and can branch on app.*/models.* error categories. + +## Example: Centralized Stripe error translation + +``` +func (c *stripeAppClient) providerError(err error) error { + if stripeErr, ok := err.(*stripe.Error); ok { + switch stripeErr.HTTPStatusCode { + case http.StatusBadRequest: + return models.NewGenericValidationError(fmt.Errorf("stripe error: %s", stripeErr.Msg)) + case http.StatusUnauthorized: + _ = c.appService.UpdateAppStatus(context.Background(), app.UpdateAppStatusInput{ID: c.appID, Status: app.AppStatusUnauthorized}) + return app.NewAppProviderAuthenticationError(&c.appID, c.appID.Namespace, errors.New(stripeErr.Msg)) + default: + return app.NewAppProviderError(&c.appID, c.appID.Namespace, errors.New(stripeErr.Msg)) + } + } + return err +} +``` + + diff --git a/openmeter/app/stripe/httpdriver/CLAUDE.md b/openmeter/app/stripe/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..0530fb7832 --- /dev/null +++ b/openmeter/app/stripe/httpdriver/CLAUDE.md @@ -0,0 +1,55 @@ +# httpdriver + + + +> HTTP transport layer for the Stripe app: API-key replacement, checkout sessions, customer stripe-data, portal sessions, and the inbound Stripe webhook. Decodes requests, resolves namespace/customer/app, delegates to appstripe.Service / billing.Service, and encodes API responses. + +## Patterns + +**httptransport.NewHandler(WithArgs) triad** — Each endpoint is a method on *handler returning a typed Handler built from (decode func, business func, response encoder, options). Request/response types are package-level aliases to api.* and appstripe.* types. (`httptransport.NewHandlerWithArgs(decodeFn, businessFn, commonhttp.EmptyResponseEncoder[Resp](http.StatusNoContent), httptransport.AppendOptions(h.options, httptransport.WithOperationName("replaceStripeAPIKey"))...)`) +**Namespace resolution via resolveNamespace** — Non-webhook handlers call h.resolveNamespace(ctx) (backed by namespacedriver.NamespaceDecoder); webhook handler deliberately does NOT — it derives namespace from the signed webhook secret's SecretID. (`namespace, err := h.resolveNamespace(ctx)`) +**Customer polymorphic resolution + deleted guard** — Handlers accept customer by id, key, or create-input; resolve to a customer.CustomerID and reject deleted customers with models.NewGenericPreConditionFailedError. (`if cus != nil && cus.IsDeleted() { return ..., models.NewGenericPreConditionFailedError(...) }`) +**App resolution falls back to billing profile** — When no AppId is in the request, the handler resolves the Stripe app via billingService.ResolveStripeAppIDFromBillingProfile / GetCustomerApp(AppTypeStripe), then type-asserts to appstripe.App. (`stripeApp, ok := genericApp.(appstripe.App); if !ok { return ..., fmt.Errorf("customer app is not a stripe app") }`) +**Webhook event dispatch switch routing to service methods** — AppStripeWebhook validates the signature, then switches on stripeclient.WebhookEventType* and maps each invoice event to service.HandleInvoiceStateTransition with explicit Trigger / TargetStatuses / IgnoreInvoiceInStatus / ShouldTriggerOnEvent. (`case stripeclient.WebhookEventTypeInvoicePaid: ... HandleInvoiceStateTransition(ctx, appstripe.HandleInvoiceStateTransitionInput{Trigger: billing.TriggerPaid, TargetStatuses: []billing.StandardInvoiceStatus{billing.StandardInvoiceStatusPaid}, ...})`) +**FromAPI / ToAPI mapping helpers** — Conversions live in mapping.go (toAPIStripePortalSession, fromAPIAppStripeCustomerDataBase); the Handler interface enumerates every endpoint and is asserted with var _ Handler = (*handler)(nil). (`func fromAPIAppStripeCustomerDataBase(d api.StripeCustomerAppDataBase) appstripe.CustomerData { ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/AppStripeHandler interfaces, handler struct, New constructor, resolveNamespace | New endpoints must be added to the AppStripeHandler interface (compile-checked by var _ Handler). Deps: appstripe.Service, billing.Service, customer.Service, namespacedriver.NamespaceDecoder. | +| `webhook.go` | signature verification (webhook.ConstructEventWithTolerance) + event-type switch | No namespace resolver here — trust comes from the secret. Setup-intent handler validates om_app_id / om_namespace metadata and silently ignores events from other apps. Each invoice case re-fetches the Stripe invoice via ShouldTriggerOnEvent to rule out late events. | +| `checkout_session.go` | create checkout session; parses customer as create/id/key | Exactly one of createCustomerInput/customerId/customerKey must resolve; AppID falls back to ResolveStripeAppIDFromBillingProfile when body.AppId is nil. | +| `customer.go` | GetCustomerStripeAppData, UpsertCustomerStripeAppData, CreateStripeCustomerPortalSession + getAPIStripeCustomerAppData helper | Resolves the concrete stripe app through billingService.GetCustomerApp then type-asserts to appstripe.App; rejects deleted customers. | +| `mapping.go` | API<->domain conversions for portal session and customer data | Follow toAPI.../fromAPI... naming; keep nil-checks for optional fields like Configuration. | +| `const.go` | context-key attribute names for structured logging (stripe_event_id, stripe_event_type, app_id) | Stored on ctx via context.WithValue in the webhook handler for downstream log enrichment. | + +## Anti-Patterns + +- Calling resolveNamespace inside the webhook handler (namespace must come from the verified secret). +- Skipping the cus.IsDeleted() pre-condition guard when resolving a customer. +- Acting on a webhook setup-intent event without validating om_app_id/om_namespace metadata against the request app. +- Putting business logic in the decode func instead of the dedicated business func of the handler triad. +- Returning the generic app from GetCustomerApp without type-asserting to appstripe.App. + +## Decisions + +- **Webhook signature verification replaces namespace authentication** — Stripe cannot send a namespace; validating the payload with the app's stored webhook secret proves authenticity and yields the namespace from the secret's SecretID. +- **Invoice webhook handlers re-fetch the live Stripe invoice before transitioning state** — ShouldTriggerOnEvent guards against stale/out-of-order webhook deliveries by checking the current upstream invoice status. + +## Example: Webhook event mapped to a billing state transition + +``` +case stripeclient.WebhookEventTypeInvoiceVoided: + invoice, err := unmarshalInvoiceEvent(request.Event.Data.Raw) + if err != nil { return AppStripeWebhookResponse{}, err } + err = h.service.HandleInvoiceStateTransition(ctx, appstripe.HandleInvoiceStateTransitionInput{ + AppID: request.AppID, Invoice: invoice, + Trigger: billing.TriggerVoid, + TargetStatuses: []billing.StandardInvoiceStatus{billing.StandardInvoiceStatusVoided}, + IgnoreInvoiceInStatus: []billing.StandardInvoiceStatusMatcher{billing.StandardInvoiceStatusCategoryPaid}, + ShouldTriggerOnEvent: func(si *stripe.Invoice) (bool, error) { return si.Status == stripe.InvoiceStatusVoid, nil }, + }) +``` + + diff --git a/openmeter/app/stripe/service/CLAUDE.md b/openmeter/app/stripe/service/CLAUDE.md new file mode 100644 index 0000000000..76ad69fd62 --- /dev/null +++ b/openmeter/app/stripe/service/CLAUDE.md @@ -0,0 +1,57 @@ +# service + + + +> Service layer for the Stripe app (package appservice). Wraps the adapter in transactions, emits eventbus events, implements the app.AppFactory (install/uninstall/NewApp) and the marketplace registration, and bridges Stripe webhooks into billing state transitions. + +## Patterns + +**transaction.Run / RunWithNoValue wrapping the adapter** — Most Service methods are thin transactional wrappers: transaction.Run(ctx, s.adapter, func(ctx)...) delegating to s.adapter. Post-commit side effects (event publish) happen inside the same closure. (`func (s *Service) GetStripeAppData(ctx, input) (appstripe.AppData, error) { return transaction.Run(ctx, s.adapter, func(ctx context.Context) (appstripe.AppData, error) { return s.adapter.GetStripeAppData(ctx, input) }) }`) +**Event emission after adapter writes** — Successful operations publish domain events via s.publisher.Publish — appstripe.NewAppCheckoutSessionEvent on checkout, app.CustomerPaymentSetupSucceededEvent on setup-intent success (metadata stripped of reserved keys via lo.OmitByKeys). (`event := appstripe.NewAppCheckoutSessionEvent(ctx, input.Namespace, output.SessionID, output.AppID.ID, output.CustomerID.ID); s.publisher.Publish(ctx, event)`) +**AppFactory implementation + marketplace self-registration** — Service implements app.AppFactory (var _ app.AppFactory = (*Service)(nil)) with NewApp/InstallAppWithAPIKey/UninstallApp; New() calls AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: appstripe.StripeMarketplaceListing, Factory: service}). (`config.AppService.RegisterMarketplaceListing(app.RegistryItem{Listing: appstripe.StripeMarketplaceListing, Factory: service})`) +**Config + New with full dependency validation** — Config.Validate() requires every dependency (Adapter, AppService, SecretService, BillingService, Logger, Publisher, WebhookURLGenerator) be non-nil; logger is injected, never slog.Default(). (`if c.WebhookURLGenerator == nil { return errors.New("webhook url generator cannot be null") }`) +**Webhook->billing bridge via HandleInvoiceStateTransition** — billing.go resolves the local invoice by Stripe external ID, applies status/ignore guards, optionally re-fetches the Stripe invoice (ShouldTriggerOnEvent/GetValidationErrors), then calls billingService.TriggerInvoice with the mapped trigger and capability CollectPayments. (`s.billingService.TriggerInvoice(ctx, billing.InvoiceTriggerServiceInput{InvoiceTriggerInput: billing.InvoiceTriggerInput{Invoice: invoice.GetInvoiceID(), Trigger: input.Trigger, ValidationErrors: validationErrors}, AppType: app.AppTypeStripe, Capability: app.CapabilityTypeCollectPayments})`) +**External-ID invoice lookup with cardinality guards** — getInvoiceByStripeID lists StandardInvoices filtered by InvoicingExternalIDType; returns nil (non-managed) when empty, errors on >1, and verifies AppReferences.Invoicing.ID matches the app. (`if len(invoices.Items) == 0 { return nil, nil } if len(invoices.Items) > 1 { return nil, fmt.Errorf(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct, Config/Validate, New + marketplace registration | New deps must be added to Config, Validate, and the struct; registration failure returns the service AND an error (caller decides). Publisher and WebhookURLGenerator are mandatory. | +| `app.go` | core app operations (checkout, customer data, setup-intent, portal, API key, masked key) | generateMaskedSecretAPIKey slices [:8] and [len-3:] — will panic on short keys; callers must pass real Stripe keys. Event publish is inside the tx closure. | +| `billing.go` | webhook->billing bridge: HandleInvoiceStateTransition, HandleInvoiceSentEvent, getInvoiceByStripeID, stripeErrorToValidationError | Returns nil (no-op) for non-managed invoices; relies on guard ordering (TargetStatuses already-set check, IgnoreInvoiceInStatus, ShouldTriggerOnEvent) before TriggerInvoice. | +| `factory.go` | app.AppFactory: NewApp, InstallAppWithAPIKey, UninstallApp, newApp | Install coordinates secret store + Stripe + DB and is explicitly NOT transactional (commented TODO). disableWebhookRegistration injects a fake secret for dev. Uninstall tolerates SecretNotFoundError and provider-auth errors. | +| `webhook.go` | app.WebhookURLGenerator implementations (baseURL and pattern variants) | patternWebhookURLGenerator requires the pattern to contain %s; baseURL variant joins /api/v1/apps/{id}/stripe/webhook — keep the path in sync with the router and Stripe webhook registration. | +| `const.go` | log attribute name constants for invoice/stripe IDs | Used in s.logger.With(...) for structured logging in billing.go. | + +## Anti-Patterns + +- Calling adapter methods outside transaction.Run/RunWithNoValue when atomicity or event emission is required. +- Triggering a billing state transition without first resolving the managed invoice via getInvoiceByStripeID (non-managed invoices must be skipped). +- Using slog.Default() instead of the injected s.logger. +- Adding a Service dependency without updating Config, Config.Validate, and the struct together. +- Assuming InstallAppWithAPIKey is transactional — secret/webhook/db steps are independent remote calls. + +## Decisions + +- **Service self-registers in the marketplace inside New()** — Wires the Stripe AppFactory into the app registry at construction so app.Service can install Stripe apps; failure is surfaced to the caller. +- **Webhook events are translated to billing triggers with explicit guard sets per event** — Stripe delivers events at-least-once and out-of-order; status/ignore/ShouldTrigger guards make state transitions idempotent and ordering-safe. +- **InstallAppWithAPIKey is intentionally non-transactional** — Coordinating three remote services (secret store, Stripe API, DB) in one transaction is not feasible; the code documents this trade-off. + +## Example: Transactional adapter wrap plus event emission + +``` +func (s *Service) CreateCheckoutSession(ctx context.Context, input appstripe.CreateCheckoutSessionInput) (appstripe.CreateCheckoutSessionOutput, error) { + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (appstripe.CreateCheckoutSessionOutput, error) { + output, err := s.adapter.CreateCheckoutSession(ctx, input) + if err != nil { return appstripe.CreateCheckoutSessionOutput{}, err } + event := appstripe.NewAppCheckoutSessionEvent(ctx, input.Namespace, output.SessionID, output.AppID.ID, output.CustomerID.ID) + if err := s.publisher.Publish(ctx, event); err != nil { + return appstripe.CreateCheckoutSessionOutput{}, fmt.Errorf("failed to publish event: %w", err) + } + return output, nil + }) +} +``` + + diff --git a/openmeter/billing/CLAUDE.md b/openmeter/billing/CLAUDE.md new file mode 100644 index 0000000000..9932db1670 --- /dev/null +++ b/openmeter/billing/CLAUDE.md @@ -0,0 +1,63 @@ +# billing + + + +> Root of the billing domain: the contract surface that declares the billing.Service and billing.Adapter interfaces, all invoice/line/profile/customer-override/discount/tax domain models, the invoice state machine vocabulary (StandardInvoiceStatus/Trigger/Operation), the LineEngine plug-in contract, and the billing error/ValidationIssue taxonomy. This package is interfaces + value types + pure model logic only; orchestration lives in service/, persistence in adapter/, and concrete pricing/line/charge/worker logic in the sibling sub-packages. + +## Patterns + +**Service and Adapter are interface compositions** — billing.Service and billing.Adapter are each a single interface that embeds many narrow sub-interfaces (ProfileService, InvoiceService, LineEngineService, ... / ProfileAdapter, GatheringInvoiceAdapter, SequenceAdapter, ...). New capability = a new sub-interface added to the composite, implemented in service/ or adapter/, never inline here. (`type Service interface { ProfileService; CustomerOverrideService; InvoiceLineService; LineEngineService; ...; ConfigService } and type Adapter interface { ProfileAdapter; ...; entutils.TxCreator }`) +**Validate() collects then NewNillableGenericValidationError** — Validate() on model/input structs accumulates into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on the first failure (see SyncDraftStandardInvoiceInput.Validate, EventStandardInvoice.Validate, the LineEngine input Validates). (`func (i SyncDraftStandardInvoiceInput) Validate() error { var errs []error; if err := i.InvoiceID.Validate(); err != nil { errs = append(errs, err) }; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Error sentinels are coded ValidationIssue values, not error strings** — All billing-facing sentinels in errors.go are built with NewValidationError(code, message), which returns a billing.ValidationIssue (code + severity). Add new failures as a coded sentinel so HTTP status, severity, and frontend code-matching survive; never surface a bare fmt.Errorf to callers. (`ErrInvoiceCannotAdvance = NewValidationError("invoice_cannot_advance", "invoice cannot advance")`) +**Snapshot models, never live references** — Invoice-scoped models snapshot upstream entities at creation time (InvoiceCustomer copies customer.Customer fields; usage-based quantity is captured into the line and never updated). New invoice fields depending on Customer/Profile/CustomerOverride must be copied in, not referenced. (`func NewInvoiceCustomer(cust customer.Customer) InvoiceCustomer { ... } // copies Key/Name/BillingAddress so later customer edits cannot rewrite issued invoices`) +**Events carry circular-ref-stripped, app-stripped, versioned payloads** — Invoice events are constructed via NewEventStandardInvoice which calls invoice.RemoveCircularReferences() and nils Workflow.Apps (not JSON-marshallable), promoting apps into a separate InvoiceApps struct. EventName() is versioned via metadata.GetEventName (e.g. invoice.created v2, invoice.updated v3, invoice.advance v1). (`payload, err := invoice.RemoveCircularReferences(); payload.Workflow.Apps = nil; apps.Invoicing, _ = app.NewEventApp(invoice.Workflow.Apps.Invoicing)`) +**Status strings are dotted; ShortStatus drives category matching** — StandardInvoiceStatus values are "category.detail" (e.g. draft.collecting); ShortStatus() splits on the first dot so a StandardInvoiceStatusCategory matches any sub-state. New statuses must be added to validStatuses, and to finalStatuses/failedStatuses if terminal/failing. (`func (s StandardInvoiceStatus) ShortStatus() string { parts := strings.SplitN(string(s), ".", 2); return parts[0] }`) +**LineEngine hooks reuse input line IDs and preview is side-effect-free** — billing.LineEngine is the per-line-type plug-in (invoicing + the three charge types). BuildStandardInvoiceLines/preview must reuse the exact input gathering-line IDs; the preview variant must not persist, allocate credits, mutate IDs, or emit events. Engines register via Service.RegisterLineEngine keyed by GetLineEngineType(). (`LineEngineTypeInvoice / LineEngineTypeChargeFlatFee / ...ChargeUsageBased / ...ChargeCreditPurchase; BuildStandardLinesForGatheringPreview "must be side-effect free"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Declares the composite billing.Service interface and every sub-interface (Profile, CustomerOverride, InvoiceLine, LineEngine, SplitLineGroup, Invoice, GatheringInvoice, StandardInvoice, Sequence, Lockable, InvoiceApp, Config). | Add new methods to the correct narrow sub-interface; service/ must then implement them. ConfigService.WithAdvancementStrategy/WithLockedNamespaces return a (cloned) Service, they do not mutate in place. | +| `adapter.go` | Declares billing.Adapter as a composition of persistence sub-interfaces plus entutils.TxCreator; the pure Ent-backed contract. | Adapter is persistence only — no business logic. Gathering vs standard invoice operations live in distinct sub-interfaces; pick the right one. | +| `errors.go` | Central billing error taxonomy: coded ValidationError sentinels (Err*), NotFoundError, AppError, UpdateAfterDeleteError, ErrSnapshotInvalidDatabaseState, plus EncodeValidationIssues for HTTP encoding. | NewValidationError returns a billing.ValidationIssue (defined in validationissue.go), not a plain error. ErrSnapshotInvalidDatabaseState is special-cased to move the invoice to draft.invalid; do not collapse it into a generic error. | +| `stdinvoice.go` | StandardInvoice model plus the full StandardInvoiceStatus enum, StandardInvoiceStatusCategory, validStatuses/finalStatuses/failedStatuses, and matcher helpers. | A new status must be appended to validStatuses or Validate() rejects it; classify into finalStatuses/failedStatuses as appropriate; statuses are dotted and matched by ShortStatus(). | +| `stdinvoicestate.go` | State-machine vocabulary: InvoiceTrigger aliases over stateless.Trigger (TriggerNext/Approve/Retry/Failed/ForceCollect/...) and the StandardInvoiceOperation enum. | Triggers/operations are declared here but transition wiring lives in service/ (qmuntal/stateless). Adding a trigger here without wiring it does nothing. | +| `lineengine.go` | billing.LineEngine + billing.LineCalculator interfaces, LineEngineType discriminators, and per-hook input structs (BuildStandardInvoiceLinesInput, CalculateLinesInput, StandardLineEventInput, SplitGatheringLineInput). | Adding a hook means updating every engine impl plus testutils.NoopLineEngine. Keep BuildStandardLinesForGatheringPreview side-effect-free. NewLineEngineValidationError wraps failures into a ValidationIssue with a component name. | +| `app.go` | InvoicingApp / InvoicingAppPostAdvanceHook / InvoicingAppAsyncSyncer interfaces apps implement, plus Upsert/Finalize result builders and SyncInput (draft/issuing) types that MergeIntoInvoice. | The invoice passed to app callbacks is read-only and may be a stale in-memory snapshot — never call back into billing.Service from these hooks. Result structs use fluent Set*/Get* (bool-presence) accessors. | +| `events.go` | Versioned invoice domain events (StandardInvoiceCreated v2, Updated v3, AdvanceStandardInvoice v1) and the InvoiceApps payload; eventsgathering.go covers GatheringInvoiceCreatedEvent. | Bump Version in EventName() on a breaking payload change. Always build via NewEventStandardInvoice so circular refs and non-marshallable Apps are stripped. | + +## Anti-Patterns + +- Putting orchestration, DB access, or state-machine transition logic in this root package — it is interfaces + value types + pure model math; behavior belongs in service/ and adapter/. +- Surfacing a new failure as a bare fmt.Errorf instead of a coded NewValidationError sentinel in errors.go, losing HTTP status, severity, and frontend code-matching. +- Returning on the first invalid field in a Validate() method instead of collecting into errs and returning models.NewNillableGenericValidationError(errors.Join(errs...)). +- Storing a live pointer to Customer/Profile/CustomerOverride on an invoice/line model instead of snapshotting the needed fields (e.g. via NewInvoiceCustomer) — issued invoices must not change retroactively. +- Adding a StandardInvoiceStatus or LineEngine hook without updating the central lists (validStatuses/finalStatuses) or every LineEngine implementation incl. testutils.NoopLineEngine, leaving the state machine / engine registry inconsistent. + +## Decisions + +- **billing.Service and billing.Adapter are large interface compositions of narrow sub-interfaces rather than one flat interface.** — Lets handlers and workers depend on just the slice they need and keeps the service/ struct's surface organised by concern (profile, invoice, line, sequence, lock, config). +- **Invoice-facing errors are modeled as coded ValidationIssue sentinels returned alongside the (still-returned) invoice, not as fatal errors.** — Invoices can have issues at many independent layers (missing profile, provider failure, etc.); clients need the invoice plus machine-readable codes (EncodeValidationIssues) rather than string-matched failures. +- **Invoice models snapshot upstream entities and the package uses goderive (generate.go) for derived equality/clone helpers (derived.gen.go).** — Snapshotting guarantees an issued invoice is immutable to later customer/profile edits; goderive avoids hand-writing the deep-equality and clone logic the snapshot/diff flows rely on. + +## Example: Adding an invoice failure: declare it as a coded ValidationIssue sentinel and validate inputs by collecting errors + +``` +// errors.go — sentinel is a billing.ValidationIssue (carries code + severity) +var ErrInvoiceCannotAdvance = NewValidationError("invoice_cannot_advance", "invoice cannot advance") + +// any input Validate(): collect, don't early-return +func (i SyncDraftStandardInvoiceInput) Validate() error { + var errs []error + if err := i.InvoiceID.Validate(); err != nil { + errs = append(errs, err) + } + if i.AdditionalMetadata == nil { + errs = append(errs, fmt.Errorf("additional metadata is required")) + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/billing/adapter/CLAUDE.md b/openmeter/billing/adapter/CLAUDE.md new file mode 100644 index 0000000000..b7513ee740 --- /dev/null +++ b/openmeter/billing/adapter/CLAUDE.md @@ -0,0 +1,64 @@ +# adapter + + + +> Ent-backed persistence layer implementing billing.Adapter and its sub-interfaces (CustomerOverrideAdapter, GatheringInvoiceAdapter, SequenceAdapter, etc.) for invoices, lines, profiles, customer overrides, split-line groups, sequence numbers, schema-level tracking, and validation issues. All mutation flows are transaction-aware and namespace-scoped. + +## Patterns + +**Self-rebinding tx adapter** — adapter implements Tx/WithTx/Self; every read+write method body wraps in entutils.TransactingRepo or TransactingRepoWithNoValue so it rebinds to the ctx-carried transaction. New methods MUST do the same, never touch a.db directly inside multi-step mutations. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (T, error) { ... tx.db.BillingInvoice.Query()... })`) +**Interface assertion per file** — Each file asserts the sub-interface it satisfies via a blank var, e.g. `var _ billing.GatheringInvoiceAdapter = (*adapter)(nil)`. Add the matching assertion when implementing a new adapter sub-interface. (`var _ billing.SequenceAdapter = (*adapter)(nil)`) +**Diff-then-upsert for line sets** — Line collections are persisted via entitydiff.DiffByID producing create/update/delete buckets, then upsertWithOptions (upsert.go) drives a single CreateBulk + OnConflict. Deletes are modeled as soft-delete updates (MarkDeleted sets DeletedAt) and applied FIRST to satisfy constraints. (`upsertWithOptions(ctx, a.db, diff.Line, upsertInput[*billing.GatheringLine, *db.BillingInvoiceLineCreate]{Create: ..., UpsertItems: ..., MarkDeleted: ...})`) +**mapXFromDB / mapXToDB conversions** — DB->domain mapping uses free funcs named mapCustomerOverrideFromDB, mapGatheringInvoiceFromDB, etc.; time fields are normalized to UTC via .In(time.UTC) and convert.TimePtrIn; ISO-duration strings parse via ParsePtrOrNil. Follow these names and UTC normalization. (`CreatedAt: invoice.CreatedAt.In(time.UTC), DeletedAt: convert.TimePtrIn(invoice.DeletedAt, time.UTC)`) +**Pessimistic locking & sequencing** — Per-customer serialization uses BillingCustomerLock upsert (DoNothing) + ForUpdate row lock in LockCustomerForUpdate; sequence numbers use ForUpdate + create-on-missing in NextSequenceNumber. New cross-invoice mutations should take the customer lock first. (`tx.db.BillingCustomerLock.Query().Where(...).ForUpdate().First(ctx)`) +**NotFound/Validation domain errors** — Map db.IsNotFound to billing.NotFoundError{Entity, Err} and reject illegal mutations with billing.ValidationError; immutable fields (currency, type, customerID) are re-checked against the existing row before update. (`return billing.NotFoundError{ID: input.CustomerID, Entity: billing.EntityCustomerOverride, Err: billing.ErrCustomerOverrideNotFound}`) +**Bulk batching to dodge param limits** — Bulk inserts chunk by defaultBulkAssignCustomersToProfileBatchSize (derived from 65535 / column count) before CreateBulk+OnConflict, because PostgreSQL caps parameters at 64k. (`for _, chunk := range lo.Chunk(creates, defaultBulkAssignCustomersToProfileBatchSize) { ...CreateBulk(chunk...).OnConflict(...).Exec(ctx) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor and Tx/WithTx/Self via db.HijackTx + entutils.NewTxDriver | Config.Validate requires non-nil Client and Logger; WithTx must rebuild via NewTxClientFromRawConfig, never reuse a.db | +| `upsert.go` | Generic upsertWithOptions[T,CreateBulkType] diff applier | Delete bucket processed first as soft-delete; only runs UpsertItems when buckets non-empty | +| `gatheringlines.go` | Gathering invoice line diff/upsert + DB<->domain mapping | Only InvoiceLineAdapterTypeUsageBased + ParentLineIDIsNil lines are gathering lines; ULID assigned when ID/UBPConfigID empty | +| `invoicelinesplitgroup.go` | Split-line group create/get and SplitLineHierarchy resolution | Hierarchy expansion is a separate query path; keep namespace filters on every edge load | +| `seq.go` | NextSequenceNumber with ForUpdate row lock | Create-on-missing uses OnConflict().DoNothing() then re-reads; returns alpacadecimal.Decimal | +| `lock.go` | UpsertCustomerLock + LockCustomerForUpdate | Still triggers in-band invoice schema migration (shouldInvoicesBeMigrated/migrateCustomerInvoices) — temporary, do not remove blindly | +| `validationissue.go` | persistValidationIssues via sha256 dedupe-hash upsert | Hash covers severity+code+message+component+path; IntrospectValidationIssues is test-only, not on the interface | +| `stdinvoicelinemapper.go` | Standard-invoice line <-> DB mapping (detailed + UBP lines) | Companion to stdinvoicelinediff.go; keep mapper and diff in sync when adding line fields | + +## Anti-Patterns + +- Calling a.db.* directly for multi-step mutations instead of wrapping in entutils.TransactingRepo(WithNoValue) and using tx.db +- Returning raw db errors for not-found/invalid states instead of billing.NotFoundError / billing.ValidationError +- Persisting line collections with ad-hoc loops instead of entitydiff.DiffByID + upsertWithOptions +- Storing/returning non-UTC times — every timestamp must be .In(time.UTC) on map-in and map-out +- Single CreateBulk of unbounded customer/line slices without lo.Chunk batching (hits the 64k param ceiling) + +## Decisions + +- **Transaction hijacking (HijackTx/WithTx) instead of passing tx clients** — Lets service-layer orchestration share one Ent transaction across many adapter calls via context, keeping invoice mutations atomic +- **Validation issues deduplicated by content hash with soft-delete** — Re-running calculation re-asserts the same issues; hashing avoids duplicate rows while pruning issues no longer present +- **Gathering invoices reuse the BillingInvoice table with UNSET supplier/customer hacks** — Tables not yet split; UpdateGatheringInvoice clears supplier/customer columns as an interim until a dedicated gathering table exists + +## Example: Transaction-aware adapter method returning a domain value + +``` +func (a *adapter) GetCustomerOverride(ctx context.Context, input billing.GetCustomerOverrideAdapterInput) (*billing.CustomerOverride, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (*billing.CustomerOverride, error) { + dbCO, err := tx.db.BillingCustomerOverride.Query(). + Where(billingcustomeroverride.Namespace(input.Customer.Namespace)). + Where(billingcustomeroverride.CustomerID(input.Customer.ID)). + WithTaxCode().First(ctx) + if err != nil { + if db.IsNotFound(err) { + return nil, nil + } + return nil, err + } + return mapCustomerOverrideFromDB(dbCO) + }) +} +``` + + diff --git a/openmeter/billing/charges/adapter/CLAUDE.md b/openmeter/billing/charges/adapter/CLAUDE.md new file mode 100644 index 0000000000..bb6af4c760 --- /dev/null +++ b/openmeter/billing/charges/adapter/CLAUDE.md @@ -0,0 +1,35 @@ +# adapter + + + +> Ent-backed persistence adapter for the root charges facade. Implements charges.Adapter (transaction plumbing) and charges.ChargesSearchAdapter (read-only queries over the chargessearchv1 view) — it never owns per-charge-type state; that lives in flatfee/usagebased/creditpurchase adapters. + +## Patterns + +**Validate-then-TransactingRepo wrapper** — Every adapter method calls input.Validate() then wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter)...) so it rebinds to the tx carried in ctx. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (...) { dbCharges, err := tx.db.ChargesSearchV1.Query()... })`) +**Tx/WithTx/Self transaction trio** — adapter implements Tx (HijackTx), WithTx (rebuild from raw config via entdb.NewTxClientFromRawConfig), and Self so transaction.Run and TransactingRepo can drive it. (`func (a *adapter) Tx(ctx) (...) { txCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly:false}); return txCtx, entutils.NewTxDriver(eDriver, rawConfig), nil }`) +**Reads target the chargessearchv1 view** — All search queries go through tx.db.ChargesSearchV1 with dbchargessearchv1 predicates (Namespace, IDIn, StatusIn, DeletedAtIsNil), never the concrete charge tables. (`tx.db.ChargesSearchV1.Query().Where(dbchargessearchv1.Namespace(input.Namespace)).Where(dbchargessearchv1.IDIn(input.IDs...))`) +**Stable result ordering via entutils.InIDOrder** — GetByIDs reorders DB rows to match the requested ID slice using entutils.InIDOrder with an InIDOrderAccessor wrapper, enforcing namespace ownership. (`resultsInOrder, err := entutils.InIDOrder(input.Namespace, input.IDs, withIDAccessor(dbCharges))`) +**Manual pagination after GroupBy** — ListCustomersToAdvance uses GroupBy(namespace, customer_id) which cannot Paginate, so it slices results by page.Offset()/page.Limit() manually after a Namespace+CustomerID ordered scan. (`query.Order(dbchargessearchv1.ByNamespace(), dbchargessearchv1.ByCustomerID()).GroupBy(FieldNamespace, FieldCustomerID).Scan(ctx, &results)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client,Logger}+Validate, New() returning charges.Adapter, and the Tx/WithTx/Self transaction trio. | Both Client and Logger are required in Validate(); WithTx must rebuild the ent client from raw tx config, not reuse a.db. | +| `search.go` | Implements ChargesSearchAdapter: GetByIDs, ListCharges, ListCustomersToAdvance, plus mapChargeSearchToChargeWithType and the searchResultIDAccessor. | ListCustomersToAdvance filters StatusNotIn(ChargeStatusFinal, ChargeStatusDeleted) and AdvanceAfterLTE; nil AdvanceAfter rows are excluded. OrderBy switch only supports id/service_period.from/billing_period.from/created_at. | +| `search_test.go` | Suite-based integration test (InitPostgresDB + migrate.OMMigrationsConfig) inserting ChargeFlatFee rows directly to exercise the search view. | Inserts via dbClient.ChargeFlatFee.Create (concrete table) but reads via the chargessearchv1 view, so the view must be migrated. | + +## Anti-Patterns + +- Querying concrete charge tables (ChargeFlatFee, etc.) for reads instead of the ChargesSearchV1 view. +- Accessing a.db directly inside a method instead of the tx-bound client from TransactingRepo. +- Returning rows in DB order from GetByIDs instead of InIDOrder request order. +- Adding per-charge-type lifecycle logic here — this adapter only does search/tx plumbing. + +## Decisions + +- **Search is served by a dedicated chargessearchv1 view rather than UNIONing concrete tables.** — Lets the root facade list/filter heterogeneous charge types (id, customer, status, advance_after) in one indexed query. +- **ListCustomersToAdvance returns deduped customer IDs via GroupBy, not charges.** — The advance worker iterates customers, so the adapter collapses many due charges per customer into one row. + + diff --git a/openmeter/billing/charges/creditpurchase/CLAUDE.md b/openmeter/billing/charges/creditpurchase/CLAUDE.md new file mode 100644 index 0000000000..5d354befc7 --- /dev/null +++ b/openmeter/billing/charges/creditpurchase/CLAUDE.md @@ -0,0 +1,59 @@ +# creditpurchase + + + +> Domain package for the credit-purchase charge type: defines the Charge/ChargeBase/Intent value types, the three-variant Settlement (invoice/external/promotional), the persistence Adapter and lifecycle Service interfaces, and the ledger Handler contract. Constraint: every public input has a Validate() and all settlement variants must agree on currency with the credit Intent. + +## Patterns + +**Validate() collects errors then NewNillableGenericValidationError** — Every input/value type implements Validate() by accumulating into `var errs []error` with `fmt.Errorf("field: %w", err)` wrapping, returning models.NewNillableGenericValidationError(errors.Join(errs...)) (`CreateChargeInput.Validate, Charge.Validate, Intent.Validate`) +**Tagged-union Settlement with private fields + constructor** — Settlement holds a `t SettlementType` discriminant and private `*InvoiceSettlement/*ExternalSettlement/*PromotionalSettlement`; build only via NewSettlement[T], read via AsInvoiceSettlement/AsExternalSettlement/AsPromotionalSettlement (error on type mismatch), with custom MarshalJSON/UnmarshalJSON keyed on `type` (`NewSettlement(InvoiceSettlement{...}); s.AsExternalSettlement()`) +**Status enum aliased from meta.ChargeStatus** — Status constants (StatusCreated/Active/Final/Deleted) are defined as Status(meta.ChargeStatus...) and convert back via ToMetaChargeStatus(); never invent a separate status space (`StatusActive = Status(meta.ChargeStatusActive)`) +**Intent.Normalized() before persist** — Intent.Normalized() normalizes embedded meta.Intent, optional timestamps via meta.NormalizeOptionalTimestamp, feature filters, and rounds CreditAmount via Currency.Calculator() (`i.CreditAmount = calc.RoundToPrecision(i.CreditAmount)`) +**Realizations are expand-only edge data** — Charge embeds ChargeBase + Realizations (CreditGrantRealization/ExternalPaymentSettlement/InvoiceSettlement pointers); State struct is intentionally empty — all lifecycle outcomes live in Realizations, loaded only under meta.ExpandRealizations (`type State struct{}`) +**Handler interface mediates all ledger side-effects** — Ledger interaction is an injected Handler (OnPromotionalCreditPurchase, OnCreditPurchaseInitiated, OnCreditPurchasePaymentAuthorized/Settled) returning ledgertransaction.GroupReference; the package's value types never call ledger directly (`Handler.OnCreditPurchaseInitiated(ctx, charge)`) +**ValidationIssue errors with HTTP attributes** — Errors are models.NewValidationIssue with an ErrorCode const, severity and commonhttp.WithHTTPStatusCodeAttribute — not plain fmt.Errorf (`ErrCreditPurchaseChargeNotActive (StatusBadRequest)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `charge.go` | ChargeBase/Charge/Intent/Realizations/State value types and their Validate/normalize/getters | EffectiveAt is validated as not-yet-supported (returns error if non-nil); CreditAmount must be positive; settlement currency must equal Intent.Currency | +| `settlement.go` | SettlementType enum + tagged-union Settlement with JSON round-trip and AsX accessors | Construct only via NewSettlement; MarshalJSON errors if the variant pointer for the discriminant is nil; promotional carries no payload | +| `adapter.go` | Adapter interface (Charge/ExternalPayment/CreditGrant/InvoicedPayment + entutils.TxCreator) and its input structs | All inputs Validate namespace + Expands; GetByID/GetByIDs require ChargeID/Expands validation before DB access | +| `service.go` | Service interface composed of CreditPurchaseService + ExternalPaymentLifecycle + InvoicePaymentLifecycle; ChargeWithGatheringLine result | Create handles a single Intent only; invoice-settled lifecycle is driven by PostInvoice* hooks, not Create | +| `handler.go` | Ledger Handler contract documenting the cost-basis>0 happy path (initiated -> authorized -> settled) vs promotional (single call) | Promotional purchases call ONLY OnPromotionalCreditPurchase; failed payments can occur after initiated or after authorized | +| `statemachine.go` | Status enum aliased to meta.ChargeStatus + ToMetaChargeStatus | Keep the four statuses in lockstep with meta.ChargeStatus values | +| `featurefilters.go` | FeatureFilters []string with Validate (no empty/dup) and Normalize (sorted+uniq via slicesx.Normalize) | Normalize length mismatch is how duplicate detection works | +| `funded_credit_activity.go` | FundedCreditActivity read model + keyset cursor (FundedAt/ChargeCreatedAt/ChargeID) for ListFundedCreditActivities | After and Before cursors are mutually exclusive; Limit must be >= 1 | + +## Anti-Patterns + +- Constructing a Settlement by setting struct fields directly instead of NewSettlement[T] — private fields make this impossible and JSON marshal fails on nil variant +- Returning plain fmt.Errorf for lifecycle conflicts instead of the predefined ValidationIssue in errors.go +- Putting ledger/credit-grant side effects in this package's value types — they belong behind the injected Handler in the service sub-package +- Setting Intent.EffectiveAt — validation rejects it as not-yet-supported +- Reading Realizations without expanding meta.ExpandRealizations (they come back nil/unmapped) + +## Decisions + +- **Settlement is a JSON-tagged union with private variant pointers** — Forces construction through NewSettlement and a single `type` discriminant so invalid combinations are unrepresentable and persistence is stable +- **State struct is empty; all lifecycle outcomes live in Realizations edges** — Lifecycle results (credit grant, external/invoice settlement) are append-only child rows loaded on demand rather than mutable base-row fields +- **Status values alias meta.ChargeStatus** — Keeps the per-type charge status compatible with the shared charge-meta status space used by the generic charge engine + +## Example: Validating a credit-purchase Intent with settlement-currency cross-check + +``` +func (i Intent) Validate() error { + var errs []error + if err := i.Intent.Validate(); err != nil { errs = append(errs, fmt.Errorf("intent meta: %w", err)) } + if !i.CreditAmount.IsPositive() { errs = append(errs, fmt.Errorf("credit amount must be positive")) } + if err := i.Settlement.Validate(); err != nil { errs = append(errs, fmt.Errorf("settlement: %w", err)) } + if s, err := i.Settlement.AsInvoiceSettlement(); err == nil && s.Currency != i.Currency { + errs = append(errs, fmt.Errorf("settlement currency %q must match credit currency %q", s.Currency, i.Currency)) + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/billing/charges/creditpurchase/adapter/CLAUDE.md b/openmeter/billing/charges/creditpurchase/adapter/CLAUDE.md new file mode 100644 index 0000000000..ae614cee32 --- /dev/null +++ b/openmeter/billing/charges/creditpurchase/adapter/CLAUDE.md @@ -0,0 +1,61 @@ +# adapter + + + +> Ent-backed persistence layer for credit-purchase charges, their credit grants, and external/invoiced payment settlements. Implements the creditpurchase.Adapter / CreditGrantAdapter interfaces over the ChargeCreditPurchase* Ent entities. + +## Patterns + +**Constructor returns interface, validates Config** — New(Config) returns creditpurchase.Adapter; Config.Validate() requires Client, Logger, MetaAdapter. Compile-time check via var _ creditpurchase.Adapter = (*adapter)(nil). (`func New(config Config) (creditpurchase.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Every method wraps body in entutils.TransactingRepo** — Read and write methods bind to the ctx-carried tx via entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter)...). tx.db is the tx-aware client; never use a.db directly inside a method body. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (creditpurchase.Charge, error) { query := tx.db.ChargeCreditPurchase.Query()... })`) +**Validate input before any DB access** — Each method calls input.Validate() / chargeID.Validate() and returns the zero value + error before touching the DB. (`if err := input.Validate(); err != nil { return creditpurchase.Charge{}, err }`) +**DB->domain mapping via Map*FromDB in mapper.go** — All Ent entities convert to domain through MapChargeBaseFromDB / MapCreditPurchaseChargeFromDB; expand-gated edges (CreditGrant, ExternalPayment, InvoicedPayment) error with lo.ErrorsAs[*entdb.NotLoadedError] if not eager-loaded. (`if expands.Has(meta.ExpandRealizations) { dbCreditGrant, err := dbEntity.Edges.CreditGrantOrErr(); ... }`) +**Register charges with meta adapter on create** — CreateCharge persists the row then calls tx.metaAdapter.RegisterCharges with ChargeTypeCreditPurchase so the meta layer tracks the new charge by ID + UniqueReferenceID. (`err = tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{ Type: meta.ChargeTypeCreditPurchase, Charges: []meta.IDWithUniqueReferenceID{...} })`) +**Keyset pagination via explicit cursor predicates** — ListFundedCreditActivities orders by (GrantedAt, CreditPurchase.CreatedAt, ChargeID) and builds tie-broken Or/And predicates (fundedCreditActivityAfterPredicate/BeforePredicate); fetches Limit+1 to compute hasMore and reverses items for Before. (`query.Order(dbchargecreditpurchasecreditgrant.ByGrantedAt(sql.OrderDesc()), ...ByCreditPurchaseField(...CreatedAt, sql.OrderDesc()), ...ByChargeID(sql.OrderDesc()))`) +**Tx plumbing trio: Tx/WithTx/Self** — adapter implements the entutils transacting contract: Tx hijacks a tx, WithTx rebuilds the adapter from raw tx config, Self returns the receiver. (`func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txDb := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txDb.Client(), ...} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config, New constructor, the adapter struct, and Tx/WithTx/Self transaction plumbing | WithTx must carry logger and metaAdapter forward; Tx uses ReadOnly:false | +| `charge.go` | Charge CRUD: CreateCharge, UpdateCharge, GetByID, GetByIDs, ListCharges, and withExpands edge loader | CreateCharge must call metaAdapter.RegisterCharges; GetByIDs uses entutils.InIDOrder to preserve input order; ExpandRealizations loads three edges together | +| `creditgrant.go` | CreateCreditGrant - persists a ChargeCreditPurchaseCreditGrant and returns a ledgertransaction.TimedGroupReference | GrantedAt is forced to time.UTC on both write and read | +| `funded_credit_activity.go` | ListFundedCreditActivities keyset-paginated query plus after/before cursor predicates | package-level ListFundedCreditActivities takes a raw *db.Client; cursor tie-breaking spans three columns; Before path reverses results | +| `mapper.go` | Map*FromDB converters from Ent entities to creditpurchase domain types | realization edges are only mapped when expands.Has(meta.ExpandRealizations); not-loaded edges surface as errors, not nil | +| `payment.go` | Create/Update for External and Invoiced payment settlements via payment.CreateExternal/UpdateExternal/CreateInvoiced/UpdateInvoiced helpers | builder mutation is delegated to the payment models package; only ChargeID is set locally before handing off | +| `funded_credit_activity_test.go` | Postgres-backed suite for cursor pagination, currency filter, and as-of filter | uses testutils.InitPostgresDB + migrate.OMMigrationsConfig; inserts raw Ent rows rather than going through the service | + +## Anti-Patterns + +- Using a.db directly inside a method instead of the tx-bound tx.db from entutils.TransactingRepo +- Mapping realization edges without first checking expands.Has(meta.ExpandRealizations) / using *OrErr +- Skipping input.Validate()/chargeID.Validate() before DB access +- Creating a charge without calling metaAdapter.RegisterCharges +- Dropping logger or metaAdapter when rebuilding the adapter in WithTx + +## Decisions + +- **Every adapter method re-binds to the ambient transaction via entutils.TransactingRepo even helpers handed a raw *entdb.Client** — Keeps Ent access transaction-aware regardless of caller, per the charges adapter convention in AGENTS.md +- **Realization data (credit grant, external/invoiced payment) is loaded only under ExpandRealizations** — Avoids three extra joins on list/get hot paths and forces callers to opt in to the heavier read + +## Example: Adapter create method: validate, transact, persist via Ent builder, register in meta layer, map to domain + +``` +func (a *adapter) CreateCharge(ctx context.Context, in creditpurchase.CreateChargeInput) (creditpurchase.Charge, error) { + if err := in.Validate(); err != nil { + return creditpurchase.Charge{}, err + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (creditpurchase.Charge, error) { + create := tx.db.ChargeCreditPurchase.Create().SetNamespace(in.Namespace).SetCreditAmount(in.Intent.CreditAmount).SetSettlement(in.Intent.Settlement).SetStatusDetailed(creditpurchase.StatusCreated) + create, err := chargemeta.Create(create, chargemeta.CreateInput{Namespace: in.Namespace, Intent: in.Intent.Intent, Status: meta.ChargeStatusCreated}) + if err != nil { return creditpurchase.Charge{}, err } + dbCreditPurchase, err := create.Save(ctx) + if err != nil { return creditpurchase.Charge{}, err } + if err := tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{Namespace: in.Namespace, Type: meta.ChargeTypeCreditPurchase, Charges: []meta.IDWithUniqueReferenceID{{ID: dbCreditPurchase.ID, UniqueReferenceID: dbCreditPurchase.UniqueReferenceID}}}); err != nil { return creditpurchase.Charge{}, err } + return MapCreditPurchaseChargeFromDB(dbCreditPurchase, meta.ExpandNone) + }) +} +``` + + diff --git a/openmeter/billing/charges/creditpurchase/lineengine/CLAUDE.md b/openmeter/billing/charges/creditpurchase/lineengine/CLAUDE.md new file mode 100644 index 0000000000..a281103e67 --- /dev/null +++ b/openmeter/billing/charges/creditpurchase/lineengine/CLAUDE.md @@ -0,0 +1,44 @@ +# lineengine + + + +> Billing LineEngine/LineCalculator implementation for credit-purchase invoice lines (LineEngineTypeChargeCreditPurchase). Turns gathering lines into rated standard invoice lines and supplies the lifecycle hook surface the billing invoice state machine calls. + +## Patterns + +**Engine satisfies both billing.LineEngine and billing.LineCalculator** — Compile-time asserted with var _ billing.LineEngine / _ billing.LineCalculator = (*Engine)(nil); GetLineEngineType returns billing.LineEngineTypeChargeCreditPurchase. (`var ( _ billing.LineEngine = (*Engine)(nil); _ billing.LineCalculator = (*Engine)(nil) )`) +**Constructor validates RatingService dependency** — New(Config) returns *Engine; Config.Validate() requires a non-nil rating.Service which is the only dependency. (`func (c Config) Validate() error { if c.RatingService == nil { return fmt.Errorf("rating service is required") } ... }`) +**Credit purchases are never progressively billed** — IsLineBillableAsOf always returns true (no partial-period filtering) and SplitGatheringLine returns an error; encode this invariant rather than implementing splitting. (`func (e *Engine) SplitGatheringLine(...) (...) { return billing.SplitGatheringLineResult{}, fmt.Errorf("credit purchase line is not progressively billed") }`) +**Calculation delegates to rating + invoicecalc merge** — CalculateLines requires Invoice.ID and a non-nil ChargeID per line, calls ratingService.GenerateDetailedLines, then invoicecalc.MergeGeneratedDetailedLines, then stdLine.Validate(). (`generatedDetailedLines, err := e.ratingService.GenerateDetailedLines(stdLine); invoicecalc.MergeGeneratedDetailedLines(stdLine, generatedDetailedLines)`) +**Most lifecycle hooks are inert pass-throughs** — OnCollectionCompleted/OnStandardInvoiceCreated return input.Lines unchanged; OnMutableStandardLinesDeleted/OnInvoiceIssued/OnPaymentAuthorized/OnPaymentSettled/OnUnsupportedCreditNote return nil. Side effects live in the service, not the engine. (`func (e *Engine) OnPaymentSettled(_ context.Context, _ billing.OnPaymentSettledInput) error { return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `engine.go` | Whole package: Config/New, the engine type tag, line building (BuildStandardInvoiceLines, BuildStandardLinesForGatheringPreview), CalculateLines, and the no-op lifecycle hooks | BuildStandardInvoiceLines converts each gathering line via AsNewStandardLine then routes through CalculateLines; CalculateLines hard-requires stdLine.ChargeID != nil | + +## Anti-Patterns + +- Implementing SplitGatheringLine or partial-period billing logic - credit purchases bill in full +- Putting credit-grant/payment side effects into engine hooks instead of the creditpurchase service +- Calculating a line whose ChargeID is nil or whose Invoice.ID is empty + +## Decisions + +- **The engine is calculation-only; ledger/payment side effects stay in the service layer and its hooks are no-ops** — Keeps the billing invoice state machine's engine contract pure while credit/payment realization is driven by creditpurchase.Service +- **Credit-purchase lines are modeled as a flat in-advance price computed at gathering time** — Credit purchases are one-shot, non-progressive charges, so there is no usage to meter or period to split + +## Example: Building and rating standard invoice lines for credit purchases + +``` +func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error) { + stdLines, err := slicesx.MapWithErr(input.GatheringLines, func(gl billing.GatheringLine) (*billing.StandardLine, error) { + return gl.AsNewStandardLine(input.Invoice.ID) + }) + if err != nil { return nil, err } + return e.CalculateLines(billing.CalculateLinesInput{Invoice: input.Invoice, Lines: stdLines}) +} +``` + + diff --git a/openmeter/billing/charges/creditpurchase/service/CLAUDE.md b/openmeter/billing/charges/creditpurchase/service/CLAUDE.md new file mode 100644 index 0000000000..ea9bffd1f2 --- /dev/null +++ b/openmeter/billing/charges/creditpurchase/service/CLAUDE.md @@ -0,0 +1,65 @@ +# service + + + +> Service layer that drives the credit-purchase charge lifecycle: creates the charge, runs settlement-type-specific state machines (promotional/invoice/external), grants ledger credit, backfills lineage, and records payment settlements. Implements creditpurchase.Service. + +## Patterns + +**Constructor validates four collaborators** — New(Config) returns creditpurchase.Service; Config.Validate() collects errors for nil Adapter, Handler, Lineage, MetaAdapter via errors.Join. The service struct holds exactly these. (`func (c Config) Validate() error { var errs []error; if c.Adapter == nil { errs = append(errs, errors.New("adapter cannot be null")) } ...; return errors.Join(errs...) }`) +**Public methods wrap work in transaction.Run** — Create/List/GetByIDs/ListFundedCreditActivities and the External/Invoice handlers run inside transaction.Run(ctx, s.adapter, ...) or RunWithNoValue; the adapter is the transaction driver. (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (creditpurchase.ChargeWithGatheringLine, error) { ... })`) +**Settlement-type switch on Create dispatches lifecycle** — Create normalizes/validates input, persists via adapter.CreateCharge, then switches charge.Intent.Settlement.Type(): Promotional runs the state machine, Invoice is a noop (driven later by invoice hooks) and returns a GatheringLineToCreate, External calls onExternalCreditPurchase. (`switch charge.Intent.Settlement.Type() { case creditpurchase.SettlementTypePromotional: stateMachine, _ := NewPromotionalCreditPurchaseStateMachine(...); advancedCharge, _ := stateMachine.AdvanceUntilStateStable(ctx) ... }`) +**Credit grant always pairs with lineage backfill** — After OnCreditPurchase* yields a ledger TransactionGroupID, code calls adapter.CreateCreditGrant then, if the group id is non-empty, lineage.BackfillAdvanceLineageSegments with namespace/customer/currency/amount/featureFilters. (`if ledgerTransactionGroupReference.TransactionGroupID != "" { s.lineage.BackfillAdvanceLineageSegments(ctx, lineage.BackfillAdvanceLineageSegmentsInput{...}) }`) +**State machines composed from chargestatemachine.Machine** — newStateMachineBase wires chargestatemachine.New with Persistence{UpdateBase->adapter.UpdateCharge, Refetch->adapter.GetByID with ExpandRealizations}. Concrete machines (e.g. PromotionalCreditpurchaseStateMachine) call configureStates to Permit(meta.TriggerNext, ...) and OnEntry(statelessx.EntryFunc(...)). (`s.Configure(creditpurchase.StatusFinal).OnEntry(statelessx.EntryFunc(s.GrantPromotionalCredit))`) +**Payment realization through ledger handler then adapter** — External/Invoice payment transitions call s.handler.OnCreditPurchasePaymentAuthorized/Settled to obtain a ledger group reference, then persist via adapter.Create/UpdateExternalPayment or Create/UpdateInvoicedPayment, with idempotency guards on existing settlements. (`ledgerRef, _ := s.handler.OnCreditPurchasePaymentAuthorized(ctx, creditpurchase.PaymentEventInput{Charge: charge, EventAt: eventAt}); s.adapter.CreateExternalPayment(ctx, charge.GetChargeID(), newPaymentSettlement)`) +**Invoice-settled side effects are gathering-line + post-hooks** — Invoice settlement does not act during Create; buildInvoiceCreditPurchaseGatheringLine emits a non-taxable flat in-advance GatheringLine (annotated AnnotationKeyTaxable=false, AnnotationKeyReason=CreditPurchase), and PostInvoiceDraftCreated/PaymentAuthorized/PaymentSettled run from billing PostUpdate hooks. (`annotations[billing.AnnotationKeyTaxable] = lo.ToPtr("false"); annotations[billing.AnnotationKeyReason] = lo.ToPtr(billing.AnnotationValueReasonCreditPurchase)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config/Validate, New, and the service struct (adapter, metaAdapter, handler, lineage) | all four deps are mandatory; struct field set must mirror Config | +| `create.go` | Create entrypoint with the settlement-type switch and buildInvoiceCreditPurchaseGatheringLine | Invoice case is intentionally a noop at create time and returns ChargeWithGatheringLine.GatheringLineToCreate; total cost = CreditAmount * CostBasis rounded by currency calculator | +| `external.go` | onExternalCreditPurchase plus HandleExternalPaymentAuthorized/Settled - drives external settlement to Active/Final | InitialStatus determines whether authorized/settled transitions fire; guards ErrPaymentAlreadyAuthorized / ErrCannotSettleNotAuthorizedPayment / ErrPaymentAlreadySettled | +| `invoice.go` | PostInvoiceDraftCreated/PostInvoicePaymentAuthorized/PostInvoicePaymentSettled invoked from billing PostUpdate hooks | these run already inside a billing transaction; they grant credit on draft, then create/settle the invoiced payment and flip status to Final | +| `promotional.go` | grantPromotionalCredit and the PromotionalCreditpurchaseStateMachine (configureStates, GrantPromotionalCredit) | rejects an already-realized credit grant; Final state OnEntry grants credit; both Created and Active permit TriggerNext->Final | +| `statemachine.go` | stateMachine base wrapping chargestatemachine.Machine with Persistence (UpdateBase, Refetch) | Refetch must expand meta.ExpandRealizations or downstream mapping fails; StateMachineConfig.Validate requires Charge.ID and Adapter | +| `get.go / funded_credit_activity.go` | Read-side List/GetByIDs and ListFundedCreditActivities, each transaction.Run + adapter delegation | thin wrappers; only add validation, do not bypass transaction.Run | +| `promotional_test.go` | Mock-driven unit tests for the promotional state machine using fake adapter/handler/lineage | lineage mock is matched on namespace/customer/currency/amount; tests assert single CreateCreditGrant call and Final status | + +## Anti-Patterns + +- Granting credit without immediately backfilling lineage via lineage.BackfillAdvanceLineageSegments when the ledger group id is non-empty +- Acting on invoice-settlement charges during Create instead of deferring to PostInvoice* hooks +- Bypassing the settlement-type state machine and mutating charge.Status directly outside the lifecycle methods +- Building a Refetch in a state machine without meta.ExpandRealizations (realizations come back unmapped) +- Re-authorizing/settling a payment without the existing-settlement idempotency guards + +## Decisions + +- **Settlement type (Promotional/Invoice/External) selects a distinct lifecycle path, with promotional/external driven synchronously and invoice driven by billing invoice hooks** — Promotional/external grants happen at charge time, but invoiced credit purchases must follow the invoice state machine, so their grant/payment is deferred to PostInvoice* callbacks +- **Lifecycle progression is expressed as a chargestatemachine.Machine with OnEntry side effects rather than imperative status writes** — Keeps grant/transition effects coupled to state entry and reuses the shared charges state-machine framework for persistence and refetch +- **Ledger interaction is mediated by a Handler interface (OnCreditPurchaseInitiated/PaymentAuthorized/PaymentSettled/OnPromotionalCreditPurchase) injected into the service** — Decouples charge lifecycle from concrete ledger wiring and lets tests substitute a fake handler + +## Example: Create dispatches on settlement type and advances the promotional state machine + +``` +func (s *service) Create(ctx context.Context, input creditpurchase.CreateInput) (creditpurchase.ChargeWithGatheringLine, error) { + input.Intent = input.Intent.Normalized() + if err := input.Validate(); err != nil { return creditpurchase.ChargeWithGatheringLine{}, err } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (creditpurchase.ChargeWithGatheringLine, error) { + charge, err := s.adapter.CreateCharge(ctx, creditpurchase.CreateChargeInput(input)) + if err != nil { return creditpurchase.ChargeWithGatheringLine{}, err } + switch charge.Intent.Settlement.Type() { + case creditpurchase.SettlementTypePromotional: + sm, err := NewPromotionalCreditPurchaseStateMachine(StateMachineConfig{Charge: charge, Adapter: s.adapter, Service: s}) + if err != nil { return creditpurchase.ChargeWithGatheringLine{}, err } + advanced, err := sm.AdvanceUntilStateStable(ctx) + if err != nil { return creditpurchase.ChargeWithGatheringLine{}, err } + if advanced != nil { charge = *advanced } + case creditpurchase.SettlementTypeExternal: + charge, err = s.onExternalCreditPurchase(ctx, charge) +// ... +``` + + diff --git a/openmeter/billing/charges/flatfee/CLAUDE.md b/openmeter/billing/charges/flatfee/CLAUDE.md new file mode 100644 index 0000000000..ce631878b2 --- /dev/null +++ b/openmeter/billing/charges/flatfee/CLAUDE.md @@ -0,0 +1,65 @@ +# flatfee + + + +> Flat-fee charge type package: defines the domain model (Charge/ChargeBase, Intent, State, RealizationRun) and the segmented Adapter/Handler/Service interface contracts for fixed-amount charges, including proration math and the dotted per-settlement-mode Status hierarchy. The package root holds value types and interfaces only; service/ implements lifecycle state machines and adapter/ implements Ent persistence. + +## Patterns + +**Every input/domain type has a Validate() that collects errs** — All structs implement Validate() accumulating into var errs []error and returning models.NewNillableGenericValidationError(errors.Join(errs...)), wrapping nested errors with field context via fmt.Errorf("field: %w", err). (`func (i CreateChargesInput) Validate() error { var errs []error; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Segmented adapter interfaces composed into one Adapter** — Adapter embeds ChargeAdapter, ChargeDetailedLineAdapter, ChargeCreditAllocationAdapter, ChargeRunAdapter, ChargeInvoicedUsageAdapter, ChargePaymentAdapter plus entutils.TxCreator. New persistence methods go on the narrow sub-interface, not a monolith. (`type Adapter interface { ChargeAdapter; ChargeDetailedLineAdapter; ...; entutils.TxCreator }`) +**Status strings hierarchically encode meta.ChargeStatus** — Status constants are dotted paths (e.g. "active.realization.started"); ToMetaChargeStatus() splits on the first '.' and validates the prefix against meta.ChargeStatus. Never persist a flat-fee Status without mapping through ToMetaChargeStatus(). (`metaStatus := meta.ChargeStatus(strings.SplitN(string(s), ".", 2)[0])`) +**Update inputs use mo.Option for partial patches** — UpdateRealizationRunInput fields are mo.Option[T]; only IsPresent() fields are written, and Validate() guards each present field individually (non-empty LineID, non-zero DeletedAt, etc.). (`Type mo.Option[RealizationRunType]; LineID mo.Option[*string]; if r.LineID.IsPresent() { ... }`) +**Decimal amounts rounded through the currency Calculator** — All monetary math (Intent.Normalized, CalculateAmountAfterProration) obtains i.Currency.Calculator() and calls RoundToPrecision before returning; negative amounts are a validation error everywhere. (`calc, err := i.Currency.Calculator(); return calc.RoundToPrecision(amount), nil`) +**Normalized() canonicalizes timestamps/periods before compare/persist** — Intent, State, RealizationRunBase, and UpdateRealizationRunInput expose Normalized() routing through meta.NormalizeTimestamp / NormalizeOptionalTimestamp / NormalizeClosedPeriod so equality and persistence are stable. (`s.AdvanceAfter = meta.NormalizeOptionalTimestamp(s.AdvanceAfter)`) +**Handler is an event-callback contract returning ledger/credit values** — Handler methods (OnAllocateCredits, OnInvoiceUsageAccrued, OnCorrectCreditAllocations, OnPayment*) take an *Input value and return creditrealization/ledgertransaction value types; they describe lifecycle events, not direct persistence. (`OnAllocateCredits(ctx, OnAllocateCreditsInput) (creditrealization.CreateAllocationInputs, error)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `charge.go` | Core domain model: ChargeBase (meta.ManagedResource + Intent + Status + State), Charge (adds Realizations, is the meta.ChargeAccessor), Intent with proration config, State, Realizations.GetByLineID. | Mutate Charge via WithStatus/WithBase, not piecemeal field assignment. Intent.Normalized rounds AmountBeforeProration — call it before persisting. | +| `charge.go (CalculateAmountAfterProration)` | Proration math: returns AmountBeforeProration unchanged unless ProRating.Enabled and Mode==ProRatePrices and ServicePeriod < FullServicePeriod. | Proration must never increase the amount; zero-length or ServicePeriod>=FullServicePeriod returns the full amount; result is currency-rounded. See charge_test.go for the 15/31-day and JPY zero-decimal cases. | +| `adapter.go` | Declares the composed Adapter interface, its narrow sub-interfaces, and create/get input types (CreateChargesInput, CreateCurrentRunInput, GetByIDsInput, IntentWithInitialStatus). | validateExpands enforces ExpandDetailedLines requires ExpandRealizations and ExpandDeletedRealizations requires ExpandRealizations. CreateCurrentRunInput requires LineID and InvoiceID together (both nil or both set). | +| `realizationrun.go` | RealizationRun model: RealizationRunBase, RealizationRun (adds CreditRealizations/AccruedUsage/Payment/DetailedLines), RealizationRunType enum, UpdateRealizationRunInput, IsVoidedBillingHistory. | InitialType must never be RealizationRunTypeInvalidDueToUnsupportedCreditNote (validation rejects it). Immutable runs cannot mutate the invoice line in place — deletion requires a credit note. IsVoidedBillingHistory is true for voided-type or DeletedAt!=nil runs. | +| `statemachine.go` | Defines the Status enum (dotted hierarchy) and ToMetaChargeStatus mapping; the actual state machines live in service/. | Adding a Status requires updating both the const block and Values(); the dotted prefix must be a valid meta.ChargeStatus or ToMetaChargeStatus fails. | +| `handler.go` | Handler interface plus its On*Input value types (OnAllocateCreditsInput, OnInvoiceUsageAccruedInput, CorrectCreditAllocationsInput, PaymentEventInput). | CorrectCreditAllocationsInput has both Validate() and ValidateWith(currencyCalculator) — currency-sensitive correction checks only run in ValidateWith. OnPaymentAuthorized/Settled share the PaymentEventInput alias. | +| `bookedat.go` | UsageBookedAt: ledger booking time = ServicePeriod.To for InArrears, ServicePeriod.From otherwise. | Drives credit/ledger booking timestamps — keep aligned with productcatalog.PaymentTermType semantics. | +| `detailedline.go / prorating.go` | detailedline.go aliases DetailedLine = stddetailedline.Base and adds DetailedLines Clone/Validate; prorating.go maps productcatalog ProRating modes to ProRatingModeAdapterEnum. | ProRatingModeAdapterEnum adds a no_prorate value absent from productcatalog — keep Values() in sync when persisting the adapter-side mode. | + +## Anti-Patterns + +- Returning on the first invalid field instead of collecting into var errs []error and joining via models.NewNillableGenericValidationError. +- Persisting a flat-fee Status or amount without normalizing (Normalized()) and mapping through ToMetaChargeStatus() / currency RoundToPrecision first. +- Adding a persistence method to a fat single interface rather than the correct narrow sub-interface (ChargeAdapter/ChargeRunAdapter/...). +- Allowing proration to increase the amount, or skipping the zero-length / ServicePeriod>=FullServicePeriod guards in CalculateAmountAfterProration. +- Mutating an invoice line in place for an Immutable RealizationRun instead of issuing a credit note, or setting InitialType to the unsupported-credit-note voided type. + +## Decisions + +- **Status is a dotted string hierarchy rather than a flat enum.** — Fine-grained lifecycle states (active.realization.*) collapse to coarse meta.ChargeStatus via a prefix split, so the broader billing system sees a small stable status set while flat-fee tracks detailed realization progress. +- **The Adapter is split into six narrow capability interfaces composed into one.** — Charge, run, detailed-line, credit-allocation, payment, and invoiced-usage persistence concerns evolve independently and can be mocked/implemented in isolation while still backed by one Ent adapter struct. +- **Domain types carry both Validate() and Normalized(), and amount math is currency-aware in the model layer.** — Proration and rounding correctness is a billing invariant; keeping it on Intent/RealizationRun (not the service) guarantees every caller — production wiring and tests — gets identical rounded, validated values. + +## Example: Currency-aware proration on the Intent domain type + +``` +func (i Intent) CalculateAmountAfterProration() (alpacadecimal.Decimal, error) { + if !i.ProRating.Enabled || i.ProRating.Mode != productcatalog.ProRatingModeProratePrices { + return i.AmountBeforeProration, nil + } + sp := int64(i.ServicePeriod.Duration()) + full := int64(i.FullServicePeriod.Duration()) + if sp == 0 || full == 0 || sp >= full { + return i.AmountBeforeProration, nil + } + pct := alpacadecimal.NewFromInt(sp).Div(alpacadecimal.NewFromInt(full)) + calc, err := i.Currency.Calculator() + if err != nil { + return alpacadecimal.Decimal{}, fmt.Errorf("creating currency calculator: %w", err) + } + return calc.RoundToPrecision(i.AmountBeforeProration.Mul(pct)), nil +// ... +``` + + diff --git a/openmeter/billing/charges/flatfee/adapter/CLAUDE.md b/openmeter/billing/charges/flatfee/adapter/CLAUDE.md new file mode 100644 index 0000000000..d20c9fd293 --- /dev/null +++ b/openmeter/billing/charges/flatfee/adapter/CLAUDE.md @@ -0,0 +1,65 @@ +# adapter + + + +> Ent-backed persistence adapter for flat-fee charges and their realization runs. It implements the segmented flatfee.Adapter interfaces (ChargeAdapter, ChargeRunAdapter, ChargeDetailedLineAdapter, ChargeCreditAllocationAdapter, ChargePaymentAdapter, ChargeInvoicedUsageAdapter) over the ChargeFlatFee* Ent tables, and is the only place SQL-shaped operations for flat-fee charges live. + +## Patterns + +**Transaction-aware via entutils.TransactingRepo** — Every write/read method body is wrapped in entutils.TransactingRepo (value-returning) or entutils.TransactingRepoWithNoValue (no value), rebinding to the tx carried in ctx. The adapter implements Tx/WithTx/Self to participate in entutils transactions. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (flatfee.ChargeBase, error) { ... tx.db.ChargeFlatFee.UpdateOneID(...) ... })`) +**Validate inputs before persisting** — Methods call input/charge Validate() (e.g. charge.ManagedModel.Validate(), in.Validate(), runID.Validate()) before touching the DB, returning early on error. (`if err := in.Validate(); err != nil { return nil, err }`) +**Namespace-scoped queries always** — Every Ent query/update filters by namespace (dbchargeflatfee.NamespaceEQ / .Namespace) in addition to ID — multi-tenant isolation is mandatory. (`tx.db.ChargeFlatFee.UpdateOneID(charge.ID).Where(dbchargeflatfee.NamespaceEQ(charge.Namespace))`) +**Map* functions for DB<->domain conversion** — All conversion lives in mapper.go as MapChargeFlatFeeFromDB / MapChargeBaseFromDB / mapRealizationRunFromDB. Edges are read via *OrErr() and a NotLoadedError is turned into an explicit 'not loaded' error rather than silently zero-valued. (`dbCreditsAllocated, err := dbRun.Edges.CreditAllocationsOrErr(); if _, ok := lo.ErrorsAs[*entdb.NotLoadedError](err); ok { return ..., fmt.Errorf("credits allocated not loaded ...") }`) +**Expands gate eager-loading** — Realization edges are loaded only when meta.Expands.Has(meta.ExpandRealizations) via expandRealizations(query); detailed lines are fetched separately when ExpandDetailedLines is set. Mapping respects the same flag so unloaded edges are never dereferenced. (`if input.Expands.Has(meta.ExpandRealizations) { query = expandRealizations(query) }`) +**Soft-delete + upsert for detailed lines** — UpsertDetailedLines soft-deletes (SetDeletedAt) rows whose ChildUniqueReferenceID is not in the new set, then CreateBulk with OnConflict on (namespace, run_id, child_unique_reference_id) WHERE deleted_at IS NULL, ignoring created_at/id. (`OnConflict(sql.ConflictColumns(FieldNamespace, FieldRunID, FieldChildUniqueReferenceID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt)), sql.ResolveWithNewValues(), ...)`) +**Register/Deregister charge IDs with the meta adapter** — CreateCharges calls tx.metaAdapter.RegisterCharges and DeleteCharge calls tx.metaAdapter.DeleteRegisteredCharge inside the same tx, keeping the shared charge-meta registry in sync with flat-fee rows. (`err = tx.metaAdapter.RegisterCharges(ctx, meta.RegisterChargesInput{Namespace: in.Namespace, Type: meta.ChargeTypeFlatFee, Charges: ...})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{MetaAdapter, Client, Logger} + New() returning flatfee.Adapter; implements Tx/WithTx/Self for entutils transactions. | Config.Validate() requires all three fields non-nil. WithTx rebuilds the adapter from raw tx config — do not bypass it by holding the original db client across a tx. | +| `charge.go` | ChargeAdapter: CreateCharges (bulk), UpdateCharge, UpdateSubscriptionItemID, DeleteCharge, GetByID(s); plus expandRealizations and buildCreateFlatFeeCharge. | Status must be converted via charge.Status.ToMetaChargeStatus() and persisted through chargemeta.Create/Update — do not write status fields directly. InvoiceAt is normalized via meta.NormalizeTimestamp(...).In(time.UTC). | +| `mapper.go` | DB->domain mappers and proRatingConfigFromDB/ToDB enum conversion; sortDetailedLines via stddetailedline.Compare. | Edge OrErr() NotLoadedError handling is load-bearing; CurrentRealizationRunID drives CurrentRun vs PriorRuns split — a current run id with no loaded run is an error. | +| `realizationrun.go` | ChargeRunAdapter: CreateCurrentRun (locks charge ForUpdate, rejects if a current run exists), UpdateRealizationRun (mo.Option-gated field sets), DetachCurrentRun. | CreateCurrentRun uses ForUpdate() to serialize; it errors with 'already has current run'. UpdateRealizationRun applies only Present() fields and calls input.Normalized() first. | +| `detailedline.go` | ChargeDetailedLineAdapter: FetchCurrentRunDetailedLines and UpsertDetailedLines (soft-delete + bulk upsert). | FetchCurrentRunDetailedLines requires charge.Realizations.CurrentRun != nil. UpsertDetailedLines clones each line, clears DeletedAt, and only deletes lines NOT in childRefsToKeep — an empty new set deletes all. | +| `credits.go` | ChargeCreditAllocationAdapter: CreateCreditAllocations bulk-inserts ChargeFlatFeeRunCreditAllocations after verifying the run exists. | Uses creditrealization.Create(create, namespace, idx, input) per row; run existence is checked with Only(ctx) before insert. | +| `payment.go` | ChargePaymentAdapter: CreatePayment / UpdatePayment over ChargeFlatFeeRunPayment using payment.CreateInvoiced/UpdateInvoiced builders. | Maps back via payment.MapInvoicedFromDB; update is namespace-scoped by UpdateOneID + Where(Namespace). | +| `usage.go` | ChargeInvoicedUsageAdapter: CreateInvoicedUsage sets the run's LineID/InvoiceID then inserts ChargeFlatFeeRunInvoicedUsage. | Two writes in one tx (run refs update + invoiced-usage create) must stay atomic; uses invoicedusage.Create builder helper. | + +## Anti-Patterns + +- Calling tx.db / a.db Ent builders outside an entutils.TransactingRepo(WithNoValue) wrapper, breaking transaction propagation carried in ctx. +- Querying or updating ChargeFlatFee* tables without a namespace predicate (cross-tenant leakage). +- Dereferencing realization/credit/usage/payment edges without checking *OrErr() NotLoadedError, or mapping realizations when ExpandRealizations was not requested. +- Writing StatusDetailed or meta fields directly instead of going through chargemeta.Create/Update and ToMetaChargeStatus(). +- Creating a second current run without honoring the ForUpdate lock and CurrentRealizationRunID nil check in CreateCurrentRun. + +## Decisions + +- **Adapter split into many small interface implementations (Charge/Run/DetailedLine/CreditAllocation/Payment/InvoicedUsage) all backed by one *adapter struct.** — Lets the service layer depend on narrow capabilities while keeping a single transactional Ent client and meta-registry wiring. +- **Detailed lines are upserted by ChildUniqueReferenceID with soft-delete rather than delete-and-reinsert.** — Preserves row identity/created_at and external invoicing references across re-realizations while idempotently replacing the line set. +- **Charge IDs are reserved/released in the shared meta adapter inside the same transaction as the flat-fee row.** — Keeps the polymorphic charge registry consistent with the concrete flat-fee table so meta queries resolve correctly. + +## Example: Standard transaction-aware, namespace-scoped, validate-first adapter method returning a mapped domain value. + +``` +func (a *adapter) GetByID(ctx context.Context, input flatfee.GetByIDInput) (flatfee.Charge, error) { + if err := input.Validate(); err != nil { + return flatfee.Charge{}, err + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (flatfee.Charge, error) { + query := tx.db.ChargeFlatFee.Query(). + Where(dbchargeflatfee.Namespace(input.ChargeID.Namespace)). + Where(dbchargeflatfee.ID(input.ChargeID.ID)) + if input.Expands.Has(meta.ExpandRealizations) { + query = expandRealizations(query) + } + entity, err := query.First(ctx) + if err != nil { + if db.IsNotFound(err) { + return flatfee.Charge{}, models.NewGenericNotFoundError(fmt.Errorf("flat fee charge [id=%s] not found", input.ChargeID)) +// ... +``` + + diff --git a/openmeter/billing/charges/flatfee/service/CLAUDE.md b/openmeter/billing/charges/flatfee/service/CLAUDE.md new file mode 100644 index 0000000000..38b3daee42 --- /dev/null +++ b/openmeter/billing/charges/flatfee/service/CLAUDE.md @@ -0,0 +1,65 @@ +# service + + + +> Service layer for flat-fee charges: owns the per-settlement-mode lifecycle state machines (credit_only, credit_then_invoice), the billing.LineEngine implementation that bridges charges to standard invoice lines, charge creation, and fiat payment authorization/settlement. It makes all lifecycle/state decisions and delegates realization mechanics (credit math, line/totals persistence) to the realizations/ child Service. + +## Patterns + +**Public methods are transaction.Run wrappers over the adapter** — Every exported service method validates its input then runs the body inside transaction.Run(ctx, s.adapter, ...) (or RunWithNoValue). Reads and writes both go through this so the adapter rebinds to the tx in ctx. (`func (s *service) GetByID(ctx, input) (...) { if err := input.Validate(); err != nil { return ... }; return transaction.Run(ctx, s.adapter, func(ctx) {...}) }`) +**One state machine type per settlement mode** — Each settlement mode has its own *StateMachine embedding *stateMachine. Constructors (NewCreditsOnlyStateMachine, NewCreditThenInvoiceStateMachine) hard-assert config.Charge.Intent.SettlementMode, call newStateMachineBase, then configureStates(). newStateMachine() in triggers.go dispatches by SettlementMode and errors with NewGenericNotImplementedError otherwise. (`if config.Charge.Intent.SettlementMode != productcatalog.CreditThenInvoiceSettlementMode { return nil, fmt.Errorf(...) }`) +**States declared via fluent Configure/Permit/OnActive DSL** — configureStates() wires transitions with s.Configure(status).Permit(meta.TriggerX, nextStatus, statelessx.BoolFn(guard)).InternalTransition(meta.TriggerExtend, statelessx.WithParameters(s.ExtendCharge)).OnActive(action). Guards are bool methods; actions are ctx-taking methods on the machine. (`s.Configure(flatfee.StatusCreated).Permit(meta.TriggerNext, flatfee.StatusActive, statelessx.BoolFn(s.IsInsideServicePeriod))`) +**LineEngine drives the machine, never persists lines directly** — LineEngine handlers (OnStandardInvoiceCreated, OnInvoiceIssued, OnCollectionCompleted) load the charge, build a state machine, Fire/AdvanceUntilStateStable, then mutate the passed *billing.StandardLine in place via populateFlatFeeStandardLineFromRun and return it; billing persists. (`stateMachine.FireAndActivate(ctx, meta.TriggerFinalInvoiceCreated, billing.StandardLineWithInvoiceHeader{Line: stdLine, Invoice: input.Invoice})`) +**Mutate charge in-memory; the machine persists on stabilization** — Action methods set s.Charge.State/Intent/Status/Realizations.CurrentRun and AddInvoicePatch(...); they do NOT call UpdateCharge themselves (chargestatemachine.Persistence.UpdateBase handles it). AdvanceAfter is cleared via the StatusFinal ClearAdvanceAfter OnActive hook. (`s.Charge.Realizations.CurrentRun = &result.Run; s.Charge.State.AdvanceAfter = nil`) +**Charge mutation always under the charge lock** — AdvanceCharge and TriggerPatch route through withLockedCharge, which takes charges.NewLockKeyForCharge + locker.LockForTX inside a tx, re-fetches with meta.ExpandRealizations, then runs fn. Invoice patches are drained via stateMachine.DrainInvoicePatches() into the result. (`key, _ := charges.NewLockKeyForCharge(chargeID); s.locker.LockForTX(ctx, key)`) +**Round through the currency Calculator before compare/persist** — Amounts are rounded via intent.Currency.Calculator().RoundToPrecision before negativity checks, credit allocation, or totals equality assertions. Mapped line totals are reconciled against run.Totals and an error returned on mismatch. (`amount := currencyCalculator.RoundToPrecision(s.Charge.State.AmountAfterProration); if amount.IsNegative() { return fmt.Errorf(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config/New constructor + service struct; wires realizations sub-Service, holds creditNotesSupported atomic.Bool; GetLineEngine() returns *LineEngine; asserts flatfee.FlatFeeService. | SetCreditNotesSupportedByLineUpdater requires *testing.T and must never run in production; New seeds creditNotesSupported from charges.CreditNotesSupportedByLineUpdater. | +| `statemachine.go` | stateMachine base embedding chargestatemachine.Machine; newStateMachineBase wires Persistence{UpdateBase, Refetch}; shared guards/actions (IsInsideServicePeriod, AdvanceAfterServicePeriodFrom/To, ClearAdvanceAfter). | Refetch always expands meta.ExpandRealizations; guards read clock.Now() so tests must clock.FreezeTime. | +| `creditheninvoice.go` | CreditThenInvoiceStateMachine: full realization lifecycle (active -> realization started/processing/issuing/completed -> awaiting payment settlement -> final); generateInvoicePatches handles extend/shrink and the immutable-invoice fallback. | When !CreditNotesSupported and currentRun.Immutable with a changed amount, only a delete patch is emitted to avoid double-charging; zero-amount patches drive StatusFinal/StatusCreated transitions explicitly. | +| `creditsonly.go` | CreditsOnlyStateMachine: created -> active -> final, AllocateCredits at final (via realizations.AllocateCreditsOnly), DeleteCharge honors CreditRefundPolicyCorrect. | Credit-only charges never touch the invoicing stack; DeleteCharge must CorrectAllCredits on existing lineage, not create raw negative rows. | +| `lineengine.go` | billing.LineEngine impl (LineEngineTypeChargeFlatFee): BuildStandardInvoiceLines, OnStandardInvoiceCreated, OnInvoiceIssued, OnCollectionCompleted, OnMutableStandardLinesDeleted, OnUnsupportedCreditNote, payment hooks; getChargesForStandardLineEvent batch-loads charges. | SplitGatheringLine returns an error (flat fee is not progressively billed); deletion handlers reject runs with AccruedUsage/Payment or that are still CurrentRun, and correct credits via realizations.CorrectAllCredits. | +| `payment.go` | postInvoicePaymentAuthorized/Settled: book fiat payment via handler.OnPaymentAuthorized/OnPaymentSettled and persist payment settlement rows; getPaymentTotal/validatePaymentRunForLine helpers. | getPaymentTotal errors on no-fiat runs, missing AccruedUsage, or zero totals; NoFiatTransactionRequired runs short-circuit before any payment booking. | +| `create.go` | Create(): bulk-builds flatfee.IntentWithInitialStatus, resolves feature IDs, calls adapter.CreateCharges, then builds gathering lines for credit_then_invoice non-zero charges via buildFlatFeeGatheringLine. | Credit-only and zero-amount charges return ChargeWithGatheringLine with no GatheringLineToCreate; buildFlatFeeGatheringLine rejects non-credit_then_invoice charges. | +| `triggers.go` | AdvanceCharge, TriggerPatch, newStateMachine dispatcher, withLockedCharge helper. | CreditNotesSupported is read via .Load() each time a machine is built; TriggerPatch drains invoice patches into meta.TriggerPatchResult. | + +## Anti-Patterns + +- Calling adapter writes (CreateCharges, CreatePayment, UpdateRealizationRun) outside a transaction.Run/RunWithNoValue block. +- Persisting the charge from inside an action method instead of mutating s.Charge and letting chargestatemachine.Persistence.UpdateBase write it on stabilization. +- Putting credit math, detailed-line construction, or totals persistence here instead of delegating to the realizations sub-Service (s.Realizations / s.service.realizations). +- Mutating or persisting invoice lines directly from a LineEngine handler instead of mutating the passed *billing.StandardLine and emitting invoiceupdater.Patch values. +- Mutating a charge without withLockedCharge, or skipping in.Validate()/RoundToPrecision before comparing or persisting amounts. + +## Decisions + +- **State machines are split per settlement mode rather than one parameterized machine.** — credit_only and credit_then_invoice have fundamentally different lifecycles (no invoicing stack vs. realization+payment), so each owns its own Configure graph and guards. +- **creditNotesSupported is an atomic.Bool read per state-machine build.** — Until the line updater can correct immutable invoice lines with credit notes, extend/shrink on already-invoiced periods must degrade to delete-only patches; the flag lets tests toggle the future behavior without rewiring. +- **The service makes lifecycle decisions; realizations/ is mechanics-only.** — Keeps the state graph and invoice-patch routing testable in one place while credit allocation/correction and detailed-line persistence stay a pure mechanics layer that cannot make transitions. + +## Example: A LineEngine handler advances the charge state machine and maps the resulting run back onto the standard line. + +``` +func (e *LineEngine) OnInvoiceIssued(ctx context.Context, input billing.OnInvoiceIssuedInput) error { + if err := input.Validate(); err != nil { + return fmt.Errorf("validating input: %w", err) + } + for _, stdLine := range input.Lines { + stateMachine, err := e.newStateMachineForStandardLine(ctx, stdLine) + if err != nil { + return err + } + if err := stateMachine.FireAndActivate(ctx, meta.TriggerInvoiceIssued, billing.StandardLineWithInvoiceHeader{ + Line: stdLine, + Invoice: input.Invoice, + }); err != nil { + return fmt.Errorf("triggering invoice_issued for charge[%s]: %w", stateMachine.GetCharge().ID, err) + } +// ... +``` + + diff --git a/openmeter/billing/charges/flatfee/service/realizations/CLAUDE.md b/openmeter/billing/charges/flatfee/service/realizations/CLAUDE.md new file mode 100644 index 0000000000..be3fb82e4f --- /dev/null +++ b/openmeter/billing/charges/flatfee/service/realizations/CLAUDE.md @@ -0,0 +1,63 @@ +# realizations + + + +> Owns flat-fee realization mechanics: credit allocation, credit correction, and detailed-line/run-totals persistence for the credit_then_invoice, credits-only, and invoice-accrued lifecycle modes. Strictly a mechanics layer — it must NOT make state-machine decisions (those live in the flatfee state machine that calls it). + +## Patterns + +**Input struct + Validate() per operation** — Every public Service method takes one named Input struct exposing a Validate() error that aggregates field errors via errors.Join and returns models.NewNillableGenericValidationError. The method calls in.Validate() first and returns the zero Result on failure. (`func (i ReconcileCreditRealizationsInput) Validate() error { var errs []error; if err := i.Charge.Validate(); err != nil { errs = append(errs, fmt.Errorf("charge: %w", err)) }; ... return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Named Result structs** — Methods return a dedicated Result struct (e.g. ReconcileCreditRealizationsResult, AccrueInvoiceUsageResult) carrying the persisted run, delta, and creditrealization.Realizations — never bare tuples of domain values. (`type StartCreditThenInvoiceRunResult struct { Run flatfee.RealizationRun }`) +**Wrap persistence in transaction.Run** — Any method that performs multiple adapter writes (create run, create credit allocations, upsert detailed lines, update run totals) wraps the body in transaction.Run(ctx, s.adapter, func(ctx)...). AllocateCreditsOnly, StartCreditThenInvoiceRun, ReconcileStandardLineToIntent, and AccrueInvoiceUsage all do this; pure-compute BuildCreditThenInvoiceGatheringPreviewRun does not (no ctx, no writes). (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (AccrueInvoiceUsageResult, error) { ... })`) +**Round through CurrencyCalculator before compare/persist** — Amounts are passed through in.CurrencyCalculator.RoundToPrecision before delta computation, equality checks, and persistence. Deltas drive a delta.IsPositive/IsNegative/IsZero switch (positive=allocate, negative=correct lineage, zero=no-op). (`in.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount); delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount))`) +**Delegate credit math to the flatfee Handler, persist via Adapter** — Credit allocation/correction decisions go through s.handler.OnAllocateCredits / OnCorrectCreditAllocations; persistence (CreateCurrentRun, CreateCreditAllocations, UpsertDetailedLines, UpdateRealizationRun, CreateInvoicedUsage) goes through s.adapter. The createCreditAllocations helper always pairs adapter.CreateCreditAllocations with lineage.CreateInitialLineages + PersistCorrectionLineageSegments. (`realizations, err := s.adapter.CreateCreditAllocations(ctx, runID, creditAllocations); ... s.lineage.CreateInitialLineages(ctx, ...)`) +**Rate line, then apply credits to derive detailed lines/totals** — rateFlatFeeLine clones the line, clears CreditsApplied and split metadata, calls ratingService.GenerateDetailedLines(WithCreditsMutatorDisabled), merges via invoicecalc.MergeGeneratedDetailedLines. applyCreditsToFlatFeeLine then re-applies CreditsApplied and recomputes Totals. Both validate before returning. (`line, err := rateFlatFeeLine(in.Line, s.ratingService); mappedLine, err := applyCreditsToFlatFeeLine(*line, creditsApplied, currencyCalculator)`) +**Tag credit allocations with LineID** — Allocation inputs from the handler are mapped to stamp allocation.LineID = run/line ID before persistence so credit realizations are linked to the originating invoice line. (`creditAllocationsWithLineID := creditrealization.CreateAllocationInputs(lo.Map(creditAllocations, func(a creditrealization.CreateAllocationInput, _ int) creditrealization.CreateAllocationInput { a.LineID = lo.ToPtr(in.Line.ID); return a }))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines Service struct (adapter flatfee.Adapter, handler flatfee.Handler, lineage lineage.Service, ratingService rating.Service), Config+Validate, New constructor, and the shared createCreditAllocations helper. | Service must NOT make state-machine decisions (documented contract). createCreditAllocations always runs CreateInitialLineages AND PersistCorrectionLineageSegments — never skip the lineage calls when adding a new credit path. | +| `correct.go` | ReconcileCredits (delta-driven allocate/correct/no-op) and CorrectAllCredits — adjust a run's credit realizations to a target or fully reverse them, loading active lineage segments via lineage.LoadActiveSegmentsByRealizationID. | Negative delta must correct existing lineage (Run.CreditRealizations.Correct), not create unrelated negative rows. TargetAmount is rounded before Validate. | +| `creditsonly.go` | AllocateCreditsOnly — credit allocation with no invoice line; updates the current run totals (CreditsTotal=allocated, Total=Zero) inside a transaction. | Asserts allocated.Equal(in.Amount) and returns NewGenericValidationError on mismatch. Requires Charge.Realizations.CurrentRun != nil. | +| `credittheninvoice.go` | StartCreditThenInvoiceRun (create mutable CTI run + allocate credits) and ReconcileStandardLineToIntent (re-sync a mutable line+run after intent change). Hosts the shared rateFlatFeeLine/applyCreditsToFlatFeeLine helpers. | Reconcile uses the rebuilt LINE period for both credit allocation and the run update (run.ServicePeriod = in.Line.Period) so ledger and invoice describe the same window. rateFlatFeeLine clears SplitLineGroupID/SplitLineHierarchy so the flat pricer doesn't skip a billable run. | +| `invoiceaccrued.go` | AccrueInvoiceUsage — books invoice-accrued usage via handler.OnInvoiceUsageAccrued, persists invoicedusage.AccruedUsage, then marks the run Immutable. | Validate rejects when CurrentRun.AccruedUsage already set (no double-accrual) and enforces run/line/invoice ID matches. Skips ledger work when line Totals.Total IsZero but still sets the run Immutable. | +| `preview.go` | BuildCreditThenInvoiceGatheringPreviewRun — pure-compute preview run shape for gathering-invoice expansion; no ctx, no persistence, no credit allocation. | Must stay side-effect-free (get/list expansion). Uses a synthetic run ID 'preview-' and only supports CreditThenInvoiceSettlementMode. | + +## Anti-Patterns + +- Making state-machine / lifecycle decisions here — this Service is mechanics only; decisions belong in the flatfee state machine that calls it. +- Performing multiple adapter writes without wrapping them in transaction.Run(ctx, s.adapter, ...). +- Creating raw negative credit rows for a shrinking amount instead of correcting existing lineage via CreditRealizations.Correct. +- Adding side effects (credit allocation, persistence, ctx) to preview.go — preview must remain pure so get/list expansion stays read-only. +- Skipping CurrencyCalculator.RoundToPrecision before comparing/persisting amounts, or skipping in.Validate() at method entry. + +## Decisions + +- **Mechanics-only Service with no state-machine logic.** — Keeps credit allocation/correction and lineage persistence reusable across credits-only, credit_then_invoice, and invoice-accrued modes without coupling to lifecycle transitions. +- **Reconciliation drives credits off a delta vs. target amount.** — When a mutable standard line changes amount, a single delta switch (allocate on growth, correct on shrink, no-op on equal) avoids re-deriving the whole credit ledger and preserves lineage. +- **Re-rate line with split metadata cleared and credits mutator disabled, then re-apply credits.** — Flat-fee charges materialize their own billable periods, so subscription split-line metadata must not make the flat pricer skip a billable run; credits are applied as a separate, explicit step. + +## Example: Delta-driven credit reconciliation toward a target amount + +``` +func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error) { + in.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount) + if err := in.Validate(); err != nil { + return ReconcileCreditRealizationsResult{}, err + } + currentAmount := in.CurrencyCalculator.RoundToPrecision(in.Run.CreditRealizations.Sum()) + delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount)) + result := ReconcileCreditRealizationsResult{Delta: delta} + switch { + case delta.IsPositive(): + creditAllocations, err := s.handler.OnAllocateCredits(ctx, flatfee.OnAllocateCreditsInput{Charge: in.Charge, ServicePeriod: in.Run.ServicePeriod, BookedAt: in.AllocateAt, PreTaxAmountToAllocate: delta}) + if err != nil { + return ReconcileCreditRealizationsResult{}, fmt.Errorf("allocate credits for flat fee: %w", err) + } + // ... stamp LineID, s.createCreditAllocations(...) +// ... +``` + + diff --git a/openmeter/billing/charges/invoiceupdater/CLAUDE.md b/openmeter/billing/charges/invoiceupdater/CLAUDE.md new file mode 100644 index 0000000000..da3007aed3 --- /dev/null +++ b/openmeter/billing/charges/invoiceupdater/CLAUDE.md @@ -0,0 +1,35 @@ +# invoiceupdater + + + +> Translates charge-engine line patches into concrete billing.Service mutations on gathering and standard invoices. It is the only place charge state is projected back onto invoice lines; it owns no charge state itself. + +## Patterns + +**Discriminated Patch value type** — Patch carries a PatchOperation op plus one populated sub-struct; construct only via NewCreateLinePatch/NewDeleteLinePatch/NewUpdateLinePatch/NewDeleteGatheringLineByChargeIDPatch/NewUpdateGatheringLineByChargeIDPatch and read via As*Patch() which error on op mismatch. (`func (p Patch) AsCreateLinePatch() (PatchLineCreate, error) { if p.op != PatchOpLineCreate { return PatchLineCreate{}, fmt.Errorf(...) }; return p.createLinePatch, nil }`) +**Parse-then-route ApplyPatches pipeline** — ApplyPatches first parsePatches into patchesParsed, resolves by-charge-id deletes/updates against gathering invoices, provisions new lines, then routes per-invoice patches to gathering vs mutable-standard vs immutable handlers based on invoice.Type() and StatusDetails.Immutable. (`if invoice.Type()==billing.InvoiceTypeGathering { u.updateGatheringInvoice(...) } else if !standardInvoice.StatusDetails.Immutable { u.updateMutableStandardInvoice(...) } else { u.updateImmutableInvoice(...) }`) +**EditFn-based invoice mutation** — Standard/gathering invoice edits go through billing.UpdateStandardInvoiceInput/UpdateGatheringInvoiceInput with an EditFn closure that mutates invoice.Lines (GetByID, ReplaceByID, set DeletedAt), never direct adapter writes. (`u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{Invoice: invoice.GetInvoiceID(), IncludeDeletedLines:true, EditFn: func(invoice *billing.StandardInvoice) error {...}})`) +**Charge ownership guard before mutating lines** — ensureLineHasChargeID is called before deleting/updating a line so the updater only touches charge-backed lines. (`if err := ensureLineHasChargeID(line, deletePatch.op); err != nil { return err }`) +**Dry-run patch log suppression** — LogPatches uses isDryRunLoggablePatch to suppress current-billing-period create-lines and immutable-invoice deletes/updates, focusing logs on actionable drift. (`return !isCurrentBillingPeriod(createPatch.Line)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `patch.go` | PatchOperation constants, the five Patch sub-structs, New* constructors, As* accessors, and Log(). | Patch fields are unexported — always go through constructors and accessors; adding an op requires updating Op() dispatch in parsePatches, isDryRunLoggablePatch, and Log. | +| `invoiceupdate.go` | Updater (wraps billing.Service + logger), ApplyPatches pipeline, gathering/standard/immutable routing, provisionUpcomingLines, by-charge-id resolution. | Empty mutable standard invoices (NonDeletedLineCount()==0, non-gathering) are auto-deleted; DeleteFailed status only logs validation issues. Target state is intentionally NOT passed through billing's generic snapshotter — charge engines own quantity snapshots. | +| `feehelper.go` | IsFlatFee / GetFlatFeePerUnitAmount / SetFlatFeePerUnitAmount over billing.GenericInvoiceLine price (productcatalog flat price). | SetFlatFeePerUnitAmount rebuilds the price via productcatalog.NewPriceFrom(flatPrice) and SetPrice; mutating flatPrice.Amount alone does not persist. | + +## Anti-Patterns + +- Constructing a Patch struct literal directly instead of via New* constructors. +- Writing invoice lines through ent/adapters instead of billing.Service EditFn closures. +- Mutating non-charge-backed lines — every delete/update must pass ensureLineHasChargeID. +- Pushing charge target-state through billing's generic snapshotter (charge engines own snapshots). + +## Decisions + +- **Invoice mutations are expressed as Patch values applied through billing.Service, not direct DB writes.** — Keeps charge engines decoupled from billing internals and lets billing enforce invoice state-machine rules (immutability, validation). +- **By-charge-id delete/update patches are resolved by listing gathering invoice lines and matching line.ChargeID.** — Charge engines don't always know the gathering line ID, so the updater bridges charge ID -> line ID at apply time. + + diff --git a/openmeter/billing/charges/lineage/CLAUDE.md b/openmeter/billing/charges/lineage/CLAUDE.md new file mode 100644 index 0000000000..fff477a82d --- /dev/null +++ b/openmeter/billing/charges/lineage/CLAUDE.md @@ -0,0 +1,49 @@ +# lineage + + + +> Domain package defining the credit-realization lineage model — the append-only audit trail tracking how each charge's realized value moves through states (real_credit/advance_uncovered -> advance_backfilled -> earnings_recognized) and is consumed during corrections. Declares the Service and Adapter interfaces plus the Lineage/Segment value types and pure sorting/matching helpers. + +## Patterns + +**Service/Adapter split with shared method names** — Service is business orchestration (CreateInitialLineages, PersistCorrectionLineageSegments, BackfillAdvanceLineageSegments, Close/CreateSegment); Adapter (entutils.TxCreator) is persistence with Lock* + Load* + List* primitives the service composes (`Service.PersistCorrectionLineageSegments composes Adapter.LockCorrectionLineages + CreateSegment`) +**State-precedence sort for correction consumption** — SortCorrectionPersistSegments orders segments by state precedence (earnings_recognized diff --git a/openmeter/billing/charges/lineage/adapter/CLAUDE.md b/openmeter/billing/charges/lineage/adapter/CLAUDE.md new file mode 100644 index 0000000000..500d0fe5e7 --- /dev/null +++ b/openmeter/billing/charges/lineage/adapter/CLAUDE.md @@ -0,0 +1,54 @@ +# adapter + + + +> Ent-backed persistence adapter for credit-realization lineages and their segments — the audit trail that tracks how each charge's credit realizations are covered/corrected/backfilled over time. Implements the lineage.Adapter interface (defined in ../lineage/service.go). + +## Patterns + +**Implements lineage.Adapter + entutils.TxCreator** — New(Config) returns lineage.Adapter. The adapter struct must satisfy Tx/WithTx/Self (TxCreator) plus all CRUD methods declared in lineage.Adapter; missing a method breaks the interface assertion at the New return. (`func New(config Config) (lineage.Adapter, error) { ...; return &adapter{db: config.Client}, nil }`) +**Every method body wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue** — All query/mutation methods rebind to the tx carried in ctx via entutils.TransactingRepo(ctx, a, func(ctx, tx *adapter){...}). Use TransactingRepoWithNoValue for write-only methods (CreateLineages, CloseSegment, CreateSegment). This keeps a raw *entdb.Client honest inside an outer transaction. (`return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... })`) +**Package-level helper rebuilds adapter from raw *entdb.Client** — LoadActiveSegmentsByRealizationID exists both as a standalone func taking *entdb.Client (constructing repo := &adapter{db: db} then TransactingRepo) and as a method delegating to it. Standalone helpers handed a raw client must still wrap with TransactingRepo so they join the ctx transaction. (`func LoadActiveSegmentsByRealizationID(ctx, db *entdb.Client, ...) { repo := &adapter{db: db}; return entutils.TransactingRepo(ctx, repo, ...) }`) +**Lock methods assert in-transaction then use ForUpdate()** — LockCorrectionLineages and LockAdvanceLineagesForBackfill first call entutils.GetDriverFromContext(ctx) and error if not in a tx, then chain .ForUpdate() on the query. Row-locking methods must keep both guards. (`if _, err := entutils.GetDriverFromContext(ctx); err != nil { return nil, fmt.Errorf("must be called in a transaction: %w", err) }; ...Query()....ForUpdate().All(ctx)`) +**Active-segment queries filter ClosedAtIsNil + order ByCreatedAt** — Segments are append-only; 'active' means closed_at IS NULL. Every WithSegments / segment query uses creditrealizationlineagesegment.ClosedAtIsNil() and orders ByCreatedAt to keep FIFO consumption stable. (`WithSegments(func(q *entdb.CreditRealizationLineageSegmentQuery){ q.Where(creditrealizationlineagesegment.ClosedAtIsNil()).Order(creditrealizationlineagesegment.ByCreatedAt()) })`) +**Ent rows mapped to domain via mapLineage / mapSegment** — DB rows (*entdb.CreditRealizationLineage / Segment) are translated to lineage.Lineage / lineage.Segment through mapLineage and mapSegment using lo.Map/lo.SliceToMap. AdvanceFeatures is stored as pq.StringArray and read back as []string(entry.AdvanceFeatures). (`return lo.Map(lineages, mapLineage), nil`) +**Bulk creates for initial lineages** — CreateLineages builds parallel slices of CreditRealizationLineageCreate and ...SegmentCreate and saves them with CreateBulk(...).Save(ctx); each segment SetState(spec.InitialState). (`tx.db.CreditRealizationLineage.CreateBulk(rootCreates...).Save(ctx)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client *entdb.Client} + Validate, New constructor, adapter struct, and the entutils.TxCreator trio (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self). | Tx uses HijackTx with ReadOnly:false; do not flip to read-only — lock/correction flows mutate. WithTx must rebuild via entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()). | +| `lineage.go` | All lineage.Adapter method implementations (Load/Create/Lock/List/Close/CreateSegment) plus mapLineage/mapSegment converters. | AdvanceFeatures must be written as pq.StringArray(spec.AdvanceFeatures) and CreateSegment uses ulid.Make().String() for the segment ID; CreateLineages does NOT set segment IDs (relies on schema default). CreateSegment calls input.Validate() before persisting; other writers do not. | + +## Anti-Patterns + +- Accepting a raw *entdb.Client in a helper without wrapping the body in entutils.TransactingRepo — it will bypass the ctx transaction. +- Calling a Lock* method outside a transaction — the GetDriverFromContext guard returns an error by design; do not remove it. +- Querying segments without ClosedAtIsNil(), which would resurrect closed (consumed) segments. +- Hard-deleting or UPDATEing segment amounts in place instead of closing + creating a remainder segment (the append-only model lives in the service layer). +- Putting business orchestration (FIFO consumption, correction math) here — the adapter is persistence-only; that logic belongs in lineage/service. + +## Decisions + +- **Adapter exposes both a package-level LoadActiveSegmentsByRealizationID func and a method that delegates to it.** — Lets callers that already hold a raw *entdb.Client (e.g. other charge adapters) reuse the same tx-aware query without instantiating the full adapter. +- **Segments are append-only with closed_at instead of mutable rows.** — Preserves a complete audit trail of credit coverage state transitions for corrections and advance backfill reconciliation. + +## Example: A tx-aware adapter read method with active-segment eager loading + +``` +func (a *adapter) LoadLineagesByCustomer(ctx context.Context, input lineage.LoadLineagesByCustomerInput) ([]lineage.Lineage, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]lineage.Lineage, error) { + lineages, err := tx.db.CreditRealizationLineage.Query(). + Where(creditrealizationlineage.Namespace(input.Namespace), creditrealizationlineage.CustomerIDEQ(input.CustomerID), creditrealizationlineage.CurrencyEQ(input.Currency)). + WithSegments(func(q *entdb.CreditRealizationLineageSegmentQuery) { + q.Where(creditrealizationlineagesegment.ClosedAtIsNil()).Order(creditrealizationlineagesegment.ByCreatedAt()) + }). + Order(creditrealizationlineage.ByCreatedAt()).All(ctx) + if err != nil { return nil, err } + return lo.Map(lineages, mapLineage), nil + }) +} +``` + + diff --git a/openmeter/billing/charges/lineage/service/CLAUDE.md b/openmeter/billing/charges/lineage/service/CLAUDE.md new file mode 100644 index 0000000000..f7d27c34e8 --- /dev/null +++ b/openmeter/billing/charges/lineage/service/CLAUDE.md @@ -0,0 +1,57 @@ +# service + + + +> Service layer implementing lineage.Service — the business logic that builds initial credit-realization lineages, FIFO-consumes active segments for corrections, and backfills advance-uncovered segments. Pure orchestration over the lineage.Adapter; all persistence is delegated. + +## Patterns + +**Config{Adapter lineage.Adapter} + New returns lineage.Service** — Constructor validates Adapter != nil and returns the lineage.Service interface (from ../lineage/service.go). service struct holds only the adapter. (`func New(config Config) (lineage.Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &service{adapter: config.Adapter}, nil }`) +**Multi-step methods wrapped in transaction.RunWithNoValue(ctx, s.adapter, ...)** — Any method that locks then mutates (CreateInitialLineages, PersistCorrectionLineageSegments, BackfillAdvanceLineageSegments) runs inside transaction.RunWithNoValue so the Lock*/Close/Create calls share one tx. Pass s.adapter as the TxCreator. (`return transaction.RunWithNoValue(ctx, s.adapter, func(ctx context.Context) error { ... })`) +**Validate input at the top of every mutating method** — Each method calls input.Validate() (defined on the input structs in lineage/service.go) before doing work and returns early on error. (`if err := input.Validate(); err != nil { return err }`) +**Append-only segment consumption: Close + Create remainder** — To consume part of a segment, compute consumedAmount := lineage.MinDecimal(segment.Amount, remaining), CloseSegment(segment.ID, now), and if a remainder is positive CreateSegment a new segment carrying the same state/backing IDs. Never mutate amounts in place. (`if err := s.adapter.CloseSegment(ctx, segment.ID, now); err != nil { ... }; remainder := segment.Amount.Sub(consumedAmount); if remainder.IsPositive() { s.adapter.CreateSegment(ctx, lineage.CreateSegmentInput{...}) }`) +**Deterministic ordering via lineage helpers** — Correction consumption iterates lineage.SortCorrectionPersistSegments(entry.Segments) (state precedence: earnings_recognized < advance_backfilled < advance_uncovered < real_credit). Backfill filters via lineage.FilterAdvanceLineagesForBackfill(lineages, input.FeatureFilters). (`for _, segment := range lineage.SortCorrectionPersistSegments(entry.Segments) { ... }`) +**Timestamps truncated to microsecond from clock.Now()** — now := clock.Now().Truncate(time.Microsecond) before closing segments, so closed_at aligns with Postgres microsecond precision and stays test-freezable via pkg/clock. (`now := clock.Now().Truncate(time.Microsecond)`) +**Coverage shortfall is a hard error** — If correction remaining stays positive after walking all segments, the method returns an error ('correction amount %s exceeds active lineage coverage ...') — over-consumption is never silently allowed. (`if remaining.IsPositive() { return fmt.Errorf("correction amount %s exceeds active lineage coverage for realization %s", remaining.String(), realizationID) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Whole lineage.Service implementation: CreateInitialLineages (builds specs via creditrealization.InitialLineageSpecs, tags Advance specs with input.Features), PersistCorrectionLineageSegments (FIFO close/split against correction amounts), BackfillAdvanceLineageSegments (covers advance_uncovered with a backing tx group), plus thin CloseSegment/CreateSegment pass-throughs. | Backfill splits a partially-covered segment into three writes: close original, create advance_uncovered remainder, create advance_backfilled covered piece with BackingTransactionGroupID. CreateInitialLineages only sets AdvanceFeatures on specs whose OriginKind == LineageOriginKindAdvance. CloseSegment/CreateSegment delegate directly without their own transaction wrapper — callers must supply one if atomicity across calls is needed. | + +## Anti-Patterns + +- Mutating a segment's amount in place instead of Close + Create-remainder — breaks the append-only audit model. +- Calling adapter Lock*/Close/Create across multiple statements without an enclosing transaction.RunWithNoValue — partial failures would corrupt coverage. +- Using time.Now() instead of clock.Now().Truncate(time.Microsecond) — defeats test time-freezing and risks sub-microsecond drift vs Postgres. +- Swallowing the positive-remaining coverage shortfall instead of returning the over-consumption error. +- Adding Ent queries here — the service must go through lineage.Adapter, never touch *entdb.Client directly. + +## Decisions + +- **Correction segments are consumed in SortCorrectionPersistSegments precedence order, not raw creation order.** — Recognized earnings and backfilled advances must be unwound before uncovered advances and real credit, so corrections reverse value in the economically correct sequence. +- **All multi-write methods share a single transaction via transaction.RunWithNoValue.** — Lock-then-mutate flows (corrections, backfill) must be atomic so concurrent realization runs cannot double-consume the same segment. + +## Example: FIFO-consuming active segments for a correction inside one transaction + +``` +return transaction.RunWithNoValue(ctx, s.adapter, func(ctx context.Context) error { + lineages, err := s.adapter.LockCorrectionLineages(ctx, input.Namespace, correctionOrder) + if err != nil { return fmt.Errorf("lock lineages for correction persistence: %w", err) } + now := clock.Now().Truncate(time.Microsecond) + for _, realizationID := range correctionOrder { + entry := lineagesByRealizationID[realizationID] + remaining := correctionAmountsByRealizationID[realizationID] + for _, segment := range lineage.SortCorrectionPersistSegments(entry.Segments) { + if !remaining.IsPositive() { break } + consumed := lineage.MinDecimal(segment.Amount, remaining) + if err := s.adapter.CloseSegment(ctx, segment.ID, now); err != nil { return err } + if rem := segment.Amount.Sub(consumed); rem.IsPositive() { + _ = s.adapter.CreateSegment(ctx, lineage.CreateSegmentInput{LineageID: segment.LineageID, Amount: rem, State: segment.State, BackingTransactionGroupID: segment.BackingTransactionGroupID}) + } + remaining = remaining.Sub(consumed) +// ... +``` + + diff --git a/openmeter/billing/charges/meta/CLAUDE.md b/openmeter/billing/charges/meta/CLAUDE.md new file mode 100644 index 0000000000..e80c2dd899 --- /dev/null +++ b/openmeter/billing/charges/meta/CLAUDE.md @@ -0,0 +1,65 @@ +# meta + + + +> Shared charge-meta package: defines the cross-type Charge/Intent/ChargeID/ChargeType/ChargeStatus value types, the registration Adapter interface, the period-patch system (extend/shrink/delete) built on qmuntal/stateless triggers, and timestamp normalization. It is the most depended-on charges package (39 in-edges) — every charge type embeds meta.Intent and registers via meta.Adapter. + +## Patterns + +**Service is an alias of Adapter** — service.go aliases `type Service = Adapter` with a comment: no transaction layer is needed because this package is a thin DB wrapper; add transaction.Run only if that changes (`type Service = Adapter`) +**Patch interface over stateless triggers** — Each patch (PatchExtend/PatchShrink/PatchDelete) implements Patch{ Op() PatchType; Trigger() stateless.Trigger; TriggerParams() any } with a package-level Trigger* = stateless.Trigger and a `var _ Patch = (*PatchX)(nil)` assertion (`TriggerExtend = stateless.Trigger("extend")`) +**Period patches: private fields, NormalizeTimestamp setters, Validate + ValidateWith** — PatchExtend/PatchShrink store private time fields set through Set*/normalized via NormalizeTimestamp; Validate() checks non-zero, ValidateWith(intent) enforces directional ordering against the existing periods (`PatchExtend.ValidateWith requires NewServicePeriodTo.After(intent.ServicePeriod.To)`) +**Enum types with Values()+Validate()+slices.Contains** — ChargeType, ChargeStatus, CreditRefundPolicy, InvoiceRefundPolicy each expose Values() and Validate() that error via models.NewGenericValidationError when not in Values() (`ChargeType.Validate uses slices.Contains(t.Values(), string(t))`) +**Expands via pkg/expand** — Expands = expand.Expand[Expand]; Expand constants (ExpandRealizations, ExpandRealtimeUsage, ExpandDetailedLines, ExpandDeletedRealizations) gate which edges adapters load (`input.Expands.Has(meta.ExpandRealizations)`) +**Timestamp normalization to streaming window** — NormalizeTimestamp truncates to UTC streaming.MinimumWindowSizeDuration; NormalizeClosedPeriod and Intent.Normalized() apply it to all period boundaries; patches normalize on Set* (`t.UTC().Truncate(streaming.MinimumWindowSizeDuration)`) +**ChargeAccessor interface** — Per-type charges satisfy meta.ChargeAccessor (GetChargeID/GetCustomerID/GetCurrency/ErrorAttributes) so generic engine code can operate over any charge type (`var _ meta.ChargeAccessor = (*Charge)(nil)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `charge.go` | ChargeID/ChargeIDs, ChargeType, ChargeStatus, Expand, ChargeAccessor, and the generic Charge/Charges types | ChargeType drives the FK column in adapters; ChargeStatus semantics (created/active/final/deleted) — final means no further late events arrive | +| `intent.go` | Shared Intent with the three periods (Service/FullService/Billing), ManagedBy, tax config, and optional Subscription reference | ManagedBy is validated against billing.InvoiceLineManagedBy values; UniqueReferenceID must not be empty-string when set | +| `patch.go` | Patch interface, PatchType enum, and TriggerPatchResult carrying invoiceupdater.Patch side effects | TriggerParams() is `any` because stateless requires it; results carry InvoicePatches to feed invoiceupdater | +| `patchextend.go / patchshrink.go` | Period-extension/shrink patches with directional ValidateWith ordering rules | Extend requires periods grow (service strictly after); shrink requires service strictly before existing-to and after existing-from; both call NormalizeTimestamp on every setter | +| `patchdelete.go` | PatchDelete + PatchDeletePolicy (CreditRefundPolicy + InvoiceRefundPolicy) with RefundAsCreditsDeletePolicy default | Refund behavior is policy-driven (correct/ignore for credits; refund/grant_credits/ignore for invoices), not hardcoded | +| `adapter.go` | Adapter interface (RegisterCharges/DeleteRegisteredCharge + entutils.TxCreator) and RegisterChargesInput | DeleteRegisteredChargeInput is an alias of ChargeID; RegisterChargesInput requires a valid ChargeType and per-charge IDs | +| `timestamps.go` | NormalizeTimestamp/NormalizeOptionalTimestamp/NormalizeClosedPeriod and Intent.Normalized() | Truncation uses streaming.MinimumWindowSizeDuration — do not substitute a different granularity | +| `triggers.go` | Shared lifecycle triggers (TriggerNext, TriggerPartialInvoiceCreated, TriggerFinalInvoiceCreated, etc.) used by per-type state machines | Trigger = stateless.Trigger alias; add new charge lifecycle transitions here so all types share the vocabulary | + +## Anti-Patterns + +- Adding a transaction.Run/service layer here — Service is intentionally an alias of Adapter; this package is a thin DB wrapper +- Persisting non-normalized timestamps — every boundary must pass through NormalizeTimestamp (UTC + streaming-window truncation) +- Defining a new ChargeType/ChargeStatus/Patch without updating Values() and the corresponding Validate() +- Mutating a PatchExtend/PatchShrink field directly instead of the normalized Set* setters +- Calling only Validate() instead of ValidateWith(intent) — directional period ordering is only enforced by ValidateWith + +## Decisions + +- **meta.Service = meta.Adapter (no service layer)** — Charge-meta is pure persistence with no multi-step orchestration; aliasing avoids a redundant pass-through layer until business logic appears +- **Patches are stateless.Trigger-backed value objects, not imperative mutations** — Period changes feed a qmuntal/stateless state machine and emit invoiceupdater.Patch side effects, keeping lifecycle transitions declarative +- **All timestamps truncated to streaming.MinimumWindowSizeDuration** — Aligns charge periods with the metering window granularity so usage attribution and billing boundaries stay consistent + +## Example: Defining a period patch as a stateless-trigger value object + +``` +var ( + _ Patch = (*PatchExtend)(nil) + TriggerExtend = stateless.Trigger("extend") +) + +func (p PatchExtend) Op() PatchType { return PatchTypeExtend } +func (p PatchExtend) Trigger() stateless.Trigger { return TriggerExtend } +func (p PatchExtend) TriggerParams() any { return p } + +func (p PatchExtend) ValidateWith(intent Intent) error { + var errs []error + if err := p.Validate(); err != nil { errs = append(errs, err) } + if !p.GetNewServicePeriodTo().After(intent.ServicePeriod.To) { + errs = append(errs, fmt.Errorf("new service period to must be greater than existing service period to")) + } +// ... +``` + + diff --git a/openmeter/billing/charges/meta/adapter/CLAUDE.md b/openmeter/billing/charges/meta/adapter/CLAUDE.md new file mode 100644 index 0000000000..a0f4dbb724 --- /dev/null +++ b/openmeter/billing/charges/meta/adapter/CLAUDE.md @@ -0,0 +1,58 @@ +# adapter + + + +> Ent-backed persistence adapter implementing the meta.Adapter interface for charge-meta rows: registering charges (flatfee/usagebased/creditpurchase) and soft-deleting them. Primary constraint: every write must run inside a transaction rebound from ctx, and the meta.Adapter contract (Tx/WithTx/Self) must stay intact for entutils transaction wiring. + +## Patterns + +**Transaction-aware repo wrapping** — Every mutating method wraps its body in entutils.TransactingRepoWithNoValue(ctx, a, func(ctx, tx *adapter)...) so the adapter rebinds to the tx carried in ctx instead of using the raw injected client. (`return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... tx.db.Charge.Create()... })`) +**Input.Validate() before any DB access** — Each method calls in.Validate() and returns early before touching Ent. Validation lives on the meta input types, not the adapter. (`func (a *adapter) RegisterCharges(ctx, in meta.RegisterChargesInput) error { if err := in.Validate(); err != nil { return err } ... }`) +**Standard Config/Validate/New constructor** — Construction goes through Config{Client, Logger} with a Validate() that requires both fields non-nil, then New(config) returns the meta.Adapter interface (not the concrete type). (`func New(config Config) (meta.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{...}, nil }`) +**Interface assertion at package scope** — var _ meta.Adapter = (*adapter)(nil) guarantees the concrete adapter satisfies the meta.Adapter interface at compile time. (`var _ meta.Adapter = (*adapter)(nil)`) +**Tx/WithTx/Self transaction plumbing trio** — The adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebinds via entdb.NewTxClientFromRawConfig), and Self — the exact trio entutils.TransactingRepo* expects. (`func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txDb := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txDb.Client(), logger: a.logger} }`) +**clock.Now() for all timestamps** — Created/deleted timestamps use pkg/clock.Now() (freezable in tests), never time.Now(). (`SetCreatedAt(clock.Now()) / SetDeletedAt(clock.Now())`) +**Charge-type switch sets the FK column** — RegisterCharges switches on in.Type to set the matching foreign-key column (ChargeFlatFeeID / ChargeUsageBasedID / ChargeCreditPurchaseID); an unknown type returns an error rather than silently skipping. (`switch in.Type { case meta.ChargeTypeFlatFee: create = create.SetChargeFlatFeeID(charge.ID); ... default: return nil, fmt.Errorf("unknown charge type: %s", in.Type) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Defines Config, Validate, New, the adapter struct (db, logger), and the Tx/WithTx/Self transaction interface methods that satisfy meta.Adapter. | Tx uses HijackTx with ReadOnly:false; WithTx must rebuild the client from tx.GetConfig() via entdb.NewTxClientFromRawConfig — do not reuse the original a.db inside a tx scope. | +| `charges.go` | Implements the two write methods RegisterCharges (bulk create via slicesx.MapWithErr + Charge.CreateBulk) and DeleteRegisteredCharge (soft delete via UpdateOneID + SetDeletedAt). | DeleteRegisteredCharge filters with chargedb.DeletedAtIsNil() and chargedb.Namespace(in.Namespace) — always scope by namespace and exclude already-deleted rows; deletes are soft (SetDeletedAt), never hard. | + +## Anti-Patterns + +- Calling tx.db / a.db directly without an entutils.TransactingRepo* wrapper, breaking ctx-bound transaction reuse +- Using time.Now() instead of clock.Now() for created/deleted timestamps +- Hard-deleting charge rows instead of setting DeletedAt (soft delete) +- Omitting the namespace and DeletedAtIsNil filters on updates/deletes, allowing cross-tenant or double-delete writes +- Returning the concrete *adapter from New or skipping the var _ meta.Adapter assertion, decoupling the impl from the meta contract + +## Decisions + +- **Methods accept a single meta input struct and validate it before DB access.** — Keeps validation co-located with the domain contract in meta/ and ensures no malformed write reaches Ent. +- **Adapter implements its own Tx/WithTx/Self trio rather than embedding a shared base.** — entutils.TransactingRepo* requires these exact methods to rebind the adapter onto the ctx transaction; explicit implementation keeps the charge-meta adapter transaction-aware even when handed a raw *entdb.Client. + +## Example: A transaction-aware mutating adapter method validating input and bulk-creating Ent rows + +``` +func (a *adapter) RegisterCharges(ctx context.Context, in meta.RegisterChargesInput) error { + if err := in.Validate(); err != nil { + return err + } + return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { + creates, err := slicesx.MapWithErr(in.Charges, func(charge meta.IDWithUniqueReferenceID) (*db.ChargeCreate, error) { + create := tx.db.Charge.Create(). + SetNamespace(in.Namespace). + SetType(in.Type). + SetID(charge.ID). + SetNillableUniqueReferenceID(charge.UniqueReferenceID). + SetCreatedAt(clock.Now()) + switch in.Type { + case meta.ChargeTypeFlatFee: + create = create.SetChargeFlatFeeID(charge.ID) +// ... +``` + + diff --git a/openmeter/billing/charges/models/CLAUDE.md b/openmeter/billing/charges/models/CLAUDE.md new file mode 100644 index 0000000000..5e68ff1ec9 --- /dev/null +++ b/openmeter/billing/charges/models/CLAUDE.md @@ -0,0 +1,35 @@ +# models + + + +> Structural parent for the charges value-type/Ent-mixin layer. It owns no source files itself; its sub-packages carry the persisted domain shapes shared across charge types — chargemeta (shared charge metadata mixin), creditrealization (allocation/correction + lineage state machine), invoicedusage (accrued-usage totals), ledgertransaction (group references), and payment (two-phase settlements). + +## Patterns + +**One value-type + Ent-mixin package per concern** — Each child pairs domain value types with a RecursiveMixin and generic Create/Update/Map helpers that concrete charge schemas (flatfee/usagebased/creditpurchase) embed, so persistence shape and domain shape stay co-located (`chargemeta/mixin.go, creditrealization/mixin.go, payment/mixin.go`) +**Generic builder helpers over concrete Ent types** — Mapping/creation goes through generic Create/Update/Map functions (Creator/Getter interfaces) rather than calling Set* on a specific *entdb.XCreate, which would bypass normalization/validation (`creditrealization generic Create over allocation/correction creators`) +**UTC + currency-precision normalization at the boundary** — All timestamps coerced to UTC and decimal amounts rounded via currencyx.Calculator before persist; sub-microsecond/sub-window drift is not allowed (`Intent normalize in chargemeta; rounding in creditrealization`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `chargemeta/` | Shared charge-meta Ent mixin (periods, status, currency, managed-by, subscription/tax refs) embedded by every charge type | Go through generic Create/Update helpers; only TaxCodeID FK + Behavior belong on charge tables | +| `creditrealization/` | Allocation (positive) vs correction (non-positive) realizations plus the lineage origin/state machine | Corrections are separate rows referencing CorrectsRealizationID; revert draining is reverse-order; ledger_transaction_group_id is immutable | +| `invoicedusage/` | AccruedUsage snapshot built on the shared totals.Mixin, optionally linked to a ledger group | Use totals.Mixin not ad-hoc fields; don't reconstruct LedgerTransaction when group id is nil | +| `ledgertransaction/` | GroupReference/TimedGroupReference leaf value types with nil-safe accessors | Keep minimal — broadly imported; use GetIDOrNull guards instead of dereferencing | +| `payment/` | Two-phase (authorized->settled) payment settlements with External and Invoiced variants sharing a Base | StatusSettled requires both authorized+settled ledger data; line_id/invoice_id immutable; use predefined ValidationIssues | + +## Anti-Patterns + +- Adding business orchestration here — these are value-type/mixin packages; logic lives in charge services +- Calling Set* on a concrete *entdb.XCreate instead of the generic Create/Update helpers (bypasses normalization) +- Persisting non-UTC timestamps or unrounded decimals +- Putting charge-type-specific fields in the broadly imported ledgertransaction leaf package + +## Decisions + +- **Schema mixin and domain mapping co-located per concern** — Keeps the persisted Ent shape and the validated domain shape in one place so each charge type embeds a single source of truth +- **Corrections and settlements are append-only/immutable rows** — Credit realizations and payments form an audit trail; in-place edits would lose lifecycle history + + diff --git a/openmeter/billing/charges/models/chargemeta/CLAUDE.md b/openmeter/billing/charges/models/chargemeta/CLAUDE.md new file mode 100644 index 0000000000..895d9830bc --- /dev/null +++ b/openmeter/billing/charges/models/chargemeta/CLAUDE.md @@ -0,0 +1,46 @@ +# chargemeta + + + +> Value-type + Ent-schema-mixin package for the shared charge-meta of every charge type (service/billing/full-service periods, status, currency, managed-by, subscription refs, tax config). It is a leaf models package: it defines the reusable Ent mixin and generic Create/Update/Map helpers that each charge-type schema (flatfee, usagebased, creditpurchase) embeds. + +## Patterns + +**Reusable Ent mixin via RecursiveMixin** — The schema is exposed as `type Mixin = entutils.RecursiveMixin[metaMixin]` so charge-type schemas embed it rather than redefining fields. metaMixin.Mixin() pulls in entutils.AnnotationsMixin and entutils.ResourceMixin. (`type Mixin = entutils.RecursiveMixin[metaMixin]`) +**Generic builder interfaces over concrete Ent types** — Create/Update/MapFromDB are written against typed-generic Creator[T]/Updater[T]/Getter[T] interfaces (Set*/Get* methods) instead of concrete *entdb.XCreate, so one helper serves every charge-type table. (`func Create[T Creator[T]](creator Creator[T], in CreateInput) (T, error)`) +**Intent normalize+validate before persist** — Create normalizes the Intent (`in.Intent.Normalized()`) and AdvanceAfter (`meta.NormalizeOptionalTimestamp`) and calls `in.Intent.Validate()` before any Set* call, returning the zero T on error. (`if err := in.Intent.Validate(); err != nil { var empty T; return empty, err }`) +**All timestamps coerced to UTC** — Every period boundary is stored via `.UTC()` and optional times via convert.SafeToUTC / convert.TimePtrIn(..., time.UTC); MapFromDB reads them back with `.UTC()`. (`SetServicePeriodFrom(in.Intent.ServicePeriod.From.UTC())`) +**Subscription/tax fields are all-or-nothing pointers** — Subscription reference is reconstructed only when ID, PhaseID and ItemID are all non-nil; tax config only when TaxCodeID or Behavior is set. New nullable fields must follow this grouped-pointer reconstruction in MapFromDB. (`if entity.GetSubscriptionID() != nil && entity.GetSubscriptionPhaseID() != nil && entity.GetSubscriptionItemID() != nil { ... }`) +**Unique reference scoped + partial index** — unique_reference_id is unique per (namespace, customer_id) only where it is non-null and not soft-deleted, via entsql.IndexWhere. (`index.Fields("namespace","customer_id","unique_reference_id").Annotations(entsql.IndexWhere("unique_reference_id IS NOT NULL AND deleted_at IS NULL")).Unique()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `mixin.go` | Sole file: Ent field/index definitions plus generic CreateInput/Create, UpdateInput/Update, Getter/MapFromDB helpers that translate between meta.Charge and any embedding charge table. | Adding a field requires updating the field list, Creator/Updater/Getter interfaces, AND Create/Update/MapFromDB together, or the per-charge-type adapters won't compile. Tax provider-specific fields (e.g. Stripe.Code) are intentionally NOT stored here — they are resolved at invoice snapshot time. | + +## Anti-Patterns + +- Calling Set* on a concrete *entdb.XCreate directly instead of going through the generic Create/Update helpers — bypasses Intent normalization and validation. +- Persisting non-UTC timestamps; every boundary must be coerced with .UTC()/convert.*ToUTC. +- Reconstructing a SubscriptionReference or TaxCodeConfig from a partial set of its pointer fields. +- Storing provider-specific tax fields here; only TaxCodeID (FK) and Behavior belong on charge tables. + +## Decisions + +- **Schema and mapping live in one generic package embedded by each charge type** — flatfee, usagebased and creditpurchase share identical meta columns; a single RecursiveMixin + generic helpers avoids per-table duplication and keeps the meta.Charge contract consistent. +- **Tax config stored as FK + behavior only** — Provider-specific codes change and are resolved at invoice snapshot time, so charge rows stay stable and provider-agnostic. + +## Example: Mapping an Ent charge row back to the domain meta.Charge via the generic Getter + +``` +func MapFromDB[T Getter[T]](entity T) meta.Charge { + var taxConfig *productcatalog.TaxCodeConfig + if entity.GetTaxCodeID() != nil || entity.GetTaxBehavior() != nil { + taxConfig = &productcatalog.TaxCodeConfig{TaxCodeID: entity.GetTaxCodeID(), Behavior: entity.GetTaxBehavior()} + } + return meta.Charge{ /* ManagedResource + Intent{... ServicePeriod: timeutil.ClosedPeriod{From: entity.GetServicePeriodFrom().UTC()}, TaxConfig: taxConfig} */ } +} +``` + + diff --git a/openmeter/billing/charges/models/creditrealization/CLAUDE.md b/openmeter/billing/charges/models/creditrealization/CLAUDE.md new file mode 100644 index 0000000000..2ad9ea9c7e --- /dev/null +++ b/openmeter/billing/charges/models/creditrealization/CLAUDE.md @@ -0,0 +1,56 @@ +# creditrealization + + + +> Domain models + Ent mixin for credit realizations: positive 'allocation' entries and non-positive 'correction' entries that record how credit/advance value was applied to charges and invoice lines. Holds the core correction-planning algorithm (reverse-order draining of remaining allocation amounts) and the lineage state machine that tracks value as it moves from real_credit/advance through backfill to earnings recognition. + +## Patterns + +**Allocation/correction polymorphism via Type enum** — A Realization is either TypeAllocation (positive Amount) or TypeCorrection (non-positive Amount, requires CorrectsRealizationID). CreateInput.Validate switches on Type to enforce sign and required fields. (`case TypeCorrection: if i.Amount.IsPositive() { errs = append(errs, ...) }`) +**Currency-aware validation and rounding** — Correction inputs and requests validate/normalize against a currencyx.Calculator: amounts must be rounded to the smallest denomination (IsRoundedToPrecision) and normalized via RoundToPrecision before planning. (`func (i CorrectionRequestItem) ValidateWith(currency currencyx.Calculator) error`) +**Reverse-order correction draining** — CreateCorrectionRequest reverses allocations (sorted by CreatedAt then SortHint), drains each allocation's RemainingAmount until the requested negative amount is satisfied, returning ErrInsufficientFunds if it cannot. (`mutable.Reverse(allocationsWithCorrections); ... return CorrectionRequest{}, ErrInsufficientFunds`) +**Lineage state machine via annotations** — Lineage origin (real_credit/advance) is stored as a models.Annotations key (AnnotationLineageOriginKind); InitialLineageSegmentState maps origin to the starting LineageSegmentState which then transitions toward earnings_recognized. (`func InitialLineageSegmentState(originKind LineageOriginKind) LineageSegmentState`) +**Collection-typed helpers with Validate/Sum** — Realizations, CreateInputs, CreateAllocationInputs, CreateCorrectionInputs are named slice types carrying Validate() (joining indexed errors) and Sum() (alpacadecimal aggregation) methods. (`func (i CreateInputs) Validate() error { ... fmt.Errorf("credit realization input[%d]: %w", idx, err) }`) +**Self-referencing Ent edge for corrections** — The Mixin optionally wires an edge.To("allocation").Field("corrects_realization_id").Unique().From("corrections") only when SelfReferenceType is set, so a correction points back to its allocation in the same table. (`edge.To("allocation", m.SelfReferenceType).Field("corrects_realization_id").Unique().From("corrections")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `realizations.go` | Core algorithm: Realizations slice with CreateCorrectionRequest, Correct/CorrectAll (callback-driven), AsCreditsApplied, and the private allocationsWithCorrections that computes remaining amounts. | allocationsWithCorrections sorts by CreatedAt then SortHint; corrections must reference a known allocation or it errors. RemainingAmount going negative is a corrupt-state error. | +| `models.go` | CreateInput, Type enum, Realization struct (embeds CreateInput + Namespaced/ManagedModel + SortHint), per-type validation. | SortHint encodes batch priority order; reverts depend on reverse iteration of it. | +| `correction.go` | CorrectionRequest/CreateCorrectionInputs validation against existing realizations and a total-to-correct amount, plus AsCreateInputs conversion. | ValidateWith re-derives remaining amounts and breaks early on first corrupt reference to avoid cascading false errors. | +| `allocation.go` | CreateAllocationInput(s) with Validate/Sum and AsCreateInputs (sets Type=TypeAllocation). | Amount must be strictly positive for allocations. | +| `lineage.go` | LineageOriginKind / LineageSegmentState enums, annotation read/write helpers, InitialLineageSegmentState mapping. | Segment states (real_credit, advance_uncovered, advance_backfilled, earnings_recognized) are a directed lifecycle; don't add states without updating Values()/Validate(). | +| `lineage_specs.go` | InitialLineageSpecs builds per-allocation lineage seeds (ulid LineageID, root realization, origin, initial state, amount). | Skips non-allocation realizations and silently skips allocations lacking the origin-kind annotation. | +| `mixin.go` | Ent schema mixin (amount numeric, ledger_transaction_group_id immutable, type enum, optional corrects_realization_id) + generic Create/MapFromDB. | ledger_transaction_group_id is Immutable; the self-edge only materializes when SelfReferenceType is supplied by the embedding schema. | +| `correction_test.go` | Table of subtests exercising correction planning, reverse-order draining, rounding, and ErrInsufficientFunds boundaries. | Uses InexactFloat64() float assertions and USD calculator helper; mirror this style for new cases. | + +## Anti-Patterns + +- Creating a TypeCorrection without CorrectsRealizationID or with a positive amount. +- Comparing/aggregating decimal amounts without rounding to currency precision first. +- Iterating allocations in forward order when reverting — reverts must drain in reverse (CreatedAt then SortHint). +- Adding a LineageSegmentState or LineageOriginKind value without updating its Values()/Validate(). +- Mutating ledger_transaction_group_id after creation — it is immutable in the schema. + +## Decisions + +- **Corrections are separate non-positive rows referencing their allocation, not in-place edits** — Preserves an auditable ledger-like history of how much of each allocation remains and allows reverse-order reversal across batches. +- **Lineage origin/state carried as annotations + explicit segment table state** — Lets advance-backed usage be backfilled by later credit purchases and tracked through to earnings recognition without losing provenance. +- **Validation/rounding always goes through currencyx.Calculator** — Money correctness requires consistent smallest-denomination rounding; passing the calculator in keeps the models currency-agnostic. + +## Example: Planning a negative correction by draining allocations in reverse order + +``` +func (r Realizations) CreateCorrectionRequest(amount alpacadecimal.Decimal, currency currencyx.Calculator) (CorrectionRequest, error) { + if amount.IsPositive() { return CorrectionRequest{}, models.NewGenericValidationError(errors.New("amount must not be positive")) } + amount = currency.RoundToPrecision(amount) + allocationsWithCorrections, err := r.allocationsWithCorrections() + if err != nil { return CorrectionRequest{}, err } + mutable.Reverse(allocationsWithCorrections) + // drain RemainingAmount per allocation until amountToCorrect is satisfied, else ErrInsufficientFunds +} +``` + + diff --git a/openmeter/billing/charges/models/invoicedusage/CLAUDE.md b/openmeter/billing/charges/models/invoicedusage/CLAUDE.md new file mode 100644 index 0000000000..22af831815 --- /dev/null +++ b/openmeter/billing/charges/models/invoicedusage/CLAUDE.md @@ -0,0 +1,30 @@ +# invoicedusage + + + +> Value type + Ent mixin for AccruedUsage: the snapshot of usage totals over a service period that a usage-based charge run has accrued (optionally tied to a ledger transaction group). Bridges charge runs to invoice totals via the shared totals.Mixin. + +## Patterns + +**Totals composition via shared mixin** — The Ent mixin embeds totals.Mixin and the domain struct embeds totals.Totals; Create uses totals.Set and MapAccruedUsageFromDB uses totals.FromDB to round-trip the monetary totals. (`creator = totals.Set(creator, invoicedUsage.Totals)`) +**Optional ledger linkage as nillable group ref** — ledger_transaction_group_id is optional/nillable; the domain LedgerTransaction is a *ledgertransaction.GroupReference reconstructed only when the DB value is non-nil. (`if dbEntity.GetLedgerTransactionGroupID() != nil { ledgerTransaction = &ledgertransaction.GroupReference{...} }`) +**Generic Creator/Getter mapping** — Create[T Creator[T]] and MapAccruedUsageFromDB(Getter) compose entutils namespace/id/time/annotations mixin setters with totals setters, so embedding charge-run tables reuse them. (`func Create[T Creator[T]](creator T, ns string, invoicedUsage AccruedUsage) T`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `stdinvoice.go` | AccruedUsage domain struct (NamespacedID + ManagedModel + ServicePeriod + optional LedgerTransaction + Totals) and its Validate. | Validate checks ServicePeriod, Totals, and the LedgerTransaction only when present. | +| `mixin.go` | Ent mixin (service period, optional ledger_transaction_group_id, totals.Mixin) plus generic Create/MapAccruedUsageFromDB. | Service period boundaries are stored and read In(time.UTC); keep totals round-tripping through totals.Set/totals.FromDB. | + +## Anti-Patterns + +- Storing totals as ad-hoc fields instead of via the shared totals.Mixin/totals.Totals. +- Reconstructing LedgerTransaction when the DB group id is nil. +- Persisting non-UTC service period boundaries. + +## Decisions + +- **Usage accruals reuse the billing totals model** — Keeps charge-run usage snapshots consistent with invoice-line total semantics and avoids a parallel totals representation. + + diff --git a/openmeter/billing/charges/models/ledgertransaction/CLAUDE.md b/openmeter/billing/charges/models/ledgertransaction/CLAUDE.md new file mode 100644 index 0000000000..afcd2d8512 --- /dev/null +++ b/openmeter/billing/charges/models/ledgertransaction/CLAUDE.md @@ -0,0 +1,27 @@ +# ledgertransaction + + + +> Tiny shared value-type package providing GroupReference and TimedGroupReference — references to a ledger transaction group (with optional timestamp) used across charges to track payment authorization/settlement and credit realization linkage. + +## Patterns + +**Nil-safe optional-reference accessors** — GetIDOrNull / GetTimeOrNull are pointer-receiver methods that tolerate a nil receiver and an empty TransactionGroupID, returning nil instead of panicking — designed for direct use in Ent SetNillable* calls. (`func (r *GroupReference) GetIDOrNull() *string { if r == nil || r.TransactionGroupID == "" { return nil }; return &r.TransactionGroupID }`) +**Embedded timed variant** — TimedGroupReference embeds GroupReference and adds a required Time; its Validate delegates to the embedded Validate then requires a non-zero time. (`type TimedGroupReference struct { GroupReference; Time time.Time }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ledger.go` | Sole file defining GroupReference, TimedGroupReference, their Validate and nil-safe Get*OrNull accessors. | Accessors must stay nil-safe — callers pass possibly-nil references straight into SetNillable* builders. | + +## Anti-Patterns + +- Dereferencing a TransactionGroupID without the nil/empty guard the GetIDOrNull helpers provide. +- Adding fields here that belong to a specific charge type — this package is intentionally minimal and broadly imported. + +## Decisions + +- **Keep ledger references as a dependency-light leaf package** — It is imported by nearly every charge sub-package and ledger adapter; minimal imports (only pkg/models) avoid import cycles. + + diff --git a/openmeter/billing/charges/models/payment/CLAUDE.md b/openmeter/billing/charges/models/payment/CLAUDE.md new file mode 100644 index 0000000000..ffcf436acc --- /dev/null +++ b/openmeter/billing/charges/models/payment/CLAUDE.md @@ -0,0 +1,52 @@ +# payment + + + +> Domain models, Ent mixins, and ValidationIssue errors for payment settlements on credit-purchase charges. Models a two-phase settlement (authorized -> settled) with two concrete variants: External (off-platform) and Invoiced (settled via an OpenMeter standard invoice line). + +## Patterns + +**Base + variant composition** — A shared Base (status, amount, service period, authorized/settled timed ledger refs) is embedded into Payment, which External and Invoiced embed; each variant adds only its extra fields (Invoiced adds LineID/InvoiceID). (`type Invoiced struct { Payment; LineID string; InvoiceID string }`) +**Status-driven invariant validation** — Base.Validate switches on Status: StatusAuthorized requires Authorized data; StatusSettled requires both Settled and Authorized data. Amount must be positive. (`case StatusSettled: if r.Settled == nil { ... }; if r.Authorized == nil { ... }`) +**ValidationIssue errors with HTTP attributes** — Lifecycle errors are package-level models.ValidationIssue values with an ErrorCode constant, critical severity, and a commonhttp HTTP status attribute (400). (`var ErrPaymentAlreadySettled = models.NewValidationIssue(ErrCodePaymentAlreadySettled, "payment already settled", models.WithCriticalSeverity(), commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))`) +**Generic Create/Update/Map over variant creators** — Base Create/Update/Getter helpers operate on generic Creator[T]/Updater[T]/Getter; variant helpers (CreateExternal, CreateInvoiced) wrap them and add variant-only setters via extended interfaces (InvoicedCreator embeds Creator). (`func CreateInvoiced[T InvoicedCreator[T]](creator InvoicedCreator[T], in InvoicedCreate) T`) +**Timed ledger ref round-trip** — Authorized/Settled are stored as separate *_transaction_group_id + *_at columns and reconstructed into a *ledgertransaction.TimedGroupReference only when both the id and the time are non-nil. (`func mapTimedLedgerTransactionGroupReferenceFromDB(reference *string, at *time.Time) *ledgertransaction.TimedGroupReference`) +**ErrorAttributes for observability** — Each variant implements ErrorAttributes() returning settlement status/type/id attribute keys, distinguishing PaymentSettlementTypeExternal vs PaymentSettlementTypeStandardInvoice. (`func (r Invoiced) ErrorAttributes() models.Attributes`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `models.go` | Status enum, Base struct + status-driven Validate, Payment struct (NamespacedID+ManagedModel+Base), and settlement-type/attribute-key constants. | Authorized/Settled invariants depend on Status; amount must be positive. A TODO notes settlement-type constants should be unified. | +| `mixin.go` | Ent mixin (service period, status enum, numeric amount, authorized/settled group-id + at columns) plus generic Create/Update/Getter and the timed-ref mapping helpers. | Edges to ledger are TODO (only group-id strings stored). Update/Create coerce all times to UTC via convert.TimePtrIn. | +| `external.go` | External variant (off-platform settlement): ExternalCreateInput/Validate, CreateExternal/MapExternalFromDB/UpdateExternal. | ExternalMixin is just an alias for Mixin — External adds no columns beyond Base. | +| `invoiced.go` | Invoiced variant: invoicedMixin adds immutable line_id/invoice_id columns; InvoicedCreate/Validate, CreateInvoiced, MapInvoicedFromDB. | LineID and InvoiceID are Immutable and required; InvoicedCreator extends Creator with SetLineID/SetInvoiceID. | +| `errors.go` | Package-level payment lifecycle ValidationIssues (already-authorized, already-settled, cannot-settle-unauthorized). | All carry HTTP 400 and critical severity; reuse these rather than constructing ad-hoc errors for the same conditions. | + +## Anti-Patterns + +- Marking a payment StatusSettled without both Authorized and Settled ledger data populated. +- Returning plain fmt.Errorf for payment lifecycle conflicts instead of the predefined ValidationIssues in errors.go. +- Mutating line_id/invoice_id on an Invoiced payment — both are immutable in the schema. +- Reconstructing a TimedGroupReference when either the group id or the timestamp is nil. +- Allowing a non-positive settlement amount. + +## Decisions + +- **External and Invoiced share a Base via embedding rather than duplicating settlement fields** — Authorization/settlement lifecycle and amount/period semantics are identical across settlement types; only the linkage (invoice line vs none) differs. +- **Authorized/settled ledger linkage stored as id+timestamp column pairs, edges deferred** — Keeps the schema simple now (TODO to add real ledger edges) while still recording the transaction group and time for both phases. + +## Example: Defining a reusable payment-lifecycle ValidationIssue with HTTP status + +``` +const ErrCodeCannotSettleNotAuthorizedPayment models.ErrorCode = "cannot_settle_not_authorized_payment" + +var ErrCannotSettleNotAuthorizedPayment = models.NewValidationIssue( + ErrCodeCannotSettleNotAuthorizedPayment, + "cannot settle an unauthorized payment", + models.WithCriticalSeverity(), + commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest), +) +``` + + diff --git a/openmeter/billing/charges/service/CLAUDE.md b/openmeter/billing/charges/service/CLAUDE.md new file mode 100644 index 0000000000..226a33f473 --- /dev/null +++ b/openmeter/billing/charges/service/CLAUDE.md @@ -0,0 +1,60 @@ +# service + + + +> Root charges facade implementing charges.Service: orchestrates flatfee/usagebased/creditpurchase per-type services, the meta adapter, recognizer, and invoiceupdater into Create/AdvanceCharges/GetByID(s)/ListCharges/ApplyPatches/ListCustomersToAdvance plus subscription and standard-invoice hooks. Single entry point both production wiring and tests drive. + +## Patterns + +**Validate -> namespace lockdown -> transaction.Run** — Mutating methods run input.Validate(), then s.validateNamespaceLockdown(ns), then wrap the body in transaction.Run / RunWithNoValue over s.adapter. (`if err := s.validateNamespaceLockdown(input.Customer.Namespace); err != nil { return nil, err }; advancedCharges, err := transaction.Run(ctx, s.adapter, func(ctx) (...) {...})`) +**Per-type fan-out via ByType / chargesByType** — Heterogeneous charge intents/charges are split into flatFee/usageBased/creditPurchase buckets (input.Intents.ByType, helpers.chargesByType) and dispatched to the matching sub-service, then re-merged by original index with charges.WithIndex / charges.NewCharge. (`intentsByType, err := input.Intents.ByType(); flatFees, err := s.flatFeeService.Create(ctx, flatfee.CreateInput{Intents: lo.Map(intentsByType.FlatFee,...)})`) +**Constructor registers billing hooks** — New() builds invoiceupdater.New(billingService,logger) and calls BillingService.RegisterStandardInvoiceHooks(standardInvoiceEventHandler); Config.Validate requires all ten dependencies non-nil. (`config.BillingService.RegisterStandardInvoiceHooks(standardInvoiceEventHandler)`) +**Earnings recognition after every state change** — Create/Advance/credit-purchase transitions/standard-invoice events call recognizeCustomerEarnings (deduped customer+currency via lo.Uniq) through the recognizer.Service. (`if err := s.recognizeCustomerEarnings(ctx, input.Customer, currencies...); err != nil { return nil, err }`) +**Auto-advance after create in a separate transaction** — Create commits charge state, then autoAdvanceCreatedCharges advances credit-only charges whose AdvanceAfter is already due in a fresh call so creation persists even if advancing fails. (`return s.autoAdvanceCreatedCharges(ctx, result.charges)`) +**Tax-code defaulting on create** — applyDefaultTaxCodes fills nil TaxCodeID per intent from taxCodeService.GetOrganizationDefaultTaxCodes — invoicing default for flat-fee/usage-based, credit-grant default for credit purchases. (`defaultID := defaults.InvoicingTaxCodeID; if intents[idx].Type()==meta.ChargeTypeCreditPurchase { defaultID = defaults.CreditGrantTaxCodeID }`) +**InvocableCharge adapter for patches** — ApplyPatches wraps each searched charge in flatFeeInvocableCharge/usageBasedInvocableCharge, calls TriggerPatch to collect invoiceupdater.Patch, then s.invoiceUpdater.ApplyPatches; credit-purchase is not invocable. (`result, err := invocableCharge.TriggerPatch(ctx, patch); invoicePatches = append(invoicePatches, result.InvoicePatches...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | service struct, Config + Validate (10 required deps), New() with hook registration, validateNamespaceLockdown. | metaAdapter is used directly (no meta service yet); New must register standard invoice hooks or invoice-driven credit purchase transitions won't fire. | +| `create.go` | Create pipeline: tax defaults, per-type bulk create, gathering-line collection, credit-purchase invoice-now, recognition, auto-advance. | Credit purchases bypass collection alignment when ServicePeriod.From <= now (billed immediately); invoice-now runs AFTER the tx commits, not inside it. | +| `advance.go` | AdvanceCharges: lists non-final charges, advances flat-fee then usage-based (with customer override + resolved feature meters), recognizes earnings. | Nil advancedCharge from a sub-service means no transition — skip it; usage-based needs ResolveFeatureMeters before advancing. | +| `get.go` | GetByID/GetByIDs and expandChargesWithTypes which groups search items by type, fetches each sub-service, and reorders via entutils.InIDOrder. | GetByIDs runs in a transaction; missing IDs surface as NewChargeNotFoundError only in GetByID. | +| `patch.go` | ApplyPatches: applies per-charge patches then runs Creates LAST (a patch may free a UniqueReferenceID a create reuses). | Validates every charge is owned by the input customer+namespace before triggering patches. | +| `invoice.go` | Standard-invoice hook: processorByType dispatch keyed on StandardInvoice.Status (DraftCreated/Issued/PaymentAuthorized/Paid) into credit-purchase Post* handlers. | flatFee/usageBased processors are mostly noop today; nil processor returns error, not skip. Always recognizeCustomerEarnings after handling. | +| `helpers.go` | chargesByType bucketing and the InvocableCharge interface + flatFee/usageBased wrappers. | newInvocableCharges errors on duplicate charge IDs and on credit-purchase type (unsupported for patches). | +| `base_test.go` | BaseSuite wiring the full charges stack on top of billingtest.BaseSuite with test handlers; createMockChargeIntent builds flatfee/usagebased intents. | TearDownTest must reset handlers + MockStreamingConnector and clock.UnFreeze/ResetTime; line engines must be registered on BillingService before use. | + +## Anti-Patterns + +- Calling per-type adapters directly instead of the flatFee/usageBased/creditPurchase sub-services. +- Running Create's invoice-now or auto-advance inside the creation transaction. +- Skipping validateNamespaceLockdown on a new mutating method. +- Forgetting recognizeCustomerEarnings after a state transition. +- Adding charge types without extending ByType/chargesByType/expandChargesWithTypes/newInvocableCharges dispatch. + +## Decisions + +- **A single root service multiplexes three per-type charge services rather than callers picking a type.** — Charges are heterogeneous within one customer/subscription; the facade preserves intent order and centralizes recognition, tax defaults, and invoice projection. +- **Auto-advance and invoice-now run outside the create transaction.** — Creation state must persist even if a downstream advance/invoice fails, since a worker will retry advancement. +- **ApplyPatches creates new charges last.** — Deleting a charge can free a UniqueReferenceID that a subsequent create reuses, so ordering avoids collisions. + +## Example: Mutating method shape: validate, lockdown, transactional fan-out, recognize + +``` +func (s *service) AdvanceCharges(ctx context.Context, input charges.AdvanceChargesInput) (charges.Charges, error) { + if err := input.Validate(); err != nil { return nil, err } + if err := s.validateNamespaceLockdown(input.Customer.Namespace); err != nil { return nil, err } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (charges.Charges, error) { + inScope, err := s.ListCharges(ctx, charges.ListChargesInput{Namespace: input.Customer.Namespace, StatusNotIn: []meta.ChargeStatus{meta.ChargeStatusFinal}, CustomerIDs: []string{input.Customer.ID}, Expands: meta.Expands{meta.ExpandRealizations}}) + if err != nil { return nil, err } + // ... dispatch to flatFeeService / usageBasedService, then: + if err := s.recognizeCustomerEarnings(ctx, input.Customer, currencies...); err != nil { return nil, err } + return advancedCharges, nil + }) +} +``` + + diff --git a/openmeter/billing/charges/statemachine/CLAUDE.md b/openmeter/billing/charges/statemachine/CLAUDE.md new file mode 100644 index 0000000000..b6ab46fb2d --- /dev/null +++ b/openmeter/billing/charges/statemachine/CLAUDE.md @@ -0,0 +1,34 @@ +# statemachine + + + +> Generic, type-parameterized charge lifecycle state machine built on qmuntal/stateless. Each per-charge-type service (flatfee/usagebased/creditpurchase) instantiates Machine[CHARGE,BASE,STATUS] to drive status transitions and accumulate invoiceupdater.Patch side effects; this package holds no domain rules itself. + +## Patterns + +**Generic ChargeLike contract** — CHARGE must satisfy ChargeLike[CHARGE,BASE,STATUS] (GetChargeID/GetStatus/WithStatus/GetBase/WithBase) and STATUS must be a Status (~string with Validate()); the machine mutates the charge through these accessors only. (`type Machine[CHARGE ChargeLike[CHARGE, BASE, STATUS], BASE any, STATUS Status] struct {...}`) +**External-storage stateless machine** — New() builds stateless.NewStateMachineWithExternalStorage reading status from Charge.GetStatus() and writing back via Charge.WithStatus after newStatus.Validate(); uses FiringImmediate. (`stateless.NewStateMachineWithExternalStorage(accessor, mutator, stateless.FiringImmediate)`) +**FireAndActivate guards + persists** — FireAndActivate checks CanFire (returns ErrUnsupportedOperation if not), fires + activates the trigger, then persists via config.Persistence.UpdateBase and folds the result back with WithBase. (`if !canFire { return fmt.Errorf("%w: %s [status=%s,id=%s]", ErrUnsupportedOperation, trigger, ...) }`) +**Drive to stable state with TriggerNext** — AdvanceUntilStateStable loops firing meta.TriggerNext until CanFire is false, returning nil when no transition happened or a pointer to the advanced charge otherwise. (`for { canFire, _ := m.CanFire(ctx, meta.TriggerNext); if !canFire { ... } m.FireAndActivate(ctx, meta.TriggerNext) }`) +**Patch accumulation buffer** — Transitions append invoiceupdater.Patch via AddInvoicePatch; callers read InvoicePatches() (clone) or DrainInvoicePatches() (consume+clear). (`func (m *Machine...) DrainInvoicePatches() []invoiceupdater.Patch { patches := m.invoicePatches; m.invoicePatches = nil; return patches }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `machine.go` | Status/ChargeLike/Persistence/Config/StateMachine interfaces, Machine generic struct, New, Configure, CanFire, FireAndActivate, AdvanceUntilStateStable, RefetchCharge, patch buffer. | Config.Validate requires Persistence.UpdateBase and Refetch; status mutator re-validates every new status; ErrUnsupportedOperation is a models.NewGenericPreConditionFailedError wrapping CanFire=false. | +| `machine_test.go` | Unit tests over the generic machine using a fake meta-typed charge. | Tests don't touch Postgres; they exercise transition/guard logic in isolation. | + +## Anti-Patterns + +- Mutating charge status/base directly instead of through WithStatus/WithBase accessors. +- Firing triggers without CanFire guarding (bypassing ErrUnsupportedOperation). +- Embedding charge-type-specific business rules here instead of in the per-type service's state configuration. +- Reading invoicePatches without DrainInvoicePatches when the caller intends to consume them. + +## Decisions + +- **One generic Machine parameterized over CHARGE/BASE/STATUS instead of three hand-written machines.** — Flat-fee, usage-based, and credit-purchase share lifecycle plumbing (fire, activate, persist, accumulate patches); only the state graph differs, configured per type. +- **External-storage stateless with Persistence callbacks rather than in-memory state.** — Charge status lives in the DB; the machine reads/writes through caller-supplied UpdateBase/Refetch so persistence stays in the owning adapter. + + diff --git a/openmeter/billing/charges/testutils/CLAUDE.md b/openmeter/billing/charges/testutils/CLAUDE.md new file mode 100644 index 0000000000..cfc77f6b39 --- /dev/null +++ b/openmeter/billing/charges/testutils/CLAUDE.md @@ -0,0 +1,30 @@ +# testutils + + + +> Reusable test wiring for the full charges stack. NewServices assembles meta/lineage/flatfee/usagebased/creditpurchase adapters+services and the root charges service from external deps; MockHandlers supplies no-op ledger-transaction handlers. Consumed by subscriptionsync and cross-package billing/credit tests. + +## Patterns + +**One-call stack assembly** — NewServices(t, Config) constructs every adapter and service in dependency order (metaAdapter, lockr, lineage, flatfee, usagebased, creditpurchase, root charges) and registers each line engine on BillingService. (`if err := config.BillingService.RegisterLineEngine(flatFeeService.GetLineEngine()); err != nil { return nil, ... }`) +**Mock handlers return synthetic ledger refs** — MockHandlers implements flatfee/creditpurchase/usagebased Handler interfaces, each On* method returning newMockLedgerTransactionGroupReference() (a fresh ULID) so charge lifecycle runs without real ledger writes. (`func newMockLedgerTransactionGroupReference() ledgertransaction.GroupReference { return ledgertransaction.GroupReference{TransactionGroupID: ulid.Make().String()} }`) +**Config.Validate gates required deps** — Config.Validate collects errors for missing Client/BillingService/FeatureService/StreamingConnector/handlers/TaxCodeService via errors.Join; RecognizerService defaults to recognizer.NoopService and Logger defaults to slog.Default(). (`if config.RecognizerService == nil { config.RecognizerService = recognizer.NoopService{} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config + Validate, Services struct, NewServices full-stack builder over an *entdb.Client. | Line engines MUST be registered before charge operations; RatingService uses billingratingservice.New() per engine; logger/recognizer are the only optional fields. | +| `handlers.go` | MockHandlers and the three mock Handler implementations returning synthetic ledger group references. | mockFlatFeeHandler.OnAllocateCredits returns nil for zero PreTaxAmountToAllocate; these mocks do no real allocation accounting beyond echoing amounts. | + +## Anti-Patterns + +- Hand-wiring charge services in tests instead of calling NewServices. +- Skipping RegisterLineEngine, which leaves billing unable to project charge lines. +- Using the mock handlers when a test needs real ledger/recognizer accounting. + +## Decisions + +- **A single NewServices builder mirrors production wiring (base_test.go) for cross-package consumers.** — subscriptionsync and stripe/credits tests need the whole charges stack without duplicating the multi-adapter construction sequence. + + diff --git a/openmeter/billing/charges/usagebased/CLAUDE.md b/openmeter/billing/charges/usagebased/CLAUDE.md new file mode 100644 index 0000000000..a0c334a194 --- /dev/null +++ b/openmeter/billing/charges/usagebased/CLAUDE.md @@ -0,0 +1,64 @@ +# usagebased + + + +> Domain-model and interface root for the usage-based charge type: defines the Charge aggregate (ChargeBase, Intent, State), RealizationRun history, DetailedLine, the Status state-machine vocabulary, and the Adapter/Handler/Service interfaces that the adapter/ and service/ children implement. This package owns the value types and contracts; it contains no DB or orchestration logic itself. + +## Patterns + +**Validate() aggregates errors via NewNillableGenericValidationError** — Every domain/input type has Validate() that collects into var errs []error, wraps each field with fmt.Errorf("field: %w", err), and returns models.NewNillableGenericValidationError(errors.Join(errs...)) — never early-return on first failure. (`func (c ChargeBase) Validate() error { var errs []error; if err := c.Intent.Validate(); err != nil { errs = append(errs, fmt.Errorf("intent: %w", err)) }; return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Normalized() canonicalizes timestamps before persist/compare** — Types carrying time fields expose Normalized() calling meta.NormalizeTimestamp / meta.NormalizeOptionalTimestamp (Intent.InvoiceAt, State.AdvanceAfter, RealizationRunBase StoredAtLT/ServicePeriodTo). Persist and compare normalized values, never raw. (`func (i Intent) Normalized() Intent { i.Intent = i.Intent.Normalized(); i.InvoiceAt = meta.NormalizeTimestamp(i.InvoiceAt); return i }`) +**Voided billing-history filtering** — RealizationRun.IsVoidedBillingHistory() is the single gate for excluding runs from future billing/balance math: true when DeletedAt != nil OR Type == RealizationRunTypeInvalidDueToUnsupportedCreditNote. Sum/Bisect/MapToBillingMeteredQuantity must skip these via WithoutVoidedBillingHistory(). (`func (r RealizationRuns) WithoutVoidedBillingHistory() RealizationRuns { return lo.Filter(r, func(run RealizationRun, _ int) bool { return !run.IsVoidedBillingHistory() }) }`) +**Cumulative-to-line quantity mapping** — RealizationRun.MeteredQuantity is cumulative from intent service-period start to ServicePeriodTo; convert to billing.StandardLine semantics only via RealizationRuns.MapToBillingMeteredQuantity, which derives PreLinePeriod from the latest non-voided prior run and errors if LinePeriod goes negative. (`linePeriod := currentRun.MeteredQuantity.Sub(preLinePeriod); if linePeriod.IsNegative() { return BillingMeteredQuantity{}, fmt.Errorf("line period metered quantity is negative...") }`) +**RateableIntent bridges charges into the billing rating engine** — Rating is performed through the billing.rating.StandardLineAccessor interface, implemented by RateableIntent. A charge is hardcoded as never progressively billed, zero previously-billed amount, and no user-defined line discounts — keep these invariants. (`var _ rating.StandardLineAccessor = (*RateableIntent)(nil); func (r RateableIntent) IsProgressivelyBilled() bool { return false }`) +**Status enum mirrors meta.ChargeStatus with dotted substates** — Status is a string enum of dotted substates (e.g. active.final_realization.issuing). Status.Validate() checks membership in Values(); ToMetaChargeStatus() coarsens by splitting on the first '.'. Mutability is classified by membership lists, not string parsing. (`func IsMutableInvoiceBackedRealizationStatus(status Status) bool { return slices.Contains(mutableInvoiceBackedRealizationStatuses, status) }`) +**Handler interface with UnimplementedHandler default** — Side-effecting credit/payment/invoice hooks are declared on the Handler interface; UnimplementedHandler provides not-implemented stubs and is conformance-asserted with var _ Handler = (*UnimplementedHandler)(nil). New hooks go on Handler plus the stub. (`var _ Handler = (*UnimplementedHandler)(nil); func (h UnimplementedHandler) OnInvoiceUsageAccrued(...) (ledgertransaction.GroupReference, error) { return ledgertransaction.GroupReference{}, errors.New("not implemented") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `charge.go` | Charge/ChargeBase/Intent/State/Expands aggregate; GetFeatureKeyOrID returns a state-aware feature ref (key when StatusCreated, ID otherwise, ID-then-key fallback when StatusDeleted). | GetFeatureKeyOrID branches on Status — adding a status without updating the switch silently falls into the default (ID-only) branch. | +| `realizationrun.go` | RealizationRun lifecycle types, RealizationRunType, BillingMeteredQuantity, BisectByTimestamp, MapToBillingMeteredQuantity, voided-history helpers. | Create input rejects RealizationRunTypeInvalidDueToUnsupportedCreditNote; run service-period start is derived from the prior non-voided run's ServicePeriodTo, not a stored field. | +| `statemachine.go` | Status enum constants and the mutableFinalRealization / mutableInvoiceBackedRealization membership lists used to decide where period changes are allowed. | Issuing/Completed states are intentionally absent from the mutable lists — adding them would let billing mutate immutable invoice/ledger records. | +| `adapter.go` | Adapter interface = composition of Charge/RealizationRun/CreditAllocation/InvoiceUsage/Payment sub-adapters plus entutils.TxCreator; implemented by adapter/. | The sub-interface split is load-bearing; add new persistence methods to the matching sub-interface, not a flat one. | +| `handler.go` | Handler hooks (OnInvoiceUsageAccrued, OnPaymentAuthorized/Settled, OnCreditsOnlyUsageAccrued[+Correction]) and their input structs with Validate / ValidateWith(currencyx.Calculator). | Correction inputs need ValidateWith(currencyCalculator) for amount-matching checks; plain Validate() is insufficient. | +| `rating.go` | RateableIntent implements billing.rating.StandardLineAccessor to feed a charge into the shared rating engine. | Discount CorrelationIDs are placeholders ('usagebased-ratecard-*') because charges do not use splitlinegroups; do not rely on them downstream. | +| `detailedline.go / detailedline_uniqueref.go` | DetailedLine over stddetailedline.Base; NewDetailedLinesFromBilling maps rating output; service-period suffix encode/decode for ChildUniqueReferenceID ('id@[from..to]'). | Validate uses stddetailedline.IgnoreQuantityChecks(); PricerReferenceID must be non-empty; strip the '@[...]' suffix before re-keying. | +| `ratingengine.go / errors.go` | RatingEngine enum (delta vs period_preserving) controlling correction semantics; ValidationIssue constants (negative total, credit-allocation mismatch, active-run-exists). | RatingEngine drives whether prior periods are re-snapshotted; errors are models.ValidationIssue with critical severity + 400 status, not plain errors. | + +## Anti-Patterns + +- Returning on the first validation failure instead of collecting into errs and returning models.NewNillableGenericValidationError(errors.Join(errs...)). +- Counting deleted or unsupported-credit-note runs in billing/balance math instead of filtering through IsVoidedBillingHistory / WithoutVoidedBillingHistory. +- Comparing or persisting timestamps without meta.NormalizeTimestamp / Normalized(), causing UTC/precision drift against stored rows. +- Adding an issuing/completed Status to the mutable membership lists, letting period changes touch immutable invoice or ledger records. +- Deriving billing.StandardLine quantity straight from RealizationRun.MeteredQuantity (cumulative) instead of MapToBillingMeteredQuantity, producing wrong line totals. + +## Decisions + +- **This package holds only domain types and interfaces (Adapter, Handler, Service); DB logic lives in adapter/ and orchestration/state machines in service/.** — Keeps the type/contract layer importable by both children and tests without pulling in Ent or orchestration dependencies, and lets the state machine and persistence evolve independently. +- **Voided runs (deleted or unsupported-credit-note) are retained but excluded from future billing via IsVoidedBillingHistory rather than physically removed.** — Unsupported-credit-note invoice lines cannot be deleted without prorating/credit-note support, so runs are kept for audit while being ignored by rating and balance calculations. +- **MeteredQuantity is stored as a cumulative value and converted to per-line quantity at read time.** — Standard invoice lines need pre-line + line-period quantities; storing cumulative lets later runs reconstruct prior billed quantity from the latest non-voided prior run. + +## Example: Mapping a cumulative run quantity into billing line quantity, skipping voided history + +``` +func (r RealizationRuns) MapToBillingMeteredQuantity(currentRun RealizationRun) (BillingMeteredQuantity, error) { + preLinePeriod := alpacadecimal.Zero + var latestPriorRun *RealizationRun + for idx := range r { + if r[idx].IsVoidedBillingHistory() { continue } + if !r[idx].ServicePeriodTo.Before(currentRun.ServicePeriodTo) { continue } + if latestPriorRun == nil || r[idx].ServicePeriodTo.After(latestPriorRun.ServicePeriodTo) { + latestPriorRun = &r[idx] + } + } + if latestPriorRun != nil { preLinePeriod = latestPriorRun.MeteredQuantity } + linePeriod := currentRun.MeteredQuantity.Sub(preLinePeriod) + if linePeriod.IsNegative() { return BillingMeteredQuantity{}, fmt.Errorf("line period metered quantity is negative") } + return BillingMeteredQuantity{PreLinePeriod: preLinePeriod, LinePeriod: linePeriod}, nil +} +``` + + diff --git a/openmeter/billing/charges/usagebased/adapter/CLAUDE.md b/openmeter/billing/charges/usagebased/adapter/CLAUDE.md new file mode 100644 index 0000000000..47522f499e --- /dev/null +++ b/openmeter/billing/charges/usagebased/adapter/CLAUDE.md @@ -0,0 +1,64 @@ +# adapter + + + +> Ent-backed persistence adapter for usage-based charges and their realization runs. Implements the usagebased.Adapter interface (and its sub-interfaces) over the ChargeUsageBased / ChargeUsageBasedRuns / detailed-line / credit-allocation / invoiced-usage / payment Ent tables; it is the only place that translates usagebased domain types to and from DB rows. + +## Patterns + +**Transaction-aware repo body** — Every mutating or reading adapter method wraps its body in entutils.TransactingRepo / TransactingRepoWithNoValue, using the passed tx *adapter (tx.db) rather than a.db, so the call rebinds to any transaction already carried in ctx. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (usagebased.Charge, error) { entities, err := tx.db.ChargeUsageBased.Query()... })`) +**Validate inputs before DB work** — Each method first calls Validate() on its domain inputs (charge, runID, input, in) and returns early on error before opening the transaction. (`if err := charge.Validate(); err != nil { return usagebased.ChargeBase{}, err }`) +**Interface conformance asserts per file** — Each file declares a compile-time assertion that *adapter satisfies the relevant sub-interface (ChargeAdapter, RealizationRunAdapter, RealizationRunPaymentAdapter, RealizationRunCreditAllocationAdapter, RealizationRunInvoiceUsageAdapter). (`var _ usagebased.RealizationRunPaymentAdapter = (*adapter)(nil)`) +**Exported Map*FromDB mappers** — DB->domain translation lives in mapper.go as exported MapChargeFromDB / MapChargeBaseFromDB / MapRealizationRun(s|Base)FromDB; sub-model mapping delegates to chargemeta, creditrealization, invoicedusage, payment, totals, stddetailedline package helpers (MapFromDB / FromDB). (`chargeMeta := chargemeta.MapFromDB(entity); ... Totals: totals.FromDB(dbRun)`) +**Timestamp normalization to UTC** — Times are passed through meta.NormalizeTimestamp / NormalizeOptionalTimestamp and .In(time.UTC) before persisting; mappers read DB times back with .UTC(). (`SetInvoiceAt(meta.NormalizeTimestamp(intent.InvoiceAt).In(time.UTC))`) +**Detailed-line soft-delete + upsert by ChildUniqueReferenceID** — UpsertRunDetailedLines soft-deletes existing rows (SetDeletedAt) for the run except ChildUniqueReferenceIDs being kept, sets the run's DetailedLinesPresent=true, then CreateBulk...OnConflict on (namespace, charge_id, run_id, child_unique_reference_id) preserving created_at/id. (`OnConflict(sql.ConflictColumns(FieldNamespace, FieldChargeID, FieldRunID, FieldChildUniqueReferenceID), sql.ConflictWhere(sql.IsNull(FieldDeletedAt)), sql.ResolveWithNewValues())`) +**Expand-gated edge loading** — Realization runs and their child edges (credit allocations, invoiced usage, payment) are only loaded when meta.Expands requests them; detailed lines are fetched in a second pass via FetchDetailedLines when ExpandDetailedLines is set. (`if input.Expands.Has(meta.ExpandRealizations) { query = expandRealizations(query, input.Expands) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor, adapter struct (db, logger, metaAdapter), and the entutils transaction plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self). | Config.Validate requires Client, Logger, and MetaAdapter all non-nil; New returns the usagebased.Adapter interface, not the concrete type. | +| `charge.go` | ChargeAdapter: CreateCharges, UpdateCharge, UpdateSubscriptionItemID, DeleteCharge (soft delete + StatusDeleted), GetByID(s); status is dual-written via SetStatus(metaStatus) and SetStatusDetailed(charge.Status). | GetByIDs intentionally skips a namespace EQ to allow multi-namespace expansion but relies on entutils.InIDOrder for namespace filtering/ordering; charge status must round-trip through ToMetaChargeStatus(). | +| `mapper.go` | All DB->domain mappers; MapRealizationRunFromDB requires CreditAllocations/InvoicedUsage/Payment edges loaded and errors (NotLoadedError) if not. | MapRealizationRunsFromDB forces empty runs to nil and sorts by ServicePeriodTo; calling it without WithRuns loaded returns a 'not loaded' error. | +| `detailedline.go` | FetchDetailedLines (gated by run.DetailedLinesPresent) and UpsertRunDetailedLines (soft-delete + bulk upsert); buildDetailedLineCreate and mapDetailedLineFromDB. | Detailed lines are only marked present (mo.Some) when the run's persisted DetailedLinesPresent flag is true; treating unknown lines as empty can overcharge late events. FetchDetailedLines never repairs the flag. | +| `realizationrun.go` | RealizationRunAdapter: CreateRealizationRun (sets Type and InitialType, DetailedLinesPresent=false) and UpdateRealizationRun (mo.Option-gated field updates, input.Normalized()). | Update only sets fields whose mo.Option IsPresent(); DeletedAt/LineID use SetOrClear semantics. Totals are written via totals.Set. | +| `creditallocation.go / invoicedusage.go / payment.go` | Per-edge create/update adapters for run credit allocations, invoiced (accrued) usage, and payments; each delegates field-setting to its model package (creditrealization.Create, invoicedusage.Create, payment.Create/UpdateInvoiced). | payment.go enforces runID.Namespace == in.Namespace; these write child rows keyed by RunID and must be created within the run's transaction. | +| `detailedline_test.go` | Suite-based integration test (DetailedLineAdapterSuite) over a real Postgres TestDB + migrations exercising upsert replace/soft-delete and the DetailedLinesPresent flag semantics. | Uses testutils.InitPostgresDB + migrate.OMMigrationsConfig; drives behavior through s.adapter (CreateCharges/CreateRealizationRun/UpsertRunDetailedLines), not raw Ent. | + +## Anti-Patterns + +- Using a.db directly inside a method body instead of the tx *adapter from TransactingRepo — breaks transaction propagation. +- Loading realization runs without their CreditAllocations/InvoicedUsage/Payment edges and passing to MapRealizationRunFromDB — returns 'not loaded' errors. +- Marking detailed lines as present (mo.Some) without honoring the run's DetailedLinesPresent flag — can cause late-event overcharging. +- Persisting timestamps without meta.NormalizeTimestamp + UTC, or reading them back without .UTC(). +- Skipping the Validate() guard on inputs before opening a transaction. + +## Decisions + +- **Status is stored in two columns: a coarse meta status (SetStatus) plus a detailed status (SetStatusDetailed).** — meta-layer queries operate on the normalized ChargeStatus while the usagebased lifecycle needs its richer Status enum; both must stay in sync via ToMetaChargeStatus(). +- **DetailedLinesPresent is a persisted boolean on the run rather than inferred from row count.** — An empty detailed-line set is meaningfully different from 'not yet materialized'; the flag prevents late-arriving usage from being treated as already-rated empty. +- **Detailed lines are replaced via soft-delete + conflict-resolving bulk upsert keyed by ChildUniqueReferenceID.** — Preserves stable row IDs/created_at across re-runs (corrections) while allowing rows to be retired without hard deletes. + +## Example: A transaction-aware adapter method that validates, queries Ent gated by expands, and maps results back to domain. + +``` +func (a *adapter) GetByID(ctx context.Context, input usagebased.GetByIDInput) (usagebased.Charge, error) { + if err := input.Validate(); err != nil { + return usagebased.Charge{}, err + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (usagebased.Charge, error) { + query := tx.db.ChargeUsageBased.Query(). + Where(dbchargeusagebased.Namespace(input.ChargeID.Namespace)). + Where(dbchargeusagebased.ID(input.ChargeID.ID)) + if input.Expands.Has(meta.ExpandRealizations) { + query = expandRealizations(query, input.Expands) + } + entity, err := query.First(ctx) + if err != nil { + if db.IsNotFound(err) { + return usagebased.Charge{}, models.NewGenericNotFoundError(fmt.Errorf("usage based charge [id=%s] not found", input.ChargeID)) +// ... +``` + + diff --git a/openmeter/billing/charges/usagebased/service/CLAUDE.md b/openmeter/billing/charges/usagebased/service/CLAUDE.md new file mode 100644 index 0000000000..1611352e48 --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/CLAUDE.md @@ -0,0 +1,65 @@ +# service + + + +> The orchestration layer for usage-based billing charges: it owns the per-settlement-mode state machines (credit_only, credit_then_invoice), the billing.LineEngine implementation, and the charges.Service entrypoints (Create, AdvanceCharge, TriggerPatch, GetByID, GetCurrentTotals). It decides WHICH triggers fire and WHICH status to enter, delegating rating to the rating/ subpackage and run mechanics (persistence, credits, payments) to the run/ subpackage. + +## Patterns + +**Config-validated New with composed sub-services** — New(Config) validates every dependency is non-nil, then constructs the rating Service (usagebasedrating.New) and run Service (usagebasedrun.New) internally and stores them as s.rater / s.runs. Public methods are on *service. (`func New(config Config) (usagebased.Service, error) { if err := config.Validate(); err != nil { return nil, err }; rater, err := usagebasedrating.New(...); runs, err := usagebasedrun.New(...); return &service{adapter: config.Adapter, rater: rater, runs: runs, ...} }`) +**Settlement-mode dispatch to a state machine** — newStateMachine switches on config.Charge.Intent.SettlementMode: CreditOnlySettlementMode -> NewCreditsOnlyStateMachine, CreditThenInvoiceSettlementMode -> NewCreditThenInvoiceStateMachine, default -> NewGenericNotImplementedError. Each state-machine constructor re-asserts the settlement mode and calls configureStates(). (`switch config.Charge.Intent.SettlementMode { case productcatalog.CreditOnlySettlementMode: return NewCreditsOnlyStateMachine(config) ... default: return nil, models.NewGenericNotImplementedError(...) }`) +**Declarative state config via stateless library + meta.Trigger* constants** — configureStates() builds the machine with s.Configure(Status).Permit(meta.Trigger, NextStatus, guard).OnActive/OnEntry(...). Guards use statelessx.BoolFn / WithParameters / AllOf. Status and Trigger values live in usagebased and meta packages — never invent local statuses. (`s.Configure(usagebased.StatusActive).Permit(meta.TriggerFinalInvoiceCreated, usagebased.StatusActiveFinalRealizationStarted, statelessx.BoolFn(s.IsAfterServicePeriod)).OnActive(statelessx.AllOf(s.SyncFeatureIDFromFeatureMeter, s.AdvanceAfterServicePeriodTo))`) +**Input.Validate() then transaction.Run(s.adapter, ...)** — Every public service method validates its Input first, then wraps the body in transaction.Run(ctx, s.adapter, fn). Mutating-by-id flows additionally go through withLockedCharge which acquires charges.NewLockKeyForCharge + locker.LockForTX before refetching the charge. (`return s.withLockedCharge(ctx, input.ChargeID, func(ctx context.Context, charge usagebased.Charge) (*usagebased.Charge, error) { ... return stateMachine.AdvanceUntilStateStable(ctx) })`) +**LineEngine bridges billing invoice lifecycle into state-machine triggers** — LineEngine implements billing.LineEngine (var _ billing.LineEngine = (*LineEngine)(nil)) returning LineEngineTypeChargeUsageBased. Its callbacks (OnStandardInvoiceCreated, OnCollectionCompleted, OnMutableStandardLinesDeleted) build a state machine per line via newStateMachineForStandardLine, fire the resolved trigger, AdvanceUntilStateStable, then populateUsageBasedStandardLineFromRun + stdLine.Validate(). (`trigger := resolveInvoiceCreatedTrigger(stateMachine.GetCharge(), stdLine.Period); stateMachine.FireAndActivate(ctx, trigger, invoiceCreatedInput{LineID: stdLine.ID, InvoiceID: input.Invoice.ID, ServicePeriodTo: stdLine.Period.To})`) +**Invoice mutations emitted as deferred invoiceupdater.Patch, not direct writes** — State-machine actions (DeleteCharge, ExtendCharge/ShrinkCharge handlers) never mutate invoices directly; they call s.AddInvoicePatch(invoiceupdater.New*Patch(...)). TriggerPatch drains them via stateMachine.DrainInvoicePatches() into result.InvoicePatches for the caller to apply. Voided/already-deleted runs are skipped (run.IsVoidedBillingHistory()). (`s.AddInvoicePatch(invoiceupdater.NewDeleteLinePatch(billing.LineID{Namespace: s.Charge.Namespace, ID: *run.LineID}, *run.InvoiceID))`) +**Realization-run lifecycle delegated to s.runs / s.rater** — Status actions never call ent/ledger/credit/streaming directly. StartFinalRealizationRun -> s.Runs.CreateRatedRun; FinalizeRealizationRun -> s.Rater.GetDetailedRatingForUsage + s.Runs.ReconcileCredits + s.Adapter.UpsertRunDetailedLines/UpdateRealizationRun; credit correction on delete -> s.Runs.CorrectAllCredits. Totals are RoundToPrecision(CurrencyCalculator) before compare. (`result, err := s.Runs.CreateRatedRun(ctx, usagebasedrun.CreateRatedRunInput{Charge: s.Charge, Type: usagebased.RealizationRunTypeFinalRealization, CreditAllocation: usagebasedrun.CreditAllocationExact, NoFiatTransactionRequired: true, ...})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config/New/service struct; composes rater+runs sub-services; GetLineEngine() returns &LineEngine{service: s}. | All deps are required (Validate rejects nil). Do not construct service{} directly; rater and runs must be built through New so their own Config validation runs. | +| `triggers.go` | AdvanceCharge, TriggerPatch, newStateMachine dispatch, getStateMachineConfigForPatch, withLockedCharge. | newStateMachine is the ONLY place settlement-mode->machine mapping belongs. withLockedCharge always re-fetches the charge with meta.ExpandRealizations after locking — don't trust a charge passed in from outside the lock. | +| `creditheninvoice.go` | CreditThenInvoiceStateMachine: full partial-invoice + final-realization + payment-settlement status graph; Extend/Shrink/Delete patch handlers. | Immutable boundaries (StatusActive*Issuing/Completed) MUST use UnsupportedExtendOperation/UnsupportedShrinkOperation (NewGenericPreConditionFailedError), not the real handlers. Shrinking past an invoice-backed run that is not line/invoice-backed is a precondition failure. | +| `creditsonly.go` | CreditsOnlyStateMachine: simpler credit-only graph; StartFinalRealizationRun / FinalizeRealizationRun; DeleteCharge honours CreditRefundPolicyCorrect. | Credit-only charges set NoFiatTransactionRequired: true and never touch the invoicing stack (Create short-circuits before gatheringLineFromUsageBasedCharge for CreditOnlySettlementMode). | +| `statemachine.go` | Shared stateMachine base (embeds chargestatemachine.Machine), StateMachineConfig+Validate, newStateMachineBase, guard/advance helpers (IsAfterServicePeriod, AdvanceAfterCollectionPeriodEnd, getFinalRunStoredAtLT). | StateMachineConfig.Validate requires expanded CustomerOverride.Customer, a valid MergedProfile, FeatureMeter.Meter, and CurrencyCalculator. storedAtLT for final runs is derived from MergedProfile.WorkflowConfig.Collection.Interval. | +| `lineengine.go` | LineEngine: billing.LineEngine impl — Split/Build/OnStandardInvoiceCreated/OnCollectionCompleted/OnMutableStandardLinesDeleted/OnUnsupportedCreditNote + gathering preview. | Only CreditThenInvoiceSettlementMode is supported on the invoicing path; other modes error. Guards before mutation: CurrentRealizationRunID must be nil (ErrActiveRealizationRunAlreadyExists), run must belong to input.Invoice.ID, and run.DeletedAt/Payment/InvoiceUsage gate deletion. | +| `linemapper.go` | populateUsageBasedStandardLineFromRun + mapUsageBasedDetailedLines: projects a RealizationRun onto a billing.StandardLine (quantities, credits, detailed lines, totals). | Run detailed lines must be expanded (mo.Some) or it errors. Mapped line totals are asserted equal to run.Totals.RoundToPrecision — a mismatch is a hard error. Uses mutator.ApplyUsageDiscount for net vs raw metered quantity. | +| `create.go` | service.Create: bulk-creates charges (s.adapter.CreateCharges), registers them with metaAdapter.RegisterCharges (ChargeTypeUsageBased), builds gathering lines per charge. | CreditOnlySettlementMode charges return early with no GatheringLineToCreate. RatingEngine is chosen at create time via s.rater.GetPreferredRatingEngineFor(intent) and frozen into the charge intent. | + +## Anti-Patterns + +- Putting settlement-mode->state-machine selection anywhere other than newStateMachine in triggers.go, or hardcoding a machine type in a handler. +- Calling ent/ledger/credit/streaming/rating directly from a status action instead of going through s.runs, s.rater, or s.adapter (rating/run decisions live in the subpackages). +- Mutating invoices directly from the state machine instead of emitting invoiceupdater.Patch via AddInvoicePatch / DrainInvoicePatches. +- Letting Extend/Shrink run on immutable statuses (StatusActive*Issuing/Completed) — those must map to UnsupportedExtend/ShrinkOperation, otherwise invoice-issued callbacks lose ownership of the state. +- Comparing run/line totals or credit amounts without RoundToPrecision(CurrencyCalculator), or projecting a run to a standard line without re-validating that line totals equal run totals. + +## Decisions + +- **Split the orchestration service (this folder) from rating/ and run/ subpackages so this layer only makes state-machine decisions while the subpackages own rating and run mechanics.** — Keeps the trigger/status logic auditable in one place and lets credits, payments, and rating be tested and reasoned about independently of the lifecycle graph. +- **Each settlement mode is its own state machine (CreditsOnly vs CreditThenInvoice) sharing a common stateMachine base rather than one machine with mode-conditional branches.** — Credit-only charges never invoice, while credit-then-invoice has partial-invoice, final-realization, and payment-settlement phases; separate configureStates() graphs keep each lifecycle explicit and prevent illegal transitions. +- **Invoice side effects are emitted as deferred invoiceupdater.Patch objects drained by the caller, not applied inline.** — The charge transaction and the billing invoice mutation are owned by different layers; patches let billing apply line create/delete/update against mutable vs immutable invoices appropriately (e.g. credit-note vs hard delete). + +## Example: Bridging a billing invoice-created event into a charge state-machine trigger and projecting the resulting run back onto the line + +``` +func (e *LineEngine) OnStandardInvoiceCreated(ctx context.Context, input billing.OnStandardInvoiceCreatedInput) (billing.StandardLines, error) { + if err := input.Validate(); err != nil { return nil, fmt.Errorf("validating input: %w", err) } + return slicesx.MapWithErr(input.Lines, func(stdLine *billing.StandardLine) (*billing.StandardLine, error) { + stateMachine, err := e.newStateMachineForStandardLine(ctx, stdLine) + if err != nil { return nil, err } + if _, err := stateMachine.AdvanceUntilStateStable(ctx); err != nil { return nil, err } + trigger := resolveInvoiceCreatedTrigger(stateMachine.GetCharge(), stdLine.Period) + if stateMachine.GetCharge().State.CurrentRealizationRunID != nil { + return nil, billing.ValidationError{Err: fmt.Errorf("line[%s]: %w", stdLine.ID, usagebased.ErrActiveRealizationRunAlreadyExists)} + } + if err := stateMachine.FireAndActivate(ctx, trigger, invoiceCreatedInput{LineID: stdLine.ID, InvoiceID: input.Invoice.ID, ServicePeriodTo: stdLine.Period.To}); err != nil { return nil, err } + if _, err := stateMachine.AdvanceUntilStateStable(ctx); err != nil { return nil, err } + charge := stateMachine.GetCharge() + currentRun, err := charge.GetCurrentRealizationRun() + if err != nil { return nil, err } +// ... +``` + + diff --git a/openmeter/billing/charges/usagebased/service/rating/CLAUDE.md b/openmeter/billing/charges/usagebased/service/rating/CLAUDE.md new file mode 100644 index 0000000000..f96290afaf --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/rating/CLAUDE.md @@ -0,0 +1,62 @@ +# rating + + + +> Rating orchestration layer for usage-based charges: snapshots metered quantity at a stored-at cutoff, then dispatches to one of two delta-rating engines (delta or periodpreserving) to produce gross detailed lines and totals for a charge run. It is the bridge between the streaming meter, billing rating, and the per-period delta engines in its subpackages. + +## Patterns + +**Service interface + private struct + Config-validated New** — Public Service interface (GetTotalsForUsage, GetDetailedRatingForUsage, GetPreferredRatingEngineFor) implemented by unexported *service; New(Config) validates non-nil deps via Config.Validate() before constructing. (`func New(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; ... }`) +**Input struct with Validate() before any work** — Each entry point takes a typed Input struct whose Validate() runs first; service period bounds must satisfy From < ServicePeriodTo <= Intent.ServicePeriod.To and StoredAtLT must be non-zero. (`func (i GetDetailedRatingForUsageInput) Validate() error { if !i.ServicePeriodTo.After(period.From) {...}; if i.StoredAtLT.IsZero() {...} }`) +**Engine dispatch on charge.State.RatingEngine** — GetDetailedRatingForUsage switches on charge.State.RatingEngine: RatingEngineDelta -> deltaRater.Rate, RatingEnginePeriodPreserving -> ratePeriodPreservingDetails; unknown engine returns an error. Both engines are constructed in New (delta.New/periodpreserving.New). (`switch charge.State.RatingEngine { case usagebased.RatingEngineDelta: ... case usagebased.RatingEnginePeriodPreserving: ... default: return ..., fmt.Errorf("unsupported rating engine: %s", ...) }`) +**Credits mutator always disabled for gross rating** — Rating here must stay gross; the totals path passes billingrating.WithCreditsMutatorDisabled() because run creation applies credits later. The delta/periodpreserving engines also strip credits internally. (`opts := []billingrating.GenerateDetailedLinesOption{ billingrating.WithCreditsMutatorDisabled() }`) +**Voided realizations excluded from billable history** — Eligible prior runs are filtered with run.IsVoidedBillingHistory() == false and ServicePeriodTo strictly before current ServicePeriodTo; voided runs are skipped for both detailed-line loading and delta subtraction. (`eligibleRealizations := lo.Filter(charge.Realizations, func(run usagebased.RealizationRun, _ int) bool { if run.IsVoidedBillingHistory() { return false }; return run.ServicePeriodTo.Before(in.ServicePeriodTo) })`) +**Lazy prior detailed-line expansion with overcharge guard** — ensureDetailedLinesLoadedForRating only calls detailedLinesFetcher when a non-voided prior run before the cutoff lacks detailed lines, then re-asserts all eligible priors are expanded — rating refuses to proceed on incomplete prior runs to avoid overcharging. (`if run.ServicePeriodTo.Before(servicePeriodTo) && !run.DetailedLines.IsPresent() { return ..., fmt.Errorf("prior runs[%d]: detailed lines must be expanded", idx) }`) +**Quantity snapshot via streaming with stored-at cutoff** — snapshotQuantity builds streaming.QueryParams with FilterCustomer, From/To from the service period, FilterGroupBy from MeterGroupByFilters, and FilterStoredAt Lt = StoredAtLT, then sums rows via summarizeMeterQueryRow. (`FilterStoredAt: &filter.FilterTimeUnix{ FilterTime: filter.FilterTime{ Lt: &in.StoredAtLT } }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service interface, Config + Validate, *service struct, New constructor wiring deltaRater/periodPreservingRater and the DetailedLinesFetcher interface. | GetPreferredRatingEngineFor currently always returns RatingEngineDelta regardless of intent; do not assume periodpreserving is auto-selected. | +| `details.go` | GetDetailedRatingForUsage: loads prior lines, snapshots current quantity, dispatches to delta or periodpreserving, builds PriorPeriod cumulative snapshots. | currentBillingPeriod advances From past the latest eligible realization's ServicePeriodTo; prior-period meter queries are cumulative from Intent.ServicePeriod.From, while PriorPeriod.ServicePeriod is only the billing slice. | +| `quantitysnapshot.go` | getQuantityForUsage / snapshotQuantity / summarizeMeterQueryRow — the only place meters are queried; wraps validation failures in billing.ValidationError. | summarizeMeterQueryRow sums all rows as float via alpacadecimal.NewFromFloat(row.Value); precision loss originates here, not in the engines. | +| `totals.go` | GetTotalsForUsage: fast path that snapshots quantity then calls ratingService.GenerateDetailedLines directly, returning only Totals. | Always passes WithCreditsMutatorDisabled; WithMinimumCommitmentIgnored is conditional on IgnoreMinimumCommitment. Bypasses the delta/periodpreserving engines entirely. | +| `service_test.go` | Behavior tests using stubRatingService, MockStreamingConnector, billingratingservice.New(), and ratingtestutils expectation helpers (ToExpectedDetailedLinesWithServicePeriod, ToExpectedTotals). | Tests assert credits mutator disabled (lastOpts.DisableCreditsMutator), current-run-on-charge is ignored, and prior detailed lines are fetched exactly once. | + +## Anti-Patterns + +- Querying meters outside snapshotQuantity, or skipping the StoredAtLT/FilterStoredAt cutoff — stored-at consistency across current and prior snapshots is load-bearing. +- Treating voided realizations (IsVoidedBillingHistory) as previously invoiced periods — they must be excluded from eligible realizations and detailed-line loading. +- Proceeding to rate when a non-voided prior run before the cutoff has unexpanded detailed lines — this overcharges customers and the guard exists to prevent it. +- Rating without WithCreditsMutatorDisabled here — totals/lines must be gross because credits are applied later during run creation. +- Selecting the rating engine anywhere but via charge.State.RatingEngine, or assuming GetPreferredRatingEngineFor returns periodpreserving (it returns Delta). + +## Decisions + +- **Two interchangeable rating engines (delta, periodpreserving) selected per-charge via State.RatingEngine, both constructed in New.** — Delta rolls all corrections onto the current run period (invoice-safe today); periodpreserving keeps corrections on their original period but is not yet invoice-safe. +- **Prior-period quantities are re-queried cumulatively from Intent.ServicePeriod.From using the current run's StoredAtLT, not copied from stored prior snapshots.** — Rating engines need cumulative quantity for correct delta subtraction; a TODO documents a future optimization to reuse prior snapshots for monotonic meters. +- **GetTotalsForUsage bypasses the delta engines and calls billing rating directly.** — Totals do not require per-period detailed-line subtraction, so the fast path avoids generating detailed lines. + +## Example: Snapshot metered quantity with a stored-at cutoff and dispatch to the delta engine. + +``` +currentQuantity, err := s.snapshotQuantity(ctx, snapshotQuantityInput{ + Customer: in.Customer.Customer, + FeatureMeter: in.FeatureMeter, + ServicePeriod: currentRunServicePeriod, + StoredAtLT: in.StoredAtLT, +}) +if err != nil { return GetDetailedRatingForUsageResult{}, fmt.Errorf("get current quantity: %w", err) } + +out, err := s.deltaRater.Rate(ctx, delta.Input{ + Intent: charge.Intent, + CurrentPeriod: delta.CurrentPeriod{ + MeteredQuantity: currentQuantity, + ServicePeriod: currentBillingPeriod(currentRunServicePeriod, eligibleRealizations), + }, + AlreadyBilledDetailedLines: alreadyBilledDetailedLines, +// ... +``` + + diff --git a/openmeter/billing/charges/usagebased/service/rating/delta/CLAUDE.md b/openmeter/billing/charges/usagebased/service/rating/delta/CLAUDE.md new file mode 100644 index 0000000000..ad245056a8 --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/rating/delta/CLAUDE.md @@ -0,0 +1,49 @@ +# delta + + + +> Delta rating engine for usage-based charges: it rates the latest cumulative meter snapshot, subtracts every detailed line already booked for the charge, and books the remaining delta on the current run's service period. It intentionally does NOT preserve the original service period of corrections — every delta lands on the current run period. + +## Patterns + +**Engine{ratingService} constructed via New** — The engine is a value type holding a billingrating.Service, constructed with New(ratingService). Rate(ctx, Input) is the only exported method. (`engine := New(billingratingservice.New()); out, err := engine.Rate(ctx, Input{Intent: intent, CurrentPeriod: CurrentPeriod{...}, AlreadyBilledDetailedLines: ...})`) +**Validate before rating** — Rate calls in.Validate() first; Input.Validate collects errors into []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)). Current period service period must be ContainsPeriodInclusive of the intent service period. (`if err := in.Validate(); err != nil { return Result{}, err }`) +**Disable credits mutator; ignore min commitment until final snapshot** — Always pass billingrating.WithCreditsMutatorDisabled(); add billingrating.WithMinimumCommitmentIgnored() only when CurrentPeriod.ServicePeriod.To.Before(Intent.ServicePeriod.To). Minimum commitment is charged solely on the final service-period snapshot. (`opts := []billingrating.GenerateDetailedLinesOption{billingrating.WithCreditsMutatorDisabled()}`) +**Strip credits from already-billed lines before subtraction** — Clone each AlreadyBilledDetailedLine, set CreditsApplied=nil, Totals.CreditsTotal=Zero, recompute Totals.Total via CalculateTotal(). Credits are allocated post-rating, so they must not look like usage/pricing changes during subtraction. (`line = line.Clone(); line.CreditsApplied = nil; line.Totals.CreditsTotal = alpacadecimal.Zero; line.Totals.Total = line.Totals.CalculateTotal()`) +**Stamp current period and clear CorrectsRunID on output** — After subtract.SubtractRatedRunDetails, every remaining line gets ServicePeriod = CurrentPeriod.ServicePeriod and CorrectsRunID = nil. The period-preserving engine owns correction metadata; delta never sets it. (`remainingDetailedLines[idx].ServicePeriod = in.CurrentPeriod.ServicePeriod; remainingDetailedLines[idx].CorrectsRunID = nil`) +**Sort, assign dense indexes, validate unique child references** — Call remainingDetailedLines.Sort(), then assign Index = &idx densely. Finally group by ChildUniqueReferenceID and error on any duplicate — delta output (unlike periodpreserving intermediate steps) must be unique. (`remainingDetailedLines.Sort(); for idx := range ... { index := idx; remainingDetailedLines[idx].Index = &index }`) +**uniqueReferenceIDGenerator{} for subtraction identities** — Rate passes a local uniqueReferenceIDGenerator{} (in uniquereferenceid.go) implementing subtract.UniqueReferenceIDGenerator to encode current/matched/reversal child reference identities. (`subtract.SubtractRatedRunDetails(currentDetailedLines, alreadyBilledDetailedLines, uniqueReferenceIDGenerator{})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `engine.go` | Engine, Input/CurrentPeriod/Result types, and Rate — the whole delta algorithm. Input.Validate enforces current period containment. | Do not preserve correction periods here; ServicePeriod is overwritten to the current run period and CorrectsRunID is cleared. Duplicate output child refs are a hard error. | +| `uniquereferenceid.go` | uniqueReferenceIDGenerator implementing subtract.UniqueReferenceIDGenerator (CurrentOnly/MatchedDelta/PreviousOnlyReversal). | PreviousOnlyReversal must produce a deterministic correction ID like "#correction:detailed_line_id="; it errors when the already-billed detailed line ID is missing. | +| `engine_test.go` | Stub-driven unit tests using stubRatingService (records lastOpts, returns canned DetailedLines). | Tests assert lastOpts.DisableCreditsMutator and IgnoreMinimumCommitment flags — keep the option-passing logic intact when editing Rate. | +| `base_test.go` | runDeltaRatingTestCase harness driving multi-phase scenarios via a real billingratingservice.New(); deltaRatingTestPeriods() supplies period1..3. | Each phase feeds prior phases' booked lines as AlreadyBilledDetailedLines; detailedLinesBookedForDeltaTest stamps phase-N-line-M IDs used by correction refs. | +| `dynamic_test.go / unit_test.go / package_test.go / tieredgraduated_test.go / tieredvolume_test.go` | Price-shape-specific delta scenarios (dynamic, unit, package, graduated, volume) including repricing corrections. | Expected lines assert exact ChildUniqueReferenceID correction strings (e.g. "usage#correction:detailed_line_id=phase-1-line-1"); changing the generator format breaks many tests. | + +## Anti-Patterns + +- Preserving the original service period of a correction — delta always restamps to the current run period. +- Setting CorrectsRunID on delta output (it is always cleared to nil). +- Calling billing rating without WithCreditsMutatorDisabled(), or leaving credits on already-billed lines before subtraction. +- Returning on the first validation error instead of joining via models.NewNillableGenericValidationError. +- Emitting duplicate ChildUniqueReferenceID values — delta validates uniqueness and errors out. + +## Decisions + +- **Roll every delta onto the current run period instead of preserving correction periods.** — Keeps downstream invoicing in the simpler 'current invoice period only' shape while period-preserving rating and invoice correction support mature (see README and periodpreserving sibling). +- **Compare per-unit amount by decimal equality (delegated to subtract) so repricing emits a reversal + current line.** — Non-linear prices (volume tiers) can re-rate the whole quantity; treating it as a quantity delta would be wrong. + +## Example: Rate the cumulative snapshot, strip credits, subtract already-billed, restamp to current period + +``` +billingDetailedLines, err := e.ratingService.GenerateDetailedLines(usagebased.RateableIntent{Intent: in.Intent, ServicePeriod: in.CurrentPeriod.ServicePeriod, MeterValue: in.CurrentPeriod.MeteredQuantity}, billingrating.WithCreditsMutatorDisabled()) +current := usagebased.NewDetailedLinesFromBilling(in.Intent, in.CurrentPeriod.ServicePeriod, billingDetailedLines.DetailedLines) +remaining, err := subtract.SubtractRatedRunDetails(current, alreadyBilled, uniqueReferenceIDGenerator{}) +for idx := range remaining { remaining[idx].ServicePeriod = in.CurrentPeriod.ServicePeriod; remaining[idx].CorrectsRunID = nil } +``` + + diff --git a/openmeter/billing/charges/usagebased/service/rating/periodpreserving/CLAUDE.md b/openmeter/billing/charges/usagebased/service/rating/periodpreserving/CLAUDE.md new file mode 100644 index 0000000000..c9295fa934 --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/rating/periodpreserving/CLAUDE.md @@ -0,0 +1,48 @@ +# periodpreserving + + + +> Period-preserving rating engine for usage-based charges: computes detailed-line deltas while keeping corrections on the service period where the corrected usage belongs (late-arriving usage / repricing against prior periods). NOT yet invoice-safe — must not be used as the production invoice-facing engine until invoice-compatible correction handling lands. + +## Patterns + +**Engine{ratingService} via New; Rate(ctx, Input) entry point** — Same shape as delta: value Engine holding billingrating.Service, built with New. Input carries Intent, CurrentPeriod, and a slice of PriorPeriod (each with RunID, MeteredQuantity, ServicePeriod, DetailedLines). (`engine := New(billingratingservice.New()); out, err := engine.Rate(ctx, Input{Intent: intent, CurrentPeriod: ..., PriorPeriods: ...})`) +**Strict period validation: containment, non-empty-at-window-precision, no overlap** — Input.Validate joins errors: every period must be ContainsPeriodInclusive of the intent period; prior periods must not be empty when Truncate(streaming.MinimumWindowSizeDuration); prior periods must not Overlaps the current period or each other. (`if priorPeriod.ServicePeriod.Truncate(streaming.MinimumWindowSizeDuration).IsEmpty() { errs = append(errs, ...) }`) +**Epoch-based cumulative rating with second-precision epoch keys** — buildDetailsByEpoch sorts prior+current into epochs keyed by epochClosedPeriod{From,To int64} (Unix seconds; sub-second dropped intentionally). For each epoch it rates the cumulative quantity and subtracts previously-generated lines to isolate new lines, preserving each line's source period. (`result[servicePeriod] = append(result[servicePeriod], line) // grouped by epochClosedPeriod`) +**Allow duplicate child refs in intermediate subtraction; period-stamp at the end** — Epoch subtraction passes subtract.WithUniqueReferenceIDValidationIgnored() because intermediate output is not persisted. flattenDetailedLinesByEpoch calls WithServicePeriodFromUniqueReferenceID() to stamp the period suffix, Sort()s, and assigns dense Index. The period suffix makes the same rating component distinct across periods. (`subtract.SubtractRatedRunDetails(cur, prev, generatedUniqueReferenceIDGenerator{}, subtract.WithUniqueReferenceIDValidationIgnored())`) +**Set CorrectsRunID on prior-period outputs** — After subtracting already-billed lines per prior period, every output line for that period gets CorrectsRunID = lo.ToPtr(runID.ID). This is the key difference from delta, which clears CorrectsRunID. (`result[servicePeriod][idx].CorrectsRunID = lo.ToPtr(runID.ID)`) +**Two distinct reference-ID generators** — generatedUniqueReferenceIDGenerator (intermediate, pass-through child refs) for epoch subtraction; bookedCorrectionUniqueReferenceIDGenerator (PreviousOnlyReversal encodes "#correction:detailed_line_id=", erroring on missing ID) for subtracting already-billed lines. (`subtract.SubtractRatedRunDetails(result[servicePeriod], alreadyBilled, bookedCorrectionUniqueReferenceIDGenerator{})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `engine.go` | Whole engine: Input/CurrentPeriod/PriorPeriod/Result, Validate, SortPriorPeriods, Rate, buildDetailsByEpoch, flattenDetailedLinesByEpoch, epochClosedPeriod helpers. | epochClosedPeriod uses Unix-second keys — sub-second period boundaries collapse; period validation rejects overlapping prior periods because overlaps leak duplicate period-stamped child refs to persistence. Credits are stripped from already-billed lines before subtraction (same as delta). | +| `uniquereferenceid.go` | generatedUniqueReferenceIDGenerator and bookedCorrectionUniqueReferenceIDGenerator implementing subtract.UniqueReferenceIDGenerator. | bookedCorrectionUniqueReferenceIDGenerator.PreviousOnlyReversal requires line.ID; it errors 'detailed line id is required' otherwise. The generated generator is pure pass-through. | +| `engine_test.go` | Multi-phase late-event scenarios (runLateEventRatingTestCase) using a real billingratingservice.New(); covers unit price, max/min commitments, percentage and usage discounts kept on original periods. | Expected lines assert FormatDetailedLineChildUniqueReferenceID(...,period) suffixes and CorrectsRunID pointers; the README warns these mutation cases (negative discount/commitment deltas) are not yet invoice-safe. | +| `README.md` | Algorithm, period-stamping rules, examples, and an explicit Warning + TODO list of unfinished invoice-compatible correction cases. | Treat the Warning as binding: do not wire this engine as the production invoice rater yet. | + +## Anti-Patterns + +- Using this engine as the production invoice-facing rater before invoice-compatible correction handling exists (README Warning). +- Validating uniqueness on intermediate epoch subtraction — duplicate child refs are expected there and only resolved by period-stamping. +- Allowing overlapping prior periods or empty-at-window-precision periods — both are rejected and would corrupt period-stamped identities. +- Forgetting to set CorrectsRunID on prior-period corrections (this is what distinguishes period-preserving from delta). +- Keying epochs at sub-second precision — epochClosedPeriod is deliberately Unix-second granularity. + +## Decisions + +- **Keep corrections on the original service period and mark the corrected run via CorrectsRunID instead of rolling into the current period.** — Invoices must show changes against the prior period for late-arriving usage and repricing; delta rating cannot express that. +- **Encode the service period into ChildUniqueReferenceID as a suffix and only validate uniqueness on final, period-stamped output.** — The same rating component appears across multiple periods; the period suffix gives each persisted identity a distinct, collision-free key within the run. +- **Use Unix-second epoch keys.** — Meter snapshots are evaluated at streaming minimum-window precision; sub-second boundaries carry no rating meaning and would fragment epoch grouping. + +## Example: Per-epoch cumulative rating, isolate new lines, then subtract already-billed and stamp CorrectsRunID + +``` +periodNew, err := subtract.SubtractRatedRunDetails(detailedLinesWithUsageFromPriorPeriods, previouslyGeneratedDetailedLines, generatedUniqueReferenceIDGenerator{}, subtract.WithUniqueReferenceIDValidationIgnored()) +// ...later, per prior period: +remaining, err := subtract.SubtractRatedRunDetails(result[servicePeriod], alreadyBilled, bookedCorrectionUniqueReferenceIDGenerator{}) +for idx := range result[servicePeriod] { result[servicePeriod][idx].CorrectsRunID = lo.ToPtr(runID.ID) } +``` + + diff --git a/openmeter/billing/charges/usagebased/service/rating/subtract/CLAUDE.md b/openmeter/billing/charges/usagebased/service/rating/subtract/CLAUDE.md new file mode 100644 index 0000000000..2665a3762d --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/rating/subtract/CLAUDE.md @@ -0,0 +1,51 @@ +# subtract + + + +> Low-level arithmetic primitive shared by the delta and periodpreserving rating engines: SubtractRatedRunDetails subtracts previously-rated detailed lines from currently-rated detailed lines and returns the remainder, preserving each output line's source service period. It does NOT query meters, call billing rating, allocate credits, or decide invoice periods. + +## Patterns + +**SubtractRatedRunDetails(current, previous, generator, opts...) is the only entry point** — Takes two usagebased.DetailedLines slices plus a required UniqueReferenceIDGenerator. Validates inputs, validates currency, groups by key, subtracts, then optionally validates output uniqueness. Returns an error if the generator is nil. (`out, err := subtract.SubtractRatedRunDetails(current, previous, generator)`) +**Match by calculation key + decimal-equal PerUnitAmount, never by string** — detailedLineKey is {PricerReferenceID(ReferenceID), Category, PaymentTerm}. Within a key, lines are matched by PerUnitAmount.Equal(...) — deliberately not a string map key — so repricing (same component, different unit amount) emits a current line plus a reversal rather than a bogus quantity delta. (`if !existingLine.PerUnitAmount.Equal(line.PerUnitAmount) { continue }`) +**ChildUniqueReferenceID is identity, not arithmetic key — generated via the 3-method interface** — Output child refs come from UniqueReferenceIDGenerator: CurrentOnly (unmatched current), MatchedDelta (matched current+previous), PreviousOnlyReversal (unmatched previous). PricerReferenceID — not ChildUniqueReferenceID — is the arithmetic key. (`childUniqueReferenceID, err := generator.PreviousOnlyReversal(previousLine)`) +**Drop zero-total output lines** — isZeroDetailedLine checks Totals.IsZero(); current-only, matched-delta, and reversal outputs are only emitted when totals are non-zero. (`if !isZeroDetailedLine(line) { out = append(out, line) }`) +**Strict currency validation before arithmetic** — validateCurrencyForSubtract: each side may contain at most one currency; if both sides have one, they must match. Otherwise it errors before any subtraction. (`if currentCurrencies[0] != previousCurrencies[0] { return fmt.Errorf("...currency mismatch...") }`) +**Accept negative quantities; uniqueness validation toggleable** — Negative quantities are valid correction inputs — validateDetailedLinesForSubtract clones and normalizes the sign only for validation. validateUniqueChildReferenceIDs runs by default but is skipped via WithUniqueReferenceIDValidationIgnored() for intermediate callers (periodpreserving epoch subtraction). (`subtract.WithUniqueReferenceIDValidationIgnored()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `subtract.go` | The full algorithm: detailedLineKey, options/Option, SubtractRatedRunDetails, currency/line validation, group-and-sum (sumDetailedLinesByKey, appendOrSumDetailedLineByPerUnitAmount), and per-key subtraction. | Matching is PerUnitAmount.Equal, never a stringified key. Output is sorted by PerUnitAmount ascending and zero-total lines are dropped. Do not move currency/period decisions here — this package is meter/credit/invoice agnostic. | +| `uniquereferenceid.go` | UniqueReferenceIDGenerator interface (CurrentOnly/MatchedDelta/PreviousOnlyReversal) plus NewMockUniqueReferenceIDGenerator for tests. | This is the contract delta and periodpreserving implement. The mock's PreviousOnlyReversal encodes '#reversal:category=...:payment_term=...:per_unit_amount=...' — test expectations depend on that exact format. | +| `subtract_test.go` | Table-driven scenarios (TestUnitPriceSubtract, TestMinimumCommitmentSubtract, TestGraduatedTieredSubtract) using real productcatalog prices via billingratingservice.New(). | Tests assert exact reversal child-ref strings and rounding-driven zero/negative deltas (e.g. delta dropped when rounding makes it zero). Changing match or rounding semantics breaks these. | +| `README.md` | Matching model, algorithm, and Warning that this is a primitive, not a final invoice rater. | Honor the Warning — never expose this as a standalone production rating algorithm. | + +## Anti-Patterns + +- Using ChildUniqueReferenceID as the arithmetic match key (it is persistence identity only; PricerReferenceID + price-shape fields are the key). +- Stringifying PerUnitAmount for map matching instead of decimal equality — breaks repricing correctness. +- Querying meters, calling billing rating, allocating credits, or deciding invoice periods here — this package is intentionally meter/credit/invoice agnostic. +- Emitting zero-total output lines or rejecting negative input quantities (corrections are valid). +- Skipping currency validation, or merging lines across mismatched currencies. + +## Decisions + +- **Compare PerUnitAmount with decimal equality rather than via a string map key.** — Avoids unsafe decimal-string comparisons and keeps repricing explicit: a re-rated component emits a reversal of the old price plus the new current line. +- **Generate output ChildUniqueReferenceID through a pluggable UniqueReferenceIDGenerator instead of computing it inline.** — Different engines need different persistence/correction identities (delta correction refs vs period-stamped refs) over the same arithmetic core. +- **Make output-uniqueness validation opt-out via WithUniqueReferenceIDValidationIgnored.** — Period-preserving rating runs intermediate subtractions whose duplicate child refs are resolved later by period-stamping, so uniqueness cannot be enforced there. + +## Example: Subtract previous from current with a custom reference-ID generator + +``` +out, err := subtract.SubtractRatedRunDetails( + current, // usagebased.DetailedLines (e.g. 8 units @ $10) + previous, // usagebased.DetailedLines (e.g. 5 units @ $10) + generator, // implements subtract.UniqueReferenceIDGenerator +) +// matched same-price -> 3 units @ $10 = $30 via generator.MatchedDelta; +// repriced -> +current line (CurrentOnly) and -reversal (PreviousOnlyReversal) +``` + + diff --git a/openmeter/billing/charges/usagebased/service/rating/testutils/CLAUDE.md b/openmeter/billing/charges/usagebased/service/rating/testutils/CLAUDE.md new file mode 100644 index 0000000000..5e103b2dff --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/rating/testutils/CLAUDE.md @@ -0,0 +1,38 @@ +# testutils + + + +> Shared test fixtures and assertion adapters for the usage-based rating engines (delta, periodpreserving, subtract). Provides float64-projected expectation types and intent constructors so rating tests assert on simple values instead of alpacadecimal/Totals internals. + +## Patterns + +**Expectation types are float64 projections of domain values** — ExpectedDetailedLine and ExpectedTotals mirror usagebased.DetailedLine / totals.Totals but with float64 fields. ToExpectedDetailedLinesWithServicePeriod and ToExpectedTotals convert via InexactFloat64() so tests compare floats, not decimals. (`require.Equal(t, expected, ratingtestutils.ToExpectedDetailedLinesWithServicePeriod(out.DetailedLines))`) +**Intent constructors validate and t.Helper** — NewIntentForTest builds a usagebased.Intent (chargesmeta.Intent + price/discounts), calls require.NoError(t, intent.Validate()), and is t.Helper(). NewUnitPriceIntentForTest wraps it for the common unit-price case. (`intent := ratingtestutils.NewIntentForTest(t, fullServicePeriod, tc.price, tc.discounts)`) +**FormatDetailedLineChildUniqueReferenceID encodes the period suffix** — Produces '@[..]' — the canonical period-stamped child reference used by periodpreserving expectations. Tests must use this helper, not hand-built strings, to stay in sync with the engine's stamping. (`ratingtestutils.FormatDetailedLineChildUniqueReferenceID(billingrating.UnitPriceUsageChildUniqueReferenceID, periods.period1)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `testutils.go` | All exported helpers: ExpectedDetailedLine, ExpectedTotals, ToExpectedDetailedLinesWithServicePeriod, ToExpectedTotals, FormatDetailedLineChildUniqueReferenceID, NewIntentForTest, NewUnitPriceIntentForTest. | The default fixture currency is USD, SettlementMode is CreditThenInvoiceSettlementMode, ManagedBy is billing.SubscriptionManagedLine; FullServicePeriod/BillingPeriod default to the same servicePeriod. The package is imported as ratingtestutils by delta, periodpreserving, and subtract tests — keep it test-only and free of production dependencies. | + +## Anti-Patterns + +- Hand-writing period-stamped child reference strings instead of FormatDetailedLineChildUniqueReferenceID. +- Comparing alpacadecimal/Totals directly instead of projecting to float64 via the ToExpected* helpers. +- Adding production (non-test) behavior or non-test imports to this testutils package. + +## Decisions + +- **Project decimals to float64 for assertions.** — Per AGENTS.md, prefer require.Equal on InexactFloat64() with plain float literals over decimal equality assertions where precision allows — keeps rating tests readable. + +## Example: Build a validated intent and assert engine output as floats + +``` +intent := ratingtestutils.NewUnitPriceIntentForTest(t, servicePeriod, alpacadecimal.NewFromInt(3)) +out, _ := New(billingratingservice.New()).Rate(t.Context(), Input{Intent: intent, CurrentPeriod: ...}) +require.Equal(t, expectedLines, ratingtestutils.ToExpectedDetailedLinesWithServicePeriod(out.DetailedLines)) +require.Equal(t, expectedTotals, ratingtestutils.ToExpectedTotals(out.DetailedLines.SumTotals())) +``` + + diff --git a/openmeter/billing/charges/usagebased/service/run/CLAUDE.md b/openmeter/billing/charges/usagebased/service/run/CLAUDE.md new file mode 100644 index 0000000000..0e345d4ede --- /dev/null +++ b/openmeter/billing/charges/usagebased/service/run/CLAUDE.md @@ -0,0 +1,64 @@ +# run + + + +> Owns the mechanics of usage-based realization runs: rating snapshots, run persistence, credit allocation/correction, credit-realization lineage, invoice-usage booking, and payment authorize/settle. It deliberately does NOT make state-machine decisions (which triggers to fire, which status to enter) — those belong to the caller in usagebased/service. + +## Patterns + +**Service struct with validated Config + New** — Service holds exactly four collaborators (adapter usagebased.Adapter, rater usagebasedrating.Service, handler usagebased.Handler, lineage lineage.Service). Config.Validate() returns errors.Join over nil-checks; New(config) validates before constructing. Never add unvalidated deps. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{adapter: config.Adapter, ...}, nil }`) +**Input struct + Validate() per public method** — Every public method takes a single typed Input struct with a Validate() method called first thing in the method body. Inputs embed Charge/Run and call their .Validate(). Result is returned as a typed *Result struct, never bare values. (`func (s *Service) CreateRatedRun(ctx, in CreateRatedRunInput) (CreateRatedRunResult, error) { if err := in.Validate(); err != nil { return CreateRatedRunResult{}, err }; ... }`) +**Decisions delegated to handler, persistence to adapter** — Side-effecting credit/ledger decisions go through s.handler (OnCreditsOnlyUsageAccrued, OnInvoiceUsageAccrued, OnPaymentAuthorized/Settled, OnCreditsOnlyUsageAccruedCorrection); DB writes go through s.adapter (CreateRealizationRun, UpdateRealizationRun, CreateRunCreditRealization, CreateRunInvoicedUsage, CreateRunPayment, UpsertRunDetailedLines). Run does not call ent or ledger directly. (`creditAllocations, err := s.handler.OnCreditsOnlyUsageAccrued(ctx, usagebased.CreditsOnlyUsageAccruedInput{...})`) +**CurrencyCalculator.RoundToPrecision before decimal compares** — All target/current/delta amounts are rounded via in.CurrencyCalculator.RoundToPrecision(...) before IsZero/IsPositive/IsNegative/Equal branching. Skipping rounding causes spurious non-zero deltas. (`delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(currentAmount)); switch { case delta.IsPositive(): ... }`) +**Credit reconciliation as signed-delta switch** — ReconcileCredits computes delta = target - current and switches: positive -> allocate(), negative -> CreditsAllocated.Correct(...) producing corrections then createRunCreditRealizations, zero -> no-op. Corrections always preload lineage via lineage.LoadActiveSegmentsByRealizationID. (`case delta.IsNegative(): corrections, err := in.Run.CreditsAllocated.Correct(delta, calc, func(req) {...s.handler.OnCreditsOnlyUsageAccruedCorrection...})`) +**NoFiatTransactionRequired short-circuits fiat paths** — When run.NoFiatTransactionRequired (credits_only or zero total) the payment authorize/settle paths return early without ledger calls, and invoice-usage booking creates AccruedUsage with no LedgerTransaction. Validate() enforces the zero-total <-> NoFiatTransactionRequired invariant. (`if in.Run.NoFiatTransactionRequired { return BookInvoicedPaymentAuthorizedResult{Run: in.Run}, nil }`) +**Lineage created/persisted alongside every credit realization** — createRunCreditRealizations always follows adapter.CreateRunCreditRealization with lineage.CreateInitialLineages and lineage.PersistCorrectionLineageSegments. New credit-writing paths must funnel through this helper, not call the adapter directly. (`realizations, _ := s.adapter.CreateRunCreditRealization(ctx, runID, allocs); s.lineage.CreateInitialLineages(ctx, ...); s.lineage.PersistCorrectionLineageSegments(ctx, ...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service/Config/New plus CreditAllocationMode enum (None/Exact/Available). Docstring spells out the no-state-machine constraint. | Do not add state-machine logic here; keep the four-collaborator shape and Config.Validate nil-checks in sync. | +| `create.go` | CreateRatedRun: rates usage via rater, builds the realization run, optionally allocates credits, recomputes totals/NoFiatTransactionRequired, upserts detailed lines. | Guards against a pre-existing CurrentRealizationRunID in both Input.Validate and createNewRealizationRun; ServicePeriodTo must be within charge.Intent.ServicePeriod (after From, not after To). Negative total -> ErrChargeTotalIsNegative. | +| `credits.go` | allocate() (handler.OnCreditsOnlyUsageAccrued + lineage), createRunCreditRealizations() helper, featuresForLineage(). | Allocated must not exceed AmountToAllocate (ErrCreditAllocationsDoNotMatchTotal); Exact mode requires exact equality. Always round AmountToAllocate first; zero amount short-circuits. | +| `correct.go` | ReconcileCredits (signed-delta allocate/correct) and CorrectAllCredits (reverse all realizations), both preloading lineage segments. | TargetAmount must be zero-or-positive after rounding; corrections drive handler.OnCreditsOnlyUsageAccruedCorrection per CorrectionRequest, not direct ledger writes. | +| `invoice.go` | BookAccruedInvoiceUsage: links a run to a billing.StandardLine and records invoicedusage.AccruedUsage (with ledger txn unless NoFiatTransactionRequired). | Validate enforces run.LineID matches line.ID, run has no existing InvoiceUsage, and the NoFiatTransactionRequired<->zero-total invariant. Non-fiat path requires a non-empty TransactionGroupID. | +| `payment.go` | BookInvoicedPaymentAuthorized and SettleInvoicedPayment: ledger handler calls + adapter Create/UpdateRunPayment, using payment.Status transitions Authorized->Settled. | Settle requires an existing Authorized payment with matching LineID unless NoFiatTransactionRequired. Uses clock.Now() for eventAt — freeze clock in tests. | +| `preview.go` | BuildCreditThenInvoiceGatheringPreviewRun: side-effect-free run shape for gathering-invoice previews; rates usage but persists nothing and allocates no credits. | Only supports CreditThenInvoiceSettlementMode; uses NewNillableGenericValidationError collecting all errs. Synthesizes a preview- run ID; do not call adapters here. | +| `payment_test.go` | Validate-focused unit tests with newBookPaymentAuthorizedInput/newSettlePaymentInput/newUsageBasedCharge/newUsageBasedRun fixtures. | Hand-assembled usagebased.Charge/RealizationRun fixtures — keep field names aligned with the domain structs when they change. | + +## Anti-Patterns + +- Making state-machine decisions here (firing triggers, choosing Status, advancing invoice lifecycle) — that belongs to the caller in usagebased/service. +- Calling ent/ledger/credit directly instead of going through s.adapter / s.handler / s.lineage. +- Comparing alpacadecimal amounts (IsZero/Equal/IsPositive) without first RoundToPrecision via the CurrencyCalculator. +- Writing credit realizations without the matching lineage.CreateInitialLineages + PersistCorrectionLineageSegments calls. +- Creating a second realization run while charge.State.CurrentRealizationRunID is already set. + +## Decisions + +- **Run service is split from the state-machine service and restricted to run mechanics.** — Keeps rating/persistence/credit/lineage concerns reusable and testable independent of which lifecycle trigger fires; the docstring on Service codifies the boundary. +- **Credit reconciliation is modeled as a signed delta with allocate vs correct branches rather than recompute-and-replace.** — Allows incremental allocation on positive deltas and ledger-correct reversal on negative deltas while preserving lineage continuity. +- **NoFiatTransactionRequired is threaded through invoice/payment paths as an early-return guard with a Validate-enforced zero-total invariant.** — credits_only and zero-total runs must never touch the fiat ledger, and the invariant prevents booking a fiat payment for a zero line or skipping one for a non-zero line. + +## Example: Reconcile a run's credits toward a target amount (positive=allocate, negative=correct). + +``` +func (s *Service) ReconcileCredits(ctx context.Context, in ReconcileCreditRealizationsInput) (ReconcileCreditRealizationsResult, error) { + in.TargetAmount = in.CurrencyCalculator.RoundToPrecision(in.TargetAmount) + if err := in.Validate(); err != nil { return ReconcileCreditRealizationsResult{}, err } + current := in.CurrencyCalculator.RoundToPrecision(in.Run.CreditsAllocated.Sum()) + delta := in.CurrencyCalculator.RoundToPrecision(in.TargetAmount.Sub(current)) + switch { + case delta.IsPositive(): + allocated, err := s.allocate(ctx, allocateCreditRealizationsInput{Charge: in.Charge, Run: in.Run, AllocateAt: in.AllocateAt, AmountToAllocate: delta, CurrencyCalculator: in.CurrencyCalculator, Exact: in.ExactAllocation}) + if err != nil { return ReconcileCreditRealizationsResult{}, err } + return ReconcileCreditRealizationsResult{Delta: delta, Realizations: allocated.Realizations}, nil + case delta.IsNegative(): + // CreditsAllocated.Correct -> handler.OnCreditsOnlyUsageAccruedCorrection -> createRunCreditRealizations + } + return ReconcileCreditRealizationsResult{Delta: delta}, nil +} +``` + + diff --git a/openmeter/billing/charges/worker/CLAUDE.md b/openmeter/billing/charges/worker/CLAUDE.md new file mode 100644 index 0000000000..0b819772a1 --- /dev/null +++ b/openmeter/billing/charges/worker/CLAUDE.md @@ -0,0 +1,32 @@ +# worker + + + +> Structural parent for charge-advancement workers. No source files of its own; its two children split how usage-based charges are advanced past their advance-after watermark: advance/ is the batch sweep across all customers, asyncadvance/ is the per-event Kafka handler. Both are thin orchestration over charges.ChargeService with no business logic. + +## Patterns + +**Config.Validate() + New constructor with nil-dependency guards** — Both workers require Logger and charges.ChargeService via a validated Config; constructors reject nil rather than falling back to slog.Default() (`advance.AutoAdvancer New, asyncadvance.Handler New`) +**Delegation-only over charges.ChargeService** — Workers map their trigger (namespace scan / AdvanceChargesEvent) into charges.AdvanceChargesInput and delegate; no advancement logic lives here (`asyncadvance.Handle builds AdvanceChargesInput from the event`) +**Error handling differs by transport** — advance/ accumulates per-customer failures into errors.Join (best-effort batch); asyncadvance/ returns the error so the message bus retries (`advance.All aggregates; asyncadvance.Handle returns err`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `advance/` | AutoAdvancer.All batch sweep paginating customers with charges past their advance-after watermark via pagination.CollectAll | Must NOT return early on first customer error — aggregate into errors.Join so remaining customers still advance | +| `asyncadvance/` | Watermill/Kafka Handler advancing charges for a single customer per charges.AdvanceChargesEvent | Returning nil on failure silently drops advancement — the returned error is the retry signal | + +## Anti-Patterns + +- Adding charge-advancement business logic in either worker — it belongs in charges.ChargeService +- advance/: returning on the first customer error instead of accumulating into errors.Join +- asyncadvance/: swallowing the Handle error and returning nil (drops the message-bus retry) +- Constructing a worker directly instead of via New/Config.Validate (bypasses nil guards) +- Falling back to slog.Default() instead of requiring Logger through Config + +## Decisions + +- **Batch sweep (advance/) and per-event handler (asyncadvance/) are separate packages** — Different invocation models and error semantics — best-effort aggregation vs single-event retry — keep cleanly separated + + diff --git a/openmeter/billing/charges/worker/advance/CLAUDE.md b/openmeter/billing/charges/worker/advance/CLAUDE.md new file mode 100644 index 0000000000..a5e5d8bba4 --- /dev/null +++ b/openmeter/billing/charges/worker/advance/CLAUDE.md @@ -0,0 +1,48 @@ +# advance + + + +> Batch driver that auto-advances all eligible usage-based charges across customers. AutoAdvancer.All scans namespaces for customers with charges past their advance-after watermark and advances each, isolating per-customer failures. It is a thin orchestration layer over charges.ChargeService — it holds no business logic of its own. + +## Patterns + +**Config + validating constructor** — Dependencies arrive via a Config struct; NewAdvancer returns (*AutoAdvancer, error) and rejects nil ChargesService or Logger with fmt.Errorf instead of panicking. (`NewAdvancer(Config{ChargesService: svc, Logger: log})`) +**Per-customer error isolation** — All() collects per-customer failures into var errs []error and returns errors.Join(errs...) so one customer's failure never aborts the batch; each failure is also logged at ErrorContext. (`errs = append(errs, fmt.Errorf("... [namespace=%s customer=%s]: %w", ...)); return errors.Join(errs...)`) +**Paginate via pagination.CollectAll** — ListCustomersToAdvance wraps chargesService.ListCustomersToAdvance in pagination.NewPaginator + CollectAll with defaultPageSize (10_000); never hand-roll page loops. (`pagination.CollectAll(ctx, pagination.NewPaginator(func(ctx, page) (...) { return a.chargesService.ListCustomersToAdvance(...) }), defaultPageSize)`) +**Context-aware structured logging** — All logging uses *Context variants (InfoContext/DebugContext/WarnContext/ErrorContext) with slog.String attrs for namespace and customer_id. (`a.logger.ErrorContext(ctx, "failed to auto-advance charges", slog.String("namespace", cust.Namespace), ...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `advance.go` | Defines AutoAdvancer (All, ListCustomersToAdvance, AdvanceCharges), Config, and NewAdvancer. | AdvanceAfterLTE uses time.Now() captured once at the start of ListCustomersToAdvance — the watermark is the scan-start instant, not per-customer. AdvanceCharges discards the AdvanceCharges result value (only the error). | + +## Anti-Patterns + +- Returning early from All() on the first customer error instead of accumulating into errors.Join — this would skip remaining customers. +- Adding charge advancement business logic here; this package only orchestrates charges.ChargeService. +- Falling back to slog.Default() instead of requiring Logger via Config (constructor rejects nil). + +## Decisions + +- **Best-effort batch with error aggregation rather than fail-fast.** — Auto-advance is a sweep across all customers; one bad customer must not block billing progress for the rest. + +## Example: Run auto-advance across namespaces, isolating per-customer failures + +``` +func (a *AutoAdvancer) All(ctx context.Context, namespaces []string) error { + customers, err := a.ListCustomersToAdvance(ctx, namespaces) + if err != nil { + return fmt.Errorf("failed to list customers to advance charges: %w", err) + } + var errs []error + for _, cust := range customers { + if err := a.AdvanceCharges(ctx, cust); err != nil { + errs = append(errs, fmt.Errorf("failed to auto-advance charges [namespace=%s customer=%s]: %w", cust.Namespace, cust.ID, err)) + } + } + return errors.Join(errs...) +} +``` + + diff --git a/openmeter/billing/charges/worker/asyncadvance/CLAUDE.md b/openmeter/billing/charges/worker/asyncadvance/CLAUDE.md new file mode 100644 index 0000000000..c6c90bdc5c --- /dev/null +++ b/openmeter/billing/charges/worker/asyncadvance/CLAUDE.md @@ -0,0 +1,44 @@ +# asyncadvance + + + +> Event-driven counterpart to advance/: a Watermill/Kafka-style Handler that advances charges for a single customer in response to one charges.AdvanceChargesEvent. It maps the event's Namespace/CustomerID into a charges.AdvanceChargesInput and delegates to charges.ChargeService. + +## Patterns + +**Config.Validate() + New constructor** — Config exposes a Validate() error method (returns errors.New on nil Logger / ChargesService); New(c) calls c.Validate() first and returns (*Handler, error). This is the validating-config idiom, distinct from advance/'s inline checks. (`func New(c Config) (*Handler, error) { if err := c.Validate(); err != nil { return nil, err }; ... }`) +**Single-event Handle delegating to service** — Handle(ctx, *charges.AdvanceChargesEvent) builds customer.CustomerID{Namespace, ID} from the event and calls chargesService.AdvanceCharges, discarding the result value and returning the error to let the consumer drive retry. (`h.chargesService.AdvanceCharges(ctx, charges.AdvanceChargesInput{Customer: customer.CustomerID{Namespace: event.Namespace, ID: event.CustomerID}})`) +**Return error for consumer-level retry** — On failure Handle logs WarnContext (not Error) with namespace/customer_id and returns the error so the message pipeline can retry; it does not swallow or aggregate. (`h.logger.WarnContext(ctx, "failed to advance charges", slog.String("namespace", event.Namespace), ...); return err`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `asyncadvance.go` | Defines Handler, Config (+Validate), New, and Handle(ctx, *charges.AdvanceChargesEvent). | Handle operates on exactly one customer per event — there is no batching here (that belongs in advance/). The error is returned (for retry), unlike a fire-and-forget consumer; keep it propagating. | + +## Anti-Patterns + +- Swallowing the error in Handle — the returned error is the message-bus retry signal; returning nil on failure silently drops advancement. +- Adding multi-customer/batch iteration here; per-customer batching lives in the sibling advance/ package. +- Constructing Handler directly without New/Validate, bypassing the nil-dependency guards. + +## Decisions + +- **Split async (per-event) advancement into its own package separate from advance/ (batch sweep).** — The two have different triggers and error semantics: the batch sweep aggregates and continues, the event handler propagates a single error for bus-level retry. + +## Example: Advance charges for one customer from an AdvanceChargesEvent + +``` +func (h *Handler) Handle(ctx context.Context, event *charges.AdvanceChargesEvent) error { + _, err := h.chargesService.AdvanceCharges(ctx, charges.AdvanceChargesInput{ + Customer: customer.CustomerID{Namespace: event.Namespace, ID: event.CustomerID}, + }) + if err != nil { + h.logger.WarnContext(ctx, "failed to advance charges", slog.String("namespace", event.Namespace), slog.String("customer_id", event.CustomerID), slog.String("error", err.Error())) + return err + } + return nil +} +``` + + diff --git a/openmeter/billing/creditgrant/service/CLAUDE.md b/openmeter/billing/creditgrant/service/CLAUDE.md new file mode 100644 index 0000000000..ee5215b855 --- /dev/null +++ b/openmeter/billing/creditgrant/service/CLAUDE.md @@ -0,0 +1,50 @@ +# service + + + +> Implements the creditgrant.Service interface as a thin orchestration facade that maps credit-grant operations onto the lower-level charges/creditpurchase layer. Its primary constraint: it owns no persistence — every read/write delegates to chargesService or creditPurchaseService, and it only adds customer-existence checks, intent construction, and credit-purchase-charge typing. + +## Patterns + +**Config-validated constructor returning interface** — New(config Config) calls config.Validate() (which requires CreditPurchaseService, ChargesService, CustomerService non-nil) before constructing the unexported *service, and returns the creditgrant.Service interface, not the concrete struct. (`func New(config Config) (creditgrant.Service, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid config: %w", err) }; return &service{...}, nil }`) +**Validate-then-delegate per method** — Every Service method begins with input.Validate() and wraps the error as 'invalid input: %w', then delegates to a charges/creditpurchase call. No method touches Ent or a transaction directly. (`if err := input.Validate(); err != nil { return creditpurchase.Charge{}, fmt.Errorf("invalid input: %w", err) }`) +**Charge-to-credit-purchase typing via AsCreditPurchaseCharge** — After fetching a generic charge with chargesService.GetByID, the result is narrowed with charge.AsCreditPurchaseCharge(); a non-credit-purchase charge is surfaced as an error rather than returned. (`cpCharge, err := charge.AsCreditPurchaseCharge(); if err != nil { return creditpurchase.Charge{}, fmt.Errorf("charge is not a credit purchase: %w", err) }`) +**Expand realizations on every read** — Get/Create reads pass Expands: meta.Expands{meta.ExpandRealizations} to GetByID, and List sets the same Expands on ListChargesInput, so returned credit-purchase charges always carry realization data. (`Expands: meta.Expands{meta.ExpandRealizations}`) +**Input mapping via package-local to* helpers** — CreateInput is translated into a creditpurchase.Intent by toIntent, which itself calls toSettlement and calculateExpiresAt. FundingMethod selects the settlement variant (Invoice/External/Promotional) in a switch. (`intent := toIntent(input); result, err := s.chargesService.Create(ctx, charges.CreateInput{ Namespace: input.Namespace, Intents: charges.ChargeIntents{charges.NewChargeIntent(intent)} })`) +**Customer-scoped not-found and ownership enforcement** — Create verifies the customer via customerService.GetCustomer; Get cross-checks cpCharge.Intent.CustomerID against input.CustomerID and returns models.NewGenericNotFoundError when mismatched, so charges are namespaced+customer-scoped. (`if cpCharge.Intent.CustomerID != input.CustomerID { return creditpurchase.Charge{}, fmt.Errorf("get charge: %w", models.NewGenericNotFoundError(...)) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Whole service implementation: Config/Validate, New, the *service struct, the four Service methods (Create, Get, List, UpdateExternalSettlement), and the toIntent/toSettlement/calculateExpiresAt mapping helpers. | Create expects chargesService.Create to return exactly one charge (errors on len != 1). UpdateExternalSettlement rejects non-external settlements with a models.NewValidationIssue (code credit_grant_external_settlement_not_supported, 400) — only external-funded grants may transition payment state. toIntent currently sets ServicePeriod/BillingPeriod/FullServicePeriod to a zero-width [effectiveAt, effectiveAt] period (TODO marker). | + +## Anti-Patterns + +- Adding Ent queries, transactions, or a billing.Adapter dependency here — this layer must stay a pure orchestration facade over charges/creditpurchase. +- Returning the concrete *service from New instead of the creditgrant.Service interface. +- Skipping input.Validate() or the AsCreditPurchaseCharge() type narrowing and returning a raw generic charge. +- Constructing creditpurchase.Settlement inline in a method instead of routing FundingMethod through toSettlement. +- Bypassing the customer-existence / Intent.CustomerID ownership checks, which would leak charges across customers. + +## Decisions + +- **creditgrant.Service is a separate facade over the charges layer rather than methods on charges.Service.** — It exposes a credit-grant-centric vocabulary (FundingMethod, Amount, ExpiresAfter, customer scoping) and hides the generic charge/intent machinery from API handlers and app/common. +- **List delegates to creditPurchaseService.List while Get/Create use the generic chargesService.GetByID/Create.** — creditPurchaseService already provides a credit-purchase-typed list with status/currency/customer filters, avoiding manual narrowing of a heterogeneous charge list. + +## Example: Create a credit grant by building an intent and delegating to the charges layer, then narrowing the result. + +``` +intent := toIntent(input) +result, err := s.chargesService.Create(ctx, charges.CreateInput{ + Namespace: input.Namespace, + Intents: charges.ChargeIntents{charges.NewChargeIntent(intent)}, +}) +if err != nil { return creditpurchase.Charge{}, fmt.Errorf("create credit grant charge: %w", err) } +if len(result) != 1 { return creditpurchase.Charge{}, fmt.Errorf("expected 1 created charge, got %d", len(result)) } +createdChargeID, err := result[0].GetChargeID() +charge, err := s.chargesService.GetByID(ctx, charges.GetByIDInput{ ChargeID: createdChargeID, Expands: meta.Expands{meta.ExpandRealizations} }) +return charge.AsCreditPurchaseCharge() +``` + + diff --git a/openmeter/billing/httpdriver/CLAUDE.md b/openmeter/billing/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..762d510f06 --- /dev/null +++ b/openmeter/billing/httpdriver/CLAUDE.md @@ -0,0 +1,62 @@ +# httpdriver + + + +> Legacy v1 HTTP transport for billing: translates api.* request/response types to/from billing domain inputs and delegates to billing.Service. Pure adapter layer — no business logic, only mapping, namespace resolution, and error encoding. + +## Patterns + +**httptransport handler triple** — Each endpoint is a method on *handler returning a typed httptransport.Handler[WithArgs] built from (request decoder, business call, response encoder) + AppendOptions(h.options, WithOperationName, WithErrorEncoder). Request/Response/Params are declared as type aliases at the top of each file. (`return httptransport.NewHandlerWithArgs(decode, func(ctx, in) (Resp,error){ return h.service.ListCustomerOverrides(ctx, in) }, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, ...))`) +**Interface-segmented Handler** — The public Handler interface composes ProfileHandler, InvoiceLineHandler, InvoiceHandler, CustomerOverrideHandler; each method returns a typed handler constructor. New endpoints must be added to the matching sub-interface and implemented on *handler. (`type Handler interface { ProfileHandler; InvoiceLineHandler; InvoiceHandler; CustomerOverrideHandler }`) +**Namespace from decoder** — Every decoder calls h.resolveNamespace(ctx) which reads namespacedriver.NamespaceDecoder; failure returns a 500 HTTPError. Inputs are always namespace-scoped. (`ns, err := h.resolveNamespace(ctx); if err != nil { return Req{}, fmt.Errorf(...) }`) +**Centralized billing error encoder** — errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for billing.NotFoundError(404), ValidationError(400), UpdateAfterDeleteError(409), ValidationIssue(400), all rendered via billing.EncodeValidationIssues. Domain errors must be one of these types to map to the right status. (`commonhttp.HandleErrorIfTypeMatches[billing.ValidationError](ctx, http.StatusBadRequest, err, w, billing.EncodeValidationIssues)`) +**API<->entity mapping via lo pointer helpers** — Decoders unwrap optional api fields with lo.FromPtr / lo.FromPtrOr and build billing input structs; per-item conversions use slicesx.MapWithErr and dedicated mapXToAPI / mapXToEntity funcs. (`OrderBy: billing.CustomerOverrideOrderBy(lo.FromPtrOr(input.OrderBy, ...)), CustomerIDs: lo.FromPtr(input.CustomerId)`) +**ValidationIssues surfaced as errors** — When a returned invoice carries ValidationIssues, the handler converts them to a ValidationError via invoice.ValidationIssues.AsError() rather than returning a 200 with issues. (`if len(invoice.ValidationIssues) > 0 { return Resp{}, billing.ValidationError{Err: invoice.ValidationIssues.AsError()} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler interface composition, handler struct, New constructor, resolveNamespace | handler holds service, appService, namespaceDecoder, featureSwitches (config.BillingFeatureSwitchesConfiguration), options; New also takes stripeAppService | +| `errors.go` | errorEncoder() mapping billing domain errors to HTTP statuses | Order matters — first matching type wins; all use billing.EncodeValidationIssues | +| `invoice.go` | List/Get/Delete/Progress/Simulate invoice + InvoicePendingLinesAction handlers | ProgressInvoice is parameterized by ProgressAction; surfaces invoice ValidationIssues as ValidationError | +| `invoiceline.go` | CreatePendingLine handler + mapCreateGatheringLineToEntity | Empty req.Lines returns billing.ValidationError; lines mapped per-item with slicesx.MapWithErr | +| `profile.go` | Profile CRUD handlers + MapProfileToApi | MapProfileToApi resolves app references via appService; keep nil-profile guards | +| `customeroverride.go` | Customer override list/get/upsert/delete + expand mapping | mapCustomerOverrideExpandToEntity translates api expand enums; reuses customerhttpdriver for nested customer mapping | +| `deprecations.go` | Backward-compat shims for deprecated request shapes | Has deprecations_test.go — keep shim behavior covered when changing field handling | + +## Anti-Patterns + +- Putting business logic (state transitions, calculation) in handlers instead of delegating to billing.Service +- Returning bare errors instead of billing.NotFoundError/ValidationError/ValidationIssue (breaks HTTP status mapping) +- Reading the namespace manually instead of h.resolveNamespace(ctx) +- Returning a 200 response while invoice.ValidationIssues is non-empty +- Hand-writing pointer/optional unwrapping instead of lo.FromPtr/FromPtrOr and slicesx.MapWithErr + +## Decisions + +- **All handlers built through httptransport with a shared errorEncoder** — Uniform error-to-status mapping and operation naming/telemetry across every billing endpoint without per-handler boilerplate +- **Request/Response/Params declared as type aliases of api.* and billing.* inputs** — Keeps the transport layer a thin, statically-checked mapping between OpenAPI types and domain inputs + +## Example: A billing HTTP handler delegating to the service + +``` +func (h *handler) ListCustomerOverrides() ListCustomerOverridesHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, input ListCustomerOverridesParams) (ListCustomerOverridesRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return ListCustomerOverridesRequest{}, fmt.Errorf("failed to resolve namespace: %w", err) + } + return ListCustomerOverridesRequest{Namespace: ns, CustomerIDs: lo.FromPtr(input.CustomerId)}, nil + }, + func(ctx context.Context, input ListCustomerOverridesRequest) (ListCustomerOverridesResponse, error) { + return h.service.ListCustomerOverrides(ctx, input) // + map to API + }, + commonhttp.JSONResponseEncoderWithStatus[ListCustomerOverridesResponse](http.StatusOK), + httptransport.AppendOptions(h.options, httptransport.WithOperationName("ListCustomerOverrides"), httptransport.WithErrorEncoder(errorEncoder()))..., + ) +// ... +``` + + diff --git a/openmeter/billing/lineengine/CLAUDE.md b/openmeter/billing/lineengine/CLAUDE.md new file mode 100644 index 0000000000..fb73befd5d --- /dev/null +++ b/openmeter/billing/lineengine/CLAUDE.md @@ -0,0 +1,48 @@ +# lineengine + + + +> Concrete line Engine implementing billing.LineEngine + billing.LineCalculator: builds standard invoice lines from gathering lines, splits gathering lines at period boundaries, snapshots quantities, resolves split-line-group hierarchy, and generates/merges detailed rated lines. This is the lifecycle-hook engine the service registers for LineEngineTypeInvoice. + +## Patterns + +**Config+Validate+New constructor** — Engine is built via New(Config) where Config.Validate() requires non-nil SplitLineGroupAdapter, QuantitySnapshotter, and rating.Service; constructor returns error, never panics. (`func New(config Config) (*Engine, error) { if err := config.Validate(); err != nil { return nil, err }; return &Engine{...}, nil }`) +**Engine satisfies both billing interfaces** — var _ billing.LineEngine and var _ billing.LineCalculator both assert *Engine. Lifecycle hooks (OnCollectionCompleted, OnStandardInvoiceCreated, OnInvoiceIssued, OnPayment*) must keep matching signatures; unused hooks return input.Lines / nil. (`var ( _ billing.LineEngine = (*Engine)(nil); _ billing.LineCalculator = (*Engine)(nil) )`) +**Snapshot gating before quantity capture** — OnCollectionCompleted skips snapshotting when QuantitySnapshotedAt is already past the default collection time, or when collection time is still in the future; only then calls quantitySnapshotter.SnapshotLineQuantities. (`if input.Invoice.QuantitySnapshotedAt != nil && !input.Invoice.QuantitySnapshotedAt.Before(input.Invoice.DefaultCollectionAtForStandardInvoice()) { return input.Lines, nil }`) +**Split-at into pre/post lines via CloneForCreate** — SplitGatheringLine creates a SplitLineGroup if absent, then derives postSplitAtLine via line.CloneForCreate, trims the original to [from, splitAt], and soft-deletes either side whose truncated period is empty (FlatPrice never empty; usage truncated to streaming.MinimumWindowSizeDuration). (`postSplitAtLine, err := line.CloneForCreate(func(l *billing.GatheringLine){ l.ServicePeriod.From = in.SplitAt; l.SplitLineGroupID = lo.ToPtr(splitLineGroupID); l.ChildUniqueReferenceID = nil })`) +**Detailed-line generation then merge+validate** — CalculateLines loops standard lines, calls ratingService.GenerateDetailedLines, then invoicecalc.MergeGeneratedDetailedLines, then stdLine.Validate(); any per-line error is wrapped with the line ID. (`generated, _ := e.ratingService.GenerateDetailedLines(stdLine); invoicecalc.MergeGeneratedDetailedLines(stdLine, generated)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `engine.go` | Config/New, GetLineEngineType (LineEngineTypeInvoice), and lifecycle hooks | Snapshot failures of type *billing.ErrSnapshotInvalidDatabaseState are converted to a critical billing.ValidationIssue, not a raw error | +| `splitlinegroup.go` | SplitLineGroupAdapter interface, SplitGatheringLine, ResolveSplitLineGroupHeaders | splitAt must lie within line.ServicePeriod; empty-after-truncation sides are soft-deleted; isPeriodEmptyConsideringTruncations special-cases FlatPriceType | +| `stdinvoice.go` | QuantitySnapshotter interface + BuildStandardInvoiceLines/CalculateLines/IsLineBillableAsOf | Build path requires non-empty Invoice.ID and GatheringLines; ToStandardLines then ResolveSplitLineGroupHeaders then snapshot, in that order | + +## Anti-Patterns + +- panic on missing engine type or inputs in production paths — return errors (only the testutils Noop panics) +- Skipping invoicecalc.MergeGeneratedDetailedLines / stdLine.Validate() after generating detailed lines +- Splitting a line at a point outside its ServicePeriod, or reusing ChildUniqueReferenceID on the post-split clone +- Returning a raw error for snapshot DB-state failures instead of a billing.ValidationIssue +- Adding a LineEngine hook to the interface without updating *Engine (and testutils.NoopLineEngine) + +## Decisions + +- **Engine carries a SplitLineGroupAdapter and QuantitySnapshotter as injected collaborators** — Keeps persistence (split groups) and metering (quantity snapshot) behind narrow interfaces so the engine stays a pure orchestration unit +- **Snapshot DB-state errors become critical ValidationIssues** — Lets the invoice surface a recoverable metering problem to the user instead of failing the whole pipeline opaquely + +## Example: Building standard lines: snapshot then rate then validate + +``` +func (e *Engine) BuildStandardInvoiceLines(ctx context.Context, input billing.BuildStandardInvoiceLinesInput) (billing.StandardLines, error) { + stdLines, err := e.buildStandardInvoiceLinesWithQuantitySnapshot(ctx, input) + if err != nil { + return nil, err + } + return e.CalculateLines(billing.CalculateLinesInput{Invoice: input.Invoice, Lines: stdLines}) +} +``` + + diff --git a/openmeter/billing/models/creditsapplied/CLAUDE.md b/openmeter/billing/models/creditsapplied/CLAUDE.md new file mode 100644 index 0000000000..adee2547f8 --- /dev/null +++ b/openmeter/billing/models/creditsapplied/CLAUDE.md @@ -0,0 +1,30 @@ +# creditsapplied + + + +> Tiny value-object package modeling credits applied to a billing line. Defines CreditApplied (Amount/Description/CreditRealizationID) and the CreditsApplied slice, persisted as JSONB on detailed-line schemas and pre-tax in the totals model. + +## Patterns + +**Validator + Clonable interface assertions** — Compile-time interface checks via var _ blank assignments enforce that the type satisfies models.Validator and models.Clonable. (`var _ models.Validator = (*CreditsApplied)(nil); var _ models.Clonable[CreditsApplied] = (*CreditsApplied)(nil)`) +**Slice-level Validate delegates to element Validate** — CreditsApplied.Validate() ranges items and returns the first item.Validate() error; CreditApplied.Validate() rejects non-positive Amount. (`if !c.Amount.IsPositive() { return errors.New("amount must be positive") }`) +**Value-semantics clone helpers** — Clone() returns nil for empty slices and lo.Map copies elements; CloneWithAmount returns a copy with a new Amount (value receiver, no mutation of original). (`func (c CreditApplied) CloneWithAmount(amount alpacadecimal.Decimal) CreditApplied { c.Amount = amount; return c }`) +**Currency-aware summation** — SumAmount rounds each item Amount with currencyx.Calculator.RoundToPrecision before adding, accumulating on alpacadecimal.Zero. (`sum = sum.Add(currency.RoundToPrecision(item.Amount))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `model.go` | Entire package: CreditApplied struct, CreditsApplied slice, Validate/Clone/SumAmount/CloneWithAmount. | Amount must be a positive alpacadecimal.Decimal — never compare decimals with ==; use alpaca methods. Clone returns nil (not empty slice) for len==0. | + +## Anti-Patterns + +- Adding monetary fields without rounding through a currencyx.Calculator before summing. +- Returning an empty non-nil slice from Clone() instead of nil — downstream goderive equality treats nil vs empty distinctly. +- Mutating the receiver in CloneWithAmount/Clone (value receivers exist to keep these copy-only). + +## Decisions + +- **Credits are stored as a standalone value-object slice rather than line fields.** — Lets the same CreditsApplied JSONB blob be reused across detailed-line schemas and summed independently for pre-tax totals. + + diff --git a/openmeter/billing/models/externalid/CLAUDE.md b/openmeter/billing/models/externalid/CLAUDE.md new file mode 100644 index 0000000000..ce13513b34 --- /dev/null +++ b/openmeter/billing/models/externalid/CLAUDE.md @@ -0,0 +1,31 @@ +# externalid + + + +> Generic, reusable Ent mixins and value-objects for storing external invoicing/payment/tax app IDs (e.g. Stripe invoice/line IDs) on invoice and line entities. Pairs schema field definitions with typed generic Create/Update/Map helpers. + +## Patterns + +**Ent mixin + generic typed accessor pattern** — Each entity gets a Mixin (LineMixin/InvoiceMixin) declaring Optional().Nillable() String fields, plus generic Creator/Updater/Getter interfaces and Create/Update/Map functions parameterized over the Ent builder type T. (`func CreateLineExternalID[T LineExternalIDCreator[T]](creator LineExternalIDCreator[T], ids LineExternalIDs) T { ... }`) +**EmptyableToPtr for optional persistence** — Create/Update helpers use lo.EmptyableToPtr to turn empty strings into nil before SetNillable.../SetOrClear..., and lo.FromPtr when mapping back from DB. (`creator.SetNillableInvoicingAppExternalID(lo.EmptyableToPtr(ids.Invoicing))`) +**Create vs Update builder contracts differ** — Creators use SetNillable* (insert), updaters use SetOrClear* (update can null out an existing value); pick the matching interface for the Ent operation. (`SetOrClearInvoicingAppExternalID vs SetNillableInvoicingAppExternalID`) +**Value-object Equal / nil-safe getter** — LineExternalIDs.Equal compares by Invoicing; InvoiceExternalIDs.GetInvoicingOrEmpty is nil-safe on a pointer receiver. (`func (i *InvoiceExternalIDs) GetInvoicingOrEmpty() string { if i == nil { return "" } ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `mixin.go` | Ent mixins (LineMixin, InvoiceMixin) and the generic Create/Update/Map helpers + Creator/Updater/Getter interfaces. | Invoice has 3 app IDs (invoicing/payment/tax) but the InvoiceExternalIDCreator/Updater only wire invoicing+payment; tax_app_external_id is schema-only here. Keep Create/Update helper field sets in sync with the struct in model.go. | +| `model.go` | InvoiceExternalIDs and LineExternalIDs value structs with omitempty JSON tags. | GetInvoicingOrEmpty is the only nil-safe accessor; InvoiceExternalIDs has no Equal (only Line does). | + +## Anti-Patterns + +- Persisting empty strings instead of nil — always route optional IDs through lo.EmptyableToPtr. +- Using a Creator interface for an update path (loses SetOrClear null-out semantics) or vice versa. +- Adding a new external ID field to the struct without updating both the mixin Fields() and the generic Create/Update helpers. + +## Decisions + +- **External IDs live in generic mixins reused across both invoice and line schemas.** — Multiple Ent entities (invoices, detailed lines) need identical external-app-ID columns; generics over the builder type avoid per-entity boilerplate. + + diff --git a/openmeter/billing/models/stddetailedline/CLAUDE.md b/openmeter/billing/models/stddetailedline/CLAUDE.md new file mode 100644 index 0000000000..c860dd76e4 --- /dev/null +++ b/openmeter/billing/models/stddetailedline/CLAUDE.md @@ -0,0 +1,62 @@ +# stddetailedline + + + +> Domain model + Ent mixin for standard invoice detailed lines (the Base aggregate). Composes the totals, externalid, and creditsapplied value-objects with line metadata (currency, service period, quantity, per-unit amount, category, payment term) and provides generic DB Create/FromDB mapping plus goderive-generated equality. + +## Patterns + +**Composition over the shared value-object mixins** — Base embeds models.ManagedResource and totals.Totals/externalid.LineExternalIDs/creditsapplied.CreditsApplied; the Ent Mixin() composes ResourceMixin + AnnotationsMixin + totals.Mixin via entutils.RecursiveMixin. (`type Mixin struct { entutils.RecursiveMixin[mixinBase] }`) +**Generic Creator/DBGetter mapping interfaces** — Create[T Creator[T]] writes Base into any Ent builder satisfying Creator (which embeds externalid.LineExternalIDCreator + totals.Setter); FromDB[T DBGetter] reads it back, normalizing all times to UTC. (`func Create[T Creator[T]](creator Creator[T], line Base) T`) +**Aggregated Validate collecting errors with errors.Join** — Base.Validate appends per-field wrapped errors (fmt.Errorf("category: %w", err)) into errs and returns errors.Join; supports functional ValidateOption (IgnoreQuantityChecks). (`errs = append(errs, fmt.Errorf("service period: %w", err)); return errors.Join(errs...)`) +**goderive equality, not reflect.DeepEqual** — Base.Equal delegates to deriveEqualBase in derived.gen.go (regenerated via go:generate goderive); decimal/period fields compared with their Equal methods, not ==. (`func (l Base) Equal(other Base) bool { return deriveEqualBase(&l, &other) }`) +**Deprecated tax fields retained on the mixin** — tax_config/tax_code_id/tax_behavior are .Deprecated(...) because detailed lines now inherit tax from the parent standard line; kept until the rollout migration completes. (`field.JSON("tax_config", productcatalog.TaxConfig{}).Deprecated("detailed lines inherit tax configuration from their parent standard line")`) +**UTC normalization at the DB boundary** — Create and FromDB call .In(time.UTC) on every time.Time (service period, created/updated/deleted); CategoryRegular and InAdvancePaymentTerm are schema defaults. (`SetServicePeriodStart(line.ServicePeriod.From.In(time.UTC))`) +**Index-aware Compare ordering** — Compare[T Comparable] orders by Index (nil sorts last), then CreatedAt, then ID — used to deterministically sort detailed lines. (`if a.GetIndex() == nil && b.GetIndex() != nil { return 1 }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `model.go` | Base aggregate, Category enum + Values()/Validate, ValidateOption, Clone, Equal, Compare/Comparable. | Clone only deep-copies CreditsApplied (rest are value types); Quantity may legitimately be negative-checked unless IgnoreQuantityChecks is passed (UBB persists quantity only at issue time). | +| `mixin.go` | Ent schema fields/indexes/checks (currency varchar(3) immutable, numeric decimals, credits_applied JSONB, child_unique_reference_id non-empty check). | Editing fields requires make generate then atlas migrate diff. Several tax fields are .Deprecated — do not reuse them for new tax logic. | +| `mapping.go` | DBGetter interface and FromDB[T] mapper; embeds externalid.LineExternalIDGetter + totals.TotalsGetter. | CreditsApplied comes from a *CreditsApplied pointer via lo.FromPtr; all times normalized to UTC. | +| `create.go` | Creator[T] interface and Create[T] builder writer. | Must stay in sync with mixin Fields() and the Base struct; chains externalid.CreateLineExternalID and billingtotals.Set at the end. | +| `derived.gen.go` | goderive-generated deriveEqualBase / element equality. | Generated — DO NOT EDIT. Add fields to Base then run go generate; equality omits any field not regenerated. | +| `generate.go` | go:generate directive invoking goderive. | Required for derived.gen.go regeneration. | + +## Anti-Patterns + +- Editing derived.gen.go by hand instead of re-running goderive after changing Base. +- Reaching for the deprecated tax_config/tax_code_id/tax_behavior fields — tax is inherited from the parent standard line. +- Comparing Base or its decimal/period fields with == or reflect.DeepEqual instead of Equal/deriveEqualBase. +- Returning on the first validation failure instead of collecting into errs and errors.Join. +- Adding a Base field without updating mixin.go Fields(), create.go Creator, mapping.go DBGetter, and the goderive output together. + +## Decisions + +- **Detailed-line persistence is expressed via generic Creator/DBGetter interfaces over Ent builders rather than concrete types.** — Several Ent entities (billingstandardinvoicedetailedline, chargeflatfeerundetailedline, chargeusagebasedrundetailedline) share the same line shape; generics let one Create/FromDB serve all builders. +- **Equality is goderive-generated, not reflection-based.** — alpacadecimal and ClosedPeriod need semantic Equal comparison; reflect.DeepEqual would give wrong results on decimals. + +## Example: Persist a detailed line into any Ent builder via the generic Create helper + +``` +import ( + "github.com/openmeterio/openmeter/openmeter/billing/models/externalid" + billingtotals "github.com/openmeterio/openmeter/openmeter/billing/models/totals" +) + +func Create[T Creator[T]](creator Creator[T], line Base) T { + create := creator. + SetName(line.Name). + SetCurrency(line.Currency). + SetServicePeriodStart(line.ServicePeriod.From.In(time.UTC)). + SetServicePeriodEnd(line.ServicePeriod.To.In(time.UTC)). + SetQuantity(line.Quantity). + SetPerUnitAmount(line.PerUnitAmount). + SetCategory(line.Category). + SetChildUniqueReferenceID(line.ChildUniqueReferenceID) +// ... +``` + + diff --git a/openmeter/billing/models/totals/CLAUDE.md b/openmeter/billing/models/totals/CLAUDE.md new file mode 100644 index 0000000000..55b75240ab --- /dev/null +++ b/openmeter/billing/models/totals/CLAUDE.md @@ -0,0 +1,36 @@ +# totals + + + +> Money value-object aggregating the per-line/invoice monetary breakdown (Amount, ChargesTotal, DiscountsTotal, three tax totals, CreditsTotal, Total) plus an Ent mixin persisting each as a Postgres numeric. Provides decimal-safe arithmetic, validation, rounding, and DB Set/FromDB helpers reused across billing, charges, and rating. + +## Patterns + +**Immutable value-semantics decimal arithmetic** — Add/Sub/Neg/Sum/RoundToPrecision/CalculateTotal operate field-by-field with alpacadecimal methods and return new Totals (value receivers); never mutate in place. (`res.Amount = res.Amount.Add(other.Amount)`) +**Mixin Setter/Getter generic DB contract** — totals.Mixin declares 8 numeric fields; Set[T Setter[T]] writes them onto any Ent builder and FromDB reads them via TotalsGetter — the canonical reuse hook for line/invoice schemas. (`func Set[T Setter[T]](mut Setter[T], totals Totals) T { return mut.SetAmount(totals.Amount)... }`) +**Sequential non-negative Validate** — Validate returns the first negative-field error; ValidateTotalNonNegative is a cheaper Total-only check used where intermediate negatives are allowed. (`if t.Amount.IsNegative() { return errors.New("amount is negative") }`) +**CalculateTotal as the derived-total formula** — Total = Amount + ChargesTotal + TaxesExclusiveTotal - DiscountsTotal - CreditsTotal (credits and discounts subtracted); use this rather than re-deriving inline. (`alpacadecimal.Sum(t.Amount, t.ChargesTotal, t.TaxesExclusiveTotal, t.DiscountsTotal.Neg(), t.CreditsTotal.Neg())`) +**Currency-aware rounding** — RoundToPrecision rounds every field through a currencyx.Calculator before persistence/comparison. (`t.Amount = calc.RoundToPrecision(t.Amount)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `model.go` | Totals struct and all arithmetic/validation/rounding methods (Add, Sub, Neg, Sum, IsZero, Equal, RoundToPrecision, CalculateTotal, Validate, ValidateTotalNonNegative). | CreditsApplied/credits are pre-tax (CreditsTotal subtracted in CalculateTotal). Equal compares each decimal with .Equal — never ==. Any new field must be added to all 8-field methods consistently. | +| `mixin.go` | Ent mixin (8 numeric fields) + Setter/Getter interfaces + Set/FromDB generic helpers. | Field list here, the Totals struct, and Set/FromDB must stay in lockstep; all fields are dialect.Postgres numeric. | +| `model_test.go` | Round-trip rounding, Equal, and ValidateTotalNonNegative tests using USD calculator. | Asserts exact rounded strings (e.g. "10.01") — adding fields requires extending these assertions. | + +## Anti-Patterns + +- Adding a Totals field without updating every method (Add/Sub/Neg/IsZero/Equal/RoundToPrecision) plus mixin Fields/Setter/Getter — silent drift loses the field. +- Mutating a Totals receiver in place instead of returning a new value. +- Comparing Totals or its decimal fields with == / reflect.DeepEqual instead of Equal. +- Treating credits/discounts as additive in Total — CalculateTotal subtracts them. +- Persisting or comparing un-rounded decimals; round via currencyx.Calculator first. + +## Decisions + +- **Totals is a self-contained value-object with generic Setter/Getter DB hooks.** — Both billing lines/invoices and the charges/rating subsystems persist identical monetary breakdowns; one mixin + generics avoids duplicating 8 numeric columns and arithmetic per entity. +- **Credits are modeled pre-tax and subtracted in CalculateTotal.** — Matches the invoice math where credits reduce the taxable base alongside discounts. + + diff --git a/openmeter/billing/rating/CLAUDE.md b/openmeter/billing/rating/CLAUDE.md new file mode 100644 index 0000000000..ccf7d47cf2 --- /dev/null +++ b/openmeter/billing/rating/CLAUDE.md @@ -0,0 +1,57 @@ +# rating + + + +> The pricing-engine domain root for billing. It declares the rating.Service interface (ResolveBillablePeriod + GenerateDetailedLines), the line-accessor contracts the engine reads pricing/usage from, the DetailedLine result model with its monetary math, and the stable ChildUniqueReferenceID constants that name every generated detailed line. The concrete engine lives in the service/ child; this package is the type/contract surface plus pure decimal arithmetic. + +## Patterns + +**Accessor-interface input contracts** — The engine never takes a concrete line struct; it reads via PriceAccessor / GatheringLineAccessor / StandardLineAccessor interfaces. New pricing inputs must be added as accessor methods, not as fields on a request struct. (`StandardLineAccessor.GetMeteredQuantity() (*alpacadecimal.Decimal, error); GetRateCardDiscounts() billing.Discounts; IsProgressivelyBilled() bool`) +**Stable ChildUniqueReferenceID constants** — Every detailed line a pricer emits is keyed by a const from const.go (e.g. UsageChildUniqueReferenceID, GraduatedTieredPriceUsageChildUniqueReferenceID format string). These IDs are the external sync key — reuse the existing const, never inline a literal. (`VolumeUnitPriceChildUniqueReferenceID = "volume-tiered-price"; GraduatedTieredPriceUsageChildUniqueReferenceID = "graduated-tiered-%d-price-usage"`) +**All money math via currencyx.Calculator.RoundToPrecision** — DetailedLine.TotalAmount and AddDiscountForOverage round every intermediate via in.Currency.RoundToPrecision before comparing or subtracting. Never compare raw decimals or floats directly. (`total := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity)); total = total.Sub(in.AmountDiscounts.SumAmount(in.Currency))`) +**Total = perUnit*qty minus discounts minus credits** — TotalAmount(getTotalAmountInput) is the single canonical formula: round(perUnit*qty) - AmountDiscounts.SumAmount - CreditsApplied.SumAmount. DetailedLine.TotalAmount and DetailedLines.Sum both route through it. (`func TotalAmount(in getTotalAmountInput) alpacadecimal.Decimal { total := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity)); total = total.Sub(in.AmountDiscounts.SumAmount(in.Currency)); ... }`) +**Functional options for engine behaviour** — GenerateDetailedLines takes ...GenerateDetailedLinesOption (WithMinimumCommitmentIgnored, WithCreditsMutatorDisabled) collapsed via NewGenerateDetailedLinesOptions. Add behaviour flags as new With* options, not as new method overloads. (`func WithCreditsMutatorDisabled() GenerateDetailedLinesOption { return func(o *GenerateDetailedLinesOptions){ o.DisableCreditsMutator = true } }`) +**Validate inputs before pricing** — Input structs (ResolveBillablePeriodInput) and result models (DetailedLine) carry Validate() returning fmt.Errorf on missing/invalid fields. DetailedLine.Validate rejects negative PerUnitAmount but intentionally allows negative Quantity (usage corrections). (`func (i ResolveBillablePeriodInput) Validate() error { if i.Line == nil { return fmt.Errorf("line is required") } ... }`) +**Max-spend overage applied as an AmountLineDiscount** — AddDiscountForOverage models the maximum-spend cap by appending a billing.AmountLineDiscountManaged with ChildUniqueReferenceID=billing.LineMaximumSpendReferenceID and Reason=MaximumSpendDiscount, returning a copy of the line — it never mutates totals directly. (`i.AmountDiscounts = append(i.AmountDiscounts, billing.AmountLineDiscountManaged{ AmountLineDiscount: billing.AmountLineDiscount{ Amount: discountAmount, LineDiscountBase: billing.LineDiscountBase{ ChildUniqueReferenceID: lo.ToPtr(billing.LineMaximumSpendReferenceID), Reason: billing.NewDiscountReasonFrom(billing.MaximumSpendDiscount{}) }}})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Declares the rating.Service interface (ResolveBillablePeriod, GenerateDetailedLines), the option type + With* helpers, and the result/input structs (GenerateDetailedLinesResult with FinalUsage/FinalStandardLineDiscounts/Totals, ResolveBillablePeriodInput with its Validate). | This is interface-only; the implementation is in service/. ResolveBillablePeriodInput.Validate requires Line, FeatureMeters, and non-zero AsOf. | +| `line.go` | Defines the three accessor interfaces the engine consumes: PriceAccessor (base: GetPrice/GetServicePeriod/GetFeatureKey), GatheringLineAccessor (gathering-phase, adds split-group/invoiceAt/ID), StandardLineAccessor (standard-phase, adds currency, metered quantity, credits, discounts, progressive-billing accessors). | Add new pricing inputs here as accessor methods. GetMeteredQuantity / GetMeteredPreLinePeriodQuantity / GetPreviouslyBilledAmount return errors — callers must handle them. | +| `detailedline.go` | DetailedLine result model + pure monetary math: TotalAmount/getTotalAmountInput, DetailedLines.Sum, and AddDiscountForOverage for max-spend capping. Carries AmountDiscounts, CreditsApplied, totals.Totals, Category, PaymentTerm. | TotalAmount is the only money formula — do not duplicate it. AddDiscountForOverage returns a copy (value receiver); reassign the result. Validate allows negative Quantity but not negative PerUnitAmount. | +| `const.go` | Canonical ChildUniqueReferenceID string constants for every detailed-line variant (usage, flat-price, unit-price, volume, graduated-tiered format strings, rate-card-discount). | These are external sync keys; changing a value breaks downstream line reconciliation. Per-type IDs are flagged for deprecation toward generic single-child names — prefer existing consts over new literals. | +| `detailedline_test.go` | Table tests for DetailedLine.Validate (negative qty allowed, negative perUnit rejected) and AddDiscountForOverage covering no-overage, currency rounding, partial discount, and 100% discount cases. | Asserts exact discount Amount and the fixed description format 'Maximum spend discount for charges over ' — keep formatMaximumSpendDiscountDescription in sync. | + +## Anti-Patterns + +- Adding concrete request fields instead of extending PriceAccessor/GatheringLineAccessor/StandardLineAccessor — the engine reads exclusively through these interfaces. +- Computing line totals with raw alpacadecimal or float math instead of routing through TotalAmount / currencyx.Calculator.RoundToPrecision. +- Inlining a ChildUniqueReferenceID string literal rather than using the const.go constant — these are external sync keys. +- Mutating DetailedLine totals in place; AddDiscountForOverage has a value receiver and returns a new line, so the result must be reassigned. +- Rejecting negative Quantity in DetailedLine.Validate — negative quantity is a supported usage-correction case (only PerUnitAmount must be non-negative). + +## Decisions + +- **Engine inputs are accessor interfaces, not structs.** — Gathering vs standard invoice phases expose different data; interfaces let the same pricer code read lazily-computed/errorable values (metered quantity, previously-billed amount) without coupling to a concrete line type. +- **Detailed-line monetary math lives in this root package as pure functions.** — Totals must be recomputed deterministically from perUnit*qty minus discounts/credits with consistent currency rounding; centralizing it in TotalAmount keeps the service/ pricers and external callers from diverging. +- **Max-spend cap is expressed as a discount line, not a total override.** — Only detailed-line children are synced externally; encoding the cap as an AmountLineDiscount with MaximumSpendDiscount reason keeps the parent line total derivable and auditable. + +## Example: Canonical detailed-line total: round(perUnit*qty) then subtract discounts and credits via the currency calculator. + +``` +import ( + "github.com/alpacahq/alpacadecimal" + "github.com/openmeterio/openmeter/pkg/currencyx" +) + +func TotalAmount(in getTotalAmountInput) alpacadecimal.Decimal { + total := in.Currency.RoundToPrecision(in.PerUnitAmount.Mul(in.Quantity)) + total = total.Sub(in.AmountDiscounts.SumAmount(in.Currency)) + total = total.Sub(in.CreditsApplied.SumAmount(in.Currency)) + return total +} +``` + + diff --git a/openmeter/billing/rating/service/CLAUDE.md b/openmeter/billing/rating/service/CLAUDE.md new file mode 100644 index 0000000000..cc1c6ef740 --- /dev/null +++ b/openmeter/billing/rating/service/CLAUDE.md @@ -0,0 +1,62 @@ +# service + + + +> Implements rating.Service (the pricing engine entrypoint) as a stateless `service struct{}` constructed via New(). It orchestrates the per-line calculation flow: select a pricer for the price type, wrap it with pre/post-calculation mutators in a priceMutator, resolve the billable period, and emit priced rating.DetailedLines with totals. All monetary math routes through currencyx.Calculator.RoundToPrecision. + +## Patterns + +**Stateless service implementing rating.Service** — The struct holds no fields; all per-call state comes from the StandardLineAccessor input and GenerateDetailedLinesOptions. Construct with New() which returns rating.Service. (`type service struct{}; func New() rating.Service { return &service{} }`) +**Pricer selection by price Type()** — getPricerFor switches on line.GetPrice().Type() (FlatPriceType, UnitPriceType, TieredPriceType, PackagePriceType, DynamicPriceType) to pick a rate.Pricer; unknown types return an error, never a panic or default pricer. (`switch linePrice.Type() { case productcatalog.UnitPriceType: basePricer = rate.Unit{} ... default: return nil, fmt.Errorf("unsupported price type: %s", linePrice.Type()) }`) +**priceMutator pipeline ordering** — GenerateDetailedLines applies PreCalculation mutators to the input, runs the base Pricer, then PostCalculation mutators over the resulting lines. Order is fixed: DiscountUsage (pre) -> Pricer -> DiscountPercentage, MaxAmountCommitment, MinAmountCommitment, Credits (post). Flat prices get only DiscountPercentage + optional Credits and no commitments. (`&priceMutator{PreCalculation: []mutator.PreCalculationMutator{&mutator.DiscountUsage{}}, Pricer: basePricer, PostCalculation: postCalculationMutators}`) +**Options gate mutator inclusion** — rating.GenerateDetailedLinesOptions flags (IgnoreMinimumCommitment, DisableCreditsMutator) conditionally append MinAmountCommitment / Credits to the post-calculation chain. Charges pricing uses IgnoreMinimumCommitment so min-spend only appears after the service period end. (`if !opts.IgnoreMinimumCommitment { postCalculationMutators = append(postCalculationMutators, &mutator.MinAmountCommitment{}) }`) +**Validate input before pricing** — Both GenerateDetailedLines and ResolveBillablePeriod call validateStandardLine / in.Validate() and PricerCalculateInput.Validate() before any calculation; flat lines skip usage extraction, non-flat lines pull metered + pre-line-period quantities. (`if err := validateStandardLine(in); err != nil { return rating.GenerateDetailedLinesResult{}, fmt.Errorf("validating billable line: %w", err) }`) +**Totals computed in service, not pricers** — getTotalsFromDetailedLines walks each DetailedLine, sets per-line Totals via calculateDetailedLineTotals, then sums them (RoundToPrecision) into the UBP line total. CategoryCommitment lines map their amount to ChargesTotal; all others to Amount. (`in.Totals = totals.Sum(lo.Map(in.DetailedLines, func(l rating.DetailedLine, _ int) totals.Totals { return l.Totals })...).RoundToPrecision(calc)`) +**Progressive-billing gated by meter aggregation** — ResolveBillablePeriod force-disables ProgressiveBilling unless the underlying meter aggregation is increase-only (Sum, Count, Max, UniqueCount via isDependingOnIncreaseOnlyMeters). FlatPriceType never allows progressive billing. (`if !meterTypeAllowsProgressiveBilling { in.ProgressiveBilling = false }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines the empty `service struct{}` and New() rating.Service constructor. | Do not add fields/dependencies here; the engine is intentionally stateless and driven by inputs. | +| `pricer.go` | getPricerFor maps price type -> rate.Pricer and assembles the priceMutator pre/Pricer/post pipeline; priceMutator.GenerateDetailedLines and ResolveBillablePeriod run the flow. | Mutator ordering is load-bearing (discounts before commitments before credits). New price types must be added to the switch and to FlatPriceType handling, and unknown types must error not default. | +| `detailedline.go` | Public GenerateDetailedLines entrypoint, validateStandardLine, and totals computation (getTotalsFromDetailedLines, calculateDetailedLineTotals). | Do NOT fold discounts/credits into the UBP line totals beyond children — external apps (Stripe) only sync detailed lines, see the in-code WARNING. Flat prices skip Usage population. | +| `billableperiod.go` | ResolveBillablePeriod delegates to the pricer after gating progressive billing on increase-only meter aggregation (isDependingOnIncreaseOnlyMeters). | Non-increase-only meters must be billed in arrears truncated by window; missing feature key or nil meter must error. | +| `options_test.go` | Validates option behavior (WithMinimumCommitmentIgnored, WithCreditsMutatorDisabled) through testutil.RunCalculationTestCase against the real service. | Tests assert full rating.DetailedLines including ChildUniqueReferenceID and Totals; keep new options covered through the harness, not direct mutator calls. | + +## Anti-Patterns + +- Adding state/dependencies to the `service struct{}` instead of passing them via StandardLineAccessor / GenerateDetailedLinesOptions. +- Reordering or bypassing the priceMutator pipeline (pre -> Pricer -> post) — discounts, commitments, and credits depend on a fixed order. +- Computing totals with float or raw decimal math instead of currencyx.Calculator.RoundToPrecision in calculateDetailedLineTotals / getTotalsFromDetailedLines. +- Injecting discount/credit/commitment logic into totals on the parent UBP line — only detailed-line children are synced externally (see the WARNING comment). +- Returning a default pricer for an unrecognized price Type() instead of erroring; or enabling progressive billing for flat/non-increase-only meters. + +## Decisions + +- **Pricing engine is a stateless service driven entirely by input accessors and option flags.** — Pricers and mutators must be deterministic and re-runnable (post-calculation mutators are idempotent), so no shared service state is kept across calls. +- **Calculation modeled as a priceMutator wrapping a base Pricer with ordered pre/post mutator slices rather than a monolithic per-price function.** — Lets commitments, discounts, and credits be composed and conditionally toggled per call (charges vs invoice) without duplicating per-price-type logic. +- **Totals are recomputed at the service layer from detailed-line children, not carried from external systems.** — Only detailed lines are synced to external billing apps; parent UBP totals are derived locally and must not embed app-specific discount logic. + +## Example: Selecting a pricer and building the mutator pipeline for a non-flat price + +``` +func getPricerFor(line rating.PriceAccessor, opts rating.GenerateDetailedLinesOptions) (*priceMutator, error) { + linePrice := line.GetPrice() + var basePricer rate.Pricer + switch linePrice.Type() { + case productcatalog.UnitPriceType: + basePricer = rate.Unit{} + case productcatalog.TieredPriceType: + basePricer = rate.Tiered{} + default: + return nil, fmt.Errorf("unsupported price type: %s", linePrice.Type()) + } + post := []mutator.PostCalculationMutator{&mutator.DiscountPercentage{}, &mutator.MaxAmountCommitment{}} + if !opts.IgnoreMinimumCommitment { + post = append(post, &mutator.MinAmountCommitment{}) + } +// ... +``` + + diff --git a/openmeter/billing/rating/service/mutator/CLAUDE.md b/openmeter/billing/rating/service/mutator/CLAUDE.md new file mode 100644 index 0000000000..ed737ba61c --- /dev/null +++ b/openmeter/billing/rating/service/mutator/CLAUDE.md @@ -0,0 +1,60 @@ +# mutator + + + +> Post- and pre-calculation mutators that adjust priced rating.DetailedLines for commitments (min/max spend), percentage/usage discounts, and credit application. Constraint: PostCalculationMutators must be idempotent over re-runs; the usage discount PreCalculationMutator explicitly cannot be (it mutates the usage-based line directly). + +## Patterns + +**Two mutator interfaces** — types.go defines PostCalculationMutator (Mutate(input, lines) -> lines) and PreCalculationMutator (Mutate(input) -> input). Each concrete mutator is an empty struct with a compile-time interface assertion. (`type MinAmountCommitment struct{}; var _ PostCalculationMutator = (*MinAmountCommitment)(nil)`) +**Append to line discount/credit slices, don't overwrite** — Mutators append to l.AmountDiscounts / pricerResult[idx].CreditsApplied / StandardLineDiscounts.Usage with a stable ChildUniqueReferenceID, so re-running merges rather than duplicates. (`l.AmountDiscounts = append(l.AmountDiscounts, lineDiscount)`) +**Commitment lines use FullProgressivelyBilledServicePeriod** — Min-spend is only emitted IsLastInPeriod and billed across the whole period: when IsProgressivelyBilled, the emitted line's Period is i.FullProgressivelyBilledServicePeriod, not the split period. (`period := i.GetServicePeriod(); if i.IsProgressivelyBilled() { period = i.FullProgressivelyBilledServicePeriod }`) +**Credit allocation must fully consume** — Credits.Mutate walks positive-total lines applying credit; leftover positive credit returns billing.ErrInvoiceLineCreditsNotConsumedFully (over-allocation is a critical invariant violation). (`if creditValueRemaining.IsPositive() { return pricerResult, billing.ErrInvoiceLineCreditsNotConsumedFully }`) +**Reason carries discount provenance** — Discount line items set Reason via billing.NewDiscountReasonFrom(...) and a rating.RateCardDiscountChildUniqueReferenceID keyed by CorrelationID; usage discounts are removed/re-added via removeRateCardUsageDiscounts to stay in sync. (`Reason: billing.NewDiscountReasonFrom(discount.PercentageDiscount)`) +**Round every monetary mutation** — All amount adjustments pass through i.CurrencyCalculator.RoundToPrecision before being stored on a line. (`minimumSpendAmount := i.CurrencyCalculator.RoundToPrecision(commitments.MinimumAmount.Sub(totalBilledAmount))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `types.go` | The PostCalculationMutator and PreCalculationMutator interfaces both keyed off rate.PricerCalculateInput. | New mutators must pick the right interface — pre runs on input usage, post runs on already-priced lines. | +| `commitments.go` | MinAmountCommitment (emits a min-spend line when total < minimum, last-in-period only) and MaxAmountCommitment (adds overage discounts via AddDiscountForOverage across lines). | Min-spend is in-arrears, last-in-period only; max-spend accumulates totalBilled including previouslyBilledAmount across all lines in order. | +| `credits.go` | Credits PostCalculationMutator distributes each applied credit across positive-total lines, cloning with the consumed amount. | Skips non-positive total lines; under-consumption returns ErrInvoiceLineCreditsNotConsumedFully. TODO marks this for deprecation once charge line mappers own credit projection. | +| `discountpercentage.go` | DiscountPercentage applies a rate-card percentage to each line's TotalAmount; requires a non-empty CorrelationID. | Validates percentage in [0,100]; empty CorrelationID errors. Uses slicesx.MapWithErr. | +| `discountusage.go` | DiscountUsage PreCalculationMutator + exported ApplyUsageDiscount (shared by standard billing and charge line projection) that subtracts discounted quantity from usage and records UsageLineDiscountManaged. | Explicitly non-idempotent — it mutates the usage-based line; removeRateCardUsageDiscounts must clear prior rate-card usage discounts each run to avoid drift. | + +## Anti-Patterns + +- Making the usage-discount mutator stateful/assuming idempotency — it rewrites the usage line and must re-sync discounts every run. +- Computing discounts/credits with float math instead of CurrencyCalculator.RoundToPrecision. +- Emitting a min-spend line on a non-last split line, or for the split period instead of FullProgressivelyBilledServicePeriod. +- Silently dropping leftover credit instead of returning ErrInvoiceLineCreditsNotConsumedFully. +- Overwriting AmountDiscounts/CreditsApplied/StandardLineDiscounts slices instead of appending with a stable ChildUniqueReferenceID. + +## Decisions + +- **Pre vs Post calculation mutator split.** — Usage discounts must alter the quantity fed into pricers (pre), while commitments, percentage discounts and credits act on already-priced detailed lines (post). +- **ApplyUsageDiscount exported as a standalone function with explicit input/result structs.** — The usage-discount contract is shared between standard billing and charge line projection, so it lives outside the mutator method to be reused without the PricerCalculateInput wrapper. + +## Example: Implement a post-calculation commitment mutator + +``` +package mutator + +import ( + "fmt" + + "github.com/alpacahq/alpacadecimal" + + "github.com/openmeterio/openmeter/openmeter/billing/models/stddetailedline" + "github.com/openmeterio/openmeter/openmeter/billing/rating" + "github.com/openmeterio/openmeter/openmeter/billing/rating/service/rate" + "github.com/openmeterio/openmeter/openmeter/productcatalog" +) + +type MinAmountCommitment struct{} + +// ... +``` + + diff --git a/openmeter/billing/rating/service/rate/CLAUDE.md b/openmeter/billing/rating/service/rate/CLAUDE.md new file mode 100644 index 0000000000..0364324791 --- /dev/null +++ b/openmeter/billing/rating/service/rate/CLAUDE.md @@ -0,0 +1,64 @@ +# rate + + + +> The pricing engine's per-price-type strategy layer: each price model (Flat, Unit, Package, Dynamic, VolumeTiered, GraduatedTiered) is a Pricer that turns a billed line + usage into rating.DetailedLines. Constraint: all monetary math goes through alpacadecimal + currencyx.Calculator.RoundToPrecision, never float arithmetic. + +## Patterns + +**Pricer interface contract** — Every price-type struct implements rate.Pricer (GenerateDetailedLines + ResolveBillablePeriod) and asserts it with a compile-time check. (`type Flat struct{}; var _ Pricer = (*Flat)(nil)`) +**Embed a billable-period mixin** — Metered pricers embed ProgressiveBillingMeteredPricer; non-progressive ones embed NonProgressiveBillingPricer (from base.go) to inherit ResolveBillablePeriod instead of re-implementing it. Flat overrides it inline. (`type Dynamic struct { ProgressiveBillingMeteredPricer }`) +**Convert price via As* before use** — Always extract the concrete price with l.GetPrice().AsFlat()/AsUnit()/AsTiered()/AsDynamic()/AsPackage() and wrap the error with fmt.Errorf; never type-assert the price union directly. (`flatPrice, err := l.GetPrice().AsFlat(); if err != nil { return nil, fmt.Errorf("converting price to flat price: %w", err) }`) +**Stable ChildUniqueReferenceID per line** — Every emitted DetailedLine sets a ChildUniqueReferenceID from rating constants (UsageChildUniqueReferenceID, FlatPriceChildUniqueReferenceID, GraduatedTieredPriceUsageChildUniqueReferenceID fmt'd with tier index) so re-calculation is idempotent and lines can be matched across runs. (`ChildUniqueReferenceID: fmt.Sprintf(rating.GraduatedTieredPriceUsageChildUniqueReferenceID, tierIndex)`) +**Period position gates emission** — Use l.IsFirstInPeriod()/IsLastInPeriod() (from PricerCalculateInput in types.go) to decide whether to emit: in-advance flat bills only first-in-period, in-arrears only last; volume tiered returns nil unless IsLastInPeriod (no progressive support). (`case flatPrice.PaymentTerm == productcatalog.InArrearsPaymentTerm && l.IsLastInPeriod():`) +**Truncate to streaming minimum window** — All period/asOf comparisons in ResolveBillablePeriod truncate to streaming.MinimumWindowSizeDuration so partial-window usage isn't billed prematurely. (`asOf := in.AsOf.Truncate(streaming.MinimumWindowSizeDuration)`) +**Return nil for no-line outcome** — When nothing should be billed (no usage, wrong period position) return (nil, nil) rather than an empty slice; tests treat nil and empty DetailedLines as equivalent. (`if !toBeBilledPackages.IsZero() { return rating.DetailedLines{...}, nil }; return nil, nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `types.go` | Defines Pricer interface, PricerCalculateInput (embeds rating.StandardLineAccessor + CurrencyCalculator + Usage + FullProgressivelyBilledServicePeriod) and its IsFirst/IsLastInPeriod/GetUsage helpers. | GetUsage errors if Usage is nil — callers must ensure usage is populated before calling pricers. | +| `base.go` | ProgressiveBillingMeteredPricer and NonProgressiveBillingPricer ResolveBillablePeriod implementations shared by embedding. | NonProgressiveBillingPricer rejects lines with a SplitLineGroupID via ErrInvoiceProgressiveBillingNotSupported — splitting a non-progressive price is invalid. | +| `tiered.go` | Tiered is a router that dispatches to volume vs graduated based on price.Mode; not a pricer itself beyond delegation. | Unknown price.Mode returns an error — keep the switch exhaustive when adding tier modes. | +| `tieredgraduated.go` | GraduatedTiered plus the TieredPriceCalculator range-splitting algorithm (TierRange, splitTierRangeAtBoundary) used to bill usage across tier boundaries. | The algorithm builds non-overlapping sorted qtyRanges; FromQty is exclusive, ToQty inclusive. Flat-per-tier only billed AtTierBoundary. | +| `tieredvolume.go` | VolumeTiered prices the whole quantity at the single tier it lands in; embeds NonProgressiveBillingPricer. | Returns nil unless IsLastInPeriod — volume tiers have no progressive-billing support. | +| `flat.go` | Flat price; the only pricer that overrides ResolveBillablePeriod inline using GetInvoiceAt vs AsOf. | Defaults empty PaymentTerm to DefaultPaymentTerm and validates it is InAdvance/InArrears, else ValidationError. | +| `package.go` | Package pricing; GetNumberOfPackages ceils qty/packageSize and diffs pre vs post-line package counts to bill only newly-crossed packages. | preLinePeriodPackages is zeroed when IsFirstInPeriod so the first line bills all packages. | +| `dynamic.go` | Dynamic price multiplies usage.Quantity by Multiplier; single usage line in arrears. | Only emits when usage.Quantity.IsPositive(); min-spend handling lives in the mutator layer, not here. | + +## Anti-Patterns + +- Doing float64 or raw decimal arithmetic instead of routing through l.CurrencyCalculator.RoundToPrecision. +- Type-asserting the price union directly instead of using GetPrice().As*() with a wrapped error. +- Hardcoding ChildUniqueReferenceID strings instead of using rating package constants — breaks line re-matching/idempotency. +- Applying commitments, max-spend, discounts or credits here — those belong to the mutator layer; pricers only produce raw priced lines. +- Emitting lines without checking IsFirst/IsLastInPeriod, double-billing flat fees across split lines. + +## Decisions + +- **Period-resolution split into Progressive vs NonProgressive mixins embedded by each pricer.** — Billable-period semantics differ only by progressive-billing support, so shared behavior is composed via embedding rather than duplicated per price type. +- **Graduated tiering implemented as an explicit range-splitting algorithm with AtTierBoundary flags.** — Progressive (split) billing must bill flat-per-tier exactly once and unit prices only for the in-scope sub-range; the explicit ranges make this auditable even though it is not the most efficient algorithm (see code comment). + +## Example: Add a new price-type pricer + +``` +package rate + +import ( + "fmt" + + "github.com/openmeterio/openmeter/openmeter/billing/rating" + "github.com/openmeterio/openmeter/openmeter/productcatalog" +) + +type Unit struct{ ProgressiveBillingMeteredPricer } + +var _ Pricer = (*Unit)(nil) + +func (p Unit) GenerateDetailedLines(l PricerCalculateInput) (rating.DetailedLines, error) { + unitPrice, err := l.GetPrice().AsUnit() +// ... +``` + + diff --git a/openmeter/billing/rating/service/testutil/CLAUDE.md b/openmeter/billing/rating/service/testutil/CLAUDE.md new file mode 100644 index 0000000000..2e8d136788 --- /dev/null +++ b/openmeter/billing/rating/service/testutil/CLAUDE.md @@ -0,0 +1,30 @@ +# testutil + + + +> Shared table-driven test harness for the rating pricers and mutators. Constraint: tests assert through the real production path (service.New().GenerateDetailedLines) against a hand-built billing.StandardLine fixture, comparing expected vs actual via require.JSONEq. + +## Patterns + +**CalculationTestCase + RunCalculationTestCase** — Every rate/mutator test builds a CalculationTestCase (Price, Discounts, LineMode, Usage, Expect, ExpectErrorIs, PreviousBilledAmount, CreditsApplied, Options) and calls testutil.RunCalculationTestCase(t, tc). (`testutil.RunCalculationTestCase(t, testutil.CalculationTestCase{ Price: ..., LineMode: testutil.SinglePerPeriodLineMode, Usage: ..., Expect: rating.DetailedLines{...} })`) +**LineMode selects split scenario** — TestLineMode (SinglePerPeriodLineMode / MidPeriodSplitLineMode / LastInPeriodSplitLineMode) configures line.Period and, for split modes, attaches a fake SplitLineGroup + SplitLineHierarchy so first/last-in-period logic is exercised. (`LineMode: testutil.LastInPeriodSplitLineMode`) +**Usage set via both raw and metered fields** — Usage.LinePeriodQty/PreLinePeriodQty are assigned to both Quantity/MeteredQuantity and PreLinePeriodQuantity/MeteredPreLinePeriodQuantity on UsageBased to mirror real snapshots. (`line.UsageBased.Quantity = &tc.Usage.LinePeriodQty; line.UsageBased.MeteredQuantity = &tc.Usage.LinePeriodQty`) +**JSON equality assertion** — Expected and actual DetailedLines are marshaled and compared with require.JSONEq; empty/nil results short-circuit to pass. PreviousBilledAmount is injected via a fake prior line in the SplitLineHierarchy. (`require.JSONEq(t, string(expectJSON), string(resJSON))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ubptest.go` | Sole file: TestLineMode constants, TestFullPeriod (fixed 2021-01-01..02), FeatureUsageResponse, CalculationTestCase, and RunCalculationTestCase harness driving service.New().GenerateDetailedLines. | PreviousBilledAmount is modeled as a fake line in fakeHierarchy with no Period so it is always in scope for NetAmount; ExpectErrorIs uses require.ErrorIs and returns early. | + +## Anti-Patterns + +- Calling individual pricers/mutators directly in tests instead of going through RunCalculationTestCase / service.New() — bypasses the real engine ordering. +- Asserting on struct equality of decimals instead of relying on the JSONEq comparison the harness performs. +- Setting only Quantity without MeteredQuantity (or only the non-metered field) — both must be set to match production snapshots. + +## Decisions + +- **Drive every pricer/mutator test through the assembled production service rather than unit-isolating each strategy.** — Pricing correctness depends on engine ordering (pricer then mutators) and split/period state, so the harness exercises the full GenerateDetailedLines path with a realistic StandardLine fixture. + + diff --git a/openmeter/billing/service/invoicecalc/CLAUDE.md b/openmeter/billing/service/invoicecalc/CLAUDE.md new file mode 100644 index 0000000000..f9e71c4780 --- /dev/null +++ b/openmeter/billing/service/invoicecalc/CLAUDE.md @@ -0,0 +1,65 @@ +# invoicecalc + + + +> Pure, stateless calculation pipeline for billing invoices. Each calculation is a free function that mutates a *billing.StandardInvoice or *billing.GatheringInvoice in place; the Calculator interface runs ordered lists of them to derive collection/draft/due dates, recalculate detailed lines and totals, stamp tax codes, and resolve service periods. + +## Patterns + +**Calculations are free functions, registered in an ordered list** — Every calculation is a package-level func that takes an invoice pointer (and optionally a deps struct) and returns error. New calculations must be added to the appropriate slice in the InvoiceCalculations var (Invoice, GatheringInvoice, or GatheringInvoiceWithLiveData) — order matters because later steps depend on earlier results (e.g. CalculateDueAt reads DraftUntil set by CalculateDraftUntil). (`func CalculateDueAt(i *billing.StandardInvoice) error { ... } registered via WithNoDependencies(CalculateDueAt) in InvoiceCalculations.Invoice`) +**Dependency adapter wrappers** — Calculations that need no deps are wrapped with WithNoDependencies (standard) or WithNoGatheringDependencies (gathering) to adapt a func(inv) error into the StandardInvoiceCalculation / GatheringInvoiceCalculation signature. Calculations needing rating/tax/line-engine data take StandardInvoiceCalculatorDependencies directly. (`WithNoDependencies(CalculateDraftUntil)`) +**In-place mutation, never construct new invoices** — Calculations mutate the passed invoice pointer's fields (i.CollectionAt, i.DueAt, invoice.Totals, invoice.Period, line.TaxConfig) rather than returning a new value. Lines are read via invoice.Lines.OrEmpty()/IsPresent()/IsAbsent() and must be expanded — most calculations return errors.New("lines must be expanded") when they are not. (`i.CollectionAt = lo.ToPtr(collectionAt)`) +**Errors are joined, not short-circuited; merged into ValidationIssues** — calculator.applyCalculations runs ALL standard calculations and errors.Join-s their errors, then folds the joined error into the invoice via invoice.MergeValidationIssues(billing.ValidationWithComponent(billing.ValidationComponentOpenMeter, outErr), ...). Gathering invoices have no ValidationIssues so CalculateGatheringInvoice just returns errors.Join(errs...). (`return invoice.MergeValidationIssues(billing.ValidationWithComponent(billing.ValidationComponentOpenMeter, outErr), billing.ValidationComponentOpenMeter)`) +**Deleted lines are always skipped** — Every line-iterating calculation filters out lines where DeletedAt != nil (or line.IsDeleted()) before contributing to collection-at, totals, or period. Deleted lines contribute totals.Totals{} to the sum. (`if line.DeletedAt != nil { return totals.Totals{} }`) +**Line-engine delegation for detailed-line recalculation** — RecalculateDetailedLinesAndTotals groups lines by line.Engine, resolves each via deps.LineEngines.Get(type), and only recalculates engines that implement billing.LineCalculator (type-assert, skip otherwise). It validates CalculateLinesInput, the output, and billing.ValidateStandardLineIDsMatchExactly before invoice.Lines.ReplaceLinesByID, then re-sums totals. (`lineCalculator, ok := lineEngine.(billing.LineCalculator); if !ok { continue }`) +**Tax codes pre-resolved into a map, never queried here** — TaxCodes is a map[string]taxcode.TaxCode keyed by Stripe code, built by the caller before the calculator runs so SnapshotTaxConfigIntoLines stamps TaxCodeID + entity in one pass without DB access. The package does no I/O. (`tc, ok := deps.TaxCodes.Get(line.TaxConfig.Stripe.Code)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `calculator.go` | Defines the Calculator interface, the StandardInvoiceCalculation/GatheringInvoiceCalculation func types, the InvoiceCalculations registry of ordered pipelines, the deps structs, LineEngineResolver, TaxCodes map, and the WithNoDependencies/WithNoGatheringDependencies adapters. New(): Calculator returns the real impl. | Adding a calculation requires registering it in the correct InvoiceCalculations slice and in the right order; GatheringInvoiceWithLiveData runs against a *StandardInvoice but must be a gathering-status invoice (guarded by a status check). | +| `collectionat.go` | GatheringInvoiceCollectionAt (earliest InvoiceAt, anchored vs subscription alignment via timeutil recurrence) and StandardInvoiceCollectionAt (latest InvoiceAt of non-deleted metered lines + collection interval, honoring per-line OverrideCollectionPeriodEnd). | StandardInvoiceCollectionAt only considers lines where line.DependsOnMeteredQuantity() — flat-fee lines are ignored. Returns nil CollectionAt when no metered lines. | +| `details.go` | RecalculateDetailedLinesAndTotals (line-engine delegation + totals.Sum), newDetailedLines (maps rating.DetailedLine -> billing.DetailedLine, defaulting Category to stddetailedline.CategoryRegular and PaymentTerm to InArrears), and MergeGeneratedDetailedLines (persists rating.GenerateDetailedLinesResult onto a parent line with ID reuse). | Each generated/mapped detailed line is Validate()-d; ReplaceLinesByID requires IDs to match exactly (ValidateStandardLineIDsMatchExactly). MergeGeneratedDetailedLines assigns sequential Index via DetailedLinesWithIDReuse. | +| `taxconfig.go` | SnapshotTaxConfigIntoLines merges invoice DefaultTaxConfig into each line (billing.MergeTaxConfigs(billing.FromProductCatalog(...), line.TaxConfig)) and stamps resolved TaxCodeID + TaxCode entity from deps.TaxCodes. | No-op for gathering invoices (StandardInvoiceStatusGathering). Line stripe code wins over DefaultTaxConfig. Existing TaxCodeID is preserved; only TaxCode entity is always (re)stamped. billing.TaxConfig.Equal is ID-only for TaxCode but DOES detect nil-vs-stamped so the adapter re-upserts. | +| `draftuntil.go` | CalculateDraftUntil — DraftUntil = max(CollectionAt, CreatedAt) + DraftPeriod, only when Invoicing.AutoAdvance is true (else nil). | Nils DraftUntil when AutoAdvance is off; CalculateDueAt depends on DraftUntil so ordering matters. | +| `dueat.go` | CalculateDueAt — auto-advance path adds DueAfter to DraftUntil; manual path adds DueAfter to IssuedAt. Result truncated to seconds (Stripe precision). | Returns early (leaves DueAt unset) when DraftUntil is nil (auto) or IssuedAt is nil (manual). | +| `period.go` | CalculateStandardInvoiceServicePeriod / CalculateGatheringInvoiceServicePeriod — span min From / max To across non-deleted lines (StandardLine uses line.Period, GatheringLine uses line.ServicePeriod). | Standard sets invoice.Period to a *ClosedPeriod (nil when no lines); gathering sets invoice.ServicePeriod to a value ClosedPeriod. | +| `mock.go` | MockableInvoiceCalculator wraps an upstream Calculator; EnableMock/DisableMock inject errors via OnCalculate/OnCalculateGatheringInvoice(WithLiveData). Used in tests to simulate calculation failures merged as ValidationIssues. | Mock replays the same MergeValidationIssues wrapping as the real Calculate so injected errors surface as ValidationComponentOpenMeter issues; AssertExpectations fails if a set expectation was never called. | + +## Anti-Patterns + +- Performing DB / network I/O inside a calculation — all data (rating, tax codes, line engines) must arrive via the deps struct; the package is pure and stateless. +- Returning early on the first error in the standard pipeline — applyCalculations joins all errors and folds them into the invoice's ValidationIssues; do not short-circuit. +- Including deleted lines (DeletedAt != nil) in collection-at, totals, or period computations. +- Adding a calculation without registering it in the correct InvoiceCalculations slice, or registering in an order that breaks a downstream dependency (e.g. DueAt before DraftUntil). +- Constructing a new invoice/line instead of mutating the passed pointer, or reading lines without checking IsPresent()/IsAbsent() (operating on unexpanded lines). + +## Decisions + +- **Calculations are independent free functions registered in ordered slices rather than methods on a stateful service.** — Keeps each step unit-testable in isolation (see collectionat_test.go, taxconfig_test.go) and makes the full pipeline composition explicit and reorderable in calculator.go. +- **Tax codes and feature meters are pre-resolved into maps passed via StandardInvoiceCalculatorDependencies.** — Lets the calculator stay pure/side-effect-free and stamp all lines in a single in-memory pass without per-line DB lookups; the caller batches resolution upfront. +- **Three distinct pipelines (Invoice, GatheringInvoice, GatheringInvoiceWithLiveData) instead of one.** — Gathering invoices have no ValidationIssues and a different line model (GatheringLine), while live-data gathering reuses standard-invoice calculations to populate detailed line previews — each needs a tailored ordered set. + +## Example: Adding a new standard-invoice calculation that mutates the invoice and registering it in the pipeline + +``` +package invoicecalc + +import ( + "github.com/samber/lo" + "github.com/openmeterio/openmeter/openmeter/billing" +) + +// CalculateDraftUntil mutates the invoice in place and returns an error only on real failure. +func CalculateDraftUntil(i *billing.StandardInvoice) error { + if !i.Workflow.Config.Invoicing.AutoAdvance { + i.DraftUntil = nil + return nil + } + collectionAt := lo.Latest(lo.FromPtrOr(i.CollectionAt, i.CreatedAt), i.CreatedAt) + draftUntil, _ := i.Workflow.Config.Invoicing.DraftPeriod.AddTo(collectionAt) +// ... +``` + + diff --git a/openmeter/billing/testutils/CLAUDE.md b/openmeter/billing/testutils/CLAUDE.md new file mode 100644 index 0000000000..4d1657fd57 --- /dev/null +++ b/openmeter/billing/testutils/CLAUDE.md @@ -0,0 +1,28 @@ +# testutils + + + +> Shared test doubles for the billing domain. Currently provides NoopLineEngine, a no-op billing.LineEngine for embedding in line-engine fakes; it deliberately does NOT implement billing.LineCalculator. + +## Patterns + +**Noop engine implementing every hook** — NoopLineEngine satisfies var _ billing.LineEngine and returns pass-through results (input.Lines, nil) for every lifecycle hook; Build* methods just call input.GatheringLines.ToStandardLines(input.Invoice.ID). (`func (NoopLineEngine) OnCollectionCompleted(_ context.Context, input billing.OnCollectionCompletedInput) (billing.StandardLines, error) { return input.Lines, nil }`) +**Required EngineType via panic** — GetLineEngineType panics when EngineType is the empty string — tests must set NoopLineEngine{EngineType: ...}. Panic is acceptable here because it is test-only code. (`func (e NoopLineEngine) GetLineEngineType() billing.LineEngineType { if e.EngineType == "" { panic("engine type is required") }; return e.EngineType }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `lineengine.go` | NoopLineEngine struct + all billing.LineEngine hook implementations | Intentionally omits LineCalculator (BuildStandardInvoiceLines exists but CalculateLines does not); embed it and add the calculator separately when a fake needs calculation | + +## Anti-Patterns + +- Importing application wiring (app/common) into test helpers here — keep testutils dependent only on openmeter/billing +- Assuming NoopLineEngine implements billing.LineCalculator +- Using NoopLineEngine without setting EngineType (panics on GetLineEngineType) + +## Decisions + +- **Noop engine is a struct with an exported EngineType field rather than a constructor** — Lets tests pick the engine type inline and embed the noop in larger fakes that override only specific hooks + + diff --git a/openmeter/billing/validators/customer/CLAUDE.md b/openmeter/billing/validators/customer/CLAUDE.md new file mode 100644 index 0000000000..d0b9300815 --- /dev/null +++ b/openmeter/billing/validators/customer/CLAUDE.md @@ -0,0 +1,50 @@ +# customer + + + +> Cross-domain guard that hooks into the customer domain's request-validation pipeline to block deletion of a customer while any of its invoices are still gathering or non-final. Implements customer.RequestValidator by embedding customer.NoopRequestValidator and overriding only ValidateDeleteCustomer. + +## Patterns + +**RequestValidator via Noop embedding** — Validator embeds customer.NoopRequestValidator and overrides only the hooks it cares about; a compile-time assertion enforces interface conformance. (`var _ customer.RequestValidator = (*Validator)(nil); type Validator struct { customer.NoopRequestValidator; ... }`) +**Constructor nil-checks injected services** — NewValidator returns (*Validator, error) and fails fast with fmt.Errorf when billingService or syncService is nil instead of panicking. (`if billingService == nil { return nil, fmt.Errorf("billing service is required") }`) +**Sync-then-check invoice state** — Before listing invoices, recently-active subscriptions are force-synced via syncService.SyncByID so gathering invoices reflect current target state; only then are invoice states asserted. (`v.syncService.SyncByID(ctx, sub.NamespacedID, time.Now())`) +**Aggregate validation errors with errors.Join** — Each blocking invoice appends to errs []error; the method returns errors.Join(errs...) rather than returning on the first offending invoice. (`errs = append(errs, fmt.Errorf("invoice %s is not in final state...", stdInvoice.ID)); return errors.Join(errs...)`) +**Invoice type discrimination via As* accessors** — Use inv.Type() against billing.InvoiceTypeGathering and the AsGatheringInvoice/AsStandardInvoice accessors rather than reading struct fields directly; gathering invoices with DeletedAt set are skipped. (`if inv.Type() == billing.InvoiceTypeGathering { g, _ := inv.AsGatheringInvoice() } else { s, _ := inv.AsStandardInvoice() }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `customer.go` | Sole file: defines Validator, NewValidator, and ValidateDeleteCustomer enforcing the all-invoices-final precondition for customer deletion. | The 24h watermark (time.Now().Add(-24*time.Hour)) gates which subscriptions get re-synced — subs that are inactive, deleted, or whose ActiveTo is older than the watermark are still synced via the ActiveTo==nil/DeletedAt!=nil/Before checks; changing this logic affects deletion correctness. Deleted gathering invoices (DeletedAt!=nil) are intentionally skipped, not blocking. | + +## Anti-Patterns + +- Returning early on the first non-final invoice instead of collecting all into errs and returning errors.Join — callers expect the full list of blockers. +- Skipping the subscriptionsync step before listing invoices — without it gathering invoices may be stale and deletion validation gives wrong results. +- Reading invoice fields directly instead of going through inv.Type()/AsGatheringInvoice/AsStandardInvoice. +- Constructing Validator literally instead of via NewValidator, bypassing the nil dependency guards. + +## Decisions + +- **Live in the billing module but implement a customer-domain interface (RequestValidator).** — The rule (no delete with open invoices) is a billing invariant but must fire inside the customer delete flow; placing it here keeps the billing dependency direction outward and wires in via customer's hook mechanism. + +## Example: Blocking customer deletion when invoices are not final + +``` +func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error { + if err := input.Validate(); err != nil { return err } + invoices, err := v.billingService.ListInvoices(ctx, billing.ListInvoicesInput{Namespaces: []string{input.Namespace}, Customers: []string{input.ID}}) + if err != nil { return err } + errs := make([]error, 0, len(invoices.Items)) + for _, inv := range invoices.Items { + if inv.Type() == billing.InvoiceTypeGathering { /* skip if deleted, else block */ } + stdInvoice, err := inv.AsStandardInvoice() + if err != nil { return err } + if !stdInvoice.Status.IsFinal() { errs = append(errs, fmt.Errorf("invoice %s is not in final state", stdInvoice.ID)) } + } + return errors.Join(errs...) +} +``` + + diff --git a/openmeter/billing/validators/subscription/CLAUDE.md b/openmeter/billing/validators/subscription/CLAUDE.md new file mode 100644 index 0000000000..c9597248a3 --- /dev/null +++ b/openmeter/billing/validators/subscription/CLAUDE.md @@ -0,0 +1,49 @@ +# subscription + + + +> Subscription command hook that, after a subscription is created or updated, validates the customer's billing setup is capable of invoicing whenever the subscription has billable (priced) ratecards. Implements subscription.SubscriptionCommandHook. + +## Patterns + +**SubscriptionCommandHook via NoOp embedding** — Validator embeds subscription.NoOpSubscriptionCommandHook and overrides only AfterCreate/AfterUpdate; NewValidator returns the interface type, not the concrete struct. (`type Validator struct { subscription.NoOpSubscriptionCommandHook; billingService billing.Service }; func NewValidator(...) (subscription.SubscriptionCommandHook, error)`) +**Skip validation when no billable items** — validateBillingSetup short-circuits via hasBillableItems(view), which walks view.Phases -> ItemsByKey -> items and returns true only if a ratecard's AsMeta().Price is non-nil. (`if !v.hasBillableItems(view) { return nil }`) +**Wrap validation failures as conflict errors** — AfterCreate/AfterUpdate wrap any billing-setup error in models.NewGenericConflictError so the API surfaces a 409-style conflict rather than a raw error. (`return models.NewGenericConflictError(fmt.Errorf("invalid billing setup: %w", err))`) +**Capability-based customer validation** — Resolves the customer's invoicing app via GetCustomerOverride (Expand Apps+Customer) and customerapp.AsCustomerApp, then calls ValidateCustomer requiring CalculateTax, InvoiceCustomers, and CollectPayments capabilities. (`customerApp.ValidateCustomer(ctx, customerProfile.Customer, []app.CapabilityType{app.CapabilityTypeCalculateTax, app.CapabilityTypeInvoiceCustomers, app.CapabilityTypeCollectPayments})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `validator.go` | Sole file: Validator, NewValidator, AfterCreate/AfterUpdate hooks, and the validateBillingSetup/hasBillableItems helpers. | The required capability set is hardcoded and commented as Stripe-only (CalculateTax + InvoiceCustomers + CollectPayments); adding payment providers means changing this list. AsCustomerApp failure is treated as should-not-happen but still propagated. Validator methods have value receivers (v Validator), so they must stay stateless. | + +## Anti-Patterns + +- Running ValidateCustomer for subscriptions without priced ratecards — hasBillableItems must gate it to avoid rejecting free subscriptions. +- Returning the raw billing error from AfterCreate/AfterUpdate instead of wrapping in models.NewGenericConflictError, losing the conflict semantics. +- Adding mutable fields and using value receivers — the hook is invoked as a value and must remain stateless. +- Bypassing GetCustomerOverride's Expand{Apps,Customer} when resolving the invoicing app, which would leave MergedProfile.Apps.Invoicing unpopulated. + +## Decisions + +- **Validate billing setup as a subscription AfterCreate/AfterUpdate hook rather than inside the subscription service.** — Keeps billing-specific capability checks out of the subscription core while still failing creation/update of subscriptions that cannot be billed for the customer's current provider setup. + +## Example: Validating a customer can be billed when a subscription has priced ratecards + +``` +func (v Validator) validateBillingSetup(ctx context.Context, view subscription.SubscriptionView) error { + if !v.hasBillableItems(view) { return nil } + customerProfile, err := v.billingService.GetCustomerOverride(ctx, billing.GetCustomerOverrideInput{ + Customer: customer.CustomerID{Namespace: view.Subscription.Namespace, ID: view.Subscription.CustomerId}, + Expand: billing.CustomerOverrideExpand{Apps: true, Customer: true}, + }) + if err != nil { return err } + customerApp, err := customerapp.AsCustomerApp(customerProfile.MergedProfile.Apps.Invoicing) + if err != nil { return err } + return customerApp.ValidateCustomer(ctx, customerProfile.Customer, []app.CapabilityType{ + app.CapabilityTypeCalculateTax, app.CapabilityTypeInvoiceCustomers, app.CapabilityTypeCollectPayments, + }) +} +``` + + diff --git a/openmeter/billing/worker/advance/CLAUDE.md b/openmeter/billing/worker/advance/CLAUDE.md new file mode 100644 index 0000000000..72f8f1f073 --- /dev/null +++ b/openmeter/billing/worker/advance/CLAUDE.md @@ -0,0 +1,30 @@ +# advance + + + +> Batch/cron driver (package billingworkeradvance) that finds standard invoices eligible for auto-advancement or collection and advances them concurrently. It is a thin orchestration layer over billing.Service.AdvanceInvoice — it owns no persistence and no state machine. + +## Patterns + +**Service-only dependency via Config + NewAdvancer** — AutoAdvancer wraps a single billing.Service plus a *slog.Logger. Construct via NewAdvancer(Config{...}) which nil-checks BillingService and Logger and returns an error; never build the struct literal directly. (`a, err := NewAdvancer(Config{BillingService: svc, Logger: log})`) +**Three-source candidate union** — ListInvoicesToAdvance composes ListInvoicesPendingAutoAdvance (DraftWaitingAutoApproval + DraftUntilLTE), ListInvoicesPendingCollection (DraftWaitingForCollection + CollectionAtLTE), and ListStuckInvoicesNeedingAdvance (HasAvailableAction=Advance, a fail-safe), then dedupes with lo.UniqBy on invoice.ID. (`lo.UniqBy(allInvoices, func(i billing.StandardInvoice) string { return i.ID })`) +**Concurrent per-batch fan-out with buffered errChan** — All() chunks invoices via lo.Chunk(batchSize), spawns a goroutine per invoice inside a sync.WaitGroup per batch, pushes each result to a buffered errChan, and joins via errors.Join after a sync.OnceFunc close. (`errChan := make(chan error, len(invoices)); closeErrChan := sync.OnceFunc(func(){ close(errChan) })`) +**ErrInvoiceCannotAdvance is swallowed, not failed** — AdvanceInvoice treats billing.ErrInvoiceCannotAdvance as benign: it re-fetches via GetStandardInvoiceById, logs a WarnContext with invoice id/namespace/status/draft_until, and returns nil error so the next run retries. (`if errors.Is(err, billing.ErrInvoiceCannotAdvance) { ... return invoice, nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `advance.go` | Entire package: AutoAdvancer struct, the four List* methods, AdvanceInvoice wrapper, All() batch runner, Config + NewAdvancer constructor. | All() reuses the loop variable `err` across goroutines (`_, err = a.AdvanceInvoice(...)`) — a known data-race shape; do not copy this pattern into new concurrent code, scope err inside the goroutine. Also the field is named `invoice` but holds a billing.Service, not an invoice. | + +## Anti-Patterns + +- Adding persistence/state-machine logic here — advancement transitions belong in billing.Service; this package only lists and dispatches. +- Treating ErrInvoiceCannotAdvance as a hard failure — it must remain a logged warning that returns nil so the cron retries. +- Constructing AutoAdvancer without NewAdvancer, bypassing the nil checks on BillingService/Logger. + +## Decisions + +- **Union three candidate queries (auto-approve, collection, stuck) instead of one.** — The HasAvailableAction=Advance query is an explicit fail-safe to recover invoices that got stuck in an advanceable state outside the normal time-based triggers. + + diff --git a/openmeter/billing/worker/asyncadvance/CLAUDE.md b/openmeter/billing/worker/asyncadvance/CLAUDE.md new file mode 100644 index 0000000000..08db97aa85 --- /dev/null +++ b/openmeter/billing/worker/asyncadvance/CLAUDE.md @@ -0,0 +1,29 @@ +# asyncadvance + + + +> Watermill/event consumer (package asyncadvance) for billing.AdvanceStandardInvoiceEvent. It synchronously advances one invoice per event by calling billing.Service.AdvanceInvoice, serving as the async counterpart to the batch advancer. + +## Patterns + +**Config.Validate guards against advancement-strategy infinite loop** — Config.Validate() requires Logger and BillingService non-nil AND asserts BillingService.GetAdvancementStrategy() == billing.ForegroundAdvancementStrategy — a background strategy would re-emit the same event and loop forever. (`if c.BillingService.GetAdvancementStrategy() != billing.ForegroundAdvancementStrategy { return errors.New("... infinite loop") }`) +**New() runs Validate before constructing Handler** — New(Config) calls c.Validate() and returns its error before building the Handler; never instantiate Handler directly. (`func New(c Config) (*Handler, error) { if err := c.Validate(); err != nil { return nil, err }; ... }`) +**Handle swallows ErrInvoiceCannotAdvance** — Handle returns nil (not an error) on billing.ErrInvoiceCannotAdvance, logging a WarnContext about a likely late/out-of-order message, so the consumer acks instead of redelivering forever. (`if errors.Is(err, billing.ErrInvoiceCannotAdvance) { h.logger.WarnContext(...); return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `asyncadvance.go` | Entire package: Handler struct, Config + Validate + New constructor, and Handle(ctx, *billing.AdvanceStandardInvoiceEvent). | The ForegroundAdvancementStrategy invariant in Validate is load-bearing — removing it lets the handler re-emit the event it is consuming and spin an infinite loop. Handle ignores the returned invoice (`_, err := ...`); the event only carries event.Invoice (an InvoiceID). | + +## Anti-Patterns + +- Wiring this handler with a BillingService that uses a non-foreground advancement strategy — Validate exists specifically to reject this. +- Returning an error on ErrInvoiceCannotAdvance — it would cause endless message redelivery for an invoice that legitimately cannot advance yet. +- Bypassing New() and building Handler directly, skipping the strategy validation. + +## Decisions + +- **Enforce ForegroundAdvancementStrategy at construction time.** — AdvanceInvoice under a background strategy would publish another AdvanceStandardInvoiceEvent, which this same handler consumes — Validate makes the loop unconstructable rather than relying on runtime caution. + + diff --git a/openmeter/billing/worker/collect/CLAUDE.md b/openmeter/billing/worker/collect/CLAUDE.md new file mode 100644 index 0000000000..c819dd9695 --- /dev/null +++ b/openmeter/billing/worker/collect/CLAUDE.md @@ -0,0 +1,34 @@ +# collect + + + +> Batch/cron driver (package billingworkercollect) that finds gathering invoices due for collection and converts each customer's pending lines into standard invoices via billing.Service.InvoicePendingLines. Mirrors the advance package's structure for the collection phase. + +## Patterns + +**Dual-service dependency via Config + NewInvoiceCollector** — InvoiceCollector holds a billing.GatheringInvoiceService (for listing/recalculating gathering invoices) and a billing.Service (for InvoicePendingLines), plus lockedNamespaces and a logger. Build only via NewInvoiceCollector, which nil-checks both services and the logger. (`c, err := NewInvoiceCollector(Config{GatheringInvoiceService: g, BillingService: s, Logger: l, LockedNamespaces: ns})`) +**Input structs with Validate()** — ListCollectableInvoicesInput and CollectCustomerInvoiceInput each have Validate() that collects into `var errs []error` and returns errors.Join(errs...); callers check it before doing work. (`if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid input: %w", err) }`) +**CollectionAt filter via pkg/filter Or(Lte || not-exists)** — ListCollectableInvoices builds billing.ListGatheringInvoicesInput.CollectionAt as a filter.FilterTime Or of {Lte: collectionAt} and {Exists: false}, so invoices with a nil NextCollectionAt are also picked up (and warn-logged). (`CollectionAt: filter.FilterTime{Or: &[]filter.FilterTime{{Lte: ...}, {Exists: lo.ToPtr(false)}}}`) +**Collection disables progressive billing** — CollectCustomerInvoice calls InvoicePendingLines with billing.WithPartialInvoiceLinesDisabled() so system-driven collection never produces partial/progressive invoices. (`a.billingService.InvoicePendingLines(ctx, in, billing.WithPartialInvoiceLinesDisabled())`) +**Sentinel-error recovery: locked namespace and no-lines** — ErrNamespaceLocked → warn and skip (return nil,nil); ErrInvoiceCreateNoLines → warn and call gatheringInvoices.RecalculateGatheringInvoices to repair inconsistent state, then return nil,nil. Other errors are wrapped and returned. (`if errors.Is(err, billing.ErrInvoiceCreateNoLines) { ...RecalculateGatheringInvoices(ctx, params.CustomerID)... }`) +**Per-customer concurrent fan-out skipping locked namespaces** — All() maps gathering invoices to customer.CustomerID, dedupes with lo.Uniq, filters out lockedNamespaces via slices.Contains, lo.Chunk(batchSize), then runs a goroutine-per-customer WaitGroup with a buffered errChan joined by errors.Join (same shape as the advance package). (`lo.Filter(lo.Uniq(customerIDs), func(id customer.CustomerID, _ int) bool { return !slices.Contains(a.lockedNamespaces, id.Namespace) })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `collect.go` | Entire package: InvoiceCollector, ListCollectableInvoices, CollectCustomerInvoice (per-customer line-to-invoice conversion with sentinel handling), All() batch runner, the two input structs + Validate, and Config + NewInvoiceCollector. | All() reuses the loop var `err` inside goroutines (`_, err = a.CollectCustomerInvoice(...)`) — same race shape as advance.go; scope err locally in new code. Locked namespaces are filtered in All() but CollectCustomerInvoice still re-checks ErrNamespaceLocked, so don't assume one guard suffices. WithPartialInvoiceLinesDisabled is mandatory for system collection. | + +## Anti-Patterns + +- Allowing progressive/partial invoice lines during system collection — omitting WithPartialInvoiceLinesDisabled changes billing semantics. +- Treating ErrInvoiceCreateNoLines as fatal instead of triggering RecalculateGatheringInvoices to repair state. +- Treating ErrNamespaceLocked as an error rather than a skip — locked namespaces must be quietly bypassed. +- Constructing InvoiceCollector directly instead of via NewInvoiceCollector, skipping the required-dependency nil checks. + +## Decisions + +- **Disable partial invoice lines for collection runs.** — Background collection should produce complete invoices, not the progressive/partial lines used in interactive billing flows. +- **Recalculate gathering invoices on ErrInvoiceCreateNoLines instead of erroring.** — A gathering invoice flagged for collection but yielding no lines signals inconsistent state; recalculation self-heals rather than failing the batch. + + diff --git a/openmeter/billing/worker/subscriptionsync/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/CLAUDE.md new file mode 100644 index 0000000000..fe260baa6c --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/CLAUDE.md @@ -0,0 +1,57 @@ +# subscriptionsync + + + +> The subscription→billing sync bridge package: defines the contracts that reconcile a subscription's billable target state into billing artifacts (invoice lines + charges) and persist per-subscription sync bookkeeping. The root holds only the public interfaces (service.go, adapter.go); service/ orchestrates, adapter/ persists, and reconciler/ drives the periodic re-sync loop. Primary constraint: this is a thin interface-defining package — concrete behavior lives in the child packages, all of which must honor the per-customer billing lock and the Plan-is-pure / Apply-is-the-only-writer split. + +## Patterns + +**Composed Service interface from three role interfaces** — Service embeds EventHandler + SyncService + SyncStateService; new public capabilities go onto the matching sub-interface, not a flat method list. EventHandler holds the event entrypoints (HandleCancelledEvent, HandleDeletedEvent, HandleSubscriptionSyncEvent, HandleInvoiceCreation), SyncService the imperative Sync* calls, SyncStateService the read-only GetSyncStates. (`type Service interface { EventHandler; SyncService; SyncStateService }`) +**Adapter = SyncStateAdapter + entutils.TxCreator** — The persistence contract is only the three sync-state ops (InvalidateSyncState, GetSyncStates, UpsertSyncState) plus the transaction-creator mixin; the adapter/ child implements it. Invoice/charge persistence never belongs on this Adapter — that flows through billing.Service. (`type Adapter interface { SyncStateAdapter; entutils.TxCreator }`) +**Input type aliases over wrapper structs** — Inputs reuse existing types via aliases (InvalidateSyncStateInput = models.NamespacedID, GetSyncStatesInput = []models.NamespacedID, UpsertSyncStateInput = SyncState) instead of new structs; Validate() lives on the aliased target (SyncState). (`type UpsertSyncStateInput = SyncState`) +**Validate() collects errors via errors.Join** — UpsertSyncStateInput.Validate appends each field issue to var errs []error and returns errors.Join(errs...) rather than returning on first failure — follow this when adding new input validators. (`var errs []error; if err := i.SubscriptionID.Validate(); err != nil { errs = append(errs, err) }; return errors.Join(errs...)`) +**DryRun via functional option** — Sync entrypoints take ...SynchronizeSubscriptionOption; EnableDryRun() sets SynchronizeSubscriptionOptions.DryRun. New sync knobs follow the same option-func shape, not extra method params. (`func EnableDryRun() SynchronizeSubscriptionOption { return func(o *SynchronizeSubscriptionOptions) { o.DryRun = true } }`) +**SyncState HasBillables⇒NextSyncAfter coupling invariant** — When HasBillables is true, NextSyncAfter must be non-nil; if set, NextSyncAfter must be non-zero. The reconciler relies on this pairing for cooldown gating — preserve it in any writer of SyncState. (`if i.HasBillables && i.NextSyncAfter == nil { errs = append(errs, errors.New("next sync after is required when the subscription has billables")) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Declares the package-public Service interface (composed of EventHandler, SyncService, SyncStateService) and the SynchronizeSubscriptionOption/EnableDryRun option type. Pure contract — no implementation. | Both SyncByView/SyncByID (option-aware) and the *AndInvoiceCustomer variants exist; the invoice-customer variants intentionally take no options — don't collapse them. Add new capability to the correct sub-interface, not a flat dump on Service. | +| `adapter.go` | Declares Adapter (SyncStateAdapter + entutils.TxCreator), the SyncState struct, the three input aliases, and UpsertSyncStateInput.Validate. | Keep scoped to sync-state bookkeeping only; invoice/line/charge persistence goes through billing.Service/Adapter. The HasBillables⇒NextSyncAfter invariant in Validate is load-bearing for reconciler cooldown. | + +## Anti-Patterns + +- Adding invoice-line or charge persistence methods to the Adapter interface — its only job is SubscriptionBillingSyncState bookkeeping; billing writes go through billing.Service. +- Flattening the composed Service interface or dropping a sub-interface (EventHandler/SyncService/SyncStateService) — callers and the event consumer depend on these roles. +- Writing SyncState with HasBillables=true but NextSyncAfter=nil (or zero) — violates Validate and silently breaks the reconciler's cooldown skip. +- Returning on the first validation error instead of collecting into errs and errors.Join — diverges from repo convention and hides field issues. +- Introducing a new input struct where a models.NamespacedID / SyncState alias already expresses the shape. + +## Decisions + +- **Keep the root package as interfaces + the SyncState DTO only; push orchestration to service/, persistence to adapter/, and the periodic loop to reconciler/.** — Lets the event-driven path and the reconciliation loop both depend on the same narrow contracts without import cycles, and keeps pure planning cleanly separable from writing. +- **Model sync bookkeeping as a dedicated SyncState (SubscriptionID, HasBillables, SyncedAt, NextSyncAfter) rather than deriving freshness from billing artifacts.** — The reconciler can cheaply skip up-to-date subscriptions via persisted HasBillables + NextSyncAfter cooldown instead of recomputing target state for every subscription each run. + +## Example: Defining the persistence contract and its validated input + +``` +type Adapter interface { + SyncStateAdapter + entutils.TxCreator +} + +type SyncState struct { + SubscriptionID models.NamespacedID + HasBillables bool + SyncedAt time.Time + NextSyncAfter *time.Time +} + +func (i UpsertSyncStateInput) Validate() error { + var errs []error + if err := i.SubscriptionID.Validate(); err != nil { +// ... +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/adapter/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/adapter/CLAUDE.md new file mode 100644 index 0000000000..a664a41932 --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/adapter/CLAUDE.md @@ -0,0 +1,52 @@ +# adapter + + + +> Ent-backed persistence adapter for the subscription→billing sync bridge; stores and reads per-subscription SubscriptionBillingSyncState (last sync time, billables flag, next-sync cooldown) used by the reconciler to skip up-to-date subscriptions. Implements subscriptionsync.Adapter and subscriptionsync.SyncStateAdapter. + +## Patterns + +**Config + Validate + New constructor** — Adapter is constructed via New(Config) returning the interface type; Config.Validate() collects errors into []error and returns errors.Join(errs...), requiring Client non-nil before constructing. (`func New(config Config) (subscriptionsync.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client}, nil }`) +**Transaction hijacking via Tx/WithTx/Self** — adapter implements the transaction.Repo-style contract: Tx hijacks via db.HijackTx wrapping the eDriver in entutils.NewTxDriver; WithTx rebinds db with entdb.NewTxClientFromRawConfig; Self returns the receiver. (`txCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false})`) +**TransactingRepo wrapping for all queries** — Every SyncStateAdapter method body is wrapped in entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the tx in ctx; the closure receives a tx-scoped *adapter and uses tx.db, never a.db. (`return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { ... tx.db.SubscriptionBillingSyncState... })`) +**Compile-time interface assertion** — syncstate.go asserts `var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)` so missing methods fail compilation. (`var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)`) +**FromDB mapping normalizes to UTC** — mapSyncStateFromDB converts every *entdb.SubscriptionBillingSyncState timestamp to .UTC() (SyncedAt and nillable NextSyncAfter) before returning the domain SyncState. (`SyncedAt: state.SyncedAt.UTC(), NextSyncAfter: lo.ToPtr(nextSyncAfter.UTC())`) +**Upsert via OnConflictColumns on (subscription_id, namespace)** — UpsertSyncState validates input, then Creates with OnConflictColumns(FieldSubscriptionID, FieldNamespace) + UpdateHasBillables/UpdateSyncedAt/UpdateNextSyncAfter, normalizing all times to UTC. (`OnConflictColumns(subscriptionbillingsyncstate.FieldSubscriptionID, subscriptionbillingsyncstate.FieldNamespace).UpdateHasBillables()...`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor and the Tx/WithTx/Self transaction-hijacking plumbing over *entdb.Client. | Tx uses ReadOnly:false — do not assume read-only; WithTx must rebind db from the raw tx config, not reuse a.db. | +| `syncstate.go` | SyncStateAdapter implementation: InvalidateSyncState (delete), GetSyncStates (batch OR-filter by namespaced IDs), UpsertSyncState (conflict upsert), and mapSyncStateFromDB. | GetSyncStates builds an OR over per-ID (SubscriptionID AND Namespace) predicates via lo.Map — always scope by both fields; always normalize times to UTC on read and write. | + +## Anti-Patterns + +- Querying with a.db directly inside a method instead of using the tx-scoped tx.db from TransactingRepo — breaks transaction correctness. +- Filtering SubscriptionBillingSyncState by SubscriptionID without also constraining Namespace — leaks across tenants. +- Returning non-UTC timestamps from FromDB mapping — downstream cooldown comparisons assume UTC. +- Adding a new SyncStateAdapter method without preserving the `var _ subscriptionsync.SyncStateAdapter = (*adapter)(nil)` assertion. + +## Decisions + +- **Persist sync state in a dedicated SubscriptionBillingSyncState table keyed by (subscription_id, namespace) with HasBillables and NextSyncAfter.** — Lets the reconciler cheaply skip subscriptions with no billables or still in cooldown rather than re-running full sync for every active subscription. +- **Use HijackTx + TransactingRepo rather than passing a tx client through arguments.** — Matches the repo-wide billing adapter convention so the adapter rebinds to a tx already carried in ctx, keeping helpers transaction-aware. + +## Example: Upsert sync state with conflict handling and UTC normalization + +``` +return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, tx *adapter) error { + nextSyncAfter := input.NextSyncAfter + if nextSyncAfter != nil { nextSyncAfter = lo.ToPtr(nextSyncAfter.UTC()) } + return tx.db.SubscriptionBillingSyncState.Create(). + SetHasBillables(input.HasBillables). + SetSyncedAt(input.SyncedAt.UTC()). + SetNillableNextSyncAfter(nextSyncAfter). + SetSubscriptionID(input.SubscriptionID.ID). + SetNamespace(input.SubscriptionID.Namespace). + OnConflictColumns(subscriptionbillingsyncstate.FieldSubscriptionID, subscriptionbillingsyncstate.FieldNamespace). + UpdateHasBillables().UpdateSyncedAt().UpdateNextSyncAfter().Exec(ctx) +}) +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/reconciler/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/reconciler/CLAUDE.md new file mode 100644 index 0000000000..a54854ba6f --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/reconciler/CLAUDE.md @@ -0,0 +1,52 @@ +# reconciler + + + +> Periodic reconciliation component that re-syncs subscription state into billing, compensating for the event-driven invoice pipeline when a processing error caused a subscription to stop syncing. Drives subscriptionsync.Service.SyncByID across active and deleted subscriptions. + +## Patterns + +**ReconcilerConfig + Validate + NewReconciler constructor** — Reconciler is built from ReconcilerConfig via NewReconciler; Validate() requires SubscriptionSync, SubscriptionService, CustomerService, and Logger all non-nil (returns first error). Logger is injected, never slog.Default(). (`func NewReconciler(config ReconcilerConfig) (*Reconciler, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Input struct with Validate per public method** — ReconcilerListSubscriptionsInput.Validate() enforces Lookback > 0; ListSubscriptions calls it before paging. (`if i.Lookback <= 0 { return errors.New("lookback must be greater than 0") }`) +**Two-pass paginated listing (active + deleted)** — ListSubscriptions pages with PageSize=defaultWindowSize(10_000) twice: first ActiveInPeriod over the lookback window, then a second pass with DeletedAt+IncludeDeleted to reconcile deleted subscriptions; each loop breaks when Items is empty. (`ActiveInPeriod: &timeutil.StartBoundedPeriod{From: clock.Now().Add(-in.Lookback), To: lo.ToPtr(clock.Now())}`) +**Join subscriptions with sync state via SliceToMap** — mapToSubscriptionWithSyncState fetches sync states by namespaced IDs, indexes them with lo.SliceToMap keyed on NamespacedID, and embeds an optional *SyncState pointer in SubscriptionWithSyncState (nil when no state exists). (`syncStatesBySubscriptionID := lo.SliceToMap(syncStates, func(s subscriptionsync.SyncState) (models.NamespacedID, subscriptionsync.SyncState) {...})`) +**Cooldown/skip gating in All, overridable by Force** — All() skips reconciliation when SyncState shows no billables, no NextSyncAfter, or NextSyncAfter in the future — unless ReconcilerAllInput.Force is set; per-subscription errors are accumulated with errors.Join and do not abort the loop. (`if subscription.SyncState.NextSyncAfter.After(clock.Now()) { ...skip... }`) +**clock package for time, not time.Now in loops** — Window boundaries and cooldown comparisons use pkg/clock (clock.Now()) so tests can freeze time; note ReconcileSubscription passes time.Now() to SyncByID. (`From: clock.Now().Add(-in.Lookback)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `reconciler.go` | Defines Reconciler + ReconcilerConfig, SubscriptionWithSyncState, ListSubscriptions (two-pass paging), mapToSubscriptionWithSyncState, ReconcileSubscription (delegates to SyncByID), and All (gated batch reconcile). | The deleted-subscription second pass exists because of a delete bug (comment dated 2026-05-19) and currently reconciles ALL deleted subscriptions ignoring lookback; All accumulates errors with errors.Join rather than failing fast; Force bypasses every skip guard. | + +## Anti-Patterns + +- Aborting the All() loop on the first per-subscription error instead of joining into outErr and continuing. +- Using time.Now() for window/cooldown logic instead of clock.Now(), which breaks frozen-time tests. +- Calling slog.Default() instead of the injected Logger. +- Removing or ignoring the SyncState skip guards (HasBillables / NextSyncAfter) without honoring the Force flag — would re-sync everything every run. +- Listing without paging to empty (PageSize defaultWindowSize loop) — would silently process only the first page. + +## Decisions + +- **Add a reconciliation loop on top of the event-driven invoice pipeline.** — Invoice creation is purely event driven; a processing error can leave a subscription stuck, so periodic reconciliation guarantees eventual convergence (see package doc comment on Reconciler). +- **Gate reconciliation on persisted SyncState (HasBillables + NextSyncAfter) unless Force.** — Avoids re-running expensive SyncByID for subscriptions with no billables or still within their cooldown window, keeping batch runs cheap. +- **Reconcile deleted subscriptions in a separate full pass.** — A historical delete bug left deleted subscriptions un-synced, so they must all be reconciled rather than only those active in the lookback window. + +## Example: Skip-gated batch reconciliation accumulating errors + +``` +for _, subscription := range subscriptions { + if !in.Force && subscription.SyncState != nil { + if !subscription.SyncState.HasBillables { continue } + if subscription.SyncState.NextSyncAfter == nil { continue } + if subscription.SyncState.NextSyncAfter.After(clock.Now()) { continue } + } + if err := r.ReconcileSubscription(ctx, subscription.NamespacedID); err != nil { + r.logger.ErrorContext(ctx, "failed to reconcile subscription", "error", err) + outErr = errors.Join(outErr, fmt.Errorf("failed to reconcile subscription: %w", err)) + } +} +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/service/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/service/CLAUDE.md new file mode 100644 index 0000000000..abcb7071f9 --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/service/CLAUDE.md @@ -0,0 +1,61 @@ +# service + + + +> Implements subscriptionsync.Service: the orchestration layer that synchronizes a subscription's billable state into billing artifacts (invoice lines + charges). It drives the load-persisted / build-target / repair / Plan / Apply pipeline under a per-customer billing lock and persists sync state. Primary constraint: every public sync entrypoint runs inside billingService.WithLock, reconciler.Plan stays pure, and reconciler.Apply is the only writer. + +## Patterns + +**Plan/Apply split via buildSyncPlan then reconciler.Apply** — synchronizeSubscription always calls buildSyncPlan (pure: loads persistedstate, builds targetstate, repairs charge refs, calls s.reconciler.Plan) and only writes through s.reconciler.Apply. No mutation happens during planning. (`linesDiff, err := s.buildSyncPlan(ctx, subs, subsView, asOf, customerDeletedAt, currency, options.DryRun); ... s.reconciler.Apply(ctx, reconciler.ApplyInput{DryRun: options.DryRun, Customer: customerID, Currency: currency, Plan: linesDiff})`) +**All sync work runs under withBillingLock** — The Plan->Apply->updateSyncState body of synchronizeSubscription executes inside withBillingLock(ctx, s, customerID, fn), which delegates to s.billingService.WithLock keyed on the customer. Never write billing/charge state outside this lock. (`return withBillingLock(ctx, s, customer.CustomerID{Namespace: subs.Namespace, ID: subs.CustomerId}, func(ctx context.Context) (*synchronizeSubscriptionResult, error) { ... })`) +**subscriptionReferenceOrView indirection** — Public entrypoints accept either a NamespacedID or a SubscriptionView; newSubscriptionReferenceOrView normalizes both (plus subscription.Subscription) into one ref type. Use AsSubscriptionView/AsNamespacedID/GetID rather than branching on raw types. (`func (s *Service) SyncByView(ctx, view, asOf, opts...) error { _, err := s.synchronizeSubscription(ctx, newSubscriptionReferenceOrView(view), asOf, opts...); return err }`) +**Config.Validate gates construction and delegates to reconciler.New** — New(Config) calls config.Validate() (BillingService, SubscriptionService, SubscriptionSyncAdapter, Logger, Tracer, FeatureGate all required) then builds the reconciler from FeatureFlags. ChargesService is optional (required only for credit-only / charge-based sync). (`if err := config.Validate(); err != nil { return nil, err }; reconcilerSvc, err := reconciler.New(reconciler.Config{BillingService: config.BillingService, ChargesService: config.ChargesService, EnableCreditThenInvoice: config.FeatureFlags.EnableCreditThenInvoice, CreditsFlag: config.FeatureFlags.CreditsFlag})`) +**tracex span wrapping on every operation** — Each meaningful method opens tracex.Start / tracex.StartWithNoValue and returns span.Wrap(func(ctx)...). buildSyncPlan, synchronizeSubscription, invoicePendingLines, updateSyncState all follow this; errors propagate up through Wrap rather than panicking. (`span := tracex.Start[*reconciler.Plan](ctx, s.tracer, "billing.worker.subscription.sync.buildSyncPlan"); return span.Wrap(func(ctx context.Context) (*reconciler.Plan, error) { ... })`) +**DryRun short-circuits before every write and state upsert** — options.DryRun (from SynchronizeSubscriptionOptions) is threaded into buildSyncPlan, reconciler.Apply, and returns before updateSyncState. Dry runs never call UpsertSyncState or persist charge item-id repairs. (`if options.DryRun { return res, nil } // returned before updateSyncState`) +**Sync-state persistence via updateSyncState** — After applying, updateSyncState upserts subscriptionsync sync state through the adapter: HasBillables drives scheduling, MaxGenerationTimeLimit becomes NextSyncAfter, and PreventFurtherSyncs forces HasBillables=false (used when the customer was deleted before subscription start). (`s.subscriptionSyncAdapter.UpsertSyncState(ctx, subscriptionsync.UpsertSyncStateInput{SubscriptionID: in.SubscriptionID, HasBillables: true, NextSyncAfter: lo.ToPtr(nextSyncAfter), SyncedAt: clock.Now().UTC()})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct, Config/FeatureFlags, New(), and the public Sync* entrypoints (SyncByView, SyncByID, SyncByViewAndInvoiceCustomer, SyncByIDAndInvoiceCustomer, GetSyncStates). Asserts var _ subscriptionsync.Service = (*Service)(nil). | ChargesService is nil-tolerant; repairChargeSubscriptionReferences and credit paths guard on it. Adding a required dep means updating Config.Validate. | +| `sync.go` | Core synchronizeSubscription / synchronizeSubscriptionAndInvoiceCustomer pipeline, withBillingLock, getSubscription (List with IncludeDeleted), updateSyncState, invoicePendingLines, and HandleSubscriptionSyncEvent. | Deleted subscriptions => subsView=nil (Plan must tolerate nil view). invoicePendingLines swallows billing.ErrInvoiceCreateNoLines; do not treat 'no lines' as failure. | +| `reconcile.go` | buildSyncPlan: wires persistedstate.NewLoader, targetstate.NewBuilder, repairChargeSubscriptionReferences, then reconciler.Plan. The single bridge from sub view + persisted state to a reconciler.Plan. | Order matters: repair runs AFTER target build and BEFORE Plan; the repaired persisted state is what is fed into Plan. | +| `repair.go` | repairChargeSubscriptionReferences: realigns persisted charges' subscription_item_id when subscription edits recreated the item row under the same logical (sub/phase/item/version) identity. Helpers WithSubscriptionItemID / UpdateSubscriptionItemID and persistedItemFromCharge. | Deliberately narrow: only subscription_item_id is mutated; subscription_id/phase_id mismatches are hard integrity errors. dryRun uses in-memory WithSubscriptionItemID; otherwise UpdateSubscriptionItemID persists. Carries a TODO to make item id immutable again. | +| `handlers.go` | Event handlers: HandleCancelledEvent, HandleInvoiceCreation (backfills the gathering invoice for affected subscriptions), HandleDeletedEvent. Thin wrappers over synchronizeSubscription*. | HandleInvoiceCreation uses clock.Now() (not the invoice time) as the sync reference to provision more lines if delayed; HandleCancelledEvent returns an error if event.Spec.ActiveTo is nil after a best-effort sync. | +| `ref.go` | subscriptionReferenceOrView value type + newSubscriptionReferenceOrView generic constructor (NamespacedID | SubscriptionView | Subscription) and accessors (Type, AsNamespacedID, AsSubscriptionView, GetID, Validate). | GetID/AsX return zero values or errors for the wrong reference type; always check Type() or handle the error rather than assuming a view is present. | +| `base_test.go` | SuiteBase test harness embedding billingtest.BaseSuite + SubscriptionMixin; builds the real adapter + Service, setupChargesService wires chargestestutils, and provides expectLines/assertCharges matchers. | afterTest resets featureFlags and MockStreamingConnector; enableProrating flips featureFlags directly. Tests drive behavior through SyncByView/SyncByViewAndInvoiceCustomer, not lower-level adapters. | +| `sync_credittheninvoice_test.go` | End-to-end CreditThenInvoice scenarios wiring a full ledger stack (ledgertestutils, ledgercollector, ledgerchargeadapter handlers) with FeatureFlags{EnableCreditThenInvoice:true, CreditsFlag:"billing_credits"}. | Requires EnsureBusinessAccounts + CreateCustomerAccounts in BeforeTest; credit-then-invoice charges route through usagebased charges, not plain invoice lines. | + +## Anti-Patterns + +- Writing billing or charge state outside withBillingLock / billingService.WithLock — breaks per-customer serialization across replicas. +- Mutating persisted billing artifacts inside buildSyncPlan or reconciler.Plan; planning must stay pure and only reconciler.Apply may write. +- Skipping the options.DryRun guards and calling UpsertSyncState / persisting charge item-id repairs during a dry run. +- Repairing more than subscription_item_id in repairChargeSubscriptionReferences, or swallowing a subscription_id/phase_id mismatch instead of returning the integrity error. +- Introducing context.Background()/time.Now() ad hoc instead of propagating ctx and using clock.Now(); panicking on a bad subscription/period instead of returning an error through span.Wrap. + +## Decisions + +- **Split planning (buildSyncPlan -> reconciler.Plan) from writing (reconciler.Apply), with persistedstate/targetstate as inputs.** — Lets sync be dry-runnable and keeps the diff logic deterministic and side-effect-free; the reconciler is the single mutation point so atomicity and DryRun are enforced in one place. +- **Identify billable items by logical path (sub/phase/item/version/period), not by subscription_items.id, and add a narrow repair step to realign concrete item ids.** — Subscription edits can soft-delete and recreate an item row for the same logical item; logical identity keeps reconciliation as update/shrink rather than delete+recreate, while repair keeps charge rows pointing at the live item id. +- **ChargesService is optional in Config; reconciler and repair guard on nil.** — Charge-based / credit-only sync (and the credits feature) can be disabled, so the same Service supports invoice-line-only deployments without charges wiring. + +## Example: buildSyncPlan: load persisted, build target, repair, then produce a pure reconciler.Plan + +``` +func (s *Service) buildSyncPlan(ctx context.Context, subs subscription.Subscription, subsView *subscription.SubscriptionView, asOf time.Time, customerDeletedAt *time.Time, currency currencyx.Calculator, dryRun bool) (*reconciler.Plan, error) { + span := tracex.Start[*reconciler.Plan](ctx, s.tracer, "billing.worker.subscription.sync.buildSyncPlan") + return span.Wrap(func(ctx context.Context) (*reconciler.Plan, error) { + persisted, err := persistedstate.NewLoader(s.billingService, s.chargesService).LoadForSubscription(ctx, subs) + if err != nil { return nil, err } + target, err := targetstate.NewBuilder(s.logger, s.tracer).Build(ctx, targetstate.BuildInput{AsOf: asOf, CustomerDeletedAt: customerDeletedAt, SubscriptionView: subsView, Persisted: persisted}) + if err != nil { return nil, err } + persisted, err = s.repairChargeSubscriptionReferences(ctx, persisted, target, dryRun) + if err != nil { return nil, err } + return s.reconciler.Plan(ctx, reconciler.PlanInput{SubscriptionSettlementMode: subs.SettlementMode, Currency: currency, Target: target, Persisted: persisted}) + }) +} +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/service/persistedstate/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/service/persistedstate/CLAUDE.md new file mode 100644 index 0000000000..f19992cfc0 --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/service/persistedstate/CLAUDE.md @@ -0,0 +1,37 @@ +# persistedstate + + + +> Loads the current persisted billing state for a subscription (invoice lines, split-line hierarchies, and charges) and wraps each as a uniform Item keyed by ChildUniqueReferenceID, so the subscription-sync reconciler can diff persisted state against target state. Primary constraint: every persisted entity is normalized to meter (MinimumWindowSizeDuration) precision on read. + +## Patterns + +**Uniform Item interface over heterogeneous backing types** — Invoice lines, split-line hierarchies, usage-based charges, and flat-fee charges all implement the Item interface (ID, Type, ChildUniqueReferenceID, ServicePeriod, IsSubscriptionManaged, HasLastLineAnnotation). New persisted-state kinds must add an ItemType constant and a private struct implementing Item, asserted via a `var _ Item = ...` block. (`var (\n\t_ Item = persistedLine{}\n\t_ LineGetter = persistedLine{}\n)`) +**Private constructors validate, public Item accessors never error** — Construction funcs (newPersistedLine, newPersistedUsageBasedCharge, etc.) are private and perform nil/Validate() checks so the Item methods can expose non-erroring accessors. Never expose a constructor publicly or skip the validation it performs. (`func newPersistedUsageBasedCharge(charge usagebased.Charge) (persistedUsageBasedCharge, error) {\n\tif err := charge.Validate(); err != nil { return persistedUsageBasedCharge{}, fmt.Errorf("usage based charge is invalid: %w", err) }\n\treturn persistedUsageBasedCharge{charge: charge}, nil\n}`) +**Typed downcast getters via ItemAs* helpers** — To recover a backing type from an Item, use the ItemAs* helpers (ItemAsLine, ItemAsSplitLineHierarchy, ItemAsUsageBasedCharge, ItemAsFlatFeeCharge), which type-assert against the matching *Getter interface and return a descriptive error from getErrorDetails(in). Never type-assert against the private structs directly. (`lineGetter, ok := in.(LineGetter)\nif !ok { return nil, fmt.Errorf("persisted item does not implement line getter: %s", getErrorDetails(in)) }`) +**Read-time normalization to meter precision** — normalizePersistedLineOrHierarchy and normalizeSubscriptionReference Truncate service periods, invoice-at, and subscription BillingPeriod to streaming.MinimumWindowSizeDuration on load, so reconciliation does not propose no-op repairs against legacy sub-second timestamps. Any new persisted field carrying a time MUST be normalized here. (`cloned.UpdateServicePeriod(func(period *timeutil.ClosedPeriod) {\n\t*period = period.Truncate(streaming.MinimumWindowSizeDuration)\n})`) +**Charge-managed lines loaded as charges, not lines** — LoadForSubscription requests lines with IncludeChargeManaged: false and separately calls chargeService.ListCharges, because charge-managed invoice lines are edited via charge patches. The two maps are merged with a duplicate-unique-id guard across lines and charges. (`GetLinesForSubscriptionInput{... IncludeChargeManaged: false}`) +**State keyed by ChildUniqueReferenceID with global uniqueness** — State.ByUniqueID maps the deterministic ChildUniqueReferenceID to its Item; items lacking a unique id are skipped, and duplicates (within lines, within charges, or across the two) are hard errors. State.Validate requires both ByUniqueID and Invoices to be non-nil. (`if _, ok := byUniqueID[*uniqueID]; ok { return State{}, fmt.Errorf("duplicate unique ids in the existing lines") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `item.go` | Defines ItemType constants, the Item interface plus per-kind getter interfaces (LineGetter, SplitLineHierarchyGetter, UsageBasedChargeGetter, FlatFeeChargeGetter), the four private backing structs, their private constructors, the ItemAs* downcasters, and the NewItemFromLineOrHierarchy / NewChargeItemFromChargeType factories. | SplitLineHierarchy delegates IsSubscriptionManaged/HasLastLineAnnotation to getLastLineForAnnotations (the child whose service-period end matches the group end and is not deleted); charge items read annotations directly off Intent.Annotations, not a child line. | +| `loader.go` | Loader struct over billingService (GetLinesForSubscription, ListInvoices) and chargeService (ListCharges) interfaces; LoadForSubscription assembles State, loadChargesForSubscription/loadInvoicesForSubscriptionLines fan out, normalizePersistedLineOrHierarchy normalizes precision on read. | chargeService may be nil (returns empty map). Credit-purchase charges tied to a subscription are an explicit hard error. Invoices are loaded with IncludeDeleted: true and every referenced invoice id must resolve or it errors. | +| `state.go` | State struct (ByUniqueID map[string]Item + Invoices) and Invoices map type with IsGatheringInvoice helper and Validate. | Invoices.IsGatheringInvoice errors when the invoice id is absent from state rather than returning false. | + +## Anti-Patterns + +- Exposing a public constructor for an Item backing type or skipping the nil/Validate() check it performs +- Type-asserting an Item directly to a private struct instead of using the ItemAs* getter helpers +- Reading a persisted time field without Truncate(streaming.MinimumWindowSizeDuration) normalization, causing endless no-op reconciliation +- Loading charge-managed lines as plain lines instead of via ListCharges (set IncludeChargeManaged: false) +- Reusing a ChildUniqueReferenceID across lines and charges (collisions are hard errors by design) + +## Decisions + +- **Wrap lines, hierarchies, and charges behind one Item interface keyed by unique reference id** — The reconciler diffs target vs persisted state purely by unique id and a small set of accessors, so it must not care whether the backing object is a line, a split-line group, or a charge. +- **Normalize timestamps to meter precision on read with a TODO to migrate the data** — Legacy rows persist ns precision the meter engine cannot query; normalizing on read prevents sync from perpetually proposing no-op timestamp repairs until a backfill migration lands. + + diff --git a/openmeter/billing/worker/subscriptionsync/service/reconciler/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/service/reconciler/CLAUDE.md new file mode 100644 index 0000000000..9a34aa870a --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/service/reconciler/CLAUDE.md @@ -0,0 +1,65 @@ +# reconciler + + + +> The planning side of the subscription->billing sync bridge: diffs subscription target state against persisted billing state and produces a Plan of invoice-line patches and charge patches, then applies it via billing.Service / charges.Service. It decides WHAT must change; the child invoiceupdater package executes invoice writes. Primary constraint: every diffed item must route to exactly one backend (invoice line, split-line hierarchy, flat-fee charge, or usage-based charge) and the chosen backend must stay consistent across runs. + +## Patterns + +**Reconciler = Plan then Apply** — Service.Plan(ctx, PlanInput) builds a *Plan (pure, no writes) and Service.Apply(ctx, ApplyInput) executes it. DryRun in ApplyInput logs patches via invoiceUpdater.LogPatches + logChargesPatches and returns without writing. (`plan, _ := s.Plan(ctx, PlanInput{Target: t, Persisted: p}); s.Apply(ctx, ApplyInput{Plan: plan, Customer: cid, Currency: cc})`) +**PatchCollection interface per backend** — Every backend collection implements PatchCollection (AddCreate/AddDelete/AddShrink/AddExtend/AddProrate + GetLineEngineType). diffItem dispatches one of these methods based on target/existing presence and period-end comparison. New backends must satisfy the full interface. (`func (c *flatFeeChargeCollection) AddShrink(_ string, existing persistedstate.Item, target targetstate.StateItem) error`) +**Router resolves the backend, not the diff** — patchCollectionRouter.GetCollectionFor(item) maps a persisted Item.Type() to its collection; ResolveDefaultCollection(target) picks the backend for a NEW target from settlement mode + credits gate + price type. Plan routes EXISTING items by item type, falling back to the default collection only for brand-new uniqueIDs (graceful invoice->charge migration). (`case persistedstate.ItemTypeChargeFlatFee: return c.flatFeeChargeCollection, nil`) +**diffItem create/delete/shrink/extend/prorate decision tree** — nil target + existing => AddDelete; target + nil existing => AddCreate; otherwise compare ServicePeriod.To: Before=>AddShrink, After=>AddExtend, equal=>no-op. Flat-fee invoice lines additionally use semanticProrateDecision (LineEngineTypeInvoice only) to emit AddProrate when amount or period drifts. (`case targetPeriod.To.Before(existingPeriod.To): return patches.AddShrink(target.UniqueID, existing, *target)`) +**Charge period changes: emulated replacement vs native patch by settlement mode** — In flat/usage charge collections, AddShrink/AddExtend emit a native chargesmeta.NewPatchShrink/NewPatchExtend ONLY when the existing charge's Intent.SettlementMode == CreditThenInvoiceSettlementMode; otherwise they call addEmulatedReplacement (delete patch + fresh create intent). AddProrate is unsupported for charges (returns unsupportedOperationError). (`if existingCharge.GetFlatFeeCharge().Intent.SettlementMode != productcatalog.CreditThenInvoiceSettlementMode { return c.addEmulatedReplacement(existing, intent) }`) +**filterInScopeLines before diffing** — Plan filters target items first: drops !IsBillable(); charge-backed targets pass on billability alone; invoice-backed targets are dropped when GetExpectedLine() returns nil. This makes non-billable/non-realizing targets behave as absent and reconcile to delete/no-op. (`if defaultCollection.GetLineEngineType().IsCharge() { out = append(out, line); continue }`) +**Config.Validate gates construction** — New(Config) requires non-nil BillingService, Logger, FeatureGate; ChargesService is required only when EnableCreditThenInvoice. CreditOnly settlement is rejected at Plan if chargesService is nil. Collections build via newPatchCollectionRouter whose config.Validate enforces capacity>0, invoices!=nil, featureGate!=nil. (`if c.EnableCreditThenInvoice && c.ChargesService == nil { return fmt.Errorf("charges service is required when credit then invoice is enabled") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `reconciler.go` | Public Reconciler interface, Service, Config, Plan/Apply, diffItem decision tree, filterInScopeLines. Owns create/delete/shrink/extend/prorate routing. | Plan routes existing items by GetCollectionFor (existing Item.Type) and only new uniqueIDs by ResolveDefaultCollection. Apply must apply invoice patches via invoiceUpdater BEFORE charge patches, and errors if ChargePatches non-empty while chargesService is nil. | +| `patch.go` | Patch/InvoicePatch/PatchCollection interfaces and patchCollectionRouter (holds the 4 backend collections + credits gating). CollectInvoicePatches / CollectChargePatches aggregate plan output. | ResolveDefaultCollection assumes price is non-nil (guaranteed by filterInScopeLines). isCreditsEnabled returns false when creditsEnabled is off; nil featureGate or empty creditsFlag => enabled. | +| `patchcharge.go` | chargePatchCollection base shared by flat/usage charge collections: addCreate/addPatch dedup by chargeID, addEmulatedReplacement (delete+create), newChargeIntentBaseFromTargetState builds chargesmeta.Intent from target state. | addPatch rejects duplicate chargeID; AddProrate is intentionally unsupported. newChargeIntentBaseFromTargetState clones Annotations/Metadata and sets ManagedBy=SubscriptionManagedLine + UniqueReferenceID=target.UniqueID. | +| `patchchargeflatfee.go` | flatFeeChargeCollection: AddCreate/AddShrink/AddExtend; newFlatFeeChargeIntent converts rate card price.AsFlat() into a chargesflatfee.Intent. | Shrink/Extend emit a native patch only for CreditThenInvoice settlement, else emulated replacement. existing must implement persistedstate.FlatFeeChargeGetter or it errors. | +| `patchchargeusagebased.go` | usageBasedChargeCollection: same create/shrink/extend shape for usage-based charges; newUsageBasedChargeIntent carries Price + Discounts. | existing must satisfy persistedstate.UsageBasedChargeGetter; settlement-mode branching mirrors flat fee. | +| `patchinvoiceline.go / patchinvoicelinehierarchy.go` | lineInvoicePatchCollection and lineHierarchyPatchCollection implement invoice-line and split-line-group diffs, emitting invoiceupdater.New*Patch. Hierarchy mutates child lines + updates the SplitLineGroup via ToUpdate(). | Both compile-time assert _ PatchCollection / _ InvoicePatchCollection. Hierarchy AddCreate/AddProrate are unsupported (error). Shrink/Extend assert target end strictly before/after existing end. ServicePeriod.Truncate(streaming.MinimumWindowSizeDuration).IsEmpty() => delete patch instead of update. | +| `patchhelpers.go` | shouldSkipLinePatch / shouldSkipHierarchyPatch (AnnotationSubscriptionSyncIgnore + SubscriptionManagedLine guards) and getPatchesForUpdateUsageBasedLine (clone, set service period, set invoice-at on gathering invoices). | Skips any line not managed by SubscriptionManagedLine or flagged AnnotationSubscriptionSyncIgnore. Returns nil (no-op) when nothing changed. | +| `prorate.go` | semanticProrateDecision: flat-fee-only proration decision comparing existing vs expected per-unit amount and service period; errors for split-line hierarchies. | Only meaningful for invoice flat-fee lines; returns empty decision (ShouldProrate=false) for usage-based/non-flat-fee. diffItem calls it only when LineEngineType==Invoice. | + +## Anti-Patterns + +- Diffing by target backend instead of existing item type: Plan must use GetCollectionFor(existing) for items already in persisted state and only fall back to ResolveDefaultCollection for brand-new uniqueIDs, or invoice->charge migrations break. +- Adding a charge AddProrate or a hierarchy AddCreate/AddProrate path: these are deliberately unsupported and return errors; period changes for charges must flow through shrink/extend. +- Emitting a native charge shrink/extend patch for a non-CreditThenInvoice charge: those must become an emulated delete+create replacement via addEmulatedReplacement. +- Mutating invoice lines directly here instead of producing invoiceupdater.Patch values (NewCreateLinePatch/NewUpdateLinePatch/NewDeleteLinePatch/NewUpdateSplitLineGroupPatch) for the invoiceupdater child to apply. +- Skipping the SubscriptionManagedLine / AnnotationSubscriptionSyncIgnore guards (shouldSkipLinePatch/shouldSkipHierarchyPatch) and patching customer-owned or sync-ignored lines. + +## Decisions + +- **Plan is pure and Apply is the only writer; DryRun logs instead of writing.** — Separating computation from side effects makes the diff deterministic and testable, and lets the worker preview drift (DryRun) before committing invoice/charge mutations. +- **A router selects one of four backend collections per item, gated by settlement mode + credits feature flag + price type.** — The same subscription item can be realized as an invoice line, a split-line hierarchy, or a flat/usage charge depending on credits/settlement config; routing keeps each artifact's lifecycle isolated and enables graceful migration between backends. +- **Charge period changes are emulated replacements except under CreditThenInvoice, and proration is delegated entirely to the charge domain.** — Only CreditThenInvoice charges expose native shrink/extend semantics; for other modes a delete+recreate keeps the charge state correct, and the charge stack recomputes effective amounts from updated periods so the reconciler never prorates charges itself. + +## Example: diffItem dispatching the correct PatchCollection method based on presence and period drift + +``` +func (s *Service) diffItem(target *targetstate.StateItem, existing persistedstate.Item, patches PatchCollection) error { + switch { + case target == nil && existing == nil: + return nil + case target == nil && existing != nil: + return patches.AddDelete(lo.FromPtr(existing.ChildUniqueReferenceID()), existing) + case target != nil && existing == nil: + return patches.AddCreate(*target) + } + existingPeriod := existing.ServicePeriod() + targetPeriod := target.GetServicePeriod() + if patches.GetLineEngineType() == billing.LineEngineTypeInvoice { + if decision, err := semanticProrateDecision(existing, *target); err != nil { + return err + } else if decision.ShouldProrate { +// ... +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/CLAUDE.md new file mode 100644 index 0000000000..d051cdb648 --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/service/reconciler/invoiceupdater/CLAUDE.md @@ -0,0 +1,59 @@ +# invoiceupdater + + + +> Applies the subscription-sync reconciler's computed drift (a slice of Patch) to billing artifacts: provisions new gathering lines, updates/deletes lines on gathering and mutable standard invoices, and records warning validation issues (rather than mutating) on immutable invoices. It is the write side of the subscription->billing sync bridge; the reconciler decides what should change, this package executes it via billing.Service. + +## Patterns + +**Tagged-union Patch with op-checked accessors** — Patch is a struct holding op PatchOperation plus one field per variant; never construct Patch literals directly outside this package. Build via NewCreateLinePatch/NewDeleteLinePatch/NewUpdateLinePatch/NewDeleteSplitLineGroupPatch/NewUpdateSplitLineGroupPatch, and read via AsXxxPatch() which errors unless p.op matches. (`patch := invoiceupdater.NewDeleteLinePatch(line.GetLineID(), line.GetInvoiceID()); create, err := patch.AsCreateLinePatch() // err unless op == PatchOpLineCreate`) +**parsePatches bucketing before any write** — ApplyPatches first calls parsePatches to split patches into patchesParsed{newLines, updatedLinesByInvoiceID (keyed by invoice ID -> invoicePatches{updatedLines, deletedLines}), splitLineGroups}. New code that adds a PatchOperation MUST add a case in both parsePatches and Patch.Log (default branches error/log-unknown). (`case PatchOpLineDelete: lineUpdates := parsed.updatedLinesByInvoiceID[deletePatch.InvoiceID]; lineUpdates.deletedLines = append(...); parsed.updatedLinesByInvoiceID[deletePatch.InvoiceID] = lineUpdates`) +**Invoice-mutability branching** — Per invoice, dispatch by Type()/StatusDetails.Immutable: gathering -> updateGatheringInvoice, mutable standard -> updateMutableStandardInvoice, immutable -> updateImmutableInvoice (no mutation, only validation issues). Reuse this exact three-way branch; never mutate an immutable invoice's lines. (`if invoice.Type() == billing.InvoiceTypeGathering { ... }; standardInvoice, _ := invoice.AsStandardInvoice(); if !standardInvoice.StatusDetails.Immutable { updateMutableStandardInvoice(...) } else { updateImmutableInvoice(...) }`) +**Mutate inside billing.Service EditFn closures** — All line edits go through UpdateStandardInvoice/UpdateGatheringInvoice with an EditFn that mutates the passed *invoice in place (line.DeletedAt = lo.ToPtr(clock.Now()), invoice.Lines.ReplaceByID(...)). Set IncludeDeletedLines: true so deletes are visible. Re-snapshot quantity via billingService.SnapshotLineQuantity before replacing a line. (`u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{Invoice: invoice.GetInvoiceID(), IncludeDeletedLines: true, EditFn: func(invoice *billing.StandardInvoice) error { ... }})`) +**Immutable invoice -> warning ValidationIssue, not error** — On immutable invoices, drift is reported via newValidationIssueOnLine (Severity Warning, Code ImmutableInvoiceHandlingNotSupportedErrorCode, Component subscriptionSyncComponentName) and merged idempotently with mergeValidationIssues (dedupes by Path+Component+Code+Message). Flat-fee per-unit amount and service-period changes, and usage-based quantity changes, are not applied — only flagged. (`validationIssues = append(validationIssues, newValidationIssueOnLine(existingLine, "flat fee line's per unit amount cannot be changed on immutable invoice (new per unit amount: %s)", targetPerUnitAmount.String()))`) +**Group new lines by currency for provisioning** — provisionUpcomingLines groups GatheringLines by l.Currency with lo.GroupBy and issues one billingService.CreatePendingInvoiceLines call per currency code, since pending-line creation is currency-scoped. (`linesByCurrency := lo.GroupBy(lines, func(l billing.GatheringLine) currencyx.Code { return l.Currency })`) +**Dry-run logging suppresses non-actionable patches** — LogPatches calls Patch.Log only when isDryRunLoggablePatch is true: current-period create-line patches and patches targeting immutable invoices are suppressed (isCurrentBillingPeriod / isMutableInvoice), keeping dry-run output focused on actionable drift on materialized resources. (`if !isDryRunLoggablePatch(patch, invoicesByID) { suppressedDryRunPatches++; continue }; patch.Log(u.logger)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `patch.go` | Defines PatchOperation constants, the Patch tagged-union and per-variant payload structs (PatchLineCreate/Delete/Update, PatchSplitLineGroup Delete/Update), constructors, AsXxxPatch accessors, Patch.Log, and GetDeletePatchesForLine. | GetDeletePatchesForLine skips lines annotated billing.AnnotationSubscriptionSyncIgnore and already-deleted lines; for a hierarchy it emits a group-delete plus per-line deletes but bails entirely if ANY line is sync-ignored. Adding a PatchOperation requires updating Patch.Log too. | +| `invoiceupdate.go` | Updater (New(billingService, logger)) with ApplyPatches as the single entry point; holds parsePatches, the three invoice-update paths, validation-issue helpers, and dry-run logging. | ApplyPatches order matters: provision new lines -> list affected invoices (IncludeDeleted: true) -> per-invoice line updates -> upsertSplitLineGroups last. updateMutableStandardInvoice deletes the invoice when NonDeletedLineCount()==0 (unless still gathering) and logs validation issues on StandardInvoiceStatusDeleteFailed. Service-period equality uses .Truncate(streaming.MinimumWindowSizeDuration). | +| `feehelper.go` | Flat-fee price helpers over billing line readers/writers: IsFlatFee, GetFlatFeePerUnitAmount, SetFlatFeePerUnitAmount. | All three nil-guard the line and price; AsFlat() can error if the line lacks usage-based metadata. SetFlatFeePerUnitAmount mutates the flatPrice then re-wraps via productcatalog.NewPriceFrom + line.SetPrice — don't assume in-place mutation of the price persists without SetPrice. | + +## Anti-Patterns + +- Constructing Patch{} literals or reading variant fields directly instead of using the NewXxxPatch constructors and AsXxxPatch accessors. +- Mutating lines or amounts on an immutable standard invoice instead of appending a warning ValidationIssue via newValidationIssueOnLine/mergeValidationIssues. +- Editing invoice lines outside an UpdateStandardInvoice/UpdateGatheringInvoice EditFn, or omitting IncludeDeletedLines: true so soft-deletes are not seen. +- Replacing a line on a mutable invoice without first re-running billingService.SnapshotLineQuantity to refresh usage quantity. +- Adding a new PatchOperation without extending parsePatches and Patch.Log (their default branches error / log 'unknown patch operation'). + +## Decisions + +- **Patch is a hand-rolled tagged union with op-guarded accessors rather than an interface.** — Lets parsePatches exhaustively switch on Op() and lets accessors fail loudly when the variant is wrong, keeping create/delete/update of lines and split-line groups in one comparable, loggable type. +- **Immutable invoices are never mutated; drift becomes deduplicated warning ValidationIssues.** — Finalized invoices must stay stable, but subscription sync still needs to surface that target state diverged, so it records actionable warnings (ImmutableInvoiceHandlingNotSupportedErrorCode) idempotently. +- **Updater holds only billing.Service plus a logger and performs all writes through service methods.** — Keeps this reconciler write-side at the service layer (transaction/state-machine semantics owned by billing.Service) instead of touching adapters/Ent directly. + +## Example: Update a line on a mutable standard invoice via EditFn with quantity re-snapshot + +``` +u.billingService.UpdateStandardInvoice(ctx, billing.UpdateStandardInvoiceInput{ + Invoice: invoice.GetInvoiceID(), + IncludeDeletedLines: true, + EditFn: func(invoice *billing.StandardInvoice) error { + targetStandardLine, err := targetState.AsInvoiceLine().AsStandardLine() + if err != nil { return err } + updatedQtyLine, err := u.billingService.SnapshotLineQuantity(ctx, billing.SnapshotLineQuantityInput{Invoice: invoice, Line: &targetStandardLine}) + if err != nil { return err } + targetStandardLine = *updatedQtyLine + if ok := invoice.Lines.ReplaceByID(targetStandardLine.ID, &targetStandardLine); !ok { + return fmt.Errorf("line[%s] not found", targetStandardLine.ID) + } + return nil + }, +}) +``` + + diff --git a/openmeter/billing/worker/subscriptionsync/service/targetstate/CLAUDE.md b/openmeter/billing/worker/subscriptionsync/service/targetstate/CLAUDE.md new file mode 100644 index 0000000000..41f72e82f7 --- /dev/null +++ b/openmeter/billing/worker/subscriptionsync/service/targetstate/CLAUDE.md @@ -0,0 +1,45 @@ +# targetstate + + + +> Computes the desired (target) billing state for a subscription as of a point in time: iterates each subscription phase to project the invoice lines/charges that SHOULD exist, then exposes each as a StateItem the reconciler compares against persistedstate. Primary constraint: everything is aligned-billing-period aware and truncated to meter (1s / MinimumWindowSizeDuration) resolution. + +## Patterns + +**Builder.Build orchestrates, PhaseIterator generates** — Builder.Build validates BuildInput, sorts phases by ActiveFrom, calls collectUpcomingLines (which constructs a NewPhaseIterator per phase and calls Generate up to a per-phase generationLimit), then corrects period starts and maps results to StateItem. New target-state logic hangs off Builder; per-phase line projection hangs off PhaseIterator. (`iterator, err := NewPhaseIterator(b.logger, b.tracer, subs, phase.SubscriptionPhase.Key)`) +**Deterministic UniqueID composition** — Every generated item's UniqueID is strings.Join of subscriptionID/phaseKey/itemKey/v[version]/period[index] with '/'. This MUST exactly match the key persistedstate exposes via ChildUniqueReferenceID, or the reconciler treats it as create+delete instead of update. correctPeriodStartForUpcomingLines reconstructs the previous period's key the same way. (`UniqueID: strings.Join([]string{it.sub.Subscription.ID, it.phase.Spec.PhaseKey, item.Spec.ItemKey, fmt.Sprintf("v[%d]", version), fmt.Sprintf("period[%d]", periodIdx)}, "/")`) +**Truncate to meter resolution everywhere** — iterationEnd, ServicePeriod, FullServicePeriod, and BillingPeriod are all Truncate(streaming.MinimumWindowSizeDuration). truncateItemsIfNeeded drops items whose truncated service period is empty UNLESS the price is flat. Any new period math must truncate before comparison to avoid ns rounding artifacts. (`iterationEnd = iterationEnd.Truncate(streaming.MinimumWindowSizeDuration).Add(streaming.MinimumWindowSizeDuration - time.Nanosecond)`) +**Bounded phase iteration loop** — generateForAlignedItemVersion advances periodIdx until invoiceAt > iterationEnd, item deactivation, phase end, or maxSafeIter (1000) is hit; the last triggers an error log with a stack dump rather than a panic. Never write an unbounded period loop here. (`if periodIdx > maxSafeIter { logger.ErrorContext(ctx, "max iterations reached", ...); break }`) +**tracex span wrapping on every method** — Build, collectUpcomingLines, Generate, generateAligned, generateForAlignedItemVersion(+Period) all open a tracex.Start[T] span and return span.Wrap(func(ctx)...). Match the naming scheme 'billing.worker.subscription.sync...' / 'billing.worker.subscription.phaseiterator...' for new spans. (`span := tracex.Start[State](ctx, b.tracer, "billing.worker.subscription.sync.targetstate.Build")\nreturn span.Wrap(func(ctx context.Context) (State, error) { ... })`) +**InvoiceAt depends on payment term** — SubscriptionItemWithPeriods.GetInvoiceAt returns BillingPeriod.From only for flat price with InAdvancePaymentTerm; everything else is lo.Latest(ServicePeriod.To, BillingPeriod.To). StateItem.GetExpectedLine returns (nil,nil) for in-arrears flat fees with a zero-length full service period and for prorated flat amounts that round to zero. (`if flatFee.PaymentTerm == productcatalog.InAdvancePaymentTerm { return r.BillingPeriod.From }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `targetstate.go` | State/BuildInput/Builder types; Build is the entry point. collectUpcomingLines drives phase iterators and computes generationLimit from GetAlignedBillingPeriodAt. correctPeriodStartForUpcomingLines stitches continuous service-period starts for sync-ignored, force-continuous prior lines. | A nil SubscriptionView returns an empty State (signals reconciler to delete everything). CustomerDeletedAt caps the subscription via withActiveTo. correctPeriodStart only fires when the previous persisted line is subscription-managed AND has both AnnotationSubscriptionSyncIgnore and AnnotationSubscriptionSyncForceContinuousLines. | +| `phaseiterator.go` | PhaseIterator + SubscriptionItemWithPeriods. Generate/generateAligned/generateForAlignedItemVersion(+Period) project per-period items using GetAlignedBillingPeriodAt and item.Spec.GetFullServicePeriodAt. PeriodPercentage drives proration; GetMinimumBillableTime / GetInvoiceAt / HasInvoicableItems gate generation. | TimeInfinity (9999-12-31) is the sentinel upper bound; maxSafeIter=1000 caps the loop. One-time items (nil BillingCadence) go through generateOneTimeAlignedItem and may be skipped (breaks=true) if not yet billable. Zero-length cadence periods are special-cased via AsPeriod().Closed() intersection handling. | +| `targetstateitem.go` | StateItem wraps SubscriptionItemWithPeriods with CurrencyCalculator and Subscription. IsBillable, GetServicePeriod, GetExpectedLine (builds billing.GatheringLine), shouldProrate, GetExpectedLineOrErr, and discountsToBillingDiscounts. | GetExpectedLine returns (nil,nil) for zero-amount/in-arrears-zero-period cases; use GetExpectedLineOrErr (returns ErrExpectedLineIsEmpty) when a non-nil line is required. shouldProrate only applies to flat prices with ProRatingModeProratePrices and a subscription that does not end exactly at the service period end. | +| `phaseiterator_test.go` | Table-driven suite (PhaseIteratorTestSuite) using subscriptionItemViewMock and expectedIterations to assert ServicePeriod/FullServicePeriod/BillingPeriod and the composed UniqueID Key across aligned cadences, phase ends, version splits, and 1s truncation. | billingAnchorRelativeToSubscriptionStart must be negative or the test fails; expected Key strings encode the exact UniqueID format and break if the join scheme changes. | + +## Anti-Patterns + +- Changing the UniqueID join format without updating persistedstate's ChildUniqueReferenceID, turning updates into create+delete churn +- Comparing or storing periods without Truncate(streaming.MinimumWindowSizeDuration), reintroducing ns rounding drift +- Writing an unbounded period-generation loop instead of respecting maxSafeIter and the deactivation/phase-end exits +- panicking on a bad period instead of returning an error up through span.Wrap +- Treating GetExpectedLine's (nil,nil) result as an error rather than a legitimate not-billable signal + +## Decisions + +- **Project target state per phase via a stateful PhaseIterator rather than a single query** — Billing periods are alignment- and cadence-dependent and must advance period-by-period until invoice-at crosses the generation horizon, which is inherently iterative. +- **Emit a deterministic composite UniqueID per (sub,phase,item,version,period)** — The reconciler diffs target against persisted state purely by unique id, so the key must be reproducible identically on both sides. +- **Return empty State for a nil SubscriptionView** — A deleted subscription's target state is 'nothing', which forces reconciliation to delete dependent invoice lines/charges. + +## Example: Build target state for a subscription as of a time + +``` +func (b Builder) Build(ctx context.Context, input BuildInput) (State, error) {\n\tspan := tracex.Start[State](ctx, b.tracer, "billing.worker.subscription.sync.targetstate.Build")\n\treturn span.Wrap(func(ctx context.Context) (State, error) {\n\t\tif err := input.Validate(); err != nil { return State{}, fmt.Errorf("validating input: %w", err) }\n\t\tif input.SubscriptionView == nil { return State{MaxGenerationTimeLimit: input.AsOf}, nil }\n\t\tsubs := *input.SubscriptionView\n\t\tupcomingLinesResult, err := b.collectUpcomingLines(ctx, subs, input.AsOf)\n\t\tif err != nil { return State{}, fmt.Errorf("collecting upcoming lines: %w", err) }\n\t\tinScopeLines, err := b.correctPeriodStartForUpcomingLines(ctx, subs.Subscription.ID, upcomingLinesResult.Lines, input.Persisted)\n\t\tif err != nil { return State{}, err }\n\t\tcurrencyCalculator, err := subs.Subscription.Currency.Calculator()\n\t\tif err != nil { return State{}, err }\n\t\treturn State{Items: lo.Map(inScopeLines, func(item SubscriptionItemWithPeriods, _ int) StateItem {\n\t\t\treturn StateItem{SubscriptionItemWithPeriods: item, CurrencyCalculator: currencyCalculator, Subscription: subs.Subscription}\n\t\t}), MaxGenerationTimeLimit: upcomingLinesResult.SubscriptionMaxGenerationTimeLimit}, nil\n\t})\n} +``` + + diff --git a/openmeter/cost/adapter/CLAUDE.md b/openmeter/cost/adapter/CLAUDE.md new file mode 100644 index 0000000000..47553d2157 --- /dev/null +++ b/openmeter/cost/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Implements cost.Adapter: queries metered usage for a feature, resolves per-unit costs (manual or LLM provider/model/token-type pricing), and aggregates usage rows into priced CostQueryRows. It is the only place that translates feature unit-cost config + streaming meter rows into monetary cost. + +## Patterns + +**Adapter struct with constructor New and interface assertion** — New(...) returns cost.Adapter wrapping a private adapter struct; a compile-time `var _ cost.Adapter = (*adapter)(nil)` enforces the contract. New takes exactly its four collaborators (feature.FeatureConnector, meter.Service, streaming.Connector, llmcost.Service) as positional args. (`func New(featureConnector feature.FeatureConnector, meterService meterpkg.Service, streamingConnector streaming.Connector, llmcostService llmcost.Service) cost.Adapter`) +**Feature filters take precedence over caller filters** — In QueryFeatureCost, feat.MeterGroupByFilters are merged on top of params.FilterGroupBy so callers cannot widen usage beyond the feature's filter scope. Always overlay feature filters last. (`for k, v := range feat.MeterGroupByFilters { merged[k] = v }`) +**Internal group-by keys added for resolution, then aggregated away** — addLLMGroupByKeys appends provider/model/token_type properties to params.GroupBy only if missing, returning the internally-added keys. computeCostRows aggregates rows back across those internal keys (filterGroupBy strips them) so the user-visible grouping is preserved. (`internalGroupByKeys := addLLMGroupByKeys(feat, ¶ms)`) +**Pre-resolve LLM prices into a cache keyed by (provider, model)** — getLLMPrices scans all rows once and resolves each unique llmPriceKey{provider, modelID} via llmcostService.ResolvePrice; resolveLLMUnitCost only reads the cache and must never call ResolvePrice itself. Missing provider/model caches a PriceNotFoundError instead of leaving the key absent. (`cache[key] = llmPriceResult{price: price, err: err}`) +**Not-found pricing is a non-fatal detail, not an error** — makeCostResolver converts models.IsGenericNotFoundError into a (nil cost, detail string, nil err) result; only non-not-found errors are fatal. costResolverFunc's contract: non-nil error is fatal, nil cost + non-empty detail means pricing unavailable. (`if models.IsGenericNotFoundError(err) { return nil, err.Error(), nil }`) +**Resolve dimensions from static value OR group-by property** — resolveDimension returns the static value if set, else looks up the configured ...Property key in groupByValues. resolveUnitCost switches on feat.UnitCost.Type (UnitCostTypeManual / UnitCostTypeLLM) and errors on unknown types. Always NormalizeModelID(provider, modelID) before lookups in both getLLMPrices and resolveLLMUnitCost. (`provider, modelID = llmcost.NormalizeModelID(provider, modelID)`) +**Defensive copy of caller slices/maps before mutation** — QueryFeatureCost clones params.GroupBy via slices.Clone and builds a fresh merged FilterGroupBy map so it never mutates the caller's input.QueryParams. (`params.GroupBy = slices.Clone(params.GroupBy)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Adapter implementation: QueryFeatureCost orchestration, LLM price pre-resolution (getLLMPrices), group-by key injection (addLLMGroupByKeys), and unit-cost resolution (resolveUnitCost / resolveLLMUnitCost / resolveDimension). | resolveLLMUnitCost assumes the price is already in priceCache and errors hard if not — any new row source must also flow through getLLMPrices. Validation of feat.MeterID and feat.UnitCost happens here, not in the service. | +| `compute.go` | Pure aggregation/pricing math: computeCostRows, costRowAccumulator (addUsage/finalize), buildDirectCostRow, filterGroupBy, costPerTokenForType, buildCacheKey, and the costResolverFunc type. | Aggregation key is built from WindowStart/End + Subject + CustomerID + external group-by values; changing it changes grouping semantics. Cost uses alpacadecimal (usage.Mul(amount)); rows are sorted by cost descending with nil-cost rows last. buildCacheKey must stay deterministic (sorted keys, NUL separator). | +| `compute_test.go` | Table-driven unit tests for computeCostRows covering no-aggregation, internal-key aggregation, per-subject/per-window grouping, external-key preservation, and price-not-found detail handling. | Tests drive computeCostRows directly with a hand-built costResolverFunc (makeResolver); they do not exercise the LLM cache path. Decimal assertions use .Equal, not float compare. | + +## Anti-Patterns + +- Calling llmcostService.ResolvePrice from inside resolveLLMUnitCost or per-row — prices must be batch-resolved once in getLLMPrices and read from the cache. +- Mutating input.QueryParams.GroupBy or FilterGroupBy in place instead of cloning/merging into fresh structures. +- Returning a fatal error when a price/token-type is unavailable — surface it as a row Detail via the not-found path so partial results still return. +- Skipping llmcost.NormalizeModelID before building llmPriceKey or calling ResolvePrice, causing cache misses against canonical DB forms. +- Adding business validation (feature has no meter / no unit cost) anywhere other than the adapter's QueryFeatureCost entry. + +## Decisions + +- **Pre-resolve prices keyed only by (provider, model), not token_type.** — ResolvePrice depends only on provider+model; token-type cost is extracted later via costPerTokenForType, avoiding redundant service calls for input/output/cache token types of the same model. +- **Inject LLM dimension keys into GroupBy, then aggregate them away.** — Per-row unit cost differs by provider/model/token_type, but users may not request those dimensions; internal-then-aggregate keeps pricing correct while honoring the requested grouping. + +## Example: Resolve a per-row LLM unit cost from the pre-resolved price cache + +``` +key := llmPriceKey{provider, modelID} +cached, ok := priceCache[key] +if !ok { + return nil, fmt.Errorf("resolving LLM price for provider=%s model=%s: price not in cache", provider, modelID) +} +if cached.err != nil { + return nil, cached.err +} +amount, err := costPerTokenForType(cached.price.Pricing, feature.LLMTokenType(tokenTypeStr)) +if err != nil { + return nil, models.NewGenericNotFoundError(err) +} +return &cost.ResolvedUnitCost{Amount: amount, Currency: currencyx.Code(cached.price.Currency)}, nil +``` + + diff --git a/openmeter/cost/service/CLAUDE.md b/openmeter/cost/service/CLAUDE.md new file mode 100644 index 0000000000..8a25b8e725 --- /dev/null +++ b/openmeter/cost/service/CLAUDE.md @@ -0,0 +1,27 @@ +# service + + + +> Thin service layer (package costservice) that validates input and delegates to cost.Adapter. Holds no business logic beyond input.Validate() — all cost computation lives in the adapter. + +## Patterns + +**Config-validated constructor returning (*Service, error)** — New(config Config) validates Config (adapter must be non-nil) before constructing. Service satisfies cost.Service via `var _ cost.Service = (*Service)(nil)`. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Validate input then delegate to adapter** — Each method calls input.Validate() and forwards to the wrapped cost.Adapter with no other logic. (`func (s *Service) QueryFeatureCost(ctx, input) { if err := input.Validate(); err != nil { return nil, err }; return s.adapter.QueryFeatureCost(ctx, input) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines Service, Config, Config.Validate, New, and QueryFeatureCost delegation. | Do not add cost/pricing logic here — keep it a validation-and-delegation passthrough; the package is named costservice, not adapter or cost. | + +## Anti-Patterns + +- Putting cost computation, meter querying, or LLM resolution in the service instead of the adapter. +- Constructing Service without going through New / Config.Validate (skips the non-nil adapter check). + +## Decisions + +- **Service is a validation passthrough over the adapter.** — Follows the repo's service/adapter split so the adapter owns I/O and computation while the service owns input validation and the public cost.Service contract. + + diff --git a/openmeter/credit/adapter/CLAUDE.md b/openmeter/credit/adapter/CLAUDE.md new file mode 100644 index 0000000000..b8449210f7 --- /dev/null +++ b/openmeter/credit/adapter/CLAUDE.md @@ -0,0 +1,49 @@ +# adapter + + + +> Ent/Postgres persistence layer for the credit domain: implements grant.Repo (grant CRUD/list/void) and balance.SnapshotRepo (balance snapshot save/invalidate/get-latest). All access is transaction-aware via entutils. + +## Patterns + +**Transacting repo wrapper** — Read/write methods wrap their body in entutils.TransactingRepo / TransactingRepoWithNoValue so they rebind to a tx already in ctx; the repo also implements Tx/WithTx/Self (TxCreator + TxUser). (`func (b *balanceSnapshotRepo) Save(ctx, owner, balances) error { return entutils.TransactingRepoWithNoValue(ctx, b, func(ctx, rep *balanceSnapshotRepo) error { ... }) }`) +**Entity-to-domain mapping helper** — Each repo has a package-private mapXxxEntity(*db.X) domain.Y that converts ent rows to domain models, normalizing times to UTC via .In(time.UTC) and convert.SafeToUTC. (`func mapGrantEntity(entity *db.Grant) grant.Grant { ... CreatedAt: entity.CreatedAt.In(time.UTC) ... }`) +**Not-found maps to domain error** — On db.IsNotFound(err) return a typed domain error (credit.GrantNotFoundError, balance.NoSavedBalanceForOwnerError), never the raw ent error. (`if db.IsNotFound(err) { return grant.Grant{}, &credit.GrantNotFoundError{GrantID: grantID.ID} }`) +**Soft-delete via DeletedAt/VoidedAt** — Deletes and voids are updates that set DeletedAt/VoidedAt with clock.Now(); list queries filter with DeletedAtIsNil()/DeletedAtGT(now) rather than physical deletes. (`g.db.Grant.Update().SetDeletedAt(clock.Now()).Where(db_grant.OwnerID(...)).Exec(ctx)`) +**Dual pagination (page vs limit/offset)** — ListGrants branches on params.Page.IsZero(): zero page uses Limit/Offset and returns Items only; otherwise query.Paginate(ctx, page) fills TotalCount. (`if params.Page.IsZero() { query = query.Limit(...).Offset(...) } else { paged, _ := query.Paginate(ctx, params.Page) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `grant.go` | grantDBADapter implements grant.Repo: CreateGrant, VoidGrant, DeleteOwnerGrants, ListGrants, ListActiveGrantsBetween, GetGrant + mapGrantEntity. | CreateGrant/VoidGrant have TODO comments about missing tx+locking; negative-amount grants are silently filtered (AmountGTE(0)) in ListActiveGrantsBetween; VoidedAt is truncated to the minute on read for legacy consistency. | +| `balance_snapshot.go` | balanceSnapshotRepo implements balance.SnapshotRepo: InvalidateAfter, GetLatestValidAt, Save (CreateBulk) + mapBalanceSnapshotEntity. | GetLatestValidAt orders by At desc then UpdatedAt desc to pick newest snapshot for the same time; returned snapshot may have nil Usage which the balance service backfills. | +| `transaction.go` | Implements entutils.TxCreator/TxUser (Tx/WithTx/Self) for both repos via db.HijackTx and NewTxClientFromRawConfig. | Both repos use ReadOnly:false; WithTx rebuilds a fresh repo from the tx config — do not capture the non-tx *db.Client inside transacting closures. | + +## Anti-Patterns + +- Accessing rep.db directly without wrapping in entutils.TransactingRepo(WithNoValue) — breaks tx propagation from ctx. +- Returning raw ent errors instead of credit.GrantNotFoundError / balance.NoSavedBalanceForOwnerError. +- Physically deleting rows instead of setting DeletedAt/VoidedAt. +- Building domain times without .In(time.UTC) normalization in map* helpers. + +## Decisions + +- **Snapshots are append-only and invalidated (not updated) via InvalidateAfter setting DeletedAt.** — Balance is recomputed from the latest valid snapshot + streaming usage, so historical snapshots must remain immutable and orderable. + +## Example: Transaction-aware read returning a typed not-found error + +``` +func (g *grantDBADapter) GetGrant(ctx context.Context, grantID models.NamespacedID) (grant.Grant, error) { + ent, err := g.db.Grant.Query().Where(db_grant.ID(grantID.ID), db_grant.Namespace(grantID.Namespace)).Only(ctx) + if err != nil { + if db.IsNotFound(err) { + return grant.Grant{}, &credit.GrantNotFoundError{GrantID: grantID.ID} + } + return grant.Grant{}, err + } + return mapGrantEntity(ent), nil +} +``` + + diff --git a/openmeter/credit/balance/CLAUDE.md b/openmeter/credit/balance/CLAUDE.md new file mode 100644 index 0000000000..10bc341b5d --- /dev/null +++ b/openmeter/credit/balance/CLAUDE.md @@ -0,0 +1,52 @@ +# balance + + + +> Defines the credit balance model (balance.Map of grantID->float64, Snapshot, SnapshottedUsage) and the SnapshotService that loads snapshots and backfills usage from the streaming connector. Pure computation + repo interface; no ent imports. + +## Patterns + +**Service wraps Repo and seals itself** — SnapshotService has the same methods as SnapshotRepo plus an unexported service() method so a repo can never accidentally satisfy the service interface. (`type SnapshotService interface { ...; service() }`) +**Usage backfill on read** — GetLatestValidAt: if the stored Snapshot.Usage.IsZero(), the service recomputes usage via OwnerConnector.GetUsagePeriodStartAt + UsageQuerier.QueryUsage and fills it in before returning. (`if res.Usage.IsZero() { usage, _ := s.UsageQuerier.QueryUsage(ctx, owner, timeutil.ClosedPeriod{From: periodStart, To: res.At}); res.Usage = SnapshottedUsage{Usage: usage, Since: periodStart} }`) +**Aggregation-aware usage query** — UsageQuerier.QueryUsage switches on owner.Meter.Aggregation: UNIQUE_COUNT does two period-start-anchored queries and subtracts (using alpacadecimal); SUM/COUNT/LATEST query the period directly; unknown aggregation errors. (`switch owner.Meter.Aggregation { case meter.MeterAggregationUniqueCount: ...; case meter.MeterAggregationSum, ...: ...; default: return 0, fmt.Errorf("unsupported aggregation %s", ...) }`) +**balance.Map value-type helpers** — Map is a plain map[string]float64 with Clone/Burn/Set/Balance/ExactlyForGrants; ExactlyForGrants asserts the map's grant set exactly matches a grant slice (used as an engine invariant). (`if !startingBalances.ExactlyForGrants(grants) { return error }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `balance.go` | Map type + helpers, SnapshottedUsage, Snapshot (Balances/Overage/At/Usage), NewStartingMap. | Map.Burn does balance - amount with no zero floor — overage handling lives in the engine, not here; Snapshot.Balance() sums all entries including inactive grants. | +| `service.go` | SnapshotService interface + service struct; NewSnapshotService builds an internal UsageQuerier from OwnerConnector callbacks. | Service delegates Invalidate/Save straight to Repo; only GetLatestValidAt adds backfill logic. | +| `usage.go` | UsageQuerier interface + impl; translates owner meter aggregation into streaming.QueryParams windows. | UNIQUE_COUNT requires the two-query subtraction; getValueFromRows errors if >1 row and returns 0 for 0 rows. | +| `repository.go` | SnapshotRepo interface + NoSavedBalanceForOwnerError. | Repo.GetLatestValidAt may return a Snapshot without usage data — callers must use the service for backfill. | + +## Anti-Patterns + +- Importing openmeter/ent here — this package is persistence-agnostic; the adapter implements SnapshotRepo. +- Letting a Repo satisfy SnapshotService — the sealing service() method forbids it. +- Querying UNIQUE_COUNT meters with a single window instead of the period-start subtraction. +- Treating Snapshot.Balance() as 'active balance' — it includes inactive/expired grants still present in the Map. + +## Decisions + +- **Usage may be stored zero in a snapshot and recomputed lazily at read time.** — Older snapshots predate stored usage; backfilling from streaming keeps GetLatestValidAt correct without a data migration. +- **UNIQUE_COUNT usage is derived by subtracting two cumulative point-in-time queries.** — UNIQUE_COUNT is non-additive over arbitrary windows, so a period delta must be computed from period-start anchored counts. + +## Example: Backfilling usage when a snapshot was stored without it + +``` +func (s *service) GetLatestValidAt(ctx context.Context, owner models.NamespacedID, at time.Time) (Snapshot, error) { + res, err := s.Repo.GetLatestValidAt(ctx, owner, at) + if err != nil { return Snapshot{}, err } + if res.Usage.IsZero() { + periodStart, err := s.OwnerConnector.GetUsagePeriodStartAt(ctx, owner, res.At) + if err != nil { return Snapshot{}, err } + usage, err := s.UsageQuerier.QueryUsage(ctx, owner, timeutil.ClosedPeriod{From: periodStart, To: res.At}) + if err != nil { return Snapshot{}, err } + res.Usage = SnapshottedUsage{Usage: usage, Since: periodStart} + } + return res, nil +} +``` + + diff --git a/openmeter/credit/driver/CLAUDE.md b/openmeter/credit/driver/CLAUDE.md new file mode 100644 index 0000000000..7d9d4381a8 --- /dev/null +++ b/openmeter/credit/driver/CLAUDE.md @@ -0,0 +1,33 @@ +# driver + + + +> HTTP transport layer (package creditdriver) for credit grants: builds httptransport handlers for ListGrants (v1, array-or-paginated union), VoidGrant, and ListGrantsV2. Maps credit/grant domain objects into entitlement-grant API shapes. + +## Patterns + +**Three-stage httptransport handler** — Every endpoint is httptransport.NewHandlerWithArgs[Req,Resp,Params] with a decode fn (resolve namespace, parse params into grant.ListParams), a business fn (call grantRepo/grantConnector), and a response encoder. (`httptransport.NewHandlerWithArgs[ListGrantsHandlerRequest, ListGrantsHandlerResponse, ListGrantsHandlerParams](decode, handle, commonhttp.JSONResponseEncoder, opts...)`) +**Namespace resolution gate** — Each decode fn calls h.resolveNamespace(ctx) (wrapping namespaceDecoder.GetNamespace) and returns 500 if absent before constructing the request. (`ns, err := h.resolveNamespace(ctx); if err != nil { return Req{}, err }`) +**Per-handler error encoder** — Handlers append httptransport.WithErrorEncoder to translate domain errors: models.IsGenericValidationError -> 400, *credit.GrantNotFoundError -> 404, *pagination.InvalidError -> 400. (`if _, ok := err.(*credit.GrantNotFoundError); ok { commonhttp.NewHTTPError(http.StatusNotFound, err).EncodeError(ctx, w); return true }`) +**Domain grant mapped through entitlement grant** — credit grants are converted via meteredentitlement.GrantFromCreditGrant then entitlement_httpdriver.MapEntitlementGrantToAPI (v1) / ...v2.MapEntitlementGrantToAPIV2 — there is no direct credit-grant API mapper. (`eg, _ := meteredentitlement.GrantFromCreditGrant(grant, clock.Now()); apiGrant := entitlement_httpdriver.MapEntitlementGrantToAPI(eg)`) +**Backward-compatible union response** — ListGrants returns commonhttp.Union[[]Grant, Result[Grant]]: when Page.IsZero() it emits a bare array (Option1), otherwise a paginated object (Option2). (`if request.params.Page.IsZero() { response.Option1 = &apiGrants } else { response.Option2 = &pagination.Result[...]{...} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `grant.go` | GrantHandler interface + grantHandler with ListGrants/VoidGrant/ListGrantsV2; holds namespaceDecoder, grantConnector, grantRepo, customerService. | Listing goes through grantRepo.ListGrants but voiding goes through grantConnector.VoidGrant; OrderBy strings are CamelToSnake-converted and validated against grant.OrderBy().StrValues(); V2 resolves Customer IDs-or-keys via customerService and skips deleted customers. | + +## Anti-Patterns + +- Reading the namespace from the request body/path instead of namespaceDecoder.GetNamespace via resolveNamespace. +- Returning domain errors unmapped — every handler must register WithErrorEncoder for validation/not-found/pagination errors. +- Building API grant DTOs directly instead of routing through GrantFromCreditGrant + entitlement MapEntitlementGrantToAPI(V2). +- Dropping the v1 array-vs-paginated union behavior keyed on Page.IsZero() (breaks backward compatibility). + +## Decisions + +- **Credit grants are exposed under the entitlement-grant API shape, not their own.** — Grants are always owned by metered entitlements; the comment in code notes 'entitlement grants are all we have', avoiding a duplicate public surface. +- **ListGrants keeps a polymorphic array-or-paginated response.** — Older clients depend on the bare-array form when no pagination params are supplied. + + diff --git a/openmeter/credit/engine/CLAUDE.md b/openmeter/credit/engine/CLAUDE.md new file mode 100644 index 0000000000..3300599f7d --- /dev/null +++ b/openmeter/credit/engine/CLAUDE.md @@ -0,0 +1,60 @@ +# engine + + + +> Pure, stateless grant burn-down engine. Engine.Run takes a starting balance Snapshot, grants, a reset Timeline and a usage-query function, then produces the ending Snapshot plus a GrantBurnDownHistory of per-segment usage. No DB/IO except the injected QueryUsage callback. + +## Patterns + +**Reset-period then burn-phase decomposition** — Run splits [StartingSnapshot.At, Until] at reset times into closed periods (runBetweenResets per period, reset() between them), and within each period getPhases splits on grant recurrence and priority changes into burnPhases. (`for idx, period := range timeline.GetClosedPeriods() { runRes := e.runBetweenResets(...); if idx != last { snap := e.reset(...); segments[last].TerminationReasons.UsageReset = true } }`) +**Decimal-exact burndown over float storage** — burnDownGrants converts usage/balances to alpacadecimal for subtraction to limit float error, returning float64 results and per-grant GrantUsage with TerminationReason (EXHAUSTED vs SEGMENT_TERMINATION). (`exactUsage := alpacadecimal.NewFromFloat(usage); if exactBalance.LessThanOrEqual(exactUsage) { exactUsage = exactUsage.Sub(exactBalance); ... }`) +**Deterministic grant prioritization** — PrioritizeGrants stable-sorts by (1) priority asc, (2) earlier expiration first, (3) tie-break created_at then id — applied initially and re-applied whenever a phase has priorityChange. (`PrioritizeGrants(grants) // priority < then expiration < then created_at,id`) +**Recurrence/activity drive balance resets, not the order** — Recurrence sets balance to grant.RecurrenceBalance (full Amount); grants newly active at phase.from get full Amount; grants becoming inactive get balance 0; LATEST-aggregation meters treat Amount as a per-point limit (reset each phase). (`if params.Meter.Aggregation == meter.MeterAggregationLatest { for _, g := range activeGrants { balancesAtPhaseStart[g.ID] = g.Amount } }`) +**Balance/grant-set invariant** — runBetweenResets requires StartingSnapshot.Balances.ExactlyForGrants(Grants); filterRelevantGrants narrows grants to those overlapping the period or present in the balance map before each run. (`if !params.StartingSnapshot.Balances.ExactlyForGrants(params.Grants) { return error }`) +**History chunked by resets** — GrantBurnDownHistory stores ordered non-overlapping segments + usageAtStart; ChunkByResets/GetUsageInPeriodUntilSegment recompute SnapshottedUsage relative to the last UsageReset segment. (`for _, seg := range g.segments { current.segments = append(...); if seg.TerminationReasons.UsageReset { chunks = append(chunks, current); current = ...usageAtReset(seg.To) } }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `engine.go` | Engine interface, RunParams/RunResult, NewEngine(EngineConfig{QueryUsage}). | Output balance includes inactive grants (documented); QueryUsageFn returns float64 (TODO to make decimal); RunParams.Clone deep-copies grants and resets. | +| `run.go` | Run (period loop + reset) and runBetweenResets (phase loop + burndown), burnDownGrants, inbetweenRunParams. | Reset times must occur strictly after StartingSnapshot.At and within [At, Until] or Run errors; PeriodEndRecurrenceBoundaryBehavior is Inclusive only for the final period; burndown has a documented float rounding FIXME. | +| `burnphase.go` | getPhases: merges activity changes and recurrence times into ordered burnPhases, handling grantsRecurredAtStart and terminal zero-length phases. | Empty/zero-length phases are dropped by appendPhase unless phase.to.After(phase.from); a terminal recurrence appends a 0-length phase at period.To. | +| `grant.go` | getGrantActivityChanges, getGrantRecurrenceTimes, filterRelevantGrants, PrioritizeGrants. | Activity changes are truncated to the minute and UTC-normalized (FIXME noted); recurrence iteration uses endBoundaryBehavior and grant.ActiveAt to bound times. | +| `history.go` | GrantBurnDownHistorySegment, GrantBurnDownHistory, NewGrantBurnDownHistory (validates no overlap), ChunkByResets, TotalGrantUsage. | MarshalJSON serializes only segments (usageAtStart is internal); GetUsageInPeriodUntilSegment resets the running usage at the last UsageReset segment. | +| `reset.go` | reset(): rolls over active grants via RolloverBalance, optionally preserves overage, re-prioritizes and burns down at the reset boundary. | Inactive-at-reset grants are skipped from rollover; missing grant in grantMap is an internal inconsistency error. | + +## Anti-Patterns + +- Doing IO inside the engine — all usage comes through the injected QueryUsage callback. +- Passing balances whose key set doesn't ExactlyForGrants the grants slice (runBetweenResets rejects it). +- Subtracting usage from balances with raw float64 instead of alpacadecimal in burndown logic. +- Assuming a grant absent from the period is excluded from the output Snapshot — inactive grants remain in the Map with 0/rolled-over balance. +- Skipping re-prioritization after a phase.priorityChange or recurrence application. + +## Decisions + +- **The engine is split into reset-bounded periods, then recurrence/priority burn phases.** — Resets roll over balances and may preserve overage (different semantics than recurrence), while phases capture priority/recurrence changes that alter burn order — separating them keeps burndown deterministic and resumable across multiple Run calls. +- **Same period computed across multiple Run invocations yields identical results (fuzz-tested).** — Balance computation must be incrementally resumable from any snapshot, so the engine is required to be deterministic and split-invariant. +- **LATEST-aggregation meters reset grant balance to Amount each phase.** — For point-in-time meters grant Amounts are limits, not consumable budgets, so usage is deducted from the full amount per phase. + +## Example: Splitting the run into reset periods and resetting between them + +``` +for idx, period := range timeline.GetClosedPeriods() { + relevantGrants := e.filterRelevantGrants(params.Grants, snapshot.Balances, period) + runRes, err := e.runBetweenResets(ctx, inbetweenRunParams{ + Grants: relevantGrants, Until: period.To, StartingSnapshot: snapshot, Meter: params.Meter, + PeriodEndRecurrenceBoundaryBehavior: lo.Ternary(idx == len(timeline.GetClosedPeriods())-1, timeutil.Inclusive, timeutil.Exclusive), + }) + if err != nil { return RunResult{}, err } + snapshot = runRes.Snapshot + historySegments = append(historySegments, runRes.History.Segments()...) + if idx != len(timeline.GetClosedPeriods())-1 { + snapshot, _ = e.reset(relevantGrants, runRes.Snapshot, params.ResetBehavior, period.To) + historySegments[len(historySegments)-1].TerminationReasons.UsageReset = true + } +} +``` + + diff --git a/openmeter/credit/grant/CLAUDE.md b/openmeter/credit/grant/CLAUDE.md new file mode 100644 index 0000000000..f7592545a9 --- /dev/null +++ b/openmeter/credit/grant/CLAUDE.md @@ -0,0 +1,54 @@ +# grant + + + +> Core grant domain model: the immutable Grant aggregate (amount, priority, effective/expiration, recurrence, rollover), its Repo interface, the OwnerConnector abstraction over the grant owner (entitlement), and versioned grant.created/grant.voided Watermill events. + +## Patterns + +**Effective-period derivation** — Grant.GetEffectivePeriod folds EffectiveAt/ExpiresAt with DeletedAt and VoidedAt into a StartBoundedPeriod, clamping To to the earliest cutoff and collapsing to a zero-length period when a grant never activates; ActiveAt delegates to it. (`func (g Grant) ActiveAt(t time.Time) bool { return g.GetEffectivePeriod().Contains(t) }`) +**Versioned events: v1 embeds, v2 uses literals** — Deprecated grantEventV1 embeds the Grant domain struct (CreatedEvent/VoidedEvent); v2 (CreatedEventV2/VoidedEventV2) uses grantEventV2GrantLiteral primitives with ToDomainGrant/mapGrantToV2Literal so domain changes don't break serialized events. (`func NewCreatedEventV2FromGrant(g Grant, c streaming.Customer) CreatedEventV2 { return CreatedEventV2{Namespace: ..., Grant: mapGrantToV2Literal(g), CustomerID: c.GetUsageAttribution().ID} }`) +**Repo is transaction-capable** — Repo embeds entutils.TxCreator and entutils.TxUser[Repo] alongside CRUD methods, so the adapter must implement Tx/WithTx/Self. (`type Repo interface { CreateGrant(...); ...; entutils.TxCreator; entutils.TxUser[Repo] }`) +**OwnerConnector resolves owner usage/reset semantics** — OwnerConnector abstracts the grant owner (a metered entitlement): DescribeOwner (Meter + DefaultQueryParams + StreamingCustomer), reset timeline/usage-period queries, EndCurrentUsagePeriod, and LockOwnerForTx. (`DescribeOwner(ctx, id) (Owner, error); GetResetTimelineInclusive(ctx, id, period) (timeutil.SimpleTimeline, error)`) +**Rollover/recurrence balance math on the model** — RolloverBalance clamps to [ResetMinRollover, ResetMaxRollover]; RecurrenceBalance returns the full Amount (no rollover for recurring grants); GetExpiration computes ExpiresAt from EffectiveAt+ExpirationPeriod. (`func (g Grant) RolloverBalance(b float64) float64 { return math.Min(g.ResetMaxRollover, math.Max(g.ResetMinRollover, b)) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `grant.go` | Grant aggregate (ManagedModel+NamespacedModel) and its methods: Validate, GetExpiration, GetEffectivePeriod, ActiveAt, RolloverBalance, RecurrenceBalance, GetNamespacedID/Owner. | Grant is documented as immutable; ExpiresAt is exclusive; Validate currently always returns nil; Priority is uint8 with lower = higher priority. | +| `owner_connector.go` | Owner struct, ResetBehavior, OwnerConnector interface, OwnerNotFoundError (+NewOwnerNotFoundError wrapping models.NewGenericNotFoundError). | GetResetTimelineInclusive's first returned time may precede the period start (documented semantics); both EndCurrentUsagePeriod and LockOwnerForTx mutate owner state. | +| `repo.go` | Repo interface, ListParams, RepoCreateInput, OrderBy enum + Values/StrValues. | Limit/Offset fields are marked deprecated in favor of Page; ListGrants returns a bare array for backward compat when pagination is absent. | +| `events.go` | Deprecated v1 events: grantEventV1 (embeds Grant), CreatedEvent, VoidedEvent, EventSubsystem='credit'. | Embedding the domain model means schema changes break old events — do not add new events here; use v2. | +| `events_2.go` | v2 events with primitive grantEventV2GrantLiteral, CreatedEventV2/VoidedEventV2, NewCreatedEventV2FromGrant/NewVoidedEventV2FromGrant. | v2 events carry CustomerID (from streaming.Customer usage attribution) and require it non-empty in Validate. | +| `expiration.go` | ExpirationPeriod (Count+Duration) and GetExpiration; ExpirationPeriodDuration enum HOUR/DAY/WEEK/MONTH/YEAR. | Unknown duration returns a zero time.Time; WEEK is implemented as Count*7 days. | + +## Anti-Patterns + +- Adding new event types that embed the Grant domain struct (v1 pattern) — use primitive literals as in events_2.go. +- Mutating a Grant in place — it is an immutable definition; balance changes live in the engine/balance.Map. +- Computing active/expiry windows manually instead of GetEffectivePeriod (which clamps Deleted/Voided cutoffs). +- Implementing Repo without the embedded entutils.TxCreator/TxUser[Repo] transaction methods. + +## Decisions + +- **Two event versions coexist; v2 serializes only primitives plus CustomerID.** — v1 embedded the domain model, so any field change broke replayed events; v2 decouples wire format from the domain and adds customer attribution for the streaming layer. +- **Grant is immutable and owner-agnostic via OwnerConnector.** — Grants belong to metered entitlements but the credit package stays decoupled from entitlement internals by depending only on the OwnerConnector interface and streaming.Customer. + +## Example: Deriving a grant's effective period with deletion/void clamping + +``` +func (g Grant) GetEffectivePeriod() timeutil.StartBoundedPeriod { + p := timeutil.StartBoundedPeriod{From: g.EffectiveAt, To: g.ExpiresAt} + if g.DeletedAt != nil { + if p.To == nil || g.DeletedAt.Before(*p.To) { p.To = g.DeletedAt } + } + if g.VoidedAt != nil { + if p.To == nil || g.VoidedAt.Before(*p.To) { p.To = g.VoidedAt } + } + if p.To != nil && p.To.Before(p.From) { p.To = &p.From } + return p +} +``` + + diff --git a/openmeter/credit/hook/CLAUDE.md b/openmeter/credit/hook/CLAUDE.md new file mode 100644 index 0000000000..ff394b9758 --- /dev/null +++ b/openmeter/credit/hook/CLAUDE.md @@ -0,0 +1,53 @@ +# hook + + + +> Lifecycle hook bridging the entitlement service to credit-grant cleanup: when a metered entitlement is deleted, its owner grants are removed. Wired into the entitlement service via the ServiceHook mechanism and feature-gated by credits.enabled. + +## Patterns + +**ServiceHook via type alias + NoopHook embed** — Hook types are aliases over the generic models.ServiceHook[entitlement.Entitlement]; the concrete struct embeds models.NoopServiceHook so only the relevant lifecycle method (PreDelete) is overridden and all other hook callbacks default to no-ops. (`type EntitlementHook = models.ServiceHook[entitlement.Entitlement]; type entitlementHook struct { NoopHook; grantRepo grant.Repo }`) +**Constructor returns the alias interface, not the concrete type** — NewEntitlementHook returns EntitlementHook (the ServiceHook alias), keeping the concrete entitlementHook struct unexported. Dependencies are injected as constructor args, not pulled from globals. (`func NewEntitlementHook(grantRepo grant.Repo) EntitlementHook { return &entitlementHook{grantRepo: grantRepo} }`) +**Tolerant PreDelete: nil and non-metered entitlements are skipped** — PreDelete returns nil (success, no-op) when the entitlement is nil or cannot be parsed as a metered entitlement via meteredentitlement.ParseFromGenericEntitlement. Only metered entitlements own grants, so a parse failure is treated as 'nothing to clean up', not an error. (`meteredEnt, err := meteredentitlement.ParseFromGenericEntitlement(ent); if err != nil { return nil }`) +**Grant cleanup keyed by NamespacedID** — Owner-grant deletion is scoped by tenant: it calls grantRepo.DeleteOwnerGrants with models.NamespacedID{Namespace, ID} built from the metered entitlement, preserving multi-tenant isolation. (`return h.grantRepo.DeleteOwnerGrants(ctx, models.NamespacedID{Namespace: meteredEnt.Namespace, ID: meteredEnt.ID})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement_hook.go` | Defines EntitlementHook/NoopHook aliases, the entitlementHook struct, NewEntitlementHook constructor, and the PreDelete implementation that deletes owner grants for a deleted metered entitlement. | PreDelete must stay defensive: keep the nil-entitlement and ParseFromGenericEntitlement error guards returning nil, otherwise deleting non-metered entitlements would fail. Do not import the entitlement service/wiring layer here — depend only on grant.Repo and the entitlement domain types to avoid import cycles. | + +## Anti-Patterns + +- Implementing the full ServiceHook surface manually instead of embedding NoopHook — drop NoopHook and you must implement every hook callback. +- Returning an error from PreDelete when the entitlement is not metered; non-metered entitlements have no grants and must pass through cleanly. +- Calling DeleteOwnerGrants without a namespace-scoped NamespacedID, which would cross tenant boundaries. +- Injecting concrete services or the registry/wiring layer into the hook instead of the narrow grant.Repo dependency. + +## Decisions + +- **Grant cleanup lives in a hook rather than inline in the entitlement service.** — Keeps the entitlement service unaware of credits and lets the whole credit stack stay feature-gated by credits.enabled at the wiring layer — when credits are off, the hook is simply not registered. +- **Non-metered entitlements are silently ignored via ParseFromGenericEntitlement.** — Only metered entitlements own credit grants, so the hook is a no-op for other entitlement types and must not block their deletion. + +## Example: Delete owner grants when a metered entitlement is removed + +``` +import ( + "context" + "github.com/openmeterio/openmeter/openmeter/credit/grant" + "github.com/openmeterio/openmeter/openmeter/entitlement" + meteredentitlement "github.com/openmeterio/openmeter/openmeter/entitlement/metered" + "github.com/openmeterio/openmeter/pkg/models" +) + +func (h *entitlementHook) PreDelete(ctx context.Context, ent *entitlement.Entitlement) error { + if ent == nil { + return nil + } + meteredEnt, err := meteredentitlement.ParseFromGenericEntitlement(ent) + if err != nil { + return nil +// ... +``` + + diff --git a/openmeter/currencies/adapter/CLAUDE.md b/openmeter/currencies/adapter/CLAUDE.md new file mode 100644 index 0000000000..88ec5ed3f0 --- /dev/null +++ b/openmeter/currencies/adapter/CLAUDE.md @@ -0,0 +1,53 @@ +# adapter + + + +> Ent/PostgreSQL persistence layer for the currencies domain, implementing the currencies.Adapter interface over the CustomCurrency and CurrencyCostBasis tables. It is the only place that touches entdb for custom currencies and FX cost-basis rates. + +## Patterns + +**Adapter satisfies currencies.Adapter** — The unexported adapter struct must implement currencies.Adapter; assert it at compile time in both files. (`var _ currencies.Adapter = (*adapter)(nil)`) +**Constructor validates Config** — New(config Config) calls config.Validate() (Client must be non-nil) and returns (currencies.Adapter, error); never expose the concrete struct. (`func New(config Config) (currencies.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Transaction-aware via entutils.TransactingRepo** — Every adapter method wraps its body in entutils.TransactingRepo(ctx, a, func(ctx, tx)...) so it rebinds to a tx carried in ctx. Implement Tx/WithTx/Self for entutils.TxCreator. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (...) { ... })`) +**DB->domain mapping helpers** — Use mapCurrencyFromDB / mapCostBasisFromDB to translate entdb rows into currencies.Currency / currencies.CostBasis; never return entdb types. Normalize times with .In(time.UTC). (`func mapCostBasisFromDB(c *entdb.CurrencyCostBasis) currencies.CostBasis { ... EffectiveFrom: c.EffectiveFrom.In(time.UTC) }`) +**Namespace-scoped queries** — Always filter by Namespace (e.g. customcurrency.Namespace, currencycostbasis.Namespace) from params; multi-tenancy is enforced here, not in the service. (`q := a.db.CustomCurrency.Query().Where(customcurrency.Namespace(params.Namespace))`) +**Constraint errors map to conflict** — On Save, check entdb.IsConstraintError(err) and return models.NewGenericConflictError(...); wrap all other errors with fmt.Errorf("...: %w", err). (`if entdb.IsConstraintError(err) { return currencies.Currency{}, models.NewGenericConflictError(...) }`) +**pkg/filter + pagination helpers** — Apply field filters via filter.ApplyToQuery and prefer q.Paginate(ctx, params.Page) + pagination.MapResult for list results; manual Offset/Limit only when Page is non-zero. (`paged, err := q.Paginate(ctx, params.Page); return pagination.MapResult(paged, mapCostBasisFromDB), nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor and the entutils.TxCreator plumbing (Tx, WithTx, Self) for transaction propagation. | WithTx must rebuild via entdb.NewTxClientFromRawConfig and carry logger forward; the logger field is currently never set by New. | +| `currencies.go` | Concrete CRUD/list implementations: ListCustomCurrencies, CreateCurrency, CreateCostBasis, ListCostBases, plus the FromDB mappers. | ListCustomCurrencies hand-rolls Offset/Limit (only when Page>0) while ListCostBases uses q.Paginate — keep ordering/default-order logic (entutils.GetOrdering) intact. | + +## Anti-Patterns + +- Returning entdb.* types instead of mapping to currencies.Currency / currencies.CostBasis +- Bypassing entutils.TransactingRepo or accessing a.db directly outside the tx wrapper +- Querying without a Namespace predicate (breaks tenant isolation) +- Returning a raw constraint error instead of models.NewGenericConflictError +- Exposing the concrete adapter struct instead of the currencies.Adapter interface from New + +## Decisions + +- **Adapter holds no business rules (no future-date checks, no fiat enumeration)** — All validation and fiat-vs-custom merging lives in the service; the adapter is a thin tenant-scoped persistence boundary. + +## Example: Tenant-scoped create with conflict mapping + +``` +func (a *adapter) CreateCurrency(ctx context.Context, params currencies.CreateCurrencyInput) (currencies.Currency, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (currencies.Currency, error) { + curr, err := a.db.CustomCurrency.Create().SetNamespace(params.Namespace).SetCode(params.Code).SetName(params.Name).SetSymbol(params.Symbol).Save(ctx) + if err != nil { + if entdb.IsConstraintError(err) { + return currencies.Currency{}, models.NewGenericConflictError(fmt.Errorf("currency with code %s already exists", params.Code)) + } + return currencies.Currency{}, fmt.Errorf("failed to create currency: %w", err) + } + return mapCurrencyFromDB(curr), nil + }) +} +``` + + diff --git a/openmeter/currencies/service/CLAUDE.md b/openmeter/currencies/service/CLAUDE.md new file mode 100644 index 0000000000..aaf465bbb9 --- /dev/null +++ b/openmeter/currencies/service/CLAUDE.md @@ -0,0 +1,54 @@ +# service + + + +> Business-logic layer for the currencies domain, implementing currencies.CurrencyService. It validates input, merges DB-backed custom currencies with ISO fiat currencies from gobl, and orchestrates transactions over the adapter. + +## Patterns + +**Service satisfies currencies.CurrencyService** — Service struct wraps a single currencies.Adapter; assert interface conformance and construct via New(adapter). (`var _ currencies.CurrencyService = (*Service)(nil); func New(adapter currencies.Adapter) *Service`) +**Validate-then-Run guard** — Every public method first calls params.Validate() and returns models.NewGenericValidationError on failure, then wraps the work in transaction.Run(ctx, s.adapter, ...). (`if params.Validate() != nil { return ..., models.NewGenericValidationError(fmt.Errorf("invalid input parameters: %w", params.Validate())) }`) +**Fiat/custom merge with in-memory pagination** — ListCurrencies derives includeCustom/includeFiat from params.FilterType; custom-only delegates DB pagination to the adapter, otherwise it enumerates (fetching custom with Page{} cleared), sorts, and paginates slices in-memory. (`if includeCustom && !includeFiat { return s.adapter.ListCustomCurrencies(ctx, params) }`) +**Fiat sourced from gobl currency.Definitions** — Fiat currencies come from currency.Definitions(); rows with empty ISONumeric (crypto/non-ISO) are filtered out, and the code filter is applied via params.Code.LoFilterPredicate(). (`if def.ISONumeric == "" { return false, nil }; return matchCode(def.ISOCode.String(), 0)`) +**Service-owned business rules** — Domain invariants live here, e.g. CreateCostBasis rejects a non-future EffectiveFrom and defaults a nil EffectiveFrom to time.Now() before calling the adapter. (`if params.EffectiveFrom != nil && !params.EffectiveFrom.After(now) { return ..., models.NewGenericValidationError(...) }`) +**Sort honors OrderBy/Order** — In-memory results are sorted via slices.SortFunc comparing Name or Code per params.OrderBy, negating for sortx.OrderDesc, matching the adapter's DB ordering. (`slices.SortFunc(items, func(a, b currencies.Currency) int { ... if params.Order == sortx.OrderDesc { return -result } })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Implements ListCurrencies (fiat/custom merge), CreateCurrency, CreateCostBasis (future-date rule + default), ListCostBases. | ListCurrencies clears allParams.Page before fetching custom for the combined path; forgetting that re-applies DB pagination and corrupts the in-memory merge. CreateCostBasis computes now=time.Now() inside transaction.Run. | +| `service_test.go` | Pure unit tests using a fakeAdapter + noopDriver (no DB) to exercise combined and custom-only paths. | fakeAdapter only implements ListCustomCurrencies; the other methods panic("not implemented"). Tests rely on real gobl fiat data, so USD/EUR/GBP must remain valid ISO codes; use t.Context(). | + +## Anti-Patterns + +- Calling the adapter without first validating params and wrapping in transaction.Run +- Putting business rules (future-date checks, fiat filtering) in the adapter instead of the service +- Paginating the custom fetch in the combined path instead of clearing Page for the in-memory merge +- Returning raw validation errors instead of models.NewGenericValidationError +- Including non-ISO/crypto currencies (empty ISONumeric) in fiat enumeration + +## Decisions + +- **Custom-only listing delegates to DB-level pagination; mixed/fiat listing paginates in-memory** — Fiat currencies are a static gobl-sourced set not stored in Postgres, so merged results must be enumerated and sliced after sorting rather than via SQL OFFSET/LIMIT. +- **EffectiveFrom must be in the future and defaults to now** — Cost-basis FX rates represent forward-effective conversion rates; back-dating would silently rewrite historical billing math. + +## Example: Validate, transaction.Run, branch on currency type + +``` +func (s *Service) ListCurrencies(ctx context.Context, params currencies.ListCurrenciesInput) (pagination.Result[currencies.Currency], error) { + if params.Validate() != nil { + return pagination.Result[currencies.Currency]{}, models.NewGenericValidationError(fmt.Errorf("invalid input parameters: %w", params.Validate())) + } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[currencies.Currency], error) { + includeCustom := params.FilterType == nil || *params.FilterType == currencies.CurrencyTypeCustom + includeFiat := params.FilterType == nil || *params.FilterType == currencies.CurrencyTypeFiat + if includeCustom && !includeFiat { + return s.adapter.ListCustomCurrencies(ctx, params) + } + // ...enumerate custom (Page cleared) + fiat, sort, paginate in-memory... + }) +} +``` + + diff --git a/openmeter/customer/CLAUDE.md b/openmeter/customer/CLAUDE.md new file mode 100644 index 0000000000..51a6de4c28 --- /dev/null +++ b/openmeter/customer/CLAUDE.md @@ -0,0 +1,54 @@ +# customer + + + +> High-fan-in (103 in-edges) customer domain. The root declares customer.Service/Adapter, the Customer + CustomerMutate model, identity types (CustomerID/CustomerKey/CustomerIDOrKey), all *Input types, lifecycle events, typed conflict errors, and a pluggable RequestValidator registry. Consumed by billing, subscription, ledger and the v3 customers handlers. + +## Patterns + +**Customer satisfies streaming.Customer / usage-attribution** — Customer embeds models.ManagedResource and exposes GetUsageAttribution() returning streaming.NewCustomerUsageAttribution(ID, Key, subjectKeys); a `var _ streaming.Customer = &Customer{}` assertion enforces it. (`func (c Customer) GetUsageAttribution() streaming.CustomerUsageAttribution { return streaming.NewCustomerUsageAttribution(c.ID, c.Key, subjectKeys) }`) +**Either key or subjectKeys required** — Both Customer.Validate and CustomerMutate.Validate enforce that at least one of Key or UsageAttribution.SubjectKeys is set, returning models.NewGenericValidationError. (`if !hasKey && !hasSubjectKeys { return models.NewGenericValidationError(errors.New("either key or usageAttribution.subjectKeys must be provided")) }`) +**Pluggable RequestValidator registry** — RequestValidatorRegistry fans validation to all registered RequestValidators (errors.Join over lo.Map) under an RWMutex; validators are Register'd after construction, not via Config. NoopRequestValidator is the default. (`return errors.Join(lo.Map(r.validators, func(v RequestValidator, _ int) error { return v.ValidateDeleteCustomer(ctx, input) })...)`) +**Typed conflict / precondition errors with IsX helpers** — KeyConflictError, SubjectKeyConflictError, UpdateAfterDeleteError wrap models.NewGenericConflictError; deleting a customer with active subscriptions uses the ValidationIssue ErrDeletingCustomerWithActiveSubscriptions.WithAttr. (`var ErrDeletingCustomerWithActiveSubscriptions = models.NewValidationIssue(ErrCodeDeletingCustomerWithActiveSubscriptions, "cannot delete customer with active subscriptions")`) +**Filter fields via pkg/filter wrappers** — ListCustomersInput exposes *filter.FilterString / *filter.FilterULID per filterable field, each Validate'd and collected with models.NewNillableGenericValidationError(errors.Join(...)). (`Key *filter.FilterString; BillingProfileID *filter.FilterULID`) +**Service embeds models.ServiceHooks[Customer]** — customer.Service composes CustomerService + RequestValidatorService + models.ServiceHooks[Customer], so lifecycle hooks (e.g. ledger account provisioning) register post-construction. (`type Service interface { CustomerService; RequestValidatorService; models.ServiceHooks[Customer] }`) +**Soft-delete-aware mutation guards** — Customer.IsDeleted() compares DeletedAt against clock.Now(); mutations on deleted customers must return a precondition-failed error rather than proceeding. (`func (c Customer) IsDeleted() bool { return c.DeletedAt != nil && c.DeletedAt.Before(clock.Now()) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `customer.go` | Customer + CustomerMutate model, identity types, CustomerUsageAttribution, all *Input types and Validate | AsCustomerMutate drops some fields; GetFirstSubjectKey is deprecated; keep the key-or-subjectKeys invariant in BOTH Customer and CustomerMutate Validate. | +| `adapter.go` | Adapter interface (List/Create/Update/Delete/Get + usage-attribution lookups) embedding entutils.TxCreator | GetCustomerByUsageAttribution keys on customer key or subject key; reads must load subjects or mapping fails. | +| `service.go` | Service interface composing CustomerService + RequestValidatorService + ServiceHooks[Customer] | Read methods delegate straight to adapter; do not add validation/hooks/events to Get/List. | +| `requestvalidator.go` | RequestValidator interface, NoopRequestValidator, thread-safe registry | Validators run for all registered entries; any returned error aborts the mutation. | +| `errors.go` | KeyConflictError, SubjectKeyConflictError, UpdateAfterDeleteError, active-subscription deletion issue | Return these typed errors so v3 handlers surface correct conflict/precondition codes. | +| `event.go` | CustomerCreate/Update/Delete events (all v1), resource-path metadata | Delete event Validate requires DeletedAt != nil before EventMetadata dereferences it. | + +## Anti-Patterns + +- Putting Ent/SQL access in the root package or service instead of delegating to customer.Adapter. +- Mutating or deleting a soft-deleted customer (IsDeleted) without the precondition guard, or deleting one with active subscriptions. +- Returning bare errors for invalid input instead of models.NewGenericValidationError / the typed conflict errors. +- Bypassing the RequestValidator registry on a new mutation path. +- Breaking the key-or-subjectKeys invariant, or constructing usage attribution directly instead of via GetUsageAttribution (it carries Key too). + +## Decisions + +- **Request validators and lifecycle hooks register after construction, not via Config.** — Avoids import cycles with downstream domains (billing/subscription/ledger) that hook into customer mutations while still depending on customer. +- **Either a customer key or subject keys must identify a customer.** — Usage attribution must always resolve to a customer; the dual identity keeps backwards-compatible subject-key flows while supporting keyed customers. + +## Example: Validating a list input by collecting all filter issues + +``` +func (i ListCustomersInput) Validate() error { + var errs []error + if i.Namespace == "" { errs = append(errs, models.NewGenericValidationError(errors.New("namespace is required"))) } + if i.Key != nil { + if err := i.Key.Validate(); err != nil { errs = append(errs, models.NewGenericValidationError(fmt.Errorf("invalid key filter: %w", err))) } + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/customer/adapter/CLAUDE.md b/openmeter/customer/adapter/CLAUDE.md new file mode 100644 index 0000000000..b46b90ce16 --- /dev/null +++ b/openmeter/customer/adapter/CLAUDE.md @@ -0,0 +1,58 @@ +# adapter + + + +> Ent persistence layer for the customer domain. Implements customer.Adapter (CRUD, listing, usage-attribution, soft-delete cascades) against *entdb.Client, plus DB-entity-to-domain mapping. + +## Patterns + +**Transaction-wrapping repo helpers** — Every read/write method body runs inside entutils.TransactingRepo (value-returning) or entutils.TransactingRepoWithNoValue (void), so the body rebinds to the tx carried in ctx via the repo *adapter. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *adapter) (*customer.Customer, error) { ... repo.db.Customer.Query()... })`) +**TxCreator triplet on adapter** — The adapter implements Tx/WithTx/Self: Tx hijacks via a.db.HijackTx with &sql.TxOptions{ReadOnly:false}, WithTx rebuilds via entdb.NewTxClientFromRawConfig, Self returns the receiver. Required for entutils helpers to work. (`func (a *adapter) WithTx(ctx, tx) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }`) +**Validate input then wrap as GenericValidationError** — Each method first calls input.Validate() and on failure returns models.NewGenericValidationError(...) before any DB access. (`if err := input.Validate(); err != nil { return ..., models.NewGenericValidationError(err) }`) +**Soft-delete with deleted_at + namespace filters** — Deletes are UPDATEs setting deleted_at=clock.Now().UTC(), always scoped by namespace and DeletedAtIsNil(); reads default to excluding rows where DeletedAt < now via Or(DeletedAtIsNil, DeletedAtGTE(now)). (`repo.db.Customer.Update().Where(customerdb.ID(input.ID), customerdb.Namespace(input.Namespace), customerdb.DeletedAtIsNil()).SetDeletedAt(deletedAt)`) +**Manual delete cascade across app tables** — DeleteCustomer soft-deletes the customer then each association (CustomerSubjects, AppCustomer, AppStripeCustomer, AppCustomInvoicingCustomer) in the same tx, each filtered by DeletedAtIsNil so already-deleted children keep their original timestamp. (`repo.db.AppStripeCustomer.Update().Where(appstripecustomerdb.CustomerID(input.ID), ...DeletedAtIsNil()).SetDeletedAt(deletedAt).Exec(ctx)`) +**Edge-loaded mapping requires explicit loads** — CustomerFromDBEntity/subjectKeysFromDBEntity call Edges.SubjectsOrErr / SubscriptionOrErr and return an error if db.IsNotLoaded; callers must apply WithSubjects(now) and (for expands) WithActiveSubscriptions(now) on the query first. (`query := repo.db.Customer.Query(); query = WithSubjects(query, now); if slices.Contains(input.Expands, customer.ExpandSubscriptions) { query = WithActiveSubscriptions(query, now) }`) +**filter.ApplyToQuery for string filters** — List filters apply through pkg/filter (filter.ApplyToQuery / filter.SelectPredicate) against ent field constants rather than hand-built predicates. (`query = filter.ApplyToQuery(query, input.Key, customerdb.FieldKey)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client,Logger}+Validate, New() returning customer.Adapter, and the Tx/WithTx/Self TxCreator triplet. | Both Client and Logger are required by Validate; Tx uses ReadOnly:false — do not pass nil logger. | +| `customer.go` | All adapter methods: ListCustomers, ListCustomerUsageAttributions, CreateCustomer, DeleteCustomer, GetCustomer, etc. | CreateCustomer pre-checks key-vs-id and key-vs-subject overlap and returns NewKeyConflictError/NewSubjectKeyConflictError on entdb.IsConstraintError; subjects are bulk-created separately (AddSubjects produces an invalid query). | +| `entitymapping.go` | CustomerFromDBEntity, resolveActiveSubscriptionIDs, subjectKeysFromDBEntity — DB→domain mapping. | Returns error when edges not loaded; UsageAttribution only set when subjectKeys non-empty; subject keys are slices.Sort-ed for stable order; ActiveSubscriptionIDs wrapped in mo.Some only when expand present. | +| `customer_test.go` | Adapter integration tests via testutils.InitPostgresDB; seed() builds the full cascade chain; freezeTime truncates to microsecond. | Postgres has microsecond precision — freeze/compare times via Truncate(time.Microsecond); tests assert namespace isolation and preservation of pre-deleted children. | + +## Anti-Patterns + +- Accessing repo.db directly outside a TransactingRepo/TransactingRepoWithNoValue closure (breaks tx propagation) +- Reading customers without WithSubjects(now) — mapping will fail with 'subjects must be loaded for customer' +- Hard-deleting rows or forgetting the namespace + DeletedAtIsNil filters on cascade updates +- Using customer.AddSubjects to attach subjects in Create (generates an invalid query); use CustomerSubjects.CreateBulk +- Returning raw errors for invalid input instead of models.NewGenericValidationError / typed conflict errors + +## Decisions + +- **Soft delete via deleted_at with explicit per-table cascade rather than DB cascades** — Preserves audit history and lets already-deleted children keep their original timestamp by filtering DeletedAtIsNil. +- **Subjects inserted with CustomerSubjects.CreateBulk instead of ent edge AddSubjects** — ent edge AddSubjects produces an invalid SQL query; the bulk path issues the same number/shape of queries — devex-only difference. + +## Example: Adapter method wrapping its body in a transacting repo closure + +``` +func (a *adapter) DeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error { + if err := input.Validate(); err != nil { + return models.NewGenericValidationError(fmt.Errorf("error deleting customer: %w", err)) + } + return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, repo *adapter) error { + deletedAt := clock.Now().UTC() + rows, err := repo.db.Customer.Update(). + Where(customerdb.ID(input.ID), customerdb.Namespace(input.Namespace), customerdb.DeletedAtIsNil()). + SetDeletedAt(deletedAt).Save(ctx) + if err != nil { return fmt.Errorf("failed to delete customer: %w", err) } + if rows == 0 { return models.NewGenericNotFoundError(fmt.Errorf("customer with id %s not found in %s namespace", input.ID, input.Namespace)) } + return nil + }) +} +``` + + diff --git a/openmeter/customer/app/CLAUDE.md b/openmeter/customer/app/CLAUDE.md new file mode 100644 index 0000000000..0fb7da20b5 --- /dev/null +++ b/openmeter/customer/app/CLAUDE.md @@ -0,0 +1,41 @@ +# app + + + +> Defines the customer.App integration contract — the seam through which app providers (Stripe, sandbox, custom-invoicing) validate that they can run for a given customer. + +## Patterns + +**Capability-aware App interface** — App declares a single ValidateCustomer(ctx, *customer.Customer, []app.CapabilityType) error; provider apps implement it to gate per-customer execution. (`type App interface { ValidateCustomer(ctx context.Context, customer *customer.Customer, capabilities []app.CapabilityType) error }`) +**Type-asserting adapter from app.App** — AsCustomerApp(app.App) narrows a generic app.App to the customer App via a type assertion and returns a GenericValidationError when the cast fails, including id/type for diagnostics. (`customerApp, ok := candidate.(App); if !ok { return nil, models.NewGenericValidationError(fmt.Errorf("is not a customer app [id=%s, type=%s]", candidate.GetID(), candidate.GetType())) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `app.go` | Declares the App interface and the AsCustomerApp narrowing helper (package customerapp). | Package name is customerapp, not app; failed assertion must return models.NewGenericValidationError, not a bare error. | + +## Anti-Patterns + +- Putting persistence or HTTP logic in this package — it is purely an integration contract +- Returning a plain error from AsCustomerApp instead of a GenericValidationError + +## Decisions + +- **Keep customer app integration as a thin interface separate from openmeter/app** — Lets provider apps (stripe/sandbox/custominvoicing) depend on a minimal customer-validation contract without importing the full customer service. + +## Example: Narrowing a generic app to a customer app + +``` +func AsCustomerApp(customerAppCandidate app.App) (App, error) { + customerApp, ok := customerAppCandidate.(App) + if !ok { + return nil, models.NewGenericValidationError( + fmt.Errorf("is not a customer app [id=%s, type=%s]", customerAppCandidate.GetID(), customerAppCandidate.GetType()), + ) + } + return customerApp, nil +} +``` + + diff --git a/openmeter/customer/httpdriver/CLAUDE.md b/openmeter/customer/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..efdd6e62b6 --- /dev/null +++ b/openmeter/customer/httpdriver/CLAUDE.md @@ -0,0 +1,57 @@ +# httpdriver + + + +> Legacy v1 HTTP layer for the customer API. Builds httptransport handlers (List/Create/Update/Delete/Get + entitlement value/access) and maps between api.* DTOs and customer domain types. + +## Patterns + +**httptransport three-function handler** — Each endpoint is a method on *handler returning a typed httptransport.Handler[...] built from a request-decoder, a business func, and a response encoder, plus AppendOptions with WithOperationName. (`return httptransport.NewHandler(decode, func(ctx, req)(Resp,error){...}, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusCreated), httptransport.AppendOptions(h.options, httptransport.WithOperationName("createCustomer"))...)`) +**Namespace resolved from decoder** — Every decoder calls h.resolveNamespace(ctx), which reads namespaceDecoder.GetNamespace and returns a 500 HTTPError if absent. (`ns, err := h.resolveNamespace(ctx); if err != nil { return Request{}, err }`) +**Map* / *ToAPI / FromAPI conversion functions** — Conversions live in apimapping.go: MapCustomerCreate/MapCustomerReplaceUpdate (api→domain CustomerMutate), CustomerToAPI/MapAccessToAPI(V2) (domain→api), MapAddress, FromMetadata/FromAnnotations. (`func MapCustomerCreate(body api.CustomerCreate) customer.CustomerMutate { ... }`) +**v1 filter semantics preserved via FilterString wrappers** — containsFilter wraps *string into &filter.FilterString{Contains} (partial match) and eqFilter into {Eq} (exact) so legacy query-param behavior is retained when delegating to the v3 filter-based service. (`Key: containsFilter(params.Key), PlanKey: eqFilter(params.PlanKey)`) +**Mutations guard against deleted customers** — Update/Delete/entitlement handlers first GetCustomer, then return models.NewGenericPreConditionFailedError if cus.IsDeleted() before proceeding. (`if cus != nil && cus.IsDeleted() { return ..., models.NewGenericPreConditionFailedError(...) }`) +**Subscriptions fetched and joined separately** — ListCustomers fetches subscriptions in a second subscriptionService.List call keyed by customer IDs, GroupBy CustomerId, then maps via CustomerToAPI; entitlement NotFound is mapped to NoAccessValue. (`customerSubscriptions = lo.GroupBy(subscriptions.Items, func(item subscription.Subscription) string { return item.CustomerId })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/CustomerHandler interfaces, *handler struct (service, entitlementService, subscriptionService, namespaceDecoder, options), New() constructor, resolveNamespace. | Constructor wires four services; missing namespace yields a 500, not a 400. | +| `customer.go` | All endpoint handlers and request/response type aliases; mapCustomerWithSubscriptionsToAPI joins customers with their subscriptions. | ListCustomers defaults Expand to [subscriptions] (TODO[v2] breaking change to remove); CurrentSubscriptionId assumes single subscription per customer (FIXME). | +| `apimapping.go` | DTO mapping incl. EntitlementValueV2/CustomerAccessV2 and MapEntitlementValueToAPIV2 (adds GrantBalances for MeteredEntitlementValue). | V2 entitlement mapping type-asserts *meteredentitlement.MeteredEntitlementValue to copy GrantBalances; currency/country mapped via lo.ToPtr(currencyx.Code/models.CountryCode). | + +## Anti-Patterns + +- Allowing mutations on a deleted customer without the IsDeleted precondition check +- Hand-decoding bodies instead of commonhttp.JSONRequestBodyDecoder, or returning bare errors instead of commonhttp/models typed errors +- Adding business logic to handlers instead of delegating to customer.Service / entitlement.Service +- Skipping resolveNamespace and trusting a namespace from the request body/path + +## Decisions + +- **Keep v1 contains/eq query-param semantics by wrapping params in filter.FilterString** — Lets the legacy v1 surface delegate to the shared v3 filter-based service without breaking existing partial/exact-match behavior. +- **Fetch subscriptions in a separate service call and join in the handler** — Customer service stays subscription-agnostic; the HTTP layer composes the expanded API representation. + +## Example: A typed httptransport handler with namespace resolution and operation name + +``` +func (h *handler) CreateCustomer() CreateCustomerHandler { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (CreateCustomerRequest, error) { + body := api.CustomerCreate{} + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { + return CreateCustomerRequest{}, fmt.Errorf("field to decode create customer request: %w", err) + } + ns, err := h.resolveNamespace(ctx) + if err != nil { return CreateCustomerRequest{}, err } + return CreateCustomerRequest{Namespace: ns, CustomerMutate: MapCustomerCreate(body)}, nil + }, + func(ctx context.Context, request CreateCustomerRequest) (CreateCustomerResponse, error) { + customer, err := h.service.CreateCustomer(ctx, request) + if err != nil { return CreateCustomerResponse{}, err } + return h.mapCustomerWithSubscriptionsToAPI(ctx, *customer, nil) +// ... +``` + + diff --git a/openmeter/customer/service/CLAUDE.md b/openmeter/customer/service/CLAUDE.md new file mode 100644 index 0000000000..ecd84a6dc5 --- /dev/null +++ b/openmeter/customer/service/CLAUDE.md @@ -0,0 +1,62 @@ +# service + + + +> Concrete implementation of customer.Service (package customerservice). Orchestrates the customer CRUD + lifecycle flow: request validation, transactional adapter calls, service hooks, and event publishing. The high-fan-in root service consumed by billing, subscription, ledger, and the v3 customers handlers. + +## Patterns + +**Service struct holds adapter + validators + publisher + hook registry** — Service has exactly four fields: adapter customer.Adapter, requestValidatorRegistry customer.RequestValidatorRegistry, publisher eventbus.Publisher, hooks models.ServiceHookRegistry[customer.Customer]. No other dependencies are injected. (`type Service struct { adapter customer.Adapter; requestValidatorRegistry customer.RequestValidatorRegistry; publisher eventbus.Publisher; hooks models.ServiceHookRegistry[customer.Customer] }`) +**Config + Validate + New constructor** — Construct via New(Config) which calls config.Validate() (rejects nil Adapter/Publisher) before building Service. RequestValidatorRegistry and empty hook registry are created internally, not passed in. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{...}, nil }`) +**Interface assertion per file** — Each file asserts the interface it satisfies at package level: customer.go and service.go both have `var _ customer.Service = (*Service)(nil)`; requestvalidator.go has `var _ customer.RequestValidatorService = (*Service)(nil)`. (`var _ customer.Service = (*Service)(nil)`) +**Validate -> transaction.Run -> adapter -> hooks -> publish** — Every mutating method follows: requestValidatorRegistry.Validate*(ctx, input) wrapped in models.NewGenericValidationError, then transaction.Run/RunWithNoValue(ctx, s.adapter, ...), inside which the adapter mutates, hooks fire (PostCreate / Pre+PostUpdate / Pre+PostDelete), then publisher.Publish emits the domain event. (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (*customer.Customer, error) { c, err := s.adapter.CreateCustomer(ctx, input); ...; s.hooks.PostCreate(ctx, c); s.publisher.Publish(ctx, customer.NewCustomerCreateEvent(ctx, c)) })`) +**Read methods pass straight through to adapter** — GetCustomer, ListCustomers, GetCustomerByUsageAttribution, ListCustomerUsageAttributions are one-line delegations to s.adapter with no validation, transaction, hook, or event. Only mutations get the full pipeline. (`func (s *Service) GetCustomer(ctx context.Context, input customer.GetCustomerInput) (*customer.Customer, error) { return s.adapter.GetCustomer(ctx, input) }`) +**Deleted / precondition guards before mutate** — Delete refuses customers with active subscriptions (NewGenericPreConditionFailedError + NewErrDeletingCustomerWithActiveSubscriptions) and treats already-deleted/not-found as no-op; Update rejects soft-deleted customers (cus.IsDeleted() -> NewGenericPreConditionFailedError). Delete expands ExpandSubscriptions and errors if ActiveSubscriptionIDs.IsAbsent(). (`if len(cus.ActiveSubscriptionIDs.OrEmpty()) > 0 { return models.NewGenericPreConditionFailedError(customer.NewErrDeletingCustomerWithActiveSubscriptions(cus.ActiveSubscriptionIDs.OrEmpty())) }`) +**Hooks/validators registered post-construction** — RegisterHooks(...models.ServiceHook[customer.Customer]) and RegisterRequestValidator(customer.RequestValidator) mutate the registries after New. Cross-domain wiring (ledgerresolvers.NewCustomerLedgerHook, subjectcustomer/entitlementvalidator hooks) is attached this way, not via Config. (`env.CustomerService.RegisterHooks(hook)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines Service struct, Config, Validate, New, RegisterHooks. The DI surface of the package. | Adding a dependency means a new Config field + a nil check in Validate; do not reach for slog.Default() or context.Background() fallbacks. | +| `customer.go` | All customer.Service method implementations (List/Create/Delete/Get/GetByUsageAttribution/Update). | Keep each mutation's adapter write, hooks, and publish inside the SAME transaction.Run closure so a hook or publish failure rolls back the write (see TestCustomerService_CreateCustomerRollsBackWhenLedgerProvisioningFails). Reads must stay pass-through. | +| `requestvalidator.go` | Implements customer.RequestValidatorService.RegisterRequestValidator delegating to requestValidatorRegistry.Register. | Validation is invoked per-method via requestValidatorRegistry.ValidateCreate/Update/DeleteCustomer wrapped in models.NewGenericValidationError; do not validate outside that wrapper. | +| `service_test.go` | End-to-end CRUD test using customertestutils.NewTestEnv + DBSchemaMigrate, asserting create/get-by-id/key/idorkey/usage-attribution, update, soft-delete semantics. | Soft delete: GetCustomer by ID still returns the (DeletedAt-set) customer, but Get by key returns *models.GenericNotFoundError; list needs IncludeDeleted:true to see it. | +| `ledger_hook_test.go` | Proves hook + transaction integration: CreateCustomer provisions ledger accounts via a registered hook, and a failing provisioner rolls back the whole create. | Uses ledgertestutils.InitDeps + ledgerresolvers.NewCustomerLedgerHook; the failing-provisioner case asserts the customer is NOT persisted (GenericNotFoundError), validating transactional hook semantics. | + +## Anti-Patterns + +- Calling s.adapter mutating methods outside transaction.Run/RunWithNoValue, or placing hooks/publish outside that closure so a later failure cannot roll back the write. +- Adding validation, hooks, or event publishing to read methods (Get/List), or skipping requestValidatorRegistry validation on a new mutation. +- Constructing Service via &Service{} literal instead of New(Config), bypassing config.Validate() nil checks. +- Returning bare errors instead of models.NewGenericValidationError / NewGenericPreConditionFailedError / NewErrDeletingCustomerWithActiveSubscriptions for the established failure modes. +- Mutating a soft-deleted customer (cus.IsDeleted()) or deleting one with active subscriptions instead of returning the precondition-failed guard. + +## Decisions + +- **Hooks and request validators are registered after construction (RegisterHooks/RegisterRequestValidator) rather than injected via Config.** — Cross-domain glue (ledger account provisioning, subject sync, entitlement-deletion guard) is wired at app/common DI time without creating import cycles back into the core customer service, and can be toggled (e.g. credits disabled -> noop ledger hook). +- **Mutation, hooks, and event publishing all run inside one transaction.Run closure.** — Guarantees atomicity: a hook (e.g. ledger provisioning) or publish failure rolls back the customer write, as exercised by the rollback test. +- **Read methods delegate directly to the adapter with no service-layer logic.** — Validation, lifecycle, and eventing only matter for state changes; keeping reads thin avoids redundant overhead on the high-fan-in read path. + +## Example: Mutating method: validate, transact, mutate, hook, publish + +``` +func (s *Service) CreateCustomer(ctx context.Context, input customer.CreateCustomerInput) (*customer.Customer, error) { + if err := s.requestValidatorRegistry.ValidateCreateCustomer(ctx, input); err != nil { + return nil, models.NewGenericValidationError(err) + } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (*customer.Customer, error) { + created, err := s.adapter.CreateCustomer(ctx, input) + if err != nil { + return nil, err + } + if err = s.hooks.PostCreate(ctx, created); err != nil { + return nil, err + } + if err := s.publisher.Publish(ctx, customer.NewCustomerCreateEvent(ctx, created)); err != nil { + return nil, fmt.Errorf("failed to publish customer created event: %w", err) + } +// ... +``` + + diff --git a/openmeter/customer/service/hooks/CLAUDE.md b/openmeter/customer/service/hooks/CLAUDE.md new file mode 100644 index 0000000000..17fee7311b --- /dev/null +++ b/openmeter/customer/service/hooks/CLAUDE.md @@ -0,0 +1,60 @@ +# hooks + + + +> Lifecycle hooks that wire the customer domain into the entitlement, subject, and billing domains. Hosts the SubjectCustomerHook (provisions/syncs a Customer whenever a Subject is created/updated/deleted via CustomerProvisioner) and the EntitlementValidatorHook (blocks customer deletion while entitlements exist). + +## Patterns + +**ServiceHook over a domain aggregate** — Every hook is a typed models.ServiceHook[T] that embeds models.NoopServiceHook[T] so only the relevant Pre*/Post* methods are overridden. A compile-time assertion proves conformance. (`var _ models.ServiceHook[customer.Customer] = (*entitlementValidatorHook)(nil); type entitlementValidatorHook struct { NoopEntitlementValidatorHook; entitlementService entitlement.Service }`) +**Public type aliases for the hook** — Each hook exposes an exported alias (e.g. EntitlementValidatorHook = models.ServiceHook[customer.Customer]) plus a Noop alias, while the concrete struct stays unexported and is only constructed via the New* function. (`type ( EntitlementValidatorHook = models.ServiceHook[customer.Customer]; NoopEntitlementValidatorHook = models.NoopServiceHook[customer.Customer] )`) +**Config + Validate + New constructor** — Each hook has a *HookConfig struct with a Validate() error method that collects errs via errors.Join (or single fmt.Errorf), and a New* constructor that calls config.Validate() before building the struct. Never construct the struct directly outside this package (tests are the exception). (`func NewEntitlementValidatorHook(config EntitlementValidatorHookConfig) (EntitlementValidatorHook, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid entitlement validator hook config: %w", err) } ... }`) +**OTel span per hook method** — Post*/EnsureCustomer methods open a tracer span (s.tracer.Start), defer span.End(), set span status Ok/Error, record errors, and emit AddEvent for branch outcomes (customer found/created/updated/not-found). (`ctx, span := s.tracer.Start(ctx, "subject_customer_hook.post_create"); defer span.End()`) +**Re-entrancy guard via skip context** — When the provisioner mutates the customer it wraps the call in subjectservicehooks.NewContextWithSkipSubjectCustomer(ctx) so the customer write does not re-trigger the subject->customer hook loop. (`cus, err = p.customer.CreateCustomer(subjectservicehooks.NewContextWithSkipSubjectCustomer(ctx), customer.CreateCustomerInput{...})`) +**Idempotent provisioning via CmpSubjectCustomer** — EnsureCustomer is the convergence point: it locates a customer by usage-attribution then by key, short-circuits with CmpSubjectCustomer when already in sync, returns GenericConflictError on key conflicts, skips soft-deleted customers (DeletedAt), and tags created/updated records with annotations createdBy/subjectId/stripeCustomerId. (`if CmpSubjectCustomer(sub, cus) { return cus, nil }`) +**Typed domain errors, never bare errors to callers** — Validation failures use models.NewGenericValidationError; not-found uses models.NewGenericNotFoundError and is detected with models.IsGenericNotFoundError; conflicts use models.NewGenericConflictError; deleted-customer preconditions use models.NewGenericPreConditionFailedError. (`return models.NewGenericValidationError(fmt.Errorf("customer has entitlements, please remove them before deleting the customer"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `subjectcustomer.go` | SubjectCustomerHook + CustomerProvisioner: PostCreate/PostUpdate call provision(); PostDelete strips the subject key from the customer's UsageAttribution.SubjectKeys; EnsureCustomer/getCustomerForSubject converge a Customer onto a Subject; EnsureStripeCustomer wires the billing CustomerOverride/payment app; MetadataFromMap/toString flatten subject metadata to models.Metadata. | PostDelete and EnsureCustomer must honour DeletedAt (skip soft-deleted customers). Key-vs-usage-attribution mismatch must yield ErrCustomerKeyConflict, not a silent overwrite. Mutations must go through NewContextWithSkipSubjectCustomer to avoid hook recursion. | +| `entitlementvalidator.go` | EntitlementValidatorHook.PreDelete blocks customer deletion when entitlement.Service.GetEntitlementsOfCustomer returns any active entitlement at clock.Now(). | Only PreDelete is overridden; do not add Post* logic here. Uses clock.Now() (not time.Now) so tests can freeze time. | +| `subjectcustomer_test.go` | Integration tests + TestEnv harness (real Postgres via testutils.InitPostgresDB, real subject/customer adapters and services, mock meter adapter, eventbus.NewMock). Provides AssertSubjectCustomerEqual / AssertSubjectCustomerStrictEqual and TestMetadataFromMap table test. | TestEnv builds dependencies from package constructors (customeradapter.New, customerservice.New, subjectservice.New) — do not import app/common wiring here. Requires Postgres; uses t.Context() and a noop tracer. | + +## Anti-Patterns + +- Constructing entitlementValidatorHook / subjectCustomerHook / CustomerProvisioner literally instead of via the New* constructor (skips config.Validate()). +- Overriding a hook method without embedding the Noop*Hook, breaking the models.ServiceHook[T] contract for the methods you did not implement. +- Calling customer.CreateCustomer/UpdateCustomer from within a subject hook without NewContextWithSkipSubjectCustomer, causing infinite hook recursion. +- Treating a key match as a customer match without checking UsageAttribution.SubjectKeys (must return GenericConflictError on mismatch). +- Mutating or deleting a soft-deleted customer (DeletedAt != nil) instead of skipping it. + +## Decisions + +- **Cross-domain glue lives in hooks rather than inside customer.Service or subject.Service.** — Keeps the core customer/subject services free of billing/entitlement imports; hooks are opt-in and wired at DI time, and IgnoreErrors lets provisioning failures degrade gracefully. +- **EnsureCustomer is idempotent and convergence-based (find-by-attribution, then find-by-key, compare, then create/update).** — Subject create/update/delete events can fire repeatedly and out of order; convergence + CmpSubjectCustomer makes re-delivery safe. +- **Subject metadata is flattened to string-valued models.Metadata via MetadataFromMap/toString.** — Customer metadata is a flat string map; the reflection-based toString deterministically serialises scalars/slices/maps (sorted) and drops unsupported values. + +## Example: A new lifecycle hook on a domain aggregate (Config/Validate/New + Noop embedding + typed error). + +``` +type EntitlementValidatorHook = models.ServiceHook[customer.Customer] +type NoopEntitlementValidatorHook = models.NoopServiceHook[customer.Customer] + +var _ models.ServiceHook[customer.Customer] = (*entitlementValidatorHook)(nil) + +type entitlementValidatorHook struct { + NoopEntitlementValidatorHook + entitlementService entitlement.Service +} + +func NewEntitlementValidatorHook(config EntitlementValidatorHookConfig) (EntitlementValidatorHook, error) { + if err := config.Validate(); err != nil { + return nil, fmt.Errorf("invalid entitlement validator hook config: %w", err) + } + return &entitlementValidatorHook{entitlementService: config.EntitlementService}, nil +// ... +``` + + diff --git a/openmeter/customer/testutils/CLAUDE.md b/openmeter/customer/testutils/CLAUDE.md new file mode 100644 index 0000000000..de7ce75f41 --- /dev/null +++ b/openmeter/customer/testutils/CLAUDE.md @@ -0,0 +1,38 @@ +# testutils + + + +> Shared test harness for the customer domain. Provides a TestEnv that wires a real Postgres-backed customer + subject service stack for integration tests, plus ULID/namespace helpers. + +## Patterns + +**TestEnv built from concrete constructors** — NewTestEnv wires the stack directly: testutils.InitPostgresDB, eventbus.NewMock, meteradapter (mockadapter), subjectadapter/subjectservice, customeradapter/customerservice — never via app/common DI, avoiding test-only import cycles. (`customerAdapter, _ := customeradapter.New(customeradapter.Config{Client: client, Logger: logger}); customerService, _ := customerservice.New(customerservice.Config{Adapter: customerAdapter, Publisher: publisher})`) +**Lazy schema migration + once-guarded close** — DBSchemaMigrate runs Schema.Create(t.Context()) on demand; Close uses sync.Once to close ent/pg drivers and the client exactly once. (`e.close.Do(func(){ e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })`) +**Discard logger and noop tracer in tests** — Uses testutils.NewDiscardLogger(t) and noop.NewTracerProvider().Tracer for observability deps so tests stay silent and dependency-free. (`logger := testutils.NewDiscardLogger(t); tracer := noop.NewTracerProvider().Tracer("test_env")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `env.go` | TestEnv struct + NewTestEnv/Close/DBSchemaMigrate, and NewTestULID (aliased as NewTestNamespace). | Meter uses meter/mockadapter.New(nil); event publisher is eventbus.NewMock(t); caller must invoke DBSchemaMigrate before using the DB. | + +## Anti-Patterns + +- Importing app/common wiring here — build services from underlying constructors to avoid test-only import cycles +- Sharing a TestEnv across tests instead of one per test (it owns a t-scoped Postgres DB) +- Forgetting DBSchemaMigrate before exercising the adapter/service + +## Decisions + +- **Construct the customer/subject stack from package constructors rather than DI wiring** — Keeps testutils independent of app/common so unrelated wiring additions can't introduce import cycles in domain tests. + +## Example: Wiring the customer service stack for tests + +``` +customerAdapter, err := customeradapter.New(customeradapter.Config{Client: client, Logger: logger}) +require.NoErrorf(t, err, "initializing customer adapter must not fail") +customerService, err := customerservice.New(customerservice.Config{Adapter: customerAdapter, Publisher: publisher}) +require.NoErrorf(t, err, "initializing customer service must not fail") +``` + + diff --git a/openmeter/debug/httpdriver/CLAUDE.md b/openmeter/debug/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..9024ac48b5 --- /dev/null +++ b/openmeter/debug/httpdriver/CLAUDE.md @@ -0,0 +1,56 @@ +# httpdriver + + + +> HTTP driver (transport layer) for the debug domain. Exposes a single read-only endpoint that returns per-subject ingested-event counts in OpenMetrics/Prometheus text format by delegating to debug.DebugConnector.GetDebugMetrics. + +## Patterns + +**Handler interface + private struct + constructor** — Expose a DebugHandler interface whose methods return typed httptransport handlers; back it with an unexported debugHandler struct holding decoder, connector, and []httptransport.HandlerOption; construct via NewDebugHandler. (`type DebugHandler interface { GetMetrics() GetMetricsHandler }; func NewDebugHandler(namespaceDecoder, debugConnector, options...) DebugHandler`) +**Three-stage httptransport.NewHandlerWithArgs** — Each endpoint is built as decode (request -> typed Request) + business (Request -> Response, delegates to connector) + response encoder, wired through httptransport.NewHandlerWithArgs with type params making Request/Response/Params explicit. (`httptransport.NewHandlerWithArgs[GetMetricsHandlerRequest, string, GetMetricsHandlerParams](decode, exec, commonhttp.PlainTextResponseEncoder[string], opts...)`) +**Per-endpoint Request/Params/Response type aliases** — Define GetMetricsHandlerRequest (wrapping a params struct), GetMetricsHandlerParams, GetMetricsHandlerResponse, and a GetMetricsHandler alias over httptransport.HandlerWithArgs[...] so the router gets a named handler type. (`type GetMetricsHandler httptransport.HandlerWithArgs[GetMetricsHandlerRequest, GetMetricsHandlerResponse, GetMetricsHandlerParams]`) +**Namespace resolved from context decoder, not request body** — Multi-tenancy namespace comes from namespacedriver.NamespaceDecoder.GetNamespace(ctx); the decode stage calls h.resolveNamespace(ctx) and fails with a 500 HTTPError when absent. (`ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return commonhttp.NewHTTPError(http.StatusInternalServerError, ...) }`) +**Custom error encoder maps validation errors to 400** — Attach a WithErrorEncoder via httptransport.AppendOptions that converts models.IsGenericValidationError(err) into a 400 commonhttp.NewHTTPError and returns true; return false to fall through to default handling. (`httptransport.WithErrorEncoder(func(...) bool { if models.IsGenericValidationError(err) { commonhttp.NewHTTPError(http.StatusBadRequest, err).EncodeError(ctx, w); return true }; return false })`) +**Plain-text (OpenMetrics) response encoding** — Response is a raw string of OpenMetrics text, so it uses commonhttp.PlainTextResponseEncoder[string] rather than a JSON encoder. (`commonhttp.PlainTextResponseEncoder[string]`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `metrics.go` | Sole file: defines DebugHandler interface, debugHandler struct, NewDebugHandler constructor, GetMetrics handler, and resolveNamespace helper. | Business stage must only delegate to h.debugConnector.GetDebugMetrics; no querying logic here. resolveNamespace returns 500 (not 400) when namespace missing because that signals a wiring/middleware failure, not bad user input. | + +## Anti-Patterns + +- Putting metric-counting/streaming query logic in the handler instead of delegating to debug.DebugConnector. +- Reading namespace from a query param or body instead of namespacedriver.NamespaceDecoder.GetNamespace(ctx). +- Returning a JSON response encoder for this endpoint; output is OpenMetrics plain text via PlainTextResponseEncoder. +- Bypassing httptransport.NewHandlerWithArgs and writing directly to http.ResponseWriter in the business stage. +- Dropping the WithErrorEncoder validation-to-400 mapping, causing validation errors to surface as 500s. + +## Decisions + +- **Transport layer is split from domain (httpdriver vs parent debug package).** — Keeps HTTP concerns (decoding, namespace resolution, error encoding) separate from the OpenMetrics/streaming logic in debug.DebugConnector, matching OpenMeter's service/adapter/driver layering. +- **Response is emitted as OpenMetrics text, not the project's usual JSON.** — The debug endpoint is meant to be scraped/monitored Prometheus-style to observe ingested event counts per subject, so PlainTextResponseEncoder is used. + +## Example: Adding a new debug endpoint following the existing handler pattern + +``` +func (h *debugHandler) GetMetrics() GetMetricsHandler { + return httptransport.NewHandlerWithArgs[GetMetricsHandlerRequest, string, GetMetricsHandlerParams]( + func(ctx context.Context, r *http.Request, params GetMetricsHandlerParams) (GetMetricsHandlerRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return GetMetricsHandlerRequest{}, err + } + return GetMetricsHandlerRequest{params: GetMetricsHandlerRequestParams{Namespace: ns}}, nil + }, + func(ctx context.Context, request GetMetricsHandlerRequest) (string, error) { + return h.debugConnector.GetDebugMetrics(ctx, request.params.Namespace) + }, + commonhttp.PlainTextResponseEncoder[string], + httptransport.AppendOptions(h.options, httptransport.WithErrorEncoder(func(ctx context.Context, err error, w http.ResponseWriter, _ *http.Request) bool { + if models.IsGenericValidationError(err) { +// ... +``` + + diff --git a/openmeter/dedupe/memorydedupe/CLAUDE.md b/openmeter/dedupe/memorydedupe/CLAUDE.md new file mode 100644 index 0000000000..e54b597b4f --- /dev/null +++ b/openmeter/dedupe/memorydedupe/CLAUDE.md @@ -0,0 +1,33 @@ +# memorydedupe + + + +> In-memory implementation of the openmeter/dedupe.Deduplicator interface, backed by a fixed-size hashicorp golang-lru cache. Used by openmeter/ingest for single-process event deduplication where no shared Redis is configured. + +## Patterns + +**Implement full dedupe.Deduplicator interface** — Deduplicator must implement every method of openmeter/dedupe.Deduplicator: IsUnique, CheckUnique, Set, CheckUniqueBatch, Close. Missing one breaks app/config wiring. (`func (d *Deduplicator) IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error)`) +**Key derived only via dedupe.Item.Key()** — Build a dedupe.Item{Namespace, ID, Source} and call item.Key() for the cache key — never hand-format the namespace-source-id string. (`item := dedupe.Item{Namespace: namespace, ID: ev.ID(), Source: ev.Source()}; d.store.ContainsOrAdd(item.Key(), nil)`) +**IsUnique mutates as it checks** — IsUnique both tests uniqueness AND inserts the key atomically via store.ContainsOrAdd, returning !isContained. CheckUnique is read-only (store.Contains). (`isContained, _ := d.store.ContainsOrAdd(item.Key(), nil); return !isContained, nil`) +**Constructor clamps invalid size to defaultSize** — NewDeduplicator(size) replaces size<1 with defaultSize (1024) before calling lru.New, and returns the lru error unwrapped. (`if size < 1 { size = defaultSize }`) +**Cache stores nil values, keys carry all signal** — Only presence of the key matters; values are always nil/struct{}{}. CheckUniqueBatch partitions items into UniqueItems / AlreadyProcessedItems ItemSets. (`result.AlreadyProcessedItems[item] = struct{}{}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `memorydedupe.go` | The entire implementation: Deduplicator struct wrapping *lru.Cache[string, any] plus NewDeduplicator constructor and all interface methods. | Set returns (nil, nil) — it never reports already-existing items unlike redisdedupe.Set; callers needing existing-item detection must use CheckUniqueBatch. Close is a no-op. | +| `memorydedupe_test.go` | Black-box tests (package memorydedupe_test) verifying IsUnique flips true->false on repeat and Set+CheckUnique interaction. | Tests construct dedupe.Item literals directly; keep field order Namespace/ID/Source consistent with the interface. | + +## Anti-Patterns + +- Persisting or sharing state across processes — this is per-process only; use redisdedupe for distributed dedup. +- Returning non-nil from Set's existing-items slice (the in-memory impl intentionally returns nil). +- Constructing the cache key by string-formatting instead of dedupe.Item.Key(). +- Adding eviction-sensitive correctness assumptions — LRU silently evicts old keys, so dedup is best-effort within cache size. + +## Decisions + +- **Use hashicorp golang-lru with a bounded default size (1024).** — Bounds memory for an in-process cache while accepting that very old event IDs may be evicted; dedup is a best-effort safeguard, not a guarantee. + + diff --git a/openmeter/dedupe/redisdedupe/CLAUDE.md b/openmeter/dedupe/redisdedupe/CLAUDE.md new file mode 100644 index 0000000000..183cd512f0 --- /dev/null +++ b/openmeter/dedupe/redisdedupe/CLAUDE.md @@ -0,0 +1,57 @@ +# redisdedupe + + + +> Redis-backed implementation of openmeter/dedupe.Deduplicator for distributed, TTL-bounded event deduplication. Wired via app/config; supports three keying modes including a live migration from raw keys to hashed keys. + +## Patterns + +**Mode switch on every key operation** — Every method switches on d.Mode (DedupeModeRawKey / DedupeModeKeyHash / DedupeModeKeyHashMigration) to decide whether to use item.Key() raw or GetKeyHash(item.Key()). Migration mode checks both. (`case DedupeModeKeyHash: keyHash := GetKeyHash(item.Key()); return d.setKey(ctx, keyHash)`) +**SET NX with TTL as the uniqueness primitive** — setKey uses Redis SetArgs{TTL: d.Expiration, Mode: "nx"}; status "OK" => unique, "" => duplicate. redis.Nil is treated as non-error. (`status, err := d.Redis.SetArgs(ctx, key, "", redis.SetArgs{TTL: d.Expiration, Mode: "nx"}).Result()`) +**Hash keys via GetKeyHash (xxh3-128 + base64 RawURL)** — keyhash.go hashes item.Key() with xxh3 HashString128 and base64.RawURLEncoding to shrink Redis memory ~57% vs raw keys; non-cryptographic but collision-safe at expected volume. (`b64 := base64.RawURLEncoding.EncodeToString(hashBytes[:])`) +**Migration mode double-checks the old raw key** — DedupeModeKeyHashMigration sets the hashed key, then if it appears unique also probes Redis.Exists(item.Key()) to detect pre-migration raw keys before declaring uniqueness. (`isSet, err := d.Redis.Exists(ctx, item.Key()).Result(); keyExists := isSet == 1; return !keyExists, nil`) +**Batch ops use Pipelined / MGet and tolerate redis.Nil** — Set pipelines SetArgs NX and collects existing items from per-command redis.Nil errors; CheckUniqueBatch MGets all keys and partitions by nil result. Both guard with errors.Is(err, redis.Nil). (`cmds, err := d.Redis.Pipelined(ctx, func(pipe redis.Pipeliner) error {...})`) +**Validate mode and guard nil client** — DedupeMode.Validate() rejects unknown modes; IsUnique returns an error if d.Redis is nil. CheckUniqueBatch returns ErrNoDedupItems on empty input. (`if d.Redis == nil { return false, errors.New("redis client not initialized") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `redisdedupe.go` | Deduplicator value type (Redis client, Expiration, Mode) implementing the dedupe interface, plus DedupeMode constants/Validate and ErrNoDedupItems. | Methods are value receivers, not pointer. Set's pipeline Mode is "NX" (uppercase) while setKey uses "nx" (lowercase) — Redis treats both the same, but keep the distinction intentional. Set returns existing (duplicate) items, opposite-sense from CheckUniqueBatch's UniqueItems. | +| `keyhash.go` | GetKeyHash: deterministic xxh3-128 + base64 RawURL encoding of an item key, with a long comment block justifying the hash choice and keyspace/collision math. | Changing the hash function or encoding silently invalidates all existing Redis keys — only safe behind DedupeModeKeyHashMigration. RawURLEncoding (no padding) is required to keep Lua-safe keys. | + +## Anti-Patterns + +- Adding a new key-format without a corresponding migration mode — switching modes in place orphans existing keys and breaks dedup correctness. +- Treating redis.Nil as a fatal error in batch/set paths; it signals NX-skip or missing key and must be tolerated. +- Calling methods assuming pointer receivers or assuming Set returns unique items (it returns existing/duplicate items). +- Hand-formatting keys instead of going through item.Key() then GetKeyHash. +- Omitting TTL on SetArgs — keys must expire via d.Expiration to bound the dedup window and Redis memory. + +## Decisions + +- **Hash keys to base64(xxh3-128) instead of storing raw orgId-source-id strings.** — Raw keys average ~77 chars; xxh3-128 base64 is ~22 chars (~57% Redis memory saving) with ~1e-30 collision probability at 300M events, and base64 avoids binary-key handling in Lua. +- **Provide an explicit DedupeModeKeyHashMigration that checks both old and new key formats.** — Allows live cutover from raw to hashed keys without losing dedup coverage for already-recorded events during the TTL overlap window. + +## Example: Unique-check that atomically records the event under the configured key mode + +``` +import ( + "github.com/redis/go-redis/v9" + "github.com/openmeterio/openmeter/openmeter/dedupe" +) + +func (d Deduplicator) setKey(ctx context.Context, key string) (bool, error) { + status, err := d.Redis.SetArgs(ctx, key, "", redis.SetArgs{TTL: d.Expiration, Mode: "nx"}).Result() + if err != nil && err != redis.Nil { + return false, err + } + if status == "" { // existed -> duplicate + return false, nil + } + if status == "OK" { // newly set -> unique + return true, nil +// ... +``` + + diff --git a/openmeter/ent/schema/CLAUDE.md b/openmeter/ent/schema/CLAUDE.md new file mode 100644 index 0000000000..fd2206dc9a --- /dev/null +++ b/openmeter/ent/schema/CLAUDE.md @@ -0,0 +1,65 @@ +# schema + + + +> Hand-written Ent entity definitions that are the single source of truth for the PostgreSQL schema. ~35 files (customer, billing, charges*, ledger_*, subscription, entitlement, grant, feature, meter, notification, productcatalog, taxcode, app*) compile via `make generate` into the read-only `openmeter/ent/db` and feed Atlas migration diffs. + +## Patterns + +**Standard ent.Schema quartet** — Each entity is a struct embedding `ent.Schema` with `Mixin()`, `Fields()`, `Edges()`, `Indexes()` methods. Compose shared columns via entutils mixins rather than redeclaring them. (`func (Customer) Mixin() []ent.Mixin { return []ent.Mixin{entutils.ResourceMixin{}, entutils.CustomerAddressMixin{FieldPrefix: "billing"}, entutils.AnnotationsMixin{}} }`) +**entutils mixins for identity/namespace/time** — Use entutils.IDMixin / NamespaceMixin / TimeMixin / MetadataMixin / AnnotationsMixin / ResourceMixin (or UniqueResourceMixin). Never hand-roll id/namespace/created_at columns. (`Mixin: entutils.IDMixin{}, entutils.NamespaceMixin{}, entutils.TimeMixin{}`) +**ULID FK columns as char(26)** — Every foreign-key string field that references another entity's ULID id sets SchemaType char(26) for Postgres. (`field.String("customer_id").SchemaType(map[string]string{dialect.Postgres: "char(26)"})`) +**Decimals via alpacadecimal numeric** — Monetary/quantity values use field.Other(name, alpacadecimal.Decimal{}) with Postgres SchemaType "numeric"; never field.Float for money. (`field.Other("per_unit_amount", alpacadecimal.Decimal{}).SchemaType(map[string]string{dialect.Postgres: "numeric"})`) +**JSON columns via ValueScanner + jsonb** — Complex domain types are persisted as jsonb either with field.JSON or field.String(...).GoType(...).ValueScanner(...). Package-level scanners are built with entutils.JSONStringValueScanner[T]() or a manual field.ValueScannerFunc (see notification ChannelConfig/RuleConfig, AnnotationsValueScanner). (`field.String("price").GoType(&productcatalog.Price{}).ValueScanner(PriceValueScanner).SchemaType(map[string]string{dialect.Postgres: "jsonb"})`) +**Soft-delete-aware partial unique indexes** — Uniqueness on namespaced business keys is enforced with index.Fields(...).Annotations(entsql.IndexWhere("deleted_at IS NULL")).Unique() so deleted rows don't collide. GIN indexes are declared for jsonb annotation columns. (`index.Fields("namespace", "key", "version").Annotations(entsql.IndexWhere("deleted_at IS NULL")).Unique()`) +**Edge ownership via From/Ref + Field** — FK ownership is declared with edge.From(name, T.Type).Ref("...").Field("fk_col").Unique().Required(); cascade behavior set with entsql.OnDelete(entsql.Cascade/SetNull). Same-ID 1:1 app subtables use StorageKey(edge.Column("id")) instead of Field to avoid ent generation breaking. (`edge.From("customer", Customer.Type).Ref("billing_customer_override").Field("customer_id").Unique().Required().Immutable()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `billing.go` | BillingProfile, BillingWorkflowConfig, BillingCustomerOverride, BillingInvoiceLine (+ flat-fee/usage-based line configs) — the largest schema file; defines package-level BillingDiscountsValueScanner etc. | BillingInvoiceLine carries deprecated fields (line_ids) and a wide edge set to charges; do not remove deprecated fields without a migration. Quantity is optional/nillable because UBP quantity is only known at issue time. | +| `charges.go` | Charge (typed parent) plus ChargesSearchV1 ent.View that UNION ALLs the three charge subtype tables. | ent.View (ChargesSearchV1) does NOT appear in generated migrate.Tables — Atlas diff reports no changes for view DDL; the view needs an explicit SQL migration. The view's Mixin() must stay empty (no edges/indexes) or ent generation panics. | +| `chargesflatfee.go / chargesusagebased.go / chargescreditpurchase.go` | Charge subtype tables and their realization-run/payment/credit-allocation children, composed from chargemeta/payment/creditrealization/invoicedusage/stddetailedline mixins. | ChargeUsageBased pins its table name via Annotations entsql.Annotation{Table: "charge_usage_based"}; renaming structs without the annotation changes the physical table. | +| `customer.go` | Customer + CustomerSubjects join table; central hub with edges to apps, subscriptions, entitlements, billing override, and all three charge subtypes. | Large in-code comment warns that v3 ILIKE filters need pg_trgm GIN indexes (a custom SQL migration) before the customers list handler is exposed — the btree indexes here cannot serve leading-wildcard search. | +| `feature.go` | Feature entity with LLM unit-cost columns and CHECK constraints. | Annotations() declares Postgres CHECK constraints (unit_cost_llm_*_mutual_exclusive); changing the mutually-exclusive column pairs requires updating these checks. | +| `ledger_account.go / ledger_entry.go / ledger_transaction*.go` | Double-entry ledger tables (account, sub-account, route, entry, transaction, transaction_group). | LedgerSubAccountRoute stores denormalized routing values (currency, tax_code as TaxCode.Key string, features text[]) that are NOT FKs. LedgerEntry/Transaction fields are Immutable() — append-only accounting source of truth. | +| `notification.go` | Notification channels/rules with manual field.ValueScannerFunc scanners (ChannelConfigValueScanner, RuleConfigValueScanner). | Uses the verbose field.ValueScannerFunc[T, *sql.NullString]{V:..., S:...} form (also AnnotationsValueScanner) rather than entutils.JSONStringValueScanner — keep nil/!Valid handling in the S func. | +| `ratecard.go / productcatalog.go / planaddon.go / addon.go` | Plan/addon/ratecard product-catalog schema; defines shared productcatalog scanners (PriceValueScanner, DiscountsValueScanner, EntitlementTemplateValueScanner, TaxConfigValueScanner, ProRatingConfigValueScanner). | AddonRateCard.Fields() borrows RateCard{}.Fields() via direct call (commented 'ent/runtime.go bug') and appends — keep that pattern when extending. | + +## Anti-Patterns + +- Editing generated code under openmeter/ent/db/ — it is regenerated from these schemas (DO NOT EDIT header). +- Adding/changing a field, index, or edge without running `make generate` then `atlas migrate --env local diff ` to produce up/down SQL + atlas.sum. +- Using field.Float or default varchar for money/quantity instead of alpacadecimal.Decimal with numeric SchemaType. +- Declaring a plain unique index on a business key without entsql.IndexWhere("deleted_at IS NULL") — soft-deleted rows will collide. +- Adding mixins, edges, or indexes to an ent.View (e.g. ChargesSearchV1) — ent generation panics; views also need hand-written SQL migrations. + +## Decisions + +- **Ent schema is the DB source of truth, Atlas diffs migrations from it** — Single Go definition drives generated query code (ent/db), migration metadata, and type-safe edges; migrations are reproducible diffs rather than hand-written DDL (except views). +- **Soft delete (deleted_at) + partial indexes everywhere** — Resources are rarely hard-deleted; partial unique indexes let a key be reused after delete while preserving history and audit trails. +- **Same-ID 1:1 subtype tables (App↔AppStripe, Charge↔ChargeFlatFee) joined by StorageKey(id)** — Avoids ent generating conflicting SetAppID/SetXAppID setters; the subtype shares the parent's ULID so the join is trivial. + +## Example: A namespaced, soft-deletable entity with a jsonb annotations column, ULID FK, decimal amount, and a partial-unique index + +``` +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/dialect" + "entgo.io/ent/dialect/entsql" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "entgo.io/ent/schema/index" + "github.com/alpacahq/alpacadecimal" + + "github.com/openmeterio/openmeter/pkg/framework/entutils" +) + +type Widget struct{ ent.Schema } +// ... +``` + + diff --git a/openmeter/ent/tx/CLAUDE.md b/openmeter/ent/tx/CLAUDE.md new file mode 100644 index 0000000000..33fc3872c7 --- /dev/null +++ b/openmeter/ent/tx/CLAUDE.md @@ -0,0 +1,39 @@ +# tx + + + +> Single-file adapter that bridges the generated Ent client to the generic transaction.Creator abstraction in pkg/framework/transaction, so domain repos can open transactions without importing the concrete ent.Client. + +## Patterns + +**Ent-backed transaction.Creator** — NewCreator(db *db.Client) returns a transaction.Creator whose Tx(ctx) hijacks an ent tx and wraps it with entutils.NewTxDriver, returning a context that carries the tx. (`func NewCreator(db *db.Client) transaction.Creator { return &txCreator{db: db} }`) +**HijackTx + NewTxDriver wrapping** — Tx() calls db.HijackTx(ctx, &sql.TxOptions{ReadOnly:false}) and returns entutils.NewTxDriver(eDriver, rawConfig) as the transaction.Driver; errors are wrapped with fmt.Errorf(...%w...). (`txCtx, rawConfig, eDriver, err := t.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `enttx.go` | Defines unexported txCreator{db *db.Client} and exported NewCreator; the only public surface of package enttx. | Tx is hardcoded ReadOnly:false; the returned txCtx must be threaded down so repos rebind to the tx (entutils.TransactingRepo) — discarding it loses transaction propagation. | + +## Anti-Patterns + +- Importing openmeter/ent/db directly in domain repos instead of depending on transaction.Creator from this adapter. +- Swallowing the context returned by Tx() — downstream entutils.TransactingRepo relies on the tx carried in ctx. + +## Decisions + +- **Wrap ent transactions behind transaction.Creator** — Keeps the wide set of consumers (app/common, ledger/*, entitlement/metered, registry/builder, billing subscriptionsync) decoupled from the concrete ent client and uniform with pkg/framework/transaction semantics. + +## Example: Wiring an ent client as a transaction.Creator + +``` +import ( + enttx "github.com/openmeterio/openmeter/openmeter/ent/tx" + "github.com/openmeterio/openmeter/openmeter/ent/db" + "github.com/openmeterio/openmeter/pkg/framework/transaction" +) + +var creator transaction.Creator = enttx.NewCreator(entClient) // entClient *db.Client +``` + + diff --git a/openmeter/entitlement/CLAUDE.md b/openmeter/entitlement/CLAUDE.md new file mode 100644 index 0000000000..d7240b4c97 --- /dev/null +++ b/openmeter/entitlement/CLAUDE.md @@ -0,0 +1,54 @@ +# entitlement + + + +> Access-control domain. The root declares entitlement.Service, EntitlementRepo, the Access model, the Entitlement/GenericProperties domain type with its three subtypes (metered/static/boolean), scheduling semantics (ActiveFrom/ActiveTo), usage-period logic, and versioned v2 events. Subpackages implement the metered connector, balance worker, snapshots and HTTP drivers. + +## Patterns + +**Entitlement subtype via SubTypeConnector** — EntitlementType (metered|static|boolean) selects a SubTypeConnector whose BeforeCreate maps CreateEntitlementInputs + feature.Feature into CreateEntitlementRepoInputs and whose GetValue computes the EntitlementValue (HasAccess()). (`type SubTypeConnector interface { GetValue(ctx, *Entitlement, time.Time) (EntitlementValue, error); BeforeCreate(CreateEntitlementInputs, feature.Feature) (*CreateEntitlementRepoInputs, error); AfterCreate(...) error }`) +**Scheduling via ActiveFrom/ActiveTo with cadence** — GenericProperties carries optional ActiveFrom/ActiveTo; ActiveFromTime() defaults to CreatedAt, ActiveToTime() falls back to DeletedAt; Entitlement implements models.CadenceComparable. IsActive(at) checks deletion, schedule window, and zero-length windows. (`var _ models.CadenceComparable = Entitlement{} +func (e Entitlement) GetCadence() models.CadencedModel { ... }`) +**MeasureUsageFrom dual source** — MeasureUsageFromInput resolves either FromTime(t) or FromEnum(CURRENT_PERIOD_START|NOW, currPeriod, now); the enum validates against its Values() set. (`m.FromEnum(MeasureUsageFromCurrentPeriodStart, currPer, now)`) +**Versioned literal event payloads** — events.go types out entitlementEventV2EntitlementLiteral field-by-field (instead of versioning the domain model) with mapEntitlementToV2 / ToDomainEntitlement round-trips; events are EntitlementCreatedEventV2 / EntitlementDeletedEventV2 with metadata Subject = customer resource path. (`entitlementCreatedEventV2Name = metadata.GetEventName(metadata.EventType{Subsystem: EventSubsystem, Name: "entitlement.created", Version: "v2"})`) +**Repository keys on customer + feature + time** — EntitlementRepo resolves active and scheduled entitlements by (namespace, customerID, featureKey, at); deactivation sets activeTo. Service.GetEntitlementOfCustomerAt disambiguates id-vs-featureKey by trying ID first. (`GetActiveEntitlementOfCustomerAt(ctx, namespace, customerID, featureKey, at) (*Entitlement, error)`) +**Grants only on metered entitlements** — CreateEntitlementGrantInputs embeds credit.CreateGrantInput; ErrEntitlementGrantsOnlySupportedForMeteredEntitlements (a ValidationIssue) gates grant attachment. (`var ErrEntitlementGrantsOnlySupportedForMeteredEntitlements = models.NewValidationIssue(...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement.go` | Entitlement/GenericProperties model, EntitlementType enum, CreateEntitlementInputs (+Equal/+Validate), IsActive/GetCadence, MeasureUsageFromInput | CreateEntitlementInputs.Equal is hand-written field-by-field; add new fields there too. Static type requires valid-JSON Config. | +| `connector.go` | Service interface (Create/Override/Schedule/Supersede/Get/List/GetAccess) and ListEntitlementsParams | GetEntitlementOfCustomerAt resolves ambiguous id-or-featureKey; features whose keys look like entitlement IDs are forbidden. | +| `entitlement_types.go` | EntitlementValue (HasAccess), NoAccessValue, SubTypeConnector seam | Each type routes through a SubTypeConnector; BeforeCreate errors must abort creation. | +| `repository.go` | EntitlementRepo interface (active/scheduled lookups, deactivate, usage-period upsert, namespace listing) | Time-windowed methods rely on ActiveFrom/ActiveTo + DeletedAt; respect Highwatermark/Cursor for expiry sweeps. | +| `events.go` | Versioned v2 entitlement event literals + domain round-trip | Event payload is a typed literal, NOT the domain struct; keep mapEntitlementToV2Literal and ToDomainEntitlement in sync. | +| `access.go` | Access = map of featureKey -> EntitlementValueWithId (Type/Value/ID) | GetAccess returns per-feature values keyed by featureKey. | +| `errors.go` | Typed errors (AlreadyExists/AlreadyDeleted/NotFound/WrongType/Forbidden) + grant/property-mismatch ValidationIssues | Use the ValidationIssue variants for API-surfaced create-mismatch / grant constraints. | + +## Anti-Patterns + +- Adding a field to CreateEntitlementInputs without updating its hand-written Equal and Validate. +- Bypassing the SubTypeConnector to compute an EntitlementValue or build repo inputs for a specific type. +- Attaching grants to non-metered entitlements (use ErrEntitlementGrantsOnlySupportedForMeteredEntitlements). +- Deriving active state from DeletedAt alone instead of IsActive(at)/GetCadence, which also account for ActiveFrom/ActiveTo and zero-length windows. +- Editing the domain Entitlement struct expecting events to follow — events use a separate typed v2 literal that must be updated explicitly. + +## Decisions + +- **Entitlement events are versioned as hand-typed literals instead of versioning the domain model.** — Versioning the full domain model was too large a lift; literal events let payload shape evolve independently while ToDomainEntitlement reconstructs the domain type for validation. +- **Three entitlement types share one model and are differentiated by a SubTypeConnector.** — Keeps generic CRUD/scheduling uniform while letting metered (usage+credit), static (config), and boolean access compute values differently. + +## Example: Computing active state across schedule and deletion + +``` +func (e Entitlement) IsActive(at time.Time) bool { + if e.DeletedAt != nil && !at.Before(*e.DeletedAt) { return false } + if e.ActiveFromTime().After(at) { return false } + if e.ActiveTo != nil && !at.Before(*e.ActiveTo) { return false } + if e.ActiveToTime() != nil && e.ActiveFromTime().Equal(*e.ActiveToTime()) { return false } + return true +} +``` + + diff --git a/openmeter/entitlement/adapter/CLAUDE.md b/openmeter/entitlement/adapter/CLAUDE.md new file mode 100644 index 0000000000..acf4bb3342 --- /dev/null +++ b/openmeter/entitlement/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Postgres/Ent persistence layer for entitlements and usage resets. Implements entitlement.EntitlementRepo plus balanceworker.BalanceWorkerRepository over the Ent db.Client, and is the only place where entitlement DB rows are mapped to/from domain models. + +## Patterns + +**Wrap every method in TransactingRepo** — All repo methods enter entutils.TransactingRepo(ctx, a, func(ctx, repo){...}) so they rebind to the tx already carried in ctx instead of using the raw client directly. (`func (a *entitlementDBAdapter) GetEntitlement(ctx, id) (*entitlement.Entitlement, error) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *entitlementDBAdapter) (...) {...}) }`) +**TxUser/Creator triple in transaction.go** — Each adapter implements Tx, WithTx and Self via HijackTx + NewTxClientFromRawConfig so it satisfies transaction.Creator and entutils.TxUser[*T]. (`func (e *entitlementDBAdapter) WithTx(ctx, tx *entutils.TxDriver) *entitlementDBAdapter { txClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return NewPostgresEntitlementRepo(txClient.Client()) }`) +**Interface compliance asserted with var _** — Compile-time assertions pin the concrete adapter to its interfaces, e.g. var _ repo = (*entitlementDBAdapter)(nil) where repo embeds EntitlementRepo and BalanceWorkerRepository. (`var _ repo = (*entitlementDBAdapter)(nil)`) +**Map db.Entitlement to domain via mapEntitlementEntity** — Never return raw Ent rows; every read funnels through repo.mapEntitlementEntity(res) after loading usage-reset edges with withAllUsageResets(...). (`return repo.mapEntitlementEntity(res)`) +**NotFound translated to domain errors** — db.IsNotFound(err) is converted to &entitlement.NotFoundError{...} or models.NewGenericNotFoundError(...) rather than leaking Ent errors. (`if db.IsNotFound(err) { return nil, &entitlement.NotFoundError{EntitlementID: entitlementID} }`) +**Soft-delete and active-window predicates** — Queries always guard with DeletedAtGT(at)/DeletedAtIsNil, customerNotDeletedAt(at) and EntitlementActiveAt(at) helpers rather than returning deleted/inactive rows. (`db_entitlement.Or(db_entitlement.DeletedAtGT(at), db_entitlement.DeletedAtIsNil())`) +**Raw SQL builder for cross-table fan-out** — Complex subject->customer / meter->feature resolution uses sql.Dialect(...).With(...) CTEs (EntitlementsByIngestedEventsQuery) executed via repo.db.QueryContext, with rows.Scan into balanceworker structs. (`query, args := EntitlementsByIngestedEventsQuery(dialect, ns, subject, meters...); rows, err := repo.db.QueryContext(ctx, query, args...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement.go` | entitlementDBAdapter: all entitlement CRUD/list queries and the EntitlementsByIngestedEventsQuery CTE builder | GetActiveEntitlementOfCustomerAt uses .First() with a FIXME about not asserting single result; ListEntitlements splits FeatureIDsOrKeys into IDs vs keys via ulid.Parse | +| `usage_reset.go` | usageResetDBAdapter implementing meteredentitlement.UsageResetRepo (Save creates UsageReset rows) | Validate() is called inside the tx before insert; keep anchor/interval fields in sync with UsageResetUpdate | +| `transaction.go` | Tx/WithTx/Self plumbing for both adapters | Two structs share this file; adding a new adapter here means adding all three methods or TxUser compliance breaks | +| `entitlement_test.go` | adapter_test integration tests with real Postgres via testutils.InitPostgresDB | Schema created under a package-level sync.Mutex m; tests build repos via NewPostgresEntitlementRepo/NewPostgresUsageResetRepo, not app wiring | + +## Anti-Patterns + +- Calling repo.db.* outside a TransactingRepo wrapper, breaking tx propagation carried in ctx +- Returning raw *db.Entitlement rows instead of mapping through mapEntitlementEntity +- Leaking db.IsNotFound errors instead of entitlement.NotFoundError / GenericNotFoundError +- Querying entitlements without DeletedAt / active-window guards +- Adding business logic (defaulting, validation) here instead of in the service/connector layer + +## Decisions + +- **Adapter implements both EntitlementRepo and BalanceWorkerRepository via a private repo interface** — The balance worker reuses entitlement persistence, so one Ent-backed type serves both and stays consistent under a single tx. +- **Hand-written CTE SQL for ingest-event fan-out** — Resolving customer-by-subject and feature-by-meter in one round trip is impractical with the Ent fluent API. + +## Example: Transaction-aware read returning a mapped domain entitlement + +``` +func (a *entitlementDBAdapter) GetEntitlement(ctx context.Context, id models.NamespacedID) (*entitlement.Entitlement, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *entitlementDBAdapter) (*entitlement.Entitlement, error) { + res, err := withAllUsageResets(repo.db.Entitlement.Query(), []string{id.Namespace}). + Where(db_entitlement.ID(id.ID), db_entitlement.Namespace(id.Namespace), + db_entitlement.Or(db_entitlement.DeletedAtGT(clock.Now()), db_entitlement.DeletedAtIsNil())).First(ctx) + if err != nil { + if db.IsNotFound(err) { return nil, &entitlement.NotFoundError{EntitlementID: id} } + return nil, err + } + return repo.mapEntitlementEntity(res) + }) +} +``` + + diff --git a/openmeter/entitlement/balanceworker/CLAUDE.md b/openmeter/entitlement/balanceworker/CLAUDE.md new file mode 100644 index 0000000000..faa662fa18 --- /dev/null +++ b/openmeter/entitlement/balanceworker/CLAUDE.md @@ -0,0 +1,56 @@ +# balanceworker + + + +> Kafka/Watermill worker (package balanceworker, driven by cmd/balance-worker) that reacts to entitlement, grant, reset, and ingest events by recalculating an entitlement's value and emitting a snapshot.SnapshotEvent. Its primary constraint: every handler is idempotent and re-fetches live state, because rolled-back transactions also fire events and retries are expected. + +## Patterns + +**grouphandler event fan-in in eventHandler** — worker.eventHandler registers one grouphandler.NewGroupEventHandler per event type (EntitlementCreatedEventV2, grant.CreatedEvent/V2, grant.VoidedEvent/V2, meteredentitlement.EntitlementResetEvent/V3, ingestevents.EventBatchedIngest, events.RecalculateEvent) wired into a single grouphandler.NoPublishingHandler. (`grouphandler.NewGroupEventHandler(func(ctx, event *grant.CreatedEventV2) error { return w.opts.EventBus.Publish(ctx, events.RecalculateEvent{...}) })`) +**Trigger events normalize to RecalculateEvent** — Most upstream handlers do not recalculate inline; they re-publish an events.RecalculateEvent carrying Entitlement NamespacedID, OriginalEventSource, AsOf, SourceOperation. The RecalculateEvent handler then maps SourceOperation to a snapshot.ValueOperation and calls handleEntitlementEvent. (`w.opts.EventBus.Publish(ctx, events.RecalculateEvent{Entitlement: ..., AsOf: event.ResetAt, SourceOperation: events.OperationTypeMeteredEntitlementReset})`) +**Two-stage scope filtering before snapshotting** — handleEntitlementEvent first calls w.filters.IsNamespaceInScope, re-lists the entitlement via ListEntitlements(IncludeDeleted:true), then IsEntitlementInScope before producing a snapshot. Out-of-scope returns (nil,nil). (`inScope, err := w.filters.IsEntitlementInScope(ctx, filters.EntitlementFilterRequest{Entitlement: entitlementEntity, EventAt: opts.eventAt, Operation: ...})`) +**PublishIfNoError for handler->snapshot publishing** — Newer handlers (reset v3, RecalculateEvent) return w.opts.EventBus.WithContext(ctx).PublishIfNoError(w.handleEntitlementEvent(...)) so a nil event from filtering does not get published. (`return w.opts.EventBus.WithContext(ctx).PublishIfNoError(w.handleEntitlementEvent(ctx, id, options...))`) +**Snapshots built via snapshot.NewSnapshotEvent + marshaler.WithSource** — createSnapshotEvent/createDeletedSnapshotEvent resolve customer+subject (resolveCustomerAndSubject), feature (IncludeArchivedFeatureTrue), and entitlement value, then wrap with marshaler.WithSource(metadata.ComposeResourcePath(...)). (`marshaler.WithSource(metadata.ComposeResourcePath(namespace, metadata.EntityEntitlement, id), snap)`) +**RecordLastCalculation after each snapshot** — processEntitlementEntity / ProcessEntitlements call w.filters.RecordLastCalculation; failures are logged at WARN and swallowed (non-critical, worst case is redundant recalculation). (`w.filters.RecordLastCalculation(ctx, filters.RecordLastCalculationRequest{Entitlement: *entitlementEntity, CalculatedAt: calculatedAt})`) +**Reset operations snapshot at period start, not now** — When sourceOperation==ValueOperationReset, createSnapshotEvent is called with entitlementEntity.CurrentUsagePeriod.From (not calculatedAt) so the new period gets an initial-grant snapshot, and reset events skip RecordLastCalculation. (`snap, err := w.createSnapshotEvent(ctx, entitlementEntity, entitlementEntity.CurrentUsagePeriod.From, opts)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `worker.go` | Worker + WorkerOptions, New() router wiring (three AddConsumerHandler topics: system/ingest/balance-worker), eventHandler() event registration, AddHandler for extra batched-ingest handlers. | Adding an event type requires a new grouphandler.NewGroupEventHandler inside eventHandler(); WorkerOptions.Validate() must be extended for any new required dependency. | +| `entitlementhandler.go` | handleEntitlementEvent / processEntitlementEntity / createSnapshotEvent / createDeletedSnapshotEvent plus the functional-options (WithSource/WithEventAt/WithSourceOperation/WithRawIngestedEvents). | handleEntitlementEventOptions.Validate requires eventAt; entitlement-not-found returns router.NewWarningLogSeverityError to force a retry (not a hard fail). | +| `filters.go` | EntitlementFilters facade composing filters.NotificationsFilter + filters.HighWatermarkCache, with OTel counters; EntitlementFiltersConfig.Validate guard. | RecordLastCalculation only forwards to filters implementing filters.CalculationTimeRecorder; executeFilters is fail-fast (first out-of-scope short-circuits). | +| `recalculate.go` | Recalculator for full-namespace recalculation jobs (ListInScopeEntitlements paginates defaultPageSize=20k, ProcessEntitlements), with lrux TTL caches for feature and customer+subject. | DefaultIncludeDeletedDuration=24h governs which deleted entitlements get re-emitted; deleted/expired entitlements emit ValueOperationDelete with nil Value. | +| `ingesthandler.go` | handleBatchedIngestEvent: lists entitlements affected by meter slugs+subject via Repo, checks GetEntitlementActivityPeriod().Contains(eventTime), and publishes RecalculateEvent with OperationTypeIngest. | Empty MeterSlugs is a normal no-op; deleted entitlements are skipped (final delete event already sent). | +| `repository.go` | BalanceWorkerRepository interface (ListEntitlementsAffectedByIngestEvents), IngestEventQueryFilter.Validate, ListAffectedEntitlementsResponse.GetEntitlementActivityPeriod (StartBoundedPeriod from ActiveFrom/CreatedAt to min(ActiveTo,DeletedAt)). | GetEntitlementActivityPeriod prefers ActiveFrom over CreatedAt and the earliest of ActiveTo/DeletedAt as the end bound. | +| `subject_customer.go` | resolveCustomerAndSubject helper: customer is required, subject is optional and may be nil; missing subject row falls back to a synthetic subject carrying only the usage-attribution key. | Subjects are no longer persisted, so GenericNotFoundError on GetByKey is expected and must not propagate. | + +## Anti-Patterns + +- Recalculating inline in an upstream event handler instead of publishing events.RecalculateEvent and letting the RecalculateEvent handler converge to a snapshot. +- Producing a snapshot without first passing both IsNamespaceInScope and IsEntitlementInScope filter checks. +- Publishing a possibly-nil event directly instead of using EventBus.PublishIfNoError, which causes nil/filtered events to be emitted. +- Treating RecordLastCalculation failures as fatal - they are intentionally logged at WARN and swallowed. +- Snapshotting a reset at time.Now() instead of CurrentUsagePeriod.From, losing the initial-grant snapshot the notification pipeline needs. + +## Decisions + +- **Handlers re-fetch live state (entitlement, feature, value) on every event rather than trusting the event payload.** — Makes the worker resilient across event-schema versions and to rolled-back transactions that still fire events; retries converge. +- **A unified RecalculateEvent decouples the many trigger event types from the single recalculation/snapshot path.** — One idempotent recalculation routine serves grant, reset, create, delete, and ingest triggers, simplifying retries and dedup. +- **Scope filtering (notifications + high-watermark dedup) is a separate composable filters package injected into the worker.** — Lets the worker skip entitlements no notification rule cares about and dedup recently-calculated ones without bloating handler logic. + +## Example: Re-publishing a trigger event as a RecalculateEvent inside eventHandler + +``` +grouphandler.NewGroupEventHandler(func(ctx context.Context, event *grant.CreatedEventV2) error { + return w.opts.EventBus.Publish(ctx, events.RecalculateEvent{ + Entitlement: pkgmodels.NamespacedID{Namespace: event.Namespace.ID, ID: event.Grant.OwnerID}, + OriginalEventSource: metadata.ComposeResourcePath(event.Namespace.ID, metadata.EntityEntitlement, event.Grant.OwnerID, metadata.EntityGrant, event.Grant.ID), + AsOf: event.Grant.ManagedModel.CreatedAt, + SourceOperation: events.OperationTypeGrantCreated, + }) +}) +``` + + diff --git a/openmeter/entitlement/balanceworker/events/CLAUDE.md b/openmeter/entitlement/balanceworker/events/CLAUDE.md new file mode 100644 index 0000000000..dfe39d0796 --- /dev/null +++ b/openmeter/entitlement/balanceworker/events/CLAUDE.md @@ -0,0 +1,54 @@ +# events + + + +> Defines the Watermill event contract for the balance worker's recalculation pipeline. The single file declares RecalculateEvent, which triggers an entitlement balance snapshot recomputation as-of a timestamp, plus the OperationType enum describing what caused the trigger. + +## Patterns + +**marshaler.Event compile-time assertion** — Every event type asserts interface conformance with a blank var so the compiler enforces EventName()/EventMetadata() at build time. (`var _ marshaler.Event = RecalculateEvent{}`) +**Versioned EventType triple** — Event identity is a metadata.EventType{Subsystem, Name, Version}; EventSubsystem='balanceWorker', RecalculateEventName='triggerEntitlementRecalculation', Version='v2'. The wire name is derived via metadata.GetEventName, never hardcoded. (`recalculateEventName = metadata.GetEventName(recalculateEventType)`) +**String enum with Values()+Validate()** — OperationType is a string type whose Values() lists every valid constant and Validate() checks membership via slices.Contains. New operations MUST be added to both the const block and Values(). (`func (o OperationType) Validate() error { if !slices.Contains(o.Values(), o) {...} }`) +**Error-collecting Validate()** — Validate() accumulates into var errs []error and returns errors.Join(errs...), wrapping nested validators with field context (fmt.Errorf("entitlement: %w", err)). (`errs = append(errs, fmt.Errorf("sourceOperation: %w", err)); return errors.Join(errs...)`) +**Subject path via metadata.ComposeResourcePath** — EventMetadata().Subject is built with metadata.ComposeResourcePath(namespace, metadata.EntityEntitlement, id) rather than string concatenation. (`Subject: metadata.ComposeResourcePath(e.Entitlement.Namespace, metadata.EntityEntitlement, e.Entitlement.ID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `recalculate.go` | Declares RecalculateEvent (Entitlement NamespacedID, AsOf, OriginalEventSource, SourceOperation, RawIngestedEvents) and the OperationType enum covering entitlement/grant lifecycle + ingest/recalculate triggers. | RawIngestedEvents carries serializer.CloudEventsKafkaPayload from kafkaingest; the event Source comes from OriginalEventSource so downstream consumers can trace the originating producer. Bumping the payload shape requires bumping recalculateEventType.Version (currently 'v2'). | + +## Anti-Patterns + +- Adding an OperationType constant without also adding it to Values() (Validate would reject it). +- Hardcoding the event name string instead of deriving it from metadata.GetEventName(recalculateEventType). +- Returning on the first validation failure instead of collecting into errs and errors.Join. +- Changing RecalculateEvent's JSON shape without incrementing the EventType Version, breaking deserialization of in-flight messages. + +## Decisions + +- **Event is at Version 'v2' and exposes EventVersionSubsystem.** — Schema has already evolved once; consumers route by version+subsystem so old and new payloads can coexist on the topic during rollout. +- **OriginalEventSource is carried on the event and surfaced as the metadata Source.** — Recalculation is triggered by many upstream operations (ingest, grant void, reset); preserving the original source keeps event provenance intact through the worker. + +## Example: Declaring a versioned Watermill event with compile-time conformance and joined validation + +``` +var _ marshaler.Event = RecalculateEvent{} + +var recalculateEventType = metadata.EventType{ + Subsystem: EventSubsystem, + Name: RecalculateEventName, + Version: "v2", +} +var recalculateEventName = metadata.GetEventName(recalculateEventType) + +func (e RecalculateEvent) EventName() string { return recalculateEventName } + +func (e RecalculateEvent) Validate() error { + var errs []error + if e.AsOf.IsZero() { + errs = append(errs, errors.New("asOf is required")) +// ... +``` + + diff --git a/openmeter/entitlement/balanceworker/filters/CLAUDE.md b/openmeter/entitlement/balanceworker/filters/CLAUDE.md new file mode 100644 index 0000000000..44ef3a2629 --- /dev/null +++ b/openmeter/entitlement/balanceworker/filters/CLAUDE.md @@ -0,0 +1,54 @@ +# filters + + + +> Provides the scoping layer that decides whether a given entitlement/namespace should be recalculated and snapshot-emitted by the balance worker. Defines the Filter interface and two implementations: HighWatermarkCache (dedup by last-calculation time) and NotificationsFilter (only entitlements covered by a balance-threshold notification rule). + +## Patterns + +**Filter interface hierarchy** — Filter declares IsNamespaceInScope + IsEntitlementInScope. NamedFilter embeds Filter + Name(); CalculationTimeRecorder embeds Filter + RecordLastCalculation. Implementations pick the interface that matches their capability and assert it. (`var _ NamedFilter = (*HighWatermarkCache)(nil); var _ CalculationTimeRecorder = (*HighWatermarkCache)(nil)`) +**Validate request before scoping** — Both IsEntitlementInScope implementations call req.Validate() first; EntitlementFilterRequest.Validate collects id/namespace/operation/eventAt errors via errors.Join. (`if err := req.Validate(); err != nil { return false, err }`) +**Backend-abstracted cache** — HighWatermarkCache delegates to a HighWatermarkBackend interface (Get/Record); HighWatermarkInMemoryBackend wraps hashicorp golang-lru/v2. Swap the backend, not the cache logic. (`func NewHighWatermarkCache(size int) (*HighWatermarkCache, error) { backend, err := NewHighWatermarkInMemoryBackend(size); ... }`) +**Config struct with Validate constructor guard** — NotificationsFilter is built from NotificationsFilterConfig (implements models.Validator); NewNotificationsFilter calls cfg.Validate() before constructing. Required deps (NotificationService) and positive TTL/size are enforced there. (`func NewNotificationsFilter(cfg NotificationsFilterConfig) (NamedFilter, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }`) +**TTL'd rule cache keyed by namespace** — NotificationsFilter caches rules per namespace via lrux.CacheWithItemTTL with a loader (fetchRulesForNamespace) and lrux.WithTTL; it only fetches EventTypeBalanceThreshold rules. (`ruleCache, err := lrux.NewCacheWithItemTTL(cfg.CacheSize, filter.fetchRulesForNamespace, lrux.WithTTL(cfg.CacheTTL))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `filter.go` | Declares the Filter / NamedFilter / CalculationTimeRecorder interfaces and the EntitlementFilterRequest + RecordLastCalculationRequest input structs. | EntitlementFilterRequest.Operation is a snapshot.ValueOperationType; Validate requires Entitlement.ID, Namespace, a valid Operation, and a non-zero EventAt. | +| `highwatermark.go` | Dedup filter: keeps the last CalculatedAt per entitlement; an event is in-scope only if its EventAt is after (highWatermark - defaultClockDrift). | Reset operations (snapshot.ValueOperationReset) always return in-scope. Missing cache entries are treated as in-scope (fail-open); deleted entitlements are out-of-scope regardless of watermark. defaultClockDrift is 1ms to tolerate NTP skew between worker nodes. | +| `notifications.go` | Scope filter that limits recalculation to entitlements matching a balance-threshold notification rule's feature list (empty Features list => all features in scope). | Matches both FeatureKey and FeatureID against rule.Config.BalanceThreshold.Features; rules with a nil BalanceThreshold are skipped. IsNamespaceInScope returns true only if the namespace has >0 such rules. | + +## Anti-Patterns + +- Querying NotificationService directly per event instead of going through the TTL'd ruleCache. +- Skipping req.Validate() in a Filter implementation before making a scope decision. +- Making HighWatermarkCache fail-closed on cache miss — current contract is fail-open (treat unknown entitlements as in-scope). +- Hardcoding a new cache backend inside HighWatermarkCache instead of implementing HighWatermarkBackend. +- Treating reset events as dedup-eligible — they must always pass so the new period gets a fresh snapshot for notifications. + +## Decisions + +- **High-watermark dedup compares against highWatermark minus a 1ms defaultClockDrift.** — Multiple worker nodes may have slightly different clocks; allowing 1ms of drift (guaranteed on AWS/GCP NTP) prevents valid events from being dropped at the boundary. +- **NotificationsFilter only loads EventTypeBalanceThreshold rules and matches feature key or id.** — The balance worker only needs to recompute snapshots that can fire a balance-threshold notification; filtering at the namespace/feature level avoids recomputing entitlements no rule cares about. +- **Cache logic and storage are split via HighWatermarkBackend.** — Lets the in-memory LRU be swapped for a distributed backend without changing the in-scope decision logic. + +## Example: Building a NamedFilter from a validated config with a TTL'd per-namespace loader cache + +``` +func NewNotificationsFilter(cfg NotificationsFilterConfig) (NamedFilter, error) { + if err := cfg.Validate(); err != nil { + return nil, err + } + filter := &NotificationsFilter{notificationService: cfg.NotificationService} + ruleCache, err := lrux.NewCacheWithItemTTL(cfg.CacheSize, filter.fetchRulesForNamespace, lrux.WithTTL(cfg.CacheTTL)) + if err != nil { + return nil, err + } + filter.ruleCache = ruleCache + return filter, nil +} +``` + + diff --git a/openmeter/entitlement/boolean/CLAUDE.md b/openmeter/entitlement/boolean/CLAUDE.md new file mode 100644 index 0000000000..2782fc8273 --- /dev/null +++ b/openmeter/entitlement/boolean/CLAUDE.md @@ -0,0 +1,40 @@ +# boolean + + + +> Boolean entitlement sub-type connector: a type whose access is always granted (HasAccess() returns true) once the entitlement is active. Implements entitlement.SubTypeConnector with no persistence of its own. + +## Patterns + +**SubTypeConnector implementation** — Connector embeds entitlement.SubTypeConnector and implements GetValue/BeforeCreate/AfterCreate; the service dispatches to it by EntitlementType. (`type Connector interface { entitlement.SubTypeConnector }`) +**Reject metered-only fields in BeforeCreate** — BeforeCreate forces EntitlementType=Boolean and returns InvalidValueError if MeasureUsageFrom/IssueAfterReset/IsSoftLimit/Config are set. (`if model.MeasureUsageFrom != nil || model.Config != nil { return nil, &entitlement.InvalidValueError{Type: model.EntitlementType, Message: "Invalid inputs for type"} }`) +**Parse-from-generic type guard** — ParseFromGenericEntitlement checks EntitlementType and returns WrongTypeError on mismatch before exposing the typed Entitlement. (`if model.EntitlementType != entitlement.EntitlementTypeBoolean { return nil, &entitlement.WrongTypeError{...} }`) +**Compute currentUsagePeriod when a UsagePeriod is supplied** — If model.UsagePeriod is set, GetValue().Validate() then GetPeriodAt(clock.Now()) seeds CurrentUsagePeriod in the repo inputs. (`calculatedPeriod, err := usagePeriod.GetValue().GetPeriodAt(clock.Now())`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `connector.go` | Stateless Connector (NewBooleanEntitlementConnector); BeforeCreate validation, GetValue returns &BooleanEntitlementValue{} | BooleanEntitlementValue.HasAccess() is hardcoded true — inactivity is handled by the service, not here | +| `entitlement.go` | Typed Entitlement wrapper over entitlement.GenericProperties + ParseFromGenericEntitlement | No extra fields; do not add metered/static-only state to this type | + +## Anti-Patterns + +- Adding balance/usage logic to a boolean connector — booleans have no balance +- Returning access decisions based on time here instead of letting the service gate on IsActive +- Allowing Config/MeasureUsageFrom on boolean creation + +## Decisions + +- **Connector is a stateless struct{} with no repo dependency** — Boolean entitlements carry no balance or grants, so all state lives in the generic entitlement row. + +## Example: GetValue for a boolean entitlement + +``` +func (c *connector) GetValue(ctx context.Context, e *entitlement.Entitlement, at time.Time) (entitlement.EntitlementValue, error) { + if _, err := ParseFromGenericEntitlement(e); err != nil { return nil, err } + return &BooleanEntitlementValue{}, nil +} +``` + + diff --git a/openmeter/entitlement/driver/CLAUDE.md b/openmeter/entitlement/driver/CLAUDE.md new file mode 100644 index 0000000000..4476c0a75c --- /dev/null +++ b/openmeter/entitlement/driver/CLAUDE.md @@ -0,0 +1,61 @@ +# driver + + + +> HTTP driver layer (package entitlementdriver) for the V1 subject-key-based entitlement and metered-grant API, mapping api.* request/response types onto entitlement.Service and meteredentitlement.Connector. Every handler resolves the namespace then a customer from the subject key before touching the connector. + +## Patterns + +**Per-handler interface + httptransport.HandlerWithArgs triple** — EntitlementHandler / MeteredEntitlementHandler expose one method per operation returning a typed HandlerWithArgs[Request, Response, Params], built with httptransport.NewHandlerWithArgs(decode, handle, encode, options...). (`type CreateGrantHandler httptransport.HandlerWithArgs[CreateGrantHandlerRequest, CreateGrantHandlerResponse, CreateGrantHandlerParams]`) +**Namespace then subject->customer resolution** — Decoders call h.resolveNamespace(ctx) (from namespaceDecoder); business funcs call h.resolveCustomerFromSubject(ctx, ns, subjectIdOrKey) which goes subject.GetByIdOrKey then customer.GetCustomerByUsageAttribution. Nil customer -> NewGenericPreConditionFailedError. (`cust, err := h.resolveCustomerFromSubject(ctx, request.Namespace, request.SubjectKey)`) +**Generic vs metered connector split** — entitlementHandler uses entitlement.Service (connector) for CRUD/value/list; meteredEntitlementHandler uses meteredentitlement.Connector (balanceConnector) for grants, reset, balance history. (`grant, err := h.balanceConnector.CreateGrant(ctx, request.Namespace, cust.ID, request.EntitlementIdOrFeatureKey, request.GrantInput)`) +**Centralized mapping via Parser and free Map*/Parse* functions** — parser.go holds the stateless Parser (ToMetered/ToStatic/ToBoolean/ToAPIGeneric over EntitlementWithCustomer) plus MapEntitlementValueToAPI, ParseAPICreateInput, MapAPIPeriodIntervalToRecurrence, MapRecurrenceToAPI. Handlers never inline domain<->API translation. (`return Parser.ToAPIGeneric(&entitlement.EntitlementWithCustomer{Entitlement: lo.FromPtr(res), Customer: *cust})`) +**Shared error encoder** — All handlers attach httptransport.WithErrorEncoder(GetErrorEncoder()); errors.go maps domain errors (FeatureNotFoundError, entitlement.NotFoundError/AlreadyExistsError/InvalidValueError/InvalidFeatureError/WrongTypeError, pagination.InvalidError) to HTTP status via commonhttp.HandleErrorIfTypeMatches. (`commonhttp.HandleErrorIfTypeMatches[*entitlement.AlreadyExistsError](ctx, http.StatusConflict, err, w, func(e *entitlement.AlreadyExistsError) map[string]interface{}{ return map[string]interface{}{"conflictingEntityId": e.EntitlementID} })`) +**WithOperationName matches OpenAPI operationId** — Handlers append httptransport.WithOperationName("createEntitlement"/"overrideEntitlement"/"getEntitlementValue"/...) so telemetry/routing align with the generated spec. (`httptransport.WithOperationName("getEntitlementsOfSubject")`) +**Type discriminator dispatch for create/value** — ParseAPICreateInput switches on inp.ValueByDiscriminator() across Metered/Static/Boolean create inputs; MapEntitlementValueToAPI switches on the concrete value type (MeteredEntitlementValue/StaticEntitlementValue/BooleanEntitlementValue/NoAccessValue). (`switch v := value.(type) { case api.EntitlementMeteredCreateInputs: ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement.go` | EntitlementHandler interface + entitlementHandler: Create/Override/Get/GetById/Delete/GetValue/GetEntitlementsOfSubject/ListEntitlements, OrderBy/EntitlementType validation in decoders. | UsageAttribution is populated in the business func from the resolved customer, not the decoder ('somewhat hacky'); GetEntitlementsOfSubject also rejects deleted customers via NewGenericPreConditionFailedError. | +| `metered.go` | MeteredEntitlementHandler: CreateGrant, ListEntitlementGrants, ResetEntitlementUsage, GetEntitlementBalanceHistory; resolveNamespace/resolveCustomerFromSubject; MapEntitlementGrantToAPI. | Grant recurrence anchor defaults to EffectiveAt; balance history window timezone parsed via time.LoadLocation and burndown segments built from BalanceConnector output; ListEntitlementGrants uses a hardcoded page size of 1000. | +| `parser.go` | Stateless Parser + mapping/parse helpers; ParseAPICreateInput prunes ActiveFrom/ActiveTo and builds timeutil.Recurrence from UsagePeriod; MapRecurrenceToAPI is best-effort ISO mapping. | MapRecurrenceToAPI is explicitly approximate (24h != 1d) and falls back to ISO string; ParseAPICreateInput requires a usage period when MeasureUsageFrom is an enum preset. | +| `errors.go` | GetErrorEncoder mapping domain error types to HTTP statuses. | New domain error types are invisible to clients unless added here; ordering uses short-circuit || so the first matching type wins. | + +## Anti-Patterns + +- Treating an EntitlementIdOrFeatureKey path segment as a literal ID without resolving the customer first via resolveCustomerFromSubject. +- Calling the generic entitlement.Service for grant/reset/balance-history operations instead of meteredentitlement.Connector (balanceConnector). +- Putting domain<->API translation inside a handler closure instead of in parser.go (Parser/Map*/Parse*). +- Returning a raw error from a handler instead of routing through httptransport.WithErrorEncoder(GetErrorEncoder()) so domain errors get correct HTTP status. +- Passing a nil/unguarded customer to the connector instead of failing with models.NewGenericPreConditionFailedError when the subject has no customer. + +## Decisions + +- **V1 driver is subject-key-centric: every request resolves a customer from a subject key before hitting the connector.** — Preserves the legacy subject-based public API surface while the domain layer is customer-centric; v2 (entitlementdriverv2) is the customer-centric counterpart. +- **Generic and metered/grant operations are split across entitlement.Service and meteredentitlement.Connector.** — Keeps credit/grant/reset balance logic in the metered connector and CRUD/value in the generic service, matching the domain boundary. +- **All domain<->API mapping is concentrated in a stateless Parser plus free functions in parser.go.** — Handlers stay thin (decode/resolve/call/encode) and v2 reuses these helpers rather than duplicating them. + +## Example: A typical V1 handler: decode + namespace, then resolve customer and map result + +``` +func (h *entitlementHandler) GetEntitlementValue() GetEntitlementValueHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params GetEntitlementValueHandlerParams) (GetEntitlementValueHandlerRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return GetEntitlementValueHandlerRequest{}, err } + return GetEntitlementValueHandlerRequest{SubjectKey: params.SubjectKey, EntitlementIdOrFeatureKey: params.EntitlementIdOrFeatureKey, Namespace: ns, At: defaultx.WithDefault(params.Params.Time, clock.Now())}, nil + }, + func(ctx context.Context, request GetEntitlementValueHandlerRequest) (api.EntitlementValue, error) { + cust, err := h.resolveCustomerFromSubject(ctx, request.Namespace, request.SubjectKey) + if err != nil { return api.EntitlementValue{}, err } + v, err := h.connector.GetEntitlementValue(ctx, request.Namespace, cust.ID, request.EntitlementIdOrFeatureKey, request.At) + if err != nil { return api.EntitlementValue{}, err } + return MapEntitlementValueToAPI(v) + }, + commonhttp.JSONResponseEncoder[api.EntitlementValue], +// ... +``` + + diff --git a/openmeter/entitlement/driver/v2/CLAUDE.md b/openmeter/entitlement/driver/v2/CLAUDE.md new file mode 100644 index 0000000000..9e216293a2 --- /dev/null +++ b/openmeter/entitlement/driver/v2/CLAUDE.md @@ -0,0 +1,63 @@ +# v2 + + + +> HTTP driver layer for the V2 customer-centric entitlement API (package entitlementdriverv2). Exposes customer-scoped entitlement and grant endpoints plus namespace-wide entitlement list/get, mapping api.* request/response types onto entitlement.Service and meteredentitlement.Connector. Unlike v1 (subject-key based), every handler resolves a customer via customerService before touching the connector. + +## Patterns + +**httptransport.NewHandlerWithArgs three-stage handlers** — Every endpoint is a method on *entitlementHandler returning a typed Handler built from (request-decoder, business-fn, response-encoder, options). Decoder resolves namespace + customer and builds a typed Request struct; business-fn calls the connector and maps to api types. (`func (h *entitlementHandler) GetEntitlement() GetEntitlementHandler { return httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoder[...], httptransport.AppendOptions(h.options, httptransport.WithOperationName("getEntitlementByIdV2"), httptransport.WithErrorEncoder(getErrorEncoder()))...) }`) +**Per-handler Request/Response/Params type triple** — Each endpoint declares a type block with HandlerRequest, HandlerResponse (usually an api.* alias), and HandlerParams (path/query args), then a named Handler alias of httptransport.HandlerWithArgs[Req,Resp,Params]. The EntitlementHandler interface in handler.go lists every endpoint constructor. (`type CreateCustomerEntitlementHandler httptransport.HandlerWithArgs[CreateCustomerEntitlementHandlerRequest, CreateCustomerEntitlementHandlerResponse, CreateCustomerEntitlementHandlerParams]`) +**Namespace then customer resolution in decoder** — Decoders call h.resolveNamespace(ctx) first, then h.customerService.GetCustomer with a customer.CustomerIDOrKey, and reject deleted customers with models.NewGenericPreConditionFailedError before proceeding. (`ns, err := h.resolveNamespace(ctx); cus, err := h.customerService.GetCustomer(ctx, customer.GetCustomerInput{CustomerIDOrKey: &customer.CustomerIDOrKey{Namespace: ns, IDOrKey: params.CustomerIDOrKey}}); if cus.IsDeleted() { return models.NewGenericPreConditionFailedError(...) }`) +**Feature-key-or-id resolution via GetEntitlementOfCustomerAt** — Endpoints taking an EntitlementIdOrFeatureKey resolve it to a concrete entitlement for the customer at clock.Now() before acting (get/delete/override/history/reset), never trusting the raw path segment as an ID. (`ent, err := h.connector.GetEntitlementOfCustomerAt(ctx, ns, cus.ID, params.EntitlementIdOrFeatureKey, clock.Now())`) +**Stateless ParserV2 + Map* mapping functions** — All domain<->API translation lives in mapping.go: ParserV2 (empty struct, var ParserV2 = parserV2{}) does ToAPIGenericV2 type-switch dispatch to ToMeteredV2/ToStaticV2/ToBooleanV2; package funcs MapEntitlementGrantToAPIV2, ParseAPICreateInputV2, MapAPIGrantV2ToCreateGrantInput handle grants/inputs. (`v2, err := ParserV2.ToAPIGenericV2(ent, cus.ID, cus.Key); createInp, grantsInp, err := ParseAPICreateInputV2(request.APIInput, request.Namespace, cus.GetUsageAttribution())`) +**Reuse v1 driver helpers, never duplicate them** — v2 imports entitlementdriver (v1) for shared logic: getErrorEncoder() chains entitlementdriver.GetErrorEncoder() before the generic encoder; interval/recurrence mapping uses entitlementdriver.MapRecurrenceToAPI and entitlementdriver.MapAPIPeriodIntervalToRecurrence. (`func getErrorEncoder() encoder.ErrorEncoder { v1 := entitlementdriver.GetErrorEncoder(); generic := commonhttp.GenericErrorEncoder(); return func(...) bool { if v1(...) { return true }; return generic(...) } }`) +**WithOperationName matches the V2 OpenAPI operationId** — Each handler sets httptransport.WithOperationName to the camelCase V2 operation (e.g. createCustomerEntitlementV2, listEntitlementsV2). These must align with api/spec generated names. (`httptransport.WithOperationName("listCustomerEntitlementsV2")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Defines the EntitlementHandler interface (11 endpoint constructors), the entitlementHandler struct, and NewEntitlementHandler. Dependencies: connector entitlement.Service, balanceConnector meteredentitlement.Connector, customerService customer.Service, namespaceDecoder namespacedriver.NamespaceDecoder. | Adding an endpoint requires adding it to the interface AND wiring it in the router; resolveNamespace lives here implicitly via namespaceDecoder. | +| `customer.go` | Customer-scoped generic entitlement CRUD: Create/List/Get/Delete/OverrideCustomerEntitlement, plus the resolveNamespace helper. Uses ParseAPICreateInputV2 and ParserV2.ToAPIGenericV2. | Create reuses ParseAPICreateInputV2 with cus.GetUsageAttribution(); Override resolves the old entitlement first then calls connector.OverrideEntitlement(ctx, cus.ID, oldEnt.ID, ...); deleted-customer guard is repeated in every handler. | +| `customer_metered.go` | Metered-specific customer endpoints: List/CreateCustomerEntitlementGrant, GetCustomerEntitlementHistory, ResetCustomerEntitlementUsage. Routes through h.balanceConnector (meteredentitlement.Connector), not the generic connector. | History builds api.WindowedBalanceHistory/burndown manually from windowedHistory and burndownHistory.Segments(); WindowTimeZone parsed via time.LoadLocation (400 on error); reset defaults At to clock.Now(). | +| `entitlement.go` | Namespace-wide (non-customer-scoped) ListEntitlements and GetEntitlement (by id). ListEntitlements validates OrderBy/EntitlementType against StrValues() and builds entitlement.ListEntitlementsParams. | OrderBy is converted with strcase.CamelToSnake then validated; there is duplicated OrderBy logic (an inline closure plus a later switch on params.OrderBy) — the switch wins. Get returns 404 via connector error path. | +| `mapping.go` | All domain<->API conversion. ParserV2 type-switches EntitlementType to ParseFromGenericEntitlement + ToMeteredV2/ToStaticV2/ToBooleanV2; ParseAPICreateInputV2 dispatches on inp.ValueByDiscriminator(); MapAPIGrantV2ToCreateGrantInput wraps credit.CreateGrantInput. | ParseAPICreateInputV2 enforces 'issueAfterReset and grants cannot be used together' and prunes ActiveFrom/ActiveTo to nil at the end; usage period built via timeutil.AsTimed/timeutil.Recurrence with Anchor defaulting to clock.Now(); follow /go-types-conversion naming (ToAPI../FromAPI..). | +| `errors.go` | getErrorEncoder() composes the v1 entitlement error encoder with commonhttp.GenericErrorEncoder so V2 error responses stay byte-compatible with V1. | Do not write a parallel error encoder; extend behavior in the v1 driver so both versions share it. | + +## Anti-Patterns + +- Trusting the EntitlementIdOrFeatureKey path segment as a literal entitlement ID instead of resolving via GetEntitlementOfCustomerAt — feature keys must be resolved per customer first. +- Skipping the customer-resolution + IsDeleted() precondition guard before calling the connector in customer-scoped handlers. +- Putting domain<->API translation logic in handler files; all mapping must stay in mapping.go via ParserV2 / Map* / Parse* functions. +- Calling the generic entitlement connector for grant/history/reset operations — those go through h.balanceConnector (meteredentitlement.Connector). +- Duplicating v1 logic (error encoding, recurrence/interval mapping) instead of importing entitlementdriver helpers. + +## Decisions + +- **V2 is customer-centric while V1 is subject-key-centric.** — Handlers resolve a customer.Customer (via customerService) and use cus.GetUsageAttribution()/cus.ID, replacing V1's subject-key parsing while reusing V1 parsers and error encoders for behavioral parity. +- **Generic entitlement operations and metered/grant operations are split across two connectors.** — entitlement.Service handles CRUD and access; meteredentitlement.Connector owns grants, balance history, and resets, keeping credit/grant concerns out of the generic service. +- **Mapping is centralized in a stateless ParserV2 plus free functions.** — Keeps handlers thin (decode + call + encode) and makes domain/API translation independently testable; mirrors the V1 parser pattern for consistency. + +## Example: Customer-scoped handler: resolve namespace + customer, guard deleted, resolve entitlement, act, map to api type + +``` +func (h *entitlementHandler) GetCustomerEntitlement() GetCustomerEntitlementHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params GetCustomerEntitlementHandlerParams) (GetCustomerEntitlementHandlerRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return GetCustomerEntitlementHandlerRequest{}, err } + return GetCustomerEntitlementHandlerRequest{CustomerIDOrKey: params.CustomerIDOrKey, EntitlementIdOrFeatureKey: params.EntitlementIdOrFeatureKey, Namespace: ns}, nil + }, + func(ctx context.Context, request GetCustomerEntitlementHandlerRequest) (GetCustomerEntitlementHandlerResponse, error) { + cus, err := h.customerService.GetCustomer(ctx, customer.GetCustomerInput{CustomerIDOrKey: &customer.CustomerIDOrKey{Namespace: request.Namespace, IDOrKey: request.CustomerIDOrKey}}) + if err != nil { return nil, err } + if cus != nil && cus.IsDeleted() { return nil, models.NewGenericPreConditionFailedError(fmt.Errorf("customer is deleted [namespace=%s customer.id=%s]", cus.Namespace, cus.ID)) } + ent, err := h.connector.GetEntitlementOfCustomerAt(ctx, request.Namespace, cus.ID, request.EntitlementIdOrFeatureKey, clock.Now()) + if err != nil { return nil, err } + return ParserV2.ToAPIGenericV2(ent, ent.CustomerID, cus.Key) + }, +// ... +``` + + diff --git a/openmeter/entitlement/hooks/CLAUDE.md b/openmeter/entitlement/hooks/CLAUDE.md new file mode 100644 index 0000000000..f583f31c9c --- /dev/null +++ b/openmeter/entitlement/hooks/CLAUDE.md @@ -0,0 +1,20 @@ +# hooks + + + +> Structural folder owning entitlement lifecycle hooks that enforce cross-domain invariants on entitlement.Service operations. It has no direct source; its single child subscription/ guards subscription-owned entitlements against out-of-band mutation/deletion. + +## Patterns + +**ServiceHook over service-internal checks** — Invariants are enforced as entitlement ServiceHook implementations (embedding a Noop base) injected at wiring time rather than baked into entitlement.Service. (`subscription child embeds NoopServiceHook and overrides PreUpdate/PreDelete`) + +## Anti-Patterns + +- Encoding entitlement lifecycle invariants directly inside entitlement.Service instead of as a ServiceHook in this folder. +- Returning the concrete hook type from a constructor instead of the exported hook interface alias. + +## Decisions + +- **Cross-cutting entitlement ownership/lifecycle guards live as hooks under this folder, separate from the core service.** — Keeps entitlement.Service focused on CRUD while subscription-ownership enforcement is opt-in via DI and detectable from context, not a DB flag. + + diff --git a/openmeter/entitlement/hooks/subscription/CLAUDE.md b/openmeter/entitlement/hooks/subscription/CLAUDE.md new file mode 100644 index 0000000000..d9a3ce3f16 --- /dev/null +++ b/openmeter/entitlement/hooks/subscription/CLAUDE.md @@ -0,0 +1,48 @@ +# subscription + + + +> A single-file ServiceHook that guards entitlement.Service Update/Delete operations so that subscription-managed entitlements cannot be mutated or deleted outside of a subscription operation. Its sole responsibility is enforcing the invariant that subscription-owned entitlements are only changed via the subscription lifecycle. + +## Patterns + +**ServiceHook via embedded Noop base** — The hook struct embeds NoopEntitlementSubscriptionHook (alias of models.NoopServiceHook[entitlement.Entitlement]) and only overrides the lifecycle methods it cares about; unoverridden hook points default to no-op. (`type hook struct { NoopEntitlementSubscriptionHook }`) +**Compile-time interface assertion** — A var _ assertion guarantees *hook satisfies models.ServiceHook[entitlement.Entitlement] so wiring breaks at compile time if the contract drifts. (`var _ models.ServiceHook[entitlement.Entitlement] = (*hook)(nil)`) +**Subscription-operation bypass guard** — Every guarded method first calls subscription.IsSubscriptionOperation(ctx) and returns nil early when true, allowing the subscription engine itself to mutate the entitlement. (`if subscription.IsSubscriptionOperation(ctx) { return nil }`) +**Annotation-based ownership check** — Ownership is detected via subscription.AnnotationParser.HasSubscription(ent.Annotations); when true and not a subscription operation, return a forbidden error rather than mutating state. (`if subscription.AnnotationParser.HasSubscription(ent.Annotations) { return models.NewGenericForbiddenError(...) }`) +**Config-injected constructor returning the interface type** — NewEntitlementSubscriptionHook takes an EntitlementSubscriptionHookConfig (currently empty struct) and returns the EntitlementSubscriptionHook interface alias, not the concrete *hook. (`func NewEntitlementSubscriptionHook(_ EntitlementSubscriptionHookConfig) EntitlementSubscriptionHook`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `hook.go` | Defines the package entitlementsubscriptionhook: the hook struct, the EntitlementSubscriptionHook/NoopEntitlementSubscriptionHook type aliases, the constructor, and the PreDelete/PreUpdate guard implementations. | PreDelete and PreUpdate share identical logic; keep them in sync if you change the guard. The leading comment warns that entitlement.Service methods are not conventionally named, so verify the actual call site before assuming when these hooks fire. EntitlementSubscriptionHookConfig is intentionally empty - do not add fields unless a real dependency is needed. | + +## Anti-Patterns + +- Mutating or deleting a subscription-owned entitlement without first checking subscription.IsSubscriptionOperation(ctx) - it bypasses the ownership guard. +- Returning the concrete *hook from the constructor instead of the EntitlementSubscriptionHook interface alias. +- Replacing the embedded NoopServiceHook with a struct that implements all hook methods manually, defeating the no-op default for unhandled lifecycle points. +- Using a non-forbidden error type for the ownership violation instead of models.NewGenericForbiddenError. +- Diverging PreUpdate and PreDelete logic so that one path allows mutation the other blocks. + +## Decisions + +- **Enforce subscription ownership through a ServiceHook rather than inside entitlement.Service itself.** — Keeps the entitlement service unaware of subscription concerns; the cross-domain invariant is injected as a hook so the dependency points from subscription guard into entitlement, not the reverse. +- **Detect a subscription operation via context (IsSubscriptionOperation) plus annotation ownership rather than a DB flag.** — The subscription engine marks its own operations on the context, so the guard can distinguish legitimate subscription-driven mutations from external API calls without extra storage or lookups. + +## Example: Blocking external mutation of a subscription-managed entitlement + +``` +func (h *hook) PreUpdate(ctx context.Context, ent *entitlement.Entitlement) error { + if subscription.IsSubscriptionOperation(ctx) { + return nil + } + if subscription.AnnotationParser.HasSubscription(ent.Annotations) { + return models.NewGenericForbiddenError(fmt.Errorf("entitlement is managed by subscription")) + } + return nil +} +``` + + diff --git a/openmeter/entitlement/metered/CLAUDE.md b/openmeter/entitlement/metered/CLAUDE.md new file mode 100644 index 0000000000..b1e1605948 --- /dev/null +++ b/openmeter/entitlement/metered/CLAUDE.md @@ -0,0 +1,59 @@ +# metered + + + +> Metered entitlement sub-system: the Connector that ties metered entitlements to credit grants, balance/overage calculation, usage resets, and the grant.OwnerConnector adapter. Bridges entitlements to openmeter/credit (balance/grant engine) and openmeter/streaming (usage). + +## Patterns + +**Connector aggregates credit + streaming + grant deps** — The connector struct holds streamingConnector, ownerConnector, balanceConnector, grantConnector, grantRepo, entitlementRepo, publisher, hooks, logger, tracer; built via NewMeteredEntitlementConnector(...). (`func NewMeteredEntitlementConnector(streamingConnector streaming.Connector, ownerConnector grant.OwnerConnector, balanceConnector credit.BalanceConnector, ...) Connector`) +**ParseFromGenericEntitlement before any metered op** — Every method that needs metered fields first calls ParseFromGenericEntitlement to assert EntitlementTypeMetered and presence of MeasureUsageFrom/UsagePeriod/LastReset/CurrentUsagePeriod. (`metered, err := ParseFromGenericEntitlement(entRepoEntity)`) +**Balance via credit engine + snapshots** — GetEntitlementBalance defers to balanceConnector.GetBalanceAt/GetBalanceForPeriod (credit engine), reading res.Snapshot.Balance()/Usage/Overage rather than computing from raw events. (`res, err := e.balanceConnector.GetBalanceAt(ctx, nsOwner, at)`) +**OpenTelemetry span per operation** — Public methods open e.tracer.Start(ctx, "meteredentitlement.X", ...) with defer span.End(); trace.go provides mtrace.WithOwner/WithPeriod option helpers. (`ctx, span := e.tracer.Start(ctx, "meteredentitlement.GetEntitlementBalance", trace.WithAttributes(...)); defer span.End()`) +**OwnerConnector adapter implements grant ownership** — entitlementGrantOwner (grant_owner_adapter.go) implements grant.OwnerConnector: DescribeOwner, GetUsagePeriodStartAt, GetResetTimelineInclusive, EndCurrentUsagePeriod, LockOwnerForTx so the credit engine can resolve entitlement owners. (`func (e *entitlementGrantOwner) GetUsagePeriodStartAt(ctx, owner, at) (time.Time, error)`) +**Default grant on AfterCreate** — AfterCreate issues a default grant via grantConnector.CreateGrant with ResetMaxRollover=ResetMinRollover=amount and IssueAfterResetMetaTag annotation when HasDefaultGrant(). (`Annotations: models.Annotations{IssueAfterResetMetaTag: true}`) +**Hook adapter bridges generic and typed hooks** — hook.go ConvertHook wraps a models.ServiceHook[entitlement.Entitlement] into a ServiceHook[Entitlement] by re-parsing the typed entitlement in each Pre/Post method. (`func ConvertHook(h models.ServiceHook[entitlement.Entitlement]) models.ServiceHook[Entitlement]`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `connector.go` | Connector interface + connector struct, BeforeCreate/AfterCreate, GetValue, MeteredEntitlementValue (HasAccess: soft-limit OR balance>0) | granularity is hardcoded time.Minute (FIXME); BeforeCreate truncates anchor and forces UsagePeriod.From to MeasureUsageFrom | +| `balance.go` | GetEntitlementBalance and GetEntitlementBalanceHistory (window filling + segment merge) | Heavy minute-truncation/window-fill logic with FIXMEs; queryMeter shortcuts a zero-length period to 0; ClickHouse only returns non-empty windows so gaps are filled manually | +| `reset.go` | ResetEntitlementUsage and ResetEntitlementsWithExpiredUsagePeriod | Reset must keep usage-period anchor/highwatermark logic consistent with grant rollover | +| `entitlement_grant.go` | CreateGrant/ListEntitlementGrants and EntitlementGrant wrapper over grant.Grant | Entitlement resolved by ID then falls back to GetActiveEntitlementOfCustomerAt by feature key; PreUpdate hook fired before CreateGrant | +| `grant_owner_adapter.go` | entitlementGrantOwner implementing grant.OwnerConnector for the credit engine | GetResetTimelineInclusive/EndCurrentUsagePeriod must stay aligned with usage-reset persistence | +| `repository.go` | UsageResetRepo interface, UsageResetUpdate (with Validate) and UsageResetNotFoundError | Implemented by the adapter package; keep Validate in sync with adapter Save | +| `events.go` | EntitlementResetEvent (v1 deprecated) / EntitlementResetEventV3 Watermill events | v1 keyed on Subject, v3 on CustomerID; pick V3 for new code and validate Namespace/Subject | +| `entitlement.go` | Typed metered Entitlement, IssueAfterReset, HasDefaultGrant, ParseFromGenericEntitlement / ToGenericEntitlement | ParseFromGenericEntitlement requires many non-nil fields — missing any yields InvalidValueError | + +## Anti-Patterns + +- Computing balance/overage from raw meter rows instead of the credit balanceConnector/engine +- Skipping ParseFromGenericEntitlement and reading metered fields off the generic entitlement +- Emitting the deprecated EntitlementResetEvent (v1) for new flows instead of EntitlementResetEventV3 +- Calling grantConnector.CreateGrant without firing the PreUpdate hook on grant creation +- Bypassing the tracer (e.tracer.Start) on public connector operations + +## Decisions + +- **Metered balance delegates to the credit engine and snapshots** — Balance, overage and grant burn-down are credit-domain concerns; the entitlement connector only orchestrates and shapes EntitlementBalance. +- **An OwnerConnector adapter lives here rather than in credit** — Mapping a credit grant owner onto an entitlement (usage period, reset timeline, measurement start) needs entitlement knowledge, so it is implemented next to the connector. +- **Default grants are issued in AfterCreate** — IssueAfterReset semantics (rollover=amount) must run after the entitlement row exists so the grant has a valid owner. + +## Example: Connector reads balance from the credit engine + +``` +func (e *connector) GetEntitlementBalance(ctx context.Context, id models.NamespacedID, at time.Time) (*EntitlementBalance, error) { + ctx, span := e.tracer.Start(ctx, "meteredentitlement.GetEntitlementBalance") + defer span.End() + nsOwner := models.NamespacedID{Namespace: id.Namespace, ID: id.ID} + startOfPeriod, err := e.ownerConnector.GetUsagePeriodStartAt(ctx, nsOwner, at) + if err != nil { return nil, err } + res, err := e.balanceConnector.GetBalanceAt(ctx, nsOwner, at) + if err != nil { return nil, err } + return &EntitlementBalance{EntitlementID: id.ID, Balance: res.Snapshot.Balance(), Overage: res.Snapshot.Overage, StartOfPeriod: startOfPeriod}, nil +} +``` + + diff --git a/openmeter/entitlement/service/CLAUDE.md b/openmeter/entitlement/service/CLAUDE.md new file mode 100644 index 0000000000..37824dbb3c --- /dev/null +++ b/openmeter/entitlement/service/CLAUDE.md @@ -0,0 +1,62 @@ +# service + + + +> The entitlement.Service facade: orchestrates CRUD, scheduling/superseding, access resolution and value computation across the metered/static/boolean sub-type connectors, the entitlement repo, customer/feature services and the event bus. + +## Patterns + +**Service built from ServiceConfig** — NewEntitlementService(ServiceConfig) wires the three sub-type connectors, EntitlementRepo, FeatureConnector, CustomerService, MeterService, Publisher and *lockr.Locker into the private service struct. (`func NewEntitlementService(config ServiceConfig) entitlement.Service`) +**Mutations run inside transaction.Run** — Create/Override/Schedule/Supersede/Delete wrap their bodies in transaction.Run(ctx, c.entitlementRepo, func(ctx){...}) so repo writes and event publishing share one tx. (`return transaction.Run(ctx, c.entitlementRepo, func(ctx context.Context) (*entitlement.Entitlement, error) {...})`) +**Dispatch to sub-type connector via getTypeConnector** — getTypeConnector(inp) switches on inp.GetType() to return metered/static/boolean SubTypeConnector; BeforeCreate/AfterCreate/GetValue always go through it. (`switch entitlementType { case entitlement.EntitlementTypeMetered: return c.meteredEntitlementConnector, nil ... }`) +**Uniqueness enforced with advisory lock + constraint check** — ScheduleEntitlement takes lockUniqueScope(customerID, featureKey) (lockr key fk/cid) then runs entitlement.ValidateUniqueConstraint over scheduled entitlements + a dummy, translating UniquenessConstraintError into AlreadyExistsError. (`err = c.lockUniqueScope(ctx, input.UsageAttribution.ID, feat.Key)`) +**Create/Override compose Schedule/Supersede** — CreateEntitlement forbids ActiveTo/ActiveFrom and calls ScheduleEntitlement then issues grants; OverrideEntitlement validates customer match then calls SupersedeEntitlement (DeactivateEntitlement + ScheduleEntitlement). (`ent, err := c.ScheduleEntitlement(ctx, input)`) +**Publish lifecycle events with customer payload** — Mutations publish NewEntitlementCreatedEventPayloadV2 / NewEntitlementDeletedEventPayloadV2 after loading the customer, inside the tx. (`err = c.publisher.Publish(ctx, entitlement.NewEntitlementCreatedEventPayloadV2(*ent, cust))`) +**Bounded-concurrency access fan-out** — GetAccess runs GetEntitlementValue per entitlement in an errgroup with a semaphore (maxConcurrency=10), collecting into sync.Map keyed by FeatureKey. (`sem := semaphore.NewWeighted(int64(maxConcurrency)); g.Go(func() error { ... })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | service struct, NewEntitlementService, all CRUD/list/value/access methods and getTypeConnector dispatch | GetEntitlementOfCustomerAt uses ulid.Parse to skip a guaranteed-miss ID lookup for feature keys; GetEntitlementValue returns NoAccessValue when !ent.IsActive(at) | +| `scheduling.go` | ScheduleEntitlement, SupersedeEntitlement, lockUniqueScope | Dummy entitlement with id "new-entitlement-id" is used for the constraint check; an inconsistency in scheduled entitlements (neither side is the dummy) is a hard error, not AlreadyExists | +| `lock.go` | NewEntitlementUniqueScopeLock builds the lockr.Key("fk", featureKey, "cid", customerID) | Key fields/order define the uniqueness scope — changing them changes the lock domain | +| `service_test.go / access_test.go / scheduling_test.go` | service_test integration suites (setupDependecies, createCustomerAndSubject, createMeterInPG) | Tests freeze time via clock.SetTime/ResetTime and require a meter row in PG (createMeterInPG) for metered access | +| `utils_test.go` | Shared test deps and mockTypeConnector/mockTypeValue | dependencies.Teardown closes db/drivers; reuse this harness instead of hand-rolling new setup | + +## Anti-Patterns + +- Performing entitlement writes without transaction.Run, so repo + event publish can diverge +- Hardcoding type behavior in the service instead of dispatching via getTypeConnector +- Scheduling without lockUniqueScope + ValidateUniqueConstraint, allowing overlapping entitlements +- Accepting ActiveFrom/ActiveTo in CreateEntitlement/OverrideEntitlement (they are rejected) +- Computing access serially or unbounded instead of the errgroup+semaphore fan-out + +## Decisions + +- **Create/Override are thin compositions over Schedule/Supersede** — All creation funnels through scheduling so the uniqueness lock + constraint check is enforced exactly once. +- **Uniqueness uses an advisory lock plus an in-memory constraint check** — Overlap rules span multiple scheduled rows and can't be expressed as a simple DB unique index, so the lock serializes the check. +- **GetAccess limits concurrency to 10** — Per-entitlement value computation (esp. metered balance) is expensive; the semaphore caps load while still parallelizing. + +## Example: Transactional schedule with uniqueness lock and event publish + +``` +func (c *service) ScheduleEntitlement(ctx context.Context, input entitlement.CreateEntitlementInputs) (*entitlement.Entitlement, error) { + return transaction.Run(ctx, c.entitlementRepo, func(ctx context.Context) (*entitlement.Entitlement, error) { + if err := input.Validate(); err != nil { return nil, models.NewGenericValidationError(err) } + feat, err := c.featureConnector.GetFeature(ctx, input.Namespace, *input.FeatureKey, feature.IncludeArchivedFeatureFalse) + if err != nil { return nil, &feature.FeatureNotFoundError{ID: *input.FeatureKey} } + if err := c.lockUniqueScope(ctx, input.UsageAttribution.ID, feat.Key); err != nil { return nil, err } + connector, err := c.getTypeConnector(input) + if err != nil { return nil, err } + repoInputs, err := connector.BeforeCreate(input, *feat) + if err != nil { return nil, err } + ent, err := c.entitlementRepo.CreateEntitlement(ctx, *repoInputs) + if err != nil { return nil, err } + if err := connector.AfterCreate(ctx, ent); err != nil { return nil, err } + return ent, c.publisher.Publish(ctx, entitlement.NewEntitlementCreatedEventPayloadV2(*ent, cust)) + }) +// ... +``` + + diff --git a/openmeter/entitlement/snapshot/CLAUDE.md b/openmeter/entitlement/snapshot/CLAUDE.md new file mode 100644 index 0000000000..c021ae937c --- /dev/null +++ b/openmeter/entitlement/snapshot/CLAUDE.md @@ -0,0 +1,46 @@ +# snapshot + + + +> Defines the entitlement balance SnapshotEvent (Watermill marshaler.Event, v2) emitted by the balance worker when an entitlement value changes — the payload notification/consumer and downstream workers consume. + +## Patterns + +**marshaler.Event with versioned name** — SnapshotEvent implements EventName/EventMetadata/Validate; the name is built once via metadata.GetEventName(EventType{Subsystem: entitlement.EventSubsystem, Name: "entitlement.snapshot", Version: "v2"}). (`snapshotEventName = metadata.GetEventName(metadata.EventType{Subsystem: entitlement.EventSubsystem, Name: "entitlement.snapshot", Version: "v2"})`) +**Operation enum gates payload** — ValueOperationType (reset/update/delete) has Values()/Validate(); Validate() requires Value to be non-nil for update/reset, empty for delete. (`case ValueOperationUpdate, ValueOperationReset: if e.Value == nil { errs = append(errs, errors.New("balance is required ...")) }`) +**errors.Join validation** — Validate() accumulates into var errs []error and returns errors.Join(errs...) rather than failing on the first field. (`return errors.Join(errs...)`) +**Constructor derives namespace** — NewSnapshotEvent derives Namespace from ent.Namespace and tolerates a nil deprecated *subject.Subject. (`Namespace: models.NamespaceID{ID: ent.Namespace}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `event.go` | ValueOperationType enum, EntitlementValue (balance/overage/usage pointers), SnapshotEvent and NewSnapshotEvent | Subject is deprecated and may be empty (validation intentionally skips it); EventMetadata branches on whether Customer.ID is set; bump the v2 version string if the shape changes | + +## Anti-Patterns + +- Re-validating/relying on Subject — it is deprecated and may be empty for customers without usage attribution +- Mutating the event shape without bumping the v2 version in snapshotEventName +- Returning on first validation error instead of joining all issues + +## Decisions + +- **EntitlementValue uses pointer fields for metered-only data** — Balance/Overage/Usage/Config are nil for entitlement types that don't have them, distinguishing 'absent' from zero. + +## Example: Validating a snapshot event + +``` +func (e SnapshotEvent) Validate() error { + var errs []error + if err := e.Operation.Validate(); err != nil { errs = append(errs, err) } + if e.Entitlement.ID == "" { errs = append(errs, errors.New("entitlementId is required")) } + if err := e.Namespace.Validate(); err != nil { errs = append(errs, err) } + switch e.Operation { + case ValueOperationUpdate, ValueOperationReset: + if e.Value == nil { errs = append(errs, errors.New("balance is required for balance update/reset")) } + } + return errors.Join(errs...) +} +``` + + diff --git a/openmeter/entitlement/validators/CLAUDE.md b/openmeter/entitlement/validators/CLAUDE.md new file mode 100644 index 0000000000..6d07b9d7ec --- /dev/null +++ b/openmeter/entitlement/validators/CLAUDE.md @@ -0,0 +1,20 @@ +# validators + + + +> Structural folder holding validators that hook the entitlement domain into other domains' request lifecycles. It has no direct source; its child customer/ implements customer.RequestValidator to block deletion of customers that still have active entitlements. + +## Patterns + +**Cross-domain RequestValidator implementation** — Validators implement another domain's RequestValidator contract (e.g. customer.RequestValidator), embed that domain's Noop base, and depend on entitlement.EntitlementRepo (not the full Service) for read-only checks. (`customer child embeds customer.NoopRequestValidator and queries EntitlementRepo.ListEntitlements at clock.Now()`) + +## Anti-Patterns + +- Placing entitlement-aware validation logic in the customer domain instead of here, inverting the dependency direction. +- Injecting entitlement.Service when only EntitlementRepo (list access) is required. + +## Decisions + +- **Validators that depend on entitlement state live in the entitlement domain and implement the consuming domain's validator interface.** — The entitlement domain may import customer, but not vice versa; placing the validator here keeps the dependency acyclic while still letting customer deletes reject when active entitlements exist. + + diff --git a/openmeter/entitlement/validators/customer/CLAUDE.md b/openmeter/entitlement/validators/customer/CLAUDE.md new file mode 100644 index 0000000000..cac343c9f9 --- /dev/null +++ b/openmeter/entitlement/validators/customer/CLAUDE.md @@ -0,0 +1,55 @@ +# customer + + + +> A cross-domain validator that hooks the entitlement domain into the customer lifecycle, blocking deletion of any customer that still has active entitlements. It implements the customer.RequestValidator contract so the customer service can reject unsafe deletes before they happen. + +## Patterns + +**RequestValidator interface compliance** — The Validator must satisfy customer.RequestValidator; assert it with a compile-time check and embed customer.NoopRequestValidator so only the relevant hook method is overridden. (`var _ customer.RequestValidator = (*Validator)(nil); type Validator struct { customer.NoopRequestValidator; entitlementRepo entitlement.EntitlementRepo }`) +**Constructor with nil-dependency guard** — NewValidator returns (*Validator, error) and fails fast with fmt.Errorf when a required dependency is nil, rather than constructing an unusable struct. (`if entitlementRepo == nil { return nil, fmt.Errorf("entitlement repository is required") }`) +**Validate input first** — Each hook calls input.Validate() before any repository work so malformed requests are rejected without a DB round-trip. (`if err := input.Validate(); err != nil { return err }`) +**Typed domain errors for conflicts** — Business-rule rejections return models.NewGenericConflictError, not a bare error, so callers/HTTP layer map it to the right status. (`return models.NewGenericConflictError(fmt.Errorf("customer %s still has active entitlements...", input.ID))`) +**Active-snapshot query via clock.Now()** — Use clock.Now() (not time.Now) for the ActiveAt cutoff so tests can freeze time, and include soft-deleted-but-recent rows via IncludeDeleted + IncludeDeletedAfter. (`now := clock.Now(); ListEntitlementsParams{ ActiveAt: lo.ToPtr(now), IncludeDeleted: true, IncludeDeletedAfter: now }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `validator.go` | Sole file: defines Validator, NewValidator, and the ValidateDeleteCustomer hook that lists a customer's active entitlements and blocks deletion if any exist. | Depends only on entitlement.EntitlementRepo (the read/list port), not the full entitlement.Service. The query filters by both CustomerIDs and Namespaces and uses lo.ToPtr(now) for ActiveAt; dropping IncludeDeleted/IncludeDeletedAfter would let recently-deleted entitlements slip through. | + +## Anti-Patterns + +- Calling time.Now() instead of clock.Now(), which breaks time-frozen tests. +- Returning a plain error for the active-entitlements case instead of models.NewGenericConflictError. +- Injecting the heavyweight entitlement.Service when only EntitlementRepo (list access) is needed. +- Overriding RequestValidator methods without embedding customer.NoopRequestValidator, forcing implementation of every hook. +- Skipping input.Validate() and issuing the ListEntitlements query on unvalidated input. + +## Decisions + +- **Live in the entitlement domain, not the customer domain.** — Keeps the customer service free of an entitlement dependency; the entitlement domain owns the rule that entitlements pin a customer, and registers itself as a customer.RequestValidator via DI (app/common). +- **Depend on entitlement.EntitlementRepo rather than entitlement.Service.** — The validator only needs read/list access to entitlements, so it takes the narrowest port, easing testing and avoiding service-construction cycles. + +## Example: Register a customer-deletion validator from the entitlement side and block on active entitlements + +``` +var _ customer.RequestValidator = (*Validator)(nil) + +func (v *Validator) ValidateDeleteCustomer(ctx context.Context, input customer.DeleteCustomerInput) error { + if err := input.Validate(); err != nil { + return err + } + now := clock.Now() + ents, err := v.entitlementRepo.ListEntitlements(ctx, entitlement.ListEntitlementsParams{ + CustomerIDs: []string{input.ID}, + Namespaces: []string{input.Namespace}, + ActiveAt: lo.ToPtr(now), + IncludeDeleted: true, + IncludeDeletedAfter: now, + }) + if err != nil { +// ... +``` + + diff --git a/openmeter/event/metadata/CLAUDE.md b/openmeter/event/metadata/CLAUDE.md new file mode 100644 index 0000000000..3f16b0430b --- /dev/null +++ b/openmeter/event/metadata/CLAUDE.md @@ -0,0 +1,45 @@ +# metadata + + + +> Defines the canonical CloudEvents-style identity for every domain event in OpenMeter: the structured EventType (subsystem/version/name) that produces wire event names like `io.openmeter...`, plus the resource-path scheme used to build CloudEvents `source`/`subject` URIs. It is the shared vocabulary imported by nearly every event-emitting domain package, so its conventions are load-bearing across the whole event bus. + +## Patterns + +**EventType identity triple** — Every event declares an EventType with Subsystem, Name, and Version; the wire name is derived, never hand-written. Compute names via EventName()/GetEventName(spec) rather than string-formatting elsewhere. (`var grantCreatedType = metadata.EventType{Subsystem: "credit", Name: "grant.created", Version: "v1"}; name := metadata.GetEventName(grantCreatedType)`) +**Resource paths via Compose helpers** — CloudEvents source/subject URIs are always built with ComposeResourcePath(namespace, items...) (which prepends `namespace/`) or ComposeResourcePathRaw. Never concatenate `//openmeter.io/...` by hand. (`source := metadata.ComposeResourcePath(ns, metadata.EntityEntitlement, entitlementID, metadata.EntityGrant, grantID)`) +**Entity-segment constants** — Path segments use the exported Entity* constants (EntityEntitlement, EntityInvoice, EntitySubscription, EntityGrant, EntityEvent, ...). Add a new constant here rather than inlining a literal segment string at a call site. (`metadata.ComposeResourcePath(ns, metadata.EntityCustomer, customerID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `event_type.go` | EventType struct + EventName()/VersionSubsystem()/GetEventName() name builders, and the EventMetadata envelope (ID, Time, Subject, Source). String type aliases EventSubsystem/EventName/EventVersion enforce intent at field level. | EventName format `io.openmeter...` is the consumed contract — changing it renames every event and breaks Kafka topic routing/consumers. The doc comment on EventMetadata.Subject/Source is the authoritative example of correct path shapes; keep source/subject consistent with it. | +| `resourcepath.go` | Entity type constants and ComposeResourcePath/ComposeResourcePathRaw builders for `//openmeter.io/...` URIs. | ComposeResourcePath auto-injects the `namespace/` prefix; passing your own `namespace` segment double-prefixes. Use the Raw variant only when you intentionally need a non-namespace-rooted path (e.g. EntityEvent ingestion source). | + +## Anti-Patterns + +- Hand-formatting `io.openmeter.*` event names or `//openmeter.io/*` resource paths instead of using EventName()/ComposeResourcePath. +- Adding a new path segment as an inline string literal instead of an Entity* constant. +- Changing the EventName/VersionSubsystem format strings — they are wire contracts consumed by event subscribers. +- Adding dependencies or business logic here; this package must stay a leaf with only fmt/time/strings imports. + +## Decisions + +- **Event identity is a structured triple (Subsystem/Version/Name) with a derived name rather than free-form strings.** — Versioning is first-class (VersionSubsystem()) so payload schemas can evolve per subsystem, and a single derivation point keeps all emitters/consumers in sync. +- **Keep metadata as a tiny dependency-free leaf package.** — It is imported by ~20 domain packages; any heavier dependency here would create wide coupling and import cycles. + +## Example: Build an event name and its CloudEvents source/subject for a grant event + +``` +import "github.com/openmeterio/openmeter/openmeter/event/metadata" + +et := metadata.EventType{Subsystem: "credit", Name: "grant.created", Version: "v1"} +name := metadata.GetEventName(et) // io.openmeter.credit.v1.grant.created +meta := metadata.EventMetadata{ + Source: metadata.ComposeResourcePath(ns, metadata.EntityEntitlement, entID, metadata.EntityGrant, grantID), + Subject: metadata.ComposeResourcePath(ns, "subject", subjectID), +} +``` + + diff --git a/openmeter/event/models/CLAUDE.md b/openmeter/event/models/CLAUDE.md new file mode 100644 index 0000000000..c9e4d7f369 --- /dev/null +++ b/openmeter/event/models/CLAUDE.md @@ -0,0 +1,44 @@ +# models + + + +> Shared, dependency-free value types embedded inside event payloads across credit, entitlement, notification, and sink consumers — currently FeatureKeyAndID and NamespaceID, each carrying a Validate() error method. It exists so multiple event packages reference the same serialized shapes instead of redefining them. + +## Patterns + +**Validatable value type** — Each type is a small JSON-tagged struct with a value-receiver Validate() error that returns errors.New on the first missing required field. New types here follow the same shape. (`func (i NamespaceID) Validate() error { if i.ID == "" { return errors.New("namespace-id is required") }; return nil }`) +**JSON-stable field tags** — Every field has an explicit json tag (`key`, `id`) because these structs are serialized into the event bus; the tags are part of the wire format. (`type FeatureKeyAndID struct { Key string `json:"key"`; ID string `json:"id"` }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `models.go` | Holds all shared event payload value types: FeatureKeyAndID (feature key+id pair) and NamespaceID (namespace id wrapper), each with Validate(). | Validate() uses plain errors.New and stops at the first invalid field — it is not a NewNillableGenericValidationError aggregate like domain Validate() methods elsewhere; keep that lightweight style here. Renaming json tags breaks deserialization of already-published events. | + +## Anti-Patterns + +- Importing domain/service packages here — this must remain a zero-dependency leaf (only `errors`) to avoid import cycles with its many event-consumer importers. +- Changing existing json tags or field semantics, which silently breaks decoding of in-flight events. +- Adding behavior beyond plain data + Validate(); business logic belongs in the owning domain package. + +## Decisions + +- **Co-locate cross-cutting event payload structs in one dependency-free package.** — Avoids each event producer/consumer redefining incompatible copies and prevents import cycles given the wide importer set (credit/grant, entitlement, notification/consumer, sink ingestnotification). + +## Example: Embed and validate a shared payload type in an event + +``` +import "github.com/openmeterio/openmeter/openmeter/event/models" + +type FeatureCreatedEvent struct { + Namespace models.NamespaceID `json:"namespace"` + Feature models.FeatureKeyAndID `json:"feature"` +} + +func (e FeatureCreatedEvent) Validate() error { + if err := e.Namespace.Validate(); err != nil { return err } + return e.Feature.Validate() +} +``` + + diff --git a/openmeter/info/httpdriver/CLAUDE.md b/openmeter/info/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..b25d1140e6 --- /dev/null +++ b/openmeter/info/httpdriver/CLAUDE.md @@ -0,0 +1,55 @@ +# httpdriver + + + +> HTTP driver for the 'info' domain — exposes static reference/metadata endpoints (currently only the currency list) to the server router. Stateless: it has no service/adapter layer behind it and derives data directly from the gobl `currency` library. + +## Patterns + +**Handler interface + private struct + New constructor** — driver.go declares a public `Handler` interface listing one method per endpoint, an unexported `handler` struct holding shared `[]httptransport.HandlerOption`, and a `New(options ...httptransport.HandlerOption) Handler` constructor returning the interface. New endpoints add a method to the interface and a method on `*handler`. (`type Handler interface { ListCurrencies() ListCurrenciesHandler }`) +**Request/Response/Handler type triple per endpoint** — Each endpoint defines three named types in a `type (...)` block: a `XxxRequest` struct (input, may be empty), a `XxxResponse` (output, here an `[]api.Currency` alias), and `XxxHandler = httptransport.Handler[XxxRequest, XxxResponse]`. (`ListCurrenciesRequest struct{}; ListCurrenciesResponse []api.Currency; ListCurrenciesHandler httptransport.Handler[ListCurrenciesRequest, ListCurrenciesResponse]`) +**httptransport.NewHandler with decode/business/encode closures** — Methods return `httptransport.NewHandler(decode, handle, encode, opts...)`. The decode func builds the Request from `*http.Request`, the handle func produces the Response, encode is `commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK)`, and options come from `httptransport.AppendOptions(h.options, httptransport.WithOperationName("..."))`. (`httptransport.NewHandler(func(ctx, r){...}, func(ctx, req){...}, commonhttp.JSONResponseEncoderWithStatus[ListCurrenciesResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("listCurrencies"))...)`) +**Operation name matches OpenAPI operationId** — `WithOperationName` must use the camelCase operationId from the generated API spec (e.g. "listCurrencies") so telemetry/routing line up with `api/`. (`httptransport.WithOperationName("listCurrencies")`) +**Map domain data to api.* types with samber/lo** — Business closures translate library types into generated `api.*` structs using `lo.Map`/`lo.Filter`; ISO-only currencies are kept by filtering `def.ISONumeric != ""` to exclude crypto. (`lo.Map(lo.Filter(currency.Definitions(), func(d *currency.Def, _ int) bool { return d.ISONumeric != "" }), func(d *currency.Def, _ int) api.Currency { ... })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `driver.go` | Declares the `Handler` interface, the `handler` struct, and `New(...)`. The single place to register a new endpoint method on the interface. | Keep `handler` unexported and return the interface from `New`; the router depends on `Handler`, not the concrete struct. | +| `currencies.go` | Implements `ListCurrencies()` — returns ISO currency definitions from gobl as `[]api.Currency`. | Preserve the `def.ISONumeric != ""` filter (drops crypto/non-ISO entries); changing it leaks non-ISO currencies into the API response. | + +## Anti-Patterns + +- Putting business/data-access logic in handlers that warrants a service+adapter layer — this folder is intentionally driver-only and stateless; if state or DB access is needed, introduce a service package instead. +- Returning the concrete `*handler` instead of the `Handler` interface from `New`. +- Hand-writing response structs instead of mapping into generated `api.*` types. +- Hardcoding HTTP status or bypassing `commonhttp.JSONResponseEncoderWithStatus` for encoding. +- Omitting `WithOperationName` or using a name that doesn't match the OpenAPI operationId. + +## Decisions + +- **No service/adapter layer for the info domain.** — Data is static reference metadata sourced from the gobl `currency` library, so the handler computes it inline with no persistence or tenancy concerns. + +## Example: Adding a new info endpoint following the existing pattern + +``` +type ( + ListCurrenciesRequest struct{} + ListCurrenciesResponse []api.Currency + ListCurrenciesHandler httptransport.Handler[ListCurrenciesRequest, ListCurrenciesResponse] +) + +func (h *handler) ListCurrencies() ListCurrenciesHandler { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (ListCurrenciesRequest, error) { + return ListCurrenciesRequest{}, nil + }, + func(ctx context.Context, request ListCurrenciesRequest) (ListCurrenciesResponse, error) { + return lo.Map(lo.Filter(currency.Definitions(), + func(def *currency.Def, _ int) bool { return def.ISONumeric != "" }), + func(def *currency.Def, _ int) api.Currency { +// ... +``` + + diff --git a/openmeter/ingest/CLAUDE.md b/openmeter/ingest/CLAUDE.md new file mode 100644 index 0000000000..e72fe6e76b --- /dev/null +++ b/openmeter/ingest/CLAUDE.md @@ -0,0 +1,46 @@ +# ingest + + + +> Usage-event intake side of the metering pipeline. The root defines ingest.Service and the Collector abstraction with two implementations/decorators (InMemoryCollector for tests, DeduplicatingCollector for production); subpackages publish to Kafka (kafkaingest), expose the v1 HTTP endpoint (httpdriver), and adapt collectors (ingestadapter). + +## Patterns + +**Collector is the swappable downstream sink** — Collector{ Ingest(ctx, namespace, event.Event) error; Close() } is the seam; implementations (in-memory, Kafka via ingestadapter) and decorators (DeduplicatingCollector) compose over it. (`type Collector interface { Ingest(ctx context.Context, namespace string, ev event.Event) error; Close() }`) +**Deduplication as a wrapping decorator** — DeduplicatingCollector embeds a Collector + dedupe.Deduplicator and only forwards events IsUnique reports as new — dedup is layered, not baked into a concrete collector. (`if isUnique { return d.Collector.Ingest(ctx, namespace, ev) } +return nil`) +**Service validates config and normalizes event time** — ingest.Config{Collector, Logger} has Validate (both required, no slog.Default fallback); processEvent forces UTC and defaults a zero timestamp to time.Now().UTC() before forwarding, logging with structured event fields. (`func NewService(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; ... }`) +**CloudEvents as the wire type** — Events are github.com/cloudevents/sdk-go/v2 event.Event end to end; the service operates on event.Event and sets Time on it directly. (`if event.Time().IsZero() { event.SetTime(time.Now().UTC()) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ingest.go` | Collector interface (the central abstraction) | All sinks and decorators must implement Ingest + Close; keep it minimal. | +| `service.go` | Service interface, Config (+Validate), service impl with per-event time normalization and structured logging | Logger is required (no slog.Default fallback); IngestEvents fails fast on the first event error. | +| `dedupe.go` | DeduplicatingCollector decorator over a Collector + dedupe.Deduplicator | Non-unique events are silently dropped (returns nil), not errored. | +| `inmemory.go` | InMemoryCollector test sink with lazy init + mutex, Events/Namespaces accessors | Test-only; events stored per-namespace map, not persisted or forwarded. | + +## Anti-Patterns + +- Baking deduplication or Kafka publishing into a concrete Collector instead of composing a decorator/adapter over the Collector interface. +- Constructing the service with a nil Logger or falling back to slog.Default() — Config.Validate forbids it. +- Forwarding events without normalizing Time to UTC (downstream metering assumes UTC event time). +- Using InMemoryCollector outside tests. + +## Decisions + +- **Ingestion is structured as a Collector interface with composable decorators.** — Lets the same service pipe events to in-memory (tests), Kafka (prod), and through deduplication without changing the ingest service. + +## Example: Deduplicating before forwarding to the wrapped collector + +``` +func (d DeduplicatingCollector) Ingest(ctx context.Context, namespace string, ev event.Event) error { + isUnique, err := d.Deduplicator.IsUnique(ctx, namespace, ev) + if err != nil { return fmt.Errorf("checking event uniqueness: %w", err) } + if isUnique { return d.Collector.Ingest(ctx, namespace, ev) } + return nil +} +``` + + diff --git a/openmeter/ingest/httpdriver/CLAUDE.md b/openmeter/ingest/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..075aa386a4 --- /dev/null +++ b/openmeter/ingest/httpdriver/CLAUDE.md @@ -0,0 +1,59 @@ +# httpdriver + + + +> The v1 HTTP transport adapter for the ingest service: it parses the IngestEvents request body (single JSON event, JSON batch, single CloudEvent, or CloudEvent batch) and hands it to ingest.Service. It owns only HTTP concerns — content-type negotiation, namespace resolution, and error encoding — never business logic. + +## Patterns + +**httptransport.NewHandler decode/exec/encode triple** — Each endpoint method returns a typed handler built from a request decoder, a business-call closure, and a response encoder, plus options. No logic lives outside these three closures. (`func (h *handler) IngestEvents() IngestEventsHandler { return httptransport.NewHandler(decodeFn, func(ctx, params){ h.service.IngestEvents(ctx, params) }, commonhttp.EmptyResponseEncoder[...](http.StatusNoContent), ...) }`) +**Request type aliases to the service input** — Driver request type is a type alias of the service-layer request, not a separate struct, so the decoder fills the same type the service consumes. (`type IngestEventsRequest = ingest.IngestEventsRequest`) +**Content-Type switch over the API body unions** — The decoder switches on the Content-Type header and decodes into the matching generated api.* body type (api.IngestEventsBody, api.IngestEventsApplicationCloudeventsPlusJSONRequestBody, api.IngestEventsApplicationCloudeventsBatchPlusJSONBody), falling through to ErrorInvalidContentType on default. (`switch contentType { case "application/json": ...; case "application/cloudevents+json": ...; default: return req, ErrorInvalidContentType{ContentType: contentType} }`) +**Namespace from decoder, not request body** — Namespace is resolved from the context via h.namespaceDecoder.GetNamespace and assigned to req.Namespace; a missing namespace is a 500 internal error, never trusted from the client payload. (`ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return "", commonhttp.NewHTTPError(http.StatusInternalServerError, ...) }`) +**Typed driver errors with errorEncoder** — Validation failures return ErrorInvalidEvent / ErrorInvalidContentType structs implementing Error()/Message()/Details(); errorEncoder() maps them to 400 via commonhttp.HandleErrorIfTypeMatches and is wired with httptransport.WithErrorEncoder. (`return commonhttp.HandleErrorIfTypeMatches[ErrorInvalidContentType](ctx, http.StatusBadRequest, err, w) || commonhttp.HandleErrorIfTypeMatches[ErrorInvalidEvent](...)`) +**Constructor injects collaborators, returns interface** — New(namespaceDecoder, service, options...) returns the Handler interface backed by the unexported handler struct; options are appended via httptransport.AppendOptions(h.options, ...). (`func New(namespaceDecoder namespacedriver.NamespaceDecoder, service ingest.Service, options ...httptransport.HandlerOption) Handler`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ingest.go` | IngestEvents() handler: decodes the four supported content types into ingest.IngestEventsRequest and calls service.IngestEvents. | Single-vs-batch JSON parsing relies on AsEvent() then falling back to AsIngestEventsBody1(); if both yield zero events it must return ErrorInvalidEvent. Success returns 204 No Content via EmptyResponseEncoder. | +| `handler.go` | Handler/IngestHandler interfaces, handler struct, resolveNamespace, and the New constructor. | Do not read namespace from the request body — only resolveNamespace via namespaceDecoder is trusted; a missing namespace yields 500, not 400. | +| `errors.go` | Typed transport errors (ErrorInvalidContentType, ErrorInvalidEvent) and errorEncoder() mapping them to HTTP 400. | New error types must implement Message() (and optionally Details()) and be registered in errorEncoder() or they fall through to a generic 500. | +| `ingest_test.go` | httptest-based tests for single, invalid, and batch CloudEvent flows using ingest.NewInMemoryCollector and namespacedriver.StaticNamespaceDecoder. | Tests assert exact status codes (204 success, 400 invalid) and verify events landed in the in-memory collector keyed by namespace. | + +## Anti-Patterns + +- Putting dedupe/validation/persistence business logic in the handler instead of delegating to ingest.Service. +- Trusting a namespace value from the request payload instead of namespacedriver.GetNamespace. +- Returning raw errors from the decoder instead of ErrorInvalidEvent/ErrorInvalidContentType, which breaks the 400 mapping in errorEncoder. +- Decoding into hand-written structs instead of the generated api.* body union types. +- Writing a non-empty success body — ingest responds 204 No Content via EmptyResponseEncoder. + +## Decisions + +- **Driver request types are aliases of ingest.IngestEventsRequest rather than separate DTOs.** — Keeps the transport layer thin and avoids an extra mapping step between HTTP and the service input. +- **Content negotiation is explicit per CloudEvents media type.** — OpenMeter ingest accepts plain JSON, JSON batch, and the two CloudEvents content types; each maps to a distinct generated body type so the decoder stays unambiguous. + +## Example: Adding/decoding an ingest content type and delegating to the service + +``` +func (h *handler) IngestEvents() IngestEventsHandler { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (IngestEventsRequest, error) { + var req ingest.IngestEventsRequest + ns, err := h.resolveNamespace(ctx) + if err != nil { return req, err } + req.Namespace = ns + switch r.Header.Get("Content-Type") { + case "application/cloudevents+json": + var body api.IngestEventsApplicationCloudeventsPlusJSONRequestBody + if err := json.NewDecoder(r.Body).Decode(&body); err != nil { return req, ErrorInvalidEvent{Err: err} } + req.Events = []event.Event{body} + default: + return req, ErrorInvalidContentType{ContentType: r.Header.Get("Content-Type")} + } +// ... +``` + + diff --git a/openmeter/ingest/ingestadapter/CLAUDE.md b/openmeter/ingest/ingestadapter/CLAUDE.md new file mode 100644 index 0000000000..eccfa0acb1 --- /dev/null +++ b/openmeter/ingest/ingestadapter/CLAUDE.md @@ -0,0 +1,42 @@ +# ingestadapter + + + +> Adapter layer for the ingest pipeline that decorates an ingest.Collector with OpenTelemetry instrumentation. Its single export, WithTelemetry, wraps a collector to emit event/error counters and spans without altering ingest behavior. + +## Patterns + +**Decorator over ingest.Collector** — collectorTelemetry embeds a wrapped ingest.Collector and re-implements Ingest/Close, delegating to the inner collector and adding telemetry around the call. (`func WithTelemetry(collector ingest.Collector, metricMeter metric.Meter, tracer trace.Tracer) (ingest.Collector, error)`) +**Counters created in the constructor, returning error** — Int64Counters (openmeter.ingest.events, openmeter.ingest.errors) are created up front in WithTelemetry; any creation failure is wrapped with fmt.Errorf and returned rather than panicking. (`ingestEventsCounter, err := metricMeter.Int64Counter("openmeter.ingest.events", metric.WithDescription(...), metric.WithUnit("{event}")); if err != nil { return nil, fmt.Errorf("failed to create events counter: %w", err) }`) +**Span-and-count around each Ingest** — Ingest starts a span with namespace + event-id attributes, records error + increments the errors counter on failure, and increments the events counter on success, always tagging with the namespace attribute. (`ctx, span := c.tracer.Start(ctx, "openmeter.ingest.events", trace.WithAttributes(namespaceAttr, attribute.String("openmeter.event.id", ev.ID()))); defer span.End()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `telemetry.go` | Defines collectorTelemetry and WithTelemetry; the only adapter in this folder, instrumenting the Collector interface. | Preserve the Collector contract exactly — delegate to c.collector for both Ingest and Close. On error, record the span error AND increment ingestErrorsCounter before returning; on success increment ingestEventsCounter. Use the namespace attribute consistently on all metrics. | + +## Anti-Patterns + +- Mutating or dropping events in the decorator — telemetry must be transparent and only observe the inner Collector. +- Panicking on counter-creation failure instead of returning the wrapped error from WithTelemetry. +- Forgetting to call c.collector.Close() in Close(), leaking the wrapped collector. +- Adding business logic here; this adapter exists solely to attach OTel metrics/spans. + +## Decisions + +- **Telemetry is a separate adapter wrapping ingest.Collector rather than baked into the collector implementations.** — Keeps in-memory/dedupe/kafka collectors free of observability concerns and lets DI (app/common) opt into instrumentation by composition. + +## Example: Wrapping a collector with OTel telemetry + +``` +func WithTelemetry(collector ingest.Collector, metricMeter metric.Meter, tracer trace.Tracer) (ingest.Collector, error) { + ingestEventsCounter, err := metricMeter.Int64Counter("openmeter.ingest.events", metric.WithDescription("Number of events ingested"), metric.WithUnit("{event}")) + if err != nil { return nil, fmt.Errorf("failed to create events counter: %w", err) } + ingestErrorsCounter, err := metricMeter.Int64Counter("openmeter.ingest.errors", metric.WithDescription("Number of failed event ingests"), metric.WithUnit("{error}")) + if err != nil { return nil, fmt.Errorf("failed to create errors counter: %w", err) } + return &collectorTelemetry{collector: collector, tracer: tracer, ingestEventsCounter: ingestEventsCounter, ingestErrorsCounter: ingestErrorsCounter}, nil +} +``` + + diff --git a/openmeter/ingest/kafkaingest/CLAUDE.md b/openmeter/ingest/kafkaingest/CLAUDE.md new file mode 100644 index 0000000000..f8c46027db --- /dev/null +++ b/openmeter/ingest/kafkaingest/CLAUDE.md @@ -0,0 +1,58 @@ +# kafkaingest + + + +> Kafka-publishing side of the ingest pipeline: turns validated CloudEvents into Kafka messages via Collector.Ingest, and provisions/deprovisions per-namespace topics via NamespaceHandler. It is the producer boundary between the ingest HTTP service and the sink-worker that drains Kafka into ClickHouse. + +## Patterns + +**Validating constructor with required-dependency guards** — NewCollector returns (*Collector, error) and rejects any nil dependency (producer, serializer, resolver, provisioner, logger, tracer) before constructing. New collectors must validate every injected field. (`if producer == nil { return nil, fmt.Errorf("producer is required") }`) +**Resolve-then-provision before produce** — Ingest always resolves namespace->topic via TopicResolver.Resolve, then TopicProvisioner.Provision (with TopicPartitions), and only then serializes and produces. Never produce to an unresolved/unprovisioned topic. (`topicName, _ := s.TopicResolver.Resolve(ctx, namespace); s.TopicProvisioner.Provision(ctx, pkgkafka.TopicConfig{Name: topicName, Partitions: s.TopicPartitions})`) +**Key from Serializer, never hand-built** — The Kafka message Key comes from Serializer.SerializeKey and MUST match the dedupe hash; the partitioner is assumed consistent-hash. Hand-constructing keys breaks dedupe partition routing. (`key, _ := s.Serializer.SerializeKey(topicName, namespace, ev); msg := &kafka.Message{Key: key, Value: value}`) +**Standard ingest headers** — Every produced message carries namespace (HeaderKeyNamespace), specversion, ingested_at (HeaderKeyIngestedAt via ToIngestedAt/clock.Now), and the serialized OTel span context (otelx.OTelSpanContextKey). New headers must use the exported constants and clock.Now(). (`Headers: []kafka.Header{{Key: HeaderKeyNamespace, Value: []byte(namespace)}, {Key: HeaderKeyIngestedAt, Value: []byte(ToIngestedAt(clock.Now()))}}`) +**Span-wrapped Ingest with deferred error recording** — Ingest opens a tracer span (openmeter.ingest.process.event), assigns errors to a named err captured in defer, and records/sets status on span exit. New produce paths follow this named-err + deferred span.End pattern. (`ctx, span := s.Tracer.Start(ctx, "openmeter.ingest.process.event", ...); defer func(){ if err != nil { span.RecordError(err); span.SetStatus(otelcodes.Error, err.Error()) }; span.End() }()`) +**ingested_at RFC3339Nano UTC round-trip** — ingested_at is encoded with ToIngestedAt (UTC RFC3339Nano) and decoded with FromIngestedAt; these are the only sanctioned converters for that header. (`func ToIngestedAt(t time.Time) string { return t.UTC().Format(time.RFC3339Nano) }`) +**NamespaceHandler gated DeleteNamespace** — NamespaceHandler implements CreateNamespace/DeleteNamespace; DeleteNamespace is a no-op unless DeletionEnabled, and both nil-check TopicResolver before use. (`func (h NamespaceHandler) DeleteNamespace(ctx, namespace) error { if !h.DeletionEnabled { return nil } ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `collector.go` | Collector struct + NewCollector + Ingest (produce one event) + Close (Flush 30s then Close) + KafkaProducerGroup (run.Group execute/interrupt that drains producer.Events for delivery reports, kafka.Stats metrics, and kafka.Error logging). Defines ingest headers and ToIngestedAt/FromIngestedAt. | Ingest takes Collector by value (func (s Collector)); don't add mutable state expecting it to persist. KafkaProducerGroup logs librdkafka 'local' errors (code <= -100) at warn and broker errors at error — preserve that split. Stats are unmarshalled in a goroutine with a 5s timeout context. | +| `namespace.go` | NamespaceHandler implementing the namespace handler interface (CreateNamespace provisions, DeleteNamespace deprovisions) so Kafka topics track namespace lifecycle. | DeleteNamespace silently returns nil when DeletionEnabled is false — a missing deprovision is intentional, not a bug. Both methods must guard TopicResolver != nil before resolving. | + +## Anti-Patterns + +- Hand-building the Kafka message Key instead of using Serializer.SerializeKey — diverges from the dedupe hash and causes deduplication race conditions across partitions. +- Producing before TopicResolver.Resolve and TopicProvisioner.Provision — risks publishing to a non-existent or wrong topic. +- Bypassing ToIngestedAt/clock.Now() (e.g. time.Now() directly) for the ingested_at header — breaks test-time freezing and the RFC3339Nano contract. +- Constructing a Collector without NewCollector (skipping nil-dependency validation). +- Adding new headers without the exported HeaderKey* constants or omitting the OTel span context header — loses trace propagation into the sink. + +## Decisions + +- **Topic provisioning happens inline on every Ingest call rather than once at startup.** — Namespaces (and their topics) are created dynamically; provisioning per-ingest guarantees the topic exists for newly seen namespaces without a separate bootstrap step. +- **Delivery reports, client stats, and client errors are handled in a separate KafkaProducerGroup loop, not synchronously in Ingest.** — librdkafka produce is async; the application already configures internal retries, so Ingest returns on enqueue and the events loop reports terminal delivery outcome and emits Kafka client metrics. + +## Example: Resolve namespace, provision topic, serialize, and produce a CloudEvent to Kafka + +``` +func (s Collector) Ingest(ctx context.Context, namespace string, ev event.Event) error { + topicName, err := s.TopicResolver.Resolve(ctx, namespace) + if err != nil { return fmt.Errorf("failed to resolve namespace to topic name: %w", err) } + if err = s.TopicProvisioner.Provision(ctx, pkgkafka.TopicConfig{Name: topicName, Partitions: s.TopicPartitions}); err != nil { + return fmt.Errorf("failed to provision topic: %w", err) + } + key, err := s.Serializer.SerializeKey(topicName, namespace, ev) + if err != nil { return fmt.Errorf("serialize event key: %w", err) } + value, err := s.Serializer.SerializeValue(topicName, ev) + if err != nil { return fmt.Errorf("serialize event value: %w", err) } + msg := &kafka.Message{ + TopicPartition: kafka.TopicPartition{Topic: &topicName, Partition: kafka.PartitionAny}, + Timestamp: ev.Time(), + Headers: []kafka.Header{ + {Key: HeaderKeyNamespace, Value: []byte(namespace)}, +// ... +``` + + diff --git a/openmeter/ingest/kafkaingest/serializer/CLAUDE.md b/openmeter/ingest/kafkaingest/serializer/CLAUDE.md new file mode 100644 index 0000000000..12c6e39fa0 --- /dev/null +++ b/openmeter/ingest/kafkaingest/serializer/CLAUDE.md @@ -0,0 +1,48 @@ +# serializer + + + +> Defines the Serializer interface and its JSON implementation that translate CloudEvents into the Kafka wire format (CloudEventsKafkaPayload) for the ingest pipeline. It is the single boundary where event-time usage events become Kafka key/value bytes and back. + +## Patterns + +**Serializer interface contract** — Every serializer implements Serializer (SerializeKey, SerializeValue, GetFormat, GetKeySchemaId, GetValueSchemaId). Schema-less formats return -1 from the GetKeySchemaId/GetValueSchemaId methods. (`type Serializer interface { SerializeKey(topic, namespace string, ev event.Event) ([]byte, error); ... }`) +**Dedupe-derived Kafka key** — SerializeKey builds the Kafka partition key from dedupe.Item{Namespace, ID, Source}.Key() so that duplicate events route to the same partition. Do not hand-format keys. (`dedupe.Item{Namespace: namespace, ID: ev.ID(), Source: ev.Source()}.Key()`) +**Flat CloudEventsKafkaPayload struct** — The wire value is the flat CloudEventsKafkaPayload (Id, Type, Source, Subject, Time int64, Data string). Time is a unix int64 (timezone is intentionally lost); Data is the event payload re-marshalled to a JSON string. (`payload.Time = ev.Time().Unix(); payload.Data = string(payloadData)`) +**Symmetric encode/decode helpers** — toCloudEventsKafkaPayload (encode) and FromKafkaPayloadToCloudEvents (decode) are inverse functions; sink-side consumers call the exported From... helper to reconstruct event.Event. Keep them in lockstep when adding fields. (`ev, err := FromKafkaPayloadToCloudEvents(payload)`) +**Optional-data guard** — CloudEvents data is optional: encode only marshals when len(ev.Data()) > 0, decode only sets data when payload.Data != "". Preserve this so empty-data events round-trip cleanly. (`if len(ev.Data()) > 0 { ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `serializer.go` | Defines the Serializer interface, the CloudEventsKafkaPayload wire struct, the encode/decode helpers, and ValidateKafkaPayloadToCloudEvent. | Time is stored as Unix seconds — sub-second precision and timezone are dropped. Validation requires Id/Type/Source/Subject non-empty and Time > 0; relaxing these affects all consumers. | +| `json.go` | JSONSerializer: the default schema-less implementation. NewJSONSerializer returns a value (not pointer); GetFormat returns "JSON"; schema id getters return -1. | Only JSON-serializable CloudEvents data is supported (toCloudEventsKafkaPayload errors otherwise). A new format (e.g. Avro/Protobuf) needs its own Serializer impl returning real schema ids. | +| `serializer_test.go` | Table-driven tests for round-tripping payloads and the dedupe key format (e.g. SerializeKey yields "namespace-source-id"). | Tests assert exact key string "test-namespace-test-source-test-id" — changing dedupe.Item.Key() format breaks them and downstream partition routing. | + +## Anti-Patterns + +- Constructing Kafka keys manually instead of via dedupe.Item.Key() — breaks dedupe partition routing. +- Adding a field to encode (toCloudEventsKafkaPayload) without updating decode (FromKafkaPayloadToCloudEvents) — breaks round-trip symmetry. +- Storing Time as anything other than Unix seconds int64 — diverges from the established wire contract. +- Returning a real schema id (not -1) from JSONSerializer — implies a schema registry that does not exist for JSON. + +## Decisions + +- **Kafka value is a flat CloudEventsKafkaPayload with Data as a JSON string rather than the raw CloudEvents envelope.** — Gives a stable, ClickHouse-friendly columnar shape and avoids nested/binary CloudEvents encoding on the wire. +- **Event time is serialized as Unix seconds, explicitly dropping timezone.** — Metering operates on instants; a single int64 is compact and unambiguous for downstream aggregation. + +## Example: Serialize a CloudEvent to a Kafka key and value + +``` +import ( + "github.com/cloudevents/sdk-go/v2/event" + "github.com/openmeterio/openmeter/openmeter/ingest/kafkaingest/serializer" +) + +s := serializer.NewJSONSerializer() +key, err := s.SerializeKey(topic, namespace, ev) // "namespace-source-id" +val, err := s.SerializeValue(topic, ev) // JSON CloudEventsKafkaPayload +``` + + diff --git a/openmeter/ingest/kafkaingest/topicresolver/CLAUDE.md b/openmeter/ingest/kafkaingest/topicresolver/CLAUDE.md new file mode 100644 index 0000000000..e0b442f7ef --- /dev/null +++ b/openmeter/ingest/kafkaingest/topicresolver/CLAUDE.md @@ -0,0 +1,41 @@ +# topicresolver + + + +> Maps a namespace to its Kafka topic name. Defines the Resolver interface and NamespacedTopicResolver, the indirection that lets the ingest/sink pipeline derive per-namespace topics from a single template. + +## Patterns + +**Resolver interface** — All topic resolution goes through Resolver.Resolve(ctx, namespace) (string, error). Inject the interface, not the concrete type, into ingest/sink wiring. (`type Resolver interface { Resolve(ctx context.Context, namespace string) (string, error) }`) +**Compile-time interface assertion** — Implementations declare a static assertion so the build fails if the interface drifts. (`var _ Resolver = (*NamespacedTopicResolver)(nil)`) +**Template-driven topic naming** — NamespacedTopicResolver formats namespace into a single-parameter template via fmt.Sprintf (e.g. "om_%s_events"). The constructor rejects an empty template. (`fmt.Sprintf(r.template, namespace)`) +**Validating constructor returning pointer + error** — NewNamespacedTopicResolver validates input and returns (*NamespacedTopicResolver, error); the resolver itself never errors on a configured template. (`func NewNamespacedTopicResolver(template string) (*NamespacedTopicResolver, error)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `resolver.go` | Declares the Resolver interface — the abstraction consumed by ingest publishers and the sink worker. | Resolve takes ctx but the namespaced impl ignores it; any DB/config-backed resolver must honor ctx for cancellation. | +| `namespacedtopic.go` | NamespacedTopicResolver + its constructor; the default template-based implementation. | template must contain exactly one %s for fmt.Sprintf; a template with no/multiple verbs produces malformed topic names. Empty template is rejected at construction, not at Resolve time. | + +## Anti-Patterns + +- Hard-coding topic names in publishers/consumers instead of resolving through a Resolver. +- Depending on the concrete *NamespacedTopicResolver in wiring rather than the Resolver interface. +- Ignoring ctx in a new resolver that performs I/O (e.g. config or DB lookups). + +## Decisions + +- **Topic resolution is an interface with a trivial template-based default.** — Keeps namespace→topic mapping swappable (template, lookup table, or dynamic) without touching ingest/sink call sites. + +## Example: Build a namespaced topic resolver and resolve a topic + +``` +import "github.com/openmeterio/openmeter/openmeter/ingest/kafkaingest/topicresolver" + +r, err := topicresolver.NewNamespacedTopicResolver("om_%s_events") +if err != nil { return err } +topic, err := r.Resolve(ctx, namespace) // "om__events" +``` + + diff --git a/openmeter/ledger/CLAUDE.md b/openmeter/ledger/CLAUDE.md new file mode 100644 index 0000000000..4253102346 --- /dev/null +++ b/openmeter/ledger/CLAUDE.md @@ -0,0 +1,58 @@ +# ledger + + + +> Double-entry-style ledger for customer credit/business accounts, feature-gated by credits.enabled. The root declares the account taxonomy (customer FBO/receivable/accrued + business wash/earnings/brokerage/breakage), posting primitives (Account/SubAccount/PostingAddress/Entry/Transaction/Ledger), versioned routing (Route/RoutingKey), balance and impact queries, annotation vocabulary, and ValidationIssue error codes. Subpackages provide account, transactions, historical, resolvers, routingrules, recognizer, breakage and a noop/ used when credits are off. + +## Patterns + +**Accounts vs SubAccounts vs PostingAddress** — Account describes ownership/purpose (Type/ID); SubAccount is the concrete postable address derived from a Route via GetSubAccountForRoute; PostingAddress is the routing-only handle (SubAccountID/AccountType/Route) used in entries. Per-type route param structs (CustomerFBORouteParams, CustomerReceivableRouteParams, BusinessRouteParams) build a Route and Validate it. (`fboSub, err := customerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{Currency: "USD", CreditPriority: ledger.DefaultCustomerFBOPriority})`) +**Versioned routing keys** — Route.Normalize() picks the minimum RoutingKeyVersion via selectRoutingKeyVersion (V2 when TaxBehavior set, else V1); BuildRoutingKey dispatches per version (BuildRoutingKeyV1/V2). A new identity-affecting field means a new version, not a mutated key format. (`normalized, _ := route.Normalize(); key, _ := ledger.BuildRoutingKey(normalized)`) +**Atomic transaction groups balanced to zero** — TransactionInput/EntryInput build a TransactionGroupInput committed atomically via Ledger.CommitGroup; ValidateTransactionInput enforces entries sum to 0 (ErrInvalidTransactionTotal). Transactions order by TransactionCursor (BookedAt, then CreatedAt, then ID). (`l.CommitGroup(ctx, txInput.AsGroupInput("namespace", nil))`) +**RouteFilter with mo.Option tri-state matching** — RouteFilter uses mo.Option[*T] for TaxCode/TaxBehavior/Features/CostBasis so a filter can require 'this nil value' vs 'do not filter'; CreditPriority/TransactionAuthorizationStatus are plain pointers meaningful only for fbo/receivable queries. EntryMatchesImpactFilter / TransactionImpact apply this. (`ledger.RouteFilter{TaxCode: mo.Some[*string](nil)} // matches only entries with nil tax code`) +**Annotations as cross-domain linkage vocabulary** — Charge/subscription/breakage/transaction linkage rides in models.Annotations under stable keys (AnnotationChargeID, AnnotationTransactionTemplateCode, AnnotationBreakageKind...) built by helper constructors (ChargeTransactionAnnotations, TransactionAnnotations, BreakageAnnotations) and read back via typed extractors. (`annotations := ledger.TransactionAnnotations("customer.receivable.issue", ledger.TransactionDirectionForward)`) +**Errors are ValidationIssues with attrs** — All ledger errors are models.NewValidationIssue(code, msg) constants; callers attach context via .WithAttrs(models.Attributes{...}) and tests assert by issue.Code() == ErrCode... (`var ErrInvalidTransactionTotal = models.NewValidationIssue(ErrCodeInvalidTransactionTotal, "...credits and debits must sum to 0")`) +**Required route params enforced by the type system** — CreditPriority on CustomerFBORouteParams and TransactionAuthorizationStatus on CustomerReceivableRouteParams are non-pointer/required so the compiler forces an explicit choice; Validate adds value-range checks (ValidateCreditPriority). (`type CustomerFBORouteParams struct { Currency currencyx.Code; CreditPriority int; ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `account.go` | AccountType enum, Customer/Business account groupings, AccountResolver/Reader/Provisioner/Locker interfaces, Create*Input | CustomerAccountTypes vs BusinessAccountTypes drive provisioning; AccountType.Validate is a closed switch. | +| `accounts.go` | Per-type SubAccount interfaces + route param structs (FBO/Receivable/Accrued/Business) with Route()+Validate() | Each param struct maps to a Route; FBO requires CreditPriority, Receivable requires TransactionAuthorizationStatus. | +| `primitives.go` | PostingAddress/SubAccount/Account/Entry/Transaction/Ledger interfaces, RouteFilter, TransactionCursor.Compare | Cursor order is BookedAt then CreatedAt then ID; entries must reference a valid SubAccount address. | +| `routing.go` | RoutingKeyVersion, Route, Normalize, selectRoutingKeyVersion, BuildRoutingKey(V1/V2) | Never change an existing version's key format; add a new RoutingKeyVersion and extend BuildRoutingKey's switch. | +| `impact.go` | TransactionImpact / EntryMatchesImpactFilter — sum entry amounts matching an ImpactFilter (AccountType + RouteFilter) | Route matching uses the normalized route's Matches; mo.Option nil-required semantics matter. | +| `annotations.go` | Annotation key constants + builder/extractor helpers (charge/transaction/breakage linkage, direction, breakage kinds) | Use the helper constructors and *FromAnnotations extractors instead of literal keys; extractors error on missing/invalid. | +| `errors.go` | All ledger ValidationIssue error codes/constants | Return these issues (with .WithAttrs) rather than bare errors so API mapping and tests by Code() work. | +| `balance.go` | BalanceQuerier: GetAccountBalance/GetSubAccountBalance over a RouteFilter + BalanceQuery (After cursor / AsOf) | Balance distinguishes Settled() vs Pending(). | + +## Anti-Patterns + +- Mutating an existing RoutingKey format instead of introducing a new RoutingKeyVersion (breaks historical routing-key matching). +- Posting an unbalanced transaction (entries not summing to 0) — ValidateTransactionInput rejects with ErrInvalidTransactionTotal. +- Writing literal annotation key strings instead of the AnnotationX constants and their builder/extractor helpers. +- Building a SubAccount/posting address by hand instead of GetSubAccountForRoute on the typed account, skipping route Validate (e.g. omitting CreditPriority/TransactionAuthorizationStatus). +- Returning bare errors instead of the ledger ValidationIssue constants with .WithAttrs context. + +## Decisions + +- **Routing keys are explicitly versioned and selected by the minimum version a route needs.** — Lets the route schema grow (e.g. adding tax_behavior in V2) without rewriting historical keys; balance/impact matching stays stable across versions. +- **Account ownership/purpose (Account) is separated from the concrete postable address (SubAccount/PostingAddress).** — A single account fans out to many sub-accounts parameterized by currency/priority/tax route, so postings can be filtered and balanced per route while accounts stay coarse. +- **Some route params (FBO CreditPriority, Receivable authorization status) are non-pointer required fields.** — Forces callers to make an explicit routing decision at the type level rather than defaulting silently. + +## Example: Resolving a customer FBO sub-account and committing a balanced transaction group + +``` +fboSub, err := customerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{ + Currency: currencyx.Code("USD"), + CreditPriority: ledger.DefaultCustomerFBOPriority, +}) +if err != nil { return err } + +inputs, err := transactions.ResolveTransactions(ctx, deps, scope, tx1, tx2, tx3) +if err != nil { return err } +_, err = histLedger.CommitGroup(ctx, transactions.GroupInputs(namespace, nil, inputs...)) +``` + + diff --git a/openmeter/ledger/account/CLAUDE.md b/openmeter/ledger/account/CLAUDE.md new file mode 100644 index 0000000000..a070f0db50 --- /dev/null +++ b/openmeter/ledger/account/CLAUDE.md @@ -0,0 +1,56 @@ +# account + + + +> Domain layer for ledger accounts and sub-accounts: defines the Account/SubAccount/Address value objects, account-type behaviors (FBO, Receivable, Accrued, business), the Repo and Service interfaces, and the posting-address model. The hard constraint is that all rich domain objects are constructed from plain *Data DTOs via NewAccountFromData / NewSubAccountFromData — never by hand. + +## Patterns + +**Data DTO to domain construction** — Every domain value is built from a flat *Data struct through a NewXFromData constructor that validates and resolves embedded sub-objects (e.g. routing key, address). (`NewAccountFromData(AccountData{...}, services) switches on AccountType to return newCustomerFBOAccount / newBusinessAccount etc.`) +**Account-type polymorphism via embedding** — Concrete account types embed *Account (and CustomerAccount embeds it transitively) and implement GetSubAccountForRoute with a type-specific RouteParams. (`type CustomerFBOAccount struct { *CustomerAccount }; var _ ledger.CustomerFBOAccount = (*CustomerFBOAccount)(nil)`) +**Compile-time interface assertions** — Each type asserts the ledger interface it satisfies with a var _ ledger.X = (*T)(nil) line so interface drift fails at build time. (`var _ ledger.SubAccount = (*SubAccount)(nil)`) +**Validate params before EnsureSubAccount** — GetSubAccountForRoute always calls params.Validate() before delegating to services.SubAccountService.EnsureSubAccount. (`if err := params.Validate(); err != nil { return nil, err }`) +**SubAccount creation is find-or-create** — Sub-accounts are obtained through EnsureSubAccount(CreateSubAccountInput{Namespace, AccountID, Route}); the route is the idempotency key. (`a.services.SubAccountService.EnsureSubAccount(ctx, ledger.CreateSubAccountInput{Route: params.Route()})`) +**Address carries the SubAccountRoute** — Address is the ledger.PostingAddress impl built from AddressData; its Equal() compares SubAccountID, AccountType, route ID, routing-key version and value. (`NewAddressFromData(AddressData{SubAccountID, AccountType, Route, RouteID, RoutingKey})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `account.go` | Account value object + NewAccountFromData factory that dispatches on AccountType to the concrete type. | Adding a new AccountType requires a new case here AND a concrete type file; the default branch only validates and returns the base Account. | +| `account_customer.go` | Customer FBO / Receivable / Accrued account types, each with its own RouteParams. | Accrued accounts route by currency (+tax/cost-basis) only, not credit priority — do not copy FBO routing into accrued. | +| `account_business.go` | BusinessAccount (Wash/Earnings/Brokerage/Breakage) GetSubAccountForRoute via BusinessRouteParams. | Business routes should carry only dimensions relevant to that account's accounting, not customer credit-priority. | +| `address.go` | Address (ledger.PostingAddress) built from AddressData; defines structural Equal(). | SubAccountID, AccountType and RouteID are all required; missing fields error in newSubAccountRouteFromAddressData. | +| `subaccount.go` | SubAccount + NewSubAccountFromData, hydrates Address from RouteMeta (routing key version/value). | RouteMeta.RoutingKeyVersion/RoutingKey must round-trip through ledger.NewRoutingKey or construction fails. | +| `repo.go` | Repo interface (embeds entutils.TxCreator) for account/sub-account create/get/list and EnsureSubAccount. | Repo only persists *Data structs; it never returns domain Account/SubAccount values. | +| `service.go` | Service interface = ledger.AccountCatalog + ledger.AccountLocker, plus Input type aliases re-exported from ledger. | Input types are aliases of ledger.* — do not redeclare them. | + +## Anti-Patterns + +- Constructing Account/SubAccount/Address structs directly instead of via NewAccountFromData / NewSubAccountFromData / NewAddressFromData. +- Returning repo *Data structs from a service method instead of mapping to domain values. +- Skipping params.Validate() before EnsureSubAccount in a GetSubAccountForRoute implementation. +- Adding an AccountType without a switch case in NewAccountFromData and a concrete type implementing GetSubAccountForRoute. +- Dropping a var _ ledger.X = (*T)(nil) assertion, letting interface drift go undetected. + +## Decisions + +- **Account behavior is split into concrete types embedding *Account rather than a single struct with a type switch.** — Each account type exposes a strongly-typed RouteParams (CustomerFBORouteParams vs BusinessRouteParams), so the type system enforces correct routing per account kind. +- **Domain objects are reconstructed from flat *Data DTOs.** — Keeps persistence (adapter) decoupled from rich domain construction and lets a single factory enforce validation and address resolution. + +## Example: Account type resolving a routed sub-account + +``` +func (a *CustomerFBOAccount) GetSubAccountForRoute(ctx context.Context, params ledger.CustomerFBORouteParams) (ledger.SubAccount, error) { + if err := params.Validate(); err != nil { + return nil, err + } + return a.services.SubAccountService.EnsureSubAccount(ctx, ledger.CreateSubAccountInput{ + Namespace: a.data.ID.Namespace, + AccountID: a.data.ID.ID, + Route: params.Route(), + }) +} +``` + + diff --git a/openmeter/ledger/account/adapter/CLAUDE.md b/openmeter/ledger/account/adapter/CLAUDE.md new file mode 100644 index 0000000000..ce2b52defe --- /dev/null +++ b/openmeter/ledger/account/adapter/CLAUDE.md @@ -0,0 +1,54 @@ +# adapter + + + +> Ent-backed persistence layer for ledger accounts, sub-accounts, and their routing rows. Implements the ledgeraccount.Repo interface; all reads/writes must stay transaction-aware via entutils so they rebind to a tx already carried in ctx. + +## Patterns + +**TransactingRepo wrapping** — Every public repo method body is wrapped in entutils.TransactingRepo so it rebinds to the ctx-carried tx instead of r.db directly. (`func (r *repo) CreateAccount(ctx, input) (...) { return entutils.TransactingRepo(ctx, r, func(ctx, tx *repo) (...) { entity, err := tx.db.LedgerAccount.Create()... }) }`) +**TxUser implementation** — repo satisfies entutils.TxUser[*repo] via Tx/WithTx/Self; WithTx rebuilds db from raw tx config with entdb.NewTxClientFromRawConfig. (`var _ entutils.TxUser[*repo] = (*repo)(nil); func (r *repo) WithTx(ctx, tx) *repo { return &repo{db: entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()).Client()} }`) +**Map* projector functions** — DB entities are converted to domain Data structs via exported MapAccountData / MapSubAccountData; never return raw db.* entities. (`func MapAccountData(entity *db.LedgerAccount) (*ledgeraccount.AccountData, error)`) +**Idempotent ensure via OnConflict ResolveWithIgnore** — EnsureSubAccount and resolveOrCreateRoute upsert by unique constraint columns then re-query, so duplicate routes/sub-accounts resolve to the existing row. (`OnConflict(sql.ConflictColumns(FieldNamespace, FieldAccountID, FieldRouteID), sql.ResolveWithIgnore()).Exec(ctx)`) +**Route normalization before persistence/query** — Routes are normalized (input.Route.Normalize()) and keyed via ledger.BuildRoutingKey before insert and in list-filter predicate building, so cost-basis canonicalization (0.70 == 0.7) is enforced. (`normalizedRoute, _ := input.Route.Normalize(); routeKey, _ := ledger.BuildRoutingKey(normalizedRoute)`) +**Eager-load required edges then validate** — Sub-account queries use WithRoute().WithAccount(); MapSubAccountData errors if either edge is nil. (`if entity.Edges.Account == nil { return ..., fmt.Errorf("account edge is required") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `repo.go` | repo struct, NewRepo constructor, and the TxUser plumbing (Tx/WithTx/Self) plus Repo interface assertion. | WithTx must rebuild db from the raw tx config; do not return r unchanged or transactions leak across the original client. | +| `account.go` | Account CRUD: CreateAccount, GetAccountByID, ListAccounts, and MapAccountData projector. | Wrap all bodies in TransactingRepo; ListAccounts only filters AccountTypeIn when input.AccountTypes is non-empty. | +| `subaccount.go` | Sub-account ensure/get/list, the private resolveOrCreateRoute upsert, and MapSubAccountData. | resolveOrCreateRoute is the only place routes are created; route filtering in ListSubAccounts uses mo.Option presence semantics (IsPresent + nil-inner => *IsNil predicate). | +| `repo_test.go` | Integration tests against a real Postgres (testutils.InitPostgresDB + migrate.OMMigrationsConfig); exercises route uniqueness and cost-basis canonicalization. | Requires Postgres; tests assert entdb.IsConstraintError on duplicate routing keys and that canonicalized cost basis collides. | + +## Anti-Patterns + +- Accessing r.db directly inside a method body instead of the tx-bound client from TransactingRepo. +- Returning raw db.LedgerAccount / db.LedgerSubAccount entities instead of mapped Data structs. +- Building route rows without Normalize() + BuildRoutingKey, breaking cost-basis canonical uniqueness. +- Mapping a sub-account without WithRoute()/WithAccount() loaded, hitting the nil-edge error. +- Implementing ensure as plain Create instead of OnConflict+ResolveWithIgnore, losing idempotency. + +## Decisions + +- **Routes are upserted independently of sub-accounts rather than being a dependent edge.** — Per subaccount.go comment: routes are shared/hidden internal rows; a standalone routes table reveals which currencies are held without sub-account grouping detail. +- **Cost basis is canonicalized through the routing key, not stored verbatim for uniqueness.** — Ensures 0.70 and 0.7 map to one sub-account/route, enforced both in BuildRoutingKey and the unique constraint (tested in TestRepo_SubAccountRouteUniquenessConstraints). + +## Example: Tx-aware ensure with upsert and re-query + +``` +func (r *repo) EnsureSubAccount(ctx context.Context, input ledgeraccount.CreateSubAccountInput) (*ledgeraccount.SubAccountData, error) { + return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgeraccount.SubAccountData, error) { + route, err := tx.resolveOrCreateRoute(ctx, input) + if err != nil { return nil, fmt.Errorf("failed to resolve route: %w", err) } + err = tx.db.LedgerSubAccount.Create(). + SetNamespace(input.Namespace).SetAccountID(input.AccountID).SetRouteID(route.ID). + OnConflict(sql.ConflictColumns(dbledgersubaccount.FieldNamespace, dbledgersubaccount.FieldAccountID, dbledgersubaccount.FieldRouteID), sql.ResolveWithIgnore()).Exec(ctx) + if err != nil { return nil, fmt.Errorf("failed to ensure ledger sub-account: %w", err) } + return tx.GetSubAccountByID(ctx, models.NamespacedID{Namespace: input.Namespace, ID: route.ID}) + }) +} +``` + + diff --git a/openmeter/ledger/account/service/CLAUDE.md b/openmeter/ledger/account/service/CLAUDE.md new file mode 100644 index 0000000000..2ac2aeaeb8 --- /dev/null +++ b/openmeter/ledger/account/service/CLAUDE.md @@ -0,0 +1,52 @@ +# service + + + +> Service layer implementing ledger.account.Service over a ledgeraccount.Repo: validates inputs, maps Data structs into rich domain Account/SubAccount values, and provides advisory locking for posting. Single file service.go. + +## Patterns + +**Validate-then-delegate** — Mutating methods call input.Validate() first and return early on error before touching the repo. (`func (s *service) CreateAccount(ctx, input) { if err := input.Validate(); err != nil { return nil, err }; accData, err := s.repo.CreateAccount(ctx, input)... }`) +**Data-to-domain mapping** — Repo returns *Data; service wraps each into a domain value via account.NewAccountFromData(data, s.live) or account.NewSubAccountFromData(data). (`return account.NewAccountFromData(*accData, s.live)`) +**Self-wired live services** — New() sets svc.live = account.AccountLiveServices{SubAccountService: svc} so accounts can resolve sub-account posting addresses through the same service. (`svc.live = account.AccountLiveServices{SubAccountService: svc}; return svc`) +**transaction.Run for multi-step writes** — EnsureSubAccount wraps repo call in transaction.Run(ctx, s.repo, ...) so the create-and-map sequence shares one tx. (`return transaction.Run(ctx, s.repo, func(ctx) (ledger.SubAccount, error) { ... })`) +**Deterministic lock ordering** — LockAccountsForPosting dedupes by ID, sorts by (namespace, id), then LockForTX each, to avoid deadlocks; only customer FBO/Receivable/Accrued account types are locked. (`sort.Slice(ids, ...); key, _ := lockr.NewKey("namespace", id.Namespace, "account", id.ID); s.locker.LockForTX(ctx, key)`) +**Nil-locker tolerance** — LockAccountsForPosting returns nil immediately when s.locker is nil, so locking is optional dependency. (`if s.locker == nil { return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Whole service: struct {repo, locker, live}, New constructor, account/sub-account CRUD, and LockAccountsForPosting. | Always pass s.live into NewAccountFromData; locking only covers customer FBO/Receivable/Accrued types and must keep the sorted-by-namespace-then-id order to stay deadlock-free. | + +## Anti-Patterns + +- Skipping input.Validate() before delegating mutations to the repo. +- Returning repo *Data structs directly instead of NewAccountFromData / NewSubAccountFromData domain values. +- Forgetting to pass s.live to NewAccountFromData, breaking sub-account address resolution. +- Locking accounts in arbitrary order, reintroducing deadlock risk. +- Using slog.Default() or context.Background() instead of injected dependencies / propagated ctx. + +## Decisions + +- **SubAccountService is self-wired into AccountLiveServices inside New rather than injected.** — Account-specific route helpers need a concrete sub-account service to create posting addresses; the service is its own provider so no external wiring is required. +- **Posting locks are scoped to customer account types and ordered deterministically.** — Only customer FBO/Receivable/Accrued accounts participate in concurrent posting; sorted lock acquisition prevents deadlocks across concurrent transactions. + +## Example: Constructor self-wiring live services and validate-then-delegate create + +``` +func New(repo account.Repo, locker *lockr.Locker) account.Service { + svc := &service{repo: repo, locker: locker} + svc.live = account.AccountLiveServices{SubAccountService: svc} + return svc +} + +func (s *service) CreateAccount(ctx context.Context, input ledger.CreateAccountInput) (ledger.Account, error) { + if err := input.Validate(); err != nil { return nil, err } + accData, err := s.repo.CreateAccount(ctx, input) + if err != nil { return nil, fmt.Errorf("failed to create account: %w", err) } + return account.NewAccountFromData(*accData, s.live) +} +``` + + diff --git a/openmeter/ledger/breakage/CLAUDE.md b/openmeter/ledger/breakage/CLAUDE.md new file mode 100644 index 0000000000..d5b630e1b3 --- /dev/null +++ b/openmeter/ledger/breakage/CLAUDE.md @@ -0,0 +1,54 @@ +# breakage + + + +> Credit-expiration breakage sub-domain: keeps future credit-expiration ledger entries aligned with actual usage via plan/release/reopen records, and projects customer-visible expired-credit impacts. The ledger is the source of truth; breakage records are an allocation/index layer whose correctness rests on the invariant 'FBO consumption order == breakage release order' (credit_priority asc, expires_at asc, stable cursor asc). + +## Patterns + +**Service returns ledger inputs, caller commits** — PlanIssuance/ReleasePlan/ReopenRelease return []ledger.TransactionInput + PendingRecord rather than committing; the caller owns the surrounding ledger transaction group so credit and breakage movement stay atomic. (`func (s *service) PlanIssuance(...) ([]ledger.TransactionInput, []PendingRecord, error)`) +**Validate-first on every input** — Each Input type has a Validate() that joins errors with errors.Join and uses ledger.Validate* helpers; service methods call input.Validate() before any work. (`if err := input.Validate(); err != nil { return nil, nil, err }`) +**Pending then persisted records** — Operations emit PendingRecord; durable rows are written only after the ledger commits via PersistCommittedRecords(pending, group). (`planRecord := PendingRecord{Record: Record{ID: planID, Kind: ledger.BreakageKindPlan, ...}}`) +**Config-validated constructor** — NewService(Config) validates Adapter + Dependencies (AccountService, AccountCatalog) before returning the service. (`if c.Adapter == nil { errs = append(errs, errors.New("adapter is required")) }`) +**Explicit noop implementation** — NoopService implements every Service method as a no-op for deployments/tests without expiration support; wiring picks it when breakage is disabled. (`func NewNoopService() Service { return NoopService{} }`) +**Net impact by (expiresAt, currency)** — ListExpiredBreakageImpacts groups records, computes plans - releases + reopens, hides zero groups, rejects negative totals, and exposes -(net) as the customer-visible amount. (`impact = -(plans - releases + reopens); group.amount.Neg()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `README.md` | Authoritative spec of plan/release/reopen semantics, ledger notation (FBO/BR/ACCRUED), and the consumption==release ordering invariant. | Read this before changing any breakage math — the correctness argument depends on collection order matching release order. | +| `service.go` | Service interface, Config + NewService, all *Input types and their Validate() methods, and the concrete service. | ReleasePlanInput requires SourceKind in {Usage,UsageCorrection,CreditPurchaseCorrection,AdvanceBackfill}; ReopenReleaseInput only allows correction kinds. | +| `breakage_impacts.go` | ListExpiredBreakageImpacts: nets records into BreakageImpact items, applies cursor window, sorts by descending cursor. | A negative netted group amount is a hard error (releases exceeded plans); a group with no plan record (empty cursorID) is also an error. | +| `noop.go` | NoopService — disabled breakage that returns empty results for every method. | Keep it in lockstep with the Service interface; a new interface method needs a noop here or wiring breaks. | +| `types.go` | Declares Adapter interface, Record/PendingRecord/Plan/Release and BreakageImpact types (referenced by service.go and the adapter). | Record.ValidateForReference requires ID, CustomerID, Currency, ExpiresAt, and both FBO + breakage sub-account IDs. | + +## Anti-Patterns + +- Committing ledger entries inside a breakage service method instead of returning TransactionInputs for the caller's group. +- Diverging release/reopen ordering from FBO collection ordering (credit_priority asc, expires_at asc, stable cursor asc) — breaks the core invariant. +- Persisting record rows before the corresponding ledger transactions commit instead of going through PersistCommittedRecords. +- Putting metadata (kind, source links) into route dimensions, or putting collection-eligibility fields (credit_priority) into annotations. +- Returning a negative or plan-less netted impact group instead of erroring — it signals corrupted accounting. + +## Decisions + +- **Breakage records are an index layer, not the accounting source of truth.** — The ledger holds the signed entries; records only let later flows find open plans, reopen releases, and project expired credit without grant-level lineage. +- **Plan/release/reopen rely on consumption-order == release-order instead of explicit grant lineage.** — Sharing one deterministic ordering lets a release reduce exactly the right expiry without tracking which grant the usage came from. + +## Example: Netting expired breakage records into a customer-visible impact + +``` +switch record.Kind { +case ledger.BreakageKindPlan, ledger.BreakageKindReopen: + group.amount = group.amount.Add(record.Amount) + if record.Kind == ledger.BreakageKindPlan && (group.cursorID.ID == "" || record.ID.ID < group.cursorID.ID) { + group.cursorID = record.ID + } +case ledger.BreakageKindRelease: + group.amount = group.amount.Sub(record.Amount) +} +// item.Amount = group.amount.Neg() +``` + + diff --git a/openmeter/ledger/breakage/adapter/CLAUDE.md b/openmeter/ledger/breakage/adapter/CLAUDE.md new file mode 100644 index 0000000000..df8f31e1af --- /dev/null +++ b/openmeter/ledger/breakage/adapter/CLAUDE.md @@ -0,0 +1,58 @@ +# adapter + + + +> Ent-backed persistence adapter for the ledger breakage sub-domain: it stores and queries durable `ledger_breakage_record` rows (plan/release/reopen/expired) that back the breakage service's open-amount accounting. It implements the `breakage.Adapter` interface declared in the parent package's types.go. + +## Patterns + +**Constructor returns the parent interface, not the concrete type** — New(Config) returns breakage.Adapter; Config carries only *entdb.Client and Config.Validate() rejects a nil client before constructing the unexported adapter struct. (`func New(config Config) (breakage.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client}, nil }`) +**Transaction-aware repo wrapping on every method** — Each adapter method wraps its body in entutils.TransactingRepo (read/return) or TransactingRepoWithNoValue (CreateRecords), so the Ent client rebinds to any tx already carried in ctx. Tx/WithTx/Self implement the entutils transacting-repo contract via HijackTx and NewTxClientFromRawConfig. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]breakage.Record, error) { ... tx.db.LedgerBreakageRecord.Query()... })`) +**Validate inputs before touching the DB** — Methods call input.Validate()/input.CustomerID.Validate()/input.Currency.Validate() and guard required fields (AsOf.IsZero(), empty source-id slices) up front, returning early (nil,nil for no-op selectors) before opening a transaction. (`if input.AsOf.IsZero() { return nil, fmt.Errorf("as of is required") }`) +**Always filter DeletedAtIsNil and Namespace + CustomerID** — Every query scopes by NamespaceEQ + CustomerIDEQ + DeletedAtIsNil; breakage rows are soft-deleted and multi-tenant, so omitting any of these leaks cross-tenant or stale rows. (`dbledgerbreakagerecord.NamespaceEQ(...), dbledgerbreakagerecord.CustomerIDEQ(...), dbledgerbreakagerecord.DeletedAtIsNil()`) +**ForUpdate() locking on contended selectors** — ListCandidateRecords, ListReleaseRecords (and its reopen follow-up query) call .ForUpdate() so concurrent collectors/corrections cannot double-release the same open amount; ListExpiredRecords intentionally does NOT lock. (`tx.db.LedgerBreakageRecord.Query().Where(...).Order(...).ForUpdate().All(ctx)`) +**Centralized DB->domain mapping via mapRecordFromDB** — All rows are converted through mapRecordFromDB (and the mapRecords slice helper); new persisted columns must be added there AND in the CreateRecords builder chain or fields silently drop. (`out = append(out, mapRecordFromDB(row))`) +**Bulk insert with SetNillable for optional FKs** — CreateRecords builds *LedgerBreakageRecordCreate per record and CreateBulk(...).Exec; optional source/plan/release pointers use SetNillable* setters, and empty input short-circuits to nil before Exec. (`create := tx.db.LedgerBreakageRecord.Create().SetID(...).SetNillableSourceEntryID(record.SourceEntryID)...`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Defines Config (just *entdb.Client), New constructor, the unexported adapter struct, and the entutils transacting-repo plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self). | Tx hijacks a read-write tx (ReadOnly:false); WithTx rebuilds the client from the raw tx config — don't bypass these or TransactingRepo can't rebind to the caller's transaction. | +| `record.go` | All breakage.Adapter methods: CreateRecords (bulk insert), ListReleaseRecords (release+reopen rows, locked), ListExpiredRecords (expiry <= AsOf, unlocked), ListCandidateRecords (Plan/Release/Reopen kinds, expiry > AsOf, ordered by CreditPriority). Plus mapRecordFromDB/mapRecords. | Ordering matters: candidates order by CreditPriority asc then ExpiresAt asc; expired order DESC. ListReleaseRecords needs at least one of SourceEntryID/SourceTransactionGroupID or it returns (nil,nil). Reopen rows are fetched in a second query keyed by ReleaseIDIn(releaseIDs). | + +## Anti-Patterns + +- Returning the concrete *adapter from New instead of breakage.Adapter, or skipping Config.Validate(). +- Running Ent queries directly on a.db instead of through entutils.TransactingRepo(WithNoValue) — breaks transaction propagation from ctx. +- Omitting DeletedAtIsNil / Namespace / CustomerID predicates, leaking soft-deleted or cross-tenant rows. +- Dropping .ForUpdate() on candidate/release queries, allowing concurrent collectors to release the same open amount twice. +- Adding a Record field without updating both the CreateRecords builder chain and mapRecordFromDB, silently losing the column. + +## Decisions + +- **Adapter persists only durable record rows; the ledger entries themselves live elsewhere.** — Per the parent service.go comment, breakage records are an accounting projection layered over the real ledger entries, so this adapter owns row CRUD/locking, not entry posting. +- **Locking is selective — write/contended selectors use ForUpdate, expiry read does not.** — Candidate and release computations must be serialized to avoid double-release, but expired-row reads are netted by the caller and don't need row locks. + +## Example: A new Adapter list method scoped to a customer, transaction-aware and tenant-safe + +``` +func (a *adapter) ListExpiredRecords(ctx context.Context, input breakage.ListExpiredRecordsInput) ([]breakage.Record, error) { + if err := input.CustomerID.Validate(); err != nil { + return nil, fmt.Errorf("customer id: %w", err) + } + if input.AsOf.IsZero() { + return nil, fmt.Errorf("as of is required") + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) ([]breakage.Record, error) { + rows, err := tx.db.LedgerBreakageRecord.Query(). + Where( + dbledgerbreakagerecord.NamespaceEQ(input.CustomerID.Namespace), + dbledgerbreakagerecord.CustomerIDEQ(input.CustomerID.ID), + dbledgerbreakagerecord.DeletedAtIsNil(), + dbledgerbreakagerecord.ExpiresAtLTE(input.AsOf), + ).All(ctx) +// ... +``` + + diff --git a/openmeter/ledger/chargeadapter/CLAUDE.md b/openmeter/ledger/chargeadapter/CLAUDE.md new file mode 100644 index 0000000000..c7b9982e28 --- /dev/null +++ b/openmeter/ledger/chargeadapter/CLAUDE.md @@ -0,0 +1,50 @@ +# chargeadapter + + + +> Adapter layer that implements the billing/charges Handler interfaces (creditpurchase.Handler, flatfee.Handler, usagebased.Handler) by mapping charge lifecycle events onto ledger transaction templates. It is the bridge between the billing charge state machines and the double-entry ledger; it acknowledges/books value but does NOT recognize revenue. + +## Patterns + +**Implement charge Handler interfaces** — Each file defines an unexported handler struct with a compile-time interface assertion and a NewXHandler constructor. Methods follow the OnX naming of the upstream Handler interface. (`var _ chargecreditpurchase.Handler = (*creditPurchaseHandler)(nil); func NewCreditPurchaseHandler(...) (chargecreditpurchase.Handler, error)`) +**Resolve templates then CommitGroup** — Build transactions.TransactionTemplate values, call transactions.ResolveTransactions(ctx, deps, ResolutionScope{...}, templates...) to get inputs, then ledger.CommitGroup(ctx, transactions.GroupInputs(namespace, annotations, inputs...)). Return ledgertransaction.GroupReference{TransactionGroupID: group.ID().ID}. (`inputs, _ := transactions.ResolveTransactions(ctx, h.deps, scope, transactions.TransferCustomerReceivableToAccruedTemplate{...}); group, _ := h.ledger.CommitGroup(ctx, transactions.GroupInputs(ns, annotations, inputs...))`) +**Stamp charge annotations on every input and the group** — Compute annotations via chargeAnnotationsForFlatFeeCharge / ...UsageBasedCharge / ...CreditPurchaseCharge (which delegate to ledger.ChargeTransactionAnnotations), then wrap each non-nil input with transactions.WithAnnotations and pass the same annotations to GroupInputs. (`for i, txInput := range inputs { if txInput != nil { inputs[i] = transactions.WithAnnotations(txInput, annotations) } }`) +**Validate input and short-circuit zero amounts** — Every On* method calls input.Validate() first and returns an empty GroupReference (no ledger write) when the relevant amount IsZero()/!IsPositive(). (`if err := input.Validate(); err != nil { return ledgertransaction.GroupReference{}, err }; if amount.IsZero() { return ledgertransaction.GroupReference{}, nil }`) +**Gate on settlement mode** — Credit-vs-invoice flows assert allowed productcatalog.SettlementMode via validateSettlementMode(actual, allowed...) before booking; wrong mode is an error, not a no-op. (`if err := validateSettlementMode(charge.Intent.SettlementMode, productcatalog.CreditThenInvoiceSettlementMode); err != nil { return ..., fmt.Errorf("invoice usage accrued: %w", err) }`) +**Delegate accrual collection to collector.Service** — OnAllocateCredits / OnCreditsOnlyUsageAccrued and their corrections delegate to h.collector.CollectToAccrued / CorrectCollectedAccrued; do not re-implement FBO source selection here. (`realizations, err := h.collector.CollectToAccrued(ctx, collector.CollectToAccruedInput{...})`) +**Wrap multi-step flows in transaction.Run** — Credit purchase issuance spanning attribution + breakage planning + commit is wrapped in transaction.Run(ctx, h.transactionManager, ...) so ledger group + breakage records persist atomically. (`return transaction.Run(ctx, h.transactionManager, func(ctx context.Context) (ledgertransaction.GroupReference, error) { return h.issueCreditPurchaseGroup(ctx, charge) })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `creditpurchase.go` | creditPurchaseHandler: promotional/initiated/payment-authorized/settled events; advance attribution + breakage planning via breakage.Service.PlanIssuance/PersistCommittedRecords. | Promotional grants emit Authorize+Settle wash templates; deferred (External/Invoice) settlement is left for later events; unsupported settlement Type() returns an error. Breakage records must be persisted in the same tx as the group. | +| `flatfee.go` | flatFeeHandler: FBO credit allocation, invoice-usage accrual (TransferCustomerReceivableToAccruedTemplate), correction, payment authorize/settle. | OnAllocateCredits/OnInvoiceUsageAccrued acknowledge usage, NOT revenue. invoiceCostBasis is fixed at 1. OnPaymentUncollectible is intentionally unimplemented and returns an error. | +| `usagebased.go` | usageBasedHandler: invoice-usage accrual, credits-only accrual + correction, payment authorize/settle; receivable replenishment derived from Run.InvoiceUsage.Totals. | OnCreditsOnlyUsageAccrued uses clock.Now() for SourceBalanceAsOf while flat-fee uses Intent.InvoiceAt — booked-at vs source-as-of are deliberately distinct. | +| `annotations.go` | chargeAnnotationsForX helpers feeding ledger.ChargeTransactionAnnotations with subscription/feature references from charge.Intent. | FeatureID extraction differs per charge type (flatfee uses State.FeatureID, usagebased uses lo.EmptyableToPtr(State.FeatureID)); keep subscription nil-handling intact. | +| `helpers.go` | settledBalanceForSubAccount and taxCodeIDFromIntent/taxBehaviorFromIntent mapping productcatalog.TaxCodeConfig to ledger fields. | taxBehaviorFromIntent returns nil unless both TaxCodeID and Behavior are set. | + +## Anti-Patterns + +- Booking ledger entries without stamping charge annotations on both each input and the group — breaks downstream charge/transaction correlation. +- Treating accrual/acknowledgement transactions as revenue recognition — recognition lives in openmeter/ledger/recognizer. +- Calling CommitGroup without first validating the input and short-circuiting zero amounts, producing empty/noise ledger groups. +- Re-implementing FBO source selection or breakage release ordering here instead of delegating to collector.Service / breakage.Service. +- Skipping validateSettlementMode so a credit-only charge books invoice-mode receivables (or vice versa). + +## Decisions + +- **Charge handlers are thin mappers from charge events to transaction templates** — Keeps double-entry correctness centralized in the transactions/ledger/collector packages; the adapter only owns the charge-event-to-template mapping and annotation stamping. +- **Acknowledgement (accrual) is separated from revenue recognition** — Booking usage against accrued must not prematurely recognize earnings; recognition is a distinct deferred flow keyed off lineage segment state. + +## Example: Mapping an invoice-usage event to a ledger transfer with annotations + +``` +annotations := chargeAnnotationsForFlatFeeCharge(input.Charge) +inputs, err := transactions.ResolveTransactions(ctx, h.deps, transactions.ResolutionScope{CustomerID: customerID, Namespace: input.Charge.Namespace}, transactions.TransferCustomerReceivableToAccruedTemplate{At: input.BookedAt, Amount: amount, Currency: input.Charge.Intent.Currency, CostBasis: invoiceCostBasis}) +for i, txInput := range inputs { if txInput != nil { inputs[i] = transactions.WithAnnotations(txInput, annotations) } } +group, err := h.ledger.CommitGroup(ctx, transactions.GroupInputs(input.Charge.Namespace, annotations, inputs...)) +return ledgertransaction.GroupReference{TransactionGroupID: group.ID().ID}, nil +``` + + diff --git a/openmeter/ledger/collector/CLAUDE.md b/openmeter/ledger/collector/CLAUDE.md new file mode 100644 index 0000000000..bc38ded977 --- /dev/null +++ b/openmeter/ledger/collector/CLAUDE.md @@ -0,0 +1,53 @@ +# collector + + + +> Turns customer FBO credit (and advance) into accrued value, and unwinds it on correction, while preserving the exact order in which credit slices were collected so later breakage release/correction undo the same economic slices. The hard invariant is collection-order fidelity, not the FBO->accrued posting itself. + +## Patterns + +**Service splits into collector + corrector** — Service is implemented by struct{collector *accrualCollector; corrector *accrualCorrector}; CollectToAccrued routes to collector.collect, CorrectCollectedAccrued to corrector.correct. Build via NewService(Config) after Config.Validate(). (`return &service{collector: &accrualCollector{...}, corrector: &accrualCorrector{...}}, nil`) +**One DB transaction per flow** — collect and correct wrap their whole body in transaction.Run(ctx, c.transactionManager, run); source selection, ledger CommitGroup, breakage PersistCommittedRecords, and realization creation must share the transaction. (`return transaction.Run(ctx, c.transactionManager, run)`) +**Deterministic FBO collection order** — Sources sort by fboCollectionSource.Compare: creditPriority asc, featureRestricted first, expires_at asc (nil last via compareOptionalTime), then stable cursor asc. This ordering is a frozen contract. (`slices.SortStableFunc(sources, cmpx.Compare[fboCollectionSource])`) +**Lock FBO account before listing sources** — listCustomerFBOSources calls c.accountLocker.LockAccountsForPosting([]ledger.Account{customerAccounts.FBOAccount}) before ListSubAccounts to serialize concurrent collection. (`if err := c.accountLocker.LockAccountsForPosting(ctx, []ledger.Account{customerAccounts.FBOAccount}); err != nil { ... }`) +**Release breakage for consumed expiring sources** — For each selected source with a breakagePlan, call breakage.ReleasePlan with a NewCollectionSourceIdentityKey(idx) so release order matches collection order; append the release input and PendingRecord. (`releaseInput, releaseRecord, _ := c.breakage.ReleasePlan(ctx, breakage.ReleasePlanInput{Plan: *selection.source.breakagePlan, Amount: selection.amount, SourceKind: breakage.SourceKindUsage, SourceEntryIdentityKey: transactions.NewCollectionSourceIdentityKey(idx)})`) +**Credit-only shortfall becomes advance** — When SettlementMode==CreditOnly and FBO did not cover the amount, resolveAdvanceInputs issues a receivable then transfers FBO advance to accrued (IssueCustomerReceivableTemplate + TransferCustomerFBOAdvanceToAccruedTemplate). (`if shortfall := input.Amount.Sub(collectedInputs(inputs).collectedFBOAmount()); c.shouldAdvanceShortfall(input, shortfall) { ... }`) +**Coarse billing realizations from fine ledger entries** — toCreditRealizations buckets negative FBO entry amounts by SubAccountID (preserving order) into creditrealization.CreateAllocationInput; entry-level identity splits must not leak as separate realizations. (`amountsBySubAccountID[subAccountID] = amountsBySubAccountID[subAccountID].Add(entry.Amount().Abs())`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `README.md` | Authoritative spec of collection order, source-entry identity, credit-only advance, advance backfill, correction unwind order, and the transaction-boundary invariant. | Read this before changing any ordering; correction uses reverse original collection order and must net with breakage plan/release/reopen exactly. | +| `collect.go` | accrualCollector.collect: resolves collected inputs, optionally issues advance, commits the group, persists breakage, returns CreateAllocationInputs. | Group annotations default to ledger.ChargeAnnotations when input.Annotations is nil; breakage persistence is skipped only when c.breakage is nil. | +| `collection_fbo.go` | FBO source listing, sorting (fboCollectionSource.Compare), and selection into fboCollectionSelection. | The TODO notes the Compare contract must be versioned before changing — existing entries/corrections/breakage assume it. compareOptionalTime treats nil expiry as sorting last. | +| `correct.go` | accrualCorrector.correct: plan-then-execute correction merging overlapping corrections, reissuing advance, reopening breakage. | plannedDirectInputs skip the merge/CorrectTransaction path; plannedTransactionCorrection.mergeKey dedupes by transaction namespaced ID. | +| `service.go` | Service interface, Config + Validate, input structs (CollectToAccruedInput, CorrectCollectedAccruedInput), constructor. | CollectToAccrued requires non-zero BookedAt and SourceBalanceAsOf — these are deliberately separate timestamps (booked time vs source-visibility time). | + +## Anti-Patterns + +- Changing fboCollectionSource.Compare ordering without versioning the contract — corrupts correction and breakage-release alignment for existing ledger data. +- Committing the ledger group, breakage records, or billing allocations outside the single transaction.Run boundary, leaving observable impossible intermediate states. +- Listing FBO sources without first LockAccountsForPosting, allowing concurrent double-collection of the same credit. +- Emitting per-entry credit realizations instead of bucketing by FBO sub-account, leaking ledger internals into billing. +- Selecting expiring sources without issuing the matching breakage ReleasePlan keyed by NewCollectionSourceIdentityKey(idx). + +## Decisions + +- **BookedAt and SourceBalanceAsOf are separate inputs** — A transaction booked at T1 may need to see credit/expiry state visible as of a later T5; conflating them would misselect sources. +- **Source entry identity records order, not amounts** — Billing allocations are coarser than ledger collection; amounts come from ledger entries, identity only preserves selection order so corrections/breakage can unwind the same slices. +- **Collection order is a frozen, versioned contract** — Corrections unwind in reverse and breakage releases attach to concrete source entries; any reorder would desync persisted ledger/breakage rows. + +## Example: Collecting FBO into accrued and releasing breakage for consumed expiring sources + +``` +selections, _ := c.collectCustomerFBOSelections(ctx, c.customerID(input), input.Currency, input.FeatureKey, amount, input.SourceBalanceAsOf) +inputs, _ := transactions.ResolveTransactions(ctx, c.deps, c.resolutionScope(input), transactions.TransferCustomerFBOToAccruedTemplate{At: input.BookedAt, Currency: input.Currency, Sources: fboCollectionSelections(selections).postingAmounts()}) +for idx, selection := range selections { + if selection.source.breakagePlan == nil { continue } + releaseInput, releaseRecord, _ := c.breakage.ReleasePlan(ctx, breakage.ReleasePlanInput{Plan: *selection.source.breakagePlan, Amount: selection.amount, SourceKind: breakage.SourceKindUsage, SourceEntryIdentityKey: transactions.NewCollectionSourceIdentityKey(idx)}) + inputs = append(inputs, releaseInput); pending = append(pending, releaseRecord) +} +``` + + diff --git a/openmeter/ledger/customerbalance/CLAUDE.md b/openmeter/ledger/customerbalance/CLAUDE.md new file mode 100644 index 0000000000..ceda0f7942 --- /dev/null +++ b/openmeter/ledger/customerbalance/CLAUDE.md @@ -0,0 +1,53 @@ +# customerbalance + + + +> Customer-facing read model over ledger + billing activity: exposes credit balance at a point in time and a merged credit-transaction listing (funded/consumed/expired). It is a temporary bridge until the Real-Time-Engine (RTE) lands; it must keep API semantics stable while the implementation may stop querying the ledger directly. + +## Patterns + +**Facade validates and delegates to Service** — Facade wraps a Service; every method validates a typed input (GetBalancesInput/GetBalanceInput/ListCreditTransactionsInput Validate via models.NewNillableGenericValidationError) then calls the service. Build with NewFacade(service) (non-nil required). (`func (f *Facade) GetBalance(ctx, input GetBalanceInput) (alpacadecimal.Decimal, error) { if err := input.Validate(); err != nil { return ..., err }; ... return balance.Settled(), nil }`) +**Service depends on narrow local interfaces** — service depends on small interfaces (chargesService, creditPurchaseActivityService, subAccountLister, usageBasedTotalsService) plus ledger.AccountResolver/Ledger/BalanceQuerier/breakage.Service, all validated in Config.Validate and assembled in New. (`type chargesService interface { GetByIDs(...); ListCharges(...) }`) +**Default to current as-of when unfiltered** — GetBalance applies currentBalanceQuery, which sets AsOf=clock.Now() unless After or AsOf is already provided; balance = booked FBO settled + advance receivable settled, minus pending charge impacts. (`query = currentBalanceQuery(query) // sets AsOf = clock.Now() when neither After nor AsOf set`) +**Pluggable per-type transaction loaders** — creditTransactionLoaderFactories maps funded/consumed/expired to loader factories; creditTransactionLoaders returns all (in creditTransactionLoaderOrder) or one when a type filter is set. Each loader implements Load(ctx, creditTransactionLoaderInput). (`factory, ok := creditTransactionLoaderFactories[*txType]`) +**K-way merge by ledger cursor** — Per-type loader results are merged via mergeSortedLists with a max-heap keyed by ledger.TransactionCursor{BookedAt, CreatedAt, ID}; descending order is enforced by Less returning cmp(...) > 0. (`merged, hasMore := mergeSortedLists(lists, limit, compareCreditTransactionsByCursor)`) +**Expired rows come from breakage net impacts** — expiredCreditTransactionLoader reads service.Breakage.ListExpiredBreakageImpacts (plans - releases + reopens), not raw breakage transactions; zero-net groups are hidden; cursor is the newest contributing breakage transaction. (`result, _ := l.service.Breakage.ListExpiredBreakageImpacts(ctx, breakage.ListExpiredBreakageImpactsInput{...})`) +**NoopService when credits disabled** — NoopService implements Service returning zero balances/empty listings; New supplies a breakage Noop when Config.Breakage is nil. (`var _ Service = NoopService{}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `README.md` | Spec of balance/asOf semantics, transaction listing types, expired projection (plan/release/reopen netting), cursor semantics, and the presentation boundary. | This package must NOT decide how plan/release/reopen net, FBO collection order, or correction unwind order — those belong to breakage and collector. | +| `service.go` | Service interface, dependency interfaces, Config/Validate, struct, GetBalance/GetFBOCurrencies; explicitly documented as not the RTE. | Pending balance is a current projection from open charges via balanceCalculator even when AsOf/cursor filters the booked side; chargeListPageSize=100. | +| `calculation.go` | Impact wrapper over charges.Charge and chargePendingBalanceCalculator; bounded (credit_then_invoice) vs unbounded (credit_only) amounts. | RealizedCredits skips IsVoidedBillingHistory runs; applyBoundedAmount clamps at zero (can't go negative) while unbounded credit_only can drive balance negative. | +| `facade.go` | Public entry: GetBalances/GetBalance/ListCreditTransactions with input validation and currency dedup. | GetBalanceInput rejects After+AsOf together; GetBalances falls back to GetFBOCurrencies when no currency filter is given. | +| `loaders.go` | creditTransactionLoader interface, ordering, and factory map per CreditTransactionType. | consumed reuses newLedgerCreditTransactionLoader with ListTransactionsCreditMovementNegative; adding a type requires updating both order slice and factory map. | +| `merge.go` | container/heap-based descending k-way merge and cursor extraction. | Less inverts cmp (>0) to produce descending order; limit<=0 returns empty with HasMore=false. | +| `transactions.go` | CreditTransactionType enum, ListCreditTransactions input/result/validation, CreditTransaction view model. | AsOf boundary must be applied before projection so future breakage entries don't leak; After/Before are mutually exclusive. | + +## Anti-Patterns + +- Computing expired amounts from raw breakage ledger transactions instead of ListExpiredBreakageImpacts net (plan - release + reopen) — duplicates or miscounts expiry. +- Letting RealizedCredits count IsVoidedBillingHistory runs, double-counting reversed billing against the customer balance. +- Leaking future-dated breakage/FBO entries past AsOf into balance or listing. +- Encoding FBO collection order or correction unwind order here — that logic belongs to collector/breakage. +- Constructing the service without validating its dependency interfaces (Config.Validate) or bypassing the NoopService when credits are disabled. + +## Decisions + +- **Implemented as a temporary balance bridge, not the RTE** — Balance currently queries the ledger per view; the package is structured so API semantics stay stable when the RTE replaces the implementation. +- **Listing is a merged read model with per-type loaders + heap merge** — Funded/consumed/expired come from different sources (charges, ledger movements, breakage impacts) but must page as one cursor-ordered stream. +- **Expired rows project net breakage impact with the newest contributing cursor** — Gives one stable customer-facing expiry row per bucket while preserving cursor pagination and hiding zero-net (immediately-backfilled) groups. + +## Example: Computing settled balance from booked FBO + advance receivable minus pending charge impacts + +``` +bookedBalance, _ := s.BalanceQuerier.GetAccountBalance(ctx, customerAccounts.FBOAccount, ledger.RouteFilter{Currency: currency}, query) +advanceBalance, _ := s.BalanceQuerier.GetAccountBalance(ctx, customerAccounts.ReceivableAccount, ledger.RouteFilter{Currency: currency, CostBasis: mo.Some[*alpacadecimal.Decimal](nil)}, query) +impacts, _ := s.getChargePendingBalanceImpacts(ctx, customerID, currency) +settled := bookedBalance.Settled().Add(advanceBalance.Settled()) +return balance{settled: settled, pending: s.balanceCalculator.CalculatePendingBalance(settled, impacts)}, nil +``` + + diff --git a/openmeter/ledger/historical/CLAUDE.md b/openmeter/ledger/historical/CLAUDE.md new file mode 100644 index 0000000000..8b0727ec42 --- /dev/null +++ b/openmeter/ledger/historical/CLAUDE.md @@ -0,0 +1,60 @@ +# historical + + + +> The append-only double-entry ledger implementation: Ledger commits transaction groups (validate -> lock accounts -> create group -> book transactions) and answers balance/list queries. Domain Transaction/TransactionGroup/Entry/Balance values are always reconstructed from *Data DTOs, and the adapter is the only place that touches the ledger_transaction(_group)/ledger_entry tables. + +## Patterns + +**CommitGroup is validate-lock-write** — CommitGroup validates each TransactionInput, then inside transaction.Run locks all affected accounts preemptively, validates balances, creates the group, and books each transaction. (`transaction.Run(ctx, l.repo, func(ctx){...}) wrapping lockAccountsForTransactionInputs + repo.CreateTransactionGroup + repo.BookTransaction`) +**Preemptive account locking** — lockAccountsForTransactionInputs collects all sub-account IDs across entries, resolves their parent accounts, and calls accountLocker.LockAccountsForPosting once — not per sub-transaction. (`return l.accountLocker.LockAccountsForPosting(ctx, affectedAccounts)`) +**Data-DTO reconstruction** — Transaction/TransactionGroup/Entry are built only via NewTransactionFromData / NewTransactionGroupFromData / newEntryFromData; Entry rebuilds its PostingAddress from EntryData using account.NewAddressFromData. (`account.NewAddressFromData(account.AddressData{SubAccountID, AccountType, Route, RouteID, RoutingKey})`) +**Interface satisfaction asserted** — Ledger asserts ledger.Ledger, ledger.BalanceQuerier; Balance asserts ledger.Balance; Transaction asserts ledger.Transaction etc. (`var _ ledger.BalanceQuerier = (*Ledger)(nil)`) +**Balance via sumEntries** — GetAccountBalance builds a ledger.Query (Namespace + Filters{After, AsOf, AccountID, Route}) and delegates to repo.SumEntries; settled and pending currently both equal the same total. (`res, _ := l.sumEntries(ctx, ledger.Query{Namespace: account.ID().Namespace, Filters: ledger.Filters{AccountID: lo.ToPtr(account.ID().ID), Route: route}})`) +**Cursor pagination on transactions** — ListTransactions delegates to repo with ListTransactionsInput and returns Items + NextCursor; the adapter does keyset pagination over (BookedAt, CreatedAt, ID). (`return ledger.ListTransactionsResult{Items: res.Items, NextCursor: res.NextCursor}, nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ledger.go` | Ledger struct + NewLedger; implements CommitGroup, ListTransactions, GetTransactionGroup and the locking helper. | validateAccountBalancesForTransaction is a TODO no-op; do not assume over-draw is rejected here yet. CommitGroup rejects empty groups with ledger.ErrTransactionGroupEmpty. | +| `transaction.go` | Transaction/TransactionGroup value objects and their NewXFromData factories; Cursor() exposes (BookedAt, CreatedAt, ID). | Entries()/Transactions() widen []*T to []ledger.X via lo.Map — keep slices of pointers internally. | +| `entry.go` | Entry value object; newEntryFromData rebuilds PostingAddress from route key version/value. | EntryData must carry RouteKeyVer + RouteKey or NewRoutingKey fails; this is hydrated by the adapter from joined route rows. | +| `balance.go` | Balance value + GetAccountBalance/GetSubAccountBalance; sub-account balance resolves its parent account then routes through GetAccountBalance. | Settled and Pending are currently identical (no settled/pending separation yet). | +| `repo.go` | Repo interface (embeds entutils.TxCreator) for group create/get, BookTransaction, SumEntries, ListTransactions, plus parameter/DTO types. | BookTransaction takes the group's NamespacedID; CreateTransactionGroupInput carries Annotations while CreateTransactionInput does not. | + +## Anti-Patterns + +- Bypassing transaction.Run / preemptive locking and writing transactions directly, reintroducing posting races. +- Constructing Transaction/TransactionGroup/Entry by hand instead of via NewTransactionFromData / NewTransactionGroupFromData / newEntryFromData. +- Assuming GetAccountBalance enforces non-negative balances — validateAccountBalancesForTransaction is still a TODO. +- Reading raw ent rows in this package instead of going through the Repo's *Data DTOs. +- Committing a transaction group without first validating every TransactionInput via ledger.ValidateTransactionInputWith(routingValidator). + +## Decisions + +- **Accounts are locked preemptively for the whole group, not per sub-transaction.** — Multi-transaction groups must be atomic; locking every affected account up front avoids deadlocks and partial posting within the transaction.Run scope. +- **Domain aggregates are reconstructed from a separate *Data DTO layer.** — Decouples ent row shape from rich ledger value objects and centralizes routing-key/address hydration in the From*Data constructors. + +## Example: Committing a validated transaction group atomically + +``` +for idx, txInput := range txInputs { + if err := ledger.ValidateTransactionInputWith(ctx, txInput, l.routingValidator); err != nil { + return nil, fmt.Errorf("validate tx %d: %w", idx, err) + } +} +return transaction.Run(ctx, l.repo, func(ctx context.Context) (*TransactionGroup, error) { + if err := l.lockAccountsForTransactionInputs(ctx, group.Namespace(), txInputs); err != nil { + return nil, err + } + txG, _ := l.repo.CreateTransactionGroup(ctx, CreateTransactionGroupInput{Namespace: group.Namespace(), Annotations: group.Annotations()}) + txGroup := &TransactionGroup{data: txG} + for _, txInput := range txInputs { + tx, _ := l.repo.BookTransaction(ctx, models.NamespacedID{Namespace: group.Namespace(), ID: txG.ID}, txInput) + txGroup.transactions = append(txGroup.transactions, tx) + } +// ... +``` + + diff --git a/openmeter/ledger/historical/adapter/CLAUDE.md b/openmeter/ledger/historical/adapter/CLAUDE.md new file mode 100644 index 0000000000..df972fb565 --- /dev/null +++ b/openmeter/ledger/historical/adapter/CLAUDE.md @@ -0,0 +1,61 @@ +# adapter + + + +> Ent/Postgres repository for the ledger's historical (append-only) double-entry model: books transactions and entries, reconstructs domain Transaction/TransactionGroup aggregates from rows, and runs sum/list queries over ledger entries. Implements ledgerhistorical.Repo and is the only place that reads/writes the ledger_transaction(_group), ledger_entry, ledger_sub_account(_route) tables for this domain. + +## Patterns + +**Implement ledgerhistorical.Repo on a private repo struct** — All persistence methods hang off `type repo struct { db *db.Client }` with a compile-time assertion `var _ ledgerhistorical.Repo = (*repo)(nil)`. Construct only via NewRepo(dbClient) which returns the interface, not the struct. (`func NewRepo(dbClient *db.Client) ledgerhistorical.Repo { return &repo{db: dbClient} }`) +**Wrap every method body in entutils.TransactingRepo** — BookTransaction, CreateTransactionGroup, GetTransactionGroup, SumEntries, ListTransactions all execute inside entutils.TransactingRepo(ctx, r, func(ctx, tx *repo)...) so they rebind to any tx already in ctx. Use tx.db (not r.db) inside the closure. (`return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgerhistorical.Transaction, error) { entity, err := tx.db.LedgerTransaction.Create()... })`) +**Reconstruct aggregates only via NewTransactionFromData / NewTransactionGroupFromData** — DB rows are never exposed as domain objects directly. Map ent edges into ledgerhistorical.EntryData/TransactionData and call the domain constructors (hydrateHistoricalTransaction does this for reads). Never hand-build a Transaction struct. (`ledgerhistorical.NewTransactionFromData(ledgerhistorical.TransactionData{ID: tx.ID, ...}, entryData)`) +**Eager-load the full edge chain and assert presence with *OrErr** — Reads must WithEntries -> WithSubAccount -> WithAccount + WithRoute, ordered ByCreatedAt then ByID. Hydration accesses edges through SubAccountOrErr/AccountOrErr/RouteOrErr and returns a wrapped error if any edge is missing rather than nil-panicking. (`subAccount, err := entry.Edges.SubAccountOrErr(); if err != nil { return EntryData{}, fmt.Errorf("entry %s missing sub-account edge: %w", entry.ID, err) }`) +**Keyset (cursor) pagination via raw sql.Selector predicates** — ListTransactions orders by (BookedAt, CreatedAt, ID) and builds after/before cursor predicates as predicate.LedgerTransaction closures over *sql.Selector. Fetch Limit+1 to detect hasMore; Before pages are reversed with slices.Reverse and NextCursor is taken from the last returned item to avoid overlap on resume. (`query = query.Limit(input.Limit + 1); hasMore := len(dbItems) > input.Limit; if hasMore { dbItems = dbItems[:input.Limit] }`) +**Build sum/filter predicates through sumEntriesQuery, normalizing Route first** — SumEntries delegates to sumEntriesQuery{query}.Build/entryPredicates/subAccountPredicates. Route filters call Filters.Route.Normalize() (returning ErrLedgerQueryInvalid on failure) and translate each optional field to Eq vs IsNil predicates (TaxCode, Features, CostBasis, TaxBehavior). Features arrays use pq.StringArray. (`normalizedRoute, err := b.query.Filters.Route.Normalize(); if err != nil { return nil, ledger.ErrLedgerQueryInvalid.WithAttrs(...) }`) +**Sum aggregation via NullString scan, not Decimal directly** — SumEntries aggregates db.Sum(FieldAmount) AS sum_amount into a stdsql.NullString, returns alpacadecimal.NewFromInt(0) when no/invalid rows, otherwise alpacadecimal.NewFromString. Do not Scan a sum straight into a Decimal. (`var rows []struct{ SumAmount stdsql.NullString `json:"sum_amount,omitempty"` }; ...Aggregate(db.As(db.Sum(ledgerentrydb.FieldAmount), "sum_amount")).Scan(ctx, &rows)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `repo.go` | Defines the repo struct, NewRepo constructor, and the entutils.TxUser plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self). | Tx uses TxOptions{ReadOnly: false}; WithTx must rebuild db from the raw tx config or transactions silently won't propagate. Keep the `var _ entutils.TxUser[*repo]` and `var _ ledgerhistorical.Repo` assertions intact. | +| `ledger.go` | All Repo methods (BookTransaction, CreateTransactionGroup, GetTransactionGroup, SumEntries, ListTransactions) plus hydrateHistoricalTransaction and the cursor predicate helpers. | BookTransaction precomputes route/account-type maps keyed by SubAccountID because CreateBulk-returned entries lack edges; if you add entry fields, populate them in BOTH the post-insert mapping and hydrateHistoricalTransaction. nil input must return ledger.ErrTransactionInputRequired. | +| `sumentries_query.go` | sumEntriesQuery builder translating ledger.Query.Filters into LedgerEntry predicates (Build for ent query, SQL for raw shape). | BookedAtPeriod uses GTE/LT (half-open), AsOf uses BookedAtLTE, and the After cursor predicate uses LTE on ID (inclusive tail) — different from ListTransactions' strict-LT cursor. Optional Route fields must emit *IsNil predicates when the option is present-but-empty. | +| `ledger_test.go` | Integration tests (NewTestEnv/DBSchemaMigrate against real Postgres) covering booking, group hydration, tax-behavior preservation, and forward/Before cursor pagination without overlap. | Tests use transactionstestutils.AnyEntryInput and env.createSubAccount/createSubAccountOfType helpers; sleeps separate transactions so CreatedAt ordering is deterministic. Requires POSTGRES_HOST set or the suite skips. | + +## Anti-Patterns + +- Using r.db inside a method body instead of the tx-bound tx.db from the TransactingRepo closure — bypasses the active transaction. +- Returning ent rows or constructing ledgerhistorical.Transaction by hand instead of going through NewTransactionFromData / NewTransactionGroupFromData. +- Accessing entry/sub-account/account/route edges without eager-loading them or without the *OrErr presence checks, causing nil-pointer panics. +- Adding a new persisted entry/route field without updating both BookTransaction's per-SubAccountID maps and hydrateHistoricalTransaction. +- Skipping Route.Normalize() (and its ErrLedgerQueryInvalid path) or omitting *IsNil predicates when filtering optional route fields, silently widening result sets. + +## Decisions + +- **Reconstruct domain aggregates from a separate *Data DTO layer rather than mapping ent rows directly.** — Keeps the historical/append-only invariants (entry balancing, route identity) enforced by the domain constructors in one place, independent of how rows were loaded or just-inserted. +- **BookTransaction caches AccountType/Route/RouteKey by SubAccountID before CreateBulk.** — CreateBulk returns entries without their sub-account/account/route edges, so the view must be assembled from inputs to avoid an extra eager-load round trip. +- **Cursor pagination over (BookedAt, CreatedAt, ID) with Limit+1 and Before-page reversal.** — Gives stable keyset ordering across booking-time ties and lets NextCursor from a Before page resume forward paging without re-emitting the page tail (verified by TestRepo_ListTransactions_BeforeNextCursorResumesWithoutOverlap). + +## Example: Transaction-aware read that eager-loads the edge chain and rebuilds the domain aggregate + +``` +func (r *repo) GetTransactionGroup(ctx context.Context, id models.NamespacedID) (*ledgerhistorical.TransactionGroup, error) { + return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (*ledgerhistorical.TransactionGroup, error) { + entity, err := tx.db.LedgerTransactionGroup.Query(). + Where(ledgertransactiongroupdb.Namespace(id.Namespace), ledgertransactiongroupdb.ID(id.ID)). + WithTransactions(func(q *db.LedgerTransactionQuery) { + q.Order(ledgertransactiondb.ByCreatedAt(), ledgertransactiondb.ByID()) + q.WithEntries(func(eq *db.LedgerEntryQuery) { + eq.Order(ledgerentrydb.ByCreatedAt(), ledgerentrydb.ByID()) + eq.WithSubAccount(func(sq *db.LedgerSubAccountQuery) { sq.WithAccount(); sq.WithRoute() }) + }) + }).Only(ctx) + if err != nil { + return nil, fmt.Errorf("failed to query transaction group: %w", err) + } + transactions, err := slicesx.MapWithErr(entity.Edges.Transactions, hydrateHistoricalTransaction) +// ... +``` + + diff --git a/openmeter/ledger/noop/CLAUDE.md b/openmeter/ledger/noop/CLAUDE.md new file mode 100644 index 0000000000..ffc728d3ca --- /dev/null +++ b/openmeter/ledger/noop/CLAUDE.md @@ -0,0 +1,44 @@ +# noop + + + +> No-op implementations of the ledger surface (Ledger, BalanceQuerier, AccountResolver, account.Service, namespace.Handler) used when credits.enabled is false, so callers can be wired without a real ledger backend. Every operation returns zero balances/empty results or trivially-constructed account stubs. + +## Patterns + +**Compile-time interface assertions for every type** — Each noop struct declares var _ Interface = T{} to guarantee it satisfies the corresponding ledger/account/namespace interface. (`var ( _ ledger.Ledger = Ledger{}; _ ledger.BalanceQuerier = Ledger{} )`) +**Zero-value returns** — Balance methods return balance{} whose Settled()/Pending() are alpacadecimal.Zero; list/get methods return empty slices/structs and nil errors. (`func (Ledger) ListTransactions(...) (ledger.ListTransactionsResult, error) { return ledger.ListTransactionsResult{}, nil }`) +**Construct real account types from data, not bespoke fakes** — newAccount/newSubAccount build via ledgeraccount.NewAccountFromData / NewSubAccountFromData with AccountLiveServices{SubAccountService: AccountService{}} so returned accounts are real ledger account types backed by noop services. (`account, err := ledgeraccount.NewAccountFromData(ledgeraccount.AccountData{...}, ledgeraccount.AccountLiveServices{SubAccountService: AccountService{}})`) +**Stable account-type defaults** — Resolvers return CustomerAccounts/BusinessAccounts populated with the canonical AccountTypeCustomerFBO/Receivable/Accrued/Wash/Earnings/Brokerage/Breakage stubs; normalizeID/normalizeNamespace substitute 'noop' fallbacks for empty IDs. (`return ledger.CustomerAccounts{FBOAccount: customerFBOAccount{...AccountTypeCustomerFBO}, ReceivableAccount: ..., AccruedAccount: ...}, nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `noop.go` | Single file implementing Ledger, AccountResolver, AccountService, NamespaceHandler, and the account/subAccount/postingAddress/balance/businessAccount stubs. | accountTypeForRoute infers type from route fields (TransactionAuthorizationStatus -> Receivable, CreditPriority -> FBO, else Accrued); noopCurrency defaults to USD; error branches in newAccount/newSubAccount fall back to zero-value stubs rather than panicking. | + +## Anti-Patterns + +- Adding behavior or side effects to a noop method — it must stay a pure zero/empty implementation usable when credits are disabled. +- Returning non-nil errors from noop methods, which would break callers that expect the disabled path to succeed silently. +- Hand-rolling fake account structs instead of going through ledgeraccount.NewAccountFromData/NewSubAccountFromData, diverging from real account semantics. +- Dropping a compile-time interface assertion when adding a new noop type, allowing it to silently fall out of sync with the ledger interface. + +## Decisions + +- **Noop is the wired implementation when credits.enabled is false** — app/common injects these so the rest of the system compiles and runs unchanged; real backfill must construct concrete adapters directly rather than relying on these. +- **Build real account types via NewAccountFromData rather than minimal fakes** — Keeps returned accounts behaving like real ledger accounts (routing keys, sub-account services) so callers don't special-case the noop path. + +## Example: Returning canonical zero customer accounts + +``` +func (AccountResolver) GetCustomerAccounts(context.Context, customer.CustomerID) (ledger.CustomerAccounts, error) { + return ledger.CustomerAccounts{ + FBOAccount: customerFBOAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerFBO}}, + ReceivableAccount: customerReceivableAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerReceivable}}, + AccruedAccount: customerAccruedAccount{customerAccount: customerAccount{accountType: ledger.AccountTypeCustomerAccrued}}, + }, nil +} +``` + + diff --git a/openmeter/ledger/recognizer/CLAUDE.md b/openmeter/ledger/recognizer/CLAUDE.md new file mode 100644 index 0000000000..808e5e04d7 --- /dev/null +++ b/openmeter/ledger/recognizer/CLAUDE.md @@ -0,0 +1,47 @@ +# recognizer + + + +> Revenue-recognition service: moves attributable accrued balance into earnings and advances lineage segments to earnings_recognized. It is the distinct recognition step (separate from accrual/acknowledgement) that books earnings against the ledger and transitions lineage state atomically. + +## Patterns + +**Single-method Service with Config/Validate constructor** — Service exposes only RecognizeEarnings; NewService(Config) validates required deps (Ledger, ResolverDependencies AccountService/AccountCatalog/BalanceQuerier, Lineage, TransactionManager) before building the struct. (`func NewService(config Config) (Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &service{...}, nil }`) +**Atomic recognition in transaction.Run** — RecognizeEarnings wraps load-lineages, resolve-template, CommitGroup, and lineage segment transitions in one transaction.Run so ledger and lineage state commit together. (`return transaction.Run(ctx, s.transactionManager, func(ctx context.Context) (RecognizeEarningsResult, error) { ... })`) +**Eligibility from lineage segment state** — collectEligibleLineages selects positive segments whose State is in recognizableSegmentStates (RealCredit, AdvanceBackfilled), sorted by lineage.ID for deterministic allocation. (`if recognizableSegmentStates[seg.State] && seg.Amount.IsPositive() { segments = append(segments, seg); amount = amount.Add(seg.Amount) }`) +**Resolve against actual accrued, recognize the real output** — Template RecognizeEarningsFromAttributableAccruedTemplate is resolved against ledger balance; the recognized amount is sumPositiveEntries(resolved), which may be less than eligible; zero output short-circuits. (`actualAmount := sumPositiveEntries(resolved); if !actualAmount.IsPositive() { return RecognizeEarningsResult{}, nil }`) +**Close-then-recreate segment transitions** — allocateRecognition closes each consumed source segment, recreates a remainder segment in the original state if partial, and creates an earnings_recognized segment carrying SourceState/SourceBackingTransactionGroupID for correction unwind. Keeps the active segment set non-overlapping. (`s.lnge.CloseSegment(ctx, seg.ID, now); s.lnge.CreateSegment(ctx, lineage.CreateSegmentInput{State: creditrealization.LineageSegmentStateEarningsRecognized, SourceState: &sourceState, ...})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service interface, Config/Validate, constructor, RecognizeEarningsInput/Result. | Recognition needs the full ResolverDependencies trio plus Lineage and TransactionManager; input requires non-zero At and a valid Currency. | +| `recognize.go` | RecognizeEarnings flow plus collectEligibleLineages and allocateRecognition. | Allocation order is deterministic by lineage.ID; segment time is At.Truncate(time.Microsecond); recognized amount allocated may be capped by actual ledger output, not eligible total. minDecimal/sumPositiveEntries are local helpers. | +| `noop.go` | NoopService returning empty RecognizeEarningsResult for tests not exercising recognition. | Keep it side-effect-free; var _ Service = NoopService{} must hold. | + +## Anti-Patterns + +- Committing the ledger recognition group without the lineage segment transitions in the same transaction.Run, desyncing earnings and lineage state. +- Recognizing the eligible total instead of the actual sumPositiveEntries(resolved) amount produced by the template against accrued balance. +- Mutating a lineage segment in place instead of close-then-recreate, producing overlapping active segments that break correction unwind. +- Dropping SourceState/SourceBackingTransactionGroupID on the earnings_recognized segment, making recognition non-reversible. +- Recognizing segments whose State is not in recognizableSegmentStates (only RealCredit / AdvanceBackfilled are eligible). + +## Decisions + +- **Recognition is gated on lineage segment state and resolved against actual accrued balance** — Only real or advance-backfilled credit may be recognized, and the ledger template (not the eligible total) determines how much accrued can actually be moved to earnings. +- **Segment transitions use close + recreate with source metadata** — Keeps the active segment set non-overlapping and records prior state so a later correction can unwind recognition back to the original segment state. + +## Example: Recognizing earnings for eligible accrued and transitioning a segment + +``` +resolved, _ := transactions.ResolveTransactions(ctx, s.deps, transactions.ResolutionScope{CustomerID: in.CustomerID, Namespace: in.CustomerID.Namespace}, transactions.RecognizeEarningsFromAttributableAccruedTemplate{At: in.At, Amount: totalEligible, Currency: in.Currency}) +actualAmount := sumPositiveEntries(resolved) +group, _ := s.ledger.CommitGroup(ctx, transactions.GroupInputs(in.CustomerID.Namespace, nil, resolved...)) +sourceState := seg.State +s.lnge.CloseSegment(ctx, seg.ID, now) +s.lnge.CreateSegment(ctx, lineage.CreateSegmentInput{LineageID: seg.LineageID, Amount: consumed, State: creditrealization.LineageSegmentStateEarningsRecognized, BackingTransactionGroupID: &groupID, SourceState: &sourceState, SourceBackingTransactionGroupID: seg.BackingTransactionGroupID}) +``` + + diff --git a/openmeter/ledger/resolvers/CLAUDE.md b/openmeter/ledger/resolvers/CLAUDE.md new file mode 100644 index 0000000000..df5c2083c9 --- /dev/null +++ b/openmeter/ledger/resolvers/CLAUDE.md @@ -0,0 +1,60 @@ +# resolvers + + + +> Provisioning + resolution layer that maps customers and namespaces to their concrete ledger accounts. AccountResolver creates/fetches the per-customer FBO/Receivable/Accrued accounts and shared per-namespace business accounts (Wash/Earnings/Brokerage/Breakage), backed by the ledger_customer_account linking table. Wiring is feature-gated behind credits.enabled. + +## Patterns + +**Provision-inside-transaction with advisory lock** — CreateCustomerAccounts/EnsureBusinessAccounts run inside transaction.Run and acquire a bounded lockr lock (provisioningLockTimeout = 5s) before creating missing accounts. (`transaction.Run(ctx, s.Repo, func(ctx){ s.lockCustomerProvisioning(ctx, customerID); ... })`) +**Idempotent create-or-reuse** — Provisioning skips account types already present, and on a duplicate-mapping error uses AsCustomerAccountAlreadyExistsError to reuse the existing AccountID instead of failing. (`if existingErr, ok := AsCustomerAccountAlreadyExistsError(err); ok { accountIDs[accountType] = existingErr.AccountID; continue }`) +**Typed account-type assertion on read** — Get* fetch each account, assert it to the expected ledger.*Account interface, and error with type detail on mismatch; missing types return ledger.ErrCustomerAccountMissing / ErrBusinessAccountMissing with attrs. (`fboAccount, ok := fboAcc.(ledger.CustomerFBOAccount); if !ok { return ..., fmt.Errorf("...expected %s", ledger.AccountTypeCustomerFBO) }`) +**Lifecycle hooks drive provisioning** — customerLedgerHook.PostCreate provisions customer accounts on customer creation; namespaceHandler.CreateNamespace ensures business accounts on namespace creation. (`func (h *customerLedgerHook) PostCreate(ctx, cust) error { _, err := h.config.Service.CreateCustomerAccounts(ctx, customer.CustomerID{...}); return err }`) +**Nil-locker tolerance** — lockCustomerProvisioning/lockBusinessProvisioning return nil when s.Locker == nil, so the resolver works in single-process tests without a real lock. (`if s.Locker == nil { return nil }`) +**Conflict error carries ValidationIssues** — CustomerAccountAlreadyExistsError implements ValidationErrors() returning ErrCustomerAccountConflict (HTTP 409) with namespace/customer/account-type attrs. (`ErrCustomerAccountConflict.WithAttrs(models.Attributes{"customer_id": e.CustomerID.ID, ...})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `account.go` | AccountResolver: CreateCustomerAccounts, GetCustomerAccounts, EnsureBusinessAccounts, GetBusinessAccounts, and the lockr provisioning helpers. | Provisioning locks are a TODO guardrail with a 5s timeout (lockr.ErrLockTimeout on DeadlineExceeded); do not assume they replace upsert convergence. CustomerAccountTypes/BusinessAccountTypes drive which accounts get created. | +| `customeraccount.go` | CustomerAccountRepo interface (linking table) + CreateCustomerAccountInput. | The repo only manages the customer->account-id mapping by AccountType; account creation itself goes through AccountService. | +| `errors.go` | CustomerAccountAlreadyExistsError + AsCustomerAccountAlreadyExistsError + ErrCustomerAccountConflict validation issue. | Idempotency depends on the adapter wrapping its constraint error as this typed error; matching is via errors.As. | +| `hooks.go` | CustomerLedgerHook (ServiceHook[customer.Customer]) provisioning accounts on PostCreate, with OTel span. | These hooks must stay disabled when credits.enabled is false (see AGENTS.md); the hook only wires the create path, not updates. | +| `namespace.go` | namespaceHandler implementing namespace.Handler; CreateNamespace ensures business accounts, DeleteNamespace is a no-op. | Must be registered before initNamespace if business accounts are needed at startup. | +| `account_test.go` | Concurrency tests proving CreateCustomerAccounts/EnsureBusinessAccounts are idempotent under 6 concurrent callers. | Tests assert exactly 3 mapping rows and 3 accounts; provisioning regressions surface as count mismatches. | + +## Anti-Patterns + +- Failing on a duplicate-mapping error instead of reusing the existing AccountID via AsCustomerAccountAlreadyExistsError. +- Provisioning accounts outside transaction.Run or without the provisioning lock, allowing duplicate accounts under concurrency. +- Returning raw account values from Get* without asserting them to the expected ledger.*Account interface. +- Wiring the customer ledger hook / namespace handler when credits.enabled is false. +- Blocking indefinitely on the provisioning lock instead of honoring provisioningLockTimeout. + +## Decisions + +- **Provisioning is guarded by a bounded advisory lock plus idempotent create-or-reuse rather than a single upsert.** — Simultaneous multi-service startups must converge to one set of accounts; the lock fails fast (5s) and the duplicate-error reuse path keeps creation safe even if the lock is skipped. +- **Account creation is delegated to AccountService while this package owns only the customer->account linking table.** — Keeps the resolver focused on mapping/resolution and lets account construction (types, validation) live in the account service. + +## Example: Idempotent per-customer account provisioning + +``` +return transaction.Run(ctx, s.Repo, func(ctx context.Context) (ledger.CustomerAccounts, error) { + if err := s.lockCustomerProvisioning(ctx, customerID); err != nil { + return ledger.CustomerAccounts{}, err + } + accountIDs, _ := s.Repo.GetCustomerAccountIDs(ctx, customerID) + for _, accountType := range ledger.CustomerAccountTypes { + if _, ok := accountIDs[accountType]; ok { continue } + acc, _ := s.AccountService.CreateAccount(ctx, ledgeraccount.CreateAccountInput{Namespace: customerID.Namespace, Type: accountType}) + if err := s.Repo.CreateCustomerAccount(ctx, CreateCustomerAccountInput{CustomerID: customerID, AccountType: accountType, AccountID: acc.ID().ID}); err != nil { + if existingErr, ok := AsCustomerAccountAlreadyExistsError(err); ok { accountIDs[accountType] = existingErr.AccountID; continue } + return ledger.CustomerAccounts{}, err + } + } + return s.GetCustomerAccounts(ctx, customerID) +}) +``` + + diff --git a/openmeter/ledger/resolvers/adapter/CLAUDE.md b/openmeter/ledger/resolvers/adapter/CLAUDE.md new file mode 100644 index 0000000000..b6bc4f4b01 --- /dev/null +++ b/openmeter/ledger/resolvers/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Ent-backed persistence adapter for the ledger resolvers package: it implements resolvers.CustomerAccountRepo, which manages the linking table (ledger_customer_account) mapping a customer to its ledger account IDs by AccountType. Single-file leaf adapter, feature-gated behind credits.enabled at the wiring layer. + +## Patterns + +**Interface-compliance assertion against parent package** — The unexported repo struct must satisfy resolvers.CustomerAccountRepo via a compile-time var _ assertion; NewRepo returns the interface type, not the concrete struct. (`var _ resolvers.CustomerAccountRepo = (*repo)(nil); func NewRepo(db *entdb.Client) resolvers.CustomerAccountRepo { return &repo{db: db} }`) +**entutils TxUser trio (Tx/WithTx/Self)** — Every repo implements Tx (HijackTx + NewTxDriver), WithTx (rebind via NewTxClientFromRawConfig), and Self, plus var _ entutils.TxUser[*repo]; this is what makes TransactingRepo helpers work. (`func (r *repo) WithTx(ctx context.Context, tx *entutils.TxDriver) *repo { return &repo{db: entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()).Client()} }`) +**Transaction-aware method bodies** — Read methods wrap bodies in entutils.TransactingRepo; mutation methods with no return value use entutils.TransactingRepoWithNoValue. Never call tx.db directly outside one of these wrappers. (`return entutils.TransactingRepoWithNoValue(ctx, r, func(ctx context.Context, tx *repo) error { _, err := tx.db.LedgerCustomerAccount.Create()... })`) +**Constraint-error to typed domain error** — On Create, detect duplicates with entdb.IsConstraintError, re-query the existing row, and return the typed resolvers.CustomerAccountAlreadyExistsError rather than leaking the raw Ent error. (`if entdb.IsConstraintError(err) { existing, _ := tx.db.LedgerCustomerAccount.Query()...Only(ctx); return &resolvers.CustomerAccountAlreadyExistsError{...} }`) +**Namespace + customer scoping on every query** — All LedgerCustomerAccount queries filter by ledgercustomeraccountdb.Namespace and CustomerID from the input/customer.CustomerID; multi-tenancy is enforced here, not by the caller. (`Where(ledgercustomeraccountdb.Namespace(customerID.Namespace), ledgercustomeraccountdb.CustomerID(customerID.ID))`) +**AccountType-keyed result maps** — GetCustomerAccountIDs returns map[ledger.AccountType]string built by ranging entities; AccountType is the map key so each customer holds at most one account per type. (`result := make(map[ledger.AccountType]string, len(entities)); for _, e := range entities { result[e.AccountType] = e.AccountID }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `repo.go` | Entire adapter: defines repo, NewRepo, the Tx/WithTx/Self trio, and the two CustomerAccountRepo methods CreateCustomerAccount and GetCustomerAccountIDs. | Adding a method that touches tx.db without a TransactingRepo wrapper breaks tx propagation; returning the raw Ent constraint error instead of CustomerAccountAlreadyExistsError loses the typed-error contract; forgetting the namespace filter leaks rows across tenants. | + +## Anti-Patterns + +- Returning the concrete *repo from NewRepo instead of the resolvers.CustomerAccountRepo interface. +- Calling r.db / tx.db.LedgerCustomerAccount outside entutils.TransactingRepo or TransactingRepoWithNoValue (loses ctx-carried transaction). +- Surfacing raw entdb constraint errors instead of mapping them to resolvers.CustomerAccountAlreadyExistsError. +- Querying LedgerCustomerAccount without scoping by Namespace and CustomerID. +- Defining domain input/output types here — CreateCustomerAccountInput and the repo interface live in the parent resolvers package; this folder only implements. + +## Decisions + +- **Adapter is a thin single-file leaf with no service logic.** — Business logic lives in the resolvers service layer; this folder only translates the CustomerAccountRepo interface into Ent calls against the ledger_customer_account linking table. +- **Duplicate creation is treated idempotently via constraint detection + re-query.** — Account backfill and concurrent provisioning can race; returning a typed AlreadyExists error carrying the existing AccountID lets callers reconcile without a separate lookup. + +## Example: Read method scoped to a customer and rebound to the ctx transaction + +``` +func (r *repo) GetCustomerAccountIDs(ctx context.Context, customerID customer.CustomerID) (map[ledger.AccountType]string, error) { + return entutils.TransactingRepo(ctx, r, func(ctx context.Context, tx *repo) (map[ledger.AccountType]string, error) { + entities, err := tx.db.LedgerCustomerAccount.Query(). + Where( + ledgercustomeraccountdb.Namespace(customerID.Namespace), + ledgercustomeraccountdb.CustomerID(customerID.ID), + ).All(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get ledger customer accounts: %w", err) + } + result := make(map[ledger.AccountType]string, len(entities)) + for _, entity := range entities { + result[entity.AccountType] = entity.AccountID + } + return result, nil +// ... +``` + + diff --git a/openmeter/ledger/routingrules/CLAUDE.md b/openmeter/ledger/routingrules/CLAUDE.md new file mode 100644 index 0000000000..c2a0a4a525 --- /dev/null +++ b/openmeter/ledger/routingrules/CLAUDE.md @@ -0,0 +1,60 @@ +# routingrules + + + +> Declarative routing-rule validator for ledger transactions: given a set of ledger.EntryInput postings, verify the combination of account types, signs, and route dimensions forms a legal double-entry flow. The package's single constraint is that it is pure validation logic over decoded entries — no DB, no service, no context. + +## Patterns + +**RoutingRule interface + struct rules** — Every rule is a struct implementing `RoutingRule` with one method `Validate(tx TxView) error`. New rules are added as struct types (e.g. RequireFlowDirectionRule) and registered in DefaultValidator.Rules, not as ad-hoc functions. (`type RequireFlowDirectionRule struct { From, To ledger.AccountType }; func (r RequireFlowDirectionRule) Validate(tx TxView) error {...}`) +**Validator implements ledger.RoutingValidator** — Validator{Rules []RoutingRule} satisfies `var _ ledger.RoutingValidator = (*Validator)(nil)` via ValidateEntries, which builds a TxView once then runs every rule in order, short-circuiting on first error. (`func (v Validator) ValidateEntries(entries []ledger.EntryInput) error { view, _ := NewTxView(entries); for _, r := range v.Rules { if err := r.Validate(view); err != nil { return err } } }`) +**Gate-then-check rule shape** — Rules first gate on relevance (e.g. `if !tx.HasAccountTypes(r.From, r.To) { return nil }` or `len(accountTypes) != 1`) and return nil when not applicable, only validating when the targeted account-type shape is present. (`if !tx.HasAccountTypes(r.Left, r.Right) { return nil }`) +**Violations via ledger.ErrRoutingRuleViolated.WithAttrs** — Every failure returns ledger.ErrRoutingRuleViolated decorated with models.Attributes carrying a snake_case `reason` plus account/field context. Never return raw errors.New for rule violations. (`return ledger.ErrRoutingRuleViolated.WithAttrs(models.Attributes{"reason": "invalid_flow_direction", "account_type": r.From})`) +**Route comparison via RouteField enum** — Cross-entry field matching goes through the RouteField string enum and sameRouteField switch; add a new comparable dimension by extending RouteField and the switch, then reference it in RequireSameRouteRule.Fields. Unknown fields return an error. (`case RouteFieldCurrency: return left.Currency == right.Currency, nil`) +**Optional-field equality helpers** — Pointer route fields are compared with optional*Equal helpers (optionalStringEqual, optionalDecimalEqual, etc.) that treat both-nil as equal and one-nil as unequal; reuse these instead of inlining nil checks. (`func optionalDecimalEqual(l, r *alpacadecimal.Decimal) bool { if l==nil||r==nil { return l==nil&&r==nil }; return l.Equal(*r) }`) +**Immutable TxView accessors** — TxView/EntryView are read-only projections; Entries() returns slices.Clone, EntriesOf filters by account type, AccountTypes() dedups+sorts. Rules query these accessors and never mutate entries. (`func (t TxView) Entries() []EntryView { return slices.Clone(t.entries) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `routingrules.go` | All RoutingRule struct types, the Validator, RouteField enum, and the sign/route helper functions (entriesBySign, requireMatchingRouteFields, requireKnownToUnknownCostBasisTranslationEitherDirection). | Cost-basis translation rules use requireKnownToUnknownCostBasisTranslationEitherDirection (tries both directions) — preserve the either-direction semantics so both attribute and correction flows validate. Argument order to that helper matters per rule (FBO passes positiveEntries, negativeEntries). | +| `defaults.go` | DefaultValidator instance wiring the full production rule chain: allowed account-type sets, flow directions, auth-status, cost-basis translations, and per-pair RequireSameRouteRule field requirements. | This is the live ruleset used everywhere (testutils, historical ledger). Adding/removing an account-type combination requires editing AllowedAccountSetsRule.Sets AND likely the matching RequireFlowDirectionRule/RequireSameRouteRule, or otherwise-valid flows get rejected. | +| `view.go` | EntryView/TxView projections (decode PostingAddress into accountType + ledger.Route) plus all optional*Equal / stringSliceEqual comparison helpers. | newEntryView decodes the route eagerly via entry.PostingAddress().Route().Route(); a malformed route surfaces here. AccountTypes() sorts — don't rely on insertion order. | +| `routingrules_test.go` | Table of TestDefaultValidator_* cases asserting allowed/rejected flows; the canonical spec of what each rule permits. | Uses transactionstestutils.AnyEntryInput + addressForRoute helper. New rules MUST add both an Allows* and a Rejects* case; rejection assertions match on `require.ErrorContains(t, err, "ledger routing rule violated")`. | + +## Anti-Patterns + +- Returning raw errors (errors.New/fmt.Errorf) for rule violations instead of ledger.ErrRoutingRuleViolated.WithAttrs — callers and tests rely on that error identity/message. +- Adding DB access, context.Context, or service calls into a rule — this package is pure validation over already-decoded entries. +- Comparing pointer route fields with == or direct deref instead of the optional*Equal helpers, breaking nil-vs-nil semantics. +- Mutating the slice returned by TxView.Entries()/EntriesOf() expecting it to affect the view — they are clones/copies. +- Adding a new account-type combination to one rule (e.g. a flow direction) without updating AllowedAccountSetsRule.Sets, so the combination is rejected before the new rule runs. + +## Decisions + +- **Rules are structs satisfying RoutingRule and composed in a Validator list rather than one monolithic validate function.** — Each accounting invariant (flow direction, cost-basis translation, tax-dimension scope) is independently testable and reorderable, and the production ruleset is declared as data in DefaultValidator. +- **Validation operates on a decoded TxView/EntryView projection built once by ValidateEntries.** — Decoding PostingAddress→accountType+Route once and exposing query accessors (EntriesOf, HasAccountTypes, AccountTypes) keeps every rule simple and avoids repeated decoding per rule. + +## Example: Add a new account-flow invariant as a rule and register it + +``` +type RequireFlowDirectionRule struct { + From ledger.AccountType + To ledger.AccountType +} + +func (r RequireFlowDirectionRule) Validate(tx TxView) error { + if !tx.HasAccountTypes(r.From, r.To) { + return nil + } + fromEntries := tx.EntriesOf(r.From) + toEntries := tx.EntriesOf(r.To) + if allEntriesPositive(fromEntries) && allEntriesNegative(toEntries) { + return nil + } + return ledger.ErrRoutingRuleViolated.WithAttrs(models.Attributes{ +// ... +``` + + diff --git a/openmeter/ledger/testutils/CLAUDE.md b/openmeter/ledger/testutils/CLAUDE.md new file mode 100644 index 0000000000..cf93c5fc83 --- /dev/null +++ b/openmeter/ledger/testutils/CLAUDE.md @@ -0,0 +1,46 @@ +# testutils + + + +> Shared test-harness package for the ledger domain: constructs concrete account/historical/resolver services from real adapters and spins up a fully migrated Postgres IntegrationEnv with provisioned customer and business sub-accounts. Its constraint is to build dependencies from underlying constructors (no app/common DI) to avoid import cycles. + +## Patterns + +**Deps built from concrete adapters** — InitDeps wires real adapters and services directly — accountadapter.NewRepo, accountservice.New, historicaladapter.NewRepo, historical.NewLedger, resolversadapter.NewRepo, resolvers.NewAccountResolver — never importing app/common wiring. (`accountService := accountservice.New(accountadapter.NewRepo(db), locker)`) +**Historical ledger uses DefaultValidator** — historical.NewLedger is constructed with routingrules.DefaultValidator as its RoutingValidator, so integration tests exercise the production routing rules. (`historical.NewLedger(historicalRepo, accountService, accountService, routingrules.DefaultValidator)`) +**IntegrationEnv full DB lifecycle** — NewIntegrationEnv freezes clock, inits a Postgres DB via omtestutils.InitPostgresDB, runs migrate.New(...).Up() with OMMigrationsConfig, creates a Customer row, then provisions customer + business accounts via the resolver. All cleanup is registered with t.Cleanup. (`clock.FreezeTime(now); t.Cleanup(clock.UnFreeze); migrator.Up()`) +**Sub-account accessor helpers per account type** — Env exposes typed helpers (FBOSubAccount, ReceivableSubAccount*, AccruedSubAccount*, WashSubAccount, EarningsSubAccount, BrokerageSubAccount, BreakageSubAccountWithCostBasis) that call GetSubAccountForRoute with the correct *RouteParams; tests resolve sub-accounts through these rather than constructing routes by hand. (`e.CustomerAccounts.FBOAccount.GetSubAccountForRoute(ctx, ledger.CustomerFBORouteParams{Currency: e.Currency, CreditPriority: priority})`) +**Optional-param helper laddering** — Helper variants delegate to the most general form with defaults (ReceivableSubAccount → ReceivableSubAccountWithCostBasisAndStatus(t, nil, Open)); add new knobs at the base helper, not by duplicating the full chain. (`func (e *IntegrationEnv) ReceivableSubAccount(t *testing.T) ledger.SubAccount { return e.ReceivableSubAccountWithCostBasisAndStatus(t, nil, ledger.TransactionAuthorizationStatusOpen) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `deps.go` | InitDeps(db, logger) → Deps{AccountService, ResolversService, HistoricalLedger}; the canonical example of building ledger services from raw adapters + lockr without DI. | Requires an injected *slog.Logger (no slog.Default fallback) and a lockr.NewLocker. Reuse this rather than re-wiring ledger services elsewhere in tests, and keep it independent of app/common to avoid import cycles. | +| `integration.go` | IntegrationEnv struct + NewIntegrationEnv constructor and all typed sub-account accessor helpers plus SumBalance. | Freezes clock to 2026-01-01 and registers UnFreeze cleanup — assertions inheriting frozen time. SumBalance returns sum.Settled() (settled balance, not pending). Namespace is uniquified with UnixNano; customer row is created before resolver provisioning. | + +## Anti-Patterns + +- Importing app/common (the DI/wiring layer) to build ledger test dependencies — creates test-only import cycles; build from accountservice.New / resolvers.NewAccountResolver instead. +- Constructing sub-accounts by hand-building ledger.Route/*RouteParams instead of using the env's typed accessor helpers. +- Passing slog.Default() instead of omtestutils.NewDiscardLogger(t) into InitDeps. +- Calling clock.FreezeTime in a test that also uses NewIntegrationEnv without expecting the env's own freeze/UnFreeze cleanup. +- Skipping migrator.Up() / using a non-migrated DB — the resolver provisioning (CreateCustomerAccounts, EnsureBusinessAccounts) needs the full schema. + +## Decisions + +- **Test deps are assembled from concrete package constructors rather than the application wiring layer.** — Per AGENTS.md, building from repos/adapters/services/lockr keeps ledger testutils independent of app/common and prevents test-only import cycles. +- **IntegrationEnv provisions both customer and business accounts up front via the resolver.** — Most ledger lifecycle tests need FBO/Receivable/Accrued (customer) and Wash/Earnings/Brokerage/Breakage (business) sub-accounts available, so they are created once and exposed via typed helpers. + +## Example: Stand up a ledger integration environment and resolve a sub-account balance + +``` +env := testutils.NewIntegrationEnv(t, "ledger-test") + +fbo := env.FBOSubAccount(t, ledger.DefaultCustomerFBOPriority) +// ... post entries via env.Deps.HistoricalLedger ... +balance := env.SumBalance(t, fbo) // returns settled balance +require.Equal(t, float64(0), balance.InexactFloat64()) +``` + + diff --git a/openmeter/ledger/transactions/CLAUDE.md b/openmeter/ledger/transactions/CLAUDE.md new file mode 100644 index 0000000000..829a8ab4cc --- /dev/null +++ b/openmeter/ledger/transactions/CLAUDE.md @@ -0,0 +1,59 @@ +# transactions + + + +> The transaction-template intent layer: declarative templates (one per business movement, e.g. IssueCustomerReceivable, TransferCustomerFBOToAccrued, PlanCustomerFBOBreakage) that resolve into ledger.TransactionInput by looking up the right sub-accounts, and reverse into correction transactions. This package never commits — it produces inputs that the historical ledger commits. + +## Patterns + +**Template interface trio** — Every template implements TransactionTemplate (typeGuard()/code()/Validate()) plus either CustomerTransactionTemplate or OrgTransactionTemplate (resolve + correct). The private typeGuard() guard prevents foreign types satisfying the interface. (`var _ CustomerTransactionTemplate = (TransferCustomerFBOToAccruedTemplate{})`) +**resolve builds EntryInputs via routed sub-accounts** — resolve() fetches customer/business accounts from ResolverDependencies, calls GetSubAccountForRoute with a typed RouteParams, and returns a *TransactionInput of balanced *EntryInput pairs (neg/pos). (`fbo.Address(), amount: t.Amount.Neg() paired with accrued.Address(), amount: t.Amount`) +**Validate-before-resolve in the dispatcher** — ResolveTransactions validates scope, then per template calls template.Validate(), type-switches Customer vs Org, validates the matching scope half, resolves, and annotates with template code + direction. (`switch typ := any(template).(type) { case CustomerTransactionTemplate: ... case OrgTransactionTemplate: ... default: ErrResolutionTemplateUnknown }`) +**Code-based template registry** — Each template has a stable TransactionTemplateCode (codes.go) and is registered in transactionTemplatesByCode and transactionTemplatesByLegacyName so persisted annotations can be reversed into a template for correction. (`TemplateCodeTransferCustomerFBOToAccrued TransactionTemplateCode = "customer.fbo.collect"`) +**Correction reverses persisted templates** — CorrectTransaction reads the template code/direction from the original transaction's annotations, rejects correcting a correction, then calls template.correct(scope) and re-annotates outputs as direction=correction. (`direction, _ := ledger.TransactionDirectionFromAnnotations(scope.OriginalTransaction.Annotations())`) +**Private input implementations** — EntryInput/TransactionInput/TransactionGroupInput are unexported-field structs implementing the ledger.*Input interfaces; helpers GroupInputs/WithAnnotations/AsGroupInput compose them. (`var _ ledger.TransactionInput = (*TransactionInput)(nil)`) +**Deterministic correction ordering** — Correction legs are allocated against original entries sorted by a stable key (collection source order, then FBO credit priority, then sub-account id, then identity key) so corrections unwind in reverse collection order. (`slices.SortStableFunc(negativeFBOEntries, compareFBOAccrualCorrectionSourceEntries)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `template.go` | TransactionTemplate / CustomerTransactionTemplate / OrgTransactionTemplate interfaces with the private guard. | typeGuard() must return a value of the unexported guard type — that is what stops external packages from implementing the interface. | +| `resolve.go` | ResolverDependencies, ResolutionScope (+ its Validate variants), and the ResolveTransactions dispatcher. | ResolutionScope validates namespace match; customer templates require CustomerID.Namespace+ID, org templates require Namespace. resolve() returning a nil TransactionInput is dropped (appendResolvedTemplateTransaction). | +| `codes.go` | TransactionTemplateCode constants + by-code and by-legacy-name registries + annotateTemplateTransaction. | Adding a template means adding its code AND both registry entries; TemplateCode() panics on an empty code, so always set code(). | +| `correction.go` | CorrectionInput/CorrectionScope + CorrectTransaction: annotation-driven template lookup and reversal. | Reads template from new code annotation or legacy name annotation; correcting a correction is rejected; templates without correct support return templateCorrectionNotImplemented. | +| `input.go` | EntryInput/TransactionInput/TransactionGroupInput impls and GroupInputs/WithAnnotations/AsGroupInput helpers. | Fields are unexported; construct only within this package. WithAnnotations wraps in annotatedTransactionInput, merging maps (template annotations win). | +| `accrual.go` | FBO->Accrued / Receivable->Accrued / advance->Accrued transfer templates and their cost-basis-preserving accrual + correction logic. | Accrual preserves source cost basis via routePairingKey(currency, costBasis); accrued sub-account gets tax dimensions, FBO sources do not carry tax. | +| `legacy.go` | Archived templates (legacyFund/legacySettle...) kept only to interpret old persisted annotations. | Their code() returns "" so they are by-legacy-name only; do not use them in new flows — use the current Authorize/Settle templates. | +| `priority.go` | resolveCustomerFBOCreditPriority falls back to ledger.DefaultCustomerFBOPriority. | A nil CreditPriority means default priority, not 'no priority' — this drives FBO collection order. | + +## Anti-Patterns + +- Committing ledger transactions from inside a template — templates only resolve into TransactionInputs; the historical ledger commits. +- Adding a template without registering its code in both transactionTemplatesByCode and (if it has a legacy name) transactionTemplatesByLegacyName. +- Implementing a template interface from another package by faking typeGuard()/guard — the guard type is intentionally unexported. +- Constructing EntryInput/TransactionInput from outside the package, bypassing the balanced neg/pos entry convention. +- Importing transactions/testutils (Any*Input fixtures) from production code instead of using the real templates. + +## Decisions + +- **Business intent is expressed as one template per movement that returns inputs, separate from the ledger that commits them.** — Templates own routing/cost-basis/tax decisions and reversibility, while the historical ledger owns atomic posting and locking — keeping intent and persistence decoupled. +- **Templates are identified by a stable TransactionTemplateCode persisted in annotations, with a legacy-name fallback registry.** — Corrections must reconstruct the original template from a committed transaction; codes give a stable contract while legacy names keep old data correctable. +- **Correction allocates legs in a fixed deterministic order matching FBO collection order.** — Reversing in reverse-collection order keeps breakage/cost-basis attribution consistent without storing grant lineage. + +## Example: A customer transaction template resolving into a balanced TransactionInput + +``` +func (t TransferCustomerReceivableToAccruedTemplate) resolve(ctx context.Context, customerID customer.CustomerID, resolvers ResolverDependencies) (ledger.TransactionInput, error) { + customerAccounts, err := resolvers.AccountService.GetCustomerAccounts(ctx, customerID) + if err != nil { return nil, err } + receivable, _ := customerAccounts.ReceivableAccount.GetSubAccountForRoute(ctx, ledger.CustomerReceivableRouteParams{Currency: t.Currency, CostBasis: t.CostBasis, TransactionAuthorizationStatus: ledger.TransactionAuthorizationStatusOpen}) + accrued, _ := customerAccounts.AccruedAccount.GetSubAccountForRoute(ctx, ledger.CustomerAccruedRouteParams{Currency: t.Currency, TaxCode: t.TaxCode, TaxBehavior: t.TaxBehavior, CostBasis: t.CostBasis}) + return &TransactionInput{bookedAt: t.At, entryInputs: []*EntryInput{ + {address: receivable.Address(), amount: t.Amount.Neg()}, + {address: accrued.Address(), amount: t.Amount}, + }}, nil +} +``` + + diff --git a/openmeter/ledger/transactions/testutils/CLAUDE.md b/openmeter/ledger/transactions/testutils/CLAUDE.md new file mode 100644 index 0000000000..f4630dcfa8 --- /dev/null +++ b/openmeter/ledger/transactions/testutils/CLAUDE.md @@ -0,0 +1,51 @@ +# testutils + + + +> Test-only helpers that provide concrete, field-settable implementations of the ledger package's input interfaces (EntryInput, TransactionInput, TransactionGroupInput) so tests can construct arbitrary ledger transaction inputs without the production builders. + +## Patterns + +**Interface conformance via compile-time assertion** — Every struct asserts it satisfies the corresponding ledger interface with a blank var declaration, so a signature drift in the ledger interface breaks compilation here immediately. (`var _ ledger.EntryInput = (*AnyEntryInput)(nil)`) +**Value-field + getter-method mirror** — Each interface method is backed by an exported `...Value` struct field; the method just returns the field, letting tests set inputs declaratively while still satisfying the interface. (`AnyEntryInput{AmountValue: ...} with func (a *AnyEntryInput) Amount() alpacadecimal.Decimal { return a.AmountValue }`) +**Pointer-receiver methods** — All methods use pointer receivers and assertions use `(*Type)(nil)`; pass `&AnyEntryInput{...}` to consumers expecting the interface. (`func (a *AnyTransactionInput) BookedAt() time.Time { return a.BookedAtValue }`) +**lo.Map for slice-of-pointer to slice-of-interface widening** — Collection getters convert `[]*AnyEntryInput` to `[]ledger.EntryInput` via lo.Map rather than manual loops, matching repo samber/lo conventions. (`lo.Map(a.EntryInputsValues, func(e *AnyEntryInput, _ int) ledger.EntryInput { return e })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `anytransaction.go` | Sole file: defines AnyEntryInput, AnyTransactionInput, AnyTransactionGroupInput plus the AsGroupInput convenience that wraps a single transaction into a group input. | AsGroupInput always wraps exactly one transaction; do not assume it merges multiple. Keep the `var _ ledger.X = (*AnyX)(nil)` assertions in sync when adding fields. | + +## Anti-Patterns + +- Importing this testutils package from non-test production code — it only exists to satisfy ledger interfaces in tests. +- Adding business logic to the getters; they must remain trivial field returns so the structs stay pure test fixtures. +- Dropping a `var _ ledger.X = (*AnyX)(nil)` assertion — without it, interface drift goes undetected. + +## Decisions + +- **Mirror each ledger input interface with an `Any...Input` struct whose every method returns a settable exported field.** — Production input builders enforce invariants; tests need to inject arbitrary or invalid inputs to exercise validation and edge cases, so a plain field-backed implementation is required. + +## Example: Build a ledger transaction group input fixture for a test + +``` +import ( + "github.com/alpacahq/alpacadecimal" + "github.com/openmeterio/openmeter/openmeter/ledger" + "github.com/openmeterio/openmeter/openmeter/ledger/transactions/testutils" + "github.com/openmeterio/openmeter/pkg/models" +) + +entry := &testutils.AnyEntryInput{ + Address: addr, // ledger.PostingAddress + AmountValue: alpacadecimal.NewFromInt(100), + IdentityKeyValue: "grant-1", +} +tx := &testutils.AnyTransactionInput{ + BookedAtValue: clock.Now(), + EntryInputsValues: []*testutils.AnyEntryInput{entry}, +// ... +``` + + diff --git a/openmeter/llmcost/adapter/CLAUDE.md b/openmeter/llmcost/adapter/CLAUDE.md new file mode 100644 index 0000000000..2decefd29b --- /dev/null +++ b/openmeter/llmcost/adapter/CLAUDE.md @@ -0,0 +1,60 @@ +# adapter + + + +> Ent-backed persistence adapter for the llmcost domain, implementing llmcost.Adapter against the LLMCostPrice table. Owns all SQL access for global prices (namespace IS NULL) and per-namespace manual overrides, plus their soft-delete and effective-period resolution semantics. + +## Patterns + +**Config-validated constructor returning interface** — New(Config) returns (llmcost.Adapter, error); Config.Validate() collects missing Client/Logger into errors.Join before constructing. Compile-time assertions var _ models.Validator = (*Config)(nil) and var _ llmcost.Adapter = (*adapter)(nil) enforce the contracts. (`func New(config Config) (llmcost.Adapter, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client, logger: config.Logger}, nil }`) +**Transaction plumbing via entutils** — adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebind via entdb.NewTxClientFromRawConfig), and Self. Every write/list wraps its body in entutils.TransactingRepo / TransactingRepoWithNoValue so it rebinds to the tx in ctx. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (llmcost.Price, error) { ... })`) +**Validate input before any query** — Each method calls input.Validate() as the first statement inside the transaction closure (or at top of ResolvePrice) before touching a.db. (`if err := input.Validate(); err != nil { return llmcost.Price{}, err }`) +**Soft delete everywhere** — All reads filter pricedb.DeletedAtIsNil(); deletes/replacements SetDeletedAt(clock.Now()) instead of removing rows. CreateOverride soft-deletes the prior active manual override before inserting the new one. (`Where(pricedb.DeletedAtIsNil()).Where(pricedb.NamespaceIsNil())`) +**Namespace-aware price resolution ordering** — ResolvePrice ORs NamespaceEQ(input.Namespace) with NamespaceIsNil(), filters EffectiveFrom<=at and (EffectiveTo IS NULL or >at), then Orders ByNamespace(desc) so a namespace override wins over the global row. (`Order(pricedb.ByNamespace(sql.OrderDesc()), pricedb.ByEffectiveFrom(sql.OrderDesc())).First(ctx)`) +**Domain error mapping** — entdb.IsNotFound -> llmcost.NewPriceNotFoundError / NewPriceOverrideNotFoundError; entdb.IsConstraintError -> models.NewGenericConflictError. Never leak raw ent errors as not-found. (`if entdb.IsNotFound(err) { return llmcost.Price{}, llmcost.NewPriceOverrideNotFoundError(input.ID) }`) +**filter.ApplyToQuery for list filtering** — List methods apply optional FilterString inputs via filter.ApplyToQuery(query, input.X, pricedb.FieldX) and order via entutils.GetOrdering(input.Order) with an explicit OrderBy switch defaulting to model ID. (`query = filter.ApplyToQuery(query, input.Provider, pricedb.FieldProvider)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config, New, the adapter struct, and Tx/WithTx/Self transaction plumbing. | Requires both Client and Logger; do not fall back to slog.Default(). WithTx must rebuild from *tx.GetConfig(). | +| `price.go` | All Adapter methods: ListPrices, GetPrice, ResolvePrice, CreateOverride, DeleteOverride, ListOverrides, UpsertGlobalPrice. | ResolvePrice intentionally does NOT use a transaction (read-only, uses clock.Now() when input.At is nil). ListOverrides hard-codes source=manual and must not also apply a user source filter (creates contradictory WHERE). | +| `mapping.go` | mapPriceFromEntity (db.LLMCostPrice -> llmcost.Price) and decimalOrZero helper. | Optional pricing fields (CacheRead/CacheWrite/Reasoning) are stored non-null; a zero decimal means 'not set' and is dropped to a nil pointer via !entity.X.IsZero(). decimalOrZero reverses this on writes. | + +## Anti-Patterns + +- Using a raw *entdb.Client directly instead of wrapping in entutils.TransactingRepo, breaking tx-awareness in ctx. +- Hard-deleting rows or skipping pricedb.DeletedAtIsNil() filters, exposing soft-deleted prices. +- Returning entdb.IsNotFound errors directly instead of mapping to llmcost.NewPrice*NotFoundError. +- Adding a user-supplied source filter inside ListOverrides (already constrained to source=manual). +- Persisting optional pricing pointers without decimalOrZero, or mapping zero decimals back to non-nil pointers. + +## Decisions + +- **Global prices use NULL namespace; overrides set the namespace and source=manual.** — A single LLMCostPrice table holds both tiers; resolution prefers the namespace override via ByNamespace(desc) ordering without a separate table. +- **ResolvePrice bypasses the transaction wrapper.** — It is a hot read-only path on the metering/cost lookup; avoiding HijackTx reduces overhead. +- **UpsertGlobalPrice updates the current (EffectiveTo IS NULL) row in place rather than versioning.** — The sync reconciler refreshes canonical system prices repeatedly; in-place update keeps one current global row per provider/model. + +## Example: Tx-aware adapter write with input validation, soft-delete of prior override, and error mapping + +``` +func (a *adapter) CreateOverride(ctx context.Context, input llmcost.CreateOverrideInput) (llmcost.Price, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (llmcost.Price, error) { + if err := input.Validate(); err != nil { + return llmcost.Price{}, err + } + _, _ = a.db.LLMCostPrice.Update(). + Where(pricedb.DeletedAtIsNil(), pricedb.NamespaceEQ(input.Namespace), pricedb.ProviderEQ(string(input.Provider)), pricedb.ModelIDEQ(input.ModelID), pricedb.SourceEQ(string(llmcost.PriceSourceManual))). + SetDeletedAt(clock.Now()).Save(ctx) + entity, err := a.db.LLMCostPrice.Create().SetNamespace(input.Namespace).SetSource(string(llmcost.PriceSourceManual)).Save(ctx) + if err != nil { + if entdb.IsConstraintError(err) { + err = models.NewGenericConflictError(err) + } + return llmcost.Price{}, fmt.Errorf("failed to create override: %w", err) + } +// ... +``` + + diff --git a/openmeter/llmcost/service/CLAUDE.md b/openmeter/llmcost/service/CLAUDE.md new file mode 100644 index 0000000000..862c785287 --- /dev/null +++ b/openmeter/llmcost/service/CLAUDE.md @@ -0,0 +1,56 @@ +# service + + + +> Thin service layer over llmcost.Adapter that adds the namespace-override overlay business logic on top of global prices, while delegating persistence. Implements llmcost.Service. + +## Patterns + +**Constructor injects adapter + logger** — New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service stores both on the service struct. No DI wiring lives here. (`func New(adapter llmcost.Adapter, logger *slog.Logger) llmcost.Service { return &service{adapter: adapter, logger: logger} }`) +**Wrap mutations/reads in transaction.Run** — Service methods that compose multiple adapter calls run inside transaction.Run / transaction.RunWithNoValue against s.adapter, so overlay reads and writes share one tx. (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[llmcost.Price], error) { ... })`) +**Namespace override overlay on ListPrices** — After fetching global prices, batch-fetch ListOverrides for the namespace, index them by (provider, model_id), and replace matching global rows in place. Skipped when namespace is empty, result empty, or the source filter excludes manual. (`overrideMap[overrideKey{string(o.Provider), o.ModelID}] = o; result.Items[i] = o`) +**Source-filter consistency guard** — sourceFilterExcludesManual inspects FilterString Eq/Ne to decide if applying the manual override overlay would violate a user source filter; if so, skip the overlay. (`if source.Eq != nil && *source.Eq != manual { return true }`) +**GetPrice override fallthrough** — When a global price is returned for a set namespace, ResolvePrice is consulted; a manual override replaces it, and IsGenericNotFoundError is treated as 'no override, keep global'. (`if models.IsGenericNotFoundError(err) { return price, nil }`) +**Pass-through for single-adapter operations** — ResolvePrice delegates directly without a transaction; CreateOverride/DeleteOverride/ListOverrides just wrap the single adapter call in transaction.Run for consistency. (`func (s *service) ResolvePrice(ctx, input) (llmcost.Price, error) { return s.adapter.ResolvePrice(ctx, input) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | service struct, New, all llmcost.Service methods, and the sourceFilterExcludesManual helper. | ListPrices and GetPrice mutate/replace result items with overrides — preserve the skip conditions (empty namespace, empty result, source filter excludes manual) or you leak overrides into filtered/global views. | +| `service_test.go` | Unit tests using an in-package mockAdapter + noopDriver covering the overlay matrix and sourceFilterExcludesManual truth table. | mockAdapter.Tx returns a noopDriver so transaction.Run works without a DB; new Service methods need a mockAdapter stub or tests won't compile. | + +## Anti-Patterns + +- Applying the manual override overlay when sourceFilterExcludesManual returns true (violates the caller's source filter). +- Overlaying overrides when input.Namespace is empty (global listing must stay global). +- Treating ResolvePrice not-found as a hard error in GetPrice instead of falling back to the global price. +- Putting Ent/DB queries in the service layer instead of delegating to llmcost.Adapter. +- Calling overlay logic outside transaction.Run so the override fetch and base read use different snapshots. + +## Decisions + +- **Overrides are overlaid in the service, not the adapter.** — The adapter keeps clean global vs namespace queries; the service expresses the 'namespace override wins' product rule and batches override lookups for O(1) replacement. +- **Source filter is honored by skipping the overlay rather than re-querying.** — Namespace overrides are always source=manual, so when the filter excludes manual the overlay would contradict the filter; skipping is cheaper and correct. + +## Example: ListPrices with namespace override overlay guarded by the source filter + +``` +return transaction.Run(ctx, s.adapter, func(ctx context.Context) (pagination.Result[llmcost.Price], error) { + result, err := s.adapter.ListPrices(ctx, input) + if err != nil { return pagination.Result[llmcost.Price]{}, err } + if input.Namespace == "" || len(result.Items) == 0 || sourceFilterExcludesManual(input.Source) { + return result, nil + } + overrides, err := s.adapter.ListOverrides(ctx, llmcost.ListOverridesInput{Namespace: input.Namespace, Provider: input.Provider, ModelID: input.ModelID}) + if err != nil { return pagination.Result[llmcost.Price]{}, err } + overrideMap := make(map[overrideKey]llmcost.Price, len(overrides.Items)) + for _, o := range overrides.Items { overrideMap[overrideKey{string(o.Provider), o.ModelID}] = o } + for i, p := range result.Items { + if o, ok := overrideMap[overrideKey{string(p.Provider), p.ModelID}]; ok { result.Items[i] = o } + } + return result, nil +}) +``` + + diff --git a/openmeter/llmcost/sync/CLAUDE.md b/openmeter/llmcost/sync/CLAUDE.md new file mode 100644 index 0000000000..035b4086c1 --- /dev/null +++ b/openmeter/llmcost/sync/CLAUDE.md @@ -0,0 +1,62 @@ +# sync + + + +> Background sync pipeline that fetches LLM model prices from external sources (e.g. models.dev), normalizes provider/model IDs, deduplicates, and reconciles multi-source agreement into canonical system global prices via llmcost.Adapter.UpsertGlobalPrice. Run by app/common and cmd/jobs. + +## Patterns + +**Fetcher interface per source** — Each external source implements Fetcher{ Source() llmcost.PriceSource; Fetch(ctx) ([]llmcost.SourcePrice, error) }. NewModelsDevFetcher is the built-in; DefaultFetchers(client) returns the registered list. (`type Fetcher interface { Source() llmcost.PriceSource; Fetch(ctx context.Context) ([]llmcost.SourcePrice, error) }`) +**SyncJob orchestration phases** — SyncJob.Run executes fetch+normalize -> deduplicate -> optional filter -> reconcile. A failing fetcher logs and is skipped (continue), never failing the whole job. (`continue // Don't fail entire sync if one source is down`) +**Normalizer canonicalizes provider+model** — ModelIDNormalizer.Normalize delegates to llmcost.NormalizeModelID, lowercasing, trimming, mapping provider aliases (gemini->google, aws->amazon), and stripping date version suffixes (gpt-4o-2024-08-06 -> gpt-4o). (`func (n *defaultNormalizer) Normalize(modelID, provider string) (string, string) { return llmcost.NormalizeModelID(provider, modelID) }`) +**Per-source deduplication before reconcile** — deduplicateSourcePrices collapses duplicate (source, provider, model_id) keys that normalization created, preferring model names without a '/' provider prefix and using lexicographic tie-break, to prevent false multi-source agreement. (`if existingHasPrefix && !newHasPrefix || existingHasPrefix == newHasPrefix && p.ModelName < existing.ModelName { result[idx] = p }`) +**Tolerance-based multi-source agreement** — Reconciler groups by (provider, model_id), requires >= minAgreement sources agreeing within priceTolerance (pricesAgree on all token dimensions incl. optional ones), averages the agreeing prices, and upserts a PriceSourceSystem global price with a SourcePricesMap. (`agreeing := r.findAgreement(sourcePrices); if agreeing == nil { skipped++; continue }`) +**Optional decimal agreement semantics** — optionalDecimalsAgree: both nil agree, exactly one nil disagrees, both set delegate to decimalsAgree (zero-vs-nonzero disagree, else within ratio tolerance). averageOptionalDecimal returns nil if the first price's field is unset. (`if a == nil && b == nil { return true }; if a == nil || b == nil { return false }`) +**Config caps minAgreement at fetcher count** — NewSyncJob defaults MinSourceAgreement<=0 to DefaultMinSourceAgreement(2) but caps it at len(fetchers) so a single-fetcher setup can still reconcile. (`if numFetchers := len(fetchers); numFetchers > 0 && minAgreement > numFetchers { minAgreement = numFetchers }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `sync.go` | SyncJob, SyncJobConfig, NewSyncJob, DefaultFetchers, deduplicateSourcePrices, and the Run pipeline. | Filter reuses allPrices[:0] in place; dedup must run BEFORE reconcile or provider-alias collapse creates false agreement. minAgreement capping logic is load-bearing for single-source setups. | +| `fetcher_modelsdev.go` | modelsDevFetcher fetching https://models.dev/api.json, converting per-million prices to per-token (Div(perMillion)) and stripping provider prefixes from model IDs/names. | Skips models lacking cost.Input or cost.Output. Provider key is lowercased; empty provider entries are skipped. Optional cache/reasoning fields are pointer-set only when present. | +| `reconciler.go` | Reconciler, NewReconciler (clamps minAgreement<=0 and priceTolerance<0 to defaults), Reconcile, findAgreement, pricesAgree, averagePrices and decimal helpers. | DefaultMinSourceAgreement=2, DefaultPriceTolerance=0.01. decimalsAgree treats zero-vs-nonzero as disagreement; ratio is diff/max. Upsert failures are collected into errors.Join, not returned eagerly. | +| `normalizer.go` | ModelIDNormalizer interface, defaultNormalizer wrapping llmcost.NormalizeModelID. | Generic transforms only; source-specific cleanup belongs in each Fetcher. Provider alias and version-suffix logic lives in llmcost.NormalizeModelID, not here. | +| `fetcher.go` | Fetcher interface definition. | Source() must return a stable PriceSource string used as the SourcePricesMap key in reconciliation. | + +## Anti-Patterns + +- Failing the whole SyncJob.Run when a single Fetcher errors instead of logging and continuing. +- Reconciling before deduplicateSourcePrices runs, letting provider-alias collapse fake multi-source agreement. +- Requiring more agreeing sources than fetchers exist (must cap minAgreement at len(fetchers)). +- Doing source-specific cleanup inside the normalizer instead of in the Fetcher before returning prices. +- Treating a missing optional pricing field as zero in agreement checks (one nil must disagree with a set value). + +## Decisions + +- **Canonical global prices require multi-source agreement within tolerance, then average.** — Single-source external data is unreliable; requiring >=2 sources within 1% and averaging produces a defensible PriceSourceSystem price with a full SourcePricesMap audit trail. +- **Deduplicate per source after normalization, before reconciliation.** — Provider aliases (azure_ai and azure) collapse to one key; without dedup a single source would appear as two agreeing sources. +- **Prices are fetched per-million then divided to per-token at the fetcher boundary.** — Keeps the internal llmcost.ModelPricing in a single per-token unit so the reconciler and adapter never deal with source-specific scaling. + +## Example: Full sync cycle: fetch (skip on error) -> normalize -> deduplicate -> filter -> reconcile + +``` +func (j *SyncJob) Run(ctx context.Context) error { + var allPrices []llmcost.SourcePrice + for _, f := range j.fetchers { + prices, err := f.Fetch(ctx) + if err != nil { + j.logger.Error("failed to fetch prices", "source", f.Source(), "error", err) + continue + } + for _, p := range prices { + provider, modelID := j.normalizer.Normalize(p.ModelID, string(p.Provider)) + p.Provider = llmcost.Provider(provider) + p.ModelID = modelID + allPrices = append(allPrices, p) + } + } +// ... +``` + + diff --git a/openmeter/meter/adapter/CLAUDE.md b/openmeter/meter/adapter/CLAUDE.md new file mode 100644 index 0000000000..632e02fd36 --- /dev/null +++ b/openmeter/meter/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Ent-backed persistence layer for meter definitions. Implements meter.Service against db.Meter and answers meter-dependency queries (active features/entitlements) used by the meter service before allowing deletes/group-by drops. + +## Patterns + +**Adapter implements meter.Service** — Adapter is constructed via New(Config) with a *db.Client and *slog.Logger, both validated as non-nil in Config.Validate(). Compile-time assert `var _ meter.Service = (*Adapter)(nil)`. (`func New(config Config) (*Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**TxCreator wiring** — Adapter exposes Tx/WithTx/Self so it plugs into entutils.TransactingRepo. Tx uses a.db.HijackTx; WithTx rebuilds via db.NewTxClientFromRawConfig. Every mutating method wraps its body in transaction.Run(ctx, a, ...) + entutils.TransactingRepo(ctx, a, func(ctx, repo *Adapter)...). (`return transaction.Run(ctx, a, func(ctx) (Meter, error) { return entutils.TransactingRepo(ctx, a, func(ctx, repo *Adapter)...) })`) +**Entity->domain via MapFromEntityFactory** — Every read maps *db.Meter to meter.Meter through MapFromEntityFactory; list paths use pagination.MapResultErr(entities, MapFromEntityFactory). Never hand-build meter.Meter inline. (`resp, err := pagination.MapResultErr(entities, MapFromEntityFactory)`) +**Constraint/not-found error translation** — Translate db errors to domain errors: db.IsConstraintError -> models.NewGenericConflictError; db.IsNotFound -> meterpkg.NewMeterNotFoundError(key) or models.NewGenericValidationError. Validation errors are wrapped with models.NewGenericValidationError. (`if db.IsConstraintError(err) { return Meter{}, models.NewGenericConflictError(fmt.Errorf("meter with the same slug already exists")) }`) +**Soft delete and live-row filtering** — DeleteMeter sets DeletedAt rather than removing rows; queries gate on meterdb.DeletedAtIsNil and feature/entitlement queries use Or(DeletedAtIsNil, DeletedAtGT(clock.Now())) and Or(ArchivedAtIsNil, ArchivedAtGT(clock.Now())). (`repo.db.Meter.UpdateOneID(meter.ID).SetDeletedAt(time.Now()).Save(ctx)`) +**Filter/order via pkg helpers** — ListMeters applies filter.ApplyToQuery(query, params.Key, meterdb.FieldKey) for FilterString fields and entutils.GetOrdering(params.Order) + meterdb.ByKey/ByName/etc for ordering. Add new order keys by extending the switch on params.OrderBy. (`query = filter.ApplyToQuery(query, params.Key, meterdb.FieldKey)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Adapter struct, Config+Validate, New, and Tx/WithTx/Self transaction plumbing | Both Client and Logger must be non-nil; do not inject slog.Default() as fallback | +| `manage.go` | Mutations (CreateMeter/UpdateMeter/DeleteMeter) and dependency checks (HasActiveFeatureForMeter, HasEntitlementForMeter, ListFeaturesForMeter) | UpdateMeter only sets mutable fields (Name, Description, GroupBy, Metadata, Annotations); Key/Aggregation/EventType are immutable. Use SetOrClearAnnotations for nillable annotation updates | +| `meter.go` | Reads (ListMeters, GetMeterByIDOrSlug) and MapFromEntityFactory mapper | GetMeterByIDOrSlug matches ID OR (Key AND DeletedAtIsNil); MapFromEntityFactory returns error on nil entity | +| `adapter_test.go` | TestEnv harness (NewTestEnv, DBSchemaMigrate) over real Postgres via testutils.InitPostgresDB | Requires Postgres; use env.Meter (Adapter) directly, not service wiring | + +## Anti-Patterns + +- Building meter.Meter inline instead of MapFromEntityFactory +- Performing mutations without transaction.Run + entutils.TransactingRepo (loses tx context binding) +- Returning raw ent errors instead of translating via db.IsConstraintError/db.IsNotFound to domain errors +- Hard-deleting meter rows instead of SetDeletedAt +- Adding business rules (event-type/reserved-type validation, publish events) here — that belongs in meter/service + +## Decisions + +- **Adapter directly satisfies meter.Service (read+CRUD) but business orchestration lives in meter/service ManageService** — Keeps persistence pure; service layer owns hooks, namespace provisioning, event publishing and reserved-event-type validation +- **Feature/entitlement existence checks live in the meter adapter** — DeleteMeter and group-by-drop validation in the service need to query foreign tables; doing it via Ent here keeps it transaction-aware + +## Example: Transaction-aware mutation returning a mapped domain value + +``` +func (a *Adapter) CreateMeter(ctx context.Context, input meterpkg.CreateMeterInput) (meterpkg.Meter, error) { + if err := input.Validate(); err != nil { return meterpkg.Meter{}, err } + return transaction.Run(ctx, a, func(ctx context.Context) (meterpkg.Meter, error) { + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, repo *Adapter) (meterpkg.Meter, error) { + entity, err := repo.db.Meter.Create().SetNamespace(input.Namespace).SetKey(input.Key).Save(ctx) + if err != nil { + if db.IsConstraintError(err) { return meterpkg.Meter{}, models.NewGenericConflictError(fmt.Errorf("meter with the same slug already exists")) } + return meterpkg.Meter{}, fmt.Errorf("failed to create meter: %w", err) + } + return MapFromEntityFactory(entity) + }) + }) +} +``` + + diff --git a/openmeter/meter/httphandler/CLAUDE.md b/openmeter/meter/httphandler/CLAUDE.md new file mode 100644 index 0000000000..c3f23f4b04 --- /dev/null +++ b/openmeter/meter/httphandler/CLAUDE.md @@ -0,0 +1,61 @@ +# httphandler + + + +> v1 HTTP driver (package httpdriver) for meter CRUD plus meter querying (JSON + CSV), subjects, and group-by values. Bridges api.* request/response types to meter.ManageService and the streaming.Connector. + +## Patterns + +**httptransport handler factories** — Each operation is a method on *handler returning a typed handler built with httptransport.NewHandler / NewHandlerWithArgs: a decode func (ctx, r, params)->Request and a business func (ctx, Request)->Response, plus an encoder and WithOperationName option. All handler methods are declared on the Handler interface. (`func (h *handler) ListMeters() ListMetersHandler { return httptransport.NewHandlerWithArgs(decode, handle, commonhttp.JSONResponseEncoderWithStatus[ListMetersResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("listMeters"))...) }`) +**Namespace from decoder, not request** — Every decode func calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace(ctx); failure is a 500 commonhttp.NewHTTPError. Never read namespace from the body/path. (`ns, err := h.resolveNamespace(ctx)`) +**API<->domain mapping in mapping.go** — Conversions follow FromAPI/ToAPI naming: ToAPIMeter, ToAPIMeterQueryResult/Row, ToRequestFromQueryParamsPOSTBody, and toQueryParamsFromRequest. Handlers never construct streaming.QueryParams inline — they go through toQueryParamsFromRequest. (`params, err := h.toQueryParamsFromRequest(ctx, meter, ToRequestFromQueryParamsPOSTBody(request.params))`) +**GET and POST query share one param shape** — GET QueryMeter converts api.QueryMeterParams to the POST body via ToRequestFromQueryParamsPOSTBody, then both feed toQueryParamsFromRequest. CSV variants reuse QueryMeterParams/QueryMeterRequest type aliases. (`type QueryMeterCSVRequest = QueryMeterRequest`) +**ClickHouse JSONPath validation on write** — CreateMeter calls validateJSONPaths and UpdateMeter calls validateGroupByJSONPaths against streaming.ValidateJSONPath before persisting, because ClickHouse is stricter than Go JSONPath libs. Invalid paths return models.NewGenericValidationError. (`err := validateJSONPaths(ctx, h.streaming, request.MeterCreate.ValueProperty, request.MeterCreate.GroupBy)`) +**Subject/customer/group-by validation against meter config** — toQueryParamsFromRequest rejects group-by keys not in m.GroupBy (except special `subject`/`customer_id`), auto-adds subject/customer_id to GroupBy when filtered, and forbids AdvancedMeterGroupByFilters together with FilterGroupBy. (`if ok := groupBy == "subject" || groupBy == "customer_id" || m.GroupBy[groupBy] != ""; !ok { return params, models.NewGenericValidationError(...) }`) +**CSV responses via commonhttp.CSVResponse** — CSV handlers return a queryMeterCSVResult implementing Records()/FileName(); subject display names are resolved via subjectService.List keyed by subject key. Use commonhttp.CSVResponseEncoder. (`response := NewQueryMeterCSVResult(meter.Key, params.GroupBy, rows, subjectsByKey)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/MeterHandler interfaces, handler struct, New constructor, resolveNamespace | Depends on meter.ManageService (not meter.Service), customer.Service, streaming.Connector, subject.Service — all injected | +| `meter.go` | CRUD handlers (List/Get/Create/Update/Delete) + JSONPath validation helpers | CreateMeter defaults Name to Slug; UpdateMeter re-fetches current meter and only updates mutable fields; DeleteMeter resolves to ID then deletes | +| `query.go` | QueryMeter (GET), QueryMeterPost, ListSubjects, ListGroupByValues handlers | ListGroupByValues defaults From to last 24h when both From/To nil; query handlers always GetMeterByIDOrSlug first | +| `query_csv.go` | CSV query handlers and queryMeterCSVResult Records()/FileName() | CSV column order: window_start, window_end, [subject], [subject_display_name], groupBy..., value; subject is filtered out of groupByKeys | +| `mapping.go` | ToAPIMeter/QueryRow mappers and toQueryParamsFromRequest/getFilterCustomer | AdvancedMeterGroupByFilters and FilterGroupBy are mutually exclusive; customer IDs are resolved+validated via customerService.ListCustomers | + +## Anti-Patterns + +- Reading namespace from request body or path instead of resolveNamespace(ctx) +- Constructing streaming.QueryParams inline instead of via toQueryParamsFromRequest +- Skipping ClickHouse JSONPath validation when creating/updating meters +- Accepting group-by keys not present in meter.GroupBy (besides subject/customer_id) +- Allowing AdvancedMeterGroupByFilters and FilterGroupBy together + +## Decisions + +- **POST and GET query share one param representation by converting GET params into the POST body shape** — Single toQueryParamsFromRequest path avoids duplicating validation/group-by logic across transports +- **JSONPath validation is delegated to the streaming connector (ClickHouse)** — ClickHouse parsing is stricter than Go JSONPath libraries, so validating against the real engine prevents storing meters that fail at query time + +## Example: Query handler: resolve namespace, fetch meter, map params, query streaming + +``` +func (h *handler) QueryMeterPost() QueryMeterPostHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, idOrSlug QueryMeterPostParams) (QueryMeterPostRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return QueryMeterPostRequest{}, err } + var body api.QueryMeterPostJSONRequestBody + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return QueryMeterPostRequest{}, err } + return QueryMeterPostRequest{namespace: ns, idOrSlug: idOrSlug, params: body}, nil + }, + func(ctx context.Context, req QueryMeterPostRequest) (QueryMeterPostResponse, error) { + m, err := h.meterService.GetMeterByIDOrSlug(ctx, meter.GetMeterInput{Namespace: req.namespace, IDOrSlug: req.idOrSlug}) + if err != nil { return nil, err } + params, err := h.toQueryParamsFromRequest(ctx, m, req.params) + if err != nil { return nil, err } + rows, err := h.streaming.QueryMeter(ctx, req.namespace, m, params) +// ... +``` + + diff --git a/openmeter/meter/mockadapter/CLAUDE.md b/openmeter/meter/mockadapter/CLAUDE.md new file mode 100644 index 0000000000..5295ebec5a --- /dev/null +++ b/openmeter/meter/mockadapter/CLAUDE.md @@ -0,0 +1,44 @@ +# mockadapter + + + +> In-memory test double for meter.Service / meter.ManageService used across many test suites. Stores meters in a slice and can optionally mirror them into Postgres so feature.meter_id FK constraints are satisfied in DB-backed tests. + +## Patterns + +**Two constructors: read-only and manage** — New([]meter.Meter) returns *adapter (meter.Service); NewManage([]meter.Meter) wraps it in manageAdapter embedding meter.Service to satisfy meter.ManageService. Compile-time asserts exist for both interfaces. (`var _ meter.Service = (*adapter)(nil); var _ meter.ManageService = (*manageAdapter)(nil)`) +**Validate meters on ingress** — New and ReplaceMeters call m.Validate() on every meter and wrap failures in models.NewGenericValidationError. init() (sync.Once) ensures the meters slice is non-nil. (`if err := m.Validate(); err != nil { return nil, models.NewGenericValidationError(...) }`) +**Defensive slice copies** — getMeters() returns slices.Clone(c.meters) and New stores slices.Clone(meters) so callers cannot mutate internal state. ReplaceMeters clones before mutating IDs. (`return slices.Clone(c.meters)`) +**Optional PG sync via SetDBClient** — SetDBClient(*entdb.Client) stores the client and ReplaceMeters upserts meters into db.Meter so features.meter_id FKs resolve. PG sync runs before updating in-memory state to avoid partial-failure inconsistency; reuses existing (namespace,key) rows from shared template DBs. (`if c.dbClient != nil { ... synced[i].ID = existing.ID ... } c.meters = synced`) +**In-memory filter/pagination semantics mirror the real adapter** — ListMeters filters by namespace/IDFilter/Key.In in-memory and reproduces pagination (IsZero -> whole set, else page slice). GetMeterByIDOrSlug matches ID or Key within namespace. (`if params.Key != nil && params.Key.In != nil && !slices.Contains(*params.Key.In, meter.Key) { continue }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | adapter/manageAdapter structs, New/NewManage, init, SetDBClient, TestAdapter alias | TestAdapter = adapter is the exported test handle; SetDBClient nils dbClient back out if initial sync fails | +| `manage.go` | Mock CreateMeter/UpdateMeter/DeleteMeter on manageAdapter | Assigns ulid.Make() IDs; RegisterPreUpdateMeterHook returns NewGenericNotImplementedError; these mutate the slice but do NOT auto-sync to PG (use ReplaceMeters for that) | +| `meter.go` | ListMeters/GetMeterByIDOrSlug/ReplaceMeters/getMeters | ReplaceMeters is the only PG-syncing mutation; pagination math uses PageNumber-1 index and may produce an out-of-range empty page | + +## Anti-Patterns + +- Using this in production wiring — it is a test-only double (package adapter under mockadapter) +- Mutating the slice returned by getMeters and expecting it to persist (it is a clone) +- Relying on CreateMeter/UpdateMeter in manage.go to satisfy features.meter_id FKs (only ReplaceMeters syncs to PG) +- Updating in-memory meters before PG sync succeeds (breaks the partial-failure guarantee) + +## Decisions + +- **Optional SetDBClient/ReplaceMeters PG mirroring** — Tests that exercise features/entitlements need real meter rows for FK constraints, but most meter tests want a pure in-memory store; making PG sync opt-in keeps both fast +- **Reuse existing (namespace,key) DB rows when IDs differ** — Shared test template DBs may already contain a meter with the same key; reusing its ID keeps FK references valid instead of failing on a conflict + +## Example: Construct a manage-capable mock and optionally back it with Postgres + +``` +svc, err := mockadapter.NewManage([]meter.Meter{m}) +if err != nil { /* ... */ } +// optionally satisfy features.meter_id FKs in DB-backed tests +if err := svc.(interface{ SetDBClient(*entdb.Client) error }).SetDBClient(client); err != nil { /* ... */ } +``` + + diff --git a/openmeter/meter/service/CLAUDE.md b/openmeter/meter/service/CLAUDE.md new file mode 100644 index 0000000000..4eafd07e1f --- /dev/null +++ b/openmeter/meter/service/CLAUDE.md @@ -0,0 +1,51 @@ +# service + + + +> Business-logic layer for meter management. Service is a thin read wrapper over the Ent adapter; ManageService adds reserved-event-type validation, pre-update hooks, namespace provisioning, feature/entitlement dependency guards, and event publishing. + +## Patterns + +**Service vs ManageService split** — Service (service.go) embeds nothing and only forwards ListMeters/GetMeterByIDOrSlug to the adapter. ManageService (manage.go) embeds meter.Service (set to New(adapter)) and adds the write methods plus orchestration. Asserts `var _ meter.Service`/`var _ meter.ManageService`. (`func NewManage(...) *ManageService { return &ManageService{ Service: New(adapter), adapter: adapter, ... } }`) +**Reserved event-type validation** — Create/Update/Delete run s.eventTypeValidator (meter.NewEventTypeValidator(reservedEventTypes)) unless input.AllowReservedEventTypes is set, returning models.NewGenericValidationError on failure. (`if !input.AllowReservedEventTypes { if err := s.eventTypeValidator(input.EventType); err != nil { return Meter{}, models.NewGenericValidationError(...) } }`) +**Dependency guards before destructive changes** — DeleteMeter blocks (NewGenericConflictError) if adapter.HasActiveFeatureForMeter or HasEntitlementForMeter is true. UpdateMeter blocks dropping a group-by key still referenced by any feature.MeterGroupByFilters via adapter.ListFeaturesForMeter. (`if hasFeatures { return models.NewGenericConflictError(fmt.Errorf("meter has active features and cannot be deleted")) }`) +**Publish lifecycle events after mutation** — Each successful mutation publishes via s.publisher (eventbus.Publisher): meter.NewMeterCreateEvent / NewMeterUpdateEvent / NewMeterDeleteEvent. Delete re-fetches the (soft-deleted) meter to publish its final state. (`if err := s.publisher.Publish(ctx, meter.NewMeterCreateEvent(ctx, &createdMeter)); err != nil { ... }`) +**Pre-update hooks** — RegisterPreUpdateMeterHook appends to s.preUpdateHooks; UpdateMeter runs all hooks (ctx, input) before calling adapter.UpdateMeter. Annotations default to the current meter's when input.Annotations is nil. (`for _, hook := range s.preUpdateHooks { if err := hook(ctx, input); err != nil { return Meter{}, err } }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Read-only Service (New, ListMeters, GetMeterByIDOrSlug) forwarding to adapter | Pure pass-through; do not add write methods or business rules here | +| `manage.go` | ManageService: NewManage constructor, CreateMeter/UpdateMeter/DeleteMeter, hook registration, event publishing, dependency guards | CreateMeter still calls namespaceManager.CreateNamespace (TODO to remove); DeleteMeter is idempotent on already-deleted meters (returns nil); UpdateMeter validates input against currentMeter.ValueProperty | + +## Anti-Patterns + +- Putting persistence/Ent queries in the service layer instead of the adapter +- Mutating a meter without running reserved-event-type validation (unless AllowReservedEventTypes) +- Deleting a meter or dropping a group-by key without the feature/entitlement guard checks +- Skipping event publication after a successful mutation +- Bypassing pre-update hooks in UpdateMeter + +## Decisions + +- **ManageService embeds Service (read API) and delegates writes to the adapter** — Keeps reads uniform between Service and ManageService while concentrating orchestration (hooks, events, guards, namespace provisioning) in one place +- **Delete/update guard on dependent features and entitlements** — Meters back features and metered entitlements; allowing deletion or incompatible group-by drops would orphan or break those references, so the service refuses with a conflict error + +## Example: Mutation orchestration: validate, persist via adapter, publish event + +``` +func (s *ManageService) CreateMeter(ctx context.Context, input meter.CreateMeterInput) (meter.Meter, error) { + if err := input.Validate(); err != nil { return meter.Meter{}, fmt.Errorf("invalid create meter params: %w", err) } + if !input.AllowReservedEventTypes { + if err := s.eventTypeValidator(input.EventType); err != nil { return meter.Meter{}, models.NewGenericValidationError(fmt.Errorf("invalid event type: %w", err)) } + } + createdMeter, err := s.adapter.CreateMeter(ctx, input) + if err != nil { return createdMeter, err } + if err := s.namespaceManager.CreateNamespace(ctx, input.Namespace); err != nil { return createdMeter, fmt.Errorf("failed to create namespace: %w", err) } + if err := s.publisher.Publish(ctx, meter.NewMeterCreateEvent(ctx, &createdMeter)); err != nil { return createdMeter, fmt.Errorf("failed to publish meter created event: %w", err) } + return createdMeter, nil +} +``` + + diff --git a/openmeter/meterevent/CLAUDE.md b/openmeter/meterevent/CLAUDE.md new file mode 100644 index 0000000000..fda026c434 --- /dev/null +++ b/openmeter/meterevent/CLAUDE.md @@ -0,0 +1,51 @@ +# meterevent + + + +> Domain root for reading raw metering events back out of the streaming store (ClickHouse). Defines the meterevent.Service interface (ListEvents v1 and cursor-paginated ListEventsV2), the enriched Event value type, and the param/validation contracts; children split into adapter (streaming-backed query) and httphandler (HTTP transport). + +## Patterns + +**Service interface defined at package root** — service.go declares the Service interface with ListEvents/ListEventsV2; adapter and httphandler depend on this interface, never on each other's concrete types. (`type Service interface { ListEvents(...); ListEventsV2(...) }`) +**Params carry their own Validate()** — Each input struct (ListEventsParams, ListEventsV2Params) implements Validate() that accumulates into var errs []error and returns errors.Join(errs...); field errors wrapped with fmt.Errorf("field: %w", err). (`if i.Namespace == "" { errs = append(errs, errors.New("namespace is required")) }`) +**Event implements pagination.Item via Cursor()** — var _ pagination.Item = (*Event)(nil); Cursor() switches on Event.SortBy (EventSortFieldIngestedAt/StoredAt/Time) and pairs the matching timestamp with StoreRowID as the keyset tiebreak. (`case streaming.EventSortFieldIngestedAt: return pagination.NewCursor(e.IngestedAt, e.StoreRowID)`) +**Cursor column must match query ORDER BY** — SortBy on the Event must be the same column used to build the streaming query, or keyset pagination loses/duplicates rows. The adapter must propagate SortBy onto each returned Event. (`default: // EventSortFieldTime and zero value -> pagination.NewCursor(e.Time, e.StoreRowID)`) +**Time-window and limit bounds are hard constants** — MaximumFromDuration (32 days) and MaximumLimit (100) bound every query; From must be after now-MaximumFromDuration and Limit in [1, MaximumLimit]. (`minimumFrom := time.Now().Add(-MaximumFromDuration)`) +**CustomerID filter supports only $in** — ListEventsV2Params.Validate rejects a CustomerID FilterString that is non-empty but has In == nil. (`if !p.CustomerID.IsEmpty() && p.CustomerID.In == nil { errs = append(errs, errors.New("customer id filter supports only in")) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service interface, Event type, ListEventsParams/ListEventsV2Params with Validate(), MaximumFromDuration/MaximumLimit constants, and Event.Cursor(). | Event.Cursor() must stay in sync with the streaming ORDER BY; adding a new EventSortField requires a new switch case and SortBy.Validate() acceptance. | +| `service_test.go` | Table-driven tests for ListEventsV2Params.Validate and Event.Cursor across all SortBy values. | Cursor tests assert StoreRowID is always the tiebreak ID regardless of SortBy; keep that invariant when editing Cursor(). | + +## Anti-Patterns + +- Returning an error from list when a single event fails validation/customer-lookup instead of attaching to Event.ValidationErrors. +- Letting Event.SortBy diverge from the column the adapter sorted by — breaks keyset pagination. +- Allowing a CustomerID FilterString with Eq (anything other than In) through Validate. +- Skipping params.Validate() at the top of a Service method. +- Bypassing the 32-day / limit-100 bounds when adding new query paths. + +## Decisions + +- **Events are read from the streaming store and enriched (customer-ID, meter validation) in the adapter, not in the streaming layer.** — Keeps streaming.Connector domain-agnostic; meterevent owns the enriched Event shape and per-event validation semantics. +- **Two list methods (v1 slice, v2 cursor) coexist on one interface.** — v1 is the legacy ingested-event listing; v2 adds AIP-style FilterString/FilterTime filters and keyset pagination without breaking v1 callers. + +## Example: Cursor selection keyed on SortBy + +``` +func (e Event) Cursor() pagination.Cursor { + switch e.SortBy { + case streaming.EventSortFieldIngestedAt: + return pagination.NewCursor(e.IngestedAt, e.StoreRowID) + case streaming.EventSortFieldStoredAt: + return pagination.NewCursor(e.StoredAt, e.StoreRowID) + default: + return pagination.NewCursor(e.Time, e.StoreRowID) + } +} +``` + + diff --git a/openmeter/meterevent/adapter/CLAUDE.md b/openmeter/meterevent/adapter/CLAUDE.md new file mode 100644 index 0000000000..4be9d456f2 --- /dev/null +++ b/openmeter/meterevent/adapter/CLAUDE.md @@ -0,0 +1,57 @@ +# adapter + + + +> Adapter implementation of meterevent.Service: reads raw events from the streaming.Connector (ClickHouse) and post-processes them into enriched meterevent.Event values (customer-ID resolution + meter validation). This is a read-only query layer, not an Ent/Postgres adapter. + +## Patterns + +**Constructor returns the domain Service interface** — New(streamingConnector, customerService, meterService) returns meterevent.Service; the concrete *adapter is unexported and asserted with `var _ meterevent.Service = (*adapter)(nil)`. (`func New(streamingConnector streaming.Connector, customerService customer.Service, meterService meter.Service) meterevent.Service`) +**Validate params at the top of every Service method** — Each public method calls params.Validate() first and wraps failures in models.NewGenericValidationError(fmt.Errorf("validate input: %w", err)) before any I/O. (`if err := params.Validate(); err != nil { return ..., models.NewGenericValidationError(fmt.Errorf("validate input: %w", err)) }`) +**Translate domain params to streaming params, never query streaming directly with domain types** — ListEvents/ListEventsV2 build streaming.ListEventsParams / streaming.ListEventsV2Params field-by-field, then call a.streamingConnector. CustomerID filters are resolved to []streaming.Customer via listCustomers before passing down. (`listParams := streaming.ListEventsV2Params{Namespace: params.Namespace, Cursor: params.Cursor, ...}`) +**Shared eventPostProcess pipeline** — Both list methods funnel raw events through eventPostProcess: mapEventsToMeterEvents -> enrichEventsWithCustomerID -> validateEvents. Add new per-event enrichment as a step here, not inline in list methods. (`meterEvents := mapEventsToMeterEvents(rawEvents); meterEvents, err = a.enrichEventsWithCustomerID(...); meterEvents, err = a.validateEvents(...)`) +**Validation errors are collected on the event, not returned** — validateEvents appends to event.ValidationErrors (no meter match, parse failure, missing customer) instead of failing the whole list; the event is still returned so the API can surface per-event ValidationError. (`validationErrors = append(validationErrors, fmt.Errorf("no meter found for event type: %s", event.Type)); event.ValidationErrors = validationErrors`) +**Cursor pagination only emits NextCursor on a full page** — ListEventsV2 propagates listParams.SortBy onto each Event so Event.Cursor() matches the ORDER BY, and only sets result.NextCursor when len(meterEvents) == effectiveLimit (lo.FromPtrOr(params.Limit, meterevent.MaximumLimit)). (`if len(meterEvents) > 0 && len(meterEvents) == effectiveLimit { cursor := meterEvents[len(meterEvents)-1].Cursor(); result.NextCursor = &cursor }`) +**Missing-customer lookups are tolerated, not fatal** — enrichEventsWithCustomerID treats models.IsGenericNotFoundError from GetCustomerByUsageAttribution as 'leave CustomerID nil' (later flagged in validateEvents); only non-not-found errors abort. (`if models.IsGenericNotFoundError(err) { eventsWithCustomerID = append(eventsWithCustomerID, event); continue }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Defines the unexported adapter struct, its three injected dependencies, the New constructor, and the meterevent.Service compile-time assertion. | Return meterevent.Service (not *adapter) from New; keep the `var _ meterevent.Service = (*adapter)(nil)` assertion when adding methods. | +| `event.go` | All Service method bodies: ListEvents (v1), ListEventsV2 (cursor-paginated), plus helpers listCustomers, eventPostProcess, mapEventsToMeterEvents, validateEvents, enrichEventsWithCustomerID. | enrichEventsWithCustomerID has a FIXME: it queries the customer service per-event (only cached by subject) — do not amplify N+1 lookups; meter validation iterates all meters per event. | + +## Anti-Patterns + +- Querying streaming.Connector with domain (meterevent) param types instead of building streaming.ListEventsParams / ListEventsV2Params. +- Returning an error from validateEvents/enrich when a single event fails validation or has no customer — failures belong in event.ValidationErrors. +- Setting NextCursor unconditionally or forgetting to propagate SortBy onto events, which desynchronizes Event.Cursor() from the query ORDER BY. +- Skipping params.Validate() or not wrapping its error in models.NewGenericValidationError. +- Treating a not-found customer in enrichEventsWithCustomerID as a hard error instead of leaving CustomerID nil. + +## Decisions + +- **Customer-ID resolution and meter validation are done in the adapter post-process rather than the streaming layer.** — Streaming (ClickHouse) only stores raw CloudEvents; customer attribution and meter schema validation require the customer and meter services, keeping the streaming connector domain-agnostic. +- **Validation issues are attached per-event (ValidationErrors) instead of short-circuiting the list.** — Event listing is a debugging/observability surface; users need to see invalid events alongside valid ones with their specific failure reasons. + +## Example: Adapter list method: validate, map domain->streaming params, query, post-process + +``` +func (a *adapter) ListEventsV2(ctx context.Context, params meterevent.ListEventsV2Params) (pagination.Result[meterevent.Event], error) { + if err := params.Validate(); err != nil { + return pagination.Result[meterevent.Event]{}, models.NewGenericValidationError(fmt.Errorf("validate input: %w", err)) + } + listParams := streaming.ListEventsV2Params{Namespace: params.Namespace, Cursor: params.Cursor, Limit: params.Limit, /* ... */} + events, err := a.streamingConnector.ListEventsV2(ctx, listParams) + if err != nil { + return pagination.Result[meterevent.Event]{}, fmt.Errorf("query events: %w", err) + } + meterEvents, err := a.eventPostProcess(ctx, params.Namespace, events) + if err != nil { + return pagination.Result[meterevent.Event]{}, fmt.Errorf("post process events: %w", err) + } + return pagination.Result[meterevent.Event]{Items: meterEvents}, nil +} +``` + + diff --git a/openmeter/meterevent/httphandler/CLAUDE.md b/openmeter/meterevent/httphandler/CLAUDE.md new file mode 100644 index 0000000000..523bacbccf --- /dev/null +++ b/openmeter/meterevent/httphandler/CLAUDE.md @@ -0,0 +1,60 @@ +# httphandler + + + +> HTTP transport layer for the meterevent domain: exposes ListEvents (v1) and ListEventsV2 (cursor-paginated) handlers that decode api.* params into meterevent.Service inputs, call the service, and encode meterevent.Event into api.IngestedEvent (CloudEvents). + +## Patterns + +**httptransport.NewHandlerWithArgs three-stage handler** — Each handler is built from (decode request, business call, encoder) plus options. Decode resolves namespace via h.resolveNamespace(ctx); encode uses commonhttp.JSONResponseEncoderWithStatus[...](http.StatusOK); options append httptransport.WithOperationName(...). (`httptransport.NewHandlerWithArgs(decodeFn, func(ctx, req) (Resp, error){ ... h.metereventService.ListEventsV2(ctx, params) }, commonhttp.JSONResponseEncoderWithStatus[Resp](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("listEventsV2"))...)`) +**Handler interface + unexported struct + New constructor** — handler.go declares Handler (composed of EventHandler), the unexported handler struct with namespaceDecoder/options/metereventService, a `var _ Handler = (*handler)(nil)` assertion, and New(...) returning Handler. (`type Handler interface { EventHandler }; var _ Handler = (*handler)(nil)`) +**Type aliases tie api types to handler signatures** — Each handler file aliases Request/Response/Params/Handler types, e.g. ListEventsV2Request = meterevent.ListEventsV2Params, ListEventsV2Response = api.IngestedEventCursorPaginatedResponse, keeping decode/encode signatures explicit. (`type ( ListEventsV2Request = meterevent.ListEventsV2Params; ListEventsV2Response = api.IngestedEventCursorPaginatedResponse )`) +**Namespace resolved from context, never from request body** — resolveNamespace(ctx) reads namespaceDecoder.GetNamespace(ctx); a missing namespace yields commonhttp.NewHTTPError(http.StatusInternalServerError, ...). All decode functions call it first. (`ns, err := h.resolveNamespace(ctx); if err != nil { return ListEventsV2Request{}, err }`) +**api<->domain mapping isolated in mapping.go via apiconverter** — convertListEventsV2Params uses apiconverter.ConvertCursorPtr/ConvertStringPtr/ConvertIDExactPtr/ConvertTimePtr; convertEvent builds a CloudEvents event.New() and convertListEventsV2Response wraps items + NextCursor via events.NextCursor.EncodePtr(). (`p.CustomerID = apiconverter.ConvertIDExactPtr(params.Filter.CustomerId); p.Time = apiconverter.ConvertTimePtr(params.Filter.Time)`) +**Per-event validation errors flow to api.IngestedEvent.ValidationError** — convertEvent joins e.ValidationErrors into a single *string via lo.EmptyableToPtr(errors.Join(...).Error()) so the service's collected validation issues surface in the response without failing the call. (`if len(e.ValidationErrors) > 0 { validationError = lo.EmptyableToPtr(errors.Join(e.ValidationErrors...).Error()) }`) +**v1 defaults applied in the decode function** — ListEvents decode applies defaults: From defaults to time.Now().Add(-meterevent.MaximumFromDuration).Add(time.Second) and Limit to meterevent.MaximumLimit via lo.FromPtrOr. (`From: lo.FromPtrOr(params.From, minimumFrom), Limit: lo.FromPtrOr(params.Limit, meterevent.MaximumLimit)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/EventHandler interfaces, handler struct, New constructor, resolveNamespace helper. | Add new endpoint methods to EventHandler and keep the `var _ Handler = (*handler)(nil)` assertion; resolveNamespace returns 500 (internal) on missing namespace, not 400. | +| `event.go` | ListEvents (v1) handler: applies From/Limit defaults, calls ListEvents, converts each event via convertEvent into []api.IngestedEvent. | minimumFrom adds an extra second to dodge validation; conversion errors abort the whole response. | +| `event_v2.go` | ListEventsV2 (cursor) handler: decodes via convertListEventsV2Params (wrapping errors in models.NewGenericValidationError), encodes via convertListEventsV2Response. | Decode-stage conversion errors must be wrapped as NewGenericValidationError (400); business-stage errors are returned raw. | +| `mapping.go` | All api<->domain conversion: convertListEventsV2Params, convertEvent (CloudEvents construction + JSON data unmarshal), convertListEventsV2Response. | convertEvent only sets data when e.Data != "" and json.Unmarshals it; use apiconverter.* helpers for pointer/cursor/id/time conversions rather than hand-rolling. | + +## Anti-Patterns + +- Calling the streaming connector or building business logic in the handler — handlers only decode/encode and delegate to meterevent.Service. +- Reading namespace from request params instead of resolveNamespace(ctx)/namespaceDecoder. +- Failing the request when an event has validation errors instead of surfacing them via api.IngestedEvent.ValidationError. +- Hand-writing api<->domain field conversion inline instead of using apiconverter helpers in mapping.go. +- Omitting httptransport.WithOperationName, breaking telemetry/operation naming. + +## Decisions + +- **v1 (ListEvents -> []IngestedEvent) and v2 (ListEventsV2 -> IngestedEventCursorPaginatedResponse) are separate handlers/files with separate type aliases.** — v2 introduces cursor pagination and a Filter object; keeping them split avoids overloading one decode path and lets each evolve independently. +- **Events are serialized as CloudEvents (event.New()) embedded in api.IngestedEvent.** — OpenMeter ingests CloudEvents; the listing API returns the original event envelope plus enrichment (CustomerId, IngestedAt, StoredAt, ValidationError). + +## Example: Cursor-paginated handler wiring with namespace resolve, validation-wrapped decode, and mapping helpers + +``` +func (h *handler) ListEventsV2() ListEventsV2Handler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params ListEventsV2Params) (ListEventsV2Request, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { + return ListEventsV2Request{}, err + } + p, err := convertListEventsV2Params(params, ns) + if err != nil { + return ListEventsV2Request{}, models.NewGenericValidationError(err) + } + return p, nil + }, + func(ctx context.Context, params ListEventsV2Request) (ListEventsV2Response, error) { + events, err := h.metereventService.ListEventsV2(ctx, params) +// ... +``` + + diff --git a/openmeter/meterexport/CLAUDE.md b/openmeter/meterexport/CLAUDE.md new file mode 100644 index 0000000000..84b4bf0252 --- /dev/null +++ b/openmeter/meterexport/CLAUDE.md @@ -0,0 +1,46 @@ +# meterexport + + + +> Domain root for exporting/replaying meter data: defines the meterexport.Service interface that re-queries existing meter values and re-emits them as synthetic, pre-aggregated streaming.RawEvent records (one event per WindowSize). The single child (service) holds the channel/errgroup streaming implementation. + +## Patterns + +**Service interface + config/param types at root** — service.go declares the Service interface (GetTargetMeterDescriptor, ExportSyntheticMeterData, ExportSyntheticMeterDataIter), TargetMeterDescriptor, DataExportConfig, and DataExportParams. The concrete impl lives in package meterexportservice. (`type Service interface { GetTargetMeterDescriptor(...); ExportSyntheticMeterData(...); ExportSyntheticMeterDataIter(...) }`) +**Streaming export via channels, errors out-of-band** — ExportSyntheticMeterData(ctx, params, result chan<- streaming.RawEvent, err chan<- error) returns an error only if it fails to START; per-item failures go on the err channel and callers cancel ctx to stop. (`ExportSyntheticMeterData(ctx, params, result chan<- streaming.RawEvent, err chan<- error) error`) +**Iterator wrapper mirrors the channel API** — ExportSyntheticMeterDataIter returns iter.Seq2[streaming.RawEvent, error]; breaking the range loop auto-cancels the operation and errors are yielded inline with a zero-valued event. (`for event, err := range seq { if err != nil { ... } process(event) }`) +**Config/Params validate by accumulation** — DataExportConfig.Validate and DataExportParams.Validate collect into var errs []error and return errors.Join(errs...); Params embeds DataExportConfig and adds a timeutil.StartBoundedPeriod. (`if c.ExportWindowSize == "" { errs = append(errs, errors.New("export window size is required")) }`) +**Timezone-aware JSON via custom Marshal/Unmarshal** — DataExportConfig has explicit MarshalJSON/UnmarshalJSON that serialize *time.Location as its IANA name string (empty => nil) using the dataExportConfigJSON shadow struct. (`if raw.ExportWindowTimeZone != "" { loc, err := time.LoadLocation(raw.ExportWindowTimeZone); ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service interface, TargetMeterDescriptor, DataExportConfig/DataExportParams with Validate() and JSON marshalling. | ExportWindowTimeZone is a *time.Location; nil marshals to "" and does NOT round-trip back to a non-nil location. Only SUM and COUNT meters are supported; GroupBy/Customers not honored. | +| `service_test.go` | JSON round-trip and UnmarshalJSON tests for DataExportConfig, including the invalid-timezone error path. | Round-trip assertions skip the nil-timezone case on purpose; preserve that when changing marshalling. | + +## Anti-Patterns + +- Returning a runtime error from the export mid-stream instead of sending it to the err channel. +- Closing the result/err channels anywhere other than the producer's top-level defer. +- Adding GroupBy/Customer/ClientID query support without honoring the documented unsupported-param rejects. +- Assuming a nil ExportWindowTimeZone round-trips through JSON (it serializes to empty and decodes to nil). + +## Decisions + +- **Export is streamed via channels + errgroup rather than collecting a slice.** — Meters can hold huge event volumes; pre-aggregating one event per WindowSize and streaming avoids buffering the entire reconstruction in memory. +- **Both a channel API and an iter.Seq2 wrapper are exposed.** — The channel form gives callers explicit lifecycle/cancellation control; the iterator form is ergonomic for simple range-loop consumers with inline error handling. + +## Example: Streaming export interface signature + +``` +// per-item errors go to the err channel; a returned error only means start failed +ExportSyntheticMeterData( + ctx context.Context, + params DataExportParams, + result chan<- streaming.RawEvent, + err chan<- error, +) error +``` + + diff --git a/openmeter/meterexport/service/CLAUDE.md b/openmeter/meterexport/service/CLAUDE.md new file mode 100644 index 0000000000..596ddc80df --- /dev/null +++ b/openmeter/meterexport/service/CLAUDE.md @@ -0,0 +1,62 @@ +# service + + + +> Concrete implementation (package meterexportservice) of the meterexport.Service interface. It re-queries existing meter values and re-emits them as synthetic streaming.RawEvent records, used to backfill/replay meter data into a target meter via a streaming, channel-based pipeline. + +## Patterns + +**Config-validated constructor returning interface conformance** — New(Config) validates required deps via Config.validate() before returning *service; package asserts var _ meterexport.Service = (*service)(nil). (`func New(config Config) (*service, error) { if err := config.validate(); err != nil { return nil, err }; return &service{Config: config}, nil }`) +**Channel-based streaming with deferred close by producer** — Exported export methods and funnel own their output channels and close them via a top-of-function defer (close(resultCh); close(errCh)). The function returns an error only for start-up failures; runtime errors go to errCh. (`func (s *service) funnel(...) error { defer func(){ close(resultCh); close(errCh) }(); ... }`) +**Producer/consumer split via errgroup** — ExportSyntheticMeterData uses errgroup.WithContext: one g.Go consumes meter.MeterQueryRow from meterRowCh and converts to events, another g.Go runs funnel as producer. g.Wait() joins them. (`g, ctx := errgroup.WithContext(ctx); g.Go(consumer); g.Go(func() error { return s.funnel(...) }); g.Wait()`) +**Single context-cancellation report via sync.Once** — Because both funnel and consumer can observe ctx.Done(), sendCtxErr is guarded by sync.Once so exactly one context.Canceled/DeadlineExceeded reaches errCh. Consumer filters context errors out of meterRowErrCh and relies on sendCtxErr instead. (`var sendCtxErrOnce sync.Once; sendCtxErr := func(){ sendCtxErrOnce.Do(func(){ if err := ctx.Err(); err != nil { errCh <- err } }) }`) +**Validate-then-fetch shared helper** — validateAndGetMeter(config) centralizes config.Validate(), meter lookup via MeterService.GetMeterByIDOrSlug, aggregation guard (only Sum/Count), and TargetMeterDescriptor construction. GetTargetMeterDescriptor and ExportSyntheticMeterData both call it. (`m, descriptor, err := s.validateAndGetMeter(ctx, config)`) +**Batched time-window iteration capped at TARGET_ROWS_PER_QUERY** — funnel walks [from,to) in slices computed by iterateQueryTime, advancing windowSize.AddTo up to TARGET_ROWS_PER_QUERY (500) windows per QueryMeter call, clamping to params.To. (`queryTo, err := iterateQueryTime(queryFrom, params.queryParams.To, *params.queryParams.WindowSize)`) +**Iterator wrapper cancels underlying op on early break** — ExportSyntheticMeterDataIter validates upfront, then returns an iter.Seq2[streaming.RawEvent, error] backed by a cancellable context; a failed yield returns and defer cancel() stops the goroutine-driven export. (`ctx, cancel := context.WithCancel(ctx); defer cancel(); if !yield(event, nil) { return }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines Config (EventSourceGroup, StreamingConnector, MeterService), service struct embedding Config, New constructor, and the meterexport.Service interface assertion. | All three Config fields are required; New returns error if any is missing. Keep the var _ meterexport.Service assertion satisfied when adding interface methods. | +| `syntheticdata.go` | Core export: validateAndGetMeter, GetTargetMeterDescriptor, ExportSyntheticMeterData (errgroup producer/consumer), createEventFromMeterRow, and SUM_VALUE_PROPERTY_KEY const. | Only Sum/Count aggregations are supported; both map to a SUM descriptor with ValueProperty 'value'. Event Source is fmt.Sprintf("%s:%s/%s", EventSourceGroup, ns, id). Do not break the sendCtxErr sync.Once guard or you'll emit duplicate context errors. | +| `funnel.go` | Producer: funnelParams + validation, funnel() streaming meter query loop, iterateQueryTime time-window stepper, TARGET_ROWS_PER_QUERY const. | funnelParams.validate rejects unsupported params (ClientID, FilterCustomer, FilterGroupBy) and requires From + WindowSize. funnel checks ctx.Err() each iteration and pushes to errCh then returns nil (no return error mid-stream). | +| `syntheticdata_iter.go` | Ergonomic iter.Seq2 wrapper over ExportSyntheticMeterData with early-break cancellation and result/error interleaving plus a startupErrCh. | Drains both resultCh and errCh on close to avoid dropping tail events/errors; nils out startupErrCh after close to stop reselecting it. | +| `service_test.go` | Table-driven tests using MockMeterService and testutils.NewMockStreamingConnector/AddSimpleEvent; covers SUM/COUNT export, unsupported-aggregation rejection, validation, not-found, context cancellation (exactly-one context.Canceled), and New validation. | Context-cancellation tests assert contextCanceledCount == 1 — regressions in sendCtxErr's sync.Once will fail here. Mock streaming events are matched by MeterSlug == meter.Key. | + +## Anti-Patterns + +- Closing resultCh/errCh anywhere other than the producer's top-level defer — double-close panics or leaks. +- Returning a runtime error from funnel/export mid-stream instead of sending it to errCh — callers consume errors off the channel, not the return value. +- Bypassing validateAndGetMeter and querying the meter directly — skips the Sum/Count aggregation guard and descriptor construction. +- Removing the sendCtxErr sync.Once guard or letting both funnel and consumer push ctx.Err() to errCh — produces duplicate context.Canceled reports. +- Adding support for ClientID/FilterCustomer/FilterGroupBy query params without removing the explicit rejects in validateUnsupportedParams. + +## Decisions + +- **Stream via channels + errgroup rather than collecting a slice.** — Exports can span large time ranges (funnel batches 500 windows per query); streaming bounds memory and lets callers backpressure or cancel mid-flight. +- **Normalize Sum and Count source meters to a single SUM target descriptor with value property 'value'.** — Both aggregations can be replayed as additive SUM events, so a synthetic target meter only needs one value-bearing property; other aggregations are rejected up front. +- **Provide both a channel API (ExportSyntheticMeterData) and an iter.Seq2 wrapper (ExportSyntheticMeterDataIter).** — The channel form integrates with worker pipelines; the iterator form gives ergonomic range-over-func consumption with automatic cancellation on early break. + +## Example: Producer/consumer export with single-shot context error reporting + +``` +g, ctx := errgroup.WithContext(ctx) +var sendCtxErrOnce sync.Once +sendCtxErr := func() { sendCtxErrOnce.Do(func() { if err := ctx.Err(); err != nil { errCh <- err } }) } +g.Go(func() error { + for { + select { + case <-ctx.Done(): sendCtxErr(); return nil + case row, ok := <-meterRowCh: + if !ok { sendCtxErr(); return nil } + event, err := s.createEventFromMeterRow(m, row) + if err != nil { errCh <- fmt.Errorf("create event from meter row: %w", err); continue } + resultCh <- event + } + } +}) +// ... +``` + + diff --git a/openmeter/namespace/CLAUDE.md b/openmeter/namespace/CLAUDE.md new file mode 100644 index 0000000000..ead06685bd --- /dev/null +++ b/openmeter/namespace/CLAUDE.md @@ -0,0 +1,50 @@ +# namespace + + + +> Foundational tenancy package: defines the Manager that fans namespace create/delete across registered Handlers (one per component) plus the namespacedriver seam that resolves the active tenant from request context. Imported by nearly every httpdriver, so it must stay dependency-light. + +## Patterns + +**Manager fans out to registered Handlers** — Manager.CreateNamespace/DeleteNamespace iterate config.Handlers, calling each Handler.CreateNamespace/DeleteNamespace and joining errors. Components register via RegisterHandler. (`for _, handler := range m.config.Handlers { err := handler.CreateNamespace(ctx, name); ... }`) +**Handler is a two-method per-component interface** — Each component that owns namespace-scoped state implements Handler{CreateNamespace, DeleteNamespace}; an empty name means the default namespace. (`type Handler interface { CreateNamespace(ctx, name) error; DeleteNamespace(ctx, name) error }`) +**Constructor + invariant guards** — NewManager requires a non-empty DefaultNamespace and rejects nil handlers; CreateNamespace rejects empty names; DeleteNamespace refuses to delete the default namespace. (`if name == m.config.DefaultNamespace { return errors.New("cannot delete default namespace") }`) +**Handler list guarded by RWMutex** — config.Handlers is read under m.mu.RLock during create/delete and written under m.mu.Lock in RegisterHandler, so registration is safe to call after construction. (`m.mu.RLock(); defer m.mu.RUnlock()`) +**Errors joined, not short-circuited** — createNamespace/deleteNamespace collect each handler's error and return errors.Join(errs...) so one failing component does not skip the others (resiliency TODO noted in code). (`errs = append(errs, err); ... return errors.Join(errs...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `namespace.go` | Manager, ManagerConfig, Handler interface, and CreateNamespace/DeleteNamespace/CreateDefaultNamespace/RegisterHandler orchestration. | No rollback/retry yet (TODO); a partial failure across handlers leaves namespaces half-created. The default namespace cannot be deleted. | +| `namespace_test.go` | Tests Manager create/delete/register fan-out using an in-memory fakeHandler. | fakeHandler guards its map with a mutex; keep handler implementations concurrency-safe. | + +## Anti-Patterns + +- Adding domain/DB/auth dependencies to this package — it is a leaf imported by nearly every httpdriver and must avoid import cycles. +- Short-circuiting handler iteration on the first error instead of joining all errors. +- Allowing deletion of the configured DefaultNamespace. +- Reading the active namespace from request body/query rather than from context via the namespacedriver decoder. + +## Decisions + +- **Namespace creation is orchestrated through per-component Handlers registered on a central Manager.** — Each component (billing, entitlement, etc.) provisions its own namespace-scoped state; the Manager decouples the orchestration from the components. +- **namespacedriver exposes namespace resolution as a one-method NamespaceDecoder interface returning (string, bool).** — Handlers depend on the interface so the source of the namespace (static config today, auth-derived later) can change without touching every httpdriver. + +## Example: Fan-out create with joined errors + +``` +func (m *Manager) createNamespace(ctx context.Context, name string) error { + var errs []error + m.mu.RLock() + defer m.mu.RUnlock() + for _, handler := range m.config.Handlers { + if err := handler.CreateNamespace(ctx, name); err != nil { + errs = append(errs, err) + } + } + return errors.Join(errs...) +} +``` + + diff --git a/openmeter/namespace/namespacedriver/CLAUDE.md b/openmeter/namespace/namespacedriver/CLAUDE.md new file mode 100644 index 0000000000..859a051ad6 --- /dev/null +++ b/openmeter/namespace/namespacedriver/CLAUDE.md @@ -0,0 +1,49 @@ +# namespacedriver + + + +> Defines the NamespaceDecoder seam that every HTTP driver/handler uses to resolve the active tenant namespace from a request context, decoupling handlers from how the namespace is determined (static config today, auth-derived later). + +## Patterns + +**Single-method decoder interface** — NamespaceDecoder exposes exactly one method GetNamespace(ctx) (string, bool); the bool reports presence rather than returning an error. Handlers consume the interface, never a concrete type. (`ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { /* reject */ }`) +**Depend on interface, inject concrete** — Downstream httpdrivers store a namespacedriver.NamespaceDecoder field; wiring (app/common/namespace.go, openmeter/server/router) supplies the concrete StaticNamespaceDecoder. (`namespaceDecoder namespacedriver.NamespaceDecoder // field type is the interface`) +**Context-only input** — Resolution takes only context.Context. The namespace is expected to be carried in/derived from ctx, not passed as request parameters. (`func (d StaticNamespaceDecoder) GetNamespace(ctx context.Context) (string, bool)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `decoder.go` | Declares the NamespaceDecoder interface and the StaticNamespaceDecoder string implementation that always returns its configured namespace with ok=true. | StaticNamespaceDecoder ignores ctx and never returns ok=false; do not rely on it to reject missing namespaces. Keep this package dependency-free (only stdlib context) since ~25 httpdrivers import it. | + +## Anti-Patterns + +- Adding domain, DB, or auth dependencies to this package — it must stay a leaf imported by every httpdriver without cycles. +- Returning an error instead of the (string, bool) contract from GetNamespace implementations. +- Having handlers branch on the concrete StaticNamespaceDecoder type instead of the NamespaceDecoder interface. +- Reading the namespace from request body/query params here rather than from context. + +## Decisions + +- **Model namespace resolution as a one-method interface in its own tiny package.** — Lets a static, config-driven namespace be swapped for an auth/tenant-derived one later without touching the many httpdrivers that depend on it. +- **Use (string, bool) instead of (string, error).** — Absence of a namespace is a normal control-flow case for handlers, not an exceptional one; the bool keeps call sites terse. + +## Example: Resolving the namespace in an HTTP handler + +``` +import "github.com/openmeterio/openmeter/openmeter/namespace/namespacedriver" + +type handler struct { + namespaceDecoder namespacedriver.NamespaceDecoder +} + +func (h *handler) resolveNamespace(ctx context.Context) (string, error) { + ns, ok := h.namespaceDecoder.GetNamespace(ctx) + if !ok { + return "", fmt.Errorf("namespace not found") + } + return ns, nil +} +``` + + diff --git a/openmeter/notification/CLAUDE.md b/openmeter/notification/CLAUDE.md new file mode 100644 index 0000000000..55c7b52a81 --- /dev/null +++ b/openmeter/notification/CLAUDE.md @@ -0,0 +1,65 @@ +# notification + + + +> Root of the notification domain: declares the notification.Service and notification.Repository contracts, the channel/rule/event/eventpayload/deliverystatus domain models, the EventType catalog, and the EventHandler dispatch contract. Children implement persistence (adapter), Kafka consumption (consumer), HTTP transport (httpdriver), async delivery (eventhandler), and Svix webhooks (webhook). + +## Patterns + +**Every input is a models.Validator + CustomValidator pair** — Each *Input struct declares both `_ models.Validator` and `_ models.CustomValidator[T]` assertions, implements ValidateWith(...) delegating to models.Validate(i, validators...), and a Validate() that collects into `var errs []error` then returns models.NewNillableGenericValidationError(errors.Join(errs...)). (`func (i CreateChannelInput) Validate() error { var errs []error; if i.Namespace == "" { errs = append(errs, errors.New("namespace is required")) }; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Discriminated union types keyed by EventType/ChannelType** — ChannelConfig, RuleConfig, and EventPayload are union structs embedding a *Meta with a Type field; Validate() switches on Type and dispatches to the matching sub-config (BalanceThreshold/EntitlementReset/Invoice). (`switch c.Type { case EventTypeBalanceThreshold: if c.BalanceThreshold == nil { return models.NewGenericValidationError(...) }; return c.BalanceThreshold.Validate() ... }`) +**EventType registered in the central eventTypes slice** — New event types must be appended to the `eventTypes` var in event.go; EventType.Validate()/Values() derive from it via lo.Contains/lo.Map, and every union Validate() switch must gain a matching case. (`var eventTypes = []EventType{EventTypeBalanceThreshold, EventTypeEntitlementReset, EventTypeInvoiceCreated, EventTypeInvoiceUpdated}`) +**Repository composes entutils.TxCreator + sub-repos** — notification.Repository embeds entutils.TxCreator and the Channel/Rule/Event sub-repository interfaces; Service composes FeatureService + Channel/Rule/EventService. Keep CRUD method sets symmetric across Repository and Service. (`type Repository interface { entutils.TxCreator; ChannelRepository; RuleRepository; EventRepository }`) +**Typed domain errors, not raw ent errors** — Surface NotFoundError{NamespacedID} and UpdateAfterDeleteError from errors.go; these are mapped to HTTP codes by httpdriver. Returning untyped errors degrades to 500. (`func (e NotFoundError) Error() string { return fmt.Sprintf("resource with id %s not found in %s namespace", e.ID, e.Namespace) }`) +**Annotations carry cross-cutting routing/dedupe metadata** — annotations.go defines string keys (AnnotationEventFeatureKey, AnnotationBalanceEventDedupeHash, AnnotationEventInvoiceID, etc.); consumer/adapter store these on Event.Annotations and query them via JSONB. Add new keys here, never inline string literals. (`AnnotationBalanceEventDedupeHash = "event.balance.dedupe.hash"`) +**Channel-set diffing via NewChannelIDsDifference** — Rule channel-assignment changes are computed with NewChannelIDsDifference(new, old) (built on lo.Difference) exposing Additions()/Removals(); the service uses this to mirror changes to Svix. (`diff := NewChannelIDsDifference(newChannels, oldChannels); diff.Additions(); diff.Removals()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Declares Service/ChannelService/RuleService/EventService/FeatureService interfaces and OrderBy constants. Source of truth for the service contract. | Adding a method here means updating the service/ implementation and (usually) httpdriver. | +| `repository.go` | Declares Repository = TxCreator + Channel/Rule/Event sub-repos. | Method sets must mirror the corresponding Service methods; adapter must implement all. | +| `event.go` | Event domain model, the eventTypes registry, ListEventsInput with dedup/delivery-status filters. | Forgetting to register a new EventType in `eventTypes` makes Validate() reject it everywhere. | +| `channel.go / rule.go` | Channel/Rule models + ChannelConfig/RuleConfig unions + CRUD inputs. MaxChannelsPerRule=5 lives in rule.go. | Adding a config variant requires a new union field plus a Validate() switch case in both the config and its payload. | +| `eventpayload.go` | EventPayload union + EventPayloadVersionCurrent versioning + AsRawPayload marshaling. | Bump/handle EventPayloadVersionCurrent when changing payload shape; every payload type needs a Validate() switch case. | +| `deliverystatus.go` | EventDeliveryStatus state machine enum (PENDING/SENDING/RESENDING/SUCCESS/FAILED) + attempt records + Update/List/Get inputs. | New states must be added to Validate()/Values() and handled by eventhandler's reconcile switch. | +| `entitlements.go / invoice.go` | Entitlement (balance threshold, reset) and invoice event types, payloads, rule configs, plus ValidateRuleConfigWithFeatures (resolves features via FeatureService). | Threshold value bounds differ per type (BalanceValue allows 0, others must be >0). | +| `errors.go` | NotFoundError, UpdateAfterDeleteError domain errors consumed by httpdriver's error encoder. | Unregistered new error types fall through to HTTP 500. | + +## Anti-Patterns + +- Returning on the first invalid field instead of collecting into errs and joining with errors.Join + NewNillableGenericValidationError. +- Adding an EventType, ChannelType, or config variant without updating its registry/Values() and every discriminated-union Validate() switch. +- Inlining annotation key string literals instead of adding a constant to annotations.go. +- Returning raw ent/db errors instead of notification.NotFoundError / UpdateAfterDeleteError (breaks HTTP status mapping). +- Letting Service and Repository method sets drift apart, or skipping the Validator/CustomValidator assertion pair on a new *Input type. + +## Decisions + +- **Channel/Rule configs and payloads are discriminated unions keyed by Type rather than separate interfaces.** — A single struct serializes cleanly to JSON and to the DB while a Type-switch keeps validation and mapping centralized. +- **EventPayload carries an explicit integer version (EventPayloadVersionCurrent).** — Stored events outlive code; versioning lets the delivery/reconcile path evolve payload shape without breaking historical events. +- **Annotation-driven dedup/routing keys live in the domain root (annotations.go).** — Consumer dedup logic and adapter JSONB queries share the same key constants, avoiding drift between producer and storage layers. + +## Example: Discriminated-union Validate with collected errors (the dominant pattern across this package) + +``` +func (c RuleConfig) Validate() error { + switch c.Type { + case EventTypeBalanceThreshold: + if c.BalanceThreshold == nil { + return models.NewGenericValidationError(errors.New("missing balance threshold rule config")) + } + return c.BalanceThreshold.Validate() + case EventTypeInvoiceCreated, EventTypeInvoiceUpdated: + if c.Invoice == nil { + return models.NewGenericValidationError(errors.New("missing invoice rule config")) + } + return c.Invoice.Validate() + default: + return models.NewGenericValidationError(fmt.Errorf("unknown rule type: %s", c.Type)) + } +// ... +``` + + diff --git a/openmeter/notification/adapter/CLAUDE.md b/openmeter/notification/adapter/CLAUDE.md new file mode 100644 index 0000000000..adb97aa5fd --- /dev/null +++ b/openmeter/notification/adapter/CLAUDE.md @@ -0,0 +1,62 @@ +# adapter + + + +> Ent-backed persistence layer for notification channels, rules, events, and delivery statuses. Implements notification.Repository against entdb.Client; all reads/writes are namespace-scoped and transaction-aware. + +## Patterns + +**TransactingRepo wrapper on every method** — Each repository method defines an inner fn(ctx, *adapter) and returns entutils.TransactingRepo(ctx, a, fn) (or TransactingRepoWithNoValue for void). This rebinds the adapter to the tx carried in ctx. (`func (a *adapter) GetChannel(...) (*notification.Channel, error) { fn := func(ctx, a *adapter)(...){...}; return entutils.TransactingRepo(ctx, a, fn) }`) +**Tx/WithTx/Self transaction triad** — adapter implements Tx (HijackTx + entutils.NewTxDriver), WithTx (rebuilds adapter from raw tx config via entdb.NewTxClientFromRawConfig), and Self — the contract entutils.TransactingRepo expects. (`func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }`) +**Soft-delete filtering on list/get** — Channels and rules use SetDeletedAt(clock.Now())+SetDisabled(true) for deletes; queries filter with Or(DeletedAtIsNil(), DeletedAtGT(now)). EagerLoadActiveChannels / EagerLoadRulesWithActiveChannels apply the same predicate to edges. (`channeldb.Or(channeldb.DeletedAtIsNil(), channeldb.DeletedAtGT(clock.Now()))`) +**DB<->domain mapping via *FromDBEntity functions** — All conversion from entdb rows to domain lives in entitymapping.go: ChannelFromDBEntity, RuleFromDBEntity, EventFromDBEntity, EventDeliveryStatusFromDBEntity. Every timestamp is forced .UTC(). (`result = append(result, *ChannelFromDBEntity(*item))`) +**NotFound mapped to notification.NotFoundError** — On entdb.IsNotFound(err), return notification.NotFoundError{NamespacedID:{Namespace, ID}} rather than the raw ent error so the httpdriver error encoder can map it to 404. (`if entdb.IsNotFound(err) { return nil, notification.NotFoundError{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.ID}} }`) +**Annotation JSONB filtering for event queries** — ListEvents filters on annotation keys via entutils.JSONBIn(eventdb.FieldAnnotations, key, values) — used for dedupe hashes, feature/subject key+id, etc. Add new filterable annotations the same way. (`entutils.JSONBIn(eventdb.FieldAnnotations, notification.AnnotationBalanceEventDedupeHash, params.DeduplicationHashes)`) +**Event creation also fans out delivery statuses** — CreateEvent inserts the event, re-fetches the rule with active channels, then CreateBulk a NotificationEventDeliveryStatus (state Pending) per channel, wiring eventRow.Edges manually before mapping. (`q := a.db.NotificationEventDeliveryStatus.Create().SetEventID(eventRow.ID).SetChannelID(channel.ID).SetState(notification.EventDeliveryStatusStatePending)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client,Logger}+Validate, New() returning notification.Repository, and the Tx/WithTx/Self triad | New requires both Client and Logger non-nil; do not fall back to slog.Default(). | +| `entitymapping.go` | All DB->domain mappers + eventPayloadFromJSON which version-gates invoice payloads | eventPayloadFromJSON rejects invoice payloads whose Version != EventPayloadVersionCurrent; preserve UTC() on all timestamps. | +| `event.go` | ListEvents/GetEvent/CreateEvent + EagerLoadRulesWithActiveChannels | CreateEvent must keep delivery-status CreateBulk inside the same fn so it shares the tx; eager-loads must use clock.Now(). | +| `rule.go` | Rule CRUD + EagerLoadActiveChannels; UpdateRule does ClearChannels().AddChannelIDs() | UpdateRule replaces (not merges) channel edges; channel edges are re-queried separately to populate the returned domain object. | +| `channel.go` | Channel CRUD; DeleteChannel is a soft delete (SetDisabled+SetDeletedAt) | Deletes are soft; list excludes deleted channels but GetChannel does not filter deleted. | +| `deliverystatus.go` | List/Get/UpdateEventDeliveryStatus; time bounds forced to UTC | NextAttempt is normalized via lo.ToPtr(...UTC()); uses SetOrClearNextAttemptAt for nil-able field. | +| `entitymapping_test.go` | Guards EventPayload JSON shape and version gating | TestEventPayloadV1JSONShape asserts api.Invoice fields sit flat under invoice.* — embedding/tag regressions break stored JSONB. | + +## Anti-Patterns + +- Calling a.db directly in a method without wrapping in entutils.TransactingRepo/TransactingRepoWithNoValue — loses tx propagation +- Returning raw entdb errors instead of notification.NotFoundError on not-found +- Hard-deleting channels/rules instead of soft-delete (SetDeletedAt+SetDisabled) +- Mapping DB rows inline instead of via the *FromDBEntity functions in entitymapping.go +- Storing non-UTC timestamps or skipping .UTC() in mappers + +## Decisions + +- **Soft-delete with DeletedAt + Disabled rather than physical delete** — Events reference rules/channels historically; physical delete would orphan delivery history and break audit/resend. +- **Annotations stored as JSONB and queried via entutils.JSONBIn** — Lets the consumer dedupe and filter events by feature/subject/dedupe-hash without dedicated columns per dimension. + +## Example: Adding a namespace-scoped repository read with tx propagation and NotFound mapping + +``` +func (a *adapter) GetRule(ctx context.Context, params notification.GetRuleInput) (*notification.Rule, error) { + fn := func(ctx context.Context, a *adapter) (*notification.Rule, error) { + row, err := a.db.NotificationRule.Query(). + Where(ruledb.ID(params.ID), ruledb.Namespace(params.Namespace)). + WithChannels(EagerLoadActiveChannels(clock.Now())).First(ctx) + if err != nil { + if entdb.IsNotFound(err) { + return nil, notification.NotFoundError{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.ID}} + } + return nil, fmt.Errorf("failed to fetch notification rule: %w", err) + } + return RuleFromDBEntity(*row), nil + } + return entutils.TransactingRepo(ctx, a, fn) +} +``` + + diff --git a/openmeter/notification/consumer/CLAUDE.md b/openmeter/notification/consumer/CLAUDE.md new file mode 100644 index 0000000000..3629cb8aa7 --- /dev/null +++ b/openmeter/notification/consumer/CLAUDE.md @@ -0,0 +1,56 @@ +# consumer + + + +> Kafka/Watermill consumer (driven by cmd/notification-service) that subscribes to system events and turns entitlement balance.snapshot, entitlement reset, and standard-invoice created/updated events into notification.Events via the notification.Service. The deduplication logic here is the package's most subtle code. + +## Patterns + +**grouphandler fan-in over typed events** — Consumer.New registers one consumer handler on SystemEventsTopic built from grouphandler.NewNoPublishingHandler with NewGroupEventHandler closures per typed event (snapshot.SnapshotEvent, billing.StandardInvoiceCreatedEvent, billing.StandardInvoiceUpdatedEvent). Each closure nil-checks then delegates to a struct handler. (`grouphandler.NewGroupEventHandler(func(ctx, event *billing.StandardInvoiceCreatedEvent) error { if event==nil {return nil}; return consumer.invoiceHandler.Handle(ctx, event.EventStandardInvoice, notification.EventTypeInvoiceCreated) })`) +**Per-event-type handler structs holding Notification+Logger** — EntitlementSnapshotHandler and InvoiceEventHandler each hold a notification.Service and a *slog.Logger (group-scoped via opts.Logger.WithGroup). Add new event kinds as new handler structs, not new methods on Consumer. (`type InvoiceEventHandler struct { Notification notification.Service; Logger *slog.Logger }`) +**Rule fan-out + feature filtering** — Handlers ListRules for the relevant EventType+namespace then lo.Filter by rule.Config..Features against event FeatureID/FeatureKey (empty Features => match all). Errors per-rule are collected with errors.Join, not returned early. (`slices.Contains(rule.Config.BalanceThreshold.Features, event.Entitlement.FeatureID) || slices.Contains(..., event.Entitlement.FeatureKey)`) +**Dedupe via BalanceEventDedupHash (V1 sha256 / V2 xxh3)** — Before creating a balance-threshold event the handler computes NewBalanceEventDedupHash and ListEvents over the current usage period with DeduplicationHashes [V1,V2]; only creates when no prior event exists or the last event used a different threshold. The dedupe hash is also stored as an annotation. (`DeduplicationHashes: []string{dedupHash.V1(), dedupHash.V2()}`) +**Snapshot eligibility gating** — isBalanceThresholdEvent requires EntitlementTypeMetered, Update/Reset operation, IsActive(clock.Now()), and non-nil Value.Balance/Usage. isEntitlementResetEvent additionally requires ValueOperationReset. EntitlementSnapshotHandler.Handle runs both branches. (`if event.Entitlement.EntitlementType != entitlement.EntitlementTypeMetered { return false }`) +**Payload built from driver mappers, not raw structs** — Event payloads are assembled by mapping domain to API via entitlementdriver.Parser.ToMetered, productcatalogdriver.MapFeatureToResponse, subjecthttphandler.FromSubject, customerhttphandler.CustomerToAPI, billinghttp.MapEventInvoiceToAPI before calling Notification.CreateEvent. (`apiInvoice, err := billinghttp.MapEventInvoiceToAPI(event)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `consumer.go` | Options{Validate}, Consumer struct, New() wires router + group handlers, Run/Close | Gathering invoices are skipped downstream (invoice.go), not here; every group closure must nil-check the event pointer. | +| `entitlementsnapshot.go` | EntitlementSnapshotHandler dispatcher routing snapshot events to balance-threshold and reset branches | Both branches may fire for one event; keep them independent and wrap each error with context. | +| `entitlementbalancethreshold.go` | Threshold activation math, getActiveThresholdsWithHighestPriority, dedupe hash, createEvent | totalGrants==0 => ErrNoBalanceAvailable (skip, don't error); balance and overage cannot both be >absoluteZero; V2 hash uses thresholdKind so usage/balance kinds dedupe independently. | +| `entitlementreset.go` | Reset-event handling; one event per usage period (skips if any prior event in period) | createResetEvent reuses the balance event version (TODO OM-1508) — keep the Customer.ID guard before CustomerToAPI. | +| `invoice.go` | InvoiceEventHandler: skip gathering invoices, fan out to active non-disabled rules, annotate with invoice id/number | Returns nil (not error) when no rules or status==Gathering; payload Version must be EventPayloadVersionCurrent. | + +## Anti-Patterns + +- Creating a balance-threshold event without checking the dedupe hash against the current usage period +- Returning early on the first rule error instead of collecting via errors.Join +- Treating totalGrants==0 as a real error instead of skipping (ErrNoBalanceAvailable) +- Building API payloads by hand instead of via the *driver mapping helpers +- Emitting notification events for gathering-status invoices + +## Decisions + +- **Two dedupe hash versions (V1 sha256, V2 xxh3 including thresholdKind)** — V2 separates usage vs balance threshold kinds so both can fire in one period; querying both hashes keeps backward compatibility with events created under V1. +- **Reset events are one-per-usage-period** — A reset is a single boundary event; re-emitting on every subsequent snapshot in the same period would spam channels. + +## Example: Fan-out + feature-filter + dedupe before creating a notification event + +``` +rules, err := b.Notification.ListRules(ctx, notification.ListRulesInput{ + Namespaces: []string{event.Namespace.ID}, + Types: []notification.EventType{notification.EventTypeBalanceThreshold}, +}) +affected := lo.Filter(rules.Items, func(r notification.Rule, _ int) bool { + if len(r.Config.BalanceThreshold.Features) == 0 { return true } + return slices.Contains(r.Config.BalanceThreshold.Features, event.Entitlement.FeatureID) +}) +for _, rule := range affected { + if err := b.handleRule(ctx, event, rule); err != nil { errs = append(errs, err) } +} +return errors.Join(errs...) +``` + + diff --git a/openmeter/notification/eventhandler/CLAUDE.md b/openmeter/notification/eventhandler/CLAUDE.md new file mode 100644 index 0000000000..b58e8264a8 --- /dev/null +++ b/openmeter/notification/eventhandler/CLAUDE.md @@ -0,0 +1,63 @@ +# eventhandler + + + +> Implements notification.EventHandler: the asynchronous dispatch + reconciliation loop that drives notification events to delivery via the webhook (Svix) provider. It owns the delivery-status state machine (PENDING/SENDING/RESENDING -> SUCCESS/FAILED) and a pglock-leader-elected periodic reconciler; the noop/ child supplies the disabled-mode implementation. + +## Patterns + +**Compile-time interface assertion** — Handler must satisfy notification.EventHandler, asserted at package scope so a drifting method set fails to compile. (`var _ notification.EventHandler = (*Handler)(nil)`) +**Config + Validate + New constructor** — New(config Config) calls config.Validate() (collecting errs into models.NewNillableGenericValidationError) and defaults zero-value durations/worker counts from notification.Default* constants. Never construct Handler directly. (`if err := config.Validate(); err != nil { return nil, err }; if config.ReconcileInterval == 0 { config.ReconcileInterval = notification.DefaultReconcileInterval }`) +**Fire-and-forget Dispatch with detached context** — Dispatch returns nil immediately and runs reconcileEvent in a goroutine under context.WithTimeout(context.Background(), DefaultDispatchTimeout) with a recover() guard. The caller's ctx is captured only as a trace link (trace.LinkFromContext), not propagated, so the async work survives the originating request. (`go func(){ defer recover...; ctx, cancel := context.WithTimeout(context.Background(), notification.DefaultDispatchTimeout); defer cancel(); tracex.StartWithNoValue(ctx, h.tracer, "event_handler.dispatch", trace.WithNewRoot(), trace.WithLinks(spanLink)).Wrap(fn) }()`) +**Leader-elected reconcile loop** — Start() loops while running.Load(), acquiring reconcilerLeaderLockKey via lockClient.Do; on pglock.ErrNotAcquired it just continues (another node is leader). A ticker fires Reconcile every reconcileInterval. Close() flips the atomic and closes stopCh via sync.OnceFunc. (`h.lockClient.Do(ctx, reconcilerLeaderLockKey, func(rCtx, _){ ticker := time.NewTicker(h.reconcileInterval); for { select { case <-ticker.C: h.Reconcile(rCtx) } } })`) +**Bounded worker-pool pagination in Reconcile** — Reconcile pages repo.ListEvents (PageSize 50) filtering for PENDING/SENDING/RESENDING with NextAttemptBefore = now - nextAttemptDelay (10s jitter), and processes each event through a semaphore.Weighted(workerPoolSize) + wg.Go worker with per-worker recover(). (`workerPool := semaphore.NewWeighted(h.workerPoolSize); workerPool.Acquire(ctx, 1); wg.Go(func(){ defer workerPool.Release(1); defer recover...; h.reconcileEvent(ctx, &event) })`) +**Delivery-status state machine via UpdateEventDeliveryStatusInput** — reconcileWebhookEvent computes a single *notification.UpdateEventDeliveryStatusInput per active status in a switch on status.State, then persists via repo.UpdateEventDeliveryStatus only when input != nil. Active statuses are first filtered (filterActiveDeliveryStatusesByChannelType) and priority-sorted (sortDeliveryStatusStateByPriority); SUCCESS/FAILED are terminal and skipped. (`switch status.State { case EventDeliveryStatusStatePending: input = ¬ification.UpdateEventDeliveryStatusInput{...} }; if input != nil { h.repo.UpdateEventDeliveryStatus(ctx, *input) }`) +**Typed webhook error classification** — Provider errors are classified with webhook.IsNotFoundError / IsMessageAlreadyExistsError / IsUnrecoverableError / IsValidationError and lo.ErrorsAs[webhook.RetryableError] to choose retry vs terminal-fail, recording the decision via package Err* sentinels (ErrSystemRecoverableError, ErrSystemUnrecoverableError, ErrUserSendAttemptsExhausted, etc.) as the status Reason. (`rErr, ok := lo.ErrorsAs[webhook.RetryableError](err); if ok { retryAfter = rErr.RetryAfter() }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler struct, Config/Validate, New constructor, Start/Close leader-loop lifecycle. | running is atomic.Bool; Start() refuses to run twice (CompareAndSwap). Close uses stopChClose (sync.OnceFunc) so closing twice is safe. LockClient (*pglock.Client) is required by Validate. | +| `dispatch.go` | Dispatch: async entry point invoked on event creation; spawns reconcileEvent in a detached goroutine. | Always returns nil even though work may fail later (logged only). Uses context.Background()+timeout intentionally; do not 'fix' this to propagate the request ctx or the dispatch dies when the HTTP request ends. | +| `reconcile.go` | Reconcile (periodic batch) and reconcileEvent (per-event channel fan-out by ChannelType). | nextAttemptDelay (10s) jitter is deliberate so downstream provider state settles before re-reconcile. Only ChannelTypeWebhook is handled; other types just log an error. Each worker has its own recover(). | +| `webhook.go` | reconcileWebhookEvent state machine plus getWebhookMessage/sendWebhookMessage/resendWebhookMessage helpers and eventAsPayload serializer. | Largest file (~600 lines). The per-state switch must always end up with input==nil (skip) or a fully-populated UpdateEventDeliveryStatusInput. pendingTimeout/sendingTimeout govern give-up. eventAsPayload must add a case for every new notification.EventType (delegates to httpdriver.FromEventAs*Payload) or it returns 'unknown event type'. | +| `deliverystatus.go` | Pure helpers: filterActiveDeliveryStatusesByChannelType and sortDeliveryStatusStateByPriority. | Filtering drops SUCCESS/FAILED and any status whose ChannelID isn't a webhook channel on event.Rule.Channels. Priority map ties FAILED and SUCCESS at 3; changing it reorders reconcile processing. | +| `noop/handler.go` | No-op notification.EventHandler for disabled/unwired mode. | Must stay side-effect free and never return a non-nil error; mirrors the real constructor signature only so DI can swap it in. | + +## Anti-Patterns + +- Propagating the caller's request context into Dispatch's goroutine instead of the detached context.Background()+timeout - the async delivery would be cancelled when the originating request finishes. +- Leaving a switch branch in reconcileWebhookEvent that neither sets input nor falls into the terminal SUCCESS/FAILED/no-op path - appends an 'unhandled reconciling state' error and silently stalls the delivery. +- Adding a new notification.EventType without a matching case in eventAsPayload (webhook.go) - sending fails with 'unknown event type' at delivery time. +- Constructing Handler directly or skipping config.Validate() - bypasses required-dependency checks (Repository, Webhook, Logger, Tracer, LockClient) and duration/worker defaulting. +- Spawning goroutines (Dispatch, Reconcile workers) without a recover() guard - a single panic would crash the worker process; every async block here defers recover() + debug.Stack() logging. + +## Decisions + +- **Reconciliation is gated behind a single pglock leader lock (reconcilerLeaderLockKey) with ErrNotAcquired treated as a benign skip.** — Multiple notification-service replicas can run, but only one should drive the periodic delivery-status reconcile to avoid duplicate provider calls. +- **Dispatch is fire-and-forget and reconciliation re-derives state from the webhook provider rather than trusting the in-flight send.** — Svix delivery is asynchronous; the reconcile loop polls provider message/delivery state with jitter (nextAttemptDelay) so transient/late provider updates eventually converge the local delivery status. +- **All async work is wrapped in tracex.Start/StartWithNoValue spans with explicit span attributes and AddEvent calls.** — The pipeline is detached from the request, so trace links + span events are the primary observability for why a delivery succeeded, retried, or failed. + +## Example: Per-event reconcile fans out by channel type, then the webhook handler drives the delivery-status state machine. + +``` +func (h *Handler) reconcileEvent(ctx context.Context, event *notification.Event) error { + fn := func(ctx context.Context) error { + channelTypes := lo.UniqMap(event.Rule.Channels, func(c notification.Channel, _ int) notification.ChannelType { return c.Type }) + var errs []error + for _, channelType := range channelTypes { + switch channelType { + case notification.ChannelTypeWebhook: + if err := h.reconcileWebhookEvent(ctx, event); err != nil { + errs = append(errs, err) + } + default: + h.logger.ErrorContext(ctx, "unsupported channel type", "type", channelType) + } + } + return errors.Join(errs...) +// ... +``` + + diff --git a/openmeter/notification/eventhandler/noop/CLAUDE.md b/openmeter/notification/eventhandler/noop/CLAUDE.md new file mode 100644 index 0000000000..408eaf7276 --- /dev/null +++ b/openmeter/notification/eventhandler/noop/CLAUDE.md @@ -0,0 +1,52 @@ +# noop + + + +> No-op implementation of notification.EventHandler used when notification event dispatch/reconciliation is disabled or unwired. Satisfies the full interface contract so DI can always supply a handler without running Kafka/Svix delivery side effects. + +## Patterns + +**Compile-time interface assertion** — Assert the no-op type satisfies notification.EventHandler at compile time so interface drift breaks the build, not runtime. (`var _ notification.EventHandler = (*Handler)(nil)`) +**All methods return nil / no side effects** — Every EventHandler method (Dispatch, Reconcile, Start, Close) must be a pure no-op returning nil. No state, no goroutines, no I/O. (`func (h Handler) Dispatch(_ context.Context, _ *notification.Event) error { return nil }`) +**Value-receiver empty struct** — Handler is an empty struct{} with value receivers; it holds no dependencies (no logger, no repo, no webhook.Handler) unlike the real eventhandler/service implementation. (`type Handler struct{}`) +**Fallible constructor signature parity** — New() returns (*Handler, error) to mirror the real handler constructor so callers/DI can swap implementations without changing call sites, even though error is always nil. (`func New() (*Handler, error) { return &Handler{}, nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Sole file; defines Handler{} and its four EventHandler methods plus New(). The complete no-op surface. | Keep method set in lockstep with notification.EventHandler in openmeter/notification/eventhandler.go (Dispatch, Reconcile via embedded EventDispatcher/EventReconciler, Start, Close). Adding a method there silently breaks the var _ assertion here until updated. | + +## Anti-Patterns + +- Adding fields, loggers, or goroutines to Handler — the whole point is zero side effects. +- Returning a non-nil error from any method or from New(); callers assume the no-op never fails. +- Importing webhook/Svix, Kafka, or repository packages here — that recreates the real handler and defeats the no-op purpose. +- Letting the method set drift from notification.EventHandler; the contract is defined upstream, not here. + +## Decisions + +- **Provide a no-op EventHandler in its own package rather than nil.** — DI/wiring (app/common, cmd/notification-service) can always inject a valid handler; disabling notification delivery becomes a constructor swap, avoiding nil-checks at every call site. + +## Example: Full no-op handler satisfying notification.EventHandler + +``` +package noop + +import ( + "context" + + "github.com/openmeterio/openmeter/openmeter/notification" +) + +var _ notification.EventHandler = (*Handler)(nil) + +type Handler struct{} + +func (h Handler) Dispatch(_ context.Context, _ *notification.Event) error { return nil } +func (h Handler) Reconcile(_ context.Context) error { return nil } +func (h Handler) Start() error { return nil } +// ... +``` + + diff --git a/openmeter/notification/httpdriver/CLAUDE.md b/openmeter/notification/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..0249b94475 --- /dev/null +++ b/openmeter/notification/httpdriver/CLAUDE.md @@ -0,0 +1,61 @@ +# httpdriver + + + +> v1 HTTP transport for notification channels, rules, and events, mounted by openmeter/server/router. Decodes requests, resolves namespace, calls notification.Service, and maps domain<->api via FromX/AsX functions. + +## Patterns + +**httptransport handler trio per endpoint** — Each operation defines Request/Response/Handler type aliases then a (h *handler) method returning httptransport.NewHandler[WithArgs] with a decode fn, a business fn, a JSON encoder, and AppendOptions(WithOperationName, WithErrorEncoder(errorEncoder())). (`type (ListRulesRequest = notification.ListRulesInput; ListRulesHandler httptransport.HandlerWithArgs[ListRulesRequest, ListRulesResponse, ListRulesParams])`) +**Namespace resolved via h.resolveNamespace(ctx)** — Every decode fn first calls h.resolveNamespace(ctx) (wraps namespaceDecoder.GetNamespace, 500 on miss) and threads the namespace into the *Input. (`ns, err := h.resolveNamespace(ctx); req := ListChannelsRequest{Namespaces: []string{ns}, ...}`) +**Discriminated rule create/update via ValueByDiscriminator** — CreateRule/UpdateRule call body.ValueByDiscriminator() then switch on the api.NotificationRule*CreateRequest concrete type to pick the matching AsRuleCreateRequest/UpdateRequest mapper. (`switch v := value.(type) { case api.NotificationRuleBalanceThresholdCreateRequest: req = AsRuleBalanceThresholdCreateRequest(v, ns) ... }`) +**Domain<->API mapping in mapping.go (FromX / AsX)** — FromChannel/FromRule/FromEvent map domain to api; AsChannelWebhook*/AsRule*Request map api to *Input. FromRule switches on rule.Type and uses api union setters (rule.FromNotificationRuleBalanceThreshold(...)). (`err = rule.FromNotificationRuleBalanceThreshold(FromRuleBalanceThreshold(r))`) +**Centralized error encoder** — errorEncoder() chains commonhttp.HandleErrorIfTypeMatches for notification.NotFoundError(404), feature.FeatureNotFoundError(400), models.GenericValidationError(400), webhook.Validation/NotFound(500), notification.UpdateAfterDeleteError(409). All handlers attach it via WithErrorEncoder. (`commonhttp.HandleErrorIfTypeMatches[notification.NotFoundError](ctx, http.StatusNotFound, err, w)`) +**TestRule generates a synthetic event** — TestRule loads the rule, calls internal.TestEventGenerator.Generate for the rule type, then CreateEvent with annotation AnnotationRuleTestEvent=true. (`testEvent, _ := h.testEventGenerator.Generate(ctx, internal.EventGeneratorInput{Namespace: request.Namespace, EventType: rule.Type})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler interface (Channel/Rule/Event sub-interfaces), handler struct, New() wiring service+TestEventGenerator+namespaceDecoder | New requires billing.Service (only to build the TestEventGenerator); resolveNamespace returns 500 on missing namespace. | +| `mapping.go` | All Domain<->API converters; FromRule dispatches per EventType | Adding a new rule/event type requires a new AsRule*Create+Update pair AND a FromRule* + FromRule switch case, or you get a GenericValidationError 'invalid rule type'. | +| `rule.go` | Rule CRUD + TestRule handlers using ValueByDiscriminator | The create/update switch has no default — an unhandled discriminator yields a zero-value req silently; add the case when extending. | +| `channel.go` | Channel CRUD handlers; only ChannelTypeWebhook supported | FromChannel returns GenericValidationError for non-webhook types; DeleteChannel uses EmptyResponseEncoder/204. | +| `event.go` | ListEvents/GetEvent/ResendEvent handlers; list params map subject/feature/rule/channel/from/to | ResendEvent returns 202 Accepted with EmptyResponseEncoder; body.Channels is optional. | +| `errors.go` | errorEncoder() status mapping for all notification handlers | New domain error types are invisible to clients (default 500) until added here. | +| `mapping_test.go` | Guards FromEventAsInvoiceCreated/UpdatedPayload pass-through and nil handling | Nil InvoicePayload must produce an error, not a zero api.Invoice. | + +## Anti-Patterns + +- Hand-decoding namespace instead of h.resolveNamespace(ctx) +- Adding a rule/event type without updating both AsRule* mappers and the FromRule switch +- Returning a new domain error type without registering it in errors.go (becomes a 500) +- Bypassing httptransport.NewHandler and writing the ResponseWriter directly +- Omitting WithOperationName/WithErrorEncoder from AppendOptions + +## Decisions + +- **Request/Response are type aliases of notification.*Input / api.* rather than bespoke DTOs** — Keeps the transport layer a thin adapter — the service input type IS the request, minimizing mapping surface. +- **Single shared errorEncoder() across all handlers** — Uniform HTTP status mapping for domain errors regardless of which endpoint surfaced them. + +## Example: A list endpoint: decode params + namespace, call service, map domain to API + +``` +func (h *handler) ListChannels() ListChannelsHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params ListChannelsParams) (ListChannelsRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return ListChannelsRequest{}, err } + return ListChannelsRequest{Namespaces: []string{ns}, Page: pagination.Page{PageSize: lo.FromPtrOr(params.PageSize, notification.DefaultPageSize)}}, nil + }, + func(ctx context.Context, req ListChannelsRequest) (ListChannelsResponse, error) { + resp, err := h.service.ListChannels(ctx, req) + /* map resp.Items via FromChannel */ return ListChannelsResponse{}, err + }, + commonhttp.JSONResponseEncoderWithStatus[ListChannelsResponse](http.StatusOK), + httptransport.AppendOptions(h.options, httptransport.WithOperationName("listNotificationChannels"), httptransport.WithErrorEncoder(errorEncoder()))..., + ) +} +``` + + diff --git a/openmeter/notification/internal/CLAUDE.md b/openmeter/notification/internal/CLAUDE.md new file mode 100644 index 0000000000..2a96e149b9 --- /dev/null +++ b/openmeter/notification/internal/CLAUDE.md @@ -0,0 +1,45 @@ +# internal + + + +> Private helper package (imported only by httpdriver) hosting TestEventGenerator, which fabricates representative EventPayloads for the 'test rule' endpoint across all event types. + +## Patterns + +**TestEventGenerator dispatch by EventType** — Generate validates EventGeneratorInput then switches on EventType: balance-threshold and entitlement-reset return hardcoded fixtures; invoice types build a real payload via billingService.SimulateInvoice. (`switch in.EventType { case notification.EventTypeBalanceThreshold: return t.newTestBalanceThresholdPayload(), nil; ... }`) +**Balance payload derives from reset payload** — newTestBalanceThresholdPayload calls newTestEntitlementResetPayload, flips Type, and converts EntitlementReset into a BalanceThresholdPayload by casting EntitlementValuePayloadBase(*payload.EntitlementReset). (`payload.BalanceThreshold = ¬ification.BalanceThresholdPayload{EntitlementValuePayloadBase: notification.EntitlementValuePayloadBase(*payload.EntitlementReset), Threshold: ...}`) +**Invoice fixture uses real billing simulation** — newTestInvoicePayload constructs a customer + flat-fee line, calls billingService.SimulateInvoice, wraps via billing.NewEventStandardInvoice, then maps with billinghttp.MapEventInvoiceToAPI — exercising the real billing path rather than a stub. (`invoice, err := t.billingService.SimulateInvoice(ctx, billing.SimulateInvoiceInput{...}); eventInvoice, _ := billing.NewEventStandardInvoice(invoice)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `rule.go` | TestEventGenerator{billingService}, NewTestEventGenerator, EventGeneratorInput{Validate}, Generate + per-type fixture builders | Invoice fixtures require a live billing.Service (SimulateInvoice); the entitlement/feature/subject fixtures are hardcoded ULIDs/values — adding a new event type needs a new case in Generate or it errors 'unsupported event type'. | + +## Anti-Patterns + +- Importing this package outside httpdriver (it is intentionally internal) +- Hand-rolling an invoice fixture instead of going through billingService.SimulateInvoice +- Adding an EventType to the system without a Generate case (TestRule will fail) + +## Decisions + +- **Invoice test payloads use real SimulateInvoice rather than canned JSON** — Guarantees the test event's invoice shape matches what production billing actually emits, so channel integrations can be validated end-to-end. + +## Example: Generating a type-specific test event payload + +``` +func (t *TestEventGenerator) Generate(ctx context.Context, in EventGeneratorInput) (notification.EventPayload, error) { + if err := in.Validate(); err != nil { return notification.EventPayload{}, err } + switch in.EventType { + case notification.EventTypeBalanceThreshold: + return t.newTestBalanceThresholdPayload(), nil + case notification.EventTypeInvoiceCreated, notification.EventTypeInvoiceUpdated: + return t.newTestInvoicePayload(ctx, in.Namespace, in.EventType) + default: + return notification.EventPayload{}, fmt.Errorf("unsupported event type: %s", in.EventType) + } +} +``` + + diff --git a/openmeter/notification/service/CLAUDE.md b/openmeter/notification/service/CLAUDE.md new file mode 100644 index 0000000000..5e3f25d7bd --- /dev/null +++ b/openmeter/notification/service/CLAUDE.md @@ -0,0 +1,57 @@ +# service + + + +> Business-logic implementation of notification.Service. Orchestrates the adapter (persistence) and webhook.Handler (Svix), validates inputs, and keeps webhook channels in sync with rule/channel mutations inside transactions. + +## Patterns + +**Validate then transaction.Run(ctx, s.adapter, fn)** — Mutating methods call params.Validate() first, then wrap side-effects in transaction.Run / transaction.RunWithNoValue over s.adapter so DB writes and webhook calls commit/roll back together. Pure reads delegate straight to the adapter. (`if err := params.Validate(); err != nil { return ... }; return transaction.Run(ctx, s.adapter, fn)`) +**Channel writes mirror to Svix webhook** — CreateChannel persists, then s.webhook.CreateWebhook, then re-UpdateChannel to store the returned signing secret. UpdateChannel re-syncs via UpdateWebhook including the rule IDs assigned to the channel. Only ChannelTypeWebhook is handled; default returns an error. (`wb, _ := s.webhook.CreateWebhook(ctx, webhook.CreateWebhookInput{...}); updateIn.Config.WebHook.SigningSecret = wb.Secret`) +**Rule channel-assignment diffing** — UpdateRule computes notification.NewChannelIDsDifference(new, old); returns early if unchanged, otherwise fetches affected channels and calls webhook.UpdateWebhookChannels with AddChannels/RemoveChannels per InAdditions/InRemovals. (`channelIDsDiff := notification.NewChannelIDsDifference(params.Channels, oldChannelIDs)`) +**Config + feature validation** — Create/UpdateRule validate config via params.Config.ValidateWith(notification.ValidateRuleConfigWithFeatures(ctx, s, ns)) and channels via ValidateRuleChannels[I](ctx, s) — a generic over CreateRuleInput|UpdateRuleInput that checks every channel exists. (`err := params.ValidateWith(ValidateRuleChannels[notification.CreateRuleInput](ctx, s))`) +**Guard mutations against deleted aggregates** — UpdateChannel/UpdateRule fetch the current row and return notification.UpdateAfterDeleteError when DeletedAt != nil; CreateEvent rejects deleted/disabled rules (NotFoundError / GenericValidationError). (`if rule.DeletedAt != nil { return nil, notification.UpdateAfterDeleteError{Err: errors.New("not allowed to update deleted rule")} }`) +**Max-channels-per-webhook surfaced as validation error** — When webhook.UpdateWebhookChannels returns webhook.IsMaxChannelsPerWebhookExceededError, wrap as models.NewGenericValidationError referencing webhook.MaxChannelsPerWebhook rather than a generic 500. (`if webhook.IsMaxChannelsPerWebhookExceededError(err) { return nil, models.NewGenericValidationError(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct (feature, adapter, webhook, logger), Config+New() validation, ChannelIDMetadataKey, ListFeature helper | New requires Adapter, FeatureConnector, Webhook, Logger all non-nil; Service satisfies notification.Service (compile-time _ assertion). | +| `channel.go` | Channel CRUD with Svix sync; DeleteChannel blocks if any rule references the channel | DeleteChannel returns GenericValidationError when rules reference it; UpdateChannel forbids changing channel Type and re-pushes assigned rule IDs to the webhook. | +| `rule.go` | Rule CRUD + ValidateRuleChannels generic + UpdateRule channel diffing | UpdateRule short-circuits webhook sync when channel set unchanged; over-fetch guard uses 2*MaxChannelsPerRule page size. | +| `event.go` | CreateEvent (rejects deleted/disabled rules), ListEvents/GetEvent, ResendEvent state-machine | ResendEvent only resets statuses in Sending/Success/Failed to Resending, skips disabled channels, and stamps AnnotationEventResendTimestamp. | +| `deliverystatus.go` | UpdateEventDeliveryStatus (in tx), List/GetEventsDeliveryStatus | Only the update wraps in transaction.Run; reads delegate directly. | + +## Anti-Patterns + +- Mutating channels/rules without transaction.Run wrapping both DB write and webhook call +- Skipping params.Validate() / ValidateRuleConfigWithFeatures / ValidateRuleChannels before persisting +- Updating a deleted aggregate instead of returning notification.UpdateAfterDeleteError +- Deleting a channel still referenced by a rule (must return a validation error) +- Surfacing max-channels-exceeded as a 500 instead of a GenericValidationError + +## Decisions + +- **Webhook side-effects run inside the same transaction as DB writes** — Channel/rule state in Postgres and Svix must stay consistent; a failed Svix call rolls back the DB mutation. +- **Channel deletion is blocked while rules reference it** — Prevents orphaning rules whose only delivery target would vanish; forces explicit rule reassignment first. + +## Example: A mutating service method: validate, then run DB + webhook in one transaction + +``` +func (s Service) CreateChannel(ctx context.Context, params notification.CreateChannelInput) (*notification.Channel, error) { + if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid params: %w", err) } + fn := func(ctx context.Context) (*notification.Channel, error) { + channel, err := s.adapter.CreateChannel(ctx, params) + if err != nil { return nil, err } + wb, err := s.webhook.CreateWebhook(ctx, webhook.CreateWebhookInput{Namespace: params.Namespace, ID: &channel.ID, URL: channel.Config.WebHook.URL}) + if err != nil { return nil, err } + updateIn := notification.UpdateChannelInput{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: channel.ID}, Config: channel.Config} + updateIn.Config.WebHook.SigningSecret = wb.Secret + return s.adapter.UpdateChannel(ctx, updateIn) + } + return transaction.Run(ctx, s.adapter, fn) +} +``` + + diff --git a/openmeter/notification/webhook/CLAUDE.md b/openmeter/notification/webhook/CLAUDE.md new file mode 100644 index 0000000000..967a057b6e --- /dev/null +++ b/openmeter/notification/webhook/CLAUDE.md @@ -0,0 +1,59 @@ +# webhook + + + +> Defines the transport-agnostic contract for notification webhook delivery: the webhook.Handler interface (Webhook CRUD + Message send/get/resend + EventType registration), input/output domain types, and a typed error taxonomy. Concrete delivery lives in the svix child; noop is the disabled-backend fallback. The root itself is pure interface + types + errors with no Svix dependency. + +## Patterns + +**Handler interface composed from sub-interfaces** — The public Handler embeds WebhookHandler, MessageHandler, and EventTypeHandler. New delivery operations must be added to one of the three sub-interfaces, not as loose top-level interfaces, so every backend (svix, noop) implements them uniformly. (`type Handler interface { WebhookHandler; MessageHandler; EventTypeHandler }`) +**Input structs are models.Validator with joined errors** — Every *Input type asserts var _ models.Validator = (*XInput)(nil) and its Validate() collects into var errs []error, returning NewValidationError(errors.Join(errs...)). Never return on first invalid field. (`func (i CreateWebhookInput) Validate() error { var errs []error; if i.URL == "" { errs = append(errs, errors.New("url is required")) }; return NewValidationError(errors.Join(errs...)) }`) +**Typed error constructors + Is* predicates** — errors.go defines NotFoundError, ValidationError, RetryableError, UnrecoverableError, MessageAlreadyExistsError via New*/Is* pairs over a generic isError[T] using errors.As. Callers classify with the Is* predicates, never type-switch directly. (`if webhook.IsMessageAlreadyExistsError(err) { /* idempotent skip */ }`) +**Namespace as first field, threaded everywhere** — Every Input/output struct (Webhook, Message, SendMessageInput, ...) carries a Namespace string for multi-tenancy; the svix backend maps it directly to the Svix application UID. (`type SendMessageInput struct { Namespace string; EventID string; ... }`) +**Event type catalog is centralized constants** — events.go is the single source of truth for notification event types (NotificationEventTypes slice + EventTypeEntitlements*/EventTypeInvoice* values keyed by GroupName). New event types are registered here, not redefined per backend. (`var NotificationEventTypes = []EventType{ EventTypeEntitlementsBalanceThreshold, EventTypeEntitlementsReset, EventTypeInvoiceCreated, EventTypeInvoiceUpdated }`) +**Secret validation delegated to webhook/secret** — CreateWebhookInput/UpdateWebhookInput.Validate call secret.ValidateSigningSecret for non-empty secrets rather than inlining whsec_ format checks. (`if err := secret.ValidateSigningSecret(*i.Secret); err != nil { errs = append(errs, fmt.Errorf("invalid secret: %w", err)) }`) +**Channel cap enforced via shared constant + sentinel error** — MaxChannelsPerWebhook (10) and ErrMaxChannelsPerWebhookExceeded are defined once here; backends reference them rather than redefining the limit. (`const MaxChannelsPerWebhook = 10`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Declares the Handler interface (and its three component interfaces) plus all Webhook/Message/EventType domain and Input types with their Validate methods. | DeleteWebhookInput is a type alias of GetWebhookInput; Payload is map[string]any. Adding a method here means every implementer (svix, noop) must be updated or the build breaks via their compile-time assertions. | +| `errors.go` | Typed error taxonomy with New*/Is* helpers built on generic isError[T] (errors.As). | All New* constructors return nil when given a nil err. RetryableError defaults to DefaultRetryAfter (15s) when after==0. GetMessage/ResendMessage inputs validate that ID OR EventID is present, not both. | +| `events.go` | Canonical registry of notification EventType values and the NotificationEventTypes slice used to register types with the delivery backend. | FIXME comments note JSON schemas are not yet attached; a new event type must be both declared and appended to NotificationEventTypes or it will not be registered. | + +## Anti-Patterns + +- Adding a webhook operation as a new top-level interface instead of extending WebhookHandler/MessageHandler/EventTypeHandler — breaks the uniform Handler contract. +- Returning on the first failed field in a Validate() method instead of joining all errs via errors.Join + NewValidationError. +- Type-switching on concrete error types instead of using the Is* predicates (IsNotFoundError, IsRetryableError, etc.). +- Hardcoding the channel limit (10) or whsec_ secret format in callers instead of using MaxChannelsPerWebhook / the secret package. +- Importing the svix SDK or Svix-specific logic into this root package — concrete delivery belongs in webhook/svix; this layer stays transport-agnostic. + +## Decisions + +- **Split Handler into WebhookHandler + MessageHandler + EventTypeHandler.** — Keeps responsibilities separable so implementers and tests reason about webhook lifecycle, message delivery, and type registration independently while still satisfying one Handler. +- **Keep the delivery contract, types, and errors in the root with no Svix dependency.** — Allows noop and svix backends to be swapped via DI (app/common) without callers depending on a specific provider. + +## Example: Defining a validated webhook input and classifying the resulting error + +``` +var _ models.Validator = (*SendMessageInput)(nil) + +func (i SendMessageInput) Validate() error { + var errs []error + if i.Namespace == "" { + errs = append(errs, errors.New("namespace is required")) + } + if len(i.Payload) == 0 { + errs = append(errs, errors.New("payload must not be empty")) + } + return NewValidationError(errors.Join(errs...)) +} + +// caller side: +if _, err := handler.SendMessage(ctx, in); webhook.IsMessageAlreadyExistsError(err) { +// ... +``` + + diff --git a/openmeter/notification/webhook/noop/CLAUDE.md b/openmeter/notification/webhook/noop/CLAUDE.md new file mode 100644 index 0000000000..872718cb5e --- /dev/null +++ b/openmeter/notification/webhook/noop/CLAUDE.md @@ -0,0 +1,32 @@ +# noop + + + +> No-op implementation of webhook.Handler (Svix webhook delivery interface) wired by app/common when webhook delivery is disabled or unconfigured. Every method logs the call and returns webhook.ErrNotImplemented (or an empty slice) so the system stays operable without a real Svix backend. + +## Patterns + +**Compile-time interface assertion** — Assert the no-op satisfies webhook.Handler so the contract stays in sync as methods are added/removed. (`var _ webhook.Handler = (*Handler)(nil)`) +**Implement every webhook.Handler method** — Each interface method (RegisterEventTypes, CreateWebhook, UpdateWebhook, UpdateWebhookChannels, DeleteWebhook, GetWebhook, ListWebhooks, SendMessage, GetMessage, ResendMessage) must be present; adding a method to webhook.Handler requires a stub here or compilation fails. (`func (h Handler) CreateWebhook(ctx context.Context, params webhook.CreateWebhookInput) (*webhook.Webhook, error) { ... return nil, webhook.ErrNotImplemented }`) +**Return webhook.ErrNotImplemented (never panic)** — Methods returning error must return webhook.ErrNotImplemented; pointer returns use nil; ListWebhooks returns an empty []webhook.Webhook{} not nil. (`return []webhook.Webhook{}, webhook.ErrNotImplemented`) +**Logger tagged at construction** — New(logger) wraps the injected logger with a stable attribute so noop log lines are distinguishable; do not fall back to slog.Default(). (`logger: logger.With(slog.String("webhook_handler", "noop"))`) +**InfoContext logging on every call** — Each method logs intent with the request context before returning, giving operators visibility into calls that hit the disabled handler. (`h.logger.InfoContext(ctx, "sending message", "params", params)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `noop.go` | Sole file: Handler struct (logger only) plus New(logger) constructor and stub implementations of all 10 webhook.Handler methods. | Keep the var _ webhook.Handler assertion; keep ListWebhooks returning an empty slice (callers may range over it); never substitute panic or slog.Default(). | + +## Anti-Patterns + +- Removing or stubbing only part of webhook.Handler — the compile-time assertion will break the build. +- Returning nil error from a write/delete method, which would falsely signal success to callers expecting ErrNotImplemented. +- Using slog.Default() instead of the injected, tagged logger. +- Adding real Svix logic here — that belongs in openmeter/notification/webhook/svix. + +## Decisions + +- **Provide a no-op Handler rather than a nil interface.** — Lets app/common wire notification without a configured webhook backend; callers can invoke methods safely and branch on webhook.ErrNotImplemented instead of nil-checking the handler. + + diff --git a/openmeter/notification/webhook/secret/CLAUDE.md b/openmeter/notification/webhook/secret/CLAUDE.md new file mode 100644 index 0000000000..425851d970 --- /dev/null +++ b/openmeter/notification/webhook/secret/CLAUDE.md @@ -0,0 +1,46 @@ +# secret + + + +> Generates and validates Svix-style webhook signing secrets used by the notification webhook layer. Pure utility leaf package with no dependencies beyond crypto/rand, encoding/base64, and pkg/models for validation errors. + +## Patterns + +**whsec_ prefixed base64 secrets** — NewSigningSecret reads `size` random bytes via crypto/rand and returns them base64-encoded with the SigningSecretPrefix ("whsec_"). DefaultSigningSecretSize is 32; use NewSigningSecretWithDefaultSize() for the standard size. (`return "whsec_" + base64.StdEncoding.EncodeToString(b), nil`) +**Aggregate validation via NewNillableGenericValidationError** — ValidateSigningSecret collects all issues into `var errs []error`, then returns models.NewNillableGenericValidationError(errors.Join(errs...)) so callers get nil when valid and a combined error otherwise. (`return models.NewNillableGenericValidationError(errors.Join(errs...))`) +**Strip optional prefix before validating** — Validation CutPrefixes SigningSecretPrefix first, then checks length (32-100 chars) and base64 decodability on the remainder, so secrets validate with or without the prefix. (`s, _ := strings.CutPrefix(secret, SigningSecretPrefix)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `secret.go` | Sole file: DefaultSigningSecretSize/SigningSecretPrefix constants, NewSigningSecret(size), NewSigningSecretWithDefaultSize(), and ValidateSigningSecret(secret). | Length bounds (32-100) are checked on the prefix-stripped string; keep crypto/rand (not math/rand); base64.StdEncoding must match between generation and decode validation. | + +## Anti-Patterns + +- Using math/rand instead of crypto/rand for secret generation. +- Returning on the first validation failure instead of joining all errs. +- Hardcoding the "whsec_" literal in callers instead of using SigningSecretPrefix. +- Mixing base64 encodings (URL vs Std) between NewSigningSecret and ValidateSigningSecret. + +## Decisions + +- **Mirror Svix's whsec_-prefixed base64 secret format.** — The notification webhook layer integrates with Svix, so signing secrets must be interoperable with Svix's expected format. + +## Example: Validate an incoming signing secret with or without the prefix + +``` +func ValidateSigningSecret(secret string) error { + var errs []error + s, _ := strings.CutPrefix(secret, SigningSecretPrefix) + if len(s) < 32 || len(s) > 100 { + errs = append(errs, errors.New("secret length must be between 32 to 100 chars without the optional prefix")) + } + if _, err := base64.StdEncoding.DecodeString(s); err != nil { + errs = append(errs, errors.New("invalid base64 string")) + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/notification/webhook/svix/CLAUDE.md b/openmeter/notification/webhook/svix/CLAUDE.md new file mode 100644 index 0000000000..c8fb61c0e5 --- /dev/null +++ b/openmeter/notification/webhook/svix/CLAUDE.md @@ -0,0 +1,66 @@ +# svix + + + +> Svix-backed implementation of the notification webhook.Handler interface. Translates the domain's webhook operations (applications, endpoints, event types, messages, delivery status) into Svix SDK calls, with OTel tracing and idempotency on every mutating call. + +## Patterns + +**Handler methods wrap a closure in tracex** — Every webhook.Handler method on svixHandler defines an inner `fn := func(ctx) (...) {...}` and returns `tracex.Start[T](ctx, h.tracer, "svix.").Wrap(fn)` (or `tracex.StartWithNoValue` for error-only). Span names are `svix.`. (`return tracex.Start[*webhook.Webhook](ctx, h.tracer, "svix.create_webhook").Wrap(fn)`) +**All Svix errors funnel through internal.WrapSvixError** — Immediately after any `h.client.*` call, reassign `if err = internal.WrapSvixError(err); err != nil`. Never return a raw *svix.Error — it must become a webhook-domain error first. `Error` is aliased as `internal.SvixError`. (`endpoint, err := h.client.Endpoint.Create(ctx, app.Id, input, opts) +if err = internal.WrapSvixError(err); err != nil { return nil, fmt.Errorf("failed to create Svix endpoint: %w", err) }`) +**Idempotency key per mutating Svix call** — Create/Update/Resend/RotateSecret pass an IdempotencyKey from `idempotency.Key()` in the Svix *Options struct. Generate it, error-check, then expose it as the span attribute "idempotency_key". (`idempotencyKey, err := idempotency.Key() +... h.client.Application.GetOrCreate(ctx, input, &svix.ApplicationCreateOptions{IdempotencyKey: &idempotencyKey})`) +**Namespace IS the Svix application UID** — The notification namespace is used directly as the Svix application Name/Uid (CreateApplication) and passed as the appID arg to Message/Endpoint calls. Webhook objects get `wh.Namespace = params.Namespace` set after mapping. (`input := svix.ApplicationIn{Name: id, Uid: &id}`) +**Validate inputs first** — Public methods taking a webhook.*Input call `params.Validate()` and wrap failures with fmt.Errorf before any Svix call. (`if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid send message params: %w", err) }`) +**NullChannel guards against unfiltered fan-out** — When creating/updating an endpoint with no Channels (and no EventTypes), set Channels to []string{NullChannel} so a filterless Svix endpoint does not receive every message. Strip NullChannel back out in WebhookFromSvixEndpointOut. (`if len(params.Channels) == 0 { params.Channels = []string{NullChannel} }`) +**Paginate Svix lists via Iterator/Done loop** — List operations (ListWebhooks, getDeliveryStatus) loop with Limit + Iterator, breaking on `out.Done`, sleeping `time.Sleep(100 * time.Millisecond)` between pages to avoid Svix rate limits. (`if !out.Done { opts.Iterator = out.Iterator; time.Sleep(100*time.Millisecond); continue }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `svix.go` | Config types (SvixConfig with Validate/IsEnabled, Config with SvixAPIClient/Logger/Tracer), constructors New + NewHandler, the svixHandler struct, NullChannel const, and `type Error = internal.SvixError` alias. `var _ webhook.Handler = (*svixHandler)(nil)` enforces the interface. | New() optionally registers event types on startup (RegisterEventTypes) honoring SkipRegistrationOnError, using context.Background() with RegistrationTimeout. Config.Validate requires non-nil client, logger, tracer. | +| `webhook.go` | Endpoint CRUD (Create/Update/Delete/Get/List Webhook), UpdateWebhookChannels, header/secret helpers (GetOrUpdateEndpointHeaders, GetOrUpdateEndpointSecret), and the WebhookFromSvixEndpointOut mapper. | CreateWebhook auto-ensures the Svix application, auto-generates a signing secret via webhooksecret.NewSigningSecretWithDefaultSize() and a ULID UID when absent. UpdateWebhookChannels re-reads, merges add/remove, enforces webhook.MaxChannelsPerWebhook. DeleteWebhook swallows webhook.IsNotFoundError as success. | +| `message.go` | SendMessage, GetMessage, ResendMessage, getDeliveryStatus, and deliveryStateFromSvixMessageStatus mapper. Bridges Svix message attempts to notification.EventDeliveryAttempt / webhook.MessageDeliveryStatus. | SendMessage maps http.StatusConflict to webhook.NewMessageAlreadyExistsError (EventID already published). getDeliveryStatus treats Svix FAIL with a non-nil NextAttempt as EventDeliveryStatusStateSending (transient). SendMessage sets WithContent:false so payload comes from the request, not Svix. | +| `application.go` | CreateApplication — GetOrCreate a Svix application keyed by namespace/id, used implicitly by webhook create/update flows. | Uses GetOrCreate (idempotent), not Create; both Name and Uid are set to the namespace id. | +| `event.go` | RegisterEventTypes — upserts Svix EventType schemas per webhook.EventType (loops, calls EventType.Update). | Uses Update (upsert) per event type; failure aborts the loop. Called from New() at handler init. | +| `annotations.go` | String constants for OTel span attribute keys (svix.message.id, svix.application.uid, svix.endpoint.url, etc.) used across all handler files. | Add new annotation keys here, not as inline string literals, to keep span attributes consistent. | +| `internal/error.go` | WrapSvixError / SvixError taxonomy — sole boundary decoding *svix.Error HTTP failures into webhook recoverable/retryable/validation/not-found errors. | Internal package — only importable from within svix/. All status-class decisions live here, not at call sites. | + +## Anti-Patterns + +- Returning a raw *svix.Error / unwrapped err from a handler method instead of passing it through internal.WrapSvixError first. +- Calling a Svix mutating endpoint (Create/Update/Resend/RotateSecret) without an idempotency.Key() in the *Options struct. +- Skipping the tracex.Start/StartWithNoValue wrapper on a new handler method, losing the span and consistent error handling. +- Creating or updating an endpoint with empty Channels and EventTypes without falling back to NullChannel — produces an endpoint that receives all messages. +- Hardcoding span attribute key strings inline instead of using the Annotation* constants in annotations.go. + +## Decisions + +- **Use the notification namespace directly as the Svix application UID rather than a separate mapping table.** — Svix applications are 1:1 with OpenMeter namespaces, so the namespace is a natural idempotent key and avoids extra persistence. +- **Centralize Svix error classification in internal.WrapSvixError and re-export only `type Error = internal.SvixError`.** — Keeps retryable-vs-fatal decisions in one auditable place; delivery/consumer layers reason in webhook-domain errors, never Svix SDK shapes. +- **Treat a Svix FAIL status with a pending NextAttempt as still-sending.** — Svix reports FAIL during transient retries; mapping it to EventDeliveryStatusStateSending avoids surfacing premature failures to the notification domain. + +## Example: Adding a new svixHandler method: validate, call Svix, wrap errors, trace. + +``` +func (h svixHandler) DeleteWebhook(ctx context.Context, params webhook.DeleteWebhookInput) error { + fn := func(ctx context.Context) error { + if err := params.Validate(); err != nil { + return fmt.Errorf("failed to validate DeleteWebhookInputs: %w", err) + } + err := h.client.Endpoint.Delete(ctx, params.Namespace, params.ID) + if err = internal.WrapSvixError(err); err != nil { + if webhook.IsNotFoundError(err) { + return nil + } + return fmt.Errorf("failed to delete Svix endpoint: %w", err) + } + return nil + } + return tracex.StartWithNoValue(ctx, h.tracer, "svix.delete_webhook").Wrap(fn) +// ... +``` + + diff --git a/openmeter/notification/webhook/svix/internal/CLAUDE.md b/openmeter/notification/webhook/svix/internal/CLAUDE.md new file mode 100644 index 0000000000..cec1828c65 --- /dev/null +++ b/openmeter/notification/webhook/svix/internal/CLAUDE.md @@ -0,0 +1,54 @@ +# internal + + + +> Private helper package for the Svix webhook integration that translates raw `*svix.Error` HTTP failures into the notification domain's `webhook` error taxonomy (recoverable/retryable/validation/not-found). It is the single boundary where Svix SDK error shapes are decoded and reclassified for the delivery layer. + +## Patterns + +**Single public entrypoint WrapSvixError** — External callers go through `WrapSvixError(err)`; it returns `nil` for nil input, passes through errors that are not `*svix.Error`, and otherwise decodes and re-wraps. Do not export new ad-hoc wrappers — extend this function. (`svixErr, ok := lo.ErrorsAs[*svix.Error](err); if !ok { return err }`) +**HTTP status -> webhook error class mapping in SvixError.Wrap** — `SvixError.Wrap()` is the authoritative status->class switch: 400/409/422 -> `webhook.NewUnrecoverableError(webhook.NewValidationError(...))`, 404 -> `webhook.NewNotFoundError`, 429/5xx -> `webhook.NewRetryableError(..., RetryAfter)`. New status handling belongs in this switch, not at call sites. (`case http.StatusTooManyRequests: return webhook.NewRetryableError(e, e.RetryAfter)`) +**Two-shape body decoding by status** — 422 responses are unmarshalled into `SvixValidationErrorBody` (list of `SvixValidationError{Loc,Message,Type}`); all other statuses into the flat `SvixErrorBody{Code,Detail}`. Match the JSON tag shape Svix actually returns when adding a status branch. (`var body SvixValidationErrorBody; json.Unmarshal(svixErr.Body(), &body)`) +**Compile-time error interface assertion** — `var _ error = (*SvixError)(nil)` enforces that `SvixError` implements `error`; keep `Error()` defined so this assertion holds. (`var _ error = (*SvixError)(nil)`) +**samber/lo for nil-safe pointer and slice ops** — Use `lo.FromPtrOr`, `lo.ToPtr`, `lo.Map`, `lo.ErrorsAs` rather than manual nil checks or local helpers, consistent with repo conventions. (`buf.WriteString(lo.FromPtrOr(e.Code, "unknown svix error"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `error.go` | The entire package: defines `SvixError` value type, its `Error()`/`Wrap()` methods, the `SvixErrorBody`/`SvixValidationErrorBody`/`SvixValidationError` decode structs, and `WrapSvixError` translator. | JSON-decode failures fall back to wrapping the ORIGINAL `err` (not the parse error) via `fmt.Errorf("failed to parse Svix error response: %w", err)` — keep this so the underlying Svix error is preserved. `Wrap()`'s `default` branch returns the raw `SvixError` unwrapped, so unmapped statuses are neither retryable nor validation errors. | + +## Anti-Patterns + +- Classifying Svix HTTP statuses (retryable vs unrecoverable) at delivery call sites instead of inside `SvixError.Wrap()`. +- Returning a raw `*svix.Error` from this package — always funnel through `WrapSvixError` so it becomes a `webhook` domain error. +- Importing this `internal` package from outside `openmeter/notification/webhook/svix` (Go internal visibility rules forbid it). +- On JSON unmarshal failure, wrapping the parse error instead of the original `err`, which would hide the real Svix failure. + +## Decisions + +- **Reclassify Svix errors into the `webhook` package's recoverable/retryable/validation/not-found taxonomy here rather than in the consumer.** — The Kafka/delivery layer needs a stable retry signal independent of Svix's HTTP encoding; centralizing the mapping keeps retry policy in one place. +- **Separate 422 validation bodies from generic error bodies.** — Svix returns a structured per-field `loc/msg/type` list only for validation (422), so a distinct struct and human-readable `[location=... type=...]` formatting is required. + +## Example: Translate a Svix SDK error into a domain webhook error + +``` +import ( + "net/http" + svix "github.com/svix/svix-webhooks/go" + "github.com/openmeterio/openmeter/openmeter/notification/webhook" +) + +// WrapSvixError turns *svix.Error into a webhook.* error; non-svix errors pass through. +func WrapSvixError(err error) error { + svixErr, ok := lo.ErrorsAs[*svix.Error](err) + if !ok { + return err + } + return SvixError{HTTPStatus: svixErr.Status(), Code: &body.Code, Details: []string{body.Detail}}.Wrap() +} + +// ... +``` + + diff --git a/openmeter/portal/CLAUDE.md b/openmeter/portal/CLAUDE.md new file mode 100644 index 0000000000..a7e8d0ac6c --- /dev/null +++ b/openmeter/portal/CLAUDE.md @@ -0,0 +1,49 @@ +# portal + + + +> Domain root for the customer-facing portal: defines portal.Service for minting/validating namespace-scoped, meter-slug-restricted JWT tokens that grant subjects read access. Children split into adapter (HS256 token mint/verify), authenticator (OpenAPI-driven Bearer middleware), and httphandler (token CRUD transport). + +## Patterns + +**Service is a token-management interface** — service.go declares Service = PortalTokenService{CreateToken, Validate, ListTokens, InvalidateToken}. Tokens are stateless signed JWTs, so ListTokens/InvalidateToken are unimplemented by design in the adapter. (`type PortalTokenService interface { CreateToken(...); Validate(...); ListTokens(...); InvalidateToken(...) }`) +**Inputs validate by accumulation** — CreateTokenInput/ListTokensInput/InvalidateTokenInput each implement Validate() collecting into var errs []error and returning errors.Join(errs...); empty errs returns nil. (`if i.Namespace == "" { errs = append(errs, fmt.Errorf("namespace is required")) }`) +**Token string only ever leaves on creation** — PortalToken.Token is a *string documented "Only set when creating a token"; the standard mapper omits it so list/get never leak the secret. (`Token *string // Only set when creating a token.`) +**Empty AllowedMeterSlugs means all meters** — PortalTokenClaims.AllowedMeterSlugs empty list = all slugs allowed; CreateTokenInput.Validate rejects individual empty-string slugs but accepts an empty list. (`for _, slug := range *i.AllowedMeterSlugs { if slug == "" { errs = append(errs, fmt.Errorf("allowed meter slug cannot be empty")) } }`) +**InvalidateToken needs id or subject** — InvalidateTokenInput.Validate requires at least one of ID/Subject and rejects empty-but-present values. (`if i.ID == nil && i.Subject == nil { errs = append(errs, fmt.Errorf("either id or subject must be provided")) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service/PortalTokenService interfaces, PortalToken/PortalTokenClaims types, and the three Input structs with Validate(). | ListTokens/InvalidateToken are stateless-JWT no-ops in the adapter — do not assume DB-backed behavior. PortalToken.Token must stay omitted from list/get mappings. | + +## Anti-Patterns + +- Mapping PortalToken.Token into any response other than CreateToken — leaks the secret. +- Relaxing JWT parser options (WithIssuer/WithValidMethods/WithExpirationRequired) in the adapter — enables forgery / alg confusion. +- Returning fake success from ListTokens/InvalidateToken instead of the by-design not-implemented behavior. +- Creating a token without validating AllowedMeterSlugs against meter.Service in the handler. +- Reading the namespace from request params instead of the namespace decoder. + +## Decisions + +- **Portal tokens are stateless HS256 JWTs, not DB rows.** — Tokens are self-validating (namespace + subject + allowed meter slugs + expiry in claims), so listing/invalidation of arbitrary tokens is not supported. +- **Authentication is generic over OpenAPI 3 security requirements rather than hardcoded per route.** — The authenticator resolves schemes by name from api.PortalTokenAuthScopes and tries requirements in order, so adding/removing auth is spec-driven. + +## Example: CreateTokenInput validation with joined errors + +``` +func (i CreateTokenInput) Validate() error { + var errs []error + if i.Namespace == "" { errs = append(errs, fmt.Errorf("namespace is required")) } + if i.Subject == "" { errs = append(errs, fmt.Errorf("subject is required")) } + if i.ExpiresAt != nil && i.ExpiresAt.Before(time.Now()) { + errs = append(errs, fmt.Errorf("expiration date must be in the future")) + } + if len(errs) > 0 { return errors.Join(errs...) } + return nil +} +``` + + diff --git a/openmeter/portal/adapter/CLAUDE.md b/openmeter/portal/adapter/CLAUDE.md new file mode 100644 index 0000000000..42927fa99a --- /dev/null +++ b/openmeter/portal/adapter/CLAUDE.md @@ -0,0 +1,53 @@ +# adapter + + + +> Adapter implementation of the portal.Service interface for issuing and validating namespace-scoped JWT portal tokens (HS256). Tokens grant subjects read access to specific meter slugs; this is the only place tokens are minted/verified. + +## Patterns + +**Config.Validate + New constructor** — New(config Config) validates before constructing; non-empty Secret and non-zero Expire are mandatory. (`func New(config Config) (portal.Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{secret: []byte(config.Secret), expire: config.Expire}, nil }`) +**Compile-time interface assertion** — Every adapter declares `var _ portal.Service = (*adapter)(nil)` so it must implement the full interface. (`var _ portal.Service = (*adapter)(nil)`) +**JWT minted with fixed issuer + HS256** — CreateToken signs JTWPortalTokenClaims with jwt.SigningMethodHS256, Issuer=PortalTokenIssuer ("openmeter"), embedding Namespace, Id (uuid), Subject, AllowedMeterSlugs. (`jwt.NewWithClaims(jwt.SigningMethodHS256, JTWPortalTokenClaims{Namespace: input.Namespace, Id: id, RegisteredClaims: jwt.RegisteredClaims{Issuer: PortalTokenIssuer, ...}})`) +**Strict parser options on Validate** — Validate parses with WithStrictDecoding, WithExpirationRequired, WithIssuer(PortalTokenIssuer), WithValidMethods([HS256]); never relax these. (`opts := []jwt.ParserOption{jwt.WithStrictDecoding(), jwt.WithExpirationRequired(), jwt.WithIssuer(PortalTokenIssuer), jwt.WithValidMethods([]string{jwt.SigningMethodHS256.Name})}`) +**Input validation delegated to input type** — Handler methods call input.Validate() (e.g. CreateToken calls input.Validate()) rather than re-implementing field checks. (`if err := input.Validate(); err != nil { return nil, err }`) +**Unimplemented ops return NewGenericNotImplementedError** — ListTokens and InvalidateToken (stateless JWT, no store) return models.NewGenericNotImplementedError; noopAdapter returns it for everything. (`return resp, models.NewGenericNotImplementedError(fmt.Errorf("listing tokens"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config struct (Secret, Expire), Validate(), New() factory, and the adapter struct holding secret []byte + expire time.Duration. | Secret is stored as []byte; both fields are required by Validate — adding a code path that bypasses New skips validation. | +| `token.go` | JTWPortalTokenClaims type plus CreateToken/Validate/ListTokens/InvalidateToken adapter methods. | ListTokens/InvalidateToken are intentionally not-implemented because tokens are stateless JWTs with no backing store; do not stub fake success. ExpiresAt defaults to now+expire unless input overrides. | +| `noop.go` | noopAdapter via NewNoop() returning portal.Service whose every method errors with NotImplemented — used when portal is disabled. | Keep noop method set in sync with the portal.Service interface or the var-assertion would fail elsewhere. | + +## Anti-Patterns + +- Relaxing JWT parser options (dropping WithIssuer/WithValidMethods/WithExpirationRequired) — opens token forgery / alg confusion. +- Mapping the raw token string in any output except CreateToken — the token secret must only leave the system once at creation. +- Constructing adapter directly instead of via New(), bypassing Config.Validate. +- Returning fake success from ListTokens/InvalidateToken; they are unimplemented by design (stateless JWT). + +## Decisions + +- **Portal tokens are stateless signed JWTs, not DB rows.** — No revocation store exists, so ListTokens/InvalidateToken return NotImplemented rather than pretending to manage persisted state. +- **A noop adapter shares the package.** — Lets DI wire a portal.Service that hard-fails when the portal feature is disabled, keeping the interface non-nil. + +## Example: Mint a namespace-scoped portal token + +``` +token := jwt.NewWithClaims(jwt.SigningMethodHS256, JTWPortalTokenClaims{ + Namespace: input.Namespace, + Id: uuid.New().String(), + RegisteredClaims: jwt.RegisteredClaims{ + Subject: input.Subject, + ExpiresAt: jwt.NewNumericDate(expiresAt), + IssuedAt: jwt.NewNumericDate(time.Now()), + Issuer: PortalTokenIssuer, + }, + AllowedMeterSlugs: *allowedMeterSlugs, +}) +tokenString, err := token.SignedString(a.secret) +``` + + diff --git a/openmeter/portal/authenticator/CLAUDE.md b/openmeter/portal/authenticator/CLAUDE.md new file mode 100644 index 0000000000..5b9404885d --- /dev/null +++ b/openmeter/portal/authenticator/CLAUDE.md @@ -0,0 +1,46 @@ +# authenticator + + + +> HTTP middleware that authenticates incoming requests by interpreting OpenAPI 3 security requirements and verifying portal Bearer tokens via portal.Service, injecting the authenticated subject into request context. + +## Patterns + +**OpenAPI-driven security resolution** — Middleware reads the swagger doc per route: getSecurityRequirements falls back to swagger.Security but prefers the matched operation's Security via chi RoutePattern. (`path := swagger.Paths.Find(rctx.RoutePattern()); if op := path.GetOperation(r.Method); op != nil && op.Security != nil { security = op.Security }`) +**Try requirements in order, join errors** — validateSecurityRequirements returns nil on first satisfied requirement; if none pass it returns errors.Join of all attempts. (`for _, sr := range securityRequirements { r, err = a.validateSecurityRequirement(sr, w, r); if err == nil { return r, nil }; errs = append(errs, err) }; return r, errors.Join(errs...)`) +**Security scheme name -> authenticator func** — getAuthenticatorFunc maps a scheme name to a verifier; the only known scheme is derived from api.PortalTokenAuthScopes split on '.'. (`case strings.Split(string(api.PortalTokenAuthScopes), ".")[0]: return a.verifyPortalToken`) +**Subject stored under typed context key** — verifyPortalToken injects claims.Subject under AuthenticatorSubjectSessionKey; GetAuthenticatedSubject reads it (empty string = unauthenticated). (`r = r.WithContext(context.WithValue(r.Context(), AuthenticatorSubjectSessionKey, claims.Subject))`) +**Meter-slug scoping enforced at middleware** — verifyPortalToken reads chi URLParam "meterSlug" and rejects when claims.AllowedMeterSlugs is non-empty and does not contain it. (`if len(claims.AllowedMeterSlugs) != 0 && !slices.Contains(claims.AllowedMeterSlugs, meterSlug) { return r, errors.New("meter slug not allowed") }`) +**Problem-JSON error responses** — Auth failures respond 401, internal failures 500 via models.NewStatusProblem(...).Respond(w); internal errors also go through errorHandler.HandleContext. (`models.NewStatusProblem(r.Context(), err, http.StatusUnauthorized).Respond(w)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `authenticator.go` | Whole package: Authenticator struct (portal.Service + errorsx.Handler), NewAuthenticator, NewAuthenticatorMiddlewareFunc(swagger), verifyPortalToken, and the typed context-key helpers. | verifyPortalToken double-checks expiry/subject even though adapter.Validate already enforces them — keep both. Bearer header must be exactly two space-split parts with 'Bearer' prefix. Unknown security scheme names yield a 500 internal error, not a 401. | + +## Anti-Patterns + +- Bypassing OpenAPI security requirements (hardcoding auth on/off) instead of letting getSecurityRequirements drive it. +- Reading the subject from anywhere but GetAuthenticatedSubject / AuthenticatorSubjectSessionKey. +- Returning the request unwrapped after a successful auth (must carry the subject in context via r.WithContext). +- Treating an empty subject as authenticated — GetAuthenticatedSubject returns false for empty strings. + +## Decisions + +- **Authentication is generic over OpenAPI 3 security requirements rather than hardcoded per route.** — The generated swagger doc is the single source of truth for which endpoints require which scheme, so middleware reflects spec changes automatically. +- **Verifier resolves schemes by name from api.PortalTokenAuthScopes.** — Keeps the middleware aligned with generated API scope constants instead of literal scheme strings. + +## Example: Verify a portal Bearer token and inject the subject + +``` +claims, err := a.portal.Validate(r.Context(), bearerToken) +if err != nil { return r, fmt.Errorf("invalid token: %w", err) } +if claims.Subject == "" { return r, errors.New("invalid subject") } +if len(claims.AllowedMeterSlugs) != 0 && !slices.Contains(claims.AllowedMeterSlugs, meterSlug) { + return r, errors.New("meter slug not allowed") +} +r = r.WithContext(context.WithValue(r.Context(), AuthenticatorSubjectSessionKey, claims.Subject)) +``` + + diff --git a/openmeter/portal/httphandler/CLAUDE.md b/openmeter/portal/httphandler/CLAUDE.md new file mode 100644 index 0000000000..3462317c03 --- /dev/null +++ b/openmeter/portal/httphandler/CLAUDE.md @@ -0,0 +1,53 @@ +# httphandler + + + +> HTTP transport layer (package httpdriver) exposing portal token endpoints — create, list, invalidate — by wrapping portal.Service and meter.Service in the project's httptransport.Handler request/response pattern. + +## Patterns + +**httptransport three-function handler** — Each endpoint returns a typed handler built from a request decoder, business logic func, and response encoder, with WithOperationName set. (`httptransport.NewHandler(decode, exec, commonhttp.JSONResponseEncoderWithStatus[CreateTokenResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("createPortalToken"))...)`) +**Handler interface composition** — handler implements TokenHandler (CreateToken/ListTokens/InvalidateToken) with `var _ Handler = (*handler)(nil)`; constructed via New(namespaceDecoder, portalService, meterService, options...). (`type Handler interface { TokenHandler }`) +**Namespace resolved from decoder** — Every handler calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace; missing namespace is a 500. (`ns, err := h.resolveNamespace(ctx); if err != nil { return ListTokensRequest{}, err }`) +**Type aliases for request/response/handler** — Each endpoint declares aliases (e.g. CreateTokenRequest = portal.CreateTokenInput, CreateTokenResponse = *api.PortalToken) tying transport types to domain/API types. (`type CreateTokenHandler httptransport.Handler[CreateTokenRequest, CreateTokenResponse]`) +**Centralized API mapping** — mapping.go toAPIPortalToken converts portal.PortalToken -> api.PortalToken and deliberately omits Token; CreateToken re-attaches token.Token after mapping. (`portalToken := toAPIPortalToken(token); portalToken.Token = token.Token`) +**Meter-slug validation before token creation** — CreateToken validates every AllowedMeterSlug exists via meterService.ListMeters (filter.FilterString{In:...}) returning meter.NewMeterNotFoundError on miss. (`if _, ok := metersBySlug[slug]; !ok { return nil, meter.NewMeterNotFoundError(slug) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/TokenHandler interfaces, handler struct (namespaceDecoder, options, portalService, meterService), New() constructor, resolveNamespace helper. | Package is named httpdriver despite the folder being httphandler — match the package name. resolveNamespace returns a 500 (commonhttp.NewHTTPError) not 400 when namespace missing. | +| `portal.go` | CreateToken/ListTokens/InvalidateToken handlers with their request/response type aliases and operation names. | CreateToken still returns http.StatusOK (TODO says should be 201). ListTokens hardcodes page 1 with default pageSize 25. InvalidateToken uses EmptyResponseEncoder with 204. Empty (but non-nil) AllowedMeterSlugs array is a validation error. | +| `mapping.go` | toAPIPortalToken domain->API mapper; sets Expired=true when ExpiresAt is in the past. | Never map Token here — it is a security risk; only CreateToken sets it explicitly afterward. | + +## Anti-Patterns + +- Mapping the raw token into the API response inside toAPIPortalToken (leaks the secret on list/get). +- Skipping resolveNamespace / hardcoding a namespace instead of reading the namespace decoder. +- Creating a token without validating AllowedMeterSlugs against meterService.ListMeters. +- Writing inline JSON encoding instead of commonhttp encoders + httptransport handler wrappers. +- Allowing an empty-but-present AllowedMeterSlugs array through to the service. + +## Decisions + +- **Token string is excluded from the standard mapper and only attached in CreateToken.** — The signed token is sensitive and must be returned exactly once at creation, never on list/invalidate responses. +- **Handlers depend on meter.Service in addition to portal.Service.** — AllowedMeterSlugs must reference real meters, so creation validates slugs against the meter catalog before issuing a token. + +## Example: Validate meter slugs then create a token, attaching the secret once + +``` +meterList, err := h.meterService.ListMeters(ctx, meter.ListMetersParams{ + Namespace: request.Namespace, + Key: &filter.FilterString{In: request.AllowedMeterSlugs}, +}) +metersBySlug := lo.KeyBy(meterList.Items, func(m meter.Meter) string { return m.Key }) +for _, slug := range *request.AllowedMeterSlugs { + if _, ok := metersBySlug[slug]; !ok { return nil, meter.NewMeterNotFoundError(slug) } +} +token, err := h.portalService.CreateToken(ctx, request) +portalToken := toAPIPortalToken(token) +portalToken.Token = token.Token +``` + + diff --git a/openmeter/productcatalog/CLAUDE.md b/openmeter/productcatalog/CLAUDE.md new file mode 100644 index 0000000000..d348c44346 --- /dev/null +++ b/openmeter/productcatalog/CLAUDE.md @@ -0,0 +1,61 @@ +# productcatalog + + + +> Root of the product-catalog domain and the highest-fan-in non-pkg package. The root files define the shared catalog value types (Price, RateCard, Discounts, EntitlementTemplate, TaxConfig, EffectivePeriod, ProRatingConfig, SettlementMode, Alignment) plus the FeatureResolver interface; subscription, billing, and entitlement all build on these primitives. Sub-packages split by concern: feature/, plan/, addon/, planaddon/ (domains), adapter/ (Ent), driver/+http/ (HTTP), featureresolver/, subscription/ (plan->subscription bridge), testutils/. + +## Patterns + +**Discriminated union value types** — Price, RateCard, and EntitlementTemplate are sum types: a private `t TypeEnum` field plus one pointer per variant, an `AsX()/FromX()` accessor interface (pricer, entitlementTemplater), and type-switch MarshalJSON/UnmarshalJSON keyed on a `type` field. (`type Price struct { t PriceType; flat *FlatPrice; unit *UnitPrice; ... } with `var _ pricer = (*Price)(nil)``) +**ValidateWith + ValidatorFunc composition** — Validation is composed from `models.ValidatorFunc[T]` closures applied via `models.Validate(v, fns...)`, not ad-hoc inline checks. Named validators like PercentageDiscountWithValidValue() / ValidateEffectivePeriod() are reusable. (`func (d PercentageDiscount) Validate() error { return d.ValidateWith(PercentageDiscountWithValidValue()) }`) +**Collect-then-wrap validation** — Multi-field Validate() accumulates into `var errs []error`, prefixes each with models.ErrorWithFieldPrefix(NewFieldSelectorGroup(...)), and returns models.NewGenericValidationError / NewNillableGenericValidationError(errors.Join(errs...)). (`Discounts.Validate wraps percentage/usage errors under field selectors then under a 'discounts' group`) +**Models contract assertions** — Each value type asserts the interfaces it satisfies at package scope: models.Validator, models.Equaler[T], models.Clonable[T], models.CustomValidator[T], hasher.Hasher. (`var ( _ models.Validator = (*UsageDiscount)(nil); _ hasher.Hasher = (*UsageDiscount)(nil) )`) +**ValidateForPrice context validation** — Discounts carry a second validation pass that depends on the owning Price (e.g. usage discount illegal on FlatPriceType). New price-dependent rules go in ValidateForPrice(*Price), not Validate(). (`UsageDiscountWithPrice returns ErrUsageDiscountWithFlatPrice when price.Type()==FlatPriceType`) +**ISODuration cadence alignment** — Billing cadences are compared via datetime.ISODuration.Simplify(true) + DivisibleBy both ways, never by raw numeric comparison; ValidateBillingCadencesAlign is the canonical check. (`ok, err := pSimple.DivisibleBy(rcSimple)`) +**Hash-based equality for discounts** — Discount value types implement hasher.Hasher by concatenating canonical String() forms; Discounts.Equal compares via equal.HasherPtrEqual rather than reflect.DeepEqual. (`func (d PercentageDiscount) Hash() hasher.Hash { return hasher.NewHash([]byte(d.Percentage.String())) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `price.go` | Price sum type (flat/unit/tiered/dynamic/package), PaymentTermType, Commitments, pricer interface | Never call json.Marshal(p) inside Price.MarshalJSON; switch on p.t and serialize the embedded variant | +| `ratecard.go` | RateCard interface (FlatFee/UsageBased) with Merge/ChangeMeta/Clone and RateCardMeta | UsageBasedRateCard must carry a non-zero billing cadence; ChangeMeta is the only sanctioned mutation entry point | +| `entitlement.go` | EntitlementTemplate sum type over metered/static/boolean, marshals with a `type` discriminator | Default branch in MarshalJSON/UnmarshalJSON errors on unknown type — keep the switch exhaustive | +| `discount.go` | PercentageDiscount, UsageDiscount, Discounts container with Validate + ValidateForPrice | Usage discount is invalid with a flat price; keep Hash/Clone/Equal in sync when adding a field | +| `effectiveperiod.go` | EffectivePeriod (EffectiveFrom/To) embedded by plans/addons; AsPeriod()->timeutil.OpenPeriod | EffectiveTo without EffectiveFrom is rejected (ErrEffectivePeriodFromNotSet) | +| `alignment.go` | ValidateBillingCadencesAlign — plan vs ratecard cadence divisibility | P1M vs P4W are not numerically comparable; always go through Simplify+DivisibleBy | +| `pro_rating.go` | ProRatingConfig/ProRatingMode (only prorate_prices) | Validate short-circuits when !Enabled; add new modes to the switch and Values() | +| `featureresolver.go` | FeatureResolver / NamespacedFeatureResolver interfaces (impl in featureresolver/) | Interface only — do not put lookup logic here; it belongs in the featureresolver sub-package | + +## Anti-Patterns + +- Marshaling a union (Price/RateCard/EntitlementTemplate) via json.Marshal on the wrapper itself instead of switching on the discriminator and serializing the active variant (infinite recursion / wrong shape) +- Writing inline validation branches instead of composing models.ValidatorFunc closures via ValidateWith/models.Validate +- Returning on the first invalid field instead of collecting errs and returning NewGenericValidationError/NewNillableGenericValidationError(errors.Join(...)) with field prefixes +- Comparing billing cadences numerically (P1M==P4W) instead of ValidateBillingCadencesAlign / Simplify+DivisibleBy +- Adding DB or HTTP code to this root package — persistence lives in adapter/ and the per-domain adapter children, HTTP in driver/http/ and httpdriver children + +## Decisions + +- **Catalog value types are self-validating sum types with custom JSON, not Ent rows or plain structs** — Plan/addon/ratecard prices are polymorphic and reused across subscription, billing, and entitlement; a typed union with discriminated JSON keeps the wire shape and the domain invariants in one place +- **FeatureResolver is declared here but implemented in featureresolver/** — Avoids a dependency cycle: subscription/billing depend on the resolver interface while the implementation depends on feature.FeatureConnector + +## Example: Compose a ValidatorFunc and accumulate field-prefixed errors + +``` +func (d Discounts) Validate() error { + var errs []error + if d.Percentage != nil { + if err := d.Percentage.Validate(); err != nil { + errs = append(errs, models.ErrorWithFieldPrefix( + models.NewFieldSelectorGroup(models.NewFieldSelector("percentage")), err)) + } + } + if err := errors.Join(errs...); err != nil { + return models.NewGenericValidationError(err) + } + return nil +} +``` + + diff --git a/openmeter/productcatalog/adapter/CLAUDE.md b/openmeter/productcatalog/adapter/CLAUDE.md new file mode 100644 index 0000000000..d61087ca11 --- /dev/null +++ b/openmeter/productcatalog/adapter/CLAUDE.md @@ -0,0 +1,48 @@ +# adapter + + + +> Ent-backed persistence layer for the productcatalog feature domain. Implements feature.FeatureRepo (NewPostgresFeatureRepo) over openmeter/ent/db, translating feature domain types to/from the db.Feature entity. + +## Patterns + +**Repo constructor returns the domain interface** — NewPostgresFeatureRepo(db, logger) returns feature.FeatureRepo, not the concrete *featureDBAdapter. Wire other adapters the same way. (`func NewPostgresFeatureRepo(db *db.Client, logger *slog.Logger) feature.FeatureRepo`) +**Entity->domain mapping via MapFeatureEntity** — All read paths end in MapFeatureEntity(*db.Feature) feature.Feature. Do not hand-build feature.Feature elsewhere in this package. (`return MapFeatureEntity(entity), nil`) +**Re-fetch with WithMeter for MeterSlug backcompat** — When MeterID is set, re-query with WithMeter(Select(FieldID,FieldKey)) so MapFeatureEntity can populate the deprecated MeterSlug field. (`.WithMeter(func(mq *db.MeterQuery){ mq.Select(dbmeter.FieldID, dbmeter.FieldKey) })`) +**Archive is soft + cross-aggregate guard** — ArchiveFeature sets ArchivedAt (no hard delete) and first checks Plan and Subscription references, returning feature.ForbiddenError if the feature is still in use. (`if planReferencesIt { return &feature.ForbiddenError{...} }`) +**Filter helpers + pagination dual-mode** — List uses filter.ApplyToQuery for Key/Name/MeterIDs and supports both Page (Paginate) and legacy Limit/Offset; ArchivedAt filtering gated on IncludeArchived. (`query = filter.ApplyToQuery(query, params.Key, dbfeature.FieldKey)`) +**UnitCost type-switch with explicit clears** — Create/Update map UnitCost by Type (Manual/LLM), and Update always clears the opposite type's columns so type switches persist cleanly. (`switch unitCost.Type { case feature.UnitCostTypeManual: query = query.ClearUnitCostLlm...().SetUnitCostType(...) }`) +**Transactionality via entutils TxUser/TxCreator** — transaction.go implements Tx/WithTx/Self by hijacking the ent tx and rebuilding the repo from the raw tx config. (`func (e *featureDBAdapter) WithTx(ctx, tx) feature.FeatureRepo { txClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return NewPostgresFeatureRepo(txClient.Client(), e.logger) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `feature.go` | featureDBAdapter implementing FeatureRepo CRUD/list and MapFeatureEntity mapping. | MeterSlug is deprecated/v1-only — only populated from the Meter edge; ArchiveFeature's plan/subscription guards (FIXME OM-1055) live in the DB layer intentionally. | +| `transaction.go` | TxCreator/TxUser implementation for FeatureRepo. | WithTx must rebuild via NewPostgresFeatureRepo so the new repo binds to the tx client; do not return the original receiver. | +| `feature_test.go` | Postgres-backed repo tests using testutils.InitPostgresDB and a serializing sync.Mutex. | Tests pre-create the Meter row to satisfy the FK; they run t.Parallel but lock a shared mutex. | + +## Anti-Patterns + +- Constructing feature.Feature manually in read paths instead of calling MapFeatureEntity +- Setting UnitCost columns without clearing the opposite cost type on Update (stale LLM/manual fields survive) +- Hard-deleting features instead of setting ArchivedAt +- Skipping the WithMeter re-fetch and leaving MeterSlug empty for v1 consumers + +## Decisions + +- **Cross-aggregate plan/subscription reference checks live inside the DB adapter** — FIXME OM-1055 notes features are referenced by ID with no versioning, so the guard sits at the persistence boundary until productcatalog/plan and feature are unified. +- **Keep MeterSlug derived from the Meter edge** — v1 API backward compatibility; MeterID is the source of truth going forward. + +## Example: Constructing the Postgres feature repository + +``` +import ( + "github.com/openmeterio/openmeter/openmeter/ent/db" + "github.com/openmeterio/openmeter/openmeter/productcatalog/adapter" +) + +repo := adapter.NewPostgresFeatureRepo(dbClient, logger) // returns feature.FeatureRepo +``` + + diff --git a/openmeter/productcatalog/addon/CLAUDE.md b/openmeter/productcatalog/addon/CLAUDE.md new file mode 100644 index 0000000000..3ca3805d83 --- /dev/null +++ b/openmeter/productcatalog/addon/CLAUDE.md @@ -0,0 +1,55 @@ +# addon + + + +> Root domain package for product-catalog add-ons: defines the Addon/RateCard/Plan value types, the Repository and Service interfaces, lifecycle events, validators, and not-found errors. Holds no DB or HTTP code itself — those live in adapter/, httpdriver/, and service/ children. + +## Patterns + +**Validate() collects errors then wraps** — Every domain type's Validate() appends into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) rather than returning on first failure. (`func (a Addon) Validate() error { var errs []error; ...; return models.NewNillableGenericValidationError(errors.Join(errs...)) }`) +**Embedded productcatalog meta + AsProductCatalog converter** — Domain Addon embeds productcatalog.AddonMeta and exposes AsProductCatalogAddon() to drop managed fields when delegating to shared productcatalog validation/logic. (`func (a Addon) AsProductCatalogAddon() productcatalog.Addon { return productcatalog.Addon{AddonMeta: a.AddonMeta, RateCards: a.RateCards.AsProductCatalogRateCards()} }`) +**Managed RateCard wraps productcatalog.RateCard with custom JSON** — RateCard embeds productcatalog.RateCard + RateCardManagedFields and implements MarshalJSON/UnmarshalJSON via productcatalog.RateCardSerde, switching on Type (FlatFeeRateCardType/UsageBasedRateCardType) to pick the concrete struct. (`switch s.Type { case productcatalog.FlatFeeRateCardType: serde.RateCard = &productcatalog.FlatFeeRateCard{} ... }`) +**Repository embeds entutils.TxCreator** — Repository interface embeds entutils.TxCreator so the service can drive transactions; Service mirrors Repository methods plus lifecycle ops (PublishAddon/ArchiveAddon/NextAddon). (`type Repository interface { entutils.TxCreator; ListAddons(...); CreateAddon(...); ... }`) +**Input structs own their Validate + IgnoreNonCriticalIssues** — Create/Update inputs embed inputOptions and filter validation issues via issues.WithSeverityOrHigher(models.ErrorSeverityCritical) when IgnoreNonCriticalIssues is set. (`if i.IgnoreNonCriticalIssues { issues = issues.WithSeverityOrHigher(models.ErrorSeverityCritical) }`) +**Typed NotFoundError over GenericNotFoundError** — NewNotFoundError builds a *NotFoundError wrapping models.NewGenericNotFoundError; IsNotFound(err) uses errors.As. Lifecycle validators (IsAddonDeleted, HasAddonStatus) are models.ValidatorFunc[Addon]. (`func IsNotFound(err error) bool { var e *NotFoundError; return errors.As(err, &e) }`) +**Events carry UserID from session + ComposeResourcePath** — Each lifecycle event (create/update/delete/publish/archive) pulls session.GetSessionUserID(ctx) and builds Source/Subject via metadata.ComposeResourcePath(ns, metadata.EntityAddon, id). (`resourcePath := metadata.ComposeResourcePath(e.Addon.Namespace, metadata.EntityAddon, e.Addon.ID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `addon.go` | Addon domain type, Validate, AsProductCatalogAddon | RateCards must validate per-element; Plans is only populated when expanded | +| `ratecard.go` | Managed RateCard, RateCards slice, custom JSON marshalling | UnmarshalJSON must dispatch on RateCardSerde.Type or it errors with 'invalid RateCard type' | +| `repository.go` | Repository interface (persistence contract) | Must embed entutils.TxCreator; do not add business ops here (those go on Service) | +| `service.go` | Service interface + all Input structs and their Validate | Publish/Archive inputs validate EffectiveFrom/To against clock.Now() with a 30s timeJitter | +| `event.go` | AddonCreate/Update/Delete/Publish/Archive events | Delete event requires DeletedAt set; all events emit metadata.EventType{Version:"v1"} | +| `validators.go` | IsAddonDeleted / HasAddonStatus ValidatorFunc[Addon] | Use via Addon.ValidateWith(...) before mutations rather than ad-hoc status checks | +| `errors.go` | Typed NotFoundError + IsNotFound | Adapter/service must convert raw ent errors into this type | + +## Anti-Patterns + +- Returning on first validation failure instead of collecting errs and wrapping with NewNillableGenericValidationError +- Adding DB queries or HTTP decode logic in this root package instead of the adapter/ or httpdriver/ child +- Mutating a RateCard's concrete type without updating MarshalJSON/UnmarshalJSON dispatch on RateCardSerde.Type +- Putting lifecycle/business operations (Publish/Archive/Next) on the Repository instead of Service +- Hand-comparing addons in tests instead of using assert.go helpers (AssertAddonEqual / AssertRateCardEqual) + +## Decisions + +- **Domain types wrap productcatalog.* meta plus managed fields** — Keeps shared catalog logic (pricing, entitlement templates, validation) in productcatalog while this package adds DB-managed identity and persistence-aware JSON. +- **Publish/Archive validate effective dates with a 30s timeJitter** — Tolerates clock skew between client request and server clock.Now() so near-now schedules are not rejected as 'in the past'. + +## Example: Domain Validate aggregating sub-validations + +``` +func (a Addon) Validate() error { + var errs []error + if err := a.NamespacedID.Validate(); err != nil { errs = append(errs, err) } + if err := a.ManagedModel.Validate(); err != nil { errs = append(errs, err) } + if err := a.AddonMeta.Validate(); err != nil { errs = append(errs, err) } + for _, rc := range a.RateCards { if err := rc.Validate(); err != nil { errs = append(errs, err) } } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/productcatalog/addon/adapter/CLAUDE.md b/openmeter/productcatalog/addon/adapter/CLAUDE.md new file mode 100644 index 0000000000..ee1fa29730 --- /dev/null +++ b/openmeter/productcatalog/addon/adapter/CLAUDE.md @@ -0,0 +1,60 @@ +# adapter + + + +> Ent-backed persistence layer for product-catalog add-ons, implementing the addon.Repository interface. Owns all SQL queries, eager-loading, and bidirectional mapping between Ent rows and domain addon types. + +## Patterns + +**Config-validated constructor returning the domain interface** — New(Config) validates Client+Logger via Config.Validate() (collects errs, errors.Join) and returns addon.Repository, not *adapter. Compile-time asserts: var _ models.Validator = (*Config)(nil) and var _ addon.Repository = (*adapter)(nil). (`func New(config Config) (addon.Repository, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Transaction-aware repo methods via entutils.TransactingRepo** — Every Repository method wraps its body in a closure `fn(ctx, a *adapter)` passed to entutils.TransactingRepo[T, *adapter](ctx, a, fn). The adapter implements Tx/WithTx/Self so it rebinds to the tx client carried in ctx. (`return entutils.TransactingRepo[*addon.Addon, *adapter](ctx, a, fn)`) +**Validate params first inside fn** — Each closure begins with `if err := params.Validate(); err != nil { return ..., fmt.Errorf("invalid ... parameters: %w", err) }` before touching the DB. (`if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid create add-on parameters: %w", err) }`) +**Ent predicate filters via package aliases + filter.ApplyToQuery** — Queries use addondb/addonratecarddb/planaddondb aliases for typed predicates and pkg/filter ApplyToQuery for FilterString/FilterULID fields (ID, Key, Name, Currency). Status filters are hand-built EffectiveFrom/EffectiveTo predicate sets. (`query = filter.ApplyToQuery(query, params.Key, addondb.FieldKey)`) +**FromXRow mappers + asAddonRateCardRow** — DB→domain via FromAddonRow/FromAddonRateCardRow/FromPlanAddonRow/FromPlanRow/FromPlanPhaseRow/FromPlanRateCardRow in mapping.go; domain→DB via asAddonRateCardRow. RateCard.Type switches on FlatFeeRateCardType vs UsageBasedRateCardType. (`add, err := FromAddonRow(*addonRow)`) +**Soft-delete and refetch-after-write** — DeleteAddon sets DeletedAt (no hard delete) and list/get exclude DeletedAtIsNil unless IncludeDeleted. Create/Update refetch with WithRatecards(AddonEagerLoadRateCardsFn) to populate subresources before mapping. (`SetDeletedAt(deletedAt); query = query.Where(addondb.DeletedAtIsNil())`) +**Ratecards replaced wholesale, not patched** — UpdateAddon deletes all AddonRateCard rows for the addon then bulk-recreates via rateCardBulkCreate when params.RateCards != nil; if nil, ratecards are left untouched. (`a.db.AddonRateCard.Delete().Where(addonratecarddb.AddonID(add.ID)).Exec(ctx)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor and adapter struct with Tx/WithTx/Self plumbing for transaction.Driver. | WithTx must rebuild via entdb.NewTxClientFromRawConfig; never share the base *entdb.Client across tx boundaries. | +| `addon.go` | Repository CRUD: ListAddons, CreateAddon, GetAddon, UpdateAddon, DeleteAddon plus eager-load funcs AddonEagerLoadRateCardsFn and addonEagerLoadActivePlans. | GetAddon-by-key uses raw sql.Selector MAX(version) subquery for IncludeLatest; status predicates rely on clock.Now() so freeze time in tests. AddonStatusInvalid means EffectiveTo < EffectiveFrom. | +| `mapping.go` | Row<->domain mappers including tax-code backfill (BackfillTaxConfig) and feature-key workaround when only FeatureID is set. | FromAddonRateCardRow needs Edges.FeaturesOrErr/TaxCodeOrErr eagerly loaded or it errors; asAddonRateCardRow requires a known RateCard type (Flat/UsageBased) else returns error. | +| `adapter_test.go` | Postgres integration test (TestPostgresAdapter) driving CRUD + status-filter scenarios through pctestutils.NewTestEnv. | Uses clock.SetTime/ResetTime for status assertions; requires Postgres (POSTGRES_HOST). | + +## Anti-Patterns + +- Calling a.db directly outside a TransactingRepo closure, bypassing tx rebinding in ctx. +- Hard-deleting addon rows instead of SetDeletedAt soft delete. +- Mapping a ratecard row without eager-loading its Features/TaxCode edges (FromAddonRateCardRow will error). +- Returning *adapter from New instead of addon.Repository. +- Patching individual ratecards on update instead of delete-all + bulk recreate. + +## Decisions + +- **Ratecards are eager-loaded via shared AddonEagerLoadRateCardsFn on every read path.** — Domain Addon is incomplete without ratecards; centralizing the eager-load predicate keeps deleted-ratecard filtering consistent. +- **Versioning by (namespace, key, version) with a MAX(version) subquery for latest.** — Add-ons are immutable versions; latest-by-key lookups must resolve the highest version atomically in SQL. + +## Example: Transaction-aware repository method skeleton + +``` +func (a *adapter) GetAddon(ctx context.Context, params addon.GetAddonInput) (*addon.Addon, error) { + fn := func(ctx context.Context, a *adapter) (*addon.Addon, error) { + if err := params.Validate(); err != nil { + return nil, fmt.Errorf("invalid get add-on parameters: %w", err) + } + addonRow, err := a.db.Addon.Query(). + Where(addondb.And(addondb.Namespace(params.Namespace), addondb.ID(params.ID))). + WithRatecards(AddonEagerLoadRateCardsFn).First(ctx) + if err != nil { + if entdb.IsNotFound(err) { + return nil, addon.NewNotFoundError(addon.NotFoundErrorParams{Namespace: params.Namespace, ID: params.ID}) + } + return nil, fmt.Errorf("failed to get add-on: %w", err) + } + return FromAddonRow(*addonRow) +// ... +``` + + diff --git a/openmeter/productcatalog/addon/httpdriver/CLAUDE.md b/openmeter/productcatalog/addon/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..db5b0ca334 --- /dev/null +++ b/openmeter/productcatalog/addon/httpdriver/CLAUDE.md @@ -0,0 +1,59 @@ +# httpdriver + + + +> HTTP transport layer for add-on endpoints, translating api.* request/response types to addon.Service calls via the httptransport framework. The only place add-on REST shape is mapped to/from domain. + +## Patterns + +**httptransport handler triple (decode, business, encode)** — Each endpoint method returns a typed handler built with httptransport.NewHandler / NewHandlerWithArgs taking a request decoder, a service-calling func, and a response encoder. Request/Response/Handler types are declared as type aliases in a `type (...)` block. (`func (h *handler) CreateAddon() CreateAddonHandler { return httptransport.NewHandler(decode, func(ctx, req) { h.service.CreateAddon(ctx, req) }, encoder, opts...) }`) +**Namespace resolution before building request** — Every decode func calls h.resolveNamespace(ctx) first (wrapping namespaceDecoder.GetNamespace) and stamps NamespacedModel/NamespacedID onto the request. (`ns, err := h.resolveNamespace(ctx); req.NamespacedID = models.NamespacedID{Namespace: ns, ID: addonID}`) +**Mapping via FromAddon / AsCreateAddonRequest / AsUpdateAddonRequest** — Domain→API uses FromAddon (which also emits ValidationErrors and switches on a.Status()); API→domain uses AsCreateAddonRequest/AsUpdateAddonRequest delegating ratecard conversion to productcatalog/http AsRateCards. (`return FromAddon(*a)`) +**Shared productcatalog ValidationErrorEncoder per operation** — Every handler appends httptransport.WithOperationName(...) and WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon)) to h.options. (`httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon))`) +**Handler interface composition + private struct** — driver.go exposes a Handler interface embedding AddonHandler (one method per endpoint); the concrete *handler{service, namespaceDecoder, options} is private with var _ Handler = (*handler)(nil) and a New(...) constructor. (`type Handler interface { AddonHandler }`) +**IgnoreNonCriticalIssues on create/update** — Create/Update decoders set req.IgnoreNonCriticalIssues = true so non-critical validation issues surface as response ValidationErrors rather than hard failures. (`req.IgnoreNonCriticalIssues = true`) +**Publish/Archive synthesize EffectivePeriod from clock.Now()** — PublishAddon sets EffectiveFrom = clock.Now(); ArchiveAddon sets EffectiveTo = clock.Now() (API spec does not yet carry these — see TODO(chrisgacsal)). (`EffectivePeriod: productcatalog.EffectivePeriod{EffectiveFrom: lo.ToPtr(clock.Now())}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `addon.go` | All seven endpoint handlers: ListAddons, CreateAddon, UpdateAddon, DeleteAddon, GetAddon, PublishAddon, ArchiveAddon. | GetAddon uses ref.ParseIDOrKey to split ULID vs key; list filters map api slices into filter.FilterString/FilterULID with In set. Status param maps api.AddonStatus -> productcatalog.AddonStatus. | +| `driver.go` | Handler/AddonHandler interfaces, *handler struct, resolveNamespace, and New constructor. | resolveNamespace returns 500 (commonhttp.NewHTTPError) when namespace missing; New takes namespaceDecoder, addon.Service, options. | +| `mapping.go` | FromAddon (domain->api, sets Status + ValidationErrors), AsCreateAddonRequest/AsUpdateAddonRequest (api->domain). | FromAddon must map every productcatalog.AddonStatus or returns an error on default; currency validated via currency.Code(a.Currency).Validate(). | + +## Anti-Patterns + +- Building a request without first calling h.resolveNamespace and stamping the namespace. +- Calling adapter/Ent directly instead of going through h.service (addon.Service). +- Hand-rolling JSON encoding instead of commonhttp.JSONResponseEncoderWithStatus / EmptyResponseEncoder. +- Omitting the productcataloghttp.ValidationErrorEncoder error encoder on a new endpoint. +- Mapping ratecards locally instead of reusing productcatalog/http AsRateCards/FromRateCard. + +## Decisions + +- **Request/Response types are aliases of addon.*Input / api.* rather than new structs.** — Keeps the transport layer a thin adapter; the service owns the canonical input shape. +- **EffectivePeriod for publish/archive is set server-side from clock.Now().** — TypeSpec API does not yet expose effective dates (documented TODOs); clock injection keeps it testable. + +## Example: Endpoint handler with namespace resolution and validation error encoder + +``` +func (h *handler) CreateAddon() CreateAddonHandler { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (CreateAddonRequest, error) { + body := api.AddonCreate{} + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CreateAddonRequest{}, err } + ns, err := h.resolveNamespace(ctx) + if err != nil { return CreateAddonRequest{}, err } + req, err := AsCreateAddonRequest(body, ns) + if err != nil { return CreateAddonRequest{}, err } + req.IgnoreNonCriticalIssues = true + return req, nil + }, + func(ctx context.Context, request CreateAddonRequest) (CreateAddonResponse, error) { + a, err := h.service.CreateAddon(ctx, request) + if err != nil { return CreateAddonResponse{}, err } +// ... +``` + + diff --git a/openmeter/productcatalog/addon/service/CLAUDE.md b/openmeter/productcatalog/addon/service/CLAUDE.md new file mode 100644 index 0000000000..65560c876c --- /dev/null +++ b/openmeter/productcatalog/addon/service/CLAUDE.md @@ -0,0 +1,61 @@ +# service + + + +> Business-logic service implementing addon.Service: version lifecycle (create/publish/archive), validation, feature & tax-code resolution, transactional orchestration over addon.Repository, and event publishing. + +## Patterns + +**Config-validated constructor returning addon.Service** — New(Config) requires Adapter, FeatureResolver, TaxCode, Logger, Publisher (each nil-checked, returns errors.New). var _ addon.Service = (*service)(nil). Service holds adapter/taxCode/logger/publisher/featureResolver. (`func New(config Config) (addon.Service, error) { if config.Adapter == nil { return nil, errors.New("add-on adapter is required") } ... }`) +**transaction.Run wrapping for mutations** — Write methods (Create/Update/Delete/Publish/Archive) run their closure via transaction.Run(ctx, s.adapter, fn); read methods (List/Get) just call fn(ctx) directly without a transaction. (`return transaction.Run(ctx, s.adapter, fn)`) +**Validate params then re-validate domain status before mutating** — Each method validates params, then loads the addon and calls add.AsProductCatalogAddon().ValidateWith(ValidateAddonWithStatus(...)) to enforce status gates (e.g. update only Draft, delete only Draft/Archived). (`add.AsProductCatalogAddon().ValidateWith(productcatalog.ValidateAddonWithStatus(productcatalog.AddonStatusDraft))`) +**Feature + tax-code resolution before persisting ratecards** — Create/Update resolve features via featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, ns, rateCards) and tax codes via s.resolveTaxCodes -> productcatalog.ResolveTaxConfig, then merge resolved RateCardMeta back via rc.Merge. (`featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.RateCards)`) +**Single-draft + auto-increment version invariant** — CreateAddon lists all versions via getAddonVersions, rejects if addonVersions.HasDraft() (NewGenericValidationError), and sets params.Version = Latest().Version + 1. addonVersions implements sort.Interface (Len/Less/Swap/Sort/Latest/HasDraft). (`if versions.HasDraft() { return nil, models.NewGenericValidationError(...) }; params.Version = lo.FromPtr(versions.Latest()).Version + 1`) +**Publish archives previous active version then sets EffectivePeriod** — PublishAddon validates Publishable() + ValidateAddonWithFeatures, and for Version>1 looks up the active version by key and ArchiveAddon's it at EffectiveFrom before updating the new version's EffectivePeriod. (`s.ArchiveAddon(ctx, addon.ArchiveAddonInput{NamespacedID: ..., EffectiveTo: lo.FromPtr(params.EffectiveFrom)})`) +**Emit eventbus event after every mutation** — After each successful write the service publishes via s.publisher.Publish(ctx, addon.NewAddonCreateEvent/Update/Delete/Publish event); a publish failure fails the whole transaction. (`event := addon.NewAddonCreateEvent(ctx, aa); err = s.publisher.Publish(ctx, event)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config struct, New constructor with nil-checks, and the private service struct + addon.Service assertion. | All five collaborators are mandatory; FeatureResolver is productcatalog.FeatureResolver, TaxCode is taxcode.Service, Publisher is eventbus.Publisher. | +| `addon.go` | All service methods (List/Create/Get/Update/Delete/Publish/Archive) plus helpers resolveTaxCodes, getAddonVersions, and addonVersions sort type. | UpdateAddon zeroes params.EffectivePeriod (state changes only via Publish/Archive). DeleteAddon requires Plans expanded (Expand.PlanAddons) and refuses delete if any active plan assignment exists. | +| `service_test.go` | Integration test TestAddonService over pctestutils.NewTestEnv covering create/publish/archive lifecycle with features, meters, tax codes. | Requires Postgres; builds features per meter via NewTestFeatureFromMeter and a real taxcode entity before referencing TaxConfig.TaxCodeID. | +| `taxcode_test.go` | Tests stripe-code -> TaxCode entity resolution and that changing a stripe code creates a new TaxCode while preserving the old entity. | Relies on resolveTaxCodes creating TaxCode entities lazily; old entities are never deleted on code change. | + +## Anti-Patterns + +- Mutating addon state through UpdateAddon's EffectivePeriod instead of Publish/Archive (it is zeroed). +- Skipping the AsProductCatalogAddon().ValidateWith status gate before a mutation. +- Calling s.adapter mutations outside transaction.Run, losing atomicity with event publishing. +- Creating a second draft version (violates single-draft invariant enforced by HasDraft). +- Persisting ratecards before resolving features/tax codes, leaving FeatureID/TaxCodeID unset. + +## Decisions + +- **Event publish happens inside the same transaction as the write.** — Guarantees no event is emitted for a rolled-back mutation; a publish error aborts the change. +- **Versions are immutable; publish archives the prior active version rather than editing it.** — Preserves historical add-on definitions and keeps exactly one active version per key. +- **Tax-code resolution is lazy and additive (new stripe code -> new TaxCode entity).** — Avoids mutating tax codes shared by historical versions; old entities stay valid for archived add-ons. + +## Example: Mutating service method with validation, resolution, transaction, and event publish + +``` +func (s service) CreateAddon(ctx context.Context, params addon.CreateAddonInput) (*addon.Addon, error) { + fn := func(ctx context.Context) (*addon.Addon, error) { + if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid create add-on params: %w", err) } + versions, err := s.getAddonVersions(ctx, params.Namespace, params.Key) + if err != nil { return nil, err } + if versions.HasDraft() { return nil, models.NewGenericValidationError(fmt.Errorf("only a single draft version is allowed for add-on")) } + params.Version = lo.FromPtr(versions.Latest()).Version + 1 + if len(params.RateCards) > 0 { + if err = featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.RateCards); err != nil { return nil, err } + if err = s.resolveTaxCodes(ctx, params.Namespace, ¶ms.RateCards); err != nil { return nil, err } + } + aa, err := s.adapter.CreateAddon(ctx, params) + if err != nil { return nil, err } + if err = s.publisher.Publish(ctx, addon.NewAddonCreateEvent(ctx, aa)); err != nil { return nil, err } + return aa, nil +// ... +``` + + diff --git a/openmeter/productcatalog/driver/CLAUDE.md b/openmeter/productcatalog/driver/CLAUDE.md new file mode 100644 index 0000000000..269cf91425 --- /dev/null +++ b/openmeter/productcatalog/driver/CLAUDE.md @@ -0,0 +1,58 @@ +# driver + + + +> HTTP transport layer (package productcatalogdriver) for the feature API. Wires feature.FeatureConnector + meter/llmcost services into httptransport handlers and maps between api.* and feature.* types. + +## Patterns + +**Handler interface + handlers struct** — FeatureHandler exposes Get/Create/List/DeleteFeature; featureHandlers holds connector, namespaceDecoder, meterService, llmcostService. New handlers go through NewFeatureHandler. (`func NewFeatureHandler(connector feature.FeatureConnector, namespaceDecoder, meterService, llmcostService, options...) FeatureHandler`) +**httptransport three-stage handlers** — Each endpoint is NewHandler/NewHandlerWithArgs(decodeRequest, businessLogic, responseEncoder, options...) with WithOperationName and an error encoder. (`httptransport.NewHandlerWithArgs(decode, exec, commonhttp.JSONResponseEncoder, ...WithOperationName("getFeature"))`) +**Namespace resolution from context** — Every decode step calls h.resolveNamespace(ctx) via namespaceDecoder.GetNamespace; missing namespace is a 500. (`ns, err := h.resolveNamespace(ctx)`) +**Centralized error encoder** — getErrorEncoder() in errors.go maps each feature.*Error / meter error to an HTTP status via commonhttp.HandleErrorIfTypeMatches; attach it with WithErrorEncoder. (`HandleErrorIfTypeMatches[*feature.FeatureNotFoundError](ctx, http.StatusNotFound, err, w)`) +**API<->domain mapping in parser.go** — MapFeatureToResponse, MapFeatureCreateInputsRequest, and domainUnitCostToAPI/apiUnitCostToDomain own all api.Feature translation; handlers call these, not inline conversions. (`resp, err := MapFeatureToResponse(*feat)`) +**MeterSlug resolved to MeterID at the boundary** — CreateFeature decode resolves parsedBody.MeterSlug via meterService.GetMeterByIDOrSlug into a meterID before building inputs. (`m, err := h.meterService.GetMeterByIDOrSlug(ctx, meter.GetMeterInput{Namespace: ns, IDOrSlug: *parsedBody.MeterSlug})`) +**List dual-shape response** — ListFeatures returns commonhttp.Union of []api.Feature (legacy) vs pagination.Result; selection driven by params.Page.IsZero(). (`if params.Page.IsZero() { response.Option1 = &mapped } else { response.Option2 = ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `feature.go` | FeatureHandler interface, featureHandlers, and all four endpoint definitions. | DeleteFeature uses operation.AsNoResponseOperation(connector.ArchiveFeature); LLM pricing enrichment only runs when UnitCost.Type==LLM and llmcostService!=nil; list rejects PageSize>1000. | +| `parser.go` | api<->feature mapping (response + create inputs + unit cost). | AdvancedMeterGroupByFilters takes precedence over legacy MeterGroupByFilters; unit cost conversion returns errors that must propagate. | +| `errors.go` | getErrorEncoder mapping domain errors to HTTP status codes. | Add new feature error types here or they fall through to a generic 500. | + +## Anti-Patterns + +- Building api.Feature inline instead of MapFeatureToResponse / parser.go helpers +- Reading the namespace directly instead of resolveNamespace(ctx) +- Adding endpoints without WithOperationName or without registering errors in getErrorEncoder +- Passing meter slug through to the connector instead of resolving it to a meter ID first + +## Decisions + +- **Package is named productcatalogdriver, not driver** — Avoids collisions and matches the project's *driver HTTP-layer naming convention. +- **List endpoint returns a Union of slice vs paginated result** — Preserves the legacy un-paginated v1 response shape while supporting page-based pagination. + +## Example: Defining an httptransport handler with namespace + error encoder + +``` +func (h *featureHandlers) GetFeature() GetFeatureHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, featureID string) (models.NamespacedID, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return models.NamespacedID{}, err } + return models.NamespacedID{Namespace: ns, ID: featureID}, nil + }, + func(ctx context.Context, id models.NamespacedID) (api.Feature, error) { + feat, err := h.connector.GetFeature(ctx, id.Namespace, id.ID, feature.IncludeArchivedFeatureFalse) + if err != nil { return api.Feature{}, err } + return MapFeatureToResponse(*feat) + }, + commonhttp.JSONResponseEncoder, + httptransport.AppendOptions(h.options, httptransport.WithErrorEncoder(getErrorEncoder()), httptransport.WithOperationName("getFeature"))..., + ) +// ... +``` + + diff --git a/openmeter/productcatalog/feature/CLAUDE.md b/openmeter/productcatalog/feature/CLAUDE.md new file mode 100644 index 0000000000..c502032b52 --- /dev/null +++ b/openmeter/productcatalog/feature/CLAUDE.md @@ -0,0 +1,56 @@ +# feature + + + +> Core feature domain: the Feature aggregate plus FeatureConnector (business logic) and FeatureRepo (persistence contract). Highest-fanin sub-package — billing, entitlement, subscription, and notification all depend on it. + +## Patterns + +**Connector validates, repo persists** — featureConnector wraps FeatureRepo + meterService + eventbus.Publisher. All validation (meter aggregation, unit cost, key-not-ULID, key uniqueness) happens in the connector before calling featureRepo. (`func NewFeatureConnector(featureRepo FeatureRepo, meterService meterpkg.Service, publisher eventbus.Publisher) FeatureConnector`) +**Publish domain event after every mutation** — Create/Update/Archive publish NewFeatureCreateEvent/UpdateEvent/ArchiveEvent via publisher.Publish; event names live in event.go (feature.created/updated/archived, v1). (`c.publisher.Publish(ctx, NewFeatureCreateEvent(ctx, &createdFeature))`) +**Validate() collects errors via NewNillableGenericValidationError** — Input structs (UpdateFeatureInputs, ListFeaturesParams, ArchiveFeatureInput, FeatureOrderBy) gather into []error and return models.NewNillableGenericValidationError(errors.Join(...)). (`return models.NewNillableGenericValidationError(errors.Join(errs...))`) +**Typed domain errors** — feature.go defines FeatureNotFoundError, FeatureWithNameAlreadyExistsError, FeatureInvalidMeterAggregationError, FeatureInvalidFiltersError, ForbiddenError — return these (HTTP layer maps them). (`return Feature{}, &FeatureWithNameAlreadyExistsError{Name: feature.Key, ID: found.ID}`) +**Latest-by-key feature resolution** — ResolveFeatureMeters/getLastFeatures resolve a key to the latest (preferring unarchived, else most-recently-archived) feature while keeping explicit IDs addressable; uses the lastEntityAccessor[Feature] abstraction. (`func getLastFeatures(features []Feature) map[string]Feature { return getLastEntity(features, featureAccessor{}) }`) +**UnitCost is a typed sum (manual | llm) with two-stage validation** — UnitCost.Validate() enforces type/field exclusivity; ValidateWithMeter(meter) additionally checks LLM property names exist in meter.GroupBy. LLM cost requires an associated meter. (`if err := feature.UnitCost.ValidateWithMeter(*resolvedMeter); err != nil { ... }`) +**MeterGroupByFilters legacy<->filter conversions** — ConvertMapStringToMeterGroupByFilters / ConvertMeterGroupByFiltersToMapString bridge the legacy map[string]string and filter.FilterString forms; the latter returns nil unless all filters are pure Eq. (`result[k] = filter.FilterString{Eq: &v}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `connector.go` | FeatureConnector interface + featureConnector business logic and input/param structs. | TODO marks this for migration to the service pattern; CreateFeature normalizes MeterID via the meter service and rejects ULID-shaped keys; validMeterAggregations whitelist gates feature creation. | +| `feature.go` | Feature aggregate, Validate(), typed errors, MeterGroupByFilters. | MeterSlug is deprecated (v1 only) — prefer MeterID; Feature.Validate requires CreatedAt/UpdatedAt non-zero. | +| `repository.go` | FeatureRepo interface incl. entutils.TxCreator/TxUser. | Adding a repo method requires implementing it in productcatalog/adapter and keeping it tx-aware. | +| `unitcost.go` | UnitCost/ManualUnitCost/LLMUnitCost types, Validate, ValidateWithMeter, LLMTokenType enum. | Each LLM dimension is exactly-one-of property-or-static-value (mutually exclusive); token_type must be in the valid set (input/output/cache_read/cache_write/reasoning/request/response). | +| `featuremeter.go` | FeatureMeter/FeatureMeters collection + ResolveFeatureMeters (latest-by-key resolution joined with meters). | Resolution lists with IncludeArchived=true then picks the latest; requireMeter=true errors if a feature has no meter. | +| `event.go` | feature.created/updated/archived events with EventName/EventMetadata/Validate. | ArchiveEvent.Validate requires ArchivedAt set; EventMetadata.Time differs per event (CreatedAt/UpdatedAt/ArchivedAt). | + +## Anti-Patterns + +- Mutating features through FeatureRepo directly, bypassing the connector's validation and event publishing +- Returning generic errors where a typed feature.*Error exists (breaks HTTP status mapping) +- Allowing a ULID-shaped feature Key (explicitly rejected to keep ID/key slots distinguishable) +- Configuring LLM UnitCost without an associated meter or with both property and static value set +- Treating MeterSlug as authoritative instead of MeterID + +## Decisions + +- **Features are archived (ArchivedAt), never versioned or hard-deleted** — Features are referenced by ID with no publish-new-version action, so active plan/subscription references brick changes either way; archiving keeps history addressable by ID while key resolves to latest. +- **Key resolution prefers unarchived then most-recently-archived** — Lets callers reference a feature by stable key while old versions stay reachable by explicit ID (see featuremeter_test cases). +- **FeatureConnector kept as a connector, not yet a service** — Explicit TODO to refactor to the standard service pattern; new code should not entrench the connector shape further. + +## Example: Validating and creating a feature with event publication + +``` +// in featureConnector.CreateFeature +if _, err := ulid.Parse(feature.Key); err == nil { + return Feature{}, models.NewGenericValidationError(fmt.Errorf("Feature key cannot be a valid ULID")) +} +createdFeature, err := c.featureRepo.CreateFeature(ctx, feature) +if err != nil { return Feature{}, err } +if err := c.publisher.Publish(ctx, NewFeatureCreateEvent(ctx, &createdFeature)); err != nil { + return createdFeature, fmt.Errorf("failed to publish feature created event: %w", err) +} +``` + + diff --git a/openmeter/productcatalog/featureresolver/CLAUDE.md b/openmeter/productcatalog/featureresolver/CLAUDE.md new file mode 100644 index 0000000000..05a14d018d --- /dev/null +++ b/openmeter/productcatalog/featureresolver/CLAUDE.md @@ -0,0 +1,44 @@ +# featureresolver + + + +> Thin resolution layer implementing productcatalog.FeatureResolver over feature.FeatureConnector. Resolves rate-card feature ID/key references to concrete features and back-fills resolved IDs onto rate cards. + +## Patterns + +**Constructor returns the productcatalog interface** — New(service feature.FeatureConnector) returns productcatalog.FeatureResolver; nil service is an error. (`func New(service feature.FeatureConnector) (productcatalog.FeatureResolver, error)`) +**Namespaced wrapper over namespace-explicit core** — resolver.WithNamespace returns namespacedResolver that forwards to resolver.Resolve/BatchResolve with the bound namespace; core methods always take namespace explicitly. (`func (r *resolver) WithNamespace(ns string) productcatalog.NamespacedFeatureResolver`) +**BatchResolve via pagination.CollectAll** — BatchResolve pages through ListFeatures (IncludeArchived=false) with pagination.NewPaginator/CollectAll and returns a map keyed by both ID and Key, nil for misses. (`pagination.CollectAll(ctx, pagination.NewPaginator(func(ctx, page){ return r.service.ListFeatures(ctx, feature.ListFeaturesParams{IDsOrKeys: idsOrKeys, ...}) }), min(len(idsOrKeys), 100))`) +**Resolve enforces ID/key slot correctness** — Resolve returns GenericNotFoundError for misses and GenericConflictError when a value resolves to a feature whose ID/Key doesn't match the requested slot (id-is-actually-a-key etc.). (`if f.ID != *id { return nil, models.NewGenericConflictError(...) }`) +**ResolveFeaturesForRateCards mutates in place with field-prefixed errors** — Iterates *RateCards, BatchResolves all feature IDs+keys, then rc.SetFeature(&f.ID, &f.Key); collects models.ErrorWithFieldPrefix(ratecards[key]) into a NillableGenericValidationError. (`rc.SetFeature(&(f).ID, &(f).Key)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `resolver.go` | resolver/namespacedResolver implementing FeatureResolver/NamespacedFeatureResolver. | Header note says this should live under feature/ after refactor; Resolve distinguishes NotFound vs Conflict — preserve both error types. | +| `ratecard.go` | ResolveFeaturesForRateCards: batch-resolve and back-fill feature refs on rate cards. | Uses productcatalog.ErrRateCardFeatureNotFound / ErrRateCardFeatureMismatch; skips rate cards without HasFeature(); errors carry the ratecard.key field selector. | +| `ratecard_test.go` | DB-backed tests via pctestutils.NewTestEnv covering success/not-found/mismatch/wrong-slot. | Exercises the id-in-key-slot and key-in-id-slot mismatch cases — keep those guards intact. | + +## Anti-Patterns + +- Reimplementing feature lookup against the repo instead of going through FeatureResolver +- Collapsing NotFound and Conflict into one error (tests assert each distinctly) +- Resolving rate cards that lack a feature (must skip when !rc.HasFeature()) +- Dropping the field-prefix on rate-card resolution errors (callers rely on ratecard.key context) + +## Decisions + +- **Resolver lives outside the feature package** — Explicit NOTE: should move under feature/ post-refactor; kept separate to avoid the connector's pending service migration. +- **BatchResolve keys results by both ID and key** — Callers (rate cards) reference features by either slot, and a single map lets the caller look up whichever it holds. + +## Example: Resolving and back-filling features onto rate cards + +``` +resolver, _ := featureresolver.New(featureConnector) +if err := featureresolver.ResolveFeaturesForRateCards(ctx, resolver, namespace, rateCards); err != nil { + return err // NillableGenericValidationError wrapping ErrRateCardFeatureNotFound/Mismatch +} +``` + + diff --git a/openmeter/productcatalog/http/CLAUDE.md b/openmeter/productcatalog/http/CLAUDE.md new file mode 100644 index 0000000000..194236883e --- /dev/null +++ b/openmeter/productcatalog/http/CLAUDE.md @@ -0,0 +1,45 @@ +# http + + + +> Shared API<->domain mapping (package http) for productcatalog value types — rate cards, prices, entitlement templates, tax config, discounts. Reused by plan, addon, planaddon, subscription, and billing HTTP drivers. + +## Patterns + +**FromX / AsX mapping convention** — FromRateCard/FromTaxConfig/FromEntitlementTemplate map domain->api; AsRateCard/AsFlatFeeRateCard/AsUsageBasedRateCard/AsTaxConfig map api->domain. Follow this naming for new conversions. (`func FromRateCard(r productcatalog.RateCard) (api.RateCard, error)`) +**Discriminator-driven union mapping** — Mapping branches on r.Type()/r.Discriminator() (FlatFeeRateCardType, UsageBasedRateCardType) and price.Type() (Flat/Unit/Tiered/Dynamic/Package), using oapi-codegen FromX setters on the union. (`switch price.Type() { case productcatalog.TieredPriceType: ... resp.FromTieredPriceWithCommitments(...) }`) +**Decimal and ISO-duration string conversion** — Amounts cross the boundary as strings (alpacadecimal .String() / decimal.NewFromString); billing cadences as datetime.ISODurationString parsed via Parse/ParsePtrOrNil. (`rc.BillingCadence, err = datetime.ISODurationString(usage.BillingCadence).Parse()`) +**ValidationIssue error encoder per ResourceKind** — ValidationErrorEncoder(kind) extracts models.AsValidationIssues and emits a validationError with a validationErrors extension; resource.go defines ResourceKind constants (plan, add-on). (`http.ValidationErrorEncoder(http.ResourceKindPlan)`) +**Wrap every cast failure with context** — Conversions return fmt.Errorf("failed to cast X: %w", err); never swallow union-cast errors. (`return resp, fmt.Errorf("failed to cast FlatPrice: %w", err)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `mapping.go` | All rate-card / price / entitlement-template / tax / discount conversions in both directions. | UsageBasedRateCard requires a non-nil billing cadence (errors otherwise); DynamicPrice omits Multiplier when equal to DynamicPriceDefaultMultiplier; entitlement template mapping switches on entitlement.EntitlementType*. | +| `errors.go` | ValidationErrorEncoder + validationError carrying ResourceKind and ValidationIssues. | Only fires when models.AsValidationIssues yields issues; returns false (passes through) otherwise. | +| `resource.go` | ResourceKind enum (plan, add-on) used to label validation errors. | Add a kind here before referencing it in a new driver's ValidationErrorEncoder. | + +## Anti-Patterns + +- Passing decimals or durations as floats/raw numbers instead of strings across the API boundary +- Skipping the discriminator switch and casting a union to the wrong concrete type +- Swallowing oapi-codegen FromX/AsX cast errors instead of wrapping with context +- Emitting a 0/empty billing cadence for a UsageBasedRateCard + +## Decisions + +- **Shared mapping lives in one http package consumed by many drivers** — Plan/addon/planaddon/subscription/billing all serialize the same rate-card and price unions, so conversion is centralized to stay consistent. +- **Validation surfaces as a typed validationError with a validationErrors extension** — Lets the HTTP layer return structured per-field issues (models.ValidationIssues) with a stable resource label. + +## Example: Wiring a resource validation error encoder + +``` +import pchttp "github.com/openmeterio/openmeter/openmeter/productcatalog/http" + +httptransport.WithErrorEncoder( + pchttp.ValidationErrorEncoder(pchttp.ResourceKindPlan), +) +``` + + diff --git a/openmeter/productcatalog/plan/CLAUDE.md b/openmeter/productcatalog/plan/CLAUDE.md new file mode 100644 index 0000000000..25b33768cd --- /dev/null +++ b/openmeter/productcatalog/plan/CLAUDE.md @@ -0,0 +1,62 @@ +# plan + + + +> Root domain package for product-catalog Plans: defines Plan/Phase/RateCard/Addon value types, the Repository and Service interfaces, lifecycle events, validators, not-found errors, and custom Plan JSON (de)serialization. DB lives in adapter/, HTTP in httpdriver/, business rules in service/. + +## Patterns + +**ValidateWith + ValidatorFunc composition** — Plan and Phase implement models.CustomValidator and run Validate() via ValidateWith(ValidatePlanMeta(), ValidatePlanPhases()) — each rule is a models.ValidatorFunc[Plan]. (`func (p Plan) Validate() error { return p.ValidateWith(ValidatePlanMeta(), ValidatePlanPhases()) }`) +**Managed wrappers expose AsProductCatalog* + ManagedFields** — Phase embeds PhaseManagedFields (with PlanID) + productcatalog.Phase; RateCard embeds RateCardManagedFields (with PhaseID); both implement ManagedFields() and AsProductCatalogPhase()/converters. (`func (p Phase) AsProductCatalogPhase() productcatalog.Phase { return p.Phase }`) +**Custom Plan JSON with raw-message rate cards** — serializer.go defines planAlias/phaseAlias/rateCardAlias and marshals each rate card's Price and EntitlementTemplate as json.RawMessage to control nested shape, avoiding recursive MarshalJSON. (`rateCard := rateCardAlias{Type: rc.Type(), Key: rc.Key(), Price: priceJSON, EntitlementTemplate: entitlementTemplateJSON}`) +**Repository embeds entutils.TxCreator; Service adds lifecycle** — Repository is CRUD; Service mirrors it plus PublishPlan/ArchivePlan/NextPlan. OrderBy is a string enum with Values()+Validate(). (`type Service interface { ...CreatePlan; PublishPlan; ArchivePlan; NextPlan }`) +**Field-prefixed phase validation errors** — ValidatePlanPhases wraps each phase error with the phase Key so callers see which phase failed. (`errs = append(errs, fmt.Errorf("invalid plan phase %q: %s", phase.Key, err))`) +**Typed NotFoundError + lifecycle events** — NewNotFoundError builds messages from namespace/id/key/version; events (PlanCreate/Update/Delete/Publish/Archive) use metadata.EntityPlan and session.GetSessionUserID(ctx). (`metadata.ComposeResourcePath(e.Plan.Namespace, metadata.EntityPlan, e.Plan.ID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `plan.go` | Plan type, ValidateWith, AsProductCatalogPlan, ValidatePlanMeta/Phases | Addons slice is only populated when expanded; phase validation is per-phase, error-prefixed | +| `phase.go` | Phase + PhaseManagedFields + ManagedPhase interface | Managed phase Validate requires PlanID set; Equal handles both Phase and productcatalog.Phase variants | +| `ratecard.go` | Managed RateCard with PhaseID + custom JSON | UnmarshalJSON dispatches on RateCardSerde.Type; missing type yields 'invalid RateCard type' | +| `serializer.go` | Plan MarshalJSON/UnmarshalJSON via aliases + raw messages | Don't call json.Marshal(p) on Plan inside its own MarshalJSON — use planAlias to avoid recursion | +| `service.go` | Service interface + Input structs/Validate | OrderBy enum must stay in sync with Values(); effective-date inputs use 30s timeJitter vs clock.Now() | +| `repository.go` | Repository persistence contract (entutils.TxCreator) | No lifecycle methods here; keep them on Service | +| `event.go` | Plan lifecycle events | Delete event requires Plan.DeletedAt; all events are v1 | +| `assert.go` | Test equality helpers (AssertPlanEqual, AssertPlanPhasesEqual) | Generic over productcatalog.Phase | Phase; key-based map comparison, not slice-order | + +## Anti-Patterns + +- Implementing Plan.MarshalJSON by calling json.Marshal on Plan directly (infinite recursion) instead of using planAlias +- Adding DB or HTTP code in this root package rather than adapter/ or httpdriver/ +- Bypassing ValidateWith/ValidatorFunc composition with ad-hoc inline checks in Plan/Phase Validate +- Constructing a managed Phase/RateCard without PlanID/PhaseID (Validate will reject as 'reference not set') +- Putting PublishPlan/ArchivePlan/NextPlan on Repository instead of Service + +## Decisions + +- **Rate-card Price and EntitlementTemplate serialize as json.RawMessage** — These are polymorphic (multiple price/template kinds); raw-message passthrough preserves the discriminated shape without the parent serializer needing to know every variant. +- **Managed wrappers (Phase/RateCard) separate identity from catalog value type** — productcatalog.* holds reusable plan-shape logic; this package adds DB-managed PlanID/PhaseID/timestamps and equality without polluting the shared types. + +## Example: Composed validation via ValidatorFunc + +``` +func (p Plan) Validate() error { + return p.ValidateWith(ValidatePlanMeta(), ValidatePlanPhases()) +} + +func ValidatePlanPhases() models.ValidatorFunc[Plan] { + return func(p Plan) error { + var errs []error + for _, phase := range p.Phases { + if err := phase.Validate(); err != nil { + errs = append(errs, fmt.Errorf("invalid plan phase %q: %s", phase.Key, err)) + } + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) + } +} +``` + + diff --git a/openmeter/productcatalog/plan/adapter/CLAUDE.md b/openmeter/productcatalog/plan/adapter/CLAUDE.md new file mode 100644 index 0000000000..b97348ed8d --- /dev/null +++ b/openmeter/productcatalog/plan/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Ent-backed persistence layer implementing plan.Repository for Plans, PlanPhases, and PlanRateCards. All DB access for the plan domain flows through here; the service layer never touches Ent directly. + +## Patterns + +**Transaction-aware repository methods** — Every public adapter method wraps its body in entutils.TransactingRepo[T, *adapter](ctx, a, fn) so it rebinds to any tx already carried in ctx. The adapter implements Tx/WithTx/Self to participate in transaction.Driver. (`return entutils.TransactingRepo[*plan.Plan, *adapter](ctx, a, fn)`) +**Config struct + Validate + New returning interface** — Constructor New(Config) (plan.Repository, error) validates Config (Client and Logger required) before building the unexported adapter struct. var _ plan.Repository = (*adapter)(nil) enforces the contract. (`func New(config Config) (plan.Repository, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**FromXRow / asXRow mapping functions in mapping.go** — Ent row -> domain conversion lives in exported FromPlanRow/FromAddonRow/fromPlanPhaseRow/fromPlanRateCardRow; domain -> Ent in asPlanRateCardRow. RateCard type switch on r.Type dispatches FlatFee vs UsageBased. (`func FromPlanRow(p entdb.Plan) (*plan.Plan, error)`) +**Eager-load edges via OrErr to detect unloaded relations** — Mapping uses p.Edges.AddonsOrErr() / RatecardsOrErr() / TaxCodeOrErr() to distinguish 'not loaded' (set nil) from real data; queries attach WithPhases/WithRatecards using shared eager-load funcs (rateCardEagerLoadFeaturesFn, rateCardEagerLoadTaxCodesFn, planPhaseEagerLoadRateCardsFn). (`addons, err := p.Edges.AddonsOrErr(); if err != nil { pp.Addons = nil }`) +**Status filtering via EffectivePeriod predicates** — ListPlans translates productcatalog.PlanStatus values into Ent predicates over EffectiveFrom/EffectiveTo against clock.Now(); Active/Draft/Scheduled/Archived/Invalid each map to a distinct predicate combined with plandb.Or. (`plandb.And(plandb.EffectiveFromLTE(now), plandb.Or(plandb.EffectiveToGTE(now), plandb.EffectiveToIsNil()))`) +**Bulk RateCard creation under phase create** — createPhase builds child rate cards with rateCardBulkCreate then CreateBulk(...).Exec, re-queries the phase with eager loads, and maps it back. TaxConfig/TaxCodeID/TaxBehavior and Price are set conditionally (only when non-nil). (`bulk, err := rateCardBulkCreate(a.db.PlanRateCard, params.RateCards, planPhaseRow.ID, params.Namespace)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config/New constructor + adapter struct + Tx/WithTx/Self transaction plumbing | Both Client and Logger are required; New returns plan.Repository not *adapter. | +| `mapping.go` | Ent<->domain conversion for Plan/Addon/PlanAddon/RateCard/Phase | BackfillTaxConfig must be called to reconcile legacy TaxConfig with new TaxBehavior/TaxCode columns; FeatureKey is backfilled from the loaded feature edge when only FeatureID is set. | +| `phase.go` | createPhase + createPhaseInput validation + rateCardBulkCreate | Index is uint8 in DB (SetIndex(uint8(...))); validate Namespace/Key/PlanID/Name/Index>=0 before insert. | +| `plan.go` | ListPlans/CreatePlan/DeletePlan and other Plan CRUD with status-filter predicates | CreatePlan defaults Version to 1; OrderBy switch falls through to ByID; phases are created one-by-one via a.createPhase inside the same tx. | +| `adapter_test.go` | Postgres integration test via pctestutils.NewTestEnv exercising create/get/list/update/delete/status-filter | Uses env.Plan vs env.PlanRepository (service vs raw repo) deliberately; SettlementMode persistence is asserted on the repo path. | + +## Anti-Patterns + +- Calling a.db.* outside an entutils.TransactingRepo/TransactingRepoWithNoValue wrapper, breaking tx propagation from ctx +- Returning the concrete *adapter from New instead of plan.Repository +- Reading p.Edges.X directly without the *OrErr guard, conflating 'not loaded' with 'empty' +- Skipping BackfillTaxConfig when mapping rate cards, leaving legacy TaxConfig inconsistent with TaxBehavior/TaxCode columns +- Encoding business rules (status transitions, version increment policy) here instead of the service layer + +## Decisions + +- **Adapter owns only persistence + mapping; validation of business invariants lives in service** — Keeps Ent concerns isolated and lets the service compose multi-step transactional workflows (feature/tax resolution, events). +- **Eager-load helpers and OrErr-based loaded detection** — Plans are deep aggregates (phases->ratecards->tax/feature); explicit load signalling avoids N+1 and silent empty-vs-missing bugs. + +## Example: Transaction-aware list with status predicates + +``` +func (a *adapter) ListPlans(ctx context.Context, params plan.ListPlansInput) (pagination.Result[plan.Plan], error) { + fn := func(ctx context.Context, a *adapter) (pagination.Result[plan.Plan], error) { + if err := params.Validate(); err != nil { return pagination.Result[plan.Plan]{}, err } + query := a.db.Plan.Query().WithPhases(planPhaseIncludeDeleted(false), planPhaseEagerLoadRateCardsFn) + // ... apply namespace/status/order predicates ... + paged, err := query.Paginate(ctx, params.Page) + if err != nil { return pagination.Result[plan.Plan]{}, err } + // map paged.Items via FromPlanRow + return response, nil + } + return entutils.TransactingRepo[pagination.Result[plan.Plan], *adapter](ctx, a, fn) +} +``` + + diff --git a/openmeter/productcatalog/plan/httpdriver/CLAUDE.md b/openmeter/productcatalog/plan/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..e5ced95d38 --- /dev/null +++ b/openmeter/productcatalog/plan/httpdriver/CLAUDE.md @@ -0,0 +1,59 @@ +# httpdriver + + + +> HTTP transport layer for the plan API: builds httptransport handlers (List/Create/Get/Update/Delete/Publish/Archive/Next) that decode requests, map API<->domain types, and delegate to plan.Service. Pure transport — no DB, no business rules. + +## Patterns + +**httptransport handler-per-operation with type aliases** — Each operation defines Request/Response/Handler type aliases (Request usually = plan.) and a method returning a httptransport.NewHandler(WithArgs) triple of decode/exec/encode. Service is the only dependency invoked in the exec step. (`type CreatePlanHandler httptransport.Handler[CreatePlanRequest, CreatePlanResponse]`) +**Handler interface aggregation + New constructor** — handler implements the Handler interface (PlanHandler with one method per operation). New(namespaceDecoder, service, credits, featureGate, options...) wires deps; var _ Handler = (*handler)(nil) enforces completeness. (`func New(namespaceDecoder namespacedriver.NamespaceDecoder, service plan.Service, credits appconfig.CreditsConfiguration, featureGate featuregate.Gate, options ...httptransport.HandlerOption) Handler`) +**FromX / AsX mapping convention in mapping.go** — FromPlan/FromPlanPhase map domain->api.*; AsCreatePlanRequest/AsUpdatePlanRequest/AsPlanPhase map api.*->domain. RateCard and metadata mapping is delegated to the shared productcatalog/http package (http.FromRateCard, http.AsRateCards, http.FromMetadata). (`func FromPlan(p plan.Plan) (api.Plan, error)`) +**Namespace resolution + ValidationErrorEncoder per handler** — Every decode step calls h.resolveNamespace(ctx) (500 if missing) before mapping; every handler appends httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(ResourceKindPlan)) and WithOperationName. (`httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindPlan))`) +**Credits feature-gating for CreditOnly settlement** — featuregate.go isCreditsEnabled(ns) checks credits.Enabled, then the optional featuregate.Gate against credits.FeatureFlag. Create/Update reject CreditOnlySettlementMode with a generic validation error when credits are disabled. (`if !creditEnabled && req.SettlementMode == productcatalog.CreditOnlySettlementMode { return ..., models.NewGenericValidationError(...) }`) +**ParseIDOrKey for IDOrKey path params** — Get/Next accept an IDOrKey path arg and use ref.ParseIDOrKey to split into NamespacedID.ID vs Key (ULID detection), so one route serves both lookups. (`idOrKey := ref.ParseIDOrKey(params.IDOrKey)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `driver.go` | Handler/PlanHandler interfaces, handler struct, New constructor, resolveNamespace | Adding an operation requires extending the PlanHandler interface or var _ Handler check fails to compile. | +| `plan.go` | All per-operation handlers (decode/exec/encode) and Request/Response type aliases | Publish/Archive/Next set EffectivePeriod from clock.Now() in the driver (TODO notes spec lacks the field); Create/Update set IgnoreNonCriticalIssues=true. | +| `mapping.go` | FromPlan/FromPlanPhase and AsCreate/AsUpdate/AsPlanPhase converters | asProRatingConfig defaults to Enabled=true + ProRatingModeProratePrices when nil; status mapping returns error on unknown PlanStatus. | +| `featuregate.go` | isCreditsEnabled gate combining credits config and featuregate.Gate | Returns true (gate-open) when gate is nil or FeatureFlag empty but credits.Enabled — only a configured flag actually evaluates per-namespace. | + +## Anti-Patterns + +- Putting business logic (status transitions, version policy) in handlers instead of plan.Service +- Bypassing resolveNamespace and reading the namespace ad hoc +- Hand-mapping RateCards/metadata instead of reusing productcatalog/http helpers +- Omitting WithErrorEncoder(ValidationErrorEncoder(ResourceKindPlan)), so validation errors serialize as generic 500s +- Allowing CreditOnlySettlementMode through without the isCreditsEnabled guard + +## Decisions + +- **Request types alias the service Input structs (CreatePlanRequest = plan.CreatePlanInput)** — Avoids a redundant transport DTO layer; mapping functions populate the same struct the service consumes. +- **Effective period for publish/archive is server-set from clock.Now()** — TypeSpec does not yet expose EffectivePeriod on these requests, so the driver supplies it (tracked by TODO comments). + +## Example: An operation handler with namespace resolution and validation encoder + +``` +func (h *handler) CreatePlan() CreatePlanHandler { + return httptransport.NewHandler( + func(ctx context.Context, r *http.Request) (CreatePlanRequest, error) { + body := api.PlanCreate{} + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CreatePlanRequest{}, err } + ns, err := h.resolveNamespace(ctx) + if err != nil { return CreatePlanRequest{}, err } + req, err := AsCreatePlanRequest(body, ns) + // ... isCreditsEnabled guard, set IgnoreNonCriticalIssues ... + return req, err + }, + func(ctx context.Context, request CreatePlanRequest) (CreatePlanResponse, error) { + p, err := h.service.CreatePlan(ctx, request) + if err != nil { return CreatePlanResponse{}, err } + return FromPlan(*p) +// ... +``` + + diff --git a/openmeter/productcatalog/plan/service/CLAUDE.md b/openmeter/productcatalog/plan/service/CLAUDE.md new file mode 100644 index 0000000000..029cddc53b --- /dev/null +++ b/openmeter/productcatalog/plan/service/CLAUDE.md @@ -0,0 +1,60 @@ +# service + + + +> Business-logic layer implementing plan.Service: enforces plan versioning, lifecycle/status rules, feature and tax-code resolution, event publishing, and transactional orchestration around the adapter. This is where plan invariants live. + +## Patterns + +**Config + New(plan.Service) with required-dependency checks** — service.go validates Adapter, FeatureResolver, Logger, TaxCode, Publisher are non-nil before building the unexported service struct. var _ plan.Service = (*service)(nil) enforces the interface. (`func New(config Config) (plan.Service, error) { if config.Adapter == nil { return nil, errors.New("plan adapter is required") } ... }`) +**transaction.Run around mutating operations** — Create/Delete/Update/Publish wrap their fn in transaction.Run(ctx, s.adapter, fn); read-only ListPlans/GetPlan just call fn(ctx) directly. All adapter calls inside share the tx. (`return transaction.Run(ctx, s.adapter, fn)`) +**Validate -> resolve features/tax -> persist -> publish event** — Mutations call params.Validate(), then featureresolver.ResolveFeaturesForRateCards and s.resolveTaxCodes per phase, then the adapter, then s.publisher.Publish(ctx, plan.NewPlanXEvent(ctx, p)). A failed publish fails the whole tx. (`event := plan.NewPlanCreateEvent(ctx, p); if err := s.publisher.Publish(ctx, event); err != nil { return nil, err }`) +**Status-gated lifecycle transitions** — Delete allows Archived/Scheduled/Draft; Update/Publish allow only Draft/Scheduled; CreatePlan enforces a single Draft version per Key and auto-increments Version. Violations return models.NewGenericValidationError. (`if !lo.Contains(allowedPlanStatuses, planStatus) { return nil, models.NewGenericValidationError(...) }`) +**Field-prefixed validation errors for phase rate cards** — Feature resolution errors are wrapped with models.ErrorWithFieldPrefix using a phases[key=...] FieldSelectorGroup so API clients get precise field paths. (`models.ErrorWithFieldPrefix(phaseFieldSelector, fmt.Errorf("failed to expand features for ratecards...: %w", err))`) +**Publish performs deep cross-aggregate validation** — PublishPlan fetches with Expand{PlanAddons:true}, runs pp.Validate(), ValidatePlanWithFeatures, and per-addon PlanAddon.Validate (ErrPlanHasIncompatibleAddon), collecting errs via errors.Join, then archives the prior active version. (`err = pp.ValidateWith(productcatalog.ValidatePlanWithFeatures(ctx, s.featureResolver.WithNamespace(params.Namespace)))`) +**resolveTaxCodes ensures Stripe tax codes exist before persist** — For each rate card with a TaxConfig, productcatalog.ResolveTaxConfig creates/links a TaxCode entity and populates TaxConfig.TaxCodeID, then rc.Merge applies the resolved meta back onto the typed rate card. (`if err := productcatalog.ResolveTaxConfig(ctx, s.taxCode, namespace, meta.TaxConfig); err != nil { return err }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config, New constructor, service struct, dependency wiring | All five deps (Adapter, FeatureResolver, Logger, TaxCode, Publisher) are mandatory; no slog.Default fallback allowed. | +| `plan.go` | All Service methods: ListPlans/CreatePlan/DeletePlan/GetPlan/UpdatePlan/PublishPlan/ArchivePlan and resolveTaxCodes | UpdatePlan zeroes EffectivePeriod (lifecycle only via Publish/Archive); CreatePlan rejects a second Draft and auto-increments Version; events publish inside the tx. | +| `service_test.go` | Integration tests via pctestutils.NewTestEnv covering plan lifecycle, addons, filters | Builds real meters/features/addons; prefer service-backed fixtures over hand-assembled aggregates. | +| `taxcode_test.go` | Tests for resolveTaxCodes / tax code resolution on rate cards | Asserts TaxCodeID population and TaxCode entity creation per namespace. | + +## Anti-Patterns + +- Calling the adapter for a mutation outside transaction.Run, losing atomicity across phase/feature/tax steps and event publish +- Allowing updates or publishes on Active/Archived plans (status gate must reject) +- Skipping featureresolver.ResolveFeaturesForRateCards or resolveTaxCodes before persisting phases +- Permitting more than one Draft version per plan Key in CreatePlan +- Publishing without Expand{PlanAddons:true}, so add-on compatibility can't be validated + +## Decisions + +- **Versioning and lifecycle rules live in the service, not the adapter or handler** — Single-draft-per-key, version auto-increment, and status-gated transitions are domain invariants that span multiple reads/writes. +- **Event publish happens inside the same transaction as the write** — A failed Publish rolls back the mutation, keeping the event stream consistent with persisted state (outbox-style coupling). +- **EffectivePeriod is mutated only via Publish/Archive, zeroed on Update** — Forces scheduling through dedicated lifecycle operations rather than arbitrary field edits. + +## Example: Mutation: validate, resolve features/tax per phase, persist, publish in one tx + +``` +func (s service) CreatePlan(ctx context.Context, params plan.CreatePlanInput) (*plan.Plan, error) { + fn := func(ctx context.Context) (*plan.Plan, error) { + if err := params.Validate(); err != nil { return nil, err } + // enforce single-draft-per-key + version auto-increment via ListPlans + for idx := range params.Phases { + if err := featureresolver.ResolveFeaturesForRateCards(ctx, s.featureResolver, params.Namespace, ¶ms.Phases[idx].RateCards); err != nil { return nil, err } + if err := s.resolveTaxCodes(ctx, params.Namespace, ¶ms.Phases[idx].RateCards); err != nil { return nil, err } + } + p, err := s.adapter.CreatePlan(ctx, params) + if err != nil { return nil, err } + if err := s.publisher.Publish(ctx, plan.NewPlanCreateEvent(ctx, p)); err != nil { return nil, err } + return p, nil + } + return transaction.Run(ctx, s.adapter, fn) +} +``` + + diff --git a/openmeter/productcatalog/planaddon/CLAUDE.md b/openmeter/productcatalog/planaddon/CLAUDE.md new file mode 100644 index 0000000000..d47b0b0301 --- /dev/null +++ b/openmeter/productcatalog/planaddon/CLAUDE.md @@ -0,0 +1,53 @@ +# planaddon + + + +> Root domain package for the PlanAddon join entity (a plan↔addon assignment): defines the PlanAddon type embedding full plan.Plan and addon.Addon, the Repository/Service interfaces, lifecycle events, not-found errors, and input structs. DB in adapter/, HTTP in httpdriver/, business rules in service/. + +## Patterns + +**PlanAddon embeds full plan.Plan and addon.Addon** — The assignment carries fully-loaded Plan and Addon domain objects (not just IDs); Validate() validates NamespacedID, ManagedModel, Plan, Addon, and AsProductCatalogPlanAddon() in turn. (`type PlanAddon struct { models.NamespacedID; models.ManagedModel; productcatalog.PlanAddonMeta; Plan plan.Plan; Addon addon.Addon }`) +**AsProductCatalogPlanAddon converter** — Maps to productcatalog.PlanAddon by calling Plan.AsProductCatalogPlan() and Addon.AsProductCatalogAddon() so shared catalog validation can run. (`return productcatalog.PlanAddon{PlanAddonMeta: a.PlanAddonMeta, Plan: a.Plan.AsProductCatalogPlan(), Addon: a.Addon.AsProductCatalogAddon()}`) +**ID-or-(plan,addon) dual identification on inputs** — Get/Update/Delete inputs accept either an assignment ID or a (PlanID/IDOrKey, AddonID/IDOrKey) pair; Validate requires both halves of the pair when ID is empty. (`if i.ID == "" { if i.PlanID == "" { errs = append(errs, errors.New("plan id must be provided if assignment id is not provided")) } ... }`) +**Repository embeds entutils.TxCreator; Service mirrors it** — Both interfaces expose List/Create/Delete/Get/Update; no extra lifecycle ops (publish/archive don't exist for assignments). (`type Repository interface { entutils.TxCreator; ListPlanAddons(...); CreatePlanAddon(...); ... }`) +**Equaler with pointer-aware MaxQuantity comparison** — UpdatePlanAddonInput.Equal compares pointer fields (MaxQuantity, FromPlanPhase) carefully, treating nil/non-nil mismatches as not-equal. (`if i.MaxQuantity == nil && p.MaxQuantity != nil { return false }`) +**Events use EntityAddon resource path** — Create/Update/Delete events compose Source/Subject via metadata.EntityAddon (not a dedicated planaddon entity) and pull session.GetSessionUserID(ctx). (`metadata.ComposeResourcePath(e.PlanAddon.Namespace, metadata.EntityAddon, e.PlanAddon.ID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `planaddon.go` | PlanAddon type, Validate, AsProductCatalogPlanAddon | Validate cascades into embedded Plan and Addon — both must be fully loaded or validation fails | +| `service.go` | Service interface + Input structs (Create/Update/Get/Delete/List) | ListPlanAddonsInput.Validate returns nil (no validation); Update/Get/Delete enforce ID-or-pair rule | +| `repository.go` | Repository persistence contract | Embeds entutils.TxCreator; only CRUD, no lifecycle methods | +| `event.go` | PlanAddonCreate/Update/Delete events (v1) | Delete event requires DeletedAt set; events use EntityAddon, not a planaddon entity | +| `errors.go` | Typed NotFoundError keyed by ns/id/plan.idOrKey/addon.idOrKey | Adapter must wrap ent not-found into this type | + +## Anti-Patterns + +- Storing only Plan/Addon IDs on PlanAddon instead of the full embedded plan.Plan/addon.Addon the type expects +- Adding DB or HTTP code in this root package rather than adapter/ or httpdriver/ +- Comparing MaxQuantity/FromPlanPhase without nil-vs-non-nil pointer checks in Equal +- Requiring an assignment ID when callers may legitimately identify by (plan, addon) pair +- Returning a raw ent not-found instead of planaddon.NewNotFoundError + +## Decisions + +- **PlanAddon embeds the full Plan and Addon aggregates** — Compatibility validation (currency, phases, rate cards) needs both complete sides; the adapter eager-loads them so the service can validate the assignment as a whole. +- **Inputs support ID-or-(plan,addon) identification** — API callers reference assignments either by their own ID or by the natural (plan key, addon key) pair; both must resolve to the same row. + +## Example: Validating an assignment by cascading into both sides + +``` +func (a PlanAddon) Validate() error { + var errs []error + if err := a.NamespacedID.Validate(); err != nil { errs = append(errs, err) } + if err := a.ManagedModel.Validate(); err != nil { errs = append(errs, err) } + if err := a.Plan.Validate(); err != nil { errs = append(errs, err) } + if err := a.Addon.Validate(); err != nil { errs = append(errs, err) } + if err := a.AsProductCatalogPlanAddon().Validate(); err != nil { errs = append(errs, err) } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/openmeter/productcatalog/planaddon/adapter/CLAUDE.md b/openmeter/productcatalog/planaddon/adapter/CLAUDE.md new file mode 100644 index 0000000000..d8ee9f6f8c --- /dev/null +++ b/openmeter/productcatalog/planaddon/adapter/CLAUDE.md @@ -0,0 +1,39 @@ +# adapter + + + +> Ent-backed persistence layer for plan↔addon assignments (the PlanAddon join entity). Implements the planaddon.Repository interface and is the only place that touches the entdb.PlanAddon table. + +## Patterns + +**Transaction-aware repo methods** — Every public method wraps its body in entutils.TransactingRepo[...] so it rebinds to a tx carried in ctx; the inner fn takes (ctx, *adapter). (`return entutils.TransactingRepo[*planaddon.PlanAddon, *adapter](ctx, a, fn)`) +**Transaction driver trio** — adapter implements Tx (HijackTx), WithTx (NewTxClientFromRawConfig), and Self() to satisfy the entutils transactable contract. (`func (a *adapter) WithTx(ctx, tx) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); ... }`) +**Validate params first** — Each method calls params.Validate() before any DB access and wraps the error with namespace/plan.id/addon.id context. (`if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid ...: %w", err) }`) +**Eager-load via shared loader vars** — All reads attach PlanEagerLoadPhasesWithRateCardsWithFeaturesFn and AddonEagerLoadRateCardsWithFeaturesFn so edges (phases→ratecards→features) are populated before mapping. (`query.WithPlan(PlanEagerLoadPhasesWithRateCardsWithFeaturesFn).WithAddon(AddonEagerLoadRateCardsWithFeaturesFn)`) +**Create-then-refetch** — CreatePlanAddon does Save() then re-queries by ID with eager loads to populate sub-resources before mapping to domain. (`planAddonRow, err = a.db.PlanAddon.Query().Where(...).WithPlan(...).WithAddon(...).First(ctx)`) +**Soft delete** — DeletePlanAddon sets DeletedAt = clock.Now().UTC() via UpdateOneID; reads filter planaddondb.DeletedAtIsNil() unless IncludeDeleted. (`a.db.PlanAddon.UpdateOneID(planAddon.ID).SetDeletedAt(deletedAt).Exec(ctx)`) +**Typed not-found errors** — On entdb.IsNotFound, return planaddon.NewNotFoundError(planaddon.NotFoundErrorParams{...}) rather than the raw ent error. (`if entdb.IsNotFound(err) { return nil, planaddon.NewNotFoundError(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config{Client,Logger} + Validate, New() returning planaddon.Repository, and the Tx/WithTx/Self transaction plumbing. | New returns the interface, not *adapter; both Client and Logger are required (validated). | +| `planaddon.go` | All CRUD: ListPlanAddons, CreatePlanAddon, GetPlanAddon, UpdatePlanAddon, DeletePlanAddon plus the two eager-load loader vars. | List builds OR-of-OR predicate trees (plan/addon sub-filters via HasPlanWith/HasAddonWith); PlanKeyVersions loop has a dead planKeyVersionFilters slice that is appended empty — mirror existing style, don't rely on it. Update uses SetOrClearMaxQuantity (nil clears). | +| `mapping.go` | FromPlanAddunRow maps entdb.PlanAddon → planaddon.PlanAddon, delegating to planadapter.FromPlanRow and addonadapter.FromAddonRow for edges. | If Edges.Plan/Edges.Addon is nil it falls back to a stub with only NamespacedID; non-nil-but-cast-nil is treated as an error. | +| `adapter_test.go` | Postgres integration test (TestPostgresAdapter) using pctestutils.NewTestEnv; drives repository directly via env.PlanAddonRepository. | Requires Postgres (POSTGRES_HOST=127.0.0.1) and env.DBSchemaMigrate(t); exercises full plan+addon+feature setup before assignment. | + +## Anti-Patterns + +- Calling a.db directly in a method without wrapping in entutils.TransactingRepo (breaks tx propagation from ctx). +- Reading PlanAddon rows without the shared eager-load loaders, leaving Plan/Addon edges unpopulated for mapping. +- Returning raw entdb errors instead of planaddon.NewNotFoundError on IsNotFound. +- Skipping params.Validate() before DB access. +- Hard-deleting rows instead of setting DeletedAt. + +## Decisions + +- **Repository returns fully eager-loaded domain PlanAddon (with nested plan phases/ratecards/features).** — Callers (service, http) need the full plan and addon shape to validate compatibility and render API responses without N+1 refetches. +- **Create refetches after Save rather than mapping the insert result.** — The insert result lacks edges; a single eager-loaded refetch guarantees a complete domain object. + + diff --git a/openmeter/productcatalog/planaddon/httpdriver/CLAUDE.md b/openmeter/productcatalog/planaddon/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..a3bcddafe3 --- /dev/null +++ b/openmeter/productcatalog/planaddon/httpdriver/CLAUDE.md @@ -0,0 +1,36 @@ +# httpdriver + + + +> HTTP transport layer for plan-addon assignment endpoints (list/create/get/update/delete). Adapts api.* request/response types to the planaddon.Service and back. + +## Patterns + +**httptransport.NewHandlerWithArgs triple** — Each endpoint returns a typed Handler built from (decode→request, service call, response encoder) plus options with WithOperationName and WithErrorEncoder. (`return httptransport.NewHandlerWithArgs(decodeFn, businessFn, commonhttp.JSONResponseEncoderWithStatus[...](http.StatusOK), httptransport.AppendOptions(...))`) +**Request type aliases to service inputs** — Request types are aliases of the service input structs (e.g. CreatePlanAddonRequest = planaddon.CreatePlanAddonInput), avoiding a duplicate struct. (`type ( CreatePlanAddonRequest = planaddon.CreatePlanAddonInput; ... )`) +**Namespace resolution per request** — Decode funcs call h.resolveNamespace(ctx) (via namespacedriver.NamespaceDecoder) and 500 if absent; never trust a body-supplied namespace. (`ns, err := h.resolveNamespace(ctx); req.Namespace = ns`) +**As*/From* mapping functions** — Body→input uses AsCreatePlanAddonRequest/AsUpdatePlanAddonRequest; domain→api uses FromPlanAddon, which also surfaces ValidationErrors via AsProductCatalogPlanAddon().ValidationErrors(). (`resp := api.PlanAddon{ ..., ValidationErrors: http.FromValidationErrors(validationIssues) }`) +**ValidationErrorEncoder per resource kind** — All handlers attach httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon)) so validation issues render as structured HTTP errors. (`httptransport.WithErrorEncoder(productcataloghttp.ValidationErrorEncoder(productcataloghttp.ResourceKindAddon))`) +**Plan/addon identity via path args** — Handlers carry PlanID/AddonID or *IDOrKey through the HandlerWithArgs params struct, not the body; List packs PlanIDOrKey into both PlanIDs and PlanKeys. (`PlanIDs: []string{params.PlanIDOrKey}, PlanKeys: []string{params.PlanIDOrKey}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `driver.go` | Handler/PlanAddonHandler interfaces, the handler struct (service+namespaceDecoder+options), New(), and resolveNamespace. | New takes namespaceDecoder first, then service; resolveNamespace returns 500 (not 401) when namespace missing. | +| `planaddon.go` | The five endpoint constructors (ListPlanAddons/CreatePlanAddon/UpdatePlanAddon/DeletePlanAddon/GetPlanAddon) with request/response type aliases and DefaultPageSize/DefaultPageNumber. | Create uses StatusCreated, Delete uses EmptyResponseEncoder+StatusNoContent; List maps each item through FromPlanAddon and aborts on first cast error. | +| `mapping.go` | FromPlanAddon (domain→api), AsCreatePlanAddonRequest/AsUpdatePlanAddonRequest (api→input), AsMetadata helper. | Update maps a.FromPlanPhase to a pointer (&a.FromPlanPhase) while Create passes it by value — the nil-vs-set semantics matter downstream in the service/adapter merge. | + +## Anti-Patterns + +- Reading namespace from the request body instead of resolveNamespace(ctx). +- Adding an endpoint without WithOperationName and the ValidationErrorEncoder option. +- Defining a new Request struct instead of aliasing the planaddon.* service input. +- Encoding domain objects directly instead of mapping through FromPlanAddon (loses ValidationErrors/Metadata/Annotations translation). + +## Decisions + +- **Request types alias service inputs and the handler delegates straight to planaddon.Service.** — Keeps the HTTP layer a thin transport adapter with no business logic, all validation living in service/adapter. +- **FromPlanAddon attaches AsProductCatalogPlanAddon().ValidationErrors() to the API payload.** — Plan-addon compatibility issues are returned as non-fatal validation errors on GET/LIST rather than failing the request. + + diff --git a/openmeter/productcatalog/planaddon/service/CLAUDE.md b/openmeter/productcatalog/planaddon/service/CLAUDE.md new file mode 100644 index 0000000000..b4afed5bfa --- /dev/null +++ b/openmeter/productcatalog/planaddon/service/CLAUDE.md @@ -0,0 +1,59 @@ +# service + + + +> Business-logic layer for plan-addon assignments: validates plan/addon state and compatibility, orchestrates the adapter, and publishes lifecycle events. Implements planaddon.Service. + +## Patterns + +**transaction.Run around mutations** — Create/Update/Delete wrap their fn in transaction.Run / transaction.RunWithNoValue(ctx, s.adapter, fn); read-only Get/List just invoke fn(ctx). (`return transaction.Run(ctx, s.adapter, fn)`) +**Validate plan/addon state before write** — Plan must pass IsPlanDeleted(clock.Now()) + HasPlanStatus(Draft, Scheduled); addon must pass IsAddonDeleted + HasAddonStatus(Active). Failures become models.NewGenericValidationError. (`p.ValidateWith(plan.IsPlanDeleted(clock.Now()), plan.HasPlanStatus(productcatalog.PlanStatusDraft, productcatalog.PlanStatusScheduled))`) +**Conflict check on create** — CreatePlanAddon pre-fetches by plan+addon and returns models.NewGenericConflictError if an assignment already exists. (`if planAddon != nil && planAddon.Plan.ID == params.PlanID && planAddon.Addon.ID == params.AddonID { return nil, models.NewGenericConflictError(...) }`) +**Map typed errors to generic models errors** — errors.As against plan.NotFoundError / addon.NotFoundError / planaddon.NotFoundError, then return models.NewGenericNotFoundError so the HTTP layer renders a 404. (`if notFound := &(planaddon.NotFoundError{}); errors.As(err, ¬Found) { return nil, models.NewGenericNotFoundError(err) }`) +**Patch-merge mirroring the adapter** — Update reconstructs a productcatalog.PlanAddon by merging params over existing (MaxQuantity always replaced, FromPlanPhase/Metadata/Annotations kept when nil) and validates before persisting — must stay in sync with adapter UpdatePlanAddon. (`fromPlanPhase := planAddon.FromPlanPhase; if params.FromPlanPhase != nil { fromPlanPhase = *params.FromPlanPhase }`) +**Publish lifecycle events** — After each successful mutation, publish via eventbus.Publisher: NewPlanAddonCreateEvent / NewPlanAddonUpdateEvent / NewPlanAddonDeleteEvent; a publish failure fails the whole transaction. (`event := planaddon.NewPlanAddonCreateEvent(ctx, planAddon); s.publisher.Publish(ctx, event)`) +**Scoped structured logging** — Each method derives a logger via s.logger.With("operation", ..., "namespace", ..., ids...) and logs Debug at phase boundaries. (`logger := s.logger.With("operation", "create", "namespace", params.Namespace, "plan.id", params.PlanID, "addon.id", params.AddonID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config{Adapter,Plan,Addon,Logger,Publisher}, New() with explicit non-nil checks, and the service struct. | All five deps are required — New errors if any is nil; service depends on plan.Service and addon.Service (not just the repo) to validate state. | +| `planaddon.go` | The five Service methods. Holds the load-bearing comment block documenting patch-field merge rules that mirror the adapter. | Update's merge rules must match adapter/planaddon.go UpdatePlanAddon exactly (MaxQuantity replace vs FromPlanPhase/Metadata/Annotations keep-when-nil). Delete validates the plan is still Draft/Scheduled before deleting and is idempotent (returns nil if already DeletedAt). | +| `service_test.go` | TestPlanAddonService Postgres integration test via pctestutils.NewTestEnv; full plan+addon+feature lifecycle including the 'PublishedPlan' negative case. | Asserts create fails once the plan is published/active; drives through env.PlanAddon (service) vs env.PlanAddonRepository (adapter). | + +## Anti-Patterns + +- Mutating without wrapping in transaction.Run/RunWithNoValue (publish + write must be atomic). +- Letting the service's Update merge logic drift from the adapter's SetOrClearMaxQuantity / Set*-when-non-nil behavior. +- Returning typed *NotFoundError up the stack instead of models.NewGenericNotFoundError. +- Skipping plan/addon state validation (Draft/Scheduled, Active) before creating or updating an assignment. +- Swallowing publisher errors instead of failing the transaction. + +## Decisions + +- **Service depends on plan.Service and addon.Service, not just the planaddon repository.** — Assignment validity depends on live plan/addon status and compatibility, which only those services can resolve. +- **Update rebuilds and Validate()s a productcatalog.PlanAddon before persisting.** — Catches incompatible patches (e.g. bad FromPlanPhase) before they reach the DB, keeping invalid assignments out of the table. +- **Events publish inside the transaction.** — Guarantees no event is emitted for a write that later rolls back. + +## Example: Service mutation: validate, persist via adapter, publish, all inside a transaction + +``` +func (s service) CreatePlanAddon(ctx context.Context, params planaddon.CreatePlanAddonInput) (*planaddon.PlanAddon, error) { + fn := func(ctx context.Context) (*planaddon.PlanAddon, error) { + if err := params.Validate(); err != nil { return nil, fmt.Errorf("invalid ...: %w", err) } + p, err := s.plan.GetPlan(ctx, plan.GetPlanInput{NamespacedID: models.NamespacedID{Namespace: params.Namespace, ID: params.PlanID}}) + if err != nil { /* map plan.NotFoundError -> models.NewGenericNotFoundError */ } + if err = p.ValidateWith(plan.IsPlanDeleted(clock.Now()), plan.HasPlanStatus(productcatalog.PlanStatusDraft, productcatalog.PlanStatusScheduled)); err != nil { + return nil, models.NewGenericValidationError(err) + } + planAddon, err := s.adapter.CreatePlanAddon(ctx, params) + if err != nil { return nil, err } + if err = s.publisher.Publish(ctx, planaddon.NewPlanAddonCreateEvent(ctx, planAddon)); err != nil { return nil, err } + return planAddon, nil + } + return transaction.Run(ctx, s.adapter, fn) +} +``` + + diff --git a/openmeter/productcatalog/subscription/CLAUDE.md b/openmeter/productcatalog/subscription/CLAUDE.md new file mode 100644 index 0000000000..1848c4b019 --- /dev/null +++ b/openmeter/productcatalog/subscription/CLAUDE.md @@ -0,0 +1,49 @@ +# subscription + + + +> The plan-to-subscription bridge (package plansubscription): converts a plan — either an inline plan.CreatePlanInput or a published plan reference — into subscription domain inputs, and defines PlanSubscriptionService (Create/Change/Migrate). It owns plan→subscription translation; persistence is delegated to the subscription workflow layer. + +## Patterns + +**PlanInput dispatch: ref vs inline** — PlanInput holds either *PlanRefInput or *plan.CreatePlanInput; consumers branch on AsRef()/AsInput(). Validate requires exactly one to be set. (`func (p *PlanInput) Validate() error { if p.ref == nil && p.plan == nil { return fmt.Errorf("plan or plan reference must be provided") }; return nil }`) +**Domain adapters implement subscription.* interfaces** — Plan/Phase/RateCard implement subscription.Plan / subscription.PlanPhase / subscription.PlanRateCard via compile assertions and expose ToCreateSubscription*Input converters. (`var _ subscription.Plan = &Plan{} ; func (p *Plan) ToCreateSubscriptionPlanInput() subscription.CreateSubscriptionPlanInput { ... }`) +**Phases compute cumulative StartAfter** — GetPhases walks plan phases accumulating each phase Duration into startAfter, assigning Index for SortHint, rather than storing absolute times. (`ps = append(ps, &Phase{Phase: ph, StartAfter: startAfter, Index: idx}); startAfter, _ = startAfter.Add(lo.FromPtr(ph.Duration))`) +**Ref only set when the plan exists** — ToCreateSubscriptionPlanInput attaches a subscription.PlanRef only when Plan.Ref != nil, so inline custom plans subscribe without a stored reference. (`if p.Ref != nil { ref = &subscription.PlanRef{Id: p.Ref.ID, Key: p.Key, Version: p.Version} }`) +**Service orchestrates, never persists** — PlanSubscriptionService delegates to subscriptionworkflow (CreateFromPlan/ChangeToPlan) and plan.Service; Create/Change require active plans while Migrate accepts archived. (`type PlanSubscriptionService interface { Create(...); Migrate(...); Change(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `plan.go` | PlanInput/PlanRefInput + Plan/Phase/RateCard adapters to subscription.* | RateCard.ToCreateSubscriptionItemPlanInput clones the rate card (RateCard.Clone()); Ref must stay nil for inline plans | +| `service.go` | PlanSubscriptionService interface + request structs | Create/Change carry a WorkflowInput plus PlanInput and optional StartingPhase; Migrate takes TargetVersion | + +## Anti-Patterns + +- Persisting subscriptions directly here instead of delegating to the subscription workflow layer +- Branching on whether AsRef()/AsInput() is nil without going through PlanInput.Validate first +- Setting subscription.PlanRef for an inline custom plan (Ref must be nil unless the plan is stored) +- Computing phase StartAfter as absolute timestamps instead of cumulative durations +- Allowing archived plans in Create/Change (only Migrate accepts archived plans) + +## Decisions + +- **One endpoint accepts both an inline custom plan and a plan reference via PlanInput** — Subscriptions can be created from a saved catalog plan or an ad-hoc inline plan; PlanInput's ref/plan dispatch unifies both code paths into the same workflow call. +- **Phases use cumulative StartAfter durations, not absolute times** — Subscription phases are anchored relative to subscription start; storing relative ISO durations keeps the plan independent of any specific subscription start date. + +## Example: Converting plan phases into relative subscription phases + +``` +func (p *Plan) GetPhases() []subscription.PlanPhase { + ps := make([]subscription.PlanPhase, 0, len(p.Phases)) + startAfter := datetime.ISODuration{} + for idx, ph := range p.Phases { + ps = append(ps, &Phase{Phase: ph, StartAfter: startAfter, Index: idx}) + startAfter, _ = startAfter.Add(lo.FromPtr(ph.Duration)) + } + return ps +} +``` + + diff --git a/openmeter/productcatalog/subscription/http/CLAUDE.md b/openmeter/productcatalog/subscription/http/CLAUDE.md new file mode 100644 index 0000000000..1b36b05593 --- /dev/null +++ b/openmeter/productcatalog/subscription/http/CLAUDE.md @@ -0,0 +1,64 @@ +# http + + + +> HTTP driver (package httpdriver) for the plan-to-subscription bridge: decodes subscription create/change/migrate/edit/cancel/continue/restore/delete/get/list requests, maps API DTOs to plansubscription domain inputs and subscription.Patch values, and delegates to PlanSubscriptionService, SubscriptionService, and SubscriptionWorkflowService. Primary constraint: it owns all subscription API translation, so request shape ambiguity (custom plan vs plan ref) is disambiguated here. + +## Patterns + +**httptransport handler triple** — Every endpoint is a method on *handler returning a httptransport.Handler/HandlerWithArgs built from (decode func, business func, encoder, AppendOptions with WithOperationName + WithErrorEncoder(errorEncoder())). (`func (h *handler) CreateSubscription() CreateSubscriptionHandler { return httptransport.NewHandler(decode, exec, commonhttp.JSONResponseEncoderWithStatus[...](http.StatusCreated), httptransport.AppendOptions(h.Options, httptransport.WithOperationName("createSubscription"), httptransport.WithErrorEncoder(errorEncoder()))...) }`) +**Request/Response/Params type aliases per endpoint** — Each file declares a type ( ... ) block aliasing XRequest (often = plansubscription.X), XResponse (= api.Y), XParams, and XHandler = httptransport.HandlerWithArgs[...]. Reuse plansubscription request types via alias rather than redefining. (`type ( CreateSubscriptionRequest = plansubscription.CreateSubscriptionRequest; CreateSubscriptionResponse = api.Subscription )`) +**Namespace resolved via h.resolveNamespace** — Every decode func starts by calling h.resolveNamespace(ctx) and builds models.NamespacedID{Namespace: ns, ID: params.ID}; never read namespace any other way. (`ns, err := h.resolveNamespace(ctx); ... ID: models.NamespacedID{Namespace: ns, ID: params.ID}`) +**Custom-plan vs plan-ref disambiguation by re-marshal probe** — create.go and change.go marshal the body then unmarshal into a local testForCustomPlan{CustomPlan any} to detect which oneOf variant is present, then call body.AsCustomSubscriptionCreate()/AsPlanSubscriptionCreate(). Do not rely on generated As* succeeding to pick a branch. (`type testForCustomPlan struct { CustomPlan any `json:"customPlan"` }; if t.CustomPlan != nil { parsedBody, _ := body.AsCustomSubscriptionCreate() } else { body.AsPlanSubscriptionCreate() }`) +**API <-> domain mapping lives in mapping.go** — All conversions use Map* / From* helpers in mapping.go (MapSubscriptionToAPI, MapSubscriptionViewToAPI, MapAPISubscriptionEditOperationToPatch, MapAPITimingToTiming). Patch decoding switches on apiPatch.Discriminator() and builds patch.PatchAddItem/RemoveItem/AddPhase/etc. (`patches = append(patches, MapAPISubscriptionEditOperationToPatch(patch))`) +**Validation errors wrapped as GenericValidationError** — Decode-time semantic failures (missing customizations, bad timing, credits disabled) return models.NewGenericValidationError(...); errorEncoder() in errors.go then maps domain error types to HTTP status via commonhttp.HandleErrorIfTypeMatches. (`return EditSubscriptionRequest{}, models.NewGenericValidationError(fmt.Errorf("missing customizations"))`) +**Credits feature-gate guard before custom-plan create/change** — Custom plans with productcatalog.CreditOnlySettlementMode are rejected unless h.isCreditsEnabled(ns) (featuregate.go) is true, which checks Credits.Enabled, FeatureGate, and Credits.FeatureFlag. (`if !creditEnabled && req.SettlementMode == productcatalog.CreditOnlySettlementMode { return ..., models.NewGenericValidationError(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler interface, HandlerConfig (services + Credits + FeatureGate), *handler struct, NewHandler, resolveNamespace. | Adding an endpoint requires adding its method to the Handler interface or wiring breaks. | +| `create.go` | CreateSubscription + getCustomer helper (by id or key, rejects deleted customers). | Custom-plan branch must run the credits guard; getCustomer returns NewGenericPreConditionFailedError for deleted customers. | +| `change.go` | ChangeSubscription; same custom/ref split as create, builds ChangeSubscriptionWorkflowInput. | Custom branch maps plan name/description/metadata onto the subscription; keep credits guard in sync with create.go. | +| `migrate.go` | MigrateSubscription; passes TargetVersion/StartingPhase/Timing/BillingAnchor to PlanSubscriptionService.Migrate. | WithOperationName is "MigrateSubscription" (capitalized) unlike others — preserve exact operation names. | +| `edit.go` | EditSubscription; maps body.Customizations to []subscription.Patch via MapAPISubscriptionEditOperationToPatch and calls SubscriptionWorkflowService.EditRunning. | Empty customizations is a validation error; default timing is TimingImmediate. | +| `cancel.go` | Cancel/Continue/Restore handlers; Restore goes through SubscriptionWorkflowService, Cancel/Continue through SubscriptionService. | Cancel defaults timing to TimingImmediate when body.Timing is nil. | +| `mapping.go` | All API<->domain mappers incl. patch discriminator switch and MapSubscriptionItemToAPI (feature/entitlement/price/tax). | Patch switch must cover every api.EditSubscription*Op; unknown discriminator returns an error, not a panic. | +| `errors.go` | errorEncoder() maps subscription/entitlement/feature error types to HTTP status; mapValidationIssueForAPI remaps spec field selectors. | New domain error types are invisible to clients until added to the HandleErrorIfTypeMatches chain. | + +## Anti-Patterns + +- Branching on body.As*() success instead of the testForCustomPlan probe to pick custom-plan vs plan-ref. +- Reading the namespace from anywhere other than h.resolveNamespace(ctx). +- Returning raw fmt.Errorf for client-facing validation failures instead of models.NewGenericValidationError (bypasses errorEncoder status mapping). +- Calling adapters/services directly in the encoder or skipping WithErrorEncoder(errorEncoder()), so domain errors fall through as 500s. +- Adding a handler method without registering it in the Handler interface. + +## Decisions + +- **Subscription create/change accept both a custom inline plan and a plan reference in one endpoint.** — The API uses a oneOf body; the marshal/unmarshal probe is the only reliable way to disambiguate because generated As* always succeed on serializable bodies. +- **Cancel/Continue/Restore/Edit are split between SubscriptionService and SubscriptionWorkflowService.** — Workflow-orchestrated operations (Restore, EditRunning, Change/Migrate via PlanSubscriptionService) go through the workflow layer; simple lifecycle ops stay on the base service. + +## Example: Standard endpoint: resolve namespace, decode, call service, map to API, encode + +``` +func (h *handler) CancelSubscription() CancelSubscriptionHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, params CancelSubscriptionParams) (CancelSubscriptionRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return CancelSubscriptionRequest{}, err } + var body api.CancelSubscriptionJSONRequestBody + if err := commonhttp.JSONRequestBodyDecoder(r, &body); err != nil { return CancelSubscriptionRequest{}, err } + timing, err := MapAPITimingToTiming(*body.Timing) + if err != nil { return CancelSubscriptionRequest{}, models.NewGenericValidationError(err) } + return CancelSubscriptionRequest{Timing: timing, ID: models.NamespacedID{Namespace: ns, ID: params.ID}}, nil + }, + func(ctx context.Context, req CancelSubscriptionRequest) (CancelSubscriptionResponse, error) { + sub, err := h.SubscriptionService.Cancel(ctx, req.ID, req.Timing) + if err != nil { return CancelSubscriptionResponse{}, err } + return MapSubscriptionToAPI(sub), nil +// ... +``` + + diff --git a/openmeter/productcatalog/subscription/service/CLAUDE.md b/openmeter/productcatalog/subscription/service/CLAUDE.md new file mode 100644 index 0000000000..a9637d2b6c --- /dev/null +++ b/openmeter/productcatalog/subscription/service/CLAUDE.md @@ -0,0 +1,59 @@ +# service + + + +> Service implementation (package service) of plansubscription.PlanSubscriptionService — the bridge that turns a plan (inline CreatePlanInput or a published plan reference) into a subscription via the subscription workflow layer. Owns Create, Change, Migrate plus plan-resolution/validation; it does not persist anything itself, it orchestrates WorkflowService and PlanService. + +## Patterns + +**Config struct + New returns the interface** — service embeds Config{WorkflowService, SubscriptionService, PlanService, Logger, CustomerService}; New(c Config) returns plansubscription.PlanSubscriptionService, never the concrete *service. (`func New(c Config) plansubscription.PlanSubscriptionService { return &service{Config: c} }`) +**PlanInput dispatch: AsInput vs AsRef** — Create/Change first call request.PlanInput.Validate() (wrap failures in NewGenericValidationError), then branch: AsInput() -> PlanFromPlanInput, AsRef() -> getPlanByVersion + status/deleted checks, else hard error 'should have validated already'. (`if request.PlanInput.AsInput() != nil { plan, _ = PlanFromPlanInput(*request.PlanInput.AsInput()) } else if request.PlanInput.AsRef() != nil { ... }`) +**Plan lifecycle validation before subscribing** — Referenced plans are validated against clock.Now(): reject if DeletedAt is past, and require PlanStatusActive (Migrate also allows PlanStatusArchived). Errors are models.NewGenericValidationError. (`if p.StatusAt(now) != productcatalog.PlanStatusActive { return def, models.NewGenericValidationError(...) }`) +**StartingPhase zeroes earlier phases** — When request.StartingPhase is set, zeroPhasesBeforeStartingPhase sets each earlier phase Duration to ISODurationFromDuration(0) (does not delete them) and errors if the starting phase key is never found. (`phase.Duration = lo.ToPtr(datetime.ISODurationFromDuration(time.Duration(0)))`) +**Delegation to WorkflowService** — Create calls WorkflowService.CreateFromPlan; Change/Migrate call WorkflowService.ChangeToPlan returning (current, next). This service never writes the subscription directly. (`curr, new, err := s.WorkflowService.ChangeToPlan(ctx, request.ID, request.WorkflowInput, plan)`) +**Plan-not-found normalization** — getPlanByVersion uses defaultx.WithDefault(ref.Version, 0) (plan service treats 0 as latest) and maps plan.IsNotFound(err)/nil plan to subscription.NewPlanNotFoundError(planKey, version). (`if plan.IsNotFound(err) { return nil, subscription.NewPlanNotFoundError(planKey, version) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config, service struct, New, and zeroPhasesBeforeStartingPhase helper. | Config.WorkflowService and SubscriptionService are noted as potentially mergeable (TODO); all methods assume both are present. | +| `create.go` | Create: builds subscription.Plan then WorkflowService.CreateFromPlan, returns subView.Subscription. | Status check differs from Change (no archived allowance); keep validation order deleted-then-status. | +| `change.go` | Change: resolves plan, validates active-only, returns SubscriptionChangeResponse{Current, Next}. | Unlike Create, Change requires PlanStatusActive strictly and returns both current and next views. | +| `migrate.go` | Migrate: fetches current sub, requires PlanRef, resolves target version, allows Active OR Archived, computes timing. | Rejects target version <= current; timing falls back to NextBillingCycle when immediate cancel timing fails ValidateForAction. | +| `plan.go` | getPlanByVersion, PlanFromPlanInput (cheats key='cheat'/version=1 to pass validation then unsets), PlanFromPlan. | PlanFromPlanInput temporarily sets and clears Key/Version to satisfy plan.Validate(); defaults SettlementMode to CreditThenInvoice. Marked redundant TODO — keep in sync with adapter. | + +## Anti-Patterns + +- Persisting subscriptions directly instead of delegating to WorkflowService.CreateFromPlan / ChangeToPlan. +- Skipping request.PlanInput.Validate() or the deleted/status lifecycle checks before subscribing. +- Returning bare fmt.Errorf for user-facing plan validation failures instead of models.NewGenericValidationError. +- Allowing PlanStatusArchived in Create/Change (only Migrate permits archived plans). +- Deleting earlier phases for StartingPhase instead of zeroing their Duration. + +## Decisions + +- **Inline custom plans reuse plan.CreatePlanInput by faking Key/Version for validation then clearing them.** — plan.Validate() requires key and reference, but custom subscription plans have none; PlanFromPlanInput notes this as deliberate cheating pending a partial productcatalog type. +- **Migrate accepts archived plans while Create/Change require active.** — Migration moves an existing subscription forward to a newer version that may already be archived, whereas new/changed subscriptions must point at an active plan. + +## Example: Resolve a plan ref, validate lifecycle, and change subscription via the workflow service + +``` +func (s *service) Change(ctx context.Context, request plansubscription.ChangeSubscriptionRequest) (plansubscription.SubscriptionChangeResponse, error) { + var def plansubscription.SubscriptionChangeResponse + if err := request.PlanInput.Validate(); err != nil { return def, models.NewGenericValidationError(err) } + var plan subscription.Plan + if request.PlanInput.AsRef() != nil { + p, err := s.getPlanByVersion(ctx, request.ID.Namespace, *request.PlanInput.AsRef()) + if err != nil { return def, err } + now := clock.Now() + if p.StatusAt(now) != productcatalog.PlanStatusActive { return def, models.NewGenericValidationError(fmt.Errorf("plan %s@%d is not active", p.Key, p.Version)) } + plan = PlanFromPlan(*p) + } + curr, next, err := s.WorkflowService.ChangeToPlan(ctx, request.ID, request.WorkflowInput, plan) + if err != nil { return def, err } + return plansubscription.SubscriptionChangeResponse{Current: curr, Next: next}, nil +} +``` + + diff --git a/openmeter/productcatalog/subscription/testutils/CLAUDE.md b/openmeter/productcatalog/subscription/testutils/CLAUDE.md new file mode 100644 index 0000000000..22e282bcee --- /dev/null +++ b/openmeter/productcatalog/subscription/testutils/CLAUDE.md @@ -0,0 +1,29 @@ +# testutils + + + +> Test-only helpers (package testutils) for the plan-to-subscription bridge. Provides PlanSubscriptionAdapter, a thin adapter over plan.Service that resolves a plansubscription.Plan from a PlanRefInput or a plan.CreatePlanInput, mirroring the production service's plan-resolution logic for use in subscription/billing tests. + +## Patterns + +**Interface + Config + constructor + compile assertion** — Declares PlanSubscriptionAdapter interface, PlanSubscriptionAdapterConfig{PlanService, Logger}, adapter struct embedding the config, var _ PlanSubscriptionAdapter = &adapter{}, and NewPlanSubscriptionAdapter(config). (`var _ PlanSubscriptionAdapter = &adapter{}; func NewPlanSubscriptionAdapter(config PlanSubscriptionAdapterConfig) PlanSubscriptionAdapter { return &adapter{config} }`) +**Reuse production PlanFromPlanInput** — FromInput delegates straight to service.PlanFromPlanInput(input) instead of reimplementing the cheat-validation, keeping test behavior aligned with production. (`func (a *adapter) FromInput(...) (subscription.Plan, error) { return service.PlanFromPlanInput(input) }`) +**PlanNotFound normalization mirrors service** — GetVersion uses defaultx.WithDefault(ref.Version, 0) and maps plan.IsNotFound / nil plan to subscription.NewPlanNotFoundError, and rejects deleted plans via clock.Now(). (`if plan.IsNotFound(err) { return nil, subscription.NewPlanNotFoundError(planKey, version) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Sole file: PlanSubscriptionAdapter interface (GetVersion, FromInput) and its plan.Service-backed implementation. | Marked 'TODO: we can get rid of this'; GetVersion duplicates service.getPlanByVersion logic plus a deleted-plan check — keep them aligned if either changes. | + +## Anti-Patterns + +- Reimplementing plan-input-to-subscription.Plan conversion instead of calling service.PlanFromPlanInput. +- Importing this test adapter from production (app/common) code — it lives under testutils and is intended for tests only. +- Diverging GetVersion's not-found/deleted handling from the production service.getPlanByVersion. + +## Decisions + +- **The adapter exists as a slim re-implementation/wrapper of service plan resolution for tests.** — Tests need a PlanSubscriptionAdapter seam without pulling the full plansubscription service wiring; the TODO acknowledges it is a candidate for removal once APIs align. + + diff --git a/openmeter/productcatalog/testutils/CLAUDE.md b/openmeter/productcatalog/testutils/CLAUDE.md new file mode 100644 index 0000000000..7c040f975c --- /dev/null +++ b/openmeter/productcatalog/testutils/CLAUDE.md @@ -0,0 +1,55 @@ +# testutils + + + +> Shared test fixtures and an in-process TestEnv harness for the product catalog domain. Provides factory functions (NewTestPlan, NewTestAddon, NewTestFeature, NewTestMeters) and a fully wired TestEnv that boots feature/plan/addon/planaddon/taxcode services against a real Postgres instance for integration tests. + +## Patterns + +**Factory returns Create*Input, not the aggregate** — Test factories return the service's input struct (e.g. plan.CreatePlanInput, addon.CreateAddonInput, feature.CreateFeatureInputs) so tests drive the real service.Create path rather than fabricating domain objects. (`func NewTestPlan(t, namespace, transformers...) plan.CreatePlanInput`) +**Functional-option transformers via generics** — Mutation of fixtures uses TransformerFunc[T any] = func(*testing.T, *T) applied in a loop at the end of the factory. Add new knobs as WithX helpers returning TransformerFunc[productcatalog.Plan], never by adding bool/param args. (`WithPlanPhases(phases...), WithPlanKey(key); applied as `for _, tr := range transformers { tr(t, &input.Plan) }``) +**t.Helper() in every factory** — Every exported factory and transformer calls t.Helper() as its first statement so failures point at the test, not the fixture. (`func NewTestFeature(t *testing.T, namespace string) ... { t.Helper(); ... }`) +**TestEnv wires real adapters+services, not mocks** — NewTestEnv constructs concrete Postgres adapters (productcatalogadapter.NewPostgresFeatureRepo, planadapter.New, addonadapter.New, planaddonadapter.New, taxcodeadapter.New) and real services, plus eventbus.NewMock(t) publisher and meteradapter (mock) — the underlying-constructor approach mandated by AGENTS.md (no app/common wiring). (`featureService := feature.NewFeatureConnector(featureAdapter, meterAdapter, publisher)`) +**Postgres-backed env with idempotent teardown** — DB comes from testutils.InitPostgresDB(t); Close uses sync.Once and closes EntDriver, PGDriver, and Client. DBSchemaMigrate runs Schema.Create on demand. (`e.close.Do(func() { e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })`) +**ULID for all generated test IDs and namespaces** — NewTestULID is the single ID source; NewTestNamespace is an alias of it. Never hardcode IDs/namespaces — pass a fresh ULID per test for isolation. (`var NewTestNamespace = NewTestULID`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `env.go` | Defines TestEnv struct and NewTestEnv — the integration harness exposing Feature/Plan/Addon/PlanAddon services + repositories. | Service wiring order matters: featureResolver wraps featureService and feeds both plan and addon services; planaddon depends on both plan and addon services. Uses context.Background() in DBSchemaMigrate/Close (harness lifecycle, predates t.Context()). | +| `plan.go` | NewTestPlan factory plus TransformerFunc/WithPlanPhases/WithPlanKey options and MonthPeriod constant. | Default plan ships a single 'free' phase with a FlatFeeRateCard at amount 0, InArrears term, Stripe tax code txcd_10000000, ProRating enabled (ProratePrices), CreditThenInvoiceSettlementMode. Override via transformers, not by editing the literal. | +| `addon.go` | NewTestAddon — builds addon.CreateAddonInput with AddonInstanceTypeSingle, USD currency, variadic RateCards. | Key/Name are fixed 'test-addon'; for multiple addons in one namespace you must vary them yourself. | +| `feature.go` | NewTestFeature (bare feature) and NewTestFeatureFromMeter (derives key/name/groupby from a meter.Meter). | NewTestFeatureFromMeter uses feature.ConvertMapStringToMeterGroupByFilters and lo.ToPtr(meter.ID) — keep in sync with feature input shape. | +| `meters.go` | NewTestMeters — three canonical meters (count/api_requests, sum/tokens, sum/workload duration). | Each meter gets a fresh NewTestULID ID; ValueProperty is set only on sum meters. | +| `namespace.go` | NewTestULID and the NewTestNamespace alias. | Uses ulid.MustNew with crypto/rand — generation can theoretically fail under entropy starvation but is treated as test-only. | + +## Anti-Patterns + +- Importing app/common or the DI/wiring layer to build TestEnv — must construct adapters/services from their package constructors to avoid import cycles. +- Adding boolean/positional parameters to factories instead of new WithX transformer options. +- Returning a fully-built productcatalog aggregate from a factory instead of the service Create*Input. +- Hardcoding IDs or namespaces instead of using NewTestULID/NewTestNamespace, breaking per-test isolation. +- Swapping concrete Postgres adapters for mocks in NewTestEnv — these are integration fixtures expecting a real DB. + +## Decisions + +- **TestEnv composes real Postgres adapters + real services with only the meter adapter and event publisher mocked.** — Catalog tests exercise the genuine persistence and cross-service (plan↔addon↔planaddon↔feature) paths; mocking would hide adapter and SQL behavior. +- **Generic TransformerFunc[T] option pattern over per-field setters.** — Keeps factories a single source of sane defaults while letting each test override only what it cares about, without combinatorial parameter lists. + +## Example: Customize a test plan with extra phases in an integration test + +``` +env := testutils.NewTestEnv(t) +defer env.Close(t) +env.DBSchemaMigrate(t) +ns := testutils.NewTestNamespace(t) +input := testutils.NewTestPlan(t, ns, + testutils.WithPlanKey("pro"), + testutils.WithPlanPhases(phase1, phase2), +) +p, err := env.Plan.CreatePlan(t.Context(), input) +require.NoError(t, err) +``` + + diff --git a/openmeter/progressmanager/CLAUDE.md b/openmeter/progressmanager/CLAUDE.md new file mode 100644 index 0000000000..924d1777b5 --- /dev/null +++ b/openmeter/progressmanager/CLAUDE.md @@ -0,0 +1,29 @@ +# progressmanager + + + +> Small standalone domain that tracks per-operation progress counters (e.g. long-running ClickHouse queries). The root files declare the Adapter and Service interfaces; entity/ holds the I/O-free domain types, adapter/ is the Redis-backed store (with noop/mock variants), httpdriver/ exposes a read-only GetProgress endpoint. + +## Patterns + +**Interface-only root** — adapter.go and service.go declare Adapter/Service as aliases of ProgressManagerAdapter/ProgressManagerService — both expose the same GetProgress/UpsertProgress pair over entity input types. No logic lives at the root. (`type Service interface { ProgressManagerService } with GetProgress(ctx, entity.GetProgressInput) and UpsertProgress(ctx, entity.UpsertProgressInput)`) +**Dedicated method-input structs** — Operations take entity.GetProgressInput / entity.UpsertProgressInput wrappers (validated in entity/) rather than loose parameters. (`GetProgress(ctx context.Context, input entity.GetProgressInput) (*entity.Progress, error)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Adapter interface (Redis-backed persistence contract) | Keep it a thin alias of ProgressManagerAdapter; the real store, noop, and mock live in adapter/ | +| `service.go` | Service interface mirroring the adapter surface | Service and Adapter expose the same two methods — keep them in sync when adding operations | + +## Anti-Patterns + +- Putting Redis access, key construction, or validation logic in the root interfaces instead of adapter/ and entity/ +- Letting Service and Adapter method sets drift apart +- Backing progress with Postgres/Ent — this domain is intentionally Redis-only with TTL expiry + +## Decisions + +- **Root is interface-only; implementation, types, and transport are all in sub-packages** — Keeps the domain contract importable without pulling in Redis or HTTP dependencies, and lets app/common swap the real adapter for the noop variant + + diff --git a/openmeter/progressmanager/adapter/CLAUDE.md b/openmeter/progressmanager/adapter/CLAUDE.md new file mode 100644 index 0000000000..6036a439c5 --- /dev/null +++ b/openmeter/progressmanager/adapter/CLAUDE.md @@ -0,0 +1,53 @@ +# adapter + + + +> Persistence layer for the progressmanager domain: a Redis-backed implementation of the progressmanager.Adapter interface that stores per-operation progress counters as JSON under namespaced keys with TTL expiration. Also ships noop and testify-mock variants. + +## Patterns + +**Config-validated constructor** — New(Config) validates via config.Validate() (Expiration>0, Redis!=nil, Logger!=nil) before constructing the unexported *adapter; never construct the struct directly. (`func New(config Config) (progressmanager.Adapter, error) { if err := config.Validate(); err != nil { return nil, err } ... }`) +**Interface compile-time assertion** — Every concrete type asserts the parent interface: `var _ progressmanager.Adapter = (*adapter)(nil)` and `(*adapterNoop)(nil)`. Add the same line for any new variant. (`var _ progressmanager.Adapter = (*adapter)(nil)`) +**Validate input before I/O** — Each adapter method calls input.Validate() first and wraps the error (fmt.Errorf("validate get progress input: %w", err)) before touching Redis. (`if err := input.Validate(); err != nil { return nil, fmt.Errorf("validate get progress input: %w", err) }`) +**redis.Nil -> domain not-found** — Reads translate redis.Nil into models.NewGenericNotFoundError; other Redis errors are wrapped verbatim. Never leak redis.Nil upward. (`if cmd.Err() == redis.Nil { return nil, models.NewGenericNotFoundError(fmt.Errorf("progress not found for id: %s", input.ProgressID.ID)) }`) +**Namespaced JSON value storage** — UpsertProgress json.Marshal's the entity.Progress and SETs it with a.expiration TTL; GetProgress json.Unmarshal's it back. Keys built only via a.getKey(ProgressID). (`a.redis.Set(ctx, a.getKey(input.ProgressID), data, a.expiration)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config struct + Validate, New() Redis adapter constructor, NewNoop() constructor, struct definitions and interface assertions. | KeyPrefix is optional (empty allowed); Expiration/Redis/Logger are required. Don't add slog.Default() fallbacks — Logger is injected. | +| `progress.go` | Redis Get/Upsert implementations plus getKey() key builder. | getKey concatenates staticKeyPrefix (already ends in ':') with another ':' producing 'progress::ns:id' / ':progress::ns:id'. Both branches must stay in sync if the key scheme changes. | +| `noop.go` | adapterNoop methods: GetProgress always returns NotFound, UpsertProgress is a silent success. | Imports entity via the bare 'entity' alias here while progress.go uses the same path — keep noop's GetProgress returning NotFound so disabled progress tracking degrades gracefully. | +| `mock.go` | MockProgressManager (testify mock) implementing progressmanager.Service for service-layer tests. | Mocks the SERVICE interface (not Adapter) and declares DeleteProgressByRuntimeID, which is NOT on the current progressmanager.Service interface — drift; verify against service.go before relying on it. | + +## Anti-Patterns + +- Constructing &adapter{...} directly, bypassing Config.Validate(). +- Returning redis.Nil to callers instead of models.NewGenericNotFoundError. +- Skipping input.Validate() before Redis access. +- Building Redis keys inline instead of through getKey(). +- Falling back to slog.Default() instead of requiring Config.Logger. + +## Decisions + +- **Redis (not Postgres/Ent) backs progress.** — Progress is ephemeral, high-churn operation telemetry; TTL expiration auto-evicts stale runs without migrations. +- **Noop and mock variants live alongside the real adapter.** — Lets DI wire a no-op when progress tracking is disabled and lets service tests use testify without Redis. + +## Example: Construct the Redis-backed adapter + +``` +import ( + "github.com/redis/go-redis/v9" + "github.com/openmeterio/openmeter/openmeter/progressmanager/adapter" +) + +adp, err := adapter.New(adapter.Config{ + Expiration: 24 * time.Hour, + Redis: redisClient, + Logger: logger, +}) +if err != nil { return err } +``` + + diff --git a/openmeter/progressmanager/entity/CLAUDE.md b/openmeter/progressmanager/entity/CLAUDE.md new file mode 100644 index 0000000000..f777230daf --- /dev/null +++ b/openmeter/progressmanager/entity/CLAUDE.md @@ -0,0 +1,45 @@ +# entity + + + +> Domain types and validation rules for the progressmanager package: ProgressID, Progress, and the GetProgressInput/UpsertProgressInput method-input wrappers. Pure data + Validate(), no I/O. + +## Patterns + +**errors.Join validation accumulation** — Every Validate() collects into `var errs []error` and returns errors.Join(errs...) — it never returns on the first failure. Nested validators are wrapped with field context. (`if err := a.NamespacedModel.Validate(); err != nil { errs = append(errs, fmt.Errorf("namespaced model: %w", err)) }`) +**Embedded ID + NamespacedModel** — ProgressID embeds models.NamespacedModel (json inline) plus an ID string; Progress embeds ProgressID; inputs embed the domain type they carry. Reuse embedding rather than duplicating fields. (`type Progress struct { ProgressID `json:"id"`; Success uint64 ... }`) +**Counter invariants in Validate** — Progress.Validate enforces Success+Failed<=Total, zero counters when Total==0, and non-zero UpdatedAt. New counter fields must extend these checks. (`if a.Success+a.Failed > a.Total { errs = append(errs, errors.New("success and failed must be less than or equal to total")) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `progressmanager.go` | Defines ProgressID, Progress, GetProgressInput, UpsertProgressInput and their Validate() methods. | Receivers are named `a` despite the types not being adapters; UpdatedAt is required (IsZero rejected). Input wrappers exist purely to keep method signatures stable as fields grow. | + +## Anti-Patterns + +- Returning on the first validation error instead of accumulating with errors.Join. +- Adding counter fields without updating the Success+Failed<=Total / Total==0 invariants. +- Importing anything beyond pkg/models here — this folder must stay I/O-free. + +## Decisions + +- **Method inputs are dedicated structs (GetProgressInput/UpsertProgressInput) wrapping the domain type.** — Keeps adapter/service signatures stable and gives each call its own Validate() seam. + +## Example: Build and validate an upsert input + +``` +import ( + "time" + "github.com/openmeterio/openmeter/openmeter/progressmanager/entity" + "github.com/openmeterio/openmeter/pkg/models" +) + +in := entity.UpsertProgressInput{Progress: entity.Progress{ + ProgressID: entity.ProgressID{NamespacedModel: models.NamespacedModel{Namespace: ns}, ID: id}, + Success: 3, Total: 10, UpdatedAt: time.Now(), +}} +if err := in.Validate(); err != nil { return err } +``` + + diff --git a/openmeter/progressmanager/httpdriver/CLAUDE.md b/openmeter/progressmanager/httpdriver/CLAUDE.md new file mode 100644 index 0000000000..ba4904bc22 --- /dev/null +++ b/openmeter/progressmanager/httpdriver/CLAUDE.md @@ -0,0 +1,45 @@ +# httpdriver + + + +> HTTP transport layer for the progressmanager domain: wraps progressmanager.Service in httptransport handlers, decoding the namespace from context and mapping entity.Progress to api.Progress. Read-only (GetProgress) endpoint surface. + +## Patterns + +**Nested Handler interface + handler struct** — Handler embeds ProgressHandler which exposes GetProgress() GetProgressHandler; the unexported handler{service, namespaceDecoder, options} implements it, asserted via `var _ Handler = (*handler)(nil)`. (`type ProgressHandler interface { GetProgress() GetProgressHandler }`) +**httptransport.NewHandlerWithArgs three-func shape** — Each endpoint = (decode req from *http.Request + path arg) + (logic calling h.service) + JSONResponseEncoderWithStatus, with WithOperationName appended via httptransport.AppendOptions(h.options, ...). (`httptransport.NewHandlerWithArgs(decodeFn, logicFn, commonhttp.JSONResponseEncoderWithStatus[GetProgressResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("getProgress"))...)`) +**Namespace from decoder, not request body** — resolveNamespace pulls the namespace via namespaceDecoder.GetNamespace(ctx); a missing namespace is a 500 commonhttp.NewHTTPError, never trusted from the client. (`ns, ok := h.namespaceDecoder.GetNamespace(ctx); if !ok { return "", commonhttp.NewHTTPError(http.StatusInternalServerError, errors.New("internal server error")) }`) +**Type-alias request/response/handler triplet** — Requests reuse entity types (GetProgressRequest = entity.GetProgressInput), responses reuse api types (GetProgressResponse = api.Progress), handler aliases httptransport.HandlerWithArgs[...]. Domain->API mapping via local progressToAPI. (`type GetProgressResponse = api.Progress`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler/ProgressHandler interfaces, handler struct, New(namespaceDecoder, service, options...), resolveNamespace helper. | Missing namespace returns 500 (internal), not 400 — it's expected to be set by upstream middleware. | +| `progress.go` | GetProgress() handler implementation and progressToAPI mapper. | service.GetProgress returning a nil *Progress with no error is treated as an internal error (fmt.Errorf), not 404 — 404 must come from the adapter's NotFound. progressToAPI drops namespace/ID (api.Progress only carries counters + UpdatedAt). | + +## Anti-Patterns + +- Reading the namespace from the request body/query instead of namespaceDecoder. +- Hand-rolling http.ResponseWriter encoding instead of commonhttp JSON encoders. +- Omitting WithOperationName, which OpenAPI/operation routing relies on. +- Mapping entity->API outside a dedicated *ToAPI function. + +## Decisions + +- **Only GetProgress is exposed over HTTP; UpsertProgress is internal.** — Progress is written by background streaming/clickhouse jobs, not clients; the API is read-only polling of operation status. + +## Example: Map a domain Progress to the API type + +``` +import ( + "github.com/openmeterio/openmeter/api" + progressmanagerentity "github.com/openmeterio/openmeter/openmeter/progressmanager/entity" +) + +func progressToAPI(p progressmanagerentity.Progress) api.Progress { + return api.Progress{Success: p.Success, Failed: p.Failed, Total: p.Total, UpdatedAt: p.UpdatedAt} +} +``` + + diff --git a/openmeter/registry/CLAUDE.md b/openmeter/registry/CLAUDE.md new file mode 100644 index 0000000000..8c141e2f74 --- /dev/null +++ b/openmeter/registry/CLAUDE.md @@ -0,0 +1,45 @@ +# registry + + + +> In-domain composition layer that bundles the entitlement/credit/grant/feature connectors into a single registry.Entitlement aggregate struct, so downstream wiring (app/common DI, tests) consumes one struct instead of nine separate connectors. The domain-side counterpart to app/common's Wire registries. + +## Patterns + +**Aggregate-struct registry** — registry.Entitlement is a plain struct of interface-typed fields, no methods; it only groups connectors built elsewhere. (`Entitlement{ Feature, FeatureRepo, EntitlementOwner, CreditBalance, Grant, GrantRepo, MeteredEntitlement, Entitlement, EntitlementRepo }`) +**Interface-typed fields only** — Every field is an interface (feature.FeatureConnector, credit.BalanceConnector, grant.OwnerConnector, entitlement.Service, ...) — no concrete adapters stored here. (`CreditBalance credit.BalanceConnector`) +**Assembly lives in builder/** — The struct is declared here; the only assembly function (GetEntitlementRegistry) lives in registry/builder and is the single entry point that populates all fields. (`registry/builder/entitlement.go`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement.go` | Declares the registry.Entitlement aggregate struct grouping feature/credit/grant/entitlement connectors. | Adding a field here means builder/ must populate it; a nil field returned from the builder breaks downstream consumers. | + +## Anti-Patterns + +- Adding business logic, queries, or methods to registry.Entitlement — it is a pure container. +- Storing concrete adapter types instead of the connector/service interfaces. +- Building the registry anywhere other than registry/builder.GetEntitlementRegistry. + +## Decisions + +- **Keep entitlement-stack wiring in an in-domain builder separate from app/common Wire registries.** — Tests need a fully-wired entitlement system without the full Wire graph. + +## Example: The aggregate struct exposed to downstream wiring + +``` +type Entitlement struct { + Feature feature.FeatureConnector + FeatureRepo feature.FeatureRepo + EntitlementOwner grant.OwnerConnector + CreditBalance credit.BalanceConnector + Grant credit.GrantConnector + GrantRepo grant.Repo + MeteredEntitlement meteredentitlement.Connector + Entitlement entitlement.Service + EntitlementRepo entitlement.EntitlementRepo +} +``` + + diff --git a/openmeter/registry/builder/CLAUDE.md b/openmeter/registry/builder/CLAUDE.md new file mode 100644 index 0000000000..7345142b16 --- /dev/null +++ b/openmeter/registry/builder/CLAUDE.md @@ -0,0 +1,56 @@ +# builder + + + +> In-domain composition root that wires the entitlement/credit/grant/feature stack into a single registry.Entitlement aggregate. GetEntitlementRegistry is the one assembly function consumed by app/common DI and by tests that need a fully-wired entitlement system without the full Wire graph. + +## Patterns + +**Single options-in, registry-out builder** — Wiring is exposed as one exported func GetEntitlementRegistry(opts EntitlementOptions) *registry.Entitlement; all external dependencies arrive via the EntitlementOptions struct, not package globals or slog.Default(). (`func GetEntitlementRegistry(opts EntitlementOptions) *registry.Entitlement { ... return ®istry.Entitlement{...} }`) +**Adapters before connectors before services** — Construction follows a strict bottom-up order: Postgres repo adapters (NewPostgresFeatureRepo, NewPostgresEntitlementRepo, NewPostgresGrantRepo, NewPostgresBalanceSnapshotRepo) first, then connectors (feature, owner, credit, metered), then the entitlement service last. (`featureDBAdapter := productcatalogpgadapter.NewPostgresFeatureRepo(opts.DatabaseClient, opts.Logger)`) +**Config-struct constructors** — Connectors/services that take many deps are built with a typed config literal (balance.SnapshotServiceConfig, credit.CreditConnectorConfig, entitlementservice.ServiceConfig) rather than long positional arg lists. (`creditConnector := credit.NewCreditConnector(credit.CreditConnectorConfig{GrantRepo: grantDBAdapter, ...})`) +**Shared creditConnector aliasing** — One credit.NewCreditConnector instance is aliased to both creditBalanceConnector and grantConnector — the same object satisfies credit.BalanceConnector and credit.GrantConnector; do not build two separate connectors. (`creditBalanceConnector := creditConnector; grantConnector := creditConnector`) +**Hook registration at wire time** — Subscription and credit hooks are attached here via RegisterHooks on the metered and entitlement connectors, not inside the connector constructors. (`entitlementConnector.RegisterHooks(entitlementsubscriptionhook.NewEntitlementSubscriptionHook(...), credithook.NewEntitlementHook(grantDBAdapter))`) +**All nine registry fields populated** — The returned *registry.Entitlement must set every field (Feature, FeatureRepo, EntitlementOwner, CreditBalance, Grant, GrantRepo, MeteredEntitlement, Entitlement, EntitlementRepo) so downstream consumers can rely on non-nil connectors. (`return ®istry.Entitlement{Feature: featureConnector, FeatureRepo: featureDBAdapter, ...}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entitlement.go` | Defines EntitlementOptions and GetEntitlementRegistry — the sole builder that assembles feature, credit/grant, balance snapshot, metered/static/boolean entitlement connectors plus the entitlement service into registry.Entitlement. | enttx.NewCreator(opts.DatabaseClient) supplies TransactionManager to the credit connector; Granularity is hardcoded to time.Minute and SnapshotGracePeriod comes from opts.EntitlementsConfiguration.GetGracePeriod(); the static/boolean connectors are constructed inline with no args. | + +## Anti-Patterns + +- Building two separate credit connectors instead of aliasing one creditConnector to both CreditBalance and Grant. +- Using slog.Default() or package-level globals instead of taking Logger/Tracer/Publisher through EntitlementOptions. +- Registering hooks inside connector constructors rather than via RegisterHooks here at wire time. +- Returning a *registry.Entitlement with any field left nil. +- Adding business logic or queries here — this folder is composition only; logic belongs in the connector/service packages it wires. + +## Decisions + +- **Keep entitlement-stack wiring in an in-domain builder separate from app/common Wire registries.** — Lets tests (subscription/testutils, test/app, test/billing, test/customer) build a real entitlement system from one call without importing the full application DI graph, avoiding import cycles. +- **Reuse a single credit connector for both balance and grant roles.** — credit.NewCreditConnector implements both credit.BalanceConnector and credit.GrantConnector, so one instance keeps grant accounting and balance snapshotting consistent. + +## Example: Assemble a fully-wired entitlement registry from external dependencies. + +``` +import ( + registrybuilder "github.com/openmeterio/openmeter/openmeter/registry/builder" + "github.com/openmeterio/openmeter/openmeter/registry" +) + +reg := registrybuilder.GetEntitlementRegistry(registrybuilder.EntitlementOptions{ + DatabaseClient: dbClient, + EntitlementsConfiguration: cfg.Entitlements, + StreamingConnector: streamingConn, + Logger: logger, + MeterService: meterSvc, + CustomerService: customerSvc, + Publisher: publisher, + Tracer: tracer, + Locker: locker, +// ... +``` + + diff --git a/openmeter/secret/CLAUDE.md b/openmeter/secret/CLAUDE.md new file mode 100644 index 0000000000..f84b4c250f --- /dev/null +++ b/openmeter/secret/CLAUDE.md @@ -0,0 +1,41 @@ +# secret + + + +> Defines the Adapter and Service interfaces for storing/retrieving app secrets (e.g. Stripe API keys); the package root holds only interface declarations while entity/, service/, and adapter/ hold the types, validate-and-delegate service, and the in-memory plaintext implementation respectively. + +## Patterns + +**Interface-only package root** — secret.go and adapter.go declare Service/Adapter interfaces (each composing a single SecretService/SecretAdapter); no implementations live at the root. (`type Service interface { SecretService }`) +**Mirrored Service/Adapter contracts** — Service and Adapter expose the identical CreateAppSecret/UpdateAppSecret/GetAppSecret/DeleteAppSecret method set — service validates then delegates to adapter. (`GetAppSecret(ctx, input secretentity.GetAppSecretInput) (secretentity.Secret, error)`) +**Input/output types live in entity/** — All method signatures take secretentity.* input structs and return secretentity.SecretID/Secret; never raw strings. (`secretentity "github.com/openmeterio/openmeter/openmeter/secret/entity"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Declares Adapter/SecretAdapter — the storage contract implemented by secret/adapter. | GetAppSecret in the default adapter echoes input.ID back as the value; it is not a real lookup. | +| `service.go` | Declares Service/SecretService — the validation boundary implemented by secret/service. | The service is the only layer that validates; do not skip input.Validate() there. | + +## Anti-Patterns + +- Putting validation or business logic in the package-root interfaces or the adapter — validation belongs only in secret/service. +- Adding a method to Service without adding the matching method to Adapter (they must stay mirrored). +- Threading raw secret strings instead of secretentity.SecretID/Secret types. + +## Decisions + +- **Split Service and Adapter into separate interfaces with identical method sets.** — Lets a real secret store replace the in-memory plaintext adapter without touching the service or callers. + +## Example: The storage contract every secret adapter must satisfy + +``` +type SecretAdapter interface { + CreateAppSecret(ctx context.Context, input secretentity.CreateAppSecretInput) (secretentity.SecretID, error) + UpdateAppSecret(ctx context.Context, input secretentity.UpdateAppSecretInput) (secretentity.SecretID, error) + GetAppSecret(ctx context.Context, input secretentity.GetAppSecretInput) (secretentity.Secret, error) + DeleteAppSecret(ctx context.Context, input secretentity.DeleteAppSecretInput) error +} +``` + + diff --git a/openmeter/secret/adapter/CLAUDE.md b/openmeter/secret/adapter/CLAUDE.md new file mode 100644 index 0000000000..11c15755e3 --- /dev/null +++ b/openmeter/secret/adapter/CLAUDE.md @@ -0,0 +1,43 @@ +# adapter + + + +> Plaintext, in-memory implementation of the secret.Adapter interface used to store/retrieve app secrets (e.g. Stripe API keys). The ID and the value are identical here; production deployments are expected to swap this for a real secret store without changing the interface. + +## Patterns + +**Stateless struct adapter** — The adapter is an empty struct constructed via New() returning the secret.Adapter interface; it holds no DB client or state. (`func New() secret.Adapter { return &adapter{} }; type adapter struct{}`) +**Compile-time interface assertion** — A var _ secret.Adapter = (*adapter)(nil) line guarantees the struct satisfies the interface from openmeter/secret. (`var _ secret.Adapter = (*adapter)(nil)`) +**ID-equals-value plaintext encoding** — CreateAppSecret/UpdateAppSecret build the SecretID with NewSecretID(input.AppID, input.Value, input.Key) so the stored ID literally is the value; GetAppSecret reverses this by reading value := input.ID. (`return secretentity.NewSecretID(input.AppID, input.Value, input.Key), nil`) +**No validation at adapter layer** — Adapter methods do not call input.Validate(); validation is the service layer's responsibility. Adapter trusts its inputs. (`func (a adapter) CreateAppSecret(ctx, input) (...) { return secretentity.NewSecretID(...), nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Constructor New() and the empty adapter struct plus the interface assertion. | New() returns the secret.Adapter interface, not *adapter; keep the var _ assertion in sync if methods change. | +| `secret.go` | Implements the four SecretAdapter methods (Create/Update/Get/Delete AppSecret). | This is a plaintext stub — Get returns the ID as the value and Delete is a no-op. Do NOT treat this as secure storage; a real secret-store impl must change the ID<->value mapping. | + +## Anti-Patterns + +- Putting input validation here — that belongs in openmeter/secret/service. +- Adding persistence/DB state to the struct without also threading namespacing and tx-awareness used elsewhere in the codebase. +- Assuming GetAppSecret performs a lookup — it just echoes input.ID back as the value. + +## Decisions + +- **ID and value are identical in this implementation.** — It is an intentional plaintext placeholder; real implementations would store the value in an external secret store and return an opaque reference ID. + +## Example: Constructing the secret store adapter and creating a secret + +``` +import ( + "github.com/openmeterio/openmeter/openmeter/secret/adapter" + secretentity "github.com/openmeterio/openmeter/openmeter/secret/entity" +) + +a := adapter.New() +id, err := a.CreateAppSecret(ctx, secretentity.CreateAppSecretInput{AppID: appID, Key: "stripe-api-key", Value: secretValue}) +``` + + diff --git a/openmeter/secret/entity/CLAUDE.md b/openmeter/secret/entity/CLAUDE.md new file mode 100644 index 0000000000..f2ae2dd3e8 --- /dev/null +++ b/openmeter/secret/entity/CLAUDE.md @@ -0,0 +1,42 @@ +# entity + + + +> Domain types for the secret package: SecretID (a NamespacedID scoped to an app + key), Secret (id + value), the input structs for each operation, and the typed SecretNotFoundError. This is the shared vocabulary imported by adapter, service, server, and the Stripe app. + +## Patterns + +**Self-validating value objects** — Every type (SecretID, Secret, CreateAppSecretInput, UpdateAppSecretInput) exposes a Validate() error that returns models.NewGenericValidationError wrapping the first failure. (`func (i CreateAppSecretInput) Validate() error { if err := i.AppID.Validate(); err != nil { return models.NewGenericValidationError(errors.New("app id is invalid")) } ... }`) +**NamespacedID embedding for tenancy** — SecretID embeds models.NamespacedID; NewSecretID derives Namespace from appID.Namespace so every secret is tenant-scoped. (`SecretID{ NamespacedID: models.NamespacedID{Namespace: appID.Namespace, ID: id}, AppID: appID, Key: key }`) +**Type aliases for read/delete inputs** — GetAppSecretInput and DeleteAppSecretInput are plain aliases for SecretID (= SecretID), not new structs, because those operations need nothing beyond the id. (`type GetAppSecretInput = SecretID; type DeleteAppSecretInput = SecretID`) +**Typed not-found error with detector** — SecretNotFoundError wraps models.NewGenericNotFoundError and ships an IsSecretNotFoundError(err) helper using errors.As; it asserts models.GenericError compliance. (`var _ models.GenericError = (*SecretNotFoundError)(nil); func IsSecretNotFoundError(err error) bool { var e *SecretNotFoundError; return errors.As(err, &e) }`) +**Package name differs from directory** — The package is named secretentity (not entity); importers alias it as secretentity "github.com/openmeterio/openmeter/openmeter/secret/entity". (`package secretentity`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `secret.go` | Defines SecretID + NewSecretID constructor and Secret, each with Validate(). | Key is required by SecretID.Validate(); a SecretID is invalid without it even if NamespacedID is set. | +| `input.go` | Create/Update input structs plus the Get/Delete type aliases. | CreateAppSecretInput.Validate flattens AppID errors to a generic 'app id is invalid' message, while UpdateAppSecretInput.Validate returns the underlying AppID/SecretID error verbatim — they are deliberately inconsistent. | +| `errors.go` | SecretNotFoundError type and IsSecretNotFoundError detector. | Use IsSecretNotFoundError for detection rather than direct type asserts; the message string says 'app with id ... not found' even though it is a secret error. | + +## Anti-Patterns + +- Constructing SecretID literals directly instead of via NewSecretID — you risk leaving Namespace unset. +- Returning raw errors from Validate() instead of wrapping in models.NewGenericValidationError. +- Adding a value field to SecretID — the value lives only on Secret, never on the ID. + +## Decisions + +- **Get/Delete inputs are aliases of SecretID.** — Those operations are fully addressed by the id; a separate struct would add no fields. + +## Example: Building and validating a namespaced secret id + +``` +import secretentity "github.com/openmeterio/openmeter/openmeter/secret/entity" + +id := secretentity.NewSecretID(appID, value, "stripe-api-key") +if err := id.Validate(); err != nil { return err } +``` + + diff --git a/openmeter/secret/service/CLAUDE.md b/openmeter/secret/service/CLAUDE.md new file mode 100644 index 0000000000..06aa23cf3c --- /dev/null +++ b/openmeter/secret/service/CLAUDE.md @@ -0,0 +1,43 @@ +# service + + + +> Service layer for the secret package: a thin pass-through that validates every input via input.Validate() before delegating to the configured secret.Adapter. It is the only layer that enforces validation. + +## Patterns + +**Validate-then-delegate** — Each method calls input.Validate(), wraps any failure in models.NewGenericValidationError with an operation-specific prefix, then forwards to the matching s.adapter method. (`if err := input.Validate(); err != nil { return secretentity.SecretID{}, models.NewGenericValidationError(fmt.Errorf("error create app secret: %w", err)) }; return s.adapter.CreateAppSecret(ctx, input)`) +**Config-validated constructor** — New(config Config) validates Config (adapter must be non-nil) and returns (*Service, error); the adapter is the sole dependency. (`func New(config Config) (*Service, error) { if err := config.Validate(); err != nil { return nil, err }; return &Service{adapter: config.Adapter}, nil }`) +**Dual interface assertions** — Service asserts both secret.Service (service.go) and secret.SecretService (secret.go) at compile time, mirroring the interface composition in the parent package. (`var _ secret.Service = (*Service)(nil); var _ secret.SecretService = (*Service)(nil)`) +**Package name differs from directory** — Package is secretservice, not service; wired by app/common and the Stripe test setup. (`package secretservice`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct, Config + Config.Validate (adapter non-nil), and New constructor. | adapter is the only field; New returns an error rather than panicking when Config is invalid. | +| `secret.go` | The four CRUD methods, each validating then delegating to the adapter. | UpdateAppSecret returns input.SecretID (not an empty id) on validation failure — keep that shape if extending. | + +## Anti-Patterns + +- Skipping input.Validate() in a method — the service layer is the validation boundary above the adapter. +- Adding business logic beyond validation+delegation; this service is intentionally a thin wrapper. +- Falling back to slog.Default() or a nil adapter instead of requiring Config.Adapter. + +## Decisions + +- **Service does nothing but validate and delegate.** — Secret storage logic lives in the swappable adapter; the service guarantees inputs are valid regardless of which adapter (plaintext or real store) is wired. + +## Example: Wiring the service over an adapter + +``` +import ( + secretservice "github.com/openmeterio/openmeter/openmeter/secret/service" + "github.com/openmeterio/openmeter/openmeter/secret/adapter" +) + +svc, err := secretservice.New(secretservice.Config{Adapter: adapter.New()}) +if err != nil { return nil, err } +``` + + diff --git a/openmeter/server/CLAUDE.md b/openmeter/server/CLAUDE.md new file mode 100644 index 0000000000..d5e19e7d9d --- /dev/null +++ b/openmeter/server/CLAUDE.md @@ -0,0 +1,50 @@ +# server + + + +> HTTP server assembly: NewServer wires the chi router, OpenAPI validation/auth middleware, the v3 API (api/v3/server) and the legacy v1/v2 Router (server/router) into one *Server. It owns transport-level concerns — middleware stacks, CORS, error mapping — never domain logic. + +## Patterns + +**Two route groups under one chi router** — NewServer registers v3 routes via v3server.NewServer(...).RegisterRoutes in one chi.Group and the legacy api.HandlerWithOptions(impl,...) in another, both fed the same materialized hook middlewares. (`hookMiddlewares := collectMiddlewareHooks(config.RouterHooks.Middlewares)`) +**Hook middlewares materialized once** — MiddlewareHooks are run a single time into a flat slice via collectMiddlewareHooks/middlewareCollector and reused for both groups; running hooks per-group would execute bodies twice. (`v3Middlewares := append([]server.MiddlewareFunc{}, hookMiddlewares...)`) +**OpenAPI-driven validation + auth middleware** — Legacy group uses authenticator.NewAuthenticator(...) + oapimiddleware.OapiRequestValidatorWithOptions(swagger,...) with ExcludeReadOnlyValidations and a NoopAuthenticationFunc. (`swagger.Servers = nil // skip server-name validation`) +**Typed param-error mapping** — errorHandlerReply switches on api.*ParamError types and maps each to models.NewStatusProblem with the right HTTP status. (`case *api.RequiredParamError: ... http.StatusBadRequest`) +**Default namespace via StaticNamespaceDecoder** — Both the v3 server and the legacy Router resolve namespace from NamespaceManager.GetDefaultNamespace() through namespacedriver.StaticNamespaceDecoder. (`NamespaceDecoder: namespacedriver.StaticNamespaceDecoder(...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `server.go` | NewServer: assembles chi router, middleware stacks, v3 + legacy route groups, OpenAPI validation, and error handling. | v3 and legacy groups must receive the same hookMiddlewares slice; re-invoking hooks per group double-runs side effects. Every RouterConfig.* field passed to v3server.Config must be wired by the caller. | +| `cors.go` | corsHandler wraps go-chi/cors to apply CORS only to AllowedPaths prefixes (else pass through). | Empty AllowedPaths applies CORS to ALL paths. | +| `router/` | Implements the generated legacy api.ServerInterface as the *Router passed as impl to api.HandlerWithOptions. | Router methods must match the generated ServerInterface signatures and contain no business logic. | + +## Anti-Patterns + +- Putting domain logic, DB queries, or validation in server.go — it is transport assembly only. +- Calling RouterHooks.Middlewares hooks separately per route group instead of once via collectMiddlewareHooks. +- Bypassing models.NewStatusProblem / errorHandlerReply when emitting HTTP error responses. +- Leaving swagger.Servers populated (re-enables server-name validation that breaks unknown deployments). + +## Decisions + +- **Mount v3 and legacy v1/v2 APIs as separate chi groups within one server.** — Each version has its own generated handler set and validation, but must share the same OTEL/logging middleware stack. +- **Materialize MiddlewareHooks once before mounting either group.** — Avoids double-running hook bodies, which is unsafe for hooks with construction side effects. + +## Example: Mapping generated OpenAPI param errors to HTTP problems + +``` +func errorHandlerReply(w http.ResponseWriter, r *http.Request, err error) { + switch e := err.(type) { + case *api.RequiredParamError: + err := fmt.Errorf("required param missing %s: %w", e.ParamName, err) + models.NewStatusProblem(r.Context(), err, http.StatusBadRequest).Respond(w) + default: + err := fmt.Errorf("unhandled server error: %w", err) + models.NewStatusProblem(r.Context(), err, http.StatusInternalServerError).Respond(w) + } +} +``` + + diff --git a/openmeter/server/router/CLAUDE.md b/openmeter/server/router/CLAUDE.md new file mode 100644 index 0000000000..2136595f5f --- /dev/null +++ b/openmeter/server/router/CLAUDE.md @@ -0,0 +1,61 @@ +# router + + + +> Implements the generated legacy v1/v2 api.ServerInterface (api/api.gen.go) as a single *Router type whose methods are thin adapters: each handler method translates oapi-codegen path/query params into a domain httpdriver/httphandler request and calls .With(...).ServeHTTP(w, r). The Router owns no business logic — it only wires per-domain HTTP handlers built in NewRouter from injected services. + +## Patterns + +**Thin delegating handler methods** — Every (a *Router) Xxx method is one-to-two lines: build the driver's params struct, then a..().With(params).ServeHTTP(w, r). No business logic, no DB access, no error handling beyond what the driver does. (`func (a *Router) GetInvoice(w, r, invoiceId, params) { a.billingHandler.GetInvoice().With(httpdriver.GetInvoiceParams{InvoiceID: invoiceId, Expand: lo.FromPtr(params.Expand)}).ServeHTTP(w, r) }`) +**One file per domain, methods named after ServerInterface** — Operations are grouped into per-domain files (billing.go, customer.go, entitlement.go, notification.go, etc.). Method names and signatures MUST match the generated api.ServerInterface exactly; the `var _ api.ServerInterface = (*Router)(nil)` assertion in router.go enforces total coverage at compile time. (`func (a *Router) ListAddons(w http.ResponseWriter, r *http.Request, params api.ListAddonsParams)`) +**Param mapping via driver-specific structs** — When a driver needs more than a raw id/params, build the driver's own *Params struct (e.g. httpdriver.GetCustomerOverrideParams, entitlementdriver.GetEntitlementValueHandlerParams) at the call site. Use lo.FromPtr / lo.FromPtrOr to flatten optional api params, never hand-rolled nil checks. (`a.appHandler.ListCustomerData().With(apphttpdriver.ListCustomerDataParams{ListCustomerAppDataParams: params, CustomerIdOrKey: customerIdOrKey})`) +**Handler construction concentrated in NewRouter** — All domain handlers are stored as unexported fields on Router and built once in NewRouter using each driver's New/NewXxxHandler constructor, passing the StaticNamespaceDecoder (default namespace) and httptransport.WithErrorHandler(config.ErrorHandler). No handler is constructed inside a request method. (`router.billingHandler = ... ; staticNamespaceDecoder := namespacedriver.StaticNamespaceDecoder(config.NamespaceManager.GetDefaultNamespace())`) +**Config dependency validation** — Config carries every domain service/connector; Config.Validate() rejects nil required dependencies and NewRouter returns an error if validation fails. Adding a new dependency means adding the field, a nil-check in Validate(), and wiring in NewRouter. (`if c.Billing == nil { return errors.New("billing service is required") }`) +**Unimplemented endpoints explicit** — Routes not yet built return http.StatusNotImplemented inline (VoidInvoiceAction, RecalculateInvoiceTaxAction, MarketplaceOAuth2Install*) rather than relying on api.Unimplemented; noop.go keeps `var unimplemented api.ServerInterface = api.Unimplemented{}` available for future codegen gaps. (`func (a *Router) VoidInvoiceAction(...) { w.WriteHeader(http.StatusNotImplemented) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `router.go` | Defines Config (all injected services), Config.Validate(), the Router struct with all handler fields, NewRouter() which builds every handler, and the api.ServerInterface compile-time assertion. Also registers cloudevents JSON body decoders for openapi3filter in init(). | New endpoints need a corresponding handler field + constructor call here; forgetting the Validate() nil-check or the field breaks DI silently at runtime. Spec validation itself lives in the sibling openmeter/server package, not here. | +| `billing.go` | Invoice lifecycle and billing-profile/customer-override endpoints. Progress actions (advance/approve/retry/snapshot-quantities) all funnel through a.billingHandler.ProgressInvoice().With(ProgressInvoiceParams{...}). | VoidInvoiceAction and RecalculateInvoiceTaxAction are intentionally 501 Not Implemented — do not assume they work. | +| `entitlement.go` | Largest file: v1 subject-scoped, v1 customer-scoped, v2 entitlement and v2 customer-scoped entitlement endpoints, split across entitlementHandler, meteredEntitlementHandler, entitlementV2Handler, and customerHandler. | Three different handlers serve entitlement routes; pick the one matching v1/v2 and subject/customer scope. Section comment banners delimit the groups. | +| `noop.go` | Holds the api.Unimplemented fallback instance for codegen-defined-but-unbuilt operations. | Prefer explicit StatusNotImplemented inline (per the file comment) over deferring to this for partially-built domains. | +| `portal.go` | Portal token endpoints plus QueryPortalMeter, which authenticates via authenticator.GetAuthenticatedSubject and forwards to a.QueryMeter with the subject filter applied. | QueryPortalMeter is not yet migrated to an httpdriver — it builds api.QueryMeterParams and re-enters the router method directly; keep the subject scoping when editing. | +| `appstripe.go` | Stripe webhook + API key + checkout endpoints. AppStripeWebhook reads the raw body (capped via http.MaxBytesReader) before delegating. | Webhook reads r.Body manually; this is one of the few methods doing IO before delegation — preserve the MaxBytesReader cap and error->StatusProblem handling. | +| `meter.go` | Meter CRUD + query endpoints; QueryMeter/QueryMeterPost branch to CSV vs JSON handlers based on commonhttp.GetMediaType(r). | Content negotiation is done here, not in the driver — text/csv routes to QueryMeterCSV()/QueryMeterPostCSV(). | + +## Anti-Patterns + +- Putting business logic, DB queries, or validation inside a Router method instead of the domain httpdriver/httphandler. +- Adding a method whose name/signature does not match the generated api.ServerInterface — breaks the `var _ api.ServerInterface = (*Router)(nil)` assertion. +- Constructing a domain handler inside a request method instead of once in NewRouter and storing it as a Router field. +- Adding a new injected dependency to Config without a nil-check in Validate() and wiring in NewRouter. +- Hand-rolling nil/pointer flattening for optional api params instead of lo.FromPtr / lo.FromPtrOr. + +## Decisions + +- **Router is a pure adapter over oapi-codegen ServerInterface; each method just maps params and delegates to a domain driver.** — Keeps the legacy v1 transport layer mechanical and lets domain packages own request decoding/validation/response shaping, so the generated interface contract is satisfied without duplicating logic. +- **All handlers built in NewRouter from a single Config of injected services using StaticNamespaceDecoder for the default namespace.** — Centralizes DI and namespace resolution; the legacy API operates against the single default namespace, so the decoder is static rather than request-derived. +- **Unbuilt endpoints return explicit 501 inline rather than codegen Unimplemented.** — Makes the not-yet-implemented surface visible and greppable in the per-domain file rather than hidden behind a shared fallback. + +## Example: Adding a legacy v1 endpoint: map oapi-codegen params to a driver request and delegate. + +``` +import ( + "net/http" + "github.com/samber/lo" + "github.com/openmeterio/openmeter/api" + "github.com/openmeterio/openmeter/openmeter/billing/httpdriver" +) + +func (a *Router) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params api.GetInvoiceParams) { + a.billingHandler.GetInvoice().With(httpdriver.GetInvoiceParams{ + InvoiceID: invoiceId, + Expand: lo.FromPtr(params.Expand), + IncludeDeletedLines: lo.FromPtr(params.IncludeDeletedLines), + }).ServeHTTP(w, r) +} +``` + + diff --git a/openmeter/session/CLAUDE.md b/openmeter/session/CLAUDE.md new file mode 100644 index 0000000000..ca801b4a1b --- /dev/null +++ b/openmeter/session/CLAUDE.md @@ -0,0 +1,41 @@ +# session + + + +> Defines the request-scoped AuthenticationSession (org/user identity + permissions) and context helpers to store/retrieve it. It is the single source of authenticated identity consumed across app, customer, meter, subscription and productcatalog packages. + +## Patterns + +**Context-keyed session storage** — Session is stored/retrieved via a typed context key (AuthenticatorContextKey) using GetActiveSession with a type-asserted ctx.Value lookup that returns nil when absent. (`if c, ok := ctx.Value(AuthenticationSessionKey).(*AuthenticationSession); ok { return c }`) +**Validated constructor** — NewAuthenticationSession builds the struct then calls Validate() and returns an error rather than an invalid session; OrgID and (OrgRole or OrgPermissions) are required. (`if err := session.Validate(); err != nil { return nil, fmt.Errorf(...) }`) +**errors.Join validation** — Validate() collects into `var errs []error` and returns errors.Join(errs...), matching the repo-wide validation convention. (`errs = append(errs, errors.New("orgID is required"))`) +**Nil-safe accessors** — GetSessionUserID returns *string and yields nil for missing session or empty UserID, so callers can distinguish absence from empty. (`GetSessionUserID(ctx) returns nil when no active session`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `session.go` | Entire package: AuthenticationSession struct, context key, GetActiveSession/GetSessionUserID accessors, NewAuthenticationSession constructor, Validate(), and WithLogger. | AuthenticationSessionKey is the constant string "active_organization_id" typed as AuthenticatorContextKey — use the typed key, never a raw string, or the type assertion in GetActiveSession will miss it. | + +## Anti-Patterns + +- Constructing AuthenticationSession literals directly without Validate() (bypasses required-field checks). +- Storing/reading the session under a plain string context key instead of AuthenticationSessionKey. +- Assuming GetActiveSession never returns nil — callers must nil-check. + +## Decisions + +- **Identity is org-centric with permission list plus role.** — Validate accepts either OrgRole or OrgPermissions, supporting both role-based and explicit-permission auth models in a multi-tenant system. + +## Example: Read the active org/user from context + +``` +import "github.com/openmeterio/openmeter/openmeter/session" + +if s := session.GetActiveSession(ctx); s != nil { + log = s.WithLogger(log) + _ = s.OrgID +} +``` + + diff --git a/openmeter/sink/CLAUDE.md b/openmeter/sink/CLAUDE.md new file mode 100644 index 0000000000..4718e261eb --- /dev/null +++ b/openmeter/sink/CLAUDE.md @@ -0,0 +1,62 @@ +# sink + + + +> Sink-worker core (driven by cmd/sink-worker): consumes usage events from Kafka, buffers them per (topic,partition,offset), dedupes, validates against cached meters, batch-inserts to ClickHouse, then commits offsets and writes dedupe keys — preserving an at-least-once / exactly-once-on-storage guarantee. Children: models (DTOs), flushhandler (post-flush callbacks). + +## Patterns + +**Config struct with Validate() then New constructor** — Every component (SinkConfig, ClickHouseStorageConfig, NamespacedMeterCacheConfig) has a Validate() returning errors.New(...) per missing dep, and a New* that calls config.Validate() first and wraps failure with fmt.Errorf. (`func NewSink(config SinkConfig) (*Sink, error) { if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid sink configuration: %w", err) } ... }`) +**Ordered flush: storage -> store offset -> dedupe set** — Sink.flush() runs under s.mu.Lock with partitions paused: (1) persistToStorage, (2) StoreMessage offsets sorted ascending so the largest commits last, (3) dedupeSet to Redis. The ordering is the consistency contract. (`// 1. Persist to storage; 2. Store Offset (sort by Offset asc); 3. Sink to Redis`) +**Buffer keyed by Kafka coordinate, mutex-guarded** — SinkBuffer.Add keys messages by KafkaMessage.String() (topic+partition+offset) so duplicates within a batch collapse; Dequeue applies MessageTransformerFunc transformers (e.g. withStoredAt) while draining under the lock. (`key := message.KafkaMessage.String(); b.data[key] = message`) +**Pause/resume partitions around flush** — flush() calls s.pause() before draining and defers s.resume(), preventing new messages from being processed mid-flush to keep storage and offset state consistent. (`err := s.pause(); ...; defer func() { err = s.resume() ... }()`) +**Periodic background cache refetch** — NamespacedMeterCache.Start guards with atomic.Bool, seeds the cache, then a goroutine ticks on periodicRefetchInterval calling fetchMeters; GetAffectedMeters reads under RWMutex and returns nil for dropped messages. (`if n.isRunning.Swap(true) { return errors.New("namespaced meter cache is already running") }`) +**FlushEventHandler invoked in a goroutine with timeout** — After a successful flush, if FlushEventHandler is set it runs OnFlushSuccess in a `go func()` under context.WithTimeout(ctx, FlushSuccessTimeout); errors are logged, never propagated to the flush path. (`go func() { ctx, cancel := context.WithTimeout(ctx, s.config.FlushSuccessTimeout); defer cancel(); err := s.config.FlushEventHandler.OnFlushSuccess(ctx, messages); ... }()`) +**OTel metrics + tracing wrap every phase** — Sink holds Int64Counter/Int64Histogram instruments created in NewSink and starts tracer spans (flush-lock, flush, persist, storage-batch-insert); reportFlushMetrics records ingest delay from IngestedAt/StoredAt. (`ctx, flushSpan := s.config.Tracer.Start(ctx, "flush", trace.WithSpanKind(trace.SpanKindConsumer), ...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `sink.go` | Sink struct, SinkConfig + Validate, NewSink, and the flush()/persistToStorage()/reportFlushMetrics() pipeline. The heart of the worker. | The storage->offset->dedupe ordering and the s.mu.Lock + pause/resume invariants protect the exactly-once-on-storage guarantee; do not reorder. | +| `buffer.go` | SinkBuffer (mutex map keyed by KafkaMessage.String()), Dequeue with transformers, RemoveByPartitions on revoke. | All access must hold b.mu; key collisions are intentional dedup, not a bug. | +| `storage.go` | Storage interface + ClickHouseStorage.BatchInsert mapping SinkMessage -> streaming.RawEvent with a fresh ulid StoreRowID and IngestedAt/StoredAt fallback to clock.Now(). | An error from BatchInsert retries the whole batch; mapping reads message.Serialized.* which must be non-nil. | +| `meters.go` | NamespacedMeterCache (meter cache keyed by namespace->eventType) with periodic refetch and GetAffectedMeters. | GetAffectedMeters returns nil for messages with Status.DropError set or unknown namespace; reads guarded by RWMutex. | +| `partition.go` | prettyPartitions helper for logging topic-partitions. | Purely diagnostic; handles nil Topic pointer. | + +## Anti-Patterns + +- Reordering the flush phases (storage, then offset store, then dedupe set) or removing the pause/resume + s.mu.Lock guard — breaks the at-least-once / exactly-once-on-storage guarantee. +- Running OnFlushSuccess synchronously inside flush() or letting its error fail the flush, causing re-processing of already-committed ClickHouse writes. +- Constructing Sink/Storage/MeterCache without calling config.Validate() first. +- Reading SinkBuffer.data or NamespacedMeterCache.namespaces without the corresponding mutex. +- Inserting into ClickHouse without a fresh StoreRowID (ulid.Make()) per RawEvent, or without falling back IngestedAt/StoredAt to clock.Now(). + +## Decisions + +- **Flush persists to ClickHouse before committing Kafka offsets and before writing Redis dedupe keys.** — If offset commit or dedupe write fails after storage, messages are reprocessed (at-least-once) rather than lost; the comments in flush() document this 'exactly once'-on-storage reasoning. +- **Meters are cached per-namespace in-process and refetched on an interval rather than queried per event.** — Event validation runs on the hot path; a cached MetersByType keyed by namespace/eventType avoids a DB round-trip per message. +- **Post-flush side effects go through an optional FlushEventHandler run on a detached, time-boxed goroutine.** — Keeps ingest-notification and other side effects off the latency-critical flush path and prevents them from failing committed writes. + +## Example: Constructor validates config then wires OTel + cache (the standard New* shape in this package) + +``` +func NewSink(config SinkConfig) (*Sink, error) { + if err := config.Validate(); err != nil { + return nil, fmt.Errorf("invalid sink configuration: %w", err) + } + messageCounter, err := config.MetricMeter.Int64Counter("sink.kafka.messages", metric.WithUnit("{message}")) + if err != nil { + return nil, fmt.Errorf("failed to create messages counter: %w", err) + } + meterCache, err := NewNamespaceStore(NamespacedMeterCacheConfig{ + PeriodicRefetchInterval: config.MeterRefetchInterval, + Logger: config.Logger, + MeterService: config.MeterService, + }) + if err != nil { + return nil, fmt.Errorf("failed to create namespace meter cache: %w", err) +// ... +``` + + diff --git a/openmeter/sink/flushhandler/CLAUDE.md b/openmeter/sink/flushhandler/CLAUDE.md new file mode 100644 index 0000000000..e8b2b5f39c --- /dev/null +++ b/openmeter/sink/flushhandler/CLAUDE.md @@ -0,0 +1,57 @@ +# flushhandler + + + +> Async, decoupling layer that runs side-effect callbacks after the sink successfully flushes a batch of usage events to ClickHouse. It owns the generic queue+drain machinery (flushEventHandler) and a fan-out multiplexer (FlushEventHandlers); the concrete flush effect (ingest notifications) lives in the ingestnotification child. + +## Patterns + +**Interface-first FlushEventHandler** — Everything is wired against the FlushEventHandler interface (OnFlushSuccess/Start/WaitForDrain/Close) in types.go. Concrete handlers and the multiplexer both assert `var _ FlushEventHandler = (*T)(nil)`. (`var _ FlushEventHandler = (*flushEventHandler)(nil)`) +**Constructor validates required deps then builds** — NewFlushEventHandler returns (FlushEventHandler, error) and rejects empty Name, nil Callback, nil Logger, nil MetricMeter before constructing; defaults applied for zero timeouts. No slog.Default() fallback. (`if opts.Logger == nil { return nil, errors.New("logger is required") }`) +**OnFlushSuccess is non-blocking and never re-does the write** — OnFlushSuccess only enqueues the batch onto the buffered events channel (defaultFlushChanSize=1000) and records metrics; the actual callback runs on the background goroutine. It must never reverse the already-committed ClickHouse write. (`case f.events <- event: f.metrics.eventsReceived.Add(ctx, 1)`) +**Background context with timeout for callbacks** — invokeCallbackWithTimeout deliberately uses context.Background() + CallbackTimeout (default 30s) so a canceled parent context still lets callbacks reach external systems; the parent trace span is re-attached via trace.ContextWithSpan. (`ctx, cancel := context.WithTimeout(context.Background(), f.callbackTimeout)`) +**Graceful drain on shutdown** — On ctx.Done/stopChan the loop calls Close() (closes events channel under mutex), then drains remaining batches with a fresh drainTimeout context before closing drainDone. WaitForDrain blocks until drainDone. (`for event := range f.events { f.invokeCallback(drainContext, event) }`) +**Idempotent close via sync.OnceFunc + atomic shutdown flag** — isShutdown (atomic.Bool) gates re-entry; all channel closes (eventsClose, stopChanClose, drainDoneClose) are wrapped in sync.OnceFunc so double-Close is safe. (`if f.isShutdown.Swap(true) { return nil }`) +**Per-handler namespaced metrics** — newMetrics builds Int64Counters/Histogram keyed by handler name (sink.flush_handler..events_received etc). New handlers get isolated metric names via opts.Name. (`meter.Int64Counter(fmt.Sprintf("sink.flush_handler.%s.events_received", handlerName))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `types.go` | Defines the FlushEventHandler interface and FlushCallback func type — the contract every handler and the mux satisfy. | Adding methods here forces updates to both flushEventHandler and FlushEventHandlers; keep the interface narrow. | +| `handler.go` | The generic async queue: NewFlushEventHandler, the start/drain goroutine loop, OnFlushSuccess enqueue, and timeout/trace handling. | events channel is closed under f.mu in Close(); OnFlushSuccess also takes f.mu — do not send on events outside this locking or you risk send-on-closed-channel. Callbacks intentionally run on context.Background(), not the request ctx. | +| `mux.go` | FlushEventHandlers fan-out: registers multiple handlers + OnDrainComplete hooks, joins per-handler errors on OnFlushSuccess/Close, runs onDrainComplete callbacks after all drains finish. | Start() short-circuits on the first error (returns immediately) whereas OnFlushSuccess/Close join all errors — the asymmetry is intentional. | +| `meters.go` | OTel metric set construction (eventsReceived/Processed/Failed, eventProcessingTime, eventChannelFull) namespaced by handler name. | Every counter creation can error; propagate it — don't ignore the err returns. | + +## Anti-Patterns + +- Doing the callback work synchronously inside OnFlushSuccess instead of enqueueing — it would block the sink's flush path. +- Returning an error from OnFlushSuccess that the caller treats as a flush failure, causing re-processing of already-committed ClickHouse writes. +- Using the inbound request ctx (or context.TODO) for the callback instead of the background-context+timeout pattern, breaking external calls when the parent is canceled. +- Sending on the events channel without holding f.mu, racing eventsClose() in Close() and panicking on send-on-closed-channel. +- Implementing FlushEventHandler from scratch in a downstream package instead of wrapping NewFlushEventHandler and supplying only a FlushCallback. + +## Decisions + +- **Run callbacks on a background goroutine fed by a buffered channel rather than inline in OnFlushSuccess.** — Keeps the sink's flush latency independent of downstream notification work and lets the sink commit to ClickHouse without waiting on Kafka/eventbus publishes. +- **Callbacks execute on context.Background() with an explicit CallbackTimeout; only the trace span is propagated.** — A canceled parent (shutdown/request cancel) must not abort an external side-effect mid-flight; the timeout bounds the work instead while traces stay linked. +- **Provide a FlushEventHandlers multiplexer that aggregates handlers and joins errors.** — Multiple independent post-flush effects (e.g. ingest notifications) can be registered and drained together without each implementing lifecycle plumbing. + +## Example: Wrap a side-effect callback as a flush handler and register it in the mux + +``` +h, err := flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{ + Name: "ingest_notification", + Logger: logger, + MetricMeter: metricMeter, + Callback: func(ctx context.Context, msgs []models.SinkMessage) error { + return publishIngestEvents(ctx, msgs) + }, +}) +if err != nil { return err } +mux := flushhandler.NewFlushEventHandlers() +mux.AddHandler(h) +_ = mux.Start(ctx) +``` + + diff --git a/openmeter/sink/flushhandler/ingestnotification/CLAUDE.md b/openmeter/sink/flushhandler/ingestnotification/CLAUDE.md new file mode 100644 index 0000000000..4c102fa180 --- /dev/null +++ b/openmeter/sink/flushhandler/ingestnotification/CLAUDE.md @@ -0,0 +1,53 @@ +# ingestnotification + + + +> A sink flush-success hook that, after a batch of usage events is written to ClickHouse, fans out ingestevents.EventBatchedIngest notifications onto the eventbus so downstream consumers (notably entitlement/balanceworker) can recompute affected balances. Its constraint: it must be a fast, side-effect-only post-flush callback that never undoes the sink's already-completed ClickHouse write. + +## Patterns + +**FlushEventHandler constructor wrapping** — NewHandler validates HandlerConfig then returns a flushhandler.FlushEventHandler built via flushhandler.NewFlushEventHandler with a named callback (Name: "ingest_notification") bound to handler.OnFlushSuccess. New handlers must register through NewFlushEventHandler, not implement the interface ad hoc. (`flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{Name: "ingest_notification", Callback: handler.OnFlushSuccess, Logger: logger, MetricMeter: metricMeter})`) +**Filter then map sink messages to events** — OnFlushSuccess first lo.Filter-s out messages where Serialized is nil, early-returns on empty, then slicesx.Map-s each sinkmodels.SinkMessage into an ingestevents.EventBatchedIngest carrying Namespace, SubjectKey, MeterSlugs, RawEvents and StoredAt. (`filtered := lo.Filter(events, func(e sinkmodels.SinkMessage, _ int) bool { return e.Serialized != nil })`) +**Group-by-subject then chunk before publish** — Events are grouped by namespace+"/"+subject (lo.GroupBy), merged per subject, and lo.Chunk-ed by config.MaxEventsInBatch so a single published message never exceeds Kafka size limits. MeterSlugs are lo.Uniq+slices.Concat deduplicated and RawEvents concatenated per chunk. (`iEventsBySubject := lo.GroupBy(iEvents, func(e ingestevents.EventBatchedIngest) string { return e.Namespace.ID + "/" + e.SubjectKey })`) +**Best-effort publish with joined errors** — Each merged event is published via h.publisher.Publish; failures accumulate with errors.Join into finalErr and are logged via ErrorContext rather than aborting the loop, so one failed publish does not drop the rest of the batch. (`finalErr = errors.Join(finalErr, err); h.logger.ErrorContext(ctx, "failed to publish change notification", "error", err)`) +**StoredAt stamped once at flush time** — now := time.Now() is captured once and used as StoredAt for every emitted event, on the documented assumption that the ClickHouse write has already completed when this callback runs. (`now := time.Now(); res := ingestevents.EventBatchedIngest{..., StoredAt: now}`) +**Meter identity via slug, not ID** — getMeterSlugsFromMeters maps []*meter.Meter to meter.Key strings; payloads carry MeterSlugs only, keeping events OSS-compatible (no IDs). (`slugs[i] = meter.Key`) +**Config Validate gate** — HandlerConfig.Validate() rejects MaxEventsInBatch <= 0 and is invoked inside NewHandler before any handler is constructed. (`if c.MaxEventsInBatch <= 0 { return errors.New("max_events_in_batch must be greater than 0") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Producer side of the ingest-notification pipeline: defines handler, HandlerConfig (+Validate), NewHandler, OnFlushSuccess (filter/map/group/merge/chunk/publish), and getMeterSlugsFromMeters. | OnFlushSuccess runs after the ClickHouse write, so it must stay tolerant — join publish errors instead of failing fast, and never do work that could undo a successful flush. Keep MeterSlugs from meter.Key (never IDs) for OSS compatibility, and preserve MaxEventsInBatch chunking to stay under Kafka message-size limits. | + +## Anti-Patterns + +- Implementing flushhandler.FlushEventHandler directly instead of going through flushhandler.NewFlushEventHandler in NewHandler. +- Returning a hard error from OnFlushSuccess on a single publish failure instead of joining into finalErr and continuing — this would discard the rest of an already-flushed batch. +- Dropping the group-by-subject + MaxEventsInBatch chunking, allowing oversized messages that exceed Kafka limits. +- Putting meter IDs (or other OSS-absent identifiers) into emitted events instead of MeterSlugs from meter.Key. +- Adding persistence, ClickHouse reads, or heavy synchronous work in this callback — it is a thin post-flush notification fan-out only. + +## Decisions + +- **Emit one EventBatchedIngest per subject (after merge + chunk) rather than one per raw sink message.** — Downstream balance recomputation is keyed by subject/meter; coalescing reduces event volume while chunking keeps individual messages under Kafka size limits. +- **Resolve meter slugs and subjects in the flush handler rather than during event consumption.** — The handler already holds the sink batch (message.Meters, message.Serialized.Subject) in memory; resolving here keeps consumers (balanceworker) simpler, at the cost of more producer-side work (noted in the OnFlushSuccess comment). + +## Example: Constructing the ingest-notification flush handler. + +``` +func NewHandler(logger *slog.Logger, metricMeter metric.Meter, publisher eventbus.Publisher, config HandlerConfig) (flushhandler.FlushEventHandler, error) { + if err := config.Validate(); err != nil { + return nil, err + } + h := &handler{publisher: publisher, logger: logger, config: config} + return flushhandler.NewFlushEventHandler(flushhandler.FlushEventHandlerOptions{ + Name: "ingest_notification", + Callback: h.OnFlushSuccess, + Logger: logger, + MetricMeter: metricMeter, + }) +} +``` + + diff --git a/openmeter/sink/flushhandler/ingestnotification/events/CLAUDE.md b/openmeter/sink/flushhandler/ingestnotification/events/CLAUDE.md new file mode 100644 index 0000000000..502f4b631b --- /dev/null +++ b/openmeter/sink/flushhandler/ingestnotification/events/CLAUDE.md @@ -0,0 +1,55 @@ +# events + + + +> Defines the Watermill event contract emitted after a batch of usage events is flushed to ClickHouse: EventBatchedIngest, the 'ingest/events.ingested' (v2) message that notifies downstream consumers (notably the balance worker) which subject/meters changed. Its sole constraint is to satisfy the marshaler.Event interface so the eventbus can serialize it as a CloudEvent. + +## Patterns + +**marshaler.Event implementation** — Every event type must implement marshaler.Event: EventName() string, EventMetadata() metadata.EventMetadata, Validate() error. Assert conformance at compile time with a blank var. (`var _ marshaler.Event = EventBatchedIngest{}`) +**Versioned EventType registration** — Declare a package-level metadata.EventType with Subsystem/Name/Version, then derive the wire name via metadata.GetEventName(...). EventName() returns this derived constant, never a hand-typed string. (`batchIngestEventType = metadata.EventType{Subsystem: EventSubsystem, Name: "events.ingested", Version: "v2"}; batchIngestEventName = metadata.GetEventName(batchIngestEventType)`) +**EventMetadata via metadata.ComposeResourcePath** — Build Source/Subject from the typed helpers metadata.ComposeResourcePathRaw / ComposeResourcePath with metadata.EntitySubjectKey, not raw string concatenation, so resource paths stay namespace-scoped and consistent. (`Subject: metadata.ComposeResourcePath(b.Namespace.ID, metadata.EntitySubjectKey, b.SubjectKey)`) +**Slug-based meter identity (no IDs)** — Reference meters by MeterSlugs ([]string), never meter IDs. Meter IDs are not present in the open-source build, so event payloads consumed by OSS code must not depend on them. (`MeterSlugs []string `json:"meterSlugs"``) +**Defensive Validate()** — Validate() delegates to Namespace.Validate() first, then checks required scalar fields (SubjectKey non-empty), returning a plain error on the first failure. (`if b.SubjectKey == "" { return errors.New("subjectKey must be set") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `events.go` | Declares EventSubsystem ('ingest'), the EventBatchedIngest payload struct, its versioned EventType, and the three marshaler.Event methods. Also exports EventVersionSubsystem for consumer subscription routing. | Changing struct fields or the Version (currently 'v2') is a wire-format break for the balance worker and any subscriber filtering on EventVersionSubsystem — bump the Version and coordinate consumers rather than mutating in place. RawEvents carries serializer.CloudEventsKafkaPayload and StoredAt carries the flush cutoff timestamp consumers use; do not repurpose. | + +## Anti-Patterns + +- Hand-coding the event name string instead of deriving it from the metadata.EventType via metadata.GetEventName. +- Adding meter IDs (or any OSS-absent identifier) to the payload; consumers in open-source must work with MeterSlugs only. +- Mutating existing JSON fields or the Version without bumping it — silently breaks balanceworker deserialization. +- Building Source/Subject strings by manual concatenation instead of metadata.ComposeResourcePath helpers. +- Adding business logic, Kafka publishing, or persistence here — this package is a pure event contract; producers live in ingestnotification, consumers in entitlement/balanceworker. + +## Decisions + +- **Carry MeterSlugs rather than meter IDs in the payload.** — Meter IDs do not exist in the open-source version, so any OSS consumer (e.g. balanceworker) must be able to act on the event without them. +- **Embed an explicit versioned EventType ('v2') and expose EventVersionSubsystem.** — Lets the eventbus/consumers subscribe and route by version+subsystem, enabling backward-incompatible payload evolution via version bumps instead of in-place mutation. + +## Example: Defining a new flush-notification event that the eventbus can marshal as a CloudEvent + +``` +package events + +import ( + "errors" + + "github.com/openmeterio/openmeter/openmeter/event/metadata" + "github.com/openmeterio/openmeter/openmeter/event/models" + "github.com/openmeterio/openmeter/openmeter/watermill/marshaler" +) + +var ( + _ marshaler.Event = EventBatchedIngest{} + + batchIngestEventType = metadata.EventType{Subsystem: EventSubsystem, Name: "events.ingested", Version: "v2"} + batchIngestEventName = metadata.GetEventName(batchIngestEventType) +// ... +``` + + diff --git a/openmeter/sink/models/CLAUDE.md b/openmeter/sink/models/CLAUDE.md new file mode 100644 index 0000000000..57276b5f67 --- /dev/null +++ b/openmeter/sink/models/CLAUDE.md @@ -0,0 +1,47 @@ +# models + + + +> Shared data-transfer types for the sink-worker pipeline. Defines SinkMessage (a Kafka event in flight) and its ProcessingStatus/ProcessingState so sink, flushhandler, and ingestnotification packages exchange state without a circular import. + +## Patterns + +**Leaf type-only package** — This package holds plain data structs and value-method helpers only — no services, adapters, or I/O. It exists to break import cycles between openmeter/sink and its sub-packages, so keep it dependency-light (it imports only dedupe, serializer, meter, kafka). (`type SinkMessage struct { Namespace string; KafkaMessage *kafka.Message; Serialized *serializer.CloudEventsKafkaPayload; ... }`) +**Stringer on int8 enum with explicit iota constants** — ProcessingState is an int8 enum with OK/DROP declared via iota and a String() method whose default branch formats unknown(%d). New states must be added to both the const block and the switch in String(). (`const ( OK ProcessingState = iota; DROP )`) +**Value-receiver derivation helper** — GetDedupeItem is a value-receiver method that derives a dedupe.Item from the message's Serialized payload (Id, Source) plus Namespace. It assumes Serialized is non-nil. (`func (m SinkMessage) GetDedupeItem() dedupe.Item { return dedupe.Item{Namespace: m.Namespace, ID: m.Serialized.Id, Source: m.Serialized.Source} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `models.go` | Entire package: SinkMessage struct, ProcessingStatus struct, ProcessingState enum + String(), and GetDedupeItem() helper. | GetDedupeItem dereferences m.Serialized without a nil check — callers must populate Serialized before deduping. IngestedAt/StoredAt are *time.Time and may be nil. DropError carries the reason a message is DROPped; it is only meaningful when State==DROP. | + +## Anti-Patterns + +- Adding service logic, persistence, or Kafka consumption here — this is a type-only leaf package; behavior belongs in openmeter/sink. +- Importing openmeter/sink or its sub-packages from here — that reintroduces the import cycle this package was created to avoid. +- Adding a new ProcessingState const without updating the String() switch, leaving it to fall through to unknown(%d). +- Calling GetDedupeItem() on a SinkMessage whose Serialized is nil — it will panic. + +## Decisions + +- **Carry processing outcome as a ProcessingStatus struct ({State, DropError}) rather than a bare error.** — Lets the pipeline distinguish OK vs intentional DROP and attach a drop reason without conflating it with fatal processing errors. +- **Keep these types in a standalone models package instead of in openmeter/sink.** — openmeter/sink, flushhandler, and ingestnotification all need SinkMessage; a shared leaf package avoids cyclic imports between them. + +## Example: Construct a SinkMessage and derive its dedupe key + +``` +import ( + "github.com/openmeterio/openmeter/openmeter/dedupe" + sinkmodels "github.com/openmeterio/openmeter/openmeter/sink/models" +) + +msg := sinkmodels.SinkMessage{ + Namespace: ns, + Serialized: payload, + Status: sinkmodels.ProcessingStatus{State: sinkmodels.OK}, +} +var item dedupe.Item = msg.GetDedupeItem() +``` + + diff --git a/openmeter/streaming/CLAUDE.md b/openmeter/streaming/CLAUDE.md new file mode 100644 index 0000000000..0ca07d8c27 --- /dev/null +++ b/openmeter/streaming/CLAUDE.md @@ -0,0 +1,55 @@ +# streaming + + + +> Defines the streaming.Connector interface (embedding namespace.Handler) for reading/aggregating metered usage out of ClickHouse, plus the shared param structs (QueryParams, ListEventsParams/V2, ListSubjectsParams, ListGroupByValuesParams) and the RawEvent/CustomerUsageAttribution value types. Concrete impls live in clickhouse/, retry/, and testutils/. + +## Patterns + +**Self-validating param structs** — Every params type has a Validate() that collects into var errs []error and returns models.NewNillableGenericValidationError(errors.Join(errs...)) (or errors.Join for ListEvents*). Callers/impls must Validate before querying. (`return models.NewNillableGenericValidationError(errors.Join(errs...))`) +**RawEvent dual-tagged for ClickHouse + JSON** — RawEvent fields carry both `ch:"..."` (ClickHouse column) and `json:"..."` tags; Namespace is `json:"-"` and stored_at/ingested_at use omitempty,omitzero. (`Time time.Time `ch:"time" json:"time"``) +**Usage attribution by key/subject, never by ID** — CustomerUsageAttribution attributes usage via Key + SubjectKeys (GetValues); ID exists only to map subjects to customers and is excluded from attribution values. (`NewCustomerUsageAttribution(id, key, subjectKeys)`) +**Group-by/filter ambiguity guards** — QueryParams.Validate rejects multiple subject/customer filters unless the matching group-by is present, and requires a customer filter when grouping by customer_id. (`len(p.FilterCustomer) > 1 && !slices.Contains(p.GroupBy, "customer_id")`) +**EventSortField allowlist with zero-value default** — EventSortField.Validate treats "" as valid (resolved to time at query time) and rejects anything outside Values(); used by ListEventsV2Params.SortBy. (`EventSortFieldTime / EventSortFieldIngestedAt / EventSortFieldStoredAt`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `connector.go` | Declares the Connector interface (CountEvents/ListEvents/ListEventsV2/ListSubjects/ListGroupByValues/QueryMeter/BatchInsert/ValidateJSONPath), RawEvent, and the list-subjects/group-by param validators. | Connector embeds namespace.Handler — impls must implement CreateNamespace/DeleteNamespace too; ListGroupByValues caps the window at 30 days and rejects From older than 90 days. | +| `query_params.go` | QueryMeter input (QueryParams) with the filter/group-by ambiguity validation rules. | Adding a filter field without adding its ambiguity guard can produce ambiguous aggregation results. | +| `eventparams.go` | ListEventsParams / ListEventsV2Params plus EventSortField; V2 uses pkg/filter.FilterString/FilterTime and a pagination.Cursor. | V2 filters validate via ValidateWithComplexity(1); ListEvents Validate returns plain errors.Join (not the generic-validation wrapper). | +| `usageattribution.go` | Customer interface + CustomerUsageAttribution (Validate/GetValues/Equal). | Validate requires an ID and at least one of Key or non-empty SubjectKeys; Equal compares SubjectKeys order-sensitively. | +| `defaults.go` | MinimumWindowSize / MinimumWindowSizeDuration constants (1 second). | These bound the smallest representable aggregation window. | + +## Anti-Patterns + +- Adding a Connector method or params field without a Validate() rule on its param struct. +- Attributing usage to a customer by ID instead of Key/SubjectKeys. +- Dropping the `ch` or `json` tag on a RawEvent field, or giving Namespace a JSON tag (it is `json:"-"`). +- Allowing multiple subject/customer filters without the corresponding group-by, or customer_id group-by without a customer filter. +- Implementing CreateNamespace/DeleteNamespace to create/drop tables — the events table is shared across namespaces (see clickhouse/). + +## Decisions + +- **Connector embeds namespace.Handler.** — Usage storage participates in namespace provisioning lifecycle even though the ClickHouse events table is shared. +- **Usage attribution carries ID separately from attribution values.** — ID is needed to map subjects to customers but usage is attributed only by key/subject keys. + +## Example: The usage read/aggregation contract over ClickHouse + +``` +type Connector interface { + namespace.Handler + + CountEvents(ctx context.Context, namespace string, params CountEventsParams) ([]CountEventRow, error) + ListEvents(ctx context.Context, namespace string, params ListEventsParams) ([]RawEvent, error) + ListEventsV2(ctx context.Context, params ListEventsV2Params) ([]RawEvent, error) + ListSubjects(ctx context.Context, params ListSubjectsParams) ([]string, error) + ListGroupByValues(ctx context.Context, params ListGroupByValuesParams) ([]string, error) + QueryMeter(ctx context.Context, namespace string, meter meter.Meter, params QueryParams) ([]meter.MeterQueryRow, error) + BatchInsert(ctx context.Context, events []RawEvent) error + ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error) +} +``` + + diff --git a/openmeter/streaming/clickhouse/CLAUDE.md b/openmeter/streaming/clickhouse/CLAUDE.md new file mode 100644 index 0000000000..a28ebceb50 --- /dev/null +++ b/openmeter/streaming/clickhouse/CLAUDE.md @@ -0,0 +1,65 @@ +# clickhouse + + + +> Concrete ClickHouse implementation of streaming.Connector — reads/aggregates metered usage events out of a single MergeTree events table. Each public method validates params, delegates to a query-builder struct, then scans rows; the connector holds no per-request state, only Config. + +## Patterns + +**Per-operation query-builder struct with toSQL()** — Each read/write operation has a dedicated struct (queryMeter, queryEventsTable, queryEventsTableV2, queryCountEvents, listSubjectsQuery, InsertEventsQuery, createEventsTable) carrying Database/EventsTableName/Namespace plus params, and a toSQL() / ToSQL() (and often toCountRowSQL()) method returning (sql, args). Connector methods build this struct, call toSQL, and run c.config.ClickHouse.Query/Exec. (`query := queryMeter{Database: c.config.Database, EventsTableName: c.config.EventsTableName, Namespace: namespace, Meter: meter, ...}; sql, args, err := query.toSQL()`) +**go-sqlbuilder.ClickHouse builders, never string concat** — All SQL is built via sqlbuilder.ClickHouse.NewSelectBuilder / NewInsertBuilder / NewCreateTableBuilder / NewCTEBuilder. Args are bound positionally through query.Build(); never interpolate user values into the SQL string except via sqlbuilder.Escape (see selectCustomerIdColumn). (`query := sqlbuilder.ClickHouse.NewSelectBuilder(); query.Where(query.Equal("namespace", d.Namespace))`) +**Validate then map known errors to typed domain errors** — Public methods first reject empty namespace / call params.Validate() wrapping in models.NewGenericValidationError, then translate ClickHouse error codes: 'code: 60' -> models.NewNamespaceNotFoundError or meterpkg.NewMeterNotFoundError; 'code: 36' (ValidateJSONPath bad args) -> (false, nil). Re-check the typed error before wrapping with fmt.Errorf. (`if strings.Contains(err.Error(), "code: 60") { return nil, meterpkg.NewMeterNotFoundError(query.Meter.Key) }`) +**Optional query progress tracking via ClientID** — When params.ClientID != nil, build a toCountRowSQL() count query and call c.withProgressContext(ctx, namespace, clientID, countSQL, countArgs) to attach a progressmanager-tracking context. Progress failures are logged via c.config.Logger but never returned. (`ctx, err = c.withProgressContext(ctx, namespace, *params.ClientID, countSQL, countArgs); if err != nil { c.config.Logger.Error("failed track progress", ...) }`) +**columnFactory aliasing for join/filter columns** — Shared where/select helpers (subjectWhere, customersWhere, selectCustomerIdColumn) use columnFactory(eventsTableName) to qualify column names as alias.column. Customer attribution is resolved with a ClickHouse map(...) CTE keyed on subject via customer.GetUsageAttribution(). (`getColumn := columnFactory(eventsTableName); subjectColumn := getColumn("subject")`) +**NullDecimal scan wrapper for decimal aggregates** — meter_query.go defines NullDecimal wrapping decimal.NullDecimal with a Scan that also accepts a raw decimal.Decimal; scanRows uses it so SUM/MIN/MAX results that ClickHouse may return as decimal-or-null are handled uniformly. (`nullDecimal := dest[2].(*NullDecimal); nullDecimal.Valid = true; nullDecimal.Decimal = decimal.NewFromFloat(value)`) +**Config-validated constructor that DDLs the events table** — New(ctx, Config) runs Config.Validate() (Logger, ClickHouse, Database, EventsTableName, ProgressManager all required) then calls createTable unless SkipCreateTables. The events table schema (createEventsTable.toSQL) is MergeTree, PARTITION BY toYYYYMM(time), ORDER BY (namespace, type, subject, toStartOfHour(time)). (`if !config.SkipCreateTables { if err := connector.createTable(ctx); err != nil { return nil, fmt.Errorf("create tables: %w", err) } }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `connector.go` | Connector struct + all streaming.Connector methods (QueryMeter, ListEvents/V2, CountEvents, ListSubjects, ListGroupByValues, BatchInsert, ValidateJSONPath) and namespace.Handler no-ops | CreateNamespace/DeleteNamespace are intentional no-ops (events table is shared across namespaces); QueryMeter sorts GroupBy for deterministic SQL and rewrites WindowStart/End to the period when WindowSize is nil | +| `meter_query.go` | queryMeter struct, NullDecimal, from() event-window resolution, toSQL/toCountRowSQL/scanRows | from() merges params.From with Meter.EventFrom (takes the later); EnableDecimalPrecision / EnablePrewhere flags change generated SQL | +| `event_query.go` | createEventsTable DDL, queryEventsTable, queryCountEvents, InsertEventsQuery, getTableName | events table ORDER BY/PARTITION drive query performance; toCountRowSQL only filters on ordered columns; InsertEventsQuery column order must match BatchInsert | +| `event_query_v2.go` | queryEventsTableV2 builder for the advanced ListEventsV2 filtering path | v2 carries full params struct rather than discrete fields; keep filter handling aligned with pkg/filter | +| `queryhelper.go` | subjectWhere, customersWhere, selectCustomerIdColumn (subject_to_customer_id map CTE), columnFactory | customer subject values come from customer.GetUsageAttribution(); escape literals with sqlbuilder.Escape; empty customer/subject sets must not emit a WHERE that excludes all rows | +| `subject_query.go / group_by_values_query.go` | listSubjectsQuery and group-by value enumeration builders | these map missing-meter errors via meterpkg.IsMeterNotFoundError | +| `connector_test.go` | GetMockConnector + MockClickHouse/MockRows unit tests with SkipCreateTables | mock-based tests assert exact bound args and code:60 -> MeterNotFoundError translation | +| `connector_query_test.go / suite_test.go` | CHTestSuite integration tests against a real ClickHouse instance | tests skip when ClickHouse is unavailable (s.T().Skipped()); cover every MeterAggregation x EnableDecimalPrecision combination | + +## Anti-Patterns + +- Building SQL with fmt.Sprintf/string concatenation of user input instead of sqlbuilder builders + bound args (only sqlbuilder.Escape'd literals are acceptable) +- Returning raw ClickHouse errors without translating code:60 to NamespaceNotFound/MeterNotFound — callers branch on those typed errors +- Adding a new read method without a matching query-builder struct + toSQL(), or skipping params.Validate() +- Letting progress-tracking (withProgressContext) failures abort the query instead of logging and continuing +- Implementing CreateNamespace/DeleteNamespace to actually create/drop tables — the events table is shared across namespaces + +## Decisions + +- **Single shared events MergeTree table partitioned by month and ordered (namespace, type, subject, toStartOfHour(time))** — Lowest-cardinality always-filtered columns left-most so ClickHouse prunes partitions and rows; namespaces share the table so create/delete-namespace are no-ops +- **Query progress is opt-in via ClientID and best-effort** — Progress estimation uses a separate count query and must never fail the actual data query +- **NullDecimal wraps decimal.NullDecimal with a permissive Scan** — ClickHouse may return aggregate values as decimal or null depending on EnableDecimalPrecision; a single scan target keeps scanRows uniform + +## Example: Adding a validated read method backed by a query-builder struct + +``` +func (c *Connector) QueryMeter(ctx context.Context, namespace string, meter meterpkg.Meter, params streaming.QueryParams) ([]meterpkg.MeterQueryRow, error) { + if namespace == "" { + return nil, fmt.Errorf("namespace is required") + } + if err := params.Validate(); err != nil { + return nil, fmt.Errorf("validate params: %w", err) + } + query := queryMeter{Database: c.config.Database, EventsTableName: c.config.EventsTableName, Namespace: namespace, Meter: meter /* ... */} + sql, args, err := query.toSQL() + if err != nil { + return nil, fmt.Errorf("build sql query: %w", err) + } + rows, err := c.config.ClickHouse.Query(ctx, sql, args...) + if err != nil { + if strings.Contains(err.Error(), "code: 60") { +// ... +``` + + diff --git a/openmeter/streaming/retry/CLAUDE.md b/openmeter/streaming/retry/CLAUDE.md new file mode 100644 index 0000000000..5e73412679 --- /dev/null +++ b/openmeter/streaming/retry/CLAUDE.md @@ -0,0 +1,54 @@ +# retry + + + +> Decorator that wraps any streaming.Connector with retry-on-transient-failure behavior for ClickHouse reads. Package streamingretry; its Connector forwards every call to a downstream connector, retrying only read methods on retryable ClickHouse/network errors. + +## Patterns + +**Decorator over streaming.Connector** — Connector holds a downstreamConnector streaming.Connector and asserts `var _ streaming.Connector = (*Connector)(nil)`. Every interface method delegates to the downstream; read methods wrap the call in withRetry, mutating/namespace methods (BatchInsert, ValidateJSONPath, Create/DeleteNamespace) delegate directly without retry. (`func (c *Connector) ListEvents(ctx, ns, params) (...) { return withRetry(ctx, c, func() ([]streaming.RawEvent, error) { return c.downstreamConnector.ListEvents(ctx, ns, params) }) }`) +**Generic withRetry helper** — withRetry[T any](ctx, c, fn func() (T, error)) wraps retry.DoWithData (avast/retry-go/v4) with retry.Context(ctx), retry.Attempts(c.maxTries), LastErrorOnly, CombineDelay(BackOffDelay, RandomDelay), Delay/MaxDelay, OnRetry logging, and a RetryIf predicate. All retried methods route through it. (`return retry.DoWithData(fn, retry.Context(ctx), retry.Attempts(uint(c.maxTries)), retry.RetryIf(...))`) +**Explicit retryable-error allowlist** — RetryIf returns true only for io.EOF/io.ErrUnexpectedEOF, clickhouse.ErrAcquireConnTimeout, and *clickhouse.Exception with Code == chproto.ErrAllConnectionTriesFailed (cluster upscale/downscale, CH restarts). Everything else fails fast — do not broaden this to retry arbitrary errors. (`if errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) { return true }`) +**Validated config constructor** — New(Config) calls Config.Validate() which collects errors via errors.Join: DownstreamConnector and Logger required, RetryWaitDuration > 0, MaxTries >= 1, MaxDelay >= 0. Config fields are copied into unexported Connector fields. (`if c.MaxTries < 1 { errs = append(errs, errors.New("max retries must be greater than or equal to 1")) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `retry.go` | Config + Validate, Connector decorator, all delegating methods, generic withRetry, RetryIf allowlist | BatchInsert and ValidateJSONPath are deliberately NOT retried; adding retry there would risk duplicate inserts. New downstream interface methods must be added here too or they won't compile against streaming.Connector | +| `retry_test.go` | Config validation tests, constructor tests, withRetry behavior (success/retry/exhaustion/non-retryable), context-cancellation and backoff+jitter timing | noopConnector embeds streaming.Connector to satisfy the interface for config tests; backoff test asserts total elapsed exceeds flat-delay sum | + +## Anti-Patterns + +- Adding retry to BatchInsert or other write/mutation paths (non-idempotent — risks duplicate events) +- Broadening RetryIf to retry generic errors instead of the explicit EOF / conn-timeout / ErrAllConnectionTriesFailed allowlist +- Bypassing withRetry for a new read method, or calling the downstream connector directly without the generic helper +- Using slog.Default() as a fallback — Logger is a required config field and must be injected + +## Decisions + +- **Only read methods are retried; writes delegate straight through** — ClickHouse reads are idempotent and safe to repeat across CH restarts; BatchInsert is not, so retrying could double-insert events +- **Retry triggers limited to connection-class errors (EOF, acquire timeout, ErrAllConnectionTriesFailed)** — These specifically occur during cluster upscale/downscale and CH restarts where the connection pool neglects pings; query-logic errors should fail fast + +## Example: Wrapping a downstream read with the generic retry helper and allowlist + +``` +func withRetry[T any](ctx context.Context, c *Connector, fn func() (T, error)) (T, error) { + return retry.DoWithData(fn, + retry.Context(ctx), + retry.Attempts(uint(c.maxTries)), + retry.LastErrorOnly(true), + retry.DelayType(retry.CombineDelay(retry.BackOffDelay, retry.RandomDelay)), + retry.Delay(c.retryWaitDuration), + retry.MaxDelay(c.maxDelay), + retry.RetryIf(func(err error) bool { + if errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) { + return true + } + if errors.Is(err, clickhouse.ErrAcquireConnTimeout) { + return true + } +// ... +``` + + diff --git a/openmeter/streaming/testutils/CLAUDE.md b/openmeter/streaming/testutils/CLAUDE.md new file mode 100644 index 0000000000..cbc28f8824 --- /dev/null +++ b/openmeter/streaming/testutils/CLAUDE.md @@ -0,0 +1,47 @@ +# testutils + + + +> In-memory MockStreamingConnector implementing streaming.Connector for unit/integration tests across billing, credit, entitlement, ledger and subscription packages. Approximates ClickHouse meter aggregation over a slice of SimpleEvent without a real database. + +## Patterns + +**Two-mode QueryMeter: pre-set rows or event aggregation** — If rows were registered via AddRow for the meter key, QueryMeter returns the exact rows whose WindowStart/End match params.From/To. Otherwise it falls back to aggregateEvents over registered SimpleEvents. Use AddRow for fully-controlled output; use Add/SetSimpleEvents to exercise real window aggregation. (`_, rowOk := m.rows[mm.Key]; if rowOk { /* exact match */ } else { row, err := m.aggregateEvents(mm, params) }`) +**SimpleEvent with explicit StoredAt for late-arriving usage** — SimpleEvent carries Time and StoredAt; AddSimpleEvent defaults StoredAt to Time unless WithStoredAt(t) is passed. aggregateEvents pre-filters by params.FilterStoredAt using filterStoredAt (Unix-second precision, recursive $and/$or) so tests can model events visible only after a stored-at cutoff. (`m.AddSimpleEvent(slug, 1, eventTime, testutils.WithStoredAt(storedAt))`) +**Events kept sorted by Time ASC** — AddSimpleEvent and SetSimpleEvents call sortMeterEvents (slices.SortStableFunc by Time.Compare) after mutation. MeterAggregationLatest relies on this ordering — it takes the last matching event's value. (`slices.SortStableFunc(m.events[meterSlug], func(a, b SimpleEvent) int { return a.Time.Compare(b.Time) })`) +**ClickHouse-faithful windowing semantics** — aggregateEvents truncates from/to to streaming.MinimumWindowSizeDuration (second precision), truncates each event by effectiveWindowSize, treats window end as exclusive, supports SUM (default) and LATEST only, and drops rows with Value == 0 to mimic ClickHouse not emitting empty tumbled windows. (`rows = lo.Filter(rows, func(row meter.MeterQueryRow, _ int) bool { return row.Value != 0 })`) +**Other interface methods are trivial stubs** — CountEvents/ListEvents/ListEventsV2/ListSubjects/ListGroupByValues return empty slices; BatchInsert is a no-op; Create/DeleteNamespace return nil; ValidateJSONPath returns strings.HasPrefix(jsonPath, "$."). Don't rely on these for behavior — only QueryMeter is meaningfully implemented. (`func (m *MockStreamingConnector) ValidateJSONPath(ctx, jsonPath) (bool, error) { return strings.HasPrefix(jsonPath, "$."), nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `streaming.go` | MockStreamingConnector, SimpleEvent, AddSimpleEvent/SetSimpleEvents/AddRow/Reset, WithStoredAt, aggregateEvents, filterStoredAt | aggregateEvents only supports SUM and LATEST — other aggregations silently sum; requires non-nil params.From and params.To; meter-not-found is returned only when no events exist for the key | +| `streaming_test.go` | Table-driven tests proving window boundary, exclusive-end, LATEST ordering, and FilterStoredAt semantics | Tests use testutils.GetRFC3339Time and convert.ToPointer; they document edge cases (end-exclusive, non-aligned from/to, larger-than-period windows) that new aggregation logic must preserve | + +## Anti-Patterns + +- Expecting full ClickHouse aggregation fidelity (avg/min/max/uniqueCount/groupBy are not implemented — only SUM and LATEST) +- Querying without setting both params.From and params.To (aggregateEvents errors) +- Relying on ListEvents/CountEvents/ListSubjects returning data — they are empty stubs +- Setting StoredAt to model late usage without using WithStoredAt — bare AddSimpleEvent defaults StoredAt to Time +- Mutating m.events directly instead of via Add/SetSimpleEvent, bypassing the Time-ASC sort that LATEST depends on + +## Decisions + +- **Mock implements aggregation rather than recording calls** — Downstream billing/credit/entitlement lifecycle tests need realistic meter rows over time, including late-arriving usage via StoredAt, not just call assertions +- **Zero-value rows are filtered out of windowed results** — Mirrors ClickHouse not returning tumbled rows for windows with no events, so consumers see the same gaps as production + +## Example: Modeling late-arriving usage with an explicit stored-at cutoff + +``` +streaming := testutils.NewMockStreamingConnector(t) +streaming.AddSimpleEvent("tokens", 5, eventTime, testutils.WithStoredAt(storedAt)) +rows, err := streaming.QueryMeter(t.Context(), namespace, meter.Meter{Key: "tokens", Aggregation: meter.MeterAggregationSum}, streaming.QueryParams{ + From: &from, + To: &to, + FilterStoredAt: &filter.FilterTimeUnix{FilterTime: filter.FilterTime{Lte: &cutoff}}, +}) +``` + + diff --git a/openmeter/subject/CLAUDE.md b/openmeter/subject/CLAUDE.md new file mode 100644 index 0000000000..99af832ffd --- /dev/null +++ b/openmeter/subject/CLAUDE.md @@ -0,0 +1,48 @@ +# subject + + + +> Subject domain: subjects are usage-attribution identities (a key plus optional display name / stripe customer id) kept loosely in sync with customers. Root files define the Subject model, the Adapter and Service interfaces, and the OptionalNullable update helper. service/ is the only write path (transactional + hooks), adapter/ is Ent-backed, httphandler/ is HTTP transport, testutils/ wires a real Postgres harness. + +## Patterns + +**Adapter/Service split with TxCreator** — Adapter embeds entutils.TxCreator and exposes raw CRUD/List; Service (in service/) wraps every mutation in transaction.Run and fires models.ServiceHooks[Subject]. The Service interface embeds models.ServiceHooks[Subject]. (`type Service interface { models.ServiceHooks[Subject]; Create(...); Update(...); Delete(...) }`) +**Input struct Validate()** — CreateInput/UpdateInput/GetSubjectAdapterInput each have Validate() that accumulates into errs and returns errors.Join; the service wraps these as models.NewGenericValidationError. (`func (i CreateInput) Validate() error { ... if len(errs)>0 { return errors.Join(errs...) } }`) +**OptionalNullable for tri-state updates** — UpdateInput uses OptionalNullable[T]{Value, IsSet} to distinguish unset vs explicit-null vs value; the adapter must honor IsSet rather than calling SetX unconditionally. The file comment marks this pattern as intentionally local to this adapter. (`DisplayName OptionalNullable[string]`) +**Key-only event payload** — SubjectKey is a minimal {Key} projection used in entitlement events to shrink payload size. (`type SubjectKey struct { Key string }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `subject.go` | Subject domain model (ManagedModel + namespace/key/displayName/metadata/stripeCustomerId) and SubjectKey | StripeCustomerId is deprecated in favor of the customer application entity; key is the only required field in Validate() | +| `service.go` | Service interface, ListParams/ListSortBy, CreateInput/UpdateInput, OptionalNullable helper | OptionalNullable is flagged 'unique to this adapter, should not be reused'; updates depend on IsSet semantics | +| `adapter.go` | Adapter interface (CRUD + GetByIdOrKey/GetByKey/GetById/List) embedding entutils.TxCreator | GetByIdOrKey is a convenience method — prefer GetById/GetByKey; all reads are namespace-scoped | + +## Anti-Patterns + +- Writing through the Adapter directly instead of the Service (skips transaction.Run, hooks, and validation) +- On Update, calling SetX unconditionally instead of branching on OptionalNullable.IsSet (silently nulls or overwrites fields) +- Hard-deleting subjects or cascading into entitlements — Delete is soft and entitlements outlive the subject +- Cross-importing customer/entitlement services into the Service — it depends only on subject.Adapter plus a hook registry +- Constructing Service via a struct literal instead of New, or passing a nil adapter + +## Decisions + +- **Service depends only on subject.Adapter and a hook registry, not on customer/entitlement services** — Subjects are an attribution identity; keeping the service dependency-light avoids cycles and lets customer-sync run as a hook rather than an inline cross-service call +- **Subject delete is soft and never touches entitlements** — Usage data and entitlements must survive subject removal for billing/audit + +## Example: Adapter interface embedding TxCreator with namespaced reads + +``` +type Adapter interface { + Create(ctx context.Context, input CreateInput) (Subject, error) + Update(ctx context.Context, input UpdateInput) (Subject, error) + GetByKey(ctx context.Context, key models.NamespacedKey) (Subject, error) + List(ctx context.Context, namespace string, params ListParams) (pagination.Result[Subject], error) + Delete(ctx context.Context, id models.NamespacedID) error + entutils.TxCreator +} +``` + + diff --git a/openmeter/subject/adapter/CLAUDE.md b/openmeter/subject/adapter/CLAUDE.md new file mode 100644 index 0000000000..5d649dd26e --- /dev/null +++ b/openmeter/subject/adapter/CLAUDE.md @@ -0,0 +1,56 @@ +# adapter + + + +> Ent-backed persistence layer for the subject domain. Implements subject.Adapter (CRUD + List) against the entdb Subject table, mapping DB entities to subject.Subject domain models and translating Ent errors into models.Generic* errors. + +## Patterns + +**TxUser adapter struct** — adapter holds *entdb.Client and satisfies subject.Adapter + entutils.TxUser[*adapter] via Tx/WithTx/Self. New(db) returns error if db is nil. (`var _ entutils.TxUser[*adapter] = (*adapter)(nil); func (a *adapter) Self() *adapter { return a }`) +**Every method wraps in TransactingRepo** — All read/write methods run inside entutils.TransactingRepo(ctx, a, func(ctx, tx){...}) (or TransactingRepoWithNoValue for Delete) so they rebind to a ctx-carried transaction. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (subject.Subject, error) { ... })`) +**Validate input then wrap error** — Mutating methods call input.Validate() first and wrap failures with models.NewGenericValidationError before any DB call. (`if err := input.Validate(); err != nil { return subject.Subject{}, fmt.Errorf("invalid input: %w", models.NewGenericValidationError(err)) }`) +**Ent error → domain error translation** — db.IsNotFound→NewGenericNotFoundError, db.IsConstraintError→NewGenericConflictError; raw errors are wrapped with %w and namespace/key context. (`if db.IsNotFound(err) { return subject.Subject{}, models.NewGenericNotFoundError(...) }`) +**Soft-delete via DeletedAt window** — Reads (GetByKey, GetByIdOrKey, List) include subjectdb.Or(DeletedAtIsNil(), DeletedAtGTE(now)); Delete sets DeletedAt=now rather than removing the row, and short-circuits if already deleted. (`subjectdb.Or(subjectdb.DeletedAtIsNil(), subjectdb.DeletedAtGTE(now))`) +**OptionalNullable explicit clear on Update** — Update inspects input..IsSet and Value to decide SetX vs ClearX, working around Ent issue 2108 where nil does not null a column. (`if input.DisplayName.IsSet { if input.DisplayName.Value != nil { query.SetDisplayName(*...) } else { query.ClearDisplayName() } }`) +**mapEntity is the single DB→domain mapper** — All methods return mapEntity(e); it backfills empty Metadata to an empty map and copies nullable DisplayName/StripeCustomerID pointers. (`return mapEntity(subjectEntity), nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Constructor New(db) + TxUser plumbing (Tx via HijackTx, WithTx via NewTxClientFromRawConfig, Self). | Tx uses ReadOnly:false; do not bypass WithTx or the tx context will not rebind the client. | +| `subject.go` | All CRUD/List methods + mapEntity. GetByIdOrKey matches ID exactly OR key within the not-deleted window. | Update's OptionalNullable clear logic is flagged as a unique pattern to be refactored; List sort for display-name-desc uses sql.OrderNullsLast()/OrderDesc() builders, not db.Desc. | + +## Anti-Patterns + +- Using a passed *entdb.Client directly instead of tx.db inside a TransactingRepo closure (breaks transaction binding). +- Returning raw Ent errors without db.IsNotFound/IsConstraintError translation to models.Generic* errors. +- Hard-deleting subject rows or ignoring the DeletedAtGTE(now) window in reads. +- On Update, calling SetX unconditionally instead of honoring OptionalNullable.IsSet (would silently null or overwrite fields). + +## Decisions + +- **Soft delete with a DeletedAt timestamp window** — Subjects may be referenced by usage/entitlements; deletion is logical and time-gated rather than physical, and usage for the subject is intentionally not deleted. +- **Manual OptionalNullable clear handling on Update** — Ent does not null fields when nil is provided (ent/ent#2108), so set-vs-clear must be decided from IsSet/Value explicitly. + +## Example: Adapter method with transaction, validation, and error mapping + +``` +func (a *adapter) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error) { + if err := input.Validate(); err != nil { + return subject.Subject{}, fmt.Errorf("invalid input: %w", models.NewGenericValidationError(err)) + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, tx *adapter) (subject.Subject, error) { + e, err := tx.db.Subject.Create().SetNamespace(input.Namespace).SetKey(input.Key).Save(ctx) + if err != nil { + if db.IsConstraintError(err) { + return subject.Subject{}, models.NewGenericConflictError(fmt.Errorf("subject with key already exists: %s", input.Key)) + } + return subject.Subject{}, fmt.Errorf("failed to create subject: %w", err) + } + return mapEntity(e), nil + }) +} +``` + + diff --git a/openmeter/subject/httphandler/CLAUDE.md b/openmeter/subject/httphandler/CLAUDE.md new file mode 100644 index 0000000000..9878ea0a94 --- /dev/null +++ b/openmeter/subject/httphandler/CLAUDE.md @@ -0,0 +1,57 @@ +# httphandler + + + +> HTTP transport layer (package httpdriver) for the subject API. Builds httptransport handlers for Get/List/Upsert/Delete subjects, resolves the namespace from context, calls subject.Service, and maps domain subjects to api.Subject. + +## Patterns + +**httptransport handler triple** — Each operation is a method returning a typed Handler built from NewHandler / NewHandlerWithArgs with (decode, business, encode) functions plus WithOperationName option. (`httptransport.NewHandlerWithArgs(decodeFn, bizFn, commonhttp.JSONResponseEncoderWithStatus[GetSubjectResponse](http.StatusOK), httptransport.AppendOptions(h.options, httptransport.WithOperationName("getSubject"))...)`) +**Handler interface aggregation** — handler implements Handler (= SubjectHandler) exposing GetSubject/ListSubjects/UpsertSubject/DeleteSubject; New(...) injects namespaceDecoder, logger, subjectService, entitlementConnector, options. (`type SubjectHandler interface { GetSubject() GetSubjectHandler; ... }`) +**Namespace resolved via decoder** — Every decode func calls h.resolveNamespace(ctx) which reads namespaceDecoder.GetNamespace and returns a 500 HTTPError when absent. (`ns, err := h.resolveNamespace(ctx)`) +**Typed request/response aliases per op** — Each op declares ResponseT, HandlerT, and a RequestT struct (with unexported namespace field); params-bearing ops use HandlerWithArgs with a string ...Params alias. (`type ( GetSubjectParams = string; GetSubjectResponse = api.Subject; GetSubjectHandler httptransport.HandlerWithArgs[GetSubjectRequest, GetSubjectResponse, GetSubjectParams] )`) +**FromSubject is the single domain→api mapper** — mapping.go's FromSubject copies fields and rebuilds Metadata into a *map; all encode paths route domain subjects through it. (`return FromSubject(sub), nil`) +**Double-parse body for null-vs-undefined** — UpsertSubject reads the body twice (struct + raw map) so it can detect field presence and set subject.OptionalNullable{IsSet:true} only for keys actually present in JSON. (`if _, ok := rawPayload["displayName"]; ok { updateInput.DisplayName = subject.OptionalNullable[string]{IsSet: true, Value: payload.DisplayName} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | handler struct, Handler/SubjectHandler interfaces, New constructor, resolveNamespace. | entitlementConnector is injected but unused by the shown ops; resolveNamespace returns 500, not 400, when namespace missing. | +| `subject.go` | All four operation builders + their request/response types. | UpsertSubject manually parses the body twice and validates stripeCustomerId has a cus_ prefix (400 on failure); DeleteSubject first GetByIdOrKey then deletes by resolved Id; both Upsert and Delete return list/nil bodies. | +| `mapping.go` | FromSubject domain→api.Subject converter. | Metadata is rebuilt into a new *map only when non-nil; do not skip FromSubject and hand-build api.Subject. | + +## Anti-Patterns + +- Calling subjectService directly without resolveNamespace (subject ops are namespace-scoped). +- Hand-constructing api.Subject instead of using FromSubject. +- Decoding the upsert body only once — loses the null-vs-undefined distinction the OptionalNullable update relies on. +- Returning raw service errors without fmt.Errorf wrapping / commonhttp.NewHTTPError for client-facing validation. + +## Decisions + +- **Body double-parse (struct + raw map) in UpsertSubject** — oapi-codegen cannot model optional body fields (deepmap/oapi-codegen#1039); presence in the raw map is the only way to distinguish erase (null) from leave-as-is (undefined). +- **Upsert performs list-then-create-or-update per key** — There is no native batch upsert; the handler lists existing keys, keys them with lo.KeyBy, then creates or partially updates each (marked TODO to optimize). + +## Example: A read handler with namespace resolution and httptransport wiring + +``` +func (h *handler) GetSubject() GetSubjectHandler { + return httptransport.NewHandlerWithArgs( + func(ctx context.Context, r *http.Request, idOrKey GetSubjectParams) (GetSubjectRequest, error) { + ns, err := h.resolveNamespace(ctx) + if err != nil { return GetSubjectRequest{}, err } + return GetSubjectRequest{namespace: ns, subjectIdOrKey: idOrKey}, nil + }, + func(ctx context.Context, req GetSubjectRequest) (GetSubjectResponse, error) { + sub, err := h.subjectService.GetByIdOrKey(ctx, req.namespace, req.subjectIdOrKey) + if err != nil { return GetSubjectResponse{}, fmt.Errorf("failed to get subject: %w", err) } + return FromSubject(sub), nil + }, + commonhttp.JSONResponseEncoderWithStatus[GetSubjectResponse](http.StatusOK), + httptransport.AppendOptions(h.options, httptransport.WithOperationName("getSubject"))..., + ) +// ... +``` + + diff --git a/openmeter/subject/service/CLAUDE.md b/openmeter/subject/service/CLAUDE.md new file mode 100644 index 0000000000..4c8b543968 --- /dev/null +++ b/openmeter/subject/service/CLAUDE.md @@ -0,0 +1,59 @@ +# service + + + +> Implements subject.Service (the write/read service layer for Subjects) over a subject.Adapter, wrapping every mutation in a transaction and firing service hooks at lifecycle boundaries. Subjects are usage-attribution identities kept in sync with customers; this service is the only write path and enforces input validation plus hook ordering. + +## Patterns + +**Service wraps Adapter, never DB directly** — Service struct holds a single subjectAdapter subject.Adapter plus a models.ServiceHookRegistry[subject.Subject]; all persistence goes through the adapter, never Ent. (`type Service struct { subjectAdapter subject.Adapter; hooks models.ServiceHookRegistry[subject.Subject] }`) +**Compile-time interface assertion** — var _ subject.Service = (*Service)(nil) at package top guarantees the struct satisfies the domain interface. (`var _ subject.Service = (*Service)(nil)`) +**Constructor validates required deps** — New(subjectAdapter) returns (*Service, error), rejects a nil adapter with fmt.Errorf, and initializes an empty ServiceHookRegistry. (`if subjectAdapter == nil { return nil, fmt.Errorf("subject adapter is required") }`) +**Validate input then wrap as generic validation error** — Mutating methods call input.Validate() first and wrap the result in models.NewGenericValidationError; GetById/GetByKey/Delete validate the identifier (id.Validate()/key.Validate()) the same way. (`if err := input.Validate(); err != nil { return subject.Subject{}, fmt.Errorf("invalid input: %w", models.NewGenericValidationError(err)) }`) +**Mutations run inside transaction.Run with hooks** — Create/Update/Delete execute via transaction.Run / transaction.RunWithNoValue against s.subjectAdapter, firing PostCreate, Pre/PostUpdate, or Pre/PostDelete around the adapter call within the same tx. (`return transaction.Run(ctx, s.subjectAdapter, func(ctx context.Context) (subject.Subject, error) { sub, err := s.subjectAdapter.Create(ctx, input); ...; err = s.hooks.PostCreate(ctx, &sub); ... })`) +**Update/Delete re-fetch before mutating** — Update and Delete first GetById the current subject so Pre-hooks observe existing state, then perform the adapter write, then fire Post-hooks. (`sub, err := s.subjectAdapter.GetById(ctx, models.NamespacedID{Namespace: input.Namespace, ID: input.ID})`) +**Read paths bypass transaction and hooks** — GetByIdOrKey, GetById, GetByKey, List delegate straight to the adapter (with identifier validation where applicable) and do not open a transaction or fire hooks. (`func (s *Service) List(ctx, orgId, params) { return s.subjectAdapter.List(ctx, orgId, params) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | The subject.Service implementation: Service struct, New constructor, RegisterHooks, and all CRUD+List methods. | Keep mutating methods inside transaction.Run/RunWithNoValue and fire the matching hook (PostCreate / Pre+PostUpdate / Pre+PostDelete). Do not add a write path that skips the hook registry or the validate+wrap step. | +| `service_test.go` | Integration test Test_SubjectService driving Create/Get/Update/Delete through subjecttestutils.NewTestEnv with real DB migrations. | Delete must NOT cascade into entitlements (they belong to the customer, not the subject); deleting a subject soft-deletes it (byID.IsDeleted()) and the key can be re-created afterward. Build deps via subjecttestutils, not app/common, to avoid import cycles. | + +## Anti-Patterns + +- Calling subjectAdapter directly for writes without transaction.Run / RunWithNoValue — breaks atomicity and skips hooks. +- Adding a Create/Update/Delete path that does not fire the corresponding ServiceHookRegistry method (PostCreate, Pre/PostUpdate, Pre/PostDelete). +- Skipping input.Validate() + models.NewGenericValidationError wrapping on a new mutating method. +- Hard-deleting subjects or cascading deletes into entitlements — Delete is soft (IsDeleted) and entitlements outlive the subject. +- Constructing Service via a struct literal instead of New, or passing a nil adapter. + +## Decisions + +- **Service depends only on subject.Adapter plus a hook registry, not on customer/entitlement services.** — Keeps the subject domain decoupled; cross-domain sync (subject<->customer) is handled by registered ServiceHooks (see the hooks child) rather than direct service calls, avoiding circular wiring. +- **All mutations are transactional and re-fetch current state before Pre-hooks.** — Ensures hooks observe a consistent snapshot and that the adapter write plus hook side effects commit or roll back together. +- **Subject deletion is soft and never touches entitlements.** — Entitlements are owned by the customer; a subject is only a usage-attribution key, so its lifecycle must not destroy customer-scoped balances (asserted in service_test.go). + +## Example: Transactional mutation firing a service hook + +``` +import ( + "context" + "fmt" + + "github.com/openmeterio/openmeter/openmeter/subject" + "github.com/openmeterio/openmeter/pkg/framework/transaction" + "github.com/openmeterio/openmeter/pkg/models" +) + +func (s *Service) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error) { + if err := input.Validate(); err != nil { + return subject.Subject{}, fmt.Errorf("invalid input: %w", models.NewGenericValidationError(err)) + } + return transaction.Run(ctx, s.subjectAdapter, func(ctx context.Context) (subject.Subject, error) { + sub, err := s.subjectAdapter.Create(ctx, input) +// ... +``` + + diff --git a/openmeter/subject/service/hooks/CLAUDE.md b/openmeter/subject/service/hooks/CLAUDE.md new file mode 100644 index 0000000000..02dcd813cd --- /dev/null +++ b/openmeter/subject/service/hooks/CLAUDE.md @@ -0,0 +1,52 @@ +# hooks + + + +> Provides the customer-side service hook that auto-provisions Subjects for every key in a customer's UsageAttribution.SubjectKeys. It is the bridge that keeps the subject domain in sync when customers are created or updated, registered onto the customer service via RegisterHooks. + +## Patterns + +**ServiceHook implementation via Noop embedding** — Hook types alias models.ServiceHook[customer.Customer] / models.NoopServiceHook[customer.Customer]. The concrete customerSubjectHook embeds NoopCustomerSubjectHook so it only overrides the lifecycle methods it cares about (PostCreate, PostUpdate), leaving the rest as no-ops. (`type customerSubjectHook struct { NoopCustomerSubjectHook; provisioner *SubjectProvisioner; ... }`) +**Config Validate() before construction** — SubjectProvisionerConfig implements models.Validator. Both NewCustomerSubjectHook and NewSubjectProvisioner call config.Validate() first and wrap failures; Validate collects errs into errors.Join (Subject, Logger, Tracer all required). (`if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid subject hook config: %w", err) }`) +**Re-entrancy guard via context flag** — EnsureSubjects short-circuits when SkipSubjectCustomerFromContext(ctx) is true. When creating a subject it passes NewContextWithSkipSubjectCustomer(ctx) into subject.Create so the reciprocal customer hook (customer/service/hooks SubjectCustomerHook) does not loop back. (`sub, err = p.subject.Create(NewContextWithSkipSubjectCustomer(ctx), subject.CreateInput{...})`) +**OTel span per hook/provisioner method** — Every exported method (PostCreate, PostUpdate, EnsureSubjects, EnsureSubject) opens a tracer span, sets otelcodes.Ok/Error status, records errors, and ends the span via defer. Span names follow dotted convention like 'subject_provisioner.ensure_subjects'. (`ctx, span := p.tracer.Start(ctx, "subject_provisioner.ensure_subjects"); defer func(){ ...; span.End() }()`) +**Get-or-create with typed not-found check** — EnsureSubject calls subject.GetByIdOrKey; treats only models.IsGenericNotFoundError(err) (or sub.IsDeleted()) as the create branch and propagates any other error wrapped with namespace/customer.id context. (`if err != nil && !models.IsGenericNotFoundError(err) { return nil, fmt.Errorf(...namespace=%s customer.id=%s...: %w, ...) }`) +**Accumulate validation errors across subject keys** — EnsureSubjects iterates all UsageAttribution.SubjectKeys collecting per-key errors into errs and returns errors.Join(errs...); a returned subject whose Key != requested subKey yields a models.NewGenericValidationError instructing callers to use key not id. (`errs = append(errs, models.NewGenericValidationError(fmt.Errorf("use subject key instead of id...")))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `customersubject.go` | Defines the customer->subject provisioning hook (customerSubjectHook), the reusable SubjectProvisioner, their configs/validators, and the skip-context helpers. | CustomerSubjectHookConfig is a type alias of SubjectProvisionerConfig; do not duplicate fields. PostCreate/PostUpdate both just call provisioner.EnsureSubjects — keep them symmetric. Always thread NewContextWithSkipSubjectCustomer through subject.Create to avoid hook recursion with the customer-side SubjectCustomerHook. | +| `customersubject_test.go` | Integration test wiring a real Postgres-backed TestEnv with concrete subject + customer adapters/services; registers both this hook and the reciprocal customerservicehooks.NewSubjectCustomerHook to exercise the create/conflict paths. | TestEnv is built from underlying constructors (subjectadapter.New, subjectservice.New, customeradapter.New, customerservice.New), not app/common wiring — preserve that to avoid import cycles. NoopCustomerOverrideService is a local stub satisfying billing.CustomerOverrideService. | + +## Anti-Patterns + +- Calling subject.Create without NewContextWithSkipSubjectCustomer — triggers infinite recursion with the customer-side SubjectCustomerHook. +- Returning on the first failing subject key instead of accumulating into errs and errors.Join — loses errors for other keys. +- Treating any GetByIdOrKey error as not-found; only models.IsGenericNotFoundError (or IsDeleted) should branch into create. +- Constructing the hook with slog.Default() or a nil Tracer/Subject — Validate() rejects nil deps and construction must fail loudly. +- Building test dependencies from app/common wiring instead of the underlying constructors, creating test-only import cycles. + +## Decisions + +- **SubjectProvisioner is split out from the hook itself.** — The provisioning logic (EnsureSubjects/EnsureSubject) is reusable independent of the ServiceHook lifecycle, so it has its own constructor and config. +- **A context-key skip flag coordinates the two reciprocal hooks (subject<->customer).** — Customer-create provisions a subject and subject-create provisions a customer; the skip flag breaks the mutual-trigger cycle without disabling either hook globally. + +## Example: Constructing and registering the customer subject hook + +``` +import subjectservicehooks "github.com/openmeterio/openmeter/openmeter/subject/service/hooks" + +hook, err := subjectservicehooks.NewCustomerSubjectHook(subjectservicehooks.CustomerSubjectHookConfig{ + Subject: subjectService, + Logger: logger, + Tracer: tracer, +}) +if err != nil { + return err +} +customerService.RegisterHooks(hook) // PostCreate/PostUpdate provision subjects for UsageAttribution.SubjectKeys +``` + + diff --git a/openmeter/subject/testutils/CLAUDE.md b/openmeter/subject/testutils/CLAUDE.md new file mode 100644 index 0000000000..e61bd6c94b --- /dev/null +++ b/openmeter/subject/testutils/CLAUDE.md @@ -0,0 +1,45 @@ +# testutils + + + +> Test harness for the subject domain. Provides a TestEnv that wires a real Postgres-backed subject service together with customer, feature, and entitlement dependencies so subject/service tests run against production constructors. + +## Patterns + +**TestEnv with NewTestEnv constructor** — NewTestEnv(t) builds a TestEnv from concrete package constructors (subjectadapter.New, subjectservice.New, customeradapter/customerservice, productcatalogadapter, entitlementpgadapter) over a Postgres test DB. (`subjectAdapter, _ := subjectadapter.New(client); subjectService, _ := subjectservice.New(subjectAdapter)`) +**Postgres + mock eventbus init** — DB comes from testutils.InitPostgresDB(t); events use eventbus.NewMock(t); logger is testutils.NewDiscardLogger(t); tracer is noop. (`db := testutils.InitPostgresDB(t); publisher := eventbus.NewMock(t)`) +**ULID namespace helpers** — NewTestULID(t) returns a fresh ULID; NewTestNamespace is aliased to it for per-test namespace isolation. (`var NewTestNamespace = NewTestULID`) +**Explicit schema migrate + idempotent Close** — DBSchemaMigrate(t) runs Schema.Create; Close(t) tears down ent/pg drivers and the client exactly once via sync.Once. (`e.close.Do(func() { e.db.EntDriver.Close(); e.db.PGDriver.Close(); e.Client.Close() })`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `env.go` | Defines TestEnv (SubjectService, CustomerService, EntitlementAdapter, FeatureService, Client) and NewTestEnv/DBSchemaMigrate/Close plus ULID helpers. | Meter adapter is a mockadapter (meteradapter.New(nil)); feature/entitlement use real Postgres adapters; build deps from package constructors, never from app/common, to avoid test import cycles. | + +## Anti-Patterns + +- Importing app/common wiring here — must build deps from underlying constructors per repo testutils rule. +- Skipping DBSchemaMigrate before exercising the service (the table will not exist). +- Calling Close more than the sync.Once guards or leaking ent/pg drivers. + +## Decisions + +- **Wire real Postgres-backed services rather than mocks for subject/customer/feature/entitlement** — Subject behavior (soft-delete windows, constraints) only surfaces against a real DB; mocks would hide adapter-level logic. + +## Example: Constructing the subject test environment + +``` +func NewTestEnv(t *testing.T) *TestEnv { + logger := testutils.NewDiscardLogger(t) + db := testutils.InitPostgresDB(t) + client := db.EntDriver.Client() + subjectAdapter, err := subjectadapter.New(client) + require.NoError(t, err) + subjectService, err := subjectservice.New(subjectAdapter) + require.NoError(t, err) + return &TestEnv{SubjectService: subjectService, Client: client, db: db, close: sync.Once{}} +} +``` + + diff --git a/openmeter/subscription/CLAUDE.md b/openmeter/subscription/CLAUDE.md new file mode 100644 index 0000000000..0bc3bb0bbb --- /dev/null +++ b/openmeter/subscription/CLAUDE.md @@ -0,0 +1,63 @@ +# subscription + + + +> Subscription domain root: bridges product-catalog plans to live customer subscriptions and forward into billing + entitlement. The root holds the in-memory SubscriptionSpec model, views, the declarative patch system, the apply/sync primitives, the state machine, timing/phase/item models, and the billing/entitlement bridge types. repo/ persists, service/+workflow/ orchestrate, addon/ is the addon sub-system, hooks/+validators/ enforce invariants. + +## Patterns + +**Spec is the unit of manipulation** — SubscriptionSpec (CreateSubscriptionPlanInput + CreateSubscriptionCustomerInput + Phases map of pointers) is the central mutable object. Patches and addons mutate it via AppliesToSpec.ApplyTo(spec, ApplyContext); the service syncs the spec to the DB rather than editing rows directly. (`type AppliesToSpec interface { ApplyTo(spec *SubscriptionSpec, actx ApplyContext) error }`) +**Phases use pointer maps and cumulative StartAfter** — Phases is map[string]*SubscriptionPhaseSpec so patches can mutate in place; phase timing is expressed as StartAfter ISODuration added to ActiveFrom (GetPhaseCadence), never absolute timestamps. (`phaseStartTime, _ := phase.StartAfter.AddTo(s.ActiveFrom)`) +**Typed patch errors mapped to API status** — Patches return *PatchValidationError / *PatchForbiddenError / *PatchConflictError; the Patch interface couples AppliesToSpec + Validate + Op() + Path(). Apply aggregation tolerates issues tagged AllowedDuringApplyingToSpecError. (`type Patch interface { AppliesToSpec; Validate() error; Op() PatchOperation; Path() SpecPath }`) +**State machine gates lifecycle actions** — NewStateMachine(status) (qmuntal/stateless) defines the legal transitions (Inactive->Create->Active, Active reentry Update/ChangeAddons, Active->Cancel->Canceled, Canceled->Continue->Active, Scheduled->Delete). CanTransitionOrErr returns models.NewGenericForbiddenError when disallowed. (`sm.Configure(SubscriptionStatusActive).PermitReentry(SubscriptionActionUpdate).Permit(SubscriptionActionCancel, SubscriptionStatusCanceled)`) +**Three-tier spec inputs** — Plan-derived fields use the *PlanInput suffix, customer-derived fields the *CustomerInput suffix, and the merged result the *Spec suffix; SubscriptionSpec embeds both inputs inline. (`CreateSubscriptionPlanInput + CreateSubscriptionCustomerInput composed into SubscriptionSpec`) +**Operation context marker** — subscription-driven mutations carry NewSubscriptionOperationContext(ctx); downstream hooks check IsSubscriptionOperation(ctx) to avoid re-entrant side effects. (`func IsSubscriptionOperation(ctx context.Context) bool`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `subscriptionspec.go` | SubscriptionSpec + Create*PlanInput/Create*CustomerInput, ToCreateSubscriptionEntityInput, GetPhaseCadence/GetSortedPhases | Phases is a pointer map for in-place patch mutation; phase cadence is derived from StartAfter+ActiveFrom and clamped by ActiveTo | +| `apply.go` | AppliesToSpec interface, ApplyContext, NewAggregateAppliesToSpec, AllowedDuringApplyingToSpecError | ApplyTo should only be invoked via spec.Apply so post-apply validation runs; some issues are tolerated only when tagged allowed-during-apply | +| `patch.go` | Patch/ValuePatch interfaces, PatchOperation enum, typed patch errors | Return PatchValidationError/PatchForbiddenError/PatchConflictError (not bare errors) so HTTP maps to 4xx; concrete patches live in patch/ | +| `state.go` | SubscriptionStatus/SubscriptionAction enums and the stateless state machine | Gate every lifecycle action through CanTransitionOrErr before mutating; Cancel/Continue are real transitions, Update is a reentry | +| `billing.go` | BillingBehaviorOverride (RestartBillingPeriod anchor at item ActiveFrom) | ProratingBehavior is intentionally not yet wired; restart anchors to the item's ActiveFrom | +| `entitlement.go` | EntitlementAdapter contract for scheduling/fetching item-linked entitlements | Subscription depends on this interface, not entitlement internals; impl is in subscription/entitlement | +| `subscriptionview.go` | SubscriptionView (read projection) with AsSpec() round-trip | Mutate via view.AsSpec() -> spec edit -> Service.Update, never edit view items directly | +| `context.go` | Subscription operation context marker | Set it on subscription-originated writes so hooks can skip re-entrant work | + +## Anti-Patterns + +- Editing persisted subscription/phase/item rows directly instead of building a target SubscriptionSpec and running sync +- Computing phase/item activity as absolute timestamps instead of StartAfter/ISODuration relative to ActiveFrom +- Returning bare errors from patches instead of the typed PatchValidationError/PatchForbiddenError/PatchConflictError +- Performing a lifecycle action without passing it through SubscriptionStateMachine.CanTransitionOrErr +- Adding DB or HTTP code to the root package — persistence is in repo/, transport via the v3 handlers, orchestration in service/ and workflow/ + +## Decisions + +- **All mutation flows through a declarative spec + sync diff rather than imperative row edits** — Patches, addons, plan-changes, cancel, and continue can all be expressed as transforms on a single SubscriptionSpec, so one sync algorithm reconciles target state and history immutability uniformly +- **Lifecycle legality is encoded in a stateless state machine, not scattered if-checks** — Create/Update/Cancel/Continue/Delete/ChangeAddons have a small fixed transition graph; centralizing it makes forbidden transitions return a consistent GenericForbiddenError +- **Phase timing is relative (StartAfter ISODuration), not absolute** — A spec can be re-anchored to any ActiveFrom (migrations, plan changes) without rewriting every phase timestamp + +## Example: Aggregate patches onto a spec, tolerating only allowed-during-apply issues + +``` +func NewAggregateAppliesToSpec(applieses []AppliesToSpec) AppliesToSpec { + return NewAppliesToSpec(func(spec *SubscriptionSpec, actx ApplyContext) error { + for i, applies := range applieses { + if err := spec.Apply(applies, actx); err != nil { + issues, e := models.AsValidationIssues(err) + if e != nil { return models.ErrorWithComponent(models.ComponentName(fmt.Sprintf("patch at idx %d", i)), e) } + if lo.EveryBy(issues, func(is models.ValidationIssue) bool { + return IsValidationIssueWithBoolAttr(is, subscriptionPatchErrAttrNameAllowedDuringApplyingToSpecError) + }) { continue } + return models.ErrorWithComponent(models.ComponentName(fmt.Sprintf("patch at idx %d", i)), err) + } + } + return nil + }) +} +``` + + diff --git a/openmeter/subscription/addon/CLAUDE.md b/openmeter/subscription/addon/CLAUDE.md new file mode 100644 index 0000000000..8a9b796e71 --- /dev/null +++ b/openmeter/subscription/addon/CLAUDE.md @@ -0,0 +1,58 @@ +# addon + + + +> Subscription-addon sub-domain (package subscriptionaddon): models a 1:1 SubscriptionAddon (subscription + productcatalog Addon) plus its append-only quantity timeline, and the rate-card Apply/Restore math that folds addon prices/entitlements/discounts onto a target RateCard. Root holds domain types + events; diff/, repo/, service/, http/ provide the engine, persistence, service, and transport layers. + +## Patterns + +**Quantity as a timeutil.Timeline** — Quantities is a timeutil.Timeline[SubscriptionAddonQuantity]; GetInstances() derives SubscriptionAddonInstance segments from open periods, never from stored end times. (`periods := quantities.GetOpenPeriods(); periods = periods[1:]; cad, _ := models.NewCadencedModelFromPeriod(period)`) +**Reversible Apply/Restore rate-card math** — SubscriptionAddonRateCard.Apply adds price/entitlement/discount onto a target RateCard; Restore subtracts the exact same amounts. They must stay inverse and validate compatibility first. (`productcatalog.NewRateCardWithOverlay(a.AddonRateCard.RateCard, target).ValidateWith(ValidateRateCardsShareSameKey, ...)`) +**ChangeMeta-only mutation of rate cards** — All rate-card edits go through target.ChangeMeta(func(m RateCardMeta) (RateCardMeta, error){...}); target must be a non-nil pointer (checked via reflect) and annotations must be non-nil. (`return target.ChangeMeta(func(m productcatalog.RateCardMeta) (productcatalog.RateCardMeta, error) { ... })`) +**Boolean-entitlement counting via AnnotationParser** — Stacked boolean entitlements are tracked by an annotation count (subscription.AnnotationParser Get/SetBooleanEntitlementCount); metered entitlements sum/subtract IssueAfterReset treating nil as 0. (`count := subscription.AnnotationParser.GetBooleanEntitlementCount(annotations); annotations, _ = subscription.AnnotationParser.SetBooleanEntitlementCount(annotations, count+1)`) +**Validate() collecting errors.Join** — Input Validate() methods append to var errs []error and return errors.Join(errs...) (or models.NewNillableGenericValidationError), never first-error-return. (`if i.AddonID == "" { errs = append(errs, errors.New("addonID is required")) }; return errors.Join(errs...)`) +**Customer-scoped marshaler.Event pair** — CreatedEvent and ChangeQuantityEvent are aliases of a shared event struct; Source is the subscriptionAddon resource path, Subject is the customer path, UserID from session.GetSessionUserID(ctx). (`Source: metadata.ComposeResourcePath(ns, metadata.EntitySubscriptionAddon, id), Subject: metadata.ComposeResourcePath(ns, metadata.EntityCustomer, customer.ID)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `addon.go` | SubscriptionAddon aggregate + GetInstances/GetInstanceAt deriving instances from the quantity timeline; CreateSubscriptionAddonInput.Validate. | Deleted addons truncate quantities via .Before(*DeletedAt); the several 'this should never happen' guards return empty rather than panicking. | +| `extend.go` | SubscriptionAddonRateCard.Apply / Restore — the core price/entitlement/discount fold and unfold math. | Apply and Restore must remain exact inverses; Restore guards against negative flat amounts/IssueAfterReset; FeatureID validation intentionally disabled (FIXME OM-1337). | +| `quantity.go` | SubscriptionAddonQuantity (ActiveFrom+Quantity) and AsTimed() adapter into timeutil.Timed. | Quantity may be 0 in a segment but CreateSubscriptionAddonInput rejects an initial quantity of 0. | +| `instance.go` | SubscriptionAddonInstance — virtual effective addon for a CadencedModel period, embeds CadencedModel. | Instances are computed, never persisted; merging quantity with Addon happens in GetInstances. | +| `events.go` | CreatedEvent / ChangeQuantityEvent definitions and constructors. | Event names are versioned (subscriptionaddon.created v1); changing them breaks the consumer contract. | +| `repository.go` | SubscriptionAddonRepository + SubscriptionAddonQuantityRepository interfaces and their input types. | Quantity repo only has Create — quantity is append-only, there is no Update/Delete. | +| `service.go` | Service interface (Create/Get/List/ChangeQuantity), OrderBy enum, list/get input validation. | ListSubscriptionAddonsInput requires SubscriptionID; GetSubscriptionAddonInput supports lookup by ID or by subscription+addon. | +| `ratecard.go` | Thin wrapper of addon.RateCard as SubscriptionAddonRateCard. | All rate-card behavior lives in extend.go, not here. | + +## Anti-Patterns + +- Mutating a RateCard outside target.ChangeMeta or passing a non-pointer / nil annotations (Apply/Restore reject via reflect checks). +- Making Apply and Restore non-inverse — restoring must subtract exactly what apply added and error on negative results. +- Updating or deleting a quantity row instead of appending a new (ActiveFrom, Quantity) segment. +- Deriving instance end times from stored fields instead of timeline open periods (GetInstances). +- Indexing the boolean-entitlement count with raw annotation keys instead of subscription.AnnotationParser. + +## Decisions + +- **Quantity is an append-only timeline; effective instances are computed from open periods at read time.** — Preserves full history for billing/proration and avoids destructive in-place edits. +- **Addon effects on rate cards are expressed as a reversible Apply/Restore pair.** — Lets the workflow layer re-sync the full before/after addon set via diffs and cleanly undo an addon. +- **Stacked boolean entitlements counted via annotations rather than duplicate templates.** — A rate card can hold only one entitlement template, so count tracks how many addons contributed it. + +## Example: Folding an addon's flat price onto a target rate card + +``` +return target.ChangeMeta(func(m productcatalog.RateCardMeta) (productcatalog.RateCardMeta, error) { + aMeta := a.AddonRateCard.AsMeta() + tMeta := m.Clone() + if aMeta.Price != nil && tMeta.Price.Type() == productcatalog.FlatPriceType { + tFlat, _ := tMeta.Price.AsFlat() + aFlat, _ := aMeta.Price.AsFlat() + m.Price = productcatalog.NewPriceFrom(productcatalog.FlatPrice{Amount: tFlat.Amount.Add(aFlat.Amount), PaymentTerm: tFlat.PaymentTerm}) + } + return m, nil +}) +``` + + diff --git a/openmeter/subscription/addon/diff/CLAUDE.md b/openmeter/subscription/addon/diff/CLAUDE.md new file mode 100644 index 0000000000..ad5b22d933 --- /dev/null +++ b/openmeter/subscription/addon/diff/CLAUDE.md @@ -0,0 +1,41 @@ +# diff + + + +> Pure-functional engine that computes how a SubscriptionAddon transforms a SubscriptionSpec (apply) and how to undo it (restore). It bridges subscription addons into the spec model by splitting/merging items per phase so the addon's rate cards are present for its cadence; constraint: this package is internal to subscription and never persists. + +## Patterns + +**Diffable apply/restore pair** — Every addon transform is expressed as a Diffable with GetApplies() and GetRestores() returning subscription.AppliesToSpec; the two operations must be exact inverses (restore_test asserts SpecsEqual after apply+restore). (`type Diffable interface { GetApplies() subscription.AppliesToSpec; GetRestores() subscription.AppliesToSpec }`) +**AppliesToSpec closures, never direct mutation** — Spec changes are wrapped in subscription.NewAppliesToSpec(func(spec *SubscriptionSpec, actx ApplyContext) error {...}) and aggregated via subscription.NewAggregateAppliesToSpec; callers invoke spec.Apply(...). Do not mutate the spec outside an AppliesToSpec. (`return subscription.NewAppliesToSpec(func(spec *subscription.SubscriptionSpec, _ subscription.ApplyContext) error { ... })`) +**Per-phase gap/intersection splitting** — getApplyForRateCard walks spec.GetSortedPhases(), intersects the addon cadence with each phase via timeutil.OpenPeriod, tracks uncovered gaps, splits existing items into difference+intersection parts, and creates new items for gaps using rc.Apply Quantity times. (`addInPhase := pCad.AsPeriod().Intersection(addPer); gaps := []timeutil.OpenPeriod{*addInPhase}`) +**Quantity-driven rate card application** — rc.Apply(rateCard, annotations) is invoked exactly d.addon.Quantity times (gaps use Quantity-1 since the base card already exists); Quantity==0 yields a no-op AppliesToSpec. Merge math lives in subscriptionaddon, not here. (`for range d.addon.Quantity { err := rc.Apply(inst.RateCard, inst.Annotations) }`) +**Relative cadence via setItemRelativeCadence** — Item cadences are stored as ActiveFromOverrideRelativeToPhaseStart / ActiveToOverrideRelativeToPhaseStart durations computed with datetime.ISODurationBetween(phaseStart, target); overrides equal to the phase boundary are left nil. (`item.ActiveFromOverrideRelativeToPhaseStart = &diff // datetime.ISODurationBetween(phaseCadence.ActiveFrom, *target.From)`) +**Restore deletes only effectively-zero items** — restore() undoes rc.Restore Quantity times, then deletes an item only if zeroRateCardCheck.CanDelete() (zero price/entitlement AND not owned by OwnerSubscriptionSubSystem), and re-merges subsequent identical items. (`chk := zeroRateCardCheck{itemAnnotations: item.Annotations, rc: target}; if chk.CanDelete() { rmIdxs = append(rmIdxs, idx) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `diff.go` | Defines Diffable interface and someDiffable (closure-backed Apply/Restore fns) | GetApplies/GetRestores must wrap fns in NewAppliesToSpec; keep the two symmetric | +| `addon.go` | GetDiffableFromAddon builds a someDiffable from an addon's instances; per-instance diffable aggregates per-rate-card applies | Returns (nil, nil) when no instances/quantities — callers must nil-check the Diffable (see create.go list flow) | +| `apply.go` | getApplyForRateCard: the phase-splitting algorithm; setItemRelativeCadence | Gaps use Quantity-1 applies; phases iterated only between phaseAtCadenceStart and phaseAtCadenceEnd; sort newItems by cadence | +| `restore.go` | Inverse of apply: undo rc effects, delete zero items, re-merge subsequent identical items | Merge predicate compares RateCard.Equal, Annotations DeepEqual, BillingBehaviorOverride, and subsequency; empty ItemsByKey entries are deleted | +| `zeroratecard.go` | zeroRateCardCheck.CanDelete — decides if a restored item is safe to remove | Only measures fields rc.Apply/Restore touches (Price, EntitlementTemplate); non-flat price or owner annotation blocks deletion | +| `affected.go` | GetAffectedItemIDs maps rate-card key -> affected subscription item IDs (used by http mapping) | Marked FIXME for placement; uses AddonRateCardMatcherForAGivenPlanRateCard and dedupes with lo.Uniq | + +## Anti-Patterns + +- Mutating SubscriptionSpec phases/items outside a NewAppliesToSpec closure +- Making GetApplies and GetRestores non-inverse (breaks restore_test SpecsEqual assertions) +- Calling rc.Apply a number of times other than addon.Quantity (gaps use Quantity-1) +- Persisting or reaching into repos/services from this package — it is pure spec math, internal to subscription +- Setting absolute item cadences instead of relative ActiveFrom/ActiveToOverrideRelativeToPhaseStart durations + +## Decisions + +- **Express addon application as reversible Diffable apply/restore rather than mutating persisted state** — Lets the workflow layer compose addon changes onto an in-memory spec and undo them deterministically; tests verify symmetry +- **Item splitting/merging done by period arithmetic (timeutil.OpenPeriod gaps/difference/intersection)** — An addon must cover its exact cadence within each phase, possibly splitting pre-existing items; period algebra makes coverage provable +- **RateCard merge/restore math delegated to subscriptionaddon package** — Keeps this package focused on spec topology; README explicitly states merging logic lives in subscriptionaddon + + diff --git a/openmeter/subscription/addon/http/CLAUDE.md b/openmeter/subscription/addon/http/CLAUDE.md new file mode 100644 index 0000000000..3deb00d8f4 --- /dev/null +++ b/openmeter/subscription/addon/http/CLAUDE.md @@ -0,0 +1,37 @@ +# http + + + +> HTTP driver (package httpdriver) for the subscription-addon REST surface: create, list, get, and update (quantity change) of subscription addons. Thin transport layer that decodes requests, delegates to the subscription-addon Service and subscription Workflow Service, and maps domain objects to api.SubscriptionAddon. + +## Patterns + +**httptransport.HandlerWithArgs triple** — Each endpoint defines Params/Request/Response/Handler type aliases and a method returning httptransport.NewHandlerWithArgs(decode, handle, encode, opts...). Decode resolves namespace and decodes body; encode uses commonhttp.JSONResponseEncoderWithStatus. (`CreateSubscriptionAddonHandler = httptransport.HandlerWithArgs[CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, CreateSubscriptionAddonParams]`) +**Namespace resolution via resolveNamespace** — Every decode step calls h.resolveNamespace(ctx) (wraps NamespaceDecoder.GetNamespace) and builds models.NamespacedID from path params; missing namespace returns a 500 HTTPError. (`ns, err := h.resolveNamespace(ctx); SubscriptionID: models.NamespacedID{Namespace: ns, ID: params.SubscriptionID}`) +**Workflow service for mutations, addon service for reads** — Create/Update route through h.SubscriptionWorkflowService (AddAddon / ChangeAddonQuantity); Get/List read via h.SubscriptionAddonService and fetch the SubscriptionView via h.SubscriptionService.GetView for response mapping. (`view, add, err = h.SubscriptionWorkflowService.AddAddon(ctx, req.SubscriptionID, req.AddonInput)`) +**Create-or-change upsert convenience** — CreateSubscriptionAddon lists existing addons; if the AddonID already exists it calls ChangeAddonQuantity instead of AddAddon, so POST is idempotent-by-addon. (`if sAdd, ok := lo.Find(subsAdds.Items, ...); ok { ChangeAddonQuantity(...) } else { AddAddon(...) }`) +**Response mapping requires both view and addon** — MapSubscriptionAddonToResponse(view, addon) computes the union period of instances, current quantity at clock.Now(), affected item IDs via addondiff.GetAffectedItemIDs, and maps rate cards via productcataloghttp.FromRateCard. (`return MapSubscriptionAddonToResponse(view, add)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Handler interface, HandlerConfig (SubscriptionAddonService, SubscriptionWorkflowService, SubscriptionService, NamespaceDecoder, Logger), NewHandler, resolveNamespace | New endpoints must be added to the Handler interface and wired in router | +| `create.go` | createSubscriptionAddon — decodes SubscriptionAddonCreate, upserts via workflow service | Returns 200 (not 201); contains the find-existing-then-ChangeQuantity branch | +| `update.go` | updateSubscriptionAddon — ChangeAddonQuantity; requires Timing and Quantity in body | Explicitly errors if body.Timing or body.Quantity is nil before mapping | +| `get.go / list.go` | Read paths; both fetch SubscriptionView via SubscriptionService.GetView to enrich the response | List uses slicesx.MapWithErr; both depend on the view being available for affected-item mapping | +| `mapping.go` | MapCreateSubscriptionAddonRequestToInput and MapSubscriptionAddonToResponse | Errors with 'no instances found' if addon has zero instances; timing mapped via subscriptionhttp.MapAPITimingToTiming; depends on addondiff.GetAffectedItemIDs | + +## Anti-Patterns + +- Putting business validation or persistence in handlers — delegate to Service/WorkflowService +- Building NamespacedID without resolveNamespace (drops tenant scoping) +- Mapping a response without the SubscriptionView (affected item IDs and union period need it) +- Adding an endpoint method without registering it on the Handler interface + +## Decisions + +- **POST create doubles as quantity-change when addon already present** — Convenience so clients need not check existence first; keeps a single 'add this addon' verb +- **Mutations go through the workflow service, not the addon service directly** — AddAddon/ChangeAddonQuantity must also sync the subscription view/spec, which is the workflow layer's responsibility + + diff --git a/openmeter/subscription/addon/repo/CLAUDE.md b/openmeter/subscription/addon/repo/CLAUDE.md new file mode 100644 index 0000000000..d95b8f5667 --- /dev/null +++ b/openmeter/subscription/addon/repo/CLAUDE.md @@ -0,0 +1,38 @@ +# repo + + + +> Ent-backed persistence (package subscriptionaddonrepo) for subscription addons and their quantity timeline. Implements subscriptionaddon.SubscriptionAddonRepository and SubscriptionAddonQuantityRepository, mapping db rows to domain types; constraint: every method is transaction-aware via entutils.TransactingRepo. + +## Patterns + +**TransactingRepo wrapping** — Every repo method body is wrapped in entutils.TransactingRepo(ctx, r, func(ctx, repo) {...}) so it rebinds to any tx already in ctx; Tx/Self/WithTx are implemented in transaction.go. (`return entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionAddonRepo) (...) { ... })`) +**Interface assertion + constructor** — Each repo asserts the domain interface (var _ subscriptionaddon.SubscriptionAddonRepository = (*subscriptionAddonRepo)(nil)) and exposes a NewX(db *db.Client) constructor returning the unexported struct. (`var _ subscriptionaddon.SubscriptionAddonRepository = (*subscriptionAddonRepo)(nil)`) +**Eager-load via querySubscriptionAddon** — Reads always go through querySubscriptionAddon which WithAddon(WithRatecards(WithFeatures, WithTaxCode)) and WithQuantities ordered by ActiveFrom then CreatedAt; mapping assumes these edges are loaded. (`query.WithAddon(func(aq){ aq.WithRatecards(...) }).WithQuantities(...)`) +**Db-to-domain mapping in mapping.go** — MapSubscriptionAddon builds the domain SubscriptionAddon from edges; quantities become a timeutil.NewTimeline of Timed values; rate cards reuse addonrepo.FromAddonRow / FromAddonRateCardRow from productcatalog. (`base.Quantities = timeutil.NewTimeline(lo.Map(quantities, func(q, _){ return q.AsTimed() }))`) +**Quantity changes are append-only** — subscriptionAddonQuantityRepo.Create inserts a new SubscriptionAddonQuantity row (ActiveFrom, Quantity); history is never mutated in place — the timeline is rebuilt on read. (`repo.db.SubscriptionAddonQuantity.Create().SetActiveFrom(...).SetQuantity(...).Save(ctx)`) +**Optional pagination** — List returns all items as a single page when filter.Page.IsZero(), otherwise query.Paginate(ctx, filter.Page) + entutils.MapPagedWithErr; ordering selected by filter.OrderBy (ID/UpdatedAt/CreatedAt default). (`if filter.Page.IsZero() { ... pagination.NewPage(1, len(items)) } else { query.Paginate(ctx, filter.Page) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `subscriptionaddon.go` | subscriptionAddonRepo: Create/Get/List plus the shared querySubscriptionAddon eager-load helper | Get returns models.NewGenericNotFoundError on db.IsNotFound; List branches on Page.IsZero; mapping relies on edges loaded by querySubscriptionAddon | +| `subscriptionaddonquantity.go` | subscriptionAddonQuantityRepo: append-only Create of a quantity segment | No update/delete — changing quantity means inserting a new row keyed by ActiveFrom | +| `mapping.go` | MapSubscriptionAddon(s), MapSubscriptionAddonRateCard(s), MapSubscriptionAddonQuantity(ies) | Reads entity.Edges.Addon.Edges.Ratecards (panics if Addon edge nil); reuses productcatalog addonrepo.FromAddonRow/FromAddonRateCardRow | +| `transaction.go` | Tx/Self/WithTx for both repos via db.HijackTx + entutils.NewTxDriver | Required boilerplate for TransactingRepo to work; WithTx rebuilds the client from raw tx config | + +## Anti-Patterns + +- Bypassing querySubscriptionAddon on reads (mapping assumes Addon/Ratecards/Quantities edges are loaded) +- Updating or deleting quantity rows instead of inserting a new ActiveFrom segment +- Writing a repo method without entutils.TransactingRepo wrapping +- Returning raw db.IsNotFound instead of models.NewGenericNotFoundError +- Hand-mapping rate cards instead of delegating to addonrepo.FromAddonRow/FromAddonRateCardRow + +## Decisions + +- **Quantity is an append-only timeline of (ActiveFrom, Quantity) rows** — Addon quantity changes over time; the domain reconstructs a timeutil.Timeline so historical quantities remain queryable +- **Reuse productcatalog addon adapter for rate-card mapping** — SubscriptionAddon rate cards are addon rate cards; sharing FromAddonRow avoids divergent mapping logic + + diff --git a/openmeter/subscription/addon/service/CLAUDE.md b/openmeter/subscription/addon/service/CLAUDE.md new file mode 100644 index 0000000000..97ab446b12 --- /dev/null +++ b/openmeter/subscription/addon/service/CLAUDE.md @@ -0,0 +1,60 @@ +# service + + + +> Service layer (package service) implementing subscriptionaddon.Service: Create, Get, List, ChangeQuantity for subscription addons. It validates compatibility (plan linkage, phase availability, instance type, max quantity) before persisting through the repos and publishing watermill events. + +## Patterns + +**Config struct with Validate + NewService** — Dependencies (SubAddRepo, SubAddQtyRepo, Publisher, TxManager, AddonService, PlanAddonService, SubService, Logger) are passed via a Config whose Validate() checks each non-nil; NewService(cfg) returns subscriptionaddon.Service and errors on invalid config. (`func NewService(cfg Config) (subscriptionaddon.Service, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }`) +**Validate-then-check-compatibility-then-transact** — Create/ChangeQuantity first input.Validate() (wrapped in models.NewGenericValidationError), then fetch addon + subscription view, run compatibility checks, and only then transaction.Run(ctx, TxManager, ...) to write + publish. (`return transaction.Run(ctx, s.cfg.TxManager, func(ctx context.Context) (...) { ... })`) +**GenericValidationError for business rules** — Domain violations (single-instance qty != 1, addon not linked to plan, phase too early, max quantity exceeded, custom subscription) return models.NewGenericValidationError with a formatted message; tests assert via ErrorAs(&GenericValidationError{}). (`return nil, models.NewGenericValidationError(fmt.Errorf("addon %s@%d can be added a maximum of %d times", add.Key, add.Version, *compatibility.MaxQuantity))`) +**Phase-availability scan against PlanAddon compatibility** — Both Create and ChangeQuantity look up planaddon.GetPlanAddon, then iterate sView.Phases stopping at compatibility.FromPlanPhase; if the addon's start phase is reached first it errors that the addon can only start from FromPlanPhase. (`for _, phase := range sView.Phases { if phase.SubscriptionPhase.Key == compatibility.FromPlanPhase { break }; if phase...Key == phaseAtAddonStart.PhaseKey { return ...validation error } }`) +**Publish customer-scoped events in-transaction** — After persisting, the service re-fetches the addon and publishes subscriptionaddon.NewCreatedEvent / NewChangeQuantityEvent with sView.Customer via the eventbus Publisher inside the same transaction. (`err = s.cfg.Publisher.Publish(ctx, subscriptionaddon.NewCreatedEvent(ctx, sView.Customer, *subscriptionAddon))`) +**Create initial quantity alongside addon** — Create writes the SubscriptionAddon row then the initial CreateSubscriptionAddonQuantityRepositoryInput, then re-Get to return a fully-loaded aggregate; ChangeQuantity reuses CreateSubscriptionAddonQuantityRepositoryInput(input). (`s.cfg.SubAddQtyRepo.Create(ctx, *subAdd, subscriptionaddon.CreateSubscriptionAddonQuantityRepositoryInput{ActiveFrom: input.InitialQuantity.ActiveFrom, Quantity: input.InitialQuantity.Quantity})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Config/Validate/NewService and Create/Get/List/ChangeQuantity implementations | Compatibility-check logic is duplicated between Create and ChangeQuantity; both re-Get after write and publish in-tx; Create blocks PlanRef==nil (custom subscriptions) | +| `create_test.go` | Service-backed Create tests (invalid input, missing addon/subscription, single-instance qty, plan linkage, phase, max quantity) | Uses subscriptiontestutils withDeps + createPlanWithAddon; asserts exact error strings like 'addon %s@%d is not linked to the plan' | +| `change_test.go` | ChangeQuantity tests incl. max-quantity-after-purchase and single-instance guard | createExampleSubscriptionAddon helper builds plan+addon+subscription+subAddon; ChangeQuantity appends a quantity segment | +| `list_test.go` | Get/List tests including pagination and name/description inheritance from addon | List returns all when Page is zero; SubscriptionAddonsEqual used for comparison | + +## Anti-Patterns + +- Persisting before running input.Validate() and plan/phase/quantity compatibility checks +- Returning plain errors for business-rule violations instead of models.NewGenericValidationError +- Writing without transaction.Run, or publishing events outside the transaction +- Allowing addon purchase on a subscription with nil PlanRef (custom subscription) +- Skipping the re-Get before returning/publishing (event and return value must carry the full aggregate) + +## Decisions + +- **Quantity changes are modeled as new quantity segments, not in-place edits** — Mirrors the append-only repo timeline so an addon's quantity history is preserved; ChangeQuantity simply Creates another segment +- **Compatibility (plan linkage, FromPlanPhase, MaxQuantity, instance type) is enforced in the service, not the repo** — These rules depend on PlanAddon and SubscriptionView state the repo doesn't see; service is the only place with all dependencies +- **Events published inside the same transaction as the write** — Ensures created/change-quantity events are not emitted for rolled-back changes + +## Example: Validate, check compatibility, then persist + publish in a transaction + +``` +func (s *service) Create(ctx context.Context, ns string, input subscriptionaddon.CreateSubscriptionAddonInput) (*subscriptionaddon.SubscriptionAddon, error) { + if err := input.Validate(); err != nil { + return nil, models.NewGenericValidationError(fmt.Errorf("invalid input: %w", err)) + } + // ... fetch addon, sView, plan-addon compatibility, phase + max-quantity checks ... + return transaction.Run(ctx, s.cfg.TxManager, func(ctx context.Context) (*subscriptionaddon.SubscriptionAddon, error) { + subAdd, err := s.cfg.SubAddRepo.Create(ctx, ns, subscriptionaddon.CreateSubscriptionAddonRepositoryInput{ + MetadataModel: input.MetadataModel, AddonID: input.AddonID, SubscriptionID: input.SubscriptionID, + }) + if err != nil { return nil, err } + if _, err = s.cfg.SubAddQtyRepo.Create(ctx, *subAdd, subscriptionaddon.CreateSubscriptionAddonQuantityRepositoryInput{ + ActiveFrom: input.InitialQuantity.ActiveFrom, Quantity: input.InitialQuantity.Quantity, + }); err != nil { return nil, err } + subscriptionAddon, err := s.cfg.SubAddRepo.Get(ctx, subscriptionaddon.GetSubscriptionAddonInput{NamespacedID: *subAdd}) + if err != nil { return nil, err } +// ... +``` + + diff --git a/openmeter/subscription/entitlement/CLAUDE.md b/openmeter/subscription/entitlement/CLAUDE.md new file mode 100644 index 0000000000..6f5f61207a --- /dev/null +++ b/openmeter/subscription/entitlement/CLAUDE.md @@ -0,0 +1,33 @@ +# entitlement + + + +> Bridges subscription items to the entitlement domain. Implements subscription.EntitlementAdapter so the subscription service can schedule, fetch, and delete entitlements tied to subscription items without depending on entitlement internals. + +## Patterns + +**Implements subscription.EntitlementAdapter** — EntitlementSubscriptionAdapter satisfies the subscription.EntitlementAdapter interface; the compile-time assertion guards it. (`var _ subscription.EntitlementAdapter = &EntitlementSubscriptionAdapter{}`) +**Constructor-injected dependencies** — NewSubscriptionEntitlementAdapter takes entitlement.Service, subscription.SubscriptionItemRepository, and transaction.Creator. No slog.Default or hidden globals. (`NewSubscriptionEntitlementAdapter(entitlementConnector, itemRepo, txCreator)`) +**Wrap mutations in transaction.Run** — ScheduleEntitlement runs inside transaction.Run(ctx, a.txCreator, ...) so entitlement creation participates in the surrounding subscription transaction. (`return transaction.Run(ctx, a.txCreator, func(ctx context.Context) (*subscription.SubscriptionEntitlement, error) { ... })`) +**Stamp SubscriptionManaged + merged annotations** — On schedule, set CreateEntitlementInputs.SubscriptionManaged = true and copy the passed annotations (e.g. AnnotationSubscriptionID) into CreateEntitlementInputs.Annotations. (`input.CreateEntitlementInputs.SubscriptionManaged = true`) +**Derive cadence from entitlement ActiveFrom/ActiveTo** — Build SubscriptionEntitlement.Cadence from the entitlement's ActiveFrom/ActiveTo; error if ActiveFrom is nil (entitlement lacks cadence). (`Cadence: models.CadencedModel{ActiveFrom: *ent.ActiveFrom, ActiveTo: ent.ActiveTo}`) +**Typed NotFoundError** — DeleteByItemID returns *NotFoundError{ItemID} when the item has no EntitlementID; errors carry item/namespace/at context. (`return &NotFoundError{ItemID: id}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | EntitlementSubscriptionAdapter implementing ScheduleEntitlement, GetForSubscriptionsAt, DeleteByItemID | GetForSubscriptionsAt filters items to those with non-nil EntitlementID and fetches via ListEntitlementsWithCustomer with a zero-value Page so all entitlements are returned; do not introduce pagination here. DeleteByItemID deletes the entitlement at clock.Now(). | +| `errors.go` | NotFoundError type for missing subscription entitlements | Error() conditionally appends item/namespace/at; keep the struct fields optional-safe (zero values produce a shorter message). | + +## Anti-Patterns + +- Calling entitlementConnector.ScheduleEntitlement outside transaction.Run, breaking transactional consistency with the item create. +- Forgetting to set SubscriptionManaged = true or to merge subscription annotations into CreateEntitlementInputs.Annotations. +- Returning a SubscriptionEntitlement when entitlement.ActiveFrom is nil instead of erroring (the cadence would be invalid). + +## Decisions + +- **Subscription depends on an EntitlementAdapter interface rather than entitlement.Service directly** — Keeps the subscription domain decoupled from entitlement internals and lets the adapter own the SubscriptionManaged/annotation stamping and cadence translation. + + diff --git a/openmeter/subscription/hooks/CLAUDE.md b/openmeter/subscription/hooks/CLAUDE.md new file mode 100644 index 0000000000..28cb93d9d8 --- /dev/null +++ b/openmeter/subscription/hooks/CLAUDE.md @@ -0,0 +1,22 @@ +# hooks + + + +> Structural folder for subscription command hooks — cross-cutting side effects that run around subscription mutations. Currently holds only annotations/, the hook that repairs the previous/superseding subscription cross-link annotations on delete. + +## Patterns + +**SubscriptionCommandHook via embedding** — Hooks embed subscription.NoOpSubscriptionCommandHook and override only the lifecycle method they need (e.g. BeforeDelete), keeping the full interface satisfied. (`type hook struct { subscription.NoOpSubscriptionCommandHook; ... }`) +**Constructor dependency validation** — Each hook's constructor checks non-nil deps and an injected *slog.Logger and returns an error rather than using slog.Default(). (`if logger == nil { return nil, errors.New("logger is required") }`) + +## Anti-Patterns + +- Implementing a hook without embedding NoOpSubscriptionCommandHook, breaking the subscription.SubscriptionCommandHook contract. +- Putting uniqueness/overlap validation here — that belongs in validators/, hooks are for side effects and link repair. +- Falling back to slog.Default() instead of requiring an injected logger. + +## Decisions + +- **Annotation-link cleanup runs as a BeforeDelete hook rather than inline in the service.** — Keeps the doubly-linked-list repair out of the core mutation path and reusable across delete callers. + + diff --git a/openmeter/subscription/hooks/annotations/CLAUDE.md b/openmeter/subscription/hooks/annotations/CLAUDE.md new file mode 100644 index 0000000000..4fc2084458 --- /dev/null +++ b/openmeter/subscription/hooks/annotations/CLAUDE.md @@ -0,0 +1,56 @@ +# annotations + + + +> Single-file (hook.go, package annotationhook) command hook that keeps the previous/superseding subscription cross-link annotations consistent when a subscription is deleted. It runs on BeforeDelete to repair the doubly-linked list of subscriptions so neither neighbor points at a soon-to-be-deleted subscription. + +## Patterns + +**Embed NoOpSubscriptionCommandHook** — The hook struct embeds subscription.NoOpSubscriptionCommandHook so it only overrides the lifecycle methods it cares about (BeforeDelete) and inherits no-op implementations for the rest. (`type AnnotationCleanupHook struct { subscription.NoOpSubscriptionCommandHook; subscriptionQueryService subscription.QueryService; subscriptionRepo subscription.SubscriptionRepository; logger *slog.Logger }`) +**Constructor validates non-nil deps and returns error** — NewAnnotationCleanupHook returns (*AnnotationCleanupHook, error), nil-checking subscriptionQueryService, subscriptionRepository, and logger before constructing. Logger is injected explicitly, never slog.Default(). (`if subscriptionQueryService == nil { return nil, fmt.Errorf("subscription query service is required") }`) +**Read links via subscription.AnnotationParser** — Never index the annotation map directly. Read superseding/previous IDs with AnnotationParser.GetSupersedingSubscriptionID / GetPreviousSubscriptionID and write with SetPreviousSubscriptionID / SetSupersedingSubscriptionID / ClearSupersedingSubscriptionID. (`supersedingID := subscription.AnnotationParser.GetSupersedingSubscriptionID(view.Subscription.Annotations)`) +**Clone annotations before mutating** — Annotations from a fetched view are cloned with maps.Clone before mutation (or initialized to models.Annotations{}), so the in-memory view is never mutated in place. (`if supersedingAnnotations != nil { supersedingAnnotations = maps.Clone(supersedingAnnotations) } else { supersedingAnnotations = models.Annotations{} }`) +**Tolerate missing neighbor subscriptions** — GetView failures are inspected with subscription.IsSubscriptionNotFoundError; a missing neighbor is logged and skipped (return nil) rather than failing the delete. Other errors are wrapped and propagated. (`if subscription.IsSubscriptionNotFoundError(err) { h.logger.Error("superseding subscription not found, continuing without cleanup", ...); return nil }`) +**Persist via SubscriptionRepository.UpdateAnnotations** — Annotation writes go through subscriptionRepo.UpdateAnnotations(ctx, NamespacedID, annotations); when the resulting map is empty it is collapsed to nil before persisting. (`if len(supersedingAnnotations) == 0 { supersedingAnnotations = nil }; _, err = h.subscriptionRepo.UpdateAnnotations(ctx, supersedingView.Subscription.NamespacedID, supersedingAnnotations)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `hook.go` | Defines AnnotationCleanupHook + NewAnnotationCleanupHook and the BeforeDelete handler delegating to updateSupersedingSubscriptionAnnotations and updatePreviousSubscriptionAnnotations. | The two update methods are near-mirror images (superseding vs previous direction). When editing one, keep the other symmetric. Note the asymmetry: superseding-side clears the previous key via raw delete(annotations, subscription.AnnotationPreviousSubscriptionID), while previous-side clears via AnnotationParser.ClearSupersedingSubscriptionID — don't accidentally unify them incorrectly. BeforeDelete fails the whole delete if either update returns a non-not-found error. | + +## Anti-Patterns + +- Mutating view.Subscription.Annotations in place instead of cloning — corrupts the caller's in-memory view. +- Indexing or writing the annotation map with raw string keys instead of going through subscription.AnnotationParser (except the existing delete of AnnotationPreviousSubscriptionID). +- Failing the delete when a neighbor subscription is not found — must detect IsSubscriptionNotFoundError, log, and continue. +- Falling back to slog.Default() instead of requiring an injected *slog.Logger in the constructor. +- Persisting an empty (zero-length) annotation map instead of collapsing it to nil before UpdateAnnotations. + +## Decisions + +- **Cleanup runs in BeforeDelete and relinks the surviving neighbors to each other.** — Subscriptions form a doubly-linked previous/superseding chain via annotations; deleting a middle node would leave dangling references, so the hook stitches previous<->superseding together (or clears the dangling side) to keep the chain valid. +- **Hook embeds NoOpSubscriptionCommandHook and depends only on QueryService + SubscriptionRepository.** — Keeps the hook narrowly scoped to annotation repair and avoids pulling in the full mutation service, preventing import cycles and side effects beyond annotation updates. + +## Example: Repairing the superseding neighbor's previous-link when a subscription is deleted + +``` +func (h *AnnotationCleanupHook) updateSupersedingSubscriptionAnnotations(ctx context.Context, view subscription.SubscriptionView) error { + supersedingID := subscription.AnnotationParser.GetSupersedingSubscriptionID(view.Subscription.Annotations) + previousID := subscription.AnnotationParser.GetPreviousSubscriptionID(view.Subscription.Annotations) + if supersedingID == nil { + return nil + } + supersedingView, err := h.subscriptionQueryService.GetView(ctx, models.NamespacedID{ID: lo.FromPtr(supersedingID), Namespace: view.Subscription.Namespace}) + if err != nil { + if subscription.IsSubscriptionNotFoundError(err) { + h.logger.Error("superseding subscription not found, continuing without cleanup", "error", err) + return nil + } + return fmt.Errorf("failed to get superseding subscription: %w", err) + } + ann := maps.Clone(supersedingView.Subscription.Annotations) +// ... +``` + + diff --git a/openmeter/subscription/patch/CLAUDE.md b/openmeter/subscription/patch/CLAUDE.md new file mode 100644 index 0000000000..627946556f --- /dev/null +++ b/openmeter/subscription/patch/CLAUDE.md @@ -0,0 +1,59 @@ +# patch + + + +> Concrete declarative patches that transform a SubscriptionSpec in-memory (add/remove items and phases, stretch phase, unschedule edit). Each patch enforces timing-safety invariants (cannot edit the past) before mutating the spec. + +## Patterns + +**Patch implements the subscription patch interface** — Each patch type asserts conformance to subscription.Patch or subscription.ValuePatch[T] and implements Op(), Path(), Validate(), ValueAsAny(), ApplyTo(). (`var _ subscription.ValuePatch[subscription.SubscriptionItemSpec] = PatchAddItem{}`) +**Validate before apply** — Validate() chains Path().Validate(), Op().Validate(), then the value's Validate(); wrap nested value errors with the FieldDescriptor prefix. (`return models.ErrorWithFieldPrefix(a.FieldDescriptor(), err)`) +**Mutate via spec.Phases / ItemsByKey, never the DB** — ApplyTo operates only on the in-memory *subscription.SubscriptionSpec (Phases map, ItemsByKey slices). No repo or DB calls in this package. (`phase.ItemsByKey[a.ItemKey] = append(phase.ItemsByKey[a.ItemKey], &a.CreateInput)`) +**Enforce past-immutability against ApplyContext.CurrentTime** — Use spec.GetCurrentPhaseAt(actx.CurrentTime) and phase StartAfter.AddTo(spec.ActiveFrom) to forbid edits to past phases; return typed PatchForbiddenError / PatchValidationError / PatchConflictError. (`return &subscription.PatchForbiddenError{Msg: fmt.Sprintf("cannot add item to phase %s which starts before current phase", a.PhaseKey)}`) +**Close-then-add for current-phase items** — Adding an item to the current phase closes the prior version by setting its ActiveToOverrideRelativeToPhaseStart to the new item's ActiveFrom override (history is never falsified). (`itemToClose.ActiveToOverrideRelativeToPhaseStart = a.CreateInput.ActiveFromOverrideRelativeToPhaseStart`) +**Express times as ISODuration relative to phase start** — Item timing is stored as ActiveFrom/ActiveToOverrideRelativeToPhaseStart using datetime.ISODurationBetween / AddTo, not absolute times. (`diff := datetime.ISODurationBetween(phaseStartTime, actx.CurrentTime)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `additem.go` | PatchAddItem: appends an item version under a phase key with past/future-phase guards | Branch logic distinguishes no-current-phase, current-phase (sets ActiveFrom to now if unset), future-phase (key must be empty). When closing a current item it errors if the existing item's scheduled end is after the new start (user must delete first). | +| `addphase.go` | PatchAddPhase: inserts a future phase and re-spaces later phases by a signed diff | Only future phases allowed (vST.After(CurrentTime)); recomputes StartAfter of all later phases via Duration.Subtract to preserve relative spacing. PatchConflictError if phase key already exists. | +| `removeitem.go` | PatchRemoveItem: removes last version for a key, or closes it if in current phase | Current-phase removal sets ActiveToOverrideRelativeToPhaseStart to now (soft-close); future-phase removal pops the slice and deletes the key when empty. Cannot remove from past phases. | +| `stretchphase.go / unscheduleedit.go / removephase.go` | Additional spec transforms (extend a phase, revert scheduled edits, drop a phase) | Follow the same Validate/ApplyTo + typed-error contract as the other patches. | +| `patch_test.go` | Shared test harness: testcase[T]/testsuite[T], getDefaultSpec, SpecsEqual | Tests call Patch.ApplyTo directly and compare via subscriptiontestutils.SpecsEqual; getDefaultSpec builds a 3-phase spec from GetExamplePlanInput. errors.As is used for typed-error assertions. | + +## Anti-Patterns + +- Calling a repository or DB from a patch's ApplyTo — patches are pure spec transforms. +- Returning a bare error instead of PatchValidationError/PatchForbiddenError/PatchConflictError, which downstream maps to API status codes. +- Allowing edits to phases/items that start before ApplyContext.CurrentTime (rewriting history). +- Using absolute timestamps for item activity instead of ISODuration overrides relative to phase start. + +## Decisions + +- **Item edits in the current phase close the previous version rather than mutate it** — Subscription history must remain immutable for billing correctness; closing then re-adding preserves the audit trail of rate-card versions. +- **Adding a phase re-spaces later phases by a signed diff** — Keeps the relative spacing of subsequent phases intact when a new phase is inserted, so existing schedules are not silently shifted. + +## Example: Define a spec patch with Validate + ApplyTo + +``` +type PatchAddItem struct { + PhaseKey string + ItemKey string + CreateInput subscription.SubscriptionItemSpec +} + +var _ subscription.ValuePatch[subscription.SubscriptionItemSpec] = PatchAddItem{} + +func (a PatchAddItem) ApplyTo(spec *subscription.SubscriptionSpec, actx subscription.ApplyContext) error { + phase, ok := spec.Phases[a.PhaseKey] + if !ok { + return &subscription.PatchValidationError{Msg: fmt.Sprintf("phase %s not found", a.PhaseKey)} + } + // ... timing guards against actx.CurrentTime ... + phase.ItemsByKey[a.ItemKey] = append(phase.ItemsByKey[a.ItemKey], &a.CreateInput) +// ... +``` + + diff --git a/openmeter/subscription/repo/CLAUDE.md b/openmeter/subscription/repo/CLAUDE.md new file mode 100644 index 0000000000..3eba9314e5 --- /dev/null +++ b/openmeter/subscription/repo/CLAUDE.md @@ -0,0 +1,59 @@ +# repo + + + +> Ent-backed persistence for subscriptions, phases, and items. Implements the three subscription repository interfaces and owns DB<->domain mapping. Constraint: every method is transaction-aware via entutils.TransactingRepo. + +## Patterns + +**Repo implements subscription repository interface** — Each repo holds *db.Client and asserts the matching interface (SubscriptionRepository / SubscriptionPhaseRepository / SubscriptionItemRepository). (`var _ subscription.SubscriptionRepository = (*subscriptionRepo)(nil)`) +**Wrap every method in entutils.TransactingRepo** — All read/write methods run inside entutils.TransactingRepo(ctx, r, func(ctx, repo) ...) so they rebind to the ctx transaction; use TransactingRepoWithNoValue for void ops. (`return entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionRepo) (subscription.Subscription, error) { ... })`) +**Map DB rows in mapping.go, never inline** — MapDBSubscription, MapDBSubscripitonPhase, MapDBSubscriptionItem are the only DB->domain converters; queries call them. UTC-normalize times via convert.SafeToUTC. (`return MapDBSubscription(res)`) +**Soft-delete with DeletedAt + not-deleted predicates** — Delete sets DeletedAt = clock.Now(); reads filter via SubscriptionNotDeletedAt(at) / DeletedAtGT helpers in utils.go. (`Where(SubscriptionNotDeletedAt(clock.Now())...)`) +**Map ent NotFound to domain not-found errors** — Check db.IsNotFound(err) and return subscription.NewSubscriptionNotFoundError / NewItemNotFoundError / NewPhaseNotFoundError instead of leaking ent errors. (`if db.IsNotFound(err) { return subscription.SubscriptionItem{}, subscription.NewItemNotFoundError(id.ID) }`) +**Tx/Self/WithTx triplet per repo** — transaction.go implements Tx (HijackTx), Self, and WithTx (NewTxClientFromRawConfig) for each repo so entutils can manage transactions. (`func (r *subscriptionRepo) WithTx(ctx context.Context, tx *entutils.TxDriver) *subscriptionRepo { ... }`) +**Filter/order/paginate via pkg helpers** — List uses filter.ApplyToQuery / filter.SelectPredicate, entutils.GetOrdering, sortx, and pagination.MapResultErr; status filters compose dbsubscription predicates. (`return pagination.MapResultErr(paged, MapDBSubscription)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `mapping.go` | DB->domain mappers; reconstructs RateCard (FlatFee vs UsageBased) from item columns | RateCard type is chosen by Price type/cadence; usage-based requires a non-nil billing cadence. FeatureID is left nil (resolved at service level). TaxConfig is backfilled from normalized TaxBehavior/TaxCode columns via BackfillTaxConfig. Item mapping requires the Phase edge to be eagerly loaded (PhaseOrErr). | +| `subscriptionitemrepo.go` | Item CRUD; Create translates RateCard meta into Set* columns | Queries must .WithPhase().WithTaxCode() or MapDBSubscriptionItem fails. EntitlementTemplate/TaxConfig/Price use non-Nillable setters guarded by nil checks (the value scanners panic on nil). | +| `subscriptionphaserepo.go` | Phase CRUD and at-time fetch filters | getPhaseForSubscriptionAtFilter scopes by SubscriptionID+Namespace and DeletedAt; GetForSubscriptionsAt errors on empty input filter. | +| `subscriptionrepo.go` | Subscription CRUD, SetEndOfCadence, UpdateAnnotations, List with status/filter logic | Create eagerly attaches the Plan edge after save so MapDBSubscription can read PlanRef. List computes Active/Canceled/Inactive/Scheduled status as predicate groups over now. | +| `utils.go` | Reusable subscription predicate builders (active at/after/in-period, not-deleted) | SubscriptionActiveAt uses ActiveFromLTE + (ActiveToIsNil OR ActiveToGT); reuse these instead of hand-rolling time predicates. | +| `transaction.go` | Tx/Self/WithTx for all three repos | Each new repo must add its triplet here or TransactingRepo cannot rebind to the active transaction. | + +## Anti-Patterns + +- Querying items/phases without .WithPhase()/.WithTaxCode(), causing MapDB* to error on missing edges. +- Returning raw ent errors instead of mapping db.IsNotFound to subscription.New*NotFoundError. +- Hard-deleting rows instead of soft-deleting via SetDeletedAt(clock.Now()). +- Writing a repo method that bypasses entutils.TransactingRepo and uses r.db directly outside the active transaction. +- Duplicating mapping logic in query methods instead of calling the MapDB* functions. + +## Decisions + +- **RateCard kind is inferred from persisted columns rather than a stored discriminator** — Flat-fee vs usage-based is derivable from Price type and presence of a billing cadence, avoiding a separate column and keeping the schema lean. +- **Phase/Item Create accept *EntityInput types, not domain specs** — Specs are mapped to flat entity inputs by the service layer; the repo only persists fully-resolved entity inputs, keeping spec semantics out of the DB layer. + +## Example: Transaction-aware repo read with not-found mapping + +``` +func (r *subscriptionRepo) GetByID(ctx context.Context, subscriptionID models.NamespacedID) (subscription.Subscription, error) { + return entutils.TransactingRepo(ctx, r, func(ctx context.Context, repo *subscriptionRepo) (subscription.Subscription, error) { + res, err := repo.db.Subscription.Query().WithPlan(). + Where(dbsubscription.ID(subscriptionID.ID), dbsubscription.Namespace(subscriptionID.Namespace)). + Where(SubscriptionNotDeletedAt(clock.Now())...).First(ctx) + if db.IsNotFound(err) { + return subscription.Subscription{}, subscription.NewSubscriptionNotFoundError(subscriptionID.ID) + } else if err != nil { + return subscription.Subscription{}, err + } + return MapDBSubscription(res) + }) +} +``` + + diff --git a/openmeter/subscription/service/CLAUDE.md b/openmeter/subscription/service/CLAUDE.md new file mode 100644 index 0000000000..2192fbb18f --- /dev/null +++ b/openmeter/subscription/service/CLAUDE.md @@ -0,0 +1,60 @@ +# service + + + +> Orchestration layer for the subscription lifecycle (Create/Update/Cancel/Continue/Delete/Get/List/ExpandViews). Owns the sync diff algorithm that reconciles a stored subscription to a target SubscriptionSpec, plus validation, hooks, eventing, and entitlement linkage. + +## Patterns + +**service implements subscription.Service via ServiceConfig DI** — New(ServiceConfig) wires repos, customer/feature services, EntitlementAdapter, TransactionManager, Publisher, Lockr, FeatureFlags, TaxCode; the unique-constraint validator is registered as a hook in New. (`var _ subscription.Service = &service{}`) +**validate -> transaction.Run -> hooks -> publish** — Mutating methods validate first (state machine + currency), then run inside transaction.Run, fire Before*/After* hooks around the work, and Publish a domain event (NewCreatedEvent, NewUpdatedEvent, etc.). (`err = s.Publisher.Publish(ctx, subscription.NewCreatedEvent(ctx, view))`) +**Lock customer and seed operation context** — Each public method calls subscription.NewSubscriptionOperationContext(ctx); customer-mutating ops call s.lockCustomer (Lockr.LockForTX on GetCustomerLock). (`ctx = subscription.NewSubscriptionOperationContext(ctx); s.lockCustomer(ctx, spec.CustomerId)`) +**Gate transitions with the state machine** — Use subscription.NewStateMachine(view.Subscription.GetStatusAt(now)).CanTransitionOrErr(ctx, action) before Create/Update/Cancel/Continue/Delete. (`subscription.NewStateMachine(subscription.SubscriptionStatusInactive).CanTransitionOrErr(ctx, subscription.SubscriptionActionCreate)`) +**sync = three-phase reconcile with touched map** — sync(view, newSpec) deletes changed/removed, recreates changed, creates new; change detection compares ToCreateSubscription*EntityInput via Equal, and dirty (touched) tracks parent/child invalidation by SpecPath. (`dirty.mark(subscription.NewPhasePath(currentPhaseView.SubscriptionPhase.Key))`) +**Cancel/Continue reuse sync by mutating spec.ActiveTo** — Cancel resolves timing to a cancel time and sets spec.ActiveTo; Continue sets spec.ActiveTo = nil; both then call sync so all cadences re-derive from the subscription cadence. (`spec.ActiveTo = lo.ToPtr(cancelTime); sub, err := s.sync(ctx, view, spec)`) +**Reject immutable-field changes in sync** — sync errors if CustomerId, PlanRef, ActiveFrom, or SettlementMode differ between view and newSpec. (`if !view.Subscription.PlanRef.NilEqual(newSpec.Plan) { return def, fmt.Errorf("cannot change plan") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service facade: Create/Update/Delete/Cancel/Continue/Get/GetView/List/ExpandViews, hook registration, customer locking | Create persists phases via GetSortedPhases + GetPhaseCadence then updates customer currency if unset. GetView delegates to ExpandViews; ExpandViews only supports a single customer id at a time. | +| `sync.go` | Core reconcile algorithm and the touched map (SpecPath parent/child invalidation) | Marked TODO(OM-1074) cleanup. Item change comparison uses a deliberately-faked 'new' entitlement reused from the current item (commented 'This is a lie') because the new entitlement does not exist yet; touching a phase forces impossibleNamespacedId so child items recompute. Order matters: delete pass, recreate-changed pass, create-new pass. | +| `synchelpers.go` | createPhase/createItem (with createItemOptions), deletePhase/deleteItem, resolveTaxCode | createItem schedules the entitlement via EntitlementAdapter (stamping AnnotationSubscriptionID) BEFORE building the item entity input, and resolveTaxCode mutates the spec's RateCard in place — order is load-bearing (see the in-code comment). deleteItem deletes the entitlement first when present. | +| `servicevalidation.go` | validateCreate/Update/Cancel/Continue: state-machine + customer + currency checks | Currency mismatch is only enforced when spec.HasBillables(); returns models.NewGenericValidationError. validateCreate also asserts spec.CustomerId == cust.ID. | +| `service_test.go / sync_test.go` | DB-backed lifecycle tests using subscriptiontestutils.SetupDBDeps + NewService | Tests assert spec/view equivalence via subscriptiontestutils.ValidateSpecAndView and drive edits by mutating spec.Phases then calling Update. Use clock.SetTime/FreezeTime for deterministic timing. | + +## Anti-Patterns + +- Mutating subscription contents directly instead of building a target spec and calling Update/sync. +- Skipping the NewStateMachine transition check before a lifecycle action. +- Publishing an event or firing hooks outside the transaction.Run boundary, risking inconsistent state on rollback. +- Changing CustomerId/Plan/ActiveFrom/SettlementMode through sync (these are explicitly rejected). +- Building the item entity input before scheduling its entitlement / resolving tax code, which breaks the in-place RateCard enrichment. + +## Decisions + +- **Cancel and Continue are implemented on top of sync rather than as bespoke updates** — All phase/item cadences are derived from the subscription cadence, so adjusting spec.ActiveTo and re-syncing yields correct deactivation/reactivation for every sub-resource. +- **sync recreates a phase/item wholesale when any field changes, tracked via a touched SpecPath map** — Sub-resources are hard-linked to their parents; recreating the parent and re-linking children is simpler and safer than in-place field mutation, and parent/child invalidation falls out of the path-based touched map. +- **Validators are registered as hooks (e.g. unique-constraint validator) in New** — Lets cross-cutting invariants run inside the same Before/After hook pipeline as other behavior, keeping the service open for extension without branching its core methods. + +## Example: Lifecycle method: validate, transact, hook, publish + +``` +func (s *service) Update(ctx context.Context, subscriptionID models.NamespacedID, newSpec subscription.SubscriptionSpec) (subscription.Subscription, error) { + ctx = subscription.NewSubscriptionOperationContext(ctx) + view, err := s.GetView(ctx, subscriptionID) + if err != nil { return subscription.Subscription{}, err } + if err := s.validateUpdate(ctx, view, newSpec); err != nil { return subscription.Subscription{}, err } + return transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (subscription.Subscription, error) { + s.mu.RLock(); defer s.mu.RUnlock() + _ = errors.Join(lo.Map(s.Hooks, func(v subscription.SubscriptionCommandHook, _ int) error { return v.BeforeUpdate(ctx, subscriptionID, newSpec) })...) + subs, err := s.sync(ctx, view, newSpec) + if err != nil { return subs, err } + updatedView, _ := s.GetView(ctx, subs.NamespacedID) + return subs, s.Publisher.Publish(ctx, subscription.NewUpdatedEvent(ctx, updatedView)) + }) +} +``` + + diff --git a/openmeter/subscription/testutils/CLAUDE.md b/openmeter/subscription/testutils/CLAUDE.md new file mode 100644 index 0000000000..fa55d1f15b --- /dev/null +++ b/openmeter/subscription/testutils/CLAUDE.md @@ -0,0 +1,62 @@ +# testutils + + + +> Shared test fixtures and harness for the subscription domain. Provides SetupDBDeps (migrated Postgres), NewService (a fully wired SubscriptionDependencies graph), example plans/ratecards/customers/addons, spec/view comparators, and mock service implementations. + +## Patterns + +**Wire real services from underlying constructors** — NewService builds the whole dependency graph from concrete adapters/services (repos, customer, entitlement registry, plan, addon, tax code, workflow) — not from app/common — to avoid test-only import cycles. (`svc, err := service.New(service.ServiceConfig{ SubscriptionRepo: subRepo, ... })`) +**DB harness: SetupDBDeps + DBDeps.Cleanup** — SetupDBDeps initializes a Postgres test DB, runs migrate.OMMigrationsConfig Up under a global mutex, and returns DBDeps{DBClient, EntDriver, PGDriver}; pair with defer dbDeps.Cleanup(t). (`dbDeps := subscriptiontestutils.SetupDBDeps(t); defer dbDeps.Cleanup(t)`) +**Embed-and-extend test wrappers** — Helpers embed the real interface and add t.Helper Create*-style methods (testCustomerRepo, testFeatureConnector, testAddonService, testSubscriptionRepo) that t.Fatalf on error. (`type testCustomerRepo struct { customer.Adapter; subjectService subject.Service }`) +**Exported example fixtures as package vars** — Reusable constants/vars: ExampleNamespace, ExampleFeatureKey(1-3), ExampleRateCard1..5, ExampleAddonRateCard1..6, ExampleCreateCustomerInput, ISOMonth, GetExamplePlanInput. (`plan := deps.PlanHelper.CreatePlan(t, subscriptiontestutils.GetExamplePlanInput(t))`) +**Spec/view comparators** — ValidateSpecAndView asserts a created view matches its source spec (incl. entitlement alignment to billing anchor and tax code backfill); SpecsEqual / SubscriptionAddonsEqual compare specs and addons. (`subscriptiontestutils.ValidateSpecAndView(t, spec, found)`) +**Builders for plans and specs** — BuildTestPlanInput / BuildTestSubscriptionSpec return fluent builders (AddPhase, SetMeta, Build) generating test_phase_N keys; Build validates and syncs annotations. (`BuildTestPlanInput(t).AddPhase(lo.ToPtr(datetime.MustParseDuration(t, "P1M")), ExampleRateCard1.Clone())`) +**Mocks implement the domain interfaces by Fn fields** — MockService and MockWorkflowService satisfy subscription.Service / workflow.Service by delegating to assignable *Fn function fields. (`var _ subscription.Service = &MockService{}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | NewService: builds SubscriptionDependencies (the canonical integration-test fixture) | Uses a mock streaming connector and noop tracer; after meterAdapter.SetDBClient it re-reads the resolved meter ID (shared template DB may reassign it). MultiSubscriptionEnabledFF is false by default. Wires annotation cleanup hook and the workflow service. | +| `db.go` | SetupDBDeps / DBDeps / Cleanup | SetupDBDeps serializes via a package-level sync.Mutex and runs full migrations each call; always defer Cleanup or DB connections leak. | +| `compare.go` | ValidateSpecAndView, SpecsEqual, SubscriptionAddonsEqual and time helpers | ValidateSpecAndView checks entitlement UsagePeriod alignment to the truncated billing anchor and metered MeasureUsageFrom == phase start; tax-code expectations branch on TaxConfig.TaxCodeID vs Stripe.Code backfill. | +| `ratecard.go / addon.go / plan.go / feature.go` | Example RateCards, Addons, plan input, and feature fixtures | GetExamplePlanInput builds a fixed 3-phase plan (P1M, P2M, open-ended). Clone() rate cards before mutating shared vars to avoid cross-test contamination. | +| `customer.go / repository.go / builder.go` | Customer service/adapter helpers, repo wrappers, and plan/spec builders | CreateExampleCustomer creates the subjects first (UsageAttribution.SubjectKeys) then the customer; builders use clock.Now() so freeze the clock for determinism. | +| `mock.go` | MockService / MockWorkflowService with *Fn delegation | Unset *Fn fields panic with a nil-call; set every Fn the code under test will invoke. MarshalJSON/UnmarshalJSON on TestPatch panic by design. | +| `billing.go` | NoopCustomerOverrideService satisfying billing.CustomerOverrideService | Returns zero values; use only when billing behavior is irrelevant to the test. | + +## Anti-Patterns + +- Importing app/common wiring here — build dependencies from underlying constructors to prevent test-only import cycles. +- Mutating a shared Example* RateCard/var without Clone(), leaking state across tests. +- Skipping defer dbDeps.Cleanup(t), leaking Postgres/ent/pg drivers. +- Leaving a MockService *Fn nil for a method the test exercises (panics on nil call). +- Assuming the meter ID stays constant across SetDBClient — read back the resolved ID. + +## Decisions + +- **NewService assembles the real service graph instead of using the app DI layer** — Keeps subscription test helpers independent from app/common so unrelated wiring changes don't create import cycles, while still exercising production code paths. +- **SetupDBDeps runs full migrations per call under a global mutex** — Guarantees a real, schema-correct Postgres for each suite and serializes setup to avoid concurrent migration races against a shared instance. + +## Example: Standard DB-backed subscription test setup + +``` +dbDeps := subscriptiontestutils.SetupDBDeps(t) +defer dbDeps.Cleanup(t) + +deps := subscriptiontestutils.NewService(t, dbDeps) +service := deps.SubscriptionService + +cust := deps.CustomerAdapter.CreateExampleCustomer(t) +_ = deps.FeatureConnector.CreateExampleFeatures(t, deps.ExampleMeterID) +plan := deps.PlanHelper.CreatePlan(t, subscriptiontestutils.GetExamplePlanInput(t)) + +spec, err := subscription.NewSpecFromPlan(plan, subscription.CreateSubscriptionCustomerInput{ + CustomerId: cust.ID, Currency: "USD", ActiveFrom: clock.Now(), BillingAnchor: clock.Now(), Name: "Test", +}) +require.NoError(t, err) +sub, err := service.Create(ctx, subscriptiontestutils.ExampleNamespace, spec) +``` + + diff --git a/openmeter/subscription/validators/CLAUDE.md b/openmeter/subscription/validators/CLAUDE.md new file mode 100644 index 0000000000..1ec0a44f4d --- /dev/null +++ b/openmeter/subscription/validators/CLAUDE.md @@ -0,0 +1,27 @@ +# validators + + + +> Structural folder for subscription-invariant validators injected into other services. customer/ gates customer mutations (subject-key change, delete) on active subscriptions; subscription/ enforces the per-feature vs per-subscription uniqueness/overlap rule as a command hook. + +## Patterns + +**Interface via Noop embedding** — customer validators embed customer.NoopRequestValidator; subscription validators embed subscription.NoOpSubscriptionCommandHook — override only the relevant methods so the contract stays satisfied. (`type validator struct { customer.NoopRequestValidator; ... }`) +**clock.Now() for active-subscription checks** — Active-subscription presence is checked via List with ActiveAt=clock.Now() (never time.Now()) so frozen-time tests stay deterministic. (`svc.List(ctx, customer.ListSubscriptionsInput{ActiveAt: clock.Now()})`) +**Feature-flag-driven uniqueness scope** — validateUniqueConstraint routes to ByFeatures or BySubscriptions based on the MultiSubscriptionEnabled feature flag; callers must never call the branch functions directly. (`if ff.MultiSubscriptionEnabled { ...BySubscriptions } else { ...ByFeatures }`) +**Typed precondition/not-found errors** — State violations return models.NewGeneric*Error (precondition/not-found/conflict) so the HTTP layer maps them to status codes. (`return models.NewGenericPreConditionFailedError(...)`) + +## Anti-Patterns + +- Adding validation methods without embedding the relevant Noop base, breaking the validator/hook interface assertion. +- Using time.Now() instead of clock.Now() for ActiveAt checks. +- Loading candidate subscriptions with a fixed page instead of pagination.CollectAll. +- Forgetting to exclude the current subscription on update/continue, falsely flagging a self-overlap. +- Returning plain errors for deleted/not-found/conflict states instead of models.NewGeneric*Error. + +## Decisions + +- **Subject-key mutation and customer delete are gated on active subscriptions.** — Keeps usage attribution stable for billing while a subscription is live. +- **Uniqueness/overlap is enforced as a SubscriptionCommandHook with separate Before and After passes.** — Lets the invariant guard every mutation path uniformly instead of being duplicated inline in the service. + + diff --git a/openmeter/subscription/validators/customer/CLAUDE.md b/openmeter/subscription/validators/customer/CLAUDE.md new file mode 100644 index 0000000000..93f2712a6b --- /dev/null +++ b/openmeter/subscription/validators/customer/CLAUDE.md @@ -0,0 +1,32 @@ +# customer + + + +> Enforces subscription-aware invariants on customer mutations: a customer's subject keys cannot change while they have an active subscription, and a customer cannot be deleted while active subscriptions exist. Implemented as a customer.RequestValidator that is injected into the customer service. + +## Patterns + +**Implements customer.RequestValidator via NoopRequestValidator embedding** — Validator embeds customer.NoopRequestValidator and overrides only the hooks it cares about; the compile-time assertion `var _ customer.RequestValidator = (*Validator)(nil)` must hold. (`type Validator struct { customer.NoopRequestValidator; subscriptionService subscription.Service; customerService customer.Service }`) +**Constructor validates required dependencies** — NewValidator returns an error (not panic) when subscriptionService or customerService is nil, returning *Validator and error. (`if subscriptionService == nil { return nil, fmt.Errorf("subscription service is required") }`) +**Active-subscription check via List + ActiveAt=clock.Now()** — Existence of an active subscription is determined by subscriptionService.List with CustomerID filter and ActiveAt set to clock.Now(); presence is `len(subscriptions.Items) > 0`. (`v.subscriptionService.List(ctx, subscription.ListSubscriptionsInput{Namespaces: []string{ns}, CustomerID: &filter.FilterULID{FilterString: filter.FilterString{Eq: &id}}, ActiveAt: lo.ToPtr(clock.Now())})`) +**Delegate to input.Validate() first** — Each Validate*Customer method calls input.Validate() before performing cross-aggregate checks. (`if err := input.Validate(); err != nil { return err }`) +**Typed precondition/not-found errors for customer state** — Deleted/missing customer states return models.NewGenericPreConditionFailedError / models.NewGenericNotFoundError rather than bare errors. (`return models.NewGenericPreConditionFailedError(fmt.Errorf("customer is deleted [...]"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `validator.go` | Single-file package `customer` holding the Validator type, NewValidator constructor, ValidateUpdateCustomer and ValidateDeleteCustomer. | ValidateUpdateCustomer only blocks subject-key changes when input.CustomerMutate.UsageAttribution.SubjectKeys is non-nil AND a subscription exists; it compares the old vs new SubjectKeys index-by-index (length then per-element). Do not relax this to a set comparison — order is significant here. | + +## Anti-Patterns + +- Adding new validation methods without embedding NoopRequestValidator (breaks the customer.RequestValidator interface assertion). +- Using time.Now() instead of clock.Now() for ActiveAt — breaks deterministic tests that freeze time. +- Returning plain errors for deleted/not-found customers instead of the models.NewGeneric*Error constructors the HTTP layer maps to status codes. +- Performing the customer GetCustomer lookup unconditionally rather than only when SubjectKeys are being mutated. + +## Decisions + +- **Subject-key mutation is gated on active subscriptions to keep usage attribution stable for billing.** — Changing which subjects feed a customer mid-subscription would silently change metered usage attribution for an active billing relationship. + + diff --git a/openmeter/subscription/validators/subscription/CLAUDE.md b/openmeter/subscription/validators/subscription/CLAUDE.md new file mode 100644 index 0000000000..24965b9a65 --- /dev/null +++ b/openmeter/subscription/validators/subscription/CLAUDE.md @@ -0,0 +1,55 @@ +# subscription + + + +> Implements the subscription uniqueness/overlap invariant as a subscription.SubscriptionCommandHook: before and after every create/update/cancel/continue/delete it recomputes the customer's overlapping subscription set and rejects mutations that would violate uniqueness (either per-feature or per-subscription depending on the multi-subscription feature flag). + +## Patterns + +**SubscriptionCommandHook via NoOpSubscriptionCommandHook embedding** — SubscriptionUniqueConstraintValidator embeds subscription.NoOpSubscriptionCommandHook and overrides Before*/After* hooks; NewSubscriptionUniqueConstraintValidator returns subscription.SubscriptionCommandHook. (`type SubscriptionUniqueConstraintValidator struct { subscription.NoOpSubscriptionCommandHook; Config SubscriptionUniqueConstraintValidatorConfig }`) +**Config struct with Validate() and constructor guard** — Dependencies (FeatureFlags ffx.Service, QueryService subscription.QueryService, CustomerService customer.Service) live in a Config struct with a Validate() method; the constructor returns an error if Config.Validate() fails. (`if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid subscription unique constraint validator config: %w", err) }`) +**Feature-flag-driven uniqueness mode** — validateUniqueConstraint checks subscription.MultiSubscriptionEnabledFF; if enabled it calls subscription.ValidateUniqueConstraintByFeatures, otherwise ValidateUniqueConstraintBySubscriptions. BeforeUpdate is skipped entirely when multi-subscription is disabled. (`if multiSubscriptionEnabled { return specs, subscription.ValidateUniqueConstraintByFeatures(specs) } return specs, subscription.ValidateUniqueConstraintBySubscriptions(specs)`) +**Sub -> View -> Spec pipeline of small step functions** — components.go provides composable steps (collectCustomerSubscriptionsStarting, mapSubsToViews via QueryService.ExpandViews, mapViewsToSpecs via AsSpec, filterSubViews, includeSubSpec, includeSubViewUnique) that the Before/After hooks chain together. (`views, _ := v.mapSubsToViews(ctx, subs); specs, _ := v.mapViewsToSpecs(views); specs, _ = v.validateUniqueConstraint(ctx, specs)`) +**Two-phase Before validation (existing-set then candidate-included)** — Before* hooks first validate the already-scheduled set alone (wrapping failures as an inconsistency error), then include the candidate spec and validate again; the candidate is excluded from the loaded set first (filterSubViews on Subscription.ID) when updating/continuing. (`specs, err = v.validateUniqueConstraint(ctx, specs); if err != nil { return fmt.Errorf("inconsistency error: already scheduled subscriptions are overlapping: %w", err) }`) +**Paginated full collection of candidate subscriptions** — collectCustomerSubscriptionsStarting uses pagination.CollectAll over QueryService.List with ActiveInPeriod=StartBoundedPeriod{From: starting}, page size 1000, filtered by customer + namespace. (`pagination.CollectAll(ctx, pagination.NewPaginator(func(...) { return v.Config.QueryService.List(ctx, subscription.ListSubscriptionsInput{ActiveInPeriod: &timeutil.StartBoundedPeriod{From: starting}, ...}) }), 1000)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `validator.go` | Holds the Config struct + Validate(), the validator type, NewSubscriptionUniqueConstraintValidator, all hook methods (BeforeCreate/Update/Continue, AfterCreate/Update/Cancel/Continue, BeforeDelete) and collectCustomerSubscriptionsStarting. | BeforeUpdate is a no-op unless MultiSubscriptionEnabledFF is on. All After* and BeforeDelete delegate to pipelineAfter, which re-validates the post-mutation set (using includeSubViewUnique to dedupe by Subscription.ID). BeforeContinue clears spec.ActiveTo (continue = indefinite) before validating. | +| `components.go` | Method-receiver helper steps for the validation pipeline (validateUniqueConstraint, mapSubsToViews, mapViewsToSpecs, includeSubSpec, includeSubViewUnique, filterSubViews). | mapSubsToViews delegates to Config.QueryService.ExpandViews — an extra DB round trip per hook invocation. includeSubViewUnique dedupes via lo.UniqBy on Subscription.ID; do not assume input views are already unique. | + +## Anti-Patterns + +- Calling ValidateUniqueConstraintByFeatures/BySubscriptions directly instead of routing through validateUniqueConstraint (bypasses the MultiSubscriptionEnabledFF branch). +- Forgetting to exclude the current subscription (filterSubViews on Subscription.ID) in update/continue paths, which would falsely flag a self-overlap. +- Adding a hook that loads candidate subscriptions with a fixed page instead of pagination.CollectAll — misses customers with >1000 subscriptions. +- Returning the inconsistency-wrapped error for the candidate-included validation; only the pre-existing-set validation should be wrapped as 'already scheduled subscriptions are overlapping'. +- Implementing hooks without embedding NoOpSubscriptionCommandHook, breaking the subscription.SubscriptionCommandHook contract. + +## Decisions + +- **Uniqueness is enforced as a command hook rather than inline in the service, with separate Before and After passes.** — Before passes reject invalid mutations pre-commit; After passes re-validate the materialized state to catch inconsistencies the spec-level check could miss, keeping the invariant centralized and reusable across create/update/cancel/continue/delete. +- **Uniqueness scope (per-feature vs per-subscription) is selected by feature flag.** — Single-subscription deployments enforce one active subscription per customer; multi-subscription deployments instead enforce non-overlap at feature granularity. + +## Example: A Before* hook chaining the pipeline: load overlapping subs, validate existing set, then validate with candidate included. + +``` +func (v SubscriptionUniqueConstraintValidator) BeforeCreate(ctx context.Context, namespace string, spec subscription.SubscriptionSpec) error { + subs, err := v.collectCustomerSubscriptionsStarting(ctx, namespace, spec.CustomerId, spec.ActiveFrom) + if err != nil { return err } + views, err := v.mapSubsToViews(ctx, subs) + if err != nil { return err } + specs, err := v.mapViewsToSpecs(views) + if err != nil { return err } + specs, err = v.validateUniqueConstraint(ctx, specs) + if err != nil { return fmt.Errorf("inconsistency error: already scheduled subscriptions are overlapping: %w", err) } + specs, err = v.includeSubSpec(spec, specs) + if err != nil { return err } + _, err = v.validateUniqueConstraint(ctx, specs) + return err +} +``` + + diff --git a/openmeter/subscription/workflow/CLAUDE.md b/openmeter/subscription/workflow/CLAUDE.md new file mode 100644 index 0000000000..eb7c9a040e --- /dev/null +++ b/openmeter/subscription/workflow/CLAUDE.md @@ -0,0 +1,49 @@ +# workflow + + + +> Orchestration layer (package subscriptionworkflow) above the subscription/addon/customer services: defines the Service interface (CreateFromPlan, EditRunning, ChangeToPlan, Restore, AddAddon, ChangeAddonQuantity) and shared helpers. service/ holds the concrete spec-centric, single-transaction implementation; this root holds the interface, input types, error mapping, and edit annotations. + +## Patterns + +**Spec-centric workflow signatures** — All methods take/return subscription.SubscriptionView, Spec, Patch, Timing or Plan — never raw DB rows. Mutations flow view -> AsSpec -> patch -> Update -> re-read view. (`EditRunning(ctx, subscriptionID models.NamespacedID, customizations []subscription.Patch, timing subscription.Timing) (subscription.SubscriptionView, error)`) +**Domain-error mapping at the boundary** — MapSubscriptionErrors translates SpecValidationError -> GenericValidationError and AlignmentError -> GenericConflictError before returning to callers. (`if sErr, ok := lo.ErrorsAs[*subscription.SpecValidationError](err); ok { return models.NewGenericValidationError(sErr) }`) +**Validate() on workflow inputs** — Input structs (AddAddonWorkflowInput, ChangeAddonQuantityWorkflowInput) implement Validate(); AddAddon requires AddonID and InitialQuantity > 0. (`if i.InitialQuantity <= 0 { return errors.New("initialQuantity must be greater than 0") }`) +**Edit-patch unique annotation stamping** — AnnotationParser.SetUniquePatchID stamps a ulid under subscription.workflow.patchid so edits are idempotently identifiable. (`annotations[AnnotationEditUniqueKey] = ulid.Make().String()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service interface and all workflow input structs (Create/Change/AddAddon/ChangeAddonQuantity). | ChangeToPlan returns both the cancelled current Subscription and the new SubscriptionView — plan change is cancel+create, not in-place. | +| `errors.go` | MapSubscriptionErrors translating spec/alignment errors into client-facing models errors. | Use this at the workflow boundary; don't leak raw SpecValidationError/AlignmentError to handlers. | +| `annotations.go` | AnnotationParser.SetUniquePatchID for edit idempotency. | Allocates the annotations map if nil; do not assume the input map is non-nil. | + +## Anti-Patterns + +- Persisting or calling underlying services outside a single transaction.Run wrapper — breaks atomicity of multi-step workflows. +- Mutating a SubscriptionView's items directly instead of view.AsSpec() -> spec mutation -> Service.Update. +- Editing a subscription that has addons via EditRunning instead of rejecting with NewGenericForbiddenError. +- Returning raw spec/alignment errors instead of routing through MapSubscriptionErrors. +- Hand-patching addon items instead of building addondiff.Diffable and re-syncing the full before/after addon set. + +## Decisions + +- **Workflows are spec-centric and each wraps its steps in one transaction.Run.** — Multi-step composition of subscription/addon/customer services must be atomic and validated against the spec model. +- **Plan changes are cancel-current + create-new with linked annotations.** — Avoids fragile in-place mutation of a live subscription and preserves history/linkage. + +## Example: Mapping subscription domain errors at the workflow boundary + +``` +func MapSubscriptionErrors(err error) error { + if err == nil { return nil } + if sErr, ok := lo.ErrorsAs[*subscription.SpecValidationError](err); ok { + return models.NewGenericValidationError(sErr) + } else if sErr, ok := lo.ErrorsAs[*subscription.AlignmentError](err); ok { + return models.NewGenericConflictError(sErr) + } + return err +} +``` + + diff --git a/openmeter/subscription/workflow/service/CLAUDE.md b/openmeter/subscription/workflow/service/CLAUDE.md new file mode 100644 index 0000000000..01c88e2c1e --- /dev/null +++ b/openmeter/subscription/workflow/service/CLAUDE.md @@ -0,0 +1,60 @@ +# service + + + +> Concrete implementation of subscriptionworkflow.Service — the orchestration layer that composes subscription.Service, subscriptionaddon.Service, and customer.Service into multi-step workflows (create-from-plan, edit, change-plan, restore, add/change addon). Every workflow wraps its steps in a single transaction.Run and operates on subscription specs/views rather than raw DB rows. + +## Patterns + +**Single transaction per workflow** — Every exported workflow method body is wrapped in transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (...) {...}) so all sub-service calls commit or roll back atomically. Nested helpers (syncWithAddons) also open their own transaction.Run. (`transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (subscription.SubscriptionView, error) { ... })`) +**Spec-then-update flow** — Workflows fetch a SubscriptionView via s.Service.GetView, derive a spec with view.AsSpec(), mutate the spec (NewSpecFromPlan, spec.ApplyMany, addon diffs), validate with spec.ValidateAlignment(), then persist via s.Service.Update / s.Service.Create, and re-fetch with GetView to return the fresh view. (`spec := curr.AsSpec(); spec.ApplyMany(...); s.Service.Update(ctx, id, spec); return s.Service.GetView(ctx, sub.NamespacedID)`) +**Timing validate + resolve before mutation** — Before applying changes, validate timing against the action (inp.Timing.ValidateForAction(subscription.SubscriptionActionCreate/Update/ChangeAddons, &view)) then resolve the edit time (Timing.Resolve / ResolveForSpec). Wrap timing failures in models.NewGenericValidationError. (`if err := inp.Timing.ValidateForAction(subscription.SubscriptionActionCreate, nil); err != nil { ... }; activeFrom, err := inp.Timing.Resolve()`) +**Domain typed errors via models constructors** — Return models.NewGenericValidationError, NewGenericConflictError, NewGenericForbiddenError, NewGenericPreConditionFailedError rather than bare errors for client-facing failures; wrap subscription-package errors with subscriptionworkflow.MapSubscriptionErrors. (`return def, models.NewGenericConflictError(fmt.Errorf("subscription already has that addon purchased"))`) +**Addon sync via diff apply/restore** — Addon mutations call syncWithAddons(view, before, after, time): build addondiff.Diffable for before/after with asDiffs (GetDiffableFromAddon), spec.ApplyMany(restores.GetRestores()) then spec.ApplyMany(applies.GetApplies()), then Update. Adding/editing addons goes through s.AddonService, never raw item patches. (`spec.ApplyMany(lo.Map(applies, func(d addondiff.Diffable, _ int) subscription.AppliesToSpec { return d.GetApplies() }), subscription.ApplyContext{CurrentTime: currentTime})`) +**Customer locking for create** — CreateFromPlan calls s.lockCustomer(ctx, inp.CustomerID) (subscription.GetCustomerLock + s.Lockr.LockForTX) as the first step inside the transaction to serialize concurrent subscription creation per customer. (`if err := s.lockCustomer(ctx, inp.CustomerID); err != nil { return def, err }`) +**Owner-subsystem annotation stamping** — EditRunning rewrites patch.PatchAddItem patches (both value and pointer forms) to set OwnerSubscriptionSubSystem via subscription.AnnotationParser.AddOwnerSubSystem and a unique patch ID via subscriptionworkflow.AnnotationParser.SetUniquePatchID before applying. (`subscription.AnnotationParser.AddOwnerSubSystem(ap.CreateInput.CreateSubscriptionItemInput.Annotations, subscription.OwnerSubscriptionSubSystem)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Defines WorkflowServiceConfig (all injected deps: Service, AddonService, CustomerService, TransactionManager, Logger, Lockr, FeatureFlags), the service struct, NewWorkflowService constructor, the compile-time interface assertion, and lockCustomer helper. | service embeds WorkflowServiceConfig directly — add new dependencies as config fields, not as struct-only fields. Keep `var _ subscriptionworkflow.Service = &service{}` satisfied. | +| `subscription.go` | Core lifecycle workflows: CreateFromPlan, EditRunning, ChangeToPlan, Restore. Houses spec construction (NewSpecFromPlan), addon-guard (hasAddons blocks editing subs with addons), and previous/superseding subscription annotation wiring for plan changes. | ChangeToPlan is cancel-then-create: it pins the new sub's Timing to curr.ActiveTo (verbatim) so both resolve to the exact same timestamp. Restore is gated by the MultiSubscriptionEnabledFF feature flag and deletes scheduled subs before Continue. | +| `addon.go` | Addon workflows: AddAddon, ChangeAddonQuantity, and the shared syncWithAddons. Helpers asDiffs (subsAddon -> addondiff.Diffable) and hasAddons. purchaseRes is the transaction return struct. | syncWithAddons restores BEFORE applying (order matters). Conflict check uses lo.SomeBy over existing addons. Namespace cross-checks (subscriptionID.Namespace vs SubscriptionAddonID.Namespace) must precede the addon fetch. The logErrWithArgs JSON-dump block is a temporary debugging aid marked TODO. | + +## Anti-Patterns + +- Calling s.Service / s.AddonService adapters or persisting outside a transaction.Run wrapper — breaks atomicity of multi-step workflows. +- Mutating a SubscriptionView's items directly instead of going through view.AsSpec(), spec mutation, and s.Service.Update. +- Editing a subscription that has addons via EditRunning — hasAddons must reject it with NewGenericForbiddenError. +- Applying timing without ValidateForAction + Resolve/ResolveForSpec, or returning raw errors instead of models.NewGeneric*Error for client-facing failures. +- Bypassing s.AddonService for addon changes and hand-patching addon items, instead of building addondiff.Diffable via asDiffs/syncWithAddons. + +## Decisions + +- **Workflows are spec-centric: read view, derive spec, mutate, validate alignment, update, re-read view.** — The subscription spec is the single declarative source of truth; applying patches/diffs to a spec and re-validating alignment keeps phase/item invariants consistent before any DB write. +- **Plan changes are implemented as cancel-current + create-new with linked annotations rather than in-place mutation.** — Subscriptions are immutable over their cadence; superseding/previous-subscription annotations preserve the audit chain while the new sub starts exactly at the old sub's ActiveTo. +- **Addon effects are computed as reversible diffs (GetRestores/GetApplies) and re-synced from the full before/after addon set on every change.** — Recomputing the spec from the base view plus the current full addon set avoids drift and makes add/change/remove a single idempotent reconciliation path. + +## Example: Transactional, timing-validated addon sync inside a workflow method + +``` +res, err := transaction.Run(ctx, s.TransactionManager, func(ctx context.Context) (purchaseRes, error) { + subView, err := s.Service.GetView(ctx, subscriptionID) + if err != nil { return purchaseRes{}, err } + if err := addonInp.Timing.ValidateForAction(subscription.SubscriptionActionChangeAddons, &subView); err != nil { + return purchaseRes{}, models.NewGenericValidationError(err) + } + editTime, err := addonInp.Timing.ResolveForSpec(subView.AsSpec()) + if err != nil { return purchaseRes{}, err } + subsAdd, err := s.AddonService.Create(ctx, subscriptionID.Namespace, subscriptionaddon.CreateSubscriptionAddonInput{ + AddonID: addonInp.AddonID, SubscriptionID: subscriptionID.ID, + InitialQuantity: subscriptionaddon.CreateSubscriptionAddonQuantityInput{ActiveFrom: editTime, Quantity: addonInp.InitialQuantity}, + }) + if err != nil { return purchaseRes{}, err } + subView, err = s.syncWithAddons(ctx, subView, subsAdds.Items, append(subsAdds.Items, *subsAdd), editTime) + return purchaseRes{sub: subView, subAdd: *subsAdd}, err +// ... +``` + + diff --git a/openmeter/taxcode/CLAUDE.md b/openmeter/taxcode/CLAUDE.md new file mode 100644 index 0000000000..6fc6d18899 --- /dev/null +++ b/openmeter/taxcode/CLAUDE.md @@ -0,0 +1,62 @@ +# taxcode + + + +> Domain package for tax codes and per-namespace OrganizationDefaultTaxCodes: the root declares the Service/Repository interfaces, all input/domain types (TaxCode, TaxCodeAppMappings, OrganizationDefaultTaxCodes), ValidationIssue-based errors, system-managed annotations, and a namespace.Handler that seeds tax codes on namespace creation. adapter/ (Ent), service/, and testutils/ implement and test it. + +## Patterns + +**ValidationIssue error catalog** — errors.go declares package-level models.ErrorCode constants + models.NewValidationIssue vars (with HTTP status attributes) and typed detectors (IsTaxCodeNotFoundError, IsOrganizationDefaultTaxCodesNotFoundError, etc.). (`var ErrTaxCodeNotFound = models.NewValidationIssue(ErrCodeTaxCodeNotFound, ..., commonhttp.WithHTTPStatusCodeAttribute(http.StatusNotFound))`) +**Errors-slice Validate** — Every input/domain Validate collects into var errs []error (NamespacedID/AppMappings/field checks) and returns models.NewNillableGenericValidationError(errors.Join(errs...)). (`_ models.Validator = (*CreateTaxCodeInput)(nil)`) +**System-managed annotation marker** — annotations.go defines AnnotationKeyManagedBy / AnnotationValueManagedBySystem; TaxCode.IsManagedBySystem reads them; system-created codes are protected from update/delete. (`Annotations: models.Annotations{AnnotationKeyManagedBy: AnnotationValueManagedBySystem}`) +**App-type-specific tax code format validation** — TaxCodeAppMapping.Validate switches on AppType (e.g. app.AppTypeStripe requires TaxCodeStripeRegexp `^txcd_\d{8}$`); TaxCodeAppMappings enforces unique app types via lo.UniqBy. (`if !TaxCodeStripeRegexp.MatchString(t.TaxCode) { errs = append(errs, ErrTaxCodeStripeInvalid) }`) +**Idempotent transactional namespace seeding** — NamespaceHandler.CreateNamespace runs all seed creates + org-default upsert in one transaction.RunWithNoValue, pre-listing existing codes and re-listing on a conflict (ensureTaxCode); validate() enforces exactly one DefaultInvoicing and one DefaultCreditGrant seed. (`transaction.RunWithNoValue(ctx, h.transactionManager, func(ctx) error {...})`) +**Orphaned-key sentinel error** — ErrTaxCodeOrphanedKey (a plain errors.New, not a ValidationIssue) signals a key-exists-but-mapping-changed race to avoid poisoning the pg transaction (25P02). (`func IsTaxCodeOrphanedKeyError(err error) bool { return errors.Is(err, ErrTaxCodeOrphanedKey) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service = TaxCodeService + OrganizationDefaultTaxCodesService; declares all *Input types with Validate and the AllowAnnotations inputOptions. | GetOrCreateByAppMapping is service-only (not on Repository); IncludeDeleted on Get/List inputs is internal-only, never from API handlers. | +| `repository.go` | Repository = entutils.TxCreator + tax code + org-default persistence methods. | Repository has no GetOrCreateByAppMapping — that orchestration lives in the service inside a transaction. | +| `taxcode.go` | Domain types: TaxCode, TaxCodeAppMapping(s), OrganizationDefaultTaxCodes + Expand, with Validate/Equal/IsManagedBySystem/GetAppMapping. | TaxCode.Equal excludes ManagedModel timestamps, Metadata, and Annotations from comparison. | +| `errors.go` | Error code constants, ValidationIssue vars, constructors and Is* detectors. | ErrTaxCodeOrphanedKey is a plain error, not a ValidationIssue — detect with errors.Is, others with errors.As + Code(). | +| `namespacehandler.go` | NamespaceHandler implements namespace.Handler; seeds tax codes + org defaults idempotently in a transaction. | Config.validate() requires exactly one DefaultInvoicing and one DefaultCreditGrant seed; DeleteNamespace is intentionally a no-op. | +| `annotations.go` | Defines the managed-by annotation key/value used to mark system-created tax codes. | Only system-managed codes are protected from mutation; pre-existing codes without the annotation are left untouched by seeding. | + +## Anti-Patterns + +- Returning raw errors from Validate() instead of wrapping with models.NewNillableGenericValidationError. +- Detecting ErrTaxCodeOrphanedKey with errors.As/ValidationIssue instead of errors.Is (it is a plain sentinel). +- Mutating or deleting a system-managed tax code without honoring AllowAnnotations / the IsManagedBySystem guard. +- Running seed creation or org-default upsert outside the single CreateNamespace transaction. +- Adding a Stripe app mapping whose tax code does not match the `^txcd_\d{8}$` regexp. + +## Decisions + +- **Org defaults seeded require exactly one invoicing and one credit-grant seed.** — OrganizationDefaultTaxCodes must reference both a single invoicing and a single credit-grant tax code per namespace. +- **Use a typed sentinel ErrTaxCodeOrphanedKey for the create-conflict race.** — Prevents a raw pg constraint error (25P02) from poisoning the surrounding transaction. +- **Mark system-created codes via annotation rather than a DB column.** — IsManagedBySystem can gate update/delete protection without a schema change, and pre-existing user codes stay unmanaged. + +## Example: Idempotent seeding of tax codes inside one transaction + +``` +func (h *NamespaceHandler) CreateNamespace(ctx context.Context, ns string) error { + return transaction.RunWithNoValue(ctx, h.transactionManager, func(ctx context.Context) error { + listed, err := h.service.ListTaxCodes(ctx, ListTaxCodesInput{Namespace: ns}) + if err != nil { + return fmt.Errorf("list tax codes: %w", err) + } + existingByKey := lo.SliceToMap(listed.Items, func(tc TaxCode) (string, TaxCode) { return tc.Key, tc }) + var invoicingID, creditGrantID string + for _, seed := range h.seeds { + id, err := h.ensureTaxCode(ctx, ns, seed, existingByKey) + if err != nil { + return fmt.Errorf("seed tax code %q: %w", seed.Key, err) + } + if seed.DefaultInvoicing { invoicingID = id } + if seed.DefaultCreditGrant { creditGrantID = id } +// ... +``` + + diff --git a/openmeter/taxcode/adapter/CLAUDE.md b/openmeter/taxcode/adapter/CLAUDE.md new file mode 100644 index 0000000000..a0eed0e340 --- /dev/null +++ b/openmeter/taxcode/adapter/CLAUDE.md @@ -0,0 +1,60 @@ +# adapter + + + +> Ent-backed persistence layer (taxcode.Repository) for tax codes and per-namespace organization default tax codes. All DB access is transaction-aware and namespace-scoped; this is the only place that talks to entdb.Client for taxcode tables. + +## Patterns + +**Repository constructor with validated Config** — New(Config) validates Client + Logger via models.Validator and returns taxcode.Repository, never the concrete *adapter. (`func New(config Config) (taxcode.Repository, error) { if err := config.Validate(); err != nil { return nil, err }; return &adapter{db: config.Client, logger: config.Logger}, nil }`) +**Tx/WithTx/Self transaction trio** — adapter implements Tx (HijackTx), WithTx (rebind via NewTxClientFromRawConfig), and Self so entutils.TransactingRepo can rebind to the ctx-carried tx. (`func (a *adapter) WithTx(ctx, tx *entutils.TxDriver) *adapter { txClient := entdb.NewTxClientFromRawConfig(ctx, *tx.GetConfig()); return &adapter{db: txClient.Client(), logger: a.logger} }`) +**Wrap every method body in TransactingRepo** — Each repo method calls input.Validate() then entutils.TransactingRepo(ctx, a, func...) (or TransactingRepoWithNoValue for void) so it joins an existing tx. (`return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (taxcode.TaxCode, error) { ... })`) +**Namespace + soft-delete filtering** — Reads filter taxcodedb.Namespace(...) and (unless IncludeDeleted) taxcodedb.DeletedAtIsNil(); deletes are soft via SetDeletedAt(clock.Now()). (`query.Where(taxcodedb.Namespace(input.Namespace)).Where(taxcodedb.DeletedAtIsNil())`) +**Map Ent entity -> domain via Map*FromEntity** — Entities are converted with MapTaxCodeFromEntity / mapOrganizationDefaultTaxCodesFromEntity; never return *db.TaxCode upward. Expand edges loaded conditionally and read via *OrErr(). (`return MapTaxCodeFromEntity(entity)`) +**Translate Ent errors to domain errors** — db.IsNotFound -> taxcode.New*NotFoundError; db.IsConstraintError -> models.NewGenericConflictError. Raw Ent errors are never leaked. (`if db.IsNotFound(err) { return ..., taxcode.NewTaxCodeNotFoundError(input.ID) }`) +**Upsert via OnConflict on namespace partial-unique** — Org defaults upsert uses OnConflict(ConflictColumns(FieldNamespace), ConflictWhere(IsNull(FieldDeletedAt))).UpdateNewValues() then re-reads via Get to honor Expand. (`Create().SetNamespace(...).OnConflict(sql.ConflictColumns(orgdefaultsdb.FieldNamespace), sql.ConflictWhere(sql.IsNull(orgdefaultsdb.FieldDeletedAt))).UpdateNewValues().Exec(ctx)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Config, New, and the Tx/WithTx/Self transaction plumbing | Return taxcode.Repository not *adapter; WithTx must rebuild db from the raw tx config, not reuse a.db. | +| `taxcode.go` | CRUD for TaxCode plus GetTaxCodeByAppMapping | GetTaxCodeByAppMapping uses a raw JSONB '@>' containment query and sorts system-managed first then by CreatedAt/ID — preserve that ordering; UpdateTaxCode clears AppMappings when input list is empty. | +| `organizationdefaulttaxcodes.go` | Get/Upsert org default tax codes with edge expansion | Expansion edges loaded only when input.Expand.* is set; mapping uses InvoicingTaxCodeOrErr()/CreditGrantTaxCodeOrErr() and errors if the requested edge wasn't loaded. | +| `mapping.go` | MapTaxCodeFromEntity: single source of TaxCode entity->domain conversion | AppMappings read via lo.FromPtr (nullable); Metadata wrapped with models.NewMetadata; nil entity returns an error. | + +## Anti-Patterns + +- Returning *db.TaxCode or any Ent type to callers instead of mapping to taxcode domain types +- Querying a.db directly without entutils.TransactingRepo, breaking transactional composition with the service layer +- Omitting the Namespace or DeletedAtIsNil filter, leaking cross-namespace or soft-deleted rows +- Leaking raw Ent errors instead of converting via db.IsNotFound / db.IsConstraintError to taxcode/models errors +- Hard-deleting tax codes instead of soft-delete via SetDeletedAt(clock.Now()) + +## Decisions + +- **App-mapping lookup is a JSONB containment query (app_mappings @> [...]) plus in-Go stable sort** — A single tax code can carry multiple app mappings and multiple codes can match; system-managed seeds must win deterministically over user duplicates. +- **Org default tax codes use a partial-unique upsert keyed on namespace where deleted_at is null** — Exactly one active default row per namespace, kept idempotent and stable (CreatedAt/ID unchanged) across repeated upserts. + +## Example: Adapter CRUD method: validate, transact, query namespace-scoped, translate errors, map + +``` +func (a *adapter) GetTaxCode(ctx context.Context, input taxcode.GetTaxCodeInput) (taxcode.TaxCode, error) { + if err := input.Validate(); err != nil { + return taxcode.TaxCode{}, err + } + return entutils.TransactingRepo(ctx, a, func(ctx context.Context, a *adapter) (taxcode.TaxCode, error) { + entity, err := a.db.TaxCode.Query(). + Where(taxcodedb.Namespace(input.Namespace)). + Where(taxcodedb.ID(input.ID)). + Where(taxcodedb.DeletedAtIsNil()). + Only(ctx) + if err != nil { + if db.IsNotFound(err) { + return taxcode.TaxCode{}, taxcode.NewTaxCodeNotFoundError(input.ID) + } + return taxcode.TaxCode{}, fmt.Errorf("failed to get tax code: %w", err) +// ... +``` + + diff --git a/openmeter/taxcode/service/CLAUDE.md b/openmeter/taxcode/service/CLAUDE.md new file mode 100644 index 0000000000..df22b4733a --- /dev/null +++ b/openmeter/taxcode/service/CLAUDE.md @@ -0,0 +1,58 @@ +# service + + + +> Business-logic layer (taxcode.Service) over taxcode.Repository: enforces cross-field invariants (namespace ownership, system-managed protection, org-default protection) and orchestrates the get-or-create-by-app-mapping flow inside transactions. + +## Patterns + +**Service constructor with validated Config** — New(Config) validates Adapter (taxcode.Repository) + Logger and returns *Service asserted against taxcode.Service. (`var _ taxcode.Service = (*Service)(nil)`) +**Validate then transaction.Run delegating to adapter** — Every method: input.Validate() then transaction.Run(ctx, s.adapter, func...) (RunWithNoValue for void). Business checks live inside the tx callback before delegating. (`return transaction.Run(ctx, s.adapter, func(ctx context.Context) (taxcode.TaxCode, error) { return s.adapter.CreateTaxCode(ctx, input) })`) +**Cross-field guards inside the transaction** — UpsertOrganizationDefaultTaxCodes re-fetches both tax code IDs via GetTaxCode to prove namespace ownership before upserting; Update/Delete fetch existing first to check IsManagedBySystem and org-default usage. (`if _, err := s.GetTaxCode(ctx, taxcode.GetTaxCodeInput{NamespacedID: models.NamespacedID{Namespace: input.Namespace, ID: input.InvoicingTaxCodeID}}); err != nil { return ..., err }`) +**System-managed protection with AllowAnnotations bypass** — Update/Delete reject IsManagedBySystem() codes with NewGenericConflictError(ErrTaxCodeManagedBySystem) unless input.AllowAnnotations is set (internal seeding path). (`if existing.IsManagedBySystem() && !input.AllowAnnotations { return models.NewGenericConflictError(taxcode.ErrTaxCodeManagedBySystem) }`) +**Concurrency-safe get-or-create** — GetOrCreateByAppMapping looks up, creates on not-found, and on conflict re-reads; an orphaned key (conflict then still-not-found) returns ErrTaxCodeOrphanedKey rather than poisoning the pg tx. (`if models.IsGenericConflictError(err) { tc, retryErr := s.adapter.GetTaxCodeByAppMapping(ctx, ...); ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `service.go` | Service struct, Config, New constructor | Holds only adapter + logger; no direct DB client. Assert taxcode.Service interface compliance. | +| `taxcode.go` | TaxCode CRUD + GetTaxCodeByAppMapping + GetOrCreateByAppMapping | Delete blocks org-default and system-managed codes; GetOrCreate derives key as fmt.Sprintf("%s_%s", AppType, TaxCode) and must distinguish orphaned-key from generic not-found. | +| `organizationdefaulttaxcodes.go` | Get/Upsert org defaults with namespace-ownership validation | Both InvoicingTaxCodeID and CreditGrantTaxCodeID are GetTaxCode-checked so a code from another namespace surfaces as IsTaxCodeNotFoundError, not a silent cross-tenant link. | +| `taxcode_test.go` | Service tests for system-managed, org-default protection, app-mapping preference | Asserts ValidationIssue.Code() equals taxcode.ErrCodeTaxCodeManagedBySystem / ErrCodeTaxCodeIsOrganizationDefault; system-managed seed must be preferred over user duplicate by GetTaxCodeByAppMapping. | +| `organizationdefaulttaxcodes_test.go` | Service tests for upsert idempotency, cross-namespace rejection, expand | Idempotent upsert must keep row ID and CreatedAt stable; cross-namespace tax codes must not resolve. | + +## Anti-Patterns + +- Calling adapter methods outside transaction.Run, losing atomicity across the validate-then-mutate guards +- Allowing org-default upsert without re-verifying both tax code IDs belong to the namespace (cross-tenant leak) +- Bypassing the IsManagedBySystem() check on Update/Delete without honoring AllowAnnotations +- Putting Ent/DB queries directly in the service instead of going through taxcode.Repository +- Treating a post-conflict not-found as a normal not-found instead of ErrTaxCodeOrphanedKey, risking a poisoned pg transaction + +## Decisions + +- **Namespace ownership of referenced tax codes is enforced in the service, not the DB FK** — Org defaults reference tax codes by ID only; the service re-fetches each by (namespace, id) so a foreign-namespace ID surfaces as not-found rather than a valid but cross-tenant link. +- **Get-or-create handles the create-conflict race explicitly** — Concurrent first-touch of the same app mapping must converge on one row; the retry read plus orphaned-key error keeps the surrounding Postgres transaction usable. + +## Example: Service method: validate, transact, business guard, delegate to adapter + +``` +func (s *Service) UpdateTaxCode(ctx context.Context, input taxcode.UpdateTaxCodeInput) (taxcode.TaxCode, error) { + if err := input.Validate(); err != nil { + return taxcode.TaxCode{}, err + } + return transaction.Run(ctx, s.adapter, func(ctx context.Context) (taxcode.TaxCode, error) { + existing, err := s.adapter.GetTaxCode(ctx, taxcode.GetTaxCodeInput{NamespacedID: input.NamespacedID}) + if err != nil { + return taxcode.TaxCode{}, err + } + if existing.IsManagedBySystem() && !input.AllowAnnotations { + return taxcode.TaxCode{}, models.NewGenericConflictError(taxcode.ErrTaxCodeManagedBySystem) + } + return s.adapter.UpdateTaxCode(ctx, input) + }) +} +``` + + diff --git a/openmeter/taxcode/testutils/CLAUDE.md b/openmeter/taxcode/testutils/CLAUDE.md new file mode 100644 index 0000000000..3a2263796d --- /dev/null +++ b/openmeter/taxcode/testutils/CLAUDE.md @@ -0,0 +1,40 @@ +# testutils + + + +> Test harness for the taxcode domain: spins up a real Postgres-backed Ent adapter + service and provides fixture helpers (CreateTaxCode, SetupNamespaceDefaults) for taxcode service/adapter tests. + +## Patterns + +**TestEnv built from concrete constructors** — NewTestEnv wires testutils.InitPostgresDB -> taxcodeadapter.New -> taxcodeservice.New directly, not via app/common DI, to avoid test import cycles. (`adapter, _ := taxcodeadapter.New(taxcodeadapter.Config{Client: client, Logger: logger}); svc, _ := taxcodeservice.New(taxcodeservice.Config{Adapter: adapter, Logger: logger})`) +**Idempotent close via sync.Once** — Close() runs once and shuts down ent client, EntDriver, and PGDriver; tests register t.Cleanup(env.Close). (`e.close.Do(func() { e.Client.Close(); e.db.EntDriver.Close(); e.db.PGDriver.Close() })`) +**Explicit schema migration step** — Tests call env.DBSchemaMigrate(t) which runs Client().Schema.Create against the test DB before exercising the service. (`err := e.db.EntDriver.Client().Schema.Create(t.Context())`) +**Fixture helpers with generated defaults** — CreateTaxCode fills Namespace/Key/Name from testutils.NameGenerator when empty and lets an optional CreateTaxCodeInput override fields; SetupNamespaceDefaults seeds two tax codes and upserts org defaults. (`input.Namespace = namespace; if input.Key == "" { input.Key = generated.Key }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `env.go` | TestEnv struct, NewTestEnv, DBSchemaMigrate, Close, CreateTaxCode, SetupNamespaceDefaults | NewTestEnv already registers a t.Cleanup(Close); the second t.Cleanup(env.Close) in tests is safe only because Close is sync.Once-guarded. Discard logger via testutils.NewDiscardLogger keeps test output clean. | + +## Anti-Patterns + +- Importing app/common wiring to build the service, which creates test-only import cycles — build from taxcodeadapter.New / taxcodeservice.New instead +- Sharing a single namespace across subtests that mutate org defaults; helpers use freshly generated namespaces per scenario +- Forgetting env.DBSchemaMigrate(t) before service calls, so the taxcode tables don't exist + +## Decisions + +- **Harness constructs adapter+service from underlying constructors rather than DI** — Keeps taxcode test dependencies independent from app/common so unrelated wiring additions cannot introduce import cycles into this package. + +## Example: Standard taxcode test setup + +``` +env := taxcodetestutils.NewTestEnv(t) +t.Cleanup(func() { env.Close(t) }) +env.DBSchemaMigrate(t) +ns := testutils.NameGenerator.Generate().Key +env.SetupNamespaceDefaults(t.Context(), t, ns) +``` + + diff --git a/openmeter/testutils/CLAUDE.md b/openmeter/testutils/CLAUDE.md new file mode 100644 index 0000000000..a67f7525c4 --- /dev/null +++ b/openmeter/testutils/CLAUDE.md @@ -0,0 +1,50 @@ +# testutils + + + +> Shared, framework-light test helpers used across nearly every domain package: Postgres test DB provisioning, loggers, deterministic name generation, time helpers, and async polling. Constraint: keep it dependency-light (only pkg/framework) so it never creates import cycles with app/common wiring. + +## Patterns + +**pgtestdb-backed isolated DBs** — InitPostgresDB provisions a per-test template-cloned Postgres DB via pgtestdb.Custom, wrapping it in pgdriver + entdriver, returned as TestDB with a Close(t) cleanup. Skips the test when POSTGRES_HOST is unset. (`db := testutils.InitPostgresDB(t); defer db.Close(t)`) +**Functional options for DB setup** — InitPostgresDB takes Option values (WithPostgresConfig, WithMigrator, WithDriverOptions) implemented via the optionFunc/apply pattern. (`InitPostgresDB(t, WithMigrator(&NoopMigrator{}))`) +**t.Helper + t.Context discipline** — Helpers call t.Helper() and use t.Context() (not context.Background) so failures attribute to the caller and lifecycle ties to the test. (`func NewLogger(t testing.TB) *slog.Logger { t.Helper(); ... }`) +**Deterministic-ish name generation** — NameGenerator (package-level singleton) yields a GeneratedName{Key, Name} where Key is the lowercased, dash-joined slug of Name, via forscht/namegen adjective+animal dictionaries. (`n := testutils.NameGenerator.Generate(); n.Key, n.Name`) +**Async assertion wrapper** — EventuallyWithTf wraps require.EventuallyWithTf, capturing the last saved error via a sync.Map so the eventual failure message carries it. (`EventuallyWithTf(t, fn, wait, interval)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `pg_driver.go` | TestDB type plus InitPostgresDB; NoopMigrator (currently a no-op, see `TODO: fix migrations`). | Default migrator is NoopMigrator — schema is NOT migrated by default; callers needing a schema must pass WithMigrator. Test SKIPS (not fails) when POSTGRES_HOST is empty. | +| `logger.go` | NewLogger (slog.Default) and NewDiscardLogger for quiet tests. | Contains a local discardHandler copy marked TODO-removable once min Go has slog.DiscardHandler. | +| `namegen.go` | Random unique Key/Name generator seeded by time for test fixtures. | Seeded with time.Now().UnixNano() — names are not reproducible across runs; do not assert on exact values. | +| `time.go` | GetRFC3339Time parse helper and TimeEqualsApproximately tolerance assertion. | Both t.Fatalf on mismatch; GetRFC3339Time expects strict RFC3339 input. | +| `async.go` | EventuallyWithTf polling helper around testify. | saveErr stores into a sync.Map under a fixed key; only the last error is surfaced. | + +## Anti-Patterns + +- Importing app/common or domain wiring here — would create test-only import cycles; keep deps to pkg/framework. +- Assuming InitPostgresDB ran migrations (default NoopMigrator does nothing). +- Asserting exact generated names from NameGenerator (time-seeded, non-deterministic). +- Using context.Background() in helpers instead of t.Context(). + +## Decisions + +- **Use pgtestdb template-cloning for per-test isolated databases.** — Gives each test a fresh, fast-cloned Postgres without cross-test contamination, while skipping cleanly when no Postgres host is configured. +- **Keep the package framework-only.** — It is imported by almost every domain package's tests; broad dependencies would risk import cycles and slow compilation. + +## Example: Spin up an isolated Postgres-backed test DB + +``` +import "github.com/openmeterio/openmeter/openmeter/testutils" + +func TestX(t *testing.T) { + db := testutils.InitPostgresDB(t) + defer db.Close(t) + client := db.EntDriver.Client() + _ = client +} +``` + + diff --git a/openmeter/watermill/CLAUDE.md b/openmeter/watermill/CLAUDE.md new file mode 100644 index 0000000000..719542fa93 --- /dev/null +++ b/openmeter/watermill/CLAUDE.md @@ -0,0 +1,38 @@ +# watermill + + + +> Structural folder owning OpenMeter's event-bus integration over the Watermill library. It is the seam between domain code and Kafka: children split by responsibility — eventbus (outbound publish facade), grouphandler (inbound fan-out dispatch), marshaler (CloudEvents codec), router (consumer middleware stack), driver (transport impls), and nopublisher (handler adapters). + +## Patterns + +**CloudEvents is the canonical wire format** — marshaler defines the Event interface (EventName/EventMetadata/Validate) that every published event implements; routing/identity travels in ce_* metadata headers, never in the JSON body. eventbus and router both key off ce_type. (`Marshal serializes domain events as JSON CloudEvents 1.0 with ce_type/ce_source headers mirrored into Watermill metadata.`) +**Topic routing by event-name prefix** — eventbus maps domain events to Kafka topics via a TopicMapping + a GeneratePublishTopic switch on the event-name prefix, rather than per-event topic config. (`New topic => extend TopicMapping (+Validate) and the GeneratePublishTopic switch together.`) +**Options/Config Validate() gates construction everywhere** — eventbus.New, router.NewDefaultRouter, and drivers all validate their Options/Config before building, and inject an explicit *slog.Logger rather than slog.Default(). (`Calling cqrs.NewEventBusWithConfig or message.Router directly bypasses this validation and the standard middleware/marshaler wiring.`) +**Fixed, ordered consumer middleware stack** — router.NewDefaultRouter assembles a fixed stack (DLQ/poison-queue, OTel metrics+tracing, correlation, recover, retry, timeout) with a MaxRetries-1 correction and Timeout wrapped by RestoreContext; every Kafka consumer is built through it. (`Reordering middleware breaks the DLQ/timeout/retry/context-restore interplay (issue 467).`) +**Transport selected above the driver folder** — driver/ holds interchangeable Watermill Publisher/Subscriber implementations (kafka real driver, noop null publisher); eventbus chooses between them. The disabled path is a real noop driver, not a nil publisher or per-call-site guards. (`Publishing disabled => wire driver/noop, not nil-check at each publish site.`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `eventbus/eventbus.go` | Publisher/ContextPublisher facade over Watermill CQRS EventBus; topic routing and nil-event no-op publish. | Adding a topic requires both TopicMapping.Validate and the GeneratePublishTopic switch. | +| `grouphandler/grouphandler.go` | Type-keyed fan-out from one Watermill handler to many GroupEventHandlers, errors.Join over results, OTel metrics per status. | Only NewEvent() of the first registered handler is unmarshaled per type; don't register conflicting concrete structs for one event type, and ack (don't error) unhandled types. | +| `marshaler/marshaler.go` | CloudEvents<->Watermill codec, Event interface contract, ID/Time defaulting, WithSource decorator. | Non-Event structs fail Marshal ('invalid event type'); empty Source is rejected by NewCloudEvent. | +| `router/router.go` | NewDefaultRouter assembling the standard middleware stack consumed by balance/billing/notification workers. | DLQ push is outermost but skipped when IsClosed(); preserve MaxRetries-1 and Timeout+RestoreContext pairing. | + +## Anti-Patterns + +- Bypassing eventbus.New / router.NewDefaultRouter and constructing cqrs.NewEventBusWithConfig or message.Router directly, losing Options validation, marshaler wiring, DLQ/metrics/retry. +- Adding a Kafka topic without extending both TopicMapping (+Validate) and GeneratePublishTopic. +- Publishing a struct that does not implement the marshaler Event interface, or relying on the JSON body instead of ce_type metadata for routing. +- Reordering/removing router middleware, dropping RestoreContext around Timeout, or forgetting the MaxRetries-1 correction. +- Using NewMock or slog.Default() in production wiring instead of injecting a real *slog.Logger. + +## Decisions + +- **All inter-service events use CloudEvents 1.0 with metadata mirrored into Watermill headers.** — ce_* headers give every consumer/router a uniform, body-independent way to route and validate events. +- **A single NewDefaultRouter encodes the project's whole consumer middleware policy.** — Centralizing DLQ, retry, timeout, tracing and correlation guarantees every Kafka worker behaves identically; escape hatch is building your own router. +- **Drivers are split into kafka and noop sibling packages, with the disabled path as a real noop driver.** — Selection happens once in eventbus instead of nil-checks scattered across publish call sites. + + diff --git a/openmeter/watermill/driver/CLAUDE.md b/openmeter/watermill/driver/CLAUDE.md new file mode 100644 index 0000000000..d76ed7c647 --- /dev/null +++ b/openmeter/watermill/driver/CLAUDE.md @@ -0,0 +1,24 @@ +# driver + + + +> Structural folder owning the Watermill message.Publisher/Subscriber transport implementations. It splits by concrete transport: kafka/ is the real Sarama-backed production driver; noop/ is the null publisher that silently discards messages when event publishing is disabled. Both feed openmeter/watermill/eventbus, which selects between them. + +## Patterns + +**Transport selection lives above this folder** — Driver subpackages only construct a Publisher/Subscriber; the choice of kafka vs noop is made by the consumer (eventbus / app wiring), not inside a driver. Keep drivers ignorant of when they are chosen. (`eventbus uses noop.Publisher{} when publishing is disabled, else the kafka publisher from broker.go`) +**Every driver satisfies the same Watermill contract via compile-time assertion** — Each concrete driver must assert the Watermill interface it implements so a transport swap stays type-safe. (`noop/publisher.go: var _ message.Publisher = (*Publisher)(nil)`) +**Config-driven construction with explicit dependency injection** — The real driver (kafka) takes an Options/BrokerOptions struct validated via Validate() before building Sarama/Watermill objects; loggers and meters are injected, never defaulted via slog.Default(). (`kafka/broker.go: in.Validate() then createKafkaConfig(role) before publisher/subscriber creation`) + +## Anti-Patterns + +- Adding a new transport that skips the message.Publisher/Subscriber compile-time interface assertion — breaks the swappability contract eventbus relies on. +- Pushing transport-selection logic (kafka-vs-noop) down into a driver subpackage instead of keeping it in eventbus/app wiring. +- Leaking Sarama/Kafka config or partition-key logic into the noop driver — noop must stay dependency-free and side-effect-free. + +## Decisions + +- **Drivers are split by concrete transport (kafka, noop) as sibling subpackages rather than one package with a mode flag.** — Lets noop stay zero-dependency and trivially value-receiver based, while kafka pulls in Sarama, SASL/SCRAM, and OTel metrics without leaking those concerns into the disabled path. +- **The null/disabled publisher is a real driver (noop) rather than a nil publisher or per-call-site guards.** — Consumers always hold a valid message.Publisher, so publish call sites need no nil checks regardless of whether eventing is enabled. + + diff --git a/openmeter/watermill/driver/kafka/CLAUDE.md b/openmeter/watermill/driver/kafka/CLAUDE.md new file mode 100644 index 0000000000..1a6bc35c4c --- /dev/null +++ b/openmeter/watermill/driver/kafka/CLAUDE.md @@ -0,0 +1,64 @@ +# kafka + + + +> Kafka transport driver for Watermill, building Sarama-backed publishers and subscribers from app config. Wraps watermill-kafka with OpenMeter-specific concerns: CloudEvent partition keys, SASL/SCRAM auth, Sarama logging redirection, topic provisioning, and OTel metrics via the metrics/ subpackage. + +## Patterns + +**Options struct with Validate() then constructor** — Each public constructor (NewPublisher, NewSubscriber) takes an Options struct embedding BrokerOptions and calls in.Validate() first thing, returning an error before building any Sarama/Watermill object. (`func NewSubscriber(in SubscriberOptions) (message.Subscriber, error) { if err := in.Validate(); err != nil { return nil, err } ... }`) +**Centralized Sarama config via createKafkaConfig(role)** — All Sarama config (SASL, TLS, metric registry, producer retries, logger) is built in BrokerOptions.createKafkaConfig(role) and handed to watermill via OverwriteSaramaConfig. role is 'publisher' or 'subscriber' and is required. (`saramaConfig, err := in.Broker.createKafkaConfig("publisher")`) +**Injected dependencies, no global fallbacks** — BrokerOptions requires a non-nil *slog.Logger and otelmetric.Meter; Validate() rejects nil. Logger is passed to watermill via watermill.NewSlogLogger and to the metrics registry via metrics.LoggingErrorHandler(o.Logger). (`if o.Logger == nil { return errors.New("logger is required") }`) +**CloudEvent subject becomes Kafka partition key** — AddPartitionKeyFromSubject copies cloudEvent.Subject() into message metadata under PartitionKeyMetadataKey; marshalerWithPartitionKey then promotes that metadata to kafkaMsg.Key and strips the header. Publisher uses marshalerWithPartitionKey{} as Marshaler. (`watermillIn.Metadata[PartitionKeyMetadataKey] = cloudEvent.Subject()`) +**Sarama global logger redirected to slog adaptor** — createKafkaConfig sets sarama.Logger and sarama.DebugLogger to SaramaLoggerAdaptor wrapping o.Logger.Info / .Debug. DebugLogger must always be set or debug logs fall back onto the info Logger. (`sarama.DebugLogger = &SaramaLoggerAdaptor{loggerFunc: logger.Debug}`) +**Metric name transform via SaramaMetricRenamer(role)** — Metrics are prefixed 'sarama.', tagged with a role attribute, and high-cardinality/low-value series (for-broker, for-topic, protocol-requests-rate, compression-) are dropped via TransformedMetric.Drop=true. (`ErrorHandler: metrics.LoggingErrorHandler(o.Logger), NameTransformFn: SaramaMetricRenamer(role)`) +**Topic provisioning before publisher returns** — NewPublisher calls in.TopicProvisioner.Provision(ctx, in.ProvisionTopics...) before constructing the kafka.Publisher, so topics exist before the first publish. (`if err = in.TopicProvisioner.Provision(ctx, in.ProvisionTopics...); err != nil { return nil, err }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `broker.go` | BrokerOptions + createKafkaConfig(role): the single place all Sarama config is assembled (SASL/SCRAM, TLS, metric registry, producer settings, loggers). | ApiVersionsRequest is deliberately false (log-flood workaround); TLS Config left as &tls.Config{} because Sarama breaks on forced TLS 1.3; producer MaxMessageBytes is 2MB. Don't reintroduce these as defaults blindly. | +| `publisher.go` | NewPublisher: builds watermill kafka.Publisher with marshalerWithPartitionKey and the OTel Sarama tracer; provisions topics. | kafka.NewOTELSaramaTracer() relies on the GLOBAL trace provider, not an injected one. | +| `subscriber.go` | NewSubscriber: builds watermill kafka.Subscriber bound to a required ConsumerGroupName. | Consumer.MaxProcessingTime is hardcoded to 5m (defaultMaxProcessingTime) to avoid partition reassignment; uses DefaultMarshaler (no partition-key handling on the consume side). | +| `marshaler.go` | marshalerWithPartitionKey + AddPartitionKeyFromSubject: maps a CloudEvent subject to the Kafka message key. | PartitionKeyMetadataKey header is filtered out of the outgoing message after being promoted to Key; changing the key derivation changes partition assignment / ordering guarantees. | +| `metrics.go` | SaramaMetricRenamer(role): returns the name-transform fn consumed by the metrics subpackage registry. | ingorePrefixes drops whole metric families; for-broker/for-topic are dropped to avoid high cardinality. New metrics must avoid matching these drop rules. | +| `saslscram.go` | XDGSCRAMClient (Begin/Step/Done) + SHA256/SHA512 hash generators, vendored from the Sarama example for SCRAM auth. | Wired only when SecurityProtocol == 'SASL_SSL' and SaslMechanisms is SCRAM-SHA-256/512 in createKafkaConfig. | +| `logger.go` | SaramaLoggerAdaptor: bridges Sarama's Print/Printf/Println logger interface to a single LoggerFunc. | Thin fmt.Sprint/Sprintf bridge; level (Info vs Debug) is chosen by which slog method is bound at construction in broker.go. | + +## Anti-Patterns + +- Constructing Sarama config outside createKafkaConfig(role) — bypasses SASL/TLS/metrics/logger wiring and the role suffix on ClientID. +- Using slog.Default() instead of the injected BrokerOptions.Logger; Validate() exists specifically to forbid nil loggers/meters. +- Skipping in.Validate() in a new constructor before touching Sarama/Watermill objects. +- Setting only sarama.Logger and not sarama.DebugLogger — debug output then floods the info logger. +- Adding partition-key logic on the subscriber path; only the publisher uses marshalerWithPartitionKey, the subscriber uses DefaultMarshaler. + +## Decisions + +- **OverwriteSaramaConfig injects a fully custom Sarama config into watermill-kafka rather than relying on watermill defaults.** — OpenMeter needs control over SASL/SCRAM, TLS quirks, the OTel metric registry, producer message size, and Sarama's global loggers — none expressible through watermill's surface. +- **Partition key is derived from the CloudEvent subject and carried through message metadata.** — Guarantees per-subject (e.g. per-customer/meter) ordering and co-location across partitions for usage events. +- **ApiVersionsRequest disabled and TLS left at library defaults instead of forcing 1.3.** — Documented workarounds for known Sarama bugs (ApiVersionsRequest V3 log floods; TLS 1.3 'protocol version not supported'). + +## Example: Build a Kafka publisher that partitions by CloudEvent subject + +``` +import ( + pkgkafka "github.com/openmeterio/openmeter/pkg/kafka" + wmkafka "github.com/openmeterio/openmeter/openmeter/watermill/driver/kafka" +) + +pub, err := wmkafka.NewPublisher(ctx, wmkafka.PublisherOptions{ + Broker: wmkafka.BrokerOptions{ + KafkaConfig: cfg.Kafka, + ClientID: "openmeter", + Logger: logger, + MetricMeter: meter, + }, + ProvisionTopics: []pkgkafka.TopicConfig{ /* ... */ }, + TopicProvisioner: provisioner, +}) +// ... +``` + + diff --git a/openmeter/watermill/driver/kafka/metrics/CLAUDE.md b/openmeter/watermill/driver/kafka/metrics/CLAUDE.md new file mode 100644 index 0000000000..7de8cb7f02 --- /dev/null +++ b/openmeter/watermill/driver/kafka/metrics/CLAUDE.md @@ -0,0 +1,59 @@ +# metrics + + + +> Adapts the rcrowley/go-metrics registry used by Sarama into OpenTelemetry instruments, so Kafka client metrics are emitted as raw OTel events instead of relying on go-metrics' periodic scraping. Primary constraint: it must transparently wrap go-metrics types without breaking Sarama's expectations of the metrics.Registry interface. + +## Patterns + +**Embed-and-decorate go-metrics types** — Each wrapper struct embeds the original go-metrics interface (Meter, Counter, Gauge, GaugeFloat64, Histogram) and overrides only the mutating method to also write to an OTel instrument, then delegates to the embedded value. (`type wrappedCounter struct { metrics.Counter; otelMeter otelmetric.Int64UpDownCounter; attributes attribute.Set }; func (m *wrappedCounter) Inc(n int64) { m.otelMeter.Add(...); m.Counter.Inc(n) }`) +**Registry embeds metrics.Registry and overrides Register/GetOrRegister** — registry embeds metrics.Registry and overrides only GetOrRegister and Register to wrap defs before delegating to the embedded Registry; all other Registry methods pass through. (`type registry struct { metrics.Registry; mu sync.Mutex; meticMeter otelmetric.Meter; ... }`) +**go-metrics type → OTel instrument mapping** — getWrappedMeter type-switches on the go-metrics interface and picks the matching OTel instrument: Meter→Int64Counter, Counter→Int64UpDownCounter, GaugeFloat64→Float64Gauge, Gauge→Int64Gauge, Histogram→Int64Histogram. (`case metrics.Counter: otelMeter, err := r.meticMeter.Int64UpDownCounter(transfomedMetric.Name)`) +**Reflect-resolve function defs** — go-metrics may register a factory func instead of an instance; getWrappedMeter detects reflect.Func and calls it with no args to obtain the real metric before type-switching. (`if v := reflect.ValueOf(def); v.Kind() == reflect.Func { def = v.Call(nil)[0].Interface() }`) +**Name transform with drop support** — NameTransformFn maps a go-metrics name to a TransformedMetric (Name, Attributes, Drop). Drop==true returns the original unwrapped metric so uninteresting metrics incur no OTel cost. (`if transfomedMetric.Drop { return def, nil }`) +**Errors logged, never panicked** — Instrument-creation and registration failures are routed through an ErrorHandler (default no-op; LoggingErrorHandler wraps slog) and the original metric is returned, so metrics wiring never breaks Sarama. (`if err != nil { r.errorHandler(err); return def }`) +**Mutex-guarded register paths** — GetOrRegister and Register both take r.mu before checking/wrapping/registering to avoid duplicate concurrent registration of the same named metric. (`r.mu.Lock(); defer r.mu.Unlock()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `adapter.go` | Entire package: NewRegistry constructor, the registry wrapper over metrics.Registry, getWrappedMeter type dispatch, and the five wrapped* instrument decorators. | NewRegistry requires MetricMeter (returns error if nil) but defaults NameTransformFn and ErrorHandler. The Histogram case uses break (logs and falls through to return def) instead of returning early like the others — keep that asymmetry in mind when editing. | +| `README.md` | Documents why this adapter exists (no OTel connector for go-metrics; scraping vs raw events) and current limitations. | Documents the two intentional shortcuts: OTel calls use context.Background(), and registration errors are only logged — do not treat these as bugs to silently change. | + +## Anti-Patterns + +- Replacing the embedded go-metrics interface methods entirely instead of delegating to them — Sarama still reads values back through the original go-metrics API. +- Using slog.Default() inside the package; logging must come via LoggingErrorHandler(dest *slog.Logger) injected by the caller. +- Panicking or returning errors up Sarama's path on instrument-creation failure; route through errorHandler and return the original def instead. +- Adding a new go-metrics type without extending the getWrappedMeter type switch — it falls through to the default errorHandler 'unsupported metric type' branch and stays unwrapped. +- Wrapping metrics in GetOrRegister/Register without holding r.mu, risking duplicate registration races. + +## Decisions + +- **Wrap go-metrics types and emit raw OTel events rather than build a periodic scraper.** — go-metrics only supports periodic scraping; wrapping the mutating methods lets the adapter push real-time events into OpenTelemetry as they happen. +- **Use context.Background() for all OTel record/add calls.** — go-metrics' event interface carries no context, so there is no caller context to propagate at the metric-emission site (documented limitation in README). +- **Reflect-call func-typed defs before type-switching.** — go-metrics sometimes registers a factory function rather than a concrete metric; resolving it first lets the single type switch handle all registration shapes. + +## Example: Building an OTel-backed go-metrics registry to hand to Sarama + +``` +import ( + "go.opentelemetry.io/otel/attribute" + otelmetric "go.opentelemetry.io/otel/metric" + "github.com/openmeterio/openmeter/openmeter/watermill/driver/kafka/metrics" +) + +reg, err := metrics.NewRegistry(metrics.NewRegistryOptions{ + MetricMeter: meter, + NameTransformFn: func(name string) metrics.TransformedMetric { + return metrics.TransformedMetric{Name: "kafka_" + name, Attributes: attribute.NewSet()} + }, + ErrorHandler: metrics.LoggingErrorHandler(logger), +}) +if err != nil { + return err +// ... +``` + + diff --git a/openmeter/watermill/driver/noop/CLAUDE.md b/openmeter/watermill/driver/noop/CLAUDE.md new file mode 100644 index 0000000000..7a981649f1 --- /dev/null +++ b/openmeter/watermill/driver/noop/CLAUDE.md @@ -0,0 +1,48 @@ +# noop + + + +> A no-op Watermill message.Publisher implementation that silently discards all published messages. Used by openmeter/watermill/eventbus as a null/disabled publisher when event publishing should be a no-op. + +## Patterns + +**Compile-time interface assertion** — Assert the type satisfies message.Publisher via a blank identifier var, so a signature drift breaks the build. (`var _ message.Publisher = (*Publisher)(nil)`) +**Value-receiver no-op methods returning nil** — Publish and Close are value-receiver methods on an empty struct that do nothing and return nil error. (`func (Publisher) Publish(topic string, messages ...*message.Message) error { return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `publisher.go` | Defines the empty Publisher struct and its no-op Publish/Close methods implementing watermill message.Publisher. | Keep Publisher zero-state (struct{}); do not add fields or side effects. Both methods must return nil and never block — this is the disabled-publishing path. | + +## Anti-Patterns + +- Adding real publishing logic, buffering, or error returns — this driver exists specifically to discard messages. +- Removing the `var _ message.Publisher = (*Publisher)(nil)` assertion, which guards against Watermill interface changes. +- Giving Publisher state/fields, breaking its trivial value-receiver semantics. + +## Decisions + +- **Empty struct with value receivers instead of a pointer-based stateful type.** — A no-op publisher needs no state; value receivers make zero-value usage and copying safe and free. + +## Example: Implementing the no-op Watermill publisher + +``` +package noop + +import "github.com/ThreeDotsLabs/watermill/message" + +type Publisher struct{} + +var _ message.Publisher = (*Publisher)(nil) + +func (Publisher) Publish(topic string, messages ...*message.Message) error { + return nil +} + +func (Publisher) Close() error { + return nil +} +``` + + diff --git a/openmeter/watermill/eventbus/CLAUDE.md b/openmeter/watermill/eventbus/CLAUDE.md new file mode 100644 index 0000000000..35bbceab68 --- /dev/null +++ b/openmeter/watermill/eventbus/CLAUDE.md @@ -0,0 +1,30 @@ +# eventbus + + + +> Outbound event-publishing facade over Watermill's CQRS EventBus. Maps domain events to Kafka topics by event-name prefix and provides the Publisher/ContextPublisher interfaces the whole codebase uses to emit CloudEvents. + +## Patterns + +**Topic routing by event-name prefix** — GeneratePublishTopic switches on strings.HasPrefix(EventName, +".") to pick IngestEventsTopic, BalanceWorkerEventsTopic, else SystemEventsTopic. New topic-routed subsystems add a prefix case here. (`case strings.HasPrefix(params.EventName, ingestVersionSubsystemPrefix): return opts.TopicMapping.IngestEventsTopic, nil`) +**Options/TopicMapping Validate() before construction** — New(Options) returns (Publisher, error) and calls opts.Validate() first; TopicMapping.Validate() requires all three topics non-empty. Never construct the bus bypassing Validate. (`func New(opts Options) (Publisher, error) { if err := opts.Validate(); err != nil { return nil, err } ... }`) +**nil event is a no-op publish** — Publisher.Publish returns nil immediately when event==nil, so handlers can signal 'nothing to publish' by returning a nil event without the caller branching. (`if event == nil { return nil }`) +**WithContext().PublishIfNoError chaining** — ContextPublisher inlines publish-on-success: PublishIfNoError(event, err) returns err if non-nil else publishes. Used to fold a handler's (event,err) result into one return. (`return p.WithContext(ctx).PublishIfNoError(worker.handleEvent(ctx, event))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `eventbus.go` | Entire package: TopicMapping, Options, Publisher/ContextPublisher interfaces, publisher impl, New, NewMock. | NewMock uses slog.Default() — acceptable in test-only constructor; production New requires an explicit Logger in Options (Validate rejects nil). | + +## Anti-Patterns + +- Adding a new Kafka topic without extending both TopicMapping (+Validate) and the GeneratePublishTopic switch. +- Calling cqrs.NewEventBusWithConfig directly instead of going through New, bypassing Options validation and marshaler wiring. +- Using NewMock or slog.Default() in production wiring — inject a real *slog.Logger via Options. + +## Decisions + +- **Route by event-name prefix rather than per-event topic config.** — Subsystems (ingest, balanceworker) own a topic; everything else falls through to SystemEventsTopic, keeping topic config to three fields. + + diff --git a/openmeter/watermill/grouphandler/CLAUDE.md b/openmeter/watermill/grouphandler/CLAUDE.md new file mode 100644 index 0000000000..fc0efb3386 --- /dev/null +++ b/openmeter/watermill/grouphandler/CLAUDE.md @@ -0,0 +1,42 @@ +# grouphandler + + + +> Fan-out event dispatcher: a single Watermill NoPublishHandlerFunc that demultiplexes one message to all GroupEventHandlers registered for that CloudEvent type, recording OTel message-count and processing-time metrics per status. + +## Patterns + +**Type-keyed handler map** — Handlers are stored in typeHandlerMap[eventName] keyed by marshaler.Name(handler.NewEvent()). Handle() looks up by NameFromMessage(msg); unknown/empty groups are counted 'ignored' and return nil (message ack'd). (`groupHandler, ok := h.typeHandlerMap[eventName]; if !ok || len(groupHandler) == 0 { ...Ignored; return nil }`) +**Single unmarshal, shared event instance** — The event is unmarshaled once from groupHandler[0].NewEvent() then passed to every handler; all handlers for a type must accept the same concrete event struct. (`event := groupHandler[0].NewEvent(); h.marshaler.Unmarshal(msg, event)`) +**errors.Join over all handlers** — All handlers run via lo.Map and their errors are joined; any non-nil result fails the whole message (status 'failed', returned for retry/DLQ). Handlers are not short-circuited. (`err := errors.Join(lo.Map(groupHandler, func(h GroupEventHandler, _ int) error { return h.Handle(msg.Context(), event) })...)`) +**Metered constructor returns (*T, error)** — NewNoPublishingHandler calls getMeters(metricMeter) and propagates meter-creation errors; never construct NoPublishingHandler literal without meters. (`meters, err := getMeters(metricMeter); if err != nil { return nil, err }`) +**Concurrency-safe registration** — AddHandler takes mux.Lock and Handle takes mux.RLock, so handlers can be added while the router is running. (`h.mux.Lock(); defer h.mux.Unlock(); h.typeHandlerMap[...] = append(...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `grouphandler.go` | NoPublishingHandler (Handle/AddHandler), NewGroupEventHandler generic wrapper, NewNoPublishingHandler, meters + getMeters. | Handle returns nil for unregistered event types (ack'd, not DLQ'd). A returned error sends the message to retry/DLQ — keep handlers idempotent since all run on every retry. | + +## Anti-Patterns + +- Returning an error for an event you simply don't handle — let the type-map miss ack it as 'ignored' instead. +- Registering handlers for the same event type that expect different concrete event structs (only NewEvent() of the first is unmarshaled). +- Mutating typeHandlerMap without the mux, or constructing NoPublishingHandler without getMeters. + +## Decisions + +- **One Watermill handler fans out to many group handlers in-process.** — Avoids one Kafka consumer per handler; multiple subscribers to the same event type share a single subscription and message decode. + +## Example: Register multiple handlers under one Watermill consumer + +``` +h, err := grouphandler.NewNoPublishingHandler(marshaler, metricMeter, + grouphandler.NewGroupEventHandler(func(ctx context.Context, e *snapshot.SnapshotEvent) error { return doA(ctx, e) }), + grouphandler.NewGroupEventHandler(func(ctx context.Context, e *snapshot.SnapshotEvent) error { return doB(ctx, e) }), +) +if err != nil { return err } +router.AddNoPublisherHandler("name", topic, subscriber, h.Handle) +``` + + diff --git a/openmeter/watermill/marshaler/CLAUDE.md b/openmeter/watermill/marshaler/CLAUDE.md new file mode 100644 index 0000000000..3b32876fe0 --- /dev/null +++ b/openmeter/watermill/marshaler/CLAUDE.md @@ -0,0 +1,34 @@ +# marshaler + + + +> CloudEvents (1.0) <-> Watermill message codec. Defines the Event interface (EventName/EventMetadata/Validate) every published event implements and serializes events as JSON CloudEvents with ce_* metadata headers. + +## Patterns + +**Event interface contract** — Anything published must implement Event: EventName() string, EventMetadata() metadata.EventMetadata, Validate() error. Marshal/Unmarshal type-assert to Event and fail with 'invalid event type' otherwise. (`type Event interface { EventName() string; EventMetadata() metadata.EventMetadata; Validate() error }`) +**Validate runs on both marshal and unmarshal** — NewCloudEvent calls ev.Validate() before SetData; Unmarshal calls ev.Validate() after json.Unmarshal. Invalid events never cross the bus in either direction. (`if err := ev.Validate(); err != nil { return cloudevents.Event{}, err }`) +**ce_* metadata headers carry routing/identity** — Marshal sets CloudEventsHeaderType/Time/Source and (if non-empty) Subject on msg.Metadata. NameFromMessage reads ce_type — this is what eventbus/grouphandler/router key on, not the payload. (`msg.Metadata.Set(CloudEventsHeaderType, ce.Type())`) +**Defaulting of ID and Time** — NewCloudEvent fills empty metadata.ID with ulid.Make() and zero metadata.Time with time.Now(); Source is mandatory (errors if empty). (`if metadata.ID == "" { cloudEvent.SetID(ulid.Make().String()) }`) +**WithSource decorator for late source binding** — WithSource(source, ev) wraps an Event, overriding EventMetadata().Source; its MarshalJSON marshals only the inner Event to avoid an embedded "Event" key in JSON. (`func WithSource(source string, ev Event) Event { return &eventWithSource{source: source, Event: ev} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `marshaler.go` | Marshaler alias (cqrs.CommandEventMarshaler), Event interface, New, Marshal/Unmarshal, NewCloudEvent, Name, NameFromMessage; ce_* header + UnknownEventName constants. | Name() returns UnknownEventName ('io.openmeter.unknown') for non-Event values rather than erroring — a wrong type silently routes nowhere. TransformFunc, if set, runs last in Marshal and can rewrite the message. | +| `source.go` | eventWithSource decorator and WithSource helper for injecting CloudEvents source. | Custom MarshalJSON delegates to e.Event; if you embed an Event pointer elsewhere expecting normal struct marshaling you'll get the wrapper's behavior. | +| `source_test.go` | Round-trip test verifying source header set and unmarshal equality. | Reference example of a minimal Event implementation for tests. | + +## Anti-Patterns + +- Publishing a struct that doesn't implement Event — Marshal returns 'invalid event type' and Name silently degrades to UnknownEventName. +- Relying on the JSON payload for event type/routing instead of the ce_type metadata header. +- Returning a zero/empty Source from EventMetadata — NewCloudEvent rejects it. +- Putting routing/validation logic in Marshal callers instead of the event's Validate(). + +## Decisions + +- **CloudEvents as the wire format with metadata mirrored into Watermill headers.** — Lets routing/metrics layers (eventbus, grouphandler, router) inspect ce_type without decoding the full JSON payload. + + diff --git a/openmeter/watermill/nopublisher/CLAUDE.md b/openmeter/watermill/nopublisher/CLAUDE.md new file mode 100644 index 0000000000..26bb493d40 --- /dev/null +++ b/openmeter/watermill/nopublisher/CLAUDE.md @@ -0,0 +1,21 @@ +# nopublisher + + + +> Tiny adapter pair between Watermill's HandlerFunc (returns messages) and NoPublishHandlerFunc (returns none), used when a consumer must not emit messages. + +## Patterns + +**Bidirectional handler adapters** — NoPublisherHandlerToHandlerFunc wraps a no-publish handler as a HandlerFunc (returns nil messages); HandlerFuncToNoPublisherHandler does the reverse and treats any produced message as the error ErrMessagesProduced. (`if len(outMessages) > 0 { return ErrMessagesProduced }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `nopublisher.go` | ErrMessagesProduced sentinel plus the two conversion functions. | Wrapping a HandlerFunc that legitimately returns messages will fail at runtime with ErrMessagesProduced rather than dropping them — only use on handlers expected to be side-effect-only. | + +## Anti-Patterns + +- Using HandlerFuncToNoPublisherHandler on a handler that intentionally produces output messages. + + diff --git a/openmeter/watermill/router/CLAUDE.md b/openmeter/watermill/router/CLAUDE.md new file mode 100644 index 0000000000..c618bcb9af --- /dev/null +++ b/openmeter/watermill/router/CLAUDE.md @@ -0,0 +1,55 @@ +# router + + + +> Builds the standard Watermill message.Router (NewDefaultRouter) with the project's middleware stack — poison-queue/DLQ, OTel metrics+tracing, correlation, recover, retry, timeout — driving every Kafka consumer (balance/billing/notification workers). + +## Patterns + +**Ordered middleware stack in NewDefaultRouter** — Order is load-bearing: PoisonQueueWithFilter (outermost) -> DLQ telemetry -> CorrelationID -> Recoverer -> Retry -> (optional RestoreContext+Timeout) -> HandlerMetrics. Don't reorder; comments explain why (e.g. Timeout after Retry, RestoreContext before Timeout). (`router.AddMiddleware(poisionQueue); router.AddMiddleware(dlqMetrics); router.AddMiddleware(middleware.CorrelationID, middleware.Recoverer)`) +**Options.Validate() gates all required deps** — NewDefaultRouter requires Subscriber, Publisher, Logger, MetricMeter, Tracer and a valid config.ConsumerConfiguration; nil any of them and construction errors out. (`if err := opts.Validate(); err != nil { return nil, err }`) +**MaxRetries off-by-one correction** — Watermill's Retry runs MaxRetries+1 times, so the code decrements opts.Config.Retry.MaxRetries by one before configuring the middleware. (`if maxRetries > 0 { maxRetries = maxRetries - 1 }`) +**Context restore around Timeout** — RestoreContext middleware saves/restores msg context (watermill issue 467) so the Timeout middleware's cancelled context doesn't leak into retries. (`router.AddMiddleware(RestoreContext, middleware.Timeout(opts.Config.ProcessingTimeout))`) +**WarningLogSeverityError downgrades DLQ log level** — DLQ telemetry middleware logs ErrorContext by default but switches to WarnContext when the error unwraps to *WarningLogSeverityError; wrap expected-failure errors with NewWarningLogSeverityError to avoid error-level noise. (`if _, ok := lo.ErrorsAs[*WarningLogSeverityError](err); ok { logger = opts.Logger.WarnContext }`) +**Metrics keyed by ce_type** — Both HandlerMetrics and DLQ telemetry tag metrics/spans with message.event_type from the ce_type header via metricAttributeTypeFromMessage, defaulting to 'UNKNOWN'. (`ce_type := msg.Metadata.Get(marshaler.CloudEventsHeaderType); if ce_type == "" { ce_type = unkonwnEventType }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `router.go` | Options/Validate and NewDefaultRouter — the canonical middleware assembly. | Middleware order is intentional and commented; PoisonQueueWithFilter skips DLQ when router.IsClosed() so in-flight messages are NAcked/retried instead of dead-lettered on shutdown. | +| `metrics.go` | HandlerMetrics (per-try) and NewDLQTelemetryMiddleware (full processing incl. retries) plus metricAttributeTypeFromMessage. | Handler failures are logged as Warn ('produced later than DB commit'); DLQ middleware sets msg context to a span context and restores it via defer. NewDLQTelemetryOptions.Validate requires MetricMeter/Logger/Router/Tracer. | +| `context.go` | RestoreContext middleware (watermill issue 467 workaround). | Must wrap the Timeout middleware, not replace it. | +| `errors.go` | WarningLogSeverityError + NewWarningLogSeverityError for log-severity control; implements Unwrap. | Only affects DLQ log level, not retry/DLQ behavior itself. | +| `logger.go` | warningOnlyLogger adapter that downgrades watermill Error() calls to slog Warn (used for the Retry middleware logger). | Watermill only has Error/Info levels; this is the workaround to keep retry noise at warn. | +| `router_test.go` | Table-driven gochannel-backed integration test covering happy/failed/retry/timeout/DLQ paths. | Uses an in-memory gochannel pubsub and a DoneCondition signal; good template for testing consumer wiring. | + +## Anti-Patterns + +- Reordering or removing middleware in NewDefaultRouter (DLQ/timeout/retry/context-restore interplay breaks). +- Constructing message.Router directly for a consumer instead of NewDefaultRouter, losing DLQ/metrics/retry. +- Logging expected/transient failures at error level instead of wrapping with NewWarningLogSeverityError. +- Adding the Timeout middleware without RestoreContext (cancelled context leaks into retries — issue 467). +- Forgetting the MaxRetries-1 correction, causing one extra attempt than configured. + +## Decisions + +- **Push to DLQ as the outermost step but skip it when router.IsClosed().** — On graceful shutdown Close() cancels contexts immediately; NAcking instead of dead-lettering lets Kafka redeliver rather than losing/duplicating to DLQ. +- **Single NewDefaultRouter with a fixed stack, escapable by building your own router.** — Standardizes observability and failure handling across all workers; the doc comment explicitly allows custom routers for special cases. + +## Example: Build the standard consumer router + +``` +router, err := router.NewDefaultRouter(router.Options{ + Subscriber: sub, + Publisher: pub, + Logger: logger, + MetricMeter: metricMeter, + Tracer: tracer, + Config: consumerCfg, // config.ConsumerConfiguration +}) +if err != nil { return err } +router.AddNoPublisherHandler("name", topic, sub, handler.Handle) +``` + + diff --git a/pkg/CLAUDE.md b/pkg/CLAUDE.md new file mode 100644 index 0000000000..1eab267135 --- /dev/null +++ b/pkg/CLAUDE.md @@ -0,0 +1,65 @@ +# pkg + + + +> Domain-agnostic shared Go utilities — the foundational layer every openmeter/* domain, api/*, cmd/*, and app/* package builds on. Its primary constraint: code here must NOT import openmeter/* domain packages, so it stays a pure dependency sink (pkg/models alone has ~229 in-edges). + +## Patterns + +**Validate() aggregates, never short-circuits** — Validate() methods collect into `var errs []error`, errors.Join them, and return models.NewNillableGenericValidationError(...). Established in pkg/models and mirrored by pkg/currencyx, pkg/filter, pkg/expand, pkg/timeutil. (`return models.NewNillableGenericValidationError(errors.Join(errs...))`) +**Read time via clock.Now()** — Time-dependent utilities (pkg/lrux expiry, period/cadence math) read pkg/clock.Now() not time.Now(), so clock.FreezeTime/UnFreeze make tests deterministic. (`import "github.com/openmeterio/openmeter/pkg/clock"; now := clock.Now()`) +**Config struct with Validate + Configure(viper) + New constructor** — Infra packages (pkg/redis, pkg/kafka, pkg/pglockx) expose a Config with Validate(), viper Configure(), and a validating New* constructor; direct client construction that skips OTel/validation is forbidden. (`client, err := cfg.NewClient(...) // not redis.NewClient(rawOpts) directly`) +**Inject *slog.Logger, never slog.Default()** — pkg/errorsx, pkg/gosundheit, pkg/log, pkg/kafka require an explicitly injected logger; falling back to slog.Default() in a constructor is a project-wide anti-pattern. (`func NewSlogHandler(logger *slog.Logger) Handler`) +**Generic value helpers wrap samber/lo, not replace it** — pkg/slicesx, pkg/convert, pkg/defaultx, pkg/set complement lo with nil-preserving / empty-aware / error-aware variants; only add a local wrapper when lo cannot express it (e.g. convert.MapToPointer vs lo.EmptyableToPtr). (`ptr := convert.MapToPointer(m) // lo.EmptyableToPtr mishandles maps`) +**Cycle-break by duplication, not cross-import** — pkg/equal duplicates the Equaler[T] interface from pkg/models specifically to avoid an import cycle; foundational packages stay maximally importable by holding only generic primitives. (`// pkg/equal: Equaler[T] duplicated, must NOT import pkg/models`) +**Single-purpose leaf packages** — Most children own one tightly-scoped concern (pkg/cmpx, pkg/hasher, pkg/idempotency, pkg/strcase, pkg/sortx). Resist adding unrelated logic; grow a new sibling package instead. (`pkg/sortx holds only the ASC/DESC Order enum shared codebase-wide`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `pkg/models` | Most-depended-on package (~229 in-edges): ManagedModel/NamespacedModel/CadencedModel, the Generic*Error taxonomy, and the ValidationIssue/FieldDescriptor RFC-7807 mapping. Signatures here are effectively frozen public API. | ErrorSeverity is inverted (Critical is the LOWEST value); never set ValidationIssue fields directly — use the With* option constructors which Clone. | +| `pkg/framework` | Structural sub-namespace owning transaction/entutils (the adapter transaction foundation), the operation->httptransport->commonhttp HTTP stack, lockr, pgdriver, tracex. | entutils.TransactingRepo/TxDriver is the ONLY sanctioned shared-transaction path — never reach to Ent's native client.Tx; framework must not import any openmeter/* domain package. | +| `pkg/pagination` | v1 offset/limit primitives (Page 1-based, Result[T], NewPaginator closure, CollectAll) used by ~119 packages; cursor/keyset lives in pkg/pagination/v2. | PageNumber is 1-based (Offset() goes negative if treated as 0-based); CollectAll returns nil (not partial) on error. | +| `pkg/timeutil` | Period/Recurrence/Timeline algebra used by billing, subscription, entitlement, credit; immutable value receivers delegating calendar math to pkg/datetime. | OpenPeriod.Intersection==nil means NO overlap (not empty); use Recurrence not raw time.Add so variable-length months don't overflow. | +| `pkg/datetime` | DateTime (RFC9557 time.Time wrapper) and ISODuration over rickb777/period; no-overflow calendar arithmetic via shiftClockTo. | Use DateTime.Add* not time.AddDate (month-end overflow); MarshalJSON serializes RFC3339 and drops bracket timezone/nanos. | +| `pkg/filter` | AIP-style typed query filters (FilterString/Integer/Time/...) emitting BOTH Ent predicates and go-sqlbuilder WHERE expressions; ~53 in-edges from v3 handlers/adapters. | An operator added to Select but not SelectWhereExpr (or vice versa) silently diverges the two SQL emitters; escape LIKE input via EscapeLikePattern. | +| `pkg/kafka` | Typed librdkafka Consumer/Producer/Admin config builders + LRU-cached idempotent TopicProvisioner; consumed by ingest, sink, watermill, cmd/*. | Every config struct needs `var _ ConfigMapper`/`var _ ConfigValidator`; guard SetKey on non-zero or you override librdkafka defaults; tolerate ErrTopicAlreadyExists. | +| `pkg/currencyx` | Currency Code (ISO 4217, used directly in the Ent schema), Calculator (resolves precision once), largest-remainder amount allocation over gobl. | Calculator{} constructed directly has nil Def and panics on RoundToPrecision; round to subunits via RoundToPrecision (JPY has 0 subunits), not decimal.Round. | + +## Anti-Patterns + +- Importing any openmeter/* domain package from anywhere under pkg/ — it must remain a pure dependency sink so every domain can depend on it. +- Calling time.Now() instead of clock.Now() in time-dependent utilities, breaking deterministic FreezeTime tests. +- Falling back to slog.Default() in a constructor instead of requiring an injected *slog.Logger. +- Adding local pointer/slice/must/default wrappers when github.com/samber/lo already covers the need (pkg/convert's empty-aware container helpers are the sanctioned exception). +- Returning on the first validation error instead of joining all issues into models.NewNillableGenericValidationError. + +## Decisions + +- **pkg is a flat collection of single-purpose, domain-agnostic packages rather than a layered library.** — Keeping each utility narrow and free of domain imports maximizes reuse and lets 200+ packages depend on them without import cycles. +- **pkg/framework concentrates the cross-cutting transaction, HTTP-operation, locking, and driver foundations as its own sub-namespace.** — These sit at the bottom of the dependency graph; isolating them as domain-agnostic foundations means every domain's service/adapter layer can build on one sanctioned transaction and HTTP-handler abstraction. +- **pkg/equal duplicates pkg/models' Equaler rather than sharing it.** — Deliberate duplication breaks an import cycle so equality-based diffing stays usable from packages that pkg/models would otherwise depend on. + +## Example: The project-standard Validate() that aggregates all field issues + +``` +import ( + "errors" + "fmt" + + "github.com/openmeterio/openmeter/pkg/models" +) + +func (i Input) Validate() error { + var errs []error + if i.Name == "" { + errs = append(errs, errors.New("name is required")) + } + if err := i.Currency.Validate(); err != nil { + errs = append(errs, fmt.Errorf("currency: %w", err)) + } +// ... +``` + + diff --git a/pkg/clock/CLAUDE.md b/pkg/clock/CLAUDE.md new file mode 100644 index 0000000000..1ff7bbafda --- /dev/null +++ b/pkg/clock/CLAUDE.md @@ -0,0 +1,43 @@ +# clock + + + +> Mockable global clock so time-dependent code (billing periods, entitlement resets, subscription cadences) can be deterministically controlled in tests. A massive dependency magnet (~100 in-edges) — every package that reads 'current time' should call clock.Now() rather than time.Now(). + +## Patterns + +**Read time via clock.Now()** — Production code that needs the current time must call clock.Now(), never time.Now() directly, so tests can freeze or drift the clock. (`now := clock.Now()`) +**Atomic global state, no struct** — The clock is package-level mutable state (drift, frozen, frozenTime) guarded by sync/atomic. There is no Clock instance to inject; all access is via package functions. (`atomic.StoreInt32(&frozen, 1); frozenTime.Store(t)`) +**Strip monotonic reading** — Now() calls .Round(0) on returned times to remove the monotonic clock reading, keeping wall-clock-only timestamps for stable comparisons/serialization. (`return t.Round(0)`) +**Freeze must be paired with UnFreeze** — Tests calling FreezeTime(t) must defer UnFreeze() in the same scope so frozen time does not leak into later subtests (project-wide rule in AGENTS.md). (`clock.FreezeTime(t); defer clock.UnFreeze()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `clock.go` | Entire implementation: Now, SetTime (drift-based offset), ResetTime, FreezeTime (hard pin), UnFreeze. | SetTime sets a relative drift (clock keeps advancing), FreezeTime pins an absolute instant (clock stops). They are different mechanisms — pair SetTime with ResetTime, FreezeTime with UnFreeze. | +| `clock_test.go` | Demonstrates SetTime/ResetTime usage with testutils.GetRFC3339Time. | Because drift mode keeps ticking, assertions use a tolerance (diff < time.Second) rather than exact equality. | + +## Anti-Patterns + +- Calling time.Now() in production code instead of clock.Now() — breaks deterministic tests. +- FreezeTime without a deferred UnFreeze, leaking frozen time into other tests. +- Adding a struct-based Clock or injecting a clock instance — this package is intentionally global package-level state. +- Mixing SetTime/FreezeTime modes without resetting the previous one. + +## Decisions + +- **Global package-level clock guarded by sync/atomic rather than dependency injection.** — Avoids threading a Clock interface through every constructor in a ~100-importer codebase; atomics keep it goroutine-safe for parallel tests. +- **Two override modes: relative drift (SetTime) and absolute freeze (FreezeTime).** — Drift lets time still advance for realistic flows; freeze pins an exact instant for precise period/boundary assertions. + +## Example: Deterministically pin current time in a test + +``` +import "github.com/openmeterio/openmeter/pkg/clock" + +clock.FreezeTime(testutils.GetRFC3339Time(t, "2024-06-30T15:39:00Z")) +defer clock.UnFreeze() +now := clock.Now() +``` + + diff --git a/pkg/cmpx/CLAUDE.md b/pkg/cmpx/CLAUDE.md new file mode 100644 index 0000000000..d4422a7b53 --- /dev/null +++ b/pkg/cmpx/CLAUDE.md @@ -0,0 +1,26 @@ +# cmpx + + + +> Tiny generics helper exposing a Comparable[T] interface and a Compare wrapper that delegates to a type's own Compare(T) int method. Used to order domain values deterministically (e.g. ledger collector). + +## Patterns + +**Self-comparing types** — Types orderable via cmpx must implement Comparable[T] with a Compare(T) int method returning the standard -1/0/1 contract; Compare[T] just forwards to it. (`func Compare[T Comparable[T]](left, right T) int { return left.Compare(right) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `compare.go` | Defines Comparable[T any] interface and the generic Compare function. | Compare assumes left.Compare(right) follows the standard tri-state ordering; a non-conforming Compare implementation silently corrupts sorts. | + +## Anti-Patterns + +- Adding concrete comparison logic here — this package only abstracts over a type's own Compare method. +- Importing heavy dependencies; keep this dependency-free. + +## Decisions + +- **Delegate ordering to the value's own Compare method rather than reimplementing comparators.** — Lets domain types own their ordering semantics while generic algorithms remain type-agnostic. + + diff --git a/pkg/contextx/CLAUDE.md b/pkg/contextx/CLAUDE.md new file mode 100644 index 0000000000..59537e1205 --- /dev/null +++ b/pkg/contextx/CLAUDE.md @@ -0,0 +1,38 @@ +# contextx + + + +> Context-carried structured attributes (via peterbourgon/ctxdata) plus an slog.Handler that automatically emits those attributes on every log record. Bridges request-scoped context data into structured logs. + +## Patterns + +**Attach attrs via WithAttr/WithAttrs** — Add request-scoped key/values with WithAttr(ctx, key, value) or WithAttrs(ctx, map); both lazily initialize the ctxdata store if absent. (`ctx = contextx.WithAttr(ctx, "namespace", ns)`) +**Wrap slog handler to drain ctxdata** — Wrap the base slog.Handler with contextx.NewLogHandler so every Handle() pulls ctxdata.From(ctx).GetAllMap() and adds them as record attrs. (`logger := slog.New(contextx.NewLogHandler(baseHandler))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `attr.go` | WithAttr / WithAttrs store key-values into the ctxdata container on the context. | Set errors are intentionally ignored (_ = d.Set). Returns a new ctx when the store was just created — always use the returned context. | +| `log.go` | Handler implementing slog.Handler that injects all ctxdata entries into each log record. | Handle calls ctxdata.From(ctx) without a nil check before GetAllMap(); records logged with a context lacking a ctxdata store rely on ctxdata returning a usable value. | + +## Anti-Patterns + +- Logging with a raw slog handler instead of the contextx-wrapped one, losing context attributes. +- Discarding the context returned by WithAttr/WithAttrs (the store may have just been created on it). + +## Decisions + +- **Carry log attributes on the context and drain them in a custom slog.Handler.** — Lets deep call sites enrich logs (namespace, request ids) without threading a logger and without per-call WithAttrs at every log statement. + +## Example: Enrich context then have logs auto-include the attribute + +``` +import "github.com/openmeterio/openmeter/pkg/contextx" + +logger := slog.New(contextx.NewLogHandler(base)) +ctx = contextx.WithAttr(ctx, "namespace", ns) +logger.InfoContext(ctx, "created") // record carries namespace attr +``` + + diff --git a/pkg/convert/CLAUDE.md b/pkg/convert/CLAUDE.md new file mode 100644 index 0000000000..6db8b2e1f3 --- /dev/null +++ b/pkg/convert/CLAUDE.md @@ -0,0 +1,37 @@ +# convert + + + +> Generic pointer/value and time conversion helpers used heavily by API<->domain<->DB mapping code. Notably provides empty-aware pointer wrappers for maps and slices that lo.EmptyableToPtr handles incorrectly. + +## Patterns + +**Empty-aware container pointers** — Use MapToPointer / SliceToPointer to convert maps/slices to pointers, returning nil when empty — these exist specifically because lo.EmptyableToPtr mishandles maps and slices. (`field := convert.SliceToPointer(items) // nil if len==0`) +**Nil-safe dereference helpers** — SafeDeRef(ptr, fn) and DerefHeaderPtr guard nil before applying transforms; SafeToUTC/TimePtrIn wrap SafeDeRef for *time.Time conversions. (`utc := convert.SafeToUTC(t)`) +**Underlying-string conversions** — ToStringLike converts between distinct ~string types via pointers; StringerPtrToStringPtr turns a *Stringer into *string, both nil-preserving. (`s := convert.StringerPtrToStringPtr(code)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ptr.go` | Pointer helpers: ToPointer, MapToPointer, SliceToPointer, ToStringLike, SafeDeRef, SafeToUTC, DerefHeaderPtr, StringerPtrToStringPtr. | ToPointer duplicates lo.ToPtr; prefer lo.ToPtr in new code (AGENTS.md) and reserve this package for the empty-aware/nil-safe helpers lo lacks. | +| `time.go` | TimePtrIn converts a *time.Time into a given *time.Location, nil-preserving. | Returns nil for nil input — callers must handle the nil result. | + +## Anti-Patterns + +- Using lo.EmptyableToPtr on maps/slices — use MapToPointer/SliceToPointer which correctly return nil on empty. +- Adding a plain ToPointer call when lo.ToPtr already covers it (avoid local pointer-wrapper proliferation). + +## Decisions + +- **Maintain custom MapToPointer/SliceToPointer despite samber/lo availability.** — lo.EmptyableToPtr does not treat empty maps/slices as nil, which is required for omitempty-style API mapping. + +## Example: Map a possibly-empty slice to an omittable API field + +``` +import "github.com/openmeterio/openmeter/pkg/convert" + +out.Items = convert.SliceToPointer(domain.Items) // nil when empty +``` + + diff --git a/pkg/currencyx/CLAUDE.md b/pkg/currencyx/CLAUDE.md new file mode 100644 index 0000000000..eb524ed742 --- /dev/null +++ b/pkg/currencyx/CLAUDE.md @@ -0,0 +1,45 @@ +# currencyx + + + +> Currency primitives layered on invopop/gobl: a Code (ISO 4217) type used directly in the Ent schema, a Calculator that resolves currency precision once, and largest-remainder proportional allocation of currency amounts across weighted or capped buckets. + +## Patterns + +**Resolve a Calculator once, reuse it** — Get a Calculator via Code(code).Calculator() so the gobl currency Def is resolved a single time; downstream rounding/allocation assumes Def is non-nil and valid. (`calc, err := currencyx.Code("USD").Calculator()`) +**Round to currency subunits** — Use Calculator.RoundToPrecision / IsRoundedToPrecision (driven by Def.Subunits) for all currency rounding — USD=2 decimals, JPY=0, etc. (`amt = calc.RoundToPrecision(amt)`) +**Largest-remainder allocation** — AllocateByWeight (dimensionless weights) and AllocateByAmount (amount buckets that double as caps) split an amount with floor + remainder distribution at currency precision; both omit zero allocations and accept an optional CompareKey tie-breaker for determinism. (`allocs, err := currencyx.AllocateByWeight(calc, input)`) +**Aggregate validation errors with errors.Join** — validateWeightedAllocationInput / validateAmountAllocationInput collect all issues into []error and return errors.Join, matching the project Validate() convention. (`return errors.Join(errs...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `currency.go` | Code type (alias of gobl currency.Code) + Calculator with Validate/RoundToPrecision/IsRoundedToPrecision. | Calculator.RoundToPrecision/IsRoundedToPrecision dereference Def without nil-checking; only construct Calculator via Code.Calculator() (or validate first). The zero-value Calculator{} is invalid. | +| `allocation.go` | AllocateByWeight / AllocateByAmount and their input/result structs plus validators and currencyUnit helper. | Inputs must already be rounded to currency precision and amount non-negative; AllocateByAmount errors if it cannot distribute the remainder without exceeding item caps, and rejects amount > total item amount. | + +## Anti-Patterns + +- Constructing Calculator{} directly and calling RoundToPrecision — Def is nil and will panic. +- Rounding currency amounts with ad-hoc decimal.Round instead of Calculator.RoundToPrecision (ignores per-currency subunits like JPY). +- Passing unrounded amounts to AllocateBy* — validation rejects them. +- Returning on the first validation error instead of joining all issues. + +## Decisions + +- **Calculator caches the gobl currency.Def so precision is resolved once and assumed valid.** — Avoids repeated currency.Get lookups and error handling across the many billing/ledger call sites that round amounts. +- **Allocation uses the largest-remainder quota method with an optional deterministic CompareKey.** — Guarantees allocated parts sum exactly to the input amount at currency precision while keeping results stable/reproducible across runs. + +## Example: Proportionally split a currency amount across weighted keys + +``` +import "github.com/openmeterio/openmeter/pkg/currencyx" + +calc, _ := currencyx.Code("USD").Calculator() +allocs, err := currencyx.AllocateByWeight(calc, currencyx.WeightedAllocationInput[string]{ + Amount: amount, // must be rounded to precision + Items: []currencyx.WeightedAllocationItem[string]{{Key: "A", Weight: w1}, {Key: "B", Weight: w2}}, +}) +``` + + diff --git a/pkg/datetime/CLAUDE.md b/pkg/datetime/CLAUDE.md new file mode 100644 index 0000000000..1d6770e13f --- /dev/null +++ b/pkg/datetime/CLAUDE.md @@ -0,0 +1,52 @@ +# datetime + + + +> Custom datetime/duration value types layered over the standard library, github.com/rickb777/period, and govalues/decimal. Provides DateTime (RFC9557-aware time.Time wrapper) and ISODuration with calendar-correct, no-overflow date arithmetic used across billing, subscription, and entitlement period math. + +## Patterns + +**DateTime wraps time.Time, never replaces it** — DateTime embeds time.Time so all stdlib methods pass through; only Format/Parse/Add behavior is overridden. Construct with NewDateTime(t) and unwrap with AsTime(). (`type DateTime struct { time.Time }; func (t DateTime) AsTime() time.Time { return t.Time }`) +**No-overflow calendar arithmetic via shiftClockTo** — AddYearsNoOverflow/AddMonthsNoOverflow clamp to the last valid day of the target month (Jan 31 + 1M = Feb 28), and all Add* helpers route through shiftClockTo to mimic time.Add wall-clock behavior across DST. (`dt.AddYearsNoOverflow(y).AddMonthsNoOverflow(m).AddWeeks(w).AddDays(d)...`) +**ISODuration wraps period.Period** — ISODuration embeds period.Period; build with NewISODuration(y,m,w,d,h,min,s) and round-trip strings through ISODurationString. Arithmetic (Add/Subtract/Mul) returns wrapped errors via NewDurationArithmeticError. (`type ISODuration struct { period.Period }`) +**String types for ISO8601 wire form** — ISODurationString is the serialized form; use .Parse()/.ParsePtrOrNil() to get an ISODuration and .ISOString()/.ISOStringPtrOrNil() to go back. Nil-safe pointer variants exist for optional fields. (`d, err := ISODurationString("P1Y2M").Parse()`) +**Multi-format Parse with RFC9557 bracket timezone** — Parse() accepts RFC3339, ISO8601 (incl. Zulu/fractional), and RFC9557 'ts[Area/City]' forms; it strictly rejects malformed brackets (nested, trailing text, empty tz). DateTime.UnmarshalJSON delegates to Parse. (`Parse("2021-07-01T12:34:56-04:00[America/New_York]")`) +**Errors are constructors in errors.go** — All error values come from New*Error helpers (NewDateTimeParseError, NewDurationParseError, NewDurationArithmeticError, NewInvalidTimezoneError) wrapping the underlying cause with %w; do not inline fmt.Errorf for these cases. (`return NewDurationParseError(string(i), err)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `datetime.go` | DateTime type + Add(ISODuration) and the no-overflow Add* arithmetic helpers | MarshalJSON emits RFC3339 only (drops bracket tz and sub-second precision); shiftClockTo is the load-bearing helper — bypassing it breaks DST correctness | +| `duration.go` | ISODuration type, arithmetic, DivisibleBy, AddTo, convertPeriodToSeconds | DivisibleBy brute-forces 28/29/30/31-day months x 23/24/25-hour days, so 'P1Y divisible by PT8H' is intentionally false; AddTo always returns precise=true (kept for back-compat) | +| `parse.go` | Multi-layout Parse entry point | Strict bracket validation — any text after ']' or empty/nested brackets is an error; timezone is loaded via time.LoadLocation so unknown zones fail | +| `constants.go` | RFC9557/ISO8601 layout strings | layoutTZName is the literal 'Europe/Budapest' placeholder swapped out during Format; do not treat it as a default timezone | +| `format.go` | Format() with RFC9557 timezone-name substitution | Falls back to ISO8601 layouts (fallbackRFC9557FormatLayout) when location string is empty | +| `durationstring.go` | ISODurationString parse/serialize helpers incl. nil-safe pointer variants | Parse() wraps failures in NewDurationParseError, not the raw period error | +| `interval.go` | Predefined DurationSecond..DurationYear constants | Use these instead of re-constructing NewISODuration for unit durations | +| `testutils.go` | Test helpers MustLoadLocation/MustParseDateTime/MustParseDuration | Non-_test file but test-only; takes *testing.T and calls t.Fatalf | + +## Anti-Patterns + +- Doing calendar math with time.AddDate directly instead of DateTime.Add* — reintroduces month-end overflow bugs the No-overflow helpers exist to prevent +- Constructing time.Time/period.Period values directly and bypassing shiftClockTo, losing DST wall-clock semantics +- Relying on DateTime.MarshalJSON to preserve bracket timezone or nanosecond precision (it serializes RFC3339) +- Inlining fmt.Errorf for parse/arithmetic failures instead of the New*Error constructors +- Treating layoutTZName ('Europe/Budapest') as a real default timezone + +## Decisions + +- **Wrap rickb777/period and govalues/decimal rather than use time.Duration** — time.Duration cannot represent calendar units (months/years) needed for billing periods, and decimal seconds avoid float drift +- **DivisibleBy tests every realistic month/day length combination** — Captures DST and variable-month-length edge cases so subscription cadence validation is conservative and correct + +## Example: Parse an ISO8601 duration and add it to a timestamp with no-overflow calendar math + +``` +import "github.com/openmeterio/openmeter/pkg/datetime" + +d, err := datetime.ISODurationString("P1M").Parse() +if err != nil { return err } +next := datetime.NewDateTime(start).Add(d).AsTime() // 2024-01-31 + P1M = 2024-02-29 +``` + + diff --git a/pkg/defaultx/CLAUDE.md b/pkg/defaultx/CLAUDE.md new file mode 100644 index 0000000000..649a00e14c --- /dev/null +++ b/pkg/defaultx/CLAUDE.md @@ -0,0 +1,22 @@ +# defaultx + + + +> Tiny generic helpers for defaulting optional values: WithDefault dereferences a pointer or returns a fallback, IfZero substitutes a fallback for the zero value. Used mainly in httpdriver/service layers to normalize optional API inputs. + +## Patterns + +**Pointer-or-default for optional fields** — WithDefault[T any](value *T, def T) T returns *value when non-nil, else def. Use for optional API request pointers. (`limit := defaultx.WithDefault(req.Limit, 100)`) +**Zero-or-default for comparable values** — IfZero[T comparable](val, def T) T returns def when val equals the zero value. Use for non-pointer optionals like empty strings. (`currency := defaultx.IfZero(in.Currency, "USD")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `default.go` | Both generic helpers (WithDefault, IfZero) | IfZero requires T comparable; cannot be used on slices/maps/funcs | + +## Anti-Patterns + +- Adding non-trivial logic here — this package is intentionally two stateless generic functions + + diff --git a/pkg/entitydiff/CLAUDE.md b/pkg/entitydiff/CLAUDE.md new file mode 100644 index 0000000000..d186acd831 --- /dev/null +++ b/pkg/entitydiff/CLAUDE.md @@ -0,0 +1,44 @@ +# entitydiff + + + +> Generic three-way diff (Create/Update/Delete) of entity slices keyed by ID, with soft-delete awareness. Backs billing adapter reconciliation of persisted-vs-expected state for entities with and without child entities. + +## Patterns + +**Entity interface contract** — Diffed types must implement Entity (GetID() string, IsDeleted() bool). Empty GetID() means a not-yet-persisted item; IsDeleted() drives delete vs skip decisions. (`type Entity interface { GetID() string; IsDeleted() bool }`) +**DiffByID for entities with children** — DiffByID(DiffByIDInput[T]) compares only by ID (never field equality) and dispatches HandleCreate/HandleUpdate/HandleDelete callbacks, joining their errors with errors.Join. Use when entities own children that need recursive handling. (`entitydiff.DiffByID(entitydiff.DiffByIDInput[Line]{DBState: db, ExpectedState: exp, HandleUpdate: ...})`) +**DiffByIDEqualer for leaf entities** — DiffByIDEqualer[T EqualerEntity[T]](expected, db) returns a Diff[T] and only marks an update when PersistedState.Equal(ExpectedState) is false. Use for entities with no children. (`diff := entitydiff.DiffByIDEqualer(expected, dbState)`) +**Soft-delete-aware correlation** — diffByID treats IsDeleted()+no-DB-row as skip, expected-deleted+live-DB-row as Delete (carrying the expected/target state so co-edited fields persist), and DB rows absent from expected as Delete. (`if expected.IsDeleted() && !dbState.IsDeleted() { diff.Delete = append(diff.Delete, expected) }`) +**NestedEntity wrappers carry a parent** — NestedEntity/EqualerNestedEntity wrap a child with its Parent while delegating GetID/IsDeleted/Equal to the child; build with NewEqualersWithParent to diff children while retaining parent context. (`wrapped := entitydiff.NewEqualersWithParent(lines, invoice)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `diff.go` | Diff/DiffUpdate types, diffByID core, DiffByID + DiffByIDEqualer public entry points, Union | The internal diffByID returns UpdateCandidates (unfiltered); only DiffByIDEqualer applies Equal() to drop no-op updates — DiffByID emits every candidate as an update | +| `parent.go` | NestedEntity/EqualerNestedEntity parent-carrying wrappers + NewEqualersWithParent | Equal on the wrapper compares only the embedded Entity, not the Parent | + +## Anti-Patterns + +- Using DiffByIDEqualer for entities with child entities — field equality skips updates whose only change is in children +- Assuming an empty GetID() item will be correlated to a DB row — it is always treated as Create (or skipped if deleted) +- Expecting DiffByID to compare fields; it correlates by ID only and relies on caller callbacks + +## Decisions + +- **Split DiffByID (callback, children) from DiffByIDEqualer (Equal-based, leaf)** — Parent entities need recursive child handling that field equality cannot express, while leaf entities benefit from automatic no-op-update suppression +- **Delete entries carry the expected/target state, not the DB state, for expected-deleted rows** — Co-edited fields (e.g. managedBy flipping to manual alongside deleted_at) must be persisted in the same change + +## Example: Reconcile leaf entities, applying only real updates + +``` +import "github.com/openmeterio/openmeter/pkg/entitydiff" + +diff := entitydiff.DiffByIDEqualer(expectedLines, dbLines) +for _, c := range diff.Create { /* insert */ } +for _, u := range diff.Update { /* update u.ExpectedState */ } +for _, d := range diff.Delete { /* delete */ } +``` + + diff --git a/pkg/equal/CLAUDE.md b/pkg/equal/CLAUDE.md new file mode 100644 index 0000000000..2986c828e9 --- /dev/null +++ b/pkg/equal/CLAUDE.md @@ -0,0 +1,27 @@ +# equal + + + +> Defines the Equaler[T] interface and nil-safe pointer comparison helpers, extracted from pkg/models specifically to avoid an import cycle. Backs equality-based diffing and value comparison across domain types. + +## Patterns + +**Equaler interface duplicated to break a cycle** — Equaler[T any] { Equal(other T) bool } lives here (not only in pkg/models) so low-level packages like pkg/entitydiff can depend on it without importing models. Implement Equal on domain types to satisfy it. (`type Equaler[T any] interface { Equal(other T) bool }`) +**Nil-safe pointer equality helpers** — PtrEqual compares two *T where T is Equaler (both nil equal, one nil unequal); HasherPtrEqual does the same via hasher.Hasher.Hash(). (`equal.PtrEqual(a, b)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `equal.go` | Equaler interface + PtrEqual/HasherPtrEqual | Keep this package dependency-light (only pkg/hasher) — adding heavier imports risks recreating the models import cycle it exists to avoid | + +## Anti-Patterns + +- Importing pkg/models from here — defeats the cycle-breaking purpose of duplicating Equaler +- Adding domain-specific equality logic; this package holds only the generic interface and pointer helpers + +## Decisions + +- **Duplicate Equaler from pkg/models instead of sharing** — Documented in code: avoids a circular dependency between models and packages that need the interface + + diff --git a/pkg/errorsx/CLAUDE.md b/pkg/errorsx/CLAUDE.md new file mode 100644 index 0000000000..d8a9dcd23c --- /dev/null +++ b/pkg/errorsx/CLAUDE.md @@ -0,0 +1,46 @@ +# errorsx + + + +> Cross-cutting error utilities for the HTTP/server layer: prefix annotation that preserves errors.Join trees, a warn-level error wrapper, generated-API-error detection, and slog-based error Handlers implementing httptransport.ErrorHandler. + +## Patterns + +**WithPrefix preserves joined-error structure** — WithPrefix recursively prefixes each branch of an errors.Join tree (only at the top level via the Unwrap() []error interface) instead of flattening, so multi-error messages keep per-error prefixes. (`errorsx.WithPrefix(errors.Join(e1, e2), "prefix")`) +**warnError downgrades log severity** — Wrap an error with NewWarnError to make SlogHandler log it at Warn instead of Error; detected via lo.ErrorsAs[*warnError]. context.Canceled and generated API errors are also logged as warnings. (`return errorsx.NewWarnError(err)`) +**Handler interface mirrors httptransport.ErrorHandler** — Handler { Handle(err); HandleContext(ctx, err) }; SlogHandler (requires injected *slog.Logger) and NopHandler are the impls. Compile-time assertions enforce the interface match. (`var _ httptransport.ErrorHandler = (errorsx.Handler)(nil)`) +**Generated API errors identified by package path** — isAPIError reflects on the error type and walks the unwrap chain (single and []error) comparing PkgPath against api and api/v3 packages, because codegen emits no common base error type. (`reflect.TypeOf(api.InvalidParamFormatError{}).PkgPath()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `errorsx.go` | WithPrefix + warnError/NewWarnError | WithPrefix only recurses when the error implements Unwrap() []error at the top level (deliberate) — wrapping a join with fmt.Errorf hides the inner errors from per-branch prefixing | +| `handler.go` | Handler interface, SlogHandler, NopHandler | SlogHandler requires an injected logger (no slog.Default fallback per project convention); severity downgrade order is context.Canceled, then isAPIError, then warnError, else Error | +| `helpers.go` | isAPIError/isErrorFromPackages reflection-based detection | Detection is by reflect PkgPath, so it breaks if generated error types move packages; both api and api/v3 must be listed | +| `errorsx_test.go` | WithPrefix tree-preservation tests | Encodes the non-top-level flattening behavior as expected output | +| `helpers_test.go` | isAPIError detection tests for legacy/v3/wrapped/joined errors | Asserts wrapped and joined API errors are still detected | + +## Anti-Patterns + +- Using slog.Default() to build SlogHandler — the logger must be injected explicitly per project convention +- Flattening errors.Join before WithPrefix (e.g. via fmt.Errorf %w) — loses per-error prefixing +- Hardcoding new API error type detection instead of extending apiErrorPackages with the generating package's path + +## Decisions + +- **Detect generated API errors by reflecting on package path** — oapi-codegen output provides no shared base error or marker interface, so package matching is the most maintainable signal +- **Provide a warn-level error wrapper and treat API/cancellation errors as warnings** — Keeps expected client-side and lifecycle errors out of error-level logs and alerting + +## Example: Build a server error handler that logs API/cancellation/warn errors at Warn level + +``` +import ( + "github.com/openmeterio/openmeter/pkg/errorsx" +) + +h := errorsx.NewSlogHandler(logger) // injected *slog.Logger +h.HandleContext(ctx, errorsx.NewWarnError(err)) // logged at Warn +``` + + diff --git a/pkg/expand/CLAUDE.md b/pkg/expand/CLAUDE.md new file mode 100644 index 0000000000..dbabf9b18d --- /dev/null +++ b/pkg/expand/CLAUDE.md @@ -0,0 +1,29 @@ +# expand + + + +> Single-file generic helper for validated, immutable expand-option lists (the `?expand=` query semantics). `Expand[T]` is a slice of self-describing enum-like values that knows its own legal value set via the `Expandable[T]` interface. + +## Patterns + +**Self-describing expandable type** — T must satisfy `Expandable[T]` = `comparable` + `Values() []T`; validation and enumeration are driven off `empty.Values()`, never a hard-coded list (`type Expand[T Expandable[T]] []T; values := (*new(T)).Values()`) +**Immutable mutators return clones** — `With`, `Without`, `SetOrUnsetIf` never mutate the receiver — they `Clone()` first (copy into a new slice) and return the new value (`func (e Expand[T]) With(v T) Expand[T] { cloned := e.Clone(); ... }`) +**Validate joins per-item errors** — `Validate()` accumulates `var errs []error` and returns `errors.Join(errs...)`; one error per invalid value rather than failing fast (`errs = append(errs, fmt.Errorf("invalid expand value: %v", item)); return errors.Join(errs...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `expand.go` | Whole package: `Expand[T]` slice type plus `Validate`, `Has`, `Clone`, `With`, `Without`, `SetOrUnsetIf` | `With` dedupes (no-op if value present); `Without` uses `lo.Filter` and does NOT clone first — but it returns a new slice so the receiver is still untouched | + +## Anti-Patterns + +- Mutating an Expand slice in place instead of using the clone-returning mutators +- Hard-coding the valid value list anywhere instead of relying on T.Values() +- Returning on the first invalid item in Validate instead of joining all errors + +## Decisions + +- **Validation source-of-truth is the type's own Values() method** — Keeps the legal expand set co-located with the enum type, so new expand values can never drift out of sync with the validator + + diff --git a/pkg/featuregate/CLAUDE.md b/pkg/featuregate/CLAUDE.md new file mode 100644 index 0000000000..5f1ccecc99 --- /dev/null +++ b/pkg/featuregate/CLAUDE.md @@ -0,0 +1,27 @@ +# featuregate + + + +> Minimal feature-gate abstraction: a one-method `Gate` interface plus a `Noop` implementation that always allows. It is the seam where real flag backends (LaunchDarkly, etc.) plug into namespace/flag boolean evaluation. + +## Patterns + +**Single-method Gate interface** — `Gate.EvaluateBool(namespace, flag string, defaultValue bool) (bool, error)` is the only contract; implementations live elsewhere and are injected (`type Gate interface { EvaluateBool(namespace, flag string, defaultValue bool) (bool, error) }`) +**Noop returns true (open by default)** — `NewNoop()` yields `Noop{}` whose `EvaluateBool` always returns `(true, nil)` — when gating is disabled, features are ON (`func (n Noop) EvaluateBool(string, string, bool) (bool, error) { return true, nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `featuregate.go` | Defines `Gate`, `NewNoop()`, and the `Noop` struct | Noop ignores the supplied defaultValue and always returns true; do not assume the default is honored when wiring Noop in cmd/server / app/common | + +## Anti-Patterns + +- Adding business logic to Noop — it must stay a trivial always-true stub +- Widening the Gate interface here instead of composing additional interfaces at the call site + +## Decisions + +- **Keep the interface to a single EvaluateBool method** — Lets every consumer (server, billing-worker, jobs, productcatalog http) depend on a tiny seam and swap real vs noop backends without touching call sites + + diff --git a/pkg/ffx/CLAUDE.md b/pkg/ffx/CLAUDE.md new file mode 100644 index 0000000000..7fb5fe19b0 --- /dev/null +++ b/pkg/ffx/CLAUDE.md @@ -0,0 +1,32 @@ +# ffx + + + +> Lightweight feature-flag service (`ffx` = feature-flag-x) keyed by `Feature` string, with three `Service` implementations: context-carried access, static config, and a test composite. Distinct from pkg/featuregate — this resolves per-feature booleans from an `AccessConfig` map carried on the request context. + +## Patterns + +**Service interface + multiple impls** — All implementations satisfy `Service.IsFeatureEnabled(ctx, Feature) (bool, error)`; pick via constructor: `NewContextService`, `NewStaticService`, `NewTestContextService` (`var _ Service = &staticService{}`) +**Context-carried access config** — `SetAccessOnContext`/`GetAccessFromContext` stash an `AccessConfig` under unexported `accessContextKey`; missing or nil access yields `ErrContextMissing` (`ctx = ffx.SetAccessOnContext(ctx, ffx.AccessConfig{feat: true})`) +**Unknown feature is an error, not false** — Both contextService and staticService return an explicit `feature %s not found` error when the feature key is absent — callers must distinguish disabled from unknown (`if !ok { return false, fmt.Errorf("feature %s not found", feature) }`) +**Test composite falls back static-after-context** — `testContextService` tries the context service first and only consults the static default when the context lookup errored (`v, err := s.contextService.IsFeatureEnabled(...); if err == nil { return v, nil }; return s.staticService....`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `featureflag.go` | Core types: `Feature string`, `Service` interface, `AccessConfig map[Feature]bool` with `Merge` | `AccessConfig.Merge` mutates the receiver in place (writes other's keys into c) and also returns it — aliasing surprises | +| `context.go` | `contextService` (reads AccessConfig from ctx) + `testContextService` composite + ctx get/set helpers | GetAccessFromContext treats both a missing key and a nil AccessConfig as ErrContextMissing | +| `static.go` | `staticService` backed by a fixed AccessConfig, via `NewStaticService` | No fallback — an absent feature key always errors | + +## Anti-Patterns + +- Treating a not-found feature as disabled instead of handling the returned error +- Relying on AccessConfig.Merge being non-mutating — it overwrites the receiver +- Using NewTestContextService outside tests as the production resolver + +## Decisions + +- **Separate static vs context-carried services behind one Service interface** — Lets request-scoped access (multi-tenant) override a static default while keeping consumers (subscription, billing) depending only on Service + + diff --git a/pkg/filter/CLAUDE.md b/pkg/filter/CLAUDE.md new file mode 100644 index 0000000000..59833a249b --- /dev/null +++ b/pkg/filter/CLAUDE.md @@ -0,0 +1,46 @@ +# filter + + + +> The codebase's reusable AIP-style query-filter primitives: typed per-field filter structs (`FilterString`, `FilterInteger`, `FilterFloat`, `FilterTime`, `FilterTimeUnix`, `FilterBoolean`, `FilterULID`) using MongoDB-like `$eq/$ne/$in/$like/$and/$or` JSON tags, each able to validate itself and emit both Ent selector predicates and go-sqlbuilder WHERE expressions. Heavily depended on (~53 in-edges) by v3 handlers and adapters. + +## Patterns + +**Filter interface contract** — Every filter type satisfies `Filter`: `Validate()`, `ValidateWithComplexity(maxDepth)`, `Select(field) func(*sql.Selector)`, `SelectWhereExpr(field, *sqlbuilder.SelectBuilder) string`, `IsEmpty()`. Compile-time `var _ Filter = (*FilterX)(nil)` assertions enforce this (`var _ Filter = (*FilterString)(nil)`) +**Dual SQL emission, single operator per filter** — `Select` (Ent dialect/sql) and `SelectWhereExpr` (huandu/go-sqlbuilder) must produce equivalent SQL; exactly one operator field may be set or validation returns ErrFilterMultipleOperators (`validateSingleOperator`) (`case f.Eq != nil: return sql.FieldEQ(field, *f.Eq)`) +**Public Validate wraps once via models** — Public `Validate`/`ValidateWithComplexity` call an internal `validateWithComplexity` that returns raw sentinel errors, then wrap exactly once with `models.NewNillableGenericValidationError` (`return models.NewNillableGenericValidationError(f.validateWithComplexity(math.MaxInt))`) +**Recursive And/Or with depth budget** — `$and`/`$or` are `*[]FilterX`; recursion decrements maxDepth and returns ErrFilterComplexityExceeded at <=0; And/Or branches build via sql.AndPredicates/OrPredicates and skip nil predicates (`for _, child := range lo.FromPtr(f.And) { if err := child.validateWithComplexity(maxDepth-1); err != nil { return err } }`) +**LIKE metacharacter escaping for Contains** — `Contains`/`Ncontains` are literal substring matches built through `ContainsPattern` -> `EscapeLikePattern` which escapes \ % _; never hand-build a LIKE pattern from user input (`return q.ILike(field, ContainsPattern(*f.Contains))`) +**In-memory Match mirrors SQL semantics** — `FilterString.Match`/`matches` evaluate the filter against a Go value (Contains is case-insensitive, Like/Ilike return ErrOperationNotSupported); nil or empty filter matches everything (`func (f *FilterString) Match(value string) (bool, error) { if f == nil || f.IsEmpty() { return true, nil } ... }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `filter.go` | All filter types, the `Filter` interface, sentinel errors, shared helpers `validateSingleOperator`, `isEmptyFilter`, `collectStringValues`, and the LIKE helpers `EscapeLikePattern`/`ContainsPattern`/`ReverseContainsPattern` | Select returns nil for empty filters and SelectWhereExpr returns "" — callers must guard before applying; ILIKE in Ent is hand-built via sql.P raw SQL, not a helper, so a new operator needs both Select and SelectWhereExpr branches kept in sync | +| `filter_test.go` | Table-driven parity tests asserting identical results from go-sqlbuilder (`wantExprSQL`/Args) and Ent (`wantEntSQL`/Args) plus escaping/validation cases | Any new operator/filter type must add both branches to the table and assert via assertValidationError (which checks models.IsGenericValidationError + errors.Is) | + +## Anti-Patterns + +- Adding an operator to Select but not SelectWhereExpr (or vice versa) — the two SQL emitters silently diverge +- Building LIKE patterns from raw user input without EscapeLikePattern/ContainsPattern +- Double-wrapping validation errors instead of returning raw sentinels from validateWithComplexity and wrapping once at the public entry +- Allowing multiple operator fields to be set on one filter (must trip validateSingleOperator) +- Skipping the depth budget on recursive $and/$or, enabling unbounded-complexity filters + +## Decisions + +- **Each filter emits both Ent predicates and go-sqlbuilder expressions** — Ent-backed adapters and raw-SQL (e.g. ClickHouse/meter query) paths both need the same filter, so one struct serves both query builders +- **Operator set uses Mongo-style $-prefixed JSON tags** — Matches the AIP-style query-parameter API contract surfaced by api/v3/filters and keeps request decoding mechanical + +## Example: Apply a string filter to an Ent query, guarding empties + +``` +f := filter.FilterString{Contains: lo.ToPtr("needle")} +if err := f.Validate(); err != nil { return err } +if pred := f.Select("name"); pred != nil { + query = query.Where(pred) +} +``` + + diff --git a/pkg/framework/CLAUDE.md b/pkg/framework/CLAUDE.md new file mode 100644 index 0000000000..b8a5e69020 --- /dev/null +++ b/pkg/framework/CLAUDE.md @@ -0,0 +1,33 @@ +# framework + + + +> Structural namespace owning the codebase's foundational framework primitives: the transaction abstraction (transaction, entutils) every adapter builds on, the bottom-up HTTP operation/handler stack (operation, transport/httptransport, commonhttp), distributed locking (lockr), the Postgres driver (pgdriver), and observability wrappers (tracex, clickhouseotel). The constraint that binds all children: these are domain-agnostic foundations — nothing here may import openmeter/* domain packages. + +## Patterns + +**Bottom-up operation then handler (README)** — Business logic is an operation.Operation[Request,Response] func; transport is wired separately via DecodeRequest/EncodeResponse/EncodeError and httptransport.NewHandler. Children operation/, transport/httptransport/, and commonhttp/ each own one stage of this chain. (`httptransport.NewHandler(op, DecodeReq, EncodeResp, EncodeErr, WithErrorHandler(eh), WithOperationName("op"))`) +**Transaction foundation flows up from transaction -> entutils -> adapters** — transaction/ defines Driver + Run/RunWithNoValue and context-carried Driver reuse; entutils/ wraps it in TransactingRepo + TxDriver (savepoints, HijackTx). Domain adapters consume the entutils layer, never Ent's native client.Tx hooks. (`entutils.TransactingRepo(ctx, repo.db, func(ctx, tx) (T, error) { ... })`) +**Domain-agnostic, dependency-magnet foundations** — These packages are imported by nearly the entire tree (entutils 74 in-edges, transaction 70, httptransport 47) but import only stdlib, third-party, and sibling pkg/* utilities — never openmeter/* domains. (`lockr, pgdriver, tracex, operation all consume only pkg/* and external libs`) +**Constructor + Validate config across children** — Stateful primitives (lockr Locker/SessionLocker, pgdriver Driver, clickhouseotel tracer/metrics) are built via New* constructors that validate a Config struct and reject missing deps — never construct the concrete types directly. (`NewLocker(cfg) / NewPostgresDriver(opts...) / clickhouseotel.New(cfg)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `README.md` | Canonical recipe for adding an operation: define Request/Response + operation func, then Decode/Encode/EncodeError functions, then a NewXHandler constructor calling httptransport.NewHandler. | EncodeOperationError must return true only when it fully handled the error; returning false passes the error to the outer ErrorHandler. | + +## Anti-Patterns + +- Importing any openmeter/* domain package from this tree — the framework layer must stay domain-agnostic so every domain can depend on it. +- Bypassing the operation->handler split by putting business logic directly in an http.Handler instead of an operation.Operation wired through httptransport.NewHandler. +- Reaching past entutils to Ent's native client.Tx / onCommit hooks for shared transactions — the savepoint-based entutils/transaction layer is the only sanctioned path. +- Constructing lockr/pgdriver/clickhouseotel primitives directly instead of via their validating New* constructors, skipping dependency and Config validation. +- Using context.WithTimeout to bound PG lock or query waits where the children expose Postgres-side lock_timeout (lockr, pgdriver) instead. + +## Decisions + +- **framework is a structural folder with only README.md at top level; all real code lives in single-purpose child packages.** — Keeps each foundational concern (transaction, transport, locking, driver, tracing) independently importable and prevents a god-package that every domain would import wholesale. +- **The transport stack is split into operation (logic), httptransport (decode/operate/encode), and commonhttp (shared encoders/error mapping) rather than one HTTP package.** — Lets business operations stay transport-free and reusable while RFC-7807/ValidationIssue mapping lives in one shared place. + + diff --git a/pkg/framework/clickhouseotel/CLAUDE.md b/pkg/framework/clickhouseotel/CLAUDE.md new file mode 100644 index 0000000000..0419c9bca8 --- /dev/null +++ b/pkg/framework/clickhouseotel/CLAUDE.md @@ -0,0 +1,40 @@ +# clickhouseotel + + + +> OpenTelemetry instrumentation wrappers around a ClickHouse connection: ClickHouseTracer wraps clickhouse.Conn to span every Query/QueryRow/Exec/AsyncInsert, and ConnPoolMetrics polls Conn.Stats() to emit pool gauges and ping health metrics. + +## Patterns + +**Config struct + Validate() + New constructor** — Each type has a paired XxxConfig with a Validate() error that collects nil-dependency checks into []error and returns errors.Join(errs...); the New constructor calls cfg.Validate() first and returns (T, error). (`func NewConnPoolMetrics(cfg ConnPoolMetricsConfig) (*ConnPoolMetrics, error) { if err := cfg.Validate(); err != nil { return nil, err } ... }`) +**Embedded clickhouse.Conn delegation** — ClickHouseTracer embeds clickhouse.Conn so all un-overridden methods pass through; only the query-executing methods are overridden to add spans. Compile-time assertion var _ clickhouse.Conn = (*ClickHouseTracer)(nil) guards the interface. (`type ClickHouseTracer struct { clickhouse.Conn; Tracer trace.Tracer }`) +**Span-per-query with error recording** — Every wrapped method opens a span with query+args attributes, defers span.End(), and on error calls span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) before returning the original error unchanged. (`ctx, span := c.Tracer.Start(ctx, "clickhouse.Query", trace.WithAttributes(attribute.String("query", query)))`) +**Idempotent start/shutdown via sync.OnceFunc + atomic** — ConnPoolMetrics guards Start with started atomic.Bool (Swap detects double-start) and closes stopChan/doneChan exactly once with sync.OnceFunc; Shutdown signals stopClose then waits on doneChan only if started. (`if m.started.Swap(true) { return errors.New("conn pool metrics already started") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `otel.go` | ClickHouseTracer wrapping clickhouse.Conn; one span per Query/QueryRow/Exec/AsyncInsert; anyToStrings(args...) stringifies args for the span attribute. | args are serialized into span attributes via fmt.Sprintf("%v") — avoid putting secrets in query args. Errors are recorded on the span but returned unmodified; do not swallow them. | +| `connpool.go` | Background poller emitting clickhouse.pool.* gauges (open/idle counts + pct of max) and clickhouse.ping_time_ms / ping_failures_total via a ticker loop in run(). | ping timeout is clamped to <=5s; Shutdown blocks on doneChan, so a hung ping could delay shutdown by up to that timeout. record() is also called once before the first tick so the series exists. | + +## Anti-Patterns + +- Mutating or wrapping the returned error inside the tracer methods — callers expect the underlying clickhouse error semantics; only record it on the span. +- Calling Start twice on ConnPoolMetrics or closing stopChan/doneChan directly instead of via the OnceFunc closers. +- Constructing either type without going through its New constructor (skipping Validate and metric registration). + +## Decisions + +- **ConnPoolMetrics records once immediately before the ticker loop** — Ensures the metric series exists from the moment Start runs rather than only after the first poll interval elapses. +- **Ping timeout is bounded independently of poll interval** — A long poll interval must not let a single ping block shutdown indefinitely, since Shutdown waits for the run loop to drain. + +## Example: Wrap a ClickHouse conn with tracing + +``` +tracer, err := clickhouseotel.NewClickHouseTracer(clickhouseotel.ClickHouseTracerConfig{Tracer: tp.Tracer("clickhouse"), Conn: conn}) +if err != nil { return err } +// tracer is a clickhouse.Conn that spans every query +``` + + diff --git a/pkg/framework/commonhttp/CLAUDE.md b/pkg/framework/commonhttp/CLAUDE.md new file mode 100644 index 0000000000..9b9fcdc1c2 --- /dev/null +++ b/pkg/framework/commonhttp/CLAUDE.md @@ -0,0 +1,49 @@ +# commonhttp + + + +> Shared HTTP request/response plumbing for all v1/v3 handlers: typed JSON/CSV/PlainText/Redirect response encoders, a request body decoder, and the error-encoder chain that maps domain errors and models.ValidationIssue HTTP-status attributes to RFC-7807 status problems. + +## Patterns + +**Generic typed encoders returning encoder.ResponseEncoder[T]** — Encoders are generic over the response type and either are direct encoder functions (JSONResponseEncoder) or factories returning encoder.ResponseEncoder[Response] (JSONResponseEncoderWithStatus, EmptyResponseEncoder, RedirectResponseEncoder). Use these instead of hand-writing w.Write. (`func JSONResponseEncoderWithStatus[Response any](statusCode int) encoder.ResponseEncoder[Response]`) +**Composed error encoder via short-circuit OR** — GenericErrorEncoder chains HandleIssueIfHTTPStatusKnown and HandleErrorIfTypeMatches[*models.GenericXxxError] calls with ||; the first matching mapper writes the response and returns true. Add new mappings by inserting another HandleErrorIfTypeMatches term. (`return HandleIssueIfHTTPStatusKnown(ctx, err, w) || HandleErrorIfTypeMatches[*models.GenericConflictError](ctx, http.StatusConflict, err, w) || ...`) +**ValidationIssue HTTP-status attribute mapping** — Handlers attach commonhttp.WithHTTPStatusCodeAttribute(code) to a models.ValidationIssue; HandleIssueIfHTTPStatusKnown reads that private attribute, groups issues by code, and emits them under the legacy 'validationErrors' extension key while stripping the private status attribute from the response. (`models.NewValidationIssue(code, msg, commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest))`) +**Singular-status prioritization default** — When validation issues carry multiple distinct HTTP status codes, the default HTTPStatusAttributePriorizationBehaviorSingular returns false (declines to map) rather than guessing a status; only a single distinct code is mapped. (`if len(issuesByCodeMap) > 1 { return false }`) +**Errors wrapped as ErrorWithHTTPStatusCode** — NewHTTPError(statusCode, err, extensions...) embeds the error and renders via models.NewStatusProblem(ctx, err, code).Respond(w); ExtendProblem(name, details) adds extension fields. (`NewHTTPError(http.StatusBadRequest, fmt.Errorf("decode json: %w", err))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `errors.go` | Error-to-HTTP mapping: NewHTTPError/ErrorWithHTTPStatusCode, HandleErrorIfTypeMatches[T], HandleIssueIfHTTPStatusKnown, WithHTTPStatusCodeAttribute. | The 'validationErrors' extension key is kept only for backwards compatibility (see FIXME). HandleErrorIfTypeMatches uses lo.ErrorsAs so T must implement error or errors.As would panic. | +| `encoder.go` | All response encoders + GetMediaType (Accept header parse, defaults to application/json) + the two error-encoder helpers DummyErrorEncoder/GenericErrorEncoder. | GetMediaType returns a non-nil error AND a defaulted mediatype on invalid Accept; callers usually ignore the error. RedirectResponseEncoder enforces a 3xx status range. | +| `decoder.go` | JSONRequestBodyDecoder wrapping go-chi/render.DecodeJSON, returning a 400 HTTPError on failure. | Always wrap decode failures as a 400 — do not return the raw render error. | +| `union.go` | Union[Primary, Secondary] JSON marshaller where Option1 takes precedence and an empty union marshals to empty bytes. | MarshalJSON returns []byte{} (not 'null') when both options are nil, which is invalid JSON if embedded directly. | +| `sort.go` | GetSortOrder mapping an optional input value to sortx.Order (asc/desc/none). | Nil input maps to sortx.OrderNone via defaultx.WithDefault. | +| `pagination.go` | Pagination constants: DefaultPageSize=100, MaxPageSize=1000, DefaultPage=1. | Constants only — no validation logic lives here. | + +## Anti-Patterns + +- Hand-writing w.WriteHeader + w.Write in handlers instead of using the typed encoders here. +- Returning raw domain errors from handlers without routing them through GenericErrorEncoder / NewHTTPError so they become RFC-7807 problems. +- Mapping multiple distinct HTTP status codes from one validation-issue set — the singular behavior intentionally declines that. +- Exposing the private httpStatusCodeErrorAttribute to clients (it is stripped before responding; don't re-add it). + +## Decisions + +- **Validation issues carry HTTP status as a private attribute rather than a typed error** — Lets domain layers stay HTTP-agnostic while the encoder layer derives status codes from accumulated issues. +- **Multi-status issue sets are not mapped (return false)** — Avoids arbitrarily picking a status when issues disagree; an outer/default handler decides instead. + +## Example: Wire encoders into a v3 handler + +``` +import "github.com/openmeterio/openmeter/pkg/framework/commonhttp" + +httptransport.NewHandlerWithArgs(resolve, exec, + commonhttp.JSONResponseEncoderWithStatus[CreateResponse](http.StatusCreated), + httptransport.WithErrorEncoder(commonhttp.GenericErrorEncoder()), +) +``` + + diff --git a/pkg/framework/entutils/CLAUDE.md b/pkg/framework/entutils/CLAUDE.md new file mode 100644 index 0000000000..7e037edb52 --- /dev/null +++ b/pkg/framework/entutils/CLAUDE.md @@ -0,0 +1,65 @@ +# entutils + + + +> Shared Ent ORM glue: schema mixins (ResourceMixin/IDMixin/NamespaceMixin/TimeMixin/AnnotationsMixin/CadencedMixin/CustomerAddressMixin), the cross-client savepoint-based transaction layer (TxDriver, TransactingRepo, TxUser/TxCreator), and Postgres-specific value scanners plus raw-SQL JSONB predicate builders. One of the codebase's biggest dependency magnets (74 in-edges); nearly every domain adapter depends on its mixins and transaction helpers. + +## Patterns + +**Transaction-aware repo bodies via TransactingRepo** — Adapter methods wrap their body in TransactingRepo/TransactingRepoWithNoValue so they reuse any tx already in ctx (via GetDriverFromContext) and otherwise run on repo.Self(). The adapter must implement TxUser[T] (WithTx/Self) + TxCreator (Tx). (`return entutils.TransactingRepoWithNoValue(ctx, a, func(ctx context.Context, rep Repo) error { return rep.doWork(ctx) })`) +**Savepoint-based nested transactions** — TxDriver models nesting with Postgres savepoints (txSavepoint.Next/Prev/String -> 's1','s2'). The first SavePoint() is skipped via once.Do; Commit at savepoint level issues Release, at top level issues Commit. Inner rollback only undoes the child scope (transaction_test 'rollback of child scope while keeping contents of parent'). (`t.driver.SavePoint(next.String()); t.currentSavepoint = next`) +**Mixin composition over per-schema fields** — Schemas embed ResourceMixin (= IDMixin+NamespaceMixin+MetadataMixin+TimeMixin + name/description) rather than redeclaring id/namespace/timestamps. UniqueResourceMixin adds KeyMixin plus the (namespace,key,deleted_at) unique index for soft-delete-safe keys. (`func (ResourceMixin) Fields() []ent.Field { fields = append(fields, IDMixin{}.Fields()...); ... }`) +**Getter/Creator/Setter interfaces per mixin** — Each mixin ships paired interfaces (IDMixinGetter/Creator, NamespaceMixinGetter/Creator, TimeMixinGetter/Creator/Updater, AnnotationsMixinGetter/Setter) so generic helpers constrain on capability not concrete entity. InIDOrder and MapTimeMixinFromDB are generic over these. (`func InIDOrder[T InIDOrderAccessor](...) // InIDOrderAccessor = IDMixinGetter + NamespaceMixinGetter`) +**Namespace-isolated ordering with InIDOrder** — InIDOrder reorders query results to match a target id slice, keyed by NamespacedID{namespace,id}; cross-namespace ids never match (returns NewGenericNotFoundError), duplicate results error (ErrDuplicateID), extra results are tolerated. (`out, err := entutils.InIDOrder(namespace, idsInOrder, results)`) +**Microsecond-truncated timestamps** — TimeMixin defaults created_at/updated_at to truncatedNow() = clock.Now().Truncate(time.Microsecond) because Postgres has microsecond precision; never bypass clock.Now() or timestamp-comparison tests fail on CI. (`field.Time("created_at").Default(truncatedNow).Immutable()`) +**Raw-SQL JSONB predicates with empty-set guard** — JSONBIn / JSONBKeyExistsInObject build sql.P selectors by hand (->> , -> '?'); JSONBIn short-circuits to WHERE false when values is empty so it never emits invalid `IN ()`. Postgres-only, JSONB-only, string values only. (`JSONBIn("metadata", "tier", []string{"gold"}) // metadata->>'tier' IN ($1)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `transaction.go` | TxDriver (savepoint state machine), NewTxDriver, TransactingRepo/TransactingRepoWithNoValue, TxUser/TxCreator interfaces, GetDriverFromContext. | Commit/Rollback lock mu and short-circuit on prior t.err; once t.err is set the tx is dead. WithTx must rebuild the adapter via db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()). | +| `mixins.go` | All shared schema mixins + getter/creator/setter interfaces, truncatedNow, MapTimeMixinFromDB, CustomerAddressMixin (prefixed PII address fields for invoice snapshots). | id is char(26) ULID; namespace/key are NotEmpty+Immutable; AnnotationsMixin adds a GIN index. Changing field shapes here forces an Atlas migration across many tables. | +| `idorder.go` | InIDOrder generic reorder/validate helper with ErrNamespaceRequired/ErrIDRequired/ErrDuplicateID/ErrNotFound. | Groups by NamespacedID, so namespace mismatch silently becomes not-found (security boundary); missing ids aggregate into a NewGenericNotFoundError. | +| `mixinhelper.go` | RecursiveMixin[T] for mixins that embed sub-mixins (MixinWithAdditionalMixins.Mixin()); concatenates Fields/Indexes/Edges/Hooks/Interceptors/Annotations. | Policy() only evaluates the base mixin (TODO), not nested mixins. | +| `valuescanner.go` | JSONStringValueScanner[T] — generic field.ValueScannerFunc storing T as JSON text in a NullString column. | Returns zero T on null/invalid; unmarshal errors propagate, so malformed stored JSON fails reads. | +| `pgjsonb.go` | JSONBIn and JSONBKeyExistsInObject raw-SQL selector builders. | Postgres+JSONB only; ->> coerces to string so non-string equality is unsupported; comment warns these may break with joins — unit-test them. | +| `pgulid.go` | ULID Valuer/Scanner storing string ULIDs (not binary) so Postgres treats them as UTF-8; Ptr/Wrap/ULIDPointer helpers. | Use this wrapper, not raw ulid.ULID, when a column should hold the textual ULID. | +| `mapping.go / sort.go` | MapPaged/MapPagedWithErr translate pagination.Result[I]->[O]; GetOrdering maps sortx.Order to []sql.OrderTermOption. | GetOrdering falls back to empty (no ordering) for unrecognized order strings rather than erroring. | + +## Anti-Patterns + +- Hand-rolling SetID/SetNamespace/created_at/timestamps on a schema instead of embedding ResourceMixin/IDMixin/NamespaceMixin/TimeMixin. +- Accepting a raw *entdb.Client in an adapter helper and querying it directly instead of going through TransactingRepo, bypassing the in-context transaction. +- Relying on Ent's native client.Tx + onCommit/onRollback hooks for shared transactions — this layer uses HijackTx/savepoints and ignores those hooks. +- Building JSONB predicates with fmt.Sprintf-interpolated values instead of JSONBIn's parameterized b.Args, or emitting `IN ()` for empty value sets. +- Using time.Now() in schema defaults or test setup instead of clock.Now()/truncatedNow, breaking microsecond-precision timestamp comparisons on CI. + +## Decisions + +- **Cross-client transactions via a hand-written TxDriver + RawEntConfig + HijackTx rather than Ent's per-client Tx.** — Multiple generated Ent clients (db1/db2) must share one underlying transaction; HijackTx exposes the raw config so NewTxClientFromRawConfig can rehydrate any client onto the same tx, with savepoints providing nestable rollback scopes. +- **Store ULIDs as char(26) text and truncate timestamps to microseconds.** — Postgres interprets binary ULIDs as UTF-8 and has microsecond time precision; truncating in Go keeps in-memory results consistent with what Postgres round-trips so tests pass on both macOS and CI. +- **Soft-delete uniqueness approximated by a (namespace,key,deleted_at) unique index in UniqueResourceMixin.** — Ent cannot emit partial `WHERE deleted_at IS NULL` indexes without manual migrations, so deleted_at is folded into the unique key; documented caveat: two same-key deletes in the same microsecond collide. + +## Example: A transaction-aware adapter participating in shared transactions + +``` +func (a *adapter) Self() Repo { return a } + +func (a *adapter) WithTx(ctx context.Context, tx *entutils.TxDriver) Repo { + txClient := db.NewTxClientFromRawConfig(ctx, *tx.GetConfig()) + return &adapter{db: txClient.Client()} +} + +func (a *adapter) Tx(ctx context.Context) (context.Context, transaction.Driver, error) { + txCtx, rawConfig, eDriver, err := a.db.HijackTx(ctx, &sql.TxOptions{ReadOnly: false}) + if err != nil { + return nil, nil, fmt.Errorf("failed to hijack transaction: %w", err) + } + return txCtx, entutils.NewTxDriver(eDriver, rawConfig), nil +} + +// ... +``` + + diff --git a/pkg/framework/entutils/entcursor/CLAUDE.md b/pkg/framework/entutils/entcursor/CLAUDE.md new file mode 100644 index 0000000000..5636ef4686 --- /dev/null +++ b/pkg/framework/entutils/entcursor/CLAUDE.md @@ -0,0 +1,35 @@ +# entcursor + + + +> An Ent codegen extension that attaches a Cursor(ctx, *pagination.Cursor) method to every generated Query type whose node has a created_at field, implementing keyset (cursor) pagination ordered by (created_at asc, id asc). It is registered in the Ent generator pipeline, not called at runtime. + +## Patterns + +**entc.Extension wrapper** — Extension embeds entc.DefaultExtension and overrides Templates() to register one gen.Template parsed from an embedded .tpl file; New() returns *Extension. (`func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate("entcursor").Parse(tmplfile))} }`) +**Embedded template file** — The .tpl is loaded via //go:embed cursor.tpl into var tmplfile string; template logic lives entirely in cursor.tpl, Go file is just registration glue. (`//go:embed cursor.tpl\nvar tmplfile string`) +**created_at gating** — The template only emits Cursor() for nodes that declare a created_at field (it scans $n.Fields). Nodes without created_at get no method. (`{{ range $f := $n.Fields }}{{ if eq $f.Name "created_at" }}{{ $hasCreatedAt = true }}{{ end }}{{ end }}`) +**Keyset ordering invariant** — Cursor pagination always orders by created_at asc, id asc and the WHERE predicate is (created_at > t) OR (created_at = t AND CAST(id AS TEXT) > id). Changing one without the other breaks paging. (`s.OrderBy(sql.Asc(s.C("created_at")), sql.Asc(s.C("id")))`) +**Non-nil empty result** — When no rows match, Items is initialized to make([]*Node, 0), never nil, so callers/JSON get [] not null; NextCursor is only set when len(items) > 0. (`if items == nil { items = make([]*Node, 0) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `cursor.go` | Registers the entcursor template as an entc.Extension via embedded cursor.tpl | Template name string passed to gen.NewTemplate must match the {{ define }} block name in the .tpl | +| `cursor.tpl` | Ent text/template generating the Cursor() method per node with a created_at field | Edits here regenerate code only after re-running Ent codegen; the id comparison casts to TEXT (string ID assumption) and validates cursor before applying | +| `cursor_test.go` | Integration test exercising generated Cursor() against testutils/ent1 example schema on a real Postgres DB | Uses testutils.InitPostgresDB(t); covers first-page, next-page, invalid-cursor error, and empty-result paths | + +## Anti-Patterns + +- Editing the generated Cursor() methods in ent/db output instead of cursor.tpl +- Changing the WHERE predicate or ORDER BY in a way that desyncs them, breaking stable keyset paging +- Returning nil Items for empty results (must be make([]*Node, 0)) +- Assuming Cursor() exists on nodes without a created_at field + +## Decisions + +- **Generate keyset pagination via an Ent template extension rather than hand-writing per-entity** — Uniform cursor semantics across all entities that have created_at without per-package boilerplate +- **Cast id to TEXT in the tiebreaker comparison** — Provides a deterministic total order for the secondary key regardless of the underlying id column type + + diff --git a/pkg/framework/entutils/entdriver/CLAUDE.md b/pkg/framework/entutils/entdriver/CLAUDE.md new file mode 100644 index 0000000000..64f1060787 --- /dev/null +++ b/pkg/framework/entutils/entdriver/CLAUDE.md @@ -0,0 +1,30 @@ +# entdriver + + + +> Wraps an Ent Postgres client + dialect driver pair into a single EntPostgresDriver lifecycle object, providing Driver()/Client() accessors and Clone() for sharing the underlying *sql.DB across multiple Ent clients. The one hand-written runtime glue type tying database/sql to the generated openmeter/ent/db client. + +## Patterns + +**Driver+client pairing** — EntPostgresDriver holds both *entDialectSQL.Driver and *entdb.Client built from the same connection; construct via NewEntPostgresDriver(db *sql.DB) which opens the dialect driver and wraps it in entdb.NewClient. (`driver := entDialectSQL.OpenDB(dialect.Postgres, db); client := entdb.NewClient(entdb.Driver(driver))`) +**Shared-connection Clone** — Clone() reuses d.driver.DB() (the same *sql.DB) to build a fresh driver+client, enabling multiple Ent clients over one pool/connection (used for transaction sharing). (`driver := entDialectSQL.OpenDB(dialect.Postgres, d.driver.DB())`) +**Ordered Close** — Close() closes the client first, then the dialect driver, returning the first error; both resources are owned by this struct. (`if err := d.client.Close(); err != nil { return err }; return d.driver.Close()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `driver.go` | Defines EntPostgresDriver and its New/Clone/Close/Driver/Client methods over openmeter/ent/db | Imports the concrete generated entdb package — this file is the bridge to that codegen output; Clone shares the *sql.DB so closing one driver affects the shared pool | + +## Anti-Patterns + +- Constructing entdb.Client directly in callers instead of through NewEntPostgresDriver, bypassing paired lifecycle +- Closing the shared *sql.DB via one Clone()'d driver while another clone is still in use +- Reordering Close() so the dialect driver closes before the client + +## Decisions + +- **Keep both driver and client in one struct with explicit accessors** — Callers (transaction helpers, testutils, lockr) need either the low-level driver or the typed client from a single owned lifecycle +- **Provide Clone() over the underlying *sql.DB** — Enables shared-transaction patterns where multiple Ent clients operate on the same connection + + diff --git a/pkg/framework/entutils/entexpose/CLAUDE.md b/pkg/framework/entutils/entexpose/CLAUDE.md new file mode 100644 index 0000000000..e55cad8ce7 --- /dev/null +++ b/pkg/framework/entutils/entexpose/CLAUDE.md @@ -0,0 +1,33 @@ +# entexpose + + + +> An Ent codegen extension that exposes generated client internals (driver/config) and adds HijackTx / NewTxClientFromRawConfig so multiple db.Client and db.Tx instances over the same connection can share a single transaction. Must be included in every Ent codegen package that participates in shared transactions. + +## Patterns + +**entc.Extension wrapper** — Identical registration shape to the other entutils extensions: Extension embeds entc.DefaultExtension, Templates() registers the embedded expose.tpl under name 'entexpose', New() returns *Extension. (`gen.MustParse(gen.NewTemplate("entexpose").Parse(tmplfile))`) +**Internal exposure for shared tx** — The template emits Client.GetConfig() returning *entutils.RawEntConfig and an ExposedTxDriver wrapping *txDriver that implements entutils.Transactable (Rollback/Commit/SavePoint/RollbackTo/Release). (`var _ entutils.Transactable = (*ExposedTxDriver)(nil)`) +**HijackTx / rehydrate** — Client.HijackTx begins a tx and returns a RawEntConfig + ExposedTxDriver; NewTxClientFromRawConfig rebuilds a *Tx (with all node clients) from that raw config so a transaction can be shared across Ent codegen packages. (`func (c *Client) HijackTx(ctx, opts) (context.Context, *entutils.RawEntConfig, *ExposedTxDriver, error)`) +**Savepoint via raw SQL** — SavePoint/RollbackTo/Release execute literal SAVEPOINT / ROLLBACK TO / RELEASE SAVEPOINT statements through the txDriver's ExecContext. (`d.Driver.ExecContext(context.Background(), "SAVEPOINT " + name)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entexpose.go` | Registers the entexpose template as an entc.Extension via embedded expose.tpl | Template define name 'expose' vs registration name 'entexpose' — registration uses gen.NewTemplate name, define block is named 'expose' | +| `expose.tpl` | Generates GetConfig, ExposedTxDriver, HijackTx, NewTxClientFromRawConfig into each participating Ent package | Known limitation noted in template TODO: Tx.onRollback/onCommit hooks and intersectors are ignored under shared transactions; HijackTx errors if already inside a txDriver | + +## Anti-Patterns + +- Using shared transactions and relying on Ent Tx onRollback/onCommit hooks (they are ignored by this template) +- Forgetting to include this extension in a new Ent codegen package that must join shared transactions +- Editing the generated GetConfig/HijackTx output instead of expose.tpl +- Calling HijackTx on a client already running inside a transaction (returns an error) + +## Decisions + +- **Expose driver/config internals via template-generated methods on the generated Client** — Cross-package shared transactions require reaching the unexported config/driver that Ent does not export by default +- **Model savepoints with raw SQL through ExposedTxDriver** — Gives entutils.Transactable nested-transaction semantics over a hijacked tx without Ent's native support + + diff --git a/pkg/framework/entutils/entmixinaccessor/CLAUDE.md b/pkg/framework/entutils/entmixinaccessor/CLAUDE.md new file mode 100644 index 0000000000..934439b43b --- /dev/null +++ b/pkg/framework/entutils/entmixinaccessor/CLAUDE.md @@ -0,0 +1,49 @@ +# entmixinaccessor + + + +> An Ent codegen extension (entc.Extension) that injects a Go template generating Get() accessor methods for every field added to schemas via a mixin. It gives mixin-contributed fields (e.g. from ResourceMixin, AnnotationsMixin) uniform getters across all generated entities, so generic code can read shared fields without per-entity casts. + +## Patterns + +**entc.Extension via embedded template** — The extension is a struct embedding entc.DefaultExtension and overriding only Templates(), returning one gen.Template parsed from the embedded .tpl. New() returns *Extension. This matches the shape of sibling extensions (entcursor, entexpose, entpaginate, entsetorclear). (`type Extension struct { entc.DefaultExtension }; func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate("entmixinaccessor").Parse(tmplfile))} }`) +**Template embedded with //go:embed** — Template logic lives in mixinaccessor.tpl, pulled in via `//go:embed mixinaccessor.tpl` into `var tmplfile string` with a blank `_ "embed"` import. No template logic in Go string literals. (`//go:embed mixinaccessor.tpl\nvar tmplfile string`) +**MixedIn-gated generation** — The template emits a getter only when the field/ID position is MixedIn ({{- if and $f.Position $f.Position.MixedIn }}). Schema-native fields are skipped. ID is handled separately via $n.ID.Position.MixedIn because Ent exposes it as $n.ID, not in $n.Fields. (`{{- if and $f.Position $f.Position.MixedIn }}func (e *{{ $n.Name }}) Get{{ $f.StructField }}() ...`) +**Nillable pointer-type fidelity** — Getters for Nillable fields return a pointer type (`{{ if $f.Nillable }}*{{ end }}{{ $f.Type }}`) to match the generated entity field, keeping the accessor signature identical to the struct field. (`func (e *X) GetDeletedAt() *time.Time { return e.DeletedAt }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entmixinaccessor.go` | Extension definition: embeds the template, implements entc.Extension.Templates(), exposes New(). | The gen.NewTemplate name ("entmixinaccessor") must match the {{ define "entmixinaccessor" }} block in the .tpl, or gen.MustParse panics at generate time. | +| `mixinaccessor.tpl` | Codegen template: ranges $.Nodes and $n.Fields, emits Get()/GetID() only for MixedIn positions, calls {{ template "header" $ }}. | Must invoke {{ template "header" $ }} for the standard ent header/package clause. Use $f.StructField (Go field name), not $f.Name (DB column). | + +## Anti-Patterns + +- Editing the generated Get*() methods in openmeter/ent/db/ directly — change this template and run `make generate`. +- Inlining the template as a Go string literal instead of keeping it in mixinaccessor.tpl with //go:embed. +- Generating getters for non-MixedIn (schema-native) fields, which would collide with other accessors. +- Returning a value type for Nillable fields (or vice versa), breaking the signature contract with the entity field. + +## Decisions + +- **Implement accessor generation as a standalone entc extension wired in openmeter/ent/entc.go alongside entcursor/entexpose/entpaginate/entsetorclear.** — Mixin fields are shared across many entities; uniform Get() lets generic code read them without reflection, and an extension keeps it inside the single entc.Generate codegen pass. +- **Gate on Position.MixedIn rather than an explicit field-name list.** — Keeps the template self-maintaining: any new mixin field automatically gets a getter and schema-native fields are never accidentally shadowed. + +## Example: Wiring the extension into the Ent codegen pass (openmeter/ent/entc.go) + +``` +import "github.com/openmeterio/openmeter/pkg/framework/entutils/entmixinaccessor" + +entc.Generate("./schema", &gen.Config{ /* ... */ }, + entc.Extensions( + entcursor.New(), + entexpose.New(), + entmixinaccessor.New(), + entpaginate.New(), + entsetorclear.New(), + ), +) +``` + + diff --git a/pkg/framework/entutils/entpaginate/CLAUDE.md b/pkg/framework/entutils/entpaginate/CLAUDE.md new file mode 100644 index 0000000000..8d08b728f7 --- /dev/null +++ b/pkg/framework/entutils/entpaginate/CLAUDE.md @@ -0,0 +1,34 @@ +# entpaginate + + + +> An Ent codegen extension that attaches an offset/limit Paginate(ctx, pagination.Page) method to every generated Query type, returning pagination.Result with TotalCount and asserting the query satisfies pagination.Paginator. Provides page-number pagination as the counterpart to entcursor's keyset pagination. + +## Patterns + +**entc.Extension wrapper** — Same registration shape as the sibling extensions: Extension embeds entc.DefaultExtension, Templates() registers embedded paginate.tpl under name 'entpaginate', New() returns *Extension. (`gen.MustParse(gen.NewTemplate("entpaginate").Parse(tmplfile))`) +**Clone for count vs page** — Paginate clones the query for the COUNT (clearing Fields and order on the count query) and uses the original for the paged fetch, so total count is computed independently of select/order. (`countQuery := receiver.Clone(); countQuery.ctx.Fields = []string{}; countQuery.order = nil`) +**Zero-page returns all** — If page.IsZero() the method sets offset=0, limit=count and returns all items while still populating TotalCount; empty count short-circuits to Items = make([]*Node,0). (`if page.IsZero() { offset = 0; limit = count }`) +**Paginator type check** — Each node emits a compile-time assertion that *XQuery implements pagination.Paginator[*Node]. (`var _ pagination.Paginator[*Node] = (*XQuery)(nil)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `paginate.go` | Registers the entpaginate template as an entc.Extension via embedded paginate.tpl | Registration name must match the {{ define }} block ('paginate') vs gen.NewTemplate name ('entpaginate') | +| `paginate.tpl` | Generates Paginate() (offset/limit + TotalCount) plus the Paginator interface assertion per node | Manipulates unexported query internals (receiver.ctx.Limit/Offset, .order, .ctx.Fields) — sensitive to Ent codegen internals; resets limit/offset to zero before paging | +| `paginate_test.go` | Integration test of generated Paginate() over testutils/ent1 example schema on real Postgres | Covers ordering, filtering, paging, empty page, and zero-page-returns-all behaviors; uses testutils.InitPostgresDB(t) | + +## Anti-Patterns + +- Editing generated Paginate() methods instead of paginate.tpl +- Returning nil Items for empty results (must be make([]*Node, 0)) +- Assuming Paginate with a zero Page errors instead of returning all items +- Relying on select fields or ordering surviving into the count query (they are cleared) + +## Decisions + +- **Run a separate cloned COUNT query with fields/order stripped** — Total count must be independent of the page's projection and ordering for correct TotalCount +- **Treat a zero Page value as 'return all items'** — Lets callers request the full set through the same API without a special unpaged path + + diff --git a/pkg/framework/entutils/entsetorclear/CLAUDE.md b/pkg/framework/entutils/entsetorclear/CLAUDE.md new file mode 100644 index 0000000000..4b65dbc21f --- /dev/null +++ b/pkg/framework/entutils/entsetorclear/CLAUDE.md @@ -0,0 +1,44 @@ +# entsetorclear + + + +> A code-generation-time Ent extension (entc.Extension) that injects a custom Go template into Ent's generator, emitting SetOrClear convenience methods on every entity updater for optional, non-immutable fields. It exists only to participate in `go generate` for openmeter/ent — it ships no runtime logic. + +## Patterns + +**entc.Extension via embedded template** — Extension embeds entc.DefaultExtension and overrides Templates() to return one gen.Template parsed from the //go:embed'd setorclear.tpl. New() returns *Extension. This is the only public surface. (`func (Extension) Templates() []*gen.Template { return []*gen.Template{gen.MustParse(gen.NewTemplate("entsetorclear").Parse(tmplfile))} }`) +**Template embedded at compile time** — setorclear.tpl is bound to the tmplfile string via `//go:embed setorclear.tpl`; the .tpl file must stay co-located in this package and keep its name, or the embed directive breaks the build. (`//go:embed setorclear.tpl\nvar tmplfile string`) +**Generated method is nil-pointer-driven set/clear** — For each optional non-immutable field the template emits SetOrClear(value *T) on both the bulk updater (UpdateName) and the *One updater: nil value calls Clear(), non-nil calls Set(*value). (`func (u *FooUpdate) SetOrClearBar(value *string) *FooUpdate { if value == nil { return u.ClearBar() } return u.SetBar(*value) }`) +**Views are skipped** — The template guards `{{ if not ($n.IsView) }}` — ent.View schemas have no updaters, so SetOrClear methods are never generated for them. New view-related logic must respect this guard. (`{{ if not ($n.IsView) }} ... {{ end }}`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `setorclear.go` | Defines the entc.Extension wrapper (Extension struct, Templates(), New()) and embeds the template string. | Keep New() returning *Extension — openmeter/ent/entc.go registers it via entsetorclear.New() inside entc.Generate options. Do not add runtime/business logic here; this package runs only during code generation. | +| `setorclear.tpl` | Ent Go-template (text/template + ent gen funcs) that renders the SetOrClear methods into the generated db package. | Must call `{{ template "header" $ }}` so the generated file gets the standard 'Code generated, DO NOT EDIT' header. Only Optional && !Immutable fields are eligible. Both UpdateName and UpdateName+'One' paths must stay in sync (ent has two update paths). | + +## Anti-Patterns + +- Adding runtime application logic here — this package is generator-only and is imported solely by openmeter/ent/entc.go at generate time. +- Renaming or moving setorclear.tpl without updating the //go:embed directive, which silently breaks compilation. +- Removing the `{{ if not ($n.IsView) }}` guard — views lack updaters and would produce invalid generated code. +- Hand-editing the generated SetOrClear methods in openmeter/ent/db; they carry the DO NOT EDIT header and are overwritten by `make generate`. + +## Decisions + +- **Implement set-vs-clear as a generated template method rather than per-field hand-written helpers.** — Optional pointer fields need uniform nil=clear / value=set semantics across every entity; the pattern (sourced from ent issue #1119) auto-applies to all eligible fields and stays in sync as the schema grows. +- **Package the template as an entc.Extension instead of a standalone codegen script.** — Lets openmeter/ent/entc.go register it alongside other Ent generation options in a single entc.Generate invocation. + +## Example: Registering the extension in the Ent generator (openmeter/ent/entc.go). + +``` +import "github.com/openmeterio/openmeter/pkg/framework/entutils/entsetorclear" + +err := entc.Generate("./schema", cfg, entc.Extensions( + entsetorclear.New(), + // ...other extensions +)) +``` + + diff --git a/pkg/framework/entutils/testutils/CLAUDE.md b/pkg/framework/entutils/testutils/CLAUDE.md new file mode 100644 index 0000000000..4b50590ffd --- /dev/null +++ b/pkg/framework/entutils/testutils/CLAUDE.md @@ -0,0 +1,24 @@ +# testutils + + + +> Structural folder holding two standalone Ent codegen fixtures (ent1, ent2) used exclusively to test pkg/framework/entutils transaction and mixin helpers (TransactingRepo, TxDriver, mixins, cursor/paginate) in isolation from the production openmeter/ent schema set. It owns the test-only generated Ent surface, not production code. + +## Patterns + +**Two-client transaction test fixtures** — Children ent1 and ent2 each generate an independent Ent db/ client (Example1, Example2 schemas) so entutils helpers can be exercised across two separate clients in the same test without touching the real schema. (`transaction_test.go imports both testutils/ent1/db and testutils/ent2/db`) +**Deliberate fixture divergence** — ent1 is the feature-complete fixture (entpaginate + entcursor + entexpose); ent2 is intentionally leaner (entexpose only). entcursor/cursor_test.go and entpaginate/paginate_test.go depend on ent1's fuller generated surface. (`entpaginate/paginate_test.go imports testutils/ent1/db only`) + +## Anti-Patterns + +- Adding production schema concerns to these fixtures — they exist only to test entutils helpers, not to mirror openmeter/ent. +- Hand-editing any generated db/ client under ent1 or ent2 instead of editing schema/ and regenerating. +- Collapsing ent1 and ent2 into one fixture — two independent clients are required to test cross-client transaction behavior. +- Forcing ent2 to match ent1's extension list — the leaner ent2 is intentional. + +## Decisions + +- **Keep test-only Ent clients here, fully separate from openmeter/ent.** — Lets entutils transaction/mixin helpers be unit-tested against a tiny stable schema without coupling to the large production schema or its migrations. +- **Maintain two fixtures of differing completeness (ent1 full, ent2 lean).** — ent1 covers paginate/cursor-dependent tests; the second client enables cross-client transaction tests while staying minimal. + + diff --git a/pkg/framework/entutils/testutils/ent1/CLAUDE.md b/pkg/framework/entutils/testutils/ent1/CLAUDE.md new file mode 100644 index 0000000000..3d8daad472 --- /dev/null +++ b/pkg/framework/entutils/testutils/ent1/CLAUDE.md @@ -0,0 +1,34 @@ +# ent1 + + + +> Self-contained Ent codegen package whose `schema/` fixture (Example1) generates a standalone `db/` client used to test entutils transaction/mixin helpers (TransactingRepo, TxDriver, TimeMixin) in isolation from the production openmeter schema set. + +## Patterns + +**Ignored-build codegen driver** — entc.go is a `//go:build ignore` main package invoked by `go generate`; it is never compiled into the package. (`//go:build ignore +package main +func main() { entc.Generate("./schema", &gen.Config{Target: "./db", ...}) }`) +**Generate directive in package file** — generate.go carries the lone `//go:generate go run -mod=mod entc.go` directive; it is the only real source file in the package proper. (`package ent1 +//go:generate go run -mod=mod entc.go`) +**Extension wiring stays in entc.go** — Cursor/expose/paginate extensions are registered here so the generated db client supports the same features the production client tests rely on. (`entc.Extensions(entcursor.New(), entexpose.New(), entpaginate.New())`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entc.go` | Ent codegen entrypoint: targets `./db`, enables FeatureVersionedMigration/Lock/Upsert/ExecQuery, registers entcursor/entexpose/entpaginate extensions. | Must keep the `//go:build ignore` tag and the full extension list — ent1 is the richer fixture (includes entpaginate, unlike ent2). Dropping an extension silently removes generated methods the entutils tests depend on. | +| `generate.go` | Holds the `package ent1` declaration and the `//go:generate` directive that runs entc.go. | Do not move the directive elsewhere or hand-edit the generated `db/`; regenerate via `make generate` / `go generate`. | + +## Anti-Patterns + +- Hand-editing the generated db/ client instead of changing schema/ and regenerating. +- Removing entpaginate/entcursor/entexpose from the extension list when the entutils tests need that generated surface — ent1 intentionally carries the full set. +- Compiling entc.go into the package by removing its `//go:build ignore` tag. + +## Decisions + +- **Keep a tiny standalone Ent client separate from openmeter/ent.** — Lets entutils test its transaction and mixin helpers without importing the large production schema or risking import cycles. +- **ent1 is the feature-complete fixture (includes entpaginate).** — Provides a client exercising cursor + pagination + expose so those entutils sub-packages can be validated; ent2 is the leaner counterpart. + + diff --git a/pkg/framework/entutils/testutils/ent1/schema/CLAUDE.md b/pkg/framework/entutils/testutils/ent1/schema/CLAUDE.md new file mode 100644 index 0000000000..2e4527c91e --- /dev/null +++ b/pkg/framework/entutils/testutils/ent1/schema/CLAUDE.md @@ -0,0 +1,50 @@ +# schema + + + +> Minimal Ent schema fixture used to test the entutils package (mixins, TransactingRepo, TxDriver). The single Example1 schema is the source of truth that the sibling ../db generated client is built from. + +## Patterns + +**Standard Ent schema struct** — Each entity is a struct embedding ent.Schema and implementing the Mixin/Fields/Indexes/Edges methods, even when some return empty slices. (`type Example1 struct { ent.Schema }; func (Example1) Fields() []ent.Field { ... }`) +**Reuse entutils mixins, do not hand-roll timestamps** — Timestamp/audit fields come from entutils mixins (TimeMixin here), not from manually-declared created_at/updated_at fields. (`func (Example1) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.TimeMixin{} } }`) +**String immutable id** — Primary id is a String field marked Unique().Immutable() rather than an int autoincrement. (`field.String("id").Unique().Immutable()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `example1.go` | Defines the Example1 Ent schema (TimeMixin + string id + example_value_1) used as a fixture for entutils tests. | Changing fields requires regenerating ../db via `make generate` (entc.go/generate.go); editing the generated db package directly will be overwritten. | + +## Anti-Patterns + +- Adding production domain fields here — this is a test fixture, not a real entity; real schemas live in openmeter/ent/schema. +- Manually adding created_at/updated_at fields instead of using entutils.TimeMixin. +- Editing the generated ../db client to reflect a schema change instead of running code generation. + +## Decisions + +- **Keep a tiny standalone Ent schema separate from the main openmeter schema set.** — entutils transaction/mixin helpers need a generated Ent client to exercise TransactingRepo/TxDriver in isolation without depending on the full application schema. + +## Example: Defining an Ent schema fixture with an entutils mixin + +``` +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/schema/field" + + "github.com/openmeterio/openmeter/pkg/framework/entutils" +) + +type Example1 struct{ ent.Schema } + +func (Example1) Mixin() []ent.Mixin { return []ent.Mixin{entutils.TimeMixin{}} } + +func (Example1) Fields() []ent.Field { + return []ent.Field{ +// ... +``` + + diff --git a/pkg/framework/entutils/testutils/ent2/CLAUDE.md b/pkg/framework/entutils/testutils/ent2/CLAUDE.md new file mode 100644 index 0000000000..a5246f3d44 --- /dev/null +++ b/pkg/framework/entutils/testutils/ent2/CLAUDE.md @@ -0,0 +1,30 @@ +# ent2 + + + +> Second standalone Ent codegen package (Example2 schema → `db/` client) used alongside ent1 so entutils transaction helpers can be tested across two independent generated clients; deliberately leaner than ent1 (only entexpose, no entcursor/entpaginate). + +## Patterns + +**Ignored-build codegen driver** — entc.go is a `//go:build ignore` main invoked by `go generate`, mirroring ent1 but with a reduced extension set. (`entc.Generate("./schema", &gen.Config{Target: "./db", Package: ".../ent2/db"}, entc.Extensions(entexpose.New()))`) +**Generate directive in package file** — generate.go holds the sole `//go:generate go run -mod=mod entc.go` directive under `package ent2`. (`package ent2 +//go:generate go run -mod=mod entc.go`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `entc.go` | Ent codegen entrypoint for the ent2 client: targets `./db`, enables FeatureVersionedMigration/Lock/Upsert/ExecQuery, registers only entexpose.New(). | Intentionally omits entcursor/entpaginate (unlike ent1). Keep it minimal — this client exists to prove entutils works against a second, differently-configured generated client. | +| `generate.go` | `package ent2` declaration plus the `//go:generate` directive that runs entc.go. | Regenerate db/ via codegen; never hand-edit generated output. | + +## Anti-Patterns + +- Hand-editing the generated ent2/db package instead of editing schema/ and regenerating. +- Adding entcursor/entpaginate here to match ent1 — the divergence is intentional; ent2 is the lean fixture. +- Removing the `//go:build ignore` tag from entc.go and pulling it into the package build. + +## Decisions + +- **Maintain ent2 as a deliberately smaller second client.** — Two distinct generated clients let entutils verify transaction/mixin behavior is not coupled to a single client's feature set or package path. + + diff --git a/pkg/framework/entutils/testutils/ent2/schema/CLAUDE.md b/pkg/framework/entutils/testutils/ent2/schema/CLAUDE.md new file mode 100644 index 0000000000..516a36b767 --- /dev/null +++ b/pkg/framework/entutils/testutils/ent2/schema/CLAUDE.md @@ -0,0 +1,50 @@ +# schema + + + +> Test-fixture Ent schema package defining the Example2 entity used to exercise entutils transaction/mixin helpers against a second generated Ent client (ent2). Not production code — it exists only so testutils can generate db/ and validate cross-client behavior. + +## Patterns + +**Standard Ent schema struct** — Each entity is a struct embedding ent.Schema with the five Ent hook methods (Mixin, Fields, Indexes, Edges). Empty hooks return empty slices, never nil-by-omission. (`type Example2 struct { ent.Schema }; func (Example2) Edges() []ent.Edge { return []ent.Edge{} }`) +**Reuse entutils mixins, don't hand-roll fields** — Shared columns come from entutils mixins (e.g. entutils.TimeMixin{}) returned from Mixin(), not redeclared as fields. This mirrors production schemas under openmeter/ent/schema. (`func (Example2) Mixin() []ent.Mixin { return []ent.Mixin{ entutils.TimeMixin{} } }`) +**Immutable string id** — The primary key is an explicit field.String("id").Unique().Immutable() rather than a default int id. (`field.String("id").Unique().Immutable()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `example2.go` | Defines the Example2 test entity (id + example_value_2 string field, TimeMixin) consumed by the generated ent2/db client. | Field/mixin changes require regenerating ent2/db (the dependent generated package). Keep this aligned with the parallel ent1 fixture so transaction tests cover both clients consistently. | + +## Anti-Patterns + +- Adding business/domain logic here — this is a throwaway test fixture, not a real schema. +- Editing the generated ent2/db package by hand instead of changing this schema and regenerating. +- Returning nil from Indexes()/Edges() instead of empty slices, breaking the established convention. + +## Decisions + +- **Schema lives under pkg/framework/entutils/testutils so transaction helpers can be tested without depending on production openmeter/ent schemas.** — Keeps testutils self-contained and avoids import cycles with real domain packages while still exercising real Ent codegen + entutils mixins. + +## Example: Defining a fixture Ent entity that pulls shared columns from entutils mixins + +``` +package schema + +import ( + "entgo.io/ent" + "entgo.io/ent/schema/field" + + "github.com/openmeterio/openmeter/pkg/framework/entutils" +) + +type Example2 struct{ ent.Schema } + +func (Example2) Mixin() []ent.Mixin { return []ent.Mixin{entutils.TimeMixin{}} } + +func (Example2) Fields() []ent.Field { + return []ent.Field{ +// ... +``` + + diff --git a/pkg/framework/lockr/CLAUDE.md b/pkg/framework/lockr/CLAUDE.md new file mode 100644 index 0000000000..5ab26cfa08 --- /dev/null +++ b/pkg/framework/lockr/CLAUDE.md @@ -0,0 +1,49 @@ +# lockr + + + +> Distributed business-level locking on top of PostgreSQL advisory locks, with two implementations: Locker for transaction-scoped pg_advisory_xact_lock (auto-released at tx end) and SessionLocker for connection-scoped pg_advisory_lock/pg_try_advisory_lock with explicit Releaser callbacks. + +## Patterns + +**Key from scopes with hash64 keyspace** — Locks are keyed by lockr.NewKey(scopes...) where each scope is non-empty and may not contain ':'; the Key.String() joins on ':' and Hash64() xxh3-hashes it into the int64 advisory-lock keyspace. (`key, err := lockr.NewKey("subscription", subID)`) +**Transaction-bound locking via context driver** — Locker.LockForTX requires an active tx in ctx: getTxClient calls entutils.GetDriverFromContext(ctx), rebuilds a *db.Tx from its raw config, and verifies transaction_timestamp() != statement_timestamp() before issuing pg_advisory_xact_lock. Outside a tx it errors. (`tx, err := entutils.GetDriverFromContext(ctx); // 'lockr only works in a transaction'`) +**PG-side lock timeout, not context timeout** — Acquisition timeouts are enforced by the Postgres lock_timeout (set via pgdriver.WithLockTimeout); checkForTimeout maps SQLSTATE 55P03 (pgLockTimeoutErrCode) to ErrLockTimeout. Context-based cancellation is deliberately avoided because it errors the pgx tx. (`if strings.Contains(err.Error(), pgLockTimeoutErrCode) { return ErrLockTimeout }`) +**Session lock + idempotent Releaser** — SessionLocker holds a dedicated *sql.Conn (Start) and returns a Releaser closure per acquisition; the releaser is sync-guarded (mu + done) so calling it twice is a no-op, and PG session advisory locks are reentrant (counter-based, one unlock per lock). (`releaser, err := locker.Lock(ctx, k); defer releaser(ctx)`) +**Constructor config validation** — NewLocker validates LockerConfig.Logger; NewSessionLockr requires both Logger and PostgresDriver and tags the logger with a unique id. (`if c.Logger == nil { return fmt.Errorf("logger is required") }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `locker.go` | Transaction-scoped Locker: LockForTX / LockForTXWithScopes issuing pg_advisory_xact_lock; getTxClient asserts an active pg transaction in ctx. | Only works inside a transaction.Driver-managed tx; returns an error if no driver is in ctx. Locks auto-release at tx commit/rollback — never released manually. | +| `session.go` | Connection-scoped SessionLocker with Lock/TryLock(+WithScopes), Releaser closures, Start (acquires dedicated conn), and Close (releases all + closes conn). | Must call Start before locking and Close when done or session locks dangle on the connection. TryLock returns ErrSessionLockerBusy if another goroutine holds the internal mutex, distinct from ErrNoLockAcquired. | +| `key.go` | Key interface + NewKey scope validation + xxh3 Hash64. | Empty scopes or scopes containing ':' are rejected; collisions are possible since 64-bit hash collapses the keyspace. | +| `var.go` | pgLockTimeoutErrCode = '55P03' (lock_not_available SQLSTATE). | Timeout detection is string-matched against this code; changing it silently breaks ErrLockTimeout mapping. | + +## Anti-Patterns + +- Using context.WithTimeout to bound lock acquisition — pgx cancellation errors the transaction; rely on PG lock_timeout instead. +- Calling Locker.LockForTX outside an active transaction.Driver transaction (it errors). +- Using a SessionLocker without Start, or forgetting Close, leaving advisory locks dangling on the dedicated connection. +- Constructing Locker/SessionLocker directly instead of via NewLocker/NewSessionLockr (skips required-dependency validation). + +## Decisions + +- **Two distinct lockers (tx-scoped vs session-scoped)** — Transaction advisory locks auto-release with the tx (simplest), while session locks survive across statements for longer-lived coordination needing an explicit Releaser. +- **Timeouts use Postgres lock_timeout rather than Go context cancellation** — Cancelling a pgx query mid-lock leaves the connection in an errored tx state (jackc/pgx#2100); the PG-side timeout returns 55P03 while keeping the connection intact. + +## Example: Acquire a transaction-scoped business lock + +``` +import "github.com/openmeterio/openmeter/pkg/framework/lockr" + +transaction.RunWithNoValue(ctx, txCreator, func(ctx context.Context) error { + if err := locker.LockForTXWithScopes(ctx, "subscription", subID); err != nil { + return err // ErrLockTimeout on 55P03 + } + return doWork(ctx) +}) +``` + + diff --git a/pkg/framework/operation/CLAUDE.md b/pkg/framework/operation/CLAUDE.md new file mode 100644 index 0000000000..bc2e11ba31 --- /dev/null +++ b/pkg/framework/operation/CLAUDE.md @@ -0,0 +1,40 @@ +# operation + + + +> A tiny generic abstraction for RPC-style business logic: Operation[Request, Response] is a func(ctx, Request) (Response, error), with Compose/AsNoResponseOperation combinators and a Middleware[Request,Response] chain so transport layers (HTTP handlers) stay decoupled from business logic. + +## Patterns + +**Operation as a generic function type** — Business logic is expressed as the function type Operation[Request, Response]; there is no interface to implement — assign a plain func to the type. AsNoResponseOperation adapts error-only (Delete-style) funcs to Operation[Request, any]. (`type Operation[Request any, Response any] func(ctx context.Context, request Request) (Response, error)`) +**Middleware chaining (outermost first)** — Middleware wraps an Operation; Chain composes middlewares so the first argument is the outermost wrapper and request flow traverses them in declaration order (implemented by reverse-applying the others before the outer). (`chain := operation.Chain[Req, Resp](mwAuth, mwLog); op := chain(handler)`) +**Operation composition** — Compose chains two operations (op1's Response becomes op2's Request), short-circuiting on op1 error with a zero Response. (`operation.Compose(getOp, updateOp)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `operation.go` | Core Operation type + AsNoResponseOperation + Compose. | Compose returns the zero value of Response on op1 error; ensure that zero value is a safe sentinel for callers. | +| `middleware.go` | Middleware type + Chain composition helper. | Chain ordering is outermost-first; reversing the argument order silently reverses middleware execution. | + +## Anti-Patterns + +- Leaking transport concerns (http.Request, response writers) into an Operation — keep them request/response struct only. +- Relying on Compose to surface a partial op1 result on error (it returns the zero Response). + +## Decisions + +- **Operation is a function type, not an interface** — Lets any plain business function be used directly and composed without boilerplate adapter structs (commented-out interface alternatives remain in operation_test.go). + +## Example: Define and middleware-wrap an operation + +``` +import "github.com/openmeterio/openmeter/pkg/framework/operation" + +var create operation.Operation[CreateReq, CreateResp] = func(ctx context.Context, r CreateReq) (CreateResp, error) { + return svc.Create(ctx, r) +} +chained := operation.Chain[CreateReq, CreateResp](loggingMW)(create) +``` + + diff --git a/pkg/framework/pgdriver/CLAUDE.md b/pkg/framework/pgdriver/CLAUDE.md new file mode 100644 index 0000000000..a196855168 --- /dev/null +++ b/pkg/framework/pgdriver/CLAUDE.md @@ -0,0 +1,46 @@ +# pgdriver + + + +> Constructs the application's PostgreSQL driver: NewPostgresDriver builds a pgxpool-backed *sql.DB wrapped with OpenTelemetry (otelsql) tracing/metrics and optional pgxpool observability, exposing Driver.DB() and Driver.Close(). + +## Patterns + +**Functional options via Option interface** — Configuration is supplied through Option values (WithTracerProvider, WithMeterProvider, WithMetricMeter, WithSpanOptions, WithLockTimeout) implemented as optionFunc applied to an internal options struct. (`pgdriver.NewPostgresDriver(ctx, url, pgdriver.WithLockTimeout(3*time.Second))`) +**lock_timeout via pgx RuntimeParams** — WithLockTimeout sets connConfig.ConnConfig.RuntimeParams["lock_timeout"] in milliseconds — this is what lockr relies on for PG-side lock timeouts instead of context cancellation. (`o.connConfig.ConnConfig.RuntimeParams["lock_timeout"] = fmt.Sprintf("%d", timeout.Milliseconds())`) +**pgxpool-backed otelsql DB** — The pool is created via pgxpool.NewWithConfig, then otelsql.OpenDB(pgxstdlib.GetPoolConnector(pool)) wraps it; MaxIdleConns is set to 0 because idle connections are managed by the pgx pool, not database/sql. (`db := otelsql.OpenDB(pgxstdlib.GetPoolConnector(pool), o.otelOptions...); db.SetMaxIdleConns(0)`) +**Opt-in pool metrics** — When WithMetricMeter is provided, pgxpoolobserver.ObservePoolMetrics(meter, pool) registers pool gauges before returning the driver. (`if o.metricMeter != nil { pgxpoolobserver.ObservePoolMetrics(o.metricMeter, pool) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `driver.go` | Entire package: Option machinery, options/Driver structs, and NewPostgresDriver constructor. | db.SetMaxIdleConns(0) is intentional — do not change it; idle pooling is pgx's job. Close() closes the pool (and thus the *sql.DB) — there is no separate DB close. | + +## Anti-Patterns + +- Constructing the *sql.DB or pgxpool directly instead of via NewPostgresDriver (loses otelsql instrumentation and the MaxIdleConns=0 invariant). +- Setting MaxIdleConns to a non-zero value, which double-manages idle connections against the pgx pool. +- Relying on context timeouts for PG lock waits instead of WithLockTimeout (see lockr). + +## Decisions + +- **lock_timeout is configured as a pgx RuntimeParam** — Provides server-side advisory-lock acquisition timeouts (used by lockr) that keep the connection usable, unlike client-side context cancellation. +- **MaxIdleConns forced to 0 on the otelsql DB** — The pgxpool already owns connection lifecycle; letting database/sql also pool idle connections would conflict (per pgx stdlib guidance). + +## Example: Create an instrumented Postgres driver + +``` +import "github.com/openmeterio/openmeter/pkg/framework/pgdriver" + +drv, err := pgdriver.NewPostgresDriver(ctx, dbURL, + pgdriver.WithMeterProvider(mp), + pgdriver.WithMetricMeter(meter), + pgdriver.WithLockTimeout(3*time.Second), +) +if err != nil { return err } +defer drv.Close() +sqlDB := drv.DB() +``` + + diff --git a/pkg/framework/tracex/CLAUDE.md b/pkg/framework/tracex/CLAUDE.md new file mode 100644 index 0000000000..0b4bf5a7fa --- /dev/null +++ b/pkg/framework/tracex/CLAUDE.md @@ -0,0 +1,45 @@ +# tracex + + + +> Generic OpenTelemetry span wrapper that runs a callback inside a started span, recording errors and panics and setting OK/Error status automatically. Used by worker/event-handler paths (subscriptionsync, notification eventhandler/webhook, watermill router) to instrument operations without repeating span boilerplate. + +## Patterns + +**Start-then-Wrap span lifecycle** — Create a span with Start[T] (or StartWithNoValue), then call .Wrap(fn) exactly once; Wrap calls span.End() itself, so callers must NOT defer span.End() separately. (`tracex.Start[Result](ctx, tracer, "my.op").Wrap(func(ctx context.Context) (Result, error) { return doWork(ctx) })`) +**Typed return via generics** — Span[T] is parameterized over the callback's return type T; the value/error pair from fn is passed through verbatim after status is set. (`func Start[T any](ctx, tracer, spanName, opts...) *Span[T]`) +**No-value variant delegates to Span[any]** — SpanNoValue.Wrap builds an internal Span[any] and adapts the error-only callback to (any,error), so there is one source of truth for status/panic handling. (`func (s *SpanNoValue) Wrap(fn func(ctx context.Context) error, opts ...Option) error`) +**Panic re-raised after recording** — On panic the deferred recover records the error with stacktrace attribute, sets Error status, ends the span, then re-panics — it never swallows the panic. (`panic(r) // after s.span.RecordError(...) and s.span.End()`) +**Functional options for status text** — OK status description is configurable only through Option (WithOkStatusDescription); defaultOptions sets it to "success". (`span.Wrap(fn, tracex.WithOkStatusDescription("created"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `tracex.go` | Entire package: Span[T]/SpanNoValue types, Start/StartWithNoValue constructors, Wrap methods, Options + WithOkStatusDescription option. | Wrap ends the span — do not End() it again. The ctx returned by tracer.Start is stored on the Span and passed to fn as the span-scoped context; use that ctx inside fn, not the outer one, or child spans won't nest. | + +## Anti-Patterns + +- Calling span.End() or deferring it around Wrap — Wrap already ends the span, causing double-End. +- Swallowing panics inside the wrapped fn expecting tracex to convert them to errors — tracex re-panics. +- Using the pre-Start ctx inside fn instead of the ctx argument fn receives, breaking span parent/child linkage. + +## Decisions + +- **Wrap owns span.End() and panic recovery** — Centralizes the record-error/set-status/end sequence so instrumented call sites stay one-liners and cannot forget to end spans or record panics. +- **SpanNoValue reuses Span[any] internally** — Avoids duplicating panic/status logic for the common error-only operation shape. + +## Example: Instrument an error-only operation + +``` +import "github.com/openmeterio/openmeter/pkg/framework/tracex" + +func (s *svc) Sync(ctx context.Context) error { + return tracex.StartWithNoValue(ctx, s.tracer, "subscriptionsync.Sync"). + Wrap(func(ctx context.Context) error { + return s.reconcile(ctx) + }) +} +``` + + diff --git a/pkg/framework/transaction/CLAUDE.md b/pkg/framework/transaction/CLAUDE.md new file mode 100644 index 0000000000..8614864b6a --- /dev/null +++ b/pkg/framework/transaction/CLAUDE.md @@ -0,0 +1,50 @@ +# transaction + + + +> Defines the transaction abstraction (Driver/Creator interfaces) and the Run/RunWithNoValue helpers that execute a callback inside a transaction, plus context-key plumbing to store and retrieve the active Driver. This is the foundation that entutils.TransactingRepo and every adapter layer build on for nested, savepoint-based transactions. + +## Patterns + +**Run/RunWithNoValue entrypoints** — All transactional work goes through Run[R] (returns a value) or RunWithNoValue (delegates to Run with a nil any return); never call Driver.Commit/Rollback directly from business code. (`transaction.RunWithNoValue(ctx, a.creator, func(ctx context.Context) error { ... })`) +**Context-carried Driver reuse** — getTx first checks GetDriverFromContext; if a Driver is already present it is reused (joins the outer tx) instead of opening a new one, enabling nested transactions across services. (`if tx, err := GetDriverFromContext(ctx); err == nil { return ctx, tx, nil }`) +**Savepoint per Run invocation** — manage() calls tx.SavePoint() before the callback so nested Run calls roll back to their own savepoint rather than aborting the whole outer transaction. (`err := tx.SavePoint(); result, err := cb(ctx, tx)`) +**Single typed context key** — Driver is stored under the unexported omTransactionContextKey constant; SetDriverOnContext returns DriverConflictError if one already exists rather than overwriting. (`context.WithValue(ctx, contextKey, tx)`) +**Sentinel error types for tx state** — DriverNotFoundError and DriverConflictError are concrete types checked via type assertion (not errors.Is); getTx tolerates DriverNotFoundError silently and Run tolerates DriverConflictError (nested case). (`if _, ok := err.(*DriverConflictError); !ok && err != nil { ... }`) +**Panic rolls back then re-panics** — manage()'s deferred recover rolls the tx back for all downstream WithTx clients and re-panics with a message including debug.Stack() — it does not convert panic to error. (`_ = tx.Rollback(); panic(pMsg)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `transaction.go` | Driver/Creator interfaces and Run/RunWithNoValue/getTx/manage; the transaction execution engine. | On callback error, Rollback errors are joined via errors.Join and returned; a failed Commit also triggers Rollback. Driver must implement Commit/Rollback/SavePoint — SavePoint is what makes nesting safe. | +| `context.go` | Get/SetDriverOnContext plus DriverNotFoundError and DriverConflictError sentinel types keyed by omTransactionContextKey. | SetDriverOnContext refuses to replace an existing Driver (returns DriverConflictError); Run treats that conflict as the expected nested case and proceeds. Errors are matched by type assertion, so don't wrap them in ways that defeat the cast. | + +## Anti-Patterns + +- Calling Driver.Commit()/Rollback() directly from a service or adapter instead of going through Run. +- Opening a fresh transaction when ctx already carries a Driver — bypasses nested-tx reuse and savepoints. +- Overwriting the context Driver under a different key, breaking GetDriverFromContext reuse. +- Recovering panics inside the callback to avoid rollback — manage() relies on the panic propagating to roll back. +- Treating DriverNotFoundError/DriverConflictError with errors.Is instead of the concrete type assertion the package uses. + +## Decisions + +- **Reuse a context-stored Driver and use savepoints** — Lets independently-written services compose into one outer transaction; each Run gets its own savepoint so a nested failure rolls back only its scope unless the error propagates. +- **Panic path rolls back and re-panics rather than returning an error** — Guarantees downstream WithTx clients see a rolled-back tx while preserving the original panic + stack for higher-level recovery/observability. +- **Concrete sentinel error types over errors.New** — getTx and Run distinguish 'no tx yet' (open one) from 'tx already present' (reuse) via type assertion, which sentinel strings could not express cleanly. + +## Example: Run repository work inside a transaction + +``` +import "github.com/openmeterio/openmeter/pkg/framework/transaction" + +func (a *adapter) Create(ctx context.Context, in Input) (*Out, error) { + return transaction.Run(ctx, a.creator, func(ctx context.Context) (*Out, error) { + // adapter reads the active Driver from ctx (via entutils.TransactingRepo) + return a.doCreate(ctx, in) + }) +} +``` + + diff --git a/pkg/framework/transport/CLAUDE.md b/pkg/framework/transport/CLAUDE.md new file mode 100644 index 0000000000..19f1c8c333 --- /dev/null +++ b/pkg/framework/transport/CLAUDE.md @@ -0,0 +1,21 @@ +# transport + + + +> Structural namespace owning the codebase's transport-layer handler primitives. Its sole child, httptransport, supplies the generic decode->operate->encode HTTP handler abstraction that every v3 handler and most openmeter/*/httpdriver packages build on (47 in-edges); the constraint is that everything here stays domain-agnostic. + +## Patterns + +**Transport primitives live one level down** — This folder has no direct source files; all handler machinery lives in the httptransport sub-package. New transport abstractions (e.g. a future grpctransport) belong as sibling sub-packages, not as files at this level. (`pkg/framework/transport/httptransport/{handler.go,argshandler.go,options.go}`) +**Domain-agnostic transport layer** — Code under this tree depends only on framework primitives (pkg/framework/operation, pkg/framework/commonhttp, pkg/contextx, pkg/models) and the encoder subpackage, never on openmeter/* domain packages, so it stays a reusable foundation. (`httptransport wraps an operation.Operation; it never imports billing/customer/etc.`) + +## Anti-Patterns + +- Adding domain-specific handler code directly under transport/ instead of inside httptransport or a new transport sub-package — pollutes the foundational layer. +- Importing openmeter/* domain packages from anything in this tree — the transport primitive must remain decoupled from concrete domains. + +## Decisions + +- **Transport is a structural namespace with one concrete child (httptransport) rather than a flat package.** — Leaves room for additional transports (gRPC, etc.) as siblings while keeping the generic HTTP decode->operate->encode handler isolated and reusable across v3 handlers and httpdriver packages. + + diff --git a/pkg/framework/transport/httptransport/CLAUDE.md b/pkg/framework/transport/httptransport/CLAUDE.md new file mode 100644 index 0000000000..2dc81c8808 --- /dev/null +++ b/pkg/framework/transport/httptransport/CLAUDE.md @@ -0,0 +1,56 @@ +# httptransport + + + +> Generic, type-parameterized HTTP handler abstraction (Handler[Request,Response] and HandlerWithArgs) that wraps an operation.Operation in a fixed decode -> operate -> encode pipeline. This is the core handler primitive every v3 handler and most openmeter/*/httpdriver packages build on (47 in-edges); its primary constraint is that it stays decoupled from any concrete domain — it only knows operations, encoders, and error encoders. + +## Patterns + +**decode -> operate -> encode pipeline** — ServeHTTP runs exactly three stages: decodeRequest, operation, encodeResponse. A non-nil error from decode or operate is routed through encodeError; an encodeResponse error is treated as terminal and only passed to errorHandler.HandleContext. (`request, err := h.decodeRequest(ctx, r); response, err := h.operation(ctx, request); h.encodeResponse(ctx, w, r, response)`) +**Constructors return interfaces, struct stays unexported** — NewHandler/NewHandlerWithArgs return the Handler/HandlerWithArgs interface; the implementing handler[Request,Response] and handlerWithArgs structs are unexported. newHandler (lowercase) is the shared internal builder used by both public constructors. (`func NewHandler[Request any, Response any](...) Handler[Request, Response] { return newHandler(...) }`) +**Non-pointer receivers for cheap immutable clones** — handler and handlerWithArgs use value receivers so With() and Chain() copy the struct and mutate the copy. Comments explicitly warn: if the receiver becomes a pointer, an explicit clone is required in With/Chain. (`func (h handlerWithArgs[...]) With(arg ArgType) Handler[...] { res := h.handler; res.decodeRequest = func(...){...}; return res }`) +**Functional options via HandlerOption** — Configuration is applied through HandlerOption (an interface implemented by optionFunc). WithErrorHandler, WithErrorEncoder, WithOperationName, WithOperationNameFunc are the only knobs. defaultHandlerOptions (commonhttp.GenericErrorEncoder) is appended after caller options in newHandler. (`options = append(options, defaultHandlerOptions...); h.apply(options)`) +**Layered error encoding with bool-handled signaling** — encodeError iterates h.errorEncoders, then tries the SelfEncodingError interface on the error, falling back to a 500 StatusProblem. Each encoder returns bool; the first true wins. If nothing handles it, errorHandler.HandleContext is called for diagnostics. (`if errorEncoder(ctx, err, w, r) { return true } ... if encoder, ok := err.(SelfEncodingError); ok { ... }`) +**Operation middleware via Chain** — Both Handler and HandlerWithArgs expose Chain(outer, others...) that wraps h.operation through operation.Chain(...). Middleware composes around the operation, not the HTTP layer. (`h.operation = operation.Chain(outer, others...)(h.operation)`) +**Optional per-operation OTel span gated by global toggle** — operationNameFunc sets the route attr; when operationSpansEnabled (set once via EnableOperationSpans) is true, ServeHTTP starts a child span named after the operation. Off by default to avoid API-wide span volume. (`if operationSpansEnabled.Load() { ctx, span = tracer.Start(ctx, name); defer span.End() }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `handler.go` | Defines Handler interface, NewHandler, the unexported handler struct, RequestDecoder, ErrorHandler, SelfEncodingError, the ServeHTTP pipeline, encodeError, and the EnableOperationSpans/tracer globals. | ServeHTTP uses a value receiver; do not switch handler to pointer methods without adding explicit clones in With/Chain. defaultHandlerOptions wires GenericErrorEncoder — removing it loses the fallback error encoder. | +| `argshandler.go` | HandlerWithArgs variant: With(ArgType) binds a route arg (e.g. path param) into the request decoder, returning a plain Handler. RequestDecoderWithArgs adds the ArgType parameter to the decoder signature. | With() relies on value-receiver copy semantics of handler; the inline comment warns this breaks if handler becomes a pointer. The bound closure captures arg per-With call. | +| `options.go` | HandlerOption/optionFunc functional-option machinery, the With* option constructors, handlerOptions aggregation, apply(), and resolveErrorHandler (returns dummyErrorHandler when none set). | errorEncoders is append-only across WithErrorEncoder calls (order matters in encodeError). resolveErrorHandler never returns nil — a missing handler silently swallows diagnostic errors via dummyErrorHandler. | + +## Anti-Patterns + +- Importing domain/openmeter packages here — this is the foundational transport primitive; it may only depend on pkg/contextx, pkg/framework/operation, pkg/framework/commonhttp, pkg/models, and the encoder subpackage. +- Changing handler/handlerWithArgs to pointer receivers without adding explicit struct clones in With()/Chain() — the immutable-copy contract that With relies on would silently share mutable decoders. +- Writing to the ResponseWriter directly inside the operation — output must flow through encodeResponse or an ErrorEncoder/SelfEncodingError so error handling and content negotiation stay centralized. +- Enabling operation spans unconditionally instead of via EnableOperationSpans — adds a child span to every request API-wide and inflates trace volume. +- Returning concrete handler structs from constructors instead of the Handler/HandlerWithArgs interface — callers depend on the interface and on Chain composition. + +## Decisions + +- **Handlers are generic over Request/Response and wrap an operation.Operation rather than embedding business logic.** — Keeps the transport layer domain-agnostic so every v3 handler and httpdriver reuses one decode/operate/encode pipeline with consistent error encoding and tracing. +- **Error handling is a chain of ErrorEncoders plus a SelfEncodingError escape hatch, with a 500 fallback.** — Lets each error type decide its own wire representation while guaranteeing every unhandled error still produces a structured StatusProblem and a diagnostic callback. +- **Per-operation OTel spans are global-toggle gated, off by default.** — The operation child span is useful for handler-vs-middleware timing but multiplies span count across the whole API, so it is opted into once at startup via EnableOperationSpans. + +## Example: Build a route-arg-bound HTTP handler from an operation and serve it + +``` +import ( + "github.com/openmeterio/openmeter/pkg/framework/transport/httptransport" + "github.com/openmeterio/openmeter/pkg/framework/transport/httptransport/encoder" +) + +h := httptransport.NewHandlerWithArgs[Request, Response, RouteArg]( + func(ctx context.Context, r *http.Request, arg RouteArg) (Request, error) { /* decode */ }, + op, // operation.Operation[Request, Response] + encoder.ResponseEncoder[Response](func(ctx context.Context, w http.ResponseWriter, r *http.Request, resp Response) error { /* encode */ }), + httptransport.WithOperationName("my-operation"), +) +h.With(routeArg).ServeHTTP(w, r) +``` + + diff --git a/pkg/framework/transport/httptransport/encoder/CLAUDE.md b/pkg/framework/transport/httptransport/encoder/CLAUDE.md new file mode 100644 index 0000000000..268b6ff37a --- /dev/null +++ b/pkg/framework/transport/httptransport/encoder/CLAUDE.md @@ -0,0 +1,50 @@ +# encoder + + + +> Defines the two generic function-type contracts the httptransport handler abstraction uses to serialize results and errors to the HTTP wire: ResponseEncoder[Response] and ErrorEncoder. It is a pure type-declaration package with no behavior, consumed by the parent httptransport .With().ServeHTTP handler used across v3 handlers. + +## Patterns + +**Encoders are bare function types, not interfaces** — Both contracts are declared as named function types so callers pass closures inline rather than implementing structs. ResponseEncoder is generic over the Response type; ErrorEncoder is non-generic. (`type ResponseEncoder[Response any] func(ctx context.Context, w http.ResponseWriter, r *http.Request, response Response) error`) +**ErrorEncoder returns bool to signal handled** — ErrorEncoder returns a bool (true = this encoder handled/wrote the error) so the parent transport can chain encoders and fall through to a default when one declines. (`type ErrorEncoder func(ctx context.Context, err error, w http.ResponseWriter, r *http.Request) bool`) +**Stdlib-only, zero dependencies** — Imports are limited to context and net/http. No project packages, no logging, no models. Keep this package dependency-free so the whole transport layer can import it without cycles. (`import ( + "context" + "net/http" +)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `encoder.go` | Sole file; declares ResponseEncoder[Response] (returns error) and ErrorEncoder (returns bool). Both take (ctx, w, r) plus a payload. | Note the asymmetric return types: ResponseEncoder returns error, ErrorEncoder returns bool. Changing either signature breaks every callsite in pkg/framework/transport/httptransport and downstream v3 handlers. | + +## Anti-Patterns + +- Adding concrete encoder implementations or HTTP-writing logic here — this package only declares the contracts; implementations live in callers/httptransport. +- Importing project packages (models, commonhttp, log) — would introduce an import cycle into the foundational transport layer. +- Converting the function types to interfaces — callers rely on passing plain closures. + +## Decisions + +- **Split the encoder type contracts into their own leaf package separate from httptransport.** — Keeps the type definitions importable by anything in the transport stack without pulling in the full handler machinery, avoiding cycles. +- **ErrorEncoder returns bool rather than error.** — Enables a chain-of-responsibility where each error encoder can decline (false) and let a later/default encoder handle the error. + +## Example: Implementing a ResponseEncoder and a fall-through ErrorEncoder + +``` +var jsonResp encoder.ResponseEncoder[MyDTO] = func(ctx context.Context, w http.ResponseWriter, r *http.Request, response MyDTO) error { + w.Header().Set("Content-Type", "application/json") + return json.NewEncoder(w).Encode(response) +} + +var notFound encoder.ErrorEncoder = func(ctx context.Context, err error, w http.ResponseWriter, r *http.Request) bool { + if !errors.Is(err, ErrNotFound) { + return false // decline; let the next encoder handle it + } + w.WriteHeader(http.StatusNotFound) + return true +} +``` + + diff --git a/pkg/gosundheit/CLAUDE.md b/pkg/gosundheit/CLAUDE.md new file mode 100644 index 0000000000..ca947944c1 --- /dev/null +++ b/pkg/gosundheit/CLAUDE.md @@ -0,0 +1,27 @@ +# gosundheit + + + +> Thin adapter that bridges AppsFlyer go-sundheit health checks to the project's `*slog.Logger`, providing a `health.CheckListener` that logs registration/start/completion. Wired by app/common. + +## Patterns + +**slog-backed CheckListener** — `NewLogger(logger *slog.Logger)` returns a `health.CheckListener`; failures (result.Error != nil) log at Warn, successes at Debug, using structured slog.String/slog.Any fields (`c.logger.Warn("health check failed", slog.String("check", name), slog.Any("error", result.Error))`) +**Injected logger, no default fallback** — The logger is a required constructor argument — consistent with the repo rule against slog.Default() fallbacks (`func NewLogger(logger *slog.Logger) health.CheckListener { return checkListener{logger: logger} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `logger.go` | Whole package: `checkListener` implementing OnCheckRegistered/OnCheckStarted/OnCheckCompleted, constructed via `NewLogger` | OnCheckRegistered and OnCheckCompleted both branch on result.Error; keep failure logs at Warn and routine lifecycle at Debug to avoid log noise | + +## Anti-Patterns + +- Logging healthy check lifecycle at Info/Warn level (floods logs) +- Falling back to slog.Default() instead of requiring the injected logger + +## Decisions + +- **Adapter pattern over go-sundheit's CheckListener** — Keeps the third-party health library's logging routed through the app's structured slog logger without coupling other packages to go-sundheit + + diff --git a/pkg/hasher/CLAUDE.md b/pkg/hasher/CLAUDE.md new file mode 100644 index 0000000000..833eba85dd --- /dev/null +++ b/pkg/hasher/CLAUDE.md @@ -0,0 +1,39 @@ +# hasher + + + +> Tiny utility defining a stable hashing contract: a Hash type alias and Hasher interface, with an xxhash-backed implementation. Used to derive content hashes for domain objects (e.g. productcatalog). + +## Patterns + +**Hash is a uint64 type alias** — Hash is declared as `type Hash = uint64` (alias, not a named type), so it is interchangeable with raw uint64 at call sites. (`type Hash = uint64`) +**Hasher interface returns Hash** — Types that participate in hashing implement `Hasher` with a single `Hash() Hash` method; consumers depend on the interface, not the concrete algorithm. (`type Hasher interface { Hash() Hash }`) +**Single hashing primitive via xxhash** — All raw-byte hashing goes through `NewHash([]byte) Hash` which delegates to `xxhash.Sum64`. Do not introduce alternative hash algorithms here. (`func NewHash(data []byte) Hash { return xxhash.Sum64(data) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `hasher.go` | Declares the Hash alias and Hasher interface — the public contract. | Hash is an alias; changing it to a named type would break implicit uint64 conversions across importers. | +| `xxhash.go` | The only concrete hashing function, NewHash, wrapping cespare/xxhash/v2. | xxhash is non-cryptographic; never use these hashes for security/signing purposes. | + +## Anti-Patterns + +- Adding crypto hashing (sha256/md5) or a second algorithm in this package instead of keeping a single xxhash primitive. +- Redefining Hash as a distinct named type, breaking uint64 interchangeability for existing callers. + +## Decisions + +- **xxhash chosen as the sole hashing primitive.** — Fast, non-cryptographic 64-bit hashing is sufficient for content fingerprinting/cache keys in productcatalog. + +## Example: Implement Hasher for a domain object + +``` +import "github.com/openmeterio/openmeter/pkg/hasher" + +func (o Object) Hash() hasher.Hash { + return hasher.NewHash([]byte(o.ID + o.Name)) +} +``` + + diff --git a/pkg/idempotency/CLAUDE.md b/pkg/idempotency/CLAUDE.md new file mode 100644 index 0000000000..80896c95c0 --- /dev/null +++ b/pkg/idempotency/CLAUDE.md @@ -0,0 +1,38 @@ +# idempotency + + + +> Single-purpose helper for generating UUIDv7-based idempotency keys, used where outbound operations need a unique, time-ordered idempotency token (e.g. notification/webhook/svix). + +## Patterns + +**UUIDv7 idempotency keys** — Keys are generated via `uuid.NewV7()` and returned as strings; v7 gives time-ordered uniqueness suitable for idempotency tokens. (`u, err := uuid.NewV7(); return u.String(), nil`) +**Error-returning Key plus MustKey panic variant** — `Key() (string, error)` is the safe API; `MustKey() string` panics on failure and is intended only for setup/non-recoverable paths. (`func MustKey() string { k, err := Key(); if err != nil { panic(err) }; return k }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `key.go` | Provides Key() and MustKey() for UUIDv7 idempotency key generation. | MustKey panics — per project convention avoid panics in production code paths; prefer Key() and propagate the error in service code. | + +## Anti-Patterns + +- Using MustKey() in request/service code paths where a returned error can be propagated instead. +- Switching to UUIDv4 or random strings, losing the time-ordered property of v7. + +## Decisions + +- **UUIDv7 over v4 for idempotency keys.** — v7 embeds a timestamp giving monotonic, sortable keys while preserving uniqueness. + +## Example: Generate an idempotency key for an outbound request + +``` +import "github.com/openmeterio/openmeter/pkg/idempotency" + +key, err := idempotency.Key() +if err != nil { + return fmt.Errorf("generate idempotency key: %w", err) +} +``` + + diff --git a/pkg/kafka/CLAUDE.md b/pkg/kafka/CLAUDE.md new file mode 100644 index 0000000000..838228f567 --- /dev/null +++ b/pkg/kafka/CLAUDE.md @@ -0,0 +1,63 @@ +# kafka + + + +> Shared Kafka utility package: typed librdkafka config builders (Consumer/Producer/Admin), an LRU-cached idempotent TopicProvisioner, and slog bridging for librdkafka's log channel. Consumed by ingest/kafkaingest, sink, watermill/driver/kafka, and the cmd/* entrypoints to construct confluent-kafka-go clients from validated OpenMeter config. + +## Patterns + +**Config types implement ConfigMapper + ConfigValidator** — Every config struct provides AsConfigMap() (kafka.ConfigMap, error) and Validate() error, asserted at package scope via compile-time `var _ ConfigMapper = (*T)(nil)` / `var _ ConfigValidator = (*T)(nil)` checks. (`var (_ ConfigMapper = (*ConsumerConfigParams)(nil); _ ConfigValidator = (*ConsumerConfigParams)(nil))`) +**Composed config + mergeConfigsToMap** — Top-level ConsumerConfig/ProducerConfig embed CommonConfigParams plus a role-specific params struct; AsConfigMap delegates to mergeConfigsToMap(...) and Validate loops a []ConfigValidator returning the first error. (`func (c ConsumerConfig) AsConfigMap() (kafka.ConfigMap, error) { return mergeConfigsToMap(c.CommonConfigParams, c.ConsumerConfigParams) }`) +**Only-set-if-nonzero ConfigMap keys** — AsConfigMap only calls m.SetKey(...) for non-zero fields (string != "", duration > 0), leaving librdkafka defaults intact otherwise; every SetKey error is wrapped/returned. (`if c.ClientID != "" { if err := m.SetKey("client.id", c.ClientID); err != nil { return nil, err } }`) +**String-enum types with configValue interface** — Enums (BrokerAddressFamily, AutoOffsetReset, Partitioner, TimeDurationMilliSeconds) implement fmt.Stringer + encoding.TextUnmarshaler + json.Unmarshaler, with UnmarshalJSON delegating to UnmarshalText, plus a ValidValues[T] slice for validation. (`func (s *BrokerAddressFamily) UnmarshalJSON(data []byte) error { return s.UnmarshalText(data) }`) +**OTel metric creation with wrapped errors** — In NewTopicProvisioner each Meter.Int64Counter/Int64Gauge call is immediately followed by `if err != nil { return nil, fmt.Errorf("failed to create metric: : %w", err) }`; metrics live in an anonymous struct field on topicProvisioner. (`provisioner.metrics.Errors, err = config.Meter.Int64Counter("topicprovisioner.errors", ...)`) +**Required-dependency constructor guards** — NewTopicProvisioner returns an error (never panics) when AdminClient, Logger, or Meter is nil; interface seams (AdminClient, TopicProvisioner, LogEmitter) enable mock tests. (`if config.Meter == nil { return nil, errors.New("meter is required") }`) +**Idempotent provisioning via LRU cache + benign-error tolerance** — Provision skips topics already in the expirable LRU cache; CreateTopics results with ErrNoError/ErrTopicAlreadyExists (or ErrNoError/ErrUnknownTopicOrPart on delete) are treated as success and cached, all other errors collected via errors.Join. DeProvision skips empty names and protectedTopics. (`case kafka.ErrNoError, kafka.ErrTopicAlreadyExists: _ = p.cache.Add(result.Topic, struct{}{})`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `config.go` | All typed config structs (CommonConfigParams, ConsumerConfigParams, ProducerConfigParams, composed ConsumerConfig/ProducerConfig/AdminConfig), enum types, ValidValues[T], mergeConfigsToMap. | A new field needs both an AsConfigMap SetKey branch and (if validated) a Validate check; localhost/127.0.0.1 brokers auto-force broker.address.family=v4 when unset; setting TopicMetadataRefreshInterval also writes metadata.max.age.ms = 3x. | +| `topicprovisioner.go` | TopicProvisioner interface + topicProvisioner impl with LRU cache + OTel metrics; TopicConfig/TopicProvisionerConfig; TopicProvisionerNoop; AdminClient interface seam. | TopicConfig.Validate requires non-empty Name and Partitions > 0; ReplicationFactor/retention.ms only set when > 0; DeProvision silently skips protectedTopics — never bypass that guard. | +| `log.go` | Bridges librdkafka's go.logs.channel to *slog.Logger via LogEmitter, LogProcessor (execute/interrupt run-group pair), ConsumeLogChannel, and syslog->slog.Level mapping. | Requires go.logs.channel.enable=true (set in Consumer/Producer AsConfigMap); mapLogLevel maps 0-3->Error, 4->Warn, 5->Info, else Debug. | +| `kafka.go` | Package doc comment only. | No logic here; godoc anchor for the package. | +| `config_test.go` | Table-driven tests for config-map building, enum UnmarshalText/UnmarshalJSON round-trips, and Validate error messages. | New config keys must be added to ExpectedConfigMap; tests compare exact error strings, so changing a Validate message breaks them. | +| `topicprovisioner_test.go` | Tests provisioning via mockTopicProvisioner (an AdminClient mock) using a noop meter and testutils.NewDiscardLogger. | Uses noop.NewMeterProvider() and testutils.NewDiscardLogger(t) — mirror this for new provisioner tests. | + +## Anti-Patterns + +- Adding a config struct without the `var _ ConfigMapper`/`var _ ConfigValidator` assertions, or implementing only one of AsConfigMap/Validate. +- Unconditionally SetKey-ing a field (overriding librdkafka defaults) instead of guarding on the non-zero check, or ignoring the SetKey error. +- Creating an OTel instrument in NewTopicProvisioner without the immediate `fmt.Errorf("failed to create metric: : %w", err)` guard. +- panicking or using slog.Default() in the provisioner instead of returning an error / requiring an injected *slog.Logger and metric.Meter. +- Treating ErrTopicAlreadyExists (Provision) or ErrUnknownTopicOrPart (DeProvision) as hard failures, or deleting topics in protectedTopics. + +## Decisions + +- **Config is split into a shared CommonConfigParams plus role-specific params structs, composed into ConsumerConfig/ProducerConfig/AdminConfig.** — Common broker/SASL/stats/debug settings are reused across roles while consumer- and producer-only tuning stays type-segregated and independently validatable. +- **TopicProvisioner keeps an expirable LRU cache of provisioned topic names.** — Lets callers invoke Provision repeatedly with the same topic set without an extra round-trip to Kafka brokers for already-known topics. +- **Localhost brokers default broker.address.family to IPv4 when unset.** — OSX resolvers return IPv6 first, breaking local dev against localhost brokers (openmeter issue #321). + +## Example: Define a validated, config-mappable Kafka config struct + +``` +var ( + _ ConfigMapper = (*ProducerConfigParams)(nil) + _ ConfigValidator = (*ProducerConfigParams)(nil) +) + +type ProducerConfigParams struct { + Partitioner Partitioner +} + +func (p ProducerConfigParams) Validate() error { + if p.Partitioner != "" && !slices.Contains(PartitionerValues, p.Partitioner) { + return errors.New("invalid partitioner config") + } + return nil +} +// ... +``` + + diff --git a/pkg/kafka/metrics/CLAUDE.md b/pkg/kafka/metrics/CLAUDE.md new file mode 100644 index 0000000000..b43ab1603a --- /dev/null +++ b/pkg/kafka/metrics/CLAUDE.md @@ -0,0 +1,55 @@ +# metrics + + + +> Top-level OTel metrics facade for librdkafka client statistics: a single Metrics struct holds the top-level Int64Gauges plus broker/topic/consumer-group sub-metric structs from internal/, and Add() walks a parsed stats.Stats (from stats/) recording every gauge. New(meter, ...Option) is the only constructor; wired into app/common, cmd/server, ingest/kafkaingest, and sink. + +## Patterns + +**Single Metrics struct of Int64Gauges + sub-metric pointers** — Metrics embeds top-level metric.Int64Gauge fields plus *internal.BrokerMetrics/TopicMetrics/ConsumerGroupMetrics; New populates all of them and returns (*Metrics, error). (`type Metrics struct { brokerMetrics *internal.BrokerMetrics; Age metric.Int64Gauge; ... }`) +**New is the only constructor; every gauge creation wraps the error** — Each meter.Int64Gauge(...) call is immediately followed by `if err != nil { return nil, fmt.Errorf("failed to create metric: : %w", err) }`. Sub-metric constructors wrap with "failed to create metrics: %w". (`m.Age, err = meter.Int64Gauge("kafka.age_microseconds", ...); if err != nil { return nil, fmt.Errorf("failed to create metric: kafka.age: %w", err) }`) +**Add is nil-safe and attribute-additive** — Add(ctx, stats, attrs...) returns early on `stats == nil`, appends name/client_id/type attributes, records every top-level gauge, then dispatches to non-nil sub-metric structs. (`func (m *Metrics) Add(ctx context.Context, stats *stats.Stats, attrs ...attribute.KeyValue) { if stats == nil { return } ... }`) +**Functional Options gate sub-metrics** — Options{extendedMetrics, brokerMetricsDisabled, topicMetricsDisabled, consumerGroupMetricsDisabled} are set via Option funcs (WithExtendedMetrics, WithBrokerMetricsDisabled, WithTopicMetricsDisabled, WithConsumerGroupMetricsDisabled); disabled sub-metrics stay nil so Add skips them. (`func WithExtendedMetrics() Option { return func(o *Options) { o.extendedMetrics = true } }`) +**Bootstrap broker filtering on the facade side** — When iterating stats.Brokers, brokers with NodeID < 0 (bootstrap nodes) are skipped before calling brokerMetrics.Add. (`for _, broker := range stats.Brokers { if broker.NodeID < 0 { continue }; m.brokerMetrics.Add(ctx, &broker, attrs...) }`) +**kafka.* metric names with description + unit** — Every Int64Gauge uses a dotted name (kafka.message_count, kafka.message_size_bytes) plus metric.WithDescription and metric.WithUnit ("{message}", "{byte}", "{microseconds}", "{topic}"). (`meter.Int64Gauge("kafka.message_size_bytes", metric.WithDescription(...), metric.WithUnit("{byte}"))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `metrics.go` | Defines Metrics, Options/Option (+With* funcs), New constructor, and Add recorder; the public surface of the package. | A gauge needs THREE coordinated edits: struct field, New() block with the error-wrap guard, and a m..Record(...) line in Add — missing any one silently drops the metric. Existing copy-paste artifact: kafka.requests_received_bytes wraps its error string as "kafka.requests-sent"; do not propagate that — use the real metric name in new code. | +| `metrics_test.go` | Table test TestWithMetrics exercising New with each Option combo against a noop meter, plus NewTestStats helper unmarshalling the embedded stats/testdata/stats.json fixture. | Uses noop.NewMeterProvider() so it only asserts construction/recording does not error, not metric values; uses t.Context(). New Options must be added to the test table or they go untested. | + +## Anti-Patterns + +- Adding a gauge to New() without the immediate `if err != nil { return nil, fmt.Errorf("failed to create metric: : %w", err) }` guard +- Adding a struct field + New() block but forgetting the matching m..Record(...) call in Add (or vice versa) +- Recording sub-metrics in Add without the `if m.Metrics != nil` guard — disabled sub-metrics are intentionally nil +- Recording bootstrap brokers (NodeID < 0) instead of skipping them +- Parsing/computing librdkafka stats here instead of consuming the typed structs from the stats/ sibling package + +## Decisions + +- **Stats parsing (stats/), metric instrument wrappers (internal/), and the recording facade (this package) are split into three layers.** — Keeps pure-data parsing dependency-light, the internal instrument wrappers reusable per-entity, and this package the single wiring/Add entry point. +- **Sub-metrics and extended/percentile metrics are opt-in/opt-out via functional Options.** — Per-broker/per-topic/per-partition percentile metrics are high-cardinality; callers (sink, ingest) can disable them or enable extended metrics per deployment. + +## Example: Add a new top-level gauge end-to-end (field + New guard + Record) + +``` +// in metrics.go +// 1) struct field +type Metrics struct { /* ... */ NewGauge metric.Int64Gauge } +// 2) in New(...), after existing gauges +m.NewGauge, err = meter.Int64Gauge( + "kafka.new_gauge_count", + metric.WithDescription("..."), + metric.WithUnit("{message}"), +) +if err != nil { + return nil, fmt.Errorf("failed to create metric: kafka.new_gauge_count: %w", err) +} +// 3) in Add(...) +m.NewGauge.Record(ctx, stats.NewGauge, metric.WithAttributes(attrs...)) +``` + + diff --git a/pkg/kafka/metrics/internal/CLAUDE.md b/pkg/kafka/metrics/internal/CLAUDE.md new file mode 100644 index 0000000000..f3a2abcbb1 --- /dev/null +++ b/pkg/kafka/metrics/internal/CLAUDE.md @@ -0,0 +1,60 @@ +# internal + + + +> Internal OpenTelemetry metric-instrument wrappers that translate librdkafka statistics (from the sibling stats package) into OTel Int64Gauge recordings for brokers, consumer groups, partitions, and topics. Not importable outside pkg/kafka/metrics (Go internal package). + +## Patterns + +**Struct-of-gauges + New + Add pair** — Each metric group is a struct holding metric.Int64Gauge fields, constructed by a NewXxxMetrics(meter metric.Meter, ...) (*Xxx, error) constructor and populated by an Add(ctx, stats *stats.Yyy, attrs ...attribute.KeyValue) method. New code must follow this exact triad. (`type BrokerMetrics struct { State metric.Int64Gauge; ... }; func NewBrokerMetrics(meter, extended) (*BrokerMetrics, error); func (m *BrokerMetrics) Add(ctx, stats, attrs...)`) +**Gauge creation always wraps errors with the metric name** — Every meter.Int64Gauge(...) call is immediately followed by an `if err != nil { return nil, fmt.Errorf("failed to create metric: : %w", err) }` guard. Use the exact metric name string in the wrap. (`m.State, err = meter.Int64Gauge("kafka.broker.state", ...); if err != nil { return nil, fmt.Errorf("failed to create metric: kafka.broker.state: %w", err) }`) +**Add is nil-safe and attribute-additive** — Add returns early when stats == nil, then appends identity attributes (node_name/node_id, topic, partition) onto the incoming attrs slice before Record. Sub-metric structs (latency/throttle/message/offset) are only invoked when their pointer field is non-nil. (`if stats == nil { return }; attrs = append(attrs, attribute.String("topic", stats.Topic)); if m.batchMetrics != nil { m.batchMetrics.Add(ctx, stats, attrs...) }`) +**Extended-metrics gating via `extended bool`** — Constructors accept an `extended bool` and only build the heavy sub-metric structs (latency, throttle, batch, message, offset percentiles) when true, leaving those pointer fields nil otherwise. Add then skips nil sub-metrics. (`if extended { m.latencyMetrics, err = NewBrokerLatencyMetrics(meter); ... m.throttleMetrics, err = NewBrokerThrottleMetrics(meter) }`) +**Window/percentile metrics expand to min/max/avg/sum/stddev/p50..p9999** — stats.WindowStats fields (Latency, Throttle, BatchSize, BatchCount) map to a fixed set of 11 gauges named *_min/_max/_avg/_sum/_stddev/_p50/_p75/_p90/_p95/_p99/_p9999, each recorded from the matching WindowStats field. (`m.LatencyP9999.Record(ctx, stats.Latency.P9999, metric.WithAttributes(attrs...))`) +**Enum stats recorded via .Int64()** — String-enum stats (BrokerSource, BrokerState, ConsumerGroupState/JoinState) are recorded by calling their .Int64() projection from the stats package, not the raw string. (`m.State.Record(ctx, stats.State.Int64(), metric.WithAttributes(attrs...))`) +**Internal partitions are skipped** — When iterating topic partitions, partitions with Partition < 0 (internal UA/UnAssigned) are skipped before recording partition metrics. (`for _, partition := range stats.Partitions { if partition.Partition < 0 { continue }; m.partitionMetrics.Add(ctx, &partition, attrs...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `broker.go` | BrokerMetrics + BrokerLatencyMetrics + BrokerThrottleMetrics; per-broker request/response/connect counters plus optional rtt/throttle percentile windows. | Each new gauge needs a matching Record call in Add AND its own error-wrap on construction; the metric name in the fmt.Errorf wrap must match the gauge name (note: a couple of existing wraps reuse kafka.broker.state — keep names accurate for new code). | +| `consumergroup.go` | ConsumerGroupMetrics; consumer-group state/join-state/rebalance/assignment gauges. | State and JoinState are recorded via .Int64(); does not append node attributes (unlike broker). | +| `partition.go` | PartitionMetrics + PartitionMessageMetrics + PartitionOffsetMetrics; per-partition lag, offsets, queue depths, throughput. | Adds attribute.Int64("partition", stats.Partition); offset/message sub-metrics are extended-gated; Add takes *stats.Partition (singular type name), not a slice. | +| `topic.go` | TopicMetrics + TopicBatchMetrics; topic age/metadata-age plus optional batch size/count windows, and owns the PartitionMetrics for its partitions. | partitionMetrics is built unconditionally (NewPartitionMetrics is called regardless of extended); only batchMetrics is extended-gated. Iterates stats.Partitions and skips Partition < 0. | + +## Anti-Patterns + +- Constructing a meter.Int64Gauge without the immediate `if err != nil { return nil, fmt.Errorf("failed to create metric: : %w", err) }` guard +- Recording an enum stat as a raw string instead of calling its .Int64() projection +- Calling a sub-metric struct's Add without a nil-pointer check, or forgetting the early `if stats == nil { return }` guard +- Exporting these helpers for use outside pkg/kafka/metrics — this is a Go internal package by design +- Recording the internal partition (Partition < 0) instead of skipping it + +## Decisions + +- **Metrics modeled as Int64Gauge wrappers over the stats package rather than computed in-line** — Cleanly separates librdkafka JSON parsing (stats) from OTel instrument lifecycle (internal), letting the parent metrics package register and feed them on each stats callback. +- **Extended/percentile metrics are opt-in via an `extended bool`** — Per-broker/topic/partition percentile histograms are high-cardinality and expensive; default deployments skip them and only build base counters. + +## Example: Adding a new gauge to a metric group: construct with error-wrap, record nil-safely with attributes + +``` +func NewConsumerGroupMetrics(meter metric.Meter) (*ConsumerGroupMetrics, error) { + var err error + m := &ConsumerGroupMetrics{} + m.State, err = meter.Int64Gauge( + "kafka.consumer_group.state", + metric.WithDescription("Local consumer group handler's state"), + ) + if err != nil { + return nil, fmt.Errorf("failed to create metric: kafka.consumer_group.state: %w", err) + } + return m, nil +} + +func (m *ConsumerGroupMetrics) Add(ctx context.Context, stats *stats.ConsumerGroupStats, attrs ...attribute.KeyValue) { + if stats == nil { +// ... +``` + + diff --git a/pkg/kafka/metrics/stats/CLAUDE.md b/pkg/kafka/metrics/stats/CLAUDE.md new file mode 100644 index 0000000000..98cb40ba8f --- /dev/null +++ b/pkg/kafka/metrics/stats/CLAUDE.md @@ -0,0 +1,57 @@ +# stats + + + +> Plain Go structs that unmarshal librdkafka's STATISTICS.md JSON (the rdkafka stats callback payload) into typed BrokerStats/TopicStats/Partition/ConsumerGroupStats/Stats, with string-enum types that expose stable .Int64() codes for metric recording. Pure data/parsing layer with no OTel dependency. + +## Patterns + +**Struct fields map librdkafka JSON keys via json tags** — Every field carries a `json:"..."` tag matching librdkafka's stats schema (e.g. RequestsSent int64 `json:"tx"`, MessagesInQueue `json:"msgq_cnt"`). Field names are human-readable; tags are the cryptic rdkafka keys. New fields must use the exact rdkafka key from STATISTICS.md. (`RequestsAwaitingTransmission int64 `json:"outbuf_cnt"``) +**String enums with UnmarshalJSON + Int64 projection** — Enum types (BrokerSource, BrokerState, ConsumerGroupState, ConsumerGroupJoinState) are `type X string` with const values, a case-insensitive UnmarshalJSON (strings.ToLower(strings.TrimSpace(value))) defaulting to the Unknown variant, and an Int64() method returning a fixed integer code (Unknown => -1). (`func (s BrokerState) Int64() int64 { switch s { case BrokerStateUp: i = 6; ...; default: i = -1 }; return i }`) +**WindowStats for rolling percentile windows** — Any rolling-window stat (rtt, throttle, batch_size, batch_count) is typed as WindowStats with Min/Max/Avg/Sum/Count/StdDev/P50..P9999 fields. The p99.99 field tag is `json:"p99_99"`. (`Latency WindowStats `json:"rtt"`; Throttle WindowStats `json:"throttle"``) +**Nested collections keyed by string** — Aggregates use map[string]T for child collections: Stats.Brokers map[string]BrokerStats, Stats.Topics map[string]TopicStats, TopicStats.Partitions map[string]Partition, keyed by rdkafka's string identifiers (broker name, topic name, partition id as string). (`Topics map[string]TopicStats `json:"topics"``) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `stats.go` | Top-level Stats struct (the full rdkafka payload root) plus the shared WindowStats type used for all percentile windows. | Stats is the unmarshal entrypoint; WindowStats.P9999 maps to json key `p99_99`, not `p9999`. | +| `broker.go` | BrokerStats plus BrokerSource and BrokerState enums (with UnmarshalJSON + Int64). | BrokerState.Int64 maps up=6/update=7 and unknown=-1; keep the int codes stable since internal/broker.go documents them in metric descriptions. | +| `consumergroup.go` | ConsumerGroupStats plus ConsumerGroupState and ConsumerGroupJoinState enums. | JoinState has 9 variants (init..steady, codes 0-8); the wait-incr-unassign-to-complete json value is abbreviated, not the full Go const name. | +| `topic.go` | TopicStats and Partition structs (no enums). Partition holds offsets, lag, queue depths, throughput. | Partition id -1 denotes the internal UA/UnAssigned partition (callers in internal/ skip it); offset fields like StoredOffset use librdkafka sentinel -1001. | +| `stats_test.go` | Round-trip test unmarshalling testdata/stats.json and asserting broker/topic/partition fields. | Uses //go:embed testdata/stats.json; new fields with parsing logic should be asserted here against a representative payload. | + +## Anti-Patterns + +- Adding a field without the correct librdkafka json tag (the Go field name will silently not bind to the rdkafka key) +- Adding an enum variant without updating both UnmarshalJSON (lowercase value) and Int64() (stable code), or omitting the default->Unknown/-1 case +- Changing an existing enum Int64() code — the integer mappings are documented in internal/ metric descriptions and consumed downstream +- Importing OTel or any metric machinery here — this package is pure data and must stay dependency-light + +## Decisions + +- **librdkafka stats are modeled as typed Go structs with explicit json tags rather than a generic map** — Gives type-safe access and self-documenting field names while still binding to librdkafka's terse STATISTICS.md keys. +- **Enums carry an Int64() projection alongside string values** — OTel gauges are numeric, so the sibling internal package records enum state as a stable integer code; keeping the projection on the type centralizes the mapping. + +## Example: Defining a librdkafka string enum with case-insensitive unmarshal and numeric projection + +``` +type BrokerState string + +const ( + BrokerStateUnknown BrokerState = "unknown" + BrokerStateUp BrokerState = "up" +) + +func (s *BrokerState) UnmarshalJSON(data []byte) error { + var value string + if err := json.Unmarshal(data, &value); err != nil { + return fmt.Errorf("failed to unmarshal value: %s", data) + } + switch strings.ToLower(strings.TrimSpace(value)) { + case "up": + *s = BrokerStateUp +// ... +``` + + diff --git a/pkg/log/CLAUDE.md b/pkg/log/CLAUDE.md new file mode 100644 index 0000000000..312cbfa4d4 --- /dev/null +++ b/pkg/log/CLAUDE.md @@ -0,0 +1,41 @@ +# log + + + +> Logging support utilities (not a logger implementation): a testify-based mock slog.Handler and a deferrable PanicLogger that logs recovered panics with an OTel-compatible stack trace and then re-panics, exits, or continues. + +## Patterns + +**MockHandler implements slog.Handler** — `MockHandler` embeds testify `mock.Mock` and satisfies `slog.Handler` (Enabled/Handle/WithAttrs/WithGroup); a compile-time assertion `var _ slog.Handler = &MockHandler{}` enforces the contract. Construct via NewMockHandler(). (`var _ slog.Handler = &MockHandler{}`) +**PanicLogger with functional propagation strategy** — `PanicLogger(options ...func(*panicLoggerOptions))` is used as `defer log.PanicLogger(...)`; WithRePanic (default), WithExit, WithContinue select what happens after logging the recovered panic. (`defer log.PanicLogger(log.WithExit)`) +**Stack trace recorded under OTel semantic key** — Recovered panics are logged with `debug.Stack()` under the `code.stacktrace` attribute (OTelCodeStackTrace const) for OpenTelemetry semantic-convention compatibility. (`slog.Error(description, OTelCodeStackTrace, string(debug.Stack()))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `mock.go` | NewMockHandler / MockHandler: a testify mock slog.Handler for asserting log behavior in tests. | Test-only helper; the four interface methods must all be kept implemented or the slog.Handler assertion breaks the build. | +| `panic.go` | PanicLogger plus WithRePanic/WithExit/WithContinue options and the OTelCodeStackTrace constant. | Default strategy re-panics; WithExit calls os.Exit(1). This package is the sanctioned recover point — production code elsewhere must not panic. | + +## Anti-Patterns + +- Using MockHandler outside tests, or shipping log assertions into production wiring. +- Changing the default propagation strategy away from re-panic, silently swallowing panics callers expect to propagate. +- Logging stack traces under an ad-hoc attribute key instead of OTelCodeStackTrace. + +## Decisions + +- **PanicLogger centralizes panic recovery with a selectable propagation strategy.** — main entrypoints can `defer log.PanicLogger(log.WithExit)` to guarantee panics are logged with a stack trace before the process terminates. + +## Example: Guard a main goroutine against unlogged panics + +``` +import "github.com/openmeterio/openmeter/pkg/log" + +func main() { + defer log.PanicLogger(log.WithExit) + // ... startup ... +} +``` + + diff --git a/pkg/lrux/CLAUDE.md b/pkg/lrux/CLAUDE.md new file mode 100644 index 0000000000..36dd365576 --- /dev/null +++ b/pkg/lrux/CLAUDE.md @@ -0,0 +1,50 @@ +# lrux + + + +> Generic LRU cache wrapper with per-item TTL on top of hashicorp/golang-lru/v2, fetching missing or expired entries through a supplied Fetcher. Used by entitlement balanceworker (and its filters) for cached lookups. + +## Patterns + +**Generic CacheWithItemTTL[K,V] embedding lru.Cache** — The cache embeds `*lru.Cache[K, CacheItemWithTTL[V]]` and stores values wrapped with an ExpiresAt timestamp; K is `comparable`, V is `any`. (`type CacheWithItemTTL[K comparable, V any] struct { *lru.Cache[K, CacheItemWithTTL[V]]; fetcher Fetcher[K, V]; ttl time.Duration }`) +**Constructor validates fetcher and ttl** — `NewCacheWithItemTTL(size, fetcher, opts...)` returns an error if fetcher is nil or ttl < 0; TTL is set via the `WithTTL(d)` functional option (default 0 = never expires). (`cache, err := NewCacheWithItemTTL(10, fetchFn, WithTTL(time.Second*10))`) +**Clock-driven expiry via pkg/clock** — Expiry is evaluated against `clock.Now()` (not time.Now), so tests can FreezeTime/SetTime. Get returns the cached value when ExpiresAt is zero or after now; otherwise it fetches and stores. Refresh always re-fetches. (`if ok && (item.ExpiresAt.IsZero() || item.ExpiresAt.After(clock.Now())) { return item.Value, nil }`) +**No locking around fetch** — Get/Refresh do not hold a mutex during fetch (explicit code comment), so concurrent misses may fetch the same key multiple times — acceptable by design. (`// NOTE: we are not using a mutex here, as we don't want to limit the number of fetches for now`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `lruitemttl.go` | CacheWithItemTTL implementation: NewCacheWithItemTTL, Get, Refresh, internal fetchItem; Fetcher type and WithTTL option. | Expiry uses clock.Now(); never substitute time.Now() or tests using FreezeTime will be bypassed. ttl=0 means entries never expire. | +| `lruitemttl_test.go` | Demonstrates the clock.FreezeTime/SetTime + defer clock.UnFreeze testing pattern and Get/Refresh error propagation. | Pairs FreezeTime with defer UnFreeze — replicate this when adding tests so frozen time does not leak. | + +## Anti-Patterns + +- Using time.Now() instead of clock.Now() for expiry, breaking deterministic tests. +- Assuming Get is single-flight — concurrent misses can trigger duplicate fetches by design. +- Passing a nil fetcher or negative ttl; the constructor rejects both with an error. + +## Decisions + +- **Per-item TTL stored alongside the value (CacheItemWithTTL) rather than relying on a global cache eviction policy.** — Allows lazy refresh-on-read: expired items are re-fetched on Get while still bounded by LRU size. +- **No mutex around fetch.** — Deliberately avoids throttling fetch concurrency; duplicate fetches are tolerated to keep the cache simple and lock-free. + +## Example: Build a TTL cache backed by a fetch function + +``` +import ( + "github.com/openmeterio/openmeter/pkg/lrux" +) + +cache, err := lrux.NewCacheWithItemTTL( + 1000, + func(ctx context.Context, id string) (Entity, error) { return repo.Get(ctx, id) }, + lrux.WithTTL(30*time.Second), +) +if err != nil { + return err +} +v, err := cache.Get(ctx, id) +``` + + diff --git a/pkg/models/CLAUDE.md b/pkg/models/CLAUDE.md new file mode 100644 index 0000000000..1c6248a30f --- /dev/null +++ b/pkg/models/CLAUDE.md @@ -0,0 +1,59 @@ +# models + + + +> The codebase's most-depended-on utility package (229 in-edges): shared domain primitives (ManagedModel/NamespacedModel/CadencedModel/Metadata/Annotations/Percentage), the canonical error taxonomy (Generic*Error + Validate() aggregation), and the ValidationIssue/FieldDescriptor system that maps Go error trees into RFC-7807 API problems. Almost every domain package embeds these types, so signatures here are effectively frozen public API. + +## Patterns + +**Generic error constructor + Is* checker pairs** — Each error class is a struct wrapping `err error` with `Error()`/`Unwrap()`, plus a `NewError` constructor and an `IsError(err) bool` using `errors.As`, asserting `var _ GenericError = (*X)(nil)`. New error categories must follow this triad. (`NewGenericValidationError(err) / IsGenericValidationError(err) in errors.go`) +**Validate() aggregates with errors.Join then NewNillableGenericValidationError** — Validate() collects into `var errs []error`, wraps field context with `fmt.Errorf("field: %w", err)`, and returns `models.NewNillableGenericValidationError(errors.Join(errs...))` (nil-safe). NamespacedIDOrKey.Validate is the in-package example. (`return NewNillableGenericValidationError(errors.Join(errs...))`) +**ValidationIssue built only through options** — ValidationIssue has all-private fields; construct via NewValidationIssue/NewValidationError/NewValidationWarning and refine with immutable `.With*` methods (WithField, WithAttr, WithSeverity) which Clone first. Never set fields directly outside the package. (`NewValidationError(code, msg).WithField(NewFieldSelector("x"))`) +**Error-tree to ValidationIssues mapping** — AsValidationIssues walks an error tree: componentWrapper/fieldPrefixedWrapper add context, leaf ValidationIssues are collected, and unknown leaves under a wrapper become critical issues. Use ErrorWithFieldPrefix / ErrorWithComponent to attach path/component context that survives the walk. (`AsValidationIssues(errIn) in validationissue.go`) +**Cadenced time-interval model (inclusive-from, exclusive-to)** — CadencedModel{ActiveFrom, *ActiveTo} is the standard active-period type; ActiveTo nil means open-ended, ActiveTo==ActiveFrom means never active. Implement CadenceComparable.GetCadence() to use CadenceList overlap/continuity helpers. (`CadencedModel.IsActiveAt(t) — from inclusive, to exclusive`) +**Immutable map-types with Clone/Merge/Equal** — Metadata (map[string]string) and Annotations (map[string]interface{}) provide Clone (deep for Annotations via brunoga/deep, shallow maps.Clone for Metadata), Merge (right wins, returns new map), and Equal. Treat them as value types; mutate copies, not inputs. (`Annotations.Merge clones via deep.Copy so inputs are never mutated`) +**Marker-interface sealing** — Cadenced and Metadatad use unexported marker methods (cadenced()/annotated() returning private marker types) so only in-package types can satisfy them. Don't implement these externally; embed CadencedModel/MetadataModel instead. (`type cadencedMarker bool; func (c CadencedModel) cadenced() cadencedMarker`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `errors.go` | Generic error taxonomy (NotFound/Conflict/Forbidden/Validation/NotImplemented/...) + ErrorWithFieldPrefix/ErrorWithComponent + ErrorSeverity enum. | Severity is inverted: lower numeric value = MORE severe (Critical=0, Warning=1); WithSeverityOrHigher filters with `<=`. | +| `validationissue.go` | ValidationIssue value type, option functions, ValidationIssues slice, AsValidationIssues/EncodeValidationIssues error-tree mapping. | ValidationIssue is not comparable (map attributes) so it implements Is() in addition to Unwrap(); WithAttr panics on nil/non-comparable keys. | +| `model.go` | ManagedModel/NamespacedModel/ManagedResource/ManagedUniqueResource/VersionedModel base structs embedded across all domains; Address/CountryCode. | NewManagedResource forces all timestamps to .UTC(); IsDeleted uses clock.Now() (mockable in tests). | +| `fielddescriptor.go` | Tree-backed field path builder producing both human String() and JSONPath() for ValidationIssue.field; uses pkg/treex. | With*/WithPrefix return clones (value receiver + ShallowClone); the original argument is never mutated — chain the return value. | +| `fieldexpression.go` | FieldExpression impls: FieldAttrValue, MultiFieldAttrValue, FieldArrIndex, WildCard — render as [key=value] / JSONPath [?(@.key=='value')]. | valueString() emits "!UNSUPPORTED" for value types other than numbers/string/Stringer. | +| `cadence.go / cadencelist.go` | CadencedModel period type and CadenceList[T] for overlap/sort/continuity validation over CadenceComparable items. | GetOverlaps/IsContinuous assume a SORTED list (NewSortedCadenceList); TODOs flag intent to migrate to timeutil.OpenPeriod. | +| `annotation.go / metadata.go / attributes.go` | Map-backed value types: Annotations (deep clone), Metadata (string map), Attributes (any keys, AsStringMap for serialization). | Annotations.GetInt rejects non-whole floats; Metadata.Merge returns nil when both sides empty. | +| `servicehook.go` | Generic ServiceHookRegistry[T] / ServiceHook[T] lifecycle hooks (Pre/Post Create/Update/Delete) + NoopServiceHook. | Registry uses a per-instance context-value loop guard so re-entrant hook calls short-circuit silently; register via RegisterHooks, never mutate .hooks. | + +## Anti-Patterns + +- Returning on the first validation failure instead of collecting into errs and returning NewNillableGenericValidationError(errors.Join(...)). +- Setting ValidationIssue fields directly or building one without the option constructors — fields are private and With* must Clone. +- Treating ErrorSeverity numerically backwards (Critical is the lowest value, not the highest). +- Mutating an Annotations/Metadata/Attributes argument in place instead of using Clone/Merge which return fresh maps. +- Implementing the Cadenced/Metadatad marker interfaces externally rather than embedding CadencedModel/MetadataModel. + +## Decisions + +- **Centralize the Generic*Error taxonomy + Is* helpers here** — Lets every layer map domain errors to HTTP status codes uniformly without per-package error types, keeping the v3 apierrors mapping table small. +- **Model field paths as a treex tree behind FieldDescriptor** — One builder yields both a readable string and a valid RFC-9535 JSONPath, so ValidationIssue.field is machine-queryable in API responses and prefixing nested errors composes cleanly. +- **ValidationIssue is immutable value-with-options** — Allows safe sharing, errors.Is comparison via Equal, and prefix/component enrichment while walking arbitrary error trees in AsValidationIssues. + +## Example: Standard Validate() returning aggregated, field-prefixed validation issues + +``` +func (x Input) Validate() error { + var errs []error + if x.Namespace == "" { + errs = append(errs, errors.New("namespace is required")) + } + if err := x.Inner.Validate(); err != nil { + errs = append(errs, fmt.Errorf("inner: %w", err)) + } + return models.NewNillableGenericValidationError(errors.Join(errs...)) +} +``` + + diff --git a/pkg/models/http/CLAUDE.md b/pkg/models/http/CLAUDE.md new file mode 100644 index 0000000000..751df5a8dd --- /dev/null +++ b/pkg/models/http/CLAUDE.md @@ -0,0 +1,51 @@ +# http + + + +> Tiny conversion layer that maps the domain types models.Annotations and models.Metadata to/from their generated api.* counterparts. Exists so HTTP handlers (e.g. openmeter/meter/httphandler) translate annotation/metadata bags without redefining the cast at every call site. + +## Patterns + +**FromX / AsX directional naming** — Domain->API conversion is named From* (returns *api.T); API->domain conversion is named As* (returns models.T). Follow this paired naming for any new type added here. (`func FromAnnotations(a models.Annotations) *api.Annotations; func AsAnnotations(a *api.Annotations) models.Annotations`) +**Identical underlying type cast, not field copy** — models.Annotations and api.Annotations share the same underlying type, so conversion is a direct Go type conversion `(api.Annotations)(x)` wrapped with lo.ToPtr — never a manual field-by-field build. (`return lo.ToPtr((api.Annotations)(annotations))`) +**Nil-guard on pointer inputs** — As* functions take a pointer and must return nil (the zero map) when the input pointer is nil before dereferencing. (`if annotations == nil { return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `annotation.go` | FromAnnotations / AsAnnotations converting between models.Annotations and *api.Annotations. | AsAnnotations must nil-check before dereferencing *annotations or it panics on a nil pointer. | +| `metadata.go` | FromMetadata / AsMetadata converting between models.Metadata and *api.Metadata. | Same nil-guard requirement as annotation.go; the two files are structurally identical and should stay in lockstep. | + +## Anti-Patterns + +- Manually copying map entries instead of a single underlying-type conversion — breaks the assumption that the domain and api types are byte-identical. +- Omitting the nil pointer guard in As* functions, causing a nil-dereference panic. +- Using ad-hoc names (ConvertAnnotations, ToModel) instead of the From*/As* convention used here and in the go-types-conversion skill. + +## Decisions + +- **Keep these casts in a shared pkg/models/http package rather than inline in each handler.** — Annotations/Metadata appear across many HTTP handlers; centralizing the trivial cast keeps the From*/As* naming consistent and avoids re-deriving the type-conversion at each site. + +## Example: Adding a new annotation/metadata-style conversion in this package. + +``` +import ( + "github.com/samber/lo" + + "github.com/openmeterio/openmeter/api" + "github.com/openmeterio/openmeter/pkg/models" +) + +func FromMetadata(metadata models.Metadata) *api.Metadata { + return lo.ToPtr((api.Metadata)(metadata)) +} + +func AsMetadata(metadata *api.Metadata) models.Metadata { + if metadata == nil { + return nil + } +// ... +``` + + diff --git a/pkg/otelx/CLAUDE.md b/pkg/otelx/CLAUDE.md new file mode 100644 index 0000000000..d7b7413579 --- /dev/null +++ b/pkg/otelx/CLAUDE.md @@ -0,0 +1,39 @@ +# otelx + + + +> OpenTelemetry helper for serializing a trace.SpanContext to/from bytes (base64-encoded JSON) so span context can ride along on Kafka messages; used by ingest/kafkaingest for trace propagation. + +## Patterns + +**SpanContext serialized as base64(JSON)** — `SerializeSpanContext` marshals the SpanContext to JSON then base64 std-encodes it; `DeserializeSpanContext` reverses this and rebuilds via trace.NewSpanContext. Both round-trip through `trace.SpanContextConfig`. (`b, _ := c.MarshalJSON(); s := base64.StdEncoding.EncodeToString(b)`) +**Stable propagation key constant** — `OTelSpanContextKey = "otel.span.context"` is the canonical header/metadata key for carrying serialized span context across message boundaries. (`const OTelSpanContextKey = "otel.span.context"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `spancontext.go` | SerializeSpanContext / DeserializeSpanContext plus the OTelSpanContextKey constant. | Deserialize reuses the `b` variable for the decoded bytes; format is base64-over-JSON on both sides — keep encode/decode symmetric or trace context will be lost silently. | + +## Anti-Patterns + +- Changing the serialization format on one side only (e.g. dropping base64), breaking span propagation between producer and consumer. +- Hard-coding the message key string instead of referencing OTelSpanContextKey. + +## Decisions + +- **base64-encode the JSON span context.** — Produces an ASCII-safe payload that can be carried in Kafka message headers/metadata without binary-encoding concerns. + +## Example: Attach span context to a Kafka message + +``` +import "github.com/openmeterio/openmeter/pkg/otelx" + +b, err := otelx.SerializeSpanContext(span.SpanContext()) +if err != nil { + return err +} +headers[otelx.OTelSpanContextKey] = b +``` + + diff --git a/pkg/pagination/CLAUDE.md b/pkg/pagination/CLAUDE.md new file mode 100644 index 0000000000..446da33499 --- /dev/null +++ b/pkg/pagination/CLAUDE.md @@ -0,0 +1,51 @@ +# pagination + + + +> Offset/limit (v1) pagination primitives used by ~119 packages: Page{PageSize,PageNumber}, Result[T] page wrapper with custom JSON flattening, a closure-backed Paginator[T] interface, and CollectAll to drain all pages. The newer cursor/keyset model lives in the pkg/pagination/v2 sub-package. + +## Patterns + +**Page is 1-based with derived Offset/Limit** — PageNumber starts at 1; Offset()=PageSize*(PageNumber-1), Limit()=PageSize. Validate() rejects negative size and PageNumber<1. Build via NewPage / NewPageFromRef (nil-pointer-safe for query params). (`page.Offset() / page.Limit() in page.go feed SQL OFFSET/LIMIT`) +**Paginator via NewPaginator closure, not a custom struct** — Wrap a `func(ctx, Page) (Result[T], error)` in NewPaginator[T]; the unexported paginator struct satisfies Paginator[T]. Never define a new Paginator implementation struct. (`NewPaginator[int](func(ctx, page) (Result[int], error){...})`) +**Result JSON flattens Page fields** — Result.MarshalJSON hoists PageSize/PageNumber to top-level and emits `{pageSize,page,totalCount,items}` in that exact order (field ordering is test-enforced). Result tags Page with json:"-". (`Result[int] marshals to {"pageSize":10,"page":1,"totalCount":3,"items":[...]}`) +**Map results with MapResult / MapResultErr** — Transform Result[In] to Result[Out] preserving Page+TotalCount via MapResult (pure) or MapResultErr (fallible mapper). Use these in httpdriver layers rather than rebuilding Result manually. (`pagination.MapResult(domainResult, ToAPIThing)`) +**CollectAll is bounded and not partial-tolerant** — CollectAll drains pages until a short page, capped at MAX_SAFE_ITER (10_000) pages, and returns nil items on ANY error (unlike v2.CollectAll). Pass the real page size used by the paginator. (`CollectAll(ctx, paginator, pageSize) — short page ends the loop`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `page.go` | Page struct, NewPage/NewPageFromRef, Offset/Limit/Validate/IsZero, InvalidError. | PageNumber is 1-based; Offset underflows to negative if you pass PageNumber=0 — always Validate or use NewPageFromRef defaults. | +| `result.go` | Result[T] with custom MarshalJSON flattening + MapResult/MapResultErr converters. | JSON key order is asserted in pagination_test.go; changing MarshalJSON field order breaks the test and API contract. | +| `pagination.go` | Paginator[T] interface + NewPaginator closure factory. | Only the closure form is supported; the concrete paginator type is unexported. | +| `collect.go` | CollectAll drains a Paginator across pages with a 10_000-page safety cap. | Returns nil (not the partial slice) on error or when MAX_SAFE_ITER is exceeded; v2's CollectAll behaves differently. | + +## Anti-Patterns + +- Treating PageNumber as 0-based — Offset() assumes 1-based and goes negative otherwise. +- Reordering or adding fields in Result.MarshalJSON without updating the order-enforcing test and API consumers. +- Defining a bespoke Paginator[T] implementation instead of NewPaginator. +- Assuming CollectAll returns the items gathered so far on error — it returns nil. +- Using this offset/limit model where keyset/cursor semantics are needed — that is pkg/pagination/v2. + +## Decisions + +- **Result flattens Page into the JSON envelope** — Keeps the wire shape a single flat object {pageSize,page,totalCount,items} matching the OpenAPI paginated response, while Result stays a typed struct internally. +- **Paginator is a closure-backed generic interface** — Lets any repo expose pagination by supplying one function, enabling generic helpers like CollectAll/MapResult without per-entity boilerplate. +- **Keep v1 offset pagination separate from v2 cursor pagination** — Offset/limit and keyset cursors have incompatible state and guarantees; splitting them avoids mixing Page-based and Cursor-based APIs in one package. + +## Example: Expose a repo result as a Paginator and drain it + +``` +p := pagination.NewPaginator[Item](func(ctx context.Context, page pagination.Page) (pagination.Result[Item], error) { + rows, total, err := repo.list(ctx, page.Offset(), page.Limit()) + if err != nil { + return pagination.Result[Item]{}, err + } + return pagination.Result[Item]{Page: page, TotalCount: total, Items: rows}, nil +}) +all, err := pagination.CollectAll(ctx, p, 100) +``` + + diff --git a/pkg/pagination/v2/CLAUDE.md b/pkg/pagination/v2/CLAUDE.md new file mode 100644 index 0000000000..cee3d4aef3 --- /dev/null +++ b/pkg/pagination/v2/CLAUDE.md @@ -0,0 +1,57 @@ +# v2 + + + +> Cursor-based (keyset) pagination primitives. Provides an opaque base64 Cursor (time+ID), a generic Paginator[T] interface backed by a closure, a Result[T] page wrapper, and CollectAll to drain a paginator across pages. This is the v2 cursor pagination model distinct from the older offset/limit pagination in pkg/pagination. + +## Patterns + +**Cursor is always UTC-normalized** — NewCursor stores Time as t.UTC(); Encode re-applies .UTC() before formatting. Two cursors for the same instant in different zones must encode identically. (`cursor := NewCursor(nyTime, "id") // cursor.Time == nyTime.UTC()`) +**Cursor wire format is base64(,)** — Encode/Decode use cursorDelimiter "," and SplitN(...,2) so the ID may itself contain commas. Never hand-construct the encoded string; round-trip via Encode/DecodeCursor. (`encoded := c.Encode(); c2, err := DecodeCursor(encoded)`) +**Cursor implements encoding.Text(Un)Marshaler** — MarshalText delegates to Encode, UnmarshalText to the decode path. EncodePtr returns nil for a nil receiver so it maps cleanly to optional API fields. (`nextCursor := result.NextCursor.EncodePtr() // *string, nil-safe`) +**Paginate via NewPaginator closure, not a custom struct** — Paginator[T] is a one-method interface; NewPaginator wraps a func(ctx, *Cursor) (Result[T], error). Implement pagination by supplying the closure rather than defining new Paginator types. (`p := NewPaginator[int](func(ctx context.Context, cur *Cursor) (Result[int], error) { ... })`) +**NextCursor derived from last item's Cursor()** — NewResult requires T to implement Item (Cursor() Cursor) and sets NextCursor from the last item, or nil for an empty page. Items signal end-of-data by returning Result with NextCursor==nil. (`func (i TestItem) Cursor() Cursor { return NewCursor(i.CreatedAt, i.ID) }`) +**CollectAll is bounded and error-tolerant** — CollectAll loops at most MAX_SAFE_ITER (10_000) pages, copies the incoming cursor defensively, stops when NextCursor==nil, and on error returns the items gathered so far alongside the error (not nil). (`all, err := CollectAll[T](ctx, paginator, cursor) // partial 'all' usable even when err != nil`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `cursor.go` | Cursor{Time,ID} value type: NewCursor, Validate, Encode/EncodePtr, DecodeCursor, MarshalText/UnmarshalText. | Encode forces UTC and uses time.RFC3339 (second precision) — sub-second time is lost across a round trip. Validate rejects zero Time and empty ID. | +| `pagination.go` | Item interface (Cursor() Cursor), Paginator[T] interface, and NewPaginator closure constructor. | paginator[T] is unexported; the only construction path is NewPaginator. Don't add parallel Paginator implementations unless genuinely needed. | +| `result.go` | Result[T]{Items, NextCursor} page struct and NewResult constructor (T constrained to Item). | NewResult's NextCursor is the LAST item's own cursor — it is an inclusive keyset marker, not an exclusive offset. Empty input yields nil NextCursor. | +| `collect.go` | CollectAll generic drain loop with MAX_SAFE_ITER cap and defensive cursor copy. | An always-non-nil NextCursor paginator silently caps at 10_000 items with no error; ensure terminating conditions set NextCursor==nil. | + +## Anti-Patterns + +- Constructing or parsing the encoded cursor string manually instead of via Encode/DecodeCursor (breaks base64 + comma-in-ID handling). +- Storing or comparing Cursor.Time in a non-UTC zone — breaks encode stability and equality assertions. +- Relying on sub-second precision surviving Encode/Decode (RFC3339 truncates to seconds). +- Defining a new Paginator[T] struct instead of NewPaginator; or building offset-style pagination here (that belongs in the v1 pkg/pagination). +- Assuming CollectAll returns nil items on error — it returns the partially collected slice. + +## Decisions + +- **Cursor encodes time+ID and is UTC-normalized + base64.** — Keyset pagination needs a stable, opaque, zone-independent ordering token safe to pass over HTTP query params. +- **CollectAll returns gathered items together with any mid-stream error.** — Callers can use partial results and still surface the failure, rather than losing already-fetched pages. +- **Paginator is a closure-backed generic interface.** — Lets each call site supply its own page-fetch logic without a bespoke type, keeping the package a pure utility. + +## Example: Build a paginator and drain all pages with CollectAll + +``` +p := pagination.NewPaginator[int](func(ctx context.Context, cur *pagination.Cursor) (pagination.Result[int], error) { + page, next, err := fetchPage(ctx, cur) + if err != nil { + return pagination.Result[int]{}, err + } + return pagination.Result[int]{Items: page, NextCursor: next}, nil +}) + +all, err := pagination.CollectAll[int](ctx, p, nil) +if err != nil { + // 'all' still holds items collected before the failure + return all, err +} +``` + + diff --git a/pkg/pglockx/CLAUDE.md b/pkg/pglockx/CLAUDE.md new file mode 100644 index 0000000000..e963dd3c37 --- /dev/null +++ b/pkg/pglockx/CLAUDE.md @@ -0,0 +1,27 @@ +# pglockx + + + +> Thin wrapper around cirello.io/pglock that constructs a Postgres-backed distributed lock client over the `distributed_locks` table. Its primary constraint: the lock client is created via pglock.UnsafeNew and depends on validated lease/heartbeat timing. + +## Patterns + +**Config.Validate before construction** — New() calls config.Validate() first and refuses to build a client on invalid config, wrapping the error. (`if err := config.Validate(); err != nil { return nil, fmt.Errorf("invalid lock configuration: %w", err) }`) +**Lease/heartbeat invariant** — Validate enforces LeaseTime must be at least twice HeartbeatInterval, and Owner must be non-empty; errors collected via errors.Join. (`if c.LeaseTime/2 < c.HeartbeatInterval { errs = append(errs, errors.New(...)) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `pglock.go` | Defines Config (LeaseTime, HeartbeatInterval, Owner), Validate(), and New(db, config) returning *pglock.Client over the hardcoded `distributed_locks` table. | Uses pglock.UnsafeNew (not New) — table is fixed via WithCustomTable(lockTable). DefaultHeartbeatInterval=3s, DefaultLeaseTime=1m; preserve the lease>=2*heartbeat relationship if changing defaults. | + +## Anti-Patterns + +- Calling pglock.New/UnsafeNew directly instead of going through New() and skipping config validation. +- Setting HeartbeatInterval too close to LeaseTime (violates the 2x lease invariant). + +## Decisions + +- **Use Postgres-based pglock with a custom `distributed_locks` table.** — Reuses the existing Postgres dependency for distributed leader/worker locking instead of adding a separate coordination service. + + diff --git a/pkg/pgxpoolobserver/CLAUDE.md b/pkg/pgxpoolobserver/CLAUDE.md new file mode 100644 index 0000000000..1592a62d14 --- /dev/null +++ b/pkg/pgxpoolobserver/CLAUDE.md @@ -0,0 +1,28 @@ +# pgxpoolobserver + + + +> OpenTelemetry instrumentation helper that registers observable metrics for a pgxpool.Pool. Single-function package consumed by pkg/framework/pgdriver to expose connection-pool stats. + +## Patterns + +**Register-then-callback metric registration** — Each metric is created via meter.Int64ObservableCounter/Gauge, appended to allMetrics, then a single RegisterCallback reads pool.Stat() and ObserveInt64s every value. (`_, err = meter.RegisterCallback(func(_ context.Context, o metric.Observer) error { stat := pool.Stat(); o.ObserveInt64(acquireCountMetric, stat.AcquireCount(), ...); return nil }, allMetrics...)`) +**Fail-fast on metric creation error** — Every meter.Int64Observable* call is immediately error-checked and returns on failure before registering the callback. (`acquireCountMetric, err := meter.Int64ObservableCounter("pgxpool.acquire_count", ...); if err != nil { return err }`) +**Attribute pass-through** — additionalAttributes variadic is forwarded to every ObserveInt64 via metric.WithAttributes so callers can tag pool metrics. (`o.ObserveInt64(idleConnsMetric, int64(stat.IdleConns()), metric.WithAttributes(additionalAttributes...))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `observer.go` | Single exported func ObservePoolMetrics(meter, pool, ...attrs) that registers ~13 `pgxpool.*` metrics (acquire_count, idle_conns, total_conns, etc.) from pgxpool.Stat(). | Avg acquire duration is only observed when acquireCount > 0 to avoid divide-by-zero. Implementation is adapted from cmackenzie1/pgxpool-prometheus; keep metric names `pgxpool.*` stable for dashboards. | + +## Anti-Patterns + +- Registering multiple callbacks instead of one callback over allMetrics. +- Computing avg acquire duration without guarding acquireCount > 0. + +## Decisions + +- **One RegisterCallback reading pool.Stat() once per collection cycle.** — pool.Stat() is a consistent snapshot; reading it once per observe cycle keeps all metrics coherent and cheap. + + diff --git a/pkg/redis/CLAUDE.md b/pkg/redis/CLAUDE.md new file mode 100644 index 0000000000..7d219bb51f --- /dev/null +++ b/pkg/redis/CLAUDE.md @@ -0,0 +1,30 @@ +# redis + + + +> Redis client factory and configuration for OpenMeter, supporting standalone and Sentinel failover modes with optional TLS, plus OTel tracing/metrics instrumentation. + +## Patterns + +**Config struct with Validate + Configure(viper)** — Config holds Address/Database/auth plus nested Sentinel and TLS structs; Validate() aggregates errors via errors.Join; Configure(v, prefix) sets viper defaults under a prefix. (`func Configure(v *viper.Viper, prefix string) { v.SetDefault(fmt.Sprintf("%s.address", prefix), "127.0.0.1:6379") }`) +**Functional options for instrumentation** — NewClient(Options, ...Option) applies WithTracingProvider/WithMeterProvider options; nil providers are ignored. (`func WithTracingProvider(p trace.TracerProvider) Option { return func(o *Options) { if p != nil { o.TracingProvider = p } } }`) +**Sentinel vs standalone branch** — If Sentinel.Enabled, build redis.NewFailoverClient with MasterName + SentinelAddrs=[Address]; otherwise redis.NewClient with Addr=Address. (`if o.Sentinel.Enabled { client = redis.NewFailoverClient(&redis.FailoverOptions{MasterName: o.Sentinel.MasterName, SentinelAddrs: []string{o.Address}, ...}) }`) +**Always instrument with redisotel** — Both InstrumentTracing and InstrumentMetrics are always called (provider options only added when non-nil), errors wrapped with fmt.Errorf. (`if err := redisotel.InstrumentTracing(client, tracingOpts...); err != nil { return nil, fmt.Errorf(...) }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `client.go` | Options struct (embeds Config + providers), Option functions, and NewClient that builds + instruments the *redis.Client. | TLS forces MinVersion TLS1.3; InsecureSkipVerify is wired from config. Sentinel uses single Address as the sentinel addr list. | +| `config.go` | Config struct, Validate(), Config.NewClient() convenience, and Configure(viper, prefix) defaults. | Configure sets an `expiration` default (24h) that is not a field on Config — it is read elsewhere. Validate requires Address and (when Sentinel enabled) MasterName. | + +## Anti-Patterns + +- Constructing redis.Client directly instead of via NewClient/Config.NewClient (skips OTel instrumentation). +- Adding config fields without a corresponding Configure() viper default and Validate() check. + +## Decisions + +- **Embed Config inside Options and layer functional Options for providers.** — Lets config-driven and DI-driven (tracer/meter) inputs combine without a wide constructor signature. + + diff --git a/pkg/ref/CLAUDE.md b/pkg/ref/CLAUDE.md new file mode 100644 index 0000000000..9d3082ea48 --- /dev/null +++ b/pkg/ref/CLAUDE.md @@ -0,0 +1,24 @@ +# ref + + + +> Tiny value-type package providing IDOrKey — a reference that is either a ULID id or a string key — used widely across billing, ledger, and productcatalog to resolve resources by id-or-key. + +## Patterns + +**ULID-detection parsing** — ParseIDOrKey(s) tries ulid.Parse; success means it's an ID, failure means it's a Key. (`if _, err := ulid.Parse(s); err != nil { n.Key = s } else { n.ID = s }`) +**Validate requires one of id/key** — IDOrKey.Validate() errors when both ID and Key are empty. (`if i.ID == "" && i.Key == "" { return fmt.Errorf("either id or key is required") }`) +**GetIDs/GetKeys nil-safe accessors** — GetIDs/GetKeys return nil (not empty slice) when the respective field is empty, for easy spread into filter args. (`func (i IDOrKey) GetIDs() []string { if i.ID == "" { return nil }; return []string{i.ID} }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `ref.go` | Defines IDOrKey{ID,Key} with json tags, Validate, GetIDs, GetKeys, and ParseIDOrKey. | Classification is purely ULID-shape based — a key that happens to be a valid ULID will be treated as an ID. Both fields can be set when constructed directly (e.g. from JSON), but ParseIDOrKey sets exactly one. | + +## Anti-Patterns + +- Assuming a non-empty string is a key without trying ULID parse — use ParseIDOrKey. +- Returning empty slices from GetIDs/GetKeys (breaks the nil-omit convention callers rely on). + + diff --git a/pkg/server/CLAUDE.md b/pkg/server/CLAUDE.md new file mode 100644 index 0000000000..31aaa7d2a9 --- /dev/null +++ b/pkg/server/CLAUDE.md @@ -0,0 +1,45 @@ +# server + + + +> Shared HTTP server middleware and request-logging primitives reused across both api/v3/server and openmeter/server, built on go-chi middleware and OTel semconv. + +## Patterns + +**Middleware as func(http.Handler) http.Handler** — Each middleware is a constructor returning the standard chi/net-http middleware signature; MiddlewareFunc aliases it for cross-version reuse. (`type MiddlewareFunc func(http.Handler) http.Handler`) +**OTel semconv attribute keys** — Request attributes and log fields use go.opentelemetry.io/otel/semconv/v1.27.0 keys (HTTPRequestMethodKey, URLFullKey, HTTPResponseStatusCodeKey) rather than ad-hoc strings. (`attrs[string(semconv.HTTPRequestMethodKey)] = r.Method`) +**chi LogFormatter/LogEntry implementation** — RequestLogger implements middleware.LogFormatter and RequestLoggerEntry implements middleware.LogEntry (compile-time asserted via var _ ...), logging via slog at Debug on Write and Error on Panic. (`var ( _ middleware.LogFormatter = (*RequestLogger)(nil); _ middleware.LogEntry = (*RequestLoggerEntry)(nil) )`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `attributes.go` | GetRequestAttributes(r) builds an OTel-semconv attribute map for a request; adds req_id from middleware.GetReqID. | Requires middleware.RequestID to be installed upstream or req_id will be absent. There is no semconv key for request id, so a custom `req_id` key is used. | +| `logger.go` | NewRequestLoggerMiddleware(slog.Handler) plus RequestLogger/RequestLoggerEntry implementing chi's logging hooks. | Successful requests log at slog.LevelDebug — they are silent at higher log levels. Panics log stack + panic value at Error. | +| `poweredby.go` | NewPoweredByMiddleware sets the X-Powered-By: "OpenMeter by Kong, Inc." header on every response. | Header value is a constant; change it in one place. Covered by poweredby_test.go. | +| `middleware.go` | Declares the shared MiddlewareFunc type used across API versions. | Keep this signature identical to net/http middleware so chi .Use accepts it directly. | + +## Anti-Patterns + +- Using hardcoded attribute/log-field strings instead of semconv keys. +- Logging successful requests above Debug level (breaks the intended quiet default). +- Duplicating the X-Powered-By value instead of using the constant in poweredby.go. + +## Decisions + +- **Centralize cross-version HTTP middleware here rather than in api/v3 or openmeter/server.** — Both server stacks import pkg/server so request logging, attributes, and headers stay consistent across API versions. + +## Example: Adding a response-header middleware in chi style + +``` +func NewPoweredByMiddleware() func(next http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set(poweredByHeader, poweredByValue) + next.ServeHTTP(w, r) + }) + } +} +``` + + diff --git a/pkg/set/CLAUDE.md b/pkg/set/CLAUDE.md new file mode 100644 index 0000000000..3077b99a25 --- /dev/null +++ b/pkg/set/CLAUDE.md @@ -0,0 +1,39 @@ +# set + + + +> A tiny generic, mutex-guarded set data structure (Set[T comparable]) plus free functions for set algebra. Used by billing adapter/httpdriver to deduplicate and diff comparable keys. + +## Patterns + +**Constructor returns pointer** — New[T](items...) builds the internal map and returns *Set[T]; callers always hold a pointer because Set carries a sync.RWMutex which must not be copied. (`s := set.New(1, 2, 3) // *Set[int]`) +**Lock discipline by intent** — Mutating methods (Add, Remove) take s.mu.Lock(); read methods (AsSlice, IsEmpty) take s.mu.RLock(). Free functions RLock every input set under defer before reading content. (`func (s *Set[T]) Add(items ...T) { s.mu.Lock(); defer s.mu.Unlock(); ... }`) +**Variadic free functions for algebra** — Subtract(a, b...) and Union(sets...) are package-level functions that return a fresh *Set, never mutating inputs. (`res := set.Union(set.New(1,2), set.New(2,3))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `set.go` | Whole package: Set[T] type, New/Add/Remove/AsSlice/IsEmpty methods, Subtract/Union free functions. | Set embeds sync.RWMutex via field mu; never copy a Set value (always pass *Set). Subtract RLocks `a` and all `b` sets — passing the same set twice deadlocks via re-entrant RLock under contention. | +| `set_test.go` | Tests Union/Subtract/IsEmpty plus a locking smoke test using testify/assert.ElementsMatch. | AsSlice order is non-deterministic (map iteration); assert with ElementsMatch, not Equal. | + +## Anti-Patterns + +- Copying a Set by value — duplicates the embedded mutex and breaks locking. +- Relying on AsSlice ordering — map iteration is unordered. +- Adding methods that read content without taking at least RLock. + +## Decisions + +- **Mutex-guarded rather than a bare map[T]struct{}.** — Comment-documented concurrency smoke test shows the package is meant to be safe for concurrent Add/Remove. + +## Example: Diff two key sets without mutating inputs + +``` +import "github.com/openmeterio/openmeter/pkg/set" + +added := set.Subtract(set.New(newKeys...), set.New(oldKeys...)) +if !added.IsEmpty() { handle(added.AsSlice()) } +``` + + diff --git a/pkg/slicesx/CLAUDE.md b/pkg/slicesx/CLAUDE.md new file mode 100644 index 0000000000..f01d40202d --- /dev/null +++ b/pkg/slicesx/CLAUDE.md @@ -0,0 +1,49 @@ +# slicesx + + + +> Generic slice helpers that complement github.com/samber/lo: error-aware mapping, ordered diffs, grouping, normalization, and nil/empty handling. One of the most widely imported pkg utilities across billing, subscription, entitlement, and api/v3. + +## Patterns + +**Nil-preserving Map** — Map[T,S] returns nil for nil input and otherwise a same-length slice; MapWithErr joins per-element errors with errors.Join and returns (nil, err) if any element fails. (`out, err := slicesx.MapWithErr(in, func(x T) (S, error) { ... })`) +**Diff as a queryable object** — NewDiff(base, new) wraps lo.Difference into a Diff with Additions/Removals/Changed/HasChanged plus O(1) membership via InAdditions/InRemovals/Has backed by internal maps. (`d := slicesx.NewDiff(base, next); if d.HasChanged() { ... }`) +**Fail-fast uniqueness grouping** — UniqueGroupBy returns (map, false) when any key maps to more than one element, instead of silently picking one. (`m, ok := slicesx.UniqueGroupBy(items, keyFn); if !ok { return errDuplicate }`) +**Normalize = sort + dedup** — Normalize[cmp.Ordered] clones, sorts, then slices.Compact; nil input stays nil. Used for stable comparable key lists. (`keys := slicesx.Normalize([]string{"b","a","a"}) // [a b]`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `map.go` | Map and MapWithErr — the core mapping primitives. | Map preserves nil (returns nil, not []S{}); MapWithErr skips failed elements but ultimately returns nil slice plus joined error — never a partial slice. | +| `diff.go` | Diff[T,S] type + NewDiff built on lo.Difference and lo.SliceToMap. | Changed() does append(d.additions, d.removals...) which can mutate the additions backing array; treat the result as owned/throwaway. | +| `empty.go` | EmptyAsNil — collapses zero-length slices to nil, mainly for struct-equality in tests. | Intended for test equality; don't use to signal absence in production logic. | +| `each.go` | ForEachUntilWithErr — iterate with (breaks, err) control flow. | each_test.go contains a stray TestASDF smoke test unrelated to the package — harmless but noise. | +| `groupby.go` | UniqueGroupBy — group with single-element-per-key invariant. | Returns (nil, false) on collision; callers must check the bool. | +| `normalize.go` | Normalize — sort+compact for cmp.Ordered slices. | Compact only removes adjacent duplicates, hence the sort is required first. | +| `slice.go` | SliceToPtrSlice — []T to []*T taking addresses of the backing array. | Returned pointers alias the input slice's elements; mutating one mutates the other. | + +## Anti-Patterns + +- Returning []S{} instead of nil from Map-style helpers — breaks nil-preservation contract. +- Ignoring the bool from UniqueGroupBy and assuming the map is complete. +- Calling Normalize/Compact without sorting first for non-pre-sorted data. +- Reusing the slice returned by Diff.Changed() while still reading Additions(). + +## Decisions + +- **Wraps lo rather than replacing it.** — diff.go and groupby.go import samber/lo; slicesx only adds the error-aware / invariant-checking variants lo lacks. +- **Nil input short-circuits in Map/MapWithErr.** — Keeps nil semantics so callers can distinguish 'no slice' from 'empty result'. + +## Example: Map a slice of domain objects to DTOs, aggregating conversion errors + +``` +import "github.com/openmeterio/openmeter/pkg/slicesx" + +lines, err := slicesx.MapWithErr(domainLines, func(l Line) (apiLine, error) { + return toAPILine(l) +}) +if err != nil { return nil, err } +``` + + diff --git a/pkg/sortx/CLAUDE.md b/pkg/sortx/CLAUDE.md new file mode 100644 index 0000000000..22f76cb076 --- /dev/null +++ b/pkg/sortx/CLAUDE.md @@ -0,0 +1,37 @@ +# sortx + + + +> Defines the project-wide sort Order string enum (ASC/DESC) shared by list/pagination APIs and adapters across billing, customer, notification, productcatalog, and api/v3. + +## Patterns + +**Order string enum with default** — Order is a string type with OrderAsc="ASC", OrderDesc="DESC", OrderDefault=OrderAsc, OrderNone="". Use these constants, never raw strings. (`order := sortx.OrderDesc`) +**IsDefaultValue means unset** — IsDefaultValue() returns true only when Order==OrderNone (empty), used to decide whether to apply a fallback ordering. (`if order.IsDefaultValue() { order = sortx.OrderDefault }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `order.go` | Entire package: Order type, the four constants, String(), IsDefaultValue(). | A TODO notes IsDefaultValue is misnamed — it checks for unset (OrderNone), not for OrderDefault. Don't assume it returns true for OrderAsc. | + +## Anti-Patterns + +- Comparing against literal "ASC"/"DESC" strings instead of the constants. +- Treating IsDefaultValue() as 'equals OrderDefault' — it only tests OrderNone. + +## Decisions + +- **Single shared enum rather than per-package order types.** — 229+ importers across api/v3 and openmeter domains reuse one canonical Order so list endpoints stay consistent. + +## Example: Default an unset order before querying + +``` +import "github.com/openmeterio/openmeter/pkg/sortx" + +if order.IsDefaultValue() { + order = sortx.OrderDefault +} +``` + + diff --git a/pkg/statelessx/CLAUDE.md b/pkg/statelessx/CLAUDE.md new file mode 100644 index 0000000000..e88163ede3 --- /dev/null +++ b/pkg/statelessx/CLAUDE.md @@ -0,0 +1,42 @@ +# statelessx + + + +> Adapter helpers that bridge typed, validated functions into the untyped func(context.Context, ...any) shape expected by a stateless state-machine/condition framework. Used by billing charge services (creditpurchase/flatfee/usagebased) and billing/service. + +## Patterns + +**Typed-to-untyped action adapters** — EntryFunc wraps a no-arg ActionFn; WithParameters[T models.Validator] type-asserts args[0] to T, calls T.Validate(), then invokes the typed function — all surfaced as func(ctx, ...any) error. (`h := statelessx.WithParameters(func(ctx context.Context, in CreateInput) error { ... })`) +**Error-joining composition** — AllOf(fns...) runs every ActionFn regardless of individual failures and joins errors with errors.Join — no short-circuit. (`action := statelessx.AllOf(stepA, stepB, stepC)`) +**Condition adapters** — BoolFn lifts func()bool to the framework's func(ctx, ...any) bool; Not negates a func()bool predicate. (`guard := statelessx.BoolFn(statelessx.Not(isClosed))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `actions.go` | ActionFn type, EntryFunc, AllOf, WithParameters[T models.Validator]. | WithParameters validates input via T.Validate() before running — T MUST implement models.Validator; it errors (not panics) on missing/wrong-typed args[0]. | +| `conditions.go` | BoolFn and Not condition adapters. | Both ignore context/args entirely — only use for state-independent predicates. | + +## Anti-Patterns + +- Passing a type to WithParameters that doesn't implement models.Validator — won't compile / loses validation. +- Assuming AllOf stops on first error — it always runs all functions and joins errors. +- Using BoolFn/Not for predicates that actually need ctx or args. + +## Decisions + +- **Generic WithParameters enforces Validate() at the framework boundary.** — Guarantees every typed action validates its input (via models.Validator) before the stateless transition body runs. + +## Example: Register a validated typed action in a stateless transition + +``` +import ( + "github.com/openmeterio/openmeter/pkg/statelessx" +) + +entry := statelessx.WithParameters(func(ctx context.Context, in CreateChargeInput) error { + return svc.create(ctx, in) // in.Validate() already ran +}) +``` + + diff --git a/pkg/strcase/CLAUDE.md b/pkg/strcase/CLAUDE.md new file mode 100644 index 0000000000..0c072bb734 --- /dev/null +++ b/pkg/strcase/CLAUDE.md @@ -0,0 +1,35 @@ +# strcase + + + +> Minimal snake_case<->camelCase string conversion, used by entitlement/credit/productcatalog HTTP drivers and tools/migrate/viewgen for identifier translation. + +## Patterns + +**Pure string conversion helpers** — SnakeToCamel uppercases the char after each '_'; CamelToSnake inserts '_' before each uppercase rune and lowercases it. No allocation strategy beyond strings.Builder in CamelToSnake. (`strcase.SnakeToCamel("a_b_c") // "aBC"`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `strcase.go` | SnakeToCamel and CamelToSnake functions. | Round-trips only for lowercase-snake input. Non-alphanumerics ('-','/') pass through. Existing uppercase in snake input is preserved, so CamelToSnake(SnakeToCamel(x)) is not guaranteed identity for mixed-case input — see TestCamelToSnakeToCamel covering only well-formed cases. | +| `strcase_test.go` | Table tests for both directions plus the round-trip test. | Test cases include special chars; treat them as the spec for edge behavior. | + +## Anti-Patterns + +- Assuming a perfect round trip for arbitrary mixed-case input. +- Reaching for a heavier external strcase library when these two functions already cover the API/identifier needs. + +## Decisions + +- **Hand-rolled instead of a dependency.** — Only two simple conversions are needed (API field <-> identifier casing), keeping the dependency surface minimal. + +## Example: Convert an API field name to a DB-style column + +``` +import "github.com/openmeterio/openmeter/pkg/strcase" + +col := strcase.CamelToSnake("createdAt") // "created_at" +``` + + diff --git a/pkg/timeutil/CLAUDE.md b/pkg/timeutil/CLAUDE.md new file mode 100644 index 0000000000..c3c69ba384 --- /dev/null +++ b/pkg/timeutil/CLAUDE.md @@ -0,0 +1,63 @@ +# timeutil + + + +> Value-type time-interval and recurrence algebra used across billing, subscription, entitlement and credit domains. Provides Period implementations (ClosedPeriod, OpenPeriod, StartBoundedPeriod), Recurrence iteration, and Timeline period derivation — all immutable, allocation-light, dependency-free except pkg/datetime. + +## Patterns + +**Period interface contract: three containment semantics** — Every period type implements Period (period.go): Contains (inclusive start, exclusive end), ContainsInclusive (both ends), ContainsExclusive (neither end). New period types must satisfy all three with a compile-time `var _ Period = T{}` assertion. (`var _ Period = ClosedPeriod{} // closedperiod.go; same in openperiod.go, boundedperiod.go`) +**Value receivers, no mutation** — All methods take value receivers and return new structs or pointers; periods are copied freely. Intersection/Union/Difference return fresh values (or nil for OpenPeriod.Intersection meaning 'no overlap'). (`func (p ClosedPeriod) Intersection(other ClosedPeriod) *ClosedPeriod // returns nil when !newFrom.Before(newTo)`) +**Boundary enum gates recurrence direction** — Recurrence iteration helpers take a Boundary (Inclusive/Exclusive, boundary.go) and call Boundary.Validate() first. Inclusive returns t when it matches an anchor point; Exclusive steps to the next/prev value. (`func (r Recurrence) NextAfter(t time.Time, boundaryBehavior Boundary) (time.Time, error)`) +**Iteration cap via MAX_SAFE_ITERATIONS** — All recurrence stepping loops (iterateFromNextAfterInclusive, iterateFromPrevBeforeInclusive) guard against runaway iteration with MAX_SAFE_ITERATIONS (1_000_000) and return an error rather than looping forever. (`if ic >= MAX_SAFE_ITERATIONS { return RecurrenceIterator{}, fmt.Errorf("recurrence.NextAfter: too many iterations") }`) +**Calendar-correct interval addition via datetime.ISODuration** — RecurrenceInterval embeds datetime.ISODuration; addIntervalNTimes uses Interval.Mul(n) then ISODuration.AddTo, returning an error when the duration is fractional/non-exact. Handles variable-length months without overflow. (`n, ok := interval.AddTo(t); if !ok { return ..., fmt.Errorf("next recurrence calculation wasn't exact, likely a fractional duration") }`) +**Generic Timeline derives periods from sorted timestamps** — Timeline[T] sorts a clone of inputs on construction (NewTimeline) and exposes GetClosedPeriods / GetOpenPeriods. Wrap values with AsTimed(fn) so the timeline knows how to extract each element's time. Use SimpleTimeline/NewSimpleTimeline for plain time.Time. (`tl := timeutil.NewSimpleTimeline(times); periods := tl.GetOpenPeriods()`) +**Validate() collects errors, never panics** — Validate methods return descriptive errors; Recurrence.Validate aggregates via errors.Join over a []error slice. Period validators reject from.After(to) and zero anchors. (`var errs []error; ...; return errors.Join(errs...)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `period.go` | Defines the Period interface (ContainsInclusive/ContainsExclusive/Contains). | Adding a period type without all three methods breaks the `var _ Period` assertions. | +| `closedperiod.go` | Bounded [from,to] period with Overlaps, Intersection, ContainsPeriodInclusive, Truncate, IsEmpty. | Overlaps treats exactly-sequential periods ([1,2],[2,3]) as NOT overlapping; OverlapsInclusive treats them as overlapping. Intersection returns nil for zero-length or touching periods. | +| `openperiod.go` | Nullable-bound period (From/To *time.Time) with Intersection, Union, Difference, IsSupersetOf, Closed(). | nil bound means open/unbounded. Intersection returns nil for no overlap and &OpenPeriod{} for both-empty. Union of an empty period returns empty. Closed() errors if either bound is nil. | +| `boundedperiod.go` | StartBoundedPeriod (required From, optional *To) — used where start is mandatory but end may be open. | Open() lifts it to OpenPeriod; no Intersection/Union here. | +| `recurrence.go` | Recurrence{Interval,Anchor} with NextAfter/PrevBefore/GetPeriodAt and the RecurrenceIterator (Next/Prev). | Anchor is arbitrary, not necessarily first occurrence. GetPeriodAt yields a period where Contains(t) holds (inclusive start, exclusive end). Construct via NewRecurrence/NewRecurrenceFromISODuration to get validation. | +| `timeline.go` | Generic Timeline[T] + Timed[T] wrapper; derives ClosedPeriods/OpenPeriods between sorted timestamps. | GetOpenPeriods on a single time returns TWO periods (open-start→t and t→open-end). NewTimeline clones+sorts; original slice untouched. | +| `boundary.go` | Boundary string enum (Inclusive/Exclusive) with Validate. | Only valid for recurrence boundary behavior; passing an arbitrary string fails Validate. | +| `compare.go` | Compare(a,b) returning int(a.Sub(b)). | Returns nanosecond delta as int, not a normalized -1/0/1; only the sign is meaningful and large gaps risk int overflow on 32-bit. | + +## Anti-Patterns + +- Mutating a period in place or assuming a method has a pointer receiver — all are value receivers returning new values. +- Treating OpenPeriod.Intersection==nil as 'empty intersection' — nil means NO overlap, &OpenPeriod{} means fully-open. +- Hand-iterating recurrence with raw time.Add for months/years — use Recurrence/RecurrenceInterval so variable-length months and overflow are handled. +- Confusing Overlaps vs OverlapsInclusive (and Contains vs ContainsInclusive) at sequential boundaries — pick the variant matching the boundary semantics you need. +- Constructing Recurrence{} as a literal and skipping Validate — use NewRecurrence so positive interval and non-zero anchor are enforced. + +## Decisions + +- **Period types are immutable value structs implementing a shared interface.** — Time intervals are passed by value across billing/subscription/credit hot paths; immutability avoids aliasing bugs and the interface lets callers stay generic over closed/open/start-bounded forms. +- **Recurrence stepping is bounded by MAX_SAFE_ITERATIONS and returns errors.** — AGENTS forbids panics in non-test paths; a misconfigured fractional interval or far-past anchor could otherwise loop indefinitely. +- **Interval math delegates to datetime.ISODuration.AddTo with an exactness check.** — Calendar arithmetic (month/year boundaries, leap days) is non-trivial; centralizing in datetime keeps recurrence correct and signals fractional durations as errors instead of silent drift. + +## Example: Iterate a monthly recurrence and get the containing period for a timestamp + +``` +import ( + "github.com/openmeterio/openmeter/pkg/datetime" + "github.com/openmeterio/openmeter/pkg/timeutil" +) + +rec, err := timeutil.NewRecurrence(timeutil.RecurrencePeriodMonth, anchor) +if err != nil { + return err +} +period, err := rec.GetPeriodAt(t) // ClosedPeriod where period.Contains(t) is true +if err != nil { + return err +} +next, err := rec.NextAfter(t, timeutil.Exclusive) +``` + + diff --git a/pkg/treex/CLAUDE.md b/pkg/treex/CLAUDE.md new file mode 100644 index 0000000000..27c8015ac9 --- /dev/null +++ b/pkg/treex/CLAUDE.md @@ -0,0 +1,60 @@ +# treex + + + +> Generic pointer-identity tree/node library (Node[T], Tree[T]) used by openmeter/subscription and pkg/models for hierarchical structures with cycle-checked construction and DFS traversal. Nodes track parent/children by pointer identity, enabling immutable-style subtree swaps. + +## Patterns + +**Node value must be a non-nil pointer** — NewNode[T] panics unless the value's reflect.Kind is Pointer and it is non-nil. This enforces the wrapper-embedding pattern where a struct holds a *Node[*Self] pointing back to itself. (`func NewNode[T any](value T) *Node[T] { if reflect.ValueOf(value).Kind() != reflect.Pointer { panic("Node value has to be a pointer") } ... }`) +**Parent/child links maintained by pointer identity** — AddChild/RemoveChild/SwapChild update both the children slice and the child.parent pointer; lookups use pointer equality (lo.Find c == child). Detached nodes have parent set to nil. (`func (n *Node[T]) AddChild(child *Node[T]) { n.children = append(n.children, child); child.parent = n }`) +**Tree construction validates acyclicity via DFS** — NewTree runs a DFS with visited+onStack maps, returning ErrGraphHasCycle on back-edges, ErrNodeGraphInvalid on nil nodes/children, ErrRootNodeIsNil on nil root. It does NOT clone — the passed root pointer becomes tr.root. (`if onStack[n] { return ErrGraphHasCycle }`) +**Pre-order DFS with prune and error propagation** — Tree.DFS callback returns (stop bool, err error): err aborts traversal immediately; stop prunes the current node's subtree but continues with siblings. Used by Leafs(). (`err = tr.DFS(func(n *Node[*T]) (bool, error) { ...; if cond { return true, nil } /* prune */; return false, nil })`) +**Immutable subtree updates via ShallowClone + SwapChild/SwapNode** — ShallowClone copies the node, keeps the same value/parent, copies the children slice and reattaches children's parent pointers to the clone. Combine with SwapChild (or Tree.SwapNode for the root) to replace a node without mutating the original subtree. (`updated.node = old.node.ShallowClone(); updated.node.SetValue(updated); parent.SwapChild(old.node, updated.node)`) +**Sentinel errors in errors.go** — All structural failures use the exported sentinel errors (ErrRootNodeIsNil, ErrGraphHasCycle, ErrNodeHasNoParentButNotRoot, ErrNodeGraphInvalid) so callers assert with errors.Is rather than string matching. (`assert.ErrorIs(t, err, ErrGraphHasCycle)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `node.go` | Node[T] type plus NewNode, AddChild/RemoveChild/SwapChild, ShallowClone, DeepClone, IsLeaf/IsRoot, Value/SetValue/Parent/Children. | NewNode panics on non-pointer or nil value (the one place treex panics — by design, library-only). ShallowClone reattaches only first-level children; DeepClone recurses and detaches the returned root (nil parent). | +| `tree.go` | Tree[T] wrapper: NewTree (cycle-checked), Root, DFS, Leafs, SwapNode. | SwapNode handles root replacement (sets t.root) but errors with ErrNodeHasNoParentButNotRoot for a parentless non-root. Comment warns: swapping a node mid-DFS-walk requires backtracking or you iterate the detached subtree. | +| `errors.go` | Exported sentinel errors for invalid graph/node structure. | Return these (not ad-hoc fmt.Errorf) for structural failures so errors.Is checks keep working. | +| `usage_example_test.go` | Canonical wrapper-embedding usage (struct owns *Node[*wrapper]) and immutable-update recipes. | This is the intended consumption pattern (mirrors subscription FieldDescriptor); follow it when adding new tree-backed types. | + +## Anti-Patterns + +- Calling NewNode with a non-pointer or nil pointer value — it panics; always pass a non-nil *T. +- Manually appending to or reordering Node.children without updating child.parent — breaks pointer-identity invariants RemoveChild/SwapChild rely on. +- Assuming NewTree clones or copies the graph — it validates in place and reuses the root pointer; mutating the original after still affects the tree. +- Swapping a node during a DFS walk and continuing forward instead of backtracking — you will traverse the now-detached subtree. +- Asserting structural failures by error string instead of errors.Is against the exported sentinels. + +## Decisions + +- **Nodes require pointer values and track identity by pointer.** — Consumers (subscription, models) embed a back-pointer (struct holding *Node[*Self]); pointer identity lets a value participate in a larger tree and supports SwapChild lookups by ==. +- **NewTree validates acyclicity but does not deep-copy.** — Trees can be large; copying on every construction would be wasteful, and immutable updates are opt-in via ShallowClone/DeepClone where callers actually need isolation. +- **ShallowClone reattaches first-level children to the clone.** — Enables immutable-style replacement of a single node while preserving the existing subtree without a full deep copy. + +## Example: Build a cycle-checked tree of wrapper structs and traverse pre-order + +``` +import "github.com/openmeterio/openmeter/pkg/treex" + +type wrapper struct { + name string + node *treex.Node[*wrapper] +} + +func newWrapper(name string) *wrapper { + w := &wrapper{name: name} + w.node = treex.NewNode(w) // value must be non-nil pointer + return w +} + +root, child := newWrapper("root"), newWrapper("child") +root.node.AddChild(child.node) +// ... +``` + + diff --git a/test/app/CLAUDE.md b/test/app/CLAUDE.md new file mode 100644 index 0000000000..b71f27c974 --- /dev/null +++ b/test/app/CLAUDE.md @@ -0,0 +1,49 @@ +# app + + + +> Integration tests for the openmeter/app domain: the app marketplace registry plus per-app-type test suites (Stripe, custom-invoicing). The root files test marketplace listing/lookup; the constraint is that all app services are assembled directly from package constructors against a real Postgres DB, never through app/common DI wiring. + +## Patterns + +**TestEnv interface + testEnv struct** — Each suite gets a TestEnv interface exposing Adapter()/App()/Close(); NewTestEnv wires a real Postgres driver, runs migrations, and constructs adapters+services, returning a closerFunc that closes the ent + postgres drivers. (`env, err := NewTestEnv(t, ctx); defer env.Close()`) +**Direct constructor wiring** — Services are built from adapter.New + service.New (customer, secret, app, appstripe, billing) — not from app/common. Each New call returns (svc, err) checked with fmt.Errorf wrapping or require.NoError. (`appAdapter, err := appadapter.New(appadapter.Config{Client: entClient}); appService, err := appservice.New(appservice.Config{Adapter: appAdapter, Publisher: publisher})`) +**Real Postgres via testutils.InitPostgresDB + migrate** — InitPostgresDB(t) yields an EntDriver; migrate.New(MigrateOptions{Migrations: migrate.OMMigrationsConfig}) then migrator.Up() creates the schema before adapters are built. (`driver := testutils.InitPostgresDB(t); migrator, _ := migrate.New(...); migrator.Up()`) +**Validated Init input structs** — Helper assemblers like InitBillingService take an input struct (InitBillingServiceInput) with a Validate() error method checking required deps (DBClient, CustomerService, AppService) before construction. (`func (i InitBillingServiceInput) Validate() error { if i.DBClient == nil { return fmt.Errorf("db client is required") } ... }`) +**Per-suite namespace via ulid** — Suites generate an isolated namespace string with ulid.Make().String() in a setupNamespace(t) helper so tests do not collide. (`s.namespace = ulid.Make().String()`) +**Mock streaming/eventbus injected** — eventbus.NewMock(t) supplies the Publisher and streamingtestutils.NewMockStreamingConnector(t) the streaming connector; meteradapter is the mockadapter bound to the ent client via SetDBClient. (`publisher := eventbus.NewMock(t); mockStreamingConnector := streamingtestutils.NewMockStreamingConnector(t)`) +**Marketplace asserted against canonical listing** — Marketplace tests compare GetMarketplaceListing/ListMarketplaceListings output to appstripe.StripeMarketplaceListing and assert not-found via models.IsGenericNotFoundError for unknown AppType. (`require.Equal(t, expectedListing.Name, listing.Name); require.True(t, models.IsGenericNotFoundError(err))`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `testenv.go` | Builds the shared TestEnv (Postgres + migrations + customer/secret/app/appstripe/billing services) and the InitBillingService helper. The appstripe service is constructed for side effects (registration) and its return value discarded. | appstripeservice.New is called with _ = (return discarded); needs WebhookURLGenerator (NewBaseURLWebhookURLGenerator) and a BillingService. Forgetting migrator.Up() leaves an empty schema. | +| `marketplace.go` | AppHandlerTestSuite with TestGetMarketplaceListing / TestListMarketplaceListings; setupNamespace seeds a ulid namespace. TestType = app.AppTypeStripe. | Expects exactly one marketplace listing (list.TotalCount == 1); adding marketplace apps breaks these counts. | +| `app_test.go` | Top-level TestApp entrypoint that builds env via NewTestEnv and runs the Marketplace subtests through AppHandlerTestSuite. | Uses context.WithCancel(context.Background()) at the test root and defers cancel + env.Close(). | + +## Anti-Patterns + +- Importing app/common or production DI wiring instead of constructing adapters/services directly — creates test-only import cycles. +- Skipping migrator.Up() or reusing a non-isolated namespace, causing cross-test data bleed. +- Asserting marketplace results against hand-built listings instead of appstripe.StripeMarketplaceListing. +- Matching errors by string instead of typed predicates like models.IsGenericNotFoundError. +- Leaking the ent/postgres drivers by not deferring env.Close()/closerFunc(). + +## Decisions + +- **Assemble app/customer/secret/billing services from package constructors against a real Postgres DB rather than app/common wiring.** — Keeps test deps narrow and avoids import cycles while still exercising real adapter SQL and the marketplace registry. +- **Construct the appstripe service for its registration side effect and discard the handle.** — The marketplace listing is registered at service construction; the test only needs it present in the registry, not a direct reference. + +## Example: Standing up the app TestEnv with real Postgres and constructor-wired services + +``` +driver := testutils.InitPostgresDB(t) +entClient := driver.EntDriver.Client() +migrator, _ := migrate.New(migrate.MigrateOptions{ConnectionString: driver.URL, Migrations: migrate.OMMigrationsConfig, Logger: testutils.NewLogger(t)}) +_ = migrator.Up() +appAdapter, _ := appadapter.New(appadapter.Config{Client: entClient}) +appService, _ := appservice.New(appservice.Config{Adapter: appAdapter, Publisher: eventbus.NewMock(t)}) +``` + + diff --git a/test/app/custominvoicing/CLAUDE.md b/test/app/custominvoicing/CLAUDE.md new file mode 100644 index 0000000000..6a7903f28f --- /dev/null +++ b/test/app/custominvoicing/CLAUDE.md @@ -0,0 +1,51 @@ +# custominvoicing + + + +> Integration tests for the custom-invoicing app (openmeter/app/custominvoicing) verifying that draft/issuing sync hooks and payment-status triggers drive a billing invoice through its state machine. Tests are built on billingtest.BaseSuite, not the application wiring layer. + +## Patterns + +**Embed billingtest.BaseSuite** — Test suites embed billingtest.BaseSuite, exposing services like AppService, CustomerService, MeterAdapter, FeatureService, BillingService, CustomInvoicingService, MockStreamingConnector. CustomInvoicingEventTestSuite further embeds CustomInvoicingTestSuite to reuse setup. (`type CustomInvoicingTestSuite struct { billingtest.BaseSuite }`) +**Shared profile setup helper** — setupDefaultBillingProfile installs the custom-invoicing app via AppService.InstallMarketplaceListing (app.AppTypeCustomInvoicing), pushes appcustominvoicing.Configuration through AppService.UpdateApp, then ProvisionBillingProfile. Toggle EnableDraftSyncHook / EnableIssuingSyncHook per scenario. (`s.setupDefaultBillingProfile(ctx, namespace, appcustominvoicing.Configuration{EnableDraftSyncHook: true, EnableIssuingSyncHook: true})`) +**Drive invoice lifecycle through service calls** — Create gathering lines via BillingService.CreatePendingInvoiceLines, materialize via InvoicePendingLines, then advance with CustomInvoicingService.SyncDraftInvoice, SyncIssuingInvoice, HandlePaymentTrigger; assert exact billing.StandardInvoiceStatus* after each. (`draftSyncedInvoice, err := s.CustomInvoicingService.SyncDraftInvoice(ctx, appcustominvoicing.SyncDraftInvoiceInput{InvoiceID: invoice.GetInvoiceID(), UpsertInvoiceResults: upsertResults})`) +**Builder results for sync inputs** — Sync inputs are constructed with the billing fluent builders billing.NewUpsertStandardInvoiceResult() and billing.NewFinalizeStandardInvoiceResult() with chained SetInvoiceNumber/SetExternalID/SetPaymentExternalID/AddLineExternalID. (`billing.NewUpsertStandardInvoiceResult().SetInvoiceNumber("DRAFT-123").SetExternalID("ext-123").AddLineExternalID(invoice.Lines.OrEmpty()[0].ID, "ext-123")`) +**Per-test unique namespace string** — Each test hardcodes a descriptive namespace string (e.g. "ns-custom-invoicing-flow") rather than ULIDs, and uses context.Background() at the top of the test body. (`namespace := "ns-custom-invoicing-flow"`) +**Meter/streaming teardown via defer** — Tests that set up meters and stream events clean up with deferred s.MeterAdapter.ReplaceMeters(ctx, []meter.Meter{}) and s.MockStreamingConnector.Reset(). (`defer s.MockStreamingConnector.Reset()`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `invocing_test.go` | Main suite (note misspelled filename). Defines CustomInvoicingTestSuite, setupDefaultBillingProfile, and full lifecycle tests TestInvoicingFlowHooksEnabled and TestInvoicingFlowPaymentStatusOnly. | Filename is 'invocing' not 'invoicing'. With hooks disabled, InvoicePendingLines lands directly in PaymentProcessingPending and assigns a generic number like INV-TECU-1; with hooks enabled it lands in DraftSyncing and requires explicit SyncDraftInvoice. | +| `event_test.go` | CustomInvoicingEventTestSuite verifying billing.NewStandardInvoiceCreatedEvent is JSON round-trippable and carries app bases (Tax/Payment/Invoicing) plus Meta decoded via appcustominvoicing.Meta.FromEventAppData. | Asserts event.Apps.*.AppBase equals invoice.Workflow.Apps.*.GetAppBase(); Meta.Configuration flags must survive marshal/unmarshal. | + +## Anti-Patterns + +- Calling app/billing adapters directly or importing app/common wiring instead of building from BaseSuite-provided services. +- Asserting invoice progress without checking the exact billing.StandardInvoiceStatus* enum at each step. +- Leaving meters or streamed events in place across tests (always defer ReplaceMeters({}) and MockStreamingConnector.Reset()). +- Assuming hooks-disabled and hooks-enabled flows produce the same terminal status — they diverge at InvoicePendingLines. + +## Decisions + +- **Tests exercise CustomInvoicingService.SyncDraftInvoice/SyncIssuingInvoice/HandlePaymentTrigger rather than simulating webhook callbacks.** — Validates the real state-machine transitions and external-ID propagation the custom-invoicing app guarantees to integrators. +- **Payment triggers are validated for full-mesh legality (e.g. paid cannot transition to uncollectible), expecting billing.ValidationError.** — Ensures invalid status transitions surface as ValidationError rather than silent state corruption. + +## Example: Advance a custom-invoicing invoice from draft.syncing to issuing.syncing + +``` +upsertResults := billing.NewUpsertStandardInvoiceResult(). + SetInvoiceNumber("DRAFT-123"). + SetExternalID("ext-123"). + AddLineExternalID(invoice.Lines.OrEmpty()[0].ID, "ext-123") + +draftSyncedInvoice, err := s.CustomInvoicingService.SyncDraftInvoice(ctx, appcustominvoicing.SyncDraftInvoiceInput{ + InvoiceID: invoice.GetInvoiceID(), + UpsertInvoiceResults: upsertResults, +}) +s.NoError(err) +s.Equal(billing.StandardInvoiceStatusIssuingSyncing, draftSyncedInvoice.Status) +``` + + diff --git a/test/app/stripe/CLAUDE.md b/test/app/stripe/CLAUDE.md new file mode 100644 index 0000000000..88ad04ab7a --- /dev/null +++ b/test/app/stripe/CLAUDE.md @@ -0,0 +1,60 @@ +# stripe + + + +> Integration tests for the Stripe app (openmeter/app/stripe): app lifecycle (install/get/update/uninstall), customer-data validation, and Stripe invoice sync including credit/usage-based progressive billing. Stripe API access is fully mocked via testify mocks so no live Stripe calls occur. + +## Patterns + +**Two test harness styles coexist** — App-handler tests use a hand-built TestEnv (NewTestEnv in testenv.go) returning a TestEnv interface; invoice tests embed billingtest.BaseSuite (StripeInvoiceTestSuite) and wire the stripe adapter/service in SetupSuite. Match the style of the file you extend. (`type StripeInvoiceTestSuite struct { billingtest.BaseSuite; AppStripeService appstripe.Service; Fixture *Fixture; StripeAppClient *StripeAppClientMock; Charges charges.Service; LedgerResolver *ledgerresolvers.AccountResolver }`) +**Stripe clients are testify mocks injected via factory** — StripeClientMock and StripeAppClientMock (stripe_mock.go) implement stripeclient interfaces; they are injected through appstripeadapter.Config.StripeClientFactory / StripeAppClientFactory closures that ignore config and return the mock. Each mock method calls input.Validate() before c.Called(...). (`StripeAppClientFactory: func(config stripeclient.StripeAppClientConfig) (stripeclient.StripeAppClient, error) { return stripeAppClient, nil }`) +**Set expectations with On(...).Return(...) then Restore()** — Program Stripe behavior per scenario via s.Env.StripeAppClient().On("GetCustomer", id).Return(...). Mocks expose Restore() which truncates ExpectedCalls; defer it (or TearDownTest calls it) so expectations do not leak between subtests. (`s.Env.StripeAppClient().On("GetCustomer", newStripeCustomerID).Return(stripeclient.StripeCustomer{StripeCustomerID: newStripeCustomerID}, nil) +defer s.Env.StripeAppClient().Restore()`) +**Fixture builds app + customer + customer-data** — Fixture (fixture.go) centralizes setup: setupApp (InstallMarketplaceListingWithAPIKey with app.AppTypeStripe), setupCustomer, setupAppCustomerData (default cus_123), and setupAppWithCustomer chaining all three. Random stripe account ids via getStripeAccountId(). (`testApp, customer, customerData, err := s.Env.Fixture().setupAppWithCustomer(ctx, s.namespace)`) +**Assert via typed error predicates** — Error outcomes are checked with domain predicates not string matching: app.IsAppNotFoundError, app.IsAppCustomerPreConditionError, app.IsAppProviderPreConditionError, models.IsGenericConflictError. (`require.True(t, app.IsAppCustomerPreConditionError(err))`) +**Invoice sync asserts Stripe line items by description/amount/metadata** — expectStripeInvoiceCreate and expectStripeInvoiceAddLines (invoice_credits_test.go) program CreateInvoice/AddInvoiceLines with mock.MatchedBy, keying expected items by Description and asserting Amount (cents), Metadata om_line_type and non-empty om_line_id. (`s.expectStripeInvoiceAddLines("stripe-partial-invoice-id", []expectedStripeInvoiceItem{{Amount: 500, Description: "...usage in period (5 x $1)", Type: "line"}, {Amount: -500, Description: "credits applied for ...", Type: "credit"}})`) +**Ledger-backed charges wired in SetupSuite** — Credit/usage scenarios build the charges stack via chargestestutils.NewServices with ledger handlers (NewCreditPurchaseHandler, NewFlatFeeHandler, NewUsageBasedHandler) from ledgertestutils.InitDeps, and create ledger-backed customers via LedgerResolver.EnsureBusinessAccounts/CreateCustomerAccounts. (`s.Charges = chargeStack.ChargesService`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `testenv.go` | NewTestEnv builds an isolated Postgres-backed TestEnv (customer/app/billing/appstripe services) with mock Stripe clients and a MockSecretService; returns a TestEnv interface with accessors and Close(). | Uses testutils.InitPostgresDB + entClient.Schema.Create; closerFunc closes ent and PG drivers. Env is shared across subtests (see 'TODO: do not share env between tests'). | +| `app_test.go` | Top-level TestAppStripe entrypoint that constructs the env once and runs AppHandlerTestSuite subtests (Create/Get/Update/Uninstall/CustomerData/Validate/CheckoutSession/PortalSession/UpdateAPIKey). | Single env reused for all subtests; mock expectations must be Restore()d between them. | +| `appstripe.go` | AppHandlerTestSuite methods: TestCreate, TestGet, TestUpdate, TestUninstall, TestCustomerData, TestCustomerValidate, plus TestStripeAPIKey constant and setupNamespace (ULID per test). | Long mock dance in TestCustomerData: Restore() and re-program On(...) between sub-scenarios; pre-condition errors distinguish customer vs provider failures. | +| `fixture.go` | Fixture struct and setupApp/setupCustomer/setupAppCustomerData/setupAppWithCustomer; defaultStripeCustomerID=cus_123; getStripeAccountId() random acct_ ids. | setupApp programs GetAccount + SetupWebhook mocks and defers Restore() — calling it twice in one scenario re-stacks expectations. | +| `invoice_test.go` | StripeInvoiceTestSuite + SetupSuite wiring (secret/appstripe adapter+service, ledger deps, charges stack, fixture); TestComplexInvoice covering multi-line UBP invoicing (flat/tiered/AI) with tax codes. | SetupSuite uses slog.Default() (acceptable in tests only). MockStreamingConnector seeded with out-of-period 0 events to baseline; defer Reset(). | +| `invoice_credits_test.go` | Progressive-billing credit-then-invoice test driving charges.Service.Create (creditpurchase + usagebased intents) and asserting Stripe line/credit items; defines expectStripeInvoiceCreate/AddLines and intent builders. | Uses clock.FreezeTime/UnFreeze around fixed dates; RemoveCircularReferences() before UpsertStandardInvoice; settles credit purchase via HandleCreditPurchaseExternalPaymentStateTransition (Authorized then Settled). | +| `stripe_mock.go` | StripeClientMock and StripeAppClientMock implementing stripeclient.StripeClient/StripeAppClient; Restore() truncates ExpectedCalls; AddInvoiceLines/UpdateInvoiceLines stable-sort inputs for deterministic matching. | Most methods call input.Validate() before Called(); DeleteInvoice returns args.Error(1) (index 1) — a quirk vs the usual Error(0). | +| `secret_mock.go` | MockSecretService wrapping a real secretservice with EnableMock/DisableMock toggle; delegates to original when mock disabled, otherwise records Called() and validates input. | Implements secret.SecretService (compile-time assert var _); validation runs even in mock mode and returns models.NewGenericValidationError. | + +## Anti-Patterns + +- Issuing real Stripe API calls — always go through StripeClientMock/StripeAppClientMock factories. +- Leaving mock expectations un-Restore()d between subtests; the env/mocks are shared and will bleed expectations. +- Matching Stripe invoice errors by string instead of typed predicates (app.IsApp*Error, models.IsGenericConflictError). +- Forgetting clock.UnFreeze() / MockStreamingConnector.Reset() defers in invoice tests, leaking frozen time or events. +- Hand-building app/customer/billing services in invoice tests instead of reusing BaseSuite + Fixture wiring. + +## Decisions + +- **Stripe access is abstracted behind stripeclient interfaces and injected via factory closures so tests swap in mocks.** — Lets integration tests exercise the full adapter/service stack against real Postgres while keeping Stripe deterministic and offline. +- **Invoice/credit tests reuse billingtest.BaseSuite and the ledger/charges test utilities rather than the app/common DI layer.** — Keeps test dependencies built from concrete package constructors, avoiding test-only import cycles per repo testing guidance. +- **Stripe line-item assertions key on Description with metadata (om_line_type, om_line_id) and cent amounts via mock.MatchedBy.** — Line ordering is non-deterministic, so matching by stable description/metadata is more robust than positional assertions. + +## Example: Assert a synced Stripe invoice contains the expected usage line and credit line + +``` +s.expectStripeInvoiceCreate(stripeApp.GetID(), cust.GetID(), partialInvoice.ID, customerData.StripeCustomerID, "stripe-partial-invoice-id") +s.expectStripeInvoiceAddLines("stripe-partial-invoice-id", []expectedStripeInvoiceItem{ + {Amount: 500, Description: "usage-based-progressive-credit-then-invoice: usage in period (5 x $1)", Type: "line"}, + {Amount: -500, Description: "credits applied for usage-based-progressive-credit-then-invoice: usage in period", Type: "credit"}, +}) + +stripePartialInvoice := lo.Must(partialInvoice.RemoveCircularReferences()) +upsertResult, err := stripeInvoicingApp.UpsertStandardInvoice(ctx, stripePartialInvoice) +s.NoError(err) +s.StripeAppClient.AssertExpectations(s.T()) +``` + + diff --git a/test/billing/CLAUDE.md b/test/billing/CLAUDE.md new file mode 100644 index 0000000000..f4900484b2 --- /dev/null +++ b/test/billing/CLAUDE.md @@ -0,0 +1,65 @@ +# billing + + + +> Integration test suite for the billing domain (package `billing`), exercising invoice lifecycle, profiles, customer overrides, tax config, line splitting, and subscription-to-billing sync against a real Postgres database. The shared `BaseSuite` constructs the full billing stack from concrete constructors (not app/common wiring) so tests run end-to-end through `BillingService`/`BillingAdapter`. + +## Patterns + +**Embed BaseSuite, run with testify/suite** — Every test file declares `type XxxTestSuite struct { BaseSuite }` and a `func TestXxx(t *testing.T) { suite.Run(t, new(XxxTestSuite)) }`. BaseSuite.SetupSuite wires the entire stack; do not re-wire services per test. (`type BillingAdapterTestSuite struct { BaseSuite }; func TestBillingAdapter(t *testing.T){ suite.Run(t, new(BillingAdapterTestSuite)) }`) +**Stack built from concrete constructors** — setupSuite calls billingservice.New, billingadapter.New, customerservice.New, appservice.New, taxcodeservice.New, meteradapter.New (mockadapter), streamingtestutils.NewMockStreamingConnector directly — never app/common DI. Add new deps the same way. (`billingService, err := billingservice.New(billingservice.Config{Adapter: billingAdapter, RatingService: billingratingservice.New(), CustomerService: s.CustomerService, AppService: s.AppService, TaxCodeService: taxCodeService, ...})`) +**Per-test namespace + provisioning sequence** — Each test creates an isolated namespace, then InstallSandboxApp(ns), CreateTestCustomer(ns, key), and ProvisionBillingProfile(ctx, ns, app.GetID(), opts...). Use s.GetUniqueNamespace(prefix) for ULID-suffixed uniqueness across parallel suites. (`sandboxApp := s.InstallSandboxApp(s.T(), ns); cust := s.CreateTestCustomer(ns, "test"); s.ProvisionBillingProfile(ctx, ns, sandboxApp.GetID(), WithProgressiveBilling())`) +**Drive behavior via BillingService, not the adapter** — Lifecycle is exercised through CreatePendingInvoiceLines, InvoicePendingLines, UpdateProfile, UpsertCustomerOverride, UpdateStandardInvoice (with EditFn). BillingAdapter is used directly only in adapter_test.go. (`res, err := s.BillingService.CreatePendingInvoiceLines(ctx, billing.CreatePendingInvoiceLinesInput{Customer: cust.GetID(), Currency: currencyx.Code(currency.USD), Lines: []billing.GatheringLine{...}})`) +**Deterministic clock with paired reset** — Tests that depend on time use clock.SetTime(...) with `defer clock.ResetTime()` (or clock.FreezeTime + clock.UnFreeze). BaseSuite.TearDownTest also calls clock.UnFreeze/ResetTime as a safety net. (`clock.SetTime(lo.Must(time.Parse(time.RFC3339, "2025-01-01T00:00:00Z"))); defer clock.ResetTime()`) +**Mock streaming for usage** — Usage is injected via s.MockStreamingConnector.AddSimpleEvent(meterSlug, value, at) with explicit timestamps, and reset with defer s.MockStreamingConnector.Reset(). Meters are registered through s.MeterAdapter.ReplaceMeters. (`s.MockStreamingConnector.AddSimpleEvent(meterSlug, 100, now.Add(time.Minute)); defer s.MockStreamingConnector.Reset()`) +**Decimal assertions via InexactFloat64** — alpacadecimal.Decimal comparisons use require.Equal(t, float64(N), actual.InexactFloat64()); totals are checked with the requireTotals(t, expectedTotals{...}, line.Totals) helper. (`s.Equal(float64(100), detailedLine.PerUnitAmount.InexactFloat64())`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `suite.go` | BaseSuite: TestDB/DBClient, BillingService, BillingAdapter, InvoiceCalculator (MockableInvoiceCalculator), CustomerService, AppService, SandboxApp, TaxCodeService; helpers InstallSandboxApp, CreateTestCustomer, GetUniqueNamespace, DebugDumpInvoice, CreateGatheringInvoice | setupSuite honors TEST_DISABLE_ATLAS (schema.Create vs atlas migrate). Hooks (subject/customer/entitlement) are registered here; missing a hook breaks cross-domain side effects. | +| `subscription_suite.go` | SubscriptionMixin + SubscriptionMixInDependencies: builds plan/subscription/addon/workflow/entitlement services via SetupSuite(t, deps). Get deps from BaseSuite.GetSubscriptionMixInDependencies() | deps.Validate() requires DBClient, FeatureRepo, FeatureService, CustomerService, MeterAdapter, MockStreamingConnector all non-nil. MultiSubscriptionEnabledFF is forced true here via ffx.NewStaticService. | +| `profile.go` | minimalCreateProfileInputTemplate(appID) — canonical CreateProfileInput with PT0S collection interval, AutoAdvance, AlignmentKindSubscription | Collection interval is PT0S (immediate) by design; collection tests must override it. | +| `adapter_test.go` | Direct BillingAdapter tests (CreateInvoice, detailed-line ID reuse via DetailedLinesWithIDReuse, ChildUniqueReferenceID) | Only file allowed to call BillingAdapter directly; constructs StandardLine/DetailedLine fixtures by hand. | +| `tax_test.go` | Tax config snapshotting through profile/override/invoice, line-splitting tax retention | Verifies normalized tax_code_id / tax_behavior DB columns via s.DBClient.BillingInvoiceLine.Query(), not just JSONB. | +| `taxcode_dual_write_test.go` | TaxCode FK dual-write/dual-read regression matrix (Group A profiles, Group B overrides) using assertTaxConfigHasStripeCode / assertInvoiceLineTaxCode | Stale-FK regressions: clearing Stripe must clear TaxCodeID; bare TaxCodeID without Stripe.Code is an intentional migration-path input that backfills Stripe.Code. | +| `ubpflatfee_test.go` | Usage-based flat-fee line creation, percentage discounts, validations | Uses billing.NewFlatFeeGatheringLine(billing.NewFlatFeeLineInput{...}); ExpectJSONEqual on WithoutDBState() to compare lines ignoring DB-assigned fields. | +| `schemamigration_test.go` | Migration-oriented tests manipulating detailed child lines (markAllDetailedChildrenDeleted) | May force atlas via SetupSuiteOptions{ForceAtlas:true}; exercises real migration SQL. | + +## Anti-Patterns + +- Wiring billing services through app/common DI instead of the concrete *.New constructors used in suite.go (can create test-only import cycles). +- Calling BillingAdapter directly outside adapter_test.go instead of going through BillingService. +- Using clock.SetTime/FreezeTime without a paired defer clock.ResetTime()/UnFreeze() — leaks frozen time into later subtests. +- Reusing a fixed namespace string across parallel suites instead of GetUniqueNamespace; namespaces collide and tests flake. +- Asserting decimals with expected.Equal(actual) booleans instead of InexactFloat64() / requireTotals. + +## Decisions + +- **BaseSuite assembles the whole billing stack from package constructors** — Tests must run the real service/adapter/rating paths end-to-end against Postgres while staying independent of the application wiring layer to avoid import cycles. +- **Subscription dependencies are a separate SubscriptionMixin** — Not every billing test needs the heavyweight subscription/plan/entitlement stack; mixin keeps base setup lean and shares deps explicitly. +- **Streaming and meters are mocked, Postgres is real** — Usage and meter lookups are deterministic via MockStreamingConnector while invoice/line persistence is validated against the actual schema and migrations. + +## Example: Provision a customer+profile and assert a usage-based flat-fee invoice line + +``` +func (s *UBPFlatFeeLineTestSuite) TestPendingLineCreation() { + ns := "ns-ubpff"; ctx := context.Background() + clock.SetTime(lo.Must(time.Parse(time.RFC3339, "2025-01-01T00:00:00Z"))); defer clock.ResetTime() + sandboxApp := s.InstallSandboxApp(s.T(), ns) + cust := s.CreateTestCustomer(ns, "test") + s.ProvisionBillingProfile(ctx, ns, sandboxApp.GetID(), WithProgressiveBilling()) + res, err := s.BillingService.CreatePendingInvoiceLines(ctx, billing.CreatePendingInvoiceLinesInput{ + Customer: cust.GetID(), Currency: "USD", + Lines: []billing.GatheringLine{billing.NewFlatFeeGatheringLine(billing.NewFlatFeeLineInput{ + Period: timeutil.ClosedPeriod{From: clock.Now(), To: clock.Now().Add(24*time.Hour)}, + InvoiceAt: clock.Now().Add(24*time.Hour), PerUnitAmount: alpacadecimal.NewFromInt(100), + PaymentTerm: productcatalog.InArrearsPaymentTerm, + })}, + }) + s.NoError(err); s.NotNil(res) +// ... +``` + + diff --git a/test/credits/CLAUDE.md b/test/credits/CLAUDE.md new file mode 100644 index 0000000000..70970c11df --- /dev/null +++ b/test/credits/CLAUDE.md @@ -0,0 +1,56 @@ +# credits + + + +> Integration test suite (package `credits`) for the ledger-backed credit + charges system, validating credit purchases, credit-then-invoice settlement, revenue recognition, breakage, and FBO/receivable balances. Its BaseSuite embeds test/billing.BaseSuite and layers the full ledger/charges stack on top. + +## Patterns + +**Embed billingtest.BaseSuite, extend in SetupSuite** — credits BaseSuite embeds billingtest.BaseSuite; its SetupSuite first calls s.BaseSuite.SetupSuite() then builds ledger/charges services from ledgertestutils.InitDeps(s.DBClient, logger) and chargestestutils.NewServices. (`func (s *BaseSuite) SetupSuite(){ s.BaseSuite.SetupSuite(); deps, err := ledgertestutils.InitDeps(s.DBClient, logger); ... }`) +**Build charges stack via chargestestutils.NewServices** — Charges, CreditPurchaseSvc, UsageBasedSvc come from chargestestutils.NewServices(t, Config{...}) wired with ledger charge handlers (NewFlatFeeHandler, NewCreditPurchaseHandler, NewUsageBasedHandler) and transactions.ResolverDependencies. (`stack, err := chargestestutils.NewServices(s.T(), chargestestutils.Config{Client: s.DBClient, BillingService: s.BillingService, FlatFeeHandler: flatFeeHandler, CreditPurchaseHandler: creditPurchaseHandler, UsageBasedHandler: ...})`) +**Ledger-backed customers need explicit account provisioning** — Use CreateLedgerBackedCustomer(ns, key): it calls LedgerResolver.EnsureBusinessAccounts then CreateTestCustomer then LedgerResolver.CreateCustomerAccounts. A plain CreateTestCustomer has no ledger accounts. (`cust := s.CreateLedgerBackedCustomer(ns, "test")`) +**ChargeIntent via CreateMockChargeIntent** — Charge intents are assembled by CreateMockChargeIntent(CreateMockChargeIntentInput{...}) which validates inputs, derives invoiceAt from payment term, and builds flatfee.Intent or usagebased.Intent wrapped by charges.NewChargeIntent. Default settlement is CreditThenInvoiceSettlementMode. (`intent := s.CreateMockChargeIntent(CreateMockChargeIntentInput{Customer: cust.GetID(), Currency: USD, ServicePeriod: period, Price: productcatalog.NewPriceFrom(...)})`) +**Balance assertions via Must* helpers with mo.Option cost basis** — Balances are read through MustCustomerFBOBalance / MustCustomerReceivableBalance (+ ...WithPriority/AsOf/ForFeatures/ForTaxCode variants). Cost-basis arg is mo.Option[*alpacadecimal.Decimal]: mo.None()=all, mo.Some(nil)=nil-cost-basis route, mo.Some(&v)=one route. (`bal := s.MustCustomerFBOBalance(cust.GetID(), USD, mo.None[*alpacadecimal.Decimal]())`) +**Reset streaming + clock in TearDownTest** — credits BaseSuite.TearDownTest calls s.MockStreamingConnector.Reset(), clock.UnFreeze(), clock.ResetTime(); per-test clock/streaming changes still need their own defers. (`func (s *BaseSuite) TearDownTest(){ s.MockStreamingConnector.Reset(); clock.UnFreeze(); clock.ResetTime() }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `base.go` | credits BaseSuite (embeds billingtest.BaseSuite) with Charges, CreditPurchaseSvc, UsageBasedSvc, CustomerBalanceSvc, Ledger, BalanceQuerier, LedgerAccountService, LedgerResolver, BreakageService, RevenueRecognizer; helpers CreateMockChargeIntent, CreateLedgerBackedCustomer, Must*Balance | ledgertestutils.InitDeps returns HistoricalLedger used as both Ledger and BalanceQuerier; resolver vs account-service roles in transactions.ResolverDependencies are distinct (AccountService=ResolversService, AccountCatalog=AccountService). | +| `credit_then_invoice_test.go` | Exercises the credit-then-invoice settlement lifecycle end-to-end | Drive via Charges.Create/AdvanceCharges/ApplyPatches and CreditPurchaseSvc, not low-level ledger adapters. | +| `creditgrant_test.go` | Credit grant / purchase scenarios and resulting FBO balances | Assert balances with the mo.Option cost-basis conventions. | +| `rating_test.go` | Rating-backed charge fixtures (production rating path) | Prefer rating-backed fixtures over hand-built charges where the real path can express the scenario. | +| `sanity_lifecycle_test.go` | Broad lifecycle sanity checks across credit + charge phases | Late-arriving usage modeled via MockStreamingConnector with explicit StoredAt to exercise stored-at cutoff in finalization. | + +## Anti-Patterns + +- Calling ledger or charge adapters directly instead of Charges.Service / CreditPurchaseSvc / UsageBasedSvc. +- Using CreateTestCustomer for ledger scenarios — it lacks FBO/receivable accounts; use CreateLedgerBackedCustomer. +- Passing a raw decimal where a cost-basis mo.Option is expected (mo.None vs mo.Some(nil) vs mo.Some(&v) mean different balance routes). +- Re-wiring the billing stack instead of reusing the embedded billingtest.BaseSuite.SetupSuite(). +- Forgetting per-test streaming reset / clock reset on top of the suite-level TearDownTest. + +## Decisions + +- **credits BaseSuite embeds the billing BaseSuite** — Credits/charges sit on top of billing invoices; reusing the billing stack avoids duplicating customer/profile/invoice wiring and keeps both domains consistent. +- **Ledger deps come from ledgertestutils.InitDeps + chargestestutils.NewServices** — Keeps test wiring aligned with the production ledger/charges construction while staying independent from app/common DI. + +## Example: Set up a ledger-backed customer and create a charge intent + +``` +func (s *BaseSuite) example(ns string, period timeutil.ClosedPeriod) { + cust := s.CreateLedgerBackedCustomer(ns, "test") + intent := s.CreateMockChargeIntent(CreateMockChargeIntentInput{ + Customer: cust.GetID(), Currency: USD, ServicePeriod: period, + Price: productcatalog.NewPriceFrom(productcatalog.FlatPrice{ + Amount: alpacadecimal.NewFromInt(100), PaymentTerm: productcatalog.InAdvancePaymentTerm, + }), + }) + _ = intent + bal := s.MustCustomerFBOBalance(cust.GetID(), USD, mo.None[*alpacadecimal.Decimal]()) + _ = bal +} +``` + + diff --git a/test/customer/CLAUDE.md b/test/customer/CLAUDE.md new file mode 100644 index 0000000000..fd6b17572d --- /dev/null +++ b/test/customer/CLAUDE.md @@ -0,0 +1,52 @@ +# customer + + + +> Integration test suite (package `customer`) for the customer domain and its cross-cutting interactions with subjects, subscriptions, entitlements, and billing. Tests run against a real Postgres DB through an interface-based TestEnv rather than testify suites. + +## Patterns + +**Interface-based TestEnv accessor, not embedded suite** — TestEnv is an interface exposing App(), Customer(), Subscription(), SubscriptionWorkflow(), Entitlement(), Feature(), Subject(), Plan(), Billing(), Meter(), Close(). Test methods read services via s.Env.Customer() etc.; CustomerHandlerTestSuite just holds an Env + namespace. (`service := s.Env.Customer(); subj, err := s.Env.Subject().GetByKey(ctx, models.NamespacedKey{...})`) +**Single Test func drives subtests with explicit ctx** — One TestCustomer(t) creates the env via NewTestEnv(t, ctx), defers env.Close(), then runs named subtests by calling suite methods with the signature (ctx context.Context, t *testing.T). No suite.Run. (`t.Run("TestCreate", func(t *testing.T){ testSuite.TestCreate(ctx, t) })`) +**Fresh ULID namespace per test method** — Each suite method begins with s.setupNamespace(t) which sets s.namespace = ulid.Make().String(); shared test constants (TestKey, TestName, TestAddress, TestSubjectKeys) are package vars. (`func (s *CustomerHandlerTestSuite) TestCreate(ctx, t){ s.setupNamespace(t); ... }`) +**Customer<->subject hooks wired in NewTestEnv** — NewTestEnv registers SubjectCustomerHook and CustomerSubjectHook so creating a customer materializes subjects and vice versa; CustomerOverride is a noopCustomerOverrideService (no billing override side effects here). (`customerService.RegisterHooks(customerSubjectHook); subjectService.RegisterHooks(subjectCustomerHook)`) +**Conflict assertions via typed error checks** — Key/subject conflicts are asserted with customer.IsSubjectKeyConflictError(err) and models.IsGenericConflictError(err) rather than string matching. (`require.True(t, models.IsGenericConflictError(err), "key overlaps with subject")`) +**DB deps from subscriptiontestutils.SetupDBDeps** — Postgres/ent client comes from subscriptiontestutils.SetupDBDeps(t); env.Close() runs dbDeps.Cleanup(t). Real meter adapter (meter/adapter) is used, with MockStreamingConnector for usage. (`dbDeps := subscriptiontestutils.SetupDBDeps(t); closerFunc := func() error { dbDeps.Cleanup(t); return nil }`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `testenv.go` | TestEnv interface + testEnv impl + NewTestEnv(t, ctx): wires app/customer/subject/entitlement/feature/plan/billing/subscription/meter from concrete constructors; registers customer/subject hooks and request validators (entitlement, subscription customer) | MultiSubscriptionEnabledFF is false here (ffx.NewTestContextService). CustomerOverride hook uses noopCustomerOverrideService — billing-override side effects are intentionally absent. | +| `customer.go` | CustomerHandlerTestSuite + TestCreate/TestUpdate/TestUpdateWithSubscriptionPresent; package-level Test* fixtures (TestKey, TestAddress, TestSubjectKeys) | UsageAttribution is nil when there are no subject keys (asserted repeatedly). Updating a customer that has a subscription cannot change UsageAttribution. | +| `subject.go` | TestSubjectDeletion (dangling vs attributed subjects) and TestMultiSubjectIntegrationFlow (full meter+feature+plan+subscription+invoice flow) | Deleting a dangling subject is allowed; deleting an attributed subject removes it from usage attribution (leaving UsageAttribution nil), and must not error even with entitlements present. | +| `customer_test.go` | Entry-point TestCustomer wiring env and dispatching Customer + Subject subtests | Single shared env across all subtests; namespaces isolate them, so do not assume a clean DB per subtest. | +| `subject.go` | Cross-domain integration via s.installSandboxApp / s.createDefaultProfile helpers | Uses subscriptionworkflow.CreateFromPlan and plansubscriptionservice.PlanFromPlan; relies on clock.SetTime + t.Cleanup(clock.ResetTime). | + +## Anti-Patterns + +- Reaching for testify/suite.Run — this package uses a plain TestCustomer with method dispatch and an interface TestEnv. +- Sharing a hardcoded namespace instead of calling setupNamespace (ULID) at the top of each test method. +- Asserting conflicts by error string instead of customer.IsSubjectKeyConflictError / models.IsGenericConflictError. +- Expecting an empty UsageAttribution struct — it is nil when no subject keys exist. +- Forgetting defer env.Close() (dbDeps.Cleanup) — leaks the test database. + +## Decisions + +- **TestEnv is an interface with one shared instance per Test func** — Customer tests need many collaborating services (subject, entitlement, subscription, billing); a single wired env with namespace isolation is cheaper than per-subtest stacks. +- **CustomerOverride is noop and multi-subscription FF is off** — This suite focuses on customer/subject lifecycle, not billing override or multi-subscription behavior, so those paths are intentionally disabled to keep tests focused. + +## Example: Spin up the env and run customer subtests + +``` +func TestCustomer(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()); defer cancel() + env, err := NewTestEnv(t, ctx) + require.NoError(t, err) + defer func(){ _ = env.Close() }() + testSuite := CustomerHandlerTestSuite{Env: env} + t.Run("TestCreate", func(t *testing.T){ testSuite.TestCreate(ctx, t) }) +} +``` + + diff --git a/test/entitlement/CLAUDE.md b/test/entitlement/CLAUDE.md new file mode 100644 index 0000000000..197335609a --- /dev/null +++ b/test/entitlement/CLAUDE.md @@ -0,0 +1,19 @@ +# entitlement + + + +> Structural parent for entitlement integration/regression tests. It owns the cross-layer test surface where metered entitlements, credit grants, balance snapshots, resets, and voids are exercised end-to-end against a real Postgres DB; its sole child (regression) holds the actual code. + +## Patterns + +**Children own all source** — test/entitlement has no direct source files; navigate into regression for the entitlement+credit stack tests built via setupDependencies and driven by pkg/clock. (`test/entitlement/regression/{framework_test.go,scenario_test.go}`) + +## Anti-Patterns + +- Adding entitlement test source directly at this level instead of inside a typed child folder (e.g. regression). + +## Decisions + +- **Group entitlement tests under a structural parent split by test kind (regression).** — Separates historically-reproduced balance regressions from other entitlement test concerns while sharing the import surface (credit, entitlement, streaming, clock). + + diff --git a/test/entitlement/regression/CLAUDE.md b/test/entitlement/regression/CLAUDE.md new file mode 100644 index 0000000000..c6fb9d1832 --- /dev/null +++ b/test/entitlement/regression/CLAUDE.md @@ -0,0 +1,55 @@ +# regression + + + +> Regression test suite that exercises the full metered-entitlement + credit-grant stack (feature, entitlement, grant, balance snapshot, reset, void) end-to-end against a real Postgres DB, reproducing historically faulty balance-calculation scenarios. Its primary constraint: tests wire the production connectors directly and drive time via clock so balance/reset/expiry interactions are deterministic. + +## Patterns + +**Real-stack assembly via setupDependencies** — Each test calls setupDependencies(t), which builds the entire entitlement/credit graph from concrete constructors (feature, grant, balance snapshot, metered/static/boolean connectors, customer, subject) against a fresh Postgres DB from testutils.InitPostgresDB(t). Build from package constructors, never from app/common wiring. (`deps := setupDependencies(t); defer deps.Close()`) +**Deterministic time via clock + frozen RFC3339** — Every temporal step uses clock.SetTime(testutils.GetRFC3339Time(t, "...")) to advance the simulated clock, with defer clock.ResetTime() at the top of each test. Balances are queried at explicit timestamps; reset/expiry math depends on these exact times. (`defer clock.ResetTime(); clock.SetTime(testutils.GetRFC3339Time(t, "2024-06-28T14:30:21Z"))`) +**Usage injected through MockStreamingConnector** — Usage events are added via deps.Streaming.AddSimpleEvent("meter-1", value, time). The meter is named meter-1 with MeterAggregationCount; events placed far in the future are a deliberate hack to avoid streaming errors while keeping them out of the queried window. (`deps.Streaming.AddSimpleEvent("meter-1", 10, testutils.GetRFC3339Time(t, "2024-07-09T13:09:00Z"))`) +**Customer+subject created together before entitlement** — createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, ns, key, name) creates a subject then a customer with UsageAttribution SubjectKeys=[key]; the returned customer's GetUsageAttribution() feeds CreateEntitlementInputs.UsageAttribution. (`cust := createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, "namespace-1", "subject-1", "Subject 1")`) +**Hooks registered on connectors after construction** — meteredEntitlementConnector.RegisterHooks(...) and entitlementConnector.RegisterHooks(...) wire the subscription hook and credit EntitlementHook, mirroring production wiring so reset/void side effects fire. (`entitlementConnector.RegisterHooks(entitlementsubscriptionhook.NewEntitlementSubscriptionHook(...), credithook.NewEntitlementHook(grantRepo))`) +**Balance asserted by exact float at a timestamp** — Tests call deps.MeteredEntitlementConnector.GetEntitlementBalance(ctx, models.NamespacedID{Namespace, ID}, at) and assert.Equal an exact float (e.g. 30.0, 0.0, 488.0). Comments document why the expected value holds (grant priority, expiry, reset rollover). (`assert.Equal(488.0, currentBalance.Balance)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `framework_test.go` | Test harness: Dependencies struct, Close(), setupDependencies(t) wiring the full credit+entitlement stack, and createCustomerAndSubject helper. Package framework_test. | Uses slog.Default() and context.Background() and eventbus.NewMock(t) — acceptable in this test-only harness but do not copy into production constructors. meter-1 / namespace-1 / Meter1ID are hardcoded; all entitlements must target namespace-1. | +| `scenario_test.go` | The actual regression cases: TestGrantExpiringAtReset, TestGrantExpiringAndRecurringAtReset, TestBalanceCalculationsAfterVoiding, TestCreatingEntitlementsForKeyOfArchivedFeatures. Each is a timed sequence of feature/entitlement/grant/reset/void calls with balance assertions. | Expected balances encode subtle grant-priority/expiry/reset-rollover semantics; comments (e.g. 'This test was previously faulty') flag historical bugs — do not 'fix' an assertion to make it pass without understanding the documented reason. | + +## Anti-Patterns + +- Importing app/common or production DI wiring instead of building deps from package constructors — creates test-only import cycles and defeats the regression intent. +- Using time.Now() or real sleeps instead of clock.SetTime + frozen RFC3339 timestamps — makes reset/expiry math nondeterministic. +- Omitting defer clock.ResetTime() / defer deps.Close() — leaks frozen time and DB resources into other tests. +- Changing an asserted balance float to silence a failure without reconciling it against the grant priority / expiry / rollover comments. +- Adding usage with AddSimpleEvent inside the queried window when the scenario intends it to be ignored (future-dated hack). + +## Decisions + +- **Assemble production connectors directly against a real Postgres DB rather than mocking the credit/entitlement engine.** — These are regression tests for balance-calculation bugs that only surface through the real grant/snapshot/reset interaction; mocks would hide them. +- **Drive all time through pkg/clock with hardcoded RFC3339 instants.** — Entitlement usage periods, grant expiration, and reset anchors are time-sensitive; deterministic clock control makes the exact expected balances reproducible. + +## Example: Standard regression test skeleton: timed feature/entitlement/grant setup then exact-balance assertion. + +``` +func TestX(t *testing.T) { + defer clock.ResetTime() + deps := setupDependencies(t) + defer deps.Close() + ctx := context.Background() + assert := assert.New(t) + + clock.SetTime(testutils.GetRFC3339Time(t, "2024-06-28T14:30:21Z")) + feature, _ := deps.FeatureConnector.CreateFeature(ctx, feature.CreateFeatureInputs{Name: "feature-1", Key: "feature-1", Namespace: "namespace-1", MeterID: convert.ToPointer(deps.Meter1ID)}) + cust := createCustomerAndSubject(t, deps.SubjectService, deps.CustomerService, "namespace-1", "subject-1", "Subject 1") + entitlement, _ := deps.EntitlementConnector.CreateEntitlement(ctx, entitlement.CreateEntitlementInputs{Namespace: "namespace-1", FeatureID: &feature.ID, FeatureKey: &feature.Key, UsageAttribution: cust.GetUsageAttribution(), EntitlementType: entitlement.EntitlementTypeMetered, UsagePeriod: lo.ToPtr(entitlement.NewUsagePeriodInputFromRecurrence(timeutil.Recurrence{Interval: timeutil.RecurrencePeriodDaily, Anchor: testutils.GetRFC3339Time(t, "2024-06-28T14:48:00Z")}))}, nil) + bal, _ := deps.MeteredEntitlementConnector.GetEntitlementBalance(ctx, models.NamespacedID{Namespace: "namespace-1", ID: entitlement.ID}, testutils.GetRFC3339Time(t, "2024-06-28T14:36:45Z")) + assert.Equal(30.0, bal.Balance) +} +``` + + diff --git a/test/notification/CLAUDE.md b/test/notification/CLAUDE.md new file mode 100644 index 0000000000..6ca1492c97 --- /dev/null +++ b/test/notification/CLAUDE.md @@ -0,0 +1,54 @@ +# notification + + + +> Integration test suite (package `notification`) for the notification domain: channels, rules, events, repository filtering, the balance-threshold consumer, and Svix webhook delivery. Uses an interface-based TestEnv backed by real Postgres plus a real (local) Svix server. + +## Patterns + +**Interface TestEnv + single TestNotification dispatcher** — TestEnv exposes NotificationRepo(), Notification(), NotificationWebhook(), Feature(), Meter(), Namespace(), Close(). TestNotification(t) builds one env via NewTestEnv(t, ctx, namespace), then runs Webhook/Channel/Rule/Event/Repository/Consumer subtests, each backed by a small XxxTestSuite{Env}. (`env, err := NewTestEnv(t, ctx, namespace); testSuite := ChannelTestSuite{Env: env}; t.Run("Create", func(t *testing.T){ testSuite.TestCreate(ctx, t) })`) +**Namespace from NewTestNamespace (ULID)** — namespace := NewTestNamespace(t) (alias of NewTestULID) is created once and passed into NewTestEnv; suites read it via s.Env.Namespace(). (`namespace := NewTestNamespace(t); env, _ := NewTestEnv(t, ctx, namespace)`) +**Real Svix + Postgres, mock meter/eventbus** — NewTestEnv connects to a Svix server (webhooksvix.New with svix.New using a JWT from NewSvixAuthToken), real Postgres (testutils.InitPostgresDB + Schema.Create), a mock meter adapter (meter/mockadapter), and eventbus.NewMock. Svix host/secret come from SVIX_HOST / SVIX_JWT_SECRET env (defaults 127.0.0.1 / DUMMY_JWT_SECRET). (`svixAPIKey, _ := NewSvixAuthToken(svixJWTSigningSecret); webhook, _ := webhooksvix.New(webhooksvix.Config{SvixAPIClient: svixAPIClient, ...})`) +**Event handler runs as a background goroutine** — NewTestEnv builds eventhandler.New (with a pglockx lock client) and starts it via `go eventHandler.Start()`; closerFunc must eventHandler.Close() plus close ent/PG drivers. Consumer tests rely on this running loop. (`go func(){ _ = eventHandler.Start() }(); closerFunc := func() error { return errors.Join(eventHandler.Close(), entClient.Close(), ...) }`) +**Builder helpers for inputs** — Channel/rule/event inputs use builder funcs like NewCreateChannelInput(namespace, name) returning notification.CreateChannelInput with ChannelTypeWebhook config; repository tests tag events with notification.AnnotationEventFeatureID/Key and AnnotationEventSubjectID/Key for filtering. (`createIn := NewCreateChannelInput(s.Env.Namespace(), "NotificationCreateChannel"); channel, err := service.CreateChannel(ctx, createIn)`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `testenv.go` | TestEnv interface + NewTestEnv: wires notification adapter/service/webhook(Svix)/eventhandler, feature connector, mock meter; defines Test* constants (TestFeatureKey/ID, TestSubjectKey/ID, TestWebhookURL, TestSigningSecret) and NewTestNamespace | Requires a reachable Svix server (SvixServerURLTemplate http://host:8071) — these tests need make test-all / Svix dependency. Event handler goroutine + pglockx lock must be closed via closerFunc. | +| `helpers.go` | NewSvixAuthToken(signingSecret) (HS256 JWT for svix-server) and NewClickhouseClient(addr) | JWT issuer is hardcoded "svix-server" with a fixed expiry; ClickHouse creds are the local default/default. | +| `notification_test.go` | TestNotification entry point dispatching Webhook/Channel/Rule/Event/Repository/Consumer suites | Several suites call testSuite.Setup(ctx, t) before subtests; skipping Setup leaves rules/channels/events uncreated. | +| `repository.go` | RepositoryTestSuite: creates channel+rule+events with feature/subject annotations, tests ListEvents filtering by Features/Subjects | Feature filtering matches either the feature ID or key (TestFeatureID/TestFeatureKey); annotations are the AnnotationEvent* constants. | +| `channel.go` | ChannelTestSuite + NewCreateChannelInput builder (webhook channel with custom headers, URL, signing secret) | Channel config carries SigningSecret; webhook secret helpers live in notification/webhook/secret. | +| `consumer_balance.go` | BalanceNotificaiontHandlerTestSuite for the balance-threshold consumer (granting flow, feature filtering) | Depends on the running eventHandler goroutine to process events; assertions may need to wait for async delivery. | +| `webhook.go` | WebhookTestSuite exercising Svix webhook CRUD (create/update/delete/get/list) | Hits the live Svix server; flaky/skipped without the Svix dependency up. | + +## Anti-Patterns + +- Assuming no external dependency — these tests need a real Svix server (and Postgres); they are gated behind make test-all, not plain make test. +- Forgetting closerFunc/Close (eventHandler.Close + driver closes) — leaks the goroutine, lock, and DB. +- Hardcoding a namespace instead of NewTestNamespace(t); namespaces isolate the shared env. +- Skipping testSuite.Setup(ctx, t) before subtests that depend on pre-created channels/rules/events. +- Filtering events by raw map access instead of the notification.AnnotationEvent* constants. + +## Decisions + +- **TestEnv runs a real eventhandler goroutine plus a real Svix client** — Notification delivery and the balance-threshold consumer are inherently async and provider-backed; only a running handler + real Svix exercise the true delivery path. +- **Meter and eventbus are mocked while Postgres and Svix are real** — Channel/rule/event persistence and webhook delivery are the system under test; metering and event publishing are stubbed to keep scenarios deterministic. + +## Example: Construct the env and run a channel subtest + +``` +func TestNotification(t *testing.T) { + ctx, cancel := context.WithCancel(t.Context()); defer cancel() + namespace := NewTestNamespace(t) + env, err := NewTestEnv(t, ctx, namespace) + require.NoError(t, err) + t.Cleanup(func(){ _ = env.Close() }) + testSuite := ChannelTestSuite{Env: env} + t.Run("Create", func(t *testing.T){ testSuite.TestCreate(ctx, t) }) +} +``` + + diff --git a/test/subscription/CLAUDE.md b/test/subscription/CLAUDE.md new file mode 100644 index 0000000000..8b55fc3590 --- /dev/null +++ b/test/subscription/CLAUDE.md @@ -0,0 +1,61 @@ +# subscription + + + +> Integration test suite (package subscription_test) for end-to-end subscription lifecycle scenarios that cross the subscription, productcatalog, billing, and billing/worker/subscriptionsync boundaries. Each scenario_*_test.go file wires a full real-service stack via setup() and drives one named bug-regression or alignment scenario (aligned edits, edit+cancel, entitlement-in-next-phase, first-of-month/anchored billing). + +## Patterns + +**Single shared setup() builds the full real-service stack** — Every test calls tDeps := setup(t, setupConfig{}) then defer tDeps.cleanup(t). setup() constructs real adapters/services (app, billing, taxcode, subscriptionsync) on top of subscriptiontestutils.SetupDBDeps + NewService — not mocks — so scenarios exercise production code paths. (`tDeps := setup(t, setupConfig{}); defer tDeps.cleanup(t)`) +**Hardcoded test-namespace** — All scenarios use namespace := "test-namespace"; this string is baked into setup() (app CreateApp calls use it). Do not parameterize the namespace per-test — the framework's sandbox app provisioning assumes it. (`namespace := "test-namespace"`) +**clock.SetTime drives the timeline** — Tests freeze and advance time with pkg/clock: clock.SetTime(currentTime) at start, then reassign currentTime = currentTime.Add(...) / clock.Now().Add(...) and SetTime again before each lifecycle step (edit, cancel, sync). (`currentTime = currentTime.Add(time.Minute); clock.SetTime(currentTime)`) +**Standard plan->publish->customer->subscribe arc** — Scenarios build features (FeatureConnector.CreateFeature / CreateExampleFeatures), then PlanService.CreatePlan + PublishPlan, CustomerService.CreateCustomer, build a pcsubscription.PlanInput via FromRef, then pcSubscriptionService.Create with a CreateSubscriptionWorkflowInput. (`pi := &pcsubscription.PlanInput{}; pi.FromRef(&pcsubscription.PlanRefInput{Key: p.Key, Version: &p.Version})`) +**Edits go through the workflow EditRunning + patches** — Subscription edits use subscriptionWorkflowService.EditRunning with []subscription.Patch (patch.PatchRemoveItem then patch.PatchAddItem with a full SubscriptionItemSpec) and an explicit subscription.Timing. Cancels use subscriptionService.Cancel with subscription.Timing. (`EditRunning(ctx, s.NamespacedID, []subscription.Patch{patch.PatchRemoveItem{...}, patch.PatchAddItem{...}}, subscription.Timing{Enum: lo.ToPtr(subscription.TimingImmediate)})`) +**Billing assertions via gathering invoices + sync** — Billing scenarios create a profile from minimalCreateProfileInputTemplate, call subscriptionSyncService.SyncByView(ctx, view, until), then assert on billingService.ListGatheringInvoices results (GatheringLine ServicePeriod/InvoiceAt), grouping lines with lo.GroupBy on FeatureKey/ChildUniqueReferenceID. (`require.NoError(t, tDeps.subscriptionSyncService.SyncByView(ctx, view, firstOfMonth.AddDate(0, 1, 0)))`) +**Durations via datetime.MustParseDuration(t, ...)** — ISO durations are built with datetime.MustParseDuration(t, "P1M") in test bodies; profile template uses lo.Must(datetime.ISODurationString("P1D").Parse()). Prices use alpacadecimal.NewFromInt and productcatalog.NewPriceFrom. (`BillingCadence: datetime.MustParseDuration(t, "P1M")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `framework_test.go` | Defines testDeps struct, setupConfig, setup(t, cfg) which wires the entire real-service stack, and minimalCreateProfileInputTemplate(appID) for billing profiles. The only non-scenario file; the shared harness all scenarios depend on. | setup() creates TWO sandbox apps ('Test Sandbox' and 'Sandbox') and returns the 'Sandbox' one as tDeps.sandboxApp. billingService is wrapped with a MockableCalculator via WithInvoiceCalculator. Profile interval is PT0S so invoices collect immediately unless a scenario overrides it. | +| `scenario_editaligned_test.go` | TestEditingEntitlementOfAlignedSub — verifies that editing a metered entitlement item preserves the entitlement's CurrentUsagePeriod (cadence alignment) across PatchRemoveItem+PatchAddItem. | Asserts the edited item is at index [1] in ItemsByKey (the original is [0]); compares CurrentUsagePeriod.From/To equality and CreatedAt strictly increasing. | +| `scenario_editcancel_test.go` | TestEditingAndCanceling — boolean-entitlement plan; creates a main customer plus 10 extra customers/subscriptions, edits one sub, then cancels it. Regression coverage for edit-then-cancel sequencing. | Extra customers use SubjectKeys subject_2..subject_11 (fmt.Sprintf with i+2). No billing assertions here — purely lifecycle success (require.NoError). | +| `scenario_entinnextphase_test.go` | TestSubWithMeteredEntitlement — two-phase plan (1-week first phase, then second) each with a metered entitlement ratecard; reproduces a creation failure when an entitlement spans into the next phase. The assertion is simply that Create succeeds. | Comment 'THIS IS THE TEST, it used to fail' marks the regression intent; BillingAnchor is nil (aligns billing to subscription start). | +| `scenario_firstofmonth_test.go` | TestBillingOnFirstOfMonth and TestAnchoredAlignment_MidMonthStart_EarlyCancel_IssueNextAnchor — the most assertion-heavy file; mixes in-arrears monthly, in-advance flat-fee monthly, and in-arrears daily ratecards, then checks gathering-invoice line ServicePeriod/InvoiceAt for proration and anchored alignment. | Uses BillingAnchor (&firstOfMonth) on the workflow input AND AlignmentKindAnchored + AnchoredAlignmentDetail on the profile in the second test. Daily ratecard produces 16 lines (15th->30th) with the first being a partial half-day line. Subtests use t.Run. | + +## Anti-Patterns + +- Constructing services from app/common wiring instead of the underlying adapter/service constructors used in setup() — risks test-only import cycles (see subscriptiontestutils guidance). +- Using context.Background() time/now or time.Now() instead of pkg/clock — scenarios depend on a frozen, advanceable clock and would become non-deterministic. +- Changing the hardcoded 'test-namespace' string — sandbox app provisioning and profile inputs assume it. +- Asserting subscription edits by mutating the original view in place — edited items are appended (new index) into ItemsByKey, the original entry is retained. +- Calling lower-level billing/charge adapters directly to model usage instead of driving through SyncByView and ListGatheringInvoices. + +## Decisions + +- **Each scenario file is a self-contained named regression test rather than table-driven cases.** — Each scenario reproduces a distinct historical bug or alignment edge case with bespoke plan shapes and timeline manipulation; table-driving would obscure the per-scenario intent comments (e.g. 'it used to fail'). +- **setup() builds the real billing + subscriptionsync stack and only mocks the streaming connector and invoice calculator.** — These tests exist to validate the subscription->billing sync bridge end to end, so production service paths must run; only external usage data (MockStreamingConnector) and final invoice calc are substituted. + +## Example: Standard create-plan-and-subscribe arc shared by every scenario + +``` +tDeps := setup(t, setupConfig{}) +defer tDeps.cleanup(t) +clock.SetTime(currentTime) + +f, _ := tDeps.FeatureConnector.CreateFeature(ctx, feature.CreateFeatureInputs{ + Name: "Example Feature", Key: "test_feature_1", Namespace: namespace, + MeterID: lo.ToPtr(tDeps.ExampleMeterID), +}) +p, _ := tDeps.PlanService.CreatePlan(ctx, plan.CreatePlanInput{ /* PlanMeta + Phases + RateCards */ }) +p, _ = tDeps.PlanService.PublishPlan(ctx, plan.PublishPlanInput{ + NamespacedID: p.NamespacedID, + EffectivePeriod: productcatalog.EffectivePeriod{EffectiveFrom: lo.ToPtr(currentTime)}, +}) +c, _ := tDeps.CustomerService.CreateCustomer(ctx, customer.CreateCustomerInput{ /* ... */ }) +pi := &pcsubscription.PlanInput{} +// ... +``` + + diff --git a/tools/migrate/CLAUDE.md b/tools/migrate/CLAUDE.md new file mode 100644 index 0000000000..eb11177671 --- /dev/null +++ b/tools/migrate/CLAUDE.md @@ -0,0 +1,64 @@ +# migrate + + + +> Database migration engine and the authoritative store of golang-migrate-format SQL migrations plus their up/down/up data-migration tests. Wraps golang-migrate/v4 with an embedded migrations FS (state table schema_om), supports an ignore marker, and is the runtime entrypoint invoked on server startup when postgres.autoMigrate is ent or migration. + +## Patterns + +**Migrate wraps golang-migrate via type alias** — Migrate embeds *goMigrate (a type alias for migrate.Migrate) so Migrate.Migrate(version) can call goMigrate.Migrate without a name clash, and every wrapper (Up/Down/Migrate) routes through filterErrNoChange to swallow migrate.ErrNoChange (`func (m *Migrate) Up() error { return m.filterErrNoChange(m.goMigrate.Up()) }`) +**Config validated, no slog.Default fallback** — MigrateOptions and MigrationsConfig each Validate() by collecting into []error and returning errors.Join(...); Logger is a required *slog.Logger, and ConnectionString, FS, FSPath, StateTableName are all required (`if m.Logger == nil { errs = append(errs, errors.New("logger is required")) }`) +**Embedded migrations + SourceWrapper ignore marker** — //go:embed migrations supplies OMMigrationsConfig; New wraps the FS in NewSourceWrapper which recursively reads dirs and drops any file whose lines start with '-- migration:ignore' (IgnoreMarker) (`const IgnoreMarker = "-- migration:ignore"`) +**Migration table name injected via query param** — setMigrationTableName parses the connection URL and sets x-migrations-table to StateTableName (schema_om) so OpenMeter's migrations don't collide with Ent's default state table (`values.Set("x-migrations-table", tableName)`) +**Data-migration tests use runner/stops harness** — Tests in package migrate_test build runner{stops: stops{...}} where each stop has version, direction (directionUp/directionDown), and action(t, db); the runner migrates to each up version ascending, runs the action, then Up, descending downs, purge, Down, Up to prove reversibility (`runner{stops: stops{{version: 20260511120000, direction: directionUp, action: func(t *testing.T, db *sql.DB){...}}}}.Test(t)`) +**Raw *sql.DB for fixtures, never an ORM** — Test actions insert/assert with db.Exec/db.QueryRow on testutils.InitPostgresDB(t).PGDriver.DB() because any ORM would only know the latest schema; fixtures use ulid.Make().String() ids and explicit column lists valid at that version (`_, err := db.Exec(`INSERT INTO features (namespace, id, ...) VALUES ($1, $2, ...)`, ...)`) +**View parity guarded by viewgen** — view_parity_test.go regenerates views via viewgen.GenerateSQL, strips CREATE/DROP VIEW out of the real migrations, and asserts pg_get_viewdef + information_schema.columns match between a fully-migrated DB and a generated-schema DB (`sql, err := viewgen.GenerateSQL("../../openmeter/ent/schema")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `migrate.go` | Core Migrate type, New() constructor, OMMigrationsConfig with embedded migrations FS, validation, WaitForMigrationJob, LatestVersion, table-name injection, Close helpers | Always go through filterErrNoChange; never call goMigrate.Up directly. WaitForMigrationJob fails on a dirty DB. MigrationsTable is fixed to schema_om | +| `fs.go` | SourceWrapper implementing fs.ReadDirFS/ReadFileFS that flattens nested dirs and skips files starting with the '-- migration:ignore' IgnoreMarker | ReadDir recurses and scans every file's content; a misplaced ignore marker silently drops a migration from the embedded source | +| `migrate_test.go` | Defines the runner/stops/stop harness, directionUp/directionDown constants, ups()/downs() ordering, and purgeDB. TestUpDownUp runs the full forward/back/forward cycle with no stops | purgeDB TRUNCATE CASCADE skips the schema_om state table; down-then-up must succeed. Stops sorted ascending for ups, descending for downs | +| `view_parity_test.go` | Asserts hand-written view DDL in migrations matches viewgen output by diffing column metadata and normalized view definitions across two fresh DBs | buildMigrationsWithoutViews strips any statement matching the VIEW regex; a view added to migrations but not the Ent schema (or vice versa) breaks this test | +| `*_test.go (data migrations)` | One file per non-trivial data migration (dedupe_tax_codes, feature_meter_id, flatfee_runs, llmcost_normalize_providers, ledger_tax_behavior, productcatalog, feature_advanced_meter_group_by_filters) asserting before/after row state | Fixtures must match the exact column set valid at the targeted version; pass full JSON strings as bound params ($n::jsonb) to dodge Postgres char(26)-vs-jsonb parameter type inference errors | +| `generate-sqlc-testdata.sh` | Spins up postgres, migrates a scratch DB to VERSION, pg_dumps the schema, and runs sqlc generate into testdata/sqlcgen/ | Requires the nix dev shell (docker, migrate, pg_dump, sqlc) and uses x-migrations-table=schema_om to match the runtime migration table | +| `ledger_tax_behavior_test.go` | Documents a rollback guard: a down migration that fails loudly when V2 routing-key rows still exist rather than silently corrupting routes | Irreversible-with-data down migrations should RAISE an explicit error; the test asserts the exact message | + +## Anti-Patterns + +- Using an ORM or ent client inside migration tests; only raw *sql.DB sees the historical schema at a given version +- Hand-editing tools/migrate/views.sql — it carries a 'Code generated by viewgen, DO NOT EDIT.' header and is overwritten by make generate-view-sql +- Calling goMigrate.Up/Down/Migrate directly and re-leaking migrate.ErrNoChange instead of going through the Migrate wrapper methods +- Writing an irreversible down migration without a loud guard (see ledger_tax_behavior) — TestUpDownUp purges then runs Down then Up and will fail +- Adding a CREATE VIEW to a migration without keeping the Ent view schema in sync, breaking view_parity_test's column/definition diff + +## Decisions + +- **Replace ent.Schema.Create with a lightweight golang-migrate wrapper over an embedded SQL FS** — Gives explicit, reviewable, reversible SQL migrations with a dedicated schema_om state table instead of opaque auto-create, while still being generated from Ent schema diffs via Atlas +- **Test every non-trivial data migration with a forward/backward/forward stops harness against real Postgres** — Data transforms (backfills, dedup, normalization, JSONB rewrites) can't be verified by schema diff alone; the runner proves both the data result and full reversibility +- **Generate view DDL separately (viewgen) and validate parity rather than relying on Atlas diff** — Ent ent.View schemas don't appear in generated migrate metadata, so view SQL must be authored/checked independently to stay consistent with the Ent schema + +## Example: Constructing a migrator and running a targeted data-migration verification in a test + +``` +import ( + "github.com/openmeterio/openmeter/openmeter/testutils" + "github.com/openmeterio/openmeter/tools/migrate" +) + +testDB := testutils.InitPostgresDB(t) +defer testDB.PGDriver.Close() + +migrator, err := migrate.New(migrate.MigrateOptions{ + ConnectionString: testDB.URL, + Migrations: migrate.OMMigrationsConfig, + Logger: testutils.NewLogger(t), +}) +require.NoError(t, err) +defer func() { err1, err2 := migrator.Close(); require.NoError(t, errors.Join(err1, err2)) }() +// ... +``` + + diff --git a/tools/migrate/cmd/CLAUDE.md b/tools/migrate/cmd/CLAUDE.md new file mode 100644 index 0000000000..dd6a2eda57 --- /dev/null +++ b/tools/migrate/cmd/CLAUDE.md @@ -0,0 +1,22 @@ +# cmd + + + +> Structural parent holding the standalone CLI generator binaries that support the migration toolchain. It currently owns a single child, viewgen, which fills a specific gap in the Ent/Atlas pipeline: emitting SQL DDL for Ent ent.View schemas that Atlas migrate diff omits from generated migration metadata. + +## Patterns + +**Thin main, logic in package** — Each cmd/* binary is a minimal main wrapper that parses flags and delegates all real work to a sibling package under tools/migrate/ (viewgen -> tools/migrate/viewgen). No view-collection or SQL-rendering logic lives in main.go. (`viewgen/main.go parses flags then delegates to the tools/migrate/viewgen package`) +**Generators backstop Atlas gaps** — These binaries exist to cover concrete gaps the `make generate` / `atlas migrate diff` workflow cannot produce — notably ent.View DDL, which never appears in generated migrate.Tables metadata. A new generator here should target an identified, mechanical gap, not duplicate Atlas's diff output. (`viewgen emits views.sql because ent.View schemas are absent from generated migration metadata`) + +## Anti-Patterns + +- Putting SQL-rendering or schema-collection logic in a cmd/*/main.go instead of the corresponding tools/migrate/ package. +- Adding a generator binary that overlaps Atlas's existing diff output rather than covering a real gap. +- Hand-editing generated SQL output (e.g. views.sql) that carries a `Code generated by viewgen, DO NOT EDIT.` header instead of regenerating via `make generate-view-sql`. + +## Decisions + +- **Generator binaries live under tools/migrate/cmd, separate from the reusable logic packages they delegate to.** — Groups the migration toolchain's executables together and keeps thin mains decoupled from testable logic, matching the repo's thin-main convention. + + diff --git a/tools/migrate/cmd/viewgen/CLAUDE.md b/tools/migrate/cmd/viewgen/CLAUDE.md new file mode 100644 index 0000000000..32f6a92d0b --- /dev/null +++ b/tools/migrate/cmd/viewgen/CLAUDE.md @@ -0,0 +1,44 @@ +# viewgen + + + +> CLI entrypoint that generates the SQL DDL file for Ent `ent.View` schemas, which Atlas migrate diff omits from generated migration metadata. It is a thin `main` wrapper that parses flags and delegates all logic to the `tools/migrate/viewgen` package; the output (default `./tools/migrate/views.sql`) backstops the gap where view DDL must be emitted via explicit SQL. + +## Patterns + +**Delegate to viewgen package, keep main thin** — main() only parses `-schema` and `-out` flags and calls viewgen.GenerateFile; no view-collection or SQL-rendering logic lives here. New behavior belongs in tools/migrate/viewgen, not main.go. (`if err := viewgen.GenerateFile(*schemaPath, *outPath); err != nil { exitf("%v", err) }`) +**Exit on error via os.Exit(1)** — Errors are reported with the local exitf helper that writes to os.Stderr and calls os.Exit(1). This is a generator binary (package main), so process-exit error handling is acceptable here, unlike library code which must return errors. (`func exitf(format string, args ...any) { fmt.Fprintf(os.Stderr, format+"\n", args...); os.Exit(1) }`) +**Default flags mirror package constants** — The -out default is viewgen.DefaultOutputPath (`./tools/migrate/views.sql`) and -schema defaults to `./openmeter/ent/schema`; these are run relative to the repo root (the make target's cwd), not this directory. (`outPath := flag.String("out", viewgen.DefaultOutputPath, "output SQL file path")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `main.go` | CLI: parses -schema/-out flags and invokes viewgen.GenerateFile; only file in this package. | Paths are relative to the caller's working directory (repo root via the make target), not to cmd/viewgen. Do not add view logic here — it lives in tools/migrate/viewgen/viewgen.go (CollectViews/RenderSQL). | + +## Anti-Patterns + +- Adding view-collection or SQL-rendering logic in main.go instead of the tools/migrate/viewgen package. +- Hardcoding the output path instead of referencing viewgen.DefaultOutputPath. +- Hand-editing the generated views.sql output (header says `Code generated by viewgen, DO NOT EDIT.`); regenerate with `make generate-view-sql`. + +## Decisions + +- **A standalone generator binary exists for Ent views at all.** — In this repo's Ent/Atlas setup, `ent.View` schemas do not appear in generated migrate.Tables, so `atlas migrate diff` reports no changes for views; viewgen emits the CREATE VIEW DDL that Atlas cannot derive. + +## Example: Generate the views SQL file from the Ent schema + +``` +import "github.com/openmeterio/openmeter/tools/migrate/viewgen" + +func main() { + schemaPath := flag.String("schema", "./openmeter/ent/schema", "path to the ent schema package") + outPath := flag.String("out", viewgen.DefaultOutputPath, "output SQL file path") + flag.Parse() + if err := viewgen.GenerateFile(*schemaPath, *outPath); err != nil { + exitf("%v", err) + } +} +``` + + diff --git a/tools/migrate/viewgen/CLAUDE.md b/tools/migrate/viewgen/CLAUDE.md new file mode 100644 index 0000000000..f8161bda43 --- /dev/null +++ b/tools/migrate/viewgen/CLAUDE.md @@ -0,0 +1,44 @@ +# viewgen + + + +> Standalone Go generator that emits CREATE VIEW SQL for Ent schemas declared with ent.View, which Atlas diff omits from generated migrate metadata. It bridges the gap so view DDL can be materialized into a SQL file (default ./tools/migrate/views.sql) for the migration pipeline. + +## Patterns + +**Load Ent schema by path, not by importing generated code** — GenerateSQL reads schemas via (&load.Config{Path: schemaPath}).Load() from entgo.io/ent/entc/load, operating on []*load.Schema rather than the compiled ent/db package. New code must keep using load.Config so it works against ent://openmeter/ent/schema independently. (`spec, err := (&load.Config{Path: schemaPath}).Load()`) +**Only emit views, skip non-view schemas** — CollectViews iterates schemas and `continue`s unless s.View is true, then requires an EntSQL annotation. A schema with no EntSQL annotation or no ViewFor[dialect]/ViewAs query is silently skipped. (`if !s.View { continue }`) +**View query precedence: ViewFor[dialect] then ViewAs** — Resolve the SQL body from ant.ViewFor[dialectName] first; fall back to ant.ViewAs only when the dialect-specific query is empty. Both trimmed; empty means skip. (`query := strings.TrimSpace(ant.ViewFor[dialectName]); if query == "" { query = strings.TrimSpace(ant.ViewAs) }`) +**View name fallback chain** — Name resolves as ant.Table, then s.Config.Table, then strcase.CamelToSnake(inflect.Pluralize(s.Name)). New schemas relying on default naming must accept the pluralized snake_case result. (`name := ant.Table; if name == "" { name = s.Config.Table }; if name == "" { name = strcase.CamelToSnake(inflect.Pluralize(s.Name)) }`) +**Deterministic output via name sort** — Views are sort.Slice'd by Name before rendering so generated SQL is stable across runs and diff-friendly. (`sort.Slice(views, func(i, j int) bool { return views[i].Name < views[j].Name })`) +**Generated-file header marker** — RenderSQL prepends `-- Code generated by viewgen, DO NOT EDIT.` and a regenerate hint; the output file must never be hand-edited, matching repo-wide generated-code conventions. (`buf.WriteString("-- Code generated by viewgen, DO NOT EDIT.\n")`) + +## Key Files + +| File | Role | Watch For | +|------|------|-----------| +| `viewgen.go` | Entire package: GenerateSQL/GenerateFile drive the flow; CollectViews extracts ViewDef{Name,Query} from load.Schema; RenderSQL emits CREATE VIEW statements; entSQLAnnotation decodes the EntSQL annotation. | entSQLAnnotation round-trips the raw annotation through json.Marshal/Unmarshal into entsql.Annotation; a schema lacking the "EntSQL" key returns (nil, nil) and is skipped, not an error. DefaultOutputPath is hardcoded to ./tools/migrate/views.sql relative to repo root. | + +## Anti-Patterns + +- Importing openmeter/ent/db generated code to enumerate views instead of load.Config — defeats the point that views are absent from generated migrate metadata. +- Editing the generated views.sql output by hand; it carries a DO NOT EDIT header and is overwritten on regeneration. +- Using fmt.Fprintf without %q for the view name, breaking identifier quoting in the emitted CREATE VIEW. +- Removing the sort.Slice on views, producing nondeterministic SQL output and noisy diffs. + +## Decisions + +- **Generate view DDL separately from Atlas migration diff.** — In this repo's Ent/Atlas setup, ent.View schemas produce query code but do not appear in generated migrate.Tables, so view DDL needs an explicit generation path until generator support lands. +- **Resolve the SQL body via ViewFor[dialect] before ViewAs.** — Lets a schema provide Postgres-specific view SQL while keeping a generic ViewAs fallback for dialect-agnostic cases. + +## Example: Generate the views SQL file from the Ent schema directory + +``` +import "github.com/openmeterio/openmeter/tools/migrate/viewgen" + +if err := viewgen.GenerateFile("ent://openmeter/ent/schema", viewgen.DefaultOutputPath); err != nil { + return fmt.Errorf("generate views: %w", err) +} +``` + +